summaryrefslogtreecommitdiff
path: root/cleopatre/buildroot/package/diffutils/diffutils.mk
AgeCommit message (Expand)Author
2008-08-01- import of buildroot original sources (20080729 version)lefranc
/option>space:mode:
Diffstat (limited to 'cesar')
-rw-r--r--cesar/VisualState/Project1.___117
-rw-r--r--cesar/VisualState/Project1.vdgbin0 -> 247 bytes
-rw-r--r--cesar/VisualState/Project1.vdibin0 -> 247 bytes
-rw-r--r--cesar/VisualState/Project1.vsp62
-rw-r--r--cesar/VisualState/Project1.vtg16
-rw-r--r--cesar/VisualState/Project1.vws117
-rw-r--r--cesar/VisualState/Test_ALL.vlg2230
-rw-r--r--cesar/VisualState/Test_CCO.vlg273
-rw-r--r--cesar/VisualState/Test_INIT_SYSTEM.vlg270
-rw-r--r--cesar/VisualState/Test_POND.vlg487
-rw-r--r--cesar/VisualState/Test_STA.vlg412
-rw-r--r--cesar/VisualState/Test_SmallFSM.vlg366
-rw-r--r--cesar/VisualState/Test_UCCO.vlg200
-rw-r--r--cesar/VisualState/Test_USTA.vlg420
-rw-r--r--cesar/VisualState/Topstate1.vsr52
-rw-r--r--cesar/VisualState/Topstate2.vsr70
-rw-r--r--cesar/VisualState/coder/SEMEDef.h178
-rw-r--r--cesar/VisualState/coder/SEMTypes.h126
-rw-r--r--cesar/VisualState/coder/cesar_cp_PConstant.h25
-rw-r--r--cesar/VisualState/coder/cesar_cp_PEvent.h26
-rw-r--r--cesar/VisualState/coder/main_fsm.c129
-rw-r--r--cesar/VisualState/coder/main_fsm.h47
-rw-r--r--cesar/VisualState/coder/main_fsmAction.h165
-rw-r--r--cesar/VisualState/coder/main_fsmData.c376
-rw-r--r--cesar/VisualState/coder/main_fsmData.h123
-rw-r--r--cesar/VisualState/coder/sta_connection.c54
-rw-r--r--cesar/VisualState/coder/sta_connection.h47
-rw-r--r--cesar/VisualState/coder/sta_connectionAction.h31
-rw-r--r--cesar/VisualState/coder/sta_connectionData.c39
-rw-r--r--cesar/VisualState/coder/sta_connectionData.h74
-rw-r--r--cesar/VisualState/coder/vscoder.cre406
-rw-r--r--cesar/VisualState/create_TestAll.txt10
-rw-r--r--cesar/VisualState/sub/Topstate1.vsr704
-rw-r--r--cesar/VisualState/sub/Topstate1.vsr.bk1704
-rw-r--r--cesar/VisualState/sub/Topstate1.vsr.bk2704
-rw-r--r--cesar/VisualState/sub/Topstate1.vsr.bk3704
-rw-r--r--cesar/VisualState/sub/cp.vnw15
-rwxr-xr-xcesar/ce/Module4
-rw-r--r--cesar/ce/doc/architecture.odtbin0 -> 73862 bytes
-rw-r--r--cesar/ce/inc/bitloading.h133
-rwxr-xr-xcesar/ce/inc/cei.h424
-rwxr-xr-xcesar/ce/inc/cei_param.h97
-rw-r--r--cesar/ce/inc/ecos_time.h23
-rwxr-xr-xcesar/ce/inc/mpdu_measure_store.h139
-rwxr-xr-xcesar/ce/inc/rx.h203
-rw-r--r--cesar/ce/inc/trace.h74
-rwxr-xr-xcesar/ce/inc/tx.h108
-rwxr-xr-xcesar/ce/rxce_stats.h96
-rw-r--r--cesar/ce/src/bitloading.c215
-rwxr-xr-xcesar/ce/src/cei_param.c60
-rwxr-xr-xcesar/ce/src/mpdu_measure_store.c260
-rwxr-xr-xcesar/ce/src/rx.c300
-rw-r--r--cesar/ce/src/rxce_stats.c0
-rw-r--r--cesar/ce/src/trace.c52
-rwxr-xr-xcesar/ce/src/tx.c106
-rwxr-xr-xcesar/ce/test/common/Module1
-rw-r--r--cesar/ce/test/common/ecos_overide/cyg/kernel/Module1
-rw-r--r--cesar/ce/test/common/ecos_overide/cyg/kernel/kapi.h45
-rw-r--r--cesar/ce/test/common/ecos_overide/cyg/kernel/src/kapi.c62
-rw-r--r--cesar/ce/test/common/gaussian.h23
-rwxr-xr-xcesar/ce/test/common/print_utils.h60
-rw-r--r--cesar/ce/test/common/src/gaussian.c29
-rwxr-xr-xcesar/ce/test/common/src/print_utils.c145
-rw-r--r--cesar/ce/test/common/tonemap_utils.h135
-rwxr-xr-xcesar/ce/test/cov/cov_all_run.sh42
-rwxr-xr-xcesar/ce/test/cov/cov_one_run.sh63
-rwxr-xr-xcesar/ce/test/rx/Config5
-rw-r--r--cesar/ce/test/rx/general/Makefile8
-rwxr-xr-xcesar/ce/test/rx/general/host-Makefile33
-rw-r--r--cesar/ce/test/rx/general/overide/cp/Module1
-rw-r--r--cesar/ce/test/rx/general/overide/cp/cp.h50
-rw-r--r--cesar/ce/test/rx/general/overide/cp/interf/Module1
-rwxr-xr-xcesar/ce/test/rx/general/overide/cp/interf/interf.h65
-rwxr-xr-xcesar/ce/test/rx/general/overide/cp/interf/src/interf.c52
-rw-r--r--cesar/ce/test/rx/general/overide/cp/src/cp.c92
-rwxr-xr-xcesar/ce/test/rx/general/src/test_bitloading.c235
-rwxr-xr-xcesar/ce/test/rx/general/src/test_cei.c80
-rwxr-xr-xcesar/ce/test/rx/general/src/test_cei_param.c86
-rwxr-xr-xcesar/ce/test/rx/general/src/test_mpdu_measure_store.c294
-rwxr-xr-xcesar/ce/test/rx/general/src/test_rx.c281
-rwxr-xr-xcesar/ce/test/rx/general/src/test_sar_integration.c303
-rw-r--r--cesar/ce/test/rx/general/target-Makefile26
-rwxr-xr-xcesar/ce/test/rx/general/target-ecos.ecc.sh5
-rwxr-xr-xcesar/ce/test/rx/host_linux_sparc/Makefile17
-rw-r--r--cesar/ce/test/rx/host_linux_sparc/src/test_speed.c152
-rwxr-xr-xcesar/ce/test/rx/inc/test_rx.h37
-rw-r--r--cesar/ce/test/rx/maximus/Makefile21
-rw-r--r--cesar/ce/test/rx/maximus/ecos.ecc.sh104
-rw-r--r--cesar/ce/test/rx/maximus/overide/mac/pbproc/Module1
-rw-r--r--cesar/ce/test/rx/maximus/overide/mac/pbproc/pbproc.h145
-rw-r--r--cesar/ce/test/rx/maximus/overide/mac/pbproc/src/pbproc.c261
-rw-r--r--cesar/ce/test/rx/maximus/send_noise.py102
-rw-r--r--cesar/ce/test/rx/maximus/src/test_rx.c187
-rw-r--r--cesar/ce/test/rx/tonemap_refresh/Makefile18
-rwxr-xr-xcesar/ce/test/rx/tonemap_refresh/ecos.ecc.sh5
-rw-r--r--cesar/ce/test/rx/tonemap_refresh/src/test_tonemaps_refresh.c117
-rw-r--r--cesar/ce/test/tx/Makefile8
-rwxr-xr-xcesar/ce/test/tx/host-Makefile17
-rw-r--r--cesar/ce/test/tx/src/test_expiration.c121
-rwxr-xr-xcesar/ce/test/tx/src/test_tx.c150
-rw-r--r--cesar/ce/test/tx/target-Makefile22
-rwxr-xr-xcesar/ce/test/tx/target-ecos.ecc.sh5
-rw-r--r--cesar/ce/test/tx/test.h18
-rw-r--r--cesar/cl/Module4
-rw-r--r--cesar/cl/cl.h321
-rw-r--r--cesar/cl/cl_mactotei.h84
-rwxr-xr-xcesar/cl/doc/cesar_cl.odtbin0 -> 273599 bytes
-rw-r--r--cesar/cl/inc/cl.h71
-rw-r--r--cesar/cl/inc/cl_mactotei.h154
-rw-r--r--cesar/cl/inc/context.h130
-rw-r--r--cesar/cl/inc/trace.h79
-rw-r--r--cesar/cl/src/cl.c691
-rw-r--r--cesar/cl/src/cl_mactotei.c280
-rw-r--r--cesar/cl/src/trace.c78
-rw-r--r--cesar/cl/test/Makefile39
-rw-r--r--cesar/cl/test/overide/mac/sar/Module1
-rw-r--r--cesar/cl/test/overide/mac/sar/sar.h162
-rw-r--r--cesar/cl/test/overide/mac/sar/src/sar.c161
-rw-r--r--cesar/cl/test/src/cl_mactotei_api.c244
-rw-r--r--cesar/cl/test/src/cl_mactotei_find.c96
-rw-r--r--cesar/cl/test/src/cl_mactotei_heapsort.c102
-rw-r--r--cesar/cl/test/src/cl_mme_recv.c121
-rw-r--r--cesar/cl/test/src/cl_mme_send_as_data.c202
-rw-r--r--cesar/cl/test/src/cl_mme_send_as_mme.c105
-rw-r--r--cesar/cl/test/src/cl_recv_data.c92
-rw-r--r--cesar/cl/test/src/cl_send_data.c159
-rw-r--r--cesar/cl/test/src/phy_stub.c24
-rw-r--r--cesar/common/defs/ethernet.h24
-rw-r--r--cesar/common/defs/homeplugAV.h29
-rw-r--r--cesar/common/doc/Doxyfile1255
-rw-r--r--cesar/common/doc/Makefile14
-rwxr-xr-xcesar/common/doc/docfilter28
-rwxr-xr-xcesar/common/doc/dox2rst40
-rw-r--r--cesar/common/doc/doxygen.h41
-rwxr-xr-xcesar/common/doc/extractdoc39
-rw-r--r--cesar/common/make/build.mk66
-rw-r--r--cesar/common/make/config.mk28
-rw-r--r--cesar/common/make/default.mk30
-rw-r--r--cesar/common/make/ecos.mk149
-rw-r--r--cesar/common/make/func.mk71
-rw-r--r--cesar/common/make/misc.mk13
-rw-r--r--cesar/common/make/print.mk67
-rw-r--r--cesar/common/make/setup.mk67
-rw-r--r--cesar/common/make/target.mk23
-rw-r--r--cesar/common/make/test/Config-output3
-rw-r--r--cesar/common/make/test/Config.alt-output8
-rw-r--r--cesar/common/make/test/b_shout.h-output6
-rw-r--r--cesar/common/make/test/clean-output12
-rw-r--r--cesar/common/make/test/ecos.ecc.sh-output5
-rw-r--r--cesar/common/make/test/first-output19
-rw-r--r--cesar/common/make/test/modules/a/Module2
-rw-r--r--cesar/common/make/test/modules/a/a.h23
-rw-r--r--cesar/common/make/test/modules/a/src/a.c25
-rw-r--r--cesar/common/make/test/modules/b/Config3
-rw-r--r--cesar/common/make/test/modules/b/Module1
-rw-r--r--cesar/common/make/test/modules/b/b.h26
-rw-r--r--cesar/common/make/test/modules/b/inc/b_shout.h18
-rw-r--r--cesar/common/make/test/modules/b/src/b_print.c33
-rw-r--r--cesar/common/make/test/modules/b/src/b_shout.c34
-rw-r--r--cesar/common/make/test/nothing-output1
-rw-r--r--cesar/common/make/test/project/Config2
-rw-r--r--cesar/common/make/test/project/Config.alt2
-rw-r--r--cesar/common/make/test/project/Makefile20
-rw-r--r--cesar/common/make/test/project/ecos.ecc.sh11
-rw-r--r--cesar/common/make/test/project/inc/test_make.h18
-rw-r--r--cesar/common/make/test/project/src/test_cpp.cpp27
-rw-r--r--cesar/common/make/test/project/src/test_make.c26
-rw-r--r--cesar/common/make/test/project_synth/Config1
-rw-r--r--cesar/common/make/test/project_synth/Makefile12
-rw-r--r--cesar/common/make/test/project_synth/ecos.ecc.sh5
-rw-r--r--cesar/common/make/test/project_synth/inc/test_make.h18
-rw-r--r--cesar/common/make/test/project_synth/src/test_make.c26
-rw-r--r--cesar/common/make/test/test_make.c-output5
-rw-r--r--cesar/common/make/test/test_make.h-output7
-rwxr-xr-xcesar/common/make/test/test_make.sh65
-rw-r--r--cesar/common/make/top.mk22
-rw-r--r--cesar/common/std.h33
-rw-r--r--cesar/common/tests/Makefile31
-rwxr-xr-xcesar/common/tests/get-cov.pl32
-rwxr-xr-xcesar/common/tests/run-test.pl235
-rw-r--r--cesar/common/tests/tests291
-rwxr-xr-xcesar/common/tools/check-filename66
-rwxr-xr-xcesar/common/tools/compact-ecos-config122
-rwxr-xr-xcesar/common/tools/config-headers100
-rwxr-xr-xcesar/common/tools/config-merge54
-rwxr-xr-xcesar/common/tools/gentags1
-rwxr-xr-xcesar/common/tools/project-template193
-rw-r--r--cesar/common/tools/sdl.ps655
-rwxr-xr-xcesar/common/tools/sdl2dot227
-rwxr-xr-xcesar/common/tools/vcd-merge111
-rwxr-xr-xcesar/common/tools/vcd-trace129
-rw-r--r--cesar/cp/beacon/Module4
-rw-r--r--cesar/cp/beacon/beacon.h57
-rw-r--r--cesar/cp/beacon/beacons.h201
-rw-r--r--cesar/cp/beacon/doc/beacons.odtbin0 -> 476897 bytes
-rw-r--r--cesar/cp/beacon/forward.h35
-rw-r--r--cesar/cp/beacon/inc/beacon_types.h69
-rw-r--r--cesar/cp/beacon/inc/beacons.h110
-rw-r--r--cesar/cp/beacon/inc/beacons_ctx.h177
-rw-r--r--cesar/cp/beacon/inc/beacons_work.h79
-rw-r--r--cesar/cp/beacon/inc/bentries_structs.h210
-rw-r--r--cesar/cp/beacon/inc/bentry.h379
-rwxr-xr-xcesar/cp/beacon/inc/ntb_clock_sync.h167
-rw-r--r--cesar/cp/beacon/inc/trace.h74
-rw-r--r--cesar/cp/beacon/src/beacon.c185
-rw-r--r--cesar/cp/beacon/src/beacons.c1047
-rw-r--r--cesar/cp/beacon/src/bentry.c1006
-rwxr-xr-xcesar/cp/beacon/src/ntb_clock_sync.c543
-rw-r--r--cesar/cp/beacon/src/trace.c71
-rw-r--r--cesar/cp/beacon/test/cco/Makefile25
-rw-r--r--cesar/cp/beacon/test/cco/ecos.ecc.sh5
-rw-r--r--cesar/cp/beacon/test/cco/inc/phy_stub.h28
-rw-r--r--cesar/cp/beacon/test/cco/src/ca_stub.c57
-rw-r--r--cesar/cp/beacon/test/cco/src/cco.c231
-rw-r--r--cesar/cp/beacon/test/cco/src/cl_stub.c63
-rw-r--r--cesar/cp/beacon/test/cco/src/hle_stub.c44
-rw-r--r--cesar/cp/beacon/test/cco/src/ipmbox_stub.c22
-rw-r--r--cesar/cp/beacon/test/cco/src/phy_stub.c38
-rw-r--r--cesar/cp/beacon/test/cco/src/sar_stub.c37
-rw-r--r--cesar/cp/beacon/test/cco/src/ucco.c229
-rw-r--r--cesar/cp/beacon/test/central_beacon/Makefile53
-rw-r--r--cesar/cp/beacon/test/central_beacon/ecos.ecc.sh5
-rw-r--r--cesar/cp/beacon/test/central_beacon/inc/phy_stub.h28
-rw-r--r--cesar/cp/beacon/test/central_beacon/src/ac_line_test.c183
-rw-r--r--cesar/cp/beacon/test/central_beacon/src/bentry_test.c798
-rw-r--r--cesar/cp/beacon/test/central_beacon/src/bts_bto_bp.c175
-rw-r--r--cesar/cp/beacon/test/central_beacon/src/ca_stub.c57
-rw-r--r--cesar/cp/beacon/test/central_beacon/src/cco_request_discover_beacon.c293
-rw-r--r--cesar/cp/beacon/test/central_beacon/src/central_beacon.c736
-rw-r--r--cesar/cp/beacon/test/central_beacon/src/cl_stub.c63
-rw-r--r--cesar/cp/beacon/test/central_beacon/src/hle_stub.c44
-rw-r--r--cesar/cp/beacon/test/central_beacon/src/ipmbox_stub.c22
-rw-r--r--cesar/cp/beacon/test/central_beacon/src/pbproc_stub.c46
-rw-r--r--cesar/cp/beacon/test/central_beacon/src/phy_stub.c32
-rw-r--r--cesar/cp/beacon/test/central_beacon/src/sar_stub.c37
-rw-r--r--cesar/cp/beacon/test/central_beacon/src/usta.c184
-rw-r--r--cesar/cp/beacon/test/overide/cp/cco/Module1
-rw-r--r--cesar/cp/beacon/test/overide/cp/cco/cco.h123
-rw-r--r--cesar/cp/beacon/test/overide/cp/cco/inc/context.h46
-rw-r--r--cesar/cp/beacon/test/overide/cp/cco/src/cco.c281
-rw-r--r--cesar/cp/beacon/test/overide/cp/station/Module1
-rw-r--r--cesar/cp/beacon/test/overide/cp/station/inc/context.h39
-rw-r--r--cesar/cp/beacon/test/overide/cp/station/src/station.c244
-rw-r--r--cesar/cp/beacon/test/overide/cp/station/station.h165
-rw-r--r--cesar/cp/beacon/test/sync/Config1
-rw-r--r--cesar/cp/beacon/test/sync/Makefile14
-rw-r--r--cesar/cp/beacon/test/sync/hal/phy/Module1
-rw-r--r--cesar/cp/beacon/test/sync/hal/phy/phy.h37
-rw-r--r--cesar/cp/beacon/test/sync/hal/phy/src/phy.c42
-rw-r--r--cesar/cp/beacon/test/sync/spo_m50_snr_m02.txt39439
-rw-r--r--cesar/cp/beacon/test/sync/spo_m50_snr_m03.txt39439
-rw-r--r--cesar/cp/beacon/test/sync/spo_p0_snr_p0.txt39439
-rw-r--r--cesar/cp/beacon/test/sync/src/test_sync.c114
-rw-r--r--cesar/cp/cco/Module1
-rw-r--r--cesar/cp/cco/cco.h123
-rw-r--r--cesar/cp/cco/inc/context.h46
-rw-r--r--cesar/cp/cco/src/cco.c281
-rw-r--r--cesar/cp/conn/Module1
-rw-r--r--cesar/cp/conn/conn.h29
-rw-r--r--cesar/cp/conn/inc/conn_actions.h17
-rw-r--r--cesar/cp/conn/inc/conn_defs.h118
-rw-r--r--cesar/cp/conn/inc/conn_priv.h39
-rw-r--r--cesar/cp/conn/src/conn.c113
-rw-r--r--cesar/cp/cp_types.h53
-rw-r--r--cesar/cp/interf/Makefile9
-rw-r--r--cesar/cp/interf/Module2
-rw-r--r--cesar/cp/interf/ecos.ecc.sh5
-rw-r--r--cesar/cp/interf/inc/interf_cl_layer.h53
-rw-r--r--cesar/cp/interf/inc/interf_private.h34
-rw-r--r--cesar/cp/interf/inc/interf_types.h77
-rw-r--r--cesar/cp/interf/interf.h132
-rw-r--r--cesar/cp/interf/src/interf.c639
-rw-r--r--cesar/cp/interf/src/interf_cl_layer.c89
-rw-r--r--cesar/cp/msg/Module7
-rw-r--r--cesar/cp/msg/ecos.ecc.sh5
-rw-r--r--cesar/cp/msg/inc/msg_apcm.h16
-rw-r--r--cesar/cp/msg/inc/msg_cc.h73
-rw-r--r--cesar/cp/msg/inc/msg_cm.h88
-rw-r--r--cesar/cp/msg/inc/msg_cm_conn_dbg.h239
-rw-r--r--cesar/cp/msg/inc/msg_cm_convert.h24
-rw-r--r--cesar/cp/msg/inc/msg_const.h325
-rw-r--r--cesar/cp/msg/inc/msg_drv.h276
-rw-r--r--cesar/cp/msg/inc/msg_field.h410
-rw-r--r--cesar/cp/msg/msg.h105
-rw-r--r--cesar/cp/msg/src/cm/conn/msg_cm_conn_info_cnf.c17
-rw-r--r--cesar/cp/msg/src/cm/conn/msg_cm_conn_info_req.c17
-rw-r--r--cesar/cp/msg/src/cm/conn/msg_cm_conn_mod_cnf.c95
-rw-r--r--cesar/cp/msg/src/cm/conn/msg_cm_conn_mod_req.c85
-rw-r--r--cesar/cp/msg/src/cm/conn/msg_cm_conn_new_cnf.c110
-rw-r--r--cesar/cp/msg/src/cm/conn/msg_cm_conn_new_req.c91
-rw-r--r--cesar/cp/msg/src/cm/conn/msg_cm_conn_rel_ind.c92
-rw-r--r--cesar/cp/msg/src/cm/conn/msg_cm_conn_rel_rsp.c76
-rw-r--r--cesar/cp/msg/src/field/msg_field_cid.c70
-rw-r--r--cesar/cp/msg/src/field/msg_field_cinfo.c93
-rw-r--r--cesar/cp/msg/src/field/msg_field_classifier.c563
-rw-r--r--cesar/cp/msg/src/field/msg_field_cspec.c114
-rw-r--r--cesar/cp/msg/src/field/msg_field_qmp.c1189
-rw-r--r--cesar/cp/msg/src/msg.c336
-rw-r--r--cesar/cp/msg/src/msg_apcm.c16
-rw-r--r--cesar/cp/msg/src/msg_cc.c141
-rw-r--r--cesar/cp/msg/src/msg_cm.c273
-rw-r--r--cesar/cp/msg/src/msg_cm_convert.c65
-rw-r--r--cesar/cp/msg/src/msg_drv.c497
-rw-r--r--cesar/cp/msg/test/ecos.ecc.sh5
-rw-r--r--cesar/cp/msg/test/inc/test_conn.h34
-rw-r--r--cesar/cp/msg/test/src/test_msg_cm_conn.c29
-rw-r--r--cesar/cp/msg/test/src/test_msg_cm_conn_mod_cnf.c801
-rw-r--r--cesar/cp/msg/test/src/test_msg_cm_conn_mod_req.c755
-rw-r--r--cesar/cp/msg/test/src/test_msg_cm_conn_new_cnf.c816
-rw-r--r--cesar/cp/msg/test/src/test_msg_cm_conn_new_req.c879
-rw-r--r--cesar/cp/msg/test/src/test_msg_cm_conn_rel_ind.c800
-rw-r--r--cesar/cp/msg/test/src/test_msg_cm_conn_rel_rsp.c90
-rw-r--r--cesar/cp/msg/test/src/test_msg_field.c2898
-rw-r--r--cesar/cp/secu/Makefile9
-rw-r--r--cesar/cp/secu/Module2
-rw-r--r--cesar/cp/secu/inc/secu_aes.h113
-rw-r--r--cesar/cp/secu/inc/secu_p_run.h60
-rw-r--r--cesar/cp/secu/inc/secu_pbkdf1.h46
-rw-r--r--cesar/cp/secu/inc/secu_sha2.h129
-rw-r--r--cesar/cp/secu/inc/secu_types.h126
-rw-r--r--cesar/cp/secu/secu.h131
-rw-r--r--cesar/cp/secu/src/secu_aes.c768
-rw-r--r--cesar/cp/secu/src/secu_lib.c231
-rw-r--r--cesar/cp/secu/src/secu_p_run.c117
-rw-r--r--cesar/cp/secu/src/secu_pbkdf1.c90
-rw-r--r--cesar/cp/secu/src/secu_sha2.c427
-rw-r--r--cesar/cp/spoc/Module1
-rw-r--r--cesar/cp/spoc/spoc.h50
-rw-r--r--cesar/cp/spoc/src/spoc.c175
-rw-r--r--cesar/cp/spoc/test/ApproxOrder1ParamMCoeff.sci36
-rw-r--r--cesar/cp/spoc/test/ApproxOrder2ParamMCoeff.sci34
-rwxr-xr-xcesar/cp/spoc/test/Makefile11
-rw-r--r--cesar/cp/spoc/test/coeff_generation.scilab22
-rw-r--r--cesar/cp/spoc/test/define_spoc_c.h20
-rw-r--r--cesar/cp/spoc/test/get_Approx1.sci21
-rw-r--r--cesar/cp/spoc/test/src/test_coeff_check.c194
-rw-r--r--cesar/cp/station/Module2
-rw-r--r--cesar/cp/station/ecos.ecc.sh5
-rw-r--r--cesar/cp/station/inc/station_actions.h86
-rw-r--r--cesar/cp/station/inc/station_apivs.h49
-rw-r--r--cesar/cp/station/inc/station_ctx.h77
-rw-r--r--cesar/cp/station/inc/station_data.h401
-rw-r--r--cesar/cp/station/inc/station_event_handler.h73
-rw-r--r--cesar/cp/station/inc/station_types.h103
-rw-r--r--cesar/cp/station/maximus/Module5
-rw-r--r--cesar/cp/station/maximus/inc/maximus_cp_station.h49
-rw-r--r--cesar/cp/station/maximus/src/maximus_cp_station.c535
-rw-r--r--cesar/cp/station/src/station_actions.c1261
-rw-r--r--cesar/cp/station/src/station_apivs.c148
-rw-r--r--cesar/cp/station/src/station_core.c265
-rw-r--r--cesar/cp/station/src/station_data.c577
-rw-r--r--cesar/cp/station/src/station_event_handler.c76
-rw-r--r--cesar/cp/station/station.h97
-rw-r--r--cesar/cp/test/Makefile30
-rw-r--r--cesar/cp/test/ecos.ecc.sh5
-rw-r--r--cesar/cp/test/inc/test_conn.h28
-rw-r--r--cesar/cp/test/inc/test_interf.h29
-rw-r--r--cesar/cp/test/inc/test_msg.h27
-rw-r--r--cesar/cp/test/inc/test_secu.h24
-rw-r--r--cesar/cp/test/inc/test_station.h26
-rw-r--r--cesar/cp/test/overide/cp/cco/Module1
-rw-r--r--cesar/cp/test/overide/cp/cco/cco.h123
-rw-r--r--cesar/cp/test/overide/cp/cco/inc/context.h46
-rw-r--r--cesar/cp/test/overide/cp/cco/src/cco.c281
-rw-r--r--cesar/cp/test/src/test_conn.c69
-rw-r--r--cesar/cp/test/src/test_cp.c91
-rw-r--r--cesar/cp/test/src/test_interf.c341
-rw-r--r--cesar/cp/test/src/test_msg.c158
-rw-r--r--cesar/cp/test/src/test_secu.c570
-rw-r--r--cesar/cp/test/src/test_station.c392
-rw-r--r--cesar/cp/test_maximus/.gdbinit2
-rw-r--r--cesar/cp/test_maximus/Makefile26
-rw-r--r--cesar/cp/test_maximus/ecos.ecc.sh5
-rw-r--r--cesar/cp/test_maximus/src/AV_station.c598
-rw-r--r--cesar/cp/test_maximus/src/Maximus.py198
-rw-r--r--cesar/cp/test_maximus/src/cp_test_maximus.c375
-rw-r--r--cesar/cp/vstate_fsm/Module3
-rw-r--r--cesar/cp/vstate_fsm/ecos.ecc.sh5
-rw-r--r--cesar/cp/vstate_fsm/src/SEMEDef.h178
-rw-r--r--cesar/cp/vstate_fsm/src/SEMTypes.h126
-rw-r--r--cesar/cp/vstate_fsm/src/cesar_cp_PConstant.h25
-rw-r--r--cesar/cp/vstate_fsm/src/cesar_cp_PEvent.h26
-rw-r--r--cesar/cp/vstate_fsm/src/main_fsm.c129
-rw-r--r--cesar/cp/vstate_fsm/src/main_fsm.h47
-rw-r--r--cesar/cp/vstate_fsm/src/main_fsmAction.h165
-rw-r--r--cesar/cp/vstate_fsm/src/main_fsmData.c376
-rw-r--r--cesar/cp/vstate_fsm/src/main_fsmData.h123
-rw-r--r--cesar/cp/vstate_fsm/src/sta_connection.c54
-rw-r--r--cesar/cp/vstate_fsm/src/sta_connection.h47
-rw-r--r--cesar/cp/vstate_fsm/src/sta_connectionAction.h31
-rw-r--r--cesar/cp/vstate_fsm/src/sta_connectionData.c39
-rw-r--r--cesar/cp/vstate_fsm/src/sta_connectionData.h74
-rw-r--r--cesar/cp2/beacon/beacons.h115
-rw-r--r--cesar/cp2/beacon/inc/beacons.h132
-rwxr-xr-xcesar/cp2/beacon/ntb/inc/ntb_clock_sync.h170
-rwxr-xr-xcesar/cp2/beacon/ntb/src/ntb_clock_sync.c541
-rw-r--r--cesar/cp2/cco/action/action.h179
-rwxr-xr-xcesar/cp2/cco/action/doc/CCo Con.odtbin0 -> 129318 bytes
-rwxr-xr-xcesar/cp2/cco/bw/doc/Bandwidth_Manager.odtbin0 -> 360852 bytes
-rwxr-xr-xcesar/cp2/cco/region/doc/Region_Manager.odtbin0 -> 102273 bytes
-rw-r--r--cesar/cp2/cl_interf/cl_interf.h126
-rw-r--r--cesar/cp2/cl_interf/inc/cl_interf_defs.h18
-rw-r--r--cesar/cp2/defs.h31
-rw-r--r--cesar/cp2/mme.h229
-rw-r--r--cesar/cp2/msg/inc/msg_cc.h52
-rw-r--r--cesar/cp2/msg/inc/msg_cm.h44
-rw-r--r--cesar/cp2/msg/msg.h105
-rw-r--r--cesar/cp2/secu/secu.h160
-rw-r--r--cesar/cp2/sta/action/action.h46
-rw-r--r--cesar/cp2/sta/action/assoc.h190
-rw-r--r--cesar/cp2/sta/action/doc/Makefile47
-rw-r--r--cesar/cp2/sta/action/doc/assoc.sdl21
-rw-r--r--cesar/cp2/sta/action/doc/cp_sta_action.odtbin0 -> 146879 bytes
-rw-r--r--cesar/cp2/sta/action/key.h165
-rw-r--r--cesar/cp2/sta/action/misc.h117
-rw-r--r--cesar/cp2/sta/core/core.h122
-rw-r--r--cesar/cp2/sta/data/inc/own_data.h30
-rw-r--r--cesar/cp2/sta/data/inc/sta_data.h33
-rw-r--r--cesar/cp2/sta/data/net_list.h83
-rw-r--r--cesar/cp2/sta/data/own_data.h111
-rw-r--r--cesar/cp2/sta/data/sta_data.h122
-rw-r--r--cesar/cp2/sta/mgr/doc/sta_manager.odtbin0 -> 155926 bytes
-rw-r--r--cesar/cp2/sta/mgr/sta_mgr.h163
-rw-r--r--cesar/cp2/vstate_fsm/vstate_fsm.h65
-rw-r--r--cesar/ecos/COPYING340
-rw-r--r--cesar/ecos/ChangeLog116
-rw-r--r--cesar/ecos/Makefile.am44
-rw-r--r--cesar/ecos/Makefile.in363
-rw-r--r--cesar/ecos/README.host365
-rw-r--r--cesar/ecos/acinclude.m444
-rw-r--r--cesar/ecos/aclocal.m4182
-rw-r--r--cesar/ecos/acsupport/ChangeLog51
-rw-r--r--cesar/ecos/acsupport/acinclude.m4891
-rwxr-xr-xcesar/ecos/acsupport/config.guess1171
-rwxr-xr-xcesar/ecos/acsupport/config.sub1250
-rwxr-xr-xcesar/ecos/acsupport/install-sh251
-rwxr-xr-xcesar/ecos/acsupport/ltconfig2822
-rw-r--r--cesar/ecos/acsupport/ltmain.sh3779
-rwxr-xr-xcesar/ecos/acsupport/missing188
-rwxr-xr-xcesar/ecos/acsupport/mkinstalldirs36
-rwxr-xr-xcesar/ecos/configure1245
-rw-r--r--cesar/ecos/configure.in195
-rw-r--r--cesar/ecos/doc/ChangeLog154
-rw-r--r--cesar/ecos/doc/sgml/.cvsignore9
-rw-r--r--cesar/ecos/doc/sgml/README-PDF31
-rw-r--r--cesar/ecos/doc/sgml/doclist43
-rw-r--r--cesar/ecos/doc/sgml/jadetex.cfg1
-rwxr-xr-xcesar/ecos/doc/sgml/makemakefile225
-rw-r--r--cesar/ecos/doc/sgml/user-guide/.cvsignore1
-rw-r--r--cesar/ecos/doc/sgml/user-guide/ChangeLog165
-rwxr-xr-xcesar/ecos/doc/sgml/user-guide/config-tool.sgml1520
-rw-r--r--cesar/ecos/doc/sgml/user-guide/configuration.sgml2023
-rw-r--r--cesar/ecos/doc/sgml/user-guide/ecos-license.sgml382
-rw-r--r--cesar/ecos/doc/sgml/user-guide/installation.sgml250
-rw-r--r--cesar/ecos/doc/sgml/user-guide/introduction.sgml785
-rw-r--r--cesar/ecos/doc/sgml/user-guide/jadetex.cfg1
-rw-r--r--cesar/ecos/doc/sgml/user-guide/makefile54
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/ARMStartup01.pngbin0 -> 6398 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/BuildPackages.pngbin0 -> 9789 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/Conflicts.pngbin0 -> 4197 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/ToolsOptions.pngbin0 -> 3902 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/addfromfolder.pngbin0 -> 3536 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/addplatform.pngbin0 -> 1641 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/admin.pngbin0 -> 6139 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/bash.pngbin0 -> 2295 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/build-lib01.pngbin0 -> 1630 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/build-processalt.pngbin0 -> 6383 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/build-tests01.pngbin0 -> 1882 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/build-tools.pngbin0 -> 3058 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/build-tools2.pngbin0 -> 3463 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/buildoptions.pngbin0 -> 6922 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/ch-properties-dialog.pngbin0 -> 4702 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/comprepos.pngbin0 -> 6502 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/config-f1.pngbin0 -> 25245 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/configwin.pngbin0 -> 8570 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/conflictwin.pngbin0 -> 3668 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/connection.pngbin0 -> 2311 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/find-dialog.pngbin0 -> 2946 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/html-help.pngbin0 -> 21788 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/memorywin.pngbin0 -> 2577 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/memregions.pngbin0 -> 4248 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/memreloc.pngbin0 -> 3401 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/modifyplatform.pngbin0 -> 4347 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/open-dialog.pngbin0 -> 3608 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/propwin.pngbin0 -> 4424 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/regprops.pngbin0 -> 3008 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/repos-relocate.pngbin0 -> 2508 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/run-tests.pngbin0 -> 7703 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/save-as-dialog.pngbin0 -> 10334 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/settings-conflict.pngbin0 -> 3902 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/settings-display.pngbin0 -> 5142 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/settings-runtests.pngbin0 -> 4678 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/settings-viewers.pngbin0 -> 4701 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/templates.pngbin0 -> 6866 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/templates01.pngbin0 -> 10998 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/toolsplatforms.pngbin0 -> 7803 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/twothreads2.pngbin0 -> 7295 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/pix/user-tools-dialog.pngbin0 -> 2963 bytes
-rw-r--r--cesar/ecos/doc/sgml/user-guide/programming-concepts-techniques.sgml959
-rw-r--r--cesar/ecos/doc/sgml/user-guide/programming.sgml1340
-rw-r--r--cesar/ecos/doc/sgml/user-guide/real-time-characterization.sgml3316
-rw-r--r--cesar/ecos/doc/sgml/user-guide/target-setup.sgml3105
-rwxr-xr-xcesar/ecos/doc/sgml/user-guide/user-guide.sgml141
-rw-r--r--cesar/ecos/examples/ChangeLog8
-rw-r--r--cesar/ecos/examples/Makefile55
-rwxr-xr-xcesar/ecos/examples/build_Make.params44
-rwxr-xr-xcesar/ecos/examples/build_Makefile39
-rw-r--r--cesar/ecos/examples/hello.c8
-rw-r--r--cesar/ecos/examples/instrument-test.c50
-rw-r--r--cesar/ecos/examples/serial.c83
-rw-r--r--cesar/ecos/examples/simple-alarm.c76
-rw-r--r--cesar/ecos/examples/twothreads.c62
-rw-r--r--cesar/ecos/packages/ChangeLog2518
-rw-r--r--cesar/ecos/packages/NEWS454
-rw-r--r--cesar/ecos/packages/compat/linux/current/ChangeLog95
-rw-r--r--cesar/ecos/packages/compat/linux/current/cdl/linux.cdl76
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/asm/atomic.h10
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/asm/bug.h6
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/asm/page.h11
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/asm/semaphore.h20
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/TODO11
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/compiler.h7
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/completion.h7
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/config.h5
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/crc32.h8
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/errno.h1
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/fs.h13
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/init.h3
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/kernel.h32
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/list.h141
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/mtd/compatmac.h5
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/mtd/mtd.h5
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/pagemap.h19
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/rbtree.h46
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/rwsem.h20
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/sched.h7
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/slab.h14
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/spinlock.h34
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/stat.h12
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/string.h6
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/timer.h10
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/types.h13
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/version.h5
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/vmalloc.h3
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/wait.h15
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/workqueue.h11
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/zlib.h14
-rw-r--r--cesar/ecos/packages/compat/linux/current/include/linux/zutil.h6
-rw-r--r--cesar/ecos/packages/compat/linux/current/src/rbtree.c409
-rw-r--r--cesar/ecos/packages/compat/posix/current/ChangeLog1094
-rw-r--r--cesar/ecos/packages/compat/posix/current/cdl/posix.cdl317
-rw-r--r--cesar/ecos/packages/compat/posix/current/cdl/pthread.cdl197
-rw-r--r--cesar/ecos/packages/compat/posix/current/doc/posix.sgml1568
-rw-r--r--cesar/ecos/packages/compat/posix/current/include/export.h114
-rw-r--r--cesar/ecos/packages/compat/posix/current/include/limits.h131
-rw-r--r--cesar/ecos/packages/compat/posix/current/include/mutex.h172
-rw-r--r--cesar/ecos/packages/compat/posix/current/include/muttypes.h138
-rw-r--r--cesar/ecos/packages/compat/posix/current/include/pthread.h320
-rw-r--r--cesar/ecos/packages/compat/posix/current/include/semaphore.h127
-rw-r--r--cesar/ecos/packages/compat/posix/current/include/signal.h313
-rw-r--r--cesar/ecos/packages/compat/posix/current/include/sigsetjmp.h94
-rw-r--r--cesar/ecos/packages/compat/posix/current/include/time.h151
-rw-r--r--cesar/ecos/packages/compat/posix/current/include/types.h112
-rw-r--r--cesar/ecos/packages/compat/posix/current/include/utsname.h98
-rw-r--r--cesar/ecos/packages/compat/posix/current/src/except.cxx343
-rw-r--r--cesar/ecos/packages/compat/posix/current/src/misc.cxx386
-rw-r--r--cesar/ecos/packages/compat/posix/current/src/mqueue.cxx1005
-rw-r--r--cesar/ecos/packages/compat/posix/current/src/mutex.cxx551
-rw-r--r--cesar/ecos/packages/compat/posix/current/src/pprivate.h271
-rw-r--r--cesar/ecos/packages/compat/posix/current/src/pthread.cxx1679
-rw-r--r--cesar/ecos/packages/compat/posix/current/src/sched.cxx242
-rw-r--r--cesar/ecos/packages/compat/posix/current/src/sem.cxx244
-rw-r--r--cesar/ecos/packages/compat/posix/current/src/signal.cxx1236
-rw-r--r--cesar/ecos/packages/compat/posix/current/src/startup.cxx87
-rw-r--r--cesar/ecos/packages/compat/posix/current/src/time.cxx700
-rw-r--r--cesar/ecos/packages/compat/posix/current/tests/mqueue1.c359
-rw-r--r--cesar/ecos/packages/compat/posix/current/tests/mqueue2.c276
-rw-r--r--cesar/ecos/packages/compat/posix/current/tests/mutex3.c672
-rw-r--r--cesar/ecos/packages/compat/posix/current/tests/pthread1.c119
-rw-r--r--cesar/ecos/packages/compat/posix/current/tests/pthread2.c176
-rw-r--r--cesar/ecos/packages/compat/posix/current/tests/pthread3.c269
-rw-r--r--cesar/ecos/packages/compat/posix/current/tests/signal1.c302
-rw-r--r--cesar/ecos/packages/compat/posix/current/tests/signal2.c313
-rw-r--r--cesar/ecos/packages/compat/posix/current/tests/signal3.c174
-rw-r--r--cesar/ecos/packages/compat/posix/current/tests/sigsetjmp.c383
-rw-r--r--cesar/ecos/packages/compat/posix/current/tests/timer1.c343
-rw-r--r--cesar/ecos/packages/compat/posix/current/tests/tm_basic.cxx1696
-rw-r--r--cesar/ecos/packages/cygmon/current/ChangeLog252
-rw-r--r--cesar/ecos/packages/cygmon/current/cdl/cygmon.cdl140
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/Notes_CygMon_PID168
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/arm/arm-mon.c281
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/arm/board.h82
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/arm/cpu.h978
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/arm/cpu_info.h100
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/board.h72
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bplist-dynamic.c234
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/breakpoints.c220
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/arm/gdb-cpu.c208
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/arm/gdb-cpu.h61
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/arm/gdb.h58
-rwxr-xr-xcesar/ecos/packages/cygmon/current/misc/bsp/arm/insn.h482
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/arm/singlestep.c1320
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/bsp.h445
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/breakpoint.c97
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/bsp.c341
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/bsp_cache.c70
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/bsp_if.c160
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/bsp_if.h433
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/console-io.c140
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/debug-io.c142
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/gdb-cpu.c61
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/gdb-cpu.h65
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/gdb.h103
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/generic-mem.c194
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/hex-utils.c126
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/printf.c95
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/shared-data.c59
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/singlestep.c61
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/sprintf.c86
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/syscall.c218
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/syscall.h50
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/sysinfo.c170
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/common/vprintf.c445
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/cpu.h71
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/dbg-threads-api.h148
-rwxr-xr-xcesar/ecos/packages/cygmon/current/misc/bsp/defs.h112
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/gdb-data.h126
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/hex-utils.h85
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/mips/gdb-cpu.c53
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/mips/gdb-cpu.h58
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/mips/gdb.h58
-rwxr-xr-xcesar/ecos/packages/cygmon/current/misc/bsp/mips/insn.h59
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/mips/singlestep.c55
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/gdb-cpu.c53
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/gdb-cpu.h58
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/gdb.h58
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/insn.h59
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/singlestep.c55
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/cpu-mon.c61
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/cpu_info.h69
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/ecos_bsp.c470
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/ecos_dummy.c70
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/fmt_util.h65
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/generic-stub.h54
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/generic_fmt32.c98
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/generic_mem.c99
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/ledit.c604
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/ledit.h88
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/mips/board.h110
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/mips/cpu.h59
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/mips/cpu_info.h90
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/mips/mips-mon.c183
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/mn10300/board.h103
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/mn10300/cpu.h61
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/mn10300/cpu_info.h91
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/mn10300/mn10300-mon.c206
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/monitor.c494
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/monitor.h303
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/monitor_cmd.c2549
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/monitor_cmd.h126
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/stub-tservice.h54
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/tservice.h84
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/unistd.h54
-rw-r--r--cesar/ecos/packages/cygmon/current/misc/utils.c376
-rw-r--r--cesar/ecos/packages/devs/eth/greth/current/cdl/greth_drivers.cdl141
-rw-r--r--cesar/ecos/packages/devs/eth/greth/current/include/if_greth.h141
-rw-r--r--cesar/ecos/packages/devs/eth/greth/current/src/if_greth.c745
-rw-r--r--cesar/ecos/packages/devs/eth/opencores/ethermac/current/cdl/opencores_ethermac_drivers.cdl149
-rw-r--r--cesar/ecos/packages/devs/eth/opencores/ethermac/current/include/oeth_info.h324
-rw-r--r--cesar/ecos/packages/devs/eth/opencores/ethermac/current/src/if_oeth.c944
-rw-r--r--cesar/ecos/packages/devs/eth/phy/current/ChangeLog77
-rw-r--r--cesar/ecos/packages/devs/eth/phy/current/cdl/phy_eth_drivers.cdl99
-rw-r--r--cesar/ecos/packages/devs/eth/phy/current/doc/eth_phy.sgml173
-rw-r--r--cesar/ecos/packages/devs/eth/phy/current/include/eth_phy.h101
-rw-r--r--cesar/ecos/packages/devs/eth/phy/current/include/eth_phy_dev.h91
-rw-r--r--cesar/ecos/packages/devs/eth/phy/current/src/AM79C874.c103
-rw-r--r--cesar/ecos/packages/devs/eth/phy/current/src/DP83847.c99
-rw-r--r--cesar/ecos/packages/devs/eth/phy/current/src/INLXT972.c98
-rw-r--r--cesar/ecos/packages/devs/eth/phy/current/src/eth_phy.c289
-rw-r--r--cesar/ecos/packages/devs/eth/sparc/greth/leon3/current/cdl/leon3_greth_drivers.cdl125
-rw-r--r--cesar/ecos/packages/devs/eth/sparc/greth/leon3/current/include/devs_eth_sparc_greth_leon3.inl91
-rw-r--r--cesar/ecos/packages/devs/eth/sparc/greth/leon3/current/src/if_sparc_greth.c117
-rw-r--r--cesar/ecos/packages/devs/eth/sparc/leon2/current/ChangeLog41
-rw-r--r--cesar/ecos/packages/devs/eth/sparc/leon2/current/cdl/leon2_eth_drivers.cdl140
-rw-r--r--cesar/ecos/packages/devs/eth/sparc/leon2/current/include/devs_eth_leon2.inl123
-rw-r--r--cesar/ecos/packages/devs/eth/sparc/leon2/current/src/if_leon2.c73
-rw-r--r--cesar/ecos/packages/devs/eth/sparc/leon3/current/ChangeLog41
-rw-r--r--cesar/ecos/packages/devs/eth/sparc/leon3/current/cdl/leon3_eth_drivers.cdl140
-rw-r--r--cesar/ecos/packages/devs/eth/sparc/leon3/current/include/devs_eth_leon3.inl142
-rw-r--r--cesar/ecos/packages/devs/eth/sparc/leon3/current/src/if_leon3.c94
-rw-r--r--cesar/ecos/packages/devs/eth/sparc/opencores/leon3/current/cdl/leon3_opencores_ethmac_drivers.cdl127
-rw-r--r--cesar/ecos/packages/devs/eth/sparc/opencores/leon3/current/include/devs_eth_sparc_opencores_leon3.inl93
-rw-r--r--cesar/ecos/packages/devs/eth/sparc/opencores/leon3/current/src/if_opencores.c116
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/ChangeLog120
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/cdl/syntheth.cdl147
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/devs-eth-synth-ecosynth.html928
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/makefile34
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/overview.fig54
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/overview.pngbin0 -> 905 bytes
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/syntheth.sgml553
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/Makefile.am97
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/Makefile.in454
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/acinclude.m445
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/aclocal.m4213
-rwxr-xr-xcesar/ecos/packages/devs/eth/synth/ecosynth/current/host/configure1994
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/configure.in96
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/ethernet.tcl1226
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/ethernet.tdf117
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/fromnet.xbm4
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/netrecord.xbm6
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/rawether.c795
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/tonet.xbm4
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/src/protocol.h72
-rw-r--r--cesar/ecos/packages/devs/eth/synth/ecosynth/current/src/syntheth.c461
-rw-r--r--cesar/ecos/packages/devs/flash/sst/39vf400/current/ChangeLog39
-rwxr-xr-xcesar/ecos/packages/devs/flash/sst/39vf400/current/cdl/flash_sst_39vf400.cdl64
-rwxr-xr-xcesar/ecos/packages/devs/flash/sst/39vf400/current/include/flash_sst_39vf400.inl390
-rw-r--r--cesar/ecos/packages/devs/flash/synth/current/ChangeLog83
-rw-r--r--cesar/ecos/packages/devs/flash/synth/current/cdl/flash_synth.cdl130
-rw-r--r--cesar/ecos/packages/devs/flash/synth/current/src/flash_erase_block.c90
-rw-r--r--cesar/ecos/packages/devs/flash/synth/current/src/flash_program_buf.c71
-rw-r--r--cesar/ecos/packages/devs/flash/synth/current/src/flash_query.c62
-rw-r--r--cesar/ecos/packages/devs/flash/synth/current/src/synth.c158
-rw-r--r--cesar/ecos/packages/devs/flash/synth/current/src/synth.h64
-rw-r--r--cesar/ecos/packages/devs/flash/synth/current/tests/flash1.c188
-rw-r--r--cesar/ecos/packages/devs/serial/generic/16x5x/current/ChangeLog306
-rw-r--r--cesar/ecos/packages/devs/serial/generic/16x5x/current/cdl/ser_generic_16x5x.cdl133
-rw-r--r--cesar/ecos/packages/devs/serial/generic/16x5x/current/src/ser_16x5x.c636
-rw-r--r--cesar/ecos/packages/devs/usb/nec_upd985xx/current/ChangeLog136
-rw-r--r--cesar/ecos/packages/devs/usb/nec_upd985xx/current/cdl/usbs_upd985xx.cdl293
-rw-r--r--cesar/ecos/packages/devs/usb/nec_upd985xx/current/doc/devs-usb-nec-upd985xx.html372
-rw-r--r--cesar/ecos/packages/devs/usb/nec_upd985xx/current/doc/makefile55
-rw-r--r--cesar/ecos/packages/devs/usb/nec_upd985xx/current/doc/usbs_upd985xx.sgml259
-rw-r--r--cesar/ecos/packages/devs/usb/nec_upd985xx/current/include/usbs_upd985xx.h79
-rw-r--r--cesar/ecos/packages/devs/usb/nec_upd985xx/current/src/usbs_upd985xx.c2689
-rw-r--r--cesar/ecos/packages/devs/usb/nec_upd985xx/current/src/usbs_upd985xx_data.cxx190
-rw-r--r--cesar/ecos/packages/devs/usb/sa11x0/current/ChangeLog196
-rw-r--r--cesar/ecos/packages/devs/usb/sa11x0/current/cdl/usbs_sa11x0.cdl203
-rw-r--r--cesar/ecos/packages/devs/usb/sa11x0/current/doc/devs-usb-sa11x0.html341
-rw-r--r--cesar/ecos/packages/devs/usb/sa11x0/current/doc/makefile55
-rw-r--r--cesar/ecos/packages/devs/usb/sa11x0/current/doc/usbs_sa11x0.sgml236
-rw-r--r--cesar/ecos/packages/devs/usb/sa11x0/current/include/usbs_sa11x0.h74
-rw-r--r--cesar/ecos/packages/devs/usb/sa11x0/current/src/usbs_sa11x0.c2551
-rw-r--r--cesar/ecos/packages/devs/usb/sa11x0/current/src/usbs_sa11x0_data.cxx174
-rw-r--r--cesar/ecos/packages/devs/wallclock/synth/current/ChangeLog46
-rw-r--r--cesar/ecos/packages/devs/wallclock/synth/current/cdl/wallclock_synth.cdl113
-rw-r--r--cesar/ecos/packages/devs/wallclock/synth/current/src/wallclock_synth.cxx146
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/ChangeLog69
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/cdl/synth_watchdog.cdl110
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/doc/asleep.pngbin0 -> 11229 bytes
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/doc/awake.pngbin0 -> 11438 bytes
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/doc/devs-watchdog-synth.html526
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/doc/makefile34
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/doc/synth_watchdog.sgml342
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/host/Makefile.am61
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/host/Makefile.in289
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/host/acinclude.m445
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/host/aclocal.m4183
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/host/alarm.gifbin0 -> 5083 bytes
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/host/asleep.gifbin0 -> 283 bytes
-rwxr-xr-xcesar/ecos/packages/devs/watchdog/synth/current/host/configure1171
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/host/configure.in73
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/host/doghouse.gifbin0 -> 14853 bytes
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/host/doghouse.pov161
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/host/eye.gifbin0 -> 93 bytes
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/host/sound1.aubin0 -> 4464 bytes
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/host/sound2.aubin0 -> 11691 bytes
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/host/watchdog.tcl425
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/host/watchdog.tdf63
-rw-r--r--cesar/ecos/packages/devs/watchdog/synth/current/src/synth_watchdog.cxx159
-rw-r--r--cesar/ecos/packages/ecos.db674
-rw-r--r--cesar/ecos/packages/ecosadmin.tcl1369
-rw-r--r--cesar/ecos/packages/error/current/ChangeLog111
-rw-r--r--cesar/ecos/packages/error/current/cdl/error.cdl157
-rw-r--r--cesar/ecos/packages/error/current/include/codes.h186
-rw-r--r--cesar/ecos/packages/error/current/include/errno.h98
-rw-r--r--cesar/ecos/packages/error/current/include/strerror.h91
-rw-r--r--cesar/ecos/packages/error/current/src/errno.cxx121
-rw-r--r--cesar/ecos/packages/error/current/src/strerror.cxx441
-rw-r--r--cesar/ecos/packages/fs/ram/current/ChangeLog118
-rw-r--r--cesar/ecos/packages/fs/ram/current/cdl/ramfs.cdl193
-rw-r--r--cesar/ecos/packages/fs/ram/current/src/ramfs.c2396
-rw-r--r--cesar/ecos/packages/fs/ram/current/tests/ramfs1.c654
-rw-r--r--cesar/ecos/packages/fs/ram/current/tests/ramfs2.c174
-rw-r--r--cesar/ecos/packages/fs/rom/current/ChangeLog165
-rw-r--r--cesar/ecos/packages/fs/rom/current/cdl/romfs.cdl133
-rw-r--r--cesar/ecos/packages/fs/rom/current/doc/mk_romfs.txt94
-rw-r--r--cesar/ecos/packages/fs/rom/current/doc/romfs.txt12
-rw-r--r--cesar/ecos/packages/fs/rom/current/src/romfs.c1100
-rw-r--r--cesar/ecos/packages/fs/rom/current/support/Makefile39
-rwxr-xr-xcesar/ecos/packages/fs/rom/current/support/file2c.tcl124
-rw-r--r--cesar/ecos/packages/fs/rom/current/support/mk_romfs.c734
-rw-r--r--cesar/ecos/packages/fs/rom/current/tests/romfs1.c388
-rw-r--r--cesar/ecos/packages/fs/rom/current/tests/testromfs/etc/hosts0
-rw-r--r--cesar/ecos/packages/fs/rom/current/tests/testromfs/etc/inetd0
-rw-r--r--cesar/ecos/packages/fs/rom/current/tests/testromfs/etc/passwd32
-rw-r--r--cesar/ecos/packages/fs/rom/current/tests/testromfs/mnt/thing1
-rw-r--r--cesar/ecos/packages/fs/rom/current/tests/testromfs/var/foobar1
-rw-r--r--cesar/ecos/packages/hal/common/current/ChangeLog2314
-rw-r--r--cesar/ecos/packages/hal/common/current/cdl/common.cdl152
-rw-r--r--cesar/ecos/packages/hal/common/current/cdl/debugging.cdl169
-rw-r--r--cesar/ecos/packages/hal/common/current/cdl/hal.cdl473
-rw-r--r--cesar/ecos/packages/hal/common/current/cdl/interrupts.cdl143
-rw-r--r--cesar/ecos/packages/hal/common/current/doc/hal.sgml3161
-rw-r--r--cesar/ecos/packages/hal/common/current/doc/porting.sgml4383
-rw-r--r--cesar/ecos/packages/hal/common/current/include/dbg-thread-syscall.h111
-rw-r--r--cesar/ecos/packages/hal/common/current/include/dbg-threads-api.h161
-rw-r--r--cesar/ecos/packages/hal/common/current/include/drv_api.h251
-rw-r--r--cesar/ecos/packages/hal/common/current/include/generic-stub.h366
-rw-r--r--cesar/ecos/packages/hal/common/current/include/hal_arbiter.h140
-rw-r--r--cesar/ecos/packages/hal/common/current/include/hal_endian.h110
-rw-r--r--cesar/ecos/packages/hal/common/current/include/hal_if.h739
-rw-r--r--cesar/ecos/packages/hal/common/current/include/hal_misc.h123
-rw-r--r--cesar/ecos/packages/hal/common/current/include/hal_spd.h78
-rw-r--r--cesar/ecos/packages/hal/common/current/include/hal_stub.h390
-rw-r--r--cesar/ecos/packages/hal/common/current/include/hal_tables.h117
-rw-r--r--cesar/ecos/packages/hal/common/current/src/board.h70
-rw-r--r--cesar/ecos/packages/hal/common/current/src/bplist-dynamic.c450
-rw-r--r--cesar/ecos/packages/hal/common/current/src/dbg-threads-syscall.c217
-rw-r--r--cesar/ecos/packages/hal/common/current/src/drv_api.c944
-rw-r--r--cesar/ecos/packages/hal/common/current/src/dummy.c54
-rw-r--r--cesar/ecos/packages/hal/common/current/src/gdb-fileio.c729
-rw-r--r--cesar/ecos/packages/hal/common/current/src/gdb-fileio.h139
-rw-r--r--cesar/ecos/packages/hal/common/current/src/generic-stub.c2057
-rw-r--r--cesar/ecos/packages/hal/common/current/src/hal_if.c1062
-rw-r--r--cesar/ecos/packages/hal/common/current/src/hal_misc.c201
-rw-r--r--cesar/ecos/packages/hal/common/current/src/hal_stub.c1046
-rw-r--r--cesar/ecos/packages/hal/common/current/src/stubrom/stubrom.c61
-rw-r--r--cesar/ecos/packages/hal/common/current/src/thread-packets.c1414
-rw-r--r--cesar/ecos/packages/hal/common/current/src/thread-pkts.h106
-rw-r--r--cesar/ecos/packages/hal/common/current/tests/basic.c110
-rw-r--r--cesar/ecos/packages/hal/common/current/tests/cache.c241
-rw-r--r--cesar/ecos/packages/hal/common/current/tests/context.c121
-rw-r--r--cesar/ecos/packages/hal/common/current/tests/cpp1.c109
-rw-r--r--cesar/ecos/packages/hal/common/current/tests/intr.c157
-rw-r--r--cesar/ecos/packages/hal/common/current/tests/vaargs.c157
-rw-r--r--cesar/ecos/packages/hal/maximus/arch/current/cdl/hal_maximus.cdl138
-rw-r--r--cesar/ecos/packages/hal/maximus/arch/current/include/hal_arch.h56
-rw-r--r--cesar/ecos/packages/hal/maximus/arch/current/include/hal_cache.h55
-rw-r--r--cesar/ecos/packages/hal/maximus/arch/current/include/hal_diag.h45
-rw-r--r--cesar/ecos/packages/hal/maximus/arch/current/include/hal_host_intr.h10
-rw-r--r--cesar/ecos/packages/hal/maximus/arch/current/include/hal_intr.h249
-rw-r--r--cesar/ecos/packages/hal/maximus/arch/current/include/hal_io.h170
-rw-r--r--cesar/ecos/packages/hal/maximus/arch/current/include/hal_syscall.h410
-rw-r--r--cesar/ecos/packages/hal/maximus/arch/current/src/maximus.ld186
-rw-r--r--cesar/ecos/packages/hal/maximus/arch/current/src/maximus_diag.c107
-rw-r--r--cesar/ecos/packages/hal/maximus/arch/current/src/maximus_entry.c197
-rw-r--r--cesar/ecos/packages/hal/maximus/arch/current/src/maximus_intr.c465
-rw-r--r--cesar/ecos/packages/hal/maximus/arch/current/src/maximus_syscalls.c80
-rw-r--r--cesar/ecos/packages/hal/maximus/i386linux/current/cdl/hal_maximus_i386.cdl133
-rw-r--r--cesar/ecos/packages/hal/maximus/i386linux/current/include/arch.inc44
-rw-r--r--cesar/ecos/packages/hal/maximus/i386linux/current/include/basetype.h49
-rw-r--r--cesar/ecos/packages/hal/maximus/i386linux/current/include/pkgconf/mlt_maximus_i386_rom.h20
-rw-r--r--cesar/ecos/packages/hal/maximus/i386linux/current/include/pkgconf/mlt_maximus_i386_rom.ldi31
-rw-r--r--cesar/ecos/packages/hal/maximus/i386linux/current/include/var_arch.h179
-rw-r--r--cesar/ecos/packages/hal/maximus/i386linux/current/src/context.S191
-rw-r--r--cesar/ecos/packages/hal/maximus/i386linux/current/src/syscall-i386-linux-1.0.S437
-rw-r--r--cesar/ecos/packages/hal/maximus/i386linux/current/src/vectors.S69
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/ChangeLog74
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/cdl/hal_sparc.cdl180
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/include/arch.inc85
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/include/basetype.h74
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/include/hal_arch.h392
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/include/hal_intr.h399
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/include/hal_io.h183
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/include/hal_smp.h77
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/include/vectors.h153
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/src/callcons.S99
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/src/context.S479
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/src/hal_boot.c166
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/src/hal_intr.c209
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/src/icontext.c524
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/src/sparc.ld152
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/src/vec_ivsr.S611
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/src/vec_xvsr.S396
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/src/vectors.S964
-rw-r--r--cesar/ecos/packages/hal/sparc/arch/current/tests/sparc_ex.c437
-rw-r--r--cesar/ecos/packages/hal/sparc/leon/current/ChangeLog62
-rw-r--r--cesar/ecos/packages/hal/sparc/leon/current/cdl/hal_sparc_leon.cdl228
-rw-r--r--cesar/ecos/packages/hal/sparc/leon/current/include/hal_cache.h182
-rw-r--r--cesar/ecos/packages/hal/sparc/leon/current/include/hal_clock.h128
-rw-r--r--cesar/ecos/packages/hal/sparc/leon/current/include/hal_diag.h132
-rw-r--r--cesar/ecos/packages/hal/sparc/leon/current/include/hal_xpic.h122
-rw-r--r--cesar/ecos/packages/hal/sparc/leon/current/include/halboot.si151
-rw-r--r--cesar/ecos/packages/hal/sparc/leon/current/include/pkgconf/mlt_sparc_leon_ram.h19
-rw-r--r--cesar/ecos/packages/hal/sparc/leon/current/include/pkgconf/mlt_sparc_leon_ram.ldi26
-rw-r--r--cesar/ecos/packages/hal/sparc/leon/current/include/pkgconf/mlt_sparc_leon_ram.mlt12
-rw-r--r--cesar/ecos/packages/hal/sparc/leon/current/src/hal_priv.c114
-rw-r--r--cesar/ecos/packages/hal/sparc/leon/current/support/README32
-rw-r--r--cesar/ecos/packages/hal/sparc/leon/current/support/do-gdb-sim3
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/ChangeLog54
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/cdl/hal_sparc_leon3.cdl242
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/include/hal_amba.h235
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/include/hal_cache.h214
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/include/hal_clock.h86
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/include/hal_diag.h93
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/include/hal_leon3.h229
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/include/hal_leon3_smp.h240
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/include/hal_xpic.h101
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/include/halboot.si75
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/include/leon3_arch.inc70
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/include/pkgconf/mlt_sparc_leon3_ram.h21
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/include/pkgconf/mlt_sparc_leon3_ram.h.bck19
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/include/pkgconf/mlt_sparc_leon3_ram.ldi26
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/include/pkgconf/mlt_sparc_leon3_ram.mlt12
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/src/boot.S430
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/src/boot_smp.S68
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/src/hal_amba.c233
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/src/hal_amba_driver.c124
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/src/hal_clock.c96
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/src/hal_diag.c90
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/src/hal_help.cxx94
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/src/hal_irq.c234
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/src/hal_priv.c117
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/src/leon3_smp.c447
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/support/README32
-rw-r--r--cesar/ecos/packages/hal/sparc/leon3/current/support/do-gdb-sim3
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/ChangeLog550
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/cdl/hal_synth.cdl139
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/filters.pngbin0 -> 13312 bytes
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/hal-synth-arch.html177
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/layout.fig57
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/layout.pngbin0 -> 1439 bytes
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/makefile55
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/menu_edit.pngbin0 -> 5685 bytes
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/menu_file.pngbin0 -> 1959 bytes
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/menu_help.pngbin0 -> 2311 bytes
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/menu_view.pngbin0 -> 1223 bytes
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/preferences.pngbin0 -> 7935 bytes
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/screen_main.pngbin0 -> 17090 bytes
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/synth-console.html373
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/synth-gui.html738
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/synth-install.html404
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/synth-io-overview.fig57
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/synth-io-overview.pngbin0 -> 1187 bytes
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/synth-new-host.html1734
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/synth-new-target.html823
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/synth-porting.html379
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/synth-running.html964
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/synth-syscalls.html333
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/synth.html372
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/doc/synth.sgml2747
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/Makefile.am92
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/Makefile.in450
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/acinclude.m446
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/aclocal.m4184
-rwxr-xr-xcesar/ecos/packages/hal/synth/arch/current/host/configure2079
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/configure.in96
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/console.tcl198
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/copy.xbm6
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/cut.xbm6
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/default.tdf43
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/ecosicon.xbm10
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/ecosiconmask.xbm10
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/ecosynth.c366
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/ecosynth.tcl3292
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/help.xbm6
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/paste.xbm6
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/running1.ppmbin0 -> 1981 bytes
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/running2.ppmbin0 -> 1981 bytes
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/running3.ppmbin0 -> 1981 bytes
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/save.xbm6
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/saveall.xbm6
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/tick_no.xbm5
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/tick_yes.xbm5
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/user_initrc.tcl9
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/host/user_mainrc.tcl10
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/include/hal_arch.h90
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/include/hal_cache.h88
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/include/hal_diag.h78
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/include/hal_intr.h271
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/include/hal_io.h587
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/src/synth.ld219
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/src/synth_diag.c155
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/src/synth_entry.c235
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/src/synth_intr.c1403
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/src/synth_protocol.h124
-rw-r--r--cesar/ecos/packages/hal/synth/arch/current/src/synth_syscalls.c110
-rw-r--r--cesar/ecos/packages/hal/synth/i386linux/current/ChangeLog426
-rw-r--r--cesar/ecos/packages/hal/synth/i386linux/current/cdl/hal_synth_i386.cdl166
-rw-r--r--cesar/ecos/packages/hal/synth/i386linux/current/include/arch.inc77
-rw-r--r--cesar/ecos/packages/hal/synth/i386linux/current/include/basetype.h82
-rw-r--r--cesar/ecos/packages/hal/synth/i386linux/current/include/pkgconf/mlt_synth_i386_rom.h20
-rw-r--r--cesar/ecos/packages/hal/synth/i386linux/current/include/pkgconf/mlt_synth_i386_rom.ldi31
-rw-r--r--cesar/ecos/packages/hal/synth/i386linux/current/include/var_arch.h212
-rw-r--r--cesar/ecos/packages/hal/synth/i386linux/current/include/var_intr.h76
-rw-r--r--cesar/ecos/packages/hal/synth/i386linux/current/include/var_io.h101
-rw-r--r--cesar/ecos/packages/hal/synth/i386linux/current/src/context.S224
-rw-r--r--cesar/ecos/packages/hal/synth/i386linux/current/src/profile.c182
-rw-r--r--cesar/ecos/packages/hal/synth/i386linux/current/src/syscall-i386-linux-1.0.S469
-rw-r--r--cesar/ecos/packages/hal/synth/i386linux/current/src/vectors.S102
-rw-r--r--cesar/ecos/packages/infra/current/ChangeLog1018
-rw-r--r--cesar/ecos/packages/infra/current/cdl/assert.cdl120
-rw-r--r--cesar/ecos/packages/infra/current/cdl/debug.cdl235
-rw-r--r--cesar/ecos/packages/infra/current/cdl/infra.cdl334
-rw-r--r--cesar/ecos/packages/infra/current/cdl/startup.cdl82
-rw-r--r--cesar/ecos/packages/infra/current/include/clist.hxx365
-rw-r--r--cesar/ecos/packages/infra/current/include/cyg_ass.h619
-rw-r--r--cesar/ecos/packages/infra/current/include/cyg_trac.h1655
-rw-r--r--cesar/ecos/packages/infra/current/include/cyg_type.h480
-rw-r--r--cesar/ecos/packages/infra/current/include/cyg_type.inc87
-rw-r--r--cesar/ecos/packages/infra/current/include/diag.h117
-rw-r--r--cesar/ecos/packages/infra/current/include/testcase.h199
-rw-r--r--cesar/ecos/packages/infra/current/src/abort.cxx66
-rw-r--r--cesar/ecos/packages/infra/current/src/buffer.cxx791
-rw-r--r--cesar/ecos/packages/infra/current/src/delete.cxx79
-rw-r--r--cesar/ecos/packages/infra/current/src/diag.cxx714
-rw-r--r--cesar/ecos/packages/infra/current/src/dummyxxmain.cxx81
-rw-r--r--cesar/ecos/packages/infra/current/src/eprintf.c100
-rw-r--r--cesar/ecos/packages/infra/current/src/fancy.cxx662
-rw-r--r--cesar/ecos/packages/infra/current/src/memcpy.c193
-rw-r--r--cesar/ecos/packages/infra/current/src/memset.c190
-rw-r--r--cesar/ecos/packages/infra/current/src/null.cxx185
-rw-r--r--cesar/ecos/packages/infra/current/src/pkgstart.cxx99
-rw-r--r--cesar/ecos/packages/infra/current/src/prestart.cxx85
-rw-r--r--cesar/ecos/packages/infra/current/src/pure.cxx65
-rw-r--r--cesar/ecos/packages/infra/current/src/simple.cxx563
-rw-r--r--cesar/ecos/packages/infra/current/src/startup.cxx110
-rw-r--r--cesar/ecos/packages/infra/current/src/strlen.cxx104
-rw-r--r--cesar/ecos/packages/infra/current/src/tcdiag.cxx276
-rw-r--r--cesar/ecos/packages/infra/current/src/userstart.cxx86
-rw-r--r--cesar/ecos/packages/infra/current/tests/cxxsupp.cxx191
-rw-r--r--cesar/ecos/packages/infra/current/tests/diag_sprintf1.c257
-rw-r--r--cesar/ecos/packages/infra/current/tests/diag_sprintf2.c160
-rw-r--r--cesar/ecos/packages/infra/current/tests/fc_test.c108
-rw-r--r--cesar/ecos/packages/io/common/current/ChangeLog268
-rw-r--r--cesar/ecos/packages/io/common/current/cdl/io.cdl92
-rw-r--r--cesar/ecos/packages/io/common/current/doc/io.sgml4050
-rw-r--r--cesar/ecos/packages/io/common/current/include/config_keys.h154
-rw-r--r--cesar/ecos/packages/io/common/current/include/devtab.h202
-rw-r--r--cesar/ecos/packages/io/common/current/include/file.h164
-rw-r--r--cesar/ecos/packages/io/common/current/include/io.h116
-rw-r--r--cesar/ecos/packages/io/common/current/include/io_diag.h64
-rw-r--r--cesar/ecos/packages/io/common/current/src/io_file.c106
-rw-r--r--cesar/ecos/packages/io/common/current/src/ioinit.cxx73
-rw-r--r--cesar/ecos/packages/io/common/current/src/iosys.c350
-rw-r--r--cesar/ecos/packages/io/eth/current/ChangeLog672
-rw-r--r--cesar/ecos/packages/io/eth/current/cdl/eth_drivers.cdl251
-rw-r--r--cesar/ecos/packages/io/eth/current/doc/ethdrv.sgml769
-rw-r--r--cesar/ecos/packages/io/eth/current/include/eth_drv.h244
-rw-r--r--cesar/ecos/packages/io/eth/current/include/eth_drv_stats.h122
-rw-r--r--cesar/ecos/packages/io/eth/current/include/netdev.h79
-rw-r--r--cesar/ecos/packages/io/eth/current/src/lwip/README10
-rw-r--r--cesar/ecos/packages/io/eth/current/src/lwip/eth_drv.c332
-rw-r--r--cesar/ecos/packages/io/eth/current/src/net/eth_drv.c1062
-rw-r--r--cesar/ecos/packages/io/eth/current/src/stand_alone/eth_drv.c556
-rw-r--r--cesar/ecos/packages/io/fileio/current/ChangeLog835
-rw-r--r--cesar/ecos/packages/io/fileio/current/cdl/fileio.cdl243
-rw-r--r--cesar/ecos/packages/io/fileio/current/doc/fileio.sgml1196
-rw-r--r--cesar/ecos/packages/io/fileio/current/doc/fileio.txt593
-rw-r--r--cesar/ecos/packages/io/fileio/current/include/dirent.h91
-rw-r--r--cesar/ecos/packages/io/fileio/current/include/fileio.h473
-rw-r--r--cesar/ecos/packages/io/fileio/current/include/inode.h142
-rw-r--r--cesar/ecos/packages/io/fileio/current/include/limits.h67
-rw-r--r--cesar/ecos/packages/io/fileio/current/include/sockio.h144
-rw-r--r--cesar/ecos/packages/io/fileio/current/src/devfs.cxx497
-rw-r--r--cesar/ecos/packages/io/fileio/current/src/dir.cxx228
-rw-r--r--cesar/ecos/packages/io/fileio/current/src/fd.cxx398
-rw-r--r--cesar/ecos/packages/io/fileio/current/src/file.cxx906
-rw-r--r--cesar/ecos/packages/io/fileio/current/src/fio.h232
-rw-r--r--cesar/ecos/packages/io/fileio/current/src/inocache.cxx216
-rw-r--r--cesar/ecos/packages/io/fileio/current/src/io.cxx544
-rw-r--r--cesar/ecos/packages/io/fileio/current/src/misc.cxx495
-rw-r--r--cesar/ecos/packages/io/fileio/current/src/select.cxx402
-rw-r--r--cesar/ecos/packages/io/fileio/current/src/socket.cxx735
-rw-r--r--cesar/ecos/packages/io/fileio/current/tests/fileio1.c464
-rw-r--r--cesar/ecos/packages/io/fileio/current/tests/pselect.c375
-rw-r--r--cesar/ecos/packages/io/fileio/current/tests/select.c638
-rw-r--r--cesar/ecos/packages/io/fileio/current/tests/socket.c368
-rw-r--r--cesar/ecos/packages/io/fileio/current/tests/stdio.c179
-rw-r--r--cesar/ecos/packages/io/fileio/current/tests/testfs.c1251
-rw-r--r--cesar/ecos/packages/io/pci/current/ChangeLog385
-rw-r--r--cesar/ecos/packages/io/pci/current/cdl/io_pci.cdl125
-rw-r--r--cesar/ecos/packages/io/pci/current/doc/pci.sgml637
-rw-r--r--cesar/ecos/packages/io/pci/current/include/pci.h368
-rw-r--r--cesar/ecos/packages/io/pci/current/include/pci_cfg.h1065
-rw-r--r--cesar/ecos/packages/io/pci/current/include/pci_hw.h127
-rw-r--r--cesar/ecos/packages/io/pci/current/src/pci.c1107
-rw-r--r--cesar/ecos/packages/io/pci/current/src/pci_hw.c126
-rw-r--r--cesar/ecos/packages/io/pci/current/tests/pci1.c454
-rw-r--r--cesar/ecos/packages/io/pci/current/tests/pci2.c230
-rw-r--r--cesar/ecos/packages/io/pci/current/tests/pcihdr.h5719
-rw-r--r--cesar/ecos/packages/io/serial/current/ChangeLog1564
-rw-r--r--cesar/ecos/packages/io/serial/current/cdl/io_serial.cdl362
-rw-r--r--cesar/ecos/packages/io/serial/current/cdl/termios.cdl132
-rw-r--r--cesar/ecos/packages/io/serial/current/cdl/tty.cdl130
-rw-r--r--cesar/ecos/packages/io/serial/current/include/serial.h277
-rw-r--r--cesar/ecos/packages/io/serial/current/include/serialio.h212
-rw-r--r--cesar/ecos/packages/io/serial/current/include/ttyio.h89
-rw-r--r--cesar/ecos/packages/io/serial/current/misc/console.c238
-rw-r--r--cesar/ecos/packages/io/serial/current/misc/serial.c257
-rw-r--r--cesar/ecos/packages/io/serial/current/misc/timeout.inl143
-rw-r--r--cesar/ecos/packages/io/serial/current/src/common/haldiag.c138
-rw-r--r--cesar/ecos/packages/io/serial/current/src/common/serial.c1223
-rw-r--r--cesar/ecos/packages/io/serial/current/src/common/termios.c402
-rw-r--r--cesar/ecos/packages/io/serial/current/src/common/termiostty.c904
-rw-r--r--cesar/ecos/packages/io/serial/current/src/common/tty.c337
-rw-r--r--cesar/ecos/packages/io/serial/current/tests/README285
-rw-r--r--cesar/ecos/packages/io/serial/current/tests/flow1.c209
-rw-r--r--cesar/ecos/packages/io/serial/current/tests/flow2.c182
-rw-r--r--cesar/ecos/packages/io/serial/current/tests/ser_test_protocol.inl1075
-rw-r--r--cesar/ecos/packages/io/serial/current/tests/serial1.c155
-rw-r--r--cesar/ecos/packages/io/serial/current/tests/serial2.c127
-rw-r--r--cesar/ecos/packages/io/serial/current/tests/serial3.c166
-rw-r--r--cesar/ecos/packages/io/serial/current/tests/serial4.c143
-rw-r--r--cesar/ecos/packages/io/serial/current/tests/serial5.c148
-rw-r--r--cesar/ecos/packages/io/serial/current/tests/serial_echo.c127
-rw-r--r--cesar/ecos/packages/io/serial/current/tests/timeout.inl143
-rw-r--r--cesar/ecos/packages/io/serial/current/tests/tty1.c163
-rw-r--r--cesar/ecos/packages/io/serial/current/tests/tty2.c128
-rw-r--r--cesar/ecos/packages/io/usb/common/current/ChangeLog47
-rw-r--r--cesar/ecos/packages/io/usb/common/current/cdl/usb.cdl63
-rw-r--r--cesar/ecos/packages/io/usb/common/current/include/usb.h249
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/ChangeLog166
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/cdl/usbs_eth.cdl153
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/doc/io-usb-slave-eth.html168
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/doc/makefile55
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/doc/simple.fig23
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/doc/simple.pngbin0 -> 2028 bytes
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/doc/tcpip.fig33
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/doc/tcpip.pngbin0 -> 2478 bytes
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-control.html309
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-data.html374
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-host.html328
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-init.html326
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-intro.html314
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-netdev.html219
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-protocol.html269
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth.sgml810
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/host/COPYING340
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/host/Makefile95
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/host/ecos_usbeth.c572
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/include/usbs_eth.h410
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/src/usbseth.c321
-rw-r--r--cesar/ecos/packages/io/usb/eth/slave/current/src/usbsethdrv.c617
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/ChangeLog167
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/cdl/usbs.cdl134
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/doc/io-usb-slave.html188
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/doc/makefile55
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/doc/usbs-control.html934
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/doc/usbs-data.html377
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/doc/usbs-devtab.html480
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/doc/usbs-enum.html834
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/doc/usbs-halt.html312
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/doc/usbs-intro.html473
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/doc/usbs-start-rx.html444
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/doc/usbs-start-tx.html436
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/doc/usbs-start.html264
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/doc/usbs-testing.html2267
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/doc/usbs-writing.html937
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/doc/usbs.sgml3540
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/host/Makefile.am115
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/host/Makefile.in499
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/host/acconfig.h51
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/host/acinclude.m454
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/host/aclocal.m4245
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/host/config.h.in11
-rwxr-xr-xcesar/ecos/packages/io/usb/slave/current/host/configure2358
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/host/configure.in121
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/host/list.tcl130
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/host/stamp-h.in0
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/host/usbchmod.c180
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/host/usbhost.c1913
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/host/usbhost.tcl531
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/host/verbose.tcl71
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/include/usbs.h426
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/src/usbs.c713
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/tests/common.c681
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/tests/protocol.h194
-rw-r--r--cesar/ecos/packages/io/usb/slave/current/tests/usbtarget.c1848
-rw-r--r--cesar/ecos/packages/io/wallclock/current/ChangeLog322
-rw-r--r--cesar/ecos/packages/io/wallclock/current/cdl/wallclock.cdl175
-rw-r--r--cesar/ecos/packages/io/wallclock/current/include/wallclock.hxx112
-rw-r--r--cesar/ecos/packages/io/wallclock/current/include/wallclock/wallclock.inl147
-rw-r--r--cesar/ecos/packages/io/wallclock/current/src/emulate.cxx94
-rw-r--r--cesar/ecos/packages/io/wallclock/current/src/wallclock.cxx146
-rw-r--r--cesar/ecos/packages/io/wallclock/current/tests/wallclock.cxx237
-rw-r--r--cesar/ecos/packages/io/wallclock/current/tests/wallclock2.cxx129
-rw-r--r--cesar/ecos/packages/io/watchdog/current/ChangeLog310
-rw-r--r--cesar/ecos/packages/io/watchdog/current/cdl/watchdog.cdl177
-rw-r--r--cesar/ecos/packages/io/watchdog/current/include/watchdog.h59
-rw-r--r--cesar/ecos/packages/io/watchdog/current/include/watchdog.hxx168
-rw-r--r--cesar/ecos/packages/io/watchdog/current/src/emulate.cxx149
-rw-r--r--cesar/ecos/packages/io/watchdog/current/src/watchdog.cxx194
-rw-r--r--cesar/ecos/packages/io/watchdog/current/tests/watchdog.cxx238
-rw-r--r--cesar/ecos/packages/io/watchdog/current/tests/watchdog2.cxx220
-rw-r--r--cesar/ecos/packages/io/watchdog/current/tests/watchdog_reset.cxx184
-rw-r--r--cesar/ecos/packages/isoinfra/current/ChangeLog433
-rw-r--r--cesar/ecos/packages/isoinfra/current/cdl/isoinfra.cdl1246
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/assert.h121
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/ctype.h132
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/dirent.h95
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/dlfcn.h65
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/errno.h76
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/fcntl.h169
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/float.h67
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/limits.h225
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/locale.h148
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/mqueue.h149
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/netdb.h107
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/pthread.h79
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/sched.h125
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/semaphore.h73
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/setjmp.h75
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/signal.h76
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/stdarg.h67
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/stddef.h66
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/stdint.h48
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/stdio.h156
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/stdlib.h508
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/string.h130
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/sys/select.h164
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/sys/stat.h154
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/sys/types.h119
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/sys/utsname.h69
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/termios.h252
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/time.h168
-rw-r--r--cesar/ecos/packages/isoinfra/current/include/unistd.h277
-rw-r--r--cesar/ecos/packages/kernel/current/ChangeLog4606
-rw-r--r--cesar/ecos/packages/kernel/current/cdl/counters.cdl190
-rw-r--r--cesar/ecos/packages/kernel/current/cdl/instrument.cdl312
-rw-r--r--cesar/ecos/packages/kernel/current/cdl/interrupts.cdl129
-rw-r--r--cesar/ecos/packages/kernel/current/cdl/kernel.cdl345
-rw-r--r--cesar/ecos/packages/kernel/current/cdl/scheduler.cdl256
-rw-r--r--cesar/ecos/packages/kernel/current/cdl/synch.cdl213
-rw-r--r--cesar/ecos/packages/kernel/current/cdl/thread.cdl332
-rw-r--r--cesar/ecos/packages/kernel/current/doc/SMP.txt544
-rw-r--r--cesar/ecos/packages/kernel/current/doc/kernel.sgml5456
-rw-r--r--cesar/ecos/packages/kernel/current/host/instr/dump_instr.c106
-rwxr-xr-xcesar/ecos/packages/kernel/current/host/instr/instrument.sh23
-rw-r--r--cesar/ecos/packages/kernel/current/host/instr/readme.txt80
-rw-r--r--cesar/ecos/packages/kernel/current/include/bitmap.hxx201
-rw-r--r--cesar/ecos/packages/kernel/current/include/clock.hxx261
-rw-r--r--cesar/ecos/packages/kernel/current/include/clock.inl125
-rw-r--r--cesar/ecos/packages/kernel/current/include/diag.h66
-rw-r--r--cesar/ecos/packages/kernel/current/include/errors.h83
-rw-r--r--cesar/ecos/packages/kernel/current/include/except.hxx128
-rw-r--r--cesar/ecos/packages/kernel/current/include/flag.hxx166
-rw-r--r--cesar/ecos/packages/kernel/current/include/instrmnt.h465
-rw-r--r--cesar/ecos/packages/kernel/current/include/instrument_desc.h143
-rw-r--r--cesar/ecos/packages/kernel/current/include/intr.hxx371
-rw-r--r--cesar/ecos/packages/kernel/current/include/kapi.h681
-rw-r--r--cesar/ecos/packages/kernel/current/include/kapidata.h554
-rw-r--r--cesar/ecos/packages/kernel/current/include/kernel.hxx86
-rw-r--r--cesar/ecos/packages/kernel/current/include/ktypes.h129
-rw-r--r--cesar/ecos/packages/kernel/current/include/llistt.hxx171
-rw-r--r--cesar/ecos/packages/kernel/current/include/lottery.hxx223
-rw-r--r--cesar/ecos/packages/kernel/current/include/mbox.hxx136
-rw-r--r--cesar/ecos/packages/kernel/current/include/mboxt.hxx138
-rw-r--r--cesar/ecos/packages/kernel/current/include/mboxt.inl634
-rw-r--r--cesar/ecos/packages/kernel/current/include/mboxt2.hxx142
-rw-r--r--cesar/ecos/packages/kernel/current/include/mboxt2.inl683
-rw-r--r--cesar/ecos/packages/kernel/current/include/mlqueue.hxx318
-rw-r--r--cesar/ecos/packages/kernel/current/include/mqueue.hxx163
-rw-r--r--cesar/ecos/packages/kernel/current/include/mqueue.inl543
-rw-r--r--cesar/ecos/packages/kernel/current/include/mutex.hxx217
-rw-r--r--cesar/ecos/packages/kernel/current/include/sched.hxx412
-rw-r--r--cesar/ecos/packages/kernel/current/include/sched.inl168
-rw-r--r--cesar/ecos/packages/kernel/current/include/sema.hxx137
-rw-r--r--cesar/ecos/packages/kernel/current/include/sema2.hxx137
-rw-r--r--cesar/ecos/packages/kernel/current/include/smp.hxx468
-rw-r--r--cesar/ecos/packages/kernel/current/include/test/stackmon.h239
-rw-r--r--cesar/ecos/packages/kernel/current/include/thread.hxx590
-rw-r--r--cesar/ecos/packages/kernel/current/include/thread.inl693
-rw-r--r--cesar/ecos/packages/kernel/current/include/timer.hxx127
-rw-r--r--cesar/ecos/packages/kernel/current/src/common/clock.cxx946
-rw-r--r--cesar/ecos/packages/kernel/current/src/common/except.cxx268
-rw-r--r--cesar/ecos/packages/kernel/current/src/common/kapi.cxx1264
-rw-r--r--cesar/ecos/packages/kernel/current/src/common/thread.cxx1299
-rw-r--r--cesar/ecos/packages/kernel/current/src/common/timer.cxx129
-rw-r--r--cesar/ecos/packages/kernel/current/src/debug/dbg-thread-demux.c181
-rw-r--r--cesar/ecos/packages/kernel/current/src/debug/dbg_gdb.cxx469
-rw-r--r--cesar/ecos/packages/kernel/current/src/instrmnt/meminst.cxx261
-rw-r--r--cesar/ecos/packages/kernel/current/src/intr/intr.cxx784
-rw-r--r--cesar/ecos/packages/kernel/current/src/sched/bitmap.cxx323
-rw-r--r--cesar/ecos/packages/kernel/current/src/sched/lottery.cxx456
-rw-r--r--cesar/ecos/packages/kernel/current/src/sched/mlqueue.cxx885
-rw-r--r--cesar/ecos/packages/kernel/current/src/sched/sched.cxx741
-rw-r--r--cesar/ecos/packages/kernel/current/src/sync/bin_sem.cxx276
-rw-r--r--cesar/ecos/packages/kernel/current/src/sync/cnt_sem.cxx283
-rw-r--r--cesar/ecos/packages/kernel/current/src/sync/cnt_sem2.cxx295
-rw-r--r--cesar/ecos/packages/kernel/current/src/sync/flag.cxx418
-rw-r--r--cesar/ecos/packages/kernel/current/src/sync/mbox.cxx170
-rw-r--r--cesar/ecos/packages/kernel/current/src/sync/mqueue.cxx65
-rw-r--r--cesar/ecos/packages/kernel/current/src/sync/mutex.cxx863
-rw-r--r--cesar/ecos/packages/kernel/current/tests/bin_sem0.cxx89
-rw-r--r--cesar/ecos/packages/kernel/current/tests/bin_sem1.cxx130
-rw-r--r--cesar/ecos/packages/kernel/current/tests/bin_sem2.cxx224
-rw-r--r--cesar/ecos/packages/kernel/current/tests/bin_sem3.cxx138
-rw-r--r--cesar/ecos/packages/kernel/current/tests/clock0.cxx286
-rw-r--r--cesar/ecos/packages/kernel/current/tests/clock1.cxx132
-rw-r--r--cesar/ecos/packages/kernel/current/tests/clockcnv.cxx287
-rw-r--r--cesar/ecos/packages/kernel/current/tests/clocktruth.cxx155
-rw-r--r--cesar/ecos/packages/kernel/current/tests/cnt_sem0.cxx89
-rw-r--r--cesar/ecos/packages/kernel/current/tests/cnt_sem1.cxx135
-rw-r--r--cesar/ecos/packages/kernel/current/tests/dhrystone.c1176
-rw-r--r--cesar/ecos/packages/kernel/current/tests/except1.cxx271
-rw-r--r--cesar/ecos/packages/kernel/current/tests/flag0.cxx88
-rw-r--r--cesar/ecos/packages/kernel/current/tests/flag1.cxx219
-rw-r--r--cesar/ecos/packages/kernel/current/tests/fptest.c364
-rw-r--r--cesar/ecos/packages/kernel/current/tests/intr0.cxx209
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kalarm0.c191
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kcache1.c422
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kcache2.c920
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kclock0.c274
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kclock1.c153
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kexcept1.c288
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kflag0.c99
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kflag1.c244
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kill.cxx199
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kintr0.c230
-rw-r--r--cesar/ecos/packages/kernel/current/tests/klock.c318
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kmbox1.c217
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kmutex0.c98
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kmutex1.c188
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kmutex3.c639
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kmutex4.c526
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kphilo.c236
-rw-r--r--cesar/ecos/packages/kernel/current/tests/ksched1.c103
-rw-r--r--cesar/ecos/packages/kernel/current/tests/ksem0.c100
-rw-r--r--cesar/ecos/packages/kernel/current/tests/ksem1.c169
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kthread0.c120
-rw-r--r--cesar/ecos/packages/kernel/current/tests/kthread1.c136
-rw-r--r--cesar/ecos/packages/kernel/current/tests/mbox1.cxx201
-rw-r--r--cesar/ecos/packages/kernel/current/tests/mqueue1.cxx411
-rw-r--r--cesar/ecos/packages/kernel/current/tests/mutex0.cxx96
-rw-r--r--cesar/ecos/packages/kernel/current/tests/mutex1.cxx162
-rw-r--r--cesar/ecos/packages/kernel/current/tests/mutex2.cxx272
-rw-r--r--cesar/ecos/packages/kernel/current/tests/mutex3.cxx631
-rw-r--r--cesar/ecos/packages/kernel/current/tests/philo.cxx241
-rw-r--r--cesar/ecos/packages/kernel/current/tests/release.cxx129
-rw-r--r--cesar/ecos/packages/kernel/current/tests/sched1.cxx111
-rw-r--r--cesar/ecos/packages/kernel/current/tests/smp.cxx474
-rw-r--r--cesar/ecos/packages/kernel/current/tests/stress_threads.c859
-rw-r--r--cesar/ecos/packages/kernel/current/tests/sync2.cxx201
-rw-r--r--cesar/ecos/packages/kernel/current/tests/sync3.cxx232
-rw-r--r--cesar/ecos/packages/kernel/current/tests/tcdiag.cxx97
-rw-r--r--cesar/ecos/packages/kernel/current/tests/testaux.h62
-rw-r--r--cesar/ecos/packages/kernel/current/tests/testaux.hxx110
-rw-r--r--cesar/ecos/packages/kernel/current/tests/thread0.cxx114
-rw-r--r--cesar/ecos/packages/kernel/current/tests/thread1.cxx172
-rw-r--r--cesar/ecos/packages/kernel/current/tests/thread2.cxx236
-rw-r--r--cesar/ecos/packages/kernel/current/tests/thread_gdb.c413
-rw-r--r--cesar/ecos/packages/kernel/current/tests/timeslice.c282
-rw-r--r--cesar/ecos/packages/kernel/current/tests/tm_basic.cxx1880
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/README.SPLASH2349
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/README.fft62
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/README.lu55
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/README.radix44
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/SPLASH2.POSTING124
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/c.m4.ecos290
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/fft.C1057
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/fft.c1460
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/fft_arg.c18
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/getopt.c654
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/getopt.h129
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/lu.C788
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/lu.c1118
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/lu_arg.c12
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/makefile13
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/radix.C909
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/radix.c1346
-rw-r--r--cesar/ecos/packages/kernel/current/tests_smp/radix_arg.c12
-rw-r--r--cesar/ecos/packages/language/c/libc/common/current/ChangeLog46
-rw-r--r--cesar/ecos/packages/language/c/libc/common/current/ChangeLog.libc2736
-rw-r--r--cesar/ecos/packages/language/c/libc/common/current/cdl/libc.cdl63
-rw-r--r--cesar/ecos/packages/language/c/libc/common/current/doc/libc.sgml561
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/ChangeLog114
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/ChangeLog.libc2736
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/cdl/i18n.cdl241
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/include/ctype.inl189
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/include/mb.h67
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/include/newlibctype.h125
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/src/ctype.cxx70
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/src/internal.h95
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/src/locale.cxx444
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/src/mblen.cxx210
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/src/mbstowcs.cxx210
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/src/mbtowc.cxx225
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/src/mbtowc_c.cxx120
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/src/mbtowc_jp.cxx331
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/src/newlibctype.cxx229
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/src/wcstombs.cxx210
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/src/wctomb.cxx213
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/src/wctomb_jp.cxx233
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/tests/ctype.c220
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/tests/i18nmb.c673
-rw-r--r--cesar/ecos/packages/language/c/libc/i18n/current/tests/setlocale.c127
-rw-r--r--cesar/ecos/packages/language/c/libc/setjmp/current/ChangeLog55
-rw-r--r--cesar/ecos/packages/language/c/libc/setjmp/current/ChangeLog.libc2736
-rw-r--r--cesar/ecos/packages/language/c/libc/setjmp/current/cdl/setjmp.cdl115
-rw-r--r--cesar/ecos/packages/language/c/libc/setjmp/current/include/setjmp.h92
-rw-r--r--cesar/ecos/packages/language/c/libc/setjmp/current/src/longjmp.cxx102
-rw-r--r--cesar/ecos/packages/language/c/libc/setjmp/current/tests/setjmp.c232
-rw-r--r--cesar/ecos/packages/language/c/libc/signals/current/ChangeLog106
-rw-r--r--cesar/ecos/packages/language/c/libc/signals/current/ChangeLog.libc2736
-rw-r--r--cesar/ecos/packages/language/c/libc/signals/current/cdl/signals.cdl280
-rw-r--r--cesar/ecos/packages/language/c/libc/signals/current/include/signal.h152
-rw-r--r--cesar/ecos/packages/language/c/libc/signals/current/include/signal.inl270
-rw-r--r--cesar/ecos/packages/language/c/libc/signals/current/src/raise.cxx78
-rw-r--r--cesar/ecos/packages/language/c/libc/signals/current/src/siginit.cxx434
-rw-r--r--cesar/ecos/packages/language/c/libc/signals/current/src/signal.cxx71
-rw-r--r--cesar/ecos/packages/language/c/libc/signals/current/tests/signal1.c210
-rw-r--r--cesar/ecos/packages/language/c/libc/signals/current/tests/signal2.c299
-rw-r--r--cesar/ecos/packages/language/c/libc/startup/current/ChangeLog110
-rw-r--r--cesar/ecos/packages/language/c/libc/startup/current/ChangeLog.libc2736
-rw-r--r--cesar/ecos/packages/language/c/libc/startup/current/cdl/startup.cdl362
-rw-r--r--cesar/ecos/packages/language/c/libc/startup/current/src/_exit.cxx111
-rw-r--r--cesar/ecos/packages/language/c/libc/startup/current/src/abort.cxx98
-rw-r--r--cesar/ecos/packages/language/c/libc/startup/current/src/atexit.cxx137
-rw-r--r--cesar/ecos/packages/language/c/libc/startup/current/src/cstartup.cxx145
-rw-r--r--cesar/ecos/packages/language/c/libc/startup/current/src/environ.cxx71
-rw-r--r--cesar/ecos/packages/language/c/libc/startup/current/src/exit.cxx107
-rw-r--r--cesar/ecos/packages/language/c/libc/startup/current/src/invokemain.cxx131
-rw-r--r--cesar/ecos/packages/language/c/libc/startup/current/src/main.cxx112
-rw-r--r--cesar/ecos/packages/language/c/libc/startup/current/src/mainthread.cxx135
-rw-r--r--cesar/ecos/packages/language/c/libc/startup/current/tests/atexit.c138
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/ChangeLog516
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/ChangeLog.libc2736
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/cdl/stdio.cdl449
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/include/io.hxx90
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/include/io.inl258
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/include/stdio.h335
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/include/stdio.inl159
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/include/stdiofiles.hxx117
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/include/stdiofiles.inl126
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/include/stdiosupp.hxx83
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/include/stream.hxx322
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/include/stream.inl487
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/include/streambuf.hxx164
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/include/streambuf.inl186
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/fclose.cxx131
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/feof.cxx92
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/fflush.cxx151
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/fileops.cxx251
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/fopen.cxx270
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/freopen.cxx79
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/fseek.cxx167
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/setvbuf.cxx129
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/snprintf.cxx81
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/sprintf.cxx82
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/sscanf.cxx81
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/stderr.cxx110
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdin.cxx110
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdiofiles.cxx82
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdioinlines.cxx164
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdiosupp.cxx83
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdout.cxx110
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/stream.cxx711
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/streambuf.cxx141
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/ungetc.cxx94
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/vsnprintf.cxx154
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/common/vsscanf.cxx155
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/input/fgetc.cxx131
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/input/fgets.cxx126
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/input/fread.cxx125
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/input/fscanf.cxx82
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/input/gets.cxx124
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/input/scanf.cxx82
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/input/vfscanf.cxx1059
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/output/fnprintf.cxx81
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/output/fprintf.cxx82
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/output/fputc.cxx116
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/output/fputs.cxx90
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/output/fwrite.cxx103
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/output/printf.cxx82
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/src/output/vfnprintf.cxx966
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/tests/fileio.c207
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/tests/sprintf1.c593
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/tests/sprintf2.c196
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/tests/sscanf.c316
-rw-r--r--cesar/ecos/packages/language/c/libc/stdio/current/tests/stdiooutput.c208
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/ChangeLog99
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/ChangeLog.libc2736
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/cdl/stdlib.cdl297
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/include/abs.inl114
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/include/atox.inl193
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/include/div.inl218
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/src/abs.cxx64
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/src/atox.cxx64
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/src/bsearch.cxx132
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/src/div.cxx65
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/src/getenv.cxx136
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/src/qsort.cxx284
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/src/rand.cxx252
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/src/strtod.cxx263
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/src/strtol.cxx203
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/src/strtoll.cxx199
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/src/strtoul.cxx179
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/src/strtoull.cxx175
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/src/system.cxx69
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/tests/abs.c102
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/tests/atoi.c111
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/tests/atol.c108
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/tests/bsearch.c131
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/tests/div.c118
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/tests/getenv.c143
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/tests/labs.c98
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/tests/ldiv.c129
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/tests/qsort.c105
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/tests/rand1.c100
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/tests/rand2.c107
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/tests/rand3.c147
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/tests/rand4.c120
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/tests/srand.c130
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/tests/strtol.c183
-rw-r--r--cesar/ecos/packages/language/c/libc/stdlib/current/tests/strtoul.c179
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/ChangeLog88
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/ChangeLog.libc2736
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/cdl/string.cdl216
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/include/bsdstring.h109
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/include/string.h171
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/include/string.inl72
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/include/stringsupp.hxx218
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/bsdstring.cxx235
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/memchr.cxx181
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/memcmp.cxx188
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/memmove.cxx114
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strcat.cxx129
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strchr.cxx148
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strcmp.cxx157
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strcoll.cxx96
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strcpy.cxx133
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strcspn.cxx107
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strdup.cxx96
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strlen.cxx134
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strncat.cxx138
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strncmp.cxx176
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strncpy.cxx149
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strpbrk.cxx113
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strrchr.cxx105
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strspn.cxx107
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strstr.cxx123
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strsuppt.cxx70
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strtok.cxx242
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/src/strxfrm.cxx112
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/memchr.c112
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/memcmp1.c142
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/memcmp2.c130
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/memcpy1.c150
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/memcpy2.c138
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/memmove1.c171
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/memmove2.c137
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/memset.c118
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strcat1.c140
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strcat2.c128
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strchr.c109
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strcmp1.c130
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strcmp2.c117
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strcoll1.c132
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strcoll2.c115
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strcpy1.c119
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strcpy2.c123
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strcspn.c141
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strlen.c85
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strncat1.c169
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strncat2.c141
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strncpy1.c162
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strncpy2.c133
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strpbrk.c121
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strrchr.c116
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strspn.c128
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strstr.c124
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strtok.c164
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strxfrm1.c151
-rw-r--r--cesar/ecos/packages/language/c/libc/string/current/tests/strxfrm2.c138
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/ChangeLog193
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/ChangeLog.libc2736
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/cdl/time.cdl342
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/include/time.h321
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/include/time.inl820
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/include/timeutil.h111
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/src/asctime.cxx77
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/src/asctime_r.cxx71
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/src/clock.cxx135
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/src/ctime.cxx67
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/src/ctime_r.cxx67
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/src/difftime.cxx67
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/src/gmtime.cxx75
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/src/gmtime_r.cxx67
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/src/localtime.cxx71
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/src/localtime_r.cxx68
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/src/mktime.cxx67
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/src/settime.cxx97
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/src/strftime.cxx334
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/src/strptime.cxx436
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/src/time.cxx105
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/src/timeutil.cxx295
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/tests/asctime.c205
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/tests/clock.c249
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/tests/ctime.c141
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/tests/gmtime.c205
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/tests/localtime.c175
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/tests/mktime.c177
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/tests/strftime.c195
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/tests/strptime.c118
-rw-r--r--cesar/ecos/packages/language/c/libc/time/current/tests/time.c123
-rw-r--r--cesar/ecos/packages/language/c/libm/current/ChangeLog834
-rw-r--r--cesar/ecos/packages/language/c/libm/current/cdl/compat.cdl142
-rw-r--r--cesar/ecos/packages/language/c/libm/current/cdl/libm.cdl259
-rw-r--r--cesar/ecos/packages/language/c/libm/current/include/math.h416
-rw-r--r--cesar/ecos/packages/language/c/libm/current/include/sys/ieeefp.h235
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_acos.c100
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_acosh.c100
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_asin.c102
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_atan2.c101
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_atanh.c103
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_cosh.c99
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_exp.c106
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_fmod.c100
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_gamma.c108
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_gamma_r.c103
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_hypot.c100
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_j0.c121
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_j1.c122
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_jn.c144
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_lgamma.c108
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_lgamma_r.c103
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_log.c100
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_log10.c103
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_pow.c123
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_remainder.c99
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_scalb.c115
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_sinh.c99
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_sqrt.c99
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_acos.c162
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_acosh.c122
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_asin.c173
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_atan2.c180
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_atanh.c125
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_cosh.c146
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_exp.c218
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_fmod.c197
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_gamma.c94
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_gamma_r.c93
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_hypot.c176
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_j0.c440
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_j1.c435
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_jn.c328
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_lgamma.c94
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_lgamma_r.c357
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_log.c204
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_log10.c148
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_pow.c371
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_rem_pio2.c224
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_remainder.c134
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_scalb.c107
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_sinh.c139
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_sqrt.c507
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/internal/k_cos.c149
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/internal/k_rem_pio2.c365
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/internal/k_sin.c131
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/internal/k_tan.c182
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_asinh.c118
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_atan.c179
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_cbrt.c140
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_ceil.c135
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_copysign.c92
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_cos.c139
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_erf.c362
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_expm1.c331
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_fabs.c90
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_finite.c92
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_floor.c136
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_frexp.c113
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_ilogb.c107
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_isnan.c95
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_ldexp.c100
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_log1p.c227
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_logb.c99
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_modf.c137
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_nextafter.c139
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_rint.c141
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_scalbn.c121
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_significand.c91
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_sin.c139
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_tan.c133
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_tanh.c139
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/mathincl/fdlibm.h297
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/misc/compatmode.cxx215
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/misc/infconst.c84
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/misc/matherr.c88
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/misc/signgam.cxx147
-rw-r--r--cesar/ecos/packages/language/c/libm/current/src/misc/standard.c832
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/acos.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/acos.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/asin.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/asin.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/atan.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/atan.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/atan2.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/atan2.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/ceil.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/ceil.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/cos.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/cos.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/cosh.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/cosh.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/exp.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/exp.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/fabs.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/fabs.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/floor.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/floor.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/fmod.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/fmod.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/frexp.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/frexp.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/ldexp.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/ldexp.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/log.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/log.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/log10.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/log10.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/modf.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/modf.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/pow.c115
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/pow.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/sin.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/sin.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/sinh.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/sinh.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/sqrt.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/sqrt.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/tan.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/tan.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/tanh.c116
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/tanh.h1080
-rw-r--r--cesar/ecos/packages/language/c/libm/current/tests/vectors/vector_support.h500
-rw-r--r--cesar/ecos/packages/pkgconf/fixhtml.tcl146
-rw-r--r--cesar/ecos/packages/pkgconf/rules.doc167
-rw-r--r--cesar/ecos/packages/pkgconf/rules.mak210
-rw-r--r--cesar/ecos/packages/pkgconf/ssa4.dsl110
-rw-r--r--cesar/ecos/packages/pkgconf/ssletter.dsl110
-rw-r--r--cesar/ecos/packages/pkgconf/stylesheet.dsl104
-rw-r--r--cesar/ecos/packages/redboot/current/ChangeLog3668
-rw-r--r--cesar/ecos/packages/redboot/current/cdl/redboot.cdl1182
-rw-r--r--cesar/ecos/packages/redboot/current/doc/makefile53
-rw-r--r--cesar/ecos/packages/redboot/current/doc/redboot.sgml736
-rw-r--r--cesar/ecos/packages/redboot/current/doc/redboot_cmds.sgml3290
-rw-r--r--cesar/ecos/packages/redboot/current/doc/redboot_epilogue.sgml3
-rw-r--r--cesar/ecos/packages/redboot/current/doc/redboot_installing.sgml6834
-rw-r--r--cesar/ecos/packages/redboot/current/doc/redboot_main.sgml119
-rw-r--r--cesar/ecos/packages/redboot/current/doc/redboot_rebuilding.sgml374
-rw-r--r--cesar/ecos/packages/redboot/current/include/elf.h704
-rw-r--r--cesar/ecos/packages/redboot/current/include/fis.h79
-rw-r--r--cesar/ecos/packages/redboot/current/include/flash_config.h110
-rw-r--r--cesar/ecos/packages/redboot/current/include/fs/disk.h173
-rw-r--r--cesar/ecos/packages/redboot/current/include/fs/e2fs.h199
-rw-r--r--cesar/ecos/packages/redboot/current/include/fs/fileio.h61
-rw-r--r--cesar/ecos/packages/redboot/current/include/fs/ide.h104
-rw-r--r--cesar/ecos/packages/redboot/current/include/net/bootp.h318
-rw-r--r--cesar/ecos/packages/redboot/current/include/net/http.h72
-rw-r--r--cesar/ecos/packages/redboot/current/include/net/net.h644
-rw-r--r--cesar/ecos/packages/redboot/current/include/net/tftp.h146
-rw-r--r--cesar/ecos/packages/redboot/current/include/net/tftp_support.h100
-rw-r--r--cesar/ecos/packages/redboot/current/include/redboot.h508
-rw-r--r--cesar/ecos/packages/redboot/current/include/sib.h143
-rw-r--r--cesar/ecos/packages/redboot/current/src/alias.c174
-rw-r--r--cesar/ecos/packages/redboot/current/src/caches.c101
-rw-r--r--cesar/ecos/packages/redboot/current/src/cksum.c96
-rw-r--r--cesar/ecos/packages/redboot/current/src/decompress.c315
-rw-r--r--cesar/ecos/packages/redboot/current/src/dump.c158
-rw-r--r--cesar/ecos/packages/redboot/current/src/fconfig.c1194
-rw-r--r--cesar/ecos/packages/redboot/current/src/flash.c1439
-rw-r--r--cesar/ecos/packages/redboot/current/src/fs/disk.c441
-rw-r--r--cesar/ecos/packages/redboot/current/src/fs/e2fs.c613
-rw-r--r--cesar/ecos/packages/redboot/current/src/fs/fileio.c311
-rw-r--r--cesar/ecos/packages/redboot/current/src/fs/ide.c529
-rw-r--r--cesar/ecos/packages/redboot/current/src/io.c760
-rw-r--r--cesar/ecos/packages/redboot/current/src/iomem.c171
-rw-r--r--cesar/ecos/packages/redboot/current/src/load.c820
-rw-r--r--cesar/ecos/packages/redboot/current/src/main.c758
-rw-r--r--cesar/ecos/packages/redboot/current/src/mcmp.c135
-rw-r--r--cesar/ecos/packages/redboot/current/src/mcopy.c134
-rw-r--r--cesar/ecos/packages/redboot/current/src/mfill.c113
-rw-r--r--cesar/ecos/packages/redboot/current/src/misc_funs.c81
-rw-r--r--cesar/ecos/packages/redboot/current/src/net/arp.c212
-rw-r--r--cesar/ecos/packages/redboot/current/src/net/bootp.c344
-rw-r--r--cesar/ecos/packages/redboot/current/src/net/cksum.c124
-rw-r--r--cesar/ecos/packages/redboot/current/src/net/dns.c287
-rw-r--r--cesar/ecos/packages/redboot/current/src/net/enet.c248
-rw-r--r--cesar/ecos/packages/redboot/current/src/net/http_client.c255
-rw-r--r--cesar/ecos/packages/redboot/current/src/net/icmp.c126
-rw-r--r--cesar/ecos/packages/redboot/current/src/net/inet_addr.c118
-rw-r--r--cesar/ecos/packages/redboot/current/src/net/ip.c216
-rw-r--r--cesar/ecos/packages/redboot/current/src/net/net_io.c899
-rw-r--r--cesar/ecos/packages/redboot/current/src/net/ping.c248
-rw-r--r--cesar/ecos/packages/redboot/current/src/net/pktbuf.c167
-rw-r--r--cesar/ecos/packages/redboot/current/src/net/tcp.c921
-rw-r--r--cesar/ecos/packages/redboot/current/src/net/tftp_client.c279
-rw-r--r--cesar/ecos/packages/redboot/current/src/net/timers.c135
-rw-r--r--cesar/ecos/packages/redboot/current/src/net/udp.c268
-rw-r--r--cesar/ecos/packages/redboot/current/src/parse.c402
-rw-r--r--cesar/ecos/packages/redboot/current/src/syscall.c655
-rw-r--r--cesar/ecos/packages/redboot/current/src/ticks.c77
-rw-r--r--cesar/ecos/packages/redboot/current/src/time_date.cxx124
-rw-r--r--cesar/ecos/packages/redboot/current/src/version.c97
-rw-r--r--cesar/ecos/packages/redboot/current/src/xyzModem.c597
-rw-r--r--cesar/ecos/packages/redboot/current/src/xyzModem.h84
-rw-r--r--cesar/ecos/packages/services/blib/current/ChangeLog58
-rw-r--r--cesar/ecos/packages/services/blib/current/cdl/blib.cdl70
-rw-r--r--cesar/ecos/packages/services/blib/current/include/blib.h307
-rw-r--r--cesar/ecos/packages/services/blib/current/src/blib.c664
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/ChangeLog219
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/cdl/compress_zlib.cdl157
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/include/zconf.h349
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/include/zlib.h1358
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/ChangeLog854
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/FAQ339
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/INDEX51
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/Make_vms.com461
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/Makefile154
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/Makefile.in154
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/Makefile.riscos151
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/README125
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/README.eCos27
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/adler32.c153
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/algorithm.txt209
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/compress.c83
-rwxr-xr-xcesar/ecos/packages/services/compress/zlib/current/src/configure459
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/deflate.c1736
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/deflate.h331
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/descrip.mms48
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/example.c565
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/gzio.c1026
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/infback.c623
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/infblock.c403
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/infblock.h39
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/inffast.c318
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/inffast.h11
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/inffixed.h94
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/inflate.c1368
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/inflate.h115
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/inftrees.c329
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/inftrees.h55
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/infutil.c87
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/infutil.h98
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/maketree.c85
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/minigzip.c322
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/trees.c1219
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/trees.h128
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/uncompr.c65
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/zlib.3159
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/zutil.c318
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/src/zutil.h276
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/tests/zlib1.c233
-rw-r--r--cesar/ecos/packages/services/compress/zlib/current/tests/zlib2.c308
-rw-r--r--cesar/ecos/packages/services/cpuload/current/ChangeLog48
-rw-r--r--cesar/ecos/packages/services/cpuload/current/cdl/cpuload.cdl73
-rwxr-xr-xcesar/ecos/packages/services/cpuload/current/doc/cpuload.sgml149
-rw-r--r--cesar/ecos/packages/services/cpuload/current/include/cpuload.h94
-rw-r--r--cesar/ecos/packages/services/cpuload/current/src/cpuload.cxx206
-rw-r--r--cesar/ecos/packages/services/cpuload/current/tests/cpuload.c132
-rw-r--r--cesar/ecos/packages/services/crc/current/ChangeLog74
-rw-r--r--cesar/ecos/packages/services/crc/current/cdl/crc.cdl71
-rwxr-xr-xcesar/ecos/packages/services/crc/current/doc/crc.sgml97
-rw-r--r--cesar/ecos/packages/services/crc/current/include/crc.h103
-rw-r--r--cesar/ecos/packages/services/crc/current/src/crc16.c106
-rw-r--r--cesar/ecos/packages/services/crc/current/src/crc32.c168
-rw-r--r--cesar/ecos/packages/services/crc/current/src/posix_crc.c118
-rw-r--r--cesar/ecos/packages/services/crc/current/tests/crc_test.c135
-rw-r--r--cesar/ecos/packages/services/ezxml/current/ChangeLog35
-rw-r--r--cesar/ecos/packages/services/ezxml/current/cdl/ezxml.cdl80
-rw-r--r--cesar/ecos/packages/services/ezxml/current/doc/ezxml.html121
-rw-r--r--cesar/ecos/packages/services/ezxml/current/doc/ezxml.txt84
-rw-r--r--cesar/ecos/packages/services/ezxml/current/doc/license.txt20
-rw-r--r--cesar/ecos/packages/services/ezxml/current/include/ezxml.h169
-rw-r--r--cesar/ecos/packages/services/ezxml/current/src/ezxml.c659
-rw-r--r--cesar/ecos/packages/services/ezxml/current/tests/ezxml.c107
-rw-r--r--cesar/ecos/packages/services/gcov/current/cdl/services_gcov.cdl31
-rw-r--r--cesar/ecos/packages/services/gcov/current/doc/README17
-rw-r--r--cesar/ecos/packages/services/gcov/current/doc/gcov-doc.tex41
-rw-r--r--cesar/ecos/packages/services/gcov/current/doc/makefile19
-rw-r--r--cesar/ecos/packages/services/gcov/current/gcovadd.db8
-rw-r--r--cesar/ecos/packages/services/gcov/current/include/3.2.1/gbl-ctors.h88
-rw-r--r--cesar/ecos/packages/services/gcov/current/include/3.2.1/gcov-io.h199
-rw-r--r--cesar/ecos/packages/services/gcov/current/include/3.2.1/gcov_fio.h232
-rw-r--r--cesar/ecos/packages/services/gcov/current/include/gcov.h71
-rw-r--r--cesar/ecos/packages/services/gcov/current/include/gcov_ecos.h143
-rw-r--r--cesar/ecos/packages/services/gcov/current/src/empty.c1
-rw-r--r--cesar/ecos/packages/services/gcov/current/src/gcov_bb.c259
-rw-r--r--cesar/ecos/packages/services/gcov/current/src/gcov_ecos.c256
-rw-r--r--cesar/ecos/packages/services/loader/current/ChangeLog79
-rw-r--r--cesar/ecos/packages/services/loader/current/cdl/loader.cdl245
-rw-r--r--cesar/ecos/packages/services/loader/current/docs/i386.default.ld224
-rw-r--r--cesar/ecos/packages/services/loader/current/docs/notes.txt107
-rw-r--r--cesar/ecos/packages/services/loader/current/include/arm_elf.h189
-rw-r--r--cesar/ecos/packages/services/loader/current/include/dlfcn.h85
-rw-r--r--cesar/ecos/packages/services/loader/current/include/elf.h704
-rw-r--r--cesar/ecos/packages/services/loader/current/include/i386_elf.h216
-rw-r--r--cesar/ecos/packages/services/loader/current/include/loader.hxx487
-rw-r--r--cesar/ecos/packages/services/loader/current/include/mips_elf.h176
-rw-r--r--cesar/ecos/packages/services/loader/current/include/ppc_elf.h235
-rw-r--r--cesar/ecos/packages/services/loader/current/src/crtbeginS.c127
-rw-r--r--cesar/ecos/packages/services/loader/current/src/crtendS.c146
-rw-r--r--cesar/ecos/packages/services/loader/current/src/dlforce.c63
-rw-r--r--cesar/ecos/packages/services/loader/current/src/dload.cxx199
-rw-r--r--cesar/ecos/packages/services/loader/current/src/dynamic.ld216
-rw-r--r--cesar/ecos/packages/services/loader/current/src/loader.cxx1055
-rw-r--r--cesar/ecos/packages/services/loader/current/tests/entable.c88
-rw-r--r--cesar/ecos/packages/services/loader/current/tests/foo.c69
-rw-r--r--cesar/ecos/packages/services/loader/current/tests/loadfoo.cxx124
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/ChangeLog362
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/cdl/memalloc.cdl415
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/doc/dlmalloc/dlmalloc-2.6.4.c3166
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/doc/dlmalloc/dlmalloc-2.6.6.c3276
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/doc/dlmalloc/dlmalloc-merged.c3753
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/doc/dlmalloc/dlmalloc-newlib.c3643
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/doc/memalloc.sgml383
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/doc/notes.txt361
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/common.hxx152
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/dlmalloc.hxx172
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/dlmallocimpl.hxx184
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/kapi.h204
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/kapidata.h100
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/memfixed.hxx146
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/memjoin.hxx131
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/memjoin.inl347
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/mempolt2.hxx139
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/mempolt2.inl411
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/mempoolt.hxx123
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/mempoolt.inl401
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/memvar.hxx164
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/mfiximpl.hxx127
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/mfiximpl.inl243
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/mvarimpl.hxx154
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/mvarimpl.inl454
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/sepmeta.hxx174
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/sepmetaimpl.hxx194
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/include/sepmetaimpl.inl678
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/src/debug.c75
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/src/dlmalloc.cxx1661
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/src/heapgen.cpp72
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/src/heapgen.tcl201
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/src/kapi.cxx358
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/src/malloc.cxx287
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/src/memfixed.cxx177
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/src/memvar.cxx181
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/src/sepmeta.cxx184
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/dlmalloc1.cxx222
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/dlmalloc2.cxx159
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/heaptest.c237
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/kmemfix1.c209
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/kmemvar1.c217
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/malloc1.c271
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/malloc2.c256
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/malloc3.c198
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/malloc4.cxx396
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/memfix1.cxx213
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/memfix2.cxx151
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/memvar1.cxx221
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/memvar2.cxx159
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/realloc.c196
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/sepmeta1.cxx225
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/sepmeta2.cxx162
-rw-r--r--cesar/ecos/packages/services/memalloc/common/current/tests/testaux.hxx111
-rw-r--r--cesar/ecos/packages/services/objloader/current/ChangeLog60
-rw-r--r--cesar/ecos/packages/services/objloader/current/cdl/objloader.cdl200
-rw-r--r--cesar/ecos/packages/services/objloader/current/doc/notes.txt156
-rw-r--r--cesar/ecos/packages/services/objloader/current/include/elf.h234
-rw-r--r--cesar/ecos/packages/services/objloader/current/include/loader_fs.h60
-rw-r--r--cesar/ecos/packages/services/objloader/current/include/objelf.h539
-rw-r--r--cesar/ecos/packages/services/objloader/current/include/relocate_i386.h71
-rw-r--r--cesar/ecos/packages/services/objloader/current/include/relocate_ppc.h132
-rw-r--r--cesar/ecos/packages/services/objloader/current/src/loader_fs.c123
-rw-r--r--cesar/ecos/packages/services/objloader/current/src/objelf.c407
-rw-r--r--cesar/ecos/packages/services/objloader/current/src/objloader.c462
-rw-r--r--cesar/ecos/packages/services/objloader/current/src/relocate_i386.c100
-rw-r--r--cesar/ecos/packages/services/objloader/current/src/relocate_ppc.c119
-rw-r--r--cesar/ecos/packages/services/objloader/current/tests/library/hello.c136
-rw-r--r--cesar/ecos/packages/services/objloader/current/tests/test_mods.c210
-rw-r--r--cesar/ecos/packages/services/power/common/current/ChangeLog83
-rw-r--r--cesar/ecos/packages/services/power/common/current/cdl/power.cdl167
-rw-r--r--cesar/ecos/packages/services/power/common/current/doc/makefile55
-rw-r--r--cesar/ecos/packages/services/power/common/current/doc/power-attached.html253
-rw-r--r--cesar/ecos/packages/services/power/common/current/doc/power-change.html453
-rw-r--r--cesar/ecos/packages/services/power/common/current/doc/power-controller.html638
-rw-r--r--cesar/ecos/packages/services/power/common/current/doc/power-info.html486
-rw-r--r--cesar/ecos/packages/services/power/common/current/doc/power-intro.html553
-rw-r--r--cesar/ecos/packages/services/power/common/current/doc/power-policy.html408
-rw-r--r--cesar/ecos/packages/services/power/common/current/doc/power.sgml1420
-rw-r--r--cesar/ecos/packages/services/power/common/current/doc/services-power.html164
-rw-r--r--cesar/ecos/packages/services/power/common/current/include/power.h249
-rw-r--r--cesar/ecos/packages/services/power/common/current/src/power.cxx371
-rw-r--r--cesar/ecos/packages/services/power/common/current/src/power_data.cxx77
-rw-r--r--cesar/ecos/packages/services/power/common/current/tests/powertest.cxx369
-rw-r--r--cesar/ecos/packages/services/profile/gprof/current/ChangeLog93
-rw-r--r--cesar/ecos/packages/services/profile/gprof/current/cdl/profile_gprof.cdl194
-rw-r--r--cesar/ecos/packages/services/profile/gprof/current/doc/cray.xbm38
-rw-r--r--cesar/ecos/packages/services/profile/gprof/current/doc/gprofrun.fig66
-rw-r--r--cesar/ecos/packages/services/profile/gprof/current/doc/gprofrun.pngbin0 -> 2171 bytes
-rw-r--r--cesar/ecos/packages/services/profile/gprof/current/doc/profile.sgml561
-rw-r--r--cesar/ecos/packages/services/profile/gprof/current/host/Makefile.am48
-rw-r--r--cesar/ecos/packages/services/profile/gprof/current/host/Makefile.in317
-rw-r--r--cesar/ecos/packages/services/profile/gprof/current/host/acinclude.m444
-rw-r--r--cesar/ecos/packages/services/profile/gprof/current/host/aclocal.m4212
-rwxr-xr-xcesar/ecos/packages/services/profile/gprof/current/host/configure2540
-rw-r--r--cesar/ecos/packages/services/profile/gprof/current/host/configure.in53
-rw-r--r--cesar/ecos/packages/services/profile/gprof/current/host/gprof.gdb115
-rw-r--r--cesar/ecos/packages/services/profile/gprof/current/include/gmon_out.h79
-rw-r--r--cesar/ecos/packages/services/profile/gprof/current/include/profile.h77
-rw-r--r--cesar/ecos/packages/services/profile/gprof/current/src/profile.c547
-rw-r--r--cesar/ecos/packages/templates/all/ChangeLog168
-rw-r--r--cesar/ecos/packages/templates/all/current.ect278
-rw-r--r--cesar/ecos/packages/templates/cygmon/ChangeLog103
-rw-r--r--cesar/ecos/packages/templates/cygmon/current.ect98
-rw-r--r--cesar/ecos/packages/templates/cygmon_no_kernel/ChangeLog50
-rw-r--r--cesar/ecos/packages/templates/cygmon_no_kernel/current.ect97
-rw-r--r--cesar/ecos/packages/templates/default/ChangeLog111
-rw-r--r--cesar/ecos/packages/templates/default/current.ect137
-rw-r--r--cesar/ecos/packages/templates/kernel/ChangeLog86
-rw-r--r--cesar/ecos/packages/templates/kernel/current.ect32
-rw-r--r--cesar/ecos/packages/templates/lwip_eth/ChangeLog38
-rw-r--r--cesar/ecos/packages/templates/lwip_eth/current.ect38
-rw-r--r--cesar/ecos/packages/templates/lwip_ppp/ChangeLog38
-rw-r--r--cesar/ecos/packages/templates/lwip_ppp/current.ect54
-rw-r--r--cesar/ecos/packages/templates/minimal/ChangeLog86
-rw-r--r--cesar/ecos/packages/templates/minimal/current.ect33
-rw-r--r--cesar/ecos/packages/templates/net/ChangeLog53
-rw-r--r--cesar/ecos/packages/templates/net/current.ect238
-rw-r--r--cesar/ecos/packages/templates/old_net/ChangeLog142
-rw-r--r--cesar/ecos/packages/templates/old_net/current.ect238
-rw-r--r--cesar/ecos/packages/templates/posix/ChangeLog77
-rw-r--r--cesar/ecos/packages/templates/posix/current.ect149
-rw-r--r--cesar/ecos/packages/templates/redboot/ChangeLog100
-rw-r--r--cesar/ecos/packages/templates/redboot/current.ect63
-rw-r--r--cesar/ecos/packages/templates/stubs/ChangeLog122
-rw-r--r--cesar/ecos/packages/templates/stubs/current.ect43
-rw-r--r--cesar/ecos/packages/templates/uitron/ChangeLog110
-rw-r--r--cesar/ecos/packages/templates/uitron/current.ect140
-rwxr-xr-xcesar/ecos/purge-unused394
-rw-r--r--cesar/hal/Module2
-rw-r--r--cesar/hal/arch/arch.h85
-rw-r--r--cesar/hal/arch/inc/ecos.h45
-rw-r--r--cesar/hal/arch/inc/generic.h28
-rw-r--r--cesar/hal/arch/inc/sparc.h33
-rw-r--r--cesar/hal/arch/io.h87
-rw-r--r--cesar/hal/arch/test/atomic/Makefile13
-rw-r--r--cesar/hal/arch/test/atomic/src/test_atomic.c188
-rw-r--r--cesar/hal/hle/defs.h68
-rw-r--r--cesar/hal/hle/doc/claudia_ipmbox.odtbin0 -> 194344 bytes
-rw-r--r--cesar/hal/hle/forward.h19
-rw-r--r--cesar/hal/hle/ipmbox.h62
-rw-r--r--cesar/hal/hle/maximus/Module1
-rw-r--r--cesar/hal/hle/maximus/inc/maximus_defs.h19
-rw-r--r--cesar/hal/hle/maximus/inc/maximus_ether.h69
-rw-r--r--cesar/hal/hle/maximus/inc/maximus_interrupts.h20
-rw-r--r--cesar/hal/hle/maximus/inc/maximus_ipmbox_ctx.h70
-rw-r--r--cesar/hal/hle/maximus/src/maximus_ether.c472
-rw-r--r--cesar/hal/hle/maximus/src/maximus_ipmbox.c367
-rw-r--r--cesar/hal/hle/maximus/test/Config2
-rw-r--r--cesar/hal/hle/maximus/test/Makefile8
-rw-r--r--cesar/hal/hle/maximus/test/inc/test_maximus_hle.h42
-rw-r--r--cesar/hal/hle/maximus/test/src/test_maximus_ether.c754
-rw-r--r--cesar/hal/hle/maximus/test/src/test_maximus_hle.c67
-rw-r--r--cesar/hal/hle/maximus/test/src/test_maximus_ipmbox.c414
-rw-r--r--cesar/hal/leon/Module1
-rw-r--r--cesar/hal/leon/inc/timer.h45
-rw-r--r--cesar/hal/leon/inc/timer_ctx.h40
-rw-r--r--cesar/hal/leon/itc2.h89
-rw-r--r--cesar/hal/leon/maximus/Module5
-rw-r--r--cesar/hal/leon/maximus/inc/maximus_interrupts.h20
-rw-r--r--cesar/hal/leon/maximus/inc/maximus_timer.h24
-rw-r--r--cesar/hal/leon/maximus/inc/maximus_timer_ctx.h53
-rw-r--r--cesar/hal/leon/maximus/inc/maximus_trace.h58
-rw-r--r--cesar/hal/leon/maximus/src/maximus_timer.c258
-rw-r--r--cesar/hal/leon/maximus/src/maximus_trace.c42
-rw-r--r--cesar/hal/leon/maximus/test/Config3
-rw-r--r--cesar/hal/leon/maximus/test/Makefile8
-rw-r--r--cesar/hal/leon/maximus/test/inc/test_maximus_timer.h40
-rw-r--r--cesar/hal/leon/maximus/test/src/test_maximus_timer.c306
-rw-r--r--cesar/hal/leon/src/timer.c202
-rw-r--r--cesar/hal/leon/test/itc2/Makefile10
-rw-r--r--cesar/hal/leon/test/itc2/ecos.ecc.sh5
-rw-r--r--cesar/hal/leon/test/itc2/src/test_itc2.c173
-rw-r--r--cesar/hal/leon/test/timer/Makefile11
-rw-r--r--cesar/hal/leon/test/timer/ecos.ecc.sh14
-rw-r--r--cesar/hal/leon/test/timer/src/target.c81
-rw-r--r--cesar/hal/leon/timer.h56
-rw-r--r--cesar/hal/leon/unit-test/Module1
-rw-r--r--cesar/hal/leon/unit-test/src/leon_timer.c136
-rw-r--r--cesar/hal/phy/Module5
-rw-r--r--cesar/hal/phy/access.h85
-rw-r--r--cesar/hal/phy/bridgedma.h145
-rw-r--r--cesar/hal/phy/defs.h108
-rw-r--r--cesar/hal/phy/forward.h20
-rw-r--r--cesar/hal/phy/inc/bridgedma.h62
-rw-r--r--cesar/hal/phy/inc/bridgedma_proto.h92
-rw-r--r--cesar/hal/phy/inc/context.h47
-rw-r--r--cesar/hal/phy/inc/regs.h280
-rw-r--r--cesar/hal/phy/inc/regs_addr.h300
-rw-r--r--cesar/hal/phy/maximus/Module7
-rw-r--r--cesar/hal/phy/maximus/dur/Module1
-rw-r--r--cesar/hal/phy/maximus/dur/inc/maximus_dur.h77
-rw-r--r--cesar/hal/phy/maximus/dur/maximus/Module2
-rw-r--r--cesar/hal/phy/maximus/dur/maximus/inc/maximus_phy_dur.h26
-rw-r--r--cesar/hal/phy/maximus/dur/maximus/src/maximus_phy_dur.c168
-rw-r--r--cesar/hal/phy/maximus/dur/src/maximus_dur.c158
-rw-r--r--cesar/hal/phy/maximus/dur/test/Makefile7
-rw-r--r--cesar/hal/phy/maximus/dur/test/src/test_dur.c302
-rw-r--r--cesar/hal/phy/maximus/inc/maximus_bridgedma_ctx.h64
-rw-r--r--cesar/hal/phy/maximus/inc/maximus_defs.h37
-rw-r--r--cesar/hal/phy/maximus/inc/maximus_interrupts.h22
-rw-r--r--cesar/hal/phy/maximus/inc/maximus_phy_access.h102
-rw-r--r--cesar/hal/phy/maximus/inc/maximus_phy_ctrl.h233
-rw-r--r--cesar/hal/phy/maximus/inc/maximus_phy_ctx.h282
-rw-r--r--cesar/hal/phy/maximus/inc/maximus_trace.h98
-rw-r--r--cesar/hal/phy/maximus/src/maximus_bridgedma.c405
-rw-r--r--cesar/hal/phy/maximus/src/maximus_pbdma.c187
-rw-r--r--cesar/hal/phy/maximus/src/maximus_phy_access.c961
-rw-r--r--cesar/hal/phy/maximus/src/maximus_phy_ctrl.c2873
-rw-r--r--cesar/hal/phy/maximus/src/maximus_phy_ctrl_cb.c966
-rw-r--r--cesar/hal/phy/maximus/src/maximus_tmdma.c111
-rw-r--r--cesar/hal/phy/maximus/src/maximus_trace.c103
-rw-r--r--cesar/hal/phy/maximus/test/Config3
-rw-r--r--cesar/hal/phy/maximus/test/Makefile10
-rw-r--r--cesar/hal/phy/maximus/test/inc/test_phy_maximus.h93
-rw-r--r--cesar/hal/phy/maximus/test/src/test_bridgedma.c1257
-rw-r--r--cesar/hal/phy/maximus/test/src/test_pbdma.c320
-rw-r--r--cesar/hal/phy/maximus/test/src/test_phy_access.c826
-rw-r--r--cesar/hal/phy/maximus/test/src/test_phy_ctrl.c2929
-rw-r--r--cesar/hal/phy/maximus/test/src/test_phy_maximus.c105
-rw-r--r--cesar/hal/phy/maximus/test/src/test_tmdma.c144
-rw-r--r--cesar/hal/phy/pbdma.h223
-rw-r--r--cesar/hal/phy/phy.h332
-rw-r--r--cesar/hal/phy/src/access.c69
-rw-r--r--cesar/hal/phy/src/bridgedma.c447
-rw-r--r--cesar/hal/phy/src/pbdma.c89
-rw-r--r--cesar/hal/phy/src/phy.c229
-rw-r--r--cesar/hal/phy/src/pratic.c92
-rw-r--r--cesar/hal/phy/src/rx.c114
-rw-r--r--cesar/hal/phy/src/tx.c91
-rw-r--r--cesar/hal/phy/test/bridgedma-proto/Makefile13
-rw-r--r--cesar/hal/phy/test/bridgedma-proto/sparc-Makefile14
-rw-r--r--cesar/hal/phy/test/bridgedma-proto/sparc-ecos.ecc.sh5
-rw-r--r--cesar/hal/phy/test/bridgedma-proto/src/bridgedma-init-test.c382
-rw-r--r--cesar/hal/phy/test/bridgedma-proto/src/data.c546
-rw-r--r--cesar/hal/phy/test/bridgedma-proto/src/test_bridgedma.c_old1003
-rw-r--r--cesar/hal/phy/test/bridgedma-proto/synth-Makefile13
-rw-r--r--cesar/hal/phy/test/bridgedma-proto/synth-ecos.ecc.sh5
-rw-r--r--cesar/hal/phy/test/phy/Makefile3
-rw-r--r--cesar/hal/phy/test/phy/inc/access.h27
-rw-r--r--cesar/hal/phy/test/phy/inc/basic.h27
-rw-r--r--cesar/hal/phy/test/phy/inc/clk_sync.h45
-rw-r--r--cesar/hal/phy/test/phy/inc/context.h149
-rw-r--r--cesar/hal/phy/test/phy/inc/data.h27
-rw-r--r--cesar/hal/phy/test/phy/inc/gen.h64
-rw-r--r--cesar/hal/phy/test/phy/inc/msg.h168
-rw-r--r--cesar/hal/phy/test/phy/inc/test_phy.h92
-rw-r--r--cesar/hal/phy/test/phy/maximus-Makefile17
-rw-r--r--cesar/hal/phy/test/phy/maximus-ecos.ecc.sh8
-rw-r--r--cesar/hal/phy/test/phy/sparc-Makefile19
-rw-r--r--cesar/hal/phy/test/phy/sparc-ecos.ecc.sh5
-rw-r--r--cesar/hal/phy/test/phy/src/access.c532
-rw-r--r--cesar/hal/phy/test/phy/src/basic.c190
-rw-r--r--cesar/hal/phy/test/phy/src/clk_sync.c182
-rw-r--r--cesar/hal/phy/test/phy/src/data.c488
-rw-r--r--cesar/hal/phy/test/phy/src/gen.c84
-rw-r--r--cesar/hal/phy/test/phy/src/host_test_phy.cpp235
-rw-r--r--cesar/hal/phy/test/phy/src/test_phy.c412
-rw-r--r--cesar/hal/timer/Module1
-rw-r--r--cesar/hal/timer/inc/context.h39
-rw-r--r--cesar/hal/timer/inc/timer.h44
-rw-r--r--cesar/hal/timer/src/timer.c311
-rw-r--r--cesar/hal/timer/test/Makefile9
-rw-r--r--cesar/hal/timer/test/ecos.ecc.sh5
-rw-r--r--cesar/hal/timer/test/src/leon_timer_stub.c121
-rw-r--r--cesar/hal/timer/test/src/phy_stub.c24
-rw-r--r--cesar/hal/timer/test/src/timer.c178
-rw-r--r--cesar/hal/timer/timer.h112
-rw-r--r--cesar/hle/Module4
-rwxr-xr-xcesar/hle/doc/cesar_hle.odtbin0 -> 105848 bytes
-rw-r--r--cesar/hle/hle.h163
-rw-r--r--cesar/hle/inc/context.h43
-rw-r--r--cesar/hle/inc/trace.h73
-rw-r--r--cesar/hle/src/hle.c381
-rw-r--r--cesar/hle/src/trace.c68
-rw-r--r--cesar/hle/test/Makefile20
-rw-r--r--cesar/hle/test/overide/cl/Module1
-rw-r--r--cesar/hle/test/overide/cl/cl.h163
-rw-r--r--cesar/hle/test/overide/cl/inc/cl.h101
-rw-r--r--cesar/hle/test/overide/cl/src/cl.c161
-rw-r--r--cesar/hle/test/src/hle_add_buffer.c139
-rw-r--r--cesar/hle/test/src/hle_recv_from_arm.c108
-rw-r--r--cesar/hle/test/src/hle_send_to_arm.c82
-rw-r--r--cesar/hle/test/src/interface-send.c98
-rw-r--r--cesar/hle/test/src/ipmbox.c38
-rw-r--r--cesar/host/Config1
-rw-r--r--cesar/host/Module1
-rw-r--r--cesar/host/config.h31
-rwxr-xr-xcesar/host/doc/fulminata_station_specs.odtbin0 -> 622592 bytes
-rw-r--r--cesar/host/fcall.h455
-rw-r--r--cesar/host/fwd.h66
-rw-r--r--cesar/host/netclock.h158
-rw-r--r--cesar/host/sci.h209
-rw-r--r--cesar/host/socket.h69
-rw-r--r--cesar/host/src/fcall.c482
-rw-r--r--cesar/host/src/fcall_param.c316
-rw-r--r--cesar/host/src/netclock.c358
-rw-r--r--cesar/host/src/probe.c275
-rw-r--r--cesar/host/src/sci.c346
-rw-r--r--cesar/host/src/sci_msg.c165
-rw-r--r--cesar/host/src/socketcalls.c237
-rw-r--r--cesar/host/src/station.c513
-rw-r--r--cesar/host/src/system.c117
-rw-r--r--cesar/host/station.h215
-rw-r--r--cesar/host/syscall.h206
-rw-r--r--cesar/host/system.h63
-rw-r--r--cesar/host/test/Makefile9
-rw-r--r--cesar/host/test/src/test_fcall.c629
-rw-r--r--cesar/host/test/src/test_fcall_param.c432
-rw-r--r--cesar/host/test/src/test_host.c59
-rw-r--r--cesar/host/test/src/test_netclock.c560
-rw-r--r--cesar/host/test/src/test_probe.c374
-rw-r--r--cesar/host/test/src/test_sci.c527
-rw-r--r--cesar/host/test/src/test_sci_msg.c258
-rw-r--r--cesar/host/test/src/test_station.c279
-rw-r--r--cesar/host/test/src/test_system.c163
-rw-r--r--cesar/interface/Module2
-rw-r--r--cesar/interface/doc/interface.odtbin0 -> 231299 bytes
-rw-r--r--cesar/interface/inc/context.h57
-rw-r--r--cesar/interface/inc/interface.h43
-rw-r--r--cesar/interface/interface.h166
-rw-r--r--cesar/interface/interface_module.h23
-rw-r--r--cesar/interface/sniffer/Module1
-rw-r--r--cesar/interface/sniffer/defs.h25
-rw-r--r--cesar/interface/sniffer/doc/sniffer.odtbin0 -> 272055 bytes
-rw-r--r--cesar/interface/sniffer/inc/context.h36
-rw-r--r--cesar/interface/sniffer/sniffer.h202
-rw-r--r--cesar/interface/sniffer/src/sniffer.c224
-rw-r--r--cesar/interface/sniffer/test/Makefile8
-rw-r--r--cesar/interface/sniffer/test/src/test-sniffer.c313
-rw-r--r--cesar/interface/src/interface.c358
-rw-r--r--cesar/interface/test/Makefile9
-rw-r--r--cesar/interface/test/ecos.ecc.sh5
-rw-r--r--cesar/interface/test/src/cl_stub.c63
-rw-r--r--cesar/interface/test/src/sar_stub.c37
-rw-r--r--cesar/interface/test/src/test-interface.c344
-rw-r--r--cesar/lib/Config9
-rw-r--r--cesar/lib/Module14
-rw-r--r--cesar/lib/aatree.h117
-rw-r--r--cesar/lib/atox.h61
-rw-r--r--cesar/lib/bitstream.h202
-rw-r--r--cesar/lib/blk.h218
-rw-r--r--cesar/lib/circular_buffer.h75
-rw-r--r--cesar/lib/crc.h117
-rw-r--r--cesar/lib/dbg.h327
-rw-r--r--cesar/lib/defs.h41
-rw-r--r--cesar/lib/heap.h124
-rw-r--r--cesar/lib/heapsort.h125
-rw-r--r--cesar/lib/leftheap.h81
-rw-r--r--cesar/lib/list.h191
-rw-r--r--cesar/lib/preproc.h307
-rw-r--r--cesar/lib/python/Module7
-rw-r--r--cesar/lib/python/test/pyhello/Makefile8
-rw-r--r--cesar/lib/python/test/pyhello/py/test_hello.py16
-rw-r--r--cesar/lib/python/test/pyhello/src/hello.cpp41
-rw-r--r--cesar/lib/read_word.h126
-rw-r--r--cesar/lib/restrack.h137
-rw-r--r--cesar/lib/rnd.h56
-rw-r--r--cesar/lib/set.h48
-rw-r--r--cesar/lib/skewheap.h78
-rw-r--r--cesar/lib/src/aatree.c312
-rw-r--r--cesar/lib/src/atox.c383
-rw-r--r--cesar/lib/src/bitstream.c394
-rw-r--r--cesar/lib/src/blk.c244
-rw-r--r--cesar/lib/src/circular_buffer.c101
-rw-r--r--cesar/lib/src/crc.c193
-rw-r--r--cesar/lib/src/dbg.c71
-rw-r--r--cesar/lib/src/heap.c62
-rw-r--r--cesar/lib/src/leftheap.c159
-rw-r--r--cesar/lib/src/list.c181
-rw-r--r--cesar/lib/src/mt19937ar.c260
-rw-r--r--cesar/lib/src/read_word.c129
-rw-r--r--cesar/lib/src/restrack.c353
-rw-r--r--cesar/lib/src/skewheap.c138
-rw-r--r--cesar/lib/src/swap.c31
-rw-r--r--cesar/lib/src/test.c138
-rw-r--r--cesar/lib/src/trace.c655
-rw-r--r--cesar/lib/src/try.c17
-rw-r--r--cesar/lib/swap.h38
-rw-r--r--cesar/lib/test.h228
-rw-r--r--cesar/lib/test/atox/Makefile7
-rw-r--r--cesar/lib/test/atox/src/test_atox.c117
-rw-r--r--cesar/lib/test/bitstream/Config1
-rw-r--r--cesar/lib/test/bitstream/Makefile7
-rw-r--r--cesar/lib/test/bitstream/src/test_bit.c222
-rw-r--r--cesar/lib/test/blk/Makefile7
-rw-r--r--cesar/lib/test/blk/src/test_blk.c125
-rw-r--r--cesar/lib/test/circular_buffer/Makefile7
-rw-r--r--cesar/lib/test/circular_buffer/src/test_circular.c94
-rw-r--r--cesar/lib/test/crc/Makefile7
-rw-r--r--cesar/lib/test/crc/inc/crcmodel.h160
-rw-r--r--cesar/lib/test/crc/src/crcmodel.c148
-rw-r--r--cesar/lib/test/crc/src/test_crc.c294
-rw-r--r--cesar/lib/test/heap/Makefile7
-rw-r--r--cesar/lib/test/heap/src/test_heap.c272
-rw-r--r--cesar/lib/test/list/Makefile7
-rw-r--r--cesar/lib/test/list/src/test_list.c267
-rw-r--r--cesar/lib/test/read_word/Makefile7
-rw-r--r--cesar/lib/test/read_word/src/read_word.c151
-rw-r--r--cesar/lib/test/restrack/Config2
-rw-r--r--cesar/lib/test/restrack/Makefile7
-rw-r--r--cesar/lib/test/restrack/src/test_restrack.c104
-rw-r--r--cesar/lib/test/rnd/Makefile19
-rw-r--r--cesar/lib/test/rnd/mt19937ar.out213
-rw-r--r--cesar/lib/test/rnd/src/test_rnd.c164
-rw-r--r--cesar/lib/test/set/Makefile8
-rw-r--r--cesar/lib/test/set/src/test_set.c362
-rw-r--r--cesar/lib/test/test/Config1
-rw-r--r--cesar/lib/test/test/Makefile8
-rw-r--r--cesar/lib/test/test/src/test_test.c90
-rw-r--r--cesar/lib/test/trace/Config2
-rw-r--r--cesar/lib/test/trace/Makefile7
-rw-r--r--cesar/lib/test/trace/src/test_trace.c302
-rw-r--r--cesar/lib/test/try/Makefile8
-rw-r--r--cesar/lib/test/try/src/test_try.c125
-rw-r--r--cesar/lib/test/utils/Makefile7
-rw-r--r--cesar/lib/test/utils/src/test_utils.c65
-rw-r--r--cesar/lib/trace.h403
-rw-r--r--cesar/lib/try.h120
-rw-r--r--cesar/lib/types.h59
-rw-r--r--cesar/lib/utils.h258
-rw-r--r--cesar/lib/visual_state_api/Module2
-rw-r--r--cesar/lib/visual_state_api/src/SEMExpl.c27
-rw-r--r--cesar/lib/visual_state_api/src/SEMExplA.c28
-rw-r--r--cesar/lib/visual_state_api/src/SEMForce.c27
-rw-r--r--cesar/lib/visual_state_api/src/SEMInq.c45
-rw-r--r--cesar/lib/visual_state_api/src/SEMInst.c33
-rw-r--r--cesar/lib/visual_state_api/src/SEMLibE.h1882
-rw-r--r--cesar/lib/visual_state_api/src/SEMMach.c27
-rw-r--r--cesar/lib/visual_state_api/src/SEMMain.c154
-rw-r--r--cesar/lib/visual_state_api/src/SEMName.c27
-rw-r--r--cesar/lib/visual_state_api/src/SEMNameA.c28
-rw-r--r--cesar/lib/visual_state_api/src/SEMStAll.c28
-rw-r--r--cesar/lib/visual_state_api/src/SEMState.c27
-rw-r--r--cesar/lib/visual_state_api/src/SMPExpl.c92
-rw-r--r--cesar/lib/visual_state_api/src/SMPExplA.c68
-rw-r--r--cesar/lib/visual_state_api/src/SMPForce.c32
-rw-r--r--cesar/lib/visual_state_api/src/SMPInq.c238
-rw-r--r--cesar/lib/visual_state_api/src/SMPInst.c78
-rw-r--r--cesar/lib/visual_state_api/src/SMPMach.c32
-rw-r--r--cesar/lib/visual_state_api/src/SMPMain.c939
-rw-r--r--cesar/lib/visual_state_api/src/SMPName.c92
-rw-r--r--cesar/lib/visual_state_api/src/SMPNameA.c67
-rw-r--r--cesar/lib/visual_state_api/src/SMPStAll.c36
-rw-r--r--cesar/lib/visual_state_api/src/SMPState.c32
-rw-r--r--cesar/mac/Module1
-rw-r--r--cesar/mac/ca/Module4
-rw-r--r--cesar/mac/ca/ca.h371
-rw-r--r--cesar/mac/ca/inc/access.h28
-rw-r--r--cesar/mac/ca/inc/alloc.h65
-rw-r--r--cesar/mac/ca/inc/backoff.h63
-rw-r--r--cesar/mac/ca/inc/context.h83
-rw-r--r--cesar/mac/ca/inc/mfs.h27
-rw-r--r--cesar/mac/ca/inc/trace.h77
-rw-r--r--cesar/mac/ca/mfs.h26
-rw-r--r--cesar/mac/ca/src/access.c444
-rw-r--r--cesar/mac/ca/src/alloc.c139
-rw-r--r--cesar/mac/ca/src/backoff.c110
-rw-r--r--cesar/mac/ca/src/ca.c190
-rw-r--r--cesar/mac/ca/src/trace.c68
-rw-r--r--cesar/mac/ca/test/ca/Config2
-rw-r--r--cesar/mac/ca/test/ca/Makefile8
-rw-r--r--cesar/mac/ca/test/ca/inc/phy_stub.h23
-rw-r--r--cesar/mac/ca/test/ca/src/phy_stub.c67
-rw-r--r--cesar/mac/ca/test/ca/src/test_access.c375
-rw-r--r--cesar/mac/ca/test/ca/src/test_alloc.c218
-rw-r--r--cesar/mac/ca/test/ca/src/test_backoff.c129
-rw-r--r--cesar/mac/ca/test/ca/src/test_ca.c39
-rw-r--r--cesar/mac/common/Module1
-rw-r--r--cesar/mac/common/config.h64
-rw-r--r--cesar/mac/common/defs.h110
-rw-r--r--cesar/mac/common/mfs.h215
-rw-r--r--cesar/mac/common/nek.h31
-rw-r--r--cesar/mac/common/ntb.h57
-rw-r--r--cesar/mac/common/pb.h87
-rw-r--r--cesar/mac/common/src/config.c32
-rw-r--r--cesar/mac/common/src/mfs.c84
-rw-r--r--cesar/mac/common/src/ntb.c77
-rw-r--r--cesar/mac/common/src/sta.c44
-rw-r--r--cesar/mac/common/src/store.c523
-rw-r--r--cesar/mac/common/src/tonemap.c222
-rw-r--r--cesar/mac/common/src/tonemask.c131
-rw-r--r--cesar/mac/common/sta.h56
-rw-r--r--cesar/mac/common/store.h321
-rw-r--r--cesar/mac/common/test/ntb/Makefile10
-rw-r--r--cesar/mac/common/test/ntb/src/test_ntb.c55
-rw-r--r--cesar/mac/common/test/ntb/src/test_ntb_phy_unstub.c47
-rw-r--r--cesar/mac/common/test/pb/Makefile13
-rw-r--r--cesar/mac/common/test/pb/src/test_pb.c74
-rw-r--r--cesar/mac/common/test/store/Makefile10
-rw-r--r--cesar/mac/common/test/store/override/mac/common/mfs.h71
-rw-r--r--cesar/mac/common/test/store/override/mac/common/sta.h37
-rw-r--r--cesar/mac/common/test/store/src/test_store.c371
-rw-r--r--cesar/mac/common/test/tonemap/Makefile7
-rw-r--r--cesar/mac/common/test/tonemap/src/test_tonemap.c258
-rw-r--r--cesar/mac/common/timings.h159
-rw-r--r--cesar/mac/common/tonemap.h266
-rw-r--r--cesar/mac/common/tonemask.h56
-rw-r--r--cesar/mac/design/test/mfs_tx/Makefile7
-rw-r--r--cesar/mac/design/test/mfs_tx/src/test_mfs.c341
-rw-r--r--cesar/mac/design/test/mfs_tx2/Makefile11
-rw-r--r--cesar/mac/design/test/mfs_tx2/src/test_mfs.c598
-rw-r--r--cesar/mac/design/test/sacki/Makefile21
-rw-r--r--cesar/mac/design/test/sacki/src/sacki_decomp.pl111
-rw-r--r--cesar/mac/design/test/sacki/src/test_sacki.c538
-rw-r--r--cesar/mac/pbproc/Module23
-rw-r--r--cesar/mac/pbproc/inc/context.h136
-rw-r--r--cesar/mac/pbproc/inc/fc.h439
-rw-r--r--cesar/mac/pbproc/inc/fsm.h158
-rw-r--r--cesar/mac/pbproc/inc/fsm_handle_fc.h36
-rw-r--r--cesar/mac/pbproc/inc/fsm_rx_beacon.h44
-rw-r--r--cesar/mac/pbproc/inc/fsm_rx_data.h67
-rw-r--r--cesar/mac/pbproc/inc/fsm_top.h44
-rw-r--r--cesar/mac/pbproc/inc/fsm_tx_data.h89
-rw-r--r--cesar/mac/pbproc/inc/fsm_tx_rts_cts.h51
-rw-r--r--cesar/mac/pbproc/inc/mfs.h31
-rw-r--r--cesar/mac/pbproc/inc/prep_mpdu.h166
-rw-r--r--cesar/mac/pbproc/inc/sacki_dec.h41
-rw-r--r--cesar/mac/pbproc/inc/sacki_enc.h57
-rw-r--r--cesar/mac/pbproc/inc/trace.h71
-rw-r--r--cesar/mac/pbproc/pbproc.h267
-rw-r--r--cesar/mac/pbproc/src/fc.c60
-rw-r--r--cesar/mac/pbproc/src/fsm.c127
-rw-r--r--cesar/mac/pbproc/src/fsm_handle_fc.c138
-rw-r--r--cesar/mac/pbproc/src/fsm_rx_beacon.c96
-rw-r--r--cesar/mac/pbproc/src/fsm_rx_data.c368
-rw-r--r--cesar/mac/pbproc/src/fsm_top.c113
-rw-r--r--cesar/mac/pbproc/src/fsm_tx_data.c251
-rw-r--r--cesar/mac/pbproc/src/fsm_tx_rts_cts.c91
-rw-r--r--cesar/mac/pbproc/src/mfs.c203
-rw-r--r--cesar/mac/pbproc/src/pbproc.c202
-rw-r--r--cesar/mac/pbproc/src/prep_mpdu.c823
-rw-r--r--cesar/mac/pbproc/src/sacki_dec.c111
-rw-r--r--cesar/mac/pbproc/src/sacki_enc.c191
-rw-r--r--cesar/mac/pbproc/src/sacki_tables.py258
-rw-r--r--cesar/mac/pbproc/src/trace.c195
-rw-r--r--cesar/mac/pbproc/test/fc/Makefile32
-rw-r--r--cesar/mac/pbproc/test/fc/src/beacon.txt12
-rwxr-xr-xcesar/mac/pbproc/test/fc/src/generate-check.pl54
-rw-r--r--cesar/mac/pbproc/test/fc/src/generic.txt5
-rw-r--r--cesar/mac/pbproc/test/fc/src/rsof.txt23
-rw-r--r--cesar/mac/pbproc/test/fc/src/rts_cts.txt17
-rw-r--r--cesar/mac/pbproc/test/fc/src/sack.txt18
-rw-r--r--cesar/mac/pbproc/test/fc/src/sof.txt32
-rw-r--r--cesar/mac/pbproc/test/fc/src/sound.txt19
-rw-r--r--cesar/mac/pbproc/test/fc/src/test_fc.c136
-rw-r--r--cesar/mac/pbproc/test/fsm/Makefile8
-rw-r--r--cesar/mac/pbproc/test/fsm/src/test_fsm.c209
-rw-r--r--cesar/mac/pbproc/test/maximus/Config2
-rw-r--r--cesar/mac/pbproc/test/maximus/Makefile10
-rw-r--r--cesar/mac/pbproc/test/maximus/ecos.ecc.sh5
-rw-r--r--cesar/mac/pbproc/test/maximus/inc/add_beacon_period.h23
-rw-r--r--cesar/mac/pbproc/test/maximus/inc/add_seg.h23
-rw-r--r--cesar/mac/pbproc/test/maximus/inc/context.h81
-rw-r--r--cesar/mac/pbproc/test/maximus/inc/get_seg.h31
-rw-r--r--cesar/mac/pbproc/test/maximus/inc/msg.h43
-rw-r--r--cesar/mac/pbproc/test/maximus/inc/prepare_beacon.h23
-rw-r--r--cesar/mac/pbproc/test/maximus/inc/set_tonemap.h23
-rw-r--r--cesar/mac/pbproc/test/maximus/inc/test_pbproc.h55
-rw-r--r--cesar/mac/pbproc/test/maximus/py/host_test_pbproc.py85
-rw-r--r--cesar/mac/pbproc/test/maximus/py/test_coll.py94
-rw-r--r--cesar/mac/pbproc/test/maximus/py/test_pbproc.py63
-rw-r--r--cesar/mac/pbproc/test/maximus/src/add_beacon_period.c101
-rw-r--r--cesar/mac/pbproc/test/maximus/src/add_seg.c111
-rw-r--r--cesar/mac/pbproc/test/maximus/src/get_seg.c104
-rw-r--r--cesar/mac/pbproc/test/maximus/src/prepare_beacon.c98
-rw-r--r--cesar/mac/pbproc/test/maximus/src/set_tonemap.c105
-rw-r--r--cesar/mac/pbproc/test/maximus/src/test_pbproc.c303
-rw-r--r--cesar/mac/pbproc/test/mfs/Makefile9
-rw-r--r--cesar/mac/pbproc/test/mfs/src/test_mfs.c292
-rw-r--r--cesar/mac/pbproc/test/pbproc/Config1
-rw-r--r--cesar/mac/pbproc/test/pbproc/Makefile10
-rw-r--r--cesar/mac/pbproc/test/pbproc/inc/scenario.h152
-rw-r--r--cesar/mac/pbproc/test/pbproc/inc/scenario_defs.h243
-rw-r--r--cesar/mac/pbproc/test/pbproc/inc/test_pbproc.h47
-rw-r--r--cesar/mac/pbproc/test/pbproc/inc/utils.h38
-rw-r--r--cesar/mac/pbproc/test/pbproc/override/hal/phy/inc/context.h51
-rw-r--r--cesar/mac/pbproc/test/pbproc/override/mac/ca/inc/context.h26
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/ca.c129
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/phy.c229
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/prep_mpdu.c575
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/rx_data.c624
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/scenario.c50
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/scenario_defs.c109
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/test_pbproc.c193
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/tx_data.c270
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/utils.c148
-rw-r--r--cesar/mac/pbproc/test/sacki/Makefile10
-rw-r--r--cesar/mac/pbproc/test/sacki/src/test_sacki.c411
-rw-r--r--cesar/mac/sar/Module4
-rw-r--r--cesar/mac/sar/bridgedma/Module1
-rw-r--r--cesar/mac/sar/bridgedma/inc/bridge.h58
-rw-r--r--cesar/mac/sar/bridgedma/src/bridge.c233
-rw-r--r--cesar/mac/sar/doc/sar.odtbin0 -> 359727 bytes
-rw-r--r--cesar/mac/sar/inc/bridge_dma.h75
-rw-r--r--cesar/mac/sar/inc/sar.h199
-rw-r--r--cesar/mac/sar/inc/sar_context.h187
-rw-r--r--cesar/mac/sar/inc/sar_expiration.h162
-rw-r--r--cesar/mac/sar/inc/sar_job_mfs.h49
-rw-r--r--cesar/mac/sar/inc/sar_mf.h75
-rw-r--r--cesar/mac/sar/inc/sar_mfs.h63
-rw-r--r--cesar/mac/sar/inc/sar_pb.h36
-rw-r--r--cesar/mac/sar/inc/trace.h77
-rw-r--r--cesar/mac/sar/sar.h351
-rw-r--r--cesar/mac/sar/sar_mfs_expiration_cb.h24
-rw-r--r--cesar/mac/sar/src/bridge_dma.c155
-rw-r--r--cesar/mac/sar/src/sar.c1751
-rw-r--r--cesar/mac/sar/src/sar_expiration.c459
-rw-r--r--cesar/mac/sar/src/sar_mf.c180
-rw-r--r--cesar/mac/sar/src/sar_mfs.c105
-rw-r--r--cesar/mac/sar/src/sar_pb.c48
-rw-r--r--cesar/mac/sar/src/trace.c73
-rw-r--r--cesar/mac/sar/test/Module2
-rw-r--r--cesar/mac/sar/test/inc/ce.h76
-rw-r--r--cesar/mac/sar/test/inc/eth_packets.h141
-rw-r--r--cesar/mac/sar/test/inc/reassembly_unit_test_functions.h52
-rw-r--r--cesar/mac/sar/test/inc/sar_unit_test_functions.h112
-rw-r--r--cesar/mac/sar/test/maximus_test/Makefile14
-rw-r--r--cesar/mac/sar/test/maximus_test/ecos.ecc.sh104
-rw-r--r--cesar/mac/sar/test/maximus_test/inc/blk_t.h27
-rw-r--r--cesar/mac/sar/test/maximus_test/inc/max_job.h30
-rw-r--r--cesar/mac/sar/test/maximus_test/src/Maximus_sar.cpp431
-rw-r--r--cesar/mac/sar/test/maximus_test/src/Sta_sar.c1187
-rw-r--r--cesar/mac/sar/test/src/ce.c140
-rw-r--r--cesar/mac/sar/test/src/reassembly_unit_test_functions.c304
-rw-r--r--cesar/mac/sar/test/src/sar_unit_test_functions.c100
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/Makefile75
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/ecos.ecc.sh5
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/beacon.c78
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/crc_error.c148
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/lib_sar_expiration.c644
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/lib_sar_mfs.c123
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/msdu-timeout.c108
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/reassembly_complete.c430
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/reassembly_create_mfs.c149
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/reassembly_measurement.c126
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/reassembly_mfs_update_expiration_date.c100
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/reassembly_two_jobs.c236
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/sar_call_back_ul.c179
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/sar_manage_expiration.c808
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/sar_mf_function_test.c148
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/sar_mfs_resising.c268
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/segmentation_complete.c486
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/test-segmentation-provide-pb.c129
-rw-r--r--cesar/mac/sar/test/unit_test/ecos/src/test_store_memory.c46
-rw-r--r--cesar/mac/sar/test/unit_test/host/Makefile17
-rw-r--r--cesar/mac/sar/test/unit_test/host/src/bridgedma_list.c87
-rw-r--r--cesar/mac/sar/test/unit_test/host/src/lib_buffer_address_list.c123
-rw-r--r--cesar/mac/sar/test/unit_test/host/src/lib_sar_mf.c198
-rw-r--r--cesar/mac/sar/test/unit_test/host/src/phy_stub.c24
-rw-r--r--cesar/mac/sar/test/unit_test/host/src/test_store_memory.c44
-rw-r--r--cesar/maximus/Module6
-rw-r--r--cesar/maximus/channel/Module5
-rw-r--r--cesar/maximus/channel/inc/ChannelComputer.h316
-rw-r--r--cesar/maximus/channel/inc/ChannelComputerTest.h40
-rw-r--r--cesar/maximus/channel/inc/ChannelMapping.h198
-rw-r--r--cesar/maximus/channel/inc/ChannelMappingTest.h40
-rw-r--r--cesar/maximus/channel/inc/ChannelPoint.h126
-rw-r--r--cesar/maximus/channel/inc/ChannelPointTest.h34
-rw-r--r--cesar/maximus/channel/inc/ChannelSettings.h204
-rw-r--r--cesar/maximus/channel/inc/ChannelSettingsTest.h38
-rw-r--r--cesar/maximus/channel/inc/IChannel.h164
-rw-r--r--cesar/maximus/channel/src/ChannelComputer.cpp886
-rw-r--r--cesar/maximus/channel/src/ChannelComputerTest.cpp298
-rw-r--r--cesar/maximus/channel/src/ChannelMapping.cpp494
-rw-r--r--cesar/maximus/channel/src/ChannelMappingTest.cpp430
-rw-r--r--cesar/maximus/channel/src/ChannelPoint.cpp156
-rw-r--r--cesar/maximus/channel/src/ChannelPointTest.cpp41
-rw-r--r--cesar/maximus/channel/src/ChannelSettings.cpp229
-rw-r--r--cesar/maximus/channel/src/ChannelSettingsTest.cpp114
-rw-r--r--cesar/maximus/common/interfaces/Maximus.h351
-rw-r--r--cesar/maximus/common/interfaces/Msg.h312
-rw-r--r--cesar/maximus/common/interfaces/Sta.h169
-rw-r--r--cesar/maximus/common/types/channel_types.h56
-rw-r--r--cesar/maximus/common/types/ethernet_types.h87
-rw-r--r--cesar/maximus/common/types/functioncall_types.h79
-rw-r--r--cesar/maximus/common/types/hal_phy_types.h75
-rw-r--r--cesar/maximus/common/types/networkclock_types.h73
-rw-r--r--cesar/maximus/common/types/phy_types.h112
-rw-r--r--cesar/maximus/common/types/sci_types.h117
-rw-r--r--cesar/maximus/common/types/system_types.h69
-rw-r--r--cesar/maximus/coreengine/Module5
-rw-r--r--cesar/maximus/coreengine/inc/CoreEngine.h187
-rw-r--r--cesar/maximus/coreengine/inc/CoreEngineTest.h36
-rw-r--r--cesar/maximus/coreengine/inc/MaximusTest.h68
-rw-r--r--cesar/maximus/coreengine/inc/Msg.tpp117
-rw-r--r--cesar/maximus/coreengine/inc/MsgTest.h58
-rw-r--r--cesar/maximus/coreengine/inc/StaTest.h54
-rw-r--r--cesar/maximus/coreengine/src/CoreEngine.cpp293
-rw-r--r--cesar/maximus/coreengine/src/CoreEngineTest.cpp71
-rw-r--r--cesar/maximus/coreengine/src/Maximus.cpp1289
-rw-r--r--cesar/maximus/coreengine/src/MaximusTest.cpp445
-rw-r--r--cesar/maximus/coreengine/src/Msg.cpp545
-rw-r--r--cesar/maximus/coreengine/src/MsgTest.cpp302
-rw-r--r--cesar/maximus/coreengine/src/Sta.cpp262
-rw-r--r--cesar/maximus/coreengine/src/StaTest.cpp185
-rwxr-xr-xcesar/maximus/doc/fulminata_ecos_specs.odtbin0 -> 53907 bytes
-rwxr-xr-xcesar/maximus/doc/fulminata_general_specs.odtbin0 -> 44544 bytes
-rwxr-xr-xcesar/maximus/doc/fulminata_maximus_architecture.odtbin0 -> 1799405 bytes
-rwxr-xr-xcesar/maximus/doc/fulminata_maximus_architecture.xmi8039
-rwxr-xr-xcesar/maximus/doc/fulminata_maximus_user_guide.odtbin0 -> 256281 bytes
-rwxr-xr-xcesar/maximus/doc/fulminata_maximus_user_guide.xmi950
-rw-r--r--cesar/maximus/ethernet/Module5
-rw-r--r--cesar/maximus/ethernet/inc/EtherSciMsg.h227
-rw-r--r--cesar/maximus/ethernet/inc/EtherSciMsgTest.h60
-rw-r--r--cesar/maximus/ethernet/inc/EthernetProcessor.h169
-rw-r--r--cesar/maximus/ethernet/inc/EthernetProcessorTest.h44
-rw-r--r--cesar/maximus/ethernet/inc/IEthernet.h105
-rw-r--r--cesar/maximus/ethernet/src/EtherSciMsg.cpp372
-rw-r--r--cesar/maximus/ethernet/src/EtherSciMsgTest.cpp225
-rw-r--r--cesar/maximus/ethernet/src/EthernetProcessor.cpp292
-rw-r--r--cesar/maximus/ethernet/src/EthernetProcessorTest.cpp139
-rw-r--r--cesar/maximus/functioncall/Module5
-rw-r--r--cesar/maximus/functioncall/inc/FunctionCallManager.h147
-rw-r--r--cesar/maximus/functioncall/inc/FunctionCallManagerTest.h43
-rw-r--r--cesar/maximus/functioncall/inc/FunctionCallParameter.h167
-rw-r--r--cesar/maximus/functioncall/inc/FunctionCallParameterTest.h40
-rw-r--r--cesar/maximus/functioncall/inc/FunctionSciMsg.h332
-rw-r--r--cesar/maximus/functioncall/inc/FunctionSciMsgTest.h44
-rw-r--r--cesar/maximus/functioncall/inc/IFunctionCall.h116
-rw-r--r--cesar/maximus/functioncall/inc/IFunctionCallTest.h34
-rw-r--r--cesar/maximus/functioncall/src/FunctionCallManager.cpp316
-rw-r--r--cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp128
-rw-r--r--cesar/maximus/functioncall/src/FunctionCallParameter.cpp277
-rw-r--r--cesar/maximus/functioncall/src/FunctionCallParameterTest.cpp162
-rw-r--r--cesar/maximus/functioncall/src/FunctionSciMsg.cpp865
-rw-r--r--cesar/maximus/functioncall/src/FunctionSciMsgTest.cpp206
-rw-r--r--cesar/maximus/functioncall/src/IFunctionCallTest.cpp89
-rw-r--r--cesar/maximus/networkclock/Module5
-rw-r--r--cesar/maximus/networkclock/inc/ClockSciMsg.h212
-rw-r--r--cesar/maximus/networkclock/inc/INetworkClock.h104
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockEvt.h184
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockEvtList.h171
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockEvtListTest.h40
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockEvtTest.h34
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockProcessor.h238
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockProcessorTest.h64
-rw-r--r--cesar/maximus/networkclock/src/ClockSciMsg.cpp399
-rw-r--r--cesar/maximus/networkclock/src/NetworkClockEvt.cpp269
-rw-r--r--cesar/maximus/networkclock/src/NetworkClockEvtList.cpp314
-rw-r--r--cesar/maximus/networkclock/src/NetworkClockEvtListTest.cpp227
-rw-r--r--cesar/maximus/networkclock/src/NetworkClockEvtTest.cpp45
-rw-r--r--cesar/maximus/networkclock/src/NetworkClockProcessor.cpp523
-rw-r--r--cesar/maximus/networkclock/src/NetworkClockProcessorTest.cpp401
-rw-r--r--cesar/maximus/phy/Module5
-rw-r--r--cesar/maximus/phy/inc/IPhy.h234
-rw-r--r--cesar/maximus/phy/inc/PhyProcessor.h512
-rw-r--r--cesar/maximus/phy/inc/PhyProcessorTest.h74
-rw-r--r--cesar/maximus/phy/inc/PhySciMsg.h524
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgFc.h148
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgFcTest.h42
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgMpdu.h290
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgMpduTest.h48
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgNoise.h87
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgNoiseTest.h38
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgPre.h116
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgPreTest.h38
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgTest.h38
-rw-r--r--cesar/maximus/phy/src/PhyProcessor.cpp1530
-rw-r--r--cesar/maximus/phy/src/PhyProcessorTest.cpp583
-rw-r--r--cesar/maximus/phy/src/PhySciMsg.cpp944
-rw-r--r--cesar/maximus/phy/src/PhySciMsgFc.cpp189
-rw-r--r--cesar/maximus/phy/src/PhySciMsgFcTest.cpp131
-rw-r--r--cesar/maximus/phy/src/PhySciMsgMpdu.cpp529
-rw-r--r--cesar/maximus/phy/src/PhySciMsgMpduTest.cpp321
-rw-r--r--cesar/maximus/phy/src/PhySciMsgNoise.cpp86
-rw-r--r--cesar/maximus/phy/src/PhySciMsgNoiseTest.cpp64
-rw-r--r--cesar/maximus/phy/src/PhySciMsgPre.cpp124
-rw-r--r--cesar/maximus/phy/src/PhySciMsgPreTest.cpp72
-rw-r--r--cesar/maximus/phy/src/PhySciMsgTest.cpp77
-rw-r--r--cesar/maximus/python/Makefile9
-rwxr-xr-xcesar/maximus/python/doc/fulminata_maximus_scenario_engine.odtbin0 -> 343674 bytes
-rwxr-xr-xcesar/maximus/python/doc/fulminata_maximus_scenario_engine.xmi1386
-rw-r--r--cesar/maximus/python/lib/cesar/maximus_dur.py97
-rw-r--r--cesar/maximus/python/lib/cesar/sta_cesar.py44
-rw-r--r--cesar/maximus/python/lib/fcVf/__init__.py1
-rw-r--r--cesar/maximus/python/lib/fcVf/crc24/__init__.py1
-rw-r--r--cesar/maximus/python/lib/fcVf/crc24/crc24.py84
-rw-r--r--cesar/maximus/python/lib/fcVf/crc24/crc24_algorithms.py172
-rw-r--r--cesar/maximus/python/lib/fcVf/crc24/pycrc24.py44
-rw-r--r--cesar/maximus/python/lib/fcVf/fcVfFields.py758
-rw-r--r--cesar/maximus/python/lib/framing.py45
-rw-r--r--cesar/maximus/python/lib/macFrame.py122
-rw-r--r--cesar/maximus/python/lib/mmentry/Constants.py317
-rw-r--r--cesar/maximus/python/lib/mmentry/__init__.py1
-rw-r--r--cesar/maximus/python/lib/mmentry/aes128/AES.py31
-rw-r--r--cesar/maximus/python/lib/mmentry/aes128/Python_AES.py68
-rw-r--r--cesar/maximus/python/lib/mmentry/aes128/__init__.py1
-rw-r--r--cesar/maximus/python/lib/mmentry/aes128/compat.py140
-rw-r--r--cesar/maximus/python/lib/mmentry/aes128/cryptomath.py400
-rw-r--r--cesar/maximus/python/lib/mmentry/aes128/rijndael.py392
-rw-r--r--cesar/maximus/python/lib/mmentry/bmi/__init__.py1
-rw-r--r--cesar/maximus/python/lib/mmentry/bmi/bmiBody.py21
-rw-r--r--cesar/maximus/python/lib/mmentry/bmi/bmiMethod.py482
-rw-r--r--cesar/maximus/python/lib/mmentry/encapsulation/__init__.py1
-rw-r--r--cesar/maximus/python/lib/mmentry/encapsulation/encapsulation.py250
-rw-r--r--cesar/maximus/python/lib/mmentry/fid/__init__.py1
-rw-r--r--cesar/maximus/python/lib/mmentry/fid/fidBody.py39
-rw-r--r--cesar/maximus/python/lib/mmentry/fid/fidMethod.py528
-rw-r--r--cesar/maximus/python/lib/mmentry/mmentry.py121
-rw-r--r--cesar/maximus/python/lib/mmentry/mmentryFields.py3258
-rw-r--r--cesar/maximus/python/lib/mmentry/mmentryMethod.py2089
-rw-r--r--cesar/maximus/python/lib/proto/fcall.py349
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/CHANGES.txt171
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/LICENSE.txt61
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/PKG-INFO21
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/README.txt244
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/examples/enhancedserial.py62
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/examples/miniterm.py165
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/examples/scan.py27
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/examples/setup_demo.py35
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/examples/tcp_serial_redirect.py150
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/examples/test.py186
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/examples/test_advanced.py164
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/examples/test_high_load.py67
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/examples/wxSerialConfigDialog.py259
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/examples/wxSerialConfigDialog.wxg262
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/examples/wxTerminal.py332
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/examples/wxTerminal.wxg127
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/serial/__init__.py20
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/serial/serialjava.py212
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/serial/serialposix.py406
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/serial/serialutil.py366
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/serial/serialwin32.py314
-rw-r--r--cesar/maximus/python/lib/proto/pyserial/setup.py38
-rw-r--r--cesar/maximus/python/lib/proto/uspp/AUTHORS4
-rw-r--r--cesar/maximus/python/lib/proto/uspp/Copyright21
-rw-r--r--cesar/maximus/python/lib/proto/uspp/Readme190
-rw-r--r--cesar/maximus/python/lib/proto/uspp/Readme_es199
-rw-r--r--cesar/maximus/python/lib/proto/uspp/SerialPort_darwin.py326
-rw-r--r--cesar/maximus/python/lib/proto/uspp/SerialPort_linux.py329
-rw-r--r--cesar/maximus/python/lib/proto/uspp/SerialPort_win.py239
-rw-r--r--cesar/maximus/python/lib/proto/uspp/lesser.txt504
-rw-r--r--cesar/maximus/python/lib/proto/uspp/uspp.htm635
-rw-r--r--cesar/maximus/python/lib/proto/uspp/uspp.py193
-rw-r--r--cesar/maximus/python/lib/proto/uspp/uspp_es.htm629
-rw-r--r--cesar/maximus/python/lib/script.py173
-rwxr-xr-xcesar/maximus/python/lib/station/test_tx_rx.elfbin0 -> 966377 bytes
-rw-r--r--cesar/maximus/python/maximus/__init__.py16
-rw-r--r--cesar/maximus/python/maximus/channel/__init__.py7
-rw-r--r--cesar/maximus/python/maximus/channel/snr.py52
-rw-r--r--cesar/maximus/python/maximus/cli/__init__.py5
-rw-r--r--cesar/maximus/python/maximus/ethernet/__init__.py10
-rw-r--r--cesar/maximus/python/maximus/ethernet/buffer.py189
-rw-r--r--cesar/maximus/python/maximus/ethernet/create.py22
-rw-r--r--cesar/maximus/python/maximus/ethernet/eth.py109
-rw-r--r--cesar/maximus/python/maximus/ethernet/scapy.py13244
-rw-r--r--cesar/maximus/python/maximus/ethernet/sniffer.py128
-rw-r--r--cesar/maximus/python/maximus/fsm/FSM.py263
-rw-r--r--cesar/maximus/python/maximus/fsm/__init__.py7
-rw-r--r--cesar/maximus/python/maximus/macframe/__init__.py13
-rw-r--r--cesar/maximus/python/maximus/macframe/create.py10
-rw-r--r--cesar/maximus/python/maximus/macframe/fc_10.py135
-rw-r--r--cesar/maximus/python/maximus/macframe/fc_av.py173
-rw-r--r--cesar/maximus/python/maximus/macframe/macframe.py252
-rw-r--r--cesar/maximus/python/maximus/macframe/macframeheader.py80
-rw-r--r--cesar/maximus/python/maximus/macframe/macframequeue.py90
-rw-r--r--cesar/maximus/python/maximus/macframe/mpdu.py187
-rw-r--r--cesar/maximus/python/maximus/macframe/msdu.py66
-rw-r--r--cesar/maximus/python/maximus/macframe/pb.py59
-rw-r--r--cesar/maximus/python/maximus/macframe/pbheader.py95
-rw-r--r--cesar/maximus/python/maximus/mme/__init__.py10
-rw-r--r--cesar/maximus/python/maximus/mme/create.py10
-rw-r--r--cesar/maximus/python/maximus/mme/mme.py130
-rw-r--r--cesar/maximus/python/maximus/mme/mmentry.py33
-rw-r--r--cesar/maximus/python/maximus/mme/mmheader.py298
-rw-r--r--cesar/maximus/python/maximus/mme/mmtype.py20
-rw-r--r--cesar/maximus/python/maximus/result/__init__.py5
-rw-r--r--cesar/maximus/python/maximus/simu/__init__.py8
-rw-r--r--cesar/maximus/python/maximus/simu/rx.py136
-rw-r--r--cesar/maximus/python/maximus/simu/tx.py9
-rw-r--r--cesar/maximus/python/maximus/station/__init__.py8
-rw-r--r--cesar/maximus/python/maximus/station/config.py98
-rw-r--r--cesar/maximus/python/maximus/station/sta.py1052
-rw-r--r--cesar/maximus/python/maximus/utils/__init__.py10
-rw-r--r--cesar/maximus/python/maximus/utils/converter.py106
-rw-r--r--cesar/maximus/python/maximus/utils/crc.py102
-rw-r--r--cesar/maximus/python/maximus/utils/exception.py21
-rw-r--r--cesar/maximus/python/maximus/utils/format.py263
-rw-r--r--cesar/maximus/python/py/script_example.py140
-rw-r--r--cesar/maximus/python/py/test_cb.py84
-rw-r--r--cesar/maximus/python/py/test_ether.py227
-rw-r--r--cesar/maximus/python/py/test_false_alarm.py74
-rw-r--r--cesar/maximus/python/py/test_send_mpdu.py158
-rw-r--r--cesar/maximus/python/py/test_send_noise.py86
-rw-r--r--cesar/maximus/python/py/test_tx_rx.py217
-rw-r--r--cesar/maximus/python/src/interface_module.cpp745
-rwxr-xr-xcesar/maximus/python/test/startup.py29
-rw-r--r--cesar/maximus/python/test/test.txt94
-rw-r--r--cesar/maximus/python/test/test_channel.py80
-rw-r--r--cesar/maximus/python/test/test_cli.py26
-rw-r--r--cesar/maximus/python/test/test_ethernet.py489
-rw-r--r--cesar/maximus/python/test/test_fsm.py75
-rw-r--r--cesar/maximus/python/test/test_interface.py461
-rw-r--r--cesar/maximus/python/test/test_lib_cesar.py330
-rw-r--r--cesar/maximus/python/test/test_lib_proto.py376
-rw-r--r--cesar/maximus/python/test/test_macframe.py547
-rw-r--r--cesar/maximus/python/test/test_maximus.py47
-rw-r--r--cesar/maximus/python/test/test_mme.py304
-rw-r--r--cesar/maximus/python/test/test_result.py26
-rw-r--r--cesar/maximus/python/test/test_simu.py120
-rw-r--r--cesar/maximus/python/test/test_station.py268
-rw-r--r--cesar/maximus/python/test/test_utils.py107
-rw-r--r--cesar/maximus/sci/Module5
-rw-r--r--cesar/maximus/sci/inc/ISci.h143
-rw-r--r--cesar/maximus/sci/inc/SciMsg.h333
-rw-r--r--cesar/maximus/sci/inc/SciMsgTest.h50
-rw-r--r--cesar/maximus/sci/inc/SciServer.h248
-rw-r--r--cesar/maximus/sci/inc/SciServerTest.h62
-rw-r--r--cesar/maximus/sci/src/SciMsg.cpp711
-rw-r--r--cesar/maximus/sci/src/SciMsgTest.cpp129
-rw-r--r--cesar/maximus/sci/src/SciServer.cpp1005
-rw-r--r--cesar/maximus/sci/src/SciServerTest.cpp510
-rw-r--r--cesar/maximus/stationtest/Config2
-rw-r--r--cesar/maximus/stationtest/Makefile47
-rw-r--r--cesar/maximus/stationtest/ecos.ecc.sh104
-rw-r--r--cesar/maximus/stationtest/src/exception.c74
-rw-r--r--cesar/maximus/stationtest/src/hello_world.c28
-rw-r--r--cesar/maximus/stationtest/src/main_example.c392
-rw-r--r--cesar/maximus/stationtest/src/one_thread.c47
-rw-r--r--cesar/maximus/stationtest/src/test_cb.c41
-rw-r--r--cesar/maximus/stationtest/src/test_ether.c143
-rw-r--r--cesar/maximus/stationtest/src/test_false_alarm.c158
-rw-r--r--cesar/maximus/stationtest/src/test_lib_cesar.c93
-rw-r--r--cesar/maximus/stationtest/src/test_send.c231
-rw-r--r--cesar/maximus/stationtest/src/test_station.c91
-rw-r--r--cesar/maximus/stationtest/src/test_tx_rx.c339
-rw-r--r--cesar/maximus/stationtest/src/threaddelay.c50
-rw-r--r--cesar/maximus/system/Module5
-rw-r--r--cesar/maximus/system/inc/ISystem.h158
-rw-r--r--cesar/maximus/system/inc/Station.h233
-rw-r--r--cesar/maximus/system/inc/StationConfiguration.h130
-rw-r--r--cesar/maximus/system/inc/StationConfigurationTest.h34
-rw-r--r--cesar/maximus/system/inc/StationTest.h34
-rw-r--r--cesar/maximus/system/inc/SystemManager.h229
-rw-r--r--cesar/maximus/system/inc/SystemManagerTest.h52
-rw-r--r--cesar/maximus/system/inc/SystemSciMsg.h170
-rw-r--r--cesar/maximus/system/inc/SystemSciMsgTest.h38
-rw-r--r--cesar/maximus/system/src/Station.cpp555
-rw-r--r--cesar/maximus/system/src/StationConfiguration.cpp142
-rw-r--r--cesar/maximus/system/src/StationConfigurationTest.cpp51
-rw-r--r--cesar/maximus/system/src/StationTest.cpp61
-rw-r--r--cesar/maximus/system/src/SystemManager.cpp546
-rw-r--r--cesar/maximus/system/src/SystemManagerTest.cpp202
-rw-r--r--cesar/maximus/system/src/SystemSciMsg.cpp285
-rw-r--r--cesar/maximus/system/src/SystemSciMsgTest.cpp108
-rwxr-xr-xcesar/maximus/test/test.sh71
-rwxr-xr-xcesar/maximus/test/test_python.sh110
-rw-r--r--cesar/maximus/unittest/Makefile12
-rw-r--r--cesar/maximus/unittest/src/main.cpp99
-rw-r--r--cesar/maximus/usertest/Makefile7
-rw-r--r--cesar/maximus/usertest/src/main_example.cpp166
-rw-r--r--cesar/maximus/utils/Module5
-rw-r--r--cesar/maximus/utils/inc/Error.h36
-rw-r--r--cesar/maximus/utils/inc/ErrorTest.h34
-rw-r--r--cesar/maximus/utils/inc/Logger.h104
-rw-r--r--cesar/maximus/utils/inc/LoggerTest.h34
-rw-r--r--cesar/maximus/utils/src/Error.cpp27
-rw-r--r--cesar/maximus/utils/src/ErrorTest.cpp46
-rw-r--r--cesar/maximus/utils/src/Logger.cpp130
-rw-r--r--cesar/maximus/utils/src/LoggerTest.cpp39
-rw-r--r--cesar/test_general/ecos/Makefile41
-rw-r--r--cesar/test_general/ecos/Makefile_debug26
-rwxr-xr-xcesar/test_general/ecos/compile.sh9
-rw-r--r--cesar/test_general/ecos/ecos.ecc.sh5
-rw-r--r--cesar/test_general/ecos/leon2.cfg14
-rw-r--r--cesar/test_general/ecos/src/bentry.c81
-rw-r--r--cesar/test_general/ecos/src/exception.c72
-rw-r--r--cesar/test_general/ecos/src/hello_world.c22
-rw-r--r--cesar/test_general/ecos/src/interrupt.c101
-rw-r--r--cesar/test_general/ecos/src/mesbox.c91
-rw-r--r--cesar/test_general/ecos/src/mutex.c105
-rw-r--r--cesar/test_general/ecos/src/one_thread.c51
-rw-r--r--cesar/test_general/ecos/src/pci_int.c130
-rw-r--r--cesar/test_general/ecos/src/threaddelay.c50
-rw-r--r--cesar/test_general/ecos/src/timer_int.c137
-rw-r--r--cesar/test_general/ecos/src/two_thread.c79
-rw-r--r--cesar/test_general/integration/cl-sar-pbproc/Makefile13
-rw-r--r--cesar/test_general/integration/cl-sar-pbproc/ecos.ecc.sh5
-rw-r--r--cesar/test_general/integration/cl-sar-pbproc/src/Maximus.py193
-rw-r--r--cesar/test_general/integration/cl-sar-pbproc/src/ipmbox.c46
-rw-r--r--cesar/test_general/integration/cl-sar-pbproc/src/station.c1058
-rw-r--r--cesar/test_general/integration/cp_beacon-dp/Makefile18
-rw-r--r--cesar/test_general/integration/cp_beacon-dp/cco_alone.py55
-rw-r--r--cesar/test_general/integration/cp_beacon-dp/cco_with_sta.py94
-rw-r--r--cesar/test_general/integration/cp_beacon-dp/ecos.ecc.sh5
-rw-r--r--cesar/test_general/integration/cp_beacon-dp/src/max.py131
-rw-r--r--cesar/test_general/integration/cp_beacon-dp/src/max_ucco.py131
-rw-r--r--cesar/test_general/integration/cp_beacon-dp/src/station.c369
-rw-r--r--cesar/test_general/integration/cp_beacon-dp/ucco_alone.py28
-rw-r--r--cesar/test_general/integration/cp_beacon-dp/ucco_with_sta.py40
-rw-r--r--cesar/test_general/integration/hle-cl-sar-pbproc/Makefile12
-rw-r--r--cesar/test_general/integration/hle-cl-sar-pbproc/ecos.ecc.sh5
-rw-r--r--cesar/test_general/integration/hle-cl-sar-pbproc/src/Maximus.py187
-rw-r--r--cesar/test_general/integration/hle-cl-sar-pbproc/src/station.c1208
-rw-r--r--cesar/test_general/integration/interface-dp/Makefile12
-rw-r--r--cesar/test_general/integration/interface-dp/ecos.ecc.sh5
-rw-r--r--cesar/test_general/integration/interface-dp/src/station.c619
-rw-r--r--cesar/test_general/integration/interface-dp/test1.py280
-rw-r--r--cesar/test_general/integration/ipmbox-hle-cl-sar-pbproc/Makefile12
-rw-r--r--cesar/test_general/integration/ipmbox-hle-cl-sar-pbproc/ecos.ecc.sh5
-rw-r--r--cesar/test_general/integration/ipmbox-hle-cl-sar-pbproc/src/Maximus.py209
-rw-r--r--cesar/test_general/integration/ipmbox-hle-cl-sar-pbproc/src/Maximus_mme.py213
-rw-r--r--cesar/test_general/integration/ipmbox-hle-cl-sar-pbproc/src/station.c991
-rw-r--r--cesar/test_general/integration/packet_maxbin0 -> 1500 bytes
-rw-r--r--cesar/test_general/integration/sar-pbproc/Makefile13
-rw-r--r--cesar/test_general/integration/sar-pbproc/ecos.ecc.sh5
-rw-r--r--cesar/test_general/integration/sar-pbproc/src/Maximus.py121
-rw-r--r--cesar/test_general/integration/sar-pbproc/src/station.c956
-rw-r--r--cesar/test_general/integration/station-cp-dp/Makefile15
-rw-r--r--cesar/test_general/integration/station-cp-dp/ecos.ecc.sh5
-rw-r--r--cesar/test_general/integration/station-cp-dp/src/Maximus.py417
-rw-r--r--cesar/test_general/integration/station-cp-dp/src/Maximus_3_stations.py441
-rw-r--r--cesar/test_general/integration/station-cp-dp/src/station-cp-dp.c401
-rw-r--r--cesar/test_general/packet1bin0 -> 106 bytes
-rwxr-xr-xcesar/test_general/proto_gaisler/Makefile21
-rw-r--r--cesar/test_general/proto_gaisler/cache/Makefile37
-rw-r--r--cesar/test_general/proto_gaisler/cache/cache.c90
-rw-r--r--cesar/test_general/proto_gaisler/define_spoc_c.h19
-rw-r--r--cesar/test_general/proto_gaisler/src/test_cp_spoc.c56
-rw-r--r--cesar/test_general/proto_gaisler/src/test_speed.c68
-rw-r--r--cesar/test_general/proto_gaisler/src/test_spoc.c97
-rw-r--r--cesar/test_general/proto_gaisler/src/test_spoc_opt.c336
-rw-r--r--cesar/test_general/station/Module1
-rw-r--r--cesar/test_general/station/inc/int_context.h97
-rw-r--r--cesar/test_general/station/int_station.h117
-rw-r--r--cesar/test_general/station/int_station_fc.h154
-rw-r--r--cesar/test_general/station/overide/cp/cco/Module1
-rw-r--r--cesar/test_general/station/overide/cp/cco/cco.h123
-rw-r--r--cesar/test_general/station/overide/cp/cco/inc/context.h46
-rw-r--r--cesar/test_general/station/overide/cp/cco/src/cco.c281
-rw-r--r--cesar/test_general/station/overide/cp/secu/Module1
-rw-r--r--cesar/test_general/station/overide/cp/secu/inc/context.h24
-rw-r--r--cesar/test_general/station/overide/cp/secu/secu.h58
-rw-r--r--cesar/test_general/station/overide/cp/secu/src/secu.c74
-rw-r--r--cesar/test_general/station/overide/cp/station/Module1
-rw-r--r--cesar/test_general/station/overide/cp/station/inc/context.h39
-rw-r--r--cesar/test_general/station/overide/cp/station/src/station.c243
-rw-r--r--cesar/test_general/station/overide/cp/station/station.h183
-rw-r--r--cesar/test_general/station/src/int_station.c736
2943 files changed, 876836 insertions, 0 deletions
diff --git a/cesar/VisualState/Project1.___ b/cesar/VisualState/Project1.___
new file mode 100644
index 0000000000..7a6c58de49
--- /dev/null
+++ b/cesar/VisualState/Project1.___
@@ -0,0 +1,117 @@
+[Header]
+Filetype=visualSTATE Validator workspace
+Revision=2
+[ProjectSetup]
+ProjectFile=Project1.vsp
+AutoQueue=FALSE
+TimerMsg=TRUE
+PromptActions=TRUE
+main_fsm=00000000010000000000000001
+main_fsm_RL=0000000001000000FFFFFFFFFD
+sta_connection=01000000010000000000000002
+sta_connection_RL=0100000001000000FFFFFFFFFE
+NofBreakPoints=0
+[RealLink Setup]
+Plugin Module=
+Timeout=1852731203
+[Altia Properties]
+Timeout=8000
+Arguments=-xrm Altia*AltiaScene*background:#f7e400
+ResetAtConnect=1
+ResetOnReset=1
+[Altia Event Parameters]
+main_fsm.CCO_TO_UCCO=0
+main_fsm.BEACON_DETECTED=0
+main_fsm.SC_JOIN=0
+main_fsm.CCO_TO_STA=0
+sta_connection.CONNECTION_REQUEST_REFUSED=0
+main_fsm.STA_TO_POND=0
+main_fsm.SC_ADD=0
+main_fsm.AUTHENTIFIE_STA=0
+main_fsm.TO_HANDOVER_IN_PROGRESS=0
+main_fsm.BECOME_PCO=0
+main_fsm.TO_HANDOVER=0
+sta_connection.CONNECTION_REQUEST_ACCEPTED=0
+SE_RESET=0
+main_fsm.BECOME_BACKUP_CCO=0
+main_fsm.HANDOVER_DONE=0
+sta_connection.NEW_CONNECTION=0
+main_fsm.BEACON_TIMER_EXPIRES=0
+main_fsm.LEAVE_BACKUP_CCO=0
+main_fsm.TO_CCO=0
+main_fsm.LEAVE_PCO=0
+main_fsm.USTT_EXPIRES=0
+main_fsm.UNAUTHENTIFIE_STA=0
+main_fsm.POND_TO_STA=0
+main_fsm.POND_TO_UCCO=0
+main_fsm.TO_USTA=0
+main_fsm.SC_TIMER_EXPIRES=0
+sta_connection.CLOSE_CONNECTION=0
+main_fsm.BBT_EXPIRES=0
+[Altia Action Parameters]
+main_fsm.launch_ustt_timer=0
+main_fsm.station_bbt_expires=0
+main_fsm.init_system=0
+main_fsm.transmit_unassoc_sta_mme=0
+main_fsm.launch_beacon_timer=0
+main_fsm.launch_bbt_timer=0
+[Trace Setup]
+Trace To=
+Trace Output=
+[Windows]
+nofSystemWnds=0
+nofEventWnds=0
+nofVariableWnds=0
+nofGuardWnds=0
+nofActionWnds=0
+nofSignalWnds=0
+nofTSF=0
+nofDynamicAnalyzeWnds=0
+nofStaticAnalyzeWnds=0
+[SystemWnd_0]
+WindowPlacement=2C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA6010000000000004C030000C9010000DD
+RealLink View=Off
+NofTrees=3
+Tree_0_System=main_fsm
+Tree_0_Topstate=Station
+Tree_1_System=sta_connection[0]
+Tree_1_Topstate=Topstate1
+Tree_2_System=sta_connection[1]
+Tree_2_Topstate=Topstate1
+OnlyCurrent=False
+ShowPrevious=False
+[EventWnd_0]
+WindowPlacement=2C0000000000000001000000FFFFFFFFFFFFFFFFFAFFFFFFE0FFFFFF0000000000000000A6010000C90100006A
+RealLink View=Off
+nofColumns=3
+ColumnData_0=00000000610100000100000063
+ColumnData_1=01000000640000000000000065
+ColumnData_2=02000000640000000100000067
+View Active Events=False
+Include Guards=True
+Global=Show
+main_fsm=Show
+sta_connection=Show
+Number of hidden Events=0
+[Test Sequence File 0]
+WindowPlacement=2C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2C0000003A000000780400002F02000030
+RealLink View=Off
+CommandColumn=100
+SystemColumn=100
+FileName=Test_ALL.vlg
+ShowStepOutput=True
+Check states=TRUE
+Check actions=TRUE
+Check signals=TRUE
+Check variables=TRUE
+[ActionWnd_0]
+WindowPlacement=2C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4C03000000000000F2040000C90100002C
+RealLink View=Off
+nofColumns=2
+ColumnData_0=00000000940000000100000095
+ColumnData_1=01000000640000000100000066
+[DynamicAnalyzeWnd_0]
+WindowPlacement=2C0000000200000003000000FFFFFFFFFFFFFFFFFAFFFFFFE0FFFFFF5800000074000000F80400009E01000064
+RealLink View=Off
+[Watch Window]
+Number of items=0
diff --git a/cesar/VisualState/Project1.vdg b/cesar/VisualState/Project1.vdg
new file mode 100644
index 0000000000..406e84f477
--- /dev/null
+++ b/cesar/VisualState/Project1.vdg
Binary files differ
diff --git a/cesar/VisualState/Project1.vdi b/cesar/VisualState/Project1.vdi
new file mode 100644
index 0000000000..86a4bb09f9
--- /dev/null
+++ b/cesar/VisualState/Project1.vdi
Binary files differ
diff --git a/cesar/VisualState/Project1.vsp b/cesar/VisualState/Project1.vsp
new file mode 100644
index 0000000000..43f2ee0178
--- /dev/null
+++ b/cesar/VisualState/Project1.vsp
@@ -0,0 +1,62 @@
+@visualSTATE @Project @Format2 "cesar_cp"
+
+@SCCInfo
+ @Provider = "",
+ @Project = "",
+ @LocalPath = ".",
+ @AuxPath = "";
+
+@Directives
+
+ @visualSTATE 5-4-0-1273;
+ @Date 2008-02-15;
+ @Time 16:05:36;
+ [[ Colors = "0X000000 0X0000FF 0X00FF00 0XFF0000 0X00FFFF 0XFF00FF 0XFFFF00 0XFFFFFF 0X000080 0X008000 0X800000 0X008080 0X800080 0X808000 0XC0C0C0 0X808080"
+ , DropSignalQueueIfFull = "0", FontEx1 = "-13 400 0 255 \"Arial\"",
+ FontEx2 = "-13 700 0 255 \"Arial\"", FontEx3 = "-11 400 0 255 \"Arial\"",
+ FontEx4 = "-11 700 0 255 \"Arial\"",
+ FontEx5 = "-13 400 0 255 \"Times New Roman\"",
+ FontEx6 = "-13 700 0 255 \"Times New Roman\"",
+ FontEx7 = "-11 400 0 255 \"Times New Roman\"",
+ FontEx8 = "-11 700 0 255 \"Times New Roman\"",
+ FooterLayout = "12 -13 400 0 \"Times New Roman\"", FooterLeft = "&FN",
+ FooterRight = "&PN", HeaderCenter = "&NF",
+ HeaderLayout = "12 -13 400 0 \"Times New Roman\"",
+ PageLayout = "0 1 210 297 0 0 0 0",
+ PrintSpecial = "1 -13 400 0 \"Times New Roman\"",
+ Resolution = "3.779528 3.779528", TextDisplayNote = "Preserve",
+ TextDisplayState = "Preserve", TextDisplayTransDesc = "Preserve",
+ View = "2 2 7" ]]
+
+
+@System
+ main_fsm
+ [[ NOF_INSTANCES = "1", Pos440 = "10 10 130 130 1835010",
+ SIGNAL_QUEUE_LENGTH = "0",
+ SystemGUID = "77CDBDA0-BC60-44CE-90E0-EDECD2933227",
+ TextDisplayNote = "Preserve", TextDisplayState = "Preserve",
+ TextDisplayTransDesc = "Preserve", View = "2 2 7" ]]
+
+ @File
+ File0 = ".\\sub\\Topstate1.vsr";
+
+ @End,
+
+ sta_connection
+ [[ NOF_INSTANCES = "18", Pos440 = "10 140 130 260 1835010",
+ SIGNAL_QUEUE_LENGTH = "0",
+ SystemGUID = "C5AB0370-4DF9-4B0F-BE31-988D2E6683F6",
+ TextDisplayNote = "Preserve", TextDisplayState = "Preserve",
+ TextDisplayTransDesc = "Preserve", View = "2 2 7" ]]
+
+ @File
+ File0 = ".\\Topstate2.vsr";
+
+ @End;
+
+
+@Declaration
+
+
+@Definition
+
diff --git a/cesar/VisualState/Project1.vtg b/cesar/VisualState/Project1.vtg
new file mode 100644
index 0000000000..a76335f694
--- /dev/null
+++ b/cesar/VisualState/Project1.vtg
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Configurations CoderOptionsVersion="7">
+
+ <Configuration name="Default">
+ <Tag name="CODER_CMDLINE" value="-api_type1#-api_version4#-cspylink0#-reallinkmode0#-expertDLL0#-cpp0#-warnings_are_errors0#-warnings_affect_exit_code0#-no_warnings0#-limitedlicense#-pathcoder\#-Rvscoder.cre#-geventh$(PRJNAME)_PEvent.h#-gextvarh$(PRJNAME)_PExtVar.h#-gextvarc$(PRJNAME)_PExtVar.c#-G$(PRJNAME)_PConstant.h#-rdfmO#-DO#-iev1#-iiv1#-iss0#-funcexph0#-osm1#-useegti0#-gdef0#-gds0#-useheap1#-tsemt1#-tvsvt1#-c51vs_prj0#-kw_context#-kw_prj_extvar#-c51cs_prj0#-kw_corelogic#-kw_guardexpr#-kw_actionexpr#-kw_runtimeinfo#-kw_rlpd#-userlkw0#-kw_rld#-kw_rlcd#-kw_rlec1"/>
+ <System uid="77CDBDA0-BC60-44CE-90E0-EDECD2933227">
+ <Tag name="CODER_CMDLINE" value="-usepop1#-spathX:\Cesare\cp\fsm_vstate\main_fsm\#-H$(SYSNAME).h#-S$(SYSNAME).c#-L$(SYSNAME)Data.h#-K$(SYSNAME)Data.c#-A$(SYSNAME)Action.h#-F#-extvarh#-extvarc#-M#-B$(SYSNAME).sld#-sysrdfmO#-sysdwO#-constcml1#-constguardfpt1#-constactionfpt1#-og0#-oa0#-useguardtypecast1#-useautovariables1#-struct$(SYSNAME)#-NMainVSAction#-c51vs_sys0#-kw_sys_extvar#-kw_intvar#-kw_dbdata#-txte0#-sne1#-txts0#-sns0#-txta0#-sna0#-snm0#-useapiprefix1#-apiprefix$(SYSNAME)#-semexpl0#-semexplabs0#-semforcestate0#-semgetinputall0#-semgetoutputall0#-seminitall1#-seminquiry0#-semmachine0#-semname0#-semnameabs0#-semnextstatechg0#-semsignalqueueinfo0#-semstate0#-semstateall0#-classname$(SYSNAME)#-removevsnofmacros1#-fullinstrumentation1#-usetracebuffer1#-tracebuffersize2#-targetbreakpoints0"/>
+ <Tag name="VERIFICATOR_CMDLINE" value=""/>
+ </System>
+ <System uid="C5AB0370-4DF9-4B0F-BE31-988D2E6683F6">
+ <Tag name="CODER_CMDLINE" value="-usepop1#-spathX:\Cesare\cp\fsm_vstate\sta_connection_fsm\#-H$(SYSNAME).h#-S$(SYSNAME).c#-L$(SYSNAME)Data.h#-K$(SYSNAME)Data.c#-A$(SYSNAME)Action.h#-F#-extvarh#-extvarc#-M#-B$(SYSNAME).sld#-sysrdfmO#-sysdwO#-constcml1#-constguardfpt1#-constactionfpt1#-og0#-oa0#-useguardtypecast1#-useautovariables1#-struct$(SYSNAME)#-NSTA_ConnectionVSAction#-c51vs_sys0#-kw_sys_extvar#-kw_intvar#-kw_dbdata#-txte0#-sne1#-txts0#-sns0#-txta0#-sna0#-snm0#-useapiprefix1#-apiprefix$(SYSNAME)#-semexpl0#-semexplabs0#-semforcestate0#-semgetinputall0#-semgetoutputall0#-seminitall0#-seminquiry0#-semmachine0#-semname0#-semnameabs0#-semnextstatechg0#-semsignalqueueinfo0#-semstate0#-semstateall0#-classname$(SYSNAME)#-removevsnofmacros1#-fullinstrumentation1#-usetracebuffer1#-tracebuffersize2#-targetbreakpoints0"/>
+ <Tag name="VERIFICATOR_CMDLINE" value=""/>
+ </System>
+ </Configuration>
+
+</Configurations>
diff --git a/cesar/VisualState/Project1.vws b/cesar/VisualState/Project1.vws
new file mode 100644
index 0000000000..7a6c58de49
--- /dev/null
+++ b/cesar/VisualState/Project1.vws
@@ -0,0 +1,117 @@
+[Header]
+Filetype=visualSTATE Validator workspace
+Revision=2
+[ProjectSetup]
+ProjectFile=Project1.vsp
+AutoQueue=FALSE
+TimerMsg=TRUE
+PromptActions=TRUE
+main_fsm=00000000010000000000000001
+main_fsm_RL=0000000001000000FFFFFFFFFD
+sta_connection=01000000010000000000000002
+sta_connection_RL=0100000001000000FFFFFFFFFE
+NofBreakPoints=0
+[RealLink Setup]
+Plugin Module=
+Timeout=1852731203
+[Altia Properties]
+Timeout=8000
+Arguments=-xrm Altia*AltiaScene*background:#f7e400
+ResetAtConnect=1
+ResetOnReset=1
+[Altia Event Parameters]
+main_fsm.CCO_TO_UCCO=0
+main_fsm.BEACON_DETECTED=0
+main_fsm.SC_JOIN=0
+main_fsm.CCO_TO_STA=0
+sta_connection.CONNECTION_REQUEST_REFUSED=0
+main_fsm.STA_TO_POND=0
+main_fsm.SC_ADD=0
+main_fsm.AUTHENTIFIE_STA=0
+main_fsm.TO_HANDOVER_IN_PROGRESS=0
+main_fsm.BECOME_PCO=0
+main_fsm.TO_HANDOVER=0
+sta_connection.CONNECTION_REQUEST_ACCEPTED=0
+SE_RESET=0
+main_fsm.BECOME_BACKUP_CCO=0
+main_fsm.HANDOVER_DONE=0
+sta_connection.NEW_CONNECTION=0
+main_fsm.BEACON_TIMER_EXPIRES=0
+main_fsm.LEAVE_BACKUP_CCO=0
+main_fsm.TO_CCO=0
+main_fsm.LEAVE_PCO=0
+main_fsm.USTT_EXPIRES=0
+main_fsm.UNAUTHENTIFIE_STA=0
+main_fsm.POND_TO_STA=0
+main_fsm.POND_TO_UCCO=0
+main_fsm.TO_USTA=0
+main_fsm.SC_TIMER_EXPIRES=0
+sta_connection.CLOSE_CONNECTION=0
+main_fsm.BBT_EXPIRES=0
+[Altia Action Parameters]
+main_fsm.launch_ustt_timer=0
+main_fsm.station_bbt_expires=0
+main_fsm.init_system=0
+main_fsm.transmit_unassoc_sta_mme=0
+main_fsm.launch_beacon_timer=0
+main_fsm.launch_bbt_timer=0
+[Trace Setup]
+Trace To=
+Trace Output=
+[Windows]
+nofSystemWnds=0
+nofEventWnds=0
+nofVariableWnds=0
+nofGuardWnds=0
+nofActionWnds=0
+nofSignalWnds=0
+nofTSF=0
+nofDynamicAnalyzeWnds=0
+nofStaticAnalyzeWnds=0
+[SystemWnd_0]
+WindowPlacement=2C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA6010000000000004C030000C9010000DD
+RealLink View=Off
+NofTrees=3
+Tree_0_System=main_fsm
+Tree_0_Topstate=Station
+Tree_1_System=sta_connection[0]
+Tree_1_Topstate=Topstate1
+Tree_2_System=sta_connection[1]
+Tree_2_Topstate=Topstate1
+OnlyCurrent=False
+ShowPrevious=False
+[EventWnd_0]
+WindowPlacement=2C0000000000000001000000FFFFFFFFFFFFFFFFFAFFFFFFE0FFFFFF0000000000000000A6010000C90100006A
+RealLink View=Off
+nofColumns=3
+ColumnData_0=00000000610100000100000063
+ColumnData_1=01000000640000000000000065
+ColumnData_2=02000000640000000100000067
+View Active Events=False
+Include Guards=True
+Global=Show
+main_fsm=Show
+sta_connection=Show
+Number of hidden Events=0
+[Test Sequence File 0]
+WindowPlacement=2C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2C0000003A000000780400002F02000030
+RealLink View=Off
+CommandColumn=100
+SystemColumn=100
+FileName=Test_ALL.vlg
+ShowStepOutput=True
+Check states=TRUE
+Check actions=TRUE
+Check signals=TRUE
+Check variables=TRUE
+[ActionWnd_0]
+WindowPlacement=2C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4C03000000000000F2040000C90100002C
+RealLink View=Off
+nofColumns=2
+ColumnData_0=00000000940000000100000095
+ColumnData_1=01000000640000000100000066
+[DynamicAnalyzeWnd_0]
+WindowPlacement=2C0000000200000003000000FFFFFFFFFFFFFFFFFAFFFFFFE0FFFFFF5800000074000000F80400009E01000064
+RealLink View=Off
+[Watch Window]
+Number of items=0
diff --git a/cesar/VisualState/Test_ALL.vlg b/cesar/VisualState/Test_ALL.vlg
new file mode 100644
index 0000000000..ac2f871ebc
--- /dev/null
+++ b/cesar/VisualState/Test_ALL.vlg
@@ -0,0 +1,2230 @@
+/*****************************************************************************
+* visualSTATE Validator Test Sequence File, Format 2.2
+* Generated by visualSTATE Validator 5.4.0.1273
+* Trace: No
+* Additional modules: visualSTATE VSLFx 5.4.0.1273
+* Time: 2007-11-19 10:17:34
+* visualSTATE Project File: <Project1.vsp>
+* visualSTATE Signature Generator: "50"
+* Project Signature: "50f2 373c b093 6263 4482 fd46"
+*****************************************************************************/
+
+PROJECT INFORMATION
+
+ Project Name: cesar_cp
+
+ Explanation:
+ ""
+
+******************************************************************************
+
+# SEQUENCE INFORMATION
+
+ # Sequence Name: "Sequence 0"
+
+ # Explanation:
+ ""
+
+ # Created : 2007-11-14 14:45:24
+ # Modified : 2007-11-19 10:17:07
+
+
+# STEPS
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_HANDOVER()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.HANDOVER,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: HANDOVER_DONE()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_HANDOVER_IN_PROGRESS()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.HANDOVER_IN_PROGRESS,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: HANDOVER_DONE()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_DETECTED(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ try_associate(0),
+ launch_beacon_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_DETECTED(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ try_associate(0),
+ launch_beacon_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_TIMER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BECOME_PCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: LEAVE_PCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BECOME_BACKUP_CCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.BACKUP_CCO,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: LEAVE_BACKUP_CCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SC_ADD()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_ADD;
+ # Actions:
+ cp_station_set_cco_status(1),
+ trace_cco(),
+ cp_station_set_assoc_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SC_TIMER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SC_JOIN()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_JOIN;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SC_TIMER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SC_JOIN()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_JOIN;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_CCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_ADD;
+ # Actions:
+ cp_station_set_cco_status(1),
+ trace_cco(),
+ cp_station_set_assoc_status(1);
+ # Signals:
+ # Variables:
+
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_MAC_ADDRESS(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_mac_address(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_CCO_PREFERENCE_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_cco_preference(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_WAS_CCO(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_was_cco(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_NPW_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_npw(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_DPW_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_dpw_req(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_M_STA_HFID(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_m_sta_hfid(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_U_STA_HFID(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_u_sta_hfid(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_AVLN_HFID(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_avln_hfid(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_SL(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_sl(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_TONEMASK(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_tonemask(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_NID(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_nid(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_SNID(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_snid(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_STOP_IND()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: USTT_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_ustt_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: USTT_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_ustt_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BBT_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ station_bbt_expires();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_CCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(1),
+ trace_cco(),
+ cp_station_set_assoc_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_DETECTED(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ try_associate(0),
+ launch_beacon_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: POND_TO_UCCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_USTA()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_usta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: POND_TO_UCCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.UCCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_ucco(),
+ send_discover_beacon_as_ucco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_DETECTED(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ try_associate(0),
+ launch_beacon_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: USTT_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_ustt_timer(),
+ transmit_unassoc_sta_mme();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(1),
+ trace_sta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_CC_ASSOC_CNF(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_cc_assoc_cnf(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_USTA_MME(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ record_usta_mme(0);
+ # Signals:
+ # Variables:
+
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_USTA()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_usta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: USTT_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_ustt_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: USTT_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_ustt_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_DETECTED(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ try_associate(0),
+ launch_beacon_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: USTT_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_ustt_timer(),
+ transmit_unassoc_sta_mme();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: USTT_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_ustt_timer(),
+ transmit_unassoc_sta_mme();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_TIMER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.UCCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_ucco(),
+ send_discover_beacon_as_ucco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_USTA()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_usta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_USTA_MME(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_usta_mme(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_CCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(1),
+ trace_cco(),
+ cp_station_set_assoc_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_USTA()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_usta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(1),
+ trace_sta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_USTA()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_usta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_CC_ASSOC_CNF(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_cc_assoc_cnf(0);
+ # Signals:
+ # Variables:
+
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: POND_TO_UCCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.UCCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_ucco(),
+ send_discover_beacon_as_ucco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: UCCO_MAX_DISCOVER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.UCCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ send_discover_beacon_as_ucco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_DETECTED(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_ustt_timer(),
+ trace_usta(),
+ launch_beacon_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: POND_TO_UCCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.UCCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_ucco(),
+ send_discover_beacon_as_ucco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_CC_ASSOC_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_cc_assoc_req(0),
+ cp_station_set_cco_status(1),
+ trace_cco(),
+ cp_station_set_assoc_status(1);
+ # Signals:
+ # Variables:
+
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(1),
+ trace_sta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_TIMER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(1),
+ trace_sta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_USTA()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(0),
+ launch_ustt_timer(),
+ trace_usta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(1),
+ trace_sta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: AUTHENTIFIE_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.AUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_auth_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: UNAUTHENTIFIE_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_auth_status(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: AUTHENTIFIE_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.AUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_auth_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BECOME_BACKUP_CCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.AUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.BACKUP_CCO,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_DETECTED(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.AUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.BACKUP_CCO,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_beacon_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_TIMER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_auth_status(0),
+ cp_station_set_cco_status(1),
+ trace_cco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(1),
+ trace_sta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_HANDOVER()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.HANDOVER,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: HANDOVER_DONE()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(1),
+ trace_cco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(1),
+ trace_sta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_CC_SET_TEI_MAP_IND(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_cc_set_tei_map_ind(0),
+ trace_sta();
+ # Signals:
+ # Variables:
+
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_CCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(1),
+ trace_cco(),
+ cp_station_set_assoc_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_HANDOVER()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.HANDOVER,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: HANDOVER_DONE()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.AUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(0),
+ trace_sta(),
+ cp_station_set_auth_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_HANDOVER()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.AUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.HANDOVER,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: HANDOVER_DONE()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_auth_status(0),
+ cp_station_set_cco_status(1),
+ trace_cco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: JOIN_WAIT_TIMER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.UCCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(0),
+ cp_station_set_assoc_status(0),
+ trace_ucco(),
+ send_discover_beacon_as_ucco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_CC_ASSOC_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_cc_assoc_req(0),
+ cp_station_set_cco_status(1),
+ trace_cco(),
+ cp_station_set_assoc_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_DETECTED(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_beacon_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: JOIN_WAIT_TIMER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(0),
+ cp_station_set_assoc_status(0),
+ launch_ustt_timer(),
+ trace_usta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_CCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(1),
+ trace_cco(),
+ cp_station_set_assoc_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_CC_ASSOC_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(0),
+ process_cc_assoc_req(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_CC_SET_TEI_MAP_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(0),
+ process_cc_set_tei_map_req(0);
+ # Signals:
+ # Variables:
+
+******************************************************************************
diff --git a/cesar/VisualState/Test_CCO.vlg b/cesar/VisualState/Test_CCO.vlg
new file mode 100644
index 0000000000..bcc0a0ecec
--- /dev/null
+++ b/cesar/VisualState/Test_CCO.vlg
@@ -0,0 +1,273 @@
+/*****************************************************************************
+* visualSTATE Validator Test Sequence File, Format 2.2
+* Generated by visualSTATE Validator 5.4.0.1273
+* Trace: No
+* Additional modules: visualSTATE VSLFx 5.4.0.1273
+* Time: 2007-11-19 11:45:22
+* visualSTATE Project File: <Project1.vsp>
+* visualSTATE Signature Generator: "50"
+* Project Signature: "e153 19db af6c 4b8c 321e 1a73"
+*****************************************************************************/
+
+PROJECT INFORMATION
+
+ Project Name: cesar_cp
+
+ Explanation:
+ ""
+
+******************************************************************************
+
+# SEQUENCE INFORMATION
+
+ # Sequence Name: "Sequence 0"
+
+ # Explanation:
+ ""
+
+ # Created : 2007-11-16 10:07:27
+ # Modified : 2007-11-19 11:45:03
+
+
+# STEPS
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_CCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(1),
+ trace_cco(),
+ cp_station_set_assoc_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_HANDOVER()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.HANDOVER,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: HANDOVER_DONE()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.AUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(0),
+ trace_sta(),
+ cp_station_set_auth_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_HANDOVER()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.AUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.HANDOVER,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: HANDOVER_DONE()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_auth_status(0),
+ cp_station_set_cco_status(1),
+ trace_cco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: JOIN_WAIT_TIMER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.UCCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(0),
+ cp_station_set_assoc_status(0),
+ trace_ucco(),
+ send_discover_beacon_as_ucco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_CC_ASSOC_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_cc_assoc_req(0),
+ cp_station_set_cco_status(1),
+ trace_cco(),
+ cp_station_set_assoc_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_DETECTED(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_beacon_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: JOIN_WAIT_TIMER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(0),
+ cp_station_set_assoc_status(0),
+ launch_ustt_timer(),
+ trace_usta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_CCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(1),
+ trace_cco(),
+ cp_station_set_assoc_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_CC_ASSOC_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(0),
+ process_cc_assoc_req(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_CC_SET_TEI_MAP_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(0),
+ process_cc_set_tei_map_req(0);
+ # Signals:
+ # Variables:
+
+******************************************************************************
diff --git a/cesar/VisualState/Test_INIT_SYSTEM.vlg b/cesar/VisualState/Test_INIT_SYSTEM.vlg
new file mode 100644
index 0000000000..ceadc59dbc
--- /dev/null
+++ b/cesar/VisualState/Test_INIT_SYSTEM.vlg
@@ -0,0 +1,270 @@
+/*****************************************************************************
+* visualSTATE Validator Test Sequence File, Format 2.2
+* Generated by visualSTATE Validator 5.4.0.1273
+* Trace: No
+* Additional modules: visualSTATE VSLFx 5.4.0.1273
+* Time: 2008-01-18 10:28:07
+* visualSTATE Project File: <Project1.vsp>
+* visualSTATE Signature Generator: "50"
+* Project Signature: "ee66 23c2 1343 69b5 6cb6 96b0"
+*****************************************************************************/
+
+PROJECT INFORMATION
+
+ Project Name: cesar_cp
+
+ Explanation:
+ ""
+
+******************************************************************************
+
+# SEQUENCE INFORMATION
+
+ # Sequence Name: "Sequence 0"
+
+ # Explanation:
+ ""
+
+ # Created : 2008-01-18 10:23:11
+ # Modified : 2008-01-18 10:27:33
+
+
+# STEPS
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_MAC_ADDRESS(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_mac_address(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_CCO_PREFERENCE_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_cco_preference(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_WAS_CCO(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_was_cco(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_NPW_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_npw(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_DPW_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_dpw_req(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_M_STA_HFID(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_m_sta_hfid(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_U_STA_HFID(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_u_sta_hfid(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_AVLN_HFID(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_avln_hfid(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_SL(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_sl(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_TONEMASK(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_tonemask(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_NID(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_nid(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_SET_SNID(0)
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_set_snid(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_STOP_IND()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+******************************************************************************
diff --git a/cesar/VisualState/Test_POND.vlg b/cesar/VisualState/Test_POND.vlg
new file mode 100644
index 0000000000..467ba46d22
--- /dev/null
+++ b/cesar/VisualState/Test_POND.vlg
@@ -0,0 +1,487 @@
+/*****************************************************************************
+* visualSTATE Validator Test Sequence File, Format 2.2
+* Generated by visualSTATE Validator 5.4.0.1273
+* Trace: No
+* Additional modules: visualSTATE VSLFx 5.4.0.1273
+* Time: 2007-11-19 10:21:07
+* visualSTATE Project File: <Project1.vsp>
+* visualSTATE Signature Generator: "50"
+* Project Signature: "50f2 373c b093 6263 4482 fd46"
+*****************************************************************************/
+
+PROJECT INFORMATION
+
+ Project Name: cesar_cp
+
+ Explanation:
+ ""
+
+******************************************************************************
+
+# SEQUENCE INFORMATION
+
+ # Sequence Name: "Sequence 0"
+
+ # Explanation:
+ ""
+
+ # Created : 2007-11-06 14:44:53
+ # Modified : 2007-11-19 10:20:39
+
+
+# STEPS
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: USTT_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_ustt_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: USTT_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_ustt_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BBT_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ station_bbt_expires();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_CCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(1),
+ trace_cco(),
+ cp_station_set_assoc_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_DETECTED(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ try_associate(0),
+ launch_beacon_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: POND_TO_UCCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_USTA()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_usta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: POND_TO_UCCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.UCCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_ucco(),
+ send_discover_beacon_as_ucco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_DETECTED(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ try_associate(0),
+ launch_beacon_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: USTT_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_ustt_timer(),
+ transmit_unassoc_sta_mme();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(1),
+ trace_sta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_CC_ASSOC_CNF(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_cc_assoc_cnf(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_USTA_MME(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ record_usta_mme(0);
+ # Signals:
+ # Variables:
+
+******************************************************************************
diff --git a/cesar/VisualState/Test_STA.vlg b/cesar/VisualState/Test_STA.vlg
new file mode 100644
index 0000000000..4b5c1a626b
--- /dev/null
+++ b/cesar/VisualState/Test_STA.vlg
@@ -0,0 +1,412 @@
+/*****************************************************************************
+* visualSTATE Validator Test Sequence File, Format 2.2
+* Generated by visualSTATE Validator 5.4.0.1273
+* Trace: No
+* Additional modules: visualSTATE VSLFx 5.4.0.1273
+* Time: 2007-11-19 11:44:21
+* visualSTATE Project File: <Project1.vsp>
+* visualSTATE Signature Generator: "50"
+* Project Signature: "e153 19db af6c 4b8c 321e 1a73"
+*****************************************************************************/
+
+PROJECT INFORMATION
+
+ Project Name: cesar_cp
+
+ Explanation:
+ ""
+
+******************************************************************************
+
+# SEQUENCE INFORMATION
+
+ # Sequence Name: "Sequence 0"
+
+ # Explanation:
+ ""
+
+ # Created : 2007-11-15 15:46:22
+ # Modified : 2007-11-19 11:43:49
+
+
+# STEPS
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(1),
+ trace_sta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_TIMER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(1),
+ trace_sta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_USTA()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(0),
+ launch_ustt_timer(),
+ trace_usta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(1),
+ trace_sta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: AUTHENTIFIE_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.AUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_auth_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: UNAUTHENTIFIE_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_auth_status(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: AUTHENTIFIE_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.AUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_auth_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BECOME_BACKUP_CCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.AUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.BACKUP_CCO,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_DETECTED(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.AUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.BACKUP_CCO,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_beacon_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_TIMER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_auth_status(0),
+ cp_station_set_cco_status(1),
+ trace_cco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(1),
+ trace_sta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_HANDOVER()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.HANDOVER,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: HANDOVER_DONE()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(1),
+ trace_cco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(1),
+ trace_sta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_CC_SET_TEI_MAP_IND(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_cc_set_tei_map_ind(0),
+ trace_sta();
+ # Signals:
+ # Variables:
+
+******************************************************************************
diff --git a/cesar/VisualState/Test_SmallFSM.vlg b/cesar/VisualState/Test_SmallFSM.vlg
new file mode 100644
index 0000000000..9cfbdf27b1
--- /dev/null
+++ b/cesar/VisualState/Test_SmallFSM.vlg
@@ -0,0 +1,366 @@
+/*****************************************************************************
+* visualSTATE Validator Test Sequence File, Format 2.2
+* Generated by visualSTATE Validator 5.4.0.1273
+* Trace: No
+* Additional modules: visualSTATE VSLFx 5.4.0.1273
+* Time: 2007-11-16 14:16:43
+* visualSTATE Project File: <Project1.vsp>
+* visualSTATE Signature Generator: "50"
+* Project Signature: "50f2 373c b093 6263 4482 fd46"
+*****************************************************************************/
+
+PROJECT INFORMATION
+
+ Project Name: cesar_cp
+
+ Explanation:
+ ""
+
+******************************************************************************
+
+# SEQUENCE INFORMATION
+
+ # Sequence Name: "Sequence 0"
+
+ # Explanation:
+ ""
+
+ # Created : 2007-11-16 14:10:47
+ # Modified : 2007-11-16 14:16:36
+
+
+# STEPS
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_HANDOVER()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.HANDOVER,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: HANDOVER_DONE()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_HANDOVER_IN_PROGRESS()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.HANDOVER_IN_PROGRESS,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: HANDOVER_DONE()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_DETECTED(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ try_associate(0),
+ launch_beacon_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_DETECTED(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ try_associate(0),
+ launch_beacon_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_TIMER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BECOME_PCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: LEAVE_PCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BECOME_BACKUP_CCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.BACKUP_CCO,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: LEAVE_BACKUP_CCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SC_ADD()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_ADD;
+ # Actions:
+ cp_station_set_cco_status(1),
+ trace_cco(),
+ cp_station_set_assoc_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SC_TIMER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SC_JOIN()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_JOIN;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SC_TIMER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SC_JOIN()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_JOIN;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_CCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_ADD;
+ # Actions:
+ cp_station_set_cco_status(1),
+ trace_cco(),
+ cp_station_set_assoc_status(1);
+ # Signals:
+ # Variables:
+
+******************************************************************************
diff --git a/cesar/VisualState/Test_UCCO.vlg b/cesar/VisualState/Test_UCCO.vlg
new file mode 100644
index 0000000000..07b1b8ed84
--- /dev/null
+++ b/cesar/VisualState/Test_UCCO.vlg
@@ -0,0 +1,200 @@
+/*****************************************************************************
+* visualSTATE Validator Test Sequence File, Format 2.2
+* Generated by visualSTATE Validator 5.4.0.1273
+* Trace: No
+* Additional modules: visualSTATE VSLFx 5.4.0.1273
+* Time: 2007-11-15 10:53:59
+* visualSTATE Project File: <Project1.vsp>
+* visualSTATE Signature Generator: "50"
+* Project Signature: "9821 8391 4652 1438 eb8f 44c7"
+*****************************************************************************/
+
+PROJECT INFORMATION
+
+ Project Name: cesar_cp
+
+ Explanation:
+ ""
+
+******************************************************************************
+
+# SEQUENCE INFORMATION
+
+ # Sequence Name: "Sequence 0"
+
+ # Explanation:
+ ""
+
+ # Created : 2007-11-15 10:25:13
+ # Modified : 2007-11-15 10:52:56
+
+
+# STEPS
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: POND_TO_UCCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.UCCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_ucco(),
+ send_discover_beacon_as_ucco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: UCCO_MAX_DISCOVER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.UCCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ send_discover_beacon_as_ucco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_DETECTED(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_ustt_timer(),
+ trace_usta(),
+ launch_beacon_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: POND_TO_UCCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.UCCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_ucco(),
+ send_discover_beacon_as_ucco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_CC_ASSOC_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_cc_assoc_req(0),
+ cp_station_set_cco_status(1),
+ trace_cco(),
+ cp_station_set_assoc_status(1);
+ # Signals:
+ # Variables:
+
+******************************************************************************
diff --git a/cesar/VisualState/Test_USTA.vlg b/cesar/VisualState/Test_USTA.vlg
new file mode 100644
index 0000000000..adcfd20ad0
--- /dev/null
+++ b/cesar/VisualState/Test_USTA.vlg
@@ -0,0 +1,420 @@
+/*****************************************************************************
+* visualSTATE Validator Test Sequence File, Format 2.2
+* Generated by visualSTATE Validator 5.4.0.1273
+* Trace: No
+* Additional modules: visualSTATE VSLFx 5.4.0.1273
+* Time: 2007-11-19 10:17:34
+* visualSTATE Project File: <Project1.vsp>
+* visualSTATE Signature Generator: "50"
+* Project Signature: "50f2 373c b093 6263 4482 fd46"
+*****************************************************************************/
+
+PROJECT INFORMATION
+
+ Project Name: cesar_cp
+
+ Explanation:
+ ""
+
+******************************************************************************
+
+# SEQUENCE INFORMATION
+
+ # Sequence Name: "Sequence 0"
+
+ # Explanation:
+ ""
+
+ # Created : 2007-11-14 14:45:24
+ # Modified : 2007-11-19 10:17:07
+
+
+# STEPS
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_USTA()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_usta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: USTT_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_ustt_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: USTT_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_ustt_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_DETECTED(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ try_associate(0),
+ launch_beacon_timer();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: USTT_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_ustt_timer(),
+ transmit_unassoc_sta_mme();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: USTT_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ launch_ustt_timer(),
+ transmit_unassoc_sta_mme();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: BEACON_TIMER_EXPIRES()
+ # HierarchicalStateVector:
+ Station.Station.ON.UCCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_ucco(),
+ send_discover_beacon_as_ucco();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_USTA()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_usta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_USTA_MME(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_usta_mme(0);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_CCO()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.CCO,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_cco_status(1),
+ trace_cco(),
+ cp_station_set_assoc_status(1);
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_USTA()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_usta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_STA()
+ # HierarchicalStateVector:
+ Station.Station.ON.STA_OR_CCO.ASSOCIATED_STA.UNAUTHENTICATED,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ cp_station_set_assoc_status(1),
+ trace_sta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Station.Station.INIT_SYSTEM,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ init_system();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: sta_connection[0]
+ # Event: SE_RESET()
+ # HierarchicalStateVector:
+ Topstate1.UNCONNECTED;
+ # Actions:
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_DRV_MAC_START_REQ(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.POND,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_drv_start_mac_req(0),
+ launch_ustt_timer(),
+ launch_bbt_timer(),
+ trace_pond();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: TO_USTA()
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ trace_usta();
+ # Signals:
+ # Variables:
+
+ # Send Event
+ # System: main_fsm
+ # Event: RECEIVE_CC_ASSOC_CNF(0)
+ # HierarchicalStateVector:
+ Station.Station.ON.POND_OR_USTA.USTA,
+ Station.Small_FSMs.SMALL_FSM.Handover_Region.NORMAL,
+ Station.Small_FSMs.SMALL_FSM.AVLN_Tracking.NO_AVLN_TO_TRACK,
+ Station.Small_FSMs.SMALL_FSM.Proxy_CCO.NOT_PCCO,
+ Station.Small_FSMs.SMALL_FSM.BackupCCO.NOT_BACKUP,
+ Station.Small_FSMs.SMALL_FSM.SC_Level.SC_NONE;
+ # Actions:
+ process_cc_assoc_cnf(0);
+ # Signals:
+ # Variables:
+
+******************************************************************************
diff --git a/cesar/VisualState/Topstate1.vsr b/cesar/VisualState/Topstate1.vsr
new file mode 100644
index 0000000000..ff992a1686
--- /dev/null
+++ b/cesar/VisualState/Topstate1.vsr
@@ -0,0 +1,52 @@
+@visualSTATE @RuleBase @Format2 "NoName"
+
+@Directives
+
+ @visualSTATE 5-4-0-1273;
+ @Date 2007-10-12;
+ @Time 11:18:44;
+ [[ Expl = "This is where the security level (SC_Join, SC_ADd) is set." ]]
+
+
+@Declaration
+
+
+@Definition
+
+
+@Implementation
+
+ @TopStateMachine SC_Level =
+
+ @State
+ SC_None
+ [[ Pos440 = "63 142 166 178 16 1 1638401" ]],
+ SC_Add
+ [[ Pos440 = "229 142 332 178 16 1 1638401" ]],
+ SC_Join
+ [[ Pos440 = "229 248 332 284 16 1 1638401" ]],
+ @Initial _InitialState0
+ [[ Pos440 = "104 57 124 77 114689" ]];
+
+ @StateRegion
+ @OffPage Region1 (SC_None, SC_Add, SC_Join, _InitialState0)
+ [[ Pos440 = "0 0 377 50", TextDisplayNote = "Preserve",
+ TextDisplayState = "Preserve", TextDisplayTransDesc = "Preserve",
+ View = "2 2 7" ]];
+
+ @Entry;
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ [[ Pos440 = "10 91 387 157 16 1 114689" ]]
+
+ @End;
+
diff --git a/cesar/VisualState/Topstate2.vsr b/cesar/VisualState/Topstate2.vsr
new file mode 100644
index 0000000000..bc8ce5380b
--- /dev/null
+++ b/cesar/VisualState/Topstate2.vsr
@@ -0,0 +1,70 @@
+@visualSTATE @RuleBase @Format2 "NoName"
+
+@Directives
+
+ @visualSTATE 5-4-0-1273;
+ @Date 2008-02-15;
+ @Time 16:05:36;
+
+
+
+@Declaration
+
+
+@Definition
+
+ @Event
+ CLOSE_CONNECTION(),
+ CONNECTION_REQUEST_ACCEPTED(),
+ CONNECTION_REQUEST_REFUSED(),
+ NEW_CONNECTION();
+
+
+@Implementation
+
+ @TopStateMachine Topstate1 =
+
+ @State
+ UNCONNECTED
+ [[ Pos440 = "33 90 163 115 16 1 1638401" ]],
+ @Initial _InitialState0
+ [[ Pos440 = "88 16 108 36 114689" ]],
+ WAITING_RESPONCE
+ [[ Pos440 = "33 169 163 194 16 1 1638401" ]],
+ CONNECTED
+ [[ Pos440 = "33 248 163 273 16 1 1638401" ]];
+
+ @StateRegion
+ @OffPage Region1 (UNCONNECTED, _InitialState0, WAITING_RESPONCE,
+ CONNECTED)
+ [[ Pos440 = "0 0 120 34", TextDisplayNote = "Preserve",
+ TextDisplayState = "Preserve", TextDisplayTransDesc = "Preserve",
+ View = "2 2 7" ]];
+
+ @Entry;
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ NEW_CONNECTION() @Src UNCONNECTED : @Dest WAITING_RESPONCE
+ [[ Pos440 = "38 127 196 147 0 809894016 66 25 66 0" ]],
+ @NoEvent @Src _InitialState0 : @Dest UNCONNECTED
+ [[ Pos440 = "98 6 178 36 0 809894016 10 20 65 0" ]],
+ CONNECTION_REQUEST_ACCEPTED() @Src WAITING_RESPONCE : @Dest CONNECTED
+ [[ Pos440 = "25 204 184 234 0 809894016 66 25 66 0" ]],
+ CONNECTION_REQUEST_REFUSED() @Src WAITING_RESPONCE : @Dest UNCONNECTED
+ [[ Pos440 = "232 135 379 165 1 809894017 130 12 233 138 130 14" ]],
+ CLOSE_CONNECTION() @Src CONNECTED : @Dest UNCONNECTED
+ [[ Pos440 = "223 244 395 274 1 809894017 130 13 239 228 239 141 130 14"
+ ]];
+
+ @TerminationRule;
+
+ [[ Pos440 = "20 26 140 76 16 1 114689" ]]
+
+ @End;
+
diff --git a/cesar/VisualState/coder/SEMEDef.h b/cesar/VisualState/coder/SEMEDef.h
new file mode 100644
index 0000000000..65d094c5c1
--- /dev/null
+++ b/cesar/VisualState/coder/SEMEDef.h
@@ -0,0 +1,178 @@
+/*
+ * Id: SEMEDef.h
+ *
+ * Function: SEM Defines Header File.
+ *
+ * Generated: Fri Feb 15 12:04:56 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __SEMEDEF_H
+#define __SEMEDEF_H
+
+
+/*
+ * Include SEM Types Header File.
+ */
+#include "SEMTypes.h"
+
+
+#if (VS_CODER_GUID != 0X000756878)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+/*
+ * Conditional Compilation Definitions for the API only.
+ */
+#define SEM_RDHW_TYPE_1 1
+#define SEM_RDHW_TYPE_2 0
+#define SEM_RDHW_TYPE_3 0
+#define SEM_RDHW_WIDTH_16_BIT 1
+#define SEM_RDHW_WIDTH_24_BIT 0
+#define SEM_RDHW_WIDTH_32_BIT 0
+#define SEM_RDHW_WIDTH_48_BIT 0
+#define SEM_RDHW_WIDTH_64_BIT 0
+#define SEM_RD_WIDTH_8_BIT 0
+#define SEM_RD_WIDTH_16_BIT 1
+#define SEM_RD_WIDTH_32_BIT 0
+#define SEM_RDFM_NUMBER 4
+#define SEM_EVENT_GROUP_INDEX 1
+#define SEM_EVENT_GROUP_TABLE_INDEX 0
+#define SEM_SIGNAL_QUEUE_ERROR_IF_FULL 1
+#define SEM_SIGNAL_QUEUE_NO_ERROR_IF_FULL 0
+#define SEM_RMN_ACTIONS 4
+#define SEM_RMN_GUARDS 0
+#define SEM_RMN_NEGATIVE_STATE_SYNCS 1
+#define SEM_RMN_NEXT_STATES 10
+#define SEM_RMN_POSITIVE_STATE_SYNCS 5
+#define SEM_RMN_SIGNALS 0
+#define SEM_SIGNAL 0
+
+
+/*
+ * Conditional Compilation Definitions.
+ */
+#define SEM_FUNCEXPHANDLING 0
+#define SEM_GUARD_EXPRESSION 0
+#define SEM_SIGNAL_DB 0
+#define VS_REALLINKMODE 0
+#define VS_USE_HEAP 1
+
+
+/*
+ * Undefined State.
+ */
+#define STATE_UNDEFINED 0X0FF /* 255 */
+
+
+/*
+ * Undefined Event.
+ */
+#define EVENT_UNDEFINED 0X0FF /* 255 */
+
+
+/*
+ * Undefined Event Group.
+ */
+#define EVENT_GROUP_UNDEFINED 0X0FFFF /* 65535 */
+
+
+/*
+ * Event Termination ID.
+ */
+#define EVENT_TERMINATION_ID 0X0FF /* 255 */
+
+
+/*
+ * Action Expression Termination ID.
+ */
+#define ACTION_EXPRESSION_TERMINATION_ID 0X0FF /* 255 */
+
+
+#ifdef SE_EXPERTDLL
+#include <stdio.h>
+#endif
+
+
+#if (SEM_RD_WIDTH_8_BIT)
+#define SEM_RULE_DATA_TYPE VS_UINT8
+#elif (SEM_RD_WIDTH_16_BIT)
+#define SEM_RULE_DATA_TYPE VS_UINT16
+#elif (SEM_RD_WIDTH_32_BIT)
+#define SEM_RULE_DATA_TYPE VS_UINT32
+#else
+#error Invalid files, contact the vendor
+#endif
+
+
+/*
+ * Type qualifier macros
+ */
+#define VS_TQ_RULEBASE const
+#define VS_TQ_GUARDEXPRCOL const
+#define VS_TQ_ACTIONEXPRCOL const
+#define VS_TQ_CONTEXT
+
+
+/*
+ * Functional expression type definitions
+ */
+struct SEM_CONTEXT;
+typedef VS_BOOL (* VS_GUARDEXPR_TYPE) (struct SEM_CONTEXT VS_TQ_CONTEXT * );
+typedef VS_VOID (* VS_ACTIONEXPR_TYPE) (struct SEM_CONTEXT VS_TQ_CONTEXT * );
+
+
+/*
+ * SEM Library Datatype Definition.
+ */
+typedef struct SEM_CONTEXT
+{
+ SEM_STATE_TYPE VS_TQ_CONTEXT * pCSV;
+ SEM_STATE_TYPE VS_TQ_CONTEXT * pWSV;
+ SEM_STATE_TYPE VS_TQ_CONTEXT * pIns;
+ VS_UINT8 Status;
+ VS_UINT8 EventGroupType;
+ VS_UINT8 State;
+ VS_UINT8 DIt;
+ VS_UINT8 InqAct;
+ VS_UINT8 StateChange;
+ VS_UINT8 nNofActions;
+ SEM_EVENT_TYPE nNofEvents;
+ SEM_STATE_TYPE nNofStates;
+ SEM_STATE_MACHINE_TYPE nNofStateMachines;
+ SEM_ACTION_FUNCTION_TYPE nNofActionFunctions;
+ SEM_INSTANCE_TYPE nNofInstances;
+ SEM_INSTANCE_TYPE ActIns;
+ SEM_EVENT_TYPE EventNo;
+ SEM_RULE_INDEX_TYPE iRI;
+ SEM_RULE_TABLE_INDEX_TYPE iFirstR;
+ SEM_RULE_TABLE_INDEX_TYPE iLastR;
+ SEM_RULE_INDEX_TYPE iInqRI;
+ SEM_EVENT_TYPE InqEventNo;
+ SEM_EVENT_TYPE InqCurrentEventNo;
+ SEM_EVENT_TYPE InqFoundEventNo;
+ VS_FILE_TYPE * pVSFile;
+ void VS_TQ_RULEBASE * pVSData;
+ SEM_STATE_MACHINE_TYPE VS_TQ_RULEBASE * pSMI;
+ SEM_EVENT_GROUP_TYPE VS_TQ_RULEBASE * pEGT;
+ SEM_EGTI_TYPE VS_TQ_RULEBASE * pEGTI;
+ SEM_RULE_DATA_TYPE VS_TQ_RULEBASE * pRD;
+ SEM_RULE_INDEX_TYPE VS_TQ_RULEBASE * pRI;
+ SEM_RULE_TABLE_INDEX_TYPE VS_TQ_RULEBASE * pRTI;
+ unsigned long VS_TQ_RULEBASE * pENIPos;
+ unsigned long VS_TQ_RULEBASE * pSNIPos;
+ unsigned long VS_TQ_RULEBASE * pANIPos;
+ unsigned long VS_TQ_RULEBASE * pEEIPos;
+ unsigned long VS_TQ_RULEBASE * pSEIPos;
+ unsigned long VS_TQ_RULEBASE * pAEIPos;
+} SEM_CONTEXT;
+
+
+#endif
diff --git a/cesar/VisualState/coder/SEMTypes.h b/cesar/VisualState/coder/SEMTypes.h
new file mode 100644
index 0000000000..e6f8afb20d
--- /dev/null
+++ b/cesar/VisualState/coder/SEMTypes.h
@@ -0,0 +1,126 @@
+/*
+ * Id: SEMTypes.h
+ *
+ * Function: SEM Types Header File.
+ *
+ * Generated: Fri Feb 15 12:04:56 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __SEMTYPES_H
+#define __SEMTYPES_H
+
+
+#define VS_CODER_GUID 0X000756878
+
+
+#include <limits.h>
+
+
+#ifdef SE_EXPERTDLL
+#define VS_FILE_TYPE FILE
+#else
+#define VS_FILE_TYPE void
+#endif
+
+
+#define VS_BOOL unsigned char
+#define VS_UCHAR unsigned char
+#define VS_SCHAR signed char
+#define VS_UINT unsigned int
+#define VS_INT signed int
+#define VS_FLOAT float
+#define VS_DOUBLE double
+#define VS_VOID void
+#define VS_VOIDPTR void*
+
+#if (UCHAR_MAX >= 0x0ff)
+#define VS_UINT8 unsigned char
+#define VS_INT8 signed char
+#elif (USHRT_MAX >= 0x0ff)
+#define VS_UINT8 unsigned short
+#define VS_INT8 signed short
+#elif (UINT_MAX >= 0x0ff)
+#define VS_UINT8 unsigned int
+#define VS_INT8 signed int
+#elif (ULONG_MAX >= 0x0ff)
+#define VS_UINT8 unsigned long
+#define VS_INT8 signed long
+#else
+#define VS_UINT8 (unsupported data type)
+#define VS_INT8 (unsupported data type)
+#endif
+
+#define VS_UINT16_VAARG VS_INT
+#define VS_INT16_VAARG VS_INT
+#if (UCHAR_MAX >= 0x0ffff)
+#define VS_UINT16 unsigned char
+#define VS_INT16 signed char
+#elif (USHRT_MAX >= 0x0ffff)
+#define VS_UINT16 unsigned short
+#define VS_INT16 signed short
+#elif (UINT_MAX >= 0x0ffff)
+#define VS_UINT16 unsigned int
+#define VS_INT16 signed int
+#elif (ULONG_MAX >= 0x0ffff)
+#define VS_UINT16 unsigned long
+#define VS_INT16 signed long
+#undef VS_UINT16_VAARG
+#undef VS_INT16_VAARG
+#define VS_UINT16_VAARG VS_INT16
+#define VS_INT16_VAARG VS_INT16
+#else
+#define VS_UINT16 (unsupported data type)
+#define VS_INT16 (unsupported data type)
+#endif
+
+#define VS_UINT32_VAARG VS_INT
+#define VS_INT32_VAARG VS_INT
+#if (UCHAR_MAX >= 0x0ffffffffUL)
+#define VS_UINT32 unsigned char
+#define VS_INT32 signed char
+#elif (USHRT_MAX >= 0x0ffffffffUL)
+#define VS_UINT32 unsigned short
+#define VS_INT32 signed short
+#elif (UINT_MAX >= 0x0ffffffffUL)
+#define VS_UINT32 unsigned int
+#define VS_INT32 signed int
+#elif (ULONG_MAX >= 0x0ffffffffUL)
+#define VS_UINT32 unsigned long
+#define VS_INT32 signed long
+#undef VS_UINT32_VAARG
+#undef VS_INT32_VAARG
+#define VS_UINT32_VAARG VS_INT32
+#define VS_INT32_VAARG VS_INT32
+#else
+#define VS_UINT32 (unsupported data type)
+#define VS_INT32 (unsupported data type)
+#endif
+
+
+/*
+ * SEM Variable Types.
+ */
+#define SEM_EVENT_TYPE VS_UINT8
+#define SEM_ACTION_EXPRESSION_TYPE VS_UINT8
+#define SEM_GUARD_EXPRESSION_TYPE VS_UINT8
+#define SEM_EXPLANATION_TYPE VS_UINT8
+#define SEM_STATE_TYPE VS_UINT8
+#define SEM_STATE_MACHINE_TYPE VS_UINT16
+#define SEM_INSTANCE_TYPE VS_UINT8
+#define SEM_RULE_INDEX_TYPE VS_UINT16
+#define SEM_INTERNAL_TYPE VS_UINT16
+#define SEM_SIGNAL_QUEUE_TYPE VS_UINT8
+#define SEM_ACTION_FUNCTION_TYPE VS_UINT8
+#define SEM_EVENT_GROUP_TYPE VS_UINT16
+#define SEM_EGTI_TYPE VS_UINT16
+#define SEM_RULE_TABLE_INDEX_TYPE VS_UINT16
+
+
+#endif
diff --git a/cesar/VisualState/coder/cesar_cp_PConstant.h b/cesar/VisualState/coder/cesar_cp_PConstant.h
new file mode 100644
index 0000000000..487d98d902
--- /dev/null
+++ b/cesar/VisualState/coder/cesar_cp_PConstant.h
@@ -0,0 +1,25 @@
+/*
+ * Id: cesar_cp_PConstant.h
+ *
+ * Function: VS Project Constant File.
+ *
+ * Generated: Fri Feb 15 12:04:56 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __CESAR_CP_PCONSTANT_H
+#define __CESAR_CP_PCONSTANT_H
+
+
+/*
+ * There are no VS Project constants, so this section is intentionally empty!
+ */
+
+
+#endif
diff --git a/cesar/VisualState/coder/cesar_cp_PEvent.h b/cesar/VisualState/coder/cesar_cp_PEvent.h
new file mode 100644
index 0000000000..bb1c4f1c70
--- /dev/null
+++ b/cesar/VisualState/coder/cesar_cp_PEvent.h
@@ -0,0 +1,26 @@
+/*
+ * Id: cesar_cp_PEvent.h
+ *
+ * Function: VS Project Event Header File.
+ *
+ * Generated: Fri Feb 15 12:04:56 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __CESAR_CP_PEVENT_H
+#define __CESAR_CP_PEVENT_H
+
+
+/*
+ * Global Event Identifier Definitions.
+ */
+#define SE_RESET 0X000 /* 0 */
+
+
+#endif
diff --git a/cesar/VisualState/coder/main_fsm.c b/cesar/VisualState/coder/main_fsm.c
new file mode 100644
index 0000000000..b6827938db
--- /dev/null
+++ b/cesar/VisualState/coder/main_fsm.c
@@ -0,0 +1,129 @@
+/*
+ * Id: main_fsm.c
+ *
+ * Function: VS System Source File.
+ *
+ * Generated: Fri Feb 15 12:04:56 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+/*
+ * Include VS System Data Header File.
+ */
+#include "main_fsm.h"
+
+
+#if (VS_CODER_GUID != 0X000756878)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+#include <stddef.h>
+
+
+/*
+ * VS System Data Declaration and Initialization.
+ *
+ * VS System Informations:
+ * - Rule data format number: 4
+ */
+VSDATAmain_fsm const main_fsm =
+{
+ {
+ 0X000000150, 0X00000002A, 0X000000000,
+ 0X000000017, 0X00000000A, 0X00000000C,
+ 0X000000001, 0X000000000, offsetof(VSDATAmain_fsm, S1) + 0,
+ offsetof(VSDATAmain_fsm, S1) + 46, 0X000000000, offsetof(VSDATAmain_fsm, S1) + 130,
+ offsetof(VSDATAmain_fsm, S1) + 1038, offsetof(VSDATAmain_fsm, S1) + 1174, offsetof(VSDATAmain_fsm, S1) + 1262,
+ 0X000000000, 0X000000000, 0X000000000,
+ 0X000000000, 0X000000000, 0X000000000,
+
+ },
+ {
+ 0X00000, 0X00000, 0X00001, 0X00001, 0X00001, 0X00002, 0X00002, 0X00003,
+ 0X00003, 0X00004, 0X00004, 0X00004, 0X00005, 0X00005, 0X00006, 0X00006,
+ 0X00007, 0X00007, 0X00008, 0X00008, 0X00008, 0X00009, 0X00009, 0X0FFFF,
+ 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF,
+ 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF,
+ 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF,
+ 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X00000, 0X0FFFF,
+ 0X0FFFF, 0X00000, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF,
+ 0X0FFFF, 0X01A00, 0X00001, 0X00003, 0X00005, 0X00008, 0X00015, 0X00009,
+ 0X0000C, 0X0000E, 0X00011, 0X00012, 0X00000, 0X01103, 0X00000, 0X00004,
+ 0X00007, 0X00001, 0X0000C, 0X01104, 0X00000, 0X00004, 0X00008, 0X00016,
+ 0X00001, 0X0000D, 0X01102, 0X00000, 0X00004, 0X00001, 0X0000E, 0X00101,
+ 0X00000, 0X00001, 0X04301, 0X00001, 0X00000, 0X00003, 0X00005, 0X0000F,
+ 0X00003, 0X00001, 0X00007, 0X01101, 0X00001, 0X00001, 0X00010, 0X01101,
+ 0X00001, 0X00001, 0X00011, 0X01101, 0X00001, 0X00001, 0X00012, 0X01101,
+ 0X00001, 0X00001, 0X00013, 0X01101, 0X00001, 0X00001, 0X00014, 0X01101,
+ 0X00001, 0X00001, 0X00015, 0X01101, 0X00001, 0X00001, 0X00016, 0X01101,
+ 0X00001, 0X00001, 0X00017, 0X01101, 0X00001, 0X00001, 0X00018, 0X01101,
+ 0X00001, 0X00001, 0X00019, 0X01101, 0X00001, 0X00001, 0X0001A, 0X01101,
+ 0X00001, 0X00001, 0X0001B, 0X02302, 0X00002, 0X00000, 0X00006, 0X00003,
+ 0X00000, 0X00003, 0X0000A, 0X04502, 0X00002, 0X00000, 0X00007, 0X00004,
+ 0X00000, 0X00011, 0X0000E, 0X0001C, 0X0001D, 0X00006, 0X0001E, 0X03502,
+ 0X00003, 0X00000, 0X00007, 0X00004, 0X00000, 0X00011, 0X0000E, 0X0001D,
+ 0X00006, 0X0001E, 0X02402, 0X00003, 0X00000, 0X00004, 0X00000, 0X00008,
+ 0X00015, 0X0001E, 0X00008, 0X02204, 0X00005, 0X00003, 0X00000, 0X0000C,
+ 0X00002, 0X00000, 0X00009, 0X00004, 0X02203, 0X00006, 0X00003, 0X00000,
+ 0X00002, 0X00000, 0X00009, 0X00004, 0X04204, 0X00000, 0X0000C, 0X00004,
+ 0X00007, 0X00002, 0X00000, 0X0000C, 0X0000E, 0X00009, 0X00004, 0X04304,
+ 0X00000, 0X0000D, 0X00004, 0X00007, 0X00006, 0X00003, 0X00000, 0X0000C,
+ 0X0000E, 0X00003, 0X0000A, 0X01305, 0X00000, 0X00011, 0X00004, 0X00008,
+ 0X00016, 0X00005, 0X00003, 0X00000, 0X0000D, 0X04304, 0X00008, 0X00000,
+ 0X00011, 0X00004, 0X00005, 0X00003, 0X00000, 0X0000E, 0X00003, 0X00001,
+ 0X00007, 0X01304, 0X00000, 0X00004, 0X00008, 0X00016, 0X00006, 0X00003,
+ 0X00000, 0X0000D, 0X03303, 0X00008, 0X00000, 0X00004, 0X00006, 0X00003,
+ 0X00000, 0X0000E, 0X00003, 0X0000A, 0X01202, 0X00002, 0X00000, 0X00002,
+ 0X00000, 0X00004, 0X01202, 0X00003, 0X00000, 0X00003, 0X00000, 0X00003,
+ 0X01103, 0X00003, 0X00000, 0X0000D, 0X00000, 0X0000B, 0X01202, 0X00003,
+ 0X00000, 0X00003, 0X00000, 0X0001F, 0X01202, 0X00003, 0X00000, 0X00003,
+ 0X00000, 0X00020, 0X01303, 0X00005, 0X00003, 0X00000, 0X00006, 0X00003,
+ 0X00000, 0X0000A, 0X01303, 0X00005, 0X00003, 0X00000, 0X00005, 0X00003,
+ 0X00000, 0X00005, 0X01303, 0X00005, 0X00003, 0X00000, 0X00005, 0X00003,
+ 0X00000, 0X00021, 0X01303, 0X00006, 0X00003, 0X00000, 0X00006, 0X00003,
+ 0X00000, 0X00022, 0X03404, 0X00004, 0X00000, 0X0000A, 0X00007, 0X00016,
+ 0X00008, 0X00004, 0X00000, 0X0000C, 0X00008, 0X00023, 0X02303, 0X00007,
+ 0X00004, 0X00000, 0X00007, 0X00004, 0X00000, 0X0000C, 0X00024, 0X02303,
+ 0X00007, 0X00004, 0X00000, 0X00007, 0X00004, 0X00000, 0X0000C, 0X00025,
+ 0X01505, 0X00010, 0X00000, 0X00004, 0X00008, 0X00016, 0X00007, 0X00004,
+ 0X00000, 0X00011, 0X0000E, 0X0000D, 0X02504, 0X00008, 0X00004, 0X00000,
+ 0X00010, 0X00007, 0X00004, 0X00000, 0X00011, 0X0000E, 0X0001D, 0X00006,
+ 0X01505, 0X0000A, 0X00000, 0X00004, 0X00008, 0X00016, 0X00007, 0X00004,
+ 0X00000, 0X00011, 0X0000E, 0X0000D, 0X02504, 0X00008, 0X00004, 0X00000,
+ 0X0000A, 0X00007, 0X00004, 0X00000, 0X00011, 0X0000E, 0X0001D, 0X00006,
+ 0X01304, 0X00008, 0X00004, 0X00000, 0X00016, 0X00008, 0X00004, 0X00000,
+ 0X0000D, 0X02403, 0X00008, 0X00004, 0X00000, 0X00008, 0X00004, 0X00000,
+ 0X00015, 0X00026, 0X00008, 0X01404, 0X00015, 0X00008, 0X00004, 0X00000,
+ 0X00016, 0X00008, 0X00004, 0X00000, 0X00023, 0X01404, 0X00008, 0X00004,
+ 0X00000, 0X00016, 0X00015, 0X00008, 0X00004, 0X00000, 0X0000D, 0X00101,
+ 0X00009, 0X0000B, 0X00101, 0X00009, 0X0000A, 0X00101, 0X0000A, 0X00009,
+ 0X00101, 0X0000B, 0X00009, 0X01101, 0X0000C, 0X0000D, 0X00002, 0X01101,
+ 0X0000D, 0X0000D, 0X00002, 0X00101, 0X0000D, 0X0000C, 0X00101, 0X0000E,
+ 0X0000F, 0X00101, 0X0000F, 0X0000E, 0X00101, 0X00010, 0X00011, 0X00104,
+ 0X00011, 0X00000, 0X00004, 0X00008, 0X00010, 0X00112, 0X00011, 0X00000,
+ 0X00004, 0X00010, 0X00102, 0X00011, 0X00001, 0X00010, 0X00101, 0X00012,
+ 0X00013, 0X00101, 0X00012, 0X00014, 0X00101, 0X00013, 0X00012, 0X00103,
+ 0X00014, 0X00003, 0X00000, 0X00013, 0X00101, 0X00014, 0X00012, 0X00000,
+ 0X00172, 0X000F9, 0X0005A, 0X000E5, 0X00192, 0X00196, 0X0008B, 0X000AA,
+ 0X000B4, 0X0012F, 0X0013B, 0X0019A, 0X001A6, 0X001AC, 0X001B1, 0X0019D,
+ 0X00111, 0X00147, 0X00153, 0X0018C, 0X0018F, 0X00093, 0X0009E, 0X001A3,
+ 0X001A0, 0X00082, 0X000EB, 0X00062, 0X0011D, 0X0015F, 0X00168, 0X00126,
+ 0X00021, 0X0000C, 0X00012, 0X00019, 0X0001E, 0X00046, 0X0002E, 0X0003A,
+ 0X0002A, 0X0003E, 0X00052, 0X00036, 0X0004A, 0X00056, 0X0004E, 0X00042,
+ 0X00032, 0X00101, 0X00109, 0X001B5, 0X001B8, 0X001BB, 0X001C3, 0X001BE,
+ 0X00189, 0X00186, 0X00079, 0X000C0, 0X000C9, 0X000F1, 0X000D3, 0X0017C,
+ 0X000D9, 0X000DF, 0X0006E, 0X00000, 0X00001, 0X00002, 0X00003, 0X00007,
+ 0X0000D, 0X00010, 0X00011, 0X00016, 0X00018, 0X00019, 0X0001A, 0X0001B,
+ 0X0001C, 0X0001E, 0X00020, 0X00021, 0X00022, 0X00026, 0X00027, 0X00028,
+ 0X00029, 0X0002A, 0X0002B, 0X0002C, 0X0002D, 0X0002E, 0X0002F, 0X00030,
+ 0X00031, 0X00032, 0X00034, 0X00035, 0X00036, 0X00038, 0X00039, 0X0003A,
+ 0X0003B, 0X0003C, 0X0003F, 0X00040, 0X00041, 0X00043, 0X00044
+ }
+};
diff --git a/cesar/VisualState/coder/main_fsm.h b/cesar/VisualState/coder/main_fsm.h
new file mode 100644
index 0000000000..073a1fe57d
--- /dev/null
+++ b/cesar/VisualState/coder/main_fsm.h
@@ -0,0 +1,47 @@
+/*
+ * Id: main_fsm.h
+ *
+ * Function: Include VS System Data Header File.
+ *
+ * Generated: Fri Feb 15 12:04:56 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __MAIN_FSM_H
+#define __MAIN_FSM_H
+
+
+/*
+ * Include SEM Defines Header File.
+ */
+#include "SEMEDef.h"
+
+
+#if (VS_CODER_GUID != 0X000756878)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+/*
+ * VS System Datatype Definition.
+ */
+typedef struct
+{
+ VS_UINT32 S0[0X000000016];
+ VS_UINT16 S1[0X00277];
+} VSDATAmain_fsm;
+
+
+/*
+ * External Declaration for VS System Data.
+ */
+extern VSDATAmain_fsm const main_fsm;
+
+
+#endif
diff --git a/cesar/VisualState/coder/main_fsmAction.h b/cesar/VisualState/coder/main_fsmAction.h
new file mode 100644
index 0000000000..cddc6dca2c
--- /dev/null
+++ b/cesar/VisualState/coder/main_fsmAction.h
@@ -0,0 +1,165 @@
+/*
+ * Id: main_fsmAction.h
+ *
+ * Function: VS System Action Expression Pointer Table Header File.
+ *
+ * Generated: Fri Feb 15 12:04:56 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __MAIN_FSMACTION_H
+#define __MAIN_FSMACTION_H
+
+
+/*
+ * Include SEM Defines Header File.
+ */
+#include "SEMEDef.h"
+
+
+#if (VS_CODER_GUID != 0X000756878)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+/*
+ * Action Function Prototypes.
+ */
+extern VS_VOID cp_station_set_assoc_status (VS_BOOL associated);
+extern VS_VOID cp_station_set_auth_status (VS_BOOL is_authenticated);
+extern VS_VOID cp_station_set_cco_status (VS_BOOL is_cco);
+extern VS_VOID init_system (VS_VOID);
+extern VS_VOID launch_bbt_timer (VS_VOID);
+extern VS_VOID launch_beacon_timer (VS_VOID);
+extern VS_VOID launch_ustt_timer (VS_VOID);
+extern VS_VOID process_cc_assoc_cnf (VS_VOIDPTR mme_address);
+extern VS_VOID process_cc_assoc_req (VS_VOIDPTR mme_address);
+extern VS_VOID process_cc_set_tei_map_ind (VS_VOIDPTR mme_address);
+extern VS_VOID process_cc_set_tei_map_req (VS_VOIDPTR mme_address);
+extern VS_VOID process_drv_set_avln_hfid (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_cco_preference (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_dpw_req (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_m_sta_hfid (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_mac_address (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_nid (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_npw (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_sl (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_snid (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_tonemask (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_u_sta_hfid (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_was_cco (VS_VOIDPTR msg);
+extern VS_VOID process_drv_start_mac_req (VS_VOIDPTR msg);
+extern VS_VOID process_usta_mme (VS_VOIDPTR mme_address);
+extern VS_VOID record_usta_mme (VS_VOIDPTR mme_address);
+extern VS_VOID send_discover_beacon_as_ucco (VS_VOID);
+extern VS_VOID station_bbt_expires (VS_VOID);
+extern VS_VOID trace_cco (VS_VOID);
+extern VS_VOID trace_pond (VS_VOID);
+extern VS_VOID trace_sta (VS_VOID);
+extern VS_VOID trace_ucco (VS_VOID);
+extern VS_VOID trace_usta (VS_VOID);
+extern VS_VOID transmit_unassoc_sta_mme (VS_VOID);
+extern VS_VOID try_associate (VS_VOIDPTR beacon_address);
+
+
+/*
+ * Include SEM Library Header File.
+ */
+#include "SEMLibE.h"
+
+
+/*
+ * Action Expression Function Prototypes.
+ */
+extern VS_VOID MainVSAction_0 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_1 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_2 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_3 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_4 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_5 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_6 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_7 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_8 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_9 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_10 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_11 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_12 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_13 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_14 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_15 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_16 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_17 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_18 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_19 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_20 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_21 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_22 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_23 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_24 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_25 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_26 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_27 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_28 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_29 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_30 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_31 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_32 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_33 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_34 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_35 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_36 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_37 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_38 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+
+/*
+ * Action Expression Pointer Table.
+ */
+extern VS_ACTIONEXPR_TYPE const MainVSAction[39];
+
+
+#endif
diff --git a/cesar/VisualState/coder/main_fsmData.c b/cesar/VisualState/coder/main_fsmData.c
new file mode 100644
index 0000000000..1cd4cff638
--- /dev/null
+++ b/cesar/VisualState/coder/main_fsmData.c
@@ -0,0 +1,376 @@
+/*
+ * Id: main_fsmData.c
+ *
+ * Function: VS System Data Source File.
+ *
+ * Generated: Fri Feb 15 12:04:56 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+/*
+ * Include VS System Data Header File.
+ */
+#include "main_fsmData.h"
+
+
+#if (VS_CODER_GUID != 0X000756878)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+/*
+ * Include VS System Header File.
+ */
+#include "main_fsm.h"
+
+
+/*
+ * Include VS Project Constants Header file.
+ */
+#include "cesar_cp_PConstant.h"
+
+
+/*
+ * Include VS Project Event Header File.
+ */
+#include "cesar_cp_PEvent.h"
+
+
+/*
+ * Include VS System Action Expression Pointer Table File.
+ */
+#include "main_fsmAction.h"
+
+
+#include <stdarg.h>
+
+
+typedef union
+{
+ struct
+ {
+ VS_VOIDPTR VS_VOIDPTRVar[0X00001];
+ } DB30;
+} main_fsmVSDBDATA;
+
+
+/*
+ * VS System Double Buffer Variable Declaration.
+ */
+static main_fsmVSDBDATA main_fsmVSDBVar;
+
+
+/*
+ * SEM Deduct Function.
+ */
+unsigned char main_fsmSMP_Deduct (SEM_CONTEXT VS_TQ_CONTEXT * Context, SEM_EVENT_TYPE EventNo, ...)
+{
+ va_list ap;
+
+ va_start(ap, EventNo);
+ if (Context == NULL)
+ return (SES_NOT_LOADED);
+ if (Context->nNofEvents <= EventNo)
+ return (SES_RANGE_ERR);
+ Context->EventNo = EventNo;
+ Context->State = STATE_SEM_PREPARE;
+ Context->DIt = 2;
+ switch (EventNo)
+ {
+ case 3:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 12:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 13:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 14:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 15:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 16:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 18:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 19:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 20:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 21:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 22:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 23:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 24:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 25:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 26:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 27:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 28:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 29:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 30:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+
+ default:
+ break;
+ }
+
+ va_end(ap);
+ if (Context->InqAct)
+ return (SES_ACTIVE);
+ return (SES_OKAY);
+}
+
+
+/*
+ * Action Expression Functions.
+ */
+VS_VOID MainVSAction_0 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ init_system();
+}
+VS_VOID MainVSAction_1 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ launch_bbt_timer();
+}
+VS_VOID MainVSAction_2 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ launch_beacon_timer();
+}
+VS_VOID MainVSAction_3 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ launch_ustt_timer();
+}
+VS_VOID MainVSAction_4 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ send_discover_beacon_as_ucco();
+}
+VS_VOID MainVSAction_5 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ station_bbt_expires();
+}
+VS_VOID MainVSAction_6 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ trace_cco();
+}
+VS_VOID MainVSAction_7 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ trace_pond();
+}
+VS_VOID MainVSAction_8 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ trace_sta();
+}
+VS_VOID MainVSAction_9 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ trace_ucco();
+}
+VS_VOID MainVSAction_10 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ trace_usta();
+}
+VS_VOID MainVSAction_11 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ transmit_unassoc_sta_mme();
+}
+VS_VOID MainVSAction_12 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ cp_station_set_cco_status(0);
+}
+VS_VOID MainVSAction_13 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ cp_station_set_auth_status(0);
+}
+VS_VOID MainVSAction_14 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ cp_station_set_assoc_status(0);
+}
+VS_VOID MainVSAction_15 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_start_mac_req(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_16 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_mac_address(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_17 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_cco_preference(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_18 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_was_cco(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_19 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_npw(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_20 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_dpw_req(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_21 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_m_sta_hfid(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_22 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_u_sta_hfid(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_23 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_avln_hfid(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_24 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_sl(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_25 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_tonemask(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_26 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_nid(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_27 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_snid(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_28 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_cc_assoc_req(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_29 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ cp_station_set_cco_status(1);
+}
+VS_VOID MainVSAction_30 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ cp_station_set_assoc_status(1);
+}
+VS_VOID MainVSAction_31 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ try_associate(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_32 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_cc_assoc_cnf(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_33 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ record_usta_mme(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_34 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_usta_mme(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_35 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ cp_station_set_auth_status(1);
+}
+VS_VOID MainVSAction_36 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_cc_assoc_req(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_37 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_cc_set_tei_map_req(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_38 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_cc_set_tei_map_ind(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+
+
+/*
+ * Action Expression Pointer Table.
+ */
+VS_ACTIONEXPR_TYPE const MainVSAction[39] =
+{
+ MainVSAction_0,
+ MainVSAction_1,
+ MainVSAction_2,
+ MainVSAction_3,
+ MainVSAction_4,
+ MainVSAction_5,
+ MainVSAction_6,
+ MainVSAction_7,
+ MainVSAction_8,
+ MainVSAction_9,
+ MainVSAction_10,
+ MainVSAction_11,
+ MainVSAction_12,
+ MainVSAction_13,
+ MainVSAction_14,
+ MainVSAction_15,
+ MainVSAction_16,
+ MainVSAction_17,
+ MainVSAction_18,
+ MainVSAction_19,
+ MainVSAction_20,
+ MainVSAction_21,
+ MainVSAction_22,
+ MainVSAction_23,
+ MainVSAction_24,
+ MainVSAction_25,
+ MainVSAction_26,
+ MainVSAction_27,
+ MainVSAction_28,
+ MainVSAction_29,
+ MainVSAction_30,
+ MainVSAction_31,
+ MainVSAction_32,
+ MainVSAction_33,
+ MainVSAction_34,
+ MainVSAction_35,
+ MainVSAction_36,
+ MainVSAction_37,
+ MainVSAction_38
+};
+
+
+/*
+ * Wrapper function for all initializing functions.
+ */
+unsigned char main_fsmSMP_InitAll (SEM_CONTEXT VS_TQ_CONTEXT * * Context)
+{
+ unsigned char CC;
+
+ if ((CC = SMP_Connect(Context, &main_fsm)) != SES_OKAY)
+ return CC;
+
+ SMP_Init(*Context);
+
+ return SES_OKAY;
+}
diff --git a/cesar/VisualState/coder/main_fsmData.h b/cesar/VisualState/coder/main_fsmData.h
new file mode 100644
index 0000000000..33e2e8f6f6
--- /dev/null
+++ b/cesar/VisualState/coder/main_fsmData.h
@@ -0,0 +1,123 @@
+/*
+ * Id: main_fsmData.h
+ *
+ * Function: VS System Header File.
+ *
+ * Generated: Fri Feb 15 12:04:56 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __MAIN_FSMDATA_H
+#define __MAIN_FSMDATA_H
+
+
+/*
+ * Number of Identifiers.
+ */
+#define VS_NOF_ACTION_EXPRESSIONS 0X027 /* 39 */
+#define VS_NOF_ACTION_FUNCTIONS 0X00c /* 12 */
+#define VS_NOF_EVENT_GROUPS 0X001 /* 1 */
+#define VS_NOF_EVENTS 0X02a /* 42 */
+#define VS_NOF_EXTERNAL_VARIABLES 0X000 /* 0 */
+#define VS_NOF_GUARD_EXPRESSIONS 0X000 /* 0 */
+#define VS_NOF_INSTANCES 0X001 /* 1 */
+#define VS_NOF_INTERNAL_VARIABLES 0X000 /* 0 */
+#define VS_NOF_SIGNALS 0X000 /* 0 */
+#define VS_NOF_STATE_MACHINES 0X00a /* 10 */
+#define VS_NOF_STATES 0X017 /* 23 */
+
+
+/*
+ * Include SEM Library Header File.
+ */
+#include "SEMLibE.h"
+
+
+#if (VS_CODER_GUID != 0X000756878)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+/*
+ * Include Global Events Header File.
+ */
+#include "cesar_cp_PEvent.h"
+
+
+/*
+ * External Declaration for SEM Deduct Function.
+ */
+extern unsigned char main_fsmSMP_Deduct (SEM_CONTEXT VS_TQ_CONTEXT * Context, SEM_EVENT_TYPE EventNo, ...);
+
+
+/*
+ * External Declaration for wrapper function for all initializing functions.
+ */
+extern unsigned char main_fsmSMP_InitAll (SEM_CONTEXT VS_TQ_CONTEXT * * Context);
+
+
+/*
+ * Conditional Compilation Definitions.
+ */
+#define SEM_DEDUCT_FUNC 1
+#define SEM_DEDUCT_WITH_VA_LIST 1
+
+
+/*
+ * Event Identifier Definitions.
+ */
+#define AUTHENTIFIE_STA 0X001 /* 1 */
+#define BBT_EXPIRES 0X002 /* 2 */
+#define BEACON_DETECTED 0X003 /* 3 */
+#define BEACON_TIMER_EXPIRES 0X004 /* 4 */
+#define BECOME_BACKUP_CCO 0X005 /* 5 */
+#define BECOME_PCO 0X006 /* 6 */
+#define HANDOVER_DONE 0X007 /* 7 */
+#define JOIN_WAIT_TIMER_EXPIRES 0X008 /* 8 */
+#define LEAVE_BACKUP_CCO 0X009 /* 9 */
+#define LEAVE_PCO 0X00A /* 10 */
+#define POND_TO_UCCO 0X00B /* 11 */
+#define RECEIVE_CC_ASSOC_CNF 0X00C /* 12 */
+#define RECEIVE_CC_ASSOC_REQ 0X00D /* 13 */
+#define RECEIVE_CC_SET_TEI_MAP_IND 0X00E /* 14 */
+#define RECEIVE_CC_SET_TEI_MAP_REQ 0X00F /* 15 */
+#define RECEIVE_DRV_MAC_START_REQ 0X010 /* 16 */
+#define RECEIVE_DRV_MAC_STOP_IND 0X011 /* 17 */
+#define RECEIVE_DRV_SET_AVLN_HFID 0X012 /* 18 */
+#define RECEIVE_DRV_SET_CCO_PREFERENCE_REQ 0X013 /* 19 */
+#define RECEIVE_DRV_SET_DPW_REQ 0X014 /* 20 */
+#define RECEIVE_DRV_SET_MAC_ADDRESS 0X015 /* 21 */
+#define RECEIVE_DRV_SET_M_STA_HFID 0X016 /* 22 */
+#define RECEIVE_DRV_SET_NID 0X017 /* 23 */
+#define RECEIVE_DRV_SET_NPW_REQ 0X018 /* 24 */
+#define RECEIVE_DRV_SET_SL 0X019 /* 25 */
+#define RECEIVE_DRV_SET_SNID 0X01A /* 26 */
+#define RECEIVE_DRV_SET_TONEMASK 0X01B /* 27 */
+#define RECEIVE_DRV_SET_U_STA_HFID 0X01C /* 28 */
+#define RECEIVE_DRV_SET_WAS_CCO 0X01D /* 29 */
+#define RECEIVE_USTA_MME 0X01E /* 30 */
+#define SC_ADD 0X01F /* 31 */
+#define SC_JOIN 0X020 /* 32 */
+#define SC_TIMER_EXPIRES 0X021 /* 33 */
+#define TO_CCO 0X022 /* 34 */
+#define TO_HANDOVER 0X023 /* 35 */
+#define TO_HANDOVER_IN_PROGRESS 0X024 /* 36 */
+#define TO_STA 0X025 /* 37 */
+#define TO_USTA 0X026 /* 38 */
+#define UCCO_MAX_DISCOVER_EXPIRES 0X027 /* 39 */
+#define UNAUTHENTIFIE_STA 0X028 /* 40 */
+#define USTT_EXPIRES 0X029 /* 41 */
+
+
+/*
+ * There are no VS System constants, so this section is intentionally empty!
+ */
+
+
+#endif
diff --git a/cesar/VisualState/coder/sta_connection.c b/cesar/VisualState/coder/sta_connection.c
new file mode 100644
index 0000000000..7fdc50ebbc
--- /dev/null
+++ b/cesar/VisualState/coder/sta_connection.c
@@ -0,0 +1,54 @@
+/*
+ * Id: sta_connection.c
+ *
+ * Function: VS System Source File.
+ *
+ * Generated: Fri Feb 15 12:04:56 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+/*
+ * Include VS System Data Header File.
+ */
+#include "sta_connection.h"
+
+
+#if (VS_CODER_GUID != 0X000756878)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+#include <stddef.h>
+
+
+/*
+ * VS System Data Declaration and Initialization.
+ *
+ * VS System Informations:
+ * - Rule data format number: 4
+ */
+VSDATAsta_connection const sta_connection =
+{
+ {
+ 0X001000050, 0X000000005, 0X000000000,
+ 0X000000003, 0X000000001, 0X000000000,
+ 0X000000012, 0X000000000, offsetof(VSDATAsta_connection, S1) + 0,
+ 0X000000000, 0X000000000, offsetof(VSDATAsta_connection, S1) + 6,
+ offsetof(VSDATAsta_connection, S1) + 34, offsetof(VSDATAsta_connection, S1) + 44, offsetof(VSDATAsta_connection, S1) + 56,
+ 0X000000000, 0X000000000, 0X000000000,
+ 0X000000000, 0X000000000, 0X000000000,
+
+ },
+ {
+ 0X00000, 0X00000, 0X00000, 0X00100, 0X00000, 0X00101, 0X00000, 0X00001,
+ 0X00101, 0X00001, 0X00002, 0X00101, 0X00001, 0X00000, 0X00101, 0X00002,
+ 0X00000, 0X00000, 0X0000B, 0X00005, 0X00008, 0X00002, 0X00000, 0X00001,
+ 0X00002, 0X00003, 0X00004, 0X00005
+ }
+};
diff --git a/cesar/VisualState/coder/sta_connection.h b/cesar/VisualState/coder/sta_connection.h
new file mode 100644
index 0000000000..4f86c61796
--- /dev/null
+++ b/cesar/VisualState/coder/sta_connection.h
@@ -0,0 +1,47 @@
+/*
+ * Id: sta_connection.h
+ *
+ * Function: Include VS System Data Header File.
+ *
+ * Generated: Fri Feb 15 12:04:56 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __STA_CONNECTION_H
+#define __STA_CONNECTION_H
+
+
+/*
+ * Include SEM Defines Header File.
+ */
+#include "SEMEDef.h"
+
+
+#if (VS_CODER_GUID != 0X000756878)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+/*
+ * VS System Datatype Definition.
+ */
+typedef struct
+{
+ VS_UINT32 S0[0X000000016];
+ VS_UINT16 S1[0X0001C];
+} VSDATAsta_connection;
+
+
+/*
+ * External Declaration for VS System Data.
+ */
+extern VSDATAsta_connection const sta_connection;
+
+
+#endif
diff --git a/cesar/VisualState/coder/sta_connectionAction.h b/cesar/VisualState/coder/sta_connectionAction.h
new file mode 100644
index 0000000000..894dc90fd7
--- /dev/null
+++ b/cesar/VisualState/coder/sta_connectionAction.h
@@ -0,0 +1,31 @@
+/*
+ * Id: sta_connectionAction.h
+ *
+ * Function: VS System Action Expression Pointer Table Header File.
+ *
+ * Generated: Fri Feb 15 12:04:56 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __STA_CONNECTIONACTION_H
+#define __STA_CONNECTIONACTION_H
+
+
+/*
+ * Include SEM Defines Header File.
+ */
+#include "SEMEDef.h"
+
+
+#if (VS_CODER_GUID != 0X000756878)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+#endif
diff --git a/cesar/VisualState/coder/sta_connectionData.c b/cesar/VisualState/coder/sta_connectionData.c
new file mode 100644
index 0000000000..328bbc4dc6
--- /dev/null
+++ b/cesar/VisualState/coder/sta_connectionData.c
@@ -0,0 +1,39 @@
+/*
+ * Id: sta_connectionData.c
+ *
+ * Function: VS System Data Source File.
+ *
+ * Generated: Fri Feb 15 12:04:56 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+/*
+ * Include VS System Data Header File.
+ */
+#include "sta_connectionData.h"
+
+
+#if (VS_CODER_GUID != 0X000756878)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+/*
+ * Include VS Project Constants Header file.
+ */
+#include "cesar_cp_PConstant.h"
+
+
+/*
+ * Include VS Project Event Header File.
+ */
+#include "cesar_cp_PEvent.h"
+
+
+#include <stdarg.h>
diff --git a/cesar/VisualState/coder/sta_connectionData.h b/cesar/VisualState/coder/sta_connectionData.h
new file mode 100644
index 0000000000..31aaf9979b
--- /dev/null
+++ b/cesar/VisualState/coder/sta_connectionData.h
@@ -0,0 +1,74 @@
+/*
+ * Id: sta_connectionData.h
+ *
+ * Function: VS System Header File.
+ *
+ * Generated: Fri Feb 15 12:04:56 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __STA_CONNECTIONDATA_H
+#define __STA_CONNECTIONDATA_H
+
+
+/*
+ * Number of Identifiers.
+ */
+#define VS_NOF_ACTION_EXPRESSIONS 0X000 /* 0 */
+#define VS_NOF_ACTION_FUNCTIONS 0X000 /* 0 */
+#define VS_NOF_EVENT_GROUPS 0X000 /* 0 */
+#define VS_NOF_EVENTS 0X005 /* 5 */
+#define VS_NOF_EXTERNAL_VARIABLES 0X000 /* 0 */
+#define VS_NOF_GUARD_EXPRESSIONS 0X000 /* 0 */
+#define VS_NOF_INSTANCES 0X012 /* 18 */
+#define VS_NOF_INTERNAL_VARIABLES 0X000 /* 0 */
+#define VS_NOF_SIGNALS 0X000 /* 0 */
+#define VS_NOF_STATE_MACHINES 0X001 /* 1 */
+#define VS_NOF_STATES 0X003 /* 3 */
+
+
+/*
+ * Include SEM Library Header File.
+ */
+#include "SEMLibE.h"
+
+
+#if (VS_CODER_GUID != 0X000756878)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+/*
+ * Include Global Events Header File.
+ */
+#include "cesar_cp_PEvent.h"
+
+
+/*
+ * Conditional Compilation Definitions.
+ */
+#define SEM_DEDUCT_FUNC 0
+#define SEM_DEDUCT_WITH_VA_LIST 0
+
+
+/*
+ * Event Identifier Definitions.
+ */
+#define CLOSE_CONNECTION 0X001 /* 1 */
+#define CONNECTION_REQUEST_ACCEPTED 0X002 /* 2 */
+#define CONNECTION_REQUEST_REFUSED 0X003 /* 3 */
+#define NEW_CONNECTION 0X004 /* 4 */
+
+
+/*
+ * There are no VS System constants, so this section is intentionally empty!
+ */
+
+
+#endif
diff --git a/cesar/VisualState/coder/vscoder.cre b/cesar/VisualState/coder/vscoder.cre
new file mode 100644
index 0000000000..a0cb3c49e0
--- /dev/null
+++ b/cesar/VisualState/coder/vscoder.cre
@@ -0,0 +1,406 @@
+/*****************************************************************************
+* visualSTATE Coder Report
+* Generated by visualSTATE Coder 5, 4, 0, 1273
+* Time: 2008-02-15 12:04:56
+* visualSTATE Project File: <Project1.vsp>
+* visualSTATE Signature Generator: "50"
+* Project Signature: "681b 87c5 a224 3276 ba20 0753"
+*****************************************************************************/
+
+PROJECT INFORMATION
+
+ Project name : cesar_cp
+
+ Explanation :
+ ""
+
+
+CODER OPTIONS
+
+ Configuration
+
+ API type : Expert
+ API version : V4
+ Generate for C-SPYLink : No
+ RealLink mode : None
+ Use additional RealLink extended keywords : No
+ Enforce compatible RealLink extended keywords : Yes
+ C++ code generation : No
+ Limited license :
+ Expert DLL mode : No
+
+
+ File output
+
+ Output directory : coder\
+ Result file : vscoder.cre
+ Project external variables source file : cesar_cp_PExtVar.c
+ Project external variables header file : cesar_cp_PExtVar.h
+ Constants header file : cesar_cp_PConstant.h
+ Events header file : cesar_cp_PEvent.h
+
+
+ Code
+
+ Optimize states and machines : Yes
+ Functional expression handling : Function pointer tables
+ Data width : Optimized
+ Use event group table indexing : No
+ Rule data format no. : Optimized
+ Internal variable initialization : By definition
+ External variable initialization : By definition
+ Generate digital signature : No
+ Initialize static storage : No
+ Use heap memory : Yes
+ Generate global definitions : No
+
+
+ Style
+
+ SEM variable types : As macros
+ VS variable types : As macros
+
+
+ Extended keywords
+
+ RealLink protocol data keyword :
+ RealLink data keyword :
+ RealLink const data keyword :
+ C51 variable segment : None
+ System context keyword :
+ External variable keyword :
+ C51 constant segment : None
+ Core model logic keyword :
+ Guard expression collection keyword :
+ Action expression collection keyword :
+ Run-time info keyword :
+
+
+MODEL CHARACTERISTICS
+
+ Model elements
+
+ Events : 0
+ Event groups : 0
+ Action functions : 0
+ External variables : 0
+ Constants : 0
+
+
+ Model components
+
+ Systems : 2
+
+
+GENERATED STATISTICS
+
+ Files
+
+ SEM types header file : SEMTypes.h
+ SEM definitions header file : SEMEDef.h
+ Constants header file : cesar_cp_PConstant.h
+ Events header file : cesar_cp_PEvent.h
+
+
+******************************************************************************
+
+SYSTEM INFORMATION
+
+ System name : main_fsm
+
+ Explanation :
+ ""
+
+
+CODER OPTIONS
+
+ File output
+
+ Use Project output path : Yes
+ Output directory : coder\
+ System source file : main_fsm.c
+ System header file : main_fsm.h
+ Action expressions header file : main_fsmAction.h
+ Action functions header file :
+ Constants header file :
+ External variables source file :
+ External variables header file :
+ System data source file : main_fsmData.c
+ System data header file : main_fsmData.h
+ System binary file : $(SYSNAME).sld
+
+
+ Code
+
+ Const system structure : Yes
+ Const guard expression fpt : Yes
+ Const action expression fpt : Yes
+ Static model elements : No
+ Merged guard expressions : No
+ Merged action expressions : No
+ Use guard type cast : Yes
+ Use auto variables : Yes
+
+
+ Style
+
+ System structure name : main_fsm
+ Action expression collection name : MainVSAction
+
+
+ Extended keywords
+
+ C51 variable segment : None
+ External variable keyword :
+ Internal variable keyword :
+ Double buffer data keyword :
+
+
+ API functions
+
+ Include SemInitAll : Yes
+
+
+ Names
+
+ Event name printing : No text
+ State name printing : No text
+ Action function printing : No text
+ Event name format : No conversion
+ State name format : Do not print
+ Action function format : Do not print
+ State machine format : Do not print
+
+
+MODEL CHARACTERISTICS
+
+ Model elements
+
+ Events : 42
+ Event groups : 1
+ Action functions : 35
+ Internal variables : 0
+ External variables : 0
+ Signals : 0
+ Constants : 0
+
+
+ Model components
+
+ State chart files : 1
+ States : 23
+ State machines : 10
+ Transitions : 68
+ Guard expressions : 0
+ Assignments : 0
+
+
+ Model parameters
+
+ Instances : 1
+ Signal queue size : 0
+
+
+GENERATED STATISTICS
+
+ Maximum number of rule elements
+
+ Positive state conditions : 5
+ Negative state conditions : 1
+ Guard expressions : 0
+ Action expressions : 4
+ Next states : 10
+ Signals : 0
+
+
+ Files
+
+ System source file : main_fsm.c
+ System header file : main_fsm.h
+ Action expressions header file : main_fsmAction.h
+ System data source file : main_fsmData.c
+ System data header file : main_fsmData.h
+
+
+ Identifier names
+
+ Rule base : main_fsm
+ Action expression collection : MainVSAction
+ Deduct function : main_fsmSMP_Deduct
+
+
+ Size information
+
+ Core logic size in bytes : 1350
+ Number of guard expressions : 0
+ Number of action expressions : 39
+
+
+******************************************************************************
+
+SYSTEM INFORMATION
+
+ System name : sta_connection
+
+ Explanation :
+ ""
+
+
+CODER OPTIONS
+
+ File output
+
+ Use Project output path : Yes
+ Output directory : coder\
+ System source file : sta_connection.c
+ System header file : sta_connection.h
+ Action expressions header file : sta_connectionAction.h
+ Action functions header file :
+ Constants header file :
+ External variables source file :
+ External variables header file :
+ System data source file : sta_connectionData.c
+ System data header file : sta_connectionData.h
+ System binary file : $(SYSNAME).sld
+
+
+ Code
+
+ Const system structure : Yes
+ Const guard expression fpt : Yes
+ Const action expression fpt : Yes
+ Static model elements : No
+ Merged guard expressions : No
+ Merged action expressions : No
+ Use guard type cast : Yes
+ Use auto variables : Yes
+
+
+ Style
+
+ System structure name : sta_connection
+ Action expression collection name : STA_ConnectionVSAction
+
+
+ Extended keywords
+
+ C51 variable segment : None
+ External variable keyword :
+ Internal variable keyword :
+ Double buffer data keyword :
+
+
+ API functions
+
+ Include SemInitAll : No
+
+
+ Names
+
+ Event name printing : No text
+ State name printing : No text
+ Action function printing : No text
+ Event name format : No conversion
+ State name format : Do not print
+ Action function format : Do not print
+ State machine format : Do not print
+
+
+MODEL CHARACTERISTICS
+
+ Model elements
+
+ Events : 5
+ Event groups : 0
+ Action functions : 0
+ Internal variables : 0
+ External variables : 0
+ Signals : 0
+ Constants : 0
+
+
+ Model components
+
+ State chart files : 1
+ States : 3
+ State machines : 1
+ Transitions : 5
+ Guard expressions : 0
+ Assignments : 0
+
+
+ Model parameters
+
+ Instances : 18
+ Signal queue size : 0
+
+
+GENERATED STATISTICS
+
+ Maximum number of rule elements
+
+ Positive state conditions : 1
+ Negative state conditions : 0
+ Guard expressions : 0
+ Action expressions : 0
+ Next states : 1
+ Signals : 0
+
+
+ Files
+
+ System source file : sta_connection.c
+ System header file : sta_connection.h
+ Action expressions header file : sta_connectionAction.h
+ System data source file : sta_connectionData.c
+ System data header file : sta_connectionData.h
+
+
+ Identifier names
+
+ Rule base : sta_connection
+
+
+ Size information
+
+ Core logic size in bytes : 144
+ Number of guard expressions : 0
+ Number of action expressions : 0
+
+
+******************************************************************************
+
+SUMMARY INFORMATION
+
+ Maximum number of rule elements
+
+ Positive state conditions : 5
+ Negative state conditions : 1
+ Guard expressions : 0
+ Action expressions : 4
+ Next states : 10
+ Signals : 0
+
+
+ Core logic information
+
+ Applied rule data format no. : 4
+ Rule data header word width : 16 bit
+ Rule data width : 16 bit
+
+
+ Accumulated size information
+
+ Core logic size in bytes : 1494
+ Number of guard expressions : 0
+ Number of action expressions : 39
+
+
+ Compilation
+
+ Errors : 0
+ Warnings : 0
+
+
+******************************************************************************
+
diff --git a/cesar/VisualState/create_TestAll.txt b/cesar/VisualState/create_TestAll.txt
new file mode 100644
index 0000000000..04b3e1dc41
--- /dev/null
+++ b/cesar/VisualState/create_TestAll.txt
@@ -0,0 +1,10 @@
+awk 'NR<32 {print > "Test_ALL.vlg"}' Test_USTA.vlg
+awk 'NR>=32 && $1 != "******************************************************************************" {print >> "Test_ALL.vlg"}' Test_SmallFSM.vlg
+awk 'NR>32 && $1 != "******************************************************************************" {print >> "Test_ALL.vlg"}' Test_INIT_SYSTEM.vlg
+awk 'NR>32 && $1 != "******************************************************************************" {print >> "Test_ALL.vlg"}' Test_POND.vlg
+awk 'NR>32 && $1 != "******************************************************************************" {print >> "Test_ALL.vlg"}' Test_USTA.vlg
+awk 'NR>32 && $1 != "******************************************************************************" {print >> "Test_ALL.vlg"}' Test_UCCO.vlg
+awk 'NR>32 && $1 != "******************************************************************************" {print >> "Test_ALL.vlg"}' Test_STA.vlg
+awk 'NR>32 {print >> "Test_ALL.vlg"}' Test_CCO.vlg
+
+rm *.bak
diff --git a/cesar/VisualState/sub/Topstate1.vsr b/cesar/VisualState/sub/Topstate1.vsr
new file mode 100644
index 0000000000..6a638d863f
--- /dev/null
+++ b/cesar/VisualState/sub/Topstate1.vsr
@@ -0,0 +1,704 @@
+@visualSTATE @RuleBase @Format2 "NoName"
+
+@Directives
+
+ @visualSTATE 5-4-0-1273;
+ @Date 2008-02-15;
+ @Time 16:05:36;
+ [[ Expl = "This is the main FSM." ]]
+
+
+@Declaration
+
+ @ActionFunction
+ VS_VOID cp_station_set_assoc_status(VS_BOOL associated),
+ VS_VOID cp_station_set_auth_status(VS_BOOL is_authenticated),
+ VS_VOID cp_station_set_cco_status(VS_BOOL is_cco)
+ [[ Expl = "the station leave the cco state." ]],
+ VS_VOID init_system()
+ [[ File = "cp/station/inc/station_events.h" ]],
+ VS_VOID launch_bbt_timer()
+ [[ File = "cp/station/inc/station_events.h" ]],
+ VS_VOID launch_beacon_timer()
+ [[ File = "cp/station/inc/station_events.h" ]],
+ VS_VOID launch_ustt_timer()
+ [[ File = "cp/station/inc/station_events.h" ]],
+ VS_VOID process_cc_assoc_cnf(VS_VOIDPTR mme_address),
+ VS_VOID process_cc_assoc_req(VS_VOIDPTR mme_address),
+ VS_VOID process_cc_set_tei_map_ind(VS_VOIDPTR mme_address),
+ VS_VOID process_cc_set_tei_map_req(VS_VOIDPTR mme_address),
+ VS_VOID process_drv_set_avln_hfid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_cco_preference(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_dpw_req(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_m_sta_hfid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_mac_address(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_nid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_npw(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_sl(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_snid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_tonemask(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_u_sta_hfid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_was_cco(VS_VOIDPTR msg),
+ VS_VOID process_drv_start_mac_req(VS_VOIDPTR msg),
+ VS_VOID process_usta_mme(VS_VOIDPTR mme_address),
+ VS_VOID record_usta_mme(VS_VOIDPTR mme_address),
+ VS_VOID send_discover_beacon_as_ucco()
+ [[ Expl = "this function will send a discover beacon, and relaunch a timer of 10ms 0x0d0x0afor the next discover beacon."
+ ]],
+ VS_VOID station_bbt_expires(),
+ VS_VOID trace_cco(),
+ VS_VOID trace_pond(),
+ VS_VOID trace_sta(),
+ VS_VOID trace_ucco(),
+ VS_VOID trace_usta(),
+ VS_VOID transmit_unassoc_sta_mme(),
+ VS_VOID try_associate(VS_VOIDPTR beacon_address)
+ [[ Expl = "see fig 7-76 and 7-770x0d0x0athe station had received a beacon, so it will check the NID, and if if match,0x0d0x0asend a CC_ASSOC.REQ to try to associate with the detected CCO."
+ ]];
+
+
+@Definition
+
+ @Event
+ AUTHENTIFIE_STA(),
+ BBT_EXPIRES(),
+ BEACON_DETECTED(VS_VOIDPTR beacon_address),
+ BEACON_TIMER_EXPIRES(),
+ BECOME_BACKUP_CCO(),
+ BECOME_PCO(),
+ HANDOVER_DONE(),
+ JOIN_WAIT_TIMER_EXPIRES(),
+ LEAVE_BACKUP_CCO(),
+ LEAVE_PCO(),
+ POND_TO_UCCO(),
+ RECEIVE_CC_ASSOC_CNF(VS_VOIDPTR mme_address),
+ RECEIVE_CC_ASSOC_REQ(VS_VOIDPTR mme_address),
+ RECEIVE_CC_SET_TEI_MAP_IND(VS_VOIDPTR mme_address)
+ [[ Expl = "11.2.35" ]],
+ RECEIVE_CC_SET_TEI_MAP_REQ(VS_VOIDPTR mme_address)
+ [[ Expl = "11.2.34" ]],
+ RECEIVE_DRV_MAC_START_REQ(VS_VOIDPTR msg),
+ RECEIVE_DRV_MAC_STOP_IND(),
+ RECEIVE_DRV_SET_AVLN_HFID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_CCO_PREFERENCE_REQ(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_DPW_REQ(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_MAC_ADDRESS(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_M_STA_HFID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_NID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_NPW_REQ(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_SL(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_SNID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_TONEMASK(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_U_STA_HFID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_WAS_CCO(VS_VOIDPTR msg),
+ RECEIVE_USTA_MME(VS_VOIDPTR mme_address),
+ SC_ADD(),
+ SC_JOIN(),
+ SC_TIMER_EXPIRES(),
+ TO_CCO(),
+ TO_HANDOVER(),
+ TO_HANDOVER_IN_PROGRESS(),
+ TO_STA(),
+ TO_USTA(),
+ UCCO_MAX_DISCOVER_EXPIRES()
+ [[ Expl = "as UCCO, we must send a discover beacon every MaxDiscoverPeriod."
+ ]],
+ UNAUTHENTIFIE_STA(),
+ USTT_EXPIRES();
+
+ @EventGroup
+ USTA_TO_CCO(TO_CCO, SC_ADD)
+ [[ Expl = "this will trigger when the station should become CCo, 0x0d0x0aor when it is usta and in sc-add state (see 7.4.1, last 0xa7)"
+ ]];
+
+
+@Implementation
+
+ @StateMachine StateMachineSpec_10 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry
+ #launch_beacon_timer();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_9 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry;
+
+ @Exit
+ #cp_station_set_cco_status(0);
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_8 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry
+ #trace_usta();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule
+ RECEIVE_USTA_MME(mme_address) : #process_usta_mme(mme_address);
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_7 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry
+ #launch_bbt_timer(),
+ #trace_pond();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule
+ BBT_EXPIRES() : #station_bbt_expires(),
+ RECEIVE_USTA_MME(mme_address) : #record_usta_mme(mme_address);
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_6 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry
+ #trace_ucco(),
+ #send_discover_beacon_as_ucco();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule
+ UCCO_MAX_DISCOVER_EXPIRES() : #send_discover_beacon_as_ucco();
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_5 (@State StateArgument_13,
+ @State StateArgument_6) =
+
+ @State
+ NORMAL
+ [[ Pos440 = "226 96 318 121 16 1 1638401" ]],
+ @Initial _InitialState5
+ [[ Pos440 = "130 96 150 116 114689" ]],
+ HANDOVER
+ [[ Expl = "A handover will happend, and the station is part of it. If it is STA, it will become CCO and if it is CCO, it will become STA."
+ , Pos440 = "410 66 502 91 16 1 1638401" ]],
+ HANDOVER_IN_PROGRESS
+ [[ Expl = "The handover countdown (in beacon) is running, so some messages are not allowed. The STA is not implied in the current handover."
+ , Pos440 = "417 132 640 157 16 1 1638401" ]],
+ NO_AVLN_TO_TRACK
+ [[ Pos440 = "210 244 356 318 16 1 1638401" ]],
+ AVLN_TO_TRACK = StateMachineSpec_10
+ [[ Pos440 = "464 244 610 318 16 1 1638401" ]],
+ @Initial _InitialState6
+ [[ Pos440 = "94 272 114 292 114689" ]],
+ NOT_PCCO
+ [[ Pos440 = "237 493 329 518 16 1 1638401" ]],
+ @Initial _InitialState7
+ [[ Pos440 = "145 493 165 513 114689" ]],
+ PCCO
+ [[ Pos440 = "401 493 493 518 16 1 1638401" ]],
+ BACKUP_CCO
+ [[ Pos440 = "446 660 572 685 16 1 1638401" ]],
+ NOT_BACKUP
+ [[ Pos440 = "202 660 328 685 16 1 1638401" ]],
+ @Initial _InitialState8
+ [[ Pos440 = "125 657 145 677 114689" ]],
+ SC_NONE
+ [[ Pos440 = "226 858 329 894 16 1 1638401" ]],
+ SC_ADD
+ [[ Pos440 = "392 858 495 894 16 1 1638401" ]],
+ SC_JOIN
+ [[ Pos440 = "392 964 495 1000 16 1 1638401" ]],
+ @Initial _InitialState9
+ [[ Pos440 = "267 773 287 793 114689" ]];
+
+ @StateRegion
+ Handover_Region (NORMAL, _InitialState5, HANDOVER, HANDOVER_IN_PROGRESS)
+ [[ Pos440 = "0 0 683 148" ]],
+ AVLN_Tracking (NO_AVLN_TO_TRACK, AVLN_TO_TRACK, _InitialState6)
+ [[ Pos440 = "0 1 683 234" ]],
+ Proxy_CCO (NOT_PCCO, _InitialState7, PCCO)
+ [[ Pos440 = "0 2 683 173" ]],
+ BackupCCO (BACKUP_CCO, NOT_BACKUP, _InitialState8)
+ [[ Pos440 = "0 3 683 168" ]],
+ SC_Level (SC_NONE, SC_ADD, SC_JOIN, _InitialState9)
+ [[ Pos440 = "0 4 683 265" ]];
+
+ @Entry;
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ TO_HANDOVER_IN_PROGRESS() @Src NORMAL : @Dest HANDOVER_IN_PROGRESS
+ [[ Pos440 = "388 110 601 131 0 809894016 92 19 0 5" ]],
+ TO_HANDOVER() @Src NORMAL : @Dest HANDOVER
+ [[ Pos440 = "272 40 432 70 1 809894017 76 0 343 75 0 0" ]],
+ @NoEvent @Src _InitialState5 : @Dest NORMAL
+ [[ Pos440 = "150 76 230 106 0 809894016 20 10 0 10" ]],
+ HANDOVER_DONE() @Src HANDOVER : @Dest NORMAL
+ [[ Pos440 = "380 91 531 121 1 809894017 0 17 368 102 92 12" ]],
+ HANDOVER_DONE() @Src HANDOVER_IN_PROGRESS : @Dest NORMAL
+ [[ Pos440 = "256 145 395 175 0 809894016 0 20 62 25" ]],
+ BEACON_DETECTED(beacon_address) @Src NO_AVLN_TO_TRACK : @Dest
+ AVLN_TO_TRACK
+ [[ Pos440 = "356 249 483 279 0 809894016 146 35 0 35" ]],
+ BEACON_DETECTED(beacon_address) @Src AVLN_TO_TRACK : @Dest AVLN_TO_TRACK
+ [[ Pos440 = "558 325 704 355 1 809894017 146 13 633 276 146 59" ]],
+ BEACON_TIMER_EXPIRES() @Src AVLN_TO_TRACK : @Dest NO_AVLN_TO_TRACK
+ [[ Pos440 = "317 383 505 402 1 809894017 75 74 394 379 64 74" ]],
+ @NoEvent @Src _InitialState6 : @Dest NO_AVLN_TO_TRACK
+ [[ Pos440 = "114 252 194 282 0 809894016 20 10 0 38" ]],
+ BECOME_PCO() @Src NOT_PCCO : @Dest PCCO
+ [[ Pos440 = "274 442 408 465 1 809894017 76 0 354 472 0 0" ]],
+ @NoEvent @Src _InitialState7 : @Dest NOT_PCCO
+ [[ Pos440 = "165 473 245 503 0 809894016 20 10 0 10" ]],
+ LEAVE_PCO() @Src PCCO : @Dest NOT_PCCO
+ [[ Pos440 = "318 538 443 568 1 809894017 4 25 363 538 84 25" ]],
+ LEAVE_BACKUP_CCO() @Src BACKUP_CCO : @Dest NOT_BACKUP
+ [[ Pos440 = "292 705 463 735 1 809894017 5 25 383 705 115 25" ]],
+ BECOME_BACKUP_CCO() @Src NOT_BACKUP !StateArgument_13 : @Dest BACKUP_CCO
+ [[ Expl = "This transition will fire for message CC_BACKUP_APPOINT_REQ.0x0d0x0asee 11.2.3"
+ , Pos440 = "295 608 411 638 1 809894017 104 0 375 638 0 0" ]],
+ @NoEvent @Src _InitialState8 : @Dest NOT_BACKUP
+ [[ Pos440 = "145 637 225 667 0 809894016 20 10 0 10" ]],
+ SC_ADD() @Src SC_NONE : @Dest SC_ADD
+ [[ Pos440 = "310 832 429 855 0 809894016 103 9 0 9" ]],
+ SC_JOIN() @Src SC_NONE : @Dest SC_JOIN
+ [[ Pos440 = "281 933 404 963 1 809894017 51 36 307 960 0 17" ]],
+ SC_TIMER_EXPIRES() @Src SC_ADD : @Dest SC_NONE
+ [[ Pos440 = "295 891 461 921 0 809894016 0 25 103 25" ]],
+ TO_CCO() @Src SC_JOIN StateArgument_6 : @Dest SC_ADD
+ [[ Expl = "see 7.3.4.4 two unassociated sta, both in SC-Join0x0d0x0a\"If it is the one to become CCo, it shall change it state to SC-Add\""
+ , Pos440 = "448 917 624 940 0 809894016 50 0 50 36" ]],
+ SC_TIMER_EXPIRES() @Src SC_JOIN : @Dest SC_NONE
+ [[ Pos440 = "229 998 402 1028 1 809894017 0 29 297 971 34 36" ]],
+ @NoEvent @Src _InitialState9 : @Dest SC_NONE
+ [[ Pos440 = "277 763 357 793 0 809894016 10 20 51 0" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_4 =
+
+ @State;
+
+ @StateRegion
+ Region1
+ [[ Pos440 = "0 0 152 59" ]];
+
+ @Entry
+ #cp_station_set_auth_status(1);
+
+ @Exit
+ #cp_station_set_auth_status(0);
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_3 =
+
+ @State
+ UNAUTHENTICATED
+ [[ Pos440 = "111 705 263 730 16 1 1638401" ]],
+ @Initial _InitialState3
+ [[ Pos440 = "113 668 133 688 114689" ]],
+ AUTHENTICATED = StateMachineSpec_4
+ [[ Pos440 = "111 761 263 893 73 1 1638401" ]];
+
+ @StateRegion
+ Region1 (UNAUTHENTICATED, _InitialState3, AUTHENTICATED)
+ [[ Pos440 = "0 0 181 243" ]];
+
+ @Entry
+ #trace_sta();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ AUTHENTIFIE_STA() @Src UNAUTHENTICATED : @Dest AUTHENTICATED
+ [[ Pos440 = "105 735 185 754 0 809894016 22 25 22 0" ]],
+ @NoEvent @Src _InitialState3 : @Dest UNAUTHENTICATED
+ [[ Pos440 = "107 676 187 706 0 809894016 9 20 10 0" ]],
+ UNAUTHENTIFIE_STA() @Src AUTHENTICATED : @Dest UNAUTHENTICATED
+ [[ Pos440 = "206 735 286 765 0 809894016 111 0 111 25" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_2 (@State StateArgument_47,
+ @State StateArgument_58, @State StateArgument_59, @State StateArgument_54)
+ =
+
+ @State
+ CCO = StateMachineSpec_9
+ [[ Pos440 = "570 711 751 895 16 1 1638401" ]],
+ @Initial _InitialState2
+ [[ Pos440 = "102 593 122 613 114689" ]],
+ ASSOCIATED_STA = StateMachineSpec_3
+ [[ Pos440 = "100 633 281 908 32 1 114689" ]],
+ @Junction _JunctionState0
+ [[ Pos440 = "639 664 659 684 1" ]],
+ @ConnectorStart from_CCO
+ [[ Pos440 = "645 918 747 938 114689" ]],
+ @ConnectorEnd to_CCO
+ [[ Pos440 = "633 946 737 966 114689" ]],
+ @ConnectorStart from_STA
+ [[ Pos440 = "201 917 283 937 114689" ]],
+ @ConnectorEnd to_STA
+ [[ Pos440 = "198 948 280 968 114689" ]];
+
+ @StateRegion
+ Region1 (CCO, _InitialState2, ASSOCIATED_STA, _JunctionState0,
+ @ConnectorStart from_CCO, @ConnectorEnd to_CCO, @ConnectorStart from_STA
+ , @ConnectorEnd to_STA)
+ [[ Pos440 = "0 0 684 397" ]];
+
+ @Entry
+ #cp_station_set_assoc_status(1);
+
+ @Exit
+ #cp_station_set_assoc_status(0);
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ HANDOVER_DONE() @Src CCO StateArgument_47 : @Dest
+ ASSOCIATED_STA.AUTHENTICATED
+ [[ Pos440 = "281 807 546 827 1 809894016 0 112 440 823 152 62" ]],
+ @NoEvent @Src CCO : @Dest from_CCO
+ [[ Pos440 = "622 926 702 956 1 809894018 55 184 622 926 0 9" ]],
+ @NoEvent @Src _InitialState2 : @Dest ASSOCIATED_STA
+ [[ Pos440 = "112 583 192 613 0 809894016 10 20 12 0" ]],
+ BEACON_TIMER_EXPIRES() @Src ASSOCIATED_STA StateArgument_58 : @Dest
+ _JunctionState0
+ [[ Pos440 = "330 657 609 679 0 809894016 181 42 0 11" ]],
+ HANDOVER_DONE() @Src ASSOCIATED_STA StateArgument_47 : @Dest
+ _JunctionState0
+ [[ Pos440 = "326 634 586 660 1 809894018 181 16 544 652 9 0" ]],
+ @NoEvent @Src ASSOCIATED_STA : @Dest from_STA
+ [[ Pos440 = "175 926 255 956 1 809894018 75 275 175 926 0 9" ]],
+ @NoEvent @Src _JunctionState0 : @Dest CCO StateArgument_59
+ StateArgument_54 #cp_station_set_cco_status(1) #trace_cco()
+ [[ Pos440 = "662 686 742 709 0 809894016 12 20 81 0" ]],
+ @NoEvent @Src to_CCO : @Dest CCO
+ [[ Pos440 = "544 939 624 969 1 809894018 0 8 597 952 27 184" ]],
+ @NoEvent @Src to_STA : @Dest ASSOCIATED_STA
+ [[ Pos440 = "156 925 236 955 1 809894018 0 9 156 955 56 275" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_1 (@State StateArgument_51) =
+
+ @State
+ POND = StateMachineSpec_7
+ [[ Pos440 = "114 245 368 324 16 1 1638401" ]],
+ USTA = StateMachineSpec_8
+ [[ Pos440 = "476 245 730 324 16 1 1638401" ]],
+ @Initial _InitialState1
+ [[ Pos440 = "95 219 115 239 114689" ]];
+
+ @StateRegion
+ Region1 (POND, USTA, _InitialState1)
+ [[ Pos440 = "0 0 684 142" ]];
+
+ @Entry
+ #launch_ustt_timer();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule
+ USTT_EXPIRES() : #launch_ustt_timer(),
+ USTT_EXPIRES() StateArgument_51 : #transmit_unassoc_sta_mme(),
+ BEACON_DETECTED(beacon_address) : #try_associate(beacon_address),
+ RECEIVE_CC_ASSOC_CNF(mme_address) : #process_cc_assoc_cnf(mme_address);
+
+ @TransitionRule
+ TO_USTA() @Src POND : @Dest USTA
+ [[ Pos440 = "370 260 473 282 0 809894016 254 36 0 36" ]],
+ @NoEvent @Src _InitialState1 : @Dest POND
+ [[ Pos440 = "157 215 179 239 0 809894016 20 15 23 0" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_0 (@State StateArgument_51,
+ @State StateArgument_50, @State StateArgument_47, @State StateArgument_58,
+ @State StateArgument_59, @State StateArgument_54) =
+
+ @State
+ UCCO = StateMachineSpec_6
+ [[ Pos440 = "250 441 768 499 16 1 1638401" ]],
+ POND_OR_USTA = StateMachineSpec_1 (StateArgument_51)
+ [[ Pos440 = "84 157 768 355 56 1 114689" ]],
+ STA_OR_CCO = StateMachineSpec_2 (StateArgument_47, StateArgument_58,
+ StateArgument_59, StateArgument_54)
+ [[ Pos440 = "84 548 768 981 36 1 114689" ]],
+ @Initial _InitialState4
+ [[ Pos440 = "27 166 47 186 114689" ]];
+
+ @StateRegion
+ Region1 (UCCO, POND_OR_USTA, STA_OR_CCO, _InitialState4)
+ [[ Pos440 = "0 0 779 879" ]];
+
+ @Entry;
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ BEACON_DETECTED(beacon_address) @Src UCCO : @Dest POND_OR_USTA.USTA
+ [[ Pos440 = "527 389 707 412 0 809894016 366 0 140 79" ]],
+ RECEIVE_CC_ASSOC_REQ(mme_address) @Src UCCO : @Dest
+ STA_OR_CCO._JunctionState0 #process_cc_assoc_req(mme_address)
+ [[ Pos440 = "562 506 748 529 0 809894016 425 58 20 7" ]],
+ USTA_TO_CCO() @Src POND_OR_USTA : @Dest STA_OR_CCO._JunctionState0
+ [[ Pos440 = "571 422 748 444 0 809894016 567 198 12 0" ]],
+ TO_STA() @Src POND_OR_USTA : @Dest STA_OR_CCO
+ [[ Pos440 = "108 366 287 387 0 809894016 112 198 112 0" ]],
+ POND_TO_UCCO() @Src POND_OR_USTA.POND StateArgument_50 : @Dest UCCO
+ [[ Pos440 = "244 357 420 377 0 809894016 225 79 89 0" ]],
+ BEACON_TIMER_EXPIRES() @Src POND_OR_USTA.USTA : @Dest UCCO
+ [[ Pos440 = "452 364 585 384 0 809894016 19 79 245 0" ]],
+ JOIN_WAIT_TIMER_EXPIRES() @Src STA_OR_CCO.CCO StateArgument_50 : @Dest
+ UCCO
+ [[ Pos440 = "639 618 814 637 0 809894016 162 0 482 58" ]],
+ JOIN_WAIT_TIMER_EXPIRES() @Src STA_OR_CCO.CCO StateArgument_51 : @Dest
+ POND_OR_USTA.USTA
+ [[ Pos440 = "609 581 790 611 0 809894016 134 0 229 79" ]],
+ BEACON_TIMER_EXPIRES() @Src STA_OR_CCO.ASSOCIATED_STA !StateArgument_58 :
+ @Dest POND_OR_USTA.POND
+ [[ Pos440 = "80 407 236 430 0 809894016 57 0 43 79" ]],
+ TO_USTA() @Src STA_OR_CCO.ASSOCIATED_STA : @Dest POND_OR_USTA.USTA
+ [[ Pos440 = "244 514 398 535 0 809894016 160 0 0 79" ]],
+ @NoEvent @Src _InitialState4 : @Dest POND_OR_USTA
+ [[ Pos440 = "47 146 127 176 0 809894016 20 10 0 19" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @TopStateMachine Station =
+
+ @State
+ @Initial _InitialState0
+ [[ Pos440 = "6 6 44 44 114689" ]],
+ ON = StateMachineSpec_0 (SMALL_FSM.AVLN_TO_TRACK,
+ SMALL_FSM.NO_AVLN_TO_TRACK, SMALL_FSM.HANDOVER, SMALL_FSM.BACKUP_CCO,
+ SMALL_FSM.NOT_BACKUP, SMALL_FSM.NOT_PCCO)
+ [[ Pos440 = "6 110 785 1020 31 1 114689" ]],
+ @ConnectorEnd from_CCO
+ [[ Pos440 = "808 16 897 41 114689" ]],
+ @ConnectorStart to_CCO
+ [[ Pos440 = "1494 16 1573 41 114689" ]],
+ @Junction _JunctionState1
+ [[ Pos440 = "842 75 862 95 1" ]],
+ @Junction _JunctionState2
+ [[ Pos440 = "1523 75 1543 95 1" ]],
+ @ConnectorEnd from_STA
+ [[ Pos440 = "8 1061 89 1081 114689" ]],
+ @ConnectorStart to_STA
+ [[ Pos440 = "685 1061 766 1081 114689" ]],
+ @Junction _JunctionState3
+ [[ Pos440 = "38 1121 58 1141 1" ]],
+ @Junction _JunctionState4
+ [[ Pos440 = "715 1121 735 1141 1" ]],
+ INIT_SYSTEM
+ [[ Pos440 = "200 26 593 76 16 1 1638401" ]],
+ @ConnectorStart from_INIT
+ [[ Pos440 = "632 28 738 48 114689" ]],
+ @ConnectorEnd from_INIT
+ [[ Pos440 = "824 1069 944 1089 114689" ]],
+ @ConnectorEnd to_INIT
+ [[ Pos440 = "624 54 735 74 114689" ]],
+ @ConnectorStart to_INIT
+ [[ Pos440 = "1402 1066 1492 1086 114689" ]],
+ @Junction _JunctionState5
+ [[ Pos440 = "869 1135 889 1155 1" ]],
+ @Junction _JunctionState6
+ [[ Pos440 = "1437 1131 1457 1151 1" ]],
+ SMALL_FSM = StateMachineSpec_5 (ON.STA_OR_CCO.CCO, ON.POND_OR_USTA)
+ [[ Pos440 = "26 17 709 1021 16 1 114689" ]];
+
+ @StateRegion
+ @OffPage Station (_InitialState0, ON, @ConnectorEnd from_CCO,
+ @ConnectorStart to_CCO, _JunctionState1, _JunctionState2, @ConnectorEnd
+ from_STA, @ConnectorStart to_STA, _JunctionState3, _JunctionState4,
+ INIT_SYSTEM, @ConnectorStart from_INIT, @ConnectorEnd from_INIT,
+ @ConnectorEnd to_INIT, @ConnectorStart to_INIT, _JunctionState5,
+ _JunctionState6)
+ [[ Pos440 = "0 0 318 50", TextDisplayNote = "Preserve",
+ TextDisplayState = "Preserve", TextDisplayTransDesc = "Preserve",
+ View = "2 2 7" ]],
+ @OffPage Small_FSMs (SMALL_FSM)
+ [[ Pos440 = "1 0 148 50", TextDisplayNote = "Preserve",
+ TextDisplayState = "Preserve", TextDisplayTransDesc = "Preserve",
+ View = "2 2 7" ]];
+
+ @Entry;
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ @NoEvent @Src _InitialState0 : @Dest INIT_SYSTEM #init_system()
+ [[ Pos440 = "160 -114 284 -100 2 809894017 38 18 121 43 0 25" ]],
+ RECEIVE_DRV_MAC_STOP_IND() @Src ON : @Dest INIT_SYSTEM
+ [[ Pos440 = "61 86 295 104 0 809894016 280 0 86 50" ]],
+ @NoEvent @Src from_CCO : @Dest _JunctionState1
+ [[ Pos440 = "851 41 931 71 0 809894016 43 25 9 0" ]],
+ RECEIVE_CC_ASSOC_REQ(mme_address) @Src _JunctionState1 : @Dest
+ _JunctionState2 #process_cc_assoc_req(mme_address)
+ [[ Pos440 = "914 90 1485 120 1 809894018 20 11 884 110 0 9" ]],
+ RECEIVE_CC_SET_TEI_MAP_REQ(mme_address) @Src _JunctionState1 : @Dest
+ _JunctionState2 #process_cc_set_tei_map_req(mme_address)
+ [[ Pos440 = "908 128 1473 158 1 809894018 20 11 868 148 4 20" ]],
+ @NoEvent @Src _JunctionState2 : @Dest to_CCO
+ [[ Pos440 = "1531 45 1611 75 0 809894016 8 0 35 25" ]],
+ @NoEvent @Src from_STA : @Dest _JunctionState3
+ [[ Pos440 = "45 1051 125 1081 0 809894016 37 20 7 0" ]],
+ RECEIVE_CC_SET_TEI_MAP_IND(mme_address) @Src _JunctionState3 : @Dest
+ _JunctionState4 #process_cc_set_tei_map_ind(mme_address)
+ [[ Pos440 = "101 1144 671 1174 1 809894018 20 10 81 1164 0 20" ]],
+ @NoEvent @Src _JunctionState4 : @Dest to_STA
+ [[ Pos440 = "724 1121 804 1151 0 809894016 9 0 39 20" ]],
+ RECEIVE_DRV_MAC_START_REQ(msg) @Src INIT_SYSTEM : @Dest ON
+ #process_drv_start_mac_req(msg)
+ [[ Pos440 = "517 83 779 108 0 809894016 309 50 503 0" ]],
+ @NoEvent @Src INIT_SYSTEM : @Dest from_INIT
+ [[ Pos440 = "593 3 673 33 0 809894016 393 7 0 9" ]],
+ @NoEvent @Src from_INIT : @Dest _JunctionState5
+ [[ Pos440 = "801 1059 881 1089 0 809894016 57 20 9 0" ]],
+ @NoEvent @Src to_INIT : @Dest INIT_SYSTEM
+ [[ Pos440 = "575 12 655 42 0 809894016 0 9 393 37" ]],
+ RECEIVE_DRV_SET_MAC_ADDRESS(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_mac_address(msg)
+ [[ Pos440 = "916 1153 1420 1183 1 809894018 7 20 876 1183 1447 1174 8 20"
+ ]],
+ RECEIVE_DRV_SET_CCO_PREFERENCE_REQ(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_cco_preference(msg)
+ [[ Pos440 = "922 1211 1402 1241 1 809894018 0 12 893 1238 10 20" ]],
+ RECEIVE_DRV_SET_WAS_CCO(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_was_cco(msg)
+ [[ Pos440 = "919 1257 1426 1287 1 809894018 9 0 891 1285 20 11" ]],
+ RECEIVE_DRV_SET_NPW_REQ(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_npw(msg)
+ [[ Pos440 = "896 1311 1437 1341 1 809894018 12 20 953 1344 11 20" ]],
+ RECEIVE_DRV_SET_DPW_REQ(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_dpw_req(msg)
+ [[ Pos440 = "896 1363 1443 1393 1 809894018 0 10 948 1394 14 20" ]],
+ RECEIVE_DRV_SET_M_STA_HFID(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_m_sta_hfid(msg)
+ [[ Pos440 = "895 1423 1429 1453 1 809894018 7 20 887 1449 10 20" ]],
+ RECEIVE_DRV_SET_U_STA_HFID(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_u_sta_hfid(msg)
+ [[ Pos440 = "913 1463 1421 1493 1 809894018 12 20 909 1493 8 20" ]],
+ RECEIVE_DRV_SET_AVLN_HFID(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_avln_hfid(msg)
+ [[ Pos440 = "913 1516 1432 1546 1 809894018 20 7 908 1545 20 11" ]],
+ RECEIVE_DRV_SET_SL(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_sl(msg)
+ [[ Pos440 = "889 1570 1434 1600 1 809894018 0 13 984 1596 20 11" ]],
+ RECEIVE_DRV_SET_TONEMASK(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_tonemask(msg)
+ [[ Pos440 = "909 1618 1434 1648 1 809894018 7 20 884 1647 20 10" ]],
+ RECEIVE_DRV_SET_NID(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_nid(msg)
+ [[ Pos440 = "906 1662 1434 1692 1 809894018 10 0 921 1696 1448 1677 0 8"
+ ]],
+ RECEIVE_DRV_SET_SNID(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_snid(msg)
+ [[ Pos440 = "891 1713 1431 1743 1 809894018 0 6 898 1744 1457 1738 20 10"
+ ]],
+ @NoEvent @Src _JunctionState6 : @Dest to_INIT
+ [[ Pos440 = "1367 1131 1447 1161 0 809894016 10 0 65 20" ]];
+
+ @TerminationRule;
+
+ [[ Pos440 = "10 10 476 76 16 1 114689" ]]
+
+ @End;
+
diff --git a/cesar/VisualState/sub/Topstate1.vsr.bk1 b/cesar/VisualState/sub/Topstate1.vsr.bk1
new file mode 100644
index 0000000000..6baabb5252
--- /dev/null
+++ b/cesar/VisualState/sub/Topstate1.vsr.bk1
@@ -0,0 +1,704 @@
+@visualSTATE @RuleBase @Format2 "NoName"
+
+@Directives
+
+ @visualSTATE 5-4-0-1273;
+ @Date 2008-02-15;
+ @Time 11:49:24;
+ [[ Expl = "This is the main FSM." ]]
+
+
+@Declaration
+
+ @ActionFunction
+ VS_VOID cp_station_set_assoc_status(VS_BOOL associated),
+ VS_VOID cp_station_set_auth_status(VS_BOOL is_authenticated),
+ VS_VOID cp_station_set_cco_status(VS_BOOL is_cco)
+ [[ Expl = "the station leave the cco state." ]],
+ VS_VOID init_system()
+ [[ File = "cp/station/inc/station_events.h" ]],
+ VS_VOID launch_bbt_timer()
+ [[ File = "cp/station/inc/station_events.h" ]],
+ VS_VOID launch_beacon_timer()
+ [[ File = "cp/station/inc/station_events.h" ]],
+ VS_VOID launch_ustt_timer()
+ [[ File = "cp/station/inc/station_events.h" ]],
+ VS_VOID process_cc_assoc_cnf(VS_VOIDPTR mme_address),
+ VS_VOID process_cc_assoc_req(VS_VOIDPTR mme_address),
+ VS_VOID process_cc_set_tei_map_ind(VS_VOIDPTR mme_address),
+ VS_VOID process_cc_set_tei_map_req(VS_VOIDPTR mme_address),
+ VS_VOID process_drv_set_avln_hfid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_cco_preference(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_dpw_req(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_m_sta_hfid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_mac_address(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_nid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_npw(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_sl(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_snid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_tonemask(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_u_sta_hfid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_was_cco(VS_VOIDPTR msg),
+ VS_VOID process_drv_start_mac_req(VS_VOIDPTR msg),
+ VS_VOID process_usta_mme(VS_VOIDPTR mme_address),
+ VS_VOID record_usta_mme(VS_VOIDPTR mme_address),
+ VS_VOID send_discover_beacon_as_ucco()
+ [[ Expl = "this function will send a discover beacon, and relaunch a timer of 10ms 0x0d0x0afor the next discover beacon."
+ ]],
+ VS_VOID station_bbt_expires(),
+ VS_VOID trace_cco(),
+ VS_VOID trace_pond(),
+ VS_VOID trace_sta(),
+ VS_VOID trace_ucco(),
+ VS_VOID trace_usta(),
+ VS_VOID transmit_unassoc_sta_mme(),
+ VS_VOID try_associate(VS_VOIDPTR beacon_address)
+ [[ Expl = "see fig 7-76 and 7-770x0d0x0athe station had received a beacon, so it will check the NID, and if if match,0x0d0x0asend a CC_ASSOC.REQ to try to associate with the detected CCO."
+ ]];
+
+
+@Definition
+
+ @Event
+ AUTHENTIFIE_STA(),
+ BBT_EXPIRES(),
+ BEACON_DETECTED(VS_VOIDPTR beacon_address),
+ BEACON_TIMER_EXPIRES(),
+ BECOME_BACKUP_CCO(),
+ BECOME_PCO(),
+ HANDOVER_DONE(),
+ JOIN_WAIT_TIMER_EXPIRES(),
+ LEAVE_BACKUP_CCO(),
+ LEAVE_PCO(),
+ POND_TO_UCCO(),
+ RECEIVE_CC_ASSOC_CNF(VS_VOIDPTR mme_address),
+ RECEIVE_CC_ASSOC_REQ(VS_VOIDPTR mme_address),
+ RECEIVE_CC_SET_TEI_MAP_IND(VS_VOIDPTR mme_address)
+ [[ Expl = "11.2.35" ]],
+ RECEIVE_CC_SET_TEI_MAP_REQ(VS_VOIDPTR mme_address)
+ [[ Expl = "11.2.34" ]],
+ RECEIVE_DRV_MAC_START_REQ(VS_VOIDPTR msg),
+ RECEIVE_DRV_MAC_STOP_IND(),
+ RECEIVE_DRV_SET_AVLN_HFID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_CCO_PREFERENCE_REQ(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_DPW_REQ(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_MAC_ADDRESS(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_M_STA_HFID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_NID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_NPW_REQ(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_SL(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_SNID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_TONEMASK(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_U_STA_HFID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_WAS_CCO(VS_VOIDPTR msg),
+ RECEIVE_USTA_MME(VS_VOIDPTR mme_address),
+ SC_ADD(),
+ SC_JOIN(),
+ SC_TIMER_EXPIRES(),
+ TO_CCO(),
+ TO_HANDOVER(),
+ TO_HANDOVER_IN_PROGRESS(),
+ TO_STA(),
+ TO_USTA(),
+ UCCO_MAX_DISCOVER_EXPIRES()
+ [[ Expl = "as UCCO, we must send a discover beacon every MaxDiscoverPeriod."
+ ]],
+ UNAUTHENTIFIE_STA(),
+ USTT_EXPIRES();
+
+ @EventGroup
+ USTA_TO_CCO(TO_CCO, SC_ADD)
+ [[ Expl = "this will trigger when the station should become CCo, 0x0d0x0aor when it is usta and in sc-add state (see 7.4.1, last 0xa7)"
+ ]];
+
+
+@Implementation
+
+ @StateMachine StateMachineSpec_10 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry
+ #launch_beacon_timer();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_9 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry;
+
+ @Exit
+ #cp_station_set_cco_status(0);
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_8 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry
+ #trace_usta();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule
+ RECEIVE_USTA_MME(mme_address) : #process_usta_mme(mme_address);
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_7 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry
+ #launch_bbt_timer(),
+ #trace_pond();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule
+ BBT_EXPIRES() : #station_bbt_expires(),
+ RECEIVE_USTA_MME(mme_address) : #record_usta_mme(mme_address);
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_6 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry
+ #trace_ucco(),
+ #send_discover_beacon_as_ucco();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule
+ UCCO_MAX_DISCOVER_EXPIRES() : #send_discover_beacon_as_ucco();
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_5 (@State StateArgument_13,
+ @State StateArgument_6) =
+
+ @State
+ NORMAL
+ [[ Pos440 = "226 96 318 121 16 1 1638401" ]],
+ @Initial _InitialState5
+ [[ Pos440 = "130 96 150 116 114689" ]],
+ HANDOVER
+ [[ Expl = "A handover will happend, and the station is part of it. If it is STA, it will become CCO and if it is CCO, it will become STA."
+ , Pos440 = "410 66 502 91 16 1 1638401" ]],
+ HANDOVER_IN_PROGRESS
+ [[ Expl = "The handover countdown (in beacon) is running, so some messages are not allowed. The STA is not implied in the current handover."
+ , Pos440 = "417 132 640 157 16 1 1638401" ]],
+ NO_AVLN_TO_TRACK
+ [[ Pos440 = "210 244 356 318 16 1 1638401" ]],
+ AVLN_TO_TRACK = StateMachineSpec_10
+ [[ Pos440 = "464 244 610 318 16 1 1638401" ]],
+ @Initial _InitialState6
+ [[ Pos440 = "94 272 114 292 114689" ]],
+ NOT_PCCO
+ [[ Pos440 = "237 493 329 518 16 1 1638401" ]],
+ @Initial _InitialState7
+ [[ Pos440 = "145 493 165 513 114689" ]],
+ PCCO
+ [[ Pos440 = "401 493 493 518 16 1 1638401" ]],
+ BACKUP_CCO
+ [[ Pos440 = "446 660 572 685 16 1 1638401" ]],
+ NOT_BACKUP
+ [[ Pos440 = "202 660 328 685 16 1 1638401" ]],
+ @Initial _InitialState8
+ [[ Pos440 = "125 657 145 677 114689" ]],
+ SC_NONE
+ [[ Pos440 = "226 858 329 894 16 1 1638401" ]],
+ SC_ADD
+ [[ Pos440 = "392 858 495 894 16 1 1638401" ]],
+ SC_JOIN
+ [[ Pos440 = "392 964 495 1000 16 1 1638401" ]],
+ @Initial _InitialState9
+ [[ Pos440 = "267 773 287 793 114689" ]];
+
+ @StateRegion
+ Handover_Region (NORMAL, _InitialState5, HANDOVER, HANDOVER_IN_PROGRESS)
+ [[ Pos440 = "0 0 683 148" ]],
+ AVLN_Tracking (NO_AVLN_TO_TRACK, AVLN_TO_TRACK, _InitialState6)
+ [[ Pos440 = "0 1 683 234" ]],
+ Proxy_CCO (NOT_PCCO, _InitialState7, PCCO)
+ [[ Pos440 = "0 2 683 173" ]],
+ BackupCCO (BACKUP_CCO, NOT_BACKUP, _InitialState8)
+ [[ Pos440 = "0 3 683 168" ]],
+ SC_Level (SC_NONE, SC_ADD, SC_JOIN, _InitialState9)
+ [[ Pos440 = "0 4 683 265" ]];
+
+ @Entry;
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ TO_HANDOVER_IN_PROGRESS() @Src NORMAL : @Dest HANDOVER_IN_PROGRESS
+ [[ Pos440 = "388 110 601 131 0 809894016 92 19 0 5" ]],
+ TO_HANDOVER() @Src NORMAL : @Dest HANDOVER
+ [[ Pos440 = "272 40 432 70 1 809894017 76 0 343 75 0 0" ]],
+ @NoEvent @Src _InitialState5 : @Dest NORMAL
+ [[ Pos440 = "150 76 230 106 0 809894016 20 10 0 10" ]],
+ HANDOVER_DONE() @Src HANDOVER : @Dest NORMAL
+ [[ Pos440 = "380 91 531 121 1 809894017 0 17 368 102 92 12" ]],
+ HANDOVER_DONE() @Src HANDOVER_IN_PROGRESS : @Dest NORMAL
+ [[ Pos440 = "256 145 395 175 0 809894016 0 20 62 25" ]],
+ BEACON_DETECTED(beacon_address) @Src NO_AVLN_TO_TRACK : @Dest
+ AVLN_TO_TRACK
+ [[ Pos440 = "356 249 483 279 0 809894016 146 35 0 35" ]],
+ BEACON_DETECTED(beacon_address) @Src AVLN_TO_TRACK : @Dest AVLN_TO_TRACK
+ [[ Pos440 = "558 325 704 355 1 809894017 146 13 633 276 146 59" ]],
+ BEACON_TIMER_EXPIRES() @Src AVLN_TO_TRACK : @Dest NO_AVLN_TO_TRACK
+ [[ Pos440 = "317 383 505 402 1 809894017 75 74 394 379 64 74" ]],
+ @NoEvent @Src _InitialState6 : @Dest NO_AVLN_TO_TRACK
+ [[ Pos440 = "114 252 194 282 0 809894016 20 10 0 38" ]],
+ BECOME_PCO() @Src NOT_PCCO : @Dest PCCO
+ [[ Pos440 = "274 442 408 465 1 809894017 76 0 354 472 0 0" ]],
+ @NoEvent @Src _InitialState7 : @Dest NOT_PCCO
+ [[ Pos440 = "165 473 245 503 0 809894016 20 10 0 10" ]],
+ LEAVE_PCO() @Src PCCO : @Dest NOT_PCCO
+ [[ Pos440 = "318 538 443 568 1 809894017 4 25 363 538 84 25" ]],
+ LEAVE_BACKUP_CCO() @Src BACKUP_CCO : @Dest NOT_BACKUP
+ [[ Pos440 = "292 705 463 735 1 809894017 5 25 383 705 115 25" ]],
+ BECOME_BACKUP_CCO() @Src NOT_BACKUP !StateArgument_13 : @Dest BACKUP_CCO
+ [[ Expl = "This transition will fire for message CC_BACKUP_APPOINT_REQ.0x0d0x0asee 11.2.3"
+ , Pos440 = "295 608 411 638 1 809894017 104 0 375 638 0 0" ]],
+ @NoEvent @Src _InitialState8 : @Dest NOT_BACKUP
+ [[ Pos440 = "145 637 225 667 0 809894016 20 10 0 10" ]],
+ SC_ADD() @Src SC_NONE : @Dest SC_ADD
+ [[ Pos440 = "310 832 429 855 0 809894016 103 9 0 9" ]],
+ SC_JOIN() @Src SC_NONE : @Dest SC_JOIN
+ [[ Pos440 = "281 933 404 963 1 809894017 51 36 307 960 0 17" ]],
+ SC_TIMER_EXPIRES() @Src SC_ADD : @Dest SC_NONE
+ [[ Pos440 = "295 891 461 921 0 809894016 0 25 103 25" ]],
+ TO_CCO() @Src SC_JOIN StateArgument_6 : @Dest SC_ADD
+ [[ Expl = "see 7.3.4.4 two unassociated sta, both in SC-Join0x0d0x0a\"If it is the one to become CCo, it shall change it state to SC-Add\""
+ , Pos440 = "448 917 624 940 0 809894016 50 0 50 36" ]],
+ SC_TIMER_EXPIRES() @Src SC_JOIN : @Dest SC_NONE
+ [[ Pos440 = "229 998 402 1028 1 809894017 0 29 297 971 34 36" ]],
+ @NoEvent @Src _InitialState9 : @Dest SC_NONE
+ [[ Pos440 = "277 763 357 793 0 809894016 10 20 51 0" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_4 =
+
+ @State;
+
+ @StateRegion
+ Region1
+ [[ Pos440 = "0 0 152 59" ]];
+
+ @Entry
+ #cp_station_set_auth_status(1);
+
+ @Exit
+ #cp_station_set_auth_status(0);
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_3 =
+
+ @State
+ UNAUTHENTICATED
+ [[ Pos440 = "111 705 263 730 16 1 1638401" ]],
+ @Initial _InitialState3
+ [[ Pos440 = "113 668 133 688 114689" ]],
+ AUTHENTICATED = StateMachineSpec_4
+ [[ Pos440 = "111 761 263 893 73 1 1638401" ]];
+
+ @StateRegion
+ Region1 (UNAUTHENTICATED, _InitialState3, AUTHENTICATED)
+ [[ Pos440 = "0 0 181 243" ]];
+
+ @Entry
+ #trace_sta();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ AUTHENTIFIE_STA() @Src UNAUTHENTICATED : @Dest AUTHENTICATED
+ [[ Pos440 = "105 735 185 754 0 809894016 22 25 22 0" ]],
+ @NoEvent @Src _InitialState3 : @Dest UNAUTHENTICATED
+ [[ Pos440 = "107 676 187 706 0 809894016 9 20 10 0" ]],
+ UNAUTHENTIFIE_STA() @Src AUTHENTICATED : @Dest UNAUTHENTICATED
+ [[ Pos440 = "206 735 286 765 0 809894016 111 0 111 25" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_2 (@State StateArgument_47,
+ @State StateArgument_58, @State StateArgument_59, @State StateArgument_54)
+ =
+
+ @State
+ CCO = StateMachineSpec_9
+ [[ Pos440 = "570 711 751 895 16 1 1638401" ]],
+ @Initial _InitialState2
+ [[ Pos440 = "102 593 122 613 114689" ]],
+ ASSOCIATED_STA = StateMachineSpec_3
+ [[ Pos440 = "100 633 281 908 32 1 114689" ]],
+ @Junction _JunctionState0
+ [[ Pos440 = "639 664 659 684 1" ]],
+ @ConnectorStart from_CCO
+ [[ Pos440 = "645 918 747 938 114689" ]],
+ @ConnectorEnd to_CCO
+ [[ Pos440 = "633 946 737 966 114689" ]],
+ @ConnectorStart from_STA
+ [[ Pos440 = "201 917 283 937 114689" ]],
+ @ConnectorEnd to_STA
+ [[ Pos440 = "198 948 280 968 114689" ]];
+
+ @StateRegion
+ Region1 (CCO, _InitialState2, ASSOCIATED_STA, _JunctionState0,
+ @ConnectorStart from_CCO, @ConnectorEnd to_CCO, @ConnectorStart from_STA
+ , @ConnectorEnd to_STA)
+ [[ Pos440 = "0 0 684 397" ]];
+
+ @Entry
+ #cp_station_set_assoc_status(1);
+
+ @Exit
+ #cp_station_set_assoc_status(0);
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ HANDOVER_DONE() @Src CCO StateArgument_47 : @Dest
+ ASSOCIATED_STA.AUTHENTICATED
+ [[ Pos440 = "281 807 546 827 1 809894016 0 112 440 823 152 62" ]],
+ @NoEvent @Src CCO : @Dest from_CCO
+ [[ Pos440 = "622 926 702 956 1 809894018 55 184 622 926 0 9" ]],
+ @NoEvent @Src _InitialState2 : @Dest ASSOCIATED_STA
+ [[ Pos440 = "112 583 192 613 0 809894016 10 20 12 0" ]],
+ BEACON_TIMER_EXPIRES() @Src ASSOCIATED_STA StateArgument_58 : @Dest
+ _JunctionState0
+ [[ Pos440 = "330 657 609 679 0 809894016 181 42 0 11" ]],
+ HANDOVER_DONE() @Src ASSOCIATED_STA StateArgument_47 : @Dest
+ _JunctionState0
+ [[ Pos440 = "326 634 586 660 1 809894018 181 16 544 652 9 0" ]],
+ @NoEvent @Src ASSOCIATED_STA : @Dest from_STA
+ [[ Pos440 = "175 926 255 956 1 809894018 75 275 175 926 0 9" ]],
+ @NoEvent @Src _JunctionState0 : @Dest CCO StateArgument_59
+ StateArgument_54 #cp_station_set_cco_status(1) #trace_cco()
+ [[ Pos440 = "662 686 742 709 0 809894016 12 20 81 0" ]],
+ @NoEvent @Src to_CCO : @Dest CCO
+ [[ Pos440 = "544 939 624 969 1 809894018 0 8 597 952 27 184" ]],
+ @NoEvent @Src to_STA : @Dest ASSOCIATED_STA
+ [[ Pos440 = "156 925 236 955 1 809894018 0 9 156 955 56 275" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_1 (@State StateArgument_51) =
+
+ @State
+ POND = StateMachineSpec_7
+ [[ Pos440 = "114 245 368 324 16 1 1638401" ]],
+ USTA = StateMachineSpec_8
+ [[ Pos440 = "476 245 730 324 16 1 1638401" ]],
+ @Initial _InitialState1
+ [[ Pos440 = "95 219 115 239 114689" ]];
+
+ @StateRegion
+ Region1 (POND, USTA, _InitialState1)
+ [[ Pos440 = "0 0 684 142" ]];
+
+ @Entry
+ #launch_ustt_timer();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule
+ USTT_EXPIRES() : #launch_ustt_timer(),
+ USTT_EXPIRES() StateArgument_51 : #transmit_unassoc_sta_mme(),
+ BEACON_DETECTED(beacon_address) : #try_associate(beacon_address),
+ RECEIVE_CC_ASSOC_CNF(mme_address) : #process_cc_assoc_cnf(mme_address);
+
+ @TransitionRule
+ TO_USTA() @Src POND : @Dest USTA
+ [[ Pos440 = "370 260 473 282 0 809894016 254 36 0 36" ]],
+ @NoEvent @Src _InitialState1 : @Dest POND
+ [[ Pos440 = "157 215 179 239 0 809894016 20 15 23 0" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_0 (@State StateArgument_51,
+ @State StateArgument_50, @State StateArgument_47, @State StateArgument_58,
+ @State StateArgument_59, @State StateArgument_54) =
+
+ @State
+ UCCO = StateMachineSpec_6
+ [[ Pos440 = "250 441 768 499 16 1 1638401" ]],
+ POND_OR_USTA = StateMachineSpec_1 (StateArgument_51)
+ [[ Pos440 = "84 157 768 355 56 1 114689" ]],
+ STA_OR_CCO = StateMachineSpec_2 (StateArgument_47, StateArgument_58,
+ StateArgument_59, StateArgument_54)
+ [[ Pos440 = "84 548 768 981 36 1 114689" ]],
+ @Initial _InitialState4
+ [[ Pos440 = "27 166 47 186 114689" ]];
+
+ @StateRegion
+ Region1 (UCCO, POND_OR_USTA, STA_OR_CCO, _InitialState4)
+ [[ Pos440 = "0 0 779 879" ]];
+
+ @Entry;
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ BEACON_DETECTED(beacon_address) @Src UCCO : @Dest POND_OR_USTA.USTA
+ [[ Pos440 = "527 389 707 412 0 809894016 366 0 140 79" ]],
+ RECEIVE_CC_ASSOC_REQ(mme_address) @Src UCCO : @Dest
+ STA_OR_CCO._JunctionState0 #process_cc_assoc_req(mme_address)
+ [[ Pos440 = "562 506 748 529 0 809894016 425 58 20 7" ]],
+ USTA_TO_CCO() @Src POND_OR_USTA : @Dest STA_OR_CCO._JunctionState0
+ [[ Pos440 = "571 422 748 444 0 809894016 567 198 12 0" ]],
+ TO_STA() @Src POND_OR_USTA : @Dest STA_OR_CCO
+ [[ Pos440 = "108 366 287 387 0 809894016 112 198 112 0" ]],
+ POND_TO_UCCO() @Src POND_OR_USTA.POND StateArgument_50 : @Dest UCCO
+ [[ Pos440 = "244 357 420 377 0 809894016 225 79 89 0" ]],
+ BEACON_TIMER_EXPIRES() @Src POND_OR_USTA.USTA : @Dest UCCO
+ [[ Pos440 = "452 364 585 384 0 809894016 19 79 245 0" ]],
+ JOIN_WAIT_TIMER_EXPIRES() @Src STA_OR_CCO.CCO StateArgument_50 : @Dest
+ UCCO
+ [[ Pos440 = "639 618 814 637 0 809894016 162 0 482 58" ]],
+ JOIN_WAIT_TIMER_EXPIRES() @Src STA_OR_CCO.CCO StateArgument_51 : @Dest
+ POND_OR_USTA.USTA
+ [[ Pos440 = "609 581 790 611 0 809894016 134 0 229 79" ]],
+ BEACON_TIMER_EXPIRES() @Src STA_OR_CCO.ASSOCIATED_STA !StateArgument_58 :
+ @Dest POND_OR_USTA.POND
+ [[ Pos440 = "80 407 236 430 0 809894016 57 0 43 79" ]],
+ TO_USTA() @Src STA_OR_CCO.ASSOCIATED_STA : @Dest POND_OR_USTA.USTA
+ [[ Pos440 = "244 514 398 535 0 809894016 160 0 0 79" ]],
+ @NoEvent @Src _InitialState4 : @Dest POND_OR_USTA
+ [[ Pos440 = "47 146 127 176 0 809894016 20 10 0 19" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @TopStateMachine Station =
+
+ @State
+ @Initial _InitialState0
+ [[ Pos440 = "6 6 44 44 114689" ]],
+ ON = StateMachineSpec_0 (SMALL_FSM.AVLN_TO_TRACK,
+ SMALL_FSM.NO_AVLN_TO_TRACK, SMALL_FSM.HANDOVER, SMALL_FSM.BACKUP_CCO,
+ SMALL_FSM.NOT_BACKUP, SMALL_FSM.NOT_PCCO)
+ [[ Pos440 = "6 110 785 1020 31 1 114689" ]],
+ @ConnectorEnd from_CCO
+ [[ Pos440 = "808 16 897 41 114689" ]],
+ @ConnectorStart to_CCO
+ [[ Pos440 = "1494 16 1573 41 114689" ]],
+ @Junction _JunctionState1
+ [[ Pos440 = "842 75 862 95 1" ]],
+ @Junction _JunctionState2
+ [[ Pos440 = "1523 75 1543 95 1" ]],
+ @ConnectorEnd from_STA
+ [[ Pos440 = "8 1061 89 1081 114689" ]],
+ @ConnectorStart to_STA
+ [[ Pos440 = "685 1061 766 1081 114689" ]],
+ @Junction _JunctionState3
+ [[ Pos440 = "38 1121 58 1141 1" ]],
+ @Junction _JunctionState4
+ [[ Pos440 = "715 1121 735 1141 1" ]],
+ INIT_SYSTEM
+ [[ Pos440 = "200 26 593 76 16 1 1638401" ]],
+ @ConnectorStart from_INIT
+ [[ Pos440 = "632 28 738 48 114689" ]],
+ @ConnectorEnd from_INIT
+ [[ Pos440 = "824 1069 944 1089 114689" ]],
+ @ConnectorEnd to_INIT
+ [[ Pos440 = "624 54 735 74 114689" ]],
+ @ConnectorStart to_INIT
+ [[ Pos440 = "1402 1066 1492 1086 114689" ]],
+ @Junction _JunctionState5
+ [[ Pos440 = "869 1135 889 1155 1" ]],
+ @Junction _JunctionState6
+ [[ Pos440 = "1437 1131 1457 1151 1" ]],
+ SMALL_FSM = StateMachineSpec_5 (ON.STA_OR_CCO.CCO, ON.POND_OR_USTA)
+ [[ Pos440 = "26 17 709 1021 16 1 114689" ]];
+
+ @StateRegion
+ @OffPage Station (_InitialState0, ON, @ConnectorEnd from_CCO,
+ @ConnectorStart to_CCO, _JunctionState1, _JunctionState2, @ConnectorEnd
+ from_STA, @ConnectorStart to_STA, _JunctionState3, _JunctionState4,
+ INIT_SYSTEM, @ConnectorStart from_INIT, @ConnectorEnd from_INIT,
+ @ConnectorEnd to_INIT, @ConnectorStart to_INIT, _JunctionState5,
+ _JunctionState6)
+ [[ Pos440 = "0 0 318 50", TextDisplayNote = "Preserve",
+ TextDisplayState = "Preserve", TextDisplayTransDesc = "Preserve",
+ View = "2 2 7" ]],
+ @OffPage Small_FSMs (SMALL_FSM)
+ [[ Pos440 = "1 0 148 50", TextDisplayNote = "Preserve",
+ TextDisplayState = "Preserve", TextDisplayTransDesc = "Preserve",
+ View = "2 2 7" ]];
+
+ @Entry;
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ @NoEvent @Src _InitialState0 : @Dest INIT_SYSTEM #init_system()
+ [[ Pos440 = "160 -114 284 -100 2 809894017 38 18 121 43 0 25" ]],
+ RECEIVE_DRV_MAC_STOP_IND() @Src ON : @Dest INIT_SYSTEM
+ [[ Pos440 = "61 86 295 104 0 809894016 280 0 86 50" ]],
+ @NoEvent @Src from_CCO : @Dest _JunctionState1
+ [[ Pos440 = "851 41 931 71 0 809894016 43 25 9 0" ]],
+ RECEIVE_CC_ASSOC_REQ(mme_address) @Src _JunctionState1 : @Dest
+ _JunctionState2 #process_cc_assoc_req(mme_address)
+ [[ Pos440 = "914 90 1485 120 1 809894018 20 11 884 110 0 9" ]],
+ RECEIVE_CC_SET_TEI_MAP_REQ(mme_address) @Src _JunctionState1 : @Dest
+ _JunctionState2 #process_cc_set_tei_map_req(mme_address)
+ [[ Pos440 = "908 128 1473 158 1 809894018 20 11 868 148 4 20" ]],
+ @NoEvent @Src _JunctionState2 : @Dest to_CCO
+ [[ Pos440 = "1531 45 1611 75 0 809894016 8 0 35 25" ]],
+ @NoEvent @Src from_STA : @Dest _JunctionState3
+ [[ Pos440 = "45 1051 125 1081 0 809894016 37 20 7 0" ]],
+ RECEIVE_CC_SET_TEI_MAP_IND(mme_address) @Src _JunctionState3 : @Dest
+ _JunctionState4 #process_cc_set_tei_map_ind(mme_address)
+ [[ Pos440 = "101 1144 671 1174 1 809894018 20 10 81 1164 0 20" ]],
+ @NoEvent @Src _JunctionState4 : @Dest to_STA
+ [[ Pos440 = "724 1121 804 1151 0 809894016 9 0 39 20" ]],
+ RECEIVE_DRV_MAC_START_REQ(msg) @Src INIT_SYSTEM : @Dest ON
+ #process_drv_start_mac_req(msg)
+ [[ Pos440 = "517 83 779 108 0 809894016 309 50 503 0" ]],
+ @NoEvent @Src INIT_SYSTEM : @Dest from_INIT
+ [[ Pos440 = "593 3 673 33 0 809894016 393 7 0 9" ]],
+ @NoEvent @Src from_INIT : @Dest _JunctionState5
+ [[ Pos440 = "801 1059 881 1089 0 809894016 57 20 9 0" ]],
+ @NoEvent @Src to_INIT : @Dest INIT_SYSTEM
+ [[ Pos440 = "575 12 655 42 0 809894016 0 9 393 37" ]],
+ RECEIVE_DRV_SET_MAC_ADDRESS(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_mac_address(msg)
+ [[ Pos440 = "916 1153 1420 1183 1 809894018 7 20 876 1183 1447 1174 8 20"
+ ]],
+ RECEIVE_DRV_SET_CCO_PREFERENCE_REQ(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_cco_preference(msg)
+ [[ Pos440 = "922 1211 1402 1241 1 809894018 0 12 893 1238 10 20" ]],
+ RECEIVE_DRV_SET_WAS_CCO(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_was_cco(msg)
+ [[ Pos440 = "919 1257 1426 1287 1 809894018 9 0 891 1285 20 11" ]],
+ RECEIVE_DRV_SET_NPW_REQ(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_npw(msg)
+ [[ Pos440 = "896 1311 1437 1341 1 809894018 12 20 953 1344 11 20" ]],
+ RECEIVE_DRV_SET_DPW_REQ(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_dpw_req(msg)
+ [[ Pos440 = "896 1363 1443 1393 1 809894018 0 10 948 1394 14 20" ]],
+ RECEIVE_DRV_SET_M_STA_HFID(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_m_sta_hfid(msg)
+ [[ Pos440 = "895 1423 1429 1453 1 809894018 7 20 887 1449 10 20" ]],
+ RECEIVE_DRV_SET_U_STA_HFID(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_u_sta_hfid(msg)
+ [[ Pos440 = "913 1463 1421 1493 1 809894018 12 20 909 1493 8 20" ]],
+ RECEIVE_DRV_SET_AVLN_HFID(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_avln_hfid(msg)
+ [[ Pos440 = "913 1516 1432 1546 1 809894018 20 7 908 1545 20 11" ]],
+ RECEIVE_DRV_SET_SL(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_sl(msg)
+ [[ Pos440 = "889 1570 1434 1600 1 809894018 0 13 984 1596 20 11" ]],
+ RECEIVE_DRV_SET_TONEMASK(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_tonemask(msg)
+ [[ Pos440 = "909 1618 1434 1648 1 809894018 7 20 884 1647 20 10" ]],
+ RECEIVE_DRV_SET_NID(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_nid(msg)
+ [[ Pos440 = "906 1662 1434 1692 1 809894018 10 0 921 1696 1448 1677 0 8"
+ ]],
+ RECEIVE_DRV_SET_SNID(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_snid(msg)
+ [[ Pos440 = "891 1713 1431 1743 1 809894018 0 6 898 1744 1457 1738 20 10"
+ ]],
+ @NoEvent @Src _JunctionState6 : @Dest to_INIT
+ [[ Pos440 = "1367 1131 1447 1161 0 809894016 10 0 65 20" ]];
+
+ @TerminationRule;
+
+ [[ Pos440 = "10 10 476 76 16 1 114689" ]]
+
+ @End;
+
diff --git a/cesar/VisualState/sub/Topstate1.vsr.bk2 b/cesar/VisualState/sub/Topstate1.vsr.bk2
new file mode 100644
index 0000000000..0f43f42876
--- /dev/null
+++ b/cesar/VisualState/sub/Topstate1.vsr.bk2
@@ -0,0 +1,704 @@
+@visualSTATE @RuleBase @Format2 "NoName"
+
+@Directives
+
+ @visualSTATE 5-4-0-1273;
+ @Date 2008-02-15;
+ @Time 11:46:29;
+ [[ Expl = "This is the main FSM." ]]
+
+
+@Declaration
+
+ @ActionFunction
+ VS_VOID cp_station_set_assoc_status(VS_BOOL associated),
+ VS_VOID cp_station_set_auth_status(VS_BOOL is_authenticated),
+ VS_VOID cp_station_set_cco_status(VS_BOOL is_cco)
+ [[ Expl = "the station leave the cco state." ]],
+ VS_VOID init_system()
+ [[ File = "cp/station/inc/station_events.h" ]],
+ VS_VOID launch_bbt_timer()
+ [[ File = "cp/station/inc/station_events.h" ]],
+ VS_VOID launch_beacon_timer()
+ [[ File = "cp/station/inc/station_events.h" ]],
+ VS_VOID launch_ustt_timer()
+ [[ File = "cp/station/inc/station_events.h" ]],
+ VS_VOID process_cc_assoc_cnf(VS_VOIDPTR mme_address),
+ VS_VOID process_cc_assoc_req(VS_VOIDPTR mme_address),
+ VS_VOID process_cc_set_tei_map_ind(VS_VOIDPTR mme_address),
+ VS_VOID process_cc_set_tei_map_req(VS_VOIDPTR mme_address),
+ VS_VOID process_drv_set_avln_hfid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_cco_preference(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_dpw_req(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_m_sta_hfid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_mac_address(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_nid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_npw(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_sl(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_snid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_tonemask(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_u_sta_hfid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_was_cco(VS_VOIDPTR msg),
+ VS_VOID process_drv_start_mac_req(VS_VOIDPTR msg),
+ VS_VOID process_usta_mme(VS_VOIDPTR mme_address),
+ VS_VOID record_usta_mme(VS_VOIDPTR mme_address),
+ VS_VOID send_discover_beacon_as_ucco()
+ [[ Expl = "this function will send a discover beacon, and relaunch a timer of 10ms 0x0d0x0afor the next discover beacon."
+ ]],
+ VS_VOID station_bbt_expires(),
+ VS_VOID trace_cco(),
+ VS_VOID trace_pond(),
+ VS_VOID trace_sta(),
+ VS_VOID trace_ucco(),
+ VS_VOID trace_usta(),
+ VS_VOID transmit_unassoc_sta_mme(),
+ VS_VOID try_associate(VS_VOIDPTR beacon_address)
+ [[ Expl = "see fig 7-76 and 7-770x0d0x0athe station had received a beacon, so it will check the NID, and if if match,0x0d0x0asend a CC_ASSOC.REQ to try to associate with the detected CCO."
+ ]];
+
+
+@Definition
+
+ @Event
+ AUTHENTIFIE_STA(),
+ BBT_EXPIRES(),
+ BEACON_DETECTED(VS_VOIDPTR beacon_address),
+ BEACON_TIMER_EXPIRES(),
+ BECOME_BACKUP_CCO(),
+ BECOME_PCO(),
+ HANDOVER_DONE(),
+ JOIN_WAIT_TIMER_EXPIRES(),
+ LEAVE_BACKUP_CCO(),
+ LEAVE_PCO(),
+ POND_TO_UCCO(),
+ RECEIVE_CC_ASSOC_CNF(VS_VOIDPTR mme_address),
+ RECEIVE_CC_ASSOC_REQ(VS_VOIDPTR mme_address),
+ RECEIVE_CC_SET_TEI_MAP_IND(VS_VOIDPTR mme_address)
+ [[ Expl = "11.2.35" ]],
+ RECEIVE_CC_SET_TEI_MAP_REQ(VS_VOIDPTR mme_address)
+ [[ Expl = "11.2.34" ]],
+ RECEIVE_DRV_MAC_START_REQ(VS_VOIDPTR msg),
+ RECEIVE_DRV_MAC_STOP_IND(),
+ RECEIVE_DRV_SET_AVLN_HFID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_CCO_PREFERENCE_REQ(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_DPW_REQ(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_MAC_ADDRESS(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_M_STA_HFID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_NID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_NPW_REQ(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_SL(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_SNID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_TONEMASK(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_U_STA_HFID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_WAS_CCO(VS_VOIDPTR msg),
+ RECEIVE_USTA_MME(VS_VOIDPTR mme_address),
+ SC_ADD(),
+ SC_JOIN(),
+ SC_TIMER_EXPIRES(),
+ TO_CCO(),
+ TO_HANDOVER(),
+ TO_HANDOVER_IN_PROGRESS(),
+ TO_STA(),
+ TO_USTA(),
+ UCCO_MAX_DISCOVER_EXPIRES()
+ [[ Expl = "as UCCO, we must send a discover beacon every MaxDiscoverPeriod."
+ ]],
+ UNAUTHENTIFIE_STA(),
+ USTT_EXPIRES();
+
+ @EventGroup
+ USTA_TO_CCO(TO_CCO, SC_ADD)
+ [[ Expl = "this will trigger when the station should become CCo, 0x0d0x0aor when it is usta and in sc-add state (see 7.4.1, last 0xa7)"
+ ]];
+
+
+@Implementation
+
+ @StateMachine StateMachineSpec_10 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry
+ #launch_beacon_timer();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_9 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry;
+
+ @Exit
+ #cp_station_set_cco_status(0);
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_8 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry
+ #trace_usta();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule
+ RECEIVE_USTA_MME(mme_address) : #process_usta_mme(mme_address);
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_7 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry
+ #launch_bbt_timer(),
+ #trace_pond();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule
+ BBT_EXPIRES() : #station_bbt_expires(),
+ RECEIVE_USTA_MME(mme_address) : #record_usta_mme(mme_address);
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_6 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry
+ #trace_ucco(),
+ #send_discover_beacon_as_ucco();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule
+ UCCO_MAX_DISCOVER_EXPIRES() : #send_discover_beacon_as_ucco();
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_5 (@State StateArgument_13,
+ @State StateArgument_6) =
+
+ @State
+ NORMAL
+ [[ Pos440 = "226 96 318 121 16 1 1638401" ]],
+ @Initial _InitialState5
+ [[ Pos440 = "130 96 150 116 114689" ]],
+ HANDOVER
+ [[ Expl = "A handover will happend, and the station is part of it. If it is STA, it will become CCO and if it is CCO, it will become STA."
+ , Pos440 = "410 66 502 91 16 1 1638401" ]],
+ HANDOVER_IN_PROGRESS
+ [[ Expl = "The handover countdown (in beacon) is running, so some messages are not allowed. The STA is not implied in the current handover."
+ , Pos440 = "417 132 640 157 16 1 1638401" ]],
+ NO_AVLN_TO_TRACK
+ [[ Pos440 = "210 244 356 318 16 1 1638401" ]],
+ AVLN_TO_TRACK = StateMachineSpec_10
+ [[ Pos440 = "464 244 610 318 16 1 1638401" ]],
+ @Initial _InitialState6
+ [[ Pos440 = "94 272 114 292 114689" ]],
+ NOT_PCCO
+ [[ Pos440 = "237 493 329 518 16 1 1638401" ]],
+ @Initial _InitialState7
+ [[ Pos440 = "145 493 165 513 114689" ]],
+ PCCO
+ [[ Pos440 = "401 493 493 518 16 1 1638401" ]],
+ BACKUP_CCO
+ [[ Pos440 = "446 660 572 685 16 1 1638401" ]],
+ NOT_BACKUP
+ [[ Pos440 = "202 660 328 685 16 1 1638401" ]],
+ @Initial _InitialState8
+ [[ Pos440 = "125 657 145 677 114689" ]],
+ SC_NONE
+ [[ Pos440 = "226 858 329 894 16 1 1638401" ]],
+ SC_ADD
+ [[ Pos440 = "392 858 495 894 16 1 1638401" ]],
+ SC_JOIN
+ [[ Pos440 = "392 964 495 1000 16 1 1638401" ]],
+ @Initial _InitialState9
+ [[ Pos440 = "267 773 287 793 114689" ]];
+
+ @StateRegion
+ Handover_Region (NORMAL, _InitialState5, HANDOVER, HANDOVER_IN_PROGRESS)
+ [[ Pos440 = "0 0 683 148" ]],
+ AVLN_Tracking (NO_AVLN_TO_TRACK, AVLN_TO_TRACK, _InitialState6)
+ [[ Pos440 = "0 1 683 234" ]],
+ Proxy_CCO (NOT_PCCO, _InitialState7, PCCO)
+ [[ Pos440 = "0 2 683 173" ]],
+ BackupCCO (BACKUP_CCO, NOT_BACKUP, _InitialState8)
+ [[ Pos440 = "0 3 683 168" ]],
+ SC_Level (SC_NONE, SC_ADD, SC_JOIN, _InitialState9)
+ [[ Pos440 = "0 4 683 265" ]];
+
+ @Entry;
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ TO_HANDOVER_IN_PROGRESS() @Src NORMAL : @Dest HANDOVER_IN_PROGRESS
+ [[ Pos440 = "388 110 601 131 0 809894016 92 19 0 5" ]],
+ TO_HANDOVER() @Src NORMAL : @Dest HANDOVER
+ [[ Pos440 = "272 40 432 70 1 809894017 76 0 343 75 0 0" ]],
+ @NoEvent @Src _InitialState5 : @Dest NORMAL
+ [[ Pos440 = "150 76 230 106 0 809894016 20 10 0 10" ]],
+ HANDOVER_DONE() @Src HANDOVER : @Dest NORMAL
+ [[ Pos440 = "380 91 531 121 1 809894017 0 17 368 102 92 12" ]],
+ HANDOVER_DONE() @Src HANDOVER_IN_PROGRESS : @Dest NORMAL
+ [[ Pos440 = "256 145 395 175 0 809894016 0 20 62 25" ]],
+ BEACON_DETECTED(beacon_address) @Src NO_AVLN_TO_TRACK : @Dest
+ AVLN_TO_TRACK
+ [[ Pos440 = "356 249 483 279 0 809894016 146 35 0 35" ]],
+ BEACON_DETECTED(beacon_address) @Src AVLN_TO_TRACK : @Dest AVLN_TO_TRACK
+ [[ Pos440 = "558 325 704 355 1 809894017 146 13 633 276 146 59" ]],
+ BEACON_TIMER_EXPIRES() @Src AVLN_TO_TRACK : @Dest NO_AVLN_TO_TRACK
+ [[ Pos440 = "317 383 505 402 1 809894017 75 74 394 379 64 74" ]],
+ @NoEvent @Src _InitialState6 : @Dest NO_AVLN_TO_TRACK
+ [[ Pos440 = "114 252 194 282 0 809894016 20 10 0 38" ]],
+ BECOME_PCO() @Src NOT_PCCO : @Dest PCCO
+ [[ Pos440 = "274 442 408 465 1 809894017 76 0 354 472 0 0" ]],
+ @NoEvent @Src _InitialState7 : @Dest NOT_PCCO
+ [[ Pos440 = "165 473 245 503 0 809894016 20 10 0 10" ]],
+ LEAVE_PCO() @Src PCCO : @Dest NOT_PCCO
+ [[ Pos440 = "318 538 443 568 1 809894017 4 25 363 538 84 25" ]],
+ LEAVE_BACKUP_CCO() @Src BACKUP_CCO : @Dest NOT_BACKUP
+ [[ Pos440 = "292 705 463 735 1 809894017 5 25 383 705 115 25" ]],
+ BECOME_BACKUP_CCO() @Src NOT_BACKUP !StateArgument_13 : @Dest BACKUP_CCO
+ [[ Expl = "This transition will fire for message CC_BACKUP_APPOINT_REQ.0x0d0x0asee 11.2.3"
+ , Pos440 = "295 608 411 638 1 809894017 104 0 375 638 0 0" ]],
+ @NoEvent @Src _InitialState8 : @Dest NOT_BACKUP
+ [[ Pos440 = "145 637 225 667 0 809894016 20 10 0 10" ]],
+ SC_ADD() @Src SC_NONE : @Dest SC_ADD
+ [[ Pos440 = "310 832 429 855 0 809894016 103 9 0 9" ]],
+ SC_JOIN() @Src SC_NONE : @Dest SC_JOIN
+ [[ Pos440 = "281 933 404 963 1 809894017 51 36 307 960 0 17" ]],
+ SC_TIMER_EXPIRES() @Src SC_ADD : @Dest SC_NONE
+ [[ Pos440 = "295 891 461 921 0 809894016 0 25 103 25" ]],
+ TO_CCO() @Src SC_JOIN StateArgument_6 : @Dest SC_ADD
+ [[ Expl = "see 7.3.4.4 two unassociated sta, both in SC-Join0x0d0x0a\"If it is the one to become CCo, it shall change it state to SC-Add\""
+ , Pos440 = "448 917 624 940 0 809894016 50 0 50 36" ]],
+ SC_TIMER_EXPIRES() @Src SC_JOIN : @Dest SC_NONE
+ [[ Pos440 = "229 998 402 1028 1 809894017 0 29 297 971 34 36" ]],
+ @NoEvent @Src _InitialState9 : @Dest SC_NONE
+ [[ Pos440 = "277 763 357 793 0 809894016 10 20 51 0" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_4 =
+
+ @State;
+
+ @StateRegion
+ Region1
+ [[ Pos440 = "0 0 152 59" ]];
+
+ @Entry
+ #cp_station_set_auth_status(1);
+
+ @Exit
+ #cp_station_set_auth_status(0);
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_3 =
+
+ @State
+ UNAUTHENTICATED
+ [[ Pos440 = "111 705 263 730 16 1 1638401" ]],
+ @Initial _InitialState3
+ [[ Pos440 = "113 668 133 688 114689" ]],
+ AUTHENTICATED = StateMachineSpec_4
+ [[ Pos440 = "111 761 263 893 73 1 1638401" ]];
+
+ @StateRegion
+ Region1 (UNAUTHENTICATED, _InitialState3, AUTHENTICATED)
+ [[ Pos440 = "0 0 181 243" ]];
+
+ @Entry
+ #trace_sta();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ AUTHENTIFIE_STA() @Src UNAUTHENTICATED : @Dest AUTHENTICATED
+ [[ Pos440 = "105 735 185 754 0 809894016 22 25 22 0" ]],
+ @NoEvent @Src _InitialState3 : @Dest UNAUTHENTICATED
+ [[ Pos440 = "107 676 187 706 0 809894016 9 20 10 0" ]],
+ UNAUTHENTIFIE_STA() @Src AUTHENTICATED : @Dest UNAUTHENTICATED
+ [[ Pos440 = "206 735 286 765 0 809894016 111 0 111 25" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_2 (@State StateArgument_47,
+ @State StateArgument_58, @State StateArgument_59, @State StateArgument_54)
+ =
+
+ @State
+ CCO = StateMachineSpec_9
+ [[ Pos440 = "570 711 751 895 16 1 1638401" ]],
+ @Initial _InitialState2
+ [[ Pos440 = "102 593 122 613 114689" ]],
+ ASSOCIATED_STA = StateMachineSpec_3
+ [[ Pos440 = "100 633 281 908 32 1 114689" ]],
+ @Junction _JunctionState0
+ [[ Pos440 = "639 664 659 684 1" ]],
+ @ConnectorStart from_CCO
+ [[ Pos440 = "645 918 747 938 114689" ]],
+ @ConnectorEnd to_CCO
+ [[ Pos440 = "633 946 737 966 114689" ]],
+ @ConnectorStart from_STA
+ [[ Pos440 = "201 917 283 937 114689" ]],
+ @ConnectorEnd to_STA
+ [[ Pos440 = "198 948 280 968 114689" ]];
+
+ @StateRegion
+ Region1 (CCO, _InitialState2, ASSOCIATED_STA, _JunctionState0,
+ @ConnectorStart from_CCO, @ConnectorEnd to_CCO, @ConnectorStart from_STA
+ , @ConnectorEnd to_STA)
+ [[ Pos440 = "0 0 684 397" ]];
+
+ @Entry
+ #cp_station_set_assoc_status(1);
+
+ @Exit
+ #cp_station_set_assoc_status(0);
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ HANDOVER_DONE() @Src CCO StateArgument_47 : @Dest
+ ASSOCIATED_STA.AUTHENTICATED
+ [[ Pos440 = "281 807 546 827 1 809894016 0 112 440 823 152 62" ]],
+ @NoEvent @Src CCO : @Dest from_CCO
+ [[ Pos440 = "622 926 702 956 1 809894018 55 184 622 926 0 9" ]],
+ @NoEvent @Src _InitialState2 : @Dest ASSOCIATED_STA
+ [[ Pos440 = "112 583 192 613 0 809894016 10 20 12 0" ]],
+ BEACON_TIMER_EXPIRES() @Src ASSOCIATED_STA StateArgument_58 : @Dest
+ _JunctionState0
+ [[ Pos440 = "330 657 609 679 0 809894016 181 42 0 11" ]],
+ HANDOVER_DONE() @Src ASSOCIATED_STA StateArgument_47 : @Dest
+ _JunctionState0
+ [[ Pos440 = "326 634 586 660 1 809894018 181 16 544 652 9 0" ]],
+ @NoEvent @Src ASSOCIATED_STA : @Dest from_STA
+ [[ Pos440 = "175 926 255 956 1 809894018 75 275 175 926 0 9" ]],
+ @NoEvent @Src _JunctionState0 : @Dest CCO StateArgument_59
+ StateArgument_54 #cp_station_set_cco_status(1) #trace_cco()
+ [[ Pos440 = "662 686 742 709 0 809894016 12 20 81 0" ]],
+ @NoEvent @Src to_CCO : @Dest CCO
+ [[ Pos440 = "544 939 624 969 1 809894018 0 8 597 952 27 184" ]],
+ @NoEvent @Src to_STA : @Dest ASSOCIATED_STA
+ [[ Pos440 = "156 925 236 955 1 809894018 0 9 156 955 56 275" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_1 (@State StateArgument_51) =
+
+ @State
+ POND = StateMachineSpec_7
+ [[ Pos440 = "114 245 368 324 16 1 1638401" ]],
+ USTA = StateMachineSpec_8
+ [[ Pos440 = "476 245 730 324 16 1 1638401" ]],
+ @Initial _InitialState1
+ [[ Pos440 = "95 219 115 239 114689" ]];
+
+ @StateRegion
+ Region1 (POND, USTA, _InitialState1)
+ [[ Pos440 = "0 0 684 142" ]];
+
+ @Entry
+ #launch_ustt_timer();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule
+ USTT_EXPIRES() : #launch_ustt_timer(),
+ USTT_EXPIRES() StateArgument_51 : #transmit_unassoc_sta_mme(),
+ BEACON_DETECTED(beacon_address) : #try_associate(beacon_address),
+ RECEIVE_CC_ASSOC_CNF(mme_address) : #process_cc_assoc_cnf(mme_address);
+
+ @TransitionRule
+ TO_USTA() @Src POND : @Dest USTA
+ [[ Pos440 = "370 260 473 282 0 809894016 254 36 0 36" ]],
+ @NoEvent @Src _InitialState1 : @Dest POND
+ [[ Pos440 = "157 215 179 239 0 809894016 20 15 23 0" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_0 (@State StateArgument_51,
+ @State StateArgument_50, @State StateArgument_47, @State StateArgument_58,
+ @State StateArgument_59, @State StateArgument_54) =
+
+ @State
+ UCCO = StateMachineSpec_6
+ [[ Pos440 = "250 441 768 499 16 1 1638401" ]],
+ POND_OR_USTA = StateMachineSpec_1 (StateArgument_51)
+ [[ Pos440 = "84 157 768 355 56 1 114689" ]],
+ STA_OR_CCO = StateMachineSpec_2 (StateArgument_47, StateArgument_58,
+ StateArgument_59, StateArgument_54)
+ [[ Pos440 = "84 548 768 981 36 1 114689" ]],
+ @Initial _InitialState4
+ [[ Pos440 = "27 166 47 186 114689" ]];
+
+ @StateRegion
+ Region1 (UCCO, POND_OR_USTA, STA_OR_CCO, _InitialState4)
+ [[ Pos440 = "0 0 779 879" ]];
+
+ @Entry;
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ BEACON_DETECTED(beacon_address) @Src UCCO : @Dest POND_OR_USTA.USTA
+ [[ Pos440 = "527 389 707 412 0 809894016 366 0 140 79" ]],
+ RECEIVE_CC_ASSOC_REQ(mme_address) @Src UCCO : @Dest
+ STA_OR_CCO._JunctionState0 #process_cc_assoc_req(mme_address)
+ [[ Pos440 = "562 506 748 529 0 809894016 425 58 20 7" ]],
+ USTA_TO_CCO() @Src POND_OR_USTA : @Dest STA_OR_CCO._JunctionState0
+ [[ Pos440 = "571 422 748 444 0 809894016 567 198 12 0" ]],
+ TO_STA() @Src POND_OR_USTA : @Dest STA_OR_CCO
+ [[ Pos440 = "108 366 287 387 0 809894016 112 198 112 0" ]],
+ POND_TO_UCCO() @Src POND_OR_USTA.POND StateArgument_50 : @Dest UCCO
+ [[ Pos440 = "244 357 420 377 0 809894016 225 79 89 0" ]],
+ BEACON_TIMER_EXPIRES() @Src POND_OR_USTA.USTA : @Dest UCCO
+ [[ Pos440 = "452 364 585 384 0 809894016 19 79 245 0" ]],
+ JOIN_WAIT_TIMER_EXPIRES() @Src STA_OR_CCO.CCO StateArgument_50 : @Dest
+ UCCO
+ [[ Pos440 = "639 618 814 637 0 809894016 162 0 482 58" ]],
+ JOIN_WAIT_TIMER_EXPIRES() @Src STA_OR_CCO.CCO StateArgument_51 : @Dest
+ POND_OR_USTA.USTA
+ [[ Pos440 = "609 581 790 611 0 809894016 134 0 229 79" ]],
+ BEACON_TIMER_EXPIRES() @Src STA_OR_CCO.ASSOCIATED_STA !StateArgument_58 :
+ @Dest POND_OR_USTA.POND
+ [[ Pos440 = "80 407 236 430 0 809894016 57 0 43 79" ]],
+ TO_USTA() @Src STA_OR_CCO.ASSOCIATED_STA : @Dest POND_OR_USTA.USTA
+ [[ Pos440 = "244 514 398 535 0 809894016 160 0 0 79" ]],
+ @NoEvent @Src _InitialState4 : @Dest POND_OR_USTA
+ [[ Pos440 = "47 146 127 176 0 809894016 20 10 0 19" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @TopStateMachine Station =
+
+ @State
+ @Initial _InitialState0
+ [[ Pos440 = "6 6 44 44 114689" ]],
+ ON = StateMachineSpec_0 (SMALL_FSM.AVLN_TO_TRACK,
+ SMALL_FSM.NO_AVLN_TO_TRACK, SMALL_FSM.HANDOVER, SMALL_FSM.BACKUP_CCO,
+ SMALL_FSM.NOT_BACKUP, SMALL_FSM.NOT_PCCO)
+ [[ Pos440 = "6 110 785 1020 31 1 114689" ]],
+ @ConnectorEnd from_CCO
+ [[ Pos440 = "808 16 897 41 114689" ]],
+ @ConnectorStart to_CCO
+ [[ Pos440 = "1494 16 1573 41 114689" ]],
+ @Junction _JunctionState1
+ [[ Pos440 = "842 75 862 95 1" ]],
+ @Junction _JunctionState2
+ [[ Pos440 = "1523 75 1543 95 1" ]],
+ @ConnectorEnd from_STA
+ [[ Pos440 = "8 1061 89 1081 114689" ]],
+ @ConnectorStart to_STA
+ [[ Pos440 = "685 1061 766 1081 114689" ]],
+ @Junction _JunctionState3
+ [[ Pos440 = "38 1121 58 1141 1" ]],
+ @Junction _JunctionState4
+ [[ Pos440 = "715 1121 735 1141 1" ]],
+ INIT_SYSTEM
+ [[ Pos440 = "200 26 593 76 16 1 1638401" ]],
+ @ConnectorStart from_INIT
+ [[ Pos440 = "632 28 738 48 114689" ]],
+ @ConnectorEnd from_INIT
+ [[ Pos440 = "824 1069 944 1089 114689" ]],
+ @ConnectorEnd to_INIT
+ [[ Pos440 = "624 54 735 74 114689" ]],
+ @ConnectorStart to_INIT
+ [[ Pos440 = "1402 1066 1492 1086 114689" ]],
+ @Junction _JunctionState5
+ [[ Pos440 = "869 1135 889 1155 1" ]],
+ @Junction _JunctionState6
+ [[ Pos440 = "1437 1131 1457 1151 1" ]],
+ SMALL_FSM = StateMachineSpec_5 (ON.STA_OR_CCO.CCO, ON.POND_OR_USTA)
+ [[ Pos440 = "26 17 709 1021 16 1 114689" ]];
+
+ @StateRegion
+ @OffPage Station (_InitialState0, ON, @ConnectorEnd from_CCO,
+ @ConnectorStart to_CCO, _JunctionState1, _JunctionState2, @ConnectorEnd
+ from_STA, @ConnectorStart to_STA, _JunctionState3, _JunctionState4,
+ INIT_SYSTEM, @ConnectorStart from_INIT, @ConnectorEnd from_INIT,
+ @ConnectorEnd to_INIT, @ConnectorStart to_INIT, _JunctionState5,
+ _JunctionState6)
+ [[ Pos440 = "0 0 318 50", TextDisplayNote = "Preserve",
+ TextDisplayState = "Preserve", TextDisplayTransDesc = "Preserve",
+ View = "2 2 7" ]],
+ @OffPage Small_FSMs (SMALL_FSM)
+ [[ Pos440 = "1 0 148 50", TextDisplayNote = "Preserve",
+ TextDisplayState = "Preserve", TextDisplayTransDesc = "Preserve",
+ View = "2 2 7" ]];
+
+ @Entry;
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ @NoEvent @Src _InitialState0 : @Dest INIT_SYSTEM #init_system()
+ [[ Pos440 = "160 -114 284 -100 2 809894017 38 18 121 43 0 25" ]],
+ RECEIVE_DRV_MAC_STOP_IND() @Src ON : @Dest INIT_SYSTEM
+ [[ Pos440 = "61 86 295 104 0 809894016 280 0 86 50" ]],
+ @NoEvent @Src from_CCO : @Dest _JunctionState1
+ [[ Pos440 = "851 41 931 71 0 809894016 43 25 9 0" ]],
+ RECEIVE_CC_ASSOC_REQ(mme_address) @Src _JunctionState1 : @Dest
+ _JunctionState2 #process_cc_assoc_req(mme_address)
+ [[ Pos440 = "914 90 1485 120 1 809894018 20 11 884 110 0 9" ]],
+ RECEIVE_CC_SET_TEI_MAP_REQ(mme_address) @Src _JunctionState1 : @Dest
+ _JunctionState2 #process_cc_set_tei_map_req(mme_address)
+ [[ Pos440 = "908 128 1473 158 1 809894018 20 11 868 148 4 20" ]],
+ @NoEvent @Src _JunctionState2 : @Dest to_CCO
+ [[ Pos440 = "1531 45 1611 75 0 809894016 8 0 35 25" ]],
+ @NoEvent @Src from_STA : @Dest _JunctionState3
+ [[ Pos440 = "45 1051 125 1081 0 809894016 37 20 7 0" ]],
+ RECEIVE_CC_SET_TEI_MAP_IND(mme_address) @Src _JunctionState3 : @Dest
+ _JunctionState4 #process_cc_set_tei_map_ind(mme_address)
+ [[ Pos440 = "101 1144 671 1174 1 809894018 20 10 81 1164 0 20" ]],
+ @NoEvent @Src _JunctionState4 : @Dest to_STA
+ [[ Pos440 = "724 1121 804 1151 0 809894016 9 0 39 20" ]],
+ RECEIVE_DRV_MAC_START_REQ(msg) @Src INIT_SYSTEM : @Dest ON
+ #process_drv_start_mac_req(msg)
+ [[ Pos440 = "517 83 779 108 0 809894016 309 50 503 0" ]],
+ @NoEvent @Src INIT_SYSTEM : @Dest from_INIT
+ [[ Pos440 = "593 3 673 33 0 809894016 393 7 0 9" ]],
+ @NoEvent @Src from_INIT : @Dest _JunctionState5
+ [[ Pos440 = "801 1059 881 1089 0 809894016 57 20 9 0" ]],
+ @NoEvent @Src to_INIT : @Dest INIT_SYSTEM
+ [[ Pos440 = "575 12 655 42 0 809894016 0 9 393 37" ]],
+ RECEIVE_DRV_SET_MAC_ADDRESS(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_mac_address(msg)
+ [[ Pos440 = "916 1153 1420 1183 1 809894018 7 20 876 1183 1447 1174 8 20"
+ ]],
+ RECEIVE_DRV_SET_CCO_PREFERENCE_REQ(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_cco_preference(msg)
+ [[ Pos440 = "922 1211 1402 1241 1 809894018 0 12 893 1238 10 20" ]],
+ RECEIVE_DRV_SET_WAS_CCO(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_was_cco(msg)
+ [[ Pos440 = "919 1257 1426 1287 1 809894018 9 0 891 1285 20 11" ]],
+ RECEIVE_DRV_SET_NPW_REQ(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_npw(msg)
+ [[ Pos440 = "896 1311 1437 1341 1 809894018 12 20 953 1344 11 20" ]],
+ RECEIVE_DRV_SET_DPW_REQ(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_dpw_req(msg)
+ [[ Pos440 = "896 1363 1443 1393 1 809894018 0 10 948 1394 14 20" ]],
+ RECEIVE_DRV_SET_M_STA_HFID(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_m_sta_hfid(msg)
+ [[ Pos440 = "895 1423 1429 1453 1 809894018 7 20 887 1449 10 20" ]],
+ RECEIVE_DRV_SET_U_STA_HFID(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_u_sta_hfid(msg)
+ [[ Pos440 = "913 1463 1421 1493 1 809894018 12 20 909 1493 8 20" ]],
+ RECEIVE_DRV_SET_AVLN_HFID(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_avln_hfid(msg)
+ [[ Pos440 = "913 1516 1432 1546 1 809894018 20 7 908 1545 20 11" ]],
+ RECEIVE_DRV_SET_SL(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_sl(msg)
+ [[ Pos440 = "889 1570 1434 1600 1 809894018 0 13 984 1596 20 11" ]],
+ RECEIVE_DRV_SET_TONEMASK(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_tonemask(msg)
+ [[ Pos440 = "909 1618 1434 1648 1 809894018 7 20 884 1647 20 10" ]],
+ RECEIVE_DRV_SET_NID(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_nid(msg)
+ [[ Pos440 = "906 1662 1434 1692 1 809894018 10 0 921 1696 1448 1677 0 8"
+ ]],
+ RECEIVE_DRV_SET_SNID(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_snid(msg)
+ [[ Pos440 = "891 1713 1431 1743 1 809894018 0 6 898 1744 1457 1738 20 10"
+ ]],
+ @NoEvent @Src _JunctionState6 : @Dest to_INIT
+ [[ Pos440 = "1367 1131 1447 1161 0 809894016 10 0 65 20" ]];
+
+ @TerminationRule;
+
+ [[ Pos440 = "10 10 476 76 16 1 114689" ]]
+
+ @End;
+
diff --git a/cesar/VisualState/sub/Topstate1.vsr.bk3 b/cesar/VisualState/sub/Topstate1.vsr.bk3
new file mode 100644
index 0000000000..54acb51267
--- /dev/null
+++ b/cesar/VisualState/sub/Topstate1.vsr.bk3
@@ -0,0 +1,704 @@
+@visualSTATE @RuleBase @Format2 "NoName"
+
+@Directives
+
+ @visualSTATE 5-4-0-1273;
+ @Date 2008-02-13;
+ @Time 10:47:14;
+ [[ Expl = "This is the main FSM." ]]
+
+
+@Declaration
+
+ @ActionFunction
+ VS_VOID cp_station_set_assoc_status(VS_BOOL associated),
+ VS_VOID cp_station_set_auth_status(VS_BOOL is_authenticated),
+ VS_VOID cp_station_set_cco_status(VS_BOOL is_cco)
+ [[ Expl = "the station leave the cco state." ]],
+ VS_VOID init_system()
+ [[ File = "cp/station/inc/station_events.h" ]],
+ VS_VOID launch_bbt_timer()
+ [[ File = "cp/station/inc/station_events.h" ]],
+ VS_VOID launch_beacon_timer()
+ [[ File = "cp/station/inc/station_events.h" ]],
+ VS_VOID launch_ustt_timer()
+ [[ File = "cp/station/inc/station_events.h" ]],
+ VS_VOID process_cc_assoc_cnf(VS_VOIDPTR mme_address),
+ VS_VOID process_cc_assoc_req(VS_VOIDPTR mme_address),
+ VS_VOID process_cc_set_tei_map_ind(VS_VOIDPTR mme_address),
+ VS_VOID process_cc_set_tei_map_req(VS_VOIDPTR mme_address),
+ VS_VOID process_drv_set_avln_hfid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_cco_preference(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_dpw_req(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_m_sta_hfid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_mac_address(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_nid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_npw(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_sl(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_snid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_tonemask(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_u_sta_hfid(VS_VOIDPTR msg),
+ VS_VOID process_drv_set_was_cco(VS_VOIDPTR msg),
+ VS_VOID process_drv_start_mac_req(VS_VOIDPTR msg),
+ VS_VOID process_usta_mme(VS_VOIDPTR mme_address),
+ VS_VOID record_usta_mme(VS_VOIDPTR mme_address),
+ VS_VOID send_discover_beacon_as_ucco()
+ [[ Expl = "this function will send a discover beacon, and relaunch a timer of 10ms 0x0d0x0afor the next discover beacon."
+ ]],
+ VS_VOID station_bbt_expires(),
+ VS_VOID trace_cco(),
+ VS_VOID trace_pond(),
+ VS_VOID trace_sta(),
+ VS_VOID trace_ucco(),
+ VS_VOID trace_usta(),
+ VS_VOID transmit_unassoc_sta_mme(),
+ VS_VOID try_associate(VS_VOIDPTR beacon_address)
+ [[ Expl = "see fig 7-76 and 7-770x0d0x0athe station had received a beacon, so it will check the NID, and if if match,0x0d0x0asend a CC_ASSOC.REQ to try to associate with the detected CCO."
+ ]];
+
+
+@Definition
+
+ @Event
+ AUTHENTIFIE_STA(),
+ BBT_EXPIRES(),
+ BEACON_DETECTED(VS_VOIDPTR beacon_address),
+ BEACON_TIMER_EXPIRES(),
+ BECOME_BACKUP_CCO(),
+ BECOME_PCO(),
+ HANDOVER_DONE(),
+ JOIN_WAIT_TIMER_EXPIRES(),
+ LEAVE_BACKUP_CCO(),
+ LEAVE_PCO(),
+ POND_TO_UCCO(),
+ RECEIVE_CC_ASSOC_CNF(VS_VOIDPTR mme_address),
+ RECEIVE_CC_ASSOC_REQ(VS_VOIDPTR mme_address),
+ RECEIVE_CC_SET_TEI_MAP_IND(VS_VOIDPTR mme_address)
+ [[ Expl = "11.2.35" ]],
+ RECEIVE_CC_SET_TEI_MAP_REQ(VS_VOIDPTR mme_address)
+ [[ Expl = "11.2.34" ]],
+ RECEIVE_DRV_MAC_START_REQ(VS_VOIDPTR msg),
+ RECEIVE_DRV_MAC_STOP_IND(),
+ RECEIVE_DRV_SET_AVLN_HFID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_CCO_PREFERENCE_REQ(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_DPW_REQ(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_MAC_ADDRESS(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_M_STA_HFID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_NID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_NPW_REQ(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_SL(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_SNID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_TONEMASK(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_U_STA_HFID(VS_VOIDPTR msg),
+ RECEIVE_DRV_SET_WAS_CCO(VS_VOIDPTR msg),
+ RECEIVE_USTA_MME(VS_VOIDPTR mme_address),
+ SC_ADD(),
+ SC_JOIN(),
+ SC_TIMER_EXPIRES(),
+ TO_CCO(),
+ TO_HANDOVER(),
+ TO_HANDOVER_IN_PROGRESS(),
+ TO_STA(),
+ TO_USTA(),
+ UCCO_MAX_DISCOVER_EXPIRES()
+ [[ Expl = "as UCCO, we must send a discover beacon every MaxDiscoverPeriod."
+ ]],
+ UNAUTHENTIFIE_STA(),
+ USTT_EXPIRES();
+
+ @EventGroup
+ USTA_TO_CCO(TO_CCO, SC_ADD)
+ [[ Expl = "this will trigger when the station should become CCo, 0x0d0x0aor when it is usta and in sc-add state (see 7.4.1, last 0xa7)"
+ ]];
+
+
+@Implementation
+
+ @StateMachine StateMachineSpec_10 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry
+ #launch_beacon_timer();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_9 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry;
+
+ @Exit
+ #cp_station_set_cco_status(0);
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_8 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry
+ #trace_usta();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule
+ RECEIVE_USTA_MME(mme_address) : #process_usta_mme(mme_address);
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_7 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry
+ #launch_bbt_timer(),
+ #trace_pond();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule
+ BBT_EXPIRES() : #station_bbt_expires(),
+ RECEIVE_USTA_MME(mme_address) : #record_usta_mme(mme_address);
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_6 =
+
+ @State;
+
+ @StateRegion;
+
+ @Entry
+ #trace_ucco(),
+ #send_discover_beacon_as_ucco();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule
+ UCCO_MAX_DISCOVER_EXPIRES() : #send_discover_beacon_as_ucco();
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_5 (@State StateArgument_13,
+ @State StateArgument_6) =
+
+ @State
+ NORMAL
+ [[ Pos440 = "226 96 318 121 16 1 1638401" ]],
+ @Initial _InitialState5
+ [[ Pos440 = "130 96 150 116 114689" ]],
+ HANDOVER
+ [[ Expl = "A handover will happend, and the station is part of it. If it is STA, it will become CCO and if it is CCO, it will become STA."
+ , Pos440 = "410 66 502 91 16 1 1638401" ]],
+ HANDOVER_IN_PROGRESS
+ [[ Expl = "The handover countdown (in beacon) is running, so some messages are not allowed. The STA is not implied in the current handover."
+ , Pos440 = "417 132 640 157 16 1 1638401" ]],
+ NO_AVLN_TO_TRACK
+ [[ Pos440 = "210 244 356 318 16 1 1638401" ]],
+ AVLN_TO_TRACK = StateMachineSpec_10
+ [[ Pos440 = "464 244 610 318 16 1 1638401" ]],
+ @Initial _InitialState6
+ [[ Pos440 = "94 272 114 292 114689" ]],
+ NOT_PCCO
+ [[ Pos440 = "237 493 329 518 16 1 1638401" ]],
+ @Initial _InitialState7
+ [[ Pos440 = "145 493 165 513 114689" ]],
+ PCCO
+ [[ Pos440 = "401 493 493 518 16 1 1638401" ]],
+ BACKUP_CCO
+ [[ Pos440 = "446 660 572 685 16 1 1638401" ]],
+ NOT_BACKUP
+ [[ Pos440 = "202 660 328 685 16 1 1638401" ]],
+ @Initial _InitialState8
+ [[ Pos440 = "125 657 145 677 114689" ]],
+ SC_NONE
+ [[ Pos440 = "226 858 329 894 16 1 1638401" ]],
+ SC_ADD
+ [[ Pos440 = "392 858 495 894 16 1 1638401" ]],
+ SC_JOIN
+ [[ Pos440 = "392 964 495 1000 16 1 1638401" ]],
+ @Initial _InitialState9
+ [[ Pos440 = "267 773 287 793 114689" ]];
+
+ @StateRegion
+ Handover_Region (NORMAL, _InitialState5, HANDOVER, HANDOVER_IN_PROGRESS)
+ [[ Pos440 = "0 0 683 148" ]],
+ AVLN_Tracking (NO_AVLN_TO_TRACK, AVLN_TO_TRACK, _InitialState6)
+ [[ Pos440 = "0 1 683 234" ]],
+ Proxy_CCO (NOT_PCCO, _InitialState7, PCCO)
+ [[ Pos440 = "0 2 683 173" ]],
+ BackupCCO (BACKUP_CCO, NOT_BACKUP, _InitialState8)
+ [[ Pos440 = "0 3 683 168" ]],
+ SC_Level (SC_NONE, SC_ADD, SC_JOIN, _InitialState9)
+ [[ Pos440 = "0 4 683 265" ]];
+
+ @Entry;
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ TO_HANDOVER_IN_PROGRESS() @Src NORMAL : @Dest HANDOVER_IN_PROGRESS
+ [[ Pos440 = "388 110 601 131 0 809894016 92 19 0 5" ]],
+ TO_HANDOVER() @Src NORMAL : @Dest HANDOVER
+ [[ Pos440 = "272 40 432 70 1 809894017 76 0 343 75 0 0" ]],
+ @NoEvent @Src _InitialState5 : @Dest NORMAL
+ [[ Pos440 = "150 76 230 106 0 809894016 20 10 0 10" ]],
+ HANDOVER_DONE() @Src HANDOVER : @Dest NORMAL
+ [[ Pos440 = "380 91 531 121 1 809894017 0 17 368 102 92 12" ]],
+ HANDOVER_DONE() @Src HANDOVER_IN_PROGRESS : @Dest NORMAL
+ [[ Pos440 = "256 145 395 175 0 809894016 0 20 62 25" ]],
+ BEACON_DETECTED(beacon_address) @Src NO_AVLN_TO_TRACK : @Dest
+ AVLN_TO_TRACK
+ [[ Pos440 = "356 249 483 279 0 809894016 146 35 0 35" ]],
+ BEACON_DETECTED(beacon_address) @Src AVLN_TO_TRACK : @Dest AVLN_TO_TRACK
+ [[ Pos440 = "558 325 704 355 1 809894017 146 13 633 276 146 59" ]],
+ BEACON_TIMER_EXPIRES() @Src AVLN_TO_TRACK : @Dest NO_AVLN_TO_TRACK
+ [[ Pos440 = "317 383 505 402 1 809894017 75 74 394 379 64 74" ]],
+ @NoEvent @Src _InitialState6 : @Dest NO_AVLN_TO_TRACK
+ [[ Pos440 = "114 252 194 282 0 809894016 20 10 0 38" ]],
+ BECOME_PCO() @Src NOT_PCCO : @Dest PCCO
+ [[ Pos440 = "274 442 408 465 1 809894017 76 0 354 472 0 0" ]],
+ @NoEvent @Src _InitialState7 : @Dest NOT_PCCO
+ [[ Pos440 = "165 473 245 503 0 809894016 20 10 0 10" ]],
+ LEAVE_PCO() @Src PCCO : @Dest NOT_PCCO
+ [[ Pos440 = "318 538 443 568 1 809894017 4 25 363 538 84 25" ]],
+ LEAVE_BACKUP_CCO() @Src BACKUP_CCO : @Dest NOT_BACKUP
+ [[ Pos440 = "292 705 463 735 1 809894017 5 25 383 705 115 25" ]],
+ BECOME_BACKUP_CCO() @Src NOT_BACKUP !StateArgument_13 : @Dest BACKUP_CCO
+ [[ Expl = "This transition will fire for message CC_BACKUP_APPOINT_REQ.0x0d0x0asee 11.2.3"
+ , Pos440 = "295 608 411 638 1 809894017 104 0 375 638 0 0" ]],
+ @NoEvent @Src _InitialState8 : @Dest NOT_BACKUP
+ [[ Pos440 = "145 637 225 667 0 809894016 20 10 0 10" ]],
+ SC_ADD() @Src SC_NONE : @Dest SC_ADD
+ [[ Pos440 = "310 832 429 855 0 809894016 103 9 0 9" ]],
+ SC_JOIN() @Src SC_NONE : @Dest SC_JOIN
+ [[ Pos440 = "281 933 404 963 1 809894017 51 36 307 960 0 17" ]],
+ SC_TIMER_EXPIRES() @Src SC_ADD : @Dest SC_NONE
+ [[ Pos440 = "295 891 461 921 0 809894016 0 25 103 25" ]],
+ TO_CCO() @Src SC_JOIN StateArgument_6 : @Dest SC_ADD
+ [[ Expl = "see 7.3.4.4 two unassociated sta, both in SC-Join0x0d0x0a\"If it is the one to become CCo, it shall change it state to SC-Add\""
+ , Pos440 = "448 917 624 940 0 809894016 50 0 50 36" ]],
+ SC_TIMER_EXPIRES() @Src SC_JOIN : @Dest SC_NONE
+ [[ Pos440 = "229 998 402 1028 1 809894017 0 29 297 971 34 36" ]],
+ @NoEvent @Src _InitialState9 : @Dest SC_NONE
+ [[ Pos440 = "277 763 357 793 0 809894016 10 20 51 0" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_4 =
+
+ @State;
+
+ @StateRegion
+ Region1
+ [[ Pos440 = "0 0 152 59" ]];
+
+ @Entry
+ #cp_station_set_auth_status(1);
+
+ @Exit
+ #cp_station_set_auth_status(0);
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule;
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_3 =
+
+ @State
+ UNAUTHENTICATED
+ [[ Pos440 = "111 705 263 730 16 1 1638401" ]],
+ @Initial _InitialState3
+ [[ Pos440 = "113 668 133 688 114689" ]],
+ AUTHENTICATED = StateMachineSpec_4
+ [[ Pos440 = "111 761 263 893 73 1 1638401" ]];
+
+ @StateRegion
+ Region1 (UNAUTHENTICATED, _InitialState3, AUTHENTICATED)
+ [[ Pos440 = "0 0 181 243" ]];
+
+ @Entry
+ #trace_sta();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ AUTHENTIFIE_STA() @Src UNAUTHENTICATED : @Dest AUTHENTICATED
+ [[ Pos440 = "105 735 185 754 0 809894016 22 25 22 0" ]],
+ @NoEvent @Src _InitialState3 : @Dest UNAUTHENTICATED
+ [[ Pos440 = "107 676 187 706 0 809894016 9 20 10 0" ]],
+ UNAUTHENTIFIE_STA() @Src AUTHENTICATED : @Dest UNAUTHENTICATED
+ [[ Pos440 = "206 735 286 765 0 809894016 111 0 111 25" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_2 (@State StateArgument_47,
+ @State StateArgument_58, @State StateArgument_59, @State StateArgument_54)
+ =
+
+ @State
+ CCO = StateMachineSpec_9
+ [[ Pos440 = "570 711 751 895 16 1 1638401" ]],
+ @Initial _InitialState2
+ [[ Pos440 = "102 593 122 613 114689" ]],
+ ASSOCIATED_STA = StateMachineSpec_3
+ [[ Pos440 = "100 633 281 908 32 1 114689" ]],
+ @Junction _JunctionState0
+ [[ Pos440 = "639 664 659 684 1" ]],
+ @ConnectorStart from_CCO
+ [[ Pos440 = "645 918 747 938 114689" ]],
+ @ConnectorEnd to_CCO
+ [[ Pos440 = "633 946 737 966 114689" ]],
+ @ConnectorStart from_STA
+ [[ Pos440 = "201 917 283 937 114689" ]],
+ @ConnectorEnd to_STA
+ [[ Pos440 = "198 948 280 968 114689" ]];
+
+ @StateRegion
+ Region1 (CCO, _InitialState2, ASSOCIATED_STA, _JunctionState0,
+ @ConnectorStart from_CCO, @ConnectorEnd to_CCO, @ConnectorStart from_STA
+ , @ConnectorEnd to_STA)
+ [[ Pos440 = "0 0 684 397" ]];
+
+ @Entry
+ #cp_station_set_assoc_status(1);
+
+ @Exit
+ #cp_station_set_assoc_status(0);
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ HANDOVER_DONE() @Src CCO StateArgument_47 : @Dest
+ ASSOCIATED_STA.AUTHENTICATED
+ [[ Pos440 = "281 807 546 827 1 809894016 0 112 440 823 152 62" ]],
+ @NoEvent @Src CCO : @Dest from_CCO
+ [[ Pos440 = "622 926 702 956 1 809894018 55 184 622 926 0 9" ]],
+ @NoEvent @Src _InitialState2 : @Dest ASSOCIATED_STA
+ [[ Pos440 = "112 583 192 613 0 809894016 10 20 12 0" ]],
+ BEACON_TIMER_EXPIRES() @Src ASSOCIATED_STA StateArgument_58 : @Dest
+ _JunctionState0
+ [[ Pos440 = "330 657 609 679 0 809894016 181 42 0 11" ]],
+ HANDOVER_DONE() @Src ASSOCIATED_STA StateArgument_47 : @Dest
+ _JunctionState0
+ [[ Pos440 = "326 634 586 660 1 809894018 181 16 544 652 9 0" ]],
+ @NoEvent @Src ASSOCIATED_STA : @Dest from_STA
+ [[ Pos440 = "175 926 255 956 1 809894018 75 275 175 926 0 9" ]],
+ @NoEvent @Src _JunctionState0 : @Dest CCO StateArgument_59
+ StateArgument_54 #cp_station_set_cco_status(1) #trace_cco()
+ [[ Pos440 = "662 686 742 709 0 809894016 12 20 81 0" ]],
+ @NoEvent @Src to_CCO : @Dest CCO
+ [[ Pos440 = "544 939 624 969 1 809894018 0 8 597 952 27 184" ]],
+ @NoEvent @Src to_STA : @Dest ASSOCIATED_STA
+ [[ Pos440 = "156 925 236 955 1 809894018 0 9 156 955 56 275" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_1 (@State StateArgument_51) =
+
+ @State
+ POND = StateMachineSpec_7
+ [[ Pos440 = "114 245 368 324 16 1 1638401" ]],
+ USTA = StateMachineSpec_8
+ [[ Pos440 = "476 245 730 324 16 1 1638401" ]],
+ @Initial _InitialState1
+ [[ Pos440 = "95 219 115 239 114689" ]];
+
+ @StateRegion
+ Region1 (POND, USTA, _InitialState1)
+ [[ Pos440 = "0 0 684 142" ]];
+
+ @Entry
+ #launch_ustt_timer();
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule
+ USTT_EXPIRES() : #launch_ustt_timer(),
+ USTT_EXPIRES() StateArgument_51 : #transmit_unassoc_sta_mme(),
+ BEACON_DETECTED(beacon_address) : #try_associate(beacon_address),
+ RECEIVE_CC_ASSOC_CNF(mme_address) : #process_cc_assoc_cnf(mme_address);
+
+ @TransitionRule
+ TO_USTA() @Src POND : @Dest USTA
+ [[ Pos440 = "370 260 473 282 0 809894016 254 36 0 36" ]],
+ @NoEvent @Src _InitialState1 : @Dest POND
+ [[ Pos440 = "157 215 179 239 0 809894016 20 15 23 0" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @StateMachine StateMachineSpec_0 (@State StateArgument_51,
+ @State StateArgument_50, @State StateArgument_47, @State StateArgument_58,
+ @State StateArgument_59, @State StateArgument_54) =
+
+ @State
+ UCCO = StateMachineSpec_6
+ [[ Pos440 = "250 441 768 499 16 1 1638401" ]],
+ POND_OR_USTA = StateMachineSpec_1 (StateArgument_51)
+ [[ Pos440 = "84 157 768 355 56 1 114689" ]],
+ STA_OR_CCO = StateMachineSpec_2 (StateArgument_47, StateArgument_58,
+ StateArgument_59, StateArgument_54)
+ [[ Pos440 = "84 548 768 981 36 1 114689" ]],
+ @Initial _InitialState4
+ [[ Pos440 = "27 166 47 186 114689" ]];
+
+ @StateRegion
+ Region1 (UCCO, POND_OR_USTA, STA_OR_CCO, _InitialState4)
+ [[ Pos440 = "0 0 779 879" ]];
+
+ @Entry;
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ BEACON_DETECTED(beacon_address) @Src UCCO : @Dest POND_OR_USTA.USTA
+ [[ Pos440 = "527 389 707 412 0 809894016 366 0 140 79" ]],
+ RECEIVE_CC_ASSOC_REQ(mme_address) @Src UCCO : @Dest
+ STA_OR_CCO._JunctionState0 #process_cc_assoc_req(mme_address)
+ [[ Pos440 = "562 506 748 529 0 809894016 425 58 20 7" ]],
+ USTA_TO_CCO() @Src POND_OR_USTA : @Dest STA_OR_CCO._JunctionState0
+ [[ Pos440 = "571 422 748 444 0 809894016 567 198 12 0" ]],
+ TO_STA() @Src POND_OR_USTA : @Dest STA_OR_CCO
+ [[ Pos440 = "108 366 287 387 0 809894016 112 198 112 0" ]],
+ POND_TO_UCCO() @Src POND_OR_USTA.POND StateArgument_50 : @Dest UCCO
+ [[ Pos440 = "244 357 420 377 0 809894016 225 79 89 0" ]],
+ BEACON_TIMER_EXPIRES() @Src POND_OR_USTA.USTA : @Dest UCCO
+ [[ Pos440 = "452 364 585 384 0 809894016 19 79 245 0" ]],
+ JOIN_WAIT_TIMER_EXPIRES() @Src STA_OR_CCO.CCO StateArgument_50 : @Dest
+ UCCO
+ [[ Pos440 = "639 618 814 637 0 809894016 162 0 482 58" ]],
+ JOIN_WAIT_TIMER_EXPIRES() @Src STA_OR_CCO.CCO StateArgument_51 : @Dest
+ POND_OR_USTA.USTA
+ [[ Pos440 = "609 581 790 611 0 809894016 134 0 229 79" ]],
+ BEACON_TIMER_EXPIRES() @Src STA_OR_CCO.ASSOCIATED_STA !StateArgument_58 :
+ @Dest POND_OR_USTA.POND
+ [[ Pos440 = "80 407 236 430 0 809894016 57 0 43 79" ]],
+ TO_USTA() @Src STA_OR_CCO.ASSOCIATED_STA : @Dest POND_OR_USTA.USTA
+ [[ Pos440 = "244 514 398 535 0 809894016 160 0 0 79" ]],
+ @NoEvent @Src _InitialState4 : @Dest POND_OR_USTA
+ [[ Pos440 = "47 146 127 176 0 809894016 20 10 0 19" ]];
+
+ @TerminationRule;
+
+ @End;
+
+ @TopStateMachine Station =
+
+ @State
+ @Initial _InitialState0
+ [[ Pos440 = "6 6 44 44 114689" ]],
+ ON = StateMachineSpec_0 (SMALL_FSM.AVLN_TO_TRACK,
+ SMALL_FSM.NO_AVLN_TO_TRACK, SMALL_FSM.HANDOVER, SMALL_FSM.BACKUP_CCO,
+ SMALL_FSM.NOT_BACKUP, SMALL_FSM.NOT_PCCO)
+ [[ Pos440 = "6 110 785 1020 31 1 114689" ]],
+ @ConnectorEnd from_CCO
+ [[ Pos440 = "808 16 897 41 114689" ]],
+ @ConnectorStart to_CCO
+ [[ Pos440 = "1494 16 1573 41 114689" ]],
+ @Junction _JunctionState1
+ [[ Pos440 = "842 75 862 95 1" ]],
+ @Junction _JunctionState2
+ [[ Pos440 = "1523 75 1543 95 1" ]],
+ @ConnectorEnd from_STA
+ [[ Pos440 = "8 1061 89 1081 114689" ]],
+ @ConnectorStart to_STA
+ [[ Pos440 = "685 1061 766 1081 114689" ]],
+ @Junction _JunctionState3
+ [[ Pos440 = "38 1121 58 1141 1" ]],
+ @Junction _JunctionState4
+ [[ Pos440 = "715 1121 735 1141 1" ]],
+ INIT_SYSTEM
+ [[ Pos440 = "200 26 593 76 16 1 1638401" ]],
+ @ConnectorStart from_INIT
+ [[ Pos440 = "632 28 738 48 114689" ]],
+ @ConnectorEnd from_INIT
+ [[ Pos440 = "824 1069 944 1089 114689" ]],
+ @ConnectorEnd to_INIT
+ [[ Pos440 = "624 54 735 74 114689" ]],
+ @ConnectorStart to_INIT
+ [[ Pos440 = "1402 1066 1492 1086 114689" ]],
+ @Junction _JunctionState5
+ [[ Pos440 = "869 1135 889 1155 1" ]],
+ @Junction _JunctionState6
+ [[ Pos440 = "1437 1131 1457 1151 1" ]],
+ SMALL_FSM = StateMachineSpec_5 (ON.STA_OR_CCO.CCO, ON.POND_OR_USTA)
+ [[ Pos440 = "26 17 709 1021 16 1 114689" ]];
+
+ @StateRegion
+ @OffPage Station (_InitialState0, ON, @ConnectorEnd from_CCO,
+ @ConnectorStart to_CCO, _JunctionState1, _JunctionState2, @ConnectorEnd
+ from_STA, @ConnectorStart to_STA, _JunctionState3, _JunctionState4,
+ INIT_SYSTEM, @ConnectorStart from_INIT, @ConnectorEnd from_INIT,
+ @ConnectorEnd to_INIT, @ConnectorStart to_INIT, _JunctionState5,
+ _JunctionState6)
+ [[ Pos440 = "0 0 318 50", TextDisplayNote = "Preserve",
+ TextDisplayState = "Preserve", TextDisplayTransDesc = "Preserve",
+ View = "2 2 7" ]],
+ @OffPage Small_FSMs (SMALL_FSM)
+ [[ Pos440 = "1 0 148 50", TextDisplayNote = "Preserve",
+ TextDisplayState = "Preserve", TextDisplayTransDesc = "Preserve",
+ View = "2 2 7" ]];
+
+ @Entry;
+
+ @Exit;
+
+ @Do;
+
+ @InternalRule;
+
+ @TransitionRule
+ @NoEvent @Src _InitialState0 : @Dest INIT_SYSTEM #init_system()
+ [[ Pos440 = "160 -114 284 -100 2 809894017 38 18 121 43 0 25" ]],
+ RECEIVE_DRV_MAC_STOP_IND() @Src ON : @Dest INIT_SYSTEM
+ [[ Pos440 = "61 86 295 104 0 809894016 280 0 86 50" ]],
+ @NoEvent @Src from_CCO : @Dest _JunctionState1
+ [[ Pos440 = "851 41 931 71 0 809894016 43 25 9 0" ]],
+ RECEIVE_CC_ASSOC_REQ(mme_address) @Src _JunctionState1 : @Dest
+ _JunctionState2 #process_cc_assoc_req(mme_address)
+ [[ Pos440 = "914 90 1485 120 1 809894018 20 11 884 110 0 9" ]],
+ RECEIVE_CC_SET_TEI_MAP_REQ(mme_address) @Src _JunctionState1 : @Dest
+ _JunctionState2 #process_cc_set_tei_map_req(mme_address)
+ [[ Pos440 = "908 128 1473 158 1 809894018 20 11 868 148 4 20" ]],
+ @NoEvent @Src _JunctionState2 : @Dest to_CCO
+ [[ Pos440 = "1531 45 1611 75 0 809894016 8 0 35 25" ]],
+ @NoEvent @Src from_STA : @Dest _JunctionState3
+ [[ Pos440 = "45 1051 125 1081 0 809894016 37 20 7 0" ]],
+ RECEIVE_CC_SET_TEI_MAP_IND(mme_address) @Src _JunctionState3 : @Dest
+ _JunctionState4 #process_cc_set_tei_map_ind(mme_address)
+ [[ Pos440 = "101 1144 671 1174 1 809894018 20 10 81 1164 0 20" ]],
+ @NoEvent @Src _JunctionState4 : @Dest to_STA
+ [[ Pos440 = "724 1121 804 1151 0 809894016 9 0 39 20" ]],
+ RECEIVE_DRV_MAC_START_REQ(msg) @Src INIT_SYSTEM : @Dest ON
+ #process_drv_start_mac_req(msg)
+ [[ Pos440 = "517 83 779 108 0 809894016 309 50 503 0" ]],
+ @NoEvent @Src INIT_SYSTEM : @Dest from_INIT
+ [[ Pos440 = "593 3 673 33 0 809894016 393 7 0 9" ]],
+ @NoEvent @Src from_INIT : @Dest _JunctionState5
+ [[ Pos440 = "801 1059 881 1089 0 809894016 57 20 9 0" ]],
+ @NoEvent @Src to_INIT : @Dest INIT_SYSTEM
+ [[ Pos440 = "575 12 655 42 0 809894016 0 9 393 37" ]],
+ RECEIVE_DRV_SET_MAC_ADDRESS(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_mac_address(msg)
+ [[ Pos440 = "916 1153 1420 1183 1 809894018 7 20 876 1183 1447 1174 8 20"
+ ]],
+ RECEIVE_DRV_SET_CCO_PREFERENCE_REQ(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_cco_preference(msg)
+ [[ Pos440 = "922 1211 1402 1241 1 809894018 0 12 893 1238 10 20" ]],
+ RECEIVE_DRV_SET_WAS_CCO(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_was_cco(msg)
+ [[ Pos440 = "919 1257 1426 1287 1 809894018 9 0 891 1285 20 11" ]],
+ RECEIVE_DRV_SET_NPW_REQ(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_npw(msg)
+ [[ Pos440 = "896 1311 1437 1341 1 809894018 12 20 953 1344 11 20" ]],
+ RECEIVE_DRV_SET_DPW_REQ(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_dpw_req(msg)
+ [[ Pos440 = "896 1363 1443 1393 1 809894018 0 10 948 1394 14 20" ]],
+ RECEIVE_DRV_SET_M_STA_HFID(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_m_sta_hfid(msg)
+ [[ Pos440 = "895 1423 1429 1453 1 809894018 7 20 887 1449 10 20" ]],
+ RECEIVE_DRV_SET_U_STA_HFID(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_u_sta_hfid(msg)
+ [[ Pos440 = "913 1463 1421 1493 1 809894018 12 20 909 1493 8 20" ]],
+ RECEIVE_DRV_SET_AVLN_HFID(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_avln_hfid(msg)
+ [[ Pos440 = "913 1516 1432 1546 1 809894018 20 7 908 1545 20 11" ]],
+ RECEIVE_DRV_SET_SL(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_sl(msg)
+ [[ Pos440 = "889 1570 1434 1600 1 809894018 0 13 984 1596 20 11" ]],
+ RECEIVE_DRV_SET_TONEMASK(msg) @Src _JunctionState5 : @Dest
+ _JunctionState6 #process_drv_set_tonemask(msg)
+ [[ Pos440 = "909 1618 1434 1648 1 809894018 7 20 884 1647 20 10" ]],
+ RECEIVE_DRV_SET_NID(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_nid(msg)
+ [[ Pos440 = "906 1662 1434 1692 1 809894018 10 0 921 1696 1448 1677 0 8"
+ ]],
+ RECEIVE_DRV_SET_SNID(msg) @Src _JunctionState5 : @Dest _JunctionState6
+ #process_drv_set_snid(msg)
+ [[ Pos440 = "891 1713 1431 1743 1 809894018 0 6 898 1744 1457 1738 20 10"
+ ]],
+ @NoEvent @Src _JunctionState6 : @Dest to_INIT
+ [[ Pos440 = "1367 1131 1447 1161 0 809894016 10 0 65 20" ]];
+
+ @TerminationRule;
+
+ [[ Pos440 = "10 10 476 76 16 1 114689" ]]
+
+ @End;
+
diff --git a/cesar/VisualState/sub/cp.vnw b/cesar/VisualState/sub/cp.vnw
new file mode 100644
index 0000000000..802bc0a5e8
--- /dev/null
+++ b/cesar/VisualState/sub/cp.vnw
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<NavigatorWorkspace Date="2008-02-15" Explanation="" Time="16:05:39">
+
+ <SourceControl SccAuxPath="" SccName="" SccPath="." SccProvider=""/>
+
+ <Project Active="true" ActiveSystem="main_fsm" File="..\Project1.vsp">
+ <Signature CheckSum="681b 87c5 a224 3276 ba20 0753" Version="50"/>
+ <Validator File="..\Project1.vws"/>
+ <OSEK APIType="0" ConfigApp="" Enabled="false" OILFile=""/>
+ <Report Creator="0" File="..\coder\vscoder.cre"/>
+ <Report Creator="1" File="..\doc\Project.rtf"/>
+ <Report Creator="1" File="..\doc\Cesar_CP.rtf"/>
+ </Project>
+
+</NavigatorWorkspace>
diff --git a/cesar/ce/Module b/cesar/ce/Module
new file mode 100755
index 0000000000..d4db642c42
--- /dev/null
+++ b/cesar/ce/Module
@@ -0,0 +1,4 @@
+SOURCES := rx.c tx.c rxce_stats.c bitloading.c mpdu_measure_store.c cei_param.c
+ifeq ($(CONFIG_TRACE),y)
+SOURCES += trace.c
+endif
diff --git a/cesar/ce/doc/architecture.odt b/cesar/ce/doc/architecture.odt
new file mode 100644
index 0000000000..383e28134b
--- /dev/null
+++ b/cesar/ce/doc/architecture.odt
Binary files differ
diff --git a/cesar/ce/inc/bitloading.h b/cesar/ce/inc/bitloading.h
new file mode 100644
index 0000000000..28b91d996f
--- /dev/null
+++ b/cesar/ce/inc/bitloading.h
@@ -0,0 +1,133 @@
+#ifndef ce_inc_bitloading_h
+#define ce_inc_bitloading_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+
+#include "ce/inc/mpdu_measure_store.h"
+#include "mac/common/store.h"
+
+/** The noise provided by the DSP is expressed in UND that is the length of
+ * the diagonal in the constellation of the modulation on which measurement has been done.
+ */
+/** noise saturation */
+#define MAX_UND 4
+/** Number of bit used to code the noise */
+#define UND_CODE_BIT_NB 16
+/** Code value of the maximum noise */
+#define MAX_UND_CODE ((1<<UND_CODE_BIT_NB)-1)
+/** Code value of one UND */
+#define UND_CODE (MAX_UND_CODE/MAX_UND)
+/** The DSP accumulate noise along the MPDU (but should provide the average)*/
+#define ACCU_MAX_NB 1 // DSP provides the average (no accumulation)
+/** Code value of the maximum accumulated noise */
+#define NOISE_MAX (ACCU_MAX_NB * MAX_UND_CODE )
+
+ /** The ROBO (include sound) frame number limit before a
+ * worst_tonemap becomes a tonemap default.*/
+#define FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP 20 //TBD
+
+/** Table of noises threshold versus modulation when measurement for ber=10^-3.
+ * Example : If noise has been computed by DSP with a tone QPSK
+ * and if THR3[QPSK][QAM256] < noise_average < THR3[QPSK][QAM1024],
+ * then we can put the modulation to QAM256 for a BER<10^-3.
+ */
+uint THR3[7][7];
+uint current_threshold[7];
+
+struct bitloading_modification_t
+{
+ /** Set of tonemap that has been changed. If hasn't, NULL.*/
+ tonemaps_t *changed_tonemaps;
+ /** frame measurement-processed source station TEI.*/
+ uint stei;
+ /** Tonemap index of the new tonemap (if there is).*/
+ uint new_tmi;
+ /** If a reference tonemap has been used to compute the new one, index of
+ * this reference tonemap. (Will allow to create a CM_UPDATE_TM.IND instead of CM_CHAN_EST.IND).*/
+ uint old_tmi;
+};
+typedef struct bitloading_modification_t bitloading_modification_t;
+
+/**
+ * Computation of tonemaps from frame measurement.
+ * \param mac_store_ctx Concerned sta with its rx_tonemaps and statistics.
+ * \param measurement Frame measurement data.
+ * \return the status of modification while computation.
+ *
+ */
+bitloading_modification_t
+bitloading_run (mac_store_t *mac_store_ctx, mpdu_measure_t *measure);
+
+bitloading_modification_t
+bitloading_initial_step (sta_t *sta, mpdu_measure_t *measure);
+
+bitloading_modification_t
+bitloading_dynamic_step (sta_t *sta, mpdu_measure_t *measure);
+
+/**
+ * Read the noise per carrier and choose the appropriate modulation. If the
+ * current modulation is higher, the modulation is modified to the lower.
+ * \param worst_tm Current tonemap to modify or allocate if null. (modulation map).
+ * \param noise_nrj Average noise on each carriers along the MPDU.
+ * \return true if at least one carrier has been down.
+ */
+bool // Has tonemap been modified?.
+bitloading_worst_tonemap_compute (tonemap_t **worst_tm, phy_chandata_t *noise_nrj);
+
+/**
+ * Detect if the noise along the frame has changed 'a lot'.
+ * \param noise_nrj_symbol Average noise by symbols along the MPDU.
+ * \return true if noise is considered as stable and so if the noise per
+ * carrier(noise_nrj) can be trust.
+ */
+bool // Is noise stable along the MPDU?.
+bitloading_mpdu_noise_stability (phy_chandata_t *noise_nrj_symbol);
+
+static inline void
+bitloading_update_threshold (uint accumulation, int measurement_mod)
+{
+ int m;
+ for (m=0; m<7; m++)
+ {
+ current_threshold[m] = accumulation * THR3[measurement_mod][m];
+ }
+}
+
+/**
+ * Find the modulation using the table of noises threshold.
+ * \param noise code value of noise.
+ * \param accumulation // MUST BE 1 (already average provided).
+ * \param measurement_mod modulation used when measurement has been
+ * computed.
+ * \return the modulation according to thresholds.
+ *
+ */
+static inline int
+bitloading_noise2mod (uint noise /*, int accumulation, int measurement_mod*/)
+{
+ int m;
+ for(m=0; m<7; m++)
+ {
+ if (noise > current_threshold[m]) //DSP should provide average. If not, update threshold before instead of multiply at each carrier... TODO
+ {
+ return (m);
+ }
+ }
+ return (7);
+}
+
+void
+bitloading_threshold_init (void);
+
+uint // date_modulo_BEACON_PERIOD_ATU
+bitloading_date_in_beacon_atu_get (uint mpdu_date_tck, uint beacon_date_tck);
+
+//void
+//manage_interval (tonemaps_t *tms, mpdu_measure_t *mpdu_measure);
+
+#endif /* ce_inc_bitloading_h */
diff --git a/cesar/ce/inc/cei.h b/cesar/ce/inc/cei.h
new file mode 100755
index 0000000000..15e64a341b
--- /dev/null
+++ b/cesar/ce/inc/cei.h
@@ -0,0 +1,424 @@
+#ifndef ce_inc_cei_h
+#define ce_inc_cei_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ce/inc/cei.h
+ * \brief static functions to create and decode cei messages
+ * \ingroup ce
+ *
+ */
+
+//#include "ce/inc/cei_param.h"
+#include "mac/common/tonemask.h"
+#include "mac/common/timings.h"
+//#include "ce/test/common/print_utils.h"
+#include "lib/bitstream.h"
+#include "cyg/kernel/kapi.h"
+#include "ce/inc/ecos_time.h"
+
+#define CM_CHAN_EST_IND 0x6014
+#define CM_TM_UPDATE_IND 0x6018
+
+//TODO Accelerate access in tonemap and tonemask management.
+
+struct cei_created_status_t
+{
+ /** Length of mm_entry. */
+ uint length;
+ /** type of created CEI to send.*/
+ uint mm_type;
+};
+typedef struct cei_created_status_t cei_created_status_t;
+
+
+BEGIN_DECLS
+
+#ifdef RXCE
+
+static inline void
+STREAM_WRITE (bitstream_t *ptr, uint val, uint length)
+{
+ uint to_write = val;
+ bitstream_access (ptr, &to_write, length);
+}
+
+
+/**
+ * Run Length Encoding tonemap cf Spec HPAV in CM_CHAN_EST.IND description.
+ * \param writer pointer on buffer that manages nibbles writing.
+ * \param tm tonemap to encode.
+ * \param mask tonemask
+ * \return the entry number.
+ *
+ */
+static uint
+cei_tmdata_encode (bitstream_t *ctx_stream, blk_t *tm, u8 *mask)
+{
+ uint nibbles[1155];
+ int c=0;
+ uint i, nibble, next_nibble;
+ int consecutive_nb = 0;
+ int entry_nb = 0;
+ u32 *tm_data = (u32 *) tm->data;
+ uint carrier_nb = tonemask_carrier_nb (mask);
+ for (i=0; i<128; i++)
+ {
+ uint eight_nibble = *(tm_data++);
+ u8 local_mask = mask[i];
+ uint j;
+ for (j=0; j<8; j++)
+ {
+ if ( (local_mask & 0x01) == 0x01 )
+ {
+ nibbles[c++] = eight_nibble & 0x0F;
+ }
+ eight_nibble = eight_nibble >> 4;
+ local_mask = local_mask >> 1;
+ }
+ }
+ tm_data = (u32 *) tm->next->data;
+ for (i=0; i<17; i++)
+ {
+ uint eight_nibble = *(tm_data++);
+ u8 local_mask = mask[(i+128)];
+ uint j;
+ for (j=0; j<8; j++)
+ {
+ if ( (local_mask & 0x01) == 0x01 )
+ {
+ nibbles[c++] = eight_nibble & 0x0F;
+ }
+ eight_nibble = eight_nibble >> 4;
+ local_mask = local_mask >> 1;
+ }
+ }
+ nibble = nibbles[0];
+ for (i=0; i<carrier_nb; i++)
+ {
+ next_nibble = nibbles[i+1];
+ consecutive_nb ++;
+
+ if ( (next_nibble != nibble) || (consecutive_nb == 74)
+ || (i==carrier_nb-1) )
+ {
+ entry_nb++;
+ if(consecutive_nb == 1)
+ {
+ bitstream_access (ctx_stream, &nibble, 4);
+ }
+ else if (consecutive_nb == 2)
+ {
+ bitstream_access (ctx_stream, &nibble, 4);
+ bitstream_access (ctx_stream, &nibble, 4);
+ entry_nb++;
+ }
+ else if (consecutive_nb <= 10)
+ {
+ uint tmp = (consecutive_nb - 3 )|8;
+ bitstream_access (ctx_stream, &nibble, 4);
+ bitstream_access (ctx_stream, &tmp, 4);
+ }
+ else if(consecutive_nb <= 74)
+ {
+ uint tmp = ((( consecutive_nb-3) >> 3) +7);
+ bitstream_access (ctx_stream, &nibble, 4);
+ bitstream_access (ctx_stream, &tmp, 4);
+ tmp = (consecutive_nb-3)|8;
+ bitstream_access (ctx_stream, &tmp, 4);
+ }
+ dbg_assert (consecutive_nb <= 74 );
+ consecutive_nb = 0;
+ }
+ nibble = next_nibble;
+ }
+ bitstream_finalise (ctx_stream);
+
+ return (entry_nb);
+}
+
+/**
+ * Write a cei message in a buffer. // Only mmentry.
+ * \param dest_mm_entry start of mmentry buffer.
+ * \param mask tonemask.
+ * \param rx_tonemaps Set of tonemap used to create the CEI.
+ * \param new_tmi Tonemap index of set whose data must be sent. If no tonemap
+ * data must be sent, new_tmi must be TONEMAP_INDEX_NULL.
+ * \param old_tmi Tonemap index from which the new tonemap has been computed.
+ * If old_tmi is TONEMAP_INDEX_NULL, a CM_CHAN_EST.IND must be created,
+ * else a CM_UPDATE_TM.IND must be created.
+ * \return cei_created_status necessary to send CEI via the CP.
+ *
+ * function calls cei_tmdata_encode for the Run Length Encoding. Encoding is done
+ * every time even if it is not interresting because it can be worst. (except
+ * for time ).
+ * TODO : Management of old_tmi to create a CM_UPDATE_TM.IND instead of
+ * CM_CHAN_EST.IND
+ */
+static cei_created_status_t
+cei_create (u8 *dest_mm_entry, u8 *mask, tonemaps_t *rx_tonemaps, uint new_tmi, uint old_tmi)
+{
+ bitstream_t stream_writer;
+ bitstream_t *w_ptr = &stream_writer;
+ int i=0;
+ u8 valid_tm_list_lg=0;
+ u8 respt = 0x00;
+ uint mme_len;
+ tonemap_t *new_tm;
+ uint entry_nb;
+ dbg_assert (dest_mm_entry);
+ dbg_assert (rx_tonemaps);
+ valid_tm_list_lg = tonemap_valid_nb (rx_tonemaps);
+ bitstream_init (w_ptr, dest_mm_entry, 1518, BITSTREAM_WRITE );
+ STREAM_WRITE (w_ptr, rx_tonemaps->max_fl_av, 16);
+ STREAM_WRITE (w_ptr, rx_tonemaps->rifs_av_one_sym_tck / MAC_TCK_PER_FL, 8);
+ STREAM_WRITE (w_ptr, rx_tonemaps->rifs_av_two_sym_tck / MAC_TCK_PER_FL, 8);
+ STREAM_WRITE (w_ptr, rx_tonemaps->rifs_av_g2_sym_tck / MAC_TCK_PER_FL, 8);
+ STREAM_WRITE(w_ptr, respt, 8);
+ STREAM_WRITE(w_ptr, rx_tonemaps->max_tm, 8);
+ STREAM_WRITE(w_ptr, rx_tonemaps->default_tmi, 8);
+ STREAM_WRITE(w_ptr, (u8)rx_tonemaps->scl_cp, 8);
+ STREAM_WRITE(w_ptr, (u8)rx_tonemaps->scl_cfp, 8);
+ STREAM_WRITE(w_ptr, valid_tm_list_lg, 8);
+ for (i=0; i<TONEMAP_INDEX_NB; i++) if (rx_tonemaps->tm[i])
+ {
+ STREAM_WRITE(w_ptr, i+4, 8);
+ }
+
+ tonemap_intervals_t *intervals = rx_tonemaps->intervals;
+ STREAM_WRITE(w_ptr, intervals->intervals_nb, 8);
+ for (i=0; i<(int)intervals->intervals_nb; i++)
+ {
+ STREAM_WRITE(w_ptr, intervals->interval[i].end_offset_atu, 16);
+ STREAM_WRITE(w_ptr, intervals->interval[i].tmi, 8);
+ }
+ if(new_tmi != TONEMAP_INDEX_NULL)
+ {
+ new_tm=rx_tonemaps->tm[new_tmi];
+ dbg_assert_ptr (new_tm);
+ STREAM_WRITE(w_ptr, new_tmi+4, 8);
+ STREAM_WRITE(w_ptr, new_tm->cpf, 8);
+ STREAM_WRITE(w_ptr, new_tm->fecrate, 8);
+ STREAM_WRITE(w_ptr, new_tm->gil, 8);
+ STREAM_WRITE(w_ptr, 0x01, 8);
+ u32 *entry_nb_address = stream_writer.stream;
+ u32 entry_nb_offset = stream_writer.bit_offset;
+ STREAM_WRITE(w_ptr, 0xFFFF, 16);
+ entry_nb = cei_tmdata_encode (&stream_writer, new_tm->tmdma_desc_head, mask);
+ bitstream_direct_write (entry_nb_address, entry_nb_offset, entry_nb, 16);
+ }
+ bitstream_finalise (&stream_writer);
+ mme_len = ((u32) stream_writer.stream) - ((u32)stream_writer.start) + ((stream_writer.bit_offset+7)/8);
+ cei_created_status_t ret;
+ ret.length = mme_len;
+ ret.mm_type = CM_CHAN_EST_IND;
+ return(ret);
+}
+#endif
+
+#ifdef TXCE
+
+static inline void
+cei_tone_write (bitstream_t *stream_writer, uint tone, uint *write_nb, u8 *next_data)
+{
+ bitstream_access (stream_writer, &tone, 4);
+ *write_nb = (*write_nb)+1;
+ if ( (*write_nb) == BLK_SIZE*2)
+ {
+ bitstream_finalise (stream_writer);
+ bitstream_init (stream_writer, next_data, BLK_SIZE, BITSTREAM_WRITE);
+ }
+}
+
+/**
+ * Update a set of tonemap from cei message.
+ * \param tx_tonemaps_to_update set of tonemaps to update.
+ * \param mm_type type of cei message
+ * \param mm_entry start address of mmentry.
+ * \param mask tonemask
+ * \return the valid tonemap. [A32...A0] bits set if valid.
+ */
+static u32 // valid_tonemap u32 as 32 tonemap max.
+cei_decode (tonemaps_t *tx_tonemaps_to_update, int mm_type, u8 *mm_entry, u8 *mask)
+{
+ //TODO switch MMTYPE
+ int i,j;
+ int new_tmi;
+ int valid_nb; // nb tonemap valid announced by mme
+ u32 tonemaps_valid_status; //return value : tonemap_valid_status that must be kept for release_old_tonemap done under lock_it
+ u32 sort; // local tonemap_valid_status that must be kept for release_old_tonemap done under lock_it
+ int next_nibble, next_next_nibble;
+ int entry_nb;
+ int mod; //modulation
+ int codage;
+ int tmp_default_tmi;
+ bitstream_t stream_reader;
+ bitstream_t stream_writer;
+ uint read;
+ uint write_nb = 0;
+ bitstream_init (&stream_reader, mm_entry, 1518, BITSTREAM_READ);
+ bitstream_access (&stream_reader, &read, 16);
+ tx_tonemaps_to_update->max_fl_av = read;
+ bitstream_access (&stream_reader, &read, 8);
+ tx_tonemaps_to_update->rifs_av_one_sym_tck = read*MAC_TCK_PER_FL;
+ bitstream_access (&stream_reader, &read, 8);
+ tx_tonemaps_to_update->rifs_av_two_sym_tck = read*MAC_TCK_PER_FL;
+ bitstream_access (&stream_reader, &read, 8);
+ tx_tonemaps_to_update->rifs_av_g2_sym_tck = read*MAC_TCK_PER_FL;
+ bitstream_access (&stream_reader, &read, 8);
+ bitstream_access (&stream_reader, &read, 8);
+ tx_tonemaps_to_update->max_tm = read;
+ bitstream_access (&stream_reader, &read, 8);
+ tmp_default_tmi = read;
+ bitstream_access (&stream_reader, &read, 8);
+ tx_tonemaps_to_update->scl_cp = read;
+ bitstream_access (&stream_reader, &read, 8);
+ tx_tonemaps_to_update->scl_cfp = read;
+
+ bitstream_access (&stream_reader, &valid_nb, 8);
+ tonemaps_valid_status = 0;
+ for (i=0; i<valid_nb; i++)
+ {
+ bitstream_access (&stream_reader, &read, 8);
+ tonemaps_valid_status = tonemaps_valid_status | ( 1 << (read - 4) );
+ }
+ sort = tonemaps_valid_status;
+ for (i=0; i<TONEMAP_INDEX_NB; i++)
+ {
+ if ( ((sort & 0x01) == 0x01) && (!tx_tonemaps_to_update->tm[i]) )
+ {
+ tx_tonemaps_to_update->tm[i] = tonemap_alloc();
+ }
+ if ( ((sort & 0x01) == 0x00) && (tx_tonemaps_to_update->tm[i]) ) tonemap_release (tx_tonemaps_to_update, i);
+ sort = sort >> 1;
+ }
+ tonemap_intervals_t *intervals = tx_tonemaps_to_update->intervals;
+ if (intervals != tx_tonemaps_to_update->swap_intervals) intervals++;
+ //intervals->intervals_nb = READ_U8;
+ bitstream_access (&stream_reader, &read, 8);
+ intervals->intervals_nb = read;
+ for (i=0; i<(int)intervals->intervals_nb; i++)
+ {
+ //intervals->interval[i].end_offset_atu = (READ_U8 <<8);
+ //intervals->interval[i].end_offset_atu += READ_U8;
+ bitstream_access (&stream_reader, &read, 16);
+ intervals->interval[i].end_offset_atu = read;
+ //intervals->interval[i].tmi = READ_U8;
+ bitstream_access (&stream_reader, &read, 8);
+ intervals->interval[i].tmi = read;
+ }
+
+ bitstream_access (&stream_reader, &new_tmi, 8);
+ if(new_tmi>=4)
+ {
+ new_tmi-=4;
+ dbg_assert (tx_tonemaps_to_update->tm[new_tmi]);
+ dbg_assert (tx_tonemaps_to_update->tm[new_tmi]->tmdma_desc_head);
+ bitstream_access (&stream_reader, &read, 8);
+ tx_tonemaps_to_update->tm[new_tmi]->cpf = read;
+ bitstream_access (&stream_reader, &read, 8);
+ tx_tonemaps_to_update->tm[new_tmi]->fecrate = read;
+ bitstream_access (&stream_reader, &read, 8);
+ tx_tonemaps_to_update->tm[new_tmi]->gil = read;
+ bitstream_access (&stream_reader, &codage, 8);
+
+ if (codage == 1 || codage == 0) // ABSOLUTE CODE(SAME DECODE IF COMPRESSED OR NOT)
+ {
+ bitstream_access (&stream_reader, &entry_nb, 16);
+
+ bitstream_init (&stream_writer, tx_tonemaps_to_update->tm[new_tmi]->tmdma_desc_head->data, BLK_SIZE, BITSTREAM_WRITE);
+ u8 *next_data = tx_tonemaps_to_update->tm[new_tmi]->tmdma_desc_head->next->data;
+ bitstream_access (&stream_reader, &mod, 4);
+
+ int c=0;
+ for (i=0; i<entry_nb; i++)
+ {
+ bitstream_access (&stream_reader, &next_nibble, 4);
+ if (next_nibble < 8 )
+ {
+ while ( ((mask[c/8] & (1<<(c%8)))) == 0)
+ {
+ cei_tone_write (&stream_writer, 0, &write_nb, next_data);
+ c++;
+ }
+ cei_tone_write (&stream_writer, mod, &write_nb, next_data);
+ c++;
+ mod = next_nibble;
+ }
+ else
+ {
+ bitstream_access (&stream_reader, &next_next_nibble, 4);
+ if (next_next_nibble < 8)
+ {
+ for (j=0; j<next_nibble-5; j++)
+ {
+ while (((mask[c/8] & (1<<(c%8)))) == 0)
+ {
+ cei_tone_write (&stream_writer, 0, &write_nb, next_data);
+ c++;
+ }
+ cei_tone_write (&stream_writer, mod, &write_nb, next_data);
+ c++;
+ }
+ mod = next_next_nibble;
+
+ }
+ else
+ {
+ for (j=0; j < (3 + ( ( (next_nibble-7) << 3) | ( next_next_nibble & 7) )); j++)
+ {
+ while ((mask[c/8] & (1<<(c%8))) == 0)
+ {
+ cei_tone_write (&stream_writer, 0, &write_nb, next_data);
+ c++;
+ }
+ cei_tone_write (&stream_writer, mod, &write_nb, next_data);
+ c++;
+ }
+ bitstream_access (&stream_reader, &mod, 4);
+ }
+ }
+ }
+ cei_tone_write (&stream_writer, 0, &write_nb, next_data);
+ }
+ else
+ {
+ // TODO: RELATIVE CODAGE
+ }
+ }
+ bitstream_finalise (&stream_writer);
+ // ATOMIC switch intervals
+ tx_tonemaps_to_update->intervals = intervals;
+ // ATOMIC set tonemap default;
+ tx_tonemaps_to_update->default_tmi = tmp_default_tmi;
+ tx_tonemaps_to_update->expiration_rtc_date = cyg_current_time() + S_TO_RTC (TONEMAPS_LIFE_DURATION_S);
+ return (tonemaps_valid_status);
+}
+#endif
+
+END_DECLS
+
+#endif /* ce_inc_cei_h */
+
+/*
+
+uint ref[75] //Nibble Encoding table reference.
+{
+ 0, 0, 0, // 00 - 02
+ 8, 9, 10, 11, 12, 13, 14, 15, // 03 - 10
+ 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, // 11 - 18
+ 0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, // 19 - 26
+ 0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, // 27 - 34
+ 0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, // 35 - 42
+ 0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, // 43 - 50
+ 0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, // 51 - 58
+ 0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, // 59 - 66
+ 0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF // 67 - 74
+};
+
+*/
diff --git a/cesar/ce/inc/cei_param.h b/cesar/ce/inc/cei_param.h
new file mode 100755
index 0000000000..c481e40817
--- /dev/null
+++ b/cesar/ce/inc/cei_param.h
@@ -0,0 +1,97 @@
+#ifndef ce_inc_cei_param_h
+#define ce_inc_cei_param_h
+/* Cesar pro ject {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ce/inc/cei_param.h
+ * \brief header for the storage of cei message to create and send.
+ * \ingroup ce
+ *
+ * A static structure (cei_param_fifo_t) is used to store a maximum number(CEI_WANTED_MAX)
+ * of cei message to create (cei_param_t). It is store as a circular buffer
+ * and when the buffer is full, the next cei_param_t is dropped.
+ * A new cei_param_t can be added when :
+ * -A new tonemap has been computed.
+ * -Enough sound have been sent. (versus sound reason code)
+ * -A tonemap must be refreshed because will soon expired.
+ * A cei_param_t is read when unless one is present and it is the rxce_process turn to
+ * work.
+ */
+#include "mac/common/tonemap.h"
+
+#define CEI_WANTED_MAX 32
+
+/** Parameters allowing to build the CEI message.*/
+struct cei_param_t
+{
+ /** Set of tonemaps concerned */
+ tonemaps_t *tms;
+ /** tonemap index to encode */
+ uint new_tmi;
+ /** tonemap index to inactive */
+ uint old_tmi;
+ /** Priority in control plane mme list (CA2 for cei message) */
+ uint priority;
+ /** Destination tei useful to find the MAC ADDRESS */
+ uint dtei;
+};
+typedef struct cei_param_t cei_param_t;
+
+/** FIFO and pointers manager for CEI message to create */
+struct cei_param_fifo_t
+{
+ /** Space reserved to store the cei_param_t */
+ cei_param_t list[CEI_WANTED_MAX];
+ /** Index of the next cei_param_t to read */
+ uint reader_index;
+ /** Index of the next cei_param_t to write */
+ uint writer_index;
+ /** Number of cei_param_t that are stored. */
+ uint number;
+};
+typedef struct cei_param_fifo_t cei_param_fifo_t;
+
+/** Static FIFO */
+cei_param_fifo_t cei_param_fifo;
+
+BEGIN_DECLS
+
+/**
+ * Add a cei_param_t in the list of cei_param_t to create.
+ * \param new_cei cei_param_t to add.
+ * \return if cei_param_t could be added (the list wasn't full)
+ *
+ * Be sure that cei_param_add is never call when rxce is getting it.
+ * No security in this case.
+ * cei_param_add is run in the rxce_process and not in callback
+ * so that cei_param_get is never interrupted by cei_param_add.
+ *
+ */
+bool
+cei_param_add (cei_param_t *new_cei);
+
+
+/**
+ * Get the oldest cei_param_t of the list.
+ * \return The contents of the oldest cei_param_t of the list.
+ *
+ * cei_param_get must not be interrupted by a cei_param_add :
+ * A cei_param_add must be launch in the rxce_process only.
+ */
+cei_param_t *
+cei_param_get (void);
+
+/**
+ * Initialize the cei_param_fifo_t structure.
+ */
+void
+cei_param_fifo_init (void);
+
+END_DECLS
+
+#endif /* ce_inc_cei_param_h */
diff --git a/cesar/ce/inc/ecos_time.h b/cesar/ce/inc/ecos_time.h
new file mode 100644
index 0000000000..853099a067
--- /dev/null
+++ b/cesar/ce/inc/ecos_time.h
@@ -0,0 +1,23 @@
+#ifndef macro_h
+#define macro_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file macro.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include <cyg/kernel/kapi.h>
+
+#define RTC_HZ CYGNUM_HAL_RTC_DENOMINATOR
+#define S_TO_RTC(s) (s*RTC_HZ)
+#define US_TO_RTC(us) ((us*RTC_HZ)/1000)
+
+#endif /* macro_h */
diff --git a/cesar/ce/inc/mpdu_measure_store.h b/cesar/ce/inc/mpdu_measure_store.h
new file mode 100755
index 0000000000..f8b7f5e92d
--- /dev/null
+++ b/cesar/ce/inc/mpdu_measure_store.h
@@ -0,0 +1,139 @@
+#ifndef ce_inc_mpdu_measure_store_h
+#define ce_inc_mpdu_measure_store_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ce/inc/mpdu_measure_store.h
+ * \brief headers for storage and computation of the frames(MPDU) noise measurement.»
+ * \ingroup ce
+ *
+ * Each time a frame is received, the DSP stores PB measurement in the PBs
+ * descriptors and computes several type of measurement along the MPDU. PBproc
+ * will transfer any of this measurement (TODO TBD) in block that SAR will
+ * provide to the CE via callback function.
+ *
+ * This header file provides functions to manage the list of frame in which measurement have been stored.
+ * It provides functions to add measurement within.
+ * It provides too basic functions to process measurement.
+ */
+#include "mac/pbproc/pbproc.h"
+#include "hal/phy/pbdma.h"
+#include "mac/common/sta.h"
+
+/** Length of the circular buffer that stores the mpdu measure expressed in frame number. */
+#define MPDU_MEASURE_STORE_SIZE 30
+
+#define MPDU_MEASURE_GET_BLK_NB(data_nb, data_nb_per_blk) ((data_nb + data_nb_per_blk - 1)/data_nb_per_blk)
+
+#define MPDU_MEASURE_PB_NB_PER_BLK (BLK_SIZE / sizeof(pb_measurement_t))
+
+/** Number of block allocated switch type of chandata*/
+uint mpdu_measure_chandata_blk_nb[PHY_CHANDATA_TYPE_NB];
+
+
+/** The PB measure (ber, half-it, crc_status) are stored in one or two blk switch the number of PB
+ * in the MPDU. The pb_measure_blk must stay allocatable as a blk_t.
+ */
+struct pb_measure_blk_t
+{
+ /** Pointer to the next descriptor */
+ struct pb_measure_blk_t *next;
+ /** Pointer to pb measure data */
+ pb_measurement_t *data;
+ /** Number of valid pb stored in data block.*/
+ uint pb_nb;
+};
+typedef struct pb_measure_blk_t pb_measure_blk_t;
+
+/** All of the measurements made on a MPDU.*/
+struct mpdu_measure_t
+{
+ /** Pointer to the mpdu reception parameters got from pbproc.*/
+ pbproc_rx_params_t *rx_params;
+ /** Pointer to the first pb measure block.*/
+ pb_measure_blk_t *pb_head;
+ /** Pointers to the first of each chandata measurement.*/
+ phy_chandata_t *chandata_head[PHY_CHANDATA_TYPE_NB];
+};
+typedef struct mpdu_measure_t mpdu_measure_t;
+
+/** mpdu measure storage context.
+ * Store has a static space.
+ * Store is managed as a FIFO.*/
+struct mpdu_measure_store_t
+{
+ /** Reserved space to store mpdu measures.*/
+ mpdu_measure_t store[MPDU_MEASURE_STORE_SIZE];
+ /** head of store. To get the oldest mpdu measure.*/
+ uint head;
+ /** tail of store. To put a new mpdu measure inside.*/
+ uint tail;
+ /** Number of mpdu measures in store.*/
+ uint measure_nb;
+};
+typedef struct mpdu_measure_store_t mpdu_measure_store_t;
+
+BEGIN_DECLS
+
+/**
+ * Initialize the mpdu measure store.
+ */
+mpdu_measure_store_t *
+mpdu_measure_store_init (void);
+
+/**
+ * todo : Release the previous one.
+ * \return A pointer to the oldest measure present in the store.
+ *
+ */
+mpdu_measure_t *
+mpdu_measure_store_get (mpdu_measure_store_t *ctx);
+
+
+/**
+ * Release mpdu measure pointed data (rx_param, pb measurement block(s),
+ * chandata(s)).
+ * \param measure Pointer to the mpdu measure that contents measure to release;
+ */
+void
+mpdu_measure_store_release (mpdu_measure_store_t *ctx, mpdu_measure_t *measure);
+
+bool // Was FIFO not full?
+mpdu_measure_store_append (mpdu_measure_store_t *ctx, pbproc_rx_params_t *rx_params, uint pb_nb,
+ pb_measure_blk_t ** first, pb_measure_blk_t **last,
+ phy_chandata_t *chandata_head, uint chandata_nb, uint *blk_offset);
+
+/**
+ * Add pb measurement in a MPDU measurement.
+ * \param fm Frame measurement where to add pb measurement.
+ * \param pb_nb Number of pb measurement to add.
+ * \param first Where to write the first's' pb measurement.
+ * \param last Where to write the following pb measurement
+ *
+ * first and last can already be used to store any previous pb measurement
+ * from the same MPDU. Is this case, function keep first and last. And SAR
+ * will fill the rest of block thanks to pb_nb information in the
+ * pb_measure_blk and update it.
+ * Otherwise, new allocation is done and pb_nb is reset.
+ */
+void
+mpdu_measure_pb_add (mpdu_measure_t *measure, uint pb_nb, pb_measure_blk_t **first, pb_measure_blk_t **last, uint *blk_offset);
+
+/**
+ * Add a particular type noise measurement.
+ * \param fm Frame measurement where to add noise measurement.
+ * \param noise Noise measurement to add.
+ *
+ * The type is described in the phy_chandata descriptor.
+ */
+void
+mpdu_measure_chandata_add (mpdu_measure_t *measure, phy_chandata_t *noise);
+
+END_DECLS
+
+#endif /* ce_inc_mpdu_measure_store_h */
diff --git a/cesar/ce/inc/rx.h b/cesar/ce/inc/rx.h
new file mode 100755
index 0000000000..5a064166c9
--- /dev/null
+++ b/cesar/ce/inc/rx.h
@@ -0,0 +1,203 @@
+#ifndef ce_inc_rx_h
+#define ce_inc_rx_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * * \file ../../inc/rx.h
+ * * \brief « brief description »
+ * * \ingroup
+ * *
+ * * « long description »
+ * */
+
+#include "ce/inc/cei_param.h"
+#include "ce/inc/mpdu_measure_store.h"
+#include "cyg/kernel/kapi.h"
+#include "lib/trace.h"
+#include "mac/sar/sar.h"
+
+#ifdef MAXIMUS_TEST
+#define TXCE
+#endif
+
+/** Priority of CEI message */
+#define CEI_PRIORITY 2
+
+// The MARGE can be optimized versus the stations number, and the knowledge of
+// worst case where rxce can turned.
+#ifndef EXPIRATION_TEST
+#define RXCE_TONEMAPS_REFRESH_MARGIN_S 2
+#define RXCE_TONEMAPS_REFRESH_PERIOD_S (TONEMAPS_LIFE_DURATION_S - RXCE_TONEMAPS_REFRESH_MARGIN_S)
+#else
+#define RXCE_TONEMAPS_REFRESH_MARGIN_S 1
+#define RXCE_TONEMAPS_REFRESH_PERIOD_S (2 - RXCE_TONEMAPS_REFRESH_MARGIN_S)
+#endif
+
+/** Structure describing the last received sound frame situation */
+struct sound_param_t
+{
+ uint stei;
+ uint reason_code;
+};
+typedef struct sound_param_t sound_param_t;
+
+/** Global structure for rxce context. */
+struct rxce_t
+{
+ /** Semaphore incremented when rxce has something to do :
+ * -PBproc would have a Sound complete flag.
+ * -A CEI must be built (a cei_param has been added in the
+ * cei_param_fifo.)
+ * -Computation can be done. (A frame measurement has been added, but
+ * not the first).
+ *
+ */
+ cyg_sem_t job;
+ mac_store_t *mac_store_ctx;
+ /** Pointer to global tonemask */
+ u8 *mask;
+ /** Received sound frame information.*/
+ bool pbproc_need_scf;
+ sound_param_t sound_param;
+
+ mpdu_measure_store_t *mpdu_measure_store_ctx;
+
+ /** Tracing system */
+#if CONFIG_TRACE
+ /** cl Trace */
+ trace_buffer_t trace;
+#endif /* !CONFIG_TRACE */
+#ifdef RXCE_MONITORING
+ /** Pipe to send measurement and tonemap when processed*/
+ int pipe_out_fd;
+ char pipe_out_name[1024];
+#endif
+};
+typedef struct rxce_t rxce_t;
+
+#ifdef EXPIRATION_TEST
+typedef void ( *test_cb_t) (int);
+
+void
+rxce_init_test_cb (test_cb_t test);
+
+test_cb_t expiration_test;
+
+#endif
+
+BEGIN_DECLS
+
+/**
+ * Initialize the global structure of rxce context.
+ * \param mac_store_ctx Access to the sta.
+ * \param mac_config_ctx Access to the tonemask.
+ * \return the rxce context.
+ *
+ */
+rxce_t *
+rxce_init (sar_t *sar_ctx, mac_store_t *mac_store_ctx, mac_config_t *mac_config_ctx);
+
+/**
+ * Callback called by pbproc when it need to have a SCF i.e when it receives a
+ * sound frame. If CE is late, pbproc returns a SCF to false.
+ * \param tei tei of station that has sent the sound frame.
+ * \param src SoundReasonCode :why station has sent the sound frame.
+ *
+ * The rxce initialize the pbproc status variables and add a job to do.
+ */
+void
+pbproc_need_scf_cb (uint tei, uint src);
+
+/**
+ * Callback called by SAR when it need to has new pb measurement. This
+ * function add the pb measurement in the list of frame measurement.
+ * \param user .
+ * \param rx_params Frame reception condition.
+ * \param pb_nb The pb measurement number that the SAR wants to dispose.
+ * \param first First descriptor and so data block where to store pb
+ * measurement.
+ * \param last Last descriptor and so data block where to store pb
+ * measurement.
+ */
+bool // does channel estimation need pb_measurement?
+rxce_mpdu_measurement_add (void *user, pbproc_rx_params_t *rx_params,
+ uint pb_nb, blk_t **first, blk_t **last,
+ pb_t *noise, uint n, uint *blk_offset);
+
+/**
+ * Add a 'cei message job' for each tonemaps that must be updated and evaluate
+ * the next milestone to redo it.
+ * \param ctx rxce context
+ * \return the next refresh date.
+ *
+ * For rx_tonemaps, the expiration_rtc_date must be interpreted as a
+ * refresh_rtc_date that is the expiration_rtc_date less a marging to allow the
+ * CP to create cei message, to the lower layers to send it, and the
+ * destination station to receive it.
+ * Dates are expressed in rtc, real-time clock is ecos context, i.e. the tick
+ * ecos. (certainly 10ms).
+ * Algorithm runs stupidly all tonemaps. An optimized algorithm with a
+ * management of a tree could be envisaged.
+ */
+cyg_tick_count_t
+rxce_tonemaps_refresh_management(rxce_t *ctx);
+
+/**
+ * Determine the value of SCF that PBproc must answer to the station
+ * sound transmitter versus the announced SRC stored in rxce context.
+ * \return SCF to be sent by PBproc.
+ *
+ * Function called in rxce process when there is a new 'pbproc need scf job'
+ * to do.
+ */
+bool
+compute_scf (rxce_t *ctx);
+
+/**
+ * Compute the first frame measurement present in the list of frame
+ * measurement.
+ *
+ * Function called in rxce process when there is a 'frame measurement job' to
+ * do.
+ */
+void
+rxce_next_measurement_compute (rxce_t *ctx);
+
+/**
+ * Main thread of rxce.
+ * \param data allows the pass the rxce context.
+ *
+ * rxce_process wait on the 'job' semaphore. The several callback can
+ * provide new 'jobs'. Three sort of 'job' exists :
+ * -PBproc need to know the scf to return.
+ * -A station need or must receive a CEI to update its set of tonemaps.
+ * -Noise (any frame measurement) are waiting to be computed.
+ * Those 'jobs' are described by priority order.
+ *
+ * More, the semaphore can be timeout in order to ensure tonemaps refresh.
+ * Timeout is reestimatimate at each loop of the process thanks to
+ * rxce_tonemaps_refresh_management.
+ */
+void
+rxce_process (cyg_addrword_t data);
+
+/**
+ * Add a job for rxce that will create and add a cei message to transmit
+ * \param ctx rxce context.
+ * \param tms set of tonemaps to encode in cei message.
+ * \param new_tmi new tmi created if necessary, else NULL_TONEMAP_INDEX.
+ * \param old_tmi tmi that new_tmi will replace.
+ * \param dtei destination tei of cei message.
+ *
+ */
+void
+rxce_job_cei_add (rxce_t *ctx, uint dtei, tonemaps_t *tms, uint new_tmi, uint old_tmi);
+
+END_DECLS
+
+#endif /* ce_inc_rx_h */
diff --git a/cesar/ce/inc/trace.h b/cesar/ce/inc/trace.h
new file mode 100644
index 0000000000..4f3e7970dd
--- /dev/null
+++ b/cesar/ce/inc/trace.h
@@ -0,0 +1,74 @@
+#ifndef ce_inc_trace_h
+#define ce_inc_trace_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ce/inc/trace.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#include "lib/trace.h"
+
+/** Shortcut for tracing inside CE. */
+#define RXCE_TRACE(id, args...) \
+ TRACE_FAST_SHORT (RXCE_TRACE_, &ctx->trace, id, ## args)
+
+#if CONFIG_TRACE
+enum
+{
+ RXCE_TRACE_INIT,
+ RXCE_TRACE_SAR_MEASUREMENT_CB,
+ RXCE_TRACE_MEASURE_DROPPED,
+ RXCE_TRACE_PROCESS_WAIT,
+ RXCE_TRACE_PROCESS_TRIGGERED,
+ RXCE_TRACE_SCF_PROCESS,
+ RXCE_TRACE_CEI_PROCESS,
+ RXCE_TRACE_BITLOADING_PROCESS,
+ RXCE_TRACE_REFRESH_PROCESS,
+};
+
+BEGIN_DECLS
+
+/**
+ * Initialize the trace system
+ * \param ctx the ce context.
+ */
+void
+rxce_trace_init (rxce_t *ctx);
+
+/**
+ * Uninitialize the trace system
+ * \param ctx the ce context
+ */
+void
+rxce_trace_uninit (rxce_t *ctx);
+
+/**
+ * Print the traces
+ * \param ctx the ce context.
+ */
+void
+rxce_trace_print (rxce_t *ctx);
+
+END_DECLS
+
+#else /* !CONFIG_TRACE */
+
+#define rxce_trace_init(ctx) ((void) 0)
+#define rxce_trace_uninit(ctx) ((void) 0)
+#define rxce_trace_print(ctx) ((void) 0)
+
+#endif /* !CONFIG_TRACE */
+
+
+
+
+#endif /*ce_inc_trace_h */
diff --git a/cesar/ce/inc/tx.h b/cesar/ce/inc/tx.h
new file mode 100755
index 0000000000..240ce9c083
--- /dev/null
+++ b/cesar/ce/inc/tx.h
@@ -0,0 +1,108 @@
+#ifndef ce_inc_tx_h
+#define ce_inc_tx_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file tx.h
+ * \brief Sub - Function of Control Plane task that update the set of
+ * tonemaps versus several cei message received.
+ * \ingroup cp
+ *
+ */
+
+#include "mac/common/store.h"
+#include "mac/common/config.h"
+#include "cyg/kernel/kapi.h"
+#include "cp/interf/interf.h"
+
+
+/** Global structure for txce context */
+struct txce_t
+{
+ /** Access to sta and set of tonemaps (TODO ??and mac address) from
+ * rx_params-tei.*/
+ mac_store_t *mac_store_ctx;
+ /** Pointer to global tonemask */
+ u8 *tonemask;
+ /** interf context allowing to add event in CP. */
+ interf_t *interf_ctx;
+ /** Handle to alarm. */
+ cyg_handle_t alarm_hdl;
+ /** Pointer to the alarm object. */
+ cyg_alarm alarm_obj;
+
+};
+typedef struct txce_t txce_t;
+
+BEGIN_DECLS
+
+/**
+ * Expire all tonemaps with an expiration date greater than the current date.
+ * And detect the next expiration date.
+ * \param ctx txce context.
+ * \return the next expiration date.
+ *
+ * Dates are expressed in rtc, real-time clock is ecos context, i.e. the tick
+ * ecos. (certainly 10ms).
+ * Algorithm runs stupidly all tonemaps. An optimized algorithm with a
+ * management of a tree could be envisaged.
+ */
+cyg_tick_count_t
+txce_expiration_tonemaps_management (txce_t *ctx);
+
+/**
+ * Initialize the global structure of txce context.
+ * \param mac_store_ctx Access to the sta.
+ * \param mac_config_ctx Access to the tonemask.
+ * \return the txce context.
+ *
+ */
+txce_t *
+txce_init (mac_store_t *mac_store_ctx, mac_config_t *mac_config_ctx, interf_t *interf);
+
+/**
+ * Control Plane function called when a mme arrives and correspond to a cei
+ * mmtype or when CP manages a TXCE_EVENT.
+ * \param ctx txce context.
+ * \param stei Source station of message received.
+ * \param mmtype Message type CM_TM_UPDATE.IND or CM_CHAN_EST.IND
+ * \param mm_entry Pointer to the start of mm_entry or NULL if launched from a TXCE_EVENT.
+ *
+ * At first, the function computes the cei message (if there is) and update
+ * the set of tonemap concerned and its new expiration date.
+ * Then, function runs the txce_expiration_tonemaps and reprogram the next
+ * alarm date. If alarm occurs, this function will be called without message.
+ * So the function runs the txce_expiration_tonemaps and reprogram the next
+ * alarm date...
+ *
+ * Keep careful : The PBproc can read-access to the set of tonemap while this
+ * function is updating it.
+ * Notices :
+ * - A tonemap is always added, never replaces another.
+ * - Intervals can be modified. Intervals description
+ * is duplicate, and a pointer points to the currents intervals. Change it
+ * atomically.
+ * - Releasing tonemap : Counter reference should protect the situation.
+ */
+void
+txce (txce_t *ctx, uint stei, u32 mmtype, u8 *mm_entry);
+
+/**
+ * function called when alarm occurs.
+ * \param alarm_hdl handle to the alarm.
+ * \param data allows to pass the txce context.
+ *
+ * This function add an TXCE_EVENT in CP in order that CP recall txce_rcv_mme
+ * function with an mm_entry NULL.
+ */
+void
+alarm_cb (cyg_handle_t alarm_hdl, cyg_addrword_t data);
+
+END_DECLS
+
+#endif /* ce_inc_tx_h */
diff --git a/cesar/ce/rxce_stats.h b/cesar/ce/rxce_stats.h
new file mode 100755
index 0000000000..5ada73629c
--- /dev/null
+++ b/cesar/ce/rxce_stats.h
@@ -0,0 +1,96 @@
+#ifndef ce_inc_rxce_stats_h
+#define ce_inc_rxce_stats_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ce/inc/rxce_stats.h
+ * \brief Management of rxce status by station.
+ * \ingroup ce
+ *
+ */
+
+#include "mac/common/tonemap.h"
+
+/**
+ * Several statistics stored in each station used by rxce process.
+*/
+struct rxce_processing_t
+{
+ /** Tonemap in build while new noise measurement arrive. */
+ tonemap_t *tm_in_build;
+ /** Status of RXCE relative to the station. */
+ uint status;
+ /** Stable frame number received in ROBO mode.
+ * Stable means that PHY_CHANDATA_TYPE_FREQ_NOISE have been exploited
+ * because PHY_CHANDATA_TYPE_TIME_NOISE were enough stable to trust.
+ */
+ uint stable_ROBO_nb;
+ /** Unstable frame number received in ROBO mode. */
+ uint unstable_ROBO_nb;
+ /** Unusable frame number received in ROBO mode.
+ * Unusable means that frame were data and the BER was not null. So the
+ * remodulate noise can be false. */
+ uint unusable_ROBO_nb;
+ /** The time in us since the station is sending ROBO frame. */
+ uint timestamp_ROBO_us;
+ /** Stable frame number received in nonROBO mode.*/
+ uint stable_nonROBO_nb;
+ /** Unstable frame number received in nonROBO mode. */
+ uint unstable_nonROBO_nb;
+ /** Unusable frame number received in nonROBO mode. */
+ uint unusable_nonROBO_nb;
+ /** Total frame number processed by rxce process */
+ uint measurement_computed_nb;
+ /** Informs pbproc about downloading measurements */
+ uint need_measurement;
+ };
+typedef struct rxce_processing_t rxce_processing_t;
+
+BEGIN_DECLS
+
+
+/**
+ * Reset initial rxce statitistics.
+ * \param rxce Structure of rxce statistics.
+ */
+extern inline void
+rxce_stats_init (rxce_processing_t *rxce)
+{
+ rxce->status = 0;
+ rxce->stable_ROBO_nb = 0;
+ rxce->unstable_ROBO_nb = 0;
+ rxce->timestamp_ROBO_us = 0;
+ rxce->stable_nonROBO_nb = 0;
+ rxce->unstable_nonROBO_nb = 0;
+ rxce->unusable_nonROBO_nb = 0;
+ rxce->measurement_computed_nb = 0;
+ rxce->tm_in_build = NULL;
+ rxce->need_measurement = 0;
+}
+
+
+/**
+ * Free eventually allocated blocks in rxce statistics.
+ * \param rxce Structure of rxce statistics.
+ */
+extern inline void
+rxce_stats_uninit (rxce_processing_t *rxce)
+{
+ tonemap_t *tm = rxce->tm_in_build;
+ if (tm)
+ {
+ rxce->tm_in_build = NULL;
+ blk_release_desc_range (tm->tmdma_desc_head, tm->tmdma_desc_head->next);
+ }
+}
+
+
+END_DECLS
+
+#endif /* ce_inc_rxce_stats_h */
+
diff --git a/cesar/ce/src/bitloading.c b/cesar/ce/src/bitloading.c
new file mode 100644
index 0000000000..381affaa23
--- /dev/null
+++ b/cesar/ce/src/bitloading.c
@@ -0,0 +1,215 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ce/src/bitloading.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#include "common/std.h"
+#include "mac/common/timings.h"
+#include "ce/inc/bitloading.h"
+
+#define SET_WORST_NIBBLE(old,new,noise) do { \
+ u32 mod = bitloading_noise2mod (noise); \
+ u32 zmod = old & 0xF; \
+ /*printf ("new mod eventuel = 0x%x, ex mod = 0x%x\n", mod, zmod);*/ \
+ if (mod < zmod) \
+ { \
+ zmod = mod; \
+ ret = true; \
+ } \
+ new = (new>>4) | (zmod<<28); \
+} while (0);
+
+#define SET_TWO_NIBBLES(new,old,two_noise) do { \
+ u32 noise = two_noise & 0x0000FFFF; \
+ SET_WORST_NIBBLE(old,new,noise); \
+ old = old >> 4; \
+ noise = (two_noise & 0xFFFF0000) >> 16; \
+ SET_WORST_NIBBLE(old,new,noise); \
+ old = old >> 4; \
+} while (0);
+
+#define SET_EIGHT_NIBBLES(tm_data,two_noise_ptr) do { \
+ u32 old = tm_data; \
+ /*printf ("old = 0x%x\n", old);*/ \
+ u32 new = 0; \
+ {SET_TWO_NIBBLES(new,old,(*two_noise_ptr)); two_noise_ptr++;} \
+ {SET_TWO_NIBBLES(new,old,(*two_noise_ptr)); two_noise_ptr++;} \
+ {SET_TWO_NIBBLES(new,old,(*two_noise_ptr)); two_noise_ptr++;} \
+ {SET_TWO_NIBBLES(new,old,(*two_noise_ptr)); two_noise_ptr++;} \
+ tm_data = new; \
+ /*printf ("new = 0x%x\n", new);*/ \
+} while (0);
+
+#define SET_256_NIBBLES(noise_blk,tm_data_ptr) do { \
+ u32 b; \
+ u32 *two_noise_ptr = (u32 *) noise_blk->data; \
+ for (b=0; b<32; b++) \
+ { \
+ SET_EIGHT_NIBBLES((*tm_data_ptr),two_noise_ptr); \
+ tm_data_ptr++; \
+ } \
+} while (0);
+
+bitloading_modification_t
+bitloading_run (mac_store_t *mac_store_ctx, mpdu_measure_t *measure)
+{
+ bitloading_modification_t ret;
+ dbg_assert (mac_store_ctx);
+ dbg_assert (measure);
+ pbproc_rx_params_t *rx_params = measure->rx_params;
+ dbg_assert (rx_params);
+ sta_t *ssta = mac_store_sta_get (mac_store_ctx, rx_params->tei);
+ dbg_assert (ssta);
+ if (ssta->rx_tonemaps->default_tmi == TONEMAP_INDEX_INITIAL_START ) // no default_tonemap
+ {
+ ret = bitloading_initial_step (ssta, measure);
+ }
+ else
+ {
+ ret = bitloading_dynamic_step (ssta, measure);
+ }
+ blk_release (ssta);
+ return ret;
+}
+
+
+bitloading_modification_t
+bitloading_initial_step (sta_t *ssta, mpdu_measure_t *measure)
+{
+ dbg_assert (ssta);
+ dbg_assert (measure);
+ bitloading_modification_t ret;
+ tonemaps_t *tms = ssta->rx_tonemaps;
+ ret.stei = ssta->tei;
+ ret.changed_tonemaps = NULL;
+ {
+ if (measure->chandata_head[PHY_CHANDATA_TYPE_NRJ])
+ {
+ bitloading_worst_tonemap_compute (&ssta->rxce.tm_in_build, measure->chandata_head[PHY_CHANDATA_TYPE_NRJ]);
+ if (ssta->rxce.measurement_computed_nb >= FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP)
+ {
+ tms->default_tmi = tonemap_set_first_free (tms, ssta->rxce.tm_in_build);
+ ssta->rxce.tm_in_build = NULL;
+ ret.changed_tonemaps = tms;
+ ret.new_tmi = tms->default_tmi;
+ ret.old_tmi = TONEMAP_INDEX_NULL;
+ }
+ }
+ ssta->rxce.measurement_computed_nb++;
+ }
+ if (measure->chandata_head[PHY_CHANDATA_TYPE_NRJ_SYMBOL])
+ {
+ if (bitloading_mpdu_noise_stability (measure->chandata_head[PHY_CHANDATA_TYPE_NRJ_SYMBOL]))
+ {
+ ssta->rxce.stable_ROBO_nb++;
+ }
+ else
+ {
+ ssta->rxce.unstable_ROBO_nb++;
+ }
+ }
+ return ret;
+}
+
+bitloading_modification_t
+bitloading_dynamic_step (sta_t *sta, mpdu_measure_t *measure)
+{
+ bitloading_modification_t ret;
+ dbg_assert (sta);
+ dbg_assert (measure);
+ ret.stei = sta->tei;
+ ret.changed_tonemaps = NULL;
+ ret.new_tmi = TONEMAP_INDEX_NULL;
+ ret.old_tmi = TONEMAP_INDEX_NULL;
+ if (!sta->rxce.tm_in_build) sta->rxce.tm_in_build = tonemap_alloc ();
+ sta->rxce.measurement_computed_nb++;
+ return ret;
+}
+
+bool // Has tonemap been modified?.
+bitloading_worst_tonemap_compute (tonemap_t **worst_tm, phy_chandata_t *noise_nrj)
+{
+ dbg_assert (noise_nrj);
+ bool ret = false;
+ u32 *tm_data;
+ u32 i;
+ blk_t *blk_noise = (blk_t *) noise_nrj;
+ if (!(*worst_tm)) *worst_tm = tonemap_alloc();
+ tm_data = (u32 *) (*worst_tm)->tmdma_desc_head->data;
+ bitloading_update_threshold (1, 1);
+ for (i=0; i<4; i++)
+ {
+ SET_256_NIBBLES(blk_noise, tm_data); blk_noise = blk_noise->next;
+ }
+ tm_data = (u32 *) (*worst_tm)->tmdma_desc_head->next->data;
+ u32 *two_noise = (u32 *) blk_noise->data;
+ for (i=0; i<17; i++)
+ {
+ SET_EIGHT_NIBBLES((*tm_data), two_noise);
+ tm_data++;
+ }
+ // Not really necessary but delete the tone of unused carriers created by
+ // previous computation due to 1155%8!=0...
+ tm_data--;
+ *tm_data = *tm_data | 0xFFFFF000;
+ /** Padding of last byte force to 0 */
+ *tm_data = *tm_data & 0xFFFF0FFF;
+ return ret;
+}
+
+bool // Is noise stable along the MPDU?.
+bitloading_mpdu_noise_stability (phy_chandata_t *noise_nrj_symbol)
+{
+ dbg_assert (noise_nrj_symbol);
+ // BE CAREFUL to overflow of variables (accumulation of multiplication)
+ uint i;
+ u64 sum_x_2 = 0;
+ u64 sum_x2 = 0;
+ u64 comparator;
+ u32 val;
+ phy_noise_energy_t *data = (phy_noise_energy_t *) noise_nrj_symbol->blk.data;
+ uint symbol_number = noise_nrj_symbol->size;
+ // computation : is sigma > 0.1 *lambda ?
+ // cf spec about bitloading
+ for (i=0; i< symbol_number; i++)
+ {
+ val = *(data++);
+ dbg_assert_print (val<= NOISE_MAX, "noise overflow");
+ sum_x_2 += val;
+ sum_x2 += val * val;
+ }
+ sum_x_2 = sum_x_2 * sum_x_2;
+ comparator = 100 * (symbol_number * sum_x2 - sum_x_2);
+ return (comparator <= sum_x_2);
+}
+
+void
+bitloading_threshold_init (void)
+{
+ //QPSK_THR103 = {0.21, 0.105, 0.036,
+ //0.022, 0.0056, 0.00144, 0.00037};
+ THR3[1][0] = (uint) (0.21 * UND_CODE);
+ THR3[1][1] = (uint) (0.105 * UND_CODE);
+ THR3[1][2] = (uint) (0.036 * UND_CODE);
+ THR3[1][3] = (uint) (0.022 * UND_CODE);
+ THR3[1][4] = (uint) (0.0056 * UND_CODE);
+ THR3[1][5] = (uint) (0.00144 * UND_CODE);
+ THR3[1][6] = (uint) (0.00037 * UND_CODE);
+}
+
+uint // date_modulo_BEACON_PERIOD_ATU
+bitloading_date_in_beacon_atu_get (uint mpdu_date_tck, uint beacon_date_tck)
+{
+ dbg_assert (mpdu_date_tck - beacon_date_tck <= MAC_MS_TO_TCK (40));
+ return ( MAC_TCK_TO_ATU ((uint)(mpdu_date_tck - beacon_date_tck)));
+}
diff --git a/cesar/ce/src/cei_param.c b/cesar/ce/src/cei_param.c
new file mode 100755
index 0000000000..0c6888fd72
--- /dev/null
+++ b/cesar/ce/src/cei_param.c
@@ -0,0 +1,60 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ce/src/cei_param.c
+ * \brief Manage the list of cei message to create.
+ * \ingroup ce
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "ce/inc/cei_param.h"
+
+bool
+cei_param_add (cei_param_t *new_cei)
+{
+ dbg_assert (new_cei);
+ if (cei_param_fifo.number == CEI_WANTED_MAX)
+ {
+ // DROP new_cei because FIFO is full.
+ return (false);
+ }
+ else
+ {
+ cei_param_fifo.list[cei_param_fifo.writer_index] = *new_cei;
+ cei_param_fifo.number++;
+ cei_param_fifo.writer_index++;
+ if (cei_param_fifo.writer_index == CEI_WANTED_MAX)
+ cei_param_fifo.writer_index = 0;
+ return (true);
+ }
+}
+
+cei_param_t *
+cei_param_get (void)
+{
+ cei_param_t *ret = NULL;
+ if (cei_param_fifo.number > 0)
+ {
+ ret = &cei_param_fifo.list[cei_param_fifo.reader_index];
+ cei_param_fifo.reader_index++;
+ if (cei_param_fifo.reader_index == CEI_WANTED_MAX )
+ cei_param_fifo.reader_index = 0;
+ cei_param_fifo.number --;
+ }
+ return (ret);
+}
+
+void
+cei_param_fifo_init (void)
+{
+ cei_param_fifo.reader_index = 0;
+ cei_param_fifo.writer_index = 0;
+ cei_param_fifo.number = 0;
+}
+
diff --git a/cesar/ce/src/mpdu_measure_store.c b/cesar/ce/src/mpdu_measure_store.c
new file mode 100755
index 0000000000..c1f6d051e5
--- /dev/null
+++ b/cesar/ce/src/mpdu_measure_store.c
@@ -0,0 +1,260 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ce/src/mpdu_measure_store.c
+ * \brief « brief description »
+ * \ingroup ce
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "ce/inc/mpdu_measure_store.h"
+#include "hal/phy/defs.h"
+
+static mpdu_measure_store_t mpdu_measure_store_global;
+
+mpdu_measure_store_t *
+mpdu_measure_store_init (void)
+{
+ mpdu_measure_store_t *ctx = &mpdu_measure_store_global;
+ int i,j;
+ ctx->head = 0;
+ ctx->tail = 0;
+ ctx->measure_nb = 0;
+ for (i=0; i<MPDU_MEASURE_STORE_SIZE; i++)
+ {
+ ctx->store[i].pb_head = NULL;
+ for (j=0; j<PHY_CHANDATA_TYPE_NB; j++)
+ {
+ ctx->store[i].chandata_head[j] = NULL;
+ }
+ }
+ mpdu_measure_chandata_blk_nb[ PHY_CHANDATA_TYPE_NO_MEMORY_READ ] = 0;
+ mpdu_measure_chandata_blk_nb[ PHY_CHANDATA_TYPE_NRJ ] = MPDU_MEASURE_GET_BLK_NB (PHY_CARRIER_NB , PHY_NOISE_NB_PER_BLK );
+ mpdu_measure_chandata_blk_nb[ PHY_CHANDATA_TYPE_NRJ_SYMBOL ] = MPDU_MEASURE_GET_BLK_NB (MAC_MAX_SYMB_PER_MPDU , PHY_NOISE_NB_PER_BLK );
+ mpdu_measure_chandata_blk_nb[ PHY_CHANDATA_TYPE_SPECTRUM_TRUNC ] = MPDU_MEASURE_GET_BLK_NB (PHY_CARRIER_NB , PHY_SPECTRUM_NB_PER_BLK );
+ mpdu_measure_chandata_blk_nb[ PHY_CHANDATA_TYPE_SPECTRUM_RE ] = MPDU_MEASURE_GET_BLK_NB (PHY_CARRIER_NB , PHY_SPECTRUM_NB_PER_BLK );
+ mpdu_measure_chandata_blk_nb[ PHY_CHANDATA_TYPE_SPECTRUM_IM ] = MPDU_MEASURE_GET_BLK_NB (PHY_CARRIER_NB , PHY_SPECTRUM_NB_PER_BLK );
+ mpdu_measure_chandata_blk_nb[ PHY_CHANDATA_TYPE_DATA_LLR ] = 1;
+ mpdu_measure_chandata_blk_nb[ PHY_CHANDATA_TYPE_COPY_I_LLR ] = 1;
+ mpdu_measure_chandata_blk_nb[ PHY_CHANDATA_TYPE_COPY_Q_LLR ] = 1;
+ mpdu_measure_chandata_blk_nb[ PHY_CHANDATA_TYPE_COPY_VOTE_COEF ] = 1;
+ return (ctx);
+}
+
+void
+mpdu_measure_chandata_release (phy_chandata_t *head, uint n)
+{
+ if (head)
+ {
+ blk_t *tail = (blk_t *) head;
+ while (tail->next) {tail = tail->next;}
+ blk_release_desc_range ((blk_t *)head, tail);
+ }
+}
+
+void
+mpdu_measure_pb_release (pb_measure_blk_t *head)
+{
+ pb_measure_blk_t *tail;
+ if (head)
+ {
+ // Can have a maximum of 2 allocated blocks.
+ tail = head->next;
+ if (tail)
+ {
+ blk_release_desc_range ((blk_t *) head, (blk_t *)tail);
+ }
+ else
+ {
+ blk_release_desc ((blk_t *) head);
+ }
+ }
+}
+
+void
+mpdu_measure_rx_params_release (pbproc_rx_params_t *rx_params)
+{
+ if (rx_params)
+ {
+ blk_release (rx_params);
+ }
+}
+
+void
+mpdu_measure_drop (pbproc_rx_params_t *rx_params, pb_measure_blk_t *pb_head, phy_chandata_t *chandata_head, uint chandata_nb)
+{
+ mpdu_measure_rx_params_release (rx_params);
+ mpdu_measure_pb_release (pb_head);
+ mpdu_measure_chandata_release (chandata_head, chandata_nb);
+}
+
+void
+mpdu_measure_store_release (mpdu_measure_store_t *ctx, mpdu_measure_t *measure)
+{
+ dbg_assert (measure);
+ int i;
+ mpdu_measure_rx_params_release (measure->rx_params);
+ measure->rx_params = NULL;
+ mpdu_measure_pb_release (measure->pb_head);
+ measure->pb_head = NULL;
+ for (i=0; i<PHY_CHANDATA_TYPE_NB; i++)
+ {
+ if (measure->chandata_head[i])
+ {
+ mpdu_measure_chandata_release (measure->chandata_head[i], mpdu_measure_chandata_blk_nb[i]);
+ measure->chandata_head[i] = NULL;
+ }
+ }
+ ctx->measure_nb--;
+}
+
+mpdu_measure_t *
+mpdu_measure_store_get (mpdu_measure_store_t *ctx)
+{
+ dbg_assert (ctx);
+ mpdu_measure_t *ret = NULL;
+ if (ctx->measure_nb > 0)
+ {
+ ret = &ctx->store[ctx->head];
+ ctx->head++;
+ if (ctx->head == MPDU_MEASURE_STORE_SIZE)
+ ctx->head = 0;
+ }
+ return (ret);
+}
+
+/* TODO : frame_measurement_ber_add manage the fact that an MPDU can be
+ * reassembly in several time. But Not the other functionnalities:
+ * frame_measurement_append doesn't test the last received rx_params before
+ * adding a new frame_measurement, the RXCE process doesn't take into account
+ * the fact that pb_measurement could have been computed although that the complete
+ * MPDU has not been received...
+ */
+bool // Was FIFO not full?
+mpdu_measure_store_append (mpdu_measure_store_t *ctx, pbproc_rx_params_t *rx_params, uint pb_nb,
+ pb_measure_blk_t **pb_first, pb_measure_blk_t **pb_last,
+ phy_chandata_t *chandata_head, uint chandata_nb, uint *blk_offset)
+{
+ dbg_assert (ctx);
+ dbg_assert (!(chandata_nb==0 && chandata_head));
+ dbg_assert (rx_params);
+ bool ret = true;
+ if (ctx->measure_nb == MPDU_MEASURE_STORE_SIZE)
+ {
+ mpdu_measure_drop (rx_params, NULL, chandata_head, chandata_nb);
+ return (false);
+ }
+ else
+ {
+ mpdu_measure_t *measure = &ctx->store[ctx->tail];
+ measure->rx_params = rx_params;
+ if (pb_nb) mpdu_measure_pb_add (measure, pb_nb, pb_first, pb_last, blk_offset);
+ if (chandata_head) mpdu_measure_chandata_add (measure, chandata_head);
+ ctx->measure_nb++;
+ ctx->tail++;
+ if (ctx->tail == MPDU_MEASURE_STORE_SIZE)
+ ctx->tail = 0;
+ return (ret);
+ }
+}
+
+void
+mpdu_measure_pb_add (mpdu_measure_t *measure, uint pb_nb, pb_measure_blk_t **pb_first, pb_measure_blk_t **pb_last, uint *blk_offset)
+{
+ dbg_assert (measure);
+ dbg_assert (pb_nb<=MAC_MAX_PB_PER_MPDU);
+ if (pb_nb != 0)
+ {
+ pb_measure_blk_t *stock = measure->pb_head;
+ // If any pb measure have already been stored.
+ if (stock)
+ {
+ // If a second block has already been used. (max = 2)
+ if (stock->next)
+ {
+ dbg_assert ( (pb_nb + stock->next->pb_nb) <= MPDU_MEASURE_PB_NB_PER_BLK);
+ *blk_offset = stock->next->pb_nb;
+ stock->next->pb_nb += pb_nb;
+ *pb_first = *pb_last = stock->next;
+ }
+ else //Only one block is already used.
+ {
+ dbg_assert ( (pb_nb+stock->pb_nb) <= MAC_MAX_PB_PER_MPDU);
+ *blk_offset = stock->pb_nb;
+ *pb_first = stock;
+ if (pb_nb + stock->pb_nb > MPDU_MEASURE_PB_NB_PER_BLK) //A second block is necessary
+ {
+ *pb_last = (pb_measure_blk_t *) blk_alloc_desc();
+ (*pb_first)->next = *pb_last;
+ stock->next->pb_nb = pb_nb + stock->pb_nb - MPDU_MEASURE_PB_NB_PER_BLK;
+ stock->pb_nb = MPDU_MEASURE_PB_NB_PER_BLK;
+ }
+ else // The first block is enough.
+ {
+ *pb_last = *pb_first;
+ stock->pb_nb += pb_nb;
+ }
+ }
+ }
+ else //No block already allocated
+ {
+ if (pb_nb > MPDU_MEASURE_PB_NB_PER_BLK) //Need two blocks
+ {
+ *pb_first = (pb_measure_blk_t *) blk_alloc_desc_range (2, (blk_t **) pb_last);
+ (*pb_first)->pb_nb = MPDU_MEASURE_PB_NB_PER_BLK;
+ (*pb_last)->pb_nb = pb_nb - MPDU_MEASURE_PB_NB_PER_BLK;
+ }
+ else // Need one block.
+ {
+ *pb_first = *pb_last = (pb_measure_blk_t *) blk_alloc_desc();
+ (*pb_first)->pb_nb = pb_nb;
+ }
+ // Initialize first block pb nb to 0. SAR will start from 0 and update
+ // the new value.
+ *blk_offset = 0;
+ measure->pb_head = *pb_first;
+ }
+ (*pb_last)->next = NULL;
+ }
+ else
+ {
+ *pb_first = NULL; *pb_last = NULL; *blk_offset = 0;
+ }
+}
+
+void
+mpdu_measure_chandata_add (mpdu_measure_t *measure, phy_chandata_t *chandata_head)
+{
+ uint type;
+ dbg_assert (measure);
+ dbg_assert (chandata_head);
+ phy_chandata_t *browser = chandata_head;
+ phy_chandata_t *tmp;
+ do
+ {
+ type = browser->type;
+ dbg_assert (!measure->chandata_head[type]);
+ measure->chandata_head[type] = browser;
+ while (!browser->last && ((phy_chandata_t *) browser->blk.next)->type == type)
+ {
+ browser = (phy_chandata_t *) browser->blk.next;
+ }
+ if (browser->last)
+ {
+ browser->blk.next = NULL;
+ break;
+ }
+ else
+ {
+ tmp = browser;
+ browser = (phy_chandata_t *) browser->blk.next;
+ tmp->blk.next = NULL;
+ }
+ } while (browser->blk.next);
+}
diff --git a/cesar/ce/src/rx.c b/cesar/ce/src/rx.c
new file mode 100755
index 0000000000..66876bd0c5
--- /dev/null
+++ b/cesar/ce/src/rx.c
@@ -0,0 +1,300 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ../../src/rx.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "common/defs/ethernet.h"
+#include "ce/inc/rx.h"
+#include "ce/inc/trace.h"
+#include "ce/inc/bitloading.h"
+#define RXCE //for static functions of cei.h
+#include "ce/inc/cei.h"
+#include "cp/interf/interf.h"
+#include "ce/test/rx/inc/test_rx.h" // Should be an overrided pbproc...
+#if CONFIG_TRACE
+#include "mac/common/ntb.h"
+#endif
+#ifdef RXCE_MONITORING
+ #include "host/syscall.h"
+#endif
+
+static rxce_t ce_global;
+
+#ifdef EXPIRATION_TEST
+void
+rxce_init_test_cb (test_cb_t test)
+{
+ expiration_test = test;
+}
+#endif
+
+rxce_t *
+rxce_init (sar_t *sar, mac_store_t *mac_store_ctx, mac_config_t *mac_config_ctx)
+{
+ dbg_assert (mac_store_ctx);
+ dbg_assert (mac_config_ctx);
+ rxce_t *ctx = &ce_global;
+ ctx->mac_store_ctx = mac_store_ctx;
+ // Initialize THRESHOLD NOISE for computation
+ ctx->mpdu_measure_store_ctx = mpdu_measure_store_init ();
+ // Initialize FIFO for cei message to create.
+ cei_param_fifo_init();
+ // Initialize RXCE with no 'job' to do.
+ cyg_semaphore_init (&(ctx->job), 0);
+ // Initialize the pointer to the global tonemask
+ ctx->mask = mac_config_ctx->tonemask_info.tonemask;
+
+ ctx->pbproc_need_scf = false;
+ rxce_trace_init (ctx);
+#ifdef RXCE_WITH_SAR
+ dbg_assert (sar);
+ sar_init_measure_context (sar, ctx);
+ sar_init_measurement_cb (sar, rxce_mpdu_measurement_add);
+#endif
+ RXCE_TRACE (INIT, mac_ntb());
+ return (ctx);
+}
+
+void
+pbproc_need_scf_cb (uint tei, uint reason_code)
+{
+ dbg_assert (&ce_global);
+ rxce_t *ctx = &ce_global;
+ dbg_assert (&(ctx->job));
+ dbg_assert (MAC_TEI_IS_STA(tei));
+ dbg_assert ( (reason_code>=0x04 && reason_code<=0x1F)
+ || (reason_code>=0xFC && reason_code<=0xFF) );
+ //dbg_assert (!ctx->pbproc_need_scf); // rxce_process didn't respond to a previous request of pbproc.
+ ctx->sound_param.stei = tei;
+ ctx->sound_param.reason_code = reason_code;
+ ctx->pbproc_need_scf = true;
+ cyg_semaphore_post (&(ctx->job));
+}
+
+bool
+rxce_mpdu_measurement_add (void *user, pbproc_rx_params_t *rx_params,
+ uint pb_nb, blk_t **f, blk_t **l, pb_t *noise, uint n, uint *blk_offset)
+{
+ dbg_assert (user);
+ rxce_t *ctx = (rxce_t *) user;
+ RXCE_TRACE (SAR_MEASUREMENT_CB, mac_ntb());
+ dbg_assert (rx_params);
+ bool b;
+ pb_measure_blk_t **first = (pb_measure_blk_t **) f;
+ pb_measure_blk_t **last = (pb_measure_blk_t **) l;
+ // Allocate block if necessary. The SAR will fill blocks after !couldn't be stopped by RXCE!.
+ b = mpdu_measure_store_append (ctx->mpdu_measure_store_ctx, rx_params, pb_nb, first, last, (phy_chandata_t *) noise, n, blk_offset);
+ // Give 'job' to RXCE that will process the previous frame.
+ if (b) cyg_semaphore_post (&(ctx->job));
+ else RXCE_TRACE (MEASURE_DROPPED, mac_ntb());
+ return (b);
+}
+
+/** todo Cf SPEC HPAV HPAV-FrameControl -- SoundVariantField -- SoundReasonCode */
+bool
+rxce_scf_compute (rxce_t *ctx)
+{
+ dbg_assert (ctx);
+ bool ret = false;
+ sta_t *sta;
+ tonemaps_t *tms;
+ uint src = ctx->sound_param.reason_code;
+ if (src >= 0x04 && src <= 0x1F) //Interval with an invalid tonemap.
+ {
+ sta = mac_store_sta_get(ctx->mac_store_ctx, ctx->sound_param.stei);
+ rxce_job_cei_add (ctx, ctx->sound_param.stei, sta->rx_tonemaps, src - 4, TONEMAP_INDEX_NULL);
+ ret = true;
+ blk_release (sta);
+ }
+ if (src == 0xFC )
+ {
+ //TODO SEND ALL VALID TM
+ ret = true;
+ }
+ if (src == 0xFD )
+ {
+ sta = mac_store_sta_get(ctx->mac_store_ctx, ctx->sound_param.stei);
+ tms = sta->rx_tonemaps;
+ if (tms->default_tmi != TONEMAP_INDEX_INITIAL_START)
+ {
+ ret = true;
+ }
+ else
+ {
+ ret = false;
+ }
+ blk_release (sta);
+ }
+ if (src == 0xFE)
+ {
+ ret = false;
+ // IF INTERVAL CONCERNED HAS TM ret = true;and cei_param_add
+ // ELSE ret = false;
+ // todo - it will be necessary to know the date.
+ }
+ if (src == 0xFF)
+ {
+ ret = false;
+ }
+ return (ret);
+}
+
+void
+rxce_next_measurement_compute (rxce_t *ctx)
+{
+ dbg_assert (ctx);
+ mpdu_measure_t *measure = mpdu_measure_store_get (ctx->mpdu_measure_store_ctx);
+ dbg_assert (measure);
+ bitloading_modification_t bl = bitloading_run (ctx->mac_store_ctx, measure);
+#ifdef RXCE_MONITORING
+ uint toto = 9 + sizeof (pbproc_rx_params_t);
+ write (ctx->pipe_out_fd, &toto, sizeof(toto));
+ write (ctx->pipe_out_fd, "RX_PARAMS", 9);
+ write (ctx->pipe_out_fd, measure->rx_params, sizeof(pbproc_rx_params_t));
+ uint pb_nb = measure->pb_head->pb_nb;
+ if (measure->pb_head->next) pb_nb += measure->pb_head->next->pb_nb;
+ toto = 9 + 1 + pb_nb*4;
+ //printf ("toto = %d\n", toto);
+ write (ctx->pipe_out_fd, &toto, sizeof(toto));
+ write (ctx->pipe_out_fd, "PBMEASURE", 9);
+ write (ctx->pipe_out_fd, &pb_nb, 1);
+ write (ctx->pipe_out_fd, measure->pb_head->data, measure->pb_head->pb_nb * 4);
+ if (measure->pb_head->next)
+ {
+ write (ctx->pipe_out_fd, measure->pb_head->next->data, measure->pb_head->next->pb_nb * 4);
+ }
+
+ //printf ("pb_nb = %d\n", pb_nb);
+ //write (ctx->pipe_out_fd, measure->pb_head->data, 512);
+
+#endif
+ mpdu_measure_store_release (ctx->mpdu_measure_store_ctx, measure);
+ if (bl.changed_tonemaps ) rxce_job_cei_add (ctx, bl.stei, bl.changed_tonemaps, bl.new_tmi, bl.old_tmi);
+}
+
+
+cyg_tick_count_t
+rxce_tonemaps_refresh_management(rxce_t *ctx)
+{
+ dbg_assert (ctx);
+ uint tei;
+ cyg_tick_count_t lowest_expiration_date = 0xFFFFFFFFFFFFFFFFll;
+ for (tei=MAC_TEI_STA_MIN; tei<=MAC_TEI_STA_MAX; tei++)
+ {
+ uint date = cyg_current_time();
+ sta_t *lsta = mac_store_sta_get (ctx->mac_store_ctx, tei);
+ if (lsta)
+ {
+ if (lsta->rx_tonemaps)
+ {
+ cyg_tick_count_t expiration_date = lsta->rx_tonemaps->expiration_rtc_date;
+ if ( date >= expiration_date )
+ {
+ rxce_job_cei_add (ctx, lsta->tei, lsta->rx_tonemaps, TONEMAP_INDEX_NULL, TONEMAP_INDEX_NULL);
+ }
+ if (lowest_expiration_date > expiration_date)
+ {
+ lowest_expiration_date = expiration_date;
+ }
+ }
+ blk_release (lsta);
+ }
+ }
+ return (lowest_expiration_date);
+}
+
+void
+rxce_job_cei_add (rxce_t *ctx, uint dtei, tonemaps_t *tonemaps, uint new_tmi, uint old_tmi)
+{
+ dbg_assert (ctx);
+ bool b;
+ cei_param_t cei_param;
+ cei_param.tms = tonemaps;
+ cei_param.new_tmi = new_tmi;
+ cei_param.old_tmi = old_tmi;
+ cei_param.priority = CEI_PRIORITY;
+ cei_param.dtei = dtei;
+ b = cei_param_add (&cei_param);
+ if (b) cyg_semaphore_post (&(ctx->job));
+ tonemaps->expiration_rtc_date = cyg_current_time() + S_TO_RTC (RXCE_TONEMAPS_REFRESH_PERIOD_S);
+}
+
+void
+rxce_process (cyg_addrword_t data)
+{
+ dbg_assert (data);
+#ifdef EXPIRATION_TEST
+ cyg_tick_count_t watchdog = 0;
+#else
+ cyg_tick_count_t watchdog = 0xFFFFFFFFFFFFFFFFlu;
+#endif
+ mme_t *mme;
+ rxce_t *ctx = (rxce_t *) data;
+ while (true)
+ {
+ RXCE_TRACE (PROCESS_WAIT, mac_ntb());
+ cyg_semaphore_timed_wait (&(ctx->job), watchdog);
+ RXCE_TRACE (PROCESS_TRIGGERED, mac_ntb());
+ if (ctx->pbproc_need_scf) // At first, verify if pbproc waits information about scf.
+ {
+ // todo : Not sure that this part of code will not be interrupted
+ // by pbproc_need_scf_cb and so, the answer could not correspond to
+ // the last situation {src,tei} given by pbproc.
+ RXCE_TRACE (SCF_PROCESS, mac_ntb());
+ bool b = rxce_scf_compute (ctx);
+ if (b)
+ {
+ pbproc_scf (); // a pbproc function.
+ }
+ //TODO ATOMIC
+ ctx->pbproc_need_scf = false;
+ }
+ else
+ {
+ if (cei_param_fifo.number > 0 ) // Then Create CEI if waited.
+ {
+ RXCE_TRACE (CEI_PROCESS, mac_ntb());
+ mme = interf_mme_get ();
+ dbg_assert (mme);
+ cei_param_t *param = cei_param_get ();
+ dbg_assert (param);
+#ifdef EXPIRATION_TEST
+ expiration_test (param->dtei);
+#endif
+ cei_created_status_t cei_status = cei_create (mme->mm_entry, ctx->mask, param->tms, param->new_tmi, param->old_tmi);
+ mme->length = cei_status.length;
+ mme->dtei = param->dtei;
+ mme->mm_type = cei_status.mm_type;
+ interf_mme_send (mme);
+#ifdef MAXIMUS_TEST
+ sta_t *sta = mac_store_sta_get (ctx->mac_store_ctx, param->dtei);
+ cei_decode (sta->tx_tonemaps, cei_status.mm_type, mme->mm_entry, ctx->mask);
+#endif
+ }
+ else
+ {
+ if (ctx->mpdu_measure_store_ctx->measure_nb) //Then Compute measurement
+ {
+ RXCE_TRACE (BITLOADING_PROCESS, mac_ntb());
+ rxce_next_measurement_compute (ctx);
+ }
+ }
+ }
+ if (cyg_current_time() > watchdog)
+ {
+ RXCE_TRACE (REFRESH_PROCESS, mac_ntb());
+ watchdog = rxce_tonemaps_refresh_management(ctx);
+ }
+ }
+}
+
diff --git a/cesar/ce/src/rxce_stats.c b/cesar/ce/src/rxce_stats.c
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/cesar/ce/src/rxce_stats.c
diff --git a/cesar/ce/src/trace.c b/cesar/ce/src/trace.c
new file mode 100644
index 0000000000..c4fd6a177e
--- /dev/null
+++ b/cesar/ce/src/trace.c
@@ -0,0 +1,52 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ce/src/trace.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "ce/inc/rx.h"
+#include "ce/inc/trace.h"
+
+void
+rxce_trace_init (rxce_t *ctx)
+{
+ static trace_namespace_t namespace;
+ static const trace_event_id_t event_ids[] =
+ {
+ TRACE_EVENT (RXCE_TRACE_INIT, "RXCE_INIT", TIMESTAMP),
+ TRACE_EVENT (RXCE_TRACE_SAR_MEASUREMENT_CB,"RXCE_SAR_MEASUREMENT_CB",TIMESTAMP),
+ TRACE_EVENT (RXCE_TRACE_MEASURE_DROPPED, "RXCE_MEASURE_DROPPED",TIMESTAMP),
+ TRACE_EVENT (RXCE_TRACE_PROCESS_WAIT, "RXCE_PROCESS_WAIT",TIMESTAMP),
+ TRACE_EVENT (RXCE_TRACE_PROCESS_TRIGGERED, "RXCE_PROCESS_TRIGGERED",TIMESTAMP),
+ TRACE_EVENT (RXCE_TRACE_SCF_PROCESS, "RXCE_SCF_COMPUTE",TIMESTAMP),
+ TRACE_EVENT (RXCE_TRACE_CEI_PROCESS, "RXCE_CEI_PROCESS",TIMESTAMP),
+ TRACE_EVENT (RXCE_TRACE_BITLOADING_PROCESS, "RXCE_BITLOADING_PROCESS",TIMESTAMP),
+ TRACE_EVENT (RXCE_TRACE_REFRESH_PROCESS, "RXCE_REFRESH_PROCESS",TIMESTAMP),
+ };
+ dbg_assert (ctx);
+ trace_namespace_init (&namespace, event_ids, COUNT (event_ids));
+ trace_buffer_add (&ctx->trace, "ce", 8, 4, true, &namespace);
+}
+
+void
+rxce_trace_uninit (rxce_t *ctx)
+{
+ dbg_assert (ctx);
+ trace_buffer_remove(&ctx->trace);
+}
+
+void
+rxce_trace_print (rxce_t *ctx)
+{
+ dbg_assert(ctx);
+ trace_buffer_dbg_dump(&ctx->trace);
+}
diff --git a/cesar/ce/src/tx.c b/cesar/ce/src/tx.c
new file mode 100755
index 0000000000..d6426fce6f
--- /dev/null
+++ b/cesar/ce/src/tx.c
@@ -0,0 +1,106 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file tx.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include <stdio.h>
+#include "ce/inc/tx.h"
+#define TXCE
+#include "ce/inc/cei.h"
+
+static txce_t txce_global;
+
+txce_t *
+txce_init (mac_store_t *mac_store_ctx, mac_config_t *mac_config_ctx, interf_t *interf_ctx)
+{
+ dbg_assert (mac_store_ctx);
+ dbg_assert (mac_config_ctx);
+#if defined (ECOS) && ECOS
+ dbg_assert (interf_ctx);
+#endif
+ txce_t *ctx = &txce_global;
+ ctx->mac_store_ctx = mac_store_ctx;
+ ctx->tonemask = mac_config_ctx->tonemask_info.tonemask;
+ ctx->interf_ctx = interf_ctx;
+ cyg_handle_t sys_clk = cyg_real_time_clock();
+ cyg_handle_t counter_hdl;
+ cyg_clock_to_counter (sys_clk, &counter_hdl);
+ cyg_alarm_create (counter_hdl, alarm_cb, (cyg_addrword_t) ctx, &ctx->alarm_hdl, &ctx->alarm_obj);
+ return (ctx);
+}
+
+cyg_tick_count_t
+txce_expiration_tonemaps_management (txce_t *ctx)
+{
+ dbg_assert (ctx);
+ uint tei;
+ cyg_tick_count_t lowest_expiration_date = 0xFFFFFFFFFFFFFFFFll;
+ for (tei=MAC_TEI_STA_MIN; tei<=MAC_TEI_STA_MAX; tei++)
+ {
+ cyg_tick_count_t current_rtc_date = cyg_current_time();
+ sta_t *lsta = mac_store_sta_get (ctx->mac_store_ctx, tei);
+ if (lsta)
+ {
+ tonemaps_t *tms = lsta->tx_tonemaps;
+ if (tms)
+ {
+ cyg_tick_count_t expiration_date = tms->expiration_rtc_date;
+ if (current_rtc_date >= expiration_date )
+ {
+ int tmi;
+ for (tmi = 0; tmi<TONEMAP_INDEX_NB; tmi++)
+ {
+ if (tms->tm[tmi]) tonemap_release (tms, tmi);
+ //tms->intervals = NULL;
+ tms->expiration_rtc_date = 0xFFFFFFFFFFFFFFFFll;
+ }
+ }
+ else
+ {
+ if (lowest_expiration_date > expiration_date)
+ {
+ lowest_expiration_date = expiration_date;
+ }
+ }
+ }
+ blk_release (lsta);
+ }
+ }
+ return lowest_expiration_date;
+}
+
+void
+txce (txce_t *ctx, uint stei, u32 mmtype, u8 *mm_entry)
+{
+ dbg_assert (ctx);
+ if (mm_entry)
+ {
+ dbg_assert (mmtype == CM_CHAN_EST_IND || mmtype == CM_TM_UPDATE_IND);
+ dbg_assert (stei>=MAC_TEI_STA_MIN && stei<=MAC_TEI_STA_MAX);
+ // Get concerned tonemaps from stei.
+ sta_t *source_sta = mac_store_sta_get (ctx->mac_store_ctx, stei);
+ tonemaps_t *source_tms = source_sta->tx_tonemaps;
+ cei_decode (source_tms, mmtype, mm_entry, ctx->tonemask);
+ blk_release (source_sta);
+ }
+ cyg_tick_count_t next_expiration = txce_expiration_tonemaps_management (ctx);
+ cyg_alarm_initialize (ctx->alarm_hdl, next_expiration, 0);
+}
+
+void
+alarm_cb (cyg_handle_t alarm_hdl, cyg_addrword_t data)
+{
+ dbg_assert (data);
+ txce_t *ctx = (txce_t *) data;
+ interf_event_add (ctx->interf_ctx, TXCE_EVENT);
+}
diff --git a/cesar/ce/test/common/Module b/cesar/ce/test/common/Module
new file mode 100755
index 0000000000..ad8c4aa85e
--- /dev/null
+++ b/cesar/ce/test/common/Module
@@ -0,0 +1 @@
+SOURCES := print_utils.c gaussian.c
diff --git a/cesar/ce/test/common/ecos_overide/cyg/kernel/Module b/cesar/ce/test/common/ecos_overide/cyg/kernel/Module
new file mode 100644
index 0000000000..86ae567be7
--- /dev/null
+++ b/cesar/ce/test/common/ecos_overide/cyg/kernel/Module
@@ -0,0 +1 @@
+SOURCES := kapi.c
diff --git a/cesar/ce/test/common/ecos_overide/cyg/kernel/kapi.h b/cesar/ce/test/common/ecos_overide/cyg/kernel/kapi.h
new file mode 100644
index 0000000000..07bfa4e3ec
--- /dev/null
+++ b/cesar/ce/test/common/ecos_overide/cyg/kernel/kapi.h
@@ -0,0 +1,45 @@
+#ifndef kapi_h
+#define kapi_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file kapi.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#define CYGNUM_HAL_RTC_DENOMINATOR 100
+
+typedef u64 cyg_tick_count_t;
+typedef u64 cyg_handle_t;
+typedef u64 cyg_alarm;
+typedef void* cyg_addrword_t;
+typedef void (cyg_alarm_t) (cyg_handle_t hdl, cyg_addrword_t data);
+
+cyg_tick_count_t
+cyg_current_time (void);
+
+cyg_handle_t
+cyg_real_time_clock (void);
+
+void
+cyg_clock_to_counter (cyg_handle_t clock_hdl, cyg_handle_t *counter_hdl);
+
+void
+cyg_alarm_create (cyg_handle_t counter_hld, cyg_alarm_t alarm_cb, cyg_addrword_t data, cyg_handle_t *alarm_hdl, cyg_alarm *alarm);
+
+void
+cyg_thread_delay (uint p);
+
+void
+cyg_alarm_initialize (cyg_handle_t alarm, cyg_tick_count_t trigger, cyg_tick_count_t interval);
+
+
+#endif /* kapi_h */
diff --git a/cesar/ce/test/common/ecos_overide/cyg/kernel/src/kapi.c b/cesar/ce/test/common/ecos_overide/cyg/kernel/src/kapi.c
new file mode 100644
index 0000000000..1f9a9d71ec
--- /dev/null
+++ b/cesar/ce/test/common/ecos_overide/cyg/kernel/src/kapi.c
@@ -0,0 +1,62 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/kapi.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "sys/time.h"
+#include "stdio.h"
+#include "string.h"
+#include "cyg/kernel/kapi.h"
+
+#define PERIOD_RTC_US (1000000/CYGNUM_HAL_RTC_DENOMINATOR)
+
+cyg_tick_count_t
+cyg_current_time (void)
+{
+ u64 ret;
+ struct timeval tv0;
+ gettimeofday (&tv0, NULL);
+ u64 date_us = (tv0.tv_sec*1000000 + tv0.tv_usec);
+ ret = date_us / PERIOD_RTC_US;
+ return ( ret);
+}
+
+cyg_handle_t
+cyg_real_time_clock (void)
+{
+ return (cyg_handle_t )NULL;
+}
+
+void
+cyg_clock_to_counter (cyg_handle_t clock_hdl, cyg_handle_t *counter_hdl)
+{
+ return;
+}
+
+void
+cyg_alarm_create (cyg_handle_t counter_hld, cyg_alarm_t alarm_cb, cyg_addrword_t data, cyg_handle_t *alarm_hdl, cyg_alarm *alarm)
+{
+ return;
+}
+
+void
+cyg_thread_delay (uint p)
+{
+ return;
+}
+
+void
+cyg_alarm_initialize (cyg_handle_t alarm, cyg_tick_count_t trigger, cyg_tick_count_t interval)
+{
+ return;
+}
diff --git a/cesar/ce/test/common/gaussian.h b/cesar/ce/test/common/gaussian.h
new file mode 100644
index 0000000000..454c5417d5
--- /dev/null
+++ b/cesar/ce/test/common/gaussian.h
@@ -0,0 +1,23 @@
+#ifndef ce_test_common_gaussian_h
+#define ce_test_common_gaussian_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ce/test/common/gaussian.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#include "lib/rnd.h"
+
+double
+lib_rnd_gaussian (lib_rnd_t *ctx, double lambda, double sigma);
+
+#endif /* ce_test_common_gaussian_h */
diff --git a/cesar/ce/test/common/print_utils.h b/cesar/ce/test/common/print_utils.h
new file mode 100755
index 0000000000..1f0fe63bb0
--- /dev/null
+++ b/cesar/ce/test/common/print_utils.h
@@ -0,0 +1,60 @@
+#ifndef ce_test_common_print_utils_h
+#define ce_test_common_print_utils_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ce/test/common/print_utils.h
+ * \brief print function header for test
+ * \ingroup ce_test
+ */
+#include "mac/common/tonemap.h"
+#include "hal/phy/pbdma.h"
+#include "ce/inc/mpdu_measure_store.h"
+
+#ifdef CE_DBG
+BEGIN_DECLS
+
+void
+ce_print (const char *msg, ...);
+
+void
+ce_print_byte (u8 c);
+
+void
+ce_print_nibble (u32 c);
+
+void
+ce_print_buffer (u8 *buf, int length);
+
+void
+ce_print_tonemap (tonemap_t *tm);
+
+void
+ce_print_tonemaps (tonemaps_t *tms);
+
+void
+ce_print_chandata (phy_chandata_t *chandata);
+
+void
+ce_print_frame_measurement (frame_measurement_t *fm);
+
+END_DECLS
+
+
+#else
+#define ce_print(expr,r...) ((void) 0)
+#define ce_print_byte(expr) ((void)0)
+#define ce_print_nibble(expr) ((void)0)
+#define ce_print_buffer(expr,r) ((void)0)
+#define ce_print_tonemap(expr) ((void)0)
+#define ce_print_tonemaps(expr) ((void)0)
+#define ce_print_chandata(expr) ((void)0)
+#define ce_print_frame_measurement(expr) ((void)0)
+#endif
+
+#endif /* ce_test_common_print_utils_h */
diff --git a/cesar/ce/test/common/src/gaussian.c b/cesar/ce/test/common/src/gaussian.c
new file mode 100644
index 0000000000..4d2ca63e93
--- /dev/null
+++ b/cesar/ce/test/common/src/gaussian.c
@@ -0,0 +1,29 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ce/test/common/src/gaussian.c
+ * \brief generate double float number with a normal repartition (gaussian).
+ * \ingroup ce/test/common
+ *
+ */
+#include "common/std.h"
+#include <math.h>
+#include "ce/test/common/gaussian.h"
+
+double
+lib_rnd_gaussian (lib_rnd_t *ctx, double lambda, double sigma)
+{
+ double a_rnd = 0;
+ while (a_rnd == 0) a_rnd=lib_rnd_uniform (ctx,100000);
+ a_rnd = a_rnd / 100000.0;
+ double b_rnd = lib_rnd_uniform (ctx,100000)/100000.0;
+ double lna = log (a_rnd);
+ double gauss_rnd = sqrt (-2*lna)* cos (2*3.14*b_rnd);
+ return (lambda + sigma *gauss_rnd);
+}
+
diff --git a/cesar/ce/test/common/src/print_utils.c b/cesar/ce/test/common/src/print_utils.c
new file mode 100755
index 0000000000..8fdba1ecb6
--- /dev/null
+++ b/cesar/ce/test/common/src/print_utils.c
@@ -0,0 +1,145 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ce/test/common/src/print_utils.c
+ * \brief provides print function for test
+ * \ingroup ce_test
+ */
+
+#include "common/std.h"
+#include "ce/test/common/print_utils.h"
+#include <stdio.h>
+
+#ifdef CE_DBG
+void
+ce_print (const char *msg, ...)
+{
+ va_list ap;
+ va_start (ap, msg);
+ vfprintf (stderr, msg, ap);
+ va_end (ap);
+}
+
+void
+ce_print_byte (u8 c)
+{
+ ce_print("%1x%1x",(c>>4),(c&0xF));
+}
+
+void
+ce_print_nibble (u32 w)
+{
+ int i;
+ for (i=0; i<8; i++)
+ {
+ ce_print("%1x", w&0xF);
+ w = w>>4;
+ }
+}
+
+void
+ce_print_buffer (u8 *buf, int length)
+{
+ int i, l32 = (length+3)/4;
+ if (buf)
+ {
+ u32 *browser = (u32 *) buf;
+ ce_print (" BUFFER :\n");
+
+ for (i=0; i<l32; i++)
+ {
+ if ((i%8)==0) ce_print("\n%d\t|", i);
+ //ce_print_byte (*(buf+i));
+ ce_print ("%8x|", *(browser++));
+ }
+ ce_print("\n\n");
+ }
+ else ce_print (" BUFFER NULL !\n");
+}
+
+void
+ce_print_tonemap (tonemap_t *tm)
+{
+ uint i;
+ if(tm)
+ {
+ ce_print("strict:%d ",tm->strict);
+ ce_print("cpf:%d ",tm->cpf);
+ ce_print("fecratio : %d ",tm->fecrate);
+ ce_print("guard : %d ",tm->gil);
+ ce_print("ble = %d \n",tm->ble);
+ u32 *tm_data = (u32 *) tm->tmdma_desc_head->data;
+ for (i=0; i<(PHY_CARRIER_NB+7)/8; i++)
+ {
+ if (i == 128 ) tm_data = (u32 *) tm->tmdma_desc_head->next->data;
+ ce_print_nibble (*(tm_data++));
+ if((i+1)%16==0) ce_print("\n");
+ }
+ ce_print ("\n");
+ }
+}
+
+void
+ce_print_tonemaps (tonemaps_t *tms)
+{
+ int i;
+
+ ce_print ("MAX_FL_AV = %x ",tms->max_fl_av);
+ ce_print ("RIFS %x:%x:%x ",tms->rifs_av_one_sym_tck, tms->rifs_av_two_sym_tck, tms->rifs_av_g2_sym_tck);
+ ce_print ("MAX_TM = %x ",tms->max_tm);
+ ce_print ("Default_tmi = %x ",tms->default_tmi);
+ ce_print ("scl_cp = %x ",tms->scl_cp);
+ ce_print ("scl_cfp = %x ",tms->scl_cfp);
+ ce_print ("expir = %x ",tms->expiration_rtc_date);
+ ce_print ("valid tm nb = %d \n",tonemap_valid_nb (tms));
+
+ for (i=0; i<TONEMAP_INDEX_NB; i++)
+ {
+ if (tms->tm[i])
+ {
+ ce_print("indice %d (%d) ",i,i+4);
+ ce_print_tonemap(tms->tm[i]);
+ }
+ }
+
+ tonemap_intervals_t *intervals = tms->intervals;
+ ce_print ("intervals nb = %d ",intervals->intervals_nb);
+ for (i=0; i<(int)intervals->intervals_nb; i++)
+ {
+ ce_print ("interval[%d]={%.0f,%d} ", i,intervals->interval[i].end_offset_atu*10.24,
+ intervals->interval[i].tmi);
+ }
+ ce_print ("\n");
+}
+
+void
+ce_print_chandata (phy_chandata_t *f)
+{
+ uint i;
+ for(i=0; i<PHY_CHANDATA_BLK_NB; i++)
+ //while (f)
+ {
+ ce_print("{size:%d, last:%d, type:%d, @0x%x}",f->size, f->last, f->type, f->address);
+ if( (i+1) < PHY_CHANDATA_BLK_NB) ce_print ("->\n");
+ f = (phy_chandata_t *) f->blk.next;
+ }
+ ce_print ("\n");
+}
+
+void
+ce_print_frame_measurement (frame_measurement_t *fm)
+{
+ int j;
+ ce_print ("rx_params @ 0x%x -> 0x%x\n", &fm->rx_params, fm->rx_params);
+ ce_print ("ber_stock @ 0x%x -> 0x%x\n", &fm->ber_measurement, fm->ber_measurement);
+ for (j=0; j<PHY_CHANDATA_TYPE_NB; j++)
+ {
+ ce_print ("noise[%d] is @ 0x%x -> 0x%x\n", j, &fm->type_head[j], fm->type_head[j]);
+ }
+}
+#endif
diff --git a/cesar/ce/test/common/tonemap_utils.h b/cesar/ce/test/common/tonemap_utils.h
new file mode 100644
index 0000000000..7d214c6e5a
--- /dev/null
+++ b/cesar/ce/test/common/tonemap_utils.h
@@ -0,0 +1,135 @@
+#ifndef ___common_tonemap_utils_h
+#define ___common_tonemap_utils_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ../common/tonemap_utils.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "mac/common/tonemap.h"
+#include "lib/test.h"
+#include "lib/rnd.h"
+#include "lib/bitstream.h"
+
+lib_rnd_t rnd;
+
+#ifndef MAXIMUS_TEST
+static void
+create_tm (tonemaps_t *tms, u8 *mask, uint tmi, uint max_rnd, uint offset)
+{
+ int i;
+ bitstream_t stream;
+ tms->default_tmi = 0;
+ tms->tm[tmi] = tonemap_alloc ();
+ tms->tm[tmi]->cpf = 1;
+ tms->tm[tmi]->fecrate = 2;
+ tms->tm[tmi]->gil = 3;
+ bitstream_init (&stream, tms->tm[tmi]->tmdma_desc_head->data, 512, BITSTREAM_WRITE);
+ for (i=0; i<PHY_CARRIER_NB+1; i++)
+ {
+ int n = i/8;
+ int r = i%8;
+ int pos = 1<<r;
+ uint to_write;
+ if (i==1024)
+ {
+ bitstream_finalise (&stream);
+ bitstream_init (&stream, tms->tm[tmi]->tmdma_desc_head->next->data, 512, BITSTREAM_WRITE);
+ }
+ if ( (mask[n] & pos) == 0)
+ {
+ to_write = 0; bitstream_access (&stream, &to_write, 4);
+ }
+ else
+ {
+ if (max_rnd != 0 )
+ {
+ to_write = offset+lib_rnd_uniform(&rnd,max_rnd); bitstream_access (&stream, &to_write, 4);
+ }
+ else
+ {
+ to_write = (i&0x07); bitstream_access (&stream, &to_write, 4);
+ }
+ }
+ bitstream_finalise (&stream);
+ }
+}
+#endif
+
+/**
+ * Compare two tonemaps in the test environment
+ * \param t test
+ * \param tms1 tonemaps 1
+ * \param tms2 tonemaps 2
+ *
+ * Check all tonemap (TONEMAP_INDEX_NB)
+ */
+static void
+compare_tonemaps (test_t t, tonemaps_t *tms1, tonemaps_t *tms2, u8 *mask)
+{
+ test_begin (t, "tonemap compare")
+ {
+ int i,j;
+ test_fail_if (tms1->max_fl_av != tms2->max_fl_av);
+ test_fail_if (tms1->rifs_av_one_sym_tck != tms2->rifs_av_one_sym_tck);
+ test_fail_if (tms1->rifs_av_two_sym_tck != tms2->rifs_av_two_sym_tck);
+ test_fail_if (tms1->rifs_av_g2_sym_tck != tms2->rifs_av_g2_sym_tck);
+ test_fail_if (tms1->max_tm != tms2->max_tm);
+ test_fail_if (tms1->default_tmi != tms2->default_tmi);
+ test_fail_if (tms1->scl_cp != tms2->scl_cp);
+ test_fail_if (tms1->scl_cfp != tms2->scl_cfp);
+
+ for (i=0; i<TONEMAP_INDEX_NB; i++)
+ {
+ if(tms1->tm[i] && tms2->tm[i])
+ {
+ //my_print ("test tm[%d]\n",i);
+ tonemap_t *tm1=tms1->tm[i];
+ tonemap_t *tm2=tms2->tm[i];
+ bitstream_t stream1;
+ bitstream_t stream2;
+ bitstream_init (&stream1, tm1->tmdma_desc_head->data, BLK_SIZE, BITSTREAM_READ);
+ bitstream_init (&stream2, tm2->tmdma_desc_head->data, BLK_SIZE, BITSTREAM_READ);
+ test_fail_if (tm1->cpf != tm2->cpf);
+ test_fail_if (tm1->fecrate != tm2->fecrate);
+ test_fail_if (tm1->gil != tm2->gil);
+ for(j=0; j<PHY_CARRIER_NB; j++)
+ {
+
+ if (j==1024)
+ {
+ bitstream_init (&stream1, tm1->tmdma_desc_head->next->data, BLK_SIZE, BITSTREAM_READ);
+ bitstream_init (&stream2, tm2->tmdma_desc_head->next->data, BLK_SIZE, BITSTREAM_READ);
+ }
+
+ u8 d1,d2;
+ bitstream_access (&stream1, &d1, 4);
+ bitstream_access (&stream2, &d2, 4);
+ //ce_print ("c%d : m1-%d m2-%d\n",j, d1, d2);
+ test_fail_if ( d1 != d2 && ((mask[j/8] & (1<<(j%8))) != 0) );
+ }
+ tonemap_intervals_t *intervals1 = tms1->intervals;
+ tonemap_intervals_t *intervals2 = tms2->intervals;
+ test_fail_if (intervals1->intervals_nb != intervals2->intervals_nb);
+ for (j=0; j<(int)intervals1->intervals_nb; j++)
+ {
+ tonemap_interval_t tmi1=intervals1->interval[j];
+ tonemap_interval_t tmi2=intervals2->interval[j];
+ test_fail_if ( tmi1.end_offset_atu != tmi2.end_offset_atu );
+ test_fail_if ( tmi1.tmi != tmi2.tmi );
+ }
+ }
+ else test_fail_if (tms1->tm[i] != tms2->tm[i]);
+ }
+ } test_end;
+}
+
+#endif /* ___common_tonemap_utils_h */
diff --git a/cesar/ce/test/cov/cov_all_run.sh b/cesar/ce/test/cov/cov_all_run.sh
new file mode 100755
index 0000000000..f405ec2a79
--- /dev/null
+++ b/cesar/ce/test/cov/cov_all_run.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+clean=
+firefox=0
+MAXIMUS_ARG=
+run=
+
+while getopts cfm:et: opt
+do
+ case "$opt" in
+ c) clean="-c";;
+ e) run="-e";;
+ f) firefox=1;;
+ m) MAXIMUS_ARG="-x $OPTARG";;
+ t) test_path="$OPTARG";;
+ [?]) print >&2 "Usage: $0 [-c] [-e] [-f] [-m maximus_path] [-t test_path] "
+ exit 1;;
+ esac
+done
+
+cov_path=`dirname $0`
+if [ "$run" != "" ]
+then
+ echo "Erase coverage result"
+ rm -rf $cov_path/result
+ mkdir $cov_path/result
+fi
+
+$cov_path/cov_one_run.sh -t $test_path -s tx -m host-Makefile -o obj/host $clean $run -h host
+$cov_path/cov_one_run.sh -t $test_path -s tx -m target-Makefile -o obj/target $clean $run -h target
+$cov_path/cov_one_run.sh -t $test_path -s rx/general -m host-Makefile -o obj/host $clean $run -h host
+$cov_path/cov_one_run.sh -t $test_path -s rx/general -m target-Makefile -o obj/target $clean $run -h target
+$cov_path/cov_one_run.sh -t $test_path -s rx/tonemap_refresh -m Makefile -o obj $clean $run -h target
+$cov_path/cov_one_run.sh -t $test_path -s rx/maximus -m Makefile -o obj $clean $run -p send_noise.py $MAXIMUS_ARG -h target
+
+if [ "$firefox" = "1" ]
+then
+ ls -l $cov_path/result
+ genhtml -q -o $cov_path/result -s $cov_path/result/*.info
+ firefox $cov_path/result/index.html
+fi
+
diff --git a/cesar/ce/test/cov/cov_one_run.sh b/cesar/ce/test/cov/cov_one_run.sh
new file mode 100755
index 0000000000..ecb2530e4e
--- /dev/null
+++ b/cesar/ce/test/cov/cov_one_run.sh
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+py=
+maximus_path=
+clean=
+run=
+cross=target
+
+echo "$0 $@"
+while getopts t:s:m:o:cep:x:h: opt
+do
+ case "$opt" in
+ t) TEST_PATH="$OPTARG";;
+ s) SUBTEST_PATH="$OPTARG";;
+ m) MAKEFILE_NAME="$OPTARG";;
+ o) OBJ_PATH="$OPTARG";;
+ c) clean=1;;
+ p) py="$OPTARG";;
+ x) maximus_path="$OPTARG";;
+ e) run=1;;
+ h) cross="$OPTARG";;
+ [?]) print >&2 "Usage: $0 -t test_path -s subtest_path -m makefile -o objpath [-c(clean)] [-e(exec)] [-p] python_file [-x] maximus_path [-h] host/target"
+ exit 1;;
+ esac
+done
+
+SUBTEST_PATH=$TEST_PATH/$SUBTEST_PATH
+OBJ_PATH=$SUBTEST_PATH/$OBJ_PATH
+
+if [ "$clean" != "" ]
+then
+ echo "Make Clean @ $SUBTEST_PATH..."
+ rm -rf $SUBTEST_PATH/obj
+ rm -f $SUBTEST_PATH/*.da; rm -f $SUBTEST_PATH/*.bb*;rm -f $SUBTEST_PATH/*.log
+fi
+
+if [ "$run" != "" ]
+then
+ echo "Compiling $MAKEFILE_NAME in $SUBTEST_PATH ..."
+ make COV=Y -C $SUBTEST_PATH --file=$MAKEFILE_NAME --no-print-directory > $SUBTEST_PATH/$MAKEFILE_NAME.log
+ #for i in `ls $OBJ_PATH | grep "\.elf$"`
+ for i in `ls -l $OBJ_PATH | grep "^-rwxr-xr-x" | cut -d " " -f8`
+ do
+ if [ "$py" != "" ]
+ then
+ echo "Running python $SUBTEST_PATH/$py -e $OBJ_PATH/$i -d false -l 1"
+ python $SUBTEST_PATH/$py -e $OBJ_PATH/$i -d false -l 1 --maximus_path $maximus_path
+ else
+ echo "Running " $OBJ_PATH/$i;
+ ./$OBJ_PATH/$i
+ fi
+ echo "Make coverage report ..."
+ if [ "$cross" = "target" ]
+ then
+ sleep 1
+ lcov -q -d $SUBTEST_PATH -b $SUBTEST_PATH -c -o $OBJ_PATH/$i.info -g /usr/local/toolchains/gnutools/i386-elf/bin/i386-elf-gcov
+ else
+ lcov -q -d $OBJ_PATH -b $SUBTEST_PATH -c -o $OBJ_PATH/$i.info
+ fi
+ echo "Copying files .info"
+ cp $OBJ_PATH/$i.info $TEST_PATH/cov/result
+ done
+fi
diff --git a/cesar/ce/test/rx/Config b/cesar/ce/test/rx/Config
new file mode 100755
index 0000000000..f3da7ad972
--- /dev/null
+++ b/cesar/ce/test/rx/Config
@@ -0,0 +1,5 @@
+CONFIG_DEBUG_FATAL_CATCH=y
+#CONFIG_RESTRACK=y
+#CONFIG_RESTRACK_KEEP=y
+CONFIG_TRACE=y
+
diff --git a/cesar/ce/test/rx/general/Makefile b/cesar/ce/test/rx/general/Makefile
new file mode 100644
index 0000000000..b0e6e8d3fa
--- /dev/null
+++ b/cesar/ce/test/rx/general/Makefile
@@ -0,0 +1,8 @@
+all :
+ $(MAKE) -f host-Makefile --no-print-directory
+ $(MAKE) -f target-Makefile --no-print-directory
+
+clean :
+ $(MAKE) -f host-Makefile clean
+ $(MAKE) -f target-Makefile clean
+
diff --git a/cesar/ce/test/rx/general/host-Makefile b/cesar/ce/test/rx/general/host-Makefile
new file mode 100755
index 0000000000..296fad4b8d
--- /dev/null
+++ b/cesar/ce/test/rx/general/host-Makefile
@@ -0,0 +1,33 @@
+BASE = ../../../..
+
+INCLUDES=ce/test/rx
+INCLUDES+=ce/test/common
+INCLUDES+=ce/test/common/ecos_overide
+
+EXTRA_HOST_LDFLAGS=-lm
+HOST_PROGRAMS = test_cei_host_linux_i386
+test_cei_host_linux_i386_SOURCES = test_cei.c
+test_cei_host_linux_i386_MODULES = lib mac/common ce ce/test/common ce/test/common/ecos_overide/cyg/kernel
+HOST_PROGRAMS += test_cei_param_host_linux_i386
+test_cei_param_host_linux_i386_SOURCES = test_cei_param.c
+test_cei_param_host_linux_i386_MODULES = lib mac/common ce ce/test/common ce/test/common/ecos_overide/cyg/kernel
+HOST_PROGRAMS += test_measure_store_host_linux_i386
+test_measure_store_host_linux_i386_SOURCES = test_mpdu_measure_store.c
+test_measure_store_host_linux_i386_MODULES = lib mac/common ce ce/test/common ce/test/common/ecos_overide/cyg/kernel
+HOST_PROGRAMS += test_bitloading_host_linux_i386
+test_bitloading_host_linux_i386_SOURCES = test_bitloading.c
+test_bitloading_host_linux_i386_MODULES = lib mac/common ce ce/test/common ce/test/common/ecos_overide/cyg/kernel
+
+#HOST_PROGRAMS += test_speed_host_linux_i386
+#test_speed_host_linux_i386_SOURCES = test_speed.c
+#test_speed_host_linux_i386_MODULES = lib mac/common ce ce/test/common
+
+
+ce_MODULE_SOURCES = cei_param.c mpdu_measure_store.c bitloading.c
+ce_test_common_MODULE_SOURCES = print_utils.c gaussian.c
+mac_common_MODULE_SOURCES = tonemap.c tonemask.c store.c mfs.c sta.c
+
+VARIANT = host
+
+include $(BASE)/common/make/top.mk
+
diff --git a/cesar/ce/test/rx/general/overide/cp/Module b/cesar/ce/test/rx/general/overide/cp/Module
new file mode 100644
index 0000000000..3983e4ac20
--- /dev/null
+++ b/cesar/ce/test/rx/general/overide/cp/Module
@@ -0,0 +1 @@
+SOURCES := cp.c
diff --git a/cesar/ce/test/rx/general/overide/cp/cp.h b/cesar/ce/test/rx/general/overide/cp/cp.h
new file mode 100644
index 0000000000..f2094aa56f
--- /dev/null
+++ b/cesar/ce/test/rx/general/overide/cp/cp.h
@@ -0,0 +1,50 @@
+#ifndef ___rx_general_overide_cp_cp_h
+#define ___rx_general_overide_cp_cp_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ../rx/general/overide/cp/cp.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "mac/common/tonemap.h"
+#include "mac/common/store.h"
+#include "mac/common/config.h"
+#include "cyg/kernel/kapi.h"
+#include "ce/inc/tx.h"
+
+struct cp_t
+{
+ mac_store_t *mac_store_ctx;
+ mac_config_t *mac_config;
+ u8 *tonemask;
+ uint has_event;
+ u8 cei_buffer[1536];
+ bool stop_rcv_mme;
+ txce_t *txce_ctx;
+};
+typedef struct cp_t cp_t;
+
+void
+cp_process (cyg_addrword_t data);
+
+void
+cp_stop (cp_t *ctx);
+
+cp_t *
+cp_init (mac_store_t *mac_store_ctx, mac_config_t *mac_config);
+
+void
+cp_event_add (cp_t *ctx, uint type_event);
+
+void
+cp_emul_cei_reception (cp_t *ctx);
+
+#endif /* ___rx_general_overide_cp_cp_h */
diff --git a/cesar/ce/test/rx/general/overide/cp/interf/Module b/cesar/ce/test/rx/general/overide/cp/interf/Module
new file mode 100644
index 0000000000..5950fd7d38
--- /dev/null
+++ b/cesar/ce/test/rx/general/overide/cp/interf/Module
@@ -0,0 +1 @@
+SOURCES := interf.c
diff --git a/cesar/ce/test/rx/general/overide/cp/interf/interf.h b/cesar/ce/test/rx/general/overide/cp/interf/interf.h
new file mode 100755
index 0000000000..8c3545604e
--- /dev/null
+++ b/cesar/ce/test/rx/general/overide/cp/interf/interf.h
@@ -0,0 +1,65 @@
+#ifndef cp_interf_interf_h
+#define cp_interf_interf_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ./overide/cp/cp.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#include "common/defs/ethernet.h"
+#include "mac/sar/inc/sar_mf.h"
+#include "cyg/kernel/kapi.h"
+
+#define TXCE_EVENT 0
+
+u8 buf[ETH_PACKET_MAX_SIZE];
+
+typedef void (*interf_event_add_cb_t) (void *userdata, uint type_event);
+
+struct interf_t
+{
+ interf_event_add_cb_t event_add_cb;
+ void *event_add_userdata;
+};
+typedef struct interf_t interf_t;
+
+struct mme_t
+{
+ /** Destination TEI of the MME.*/
+ uint dtei;
+ /** Length of the MM_ENTRY.*/
+ uint length;
+ /** Type of the MME.*/
+ uint mm_type;
+ /** Pointer to the start of the MM_ENTRY.*/
+ u8 * mm_entry;
+};
+typedef struct mme_t mme_t;
+
+BEGIN_DECLS
+
+interf_t *
+interf_init ( interf_event_add_cb_t event_add_cb, void* userdata);
+
+mme_t *
+interf_mme_get (void);
+
+void
+interf_mme_send (mme_t *mme);
+
+void
+interf_event_add (interf_t *interf, uint type_event);
+
+
+END_DECLS
+
+#endif /* cp_interf_interf_h */
diff --git a/cesar/ce/test/rx/general/overide/cp/interf/src/interf.c b/cesar/ce/test/rx/general/overide/cp/interf/src/interf.c
new file mode 100755
index 0000000000..424b9426b3
--- /dev/null
+++ b/cesar/ce/test/rx/general/overide/cp/interf/src/interf.c
@@ -0,0 +1,52 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ./overide/cp/src/cp.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "cp/interf/interf.h"
+#include "ce/inc/tx.h"
+#include "ce/inc/cei.h"
+
+static interf_t interf_global;
+mme_t mme;
+
+interf_t *
+interf_init ( interf_event_add_cb_t event_add_cb, void* userdata)
+{
+ interf_t *interf = &interf_global;
+ interf->event_add_cb = event_add_cb;
+ interf->event_add_userdata = userdata;
+ return (interf);
+}
+
+mme_t *
+interf_mme_get (void)
+{
+ mme.mm_entry = buf;
+ return &mme;
+}
+
+void
+interf_mme_send (mme_t *mme_to_send)
+{
+ dbg_assert (mme_to_send = &mme);
+ return;
+}
+
+void
+interf_event_add (interf_t *ctx, uint type_event)
+{
+ ctx->event_add_cb (ctx->event_add_userdata, type_event);
+ return;
+}
+
diff --git a/cesar/ce/test/rx/general/overide/cp/src/cp.c b/cesar/ce/test/rx/general/overide/cp/src/cp.c
new file mode 100644
index 0000000000..c810c1d82c
--- /dev/null
+++ b/cesar/ce/test/rx/general/overide/cp/src/cp.c
@@ -0,0 +1,92 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ../rx/general/overide/cp/src/cp.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "cp/cp.h"
+#include "cp/interf/interf.h"
+#include "tonemap_utils.h"
+#include "lib/rnd.h"
+#include "ce/inc/cei_param.h"
+#define RXCE
+#include "ce/inc/cei.h"
+
+
+static cp_t cp_global;
+
+void
+cp_process (cyg_addrword_t data)
+{
+ cp_t *ctx = (cp_t *) data;
+ ctx->stop_rcv_mme = false;
+ while (true)
+ {
+ cyg_thread_delay (100);
+ if (ctx->has_event)
+ {
+ txce (ctx->txce_ctx, 0, 0, NULL);
+ ctx->has_event--;
+ }
+ if (!ctx->stop_rcv_mme) cp_emul_cei_reception (ctx);
+ }
+}
+
+void
+cp_stop (cp_t *ctx)
+{
+ ctx->stop_rcv_mme = true;
+}
+
+cp_t *
+cp_init (mac_store_t *mac_store_ctx, mac_config_t *mac_config)
+{
+ cp_t *ctx = &cp_global;
+ ctx->mac_store_ctx = mac_store_ctx;
+ ctx->mac_config = mac_config;
+ interf_t *interf = interf_init(&cp_event_add, (void *) ctx);
+ ctx->txce_ctx = txce_init (mac_store_ctx, mac_config, interf);
+ lib_rnd_init (&rnd, 123);
+ ctx->tonemask = (ctx->mac_config->tonemask_info.tonemask);
+ return ctx;
+}
+
+void
+cp_emul_cei_reception (cp_t *ctx)
+{
+ uint i;
+ uint alea_new_mme = lib_rnd_uniform (&rnd, 20);
+ if (alea_new_mme > 5)
+ {
+ return;
+ }
+ for (i=0; i<alea_new_mme; i++)
+ {
+ uint rnd_tmi = lib_rnd_uniform (&rnd, TONEMAP_INDEX_NB);
+ uint rnd_tei = lib_rnd_uniform (&rnd, MAC_TEI_STA_MAX) + MAC_TEI_STA_MIN;
+ mac_store_sta_add (ctx->mac_store_ctx, rnd_tei);
+ sta_t *lsta = mac_store_sta_get (ctx->mac_store_ctx, rnd_tei);
+ if (lsta->tx_tonemaps->tm[rnd_tmi] == NULL)
+ {
+ create_tm (lsta->tx_tonemaps, ctx->tonemask, rnd_tmi, 1, 4);
+ cei_create (ctx->cei_buffer, ctx->tonemask, lsta->tx_tonemaps, rnd_tmi, TONEMAP_INDEX_NULL);
+ txce (ctx->txce_ctx, rnd_tei, CM_CHAN_EST_IND, ctx->cei_buffer);
+ }
+ }
+}
+
+void
+cp_event_add (cp_t *ctx, uint type)
+{
+ if (type == TXCE_EVENT) ctx->has_event++;
+ return;
+}
diff --git a/cesar/ce/test/rx/general/src/test_bitloading.c b/cesar/ce/test/rx/general/src/test_bitloading.c
new file mode 100755
index 0000000000..319b06ca48
--- /dev/null
+++ b/cesar/ce/test/rx/general/src/test_bitloading.c
@@ -0,0 +1,235 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ./src/test_tx.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+
+#include "common/std.h"
+#include "lib/bitstream.h"
+#include "mac/common/tonemap.h"
+#include "ce/test/common/print_utils.h"
+#include "ce/inc/bitloading.h"
+#include "lib/rnd.h"
+#include "ce/test/common/gaussian.h"
+#include "mac/common/timings.h"
+#include "lib/test.h"
+
+lib_rnd_t rnd;
+
+void
+test_is_time_noise_stable (test_t t)
+{
+ test_begin (t, "is_time_noise_stable")
+ {
+ int i,j,k;
+ phy_chandata_t *test = (phy_chandata_t *) blk_alloc_desc ();
+ test->type = PHY_CHANDATA_TYPE_NRJ_SYMBOL;
+ test->size = 113 ;
+ double var;
+ double sigma_lambda=0.00;
+ uint stable_nb=0;
+ for (k = 1 ; k < 20; k++)
+ {
+ sigma_lambda += 0.01;
+ stable_nb = 0;
+ for (j=0; j<100; j++)
+ {
+ lib_rnd_init (&rnd, j);
+ phy_noise_energy_t *data = (phy_noise_energy_t *) test->blk.data;
+ for (i=0; i<113; i++)
+ {
+ int l = 2*UND_CODE;
+ var = lib_rnd_gaussian (&rnd, l, sigma_lambda*l);
+ if (var < 0) var = 2*l-var;
+ if (var > MAX_UND_CODE) var = 2*l -var;
+ if (var < 0) var = 0;
+ if (var > MAX_UND_CODE) var = MAX_UND_CODE;
+ *(data++) = (int) (var);
+ }
+ if (bitloading_mpdu_noise_stability (test)) stable_nb++;
+
+ }
+ test_fail_if (k < 10 && stable_nb < 80 );
+ test_fail_if (k > 10 && stable_nb > 20 );
+ test_fail_if (k == 10 && (stable_nb < 20 || stable_nb > 80) );
+ }
+ blk_release_desc ((blk_t *) test);
+ } test_end;
+}
+
+void
+test_noise2mod (test_t t)
+{
+ test_begin (t, "noise to modulation")
+ {
+ uint accu = 1 ; // DSP provides directly the average
+ uint noise_CODE;
+ uint mod;
+ uint mod_measurement;
+ //mpdu_measure_store_init ();
+ bitloading_update_threshold (accu, 1);
+ for (noise_CODE=0; noise_CODE<=UND_CODE; noise_CODE++)
+ {
+ mod_measurement = 1; // ONLY THR-QPSK TODO others
+ {
+ mod = bitloading_noise2mod (noise_CODE);
+ if (mod == 7 ) test_verbose_print ("mod = %d : %d <= %d?", mod, noise_CODE, THR3[mod_measurement][mod-1]);
+ if (mod == 0 ) test_verbose_print ("mod = %d : %d > %d?", mod, noise_CODE, THR3[mod_measurement][mod]);
+ if (mod != 0 && mod != 7 ) test_verbose_print ("mod = %d : %d E ]%d,%d]?", mod, noise_CODE, THR3[mod_measurement][mod], THR3[mod_measurement][mod-1]);
+ if (mod == 7 ) test_fail_if (noise_CODE > accu*THR3[mod_measurement][mod-1]);
+ else
+ {
+ test_fail_if (noise_CODE <= accu*THR3[mod_measurement][mod]);
+ if (mod != 0) test_fail_if (noise_CODE > accu*THR3[mod_measurement][mod-1]);
+ }
+ }
+ }
+ } test_end;
+}
+
+void
+test_compute_worst_tonemap (test_t t)
+{
+ test_begin (t, "update or new worst tonemap")
+ {
+ uint c;
+
+ phy_chandata_t *b, *l;
+ phy_chandata_t *freq_noise = (phy_chandata_t *) blk_alloc_desc_range (mpdu_measure_chandata_blk_nb[PHY_CHANDATA_TYPE_NRJ], (blk_t **) &l);
+ tonemap_t *tm = NULL;
+
+ l->blk.next = NULL;
+ l->last = 1;
+
+ int carrier_uninit = PHY_CARRIER_NB;
+ int carrier_init = 0;
+ int carrier_index = -1;
+ int k=0;
+ uint noise1[PHY_CARRIER_NB];
+ for (b = freq_noise; b; b = (phy_chandata_t *) b->blk.next)
+ {
+ if (carrier_uninit > 128) b->size = 128;
+ else b->size = carrier_uninit;
+ b->type = PHY_CHANDATA_TYPE_NRJ;
+ phy_noise_energy_t *data = (phy_noise_energy_t *) b->blk.data;
+ for (c=0; c<PHY_NOISE_NB_PER_BLK; c++)
+ {
+ carrier_index++;
+ carrier_uninit--;
+ carrier_init++;
+ *(data+c) = THR3[1][k%7];
+ k++;
+ noise1[carrier_index] = *(data+c);
+ if (carrier_uninit == 0) break;
+ }
+ }
+ bitloading_worst_tonemap_compute (&tm, freq_noise);
+ test_fail_if (!tm);
+ bitstream_t stream;
+ bitstream_init(&stream, tm->tmdma_desc_head->data, BLK_SIZE, BITSTREAM_READ);
+ for (c=0; c< PHY_CARRIER_NB; c++)
+ {
+ if (c == 1024)
+ {
+ bitstream_init(&stream, tm->tmdma_desc_head->next->data, BLK_SIZE, BITSTREAM_READ);
+ }
+ uint mod;
+ bitstream_access (&stream, &mod, 4);
+ uint noise = noise1[c];
+ if (mod == 0) test_fail_if (noise < THR3[1][0]);
+ if (mod == 7) test_fail_if (noise > THR3[1][6]);
+ if (mod>0 && mod<7)
+ {
+ test_fail_if (noise > THR3[1][mod-1]);
+ test_fail_if (noise <= THR3[1][mod]);
+ }
+ }
+
+ lib_rnd_init (&rnd, 23);
+
+ carrier_uninit = PHY_CARRIER_NB;
+ carrier_init = 0;
+ carrier_index = -1;
+ uint noise2[PHY_CARRIER_NB];
+ for (b = freq_noise; b; b = (phy_chandata_t *) b->blk.next)
+ {
+ phy_noise_energy_t *data = (phy_noise_energy_t *) b->blk.data;
+ for (c=0; c<PHY_NOISE_NB_PER_BLK; c++)
+ {
+ carrier_index++;
+ carrier_uninit--;
+ carrier_init++;
+ *(data+c) = lib_rnd_uniform (&rnd, 2*noise1[carrier_index]+1);
+ noise2[carrier_index] = *(data+c);
+ if (carrier_uninit == 0) break;
+ }
+ }
+ bitloading_worst_tonemap_compute (&tm, freq_noise);
+ test_fail_if (!tm);
+ bitstream_init(&stream, tm->tmdma_desc_head->data, BLK_SIZE, BITSTREAM_READ);
+ for (c=0; c< PHY_CARRIER_NB; c++)
+ {
+ if (c == 1024)
+ {
+ bitstream_init(&stream, tm->tmdma_desc_head->next->data, BLK_SIZE, BITSTREAM_READ);
+ }
+ uint mod;
+ bitstream_access (&stream, &mod, 4);
+ uint noise = noise2[c]; if (noise1[c]>noise2[c]) noise = noise1[c];
+ if (mod == 0) test_fail_if (noise < THR3[1][0]);
+ if (mod == 7) test_fail_if (noise > THR3[1][6]);
+ if (mod>0 && mod<7)
+ {
+ test_fail_if (noise > THR3[1][mod-1]);
+ test_fail_if (noise <= THR3[1][mod]);
+ }
+ }
+ blk_release_desc_range ((blk_t *) freq_noise,(blk_t *) l);
+ blk_t *f = tm->tmdma_desc_head;
+ blk_release_desc_range (f, f->next);
+ tm = NULL;
+
+ } test_end;
+ }
+
+void
+test_date_in_beacon_atu_get (test_t t)
+{
+ test_begin (t, "check date_atu_get")
+ {
+ int i;
+ for (i=0; i<MAC_MS_TO_TCK(40)/2; i++)
+ {
+ uint ans = bitloading_date_in_beacon_atu_get (i, (0xFFFFFFFF)-i);
+ test_fail_if (ans != (uint) MAC_TCK_TO_ATU(2*i+1));
+ ans = bitloading_date_in_beacon_atu_get (1000000-i, i);
+ test_fail_if (ans != (uint) MAC_TCK_TO_ATU(1000000-2*i));
+ }
+ } test_end;
+}
+
+int
+main (int argc, char **argv)
+{
+ test_t test;
+ mpdu_measure_store_init ();
+ test_init (test, argc, argv);
+ test_case_begin (test, "CE-computation");
+ test_is_time_noise_stable (test);
+ test_noise2mod (test);
+ test_compute_worst_tonemap (test);
+ test_date_in_beacon_atu_get (test);
+ test_result (test);
+ return (test_nb_failed (test) == 0 ? 0 : 1);
+}
+
diff --git a/cesar/ce/test/rx/general/src/test_cei.c b/cesar/ce/test/rx/general/src/test_cei.c
new file mode 100755
index 0000000000..3c883cbd71
--- /dev/null
+++ b/cesar/ce/test/rx/general/src/test_cei.c
@@ -0,0 +1,80 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ./src/test_cei.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#define RXCE
+#define TXCE
+#include "ce/inc/cei.h"
+#include "lib/test.h"
+#include "mac/common/tonemask.h"
+#include "ce/test/common/tonemap_utils.h"
+#include "ce/test/common/print_utils.h"
+
+void
+test_exchange (test_t test, tonemaps_t *rx_tms, tonemaps_t *tx_tms,
+ u8 *mask, uint tmi, uint max_rnd, uint offset)
+{
+ u8 buffer[1536];
+ int i; for (i=0; i<1536; i++) buffer[i]=0;
+ create_tm (rx_tms, mask, tmi, max_rnd, offset);
+ ce_print_tonemaps (rx_tms);
+ cei_create (buffer, mask, rx_tms, tmi, TONEMAP_INDEX_NULL);
+ ce_print_buffer (buffer, 512);
+ cei_decode (tx_tms, CM_CHAN_EST_IND, buffer, mask);
+ ce_print_tonemaps (tx_tms);
+ compare_tonemaps (test, rx_tms, tx_tms, mask);
+}
+
+int
+main (int argc, char **argv)
+{
+ int i;
+ u8 mask[(PHY_CARRIER_NB+7)/8];
+ for (i=0; i<(PHY_CARRIER_NB+7)/8; i++) mask[i] = 0xFF;
+ mask[i-1] = ((1<<(PHY_CARRIER_NB%8))-1);
+ test_t test;
+ lib_rnd_init (&rnd, 12);
+ test_init (test, argc, argv);
+ tonemaps_t *rx_tms = tonemaps_alloc();
+ tonemaps_t *tx_tms = tonemaps_alloc();
+ test_case_begin (test, "CE-cei-full mask");
+ test_exchange (test, rx_tms, tx_tms, mask, 0, 3, 1);
+ test_exchange (test, rx_tms, tx_tms, mask, 1, 2, 6);
+ test_exchange (test, rx_tms, tx_tms, mask, 2, 1, 3);
+ test_exchange (test, rx_tms, tx_tms, mask, 3, 0, 3);
+ tonemaps_release (rx_tms);
+ tonemaps_release (tx_tms);
+ test_begin (test, "check alloc/free")
+ {
+ test_fail_unless (blk_check_memory());
+ } test_end;
+
+ rx_tms = tonemaps_alloc();
+ tx_tms = tonemaps_alloc();
+ tonemask_default (mask);
+ test_case_begin (test, "CE-cei-default mask");
+ test_exchange (test, rx_tms, tx_tms, mask, 0, 3, 1);
+ test_exchange (test, rx_tms, tx_tms, mask, 1, 2, 6);
+ test_exchange (test, rx_tms, tx_tms, mask, 2, 1, 3);
+ test_exchange (test, rx_tms, tx_tms, mask, 3, 0, 3);
+ tonemaps_release (rx_tms);
+ tonemaps_release (tx_tms);
+ test_begin (test, "check alloc/free")
+ {
+ test_fail_unless (blk_check_memory());
+ } test_end;
+ test_result (test);
+ return (test_nb_failed (test) == 0 ? 0 : 1);
+}
+
diff --git a/cesar/ce/test/rx/general/src/test_cei_param.c b/cesar/ce/test/rx/general/src/test_cei_param.c
new file mode 100755
index 0000000000..66a869d4d2
--- /dev/null
+++ b/cesar/ce/test/rx/general/src/test_cei_param.c
@@ -0,0 +1,86 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ./src/test_tx.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+
+#include "common/std.h"
+#include "ce/test/common/print_utils.h"
+#include "ce/inc/cei_param.h"
+
+#include "lib/rnd.h"
+#include "lib/test.h"
+
+lib_rnd_t rnd;
+
+void
+test_cei_param (test_t test, uint read_percent)
+{
+ test_begin (test, "test_cei_param")
+ {
+ int n;
+ //test_debug_print ("%d%% of read %d%% of write ", read_percent, 100-read_percent);
+ lib_rnd_init (&rnd, 23);
+ //cei_param_t cei_param;
+ cei_param_fifo_init ();
+ cei_param_t cei_param;
+ cei_param.tms = NULL;
+ cei_param.new_tmi = 0;
+ cei_param.old_tmi = 0;
+ cei_param.priority = 0xFF;
+ cei_param.dtei = 0xFF;
+ uint cpt = 0;
+ for (n=0; n<1000; n++)
+ {
+ uint alea = lib_rnd_uniform (&rnd, 100);
+ //my_print ("%d\n" ,alea);
+ test_fail_if (cpt>CEI_WANTED_MAX);
+ if (alea > read_percent)
+ {
+ //my_print (" get %d <=> %d\n", cpt, cei_param_fifo.number);
+ uint reader_index = cei_param_fifo.reader_index;
+ test_fail_if (cpt != cei_param_fifo.number);
+ cei_param_t *param = cei_param_get ();
+ //if (!param) my_print ("param = NULL\n");
+ test_fail_if (!param && cpt!=0);
+ if (param)
+ {
+ //my_print ("%d <==> %d\n", reader_index, 0);
+ test_fail_if (reader_index != param->priority);
+ cpt--;
+ }
+ }
+ else
+ {
+ //my_print (" add\n");
+ cei_param.priority = cei_param_fifo.writer_index;
+ if (cei_param_add (&cei_param)) cpt++;
+ }
+ }
+ } test_end;
+}
+
+int
+main (int argc, char **argv)
+{
+ test_t test;
+ test_init (test, argc, argv);
+ test_case_begin (test, "CE-mme 75% of read");
+ test_cei_param (test, 75);
+ test_case_begin (test, "CE-mme 25% of read");
+ test_cei_param (test, 25);
+ test_case_begin (test, "CE-mme 50% of read");
+ test_cei_param (test, 50);
+ test_result (test);
+ return (test_nb_failed (test) == 0 ? 0 : 1);
+}
diff --git a/cesar/ce/test/rx/general/src/test_mpdu_measure_store.c b/cesar/ce/test/rx/general/src/test_mpdu_measure_store.c
new file mode 100755
index 0000000000..8b95e3cafd
--- /dev/null
+++ b/cesar/ce/test/rx/general/src/test_mpdu_measure_store.c
@@ -0,0 +1,294 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ./src/test_tx.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+
+#include "common/std.h"
+#include "mac/common/tonemap.h"
+#include "ce/test/common/print_utils.h"
+#include "lib/rnd.h"
+#include "lib/test.h"
+
+lib_rnd_t rnd;
+
+void
+test_alloc_release (test_t test)
+{
+ test_begin (test, "mpdu_measure allocation and release")
+ {
+ if (!blk_check_memory()) blk_print_memory();
+ test_fail_unless (blk_check_memory ());
+ } test_end;
+}
+
+void
+sar_fill_ber (blk_t *first, uint n, uint ber_init_value, uint offset)
+{
+ uint i;
+ u32 *wrdata = (u32 *) first->data;
+ uint cpt = offset;
+ for (i=0; i<n; i++)
+ {
+ if (cpt == BLK_SIZE/4)
+ {
+ dbg_assert (first->next);
+ first = first->next;
+ wrdata = (u32 *) first->data;
+ cpt=0;
+ }
+ *(wrdata+cpt) = i+ber_init_value;
+ cpt++;
+ }
+}
+
+void
+test_mpdu_measure_pb_add (test_t t, mpdu_measure_store_t *ctx)
+{
+ test_begin (t, "add pb measures")
+ {
+ uint sar_call_nb, pb_nb_per_call;
+ for (sar_call_nb=1; sar_call_nb < MAC_MAX_PB_PER_MPDU; sar_call_nb++)
+ {
+ uint max_pb_nb_per_call = MAC_MAX_PB_PER_MPDU / sar_call_nb;
+ for (pb_nb_per_call=1; pb_nb_per_call<max_pb_nb_per_call ; pb_nb_per_call ++)
+ {
+ uint N = sar_call_nb;
+ uint pb_nb_to_add = pb_nb_per_call;
+ uint n,i;
+ uint offset;
+ pb_measure_blk_t *first_ber =NULL;
+ pb_measure_blk_t *last_ber = NULL;
+
+ pbproc_rx_params_t *rx_params = (pbproc_rx_params_t *) blk_alloc();
+ mpdu_measure_store_append (ctx, rx_params, 0, &first_ber, &last_ber, NULL, 0, NULL);
+ mpdu_measure_t *measure = mpdu_measure_store_get(ctx);
+ for (n=0; n<N; n++)
+ {
+ mpdu_measure_pb_add (measure, pb_nb_to_add, &first_ber, &last_ber, &offset);
+ sar_fill_ber ((blk_t *)first_ber, pb_nb_to_add, n * pb_nb_to_add, offset);
+ }
+ pb_measure_blk_t *rd = measure->pb_head;
+ u32 *rddata = (u32 *) rd->data;
+ test_fail_if (!measure);
+ test_fail_if (!rd);
+ uint k=0;
+ uint cpt = 1;
+ do
+ {
+ for (i=0; i<BLK_SIZE/4; i++)
+ {
+ test_fail_if ( (i<rd->pb_nb) && *(rddata+i)!=k);
+ k++;
+ }
+ if (rd->next)
+ {
+ rd = rd->next;
+ rddata = (u32 *) rd->data;
+ cpt++;
+ }
+ else
+ {
+ test_fail_if (rd != last_ber);
+ rd = rd->next;
+ }
+ } while (rd);
+ uint comp = (N*pb_nb_to_add)/(BLK_SIZE/4);
+ if ((N*pb_nb_to_add)%(BLK_SIZE/4) >0) comp++;
+ test_fail_if (cpt != comp);
+ mpdu_measure_store_release (ctx, measure);
+ }
+ }
+ } test_end;
+}
+
+phy_chandata_t *
+chandata_init (int type)
+{
+ phy_chandata_t *last;
+ phy_chandata_t *chandata = (phy_chandata_t *) blk_alloc_desc_range (
+ mpdu_measure_chandata_blk_nb[type], (blk_t **) &last);
+ chandata->type = type;
+ last->blk.next = NULL;
+ phy_chandata_t *ch = chandata;
+ while (ch)
+ {
+ uint i;
+ phy_noise_energy_t * data = (phy_noise_energy_t *) ch->blk.data;
+ for (i=0; i<PHY_NOISE_NB_PER_BLK; i++ ) *(data+i) = (type)*i;
+ ch->last = 0;
+ ch->type = type;
+ ch = (phy_chandata_t *) ch->blk.next;
+ }
+ last->last = 1;
+ return (chandata);
+}
+
+void
+test_mpdu_measure_chandata_add (test_t t, mpdu_measure_store_t *ctx)
+{
+ test_begin (t, "add noise")
+ {
+ uint i;
+ pbproc_rx_params_t *rx_params = (pbproc_rx_params_t *) blk_alloc();
+ bool b = mpdu_measure_store_append (ctx, rx_params, 0, NULL, NULL, NULL, 0, NULL);
+ if (b)
+ {
+ mpdu_measure_t *measure = mpdu_measure_store_get(ctx);
+ for (i=1; i<PHY_CHANDATA_TYPE_NB; i++)
+ {
+ phy_chandata_t *chandata = chandata_init (i);
+ mpdu_measure_chandata_add (measure, chandata);
+ }
+ for (i=0; i<PHY_CHANDATA_TYPE_NB; i++)
+ {
+ phy_chandata_t *chandata = measure->chandata_head[i];
+ while (chandata)
+ {
+ phy_noise_energy_t *data = (phy_noise_energy_t *) chandata->blk.data;
+ uint j;
+ for (j=0; j<PHY_NOISE_NB_PER_BLK; j++)
+ {
+ test_fail_if (*(data+j) != i*j);
+ }
+ int last = chandata->last;
+ chandata = (phy_chandata_t *) chandata->blk.next;
+ if (!chandata) test_fail_if (last == 0);
+ else test_fail_if (last == 1);
+ }
+ }
+ mpdu_measure_store_release (ctx, measure);
+ }
+ } test_end;
+}
+
+void
+test_mpdu_measure_add (test_t t, mpdu_measure_store_t *ctx)
+{
+ test_begin (t, "add/remove mpdu measures")
+ {
+ lib_rnd_init (&rnd, 23);
+ int nb_frame_added = 0;
+ int nb_frame_measurement = 0;
+ int alea ;
+ int N = 1000;
+ int i;
+ for (i=0; i<N; i++)
+ {
+ alea = lib_rnd_uniform (&rnd, 100);
+ if (alea > 5 )
+ {
+ pbproc_rx_params_t *rx_params = (pbproc_rx_params_t *) blk_alloc();
+ pb_measure_blk_t **f,**l;
+ f = l = NULL;
+ bool b = mpdu_measure_store_append (ctx, rx_params, 0, f, l, NULL, 0, NULL);
+ if (b)
+ {
+ rx_params->preamble_ntb = nb_frame_added;
+ nb_frame_added++;
+ nb_frame_measurement++;
+ }
+ }
+ else
+ {
+ if (nb_frame_measurement == 0)
+ {
+ test_fail_if (ctx->measure_nb != 0);
+ }
+ else
+ {
+ mpdu_measure_t *first = mpdu_measure_store_get (ctx);
+ int test = first->rx_params->preamble_ntb;
+ test_fail_if (test != (nb_frame_added - nb_frame_measurement));
+ mpdu_measure_store_release (ctx, first);
+ nb_frame_measurement--;
+ }
+ }
+ }
+ while (nb_frame_measurement > 0)
+ {
+ mpdu_measure_t *first = mpdu_measure_store_get (ctx);
+ int test = first->rx_params->preamble_ntb;
+ test_fail_if (test != (nb_frame_added - nb_frame_measurement));
+ mpdu_measure_store_release (ctx, first);
+ nb_frame_measurement--;
+ }
+ test_fail_if (mpdu_measure_store_get (ctx));
+ } test_end;
+}
+
+void
+test_mpdu_measure_store_management (test_t t, mpdu_measure_store_t *ctx)
+{
+ test_begin (t, "store is full get-add-release")
+ {
+ int N = MPDU_MEASURE_STORE_SIZE;
+ int i;
+ // Fill the store.
+ for (i=0; i<N; i++)
+ {
+ pbproc_rx_params_t *rx_params = (pbproc_rx_params_t *) blk_alloc();
+ pb_measure_blk_t **f,**l;
+ f = l = NULL;
+ bool b = mpdu_measure_store_append (ctx, rx_params, 0, f, l, NULL, 0, NULL);
+ if (b)
+ {
+ rx_params->preamble_ntb = i;
+ }
+ }
+ // Get first then add before release.*/
+ mpdu_measure_t *first = mpdu_measure_store_get (ctx);
+ pbproc_rx_params_t *rx_params = (pbproc_rx_params_t *) blk_alloc();
+ pb_measure_blk_t **f,**l;
+ f = l = NULL;
+ bool b = mpdu_measure_store_append (ctx, rx_params, 0, f, l, NULL, 0, NULL);
+ test_fail_if (b);
+ mpdu_measure_store_release (ctx, first);
+ // Release all the store.
+ while (ctx->measure_nb)
+ {
+ mpdu_measure_store_release (ctx, mpdu_measure_store_get (ctx));
+ }
+ } test_end;
+ test_begin (t, "store is empty get-add-get-release")
+ {
+ mpdu_measure_t *first = mpdu_measure_store_get (ctx);
+ pbproc_rx_params_t *rx_params = (pbproc_rx_params_t *) blk_alloc();
+ pb_measure_blk_t **f,**l;
+ f = l = NULL;
+ // Test store empty.
+ first = mpdu_measure_store_get (ctx);
+ test_fail_if (first);
+ mpdu_measure_store_append (ctx, rx_params, 0, f, l, NULL, 0, NULL);
+ first = mpdu_measure_store_get (ctx);
+ test_fail_unless (first->rx_params == rx_params);
+ mpdu_measure_store_release (ctx, first);
+ } test_end;
+}
+
+int
+main (int argc, char **argv)
+{
+ test_t test;
+ mpdu_measure_store_t *ctx = mpdu_measure_store_init();
+ test_init (test, argc, argv);
+ test_case_begin (test, "RXCE-mpdu_measure_store");
+ test_mpdu_measure_pb_add (test, ctx);
+ test_mpdu_measure_chandata_add (test, ctx);
+ test_mpdu_measure_add (test, ctx);
+ test_mpdu_measure_store_management (test, ctx);
+ test_alloc_release (test);
+ test_result (test);
+ return (test_nb_failed (test) == 0 ? 0 : 1);
+}
+
diff --git a/cesar/ce/test/rx/general/src/test_rx.c b/cesar/ce/test/rx/general/src/test_rx.c
new file mode 100755
index 0000000000..e33ca4ec74
--- /dev/null
+++ b/cesar/ce/test/rx/general/src/test_rx.c
@@ -0,0 +1,281 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ./src/test_tx.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "cyg/hal/hal_intr.h"
+#include "ce/inc/rx.h"
+#include "mac/common/tonemap.h"
+#include "ce/test/common/print_utils.h"
+#include "ce/test/rx/inc/test_rx.h"
+#include "lib/bitstream.h"
+#include "lib/rnd.h"
+#include "lib/test.h"
+#include "cp/interf/interf.h"
+#include "lib/trace.h"
+#include "mac/common/ntb.h"
+#include "ce/inc/trace.h"
+#include "ce/inc/bitloading.h"
+#include "mac/sar/sar.h"
+
+lib_rnd_t rnd;
+test_t test;
+phy_t *phy_ctx;
+rxce_t *rxce_ctx;
+sar_t *sar;
+
+
+#define FRAME_PRIORITY 10
+cyg_thread frame_thread;
+cyg_handle_t frame_handle;
+unsigned char frame_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+
+#define RXCE_PRIORITY 14
+cyg_thread rxce_thread;
+cyg_handle_t rxce_handle;
+unsigned char rxce_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+
+uint noise[PHY_CARRIER_NB];
+uint false_bit_nb[MAC_MAX_PB_PER_MPDU];
+
+struct test_status_t
+{
+ mac_store_t *mac_store_ctx;
+ sta_t *sta;
+ uint sound_nb;
+ uint null_ber_frame_nb;
+ uint date;
+};
+typedef struct test_status_t test_status_t;
+test_status_t status;
+
+struct frame_t
+{
+ bool sound;
+ uint sound_reason_code;
+ uint pb_nb;
+ pbproc_rx_params_t *rx_params;
+ uint *noise;
+ uint *false_bit_nb;
+};
+typedef struct frame_t frame_t;
+
+
+bool next_scf;
+
+void
+pbproc_rxce_init (pbproc_need_scf_cb_t need_scf)
+{
+ need_scf_cb = need_scf;
+}
+
+void
+pbproc_scf (void)
+{
+ //my_print ("pbproc scf\n");
+ next_scf = true;
+}
+
+void
+over_pbproc_init (void)
+{
+ next_scf = false;
+}
+
+bool
+pbproc_send_scf (void)
+{
+ ce_print ("\t\t\t\t ACK with scf = %d\n", next_scf);
+ bool ret = next_scf;
+ next_scf = false;
+ return (ret);
+}
+
+void
+sar_noise_new (pbproc_rx_params_t *rx_params, uint noise[], uint symbol_nb)
+{
+ uint i;
+ uint lambda = 0;
+ phy_chandata_t *time_noise;
+ time_noise = (phy_chandata_t *) blk_alloc_desc();
+ time_noise->blk.next = NULL;
+ time_noise->last = 0;
+ time_noise->type = PHY_CHANDATA_TYPE_NRJ_SYMBOL;
+ phy_noise_energy_t *time_data = (phy_noise_energy_t *) time_noise->blk.data;
+ phy_chandata_t *freq_noise, *last;
+ freq_noise = (phy_chandata_t *) blk_alloc_desc_range (mpdu_measure_chandata_blk_nb[PHY_CHANDATA_TYPE_NRJ],
+ (blk_t **) &last);
+ freq_noise->type = PHY_CHANDATA_TYPE_NRJ;
+ phy_chandata_t * ch = freq_noise;
+ phy_noise_energy_t *freq_data = (phy_noise_energy_t *) ch->blk.data;
+ for (i=0; i<PHY_CARRIER_NB; i++)
+ {
+ ch->type = PHY_CHANDATA_TYPE_NRJ;
+ ch->last = 0;
+ if ( ((i%PHY_NOISE_NB_PER_BLK) == 0) && (i!=0) )
+ {
+ ch = (phy_chandata_t *) ch->blk.next;
+ freq_data = (phy_noise_energy_t *) ch->blk.data;
+ }
+ * (freq_data+(i%PHY_NOISE_NB_PER_BLK)) = noise[i];
+ lambda+=noise[i];
+ }
+ lambda = lambda/PHY_CARRIER_NB;
+ last->last = 1;
+ last->blk.next = NULL;
+ for (i=0; i<symbol_nb; i++) *(time_data+i) = lambda;
+ time_noise->blk.next = (blk_t *) freq_noise;
+ ce_print ("\t\t\t\t ADD NOISES\n");
+ rxce_mpdu_measurement_add (rxce_ctx, rx_params, 0, NULL, NULL, (pb_t *) time_noise,
+ mpdu_measure_chandata_blk_nb[PHY_CHANDATA_TYPE_NRJ] +
+ mpdu_measure_chandata_blk_nb[PHY_CHANDATA_TYPE_NRJ_SYMBOL], NULL);
+}
+
+void
+frame_new (frame_t *frame)
+{
+ uint symbol_nb = 0;
+ frame->rx_params->preamble_ntb = status.date;
+ if (frame->sound)
+ {
+ symbol_nb = 19;
+ status.date += (19);
+ status.sound_nb++;
+ need_scf_cb (frame->rx_params->tei, frame->sound_reason_code);
+ cyg_thread_delay (symbol_nb/19);
+ sar_noise_new (frame->rx_params, frame->noise, symbol_nb);
+ }
+ else
+ {
+ ;
+ }
+}
+
+void
+frame_process (cyg_addrword_t data)
+{
+ mac_store_sta_add (status.mac_store_ctx, 1);
+ status.sta = mac_store_sta_get (status.mac_store_ctx, 1);
+ status.sound_nb = 0;
+ test_case_begin (test, "CE-rxce_process with noise reception");
+ test_begin (test, "rxce test1")
+ {
+ uint j;
+ uint nb_frame = 0;
+ uint worst[PHY_CARRIER_NB];
+
+ cyg_thread_delay (1);
+ lib_rnd_init (&rnd, 12);
+ do
+ {
+ frame_t *frame = blk_alloc();
+ pbproc_rx_params_t *rx_params = blk_alloc ();
+ frame->sound = true;
+ frame->sound_reason_code = 0xFD;
+ frame->pb_nb = 0;
+ frame->rx_params = rx_params;
+ frame->rx_params->tei = 1;
+ for (j=0; j<PHY_CARRIER_NB; j++)
+ {
+ if (nb_frame < FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP) noise[j] = j + lib_rnd_uniform(&rnd,(j+1));
+ else noise[j] = 0;
+ if (nb_frame == 0) worst[j] = noise[j];
+ else
+ {
+ if (worst[j]<noise[j]) worst[j] = noise[j];
+ }
+ }
+ frame->noise = noise;
+ frame_new (frame);
+ nb_frame++;
+ test_fail_if (status.sta->rxce.stable_ROBO_nb<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && status.sta->rx_tonemaps->default_tmi != TONEMAP_INDEX_INITIAL_START);
+ test_fail_if (status.sta->rxce.stable_ROBO_nb>FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && status.sta->rx_tonemaps->default_tmi == TONEMAP_INDEX_INITIAL_START);
+ blk_release (frame);
+ } while (!pbproc_send_scf ());
+ bitstream_t stream;
+ bitstream_init (&stream, status.sta->rx_tonemaps->tm[status.sta->rx_tonemaps->default_tmi]->tmdma_desc_head->data, BLK_SIZE, BITSTREAM_READ);
+ for (j=0; j<PHY_CARRIER_NB; j++)
+ {
+ if (j==1024)
+ {
+ bitstream_init (&stream, status.sta->rx_tonemaps->tm[status.sta->rx_tonemaps->default_tmi]->tmdma_desc_head->next->data, BLK_SIZE, BITSTREAM_READ);
+ }
+ uint mod;
+ bitstream_access (&stream, &mod, 4);
+ if (mod==0)
+ {
+ test_fail_if (worst[j] <=THR3[1][0]);
+ }
+ else
+ {
+ if (mod==7)
+ {
+ test_fail_if (worst[j] > THR3[1][6]);
+ }
+ else
+ {
+ test_fail_if (worst[j]<=THR3[1][mod] || worst[j]>THR3[1][mod-1]);
+ }
+ }
+
+ }
+ } test_end;
+ // rxce_process can end to process and free pending frames.
+ cyg_thread_delay (1);
+
+ blk_release (status.sta);
+ mac_store_sta_remove (status.mac_store_ctx, 1);
+ mac_store_uninit (status.mac_store_ctx);
+ blk_release (phy_ctx);
+ rxce_trace_print(rxce_ctx);
+ rxce_trace_uninit (rxce_ctx);
+ blk_release (sar);
+ trace_uninit();
+ test_begin (test, "check alloc/free")
+ {
+ test_fail_unless (blk_check_memory());
+ } test_end;
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+}
+
+void
+cyg_user_start (int argc, char **argv)
+{
+ trace_init();
+ phy_ctx = blk_alloc();
+ test_init (test, argc, argv);
+ mac_config_t mac_config;
+ mac_config_init (&mac_config);
+ status.mac_store_ctx = mac_store_init ();
+ mac_ntb_init (phy_ctx, &mac_config);
+ sar = blk_alloc();
+ rxce_ctx = rxce_init (sar, status.mac_store_ctx, &mac_config);
+ over_pbproc_init ();
+ pbproc_rxce_init (pbproc_need_scf_cb);
+
+ cyg_thread_create (RXCE_PRIORITY, &rxce_process, (cyg_addrword_t) rxce_ctx, "rxce",
+ rxce_stack, CYGNUM_HAL_STACK_SIZE_TYPICAL,
+ &rxce_handle, &rxce_thread);
+ cyg_thread_create (FRAME_PRIORITY, &frame_process, 0, "frame_test",
+ frame_stack, CYGNUM_HAL_STACK_SIZE_TYPICAL,
+ &frame_handle, &frame_thread);
+
+
+ //my_print ("launch rxce process\n");
+ cyg_thread_resume (rxce_handle);
+
+ //my_print ("launch frame process\n");
+ cyg_thread_resume (frame_handle);
+}
+
diff --git a/cesar/ce/test/rx/general/src/test_sar_integration.c b/cesar/ce/test/rx/general/src/test_sar_integration.c
new file mode 100755
index 0000000000..e580928cea
--- /dev/null
+++ b/cesar/ce/test/rx/general/src/test_sar_integration.c
@@ -0,0 +1,303 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ce/test/rx/sar_integration.c
+ * \brief Use sar callback for Channel estimation.
+ * \ingroup ce
+ *
+ */
+#include "common/std.h"
+#include "cyg/hal/hal_intr.h"
+#include "lib/test.h"
+#include "mac/sar/sar.h"
+#include "ce/inc/rx.h"
+#include "mac/common/pb.h" // PB header initialisation
+#include "ce/test/common/print_utils.h"
+#include "cp/interf/interf.h"
+//#include "mac/sar/inc/trace.h"
+#include "mac/common/ntb.h"
+#include "ce/inc/trace.h"
+#include "hal/phy/phy.h"
+#include "ce/inc/bitloading.h"
+
+#define FRAME_PRIORITY 10
+cyg_thread frame_thread;
+cyg_handle_t frame_handle;
+unsigned char frame_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+#define RXCE_PRIORITY 14
+cyg_thread rxce_thread;
+cyg_handle_t rxce_handle;
+unsigned char rxce_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+
+test_t test;
+mac_store_t *mac_store_ctx;
+mac_config_t mac_config;
+rxce_t *rxce_ctx;
+phy_t *phy;
+
+u32
+phy_date (phy_t *phy)
+{
+ return (cyg_current_time());
+}
+
+void
+pbproc_scf (void)
+{
+ ce_print("pbproc_scf()\n");
+}
+
+void
+emul_reassembly (int pb_nb, uint date, pbproc_rx_params_t **rx_params,
+ pb_t **f, pb_t **l, phy_chandata_t **noise)
+{
+ uint i, j;
+ if (pb_nb > 0)
+ {
+ *f = (pb_t *) blk_alloc_desc_range (pb_nb,(blk_t **)l);
+ (*l)->next = NULL;
+ phy_pb_rx_t *p = (phy_pb_rx_t *) *f;
+ for (i=0; i<(uint) pb_nb; i++)
+ {
+ p->pb_measurement.ber = i;
+ ((pb_t *)p)->header.vpbf = 0;
+ p = (phy_pb_rx_t *) p->blk.next;
+ }
+ }
+ else
+ {
+ *f = *l = NULL;
+ }
+
+ phy_chandata_t *l_noise, *p_noise;
+ phy_chandata_t *f_noise = (phy_chandata_t *) blk_alloc_desc_range (mpdu_measure_chandata_blk_nb[PHY_CHANDATA_TYPE_NRJ], (blk_t **)&l_noise);
+ p_noise = f_noise;
+ phy_noise_energy_t *data;
+ for (i=0; i<mpdu_measure_chandata_blk_nb[PHY_CHANDATA_TYPE_NRJ]; i++)
+ {
+ if (p_noise == l_noise)
+ {
+ p_noise->last = 1;
+ p_noise->blk.next = NULL;
+ dbg_assert (i == (mpdu_measure_chandata_blk_nb[PHY_CHANDATA_TYPE_NRJ]-1));
+ }
+ else
+ {
+ p_noise->last = 0;
+ }
+ p_noise->type = PHY_CHANDATA_TYPE_NRJ;
+ data = (phy_noise_energy_t *) p_noise->blk.data;
+ for (j=0; j<PHY_NOISE_NB_PER_BLK; j++) *data++ = (i+1) * j*3;
+ p_noise = (phy_chandata_t *) p_noise->blk.next;
+ }
+
+ *noise = (phy_chandata_t *) blk_alloc_desc ();
+ data = (phy_noise_energy_t *) (*noise)->blk.data;
+ for (j=0; j<PHY_NOISE_NB_PER_BLK; j++)
+ {
+ *data++ = 1000;
+ }
+ (*noise)->type = PHY_CHANDATA_TYPE_NRJ_SYMBOL;
+ (*noise)->last = 0;
+ (*noise)->blk.next =(blk_t *) f_noise;
+
+ *rx_params = blk_alloc();
+ (*rx_params)->preamble_ntb = date;
+ (*rx_params)->tei = 1;
+ (*rx_params)->lid = 1;
+}
+void
+run_one_reassembly (sar_t *sar_ctx, uint pb_nb)
+{
+ pbproc_rx_params_t *rx_params;
+ pb_t *f, *l;
+ phy_chandata_t *noise;
+
+ emul_reassembly (pb_nb, 0x00, &rx_params, &f, &l, &noise);
+ sar_mpdu_add (sar_ctx, NULL, NULL, rx_params, f, l, pb_nb, (pb_t *) noise,
+ mpdu_measure_chandata_blk_nb[PHY_CHANDATA_TYPE_NRJ] +
+ mpdu_measure_chandata_blk_nb[PHY_CHANDATA_TYPE_NRJ_SYMBOL]
+ );
+ blk_release (rx_params); // pbproc can erase it.
+ sar_launch (sar_ctx);
+}
+
+void
+START (sar_t **sar_ctx, sta_t **sta, ca_t **ca)
+{
+ pbproc_t *pbproc_ctx = pbproc_init (&mac_config, mac_store_ctx);
+ *ca = (ca_t *) blk_alloc();
+ *sar_ctx = sar_init (mac_store_ctx, pbproc_ctx, *ca);
+ sar_init_measure_context (*sar_ctx, rxce_ctx);
+ sar_init_measurement_cb (*sar_ctx, &rxce_mpdu_measurement_add);
+ mac_store_sta_add (mac_store_ctx, 1);
+ *sta = mac_store_sta_get (mac_store_ctx, 1);
+}
+
+void
+END (sar_t *sar_ctx, sta_t *sta, ca_t *ca)
+{
+ //sar_trace_print (sar_ctx);
+ blk_release (sta); // release reference to sta added by mac_store_mfs_get in START.
+ dbg_check (mac_store_sta_remove (mac_store_ctx, 1));
+ blk_release (ca);
+ sar_uninit (sar_ctx);
+}
+
+void
+frame_process (cyg_addrword_t data)
+{
+
+ sar_t *sar_ctx;
+ sta_t *sta;
+ ca_t *ca;
+ int n;
+ int tmi_null;
+ int tmp_exists;
+
+ test_case_begin (test, "One sound frame");
+ START (&sar_ctx, &sta, &ca);
+ run_one_reassembly (sar_ctx, 0);
+ cyg_thread_delay (3); //rxce can process
+ test_begin (test, "check rxce status")
+ {
+ test_fail_if (sta->rx_tonemaps->default_tmi != TONEMAP_INDEX_INITIAL_START);
+ test_fail_if (!sta->rxce.tm_in_build);
+ } test_end;
+ END (sar_ctx, sta, ca);
+
+ test_case_begin (test, "One 1-PB frame");
+ START (&sar_ctx, &sta, &ca);
+ run_one_reassembly (sar_ctx, 1);
+ cyg_thread_delay (3); //rxce can process
+ test_begin (test, "check rxce status")
+ {
+ test_fail_if (sta->rx_tonemaps->default_tmi != TONEMAP_INDEX_INITIAL_START);
+ test_fail_if (!sta->rxce.tm_in_build);
+ } test_end;
+ END (sar_ctx, sta, ca);
+
+ test_case_begin (test, "One 200-PB frame");
+ START (&sar_ctx, &sta, &ca);
+ run_one_reassembly (sar_ctx, 200);
+ cyg_thread_delay (1); //rxce can process
+ test_begin (test, "check rxce status")
+ {
+ test_fail_if (sta->rx_tonemaps->default_tmi != TONEMAP_INDEX_INITIAL_START);
+ test_fail_if (!sta->rxce.tm_in_build);
+ } test_end;
+ END (sar_ctx, sta, ca);
+
+ test_case_begin (test, "Several sound frames processed one by one");
+ START (&sar_ctx, &sta, &ca);
+ test_begin (test, "check rxce status")
+ {
+ for (n=0; n<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP+10; n++)
+ {
+ run_one_reassembly (sar_ctx, 0);
+ cyg_thread_delay (3); //rxce can process
+ tmi_null = sta->rx_tonemaps->default_tmi == TONEMAP_INDEX_INITIAL_START;
+ tmp_exists = (int) sta->rxce.tm_in_build;
+ test_fail_if (n<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmi_null);
+ test_fail_if (n<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmp_exists);
+ test_fail_if (n>=FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && tmi_null);
+ test_fail_if (n==FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && tmp_exists);
+ test_fail_if (n>FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmp_exists);
+ }
+ } test_end;
+ END (sar_ctx, sta, ca);
+
+ test_case_begin (test, "Several sound frames and rxce late");
+ START (&sar_ctx, &sta, &ca);
+ test_begin (test, "check rxce status")
+ {
+ for (n=0; n<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP+10; n++)
+ {
+ run_one_reassembly (sar_ctx, 0);
+ if (n == FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP -5 )
+ {
+ cyg_thread_delay (3); //rxce can process
+ uint frame_nb = sta->rxce.measurement_computed_nb-1;
+ tmi_null = sta->rx_tonemaps->default_tmi == TONEMAP_INDEX_INITIAL_START;
+ tmp_exists = (int) sta->rxce.tm_in_build;
+ //my_print ("%d, tmi_null=%d, tmp_exists=%d\n",frame_nb, tmi_null, tmp_exists);
+ test_fail_if (frame_nb<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmi_null);
+ test_fail_if (frame_nb<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmp_exists);
+ test_fail_if (frame_nb>=FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && tmi_null);
+ test_fail_if (frame_nb==FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && tmp_exists);
+ test_fail_if (frame_nb>FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmp_exists);
+ }
+ if (n == FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP )
+ {
+ cyg_thread_delay (3); //rxce can process
+ uint frame_nb = sta->rxce.measurement_computed_nb-1;
+ tmi_null = sta->rx_tonemaps->default_tmi == TONEMAP_INDEX_INITIAL_START;
+ tmp_exists = (int) sta->rxce.tm_in_build;
+ //my_print ("%d, tmi_null=%d, tmp_exists=%d\n",frame_nb, tmi_null, tmp_exists);
+ test_fail_if (frame_nb<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmi_null);
+ test_fail_if (frame_nb<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmp_exists);
+ test_fail_if (frame_nb>=FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && tmi_null);
+ test_fail_if (frame_nb==FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && tmp_exists);
+ test_fail_if (frame_nb>FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmp_exists);
+ }
+ if (n == FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP + 5 -1 )
+ {
+ cyg_thread_delay (3); //rxce can process
+ uint frame_nb = sta->rxce.measurement_computed_nb-1;
+ tmi_null = sta->rx_tonemaps->default_tmi == TONEMAP_INDEX_INITIAL_START;
+ tmp_exists = (int) sta->rxce.tm_in_build;
+ //my_print ("%d, tmi_null=%d, tmp_exists=%d\n",frame_nb, tmi_null, tmp_exists);
+ test_fail_if (frame_nb<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmi_null);
+ test_fail_if (frame_nb<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmp_exists);
+ test_fail_if (frame_nb>=FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && tmi_null);
+ test_fail_if (frame_nb==FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && tmp_exists);
+ test_fail_if (frame_nb>FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmp_exists);
+ }
+ cyg_thread_delay (3); //rxce can process
+ }
+ } test_end;
+ END (sar_ctx, sta, ca);
+
+ mac_store_uninit (mac_store_ctx);
+ rxce_trace_print (rxce_ctx);
+ rxce_trace_uninit (rxce_ctx);
+ trace_uninit();
+ blk_release (phy);
+ test_begin (test, "check alloc/free")
+ {
+ test_fail_unless (blk_check_memory());
+ } test_end;
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+}
+
+void
+cyg_user_start (int argc, char **argv)
+ {
+ test_init (test, argc, argv);
+ trace_init();
+ phy = (phy_t *) blk_alloc();
+ mac_ntb_init (phy, &mac_config);
+
+ tonemask_default ((u8 *)(&(mac_config.tonemask_info.tonemask)));
+ mac_store_ctx = mac_store_init ();
+ sar_t *sar = blk_alloc();
+ rxce_ctx = rxce_init (sar, mac_store_ctx, &mac_config);
+ cyg_thread_create (RXCE_PRIORITY, &rxce_process,(cyg_addrword_t) rxce_ctx, "rxce",
+ rxce_stack, CYGNUM_HAL_STACK_SIZE_TYPICAL,
+ &rxce_handle, &rxce_thread);
+ cyg_thread_resume (rxce_handle);
+ cyg_thread_create (FRAME_PRIORITY, &frame_process, 0, "frame_test",
+ frame_stack, CYGNUM_HAL_STACK_SIZE_TYPICAL,
+ &frame_handle, &frame_thread);
+ cyg_thread_resume (frame_handle);
+ blk_release (sar);
+
+}
+
+
diff --git a/cesar/ce/test/rx/general/target-Makefile b/cesar/ce/test/rx/general/target-Makefile
new file mode 100644
index 0000000000..96f9d8b9d4
--- /dev/null
+++ b/cesar/ce/test/rx/general/target-Makefile
@@ -0,0 +1,26 @@
+BASE = ../../../..
+
+INCLUDES = ce/test/rx/
+INCLUDES += ce/test/rx/general
+INCLUDES += ce/test/rx/general/overide
+INCLUDES += ce/test/common
+
+ECOS = y
+DEFS=-DSAR_UNIT_TEST=1
+
+TARGET_PROGRAMS=test_rx_target_ecos_synth
+test_rx_target_ecos_synth_SOURCES = test_rx.c
+test_rx_target_ecos_synth_MODULES = lib mac/common ce ce/test/common ce/test/rx/general/overide/cp/interf mac/sar mac/sar/test mac/pbproc mac/sar/bridgedma
+TARGET_PROGRAMS += test_sar_target_ecos_synth
+test_sar_target_ecos_synth_SOURCES = test_sar_integration.c
+test_sar_target_ecos_synth_MODULES = lib mac/sar ce mac/common mac/sar/bridgedma mac/pbproc mac/sar/test ce/test/common ce/test/rx/general/overide/cp/interf
+mac_pbproc_MODULE_SOURCES = mfs.c
+
+
+#ce_MODULE_SOURCES = bitloading.c cei_param.c mpdu_measure_store.c rx.c trace.c
+#ce_test_common_MODULE_SOURCES = print_utils.c
+
+VARIANT = target
+
+include $(BASE)/common/make/top.mk
+
diff --git a/cesar/ce/test/rx/general/target-ecos.ecc.sh b/cesar/ce/test/rx/general/target-ecos.ecc.sh
new file mode 100755
index 0000000000..2443d0e40f
--- /dev/null
+++ b/cesar/ce/test/rx/general/target-ecos.ecc.sh
@@ -0,0 +1,5 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new linux default
+cat >> $config <<'EOF'
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/ce/test/rx/host_linux_sparc/Makefile b/cesar/ce/test/rx/host_linux_sparc/Makefile
new file mode 100755
index 0000000000..7c653a0e09
--- /dev/null
+++ b/cesar/ce/test/rx/host_linux_sparc/Makefile
@@ -0,0 +1,17 @@
+BASE = ../../../..
+
+CC=sparc-linux-gcc
+INCLUDES=ce/test/rx
+INCLUDES+=ce/test/rx/host_linux_sparc
+
+EXTRA_HOST_CFLAGS=-O3
+EXTRA_HOST_LDFLAGS=-lm
+HOST_PROGRAMS = test_speed_host_linux_sparc
+test_speed_host_linux_sparc_SOURCES = test_speed.c
+test_speed_host_linux_sparc_MODULES = lib mac/common ce ce/test/common
+
+ce_MODULE_SOURCES = cei_param.c mpdu_measure_store.c bitloading.c
+ce_test_common_MODULE_SOURCES = print_utils.c
+
+include $(BASE)/common/make/top.mk
+
diff --git a/cesar/ce/test/rx/host_linux_sparc/src/test_speed.c b/cesar/ce/test/rx/host_linux_sparc/src/test_speed.c
new file mode 100644
index 0000000000..a469d1e557
--- /dev/null
+++ b/cesar/ce/test/rx/host_linux_sparc/src/test_speed.c
@@ -0,0 +1,152 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ./src/test_speed.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#include "common/std.h"
+#include "sys/time.h"
+#include "stdio.h"
+#include "string.h"
+#include "ce/inc/mpdu_measure_store.h"
+#include "mac/common/tonemap.h"
+#include "ce/test/common/print_utils.h"
+#include "lib/bitstream.h"
+#define RXCE
+#include "ce/inc/cei.h"
+#include "math.h"
+
+
+int
+main (int argc, char **argv)
+{
+ struct timeval tv0, tv1;
+ uint word = 0x76543210;
+ uint i, test;
+ int nibble;
+ bitstream_t stream_writer;
+ gettimeofday (&tv0, NULL);
+ gettimeofday (&tv1, NULL);
+ printf ("getitmeofday duration %d\n",(int) (tv1.tv_usec - tv0.tv_usec));
+ gettimeofday (&tv0, NULL);
+ for (test=0; test<1000; test++)
+ {
+ word = 0;
+ for (i=0; i<8; i++)
+ {
+ nibble = i+1;
+ word = (word >> 4) | (nibble << 28);
+ }
+ }
+ gettimeofday (&tv1, NULL);
+ printf ("nibble to u32 duration test1 %d /1000\n",(int) (tv1.tv_usec - tv0.tv_usec));
+
+ gettimeofday (&tv0, NULL);
+ for (test=0; test<1000; test++)
+ {
+ word = 0;
+ for (i=0; i<8; i++)
+ {
+ nibble = i+1;
+ word = word | (nibble << (i<<2));
+ }
+ }
+ gettimeofday (&tv1, NULL);
+ printf ("nibble to u32 duration test2 %d /1000\n",(int) (tv1.tv_usec - tv0.tv_usec));
+
+ frame_measurement_init ();
+
+ uint noise = 0;
+ gettimeofday (&tv0, NULL);
+ update_threshold (1, 1);
+ for (i=0; i<1536; i++)
+ {
+ noise2mod (noise);
+ }
+ gettimeofday (&tv1, NULL);
+ printf ("noise2mod duration --worst : %d\n",(int) (tv1.tv_usec - tv0.tv_usec));
+
+ noise = 10000;
+ gettimeofday (&tv0, NULL);
+ update_threshold (1, 1);
+ for (i=0; i<1536; i++)
+ {
+ noise2mod (noise);
+ }
+ gettimeofday (&tv1, NULL);
+ printf ("noise2mod duration --best : %d\n",(int) (tv1.tv_usec - tv0.tv_usec));
+
+
+ gettimeofday (&tv0, NULL);
+ blk_t *blk = blk_alloc_desc ();
+ gettimeofday (&tv1, NULL);
+ printf ("first blk allocation duration : %d\n",(int) (tv1.tv_usec - tv0.tv_usec));
+ blk_release_desc (blk);
+ gettimeofday (&tv0, NULL);
+ blk = blk_alloc_desc ();
+ gettimeofday (&tv1, NULL);
+ printf ("second blk allocation duration : %d\n",(int) (tv1.tv_usec - tv0.tv_usec));
+ blk_release_desc (blk);
+
+ blk_t *blk_last;
+ gettimeofday (&tv0, NULL);
+ blk_t *blk_first = blk_alloc_desc_range (10, &blk_last);
+ gettimeofday (&tv1, NULL);
+ printf ("multi-blk allocation duration (10) : %d\n",(int) (tv1.tv_usec - tv0.tv_usec));
+ blk_release_desc_range (blk_first, blk_last);
+
+
+ phy_chandata_t *last, *browser;
+ phy_chandata_t *first = (phy_chandata_t *) blk_alloc_desc_range (PHY_CHANDATA_NRJ_BLK_NB, (blk_t **) &last);
+ last->last = 1;
+ last->blk.next = NULL;
+ browser = first;
+ noise = 0;
+ int j, k=0;
+ u32 * data = (u32 * ) browser->blk.data;
+ for (i=0; i<PHY_CHANDATA_NRJ_BLK_NB; i++)
+ {
+ for (j=0; j<BLK_SIZE/4; j++)
+ {
+ data[j] = (THR3[1][k%7]) | ((THR3[1][(k+1)%7])<<16);
+ k+=2;
+ }
+ browser = (phy_chandata_t *) (browser->blk.next);
+ if (browser) data = (u32 * ) browser->blk.data;
+ }
+ tonemap_t *worst_tonemap = NULL;
+ gettimeofday (&tv0, NULL);
+ compute_worst_tonemap (&worst_tonemap, first);
+ gettimeofday (&tv1, NULL);
+ printf ("default tonemap computation duration : %d\n",(int) (tv1.tv_usec - tv0.tv_usec));
+ ce_print_tonemap (worst_tonemap);
+ blk_release_desc_range ((blk_t *) first, (blk_t *)last);
+
+ u8 buf[1536];
+ for (i=0; i<1536; i++) buf[i] = 0x00;
+ u8 mask[(PHY_CARRIER_NB+7)/8];
+ for (i=0; i<(PHY_CARRIER_NB+7)/8; i++) mask[i] = 0xFF;
+ mask[i-1] = ((1<<(PHY_CARRIER_NB%8))-1);
+ uint entry_nb;
+ gettimeofday (&tv0, NULL);
+ for (test=0; test<100; test++)
+ {
+ bitstream_init (&stream_writer, buf, 1518, BITSTREAM_WRITE);
+ entry_nb = cei_encode_tm (&stream_writer, worst_tonemap->tmdma_desc_head, mask);
+ }
+ gettimeofday (&tv1, NULL);
+ printf ("cei building duration : %d\n",(int) (tv1.tv_usec - tv0.tv_usec));
+
+ tonemap_free (worst_tonemap);
+ return 0;
+}
+
diff --git a/cesar/ce/test/rx/inc/test_rx.h b/cesar/ce/test/rx/inc/test_rx.h
new file mode 100755
index 0000000000..dc8ee6f637
--- /dev/null
+++ b/cesar/ce/test/rx/inc/test_rx.h
@@ -0,0 +1,37 @@
+#ifndef __test_rx_h
+#define __test_rx_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ./test_rx.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+BEGIN_DECLS
+
+typedef void (*pbproc_need_scf_cb_t) (uint tei, uint src);
+pbproc_need_scf_cb_t need_scf_cb;
+
+void
+pbproc_rxce_init (pbproc_need_scf_cb_t need_scf);
+
+void
+pbproc_scf (void);
+
+void
+over_pbproc_init(void);
+
+bool
+pbproc_send_scf (void);
+
+END_DECLS
+
+#endif /* __test_rx_h */
diff --git a/cesar/ce/test/rx/maximus/Makefile b/cesar/ce/test/rx/maximus/Makefile
new file mode 100644
index 0000000000..ba5c632834
--- /dev/null
+++ b/cesar/ce/test/rx/maximus/Makefile
@@ -0,0 +1,21 @@
+all :
+ $(MAKE) -C ../../../../maximus/python --no-print-directory
+
+BASE = ../../../..
+INCLUDES = ce/test/rx/maximus/overide
+INCLUDES += ce/test/rx/maximus
+INCLUDES += ce/test/rx/general/overide
+INCLUDES += ce/test/common
+ECOS = y
+DEFS=-DSAR_UNIT_TEST=1
+
+EXTRA_TARGET_CFLAGS=-DMAXIMUS_TEST -DRXCE_WITH_SAR
+TARGET_PROGRAMS = test_rx
+test_rx_SOURCES = test_rx.c
+test_rx_MODULES=lib host mac/common hal/phy/maximus mac/sar ce ce/test/rx/maximus/overide/mac/pbproc ce/test/rx/general/overide/cp/interf ce/test/common
+
+ce_MODULE_SOURCES = cei_param.c mpdu_measure_store.c rx.c trace.c bitloading.c
+
+
+include $(BASE)/common/make/top.mk
+
diff --git a/cesar/ce/test/rx/maximus/ecos.ecc.sh b/cesar/ce/test/rx/maximus/ecos.ecc.sh
new file mode 100644
index 0000000000..19597e4621
--- /dev/null
+++ b/cesar/ce/test/rx/maximus/ecos.ecc.sh
@@ -0,0 +1,104 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new maximus default
+cat >> $config <<'EOF'
+cdl_option CYGPKG_HAL_MAXIMUS_CFLAGS_ADD {
+ user_value "-I\$(BASE) -I\$(OBJ_DIR)/inc"
+ # value_source user
+ # Default value: "-I\$(REPOSITORY)/../.."
+}
+cdl_option CYGBLD_GLOBAL_CFLAGS {
+ user_value "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -finline"
+ # value_source user
+ # Default value: "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority"
+}
+cdl_option CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT {
+ user_value 0
+ inferred_value 0
+}
+cdl_option CYGBLD_ISO_CTYPE_HEADER {
+ inferred_value 1 <cyg/libc/i18n/ctype.inl>
+}
+cdl_option CYGBLD_ISO_ERRNO_CODES_HEADER {
+ inferred_value 1 <cyg/error/codes.h>
+}
+cdl_option CYGBLD_ISO_ERRNO_HEADER {
+ inferred_value 1 <cyg/error/errno.h>
+}
+cdl_option CYGBLD_ISO_STDIO_FILETYPES_HEADER {
+ inferred_value 1 <cyg/libc/stdio/stdio.h>
+}
+cdl_option CYGBLD_ISO_STDIO_STREAMS_HEADER {
+ inferred_value 1 <cyg/libc/stdio/stdio.h>
+}
+cdl_option CYGBLD_ISO_STDIO_FILEOPS_HEADER {
+ inferred_value 1 <cyg/libc/stdio/stdio.h>
+}
+cdl_option CYGBLD_ISO_STDIO_FILEACCESS_HEADER {
+ inferred_value 1 <cyg/libc/stdio/stdio.h>
+}
+cdl_option CYGBLD_ISO_STDIO_FORMATTED_IO_HEADER {
+ inferred_value 1 <cyg/libc/stdio/stdio.h>
+}
+cdl_option CYGBLD_ISO_STDIO_CHAR_IO_HEADER {
+ inferred_value 1 <cyg/libc/stdio/stdio.h>
+}
+cdl_option CYGBLD_ISO_STDIO_DIRECT_IO_HEADER {
+ inferred_value 1 <cyg/libc/stdio/stdio.h>
+}
+cdl_option CYGBLD_ISO_STDIO_FILEPOS_HEADER {
+ inferred_value 1 <cyg/libc/stdio/stdio.h>
+}
+cdl_option CYGBLD_ISO_STDIO_ERROR_HEADER {
+ inferred_value 1 <cyg/libc/stdio/stdio.h>
+}
+cdl_option CYGBLD_ISO_STDLIB_STRCONV_HEADER {
+ inferred_value 1 <cyg/libc/stdlib/atox.inl>
+}
+cdl_option CYGBLD_ISO_STDLIB_ABS_HEADER {
+ inferred_value 1 <cyg/libc/stdlib/abs.inl>
+}
+cdl_option CYGBLD_ISO_STDLIB_DIV_HEADER {
+ inferred_value 1 <cyg/libc/stdlib/div.inl>
+}
+cdl_option CYGBLD_ISO_STRERROR_HEADER {
+ inferred_value 1 <cyg/error/strerror.h>
+}
+cdl_option CYGBLD_ISO_STRTOK_R_HEADER {
+ inferred_value 1 <cyg/libc/string/string.h>
+}
+cdl_option CYGBLD_ISO_STRING_LOCALE_FUNCS_HEADER {
+ inferred_value 1 <cyg/libc/string/string.h>
+}
+cdl_option CYGBLD_ISO_STRING_BSD_FUNCS_HEADER {
+ inferred_value 1 <cyg/libc/string/bsdstring.h>
+}
+cdl_option CYGBLD_ISO_STRING_MEMFUNCS_HEADER {
+ inferred_value 1 <cyg/libc/string/string.h>
+}
+cdl_option CYGBLD_ISO_STRING_STRFUNCS_HEADER {
+ inferred_value 1 <cyg/libc/string/string.h>
+}
+cdl_option CYGBLD_ISO_C_TIME_TYPES_HEADER {
+ inferred_value 1 <cyg/libc/time/time.h>
+}
+cdl_option CYGBLD_ISO_C_CLOCK_FUNCS_HEADER {
+ inferred_value 1 <cyg/libc/time/time.h>
+}
+cdl_option CYGBLD_ISO_SIGNAL_NUMBERS_HEADER {
+ inferred_value 1 <cyg/libc/signals/signal.h>
+}
+cdl_option CYGBLD_ISO_SIGNAL_IMPL_HEADER {
+ inferred_value 1 <cyg/libc/signals/signal.h>
+}
+cdl_option CYGBLD_ISO_SETJMP_HEADER {
+ inferred_value 1 <cyg/libc/setjmp/setjmp.h>
+}
+cdl_option CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE {
+ user_value 16384
+ inferred_value 16384
+}
+cdl_option CYGSEM_ERROR_PER_THREAD_ERRNO {
+ user_value 0
+}
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/ce/test/rx/maximus/overide/mac/pbproc/Module b/cesar/ce/test/rx/maximus/overide/mac/pbproc/Module
new file mode 100644
index 0000000000..e9f0167e68
--- /dev/null
+++ b/cesar/ce/test/rx/maximus/overide/mac/pbproc/Module
@@ -0,0 +1 @@
+SOURCES := pbproc.c
diff --git a/cesar/ce/test/rx/maximus/overide/mac/pbproc/pbproc.h b/cesar/ce/test/rx/maximus/overide/mac/pbproc/pbproc.h
new file mode 100644
index 0000000000..57d28489fa
--- /dev/null
+++ b/cesar/ce/test/rx/maximus/overide/mac/pbproc/pbproc.h
@@ -0,0 +1,145 @@
+#ifndef overide_pbproc_h
+#define overide_pbproc_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file overide/pbproc.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "host/station.h"
+#include "hal/phy/maximus/inc/maximus_phy_ctx.h" // 'phy_t'
+#include "mac/common/mfs.h"
+#include "mac/common/pb.h"
+#include "mac/ca/ca.h"
+
+
+struct pbproc_rx_params_t
+{
+ /** Preamble start NTB. */
+ u32 preamble_ntb;
+ /** TEI of the transmitter. */
+ u8 tei;
+ /** Link ID of this MPDU. */
+ u8 lid;
+ /** Short network identifier. */
+ uint snid:4;
+ /** Whether this is a multicast frame. */
+ bool bcast:1;
+ /** Multi-network broadcast flag. */
+ bool multi_net_bcast:1;
+ /** Network encryption key select. */
+ uint eks:4;
+ /** Pending PB. */
+ uint pending_seg_nb:8;
+ /** Bit loading estimate. */
+ uint ble:8;
+ /** Tone map index. */
+ uint tmi_av:5;
+ /** Beacon detect flag. */
+ bool bdf:1;
+ /** Homeplug 1.0.1 detect flag. */
+ bool hp10df:1;
+ /** Homeplug 1.1 detect flag. */
+ bool hp11df:1;
+};
+typedef struct pbproc_rx_params_t pbproc_rx_params_t;
+
+typedef void (*pbproc_rx_cb_t) (void *user, mfs_t *mfs, mfs_t *mfs_mme,
+ const pbproc_rx_params_t *rx_params,
+ pb_t *pb_first, pb_t *pb_last,
+ uint pb_nb, pb_t *chandata_first, uint chandata_nb);
+
+struct pbproc_t
+{
+ pbproc_rx_cb_t rx_cb;
+ mac_config_t *config;
+};
+typedef struct pbproc_t pbproc_t;
+
+struct pbproc_rx_beacon_params_t
+{
+ /** Preamble start NTB. */
+ u32 preamble_ntb;
+ /** Beacon Time Stamp. */
+ u32 bts;
+ /** Beacon Transmission Offset. */
+ u16 bto[4];
+ /** Short network identifier. */
+ u8 snid;
+};
+typedef struct pbproc_rx_beacon_params_t pbproc_rx_beacon_params_t;
+
+typedef void (*pbproc_rx_beacon_cb_t) (void *user, pb_beacon_t *pb,
+ pbproc_rx_beacon_params_t *params);
+
+typedef struct pbproc_tx_beacon_params_t pbproc_tx_beacon_params_t;
+
+BEGIN_DECLS
+
+bool phy_rx_fc_cb (void *user, u32 rx_date, const u32 *fc_av);
+
+bool phy_access_cb (void *user);
+
+bool phy_access_conf_cb (void *user);
+
+bool phy_pbdma_cb (void *user, u32 status_word);
+
+void phy_deferred_cb (void *user);
+
+bool phy_extra_timer_cb (void *user);
+
+int set_tonemask (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data);
+
+int prepare_rx (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data);
+
+pbproc_t *
+pbproc_init (mac_config_t *config, mac_store_t *store);
+
+void
+pbproc_init_cb (pbproc_t *ctx, void *user_data, pbproc_rx_cb_t rx_cb, pbproc_rx_beacon_cb_t rx_beacon_cb);
+
+void
+pbproc_uninit (pbproc_t *ctx);
+
+void
+pbproc_rx_segment_refill (pbproc_t *ctx, pb_t *first, pb_t *last,
+ uint nb);
+
+pb_t *
+pbproc_mfs_extract_tail (mfs_tx_t *mfs);
+
+void
+pbproc_mfs_insert (mfs_tx_t *mfs, pb_t *first, pb_t *last, uint nb, uint cap);
+
+void
+pbproc_mfs_provide (mfs_tx_t *mfs, uint nb);
+
+/** set SCF in pbproc ctx */
+void
+pbproc_scf (void);
+
+void
+pbproc_set_config (mac_config_t *config);
+
+
+bool
+ca_mfs_remove (ca_t *ctx, mfs_tx_t *mfs);
+
+void
+ca_mfs_update (ca_t *ctx, mfs_tx_t *mfs);
+
+void
+pbproc_mfs_beacon_prepare (pbproc_t *ctx, mfs_tx_t *mfs, pb_beacon_t *pb,
+ const pbproc_tx_beacon_params_t *params);
+
+END_DECLS
+
+#endif /* overide_pbproc_h */
diff --git a/cesar/ce/test/rx/maximus/overide/mac/pbproc/src/pbproc.c b/cesar/ce/test/rx/maximus/overide/mac/pbproc/src/pbproc.c
new file mode 100644
index 0000000000..3801433efa
--- /dev/null
+++ b/cesar/ce/test/rx/maximus/overide/mac/pbproc/src/pbproc.c
@@ -0,0 +1,261 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ./overide/src/pbproc.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include <cyg/infra/diag.h>
+#include "common/std.h"
+#include "mac/pbproc/pbproc.h"
+#include "mac/common/tonemask.h"
+#include "hal/phy/maximus/dur/inc/maximus_dur.h"
+#include "ce/test/common/print_utils.h"
+#include "mac/common/ntb.h"
+
+phy_t * phy_ctx;
+int user_data = 123;
+bool short_ppdu = false;
+unsigned short mod = 0;
+unsigned short fecrate = 0;
+unsigned short pb_size = 0;
+unsigned short gil = 0;
+//u8 tonemask[(PHY_CARRIER_NB+7)/8];
+
+static pbproc_t pbproc_global;
+phy_chandata_t *rx_chandata_first;
+phy_pb_t *rx_pb_first;
+phy_pb_t *rx_pb_last;
+uint rx_pb_nb;
+pbproc_rx_params_t rx_params;
+void *sar_ctx;
+uint rx_symbol_nb;
+uint rx_chandata_nb;
+
+bool phy_rx_fc_cb (void *user, u32 rx_date, const u32 *fc_av)
+{
+ // When the FC is received, prepare RX
+ rx_symbol_nb = maximus_dur_symbol_nb ((phy_fecrate_t) fecrate,
+ (phy_pb_size_t) pb_size,
+ maximus_dur_bits_per_symbol ( (phy_mod_t) mod,
+ pbproc_global.config->tonemask_info.tonemask,
+ NULL,
+ maximus_dur_carrier_nb (pbproc_global.config->tonemask_info.tonemask)
+ ),
+ rx_pb_nb
+ );
+
+
+ ce_print ("phy_rx_fc_cb ******* symbol NB = %d\n",rx_symbol_nb);
+ phy_rx_prepare(phy_ctx, short_ppdu, (phy_mod_t)mod,
+ (phy_fecrate_t)fecrate, (phy_pb_size_t)pb_size, (phy_gil_t)gil,
+ 0 /* tonemap_index */, rx_symbol_nb);
+
+ return true;
+}
+
+bool phy_access_cb (void *user)
+{
+ return true;
+}
+
+bool phy_access_conf_cb (void *user)
+{
+ return true;
+}
+
+bool phy_pbdma_cb (void *user, u32 status_word)
+{
+ ce_print ("phy_pbdma_cb ******* PB NB = %d\n",rx_pb_nb);
+ phy_pbdma_status_t status = *(phy_pbdma_status_t *)&status_word;
+ rx_params.tei = 1;
+ rx_params.lid = 0;
+ if (1 == status.end_chandata)
+ {
+ pbproc_global.rx_cb (sar_ctx, NULL, NULL, &rx_params, (pb_t *) rx_pb_first,(pb_t *) rx_pb_last, rx_pb_nb,(pb_t *) rx_chandata_first, rx_chandata_nb);
+ }
+ return true;
+}
+
+bool phy_tx_false_alarm_cb (void *user)
+{
+ return true;
+}
+
+void phy_deferred_cb (void *user)
+{
+ return;
+}
+
+bool phy_extra_timer_cb (void *user)
+{
+ return true;
+}
+
+int prepare_rx (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
+{
+ unsigned short fc_mode = 0;
+ unsigned short pb_nb = 0;
+ int i = 0;
+ u32 iv[3];
+ u32 nek[4];
+
+ phy_pb_t *pb_last;
+ phy_pb_t *pb_first;
+
+ ce_print("=> prepare_rx\n");
+
+ /* get parameters content */
+ fcall_param_bind_short(*param, *msg, "fc_mode", &fc_mode);
+ fcall_param_bind(*param, *msg, "short_ppdu", sizeof(bool), &short_ppdu);
+ fcall_param_bind_short(*param, *msg, "mod", &mod);
+ fcall_param_bind_short(*param, *msg, "fecrate", &fecrate);
+ fcall_param_bind_short(*param, *msg, "pb_size", &pb_size);
+ fcall_param_bind_short(*param, *msg, "gil", &gil);
+ fcall_param_bind_short(*param, *msg, "pb_nb", &pb_nb);
+
+ dbg_assert (pb_nb);
+ pb_first = (phy_pb_t *) blk_alloc_desc_range (pb_nb, (blk_t **) &pb_last);
+ pb_last->blk.next = NULL;
+
+ // Activate RX
+ phy_rx_activate(phy_ctx, true /* now */, my_station.current_tick_tck, true /* pre_detection */);
+
+ // Set RX parameters
+ phy_rx_param(phy_ctx, (phy_fc_mode_t)fc_mode);
+
+ for (i=0; i<3; i++)
+ {
+ iv[i] = i;
+ }
+ for (i=0; i<4; i++)
+ {
+ nek[i] = i;
+ }
+ phy_pbdma_start(phy_ctx, true /* bypass_aes */, iv,
+ nek, (uint)pb_nb /* nb_total */, (uint)pb_nb /* nb_ready */,
+ (uint)pb_nb /* nb_pb_it */, pb_first);
+
+ phy_chandata_t *time_noise = (phy_chandata_t *) blk_alloc_desc();
+ time_noise->blk.next = NULL;
+ time_noise->last=0;
+ time_noise->type = PHY_CHANDATA_TYPE_NRJ_SYMBOL;
+ time_noise->size = (pb_nb * sizeof(phy_noise_energy_t)+ 3)/4;
+
+ phy_chandata_t *last_chan;
+ phy_chandata_t *freq_noise = (phy_chandata_t *) blk_alloc_desc_range(mpdu_measure_chandata_blk_nb[PHY_CHANDATA_TYPE_NRJ], (blk_t **) &last_chan);
+ last_chan->blk.next = NULL;
+ last_chan->last = 1;
+ last_chan->type = PHY_CHANDATA_TYPE_NRJ;
+ last_chan->size = ((PHY_CARRIER_NB*sizeof(phy_noise_energy_t) % PHY_NOISE_NB_PER_BLK) + 3)/4;
+ phy_chandata_t *browser = freq_noise;
+ uint address=0;
+ while (browser != last_chan)
+ {
+ browser->last = 0;
+ browser->type = PHY_CHANDATA_TYPE_NRJ;
+ browser->size = 128;
+ browser->address = address;
+ browser = (phy_chandata_t *)browser->blk.next;
+ address+= 128;
+ }
+ last_chan->address = address;
+
+
+
+ /** registering reception status to be able to run pbproc_rx_cb that wake
+ * up the sar */
+ rx_pb_first = pb_first;
+ rx_pb_last = pb_last;
+ //rx_chandata_first = freq_noise;
+ //last_chan->blk.next = time_noise;
+ rx_chandata_first = time_noise;
+ time_noise->blk.next = (blk_t *) freq_noise;
+ rx_pb_nb = pb_nb;
+
+ ce_print_chandata (time_noise);
+ rx_chandata_nb = 6;
+
+ phy_pbdma_start_chandata(phy_ctx, time_noise);
+ //phy_pbdma_start_chandata(ctx, freq_noise);
+
+ /* now make the return parameter list */
+ fcall_param_reset(*param);
+
+ return 0;
+}
+
+pbproc_t *
+pbproc_init (mac_config_t *config, mac_store_t *store)
+{
+ pbproc_t *pbproc_ctx = &pbproc_global;
+ pbproc_ctx->config = config;
+ // Initialize the HAL PHY
+ phy_ctx = phy_init ((void *)&user_data, &phy_rx_fc_cb, &phy_access_cb, &phy_access_conf_cb, &phy_pbdma_cb, &phy_tx_false_alarm_cb, &phy_deferred_cb);
+ mac_ntb_init (phy_ctx, config);
+
+ // Enable assertions on warnings
+ phy_ctx->warning_assert = true;
+
+ // Set TONEMASK
+ phy_set_tonemask(phy_ctx, config->tonemask_info.tonemask, PHY_CARRIER_NB);
+ return(pbproc_ctx);
+}
+
+void
+pbproc_init_cb (pbproc_t *ctx, void *user_data, pbproc_rx_cb_t rx_cb, pbproc_rx_beacon_cb_t rx_beacon_cb)
+{
+ dbg_assert (ctx);
+ dbg_assert (rx_cb);
+ dbg_assert (rx_beacon_cb);
+ //ctx->user_data = user_data;
+ ctx->rx_cb = rx_cb;
+ //ctx->rx_beacon_cb = rx_beacon_cb;
+}
+
+void
+pbproc_rx_segment_refill (pbproc_t *ctx, pb_t *f, pb_t *l, uint nb)
+{
+ return;
+}
+
+pb_t *
+pbproc_mfs_extract_tail (mfs_tx_t *mfs) {return NULL;}
+
+void
+pbproc_mfs_insert (mfs_tx_t *mfs, pb_t *first, pb_t *last, uint nb, uint cap) {return;}
+
+void
+pbproc_mfs_provide (mfs_tx_t *mfs, uint nb) {return;}
+
+void
+pbproc_scf (void)
+{
+ return;
+}
+
+bool
+ca_mfs_remove (ca_t *ctx, mfs_tx_t *mfs)
+{
+ return true;
+}
+
+void
+ca_mfs_update (ca_t *ctx, mfs_tx_t *mfs)
+{
+
+}
+
+void
+pbproc_mfs_beacon_prepare (pbproc_t *ctx, mfs_tx_t *mfs, pb_beacon_t *pb,
+ const pbproc_tx_beacon_params_t *params)
+{
+ return;
+}
diff --git a/cesar/ce/test/rx/maximus/send_noise.py b/cesar/ce/test/rx/maximus/send_noise.py
new file mode 100644
index 0000000000..7c8666ce56
--- /dev/null
+++ b/cesar/ce/test/rx/maximus/send_noise.py
@@ -0,0 +1,102 @@
+#!/usr/bin/python
+
+#print __name__
+
+import sys
+
+maximus_path = '../../../../maximus'
+pos_maximus_path = -1
+for i in range(len(sys.argv)):
+ if sys.argv[i] == '--maximus_path':
+ pos_maximus_path = i
+ maximus_path = sys.argv[i+1]
+if pos_maximus_path > 0:
+ sys.argv = sys.argv[0:pos_maximus_path] + sys.argv[pos_maximus_path+2:len(sys.argv)]
+sys.path.append (maximus_path+'/python')
+sys.path.append (maximus_path+'/python/obj')
+
+from interface import *
+from maximus.macframe import *
+from maximus.macframe.msdu import MAX_SIZE_OF_MSDU
+from struct import *
+
+# Create and initializes Maximus
+maximus = Maximus()
+maximus.init(sys.argv)
+
+# Create a station
+sta = maximus.create_sta ()
+sta.debug()
+maximus.disturb_channel()
+
+pb_nb = 200
+frame_nb = 22
+
+ce_init_fcall = maximus.create_fcall ('ce_init')
+ce_init_fcall.send(sta)
+sar_start_fcall = maximus.create_fcall ('sar_start')
+sar_start_fcall.send(sta)
+
+ce_check_stock_fcall = maximus.create_fcall ('ce_check_stock')
+ce_check_stock_fcall.add_param_ushort ('frame_nb', frame_nb);
+ce_check_stock_fcall.add_param_ushort ('pb_nb', pb_nb);
+ce_start_fcall = maximus.create_fcall ('ce_start')
+ce_check_computation_fcall = maximus.create_fcall ('ce_check_computation')
+
+
+def prepare_rx_param_init():
+ prepare_rx_fcall = maximus.create_fcall('prepare_rx')
+ fc_mode = 2 # PHY_FC_MODE_AV_1
+ prepare_rx_fcall.add_param_ushort("fc_mode", fc_mode)
+ prepare_rx_fcall.add_param_bool("short_ppdu", False)
+ mod = 0 # PHY_MOD_ROBO
+ prepare_rx_fcall.add_param_ushort("mod", mod)
+ fecrate = 0 # PHY_FEC_RATE_1_2
+ prepare_rx_fcall.add_param_ushort("fecrate", fecrate)
+ pb_size = 1
+ prepare_rx_fcall.add_param_ushort("pb_size", pb_size)
+ gil = 1 # PHY_GIL_567
+ prepare_rx_fcall.add_param_ushort("gil", gil)
+ #pb_nb = 1
+ prepare_rx_fcall.add_param_ushort("pb_nb", pb_nb)
+ #prepare_rx_fcall.send(sta)
+ return prepare_rx_fcall
+
+test_result_fcall = maximus.create_fcall('test_result_get')
+
+queue = MACFrameQueue()
+queue.set_fc_av(pack('IIII', 0, 456, 789, 10))
+payload = 512*'X'+(pb_nb-1)*512*'Y'
+macframe_nb = (len(payload) + (MAX_SIZE_OF_MSDU-1)) / MAX_SIZE_OF_MSDU
+payload = payload[macframe_nb*6:]
+
+def create_msdu():
+ msdu = MACFrame()
+ msdu.set_macframeheader ('MF')
+ msdu.set_icv ('CRC0')
+ return msdu
+
+def send_queue():
+ for i in range (macframe_nb):
+ macFrame = create_msdu()
+ macFrame.set_msdu(payload[i*MAX_SIZE_OF_MSDU:min((i+1)*MAX_SIZE_OF_MSDU, len(payload))])
+ queue.add(macFrame)
+ queue.send(maximus)
+
+for i in range(frame_nb) :
+ prepare_rx_param_init().send(sta)
+ send_queue()
+
+ce_check_stock_fcall.send(sta)
+ce_start_fcall.send(sta)
+ce_check_computation_fcall.send(sta)
+
+maximus.wait(10000000)
+
+res = test_result_fcall.send(sta)
+result = res.bind_param_ushort ("test_result")
+#print "test has returned ", hex(result)
+sta.remove()
+
+sys.exit(result)
+
diff --git a/cesar/ce/test/rx/maximus/src/test_rx.c b/cesar/ce/test/rx/maximus/src/test_rx.c
new file mode 100644
index 0000000000..06ab584c51
--- /dev/null
+++ b/cesar/ce/test/rx/maximus/src/test_rx.c
@@ -0,0 +1,187 @@
+#include <cyg/infra/diag.h>
+#include "common/std.h"
+#include "host/station.h"
+#include "mac/pbproc/pbproc.h"
+#include "mac/sar/sar.h"
+#include "cyg/kernel/kapi.h"
+#include "cyg/hal/hal_arch.h"
+#include "ce/inc/rx.h"
+#include "ce/test/common/print_utils.h"
+#define TXCE
+#include "lib/test.h"
+#include "ce/test/common/tonemap_utils.h"
+#include "lib/trace.h"
+
+extern station_ctx_t my_station;
+test_t test;
+
+#define SAR_PRIORITY 14
+cyg_thread sar_thread;
+cyg_handle_t sar_handle;
+unsigned char sar_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+
+#define RXCE_PRIORITY 15
+cyg_thread rxce_thread;
+cyg_handle_t rxce_handle;
+unsigned char rxce_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+
+mac_store_t *mac_store_ctx;
+mac_config_t mac_config_ctx;
+sar_t *sar_ctx;
+sta_t *sta;
+ca_t *ca;
+rxce_t *rxce_ctx;
+
+bool
+local_sar_mpdu_measurement_cb (void *user, pbproc_rx_params_t *rx_params,
+ uint pb_nb, blk_t **f, blk_t **l, pb_t *noise, uint chandata_nb)
+{
+
+ uint i,j;
+ diag_printf ("pb_nb = %d\n",pb_nb);
+ diag_printf ("noise @Ox%x\n",(unsigned int) noise);
+ phy_chandata_t *chandata = (phy_chandata_t *) noise;
+ phy_noise_energy_t *data_noise;
+ for (i=0;
+ i < mpdu_measure_chandata_blk_nb[PHY_CHANDATA_TYPE_NRJ] +
+ mpdu_measure_chandata_blk_nb[PHY_CHANDATA_TYPE_NRJ_SYMBOL];
+ i++)
+ {
+ diag_printf ("chandata%d @0x%x : type=%d size=%d last=%d\n", i,
+ (uint) chandata,
+ chandata->type,
+ chandata->size,
+ chandata->last);
+ data_noise = (phy_noise_energy_t *) chandata->blk.data;
+ for (j=0; j<PHY_NOISE_NB_PER_BLK; j++)
+ {
+ diag_printf ("0x%x ",*data_noise);
+ data_noise++;
+ }
+ diag_printf ("\n");
+
+ chandata = (phy_chandata_t *) chandata->blk.next;
+ }
+
+ return true;
+}
+
+void
+sar_start (void)
+{
+ mac_store_sta_add (mac_store_ctx, 1);
+ sta = mac_store_sta_get (mac_store_ctx, 1);
+ cyg_thread_create (SAR_PRIORITY, &sar_process, (cyg_addrword_t)sar_ctx, "sar_test",
+ sar_stack, CYGNUM_HAL_STACK_SIZE_TYPICAL,
+ &sar_handle, &sar_thread);
+ cyg_thread_resume (sar_handle);
+}
+
+void
+sar_end (void)
+{
+ blk_release (sta); // release reference to sta added by mac_store_mfs_get in START.
+ dbg_check (mac_store_sta_remove (mac_store_ctx, 1));
+ blk_release(ca);
+ sar_uninit (sar_ctx);
+}
+
+void
+ce_init (void)
+{
+ pbproc_t *pbproc_ctx = pbproc_init (&mac_config_ctx, mac_store_ctx);
+ ca = blk_alloc();
+ sar_ctx = sar_init (mac_store_ctx, pbproc_ctx, ca);
+ rxce_ctx = rxce_init (sar_ctx, mac_store_ctx, &mac_config_ctx);
+ cyg_thread_create (RXCE_PRIORITY, &rxce_process, (cyg_addrword_t) rxce_ctx, "rxce",
+ rxce_stack, CYGNUM_HAL_STACK_SIZE_TYPICAL,
+ &rxce_handle, &rxce_thread);
+}
+
+void
+ce_check_stock (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
+{
+ unsigned short pb_nb;
+ unsigned short fm_nb;
+ uint pb_ix, fm_ix;
+
+ fcall_param_bind_short(*param, *msg, "pb_nb", &pb_nb);
+ fcall_param_bind_short(*param, *msg, "frame_nb", &fm_nb);
+
+ test_begin (test, "check pb measurement")
+ {
+ mpdu_measure_store_t *measure_store_ctx = rxce_ctx->mpdu_measure_store_ctx;
+ dbg_assert (measure_store_ctx->measure_nb == fm_nb);
+ for (fm_ix=0; fm_ix<fm_nb; fm_ix++)
+ {
+ pb_measure_blk_t *ber_blk = measure_store_ctx->store[fm_ix].pb_head;
+ for (pb_ix=0; pb_ix<pb_nb; pb_ix++)
+ {
+ if (pb_ix == MPDU_MEASURE_PB_NB_PER_BLK)
+ {
+ ber_blk = ber_blk->next;
+ }
+ pb_measurement_t m = *(ber_blk->data+(pb_ix%MPDU_MEASURE_PB_NB_PER_BLK));
+ test_fail_if (m.halfit != 0x04);
+ test_fail_if ( m.ber != (1<< (pb_ix%16)) );
+ test_fail_if ( m.crc_error != (pb_ix%2) );
+ }
+ }
+ } test_end;
+ fcall_param_reset(*param);
+ return;
+}
+
+void
+ce_check_computation (void)
+{
+ sta_t *sta = mac_store_sta_get (mac_store_ctx, 1);
+ ce_print_tonemaps (sta->rx_tonemaps);
+ ce_print_tonemaps (sta->tx_tonemaps);
+
+ compare_tonemaps (test, sta->rx_tonemaps, sta->tx_tonemaps,
+ (u8 *)(&(mac_config_ctx.tonemask_info.tonemask)));
+ test_result (test);
+ return;
+}
+
+void
+ce_start (void)
+{
+ cyg_thread_resume (rxce_handle);
+}
+
+int
+test_result_get (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
+{
+ unsigned short result;
+ result = (test_nb_failed (test));
+ fcall_param_reset(*param);
+ fcall_param_add_short(*param, *msg, "test_result", &result);
+ return (result);
+}
+
+int main(void)
+{
+ trace_init();
+ test_init (test, 0, NULL);
+ test_case_begin (test, "RXCE-maximus");
+ station_log_set_level(&my_station, STATION_LOG_ERROR);
+ station_log_set_mask(&my_station, STATION_LOGTYPE_ALL);
+ my_station.pipe_log_fd = 1;
+ diag_write_string(" hello by eCos in maximus test\n");
+ fcall_register(my_station.fcall, "sar_start", (void*)&sar_start, NULL);
+ fcall_register(my_station.fcall, "ce_init", (void*)&ce_init, NULL);
+ fcall_register(my_station.fcall, "ce_check_stock", (void*)&ce_check_stock, NULL);
+ fcall_register(my_station.fcall, "ce_start", (void*)&ce_start, NULL);
+ fcall_register(my_station.fcall, "ce_check_computation", (void*)&ce_check_computation, NULL);
+ fcall_register(my_station.fcall, "prepare_rx", (void*)&prepare_rx, NULL);
+ fcall_register(my_station.fcall, "test_result_get", (void*)&test_result_get, NULL);
+
+ mac_config_init (&mac_config_ctx);
+
+ mac_store_ctx = mac_store_init ();
+
+ return 0;
+}
+
diff --git a/cesar/ce/test/rx/tonemap_refresh/Makefile b/cesar/ce/test/rx/tonemap_refresh/Makefile
new file mode 100644
index 0000000000..e0fe57d3b4
--- /dev/null
+++ b/cesar/ce/test/rx/tonemap_refresh/Makefile
@@ -0,0 +1,18 @@
+BASE = ../../../..
+
+INCLUDES = ce/test/rx
+INCLUDES += ce/test/rx/tonemap_refresh
+INCLUDES += ce/test/rx/general/overide
+INCLUDES += ce/test/common
+
+ECOS = y
+
+EXTRA_TARGET_CFLAGS=-DEXPIRATION_TEST
+TARGET_PROGRAMS=test_tonemaps_refresh_target_ecos_synth
+test_tonemaps_refresh_target_ecos_synth_SOURCES = test_tonemaps_refresh.c
+test_tonemaps_refresh_target_ecos_synth_MODULES = lib mac/common ce ce/test/common ce/test/rx/general/overide/cp/interf
+
+
+
+include $(BASE)/common/make/top.mk
+
diff --git a/cesar/ce/test/rx/tonemap_refresh/ecos.ecc.sh b/cesar/ce/test/rx/tonemap_refresh/ecos.ecc.sh
new file mode 100755
index 0000000000..2443d0e40f
--- /dev/null
+++ b/cesar/ce/test/rx/tonemap_refresh/ecos.ecc.sh
@@ -0,0 +1,5 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new linux default
+cat >> $config <<'EOF'
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/ce/test/rx/tonemap_refresh/src/test_tonemaps_refresh.c b/cesar/ce/test/rx/tonemap_refresh/src/test_tonemaps_refresh.c
new file mode 100644
index 0000000000..d6a7e2d296
--- /dev/null
+++ b/cesar/ce/test/rx/tonemap_refresh/src/test_tonemaps_refresh.c
@@ -0,0 +1,117 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ./src/test_tonemaps_expiration.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "lib/rnd.h"
+#include "lib/test.h"
+#include "ce/inc/rx.h"
+#include "ce/test/common/print_utils.h"
+#include "ce/inc/ecos_time.h"
+
+#define TEST_REFRESH_NUMBER 5000
+#define CPU_LOAD_PRIORITY 10
+cyg_thread cpu_load_thread;
+cyg_handle_t cpu_load_handle;
+unsigned char cpu_load_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+
+#define RXCE_PRIORITY 14
+cyg_thread rxce_thread;
+cyg_handle_t rxce_handle;
+unsigned char rxce_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+
+test_t test;
+mac_store_t *mac_store_ctx;
+mac_config_t mac_config;
+rxce_t *rxce_ctx;
+lib_rnd_t rnd;
+bool stop = false;
+int refresh_number = 0;
+cyg_tick_count_t date[255];
+
+// Just for commpilation. Not used.
+void
+pbproc_scf (void)
+{;}
+
+void
+test_expiration_cb (int dtei)
+{
+ cyg_tick_count_t current = cyg_current_time ();
+ sta_t *lsta = mac_store_sta_get (mac_store_ctx, dtei);
+ test_begin (test, "Check date of cei creation\n")
+ {
+ test_fail_if (current > date[dtei] + S_TO_RTC (TONEMAPS_LIFE_DURATION_S));
+ } test_end;
+ blk_release (lsta);
+ date[dtei] = current;
+ if (refresh_number > TEST_REFRESH_NUMBER ) stop = true;
+ else refresh_number++;
+ if (refresh_number % 100 == 0) test_result(test);
+}
+
+void
+cpu_load_process (cyg_addrword_t data)
+{
+ int i;
+ int r;
+ while (!stop)
+ {
+ double z;
+ r = lib_rnd_uniform (&rnd, 2000000);
+ for (i=0; i< r; i++)
+ {
+ z = (i*1.0)/r;
+ }
+ cyg_thread_delay(1);
+ }
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+}
+
+void
+cyg_user_start (int argc, char **argv)
+{
+ int i;
+ test_init (test, argc, argv);
+ test_case_begin (test, "Expiration");
+ trace_init();
+ lib_rnd_init (&rnd, 123);
+ mac_store_ctx = mac_store_init ();
+ rxce_ctx = rxce_init (NULL, mac_store_ctx, &mac_config);
+ rxce_init_test_cb (&test_expiration_cb);
+ for (i=1; i<= 250; i++)
+ {
+ int b = mac_store_get_free_tei (mac_store_ctx);
+ if (b != -1 )
+ {
+ mac_store_sta_add (mac_store_ctx, b);
+ sta_t *lsta = mac_store_sta_get (mac_store_ctx, b);
+ tonemaps_t *tms = tonemaps_alloc();
+ lsta->rx_tonemaps = tms;
+ int random = lib_rnd_uniform (&rnd, 5000);
+ date[i] = cyg_current_time() + random;
+ tms->expiration_rtc_date = date[i] + S_TO_RTC (RXCE_TONEMAPS_REFRESH_PERIOD_S);
+ blk_release (lsta);
+ }
+ }
+ cyg_thread_create (RXCE_PRIORITY, &rxce_process,(cyg_addrword_t) rxce_ctx, "rxce",
+ rxce_stack, CYGNUM_HAL_STACK_SIZE_TYPICAL,
+ &rxce_handle, &rxce_thread);
+ cyg_thread_resume (rxce_handle);
+
+ cyg_thread_create (CPU_LOAD_PRIORITY, &cpu_load_process,(cyg_addrword_t) 0, "cpu_load",
+ cpu_load_stack, CYGNUM_HAL_STACK_SIZE_TYPICAL,
+ &cpu_load_handle, &cpu_load_thread);
+ cyg_thread_resume (cpu_load_handle);
+}
diff --git a/cesar/ce/test/tx/Makefile b/cesar/ce/test/tx/Makefile
new file mode 100644
index 0000000000..b0e6e8d3fa
--- /dev/null
+++ b/cesar/ce/test/tx/Makefile
@@ -0,0 +1,8 @@
+all :
+ $(MAKE) -f host-Makefile --no-print-directory
+ $(MAKE) -f target-Makefile --no-print-directory
+
+clean :
+ $(MAKE) -f host-Makefile clean
+ $(MAKE) -f target-Makefile clean
+
diff --git a/cesar/ce/test/tx/host-Makefile b/cesar/ce/test/tx/host-Makefile
new file mode 100755
index 0000000000..ba9d305904
--- /dev/null
+++ b/cesar/ce/test/tx/host-Makefile
@@ -0,0 +1,17 @@
+BASE = ../../..
+
+INCLUDES = ce/test/tx
+INCLUDES+= ce/test/common
+INCLUDES+= ce/test/common/ecos_overide
+INCLUDES += ce/test/rx/general/overide
+
+HOST_PROGRAMS = test_tx
+test_tx_SOURCES = test_tx.c
+test_tx_MODULES = lib mac/common ce ce/test/common ce/test/common/ecos_overide/cyg/kernel ce/test/rx/general/overide/cp/interf
+
+ce_MODULE_SOURCES = tx.c rxce_stats.c
+ce_test_common_MODULE_SOURCES = print_utils.c
+
+VARIANT = host
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/ce/test/tx/src/test_expiration.c b/cesar/ce/test/tx/src/test_expiration.c
new file mode 100644
index 0000000000..e26a473608
--- /dev/null
+++ b/cesar/ce/test/tx/src/test_expiration.c
@@ -0,0 +1,121 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ./src/test_expiration.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "cyg/kernel/kapi.h"
+#include "ce/inc/tx.h"
+#include "lib/test.h"
+#include "cp/interf/interf.h"
+#include "cp/cp.h"
+#include "mac/common/tonemap.h"
+#include "ce/inc/ecos_time.h"
+
+#define CP_PRIORITY 20
+cyg_thread cp_thread;
+cyg_handle_t cp_handle;
+unsigned char cp_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+
+#define TEST_PRIORITY 10
+cyg_thread test_thread;
+cyg_handle_t test_handle;
+unsigned char test_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+
+test_t test;
+mac_store_t *mac_store_ctx;
+cp_t *cp_ctx;
+
+void
+test_process (cyg_addrword_t data)
+{
+ int n=0;
+ test_begin (test, "txce expiration")
+ {
+ int i, tmi;
+ bool has_tonemap = false;
+ // Let CP running and simulate CEI reception. Check during 1mn if
+ // tonemap that should have been expirated is still in mac_store.
+ while (n++<S_TO_RTC (TONEMAPS_LIFE_DURATION_S*2))
+ {
+ //printf ("%d\n",n);
+ cyg_thread_delay(1);
+ for (i=MAC_TEI_STA_MIN; i<MAC_TEI_STA_MAX; i++)
+ {
+ sta_t *lsta = mac_store_sta_get (mac_store_ctx, i);
+ if (lsta)
+ {
+ has_tonemap = false;
+ for (tmi=0; tmi<TONEMAP_INDEX_NB; tmi++)
+ {
+ if (lsta->tx_tonemaps->tm[tmi] != NULL)
+ {
+ has_tonemap = true;
+ break;
+ }
+ }
+ test_fail_if ( has_tonemap && (cyg_current_time() > lsta->tx_tonemaps->expiration_rtc_date));
+ blk_release (lsta);
+ }
+ }
+ }
+ // Stop the simulation of received CEI.
+ cp_stop (cp_ctx);
+ // Wait the life of tonemaps duration.
+ // After this, all the tonemaps must have been expirated.
+ cyg_thread_delay (S_TO_RTC(TONEMAPS_LIFE_DURATION_S));
+ has_tonemap = false;
+ for (i=MAC_TEI_STA_MIN; i<MAC_TEI_STA_MAX; i++)
+ {
+ sta_t *lsta = mac_store_sta_get (mac_store_ctx, i);
+ if (lsta)
+ {
+ for (tmi=0; tmi<TONEMAP_INDEX_NB; tmi++)
+ {
+ if (lsta->tx_tonemaps->tm[tmi] != NULL)
+ {
+ has_tonemap = true;
+ break;
+ }
+ }
+ test_fail_if ( has_tonemap );
+ blk_release (lsta);
+ }
+ }
+
+ } test_end;
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+}
+
+
+void
+cyg_user_start (int argc, char **argv)
+{
+ test_init (test, argc, argv);
+ mac_config_t mac_config;
+ mac_config_init (&mac_config);
+ mac_store_ctx = mac_store_init();
+ cp_ctx = cp_init (mac_store_ctx, &mac_config);
+ cyg_thread_create (CP_PRIORITY, &cp_process,(cyg_addrword_t) cp_ctx, "cp",
+ cp_stack, CYGNUM_HAL_STACK_SIZE_TYPICAL,
+ &cp_handle, &cp_thread);
+
+ cyg_thread_create (TEST_PRIORITY, &test_process,(cyg_addrword_t) 0, "test",
+ test_stack, CYGNUM_HAL_STACK_SIZE_TYPICAL,
+ &test_handle, &test_thread);
+
+
+
+ cyg_thread_resume (test_handle);
+ cyg_thread_resume (cp_handle);
+}
diff --git a/cesar/ce/test/tx/src/test_tx.c b/cesar/ce/test/tx/src/test_tx.c
new file mode 100755
index 0000000000..ab47d20c0d
--- /dev/null
+++ b/cesar/ce/test/tx/src/test_tx.c
@@ -0,0 +1,150 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ./src/test_tx.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#include "common/std.h"
+
+#include <stdio.h>
+#include "ce/test/common/print_utils.h"
+
+#include "mac/common/store.h"
+#include "ce/inc/tx.h"
+#include "mac/common/tonemask.h"
+#include "ce/inc/cei.h"
+#include "mac/common/timings.h"
+#include "lib/test.h"
+
+#define MME_BUFFER_SIZE 1536
+
+#define STEI 1
+
+
+int
+main (int argc, char **argv)
+{
+ int i;
+ test_t test;
+ mac_config_t mac_config;
+ test_init (test, argc, argv);
+ mac_config_init (&mac_config);
+ //for (i=0; i< PHY_CARRIER_NB/8; i++) mac_config.tonemask_info.tonemask[i] = 0xFF;
+ u16 MAX_FL_FL = MAC_MAX_FL_MAX_FL;
+ u8 RIFS1 = MAC_RIFS_AV_ONE_SYM_FL;
+ u8 RIFS2 = MAC_RIFS_AV_TWO_SYM_FL;
+ u8 RIFS3 = MAC_RIFS_AV_G2_SYM_FL;
+ u8 RESPT = 0;
+ u8 MAXTM = TONEMAP_INDEX_NB;
+ u8 DEFAULT_TMI = 0x04;
+ u8 SCL = 0x0;
+ u8 TM_VALID_NB = 0x1;
+ u8 TMI_VALID0 = DEFAULT_TMI;
+ u8 NINT = 0;
+ u8 NEW_TMI = DEFAULT_TMI;
+ u8 CPF = 1;
+ u8 FEC = 0;
+ u8 GI = 0;
+ u8 CBDENC = 0;
+ u8 rx_mm_entry[MME_BUFFER_SIZE];
+ bitstream_t stream;
+ bitstream_t *writer = &stream;
+ bitstream_init (writer, rx_mm_entry, MME_BUFFER_SIZE, BITSTREAM_WRITE);
+ bitstream_access (writer, &MAX_FL_FL, 16);
+ bitstream_access (writer, &RIFS1, 8);
+ bitstream_access (writer, &RIFS2, 8);
+ bitstream_access (writer, &RIFS3, 8);
+ bitstream_access (writer, &RESPT, 8);
+ bitstream_access (writer, &MAXTM, 8);
+ bitstream_access (writer, &DEFAULT_TMI, 8);
+ bitstream_access (writer, &SCL, 8);
+ bitstream_access (writer, &SCL, 8);
+ bitstream_access (writer, &TM_VALID_NB, 8);
+ bitstream_access (writer, &TMI_VALID0, 8);
+ bitstream_access (writer, &NINT, 8);
+ bitstream_access (writer, &NEW_TMI, 8);
+ bitstream_access (writer, &CPF, 8);
+ bitstream_access (writer, &FEC, 8);
+ bitstream_access (writer, &GI, 8);
+ bitstream_access (writer, &CBDENC, 8);
+
+ uint mask_len = mac_config.tonemask_info.carrier_nb;
+ bitstream_access (writer, &mask_len, 16);
+
+ u8 tonemap[PHY_CARRIER_NB];
+ for (i=0; i<PHY_CARRIER_NB; i++) tonemap[i] = (i%7)+1;
+ for (i = 0; i<PHY_CARRIER_NB; i++)
+ {
+ bitstream_access (writer, &tonemap[i], 4);
+ }
+ bitstream_finalise(writer);
+
+ mac_store_t *mac_store_ctx = mac_store_init();
+ mac_store_sta_add (mac_store_ctx, STEI);
+ sta_t *sta = mac_store_sta_get (mac_store_ctx, STEI);
+ txce_t *txce_ctx = txce_init (mac_store_ctx, &mac_config, NULL);
+ txce (txce_ctx, STEI, CM_CHAN_EST_IND, rx_mm_entry);
+ ce_print_tonemaps (sta->tx_tonemaps);
+ test_case_begin (test, "CE-create tonemap from cei received");
+ test_begin (test, "No encodage")
+ {
+ test_fail_if (sta->tx_tonemaps->max_fl_av != MAX_FL_FL);
+ test_fail_if (sta->tx_tonemaps->rifs_av_one_sym_tck != MAC_RIFS_AV_ONE_SYM_TCK);
+ test_fail_if (sta->tx_tonemaps->rifs_av_two_sym_tck != MAC_RIFS_AV_TWO_SYM_TCK);
+ test_fail_if (sta->tx_tonemaps->rifs_av_g2_sym_tck != MAC_RIFS_AV_G2_SYM_TCK);
+ test_fail_if (sta->tx_tonemaps->max_tm != MAXTM);
+ test_fail_if (sta->tx_tonemaps->default_tmi != DEFAULT_TMI);
+ test_fail_if (sta->tx_tonemaps->scl_cp != SCL);
+ test_fail_if (sta->tx_tonemaps->scl_cfp != SCL);
+ int nint = tonemap_valid_nb (sta->tx_tonemaps);
+ test_fail_if (nint != TM_VALID_NB);
+ u8 *mask = (mac_config.tonemask_info.tonemask);
+ u8 tmp[PHY_CARRIER_NB];
+ u8 *tm_data = sta->tx_tonemaps->tm[DEFAULT_TMI-4]->tmdma_desc_head->data;
+ for (i=0; i<PHY_CARRIER_NB; i++)
+ {
+ if (i==1024) tm_data = sta->tx_tonemaps->tm[DEFAULT_TMI-4]->tmdma_desc_head->next->data;
+ uint n1 = (uint) *tm_data++;
+ uint n2 = n1>>4;
+ n1 = n1&0xF;
+ tmp[i++]= n1;
+ tmp[i] = n2;
+ }
+ uint z=0;
+ for (i=0; i<PHY_CARRIER_NB; i++)
+ {
+ //ce_print ("c%d : tone=%d\n",i, tmp[i]);
+ if ((mask[i/8] & (1<<(i%8))) == 0)
+ {
+ //ce_print ("c%d : masked\n",i);
+ test_fail_if (tmp[i] != 0 && tmp[i]<0x08);
+ }
+ else
+ {
+ //ce_print ("c%d : tmp[%d]=%d; previous=%d\n",i,i,tmp[i],z);
+ test_fail_if (tmp[i]!= (z+1));
+ z = tmp[i];
+ if (z==7) z=0;
+ }
+ }
+ test_fail_if (sta->tx_tonemaps->intervals->intervals_nb != NINT);
+ } test_end;
+ blk_release (sta);
+ dbg_check (mac_store_sta_remove (mac_store_ctx, STEI));
+ test_begin (test, "check alloc/free")
+ {
+ test_fail_unless (blk_check_memory());
+ } test_end;
+ test_result (test);
+ return (test_nb_failed (test) == 0 ? 0 : 1);
+}
+
diff --git a/cesar/ce/test/tx/target-Makefile b/cesar/ce/test/tx/target-Makefile
new file mode 100644
index 0000000000..783d886c70
--- /dev/null
+++ b/cesar/ce/test/tx/target-Makefile
@@ -0,0 +1,22 @@
+BASE = ../../..
+
+INCLUDES = ce/test/tx/
+INCLUDES += ce/test/common
+INCLUDES += ce/test/rx/general/overide
+
+ECOS = y
+
+TARGET_PROGRAMS=test_alarm_target_ecos_synth
+test_alarm_target_ecos_synth_SOURCES = essai_alarm.c
+
+TARGET_PROGRAMS=test_expiration_target_ecos_synth
+test_expiration_target_ecos_synth_SOURCES = test_expiration.c
+test_expiration_target_ecos_synth_MODULES = lib ce mac/common ce/test/common ce/test/rx/general/overide/cp/interf ce/test/rx/general/overide/cp
+
+
+ce_MODULE_SOURCES = tx.c
+
+VARIANT = target
+
+include $(BASE)/common/make/top.mk
+
diff --git a/cesar/ce/test/tx/target-ecos.ecc.sh b/cesar/ce/test/tx/target-ecos.ecc.sh
new file mode 100755
index 0000000000..8253d98c9a
--- /dev/null
+++ b/cesar/ce/test/tx/target-ecos.ecc.sh
@@ -0,0 +1,5 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new linux default
+cat >> $config <<EOF
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/ce/test/tx/test.h b/cesar/ce/test/tx/test.h
new file mode 100644
index 0000000000..9d0fde9ad4
--- /dev/null
+++ b/cesar/ce/test/tx/test.h
@@ -0,0 +1,18 @@
+#ifndef ___tx_test_h
+#define ___tx_test_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ../tx/test.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#endif /* ___tx_test_h */
diff --git a/cesar/cl/Module b/cesar/cl/Module
new file mode 100644
index 0000000000..fa85c6b9ab
--- /dev/null
+++ b/cesar/cl/Module
@@ -0,0 +1,4 @@
+SOURCES := cl.c cl_mactotei.c
+ifeq ($(CONFIG_TRACE),y)
+SOURCES += trace.c
+endif
diff --git a/cesar/cl/cl.h b/cesar/cl/cl.h
new file mode 100644
index 0000000000..e6b1dc9912
--- /dev/null
+++ b/cesar/cl/cl.h
@@ -0,0 +1,321 @@
+#ifndef CL_CL_H_
+#define CL_CL_H_
+
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/cl.h
+ * \brief Public functions
+ * \ingroup cl
+ *
+ */
+
+#include "mac/common/mfs.h"
+#include "mac/common/store.h"
+#include "lib/utils.h"
+#include "mac/sar/sar.h"
+
+/** forward declaration. */
+typedef struct cl_t cl_t;
+typedef struct cl_mme_recv_t cl_mme_recv_t;
+
+/**
+ * Callback use to inform the upper layer when a data had been sent over the
+ * PLC.
+ *
+ * \param user the user data
+ * \param buffer the buffer use to send the data over the PLC.
+ */
+typedef void (*cl_data_send_done_cb_t) (void *user, u8 *buffer);
+
+/**
+ * Callback to provide a received data to the upper layer comming from the SAR.
+ *
+ * \param user the user data
+ * \param buffer the buffer containing the data
+ * \param length the data length in the buffer.
+ */
+typedef void (*cl_data_recv_cb_t) (void *user, u8 *buffer, uint length);
+
+/**
+ * Provides a MME buffer to the CP.
+ *
+ * \param user_data the layer data.
+ * \param buffer the buffer to provide.
+ */
+typedef void (*cl_mme_buffer_add_cb_t) (void *user_data, u8 *buffer);
+
+/**
+ * Call back to use when the CL needs to send a MME to the upper layer.
+ *
+ * \param ul_data the upper layer data provided on the registration.
+ * \param buffer the buffer containig the MME.
+ * \param length the length of the MME
+ */
+typedef void (*cl_mme_ul_send_done_cb_t) (void *ul_data, u8 *buffer, uint length);
+
+/**
+ * Call back to use once the CP had used the buffer containing a received MME.
+ *
+ * \param ctx the CL context
+ * \param mme_recv user data
+ */
+typedef void (*cl_mme_recv_done_cb_t) (void *ctx, cl_mme_recv_t *mme_recv);
+
+/**
+ * Callback definition used by the CL when the CP had processed the MME
+ * in the buffer. This will return the buffer to the upper layer.
+ *
+ * \param user_data the upper layer user data
+ * \param buffer the buffer containing the MME.
+ */
+typedef void (*cl_mme_ul_recv_done_cb_t) (void *user_data, u8 *buffer);
+
+/**
+ * Use this callback to provide a received MME to the CP.
+ *
+ * \param user user daya
+ * \param mfs the mfs used for the reassembly if MME received from the SAR.
+ * \param buffer the buffer containing the MME.
+ * \param length the MME length
+ * \param mme_recv private data for the cl_mme.
+ * \param encryption inform if the MF has been crypted or not when it
+ * arrives from the PWL.
+ */
+typedef void (*cl_mme_recv_cb_t) (void *user, mfs_rx_t *mfs, u8 *buffer,
+ uint length, cl_mme_recv_t *mme_recv, bool encryption);
+
+/**
+ * Init the Convergence Layer and return a pointer on the CL context.
+ *
+ * \param mac_store the mac store.
+ * \param sar the sar context.
+ * \param mac_config the mac config.
+ * \return the convergence layer context.
+ */
+cl_t *cl_init (mac_store_t *mac_store, sar_t *sar, mac_config_t *mac_config);
+
+/**
+ * Uninit the Convergence layer context.
+ *
+ * \param ctx the convergence layer context
+ */
+void cl_uninit (cl_t *ctx);
+
+/**
+ * Initialize the CL to call the Upper layer once the CP ends processing the
+ * MME.
+ * Used each time the CP needs to send an MME to the upper layer.
+ *
+ * \param ctx the CL context
+ * \param cb the upper layer callback to use to send an MME.
+ * \param user the user data to provide with the callback
+ */
+void cl_mme_ul_init_send_done (cl_t *ctx, cl_mme_ul_recv_done_cb_t cb,
+ void *user);
+
+/**
+ * Init the function call when an MME is recived from the SAR or the HLE.
+ * The CP registers its callback to allow the CL to call it each time a MME
+ * is receved from the PLC or the HLE.
+ *
+ * \param ctx the CL ctx
+ * \param mme_recv_cb
+ * \param user the user data
+ */
+void cl_mme_recv_init (cl_t *ctx, cl_mme_recv_cb_t mme_recv_cb, void *user);
+
+/**
+ * Initialize the CL to send MMEs to the Upper layer considered as data.
+ * Used each time the CP needs to send an MME to the upper layer.
+ *
+ * \param ctx the CL context
+ * \param cb the upper layer callback to use to send an MME.
+ * \param user the user data to provide with the callback
+ */
+void cl_mme_init_ul_as_data (cl_t *ctx, cl_mme_ul_send_done_cb_t cb, void *user);
+
+
+/**
+ * Initialize the CP call back to get a buffer.
+ *
+ * \param cl the cl context
+ * \param cb the call back function
+ * \param user_data the user data.
+ */
+void cl_mme_init_buffer_add_cb (cl_t *cl, cl_mme_buffer_add_cb_t cb,
+ void *user_data);
+
+/**
+ * Send an MME from the CP to the PLC via the SAR MME way.
+ *
+ * \param ctx the CL context
+ * \param buffer the buffer containing the MME
+ * \param length the length of the MME
+ * \param mfs the MFS use for the SAR if the MME should be send over the PLC
+ */
+void cl_mme_send_as_mme (cl_t *ctx, u8 *buffer, uint length, mfs_tx_t *mfs);
+
+/**
+ * Send an MME as a data packet from the CP to the PLC or to the upper layer.
+ *
+ * \param ctx the CL context
+ * \param buffer the buffer containing the MME
+ * \param length the length of the MME
+ */
+void cl_mme_send_as_data (cl_t *ctx, u8 *buffer, uint length);
+
+/**
+ * Send a MME from the CP to the Upper layer or to the PWL.
+ *
+ * \param ctx the cl context.
+ * \param buffer the buffer containing the data to send.
+ * \param length the length of the MME.
+ * \param mfs the mfs to use if necessary.
+ */
+extern inline void
+cl_mme_send (cl_t *ctx, u8 *buffer, uint length, mfs_tx_t *mfs)
+{
+ dbg_assert (ctx);
+ dbg_assert (buffer);
+
+ if (mfs)
+ cl_mme_send_as_mme (ctx, buffer, length, mfs);
+ else
+ cl_mme_send_as_data (ctx, buffer, length);
+}
+
+/**
+ * Callback called by the sar when a MME as been sent over the PWL.
+ *
+ * \param ctx the cl context.
+ * \param buffer the buffer used.
+ */
+void cl_mme_sar_send_done (cl_t *ctx, u8 *buffer);
+
+/**
+ * Receives an MME from the SAR or the upper layer.
+ * This function is called each time the SAR or the HLE has an MME to send to
+ * the CP. It is used by the inline function.
+ * When the MFS is NULL the MME received comes from the HLE. Otherwise the MME
+ * comes from the SAR.
+ *
+ * \param ctx the cl context
+ * \param buffer the MME buffer
+ * \param length the MME length
+ * \param mfs the MFS used in the reassembly process.
+ * \param encryption if the mac frame comes from the SAR if returns the
+ * state of the encryption.
+ */
+void cl_mme_recv (cl_t *ctx, u8 *buffer, uint length, mfs_rx_t *mfs, bool
+ encryption);
+
+/**
+ * Receives an MME from the Upper layer.
+ * It will provide this MME to the Control Plane to be processed.
+ *
+ * \param ctx the cl context
+ * \param buffer the MME buffer
+ * \param length the MME length
+ */
+extern inline void cl_mme_ul_send (cl_t *ctx, u8 *buffer, uint length)
+{
+ cl_mme_recv (ctx, buffer, length, NULL, false);
+}
+
+/**
+ * Receives an MME from the SAR.
+ * It will provide this MME to the Control Plane to be processed.
+ *
+ * \param ctx the cl context
+ * \param buffer the MME buffer
+ * \param length the MME length
+ * \param mfs the MFS used by to receive the MME.
+ * \param encryption boolean informing if the MF was crypted or not.
+ */
+extern inline void cl_mme_sar_recv (cl_t *ctx, u8 *buffer, uint length,
+ mfs_rx_t *mfs, bool encryption)
+{
+ cl_mme_recv (ctx, buffer, length, mfs, encryption);
+}
+
+/**
+ * The CP inform the CL that the buffer contaning previously a receved MME can
+ * be use again to store another MME if necessary.
+ *
+ * \param ctx the CL context
+ * \param mme_recv the data provided on the previous callback.
+ */
+void cl_mme_recv_done (cl_t *ctx, cl_mme_recv_t *mme_recv);
+
+/**
+ * Initialize the callback to inform the upper layer when a data had been sent
+ * over the PWL.
+ *
+ * \param cl the CL context
+ * \param cb the callback to call once the data had been sent
+ * \param user the user data to provide with the callback call
+ */
+void cl_data_send_done_init (cl_t *cl, cl_data_send_done_cb_t cb, void *user);
+
+/**
+ * The SAR inform the CL that the data previously provided had been sent over
+ * the PWL.
+ *
+ * \param ctx the CL context.
+ * \param buffer the buffer containing the MME
+ */
+void cl_data_send_done (cl_t *ctx, u8 *buffer);
+
+/**
+ * Send a data from the upper layer to the SAR, this data should be sent over
+ * the PWL.
+ *
+ * \param cl the CL context.
+ * \param buffer the buffer containing the data to send
+ * \param length the data length
+ */
+void cl_data_send (cl_t *cl, u8 *buffer, uint length);
+
+/**
+ * Initialize the callback to receive the data from the PLC to the upper layer.
+ *
+ * \param cl the CL context
+ * \param cb the function callback to call
+ * \param user the user data to provide on the callback.
+ */
+void cl_data_recv_init (cl_t *cl, cl_data_recv_cb_t cb, void *user);
+
+/**
+ * Called by the SAR each time it has a data to provide to the CL.
+ *
+ * \param ctx the CL context
+ * \param buffer the buffer containing the data to send to the Upper layer.
+ * \param length the data length in the buffer
+ * \param mfs the mfs used to receive the data.
+ */
+void cl_data_recv (cl_t *ctx, u8 *buffer, uint length, mfs_rx_t *mfs);
+
+
+/**
+ * Provides a buffer to the CP.
+ *
+ * \param cl the CL context
+ * \param buffer the buffer to reassembly some datas
+ */
+void cl_mme_buffer_add (cl_t *cl, u8 *buffer);
+
+/**
+ * Provides a buffer to the SAR to reassembly data
+ *
+ * \param cl the CL context
+ * \param buffer the buffer to reassembly some datas
+ */
+void cl_data_buffer_add (cl_t *cl, u8 *buffer);
+
+#endif /* CL_CL_H_ */
diff --git a/cesar/cl/cl_mactotei.h b/cesar/cl/cl_mactotei.h
new file mode 100644
index 0000000000..4f74b62bf5
--- /dev/null
+++ b/cesar/cl/cl_mactotei.h
@@ -0,0 +1,84 @@
+#ifndef CL_MACTOTEI_H_
+#define CL_MACTOTEI_H_
+
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/cl_mactotei.h
+ * \brief mac to tei table interface between the CL and the CP
+ * \ingroup cl
+ *
+ */
+
+#include "cl/cl.h"
+
+typedef struct cl_mactotei_table_t cl_mactotei_table_t;
+typedef struct cl_mactotei_blk_t cl_mactotei_blk_t;
+typedef struct cl_mactotei_t cl_mactotei_t;
+
+/**
+ * Create a new table to be filled by the CP.
+ *
+ * \return a pointer to the new block to be fill with the mac to tei table
+ * data
+ */
+cl_mactotei_blk_t *cl_mactotei_new (void);
+
+/**
+ * Request the CL to copy all the data without the coresponding one provide in
+ * this function paramater.
+ *
+ * \param table_old the table actually use by the CL
+ * \param table the mactotei new table to fill
+ * \param tag the tag to exclude from the copy
+ */
+void cl_mactotei_copy (cl_mactotei_table_t *table_old,
+ cl_mactotei_blk_t *table, u8 tag);
+
+/**
+ * Add a new tupple of data to the table.
+ *
+ * \param table the table pointer to add a new mac to tei correspondance.
+ * \param mac_addr the mac addr to add
+ * \param tei the tei corresponding to the STA.
+ * \param tag the CP tag provide to indentifier a network.
+ */
+void cl_mactotei_addr_add (cl_mactotei_blk_t *table, mac_t mac_addr,
+ uint tei, uint tag);
+
+/**
+ * Copy all the lines of the CL mactotei table to the table provided in
+ * paramter without all the lines which the tag corresponds to the parameter
+ * tag.
+ *
+ * Sample : cl_mactotei_copy_table_excluding_tag (cl, table, 2), will copy all
+ * the mac to tei lines of the CL table without those where the tag value is 2.
+ *
+ * \param ctx the convergence layer context
+ * \param table the mactotei new table to fill
+ * \param tag the tag to exclude from the copy
+ */
+void cl_mactotei_copy_table_excluding_tag (cl_t *ctx,
+ cl_mactotei_blk_t *table, u8 tag);
+
+/**
+ * Request the CL to use the new table and remove the old one.
+ *
+ * \param ctx the CL context
+ * \param table the new table to use.
+ */
+void cl_mactotei_use_table (cl_t *ctx, cl_mactotei_blk_t *table);
+
+/**
+ * Release the complete table from the memory.
+ *
+ * \param ctx the convergence layer context
+ */
+void cl_mactotei_release_table (cl_t *ctx);
+
+#endif /*CL_MACTOTEI_H_*/
diff --git a/cesar/cl/doc/cesar_cl.odt b/cesar/cl/doc/cesar_cl.odt
new file mode 100755
index 0000000000..4ea3372880
--- /dev/null
+++ b/cesar/cl/doc/cesar_cl.odt
Binary files differ
diff --git a/cesar/cl/inc/cl.h b/cesar/cl/inc/cl.h
new file mode 100644
index 0000000000..1b3cdbd2ce
--- /dev/null
+++ b/cesar/cl/inc/cl.h
@@ -0,0 +1,71 @@
+#ifndef CL_INC_CL_H_
+#define CL_INC_CL_H_
+
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/inc/cl.h
+ * \brief private function for the CL
+ * \ingroup cl/inc
+ *
+ */
+
+#include "cl/cl_mactotei.h"
+#include "cl/inc/context.h"
+
+/**
+ * Init the MME module of the CL.
+ *
+ * \param ctx the mme context.
+ */
+void cl_mme_init (cl_mme_t *ctx);
+
+/**
+ * Swith the old mactotei table with the new one.
+ *
+ * \param cl the convergence layer context
+ * \param table the table to switch
+ */
+void cl_mactotei_switch_table (cl_t *cl, cl_mactotei_table_t *table);
+
+/**
+ * Find a mac address in the table using a dichotomy search
+ *
+ * \param cl the convergence layer context.
+ * \param mac the mac address to find
+ * \return the tei corresponding to the mac address if known otherwise it
+ * returns 0xff a broadcast tei (see HPAV section 5.3.1.2)
+ */
+uint cl_mactotei_table_find_tei_from_mac (cl_t *cl, mac_t mac);
+
+/**
+ * Search for the lid in the classifier
+ *
+ * \param cl CL context
+ * \param bcast put true if the link is a bcast one, false otherwise.
+ * \param tei the tei found previously by the mactotei table.
+ * \param acs put true if the link should be process by the acs
+ * \param drop put true if the data should be drop.
+ */
+uint cl_classifer_get_lid (cl_t *cl, uint tei, bool *bcast, bool *acs,
+ bool *drop);
+
+
+
+/**
+ * Send a data once the TEI has been find.
+ *
+ * \param ctx the cl context.
+ * \param buffer the buffer containing the data to send.
+ * \param length the buffer data length.
+ * \param tei the tei found from the cl_mactotei list.
+ */
+void
+cl_data_send_with_tei (cl_t *cl, u8 *buffer, uint length, uint tei);
+
+#endif /*CL_INC_CL_H_*/
diff --git a/cesar/cl/inc/cl_mactotei.h b/cesar/cl/inc/cl_mactotei.h
new file mode 100644
index 0000000000..67c5a139a9
--- /dev/null
+++ b/cesar/cl/inc/cl_mactotei.h
@@ -0,0 +1,154 @@
+#ifndef CL_INC_CL_MACTOTEI_H_
+#define CL_INC_CL_MACTOTEI_H_
+
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/inc/cl_mactotei.h
+ * \brief private functions for the cl_mactotei table
+ * \ingroup cl/inc
+ *
+ */
+
+#include "cl/cl_mactotei.h"
+
+/** the maximum quantoty of mac to tei mac address in one block. */
+#define MAX_NB_MACTOTEI 64
+
+/**
+ * tupple of data to stored in the table.
+ */
+struct cl_mactotei_t
+{
+ /** the mac address. */
+ u64 mac :48;
+ /** the STA tei. */
+ u64 tei :8;
+ /** The CP tag to use to copy the data from the old table to the
+ * new one. */
+ u64 tag :8;
+};
+
+/** The block containing the mac to tei tupple. */
+struct cl_mactotei_blk_t
+{
+ /** A pointer to the next block. */
+ struct cl_mactotei_blk_t *next;
+ /** A pointer to the data. */
+ cl_mactotei_t *data;
+ /** The total number of lines of mac to tei data. */
+ uint nb_total;
+ /** write_pos the next blk to use to add a new mac address to tei
+ * correpondance. */
+ struct cl_mactotei_blk_t *write_pos;
+};
+
+/** The structure to use in the CL. */
+struct cl_mactotei_table_t
+{
+ /** The first element containg the first block of data. */
+ cl_mactotei_blk_t *first;
+ /** The total number of mactotei lines.*/
+ uint nb_total;
+ /** the number of blocks available. */
+ uint nb_blocks;
+ /** The table containing in each line the first mac address of the block
+ * number line, i.e. the first line correspond to the first mac address in
+ * the first block. The second line contains the first mac address in the
+ * second block and so on. */
+ cl_mactotei_blk_t *blk[0];
+};
+
+/**
+ * Genrate the table which will be use by the CL.
+ *
+ * \param table the new table to use.
+ * \return the table
+ */
+cl_mactotei_table_t *cl_mactotei_generate_table (cl_mactotei_blk_t *table);
+
+/**
+ * Release the complete table from the memory.
+ *
+ * \param table the table to release
+ */
+void cl_mactotei_release_table_intern (cl_mactotei_table_t *table);
+
+/**
+ * Return the cl_mactotei value of the item at the position request.
+ *
+ * \param table the mactotei table
+ * \param position the position request.
+ * \return mactotei data
+ */
+cl_mactotei_t cl_mactotei_table_get_mactotei_at (cl_mactotei_table_t *table,
+ uint position);
+
+/**
+ * Get the mac address of the table at the position requested
+ *
+ * \param table the mactotei table
+ * \param position the position requested
+ * \return mac address
+ */
+extern inline mac_t cl_mactotei_table_get_mac_at (cl_mactotei_table_t *table,
+ uint position)
+{
+ dbg_assert (table);
+
+ return (cl_mactotei_table_get_mactotei_at (table, position)).mac;
+}
+
+/**
+ * Get the tei of the table at the position requested
+ *
+ * \param table the mactotei table
+ * \param position the position requested
+ * \return tei
+ */
+extern inline uint cl_mactotei_table_get_tei_at (cl_mactotei_table_t *table,
+ uint position)
+{
+ dbg_assert (table);
+
+ return (cl_mactotei_table_get_mactotei_at (table, position)).tei;
+}
+
+/**
+ * Set the cl_mactotei value at the position request.
+ *
+ * \param table the mactotei table
+ * \param position the position request.
+ * \param mactotei the mac to tei data to set.
+ */
+void cl_mactotei_table_set_mactotei_at (cl_mactotei_table_t *table,
+ uint position, cl_mactotei_t mactotei);
+
+/**
+ * Compare two values in the table and return true if the value at the
+ * first position is lesser than the one at the second position.
+ *
+ * \param table the table to make the comparation.
+ * \param position1 the position of the first position.
+ * \param position2 the second position.
+ * \return true if the first value is lesser than the second one.
+ */
+bool cl_mactotei_table_compare (cl_mactotei_table_t *table, uint position1,
+ uint position2);
+
+/**
+ * Swap two values in the table.
+ *
+ * \param table the table to make the comparation.
+ * \param position1 the position of the first position.
+ * \param position2 the second position.
+ */
+void cl_mactotei_table_swap (cl_mactotei_table_t *table, uint position1,
+ uint position2);
+
+#endif /*CL_INC_CL_MACTOTEI_H_*/
diff --git a/cesar/cl/inc/context.h b/cesar/cl/inc/context.h
new file mode 100644
index 0000000000..da9dc2ca28
--- /dev/null
+++ b/cesar/cl/inc/context.h
@@ -0,0 +1,130 @@
+#ifndef CL_INC_CONTEXT_H_
+#define CL_INC_CONTEXT_H_
+
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/inc/context.h
+ * \brief The convergence layer context.
+ * \ingroup cl
+ *
+ */
+
+#include "lib/rnd.h"
+#include "mac/common/mfs.h"
+#include "mac/common/store.h"
+#include "mac/common/config.h"
+#include "mac/sar/sar.h"
+
+#include "cl/inc/cl_mactotei.h"
+#include "cl/inc/trace.h"
+
+/** data tx structure. */
+struct cl_data_tx_t
+{
+ /** the callback function to use once the data hab been sent. */
+ cl_data_send_done_cb_t cb;
+ /** user data to provide with the callback. */
+ void *user;
+};
+typedef struct cl_data_tx_t cl_data_tx_t;
+
+/** data tx structure. */
+struct cl_data_rx_t
+{
+ /** callback to call the upperlayer once the CL receives a data. */
+ cl_data_recv_cb_t cb;
+ /** user value to provide with the function callback. */
+ void *user;
+};
+typedef struct cl_data_rx_t cl_data_rx_t;
+
+/** MME tx structure to the upper layer*/
+struct cl_mme_tx_t
+{
+ /** function to call when a mme is for the driver */
+ cl_data_recv_cb_t cb;
+ /** user data */
+ void *user;
+ /** mme buffer address */
+ u8 *mme_buffer;
+};
+typedef struct cl_mme_tx_t cl_mme_tx_t;
+
+
+struct cl_mme_recv_t
+{
+ /** The buffer received previously */
+ u8 *buffer;
+ /** From which layer it comes. */
+ bool sar;
+};
+
+/** cl mme context */
+struct cl_mme_t
+{
+ /** The Call back to inform the upper layer when a MME has been processed
+ * */
+ cl_mme_ul_recv_done_cb_t ul_mme_recv_done;
+ void *ul_mme_recv_done_user_data;
+
+ /** Callback to use to add a buffer to the CP. */
+ cl_mme_buffer_add_cb_t mme_buffer_add_cb;
+ /** The user data to provide with the bellow callback. */
+ void *mme_buffer_add_user_data;
+
+ /** Callback to call on each reception of MME. */
+ cl_mme_recv_cb_t mme_recv_cb;
+ /** Data to proved with the callback*/
+ void *mme_recv_user_data;
+
+ /** Data corresponding to the mme_recv message send to the CP. */
+ cl_mme_recv_t mme_recv;
+};
+typedef struct cl_mme_t cl_mme_t;
+
+struct cl_t
+{
+ /** The sar context use to send the MME or data. */
+ sar_t *sar;
+
+ /** Mac store reference. */
+ mac_store_t *mac_store;
+
+ /** randome value generator to generate the confounder for the MME. */
+ lib_rnd_t random_generator;
+
+ /** MME module to use to send or receive the MME to the CP. */
+ cl_mme_t mme;
+
+ /** mactotei table to send data over the PLC. */
+ cl_mactotei_table_t *mactotei;
+
+ /** send data context. */
+ cl_data_tx_t data_tx;
+
+ /** recevie data context. */
+ cl_data_rx_t data_rx;
+
+ /** When a MME is send as data to the local tei */
+ cl_mme_tx_t mme_ul_send;
+
+ /** MME buffer to provide to the SAR */
+ u8 mme_buffer [2048] __attribute__((aligned(2048)));
+
+ /** The mac config */
+ mac_config_t *mac_config;
+
+ /** Tracing system */
+#if CONFIG_TRACE
+ /** cl Trace */
+ trace_buffer_t trace;
+#endif /* !CONFIG_TRACE */
+};
+
+#endif /* CL_INC_CONTEXT_H_ */
diff --git a/cesar/cl/inc/trace.h b/cesar/cl/inc/trace.h
new file mode 100644
index 0000000000..9c9c365e04
--- /dev/null
+++ b/cesar/cl/inc/trace.h
@@ -0,0 +1,79 @@
+#ifndef cl_inc_trace_h
+#define cl_inc_trace_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/inc/trace.h
+ * \brief Trace system for the Convergence Layer.
+ * \ingroup cl
+ *
+ */
+
+#include "lib/trace.h"
+
+/** Shortcut for tracing */
+#define CL_TRACE(id, args...) \
+ TRACE_FAST_SHORT (CL_TRACE_, &ctx->trace, id, ## args)
+
+#if CONFIG_TRACE
+
+enum
+{
+ CL_TRACE_INIT,
+ CL_TRACE_UNINIT,
+ CL_TRACE_MME_SEND_AS_MME,
+ CL_TRACE_MME_SEND_AS_DATA,
+ CL_TRACE_MME_BUFFER_ADD,
+ CL_TRACE_MME_RECV,
+ CL_TRACE_MME_RECV_DONE,
+ CL_TRACE_MACTOTEI_COPY,
+ CL_TRACE_MACTOTEI_USE,
+ CL_TRACE_MACTOTEI_RELEASE,
+ CL_TRACE_MACTOTEI_FIND_TEI,
+ CL_TRACE_CLASSIFIER,
+ CL_TRACE_DATA_SEND,
+ CL_TRACE_DATA_SEND_DROP,
+ CL_TRACE_DATA_SEND_DONE,
+ CL_TRACE_DATA_RECV,
+ CL_TRACE_DATA_BUFFER_ADD,
+};
+
+BEGIN_DECLS
+
+/**
+ * Initialize the trace buffer
+ * \param ctx the cl context
+ */
+void
+cl_trace_init (cl_t *ctx);
+
+/**
+ * Uninitialize the trace buffer
+ * \param ctx the cl context.
+ */
+void
+cl_trace_uninit(cl_t *ctx);
+
+/**
+ * Print the trace
+ * \param ctx the cl context.
+ */
+void
+cl_trace_print (cl_t *ctx);
+
+END_DECLS
+
+#else /* !CONFIG_TRACE */
+
+#define cl_trace_init(ctx) ((void) 0)
+#define cl_trace_uninit(ctx) ((void) 0)
+#define cl_trace_print(ctx) ((void) 0)
+
+#endif /* CONFIG_TRACE */
+
+#endif /* cl_inc_trace_h */
diff --git a/cesar/cl/src/cl.c b/cesar/cl/src/cl.c
new file mode 100644
index 0000000000..3c00bd7dba
--- /dev/null
+++ b/cesar/cl/src/cl.c
@@ -0,0 +1,691 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/src/cl.c
+ * \brief private function for the Covnergence Layer
+ * \ingroup cl
+ *
+ */
+
+#include "common/std.h"
+#include "common/defs/ethernet.h"
+#include "lib/read_word.h"
+
+#include "cl/cl.h"
+#include "mac/sar/sar.h"
+#include "mac/pbproc/pbproc.h"
+
+#include "cl/inc/context.h"
+#include "cl/inc/cl.h"
+#include "cl/inc/trace.h"
+#include "cl/inc/cl_mactotei.h"
+
+#include "mac/common/ntb.h"
+
+static struct cl_t cl_global;
+
+/**
+ * Init the Convergence Layer and return a pointer on the CL context.
+ *
+ * \param mac_store the mac store.
+ * \param sar the sar context.
+ * \param mac_config the mac config.
+ * \return the convergence layer context.
+ */
+cl_t *cl_init (mac_store_t *mac_store, sar_t *sar, mac_config_t *mac_config)
+{
+ cl_t *ctx;
+
+ dbg_assert (mac_store);
+ dbg_assert (sar);
+ dbg_assert (mac_config);
+
+ ctx = &cl_global;
+
+ cl_global.mac_store = mac_store;
+
+ /* Initialize the SAR */
+ cl_global.sar = sar;
+
+ // MME part
+ sar_init_mme_context (cl_global.sar, &cl_global);
+ sar_init_segmentation_mme_cb (cl_global.sar,
+ (sar_segmentation_done_cb_t) cl_mme_sar_send_done);
+ sar_init_reassembly_mme_cb (cl_global.sar,(sar_reassembly_done_cb_t) cl_mme_recv);
+
+ sar_mme_buffer_add (cl_global.sar, cl_global.mme_buffer);
+
+ // Data TX part
+ sar_init_data_context (cl_global.sar, &cl_global);
+ sar_init_segmentation_data_cb (cl_global.sar,
+ (sar_segmentation_done_cb_t) cl_data_send_done);
+
+ // DATA RX part
+ sar_init_reassembly_data_cb (cl_global.sar, (sar_reassembly_done_cb_t)cl_data_recv);
+
+ /* Initialize the random generator */
+ lib_rnd_init (&cl_global.random_generator, mac_config->seed ^ 0x45972612);
+
+ /* init the mme */
+ cl_mme_init (&cl_global.mme);
+
+ /* init the cl_mactotei table */
+ cl_global.mactotei = NULL;
+
+ /* init the cl mme buffer to null */
+ cl_global.mme_ul_send.cb = NULL;
+ cl_global.mme_ul_send.user = NULL;
+
+ /* add the mac_config */
+ cl_global.mac_config = mac_config;
+
+ /* Initialize the trace system. */
+ cl_trace_init (ctx);
+
+ CL_TRACE (INIT, mac_ntb());
+
+ return &cl_global;
+}
+
+/**
+ * Init the MME module of the CL
+ *
+ * \param ctx the mme context.
+ */
+void cl_mme_init (cl_mme_t *ctx)
+{
+ dbg_assert (ctx);
+
+ ctx->ul_mme_recv_done = NULL;
+ ctx->ul_mme_recv_done_user_data = NULL;
+}
+
+/**
+ * Uninit the Convergence layer context.
+ *
+ * \param ctx the convergence layer context
+ */
+void cl_uninit (cl_t *ctx)
+{
+ dbg_assert (ctx);
+
+ CL_TRACE (UNINIT, mac_ntb());
+
+ if (ctx->mactotei)
+ {
+ cl_mactotei_release_table (ctx);
+ }
+
+ cl_trace_uninit(ctx);
+}
+
+/**
+ * Initialize the CL to call the Upper layer once the CP ends processing the
+ * MME.
+ * Used each time the CP needs to send an MME to the upper layer.
+ *
+ * \param ctx the CL context
+ * \param cb the upper layer callback to use to send an MME.
+ * \param user the user data to provide with the callback
+ */
+void cl_mme_ul_init_send_done (cl_t *ctx, cl_mme_ul_recv_done_cb_t cb,
+ void *user)
+{
+ dbg_assert (ctx);
+ dbg_assert (cb);
+
+ ctx->mme.ul_mme_recv_done = cb;
+ ctx->mme.ul_mme_recv_done_user_data = user;
+}
+
+/**
+ * Init the function call when an MME is recived from the SAR or the HLE.
+ * The CP registers its callback to allow the CL to call it each time a MME
+ * is receved from the PLC or the HLE.
+ *
+ * \param ctx the CL ctx
+ * \param mme_recv_cb
+ * \param user_data the user data
+ */
+void cl_mme_recv_init (cl_t *ctx, cl_mme_recv_cb_t mme_recv_cb, void
+*user_data)
+{
+ dbg_assert (ctx);
+ dbg_assert (mme_recv_cb);
+
+ ctx->mme.mme_recv_cb = mme_recv_cb;
+ ctx->mme.mme_recv_user_data = user_data;
+}
+
+/**
+ * Initialize the CL to send MMEs to the Upper layer considered as data.
+ * Used each time the CP needs to send an MME to the upper layer.
+ *
+ * \param ctx the CL context
+ * \param cb the upper layer callback to use to send an MME.
+ * \param user the user data to provide with the callback
+ */
+void cl_mme_init_ul_as_data (cl_t *ctx, cl_mme_ul_send_done_cb_t cb,
+ void *user)
+{
+ dbg_assert (ctx);
+ dbg_assert (cb);
+
+ ctx->mme_ul_send.cb = cb;
+ ctx->mme_ul_send.user = user;
+ ctx->mme_ul_send.mme_buffer = NULL;
+}
+
+/**
+ * Initialize the CP call back to get a buffer.
+ *
+ * \param cl the cl context
+ * \param cb the call back function
+ * \param user_data the user data.
+ */
+void cl_mme_init_buffer_add_cb (cl_t *cl, cl_mme_buffer_add_cb_t cb,
+ void *user_data)
+{
+ dbg_assert (cl);
+ dbg_assert (cb);
+
+ cl->mme.mme_buffer_add_cb = cb;
+ cl->mme.mme_buffer_add_user_data = user_data;
+}
+
+/**
+ * Send an MME from the CP to the PLC via the SAR MME way.
+ *
+ * \param ctx the CL context
+ * \param buffer the buffer containing the MME
+ * \param length the length of the MME
+ * \param mfs the MFS use for the SAR if the MME should be send over the PLC
+ */
+void cl_mme_send_as_mme (cl_t *ctx, u8 *buffer, uint length, mfs_tx_t *mfs)
+{
+ dbg_assert (ctx);
+ dbg_assert (buffer);
+ dbg_assert (length >= ETH_PACKET_MIN_SIZE && length <= ETH_PACKET_MAX_SIZE);
+ dbg_assert (mfs);
+ dbg_assert (ctx->sar);
+ dbg_assert (mfs->common.mme);
+
+ CL_TRACE (MME_SEND_AS_MME, mac_ntb(), length, buffer, mfs->common.tei);
+
+ sar_msdu_add (ctx->sar, buffer, length,
+ lib_rnd32 (&ctx->random_generator), mfs);
+}
+
+/**
+ * Send an MME as a data packet from the CP to the PLC or to the upper layer.
+ *
+ * \param ctx the CL context
+ * \param buffer the buffer containing the MME
+ * \param length the length of the MME
+ */
+void cl_mme_send_as_data (cl_t *ctx, u8 *buffer, uint length)
+{
+ mac_t mac;
+ uint tei;
+
+ dbg_assert (ctx);
+ dbg_assert (buffer);
+ dbg_assert (length >= ETH_PACKET_MIN_SIZE && length <= ETH_PACKET_MAX_SIZE);
+
+ CL_TRACE (MME_SEND_AS_DATA, mac_ntb(), length, buffer);
+
+ ctx->mme_ul_send.mme_buffer = buffer;
+
+ /* If a mac to tei table does not exist send to the hle. */
+ if (ctx->mactotei == NULL)
+ {
+ CL_TRACE (DATA_SEND, mac_ntb(), buffer, length, 0, 0, 0);
+ dbg_assert (ctx->mme_ul_send.cb);
+ (*ctx->mme_ul_send.cb) (ctx->mme_ul_send.user, buffer, length);
+ }
+ else
+ {
+ mac = read_u48_from_word (buffer);
+
+ /* Get the TEI from the mactotei table. */
+ tei = cl_mactotei_table_find_tei_from_mac (ctx, mac & 0x0000FFFFFFFFFFFFull);
+
+ if (tei == 0 || tei == ctx->mac_config->tei)
+ {
+ CL_TRACE (DATA_SEND, mac_ntb(), buffer, length, 0, 0, 0);
+ dbg_assert (ctx->mme_ul_send.cb);
+ (*ctx->mme_ul_send.cb) (ctx->mme_ul_send.user, buffer, length);
+ }
+ else
+ {
+ cl_data_send_with_tei(ctx, buffer, length, tei);
+ }
+ }
+}
+
+/**
+ * Callback called by the sar when a MME as been sent over the PWL.
+ *
+ * \param ctx the cl context.
+ * \param buffer the buffer used.
+ */
+void cl_mme_sar_send_done (cl_t *ctx, u8 *buffer)
+{
+ dbg_assert (ctx);
+ dbg_assert (buffer);
+
+ CL_TRACE (MME_BUFFER_ADD, mac_ntb(), buffer);
+ cl_mme_buffer_add (ctx, buffer);
+}
+
+/**
+ * Receives an MME from the SAR or the upper layer.
+ * This function is called each time the SAR or the HLE has an MME to send to
+ * the CP. It is used by the inline function.
+ * When the MFS is NULL the MME received comes from the HLE. Otherwise the MME
+ * comes from the SAR.
+ *
+ * \param ctx the cl context
+ * \param buffer the MME buffer
+ * \param length the MME length
+ * \param mfs the MFS used in the reassembly process.
+ * \param encryption if the mac frame comes from the SAR if returns the
+ * state of the encryption.
+ */
+void cl_mme_recv (cl_t *ctx, u8 *buffer, uint length, mfs_rx_t *mfs, bool
+ encryption)
+{
+ dbg_assert (ctx);
+
+ dbg_assert (ctx->mme.mme_recv_cb);
+ dbg_assert (buffer);
+ dbg_assert (length >= ETH_PACKET_MIN_SIZE && length <= ETH_PACKET_MAX_SIZE);
+
+ ctx->mme.mme_recv.buffer = buffer;
+
+ CL_TRACE (MME_RECV, mac_ntb(), length, buffer, ctx->mme.mme_recv.sar);
+
+ if (mfs)
+ ctx->mme.mme_recv.sar = true;
+ else
+ ctx->mme.mme_recv.sar = false;
+
+ (*ctx->mme.mme_recv_cb) (ctx->mme.mme_recv_user_data, mfs, buffer, length,
+ &ctx->mme.mme_recv, encryption);
+}
+
+/**
+ * The CP inform the CL that the buffer contaning previously a receved MME can
+ * be use again to store another MME if necessary.
+ *
+ * \param ctx the CL context
+ * \param mme_recv the data provided on the previous callback.
+ */
+void cl_mme_recv_done (cl_t *ctx, cl_mme_recv_t *mme_recv)
+{
+ dbg_assert (ctx);
+ dbg_assert (mme_recv);
+ dbg_assert (mme_recv->buffer);
+
+ CL_TRACE (MME_RECV_DONE, mac_ntb(), mme_recv->buffer, mme_recv->sar);
+
+ if (mme_recv->sar)
+ {
+ dbg_assert (ctx->sar);
+ sar_mme_buffer_add (ctx->sar, mme_recv->buffer);
+ }
+ else
+ {
+ dbg_assert (ctx->mme.ul_mme_recv_done);
+
+ (*ctx->mme.ul_mme_recv_done) (ctx->mme.ul_mme_recv_done_user_data,
+ mme_recv->buffer);
+ }
+}
+
+/**
+ * Copy all the lines of the CL mactotei table to the table provided in
+ * paramter without all the lines which the tag corresponds to the parameter
+ * tag.
+ *
+ * Sample : cl_mactotei_copy_table_excluding_tag (cl, table, 2), will copy all
+ * the mac to tei lines of the CL table without those where the tag value is 2.
+ *
+ * \param ctx the convergence layer context
+ * \param table the mactotei new table to fill
+ * \param tag the tag to exclude from the copy
+ */
+void cl_mactotei_copy_table_excluding_tag (cl_t *ctx,
+ cl_mactotei_blk_t *table, u8 tag)
+{
+ dbg_assert (ctx);
+ dbg_assert (ctx->mactotei);
+ dbg_assert (table);
+
+ CL_TRACE (MACTOTEI_COPY, mac_ntb(), table, tag);
+
+ cl_mactotei_copy (ctx->mactotei, table, tag);
+}
+
+/**
+ * Request the CL to use the new table and remove the old one.
+ *
+ * \param ctx the CL context
+ * \param table the new table to use.
+ */
+void cl_mactotei_use_table (cl_t *ctx, cl_mactotei_blk_t *table)
+{
+ dbg_assert (ctx);
+ dbg_assert (table);
+
+ CL_TRACE (MACTOTEI_USE, mac_ntb(), table);
+
+ /** add the table to the CL context */
+ cl_mactotei_switch_table (ctx, cl_mactotei_generate_table (table));
+}
+
+/**
+ * Swith the old mactotei table with the new one.
+ *
+ * \param ctx the convergence layer context
+ * \param table the table to switch
+ */
+void cl_mactotei_switch_table (cl_t *ctx, cl_mactotei_table_t *table)
+{
+ dbg_assert (ctx);
+ dbg_assert (table);
+
+ if (ctx->mactotei)
+ {
+ CL_TRACE (MACTOTEI_RELEASE, mac_ntb(), ctx->mactotei);
+ cl_mactotei_release_table_intern (ctx->mactotei);
+ }
+ ctx->mactotei = table;
+}
+
+/**
+ * Release the complete table from the memory.
+ *
+ * \param ctx the convergence layer context
+ */
+void cl_mactotei_release_table (cl_t *ctx)
+{
+ dbg_assert (ctx);
+ dbg_assert (ctx->mactotei);
+
+ CL_TRACE (MACTOTEI_RELEASE, mac_ntb(), ctx->mactotei);
+ cl_mactotei_release_table_intern (ctx->mactotei);
+ ctx->mactotei = NULL;
+}
+
+/**
+ * Find a mac address in the table using a dichotomy search
+ *
+ * \param ctx the convergence layer context.
+ * \param mac the mac address to find
+ * \return the tei corresponding to the mac address if known otherwise it
+ * returns 0x0 if tei not found
+ */
+uint cl_mactotei_table_find_tei_from_mac (cl_t *ctx, mac_t mac)
+{
+ uint index;
+ cl_mactotei_t mactotei;
+
+ dbg_assert (ctx);
+ dbg_assert (ctx->mactotei);
+
+ DICHOTOMY_SEARCH (0, ctx->mactotei->nb_total, index, mac
+ <= cl_mactotei_table_get_mac_at (ctx->mactotei, index));
+
+ if (index < ctx->mactotei->nb_total)
+ {
+ mactotei = cl_mactotei_table_get_mactotei_at (ctx->mactotei, index);
+
+ if (mactotei.mac != mac)
+ {
+ CL_TRACE (MACTOTEI_FIND_TEI, mac_ntb(), TRACE_U64(mac), false, 0x0);
+ return 0x0;
+ }
+ else
+ {
+ CL_TRACE (MACTOTEI_FIND_TEI, mac_ntb(), TRACE_U64(mac), true, mactotei.tei);
+ return mactotei.tei;
+ }
+ }
+
+ CL_TRACE (MACTOTEI_FIND_TEI, mac_ntb(), TRACE_U64(mac), false, 0x0);
+ return 0x0;
+}
+
+/**
+ * Search for the lid in the classifier
+ *
+ * \param ctx CL context
+ * \param tei the tei found previously by the mactotei table.
+ * \param bcast put true if the link is a bcast one, false otherwise.
+ * \param acs put true if the link should be process by the acs
+ * \param drop put true if the data should be drop.
+ */
+uint cl_classifer_get_lid (cl_t *ctx, uint tei, bool *bcast, bool *acs,
+ bool *drop)
+{
+ if (tei == 0xff)
+ {
+ *bcast = true;
+ }
+ else
+ {
+ *bcast = false;
+ }
+
+ *acs = false;
+ *drop = false;
+
+ CL_TRACE (CLASSIFIER, mac_ntb(), tei, *bcast, *acs, *drop, 1);
+
+ /** TODO fill the clissifier */
+ return 1;
+}
+
+/**
+ * Initialize the callback to inform the upper layer when a data had been sent
+ * over the PLC.
+ *
+ * \param cl the CL context
+ * \param cb the callback to call once the data had been sent
+ * \param user the user data to provide with the callback call
+ */
+void cl_data_send_done_init (cl_t *cl, cl_data_send_done_cb_t cb, void *user)
+{
+ dbg_assert (cl);
+ dbg_assert (cb);
+
+ cl->data_tx.cb = cb;
+ cl->data_tx.user = user;
+}
+
+/**
+ * Send a data from the upper layer to the SAR, this data should be sent over
+ * the PLC.
+ *
+ * \param ctx the CL context.
+ * \param buffer the buffer containing the data to send
+ * \param length the data length
+ */
+void cl_data_send (cl_t *ctx, u8 *buffer, uint length)
+{
+ uint tei;
+ mac_t mac;
+
+ dbg_assert (ctx);
+ dbg_assert (buffer);
+ dbg_assert (length >= ETH_PACKET_MIN_SIZE && length <= ETH_PACKET_MAX_SIZE);
+ dbg_assert (ctx->mactotei);
+
+ if (!ctx->mac_config->authenticated)
+ {
+ (*ctx->data_tx.cb) (ctx->data_tx.user, buffer);
+ CL_TRACE (DATA_SEND_DROP, mac_ntb(), ctx->mac_config->authenticated, buffer,
+ length);
+ return;
+ }
+
+ mac = read_u48_from_word (buffer);
+
+ /* Get the TEI from the mactotei table. */
+ tei = cl_mactotei_table_find_tei_from_mac (ctx, mac & 0x0000FFFFFFFFFFFFull);
+
+ dbg_assert (tei != ctx->mac_config->tei);
+ // if the TEI is not found the packet is send as broadcast.
+ cl_data_send_with_tei (ctx, buffer, length, tei == 0 ? 0xFF : tei);
+}
+
+/**
+ * Send a data once the TEI has been find.
+ *
+ * \param ctx the cl context.
+ * \param buffer the buffer containing the data to send.
+ * \param length the buffer data length.
+ * \param tei the tei found from the cl_mactotei list.
+ */
+void
+cl_data_send_with_tei (cl_t *ctx, u8 *buffer, uint length, uint tei)
+{
+ uint lid;
+ bool bcast;
+ bool acs;
+ bool drop;
+ mfs_tx_t *mfs;
+
+ dbg_assert (ctx);
+ dbg_assert (buffer);
+ dbg_assert (length >= ETH_PACKET_MIN_SIZE && length <=
+ ETH_PACKET_MAX_SIZE);
+ dbg_assert (tei);
+
+ /* Get some data from the classifier. */
+ lid = cl_classifer_get_lid (ctx, tei, &bcast, &acs, &drop);
+
+ /* try to get the mfs from the store. */
+ mfs = mac_store_mfs_get_tx (ctx->mac_store, bcast, false, lid, tei);
+
+ if (!drop && !acs && mfs)
+ {
+ CL_TRACE (DATA_SEND, mac_ntb(), buffer, length, mfs->common.tei, mfs->common.lid,
+ mfs->common.bcast);
+ sar_msdu_add (ctx->sar, buffer, length, mac_ntb(), mfs);
+
+ /* release the mfs */
+ blk_release (mfs);
+
+ }
+ else
+ {
+ CL_TRACE (DATA_SEND_DROP, mac_ntb(), buffer, length);
+ dbg_assert (ctx->data_tx.cb);
+ (*ctx->data_tx.cb) (ctx->data_tx.user, buffer);
+ }
+}
+
+/**
+ * The SAR inform the CL that the data previously provided had been sent over
+ * the PLC.
+ *
+ * \param ctx the CL context.
+ * \param buffer the buffer containing the MME
+ */
+void cl_data_send_done (cl_t *ctx, u8 *buffer)
+{
+ dbg_assert (ctx);
+ dbg_assert (buffer);
+
+ CL_TRACE (DATA_SEND_DONE, mac_ntb(), buffer);
+
+ /* Compare the buffer address with the MME buffer address. */
+ if (ctx->mme_ul_send.mme_buffer == buffer)
+ {
+ cl_mme_buffer_add(ctx, buffer);
+ ctx->mme_ul_send.mme_buffer = NULL;
+ }
+ else
+ {
+ dbg_assert (ctx->data_tx.cb);
+ (*ctx->data_tx.cb) (ctx->data_tx.user, buffer);
+ }
+}
+
+/**
+ * Initialize the callback to receive the data from the PLC.
+ *
+ * \param cl the CL context
+ * \param cb the function callback to call
+ * \param user the user data to provide on the callback.
+ */
+void cl_data_recv_init (cl_t *cl, cl_data_recv_cb_t cb, void *user)
+{
+ dbg_assert (cl);
+ dbg_assert (cb);
+
+ cl->data_rx.cb = cb;
+ cl->data_rx.user = user;
+}
+
+/**
+ * Called by the SAR each time it has a data to provide to the CL.
+ *
+ * \param ctx the CL context
+ * \param buffer the buffer containing the data to send to the Upper layer.
+ * \param length the data length in the buffer
+ * \param mfs the mfs used to receive the data.
+ */
+void cl_data_recv (cl_t *ctx, u8 *buffer, uint length, mfs_rx_t *mfs)
+{
+ dbg_assert (ctx);
+ dbg_assert (buffer);
+ dbg_assert (length >= ETH_PACKET_MIN_SIZE && length <= ETH_PACKET_MAX_SIZE);
+ dbg_assert (mfs);
+
+ dbg_assert (ctx->data_rx.cb);
+
+ CL_TRACE (DATA_RECV, mac_ntb(), buffer, length);
+
+ (*ctx->data_rx.cb) (ctx->data_rx.user, buffer, length);
+}
+
+/**
+ * Provides a buffer to the CP.
+ *
+ * \param ctx the CL context
+ * \param buffer the buffer to reassembly some datas
+ */
+void cl_mme_buffer_add (cl_t *ctx, u8 *buffer)
+{
+ dbg_assert (ctx);
+ dbg_assert (buffer);
+
+ CL_TRACE (MME_BUFFER_ADD, mac_ntb(), buffer);
+ dbg_assert (ctx->mme.mme_buffer_add_cb);
+ (*ctx->mme.mme_buffer_add_cb) (ctx->mme.mme_buffer_add_user_data, buffer);
+}
+
+/**
+ * Provides a buffer to the SAR to reassembly data
+ *
+ * \param ctx the CL context
+ * \param buffer the buffer to reassembly some datas
+ */
+void cl_data_buffer_add (cl_t *ctx, u8 *buffer)
+{
+ dbg_assert (ctx);
+ dbg_assert (buffer);
+
+ CL_TRACE (DATA_BUFFER_ADD, mac_ntb(), buffer);
+
+ sar_data_buffer_add (ctx->sar, buffer);
+}
+
diff --git a/cesar/cl/src/cl_mactotei.c b/cesar/cl/src/cl_mactotei.c
new file mode 100644
index 0000000000..9e51dd8eab
--- /dev/null
+++ b/cesar/cl/src/cl_mactotei.c
@@ -0,0 +1,280 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/src/cl_mactotei.c
+ * \brief the function implementation of the cl_mactotei module
+ * \ingroup cl/src
+ *
+ */
+
+#include "common/std.h"
+#include "lib/blk.h"
+
+#include "cl/cl.h"
+#include "cl/inc/cl_mactotei.h"
+#include "cl/inc/cl.h"
+
+#define LIB_HEAPSORT_USER_TYPE cl_mactotei_table_t
+#define LIB_HEAPSORT_USER_COMP_LESSER cl_mactotei_table_compare
+#define LIB_HEAPSORT_USER_SWAP cl_mactotei_table_swap
+#define LIB_HEAPSORT_USER_PREFIX cl_mactotei_table
+
+#include "lib/heapsort.h"
+
+/**
+ * Create a new table to be filled by the CP.
+ *
+ * \return a pointer to the new block to be fill with the mac to tei table
+ * data
+ */
+cl_mactotei_blk_t *cl_mactotei_new (void)
+{
+ cl_mactotei_blk_t *table;
+
+ table = (cl_mactotei_blk_t *) blk_alloc_desc ();
+ table->nb_total = 0;
+ table->next = NULL;
+ table->write_pos = table;
+
+ return table;
+}
+
+/**
+ * Request the CL to copy all the data without the coresponding tag provided
+ * in this function paramater.
+ *
+ * \param table_old the table actually use by the CL
+ * \param table the mactotei new table to fill
+ * \param tag the tag to exclude from the copy
+ */
+void cl_mactotei_copy (cl_mactotei_table_t *table_old,
+ cl_mactotei_blk_t *table, u8 tag)
+{
+ cl_mactotei_blk_t *curr;
+ uint count;
+
+ dbg_assert (table_old);
+ dbg_assert (table);
+
+ for (count = 0, curr = table_old->first; count < table_old->nb_total; count ++)
+ {
+ if (count != 0 && count % MAX_NB_MACTOTEI == 0)
+ {
+ curr = curr->next;
+ }
+
+ if (curr->data[count].tag != tag)
+ {
+ cl_mactotei_addr_add (table, curr->data[count].mac,
+ curr->data[count].tei, curr->data[count].tag);
+ }
+ }
+}
+
+/**
+ * Add a new tupple of data to the table.
+ *
+ * \param table the table pointer to add a new mac to tei correspondance.
+ * \param mac_addr the mac addr to add
+ * \param tei the tei corresponding to the STA.
+ * \param tag the CP tag provide to indentifier a network.
+ */
+void cl_mactotei_addr_add (cl_mactotei_blk_t *table, mac_t mac_addr,
+ uint tei, uint tag)
+{
+ dbg_assert (table);
+ uint pos;
+
+ pos = table->nb_total % MAX_NB_MACTOTEI;
+
+ /* if the nb_total is not a multiple of 64 add a the new mac addr to the
+ * current block. */
+ if (table->nb_total != 0 && pos == 0)
+ {
+ table->write_pos->next = (cl_mactotei_blk_t *) blk_alloc_desc ();
+ table->write_pos = table->write_pos->next;
+ table->write_pos->next = NULL;
+ }
+
+ table->write_pos->data[pos].mac = mac_addr;
+ table->write_pos->data[pos].tei = tei;
+ table->write_pos->data[pos].tag = tag;
+
+ table->nb_total ++;
+}
+
+/**
+ * Genrate the table which will be use by the CL.
+ *
+ * \param table the new table to use.
+ * \return the table
+ */
+cl_mactotei_table_t *cl_mactotei_generate_table (cl_mactotei_blk_t *table)
+{
+ dbg_assert (table);
+
+ uint nb_blocks;
+ uint nb_slots_available;
+ uint count;
+ cl_mactotei_table_t *the_table;
+ cl_mactotei_blk_t *mactotei_blk_curr;
+
+ /** Generate the last table */
+
+ if (table->nb_total % MAX_NB_MACTOTEI != 0)
+ {
+ nb_blocks = table->nb_total / MAX_NB_MACTOTEI + 1;
+ }
+ else
+ {
+ nb_blocks = table->nb_total / MAX_NB_MACTOTEI;
+ }
+
+ if ((nb_slots_available = table->nb_total % MAX_NB_MACTOTEI))
+ {
+ nb_slots_available = MAX_NB_MACTOTEI - nb_slots_available;
+ /** the current slots are */
+ nb_slots_available = nb_slots_available << 1;
+ }
+
+ if (nb_slots_available < nb_blocks)
+ {
+ table->write_pos->next = (cl_mactotei_blk_t *) blk_alloc_desc ();
+ table->write_pos = table->write_pos->next;
+ table->write_pos->next = NULL;
+
+ the_table = (cl_mactotei_table_t *) table->write_pos->data;
+ }
+ else
+ {
+ the_table
+ = (cl_mactotei_table_t *) &table->write_pos->data[table->nb_total % MAX_NB_MACTOTEI];
+ }
+
+ /** fill the table */
+ the_table->first = table;
+ the_table->nb_total = table->nb_total;
+ the_table->nb_blocks = nb_blocks;
+
+ for (count = 0, mactotei_blk_curr = table; count < nb_blocks; count ++,
+ mactotei_blk_curr = mactotei_blk_curr->next)
+ {
+ the_table->blk[count] = mactotei_blk_curr;
+ }
+
+ lib_heapsort (the_table, the_table->nb_total);
+ return the_table;
+}
+
+/**
+ * Release the complete table from the memory.
+ *
+ * \param table the table to release
+ */
+void cl_mactotei_release_table_intern (cl_mactotei_table_t *table)
+{
+ cl_mactotei_blk_t *block_curr;
+ cl_mactotei_blk_t *block_next;
+
+ block_next = table->first;
+ block_curr = block_next;
+
+ while (block_curr)
+ {
+ block_next = block_next->next;
+ blk_release_desc ((blk_t *) block_curr);
+ block_curr = block_next;
+ }
+}
+
+/**
+ * Return the cl_mactotei value of the item at the position request.
+ *
+ * \param table the mactotei table
+ * \param position the position request.
+ * \return mac address
+ */
+cl_mactotei_t cl_mactotei_table_get_mactotei_at (cl_mactotei_table_t *table,
+ uint position)
+{
+ uint block_position;
+
+ dbg_assert (table);
+ dbg_assert (position < table->nb_total);
+
+ block_position = position / MAX_NB_MACTOTEI;
+ position = position % MAX_NB_MACTOTEI;
+
+ dbg_assert (table->blk[block_position]);
+
+ return table->blk[block_position]->data[position];
+}
+
+/**
+ * Set the cl_mactotei value at the position request.
+ *
+ * \param table the mactotei table
+ * \param position the position request.
+ * \param mactotei the mac to tei data to set.
+ */
+void cl_mactotei_table_set_mactotei_at (cl_mactotei_table_t *table,
+ uint position, cl_mactotei_t mactotei)
+{
+ uint block_position;
+
+ dbg_assert (table);
+ dbg_assert (position < table->nb_total);
+
+ block_position = position / MAX_NB_MACTOTEI;
+ position = position % MAX_NB_MACTOTEI;
+
+ dbg_assert (table->blk[block_position]);
+
+ table->blk[block_position]->data[position] = mactotei;
+}
+
+/**
+ * Compare two values in the table and return true if the value at the
+ * first position is lesser than the one at the second position.
+ *
+ * \param table the table to make the comparation.
+ * \param position1 the position of the first position.
+ * \param position2 the second position.
+ * \return true if the first value is lesser than the second one.
+ */
+bool cl_mactotei_table_compare (cl_mactotei_table_t *table, uint position1,
+ uint position2)
+{
+ dbg_assert (table);
+
+ if (cl_mactotei_table_get_mac_at (table, position1)
+ < cl_mactotei_table_get_mac_at (table, position2))
+ return true;
+ else
+ return false;
+}
+
+/**
+ * Swap two values in the table.
+ *
+ * \param table the table to make the comparation.
+ * \param position1 the position of the first position.
+ * \param position2 the second position.
+ */
+void cl_mactotei_table_swap (cl_mactotei_table_t *table, uint position1,
+ uint position2)
+{
+ cl_mactotei_t tmp;
+
+ dbg_assert (table);
+
+ tmp = cl_mactotei_table_get_mactotei_at (table, position1);
+ cl_mactotei_table_set_mactotei_at (table, position1,
+ cl_mactotei_table_get_mactotei_at (table, position2));
+ cl_mactotei_table_set_mactotei_at (table, position2, tmp);
+}
diff --git a/cesar/cl/src/trace.c b/cesar/cl/src/trace.c
new file mode 100644
index 0000000000..d7899ece79
--- /dev/null
+++ b/cesar/cl/src/trace.c
@@ -0,0 +1,78 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/src/trace.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "cl/cl.h"
+#include "cl/inc/trace.h"
+
+#include "cl/inc/context.h"
+
+/**
+ * Initialize the trace buffer
+ * \param ctx the cl context
+ */
+void
+cl_trace_init (cl_t *ctx)
+{
+ static trace_namespace_t namespace;
+ static const trace_event_id_t event_ids[] =
+ {
+ TRACE_EVENT (CL_TRACE_INIT, "CL_INIT", TIMESTAMP),
+ TRACE_EVENT (CL_TRACE_UNINIT, "CL_UNINIT", TIMESTAMP),
+ TRACE_EVENT (CL_TRACE_MME_SEND_AS_MME, "CL_MME_SEND_AS_MME length : %d, buffer @ : %x, dtei : %d", TIMESTAMP),
+ TRACE_EVENT (CL_TRACE_MME_SEND_AS_DATA, "CL_MME_SEND_AS_DATA length : %d, buffer @ : %x", TIMESTAMP),
+ TRACE_EVENT (CL_TRACE_MME_BUFFER_ADD, "CL_MME_BUFFER_ADD buffer @ : %x", TIMESTAMP),
+ TRACE_EVENT (CL_TRACE_MME_RECV, "CL_MME_RECV length : %d, buffer @ : %x, from sar : %d", TIMESTAMP),
+ TRACE_EVENT (CL_TRACE_MME_RECV_DONE, "CL_MME_RECV_DONE buffer @ : %x, from sar : %d", TIMESTAMP),
+ TRACE_EVENT (CL_TRACE_MACTOTEI_COPY, "CL_MACTOTEI_COPY table @ : %x, tag : %d", TIMESTAMP),
+ TRACE_EVENT (CL_TRACE_MACTOTEI_USE, "CL_MACTOTEI_USE table @ : %x", TIMESTAMP),
+ TRACE_EVENT (CL_TRACE_MACTOTEI_RELEASE, "CL_MACTOTEI_RELEASE table @ : %x", TIMESTAMP),
+ TRACE_EVENT (CL_TRACE_MACTOTEI_FIND_TEI, "CL_MACTOTEI_FIND_TEI mac @ : %m, found %d, tei use : %x", TIMESTAMP),
+ TRACE_EVENT (CL_TRACE_CLASSIFIER, "CL_CLASSIFIER tei : %x, bcast %d, acs : %d, drop : %d, lid : %x", TIMESTAMP),
+ TRACE_EVENT (CL_TRACE_DATA_SEND, "CL_DATA_SEND buffer @ : %x, length : %d, tei : %x, lid : %x, bcast : %d", TIMESTAMP),
+ TRACE_EVENT (CL_TRACE_DATA_SEND_DROP, "CL_DATA_SEND_DROP authenticated : %d, buffer @ : %x, length : %d", TIMESTAMP),
+ TRACE_EVENT (CL_TRACE_DATA_SEND_DONE, "CL_DATA_SEND_DONE buffer @ : %x", TIMESTAMP),
+ TRACE_EVENT (CL_TRACE_DATA_RECV, "CL_DATA_RECV buffer @ : %x, length : %d", TIMESTAMP),
+ TRACE_EVENT (CL_TRACE_DATA_BUFFER_ADD, "CL_DATA_BUFFER_ADD buffer @ : %x", TIMESTAMP)
+ };
+ dbg_assert (ctx);
+ trace_namespace_init (&namespace, event_ids, COUNT (event_ids));
+ trace_buffer_add (&ctx->trace, "cl", 8, 4, true, &namespace);
+}
+
+/**
+ * Uninitialize the trace buffer
+ * \param ctx the cl context.
+ */
+void
+cl_trace_uninit(cl_t *ctx)
+{
+ dbg_assert (ctx);
+ trace_buffer_remove (&ctx->trace);
+}
+
+/**
+ * Print the trace
+ * \param ctx the cl context.
+ */
+void
+cl_trace_print (cl_t *ctx)
+{
+ dbg_assert (ctx);
+
+ trace_buffer_dbg_dump(&ctx->trace);
+}
+
+
diff --git a/cesar/cl/test/Makefile b/cesar/cl/test/Makefile
new file mode 100644
index 0000000000..cf15834875
--- /dev/null
+++ b/cesar/cl/test/Makefile
@@ -0,0 +1,39 @@
+BASE = ../..
+
+INCLUDES = cl/test/overide
+
+HOST_PROGRAMS = cl_mactotei_api cl_mactotei_heapsort cl_mactotei_find \
+ cl_recv_data cl_send_data cl_mme_send_as_mme cl_mme_send_as_data \
+ cl_mme_recv
+
+cl_mactotei_api_SOURCES = cl_mactotei_api.c phy_stub.c
+cl_mactotei_api_MODULES = lib cl cl/test/overide/mac/sar mac/common \
+ mac/sar/test
+
+cl_mactotei_heapsort_SOURCES = cl_mactotei_heapsort.c phy_stub.c
+cl_mactotei_heapsort_MODULES = lib cl cl/test/overide/mac/sar mac/common \
+ mac/sar/test
+
+cl_mactotei_find_SOURCES = cl_mactotei_find.c phy_stub.c
+cl_mactotei_find_MODULES = lib cl cl/test/overide/mac/sar mac/common \
+ mac/sar/test
+
+cl_recv_data_SOURCES = cl_recv_data.c phy_stub.c
+cl_recv_data_MODULES = lib cl cl/test/overide/mac/sar mac/common mac/sar/test
+
+cl_send_data_SOURCES = cl_send_data.c phy_stub.c
+cl_send_data_MODULES = lib cl cl/test/overide/mac/sar mac/common mac/sar/test
+
+cl_mme_send_as_mme_SOURCES = cl_mme_send_as_mme.c phy_stub.c
+cl_mme_send_as_mme_MODULES = lib cl cl/test/overide/mac/sar mac/common \
+ mac/sar/test
+
+cl_mme_send_as_data_SOURCES = cl_mme_send_as_data.c phy_stub.c
+cl_mme_send_as_data_MODULES = lib cl cl/test/overide/mac/sar mac/common \
+ mac/sar/test
+
+cl_mme_recv_SOURCES = cl_mme_recv.c phy_stub.c
+cl_mme_recv_MODULES = lib cl cl/test/overide/mac/sar mac/common \
+ mac/sar/test
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/cl/test/overide/mac/sar/Module b/cesar/cl/test/overide/mac/sar/Module
new file mode 100644
index 0000000000..6895690f35
--- /dev/null
+++ b/cesar/cl/test/overide/mac/sar/Module
@@ -0,0 +1 @@
+SOURCES := sar.c \ No newline at end of file
diff --git a/cesar/cl/test/overide/mac/sar/sar.h b/cesar/cl/test/overide/mac/sar/sar.h
new file mode 100644
index 0000000000..229ac64369
--- /dev/null
+++ b/cesar/cl/test/overide/mac/sar/sar.h
@@ -0,0 +1,162 @@
+#ifndef SAR_H_
+#define SAR_H_
+
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file sar.h
+ * \brief The SAR overwrite.
+ * \ingroup cl/test/inc/sar.h
+ *
+ */
+
+#include "mac/common/mfs.h"
+#include "mac/common/store.h"
+#include "mac/pbproc/pbproc.h"
+
+/**
+ * Segmentation job done for the segmentation module, it send a data to inform
+ * the upper layer that a job had been processed.
+ *
+ * \param user upper layer context
+ * \param buffer the buffer which is no more used.
+ * \param length the length of the buffer.
+ * \param mfs the mfs correponding to the payload in the buffer.
+ *
+ * The MFS reference is given to the CL it do not make a addref on it.
+ */
+typedef void (*sar_segmentation_done_cb_t) (void *user, u8* buffer);
+
+/**
+ * Inform the upper layer that the buffer given in parameter is not used anymore.
+ *
+ * \param user upper layer context pointer
+ * \param buffer the buffer which is no more used.
+ * \param length the length of the buffer.
+ * \param mfs the mfs correponding to the payload in the buffer.
+ *
+ * The MFS reference is given to the CL it do not make a addref on it.
+ */
+typedef void (*sar_reassembly_done_cb_t) (void *user, u8* buffer,
+ uint length, mfs_rx_t *mfs);
+
+struct sar_expiration_t
+{
+ mac_store_t *mfs_store;
+};
+typedef struct sar_expiration_t sar_expiration_t;
+
+struct sar_t
+{
+ void *ul_data_ctx;
+ void *ul_msg_ctx;
+
+ sar_segmentation_done_cb_t sar_msg_segmentation_done;
+ sar_segmentation_done_cb_t sar_data_segmentation_done;
+
+ sar_reassembly_done_cb_t sar_rea_mme_done;
+ sar_reassembly_done_cb_t sar_rea_data_done;
+
+ sar_expiration_t expiration;
+};
+typedef struct sar_t sar_t;
+
+sar_t * sar_init (mac_store_t *mac_store, pbproc_t *pbproc, ca_t *ca);
+
+void sar_uninit (sar_t *ctx);
+
+/**
+ * Add the mac store to the SAR.
+ *
+ * \param ctx the sar context
+ * \param mac_store the mac store ctx.
+ */
+void sar_init_mac_store (sar_t *ctx, mac_store_t *mac_store);
+
+bool sar_msdu_add (sar_t *sar_ctx, u8* buffer, u16 length,
+ u32 ats_confounder, mfs_tx_t *mfs);
+
+/**
+ * Used by the upper layers to send or received messages.
+ *
+ * \param ctx the sar context
+ * \param sar_seg_done used by the segmentation to inform the upper layer the
+ * buffer is not used anymore.
+ */
+void sar_init_segmentation_mme_cb (sar_t *ctx,
+ sar_segmentation_done_cb_t sar_seg_done);
+
+/**
+ * Add the upper data layer context to the SAR. It allows the sar to use
+ * the context in the callbacks to this layer.
+ *
+ * \param ctx the sar context
+ * \param user the upper layer msg context.
+ */
+void sar_init_mme_context (sar_t *ctx, void *user);
+
+/**
+ * Initialise the callback pointer and return the contexte to the Upper layers
+ *
+ * \param ctx the sar context
+ * \param sar_rea_done inform the upper layers that the buffer is filled.
+ * \param data a boolean to indicate if it is a data stream or not.
+ */
+void sar_init_reassembly_ul (sar_t *ctx,
+ sar_reassembly_done_cb_t sar_rea_done, bool data);
+
+/**
+ * Initialise the callback pointer and return the contexte to the Control Plane
+ * to manage MME data
+ *
+ * \param ctx the sar context
+ * \param sar_rea_done the function to call when the bridge DMA ends a job.
+ */
+extern inline void sar_init_reassembly_mme_cb (sar_t *ctx,
+ sar_reassembly_done_cb_t sar_rea_done)
+{
+ sar_init_reassembly_ul (ctx, sar_rea_done, false);
+}
+
+/**
+ * Add the upper data layer context to the SAR. It allows the sar to use
+ * the context in the callbacks to this layer.
+ *
+ * \param ctx the sar context
+ * \param user the upper layer data context.
+ */
+void sar_init_data_context (sar_t *ctx, void *user);
+
+/**
+ * Used by the upper layers to send or received data.
+ *
+ * \param ctx the sar context
+ * \param sar_seg_done used by the segmentation to inform the upper layer the
+ * buffer is not used anymore.
+ */
+void sar_init_segmentation_data_cb (sar_t *ctx,
+ sar_segmentation_done_cb_t sar_seg_done);
+
+/**
+ * Initialise the callback pointer and return the contexte to the Convergence
+ * layer to manage data
+ *
+ * \param ctx the sar context
+ * \param sar_rea_done the function to call when the bridge DMA ends a job.
+ */
+extern inline void sar_init_reassembly_data_cb (sar_t *ctx,
+ sar_reassembly_done_cb_t sar_rea_done)
+{
+ sar_init_reassembly_ul (ctx, sar_rea_done, true);
+}
+
+bool sar_mme_buffer_add (sar_t *ctx, u8* buffer_addr);
+
+bool sar_data_buffer_add (sar_t *ctx, u8* buffer_addr);
+
+#endif /*SAR_H_*/
diff --git a/cesar/cl/test/overide/mac/sar/src/sar.c b/cesar/cl/test/overide/mac/sar/src/sar.c
new file mode 100644
index 0000000000..9a1b8be684
--- /dev/null
+++ b/cesar/cl/test/overide/mac/sar/src/sar.c
@@ -0,0 +1,161 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file sar.c
+ * \brief <brief>
+ * \ingroup cl/test/overide/mac/sar/src
+ *
+ */
+
+#include "common/std.h"
+#include "mac/sar/sar.h"
+#include "lib/blk.h"
+
+static sar_t sar_global;
+
+sar_t * sar_init (mac_store_t *mac_store, pbproc_t *pbproc, ca_t *ca)
+{
+ sar_global.sar_msg_segmentation_done = 0x0;
+ sar_global.sar_data_segmentation_done = 0x0;
+
+ dbg_assert (mac_store);
+
+ return &sar_global;
+}
+
+void sar_uninit (sar_t *ctx)
+{
+ dbg_assert (ctx);
+}
+
+bool sar_msdu_add (sar_t *sar_ctx, u8* buffer, u16 length,
+ u32 ats_confounder, mfs_tx_t *mfs)
+{
+ dbg_assert (sar_ctx);
+ dbg_assert (mfs);
+
+
+ if (mfs->common.mme)
+ {
+ dbg_assert (sar_ctx->sar_msg_segmentation_done);
+ (*sar_ctx->sar_msg_segmentation_done) (sar_ctx->ul_msg_ctx, buffer);
+ }
+ else
+ {
+ dbg_assert (sar_ctx->sar_data_segmentation_done);
+ (*sar_ctx->sar_data_segmentation_done) (sar_ctx->ul_msg_ctx, buffer);
+ }
+
+ return true;
+}
+
+/**
+ * Used by the upper layers to send or received messages.
+ *
+ * \param ctx the sar context
+ * \param sar_seg_done used by the segmentation to inform the upper layer the
+ * buffer is not used anymore.
+ */
+void sar_init_segmentation_mme_cb (sar_t *ctx,
+ sar_segmentation_done_cb_t sar_seg_done)
+{
+ dbg_assert (ctx);
+ dbg_assert (sar_seg_done);
+
+ ctx->sar_msg_segmentation_done = sar_seg_done;
+}
+
+/**
+ * Add the upper data layer context to the SAR. It allows the sar to use
+ * the context in the callbacks to this layer.
+ *
+ * \param ctx the sar context
+ * \param user the upper layer msg context.
+ */
+void sar_init_mme_context (sar_t *ctx, void *user)
+{
+ ctx->ul_msg_ctx = user;
+}
+
+/**
+ * Initialise the callback pointer and return the contexte to the Upper layers
+ *
+ * \param ctx the sar context
+ * \param sar_rea_done inform the upper layers that the buffer is filled.
+ * \param data a boolean to indicate if it is a data stream or not.
+ */
+void sar_init_reassembly_ul (sar_t *ctx,
+ sar_reassembly_done_cb_t sar_rea_done, bool data)
+{
+ dbg_assert (ctx);
+
+ if (!data)
+ ctx->sar_rea_mme_done = sar_rea_done;
+ else
+ ctx->sar_rea_data_done = sar_rea_done;
+}
+
+/**
+ * Add the mac store to the SAR.
+ *
+ * \param ctx the sar context
+ * \param mac_store the mac store ctx.
+ */
+void sar_init_mac_store (sar_t *ctx, mac_store_t *mac_store)
+{
+ dbg_assert (ctx);
+ dbg_assert (mac_store);
+
+ // init the mac store ctx in the sar.
+ ctx->expiration.mfs_store = mac_store;
+}
+
+/**
+ * Add the upper data layer context to the SAR. It allows the sar to use
+ * the context in the callbacks to this layer.
+ *
+ * \param ctx the sar context
+ * \param user the upper layer data context.
+ */
+void sar_init_data_context (sar_t *ctx, void *user)
+{
+ dbg_assert (ctx);
+
+ ctx->ul_data_ctx = user;
+}
+
+/**
+ * Used by the upper layers to send or received data.
+ *
+ * \param ctx the sar context
+ * \param sar_seg_done used by the segmentation to inform the upper layer the
+ * buffer is not used anymore.
+ */
+void sar_init_segmentation_data_cb (sar_t *ctx,
+ sar_segmentation_done_cb_t sar_seg_done)
+{
+ dbg_assert (ctx);
+ dbg_assert (ctx->ul_data_ctx);
+
+ ctx->sar_data_segmentation_done = sar_seg_done;
+}
+
+bool sar_mme_buffer_add (sar_t *ctx, u8* buffer_addr)
+{
+ dbg_assert (ctx);
+ dbg_assert (buffer_addr);
+ return true;
+}
+
+bool sar_data_buffer_add (sar_t *ctx, u8* buffer_addr)
+{
+ dbg_assert (ctx);
+ dbg_assert (buffer_addr);
+ return true;
+}
+
diff --git a/cesar/cl/test/src/cl_mactotei_api.c b/cesar/cl/test/src/cl_mactotei_api.c
new file mode 100644
index 0000000000..3163bcdd32
--- /dev/null
+++ b/cesar/cl/test/src/cl_mactotei_api.c
@@ -0,0 +1,244 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/test/src/cl_mactotei_api.c
+ * \brief test the api functions for the cl_mactotei table
+ * \ingroup cl/test/src/cl_mactotei
+ *
+ */
+
+#include "common/std.h"
+#include "lib/test.h"
+#include "lib/trace.h"
+
+#include "cl/cl_mactotei.h"
+#include "cl/cl.h"
+
+#include "cl/inc/cl_mactotei.h"
+#include "cl/inc/context.h"
+#include "cl/inc/trace.h"
+
+#include "hal/phy/phy.h"
+#include "mac/common/ntb.h"
+
+#include <stdio.h>
+
+int main (void)
+{
+ test_t test;
+ cl_t *cl;
+ cl_mactotei_blk_t *table;
+ sar_t *sar;
+ mac_store_t *mac_store;
+ pbproc_t *pbproc;
+ mac_config_t *mac_config;
+ phy_t *phy;
+
+ trace_init ();
+ test_init (test, 0, NULL);
+
+ mac_store = mac_store_init ();
+ mac_config = blk_alloc ();
+ phy = blk_alloc();
+ mac_ntb_init(phy, mac_config);
+ pbproc = pbproc_init (mac_config, mac_store);
+ sar = sar_init (mac_store, pbproc, NULL);
+ mac_config->tei = 10;
+ cl = cl_init (mac_store, sar, mac_config);
+
+ test_case_begin (test, "Init mactotei table");
+
+ test_begin (test, "mactotei table")
+ {
+ table = cl_mactotei_new ();
+ test_fail_if (table->nb_total != 0, "table not init");
+ test_fail_if (table->next != NULL, "Table next not NULL");
+ test_fail_if (table->write_pos != table, "not initialized to add an address");
+ }
+ test_end;
+
+ test_case_begin (test, "adding some mac addresses");
+
+ test_begin (test, "adding a mac address")
+ {
+ cl_mactotei_addr_add (table, 1111111111, 1, 1);
+ test_fail_if (table->nb_total != 1, "Counter not incremented as it should be");
+ test_fail_if (((cl_mactotei_t *) &table->data[table->nb_total - 1])->mac != 1111111111, "Mac @ does not correspond");
+ test_fail_if (((cl_mactotei_t *) &table->data[table->nb_total - 1])->tei != 1, "tei does not correspond");
+ test_fail_if (((cl_mactotei_t *) &table->data[table->nb_total - 1])->tag != 1, "tag does not correspond");
+ }
+ test_end;
+
+ /* modify the quantity of mac addresses to force a block change. */
+ table->nb_total = MAX_NB_MACTOTEI;
+ test_begin (test, "adding another mac address on a new block")
+ {
+ cl_mactotei_addr_add (table, 222222222, 2, 2);
+ test_fail_if (table->nb_total != 65, "Counter not incremented as it should be");
+ test_fail_if (((cl_mactotei_t *) &table->next->data[0])->mac != 222222222, "Mac @ does not correspond");
+ test_fail_if (((cl_mactotei_t *) &table->next->data[0])->tei != 2, "tei does not correspond");
+ test_fail_if (((cl_mactotei_t *) &table->next->data[0])->tag != 2, "tag does not correspond");
+ }
+ test_end;
+
+ test_begin (test, "adding a mac address 33333333333")
+ {
+ cl_mactotei_addr_add (table, 333333333, 3, 3);
+ test_fail_if (table->nb_total != 66, "Counter not incremented as it should be");
+ test_fail_if (((cl_mactotei_t *) &table->next->data[1])->mac != 333333333, "Mac @ does not correspond");
+ test_fail_if (((cl_mactotei_t *) &table->next->data[1])->tei != 3, "tei does not correspond");
+ test_fail_if (((cl_mactotei_t *) &table->next->data[1])->tag != 3, "tag does not correspond");
+ }
+ test_end;
+
+ test_case_begin (test, "Switching CL's table");
+
+ cl_mactotei_use_table (cl, table);
+ test_begin (test, "table in the CL")
+ {
+ test_fail_if (cl->mactotei->first != table, "Table not switched");
+ test_fail_if (cl->mactotei->nb_blocks != 2, "not enough blocks");
+ }
+ test_end;
+
+ test_case_begin (test,
+ "create new table and generate a table with a new block for the table data");
+
+ /* Testing the table copy without removing all the lines containing the tag. */
+ table = cl_mactotei_new ();
+ cl_mactotei_addr_add (table, 1111111111, 1, 1);
+ cl_mactotei_addr_add (table, 1111111112, 1, 1);
+ cl_mactotei_addr_add (table, 1111111113, 1, 1);
+ cl_mactotei_addr_add (table, 1111111114, 1, 1);
+
+ cl_mactotei_addr_add (table, 222222222, 2, 2);
+ cl_mactotei_addr_add (table, 222222223, 2, 2);
+ cl_mactotei_addr_add (table, 222222224, 2, 2);
+ cl_mactotei_addr_add (table, 222222225, 2, 2);
+
+ cl_mactotei_addr_add (table, 333333334, 3, 3);
+ cl_mactotei_addr_add (table, 333333335, 3, 3);
+ cl_mactotei_addr_add (table, 333333336, 3, 3);
+ cl_mactotei_addr_add (table, 333333337, 3, 3);
+
+ cl_mactotei_use_table (cl, table);
+
+ table = cl_mactotei_new ();
+ cl_mactotei_copy_table_excluding_tag (cl, table, 2);
+ cl_mactotei_use_table (cl, table);
+
+ test_case_begin (test, "copy");
+
+ test_begin (test, "copy")
+ {
+ test_fail_if (cl->mactotei->nb_total != 8, "Wrong number of mac addresses");
+
+ uint count;
+ for (count = 0; count < cl->mactotei->nb_total; count ++)
+ {
+ test_fail_if (((cl_mactotei_t *) &cl->mactotei->first->data[count])->tag == 2, "wrong tag copied");
+ }
+ }
+ test_end;
+
+ /* Full test */
+ table = cl_mactotei_new ();
+
+ uint count;
+
+ for (count = 0; count < 100; count ++)
+ {
+ cl_mactotei_addr_add (table, count % 4 * 2, count % 5, count % 5);
+ }
+
+ test_case_begin (test, "full");
+
+ test_begin (test, "number of mac addresses")
+ {
+ test_fail_if (table->nb_total != 100, "Wrong number of addresses");
+ }
+ test_end;
+
+ /* request the CL to use this new table. */
+ cl_mactotei_use_table (cl, table);
+
+ /* create a new table without all the addresses corresponding to the tag 2*/
+ table = cl_mactotei_new ();
+ cl_mactotei_copy_table_excluding_tag (cl, table, 2);
+
+ test_begin (test, "number of mac addresses in the new table")
+ {
+ test_fail_if (table->nb_total != 87, "Wrong number of addresses");
+ }
+ test_end;
+
+ cl_mactotei_use_table (cl, table);
+
+ cl_mactotei_blk_t *curr;
+ test_begin (test, "verify the data")
+ {
+ for (count = 0, curr = cl->mactotei->first; count < cl->mactotei->nb_total; count ++)
+ {
+ test_fail_if (cl_mactotei_table_get_mactotei_at(cl->mactotei, count).tag == 2, "wrong tag value");
+ }
+ }
+ test_end;
+
+ cl_mactotei_t mactotei_test;
+ mactotei_test.mac = 0x001111B61E52ull;
+ mactotei_test.tei = 1;
+ mactotei_test.tag = 3;
+
+ cl_mactotei_table_set_mactotei_at(cl->mactotei, 80, mactotei_test);
+
+ test_begin (test, "verify setted value")
+ {
+ test_fail_if (cl_mactotei_table_get_mac_at(cl->mactotei, 80) != mactotei_test.mac, "wrong mac value");
+ test_fail_if (cl_mactotei_table_get_tei_at(cl->mactotei, 80) != mactotei_test.tei, "wrong tei value");
+ test_fail_if (cl_mactotei_table_get_mactotei_at(cl->mactotei, 80).tag != mactotei_test.tag, "wrong tag value");
+ }
+ test_end;
+
+ cl_mactotei_release_table (cl);
+
+ test_case_begin(test, "test a full block of 64 MAC address");
+
+ table = cl_mactotei_new();
+ for (count = 0; count < 64; count ++)
+ {
+ cl_mactotei_addr_add(table, count, count, count);
+ }
+ cl_mactotei_use_table(cl, table);
+
+ test_begin (test, "get the element 63)")
+ {
+ for (count = 0; count < cl->mactotei->nb_total; count ++)
+ {
+ test_fail_if (cl_mactotei_table_get_mac_at(cl->mactotei, count) != count, "wrong mac value");
+ }
+ }
+ test_end;
+
+ cl_trace_print (cl);
+ cl_uninit(cl);
+ mac_store_uninit (mac_store);
+ blk_release (mac_config);
+ blk_release (phy);
+ pbproc_uninit(pbproc);
+ sar_uninit(sar);
+
+ test_begin (test, "Memory test")
+ {
+ test_fail_if (blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
+
diff --git a/cesar/cl/test/src/cl_mactotei_find.c b/cesar/cl/test/src/cl_mactotei_find.c
new file mode 100644
index 0000000000..7f6c0467e5
--- /dev/null
+++ b/cesar/cl/test/src/cl_mactotei_find.c
@@ -0,0 +1,96 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/test/src/cl_mactotei_find.c
+ * \brief test of the cl mac to tei function find.
+ * \ingroup cl/test/src
+ *
+ */
+
+#include "common/std.h"
+#include "lib/test.h"
+#include "lib/rnd.h"
+#include "lib/trace.h"
+
+#include "cl/cl_mactotei.h"
+#include "cl/cl.h"
+
+#include "cl/inc/cl_mactotei.h"
+#include "cl/inc/cl.h"
+#include "cl/inc/context.h"
+#include "cl/inc/trace.h"
+
+#include "mac/common/ntb.h"
+#include "hal/phy/phy.h"
+
+#include <stdio.h>
+
+int main (void)
+{
+ test_t test;
+ cl_t *cl;
+ cl_mactotei_blk_t *table;
+ uint count;
+ sar_t *sar;
+ pbproc_t *pbproc;
+ mac_config_t *mac_config;
+ mac_store_t *mac_store;
+ phy_t *phy;
+
+ trace_init ();
+ test_init (test, 0, NULL);
+ mac_store = mac_store_init ();
+ mac_config = blk_alloc ();
+ phy = blk_alloc ();
+ mac_ntb_init(phy, mac_config);
+ pbproc = pbproc_init (mac_config, mac_store);
+ sar = sar_init (mac_store, pbproc, NULL);
+ mac_config->tei = 10;
+ cl = cl_init (mac_store, sar, mac_config);
+ table = cl_mactotei_new ();
+
+ for (count = 0; count < 120; count ++)
+ {
+ cl_mactotei_addr_add (table, count * 2, count, count);
+ }
+
+ cl_mactotei_use_table (cl, table);
+
+ test_begin (test, "Search for tei with the mac @ == tei")
+ {
+ for (count = 0; count < 120; count ++)
+ {
+ test_fail_if (cl_mactotei_table_find_tei_from_mac(cl, count * 2) != count, "Wrong tei for mac @ : %d", count);
+ }
+ }
+ test_end;
+ cl_mactotei_table_find_tei_from_mac (cl, count * 2);
+
+ test_begin (test, "Search for a mac @ which does not exists")
+ {
+ test_fail_if (cl_mactotei_table_find_tei_from_mac(cl, 121) != 0x0, "Wrong tei for mac @ 121");
+ }
+ test_end;
+
+ cl_trace_print (cl);
+ cl_uninit (cl);
+ mac_store_uninit (mac_store);
+ blk_release (mac_config);
+ blk_release (phy);
+ pbproc_uninit (pbproc);
+ sar_uninit (sar);
+
+ test_begin (test, "Memory test")
+ {
+ test_fail_if (blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
diff --git a/cesar/cl/test/src/cl_mactotei_heapsort.c b/cesar/cl/test/src/cl_mactotei_heapsort.c
new file mode 100644
index 0000000000..21beeb41ab
--- /dev/null
+++ b/cesar/cl/test/src/cl_mactotei_heapsort.c
@@ -0,0 +1,102 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/test/cl_mactotei/src/cl_mactotei_heapsort.c
+ * \brief test the heapsort
+ * \ingroup cl/test/cl_mactotei
+ *
+ */
+
+#include "common/std.h"
+#include "lib/test.h"
+#include "lib/rnd.h"
+#include "lib/trace.h"
+
+#include "cl/cl_mactotei.h"
+#include "cl/cl.h"
+
+#include "mac/common/store.h"
+#include "mac/common/ntb.h"
+
+#include "hal/phy/phy.h"
+
+#include "cl/inc/cl_mactotei.h"
+#include "cl/inc/context.h"
+#include "cl/inc/trace.h"
+
+#include <stdio.h>
+
+int main (void)
+{
+ test_t test;
+ cl_t *cl;
+ cl_mactotei_blk_t *table;
+ lib_rnd_t rnd1;
+ lib_rnd_t rnd2;
+ int i;
+ sar_t *sar;
+ pbproc_t *pbproc;
+ mac_config_t *mac_config;
+ mac_store_t *mac_store;
+ phy_t *phy;
+
+ trace_init ();
+ test_init (test, 0, NULL);
+
+ lib_rnd_init (&rnd1, 12345678);
+ lib_rnd_init (&rnd2, 23456789);
+
+ mac_store = mac_store_init ();
+ mac_config = blk_alloc ();
+ phy = blk_alloc ();
+
+ mac_ntb_init (phy, mac_config);
+ pbproc = pbproc_init (mac_config, mac_store);
+ sar = sar_init (mac_store, pbproc, NULL);
+ mac_config->tei = 10;
+ cl = cl_init (mac_store, sar, mac_config);
+
+ table = cl_mactotei_new ();
+
+ for (i = 0; i < 120; i++)
+ {
+ cl_mactotei_addr_add (table, lib_rnd32 (&rnd1),
+ lib_rnd32 (&rnd1) % 3, lib_rnd32 (&rnd1) % 3);
+ cl_mactotei_addr_add (table, lib_rnd32 (&rnd2),
+ lib_rnd32 (&rnd2) % 3, lib_rnd32 (&rnd2) % 3);
+ }
+
+ cl_mactotei_use_table (cl, table);
+
+ test_case_begin (test, "verify the heapsort");
+ test_begin (test, "verify continuity")
+ {
+ for (i = 0; i < 119; i++)
+ {
+ test_fail_if (cl_mactotei_table_get_mac_at (cl->mactotei, i) > cl_mactotei_table_get_mac_at (cl->mactotei, i + 1), "Not sorted correctly");
+ }
+ }
+ test_end;
+
+ cl_trace_print (cl);
+ cl_uninit (cl);
+ mac_store_uninit (mac_store);
+ blk_release (mac_config);
+ blk_release (phy);
+ pbproc_uninit (pbproc);
+ sar_uninit (sar);
+
+ test_begin (test, "Memory test")
+ {
+ test_fail_if (blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
diff --git a/cesar/cl/test/src/cl_mme_recv.c b/cesar/cl/test/src/cl_mme_recv.c
new file mode 100644
index 0000000000..9a03afff2c
--- /dev/null
+++ b/cesar/cl/test/src/cl_mme_recv.c
@@ -0,0 +1,121 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/test/src/cl_mme_recv.c
+ * \brief <brief>
+ * \ingroup cl/test/src/
+ *
+ */
+
+#include "common/std.h"
+#include "lib/test.h"
+#include "lib/trace.h"
+
+#include "mac/common/store.h"
+#include "mac/common/ntb.h"
+#include "mac/pbproc/pbproc.h"
+#include "mac/sar/sar.h"
+
+#include "cl/cl.h"
+#include "cl/cl_mactotei.h"
+
+#include "cl/inc/trace.h"
+
+#include "hal/phy/phy.h"
+
+bool test_mme_recv;
+bool test_mme_send_done_to_cp;
+cl_t *cl;
+
+void cl_send_mme_to_cp (void *user, mfs_rx_t *mfs, u8 *buffer, uint length,
+ cl_mme_recv_t *mme_recv, bool encryption)
+{
+ test_mme_send_done_to_cp = true;
+
+ cl_mme_recv_done (cl, mme_recv);
+}
+
+void hle_mme_send_done (void *test, u8 *buffer)
+{
+ test_mme_recv = true;
+}
+
+int main (void)
+{
+ test_t test;
+ mac_store_t *mac_store;
+ sar_t *sar;
+ pbproc_t *pbproc;
+ mac_config_t *mac_config;
+ phy_t *phy;
+ mfs_rx_t *mfs;
+ bool added;
+ u8 buffer[2048];
+
+ test_init (test, 0, NULL);
+ trace_init ();
+
+ mac_store = mac_store_init ();
+ mac_config = blk_alloc ();
+ phy = blk_alloc ();
+ mac_ntb_init(phy, mac_config);
+ pbproc = pbproc_init (mac_config, mac_store);
+ sar = sar_init (mac_store, pbproc, NULL);
+ mac_config->tei = 10;
+ cl = cl_init (mac_store, sar, mac_config);
+
+ mfs = mac_store_mfs_add_rx (mac_store, false, false, 1, 1, &added);
+ dbg_assert (added);
+
+ cl_mme_recv_init (cl, cl_send_mme_to_cp, NULL);
+
+ // send a data to the CP
+ test_mme_send_done_to_cp = false;
+ cl_mme_sar_recv (cl, buffer, 1204, mfs, false);
+
+ test_begin(test, "Send done to CP from SAR")
+ {
+ test_fail_if (test_mme_send_done_to_cp == false, "data not send");
+ }
+ test_end;
+
+ mac_store_mfs_remove (mac_store, (mfs_t *) mfs);
+ blk_release (mfs);
+
+ test_mme_send_done_to_cp = false;
+ test_mme_recv = false;
+ cl_mme_ul_init_send_done(cl, hle_mme_send_done, NULL);
+ cl_mme_ul_send (cl, buffer, 1024);
+
+ test_begin(test, "Send done to CP from HLE")
+ {
+ test_fail_if (test_mme_send_done_to_cp == false, "data not send");
+ test_fail_if (test_mme_recv == false, "Hle not informed");
+ }
+ test_end;
+
+ added = mac_store_sta_remove (mac_store, 1);
+ dbg_check (added);
+ mac_store_uninit (mac_store);
+ blk_release (mac_config);
+ blk_release (phy);
+ pbproc_uninit (pbproc);
+ sar_uninit (sar);
+
+ cl_trace_print (cl);
+ cl_uninit(cl);
+
+ test_begin (test, "memory check")
+ {
+ test_fail_if (blk_check_memory == false, "momery not correctly freed");
+ }
+ test_end;
+
+ test_result (test);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
diff --git a/cesar/cl/test/src/cl_mme_send_as_data.c b/cesar/cl/test/src/cl_mme_send_as_data.c
new file mode 100644
index 0000000000..1c9f965fce
--- /dev/null
+++ b/cesar/cl/test/src/cl_mme_send_as_data.c
@@ -0,0 +1,202 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/test/src/cl_mme_semd_as_mme.c
+ * \brief Test to send mme over the PLC.
+ * \ingroup cl
+ *
+ */
+
+#include "common/std.h"
+#include "lib/test.h"
+#include "lib/trace.h"
+#include "lib/read_word.h"
+
+#include "cl/cl_mactotei.h"
+#include "cl/cl.h"
+
+#include "mac/common/store.h"
+#include "mac/common/ntb.h"
+#include "mac/sar/sar.h"
+#include "mac/pbproc/pbproc.h"
+
+#include "hal/phy/phy.h"
+
+#include "cl/inc/trace.h"
+
+unsigned int packet[]__attribute__((aligned(2048))) =
+{ 0x001111B6, 0x1E520002, 0x00000000, 0x00000000,
+ 0x0000ffff, 0x00000001, 0x46973299, 0x0007c33e,
+ 0x00000042, 0x00000042, 0x12005452, 0x00080235,
+ 0x4c205227, 0x00450008, 0x4e043400, 0x06400040,
+ 0x000a1917, 0x79cb0f02, 0x1b04d547, 0x6b285000,
+ 0x0000babc, 0x02800000, 0x396bf0fa, 0x04020000,
+ 0x0301b405, 0x01010003, 0x00000204};
+unsigned int packet_len = 106;
+
+bool test_seg_mme;
+bool test_ul_mme_recv;
+bool test_add_buffer;
+
+
+void test_mme_cp_add_buffer (void *user, u8 *buffer)
+{
+ test_add_buffer = true;
+}
+
+void test_mme_ul_reception_done (void *user, u8* buffer, uint length)
+{
+ test_ul_mme_recv = true;
+
+ cl_mme_buffer_add(user, buffer);
+}
+
+void cl_test_send_mme_as_data_to_sar (test_t test)
+{
+ u8 *buffer;
+
+ cl_t *cl;
+ mac_store_t *mac_store;
+ sar_t *sar;
+ pbproc_t *pbproc;
+ mac_config_t *mac_config;
+ bool added;
+ cl_mactotei_blk_t *table;
+ mfs_tx_t *mfs;
+ phy_t *phy;
+ mac_t mac;
+
+ mac_store = mac_store_init ();
+ mac_config = blk_alloc ();
+ phy = blk_alloc ();
+ mac_ntb_init(phy, mac_config);
+ pbproc = pbproc_init (mac_config, mac_store);
+ sar = sar_init (mac_store, pbproc, NULL);
+
+ mac_config->tei = 10;
+ cl = cl_init (mac_store, sar, mac_config);
+ cl_mme_init_buffer_add_cb(cl, test_mme_cp_add_buffer, cl);
+
+ sar_init_segmentation_data_cb (sar, (sar_segmentation_done_cb_t) cl_data_send_done);
+ sar_init_mme_context (sar, cl);
+
+ /* create the mfs for the test. */
+ mfs = mac_store_mfs_add_tx (mac_store, false, false, 1, 0x2, &added);
+ dbg_assert (added);
+
+ /* create the mactotei table */
+ table = cl_mactotei_new ();
+ mac = read_u32_from_word((u8*)packet) | ((u64)read_u16_from_word((u8*)packet + 4) << 32);
+ cl_mactotei_addr_add (table,mac, 2, 2);
+
+ cl_mactotei_use_table (cl, table);
+
+ test_seg_mme = false;
+ test_add_buffer = false;
+ buffer = (u8 *) packet;
+ cl_mme_send (cl, buffer, packet_len, NULL);
+
+ test_begin (test, "add buffer")
+ {
+ test_fail_if (test_add_buffer == false, "no buffer added");
+ }
+ test_end;
+
+ mac_store_mfs_remove (mac_store, (mfs_t *) mfs);
+ blk_release (mfs);
+ // release the associate STA.
+ bool done = mac_store_sta_remove (mac_store, 0x2);
+ dbg_check (done);
+ mac_store_uninit (mac_store);
+
+ pbproc_uninit (pbproc);
+ blk_release (mac_config);
+ blk_release (phy);
+ sar_uninit (sar);
+
+ cl_trace_print (cl);
+ cl_uninit (cl);
+
+ test_begin (test, "Memory test")
+ {
+ test_fail_if (blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+}
+
+void cl_test_send_mme_as_data_to_hle (test_t test)
+{
+ u8 *buffer;
+
+ cl_t *cl;
+ mac_store_t *mac_store;
+ sar_t *sar;
+ pbproc_t *pbproc;
+ mac_config_t *mac_config;
+ cl_mactotei_blk_t *table;
+
+ mac_store = mac_store_init ();
+ mac_config = blk_alloc ();
+ pbproc = pbproc_init (mac_config, mac_store);
+ sar = sar_init (mac_store, pbproc, NULL);
+
+ mac_config->tei = 10;
+ cl = cl_init (mac_store, sar, mac_config);
+ cl_mme_init_ul_as_data(cl,test_mme_ul_reception_done , cl);
+ cl_mme_init_buffer_add_cb(cl, test_mme_cp_add_buffer, cl);
+
+ sar_init_segmentation_data_cb (sar, (sar_segmentation_done_cb_t) cl_data_send_done);
+ sar_init_mme_context (sar, cl);
+
+ /* create the mactotei table */
+ table = cl_mactotei_new ();
+ cl_mactotei_addr_add (table, 0x001111B60002ull, 10, 10);
+
+ cl_mactotei_use_table (cl, table);
+
+ test_ul_mme_recv = false;
+ test_add_buffer = false;
+ buffer = (u8 *) packet;
+ cl_mme_send (cl, buffer, packet_len, NULL);
+
+ test_begin (test, "Send mme test")
+ {
+ test_fail_if (test_ul_mme_recv == false, "not send");
+ test_fail_if (test_add_buffer == false, "no buffer added");
+ }
+ test_end;
+
+ mac_store_uninit (mac_store);
+
+ pbproc_uninit (pbproc);
+ blk_release (mac_config);
+ sar_uninit (sar);
+
+ cl_trace_print (cl);
+ cl_uninit (cl);
+
+ test_begin (test, "Memory test")
+ {
+ test_fail_if (blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+}
+
+int main (void)
+{
+ test_t test;
+
+ test_init (test, 0, NULL);
+ trace_init ();
+
+ cl_test_send_mme_as_data_to_sar (test);
+ cl_test_send_mme_as_data_to_hle (test);
+
+ test_result (test);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
diff --git a/cesar/cl/test/src/cl_mme_send_as_mme.c b/cesar/cl/test/src/cl_mme_send_as_mme.c
new file mode 100644
index 0000000000..48627fe227
--- /dev/null
+++ b/cesar/cl/test/src/cl_mme_send_as_mme.c
@@ -0,0 +1,105 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/test/src/cl_mme_semd_as_mme.c
+ * \brief Test to send mme over the PLC.
+ * \ingroup cl
+ *
+ */
+
+#include "common/std.h"
+#include "lib/test.h"
+#include "lib/trace.h"
+
+#include "cl/cl.h"
+
+#include "mac/common/store.h"
+#include "mac/common/ntb.h"
+#include "mac/sar/sar.h"
+#include "mac/pbproc/pbproc.h"
+
+#include "hal/phy/phy.h"
+
+#include "cl/inc/trace.h"
+
+bool test_add_buffer;
+
+
+void test_mme_cp_add_buffer (void *user, u8 *buffer)
+{
+ test_add_buffer = true;
+}
+
+int main (void)
+{
+ test_t test;
+ u8 buffer[2048];
+
+ cl_t *cl;
+ mac_store_t *mac_store;
+ sar_t *sar;
+ pbproc_t *pbproc;
+ mac_config_t *mac_config;
+ mfs_tx_t *mfs;
+ phy_t *phy;
+ bool added;
+
+ trace_init ();
+ test_init (test, 0, NULL);
+
+ mac_store = mac_store_init ();
+ mac_config = blk_alloc ();
+ phy = blk_alloc ();
+ mac_ntb_init (phy, mac_config);
+ pbproc = pbproc_init (mac_config, mac_store);
+ sar = sar_init (mac_store, pbproc, NULL);
+
+ mac_config->tei = 10;
+ cl = cl_init (mac_store, sar, mac_config);
+ cl_mme_init_buffer_add_cb(cl, test_mme_cp_add_buffer, cl);
+
+ sar_init_segmentation_mme_cb (sar,
+ (sar_segmentation_done_cb_t) cl_mme_sar_send_done);
+ sar_init_mme_context (sar, cl);
+
+ mfs = mac_store_mfs_add_tx (mac_store, false, true, MAC_LID_NONE, 1,
+ &added);
+ dbg_assert (added);
+
+ test_add_buffer = false;
+ cl_mme_send (cl, buffer, 1204, mfs);
+
+ test_begin (test, "Send mme test")
+ {
+ test_fail_if (test_add_buffer == false, "not send");
+ }
+ test_end;
+
+
+ mac_store_mfs_remove (mac_store, (mfs_t *) mfs);
+ blk_release (mfs);
+ added = mac_store_sta_remove (mac_store, 1);
+ dbg_assert (added);
+ mac_store_uninit (mac_store);
+
+ pbproc_uninit (pbproc);
+ blk_release (mac_config);
+ blk_release (phy);
+ sar_uninit (sar);
+ cl_trace_print (cl);
+ cl_uninit (cl);
+
+ test_begin (test, "Memory test")
+ {
+ test_fail_if (blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
diff --git a/cesar/cl/test/src/cl_recv_data.c b/cesar/cl/test/src/cl_recv_data.c
new file mode 100644
index 0000000000..9a3b3209eb
--- /dev/null
+++ b/cesar/cl/test/src/cl_recv_data.c
@@ -0,0 +1,92 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/test/cl_recv_data/src/cl_recv_data.c
+ * \brief test the CL RX data
+ * \ingroup cl/test/cl_recv_data/src/
+ *
+ */
+
+#include "common/std.h"
+#include "lib/test.h"
+#include "lib/trace.h"
+
+#include "cl/cl.h"
+
+#include "cl/inc/cl.h"
+#include "cl/inc/context.h"
+
+#include "mac/sar/sar.h"
+#include "mac/common/ntb.h"
+
+#include "cl/inc/trace.h"
+
+#include "hal/phy/phy.h"
+
+bool bool_data_recv;
+
+void data_recv_cb (void *user, u8 *buffer, uint length)
+{
+ bool_data_recv = true;
+}
+
+int main (void)
+{
+ cl_t *cl;
+ test_t test;
+ u8 buffer [1518];
+ mfs_rx_t *mfs;
+ mac_store_t *mac_store;
+ pbproc_t *pbproc;
+ mac_config_t *mac_config;
+ phy_t *phy;
+ sar_t *sar;
+
+ trace_init ();
+ test_init (test, 0, NULL);
+ mac_store = mac_store_init ();
+ mac_config = blk_alloc ();
+ phy = blk_alloc ();
+ mac_ntb_init (phy, mac_config);
+ pbproc = pbproc_init (mac_config, mac_store);
+ sar = sar_init (mac_store, pbproc, NULL);
+ mac_config->tei = 10;
+ cl = cl_init (mac_store, sar, mac_config);
+ mfs = blk_alloc ();
+
+ cl_data_recv_init (cl, data_recv_cb, NULL);
+ bool_data_recv = false;
+
+ (*cl->sar->sar_rea_data_done) (cl->sar->ul_data_ctx, buffer, 120, mfs);
+ test_begin (test, "receive a data")
+ {
+ test_fail_if(bool_data_recv == false, "HLE does not receive the data");
+ }
+ test_end;
+
+ cl_trace_print (cl);
+ cl_data_buffer_add(cl, buffer);
+
+ cl_trace_print (cl);
+ cl_uninit (cl);
+ mac_store_uninit (mac_store);
+ blk_release (mac_config);
+ blk_release (mfs);
+ blk_release (phy);
+ pbproc_uninit (pbproc);
+ sar_uninit (sar);
+
+ test_begin (test, "Memory test")
+ {
+ test_fail_if (blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
diff --git a/cesar/cl/test/src/cl_send_data.c b/cesar/cl/test/src/cl_send_data.c
new file mode 100644
index 0000000000..aa3ee030d9
--- /dev/null
+++ b/cesar/cl/test/src/cl_send_data.c
@@ -0,0 +1,159 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl_send_data.c
+ * \brief test the data tx module of the CL.
+ * \ingroup cl/test/src
+ *
+ */
+
+#include "common/std.h"
+#include "lib/test.h"
+#include "lib/trace.h"
+
+#include "mac/pbproc/pbproc.h"
+#include "mac/common/ntb.h"
+
+#include "cl/cl.h"
+#include "cl/cl_mactotei.h"
+#include "cl/inc/trace.h"
+
+#include "hal/phy/phy.h"
+
+#include <stdio.h>
+bool sent_cb_done;
+
+unsigned int packet[]__attribute__((aligned(2048))) =
+{ 0x001111B6, 0x1E520002, 0x00000000, 0x00000000,
+ 0x0000ffff, 0x00000001, 0x46973299, 0x0007c33e,
+ 0x00000042, 0x00000042, 0x12005452, 0x00080235,
+ 0x4c205227, 0x00450008, 0x4e043400, 0x06400040,
+ 0x000a1917, 0x79cb0f02, 0x1b04d547, 0x6b285000,
+ 0x0000babc, 0x02800000, 0x396bf0fa, 0x04020000,
+ 0x0301b405, 0x01010003, 0x00000204};
+unsigned int packet_len = 106;
+
+void hle_sent_done (void *user, u8 *buffer)
+{
+ sent_cb_done = true;
+}
+
+int main (void)
+{
+ test_t test;
+ cl_t *cl;
+ mac_store_t *mac_store;
+ cl_mactotei_blk_t *table;
+ bool added;
+ mfs_tx_t *mfs;
+ sar_t *sar;
+ pbproc_t *pbproc;
+ mac_config_t *mac_config;
+ phy_t *phy;
+
+ trace_init ();
+ test_init (test, 0, NULL);
+
+ mac_store = mac_store_init ();
+ mac_config = blk_alloc ();
+ phy = blk_alloc ();
+ mac_ntb_init (phy, mac_config);
+ pbproc = pbproc_init(mac_config, mac_store);
+ sar = sar_init(mac_store, pbproc, NULL);
+ mac_config->tei = 10;
+ cl = cl_init (mac_store, sar, mac_config);
+ cl_data_send_done_init (cl, hle_sent_done, NULL);
+
+ mac_config->authenticated = true;
+
+ /* create the mfs for the test. */
+ mfs = mac_store_mfs_add_tx (mac_store, false, false, 1, 0x2, &added);
+ dbg_assert (added);
+ blk_release (mfs);
+
+ mfs = mac_store_mfs_add_tx (mac_store, true, false, 1, 0xff, &added);
+ dbg_assert (added);
+ blk_release (mfs);
+
+ /* create the mactotei table */
+ table = cl_mactotei_new ();
+ cl_mactotei_addr_add (table, 0x001111B61E52ull, 2, 2);
+ cl_mactotei_addr_add (table, 0xd4c3b2a10200ull, 1, 1);
+
+ cl_mactotei_use_table (cl, table);
+
+ sent_cb_done = false;
+
+ cl_data_send (cl, (u8*) packet, packet_len);
+
+ test_begin (test, "data sent")
+ {
+ test_fail_if (sent_cb_done == false, "cb sent done fail");
+ }
+ test_end;
+
+ sent_cb_done = false;
+
+ table = cl_mactotei_new ();
+ cl_mactotei_addr_add (table, 0x001111B61E50ull, 2, 2);
+ cl_mactotei_addr_add (table, 0xd4c3b2a10200ull, 1, 1);
+ cl_mactotei_use_table (cl, table);
+
+ cl_data_send (cl, (u8*) packet, packet_len);
+
+ test_begin (test, "data sent")
+ {
+ test_fail_if (sent_cb_done == false, "cb sent done fail");
+ }
+ test_end;
+
+
+ mac_config->authenticated = false;
+ table = cl_mactotei_new ();
+ cl_mactotei_addr_add (table, 0x001111B61E50ull, 2, 2);
+ cl_mactotei_addr_add (table, 0xd4c3b2a10200ull, 1, 1);
+ cl_mactotei_use_table (cl, table);
+
+ cl_data_send (cl, (u8*) packet, packet_len);
+
+ test_begin (test, "data sent dropped")
+ {
+ test_fail_if (sent_cb_done == false, "cb sent done fail");
+ }
+ test_end;
+
+ cl_trace_print (cl);
+ cl_uninit (cl);
+
+ mfs = mac_store_mfs_get_tx (mac_store, false, false, 1, 2);
+ dbg_assert (mfs);
+ mac_store_mfs_remove (mac_store, (mfs_t *) mfs);
+ blk_release (mfs);
+
+ mfs = mac_store_mfs_get_tx (mac_store, true, false, 1, 0xff);
+ dbg_assert (mfs);
+ mac_store_mfs_remove (mac_store, (mfs_t *) mfs);
+ blk_release (mfs);
+
+
+ added = mac_store_sta_remove (mac_store, 2);
+ mac_store_uninit (mac_store);
+ blk_release (mac_config);
+ blk_release (phy);
+ pbproc_uninit(pbproc);
+ sar_uninit(sar);
+
+ test_begin (test, "memory check")
+ {
+ test_fail_if (blk_check_memory == false, "momery not correctly freed");
+ }
+ test_end;
+
+ test_result (test);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
diff --git a/cesar/cl/test/src/phy_stub.c b/cesar/cl/test/src/phy_stub.c
new file mode 100644
index 0000000000..0141b73f5f
--- /dev/null
+++ b/cesar/cl/test/src/phy_stub.c
@@ -0,0 +1,24 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cl/test/src/phy_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "hal/phy/phy.h"
+
+u32
+phy_date (phy_t *ctx)
+{
+ return 42;
+}
+
diff --git a/cesar/common/defs/ethernet.h b/cesar/common/defs/ethernet.h
new file mode 100644
index 0000000000..914be30b91
--- /dev/null
+++ b/cesar/common/defs/ethernet.h
@@ -0,0 +1,24 @@
+#ifndef common_defs_ethernet_h
+#define common_defs_ethernet_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file common/defs/ethernet.h
+ * \brief Defines concerning the Ethernet Norme.
+ * \ingroup common_defs
+ *
+ * Based on the norme 802.3
+ */
+
+/** Ethernet packet minimum size. */
+#define ETH_PACKET_MIN_SIZE 60
+
+/** Ethernet packet maximum size. */
+#define ETH_PACKET_MAX_SIZE 1518
+
+#endif /* common_defs_ethernet_h */
diff --git a/cesar/common/defs/homeplugAV.h b/cesar/common/defs/homeplugAV.h
new file mode 100644
index 0000000000..9448c0c0e6
--- /dev/null
+++ b/cesar/common/defs/homeplugAV.h
@@ -0,0 +1,29 @@
+#ifndef common_defs_homeplugAV_h
+#define common_defs_homeplugAV_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file common/defs/homeplugAV.h
+ * \brief Home Plug AV constants.
+ * \ingroup common_defs
+ *
+ * Defines for all the HPAV constants.
+ */
+
+/** Define the MTYPE for MME. */
+#define HPAV_MTYPE_MME 0x88E1
+
+/** MMV version for the MME HomePlug 1.0 see section 11.1.5 */
+#define HPAV_MMV0 0x0
+/** MMV version for the MME HomePlug 1.1 see section 11.1.5 */
+#define HPAV_MMV1 0x1
+
+/** Define the MMV default type for HPAV. */
+#define HPAV_MMV HPAV_MMV1
+
+#endif /* common_defs_homeplugAV_h */
diff --git a/cesar/common/doc/Doxyfile b/cesar/common/doc/Doxyfile
new file mode 100644
index 0000000000..e57100bf51
--- /dev/null
+++ b/cesar/common/doc/Doxyfile
@@ -0,0 +1,1255 @@
+# Doxyfile 1.5.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = cesar
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = common/doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian,
+# Italian, Japanese, Japanese-en (Japanese with English messages), Korean,
+# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
+# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE = English
+
+# This tag can be used to specify the encoding used in the generated output.
+# The encoding is not always determined by the language that is chosen,
+# but also whether or not the output is meant for Windows or non-Windows users.
+# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
+# forces the Windows encoding (this is the default for the Windows binary),
+# whereas setting the tag to NO uses a Unix-style encoding (the default for
+# all platforms other than Windows).
+
+USE_WINDOWS_ENCODING = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like the Qt-style comments (thus requiring an
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF = YES
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member
+# documentation.
+
+DETAILS_AT_TOP = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+ALIASES += "context=\par Context:\n"
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for Java.
+# For instance, namespaces will be presented as packages, qualified scopes
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to
+# include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = YES
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = YES
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from the
+# version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = YES
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = cl common hal lib interface mac host cp hle
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
+
+FILE_PATTERNS =
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS = */.svn/* */test/* */ecos/*
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH = cp/sta/action/doc
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS = *.h=common/doc/docfilter
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = NO
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code. Otherwise they will link to the documentstion.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF = YES
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED = "DOXYGEN_ONLY=1" "__attribute__(x)=" "BEGIN_DECLS=" \
+ "END_DECLS=" "BITFIELDS_WORD=" "__FL=" \
+ "void_FL=void"
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
+# generate a call dependency graph for every global function or class method.
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will
+# generate a caller dependency graph for every global function or class method.
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_WIDTH = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT = 1024
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that a graph may be further truncated if the graph's
+# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH
+# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default),
+# the graph is not depth-constrained.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, which results in a white background.
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO
diff --git a/cesar/common/doc/Makefile b/cesar/common/doc/Makefile
new file mode 100644
index 0000000000..aa4253ff9d
--- /dev/null
+++ b/cesar/common/doc/Makefile
@@ -0,0 +1,14 @@
+
+.PHONY: all clean
+
+all: clean
+ cd ../.. && doxygen common/doc/Doxyfile
+
+all.%: Doxyfile.% clean
+ cd ../.. && doxygen common/doc/$<
+
+Doxyfile.quiet: Doxyfile
+ perl -lpe '/^WARN/ && s/YES/NO/' < $< > $@
+
+clean:
+ rm -rf html
diff --git a/cesar/common/doc/docfilter b/cesar/common/doc/docfilter
new file mode 100755
index 0000000000..39ccbcc806
--- /dev/null
+++ b/cesar/common/doc/docfilter
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+
+my $last;
+
+while (<>)
+{
+ chomp;
+ if (defined $last && /^ \* ([-=~]{5,})$/)
+ {
+ my $l = length $1;
+ my $c = substr $1, 0, 1;
+ if ($last =~ /^ \* (.*)$/ && length $1 == $l)
+ {
+ my %sec = ('=' => 'section', '-' => 'subsection',
+ '~' => 'subsubsection');
+ my $title = $1;
+ my $name = $1;
+ $name =~ tr/A-Z/a-z/;
+ $name =~ s/\W/-/g;
+ $last = " * \\$sec{$c} $name $title";
+ $_ = undef;
+ }
+ }
+ print $last . "\n" if defined $last;
+ $last = $_;
+}
diff --git a/cesar/common/doc/dox2rst b/cesar/common/doc/dox2rst
new file mode 100755
index 0000000000..99273c02ea
--- /dev/null
+++ b/cesar/common/doc/dox2rst
@@ -0,0 +1,40 @@
+#!/usr/bin/perl -l
+use strict;
+use warnings;
+
+my $blank = 0;
+
+while (<>)
+{
+ chomp;
+ if (/^\\image html (.*?) "(.*)"$/)
+ {
+ $_ = <<EOF;
+.. figure:: $1
+
+ $2
+EOF
+ }
+ if (s/^\s(\s*- )\(/$1\\(/
+ or s/^\s(\s*- )/$1/
+ or s/\\param (.*?) (.*)/:$1: $2/
+ or s/\\return (.*)/:Returns: $1/)
+ {
+ print '' unless $blank && !/^\s*-/;
+ $blank = 1;
+ }
+ elsif (s/^\s(\s*)/$1/)
+ {
+ }
+ elsif (s/^> {3}/ /)
+ {
+ print "::\n" unless $blank;
+ $blank = 1;
+ }
+ else
+ {
+ $blank = 0;
+ }
+} continue {
+ print;
+}
diff --git a/cesar/common/doc/doxygen.h b/cesar/common/doc/doxygen.h
new file mode 100644
index 0000000000..4da8563835
--- /dev/null
+++ b/cesar/common/doc/doxygen.h
@@ -0,0 +1,41 @@
+#ifndef common_doc_doxygen_h
+#define common_doc_doxygen_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+
+/**
+ * \defgroup lib Library functions
+ * \defgroup common Common
+ * \defgroup hle HLE - High Entity Layer
+ * \defgroup hal HAL - Hardware Abstraction Layer
+ * \defgroup hal_phy HAL / Phy
+ * \ingroup hal
+ * \defgroup hal_leon HAL / Leon
+ * \ingroup hal
+ * \defgroup hal_timer HAL / API Timer soft Leon
+ * \ingroup hal
+ * \defgroup interface Interface - Interface module CP - DP
+ * \defgroup interface_sniffer Sniffer - Sniffer module
+ * \ingroup interface
+ * \defgroup host Host - Fulminata station
+ * \defgroup mac MAC
+ * \defgroup mac_common MAC / Common
+ * \ingroup mac
+ * \defgroup mac_sar MAC / Segmentation and Reassembly
+ * \ingroup mac
+ * \defgroup mac_ca MAC / Channel Access
+ * \ingroup mac
+ * \defgroup mac_pbproc MAC / PB Processing
+ * \ingroup mac
+ * \defgroup cp CP - Control Plane
+ * \defgroup cp_beacon CP / Beacon
+ * \ingroup cp
+ * \defgroup cl CL - Convergence Layer
+ */
+
+#endif /* common_doc_doxygen_h */
diff --git a/cesar/common/doc/extractdoc b/cesar/common/doc/extractdoc
new file mode 100755
index 0000000000..b63ec398b9
--- /dev/null
+++ b/cesar/common/doc/extractdoc
@@ -0,0 +1,39 @@
+#!/usr/bin/perl -nl
+use strict;
+use warnings;
+
+# Extract the file comment.
+if (/^\/\*\*$/ .. /^ \*\/$/)
+{
+ if (/^ \* \\file/ .. /^ \*\/$/)
+ {
+ if (not /^ \* \\(?:file|brief|ingroup)| \*\//)
+ {
+ s/^ \* ?//;
+ print;
+ }
+ }
+}
+
+if (/^BEGIN_DECLS$/ .. /^END_DECLS$/)
+{
+ if (/^BEGIN_DECLS$/)
+ {
+ print "\nFunctions\n---------";
+ }
+ elsif (/^END_DECLS$/)
+ {
+ }
+ elsif (m#^$|^/\*\*$|^ \*/$#)
+ {
+ print '';
+ }
+ elsif (s/^ \* ?//)
+ {
+ print;
+ }
+ else
+ {
+ print '> ' . $_;
+ }
+}
diff --git a/cesar/common/make/build.mk b/cesar/common/make/build.mk
new file mode 100644
index 0000000000..4ff67afd85
--- /dev/null
+++ b/cesar/common/make/build.mk
@@ -0,0 +1,66 @@
+# Define build rules.
+
+# No default implicit rules.
+.SUFFIXES:
+
+HOST_CC ?= $(CC)
+HOST_CXX ?= $(CXX)
+TARGET_CC ?= $(CROSS_COMPILE)gcc
+TARGET_CXX ?= $(CROSS_COMPILE)g++
+
+HOST_COMPILE.c = $(HOST_CC) $(HOST_CPPFLAGS) $(HOST_CFLAGS) -c
+HOST_COMPILE.cpp = $(HOST_CXX) $(HOST_CPPFLAGS) $(HOST_CXXFLAGS) -c
+HOST_COMPILE.S = $(HOST_CC) $(HOST_CPPFLAGS) $(HOST_ASFLAGS) -c
+HOST_LINK = $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS)
+HOST_LINK_CXX = $(HOST_CXX) $(HOST_CXXFLAGS) $(HOST_LDFLAGS)
+
+TARGET_COMPILE.c = $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -c
+TARGET_COMPILE.cpp = $(TARGET_CXX) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -c
+TARGET_COMPILE.S = $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_ASFLAGS) -c
+TARGET_LINK = $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)
+TARGET_LINK_CXX = $(TARGET_CXX) $(TARGET_CXXFLAGS) $(TARGET_LDFLAGS)
+
+.PHONY: build.all host.all target.all build.clean
+
+build.all: host.all target.all
+
+host.all: $(HOST_EXES)
+
+target.all: $(TARGET_ELFS)
+
+# For each program, define the link rule.
+PROGRAM_rule_template_echo := "LINK"
+PROGRAM_rule_template_echo_CXX := "LDXX"
+define PROGRAM_rule_template
+.PHONY: $1
+$1: $$(call prog2exe,$1,$2)
+$$(call prog2exe,$1,$2): $$($1_OBJECTS) $$($1_MODULES_OBJECTS) $$($(call type2var,$2)_LINK_DEPS)
+ @echo $(PROGRAM_rule_template_echo$3)" [$2] $$@"
+ $Q$$($(call type2var,$2)_LINK$3) $$($1_OBJECTS) $$($1_MODULES_OBJECTS) $$($(call type2var,$2)_LDLIBS) $$($1_LDLIBS) -o $$@
+endef
+$(foreach program,$(HOST_PROGRAMS),$(eval $(call PROGRAM_rule_template,$(program),host,$(call iscxx,$(program)))))
+$(foreach program,$(TARGET_PROGRAMS),$(eval $(call PROGRAM_rule_template,$(program),target,$(call iscxx,$(program)))))
+
+# For each source, define the compile rule.
+SOURCE_rule_template_echo.c := "CC "
+SOURCE_rule_template_echo.cpp := "CXX "
+SOURCE_rule_template_echo.S := "AS "
+define SOURCE_rule_template
+$$(call src2obj,$1,$2): $1 | $$(OBJ_DIR_STAMP) $$($(call type2var,$2)_COMPILE_DEPS)
+ @echo $(SOURCE_rule_template_echo$3)" [$2] $$<"
+ $Q$$($(call type2var,$2)_COMPILE$3) -I$$(dir $$<).. -MMD -MP -MF $$(@:.o=.d) -MQ $$@ -o $$@ $$<
+endef
+$(foreach source,$(HOST_SOURCES),$(eval $(call SOURCE_rule_template,$(source),host,$(suffix $(source)))))
+$(foreach source,$(TARGET_SOURCES),$(eval $(call SOURCE_rule_template,$(source),target,$(suffix $(source)))))
+
+# Include deps.
+-include $(call src2dep,$(HOST_SOURCES),host)
+-include $(call src2dep,$(TARGET_SOURCES),target)
+
+# Clean rules.
+build.clean:
+ rm -f $(HOST_EXES) $(TARGET_ELFS) \
+ $(call src2obj,$(HOST_SOURCES),host) \
+ $(call src2obj,$(TARGET_SOURCES),target) \
+ $(call src2dep,$(HOST_SOURCES),host) \
+ $(call src2dep,$(TARGET_SOURCES),target)
diff --git a/cesar/common/make/config.mk b/cesar/common/make/config.mk
new file mode 100644
index 0000000000..ae18a21b80
--- /dev/null
+++ b/cesar/common/make/config.mk
@@ -0,0 +1,28 @@
+# Build time configuration.
+
+USER_PROJECT_CONFIG ?= $(wildcard $(if $(VARIANT),$(VARIANT)-)Config)
+DEFAULT_PROJECT_CONFIG := $(OBJ_DIR)/Config.empty
+PROJECT_CONFIG := $(if $(USER_PROJECT_CONFIG),$(USER_PROJECT_CONFIG),$(DEFAULT_PROJECT_CONFIG))
+HEADERS_CONFIG := $(OBJ_INC_DIR)/config
+
+HEADERS_CONFIG_STAMP := $(HEADERS_CONFIG)/headers.stamp
+
+HOST_COMPILE_DEPS += $(HEADERS_CONFIG_STAMP)
+TARGET_COMPILE_DEPS += $(HEADERS_CONFIG_STAMP)
+
+$(DEFAULT_PROJECT_CONFIG): $(OBJ_DIR_STAMP)
+ touch $@
+
+$(MERGED_CONFIG): $(PROJECT_CONFIG) $(MODULES_CONFIG) $(OBJ_DIR_STAMP)
+ @echo CONF merge
+ $Q$(TOOLS_DIR)/config-merge $(PROJECT_CONFIG) $(MODULES_CONFIG) > $@
+
+$(HEADERS_CONFIG_STAMP): $(MERGED_CONFIG)
+ @echo CONF headers
+ $Qmkdir -p $(dir $@)
+ $Q$(TOOLS_DIR)/config-headers $(OBJ_INC_DIR) $<
+ $Qtouch $@
+
+config.clean:
+ rm -f $(DEFAULT_PROJECT_CONFIG) $(MERGED_CONFIG)
+ rm -rf $(OBJ_INC_DIR)/config.h $(HEADERS_CONFIG)
diff --git a/cesar/common/make/default.mk b/cesar/common/make/default.mk
new file mode 100644
index 0000000000..0ac7fdfea5
--- /dev/null
+++ b/cesar/common/make/default.mk
@@ -0,0 +1,30 @@
+# Define default build parameters.
+
+INCLUDES := $(INCLUDES:%=-I$(BASE)/%) -I$(BASE) -I$(OBJ_DIR)/inc
+DEFS := $(DEFS)
+
+HOST_INCLUDES := $(HOST_INCLUDES:%=-I$(BASE)/%) $(INCLUDES)
+HOST_DEFS := $(HOST_DEFS) $(DEFS)
+HOST_CPPFLAGS = $(EXTRA_HOST_CPPFLAGS) $(HOST_DEFS) $(HOST_INCLUDES)
+HOST_CFLAGS := $(EXTRA_HOST_CFLAGS) -g $(call isdebug,,-O2) -finline -W -Wall -Wundef -Wno-unused-parameter
+ifneq ($(HOST_COV)$(COV),)
+ HOST_CFLAGS += -fprofile-arcs -ftest-coverage
+endif
+HOST_ASFLAGS := $(HOST_CFLAGS)
+HOST_CXXFLAGS := $(HOST_CFLAGS)
+HOST_LDFLAGS := $(EXTRA_HOST_LDFLAGS)
+HOST_LDLIBS := $(EXTRA_HOST_LDLIBS)
+
+TARGET_INCLUDES := $(TARGET_INCLUDES:%=-I$(BASE)/%) $(INCLUDES)
+TARGET_DEFS := $(TARGET_DEFS) $(DEFS)
+TARGET_CPPFLAGS = $(EXTRA_TARGET_CPPFLAGS) $(TARGET_DEFS) $(TARGET_INCLUDES)
+TARGET_CFLAGS := $(EXTRA_TARGET_CFLAGS) -g $(call isdebug,,-O2) -finline -W -Wall -Wundef -Wno-unused-parameter
+ifneq ($(TARGET_COV)$(COV),)
+ TARGET_CFLAGS += -fprofile-arcs -ftest-coverage
+endif
+TARGET_ASFLAGS := $(TARGET_CFLAGS)
+TARGET_CXXFLAGS := $(TARGET_CFLAGS)
+TARGET_LDFLAGS := $(EXTRA_TARGET_LDFLAGS)
+TARGET_LDLIBS := $(EXTRA_TARGET_LDLIBS)
+
+Q = @@
diff --git a/cesar/common/make/ecos.mk b/cesar/common/make/ecos.mk
new file mode 100644
index 0000000000..5c9d70735c
--- /dev/null
+++ b/cesar/common/make/ecos.mk
@@ -0,0 +1,149 @@
+ifneq ($(ECOS),)
+
+# Ecos files and directories.
+ECOS_DIR := $(OBJ_DIR)/ecos
+ECOS_INSTALL_DIR := $(ECOS_DIR)/install
+ECOS_BUILD_DIR := $(ECOS_DIR)/build
+ECOS_TREE_STAMP := $(ECOS_DIR)/tree.stamp
+ECOS_HEADERS_STAMP := $(ECOS_DIR)/headers.stamp
+ECOS_DEFS := $(ECOS_INSTALL_DIR)/include/pkgconf/ecos.mak
+ECOS_CONFIG_COMPACT ?= $(if $(VARIANT),$(VARIANT)-)ecos.ecc.sh
+ECOS_CONFIG := $(ECOS_DIR)/ecos.ecc
+ECOS_CONFIG_COV := $(ECOS_CONFIG:%.ecc=%-cov.ecc)
+ECOS_CONFIG_FOR_TREE := $(ECOS_CONFIG)
+ifneq ($(TARGET_COV)$(COV),)
+ ECOS_CONFIG_FOR_TREE := $(ECOS_CONFIG_COV)
+endif
+ECOS_NEW_CONFIG_COMPACT := new-ecos.ecc.sh
+ECOS_NEW_CONFIG := new-ecos.ecc
+ECOS_INCLUDE_DIR := $(ECOS_INSTALL_DIR)/include
+ECOS_LIB_DIR := $(ECOS_INSTALL_DIR)/lib
+ECOS_LIB_FILES := vectors.o extras.o libtarget.a
+ECOS_LIBS := $(ECOS_LIB_FILES:%=$(ECOS_LIB_DIR)/%)
+ECOS_LD_SCRIPT := $(ECOS_LIB_DIR)/target.ld
+ECOS_SILENT := -s
+
+# Ecos packages repository.
+ifdef ECOS_REPOSITORY
+ $(warning overiding ECOS_REPOSITORY)
+endif
+override ECOS_REPOSITORY := $(CURDIR)/$(BASE)/ecos/packages
+export ECOS_REPOSITORY
+
+# Only include ecos definitions if needed (do not include it if clean or
+# *.clean).
+ifneq ($(if $(MAKECMDGOALS),$(filter-out \
+ %.clean clean,$(MAKECMDGOALS)),default),)
+ # Include and filter ecos defined flags.
+ -include $(ECOS_DEFS)
+endif
+
+ifdef ECOS_GLOBAL_CFLAGS
+ # GCC since 2.95 does -finit-priority by default so remove it from old HALs.
+ ECOS_GLOBAL_CFLAGS := $(subst -finit-priority,,$(ECOS_GLOBAL_CFLAGS))
+ # -fvtable-gc is known to be broken in all recent GCC.
+ ECOS_GLOBAL_CFLAGS := $(subst -fvtable-gc,,$(ECOS_GLOBAL_CFLAGS))
+
+ # To support more recent GCC whilst preserving existing behaviour, we need
+ # to increase the inlining limit globally from the default 600. Note this
+ # will break GCC 2.95 based tools and earlier. You must use "make OLDGCC=1"
+ # to avoid this.
+ ifneq ($(OLDGCC),1)
+ ECOS_GLOBAL_CFLAGS := -finline-limit=7000 $(ECOS_GLOBAL_CFLAGS)
+ endif
+
+ # Filter out unwanted options.
+ ECOS_GLOBAL_CFLAGS := $(subst -O2,,$(ECOS_GLOBAL_CFLAGS))
+ ECOS_GLOBAL_CFLAGS := $(subst -fdata-sections,,$(ECOS_GLOBAL_CFLAGS))
+ ECOS_GLOBAL_CFLAGS := $(subst -ffunction-sections,,$(ECOS_GLOBAL_CFLAGS))
+
+ # Separate C++ flags out from C flags.
+ ECOS_CFLAGS := $(ECOS_GLOBAL_CFLAGS)
+ ECOS_CFLAGS := $(subst -fno-rtti,,$(ECOS_CFLAGS))
+ ECOS_CFLAGS := $(subst -frtti,,$(ECOS_CFLAGS))
+ ECOS_CFLAGS := $(subst -Woverloaded-virtual,,$(ECOS_CFLAGS))
+ ECOS_CFLAGS := $(subst -fvtable-gc,,$(ECOS_CFLAGS))
+
+ ECOS_CXXFLAGS := $(ECOS_GLOBAL_CFLAGS)
+ ECOS_CXXFLAGS := $(subst -Wstrict-prototypes,,$(ECOS_CXXFLAGS))
+
+ ECOS_LDFLAGS := $(ECOS_GLOBAL_LDFLAGS)
+
+ # Use ecos defined flags.
+ TARGET_DEFS += -DECOS=1
+ TARGET_CFLAGS := $(sort $(TARGET_CFLAGS) $(ECOS_CFLAGS))
+ TARGET_CXXFLAGS := $(sort $(TARGET_CXXFLAGS) $(ECOS_CXXFLAGS))
+ TARGET_INCLUDES += -I$(ECOS_INCLUDE_DIR)
+ TARGET_LDFLAGS := $(sort $(TARGET_LDFLAGS) $(ECOS_LDFLAGS))
+ TARGET_LDFLAGS += -L$(ECOS_LIB_DIR) -T$(ECOS_LD_SCRIPT)
+ TARGET_COMPILE_DEPS += $(ECOS_HEADERS_STAMP)
+ TARGET_LINK_DEPS += $(ECOS_LIBS) $(ECOS_LD_SCRIPT)
+ ifneq ($(CROSS_COMPILE),$(ECOS_COMMAND_PREFIX))
+ ECOS_MAKEFLAGS := COMMAND_PREFIX=$(CROSS_COMPILE)
+ endif
+ ECOS_MAKEFLAGS += BASE=$(CURDIR)/$(BASE) OBJ_DIR=$(CURDIR)/$(OBJ_DIR)
+else
+ # Catch errors.
+ TARGET_CC = $(error no ecos definitions included)
+ TARGET_CXX = $(error no ecos definitions included)
+endif
+
+EXTRA_CLEAN += ecos.clean
+
+.PHONY: ecos.all ecos.headers ecos.tree ecos.config ecos.compact-config ecos.clean
+
+$(ECOS_LIBS) $(ECOS_LD_SCRIPT): ecos.all
+ecos.all: $(ECOS_TREE_STAMP)
+ @echo MAKE ecos.all
+ $Q$(MAKE) $(ECOS_MAKEFLAGS) $(ECOS_SILENT) -C $(ECOS_BUILD_DIR)
+
+ecos.headers: $(ECOS_HEADERS_STAMP)
+$(ECOS_HEADERS_STAMP): $(ECOS_TREE_STAMP)
+ @echo MAKE ecos.headers
+ $Q$(MAKE) $(ECOS_MAKEFLAGS) $(ECOS_SILENT) -C $(ECOS_BUILD_DIR) headers
+ touch $@
+
+ecos.tree: $(ECOS_TREE_STAMP) ; @:
+$(ECOS_TREE_STAMP): $(ECOS_CONFIG_FOR_TREE)
+ @echo ECOS tree
+ mkdir -p $(ECOS_BUILD_DIR)
+ cd $(ECOS_BUILD_DIR) && \
+ ecosconfig --config=$(CURDIR)/$(ECOS_CONFIG_FOR_TREE) \
+ --prefix=$(CURDIR)/$(ECOS_INSTALL_DIR) tree
+ touch $@
+
+$(ECOS_DEFS): $(ECOS_TREE_STAMP)
+ @echo MAKE ecos.defs
+ $Q$(MAKE) $(ECOS_MAKEFLAGS) $(ECOS_SILENT) -C $(ECOS_BUILD_DIR) $(CURDIR)/$@
+
+ecos.config: $(ECOS_CONFIG)
+$(ECOS_CONFIG): $(ECOS_CONFIG_COMPACT)
+ @echo ECOS conf
+ mkdir -p $(ECOS_DIR)
+ sh -e $< $@
+
+$(ECOS_CONFIG_COV): $(ECOS_CONFIG)
+ @echo ECOS conf cov
+ cp $< $@
+ ecosconfig --config=$(CURDIR)/$@ add CYGPKG_GCOV
+
+# Generate the compacted ecos configuration.
+$(ECOS_NEW_CONFIG_COMPACT): $(ECOS_CONFIG)
+ $(TOOLS_DIR)/compact-ecos-config $< > $@
+
+$(ECOS_NEW_CONFIG): $(ECOS_NEW_CONFIG_COMPACT)
+ @echo ECOS new-conf
+ sh -e $< $@
+
+ecos.compact-config: $(ECOS_NEW_CONFIG)
+ -diff $(ECOS_NEW_CONFIG) $(ECOS_CONFIG)
+ @echo copy $(ECOS_NEW_CONFIG_COMPACT) to $(ECOS_CONFIG_COMPACT) if satisfied.
+ false # Stop make
+
+ecos.clean:
+ rm -rf $(ECOS_TREE_STAMP) $(ECOS_BUILD_DIR)
+ rm -rf $(ECOS_HEADERS_STAMP) $(ECOS_INSTALL_DIR)
+ rm -f $(ECOS_CONFIG) $(ECOS_CONFIG_COV) $(ECOS_NEW_CONFIG)
+ -if [ -d $(ECOS_DIR) ]; then rmdir $(ECOS_DIR); fi
+
+endif # ifneq ($(ECOS),)
diff --git a/cesar/common/make/func.mk b/cesar/common/make/func.mk
new file mode 100644
index 0000000000..6564fc8c5e
--- /dev/null
+++ b/cesar/common/make/func.mk
@@ -0,0 +1,71 @@
+# Define utility functions.
+
+# Module name to variable name.
+# $(call mod2var,foo/bar)
+# => foo_bar
+mod2var = $(subst /,_,$1)
+
+# Get source file basename.
+# $(call src2base,foo.c bar.S)
+# => foo bar
+src2base = $(patsubst %.cpp,%,$(patsubst %.c,%,$(patsubst %.S,%,$1)))\
+$(if $(filter-out %.c %.S %.cpp,$1),$(error unknown source extension))
+
+# Source file to source file, adding path.
+# $(call src2src,foo.c bar.c,mod/src)
+# => mod/src/foo.c mod/src/bar.c
+# $(call src2src,all,mod/src)
+# => $(call wild2src,mod/src/*.c mod/src/*.cpp)
+src2src = $(if $(filter all,$1),\
+$(call wild2src,$(patsubst %,$2/%,*.c *.cpp)),$(1:%=$2/%))
+
+# Wildcard expand a source pattern.
+# $(call wild2src,mod/src/*.c mod/src/*.cpp)
+# => mod/src/foo.c mod/src/bar.c
+wild2src = $(wildcard $1) $(patsubst $(BASE)/%,%,$(wildcard $(1:%=$(BASE)/%)))
+
+# Source file to object file.
+# $(call src2obj,foo.c,target)
+# => $(OBJ_DIR)/foo.target.o
+# $(call src2obj,foo/bar.c,host)
+# => $(OBJ_DIR)/foo__bar.host.o
+src2obj = $(patsubst %,$(OBJ_DIR)/%.$2.o,$(subst /,__,$(call src2base,$1)))
+
+# Source file to dependency file.
+# $(call src2dep,foo.c,target)
+# => $(OBJ_DIR)/foo.target.d
+# $(call src2dep,bar.c,host)
+# => $(OBJ_DIR)/bar.host.d
+src2dep = $(patsubst %.o,%.d,$(call src2obj,$1,$2))
+
+# Program name to executable file name.
+# $(call prog2exe,test_foo,target)
+# => $(OBJ_DIR)/test_foo.elf
+# $(call prog2exe,test_bar,host)
+# => $(OBJ_DIR)/test_bar
+prog2exe = $(patsubst %,$(OBJ_DIR)/%$(if $(filter host,$2),,.elf),$1)
+
+# Build type (target or host) to variable name.
+# $(call type2var,target)_CC
+# => TARGET_CC
+# $(call type2var,host)_CC
+# => HOST_CC
+type2var = $(if $(filter target,$1),TARGET,$(if $(filter host,$1),HOST,$(error unknown type)))
+
+# Find whether a C++ link should be made.
+# $(call iscxx,prog), if prog sources include a c++ file
+# => _CXX
+# else
+# =>
+iscxx = $(if $(filter %.cpp,$($1_SOURCES) $($1_MODULES_SOURCES)),_CXX,)
+
+# Expand to the first argument when debug, to the second one when non debug.
+# $(call isdebug,-g,-O2), if debug is activated
+# => -g
+# else
+# => -O2
+ifeq ($(CONFIG_DEBUG),n)
+isdebug = $2
+else
+isdebug = $1
+endif
diff --git a/cesar/common/make/misc.mk b/cesar/common/make/misc.mk
new file mode 100644
index 0000000000..5205344aed
--- /dev/null
+++ b/cesar/common/make/misc.mk
@@ -0,0 +1,13 @@
+# Define miscellaneous rules.
+
+.PHONY: clean
+
+$(OBJ_DIR_STAMP) $(OBJ_INC_DIR_STAMP):
+ @mkdir -p $(dir $@) && touch $@
+
+clean: config.clean build.clean $(EXTRA_CLEAN)
+ rm -f $(OBJ_INC_DIR_STAMP) $(OBJ_DIR_STAMP) \
+ $(CLEAN_FILES)
+ rm -rf $(CLEAN_DIRS)
+ -if [ -d $(OBJ_INC_DIR) ]; then rmdir $(OBJ_INC_DIR); fi
+ -if [ -d $(OBJ_DIR) ]; then rmdir $(OBJ_DIR); fi
diff --git a/cesar/common/make/print.mk b/cesar/common/make/print.mk
new file mode 100644
index 0000000000..35bc17096d
--- /dev/null
+++ b/cesar/common/make/print.mk
@@ -0,0 +1,67 @@
+# Define print rules mainly for debuging.
+
+.PHONY: print print_modules print_programs print_setup
+
+empty :=
+
+print: print_modules print_programs print_setup
+
+define MODULE_print
+ $(empty)
+ @echo ' $1:'
+ @echo ' $(call mod2var,$1)_MODULE_SOURCES = $($(call mod2var,$1)_MODULE_SOURCES)'
+ @echo ' $(call mod2var,$1)_MODULE_MODULES = $($(call mod2var,$1)_MODULE_MODULES)'
+endef
+
+print_modules:
+ @echo 'ALL_MODULES = $(ALL_MODULES)'
+ $(foreach module,$(ALL_MODULES),$(call MODULE_print,$(module)))
+
+define PROGRAM_print
+ $(empty)
+ @echo ' $1:'
+ @echo ' $1_SOURCES = $($1_SOURCES)'
+ @echo ' $1_MODULES = $($1_MODULES)'
+ @echo ' $1_MODULES_SOURCES = $($1_MODULES_SOURCES)'
+ @echo ' $1_OBJECTS = $($1_OBJECTS)'
+ @echo ' $1_MODULES_OBJECTS = $($1_MODULES_OBJECTS)'
+ @echo ' $1_LDLIBS = $($1_LDLIBS)'
+endef
+
+print_programs:
+ @echo 'HOST_PROGRAMS = $(HOST_PROGRAMS)'
+ $(foreach program,$(HOST_PROGRAMS),$(call PROGRAM_print,$(program)))
+ @echo 'TARGET_PROGRAMS = $(TARGET_PROGRAMS)'
+ $(foreach program,$(TARGET_PROGRAMS),$(call PROGRAM_print,$(program)))
+
+print_setup:
+ @echo 'HOST_...'
+ @echo ' INCLUDES = $(HOST_INCLUDES)'
+ @echo ' DEFS = $(HOST_DEFS)'
+ @echo ' CPPFLAGS = $(HOST_CPPFLAGS)'
+ @echo ' CFLAGS = $(HOST_CFLAGS)'
+ @echo ' CXXFLAGS = $(HOST_CXXFLAGS)'
+ @echo ' LDFLAGS = $(HOST_LDFLAGS)'
+ @echo ' LDLIBS = $(HOST_LDLIBS)'
+ @echo ' CC = $(HOST_CC)'
+ @echo ' CXX = $(HOST_CXX)'
+ @echo ' COMPILE.c = $(HOST_COMPILE.c)'
+ @echo ' COMPILE.cpp = $(HOST_COMPILE.cpp)'
+ @echo ' COMPILE.S = $(HOST_COMPILE.S)'
+ @echo ' LINK = $(HOST_LINK)'
+ @echo ' LINK_CXX = $(HOST_LINK_CXX)'
+ @echo 'TARGET_...'
+ @echo ' INCLUDES = $(TARGET_INCLUDES)'
+ @echo ' DEFS = $(TARGET_DEFS)'
+ @echo ' CPPFLAGS = $(TARGET_CPPFLAGS)'
+ @echo ' CFLAGS = $(TARGET_CFLAGS)'
+ @echo ' CXXFLAGS = $(TARGET_CXXFLAGS)'
+ @echo ' LDFLAGS = $(TARGET_LDFLAGS)'
+ @echo ' LDLIBS = $(TARGET_LDLIBS)'
+ @echo ' CC = $(TARGET_CC)'
+ @echo ' CXX = $(TARGET_CXX)'
+ @echo ' COMPILE.c = $(TARGET_COMPILE.c)'
+ @echo ' COMPILE.cpp = $(TARGET_COMPILE.cpp)'
+ @echo ' COMPILE.S = $(TARGET_COMPILE.S)'
+ @echo ' LINK = $(TARGET_LINK)'
+ @echo ' LINK_CXX = $(TARGET_LINK_CXX)'
diff --git a/cesar/common/make/setup.mk b/cesar/common/make/setup.mk
new file mode 100644
index 0000000000..d19dcbc3f3
--- /dev/null
+++ b/cesar/common/make/setup.mk
@@ -0,0 +1,67 @@
+# Setup build parameters.
+
+HOST_EXES := $(call prog2exe,$(HOST_PROGRAMS),host)
+TARGET_ELFS := $(call prog2exe,$(TARGET_PROGRAMS),target)
+
+ALL_PROGRAMS := $(HOST_PROGRAMS) $(TARGET_PROGRAMS)
+ALL_MODULES := $(sort $(foreach program,$(ALL_PROGRAMS),$($(program)_MODULES)))
+
+MODULES_CONFIG :=
+
+ifdef SOURCES
+$(error the SOURCES variable should not be defined)
+endif
+
+ifdef MODULES
+$(error the MODULES variable should not be defined)
+endif
+
+# For each used module, include its Module file. Well, this could be made
+# simpler by using more verbose Module files...
+define MODULE_template
+# Include module file.
+MODULE := $1
+include $$(BASE)/$1/Module
+MODULE :=
+# Use defined sources or overridden ones.
+SOURCES := $$(if $$($(call mod2var,$1)_MODULE_SOURCES),$$($(call mod2var,$1)_MODULE_SOURCES),$$(SOURCES))
+$(call mod2var,$1)_MODULE_SOURCES := $$(call src2src,$$(SOURCES),$1/src)
+SOURCES :=
+# Merge module configuration.
+MODULES_CONFIG += $$(wildcard $$(BASE)/$1/Config)
+# Add any dependent modules.
+$(call mod2var,$1)_MODULE_MODULES := $$(MODULES)
+MODULES :=
+$$(foreach module,$$(filter-out $$(ALL_MODULES),$$($(call mod2var,$1)_MODULE_MODULES)),$$(eval $$(call MODULE_template,$$(module))))
+ALL_MODULES := $$(sort $$(ALL_MODULES) $$($(call mod2var,$1)_MODULE_MODULES))
+endef
+$(foreach module,$(ALL_MODULES),$(eval $(call MODULE_template,$(module))))
+
+# Add any dependent modules. For the moment, does not support multiple level
+# of dependencies.
+define PROGRAM_MODULES_template
+$1_MODULES := $$(sort $$($1_MODULES) $$(foreach module,$$($1_MODULES),$$($$(call mod2var,$$(module))_MODULE_MODULES)))
+endef
+$(foreach program,$(ALL_PROGRAMS),$(eval $(call PROGRAM_MODULES_template,$(program),host)))
+
+# For each program.
+define PROGRAM_template
+$1_SOURCES := $$(call src2src,$$($1_SOURCES),src)
+$1_OBJECTS := $$(call src2obj,$$($1_SOURCES),$2)
+$1_MODULES_SOURCES := $$(foreach module,$$($1_MODULES),$$($$(call mod2var,$$(module))_MODULE_SOURCES))
+$1_MODULES_OBJECTS := $$(call src2obj,$$($1_MODULES_SOURCES),$2)
+endef
+$(foreach program,$(HOST_PROGRAMS),$(eval $(call PROGRAM_template,$(program),host)))
+$(foreach program,$(TARGET_PROGRAMS),$(eval $(call PROGRAM_template,$(program),target)))
+
+HOST_SOURCES := $(sort $(foreach program,$(HOST_PROGRAMS),$($(program)_SOURCES) $($(program)_MODULES_SOURCES)))
+TARGET_SOURCES := $(sort $(foreach program,$(TARGET_PROGRAMS),$($(program)_SOURCES) $($(program)_MODULES_SOURCES)))
+ALL_SOURCES := $(sort $(HOST_SOURCES) $(TARGET_SOURCES))
+
+vpath %.c $(BASE)
+vpath %.cpp $(BASE)
+vpath %.S $(BASE)
+
+OBJ_DIR_STAMP := $(OBJ_DIR)/dir.stamp
+OBJ_INC_DIR := $(OBJ_DIR)/inc
+OBJ_INC_DIR_STAMP := $(OBJ_INC_DIR)/dir.stamp
diff --git a/cesar/common/make/target.mk b/cesar/common/make/target.mk
new file mode 100644
index 0000000000..eec2a3d546
--- /dev/null
+++ b/cesar/common/make/target.mk
@@ -0,0 +1,23 @@
+# Define target specific options.
+
+ifeq ($(TARGET),)
+
+ # Target is synthetic or maximus.
+
+else
+ifeq ($(TARGET),sparc)
+
+ # Target is sparc.
+ CROSS_COMPILE := $(TARGET)-elf-
+
+else
+ifneq ($(TARGET_PROGRAMS),)
+ $(error unknown TARGET)
+endif
+endif
+endif
+
+# User defined compiler.
+ifneq ($(CROSS_COMPILE_$(TARGET)),)
+ CROSS_COMPILE := $(CROSS_COMPILE_$(TARGET))
+endif
diff --git a/cesar/common/make/test/Config-output b/cesar/common/make/test/Config-output
new file mode 100644
index 0000000000..312d3bef5e
--- /dev/null
+++ b/cesar/common/make/test/Config-output
@@ -0,0 +1,3 @@
+CONF merge
+CONF headers
+MAKE ecos.all
diff --git a/cesar/common/make/test/Config.alt-output b/cesar/common/make/test/Config.alt-output
new file mode 100644
index 0000000000..5bbb668b24
--- /dev/null
+++ b/cesar/common/make/test/Config.alt-output
@@ -0,0 +1,8 @@
+CONF merge
+CONF headers
+CC [host] ../../../../common/make/test/modules/b/src/b_shout.c
+LINK [host] obj/test_make
+LDXX [host] obj/test_cpp
+CC [target] ../../../../common/make/test/modules/b/src/b_shout.c
+MAKE ecos.all
+LINK [target] obj/test_make_ecos.elf
diff --git a/cesar/common/make/test/b_shout.h-output b/cesar/common/make/test/b_shout.h-output
new file mode 100644
index 0000000000..f07242314c
--- /dev/null
+++ b/cesar/common/make/test/b_shout.h-output
@@ -0,0 +1,6 @@
+CC [host] ../../../../common/make/test/modules/b/src/b_shout.c
+LINK [host] obj/test_make
+LDXX [host] obj/test_cpp
+CC [target] ../../../../common/make/test/modules/b/src/b_shout.c
+MAKE ecos.all
+LINK [target] obj/test_make_ecos.elf
diff --git a/cesar/common/make/test/clean-output b/cesar/common/make/test/clean-output
new file mode 100644
index 0000000000..638c799cc1
--- /dev/null
+++ b/cesar/common/make/test/clean-output
@@ -0,0 +1,12 @@
+rm -f obj/Config.empty obj/Config.merged
+rm -rf obj/inc/config.h obj/inc/config
+rm -f obj/test_make obj/test_cpp obj/test_make_ecos.elf \
+rm -rf obj/ecos/tree.stamp obj/ecos/build
+rm -rf obj/ecos/headers.stamp obj/ecos/install
+rm -f obj/ecos/ecos.ecc obj/ecos/ecos-cov.ecc new-ecos.ecc
+if [ -d obj/ecos ]; then rmdir obj/ecos; fi
+rm -f obj/inc/dir.stamp obj/dir.stamp \
+
+rm -rf
+if [ -d obj/inc ]; then rmdir obj/inc; fi
+if [ -d obj ]; then rmdir obj; fi
diff --git a/cesar/common/make/test/ecos.ecc.sh-output b/cesar/common/make/test/ecos.ecc.sh-output
new file mode 100644
index 0000000000..fe4145120f
--- /dev/null
+++ b/cesar/common/make/test/ecos.ecc.sh-output
@@ -0,0 +1,5 @@
+ECOS conf
+ECOS tree
+MAKE ecos.defs
+MAKE ecos.headers
+MAKE ecos.all
diff --git a/cesar/common/make/test/first-output b/cesar/common/make/test/first-output
new file mode 100644
index 0000000000..dede1a43ea
--- /dev/null
+++ b/cesar/common/make/test/first-output
@@ -0,0 +1,19 @@
+ECOS conf
+ECOS tree
+MAKE ecos.defs
+CONF merge
+CONF headers
+CC [host] src/test_make.c
+CC [host] ../../../../common/make/test/modules/a/src/a.c
+CC [host] ../../../../common/make/test/modules/b/src/b_print.c
+CC [host] ../../../../common/make/test/modules/b/src/b_shout.c
+LINK [host] obj/test_make
+CXX [host] src/test_cpp.cpp
+LDXX [host] obj/test_cpp
+MAKE ecos.headers
+CC [target] src/test_make.c
+CC [target] ../../../../common/make/test/modules/a/src/a.c
+CC [target] ../../../../common/make/test/modules/b/src/b_print.c
+CC [target] ../../../../common/make/test/modules/b/src/b_shout.c
+MAKE ecos.all
+LINK [target] obj/test_make_ecos.elf
diff --git a/cesar/common/make/test/modules/a/Module b/cesar/common/make/test/modules/a/Module
new file mode 100644
index 0000000000..247658ae25
--- /dev/null
+++ b/cesar/common/make/test/modules/a/Module
@@ -0,0 +1,2 @@
+SOURCES := a.c
+MODULES := common/make/test/modules/b
diff --git a/cesar/common/make/test/modules/a/a.h b/cesar/common/make/test/modules/a/a.h
new file mode 100644
index 0000000000..843e51522b
--- /dev/null
+++ b/cesar/common/make/test/modules/a/a.h
@@ -0,0 +1,23 @@
+#ifndef a_h
+#define a_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file a.h
+ * \brief Test module header for build system tests.
+ * \ingroup test
+ */
+
+BEGIN_DECLS
+
+void
+a_print (void);
+
+END_DECLS
+
+#endif /* a_h */
diff --git a/cesar/common/make/test/modules/a/src/a.c b/cesar/common/make/test/modules/a/src/a.c
new file mode 100644
index 0000000000..9fa32f6ae7
--- /dev/null
+++ b/cesar/common/make/test/modules/a/src/a.c
@@ -0,0 +1,25 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file a.c
+ * \brief Test module for build system tests.
+ * \ingroup test
+ */
+#include "common/std.h"
+#include "a.h"
+
+#include <stdio.h>
+
+/**
+ * Print module's deepest thought.
+ */
+void
+a_print (void)
+{
+ printf ("I am the a module!\n");
+}
diff --git a/cesar/common/make/test/modules/b/Config b/cesar/common/make/test/modules/b/Config
new file mode 100644
index 0000000000..860e294ba9
--- /dev/null
+++ b/cesar/common/make/test/modules/b/Config
@@ -0,0 +1,3 @@
+CONFIG_B_LISTEN_CAREFULLY = y
+CONFIG_B_SHOUT_TWICE = y
+CONFIG_B_REPEAT = 1
diff --git a/cesar/common/make/test/modules/b/Module b/cesar/common/make/test/modules/b/Module
new file mode 100644
index 0000000000..b52b97a009
--- /dev/null
+++ b/cesar/common/make/test/modules/b/Module
@@ -0,0 +1 @@
+SOURCES := b_print.c b_shout.c
diff --git a/cesar/common/make/test/modules/b/b.h b/cesar/common/make/test/modules/b/b.h
new file mode 100644
index 0000000000..4e0724428b
--- /dev/null
+++ b/cesar/common/make/test/modules/b/b.h
@@ -0,0 +1,26 @@
+#ifndef b_h
+#define b_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file b.h
+ * \brief Test module header for build system tests.
+ * \ingroup test
+ */
+
+BEGIN_DECLS
+
+void
+b_print (void);
+
+void
+b_shout (void);
+
+END_DECLS
+
+#endif /* b_h */
diff --git a/cesar/common/make/test/modules/b/inc/b_shout.h b/cesar/common/make/test/modules/b/inc/b_shout.h
new file mode 100644
index 0000000000..9e80de10e3
--- /dev/null
+++ b/cesar/common/make/test/modules/b/inc/b_shout.h
@@ -0,0 +1,18 @@
+#ifndef b_shout_h
+#define b_shout_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file b_shout.h
+ * \brief Test module private header for build system tests.
+ * \ingroup test
+ */
+
+#define B_SHOUT "I AM THE B MODULE!\n"
+
+#endif /* b_shout_h */
diff --git a/cesar/common/make/test/modules/b/src/b_print.c b/cesar/common/make/test/modules/b/src/b_print.c
new file mode 100644
index 0000000000..b3b5d2f2ea
--- /dev/null
+++ b/cesar/common/make/test/modules/b/src/b_print.c
@@ -0,0 +1,33 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file b_print.c
+ * \brief Test module for build system tests.
+ * \ingroup test
+ */
+#include "common/std.h"
+#include "b.h"
+
+#include "config/b/listen/carefully.h"
+#include "config/b/repeat.h"
+
+#include <stdio.h>
+
+/**
+ * Print module's deepest thought.
+ */
+void
+b_print (void)
+{
+#if CONFIG_B_LISTEN_CAREFULLY
+ printf ("please listen carefully (however, it is a stupid example):\n");
+#endif
+ uint i;
+ for (i = 0; i < CONFIG_B_REPEAT; i++)
+ printf ("I am the b module!\n");
+}
diff --git a/cesar/common/make/test/modules/b/src/b_shout.c b/cesar/common/make/test/modules/b/src/b_shout.c
new file mode 100644
index 0000000000..06472cf872
--- /dev/null
+++ b/cesar/common/make/test/modules/b/src/b_shout.c
@@ -0,0 +1,34 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file b_shout.c
+ * \brief Test module for build system tests.
+ * \ingroup test
+ */
+#include "common/std.h"
+#include "inc/b_shout.h"
+#include "b.h"
+
+#include "config/b.h"
+
+#include <stdio.h>
+
+/**
+ * Shout module's deepest thought.
+ */
+void
+b_shout (void)
+{
+#if CONFIG_B_LISTEN_CAREFULLY
+ printf ("please listen carefully (however, it is a stupid example):\n");
+#endif
+ printf (B_SHOUT);
+#if CONFIG_B_SHOUT_TWICE
+ printf (B_SHOUT);
+#endif
+}
diff --git a/cesar/common/make/test/nothing-output b/cesar/common/make/test/nothing-output
new file mode 100644
index 0000000000..ae63c9beb5
--- /dev/null
+++ b/cesar/common/make/test/nothing-output
@@ -0,0 +1 @@
+MAKE ecos.all
diff --git a/cesar/common/make/test/project/Config b/cesar/common/make/test/project/Config
new file mode 100644
index 0000000000..31dbc59855
--- /dev/null
+++ b/cesar/common/make/test/project/Config
@@ -0,0 +1,2 @@
+CONFIG_B_SHOUT_TWICE = n
+CONFIG_B_REPEAT = 3
diff --git a/cesar/common/make/test/project/Config.alt b/cesar/common/make/test/project/Config.alt
new file mode 100644
index 0000000000..b46399634a
--- /dev/null
+++ b/cesar/common/make/test/project/Config.alt
@@ -0,0 +1,2 @@
+CONFIG_B_SHOUT_TWICE = y
+CONFIG_B_REPEAT = 3
diff --git a/cesar/common/make/test/project/Makefile b/cesar/common/make/test/project/Makefile
new file mode 100644
index 0000000000..f247892fe9
--- /dev/null
+++ b/cesar/common/make/test/project/Makefile
@@ -0,0 +1,20 @@
+BASE = ../../../..
+
+ECOS = y
+TARGET = sparc
+
+# This is an extra include.
+INCLUDES = common/make/test
+
+HOST_PROGRAMS = test_make test_cpp
+test_make_SOURCES = test_make.c
+test_make_MODULES = lib common/make/test/modules/a
+
+test_cpp_SOURCES = test_cpp.cpp
+test_cpp_MODULES = lib common/make/test/modules/a common/make/test/modules/b
+
+TARGET_PROGRAMS = test_make_ecos
+test_make_ecos_SOURCES = test_make.c
+test_make_ecos_MODULES = lib common/make/test/modules/a
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/common/make/test/project/ecos.ecc.sh b/cesar/common/make/test/project/ecos.ecc.sh
new file mode 100644
index 0000000000..be98f3e872
--- /dev/null
+++ b/cesar/common/make/test/project/ecos.ecc.sh
@@ -0,0 +1,11 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new sparc_leon default
+cat >> $config <<EOF
+cdl_component CYGHWR_HAL_SPARC_FLAT {
+ user_value 1
+}
+cdl_component CYGPKG_HAL_SPARC_REGISTER_WINDOWS {
+ user_value 2
+}
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/common/make/test/project/inc/test_make.h b/cesar/common/make/test/project/inc/test_make.h
new file mode 100644
index 0000000000..acbf024439
--- /dev/null
+++ b/cesar/common/make/test/project/inc/test_make.h
@@ -0,0 +1,18 @@
+#ifndef test_make_h
+#define test_make_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file test_make.h
+ * \brief Test program header for build system tests.
+ * \ingroup test
+ */
+
+#define TEST_MAKE_EXIT 0
+
+#endif /* test_make_h */
diff --git a/cesar/common/make/test/project/src/test_cpp.cpp b/cesar/common/make/test/project/src/test_cpp.cpp
new file mode 100644
index 0000000000..a514ab66e0
--- /dev/null
+++ b/cesar/common/make/test/project/src/test_cpp.cpp
@@ -0,0 +1,27 @@
+// Cesar project {{{
+//
+// Copyright (C) 2007 Spidcom
+//
+// <<<Licence>>>
+//
+// }}}
+/// \file test_cpp.cpp
+/// \brief Test c++ program for build system tests.
+/// \ingroup test
+#include "common/std.h"
+#include "inc/test_make.h"
+
+#include "modules/a/a.h"
+#include "modules/b/b.h"
+
+#include <iostream>
+
+int
+main (void)
+{
+ std::cout << "I am a c++ program" << std::endl;
+ a_print ();
+ b_print ();
+ b_shout ();
+ return TEST_MAKE_EXIT;
+}
diff --git a/cesar/common/make/test/project/src/test_make.c b/cesar/common/make/test/project/src/test_make.c
new file mode 100644
index 0000000000..faf947c5b2
--- /dev/null
+++ b/cesar/common/make/test/project/src/test_make.c
@@ -0,0 +1,26 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file test_make.c
+ * \brief Test program for build system tests.
+ * \ingroup test
+ */
+#include "common/std.h"
+#include "inc/test_make.h"
+
+#include "modules/a/a.h"
+#include "modules/b/b.h"
+
+int
+main (void)
+{
+ a_print ();
+ b_print ();
+ b_shout ();
+ return TEST_MAKE_EXIT;
+}
diff --git a/cesar/common/make/test/project_synth/Config b/cesar/common/make/test/project_synth/Config
new file mode 100644
index 0000000000..0fde81207e
--- /dev/null
+++ b/cesar/common/make/test/project_synth/Config
@@ -0,0 +1 @@
+CONFIG_B_SHOUT_TWICE = n
diff --git a/cesar/common/make/test/project_synth/Makefile b/cesar/common/make/test/project_synth/Makefile
new file mode 100644
index 0000000000..cdc62ac448
--- /dev/null
+++ b/cesar/common/make/test/project_synth/Makefile
@@ -0,0 +1,12 @@
+BASE = ../../../..
+
+ECOS = y
+
+# This is an extra include.
+INCLUDES = common/make/test
+
+TARGET_PROGRAMS = test_ecos_synth
+test_ecos_synth_SOURCES = test_make.c
+test_ecos_synth_MODULES = lib common/make/test/modules/a
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/common/make/test/project_synth/ecos.ecc.sh b/cesar/common/make/test/project_synth/ecos.ecc.sh
new file mode 100644
index 0000000000..8253d98c9a
--- /dev/null
+++ b/cesar/common/make/test/project_synth/ecos.ecc.sh
@@ -0,0 +1,5 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new linux default
+cat >> $config <<EOF
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/common/make/test/project_synth/inc/test_make.h b/cesar/common/make/test/project_synth/inc/test_make.h
new file mode 100644
index 0000000000..acbf024439
--- /dev/null
+++ b/cesar/common/make/test/project_synth/inc/test_make.h
@@ -0,0 +1,18 @@
+#ifndef test_make_h
+#define test_make_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file test_make.h
+ * \brief Test program header for build system tests.
+ * \ingroup test
+ */
+
+#define TEST_MAKE_EXIT 0
+
+#endif /* test_make_h */
diff --git a/cesar/common/make/test/project_synth/src/test_make.c b/cesar/common/make/test/project_synth/src/test_make.c
new file mode 100644
index 0000000000..faf947c5b2
--- /dev/null
+++ b/cesar/common/make/test/project_synth/src/test_make.c
@@ -0,0 +1,26 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file test_make.c
+ * \brief Test program for build system tests.
+ * \ingroup test
+ */
+#include "common/std.h"
+#include "inc/test_make.h"
+
+#include "modules/a/a.h"
+#include "modules/b/b.h"
+
+int
+main (void)
+{
+ a_print ();
+ b_print ();
+ b_shout ();
+ return TEST_MAKE_EXIT;
+}
diff --git a/cesar/common/make/test/test_make.c-output b/cesar/common/make/test/test_make.c-output
new file mode 100644
index 0000000000..e3b5060376
--- /dev/null
+++ b/cesar/common/make/test/test_make.c-output
@@ -0,0 +1,5 @@
+CC [host] src/test_make.c
+LINK [host] obj/test_make
+CC [target] src/test_make.c
+MAKE ecos.all
+LINK [target] obj/test_make_ecos.elf
diff --git a/cesar/common/make/test/test_make.h-output b/cesar/common/make/test/test_make.h-output
new file mode 100644
index 0000000000..ef51e5aa92
--- /dev/null
+++ b/cesar/common/make/test/test_make.h-output
@@ -0,0 +1,7 @@
+CC [host] src/test_make.c
+LINK [host] obj/test_make
+CXX [host] src/test_cpp.cpp
+LDXX [host] obj/test_cpp
+CC [target] src/test_make.c
+MAKE ecos.all
+LINK [target] obj/test_make_ecos.elf
diff --git a/cesar/common/make/test/test_make.sh b/cesar/common/make/test/test_make.sh
new file mode 100755
index 0000000000..330943f6d2
--- /dev/null
+++ b/cesar/common/make/test/test_make.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+tmp=make.log
+
+function failure () {
+ echo FAIL >&2
+ exit 1
+}
+
+trap failure ERR
+
+function runmake () {
+ t=$1
+ shift
+ echo "$t: make $*"
+ sleep 1
+ make -C project "$@" &> "$tmp"
+ sleep 1
+}
+function grepcap () {
+ grep '^[[:upper:]]\{2,\} ' | grep -v '\.\./lib/'
+}
+
+if [[ "$1" = quick ]]
+then
+ make -C project &> /dev/null
+else
+ make -C project clean &> /dev/null
+
+ runmake first
+ grepcap < "$tmp" | diff - first-output
+fi
+
+touch project/inc/test_make.h
+runmake test_make.h
+grepcap < "$tmp" | diff - test_make.h-output
+
+touch project/ecos.ecc.sh
+runmake ecos.ecc.sh
+grepcap < "$tmp" | diff - ecos.ecc.sh-output
+
+touch project/src/test_make.c
+runmake test_make.c
+grepcap < "$tmp" | diff - test_make.c-output
+
+runmake nothing
+grepcap < "$tmp" | diff - nothing-output
+
+touch modules/b/inc/b_shout.h
+runmake b_shout.h
+grepcap < "$tmp" | diff - b_shout.h-output
+
+touch project/Config
+runmake Config
+grepcap < "$tmp" | diff - Config-output
+
+touch project/Config.alt
+runmake Config.alt PROJECT_CONFIG=Config.alt
+grepcap < "$tmp" | diff - Config.alt-output
+
+runmake clean clean
+grep -v 'make:' < "$tmp" | grep -v ' obj/' | diff - clean-output
+
+rm -f "$tmp"
+echo PASS
diff --git a/cesar/common/make/top.mk b/cesar/common/make/top.mk
new file mode 100644
index 0000000000..21c3260008
--- /dev/null
+++ b/cesar/common/make/top.mk
@@ -0,0 +1,22 @@
+# Compilation system top file.
+
+MAKE_DIR := $(BASE)/common/make
+TOOLS_DIR := $(BASE)/common/tools
+OBJ_DIR ?= obj$(if $(VARIANT),/$(VARIANT))
+MERGED_CONFIG := $(OBJ_DIR)/Config.merged
+
+.PHONY: all
+
+all: build.all
+
+-include $(MERGED_CONFIG)
+
+include $(MAKE_DIR)/func.mk
+include $(MAKE_DIR)/setup.mk
+include $(MAKE_DIR)/config.mk
+include $(MAKE_DIR)/default.mk
+include $(MAKE_DIR)/target.mk
+include $(MAKE_DIR)/ecos.mk
+include $(MAKE_DIR)/build.mk
+include $(MAKE_DIR)/misc.mk
+include $(MAKE_DIR)/print.mk
diff --git a/cesar/common/std.h b/cesar/common/std.h
new file mode 100644
index 0000000000..d4387ead82
--- /dev/null
+++ b/cesar/common/std.h
@@ -0,0 +1,33 @@
+#ifndef common_std_h
+#define common_std_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file common/std.h
+ * \brief Standard header.
+ * \ingroup common
+ *
+ * Standard header to be included on top of each source file.
+ */
+
+#ifdef __cplusplus
+# define BEGIN_DECLS extern "C" {
+# define END_DECLS }
+#else
+# define BEGIN_DECLS
+# define END_DECLS
+#endif
+
+#include "lib/types.h"
+#include "lib/defs.h"
+#include "lib/utils.h"
+#include "lib/dbg.h"
+
+#else
+# error "common/std.h should be included only once in non header files."
+#endif /* common_std_h */
diff --git a/cesar/common/tests/Makefile b/cesar/common/tests/Makefile
new file mode 100644
index 0000000000..2295421607
--- /dev/null
+++ b/cesar/common/tests/Makefile
@@ -0,0 +1,31 @@
+BASE = ../..
+RUN_TEST = run-test.pl
+GET_COV = get-cov.pl
+COVERAGE_OUTPUT = coverage
+COVERAGE_TITLE = Cesar
+
+all: tests.all.brief tests.all.result
+
+.PHONY: tests.all
+
+tests.all: tests $(RUN_TEST)
+ -perl $(RUN_TEST) $(BASE) < $< > $@ 2>&1
+
+clean: tests.clean
+ rm -f tests.all.brief tests.all tests.clean
+
+.PHONY: tests.clean
+
+tests.clean: tests $(RUN_TEST)
+ perl $(RUN_TEST) -I clean $(BASE) < $< > $@ 2>&1
+
+%.brief: %
+ grep '^==' < $< > $@
+
+%.result: %.brief
+ grep '^===' < $<
+
+.PHONY: cov
+
+cov: tests $(GET_COV)
+ genhtml -q -t $(COVERAGE_TITLE) -o $(COVERAGE_OUTPUT) -s $$(perl $(GET_COV) $(BASE) < $<)
diff --git a/cesar/common/tests/get-cov.pl b/cesar/common/tests/get-cov.pl
new file mode 100755
index 0000000000..25164caa15
--- /dev/null
+++ b/cesar/common/tests/get-cov.pl
@@ -0,0 +1,32 @@
+#!/usr/bin/perl
+#
+# Get the list of coverage trace files.
+#
+use strict;
+use warnings;
+
+my $base = shift @ARGV;
+my $dir;
+my $fail = 0;
+
+# Read tests file.
+while (<STDIN>)
+{
+ chomp;
+ # Drop comments.
+ next if /^\s*(?:#.*)?$/;
+ if (/^(.*):(:)?$/)
+ {
+ # Directory line.
+ $dir = $1;
+ -d "$base/$dir"
+ or die "cannot change directory";
+ }
+ elsif (/^cov.*? (.*?): .*$/)
+ {
+ # Coverage test line.
+ my $f = "$base/$dir/obj/$1.info";
+ -f $f
+ and print "$f\n";
+ }
+}
diff --git a/cesar/common/tests/run-test.pl b/cesar/common/tests/run-test.pl
new file mode 100755
index 0000000000..aff9799327
--- /dev/null
+++ b/cesar/common/tests/run-test.pl
@@ -0,0 +1,235 @@
+#!/usr/bin/perl
+#
+# Run all defined tests.
+#
+use strict;
+use warnings;
+use Cwd;
+use Getopt::Long qw(:config no_ignore_case bundling);
+use Pod::Usage;
+
+# Option parsing.
+my $help;
+my $timeout = 5 * 60;
+my @include;
+my @exclude;
+my @include_dir;
+GetOptions (
+ 'help|h' => \$help,
+ 'timeout|t' => \$timeout,
+ 'include|I=s' => \@include,
+ 'exclude|X=s' => \@exclude,
+ 'directory|d=s' => \@include_dir,
+) or pod2usage (2);
+pod2usage (1) if $help;
+
+@ARGV == 1 or pod2usage (2);
+
+my $base = getcwd . '/' . shift @ARGV;
+
+my %include;
+@include{@include} = ();
+my %exclude;
+@exclude{@exclude} = ();
+
+# Initialise signal number to name table.
+use Config;
+my @signame;
+my %signum;;
+my $i = 0;
+defined $Config{sig_name} || die "No sigs?";
+foreach (split (' ', $Config{sig_name}))
+{
+ $signame[$i] = $_;
+ $signum{$_} = $i;
+ $i++;
+}
+
+# Test macros.
+my %macros = (
+ 'cov' => \&cov_macro,
+ 'cov-target' => \&cov_target_macro,
+);
+my $lcov;
+
+# Read tests file.
+my $dir;
+my $fail = 0;
+while (<STDIN>)
+{
+ chomp;
+ # Drop comments.
+ next if /^\s*(?:#.*)?$/;
+ # This table will enable an unget system to fake input lines.
+ my @ungeted;
+ push @ungeted, $_;
+ while (@ungeted)
+ {
+ $_ = shift @ungeted;
+ if (/^(.*):(:)?$/)
+ {
+ # Directory line.
+ $dir = $1;
+ chdir "$base/$dir"
+ or die "cannot change directory";
+ # Push automatic clean test.
+ push @ungeted, '-clean: make -s clean' unless $2;
+ }
+ else
+ {
+ # Test line.
+ defined $dir
+ or die "bad format";
+ # Read '-' and '!' flags.
+ my ($dontcare, $expected) = (0, '');
+ $dontcare = 1 if s/^-//;
+ $expected = ' (expected)' if s/^!//;
+ # Decode name and command.
+ my ($name, $cmd);
+ /^(.*?): (.*)$/
+ and ($name, $cmd) = ($1, $2)
+ or ($name, $cmd) = ($_, $_);
+ # Decode macros.
+ $name =~ /^(.*?) (.*)$/ && exists $macros{$1}
+ and ($name, $cmd) = $macros{$1} ($1, $2, $cmd);
+ # Skip test?
+ next if @include_dir && !grep { $dir =~ /^$_/ } @include_dir;
+ next if %include && !exists $include{$name};
+ next if exists $exclude{$name};
+ # Start test.
+ my $t = "=> $dir - $name";
+ print "\n$t\n";
+ my $status = timed_system ($cmd);
+ # Check result.
+ if ($dontcare)
+ {
+ print "=$t: DONE\n";
+ }
+ else
+ {
+ if ($status != 0)
+ {
+ $fail++ unless $expected;
+ if ($status == -1 || $status == 128 << 8) {
+ print "=$t: FAIL$expected command not found\n";
+ } elsif ($status & 127) {
+ printf "=$t: FAIL$expected killed with signal %s\n",
+ $signame[$status & 127];
+ die "interrupted" if ($signame[$status & 127] eq 'INT');
+ } else {
+ printf "=$t: FAIL$expected exited with value %d\n",
+ ($status >> 8);
+ }
+ }
+ else
+ {
+ print "=$t: PASS\n";
+ }
+ }
+ }
+ }
+}
+# Print summary.
+if ($fail)
+{
+ print "\n===> FAIL $fail unexpected tests\n";
+ exit 1;
+}
+else
+{
+ print "\n===> PASS all tests\n";
+ exit 0;
+}
+
+sub cov_macro
+{
+ my ($name, $arg, $cmd, $objdir, $gcov) = @_;
+ if (not defined $lcov)
+ {
+ system ('lcov --version > /dev/null');
+ $lcov = $? == 0 ? 1 : 0;
+ }
+ if ($lcov)
+ {
+ $objdir = 'obj' unless defined $objdir;
+ $gcov = '' unless defined $gcov;
+ return ($name,
+ "rm -f obj/$arg.info && "
+ . "lcov -q -d $objdir -b . -z $gcov && "
+ . "$cmd && "
+ . "lcov -q -d $objdir -b . -c -t $arg -o obj/$arg.info $gcov");
+ }
+ else
+ {
+ return ('run', $cmd);
+ }
+}
+
+sub cov_target_macro
+{
+ my ($name, $arg, $cmd) = @_;
+ if (exists $ENV{CROSS_COMPILE_})
+ {
+ return cov_macro ($name, $arg, $cmd, '.', " -g $ENV{CROSS_COMPILE_}gcov");
+ }
+ else
+ {
+ return ('run', $cmd);
+ }
+}
+
+sub timed_system
+{
+ my $cmd = shift;
+ my $pid = fork;
+ defined $pid or die "fork: $!,";
+ if ($pid == 0)
+ {
+ # Son.
+ exec $cmd;
+ exit 128;
+ }
+ else
+ {
+ # Father.
+ eval {
+ local $SIG{ALRM} = sub { die "alarm\n" };
+ alarm $timeout;
+ do { $_ = wait } until $_ == $pid;
+ alarm 0;
+ };
+ if ($@)
+ {
+ die unless $@ eq "alarm\n";
+ kill INT => $pid;
+ sleep 3;
+ kill KILL => $pid;
+ print "Timed out!\n";
+ return $signum{ALRM};
+ }
+ else
+ {
+ return $?;
+ }
+ }
+}
+
+__END__
+
+=head1 NAME
+
+run-test.pl - Read a tests file and run all configured tests
+
+=head1 SYNOPSIS
+
+run-test.pl [options] base
+
+ Options:
+ -h, --help brief help message
+ -I, --include=NAME only include named tests, can be issued multiple times
+ -X, --exclude=NAME do not include named tests
+ -d, --directory=DIR only include tests below given directories
+ -t, --timeout=SEC timeout for each test (seconds)
+
+=cut
+
diff --git a/cesar/common/tests/tests b/cesar/common/tests/tests
new file mode 100644
index 0000000000..9090dd3f69
--- /dev/null
+++ b/cesar/common/tests/tests
@@ -0,0 +1,291 @@
+# tests file.
+#
+# Define tests using the following format:
+#
+# path/to/test/directory:[:]
+# [!|-][test name: ]command
+# [!|-][test name: ]command...
+#
+# The commands are run in the given directory. If the second colon is not
+# present, first command is 'make -s clean'. Commands starting with a bang
+# (!) are expected to fail. Result of commands starting with a dash (-) are
+# ignored.
+#
+# If test name is 'cov <test_name>', lcov is run on this test if found,
+# producing a file obj/<test_name>.info.
+
+#common/make/test::
+#run: ./test_make.sh
+
+hal/arch/test/atomic:
+make: make COV=y
+cov test_atomic: ./obj/test_atomic
+
+hal/phy/test/phy:
+make
+run: ./obj/maximus/host_test_phy -e obj/maximus/test_phy.elf -d false -t 2500000000
+
+hal/phy/maximus/test:
+make: make COV=y
+cov test_phy_maximus: ./obj/test_phy_maximus
+
+hal/phy/maximus/dur/test:
+make: make COV=y
+cov test_dur: ./obj/test_dur
+
+hal/hle/maximus/test:
+make: make COV=y
+cov test_maximus_hle: ./obj/test_maximus_hle
+
+hal/leon/maximus/test:
+make: make COV=y
+cov test_maximus_timer: ./obj/test_maximus_timer
+
+lib/test/blk:
+make: make COV=y
+cov test_blk: ./obj/test_blk
+
+lib/test/crc:
+make: make COV=y
+cov test_crc: ./obj/test_crc
+
+lib/test/heap:
+make: make COV=y
+cov test_heap: ./obj/test_heap
+
+lib/test/list:
+make: make COV=y
+cov test_list: ./obj/test_list
+
+lib/test/restrack:
+make: make COV=y
+cov test_restrack: ./obj/test_restrack
+
+lib/test/rnd:
+make: make COV=y
+cov test_rnd: ./obj/test_rnd
+
+lib/test/set:
+make: make COV=y
+cov test_set: ./obj/test_set
+
+lib/test/test:
+make
+!run: ./obj/test_test
+
+lib/test/trace:
+make: make COV=y
+cov test_trace: ./obj/test_trace
+
+lib/test/try:
+make: make COV=y
+cov test_try: ./obj/test_try
+
+lib/test/read_word:
+make: make COV=y
+cov test_read_word: ./obj/test_read_word
+
+lib/test/circular_buffer:
+make: make COV=y
+cov test_circular_buffer: ./obj/test_circular_list
+
+maximus/stationtest:
+make
+
+maximus/python:
+make: make COV=y
+python test/test_channel.py -e ../stationtest/obj/test_station.elf -d false -t 2500000000
+python test/test_cli.py
+python test/test_ethernet.py -e ../stationtest/obj/test_ether.elf -d false -t 2500000000
+python test/test_fsm.py
+python test/test_interface.py -e ../stationtest/obj/stationtest.elf -d false -t 2500000000
+python test/test_lib_cesar.py -e ../stationtest/obj/test_lib_cesar.elf -d false -t 2500000000
+python test/test_lib_proto.py
+python test/test_macframe.py -e ../stationtest/obj/test_send.elf -d false -t 2500000000
+python test/test_mme.py -e ../stationtest/obj/stationtest.elf -d false -t 2500000000
+python test/test_result.py
+python test/test_simu.py -e ../stationtest/obj/stationtest.elf -d false -t 2500000000
+python test/test_station.py -e ../stationtest/obj/test_station.elf -d false -t 2500000000
+python test/test_utils.py
+python py/script_example.py -e ../stationtest/obj/stationtest.elf -d false -t 2500000000
+python py/test_cb.py -e ../stationtest/obj/test_cb.elf -d false -t 2500000000
+python py/test_send_mpdu.py -e ../stationtest/obj/test_send.elf -d false -t 2500000000
+python py/test_send_noise.py -e ../stationtest/obj/test_send.elf -d false -t 2500000000
+python py/test_tx_rx.py -e ../stationtest/obj/test_tx_rx.elf -d false -t 2500000000
+python py/test_ether.py -e ../stationtest/obj/test_ether.elf -d false -t 2500000000
+python py/test_false_alarm.py -e ../stationtest/obj/test_false_alarm.elf -d false -t 2500000000
+
+mac/ca/test/ca:
+make: make COV=y
+cov test_ca: ./obj/test_ca
+
+mac/common/test/pb:
+make
+run: ./obj/test_pb
+
+mac/common/test/store:
+make: make COV=y
+cov test_store: ./obj/test_store
+
+mac/common/test/tonemap:
+make: make COV=y
+cov test_tonemap: ./obj/test_tonemap
+
+mac/design/test/mfs_tx:
+make
+
+mac/design/test/mfs_tx2:
+make
+
+mac/design/test/sacki:
+make
+run: ./obj/test_sacki
+
+mac/pbproc/test/fc:
+make: make COV=y
+cov test_fc: ./obj/test_fc
+
+mac/pbproc/test/fsm:
+make: make COV=y
+cov test_fsm: ./obj/test_fsm
+
+mac/pbproc/test/mfs:
+make: make COV=y
+cov test_mfs: ./obj/test_mfs
+
+mac/pbproc/test/pbproc:
+make: make COV=y
+cov test_pbproc: ./obj/test_pbproc
+
+mac/pbproc/test/maximus:
+make
+run: python py/host_test_pbproc.py -d false -t 2500000000
+run: python py/test_coll.py -d false -t 2500000000
+
+mac/pbproc/test/sacki:
+make: make COV=y
+cov test_sacki: ./obj/test_sacki
+
+mac/sar/test/unit_test/ecos:
+make: make COV=y
+cov-target lib_sar_expiration: ./obj/lib_sar_expiration.elf
+cov-target lib_sar_mfs: ./obj/lib_sar_mfs.elf
+cov-target reassembly_complete: ./obj/reassembly_complete.elf
+cov-target reassembly_create_mfs: ./obj/reassembly_create_mfs.elf
+cov-target reassembly_measurement: ./obj/reassembly_measurement.elf
+cov-target reassembly_mfs_update_expiration_date: ./obj/reassembly_mfs_update_expiration_date.elf
+cov-target sar_call_back_ul: ./obj/sar_call_back_ul.elf
+cov-target sar_mf_function_test: ./obj/sar_mf_function_test.elf
+cov-target sar_mfs_resising: ./obj/sar_mfs_resising.elf
+cov-target segmentation_complete: ./obj/segmentation_complete.elf
+cov-target test_store_memory: ./obj/test_store_memory.elf
+
+mac/sar/test/unit_test/host:
+make: make COV=y
+cov bridgedma_list: ./obj/bridgedma_list
+cov lib_sar_mf: ./obj/lib_sar_mf
+cov test_store_memory: ./obj/test_store_memory
+
+cl/test:
+make: make COV=y
+cov cl_mactotei_api: ./obj/cl_mactotei_api
+cov cl_mactotei_heapsort: ./obj/cl_mactotei_heapsort
+cov cl_mactotei_find: ./obj/cl_mactotei_find
+cov cl_recv_data: ./obj/cl_recv_data
+cov cl_send_data: ./obj/cl_send_data
+cov cl_mme_send_as_mme: ./obj/cl_mme_send_as_mme
+cov cl_mme_send_as_data: ./obj/cl_mme_send_as_data
+cov cl_mme_recv: ./obj/cl_mme_recv
+
+ce/test/rx/general:
+make COV=y
+cov ce_test_cei: ./obj/host/test_cei_host_linux_i386
+cov ce_test_cei_param: ./obj/host/test_cei_param_host_linux_i386
+cov ce_test_mpdu_measure_store: ./obj/host/test_measure_store_host_linux_i386
+cov ce_test_bitloading: ./obj/host/test_bitloading_host_linux_i386
+cov-target ce_test_sar_integration: ./obj/target/test_sar_target_ecos_synth.elf
+cov-target ce_test_rx: ./obj/target/test_rx_target_ecos_synth.elf
+
+ce/test/rx/tonemap_refresh:
+make COV=y
+cov-target ce_test_tonemaps_refresh: ./obj/test_tonemaps_refresh_target_ecos_synth.elf
+
+ce/test/tx:
+make COV=y
+cov ce_test_tx: ./obj/host/test_tx
+cov-target ce_test_tonemaps_expiration: ./obj/target/test_expiration_target_ecos_synth.elf
+
+cp/test:
+make: make COV=y
+cov-target test_cp: ./obj/UnitTestCP.elf
+
+cp/beacon/test/central_beacon:
+make: make
+ac_line: ./obj/ac_line.elf
+estimation: ./obj/estimation.elf
+central_beacon: ./obj/central_beacon.elf
+usta: ./obj/usta.elf
+bentries: ./obj/bentry_test.elf
+cco_request_discover_beacon: ./obj/cco_request_discover.elf
+
+cp/beacon/test/cco:
+make: make
+ucco: ./obj/ucco.elf
+cco: ./obj/cco.elf
+
+ce/test/rx/maximus:
+make COV=y
+cov-target ce_test_rx_maximus: python send_noise.py -e ./obj/test_rx.elf -d false -t 2500000000
+
+maximus/unittest:
+make: make COV=y
+obj/unittest -e ../stationtest/obj/stationtest.elf
+
+maximus/usertest:
+make: make COV=y
+obj/usertest -e ../stationtest/obj/stationtest.elf -d false -t 2500000000
+
+mac/sar/test/maximus_test:
+make
+obj/Maximus_sar -e obj/Sta_sar.elf -d false -t 25000000000
+
+test_general/integration/cl-sar-pbproc:
+make
+python src/Maximus.py -e obj/cl-sar-pbproc.elf -d false -t 2500000000
+
+test_general/integration/sar-pbproc:
+make
+python src/Maximus.py -e obj/sar-pbproc.elf -d false -t 2500000000
+
+test_general/integration/hle-cl-sar-pbproc:
+make
+python src/Maximus.py -e obj/hle-cl-sar-pbproc.elf -d false -t 2500000000
+
+test_general/integration/ipmbox-hle-cl-sar-pbproc:
+make
+python src/Maximus.py -e obj/ipmbox-hle-cl-sar-pbproc.elf -d false -t 2500000000
+python src/Maximus_mme.py -e obj/ipmbox-hle-cl-sar-pbproc.elf -d false -t 2500000000
+
+test_general/integration/station-cp-dp:
+make
+src:
+python Maximus.py -d false -t 500000000
+
+interface/sniffer/test:
+make: make COV=y
+sniffer: ./obj/test-sniffer
+
+interface/test:
+make: make COV=y
+interface: ./obj/test-interface.elf
+
+hle/test/:
+make: make COV=y
+hle_recv_from_arm: ./obj/hle_recv_from_arm
+hle_add_buffer: ./obj/hle_add_buffer
+hle_send_to_arm: ./obj/hle_send_to_arm
+interface_send: ./obj/interface_send
+
+host/test:
+make: make COV=y
+./obj/test_host
diff --git a/cesar/common/tools/check-filename b/cesar/common/tools/check-filename
new file mode 100755
index 0000000000..379bdac2fb
--- /dev/null
+++ b/cesar/common/tools/check-filename
@@ -0,0 +1,66 @@
+#!/usr/bin/perl
+#
+# Check that header guard defines and doxygen \file command are set
+# appropriately.
+#
+use strict;
+use warnings;
+use File::Find;
+
+-f 'common/tools/check-filename'
+ or die "should be run from base root\n";
+
+if ($ENV{'VIM'})
+{
+ print "nmap <buffer> <space> yy<cr>pkdd^df\"f\"D\n";
+ print "nmap <C-N> :copen<cr>j<space>\n";
+}
+
+sub check_file
+{
+ my $file = shift;
+ $file =~ s#^\./##;
+ my $cc = $file =~ /\.[ch]\{2\}$/;
+ my $filep;
+ ($filep = $file) =~ s#[/.]#_#g;
+ print "check $file\n";
+ open FILE, "<$file";
+ while (<FILE>)
+ {
+ chomp;
+ /^#(ifndef|define) (.*_h)$/ && $2 ne $filep
+ and print "$file:$.: should be \"#$1 $filep\"\n";
+ /^#(endif \/\*) (.*_h)( \*\/)$/ && $2 ne $filep
+ and print "$file:$.: should be \"#$1 $filep$3\"\n";
+ m#^((?:///| \*) \\file) +(.*)$# && $2 ne $file
+ and print "$file:$.: should be \"$1 $file\"\n";
+ }
+ close FILE;
+}
+
+my %exclude;
+@exclude{'ecos', 'obj', '.svn', 'html', 'test'} = ();
+
+@ARGV = ('.') if !@ARGV;
+
+for (@ARGV)
+{
+ if (-d $_)
+ {
+ find ({ no_chdir => 1, wanted => sub {
+ my $f = $_;
+ $f =~ s#.*/##;
+ exists $exclude{$f}
+ and $File::Find::prune = 1
+ or /\.[ch]+$/ and check_file $_;
+ } }, $_);
+ }
+ elsif (-f $_)
+ {
+ check_file ($_);
+ }
+ else
+ {
+ die "$_: not a directory, nor a file, what should I do?\n";
+ }
+}
diff --git a/cesar/common/tools/compact-ecos-config b/cesar/common/tools/compact-ecos-config
new file mode 100755
index 0000000000..71e78c3ce0
--- /dev/null
+++ b/cesar/common/tools/compact-ecos-config
@@ -0,0 +1,122 @@
+#!/usr/bin/perl
+#
+# Read an ecos configuration and generate a minimal script to regenerate this
+# configuration.
+#
+use strict;
+use warnings;
+
+my $string_re = qr/ " (?: [^\\] | \\. )* " /sx;
+# Limitation: braces can nest only once.
+my $brace_re = qr/ (?: [^{}] | { [^{}]* } )* /sx;
+my $cmd_re = qr( [-<>./\w]+ )x;
+my $arg_re = qr/ $cmd_re | $string_re | { $brace_re } /x;
+my $option_cmd_re = qr/(?:value_source|(?:user|wizard|inferred)_value)/;
+
+sub read_config_check
+{
+ my ($file, $target, $tmpl) = @_;
+ # Open ecosconfig output.
+ open CONFIG, "ecosconfig --config='$file' check|"
+ or die "can not read ecosconfig output\n";
+ # Decode target and template.
+ $_ = <CONFIG>; chomp;
+ /^Target: (\w+)$/ or die "target expected\n";
+ $$target = $1;
+ $_ = <CONFIG>; chomp;
+ /^Template: (\w+)$/ or die "template expected\n";
+ $$tmpl = $1;
+ print "ecosconfig --config=\$config new $$target $$tmpl\n";
+ # Decode added and removed.
+ $_ = <CONFIG>; chomp;
+ for my $i (['Added', 'add'], ['Removed', 'remove'])
+ {
+ my ($re, $cmd) = @$i;
+ if (/^$re:$/)
+ {
+ while ($_ = <CONFIG>, chomp, /^ (\w+)/)
+ {
+ print "ecosconfig --config=\$config $cmd $1\n";
+ }
+ }
+ }
+ /^No conflicts$/ or die "no conflicts expected\n";
+ # Close.
+ close CONFIG;
+}
+
+sub read_config_file
+{
+ my ($file, $target, $tmpl) = @_;
+ # Open file.
+ open CONFIG, "<$file" or die "can not open \"$file\"\n";
+ # Slurp config text.
+ local $/;
+ local $_ = <CONFIG>;
+ close CONFIG;
+ tr/\t/ /;
+ # Decode.
+ while ($_)
+ {
+ s/^ *(?:#.*)?\n// and next;
+ s/^cdl_savefile_version 1;\n// and next;
+ s/^cdl_savefile_command $cmd_re {$brace_re};\n// and next;
+ s/^cdl_configuration eCos {($brace_re)};\n//
+ and do { decode_conf ($1, $target, $tmpl); next; };
+ s/^(cdl_(?:package|component|option|interface) \w+) {($brace_re)};\n//
+ and do { decode_option ($1, $2); next; };
+ die "unmatched text: \"" . (/(.{200})/s, $1) . "...\".\n";
+ }
+}
+
+sub decode_conf
+{
+ local $_ = shift;
+ my ($target, $tmpl) = @_;
+ while ($_)
+ {
+ s/^ *(?:#.*)?\n// and next;
+ s/^ *description +$arg_re *;\n// and next;
+ s/^ *hardware +($arg_re) *;\n// and do {
+ $target eq $1 or die "target mismatch\n";
+ next;
+ };
+ s/^ *template +($arg_re) *;\n// and do {
+ $tmpl eq $1 or die "target mismatch\n";
+ next;
+ };
+ s/^ *package +-(?:hardware|template) +$arg_re +$arg_re +;// and next;
+ s/^ *package +($arg_re) +$arg_re +;// and next;
+ die "unmatched text in conf: \"" . (/(.{200})/s, $1) . "...\".\n";
+ }
+}
+
+sub decode_option
+{
+ my $option = shift;
+ local $_ = shift;
+ my $open = 0;
+ while ($_)
+ {
+ s/^ *(?:#.*)?\n// and next;
+ s/^( *$option_cmd_re(?: +$arg_re){1,2}\n)// and do {
+ print $option, " {\n" unless $open;
+ $open = 1;
+ print $1;
+ } and next;
+ die "unmatched text in conf: \"" . (/(.{200})/s, $1) . "...\".\n";
+ }
+ print "}\n" if $open;
+}
+
+$#ARGV == 0 or die "syntax: $0 FILE\n";
+my $config_file = $ARGV[0];
+
+my ($target, $tmpl);
+
+print "config=\${1:-ecos-gen.ecc}\n";
+read_config_check ($config_file, \$target, \$tmpl);
+print "cat >> \$config <<'EOF'\n";
+read_config_file ($config_file, $target, $tmpl);
+print "EOF\n";
+print "ecosconfig --config=\$config check\n";
diff --git a/cesar/common/tools/config-headers b/cesar/common/tools/config-headers
new file mode 100755
index 0000000000..a091e5dd27
--- /dev/null
+++ b/cesar/common/tools/config-headers
@@ -0,0 +1,100 @@
+#!/usr/bin/perl
+#
+# Read a merged configuration from stdin and generate C headers.
+#
+use strict;
+use warnings;
+use File::Path;
+use File::Find;
+
+my $outdir = shift @ARGV;
+
+if (!defined $outdir)
+{
+ die <<EOF;
+$0 - generate C header from merged configuration.
+Syntax: $0 output_dir
+EOF
+}
+
+my %conf;
+
+while (<>)
+{
+ chomp;
+ next if /^\s*#/;
+ next if /^$/;
+ if (/^\s*([A-Z_]+)\s*=\s*([yn]|[0-9]+)\s*$/)
+ {
+ my ($var, $val) = ($1, $2);
+ $var =~ /^CONFIG_[A-Z_]*[A-Z]$/
+ or die "$ARGV:$.:unaccepted identifier \"$var\"\n";
+ !exists $conf{$var}
+ or die "$ARGV:$.:duplicated identifier \"$var\"\n";
+ $conf{$var} = $val;
+ next;
+ }
+ die "$ARGV:$.:unrecognized line\n";
+} continue {
+ close ARGV if eof;
+}
+
+my %headers;
+
+my %valmap = ('y' => 1, 'n' => 0);
+
+for my $var (sort keys %conf)
+{
+ my @svar = split /_/, $var;
+ # Generate the bottom file.
+ my $mfile = lc join '/', @svar;
+ $headers{$mfile} = '' unless exists $headers{$mfile};
+ $headers{$mfile} .= "#define $var "
+ . (exists $valmap{$conf{$var}} ? $valmap{$conf{$var}} : $conf{$var})
+ . "\n";
+ # Generate the intermediates files.
+ for (0 .. $#svar - 1)
+ {
+ my $file = lc join '/', @svar[0 .. $_];
+ $headers{$file} = '' unless exists $headers{$file};
+ $headers{$file} .= "#include \"$mfile.h\"\n";
+ }
+}
+
+my %seen;
+
+for my $file (sort keys %headers)
+{
+ my $path = "$outdir/$file.h";
+ $seen{$path} = 1;
+ $path =~ m#(.+)/[^/]+#;
+ mkpath $1;
+ my $prot = $file;
+ $prot =~ s#[/.]#_#g;
+ $prot = "included_${prot}_h";
+ my $new = <<EOF;
+#ifndef $prot
+#define $prot
+$headers{$file}#endif /* $prot */
+EOF
+ my $old = '';
+ if (open FILE, "<$path")
+ {
+ $old = join '', <FILE>;
+ close FILE;
+ }
+ if ($new ne $old)
+ {
+ open FILE, ">$path"
+ or die "can not open \"$path\" for writing\n";
+ print FILE $new;
+ close FILE;
+ }
+}
+
+sub remove_unused
+{
+ unlink $_ if m#^$outdir/config/.*\.h$# && !exists $seen{$_};
+}
+
+find ({ no_chdir => 1, wanted => \&remove_unused }, "$outdir/config");
diff --git a/cesar/common/tools/config-merge b/cesar/common/tools/config-merge
new file mode 100755
index 0000000000..ae6b63a78e
--- /dev/null
+++ b/cesar/common/tools/config-merge
@@ -0,0 +1,54 @@
+#!/usr/bin/perl
+#
+# Read a project configuration and modules configurations and merge them to
+# stdout.
+#
+use strict;
+use warnings;
+
+if (scalar @ARGV < 1)
+{
+ die <<EOF;
+$0 - merge project and modules configuration to stdout.
+Syntax: $0 project_config module_configs...
+EOF
+}
+
+my %conf;
+
+my $proj = shift @ARGV;
+push @ARGV, $proj;
+
+while (<>)
+{
+ chomp;
+ next if /^\s*#/;
+ next if /^$/;
+ if (/^\s*([A-Z_]+)\s*=\s*([yn]|[0-9]+)\s*$/)
+ {
+ my ($var, $val) = ($1, $2);
+ $var =~ /^CONFIG_[A-Z_]*[A-Z]$/
+ or die "$ARGV:$.:unaccepted identifier \"$var\"\n";
+ if (scalar @ARGV == 0)
+ {
+ # Project config.
+ exists $conf{$var}
+ or die "$ARGV:$.:unknown identifier \"$var\"\n";
+ $val =~ /^[yn]$/ ^ $conf{$var} =~ /^[yn]$/
+ and die "$ARGV:$.:bad type for \"$var\"\n";
+ }
+ else
+ {
+ # Module config.
+ !exists $conf{$var}
+ or die "$ARGV:$.:duplicated identifier \"$var\"\n";
+ }
+ $conf{$var} = $val;
+ next;
+ }
+ die "$ARGV:$.:unrecognized line\n";
+} continue {
+ close ARGV if eof;
+}
+
+print "$_ = $conf{$_}\n" for (sort keys %conf);
diff --git a/cesar/common/tools/gentags b/cesar/common/tools/gentags
new file mode 100755
index 0000000000..b399335114
--- /dev/null
+++ b/cesar/common/tools/gentags
@@ -0,0 +1 @@
+ctags -I BITFIELDS_WORD --exclude=.svn --exclude=obj --exclude=test --exclude=ecos --c-kinds=+p --langmap=c:.c --langmap=c++:.h.hh.hpp.cc.cpp.inl.tpp --languages=c,c++ -R
diff --git a/cesar/common/tools/project-template b/cesar/common/tools/project-template
new file mode 100755
index 0000000000..7bf98aedfa
--- /dev/null
+++ b/cesar/common/tools/project-template
@@ -0,0 +1,193 @@
+#!/usr/bin/perl
+#
+# Prompt the user to create a simple project template.
+#
+use strict;
+use warnings;
+use File::Find;
+
+my @modules;
+my @sources;
+
+sub prompt_yn
+{
+ my $prompt = shift;
+ my $rep = '';
+ while (1)
+ {
+ print "\n$prompt [yn] ";
+ $rep = <>;
+ die "bye...\n" unless $rep;
+ chomp $rep;
+ last if $rep eq 'y' || $rep eq 'n';
+ print "Please answer 'y' or 'n' and hit the enter key.\n";
+ }
+ return $rep eq 'y' ? 1 : 0;
+}
+
+sub prompt_str
+{
+ my ($prompt, $re) = @_;
+ my $rep = '';
+ while (1)
+ {
+ print "\n$prompt ";
+ $rep = <>;
+ die "bye...\n" unless $rep;
+ chomp $rep;
+ last if $rep =~ /$re/;
+ print "I do not understand, please try again.\n";
+ }
+ return $rep;
+}
+
+sub prompt_list
+{
+ my ($prompt, $one, @list) = @_;
+ my $rep;
+ INPUT: while (1)
+ {
+ print "\n$prompt:\n";
+ print " [$_] $list[$_]\n" for (0 .. $#list);
+ $one
+ and print "enter a number: "
+ or print "enter a list of space separated number: ";
+ $rep = <>;
+ die "bye...\n" unless $rep;
+ chomp $rep;
+ my @rep = split / /, $rep;
+ if ($one && scalar @rep != 1)
+ {
+ print "I want one and only one response.\n";
+ next INPUT;
+ }
+ for (@rep)
+ {
+ if (!/^\d+$/ || !exists $list[$_])
+ {
+ print "I can not understand \"$_\".\n";
+ next INPUT;
+ }
+ }
+ return @list[@rep];
+ }
+}
+
+sub prompt_prog
+{
+ my ($var, $fh, $prompt) = @_;
+ my @programs = split / +/,
+ prompt_str "Please give ${prompt}programs names, separated with spaces:",
+ qr/\w+(?: +\w)* */;
+ print $fh "$var = ", join (' ', @programs), "\n";
+ for (@programs)
+ {
+ my @prog_sources = scalar @sources
+ ? prompt_list ("Choose the sources to include for $_", 0, @sources)
+ : ();
+ print $fh "${_}_SOURCES = ", join (' ', @prog_sources), "\n";
+ my @prog_modules = scalar @modules
+ ? prompt_list ("Choose the modules to include for $_", 0, @modules)
+ : ();
+ print $fh "${_}_MODULES = ", join (' ', @prog_modules), "\n";
+ print $fh "\n";
+ }
+}
+
+sub prompt_platform
+{
+ my ($ecos) = @_;
+ my @platforms;
+ push @platforms, 'none' unless $ecos;
+ push @platforms, 'sparc', 'synthetic', 'maximus';
+ return prompt_list ("For which platform do you compile?", 1, @platforms);
+}
+
+print <<EOF;
+Welcome to the project template creator. I will prompt you to learn some
+coarse details about your project and I will then generate the Makefile and
+the ecos.ecc.sh if needed.
+
+EOF
+
+# Find base.
+my $base = '..';
+while (!-r "$base/common/make/top.mk")
+{
+ $base .= '/..';
+ die "I can not find the base directory.\n"
+ unless -d $base && length $base < 3 * 12;
+}
+print "I have found the sources root in `$base'.\n";
+
+my ($ecos, $platform);
+
+if (scalar @ARGV && $ARGV[0] eq 'ecos.ecc.sh')
+{
+ @ARGV = ();
+ print "\nI will only generate the ecos.ecc.sh file.\n";
+ $ecos = 1;
+}
+else
+{
+ # Find modules and local sources.
+ find (sub {
+ /^(?:ecos|\.svn|test)$/s && ($File::Find::prune = 1)
+ || /^Module$/s && do { push @modules, $File::Find::dir };
+ } , $base);
+ $_ =~ s#^$base/## for @modules;
+
+ find (sub {
+ /\.c$/s && do { push @sources, $_ };
+ }, 'src') if -d 'src';
+
+ # Generate Makefile.
+ die "Makefile in the ways, I will not clobber it.\n" if -f 'Makefile';
+
+ open MAKEFILE, ">Makefile" or die "I can not open Makefile for writing.\n";
+
+ print MAKEFILE "BASE = $base\n\n";
+
+ $ecos = prompt_yn 'Do you want to use ecos?';
+ print MAKEFILE "ECOS = y\n" if $ecos;
+
+ $platform = prompt_platform $ecos;
+ print MAKEFILE "TARGET = sparc\n" if $platform eq 'sparc';
+
+ print MAKEFILE "\n" if $ecos || $platform eq 'sparc';
+
+ my $host = prompt_yn 'Do you want to build host programs?';
+ prompt_prog 'HOST_PROGRAMS', \*MAKEFILE, 'host ' if $host;
+
+ my $target = $ecos || $platform ne 'none';
+ prompt_prog 'TARGET_PROGRAMS', \*MAKEFILE, 'target ' if $target;
+
+ print MAKEFILE "include \$(BASE)/common/make/top.mk\n";
+ close MAKEFILE;
+}
+
+if ($ecos)
+{
+ # Generate ecos compact config.
+ die "ecos.ecc.sh in the ways, I will not clobber it.\n" if -f 'ecos.ecc.sh';
+ open ECOS, ">ecos.ecc.sh" or die "I can not open ecos.ecc.sh for writing.\n";
+
+ $platform = prompt_platform $ecos unless defined $platform;
+
+ my %ecos_targets = (
+ sparc => 'sparc_leon',
+ synthetic => 'linux',
+ maximus => 'maximus',
+ );
+ die unless exists $ecos_targets{$platform};
+ my $ecos_target = $ecos_targets{$platform};
+ my $ecos_tmpl = prompt_list ("Choose template", 1, 'minimal', 'kernel',
+ 'default');
+
+ print ECOS "config=\${1:-ecos-gen.ecc}\n";
+ print ECOS "ecosconfig --config=\$config new $ecos_target $ecos_tmpl\n";
+ print ECOS "cat >> \$config <<'EOF'\n";
+ print ECOS "EOF\n";
+ print ECOS "ecosconfig --config=\$config check\n";
+ close ECOS;
+}
diff --git a/cesar/common/tools/sdl.ps b/cesar/common/tools/sdl.ps
new file mode 100644
index 0000000000..305e03d046
--- /dev/null
+++ b/cesar/common/tools/sdl.ps
@@ -0,0 +1,655 @@
+%! SDL shapes for Graphviz/dot in PostScript output mode
+
+% FILE
+% sdl.ps - SDL shapes for Graphviz/dot in PostScript output mode
+%
+% USE
+% All procedures expect to be passed a rectangular bounding box in the
+% order [upper right, lower right, lower left, upper left, upper right].
+% All procedures expect to be used with "peripheries = 0".
+%
+% BUGS
+% The following shapes are currently not implemented:
+% - frame/system/block/process/procedure/service/procedure, and types thereof
+% - macro inlet/outlet/call
+% - exception handler/handle/raise
+% - decision (suggest use diamond)
+% - alternative (suggest use triangle)
+% - internal input/output (suggest stop using historical relics!)
+%
+% COPYRIGHT AND PERMISSION NOTICE
+% Copyright (C) 2005 Cambridge Silicon Radio Ltd.; all rights reserved.
+%
+% Permission is hereby granted, free of charge, to any person obtaining
+% a copy of this software and associated documentation files (the
+% "Software"), to deal in the Software without restriction, including
+% without limitation the rights to use, copy, modify, merge, publish,
+% distribute, sublicense, and/or sell copies of the Software, and to
+% permit persons to whom the Software is furnished to do so, subject to
+% the following conditions:
+%
+% The above copyright notice and this permission notice shall be
+% included in all copies or substantial portions of the Software.
+%
+% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+% MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+% LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+% OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+% WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+%
+% Except as contained in this notice, the name of a copyright holder
+% shall not be used in advertising or otherwise to promote the sale, use
+% or other dealings in the Software without prior written authorization
+% of the copyright holder.
+%
+% REVISION
+% #4
+
+/xdef {exch def} bind def
+
+% SDL task
+
+/sdl_task {
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ newpath
+ moveto
+ lineto
+ lineto
+ lineto
+ pop pop
+ closepath
+ { fill } { stroke } ifelse
+} bind def
+
+% SDL input from right
+% The indent has lines at 45 degrees
+% There should be a few spaces at the end of this shape's label
+
+/sdl_input_from_right {
+ 9 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ /h2 ury lry sub 2 div def
+ newpath
+ moveto
+ urx h2 sub ury h2 sub lineto
+ lrx lry lineto
+ llx lly lineto
+ ulx uly lineto
+ closepath
+ { fill } { stroke } ifelse
+ end
+} bind def
+
+% SDL input from left
+% Similar to SDL input from right
+% There should be a few spaces at the start of this shape's label
+
+/sdl_input_from_left {
+ 9 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ /h2 uly lly sub 2 div def
+ newpath
+ moveto
+ lrx lry lineto
+ llx lly lineto
+ ulx h2 add ury h2 sub lineto
+ ulx uly lineto
+ closepath
+ { fill } { stroke } ifelse
+ end
+} bind def
+
+% SDL priority input from right
+% Similar to SDL input from right
+% The chevrons are displaced by an eighth of the shape height
+% The filled version is indistinguishable from a non-priority SDL input
+
+/sdl_priority_input_from_right {
+ 9 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ /h2 ury lry sub 2 div def
+ newpath
+ moveto
+ urx h2 sub ury h2 sub lineto
+ lrx lry lineto
+ llx lly lineto
+ ulx uly lineto
+ closepath
+ { fill } { stroke
+ urx h2 4 div sub ury moveto
+ urx h2 sub h2 4 div sub ury h2 sub lineto
+ lrx h2 4 div sub lry lineto
+ stroke } ifelse
+ end
+} bind def
+
+% SDL priority input from left
+% Similar to SDL priority input from right
+
+/sdl_priority_input_from_left {
+ 9 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ /h2 uly lly sub 2 div def
+ newpath
+ moveto
+ lrx lry lineto
+ llx lly lineto
+ ulx h2 add uly h2 sub lineto
+ ulx uly lineto
+ closepath
+ { fill } { stroke
+ llx h2 4 div add lly moveto
+ ulx h2 add h2 4 div add uly h2 sub lineto
+ ulx h2 4 div add uly lineto
+ stroke } ifelse
+ end
+} bind def
+
+% SDL start
+% The left and right sides are semicircles
+% This should be used with "label = " ""
+
+/sdl_start {
+ 9 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ pop pop
+ /r ury lry sub 2 div def
+ newpath
+ urx r sub ury r sub r 90 -90 arcn
+ ulx r add uly r sub r -90 90 arcn
+ closepath
+ { fill } { stroke } ifelse
+ end
+} bind def
+
+% SDL procedure start
+% Similar to SDL start
+% The filled version is indistinguishable from an SDL start
+% This should be used with "label = " ""
+
+/sdl_procedure_start {
+ 9 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ pop pop
+ /r ury lry sub 2 div def
+ newpath
+ urx r sub ury r sub r 90 -90 arcn
+ ulx r add uly r sub r -90 90 arcn
+ closepath
+ { fill } { stroke
+ lrx r sub lry moveto
+ 0 r 2 mul rlineto
+ llx r add lly moveto
+ 0 r 2 mul rlineto
+ stroke } ifelse
+ end
+} bind def
+
+% SDL state/nextstate
+% The left and right sides are arcs
+
+/sdl_state {
+ 12 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ pop pop
+ /h2 ury lry sub 2 div def
+ /w2 h2 1.5 mul def % was urx ulx sub 2 div def but this made curvature width-dependent
+ /r w2 def
+ /th h2 r dup mul h2 dup mul sub sqrt atan def
+ newpath
+ urx w2 sub ury h2 sub r th th neg arcn
+ ulx w2 add uly h2 sub r -180 th add -180 th sub arcn
+ closepath
+ { fill } { stroke } ifelse
+ end
+} bind def
+
+% SDL output to right
+% The outdent has lines at 45 degrees
+% There should be a few spaces at the end of this shape's label
+
+/sdl_output_to_right {
+ 9 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ /h2 ury lry sub 2 div def
+ newpath
+ exch h2 sub exch moveto
+ urx ury h2 sub lineto
+ lrx h2 sub lry lineto
+ llx lly lineto
+ ulx uly lineto
+ closepath
+ { fill } { stroke } ifelse
+ end
+} bind def
+
+% SDL output to left
+% Similar to SDL output to right
+% There should be a few spaces at the start of this shape's label
+
+/sdl_output_to_left {
+ 9 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ /h2 ury lry sub 2 div def
+ newpath
+ moveto
+ lrx lry lineto
+ llx h2 add lly lineto
+ ulx ury h2 sub lineto
+ ulx h2 add uly lineto
+ closepath
+ { fill } { stroke } ifelse
+ end
+} bind def
+
+% SDL continuous signal/enabling condition
+% The chevrons have lines at 45 degrees
+% There should be a few spaces at the start and end of this shape's label
+
+/sdl_condition {
+ 9 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ /h2 ury lry sub 2 div def
+ newpath
+ exch h2 sub exch moveto
+ urx ury h2 sub lineto
+ lrx h2 sub lry lineto
+ dup llx h2 add lly 3 -1 roll { lineto } { moveto } ifelse
+ ulx uly h2 sub lineto
+ ulx h2 add uly lineto
+ { fill } { stroke } ifelse
+ end
+} bind def
+
+% SDL save
+% The left and right edges are at about 60 degrees
+% There should be a few spaces at the start and end of this shape's label
+
+/sdl_save {
+ 9 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ /h3 ury lry sub 3 div def
+ newpath
+ moveto
+ lrx h3 sub lry lineto
+ llx lly lineto
+ ulx h3 add uly lineto
+ closepath
+ { fill } { stroke } ifelse
+ end
+} bind def
+
+% SDL stop
+% The width of the bounding box is ignored; the lines are set at 45 degrees
+% This shape cannot be filled
+% This should be used with "label = """ and "arrowhead = none, headclip = false"
+
+/sdl_stop {
+ 7 dict begin
+ { stop } if % make sure not asked to fill this
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ pop pop
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef pop
+ /h2 uly lly sub 2 div def
+ /mx llx lrx add 2 div def
+ newpath
+ mx h2 add exch moveto pop
+ mx h2 sub lly lineto
+ mx h2 sub uly moveto
+ mx h2 add lry lineto
+ closepath
+ stroke
+ end
+} bind def
+
+% SDL return
+% The width of the bounding box is ignored; the lines are set at 45 degrees
+% The filled version is indistinguishable from an SDL connection
+
+/sdl_return {
+ 9 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef pop
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef pop
+ pop pop
+ /h2 uly lly sub 2 div 2 sqrt div def
+ /mx llx lrx add 2 div def
+ /my lry ury add 2 div def
+ newpath
+ mx my uly lly sub 2 div 0 360 arc
+ { fill } { stroke
+ mx h2 add my h2 add moveto
+ mx h2 sub my h2 sub lineto
+ mx h2 sub my h2 add moveto
+ mx h2 add my h2 sub lineto
+ stroke } ifelse
+ end
+} bind def
+
+% SDL create
+% The extra lines are displaced by an eighth of the shape height
+% The filled version is indistinguishable from an SDL task
+
+/sdl_create {
+ 9 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ /h8 ury lry sub 8 div def
+ newpath
+ moveto
+ lrx lry lineto
+ llx lly lineto
+ ulx uly lineto
+ closepath
+ { fill } { stroke
+ ulx uly h8 sub moveto
+ urx ury h8 sub lineto
+ llx lly h8 add moveto
+ lrx lry h8 add lineto
+ stroke } ifelse
+ end
+} bind def
+
+% SDL call
+% The extra lines are displaced by an eighth of the shape height
+% The filled version is indistinguishable from an SDL task
+% There should be a few spaces at the start and end of this shape's label
+
+/sdl_call {
+ 9 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ /h8 ury lry sub 8 div def
+ newpath
+ moveto
+ lrx lry lineto
+ llx lly lineto
+ ulx uly lineto
+ closepath
+ { fill } { stroke
+ urx h8 sub ury moveto
+ lrx h8 sub lry lineto
+ llx h8 add lly moveto
+ ulx h8 add uly lineto
+ stroke } ifelse
+ end
+} bind def
+
+% SDL text symbol
+% The corner has a size of twice the H height
+
+/sdl_text {
+ 10 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ /h8 ury lry sub 8 div def
+ newpath
+ moveto
+ /d (H) true charpath flattenpath pathbbox exch pop exch sub exch pop 2 mul def
+ newpath
+ urx ury d sub moveto
+ lrx lry lineto
+ llx lly lineto
+ ulx uly lineto
+ urx d sub ury lineto
+ closepath
+ { fill } { stroke } ifelse
+ urx ury d sub moveto
+ d neg 0 rlineto
+ 0 d rlineto
+ stroke
+ end
+} bind def
+
+% SDL text extension from left
+% This should be used with "rank = same"
+
+/sdl_text_extension_from_left {
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ pop pop
+ moveto
+ lineto
+ lineto
+ lineto
+ { fill } { stroke } ifelse
+} bind def
+
+% SDL text extension from right
+% This should be used with "rank = same"
+
+/sdl_text_extension_from_right {
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ pop pop
+ 8 4 roll
+ moveto
+ lineto
+ lineto
+ lineto
+ { fill } { stroke } ifelse
+} bind def
+
+% SDL comment from left
+% This should be used with "style = dashed" and "rank = same"
+
+/sdl_comment_from_left { sdl_text_extension_from_left } bind def
+
+% SDL comment from right
+% This should be used with "style = dashed" and "rank = same"
+
+/sdl_comment_from_right { sdl_text_extension_from_right } bind def
+
+% SDL connector
+% The width of the bounding box is ignored
+
+/sdl_connector {
+ 7 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ pop pop
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef pop
+ pop pop
+ /h2 uly lly sub 2 div def
+ /mx llx lrx add 2 div def
+ newpath
+ mx uly h2 sub h2 0 360 arc
+ { fill } { stroke } ifelse
+ end
+} bind def
+
+% SDL set (extension)
+% The hourglass has a size of twice the H height
+% There should be a few spaces at the start of this shape's label
+
+/sdl_set {
+ 10 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ /my uly lly add 2 div def
+ newpath
+ moveto
+ /d (H) true charpath flattenpath pathbbox exch pop exch sub exch pop def
+ newpath
+ llx d add my d add moveto
+ ulx d add uly lineto
+ urx ury lineto
+ lrx lry lineto
+ llx d add lly lineto
+ llx d add my d sub lineto
+ dup { closepath fill } { stroke } ifelse
+ llx my d sub moveto
+ d 2 mul dup rlineto
+ d 2 mul neg 0 rlineto
+ d 2 mul dup neg rlineto
+ closepath
+ { fill } { stroke } ifelse
+ end
+} bind def
+
+% SDL reset (extension)
+% The cross has a size of twice the H height
+% There should be a few spaces at the start of this shape's label
+
+/sdl_reset {
+ 10 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ /my uly lly add 2 div def
+ newpath
+ moveto
+ /d (H) true charpath flattenpath pathbbox exch pop exch sub exch pop def
+ newpath
+ urx ury moveto
+ lrx lry lineto
+ llx d add lly lineto
+ ulx d add uly lineto
+ closepath
+ { fill } { stroke } ifelse
+ llx my d sub moveto
+ d 2 mul dup rlineto
+ llx d 2 mul add my d sub moveto
+ d 2 mul dup neg exch rlineto
+ stroke
+ end
+} bind def
+
+% SDL export (extension)
+% The store has a width of twice the H height
+% There should be a few spaces at the start of this shape's label
+
+/sdl_export {
+ 10 dict begin
+ 3 1 roll % put filled flag at end
+ 4 ne { stop } if % sanity-check number of sides
+ aload pop
+ /ury xdef /urx xdef
+ /lry xdef /lrx xdef
+ /lly xdef /llx xdef
+ /uly xdef /ulx xdef
+ /my uly lly add 2 div def
+ newpath
+ moveto
+ /d (H) true charpath flattenpath pathbbox exch pop exch sub exch pop def
+ newpath
+ llx d add my d 2 div add moveto
+ ulx d add uly lineto
+ urx ury lineto
+ lrx lry lineto
+ llx d add lly lineto
+ llx d add my d 2 div sub lineto
+ { closepath fill } { stroke } ifelse
+ llx my d 2 div sub moveto
+ d 2 mul 0 rlineto
+ llx my d 2 div add moveto
+ d 2 mul 0 rlineto
+ stroke
+ end
+} bind def
diff --git a/cesar/common/tools/sdl2dot b/cesar/common/tools/sdl2dot
new file mode 100755
index 0000000000..1d86c14d59
--- /dev/null
+++ b/cesar/common/tools/sdl2dot
@@ -0,0 +1,227 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+
+my %re = (
+ start => qr/\(\((.*?)\)\)/,
+ pstart => qr/\(\|(.*?)\|\)/,
+ state => qr/\(([^(|X].*?)\)/,
+ call => qr/\|\|(.+?)\|\|/,
+ task => qr/\|([^|%X].*?)\|/,
+ toright => qr/\|(.+?)>/,
+ toleft => qr/<(.+?)\|/,
+ fromright => qr/\|(.+?)</,
+ fromleft => qr/>(.+?)\|/,
+ cond => qr/<(.+?)>/,
+ stop => qr/X(.*?)X/,
+ connector => qr/O(.*?)O/,
+ pstop => qr/\(X(.*?)X\)/,
+ set => qr/\|%(.*?)\|/,
+ 'reset' => qr/\|X(.*?)\|/,
+ 'continue' => qr/\.\.\./,
+);
+my $renode = qr/(?:
+ \( [^(|X].*? \)
+ | \(\( .*? \)\)
+ | \(\| .*? \|\)
+ | \(X .*? X\)
+ | \| [^|%X].*? [|<>]
+ | \|\| .+? \|\|
+ | [<>] .+? [|>]
+ | X .*? X
+ | O .*? O
+ | \|% .*? \|
+ | \|X .*? \|
+ | \.\.\.
+ )/x;
+
+my @edges;
+my %nodes;
+my $name;
+my $using = '';
+
+my $continue_node;
+while (<>)
+{
+ chomp;
+ my $last_node;
+ my %last_edge;
+ next if /^\s*$/;
+ do { $name = $1; next; } if /^\s*# (.+)$/ and !defined $name;
+ do { $using = $1; next; } if /^\s*(\w*):$/;
+ while (1)
+ {
+ unless (/\G\s*($renode)/gc)
+ {
+ /\G(.{0,10})/;
+ die "invalid line \"...$1...\"";
+ }
+ my ($node, $label);
+ for my $k (keys %re)
+ {
+ if ($1 =~ /^$re{$k}$/)
+ {
+ if ($k eq 'continue')
+ {
+ die "invalid continuation" unless defined $continue_node;
+ $node = $continue_node;
+ last;
+ }
+ $node = $1;
+ $node =~ /(?:.*:)?(.*)/;
+ $label = $1;
+ $node = $using . $node if $node =~ /^:.*$/;
+ if (exists $nodes{$node})
+ {
+ !exists $nodes{$node}{node}
+ and $nodes{$node}{node} = $k;
+ $nodes{$node}{node} eq $k
+ or die "changed node type for \"$node\"";
+ }
+ else
+ {
+ $nodes{$node} = { label => $label, node => $k };
+ }
+ #print " n $node $k\n";
+ last;
+ }
+ }
+ defined $node or die 'invalid node';
+ if (defined $last_node)
+ {
+ if ($nodes{$node}{node} eq 'stop')
+ {
+ $last_edge{attr} = 'arrowhead = none, headclip = false';
+ }
+ push @edges, { from => $last_node, to => $node, %last_edge };
+ }
+ $last_node = $node;
+ if (/\G\s*$/)
+ {
+ last;
+ }
+ elsif (/\G\s*--->/gc)
+ {
+ %last_edge = (edge => 'long');
+ }
+ elsif (/\G\s*->/gc)
+ {
+ %last_edge = (edge => 'short');
+ }
+ elsif (/\G\s*--(.*?)->/gc)
+ {
+ %last_edge = (edge => 'longc', cond => $1);
+ }
+ elsif (/\G\s*-(.*?)->/gc)
+ {
+ %last_edge = (edge => 'shortc', cond => $1);
+ }
+ else
+ {
+ /\G(.{0,10})/;
+ die "invalid edge \"$1...\"";
+ }
+ }
+ $continue_node = $last_node;
+}
+
+my %render = (
+ start => sub {
+ my ($n, $l) = @_;
+ $l = ' ' x 16 unless $l;
+ "\t\"$n\" [ shape=sdl_start, label=\"$l\" ]\n";
+ },
+ pstart => sub {
+ my ($n, $l) = @_;
+ $l = ' ' x 12 unless $l;
+ "\t\"$n\" [ shape=sdl_procedure_start, label=\" $l \" ]\n";
+ },
+ state => sub {
+ my ($n, $l) = @_;
+ "\t\"$n\" [ shape=sdl_state, style=filled, fillcolor=lavender, label=\"$l\" ]\n";
+ },
+ call => sub {
+ my ($n, $l) = @_;
+ "\t\"$n\" [ shape=sdl_call, label=\" $l \" ]\n";
+ },
+ task => sub {
+ my ($n, $l) = @_;
+ "\t\"$n\" [ shape=sdl_task, label=\"$l\" ]\n";
+ },
+ toright => sub {
+ my ($n, $l) = @_;
+ "\t\"$n\" [ shape=sdl_output_to_right, label=\"$l \" ]\n";
+ },
+ toleft => sub {
+ my ($n, $l) = @_;
+ "\t\"$n\" [ shape=sdl_output_to_left, label=\" $l\" ]\n";
+ },
+ fromright => sub {
+ my ($n, $l) = @_;
+ "\t\"$n\" [ shape=sdl_input_from_right, label=\"$l \" ]\n";
+ },
+ fromleft => sub {
+ my ($n, $l) = @_;
+ "\t\"$n\" [ shape=sdl_input_from_left, label=\" $l\" ]\n";
+ },
+ cond => sub {
+ my ($n, $l) = @_;
+ "\t\"$n\" [ shape=diamond, peripheries=1, label=\"$l\" ]\n";
+ },
+ stop => sub {
+ my ($n, $l) = @_;
+ "\t\"$n\" [ shape=sdl_stop, label=\"$l\" ]\n";
+ },
+ connector => sub {
+ my ($n, $l) = @_;
+ "\t\"$n\" [ shape=sdl_connector, label=\"$l\" ]\n";
+ },
+ pstop => sub {
+ my ($n, $l) = @_;
+ "\t\"$n\" [ shape=sdl_return, label=\"$l\" ]\n";
+ },
+ set => sub {
+ my ($n, $l) = @_;
+ "\t\"$n\" [ shape=sdl_set, label=\" $l\" ]\n";
+ },
+ 'reset' => sub {
+ my ($n, $l) = @_;
+ "\t\"$n\" [ shape=sdl_reset, label=\" $l\" ]\n";
+ },
+ short => sub {
+ my ($f, $t, $a) = @_;
+ $a = " [ $a ]" if $a;
+ "\t\"$f\" -> \"$t\"$a\n";
+ },
+ shortc => sub {
+ my ($f, $t, $a, $c) = @_;
+ $a = ", $a" if $a;
+ "\t\"$f\" -> \"$t\" [ label=\"$c\"$a ]\n";
+ },
+ long => sub {
+ my ($f, $t, $a) = @_;
+ $a = ", $a" if $a;
+ "\t\"$f\" -> \"$t\" [ weight=0.8$a ]\n";
+ },
+ longc => sub {
+ my ($f, $t, $a, $c) = @_;
+ $a = ", $a" if $a;
+ "\t\"$f\" -> \"$t\" [ weight=0.8, label=\"$c\"$a ]\n";
+ },
+);
+
+$name = 'noname' unless defined $name;
+print <<EOF;
+digraph $name {
+\tnode [ peripheries=0 ]
+EOF
+for (@edges)
+{
+ print $render{$$_{edge}} ($$_{from}, $$_{to}, exists $$_{attr} ? $$_{attr} : '', $$_{cond});
+}
+for (keys %nodes)
+{
+ print $render{$nodes{$_}{node}} ($_, $nodes{$_}{label});
+}
+print "}\n";
+
diff --git a/cesar/common/tools/vcd-merge b/cesar/common/tools/vcd-merge
new file mode 100755
index 0000000000..8d82777cce
--- /dev/null
+++ b/cesar/common/tools/vcd-merge
@@ -0,0 +1,111 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+
+my $timescale;
+my $id = 'a';
+my @files;
+
+sub new_file
+{
+ my $file = shift;
+ my $fd;
+ open $fd, "<$file" or die;
+ my %signals;
+ while (<$fd>)
+ {
+ chomp;
+ if (/^\$version .* \$end$/) {
+ } elsif (/^\$timescale (.*) \$end$/) {
+ unless (defined $timescale)
+ {
+ print "\$timescale $1 \$end\n";
+ $timescale = $1;
+ }
+ die if $timescale ne $1;
+ } elsif (/^\$(?:scope|upscope) .*\$end$/) {
+ print "$_\n";
+ } elsif (/^\$var real 1 (.) (.*) \$end$/) {
+ print "\$var real 1 $id $2 \$end\n";
+ $signals{$1} = $id;
+ $id++;
+ } elsif (/^\$enddefinitions \$end$/) {
+ last;
+ } else {
+ die;
+ }
+ }
+ push @files, [ $fd, { %signals } ];
+}
+
+sub dumpvars
+{
+ my ($fd, $signals) = @_;
+ my %signals = %$signals;
+ while (<$fd>)
+ {
+ chomp;
+ if (/^s(.+) (.)$/)
+ {
+ die unless exists $signals{$2};
+ print "s$1 $signals{$2}\n";
+ } elsif (/^\$dumpvars$/) {
+ } elsif (/^\$end$/) {
+ last;
+ } else {
+ die;
+ }
+ }
+}
+
+sub body
+{
+ # Read first time.
+ for my $file (@files)
+ {
+ my $fd = $$file[0];
+ $_ = <$fd>;
+ chomp;
+ die unless /^#(\d+)$/;
+ push @$file, ($1 + 0);
+ }
+ my $time = -1;
+ while (@files)
+ {
+ @files = sort { $$a[2] <=> $$b[2] } @files;
+ my $min = $files[0];
+ if ($time != $$min[2])
+ {
+ $time = $$min[2];
+ print "#$time\n";
+ }
+ my $fd = $$min[0];
+ while (1)
+ {
+ unless (defined ($_ = <$fd>))
+ {
+ close $fd;
+ shift @files;
+ last;
+ }
+ chomp;
+ if (/^#(\d+)$/) {
+ $$min[2] = $1 + 0;
+ last;
+ } elsif (/^s(.+) (.)$/) {
+ die unless exists $$min[1]{$2};
+ print "s$1 $$min[1]{$2}\n";
+ } else {
+ die;
+ }
+ }
+ }
+}
+
+print "\$version mergevcd \$end\n";
+new_file ($_) for @ARGV;
+print "\$enddefinitions \$end\n\$dumpvars\n";
+for my $f (@files)
+{ dumpvars (@$f); }
+print "\$end\n";
+body;
diff --git a/cesar/common/tools/vcd-trace b/cesar/common/tools/vcd-trace
new file mode 100755
index 0000000000..d669b5de73
--- /dev/null
+++ b/cesar/common/tools/vcd-trace
@@ -0,0 +1,129 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+
+sub date
+{
+ my ($date, $offset) = (@_, 0);
+ print '#' . ($offset + hex $date) . "\n";
+}
+
+my $sta = 'sta';
+$sta = $ARGV[0] if defined $ARGV[0];
+
+my $header = <<EOF;
+\$version trace2vcd \$end
+\$timescale 40 ns \$end
+\$scope module $sta \$end
+\$var real 1 ! medium \$end
+\$var real 1 < rx \$end
+\$var real 1 > tx \$end
+\$upscope \$end
+\$enddefinitions \$end
+\$dumpvars
+sIDLE !
+sIDLE <
+sIDLE >
+\$end
+EOF
+
+my $pre = [ 'PRE', 1280 ];
+my $pre10 = [ 'PRE', 1152 ];
+my $fc = [ 'FC', 1482 ];
+my $fc10 = [ 'FC10', 964 ];
+my %pf = (
+ '0' => [ $pre10, $fc10, $fc ],
+ '1' => [ $pre10, $fc10, $fc, $fc ],
+ '2' => [ $pre, $fc ],
+ '3' => [ $pre, $fc, $fc ],
+);
+my $pre_detect_delay_tck = 500;
+
+my ($dx417, $dx567, $dx3534) = (1163, 1213, 2202);
+my %dx = ('0' => $dx417, '1' => $dx567, '2' => $dx3534);
+my %gilpmod = ('0' => '0', '1' => '0', '2' => '1');
+
+my $rx_fc_mode = '0';
+my @fc_end_date;
+my %tx_param;
+my $tx_symb_nb;
+
+print $header;
+
+while (<>)
+{
+ chomp;
+ s/\r$//;
+ if (/^\[.\] rx param mode=(.+)$/) {
+ $rx_fc_mode = $1;
+ } elsif (/^\[(.+)\] prp([01])$/) {
+ date ($1);
+ print "sPRP$2 !\n";
+ } elsif (/^\[(.+)\] slot count=(.+)$/ && $2 > 1) {
+ date ($1);
+ print "sCW$2 !\n";
+ } elsif (/^\[(.+)\] pre detect$/) {
+ date ($1, -$pre_detect_delay_tck);
+ print "sRX !\n";
+ my $t = -$pre_detect_delay_tck;
+ for my $s (@{$pf{$rx_fc_mode}})
+ {
+ print "s$$s[0] <\n";
+ $t += $$s[1];
+ date ($1, $t);
+ }
+ @fc_end_date = ($1, $t);
+ } elsif (/^\[\.\] rx prepare short=true.*/) {
+ next unless @fc_end_date;
+ print "sIDLE <\nsIDLE !\n";
+ @fc_end_date = ();
+ } elsif (/^\[\.\] rx prepare short=false.*mod=(.+?) .* gil=(.+?) .*symb_nb=(.+)$/) {
+ next unless @fc_end_date;
+ my $t = $fc_end_date[1];
+ my $gil = exists $gilpmod{$1} ? $gilpmod{$1} : $2;
+ for my $d (1 .. $3)
+ {
+ print "sD$d <\n";
+ $t += $d <= 2 ? $dx567 : $dx{$gil};
+ date ($fc_end_date[0], $t);
+ }
+ print "sIDLE <\nsIDLE !\n";
+ @fc_end_date = ();
+ } elsif (/^\[\.\] tx param mode=(.+?) short=(.+?) mod=(.+?) .*gil=(.+?)/) {
+ %tx_param = (fc_mode => $1, short => $2, mod => $3, gil => $4);
+ } elsif (/^\[\.\] tx symb_nb=(.*?)$/) {
+ $tx_symb_nb = $1;
+ } elsif (/^\[(.+)\] tx frame$/) {
+ next unless %tx_param;
+ date ($1);
+ print "sTX !\n";
+ my $t = 0;
+ for my $s (@{$pf{$tx_param{fc_mode}}})
+ {
+ print "s$$s[0] >\n";
+ $t += $$s[1];
+ date ($1, $t);
+ }
+ @fc_end_date = ($1, $t);
+ if ($tx_param{short} eq 'true')
+ {
+ print "sIDLE >\nsIDLE !\n";
+ %tx_param = ();
+ }
+ } elsif (/^\[.*\] tx mpdu/) {
+ next unless %tx_param;
+ next unless @fc_end_date;
+ my $t = $fc_end_date[1];
+ my $gil = exists $gilpmod{$tx_param{mod}}
+ ? $gilpmod{$tx_param{mod}} : $tx_param{gil};
+ for my $d (1 .. $tx_symb_nb)
+ {
+ print "sD$d >\n";
+ $t += $d <= 2 ? $dx567 : $dx{$gil};
+ date ($fc_end_date[0], $t);
+ }
+ print "sIDLE >\nsIDLE !\n";
+ %tx_param = ();
+ @fc_end_date = ();
+ }
+}
diff --git a/cesar/cp/beacon/Module b/cesar/cp/beacon/Module
new file mode 100644
index 0000000000..4388b36b43
--- /dev/null
+++ b/cesar/cp/beacon/Module
@@ -0,0 +1,4 @@
+SOURCES:= beacon.c beacons.c ntb_clock_sync.c
+ifeq ($(CONFIG_TRACE),y)
+SOURCES += trace.c
+endif
diff --git a/cesar/cp/beacon/beacon.h b/cesar/cp/beacon/beacon.h
new file mode 100644
index 0000000000..1ebdea6cb9
--- /dev/null
+++ b/cesar/cp/beacon/beacon.h
@@ -0,0 +1,57 @@
+#ifndef BEACON_H_
+#define BEACON_H_
+
+#include "cp/beacon/inc/beacon_types.h"
+#include "cp/station/inc/station_event_handler.h"
+#include "main_fsmData.h"
+
+
+
+/**
+ * \brief this will init the beacon module
+ * \param
+ * \return
+ */
+void
+beacon_init(void);
+
+void
+beacon_create_schedule_for_csma(void);
+
+
+/**
+ * \brief this function must be called each time a beacon is received,
+ * or should have been received, or is sent
+ * \param
+ * \return
+ */
+void
+beacon_now(void);
+
+/**
+ * \brief this function must be called when a beacon is received
+ * \param
+ * \return
+ */
+void
+beacon_received(void);
+
+/**
+ * \brief this function will fill the field common to all type of beacon
+ * (ie central, discover and proxy beacon)
+ * \param pointer to the beacon to create
+ * \return
+ */
+void
+beacon_send_common_part(beacon_t *beacon);
+
+
+/**
+ * \brief will create and send a discover beacon
+ * \param
+ * \return
+ */
+void
+beacon_send_discover(void);
+
+#endif /*BEACON_H_*/
diff --git a/cesar/cp/beacon/beacons.h b/cesar/cp/beacon/beacons.h
new file mode 100644
index 0000000000..11ce714096
--- /dev/null
+++ b/cesar/cp/beacon/beacons.h
@@ -0,0 +1,201 @@
+#ifndef cp_beacon_beacons_h
+#define cp_beacon_beacons_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/beacons.h
+ * \brief CP Beacon module
+ * \ingroup cp_beacon
+ *
+ */
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_arch.h>
+
+#include "cp/beacon/forward.h"
+
+#include "interface/interface.h"
+#include "mac/ca/ca.h"
+#include "mac/pbproc/pbproc.h"
+#include "mac/common/store.h"
+#include "hal/phy/phy.h"
+#include "hal/timer/timer.h"
+#include "cp/station/station.h"
+#include "cp/secu/secu.h"
+#include "cp/cco/cco.h"
+
+/** Call back used when the timer calls the beacon modules.
+ * This will be use to provide the data to the CP.
+ * The CP shall keep the event to request the beacon to process by calling the
+ * right function.
+ *
+ * \param user_data the data registered in the callback.
+ */
+typedef void (*cp_beacon_timer_cb_t) (void *user_data);
+
+enum cp_beacon_type
+{
+ CP_BEACON_CENTRAL_BEACON,
+ CP_BEACON_DISCOVER_BEACON,
+ CP_BEACON_PROXY_BACON
+};
+
+/**
+ * Init the beacons module.
+ *
+ * \param interface the interface context.
+ * \param phy the phy context.
+ * \param sta the station context.
+ * \param secu the control plane security layer context.
+ * \param ca the Channel Access context.
+ * \param mac_store mac_store.
+ * \param pbproc pbproc.
+ * \param cco the cco context.
+ * \param timer the hal timer context to program the instance.
+ * \param user_data the CP user_data to be provided with the call back.
+ * \param cb the function to call back when the module is awake by the
+ * timer.
+ * \return the beacon context.
+ */
+cp_beacon_t *
+cp_beacon_init(interface_t *interface, phy_t *phy, cp_sta_t *sta,
+ cp_secu_t *secu, ca_t *ca,
+ pbproc_t *pbproc, mac_store_t *mac_store, cp_cco_t *cco,
+ hal_timer_t *timer, void *user_data, cp_beacon_timer_cb_t cb);
+
+/**
+ * Uninit the beacon module
+ *
+ * \param ctx the beacon module.
+ */
+void
+cp_beacon_uninit(cp_beacon_t *ctx);
+
+/**
+ * Create the default schedule for the CA to be able to listen the PWL on the
+ * POND procedure.
+ * This will create four beacon periods of a duration corresponding to
+ * CP_BEACON_DEFAULT_SCHEDULE_TIME / 4.
+ *
+ * \param ctx the cp beacon context
+ */
+void
+cp_beacon_create_default_schedule (cp_beacon_t *ctx);
+
+/**
+ * Compute the AC line frequency from the PRATIC register
+ *
+ * \param ctx beacon context.
+ */
+void
+cp_beacon_acl_frequency_detection (cp_beacon_t *ctx);
+
+/**
+ * Compute the next BTS, the four next BTOs and the BP in Time Allocation
+ * Unit to provide the data to the generated beacon.
+ *
+ * \param ctx the beacon context.
+ * \param common the common part of the beacons structure.
+ */
+void
+cp_beacon_estimate_bts_bto_bp (cp_beacon_t *ctx, cp_beacon_common_t *common);
+
+/**
+ * Send a beacon when the STA is acting as a CCo.
+ *
+ * \param ctx the beacon module context
+ * \param beacon_type beacon type
+ */
+void
+cp_beacon_cco_send_beacon (cp_beacon_t *ctx, uint beacon_type);
+
+
+/**
+ * Generate the central beacon when the STA acts as a CCo.
+ *
+ * \param ctx the beacon context.
+ */
+extern inline void
+cp_beacon_cco_send_central_beacon (cp_beacon_t *ctx)
+{
+ dbg_assert (ctx);
+ cp_beacon_cco_send_beacon (ctx, CP_BEACON_CENTRAL_BEACON);
+}
+
+/**
+ * Generate the discover beacon when the STA acts as a UCCo.
+ *
+ * \param ctx the beacon context.
+ */
+extern inline void
+cp_beacon_cco_send_discover_beacon (cp_beacon_t *ctx)
+{
+ dbg_assert (ctx);
+ cp_beacon_cco_send_beacon (ctx, CP_BEACON_DISCOVER_BEACON);
+}
+
+/**
+ * Process the received beacon or countdown the counters if the beacon as
+ * not been received.
+ *
+ * \param ctx the beacon context.
+ * \param beacon the beacon received.
+ */
+void
+cp_beacon_process (cp_beacon_t *ctx, cp_beacon_desc_t *beacon);
+
+/**
+ * Set the value of the Encryption change key countdown.
+ * It allows the CCo to insert the bentry corresponding in the central beacon.
+ * Each time the countdown goes to 0 the snid is changed.
+ *
+ * \param ctx the beacon context.
+ * \param kccd the countdown value in a range from 1 to 62.
+ * \param kbc the key being change boolean
+ * \param new_eks the new eks to set.
+ */
+void
+cp_beacon_set_encryption_key_change_countdown (cp_beacon_t *ctx, u8 kccd, bool kbc,
+ u8 new_eks);
+
+/**
+ * Set the value of the Handover countdown.
+ * It allows the CCo to insert the bentry corresponding in the central beacon.
+ * Each time the countdown goes to 0 the snid is changed.
+ *
+ * \param ctx the beacon context.
+ * \param hcd the countdown value in a range from 1 to 62.
+ * \param new_tei new CCo tei
+ */
+void
+cp_beacon_set_handover_countdown (cp_beacon_t *ctx, u8 hcd, u8 new_tei);
+
+/**
+ * Set the value of the Hybrid Mode countdown.
+ * It allows the CCo to insert the bentry corresponding in the central beacon.
+ * Each time the countdown goes to 0 the snid is changed.
+ *
+ * \param ctx the beacon context.
+ * \param hmccd the countdown value in a range from 1 to 62.
+ * \param newhm new hybrid mode value
+ */
+void
+cp_beacon_set_change_hm_countdown (cp_beacon_t *ctx, u8 hmccd, u8 newhm);
+
+/**
+ * Set the value of the snid countdown.
+ * It allows the CCo to insert the bentry corresponding in the central beacon.
+ * Each time the countdown goes to 0 the snid is changed.
+ *
+ * \param ctx the beacon context.
+ * \param sccd the countdown value in a range from 1 to 62.
+ * \param new_snid new snid value
+ */
+void
+cp_beacon_set_snid_countdown (cp_beacon_t *ctx, u8 sccd, u8 new_snid);
+
+#endif /* cp_beacon_beacons_h */
diff --git a/cesar/cp/beacon/doc/beacons.odt b/cesar/cp/beacon/doc/beacons.odt
new file mode 100644
index 0000000000..14524f0d15
--- /dev/null
+++ b/cesar/cp/beacon/doc/beacons.odt
Binary files differ
diff --git a/cesar/cp/beacon/forward.h b/cesar/cp/beacon/forward.h
new file mode 100644
index 0000000000..c35775a4ca
--- /dev/null
+++ b/cesar/cp/beacon/forward.h
@@ -0,0 +1,35 @@
+#ifndef cp_beacon_forward_h
+#define cp_beacon_forward_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/forward.h
+ * \brief forward declarations.
+ * \ingroup cp_beacon
+ *
+ */
+
+typedef struct cp_beacon_t cp_beacon_t;
+typedef struct cp_beacon_desc_t cp_beacon_desc_t;
+typedef struct cp_beacon_common_t cp_beacon_common_t;
+typedef struct cp_beacon_desc_alloc_t cp_beacon_desc_alloc_t;
+typedef struct cp_beacon_payload_t cp_beacon_payload_t;
+typedef struct cp_pw_line_t cp_pw_line_t;
+
+
+typedef struct cp_bentry_sai_t cp_bentry_sai_t;
+typedef struct cp_bentry_persistent_schedule_struct_t cp_bentry_persistent_schedule_struct_t;
+typedef struct cp_bentry_non_persistent_schedule_struct_t cp_bentry_non_persistent_schedule_struct_t;
+typedef struct cp_bentry_discover_info_struct_t cp_bentry_discover_info_struct_t;
+typedef struct cp_bentry_key_change_struct_t cp_bentry_key_change_struct_t;
+typedef struct cp_bentry_handover_struct_t cp_bentry_handover_struct_t;
+typedef struct cp_bentry_hm_struct_t cp_bentry_hm_struct_t;
+typedef struct cp_bentries_data_t cp_bentries_data_t;
+typedef struct cp_bentry_regions_struct_t cp_bentry_regions_struct_t;
+
+#endif /* cp_beacon_forward_h */
diff --git a/cesar/cp/beacon/inc/beacon_types.h b/cesar/cp/beacon/inc/beacon_types.h
new file mode 100644
index 0000000000..f048dee52c
--- /dev/null
+++ b/cesar/cp/beacon/inc/beacon_types.h
@@ -0,0 +1,69 @@
+#ifndef BEACON_TYPES_H_
+#define BEACON_TYPES_H_
+
+#include "cp/cp_types.h"
+
+#define MaxDiscoverPeriod_s 10 // table 2-4
+
+typedef enum beacon_type_t // 4.4.3.4
+{
+ CENTRAL_BEACON = 0,
+ DISCOVER_BEACON = 1,
+ PROXY_BEACON = 2
+} beacon_type_t;
+/*
+typedef enum bentry_header_t // 4-94
+{
+ CP_BENTRY_NON_PERSISTENT_SCHEDULE = 0x0,
+ CP_BENTRY_PERSISTENT_SCHEDULE = 0x01,
+ CP_BENTRY_REGIONS = 0x02,
+ CP_BENTRY_MAC_ADDRESS = 0x03,
+ CP_BENTRY_DISCOVER = 0x04,
+ CP_BENTRY_DISCOVERED_INFO = 0x05,
+ CP_BENTRY_BEACON_PERIOD_START_OFFSET = 0x06,
+ CP_BENTRY_ENCRYPTION_KEY_CHANGE = 0x07,
+ CP_BENTRY_CCO_HANDOVER = 0x08,
+ CP_BENTRY_BEACON_RELOCATION = 0x09,
+ CP_BENTRY_AC_LINE_SYNC_COUNTDOWN = 0x0A,
+ CP_BENTRY_CHANGE_NUM_SLOTS = 0x0B,
+ CP_BENTRY_CHANGE_HM = 0x0C,
+ CP_BENTRY_CHANGE_SNID = 0x0D,
+ CP_BENTRY_VENDOR = 0xFF
+} __attribute__ ((packed)) bentry_header_t;
+*/
+typedef struct beacon_t // see table 4-81
+{
+ nid_t nid;
+ int hm:2;
+ tei_t stei;
+ u8 bt:3;
+ u8 ncnr:1;
+ u8 npsm:1;
+ u8 num_slots:3;
+ u8 slot_usage;
+ u8 slot_id:3;
+ u8 aclss:3;
+ u8 hoip:1;
+ u8 rtsbf:1;
+ u8 nm:2;
+ u8 cco_cap:2;
+ u8 rsvd:4;
+ u8 bmi[120];
+ u32 bpcs;
+} beacon_t;
+
+typedef struct central_beacon_stats_t
+{
+ unsigned int nbp; // number of beacon period on which statistics are collected
+ unsigned int nmb; // number of missed beacon
+} central_beacon_stats_t;
+/*
+typedef struct bentry_t // see table 4-92
+{
+ bentry_header_t behdr; // bentry header
+ u8 belen; // bentry length
+ u8 bentry; // bentry content
+} bentry_t;
+*/
+
+#endif /*BEACON_TYPES_H_*/
diff --git a/cesar/cp/beacon/inc/beacons.h b/cesar/cp/beacon/inc/beacons.h
new file mode 100644
index 0000000000..9ea003dcbc
--- /dev/null
+++ b/cesar/cp/beacon/inc/beacons.h
@@ -0,0 +1,110 @@
+#ifndef cp_beacon_inc_beacons_h
+#define cp_beacon_inc_beacons_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/inc/beacons.h
+ * \brief central beacon private functions.
+ * \ingroup cp_beacon
+ *
+ */
+
+/**
+ * Initialize the sub module for the discover, central and proxy beacons.
+ * The beacon_ctx corresponds to the each part contained in the ctx.
+ *
+ * \param ctx the becon module context.
+ * \param beacon_ctx the central, discover or proxy context.
+ */
+void
+cp_beacon_init_beacons (cp_beacon_t *ctx, cp_beacon_common_t *beacon_ctx);
+
+/**
+ * Uninit the sub beacon modules.
+ *
+ * \param ctx the beacon module context
+ * \param beacon_ctx the beacon context to uninit.
+ */
+void
+cp_beacon_uninit_beacons (cp_beacon_t *ctx, cp_beacon_common_t *beacon_ctx);
+
+/**
+ * Compute the beacon period using the beacon period thereotic calculated
+ * during the pw frequency detection.
+ *
+ * \param ctx the beacon period context.
+ */
+uint
+cp_beacon_pwl_period (cp_beacon_t *ctx);
+
+/**
+ * Fill the payload of the beacon when the STA is accting as CCo or UCCo.
+ * Can be use for
+ * - the Central beacon when acting as a CCo
+ * - the discover beacon when acting as a UCCo.
+ *
+ *
+ * \param ctx the beacon module context
+ * \param beacon the beacon to fill.
+ * \param beacon_type the beacon type, central, discover or proxy.
+ */
+void
+cp_beacon_xcco_fill_common_part (cp_beacon_t *ctx, cp_beacon_desc_t *beacon,
+ uint beacon_type);
+
+/**
+ * Generate the central beacon.
+ *
+ * \param ctx the beacon context.
+ * \param beacon the central beacon to fill
+ */
+void
+cp_beacon_cco_beacon_central_generate (cp_beacon_t *ctx,
+ cp_beacon_desc_t *beacon);
+
+/**
+ * Generate the discover beacon when STA is UCCo.
+ *
+ * \param ctx the beacon context.
+ * \param beacon the central beacon to fill
+ */
+void
+cp_beacon_cco_beacon_discover_generate (cp_beacon_t *ctx,
+ cp_beacon_desc_t *beacon);
+
+
+/**
+ * Send the beacon over the PWL.
+ * TODO Implement the proxy beacon part
+ *
+ * \param ctx the cp beacon context
+ * \param beacon the beacon to send
+ * \param beacon_type the beacon type.
+ */
+void
+cp_beacon_send_beacon (cp_beacon_t *ctx, cp_beacon_desc_t *beacon,
+ uint beacon_type);
+
+/**
+ * Process the received beacon
+ *
+ * \param ctx the beacon context.
+ * \param beacon the beacon received.
+ */
+void
+cp_beacon_process_beacon (cp_beacon_t *ctx, cp_beacon_desc_t *beacon);
+
+/**
+ * Function call by the timer when the timer expires.
+ *
+ * \param ctx the beacon context.
+ */
+void
+cp_beacon_timer_it (cp_beacon_t *ctx);
+
+#endif /* cp_beacon_inc_beacons_h */
diff --git a/cesar/cp/beacon/inc/beacons_ctx.h b/cesar/cp/beacon/inc/beacons_ctx.h
new file mode 100644
index 0000000000..41594b7d84
--- /dev/null
+++ b/cesar/cp/beacon/inc/beacons_ctx.h
@@ -0,0 +1,177 @@
+#ifndef cp_beacon_inc_beacons_ctx_h
+#define cp_beacon_inc_beacons_ctx_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/inc/beacons_ctx.h
+ * \brief beacon modules.
+ * \ingroup cp_beacon
+ *
+ * « long description »
+ */
+
+#include "lib/trace.h"
+#include "hal/phy/phy.h"
+
+#include "interface/interface.h"
+
+#include "cp/station/station.h"
+#include "cp/secu/inc/secu_types.h"
+#include "cp/secu/secu.h"
+
+#include "cp/beacon/inc/trace.h"
+#include "cp/beacon/inc/bentry.h"
+#include "hal/timer/timer.h"
+#include "mac/pbproc/pbproc.h"
+
+#define CP_BEACON_K 6 // 2^7 when the shift operator is use.
+
+#define CP_BEACON_DEFAULT_SCHEDULE_TIME 12
+#define CP_BEACON_DEFAULT_BP_WIDTH (CP_BEACON_DEFAULT_SCHEDULE_TIME*1000000/4)
+
+
+enum regions_type_t
+{
+ CP_REGION_RESERVED,
+ CP_REGION_SHARED_CSMA,
+ CP_REGION_LOCAL_CSMA,
+ CP_REGION_STAYOUT,
+ CP_REGION_PROTECTED,
+ CP_REGION_BEACON
+};
+
+struct cp_beacon_desc_alloc_t
+{
+ ca_schedule_t *ca_sched;
+ uint next_alloc;
+};
+
+struct cp_beacon_payload_t
+{
+ /** Beacon payload. */
+ u8 beacon_mpdu_payload [8];
+ u8 nbe;
+ /** First bentry. */
+ u8 bmis[119];
+ /** Frame control. */
+ pbproc_rx_beacon_params_t fc;
+};
+
+struct cp_beacon_desc_t
+{
+ /** Not use. */
+ u8 *next;
+ /** Beacon payload. */
+ cp_beacon_payload_t *payload;
+ /** Beacon nid first four bytes. */
+ uint nid_msb;
+};
+
+struct cp_pw_line_t
+{
+ /** Beacon period width. */
+ uint bp_ntb;
+
+ /** pw line time between two zero crosses. */
+ uint pwzc_ntb;
+
+ /** Array containing the previous value of the register */
+ uint date_ntb[2];
+
+ /** Detection done */
+ u8 detection;
+};
+
+struct cp_beacon_common_t
+{
+ /** Estimated date. */
+ uint btse_ntb[4];
+ /** Data common to each beacon containing the BPSTO and the four BTOs. */
+ pbproc_tx_beacon_params_t bto_bpsto;
+ /** Count the number of beacon saw or generated. */
+ uint beacon_nb;
+ /** beacon period estimated in Time Allocation Unit. */
+ uint bp_tau[4];
+ /** last beacon period computed. */
+ uint per_ntb;
+ /** Last central beacon received. */
+ cp_beacon_desc_t *last_beacon;
+ /** MFS use to send the beacons */
+ mfs_tx_t *mfs;
+ /** Last becon period start date. */
+ ca_beacon_period_t last_bp;
+};
+
+struct cp_beacon_t
+{
+ /** station context plane context. */
+ cp_sta_t *sta;
+
+ /** The phy context */
+ phy_t *phy;
+
+ /** PW line properties. */
+ cp_pw_line_t pwl;
+
+ /** Security layer context. */
+ cp_secu_t *secu;
+
+ /** CCo context. */
+ cp_cco_t *cco;
+
+ /** CA layer context. */
+ ca_t *ca;
+
+ /** Mac store context. */
+ mac_store_t *mac_store;
+
+ /** Pbproc context. */
+ pbproc_t *pbproc;
+
+ /** Interface the interface context. */
+ interface_t *interface;
+
+ /** Central beacon data. */
+ cp_beacon_common_t cbeacon;
+
+ /** Proxy beacon data. */
+ //cp_proxy_beaocn_t pbeacon;
+
+ /** Discover beacon data. */
+ cp_beacon_common_t dbeacon;
+
+ /** bentries data. */
+ cp_bentries_data_t bentries_data;
+ /** Hybrid mode. */
+ u8 hm;
+ /** Last sta requested to send a discover beacon. */
+ u8 last_sta;
+ /** Schedule index. */
+ uint schedule_index;
+ /** Pbproc Activated. */
+ bool pbproc_activated;
+ /** Awake value to program the timer in ticks. */
+ uint awake_time;
+ /** API timer context. */
+ hal_timer_t *timer;
+ /** API timer context. */
+ hal_timer_instance_t instance;
+
+ /** user data provide on the function callback for the CP. */
+ void *cp_user_data;
+ /** Function to call to add the event. */
+ cp_beacon_timer_cb_t cp_cb;
+
+ /** Trace system. */
+#if CONFIG_TRACE
+ /** cp_beacon Trace */
+ trace_buffer_t trace;
+#endif /* !CONFIG_TRACE */
+};
+
+#endif /* cp_beacon_inc_beacons_ctx_h */
diff --git a/cesar/cp/beacon/inc/beacons_work.h b/cesar/cp/beacon/inc/beacons_work.h
new file mode 100644
index 0000000000..4055cf383a
--- /dev/null
+++ b/cesar/cp/beacon/inc/beacons_work.h
@@ -0,0 +1,79 @@
+#ifndef cp_beacon_inc_beacons_work_h
+#define cp_beacon_inc_beacons_work_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/inc/beacons_work.h
+ * \brief Private structure to fill a beacon with the bitstream library.
+ * \ingroup cp_beacon
+ *
+ * The following structures are define to be filled before filling a beacon,
+ * the endianess of the structure and the bits fields does not allow allow to
+ * store the data directly in the beacon.
+ */
+
+/** Mask for the fields of three bits. */
+#define CP_BEACON_MASK_3FIELDS 0x7
+
+/** Mask for the fields of two bits. */
+#define CP_BEACON_MASK_2FIELDS 0x3
+
+/** Beacon type. */
+#define CP_BEACON_WORK_MASK_BT(val) (val & CP_BEACON_MASK_3FIELDS)
+
+/** num slots. */
+#define CP_BEACON_WORK_MASK_NUM_SLOTS(val) (val & CP_BEACON_MASK_3FIELDS)
+
+/** Slots id. */
+#define CP_BEACON_WORK_MASK_SLOT_ID(val) (val & CP_BEACON_MASK_3FIELDS)
+
+/** AC Line synchronization. */
+#define CP_BEACON_WORK_MASK_ACLSS(val) (val & CP_BEACON_MASK_3FIELDS)
+
+/** Netwok mode. */
+#define CP_BEACON_WORK_MASK_NM(val) (val & CP_BEACON_MASK_2FIELDS)
+
+/** CCo mode. */
+#define CP_BEACON_WORK_MASK_CCO_CAP(val) (val & CP_BEACON_MASK_2FIELDS)
+
+struct cp_beacon_work_beacon_t
+{
+ /** nid msb. */
+ uint nid_msb;
+ /** nid lsb. */
+ uint nid_lsb;
+ /** hybrid mode. */
+ u8 hm;
+ /** stei. */
+ u8 stei;
+ /** Beacon type. */
+ u8 bt;
+ /** non coordinated network reported */
+ bool ncnr;
+ /** network network power saving mode. */
+ bool npsm;
+ /** Num slots. */
+ uint num_slots;
+ /** slots usage. */
+ u8 slot_usage;
+ /** slot id. */
+ u8 slot_id;
+ /** AC line cycle synchronization status. */
+ u8 aclss;
+ /** handover in progress. */
+ bool hoip;
+ /** rts broadcast flag. */
+ bool rtsbf;
+ /** Network mode. */
+ u8 nm;
+ /** CCo capability. */
+ u8 cco_cap;
+};
+typedef struct cp_beacon_work_beacon_t cp_beacon_work_beacon_t;
+
+#endif /* cp_beacon_inc_beacons_work_h */
diff --git a/cesar/cp/beacon/inc/bentries_structs.h b/cesar/cp/beacon/inc/bentries_structs.h
new file mode 100644
index 0000000000..6db59fb245
--- /dev/null
+++ b/cesar/cp/beacon/inc/bentries_structs.h
@@ -0,0 +1,210 @@
+#ifndef cp_beacon_inc_bentries_structs_h
+#define cp_beacon_inc_bentries_structs_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/inc/bentries_structs.h
+ * \brief Structure definition for the bentries of a Beacon.
+ * \ingroup cp/beacon
+ *
+ * Define all the structures necessary to format a bentry.
+ * Thoses structures does not disallow the use of the lib bitstream.
+ */
+
+#define CP_BENTRY_BYTE_SIZEOF(val) (val>>3)
+
+#define CP_BENTRY_BIT_SIZE_BEHDR 8
+#define CP_BENTRY_BIT_SIZE_BELEN 8
+#define CP_BENTRY_HEADER (CP_BENTRY_BIT_SIZE_BEHDR + CP_BENTRY_BIT_SIZE_BELEN)
+
+// Persistent schedule macros.
+#define CP_BENTRY_BIT_SIZE_PSCD 3
+#define CP_BENTRY_BIT_SIZE_CSCD 3
+#define CP_BENTRY_BIT_SIZE_NS 6
+#define CP_BENTRY_BIT_SIZE_PERSISTENT_SCHEDULE (CP_BENTRY_BIT_SIZE_PSCD \
+ + CP_BENTRY_BIT_SIZE_CSCD \
+ + CP_BENTRY_BIT_SIZE_NS \
+ + 4)
+
+// Non Persistent schedule macro
+#define CP_BENTRY_BIT_SIZE_NON_PERSISTENT_SCHEDULE (CP_BENTRY_BIT_SIZE_NS + 2)
+
+
+// SAI
+#define CP_BENTRY_BIT_SIZE_STPF 1
+#define CP_BENTRY_BIT_SIZE_GLID 7
+#define CP_BENTRY_BIT_SIZE_ST 12
+#define CP_BENTRY_BIT_SIZE_ET 12
+
+// SAI with STPF = 1
+#define CP_BENTRY_BIT_SIZE_SAI_STPF (CP_BENTRY_BIT_SIZE_STPF \
+ + CP_BENTRY_BIT_SIZE_GLID \
+ + CP_BENTRY_BIT_SIZE_ST \
+ + CP_BENTRY_BIT_SIZE_ET)
+// SAI with STPF = 0
+#define CP_BENTRY_BIT_SIZE_SAI (CP_BENTRY_BIT_SIZE_STPF \
+ + CP_BENTRY_BIT_SIZE_GLID \
+ + CP_BENTRY_BIT_SIZE_ET \
+ + 4)
+
+
+// Region bentry
+#define CP_BENTRY_BIT_SIZE_NUM_REG 6
+#define CP_BENTRY_BIT_SIZE_REG_TYPE 4
+#define CP_BENTRY_BIT_SIZE_REG_ET 12
+#define CP_BENTRY_BIT_SIZE_ONE_REGION (CP_BENTRY_BIT_SIZE_REG_TYPE \
+ + CP_BENTRY_BIT_SIZE_REG_ET)
+#define CP_BENTRY_BIT_SIZE_REGION(num_reg) (CP_BENTRY_BIT_SIZE_NUM_REG \
+ + num_reg \
+ + CP_BENTRY_BIT_SIZE_ONE_REGION \
+ + 2)
+
+// MAC address bentry
+#define CP_BENTRY_BIT_SIZE_MAC_ADDRESS (CP_BENTRY_BIT_SIZE_BEHDR \
+ + CP_BENTRY_BIT_SIZE_BELEN \
+ + 48)
+
+
+// Discover bentry
+#define CP_BENTRY_BIT_SIZE_TEI 8
+#define CP_BENTRY_BIT_SIZE_DISCOVER (CP_BENTRY_BIT_SIZE_BEHDR \
+ + CP_BENTRY_BIT_SIZE_BELEN \
+ + CP_BENTRY_BIT_SIZE_TEI )
+
+
+
+#define CP_BENTRY_BIT_SIZE_DIS_UPDATED 1
+#define CP_BENTRY_BIT_SIZE_DIS_CCO_CAP 2
+#define CP_BENTRY_BIT_SIZE_DIS_PROXY_NET_CAP 1
+#define CP_BENTRY_BIT_SIZE_DIS_BACK_CCO_CAP 1
+#define CP_BENTRY_BIT_SIZE_DIS_CCO_STATUS 1
+#define CP_BENTRY_BIT_SIZE_DIS_PCO_STATUS 1
+#define CP_BENTRY_BIT_SIZE_DIS_BACK_CCO_STATUS 1
+#define CP_BENTRY_BIT_SIZE_DIS_NUM_DIS_STA 8
+#define CP_BENTRY_BIT_SIZE_DIS_NUM_DIS_NET 8
+#define CP_BENTRY_BIT_SIZE_DIS_AUTH 1
+#define CP_BENTRY_BIT_SIZE_DIS_USER_APP 1
+
+#define CP_BENTRY_BIT_SIZE_DISCOVER_INFO (CP_BENTRY_BIT_SIZE_DIS_UPDATED \
+ + CP_BENTRY_BIT_SIZE_DIS_CCO_CAP \
+ + CP_BENTRY_BIT_SIZE_DIS_PROXY_NET_CAP \
+ + CP_BENTRY_BIT_SIZE_DIS_BACK_CCO_CAP \
+ + CP_BENTRY_BIT_SIZE_DIS_CCO_STATUS \
+ + CP_BENTRY_BIT_SIZE_DIS_PCO_STATUS \
+ + CP_BENTRY_BIT_SIZE_DIS_BACK_CCO_STATUS \
+ + CP_BENTRY_BIT_SIZE_DIS_NUM_DIS_STA \
+ + CP_BENTRY_BIT_SIZE_DIS_NUM_DIS_NET \
+ + CP_BENTRY_BIT_SIZE_DIS_AUTH \
+ + CP_BENTRY_BIT_SIZE_DIS_USER_APP \
+ + 6)
+
+
+/* mask the reserved bytes and the update bit. */
+#define CP_BENTRY_DISCOVER_UPDATE_MASK(val) (val & 0x03FFFFFE)
+
+/** Beacon perid start timer offset. */
+#define CP_BENTRY_BIT_SIZE_BPSTO 24
+
+
+#define CP_BENTRY_BIT_SIZE_EKC_KCCD 6
+#define CP_BENTRY_BIT_SIZE_EKC_KBC 1
+#define CP_BENTRY_BIT_SIZE_EKC_NEWEKS 4
+#define CP_BENTRY_BIT_SIZE_EKC (CP_BENTRY_BIT_SIZE_EKC_KCCD \
+ + CP_BENTRY_BIT_SIZE_EKC_KBC \
+ + CP_BENTRY_BIT_SIZE_EKC_NEWEKS \
+ + 5)
+
+#define CP_BENTRY_BIT_SIZE_HANDOVER_HCD 6
+#define CP_BENTRY_BIT_SIZE_HANDOVER_NCTEI 8
+#define CP_BENTRY_BIT_SIZE_HANDOVER (CP_BENTRY_BIT_SIZE_HANDOVER_HCD \
+ + CP_BENTRY_BIT_SIZE_HANDOVER_NCTEI \
+ + 2)
+
+#define CP_BENTRY_BIT_SIZE_HM_HMCCD 6
+#define CP_BENTRY_BIT_SIZE_HM_NEWHM 2
+#define CP_BENTRY_BIT_SIZE_HM (CP_BENTRY_BIT_SIZE_HM_HMCCD \
+ + CP_BENTRY_BIT_SIZE_HM_NEWHM)
+
+
+struct cp_bentry_sai_t
+{
+ /** Start Time Present Flag. */
+ bool stpf;
+ /** Global Link Id. */
+ uint glid;
+ /** Start Time. */
+ uint st;
+ /** End Time. */
+ uint et;
+};
+
+struct cp_bentry_persistent_schedule_struct_t
+{
+ uint behdr;
+ uint belen;
+ uint pscd;
+ uint cscd;
+ uint ns;
+};
+
+struct cp_bentry_non_persistent_schedule_struct_t
+{
+ uint behdr;
+ uint belen;
+ uint ns;
+ uint rsvd;
+};
+
+struct cp_bentry_regions_struct_t
+{
+ uint rt;
+ uint ret;
+};
+
+struct cp_bentry_discover_info_struct_t
+{
+ bool updated;
+ uint cco_cap;
+ bool proxy_net_cap;
+ bool backup_cco_cap;
+ bool cco_status;
+ bool pco_status;
+ bool backup_cco_status;
+ uint num_dis_sta;
+ uint num_dis_net;
+ bool authentication;
+ bool status_user_ap_cco;
+};
+
+struct cp_bentry_key_change_struct_t
+{
+ /** key change countdown. */
+ uint kccd;
+ /** key being change, 0 for nek, 1 for payload encryption. */
+ bool kbc;
+ /** the eks. */
+ uint new_eks;
+};
+
+struct cp_bentry_handover_struct_t
+{
+ /** Handover countdown. */
+ uint hcd;
+ /** New CCo TEI. */
+ uint nctei;
+};
+
+struct cp_bentry_hm_struct_t
+{
+ /** Hybrid Mode countdown. */
+ uint hmccd;
+ /** New Hybrid Mode. */
+ uint new_hm;
+};
+
+#endif /* cp_beacon_inc_bentries_structs_h */
diff --git a/cesar/cp/beacon/inc/bentry.h b/cesar/cp/beacon/inc/bentry.h
new file mode 100644
index 0000000000..d8c0cef815
--- /dev/null
+++ b/cesar/cp/beacon/inc/bentry.h
@@ -0,0 +1,379 @@
+#ifndef cp_beacon_inc_bentry_h
+#define cp_beacon_inc_bentry_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/inc/bentry.h
+ * \brief bentry private functions.
+ * \ingroup cp_beacon
+ *
+ */
+
+#include "cp/beacon/beacons.h"
+#include "mac/pbproc/pbproc.h"
+
+#include "cp/beacon/inc/bentries_structs.h"
+#include "cp/beacon/inc/beacons_work.h"
+
+#define CP_BENRTY_MAX_SAI_DATA_VALUE 4095
+#define CP_BENRTY_MAX_SAI_DATA_VALUE_TCK MAC_ATU_TO_TCK(4095)
+#define CP_BENTRY_MAX_SAI_MAX_NS 63
+
+enum cp_bentry_header_t
+{
+ CP_BENTRY_NON_PERSISTENT_SCHEDULE,
+ CP_BENTRY_PERSISTENT_SCHEDULE,
+ CP_BENTRY_REGIONS,
+ CP_BENTRY_MAC_ADDRESS,
+ CP_BENTRY_DISCOVER,
+ CP_BENTRY_DISCOVER_INFO,
+ CP_BENTRY_BEACON_PERIOD_START_OFFSET,
+ CP_BENTRY_ENCRYPTION_KEY_CHANGE,
+ CP_BENTRY_CCO_HANDOVER,
+ CP_BENTRY_BEACON_RELOCATION,
+ CP_BENTRY_AC_LINE_SYNC_COUNTDOWN,
+ CP_BENTRY_CHANGE_NUMSLOTS,
+ CP_BENTRY_CHANGE_HM,
+ CP_BENTRY_CHANGE_SNID,
+ CP_BENTRY_VENDOR=0xFF
+};
+
+enum cp_bentry_regions_type_t
+{
+ CP_BENTRY_REGIONS_RSVD,
+ CP_BENTRY_REGIONS_SHARED_CSMA,
+ CP_BENTRY_REGIONS_LOCAL_CSMA,
+ CP_BENTRY_REGIONS_STAYOUT,
+ CP_BENTRY_REGIONS_PROTECTED,
+ CP_BENTRY_REGIONS_BEACON
+};
+
+struct cp_bentries_data_t
+{
+ /** Non persistent Preview schedule countdown. */
+ u8 pscd;
+ /** Non persistent current schedule countdown. */
+ u8 cscd;
+ /** Key change countdown. */
+ u8 kccd;
+ /** Handover countdown. */
+ u8 hcd;
+ /** Relocation countdown. */
+ u8 rcd;
+ /** AC line countdown. */
+ u8 aclcd;
+ /** Change numslot. */
+ u8 nsccd;
+ /** Change Hibryd mode countdown. */
+ u8 hmccd;
+ /** Change snid countdown. */
+ u8 sccd;
+
+
+ /** New TEI CCo. */
+ u8 nctei;
+ /** New Hybrid Mode. */
+ u8 newHm;
+ /** New SNID. */
+ u8 newSNID;
+ /** Discover info list. */
+ uint discover_info;
+};
+
+/**
+ * Fill the bentry header
+ *
+ * \param bentry_header_addr the bentry address.
+ * \param type the type of bentry.
+ * \param length the bentry length in bytes.
+ *
+ * \return the address to store the rest of the bentry.
+ */
+u8 *
+cp_bentry_header_fill (u8 *bentry_header_addr, uint type, uint length);
+
+/**
+ * Create the non persistent schedule bentry for the beacon period.
+ *
+ * \param ctx the cp_beacon_context.
+ * \param bentry_addr the address to store the data in the beacon payload.
+ * \param sched the ca schedule to fill the next schedule.
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_non_persistent_schedule(cp_beacon_t *ctx, u8 *bentry_addr,
+ cp_beacon_desc_alloc_t *sched);
+
+
+/**
+ * Create the schedules when the STA is UCCo to be correspond to the current
+ * schedule of the CCo.
+ * The schedule provided are non persistent, it is on vailable if the STA is
+ * not associated with the CCo and the CCo is a UCCo.
+ *
+ * \param ctx the cp beacon module context
+ * \param bentry_addr the bentry addr
+ * \return the address of the next bentry.
+ */
+u8 *
+cp_bentry_default_schedule (cp_beacon_t *ctx, u8 *bentry_addr);
+
+/**
+ * Create the schedule bentry for the beacon period.
+ *
+ * \param ctx the cp_beacon_context.
+ * \param bentry_addr the address to store the data in the beacon payload.
+ * \param sched the ca schedule to fill the next schedule.
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_persistent_schedule(cp_beacon_t *ctx, u8 *bentry_addr,
+ cp_beacon_desc_alloc_t *sched);
+
+/**
+ * Create the regions for the beacons.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry_addr the bentry address.
+ */
+u8 *
+cp_bentry_regions (cp_beacon_t *ctx, u8 *bentry_addr);
+
+/**
+ * Store the mac address of the station in the beacon bentry
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry_addr the bentry addr.
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_mac_address(cp_beacon_t *ctx, u8 *bentry_addr);
+
+/**
+ * Store the tei of the next sta which shall send a discover beacon.
+ *
+ * \param ctx the cp_beacon context.
+ * \param bentry_addr the bentry addr
+ * \param tei the sta tei to request a discover beacon.
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_discover(cp_beacon_t *ctx, u8 *bentry_addr, u8 tei);
+
+/**
+ * Store the discover list in the bentry.
+ *
+ * \param ctx the cp_beacon context.
+ * \param bentry_addr the bentry addr
+ * \return the next address to store the next bentry.* \param ctx
+ */
+u8 *
+cp_bentry_discover_info(cp_beacon_t *ctx, u8 *bentry_addr);
+
+/**
+ * BPSTO always present in CSMA only mode and for discover beacons.
+ * This bentry data is stamped by the CA.
+ * The address of the first byte of the BPSTO is stored in bpsto camp of the
+ * structure common.
+ *
+ * \param ctx the cp_beacon context.
+ * \param common common data of all beacons.
+ * \param bentry_addr the bentry addr
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_bpsto (cp_beacon_t *ctx, cp_beacon_common_t *common, u8 *bentry_addr);
+
+/**
+ * Encryption key change.
+ *
+ * \param ctx the cp_beacon context.
+ * \param bentry_addr the bentry addr
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_encryption_key_change (cp_beacon_t *ctx, u8 *bentry_addr);
+
+/**
+ * Handover. Add a the bentry when the CCo will change.
+ *
+ * \param ctx the cp_beacon context.
+ * \param bentry_addr the bentry addr
+ * \param new_cco_tei the new cco tei.
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_handover(cp_beacon_t *ctx, u8 *bentry_addr, u8 new_cco_tei);
+
+/**
+ * Chnage hybrid mode
+ *
+ * \param ctx the cp_beacon context.
+ * \param bentry_addr the bentry addr
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_change_hm (cp_beacon_t *ctx, u8 *bentry_addr);
+
+/**
+ * Chnage The snid.
+ *
+ * \param ctx the cp_beacon context.
+ * \param bentry_addr the bentry addr
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_change_snid (cp_beacon_t *ctx, u8 *bentry_addr);
+
+/**
+ * Process the persistent schedule bentry
+ *
+ * \param ctx the cp_beacon context.
+ * \param bentry the bentry to process.
+ * \param sched the current schedule to program
+ */
+u8 *
+cp_bentry_persistent_schedule_process (cp_beacon_t *ctx, u8 *bentry,
+ cp_beacon_desc_alloc_t *sched);
+
+/**
+ * Process the non persistent schedule bentry
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ * \param sched the shedule to program
+ */
+u8 *
+cp_bentry_non_persistent_schedule_process (cp_beacon_t *ctx, u8 *bentry,
+ cp_beacon_desc_alloc_t *sched);
+
+/**
+ * Process a bentry regions.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process, the bentry payload, it does not contain the
+ * bentry header and the bentry length.
+ */
+u8 *
+cp_bentry_regions_process (cp_beacon_t *ctx, u8 *bentry);
+
+/**
+ * Process a mac address bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process only the payload, the bentry header and the
+ * length are not provided.
+ * \param mac the mac address buffer to copy it into
+ */
+u8 *
+cp_bentry_mac_address_process (cp_beacon_t *ctx, u8 *bentry, mac_t *mac);
+
+/**
+ * Process a discover bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ * \param central_beacon the central beacon received.
+ */
+u8 *
+cp_bentry_discover_process (cp_beacon_t *ctx, u8 *bentry,
+ cp_beacon_desc_t *central_beacon);
+
+/**
+ * Process a discover info bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_discover_info_process (cp_beacon_t *ctx, u8 *bentry);
+
+/**
+ * Process a beacon period start offset bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process, the bentry payload, it does not contain the
+ * bentry header and the bentry length.
+ * \param bpsto the beacon period start time offset to be filled.
+ */
+u8 *
+cp_bentry_bpsto_process (cp_beacon_t *ctx, u8 *bentry, uint *bpsto);
+
+/**
+ * Process the encryption key change bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_encryption_key_change_process (cp_beacon_t *ctx, u8 *bentry);
+
+/**
+ * Process the Handover in progress bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_handover_process (cp_beacon_t *ctx, u8 *bentry);
+
+/**
+ * Process the beacon relocation bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_beacon_relocation_process (cp_beacon_t *ctx, u8 *bentry);
+
+/**
+ * Process the AC Line synchronization bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_ac_line_sync_countdown_process (cp_beacon_t *ctx, u8 *bentry);
+
+/**
+ * Process the bentry change num slots.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_change_num_slots_process (cp_beacon_t *ctx, u8 *bentry);
+
+/**
+ * Process the change Hybrid Mode bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_change_hm_process (cp_beacon_t *ctx, u8 *bentry);
+
+/**
+ * Process the change snid bentry.
+ *
+ *\param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_change_snid_process (cp_beacon_t *ctx, u8 *bentry);
+
+/**
+ * Proces the vendor specific bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_vendor_specific_process (cp_beacon_t *ctx, u8 *bentry);
+
+#endif /* cp_beacon_inc_bentry_h */
diff --git a/cesar/cp/beacon/inc/ntb_clock_sync.h b/cesar/cp/beacon/inc/ntb_clock_sync.h
new file mode 100755
index 0000000000..326374fae6
--- /dev/null
+++ b/cesar/cp/beacon/inc/ntb_clock_sync.h
@@ -0,0 +1,167 @@
+#ifndef cp_beacon_inc_ntb_clock_sync_h
+#define cp_beacon_inc_ntb_clock_sync_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/inc/ntb_clock_sync.h
+ * \brief 25Mhz clock management and synchronization functions.
+ * \ingroup cp_beacon
+ */
+
+#include "hal/phy/phy.h" /* HAL-PHY functions dedicated to NTB clock management (access to dedicated PRATIC registers) */
+#include "mac/common/config.h"
+
+#undef MANUFACTURER_TEST /* undef it for operational mode! */
+
+// ntb Constants
+
+#define CCO 0
+#ifdef MANUFACTURER_TEST
+#define STA1 1
+#define STA2 2
+#define smax 3 // count of stations (including the CCo)
+#else
+#define smax 2 // count of stations (including the CCo)
+#endif
+
+#define NTB_DEFAULT_OFFSET 0
+#define NTB_DEFAULT_NUMERATOR 1000000
+#define NTB_DEFAULT_DIVISOR 3000000
+
+#define PHY_Clk_theoric 75000000 // ideal PHY clock frequency in Hz
+#define STA_Clk_theoric 25000000 // ideal STA clock frequency in Hz (1/3 of PHY clock frequency)
+
+// ntb Types
+
+typedef enum
+{
+ prev, // previous
+ curr, // current
+ next, // next
+ e_cnt
+} e_ntb_histo;
+
+typedef struct {
+
+ unsigned long k; // k Factor value for "w" weighting constant (w = 1 / 2^k)
+ unsigned long beacon[e_cnt]; // beacon index
+ unsigned long bts_ticks[e_cnt]; // BTS (Beacon Time Stamp) = CCo NTB date in entire ticks
+ double sta_ntb_date_decticks[e_cnt]; // LTmr = STAn NTB date in decimal ticks
+ unsigned long sta_ntb_date_ticks[e_cnt]; // LTmr = STAn NTB date in entire ticks
+ double sta_phy_date_decticks[e_cnt]; // PHY LTmr = STA1 25Mhz PHY date (not corrected) in decimal ticks
+ unsigned long sta_phy_date_ticks[e_cnt]; // PHY LTmr = STA1 25Mhz PHY date (not corrected) in entire ticks
+ double sta_hpav_frequ_error[e_cnt]; // FreqError
+ signed long long sta_hpav_offset[e_cnt]; // Offset calculated by formula from paragraph 5.5 of HP_AV specification
+ signed long long sta_offset[e_cnt]; // Offset of NTB STA clock relative to CCo clock
+ signed long sta_deriv_from_cco_ntb_ticks[e_cnt]; // STAn NTB date derive from CCo NTB in entire ticks
+ signed long sta_relative_deriv_from_cco_ntb_ticks[e_cnt]; // STA NTB date relative derive from CCo NTB in entire ticks
+ unsigned long sta_numerator[e_cnt]; // STAn current numerator for PHY_Clk divisor
+ double sta_clk_frequ[e_cnt]; // STAn current STA_Clk frenquency in Hz
+ unsigned long sta_predict_next_bts_ticks[e_cnt]; // Predicted value of CCo NTB date [next BTS] at next beacon (in entire ticks)
+ unsigned long sta_predict_next_sta_ticks[e_cnt]; // Predicted value of STAn NTB date at next beacon if no correction (in entire ticks)
+ signed long sta_predict_error_of_next_sta_ticks[e_cnt]; // Predicted error of STAn NTB date at next beacon (compared to next BTS value) if no correction (in entire ticks)
+ double sta_clk_frequ_should_be[e_cnt]; // STAn STA clock should be adjusted to (in Hz)
+ double sta_decimal_numerator_should_be[e_cnt]; // For max. derive of 25 ticks (25 ticks = 1 ppm @ 25Mhz), STAn STA/PHY clock ratio should be adjusted to (decimal numerator)
+ unsigned long sta_integer_numerator_should_be[e_cnt]; // STAn STA/PHY clock ratio should be adjusted to (pure integer numerator)
+ double sta_clk_frequ_will_be[e_cnt]; // STAn STA clock will be adjusted to (in Hz)
+ double sta_ntb_estimated_decticks[e_cnt]; // NTB date estimation in decimal ticks
+ unsigned long sta_ntb_estimated_ticks[e_cnt]; // NTB date estimation in entire ticks
+ double sta_clk_frequ_sync_ratio[e_cnt];
+ //double sta_average_deriv_from_cco_ntb_ticks[e_cnt];
+ unsigned long sta_count_samples_for_average_deriv[e_cnt];
+
+} ntb_histo_t;
+
+typedef struct {
+
+ phy_t * ntb_phy_ctx;
+ mac_config_t * ntb_mac_config;
+
+ ntb_histo_t ntb_histo;
+
+ unsigned long long beacon_count;
+
+#ifdef MANUFACTURER_TEST
+
+#define beacon_period_on_50hz_pwl 40000 // in microseconds
+#define beacon_period_on_60hz_pwl 33333 // in microseconds
+#define beacon_period beacon_period_on_50hz_pwl // in microseconds
+
+#define simu_duration (60*15) // in seconds
+#define count_of_beacons ((simu_duration * 1000000) / beacon_period)
+
+double STA_Clk[smax]; // NTB STA clock frequency in Hz (CCo, STA1, ..., STAn)
+double beacon_period_decimal_ticks[smax];
+unsigned long beacon_period_ticks[smax];
+
+unsigned long PHY_Clk[smax]; // PHY clock frequency in Hz (CCo, STA1, ..., STAn)
+unsigned long numerator[smax]; // numerator for PHY clock division factor (CCo, STA1, ..., STAn)
+unsigned long divisor[smax]; // divisor for PHY clock division factor (CCo, STA1, ..., STAn)
+
+unsigned long current_sta;
+unsigned long beacon[count_of_beacons]; // beacon index
+signed long sta_cco_offset_ticks[smax-1];
+double cco_ntb_date_decticks[smax-1][count_of_beacons]; // CCo NTB date in decimal ticks
+unsigned long bts_ticks[smax-1][count_of_beacons]; // BTS (Beacon Time Stamp) = CCo NTB date in entire ticks
+double sta_ntb_date_decticks[smax-1][count_of_beacons]; // STAn NTB date in decimal ticks
+unsigned long sta_ntb_date_ticks[smax-1][count_of_beacons]; // STAn NTB date in entire ticks
+double sta_phy_date_decticks[smax-1][count_of_beacons]; // PHY LTmr = STAn 25Mhz PHY date (not corrected) in decimal ticks
+unsigned long sta_phy_date_ticks[smax-1][count_of_beacons]; // PHY LTmr = STAn 25Mhz PHY date (not corrected) in entire ticks
+signed long sta_deriv_from_cco_ntb_ticks[smax-1][count_of_beacons]; // STAn NTB date derive from CCo NTB in entire ticks
+signed long sta_relative_deriv_from_cco_ntb_ticks[smax-1][count_of_beacons]; // STAn NTB date relative derive from CCo NTB in entire ticks
+unsigned long sta_numerator[smax-1][count_of_beacons]; // STAn current numerator for PHY_Clk divisor
+double sta_clk_frequ[smax-1][count_of_beacons]; // STAn current STA_Clk frenquency in Hz
+unsigned long sta_predict_next_bts_ticks[smax-1][count_of_beacons]; // Predicted value of CCo NTB date [next BTS] at next beacon (in entire ticks)
+unsigned long sta_predict_next_sta_ticks[smax-1][count_of_beacons]; // Predicted value of STAn NTB date at next beacon if no correction (in entire ticks)
+signed long sta_predict_error_of_next_sta_ticks[smax-1][count_of_beacons]; // Predicted error of STAn NTB date at next beacon (compared to next BTS value) if no correction (in entire ticks)
+double sta_clk_frequ_should_be[smax-1][count_of_beacons]; // STAn STA clock should be adjusted to (in Hz)
+double sta_decimal_numerator_should_be[smax-1][count_of_beacons]; // For max. derive of 25 ticks (25 ticks = 1 ppm @ 25Mhz), STAn STA/PHY clock ratio should be adjusted to (decimal numerator)
+unsigned long sta_integer_numerator_should_be[smax-1][count_of_beacons]; // STAn STA/PHY clock ratio should be adjusted to (pure integer numerator)
+double sta_clk_frequ_will_be[smax-1][count_of_beacons]; // STAn STA clock will be adjusted to (in Hz)
+double sta_clk_frequ_sync_ratio[smax-1][count_of_beacons];
+#endif
+
+} ntb_t; // ntb context data structure
+
+BEGIN_DECLS
+
+// ntb API functions
+
+/*
+ * Set or update NTB offset in the MAC Config.
+ * \param ntb_ctx, pointer to ntb context
+ * \param offset, offset between NTB date (CCo date) and NTB_STA date (station date)
+ */
+void ntb_update_offset_in_mac_config(ntb_t *ntb_ctx, signed long offset);
+
+/*
+ * NTB clock management module initialisation.
+ * \param phy_ctx, pointer to phy context
+ * \param mac_config, pointer to mac config
+ * \return pointer to ntb_t ntb context data structure being allocated
+ */
+ntb_t * ntb_init(phy_t *phy_ctx, mac_config_t *mac_config);
+
+/*
+ * Synchronize local STA clock by adjusting its clock divisor as needed
+ * depending on
+ *
+ * - current beacon timestamp (BTS),
+ * - SYS-base local receive time of current beacon (SYS LTmr, based on 25 Mhz local clock frequency not adjusted onto CCo clock frequency),
+ * - STA-base local receive time of current beacon (STA LTmr, based on 25 Mhz local clock frequency adjusted onto CCo clock frequency).
+ *
+ * \param ntb_ctx, pointer to ntb context
+ * \param beacon_bts, beacon time stamp
+ * \param beacon_sys_ltmr, SYS local time captured when receiving beacon
+ * \param beacon_sta_ltmr, STA local time captured when receiving beacon
+ */
+void ntb_clk_sync(ntb_t *ntb_ctx, unsigned long beacon_bts, unsigned long beacon_sys_ltmr, unsigned long beacon_sta_ltmr);
+
+END_DECLS
+
+#endif /* cp_beacon_inc_ntb_clock_sync_h */
diff --git a/cesar/cp/beacon/inc/trace.h b/cesar/cp/beacon/inc/trace.h
new file mode 100644
index 0000000000..3e56b9284d
--- /dev/null
+++ b/cesar/cp/beacon/inc/trace.h
@@ -0,0 +1,74 @@
+#ifndef cp_beacon_inc_trace_h
+#define cp_beacon_inc_trace_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/inc/trace.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#include "lib/trace.h"
+
+/** Shortcut for tracing */
+#define CP_BEACON_TRACE(id, args...) \
+ TRACE_FAST_SHORT (CP_BEACON_TRACE_, &ctx->trace, id, ## args)
+
+#if CONFIG_TRACE
+
+enum
+{
+ CP_BEACON_TRACE_INIT,
+ CP_BEACON_TRACE_UNINIT,
+ CP_BEACON_TRACE_FREQ,
+ CP_BEACON_TRACE_ESTIMATION,
+ CP_BEACON_TRACE_DEFAULT_SCHED,
+ CP_BEACON_TRACE_PWL_PER,
+ CP_BEACON_TRACE_BEACON_PROCESS,
+ CP_BEACON_TRACE_SEND_BEACON,
+ CP_BEACON_TRACE_UPDATE_SCHED,
+ CP_BEACON_TRACE_TIMER_PRGM,
+ CP_BEACON_TRACE_BEACON_SCHED,
+};
+
+BEGIN_DECLS
+
+/**
+ * Initialize the trace buffer
+ * \param ctx the cl context
+ */
+void
+cp_beacon_trace_init (cp_beacon_t *ctx);
+
+/**
+ * Uninitialize the trace buffer
+ * \param ctx the cl context.
+ */
+void
+cp_beacon_trace_uninit(cp_beacon_t *ctx);
+
+/**
+ * Print the trace
+ * \param ctx the cl context.
+ */
+void
+cp_beacon_trace_print (cp_beacon_t *ctx);
+
+END_DECLS
+
+#else /* !CONFIG_TRACE */
+
+#define cp_beacon_trace_init(ctx) ((void) 0)
+#define cp_beacon_trace_uninit(ctx) ((void) 0)
+#define cp_beacon_trace_print(ctx) ((void) 0)
+
+#endif /* CONFIG_TRACE */
+
+#endif /* cp_beacon_inc_trace_h */
diff --git a/cesar/cp/beacon/src/beacon.c b/cesar/cp/beacon/src/beacon.c
new file mode 100644
index 0000000000..95ead131b3
--- /dev/null
+++ b/cesar/cp/beacon/src/beacon.c
@@ -0,0 +1,185 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/src/beacon.c
+ * \brief
+ * \ingroup cp_beacon
+ */
+
+#include "common/std.h"
+#include "cp/beacon/beacon.h"
+
+static central_beacon_stats_t central_beacon_stats;
+static unsigned int handover_countdown, relocation_countdown;
+static mfs_tx_t *mfs_tx_discover_p = NULL;
+static mfs_tx_t *mfs_tx_central_p = NULL;
+
+extern mac_store_t *m_mac_store_ctx;
+extern pbproc_t *m_pbproc_ctx;
+
+// variables used for test purpose only
+#define BEACON_PERIOD 40000
+int last_beacon = 0;
+
+void
+beacon_init(void)
+{
+ bool added;
+
+ dbg_assert(m_mac_store_ctx);
+
+ central_beacon_stats.nbp = 0;
+ central_beacon_stats.nmb = 0;
+ handover_countdown = 0;
+ relocation_countdown = 0;
+ // we create an mfs for the tx discover beacon
+ mfs_tx_discover_p = mac_store_mfs_add_tx (m_mac_store_ctx,
+ true,
+ false,
+ MAC_LID_DISCOVER,
+ 0xFF,
+ &added
+ );
+ dbg_assert(added);
+ mfs_tx_discover_p->common.ats = false;
+ mfs_tx_discover_p->cfp = false;// TODO this is function of CSMA only mode
+ mfs_tx_discover_p->cap = 3;
+ mfs_tx_discover_p->beacon = true;
+ // we create an mfs for the tx central beacon
+ mfs_tx_central_p = mac_store_mfs_add_tx (m_mac_store_ctx,
+ true,
+ false,
+ MAC_LID_SPC_CENTRAL,
+ 0xFF,
+ &added
+ );
+ dbg_assert(added);
+ mfs_tx_discover_p->common.ats = false;
+ mfs_tx_discover_p->cfp = false;// TODO this is function of CSMA only mode
+ mfs_tx_discover_p->cap = 3;
+ mfs_tx_discover_p->beacon = true;
+
+ // TODO programmer les it et call-back
+}
+
+void
+beacon_create_schedule_for_csma(void)
+{
+ // this function will create a schedule for test purpose
+
+}
+
+void
+beacon_now(void)
+{
+ central_beacon_stats.nbp ++;
+ if(handover_countdown)
+ {
+ handover_countdown--;
+ if( ! handover_countdown) cp_station_add_event(HANDOVER_DONE, NULL);
+ }
+ if(relocation_countdown)
+ {
+ relocation_countdown--;
+ if( ! relocation_countdown)
+ // que faire, que faire ???
+ // TODO
+ ;
+ }
+}
+
+void
+beacon_received(void)
+{
+ cp_station_add_event(BEACON_DETECTED, NULL);
+ //station_add_avln(nid_t nid, snid_t snid)
+
+
+ beacon_now();
+}
+
+void
+beacon_send_common_part(beacon_t *beacon)
+{
+ dbg_assert(beacon);
+
+ beacon->nid = cp_station_get_nid();
+ beacon->hm = 0; // TODO mettre une vrai valeur
+ beacon->stei = cp_station_get_tei(NULL);
+ beacon->bt = DISCOVER_BEACON;
+ beacon->ncnr = 0; // TODO mettre une vrai valeur
+ beacon->npsm = 0;
+ beacon->num_slots = 0;
+ beacon->slot_usage = 1;
+ beacon->slot_id = 0;
+ beacon->aclss = 0;
+ beacon->hoip = 0;
+ beacon->rtsbf = 0;
+ beacon->nm = 0x2; // this is CSMA only mode
+ beacon->cco_cap = cp_station_get_cco_capa();
+
+}
+
+void
+beacon_send_discover(void)
+{
+ /*
+ beacon_t *beacon_p;
+ u8 *nbe_p; // number of beacon entry
+ bentry_t *bentry_p;
+ u8 *p;
+ pb_beacon_t *pb_beacon_p;
+ pbproc_tx_beacon_params_t params;
+ uint i;
+
+ //printf("%s\n", __FUNCTION__);
+
+ dbg_assert(m_mac_store_ctx);
+ dbg_assert(m_pbproc_ctx);
+ dbg_assert(mfs_tx_discover_p);
+
+ // create the beacon payload
+ pb_beacon_p = (pb_beacon_t *) blk_alloc_desc();
+
+ beacon_p = (beacon_t *) pb_beacon_p->data;
+
+ nbe_p = &beacon_p->bmi[0]; // number of beacon entry
+ bentry_p = (bentry_t*) &beacon_p->bmi[1];
+
+ beacon_send_common_part(beacon_p);
+ *nbe_p = 0;
+ // set the bentries specific to the discover beacon (table 4-95)
+ // region bentry 4.4.3.15.4.3
+ // TODO
+ // MAC address 4.4.3.15.4.4
+ bentry_p->behdr = CP_BENTRY_MAC_ADDRESS;
+ bentry_p->belen = 6;
+ cp_station_get_mac_address((mac_address_t *)&bentry_p->bentry);
+ (*nbe_p) ++;
+ p = (char *)bentry_p;
+ p += bentry_p->belen + 2;
+ bentry_p = (bentry_t *) p;
+ // Discovered Info 4.4.3.15.4.6
+ // TODO
+ // 4.4.3.15.4.7 Beacon Period Start Time Offset
+ // TODO
+ // To be continued...
+
+ // set the beacon parameters
+ params.bpsto = NULL;
+ for(i=0 ; i<COUNT(params.bto) ; i++)
+ params.bto[i] = 0;
+ // and now, send the beacon
+ pbproc_mfs_beacon_prepare ( m_pbproc_ctx,
+ mfs_tx_discover_p, //mfs corresponding special MFS
+ 0, // beacon_period_start_date
+ pb_beacon_p, // beacon payload
+ &params);
+*/
+
+}
diff --git a/cesar/cp/beacon/src/beacons.c b/cesar/cp/beacon/src/beacons.c
new file mode 100644
index 0000000000..e8e802a3e7
--- /dev/null
+++ b/cesar/cp/beacon/src/beacons.c
@@ -0,0 +1,1047 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/src/beacons.c
+ * \brief CP beacon modules
+ * \ingroup cp_beacon
+ *
+ */
+#include "common/std.h"
+
+#include "lib/bitstream.h"
+#include "lib/read_word.h"
+
+#include "cp/beacon/beacons.h"
+#include "hal/phy/phy.h"
+
+#include "mac/ca/ca.h"
+#include "mac/common/ntb.h"
+#include "mac/common/timings.h"
+
+#include "hal/timer/timer.h"
+
+#include "cp/beacon/inc/beacons.h"
+#include "cp/beacon/inc/bentry.h"
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/inc/trace.h"
+#include "cp/beacon/inc/beacons_work.h"
+
+#define CP_BEACON_WORD_SIZE 32
+
+static cp_beacon_t cp_beacon_global;
+
+/**
+ * Init the beacons module.
+ *
+ * \param interface the inteface context.
+ * \param phy the phy context.
+ * \param sta the station context.
+ * \param secu the control plane security layer context.
+ * \param ca the Channel Access context.
+ * \param mac_store mac_store.
+ * \param pbproc pbproc.
+ * \param cco the cco context.
+ * \param timer the hal timer context to program the instance.
+ * \param user_data the CP user_data to be provided with the call back.
+ * \param cb the function to call back when the module is awake by the
+ * timer.
+ * \return the beacon context.
+ */
+cp_beacon_t *
+cp_beacon_init(interface_t *interface, phy_t *phy, cp_sta_t *sta,
+ cp_secu_t *secu, ca_t *ca,
+ pbproc_t *pbproc, mac_store_t *mac_store, cp_cco_t *cco,
+ hal_timer_t *timer, void *user_data, cp_beacon_timer_cb_t cb)
+{
+ cp_beacon_t *ctx;
+
+ dbg_assert(interface);
+ dbg_assert(phy);
+ dbg_assert(sta);
+
+ /* Laranjeiro 03/04/2008
+ * removed the test on secu, shall not be use actually in the beacons
+ * until the new version of the CP is not ready.
+ */
+ //dbg_assert(secu);
+ dbg_assert(ca);
+ dbg_assert(mac_store);
+ dbg_assert(pbproc);
+ dbg_assert(cco);
+ dbg_assert(timer);
+ dbg_assert(cb);
+
+
+ ctx = &cp_beacon_global;
+ ctx->interface = interface;
+ ctx->phy = phy;
+ ctx->sta = sta;
+ ctx->secu = secu;
+ ctx->ca = ca;
+ ctx->mac_store = mac_store;
+ ctx->pbproc = pbproc;
+ ctx->cco = cco;
+
+ ctx->cp_user_data = user_data;
+ ctx->cp_cb = cb;
+
+ // Add trace
+ cp_beacon_trace_init(ctx);
+ CP_BEACON_TRACE (INIT, mac_ntb());
+
+ // init all the context.
+ ctx->schedule_index = 0;
+ ctx->hm = 0x2;
+
+ // verify the AC line frequence.
+ ctx->pwl.date_ntb[0] = 0;
+ ctx->pwl.date_ntb[1] = 0;
+ ctx->pwl.detection = 0;
+ ctx->pwl.bp_ntb = 0;
+ ctx->pwl.pwzc_ntb = 0;
+
+ // Initialise the instance timer.
+ ctx->timer = timer;
+ hal_timer_instance_init (ctx->timer, &ctx->instance, ctx,
+ (hal_timer_instance_cb_t) cp_beacon_timer_it);
+
+ // init cbeacon
+ cp_beacon_init_beacons (ctx, &ctx->cbeacon);
+ // init dbeacon
+ cp_beacon_init_beacons (ctx, &ctx->dbeacon);
+
+ return ctx;
+}
+
+/**
+ * Uninit the beacon module
+ *
+ * \param ctx the beacon module.
+ */
+void
+cp_beacon_uninit(cp_beacon_t *ctx)
+{
+ dbg_assert(ctx);
+
+ cp_beacon_uninit_beacons (ctx, &ctx->cbeacon);
+ cp_beacon_uninit_beacons (ctx, &ctx->dbeacon);
+
+ // Cancel the timer instance.
+ if (hal_timer_instance_get_status (&ctx->instance))
+ hal_timer_instance_cancel (ctx->timer, &ctx->instance);
+
+ CP_BEACON_TRACE (UNINIT, mac_ntb());
+ cp_beacon_trace_uninit(ctx);
+}
+
+/**
+ * Initialize the sub module for the discover, central and proxy beacons.
+ * The beacon_ctx corresponds to the each part contained in the ctx.
+ *
+ * \param ctx the becon module context.
+ * \param beacon_ctx the central, discover or proxy context.
+ */
+void
+cp_beacon_init_beacons (cp_beacon_t *ctx, cp_beacon_common_t *beacon_ctx)
+{
+ uint i;
+
+ dbg_assert (ctx);
+ dbg_assert (beacon_ctx);
+
+ beacon_ctx->mfs = NULL;
+ beacon_ctx->bto_bpsto.bpsto = 0;
+ beacon_ctx->beacon_nb = 0;
+ beacon_ctx->per_ntb = 0;
+ beacon_ctx->last_beacon = NULL;
+ beacon_ctx->mfs = NULL;
+ beacon_ctx->last_bp.start_date = 0;
+ beacon_ctx->last_bp.schedule_index = 0;
+
+ // initialize the central beacon data.
+ ctx->cbeacon.beacon_nb = 0;
+ for (i = 0; i < 4; i++)
+ {
+ beacon_ctx->btse_ntb[i] = 0;
+ beacon_ctx->bto_bpsto.bto[i] = 0;
+ beacon_ctx->bp_tau[i] = 0;
+ }
+}
+
+/**
+ * Uninit the sub beacon modules.
+ *
+ * \param ctx the beacon module context
+ * \param beacon_ctx the beacon context to uninit.
+ */
+void
+cp_beacon_uninit_beacons (cp_beacon_t *ctx, cp_beacon_common_t *beacon_ctx)
+{
+ dbg_assert (ctx);
+ dbg_assert (beacon_ctx);
+
+ if (beacon_ctx->last_beacon != NULL)
+ {
+ blk_release_desc ((blk_t *) beacon_ctx->last_beacon);
+ }
+
+
+ if (beacon_ctx->mfs)
+ {
+ dbg_assert (ctx->mac_store);
+ mac_store_mfs_remove (ctx->mac_store, (mfs_t *)
+ beacon_ctx->mfs);
+
+ // Remove the MFS from the CA
+ ca_mfs_remove (ctx->ca, beacon_ctx->mfs);
+
+ // Release the mfs.
+ blk_release (beacon_ctx->mfs);
+ }
+}
+
+/**
+ * Create the default schedule for the CA to be able to listen the PWL on the
+ * POND procedure.
+ * This will create four beacon periods of a duration corresponding to
+ * CP_BEACON_DEFAULT_SCHEDULE_TIME / 4.
+ *
+ * \param ctx the cp beacon context
+ */
+void
+cp_beacon_create_default_schedule (cp_beacon_t *ctx)
+{
+ ca_beacon_period_t bp[3];
+ ca_schedule_t *sched;
+ uint i;
+
+ dbg_assert (ctx);
+ dbg_assert (ctx->ca);
+ dbg_assert (ctx->pbproc);
+ dbg_assert (ctx->cco);
+
+ /**
+ * When the STA get out off the POND sequence this function can be called
+ * once again even if a discover beacon has been received. To desallow the
+ * STA to modify the correct schedules for the CA, it shall verify if a
+ * beacon as been received. If its true, it return from this function.
+ * Otherwise no beacon had been received.
+ * This comment is only correct if the STA is not a CCo, otherwise, this
+ * function shall be called each time a discover beacon is being prepared
+ * to be sent.
+ */
+ if (ctx->cbeacon.last_beacon
+ || (ctx->dbeacon.last_beacon && cp_cco_get_cco_status(ctx->cco)))
+ {
+ return;
+ }
+
+
+ // Get the schedule 0
+ if (ctx->pbproc_activated == false)
+ {
+ sched = ca_alloc_get_schedule (ctx->ca, 0);
+ sched->coexistence_mode = ctx->hm;
+ sched->nek_switch = 0; //TODO
+ sched->allocations_nb = 1;
+ sched->allocations[0].end_offset_tck = 0xFFFFFF;
+ sched->allocations[0].glid = 0xFF;
+
+ ctx->schedule_index ++;
+ }
+
+ bp[0].start_date = mac_ntb ();
+ bp[0].schedule_index = 0;
+ for (i = 1; i < 3; i++)
+ {
+ bp[i].start_date = bp[i-1].start_date + 0xFFFFFF;
+ bp[i].schedule_index = 0;
+ }
+
+ // add the schedule to the CA.
+ ca_alloc_update_beacon_periods (ctx->ca, bp, 3);
+
+ // Program the timer to be awake
+ ctx->awake_time = 3 * CP_BEACON_DEFAULT_BP_WIDTH;
+
+ CP_BEACON_TRACE (DEFAULT_SCHED, mac_ntb());
+}
+
+/**
+ * Compute the AC line frequency from the PRATIC register
+ *
+ * \param ctx beacons module context
+ */
+void
+cp_beacon_acl_frequency_detection (cp_beacon_t *ctx)
+{
+ uint bp_width_ntb;
+
+ dbg_assert (ctx);
+ dbg_assert (ctx->phy);
+
+ if (ctx->pwl.detection == 0)
+ {
+ ctx->pwl.date_ntb[1] = phy_clock_get_zero_cross_captured_date(ctx->phy);
+ ctx->pwl.detection ++;
+ }
+ else if (ctx->pwl.detection == 1)
+ {
+ ctx->pwl.date_ntb[0] = phy_clock_get_zero_cross_captured_date(ctx->phy);
+ ctx->pwl.detection ++;
+ }
+
+ if (ctx->pwl.detection == 2)
+ {
+ // compute the becon period.
+ bp_width_ntb = (ctx->pwl.date_ntb[0] - ctx->pwl.date_ntb[1] + 5000) % 250000;
+
+ if (bp_width_ntb > 6000)
+ {
+ ctx->pwl.bp_ntb = 833333;
+ ctx->pwl.pwzc_ntb = 208333;
+ ctx->awake_time = 425000; // 17 ms.
+ }
+ else
+ {
+ ctx->pwl.bp_ntb = 1000000;
+ ctx->pwl.pwzc_ntb = 250000;
+ ctx->awake_time = 525000; // 21 ms.
+ }
+
+ CP_BEACON_TRACE (FREQ, mac_ntb(), ctx->pwl.bp_ntb, ctx->pwl.date_ntb[1],
+ ctx->pwl.date_ntb[0]);
+ }
+}
+
+/**
+ * Compute the next BTS, the four next BTOs and the BP in Time Allocation
+ * Unit to provide the data to the generated beacon.
+ *
+ * \param ctx the beacon context.
+ * \param common the common part of the beacons structure.
+ */
+void
+cp_beacon_estimate_bts_bto_bp (cp_beacon_t *ctx, cp_beacon_common_t *common)
+{
+ uint i;
+ uint btse;
+ uint per;
+
+ dbg_assert (ctx);
+ dbg_assert (common);
+
+ if (common->beacon_nb == 0)
+ {
+ for (i = 0; i < 4; i++)
+ {
+ common->btse_ntb[i] = mac_ntb() + //ctx->pwl.date_ntb[0] +
+ i*ctx->pwl.bp_ntb;
+ common->bp_tau[i] = MAC_TCK_TO_ATU(ctx->pwl.bp_ntb);
+ }
+
+ common->per_ntb = cp_beacon_pwl_period(ctx);
+ return;
+ }
+
+ per = cp_beacon_pwl_period (ctx);
+ per = (uint) ((int)common->per_ntb + (((int)per - (int)common->per_ntb) >>
+ CP_BEACON_K));
+
+ btse = (uint) ((int)common->btse_ntb[3] + (int)per +
+ (((int)ctx->pwl.date_ntb[0] - ((int)common->btse_ntb[4]
+ + (int)per)) >> CP_BEACON_K));
+
+ for (i = 0; i < 3; i++)
+ {
+ common->btse_ntb[i] = common->btse_ntb[i+1];
+ common->bto_bpsto.bto[i] = common->bto_bpsto.bto[i+1];
+ common->bp_tau[i] = common->bp_tau[i+1];
+ }
+
+ common->per_ntb = per;
+
+ common->btse_ntb[3] += per;
+ common->bp_tau[3] = MAC_TCK_TO_ATU(per);
+ common->bto_bpsto.bto[4] = per - ctx->pwl.bp_ntb;
+
+ CP_BEACON_TRACE (ESTIMATION, mac_ntb(), btse, per, common->bto_bpsto.bto[0],
+ common->bto_bpsto.bto[1], common->bto_bpsto.bto[2],
+ common->bto_bpsto.bto[3]);
+}
+
+/**
+ * Compute the beacon period using the beacon period thereotic calculated
+ * during the pw frequency detection.
+ *
+ * \param ctx the beacon period context.
+ */
+uint
+cp_beacon_pwl_period (cp_beacon_t *ctx)
+{
+ uint per_ntb;
+ uint diff_ntb;
+
+ dbg_assert (ctx);
+ dbg_assert (ctx->pwl.bp_ntb);
+
+ ctx->pwl.date_ntb[1] = ctx->pwl.date_ntb[0];
+ ctx->pwl.date_ntb[0] = phy_clock_get_zero_cross_captured_date (ctx->phy);
+
+ diff_ntb = (ctx->pwl.date_ntb[0] - ctx->pwl.date_ntb[1]) % ctx->pwl.bp_ntb + 10000;
+ per_ntb = (4-(diff_ntb / ctx->pwl.pwzc_ntb)) * ctx->pwl.pwzc_ntb + diff_ntb - 10000;
+
+ CP_BEACON_TRACE (PWL_PER, mac_ntb(), ctx->pwl.date_ntb[1],
+ ctx->pwl.date_ntb[0], per_ntb);
+
+ return per_ntb;
+}
+
+/**
+ * Process the received beacon or countdown the counters if the beacon as
+ * not been received.
+ *
+ * \param ctx the beacon context.
+ * \param beacon the beacon received.
+ */
+void
+cp_beacon_process (cp_beacon_t *ctx, cp_beacon_desc_t *beacon)
+{
+ dbg_assert (ctx);
+
+ // TODO program the timer.
+
+ if (beacon)
+ {
+ cp_beacon_process_beacon (ctx, beacon);
+ }
+ else
+ {
+ /** Non persistent Preview schedule countdown. */
+ if (ctx->bentries_data.pscd)
+ {
+ ctx->bentries_data.pscd --;
+ // TODO Call the function to release the schedule.
+ }
+
+ /** Non persistent current schedule countdown. */
+ if (ctx->bentries_data.cscd)
+ {
+ ctx->bentries_data.cscd --;
+ // TODO call the right function
+ }
+
+ /** Key change countdown. */
+ if (ctx->bentries_data.kccd)
+ {
+ ctx->bentries_data.kccd --;
+ // TODO call the right function
+ }
+
+ /** Handover countdown. */
+ if (ctx->bentries_data.hcd)
+ {
+ ctx->bentries_data.hcd --;
+ // TODO call the right function
+ }
+
+ /** Relocation countdown. */
+ if (ctx->bentries_data.rcd)
+ {
+ ctx->bentries_data.rcd --;
+ // TODO call the right function
+ }
+
+ /** AC line countdown. */
+ if (ctx->bentries_data.aclcd)
+ {
+ ctx->bentries_data.aclcd --;
+ // TODO call the right function
+ }
+
+ /** Change numslot. */
+ if (ctx->bentries_data.nsccd)
+ {
+ ctx->bentries_data.nsccd --;
+ // TODO call the right function
+ }
+
+ /** Change Hibryd mode countdown. */
+ if (ctx->bentries_data.hmccd)
+ {
+ ctx->bentries_data.hmccd --;
+ // TODO call the right function
+ }
+
+ /** Change snid countdown. */
+ if(ctx->bentries_data.sccd)
+ {
+ ctx->bentries_data.sccd --;
+ // TODO call the right function
+ }
+ }
+}
+
+/**
+ * Process the received beacon
+ *
+ * \param ctx the beacon context.
+ * \param beacon the beacon received.
+ */
+void
+cp_beacon_process_beacon (cp_beacon_t *ctx, cp_beacon_desc_t *beacon)
+{
+ uint nbe;
+ u8 *bentry;
+ u8 *bentry_data;
+ cp_beacon_desc_alloc_t sched;
+ ca_beacon_period_t beacon_period[4];
+ uint i;
+ uint bpsto;
+ cp_beacon_common_t *common;
+ cp_beacon_work_beacon_t beacon_work;
+ bitstream_t bitstream;
+
+ dbg_assert (ctx);
+ dbg_assert (ctx->ca);
+ dbg_assert (ctx->sta);
+ dbg_assert (beacon);
+
+
+ // Keep the mac address of the source STA which emits the beacon to store
+ // it in the STA list.
+ mac_t mac = 0x0;
+ uint stei;
+
+ dbg_assert (ctx);
+ dbg_assert (beacon);
+
+ beacon_work.nid_msb = read_u32_from_word ((u8 *) &beacon->nid_msb);
+
+ bitstream_init (&bitstream, beacon->payload->beacon_mpdu_payload, 64,
+ BITSTREAM_READ);
+ bitstream_access (&bitstream, &beacon_work.nid_lsb, 22);
+ bitstream_access (&bitstream, &beacon_work.hm, 2);
+ bitstream_access (&bitstream, &beacon_work.stei, 8);
+ bitstream_access (&bitstream, &beacon_work.bt, 3);
+ beacon_work.bt = CP_BEACON_WORK_MASK_BT (beacon_work.bt);
+
+ bitstream_access (&bitstream, &beacon_work.ncnr, 1);
+ bitstream_access (&bitstream, &beacon_work.npsm, 1);
+ bitstream_access (&bitstream, &beacon_work.num_slots, 3);
+ beacon_work.num_slots =
+ CP_BEACON_WORK_MASK_NUM_SLOTS(beacon_work.num_slots);
+
+ bitstream_access (&bitstream, &beacon_work.slot_usage, 8);
+ bitstream_access (&bitstream, &beacon_work.slot_id, 3);
+ beacon_work.slot_id = CP_BEACON_WORK_MASK_SLOT_ID(beacon_work.slot_id);
+
+ bitstream_access (&bitstream, &beacon_work.aclss, 3);
+ beacon_work.aclss = CP_BEACON_WORK_MASK_ACLSS(beacon_work.aclss);
+
+ bitstream_access (&bitstream, &beacon_work.hoip, 1);
+ bitstream_access (&bitstream, &beacon_work.rtsbf, 1);
+ bitstream_access (&bitstream, &beacon_work.nm, 2);
+ beacon_work.nm = CP_BEACON_WORK_MASK_NM(beacon_work.nm);
+
+ bitstream_access (&bitstream, &beacon_work.cco_cap, 2);
+ beacon_work.cco_cap = CP_BEACON_WORK_MASK_CCO_CAP(beacon_work.cco_cap);
+ bitstream_finalise (&bitstream);
+
+ switch (beacon_work.bt)
+ {
+ case CP_BEACON_CENTRAL_BEACON:
+ common = &ctx->cbeacon;
+ break;
+ case CP_BEACON_DISCOVER_BEACON:
+ common = &ctx->dbeacon;
+ break;
+ default:
+ dbg_assert (false);
+ }
+
+ // Create a schedule.
+ sched.next_alloc = 0;
+
+ // Store the hybrid mode.
+ ctx->hm = beacon_work.hm;
+ cp_cco_set_ncnr (ctx->cco, beacon_work.ncnr);
+ cp_cco_set_npsm(ctx->cco, beacon_work.npsm);
+ cp_cco_set_numslots(ctx->cco, beacon_work.num_slots);
+ cp_cco_set_slotusage(ctx->cco, beacon_work.slot_usage);
+ cp_cco_set_aclss(ctx->cco, beacon_work.aclss);
+ cp_station_set_hoip(ctx->sta, beacon_work.hoip);
+
+ cp_station_set_rtsbf(ctx->sta, beacon_work.rtsbf);
+ cp_cco_set_nm(ctx->cco, beacon_work.nm);
+
+ // Store the coexistence mode
+ sched.ca_sched = ca_alloc_get_schedule (ctx->ca, ctx->schedule_index);
+ sched.ca_sched->coexistence_mode = ctx->hm;
+ sched.ca_sched->nek_switch = 0; //TODO
+
+ bentry = beacon->payload->bmis;
+ for (nbe = beacon->payload->nbe; nbe; nbe --)
+ {
+ // access direct to the bentry payload instead of providing the header
+ // of the bentry to the processing functions.
+ bentry_data = bentry + 2;
+ switch (read_u8_from_word(bentry))
+ {
+ case CP_BENTRY_PERSISTENT_SCHEDULE:
+ bentry = cp_bentry_persistent_schedule_process (ctx, bentry_data,
+ &sched);
+ break;
+ case CP_BENTRY_NON_PERSISTENT_SCHEDULE:
+ bentry = cp_bentry_non_persistent_schedule_process (ctx, bentry_data, &sched);
+ break;
+ case CP_BENTRY_REGIONS:
+ bentry = cp_bentry_regions_process (ctx, bentry_data);
+ break;
+ case CP_BENTRY_MAC_ADDRESS:
+ bentry = cp_bentry_mac_address_process (ctx, bentry_data, &mac);
+ break;
+ case CP_BENTRY_DISCOVER:
+ bentry = cp_bentry_discover_process (ctx, bentry_data,
+ beacon);
+ break;
+ case CP_BENTRY_DISCOVER_INFO:
+ bentry = cp_bentry_discover_info_process (ctx, bentry_data);
+ break;
+ case CP_BENTRY_BEACON_PERIOD_START_OFFSET:
+ bentry = cp_bentry_bpsto_process (ctx, bentry_data, &bpsto);
+ break;
+ case CP_BENTRY_ENCRYPTION_KEY_CHANGE:
+ bentry = cp_bentry_encryption_key_change_process (ctx, bentry_data);
+ break;
+ case CP_BENTRY_CCO_HANDOVER:
+ bentry = cp_bentry_handover_process (ctx, bentry_data);
+ break;
+ case CP_BENTRY_BEACON_RELOCATION:
+ bentry = cp_bentry_beacon_relocation_process (ctx, bentry_data);
+ break;
+ case CP_BENTRY_AC_LINE_SYNC_COUNTDOWN:
+ bentry = cp_bentry_ac_line_sync_countdown_process (ctx, bentry_data);
+ break;
+ case CP_BENTRY_CHANGE_NUMSLOTS:
+ bentry = cp_bentry_change_num_slots_process (ctx, bentry_data);
+ break;
+ case CP_BENTRY_CHANGE_HM:
+ bentry = cp_bentry_change_hm_process (ctx, bentry_data);
+ break;
+ case CP_BENTRY_CHANGE_SNID:
+ bentry = cp_bentry_change_snid_process (ctx, bentry_data);
+ break;
+ case CP_BENTRY_VENDOR:
+ bentry = cp_bentry_vendor_specific_process (ctx, bentry_data);
+ break;
+ default:
+ dbg_assert (*bentry > CP_BENTRY_CHANGE_SNID && *bentry < CP_BENTRY_VENDOR);
+ }
+ }
+
+ // Store the beacon in the cp_beacon context.
+ if (common->last_beacon != NULL)
+ {
+ blk_release_desc ((blk_t *) common->last_beacon);
+ }
+ common->last_beacon = beacon;
+
+ if (beacon_work.bt == CP_BEACON_CENTRAL_BEACON)
+ {
+ // Fill the end of the beacon period with an empty allocation.
+ if (sched.ca_sched->allocations[sched.next_alloc].end_offset_tck <
+ ctx->pwl.bp_ntb)
+ {
+ sched.ca_sched->allocations[sched.next_alloc].glid = MAC_LID_SPC_HOLE;
+ sched.ca_sched->allocations[sched.next_alloc].end_offset_tck =
+ ctx->pwl.bp_ntb;
+ sched.ca_sched->allocations_nb++;
+ sched.next_alloc ++;
+ }
+
+ beacon_period[0] = common->last_bp;
+ // ADD the schedule to the CA.
+ for (i = 1; i < 4; i++)
+ {
+ beacon_period[i].start_date = ctx->pwl.bp_ntb * i
+ + beacon->payload->fc.preamble_date
+ + beacon->payload->fc.bto[i]
+ - bpsto;
+ beacon_period[i].schedule_index = ctx->schedule_index;
+ }
+ common->last_bp = beacon_period[1];
+
+ ca_alloc_update_beacon_periods (ctx->ca, beacon_period, 4);
+ ctx->schedule_index ++;
+
+ CP_BEACON_TRACE (UPDATE_SCHED, mac_ntb(), beacon_work.bt,
+ beacon_period[0].start_date,
+ beacon_period[1].start_date,
+ beacon_period[2].start_date);
+ }
+
+ // Store the mac address and the tei of the CCo in the sta list if still
+ // not present.
+ if (stei && mac)
+ {
+ // TODO: Shall the stei and mac be provide to complete the network
+ // list ?
+ }
+
+ // increment the beacon number.
+ common->beacon_nb ++;
+
+ CP_BEACON_TRACE (BEACON_PROCESS, mac_ntb(), beacon_work.bt,
+ beacon->payload->fc.bts, beacon->payload->fc.bto[0],
+ beacon->payload->fc.bto[1], beacon->payload->fc.bto[2],
+ beacon->payload->fc.bto[3]);
+}
+
+/**
+ * Send a beacon when the STA is acting as a CCo.
+ *
+ * \param ctx the beacon module context
+ * \param beacon_type beacon type
+ */
+void
+cp_beacon_cco_send_beacon (cp_beacon_t *ctx, uint beacon_type)
+{
+ cp_beacon_desc_t *beacon;
+ cp_beacon_common_t *common;
+
+ dbg_assert (ctx);
+#if 0
+ dbg_assert (cp_cco_get_cco_status(ctx->cco));
+#endif
+
+ beacon = (cp_beacon_desc_t *) blk_alloc_desc();
+
+ // To keep the beacon in memroy for a future use
+ blk_addref_desc ((blk_t *) beacon);
+
+ switch (beacon_type)
+ {
+ case CP_BEACON_CENTRAL_BEACON:
+ common = &ctx->cbeacon;
+ cp_beacon_cco_beacon_central_generate (ctx, beacon);
+ break;
+ case CP_BEACON_DISCOVER_BEACON:
+ common = &ctx->dbeacon;
+ cp_beacon_cco_beacon_discover_generate (ctx, beacon);
+ break;
+ }
+
+ // Keep the beacon in the context.
+ if (common->last_beacon)
+ {
+ // release the previous one.
+ blk_release_desc ((blk_t *) common->last_beacon);
+ }
+ // Add the new one.
+ common->last_beacon = beacon;
+
+ cp_beacon_send_beacon (ctx, beacon, beacon_type);
+}
+
+/**
+ * Fill the payload of the beacon when the STA is accting as CCo or UCCo.
+ * Can be use for
+ * - the Central beacon when acting as a CCo
+ * - the discover beacon when acting as a UCCo.
+ *
+ *
+ * \param ctx the beacon module context
+ * \param beacon the beacon to fill.
+ * \param beacon_type the beacon type, central, discover or proxy.
+ */
+void
+cp_beacon_xcco_fill_common_part (cp_beacon_t *ctx, cp_beacon_desc_t *beacon,
+ uint beacon_type)
+{
+ bitstream_t bitstream;
+ u64 nid;
+ cp_beacon_work_beacon_t data;
+
+ dbg_assert (ctx);
+ dbg_assert (ctx->sta);
+ dbg_assert (ctx->cco);
+ dbg_assert (beacon);
+ dbg_assert (beacon_type < 3);
+
+ // Beacon payload
+ nid = cp_station_get_nid (ctx->sta);
+
+ data.nid_msb = nid >> 22;
+ data.nid_lsb = nid & 0x7FFFFF;
+ data.hm = ctx->hm;
+ data.stei = cp_station_get_tei (ctx->sta);
+ data.bt = beacon_type;
+ data.ncnr = cp_cco_get_ncnr (ctx->cco);
+ data.npsm = cp_cco_get_npsm (ctx->cco);
+ data.num_slots = cp_cco_get_numslots (ctx->cco);
+ data.slot_usage = cp_cco_get_slotusage(ctx->cco);
+ data.slot_id = cp_cco_get_slot_id (ctx->cco);
+ data.aclss = cp_cco_get_aclss (ctx->cco);
+ data.hoip = cp_station_get_hoip (ctx->sta);
+ data.rtsbf = cp_station_get_rtsbf (ctx->sta);
+ data.nm = cp_cco_get_nm (ctx->cco);
+ data.cco_cap = cp_cco_get_cco_cap (ctx->cco);
+
+ beacon->nid_msb = data.nid_msb;
+
+ bitstream_init (&bitstream, beacon->payload->beacon_mpdu_payload, CP_BEACON_WORD_SIZE,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &data.nid_lsb, 22);
+ bitstream_access (&bitstream, &data.hm, 2);
+ bitstream_access (&bitstream, &data.stei, 8);
+ bitstream_finalise (&bitstream);
+
+ bitstream_init (&bitstream, beacon->payload->beacon_mpdu_payload + sizeof(uint), CP_BEACON_WORD_SIZE,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &data.bt, 3);
+ bitstream_access (&bitstream, &data.ncnr, 1);
+ bitstream_access (&bitstream, &data.npsm, 1);
+ bitstream_access (&bitstream, &data.num_slots, 3);
+ bitstream_access (&bitstream, &data.slot_usage, 8);
+ bitstream_access (&bitstream, &data.slot_id, 3);
+ bitstream_access (&bitstream, &data.aclss, 3);
+ bitstream_access (&bitstream, &data.hoip, 1);
+ bitstream_access (&bitstream, &data.rtsbf, 1);
+ bitstream_access (&bitstream, &data.nm, 2);
+ bitstream_access (&bitstream, &data.cco_cap, 2);
+ bitstream_finalise (&bitstream);
+
+}
+
+/**
+ * Generate the central beacon.
+ *
+ * \param ctx the beacon context.
+ * \param beacon the beacon received.
+ */
+void
+cp_beacon_cco_beacon_central_generate (cp_beacon_t *ctx,
+ cp_beacon_desc_t *beacon)
+{
+ u8 *bentry;
+ cp_beacon_desc_alloc_t sched;
+ ca_beacon_period_t beacon_period[3];
+ uint i;
+ uint estimated_date;
+
+ dbg_assert (ctx);
+ dbg_assert (ctx->sta);
+ dbg_assert (ctx->cco);
+ dbg_assert (beacon);
+
+ cp_beacon_estimate_bts_bto_bp (ctx, &ctx->cbeacon);
+
+ // Store the coexistence mode
+ sched.next_alloc = 0;
+ sched.ca_sched = ca_alloc_get_schedule (ctx->ca, ctx->schedule_index);
+ sched.ca_sched->coexistence_mode = ctx->hm;
+ sched.ca_sched->nek_switch = 0; //TODO
+
+ beacon->payload->fc.bts = ctx->cbeacon.btse_ntb[0];
+ *beacon->payload->fc.bto = *ctx->cbeacon.bto_bpsto.bto;
+
+ // Beacon payload
+ cp_beacon_xcco_fill_common_part (ctx, beacon, CP_BEACON_CENTRAL_BEACON);
+ beacon->payload->nbe = 4;
+
+ // Bentries.
+ bentry = cp_bentry_bpsto (ctx, &ctx->cbeacon, beacon->payload->bmis);
+ bentry = cp_bentry_mac_address (ctx, bentry);
+ bentry = cp_bentry_regions (ctx, bentry);
+ bentry = cp_bentry_persistent_schedule (ctx, bentry, &sched);
+
+ // Fill the end of the beacon period with an empty allocation.
+ if (sched.ca_sched->allocations[sched.next_alloc].end_offset_tck <
+ ctx->cbeacon.per_ntb)
+ {
+ sched.next_alloc ++;
+ sched.ca_sched->allocations[sched.next_alloc].glid = MAC_LID_SPC_HOLE;
+ sched.ca_sched->allocations[sched.next_alloc].end_offset_tck =
+ ctx->cbeacon.per_ntb;
+ sched.ca_sched->allocations_nb++;
+ }
+
+ estimated_date = MAC_NTB_TO_DATE (beacon->payload->fc.bts);
+ if (ctx->cbeacon.beacon_nb)
+ {
+ // Program the timer for the next beacon period to generate the next
+ // central beacon.
+ hal_timer_instance_program (ctx->timer, &ctx->instance, mac_ntb()
+ + ctx->cbeacon.per_ntb);
+ }
+ else
+ {
+ // Program the timer for the next beacon period to generate the next
+ // central beacon.
+ hal_timer_instance_program (ctx->timer, &ctx->instance, mac_ntb()
+ + 3*ctx->pwl.pwzc_ntb);
+ }
+
+ beacon_period[0] = ctx->cbeacon.last_bp;
+ // ADD the schedule to the CA.
+ for (i = 1; i < 3 ; i++)
+ {
+ // The 3500 ticks are present to allow the CA to make an aifs before
+ // the new beacon period.
+ beacon_period[i].start_date = ctx->cbeacon.per_ntb * (i-1)
+ + estimated_date + beacon->payload->fc.bto[i] + 3500;
+ beacon_period[i].schedule_index = ctx->schedule_index;
+ }
+
+ ca_alloc_update_beacon_periods (ctx->ca, beacon_period, 3);
+
+ // Store the net last bp in the context.
+ ctx->cbeacon.last_bp = beacon_period[1];
+ ctx->schedule_index ++;
+
+ CP_BEACON_TRACE (UPDATE_SCHED, mac_ntb(), CP_BEACON_CENTRAL_BEACON,
+ beacon_period[0].start_date,
+ beacon_period[1].start_date,
+ beacon_period[2].start_date);
+}
+
+/**
+ * Generate the beacon.
+ *
+ * \param ctx the beacon context.
+ * \parma common the beacon central or discover context.
+ * \param beacon the central beacon to fill
+ */
+void
+cp_beacon_cco_beacon_discover_generate (cp_beacon_t *ctx,
+ cp_beacon_desc_t *beacon)
+{
+ u8 *bentry;
+
+ dbg_assert (ctx);
+ dbg_assert (ctx->sta);
+ dbg_assert (ctx->cco);
+ dbg_assert (beacon);
+
+ beacon->payload->fc.bts = mac_ntb();
+ *beacon->payload->fc.bto = *ctx->dbeacon.bto_bpsto.bto;
+
+ // Beacon payload
+ cp_beacon_xcco_fill_common_part (ctx, beacon, CP_BEACON_DISCOVER_BEACON);
+
+ beacon->payload->nbe = 5;
+
+ // Bentries.
+ bentry = cp_bentry_bpsto (ctx, &ctx->dbeacon, beacon->payload->bmis);
+ bentry = cp_bentry_mac_address (ctx, bentry);
+ bentry = cp_bentry_regions (ctx, bentry);
+ bentry = cp_bentry_default_schedule (ctx, bentry);
+ bentry = cp_bentry_discover_info (ctx, bentry);
+}
+
+/**
+ * Send the beacon over the PWL.
+ * TODO Implement the proxy beacon part
+ *
+ * \param ctx the cp beacon context
+ * \param beacon the beacon to send
+ * \param beacon_type the beacon type.
+ */
+void
+cp_beacon_send_beacon (cp_beacon_t *ctx, cp_beacon_desc_t *beacon,
+ uint beacon_type)
+{
+ mfs_tx_t *mfs_beacon;
+ bool added;
+ cp_beacon_common_t *common;
+ mac_t mac;
+
+ dbg_assert (ctx);
+ dbg_assert (beacon);
+
+ /* Create the MFS
+ * see http://pessac/cesar/trac/wiki/SoftMacBeacons#BeaconMFS
+ * for more details.
+ */
+ dbg_assert (ctx->mac_store);
+ switch (beacon_type)
+ {
+ case CP_BEACON_CENTRAL_BEACON:
+ mfs_beacon = mac_store_mfs_add_tx (ctx->mac_store, true, false,
+ MAC_LID_SPC_CENTRAL, 0xff, &added);
+ ctx->cbeacon.mfs = mfs_beacon;
+ mfs_beacon->cap = 0x3;
+ common = &ctx->cbeacon;
+ break;
+ case CP_BEACON_DISCOVER_BEACON:
+ mfs_beacon = mac_store_mfs_add_tx (ctx->mac_store, true, false,
+ MAC_LID_DISCOVER, 0xff, &added);
+ ctx->dbeacon.mfs = mfs_beacon;
+ mfs_beacon->cap = 0x2;
+ common = &ctx->dbeacon;
+ break;
+ default:
+ dbg_assert (false);
+ }
+
+ dbg_assert (mfs_beacon);
+
+ if (added)
+ {
+ mfs_beacon->beacon = true;
+ mfs_beacon->common.ats = false;
+
+ // Add the mfs to the CA
+ ca_mfs_add (ctx->ca, mfs_beacon);
+ }
+
+ dbg_assert (ctx->pbproc);
+ dbg_assert (common);
+
+ if (beacon_type == CP_BEACON_CENTRAL_BEACON && common->beacon_nb
+ > 0)
+ {
+ ca_mfs_hold (ctx->ca, mfs_beacon);
+ }
+
+ dbg_assert (ctx->interface);
+ dbg_assert (ctx->sta);
+ cp_station_get_mac_address (ctx->sta, (u8 *) &mac);
+ interface_beacon_prepare (ctx->interface, (pb_beacon_t *)
+ beacon, mac, mfs_beacon, &common->bto_bpsto);
+
+ /*
+ pbproc_mfs_beacon_prepare (ctx->pbproc, mfs_beacon, (pb_beacon_t *) beacon,
+ &common->bto_bpsto);
+
+ ca_mfs_update (ctx->ca, mfs_beacon);
+ */
+
+ CP_BEACON_TRACE (SEND_BEACON, mac_ntb(), common->btse_ntb[0],
+ beacon_type);
+
+ common->beacon_nb ++;
+ if (!added)
+ blk_release (mfs_beacon);
+}
+
+/**
+ * Function call by the timer when the timer expires.
+ *
+ * \param ctx the beacon context.
+ */
+void
+cp_beacon_timer_it (cp_beacon_t *ctx)
+{
+ dbg_assert (ctx);
+ dbg_assert (ctx->cp_cb);
+
+ (*ctx->cp_cb) (ctx->cp_user_data);
+}
+
diff --git a/cesar/cp/beacon/src/bentry.c b/cesar/cp/beacon/src/bentry.c
new file mode 100644
index 0000000000..82fd2df480
--- /dev/null
+++ b/cesar/cp/beacon/src/bentry.c
@@ -0,0 +1,1006 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/src/bentry.c
+ * \brief Bentry processing
+ * \ingroup cp_beacon
+ *
+ */
+#include "common/std.h"
+#include "stdio.h"
+
+#include "mac/common/timings.h"
+
+#include "lib/read_word.h"
+#include "lib/blk.h"
+#include "lib/bitstream.h"
+
+#include "cp/beacon/inc/bentry.h"
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/forward.h"
+#include "cp/beacon/inc/beacons_work.h"
+
+#include "cp/station/station.h"
+#include "cp/secu/secu.h"
+
+/**
+ * Fill the bentry header
+ *
+ * \param bentry_header_addr the bentry address.
+ * \param type the type of bentry.
+ * \param length the bentry length in bytes.
+ *
+ * \return the address to store the rest of the bentry.
+ */
+u8 *
+cp_bentry_header_fill (u8 *bentry_header_addr, uint type, uint length)
+{
+ bitstream_t bitstream;
+
+ dbg_assert (bentry_header_addr);
+
+ bitstream_init (&bitstream, bentry_header_addr, CP_BENTRY_HEADER, BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &type, CP_BENTRY_BIT_SIZE_BEHDR);
+ bitstream_access (&bitstream, &length, CP_BENTRY_BIT_SIZE_BELEN);
+ bitstream_finalise (&bitstream);
+
+ return bentry_header_addr + CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_HEADER);
+}
+
+/**
+ * Create the non persistent schedule bentry for the beacon period.
+ *
+ * \param ctx the cp_beacon_context.
+ * \param bentry_addr the address to store the data in the beacon payload.
+ * \param sched the ca schedule to fill the next schedule.
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_non_persistent_schedule(cp_beacon_t *ctx, u8 *bentry_addr,
+ cp_beacon_desc_alloc_t *sched)
+{
+ // TODO Fill correctly this function. For this moment it will not be use.
+ bitstream_t bitstream;
+ cp_bentry_non_persistent_schedule_struct_t bentry;
+ cp_bentry_sai_t sai;
+ u8 *data_addr;
+ uint total_size;
+
+ dbg_assert(ctx);
+ dbg_assert(bentry_addr);
+
+ bentry.behdr = CP_BENTRY_NON_PERSISTENT_SCHEDULE;
+ bentry.belen = 0x6;
+ bentry.ns = 1;
+
+ // First allocation of persistent schedule.
+ // Configuration on CSMA only mode, the glid = 0xff.
+ sai.stpf = true;
+ sai.glid = 0xFF;
+ sai.st = 0x0;
+ sai.et = ctx->cbeacon.bp_tau[0];
+
+ data_addr = cp_bentry_header_fill (bentry_addr, bentry.behdr, bentry.belen);
+
+ // store the bentry in the bentry.
+ bitstream_init (&bitstream, data_addr, CP_BENTRY_BIT_SIZE_NON_PERSISTENT_SCHEDULE,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &bentry.ns, CP_BENTRY_BIT_SIZE_NS);
+ bitstream_finalise (&bitstream);
+ total_size = CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_NON_PERSISTENT_SCHEDULE);
+
+ // store the bentry in the bentry.
+ bitstream_init (&bitstream, data_addr + total_size, CP_BENTRY_BIT_SIZE_SAI_STPF,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &sai.stpf, CP_BENTRY_BIT_SIZE_STPF);
+ bitstream_access (&bitstream, &sai.glid, CP_BENTRY_BIT_SIZE_GLID);
+ bitstream_access (&bitstream, &sai.st, CP_BENTRY_BIT_SIZE_ST);
+ bitstream_access (&bitstream, &sai.et, CP_BENTRY_BIT_SIZE_ET);
+ bitstream_finalise (&bitstream);
+ total_size += CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_SAI_STPF);
+
+ return data_addr + CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_SAI_STPF);
+}
+
+/**
+ * Create the schedule bentry for the beacon period.
+ *
+ * \param ctx the cp_beacon_context.
+ * \param bentry_addr the address to store the data in the beacon payload.
+ * \param sched the ca schedule to fill the next schedule.
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_persistent_schedule(cp_beacon_t *ctx, u8 *bentry_addr,
+ cp_beacon_desc_alloc_t *sched)
+{
+ bitstream_t bitstream;
+ cp_bentry_persistent_schedule_struct_t bentry;
+ cp_bentry_sai_t sai;
+ u8 *data_addr;
+ uint total_size;
+ uint data;
+
+ // laranjeiro
+ // date : 2008/01/07
+ // TODO fill this correctly
+ // Actually only a schedule is generated for the CSMA mode only.
+
+ dbg_assert(ctx);
+ dbg_assert(bentry_addr);
+
+ bentry.behdr = CP_BENTRY_PERSISTENT_SCHEDULE;
+
+ bentry.pscd = ctx->bentries_data.pscd;
+ bentry.cscd = ctx->bentries_data.cscd;
+ bentry.ns = 1;
+
+ // First allocation of persistent schedule.
+ // Configuration on CSMA only mode, the glid = 0xff.
+ sai.stpf = true;
+ sai.glid = 0xFF;
+ sai.st = 0x0;
+ sai.et = ctx->cbeacon.bp_tau[0];
+
+ data_addr = bentry_addr + CP_BENTRY_BYTE_SIZEOF (CP_BENTRY_HEADER);
+ cp_bentry_header_fill (bentry_addr, bentry.behdr,
+ bentry.belen);
+
+ // store the bentry in the bentry.
+ bitstream_init (&bitstream, data_addr, CP_BENTRY_BIT_SIZE_PERSISTENT_SCHEDULE,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &bentry.pscd, CP_BENTRY_BIT_SIZE_PSCD);
+ bitstream_access (&bitstream, &bentry.cscd, CP_BENTRY_BIT_SIZE_CSCD);
+ // Reserved bits.
+ data = 0x0;
+ bitstream_access (&bitstream, &data, 2);
+ bitstream_access (&bitstream, &bentry.ns, CP_BENTRY_BIT_SIZE_NS);
+ bitstream_finalise (&bitstream);
+ total_size = CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_PERSISTENT_SCHEDULE);
+
+ // store the bentry in the bentry.
+ bitstream_init (&bitstream, data_addr + total_size, CP_BENTRY_BIT_SIZE_SAI_STPF,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &sai.stpf, CP_BENTRY_BIT_SIZE_STPF);
+ bitstream_access (&bitstream, &sai.glid, CP_BENTRY_BIT_SIZE_GLID);
+ bitstream_access (&bitstream, &sai.st, CP_BENTRY_BIT_SIZE_ST);
+ bitstream_access (&bitstream, &sai.et, CP_BENTRY_BIT_SIZE_ET);
+ bitstream_finalise (&bitstream);
+ total_size += CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_SAI_STPF);
+
+
+ sched->ca_sched->allocations_nb = 1;
+ sched->ca_sched->allocations[0].end_offset_tck = MAC_ATU_TO_TCK (sai.et);
+ sched->ca_sched->allocations[0].glid = 0xff;
+
+ bentry.belen = total_size;
+ data_addr = cp_bentry_header_fill (bentry_addr, bentry.behdr, bentry.belen);
+
+ return data_addr + total_size;
+}
+
+
+/**
+ * Create the schedules when the STA is UCCo to be correspond to the current
+ * schedule of the CCo.
+ * The schedule provided are non persistent, it is on vailable if the STA is
+ * not associated with the CCo and the CCo is a UCCo.
+ *
+ * \param ctx the cp beacon module context
+ * \param bentry_addr the bentry addr
+ * \return the address of the next bentry.
+ */
+u8 *
+cp_bentry_default_schedule (cp_beacon_t *ctx, u8 *bentry_addr)
+{
+ bitstream_t bitstream;
+ cp_bentry_non_persistent_schedule_struct_t bentry;
+ cp_bentry_sai_t sai;
+ u8 *data_addr;
+ uint total_size;
+
+ dbg_assert(ctx);
+ dbg_assert(bentry_addr);
+
+ bentry.behdr = CP_BENTRY_NON_PERSISTENT_SCHEDULE;
+ bentry.belen = 0x5;
+ bentry.ns = 1;
+
+ // First allocation of persistent schedule.
+ // Configuration on CSMA only mode, the glid = 0xff.
+ sai.stpf = true;
+ sai.glid = 0xFF;
+ sai.st = 0x0;
+ sai.et = CP_BENRTY_MAX_SAI_DATA_VALUE;
+
+ data_addr = cp_bentry_header_fill (bentry_addr, bentry.behdr, bentry.belen);
+
+ // store the bentry in the bentry.
+ bitstream_init (&bitstream, data_addr, CP_BENTRY_BIT_SIZE_NON_PERSISTENT_SCHEDULE,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &bentry.ns, CP_BENTRY_BIT_SIZE_NS);
+ bitstream_finalise (&bitstream);
+ total_size = CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_NON_PERSISTENT_SCHEDULE);
+
+ // store the bentry in the bentry.
+ bitstream_init (&bitstream, data_addr + total_size, CP_BENTRY_BIT_SIZE_SAI_STPF,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &sai.stpf, CP_BENTRY_BIT_SIZE_STPF);
+ bitstream_access (&bitstream, &sai.glid, CP_BENTRY_BIT_SIZE_GLID);
+ bitstream_access (&bitstream, &sai.st, CP_BENTRY_BIT_SIZE_ST);
+ bitstream_access (&bitstream, &sai.et, CP_BENTRY_BIT_SIZE_ET);
+ bitstream_finalise (&bitstream);
+ total_size += CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_SAI_STPF);
+
+ return data_addr + total_size;
+}
+
+
+/**
+ * Create the regions for the beacons.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry_addr the bentry address.
+ */
+u8 *
+cp_bentry_regions (cp_beacon_t *ctx, u8 *bentry_addr)
+{
+ bitstream_t bitstr;
+ cp_bentry_regions_struct_t regions[64];
+ uint nr;
+ u8 *data_addr;
+ uint i;
+
+ dbg_assert (ctx);
+ dbg_assert (bentry_addr);
+
+ nr = 1;
+ regions[0].rt = CP_BENTRY_REGIONS_LOCAL_CSMA;
+ regions[0].ret = ctx->cbeacon.bp_tau[0];
+
+ data_addr = cp_bentry_header_fill (bentry_addr, CP_BENTRY_REGIONS,
+ CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_REGION(nr)));
+
+ bitstream_init (&bitstr, data_addr, CP_BENTRY_BIT_SIZE_NUM_REG, BITSTREAM_WRITE);
+ bitstream_access (&bitstr, &nr, CP_BENTRY_BIT_SIZE_NUM_REG);
+ bitstream_finalise (&bitstr);
+ data_addr += CP_BENTRY_BYTE_SIZEOF ((CP_BENTRY_BIT_SIZE_NUM_REG + 2));
+
+ // Store the bentry
+ for ( i = 0; i < nr; i++)
+ {
+ bitstream_init (&bitstr, data_addr, CP_BENTRY_BIT_SIZE_ONE_REGION ,BITSTREAM_WRITE);
+ bitstream_access (&bitstr, &regions[i].rt, CP_BENTRY_BIT_SIZE_REG_TYPE);
+ bitstream_access (&bitstr, &regions[i].ret, CP_BENTRY_BIT_SIZE_REG_ET);
+ bitstream_finalise (&bitstr);
+
+ data_addr += CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_ONE_REGION);
+ }
+
+ return data_addr;
+}
+
+/**
+ * Store the mac address of the station in the beacon bentry
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry_addr the bentry addr.
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_mac_address(cp_beacon_t *ctx, u8 *bentry_addr)
+{
+ u8 *data_addr;
+
+ dbg_assert (ctx);
+ dbg_assert (ctx->sta);
+ dbg_assert (bentry_addr);
+
+ // Store the bentry
+ data_addr = cp_bentry_header_fill (bentry_addr, CP_BENTRY_MAC_ADDRESS, 0x6);
+ cp_station_get_mac_address (ctx->sta, data_addr);
+
+ return bentry_addr + CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_MAC_ADDRESS);
+}
+
+/**
+ * Store the tei of the next sta which shall send a discover beacon.
+ *
+ * \param ctx the cp_beacon context.
+ * \param bentry_addr the bentry addr
+ * \param tei the sta tei to request a discover beacon.
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_discover(cp_beacon_t *ctx, u8 *bentry_addr, u8 tei)
+{
+ uint behdr;
+ uint belen;
+ u8 *data_addr;
+
+ dbg_assert (ctx);
+ dbg_assert (bentry_addr);
+
+ behdr = CP_BENTRY_DISCOVER;
+ belen = 1;
+
+ data_addr = cp_bentry_header_fill (bentry_addr, CP_BENTRY_DISCOVER, 1);
+ *data_addr = tei;
+
+ return bentry_addr + CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_DISCOVER);
+}
+
+/**
+ * Store the discover list in the bentry.
+ *
+ * \param ctx the cp_beacon context.
+ * \param bentry_addr the bentry addr
+ * \return the next address to store the next bentry.* \param ctx
+ */
+u8 *
+cp_bentry_discover_info(cp_beacon_t *ctx, u8 *bentry_addr)
+{
+ uint data;
+ bitstream_t bitstr;
+ cp_bentry_discover_info_struct_t dis;
+ u8 *dis_data;
+
+ dbg_assert (ctx);
+ dbg_assert (ctx->sta);
+ dbg_assert (bentry_addr);
+
+ dis_data = cp_bentry_header_fill (bentry_addr, CP_BENTRY_DISCOVER_INFO,
+ CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_DISCOVER_INFO));
+
+ // Store the address of the discovery bentry data in the dis_data
+ // variable.
+ dis.cco_cap = cp_cco_get_cco_cap(ctx->cco);
+ dis.proxy_net_cap = cp_cco_get_proxy_cap(ctx->cco);
+ dis.backup_cco_cap = cp_cco_get_backup_cap(ctx->cco);
+ dis.cco_status = cp_cco_get_cco_status (ctx->cco);
+ dis.pco_status = cp_cco_get_pco_status(ctx->cco);
+ dis.backup_cco_status = cp_cco_get_backup_cco_status(ctx->cco);
+ dis.num_dis_sta = cp_station_get_num_dis_sta(ctx->sta);
+ dis.num_dis_net = cp_station_get_num_dis_net(ctx->sta);
+ dis.authentication = cp_station_is_authenticated(ctx->sta);
+ dis.status_user_ap_cco = cp_cco_get_user_appointed_cco_status(ctx->cco);
+
+ // Store the discovery bentry in the bentry.
+ bitstream_init(&bitstr, dis_data, CP_BENTRY_BIT_SIZE_DISCOVER_INFO,
+ BITSTREAM_WRITE);
+
+ // Store the update boolean to 0
+ data = 0x0;
+ bitstream_access (&bitstr, &data, 1);
+ bitstream_access (&bitstr, &dis.cco_cap,
+ CP_BENTRY_BIT_SIZE_DIS_CCO_CAP);
+ bitstream_access (&bitstr, &dis.proxy_net_cap, CP_BENTRY_BIT_SIZE_DIS_PROXY_NET_CAP);
+ bitstream_access (&bitstr, &dis.backup_cco_cap, CP_BENTRY_BIT_SIZE_DIS_BACK_CCO_CAP);
+ bitstream_access (&bitstr, &dis.cco_status, CP_BENTRY_BIT_SIZE_DIS_CCO_STATUS);
+ bitstream_access (&bitstr, &dis.pco_status, CP_BENTRY_BIT_SIZE_DIS_PCO_STATUS);
+ bitstream_access (&bitstr, &dis.backup_cco_status,
+ CP_BENTRY_BIT_SIZE_DIS_BACK_CCO_STATUS );
+ bitstream_access (&bitstr, &dis.num_dis_sta, CP_BENTRY_BIT_SIZE_DIS_NUM_DIS_STA);
+ bitstream_access (&bitstr, &dis.num_dis_net, CP_BENTRY_BIT_SIZE_DIS_NUM_DIS_NET);
+ bitstream_access (&bitstr, &dis.authentication, CP_BENTRY_BIT_SIZE_DIS_AUTH);
+ bitstream_access (&bitstr, &dis.status_user_ap_cco, CP_BENTRY_BIT_SIZE_DIS_USER_APP);
+ bitstream_finalise (&bitstr);
+
+ // Copy the the discover bentry to the data variable.
+ data = read_u32_from_word (dis_data);
+ dis.updated = CP_BENTRY_DISCOVER_UPDATE_MASK(data)
+ || CP_BENTRY_DISCOVER_UPDATE_MASK(ctx->bentries_data.discover_info);
+
+ if (dis.updated)
+ {
+ *dis_data |= 0x1;
+ ctx->bentries_data.discover_info = read_u32_from_word (dis_data);
+ }
+
+ return dis_data + CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_DISCOVER_INFO);
+}
+
+/**
+ * BPSTO always present in CSMA only mode and for discover beacons.
+ * This bentry data is stamped by the CA.
+ * The address of the first byte of the BPSTO is stored in bpsto camp of the
+ * structure common.
+ *
+ * \param ctx the cp_beacon context.
+ * \param common common data of all beacons.
+ * \param bentry_addr the bentry addr
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_bpsto (cp_beacon_t *ctx, cp_beacon_common_t *common, u8 *bentry_addr)
+{
+ dbg_assert (ctx);
+ dbg_assert (common);
+ dbg_assert (bentry_addr);
+
+ common->bto_bpsto.bpsto = cp_bentry_header_fill (bentry_addr,
+ CP_BENTRY_BEACON_PERIOD_START_OFFSET,
+ CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_BPSTO));
+
+ return bentry_addr + CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_HEADER)
+ + CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_BPSTO);
+}
+
+/**
+ * Encryption key change.
+ *
+ * \param ctx the cp_beacon context.
+ * \param bentry_addr the bentry addr
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_encryption_key_change (cp_beacon_t *ctx, u8 *bentry_addr)
+{
+ cp_bentry_key_change_struct_t data;
+ bitstream_t bitstream;
+ u8 *data_addr;
+ uint rsvd;
+
+ dbg_assert (ctx);
+ dbg_assert (ctx->secu);
+ dbg_assert (bentry_addr);
+
+ data_addr = cp_bentry_header_fill (bentry_addr, CP_BENTRY_ENCRYPTION_KEY_CHANGE,
+ CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_HEADER));
+
+ data.kccd = ctx->bentries_data.kccd;
+ data.kbc = 0x0;
+ data.new_eks = 0x0;
+
+ bitstream_init (&bitstream, data_addr, CP_BENTRY_BIT_SIZE_EKC,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &data.kccd, CP_BENTRY_BIT_SIZE_EKC_KCCD);
+ bitstream_access (&bitstream, &data.kbc, CP_BENTRY_BIT_SIZE_EKC_KBC);
+ // reserved bits
+ rsvd = 0;
+ bitstream_access (&bitstream, &rsvd, 1);
+ bitstream_access (&bitstream, &data.new_eks, CP_BENTRY_BIT_SIZE_EKC_NEWEKS);
+ bitstream_finalise (&bitstream);
+
+ return data_addr + CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_EKC);
+}
+
+/**
+ * Handover. Add a the bentry when the CCo will change.
+ *
+ * \param ctx the cp_beacon context.
+ * \param bentry_addr the bentry addr
+ * \param new_cco_tei the new cco tei.
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_handover(cp_beacon_t *ctx, u8 *bentry_addr, u8 new_cco_tei)
+{
+ bitstream_t bitstream;
+ cp_bentry_handover_struct_t data;
+ uint rsvd = 0;
+ u8 *data_addr;
+
+ dbg_assert (ctx);
+ dbg_assert (ctx->sta);
+ dbg_assert (bentry_addr);
+
+ data_addr = cp_bentry_header_fill (bentry_addr, CP_BENTRY_CCO_HANDOVER,
+ CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_HANDOVER));
+
+ data.hcd = ctx->bentries_data.hcd;
+ data.nctei = new_cco_tei;
+
+ bitstream_init (&bitstream, data_addr, CP_BENTRY_BIT_SIZE_HANDOVER,
+ BITSTREAM_WRITE);
+ bitstream_access(&bitstream, &data.hcd, CP_BENTRY_BIT_SIZE_HANDOVER_HCD);
+ // reserved bits
+ rsvd = 0;
+ bitstream_access(&bitstream, &rsvd, 2);
+ bitstream_access(&bitstream, &data.nctei, CP_BENTRY_BIT_SIZE_HANDOVER_NCTEI);
+ bitstream_finalise (&bitstream);
+
+ return bentry_addr + CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_HANDOVER)
+ + CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_HEADER);
+}
+
+/**
+ * Chnage hybrid mode
+ *
+ * \param ctx the cp_beacon context.
+ * \param bentry_addr the bentry addr
+ * \return the next address to store the next bentry.
+ */
+u8 *
+cp_bentry_change_hm (cp_beacon_t *ctx, u8 *bentry_addr)
+{
+ bitstream_t bitstream;
+ cp_bentry_hm_struct_t data;
+ u8 *data_addr;
+
+ dbg_assert (ctx);
+ dbg_assert (bentry_addr);
+
+ data_addr = cp_bentry_header_fill (bentry_addr, CP_BENTRY_CHANGE_HM,
+ CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_HM));
+
+ data.hmccd = ctx->bentries_data.hmccd;
+ data.new_hm = ctx->hm;
+
+ bitstream_init (&bitstream, data_addr, CP_BENTRY_BIT_SIZE_HM,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &data.hmccd, CP_BENTRY_BIT_SIZE_HM_HMCCD);
+ bitstream_access (&bitstream, &data.new_hm, CP_BENTRY_BIT_SIZE_HM_NEWHM);
+ bitstream_finalise (&bitstream);
+
+ return bentry_addr + CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_HM)
+ + CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_HEADER);
+}
+
+/**
+ * Process the persistent schedule bentry
+ *
+ * \param ctx the cp_beacon context.
+ * \param bentry the bentry to process.
+ * \param sched the current schedule to program
+ */
+u8 *
+cp_bentry_persistent_schedule_process (cp_beacon_t *ctx, u8 *bentry,
+ cp_beacon_desc_alloc_t *sched)
+{
+ bitstream_t bitstream;
+ cp_bentry_persistent_schedule_struct_t bb;
+ cp_bentry_sai_t sai;
+ uint ns;
+ uint res;
+
+ dbg_assert (ctx);
+ dbg_assert (ctx->ca);
+ dbg_assert (bentry);
+ dbg_assert (sched);
+
+ /* TODO Fill this function correctly...
+ * Actually only a schedule is present for the CSMA-only mode.
+ */
+
+ // Get the pscd, cscd and the ns from the bentry.
+ bitstream_init (&bitstream, bentry, CP_BENTRY_BIT_SIZE_PERSISTENT_SCHEDULE,
+ BITSTREAM_READ);
+ bitstream_access (&bitstream, &bb.pscd, CP_BENTRY_BIT_SIZE_PSCD);
+ bitstream_access (&bitstream, &bb.cscd, CP_BENTRY_BIT_SIZE_CSCD);
+ bitstream_access (&bitstream, &res, 2);
+ bitstream_access (&bitstream, &bb.ns, CP_BENTRY_BIT_SIZE_NS);
+ bitstream_finalise (&bitstream);
+
+ bentry += CP_BENTRY_BYTE_SIZEOF (CP_BENTRY_BIT_SIZE_PERSISTENT_SCHEDULE);
+
+ ctx->bentries_data.pscd = bb.pscd;
+ ctx->bentries_data.cscd = bb.cscd;
+
+ // Initialize the schedule persistente session.
+ for (ns = bb.ns; ns; ns--)
+ {
+ if (read_u8_from_word (bentry) & 0x1)
+ {
+ // SAI with STPF == 1
+ bitstream_init (&bitstream, bentry, CP_BENTRY_BIT_SIZE_SAI_STPF,
+ BITSTREAM_READ);
+ bitstream_access (&bitstream, &sai.stpf, CP_BENTRY_BIT_SIZE_STPF);
+ bitstream_access (&bitstream, &sai.glid, CP_BENTRY_BIT_SIZE_GLID);
+ bitstream_access (&bitstream, &sai.st, CP_BENTRY_BIT_SIZE_ST);
+ bitstream_access (&bitstream, &sai.et, CP_BENTRY_BIT_SIZE_ET);
+ bitstream_finalise (&bitstream);
+
+ // Store the glid in the allocation, the glid in the sptf is 7 bit
+ // long, they admit that the msb bit is allow true.
+ sched->ca_sched->allocations[sched->next_alloc].glid =
+ 0x80 | sai.glid;
+ sched->ca_sched->allocations[sched->next_alloc].end_offset_tck =
+ MAC_ATU_TO_TCK (sai.et);
+
+ bentry += CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_SAI_STPF);
+ }
+ else
+ {
+ bitstream_init (&bitstream, bentry, CP_BENTRY_BIT_SIZE_SAI,
+ BITSTREAM_READ);
+ bitstream_access (&bitstream, &sai.stpf, CP_BENTRY_BIT_SIZE_STPF);
+ bitstream_access (&bitstream, &sai.glid, CP_BENTRY_BIT_SIZE_GLID);
+ bitstream_access (&bitstream, &sai.et, CP_BENTRY_BIT_SIZE_ET);
+ bitstream_finalise (&bitstream);
+
+ // Store the glid in the allocation, the glid in the sptf is 7 bit
+ // long, they admit that the msb bit is allow true.
+ sched->ca_sched->allocations[sched->next_alloc].glid =
+ 0x80 | sai.glid;
+ sched->ca_sched->allocations[sched->next_alloc].end_offset_tck =
+ MAC_ATU_TO_TCK (sai.et);
+
+ bentry += CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_SAI);
+ }
+
+ sched->next_alloc++;
+ }
+
+ return bentry;
+}
+
+/**
+ * Process the non persistent schedule bentry
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ * \param sched current schedule program
+ */
+u8 *
+cp_bentry_non_persistent_schedule_process (cp_beacon_t *ctx, u8 *bentry,
+ cp_beacon_desc_alloc_t *sched)
+{
+ bitstream_t bitstream;
+ cp_bentry_persistent_schedule_struct_t bb;
+ cp_bentry_sai_t sai;
+ uint ns;
+ uint bentry_end = 0;
+
+ dbg_assert (ctx);
+ dbg_assert (ctx->ca);
+ dbg_assert (bentry);
+ dbg_assert (sched);
+
+ /* TODO Fill this function correctly...
+ * Actually only a schedule is present for the CSMA-only mode.
+ */
+
+ // Get the pscd, cscd and the ns from the bentry.
+ bitstream_init (&bitstream, bentry, CP_BENTRY_BIT_SIZE_NON_PERSISTENT_SCHEDULE,
+ BITSTREAM_READ);
+ bitstream_access (&bitstream, &bb.ns, CP_BENTRY_BIT_SIZE_NS);
+ bitstream_finalise (&bitstream);
+
+ bentry += CP_BENTRY_BYTE_SIZEOF (CP_BENTRY_BIT_SIZE_NON_PERSISTENT_SCHEDULE);
+
+ // Initialize the schedule persistente session.
+ for (ns = bb.ns; ns; ns--)
+ {
+ if (read_u8_from_word (bentry) & 0x1)
+ {
+ // SAI with STPF == 1
+ bitstream_init (&bitstream, bentry, CP_BENTRY_BIT_SIZE_SAI_STPF,
+ BITSTREAM_READ);
+ bitstream_access (&bitstream, &sai.stpf, CP_BENTRY_BIT_SIZE_STPF);
+ bitstream_access (&bitstream, &sai.glid, CP_BENTRY_BIT_SIZE_GLID);
+ bitstream_access (&bitstream, &sai.st, CP_BENTRY_BIT_SIZE_ST);
+ bitstream_access (&bitstream, &sai.et, CP_BENTRY_BIT_SIZE_ET);
+ bitstream_finalise (&bitstream);
+
+ // Store the glid in the allocation, the glid in the sptf is 7 bit
+ // long, they admit that the msb bit is allow true.
+ sched->ca_sched->allocations[sched->next_alloc].glid =
+ 0x80 | sai.glid;
+ sched->ca_sched->allocations[sched->next_alloc].end_offset_tck =
+ MAC_ATU_TO_TCK (sai.et);
+
+ bentry_end += CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_SAI_STPF);
+ }
+ else
+ {
+ bitstream_init (&bitstream, bentry, CP_BENTRY_BIT_SIZE_SAI,
+ BITSTREAM_READ);
+ bitstream_access (&bitstream, &sai.stpf, CP_BENTRY_BIT_SIZE_STPF);
+ bitstream_access (&bitstream, &sai.glid, CP_BENTRY_BIT_SIZE_GLID);
+ bitstream_access (&bitstream, &sai.et, CP_BENTRY_BIT_SIZE_ET);
+ bitstream_finalise (&bitstream);
+
+ // Store the glid in the allocation, the glid in the sptf is 7 bit
+ // long, they admit that the msb bit is allow true.
+ sched->ca_sched->allocations[sched->next_alloc].glid =
+ 0x80 | sai.glid;
+ sched->ca_sched->allocations[sched->next_alloc].end_offset_tck =
+ MAC_ATU_TO_TCK (sai.et);
+
+ bentry_end += CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_SAI);
+ }
+
+ sched->next_alloc++;
+ }
+
+ return bentry + bentry_end;
+}
+
+/**
+ * Process a bentry regions.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process, the bentry payload, it does not contain the
+ * bentry header and the bentry length.
+ */
+u8 *
+cp_bentry_regions_process (cp_beacon_t *ctx, u8 *bentry)
+{
+ // TODO
+
+ return bentry + 3;
+}
+
+/**
+ * Process a mac address bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process only the payload, the bentry header and the
+ * length are not provided.
+ * \param mac the mac address to copy the bentry address in it.
+ */
+u8 *
+cp_bentry_mac_address_process (cp_beacon_t *ctx, u8 *bentry, mac_t *mac)
+{
+ bitstream_t bitstream;
+ dbg_assert (ctx);
+ dbg_assert (ctx->sta);
+ dbg_assert (mac);
+
+ bitstream_init (&bitstream, bentry, 6, BITSTREAM_READ);
+ bitstream_access (&bitstream, mac, 48);
+ bitstream_finalise (&bitstream);
+
+ return bentry + 6;
+}
+
+/**
+ * Process a discover bentry.
+ * TODO The discover beacon must contain the MAC address of the sta which
+ * emits the it.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ * \param central_beacon the central beacon received.
+ */
+u8 *
+cp_bentry_discover_process (cp_beacon_t *ctx, u8 *bentry,
+ cp_beacon_desc_t *central_beacon)
+{
+ dbg_assert (ctx);
+ dbg_assert (ctx->sta);
+ dbg_assert (bentry);
+ dbg_assert (central_beacon);
+
+ if (cp_station_get_tei(ctx->sta) == read_u8_from_word(bentry))
+ {
+ cp_beacon_desc_t *beacon;
+ mfs_tx_t *mfs_beacon;
+ bool added;
+ bitstream_t bitstream;
+ uint tei;
+ uint bt;
+ uint word;
+ u8 *bentry;
+ uint nbe;
+
+ u8 *cbentry;
+ uint cbentry_hdr;
+ uint cnbe;
+ uint cbentry_len;
+ uint bentry_header_len;
+
+ //Generate the discover beacon and provide it to the CA.
+ beacon = (cp_beacon_desc_t *) blk_alloc_desc();
+
+ // Store the discover beacon in the discover context.
+ if (ctx->dbeacon.last_beacon)
+ {
+ blk_release_desc ((blk_t *) ctx->dbeacon.last_beacon);
+ }
+ blk_addref_desc ((blk_t *) beacon);
+ ctx->dbeacon.last_beacon = beacon;
+
+ // Copy the nid of the central beacon.
+ beacon->nid_msb = central_beacon->nid_msb;
+
+ // copy the rest of the beacon paylaod
+ memcpy (beacon->payload->beacon_mpdu_payload,
+ central_beacon->payload->beacon_mpdu_payload, 8);
+
+ tei = cp_station_get_tei (ctx->sta);
+ bt = CP_BEACON_DISCOVER_BEACON;
+ // store the data.
+ beacon->payload->beacon_mpdu_payload[3] = tei;
+ word = read_u32_from_word (beacon->payload->beacon_mpdu_payload + 4);
+ bitstream_init (&bitstream, beacon->payload->beacon_mpdu_payload + 4,
+ sizeof (uint), BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &bt, 3);
+ bitstream_access (&bitstream, &word, sizeof(uint) - 3);
+ bitstream_finalise (&bitstream);
+
+ // Insert the mandatory bentries.
+ bentry = beacon->payload->bmis;
+ bentry = cp_bentry_mac_address (ctx, bentry);
+ bentry = cp_bentry_discover_info (ctx, bentry);
+
+ // Search for the region, non persistent and perisistent bentry in the
+ // central beacon.
+ nbe = 2;
+ bentry_header_len = CP_BENTRY_BYTE_SIZEOF (CP_BENTRY_HEADER);
+ cbentry = central_beacon->payload->bmis;
+ for (cnbe = central_beacon->payload->nbe; cnbe; cnbe --)
+ {
+ cbentry_hdr = read_u8_from_word(cbentry);
+ cbentry_len = read_u8_from_word (cbentry + 1);
+
+ if ((cbentry_hdr == CP_BENTRY_REGIONS)
+ || (cbentry_hdr == CP_BENTRY_NON_PERSISTENT_SCHEDULE)
+ || (cbentry_hdr == CP_BENTRY_PERSISTENT_SCHEDULE))
+ {
+ memcpy (bentry, cbentry, cbentry_len);
+ nbe ++;
+ bentry += bentry_header_len + cbentry_len;
+ }
+
+ cbentry += bentry_header_len + cbentry_len;
+ }
+
+ beacon->payload->nbe = nbe;
+
+ /* Create the MFS
+ * see http://pessac/cesar/trac/wiki/SoftMacBeacons#BeaconMFS
+ * for more details.
+ */
+ dbg_assert (ctx->mac_store);
+ mfs_beacon = mac_store_mfs_add_tx (ctx->mac_store, true, false,
+ MAC_LID_DISCOVER, 0xff, &added);
+
+ if (added)
+ {
+ ctx->dbeacon.mfs = mfs_beacon;
+ mfs_beacon->common.ats = false;
+ mfs_beacon->cap = 0x2;
+ mfs_beacon->beacon = true;
+
+ // Add the mfs to the CA.
+ ca_mfs_add (ctx->ca, mfs_beacon);
+ }
+
+ // Estimate the bts and btos.
+ cp_beacon_estimate_bts_bto_bp (ctx, &ctx->dbeacon);
+
+ dbg_assert (ctx->pbproc);
+ pbproc_mfs_beacon_prepare (ctx->pbproc, mfs_beacon, (pb_beacon_t *) beacon,
+ &ctx->dbeacon.bto_bpsto);
+ }
+
+ return bentry + 3;
+}
+
+/**
+ * Process a discover info bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_discover_info_process (cp_beacon_t *ctx, u8 *bentry)
+{
+ dbg_assert (ctx);
+ dbg_assert (bentry);
+
+ return bentry + 4;
+}
+
+/**
+ * Process a beacon period start offset bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process, the bentry payload, it does not contain the
+ * bentry header and the bentry length.
+ * \param bpsto the beacon period start time offset to be filled.
+ */
+u8 *
+cp_bentry_bpsto_process (cp_beacon_t *ctx, u8 *bentry, uint *bpsto)
+{
+ dbg_assert (ctx);
+ dbg_assert (ctx->sta);
+
+ *bpsto = read_u24_from_word (bentry);
+
+ return bentry + 3;
+}
+
+/**
+ * Process the encryption key change bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_encryption_key_change_process (cp_beacon_t *ctx, u8 *bentry)
+{
+ dbg_assert (false);
+}
+
+/**
+ * Process the Handover in progress bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_handover_process (cp_beacon_t *ctx, u8 *bentry)
+{
+ dbg_assert (false);
+}
+
+/**
+ * Process the beacon relocation bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_beacon_relocation_process (cp_beacon_t *ctx, u8 *bentry)
+{
+ dbg_assert(false);
+}
+
+/**
+ * Process the AC Line synchronization bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_ac_line_sync_countdown_process (cp_beacon_t *ctx, u8 *bentry)
+{
+ dbg_assert (false);
+}
+
+/**
+ * Process the bentry change num slots.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_change_num_slots_process (cp_beacon_t *ctx, u8 *bentry)
+{
+ dbg_assert (false);
+}
+
+/**
+ * Process the change Hybrid Mode bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_change_hm_process (cp_beacon_t *ctx, u8 *bentry)
+{
+ dbg_assert (false);
+}
+
+/**
+ * Process the change snid bentry.
+ *
+ *\param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_change_snid_process (cp_beacon_t *ctx, u8 *bentry)
+{
+ dbg_assert (false);
+}
+
+/**
+ * Proces the vendor specific bentry.
+ *
+ * \param ctx the cp_beacon context
+ * \param bentry to process
+ */
+u8 *
+cp_bentry_vendor_specific_process (cp_beacon_t *ctx, u8 *bentry)
+{
+ dbg_assert (false);
+}
+
diff --git a/cesar/cp/beacon/src/ntb_clock_sync.c b/cesar/cp/beacon/src/ntb_clock_sync.c
new file mode 100755
index 0000000000..248f87b564
--- /dev/null
+++ b/cesar/cp/beacon/src/ntb_clock_sync.c
@@ -0,0 +1,543 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/src/ntb_clock_sync.c
+ * \brief 25Mhz clock management and synchronization functions.
+ * \ingroup cp_beacon
+ */
+#include "common/std.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+
+#include "cp/beacon/inc/ntb_clock_sync.h"
+
+// Constants
+#ifdef MANUFACTURER_TEST
+//unsigned long PHY_Clk[] = { 74999997, 74992500, 75000030 }; // PHY clock frequency in Hz (CCo, STA1, STA2)
+unsigned long PHY_Clk[] = { 75001875, /*74998125*/75001875, 75000030 }; // PHY clock frequency in Hz (CCo, STA1, STA2)
+unsigned long numerator[] = { 1000000, 1000000, 1000000 }; // numerator for PHY clock division factor (CCo, STA1, STA2)
+unsigned long divisor[] = { 3000000, 3000000, 3000000 }; // divisor for PHY clock division factor (CCo, STA1, STA2)
+#endif
+
+#define max_ppm_deriv 1
+//#define max_ticks_deriv (max_ppm_deriv * STA_Clk_theoric / 1000000)
+#define max_ticks_deriv 0
+
+#define MAX_SAMPLES_FOR_AVERAGE 100
+#define kmax 10
+
+#define NTB_FREQU_MIN_25MHZ 24999375.0 // 25 Mhz + 25 ppm
+#define NTB_FREQU_MAX_25MHZ 25000625.0 // 25 Mhz - 25 ppm
+#define PWL_FREQU_MIN_50HZ 47.0 // see EN50160
+#define PWL_FREQU_MAX_50HZ 52.0 // see EN50160
+
+// More declarations & inits
+
+
+#ifdef MANUFACTURER_TEST
+double STA_Clk[] = { 0.0, 0.0, 0.0 }; // NTB STA clock frequency in Hz (CCo, STA1, STA2)
+double beacon_period_decimal_ticks[] = { 0.0, 0.0, 0.0 };
+unsigned long beacon_period_ticks[] = { 0, 0, 0 };
+#else
+double STA_Clk[] = { 0.0, 0.0 }; // NTB STA clock frequency in Hz (CCo, STA)
+double beacon_period_decimal_ticks[] = { 0.0, 0.0 };
+unsigned long beacon_period_ticks[] = { 0, 0 };
+#endif
+
+#ifdef MANUFACTURER_TEST
+unsigned long current_sta = 0;
+unsigned long beacon[count_of_beacons]; // beacon index
+signed long sta_cco_offset_ticks[smax-1];
+double cco_ntb_date_decticks[smax-1][count_of_beacons]; // CCo NTB date in decimal ticks
+unsigned long bts_ticks[smax-1][count_of_beacons]; // BTS (Beacon Time Stamp) = CCo NTB date in entire ticks
+double sta_ntb_date_decticks[smax-1][count_of_beacons]; // STAn NTB date in decimal ticks
+unsigned long sta_ntb_date_ticks[smax-1][count_of_beacons]; // STAn NTB date in entire ticks
+double sta_phy_date_decticks[smax-1][count_of_beacons]; // PHY LTmr = STAn 25Mhz PHY date (not corrected) in decimal ticks
+unsigned long sta_phy_date_ticks[smax-1][count_of_beacons]; // PHY LTmr = STAn 25Mhz PHY date (not corrected) in entire ticks
+signed long sta_deriv_from_cco_ntb_ticks[smax-1][count_of_beacons]; // STAn NTB date derive from CCo NTB in entire ticks
+signed long sta_relative_deriv_from_cco_ntb_ticks[smax-1][count_of_beacons]; // STAn NTB date relative derive from CCo NTB in entire ticks
+unsigned long sta_numerator[smax-1][count_of_beacons]; // STAn current numerator for PHY_Clk divisor
+double sta_clk_frequ[smax-1][count_of_beacons]; // STAn current STA_Clk frenquency in Hz
+unsigned long sta_predict_next_bts_ticks[smax-1][count_of_beacons]; // Predicted value of CCo NTB date [next BTS] at next beacon (in entire ticks)
+unsigned long sta_predict_next_sta_ticks[smax-1][count_of_beacons]; // Predicted value of STAn NTB date at next beacon if no correction (in entire ticks)
+signed long sta_predict_error_of_next_sta_ticks[smax-1][count_of_beacons]; // Predicted error of STAn NTB date at next beacon (compared to next BTS value) if no correction (in entire ticks)
+double sta_clk_frequ_should_be[smax-1][count_of_beacons]; // STAn STA clock should be adjusted to (in Hz)
+double sta_decimal_numerator_should_be[smax-1][count_of_beacons]; // For max. derive of 25 ticks (25 ticks = 1 ppm @ 25Mhz), STAn STA/PHY clock ratio should be adjusted to (decimal numerator)
+unsigned long sta_integer_numerator_should_be[smax-1][count_of_beacons]; // STAn STA/PHY clock ratio should be adjusted to (pure integer numerator)
+double sta_clk_frequ_will_be[smax-1][count_of_beacons]; // STAn STA clock will be adjusted to (in Hz)
+double sta_clk_frequ_sync_ratio[smax-1][count_of_beacons];
+#endif
+
+#if 0
+static unsigned long long beacon_count = 0;
+#endif
+
+static unsigned long ntb_lost_beacons(unsigned long delta_ticks);
+
+/*
+ * Set or update NTB offset in the MAC Config.
+ * \param ntb_ctx, pointer to ntb context
+ * \param offset, offset between NTB date (CCo date) and NTB_STA date (station date)
+ */
+void ntb_update_offset_in_mac_config(ntb_t *ntb_ctx, signed long offset)
+{
+ dbg_assert_ptr(ntb_ctx);
+ dbg_assert_ptr(ntb_ctx->ntb_mac_config);
+
+ /* update the u32 "ntb_offset_tck" field (NTB offset) in the mac_config_t Struct Reference */
+ ntb_ctx->ntb_mac_config->ntb_offset_tck = (unsigned long) offset;
+}
+
+/*
+ * NTB clock management module initialisation.
+ * \param phy_ctx, pointer to phy context
+ * \param mac_config, pointer to mac config
+ * \return pointer to ntb_t ntb context data structure being allocated
+ */
+ntb_t * ntb_init(phy_t *phy_ctx, mac_config_t *mac_config)
+{
+ //int i;
+ ntb_t * ntb_ctx;
+
+ dbg_assert_ptr(phy_ctx);
+ dbg_assert_ptr(mac_config);
+
+ ntb_ctx = malloc(sizeof(ntb_t));
+ if (ntb_ctx != NULL)
+ {
+ /* reset ntb context data */
+ memset(ntb_ctx,0x00,sizeof(ntb_t));
+
+ /* set pointers to needed contexts */
+ ntb_ctx->ntb_phy_ctx = phy_ctx;
+ ntb_ctx->ntb_mac_config = mac_config;
+
+ /*for (i = 0; i < smax; i++)
+ {
+ ntb_ctx->STA_Clk[i] = 0.0;
+ ntb_ctx->beacon_period_decimal_ticks[i] = 0.0;
+ ntb_ctx->beacon_period_ticks[i] = 0;
+ }*/
+
+ ntb_ctx->beacon_count = 0;
+
+ /* initialize the numerator value in the PRATIC config to its default value (1000000) */
+ phy_clock_set_numerator (ntb_ctx->ntb_phy_ctx, NTB_DEFAULT_NUMERATOR);
+ /* initialize the offset value in the MAC Config to zero by default */
+ ntb_update_offset_in_mac_config(ntb_ctx, NTB_DEFAULT_OFFSET);
+ }
+
+ return ntb_ctx;
+}
+
+/*
+ * Calculate the number of beacons lost (if any) between 2 beacons received.
+ * \param delta_ticks, difference of BTS timestamp between 2 last received beacons
+ */
+static unsigned long ntb_lost_beacons(unsigned long delta_ticks)
+{
+ unsigned long i;
+
+ /*
+ * Remembering beacon period equals twice the PWL cycle (here in 25 Mhz ticks),
+ * evaluating the count of lost beacons between the two last beacons being received,
+ * by successive cumulative comparisons with min and max theoric values of normal beacon period
+ */
+ for (i = 0; ; i++)
+ {
+ if (
+ ((double)delta_ticks > ((double)(i+1)*((NTB_FREQU_MIN_25MHZ * 2.0) / PWL_FREQU_MAX_50HZ)))
+ &&
+ ((double)delta_ticks < ((double)(i+1)*((NTB_FREQU_MAX_25MHZ * 2.0) / PWL_FREQU_MIN_50HZ)))
+ )
+ break;
+ }
+ //if (i > 0) printf("%s(%lu) : %lu lost beacon(s)!!!\n",__FUNCTION__,delta_ticks,i);
+ return i;
+}
+
+/*
+ * Synchronize local STA clock by adjusting its clock divisor as needed
+ * depending on
+ *
+ * - current beacon timestamp (BTS),
+ * - SYS-base local receive time of current beacon (SYS LTmr, based on 25 Mhz local clock frequency not adjusted onto CCo clock frequency),
+ * - STA-base local receive time of current beacon (STA LTmr, based on 25 Mhz local clock frequency adjusted onto CCo clock frequency).
+ *
+ * \param ntb_ctx pointer to ntb context
+ * \param beacon_bts, beacon time stamp
+ * \param beacon_sys_ltmr, SYS local time captured when receiving beacon
+ * \param beacon_sta_ltmr, STA local time captured when receiving beacon
+ */
+void ntb_clk_sync(ntb_t *ntb_ctx, unsigned long beacon_bts, unsigned long beacon_sys_ltmr, unsigned long beacon_sta_ltmr)
+{
+ #define p ntb_ctx
+ #define nh ntb_ctx->ntb_histo
+
+ unsigned long long i; /* beacon index */
+ double err_freq_ppm;
+ unsigned long delta_bts_ticks;
+ unsigned long lost_beacons_count;
+
+ dbg_assert_ptr(p);
+ dbg_assert_ptr(p->ntb_phy_ctx);
+ dbg_assert_ptr(p->ntb_mac_config);
+
+ /* update count of beacons and current beacon index */
+ i = p->beacon_count;
+ p->beacon_count++;
+
+ /* k factor for w weighting constant (w = 1/2^k) */
+ // LOI EXPONENTIELLE
+ nh.k = (int) (kmax+1)*(1-exp(-(i*1.0)/100.0));
+
+ /* save old values */
+ nh.bts_ticks[prev] = nh.bts_ticks[curr];
+ nh.sta_ntb_date_decticks[prev] = nh.sta_ntb_date_decticks[curr];
+ nh.sta_ntb_date_ticks[prev] = nh.sta_ntb_date_ticks[curr];
+ nh.sta_phy_date_decticks[prev] = nh.sta_phy_date_decticks[curr];
+ nh.sta_phy_date_ticks[prev] = nh.sta_phy_date_ticks[curr];
+ nh.sta_hpav_frequ_error[prev] = nh.sta_hpav_frequ_error[curr];
+ nh.sta_hpav_offset[prev] = nh.sta_hpav_offset[curr];
+ nh.sta_offset[prev] = nh.sta_offset[curr];
+ nh.sta_numerator[prev] = nh.sta_numerator[curr];
+ nh.sta_numerator[curr] = nh.sta_numerator[next];
+
+ /* compute new current data depending on new current values (function arguments) and, if needed, predict future values */
+ nh.bts_ticks[curr] = beacon_bts;
+ nh.sta_ntb_date_ticks[curr] = beacon_sta_ltmr;
+ nh.sta_phy_date_ticks[curr] = beacon_sys_ltmr;
+ nh.sta_phy_date_decticks[curr] = beacon_sys_ltmr;
+
+ if (i == 0)
+ {
+ nh.bts_ticks[prev] = 0;
+ nh.sta_ntb_date_decticks[prev] = 0;
+ nh.sta_ntb_date_ticks[prev] = 0;
+ nh.sta_phy_date_decticks[prev] = 0;
+ nh.sta_phy_date_ticks[prev] = 0;
+ //nh.sta_cco_offset_ticks[prev] = 0;
+ nh.sta_deriv_from_cco_ntb_ticks[prev] = 0;
+ nh.sta_relative_deriv_from_cco_ntb_ticks[prev] = 0;
+ nh.sta_numerator[prev] = 0;
+ nh.sta_clk_frequ[prev] = 0;
+ nh.sta_predict_next_bts_ticks[prev] = 0;
+ nh.sta_predict_next_sta_ticks[prev] = 0;
+ nh.sta_predict_error_of_next_sta_ticks[prev] = 0;
+ nh.sta_clk_frequ_should_be[prev] = 0;
+ nh.sta_decimal_numerator_should_be[prev] = 0;
+ nh.sta_integer_numerator_should_be[prev] = 0;
+ nh.sta_clk_frequ_will_be[prev] = 0;
+
+ nh.sta_clk_frequ_sync_ratio[prev] = 0;
+ //nh.sta_average_deriv_from_cco_ntb_ticks[prev] = 0;
+ nh.sta_count_samples_for_average_deriv[prev] = 0;
+
+ //nh.sta_cco_offset_ticks[curr] = 0;
+ nh.sta_deriv_from_cco_ntb_ticks[curr] = 0;
+ nh.sta_relative_deriv_from_cco_ntb_ticks[curr] = 0;
+ nh.sta_numerator[curr] = NTB_DEFAULT_NUMERATOR;
+ nh.sta_clk_frequ[curr] = 0;
+ nh.sta_predict_next_bts_ticks[curr] = 0;
+ nh.sta_predict_next_sta_ticks[curr] = 0;
+ nh.sta_predict_error_of_next_sta_ticks[curr] = 0;
+ nh.sta_clk_frequ_should_be[curr] = 0;
+ nh.sta_decimal_numerator_should_be[curr] = 0;
+ nh.sta_integer_numerator_should_be[curr] = 0;
+ nh.sta_clk_frequ_will_be[curr] = 0;
+ nh.sta_clk_frequ_sync_ratio[curr] = 0;
+ nh.sta_count_samples_for_average_deriv[curr] = 0;
+
+ /* only one (first) beacon received, so no sufficient data available to compute clock adjustment */
+ nh.sta_hpav_frequ_error[curr] = 0;
+ nh.sta_hpav_offset[curr] = (signed long long) nh.bts_ticks[curr] - (signed long long) nh.sta_phy_date_ticks[curr];
+
+ //*p_err_freq_ppm = 0.0;
+ err_freq_ppm = 0.0;
+ }
+ else
+ {
+ delta_bts_ticks = nh.bts_ticks[curr] - nh.bts_ticks[prev];
+ lost_beacons_count = ntb_lost_beacons(delta_bts_ticks);
+ //if (lost_beacons_count > 0) printf("%s() : %lu lost beacon(s)\n",__FUNCTION__,lost_beacons_count);
+ if (i == 1)
+ {
+ /* two beacons received, compute/prepare clock adjustment parameters */
+ nh.sta_hpav_frequ_error[curr] = (double)(nh.bts_ticks[curr] - nh.bts_ticks[prev]) / (double)(nh.sta_phy_date_ticks[curr] - nh.sta_phy_date_ticks[prev]) - 1;
+ nh.sta_hpav_offset[curr] = (signed long long) nh.bts_ticks[curr] - (signed long long) nh.sta_phy_date_ticks[curr];
+ }
+ else
+ {
+ /* more than two beacons received, compute/prepare clock adjustment parameters */
+ nh.sta_hpav_frequ_error[curr] = nh.sta_hpav_frequ_error[prev] + (1.0/pow(2.0,nh.k)) * ((double)(nh.bts_ticks[curr] - nh.bts_ticks[prev]) / (double)(nh.sta_phy_date_ticks[curr] - nh.sta_phy_date_ticks[prev]) - 1 - nh.sta_hpav_frequ_error[prev]);
+ /*nh.sta_hpav_offset[curr] = nh.sta_hpav_offset[prev] + nh.sta_hpav_frequ_error[curr] * (nh.sta_ntb_date_ticks[curr] - nh.sta_ntb_date_ticks[prev]) + (1.0/pow(2.0,nh.k)) * ((nh.bts_ticks[curr] - nh.sta_ntb_date_ticks[curr]) - (nh.sta_hpav_offset[prev] + nh.sta_hpav_frequ_error[curr] * (nh.sta_ntb_date_ticks[curr] - nh.sta_ntb_date_ticks[prev])));*/
+ nh.sta_hpav_offset[curr] = (double) nh.sta_hpav_offset[prev] + nh.sta_hpav_frequ_error[curr] * (double)((signed long long)nh.sta_phy_date_ticks[curr] - (signed long long)nh.sta_phy_date_ticks[prev]) + (1.0/pow(2.0,nh.k)) * (double)((signed long long)nh.bts_ticks[curr] - (signed long long)nh.sta_phy_date_ticks[curr]) - ((signed long long)nh.sta_hpav_offset[prev] + nh.sta_hpav_frequ_error[curr] * (double)((signed long long)nh.sta_phy_date_ticks[curr] - (signed long long)nh.sta_phy_date_ticks[prev]));
+ }
+ err_freq_ppm = nh.sta_hpav_frequ_error[curr] * 1000000.0;
+ phy_sysclock_set_freqerror (ntb_ctx->ntb_phy_ctx, err_freq_ppm);
+ /* At least 2 beacons received, we can compute/estimate STA clock offset & derivation and update the clock divisor factor as needed */
+ //nh.sta_ntb_estimated_decticks[curr] = nh.sta_ntb_date_decticks[curr] + nh.sta_hpav_offset[curr] + nh.sta_hpav_frequ_error[curr] * (nh.sta_ntb_date_decticks[curr] - nh.sta_ntb_date_decticks[prev]);
+ //nh.sta_ntb_estimated_ticks[curr] = nh.sta_ntb_date_ticks[curr] + nh.sta_hpav_offset[curr] + nh.sta_hpav_frequ_error[curr] * (nh.sta_ntb_date_ticks[curr] - nh.sta_ntb_date_ticks[curr-1]);
+ nh.sta_decimal_numerator_should_be[curr] = (double)NTB_DEFAULT_NUMERATOR * (nh.sta_hpav_frequ_error[curr] + 1.0);
+ nh.sta_integer_numerator_should_be[curr] = (signed long)(nh.sta_decimal_numerator_should_be[curr]+0.5);
+ if (nh.sta_integer_numerator_should_be[curr] != nh.sta_numerator[curr])
+ {
+ // update the numerator value in the PRATIC config ! */
+ phy_clock_set_numerator (ntb_ctx->ntb_phy_ctx, nh.sta_integer_numerator_should_be[curr]);
+ nh.sta_numerator[next] = nh.sta_integer_numerator_should_be[curr];
+ }
+ else
+ {
+ nh.sta_numerator[next] = nh.sta_numerator[curr];
+ }
+ }
+
+ /* offset from adjusted STA clock to NTB clock (NTB clock = CCo clock) */
+ nh.sta_offset[curr] = nh.bts_ticks[curr] - nh.sta_ntb_date_ticks[curr];
+ //nh.sta_offset[curr] = nh.bts_ticks[curr] - nh.sta_phy_date_ticks[curr];
+ //printf ("%d\n", (nh.bts_ticks[curr] - nh.bts[prev]) - (
+ //if (nh.k>=7)
+ //int t;
+ //if (nh.k<3) t=0;
+ //else t = nh.k-3;
+ // nh.sta_offset[curr] = nh.sta_offset[prev] + (1.0/pow(2,nh.k-7))*(nh.sta_offset[curr] - nh.sta_offset[prev]);
+ if (nh.sta_offset[curr] != nh.sta_offset[prev])
+ {
+ /* update the offset value in the MAC Config ! */
+ ntb_update_offset_in_mac_config(ntb_ctx, nh.sta_offset[curr]);
+ nh.sta_offset[next] = nh.sta_offset[curr];
+ }
+ else
+ {
+ nh.sta_offset[next] = nh.sta_offset[prev];
+ }
+
+#ifdef MANUFACTURER_TEST
+ printf("Beacon_%05llu %010lu %010lu %011ld (%05ld) %010lu %010lu %05ld %08.14g %08.14g %02.14g (numer.div=%07lu) [%03lu]\n",
+ i,
+ nh.bts_ticks[curr],
+ nh.sta_ntb_date_ticks[curr],
+ (signed long)((signed long long)nh.sta_ntb_date_ticks[curr]-(signed long long)nh.bts_ticks[curr]),
+ nh.sta_relative_deriv_from_cco_ntb_ticks[curr],
+ nh.sta_predict_next_bts_ticks[curr],
+ nh.sta_predict_next_sta_ticks[curr],
+ nh.sta_predict_error_of_next_sta_ticks[curr],
+ STA_Clk[0],
+ nh.sta_clk_frequ_will_be[curr],
+ nh.sta_clk_frequ_sync_ratio[curr],
+ nh.sta_integer_numerator_should_be[curr],
+ nh.sta_count_samples_for_average_deriv[curr]
+ );
+#else
+
+ printf("Beacon_%05llu (%lu) %010lu %010lu %011ld (%05ld) %010lu %010lu %05ld %08.14g %08.14g %02.14g (numer.div=%07lu) [%03lu] %02.14g\n",
+ i,
+ nh.k,
+ nh.bts_ticks[curr],
+ nh.sta_ntb_date_ticks[curr],
+ (signed long)((signed long long)nh.sta_ntb_date_ticks[curr]-(signed long long)nh.bts_ticks[curr]),
+ nh.sta_relative_deriv_from_cco_ntb_ticks[curr],
+ nh.sta_predict_next_bts_ticks[curr],
+ nh.sta_predict_next_sta_ticks[curr],
+ nh.sta_predict_error_of_next_sta_ticks[curr],
+ STA_Clk[0],
+ nh.sta_clk_frequ_will_be[curr],
+ nh.sta_clk_frequ_sync_ratio[curr],
+ nh.sta_integer_numerator_should_be[curr],
+ nh.sta_count_samples_for_average_deriv[curr],
+ err_freq_ppm//nh.sta_average_deriv_from_cco_ntb_ticks[curr]
+ );
+
+#endif
+
+}
+
+
+#ifdef MANUFACTURER_TEST
+// Computing clock synchronization over time & beacons transmitted by CCo and received by STAs...
+// argv[1] = initial date for CCo
+// argv[2] = initial date for STA1
+// argv[3] = initial date for STA2
+int main(int argc, char *argv[])
+{
+ unsigned long s;
+ unsigned long i;
+ unsigned long cco_ntb_date_begin_ticks = 0;
+ unsigned long sta_ntb_date_begin_ticks[smax-1];
+ phy_t phy_ctx[smax-1];
+ mac_config_t mac_cfg[smax-1];
+ ntb_t * my_ntb_ctx[smax-1];
+
+ ///////////////// Inits... ///////////////////////////////////////
+
+ if (argc > 2)
+ {
+ cco_ntb_date_begin_ticks = atoi(argv[1]);
+ for (s = 0; s < (argc-2); s++)
+ {
+ sta_ntb_date_begin_ticks[s] = atoi(argv[s+2]);
+ }
+ }
+ else
+ {
+ for (s = 0; s < (smax-1); s++)
+ {
+ sta_ntb_date_begin_ticks[s] = 0;
+ }
+ }
+
+ /*for (i = 0; i < (smax-1); i++)
+ {
+ my_ntb_ctx[i] = ntb_init(&phy_ctx[i],&mac_cfg[i]);
+ if (my_ntb_ctx[i] == NULL)
+ {
+ return -1;
+ }
+ }*/
+
+ //for (i = 0; i < smax; i++) s[i] = i + 1;
+
+ for (i = 0; i < smax; i++)
+ {
+ STA_Clk[i] = ((double)PHY_Clk[i] * (double)numerator[i]) / (double)divisor[i];
+ beacon_period_decimal_ticks[i] = (double)(STA_Clk[i] * ((double)beacon_period/1000.0)) / 1000.0;
+ beacon_period_ticks[i] = (signed long)(beacon_period_decimal_ticks[i]);
+ }
+
+ ///////////////// End of Inits /////////////////////////////////////
+
+
+ //// Simulation loop ////
+
+ // for each beacon...
+ for (i = 0; i < count_of_beacons; i++)
+ {
+ // for each STA receiving that beacon...
+ for (s = 0; s < (smax-1); s++)
+ {
+ cco_ntb_date_decticks[s][i] = cco_ntb_date_begin_ticks + ((double)i * beacon_period_decimal_ticks[CCO]);
+ bts_ticks[s][i] = (signed long)(cco_ntb_date_decticks[s][i]);
+ sta_phy_date_decticks[s][i] = sta_ntb_date_begin_ticks[s] + ((double)i * beacon_period_decimal_ticks[s+1]);
+ sta_phy_date_ticks[s][i] = (signed long)(sta_phy_date_decticks[s][i]);
+
+ if (i == 0)
+ {
+ // first beacon...
+ sta_numerator[s][i] = numerator[s+1];
+ sta_clk_frequ[s][i] = STA_Clk[s+1];
+ sta_ntb_date_decticks[s][i] = sta_ntb_date_begin_ticks[s];
+ sta_ntb_date_ticks[s][i] = (signed long)(sta_ntb_date_decticks[s][i]);
+ sta_cco_offset_ticks[s] = (signed long) (sta_ntb_date_ticks[s][i] - bts_ticks[s][i]);
+ sta_predict_next_bts_ticks[s][i] = 0; // N/A => 0 ? Shall be theoritically [current_BTS + theoric_ticks_count_for_beacon_period_at_25mhz] !
+ sta_predict_next_sta_ticks[s][i] = 0; // N/A => 0 ? Shall be theoritically [current_STA_Clk + theoric_ticks_count_for_beacon_period_at_current_STA_Clk_Frequ] !
+ sta_predict_error_of_next_sta_ticks[s][i] = 0; // N/A => 0 ?
+ sta_clk_frequ_should_be[s][i] = sta_clk_frequ[s][i];
+ sta_clk_frequ_sync_ratio[s][i] = sta_clk_frequ_should_be[s][i] / sta_clk_frequ[s][i];
+ sta_decimal_numerator_should_be[s][i] = numerator[s+1];
+ }
+ else
+ {
+ // next beacons...
+ sta_numerator[s][i] = sta_integer_numerator_should_be[s][i-1];
+ sta_clk_frequ[s][i] = sta_clk_frequ_will_be[s][i-1];
+ sta_ntb_date_decticks[s][i] = sta_ntb_date_decticks[s][i-1] + ((sta_clk_frequ_will_be[s][i-1] * ((double)beacon_period/1000.0)) / 1000.0);
+ sta_ntb_date_ticks[s][i] = (signed long)(sta_ntb_date_decticks[s][i]);
+ sta_predict_next_bts_ticks[s][i] = bts_ticks[s][i] + (bts_ticks[s][i] - bts_ticks[s][i-1]);
+ sta_predict_next_sta_ticks[s][i] = sta_ntb_date_ticks[s][i] + (sta_ntb_date_ticks[s][i] - sta_ntb_date_ticks[s][i-1]);
+ sta_predict_error_of_next_sta_ticks[s][i] = (signed long)( sta_predict_next_sta_ticks[s][i]
+ - sta_predict_next_bts_ticks[s][i]
+ - sta_cco_offset_ticks[s]);
+ sta_clk_frequ_should_be[s][i] = (double)((sta_predict_next_bts_ticks[s][i] - (sta_ntb_date_ticks[s][i]-sta_cco_offset_ticks[s])) * 1000) / ((double)beacon_period/1000.0);
+ sta_clk_frequ_sync_ratio[s][i] = sta_clk_frequ_should_be[s][i] / sta_clk_frequ[s][i];
+
+ // detect clock derive and, if needed, compute the clock division factor to adjust the clock frequency...
+ if (abs(sta_predict_error_of_next_sta_ticks[s][i]) < max_ticks_deriv)
+ {
+ sta_decimal_numerator_should_be[s][i] = sta_numerator[s][i];
+ }
+ else
+ {
+ sta_decimal_numerator_should_be[s][i] = ((double)sta_numerator[s][i] * sta_clk_frequ_should_be[s][i]) / sta_clk_frequ[s][i];
+ }
+ }
+ sta_integer_numerator_should_be[s][i] = (signed long)(sta_decimal_numerator_should_be[s][i]+0.5);
+ sta_clk_frequ_will_be[s][i] = ((double)PHY_Clk[s+1] * (double)sta_integer_numerator_should_be[s][i]) / (double)divisor[s+1];
+ sta_deriv_from_cco_ntb_ticks[s][i] = bts_ticks[s][i] - sta_ntb_date_ticks[s][i];
+ sta_relative_deriv_from_cco_ntb_ticks[s][i] = (signed long)((signed long long)sta_ntb_date_ticks[s][i]-(signed long long)bts_ticks[s][i]-(signed long long)sta_cco_offset_ticks[s]);
+
+ }
+ }
+
+ // print simulation data...
+ printf("\n\n");
+ // for each STA...
+ for (s = 0; s < (smax-1); s++)
+ {
+ printf("Results of clock synchronization simulation for STA%lu :\n\n",s+1);
+ // print clock synchronization data for each beacon being received...
+ for (i = 0; i < count_of_beacons; i++)
+ {
+ printf("Beacon_%05lu %010lu %010lu %010lu %011ld (%011ld ; %05ld) %010lu %010lu %05ld %08.14g %08.14g %02.14g (numer.div=%07lu)\n",
+ i,
+ sta_phy_date_ticks[s][i],
+ bts_ticks[s][i],
+ sta_ntb_date_ticks[s][i],
+ (signed long)((signed long long)sta_ntb_date_ticks[s][i]-(signed long long)bts_ticks[s][i]),
+ sta_cco_offset_ticks[s],
+ sta_relative_deriv_from_cco_ntb_ticks[s][i],
+ sta_predict_next_bts_ticks[s][i],
+ sta_predict_next_sta_ticks[s][i],
+ sta_predict_error_of_next_sta_ticks[s][i],
+ STA_Clk[0],
+ sta_clk_frequ_will_be[s][i],
+ sta_clk_frequ_sync_ratio[s][i],
+ sta_integer_numerator_should_be[s][i]
+ );
+ }
+ printf("\n\n");
+ }
+
+ signed long err_ticks;
+ double freq_err_ppm;
+ // compare simulation data with synchronization data computed with independent synchronization function (applying same algorithm)...
+ printf("\n\n");
+ // for each STA...
+ for (s = 0; s < (smax-1); s++)
+ {
+ printf("Compare results of clock synchronization for STA%lu :\n\n",s+1);
+#ifdef MANUFACTURER_TEST
+ current_sta = s+1;
+#endif
+ // new STA => need to init the NTB clock synchro module dedicated to that STA...
+ my_ntb_ctx[s] = ntb_init(&phy_ctx[s],&mac_cfg[s]);
+ if (my_ntb_ctx[s] == NULL)
+ {
+ return -1;
+ }
+ // compare clock synchronization data for each beacon being received...
+ for (i = 0; i < count_of_beacons; i++)
+ {
+#if 0
+ err_ticks = ntb_clk_sync(my_ntb_ctx[s], bts_ticks[s][i], sta_phy_date_ticks[s][i], sta_ntb_date_ticks[s][i], &freq_err_ppm);
+ if (err_ticks != sta_relative_deriv_from_cco_ntb_ticks[s][i])
+ {
+ printf("ntb_clk_sync() for beacon_%05lu on STA%lu revealed %ld tick of relative error for %ld expected by simulation\n",i,s+1,err_ticks,sta_relative_deriv_from_cco_ntb_ticks[s][i]);
+ }
+#else
+ ntb_clk_sync(my_ntb_ctx[s], bts_ticks[s][i], sta_phy_date_ticks[s][i], sta_ntb_date_ticks[s][i]);
+#endif
+ }
+ printf("\n\n");
+ free(my_ntb_ctx[s]);
+ }
+
+ return 0;
+}
+#endif
diff --git a/cesar/cp/beacon/src/trace.c b/cesar/cp/beacon/src/trace.c
new file mode 100644
index 0000000000..2929e647a6
--- /dev/null
+++ b/cesar/cp/beacon/src/trace.c
@@ -0,0 +1,71 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/src/trace.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "cp/beacon/beacons.h"
+#include "cp/beacon/inc/trace.h"
+
+#include "cp/beacon/inc/beacons_ctx.h"
+
+/**
+ * Initialize the trace buffer
+ * \param ctx the cp beacon context
+ */
+void
+cp_beacon_trace_init (cp_beacon_t *ctx)
+{
+ static trace_namespace_t namespace;
+ static const trace_event_id_t event_ids[] =
+ {
+ TRACE_EVENT (CP_BEACON_TRACE_INIT, "CP_BEACON_INIT", TIMESTAMP),
+ TRACE_EVENT (CP_BEACON_TRACE_UNINIT, "CP_BEACON_UNINIT", TIMESTAMP),
+ TRACE_EVENT (CP_BEACON_TRACE_FREQ, "CP_BEACON_FREQ detected : %d ntb, first zero cross : %d, second zero cross : %d", TIMESTAMP),
+ TRACE_EVENT (CP_BEACON_TRACE_ESTIMATION, "CP_BEACON_ESTIMATION btse : %d\t per : %d\t bto : %d %d %d %d", TIMESTAMP),
+ TRACE_EVENT (CP_BEACON_TRACE_DEFAULT_SCHED, "CP_BEACON_DEFAULT_SCHED", TIMESTAMP),
+ TRACE_EVENT (CP_BEACON_TRACE_PWL_PER, "CP_BEACON_PWL_PER, old zero cross : %d, last zero cross : %d, per ntb : %d", TIMESTAMP),
+ TRACE_EVENT (CP_BEACON_TRACE_BEACON_PROCESS, "CP_BEACON_BEACON_PROCESS BT : %d, btse : %d, bto[0] : %d, bto[1] : %d, bto[2] : %d, bto[3] : %d", TIMESTAMP),
+ TRACE_EVENT (CP_BEACON_TRACE_SEND_BEACON, "CP_BEACON_SEND_BEACON send at %d, BT : %x", TIMESTAMP),
+ TRACE_EVENT (CP_BEACON_TRACE_UPDATE_SCHED, "CP_BEACON_Schedule BT : %d, BP[0] : %d, BP[1] : %d, BP[2] : %d", TIMESTAMP),
+ TRACE_EVENT (CP_BEACON_TRACE_TIMER_PRGM, "CP_BEACON Timer program to awake in : %d", TIMESTAMP),
+ TRACE_EVENT (CP_BEACON_TRACE_BEACON_SCHED, "CP_BEACON BP Start date : %d, %d, %d, %d, schedule index : %d", TIMESTAMP),
+ };
+ dbg_assert (ctx);
+ trace_namespace_init (&namespace, event_ids, COUNT (event_ids));
+ trace_buffer_add (&ctx->trace, "cp beacon", 8, 4, true, &namespace);
+}
+
+/**
+ * Uninitialize the trace buffer
+ * \param ctx the cp beacon context.
+ */
+void
+cp_beacon_trace_uninit(cp_beacon_t *ctx)
+{
+ dbg_assert (ctx);
+ trace_buffer_remove (&ctx->trace);
+}
+
+/**
+ * Print the trace
+ * \param ctx the cp beacon context.
+ */
+void
+cp_beacon_trace_print (cp_beacon_t *ctx)
+{
+ dbg_assert (ctx);
+
+ trace_buffer_dbg_dump(&ctx->trace);
+}
+
diff --git a/cesar/cp/beacon/test/cco/Makefile b/cesar/cp/beacon/test/cco/Makefile
new file mode 100644
index 0000000000..f740421477
--- /dev/null
+++ b/cesar/cp/beacon/test/cco/Makefile
@@ -0,0 +1,25 @@
+BASE = ../../../..
+
+ECOS=y
+
+INCLUDES = cp/beacon/test/overide
+
+TARGET_PROGRAMS = ucco cco
+
+ucco_SOURCES = ucco.c phy_stub.c ca_stub.c cl_stub.c sar_stub.c ipmbox_stub.c \
+ hle_stub.c
+ucco_MODULES = lib mac/common cp/beacon hal/timer hal/leon/unit-test \
+ interface interface/sniffer \
+ cp/beacon/test/overide/cp/station \
+ cp/beacon/test/overide/cp/cco
+
+cco_SOURCES = cco.c phy_stub.c ca_stub.c cl_stub.c sar_stub.c ipmbox_stub.c \
+ hle_stub.c
+cco_MODULES = lib mac/common cp/beacon hal/timer hal/leon/unit-test \
+ interface interface/sniffer \
+ cp/beacon/test/overide/cp/station \
+ cp/beacon/test/overide/cp/cco
+
+cp_beacon_MODULE_SOURCES = beacons.c bentry.c
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/cp/beacon/test/cco/ecos.ecc.sh b/cesar/cp/beacon/test/cco/ecos.ecc.sh
new file mode 100644
index 0000000000..2443d0e40f
--- /dev/null
+++ b/cesar/cp/beacon/test/cco/ecos.ecc.sh
@@ -0,0 +1,5 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new linux default
+cat >> $config <<'EOF'
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/cp/beacon/test/cco/inc/phy_stub.h b/cesar/cp/beacon/test/cco/inc/phy_stub.h
new file mode 100644
index 0000000000..bb39c132d3
--- /dev/null
+++ b/cesar/cp/beacon/test/cco/inc/phy_stub.h
@@ -0,0 +1,28 @@
+#ifndef cp_beacon_test_central_beacon_phy_stub_h
+#define cp_beacon_test_central_beacon_phy_stub_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/phy_stub.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+
+struct phy_test_t
+{
+ uint freq_test;
+ uint ntb;
+ uint date_ntb;
+};
+typedef struct phy_test_t phy_test_t;
+
+
+#endif /* cp_beacon_test_central_beacon_phy_stub_h */
diff --git a/cesar/cp/beacon/test/cco/src/ca_stub.c b/cesar/cp/beacon/test/cco/src/ca_stub.c
new file mode 100644
index 0000000000..9ec7775696
--- /dev/null
+++ b/cesar/cp/beacon/test/cco/src/ca_stub.c
@@ -0,0 +1,57 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/src/ca_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "mac/ca/ca.h"
+
+static ca_schedule_t sched;
+
+ca_schedule_t *
+ca_alloc_get_schedule (ca_t *ctx, uint index)
+{
+ return &sched;
+}
+
+void
+ca_alloc_update_beacon_periods (ca_t *ctx,
+ ca_beacon_period_t *beacon_periods,
+ uint beacon_periods_nb)
+{
+}
+
+
+bool
+ca_mfs_remove (ca_t *ctx, mfs_tx_t *mfs)
+{
+ return true;
+}
+
+void
+ca_mfs_add (ca_t *ctx, mfs_tx_t *mfs)
+{
+ dbg_assert (ctx);
+ dbg_assert (mfs);
+}
+
+
+void
+ca_mfs_update (ca_t *ctx, mfs_tx_t *mfs)
+{
+}
+
+void
+ca_mfs_hold (ca_t *ctx, mfs_tx_t *mfs)
+{
+}
diff --git a/cesar/cp/beacon/test/cco/src/cco.c b/cesar/cp/beacon/test/cco/src/cco.c
new file mode 100644
index 0000000000..5c7c47afa3
--- /dev/null
+++ b/cesar/cp/beacon/test/cco/src/cco.c
@@ -0,0 +1,231 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/ucco/src/cco.c
+ * \brief Test the schedule procedure with the leon timer.
+ * \ingroup cp/beacon
+ *
+ */
+#include "common/std.h"
+
+#include "hal/timer/timer.h"
+
+#include "cp/station/station.h"
+#include "cp/cco/cco.h"
+#include "cp/secu/secu.h"
+#include "cp/beacon/beacons.h"
+
+#include "hal/phy/phy.h"
+
+#include "cl/cl.h"
+
+#include "mac/common/ntb.h"
+#include "mac/common/config.h"
+#include "mac/common/store.h"
+
+#include "lib/test.h"
+#include "lib/read_word.h"
+#include "lib/bitstream.h"
+
+#include <stdio.h>
+
+#include "cp/beacon/inc/beacons_ctx.h"
+
+
+cp_beacon_t *cp_beacon;
+test_t test;
+uint count_beacon;
+
+void
+cp_beacon_expired (void *user_data)
+{
+
+}
+
+void
+test_emetting_discover_beacons(void)
+{
+ uint i;
+ count_beacon = 0;
+
+ for (i = 0; i < 10; i++)
+ {
+ // Create the default schedules for the CA.
+ cp_beacon_cco_send_central_beacon (cp_beacon);
+ }
+}
+
+int
+cyg_user_start (void)
+{
+ phy_t *phy;
+ ca_t *ca;
+ pbproc_t *pbproc;
+ mac_config_t *mac_config;
+ mac_store_t *mac_store;
+ hal_timer_t *timer;
+ cp_sta_t *sta;
+ cp_secu_t *secu;
+ cp_cco_t *cco;
+ cl_t *cl;
+ interface_t *interface;
+ hle_t *hle;
+
+ test_init (test, 0, NULL);
+
+ cl = blk_alloc ();
+ phy = blk_alloc ();
+ ca = blk_alloc ();
+ mac_config = blk_alloc ();
+ pbproc = blk_alloc ();
+ secu = blk_alloc ();
+ cco = blk_alloc ();
+ hle = blk_alloc ();
+
+ mac_ntb_init (phy, mac_config);
+ timer = hal_timer_init (phy);
+ mac_store = mac_store_init ();
+
+ // Configure the STA to be CCo.
+ cp_cco_set_cco_status (cco, true);
+ // Add the mac_config to the sta.
+ sta = cp_station_init (mac_store, cl, pbproc, mac_config);
+ mac_config->sta_mac_address = 0x123456789abcull;
+
+ interface = interface_init (hle , cl, (sar_t *) cl, mac_config);
+
+ cp_beacon = cp_beacon_init(interface, phy, sta, secu, ca, pbproc, mac_store, cco, timer, NULL,
+ cp_beacon_expired);
+ cp_beacon_acl_frequency_detection (cp_beacon);
+ cp_beacon_acl_frequency_detection (cp_beacon);
+
+ test_emetting_discover_beacons ();
+
+ cp_beacon_uninit (cp_beacon);
+ hal_timer_uninit(timer);
+ mac_ntb_uninit ();
+ cp_station_uninit (sta);
+ mac_store_uninit (mac_store);
+
+ blk_release (cco);
+ blk_release (secu);
+ blk_release (pbproc);
+ blk_release (mac_config);
+ blk_release (ca);
+ blk_release (phy);
+ blk_release (cl);
+ blk_release (hle);
+
+
+ blk_print_memory ();
+
+ test_case_begin (test, "Memory");
+ test_begin (test, "Memory")
+ {
+ test_fail_if (blk_check_memory () != true, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
+
+/**
+ * Prepare a beacon for transmission.
+ * \param ctx pbproc context
+ * \param mfs corresponding special MFS
+ * \param pb beacon payload
+ * \param params extra parameters for beacon transmission
+ *
+ * There can only be one beacon prepared in advance (for a given MFS).
+ *
+ * This will cancel the preceding prepared beacon if it was not sent.
+ *
+ * PB reference is transfered to PB Processing. Extra parameters are copied.
+ */
+void
+pbproc_mfs_beacon_prepare (pbproc_t *ctx, mfs_tx_t *mfs, pb_beacon_t *pb,
+ const pbproc_tx_beacon_params_t *params)
+{
+ cp_beacon_work_beacon_t beacon_work;
+ cp_beacon_desc_t *beacon;
+ bitstream_t bitstream;
+ cp_bentry_sai_t sai;
+
+ uint res;
+
+ dbg_assert (pb);
+
+ beacon = (cp_beacon_desc_t *) pb;
+
+ bitstream_init (&bitstream, beacon->payload->beacon_mpdu_payload, 32,
+ BITSTREAM_READ);
+ bitstream_access (&bitstream, &beacon_work.nid_lsb, 22);
+ bitstream_access (&bitstream, &beacon_work.hm, 2);
+ bitstream_access (&bitstream, &beacon_work.stei, 8);
+ bitstream_finalise (&bitstream);
+
+ bitstream_init (&bitstream, beacon->payload->beacon_mpdu_payload + 4, 32,
+ BITSTREAM_READ);
+ bitstream_access (&bitstream, &beacon_work.bt, 3);
+ beacon_work.bt = CP_BEACON_WORK_MASK_BT (beacon_work.bt);
+
+ bitstream_access (&bitstream, &beacon_work.ncnr, 1);
+ bitstream_access (&bitstream, &beacon_work.npsm, 1);
+ bitstream_access (&bitstream, &beacon_work.num_slots, 3);
+ beacon_work.num_slots =
+ CP_BEACON_WORK_MASK_NUM_SLOTS(beacon_work.num_slots);
+
+ bitstream_access (&bitstream, &beacon_work.slot_usage, 8);
+ bitstream_access (&bitstream, &beacon_work.slot_id, 3);
+ beacon_work.slot_id = CP_BEACON_WORK_MASK_SLOT_ID(beacon_work.slot_id);
+
+ bitstream_access (&bitstream, &beacon_work.aclss, 3);
+ beacon_work.aclss = CP_BEACON_WORK_MASK_ACLSS(beacon_work.aclss);
+
+ bitstream_access (&bitstream, &beacon_work.hoip, 1);
+ bitstream_access (&bitstream, &beacon_work.rtsbf, 1);
+ bitstream_access (&bitstream, &beacon_work.nm, 2);
+ beacon_work.nm = CP_BEACON_WORK_MASK_NM(beacon_work.nm);
+
+ bitstream_access (&bitstream, &beacon_work.cco_cap, 2);
+ beacon_work.cco_cap = CP_BEACON_WORK_MASK_CCO_CAP(beacon_work.cco_cap);
+ bitstream_finalise (&bitstream);
+
+ res = read_u32_from_word (&beacon->payload->bmis[22]);
+ sai.stpf = res & true;
+ res = res >> 1;
+ sai.glid = res & 0x7f;
+ res = res >> 7;
+ sai.st = res & 0xFFF;
+ res = res >> 12;
+ sai.et = res & 0xFFF;
+
+ test_case_begin (test, "Verify the beacon");
+
+ test_begin (test, "Verifying the beacon")
+ {
+ test_fail_if (beacon_work.bt != CP_BEACON_CENTRAL_BEACON,
+ "Wrong beacon type");
+ test_fail_if (sai.stpf != true, "Wrong SAI type");
+ test_fail_if (sai.glid != 0x7F, "Wrong GLID");
+ test_fail_if (sai.st != 0, "Wrong start time");
+ test_fail_if (sai.et != 3906, "Wrong end time");
+ }
+ test_end;
+
+ blk_release_desc ((blk_t *) pb);
+}
+
+void
+pbproc_activate (pbproc_t *ctx, bool flag)
+{
+ dbg_assert (ctx);
+}
+
diff --git a/cesar/cp/beacon/test/cco/src/cl_stub.c b/cesar/cp/beacon/test/cco/src/cl_stub.c
new file mode 100644
index 0000000000..8a6ec73d79
--- /dev/null
+++ b/cesar/cp/beacon/test/cco/src/cl_stub.c
@@ -0,0 +1,63 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/cl_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "common/defs/ethernet.h"
+#include "lib/read_word.h"
+
+#include "cl/cl.h"
+#include "mac/sar/sar.h"
+#include "mac/pbproc/pbproc.h"
+
+#include "cl/inc/context.h"
+#include "cl/inc/cl.h"
+#include "cl/inc/trace.h"
+#include "cl/inc/cl_mactotei.h"
+
+#include "mac/common/ntb.h"
+
+static cl_t cl_global;
+
+cl_t *
+cl_init (mac_store_t *mac_store, sar_t *sar, mac_config_t *mac_config)
+{
+ return &cl_global;
+}
+
+void
+cl_mme_recv_done (cl_t *ctx, cl_mme_recv_t* mme_recv)
+{
+}
+
+
+void
+cl_mme_send_as_mme (cl_t *ctx, u8 *buffer, uint length, mfs_tx_t *mfs)
+{
+}
+
+void
+cl_mme_send_as_data (cl_t *ctx, u8 *buffer, uint length)
+{
+}
+
+void cl_mme_init_buffer_add_cb (cl_t *cl, cl_mme_buffer_add_cb_t cb,
+ void *user_data)
+{
+}
+
+void cl_mme_recv_init (cl_t *ctx, cl_mme_recv_cb_t mme_recv_cb, void
+*user_data)
+{
+}
diff --git a/cesar/cp/beacon/test/cco/src/hle_stub.c b/cesar/cp/beacon/test/cco/src/hle_stub.c
new file mode 100644
index 0000000000..76add71ff4
--- /dev/null
+++ b/cesar/cp/beacon/test/cco/src/hle_stub.c
@@ -0,0 +1,44 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/hle_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+
+#include "hle/hle.h"
+
+/**
+ * Initialise the interface to add an Interface buffer.
+ *
+ * \param ctx the hle context.
+ * \param cb the function to call on interface buffer reception.
+ * \param user_data the user_data to provide on function call.
+ */
+void
+hle_init_interface_buffer_add_cb (hle_t *ctx, hle_interface_buffer_add_cb_t
+ cb, void *user_data)
+{
+}
+
+/**
+ * Send a packet to the ipmbox.
+ *
+ * \param ctx the hle context.
+ * \param msg the message address to post the message in the ipmbox.
+ * \param length the length of the message in words.
+ */
+void
+hle_ipmbox_send (hle_t *ctx, u32 *msg, uint length)
+{
+}
+
diff --git a/cesar/cp/beacon/test/cco/src/ipmbox_stub.c b/cesar/cp/beacon/test/cco/src/ipmbox_stub.c
new file mode 100644
index 0000000000..4c14998b0d
--- /dev/null
+++ b/cesar/cp/beacon/test/cco/src/ipmbox_stub.c
@@ -0,0 +1,22 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/ipmbox_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "hal/hle/ipmbox.h"
+
+
+void ipmbox_tx (ipmbox_t *ctx, u32 *first_msg, uint length)
+{
+}
+
diff --git a/cesar/cp/beacon/test/cco/src/phy_stub.c b/cesar/cp/beacon/test/cco/src/phy_stub.c
new file mode 100644
index 0000000000..e05b2805a2
--- /dev/null
+++ b/cesar/cp/beacon/test/cco/src/phy_stub.c
@@ -0,0 +1,38 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/src/phy_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "hal/phy/phy.h"
+
+#include "cp/beacon/test/cco/inc/phy_stub.h"
+
+u32
+phy_date (phy_t *ctx)
+{
+ phy_test_t *phy;
+ dbg_assert(ctx);
+
+ phy = (phy_test_t *) ctx;
+ phy->ntb += phy->date_ntb + 10;
+
+ return phy->ntb;
+}
+
+u32
+phy_clock_get_zero_cross_captured_date (phy_t *ctx)
+{
+ return 0;
+}
+
diff --git a/cesar/cp/beacon/test/cco/src/sar_stub.c b/cesar/cp/beacon/test/cco/src/sar_stub.c
new file mode 100644
index 0000000000..a9f89c5132
--- /dev/null
+++ b/cesar/cp/beacon/test/cco/src/sar_stub.c
@@ -0,0 +1,37 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/sar_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "mac/sar/sar.h"
+#include "mac/sar/inc/sar_context.h"
+
+static sar_t sar_global;
+
+sar_t *
+sar_init (mac_store_t *mac_store, pbproc_t *pbproc, ca_t *ca)
+{
+ return &sar_global;
+}
+
+void
+sar_beacon_send (sar_t *ctx, pb_beacon_t *beacon, mfs_tx_t *beacon_mfs, void *bto_bpsto)
+{
+ blk_release_desc ((blk_t *)beacon);
+}
+
+
+void sar_init_beacon_cb (sar_t *sar, void *user_data, sar_beacon_cb_t uf)
+{
+}
diff --git a/cesar/cp/beacon/test/cco/src/ucco.c b/cesar/cp/beacon/test/cco/src/ucco.c
new file mode 100644
index 0000000000..be47fa31dd
--- /dev/null
+++ b/cesar/cp/beacon/test/cco/src/ucco.c
@@ -0,0 +1,229 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/ucco/src/ucco.c
+ * \brief Test the schedule procedure with the leon timer.
+ * \ingroup cp/beacon
+ *
+ */
+#include "common/std.h"
+
+#include "hal/timer/timer.h"
+
+#include "cp/station/station.h"
+#include "cp/cco/cco.h"
+#include "cp/secu/secu.h"
+#include "cp/beacon/beacons.h"
+
+#include "hal/phy/phy.h"
+
+#include "cl/cl.h"
+
+#include "mac/common/ntb.h"
+#include "mac/common/config.h"
+#include "mac/common/store.h"
+
+#include "lib/test.h"
+#include "lib/read_word.h"
+#include "lib/bitstream.h"
+
+#include <stdio.h>
+
+#include "cp/beacon/inc/beacons_ctx.h"
+
+cp_beacon_t *cp_beacon;
+test_t test;
+uint count_beacon;
+
+void
+cp_beacon_expired (void *user_data)
+{
+
+}
+
+void
+test_emetting_discover_beacons(void)
+{
+ uint i;
+ count_beacon = 0;
+
+ for (i = 0; i < 10; i++)
+ {
+ // Create the default schedules for the CA.
+ cp_beacon_cco_send_discover_beacon (cp_beacon);
+ }
+}
+
+int
+cyg_user_start (void)
+{
+ phy_t *phy;
+ ca_t *ca;
+ pbproc_t *pbproc;
+ mac_config_t *mac_config;
+ mac_store_t *mac_store;
+ hal_timer_t *timer;
+ cp_sta_t *sta;
+ cp_secu_t *secu;
+ cp_cco_t *cco;
+ cl_t *cl;
+ interface_t *interface;
+ hle_t *hle;
+
+ test_init (test, 0, NULL);
+
+ cl = blk_alloc ();
+ phy = blk_alloc ();
+ ca = blk_alloc ();
+ mac_config = blk_alloc ();
+ pbproc = blk_alloc ();
+ secu = blk_alloc ();
+ cco = blk_alloc ();
+ hle = blk_alloc ();
+
+ mac_ntb_init (phy, mac_config);
+ timer = hal_timer_init (phy);
+ mac_store = mac_store_init ();
+
+ // Configure the STA to be CCo.
+ cp_cco_set_cco_status (cco, true);
+ // Add the mac_config to the sta.
+ sta = cp_station_init (mac_store, cl, pbproc, mac_config);
+
+ interface = interface_init (hle, cl, (sar_t *)cl , mac_config);
+
+ cp_beacon = cp_beacon_init(interface, phy, sta, secu, ca, pbproc, mac_store, cco, timer, NULL,
+ cp_beacon_expired);
+ cp_beacon_acl_frequency_detection (cp_beacon);
+ cp_beacon_acl_frequency_detection (cp_beacon);
+
+ test_emetting_discover_beacons ();
+
+ cp_beacon_uninit (cp_beacon);
+ hal_timer_uninit(timer);
+ mac_ntb_uninit ();
+ cp_station_uninit (sta);
+ mac_store_uninit (mac_store);
+
+ blk_release (cco);
+ blk_release (secu);
+ blk_release (pbproc);
+ blk_release (mac_config);
+ blk_release (ca);
+ blk_release (phy);
+ blk_release (cl);
+ blk_release (hle);
+
+
+ blk_print_memory ();
+
+ test_case_begin (test, "Memory");
+ test_begin (test, "Memory")
+ {
+ test_fail_if (blk_check_memory () != true, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
+
+/**
+ * Prepare a beacon for transmission.
+ * \param ctx pbproc context
+ * \param mfs corresponding special MFS
+ * \param pb beacon payload
+ * \param params extra parameters for beacon transmission
+ *
+ * There can only be one beacon prepared in advance (for a given MFS).
+ *
+ * This will cancel the preceding prepared beacon if it was not sent.
+ *
+ * PB reference is transfered to PB Processing. Extra parameters are copied.
+ */
+void
+pbproc_mfs_beacon_prepare (pbproc_t *ctx, mfs_tx_t *mfs, pb_beacon_t *pb,
+ const pbproc_tx_beacon_params_t *params)
+{
+ cp_beacon_work_beacon_t beacon_work;
+ cp_beacon_desc_t *beacon;
+ bitstream_t bitstream;
+ cp_bentry_sai_t sai;
+
+ uint res;
+
+ dbg_assert (pb);
+
+ beacon = (cp_beacon_desc_t *) pb;
+
+ bitstream_init (&bitstream, beacon->payload->beacon_mpdu_payload, 32,
+ BITSTREAM_READ);
+ bitstream_access (&bitstream, &beacon_work.nid_lsb, 22);
+ bitstream_access (&bitstream, &beacon_work.hm, 2);
+ bitstream_access (&bitstream, &beacon_work.stei, 8);
+ bitstream_finalise (&bitstream);
+
+ bitstream_init (&bitstream, beacon->payload->beacon_mpdu_payload + 4, 32,
+ BITSTREAM_READ);
+ bitstream_access (&bitstream, &beacon_work.bt, 3);
+ beacon_work.bt = CP_BEACON_WORK_MASK_BT (beacon_work.bt);
+
+ bitstream_access (&bitstream, &beacon_work.ncnr, 1);
+ bitstream_access (&bitstream, &beacon_work.npsm, 1);
+ bitstream_access (&bitstream, &beacon_work.num_slots, 3);
+ beacon_work.num_slots =
+ CP_BEACON_WORK_MASK_NUM_SLOTS(beacon_work.num_slots);
+
+ bitstream_access (&bitstream, &beacon_work.slot_usage, 8);
+ bitstream_access (&bitstream, &beacon_work.slot_id, 3);
+ beacon_work.slot_id = CP_BEACON_WORK_MASK_SLOT_ID(beacon_work.slot_id);
+
+ bitstream_access (&bitstream, &beacon_work.aclss, 3);
+ beacon_work.aclss = CP_BEACON_WORK_MASK_ACLSS(beacon_work.aclss);
+
+ bitstream_access (&bitstream, &beacon_work.hoip, 1);
+ bitstream_access (&bitstream, &beacon_work.rtsbf, 1);
+ bitstream_access (&bitstream, &beacon_work.nm, 2);
+ beacon_work.nm = CP_BEACON_WORK_MASK_NM(beacon_work.nm);
+
+ bitstream_access (&bitstream, &beacon_work.cco_cap, 2);
+ beacon_work.cco_cap = CP_BEACON_WORK_MASK_CCO_CAP(beacon_work.cco_cap);
+ bitstream_finalise (&bitstream);
+
+ res = read_u32_from_word (&beacon->payload->bmis[21]);
+ sai.stpf = res & true;
+ res = res >> 1;
+ sai.glid = res & 0x7f;
+ res = res >> 7;
+ sai.st = res & 0xFFF;
+ res = res >> 12;
+ sai.et = res & 0xFFF;
+
+ test_case_begin (test, "Verify the beacon");
+
+ test_begin (test, "Verifying the beacon")
+ {
+ test_fail_if (beacon_work.bt != CP_BEACON_DISCOVER_BEACON,
+ "Wrong beacon type");
+ test_fail_if (sai.stpf != true, "Wrong SAI type");
+ test_fail_if (sai.glid != 0x7F, "Wrong GLID");
+ test_fail_if (sai.st != 0, "Wrong start time");
+ test_fail_if (sai.et != 4095, "Wrong end time");
+ }
+ test_end;
+
+ blk_release_desc ((blk_t *) pb);
+}
+
+void
+pbproc_activate (pbproc_t *ctx, bool flag)
+{
+ dbg_assert (ctx);
+}
+
diff --git a/cesar/cp/beacon/test/central_beacon/Makefile b/cesar/cp/beacon/test/central_beacon/Makefile
new file mode 100644
index 0000000000..4d964fcdf5
--- /dev/null
+++ b/cesar/cp/beacon/test/central_beacon/Makefile
@@ -0,0 +1,53 @@
+BASE = ../../../..
+
+ECOS=y
+
+INCLUDES = cp/beacon/test/overide
+
+TARGET_PROGRAMS = ac_line estimation central_beacon usta bentry_test cco_request_discover
+
+ac_line_SOURCES = ac_line_test.c phy_stub.c pbproc_stub.c ca_stub.c \
+ cl_stub.c sar_stub.c ipmbox_stub.c hle_stub.c
+ac_line_MODULES = lib mac/common cp/beacon hal/timer hal/leon/unit-test \
+ interface interface/sniffer \
+ cp/beacon/test/overide/cp/station \
+ cp/beacon/test/overide/cp/cco
+
+estimation_SOURCES = bts_bto_bp.c phy_stub.c pbproc_stub.c ca_stub.c \
+ cl_stub.c sar_stub.c ipmbox_stub.c hle_stub.c
+estimation_MODULES = lib mac/common cp/beacon hal/timer hal/leon/unit-test \
+ interface interface/sniffer \
+ cp/beacon/test/overide/cp/station \
+ cp/beacon/test/overide/cp/cco
+
+central_beacon_SOURCES = central_beacon.c phy_stub.c cl_stub.c sar_stub.c ipmbox_stub.c hle_stub.c
+central_beacon_MODULES = lib mac/common cp/beacon hal/timer hal/leon/unit-test \
+ interface interface/sniffer \
+ cp/beacon/test/overide/cp/station \
+ cp/beacon/test/overide/cp/cco
+
+usta_SOURCES = usta.c phy_stub.c pbproc_stub.c cl_stub.c sar_stub.c ipmbox_stub.c hle_stub.c
+usta_MODULES = lib mac/common cp/beacon hal/timer hal/leon/unit-test \
+ interface interface/sniffer \
+ cp/beacon/test/overide/cp/station \
+ cp/beacon/test/overide/cp/cco
+
+bentry_test_SOURCES = bentry_test.c phy_stub.c cl_stub.c sar_stub.c ipmbox_stub.c hle_stub.c
+bentry_test_MODULES = lib mac/common cp/beacon hal/timer hal/leon/unit-test \
+ interface interface/sniffer \
+ cp/beacon/test/overide/cp/station \
+ cp/beacon/test/overide/cp/cco
+
+
+cco_request_discover_SOURCES = cco_request_discover_beacon.c phy_stub.c \
+ cl_stub.c sar_stub.c ipmbox_stub.c hle_stub.c
+cco_request_discover_MODULES = lib mac/common cp/beacon hal/timer \
+ hal/leon/unit-test \
+ interface interface/sniffer \
+ cp/beacon/test/overide/cp/station \
+ cp/beacon/test/overide/cp/cco
+
+
+cp_beacon_MODULE_SOURCES = beacons.c bentry.c
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/cp/beacon/test/central_beacon/ecos.ecc.sh b/cesar/cp/beacon/test/central_beacon/ecos.ecc.sh
new file mode 100644
index 0000000000..8253d98c9a
--- /dev/null
+++ b/cesar/cp/beacon/test/central_beacon/ecos.ecc.sh
@@ -0,0 +1,5 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new linux default
+cat >> $config <<EOF
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/cp/beacon/test/central_beacon/inc/phy_stub.h b/cesar/cp/beacon/test/central_beacon/inc/phy_stub.h
new file mode 100644
index 0000000000..bb39c132d3
--- /dev/null
+++ b/cesar/cp/beacon/test/central_beacon/inc/phy_stub.h
@@ -0,0 +1,28 @@
+#ifndef cp_beacon_test_central_beacon_phy_stub_h
+#define cp_beacon_test_central_beacon_phy_stub_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/phy_stub.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+
+struct phy_test_t
+{
+ uint freq_test;
+ uint ntb;
+ uint date_ntb;
+};
+typedef struct phy_test_t phy_test_t;
+
+
+#endif /* cp_beacon_test_central_beacon_phy_stub_h */
diff --git a/cesar/cp/beacon/test/central_beacon/src/ac_line_test.c b/cesar/cp/beacon/test/central_beacon/src/ac_line_test.c
new file mode 100644
index 0000000000..626c2704a7
--- /dev/null
+++ b/cesar/cp/beacon/test/central_beacon/src/ac_line_test.c
@@ -0,0 +1,183 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/ac_line_test.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_arch.h>
+
+#include "lib/test.h"
+#include "lib/blk.h"
+#include "lib/trace.h"
+
+#include "cp/beacon/beacons.h"
+
+#include "cp/beacon/inc/beacons.h"
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/inc/trace.h"
+
+#include "mac/common/ntb.h"
+#include "hal/timer/timer.h"
+
+#include "cp/beacon/test/central_beacon/inc/phy_stub.h"
+
+void
+cp_beacon_expired (void *user_data)
+{
+
+}
+
+
+int main (void)
+{
+ test_t test;
+ mac_config_t mac_config;
+ phy_test_t phy;
+ cp_sta_t *sta;
+ cp_secu_t *secu;
+ cp_beacon_t *cp_beacon;
+ ca_t *ca;
+ pbproc_t *pbproc;
+ mac_store_t *mac_store;
+ cp_cco_t *cco;
+ hal_timer_t *timer;
+ uint per_ntb;
+
+ trace_init();
+ test_init(test,0,NULL);
+
+ sta = blk_alloc();
+ secu = blk_alloc();
+ pbproc = blk_alloc();
+ ca = blk_alloc();
+ mac_store = blk_alloc();
+ cco = blk_alloc();
+
+ mac_ntb_init((phy_t *) &phy, &mac_config);
+
+ timer = hal_timer_init ((phy_t *) &phy);
+ cp_beacon = cp_beacon_init((interface_t *) &phy, (phy_t *) &phy, sta, secu, ca, pbproc,
+ mac_store, cco, timer, NULL, cp_beacon_expired);
+
+ test_case_begin (test, "Frequency detection");
+
+ test_begin(test,"frequency detection @50 Hz")
+ {
+ phy.freq_test = 50;
+ phy.ntb = 1634;
+ cp_beacon_acl_frequency_detection(cp_beacon);
+ cp_beacon_acl_frequency_detection(cp_beacon);
+
+ test_fail_if(cp_beacon->pwl.bp_ntb != 1000000, "frequency detection fail");
+ }
+ test_end;
+
+ test_begin(test,"frequency detection @60 Hz")
+ {
+ phy.freq_test = 60;
+ phy.ntb = 1634;
+ cp_beacon->pwl.detection = 0;
+ cp_beacon_acl_frequency_detection(cp_beacon);
+ cp_beacon_acl_frequency_detection(cp_beacon);
+
+ test_fail_if(cp_beacon->pwl.bp_ntb != 833333, "frequency detection fail");
+ }
+ test_end;
+
+ test_begin(test,"frequency detection @0 Hz")
+ {
+ phy.freq_test = 0;
+ phy.ntb = 1634;
+ cp_beacon->pwl.detection = 0;
+ cp_beacon_acl_frequency_detection(cp_beacon);
+ cp_beacon_acl_frequency_detection(cp_beacon);
+
+ test_fail_if(cp_beacon->pwl.bp_ntb != 1000000, "frequency detection fail");
+ }
+ test_end;
+
+
+ test_case_begin (test, "Period computation");
+
+ phy.freq_test = 50;
+ phy.ntb = 761321;
+
+ per_ntb = cp_beacon_pwl_period (cp_beacon);
+ test_begin(test, "first test")
+ {
+ test_fail_if (per_ntb < 1e6, "Period shall be greater than 1e6");
+ }
+ test_end;
+
+ phy.freq_test = 50;
+ phy.ntb = 1500321;
+
+ per_ntb = cp_beacon_pwl_period (cp_beacon);
+
+ test_begin(test, "second test")
+ {
+ test_fail_if (per_ntb < 9e5, "Period shall be greater than 900000");
+ }
+ test_end;
+
+ cp_beacon_trace_print(cp_beacon);
+ cp_beacon_uninit(cp_beacon);
+ hal_timer_uninit (timer);
+ mac_ntb_uninit();
+ trace_uninit();
+ blk_release (sta);
+ blk_release (secu);
+ blk_release (ca);
+ blk_release (pbproc);
+ blk_release (mac_store);
+ blk_release (cco);
+
+ test_begin(test, "memory test")
+ {
+ test_fail_if(blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
+
+/**
+ * Get date of last zero-cross.
+ * \param ctx phy context
+ * \return last zero-cross date
+ * set errno to:
+ * - EINVAL if ctx is null
+ */
+u32
+phy_clock_get_zero_cross_captured_date (phy_t *ctx)
+{
+ phy_test_t *phy;
+ dbg_assert(ctx);
+
+ phy = (phy_test_t *) ctx;
+
+ if(phy->freq_test == 50)
+ {
+ phy->ntb += 250000;
+ }
+ else if (phy->freq_test == 60)
+ {
+ phy->ntb += 208333;
+ }
+
+ return phy->ntb;
+}
+
diff --git a/cesar/cp/beacon/test/central_beacon/src/bentry_test.c b/cesar/cp/beacon/test/central_beacon/src/bentry_test.c
new file mode 100644
index 0000000000..317fdb202c
--- /dev/null
+++ b/cesar/cp/beacon/test/central_beacon/src/bentry_test.c
@@ -0,0 +1,798 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/src/bentry_test.c
+ * \ingroup cp_beacon
+ *
+ */
+#include "common/std.h"
+
+#include <stdio.h>
+
+#include "lib/blk.h"
+#include "lib/test.h"
+#include "lib/read_word.h"
+#include "lib/trace.h"
+
+#include "mac/common/config.h"
+#include "mac/common/ntb.h"
+#include "mac/common/pb.h"
+
+#include "hal/phy/phy.h"
+#include "cp/station/station.h"
+#include "cp/secu/secu.h"
+
+#include "cp/beacon/beacons.h"
+#include "cp/beacon/inc/beacons.h"
+#include "cp/beacon/inc/bentry.h"
+
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/test/central_beacon/inc/phy_stub.h"
+#include "cp/cco/inc/context.h"
+
+#include "cp/station/inc/context.h"
+#include "cp/secu/inc/secu_types.h"
+
+#include "hal/timer/timer.h"
+
+test_t test;
+cp_beacon_desc_t *beacon;
+static ca_schedule_t ca_sched;
+
+
+cp_beacon_t *cp_beacon;
+mac_config_t mac_config;
+hal_timer_t *timer;
+pbproc_t *pbproc;
+ca_t *ca;
+mac_store_t *mac_store;
+cp_cco_t *cco;
+phy_t *phy;
+cp_sta_t *sta;
+cp_secu_t *secu;
+mac_config_t mac_config;
+
+void
+cp_beacon_expired (void *user_data)
+{
+
+}
+
+
+void
+my_test_init (void)
+{
+ phy = blk_alloc();
+ sta = blk_alloc();
+ secu = blk_alloc();
+
+ pbproc = blk_alloc();
+ ca = blk_alloc();
+ mac_store = blk_alloc();
+ cco = blk_alloc();
+
+ sta->mac_config = &mac_config;
+
+ mac_ntb_init ((phy_t *)phy, &mac_config);
+
+ timer = hal_timer_init ((phy_t *) phy);
+ cp_beacon = cp_beacon_init ((interface_t *) phy, (phy_t *)phy, sta, secu, ca, pbproc, mac_store, cco, timer, NULL, cp_beacon_expired);
+
+ cp_beacon_acl_frequency_detection (cp_beacon);
+ cp_beacon_acl_frequency_detection (cp_beacon);
+}
+
+void
+test_bentry_fill_header (void)
+{
+ u8 blk[20];
+ uint header;
+ uint length;
+
+ cp_bentry_header_fill(blk, CP_BENTRY_BEACON_PERIOD_START_OFFSET,
+ CP_BENTRY_BYTE_SIZEOF (CP_BENTRY_BIT_SIZE_BPSTO));
+
+ header = read_u8_from_word (blk);
+ length = read_u8_from_word (blk+1);
+
+ test_case_begin (test, "bentry header fill");
+ test_begin (test, "BPSTO header fill")
+ {
+ test_fail_if (header != CP_BENTRY_BEACON_PERIOD_START_OFFSET, "Wrong \
+ header");
+ test_fail_if (length != CP_BENTRY_BYTE_SIZEOF (CP_BENTRY_BIT_SIZE_BPSTO),
+ "Wrong bentry length");
+ }
+ test_end;
+}
+
+void
+test_default_schedule(void)
+{
+ u8 beacon [10];
+ uint header;
+ uint length;
+ cp_beacon_desc_alloc_t this_sched;
+ cp_bentry_sai_t sai;
+ uint ns;
+ uint res;
+ u8 *next;
+
+ this_sched.ca_sched = &ca_sched;
+ memset (beacon, 0, 10);
+ next = cp_bentry_default_schedule (cp_beacon, beacon);
+
+ test_case_begin (test, "Default schedule");
+
+ header = read_u8_from_word (beacon);
+ length = read_u8_from_word (beacon + 1);
+
+ test_begin (test, "header and length")
+ {
+ test_fail_if (header != CP_BENTRY_NON_PERSISTENT_SCHEDULE,
+ "Wrong bentry header");
+ test_fail_if (length != 0x5, "Wrong length");
+ test_fail_if ((next - beacon) != 7, "Wrong full bentry length");
+ }
+ test_end;
+
+ // read the number of sessions.
+ ns = read_u8_from_word(beacon + 2);
+ res = read_u32_from_word (beacon + 3);
+
+ sai.stpf = res & 0x1;
+ sai.glid = ((res & 0xFE) >> 1) & 0xFF;
+ sai.st = (res >> 8) & 0x0FFF;
+ sai.et = (res >> 20) & 0x0FFF;
+ test_begin (test, "default schedule")
+ {
+ test_fail_if (ns != 0x1, "Wrong Number of sessions");
+
+ test_fail_if (sai.stpf != true, "Wrong stpf value");
+ test_fail_if (sai.glid != 0x7f, "Wrong glid value");
+ test_fail_if (sai.st != 0x0, "Wrong start time");
+ test_fail_if (sai.et != CP_BENRTY_MAX_SAI_DATA_VALUE, "Wrong end time");
+ }
+ test_end;
+}
+
+
+void
+test_persistent_schedule (void)
+{
+ u8 beacon [20];
+ uint header;
+ uint length;
+ cp_beacon_desc_alloc_t this_sched;
+ cp_bentry_persistent_schedule_struct_t pss;
+ cp_bentry_sai_t sai;
+ uint res;
+
+ this_sched.ca_sched = &ca_sched;
+
+ cp_beacon->bentries_data.pscd = 7;
+ cp_beacon->bentries_data.cscd = 5;
+ cp_beacon_estimate_bts_bto_bp (cp_beacon, &cp_beacon->cbeacon);
+ cp_bentry_persistent_schedule (cp_beacon, beacon, &this_sched);
+
+ test_case_begin (test, "Default schedule");
+
+ header = read_u8_from_word (beacon);
+ length = read_u8_from_word (beacon + 1);
+
+ test_begin (test, "header and length")
+ {
+ test_fail_if (header != CP_BENTRY_PERSISTENT_SCHEDULE,
+ "Wrong bentry header");
+ test_fail_if (length != 0x6, "Wrong length");
+ }
+ test_end;
+
+ // read the number of sessions.
+ res = read_u32_from_word(beacon + 2);
+ pss.pscd = res & 0x7;
+ pss.cscd = (res >> 3) & 0x7;
+ pss.ns = (res >> 8) & 0x3F;
+
+ res = read_u32_from_word (beacon + 4);
+ sai.stpf = res & 0x1;
+ sai.glid = ((res & 0xFE) >> 1) & 0xFF;
+ sai.st = (res >> 8) & 0x0FFF;
+ sai.et = (res >> 20) & 0x0FFF;
+
+ test_begin (test, "default schedule")
+ {
+ test_fail_if (pss.pscd != cp_beacon->bentries_data.pscd, "Wrong PSCD");
+ test_fail_if (pss.cscd != cp_beacon->bentries_data.cscd, "Wrong CSCD");
+ test_fail_if (pss.ns != 0x1, "Wrong Number of sessions");
+
+ test_fail_if (sai.stpf != true, "Wrong stpf value");
+ test_fail_if (sai.glid != 0x7f, "Wrong glid value");
+ test_fail_if (sai.st != 0x0, "Wrong start time");
+ test_fail_if (sai.et != 3906, "Wrong end time");
+ }
+ test_end;
+}
+
+void
+test_regions (void)
+{
+ u8 beacon [20];
+ uint header;
+ uint length;
+ uint res;
+ uint nr;
+ cp_bentry_regions_struct_t region;
+
+
+ cp_bentry_regions (cp_beacon, beacon);
+
+ test_case_begin (test, "Regions");
+
+ header = read_u8_from_word (beacon);
+ length = read_u8_from_word (beacon + 1);
+
+ test_begin (test, "header and length")
+ {
+ test_fail_if (header != CP_BENTRY_REGIONS,
+ "Wrong bentry header");
+ test_fail_if (length != 0x3, "Wrong length");
+ }
+ test_end;
+
+ nr = read_u8_from_word (beacon + 2) & 0x3F;
+ res = read_u32_from_word (beacon + 3);
+ region.rt = res & 0xF;
+ region.ret = (res >> 4) & 0xFFF;
+
+ test_begin (test, "Regions delimatation")
+ {
+ test_fail_if (region.rt != CP_BENTRY_REGIONS_LOCAL_CSMA,
+ "Wrong Region type");
+ test_fail_if (region.ret != 3906, "Wrong regione end time");
+ }
+ test_end;
+}
+
+void
+test_mac_address (void)
+{
+ u8 beacon [20];
+ uint header;
+ uint length;
+ u8 *next;
+ mac_t mac;
+
+ sta->mac_config->sta_mac_address = 0x123456789ABC;
+ next = cp_bentry_mac_address (cp_beacon, beacon);
+
+ header = read_u8_from_word (beacon);
+ length = read_u8_from_word (beacon + 1);
+
+ test_case_begin (test, "Mac address bentry");
+
+ test_begin (test, "header and length")
+ {
+ test_fail_if (header != CP_BENTRY_MAC_ADDRESS,
+ "Wrong bentry header");
+ test_fail_if (length != 0x6, "Wrong length");
+ test_fail_if ((next - beacon) != 8, "Wrong full bentry length");
+ }
+ test_end;
+
+ mac = read_u16_from_word (beacon + 6);
+ mac = mac << 32;
+ mac = mac | read_u32_from_word (beacon + 2);
+
+ test_begin (test, "Mac address")
+ {
+ test_fail_if (mac != sta->mac_config->sta_mac_address, "Wrong mac address");
+ }
+ test_end;
+}
+
+void
+test_discover (void)
+{
+ u8 beacon [20];
+ uint header;
+ uint length;
+ uint tei;
+ u8 *next;
+
+ next = cp_bentry_discover (cp_beacon, beacon, 0xA);
+
+ test_case_begin (test, "Discover bentry");
+
+ header = read_u8_from_word (beacon);
+ length = read_u8_from_word (beacon + 1);
+ tei = read_u8_from_word (beacon + 2);
+
+ test_begin (test, "header and length")
+ {
+ test_fail_if (header != CP_BENTRY_DISCOVER,
+ "Wrong bentry header");
+ test_fail_if (length != 0x1, "Wrong length");
+ test_fail_if (tei != 0xA, "Wrong tei");
+ test_fail_if ((next - beacon) != 0x3, "Wron bentry full length");
+ }
+ test_end;
+}
+
+void
+test_discover_info (void)
+{
+ u8 beacon [20];
+ uint header;
+ uint length;
+ u8 *next;
+ uint res;
+ cp_bentry_discover_info_struct_t data;
+
+ // Configuring the station
+ sta->numDisSta = 20;
+ sta->numDisNet = 10;
+ sta->authentication = true;
+ cco->user_appointed_cco_status = true;
+
+ // copy it to the bentries data modifying the num_dis_net value
+ ((cp_bentry_discover_info_struct_t *) &cp_beacon->bentries_data.discover_info)->num_dis_sta++;
+
+ next = cp_bentry_discover_info (cp_beacon, beacon);
+
+ test_case_begin (test, "Discover info bentry");
+
+ header = read_u8_from_word (beacon);
+ length = read_u8_from_word (beacon + 1);
+
+ test_begin (test, "header and length")
+ {
+ test_fail_if (header != CP_BENTRY_DISCOVER_INFO,
+ "Wrong bentry header");
+ test_fail_if (length != 0x4, "Wrong length");
+ test_fail_if ((next - beacon) != 6, "Wrong full bentry length");
+ }
+ test_end;
+
+ res = read_u32_from_word (beacon + 2);
+
+ data.updated = res & 0x1;
+ res = res >> 1;
+
+ data.cco_cap = res & 0x3;
+ res = res >> 2;
+
+ data.proxy_net_cap = res & 0x1;
+ res = res >> 1;
+
+ data.backup_cco_cap = res & 0x1;
+ res = res >> 1;
+
+ data.cco_status = res & 0x1;
+ res = res >> 1;
+
+ data.pco_status = res & 0x1;
+ res = res >> 1;
+
+ data.backup_cco_status = res & 0x1;
+ res = res >> 1;
+
+ data.num_dis_sta = read_u8_from_word (beacon + 3);
+ data.num_dis_net = read_u8_from_word (beacon + 4);
+
+ res = read_u8_from_word (beacon + 5);
+ data.authentication = res & 0x1;
+ res = res >> 1;
+
+ data.status_user_ap_cco = res & 0x1;
+
+ test_begin (test, "Discover info bentry")
+ {
+ test_fail_if (data.updated != true, "Wrong updated boolean value");
+ test_fail_if (data.cco_cap != cco->cco_cap, "Wrong cco_cap");
+ test_fail_if (data.proxy_net_cap != cco->proxy_cap, "Wrong proxy net cap");
+ test_fail_if (data.backup_cco_cap != cco->backup_cap, "Wrong backup cco cap");
+ test_fail_if (data.cco_status != cco->cco_status, "Wrong CCo status");
+ test_fail_if (data.pco_status != cco->pco_status, "Wrong PCo status");
+ test_fail_if (data.backup_cco_status != cco->backup_cco, "Wrong backup CCo Status");
+ test_fail_if (data.num_dis_sta != sta->numDisSta, "Wrong num discover station");
+ test_fail_if (data.num_dis_net != sta->numDisNet, "Wrong num discover network");
+ test_fail_if (data.authentication != sta->authentication, "Wrong authentification status");
+ test_fail_if (data.status_user_ap_cco != cco->user_appointed_cco_status, "Wrong user ap cco status");
+ }
+ test_end;
+
+}
+
+void
+test_bpsto (void)
+{
+ u8 beacon [20];
+ uint header;
+ uint length;
+ u8 *next;
+ uint bentry_len;
+
+ next = cp_bentry_bpsto (cp_beacon, &cp_beacon->cbeacon, beacon);
+
+ test_case_begin (test, "BPSTO bentry");
+
+ header = read_u8_from_word (beacon);
+ length = read_u8_from_word (beacon + 1);
+
+ test_begin (test, "BPSTO bentry")
+ {
+ test_fail_if (header != CP_BENTRY_BEACON_PERIOD_START_OFFSET,
+ "Wrong bentry header");
+ bentry_len = CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_BPSTO);
+ test_fail_if (length != bentry_len, "Wrong length");
+ test_fail_if ((next - beacon) != CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_BPSTO)
+ + CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_HEADER), "Wrong full bentry length");
+ }
+ test_end;
+}
+
+void
+test_security_key_change (void)
+{
+ u8 beacon [20];
+ uint header;
+ uint length;
+ u8 *next;
+ uint res;
+ uint bentry_len;
+ cp_bentry_key_change_struct_t data;
+
+
+ // security key change.
+ secu->eks = 0xC;
+ secu->kbc = true;
+ cp_beacon->bentries_data.kccd = 0x4;
+
+ next = cp_bentry_encryption_key_change (cp_beacon, beacon);
+ test_case_begin (test, "Security key change bentry");
+
+ header = read_u8_from_word (beacon);
+ length = read_u8_from_word (beacon + 1);
+
+ test_begin (test, "header and length")
+ {
+ test_fail_if (header != CP_BENTRY_ENCRYPTION_KEY_CHANGE,
+ "Wrong bentry header");
+ bentry_len = CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_EKC);
+ test_fail_if (length != bentry_len, "Wrong length");
+ test_fail_if ((next - beacon) != CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_EKC)
+ + CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_HEADER), "Wrong full bentry length");
+ }
+ test_end;
+
+ res = read_u32_from_word (beacon + 2);
+ data.kccd = res & 0x3F;
+ res = res >> 6;
+ data.kbc = res & true;
+ res = res >> 2;
+ data.new_eks = res & 0xF;
+
+
+ test_begin (test, "Key change")
+ {
+ test_fail_if (data.kccd != cp_beacon->bentries_data.kccd, "Wrong kccd countdown");
+
+ /* TODO not tested cause of the modifications of the CP
+ * 03/04/2008.
+ * Laranjeiro
+ */
+ /*test_fail_if (data.kbc != secu->kbc, "Wrong kbc");
+ test_fail_if (data.new_eks != secu->eks, "Wrong eks");
+ */
+ }
+ test_end;
+}
+
+void
+test_handover (void)
+{
+ u8 beacon [20];
+ uint header;
+ uint length;
+ u8 *next;
+ cp_bentry_handover_struct_t data;
+
+ // test handover in progress.
+ cp_beacon->bentries_data.hcd = 0x4;
+
+ next = cp_bentry_handover (cp_beacon, beacon, 0xFD);
+
+ test_case_begin (test, "Handover bentry");
+
+ header = read_u8_from_word (beacon);
+ length = read_u8_from_word (beacon + 1);
+
+ test_begin (test, "header and length")
+ {
+ test_fail_if (header != CP_BENTRY_CCO_HANDOVER,
+ "Wrong bentry header");
+ test_fail_if (length != CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_HANDOVER),
+ "Wrong length");
+ test_fail_if ((next - beacon) != CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_HANDOVER)
+ + CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_HEADER), "Wrong full bentry length");
+ }
+ test_end;
+
+ data.hcd = read_u8_from_word (beacon + 2) & 0x3F;
+ data.nctei = read_u8_from_word (beacon + 3);
+
+ test_begin (test, "handover")
+ {
+ test_fail_if (data.hcd != cp_beacon->bentries_data.hcd,
+ "Wrong handover countdown value");
+ test_fail_if (data.nctei != 0xFD, "Wrong new CCo tei");
+ }
+ test_end;
+
+}
+
+void
+test_hybrid_mode (void)
+{
+ u8 beacon [20];
+ uint header;
+ uint length;
+ u8 *next;
+ uint res;
+ cp_bentry_hm_struct_t data;
+
+ cp_beacon->bentries_data.hmccd = 0x3;
+ cp_beacon->hm = 1;
+
+ next = cp_bentry_change_hm (cp_beacon, beacon);
+
+ test_case_begin (test, "HM bentry");
+
+ header = read_u8_from_word (beacon);
+ length = read_u8_from_word (beacon + 1);
+
+ test_begin (test, "header and length")
+ {
+ test_fail_if (header != CP_BENTRY_CHANGE_HM,
+ "Wrong bentry header");
+ test_fail_if (length != CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_HM),
+ "Wrong length");
+ test_fail_if ((next - beacon) != CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_BIT_SIZE_HM)
+ + CP_BENTRY_BYTE_SIZEOF(CP_BENTRY_HEADER), "Wrong full bentry length");
+ }
+ test_end;
+
+ res = read_u8_from_word (beacon + 2);
+ data.hmccd = res & 0x3f;
+ data.new_hm = res >> 6;
+
+ test_begin (test, "hybrid mode")
+ {
+ test_fail_if (data.hmccd != cp_beacon->bentries_data.hmccd,
+ "Wrong hybrid mode countdown value");
+ test_fail_if (data.new_hm != cp_beacon->hm, "Wrong Hybrid mode");
+ }
+ test_end;
+
+}
+
+int
+main (void)
+{
+ test_init (test, 0, NULL);
+ trace_init ();
+
+ my_test_init ();
+ test_bentry_fill_header ();
+ test_default_schedule ();
+ test_persistent_schedule ();
+ test_regions ();
+ test_mac_address ();
+ test_discover ();
+ test_discover_info ();
+ test_bpsto();
+ test_security_key_change ();
+ test_handover();
+ test_hybrid_mode ();
+ trace_uninit();
+
+ cp_beacon_uninit(cp_beacon);
+ hal_timer_uninit (timer);
+ mac_ntb_uninit();
+
+ blk_release (phy);
+ blk_release (sta);
+ blk_release (secu);
+
+ blk_release (pbproc);
+ blk_release (ca);
+ blk_release (mac_store);
+ blk_release (cco);
+
+
+ test_begin(test, "memory test")
+ {
+ test_fail_if(blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
+
+/**
+ * Get date of last zero-cross.
+ * \param ctx phy context
+ * \return last zero-cross date
+ * set errno to:
+ * - EINVAL if ctx is null
+ */
+u32
+phy_clock_get_zero_cross_captured_date (phy_t *ctx)
+{
+ phy_test_t *phy;
+ dbg_assert(ctx);
+
+ phy = (phy_test_t *) ctx;
+
+ if(phy->freq_test == 50)
+ {
+ // Add a jitter on the 20 beacon.
+ if (phy->ntb >= 20e6 && phy->ntb <= 21e6)
+ {
+ phy->ntb += 1e6 + 200;
+ }
+ // Add a jitter on the 40 beacon.
+ if (phy->ntb >= 40e6 && phy->ntb <= 41e6)
+ {
+ phy->ntb += 1e6 - 200;
+ }
+ else
+ {
+ phy->ntb += 1e6;
+ }
+ }
+ else if (phy->freq_test == 60)
+ {
+ phy->ntb += 833333;
+ }
+
+ return phy->ntb;
+}
+
+/**
+ * Prepare a beacon for transmission.
+ * \param ctx pbproc context
+ * \param mfs corresponding special MFS
+ * \param pb beacon payload
+ * \param params extra parameters for beacon transmission
+ *
+ * There can only be one beacon prepared in advance (for a given MFS).
+ *
+ * This will cancel the preceding prepared beacon if it was not sent.
+ *
+ * PB reference is transfered to PB Processing. Extra parameters are copied.
+ */
+void
+pbproc_mfs_beacon_prepare (pbproc_t *ctx, mfs_tx_t *mfs, pb_beacon_t *pb,
+ const pbproc_tx_beacon_params_t *params)
+{
+ cp_beacon_desc_t *dbeacon;
+ uint c_payload;
+ uint d_payload;
+ uint i;
+
+ dbg_assert (pb);
+ dbg_assert (beacon);
+
+ test_case_begin (test, "Discover beacon verifycation");
+ dbeacon = (cp_beacon_desc_t *) pb;
+
+ test_begin (test, "Verify NID")
+ {
+ test_fail_if (beacon->nid_msb != dbeacon->nid_msb, "Wrong nid MSB");
+ test_fail_if ((beacon->payload->beacon_mpdu_payload[0] & 0x3FFFFF)
+ != (dbeacon->payload->beacon_mpdu_payload[0] & 0x3FFFFFF),
+ "Wrong nid lsb");
+ }
+ test_end;
+
+ test_begin (test, "Paylaod")
+ {
+ memcpy (&c_payload, beacon->payload + 8, 4);
+ memcpy (&d_payload, dbeacon->payload + 8, 4);
+
+ test_fail_if ((c_payload & 0x1FFFFFF0) != (d_payload & 0x1FFFFFF0), "Wrong \
+ payload copy from the central beacon");
+ test_fail_if (dbeacon->payload->nbe != beacon->payload->nbe + 1,
+ "Wrong quantity of bentries");
+ test_fail_if (*(dbeacon->payload->bmis) != CP_BENTRY_DISCOVER_INFO,
+ "Wrong bentruy header for the discover info");
+
+ for (i = 0; i < 122; i++)
+ {
+ test_fail_if (dbeacon->payload->bmis[6 + i] != beacon->payload->bmis[i],
+ "Bentry %d copied from central beacon is false", i);
+ }
+ }
+ test_end;
+
+ blk_release_desc ((blk_t *) pb);
+}
+
+//----------------- Stubing the CA functions ------------------
+
+ca_schedule_t *
+ca_alloc_get_schedule (ca_t *ctx, uint index)
+{
+ return &ca_sched;
+}
+
+void
+ca_alloc_update_beacon_periods (ca_t *ctx,
+ ca_beacon_period_t *beacon_periods,
+ uint beacon_periods_nb)
+{
+ uint i;
+ uint bp = 1000000;
+
+ // Verifying the shedule and beacon periods data.
+ test_case_begin (test, "Check schedule");
+
+ test_begin(test, "checking beacon periods")
+ {
+ for (i = 0; i < beacon_periods_nb; i++)
+ {
+ test_fail_if (beacon_periods[i].start_date != 200 + (i+1)*bp, "Wrong bp value");
+ }
+ }
+ test_end;
+
+ // Global variable declared in this test.
+ test_begin (test, "Checking schedules")
+ {
+ test_fail_if (ca_sched.coexistence_mode != 0x0, "Wrong coexistence mode");
+ test_fail_if (ca_sched.nek_switch != 0, "Wrong NEK switch"); //TODO
+ test_fail_if (ca_sched.allocations[0].end_offset_tck / 256 != 3906, "Wrong schedule");
+ test_fail_if (ca_sched.allocations[0].glid != 0xFF, "Wrong GLID");
+ }
+ test_end;
+}
+
+bool
+ca_mfs_remove (ca_t *ctx, mfs_tx_t *mfs)
+{
+ return true;
+}
+
+void
+ca_mfs_add (ca_t *ctx, mfs_tx_t *mfs)
+{
+ dbg_assert (ctx);
+ dbg_assert (mfs);
+}
+
+
+void
+ca_mfs_update (ca_t *ctx, mfs_tx_t *mfs)
+{
+}
+
+void
+ca_mfs_hold (ca_t *ctx, mfs_tx_t *mfs)
+{
+}
+
+void
+pbproc_activate (pbproc_t *ctx, bool flag)
+{
+ dbg_assert (ctx);
+}
+
diff --git a/cesar/cp/beacon/test/central_beacon/src/bts_bto_bp.c b/cesar/cp/beacon/test/central_beacon/src/bts_bto_bp.c
new file mode 100644
index 0000000000..e2db681440
--- /dev/null
+++ b/cesar/cp/beacon/test/central_beacon/src/bts_bto_bp.c
@@ -0,0 +1,175 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/src/bts_bto_bp.c
+ * \brief Test the bts bto and bp.
+ * \ingroup cp
+ *
+ * Test the bts, bto and bp estimation according with the specifications of
+ * the beacons.
+ */
+#include "common/std.h"
+
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_arch.h>
+
+#include <stdio.h>
+
+#include "lib/test.h"
+#include "lib/trace.h"
+#include "lib/blk.h"
+
+#include "cp/station/station.h"
+#include "cp/secu/secu.h"
+
+#include "hal/phy/phy.h"
+#include "mac/common/ntb.h"
+
+#include "cp/beacon/beacons.h"
+
+#include "cp/beacon/inc/beacons.h"
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/inc/trace.h"
+
+#include "hal/timer/timer.h"
+
+#include "cp/beacon/test/central_beacon/inc/phy_stub.h"
+
+void test_estimation (test_t test);
+
+void
+cp_beacon_expired (void *user_data)
+{
+
+}
+
+
+int
+main (void)
+{
+ test_t test;
+
+ test_init (test, 0, NULL);
+ trace_init();
+
+ test_estimation(test);
+
+ trace_uninit();
+ test_begin(test, "memory test")
+ {
+ test_fail_if(blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
+
+void
+test_estimation (test_t test)
+{
+ phy_test_t phy;
+ cp_sta_t *sta;
+ cp_secu_t *secu;
+ mac_config_t mac_config;
+ cp_beacon_t *cp_beacon;
+ cp_cco_t *cco;
+ hal_timer_t *timer;
+
+ ca_t *ca;
+ pbproc_t *pbproc;
+ mac_store_t *mac_store;
+ uint i;
+
+ // Configuring the phy test for this test.
+ phy.freq_test = 50;
+ phy.ntb = 0;
+ phy.date_ntb = 0;
+
+ mac_config.ntb_offset_tck = 0;
+
+ sta = blk_alloc();
+ secu = blk_alloc();
+ ca = blk_alloc();
+ mac_store = blk_alloc ();
+ pbproc = blk_alloc ();
+ cco = blk_alloc ();
+
+ timer = hal_timer_init ((phy_t *) &phy);
+ mac_ntb_init((phy_t *) &phy, &mac_config);
+ cp_beacon = cp_beacon_init((interface_t *) &phy, (phy_t *) &phy, sta, secu, ca, pbproc,
+ mac_store, cco, timer, NULL, cp_beacon_expired);
+
+ cp_beacon_acl_frequency_detection (cp_beacon);
+ cp_beacon_acl_frequency_detection (cp_beacon);
+
+ printf ("Result\n");
+ for (i = 0; i < 100; i++)
+ {
+
+ cp_beacon_estimate_bts_bto_bp (cp_beacon,
+ &cp_beacon->cbeacon);
+ printf ("btse : %d \t bto 0 : %d\t bto 1 : %d \t bto 2 : %d\t bto 3 : %d\n",
+ cp_beacon->cbeacon.btse_ntb[0], (s16) cp_beacon->cbeacon.bto_bpsto.bto[0],
+ (s16) cp_beacon->cbeacon.bto_bpsto.bto[1], (s16) cp_beacon->cbeacon.bto_bpsto.bto[2],
+ (s16) cp_beacon->cbeacon.bto_bpsto.bto[3]);
+ }
+
+ cp_beacon_trace_print(cp_beacon);
+ cp_beacon_uninit(cp_beacon);
+ hal_timer_uninit (timer);
+ mac_ntb_uninit();
+ blk_release (sta);
+ blk_release (pbproc);
+ blk_release (ca);
+ blk_release (mac_store);
+ blk_release (secu);
+ blk_release (cco);
+}
+
+/**
+ * Get date of last zero-cross.
+ * \param ctx phy context
+ * \return last zero-cross date
+ * set errno to:
+ * - EINVAL if ctx is null
+ */
+u32
+phy_clock_get_zero_cross_captured_date (phy_t *ctx)
+{
+ phy_test_t *phy;
+ dbg_assert(ctx);
+
+ phy = (phy_test_t *) ctx;
+
+ if(phy->freq_test == 50)
+ {
+ // Add a jitter on the 20 beacon.
+ if (phy->ntb >= 20e6 && phy->ntb <= 21e6)
+ {
+ phy->ntb += 1e6 + 200;
+ }
+ // Add a jitter on the 40 beacon.
+ if (phy->ntb >= 40e6 && phy->ntb <= 41e6)
+ {
+ phy->ntb += 1e6 - 200;
+ }
+ else
+ {
+ phy->ntb += 1e6;
+ }
+ }
+ else if (phy->freq_test == 60)
+ {
+ phy->ntb += 833333;
+ }
+
+ return phy->ntb;
+}
+
diff --git a/cesar/cp/beacon/test/central_beacon/src/ca_stub.c b/cesar/cp/beacon/test/central_beacon/src/ca_stub.c
new file mode 100644
index 0000000000..9ec7775696
--- /dev/null
+++ b/cesar/cp/beacon/test/central_beacon/src/ca_stub.c
@@ -0,0 +1,57 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/src/ca_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "mac/ca/ca.h"
+
+static ca_schedule_t sched;
+
+ca_schedule_t *
+ca_alloc_get_schedule (ca_t *ctx, uint index)
+{
+ return &sched;
+}
+
+void
+ca_alloc_update_beacon_periods (ca_t *ctx,
+ ca_beacon_period_t *beacon_periods,
+ uint beacon_periods_nb)
+{
+}
+
+
+bool
+ca_mfs_remove (ca_t *ctx, mfs_tx_t *mfs)
+{
+ return true;
+}
+
+void
+ca_mfs_add (ca_t *ctx, mfs_tx_t *mfs)
+{
+ dbg_assert (ctx);
+ dbg_assert (mfs);
+}
+
+
+void
+ca_mfs_update (ca_t *ctx, mfs_tx_t *mfs)
+{
+}
+
+void
+ca_mfs_hold (ca_t *ctx, mfs_tx_t *mfs)
+{
+}
diff --git a/cesar/cp/beacon/test/central_beacon/src/cco_request_discover_beacon.c b/cesar/cp/beacon/test/central_beacon/src/cco_request_discover_beacon.c
new file mode 100644
index 0000000000..7ea232cec3
--- /dev/null
+++ b/cesar/cp/beacon/test/central_beacon/src/cco_request_discover_beacon.c
@@ -0,0 +1,293 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/src/cco_request_discover_beacon.c
+ * \brief test the response of the sta on a central beacon with a discover
+ * beacon requested.
+ * \ingroup cp_beacon
+ *
+ */
+#include "common/std.h"
+
+#include <stdio.h>
+
+#include "lib/blk.h"
+#include "lib/test.h"
+#include "lib/read_word.h"
+#include "lib/trace.h"
+#include "lib/bitstream.h"
+
+#include "mac/common/config.h"
+#include "mac/common/ntb.h"
+#include "mac/common/pb.h"
+
+#include "hal/phy/phy.h"
+#include "cp/station/station.h"
+#include "cp/secu/secu.h"
+
+#include "cp/beacon/beacons.h"
+#include "cp/beacon/inc/beacons.h"
+
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/test/central_beacon/inc/phy_stub.h"
+#include "cp/cco/inc/context.h"
+
+#include "cp/station/inc/context.h"
+#include "cp/secu/inc/secu_types.h"
+
+#include "hal/timer/timer.h"
+
+#include "cp/beacon/inc/beacons_work.h"
+
+test_t test;
+cp_beacon_desc_t *beacon;
+static ca_schedule_t ca_sched;
+
+
+cp_beacon_t *cp_beacon;
+mac_config_t mac_config;
+hal_timer_t *timer;
+pbproc_t *pbproc;
+ca_t *ca;
+mac_store_t *mac_store;
+cp_cco_t *cco;
+phy_t *phy;
+cp_sta_t *sta;
+cp_secu_t *secu;
+
+void
+cp_beacon_expired (void *user_data)
+{
+
+}
+
+
+void
+my_test_init (void)
+{
+ phy = blk_alloc();
+ sta = blk_alloc();
+ secu = blk_alloc();
+
+ pbproc = blk_alloc();
+ ca = blk_alloc();
+ mac_store = blk_alloc();
+ cco = blk_alloc();
+
+ sta->mac_config = &mac_config;
+ mac_ntb_init ((phy_t *)phy, &mac_config);
+
+ timer = hal_timer_init ((phy_t *) phy);
+ cp_beacon = cp_beacon_init ((interface_t *) phy, (phy_t *)phy, sta, secu, ca, pbproc, mac_store, cco, timer, NULL, cp_beacon_expired);
+
+ cp_beacon_acl_frequency_detection (cp_beacon);
+ cp_beacon_acl_frequency_detection (cp_beacon);
+}
+
+void
+test_beacon_create_central(void)
+{
+ u8 *bentry;
+
+ sta->mac_config->sta_mac_address = 0x123456789ABC;
+ sta->nid = 0x123456789ABCD;
+ mac_config.tei = 0xA;
+ cco->ncnr = true;
+ cco->npsm = true;
+ cco->num_slots = 5;
+ cco->slot_usage = 0x3;
+ cco->slotid = 0x2;
+ cco->aclss = true;
+ sta->hoip = true;
+ mac_config.rts_broadcast = true;
+ cco->nm = true;
+ cco->cco_cap = 2;
+
+ beacon = (cp_beacon_desc_t *) blk_alloc_desc ();
+
+ cp_beacon_cco_beacon_central_generate (cp_beacon, beacon);
+
+ // bentries.
+ beacon->payload->nbe ++;
+ bentry = cp_bentry_discover (cp_beacon, &beacon->payload->bmis[26], 0xA);
+
+ cp_beacon_process (cp_beacon, beacon);
+
+ blk_release_desc ((blk_t *) beacon);
+}
+
+
+int
+main (void)
+{
+ test_init (test, 0, NULL);
+ trace_init ();
+
+ my_test_init ();
+ test_beacon_create_central();
+
+ cp_beacon_uninit(cp_beacon);
+ hal_timer_uninit (timer);
+ mac_ntb_uninit();
+
+ blk_release (phy);
+ blk_release (sta);
+ blk_release (secu);
+
+ blk_release (pbproc);
+ blk_release (ca);
+ blk_release (mac_store);
+ blk_release (cco);
+
+
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
+
+/**
+ * Prepare a beacon for transmission.
+ * \param ctx pbproc context
+ * \param mfs corresponding special MFS
+ * \param pb beacon payload
+ * \param params extra parameters for beacon transmission
+ *
+ * There can only be one beacon prepared in advance (for a given MFS).
+ *
+ * This will cancel the preceding prepared beacon if it was not sent.
+ *
+ * PB reference is transfered to PB Processing. Extra parameters are copied.
+ */
+void
+pbproc_mfs_beacon_prepare (pbproc_t *ctx, mfs_tx_t *mfs, pb_beacon_t *pb,
+ const pbproc_tx_beacon_params_t *params)
+{
+ uint nbe;
+ u8 *bentry;
+ uint header;
+ uint i;
+
+ nbe = ((cp_beacon_desc_t *) pb)->payload->nbe;
+ bentry = ((cp_beacon_desc_t *) pb)->payload->bmis;
+
+ test_begin (test, "Verifing the bentries in discover beacon")
+ {
+ for (i = 0; i < nbe; i++)
+ {
+ header = read_u8_from_word(bentry);
+ switch (i)
+ {
+ case 0:
+ test_fail_if (header != CP_BENTRY_MAC_ADDRESS,
+ "Wrong bentry header, should be a mac address bentry");
+ break;
+ case 1:
+ test_fail_if (header != CP_BENTRY_DISCOVER_INFO,
+ "Wrong bentry should be a discover info");
+ break;
+ case 2:
+ test_fail_if (header != CP_BENTRY_REGIONS,
+ "Wrong bentry should be a region bentry");
+ break;
+ case 3:
+ test_fail_if (header != CP_BENTRY_PERSISTENT_SCHEDULE,
+ "Wrong bentry should be a persistent bentry");
+ }
+ bentry += 2 + read_u8_from_word (bentry + 1);
+ }
+ }
+ test_end;
+
+ blk_release_desc ((blk_t *) pb);
+}
+
+/**
+ * Get date of last zero-cross.
+ * \param ctx phy context
+ * \return last zero-cross date
+ * set errno to:
+ * - EINVAL if ctx is null
+ */
+u32
+phy_clock_get_zero_cross_captured_date (phy_t *ctx)
+{
+ phy_test_t *phy;
+ dbg_assert(ctx);
+
+ phy = (phy_test_t *) ctx;
+
+ if(phy->freq_test == 50)
+ {
+ // Add a jitter on the 20 beacon.
+ if (phy->ntb >= 20e6 && phy->ntb <= 21e6)
+ {
+ phy->ntb += 1e6 + 200;
+ }
+ // Add a jitter on the 40 beacon.
+ if (phy->ntb >= 40e6 && phy->ntb <= 41e6)
+ {
+ phy->ntb += 1e6 - 200;
+ }
+ else
+ {
+ phy->ntb += 1e6;
+ }
+ }
+ else if (phy->freq_test == 60)
+ {
+ phy->ntb += 833333;
+ }
+
+ return phy->ntb;
+}
+
+//----------------- Stubing the CA functions ------------------
+
+ca_schedule_t *
+ca_alloc_get_schedule (ca_t *ctx, uint index)
+{
+ return &ca_sched;
+}
+
+void
+ca_alloc_update_beacon_periods (ca_t *ctx,
+ ca_beacon_period_t *beacon_periods,
+ uint beacon_periods_nb)
+{
+}
+
+bool
+ca_mfs_remove (ca_t *ctx, mfs_tx_t *mfs)
+{
+ return true;
+}
+
+void
+ca_mfs_add (ca_t *ctx, mfs_tx_t *mfs)
+{
+ dbg_assert (ctx);
+ dbg_assert (mfs);
+}
+
+
+void
+ca_mfs_update (ca_t *ctx, mfs_tx_t *mfs)
+{
+}
+
+void
+ca_mfs_hold (ca_t *ctx, mfs_tx_t *mfs)
+{
+}
+
+void
+pbproc_activate (pbproc_t *ctx, bool flag)
+{
+ dbg_assert (ctx);
+}
+
diff --git a/cesar/cp/beacon/test/central_beacon/src/central_beacon.c b/cesar/cp/beacon/test/central_beacon/src/central_beacon.c
new file mode 100644
index 0000000000..f33eeb753e
--- /dev/null
+++ b/cesar/cp/beacon/test/central_beacon/src/central_beacon.c
@@ -0,0 +1,736 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/src/central_beacon.c
+ * \brief generation of the central beacon.
+ * \ingroup cp_beacon
+ *
+ */
+#include "common/std.h"
+
+#include <stdio.h>
+
+#include "lib/blk.h"
+#include "lib/test.h"
+#include "lib/read_word.h"
+#include "lib/trace.h"
+#include "lib/bitstream.h"
+
+#include "mac/common/config.h"
+#include "mac/common/ntb.h"
+#include "mac/common/pb.h"
+
+#include "hal/phy/phy.h"
+#include "cp/station/station.h"
+#include "cp/secu/secu.h"
+
+#include "cp/beacon/beacons.h"
+#include "cp/beacon/inc/beacons.h"
+
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/test/central_beacon/inc/phy_stub.h"
+#include "cp/cco/inc/context.h"
+
+#include "cp/station/inc/context.h"
+//#include "cp/secu/inc/context.h"
+#include "cp/secu/inc/secu_types.h"
+
+#include "hal/timer/timer.h"
+
+#include "cp/beacon/inc/beacons_work.h"
+
+#define WORD sizeof(u32)
+
+test_t test;
+cp_beacon_desc_t *beacon;
+static ca_schedule_t ca_sched;
+
+
+cp_beacon_t *cp_beacon;
+mac_config_t mac_config;
+hal_timer_t *timer;
+pbproc_t *pbproc;
+ca_t *ca;
+mac_store_t *mac_store;
+cp_cco_t *cco;
+phy_t *phy;
+cp_sta_t *sta;
+cp_secu_t *secu;
+
+void
+cp_beacon_expired (void *user_data)
+{
+
+}
+
+
+void
+my_test_init (void)
+{
+ phy = blk_alloc();
+ sta = blk_alloc();
+ secu = blk_alloc();
+
+ pbproc = blk_alloc();
+ ca = blk_alloc();
+ mac_store = blk_alloc();
+ cco = blk_alloc();
+
+ sta->mac_config = &mac_config;
+ mac_ntb_init ((phy_t *)phy, &mac_config);
+
+ timer = hal_timer_init ((phy_t *) phy);
+ cp_beacon = cp_beacon_init ((interface_t *) &phy, (phy_t *)phy, sta, secu, ca, pbproc, mac_store, cco, timer, NULL, cp_beacon_expired);
+
+ cp_beacon_acl_frequency_detection (cp_beacon);
+ cp_beacon_acl_frequency_detection (cp_beacon);
+}
+
+void
+test_beacon_create_central(void)
+{
+ cp_beacon_work_beacon_t beacon_work;
+ bitstream_t bitstream;
+ u8 *bentry;
+ uint header;
+ uint length;
+
+ sta->mac_config->sta_mac_address = 0x123456789ABC;
+ sta->nid = 0x123456789ABCD;
+ mac_config.tei = 0xA;
+ cco->ncnr = true;
+ cco->npsm = true;
+ cco->num_slots = 5;
+ cco->slot_usage = 0x3;
+ cco->slotid = 0x2;
+ cco->aclss = true;
+ sta->hoip = true;
+ mac_config.rts_broadcast = true;
+ cco->nm = true;
+ cco->cco_cap = 2;
+
+ beacon = (cp_beacon_desc_t *) blk_alloc_desc ();
+
+ cp_beacon_cco_beacon_central_generate (cp_beacon, beacon);
+
+ beacon_work.nid_msb = read_u32_from_word ((u8 *) &beacon->nid_msb);
+
+ bitstream_init (&bitstream, beacon->payload->beacon_mpdu_payload, 32,
+ BITSTREAM_READ);
+ bitstream_access (&bitstream, &beacon_work.nid_lsb, 22);
+ bitstream_access (&bitstream, &beacon_work.hm, 2);
+ bitstream_access (&bitstream, &beacon_work.stei, 8);
+ bitstream_finalise (&bitstream);
+
+ bitstream_init (&bitstream, beacon->payload->beacon_mpdu_payload + 4, 32,
+ BITSTREAM_READ);
+ bitstream_access (&bitstream, &beacon_work.bt, 3);
+ beacon_work.bt = CP_BEACON_WORK_MASK_BT (beacon_work.bt);
+
+ bitstream_access (&bitstream, &beacon_work.ncnr, 1);
+ bitstream_access (&bitstream, &beacon_work.npsm, 1);
+ bitstream_access (&bitstream, &beacon_work.num_slots, 3);
+ beacon_work.num_slots =
+ CP_BEACON_WORK_MASK_NUM_SLOTS(beacon_work.num_slots);
+
+ bitstream_access (&bitstream, &beacon_work.slot_usage, 8);
+ bitstream_access (&bitstream, &beacon_work.slot_id, 3);
+ beacon_work.slot_id = CP_BEACON_WORK_MASK_SLOT_ID(beacon_work.slot_id);
+
+ bitstream_access (&bitstream, &beacon_work.aclss, 3);
+ beacon_work.aclss = CP_BEACON_WORK_MASK_ACLSS(beacon_work.aclss);
+
+ bitstream_access (&bitstream, &beacon_work.hoip, 1);
+ bitstream_access (&bitstream, &beacon_work.rtsbf, 1);
+ bitstream_access (&bitstream, &beacon_work.nm, 2);
+ beacon_work.nm = CP_BEACON_WORK_MASK_NM(beacon_work.nm);
+
+ bitstream_access (&bitstream, &beacon_work.cco_cap, 2);
+ beacon_work.cco_cap = CP_BEACON_WORK_MASK_CCO_CAP(beacon_work.cco_cap);
+
+ bitstream_finalise (&bitstream);
+
+ test_case_begin (test, "Analysing the beacon");
+
+ test_begin (test, "Beacon data")
+ {
+ u64 nid;
+
+ nid = beacon_work.nid_msb;
+ nid = nid << 22;
+ nid = nid | beacon_work.nid_lsb;
+
+ test_fail_if (nid != sta->nid, "Wrong nid");
+ test_fail_if (beacon_work.hm != cp_beacon->hm, "Wrong HM");
+ test_fail_if (beacon_work.stei != mac_config.tei, "Wrong tei");
+ test_fail_if (beacon_work.bt != CP_BEACON_CENTRAL_BEACON,
+ "Wrong bt type");
+ test_fail_if (beacon_work.ncnr != cco->ncnr, "Wrong ncnr");
+ test_fail_if (beacon_work.npsm != cco->npsm, "Wrong npsm");
+ test_fail_if (beacon_work.num_slots != cco->num_slots,
+ "Wrong num slots");
+ test_fail_if (beacon_work.slot_usage != cco->slot_usage,
+ "Wrong slot usage");
+ test_fail_if (beacon_work.slot_id!= cco->slotid,
+ "Wrong slot id");
+ test_fail_if (beacon_work.aclss != cco->aclss,
+ "Wrong aclss");
+ test_fail_if (beacon_work.hoip != sta->hoip, "Wrong HOIP");
+ test_fail_if (beacon_work.rtsbf != mac_config.rts_broadcast,
+ "Wrong RTSBF");
+ test_fail_if (beacon_work.nm != cco->nm, "Wrong NM");
+ test_fail_if (beacon_work.cco_cap != cco->cco_cap,
+ "Wrong CCo capability");
+ }
+ test_end;
+
+ test_case_begin (test, "Reading bentries");
+
+ bentry = (u8 *) &beacon->payload->bmis;
+
+ test_begin (test, "BPSTO")
+ {
+ header = read_u8_from_word(bentry);
+ length = read_u8_from_word(bentry + 1);
+
+ test_fail_if (header != CP_BENTRY_BEACON_PERIOD_START_OFFSET,
+ "Wrong BPSTO header in the bentry");
+ test_fail_if (length != 3, "Wrong bentry length");
+ bentry += 5;
+ }
+ test_end;
+
+ test_begin (test, "Mac address bentry")
+ {
+ u64 mac;
+ header = read_u8_from_word(bentry);
+ length = read_u8_from_word(bentry + 1);
+
+ mac = read_u16_from_word (bentry + 6);
+ mac = mac << 32;
+ mac = mac | read_u32_from_word (bentry + 2);
+
+ test_fail_if (header != CP_BENTRY_MAC_ADDRESS,
+ "Wrong MAC ADDRESS header in the bentry");
+ test_fail_if (length != 6, "Wrong bentry length");
+ test_fail_if (mac != sta->mac_config->sta_mac_address, "Wrong mac address");
+
+ bentry += 8;
+ }
+ test_end;
+
+ test_begin (test, "Regions bentry")
+ {
+ uint res;
+ uint nr;
+ uint rt;
+ uint ret;
+
+ header = read_u8_from_word(bentry);
+ length = read_u8_from_word(bentry + 1);
+
+ res = read_u32_from_word (bentry + 2);
+
+ nr = res & 0x3F;
+ res = res >> 8; // 6 bits of nr + 2 reserved.
+ rt = res & 0xF;
+ res = res >> 4;
+ ret = res & 0xFFF;
+
+ test_fail_if (header != CP_BENTRY_REGIONS,
+ "Wrong Regions header in the bentry");
+ test_fail_if (length != 3, "Wrong bentry length");
+
+ test_fail_if (nr != 1, "Wrong region number");
+ test_fail_if (rt != CP_BENTRY_REGIONS_LOCAL_CSMA,
+ "Wrong regions type");
+ test_fail_if (ret != 3906, "Wrong region end time");
+
+ bentry += 5;
+ }
+ test_end;
+
+ test_begin (test, "Persistent schedules")
+ {
+ cp_bentry_sai_t sai;
+ uint pscd;
+ uint cscd;
+ uint res;
+ uint ns;
+
+ header = read_u8_from_word(bentry);
+ length = read_u8_from_word(bentry + 1);
+
+ res = read_u8_from_word (bentry + 2);
+ pscd = res & 0x7;
+ res = res >> 3;
+ cscd = res & 0x7;
+
+ ns = read_u8_from_word (bentry + 3) & 0x3F;
+
+ res = read_u32_from_word (bentry + 4);
+
+ sai.stpf = res & true;
+ res = res >> 1;
+ sai.glid = res & 0x7F;
+ res = res >> 7;
+ sai.st = res & 0xFFF;
+ res = res >> 12;
+ sai.et = res & 0xFFF;
+
+ test_fail_if (header != CP_BENTRY_PERSISTENT_SCHEDULE,
+ "Wrong persistent schedule header in the bentry");
+ test_fail_if (length != 6, "Wrong bentry length");
+
+ test_fail_if (sai.stpf != true, "Wrong sai type");
+ test_fail_if (sai.glid != 0x7f, "Wrong glid");
+ test_fail_if (sai.st != 0, "Wrong start time");
+ test_fail_if (sai.et != 3906, "Wrong end time");
+ }
+ test_end;
+
+ blk_release_desc ((blk_t *) beacon);
+}
+
+void
+test_beacon_create_discover (void)
+{
+ cp_beacon_work_beacon_t beacon_work;
+ bitstream_t bitstream;
+ u8 *bentry;
+ uint header;
+ uint length;
+
+ sta->mac_config->sta_mac_address = 0x123456789ABC;
+ sta->nid = 0x123456789ABCD;
+ mac_config.tei = 0xA;
+ cco->ncnr = true;
+ cco->npsm = true;
+ cco->num_slots = 5;
+ cco->slot_usage = 0x3;
+ cco->slotid = 0x2;
+ cco->aclss = true;
+ sta->hoip = true;
+ mac_config.rts_broadcast = true;
+ cco->nm = true;
+ cco->cco_cap = 2;
+
+ beacon = (cp_beacon_desc_t *) blk_alloc_desc ();
+
+ cp_beacon_cco_beacon_discover_generate (cp_beacon, beacon);
+
+ beacon_work.nid_msb = read_u32_from_word ((u8 *) &beacon->nid_msb);
+
+ bitstream_init (&bitstream, beacon->payload->beacon_mpdu_payload, 32,
+ BITSTREAM_READ);
+ bitstream_access (&bitstream, &beacon_work.nid_lsb, 22);
+ bitstream_access (&bitstream, &beacon_work.hm, 2);
+ bitstream_access (&bitstream, &beacon_work.stei, 8);
+ bitstream_finalise (&bitstream);
+
+ bitstream_init (&bitstream, beacon->payload->beacon_mpdu_payload + 4, 32,
+ BITSTREAM_READ);
+ bitstream_access (&bitstream, &beacon_work.bt, 3);
+ beacon_work.bt = CP_BEACON_WORK_MASK_BT (beacon_work.bt);
+
+ bitstream_access (&bitstream, &beacon_work.ncnr, 1);
+ bitstream_access (&bitstream, &beacon_work.npsm, 1);
+ bitstream_access (&bitstream, &beacon_work.num_slots, 3);
+ beacon_work.num_slots =
+ CP_BEACON_WORK_MASK_NUM_SLOTS(beacon_work.num_slots);
+
+ bitstream_access (&bitstream, &beacon_work.slot_usage, 8);
+ bitstream_access (&bitstream, &beacon_work.slot_id, 3);
+ beacon_work.slot_id = CP_BEACON_WORK_MASK_SLOT_ID(beacon_work.slot_id);
+
+ bitstream_access (&bitstream, &beacon_work.aclss, 3);
+ beacon_work.aclss = CP_BEACON_WORK_MASK_ACLSS(beacon_work.aclss);
+
+ bitstream_access (&bitstream, &beacon_work.hoip, 1);
+ bitstream_access (&bitstream, &beacon_work.rtsbf, 1);
+ bitstream_access (&bitstream, &beacon_work.nm, 2);
+ beacon_work.nm = CP_BEACON_WORK_MASK_NM(beacon_work.nm);
+
+ bitstream_access (&bitstream, &beacon_work.cco_cap, 2);
+ beacon_work.cco_cap = CP_BEACON_WORK_MASK_CCO_CAP(beacon_work.cco_cap);
+
+ bitstream_finalise (&bitstream);
+
+ test_case_begin (test, "Analysing the beacon");
+
+ test_begin (test, "Beacon data")
+ {
+ u64 nid;
+
+ nid = beacon_work.nid_msb;
+ nid = nid << 22;
+ nid = nid | beacon_work.nid_lsb;
+
+ test_fail_if (nid != sta->nid, "Wrong nid");
+ test_fail_if (beacon_work.hm != cp_beacon->hm, "Wrong HM");
+ test_fail_if (beacon_work.stei != mac_config.tei, "Wrong tei");
+ test_fail_if (beacon_work.bt != CP_BEACON_DISCOVER_BEACON,
+ "Wrong bt type");
+ test_fail_if (beacon_work.ncnr != cco->ncnr, "Wrong ncnr");
+ test_fail_if (beacon_work.npsm != cco->npsm, "Wrong npsm");
+ test_fail_if (beacon_work.num_slots != cco->num_slots,
+ "Wrong num slots");
+ test_fail_if (beacon_work.slot_usage != cco->slot_usage,
+ "Wrong slot usage");
+ test_fail_if (beacon_work.slot_id!= cco->slotid,
+ "Wrong slot id");
+ test_fail_if (beacon_work.aclss != cco->aclss,
+ "Wrong aclss");
+ test_fail_if (beacon_work.hoip != sta->hoip, "Wrong HOIP");
+ test_fail_if (beacon_work.rtsbf != mac_config.rts_broadcast,
+ "Wrong RTSBF");
+ test_fail_if (beacon_work.nm != cco->nm, "Wrong NM");
+ test_fail_if (beacon_work.cco_cap != cco->cco_cap,
+ "Wrong CCo capability");
+ }
+ test_end;
+
+ test_case_begin (test, "Reading bentries");
+
+ bentry = (u8 *) &beacon->payload->bmis;
+
+ test_begin (test, "BPSTO")
+ {
+ header = read_u8_from_word(bentry);
+ length = read_u8_from_word(bentry + 1);
+
+ test_fail_if (header != CP_BENTRY_BEACON_PERIOD_START_OFFSET,
+ "Wrong BPSTO header in the bentry");
+ test_fail_if (length != 3, "Wrong bentry length");
+ bentry += 5;
+ }
+ test_end;
+
+ test_begin (test, "Mac address bentry")
+ {
+ u64 mac;
+ header = read_u8_from_word(bentry);
+ length = read_u8_from_word(bentry + 1);
+
+ mac = read_u16_from_word (bentry + 6);
+ mac = mac << 32;
+ mac = mac | read_u32_from_word (bentry + 2);
+
+ test_fail_if (header != CP_BENTRY_MAC_ADDRESS,
+ "Wrong MAC ADDRESS header in the bentry");
+ test_fail_if (length != 6, "Wrong bentry length");
+ test_fail_if (mac != sta->mac_config->sta_mac_address, "Wrong mac address");
+
+ bentry += 8;
+ }
+ test_end;
+
+ test_begin (test, "Regions bentry")
+ {
+ uint res;
+ uint nr;
+ uint rt;
+ uint ret;
+
+ header = read_u8_from_word(bentry);
+ length = read_u8_from_word(bentry + 1);
+
+ res = read_u32_from_word (bentry + 2);
+
+ nr = res & 0x3F;
+ res = res >> 8; // 6 bits of nr + 2 reserved.
+ rt = res & 0xF;
+ res = res >> 4;
+ ret = res & 0xFFF;
+
+ test_fail_if (header != CP_BENTRY_REGIONS,
+ "Wrong Regions header in the bentry");
+ test_fail_if (length != 3, "Wrong bentry length");
+
+ test_fail_if (nr != 1, "Wrong region number");
+ test_fail_if (rt != CP_BENTRY_REGIONS_LOCAL_CSMA,
+ "Wrong regions type");
+ test_fail_if (ret != 3906, "Wrong region end time");
+
+ bentry += 5;
+ }
+ test_end;
+
+ test_begin (test, "default schedules")
+ {
+ cp_bentry_sai_t sai;
+ uint res;
+ uint ns;
+
+ header = read_u8_from_word(bentry);
+ length = read_u8_from_word(bentry + 1);
+
+ ns = read_u8_from_word (bentry + 2) & 0x3F;
+
+ res = read_u32_from_word (bentry + 3);
+
+ sai.stpf = res & true;
+ res = res >> 1;
+ sai.glid = res & 0x7F;
+ res = res >> 7;
+ sai.st = res & 0xFFF;
+ res = res >> 12;
+ sai.et = res & 0xFFF;
+
+ test_fail_if (header != CP_BENTRY_NON_PERSISTENT_SCHEDULE,
+ "Wrong persistent schedule header in the bentry");
+ test_fail_if (length != 5, "Wrong bentry length");
+
+ test_fail_if (sai.stpf != true, "Wrong sai type");
+ test_fail_if (sai.glid != 0x7f, "Wrong glid");
+ test_fail_if (sai.st != 0, "Wrong start time");
+ test_fail_if (sai.et != 4095, "Wrong end time");
+
+ bentry += 7;
+ }
+ test_end;
+
+ test_begin (test, "Discover info bentry")
+ {
+ // Just verify the header.
+ header = read_u8_from_word(bentry);
+ length = read_u8_from_word(bentry + 1);
+
+ test_fail_if (header != CP_BENTRY_DISCOVER_INFO,
+ "Wrong discover info bentry in the bentry");
+ test_fail_if (length != 4, "Wrong bentry length");
+ }
+ test_end;
+
+
+ blk_release_desc ((blk_t *) beacon);
+}
+
+void
+test_beacon_process(void)
+{
+ cp_beacon_work_beacon_t data;
+ bitstream_t bitstream;
+ u64 nid;
+ cp_beacon_desc_t *beacon;
+
+ nid = 0x123456789ABCD;
+
+ data.nid_msb = nid >> 22;
+ data.nid_lsb = nid;
+
+ data.hm = cp_beacon->hm;
+ data.stei = 0xB;
+ data.bt = CP_BEACON_DISCOVER_BEACON;
+ data.ncnr = false;
+ data.npsm = false;
+ data.num_slots = 0x2;
+ data.slot_usage = 0x1;
+ data.slot_id = 0x2;
+ data.aclss = true;
+ data.hoip = false;
+ data.rtsbf = false;
+ data.nm = true;
+ data.cco_cap = 2;
+
+ beacon = (cp_beacon_desc_t *) blk_alloc_desc ();
+
+ bitstream_init (&bitstream, beacon->payload->beacon_mpdu_payload, 32,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &data.nid_lsb, 22);
+ bitstream_access (&bitstream, &data.hm, 2);
+ bitstream_access (&bitstream, &data.stei, 8);
+ bitstream_finalise (&bitstream);
+
+ bitstream_init (&bitstream, beacon->payload->beacon_mpdu_payload + 4, 32,
+ BITSTREAM_WRITE);
+ bitstream_access (&bitstream, &data.bt, 3);
+ bitstream_access (&bitstream, &data.ncnr, 1);
+ bitstream_access (&bitstream, &data.npsm, 1);
+ bitstream_access (&bitstream, &data.num_slots, 3);
+ bitstream_access (&bitstream, &data.slot_usage, 8);
+ bitstream_access (&bitstream, &data.slot_id, 3);
+ bitstream_access (&bitstream, &data.aclss, 3);
+ bitstream_access (&bitstream, &data.hoip, 1);
+ bitstream_access (&bitstream, &data.rtsbf, 1);
+ bitstream_access (&bitstream, &data.nm, 2);
+ bitstream_access (&bitstream, &data.cco_cap, 2);
+ bitstream_finalise (&bitstream);
+
+ beacon->payload->nbe = 0;
+
+ cp_beacon_process (cp_beacon, beacon);
+
+ test_case_begin (test, "Analysing the sta data");
+
+ test_begin (test, "data")
+ {
+ test_fail_if (cp_beacon->hm != data.hm, "Wrong HM");
+ test_fail_if (data.ncnr != cco->ncnr, "Wrong ncnr");
+ test_fail_if (data.npsm != cco->npsm, "Wrong npsm");
+ test_fail_if (data.num_slots != cco->num_slots,
+ "Wrong num slots");
+ test_fail_if (data.slot_usage != cco->slot_usage,
+ "Wrong slot usage");
+ test_fail_if (data.slot_id!= cco->slotid,
+ "Wrong slot id");
+ test_fail_if (data.aclss != cco->aclss,
+ "Wrong aclss");
+ test_fail_if (data.hoip != sta->hoip, "Wrong HOIP");
+ test_fail_if (data.rtsbf != mac_config.rts_broadcast,
+ "Wrong RTSBF");
+ test_fail_if (data.nm != cco->nm, "Wrong NM");
+ test_fail_if (data.cco_cap != cco->cco_cap,
+ "Wrong CCo capability");
+ }
+ test_end;
+}
+
+int
+main (void)
+{
+ test_init (test, 0, NULL);
+ trace_init ();
+
+ my_test_init ();
+ test_beacon_create_central ();
+ test_beacon_process ();
+ test_beacon_create_discover ();
+ trace_uninit();
+
+ cp_beacon_uninit(cp_beacon);
+ hal_timer_uninit (timer);
+ mac_ntb_uninit();
+
+ blk_release (phy);
+ blk_release (sta);
+ blk_release (secu);
+
+ blk_release (pbproc);
+ blk_release (ca);
+ blk_release (mac_store);
+ blk_release (cco);
+
+
+ test_begin(test, "memory test")
+ {
+ test_fail_if(blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
+
+/**
+ * Get date of last zero-cross.
+ * \param ctx phy context
+ * \return last zero-cross date
+ * set errno to:
+ * - EINVAL if ctx is null
+ */
+u32
+phy_clock_get_zero_cross_captured_date (phy_t *ctx)
+{
+ phy_test_t *phy;
+ dbg_assert(ctx);
+
+ phy = (phy_test_t *) ctx;
+
+ if(phy->freq_test == 50)
+ {
+ // Add a jitter on the 20 beacon.
+ if (phy->ntb >= 20e6 && phy->ntb <= 21e6)
+ {
+ phy->ntb += 1e6 + 200;
+ }
+ // Add a jitter on the 40 beacon.
+ if (phy->ntb >= 40e6 && phy->ntb <= 41e6)
+ {
+ phy->ntb += 1e6 - 200;
+ }
+ else
+ {
+ phy->ntb += 1e6;
+ }
+ }
+ else if (phy->freq_test == 60)
+ {
+ phy->ntb += 833333;
+ }
+
+ return phy->ntb;
+}
+
+/**
+ * Prepare a beacon for transmission.
+ * \param ctx pbproc context
+ * \param mfs corresponding special MFS
+ * \param pb beacon payload
+ * \param params extra parameters for beacon transmission
+ *
+ * There can only be one beacon prepared in advance (for a given MFS).
+ *
+ * This will cancel the preceding prepared beacon if it was not sent.
+ *
+ * PB reference is transfered to PB Processing. Extra parameters are copied.
+ */
+void
+pbproc_mfs_beacon_prepare (pbproc_t *ctx, mfs_tx_t *mfs, pb_beacon_t *pb,
+ const pbproc_tx_beacon_params_t *params)
+{
+
+ blk_release_desc ((blk_t *) pb);
+}
+
+//----------------- Stubing the CA functions ------------------
+
+ca_schedule_t *
+ca_alloc_get_schedule (ca_t *ctx, uint index)
+{
+ return &ca_sched;
+}
+
+void
+ca_alloc_update_beacon_periods (ca_t *ctx,
+ ca_beacon_period_t *beacon_periods,
+ uint beacon_periods_nb)
+{
+}
+
+bool
+ca_mfs_remove (ca_t *ctx, mfs_tx_t *mfs)
+{
+ return true;
+}
+
+void
+ca_mfs_add (ca_t *ctx, mfs_tx_t *mfs)
+{
+ dbg_assert (ctx);
+ dbg_assert (mfs);
+}
+
+
+void
+ca_mfs_update (ca_t *ctx, mfs_tx_t *mfs)
+{
+}
+
+void
+ca_mfs_hold (ca_t *ctx, mfs_tx_t *mfs)
+{
+}
+
+void
+pbproc_activate (pbproc_t *ctx, bool flag)
+{
+ dbg_assert (ctx);
+}
+
diff --git a/cesar/cp/beacon/test/central_beacon/src/cl_stub.c b/cesar/cp/beacon/test/central_beacon/src/cl_stub.c
new file mode 100644
index 0000000000..8a6ec73d79
--- /dev/null
+++ b/cesar/cp/beacon/test/central_beacon/src/cl_stub.c
@@ -0,0 +1,63 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/cl_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "common/defs/ethernet.h"
+#include "lib/read_word.h"
+
+#include "cl/cl.h"
+#include "mac/sar/sar.h"
+#include "mac/pbproc/pbproc.h"
+
+#include "cl/inc/context.h"
+#include "cl/inc/cl.h"
+#include "cl/inc/trace.h"
+#include "cl/inc/cl_mactotei.h"
+
+#include "mac/common/ntb.h"
+
+static cl_t cl_global;
+
+cl_t *
+cl_init (mac_store_t *mac_store, sar_t *sar, mac_config_t *mac_config)
+{
+ return &cl_global;
+}
+
+void
+cl_mme_recv_done (cl_t *ctx, cl_mme_recv_t* mme_recv)
+{
+}
+
+
+void
+cl_mme_send_as_mme (cl_t *ctx, u8 *buffer, uint length, mfs_tx_t *mfs)
+{
+}
+
+void
+cl_mme_send_as_data (cl_t *ctx, u8 *buffer, uint length)
+{
+}
+
+void cl_mme_init_buffer_add_cb (cl_t *cl, cl_mme_buffer_add_cb_t cb,
+ void *user_data)
+{
+}
+
+void cl_mme_recv_init (cl_t *ctx, cl_mme_recv_cb_t mme_recv_cb, void
+*user_data)
+{
+}
diff --git a/cesar/cp/beacon/test/central_beacon/src/hle_stub.c b/cesar/cp/beacon/test/central_beacon/src/hle_stub.c
new file mode 100644
index 0000000000..76add71ff4
--- /dev/null
+++ b/cesar/cp/beacon/test/central_beacon/src/hle_stub.c
@@ -0,0 +1,44 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/hle_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+
+#include "hle/hle.h"
+
+/**
+ * Initialise the interface to add an Interface buffer.
+ *
+ * \param ctx the hle context.
+ * \param cb the function to call on interface buffer reception.
+ * \param user_data the user_data to provide on function call.
+ */
+void
+hle_init_interface_buffer_add_cb (hle_t *ctx, hle_interface_buffer_add_cb_t
+ cb, void *user_data)
+{
+}
+
+/**
+ * Send a packet to the ipmbox.
+ *
+ * \param ctx the hle context.
+ * \param msg the message address to post the message in the ipmbox.
+ * \param length the length of the message in words.
+ */
+void
+hle_ipmbox_send (hle_t *ctx, u32 *msg, uint length)
+{
+}
+
diff --git a/cesar/cp/beacon/test/central_beacon/src/ipmbox_stub.c b/cesar/cp/beacon/test/central_beacon/src/ipmbox_stub.c
new file mode 100644
index 0000000000..4c14998b0d
--- /dev/null
+++ b/cesar/cp/beacon/test/central_beacon/src/ipmbox_stub.c
@@ -0,0 +1,22 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/ipmbox_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "hal/hle/ipmbox.h"
+
+
+void ipmbox_tx (ipmbox_t *ctx, u32 *first_msg, uint length)
+{
+}
+
diff --git a/cesar/cp/beacon/test/central_beacon/src/pbproc_stub.c b/cesar/cp/beacon/test/central_beacon/src/pbproc_stub.c
new file mode 100644
index 0000000000..8eb707c47f
--- /dev/null
+++ b/cesar/cp/beacon/test/central_beacon/src/pbproc_stub.c
@@ -0,0 +1,46 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/src/pbproc_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "mac/pbproc/pbproc.h"
+
+
+/**
+ * Prepare a beacon for transmission.
+ * \param ctx pbproc context
+ * \param mfs corresponding special MFS
+ * \param pb beacon payload
+ * \param params extra parameters for beacon transmission
+ *
+ * There can only be one beacon prepared in advance (for a given MFS).
+ *
+ * This will cancel the preceding prepared beacon if it was not sent.
+ *
+ * PB reference is transfered to PB Processing. Extra parameters are copied.
+ */
+void
+pbproc_mfs_beacon_prepare (pbproc_t *ctx, mfs_tx_t *mfs, pb_beacon_t *pb,
+ const pbproc_tx_beacon_params_t *params)
+{
+ dbg_assert (pb);
+ blk_release_desc ((blk_t *) pb);
+}
+
+void
+pbproc_activate (pbproc_t *ctx, bool flag)
+{
+ dbg_assert (ctx);
+}
+
diff --git a/cesar/cp/beacon/test/central_beacon/src/phy_stub.c b/cesar/cp/beacon/test/central_beacon/src/phy_stub.c
new file mode 100644
index 0000000000..ce3d7736e7
--- /dev/null
+++ b/cesar/cp/beacon/test/central_beacon/src/phy_stub.c
@@ -0,0 +1,32 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/src/phy_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "hal/phy/phy.h"
+
+#include "cp/beacon/test/central_beacon/inc/phy_stub.h"
+
+u32
+phy_date (phy_t *ctx)
+{
+ phy_test_t *phy;
+ dbg_assert(ctx);
+
+ phy = (phy_test_t *) ctx;
+ phy->ntb += phy->date_ntb + 10;
+
+ return phy->ntb;
+}
+
diff --git a/cesar/cp/beacon/test/central_beacon/src/sar_stub.c b/cesar/cp/beacon/test/central_beacon/src/sar_stub.c
new file mode 100644
index 0000000000..5b7f1aa99d
--- /dev/null
+++ b/cesar/cp/beacon/test/central_beacon/src/sar_stub.c
@@ -0,0 +1,37 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/sar_stub.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "mac/sar/sar.h"
+#include "mac/sar/inc/sar_context.h"
+
+static sar_t sar_global;
+
+sar_t *
+sar_init (mac_store_t *mac_store, pbproc_t *pbproc, ca_t *ca)
+{
+ return &sar_global;
+}
+
+void
+sar_beacon_send (sar_t *ctx, pb_beacon_t *beacon, mfs_tx_t *beacon_mfs, void *bto_bpsto)
+{
+
+}
+
+
+void sar_init_beacon_cb (sar_t *sar, void *user_data, sar_beacon_cb_t uf)
+{
+}
diff --git a/cesar/cp/beacon/test/central_beacon/src/usta.c b/cesar/cp/beacon/test/central_beacon/src/usta.c
new file mode 100644
index 0000000000..35501755c9
--- /dev/null
+++ b/cesar/cp/beacon/test/central_beacon/src/usta.c
@@ -0,0 +1,184 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/src/usta.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include <stdio.h>
+
+#include "lib/test.h"
+
+#include "cp/beacon/beacons.h"
+#include "cp/secu/secu.h"
+#include "cp/station/station.h"
+#include "cp/cco/cco.h"
+
+#include "cl/cl.h"
+
+#include "hal/phy/phy.h"
+#include "mac/ca/ca.h"
+#include "mac/pbproc/pbproc.h"
+#include "mac/common/store.h"
+#include "mac/common/config.h"
+#include "mac/common/ntb.h"
+
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/test/central_beacon/inc/phy_stub.h"
+
+#include "hal/timer/timer.h"
+
+static ca_schedule_t sched;
+test_t test;
+
+void
+cp_beacon_expired (void *user_data)
+{
+
+}
+
+
+int
+main (void)
+{
+ cp_beacon_t *cp_beacon;
+ phy_t *phy;
+ cp_sta_t *sta;
+ cp_secu_t *secu;
+ ca_t *ca;
+ pbproc_t *pbproc;
+ mac_store_t *mac_store;
+ mac_config_t *mac_config;
+ cl_t *cl;
+ cp_cco_t *cco;
+ hal_timer_t *timer;
+
+ test_init (test, 0, NULL);
+ phy = blk_alloc ();
+ mac_config = blk_alloc ();
+ cl = blk_alloc ();
+ pbproc = blk_alloc ();
+ ca = blk_alloc ();
+
+ mac_store = mac_store_init ();
+
+ cco = cp_cco_init ();
+ sta = cp_station_init (mac_store, cl, pbproc, mac_config);
+// secu = cp_secu_init ();
+
+ mac_ntb_init (phy, mac_config);
+ timer = hal_timer_init (phy);
+ cp_beacon = cp_beacon_init((interface_t *) phy, phy, sta, secu, ca, pbproc, mac_store, cco,
+ timer, NULL, cp_beacon_expired );
+
+ // Verify the schedule.
+ cp_beacon_create_default_schedule (cp_beacon);
+
+ cp_cco_uninit(cco);
+ mac_store_uninit (mac_store);
+ cp_beacon_uninit (cp_beacon);
+ hal_timer_uninit (timer);
+// cp_secu_uninit (secu);
+ cp_station_uninit (sta);
+ blk_release (phy);
+ blk_release (mac_config);
+ blk_release (cl);
+ blk_release (pbproc);
+ blk_release (ca);
+
+ test_begin(test, "memory test")
+ {
+ test_fail_if(blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ HAL_PLATFORM_EXIT (test_nb_failed (test) == 0 ? 0 : 1);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}
+
+ca_schedule_t *
+ca_alloc_get_schedule (ca_t *ctx, uint index)
+{
+ return &sched;
+}
+
+void
+ca_alloc_update_beacon_periods (ca_t *ctx,
+ ca_beacon_period_t *beacon_periods,
+ uint beacon_periods_nb)
+{
+ dbg_assert (ctx);
+ dbg_assert (beacon_periods);
+ dbg_assert (beacon_periods_nb);
+
+ test_case_begin (test, "schedule");
+ test_begin (test, "beacon periods schedule")
+ {
+ test_fail_if (beacon_periods[0].start_date != 10, "Wrong schedule.");
+ test_fail_if (beacon_periods[1].start_date != 0xFFFFFF + 10, "Wrong schedule.");
+ test_fail_if (beacon_periods[2].start_date != 2 *0xFFFFFF + 10, "Wrong schedule.");
+ }
+ test_end;
+}
+
+
+bool
+ca_mfs_remove (ca_t *ctx, mfs_tx_t *mfs)
+{
+ return true;
+}
+
+void
+ca_mfs_add (ca_t *ctx, mfs_tx_t *mfs)
+{
+ dbg_assert (ctx);
+ dbg_assert (mfs);
+}
+
+
+void
+ca_mfs_update (ca_t *ctx, mfs_tx_t *mfs)
+{
+}
+
+void
+ca_mfs_hold (ca_t *ctx, mfs_tx_t *mfs)
+{
+}
+
+/**
+ * Get date of last zero-cross.
+ * \param ctx phy context
+ * \return last zero-cross date
+ * set errno to:
+ * - EINVAL if ctx is null
+ */
+u32
+phy_clock_get_zero_cross_captured_date (phy_t *ctx)
+{
+ phy_test_t *phy;
+ dbg_assert(ctx);
+
+ phy = (phy_test_t *) ctx;
+
+ if(phy->freq_test == 50)
+ {
+ phy->ntb += 250000;
+ }
+ else if (phy->freq_test == 60)
+ {
+ phy->ntb += 208333;
+ }
+
+ return phy->ntb;
+}
+
diff --git a/cesar/cp/beacon/test/overide/cp/cco/Module b/cesar/cp/beacon/test/overide/cp/cco/Module
new file mode 100644
index 0000000000..89eab437be
--- /dev/null
+++ b/cesar/cp/beacon/test/overide/cp/cco/Module
@@ -0,0 +1 @@
+SOURCES:=cco.c
diff --git a/cesar/cp/beacon/test/overide/cp/cco/cco.h b/cesar/cp/beacon/test/overide/cp/cco/cco.h
new file mode 100644
index 0000000000..0dcda62b01
--- /dev/null
+++ b/cesar/cp/beacon/test/overide/cp/cco/cco.h
@@ -0,0 +1,123 @@
+#ifndef cp_beacon_test_central_beacon_overide_cp_cco_cco_h
+#define cp_beacon_test_central_beacon_overide_cp_cco_cco_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/cco/cco.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+/** Foward declaration */
+typedef struct cp_cco_t cp_cco_t;
+
+cp_cco_t *
+cp_cco_init (void);
+
+void
+cp_cco_uninit (cp_cco_t *ctx);
+
+uint
+cp_cco_get_dt_av(cp_cco_t *ctx);
+
+void
+cp_coo_set_dt_av (cp_cco_t *ctx, uint dt_av);
+
+bool
+cp_cco_get_access(cp_cco_t *ctx);
+
+void
+cp_cco_set_access(cp_cco_t *ctx, bool access);
+
+bool
+cp_cco_get_ncnr (cp_cco_t *ctx);
+
+void
+cp_cco_set_ncnr (cp_cco_t *ctx, bool ncnr);
+
+bool
+cp_cco_get_npsm (cp_cco_t *ctx);
+
+void
+cp_cco_set_npsm (cp_cco_t *ctx, bool npsm);
+
+u8
+cp_cco_get_numslots (cp_cco_t *ctx);
+
+void
+cp_cco_set_numslots (cp_cco_t *ctx, u8 num_slots);
+
+u8
+cp_cco_get_slotusage (cp_cco_t *ctx);
+
+void
+cp_cco_set_slotusage (cp_cco_t *ctx, u8 slotusage);
+
+u8
+cp_cco_get_slot_id (cp_cco_t *ctx);
+
+void
+cp_cco_set_slot_id (cp_cco_t *ctx, u8 slot_id);
+
+u8
+cp_cco_get_aclss (cp_cco_t *ctx);
+
+void
+cp_cco_set_aclss (cp_cco_t *ctx, u8 aclss);
+
+u8
+cp_cco_get_nm (cp_cco_t *ctx);
+
+void
+cp_cco_set_nm (cp_cco_t *ctx, u8 nm);
+
+u8
+cp_cco_get_cco_cap (cp_cco_t *ctx);
+
+void
+cp_cco_set_cco_cap (cp_cco_t *ctx, u8 cco_cap);
+
+bool
+cp_cco_get_proxy_cap (cp_cco_t *ctx);
+
+void
+cp_cco_set_proxy_cap (cp_cco_t *ctx, bool proxy_cap);
+
+bool
+cp_cco_get_backup_cap (cp_cco_t *ctx);
+
+void
+cp_cco_set_backup_cap (cp_cco_t *ctx, bool backup_cap);
+
+bool
+cp_cco_get_cco_status (cp_cco_t *ctx);
+
+void
+cp_cco_set_cco_status (cp_cco_t *ctx, bool cco_status);
+
+bool
+cp_cco_get_pco_status(cp_cco_t *ctx);
+
+void
+cp_cco_set_pco_status(cp_cco_t *ctx, bool pco_status);
+
+bool
+cp_cco_get_backup_cco_status(cp_cco_t *ctx);
+
+void
+cp_cco_set_backup_cco_status(cp_cco_t *ctx, bool backup_cco_status);
+
+bool
+cp_cco_get_user_appointed_cco_status(cp_cco_t *ctx);
+
+void
+cp_cco_set_user_appointed_cco_status(cp_cco_t *ctx, bool ua_cco_status);
+
+#endif /* cp_beacon_test_central_beacon_overide_cp_cco_cco_h */
diff --git a/cesar/cp/beacon/test/overide/cp/cco/inc/context.h b/cesar/cp/beacon/test/overide/cp/cco/inc/context.h
new file mode 100644
index 0000000000..a503f02382
--- /dev/null
+++ b/cesar/cp/beacon/test/overide/cp/cco/inc/context.h
@@ -0,0 +1,46 @@
+#ifndef cp_beacon_test_central_beacon_overide_cp_cco_inc_context_h
+#define cp_beacon_test_central_beacon_overide_cp_cco_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/cco/inc/context.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+struct cp_cco_t
+{
+ BITFIELDS_WORD
+ (
+ uint dt_av:3;,
+ uint access:1;,
+ uint ncnr:1;,
+ uint npsm:1;,
+ uint num_slots:3;,
+ uint slot_usage:8;,
+ uint slotid:3;,
+ uint aclss:3;,
+ uint nm:2;,
+ uint cco_cap:2;,
+ uint proxy_cap:1;,
+ uint backup_cap:1;,
+ uint cco_status:1;,
+ uint pco_status:1;,
+ uint backup_cco:1;
+ );
+ BITFIELDS_WORD
+ (
+ uint nr:6;,
+ uint user_appointed_cco_status:1;,
+ uint rsvd:25;
+ );
+};
+
+#endif /* cp_beacon_test_central_beacon_overide_cp_cco_inc_context_h */
diff --git a/cesar/cp/beacon/test/overide/cp/cco/src/cco.c b/cesar/cp/beacon/test/overide/cp/cco/src/cco.c
new file mode 100644
index 0000000000..c793828138
--- /dev/null
+++ b/cesar/cp/beacon/test/overide/cp/cco/src/cco.c
@@ -0,0 +1,281 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/cco/src/cco.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "cp/cco/cco.h"
+#include "cp/cco/inc/context.h"
+
+static cp_cco_t cco;
+
+cp_cco_t *
+cp_cco_init (void)
+{
+ cco.dt_av = 0x0;
+ cco.access = 0x0;
+ cco.ncnr = 0x0;
+ cco.npsm = 0x0;
+ cco.num_slots = 0x1;
+ cco.slot_usage = 0x1;
+ cco.slotid = 0x0;
+ cco.aclss = 0x1;
+ cco.nm = 0x2;
+ cco.cco_cap = 0x0;
+ cco.proxy_cap = 0;
+ cco.backup_cap = 0;
+ cco.cco_status = 0;
+ cco.pco_status = 0;
+ cco.backup_cco = 0;
+ cco.nr = 0;
+ cco.user_appointed_cco_status = 0;
+ cco.rsvd = 0;
+
+ return &cco;
+}
+
+void
+cp_cco_uninit (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+}
+
+uint
+cp_cco_get_dt_av(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->dt_av;
+}
+
+void
+cp_coo_set_dt_av (cp_cco_t *ctx, uint dt_av)
+{
+ dbg_assert (ctx);
+ ctx->dt_av = dt_av;
+}
+
+bool
+cp_cco_get_access(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->access;
+}
+
+void
+cp_cco_set_access(cp_cco_t *ctx, bool access)
+{
+ dbg_assert (ctx);
+
+ ctx->access = access;
+}
+
+bool
+cp_cco_get_ncnr (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->ncnr;
+}
+
+void
+cp_cco_set_ncnr (cp_cco_t *ctx, bool ncnr)
+{
+ dbg_assert (ctx);
+ ctx->ncnr = ncnr;
+}
+
+bool
+cp_cco_get_npsm (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->npsm;
+}
+
+void
+cp_cco_set_npsm (cp_cco_t *ctx, bool npsm)
+{
+ dbg_assert (ctx);
+ ctx->npsm = npsm;
+}
+
+u8
+cp_cco_get_numslots (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->num_slots;
+}
+
+void
+cp_cco_set_numslots (cp_cco_t *ctx, u8 num_slots)
+{
+ dbg_assert (ctx);
+ ctx->num_slots = num_slots;
+}
+
+u8
+cp_cco_get_slotusage (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->slot_usage;
+}
+
+void
+cp_cco_set_slotusage (cp_cco_t *ctx, u8 slotusage)
+{
+ dbg_assert (ctx);
+ ctx->slot_usage = slotusage;
+}
+
+u8
+cp_cco_get_slot_id (cp_cco_t *cco)
+{
+ dbg_assert (cco);
+ return cco->slotid;
+}
+
+void
+cp_cco_set_slot_id (cp_cco_t *ctx, u8 slot_id)
+{
+ dbg_assert (ctx);
+ ctx->slotid = slot_id;
+}
+
+u8
+cp_cco_get_aclss (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->aclss;
+}
+
+void
+cp_cco_set_aclss (cp_cco_t *ctx, u8 aclss)
+{
+ dbg_assert (ctx);
+ ctx->aclss = aclss;
+}
+
+u8
+cp_cco_get_nm (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->nm;
+}
+
+void
+cp_cco_set_nm (cp_cco_t *ctx, u8 nm)
+{
+ dbg_assert (ctx);
+ ctx->nm = nm;
+}
+
+u8
+cp_cco_get_cco_cap (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->cco_cap;
+}
+
+void
+cp_cco_set_cco_cap (cp_cco_t *ctx, u8 cco_cap)
+{
+ dbg_assert (ctx);
+ ctx->cco_cap = cco_cap;
+}
+
+bool
+cp_cco_get_proxy_cap (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->proxy_cap;
+}
+
+void
+cp_cco_set_proxy_cap (cp_cco_t *ctx, bool proxy_cap)
+{
+ dbg_assert (ctx);
+ ctx->proxy_cap = proxy_cap;
+}
+
+bool
+cp_cco_get_backup_cap (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->backup_cap;
+}
+
+void
+cp_cco_set_backup_cap (cp_cco_t *ctx, bool backup_cap)
+{
+ dbg_assert (ctx);
+ ctx->backup_cap = backup_cap;
+}
+
+bool
+cp_cco_get_cco_status (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->cco_status;
+}
+
+void
+cp_cco_set_cco_status (cp_cco_t *ctx, bool cco_status)
+{
+ dbg_assert (ctx);
+ ctx->cco_status = cco_status;
+}
+
+bool
+cp_cco_get_pco_status(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->pco_status;
+}
+
+void
+cp_cco_set_pco_status(cp_cco_t *ctx, bool pco_status)
+{
+ dbg_assert(ctx);
+ ctx->pco_status = pco_status;
+}
+
+bool
+cp_cco_get_backup_cco_status(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->backup_cco;
+}
+
+void
+cp_cco_set_backup_cco_status(cp_cco_t *ctx, bool backup_cco_status)
+{
+ dbg_assert (ctx);
+ ctx->backup_cco = backup_cco_status;
+}
+
+bool
+cp_cco_get_user_appointed_cco_status(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->user_appointed_cco_status;
+}
+
+void
+cp_cco_set_user_appointed_cco_status(cp_cco_t *ctx, bool ua_cco_status)
+{
+ dbg_assert (ctx);
+ ctx->user_appointed_cco_status = ua_cco_status;
+}
+
diff --git a/cesar/cp/beacon/test/overide/cp/station/Module b/cesar/cp/beacon/test/overide/cp/station/Module
new file mode 100644
index 0000000000..360ddd8c71
--- /dev/null
+++ b/cesar/cp/beacon/test/overide/cp/station/Module
@@ -0,0 +1 @@
+SOURCES=station.c
diff --git a/cesar/cp/beacon/test/overide/cp/station/inc/context.h b/cesar/cp/beacon/test/overide/cp/station/inc/context.h
new file mode 100644
index 0000000000..98516ef28e
--- /dev/null
+++ b/cesar/cp/beacon/test/overide/cp/station/inc/context.h
@@ -0,0 +1,39 @@
+#ifndef overide_cp_station_inc_context_h
+#define overide_cp_station_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file overide/cp/station/inc/context.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#include "mac/common/config.h"
+#include "mac/common/store.h"
+#include "mac/pbproc/pbproc.h"
+#include "cl/cl.h"
+
+#include "cp/beacon/inc/bentry.h"
+
+struct cp_sta_t
+{
+ mac_config_t *mac_config;
+ mac_store_t *mac_store;
+ pbproc_t *pbproc;
+ cl_t *cl;
+
+ u64 nid;
+ bool hoip;
+ u8 numDisSta;
+ u8 numDisNet;
+ bool authentication;
+};
+
+#endif /* overide_cp_station_inc_context_h */
diff --git a/cesar/cp/beacon/test/overide/cp/station/src/station.c b/cesar/cp/beacon/test/overide/cp/station/src/station.c
new file mode 100644
index 0000000000..a7e6e36a4f
--- /dev/null
+++ b/cesar/cp/beacon/test/overide/cp/station/src/station.c
@@ -0,0 +1,244 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file overide/cp/station/src/station.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include <string.h>
+
+#include "cp/station/station.h"
+
+#include "mac/common/store.h"
+#include "mac/common/config.h"
+#include "mac/pbproc/pbproc.h"
+#include "cl/cl.h"
+
+#include "cp/station/inc/context.h"
+
+static cp_sta_t sta_global;
+
+/**
+ * Station init.
+ *
+ * \param mac_store_ctx mac_store context
+ * \param interf_cl_ctx cl context
+ * \param pbproc_ctx pbproc context.
+ * \param mac_config the mac_config context.
+ * \return sta context.
+ */
+cp_sta_t *
+cp_station_init (mac_store_t *mac_store_ctx, cl_t *interf_cl_ctx,
+ pbproc_t *pbproc_ctx, mac_config_t *mac_config)
+{
+ dbg_assert (pbproc_ctx);
+ dbg_assert (mac_config);
+ dbg_assert (interf_cl_ctx);
+ dbg_assert (mac_store_ctx);
+
+ sta_global.pbproc = pbproc_ctx;
+ sta_global.mac_store = mac_store_ctx;
+ sta_global.mac_config = mac_config;
+ sta_global.cl = interf_cl_ctx;
+
+ return &sta_global;
+}
+
+/**
+ * Station init.
+ *
+ * \param ctx sta context.
+ */
+void
+cp_station_uninit (cp_sta_t *ctx)
+{
+ dbg_assert (ctx);
+}
+
+/**
+ *
+ * Station get NID
+ *
+ * \param ctx the station context.
+ * \return the nid of the AVLN
+ */
+u64
+cp_station_get_nid (cp_sta_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->nid;
+}
+
+/**
+ * Station set nid
+ *
+ * \param ctx the station context
+ * \param nid the nid
+ */
+void
+cp_station_set_nid (cp_sta_t *ctx, u64 nid)
+{
+ dbg_assert (ctx);
+ ctx->nid = nid;
+}
+
+/**
+ * Station get mac address return the mac address of the station
+ *
+ * \param sta the station context.
+ * \param mac_address_addr the buffer address to store the mac address.
+ */
+void
+cp_station_get_mac_address (cp_sta_t *sta, u8 *addr)
+{
+ dbg_assert (sta);
+ dbg_assert (addr);
+
+ memcpy (addr, &sta->mac_config->sta_mac_address, 6 * sizeof(u8));
+}
+
+/**
+ * Station get TEI
+ *
+ * \param ctx the station context.
+ */
+u8
+cp_station_get_tei (cp_sta_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->mac_config->tei;
+}
+
+/**
+ * Get the number of distant STAs
+ *
+ * \param sta the station context
+ * \retun the number of distante stations
+ */
+u8
+cp_station_get_num_dis_sta(cp_sta_t *sta)
+{
+ dbg_assert (sta);
+
+ return sta->numDisSta;
+}
+
+/**
+ * Get number of distant networks.
+ *
+ * \param sta the sta context.
+ * \return the number of distant networks.
+ */
+u8
+cp_station_get_num_dis_net(cp_sta_t *sta)
+{
+ dbg_assert (sta);
+
+ return sta->numDisNet;
+}
+
+/**
+ * Return the authentication status of the station
+ *
+ * \param sta the station context.
+ * \return the status.
+ */
+bool
+cp_station_is_authenticated(cp_sta_t *sta)
+{
+ dbg_assert (sta);
+
+ return sta->authentication;
+}
+
+
+/**
+ * Set the authenticated flag to one
+ *
+ * \param sta the station context
+ * \param auth boolean informing if the sta is authenticated or not
+ */
+void
+cp_station_set_authenticated (cp_sta_t *sta, bool auth)
+{
+ dbg_assert (sta);
+
+ sta->authentication = true;
+}
+
+/**
+ * Get the Handover in progress status.
+ *
+ * \param sta the station context
+ * \return the handover progress status.
+ */
+bool
+cp_station_get_hoip (cp_sta_t *sta)
+{
+ dbg_assert (sta);
+ return sta->hoip;
+}
+
+/**
+ * Set the Handover in progress status.
+ *
+ * \param sta context.
+ * \param hoip handover in progress.
+ */
+void
+cp_station_set_hoip(cp_sta_t *sta, uint hoip)
+{
+ dbg_assert (sta);
+
+ sta->hoip = hoip;
+}
+
+/**
+ * Station set mac address return the mac address of the station
+ *
+ * \param sta the station context.
+ * \param mac the mac address.
+ */
+void
+cp_station_set_mac_address (cp_sta_t *sta, mac_t mac)
+{
+ dbg_assert (sta);
+ sta->mac_config->sta_mac_address = mac;
+}
+
+/**
+ * get the rstbf flag
+ *
+ * \param sta the sta context.
+ */
+bool
+cp_station_get_rtsbf(cp_sta_t *sta)
+{
+ dbg_assert (sta);
+
+ return sta->mac_config->rts_broadcast;
+}
+
+/**
+ * Set the sta rtsbf
+ *
+ * \param sta the station context
+ * \param rstbf the flag
+ */
+void
+cp_station_set_rtsbf (cp_sta_t *sta, bool rtsbf)
+{
+ dbg_assert (sta);
+ sta->mac_config->rts_broadcast = rtsbf;
+}
+
diff --git a/cesar/cp/beacon/test/overide/cp/station/station.h b/cesar/cp/beacon/test/overide/cp/station/station.h
new file mode 100644
index 0000000000..4cb0764213
--- /dev/null
+++ b/cesar/cp/beacon/test/overide/cp/station/station.h
@@ -0,0 +1,165 @@
+#ifndef overide_cp_station_station_h
+#define overide_cp_station_station_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file overide/cp/station/station.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#include "hal/phy/phy.h"
+#include "cp/station/station.h"
+
+#include "mac/common/store.h"
+#include "mac/common/config.h"
+#include "mac/pbproc/pbproc.h"
+#include "cl/cl.h"
+
+
+/** forward declaration. */
+typedef struct cp_sta_t cp_sta_t;
+
+/**
+ * Station init.
+ *
+ * \param mac_store_ctx mac_store context
+ * \param interf_cl_ctx cl context
+ * \param pbproc_ctx pbproc context.
+ * \param mac_config the mac_config context.
+ * \return sta context.
+ */
+cp_sta_t *
+cp_station_init (mac_store_t *mac_store_ctx, cl_t *interf_cl_ctx, pbproc_t *pbproc_ctx, mac_config_t *mac_config);
+
+/**
+ * Station init.
+ *
+ * \param ctx sta context.
+ */
+void
+cp_station_uninit (cp_sta_t *ctx);
+
+/**
+ * Station get NID
+ *
+ * \param ctx the station context.
+ * \return the nid of the AVLN
+ */
+u64
+cp_station_get_nid (cp_sta_t *ctx);
+
+/**
+ * Station set nid
+ *
+ * \param ctx the station context
+ * \param nid the nid
+ */
+void
+cp_station_set_nid (cp_sta_t *ctx, u64 nid);
+
+/**
+ * Station get TEI
+ *
+ * \param ctx the station context.
+ */
+u8
+cp_station_get_tei (cp_sta_t *ctx);
+
+/**
+ * Station get mac address return the mac address of the station
+ *
+ * \param sta the station context.
+ * \param mac_address_addr the buffer address to store the mac address.
+ */
+void
+cp_station_get_mac_address (cp_sta_t *sta, u8 *addr);
+
+/**
+ * Get the number of distant STAs
+ *
+ * \param sta the station context
+ * \retun the number of distante stations
+ */
+u8
+cp_station_get_num_dis_sta(cp_sta_t *sta);
+
+/**
+ * Get number of distant networks.
+ *
+ * \param sta the sta context.
+ * \return the number of distant networks.
+ */
+u8
+cp_station_get_num_dis_net(cp_sta_t *sta);
+
+/**
+ * Return the authentication status of the station
+ *
+ * \param sta the station context.
+ * \return the status.
+ */
+bool
+cp_station_is_authenticated(cp_sta_t *sta);
+
+/**
+ * get the rstbf flag
+ *
+ * \param sta the sta context.
+ */
+bool
+cp_station_get_rtsbf(cp_sta_t *sta);
+
+/**
+ * Set the sta rtsbf
+ *
+ * \param sta the station context
+ * \param rstbf the flag
+ */
+void
+cp_station_set_rtsbf (cp_sta_t *sta, bool rtsbf);
+
+/**
+ * Set the CCo tei.
+ *
+ * \param sta the sta context.
+ * \param stei the cco tei.
+ */
+void
+cp_station_set_cco_tei(cp_sta_t *sta, uint stei);
+
+/**
+ * Get the Handover in progress status.
+ *
+ * \param sta the station context
+ * \return the handover progress status.
+ */
+bool
+cp_station_get_hoip (cp_sta_t *sta);
+
+/**
+ * Set the Handover in progress status.
+ *
+ * \param sta context.
+ * \param hoip handover in progress.
+ */
+void
+cp_station_set_hoip(cp_sta_t *sta, uint hoip);
+
+/**
+ * Station set mac address return the mac address of the station
+ *
+ * \param sta the station context.
+ * \param mac the mac address.
+ */
+void
+cp_station_set_mac_address (cp_sta_t *sta, mac_t addr);
+
+#endif /* overide_cp_station_station_h */
diff --git a/cesar/cp/beacon/test/sync/Config b/cesar/cp/beacon/test/sync/Config
new file mode 100644
index 0000000000..9c23c2ca94
--- /dev/null
+++ b/cesar/cp/beacon/test/sync/Config
@@ -0,0 +1 @@
+#CONFIG_DEBUG=y
diff --git a/cesar/cp/beacon/test/sync/Makefile b/cesar/cp/beacon/test/sync/Makefile
new file mode 100644
index 0000000000..49b4942361
--- /dev/null
+++ b/cesar/cp/beacon/test/sync/Makefile
@@ -0,0 +1,14 @@
+BASE = ../../../..
+
+INCLUDES=cp/beacon/test/sync
+#EXTRA_HOST_CFLAGS=-std=c99
+EXTRA_HOST_LDFLAGS=-lm
+HOST_PROGRAMS = test_sync
+test_sync_SOURCES = test_sync.c
+test_sync_MODULES = cp/beacon/test/sync/hal/phy lib cp/beacon
+
+
+cp_beacon_MODULE_SOURCES = ntb_clock_sync.c
+
+include $(BASE)/common/make/top.mk
+
diff --git a/cesar/cp/beacon/test/sync/hal/phy/Module b/cesar/cp/beacon/test/sync/hal/phy/Module
new file mode 100644
index 0000000000..d7a6adc888
--- /dev/null
+++ b/cesar/cp/beacon/test/sync/hal/phy/Module
@@ -0,0 +1 @@
+SOURCES = phy.c
diff --git a/cesar/cp/beacon/test/sync/hal/phy/phy.h b/cesar/cp/beacon/test/sync/hal/phy/phy.h
new file mode 100644
index 0000000000..2e803b376d
--- /dev/null
+++ b/cesar/cp/beacon/test/sync/hal/phy/phy.h
@@ -0,0 +1,37 @@
+#ifndef phy_h
+#define phy_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file phy.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+struct phy_t
+{
+ uint numerator;
+ double rho_ppm;
+};
+typedef struct phy_t phy_t;
+
+
+phy_t *
+phy_init(void);
+
+void
+phy_clock_set_numerator (phy_t *ctx, uint numerator);
+
+void
+phy_set_freqerror (phy_t *ctx, double rho);
+
+
+
+#endif /* phy_h */
diff --git a/cesar/cp/beacon/test/sync/hal/phy/src/phy.c b/cesar/cp/beacon/test/sync/hal/phy/src/phy.c
new file mode 100644
index 0000000000..075da93103
--- /dev/null
+++ b/cesar/cp/beacon/test/sync/hal/phy/src/phy.c
@@ -0,0 +1,42 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file hal/phy/src/phy.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "hal/phy/phy.h"
+
+phy_t phy_global;
+
+phy_t *
+phy_init (void)
+{
+ phy_t *ctx = &phy_global;
+ phy_clock_set_numerator(ctx, 1000000);
+ phy_set_freqerror (ctx, 0);
+ return ctx;
+}
+
+
+void
+phy_clock_set_numerator (phy_t *ctx, uint numerator)
+{
+ ctx->numerator = numerator;
+}
+
+void
+phy_set_freqerror (phy_t *ctx, double rho_ppm)
+{
+ ctx->rho_ppm = rho_ppm;
+}
+
+
diff --git a/cesar/cp/beacon/test/sync/spo_m50_snr_m02.txt b/cesar/cp/beacon/test/sync/spo_m50_snr_m02.txt
new file mode 100644
index 0000000000..1db6ed2f65
--- /dev/null
+++ b/cesar/cp/beacon/test/sync/spo_m50_snr_m02.txt
@@ -0,0 +1,39439 @@
+0 7746 0 2582 0 2582
+3000000 3007867 1000000 1002622 1000000 1002622
+6000000 6008056 2000000 2002685 2000000 2002685
+9000000 9008210 3000000 3002736 3000000 3002736
+12000000 12008389 4000000 4002796 4000000 4002796
+15000000 15008535 5000000 5002845 5000000 5002845
+18000000 18008662 6000000 6002887 6000000 6002887
+21000000 21008836 7000000 7002945 7000000 7002945
+24000000 24008900 8000000 8002966 8000000 8002966
+27000000 27009107 9000000 9003035 9000000 9003035
+30000000 30009288 10000000 10003096 10000000 10003096
+33000000 33009437 11000000 11003145 11000000 11003145
+36000000 36009494 12000000 12003164 12000000 12003164
+39000000 39009690 13000000 13003230 13000000 13003230
+42000000 42009880 14000000 14003293 14000000 14003293
+45000000 45010025 15000000 15003341 15000000 15003341
+48000000 48010197 16000000 16003399 16000000 16003399
+51000000 51010330 17000000 17003443 17000000 17003443
+54000000 54010401 18000000 18003467 18000000 18003467
+57000000 57010627 19000000 19003542 19000000 19003542
+60000000 60010787 20000000 20003595 20000000 20003595
+63000000 63010919 21000000 21003639 21000000 21003639
+66000000 66011027 22000000 22003675 22000000 22003675
+69000000 69011238 23000000 23003746 23000000 23003746
+72000000 72011404 24000000 24003801 24000000 24003801
+75000000 75011515 25000000 25003838 25000000 25003838
+78000000 78011675 26000000 26003891 26000000 26003891
+81000000 81011787 27000000 27003929 27000000 27003929
+84000000 84011985 28000000 28003995 28000000 28003995
+87000000 87012075 29000000 29004025 29000000 29004025
+90000000 90012300 30000000 30004100 30000000 30004100
+93000000 93012432 31000000 31004144 31000000 31004144
+96000000 96012571 32000000 32004190 32000000 32004190
+99000000 99012622 33000000 33004207 33000000 33004207
+102000000 102012833 34000000 34004277 34000000 34004277
+105000000 105013042 35000000 35004347 35000000 35004347
+108000000 108013170 36000000 36004390 36000000 36004390
+111000000 111013313 37000000 37004437 37000000 37004437
+114000000 114013484 38000000 38004494 38000000 38004494
+117000000 117013581 39000000 39004527 39000000 39004527
+120000000 120013794 40000000 40004598 40000000 40004598
+123000000 123013924 41000000 41004641 41000000 41004641
+126000000 126014074 42000000 42004691 42000000 42004691
+129000000 129014234 43000000 43004744 43000000 43004744
+132000000 132014330 44000000 44004776 44000000 44004776
+135000000 135014518 45000000 45004839 45000000 45004839
+138000000 138014686 46000000 46004895 46000000 46004895
+141000000 141014822 47000000 47004940 47000000 47004940
+144000000 144014997 48000000 48004999 48000000 48004999
+147000000 147015119 49000000 49005039 49000000 49005039
+150000000 150015269 50000000 50005089 50000000 50005089
+153000000 153015417 51000000 51005139 51000000 51005139
+156000000 156015623 52000000 52005207 52000000 52005207
+159000000 159015737 53000000 53005245 53000000 53005245
+162000000 162015869 54000000 54005289 54000000 54005289
+165000000 165016043 55000000 55005347 55000000 55005347
+168000000 168016162 56000000 56005387 56000000 56005387
+171000000 171016286 57000000 57005428 57000000 57005428
+174000000 174016505 58000000 58005501 58000000 58005501
+177000000 177016641 59000000 59005547 59000000 59005547
+180000000 180016792 60000000 60005597 60000000 60005597
+183000000 183016952 61000000 61005650 61000000 61005650
+186000000 186017073 62000000 62005691 62000000 62005691
+189000000 189017154 63000000 63005718 63000000 63005718
+192000000 192017362 64000000 64005787 64000000 64005787
+195000000 195017517 65000000 65005839 65000000 65005839
+198000000 198017676 66000000 66005892 66000000 66005892
+201000000 201017828 67000000 67005942 67000000 67005942
+204000000 204017950 68000000 68005983 68000000 68005983
+207000000 207018128 69000000 69006042 69000000 69006042
+210000000 210018277 70000000 70006092 70000000 70006092
+213000000 213018405 71000000 71006135 71000000 71006135
+216000000 216018574 72000000 72006191 72000000 72006191
+219000000 219018694 73000000 73006231 73000000 73006231
+222000000 222018621 74000000 74006207 74000000 74006207
+225000000 225018944 75000000 75006314 75000000 75006314
+228000000 228019197 76000000 76006399 76000000 76006399
+231000000 231019307 77000000 77006435 77000000 77006435
+234000000 234019486 78000000 78006495 78000000 78006495
+237000000 237019534 79000000 79006511 79000000 79006511
+240000000 240019788 80000000 80006596 80000000 80006596
+243000000 243019907 81000000 81006635 81000000 81006635
+246000000 246020078 82000000 82006692 82000000 82006692
+249000000 249020225 83000000 83006741 83000000 83006741
+252000000 252020378 84000000 84006792 84000000 84006792
+255000000 255020524 85000000 85006841 85000000 85006841
+258000000 258020668 86000000 86006889 86000000 86006889
+261000000 261020831 87000000 87006943 87000000 87006943
+264000000 264020983 88000000 88006994 88000000 88006994
+267000000 267021137 89000000 89007045 89000000 89007045
+270000000 270021257 90000000 90007085 90000000 90007085
+273000000 273021466 91000000 91007155 91000000 91007155
+276000000 276021596 92000000 92007198 92000000 92007198
+279000000 279021710 93000000 93007236 93000000 93007236
+282000000 282021871 94000000 94007290 94000000 94007290
+285000000 285022006 95000000 95007335 95000000 95007335
+288000000 288022149 96000000 96007383 96000000 96007383
+291000000 291022249 97000000 97007416 97000000 97007416
+294000000 294022483 98000000 98007494 98000000 98007494
+297000000 297022556 99000000 99007518 99000000 99007518
+300000000 300022677 100000000 100007559 100000000 100007559
+303000000 303022866 101000000 101007622 101000000 101007622
+306000000 306023020 102000000 102007673 102000000 102007673
+309000000 309023199 103000000 103007733 103000000 103007733
+312000000 312023345 104000000 104007781 104000000 104007781
+315000000 315023472 105000000 105007824 105000000 105007824
+318000000 318023646 106000000 106007882 106000000 106007882
+321000000 321023710 107000000 107007903 107000000 107007903
+324000000 324023917 108000000 108007972 108000000 108007972
+327000000 327024098 109000000 109008032 109000000 109008032
+330000000 330024247 110000000 110008082 110000000 110008082
+333000000 333024304 111000000 111008101 111000000 111008101
+336000000 336024500 112000000 112008166 112000000 112008166
+339000000 339024690 113000000 113008230 113000000 113008230
+342000000 342024835 114000000 114008278 114000000 114008278
+345000000 345025007 115000000 115008335 115000000 115008335
+348000000 348025140 116000000 116008380 116000000 116008380
+351000000 351025211 117000000 117008403 117000000 117008403
+354000000 354025437 118000000 118008479 118000000 118008479
+357000000 357025597 119000000 119008532 119000000 119008532
+360000000 360025729 120000000 120008576 120000000 120008576
+363000000 363025837 121000000 121008612 121000000 121008612
+366000000 366026048 122000000 122008682 122000000 122008682
+369000000 369026214 123000000 123008738 123000000 123008738
+372000000 372026325 124000000 124008775 124000000 124008775
+375000000 375026485 125000000 125008828 125000000 125008828
+378000000 378026597 126000000 126008865 126000000 126008865
+381000000 381026795 127000000 127008931 127000000 127008931
+384000000 384026885 128000000 128008961 128000000 128008961
+387000000 387027110 129000000 129009036 129000000 129009036
+390000000 390027242 130000000 130009080 130000000 130009080
+393000000 393027381 131000000 131009127 131000000 131009127
+396000000 396027432 132000000 132009144 132000000 132009144
+399000000 399027643 133000000 133009214 133000000 133009214
+402000000 402027852 134000000 134009284 134000000 134009284
+405000000 405027980 135000000 135009326 135000000 135009326
+408000000 408028123 136000000 136009374 136000000 136009374
+411000000 411028294 137000000 137009431 137000000 137009431
+414000000 414028391 138000000 138009463 138000000 138009463
+417000000 417028604 139000000 139009534 139000000 139009534
+420000000 420028734 140000000 140009578 140000000 140009578
+423000000 423028884 141000000 141009628 141000000 141009628
+426000000 426029044 142000000 142009681 142000000 142009681
+429000000 429029140 143000000 143009713 143000000 143009713
+432000000 432029328 144000000 144009776 144000000 144009776
+435000000 435029496 145000000 145009832 145000000 145009832
+438000000 438029632 146000000 146009877 146000000 146009877
+441000000 441029807 147000000 147009935 147000000 147009935
+444000000 444029929 148000000 148009976 148000000 148009976
+447000000 447030079 149000000 149010026 149000000 149010026
+450000000 450030227 150000000 150010075 150000000 150010075
+453000000 453030433 151000000 151010144 151000000 151010144
+456000000 456030547 152000000 152010182 152000000 152010182
+459000000 459030679 153000000 153010226 153000000 153010226
+462000000 462030853 154000000 154010284 154000000 154010284
+465000000 465030972 155000000 155010324 155000000 155010324
+468000000 468031096 156000000 156010365 156000000 156010365
+471000000 471031315 157000000 157010438 157000000 157010438
+474000000 474031451 158000000 158010483 158000000 158010483
+477000000 477031602 159000000 159010534 159000000 159010534
+480000000 480031762 160000000 160010587 160000000 160010587
+483000000 483031883 161000000 161010627 161000000 161010627
+486000000 486031964 162000000 162010654 162000000 162010654
+489000000 489032172 163000000 163010724 163000000 163010724
+492000000 492032327 164000000 164010775 164000000 164010775
+495000000 495032486 165000000 165010828 165000000 165010828
+498000000 498032638 166000000 166010879 166000000 166010879
+501000000 501032760 167000000 167010920 167000000 167010920
+504000000 504032938 168000000 168010979 168000000 168010979
+507000000 507033087 169000000 169011029 169000000 169011029
+510000000 510033215 170000000 170011071 170000000 170011071
+513000000 513033384 171000000 171011128 171000000 171011128
+516000000 516033504 172000000 172011168 172000000 172011168
+519000000 519033431 173000000 173011143 173000000 173011143
+522000000 522033754 174000000 174011251 174000000 174011251
+525000000 525034007 175000000 175011335 175000000 175011335
+528000000 528034117 176000000 176011372 176000000 176011372
+531000000 531034296 177000000 177011432 177000000 177011432
+534000000 534034344 178000000 178011448 178000000 178011448
+537000000 537034598 179000000 179011532 179000000 179011532
+540000000 540034717 180000000 180011572 180000000 180011572
+543000000 543034888 181000000 181011629 181000000 181011629
+546000000 546035035 182000000 182011678 182000000 182011678
+549000000 549035188 183000000 183011729 183000000 183011729
+552000000 552035334 184000000 184011778 184000000 184011778
+555000000 555035478 185000000 185011826 185000000 185011826
+558000000 558035641 186000000 186011880 186000000 186011880
+561000000 561035793 187000000 187011931 187000000 187011931
+564000000 564035947 188000000 188011982 188000000 188011982
+567000000 567036067 189000000 189012022 189000000 189012022
+570000000 570036276 190000000 190012092 190000000 190012092
+573000000 573036406 191000000 191012135 191000000 191012135
+576000000 576036520 192000000 192012173 192000000 192012173
+579000000 579036681 193000000 193012227 193000000 193012227
+582000000 582036816 194000000 194012272 194000000 194012272
+585000000 585036959 195000000 195012319 195000000 195012319
+588000000 588037059 196000000 196012353 196000000 196012353
+591000000 591037293 197000000 197012431 197000000 197012431
+594000000 594037366 198000000 198012455 198000000 198012455
+597000000 597037487 199000000 199012495 199000000 199012495
+600000000 600037676 200000000 200012558 200000000 200012558
+603000000 603037830 201000000 201012610 201000000 201012610
+606000000 606038009 202000000 202012669 202000000 202012669
+609000000 609038155 203000000 203012718 203000000 203012718
+612000000 612038282 204000000 204012760 204000000 204012760
+615000000 615038456 205000000 205012818 205000000 205012818
+618000000 618038520 206000000 206012840 206000000 206012840
+621000000 621038727 207000000 207012909 207000000 207012909
+624000000 624038908 208000000 208012969 208000000 208012969
+627000000 627039057 209000000 209013019 209000000 209013019
+630000000 630039114 210000000 210013038 210000000 210013038
+633000000 633039310 211000000 211013103 211000000 211013103
+636000000 636039500 212000000 212013166 212000000 212013166
+639000000 639039645 213000000 213013215 213000000 213013215
+642000000 642039817 214000000 214013272 214000000 214013272
+645000000 645039950 215000000 215013316 215000000 215013316
+648000000 648040021 216000000 216013340 216000000 216013340
+651000000 651040247 217000000 217013415 217000000 217013415
+654000000 654040407 218000000 218013469 218000000 218013469
+657000000 657040539 219000000 219013513 219000000 219013513
+660000000 660040647 220000000 220013549 220000000 220013549
+663000000 663040858 221000000 221013619 221000000 221013619
+666000000 666041024 222000000 222013674 222000000 222013674
+669000000 669041135 223000000 223013711 223000000 223013711
+672000000 672041295 224000000 224013765 224000000 224013765
+675000000 675041407 225000000 225013802 225000000 225013802
+678000000 678041605 226000000 226013868 226000000 226013868
+681000000 681041695 227000000 227013898 227000000 227013898
+684000000 684041920 228000000 228013973 228000000 228013973
+687000000 687042052 229000000 229014017 229000000 229014017
+690000000 690042191 230000000 230014063 230000000 230014063
+693000000 693042242 231000000 231014080 231000000 231014080
+696000000 696042453 232000000 232014151 232000000 232014151
+699000000 699042662 233000000 233014220 233000000 233014220
+702000000 702042790 234000000 234014263 234000000 234014263
+705000000 705042933 235000000 235014311 235000000 235014311
+708000000 708043104 236000000 236014368 236000000 236014368
+711000000 711043201 237000000 237014400 237000000 237014400
+714000000 714043414 238000000 238014471 238000000 238014471
+717000000 717043544 239000000 239014514 239000000 239014514
+720000000 720043694 240000000 240014564 240000000 240014564
+723000000 723043854 241000000 241014618 241000000 241014618
+726000000 726043950 242000000 242014650 242000000 242014650
+729000000 729044138 243000000 243014712 243000000 243014712
+732000000 732044306 244000000 244014768 244000000 244014768
+735000000 735044442 245000000 245014814 245000000 245014814
+738000000 738044617 246000000 246014872 246000000 246014872
+741000000 741044739 247000000 247014913 247000000 247014913
+744000000 744044889 248000000 248014963 248000000 248014963
+747000000 747045037 249000000 249015012 249000000 249015012
+750000000 750045243 250000000 250015081 250000000 250015081
+753000000 753045357 251000000 251015119 251000000 251015119
+756000000 756045489 252000000 252015163 252000000 252015163
+759000000 759045663 253000000 253015221 253000000 253015221
+762000000 762045782 254000000 254015260 254000000 254015260
+765000000 765045906 255000000 255015302 255000000 255015302
+768000000 768046125 256000000 256015375 256000000 256015375
+771000000 771046261 257000000 257015420 257000000 257015420
+774000000 774046412 258000000 258015470 258000000 258015470
+777000000 777046572 259000000 259015524 259000000 259015524
+780000000 780046693 260000000 260015564 260000000 260015564
+783000000 783046774 261000000 261015591 261000000 261015591
+786000000 786046982 262000000 262015660 262000000 262015660
+789000000 789047137 263000000 263015712 263000000 263015712
+792000000 792047296 264000000 264015765 264000000 264015765
+795000000 795047448 265000000 265015816 265000000 265015816
+798000000 798047570 266000000 266015856 266000000 266015856
+801000000 801047748 267000000 267015916 267000000 267015916
+804000000 804047897 268000000 268015965 268000000 268015965
+807000000 807048025 269000000 269016008 269000000 269016008
+810000000 810048194 270000000 270016064 270000000 270016064
+813000000 813048314 271000000 271016104 271000000 271016104
+816000000 816048241 272000000 272016080 272000000 272016080
+819000000 819048564 273000000 273016188 273000000 273016188
+822000000 822048817 274000000 274016272 274000000 274016272
+825000000 825048927 275000000 275016309 275000000 275016309
+828000000 828049106 276000000 276016368 276000000 276016368
+831000000 831049154 277000000 277016384 277000000 277016384
+834000000 834049408 278000000 278016469 278000000 278016469
+837000000 837049527 279000000 279016509 279000000 279016509
+840000000 840049698 280000000 280016566 280000000 280016566
+843000000 843049845 281000000 281016615 281000000 281016615
+846000000 846049998 282000000 282016666 282000000 282016666
+849000000 849050144 283000000 283016714 283000000 283016714
+852000000 852050288 284000000 284016762 284000000 284016762
+855000000 855050451 285000000 285016817 285000000 285016817
+858000000 858050603 286000000 286016867 286000000 286016867
+861000000 861050757 287000000 287016919 287000000 287016919
+864000000 864050877 288000000 288016959 288000000 288016959
+867000000 867051086 289000000 289017028 289000000 289017028
+870000000 870051216 290000000 290017072 290000000 290017072
+873000000 873051330 291000000 291017110 291000000 291017110
+876000000 876051491 292000000 292017163 292000000 292017163
+879000000 879051626 293000000 293017208 293000000 293017208
+882000000 882051769 294000000 294017256 294000000 294017256
+885000000 885051869 295000000 295017289 295000000 295017289
+888000000 888052103 296000000 296017367 296000000 296017367
+891000000 891052176 297000000 297017392 297000000 297017392
+894000000 894052297 298000000 298017432 298000000 298017432
+897000000 897052486 299000000 299017495 299000000 299017495
+900000000 900052640 300000000 300017546 300000000 300017546
+903000000 903052819 301000000 301017606 301000000 301017606
+906000000 906052965 302000000 302017655 302000000 302017655
+909000000 909053092 303000000 303017697 303000000 303017697
+912000000 912053266 304000000 304017755 304000000 304017755
+915000000 915053330 305000000 305017776 305000000 305017776
+918000000 918053537 306000000 306017845 306000000 306017845
+921000000 921053718 307000000 307017906 307000000 307017906
+924000000 924053867 308000000 308017955 308000000 308017955
+927000000 927053924 309000000 309017974 309000000 309017974
+930000000 930054120 310000000 310018040 310000000 310018040
+933000000 933054310 311000000 311018103 311000000 311018103
+936000000 936054455 312000000 312018151 312000000 312018151
+939000000 939054627 313000000 313018209 313000000 313018209
+942000000 942054760 314000000 314018253 314000000 314018253
+945000000 945054831 315000000 315018277 315000000 315018277
+948000000 948055057 316000000 316018352 316000000 316018352
+951000000 951055217 317000000 317018405 317000000 317018405
+954000000 954055349 318000000 318018449 318000000 318018449
+957000000 957055457 319000000 319018485 319000000 319018485
+960000000 960055668 320000000 320018556 320000000 320018556
+963000000 963055834 321000000 321018611 321000000 321018611
+966000000 966055945 322000000 322018648 322000000 322018648
+969000000 969056105 323000000 323018701 323000000 323018701
+972000000 972056217 324000000 324018739 324000000 324018739
+975000000 975056415 325000000 325018805 325000000 325018805
+978000000 978056505 326000000 326018835 326000000 326018835
+981000000 981056730 327000000 327018910 327000000 327018910
+984000000 984056862 328000000 328018954 328000000 328018954
+987000000 987057001 329000000 329019000 329000000 329019000
+990000000 990057052 330000000 330019017 330000000 330019017
+993000000 993057263 331000000 331019087 331000000 331019087
+996000000 996057472 332000000 332019157 332000000 332019157
+999000000 999057600 333000000 333019200 333000000 333019200
+1002000000 1002057743 334000000 334019247 334000000 334019247
+1005000000 1005057914 335000000 335019304 335000000 335019304
+1008000000 1008058011 336000000 336019337 336000000 336019337
+1011000000 1011058224 337000000 337019408 337000000 337019408
+1014000000 1014058354 338000000 338019451 338000000 338019451
+1017000000 1017058504 339000000 339019501 339000000 339019501
+1020000000 1020058664 340000000 340019554 340000000 340019554
+1023000000 1023058760 341000000 341019586 341000000 341019586
+1026000000 1026058948 342000000 342019649 342000000 342019649
+1029000000 1029059116 343000000 343019705 343000000 343019705
+1032000000 1032059252 344000000 344019750 344000000 344019750
+1035000000 1035059427 345000000 345019809 345000000 345019809
+1038000000 1038059549 346000000 346019849 346000000 346019849
+1041000000 1041059699 347000000 347019899 347000000 347019899
+1044000000 1044059847 348000000 348019949 348000000 348019949
+1047000000 1047060053 349000000 349020017 349000000 349020017
+1050000000 1050060167 350000000 350020055 350000000 350020055
+1053000000 1053060299 351000000 351020099 351000000 351020099
+1056000000 1056060473 352000000 352020157 352000000 352020157
+1059000000 1059060592 353000000 353020197 353000000 353020197
+1062000000 1062060716 354000000 354020238 354000000 354020238
+1065000000 1065060935 355000000 355020311 355000000 355020311
+1068000000 1068061071 356000000 356020357 356000000 356020357
+1071000000 1071061222 357000000 357020407 357000000 357020407
+1074000000 1074061382 358000000 358020460 358000000 358020460
+1077000000 1077061503 359000000 359020501 359000000 359020501
+1080000000 1080061584 360000000 360020528 360000000 360020528
+1083000000 1083061792 361000000 361020597 361000000 361020597
+1086000000 1086061947 362000000 362020649 362000000 362020649
+1089000000 1089062106 363000000 363020702 363000000 363020702
+1092000000 1092062258 364000000 364020752 364000000 364020752
+1095000000 1095062380 365000000 365020793 365000000 365020793
+1098000000 1098062558 366000000 366020852 366000000 366020852
+1101000000 1101062707 367000000 367020902 367000000 367020902
+1104000000 1104062835 368000000 368020945 368000000 368020945
+1107000000 1107063004 369000000 369021001 369000000 369021001
+1110000000 1110063124 370000000 370021041 370000000 370021041
+1113000000 1113063051 371000000 371021017 371000000 371021017
+1116000000 1116063374 372000000 372021124 372000000 372021124
+1119000000 1119063627 373000000 373021209 373000000 373021209
+1122000000 1122063737 374000000 374021245 374000000 374021245
+1125000000 1125063916 375000000 375021305 375000000 375021305
+1128000000 1128063964 376000000 376021321 376000000 376021321
+1131000000 1131064218 377000000 377021406 377000000 377021406
+1134000000 1134064337 378000000 378021445 378000000 378021445
+1137000000 1137064508 379000000 379021502 379000000 379021502
+1140000000 1140064655 380000000 380021551 380000000 380021551
+1143000000 1143064808 381000000 381021602 381000000 381021602
+1146000000 1146064954 382000000 382021651 382000000 382021651
+1149000000 1149065098 383000000 383021699 383000000 383021699
+1152000000 1152065261 384000000 384021753 384000000 384021753
+1155000000 1155065413 385000000 385021804 385000000 385021804
+1158000000 1158065567 386000000 386021855 386000000 386021855
+1161000000 1161065687 387000000 387021895 387000000 387021895
+1164000000 1164065896 388000000 388021965 388000000 388021965
+1167000000 1167066026 389000000 389022008 389000000 389022008
+1170000000 1170066140 390000000 390022046 390000000 390022046
+1173000000 1173066301 391000000 391022100 391000000 391022100
+1176000000 1176066436 392000000 392022145 392000000 392022145
+1179000000 1179066579 393000000 393022193 393000000 393022193
+1182000000 1182066679 394000000 394022226 394000000 394022226
+1185000000 1185066913 395000000 395022304 395000000 395022304
+1188000000 1188066986 396000000 396022328 396000000 396022328
+1191000000 1191067107 397000000 397022369 397000000 397022369
+1194000000 1194067296 398000000 398022432 398000000 398022432
+1197000000 1197067450 399000000 399022483 399000000 399022483
+1200000000 1200067629 400000000 400022543 400000000 400022543
+1203000000 1203067775 401000000 401022591 401000000 401022591
+1206000000 1206067902 402000000 402022634 402000000 402022634
+1209000000 1209068076 403000000 403022692 403000000 403022692
+1212000000 1212068140 404000000 404022713 404000000 404022713
+1215000000 1215068347 405000000 405022782 405000000 405022782
+1218000000 1218068528 406000000 406022842 406000000 406022842
+1221000000 1221068677 407000000 407022892 407000000 407022892
+1224000000 1224068734 408000000 408022911 408000000 408022911
+1227000000 1227068930 409000000 409022976 409000000 409022976
+1230000000 1230069120 410000000 410023040 410000000 410023040
+1233000000 1233069265 411000000 411023088 411000000 411023088
+1236000000 1236069437 412000000 412023145 412000000 412023145
+1239000000 1239069570 413000000 413023190 413000000 413023190
+1242000000 1242069641 414000000 414023213 414000000 414023213
+1245000000 1245069867 415000000 415023289 415000000 415023289
+1248000000 1248070027 416000000 416023342 416000000 416023342
+1251000000 1251070159 417000000 417023386 417000000 417023386
+1254000000 1254070267 418000000 418023422 418000000 418023422
+1257000000 1257070478 419000000 419023492 419000000 419023492
+1260000000 1260070644 420000000 420023548 420000000 420023548
+1263000000 1263070755 421000000 421023585 421000000 421023585
+1266000000 1266070915 422000000 422023638 422000000 422023638
+1269000000 1269071027 423000000 423023675 423000000 423023675
+1272000000 1272071225 424000000 424023741 424000000 424023741
+1275000000 1275071315 425000000 425023771 425000000 425023771
+1278000000 1278071540 426000000 426023846 426000000 426023846
+1281000000 1281071672 427000000 427023890 427000000 427023890
+1284000000 1284071811 428000000 428023937 428000000 428023937
+1287000000 1287071862 429000000 429023954 429000000 429023954
+1290000000 1290072073 430000000 430024024 430000000 430024024
+1293000000 1293072282 431000000 431024094 431000000 431024094
+1296000000 1296072410 432000000 432024136 432000000 432024136
+1299000000 1299072553 433000000 433024184 433000000 433024184
+1302000000 1302072724 434000000 434024241 434000000 434024241
+1305000000 1305072821 435000000 435024273 435000000 435024273
+1308000000 1308073034 436000000 436024344 436000000 436024344
+1311000000 1311073164 437000000 437024388 437000000 437024388
+1314000000 1314073314 438000000 438024438 438000000 438024438
+1317000000 1317073474 439000000 439024491 439000000 439024491
+1320000000 1320073570 440000000 440024523 440000000 440024523
+1323000000 1323073758 441000000 441024586 441000000 441024586
+1326000000 1326073926 442000000 442024642 442000000 442024642
+1329000000 1329074062 443000000 443024687 443000000 443024687
+1332000000 1332074237 444000000 444024745 444000000 444024745
+1335000000 1335074359 445000000 445024786 445000000 445024786
+1338000000 1338074509 446000000 446024836 446000000 446024836
+1341000000 1341074657 447000000 447024885 447000000 447024885
+1344000000 1344074863 448000000 448024954 448000000 448024954
+1347000000 1347074977 449000000 449024992 449000000 449024992
+1350000000 1350075109 450000000 450025036 450000000 450025036
+1353000000 1353075283 451000000 451025094 451000000 451025094
+1356000000 1356075402 452000000 452025134 452000000 452025134
+1359000000 1359075526 453000000 453025175 453000000 453025175
+1362000000 1362075745 454000000 454025248 454000000 454025248
+1365000000 1365075881 455000000 455025293 455000000 455025293
+1368000000 1368076032 456000000 456025344 456000000 456025344
+1371000000 1371076192 457000000 457025397 457000000 457025397
+1374000000 1374076313 458000000 458025437 458000000 458025437
+1377000000 1377076394 459000000 459025464 459000000 459025464
+1380000000 1380076602 460000000 460025534 460000000 460025534
+1383000000 1383076757 461000000 461025585 461000000 461025585
+1386000000 1386076916 462000000 462025638 462000000 462025638
+1389000000 1389077068 463000000 463025689 463000000 463025689
+1392000000 1392077190 464000000 464025730 464000000 464025730
+1395000000 1395077368 465000000 465025789 465000000 465025789
+1398000000 1398077517 466000000 466025839 466000000 466025839
+1401000000 1401077645 467000000 467025881 467000000 467025881
+1404000000 1404077814 468000000 468025938 468000000 468025938
+1407000000 1407077934 469000000 469025978 469000000 469025978
+1410000000 1410077861 470000000 470025953 470000000 470025953
+1413000000 1413078184 471000000 471026061 471000000 471026061
+1416000000 1416078437 472000000 472026145 472000000 472026145
+1419000000 1419078547 473000000 473026182 473000000 473026182
+1422000000 1422078726 474000000 474026242 474000000 474026242
+1425000000 1425078774 475000000 475026258 475000000 475026258
+1428000000 1428079028 476000000 476026342 476000000 476026342
+1431000000 1431079147 477000000 477026382 477000000 477026382
+1434000000 1434079318 478000000 478026439 478000000 478026439
+1437000000 1437079465 479000000 479026488 479000000 479026488
+1440000000 1440079618 480000000 480026539 480000000 480026539
+1443000000 1443079764 481000000 481026588 481000000 481026588
+1446000000 1446079908 482000000 482026636 482000000 482026636
+1449000000 1449080071 483000000 483026690 483000000 483026690
+1452000000 1452080223 484000000 484026741 484000000 484026741
+1455000000 1455080377 485000000 485026792 485000000 485026792
+1458000000 1458080497 486000000 486026832 486000000 486026832
+1461000000 1461080706 487000000 487026902 487000000 487026902
+1464000000 1464080836 488000000 488026945 488000000 488026945
+1467000000 1467080950 489000000 489026983 489000000 489026983
+1470000000 1470081111 490000000 490027037 490000000 490027037
+1473000000 1473081246 491000000 491027082 491000000 491027082
+1476000000 1476081389 492000000 492027129 492000000 492027129
+1479000000 1479081489 493000000 493027163 493000000 493027163
+1482000000 1482081723 494000000 494027241 494000000 494027241
+1485000000 1485081796 495000000 495027265 495000000 495027265
+1488000000 1488081917 496000000 496027305 496000000 496027305
+1491000000 1491082106 497000000 497027368 497000000 497027368
+1494000000 1494082260 498000000 498027420 498000000 498027420
+1497000000 1497082439 499000000 499027479 499000000 499027479
+1500000000 1500082585 500000000 500027528 500000000 500027528
+1503000000 1503082712 501000000 501027570 501000000 501027570
+1506000000 1506082886 502000000 502027628 502000000 502027628
+1509000000 1509082950 503000000 503027650 503000000 503027650
+1512000000 1512083157 504000000 504027719 504000000 504027719
+1515000000 1515083338 505000000 505027779 505000000 505027779
+1518000000 1518083487 506000000 506027829 506000000 506027829
+1521000000 1521083544 507000000 507027848 507000000 507027848
+1524000000 1524083740 508000000 508027913 508000000 508027913
+1527000000 1527083930 509000000 509027976 509000000 509027976
+1530000000 1530084075 510000000 510028025 510000000 510028025
+1533000000 1533084247 511000000 511028082 511000000 511028082
+1536000000 1536084380 512000000 512028126 512000000 512028126
+1539000000 1539084451 513000000 513028150 513000000 513028150
+1542000000 1542084677 514000000 514028225 514000000 514028225
+1545000000 1545084837 515000000 515028279 515000000 515028279
+1548000000 1548084969 516000000 516028323 516000000 516028323
+1551000000 1551085077 517000000 517028359 517000000 517028359
+1554000000 1554085288 518000000 518028429 518000000 518028429
+1557000000 1557085454 519000000 519028484 519000000 519028484
+1560000000 1560085565 520000000 520028521 520000000 520028521
+1563000000 1563085725 521000000 521028575 521000000 521028575
+1566000000 1566085837 522000000 522028612 522000000 522028612
+1569000000 1569086035 523000000 523028678 523000000 523028678
+1572000000 1572086125 524000000 524028708 524000000 524028708
+1575000000 1575086350 525000000 525028783 525000000 525028783
+1578000000 1578086482 526000000 526028827 526000000 526028827
+1581000000 1581086621 527000000 527028873 527000000 527028873
+1584000000 1584086672 528000000 528028890 528000000 528028890
+1587000000 1587086883 529000000 529028961 529000000 529028961
+1590000000 1590087092 530000000 530029030 530000000 530029030
+1593000000 1593087220 531000000 531029073 531000000 531029073
+1596000000 1596087363 532000000 532029121 532000000 532029121
+1599000000 1599087534 533000000 533029178 533000000 533029178
+1602000000 1602087631 534000000 534029210 534000000 534029210
+1605000000 1605087844 535000000 535029281 535000000 535029281
+1608000000 1608087974 536000000 536029324 536000000 536029324
+1611000000 1611088124 537000000 537029374 537000000 537029374
+1614000000 1614088284 538000000 538029428 538000000 538029428
+1617000000 1617088380 539000000 539029460 539000000 539029460
+1620000000 1620088568 540000000 540029522 540000000 540029522
+1623000000 1623088736 541000000 541029578 541000000 541029578
+1626000000 1626088872 542000000 542029624 542000000 542029624
+1629000000 1629089047 543000000 543029682 543000000 543029682
+1632000000 1632089169 544000000 544029723 544000000 544029723
+1635000000 1635089319 545000000 545029773 545000000 545029773
+1638000000 1638089467 546000000 546029822 546000000 546029822
+1641000000 1641089673 547000000 547029891 547000000 547029891
+1644000000 1644089787 548000000 548029929 548000000 548029929
+1647000000 1647089919 549000000 549029973 549000000 549029973
+1650000000 1650090093 550000000 550030031 550000000 550030031
+1653000000 1653090212 551000000 551030070 551000000 551030070
+1656000000 1656090336 552000000 552030112 552000000 552030112
+1659000000 1659090555 553000000 553030185 553000000 553030185
+1662000000 1662090691 554000000 554030230 554000000 554030230
+1665000000 1665090842 555000000 555030280 555000000 555030280
+1668000000 1668091002 556000000 556030334 556000000 556030334
+1671000000 1671091123 557000000 557030374 557000000 557030374
+1674000000 1674091204 558000000 558030401 558000000 558030401
+1677000000 1677091412 559000000 559030470 559000000 559030470
+1680000000 1680091567 560000000 560030522 560000000 560030522
+1683000000 1683091726 561000000 561030575 561000000 561030575
+1686000000 1686091878 562000000 562030626 562000000 562030626
+1689000000 1689092000 563000000 563030666 563000000 563030666
+1692000000 1692092178 564000000 564030726 564000000 564030726
+1695000000 1695092327 565000000 565030775 565000000 565030775
+1698000000 1698092455 566000000 566030818 566000000 566030818
+1701000000 1701092624 567000000 567030874 567000000 567030874
+1704000000 1704092744 568000000 568030914 568000000 568030914
+1707000000 1707092671 569000000 569030890 569000000 569030890
+1710000000 1710092994 570000000 570030998 570000000 570030998
+1713000000 1713093247 571000000 571031082 571000000 571031082
+1716000000 1716093357 572000000 572031119 572000000 572031119
+1719000000 1719093536 573000000 573031178 573000000 573031178
+1722000000 1722093584 574000000 574031194 574000000 574031194
+1725000000 1725093838 575000000 575031279 575000000 575031279
+1728000000 1728093957 576000000 576031319 576000000 576031319
+1731000000 1731094128 577000000 577031376 577000000 577031376
+1734000000 1734094275 578000000 578031425 578000000 578031425
+1737000000 1737094428 579000000 579031476 579000000 579031476
+1740000000 1740094574 580000000 580031524 580000000 580031524
+1743000000 1743094718 581000000 581031572 581000000 581031572
+1746000000 1746094881 582000000 582031627 582000000 582031627
+1749000000 1749095033 583000000 583031677 583000000 583031677
+1752000000 1752095187 584000000 584031729 584000000 584031729
+1755000000 1755095307 585000000 585031769 585000000 585031769
+1758000000 1758095516 586000000 586031838 586000000 586031838
+1761000000 1761095646 587000000 587031882 587000000 587031882
+1764000000 1764095760 588000000 588031920 588000000 588031920
+1767000000 1767095921 589000000 589031973 589000000 589031973
+1770000000 1770096056 590000000 590032018 590000000 590032018
+1773000000 1773096199 591000000 591032066 591000000 591032066
+1776000000 1776096299 592000000 592032099 592000000 592032099
+1779000000 1779096533 593000000 593032177 593000000 593032177
+1782000000 1782096606 594000000 594032202 594000000 594032202
+1785000000 1785096727 595000000 595032242 595000000 595032242
+1788000000 1788096916 596000000 596032305 596000000 596032305
+1791000000 1791097070 597000000 597032356 597000000 597032356
+1794000000 1794097249 598000000 598032416 598000000 598032416
+1797000000 1797097395 599000000 599032465 599000000 599032465
+1800000000 1800097522 600000000 600032507 600000000 600032507
+1803000000 1803097696 601000000 601032565 601000000 601032565
+1806000000 1806097760 602000000 602032586 602000000 602032586
+1809000000 1809097967 603000000 603032655 603000000 603032655
+1812000000 1812098148 604000000 604032716 604000000 604032716
+1815000000 1815098297 605000000 605032765 605000000 605032765
+1818000000 1818098354 606000000 606032784 606000000 606032784
+1821000000 1821098550 607000000 607032850 607000000 607032850
+1824000000 1824098740 608000000 608032913 608000000 608032913
+1827000000 1827098885 609000000 609032961 609000000 609032961
+1830000000 1830099057 610000000 610033019 610000000 610033019
+1833000000 1833099190 611000000 611033063 611000000 611033063
+1836000000 1836099261 612000000 612033087 612000000 612033087
+1839000000 1839099487 613000000 613033162 613000000 613033162
+1842000000 1842099647 614000000 614033215 614000000 614033215
+1845000000 1845099779 615000000 615033259 615000000 615033259
+1848000000 1848099887 616000000 616033295 616000000 616033295
+1851000000 1851100098 617000000 617033366 617000000 617033366
+1854000000 1854100264 618000000 618033421 618000000 618033421
+1857000000 1857100375 619000000 619033458 619000000 619033458
+1860000000 1860100535 620000000 620033511 620000000 620033511
+1863000000 1863100647 621000000 621033549 621000000 621033549
+1866000000 1866100845 622000000 622033615 622000000 622033615
+1869000000 1869100935 623000000 623033645 623000000 623033645
+1872000000 1872101160 624000000 624033720 624000000 624033720
+1875000000 1875101292 625000000 625033764 625000000 625033764
+1878000000 1878101431 626000000 626033810 626000000 626033810
+1881000000 1881101482 627000000 627033827 627000000 627033827
+1884000000 1884101693 628000000 628033897 628000000 628033897
+1887000000 1887101902 629000000 629033967 629000000 629033967
+1890000000 1890102030 630000000 630034010 630000000 630034010
+1893000000 1893102173 631000000 631034057 631000000 631034057
+1896000000 1896102344 632000000 632034114 632000000 632034114
+1899000000 1899102441 633000000 633034147 633000000 633034147
+1902000000 1902102654 634000000 634034218 634000000 634034218
+1905000000 1905102784 635000000 635034261 635000000 635034261
+1908000000 1908102934 636000000 636034311 636000000 636034311
+1911000000 1911103094 637000000 637034364 637000000 637034364
+1914000000 1914103190 638000000 638034396 638000000 638034396
+1917000000 1917103378 639000000 639034459 639000000 639034459
+1920000000 1920103546 640000000 640034515 640000000 640034515
+1923000000 1923103682 641000000 641034560 641000000 641034560
+1926000000 1926103857 642000000 642034619 642000000 642034619
+1929000000 1929103979 643000000 643034659 643000000 643034659
+1932000000 1932104129 644000000 644034709 644000000 644034709
+1935000000 1935104277 645000000 645034759 645000000 645034759
+1938000000 1938104483 646000000 646034827 646000000 646034827
+1941000000 1941104597 647000000 647034865 647000000 647034865
+1944000000 1944104729 648000000 648034909 648000000 648034909
+1947000000 1947104903 649000000 649034967 649000000 649034967
+1950000000 1950105022 650000000 650035007 650000000 650035007
+1953000000 1953105146 651000000 651035048 651000000 651035048
+1956000000 1956105365 652000000 652035121 652000000 652035121
+1959000000 1959105501 653000000 653035167 653000000 653035167
+1962000000 1962105652 654000000 654035217 654000000 654035217
+1965000000 1965105812 655000000 655035270 655000000 655035270
+1968000000 1968105933 656000000 656035311 656000000 656035311
+1971000000 1971106014 657000000 657035338 657000000 657035338
+1974000000 1974106222 658000000 658035407 658000000 658035407
+1977000000 1977106377 659000000 659035459 659000000 659035459
+1980000000 1980106536 660000000 660035512 660000000 660035512
+1983000000 1983106688 661000000 661035562 661000000 661035562
+1986000000 1986106810 662000000 662035603 662000000 662035603
+1989000000 1989106988 663000000 663035662 663000000 663035662
+1992000000 1992107137 664000000 664035712 664000000 664035712
+1995000000 1995107265 665000000 665035755 665000000 665035755
+1998000000 1998107434 666000000 666035811 666000000 666035811
+2001000000 2001107554 667000000 667035851 667000000 667035851
+2004000000 2004107481 668000000 668035827 668000000 668035827
+2007000000 2007107804 669000000 669035934 669000000 669035934
+2010000000 2010108057 670000000 670036019 670000000 670036019
+2013000000 2013108167 671000000 671036055 671000000 671036055
+2016000000 2016108346 672000000 672036115 672000000 672036115
+2019000000 2019108394 673000000 673036131 673000000 673036131
+2022000000 2022108648 674000000 674036216 674000000 674036216
+2025000000 2025108767 675000000 675036255 675000000 675036255
+2028000000 2028108938 676000000 676036312 676000000 676036312
+2031000000 2031109085 677000000 677036361 677000000 677036361
+2034000000 2034109238 678000000 678036412 678000000 678036412
+2037000000 2037109384 679000000 679036461 679000000 679036461
+2040000000 2040109528 680000000 680036509 680000000 680036509
+2043000000 2043109691 681000000 681036563 681000000 681036563
+2046000000 2046109843 682000000 682036614 682000000 682036614
+2049000000 2049109997 683000000 683036665 683000000 683036665
+2052000000 2052110117 684000000 684036705 684000000 684036705
+2055000000 2055110326 685000000 685036775 685000000 685036775
+2058000000 2058110456 686000000 686036818 686000000 686036818
+2061000000 2061110570 687000000 687036856 687000000 687036856
+2064000000 2064110731 688000000 688036910 688000000 688036910
+2067000000 2067110866 689000000 689036955 689000000 689036955
+2070000000 2070111009 690000000 690037003 690000000 690037003
+2073000000 2073111109 691000000 691037036 691000000 691037036
+2076000000 2076111343 692000000 692037114 692000000 692037114
+2079000000 2079111416 693000000 693037138 693000000 693037138
+2082000000 2082111537 694000000 694037179 694000000 694037179
+2085000000 2085111726 695000000 695037242 695000000 695037242
+2088000000 2088111880 696000000 696037293 696000000 696037293
+2091000000 2091112059 697000000 697037353 697000000 697037353
+2094000000 2094112205 698000000 698037401 698000000 698037401
+2097000000 2097112332 699000000 699037444 699000000 699037444
+2100000000 2100112506 700000000 700037502 700000000 700037502
+2103000000 2103112570 701000000 701037523 701000000 701037523
+2106000000 2106112777 702000000 702037592 702000000 702037592
+2109000000 2109112958 703000000 703037652 703000000 703037652
+2112000000 2112113107 704000000 704037702 704000000 704037702
+2115000000 2115113164 705000000 705037721 705000000 705037721
+2118000000 2118113360 706000000 706037786 706000000 706037786
+2121000000 2121113550 707000000 707037850 707000000 707037850
+2124000000 2124113695 708000000 708037898 708000000 708037898
+2127000000 2127113867 709000000 709037955 709000000 709037955
+2130000000 2130114000 710000000 710038000 710000000 710038000
+2133000000 2133114071 711000000 711038023 711000000 711038023
+2136000000 2136114297 712000000 712038099 712000000 712038099
+2139000000 2139114457 713000000 713038152 713000000 713038152
+2142000000 2142114589 714000000 714038196 714000000 714038196
+2145000000 2145114697 715000000 715038232 715000000 715038232
+2148000000 2148114908 716000000 716038302 716000000 716038302
+2151000000 2151115074 717000000 717038358 717000000 717038358
+2154000000 2154115185 718000000 718038395 718000000 718038395
+2157000000 2157115345 719000000 719038448 719000000 719038448
+2160000000 2160115457 720000000 720038485 720000000 720038485
+2163000000 2163115655 721000000 721038551 721000000 721038551
+2166000000 2166115745 722000000 722038581 722000000 722038581
+2169000000 2169115970 723000000 723038656 723000000 723038656
+2172000000 2172116102 724000000 724038700 724000000 724038700
+2175000000 2175116241 725000000 725038747 725000000 725038747
+2178000000 2178116292 726000000 726038764 726000000 726038764
+2181000000 2181116503 727000000 727038834 727000000 727038834
+2184000000 2184116712 728000000 728038904 728000000 728038904
+2187000000 2187116840 729000000 729038946 729000000 729038946
+2190000000 2190116983 730000000 730038994 730000000 730038994
+2193000000 2193117154 731000000 731039051 731000000 731039051
+2196000000 2196117251 732000000 732039083 732000000 732039083
+2199000000 2199117464 733000000 733039154 733000000 733039154
+2202000000 2202117594 734000000 734039198 734000000 734039198
+2205000000 2205117744 735000000 735039248 735000000 735039248
+2208000000 2208117904 736000000 736039301 736000000 736039301
+2211000000 2211118000 737000000 737039333 737000000 737039333
+2214000000 2214118188 738000000 738039396 738000000 738039396
+2217000000 2217118356 739000000 739039452 739000000 739039452
+2220000000 2220118492 740000000 740039497 740000000 740039497
+2223000000 2223118667 741000000 741039555 741000000 741039555
+2226000000 2226118789 742000000 742039596 742000000 742039596
+2229000000 2229118939 743000000 743039646 743000000 743039646
+2232000000 2232119087 744000000 744039695 744000000 744039695
+2235000000 2235119293 745000000 745039764 745000000 745039764
+2238000000 2238119407 746000000 746039802 746000000 746039802
+2241000000 2241119539 747000000 747039846 747000000 747039846
+2244000000 2244119713 748000000 748039904 748000000 748039904
+2247000000 2247119832 749000000 749039944 749000000 749039944
+2250000000 2250119956 750000000 750039985 750000000 750039985
+2253000000 2253120175 751000000 751040058 751000000 751040058
+2256000000 2256120311 752000000 752040103 752000000 752040103
+2259000000 2259120462 753000000 753040154 753000000 753040154
+2262000000 2262120622 754000000 754040207 754000000 754040207
+2265000000 2265120743 755000000 755040247 755000000 755040247
+2268000000 2268120824 756000000 756040274 756000000 756040274
+2271000000 2271121032 757000000 757040344 757000000 757040344
+2274000000 2274121187 758000000 758040395 758000000 758040395
+2277000000 2277121346 759000000 759040448 759000000 759040448
+2280000000 2280121498 760000000 760040499 760000000 760040499
+2283000000 2283121620 761000000 761040540 761000000 761040540
+2286000000 2286121798 762000000 762040599 762000000 762040599
+2289000000 2289121947 763000000 763040649 763000000 763040649
+2292000000 2292122075 764000000 764040691 764000000 764040691
+2295000000 2295122244 765000000 765040748 765000000 765040748
+2298000000 2298122364 766000000 766040788 766000000 766040788
+2301000000 2301122291 767000000 767040763 767000000 767040763
+2304000000 2304122614 768000000 768040871 768000000 768040871
+2307000000 2307122867 769000000 769040955 769000000 769040955
+2310000000 2310122977 770000000 770040992 770000000 770040992
+2313000000 2313123156 771000000 771041052 771000000 771041052
+2316000000 2316123204 772000000 772041068 772000000 772041068
+2319000000 2319123458 773000000 773041152 773000000 773041152
+2322000000 2322123577 774000000 774041192 774000000 774041192
+2325000000 2325123748 775000000 775041249 775000000 775041249
+2328000000 2328123895 776000000 776041298 776000000 776041298
+2331000000 2331124048 777000000 777041349 777000000 777041349
+2334000000 2334124194 778000000 778041398 778000000 778041398
+2337000000 2337124338 779000000 779041446 779000000 779041446
+2340000000 2340124501 780000000 780041500 780000000 780041500
+2343000000 2343124653 781000000 781041551 781000000 781041551
+2346000000 2346124807 782000000 782041602 782000000 782041602
+2349000000 2349124927 783000000 783041642 783000000 783041642
+2352000000 2352125136 784000000 784041712 784000000 784041712
+2355000000 2355125266 785000000 785041755 785000000 785041755
+2358000000 2358125380 786000000 786041793 786000000 786041793
+2361000000 2361125541 787000000 787041847 787000000 787041847
+2364000000 2364125676 788000000 788041892 788000000 788041892
+2367000000 2367125819 789000000 789041939 789000000 789041939
+2370000000 2370125919 790000000 790041973 790000000 790041973
+2373000000 2373126153 791000000 791042051 791000000 791042051
+2376000000 2376126226 792000000 792042075 792000000 792042075
+2379000000 2379126347 793000000 793042115 793000000 793042115
+2382000000 2382126536 794000000 794042178 794000000 794042178
+2385000000 2385126690 795000000 795042230 795000000 795042230
+2388000000 2388126869 796000000 796042289 796000000 796042289
+2391000000 2391127015 797000000 797042338 797000000 797042338
+2394000000 2394127142 798000000 798042380 798000000 798042380
+2397000000 2397127316 799000000 799042438 799000000 799042438
+2400000000 2400127380 800000000 800042460 800000000 800042460
+2403000000 2403127587 801000000 801042529 801000000 801042529
+2406000000 2406127768 802000000 802042589 802000000 802042589
+2409000000 2409127917 803000000 803042639 803000000 803042639
+2412000000 2412127974 804000000 804042658 804000000 804042658
+2415000000 2415128170 805000000 805042723 805000000 805042723
+2418000000 2418128360 806000000 806042786 806000000 806042786
+2421000000 2421128505 807000000 807042835 807000000 807042835
+2424000000 2424128677 808000000 808042892 808000000 808042892
+2427000000 2427128810 809000000 809042936 809000000 809042936
+2430000000 2430128881 810000000 810042960 810000000 810042960
+2433000000 2433129107 811000000 811043035 811000000 811043035
+2436000000 2436129267 812000000 812043089 812000000 812043089
+2439000000 2439129399 813000000 813043133 813000000 813043133
+2442000000 2442129507 814000000 814043169 814000000 814043169
+2445000000 2445129718 815000000 815043239 815000000 815043239
+2448000000 2448129884 816000000 816043294 816000000 816043294
+2451000000 2451129995 817000000 817043331 817000000 817043331
+2454000000 2454130155 818000000 818043385 818000000 818043385
+2457000000 2457130267 819000000 819043422 819000000 819043422
+2460000000 2460130465 820000000 820043488 820000000 820043488
+2463000000 2463130555 821000000 821043518 821000000 821043518
+2466000000 2466130780 822000000 822043593 822000000 822043593
+2469000000 2469130912 823000000 823043637 823000000 823043637
+2472000000 2472131051 824000000 824043683 824000000 824043683
+2475000000 2475131102 825000000 825043700 825000000 825043700
+2478000000 2478131313 826000000 826043771 826000000 826043771
+2481000000 2481131522 827000000 827043840 827000000 827043840
+2484000000 2484131650 828000000 828043883 828000000 828043883
+2487000000 2487131793 829000000 829043931 829000000 829043931
+2490000000 2490131964 830000000 830043988 830000000 830043988
+2493000000 2493132061 831000000 831044020 831000000 831044020
+2496000000 2496132274 832000000 832044091 832000000 832044091
+2499000000 2499132404 833000000 833044134 833000000 833044134
+2502000000 2502132554 834000000 834044184 834000000 834044184
+2505000000 2505132714 835000000 835044238 835000000 835044238
+2508000000 2508132810 836000000 836044270 836000000 836044270
+2511000000 2511132998 837000000 837044332 837000000 837044332
+2514000000 2514133166 838000000 838044388 838000000 838044388
+2517000000 2517133302 839000000 839044434 839000000 839044434
+2520000000 2520133477 840000000 840044492 840000000 840044492
+2523000000 2523133599 841000000 841044533 841000000 841044533
+2526000000 2526133749 842000000 842044583 842000000 842044583
+2529000000 2529133897 843000000 843044632 843000000 843044632
+2532000000 2532134103 844000000 844044701 844000000 844044701
+2535000000 2535134217 845000000 845044739 845000000 845044739
+2538000000 2538134349 846000000 846044783 846000000 846044783
+2541000000 2541134523 847000000 847044841 847000000 847044841
+2544000000 2544134642 848000000 848044880 848000000 848044880
+2547000000 2547134766 849000000 849044922 849000000 849044922
+2550000000 2550134985 850000000 850044995 850000000 850044995
+2553000000 2553135121 851000000 851045040 851000000 851045040
+2556000000 2556135272 852000000 852045090 852000000 852045090
+2559000000 2559135432 853000000 853045144 853000000 853045144
+2562000000 2562135553 854000000 854045184 854000000 854045184
+2565000000 2565135634 855000000 855045211 855000000 855045211
+2568000000 2568135842 856000000 856045280 856000000 856045280
+2571000000 2571135997 857000000 857045332 857000000 857045332
+2574000000 2574136156 858000000 858045385 858000000 858045385
+2577000000 2577136308 859000000 859045436 859000000 859045436
+2580000000 2580136430 860000000 860045476 860000000 860045476
+2583000000 2583136608 861000000 861045536 861000000 861045536
+2586000000 2586136757 862000000 862045585 862000000 862045585
+2589000000 2589136885 863000000 863045628 863000000 863045628
+2592000000 2592137054 864000000 864045684 864000000 864045684
+2595000000 2595137174 865000000 865045724 865000000 865045724
+2598000000 2598137101 866000000 866045700 866000000 866045700
+2601000000 2601137424 867000000 867045808 867000000 867045808
+2604000000 2604137677 868000000 868045892 868000000 868045892
+2607000000 2607137787 869000000 869045929 869000000 869045929
+2610000000 2610137966 870000000 870045988 870000000 870045988
+2613000000 2613138014 871000000 871046004 871000000 871046004
+2616000000 2616138268 872000000 872046089 872000000 872046089
+2619000000 2619138387 873000000 873046129 873000000 873046129
+2622000000 2622138558 874000000 874046186 874000000 874046186
+2625000000 2625138705 875000000 875046235 875000000 875046235
+2628000000 2628138858 876000000 876046286 876000000 876046286
+2631000000 2631139004 877000000 877046334 877000000 877046334
+2634000000 2634139148 878000000 878046382 878000000 878046382
+2637000000 2637139311 879000000 879046437 879000000 879046437
+2640000000 2640139463 880000000 880046487 880000000 880046487
+2643000000 2643139617 881000000 881046539 881000000 881046539
+2646000000 2646139737 882000000 882046579 882000000 882046579
+2649000000 2649139946 883000000 883046648 883000000 883046648
+2652000000 2652140076 884000000 884046692 884000000 884046692
+2655000000 2655140190 885000000 885046730 885000000 885046730
+2658000000 2658140351 886000000 886046783 886000000 886046783
+2661000000 2661140486 887000000 887046828 887000000 887046828
+2664000000 2664140629 888000000 888046876 888000000 888046876
+2667000000 2667140729 889000000 889046909 889000000 889046909
+2670000000 2670140963 890000000 890046987 890000000 890046987
+2673000000 2673141036 891000000 891047012 891000000 891047012
+2676000000 2676141157 892000000 892047052 892000000 892047052
+2679000000 2679141346 893000000 893047115 893000000 893047115
+2682000000 2682141500 894000000 894047166 894000000 894047166
+2685000000 2685141679 895000000 895047226 895000000 895047226
+2688000000 2688141825 896000000 896047275 896000000 896047275
+2691000000 2691141952 897000000 897047317 897000000 897047317
+2694000000 2694142126 898000000 898047375 898000000 898047375
+2697000000 2697142190 899000000 899047396 899000000 899047396
+2700000000 2700142397 900000000 900047465 900000000 900047465
+2703000000 2703142578 901000000 901047526 901000000 901047526
+2706000000 2706142727 902000000 902047575 902000000 902047575
+2709000000 2709142784 903000000 903047594 903000000 903047594
+2712000000 2712142980 904000000 904047660 904000000 904047660
+2715000000 2715143170 905000000 905047723 905000000 905047723
+2718000000 2718143315 906000000 906047771 906000000 906047771
+2721000000 2721143487 907000000 907047829 907000000 907047829
+2724000000 2724143620 908000000 908047873 908000000 908047873
+2727000000 2727143691 909000000 909047897 909000000 909047897
+2730000000 2730143917 910000000 910047972 910000000 910047972
+2733000000 2733144077 911000000 911048025 911000000 911048025
+2736000000 2736144209 912000000 912048069 912000000 912048069
+2739000000 2739144317 913000000 913048105 913000000 913048105
+2742000000 2742144528 914000000 914048176 914000000 914048176
+2745000000 2745144694 915000000 915048231 915000000 915048231
+2748000000 2748144805 916000000 916048268 916000000 916048268
+2751000000 2751144965 917000000 917048321 917000000 917048321
+2754000000 2754145077 918000000 918048359 918000000 918048359
+2757000000 2757145275 919000000 919048425 919000000 919048425
+2760000000 2760145365 920000000 920048455 920000000 920048455
+2763000000 2763145590 921000000 921048530 921000000 921048530
+2766000000 2766145722 922000000 922048574 922000000 922048574
+2769000000 2769145861 923000000 923048620 923000000 923048620
+2772000000 2772145912 924000000 924048637 924000000 924048637
+2775000000 2775146123 925000000 925048707 925000000 925048707
+2778000000 2778146332 926000000 926048777 926000000 926048777
+2781000000 2781146460 927000000 927048820 927000000 927048820
+2784000000 2784146603 928000000 928048867 928000000 928048867
+2787000000 2787146774 929000000 929048924 929000000 929048924
+2790000000 2790146871 930000000 930048957 930000000 930048957
+2793000000 2793147084 931000000 931049028 931000000 931049028
+2796000000 2796147214 932000000 932049071 932000000 932049071
+2799000000 2799147364 933000000 933049121 933000000 933049121
+2802000000 2802147524 934000000 934049174 934000000 934049174
+2805000000 2805147620 935000000 935049206 935000000 935049206
+2808000000 2808147808 936000000 936049269 936000000 936049269
+2811000000 2811147976 937000000 937049325 937000000 937049325
+2814000000 2814148112 938000000 938049370 938000000 938049370
+2817000000 2817148287 939000000 939049429 939000000 939049429
+2820000000 2820148409 940000000 940049469 940000000 940049469
+2823000000 2823148559 941000000 941049519 941000000 941049519
+2826000000 2826148707 942000000 942049569 942000000 942049569
+2829000000 2829148913 943000000 943049637 943000000 943049637
+2832000000 2832149027 944000000 944049675 944000000 944049675
+2835000000 2835149159 945000000 945049719 945000000 945049719
+2838000000 2838149333 946000000 946049777 946000000 946049777
+2841000000 2841149452 947000000 947049817 947000000 947049817
+2844000000 2844149576 948000000 948049858 948000000 948049858
+2847000000 2847149795 949000000 949049931 949000000 949049931
+2850000000 2850149931 950000000 950049977 950000000 950049977
+2853000000 2853150082 951000000 951050027 951000000 951050027
+2856000000 2856150242 952000000 952050080 952000000 952050080
+2859000000 2859150363 953000000 953050121 953000000 953050121
+2862000000 2862150444 954000000 954050148 954000000 954050148
+2865000000 2865150652 955000000 955050217 955000000 955050217
+2868000000 2868150807 956000000 956050269 956000000 956050269
+2871000000 2871150966 957000000 957050322 957000000 957050322
+2874000000 2874151118 958000000 958050372 958000000 958050372
+2877000000 2877151240 959000000 959050413 959000000 959050413
+2880000000 2880151418 960000000 960050472 960000000 960050472
+2883000000 2883151567 961000000 961050522 961000000 961050522
+2886000000 2886151695 962000000 962050565 962000000 962050565
+2889000000 2889151864 963000000 963050621 963000000 963050621
+2892000000 2892151984 964000000 964050661 964000000 964050661
+2895000000 2895151911 965000000 965050637 965000000 965050637
+2898000000 2898152234 966000000 966050744 966000000 966050744
+2901000000 2901152487 967000000 967050829 967000000 967050829
+2904000000 2904152597 968000000 968050865 968000000 968050865
+2907000000 2907152776 969000000 969050925 969000000 969050925
+2910000000 2910152824 970000000 970050941 970000000 970050941
+2913000000 2913153078 971000000 971051026 971000000 971051026
+2916000000 2916153197 972000000 972051065 972000000 972051065
+2919000000 2919153368 973000000 973051122 973000000 973051122
+2922000000 2922153515 974000000 974051171 974000000 974051171
+2925000000 2925153668 975000000 975051222 975000000 975051222
+2928000000 2928153814 976000000 976051271 976000000 976051271
+2931000000 2931153958 977000000 977051319 977000000 977051319
+2934000000 2934154121 978000000 978051373 978000000 978051373
+2937000000 2937154273 979000000 979051424 979000000 979051424
+2940000000 2940154427 980000000 980051475 980000000 980051475
+2943000000 2943154547 981000000 981051515 981000000 981051515
+2946000000 2946154756 982000000 982051585 982000000 982051585
+2949000000 2949154886 983000000 983051628 983000000 983051628
+2952000000 2952155000 984000000 984051666 984000000 984051666
+2955000000 2955155161 985000000 985051720 985000000 985051720
+2958000000 2958155296 986000000 986051765 986000000 986051765
+2961000000 2961155439 987000000 987051813 987000000 987051813
+2964000000 2964155539 988000000 988051846 988000000 988051846
+2967000000 2967155773 989000000 989051924 989000000 989051924
+2970000000 2970155846 990000000 990051948 990000000 990051948
+2973000000 2973155967 991000000 991051989 991000000 991051989
+2976000000 2976156156 992000000 992052052 992000000 992052052
+2979000000 2979156310 993000000 993052103 993000000 993052103
+2982000000 2982156489 994000000 994052163 994000000 994052163
+2985000000 2985156635 995000000 995052211 995000000 995052211
+2988000000 2988156762 996000000 996052254 996000000 996052254
+2991000000 2991156936 997000000 997052312 997000000 997052312
+2994000000 2994157000 998000000 998052333 998000000 998052333
+2997000000 2997157207 999000000 999052402 999000000 999052402
+3000000000 3000157388 1000000000 1000052462 1000000000 1000052462
+3003000000 3003157537 1001000000 1001052512 1001000000 1001052512
+3006000000 3006157594 1002000000 1002052531 1002000000 1002052531
+3009000000 3009157790 1003000000 1003052596 1003000000 1003052596
+3012000000 3012157980 1004000000 1004052660 1004000000 1004052660
+3015000000 3015158125 1005000000 1005052708 1005000000 1005052708
+3018000000 3018158297 1006000000 1006052765 1006000000 1006052765
+3021000000 3021158430 1007000000 1007052810 1007000000 1007052810
+3024000000 3024158501 1008000000 1008052833 1008000000 1008052833
+3027000000 3027158727 1009000000 1009052909 1009000000 1009052909
+3030000000 3030158887 1010000000 1010052962 1010000000 1010052962
+3033000000 3033159019 1011000000 1011053006 1011000000 1011053006
+3036000000 3036159127 1012000000 1012053042 1012000000 1012053042
+3039000000 3039159338 1013000000 1013053112 1013000000 1013053112
+3042000000 3042159504 1014000000 1014053168 1014000000 1014053168
+3045000000 3045159615 1015000000 1015053205 1015000000 1015053205
+3048000000 3048159775 1016000000 1016053258 1016000000 1016053258
+3051000000 3051159887 1017000000 1017053295 1017000000 1017053295
+3054000000 3054160085 1018000000 1018053361 1018000000 1018053361
+3057000000 3057160175 1019000000 1019053391 1019000000 1019053391
+3060000000 3060160400 1020000000 1020053466 1020000000 1020053466
+3063000000 3063160532 1021000000 1021053510 1021000000 1021053510
+3066000000 3066160671 1022000000 1022053557 1022000000 1022053557
+3069000000 3069160722 1023000000 1023053574 1023000000 1023053574
+3072000000 3072160933 1024000000 1024053644 1024000000 1024053644
+3075000000 3075161142 1025000000 1025053714 1025000000 1025053714
+3078000000 3078161270 1026000000 1026053756 1026000000 1026053756
+3081000000 3081161413 1027000000 1027053804 1027000000 1027053804
+3084000000 3084161584 1028000000 1028053861 1028000000 1028053861
+3087000000 3087161681 1029000000 1029053893 1029000000 1029053893
+3090000000 3090161894 1030000000 1030053964 1030000000 1030053964
+3093000000 3093162024 1031000000 1031054008 1031000000 1031054008
+3096000000 3096162174 1032000000 1032054058 1032000000 1032054058
+3099000000 3099162334 1033000000 1033054111 1033000000 1033054111
+3102000000 3102162430 1034000000 1034054143 1034000000 1034054143
+3105000000 3105162618 1035000000 1035054206 1035000000 1035054206
+3108000000 3108162786 1036000000 1036054262 1036000000 1036054262
+3111000000 3111162922 1037000000 1037054307 1037000000 1037054307
+3114000000 3114163097 1038000000 1038054365 1038000000 1038054365
+3117000000 3117163219 1039000000 1039054406 1039000000 1039054406
+3120000000 3120163369 1040000000 1040054456 1040000000 1040054456
+3123000000 3123163517 1041000000 1041054505 1041000000 1041054505
+3126000000 3126163723 1042000000 1042054574 1042000000 1042054574
+3129000000 3129163837 1043000000 1043054612 1043000000 1043054612
+3132000000 3132163969 1044000000 1044054656 1044000000 1044054656
+3135000000 3135164143 1045000000 1045054714 1045000000 1045054714
+3138000000 3138164262 1046000000 1046054754 1046000000 1046054754
+3141000000 3141164386 1047000000 1047054795 1047000000 1047054795
+3144000000 3144164605 1048000000 1048054868 1048000000 1048054868
+3147000000 3147164741 1049000000 1049054913 1049000000 1049054913
+3150000000 3150164892 1050000000 1050054964 1050000000 1050054964
+3153000000 3153165052 1051000000 1051055017 1051000000 1051055017
+3156000000 3156165173 1052000000 1052055057 1052000000 1052055057
+3159000000 3159165254 1053000000 1053055084 1053000000 1053055084
+3162000000 3162165462 1054000000 1054055154 1054000000 1054055154
+3165000000 3165165617 1055000000 1055055205 1055000000 1055055205
+3168000000 3168165776 1056000000 1056055258 1056000000 1056055258
+3171000000 3171165928 1057000000 1057055309 1057000000 1057055309
+3174000000 3174166050 1058000000 1058055350 1058000000 1058055350
+3177000000 3177166228 1059000000 1059055409 1059000000 1059055409
+3180000000 3180166377 1060000000 1060055459 1060000000 1060055459
+3183000000 3183166505 1061000000 1061055501 1061000000 1061055501
+3186000000 3186166674 1062000000 1062055558 1062000000 1062055558
+3189000000 3189166794 1063000000 1063055598 1063000000 1063055598
+3192000000 3192166721 1064000000 1064055573 1064000000 1064055573
+3195000000 3195167044 1065000000 1065055681 1065000000 1065055681
+3198000000 3198167297 1066000000 1066055765 1066000000 1066055765
+3201000000 3201167407 1067000000 1067055802 1067000000 1067055802
+3204000000 3204167586 1068000000 1068055862 1068000000 1068055862
+3207000000 3207167634 1069000000 1069055878 1069000000 1069055878
+3210000000 3210167888 1070000000 1070055962 1070000000 1070055962
+3213000000 3213168007 1071000000 1071056002 1071000000 1071056002
+3216000000 3216168178 1072000000 1072056059 1072000000 1072056059
+3219000000 3219168325 1073000000 1073056108 1073000000 1073056108
+3222000000 3222168478 1074000000 1074056159 1074000000 1074056159
+3225000000 3225168624 1075000000 1075056208 1075000000 1075056208
+3228000000 3228168768 1076000000 1076056256 1076000000 1076056256
+3231000000 3231168931 1077000000 1077056310 1077000000 1077056310
+3234000000 3234169083 1078000000 1078056361 1078000000 1078056361
+3237000000 3237169237 1079000000 1079056412 1079000000 1079056412
+3240000000 3240169357 1080000000 1080056452 1080000000 1080056452
+3243000000 3243169566 1081000000 1081056522 1081000000 1081056522
+3246000000 3246169696 1082000000 1082056565 1082000000 1082056565
+3249000000 3249169810 1083000000 1083056603 1083000000 1083056603
+3252000000 3252169971 1084000000 1084056657 1084000000 1084056657
+3255000000 3255170106 1085000000 1085056702 1085000000 1085056702
+3258000000 3258170249 1086000000 1086056749 1086000000 1086056749
+3261000000 3261170349 1087000000 1087056783 1087000000 1087056783
+3264000000 3264170583 1088000000 1088056861 1088000000 1088056861
+3267000000 3267170656 1089000000 1089056885 1089000000 1089056885
+3270000000 3270170777 1090000000 1090056925 1090000000 1090056925
+3273000000 3273170966 1091000000 1091056988 1091000000 1091056988
+3276000000 3276171120 1092000000 1092057040 1092000000 1092057040
+3279000000 3279171299 1093000000 1093057099 1093000000 1093057099
+3282000000 3282171445 1094000000 1094057148 1094000000 1094057148
+3285000000 3285171572 1095000000 1095057190 1095000000 1095057190
+3288000000 3288171746 1096000000 1096057248 1096000000 1096057248
+3291000000 3291171810 1097000000 1097057270 1097000000 1097057270
+3294000000 3294172017 1098000000 1098057339 1098000000 1098057339
+3297000000 3297172198 1099000000 1099057399 1099000000 1099057399
+3300000000 3300172347 1100000000 1100057449 1100000000 1100057449
+3303000000 3303172404 1101000000 1101057468 1101000000 1101057468
+3306000000 3306172600 1102000000 1102057533 1102000000 1102057533
+3309000000 3309172790 1103000000 1103057596 1103000000 1103057596
+3312000000 3312172935 1104000000 1104057645 1104000000 1104057645
+3315000000 3315173107 1105000000 1105057702 1105000000 1105057702
+3318000000 3318173240 1106000000 1106057746 1106000000 1106057746
+3321000000 3321173311 1107000000 1107057770 1107000000 1107057770
+3324000000 3324173537 1108000000 1108057845 1108000000 1108057845
+3327000000 3327173697 1109000000 1109057899 1109000000 1109057899
+3330000000 3330173829 1110000000 1110057943 1110000000 1110057943
+3333000000 3333173937 1111000000 1111057979 1111000000 1111057979
+3336000000 3336174148 1112000000 1112058049 1112000000 1112058049
+3339000000 3339174314 1113000000 1113058104 1113000000 1113058104
+3342000000 3342174425 1114000000 1114058141 1114000000 1114058141
+3345000000 3345174585 1115000000 1115058195 1115000000 1115058195
+3348000000 3348174697 1116000000 1116058232 1116000000 1116058232
+3351000000 3351174895 1117000000 1117058298 1117000000 1117058298
+3354000000 3354174985 1118000000 1118058328 1118000000 1118058328
+3357000000 3357175210 1119000000 1119058403 1119000000 1119058403
+3360000000 3360175342 1120000000 1120058447 1120000000 1120058447
+3363000000 3363175481 1121000000 1121058493 1121000000 1121058493
+3366000000 3366175532 1122000000 1122058510 1122000000 1122058510
+3369000000 3369175743 1123000000 1123058581 1123000000 1123058581
+3372000000 3372175952 1124000000 1124058650 1124000000 1124058650
+3375000000 3375176080 1125000000 1125058693 1125000000 1125058693
+3378000000 3378176223 1126000000 1126058741 1126000000 1126058741
+3381000000 3381176394 1127000000 1127058798 1127000000 1127058798
+3384000000 3384176491 1128000000 1128058830 1128000000 1128058830
+3387000000 3387176704 1129000000 1129058901 1129000000 1129058901
+3390000000 3390176834 1130000000 1130058944 1130000000 1130058944
+3393000000 3393176984 1131000000 1131058994 1131000000 1131058994
+3396000000 3396177144 1132000000 1132059048 1132000000 1132059048
+3399000000 3399177240 1133000000 1133059080 1133000000 1133059080
+3402000000 3402177428 1134000000 1134059142 1134000000 1134059142
+3405000000 3405177596 1135000000 1135059198 1135000000 1135059198
+3408000000 3408177732 1136000000 1136059244 1136000000 1136059244
+3411000000 3411177907 1137000000 1137059302 1137000000 1137059302
+3414000000 3414178029 1138000000 1138059343 1138000000 1138059343
+3417000000 3417178179 1139000000 1139059393 1139000000 1139059393
+3420000000 3420178327 1140000000 1140059442 1140000000 1140059442
+3423000000 3423178533 1141000000 1141059511 1141000000 1141059511
+3426000000 3426178647 1142000000 1142059549 1142000000 1142059549
+3429000000 3429178779 1143000000 1143059593 1143000000 1143059593
+3432000000 3432178953 1144000000 1144059651 1144000000 1144059651
+3435000000 3435179072 1145000000 1145059690 1145000000 1145059690
+3438000000 3438179196 1146000000 1146059732 1146000000 1146059732
+3441000000 3441179415 1147000000 1147059805 1147000000 1147059805
+3444000000 3444179551 1148000000 1148059850 1148000000 1148059850
+3447000000 3447179702 1149000000 1149059900 1149000000 1149059900
+3450000000 3450179862 1150000000 1150059954 1150000000 1150059954
+3453000000 3453179983 1151000000 1151059994 1151000000 1151059994
+3456000000 3456180064 1152000000 1152060021 1152000000 1152060021
+3459000000 3459180272 1153000000 1153060090 1153000000 1153060090
+3462000000 3462180427 1154000000 1154060142 1154000000 1154060142
+3465000000 3465180586 1155000000 1155060195 1155000000 1155060195
+3468000000 3468180738 1156000000 1156060246 1156000000 1156060246
+3471000000 3471180860 1157000000 1157060286 1157000000 1157060286
+3474000000 3474181038 1158000000 1158060346 1158000000 1158060346
+3477000000 3477181187 1159000000 1159060395 1159000000 1159060395
+3480000000 3480181315 1160000000 1160060438 1160000000 1160060438
+3483000000 3483181484 1161000000 1161060494 1161000000 1161060494
+3486000000 3486181604 1162000000 1162060534 1162000000 1162060534
+3489000000 3489181531 1163000000 1163060510 1163000000 1163060510
+3492000000 3492181854 1164000000 1164060618 1164000000 1164060618
+3495000000 3495182107 1165000000 1165060702 1165000000 1165060702
+3498000000 3498182217 1166000000 1166060739 1166000000 1166060739
+3501000000 3501182396 1167000000 1167060798 1167000000 1167060798
+3504000000 3504182444 1168000000 1168060814 1168000000 1168060814
+3507000000 3507182698 1169000000 1169060899 1169000000 1169060899
+3510000000 3510182817 1170000000 1170060939 1170000000 1170060939
+3513000000 3513182988 1171000000 1171060996 1171000000 1171060996
+3516000000 3516183135 1172000000 1172061045 1172000000 1172061045
+3519000000 3519183288 1173000000 1173061096 1173000000 1173061096
+3522000000 3522183434 1174000000 1174061144 1174000000 1174061144
+3525000000 3525183578 1175000000 1175061192 1175000000 1175061192
+3528000000 3528183741 1176000000 1176061247 1176000000 1176061247
+3531000000 3531183893 1177000000 1177061297 1177000000 1177061297
+3534000000 3534184047 1178000000 1178061349 1178000000 1178061349
+3537000000 3537184167 1179000000 1179061389 1179000000 1179061389
+3540000000 3540184376 1180000000 1180061458 1180000000 1180061458
+3543000000 3543184506 1181000000 1181061502 1181000000 1181061502
+3546000000 3546184620 1182000000 1182061540 1182000000 1182061540
+3549000000 3549184781 1183000000 1183061593 1183000000 1183061593
+3552000000 3552184916 1184000000 1184061638 1184000000 1184061638
+3555000000 3555185059 1185000000 1185061686 1185000000 1185061686
+3558000000 3558185159 1186000000 1186061719 1186000000 1186061719
+3561000000 3561185393 1187000000 1187061797 1187000000 1187061797
+3564000000 3564185466 1188000000 1188061822 1188000000 1188061822
+3567000000 3567185587 1189000000 1189061862 1189000000 1189061862
+3570000000 3570185776 1190000000 1190061925 1190000000 1190061925
+3573000000 3573185930 1191000000 1191061976 1191000000 1191061976
+3576000000 3576186109 1192000000 1192062036 1192000000 1192062036
+3579000000 3579186255 1193000000 1193062085 1193000000 1193062085
+3582000000 3582186382 1194000000 1194062127 1194000000 1194062127
+3585000000 3585186556 1195000000 1195062185 1195000000 1195062185
+3588000000 3588186620 1196000000 1196062206 1196000000 1196062206
+3591000000 3591186827 1197000000 1197062275 1197000000 1197062275
+3594000000 3594187008 1198000000 1198062336 1198000000 1198062336
+3597000000 3597187157 1199000000 1199062385 1199000000 1199062385
+3600000000 3600187214 1200000000 1200062404 1200000000 1200062404
+3603000000 3603187410 1201000000 1201062470 1201000000 1201062470
+3606000000 3606187600 1202000000 1202062533 1202000000 1202062533
+3609000000 3609187745 1203000000 1203062581 1203000000 1203062581
+3612000000 3612187917 1204000000 1204062639 1204000000 1204062639
+3615000000 3615188050 1205000000 1205062683 1205000000 1205062683
+3618000000 3618188121 1206000000 1206062707 1206000000 1206062707
+3621000000 3621188347 1207000000 1207062782 1207000000 1207062782
+3624000000 3624188507 1208000000 1208062835 1208000000 1208062835
+3627000000 3627188639 1209000000 1209062879 1209000000 1209062879
+3630000000 3630188747 1210000000 1210062915 1210000000 1210062915
+3633000000 3633188958 1211000000 1211062986 1211000000 1211062986
+3636000000 3636189124 1212000000 1212063041 1212000000 1212063041
+3639000000 3639189235 1213000000 1213063078 1213000000 1213063078
+3642000000 3642189395 1214000000 1214063131 1214000000 1214063131
+3645000000 3645189507 1215000000 1215063169 1215000000 1215063169
+3648000000 3648189705 1216000000 1216063235 1216000000 1216063235
+3651000000 3651189795 1217000000 1217063265 1217000000 1217063265
+3654000000 3654190020 1218000000 1218063340 1218000000 1218063340
+3657000000 3657190152 1219000000 1219063384 1219000000 1219063384
+3660000000 3660190291 1220000000 1220063430 1220000000 1220063430
+3663000000 3663190342 1221000000 1221063447 1221000000 1221063447
+3666000000 3666190553 1222000000 1222063517 1222000000 1222063517
+3669000000 3669190762 1223000000 1223063587 1223000000 1223063587
+3672000000 3672190890 1224000000 1224063630 1224000000 1224063630
+3675000000 3675191033 1225000000 1225063677 1225000000 1225063677
+3678000000 3678191204 1226000000 1226063734 1226000000 1226063734
+3681000000 3681191301 1227000000 1227063767 1227000000 1227063767
+3684000000 3684191514 1228000000 1228063838 1228000000 1228063838
+3687000000 3687191644 1229000000 1229063881 1229000000 1229063881
+3690000000 3690191794 1230000000 1230063931 1230000000 1230063931
+3693000000 3693191954 1231000000 1231063984 1231000000 1231063984
+3696000000 3696192050 1232000000 1232064016 1232000000 1232064016
+3699000000 3699192238 1233000000 1233064079 1233000000 1233064079
+3702000000 3702192406 1234000000 1234064135 1234000000 1234064135
+3705000000 3705192542 1235000000 1235064180 1235000000 1235064180
+3708000000 3708192717 1236000000 1236064239 1236000000 1236064239
+3711000000 3711192839 1237000000 1237064279 1237000000 1237064279
+3714000000 3714192989 1238000000 1238064329 1238000000 1238064329
+3717000000 3717193137 1239000000 1239064379 1239000000 1239064379
+3720000000 3720193343 1240000000 1240064447 1240000000 1240064447
+3723000000 3723193457 1241000000 1241064485 1241000000 1241064485
+3726000000 3726193589 1242000000 1242064529 1242000000 1242064529
+3729000000 3729193763 1243000000 1243064587 1243000000 1243064587
+3732000000 3732193882 1244000000 1244064627 1244000000 1244064627
+3735000000 3735194006 1245000000 1245064668 1245000000 1245064668
+3738000000 3738194225 1246000000 1246064741 1246000000 1246064741
+3741000000 3741194361 1247000000 1247064787 1247000000 1247064787
+3744000000 3744194512 1248000000 1248064837 1248000000 1248064837
+3747000000 3747194672 1249000000 1249064890 1249000000 1249064890
+3750000000 3750194793 1250000000 1250064931 1250000000 1250064931
+3753000000 3753194874 1251000000 1251064958 1251000000 1251064958
+3756000000 3756195082 1252000000 1252065027 1252000000 1252065027
+3759000000 3759195237 1253000000 1253065079 1253000000 1253065079
+3762000000 3762195396 1254000000 1254065132 1254000000 1254065132
+3765000000 3765195548 1255000000 1255065182 1255000000 1255065182
+3768000000 3768195670 1256000000 1256065223 1256000000 1256065223
+3771000000 3771195848 1257000000 1257065282 1257000000 1257065282
+3774000000 3774195997 1258000000 1258065332 1258000000 1258065332
+3777000000 3777196125 1259000000 1259065375 1259000000 1259065375
+3780000000 3780196294 1260000000 1260065431 1260000000 1260065431
+3783000000 3783196414 1261000000 1261065471 1261000000 1261065471
+3786000000 3786196341 1262000000 1262065447 1262000000 1262065447
+3789000000 3789196664 1263000000 1263065554 1263000000 1263065554
+3792000000 3792196917 1264000000 1264065639 1264000000 1264065639
+3795000000 3795197027 1265000000 1265065675 1265000000 1265065675
+3798000000 3798197206 1266000000 1266065735 1266000000 1266065735
+3801000000 3801197254 1267000000 1267065751 1267000000 1267065751
+3804000000 3804197508 1268000000 1268065836 1268000000 1268065836
+3807000000 3807197627 1269000000 1269065875 1269000000 1269065875
+3810000000 3810197798 1270000000 1270065932 1270000000 1270065932
+3813000000 3813197945 1271000000 1271065981 1271000000 1271065981
+3816000000 3816198098 1272000000 1272066032 1272000000 1272066032
+3819000000 3819198244 1273000000 1273066081 1273000000 1273066081
+3822000000 3822198388 1274000000 1274066129 1274000000 1274066129
+3825000000 3825198551 1275000000 1275066183 1275000000 1275066183
+3828000000 3828198703 1276000000 1276066234 1276000000 1276066234
+3831000000 3831198857 1277000000 1277066285 1277000000 1277066285
+3834000000 3834198977 1278000000 1278066325 1278000000 1278066325
+3837000000 3837199186 1279000000 1279066395 1279000000 1279066395
+3840000000 3840199316 1280000000 1280066438 1280000000 1280066438
+3843000000 3843199430 1281000000 1281066476 1281000000 1281066476
+3846000000 3846199591 1282000000 1282066530 1282000000 1282066530
+3849000000 3849199726 1283000000 1283066575 1283000000 1283066575
+3852000000 3852199869 1284000000 1284066623 1284000000 1284066623
+3855000000 3855199969 1285000000 1285066656 1285000000 1285066656
+3858000000 3858200203 1286000000 1286066734 1286000000 1286066734
+3861000000 3861200276 1287000000 1287066758 1287000000 1287066758
+3864000000 3864200397 1288000000 1288066799 1288000000 1288066799
+3867000000 3867200586 1289000000 1289066862 1289000000 1289066862
+3870000000 3870200740 1290000000 1290066913 1290000000 1290066913
+3873000000 3873200919 1291000000 1291066973 1291000000 1291066973
+3876000000 3876201065 1292000000 1292067021 1292000000 1292067021
+3879000000 3879201192 1293000000 1293067064 1293000000 1293067064
+3882000000 3882201366 1294000000 1294067122 1294000000 1294067122
+3885000000 3885201430 1295000000 1295067143 1295000000 1295067143
+3888000000 3888201637 1296000000 1296067212 1296000000 1296067212
+3891000000 3891201818 1297000000 1297067272 1297000000 1297067272
+3894000000 3894201967 1298000000 1298067322 1298000000 1298067322
+3897000000 3897202024 1299000000 1299067341 1299000000 1299067341
+3900000000 3900202220 1300000000 1300067406 1300000000 1300067406
+3903000000 3903202410 1301000000 1301067470 1301000000 1301067470
+3906000000 3906202555 1302000000 1302067518 1302000000 1302067518
+3909000000 3909202727 1303000000 1303067575 1303000000 1303067575
+3912000000 3912202860 1304000000 1304067620 1304000000 1304067620
+3915000000 3915202931 1305000000 1305067643 1305000000 1305067643
+3918000000 3918203157 1306000000 1306067719 1306000000 1306067719
+3921000000 3921203317 1307000000 1307067772 1307000000 1307067772
+3924000000 3924203449 1308000000 1308067816 1308000000 1308067816
+3927000000 3927203557 1309000000 1309067852 1309000000 1309067852
+3930000000 3930203768 1310000000 1310067922 1310000000 1310067922
+3933000000 3933203934 1311000000 1311067978 1311000000 1311067978
+3936000000 3936204045 1312000000 1312068015 1312000000 1312068015
+3939000000 3939204205 1313000000 1313068068 1313000000 1313068068
+3942000000 3942204317 1314000000 1314068105 1314000000 1314068105
+3945000000 3945204515 1315000000 1315068171 1315000000 1315068171
+3948000000 3948204605 1316000000 1316068201 1316000000 1316068201
+3951000000 3951204830 1317000000 1317068276 1317000000 1317068276
+3954000000 3954204962 1318000000 1318068320 1318000000 1318068320
+3957000000 3957205101 1319000000 1319068367 1319000000 1319068367
+3960000000 3960205152 1320000000 1320068384 1320000000 1320068384
+3963000000 3963205363 1321000000 1321068454 1321000000 1321068454
+3966000000 3966205572 1322000000 1322068524 1322000000 1322068524
+3969000000 3969205700 1323000000 1323068566 1323000000 1323068566
+3972000000 3972205843 1324000000 1324068614 1324000000 1324068614
+3975000000 3975206014 1325000000 1325068671 1325000000 1325068671
+3978000000 3978206111 1326000000 1326068703 1326000000 1326068703
+3981000000 3981206324 1327000000 1327068774 1327000000 1327068774
+3984000000 3984206454 1328000000 1328068818 1328000000 1328068818
+3987000000 3987206604 1329000000 1329068868 1329000000 1329068868
+3990000000 3990206764 1330000000 1330068921 1330000000 1330068921
+3993000000 3993206860 1331000000 1331068953 1331000000 1331068953
+3996000000 3996207048 1332000000 1332069016 1332000000 1332069016
+3999000000 3999207216 1333000000 1333069072 1333000000 1333069072
+4002000000 4002207352 1334000000 1334069117 1334000000 1334069117
+4005000000 4005207527 1335000000 1335069175 1335000000 1335069175
+4008000000 4008207649 1336000000 1336069216 1336000000 1336069216
+4011000000 4011207799 1337000000 1337069266 1337000000 1337069266
+4014000000 4014207947 1338000000 1338069315 1338000000 1338069315
+4017000000 4017208153 1339000000 1339069384 1339000000 1339069384
+4020000000 4020208267 1340000000 1340069422 1340000000 1340069422
+4023000000 4023208399 1341000000 1341069466 1341000000 1341069466
+4026000000 4026208573 1342000000 1342069524 1342000000 1342069524
+4029000000 4029208692 1343000000 1343069564 1343000000 1343069564
+4032000000 4032208816 1344000000 1344069605 1344000000 1344069605
+4035000000 4035209035 1345000000 1345069678 1345000000 1345069678
+4038000000 4038209171 1346000000 1346069723 1346000000 1346069723
+4041000000 4041209322 1347000000 1347069774 1347000000 1347069774
+4044000000 4044209482 1348000000 1348069827 1348000000 1348069827
+4047000000 4047209603 1349000000 1349069867 1349000000 1349069867
+4050000000 4050209684 1350000000 1350069894 1350000000 1350069894
+4053000000 4053209892 1351000000 1351069964 1351000000 1351069964
+4056000000 4056210047 1352000000 1352070015 1352000000 1352070015
+4059000000 4059210206 1353000000 1353070068 1353000000 1353070068
+4062000000 4062210358 1354000000 1354070119 1354000000 1354070119
+4065000000 4065210480 1355000000 1355070160 1355000000 1355070160
+4068000000 4068210658 1356000000 1356070219 1356000000 1356070219
+4071000000 4071210807 1357000000 1357070269 1357000000 1357070269
+4074000000 4074210935 1358000000 1358070311 1358000000 1358070311
+4077000000 4077211104 1359000000 1359070368 1359000000 1359070368
+4080000000 4080211224 1360000000 1360070408 1360000000 1360070408
+4083000000 4083211151 1361000000 1361070383 1361000000 1361070383
+4086000000 4086211474 1362000000 1362070491 1362000000 1362070491
+4089000000 4089211727 1363000000 1363070575 1363000000 1363070575
+4092000000 4092211837 1364000000 1364070612 1364000000 1364070612
+4095000000 4095212016 1365000000 1365070672 1365000000 1365070672
+4098000000 4098212064 1366000000 1366070688 1366000000 1366070688
+4101000000 4101212318 1367000000 1367070772 1367000000 1367070772
+4104000000 4104212437 1368000000 1368070812 1368000000 1368070812
+4107000000 4107212608 1369000000 1369070869 1369000000 1369070869
+4110000000 4110212755 1370000000 1370070918 1370000000 1370070918
+4113000000 4113212908 1371000000 1371070969 1371000000 1371070969
+4116000000 4116213054 1372000000 1372071018 1372000000 1372071018
+4119000000 4119213198 1373000000 1373071066 1373000000 1373071066
+4122000000 4122213361 1374000000 1374071120 1374000000 1374071120
+4125000000 4125213513 1375000000 1375071171 1375000000 1375071171
+4128000000 4128213667 1376000000 1376071222 1376000000 1376071222
+4131000000 4131213787 1377000000 1377071262 1377000000 1377071262
+4134000000 4134213996 1378000000 1378071332 1378000000 1378071332
+4137000000 4137214126 1379000000 1379071375 1379000000 1379071375
+4140000000 4140214240 1380000000 1380071413 1380000000 1380071413
+4143000000 4143214401 1381000000 1381071467 1381000000 1381071467
+4146000000 4146214536 1382000000 1382071512 1382000000 1382071512
+4149000000 4149214679 1383000000 1383071559 1383000000 1383071559
+4152000000 4152214779 1384000000 1384071593 1384000000 1384071593
+4155000000 4155215013 1385000000 1385071671 1385000000 1385071671
+4158000000 4158215086 1386000000 1386071695 1386000000 1386071695
+4161000000 4161215207 1387000000 1387071735 1387000000 1387071735
+4164000000 4164215396 1388000000 1388071798 1388000000 1388071798
+4167000000 4167215550 1389000000 1389071850 1389000000 1389071850
+4170000000 4170215729 1390000000 1390071909 1390000000 1390071909
+4173000000 4173215875 1391000000 1391071958 1391000000 1391071958
+4176000000 4176216002 1392000000 1392072000 1392000000 1392072000
+4179000000 4179216176 1393000000 1393072058 1393000000 1393072058
+4182000000 4182216240 1394000000 1394072080 1394000000 1394072080
+4185000000 4185216447 1395000000 1395072149 1395000000 1395072149
+4188000000 4188216628 1396000000 1396072209 1396000000 1396072209
+4191000000 4191216777 1397000000 1397072259 1397000000 1397072259
+4194000000 4194216834 1398000000 1398072278 1398000000 1398072278
+4197000000 4197217030 1399000000 1399072343 1399000000 1399072343
+4200000000 4200217220 1400000000 1400072406 1400000000 1400072406
+4203000000 4203217365 1401000000 1401072455 1401000000 1401072455
+4206000000 4206217537 1402000000 1402072512 1402000000 1402072512
+4209000000 4209217670 1403000000 1403072556 1403000000 1403072556
+4212000000 4212217741 1404000000 1404072580 1404000000 1404072580
+4215000000 4215217967 1405000000 1405072655 1405000000 1405072655
+4218000000 4218218127 1406000000 1406072709 1406000000 1406072709
+4221000000 4221218259 1407000000 1407072753 1407000000 1407072753
+4224000000 4224218367 1408000000 1408072789 1408000000 1408072789
+4227000000 4227218578 1409000000 1409072859 1409000000 1409072859
+4230000000 4230218744 1410000000 1410072914 1410000000 1410072914
+4233000000 4233218855 1411000000 1411072951 1411000000 1411072951
+4236000000 4236219015 1412000000 1412073005 1412000000 1412073005
+4239000000 4239219127 1413000000 1413073042 1413000000 1413073042
+4242000000 4242219325 1414000000 1414073108 1414000000 1414073108
+4245000000 4245219415 1415000000 1415073138 1415000000 1415073138
+4248000000 4248219640 1416000000 1416073213 1416000000 1416073213
+4251000000 4251219772 1417000000 1417073257 1417000000 1417073257
+4254000000 4254219911 1418000000 1418073303 1418000000 1418073303
+4257000000 4257219962 1419000000 1419073320 1419000000 1419073320
+4260000000 4260220173 1420000000 1420073391 1420000000 1420073391
+4263000000 4263220382 1421000000 1421073460 1421000000 1421073460
+4266000000 4266220510 1422000000 1422073503 1422000000 1422073503
+4269000000 4269220653 1423000000 1423073551 1423000000 1423073551
+4272000000 4272220824 1424000000 1424073608 1424000000 1424073608
+4275000000 4275220921 1425000000 1425073640 1425000000 1425073640
+4278000000 4278221134 1426000000 1426073711 1426000000 1426073711
+4281000000 4281221264 1427000000 1427073754 1427000000 1427073754
+4284000000 4284221414 1428000000 1428073804 1428000000 1428073804
+4287000000 4287221574 1429000000 1429073858 1429000000 1429073858
+4290000000 4290221670 1430000000 1430073890 1430000000 1430073890
+4293000000 4293221858 1431000000 1431073952 1431000000 1431073952
+4296000000 4296222026 1432000000 1432074008 1432000000 1432074008
+4299000000 4299222162 1433000000 1433074054 1433000000 1433074054
+4302000000 4302222337 1434000000 1434074112 1434000000 1434074112
+4305000000 4305222459 1435000000 1435074153 1435000000 1435074153
+4308000000 4308222609 1436000000 1436074203 1436000000 1436074203
+4311000000 4311222757 1437000000 1437074252 1437000000 1437074252
+4314000000 4314222963 1438000000 1438074321 1438000000 1438074321
+4317000000 4317223077 1439000000 1439074359 1439000000 1439074359
+4320000000 4320223209 1440000000 1440074403 1440000000 1440074403
+4323000000 4323223383 1441000000 1441074461 1441000000 1441074461
+4326000000 4326223502 1442000000 1442074500 1442000000 1442074500
+4329000000 4329223626 1443000000 1443074542 1443000000 1443074542
+4332000000 4332223845 1444000000 1444074615 1444000000 1444074615
+4335000000 4335223981 1445000000 1445074660 1445000000 1445074660
+4338000000 4338224132 1446000000 1446074710 1446000000 1446074710
+4341000000 4341224292 1447000000 1447074764 1447000000 1447074764
+4344000000 4344224413 1448000000 1448074804 1448000000 1448074804
+4347000000 4347224494 1449000000 1449074831 1449000000 1449074831
+4350000000 4350224702 1450000000 1450074900 1450000000 1450074900
+4353000000 4353224857 1451000000 1451074952 1451000000 1451074952
+4356000000 4356225016 1452000000 1452075005 1452000000 1452075005
+4359000000 4359225168 1453000000 1453075056 1453000000 1453075056
+4362000000 4362225290 1454000000 1454075096 1454000000 1454075096
+4365000000 4365225468 1455000000 1455075156 1455000000 1455075156
+4368000000 4368225617 1456000000 1456075205 1456000000 1456075205
+4371000000 4371225745 1457000000 1457075248 1457000000 1457075248
+4374000000 4374225914 1458000000 1458075304 1458000000 1458075304
+4377000000 4377226034 1459000000 1459075344 1459000000 1459075344
+4380000000 4380225961 1460000000 1460075320 1460000000 1460075320
+4383000000 4383226284 1461000000 1461075428 1461000000 1461075428
+4386000000 4386226537 1462000000 1462075512 1462000000 1462075512
+4389000000 4389226647 1463000000 1463075549 1463000000 1463075549
+4392000000 4392226826 1464000000 1464075608 1464000000 1464075608
+4395000000 4395226874 1465000000 1465075624 1465000000 1465075624
+4398000000 4398227128 1466000000 1466075709 1466000000 1466075709
+4401000000 4401227247 1467000000 1467075749 1467000000 1467075749
+4404000000 4404227418 1468000000 1468075806 1468000000 1468075806
+4407000000 4407227565 1469000000 1469075855 1469000000 1469075855
+4410000000 4410227718 1470000000 1470075906 1470000000 1470075906
+4413000000 4413227864 1471000000 1471075954 1471000000 1471075954
+4416000000 4416228008 1472000000 1472076002 1472000000 1472076002
+4419000000 4419228171 1473000000 1473076057 1473000000 1473076057
+4422000000 4422228323 1474000000 1474076107 1474000000 1474076107
+4425000000 4425228477 1475000000 1475076159 1475000000 1475076159
+4428000000 4428228597 1476000000 1476076199 1476000000 1476076199
+4431000000 4431228806 1477000000 1477076268 1477000000 1477076268
+4434000000 4434228936 1478000000 1478076312 1478000000 1478076312
+4437000000 4437229050 1479000000 1479076350 1479000000 1479076350
+4440000000 4440229211 1480000000 1480076403 1480000000 1480076403
+4443000000 4443229346 1481000000 1481076448 1481000000 1481076448
+4446000000 4446229489 1482000000 1482076496 1482000000 1482076496
+4449000000 4449229589 1483000000 1483076529 1483000000 1483076529
+4452000000 4452229823 1484000000 1484076607 1484000000 1484076607
+4455000000 4455229896 1485000000 1485076632 1485000000 1485076632
+4458000000 4458230017 1486000000 1486076672 1486000000 1486076672
+4461000000 4461230206 1487000000 1487076735 1487000000 1487076735
+4464000000 4464230360 1488000000 1488076786 1488000000 1488076786
+4467000000 4467230539 1489000000 1489076846 1489000000 1489076846
+4470000000 4470230685 1490000000 1490076895 1490000000 1490076895
+4473000000 4473230812 1491000000 1491076937 1491000000 1491076937
+4476000000 4476230986 1492000000 1492076995 1492000000 1492076995
+4479000000 4479231050 1493000000 1493077016 1493000000 1493077016
+4482000000 4482231257 1494000000 1494077085 1494000000 1494077085
+4485000000 4485231438 1495000000 1495077146 1495000000 1495077146
+4488000000 4488231587 1496000000 1496077195 1496000000 1496077195
+4491000000 4491231644 1497000000 1497077214 1497000000 1497077214
+4494000000 4494231840 1498000000 1498077280 1498000000 1498077280
+4497000000 4497232030 1499000000 1499077343 1499000000 1499077343
+4500000000 4500232175 1500000000 1500077391 1500000000 1500077391
+4503000000 4503232347 1501000000 1501077449 1501000000 1501077449
+4506000000 4506232480 1502000000 1502077493 1502000000 1502077493
+4509000000 4509232551 1503000000 1503077517 1503000000 1503077517
+4512000000 4512232777 1504000000 1504077592 1504000000 1504077592
+4515000000 4515232937 1505000000 1505077645 1505000000 1505077645
+4518000000 4518233069 1506000000 1506077689 1506000000 1506077689
+4521000000 4521233177 1507000000 1507077725 1507000000 1507077725
+4524000000 4524233388 1508000000 1508077796 1508000000 1508077796
+4527000000 4527233554 1509000000 1509077851 1509000000 1509077851
+4530000000 4530233665 1510000000 1510077888 1510000000 1510077888
+4533000000 4533233825 1511000000 1511077941 1511000000 1511077941
+4536000000 4536233937 1512000000 1512077979 1512000000 1512077979
+4539000000 4539234135 1513000000 1513078045 1513000000 1513078045
+4542000000 4542234225 1514000000 1514078075 1514000000 1514078075
+4545000000 4545234450 1515000000 1515078150 1515000000 1515078150
+4548000000 4548234582 1516000000 1516078194 1516000000 1516078194
+4551000000 4551234721 1517000000 1517078240 1517000000 1517078240
+4554000000 4554234772 1518000000 1518078257 1518000000 1518078257
+4557000000 4557234983 1519000000 1519078327 1519000000 1519078327
+4560000000 4560235192 1520000000 1520078397 1520000000 1520078397
+4563000000 4563235320 1521000000 1521078440 1521000000 1521078440
+4566000000 4566235463 1522000000 1522078487 1522000000 1522078487
+4569000000 4569235634 1523000000 1523078544 1523000000 1523078544
+4572000000 4572235731 1524000000 1524078577 1524000000 1524078577
+4575000000 4575235944 1525000000 1525078648 1525000000 1525078648
+4578000000 4578236074 1526000000 1526078691 1526000000 1526078691
+4581000000 4581236224 1527000000 1527078741 1527000000 1527078741
+4584000000 4584236384 1528000000 1528078794 1528000000 1528078794
+4587000000 4587236480 1529000000 1529078826 1529000000 1529078826
+4590000000 4590236668 1530000000 1530078889 1530000000 1530078889
+4593000000 4593236836 1531000000 1531078945 1531000000 1531078945
+4596000000 4596236972 1532000000 1532078990 1532000000 1532078990
+4599000000 4599237147 1533000000 1533079049 1533000000 1533079049
+4602000000 4602237269 1534000000 1534079089 1534000000 1534079089
+4605000000 4605237419 1535000000 1535079139 1535000000 1535079139
+4608000000 4608237567 1536000000 1536079189 1536000000 1536079189
+4611000000 4611237773 1537000000 1537079257 1537000000 1537079257
+4614000000 4614237887 1538000000 1538079295 1538000000 1538079295
+4617000000 4617238019 1539000000 1539079339 1539000000 1539079339
+4620000000 4620238193 1540000000 1540079397 1540000000 1540079397
+4623000000 4623238312 1541000000 1541079437 1541000000 1541079437
+4626000000 4626238436 1542000000 1542079478 1542000000 1542079478
+4629000000 4629238655 1543000000 1543079551 1543000000 1543079551
+4632000000 4632238791 1544000000 1544079597 1544000000 1544079597
+4635000000 4635238942 1545000000 1545079647 1545000000 1545079647
+4638000000 4638239102 1546000000 1546079700 1546000000 1546079700
+4641000000 4641239223 1547000000 1547079741 1547000000 1547079741
+4644000000 4644239304 1548000000 1548079768 1548000000 1548079768
+4647000000 4647239512 1549000000 1549079837 1549000000 1549079837
+4650000000 4650239667 1550000000 1550079889 1550000000 1550079889
+4653000000 4653239826 1551000000 1551079942 1551000000 1551079942
+4656000000 4656239978 1552000000 1552079992 1552000000 1552079992
+4659000000 4659240100 1553000000 1553080033 1553000000 1553080033
+4662000000 4662240278 1554000000 1554080092 1554000000 1554080092
+4665000000 4665240427 1555000000 1555080142 1555000000 1555080142
+4668000000 4668240555 1556000000 1556080185 1556000000 1556080185
+4671000000 4671240724 1557000000 1557080241 1557000000 1557080241
+4674000000 4674240844 1558000000 1558080281 1558000000 1558080281
+4677000000 4677240771 1559000000 1559080257 1559000000 1559080257
+4680000000 4680241094 1560000000 1560080364 1560000000 1560080364
+4683000000 4683241347 1561000000 1561080449 1561000000 1561080449
+4686000000 4686241457 1562000000 1562080485 1562000000 1562080485
+4689000000 4689241636 1563000000 1563080545 1563000000 1563080545
+4692000000 4692241684 1564000000 1564080561 1564000000 1564080561
+4695000000 4695241938 1565000000 1565080646 1565000000 1565080646
+4698000000 4698242057 1566000000 1566080685 1566000000 1566080685
+4701000000 4701242228 1567000000 1567080742 1567000000 1567080742
+4704000000 4704242375 1568000000 1568080791 1568000000 1568080791
+4707000000 4707242528 1569000000 1569080842 1569000000 1569080842
+4710000000 4710242674 1570000000 1570080891 1570000000 1570080891
+4713000000 4713242818 1571000000 1571080939 1571000000 1571080939
+4716000000 4716242981 1572000000 1572080993 1572000000 1572080993
+4719000000 4719243133 1573000000 1573081044 1573000000 1573081044
+4722000000 4722243287 1574000000 1574081095 1574000000 1574081095
+4725000000 4725243407 1575000000 1575081135 1575000000 1575081135
+4728000000 4728243616 1576000000 1576081205 1576000000 1576081205
+4731000000 4731243746 1577000000 1577081248 1577000000 1577081248
+4734000000 4734243860 1578000000 1578081286 1578000000 1578081286
+4737000000 4737244021 1579000000 1579081340 1579000000 1579081340
+4740000000 4740244156 1580000000 1580081385 1580000000 1580081385
+4743000000 4743244299 1581000000 1581081433 1581000000 1581081433
+4746000000 4746244399 1582000000 1582081466 1582000000 1582081466
+4749000000 4749244633 1583000000 1583081544 1583000000 1583081544
+4752000000 4752244706 1584000000 1584081568 1584000000 1584081568
+4755000000 4755244827 1585000000 1585081609 1585000000 1585081609
+4758000000 4758245016 1586000000 1586081672 1586000000 1586081672
+4761000000 4761245170 1587000000 1587081723 1587000000 1587081723
+4764000000 4764245349 1588000000 1588081783 1588000000 1588081783
+4767000000 4767245495 1589000000 1589081831 1589000000 1589081831
+4770000000 4770245622 1590000000 1590081874 1590000000 1590081874
+4773000000 4773245796 1591000000 1591081932 1591000000 1591081932
+4776000000 4776245860 1592000000 1592081953 1592000000 1592081953
+4779000000 4779246067 1593000000 1593082022 1593000000 1593082022
+4782000000 4782246248 1594000000 1594082082 1594000000 1594082082
+4785000000 4785246397 1595000000 1595082132 1595000000 1595082132
+4788000000 4788246454 1596000000 1596082151 1596000000 1596082151
+4791000000 4791246650 1597000000 1597082216 1597000000 1597082216
+4794000000 4794246840 1598000000 1598082280 1598000000 1598082280
+4797000000 4797246985 1599000000 1599082328 1599000000 1599082328
+4800000000 4800247157 1600000000 1600082385 1600000000 1600082385
+4803000000 4803247290 1601000000 1601082430 1601000000 1601082430
+4806000000 4806247361 1602000000 1602082453 1602000000 1602082453
+4809000000 4809247587 1603000000 1603082529 1603000000 1603082529
+4812000000 4812247747 1604000000 1604082582 1604000000 1604082582
+4815000000 4815247879 1605000000 1605082626 1605000000 1605082626
+4818000000 4818247987 1606000000 1606082662 1606000000 1606082662
+4821000000 4821248198 1607000000 1607082732 1607000000 1607082732
+4824000000 4824248364 1608000000 1608082788 1608000000 1608082788
+4827000000 4827248475 1609000000 1609082825 1609000000 1609082825
+4830000000 4830248635 1610000000 1610082878 1610000000 1610082878
+4833000000 4833248747 1611000000 1611082915 1611000000 1611082915
+4836000000 4836248945 1612000000 1612082981 1612000000 1612082981
+4839000000 4839249035 1613000000 1613083011 1613000000 1613083011
+4842000000 4842249260 1614000000 1614083086 1614000000 1614083086
+4845000000 4845249392 1615000000 1615083130 1615000000 1615083130
+4848000000 4848249531 1616000000 1616083177 1616000000 1616083177
+4851000000 4851249582 1617000000 1617083194 1617000000 1617083194
+4854000000 4854249793 1618000000 1618083264 1618000000 1618083264
+4857000000 4857250002 1619000000 1619083334 1619000000 1619083334
+4860000000 4860250130 1620000000 1620083376 1620000000 1620083376
+4863000000 4863250273 1621000000 1621083424 1621000000 1621083424
+4866000000 4866250444 1622000000 1622083481 1622000000 1622083481
+4869000000 4869250541 1623000000 1623083513 1623000000 1623083513
+4872000000 4872250754 1624000000 1624083584 1624000000 1624083584
+4875000000 4875250884 1625000000 1625083628 1625000000 1625083628
+4878000000 4878251034 1626000000 1626083678 1626000000 1626083678
+4881000000 4881251194 1627000000 1627083731 1627000000 1627083731
+4884000000 4884251290 1628000000 1628083763 1628000000 1628083763
+4887000000 4887251478 1629000000 1629083826 1629000000 1629083826
+4890000000 4890251646 1630000000 1630083882 1630000000 1630083882
+4893000000 4893251782 1631000000 1631083927 1631000000 1631083927
+4896000000 4896251957 1632000000 1632083985 1632000000 1632083985
+4899000000 4899252079 1633000000 1633084026 1633000000 1633084026
+4902000000 4902252229 1634000000 1634084076 1634000000 1634084076
+4905000000 4905252377 1635000000 1635084125 1635000000 1635084125
+4908000000 4908252583 1636000000 1636084194 1636000000 1636084194
+4911000000 4911252697 1637000000 1637084232 1637000000 1637084232
+4914000000 4914252829 1638000000 1638084276 1638000000 1638084276
+4917000000 4917253003 1639000000 1639084334 1639000000 1639084334
+4920000000 4920253122 1640000000 1640084374 1640000000 1640084374
+4923000000 4923253246 1641000000 1641084415 1641000000 1641084415
+4926000000 4926253465 1642000000 1642084488 1642000000 1642084488
+4929000000 4929253601 1643000000 1643084533 1643000000 1643084533
+4932000000 4932253752 1644000000 1644084584 1644000000 1644084584
+4935000000 4935253912 1645000000 1645084637 1645000000 1645084637
+4938000000 4938254033 1646000000 1646084677 1646000000 1646084677
+4941000000 4941254114 1647000000 1647084704 1647000000 1647084704
+4944000000 4944254322 1648000000 1648084774 1648000000 1648084774
+4947000000 4947254477 1649000000 1649084825 1649000000 1649084825
+4950000000 4950254636 1650000000 1650084878 1650000000 1650084878
+4953000000 4953254788 1651000000 1651084929 1651000000 1651084929
+4956000000 4956254910 1652000000 1652084970 1652000000 1652084970
+4959000000 4959255088 1653000000 1653085029 1653000000 1653085029
+4962000000 4962255237 1654000000 1654085079 1654000000 1654085079
+4965000000 4965255365 1655000000 1655085121 1655000000 1655085121
+4968000000 4968255534 1656000000 1656085178 1656000000 1656085178
+4971000000 4971255654 1657000000 1657085218 1657000000 1657085218
+4974000000 4974255581 1658000000 1658085193 1658000000 1658085193
+4977000000 4977255904 1659000000 1659085301 1659000000 1659085301
+4980000000 4980256157 1660000000 1660085385 1660000000 1660085385
+4983000000 4983256267 1661000000 1661085422 1661000000 1661085422
+4986000000 4986256446 1662000000 1662085482 1662000000 1662085482
+4989000000 4989256494 1663000000 1663085498 1663000000 1663085498
+4992000000 4992256748 1664000000 1664085582 1664000000 1664085582
+4995000000 4995256867 1665000000 1665085622 1665000000 1665085622
+4998000000 4998257038 1666000000 1666085679 1666000000 1666085679
+5001000000 5001257185 1667000000 1667085728 1667000000 1667085728
+5004000000 5004257338 1668000000 1668085779 1668000000 1668085779
+5007000000 5007257484 1669000000 1669085828 1669000000 1669085828
+5010000000 5010257628 1670000000 1670085876 1670000000 1670085876
+5013000000 5013257791 1671000000 1671085930 1671000000 1671085930
+5016000000 5016257943 1672000000 1672085981 1672000000 1672085981
+5019000000 5019258097 1673000000 1673086032 1673000000 1673086032
+5022000000 5022258217 1674000000 1674086072 1674000000 1674086072
+5025000000 5025258426 1675000000 1675086142 1675000000 1675086142
+5028000000 5028258556 1676000000 1676086185 1676000000 1676086185
+5031000000 5031258670 1677000000 1677086223 1677000000 1677086223
+5034000000 5034258831 1678000000 1678086277 1678000000 1678086277
+5037000000 5037258966 1679000000 1679086322 1679000000 1679086322
+5040000000 5040259109 1680000000 1680086369 1680000000 1680086369
+5043000000 5043259209 1681000000 1681086403 1681000000 1681086403
+5046000000 5046259443 1682000000 1682086481 1682000000 1682086481
+5049000000 5049259516 1683000000 1683086505 1683000000 1683086505
+5052000000 5052259637 1684000000 1684086545 1684000000 1684086545
+5055000000 5055259826 1685000000 1685086608 1685000000 1685086608
+5058000000 5058259980 1686000000 1686086660 1686000000 1686086660
+5061000000 5061260159 1687000000 1687086719 1687000000 1687086719
+5064000000 5064260305 1688000000 1688086768 1688000000 1688086768
+5067000000 5067260432 1689000000 1689086810 1689000000 1689086810
+5070000000 5070260606 1690000000 1690086868 1690000000 1690086868
+5073000000 5073260670 1691000000 1691086890 1691000000 1691086890
+5076000000 5076260877 1692000000 1692086959 1692000000 1692086959
+5079000000 5079261058 1693000000 1693087019 1693000000 1693087019
+5082000000 5082261207 1694000000 1694087069 1694000000 1694087069
+5085000000 5085261264 1695000000 1695087088 1695000000 1695087088
+5088000000 5088261460 1696000000 1696087153 1696000000 1696087153
+5091000000 5091261650 1697000000 1697087216 1697000000 1697087216
+5094000000 5094261795 1698000000 1698087265 1698000000 1698087265
+5097000000 5097261967 1699000000 1699087322 1699000000 1699087322
+5100000000 5100262100 1700000000 1700087366 1700000000 1700087366
+5103000000 5103262171 1701000000 1701087390 1701000000 1701087390
+5106000000 5106262397 1702000000 1702087465 1702000000 1702087465
+5109000000 5109262557 1703000000 1703087519 1703000000 1703087519
+5112000000 5112262689 1704000000 1704087563 1704000000 1704087563
+5115000000 5115262797 1705000000 1705087599 1705000000 1705087599
+5118000000 5118263008 1706000000 1706087669 1706000000 1706087669
+5121000000 5121263174 1707000000 1707087724 1707000000 1707087724
+5124000000 5124263285 1708000000 1708087761 1708000000 1708087761
+5127000000 5127263445 1709000000 1709087815 1709000000 1709087815
+5130000000 5130263557 1710000000 1710087852 1710000000 1710087852
+5133000000 5133263755 1711000000 1711087918 1711000000 1711087918
+5136000000 5136263845 1712000000 1712087948 1712000000 1712087948
+5139000000 5139264070 1713000000 1713088023 1713000000 1713088023
+5142000000 5142264202 1714000000 1714088067 1714000000 1714088067
+5145000000 5145264341 1715000000 1715088113 1715000000 1715088113
+5148000000 5148264392 1716000000 1716088130 1716000000 1716088130
+5151000000 5151264603 1717000000 1717088201 1717000000 1717088201
+5154000000 5154264812 1718000000 1718088270 1718000000 1718088270
+5157000000 5157264940 1719000000 1719088313 1719000000 1719088313
+5160000000 5160265083 1720000000 1720088361 1720000000 1720088361
+5163000000 5163265254 1721000000 1721088418 1721000000 1721088418
+5166000000 5166265351 1722000000 1722088450 1722000000 1722088450
+5169000000 5169265564 1723000000 1723088521 1723000000 1723088521
+5172000000 5172265694 1724000000 1724088564 1724000000 1724088564
+5175000000 5175265844 1725000000 1725088614 1725000000 1725088614
+5178000000 5178266004 1726000000 1726088668 1726000000 1726088668
+5181000000 5181266100 1727000000 1727088700 1727000000 1727088700
+5184000000 5184266288 1728000000 1728088762 1728000000 1728088762
+5187000000 5187266456 1729000000 1729088818 1729000000 1729088818
+5190000000 5190266592 1730000000 1730088864 1730000000 1730088864
+5193000000 5193266767 1731000000 1731088922 1731000000 1731088922
+5196000000 5196266889 1732000000 1732088963 1732000000 1732088963
+5199000000 5199267039 1733000000 1733089013 1733000000 1733089013
+5202000000 5202267187 1734000000 1734089062 1734000000 1734089062
+5205000000 5205267393 1735000000 1735089131 1735000000 1735089131
+5208000000 5208267507 1736000000 1736089169 1736000000 1736089169
+5211000000 5211267639 1737000000 1737089213 1737000000 1737089213
+5214000000 5214267813 1738000000 1738089271 1738000000 1738089271
+5217000000 5217267932 1739000000 1739089310 1739000000 1739089310
+5220000000 5220268056 1740000000 1740089352 1740000000 1740089352
+5223000000 5223268275 1741000000 1741089425 1741000000 1741089425
+5226000000 5226268411 1742000000 1742089470 1742000000 1742089470
+5229000000 5229268562 1743000000 1743089520 1743000000 1743089520
+5232000000 5232268722 1744000000 1744089574 1744000000 1744089574
+5235000000 5235268843 1745000000 1745089614 1745000000 1745089614
+5238000000 5238268924 1746000000 1746089641 1746000000 1746089641
+5241000000 5241269132 1747000000 1747089710 1747000000 1747089710
+5244000000 5244269287 1748000000 1748089762 1748000000 1748089762
+5247000000 5247269446 1749000000 1749089815 1749000000 1749089815
+5250000000 5250269598 1750000000 1750089866 1750000000 1750089866
+5253000000 5253269720 1751000000 1751089906 1751000000 1751089906
+5256000000 5256269898 1752000000 1752089966 1752000000 1752089966
+5259000000 5259270047 1753000000 1753090015 1753000000 1753090015
+5262000000 5262270175 1754000000 1754090058 1754000000 1754090058
+5265000000 5265270344 1755000000 1755090114 1755000000 1755090114
+5268000000 5268270464 1756000000 1756090154 1756000000 1756090154
+5271000000 5271270391 1757000000 1757090130 1757000000 1757090130
+5274000000 5274270714 1758000000 1758090238 1758000000 1758090238
+5277000000 5277270967 1759000000 1759090322 1759000000 1759090322
+5280000000 5280271077 1760000000 1760090359 1760000000 1760090359
+5283000000 5283271256 1761000000 1761090418 1761000000 1761090418
+5286000000 5286271304 1762000000 1762090434 1762000000 1762090434
+5289000000 5289271558 1763000000 1763090519 1763000000 1763090519
+5292000000 5292271677 1764000000 1764090559 1764000000 1764090559
+5295000000 5295271848 1765000000 1765090616 1765000000 1765090616
+5298000000 5298271995 1766000000 1766090665 1766000000 1766090665
+5301000000 5301272148 1767000000 1767090716 1767000000 1767090716
+5304000000 5304272294 1768000000 1768090764 1768000000 1768090764
+5307000000 5307272438 1769000000 1769090812 1769000000 1769090812
+5310000000 5310272601 1770000000 1770090867 1770000000 1770090867
+5313000000 5313272753 1771000000 1771090917 1771000000 1771090917
+5316000000 5316272907 1772000000 1772090969 1772000000 1772090969
+5319000000 5319273027 1773000000 1773091009 1773000000 1773091009
+5322000000 5322273236 1774000000 1774091078 1774000000 1774091078
+5325000000 5325273366 1775000000 1775091122 1775000000 1775091122
+5328000000 5328273480 1776000000 1776091160 1776000000 1776091160
+5331000000 5331273641 1777000000 1777091213 1777000000 1777091213
+5334000000 5334273776 1778000000 1778091258 1778000000 1778091258
+5337000000 5337273919 1779000000 1779091306 1779000000 1779091306
+5340000000 5340274019 1780000000 1780091339 1780000000 1780091339
+5343000000 5343274253 1781000000 1781091417 1781000000 1781091417
+5346000000 5346274326 1782000000 1782091442 1782000000 1782091442
+5349000000 5349274447 1783000000 1783091482 1783000000 1783091482
+5352000000 5352274636 1784000000 1784091545 1784000000 1784091545
+5355000000 5355274790 1785000000 1785091596 1785000000 1785091596
+5358000000 5358274969 1786000000 1786091656 1786000000 1786091656
+5361000000 5361275115 1787000000 1787091705 1787000000 1787091705
+5364000000 5364275242 1788000000 1788091747 1788000000 1788091747
+5367000000 5367275416 1789000000 1789091805 1789000000 1789091805
+5370000000 5370275480 1790000000 1790091826 1790000000 1790091826
+5373000000 5373275687 1791000000 1791091895 1791000000 1791091895
+5376000000 5376275868 1792000000 1792091956 1792000000 1792091956
+5379000000 5379276017 1793000000 1793092005 1793000000 1793092005
+5382000000 5382276074 1794000000 1794092024 1794000000 1794092024
+5385000000 5385276270 1795000000 1795092090 1795000000 1795092090
+5388000000 5388276460 1796000000 1796092153 1796000000 1796092153
+5391000000 5391276605 1797000000 1797092201 1797000000 1797092201
+5394000000 5394276777 1798000000 1798092259 1798000000 1798092259
+5397000000 5397276910 1799000000 1799092303 1799000000 1799092303
+5400000000 5400276981 1800000000 1800092327 1800000000 1800092327
+5403000000 5403277207 1801000000 1801092402 1801000000 1801092402
+5406000000 5406277367 1802000000 1802092455 1802000000 1802092455
+5409000000 5409277499 1803000000 1803092499 1803000000 1803092499
+5412000000 5412277607 1804000000 1804092535 1804000000 1804092535
+5415000000 5415277818 1805000000 1805092606 1805000000 1805092606
+5418000000 5418277984 1806000000 1806092661 1806000000 1806092661
+5421000000 5421278095 1807000000 1807092698 1807000000 1807092698
+5424000000 5424278255 1808000000 1808092751 1808000000 1808092751
+5427000000 5427278367 1809000000 1809092789 1809000000 1809092789
+5430000000 5430278565 1810000000 1810092855 1810000000 1810092855
+5433000000 5433278655 1811000000 1811092885 1811000000 1811092885
+5436000000 5436278880 1812000000 1812092960 1812000000 1812092960
+5439000000 5439279012 1813000000 1813093004 1813000000 1813093004
+5442000000 5442279151 1814000000 1814093050 1814000000 1814093050
+5445000000 5445279202 1815000000 1815093067 1815000000 1815093067
+5448000000 5448279413 1816000000 1816093137 1816000000 1816093137
+5451000000 5451279622 1817000000 1817093207 1817000000 1817093207
+5454000000 5454279750 1818000000 1818093250 1818000000 1818093250
+5457000000 5457279893 1819000000 1819093297 1819000000 1819093297
+5460000000 5460280064 1820000000 1820093354 1820000000 1820093354
+5463000000 5463280161 1821000000 1821093387 1821000000 1821093387
+5466000000 5466280374 1822000000 1822093458 1822000000 1822093458
+5469000000 5469280504 1823000000 1823093501 1823000000 1823093501
+5472000000 5472280654 1824000000 1824093551 1824000000 1824093551
+5475000000 5475280814 1825000000 1825093604 1825000000 1825093604
+5478000000 5478280910 1826000000 1826093636 1826000000 1826093636
+5481000000 5481281098 1827000000 1827093699 1827000000 1827093699
+5484000000 5484281266 1828000000 1828093755 1828000000 1828093755
+5487000000 5487281402 1829000000 1829093800 1829000000 1829093800
+5490000000 5490281577 1830000000 1830093859 1830000000 1830093859
+5493000000 5493281699 1831000000 1831093899 1831000000 1831093899
+5496000000 5496281849 1832000000 1832093949 1832000000 1832093949
+5499000000 5499281997 1833000000 1833093999 1833000000 1833093999
+5502000000 5502282203 1834000000 1834094067 1834000000 1834094067
+5505000000 5505282317 1835000000 1835094105 1835000000 1835094105
+5508000000 5508282449 1836000000 1836094149 1836000000 1836094149
+5511000000 5511282623 1837000000 1837094207 1837000000 1837094207
+5514000000 5514282742 1838000000 1838094247 1838000000 1838094247
+5517000000 5517282866 1839000000 1839094288 1839000000 1839094288
+5520000000 5520283085 1840000000 1840094361 1840000000 1840094361
+5523000000 5523283221 1841000000 1841094407 1841000000 1841094407
+5526000000 5526283372 1842000000 1842094457 1842000000 1842094457
+5529000000 5529283532 1843000000 1843094510 1843000000 1843094510
+5532000000 5532283653 1844000000 1844094551 1844000000 1844094551
+5535000000 5535283734 1845000000 1845094578 1845000000 1845094578
+5538000000 5538283942 1846000000 1846094647 1846000000 1846094647
+5541000000 5541284097 1847000000 1847094699 1847000000 1847094699
+5544000000 5544284256 1848000000 1848094752 1848000000 1848094752
+5547000000 5547284408 1849000000 1849094802 1849000000 1849094802
+5550000000 5550284530 1850000000 1850094843 1850000000 1850094843
+5553000000 5553284708 1851000000 1851094902 1851000000 1851094902
+5556000000 5556284857 1852000000 1852094952 1852000000 1852094952
+5559000000 5559284985 1853000000 1853094995 1853000000 1853094995
+5562000000 5562285154 1854000000 1854095051 1854000000 1854095051
+5565000000 5565285274 1855000000 1855095091 1855000000 1855095091
+5568000000 5568285201 1856000000 1856095067 1856000000 1856095067
+5571000000 5571285524 1857000000 1857095174 1857000000 1857095174
+5574000000 5574285777 1858000000 1858095259 1858000000 1858095259
+5577000000 5577285887 1859000000 1859095295 1859000000 1859095295
+5580000000 5580286066 1860000000 1860095355 1860000000 1860095355
+5583000000 5583286114 1861000000 1861095371 1861000000 1861095371
+5586000000 5586286368 1862000000 1862095456 1862000000 1862095456
+5589000000 5589286487 1863000000 1863095495 1863000000 1863095495
+5592000000 5592286658 1864000000 1864095552 1864000000 1864095552
+5595000000 5595286805 1865000000 1865095601 1865000000 1865095601
+5598000000 5598286958 1866000000 1866095652 1866000000 1866095652
+5601000000 5601287104 1867000000 1867095701 1867000000 1867095701
+5604000000 5604287248 1868000000 1868095749 1868000000 1868095749
+5607000000 5607287411 1869000000 1869095803 1869000000 1869095803
+5610000000 5610287563 1870000000 1870095854 1870000000 1870095854
+5613000000 5613287717 1871000000 1871095905 1871000000 1871095905
+5616000000 5616287837 1872000000 1872095945 1872000000 1872095945
+5619000000 5619288046 1873000000 1873096015 1873000000 1873096015
+5622000000 5622288176 1874000000 1874096058 1874000000 1874096058
+5625000000 5625288290 1875000000 1875096096 1875000000 1875096096
+5628000000 5628288451 1876000000 1876096150 1876000000 1876096150
+5631000000 5631288586 1877000000 1877096195 1877000000 1877096195
+5634000000 5634288729 1878000000 1878096243 1878000000 1878096243
+5637000000 5637288829 1879000000 1879096276 1879000000 1879096276
+5640000000 5640289063 1880000000 1880096354 1880000000 1880096354
+5643000000 5643289136 1881000000 1881096378 1881000000 1881096378
+5646000000 5646289257 1882000000 1882096419 1882000000 1882096419
+5649000000 5649289446 1883000000 1883096482 1883000000 1883096482
+5652000000 5652289600 1884000000 1884096533 1884000000 1884096533
+5655000000 5655289779 1885000000 1885096593 1885000000 1885096593
+5658000000 5658289925 1886000000 1886096641 1886000000 1886096641
+5661000000 5661290052 1887000000 1887096684 1887000000 1887096684
+5664000000 5664290226 1888000000 1888096742 1888000000 1888096742
+5667000000 5667290290 1889000000 1889096763 1889000000 1889096763
+5670000000 5670290497 1890000000 1890096832 1890000000 1890096832
+5673000000 5673290678 1891000000 1891096892 1891000000 1891096892
+5676000000 5676290827 1892000000 1892096942 1892000000 1892096942
+5679000000 5679290884 1893000000 1893096961 1893000000 1893096961
+5682000000 5682291080 1894000000 1894097026 1894000000 1894097026
+5685000000 5685291270 1895000000 1895097090 1895000000 1895097090
+5688000000 5688291415 1896000000 1896097138 1896000000 1896097138
+5691000000 5691291587 1897000000 1897097195 1897000000 1897097195
+5694000000 5694291720 1898000000 1898097240 1898000000 1898097240
+5697000000 5697291791 1899000000 1899097263 1899000000 1899097263
+5700000000 5700292017 1900000000 1900097339 1900000000 1900097339
+5703000000 5703292177 1901000000 1901097392 1901000000 1901097392
+5706000000 5706292309 1902000000 1902097436 1902000000 1902097436
+5709000000 5709292417 1903000000 1903097472 1903000000 1903097472
+5712000000 5712292628 1904000000 1904097542 1904000000 1904097542
+5715000000 5715292794 1905000000 1905097598 1905000000 1905097598
+5718000000 5718292905 1906000000 1906097635 1906000000 1906097635
+5721000000 5721293065 1907000000 1907097688 1907000000 1907097688
+5724000000 5724293177 1908000000 1908097725 1908000000 1908097725
+5727000000 5727293375 1909000000 1909097791 1909000000 1909097791
+5730000000 5730293465 1910000000 1910097821 1910000000 1910097821
+5733000000 5733293690 1911000000 1911097896 1911000000 1911097896
+5736000000 5736293822 1912000000 1912097940 1912000000 1912097940
+5739000000 5739293961 1913000000 1913097987 1913000000 1913097987
+5742000000 5742294012 1914000000 1914098004 1914000000 1914098004
+5745000000 5745294223 1915000000 1915098074 1915000000 1915098074
+5748000000 5748294432 1916000000 1916098144 1916000000 1916098144
+5751000000 5751294560 1917000000 1917098186 1917000000 1917098186
+5754000000 5754294703 1918000000 1918098234 1918000000 1918098234
+5757000000 5757294874 1919000000 1919098291 1919000000 1919098291
+5760000000 5760294971 1920000000 1920098323 1920000000 1920098323
+5763000000 5763295184 1921000000 1921098394 1921000000 1921098394
+5766000000 5766295314 1922000000 1922098438 1922000000 1922098438
+5769000000 5769295464 1923000000 1923098488 1923000000 1923098488
+5772000000 5772295624 1924000000 1924098541 1924000000 1924098541
+5775000000 5775295720 1925000000 1925098573 1925000000 1925098573
+5778000000 5778295908 1926000000 1926098636 1926000000 1926098636
+5781000000 5781296076 1927000000 1927098692 1927000000 1927098692
+5784000000 5784296212 1928000000 1928098737 1928000000 1928098737
+5787000000 5787296387 1929000000 1929098795 1929000000 1929098795
+5790000000 5790296509 1930000000 1930098836 1930000000 1930098836
+5793000000 5793296659 1931000000 1931098886 1931000000 1931098886
+5796000000 5796296807 1932000000 1932098935 1932000000 1932098935
+5799000000 5799297013 1933000000 1933099004 1933000000 1933099004
+5802000000 5802297127 1934000000 1934099042 1934000000 1934099042
+5805000000 5805297259 1935000000 1935099086 1935000000 1935099086
+5808000000 5808297433 1936000000 1936099144 1936000000 1936099144
+5811000000 5811297552 1937000000 1937099184 1937000000 1937099184
+5814000000 5814297676 1938000000 1938099225 1938000000 1938099225
+5817000000 5817297895 1939000000 1939099298 1939000000 1939099298
+5820000000 5820298031 1940000000 1940099343 1940000000 1940099343
+5823000000 5823298182 1941000000 1941099394 1941000000 1941099394
+5826000000 5826298342 1942000000 1942099447 1942000000 1942099447
+5829000000 5829298463 1943000000 1943099487 1943000000 1943099487
+5832000000 5832298544 1944000000 1944099514 1944000000 1944099514
+5835000000 5835298752 1945000000 1945099584 1945000000 1945099584
+5838000000 5838298907 1946000000 1946099635 1946000000 1946099635
+5841000000 5841299066 1947000000 1947099688 1947000000 1947099688
+5844000000 5844299218 1948000000 1948099739 1948000000 1948099739
+5847000000 5847299340 1949000000 1949099780 1949000000 1949099780
+5850000000 5850299518 1950000000 1950099839 1950000000 1950099839
+5853000000 5853299667 1951000000 1951099889 1951000000 1951099889
+5856000000 5856299795 1952000000 1952099931 1952000000 1952099931
+5859000000 5859299964 1953000000 1953099988 1953000000 1953099988
+5862000000 5862300084 1954000000 1954100028 1954000000 1954100028
+5865000000 5865300011 1955000000 1955100003 1955000000 1955100003
+5868000000 5868300334 1956000000 1956100111 1956000000 1956100111
+5871000000 5871300587 1957000000 1957100195 1957000000 1957100195
+5874000000 5874300697 1958000000 1958100232 1958000000 1958100232
+5877000000 5877300876 1959000000 1959100292 1959000000 1959100292
+5880000000 5880300924 1960000000 1960100308 1960000000 1960100308
+5883000000 5883301178 1961000000 1961100392 1961000000 1961100392
+5886000000 5886301297 1962000000 1962100432 1962000000 1962100432
+5889000000 5889301468 1963000000 1963100489 1963000000 1963100489
+5892000000 5892301615 1964000000 1964100538 1964000000 1964100538
+5895000000 5895301768 1965000000 1965100589 1965000000 1965100589
+5898000000 5898301914 1966000000 1966100638 1966000000 1966100638
+5901000000 5901302058 1967000000 1967100686 1967000000 1967100686
+5904000000 5904302221 1968000000 1968100740 1968000000 1968100740
+5907000000 5907302373 1969000000 1969100791 1969000000 1969100791
+5910000000 5910302527 1970000000 1970100842 1970000000 1970100842
+5913000000 5913302647 1971000000 1971100882 1971000000 1971100882
+5916000000 5916302856 1972000000 1972100952 1972000000 1972100952
+5919000000 5919302986 1973000000 1973100995 1973000000 1973100995
+5922000000 5922303100 1974000000 1974101033 1974000000 1974101033
+5925000000 5925303261 1975000000 1975101087 1975000000 1975101087
+5928000000 5928303396 1976000000 1976101132 1976000000 1976101132
+5931000000 5931303539 1977000000 1977101179 1977000000 1977101179
+5934000000 5934303639 1978000000 1978101213 1978000000 1978101213
+5937000000 5937303873 1979000000 1979101291 1979000000 1979101291
+5940000000 5940303946 1980000000 1980101315 1980000000 1980101315
+5943000000 5943304067 1981000000 1981101355 1981000000 1981101355
+5946000000 5946304256 1982000000 1982101418 1982000000 1982101418
+5949000000 5949304410 1983000000 1983101470 1983000000 1983101470
+5952000000 5952304589 1984000000 1984101529 1984000000 1984101529
+5955000000 5955304735 1985000000 1985101578 1985000000 1985101578
+5958000000 5958304862 1986000000 1986101620 1986000000 1986101620
+5961000000 5961305036 1987000000 1987101678 1987000000 1987101678
+5964000000 5964305100 1988000000 1988101700 1988000000 1988101700
+5967000000 5967305307 1989000000 1989101769 1989000000 1989101769
+5970000000 5970305488 1990000000 1990101829 1990000000 1990101829
+5973000000 5973305637 1991000000 1991101879 1991000000 1991101879
+5976000000 5976305694 1992000000 1992101898 1992000000 1992101898
+5979000000 5979305890 1993000000 1993101963 1993000000 1993101963
+5982000000 5982306080 1994000000 1994102026 1994000000 1994102026
+5985000000 5985306225 1995000000 1995102075 1995000000 1995102075
+5988000000 5988306397 1996000000 1996102132 1996000000 1996102132
+5991000000 5991306530 1997000000 1997102176 1997000000 1997102176
+5994000000 5994306601 1998000000 1998102200 1998000000 1998102200
+5997000000 5997306827 1999000000 1999102275 1999000000 1999102275
+6000000000 6000306987 2000000000 2000102329 2000000000 2000102329
+6003000000 6003307119 2001000000 2001102373 2001000000 2001102373
+6006000000 6006307227 2002000000 2002102409 2002000000 2002102409
+6009000000 6009307438 2003000000 2003102479 2003000000 2003102479
+6012000000 6012307604 2004000000 2004102534 2004000000 2004102534
+6015000000 6015307715 2005000000 2005102571 2005000000 2005102571
+6018000000 6018307875 2006000000 2006102625 2006000000 2006102625
+6021000000 6021307987 2007000000 2007102662 2007000000 2007102662
+6024000000 6024308185 2008000000 2008102728 2008000000 2008102728
+6027000000 6027308275 2009000000 2009102758 2009000000 2009102758
+6030000000 6030308500 2010000000 2010102833 2010000000 2010102833
+6033000000 6033308632 2011000000 2011102877 2011000000 2011102877
+6036000000 6036308771 2012000000 2012102923 2012000000 2012102923
+6039000000 6039308822 2013000000 2013102940 2013000000 2013102940
+6042000000 6042309033 2014000000 2014103011 2014000000 2014103011
+6045000000 6045309242 2015000000 2015103080 2015000000 2015103080
+6048000000 6048309370 2016000000 2016103123 2016000000 2016103123
+6051000000 6051309513 2017000000 2017103171 2017000000 2017103171
+6054000000 6054309684 2018000000 2018103228 2018000000 2018103228
+6057000000 6057309781 2019000000 2019103260 2019000000 2019103260
+6060000000 6060309994 2020000000 2020103331 2020000000 2020103331
+6063000000 6063310124 2021000000 2021103374 2021000000 2021103374
+6066000000 6066310274 2022000000 2022103424 2022000000 2022103424
+6069000000 6069310434 2023000000 2023103478 2023000000 2023103478
+6072000000 6072310530 2024000000 2024103510 2024000000 2024103510
+6075000000 6075310718 2025000000 2025103572 2025000000 2025103572
+6078000000 6078310886 2026000000 2026103628 2026000000 2026103628
+6081000000 6081311022 2027000000 2027103674 2027000000 2027103674
+6084000000 6084311197 2028000000 2028103732 2028000000 2028103732
+6087000000 6087311319 2029000000 2029103773 2029000000 2029103773
+6090000000 6090311469 2030000000 2030103823 2030000000 2030103823
+6093000000 6093311617 2031000000 2031103872 2031000000 2031103872
+6096000000 6096311823 2032000000 2032103941 2032000000 2032103941
+6099000000 6099311937 2033000000 2033103979 2033000000 2033103979
+6102000000 6102312069 2034000000 2034104023 2034000000 2034104023
+6105000000 6105312243 2035000000 2035104081 2035000000 2035104081
+6108000000 6108312362 2036000000 2036104120 2036000000 2036104120
+6111000000 6111312486 2037000000 2037104162 2037000000 2037104162
+6114000000 6114312705 2038000000 2038104235 2038000000 2038104235
+6117000000 6117312841 2039000000 2039104280 2039000000 2039104280
+6120000000 6120312992 2040000000 2040104330 2040000000 2040104330
+6123000000 6123313152 2041000000 2041104384 2041000000 2041104384
+6126000000 6126313273 2042000000 2042104424 2042000000 2042104424
+6129000000 6129313354 2043000000 2043104451 2043000000 2043104451
+6132000000 6132313562 2044000000 2044104520 2044000000 2044104520
+6135000000 6135313717 2045000000 2045104572 2045000000 2045104572
+6138000000 6138313876 2046000000 2046104625 2046000000 2046104625
+6141000000 6141314028 2047000000 2047104676 2047000000 2047104676
+6144000000 6144314150 2048000000 2048104716 2048000000 2048104716
+6147000000 6147314328 2049000000 2049104776 2049000000 2049104776
+6150000000 6150314477 2050000000 2050104825 2050000000 2050104825
+6153000000 6153314605 2051000000 2051104868 2051000000 2051104868
+6156000000 6156314774 2052000000 2052104924 2052000000 2052104924
+6159000000 6159314894 2053000000 2053104964 2053000000 2053104964
+6162000000 6162314821 2054000000 2054104940 2054000000 2054104940
+6165000000 6165315144 2055000000 2055105048 2055000000 2055105048
+6168000000 6168315397 2056000000 2056105132 2056000000 2056105132
+6171000000 6171315507 2057000000 2057105169 2057000000 2057105169
+6174000000 6174315686 2058000000 2058105228 2058000000 2058105228
+6177000000 6177315734 2059000000 2059105244 2059000000 2059105244
+6180000000 6180315988 2060000000 2060105329 2060000000 2060105329
+6183000000 6183316107 2061000000 2061105369 2061000000 2061105369
+6186000000 6186316278 2062000000 2062105426 2062000000 2062105426
+6189000000 6189316425 2063000000 2063105475 2063000000 2063105475
+6192000000 6192316578 2064000000 2064105526 2064000000 2064105526
+6195000000 6195316724 2065000000 2065105574 2065000000 2065105574
+6198000000 6198316868 2066000000 2066105622 2066000000 2066105622
+6201000000 6201317031 2067000000 2067105677 2067000000 2067105677
+6204000000 6204317183 2068000000 2068105727 2068000000 2068105727
+6207000000 6207317337 2069000000 2069105779 2069000000 2069105779
+6210000000 6210317457 2070000000 2070105819 2070000000 2070105819
+6213000000 6213317666 2071000000 2071105888 2071000000 2071105888
+6216000000 6216317796 2072000000 2072105932 2072000000 2072105932
+6219000000 6219317910 2073000000 2073105970 2073000000 2073105970
+6222000000 6222318071 2074000000 2074106023 2074000000 2074106023
+6225000000 6225318206 2075000000 2075106068 2075000000 2075106068
+6228000000 6228318349 2076000000 2076106116 2076000000 2076106116
+6231000000 6231318449 2077000000 2077106149 2077000000 2077106149
+6234000000 6234318683 2078000000 2078106227 2078000000 2078106227
+6237000000 6237318756 2079000000 2079106252 2079000000 2079106252
+6240000000 6240318877 2080000000 2080106292 2080000000 2080106292
+6243000000 6243319066 2081000000 2081106355 2081000000 2081106355
+6246000000 6246319220 2082000000 2082106406 2082000000 2082106406
+6249000000 6249319399 2083000000 2083106466 2083000000 2083106466
+6252000000 6252319545 2084000000 2084106515 2084000000 2084106515
+6255000000 6255319672 2085000000 2085106557 2085000000 2085106557
+6258000000 6258319846 2086000000 2086106615 2086000000 2086106615
+6261000000 6261319910 2087000000 2087106636 2087000000 2087106636
+6264000000 6264320117 2088000000 2088106705 2088000000 2088106705
+6267000000 6267320298 2089000000 2089106766 2089000000 2089106766
+6270000000 6270320447 2090000000 2090106815 2090000000 2090106815
+6273000000 6273320504 2091000000 2091106834 2091000000 2091106834
+6276000000 6276320700 2092000000 2092106900 2092000000 2092106900
+6279000000 6279320890 2093000000 2093106963 2093000000 2093106963
+6282000000 6282321035 2094000000 2094107011 2094000000 2094107011
+6285000000 6285321207 2095000000 2095107069 2095000000 2095107069
+6288000000 6288321340 2096000000 2096107113 2096000000 2096107113
+6291000000 6291321411 2097000000 2097107137 2097000000 2097107137
+6294000000 6294321637 2098000000 2098107212 2098000000 2098107212
+6297000000 6297321797 2099000000 2099107265 2099000000 2099107265
+6300000000 6300321929 2100000000 2100107309 2100000000 2100107309
+6303000000 6303322037 2101000000 2101107345 2101000000 2101107345
+6306000000 6306322248 2102000000 2102107416 2102000000 2102107416
+6309000000 6309322414 2103000000 2103107471 2103000000 2103107471
+6312000000 6312322525 2104000000 2104107508 2104000000 2104107508
+6315000000 6315322685 2105000000 2105107561 2105000000 2105107561
+6318000000 6318322797 2106000000 2106107599 2106000000 2106107599
+6321000000 6321322995 2107000000 2107107665 2107000000 2107107665
+6324000000 6324323085 2108000000 2108107695 2108000000 2108107695
+6327000000 6327323310 2109000000 2109107770 2109000000 2109107770
+6330000000 6330323442 2110000000 2110107814 2110000000 2110107814
+6333000000 6333323581 2111000000 2111107860 2111000000 2111107860
+6336000000 6336323632 2112000000 2112107877 2112000000 2112107877
+6339000000 6339323843 2113000000 2113107947 2113000000 2113107947
+6342000000 6342324052 2114000000 2114108017 2114000000 2114108017
+6345000000 6345324180 2115000000 2115108060 2115000000 2115108060
+6348000000 6348324323 2116000000 2116108107 2116000000 2116108107
+6351000000 6351324494 2117000000 2117108164 2117000000 2117108164
+6354000000 6354324591 2118000000 2118108197 2118000000 2118108197
+6357000000 6357324804 2119000000 2119108268 2119000000 2119108268
+6360000000 6360324934 2120000000 2120108311 2120000000 2120108311
+6363000000 6363325084 2121000000 2121108361 2121000000 2121108361
+6366000000 6366325244 2122000000 2122108414 2122000000 2122108414
+6369000000 6369325340 2123000000 2123108446 2123000000 2123108446
+6372000000 6372325528 2124000000 2124108509 2124000000 2124108509
+6375000000 6375325696 2125000000 2125108565 2125000000 2125108565
+6378000000 6378325832 2126000000 2126108610 2126000000 2126108610
+6381000000 6381326007 2127000000 2127108669 2127000000 2127108669
+6384000000 6384326129 2128000000 2128108709 2128000000 2128108709
+6387000000 6387326279 2129000000 2129108759 2129000000 2129108759
+6390000000 6390326427 2130000000 2130108809 2130000000 2130108809
+6393000000 6393326633 2131000000 2131108877 2131000000 2131108877
+6396000000 6396326747 2132000000 2132108915 2132000000 2132108915
+6399000000 6399326879 2133000000 2133108959 2133000000 2133108959
+6402000000 6402327053 2134000000 2134109017 2134000000 2134109017
+6405000000 6405327172 2135000000 2135109057 2135000000 2135109057
+6408000000 6408327296 2136000000 2136109098 2136000000 2136109098
+6411000000 6411327515 2137000000 2137109171 2137000000 2137109171
+6414000000 6414327651 2138000000 2138109217 2138000000 2138109217
+6417000000 6417327802 2139000000 2139109267 2139000000 2139109267
+6420000000 6420327962 2140000000 2140109320 2140000000 2140109320
+6423000000 6423328083 2141000000 2141109361 2141000000 2141109361
+6426000000 6426328164 2142000000 2142109388 2142000000 2142109388
+6429000000 6429328372 2143000000 2143109457 2143000000 2143109457
+6432000000 6432328527 2144000000 2144109509 2144000000 2144109509
+6435000000 6435328686 2145000000 2145109562 2145000000 2145109562
+6438000000 6438328838 2146000000 2146109612 2146000000 2146109612
+6441000000 6441328960 2147000000 2147109653 2147000000 2147109653
+6444000000 6444329138 2148000000 2148109712 2148000000 2148109712
+6447000000 6447329287 2149000000 2149109762 2149000000 2149109762
+6450000000 6450329415 2150000000 2150109805 2150000000 2150109805
+6453000000 6453329584 2151000000 2151109861 2151000000 2151109861
+6456000000 6456329704 2152000000 2152109901 2152000000 2152109901
+6459000000 6459329631 2153000000 2153109877 2153000000 2153109877
+6462000000 6462329954 2154000000 2154109984 2154000000 2154109984
+6465000000 6465330207 2155000000 2155110069 2155000000 2155110069
+6468000000 6468330317 2156000000 2156110105 2156000000 2156110105
+6471000000 6471330496 2157000000 2157110165 2157000000 2157110165
+6474000000 6474330544 2158000000 2158110181 2158000000 2158110181
+6477000000 6477330798 2159000000 2159110266 2159000000 2159110266
+6480000000 6480330917 2160000000 2160110305 2160000000 2160110305
+6483000000 6483331088 2161000000 2161110362 2161000000 2161110362
+6486000000 6486331235 2162000000 2162110411 2162000000 2162110411
+6489000000 6489331388 2163000000 2163110462 2163000000 2163110462
+6492000000 6492331534 2164000000 2164110511 2164000000 2164110511
+6495000000 6495331678 2165000000 2165110559 2165000000 2165110559
+6498000000 6498331841 2166000000 2166110613 2166000000 2166110613
+6501000000 6501331993 2167000000 2167110664 2167000000 2167110664
+6504000000 6504332147 2168000000 2168110715 2168000000 2168110715
+6507000000 6507332267 2169000000 2169110755 2169000000 2169110755
+6510000000 6510332476 2170000000 2170110825 2170000000 2170110825
+6513000000 6513332606 2171000000 2171110868 2171000000 2171110868
+6516000000 6516332720 2172000000 2172110906 2172000000 2172110906
+6519000000 6519332881 2173000000 2173110960 2173000000 2173110960
+6522000000 6522333016 2174000000 2174111005 2174000000 2174111005
+6525000000 6525333159 2175000000 2175111053 2175000000 2175111053
+6528000000 6528333259 2176000000 2176111086 2176000000 2176111086
+6531000000 6531333493 2177000000 2177111164 2177000000 2177111164
+6534000000 6534333566 2178000000 2178111188 2178000000 2178111188
+6537000000 6537333687 2179000000 2179111229 2179000000 2179111229
+6540000000 6540333876 2180000000 2180111292 2180000000 2180111292
+6543000000 6543334030 2181000000 2181111343 2181000000 2181111343
+6546000000 6546334209 2182000000 2182111403 2182000000 2182111403
+6549000000 6549334355 2183000000 2183111451 2183000000 2183111451
+6552000000 6552334482 2184000000 2184111494 2184000000 2184111494
+6555000000 6555334656 2185000000 2185111552 2185000000 2185111552
+6558000000 6558334720 2186000000 2186111573 2186000000 2186111573
+6561000000 6561334927 2187000000 2187111642 2187000000 2187111642
+6564000000 6564335108 2188000000 2188111702 2188000000 2188111702
+6567000000 6567335257 2189000000 2189111752 2189000000 2189111752
+6570000000 6570335314 2190000000 2190111771 2190000000 2190111771
+6573000000 6573335510 2191000000 2191111836 2191000000 2191111836
+6576000000 6576335700 2192000000 2192111900 2192000000 2192111900
+6579000000 6579335845 2193000000 2193111948 2193000000 2193111948
+6582000000 6582336017 2194000000 2194112005 2194000000 2194112005
+6585000000 6585336150 2195000000 2195112050 2195000000 2195112050
+6588000000 6588336221 2196000000 2196112073 2196000000 2196112073
+6591000000 6591336447 2197000000 2197112149 2197000000 2197112149
+6594000000 6594336607 2198000000 2198112202 2198000000 2198112202
+6597000000 6597336739 2199000000 2199112246 2199000000 2199112246
+6600000000 6600336847 2200000000 2200112282 2200000000 2200112282
+6603000000 6603337058 2201000000 2201112352 2201000000 2201112352
+6606000000 6606337224 2202000000 2202112408 2202000000 2202112408
+6609000000 6609337335 2203000000 2203112445 2203000000 2203112445
+6612000000 6612337495 2204000000 2204112498 2204000000 2204112498
+6615000000 6615337607 2205000000 2205112535 2205000000 2205112535
+6618000000 6618337805 2206000000 2206112601 2206000000 2206112601
+6621000000 6621337895 2207000000 2207112631 2207000000 2207112631
+6624000000 6624338120 2208000000 2208112706 2208000000 2208112706
+6627000000 6627338252 2209000000 2209112750 2209000000 2209112750
+6630000000 6630338391 2210000000 2210112797 2210000000 2210112797
+6633000000 6633338442 2211000000 2211112814 2211000000 2211112814
+6636000000 6636338653 2212000000 2212112884 2212000000 2212112884
+6639000000 6639338862 2213000000 2213112954 2213000000 2213112954
+6642000000 6642338990 2214000000 2214112996 2214000000 2214112996
+6645000000 6645339133 2215000000 2215113044 2215000000 2215113044
+6648000000 6648339304 2216000000 2216113101 2216000000 2216113101
+6651000000 6651339401 2217000000 2217113133 2217000000 2217113133
+6654000000 6654339614 2218000000 2218113204 2218000000 2218113204
+6657000000 6657339744 2219000000 2219113248 2219000000 2219113248
+6660000000 6660339894 2220000000 2220113298 2220000000 2220113298
+6663000000 6663340054 2221000000 2221113351 2221000000 2221113351
+6666000000 6666340150 2222000000 2222113383 2222000000 2222113383
+6669000000 6669340338 2223000000 2223113446 2223000000 2223113446
+6672000000 6672340506 2224000000 2224113502 2224000000 2224113502
+6675000000 6675340642 2225000000 2225113547 2225000000 2225113547
+6678000000 6678340817 2226000000 2226113605 2226000000 2226113605
+6681000000 6681340939 2227000000 2227113646 2227000000 2227113646
+6684000000 6684341089 2228000000 2228113696 2228000000 2228113696
+6687000000 6687341237 2229000000 2229113745 2229000000 2229113745
+6690000000 6690341443 2230000000 2230113814 2230000000 2230113814
+6693000000 6693341557 2231000000 2231113852 2231000000 2231113852
+6696000000 6696341689 2232000000 2232113896 2232000000 2232113896
+6699000000 6699341863 2233000000 2233113954 2233000000 2233113954
+6702000000 6702341982 2234000000 2234113994 2234000000 2234113994
+6705000000 6705342106 2235000000 2235114035 2235000000 2235114035
+6708000000 6708342325 2236000000 2236114108 2236000000 2236114108
+6711000000 6711342461 2237000000 2237114153 2237000000 2237114153
+6714000000 6714342612 2238000000 2238114204 2238000000 2238114204
+6717000000 6717342772 2239000000 2239114257 2239000000 2239114257
+6720000000 6720342893 2240000000 2240114297 2240000000 2240114297
+6723000000 6723342974 2241000000 2241114324 2241000000 2241114324
+6726000000 6726343182 2242000000 2242114394 2242000000 2242114394
+6729000000 6729343337 2243000000 2243114445 2243000000 2243114445
+6732000000 6732343496 2244000000 2244114498 2244000000 2244114498
+6735000000 6735343648 2245000000 2245114549 2245000000 2245114549
+6738000000 6738343770 2246000000 2246114590 2246000000 2246114590
+6741000000 6741343948 2247000000 2247114649 2247000000 2247114649
+6744000000 6744344097 2248000000 2248114699 2248000000 2248114699
+6747000000 6747344225 2249000000 2249114741 2249000000 2249114741
+6750000000 6750344394 2250000000 2250114798 2250000000 2250114798
+6753000000 6753344514 2251000000 2251114838 2251000000 2251114838
+6756000000 6756344441 2252000000 2252114813 2252000000 2252114813
+6759000000 6759344764 2253000000 2253114921 2253000000 2253114921
+6762000000 6762345017 2254000000 2254115005 2254000000 2254115005
+6765000000 6765345127 2255000000 2255115042 2255000000 2255115042
+6768000000 6768345306 2256000000 2256115102 2256000000 2256115102
+6771000000 6771345354 2257000000 2257115118 2257000000 2257115118
+6774000000 6774345608 2258000000 2258115202 2258000000 2258115202
+6777000000 6777345727 2259000000 2259115242 2259000000 2259115242
+6780000000 6780345898 2260000000 2260115299 2260000000 2260115299
+6783000000 6783346045 2261000000 2261115348 2261000000 2261115348
+6786000000 6786346198 2262000000 2262115399 2262000000 2262115399
+6789000000 6789346344 2263000000 2263115448 2263000000 2263115448
+6792000000 6792346488 2264000000 2264115496 2264000000 2264115496
+6795000000 6795346651 2265000000 2265115550 2265000000 2265115550
+6798000000 6798346803 2266000000 2266115601 2266000000 2266115601
+6801000000 6801346957 2267000000 2267115652 2267000000 2267115652
+6804000000 6804347077 2268000000 2268115692 2268000000 2268115692
+6807000000 6807347286 2269000000 2269115762 2269000000 2269115762
+6810000000 6810347416 2270000000 2270115805 2270000000 2270115805
+6813000000 6813347530 2271000000 2271115843 2271000000 2271115843
+6816000000 6816347691 2272000000 2272115897 2272000000 2272115897
+6819000000 6819347826 2273000000 2273115942 2273000000 2273115942
+6822000000 6822347969 2274000000 2274115989 2274000000 2274115989
+6825000000 6825348069 2275000000 2275116023 2275000000 2275116023
+6828000000 6828348303 2276000000 2276116101 2276000000 2276116101
+6831000000 6831348376 2277000000 2277116125 2277000000 2277116125
+6834000000 6834348497 2278000000 2278116165 2278000000 2278116165
+6837000000 6837348686 2279000000 2279116228 2279000000 2279116228
+6840000000 6840348840 2280000000 2280116280 2280000000 2280116280
+6843000000 6843349019 2281000000 2281116339 2281000000 2281116339
+6846000000 6846349165 2282000000 2282116388 2282000000 2282116388
+6849000000 6849349292 2283000000 2283116430 2283000000 2283116430
+6852000000 6852349466 2284000000 2284116488 2284000000 2284116488
+6855000000 6855349530 2285000000 2285116510 2285000000 2285116510
+6858000000 6858349737 2286000000 2286116579 2286000000 2286116579
+6861000000 6861349918 2287000000 2287116639 2287000000 2287116639
+6864000000 6864350067 2288000000 2288116689 2288000000 2288116689
+6867000000 6867350124 2289000000 2289116708 2289000000 2289116708
+6870000000 6870350320 2290000000 2290116773 2290000000 2290116773
+6873000000 6873350510 2291000000 2291116836 2291000000 2291116836
+6876000000 6876350655 2292000000 2292116885 2292000000 2292116885
+6879000000 6879350827 2293000000 2293116942 2293000000 2293116942
+6882000000 6882350960 2294000000 2294116986 2294000000 2294116986
+6885000000 6885351031 2295000000 2295117010 2295000000 2295117010
+6888000000 6888351257 2296000000 2296117085 2296000000 2296117085
+6891000000 6891351417 2297000000 2297117139 2297000000 2297117139
+6894000000 6894351549 2298000000 2298117183 2298000000 2298117183
+6897000000 6897351657 2299000000 2299117219 2299000000 2299117219
+6900000000 6900351868 2300000000 2300117289 2300000000 2300117289
+6903000000 6903352034 2301000000 2301117344 2301000000 2301117344
+6906000000 6906352145 2302000000 2302117381 2302000000 2302117381
+6909000000 6909352305 2303000000 2303117435 2303000000 2303117435
+6912000000 6912352417 2304000000 2304117472 2304000000 2304117472
+6915000000 6915352615 2305000000 2305117538 2305000000 2305117538
+6918000000 6918352705 2306000000 2306117568 2306000000 2306117568
+6921000000 6921352930 2307000000 2307117643 2307000000 2307117643
+6924000000 6924353062 2308000000 2308117687 2308000000 2308117687
+6927000000 6927353201 2309000000 2309117733 2309000000 2309117733
+6930000000 6930353252 2310000000 2310117750 2310000000 2310117750
+6933000000 6933353463 2311000000 2311117821 2311000000 2311117821
+6936000000 6936353672 2312000000 2312117890 2312000000 2312117890
+6939000000 6939353800 2313000000 2313117933 2313000000 2313117933
+6942000000 6942353943 2314000000 2314117981 2314000000 2314117981
+6945000000 6945354114 2315000000 2315118038 2315000000 2315118038
+6948000000 6948354211 2316000000 2316118070 2316000000 2316118070
+6951000000 6951354424 2317000000 2317118141 2317000000 2317118141
+6954000000 6954354554 2318000000 2318118184 2318000000 2318118184
+6957000000 6957354704 2319000000 2319118234 2319000000 2319118234
+6960000000 6960354864 2320000000 2320118288 2320000000 2320118288
+6963000000 6963354960 2321000000 2321118320 2321000000 2321118320
+6966000000 6966355148 2322000000 2322118382 2322000000 2322118382
+6969000000 6969355316 2323000000 2323118438 2323000000 2323118438
+6972000000 6972355452 2324000000 2324118484 2324000000 2324118484
+6975000000 6975355627 2325000000 2325118542 2325000000 2325118542
+6978000000 6978355749 2326000000 2326118583 2326000000 2326118583
+6981000000 6981355899 2327000000 2327118633 2327000000 2327118633
+6984000000 6984356047 2328000000 2328118682 2328000000 2328118682
+6987000000 6987356253 2329000000 2329118751 2329000000 2329118751
+6990000000 6990356367 2330000000 2330118789 2330000000 2330118789
+6993000000 6993356499 2331000000 2331118833 2331000000 2331118833
+6996000000 6996356673 2332000000 2332118891 2332000000 2332118891
+6999000000 6999356792 2333000000 2333118930 2333000000 2333118930
+7002000000 7002356916 2334000000 2334118972 2334000000 2334118972
+7005000000 7005357135 2335000000 2335119045 2335000000 2335119045
+7008000000 7008357271 2336000000 2336119090 2336000000 2336119090
+7011000000 7011357422 2337000000 2337119140 2337000000 2337119140
+7014000000 7014357582 2338000000 2338119194 2338000000 2338119194
+7017000000 7017357703 2339000000 2339119234 2339000000 2339119234
+7020000000 7020357784 2340000000 2340119261 2340000000 2340119261
+7023000000 7023357992 2341000000 2341119330 2341000000 2341119330
+7026000000 7026358147 2342000000 2342119382 2342000000 2342119382
+7029000000 7029358306 2343000000 2343119435 2343000000 2343119435
+7032000000 7032358458 2344000000 2344119486 2344000000 2344119486
+7035000000 7035358580 2345000000 2345119526 2345000000 2345119526
+7038000000 7038358758 2346000000 2346119586 2346000000 2346119586
+7041000000 7041358907 2347000000 2347119635 2347000000 2347119635
+7044000000 7044359035 2348000000 2348119678 2348000000 2348119678
+7047000000 7047359204 2349000000 2349119734 2349000000 2349119734
+7050000000 7050359324 2350000000 2350119774 2350000000 2350119774
+7053000000 7053359251 2351000000 2351119750 2351000000 2351119750
+7056000000 7056359574 2352000000 2352119858 2352000000 2352119858
+7059000000 7059359827 2353000000 2353119942 2353000000 2353119942
+7062000000 7062359937 2354000000 2354119979 2354000000 2354119979
+7065000000 7065360116 2355000000 2355120038 2355000000 2355120038
+7068000000 7068360164 2356000000 2356120054 2356000000 2356120054
+7071000000 7071360418 2357000000 2357120139 2357000000 2357120139
+7074000000 7074360537 2358000000 2358120179 2358000000 2358120179
+7077000000 7077360708 2359000000 2359120236 2359000000 2359120236
+7080000000 7080360855 2360000000 2360120285 2360000000 2360120285
+7083000000 7083361008 2361000000 2361120336 2361000000 2361120336
+7086000000 7086361154 2362000000 2362120384 2362000000 2362120384
+7089000000 7089361298 2363000000 2363120432 2363000000 2363120432
+7092000000 7092361461 2364000000 2364120487 2364000000 2364120487
+7095000000 7095361613 2365000000 2365120537 2365000000 2365120537
+7098000000 7098361767 2366000000 2366120589 2366000000 2366120589
+7101000000 7101361887 2367000000 2367120629 2367000000 2367120629
+7104000000 7104362096 2368000000 2368120698 2368000000 2368120698
+7107000000 7107362226 2369000000 2369120742 2369000000 2369120742
+7110000000 7110362340 2370000000 2370120780 2370000000 2370120780
+7113000000 7113362501 2371000000 2371120833 2371000000 2371120833
+7116000000 7116362636 2372000000 2372120878 2372000000 2372120878
+7119000000 7119362779 2373000000 2373120926 2373000000 2373120926
+7122000000 7122362879 2374000000 2374120959 2374000000 2374120959
+7125000000 7125363113 2375000000 2375121037 2375000000 2375121037
+7128000000 7128363186 2376000000 2376121062 2376000000 2376121062
+7131000000 7131363307 2377000000 2377121102 2377000000 2377121102
+7134000000 7134363496 2378000000 2378121165 2378000000 2378121165
+7137000000 7137363650 2379000000 2379121216 2379000000 2379121216
+7140000000 7140363829 2380000000 2380121276 2380000000 2380121276
+7143000000 7143363975 2381000000 2381121325 2381000000 2381121325
+7146000000 7146364102 2382000000 2382121367 2382000000 2382121367
+7149000000 7149364276 2383000000 2383121425 2383000000 2383121425
+7152000000 7152364340 2384000000 2384121446 2384000000 2384121446
+7155000000 7155364547 2385000000 2385121515 2385000000 2385121515
+7158000000 7158364728 2386000000 2386121576 2386000000 2386121576
+7161000000 7161364877 2387000000 2387121625 2387000000 2387121625
+7164000000 7164364934 2388000000 2388121644 2388000000 2388121644
+7167000000 7167365130 2389000000 2389121710 2389000000 2389121710
+7170000000 7170365320 2390000000 2390121773 2390000000 2390121773
+7173000000 7173365465 2391000000 2391121821 2391000000 2391121821
+7176000000 7176365637 2392000000 2392121879 2392000000 2392121879
+7179000000 7179365770 2393000000 2393121923 2393000000 2393121923
+7182000000 7182365841 2394000000 2394121947 2394000000 2394121947
+7185000000 7185366067 2395000000 2395122022 2395000000 2395122022
+7188000000 7188366227 2396000000 2396122075 2396000000 2396122075
+7191000000 7191366359 2397000000 2397122119 2397000000 2397122119
+7194000000 7194366467 2398000000 2398122155 2398000000 2398122155
+7197000000 7197366678 2399000000 2399122226 2399000000 2399122226
+7200000000 7200366844 2400000000 2400122281 2400000000 2400122281
+7203000000 7203366955 2401000000 2401122318 2401000000 2401122318
+7206000000 7206367115 2402000000 2402122371 2402000000 2402122371
+7209000000 7209367227 2403000000 2403122409 2403000000 2403122409
+7212000000 7212367425 2404000000 2404122475 2404000000 2404122475
+7215000000 7215367515 2405000000 2405122505 2405000000 2405122505
+7218000000 7218367740 2406000000 2406122580 2406000000 2406122580
+7221000000 7221367872 2407000000 2407122624 2407000000 2407122624
+7224000000 7224368011 2408000000 2408122670 2408000000 2408122670
+7227000000 7227368062 2409000000 2409122687 2409000000 2409122687
+7230000000 7230368273 2410000000 2410122757 2410000000 2410122757
+7233000000 7233368482 2411000000 2411122827 2411000000 2411122827
+7236000000 7236368610 2412000000 2412122870 2412000000 2412122870
+7239000000 7239368753 2413000000 2413122917 2413000000 2413122917
+7242000000 7242368924 2414000000 2414122974 2414000000 2414122974
+7245000000 7245369021 2415000000 2415123007 2415000000 2415123007
+7248000000 7248369234 2416000000 2416123078 2416000000 2416123078
+7251000000 7251369364 2417000000 2417123121 2417000000 2417123121
+7254000000 7254369514 2418000000 2418123171 2418000000 2418123171
+7257000000 7257369674 2419000000 2419123224 2419000000 2419123224
+7260000000 7260369770 2420000000 2420123256 2420000000 2420123256
+7263000000 7263369958 2421000000 2421123319 2421000000 2421123319
+7266000000 7266370126 2422000000 2422123375 2422000000 2422123375
+7269000000 7269370262 2423000000 2423123420 2423000000 2423123420
+7272000000 7272370437 2424000000 2424123479 2424000000 2424123479
+7275000000 7275370559 2425000000 2425123519 2425000000 2425123519
+7278000000 7278370709 2426000000 2426123569 2426000000 2426123569
+7281000000 7281370857 2427000000 2427123619 2427000000 2427123619
+7284000000 7284371063 2428000000 2428123687 2428000000 2428123687
+7287000000 7287371177 2429000000 2429123725 2429000000 2429123725
+7290000000 7290371309 2430000000 2430123769 2430000000 2430123769
+7293000000 7293371483 2431000000 2431123827 2431000000 2431123827
+7296000000 7296371602 2432000000 2432123867 2432000000 2432123867
+7299000000 7299371726 2433000000 2433123908 2433000000 2433123908
+7302000000 7302371945 2434000000 2434123981 2434000000 2434123981
+7305000000 7305372081 2435000000 2435124027 2435000000 2435124027
+7308000000 7308372232 2436000000 2436124077 2436000000 2436124077
+7311000000 7311372392 2437000000 2437124130 2437000000 2437124130
+7314000000 7314372513 2438000000 2438124171 2438000000 2438124171
+7317000000 7317372594 2439000000 2439124198 2439000000 2439124198
+7320000000 7320372802 2440000000 2440124267 2440000000 2440124267
+7323000000 7323372957 2441000000 2441124319 2441000000 2441124319
+7326000000 7326373116 2442000000 2442124372 2442000000 2442124372
+7329000000 7329373268 2443000000 2443124422 2443000000 2443124422
+7332000000 7332373390 2444000000 2444124463 2444000000 2444124463
+7335000000 7335373568 2445000000 2445124522 2445000000 2445124522
+7338000000 7338373717 2446000000 2446124572 2446000000 2446124572
+7341000000 7341373845 2447000000 2447124615 2447000000 2447124615
+7344000000 7344374014 2448000000 2448124671 2448000000 2448124671
+7347000000 7347374134 2449000000 2449124711 2449000000 2449124711
+7350000000 7350374061 2450000000 2450124687 2450000000 2450124687
+7353000000 7353374384 2451000000 2451124794 2451000000 2451124794
+7356000000 7356374637 2452000000 2452124879 2452000000 2452124879
+7359000000 7359374747 2453000000 2453124915 2453000000 2453124915
+7362000000 7362374926 2454000000 2454124975 2454000000 2454124975
+7365000000 7365374974 2455000000 2455124991 2455000000 2455124991
+7368000000 7368375228 2456000000 2456125076 2456000000 2456125076
+7371000000 7371375347 2457000000 2457125115 2457000000 2457125115
+7374000000 7374375518 2458000000 2458125172 2458000000 2458125172
+7377000000 7377375665 2459000000 2459125221 2459000000 2459125221
+7380000000 7380375818 2460000000 2460125272 2460000000 2460125272
+7383000000 7383375964 2461000000 2461125321 2461000000 2461125321
+7386000000 7386376108 2462000000 2462125369 2462000000 2462125369
+7389000000 7389376271 2463000000 2463125423 2463000000 2463125423
+7392000000 7392376423 2464000000 2464125474 2464000000 2464125474
+7395000000 7395376577 2465000000 2465125525 2465000000 2465125525
+7398000000 7398376697 2466000000 2466125565 2466000000 2466125565
+7401000000 7401376906 2467000000 2467125635 2467000000 2467125635
+7404000000 7404377036 2468000000 2468125678 2468000000 2468125678
+7407000000 7407377150 2469000000 2469125716 2469000000 2469125716
+7410000000 7410377311 2470000000 2470125770 2470000000 2470125770
+7413000000 7413377446 2471000000 2471125815 2471000000 2471125815
+7416000000 7416377589 2472000000 2472125863 2472000000 2472125863
+7419000000 7419377689 2473000000 2473125896 2473000000 2473125896
+7422000000 7422377923 2474000000 2474125974 2474000000 2474125974
+7425000000 7425377996 2475000000 2475125998 2475000000 2475125998
+7428000000 7428378117 2476000000 2476126039 2476000000 2476126039
+7431000000 7431378306 2477000000 2477126102 2477000000 2477126102
+7434000000 7434378460 2478000000 2478126153 2478000000 2478126153
+7437000000 7437378639 2479000000 2479126213 2479000000 2479126213
+7440000000 7440378785 2480000000 2480126261 2480000000 2480126261
+7443000000 7443378912 2481000000 2481126304 2481000000 2481126304
+7446000000 7446379086 2482000000 2482126362 2482000000 2482126362
+7449000000 7449379150 2483000000 2483126383 2483000000 2483126383
+7452000000 7452379357 2484000000 2484126452 2484000000 2484126452
+7455000000 7455379538 2485000000 2485126512 2485000000 2485126512
+7458000000 7458379687 2486000000 2486126562 2486000000 2486126562
+7461000000 7461379744 2487000000 2487126581 2487000000 2487126581
+7464000000 7464379940 2488000000 2488126646 2488000000 2488126646
+7467000000 7467380130 2489000000 2489126710 2489000000 2489126710
+7470000000 7470380275 2490000000 2490126758 2490000000 2490126758
+7473000000 7473380447 2491000000 2491126815 2491000000 2491126815
+7476000000 7476380580 2492000000 2492126860 2492000000 2492126860
+7479000000 7479380651 2493000000 2493126883 2493000000 2493126883
+7482000000 7482380877 2494000000 2494126959 2494000000 2494126959
+7485000000 7485381037 2495000000 2495127012 2495000000 2495127012
+7488000000 7488381169 2496000000 2496127056 2496000000 2496127056
+7491000000 7491381277 2497000000 2497127092 2497000000 2497127092
+7494000000 7494381488 2498000000 2498127162 2498000000 2498127162
+7497000000 7497381654 2499000000 2499127218 2499000000 2499127218
+7500000000 7500381765 2500000000 2500127255 2500000000 2500127255
+7503000000 7503381925 2501000000 2501127308 2501000000 2501127308
+7506000000 7506382037 2502000000 2502127345 2502000000 2502127345
+7509000000 7509382235 2503000000 2503127411 2503000000 2503127411
+7512000000 7512382325 2504000000 2504127441 2504000000 2504127441
+7515000000 7515382550 2505000000 2505127516 2505000000 2505127516
+7518000000 7518382682 2506000000 2506127560 2506000000 2506127560
+7521000000 7521382821 2507000000 2507127607 2507000000 2507127607
+7524000000 7524382872 2508000000 2508127624 2508000000 2508127624
+7527000000 7527383083 2509000000 2509127694 2509000000 2509127694
+7530000000 7530383292 2510000000 2510127764 2510000000 2510127764
+7533000000 7533383420 2511000000 2511127806 2511000000 2511127806
+7536000000 7536383563 2512000000 2512127854 2512000000 2512127854
+7539000000 7539383734 2513000000 2513127911 2513000000 2513127911
+7542000000 7542383831 2514000000 2514127943 2514000000 2514127943
+7545000000 7545384044 2515000000 2515128014 2515000000 2515128014
+7548000000 7548384174 2516000000 2516128058 2516000000 2516128058
+7551000000 7551384324 2517000000 2517128108 2517000000 2517128108
+7554000000 7554384484 2518000000 2518128161 2518000000 2518128161
+7557000000 7557384580 2519000000 2519128193 2519000000 2519128193
+7560000000 7560384768 2520000000 2520128256 2520000000 2520128256
+7563000000 7563384936 2521000000 2521128312 2521000000 2521128312
+7566000000 7566385072 2522000000 2522128357 2522000000 2522128357
+7569000000 7569385247 2523000000 2523128415 2523000000 2523128415
+7572000000 7572385369 2524000000 2524128456 2524000000 2524128456
+7575000000 7575385519 2525000000 2525128506 2525000000 2525128506
+7578000000 7578385667 2526000000 2526128555 2526000000 2526128555
+7581000000 7581385873 2527000000 2527128624 2527000000 2527128624
+7584000000 7584385987 2528000000 2528128662 2528000000 2528128662
+7587000000 7587386119 2529000000 2529128706 2529000000 2529128706
+7590000000 7590386293 2530000000 2530128764 2530000000 2530128764
+7593000000 7593386412 2531000000 2531128804 2531000000 2531128804
+7596000000 7596386536 2532000000 2532128845 2532000000 2532128845
+7599000000 7599386755 2533000000 2533128918 2533000000 2533128918
+7602000000 7602386891 2534000000 2534128963 2534000000 2534128963
+7605000000 7605387042 2535000000 2535129014 2535000000 2535129014
+7608000000 7608387202 2536000000 2536129067 2536000000 2536129067
+7611000000 7611387323 2537000000 2537129107 2537000000 2537129107
+7614000000 7614387404 2538000000 2538129134 2538000000 2538129134
+7617000000 7617387612 2539000000 2539129204 2539000000 2539129204
+7620000000 7620387767 2540000000 2540129255 2540000000 2540129255
+7623000000 7623387926 2541000000 2541129308 2541000000 2541129308
+7626000000 7626388078 2542000000 2542129359 2542000000 2542129359
+7629000000 7629388200 2543000000 2543129400 2543000000 2543129400
+7632000000 7632388378 2544000000 2544129459 2544000000 2544129459
+7635000000 7635388527 2545000000 2545129509 2545000000 2545129509
+7638000000 7638388655 2546000000 2546129551 2546000000 2546129551
+7641000000 7641388824 2547000000 2547129608 2547000000 2547129608
+7644000000 7644388944 2548000000 2548129648 2548000000 2548129648
+7647000000 7647388871 2549000000 2549129623 2549000000 2549129623
+7650000000 7650389194 2550000000 2550129731 2550000000 2550129731
+7653000000 7653389447 2551000000 2551129815 2551000000 2551129815
+7656000000 7656389557 2552000000 2552129852 2552000000 2552129852
+7659000000 7659389736 2553000000 2553129912 2553000000 2553129912
+7662000000 7662389784 2554000000 2554129928 2554000000 2554129928
+7665000000 7665390038 2555000000 2555130012 2555000000 2555130012
+7668000000 7668390157 2556000000 2556130052 2556000000 2556130052
+7671000000 7671390328 2557000000 2557130109 2557000000 2557130109
+7674000000 7674390475 2558000000 2558130158 2558000000 2558130158
+7677000000 7677390628 2559000000 2559130209 2559000000 2559130209
+7680000000 7680390774 2560000000 2560130258 2560000000 2560130258
+7683000000 7683390918 2561000000 2561130306 2561000000 2561130306
+7686000000 7686391081 2562000000 2562130360 2562000000 2562130360
+7689000000 7689391233 2563000000 2563130411 2563000000 2563130411
+7692000000 7692391387 2564000000 2564130462 2564000000 2564130462
+7695000000 7695391507 2565000000 2565130502 2565000000 2565130502
+7698000000 7698391716 2566000000 2566130572 2566000000 2566130572
+7701000000 7701391846 2567000000 2567130615 2567000000 2567130615
+7704000000 7704391960 2568000000 2568130653 2568000000 2568130653
+7707000000 7707392121 2569000000 2569130707 2569000000 2569130707
+7710000000 7710392256 2570000000 2570130752 2570000000 2570130752
+7713000000 7713392399 2571000000 2571130799 2571000000 2571130799
+7716000000 7716392499 2572000000 2572130833 2572000000 2572130833
+7719000000 7719392733 2573000000 2573130911 2573000000 2573130911
+7722000000 7722392806 2574000000 2574130935 2574000000 2574130935
+7725000000 7725392927 2575000000 2575130975 2575000000 2575130975
+7728000000 7728393116 2576000000 2576131038 2576000000 2576131038
+7731000000 7731393270 2577000000 2577131090 2577000000 2577131090
+7734000000 7734393449 2578000000 2578131149 2578000000 2578131149
+7737000000 7737393595 2579000000 2579131198 2579000000 2579131198
+7740000000 7740393722 2580000000 2580131240 2580000000 2580131240
+7743000000 7743393896 2581000000 2581131298 2581000000 2581131298
+7746000000 7746393960 2582000000 2582131320 2582000000 2582131320
+7749000000 7749394167 2583000000 2583131389 2583000000 2583131389
+7752000000 7752394348 2584000000 2584131449 2584000000 2584131449
+7755000000 7755394497 2585000000 2585131499 2585000000 2585131499
+7758000000 7758394554 2586000000 2586131518 2586000000 2586131518
+7761000000 7761394750 2587000000 2587131583 2587000000 2587131583
+7764000000 7764394940 2588000000 2588131646 2588000000 2588131646
+7767000000 7767395085 2589000000 2589131695 2589000000 2589131695
+7770000000 7770395257 2590000000 2590131752 2590000000 2590131752
+7773000000 7773395390 2591000000 2591131796 2591000000 2591131796
+7776000000 7776395461 2592000000 2592131820 2592000000 2592131820
+7779000000 7779395687 2593000000 2593131895 2593000000 2593131895
+7782000000 7782395847 2594000000 2594131949 2594000000 2594131949
+7785000000 7785395979 2595000000 2595131993 2595000000 2595131993
+7788000000 7788396087 2596000000 2596132029 2596000000 2596132029
+7791000000 7791396298 2597000000 2597132099 2597000000 2597132099
+7794000000 7794396464 2598000000 2598132154 2598000000 2598132154
+7797000000 7797396575 2599000000 2599132191 2599000000 2599132191
+7800000000 7800396735 2600000000 2600132245 2600000000 2600132245
+7803000000 7803396847 2601000000 2601132282 2601000000 2601132282
+7806000000 7806397045 2602000000 2602132348 2602000000 2602132348
+7809000000 7809397135 2603000000 2603132378 2603000000 2603132378
+7812000000 7812397360 2604000000 2604132453 2604000000 2604132453
+7815000000 7815397492 2605000000 2605132497 2605000000 2605132497
+7818000000 7818397631 2606000000 2606132543 2606000000 2606132543
+7821000000 7821397682 2607000000 2607132560 2607000000 2607132560
+7824000000 7824397893 2608000000 2608132631 2608000000 2608132631
+7827000000 7827398102 2609000000 2609132700 2609000000 2609132700
+7830000000 7830398230 2610000000 2610132743 2610000000 2610132743
+7833000000 7833398373 2611000000 2611132791 2611000000 2611132791
+7836000000 7836398544 2612000000 2612132848 2612000000 2612132848
+7839000000 7839398641 2613000000 2613132880 2613000000 2613132880
+7842000000 7842398854 2614000000 2614132951 2614000000 2614132951
+7845000000 7845398984 2615000000 2615132994 2615000000 2615132994
+7848000000 7848399134 2616000000 2616133044 2616000000 2616133044
+7851000000 7851399294 2617000000 2617133098 2617000000 2617133098
+7854000000 7854399390 2618000000 2618133130 2618000000 2618133130
+7857000000 7857399578 2619000000 2619133192 2619000000 2619133192
+7860000000 7860399746 2620000000 2620133248 2620000000 2620133248
+7863000000 7863399882 2621000000 2621133294 2621000000 2621133294
+7866000000 7866400057 2622000000 2622133352 2622000000 2622133352
+7869000000 7869400179 2623000000 2623133393 2623000000 2623133393
+7872000000 7872400329 2624000000 2624133443 2624000000 2624133443
+7875000000 7875400477 2625000000 2625133492 2625000000 2625133492
+7878000000 7878400683 2626000000 2626133561 2626000000 2626133561
+7881000000 7881400797 2627000000 2627133599 2627000000 2627133599
+7884000000 7884400929 2628000000 2628133643 2628000000 2628133643
+7887000000 7887401103 2629000000 2629133701 2629000000 2629133701
+7890000000 7890401222 2630000000 2630133740 2630000000 2630133740
+7893000000 7893401346 2631000000 2631133782 2631000000 2631133782
+7896000000 7896401565 2632000000 2632133855 2632000000 2632133855
+7899000000 7899401701 2633000000 2633133900 2633000000 2633133900
+7902000000 7902401852 2634000000 2634133950 2634000000 2634133950
+7905000000 7905402012 2635000000 2635134004 2635000000 2635134004
+7908000000 7908402133 2636000000 2636134044 2636000000 2636134044
+7911000000 7911402214 2637000000 2637134071 2637000000 2637134071
+7914000000 7914402422 2638000000 2638134140 2638000000 2638134140
+7917000000 7917402577 2639000000 2639134192 2639000000 2639134192
+7920000000 7920402736 2640000000 2640134245 2640000000 2640134245
+7923000000 7923402888 2641000000 2641134296 2641000000 2641134296
+7926000000 7926403010 2642000000 2642134336 2642000000 2642134336
+7929000000 7929403188 2643000000 2643134396 2643000000 2643134396
+7932000000 7932403337 2644000000 2644134445 2644000000 2644134445
+7935000000 7935403465 2645000000 2645134488 2645000000 2645134488
+7938000000 7938403634 2646000000 2646134544 2646000000 2646134544
+7941000000 7941403754 2647000000 2647134584 2647000000 2647134584
+7944000000 7944403681 2648000000 2648134560 2648000000 2648134560
+7947000000 7947404004 2649000000 2649134668 2649000000 2649134668
+7950000000 7950404257 2650000000 2650134752 2650000000 2650134752
+7953000000 7953404367 2651000000 2651134789 2651000000 2651134789
+7956000000 7956404546 2652000000 2652134848 2652000000 2652134848
+7959000000 7959404594 2653000000 2653134864 2653000000 2653134864
+7962000000 7962404848 2654000000 2654134949 2654000000 2654134949
+7965000000 7965404967 2655000000 2655134989 2655000000 2655134989
+7968000000 7968405138 2656000000 2656135046 2656000000 2656135046
+7971000000 7971405285 2657000000 2657135095 2657000000 2657135095
+7974000000 7974405438 2658000000 2658135146 2658000000 2658135146
+7977000000 7977405584 2659000000 2659135194 2659000000 2659135194
+7980000000 7980405728 2660000000 2660135242 2660000000 2660135242
+7983000000 7983405891 2661000000 2661135297 2661000000 2661135297
+7986000000 7986406043 2662000000 2662135347 2662000000 2662135347
+7989000000 7989406197 2663000000 2663135399 2663000000 2663135399
+7992000000 7992406317 2664000000 2664135439 2664000000 2664135439
+7995000000 7995406526 2665000000 2665135508 2665000000 2665135508
+7998000000 7998406656 2666000000 2666135552 2666000000 2666135552
+8001000000 8001406770 2667000000 2667135590 2667000000 2667135590
+8004000000 8004406931 2668000000 2668135643 2668000000 2668135643
+8007000000 8007407066 2669000000 2669135688 2669000000 2669135688
+8010000000 8010407209 2670000000 2670135736 2670000000 2670135736
+8013000000 8013407309 2671000000 2671135769 2671000000 2671135769
+8016000000 8016407543 2672000000 2672135847 2672000000 2672135847
+8019000000 8019407616 2673000000 2673135872 2673000000 2673135872
+8022000000 8022407737 2674000000 2674135912 2674000000 2674135912
+8025000000 8025407926 2675000000 2675135975 2675000000 2675135975
+8028000000 8028408080 2676000000 2676136026 2676000000 2676136026
+8031000000 8031408259 2677000000 2677136086 2677000000 2677136086
+8034000000 8034408405 2678000000 2678136135 2678000000 2678136135
+8037000000 8037408532 2679000000 2679136177 2679000000 2679136177
+8040000000 8040408706 2680000000 2680136235 2680000000 2680136235
+8043000000 8043408770 2681000000 2681136256 2681000000 2681136256
+8046000000 8046408977 2682000000 2682136325 2682000000 2682136325
+8049000000 8049409158 2683000000 2683136386 2683000000 2683136386
+8052000000 8052409307 2684000000 2684136435 2684000000 2684136435
+8055000000 8055409364 2685000000 2685136454 2685000000 2685136454
+8058000000 8058409560 2686000000 2686136520 2686000000 2686136520
+8061000000 8061409750 2687000000 2687136583 2687000000 2687136583
+8064000000 8064409895 2688000000 2688136631 2688000000 2688136631
+8067000000 8067410067 2689000000 2689136689 2689000000 2689136689
+8070000000 8070410200 2690000000 2690136733 2690000000 2690136733
+8073000000 8073410271 2691000000 2691136757 2691000000 2691136757
+8076000000 8076410497 2692000000 2692136832 2692000000 2692136832
+8079000000 8079410657 2693000000 2693136885 2693000000 2693136885
+8082000000 8082410789 2694000000 2694136929 2694000000 2694136929
+8085000000 8085410897 2695000000 2695136965 2695000000 2695136965
+8088000000 8088411108 2696000000 2696137036 2696000000 2696137036
+8091000000 8091411274 2697000000 2697137091 2697000000 2697137091
+8094000000 8094411385 2698000000 2698137128 2698000000 2698137128
+8097000000 8097411545 2699000000 2699137181 2699000000 2699137181
+8100000000 8100411657 2700000000 2700137219 2700000000 2700137219
+8103000000 8103411855 2701000000 2701137285 2701000000 2701137285
+8106000000 8106411945 2702000000 2702137315 2702000000 2702137315
+8109000000 8109412170 2703000000 2703137390 2703000000 2703137390
+8112000000 8112412302 2704000000 2704137434 2704000000 2704137434
+8115000000 8115412441 2705000000 2705137480 2705000000 2705137480
+8118000000 8118412492 2706000000 2706137497 2706000000 2706137497
+8121000000 8121412703 2707000000 2707137567 2707000000 2707137567
+8124000000 8124412912 2708000000 2708137637 2708000000 2708137637
+8127000000 8127413040 2709000000 2709137680 2709000000 2709137680
+8130000000 8130413183 2710000000 2710137727 2710000000 2710137727
+8133000000 8133413354 2711000000 2711137784 2711000000 2711137784
+8136000000 8136413451 2712000000 2712137817 2712000000 2712137817
+8139000000 8139413664 2713000000 2713137888 2713000000 2713137888
+8142000000 8142413794 2714000000 2714137931 2714000000 2714137931
+8145000000 8145413944 2715000000 2715137981 2715000000 2715137981
+8148000000 8148414104 2716000000 2716138034 2716000000 2716138034
+8151000000 8151414200 2717000000 2717138066 2717000000 2717138066
+8154000000 8154414388 2718000000 2718138129 2718000000 2718138129
+8157000000 8157414556 2719000000 2719138185 2719000000 2719138185
+8160000000 8160414692 2720000000 2720138230 2720000000 2720138230
+8163000000 8163414867 2721000000 2721138289 2721000000 2721138289
+8166000000 8166414989 2722000000 2722138329 2722000000 2722138329
+8169000000 8169415139 2723000000 2723138379 2723000000 2723138379
+8172000000 8172415287 2724000000 2724138429 2724000000 2724138429
+8175000000 8175415493 2725000000 2725138497 2725000000 2725138497
+8178000000 8178415607 2726000000 2726138535 2726000000 2726138535
+8181000000 8181415739 2727000000 2727138579 2727000000 2727138579
+8184000000 8184415913 2728000000 2728138637 2728000000 2728138637
+8187000000 8187416032 2729000000 2729138677 2729000000 2729138677
+8190000000 8190416156 2730000000 2730138718 2730000000 2730138718
+8193000000 8193416375 2731000000 2731138791 2731000000 2731138791
+8196000000 8196416511 2732000000 2732138837 2732000000 2732138837
+8199000000 8199416662 2733000000 2733138887 2733000000 2733138887
+8202000000 8202416822 2734000000 2734138940 2734000000 2734138940
+8205000000 8205416943 2735000000 2735138981 2735000000 2735138981
+8208000000 8208417024 2736000000 2736139008 2736000000 2736139008
+8211000000 8211417232 2737000000 2737139077 2737000000 2737139077
+8214000000 8214417387 2738000000 2738139129 2738000000 2738139129
+8217000000 8217417546 2739000000 2739139182 2739000000 2739139182
+8220000000 8220417698 2740000000 2740139232 2740000000 2740139232
+8223000000 8223417820 2741000000 2741139273 2741000000 2741139273
+8226000000 8226417998 2742000000 2742139332 2742000000 2742139332
+8229000000 8229418147 2743000000 2743139382 2743000000 2743139382
+8232000000 8232418275 2744000000 2744139425 2744000000 2744139425
+8235000000 8235418444 2745000000 2745139481 2745000000 2745139481
+8238000000 8238418564 2746000000 2746139521 2746000000 2746139521
+8241000000 8241418491 2747000000 2747139497 2747000000 2747139497
+8244000000 8244418814 2748000000 2748139604 2748000000 2748139604
+8247000000 8247419067 2749000000 2749139689 2749000000 2749139689
+8250000000 8250419177 2750000000 2750139725 2750000000 2750139725
+8253000000 8253419356 2751000000 2751139785 2751000000 2751139785
+8256000000 8256419404 2752000000 2752139801 2752000000 2752139801
+8259000000 8259419658 2753000000 2753139886 2753000000 2753139886
+8262000000 8262419777 2754000000 2754139925 2754000000 2754139925
+8265000000 8265419948 2755000000 2755139982 2755000000 2755139982
+8268000000 8268420095 2756000000 2756140031 2756000000 2756140031
+8271000000 8271420248 2757000000 2757140082 2757000000 2757140082
+8274000000 8274420394 2758000000 2758140131 2758000000 2758140131
+8277000000 8277420538 2759000000 2759140179 2759000000 2759140179
+8280000000 8280420701 2760000000 2760140233 2760000000 2760140233
+8283000000 8283420853 2761000000 2761140284 2761000000 2761140284
+8286000000 8286421007 2762000000 2762140335 2762000000 2762140335
+8289000000 8289421127 2763000000 2763140375 2763000000 2763140375
+8292000000 8292421336 2764000000 2764140445 2764000000 2764140445
+8295000000 8295421466 2765000000 2765140488 2765000000 2765140488
+8298000000 8298421580 2766000000 2766140526 2766000000 2766140526
+8301000000 8301421741 2767000000 2767140580 2767000000 2767140580
+8304000000 8304421876 2768000000 2768140625 2768000000 2768140625
+8307000000 8307422019 2769000000 2769140673 2769000000 2769140673
+8310000000 8310422119 2770000000 2770140706 2770000000 2770140706
+8313000000 8313422353 2771000000 2771140784 2771000000 2771140784
+8316000000 8316422426 2772000000 2772140808 2772000000 2772140808
+8319000000 8319422547 2773000000 2773140849 2773000000 2773140849
+8322000000 8322422736 2774000000 2774140912 2774000000 2774140912
+8325000000 8325422890 2775000000 2775140963 2775000000 2775140963
+8328000000 8328423069 2776000000 2776141023 2776000000 2776141023
+8331000000 8331423215 2777000000 2777141071 2777000000 2777141071
+8334000000 8334423342 2778000000 2778141114 2778000000 2778141114
+8337000000 8337423516 2779000000 2779141172 2779000000 2779141172
+8340000000 8340423580 2780000000 2780141193 2780000000 2780141193
+8343000000 8343423787 2781000000 2781141262 2781000000 2781141262
+8346000000 8346423968 2782000000 2782141322 2782000000 2782141322
+8349000000 8349424117 2783000000 2783141372 2783000000 2783141372
+8352000000 8352424174 2784000000 2784141391 2784000000 2784141391
+8355000000 8355424370 2785000000 2785141456 2785000000 2785141456
+8358000000 8358424560 2786000000 2786141520 2786000000 2786141520
+8361000000 8361424705 2787000000 2787141568 2787000000 2787141568
+8364000000 8364424877 2788000000 2788141625 2788000000 2788141625
+8367000000 8367425010 2789000000 2789141670 2789000000 2789141670
+8370000000 8370425081 2790000000 2790141693 2790000000 2790141693
+8373000000 8373425307 2791000000 2791141769 2791000000 2791141769
+8376000000 8376425467 2792000000 2792141822 2792000000 2792141822
+8379000000 8379425599 2793000000 2793141866 2793000000 2793141866
+8382000000 8382425707 2794000000 2794141902 2794000000 2794141902
+8385000000 8385425918 2795000000 2795141972 2795000000 2795141972
+8388000000 8388426084 2796000000 2796142028 2796000000 2796142028
+8391000000 8391426195 2797000000 2797142065 2797000000 2797142065
+8394000000 8394426355 2798000000 2798142118 2798000000 2798142118
+8397000000 8397426467 2799000000 2799142155 2799000000 2799142155
+8400000000 8400426665 2800000000 2800142221 2800000000 2800142221
+8403000000 8403426755 2801000000 2801142251 2801000000 2801142251
+8406000000 8406426980 2802000000 2802142326 2802000000 2802142326
+8409000000 8409427112 2803000000 2803142370 2803000000 2803142370
+8412000000 8412427251 2804000000 2804142417 2804000000 2804142417
+8415000000 8415427302 2805000000 2805142434 2805000000 2805142434
+8418000000 8418427513 2806000000 2806142504 2806000000 2806142504
+8421000000 8421427722 2807000000 2807142574 2807000000 2807142574
+8424000000 8424427850 2808000000 2808142616 2808000000 2808142616
+8427000000 8427427993 2809000000 2809142664 2809000000 2809142664
+8430000000 8430428164 2810000000 2810142721 2810000000 2810142721
+8433000000 8433428261 2811000000 2811142753 2811000000 2811142753
+8436000000 8436428474 2812000000 2812142824 2812000000 2812142824
+8439000000 8439428604 2813000000 2813142868 2813000000 2813142868
+8442000000 8442428754 2814000000 2814142918 2814000000 2814142918
+8445000000 8445428914 2815000000 2815142971 2815000000 2815142971
+8448000000 8448429010 2816000000 2816143003 2816000000 2816143003
+8451000000 8451429198 2817000000 2817143066 2817000000 2817143066
+8454000000 8454429366 2818000000 2818143122 2818000000 2818143122
+8457000000 8457429502 2819000000 2819143167 2819000000 2819143167
+8460000000 8460429677 2820000000 2820143225 2820000000 2820143225
+8463000000 8463429799 2821000000 2821143266 2821000000 2821143266
+8466000000 8466429949 2822000000 2822143316 2822000000 2822143316
+8469000000 8469430097 2823000000 2823143365 2823000000 2823143365
+8472000000 8472430303 2824000000 2824143434 2824000000 2824143434
+8475000000 8475430417 2825000000 2825143472 2825000000 2825143472
+8478000000 8478430549 2826000000 2826143516 2826000000 2826143516
+8481000000 8481430723 2827000000 2827143574 2827000000 2827143574
+8484000000 8484430842 2828000000 2828143614 2828000000 2828143614
+8487000000 8487430966 2829000000 2829143655 2829000000 2829143655
+8490000000 8490431185 2830000000 2830143728 2830000000 2830143728
+8493000000 8493431321 2831000000 2831143773 2831000000 2831143773
+8496000000 8496431472 2832000000 2832143824 2832000000 2832143824
+8499000000 8499431632 2833000000 2833143877 2833000000 2833143877
+8502000000 8502431753 2834000000 2834143917 2834000000 2834143917
+8505000000 8505431834 2835000000 2835143944 2835000000 2835143944
+8508000000 8508432042 2836000000 2836144014 2836000000 2836144014
+8511000000 8511432197 2837000000 2837144065 2837000000 2837144065
+8514000000 8514432356 2838000000 2838144118 2838000000 2838144118
+8517000000 8517432508 2839000000 2839144169 2839000000 2839144169
+8520000000 8520432630 2840000000 2840144210 2840000000 2840144210
+8523000000 8523432808 2841000000 2841144269 2841000000 2841144269
+8526000000 8526432957 2842000000 2842144319 2842000000 2842144319
+8529000000 8529433085 2843000000 2843144361 2843000000 2843144361
+8532000000 8532433254 2844000000 2844144418 2844000000 2844144418
+8535000000 8535433374 2845000000 2845144458 2845000000 2845144458
+8538000000 8538433301 2846000000 2846144433 2846000000 2846144433
+8541000000 8541433624 2847000000 2847144541 2847000000 2847144541
+8544000000 8544433877 2848000000 2848144625 2848000000 2848144625
+8547000000 8547433987 2849000000 2849144662 2849000000 2849144662
+8550000000 8550434166 2850000000 2850144722 2850000000 2850144722
+8553000000 8553434214 2851000000 2851144738 2851000000 2851144738
+8556000000 8556434468 2852000000 2852144822 2852000000 2852144822
+8559000000 8559434587 2853000000 2853144862 2853000000 2853144862
+8562000000 8562434758 2854000000 2854144919 2854000000 2854144919
+8565000000 8565434905 2855000000 2855144968 2855000000 2855144968
+8568000000 8568435058 2856000000 2856145019 2856000000 2856145019
+8571000000 8571435204 2857000000 2857145068 2857000000 2857145068
+8574000000 8574435348 2858000000 2858145116 2858000000 2858145116
+8577000000 8577435511 2859000000 2859145170 2859000000 2859145170
+8580000000 8580435663 2860000000 2860145221 2860000000 2860145221
+8583000000 8583435817 2861000000 2861145272 2861000000 2861145272
+8586000000 8586435937 2862000000 2862145312 2862000000 2862145312
+8589000000 8589436146 2863000000 2863145382 2863000000 2863145382
+8592000000 8592436276 2864000000 2864145425 2864000000 2864145425
+8595000000 8595436390 2865000000 2865145463 2865000000 2865145463
+8598000000 8598436551 2866000000 2866145517 2866000000 2866145517
+8601000000 8601436686 2867000000 2867145562 2867000000 2867145562
+8604000000 8604436829 2868000000 2868145609 2868000000 2868145609
+8607000000 8607436929 2869000000 2869145643 2869000000 2869145643
+8610000000 8610437163 2870000000 2870145721 2870000000 2870145721
+8613000000 8613437236 2871000000 2871145745 2871000000 2871145745
+8616000000 8616437357 2872000000 2872145785 2872000000 2872145785
+8619000000 8619437546 2873000000 2873145848 2873000000 2873145848
+8622000000 8622437700 2874000000 2874145900 2874000000 2874145900
+8625000000 8625437879 2875000000 2875145959 2875000000 2875145959
+8628000000 8628438025 2876000000 2876146008 2876000000 2876146008
+8631000000 8631438152 2877000000 2877146050 2877000000 2877146050
+8634000000 8634438326 2878000000 2878146108 2878000000 2878146108
+8637000000 8637438390 2879000000 2879146130 2879000000 2879146130
+8640000000 8640438597 2880000000 2880146199 2880000000 2880146199
+8643000000 8643438778 2881000000 2881146259 2881000000 2881146259
+8646000000 8646438927 2882000000 2882146309 2882000000 2882146309
+8649000000 8649438984 2883000000 2883146328 2883000000 2883146328
+8652000000 8652439180 2884000000 2884146393 2884000000 2884146393
+8655000000 8655439370 2885000000 2885146456 2885000000 2885146456
+8658000000 8658439515 2886000000 2886146505 2886000000 2886146505
+8661000000 8661439687 2887000000 2887146562 2887000000 2887146562
+8664000000 8664439820 2888000000 2888146606 2888000000 2888146606
+8667000000 8667439891 2889000000 2889146630 2889000000 2889146630
+8670000000 8670440117 2890000000 2890146705 2890000000 2890146705
+8673000000 8673440277 2891000000 2891146759 2891000000 2891146759
+8676000000 8676440409 2892000000 2892146803 2892000000 2892146803
+8679000000 8679440517 2893000000 2893146839 2893000000 2893146839
+8682000000 8682440728 2894000000 2894146909 2894000000 2894146909
+8685000000 8685440894 2895000000 2895146964 2895000000 2895146964
+8688000000 8688441005 2896000000 2896147001 2896000000 2896147001
+8691000000 8691441165 2897000000 2897147055 2897000000 2897147055
+8694000000 8694441277 2898000000 2898147092 2898000000 2898147092
+8697000000 8697441475 2899000000 2899147158 2899000000 2899147158
+8700000000 8700441565 2900000000 2900147188 2900000000 2900147188
+8703000000 8703441790 2901000000 2901147263 2901000000 2901147263
+8706000000 8706441922 2902000000 2902147307 2902000000 2902147307
+8709000000 8709442061 2903000000 2903147353 2903000000 2903147353
+8712000000 8712442112 2904000000 2904147370 2904000000 2904147370
+8715000000 8715442323 2905000000 2905147441 2905000000 2905147441
+8718000000 8718442532 2906000000 2906147510 2906000000 2906147510
+8721000000 8721442660 2907000000 2907147553 2907000000 2907147553
+8724000000 8724442803 2908000000 2908147601 2908000000 2908147601
+8727000000 8727442974 2909000000 2909147658 2909000000 2909147658
+8730000000 8730443071 2910000000 2910147690 2910000000 2910147690
+8733000000 8733443284 2911000000 2911147761 2911000000 2911147761
+8736000000 8736443414 2912000000 2912147804 2912000000 2912147804
+8739000000 8739443564 2913000000 2913147854 2913000000 2913147854
+8742000000 8742443724 2914000000 2914147908 2914000000 2914147908
+8745000000 8745443820 2915000000 2915147940 2915000000 2915147940
+8748000000 8748444008 2916000000 2916148002 2916000000 2916148002
+8751000000 8751444176 2917000000 2917148058 2917000000 2917148058
+8754000000 8754444312 2918000000 2918148104 2918000000 2918148104
+8757000000 8757444487 2919000000 2919148162 2919000000 2919148162
+8760000000 8760444609 2920000000 2920148203 2920000000 2920148203
+8763000000 8763444759 2921000000 2921148253 2921000000 2921148253
+8766000000 8766444907 2922000000 2922148302 2922000000 2922148302
+8769000000 8769445113 2923000000 2923148371 2923000000 2923148371
+8772000000 8772445227 2924000000 2924148409 2924000000 2924148409
+8775000000 8775445359 2925000000 2925148453 2925000000 2925148453
+8778000000 8778445533 2926000000 2926148511 2926000000 2926148511
+8781000000 8781445652 2927000000 2927148550 2927000000 2927148550
+8784000000 8784445776 2928000000 2928148592 2928000000 2928148592
+8787000000 8787445995 2929000000 2929148665 2929000000 2929148665
+8790000000 8790446131 2930000000 2930148710 2930000000 2930148710
+8793000000 8793446282 2931000000 2931148760 2931000000 2931148760
+8796000000 8796446442 2932000000 2932148814 2932000000 2932148814
+8799000000 8799446563 2933000000 2933148854 2933000000 2933148854
+8802000000 8802446644 2934000000 2934148881 2934000000 2934148881
+8805000000 8805446852 2935000000 2935148950 2935000000 2935148950
+8808000000 8808447007 2936000000 2936149002 2936000000 2936149002
+8811000000 8811447166 2937000000 2937149055 2937000000 2937149055
+8814000000 8814447318 2938000000 2938149106 2938000000 2938149106
+8817000000 8817447440 2939000000 2939149146 2939000000 2939149146
+8820000000 8820447618 2940000000 2940149206 2940000000 2940149206
+8823000000 8823447767 2941000000 2941149255 2941000000 2941149255
+8826000000 8826447895 2942000000 2942149298 2942000000 2942149298
+8829000000 8829448064 2943000000 2943149354 2943000000 2943149354
+8832000000 8832448184 2944000000 2944149394 2944000000 2944149394
+8835000000 8835448111 2945000000 2945149370 2945000000 2945149370
+8838000000 8838448434 2946000000 2946149478 2946000000 2946149478
+8841000000 8841448687 2947000000 2947149562 2947000000 2947149562
+8844000000 8844448797 2948000000 2948149599 2948000000 2948149599
+8847000000 8847448976 2949000000 2949149658 2949000000 2949149658
+8850000000 8850449024 2950000000 2950149674 2950000000 2950149674
+8853000000 8853449278 2951000000 2951149759 2951000000 2951149759
+8856000000 8856449397 2952000000 2952149799 2952000000 2952149799
+8859000000 8859449568 2953000000 2953149856 2953000000 2953149856
+8862000000 8862449715 2954000000 2954149905 2954000000 2954149905
+8865000000 8865449868 2955000000 2955149956 2955000000 2955149956
+8868000000 8868450014 2956000000 2956150004 2956000000 2956150004
+8871000000 8871450158 2957000000 2957150052 2957000000 2957150052
+8874000000 8874450321 2958000000 2958150107 2958000000 2958150107
+8877000000 8877450473 2959000000 2959150157 2959000000 2959150157
+8880000000 8880450627 2960000000 2960150209 2960000000 2960150209
+8883000000 8883450747 2961000000 2961150249 2961000000 2961150249
+8886000000 8886450956 2962000000 2962150318 2962000000 2962150318
+8889000000 8889451086 2963000000 2963150362 2963000000 2963150362
+8892000000 8892451200 2964000000 2964150400 2964000000 2964150400
+8895000000 8895451361 2965000000 2965150453 2965000000 2965150453
+8898000000 8898451496 2966000000 2966150498 2966000000 2966150498
+8901000000 8901451639 2967000000 2967150546 2967000000 2967150546
+8904000000 8904451739 2968000000 2968150579 2968000000 2968150579
+8907000000 8907451973 2969000000 2969150657 2969000000 2969150657
+8910000000 8910452046 2970000000 2970150682 2970000000 2970150682
+8913000000 8913452167 2971000000 2971150722 2971000000 2971150722
+8916000000 8916452356 2972000000 2972150785 2972000000 2972150785
+8919000000 8919452510 2973000000 2973150836 2973000000 2973150836
+8922000000 8922452689 2974000000 2974150896 2974000000 2974150896
+8925000000 8925452835 2975000000 2975150945 2975000000 2975150945
+8928000000 8928452962 2976000000 2976150987 2976000000 2976150987
+8931000000 8931453136 2977000000 2977151045 2977000000 2977151045
+8934000000 8934453200 2978000000 2978151066 2978000000 2978151066
+8937000000 8937453407 2979000000 2979151135 2979000000 2979151135
+8940000000 8940453588 2980000000 2980151196 2980000000 2980151196
+8943000000 8943453737 2981000000 2981151245 2981000000 2981151245
+8946000000 8946453794 2982000000 2982151264 2982000000 2982151264
+8949000000 8949453990 2983000000 2983151330 2983000000 2983151330
+8952000000 8952454180 2984000000 2984151393 2984000000 2984151393
+8955000000 8955454325 2985000000 2985151441 2985000000 2985151441
+8958000000 8958454497 2986000000 2986151499 2986000000 2986151499
+8961000000 8961454630 2987000000 2987151543 2987000000 2987151543
+8964000000 8964454701 2988000000 2988151567 2988000000 2988151567
+8967000000 8967454927 2989000000 2989151642 2989000000 2989151642
+8970000000 8970455087 2990000000 2990151695 2990000000 2990151695
+8973000000 8973455219 2991000000 2991151739 2991000000 2991151739
+8976000000 8976455327 2992000000 2992151775 2992000000 2992151775
+8979000000 8979455538 2993000000 2993151846 2993000000 2993151846
+8982000000 8982455704 2994000000 2994151901 2994000000 2994151901
+8985000000 8985455815 2995000000 2995151938 2995000000 2995151938
+8988000000 8988455975 2996000000 2996151991 2996000000 2996151991
+8991000000 8991456087 2997000000 2997152029 2997000000 2997152029
+8994000000 8994456285 2998000000 2998152095 2998000000 2998152095
+8997000000 8997456375 2999000000 2999152125 2999000000 2999152125
+9000000000 9000456600 3000000000 3000152200 3000000000 3000152200
+9003000000 9003456732 3001000000 3001152244 3001000000 3001152244
+9006000000 9006456871 3002000000 3002152290 3002000000 3002152290
+9009000000 9009456922 3003000000 3003152307 3003000000 3003152307
+9012000000 9012457133 3004000000 3004152377 3004000000 3004152377
+9015000000 9015457342 3005000000 3005152447 3005000000 3005152447
+9018000000 9018457470 3006000000 3006152490 3006000000 3006152490
+9021000000 9021457613 3007000000 3007152537 3007000000 3007152537
+9024000000 9024457784 3008000000 3008152594 3008000000 3008152594
+9027000000 9027457881 3009000000 3009152627 3009000000 3009152627
+9030000000 9030458094 3010000000 3010152698 3010000000 3010152698
+9033000000 9033458224 3011000000 3011152741 3011000000 3011152741
+9036000000 9036458374 3012000000 3012152791 3012000000 3012152791
+9039000000 9039458534 3013000000 3013152844 3013000000 3013152844
+9042000000 9042458630 3014000000 3014152876 3014000000 3014152876
+9045000000 9045458818 3015000000 3015152939 3015000000 3015152939
+9048000000 9048458986 3016000000 3016152995 3016000000 3016152995
+9051000000 9051459122 3017000000 3017153040 3017000000 3017153040
+9054000000 9054459297 3018000000 3018153099 3018000000 3018153099
+9057000000 9057459419 3019000000 3019153139 3019000000 3019153139
+9060000000 9060459569 3020000000 3020153189 3020000000 3020153189
+9063000000 9063459717 3021000000 3021153239 3021000000 3021153239
+9066000000 9066459923 3022000000 3022153307 3022000000 3022153307
+9069000000 9069460037 3023000000 3023153345 3023000000 3023153345
+9072000000 9072460169 3024000000 3024153389 3024000000 3024153389
+9075000000 9075460343 3025000000 3025153447 3025000000 3025153447
+9078000000 9078460462 3026000000 3026153487 3026000000 3026153487
+9081000000 9081460586 3027000000 3027153528 3027000000 3027153528
+9084000000 9084460805 3028000000 3028153601 3028000000 3028153601
+9087000000 9087460941 3029000000 3029153647 3029000000 3029153647
+9090000000 9090461092 3030000000 3030153697 3030000000 3030153697
+9093000000 9093461252 3031000000 3031153750 3031000000 3031153750
+9096000000 9096461373 3032000000 3032153791 3032000000 3032153791
+9099000000 9099461454 3033000000 3033153818 3033000000 3033153818
+9102000000 9102461662 3034000000 3034153887 3034000000 3034153887
+9105000000 9105461817 3035000000 3035153939 3035000000 3035153939
+9108000000 9108461976 3036000000 3036153992 3036000000 3036153992
+9111000000 9111462128 3037000000 3037154042 3037000000 3037154042
+9114000000 9114462250 3038000000 3038154083 3038000000 3038154083
+9117000000 9117462428 3039000000 3039154142 3039000000 3039154142
+9120000000 9120462577 3040000000 3040154192 3040000000 3040154192
+9123000000 9123462705 3041000000 3041154235 3041000000 3041154235
+9126000000 9126462874 3042000000 3042154291 3042000000 3042154291
+9129000000 9129462994 3043000000 3043154331 3043000000 3043154331
+9132000000 9132462921 3044000000 3044154307 3044000000 3044154307
+9135000000 9135463244 3045000000 3045154414 3045000000 3045154414
+9138000000 9138463497 3046000000 3046154499 3046000000 3046154499
+9141000000 9141463607 3047000000 3047154535 3047000000 3047154535
+9144000000 9144463786 3048000000 3048154595 3048000000 3048154595
+9147000000 9147463834 3049000000 3049154611 3049000000 3049154611
+9150000000 9150464088 3050000000 3050154696 3050000000 3050154696
+9153000000 9153464207 3051000000 3051154735 3051000000 3051154735
+9156000000 9156464378 3052000000 3052154792 3052000000 3052154792
+9159000000 9159464525 3053000000 3053154841 3053000000 3053154841
+9162000000 9162464678 3054000000 3054154892 3054000000 3054154892
+9165000000 9165464824 3055000000 3055154941 3055000000 3055154941
+9168000000 9168464968 3056000000 3056154989 3056000000 3056154989
+9171000000 9171465131 3057000000 3057155043 3057000000 3057155043
+9174000000 9174465283 3058000000 3058155094 3058000000 3058155094
+9177000000 9177465437 3059000000 3059155145 3059000000 3059155145
+9180000000 9180465557 3060000000 3060155185 3060000000 3060155185
+9183000000 9183465766 3061000000 3061155255 3061000000 3061155255
+9186000000 9186465896 3062000000 3062155298 3062000000 3062155298
+9189000000 9189466010 3063000000 3063155336 3063000000 3063155336
+9192000000 9192466171 3064000000 3064155390 3064000000 3064155390
+9195000000 9195466306 3065000000 3065155435 3065000000 3065155435
+9198000000 9198466449 3066000000 3066155483 3066000000 3066155483
+9201000000 9201466549 3067000000 3067155516 3067000000 3067155516
+9204000000 9204466783 3068000000 3068155594 3068000000 3068155594
+9207000000 9207466856 3069000000 3069155618 3069000000 3069155618
+9210000000 9210466977 3070000000 3070155659 3070000000 3070155659
+9213000000 9213467166 3071000000 3071155722 3071000000 3071155722
+9216000000 9216467320 3072000000 3072155773 3072000000 3072155773
+9219000000 9219467499 3073000000 3073155833 3073000000 3073155833
+9222000000 9222467645 3074000000 3074155881 3074000000 3074155881
+9225000000 9225467772 3075000000 3075155924 3075000000 3075155924
+9228000000 9228467946 3076000000 3076155982 3076000000 3076155982
+9231000000 9231468010 3077000000 3077156003 3077000000 3077156003
+9234000000 9234468217 3078000000 3078156072 3078000000 3078156072
+9237000000 9237468398 3079000000 3079156132 3079000000 3079156132
+9240000000 9240468547 3080000000 3080156182 3080000000 3080156182
+9243000000 9243468604 3081000000 3081156201 3081000000 3081156201
+9246000000 9246468800 3082000000 3082156266 3082000000 3082156266
+9249000000 9249468990 3083000000 3083156330 3083000000 3083156330
+9252000000 9252469135 3084000000 3084156378 3084000000 3084156378
+9255000000 9255469307 3085000000 3085156435 3085000000 3085156435
+9258000000 9258469440 3086000000 3086156480 3086000000 3086156480
+9261000000 9261469511 3087000000 3087156503 3087000000 3087156503
+9264000000 9264469737 3088000000 3088156579 3088000000 3088156579
+9267000000 9267469897 3089000000 3089156632 3089000000 3089156632
+9270000000 9270470029 3090000000 3090156676 3090000000 3090156676
+9273000000 9273470137 3091000000 3091156712 3091000000 3091156712
+9276000000 9276470348 3092000000 3092156782 3092000000 3092156782
+9279000000 9279470514 3093000000 3093156838 3093000000 3093156838
+9282000000 9282470625 3094000000 3094156875 3094000000 3094156875
+9285000000 9285470785 3095000000 3095156928 3095000000 3095156928
+9288000000 9288470897 3096000000 3096156965 3096000000 3096156965
+9291000000 9291471095 3097000000 3097157031 3097000000 3097157031
+9294000000 9294471185 3098000000 3098157061 3098000000 3098157061
+9297000000 9297471410 3099000000 3099157136 3099000000 3099157136
+9300000000 9300471542 3100000000 3100157180 3100000000 3100157180
+9303000000 9303471681 3101000000 3101157227 3101000000 3101157227
+9306000000 9306471732 3102000000 3102157244 3102000000 3102157244
+9309000000 9309471943 3103000000 3103157314 3103000000 3103157314
+9312000000 9312472152 3104000000 3104157384 3104000000 3104157384
+9315000000 9315472280 3105000000 3105157426 3105000000 3105157426
+9318000000 9318472423 3106000000 3106157474 3106000000 3106157474
+9321000000 9321472594 3107000000 3107157531 3107000000 3107157531
+9324000000 9324472691 3108000000 3108157563 3108000000 3108157563
+9327000000 9327472904 3109000000 3109157634 3109000000 3109157634
+9330000000 9330473034 3110000000 3110157678 3110000000 3110157678
+9333000000 9333473184 3111000000 3111157728 3111000000 3111157728
+9336000000 9336473344 3112000000 3112157781 3112000000 3112157781
+9339000000 9339473440 3113000000 3113157813 3113000000 3113157813
+9342000000 9342473628 3114000000 3114157876 3114000000 3114157876
+9345000000 9345473796 3115000000 3115157932 3115000000 3115157932
+9348000000 9348473932 3116000000 3116157977 3116000000 3116157977
+9351000000 9351474107 3117000000 3117158035 3117000000 3117158035
+9354000000 9354474229 3118000000 3118158076 3118000000 3118158076
+9357000000 9357474379 3119000000 3119158126 3119000000 3119158126
+9360000000 9360474527 3120000000 3120158175 3120000000 3120158175
+9363000000 9363474733 3121000000 3121158244 3121000000 3121158244
+9366000000 9366474847 3122000000 3122158282 3122000000 3122158282
+9369000000 9369474979 3123000000 3123158326 3123000000 3123158326
+9372000000 9372475153 3124000000 3124158384 3124000000 3124158384
+9375000000 9375475272 3125000000 3125158424 3125000000 3125158424
+9378000000 9378475396 3126000000 3126158465 3126000000 3126158465
+9381000000 9381475615 3127000000 3127158538 3127000000 3127158538
+9384000000 9384475751 3128000000 3128158583 3128000000 3128158583
+9387000000 9387475902 3129000000 3129158634 3129000000 3129158634
+9390000000 9390476062 3130000000 3130158687 3130000000 3130158687
+9393000000 9393476183 3131000000 3131158727 3131000000 3131158727
+9396000000 9396476264 3132000000 3132158754 3132000000 3132158754
+9399000000 9399476472 3133000000 3133158824 3133000000 3133158824
+9402000000 9402476627 3134000000 3134158875 3134000000 3134158875
+9405000000 9405476786 3135000000 3135158928 3135000000 3135158928
+9408000000 9408476938 3136000000 3136158979 3136000000 3136158979
+9411000000 9411477060 3137000000 3137159020 3137000000 3137159020
+9414000000 9414477238 3138000000 3138159079 3138000000 3138159079
+9417000000 9417477387 3139000000 3139159129 3139000000 3139159129
+9420000000 9420477515 3140000000 3140159171 3140000000 3140159171
+9423000000 9423477684 3141000000 3141159228 3141000000 3141159228
+9426000000 9426477804 3142000000 3142159268 3142000000 3142159268
+9429000000 9429477731 3143000000 3143159243 3143000000 3143159243
+9432000000 9432478054 3144000000 3144159351 3144000000 3144159351
+9435000000 9435478307 3145000000 3145159435 3145000000 3145159435
+9438000000 9438478417 3146000000 3146159472 3146000000 3146159472
+9441000000 9441478596 3147000000 3147159532 3147000000 3147159532
+9444000000 9444478644 3148000000 3148159548 3148000000 3148159548
+9447000000 9447478898 3149000000 3149159632 3149000000 3149159632
+9450000000 9450479017 3150000000 3150159672 3150000000 3150159672
+9453000000 9453479188 3151000000 3151159729 3151000000 3151159729
+9456000000 9456479335 3152000000 3152159778 3152000000 3152159778
+9459000000 9459479488 3153000000 3153159829 3153000000 3153159829
+9462000000 9462479634 3154000000 3154159878 3154000000 3154159878
+9465000000 9465479778 3155000000 3155159926 3155000000 3155159926
+9468000000 9468479941 3156000000 3156159980 3156000000 3156159980
+9471000000 9471480093 3157000000 3157160031 3157000000 3157160031
+9474000000 9474480247 3158000000 3158160082 3158000000 3158160082
+9477000000 9477480367 3159000000 3159160122 3159000000 3159160122
+9480000000 9480480576 3160000000 3160160192 3160000000 3160160192
+9483000000 9483480706 3161000000 3161160235 3161000000 3161160235
+9486000000 9486480820 3162000000 3162160273 3162000000 3162160273
+9489000000 9489480981 3163000000 3163160327 3163000000 3163160327
+9492000000 9492481116 3164000000 3164160372 3164000000 3164160372
+9495000000 9495481259 3165000000 3165160419 3165000000 3165160419
+9498000000 9498481359 3166000000 3166160453 3166000000 3166160453
+9501000000 9501481593 3167000000 3167160531 3167000000 3167160531
+9504000000 9504481666 3168000000 3168160555 3168000000 3168160555
+9507000000 9507481787 3169000000 3169160595 3169000000 3169160595
+9510000000 9510481976 3170000000 3170160658 3170000000 3170160658
+9513000000 9513482130 3171000000 3171160710 3171000000 3171160710
+9516000000 9516482309 3172000000 3172160769 3172000000 3172160769
+9519000000 9519482455 3173000000 3173160818 3173000000 3173160818
+9522000000 9522482582 3174000000 3174160860 3174000000 3174160860
+9525000000 9525482756 3175000000 3175160918 3175000000 3175160918
+9528000000 9528482820 3176000000 3176160940 3176000000 3176160940
+9531000000 9531483027 3177000000 3177161009 3177000000 3177161009
+9534000000 9534483208 3178000000 3178161069 3178000000 3178161069
+9537000000 9537483357 3179000000 3179161119 3179000000 3179161119
+9540000000 9540483414 3180000000 3180161138 3180000000 3180161138
+9543000000 9543483610 3181000000 3181161203 3181000000 3181161203
+9546000000 9546483800 3182000000 3182161266 3182000000 3182161266
+9549000000 9549483945 3183000000 3183161315 3183000000 3183161315
+9552000000 9552484117 3184000000 3184161372 3184000000 3184161372
+9555000000 9555484250 3185000000 3185161416 3185000000 3185161416
+9558000000 9558484321 3186000000 3186161440 3186000000 3186161440
+9561000000 9561484547 3187000000 3187161515 3187000000 3187161515
+9564000000 9564484707 3188000000 3188161569 3188000000 3188161569
+9567000000 9567484839 3189000000 3189161613 3189000000 3189161613
+9570000000 9570484947 3190000000 3190161649 3190000000 3190161649
+9573000000 9573485158 3191000000 3191161719 3191000000 3191161719
+9576000000 9576485324 3192000000 3192161774 3192000000 3192161774
+9579000000 9579485435 3193000000 3193161811 3193000000 3193161811
+9582000000 9582485595 3194000000 3194161865 3194000000 3194161865
+9585000000 9585485707 3195000000 3195161902 3195000000 3195161902
+9588000000 9588485905 3196000000 3196161968 3196000000 3196161968
+9591000000 9591485995 3197000000 3197161998 3197000000 3197161998
+9594000000 9594486220 3198000000 3198162073 3198000000 3198162073
+9597000000 9597486352 3199000000 3199162117 3199000000 3199162117
+9600000000 9600486491 3200000000 3200162163 3200000000 3200162163
+9603000000 9603486542 3201000000 3201162180 3201000000 3201162180
+9606000000 9606486753 3202000000 3202162251 3202000000 3202162251
+9609000000 9609486962 3203000000 3203162320 3203000000 3203162320
+9612000000 9612487090 3204000000 3204162363 3204000000 3204162363
+9615000000 9615487233 3205000000 3205162411 3205000000 3205162411
+9618000000 9618487404 3206000000 3206162468 3206000000 3206162468
+9621000000 9621487501 3207000000 3207162500 3207000000 3207162500
+9624000000 9624487714 3208000000 3208162571 3208000000 3208162571
+9627000000 9627487844 3209000000 3209162614 3209000000 3209162614
+9630000000 9630487994 3210000000 3210162664 3210000000 3210162664
+9633000000 9633488154 3211000000 3211162718 3211000000 3211162718
+9636000000 9636488250 3212000000 3212162750 3212000000 3212162750
+9639000000 9639488438 3213000000 3213162812 3213000000 3213162812
+9642000000 9642488606 3214000000 3214162868 3214000000 3214162868
+9645000000 9645488742 3215000000 3215162914 3215000000 3215162914
+9648000000 9648488917 3216000000 3216162972 3216000000 3216162972
+9651000000 9651489039 3217000000 3217163013 3217000000 3217163013
+9654000000 9654489189 3218000000 3218163063 3218000000 3218163063
+9657000000 9657489337 3219000000 3219163112 3219000000 3219163112
+9660000000 9660489543 3220000000 3220163181 3220000000 3220163181
+9663000000 9663489657 3221000000 3221163219 3221000000 3221163219
+9666000000 9666489789 3222000000 3222163263 3222000000 3222163263
+9669000000 9669489963 3223000000 3223163321 3223000000 3223163321
+9672000000 9672490082 3224000000 3224163360 3224000000 3224163360
+9675000000 9675490206 3225000000 3225163402 3225000000 3225163402
+9678000000 9678490425 3226000000 3226163475 3226000000 3226163475
+9681000000 9681490561 3227000000 3227163520 3227000000 3227163520
+9684000000 9684490712 3228000000 3228163570 3228000000 3228163570
+9687000000 9687490872 3229000000 3229163624 3229000000 3229163624
+9690000000 9690490993 3230000000 3230163664 3230000000 3230163664
+9693000000 9693491074 3231000000 3231163691 3231000000 3231163691
+9696000000 9696491282 3232000000 3232163760 3232000000 3232163760
+9699000000 9699491437 3233000000 3233163812 3233000000 3233163812
+9702000000 9702491596 3234000000 3234163865 3234000000 3234163865
+9705000000 9705491748 3235000000 3235163916 3235000000 3235163916
+9708000000 9708491870 3236000000 3236163956 3236000000 3236163956
+9711000000 9711492048 3237000000 3237164016 3237000000 3237164016
+9714000000 9714492197 3238000000 3238164065 3238000000 3238164065
+9717000000 9717492325 3239000000 3239164108 3239000000 3239164108
+9720000000 9720492494 3240000000 3240164164 3240000000 3240164164
+9723000000 9723492614 3241000000 3241164204 3241000000 3241164204
+9726000000 9726492541 3242000000 3242164180 3242000000 3242164180
+9729000000 9729492864 3243000000 3243164288 3243000000 3243164288
+9732000000 9732493117 3244000000 3244164372 3244000000 3244164372
+9735000000 9735493227 3245000000 3245164409 3245000000 3245164409
+9738000000 9738493406 3246000000 3246164468 3246000000 3246164468
+9741000000 9741493454 3247000000 3247164484 3247000000 3247164484
+9744000000 9744493708 3248000000 3248164569 3248000000 3248164569
+9747000000 9747493827 3249000000 3249164609 3249000000 3249164609
+9750000000 9750493998 3250000000 3250164666 3250000000 3250164666
+9753000000 9753494145 3251000000 3251164715 3251000000 3251164715
+9756000000 9756494298 3252000000 3252164766 3252000000 3252164766
+9759000000 9759494444 3253000000 3253164814 3253000000 3253164814
+9762000000 9762494588 3254000000 3254164862 3254000000 3254164862
+9765000000 9765494751 3255000000 3255164917 3255000000 3255164917
+9768000000 9768494903 3256000000 3256164967 3256000000 3256164967
+9771000000 9771495057 3257000000 3257165019 3257000000 3257165019
+9774000000 9774495177 3258000000 3258165059 3258000000 3258165059
+9777000000 9777495386 3259000000 3259165128 3259000000 3259165128
+9780000000 9780495516 3260000000 3260165172 3260000000 3260165172
+9783000000 9783495630 3261000000 3261165210 3261000000 3261165210
+9786000000 9786495791 3262000000 3262165263 3262000000 3262165263
+9789000000 9789495926 3263000000 3263165308 3263000000 3263165308
+9792000000 9792496069 3264000000 3264165356 3264000000 3264165356
+9795000000 9795496169 3265000000 3265165389 3265000000 3265165389
+9798000000 9798496403 3266000000 3266165467 3266000000 3266165467
+9801000000 9801496476 3267000000 3267165492 3267000000 3267165492
+9804000000 9804496597 3268000000 3268165532 3268000000 3268165532
+9807000000 9807496786 3269000000 3269165595 3269000000 3269165595
+9810000000 9810496940 3270000000 3270165646 3270000000 3270165646
+9813000000 9813497119 3271000000 3271165706 3271000000 3271165706
+9816000000 9816497265 3272000000 3272165755 3272000000 3272165755
+9819000000 9819497392 3273000000 3273165797 3273000000 3273165797
+9822000000 9822497566 3274000000 3274165855 3274000000 3274165855
+9825000000 9825497630 3275000000 3275165876 3275000000 3275165876
+9828000000 9828497837 3276000000 3276165945 3276000000 3276165945
+9831000000 9831498018 3277000000 3277166006 3277000000 3277166006
+9834000000 9834498167 3278000000 3278166055 3278000000 3278166055
+9837000000 9837498224 3279000000 3279166074 3279000000 3279166074
+9840000000 9840498420 3280000000 3280166140 3280000000 3280166140
+9843000000 9843498610 3281000000 3281166203 3281000000 3281166203
+9846000000 9846498755 3282000000 3282166251 3282000000 3282166251
+9849000000 9849498927 3283000000 3283166309 3283000000 3283166309
+9852000000 9852499060 3284000000 3284166353 3284000000 3284166353
+9855000000 9855499131 3285000000 3285166377 3285000000 3285166377
+9858000000 9858499357 3286000000 3286166452 3286000000 3286166452
+9861000000 9861499517 3287000000 3287166505 3287000000 3287166505
+9864000000 9864499649 3288000000 3288166549 3288000000 3288166549
+9867000000 9867499757 3289000000 3289166585 3289000000 3289166585
+9870000000 9870499968 3290000000 3290166656 3290000000 3290166656
+9873000000 9873500134 3291000000 3291166711 3291000000 3291166711
+9876000000 9876500245 3292000000 3292166748 3292000000 3292166748
+9879000000 9879500405 3293000000 3293166801 3293000000 3293166801
+9882000000 9882500517 3294000000 3294166839 3294000000 3294166839
+9885000000 9885500715 3295000000 3295166905 3295000000 3295166905
+9888000000 9888500805 3296000000 3296166935 3296000000 3296166935
+9891000000 9891501030 3297000000 3297167010 3297000000 3297167010
+9894000000 9894501162 3298000000 3298167054 3298000000 3298167054
+9897000000 9897501301 3299000000 3299167100 3299000000 3299167100
+9900000000 9900501352 3300000000 3300167117 3300000000 3300167117
+9903000000 9903501563 3301000000 3301167187 3301000000 3301167187
+9906000000 9906501772 3302000000 3302167257 3302000000 3302167257
+9909000000 9909501900 3303000000 3303167300 3303000000 3303167300
+9912000000 9912502043 3304000000 3304167347 3304000000 3304167347
+9915000000 9915502214 3305000000 3305167404 3305000000 3305167404
+9918000000 9918502311 3306000000 3306167437 3306000000 3306167437
+9921000000 9921502524 3307000000 3307167508 3307000000 3307167508
+9924000000 9924502654 3308000000 3308167551 3308000000 3308167551
+9927000000 9927502804 3309000000 3309167601 3309000000 3309167601
+9930000000 9930502964 3310000000 3310167654 3310000000 3310167654
+9933000000 9933503060 3311000000 3311167686 3311000000 3311167686
+9936000000 9936503248 3312000000 3312167749 3312000000 3312167749
+9939000000 9939503416 3313000000 3313167805 3313000000 3313167805
+9942000000 9942503552 3314000000 3314167850 3314000000 3314167850
+9945000000 9945503727 3315000000 3315167909 3315000000 3315167909
+9948000000 9948503849 3316000000 3316167949 3316000000 3316167949
+9951000000 9951503999 3317000000 3317167999 3317000000 3317167999
+9954000000 9954504147 3318000000 3318168049 3318000000 3318168049
+9957000000 9957504353 3319000000 3319168117 3319000000 3319168117
+9960000000 9960504467 3320000000 3320168155 3320000000 3320168155
+9963000000 9963504599 3321000000 3321168199 3321000000 3321168199
+9966000000 9966504773 3322000000 3322168257 3322000000 3322168257
+9969000000 9969504892 3323000000 3323168297 3323000000 3323168297
+9972000000 9972505016 3324000000 3324168338 3324000000 3324168338
+9975000000 9975505235 3325000000 3325168411 3325000000 3325168411
+9978000000 9978505371 3326000000 3326168457 3326000000 3326168457
+9981000000 9981505522 3327000000 3327168507 3327000000 3327168507
+9984000000 9984505682 3328000000 3328168560 3328000000 3328168560
+9987000000 9987505803 3329000000 3329168601 3329000000 3329168601
+9990000000 9990505884 3330000000 3330168628 3330000000 3330168628
+9993000000 9993506092 3331000000 3331168697 3331000000 3331168697
+9996000000 9996506247 3332000000 3332168749 3332000000 3332168749
+9999000000 9999506406 3333000000 3333168802 3333000000 3333168802
+10002000000 10002506558 3334000000 3334168852 3334000000 3334168852
+10005000000 10005506680 3335000000 3335168893 3335000000 3335168893
+10008000000 10008506858 3336000000 3336168952 3336000000 3336168952
+10011000000 10011507007 3337000000 3337169002 3337000000 3337169002
+10014000000 10014507135 3338000000 3338169045 3338000000 3338169045
+10017000000 10017507304 3339000000 3339169101 3339000000 3339169101
+10020000000 10020507424 3340000000 3340169141 3340000000 3340169141
+10023000000 10023507351 3341000000 3341169117 3341000000 3341169117
+10026000000 10026507674 3342000000 3342169224 3342000000 3342169224
+10029000000 10029507927 3343000000 3343169309 3343000000 3343169309
+10032000000 10032508037 3344000000 3344169345 3344000000 3344169345
+10035000000 10035508216 3345000000 3345169405 3345000000 3345169405
+10038000000 10038508264 3346000000 3346169421 3346000000 3346169421
+10041000000 10041508518 3347000000 3347169506 3347000000 3347169506
+10044000000 10044508637 3348000000 3348169545 3348000000 3348169545
+10047000000 10047508808 3349000000 3349169602 3349000000 3349169602
+10050000000 10050508955 3350000000 3350169651 3350000000 3350169651
+10053000000 10053509108 3351000000 3351169702 3351000000 3351169702
+10056000000 10056509254 3352000000 3352169751 3352000000 3352169751
+10059000000 10059509398 3353000000 3353169799 3353000000 3353169799
+10062000000 10062509561 3354000000 3354169853 3354000000 3354169853
+10065000000 10065509713 3355000000 3355169904 3355000000 3355169904
+10068000000 10068509867 3356000000 3356169955 3356000000 3356169955
+10071000000 10071509987 3357000000 3357169995 3357000000 3357169995
+10074000000 10074510196 3358000000 3358170065 3358000000 3358170065
+10077000000 10077510326 3359000000 3359170108 3359000000 3359170108
+10080000000 10080510440 3360000000 3360170146 3360000000 3360170146
+10083000000 10083510601 3361000000 3361170200 3361000000 3361170200
+10086000000 10086510736 3362000000 3362170245 3362000000 3362170245
+10089000000 10089510879 3363000000 3363170293 3363000000 3363170293
+10092000000 10092510979 3364000000 3364170326 3364000000 3364170326
+10095000000 10095511213 3365000000 3365170404 3365000000 3365170404
+10098000000 10098511286 3366000000 3366170428 3366000000 3366170428
+10101000000 10101511407 3367000000 3367170469 3367000000 3367170469
+10104000000 10104511596 3368000000 3368170532 3368000000 3368170532
+10107000000 10107511750 3369000000 3369170583 3369000000 3369170583
+10110000000 10110511929 3370000000 3370170643 3370000000 3370170643
+10113000000 10113512075 3371000000 3371170691 3371000000 3371170691
+10116000000 10116512202 3372000000 3372170734 3372000000 3372170734
+10119000000 10119512376 3373000000 3373170792 3373000000 3373170792
+10122000000 10122512440 3374000000 3374170813 3374000000 3374170813
+10125000000 10125512647 3375000000 3375170882 3375000000 3375170882
+10128000000 10128512828 3376000000 3376170942 3376000000 3376170942
+10131000000 10131512977 3377000000 3377170992 3377000000 3377170992
+10134000000 10134513034 3378000000 3378171011 3378000000 3378171011
+10137000000 10137513230 3379000000 3379171076 3379000000 3379171076
+10140000000 10140513420 3380000000 3380171140 3380000000 3380171140
+10143000000 10143513565 3381000000 3381171188 3381000000 3381171188
+10146000000 10146513737 3382000000 3382171245 3382000000 3382171245
+10149000000 10149513870 3383000000 3383171290 3383000000 3383171290
+10152000000 10152513941 3384000000 3384171313 3384000000 3384171313
+10155000000 10155514167 3385000000 3385171389 3385000000 3385171389
+10158000000 10158514327 3386000000 3386171442 3386000000 3386171442
+10161000000 10161514459 3387000000 3387171486 3387000000 3387171486
+10164000000 10164514567 3388000000 3388171522 3388000000 3388171522
+10167000000 10167514778 3389000000 3389171592 3389000000 3389171592
+10170000000 10170514944 3390000000 3390171648 3390000000 3390171648
+10173000000 10173515055 3391000000 3391171685 3391000000 3391171685
+10176000000 10176515215 3392000000 3392171738 3392000000 3392171738
+10179000000 10179515327 3393000000 3393171775 3393000000 3393171775
+10182000000 10182515525 3394000000 3394171841 3394000000 3394171841
+10185000000 10185515615 3395000000 3395171871 3395000000 3395171871
+10188000000 10188515840 3396000000 3396171946 3396000000 3396171946
+10191000000 10191515972 3397000000 3397171990 3397000000 3397171990
+10194000000 10194516111 3398000000 3398172037 3398000000 3398172037
+10197000000 10197516162 3399000000 3399172054 3399000000 3399172054
+10200000000 10200516373 3400000000 3400172124 3400000000 3400172124
+10203000000 10203516582 3401000000 3401172194 3401000000 3401172194
+10206000000 10206516710 3402000000 3402172236 3402000000 3402172236
+10209000000 10209516853 3403000000 3403172284 3403000000 3403172284
+10212000000 10212517024 3404000000 3404172341 3404000000 3404172341
+10215000000 10215517121 3405000000 3405172373 3405000000 3405172373
+10218000000 10218517334 3406000000 3406172444 3406000000 3406172444
+10221000000 10221517464 3407000000 3407172488 3407000000 3407172488
+10224000000 10224517614 3408000000 3408172538 3408000000 3408172538
+10227000000 10227517774 3409000000 3409172591 3409000000 3409172591
+10230000000 10230517870 3410000000 3410172623 3410000000 3410172623
+10233000000 10233518058 3411000000 3411172686 3411000000 3411172686
+10236000000 10236518226 3412000000 3412172742 3412000000 3412172742
+10239000000 10239518362 3413000000 3413172787 3413000000 3413172787
+10242000000 10242518537 3414000000 3414172845 3414000000 3414172845
+10245000000 10245518659 3415000000 3415172886 3415000000 3415172886
+10248000000 10248518809 3416000000 3416172936 3416000000 3416172936
+10251000000 10251518957 3417000000 3417172985 3417000000 3417172985
+10254000000 10254519163 3418000000 3418173054 3418000000 3418173054
+10257000000 10257519277 3419000000 3419173092 3419000000 3419173092
+10260000000 10260519409 3420000000 3420173136 3420000000 3420173136
+10263000000 10263519583 3421000000 3421173194 3421000000 3421173194
+10266000000 10266519702 3422000000 3422173234 3422000000 3422173234
+10269000000 10269519826 3423000000 3423173275 3423000000 3423173275
+10272000000 10272520045 3424000000 3424173348 3424000000 3424173348
+10275000000 10275520181 3425000000 3425173393 3425000000 3425173393
+10278000000 10278520332 3426000000 3426173444 3426000000 3426173444
+10281000000 10281520492 3427000000 3427173497 3427000000 3427173497
+10284000000 10284520613 3428000000 3428173537 3428000000 3428173537
+10287000000 10287520694 3429000000 3429173564 3429000000 3429173564
+10290000000 10290520902 3430000000 3430173634 3430000000 3430173634
+10293000000 10293521057 3431000000 3431173685 3431000000 3431173685
+10296000000 10296521216 3432000000 3432173738 3432000000 3432173738
+10299000000 10299521368 3433000000 3433173789 3433000000 3433173789
+10302000000 10302521490 3434000000 3434173830 3434000000 3434173830
+10305000000 10305521668 3435000000 3435173889 3435000000 3435173889
+10308000000 10308521817 3436000000 3436173939 3436000000 3436173939
+10311000000 10311521945 3437000000 3437173981 3437000000 3437173981
+10314000000 10314522114 3438000000 3438174038 3438000000 3438174038
+10317000000 10317522234 3439000000 3439174078 3439000000 3439174078
+10320000000 10320522161 3440000000 3440174053 3440000000 3440174053
+10323000000 10323522484 3441000000 3441174161 3441000000 3441174161
+10326000000 10326522737 3442000000 3442174245 3442000000 3442174245
+10329000000 10329522847 3443000000 3443174282 3443000000 3443174282
+10332000000 10332523026 3444000000 3444174342 3444000000 3444174342
+10335000000 10335523074 3445000000 3445174358 3445000000 3445174358
+10338000000 10338523328 3446000000 3446174442 3446000000 3446174442
+10341000000 10341523447 3447000000 3447174482 3447000000 3447174482
+10344000000 10344523618 3448000000 3448174539 3448000000 3448174539
+10347000000 10347523765 3449000000 3449174588 3449000000 3449174588
+10350000000 10350523918 3450000000 3450174639 3450000000 3450174639
+10353000000 10353524064 3451000000 3451174688 3451000000 3451174688
+10356000000 10356524208 3452000000 3452174736 3452000000 3452174736
+10359000000 10359524371 3453000000 3453174790 3453000000 3453174790
+10362000000 10362524523 3454000000 3454174841 3454000000 3454174841
+10365000000 10365524677 3455000000 3455174892 3455000000 3455174892
+10368000000 10368524797 3456000000 3456174932 3456000000 3456174932
+10371000000 10371525006 3457000000 3457175002 3457000000 3457175002
+10374000000 10374525136 3458000000 3458175045 3458000000 3458175045
+10377000000 10377525250 3459000000 3459175083 3459000000 3459175083
+10380000000 10380525411 3460000000 3460175137 3460000000 3460175137
+10383000000 10383525546 3461000000 3461175182 3461000000 3461175182
+10386000000 10386525689 3462000000 3462175229 3462000000 3462175229
+10389000000 10389525789 3463000000 3463175263 3463000000 3463175263
+10392000000 10392526023 3464000000 3464175341 3464000000 3464175341
+10395000000 10395526096 3465000000 3465175365 3465000000 3465175365
+10398000000 10398526217 3466000000 3466175405 3466000000 3466175405
+10401000000 10401526406 3467000000 3467175468 3467000000 3467175468
+10404000000 10404526560 3468000000 3468175520 3468000000 3468175520
+10407000000 10407526739 3469000000 3469175579 3469000000 3469175579
+10410000000 10410526885 3470000000 3470175628 3470000000 3470175628
+10413000000 10413527012 3471000000 3471175670 3471000000 3471175670
+10416000000 10416527186 3472000000 3472175728 3472000000 3472175728
+10419000000 10419527250 3473000000 3473175750 3473000000 3473175750
+10422000000 10422527457 3474000000 3474175819 3474000000 3474175819
+10425000000 10425527638 3475000000 3475175879 3475000000 3475175879
+10428000000 10428527787 3476000000 3476175929 3476000000 3476175929
+10431000000 10431527844 3477000000 3477175948 3477000000 3477175948
+10434000000 10434528040 3478000000 3478176013 3478000000 3478176013
+10437000000 10437528230 3479000000 3479176076 3479000000 3479176076
+10440000000 10440528375 3480000000 3480176125 3480000000 3480176125
+10443000000 10443528547 3481000000 3481176182 3481000000 3481176182
+10446000000 10446528680 3482000000 3482176226 3482000000 3482176226
+10449000000 10449528751 3483000000 3483176250 3483000000 3483176250
+10452000000 10452528977 3484000000 3484176325 3484000000 3484176325
+10455000000 10455529137 3485000000 3485176379 3485000000 3485176379
+10458000000 10458529269 3486000000 3486176423 3486000000 3486176423
+10461000000 10461529377 3487000000 3487176459 3487000000 3487176459
+10464000000 10464529588 3488000000 3488176529 3488000000 3488176529
+10467000000 10467529754 3489000000 3489176584 3489000000 3489176584
+10470000000 10470529865 3490000000 3490176621 3490000000 3490176621
+10473000000 10473530025 3491000000 3491176675 3491000000 3491176675
+10476000000 10476530137 3492000000 3492176712 3492000000 3492176712
+10479000000 10479530335 3493000000 3493176778 3493000000 3493176778
+10482000000 10482530425 3494000000 3494176808 3494000000 3494176808
+10485000000 10485530650 3495000000 3495176883 3495000000 3495176883
+10488000000 10488530782 3496000000 3496176927 3496000000 3496176927
+10491000000 10491530921 3497000000 3497176973 3497000000 3497176973
+10494000000 10494530972 3498000000 3498176990 3498000000 3498176990
+10497000000 10497531183 3499000000 3499177061 3499000000 3499177061
+10500000000 10500531392 3500000000 3500177130 3500000000 3500177130
+10503000000 10503531520 3501000000 3501177173 3501000000 3501177173
+10506000000 10506531663 3502000000 3502177221 3502000000 3502177221
+10509000000 10509531834 3503000000 3503177278 3503000000 3503177278
+10512000000 10512531931 3504000000 3504177310 3504000000 3504177310
+10515000000 10515532144 3505000000 3505177381 3505000000 3505177381
+10518000000 10518532274 3506000000 3506177424 3506000000 3506177424
+10521000000 10521532424 3507000000 3507177474 3507000000 3507177474
+10524000000 10524532584 3508000000 3508177528 3508000000 3508177528
+10527000000 10527532680 3509000000 3509177560 3509000000 3509177560
+10530000000 10530532868 3510000000 3510177622 3510000000 3510177622
+10533000000 10533533036 3511000000 3511177678 3511000000 3511177678
+10536000000 10536533172 3512000000 3512177724 3512000000 3512177724
+10539000000 10539533347 3513000000 3513177782 3513000000 3513177782
+10542000000 10542533469 3514000000 3514177823 3514000000 3514177823
+10545000000 10545533619 3515000000 3515177873 3515000000 3515177873
+10548000000 10548533767 3516000000 3516177922 3516000000 3516177922
+10551000000 10551533973 3517000000 3517177991 3517000000 3517177991
+10554000000 10554534087 3518000000 3518178029 3518000000 3518178029
+10557000000 10557534219 3519000000 3519178073 3519000000 3519178073
+10560000000 10560534393 3520000000 3520178131 3520000000 3520178131
+10563000000 10563534512 3521000000 3521178170 3521000000 3521178170
+10566000000 10566534636 3522000000 3522178212 3522000000 3522178212
+10569000000 10569534855 3523000000 3523178285 3523000000 3523178285
+10572000000 10572534991 3524000000 3524178330 3524000000 3524178330
+10575000000 10575535142 3525000000 3525178380 3525000000 3525178380
+10578000000 10578535302 3526000000 3526178434 3526000000 3526178434
+10581000000 10581535423 3527000000 3527178474 3527000000 3527178474
+10584000000 10584535504 3528000000 3528178501 3528000000 3528178501
+10587000000 10587535712 3529000000 3529178570 3529000000 3529178570
+10590000000 10590535867 3530000000 3530178622 3530000000 3530178622
+10593000000 10593536026 3531000000 3531178675 3531000000 3531178675
+10596000000 10596536178 3532000000 3532178726 3532000000 3532178726
+10599000000 10599536300 3533000000 3533178766 3533000000 3533178766
+10602000000 10602536478 3534000000 3534178826 3534000000 3534178826
+10605000000 10605536627 3535000000 3535178875 3535000000 3535178875
+10608000000 10608536755 3536000000 3536178918 3536000000 3536178918
+10611000000 10611536924 3537000000 3537178974 3537000000 3537178974
+10614000000 10614537044 3538000000 3538179014 3538000000 3538179014
+10617000000 10617536971 3539000000 3539178990 3539000000 3539178990
+10620000000 10620537294 3540000000 3540179098 3540000000 3540179098
+10623000000 10623537547 3541000000 3541179182 3541000000 3541179182
+10626000000 10626537657 3542000000 3542179219 3542000000 3542179219
+10629000000 10629537836 3543000000 3543179278 3543000000 3543179278
+10632000000 10632537884 3544000000 3544179294 3544000000 3544179294
+10635000000 10635538138 3545000000 3545179379 3545000000 3545179379
+10638000000 10638538257 3546000000 3546179419 3546000000 3546179419
+10641000000 10641538428 3547000000 3547179476 3547000000 3547179476
+10644000000 10644538575 3548000000 3548179525 3548000000 3548179525
+10647000000 10647538728 3549000000 3549179576 3549000000 3549179576
+10650000000 10650538874 3550000000 3550179624 3550000000 3550179624
+10653000000 10653539018 3551000000 3551179672 3551000000 3551179672
+10656000000 10656539181 3552000000 3552179727 3552000000 3552179727
+10659000000 10659539333 3553000000 3553179777 3553000000 3553179777
+10662000000 10662539487 3554000000 3554179829 3554000000 3554179829
+10665000000 10665539607 3555000000 3555179869 3555000000 3555179869
+10668000000 10668539816 3556000000 3556179938 3556000000 3556179938
+10671000000 10671539946 3557000000 3557179982 3557000000 3557179982
+10674000000 10674540060 3558000000 3558180020 3558000000 3558180020
+10677000000 10677540221 3559000000 3559180073 3559000000 3559180073
+10680000000 10680540356 3560000000 3560180118 3560000000 3560180118
+10683000000 10683540499 3561000000 3561180166 3561000000 3561180166
+10686000000 10686540599 3562000000 3562180199 3562000000 3562180199
+10689000000 10689540833 3563000000 3563180277 3563000000 3563180277
+10692000000 10692540906 3564000000 3564180302 3564000000 3564180302
+10695000000 10695541027 3565000000 3565180342 3565000000 3565180342
+10698000000 10698541216 3566000000 3566180405 3566000000 3566180405
+10701000000 10701541370 3567000000 3567180456 3567000000 3567180456
+10704000000 10704541549 3568000000 3568180516 3568000000 3568180516
+10707000000 10707541695 3569000000 3569180565 3569000000 3569180565
+10710000000 10710541822 3570000000 3570180607 3570000000 3570180607
+10713000000 10713541996 3571000000 3571180665 3571000000 3571180665
+10716000000 10716542060 3572000000 3572180686 3572000000 3572180686
+10719000000 10719542267 3573000000 3573180755 3573000000 3573180755
+10722000000 10722542448 3574000000 3574180816 3574000000 3574180816
+10725000000 10725542597 3575000000 3575180865 3575000000 3575180865
+10728000000 10728542654 3576000000 3576180884 3576000000 3576180884
+10731000000 10731542850 3577000000 3577180950 3577000000 3577180950
+10734000000 10734543040 3578000000 3578181013 3578000000 3578181013
+10737000000 10737543185 3579000000 3579181061 3579000000 3579181061
+10740000000 10740543357 3580000000 3580181119 3580000000 3580181119
+10743000000 10743543490 3581000000 3581181163 3581000000 3581181163
+10746000000 10746543561 3582000000 3582181187 3582000000 3582181187
+10749000000 10749543787 3583000000 3583181262 3583000000 3583181262
+10752000000 10752543947 3584000000 3584181315 3584000000 3584181315
+10755000000 10755544079 3585000000 3585181359 3585000000 3585181359
+10758000000 10758544187 3586000000 3586181395 3586000000 3586181395
+10761000000 10761544398 3587000000 3587181466 3587000000 3587181466
+10764000000 10764544564 3588000000 3588181521 3588000000 3588181521
+10767000000 10767544675 3589000000 3589181558 3589000000 3589181558
+10770000000 10770544835 3590000000 3590181611 3590000000 3590181611
+10773000000 10773544947 3591000000 3591181649 3591000000 3591181649
+10776000000 10776545145 3592000000 3592181715 3592000000 3592181715
+10779000000 10779545235 3593000000 3593181745 3593000000 3593181745
+10782000000 10782545460 3594000000 3594181820 3594000000 3594181820
+10785000000 10785545592 3595000000 3595181864 3595000000 3595181864
+10788000000 10788545731 3596000000 3596181910 3596000000 3596181910
+10791000000 10791545782 3597000000 3597181927 3597000000 3597181927
+10794000000 10794545993 3598000000 3598181997 3598000000 3598181997
+10797000000 10797546202 3599000000 3599182067 3599000000 3599182067
+10800000000 10800546330 3600000000 3600182110 3600000000 3600182110
+10803000000 10803546473 3601000000 3601182157 3601000000 3601182157
+10806000000 10806546644 3602000000 3602182214 3602000000 3602182214
+10809000000 10809546741 3603000000 3603182247 3603000000 3603182247
+10812000000 10812546954 3604000000 3604182318 3604000000 3604182318
+10815000000 10815547084 3605000000 3605182361 3605000000 3605182361
+10818000000 10818547234 3606000000 3606182411 3606000000 3606182411
+10821000000 10821547394 3607000000 3607182464 3607000000 3607182464
+10824000000 10824547490 3608000000 3608182496 3608000000 3608182496
+10827000000 10827547678 3609000000 3609182559 3609000000 3609182559
+10830000000 10830547846 3610000000 3610182615 3610000000 3610182615
+10833000000 10833547982 3611000000 3611182660 3611000000 3611182660
+10836000000 10836548157 3612000000 3612182719 3612000000 3612182719
+10839000000 10839548279 3613000000 3613182759 3613000000 3613182759
+10842000000 10842548429 3614000000 3614182809 3614000000 3614182809
+10845000000 10845548577 3615000000 3615182859 3615000000 3615182859
+10848000000 10848548783 3616000000 3616182927 3616000000 3616182927
+10851000000 10851548897 3617000000 3617182965 3617000000 3617182965
+10854000000 10854549029 3618000000 3618183009 3618000000 3618183009
+10857000000 10857549203 3619000000 3619183067 3619000000 3619183067
+10860000000 10860549322 3620000000 3620183107 3620000000 3620183107
+10863000000 10863549446 3621000000 3621183148 3621000000 3621183148
+10866000000 10866549665 3622000000 3622183221 3622000000 3622183221
+10869000000 10869549801 3623000000 3623183267 3623000000 3623183267
+10872000000 10872549952 3624000000 3624183317 3624000000 3624183317
+10875000000 10875550112 3625000000 3625183370 3625000000 3625183370
+10878000000 10878550233 3626000000 3626183411 3626000000 3626183411
+10881000000 10881550314 3627000000 3627183438 3627000000 3627183438
+10884000000 10884550522 3628000000 3628183507 3628000000 3628183507
+10887000000 10887550677 3629000000 3629183559 3629000000 3629183559
+10890000000 10890550836 3630000000 3630183612 3630000000 3630183612
+10893000000 10893550988 3631000000 3631183662 3631000000 3631183662
+10896000000 10896551110 3632000000 3632183703 3632000000 3632183703
+10899000000 10899551288 3633000000 3633183762 3633000000 3633183762
+10902000000 10902551437 3634000000 3634183812 3634000000 3634183812
+10905000000 10905551565 3635000000 3635183855 3635000000 3635183855
+10908000000 10908551734 3636000000 3636183911 3636000000 3636183911
+10911000000 10911551854 3637000000 3637183951 3637000000 3637183951
+10914000000 10914551781 3638000000 3638183927 3638000000 3638183927
+10917000000 10917552104 3639000000 3639184034 3639000000 3639184034
+10920000000 10920552357 3640000000 3640184119 3640000000 3640184119
+10923000000 10923552467 3641000000 3641184155 3641000000 3641184155
+10926000000 10926552646 3642000000 3642184215 3642000000 3642184215
+10929000000 10929552694 3643000000 3643184231 3643000000 3643184231
+10932000000 10932552948 3644000000 3644184316 3644000000 3644184316
+10935000000 10935553067 3645000000 3645184355 3645000000 3645184355
+10938000000 10938553238 3646000000 3646184412 3646000000 3646184412
+10941000000 10941553385 3647000000 3647184461 3647000000 3647184461
+10944000000 10944553538 3648000000 3648184512 3648000000 3648184512
+10947000000 10947553684 3649000000 3649184561 3649000000 3649184561
+10950000000 10950553828 3650000000 3650184609 3650000000 3650184609
+10953000000 10953553991 3651000000 3651184663 3651000000 3651184663
+10956000000 10956554143 3652000000 3652184714 3652000000 3652184714
+10959000000 10959554297 3653000000 3653184765 3653000000 3653184765
+10962000000 10962554417 3654000000 3654184805 3654000000 3654184805
+10965000000 10965554626 3655000000 3655184875 3655000000 3655184875
+10968000000 10968554756 3656000000 3656184918 3656000000 3656184918
+10971000000 10971554870 3657000000 3657184956 3657000000 3657184956
+10974000000 10974555031 3658000000 3658185010 3658000000 3658185010
+10977000000 10977555166 3659000000 3659185055 3659000000 3659185055
+10980000000 10980555309 3660000000 3660185103 3660000000 3660185103
+10983000000 10983555409 3661000000 3661185136 3661000000 3661185136
+10986000000 10986555643 3662000000 3662185214 3662000000 3662185214
+10989000000 10989555716 3663000000 3663185238 3663000000 3663185238
+10992000000 10992555837 3664000000 3664185279 3664000000 3664185279
+10995000000 10995556026 3665000000 3665185342 3665000000 3665185342
+10998000000 10998556180 3666000000 3666185393 3666000000 3666185393
+11001000000 11001556359 3667000000 3667185453 3667000000 3667185453
+11004000000 11004556505 3668000000 3668185501 3668000000 3668185501
+11007000000 11007556632 3669000000 3669185544 3669000000 3669185544
+11010000000 11010556806 3670000000 3670185602 3670000000 3670185602
+11013000000 11013556870 3671000000 3671185623 3671000000 3671185623
+11016000000 11016557077 3672000000 3672185692 3672000000 3672185692
+11019000000 11019557258 3673000000 3673185752 3673000000 3673185752
+11022000000 11022557407 3674000000 3674185802 3674000000 3674185802
+11025000000 11025557464 3675000000 3675185821 3675000000 3675185821
+11028000000 11028557660 3676000000 3676185886 3676000000 3676185886
+11031000000 11031557850 3677000000 3677185950 3677000000 3677185950
+11034000000 11034557995 3678000000 3678185998 3678000000 3678185998
+11037000000 11037558167 3679000000 3679186055 3679000000 3679186055
+11040000000 11040558300 3680000000 3680186100 3680000000 3680186100
+11043000000 11043558371 3681000000 3681186123 3681000000 3681186123
+11046000000 11046558597 3682000000 3682186199 3682000000 3682186199
+11049000000 11049558757 3683000000 3683186252 3683000000 3683186252
+11052000000 11052558889 3684000000 3684186296 3684000000 3684186296
+11055000000 11055558997 3685000000 3685186332 3685000000 3685186332
+11058000000 11058559208 3686000000 3686186402 3686000000 3686186402
+11061000000 11061559374 3687000000 3687186458 3687000000 3687186458
+11064000000 11064559485 3688000000 3688186495 3688000000 3688186495
+11067000000 11067559645 3689000000 3689186548 3689000000 3689186548
+11070000000 11070559757 3690000000 3690186585 3690000000 3690186585
+11073000000 11073559955 3691000000 3691186651 3691000000 3691186651
+11076000000 11076560045 3692000000 3692186681 3692000000 3692186681
+11079000000 11079560270 3693000000 3693186756 3693000000 3693186756
+11082000000 11082560402 3694000000 3694186800 3694000000 3694186800
+11085000000 11085560541 3695000000 3695186847 3695000000 3695186847
+11088000000 11088560592 3696000000 3696186864 3696000000 3696186864
+11091000000 11091560803 3697000000 3697186934 3697000000 3697186934
+11094000000 11094561012 3698000000 3698187004 3698000000 3698187004
+11097000000 11097561140 3699000000 3699187046 3699000000 3699187046
+11100000000 11100561283 3700000000 3700187094 3700000000 3700187094
+11103000000 11103561454 3701000000 3701187151 3701000000 3701187151
+11106000000 11106561551 3702000000 3702187183 3702000000 3702187183
+11109000000 11109561764 3703000000 3703187254 3703000000 3703187254
+11112000000 11112561894 3704000000 3704187298 3704000000 3704187298
+11115000000 11115562044 3705000000 3705187348 3705000000 3705187348
+11118000000 11118562204 3706000000 3706187401 3706000000 3706187401
+11121000000 11121562300 3707000000 3707187433 3707000000 3707187433
+11124000000 11124562488 3708000000 3708187496 3708000000 3708187496
+11127000000 11127562656 3709000000 3709187552 3709000000 3709187552
+11130000000 11130562792 3710000000 3710187597 3710000000 3710187597
+11133000000 11133562967 3711000000 3711187655 3711000000 3711187655
+11136000000 11136563089 3712000000 3712187696 3712000000 3712187696
+11139000000 11139563239 3713000000 3713187746 3713000000 3713187746
+11142000000 11142563387 3714000000 3714187795 3714000000 3714187795
+11145000000 11145563593 3715000000 3715187864 3715000000 3715187864
+11148000000 11148563707 3716000000 3716187902 3716000000 3716187902
+11151000000 11151563839 3717000000 3717187946 3717000000 3717187946
+11154000000 11154564013 3718000000 3718188004 3718000000 3718188004
+11157000000 11157564132 3719000000 3719188044 3719000000 3719188044
+11160000000 11160564256 3720000000 3720188085 3720000000 3720188085
+11163000000 11163564475 3721000000 3721188158 3721000000 3721188158
+11166000000 11166564611 3722000000 3722188203 3722000000 3722188203
+11169000000 11169564762 3723000000 3723188254 3723000000 3723188254
+11172000000 11172564922 3724000000 3724188307 3724000000 3724188307
+11175000000 11175565043 3725000000 3725188347 3725000000 3725188347
+11178000000 11178565124 3726000000 3726188374 3726000000 3726188374
+11181000000 11181565332 3727000000 3727188444 3727000000 3727188444
+11184000000 11184565487 3728000000 3728188495 3728000000 3728188495
+11187000000 11187565646 3729000000 3729188548 3729000000 3729188548
+11190000000 11190565798 3730000000 3730188599 3730000000 3730188599
+11193000000 11193565920 3731000000 3731188640 3731000000 3731188640
+11196000000 11196566098 3732000000 3732188699 3732000000 3732188699
+11199000000 11199566247 3733000000 3733188749 3733000000 3733188749
+11202000000 11202566375 3734000000 3734188791 3734000000 3734188791
+11205000000 11205566544 3735000000 3735188848 3735000000 3735188848
+11208000000 11208566664 3736000000 3736188888 3736000000 3736188888
+11211000000 11211566591 3737000000 3737188863 3737000000 3737188863
+11214000000 11214566914 3738000000 3738188971 3738000000 3738188971
+11217000000 11217567167 3739000000 3739189055 3739000000 3739189055
+11220000000 11220567277 3740000000 3740189092 3740000000 3740189092
+11223000000 11223567456 3741000000 3741189152 3741000000 3741189152
+11226000000 11226567504 3742000000 3742189168 3742000000 3742189168
+11229000000 11229567758 3743000000 3743189252 3743000000 3743189252
+11232000000 11232567877 3744000000 3744189292 3744000000 3744189292
+11235000000 11235568048 3745000000 3745189349 3745000000 3745189349
+11238000000 11238568195 3746000000 3746189398 3746000000 3746189398
+11241000000 11241568348 3747000000 3747189449 3747000000 3747189449
+11244000000 11244568494 3748000000 3748189498 3748000000 3748189498
+11247000000 11247568638 3749000000 3749189546 3749000000 3749189546
+11250000000 11250568801 3750000000 3750189600 3750000000 3750189600
+11253000000 11253568953 3751000000 3751189651 3751000000 3751189651
+11256000000 11256569107 3752000000 3752189702 3752000000 3752189702
+11259000000 11259569227 3753000000 3753189742 3753000000 3753189742
+11262000000 11262569436 3754000000 3754189812 3754000000 3754189812
+11265000000 11265569566 3755000000 3755189855 3755000000 3755189855
+11268000000 11268569680 3756000000 3756189893 3756000000 3756189893
+11271000000 11271569841 3757000000 3757189947 3757000000 3757189947
+11274000000 11274569976 3758000000 3758189992 3758000000 3758189992
+11277000000 11277570119 3759000000 3759190039 3759000000 3759190039
+11280000000 11280570219 3760000000 3760190073 3760000000 3760190073
+11283000000 11283570453 3761000000 3761190151 3761000000 3761190151
+11286000000 11286570526 3762000000 3762190175 3762000000 3762190175
+11289000000 11289570647 3763000000 3763190215 3763000000 3763190215
+11292000000 11292570836 3764000000 3764190278 3764000000 3764190278
+11295000000 11295570990 3765000000 3765190330 3765000000 3765190330
+11298000000 11298571169 3766000000 3766190389 3766000000 3766190389
+11301000000 11301571315 3767000000 3767190438 3767000000 3767190438
+11304000000 11304571442 3768000000 3768190480 3768000000 3768190480
+11307000000 11307571616 3769000000 3769190538 3769000000 3769190538
+11310000000 11310571680 3770000000 3770190560 3770000000 3770190560
+11313000000 11313571887 3771000000 3771190629 3771000000 3771190629
+11316000000 11316572068 3772000000 3772190689 3772000000 3772190689
+11319000000 11319572217 3773000000 3773190739 3773000000 3773190739
+11322000000 11322572274 3774000000 3774190758 3774000000 3774190758
+11325000000 11325572470 3775000000 3775190823 3775000000 3775190823
+11328000000 11328572660 3776000000 3776190886 3776000000 3776190886
+11331000000 11331572805 3777000000 3777190935 3777000000 3777190935
+11334000000 11334572977 3778000000 3778190992 3778000000 3778190992
+11337000000 11337573110 3779000000 3779191036 3779000000 3779191036
+11340000000 11340573181 3780000000 3780191060 3780000000 3780191060
+11343000000 11343573407 3781000000 3781191135 3781000000 3781191135
+11346000000 11346573567 3782000000 3782191189 3782000000 3782191189
+11349000000 11349573699 3783000000 3783191233 3783000000 3783191233
+11352000000 11352573807 3784000000 3784191269 3784000000 3784191269
+11355000000 11355574018 3785000000 3785191339 3785000000 3785191339
+11358000000 11358574184 3786000000 3786191394 3786000000 3786191394
+11361000000 11361574295 3787000000 3787191431 3787000000 3787191431
+11364000000 11364574455 3788000000 3788191485 3788000000 3788191485
+11367000000 11367574567 3789000000 3789191522 3789000000 3789191522
+11370000000 11370574765 3790000000 3790191588 3790000000 3790191588
+11373000000 11373574855 3791000000 3791191618 3791000000 3791191618
+11376000000 11376575080 3792000000 3792191693 3792000000 3792191693
+11379000000 11379575212 3793000000 3793191737 3793000000 3793191737
+11382000000 11382575351 3794000000 3794191783 3794000000 3794191783
+11385000000 11385575402 3795000000 3795191800 3795000000 3795191800
+11388000000 11388575613 3796000000 3796191871 3796000000 3796191871
+11391000000 11391575822 3797000000 3797191940 3797000000 3797191940
+11394000000 11394575950 3798000000 3798191983 3798000000 3798191983
+11397000000 11397576093 3799000000 3799192031 3799000000 3799192031
+11400000000 11400576264 3800000000 3800192088 3800000000 3800192088
+11403000000 11403576361 3801000000 3801192120 3801000000 3801192120
+11406000000 11406576574 3802000000 3802192191 3802000000 3802192191
+11409000000 11409576704 3803000000 3803192234 3803000000 3803192234
+11412000000 11412576854 3804000000 3804192284 3804000000 3804192284
+11415000000 11415577014 3805000000 3805192338 3805000000 3805192338
+11418000000 11418577110 3806000000 3806192370 3806000000 3806192370
+11421000000 11421577298 3807000000 3807192432 3807000000 3807192432
+11424000000 11424577466 3808000000 3808192488 3808000000 3808192488
+11427000000 11427577602 3809000000 3809192534 3809000000 3809192534
+11430000000 11430577777 3810000000 3810192592 3810000000 3810192592
+11433000000 11433577899 3811000000 3811192633 3811000000 3811192633
+11436000000 11436578049 3812000000 3812192683 3812000000 3812192683
+11439000000 11439578197 3813000000 3813192732 3813000000 3813192732
+11442000000 11442578403 3814000000 3814192801 3814000000 3814192801
+11445000000 11445578517 3815000000 3815192839 3815000000 3815192839
+11448000000 11448578649 3816000000 3816192883 3816000000 3816192883
+11451000000 11451578823 3817000000 3817192941 3817000000 3817192941
+11454000000 11454578942 3818000000 3818192980 3818000000 3818192980
+11457000000 11457579066 3819000000 3819193022 3819000000 3819193022
+11460000000 11460579285 3820000000 3820193095 3820000000 3820193095
+11463000000 11463579421 3821000000 3821193140 3821000000 3821193140
+11466000000 11466579572 3822000000 3822193190 3822000000 3822193190
+11469000000 11469579732 3823000000 3823193244 3823000000 3823193244
+11472000000 11472579853 3824000000 3824193284 3824000000 3824193284
+11475000000 11475579934 3825000000 3825193311 3825000000 3825193311
+11478000000 11478580142 3826000000 3826193380 3826000000 3826193380
+11481000000 11481580297 3827000000 3827193432 3827000000 3827193432
+11484000000 11484580456 3828000000 3828193485 3828000000 3828193485
+11487000000 11487580608 3829000000 3829193536 3829000000 3829193536
+11490000000 11490580730 3830000000 3830193576 3830000000 3830193576
+11493000000 11493580908 3831000000 3831193636 3831000000 3831193636
+11496000000 11496581057 3832000000 3832193685 3832000000 3832193685
+11499000000 11499581185 3833000000 3833193728 3833000000 3833193728
+11502000000 11502581354 3834000000 3834193784 3834000000 3834193784
+11505000000 11505581474 3835000000 3835193824 3835000000 3835193824
+11508000000 11508581401 3836000000 3836193800 3836000000 3836193800
+11511000000 11511581724 3837000000 3837193908 3837000000 3837193908
+11514000000 11514581977 3838000000 3838193992 3838000000 3838193992
+11517000000 11517582087 3839000000 3839194029 3839000000 3839194029
+11520000000 11520582266 3840000000 3840194088 3840000000 3840194088
+11523000000 11523582314 3841000000 3841194104 3841000000 3841194104
+11526000000 11526582568 3842000000 3842194189 3842000000 3842194189
+11529000000 11529582687 3843000000 3843194229 3843000000 3843194229
+11532000000 11532582858 3844000000 3844194286 3844000000 3844194286
+11535000000 11535583005 3845000000 3845194335 3845000000 3845194335
+11538000000 11538583158 3846000000 3846194386 3846000000 3846194386
+11541000000 11541583304 3847000000 3847194434 3847000000 3847194434
+11544000000 11544583448 3848000000 3848194482 3848000000 3848194482
+11547000000 11547583611 3849000000 3849194537 3849000000 3849194537
+11550000000 11550583763 3850000000 3850194587 3850000000 3850194587
+11553000000 11553583917 3851000000 3851194639 3851000000 3851194639
+11556000000 11556584037 3852000000 3852194679 3852000000 3852194679
+11559000000 11559584246 3853000000 3853194748 3853000000 3853194748
+11562000000 11562584376 3854000000 3854194792 3854000000 3854194792
+11565000000 11565584490 3855000000 3855194830 3855000000 3855194830
+11568000000 11568584651 3856000000 3856194883 3856000000 3856194883
+11571000000 11571584786 3857000000 3857194928 3857000000 3857194928
+11574000000 11574584929 3858000000 3858194976 3858000000 3858194976
+11577000000 11577585029 3859000000 3859195009 3859000000 3859195009
+11580000000 11580585263 3860000000 3860195087 3860000000 3860195087
+11583000000 11583585336 3861000000 3861195112 3861000000 3861195112
+11586000000 11586585457 3862000000 3862195152 3862000000 3862195152
+11589000000 11589585646 3863000000 3863195215 3863000000 3863195215
+11592000000 11592585800 3864000000 3864195266 3864000000 3864195266
+11595000000 11595585979 3865000000 3865195326 3865000000 3865195326
+11598000000 11598586125 3866000000 3866195375 3866000000 3866195375
+11601000000 11601586252 3867000000 3867195417 3867000000 3867195417
+11604000000 11604586426 3868000000 3868195475 3868000000 3868195475
+11607000000 11607586490 3869000000 3869195496 3869000000 3869195496
+11610000000 11610586697 3870000000 3870195565 3870000000 3870195565
+11613000000 11613586878 3871000000 3871195626 3871000000 3871195626
+11616000000 11616587027 3872000000 3872195675 3872000000 3872195675
+11619000000 11619587084 3873000000 3873195694 3873000000 3873195694
+11622000000 11622587280 3874000000 3874195760 3874000000 3874195760
+11625000000 11625587470 3875000000 3875195823 3875000000 3875195823
+11628000000 11628587615 3876000000 3876195871 3876000000 3876195871
+11631000000 11631587787 3877000000 3877195929 3877000000 3877195929
+11634000000 11634587920 3878000000 3878195973 3878000000 3878195973
+11637000000 11637587991 3879000000 3879195997 3879000000 3879195997
+11640000000 11640588217 3880000000 3880196072 3880000000 3880196072
+11643000000 11643588377 3881000000 3881196125 3881000000 3881196125
+11646000000 11646588509 3882000000 3882196169 3882000000 3882196169
+11649000000 11649588617 3883000000 3883196205 3883000000 3883196205
+11652000000 11652588828 3884000000 3884196276 3884000000 3884196276
+11655000000 11655588994 3885000000 3885196331 3885000000 3885196331
+11658000000 11658589105 3886000000 3886196368 3886000000 3886196368
+11661000000 11661589265 3887000000 3887196421 3887000000 3887196421
+11664000000 11664589377 3888000000 3888196459 3888000000 3888196459
+11667000000 11667589575 3889000000 3889196525 3889000000 3889196525
+11670000000 11670589665 3890000000 3890196555 3890000000 3890196555
+11673000000 11673589890 3891000000 3891196630 3891000000 3891196630
+11676000000 11676590022 3892000000 3892196674 3892000000 3892196674
+11679000000 11679590161 3893000000 3893196720 3893000000 3893196720
+11682000000 11682590212 3894000000 3894196737 3894000000 3894196737
+11685000000 11685590423 3895000000 3895196807 3895000000 3895196807
+11688000000 11688590632 3896000000 3896196877 3896000000 3896196877
+11691000000 11691590760 3897000000 3897196920 3897000000 3897196920
+11694000000 11694590903 3898000000 3898196967 3898000000 3898196967
+11697000000 11697591074 3899000000 3899197024 3899000000 3899197024
+11700000000 11700591171 3900000000 3900197057 3900000000 3900197057
+11703000000 11703591384 3901000000 3901197128 3901000000 3901197128
+11706000000 11706591514 3902000000 3902197171 3902000000 3902197171
+11709000000 11709591664 3903000000 3903197221 3903000000 3903197221
+11712000000 11712591824 3904000000 3904197274 3904000000 3904197274
+11715000000 11715591920 3905000000 3905197306 3905000000 3905197306
+11718000000 11718592108 3906000000 3906197369 3906000000 3906197369
+11721000000 11721592276 3907000000 3907197425 3907000000 3907197425
+11724000000 11724592412 3908000000 3908197470 3908000000 3908197470
+11727000000 11727592587 3909000000 3909197529 3909000000 3909197529
+11730000000 11730592709 3910000000 3910197569 3910000000 3910197569
+11733000000 11733592859 3911000000 3911197619 3911000000 3911197619
+11736000000 11736593007 3912000000 3912197669 3912000000 3912197669
+11739000000 11739593213 3913000000 3913197737 3913000000 3913197737
+11742000000 11742593327 3914000000 3914197775 3914000000 3914197775
+11745000000 11745593459 3915000000 3915197819 3915000000 3915197819
+11748000000 11748593633 3916000000 3916197877 3916000000 3916197877
+11751000000 11751593752 3917000000 3917197917 3917000000 3917197917
+11754000000 11754593876 3918000000 3918197958 3918000000 3918197958
+11757000000 11757594095 3919000000 3919198031 3919000000 3919198031
+11760000000 11760594231 3920000000 3920198077 3920000000 3920198077
+11763000000 11763594382 3921000000 3921198127 3921000000 3921198127
+11766000000 11766594542 3922000000 3922198180 3922000000 3922198180
+11769000000 11769594663 3923000000 3923198221 3923000000 3923198221
+11772000000 11772594744 3924000000 3924198248 3924000000 3924198248
+11775000000 11775594952 3925000000 3925198317 3925000000 3925198317
+11778000000 11778595107 3926000000 3926198369 3926000000 3926198369
+11781000000 11781595266 3927000000 3927198422 3927000000 3927198422
+11784000000 11784595418 3928000000 3928198472 3928000000 3928198472
+11787000000 11787595540 3929000000 3929198513 3929000000 3929198513
+11790000000 11790595718 3930000000 3930198572 3930000000 3930198572
+11793000000 11793595867 3931000000 3931198622 3931000000 3931198622
+11796000000 11796595995 3932000000 3932198665 3932000000 3932198665
+11799000000 11799596164 3933000000 3933198721 3933000000 3933198721
+11802000000 11802596284 3934000000 3934198761 3934000000 3934198761
+11805000000 11805596211 3935000000 3935198737 3935000000 3935198737
+11808000000 11808596534 3936000000 3936198844 3936000000 3936198844
+11811000000 11811596787 3937000000 3937198929 3937000000 3937198929
+11814000000 11814596897 3938000000 3938198965 3938000000 3938198965
+11817000000 11817597076 3939000000 3939199025 3939000000 3939199025
+11820000000 11820597124 3940000000 3940199041 3940000000 3940199041
+11823000000 11823597378 3941000000 3941199126 3941000000 3941199126
+11826000000 11826597497 3942000000 3942199165 3942000000 3942199165
+11829000000 11829597668 3943000000 3943199222 3943000000 3943199222
+11832000000 11832597815 3944000000 3944199271 3944000000 3944199271
+11835000000 11835597968 3945000000 3945199322 3945000000 3945199322
+11838000000 11838598114 3946000000 3946199371 3946000000 3946199371
+11841000000 11841598258 3947000000 3947199419 3947000000 3947199419
+11844000000 11844598421 3948000000 3948199473 3948000000 3948199473
+11847000000 11847598573 3949000000 3949199524 3949000000 3949199524
+11850000000 11850598727 3950000000 3950199575 3950000000 3950199575
+11853000000 11853598847 3951000000 3951199615 3951000000 3951199615
+11856000000 11856599056 3952000000 3952199685 3952000000 3952199685
+11859000000 11859599186 3953000000 3953199728 3953000000 3953199728
+11862000000 11862599300 3954000000 3954199766 3954000000 3954199766
+11865000000 11865599461 3955000000 3955199820 3955000000 3955199820
+11868000000 11868599596 3956000000 3956199865 3956000000 3956199865
+11871000000 11871599739 3957000000 3957199913 3957000000 3957199913
+11874000000 11874599839 3958000000 3958199946 3958000000 3958199946
+11877000000 11877600073 3959000000 3959200024 3959000000 3959200024
+11880000000 11880600146 3960000000 3960200048 3960000000 3960200048
+11883000000 11883600267 3961000000 3961200089 3961000000 3961200089
+11886000000 11886600456 3962000000 3962200152 3962000000 3962200152
+11889000000 11889600610 3963000000 3963200203 3963000000 3963200203
+11892000000 11892600789 3964000000 3964200263 3964000000 3964200263
+11895000000 11895600935 3965000000 3965200311 3965000000 3965200311
+11898000000 11898601062 3966000000 3966200354 3966000000 3966200354
+11901000000 11901601236 3967000000 3967200412 3967000000 3967200412
+11904000000 11904601300 3968000000 3968200433 3968000000 3968200433
+11907000000 11907601507 3969000000 3969200502 3969000000 3969200502
+11910000000 11910601688 3970000000 3970200562 3970000000 3970200562
+11913000000 11913601837 3971000000 3971200612 3971000000 3971200612
+11916000000 11916601894 3972000000 3972200631 3972000000 3972200631
+11919000000 11919602090 3973000000 3973200696 3973000000 3973200696
+11922000000 11922602280 3974000000 3974200760 3974000000 3974200760
+11925000000 11925602425 3975000000 3975200808 3975000000 3975200808
+11928000000 11928602597 3976000000 3976200865 3976000000 3976200865
+11931000000 11931602730 3977000000 3977200910 3977000000 3977200910
+11934000000 11934602801 3978000000 3978200933 3978000000 3978200933
+11937000000 11937603027 3979000000 3979201009 3979000000 3979201009
+11940000000 11940603187 3980000000 3980201062 3980000000 3980201062
+11943000000 11943603319 3981000000 3981201106 3981000000 3981201106
+11946000000 11946603427 3982000000 3982201142 3982000000 3982201142
+11949000000 11949603638 3983000000 3983201212 3983000000 3983201212
+11952000000 11952603804 3984000000 3984201268 3984000000 3984201268
+11955000000 11955603915 3985000000 3985201305 3985000000 3985201305
+11958000000 11958604075 3986000000 3986201358 3986000000 3986201358
+11961000000 11961604187 3987000000 3987201395 3987000000 3987201395
+11964000000 11964604385 3988000000 3988201461 3988000000 3988201461
+11967000000 11967604475 3989000000 3989201491 3989000000 3989201491
+11970000000 11970604700 3990000000 3990201566 3990000000 3990201566
+11973000000 11973604832 3991000000 3991201610 3991000000 3991201610
+11976000000 11976604971 3992000000 3992201657 3992000000 3992201657
+11979000000 11979605022 3993000000 3993201674 3993000000 3993201674
+11982000000 11982605233 3994000000 3994201744 3994000000 3994201744
+11985000000 11985605442 3995000000 3995201814 3995000000 3995201814
+11988000000 11988605570 3996000000 3996201856 3996000000 3996201856
+11991000000 11991605713 3997000000 3997201904 3997000000 3997201904
+11994000000 11994605884 3998000000 3998201961 3998000000 3998201961
+11997000000 11997605981 3999000000 3999201993 3999000000 3999201993
+12000000000 12000606194 4000000000 4000202064 4000000000 4000202064
+12003000000 12003606324 4001000000 4001202108 4001000000 4001202108
+12006000000 12006606474 4002000000 4002202158 4002000000 4002202158
+12009000000 12009606634 4003000000 4003202211 4003000000 4003202211
+12012000000 12012606730 4004000000 4004202243 4004000000 4004202243
+12015000000 12015606918 4005000000 4005202306 4005000000 4005202306
+12018000000 12018607086 4006000000 4006202362 4006000000 4006202362
+12021000000 12021607222 4007000000 4007202407 4007000000 4007202407
+12024000000 12024607397 4008000000 4008202465 4008000000 4008202465
+12027000000 12027607519 4009000000 4009202506 4009000000 4009202506
+12030000000 12030607669 4010000000 4010202556 4010000000 4010202556
+12033000000 12033607817 4011000000 4011202605 4011000000 4011202605
+12036000000 12036608023 4012000000 4012202674 4012000000 4012202674
+12039000000 12039608137 4013000000 4013202712 4013000000 4013202712
+12042000000 12042608269 4014000000 4014202756 4014000000 4014202756
+12045000000 12045608443 4015000000 4015202814 4015000000 4015202814
+12048000000 12048608562 4016000000 4016202854 4016000000 4016202854
+12051000000 12051608686 4017000000 4017202895 4017000000 4017202895
+12054000000 12054608905 4018000000 4018202968 4018000000 4018202968
+12057000000 12057609041 4019000000 4019203013 4019000000 4019203013
+12060000000 12060609192 4020000000 4020203064 4020000000 4020203064
+12063000000 12063609352 4021000000 4021203117 4021000000 4021203117
+12066000000 12066609473 4022000000 4022203157 4022000000 4022203157
+12069000000 12069609554 4023000000 4023203184 4023000000 4023203184
+12072000000 12072609762 4024000000 4024203254 4024000000 4024203254
+12075000000 12075609917 4025000000 4025203305 4025000000 4025203305
+12078000000 12078610076 4026000000 4026203358 4026000000 4026203358
+12081000000 12081610228 4027000000 4027203409 4027000000 4027203409
+12084000000 12084610350 4028000000 4028203450 4028000000 4028203450
+12087000000 12087610528 4029000000 4029203509 4029000000 4029203509
+12090000000 12090610677 4030000000 4030203559 4030000000 4030203559
+12093000000 12093610805 4031000000 4031203601 4031000000 4031203601
+12096000000 12096610974 4032000000 4032203658 4032000000 4032203658
+12099000000 12099611094 4033000000 4033203698 4033000000 4033203698
+12102000000 12102611021 4034000000 4034203673 4034000000 4034203673
+12105000000 12105611344 4035000000 4035203781 4035000000 4035203781
+12108000000 12108611597 4036000000 4036203865 4036000000 4036203865
+12111000000 12111611707 4037000000 4037203902 4037000000 4037203902
+12114000000 12114611886 4038000000 4038203962 4038000000 4038203962
+12117000000 12117611934 4039000000 4039203978 4039000000 4039203978
+12120000000 12120612188 4040000000 4040204062 4040000000 4040204062
+12123000000 12123612307 4041000000 4041204102 4041000000 4041204102
+12126000000 12126612478 4042000000 4042204159 4042000000 4042204159
+12129000000 12129612625 4043000000 4043204208 4043000000 4043204208
+12132000000 12132612778 4044000000 4044204259 4044000000 4044204259
+12135000000 12135612924 4045000000 4045204308 4045000000 4045204308
+12138000000 12138613068 4046000000 4046204356 4046000000 4046204356
+12141000000 12141613231 4047000000 4047204410 4047000000 4047204410
+12144000000 12144613383 4048000000 4048204461 4048000000 4048204461
+12147000000 12147613537 4049000000 4049204512 4049000000 4049204512
+12150000000 12150613657 4050000000 4050204552 4050000000 4050204552
+12153000000 12153613866 4051000000 4051204622 4051000000 4051204622
+12156000000 12156613996 4052000000 4052204665 4052000000 4052204665
+12159000000 12159614110 4053000000 4053204703 4053000000 4053204703
+12162000000 12162614271 4054000000 4054204757 4054000000 4054204757
+12165000000 12165614406 4055000000 4055204802 4055000000 4055204802
+12168000000 12168614549 4056000000 4056204849 4056000000 4056204849
+12171000000 12171614649 4057000000 4057204883 4057000000 4057204883
+12174000000 12174614883 4058000000 4058204961 4058000000 4058204961
+12177000000 12177614956 4059000000 4059204985 4059000000 4059204985
+12180000000 12180615077 4060000000 4060205025 4060000000 4060205025
+12183000000 12183615266 4061000000 4061205088 4061000000 4061205088
+12186000000 12186615420 4062000000 4062205140 4062000000 4062205140
+12189000000 12189615599 4063000000 4063205199 4063000000 4063205199
+12192000000 12192615745 4064000000 4064205248 4064000000 4064205248
+12195000000 12195615872 4065000000 4065205290 4065000000 4065205290
+12198000000 12198616046 4066000000 4066205348 4066000000 4066205348
+12201000000 12201616110 4067000000 4067205370 4067000000 4067205370
+12204000000 12204616317 4068000000 4068205439 4068000000 4068205439
+12207000000 12207616498 4069000000 4069205499 4069000000 4069205499
+12210000000 12210616647 4070000000 4070205549 4070000000 4070205549
+12213000000 12213616704 4071000000 4071205568 4071000000 4071205568
+12216000000 12216616900 4072000000 4072205633 4072000000 4072205633
+12219000000 12219617090 4073000000 4073205696 4073000000 4073205696
+12222000000 12222617235 4074000000 4074205745 4074000000 4074205745
+12225000000 12225617407 4075000000 4075205802 4075000000 4075205802
+12228000000 12228617540 4076000000 4076205846 4076000000 4076205846
+12231000000 12231617611 4077000000 4077205870 4077000000 4077205870
+12234000000 12234617837 4078000000 4078205945 4078000000 4078205945
+12237000000 12237617997 4079000000 4079205999 4079000000 4079205999
+12240000000 12240618129 4080000000 4080206043 4080000000 4080206043
+12243000000 12243618237 4081000000 4081206079 4081000000 4081206079
+12246000000 12246618448 4082000000 4082206149 4082000000 4082206149
+12249000000 12249618614 4083000000 4083206204 4083000000 4083206204
+12252000000 12252618725 4084000000 4084206241 4084000000 4084206241
+12255000000 12255618885 4085000000 4085206295 4085000000 4085206295
+12258000000 12258618997 4086000000 4086206332 4086000000 4086206332
+12261000000 12261619195 4087000000 4087206398 4087000000 4087206398
+12264000000 12264619285 4088000000 4088206428 4088000000 4088206428
+12267000000 12267619510 4089000000 4089206503 4089000000 4089206503
+12270000000 12270619642 4090000000 4090206547 4090000000 4090206547
+12273000000 12273619781 4091000000 4091206593 4091000000 4091206593
+12276000000 12276619832 4092000000 4092206610 4092000000 4092206610
+12279000000 12279620043 4093000000 4093206681 4093000000 4093206681
+12282000000 12282620252 4094000000 4094206750 4094000000 4094206750
+12285000000 12285620380 4095000000 4095206793 4095000000 4095206793
+12288000000 12288620523 4096000000 4096206841 4096000000 4096206841
+12291000000 12291620694 4097000000 4097206898 4097000000 4097206898
+12294000000 12294620791 4098000000 4098206930 4098000000 4098206930
+12297000000 12297621004 4099000000 4099207001 4099000000 4099207001
+12300000000 12300621134 4100000000 4100207044 4100000000 4100207044
+12303000000 12303621284 4101000000 4101207094 4101000000 4101207094
+12306000000 12306621444 4102000000 4102207148 4102000000 4102207148
+12309000000 12309621540 4103000000 4103207180 4103000000 4103207180
+12312000000 12312621728 4104000000 4104207242 4104000000 4104207242
+12315000000 12315621896 4105000000 4105207298 4105000000 4105207298
+12318000000 12318622032 4106000000 4106207344 4106000000 4106207344
+12321000000 12321622207 4107000000 4107207402 4107000000 4107207402
+12324000000 12324622329 4108000000 4108207443 4108000000 4108207443
+12327000000 12327622479 4109000000 4109207493 4109000000 4109207493
+12330000000 12330622627 4110000000 4110207542 4110000000 4110207542
+12333000000 12333622833 4111000000 4111207611 4111000000 4111207611
+12336000000 12336622947 4112000000 4112207649 4112000000 4112207649
+12339000000 12339623079 4113000000 4113207693 4113000000 4113207693
+12342000000 12342623253 4114000000 4114207751 4114000000 4114207751
+12345000000 12345623372 4115000000 4115207790 4115000000 4115207790
+12348000000 12348623496 4116000000 4116207832 4116000000 4116207832
+12351000000 12351623715 4117000000 4117207905 4117000000 4117207905
+12354000000 12354623851 4118000000 4118207950 4118000000 4118207950
+12357000000 12357624002 4119000000 4119208000 4119000000 4119208000
+12360000000 12360624162 4120000000 4120208054 4120000000 4120208054
+12363000000 12363624283 4121000000 4121208094 4121000000 4121208094
+12366000000 12366624364 4122000000 4122208121 4122000000 4122208121
+12369000000 12369624572 4123000000 4123208190 4123000000 4123208190
+12372000000 12372624727 4124000000 4124208242 4124000000 4124208242
+12375000000 12375624886 4125000000 4125208295 4125000000 4125208295
+12378000000 12378625038 4126000000 4126208346 4126000000 4126208346
+12381000000 12381625160 4127000000 4127208386 4127000000 4127208386
+12384000000 12384625338 4128000000 4128208446 4128000000 4128208446
+12387000000 12387625487 4129000000 4129208495 4129000000 4129208495
+12390000000 12390625615 4130000000 4130208538 4130000000 4130208538
+12393000000 12393625784 4131000000 4131208594 4131000000 4131208594
+12396000000 12396625904 4132000000 4132208634 4132000000 4132208634
+12399000000 12399625831 4133000000 4133208610 4133000000 4133208610
+12402000000 12402626154 4134000000 4134208718 4134000000 4134208718
+12405000000 12405626407 4135000000 4135208802 4135000000 4135208802
+12408000000 12408626517 4136000000 4136208839 4136000000 4136208839
+12411000000 12411626696 4137000000 4137208898 4137000000 4137208898
+12414000000 12414626744 4138000000 4138208914 4138000000 4138208914
+12417000000 12417626998 4139000000 4139208999 4139000000 4139208999
+12420000000 12420627117 4140000000 4140209039 4140000000 4140209039
+12423000000 12423627288 4141000000 4141209096 4141000000 4141209096
+12426000000 12426627435 4142000000 4142209145 4142000000 4142209145
+12429000000 12429627588 4143000000 4143209196 4143000000 4143209196
+12432000000 12432627734 4144000000 4144209244 4144000000 4144209244
+12435000000 12435627878 4145000000 4145209292 4145000000 4145209292
+12438000000 12438628041 4146000000 4146209347 4146000000 4146209347
+12441000000 12441628193 4147000000 4147209397 4147000000 4147209397
+12444000000 12444628347 4148000000 4148209449 4148000000 4148209449
+12447000000 12447628467 4149000000 4149209489 4149000000 4149209489
+12450000000 12450628676 4150000000 4150209558 4150000000 4150209558
+12453000000 12453628806 4151000000 4151209602 4151000000 4151209602
+12456000000 12456628920 4152000000 4152209640 4152000000 4152209640
+12459000000 12459629081 4153000000 4153209693 4153000000 4153209693
+12462000000 12462629216 4154000000 4154209738 4154000000 4154209738
+12465000000 12465629359 4155000000 4155209786 4155000000 4155209786
+12468000000 12468629459 4156000000 4156209819 4156000000 4156209819
+12471000000 12471629693 4157000000 4157209897 4157000000 4157209897
+12474000000 12474629766 4158000000 4158209922 4158000000 4158209922
+12477000000 12477629887 4159000000 4159209962 4159000000 4159209962
+12480000000 12480630076 4160000000 4160210025 4160000000 4160210025
+12483000000 12483630230 4161000000 4161210076 4161000000 4161210076
+12486000000 12486630409 4162000000 4162210136 4162000000 4162210136
+12489000000 12489630555 4163000000 4163210185 4163000000 4163210185
+12492000000 12492630682 4164000000 4164210227 4164000000 4164210227
+12495000000 12495630856 4165000000 4165210285 4165000000 4165210285
+12498000000 12498630920 4166000000 4166210306 4166000000 4166210306
+12501000000 12501631127 4167000000 4167210375 4167000000 4167210375
+12504000000 12504631308 4168000000 4168210436 4168000000 4168210436
+12507000000 12507631457 4169000000 4169210485 4169000000 4169210485
+12510000000 12510631514 4170000000 4170210504 4170000000 4170210504
+12513000000 12513631710 4171000000 4171210570 4171000000 4171210570
+12516000000 12516631900 4172000000 4172210633 4172000000 4172210633
+12519000000 12519632045 4173000000 4173210681 4173000000 4173210681
+12522000000 12522632217 4174000000 4174210739 4174000000 4174210739
+12525000000 12525632350 4175000000 4175210783 4175000000 4175210783
+12528000000 12528632421 4176000000 4176210807 4176000000 4176210807
+12531000000 12531632647 4177000000 4177210882 4177000000 4177210882
+12534000000 12534632807 4178000000 4178210935 4178000000 4178210935
+12537000000 12537632939 4179000000 4179210979 4179000000 4179210979
+12540000000 12540633047 4180000000 4180211015 4180000000 4180211015
+12543000000 12543633258 4181000000 4181211086 4181000000 4181211086
+12546000000 12546633424 4182000000 4182211141 4182000000 4182211141
+12549000000 12549633535 4183000000 4183211178 4183000000 4183211178
+12552000000 12552633695 4184000000 4184211231 4184000000 4184211231
+12555000000 12555633807 4185000000 4185211269 4185000000 4185211269
+12558000000 12558634005 4186000000 4186211335 4186000000 4186211335
+12561000000 12561634095 4187000000 4187211365 4187000000 4187211365
+12564000000 12564634320 4188000000 4188211440 4188000000 4188211440
+12567000000 12567634452 4189000000 4189211484 4189000000 4189211484
+12570000000 12570634591 4190000000 4190211530 4190000000 4190211530
+12573000000 12573634642 4191000000 4191211547 4191000000 4191211547
+12576000000 12576634853 4192000000 4192211617 4192000000 4192211617
+12579000000 12579635062 4193000000 4193211687 4193000000 4193211687
+12582000000 12582635190 4194000000 4194211730 4194000000 4194211730
+12585000000 12585635333 4195000000 4195211777 4195000000 4195211777
+12588000000 12588635504 4196000000 4196211834 4196000000 4196211834
+12591000000 12591635601 4197000000 4197211867 4197000000 4197211867
+12594000000 12594635814 4198000000 4198211938 4198000000 4198211938
+12597000000 12597635944 4199000000 4199211981 4199000000 4199211981
+12600000000 12600636094 4200000000 4200212031 4200000000 4200212031
+12603000000 12603636254 4201000000 4201212084 4201000000 4201212084
+12606000000 12606636350 4202000000 4202212116 4202000000 4202212116
+12609000000 12609636538 4203000000 4203212179 4203000000 4203212179
+12612000000 12612636706 4204000000 4204212235 4204000000 4204212235
+12615000000 12615636842 4205000000 4205212280 4205000000 4205212280
+12618000000 12618637017 4206000000 4206212339 4206000000 4206212339
+12621000000 12621637139 4207000000 4207212379 4207000000 4207212379
+12624000000 12624637289 4208000000 4208212429 4208000000 4208212429
+12627000000 12627637437 4209000000 4209212479 4209000000 4209212479
+12630000000 12630637643 4210000000 4210212547 4210000000 4210212547
+12633000000 12633637757 4211000000 4211212585 4211000000 4211212585
+12636000000 12636637889 4212000000 4212212629 4212000000 4212212629
+12639000000 12639638063 4213000000 4213212687 4213000000 4213212687
+12642000000 12642638182 4214000000 4214212727 4214000000 4214212727
+12645000000 12645638306 4215000000 4215212768 4215000000 4215212768
+12648000000 12648638525 4216000000 4216212841 4216000000 4216212841
+12651000000 12651638661 4217000000 4217212887 4217000000 4217212887
+12654000000 12654638812 4218000000 4218212937 4218000000 4218212937
+12657000000 12657638972 4219000000 4219212990 4219000000 4219212990
+12660000000 12660639093 4220000000 4220213031 4220000000 4220213031
+12663000000 12663639174 4221000000 4221213058 4221000000 4221213058
+12666000000 12666639382 4222000000 4222213127 4222000000 4222213127
+12669000000 12669639537 4223000000 4223213179 4223000000 4223213179
+12672000000 12672639696 4224000000 4224213232 4224000000 4224213232
+12675000000 12675639848 4225000000 4225213282 4225000000 4225213282
+12678000000 12678639970 4226000000 4226213323 4226000000 4226213323
+12681000000 12681640148 4227000000 4227213382 4227000000 4227213382
+12684000000 12684640297 4228000000 4228213432 4228000000 4228213432
+12687000000 12687640425 4229000000 4229213475 4229000000 4229213475
+12690000000 12690640594 4230000000 4230213531 4230000000 4230213531
+12693000000 12693640714 4231000000 4231213571 4231000000 4231213571
+12696000000 12696640641 4232000000 4232213547 4232000000 4232213547
+12699000000 12699640964 4233000000 4233213654 4233000000 4233213654
+12702000000 12702641217 4234000000 4234213739 4234000000 4234213739
+12705000000 12705641327 4235000000 4235213775 4235000000 4235213775
+12708000000 12708641506 4236000000 4236213835 4236000000 4236213835
+12711000000 12711641554 4237000000 4237213851 4237000000 4237213851
+12714000000 12714641808 4238000000 4238213936 4238000000 4238213936
+12717000000 12717641927 4239000000 4239213975 4239000000 4239213975
+12720000000 12720642098 4240000000 4240214032 4240000000 4240214032
+12723000000 12723642245 4241000000 4241214081 4241000000 4241214081
+12726000000 12726642398 4242000000 4242214132 4242000000 4242214132
+12729000000 12729642544 4243000000 4243214181 4243000000 4243214181
+12732000000 12732642688 4244000000 4244214229 4244000000 4244214229
+12735000000 12735642851 4245000000 4245214283 4245000000 4245214283
+12738000000 12738643003 4246000000 4246214334 4246000000 4246214334
+12741000000 12741643157 4247000000 4247214385 4247000000 4247214385
+12744000000 12744643277 4248000000 4248214425 4248000000 4248214425
+12747000000 12747643486 4249000000 4249214495 4249000000 4249214495
+12750000000 12750643616 4250000000 4250214538 4250000000 4250214538
+12753000000 12753643730 4251000000 4251214576 4251000000 4251214576
+12756000000 12756643891 4252000000 4252214630 4252000000 4252214630
+12759000000 12759644026 4253000000 4253214675 4253000000 4253214675
+12762000000 12762644169 4254000000 4254214723 4254000000 4254214723
+12765000000 12765644269 4255000000 4255214756 4255000000 4255214756
+12768000000 12768644503 4256000000 4256214834 4256000000 4256214834
+12771000000 12771644576 4257000000 4257214858 4257000000 4257214858
+12774000000 12774644697 4258000000 4258214899 4258000000 4258214899
+12777000000 12777644886 4259000000 4259214962 4259000000 4259214962
+12780000000 12780645040 4260000000 4260215013 4260000000 4260215013
+12783000000 12783645219 4261000000 4261215073 4261000000 4261215073
+12786000000 12786645365 4262000000 4262215121 4262000000 4262215121
+12789000000 12789645492 4263000000 4263215164 4263000000 4263215164
+12792000000 12792645666 4264000000 4264215222 4264000000 4264215222
+12795000000 12795645730 4265000000 4265215243 4265000000 4265215243
+12798000000 12798645937 4266000000 4266215312 4266000000 4266215312
+12801000000 12801646118 4267000000 4267215372 4267000000 4267215372
+12804000000 12804646267 4268000000 4268215422 4268000000 4268215422
+12807000000 12807646324 4269000000 4269215441 4269000000 4269215441
+12810000000 12810646520 4270000000 4270215506 4270000000 4270215506
+12813000000 12813646710 4271000000 4271215570 4271000000 4271215570
+12816000000 12816646855 4272000000 4272215618 4272000000 4272215618
+12819000000 12819647027 4273000000 4273215675 4273000000 4273215675
+12822000000 12822647160 4274000000 4274215720 4274000000 4274215720
+12825000000 12825647231 4275000000 4275215743 4275000000 4275215743
+12828000000 12828647457 4276000000 4276215819 4276000000 4276215819
+12831000000 12831647617 4277000000 4277215872 4277000000 4277215872
+12834000000 12834647749 4278000000 4278215916 4278000000 4278215916
+12837000000 12837647857 4279000000 4279215952 4279000000 4279215952
+12840000000 12840648068 4280000000 4280216022 4280000000 4280216022
+12843000000 12843648234 4281000000 4281216078 4281000000 4281216078
+12846000000 12846648345 4282000000 4282216115 4282000000 4282216115
+12849000000 12849648505 4283000000 4283216168 4283000000 4283216168
+12852000000 12852648617 4284000000 4284216205 4284000000 4284216205
+12855000000 12855648815 4285000000 4285216271 4285000000 4285216271
+12858000000 12858648905 4286000000 4286216301 4286000000 4286216301
+12861000000 12861649130 4287000000 4287216376 4287000000 4287216376
+12864000000 12864649262 4288000000 4288216420 4288000000 4288216420
+12867000000 12867649401 4289000000 4289216467 4289000000 4289216467
+12870000000 12870649452 4290000000 4290216484 4290000000 4290216484
+12873000000 12873649663 4291000000 4291216554 4291000000 4291216554
+12876000000 12876649872 4292000000 4292216624 4292000000 4292216624
+12879000000 12879650000 4293000000 4293216666 4293000000 4293216666
+12882000000 12882650143 4294000000 4294216714 4294000000 4294216714
+12885000000 12885650314 4295000000 4295216771 32704 249475
+12888000000 12888650411 4296000000 4296216803 1032704 1249507
+12891000000 12891650624 4297000000 4297216874 2032704 2249578
+12894000000 12894650754 4298000000 4298216918 3032704 3249622
+12897000000 12897650904 4299000000 4299216968 4032704 4249672
+12900000000 12900651064 4300000000 4300217021 5032704 5249725
+12903000000 12903651160 4301000000 4301217053 6032704 6249757
+12906000000 12906651348 4302000000 4302217116 7032704 7249820
+12909000000 12909651516 4303000000 4303217172 8032704 8249876
+12912000000 12912651652 4304000000 4304217217 9032704 9249921
+12915000000 12915651827 4305000000 4305217275 10032704 10249979
+12918000000 12918651949 4306000000 4306217316 11032704 11250020
+12921000000 12921652099 4307000000 4307217366 12032704 12250070
+12924000000 12924652247 4308000000 4308217415 13032704 13250119
+12927000000 12927652453 4309000000 4309217484 14032704 14250188
+12930000000 12930652567 4310000000 4310217522 15032704 15250226
+12933000000 12933652699 4311000000 4311217566 16032704 16250270
+12936000000 12936652873 4312000000 4312217624 17032704 17250328
+12939000000 12939652992 4313000000 4313217664 18032704 18250368
+12942000000 12942653116 4314000000 4314217705 19032704 19250409
+12945000000 12945653335 4315000000 4315217778 20032704 20250482
+12948000000 12948653471 4316000000 4316217823 21032704 21250527
+12951000000 12951653622 4317000000 4317217874 22032704 22250578
+12954000000 12954653782 4318000000 4318217927 23032704 23250631
+12957000000 12957653903 4319000000 4319217967 24032704 24250671
+12960000000 12960653984 4320000000 4320217994 25032704 25250698
+12963000000 12963654192 4321000000 4321218064 26032704 26250768
+12966000000 12966654347 4322000000 4322218115 27032704 27250819
+12969000000 12969654506 4323000000 4323218168 28032704 28250872
+12972000000 12972654658 4324000000 4324218219 29032704 29250923
+12975000000 12975654780 4325000000 4325218260 30032704 30250964
+12978000000 12978654958 4326000000 4326218319 31032704 31251023
+12981000000 12981655107 4327000000 4327218369 32032704 32251073
+12984000000 12984655235 4328000000 4328218411 33032704 33251115
+12987000000 12987655404 4329000000 4329218468 34032704 34251172
+12990000000 12990655524 4330000000 4330218508 35032704 35251212
+12993000000 12993655451 4331000000 4331218483 36032704 36251187
+12996000000 12996655774 4332000000 4332218591 37032704 37251295
+12999000000 12999656027 4333000000 4333218675 38032704 38251379
+13002000000 13002656137 4334000000 4334218712 39032704 39251416
+13005000000 13005656316 4335000000 4335218772 40032704 40251476
+13008000000 13008656364 4336000000 4336218788 41032704 41251492
+13011000000 13011656618 4337000000 4337218872 42032704 42251576
+13014000000 13014656737 4338000000 4338218912 43032704 43251616
+13017000000 13017656908 4339000000 4339218969 44032704 44251673
+13020000000 13020657055 4340000000 4340219018 45032704 45251722
+13023000000 13023657208 4341000000 4341219069 46032704 46251773
+13026000000 13026657354 4342000000 4342219118 47032704 47251822
+13029000000 13029657498 4343000000 4343219166 48032704 48251870
+13032000000 13032657661 4344000000 4344219220 49032704 49251924
+13035000000 13035657813 4345000000 4345219271 50032704 50251975
+13038000000 13038657967 4346000000 4346219322 51032704 51252026
+13041000000 13041658087 4347000000 4347219362 52032704 52252066
+13044000000 13044658296 4348000000 4348219432 53032704 53252136
+13047000000 13047658426 4349000000 4349219475 54032704 54252179
+13050000000 13050658540 4350000000 4350219513 55032704 55252217
+13053000000 13053658701 4351000000 4351219567 56032704 56252271
+13056000000 13056658836 4352000000 4352219612 57032704 57252316
+13059000000 13059658979 4353000000 4353219659 58032704 58252363
+13062000000 13062659079 4354000000 4354219693 59032704 59252397
+13065000000 13065659313 4355000000 4355219771 60032704 60252475
+13068000000 13068659386 4356000000 4356219795 61032704 61252499
+13071000000 13071659507 4357000000 4357219835 62032704 62252539
+13074000000 13074659696 4358000000 4358219898 63032704 63252602
+13077000000 13077659850 4359000000 4359219950 64032704 64252654
+13080000000 13080660029 4360000000 4360220009 65032704 65252713
+13083000000 13083660175 4361000000 4361220058 66032704 66252762
+13086000000 13086660302 4362000000 4362220100 67032704 67252804
+13089000000 13089660476 4363000000 4363220158 68032704 68252862
+13092000000 13092660540 4364000000 4364220180 69032704 69252884
+13095000000 13095660747 4365000000 4365220249 70032704 70252953
+13098000000 13098660928 4366000000 4366220309 71032704 71253013
+13101000000 13101661077 4367000000 4367220359 72032704 72253063
+13104000000 13104661134 4368000000 4368220378 73032704 73253082
+13107000000 13107661330 4369000000 4369220443 74032704 74253147
+13110000000 13110661520 4370000000 4370220506 75032704 75253210
+13113000000 13113661665 4371000000 4371220555 76032704 76253259
+13116000000 13116661837 4372000000 4372220612 77032704 77253316
+13119000000 13119661970 4373000000 4373220656 78032704 78253360
+13122000000 13122662041 4374000000 4374220680 79032704 79253384
+13125000000 13125662267 4375000000 4375220755 80032704 80253459
+13128000000 13128662427 4376000000 4376220809 81032704 81253513
+13131000000 13131662559 4377000000 4377220853 82032704 82253557
+13134000000 13134662667 4378000000 4378220889 83032704 83253593
+13137000000 13137662878 4379000000 4379220959 84032704 84253663
+13140000000 13140663044 4380000000 4380221014 85032704 85253718
+13143000000 13143663155 4381000000 4381221051 86032704 86253755
+13146000000 13146663315 4382000000 4382221105 87032704 87253809
+13149000000 13149663427 4383000000 4383221142 88032704 88253846
+13152000000 13152663625 4384000000 4384221208 89032704 89253912
+13155000000 13155663715 4385000000 4385221238 90032704 90253942
+13158000000 13158663940 4386000000 4386221313 91032704 91254017
+13161000000 13161664072 4387000000 4387221357 92032704 92254061
+13164000000 13164664211 4388000000 4388221403 93032704 93254107
+13167000000 13167664262 4389000000 4389221420 94032704 94254124
+13170000000 13170664473 4390000000 4390221491 95032704 95254195
+13173000000 13173664682 4391000000 4391221560 96032704 96254264
+13176000000 13176664810 4392000000 4392221603 97032704 97254307
+13179000000 13179664953 4393000000 4393221651 98032704 98254355
+13182000000 13182665124 4394000000 4394221708 99032704 99254412
+13185000000 13185665221 4395000000 4395221740 100032704 100254444
+13188000000 13188665434 4396000000 4396221811 101032704 101254515
+13191000000 13191665564 4397000000 4397221854 102032704 102254558
+13194000000 13194665714 4398000000 4398221904 103032704 103254608
+13197000000 13197665874 4399000000 4399221958 104032704 104254662
+13200000000 13200665970 4400000000 4400221990 105032704 105254694
+13203000000 13203666158 4401000000 4401222052 106032704 106254756
+13206000000 13206666326 4402000000 4402222108 107032704 107254812
+13209000000 13209666462 4403000000 4403222154 108032704 108254858
+13212000000 13212666637 4404000000 4404222212 109032704 109254916
+13215000000 13215666759 4405000000 4405222253 110032704 110254957
+13218000000 13218666909 4406000000 4406222303 111032704 111255007
+13221000000 13221667057 4407000000 4407222352 112032704 112255056
+13224000000 13224667263 4408000000 4408222421 113032704 113255125
+13227000000 13227667377 4409000000 4409222459 114032704 114255163
+13230000000 13230667509 4410000000 4410222503 115032704 115255207
+13233000000 13233667683 4411000000 4411222561 116032704 116255265
+13236000000 13236667802 4412000000 4412222600 117032704 117255304
+13239000000 13239667926 4413000000 4413222642 118032704 118255346
+13242000000 13242668145 4414000000 4414222715 119032704 119255419
+13245000000 13245668281 4415000000 4415222760 120032704 120255464
+13248000000 13248668432 4416000000 4416222810 121032704 121255514
+13251000000 13251668592 4417000000 4417222864 122032704 122255568
+13254000000 13254668713 4418000000 4418222904 123032704 123255608
+13257000000 13257668794 4419000000 4419222931 124032704 124255635
+13260000000 13260669002 4420000000 4420223000 125032704 125255704
+13263000000 13263669157 4421000000 4421223052 126032704 126255756
+13266000000 13266669316 4422000000 4422223105 127032704 127255809
+13269000000 13269669468 4423000000 4423223156 128032704 128255860
+13272000000 13272669590 4424000000 4424223196 129032704 129255900
+13275000000 13275669768 4425000000 4425223256 130032704 130255960
+13278000000 13278669917 4426000000 4426223305 131032704 131256009
+13281000000 13281670045 4427000000 4427223348 132032704 132256052
+13284000000 13284670214 4428000000 4428223404 133032704 133256108
+13287000000 13287670334 4429000000 4429223444 134032704 134256148
+13290000000 13290670261 4430000000 4430223420 135032704 135256124
+13293000000 13293670584 4431000000 4431223528 136032704 136256232
+13296000000 13296670837 4432000000 4432223612 137032704 137256316
+13299000000 13299670947 4433000000 4433223649 138032704 138256353
+13302000000 13302671126 4434000000 4434223708 139032704 139256412
+13305000000 13305671174 4435000000 4435223724 140032704 140256428
+13308000000 13308671428 4436000000 4436223809 141032704 141256513
+13311000000 13311671547 4437000000 4437223849 142032704 142256553
+13314000000 13314671718 4438000000 4438223906 143032704 143256610
+13317000000 13317671865 4439000000 4439223955 144032704 144256659
+13320000000 13320672018 4440000000 4440224006 145032704 145256710
+13323000000 13323672164 4441000000 4441224054 146032704 146256758
+13326000000 13326672308 4442000000 4442224102 147032704 147256806
+13329000000 13329672471 4443000000 4443224157 148032704 148256861
+13332000000 13332672623 4444000000 4444224207 149032704 149256911
+13335000000 13335672777 4445000000 4445224259 150032704 150256963
+13338000000 13338672897 4446000000 4446224299 151032704 151257003
+13341000000 13341673106 4447000000 4447224368 152032704 152257072
+13344000000 13344673236 4448000000 4448224412 153032704 153257116
+13347000000 13347673350 4449000000 4449224450 154032704 154257154
+13350000000 13350673511 4450000000 4450224503 155032704 155257207
+13353000000 13353673646 4451000000 4451224548 156032704 156257252
+13356000000 13356673789 4452000000 4452224596 157032704 157257300
+13359000000 13359673889 4453000000 4453224629 158032704 158257333
+13362000000 13362674123 4454000000 4454224707 159032704 159257411
+13365000000 13365674196 4455000000 4455224732 160032704 160257436
+13368000000 13368674317 4456000000 4456224772 161032704 161257476
+13371000000 13371674506 4457000000 4457224835 162032704 162257539
+13374000000 13374674660 4458000000 4458224886 163032704 163257590
+13377000000 13377674839 4459000000 4459224946 164032704 164257650
+13380000000 13380674985 4460000000 4460224995 165032704 165257699
+13383000000 13383675112 4461000000 4461225037 166032704 166257741
+13386000000 13386675286 4462000000 4462225095 167032704 167257799
+13389000000 13389675350 4463000000 4463225116 168032704 168257820
+13392000000 13392675557 4464000000 4464225185 169032704 169257889
+13395000000 13395675738 4465000000 4465225246 170032704 170257950
+13398000000 13398675887 4466000000 4466225295 171032704 171257999
+13401000000 13401675944 4467000000 4467225314 172032704 172258018
+13404000000 13404676140 4468000000 4468225380 173032704 173258084
+13407000000 13407676330 4469000000 4469225443 174032704 174258147
+13410000000 13410676475 4470000000 4470225491 175032704 175258195
+13413000000 13413676647 4471000000 4471225549 176032704 176258253
+13416000000 13416676780 4472000000 4472225593 177032704 177258297
+13419000000 13419676851 4473000000 4473225617 178032704 178258321
+13422000000 13422677077 4474000000 4474225692 179032704 179258396
+13425000000 13425677237 4475000000 4475225745 180032704 180258449
+13428000000 13428677369 4476000000 4476225789 181032704 181258493
+13431000000 13431677477 4477000000 4477225825 182032704 182258529
+13434000000 13434677688 4478000000 4478225896 183032704 183258600
+13437000000 13437677854 4479000000 4479225951 184032704 184258655
+13440000000 13440677965 4480000000 4480225988 185032704 185258692
+13443000000 13443678125 4481000000 4481226041 186032704 186258745
+13446000000 13446678237 4482000000 4482226079 187032704 187258783
+13449000000 13449678435 4483000000 4483226145 188032704 188258849
+13452000000 13452678525 4484000000 4484226175 189032704 189258879
+13455000000 13455678750 4485000000 4485226250 190032704 190258954
+13458000000 13458678882 4486000000 4486226294 191032704 191258998
+13461000000 13461679021 4487000000 4487226340 192032704 192259044
+13464000000 13464679072 4488000000 4488226357 193032704 193259061
+13467000000 13467679283 4489000000 4489226427 194032704 194259131
+13470000000 13470679492 4490000000 4490226497 195032704 195259201
+13473000000 13473679620 4491000000 4491226540 196032704 196259244
+13476000000 13476679763 4492000000 4492226587 197032704 197259291
+13479000000 13479679934 4493000000 4493226644 198032704 198259348
+13482000000 13482680031 4494000000 4494226677 199032704 199259381
+13485000000 13485680244 4495000000 4495226748 200032704 200259452
+13488000000 13488680374 4496000000 4496226791 201032704 201259495
+13491000000 13491680524 4497000000 4497226841 202032704 202259545
+13494000000 13494680684 4498000000 4498226894 203032704 203259598
+13497000000 13497680780 4499000000 4499226926 204032704 204259630
+13500000000 13500680968 4500000000 4500226989 205032704 205259693
+13503000000 13503681136 4501000000 4501227045 206032704 206259749
+13506000000 13506681272 4502000000 4502227090 207032704 207259794
+13509000000 13509681447 4503000000 4503227149 208032704 208259853
+13512000000 13512681569 4504000000 4504227189 209032704 209259893
+13515000000 13515681719 4505000000 4505227239 210032704 210259943
+13518000000 13518681867 4506000000 4506227289 211032704 211259993
+13521000000 13521682073 4507000000 4507227357 212032704 212260061
+13524000000 13524682187 4508000000 4508227395 213032704 213260099
+13527000000 13527682319 4509000000 4509227439 214032704 214260143
+13530000000 13530682493 4510000000 4510227497 215032704 215260201
+13533000000 13533682612 4511000000 4511227537 216032704 216260241
+13536000000 13536682736 4512000000 4512227578 217032704 217260282
+13539000000 13539682955 4513000000 4513227651 218032704 218260355
+13542000000 13542683091 4514000000 4514227697 219032704 219260401
+13545000000 13545683242 4515000000 4515227747 220032704 220260451
+13548000000 13548683402 4516000000 4516227800 221032704 221260504
+13551000000 13551683523 4517000000 4517227841 222032704 222260545
+13554000000 13554683604 4518000000 4518227868 223032704 223260572
+13557000000 13557683812 4519000000 4519227937 224032704 224260641
+13560000000 13560683967 4520000000 4520227989 225032704 225260693
+13563000000 13563684126 4521000000 4521228042 226032704 226260746
+13566000000 13566684278 4522000000 4522228092 227032704 227260796
+13569000000 13569684400 4523000000 4523228133 228032704 228260837
+13572000000 13572684578 4524000000 4524228192 229032704 229260896
+13575000000 13575684727 4525000000 4525228242 230032704 230260946
+13578000000 13578684855 4526000000 4526228285 231032704 231260989
+13581000000 13581685024 4527000000 4527228341 232032704 232261045
+13584000000 13584685144 4528000000 4528228381 233032704 233261085
+13587000000 13587685071 4529000000 4529228357 234032704 234261061
+13590000000 13590685394 4530000000 4530228464 235032704 235261168
+13593000000 13593685647 4531000000 4531228549 236032704 236261253
+13596000000 13596685757 4532000000 4532228585 237032704 237261289
+13599000000 13599685936 4533000000 4533228645 238032704 238261349
+13602000000 13602685984 4534000000 4534228661 239032704 239261365
+13605000000 13605686238 4535000000 4535228746 240032704 240261450
+13608000000 13608686357 4536000000 4536228785 241032704 241261489
+13611000000 13611686528 4537000000 4537228842 242032704 242261546
+13614000000 13614686675 4538000000 4538228891 243032704 243261595
+13617000000 13617686828 4539000000 4539228942 244032704 244261646
+13620000000 13620686974 4540000000 4540228991 245032704 245261695
+13623000000 13623687118 4541000000 4541229039 246032704 246261743
+13626000000 13626687281 4542000000 4542229093 247032704 247261797
+13629000000 13629687433 4543000000 4543229144 248032704 248261848
+13632000000 13632687587 4544000000 4544229195 249032704 249261899
+13635000000 13635687707 4545000000 4545229235 250032704 250261939
+13638000000 13638687916 4546000000 4546229305 251032704 251262009
+13641000000 13641688046 4547000000 4547229348 252032704 252262052
+13644000000 13644688160 4548000000 4548229386 253032704 253262090
+13647000000 13647688321 4549000000 4549229440 254032704 254262144
+13650000000 13650688456 4550000000 4550229485 255032704 255262189
+13653000000 13653688599 4551000000 4551229533 256032704 256262237
+13656000000 13656688699 4552000000 4552229566 257032704 257262270
+13659000000 13659688933 4553000000 4553229644 258032704 258262348
+13662000000 13662689006 4554000000 4554229668 259032704 259262372
+13665000000 13665689127 4555000000 4555229709 260032704 260262413
+13668000000 13668689316 4556000000 4556229772 261032704 261262476
+13671000000 13671689470 4557000000 4557229823 262032704 262262527
+13674000000 13674689649 4558000000 4558229883 263032704 263262587
+13677000000 13677689795 4559000000 4559229931 264032704 264262635
+13680000000 13680689922 4560000000 4560229974 265032704 265262678
+13683000000 13683690096 4561000000 4561230032 266032704 266262736
+13686000000 13686690160 4562000000 4562230053 267032704 267262757
+13689000000 13689690367 4563000000 4563230122 268032704 268262826
+13692000000 13692690548 4564000000 4564230182 269032704 269262886
+13695000000 13695690697 4565000000 4565230232 270032704 270262936
+13698000000 13698690754 4566000000 4566230251 271032704 271262955
+13701000000 13701690950 4567000000 4567230316 272032704 272263020
+13704000000 13704691140 4568000000 4568230380 273032704 273263084
+13707000000 13707691285 4569000000 4569230428 274032704 274263132
+13710000000 13710691457 4570000000 4570230485 275032704 275263189
+13713000000 13713691590 4571000000 4571230530 276032704 276263234
+13716000000 13716691661 4572000000 4572230553 277032704 277263257
+13719000000 13719691887 4573000000 4573230629 278032704 278263333
+13722000000 13722692047 4574000000 4574230682 279032704 279263386
+13725000000 13725692179 4575000000 4575230726 280032704 280263430
+13728000000 13728692287 4576000000 4576230762 281032704 281263466
+13731000000 13731692498 4577000000 4577230832 282032704 282263536
+13734000000 13734692664 4578000000 4578230888 283032704 283263592
+13737000000 13737692775 4579000000 4579230925 284032704 284263629
+13740000000 13740692935 4580000000 4580230978 285032704 285263682
+13743000000 13743693047 4581000000 4581231015 286032704 286263719
+13746000000 13746693245 4582000000 4582231081 287032704 287263785
+13749000000 13749693335 4583000000 4583231111 288032704 288263815
+13752000000 13752693560 4584000000 4584231186 289032704 289263890
+13755000000 13755693692 4585000000 4585231230 290032704 290263934
+13758000000 13758693831 4586000000 4586231277 291032704 291263981
+13761000000 13761693882 4587000000 4587231294 292032704 292263998
+13764000000 13764694093 4588000000 4588231364 293032704 293264068
+13767000000 13767694302 4589000000 4589231434 294032704 294264138
+13770000000 13770694430 4590000000 4590231476 295032704 295264180
+13773000000 13773694573 4591000000 4591231524 296032704 296264228
+13776000000 13776694744 4592000000 4592231581 297032704 297264285
+13779000000 13779694841 4593000000 4593231613 298032704 298264317
+13782000000 13782695054 4594000000 4594231684 299032704 299264388
+13785000000 13785695184 4595000000 4595231728 300032704 300264432
+13788000000 13788695334 4596000000 4596231778 301032704 301264482
+13791000000 13791695494 4597000000 4597231831 302032704 302264535
+13794000000 13794695590 4598000000 4598231863 303032704 303264567
+13797000000 13797695778 4599000000 4599231926 304032704 304264630
+13800000000 13800695946 4600000000 4600231982 305032704 305264686
+13803000000 13803696082 4601000000 4601232027 306032704 306264731
+13806000000 13806696257 4602000000 4602232085 307032704 307264789
+13809000000 13809696379 4603000000 4603232126 308032704 308264830
+13812000000 13812696529 4604000000 4604232176 309032704 309264880
+13815000000 13815696677 4605000000 4605232225 310032704 310264929
+13818000000 13818696883 4606000000 4606232294 311032704 311264998
+13821000000 13821696997 4607000000 4607232332 312032704 312265036
+13824000000 13824697129 4608000000 4608232376 313032704 313265080
+13827000000 13827697303 4609000000 4609232434 314032704 314265138
+13830000000 13830697422 4610000000 4610232474 315032704 315265178
+13833000000 13833697546 4611000000 4611232515 316032704 316265219
+13836000000 13836697765 4612000000 4612232588 317032704 317265292
+13839000000 13839697901 4613000000 4613232633 318032704 318265337
+13842000000 13842698052 4614000000 4614232684 319032704 319265388
+13845000000 13845698212 4615000000 4615232737 320032704 320265441
+13848000000 13848698333 4616000000 4616232777 321032704 321265481
+13851000000 13851698414 4617000000 4617232804 322032704 322265508
+13854000000 13854698622 4618000000 4618232874 323032704 323265578
+13857000000 13857698777 4619000000 4619232925 324032704 324265629
+13860000000 13860698936 4620000000 4620232978 325032704 325265682
+13863000000 13863699088 4621000000 4621233029 326032704 326265733
+13866000000 13866699210 4622000000 4622233070 327032704 327265774
+13869000000 13869699388 4623000000 4623233129 328032704 328265833
+13872000000 13872699537 4624000000 4624233179 329032704 329265883
+13875000000 13875699665 4625000000 4625233221 330032704 330265925
+13878000000 13878699834 4626000000 4626233278 331032704 331265982
+13881000000 13881699954 4627000000 4627233318 332032704 332266022
+13884000000 13884699881 4628000000 4628233293 333032704 333265997
+13887000000 13887700204 4629000000 4629233401 334032704 334266105
+13890000000 13890700457 4630000000 4630233485 335032704 335266189
+13893000000 13893700567 4631000000 4631233522 336032704 336266226
+13896000000 13896700746 4632000000 4632233582 337032704 337266286
+13899000000 13899700794 4633000000 4633233598 338032704 338266302
+13902000000 13902701048 4634000000 4634233682 339032704 339266386
+13905000000 13905701167 4635000000 4635233722 340032704 340266426
+13908000000 13908701338 4636000000 4636233779 341032704 341266483
+13911000000 13911701485 4637000000 4637233828 342032704 342266532
+13914000000 13914701638 4638000000 4638233879 343032704 343266583
+13917000000 13917701784 4639000000 4639233928 344032704 344266632
+13920000000 13920701928 4640000000 4640233976 345032704 345266680
+13923000000 13923702091 4641000000 4641234030 346032704 346266734
+13926000000 13926702243 4642000000 4642234081 347032704 347266785
+13929000000 13929702397 4643000000 4643234132 348032704 348266836
+13932000000 13932702517 4644000000 4644234172 349032704 349266876
+13935000000 13935702726 4645000000 4645234242 350032704 350266946
+13938000000 13938702856 4646000000 4646234285 351032704 351266989
+13941000000 13941702970 4647000000 4647234323 352032704 352267027
+13944000000 13944703131 4648000000 4648234377 353032704 353267081
+13947000000 13947703266 4649000000 4649234422 354032704 354267126
+13950000000 13950703409 4650000000 4650234469 355032704 355267173
+13953000000 13953703509 4651000000 4651234503 356032704 356267207
+13956000000 13956703743 4652000000 4652234581 357032704 357267285
+13959000000 13959703816 4653000000 4653234605 358032704 358267309
+13962000000 13962703937 4654000000 4654234645 359032704 359267349
+13965000000 13965704126 4655000000 4655234708 360032704 360267412
+13968000000 13968704280 4656000000 4656234760 361032704 361267464
+13971000000 13971704459 4657000000 4657234819 362032704 362267523
+13974000000 13974704605 4658000000 4658234868 363032704 363267572
+13977000000 13977704732 4659000000 4659234910 364032704 364267614
+13980000000 13980704906 4660000000 4660234968 365032704 365267672
+13983000000 13983704970 4661000000 4661234990 366032704 366267694
+13986000000 13986705177 4662000000 4662235059 367032704 367267763
+13989000000 13989705358 4663000000 4663235119 368032704 368267823
+13992000000 13992705507 4664000000 4664235169 369032704 369267873
+13995000000 13995705564 4665000000 4665235188 370032704 370267892
+13998000000 13998705760 4666000000 4666235253 371032704 371267957
+14001000000 14001705950 4667000000 4667235316 372032704 372268020
+14004000000 14004706095 4668000000 4668235365 373032704 373268069
+14007000000 14007706267 4669000000 4669235422 374032704 374268126
+14010000000 14010706400 4670000000 4670235466 375032704 375268170
+14013000000 14013706471 4671000000 4671235490 376032704 376268194
+14016000000 14016706697 4672000000 4672235565 377032704 377268269
+14019000000 14019706857 4673000000 4673235619 378032704 378268323
+14022000000 14022706989 4674000000 4674235663 379032704 379268367
+14025000000 14025707097 4675000000 4675235699 380032704 380268403
+14028000000 14028707308 4676000000 4676235769 381032704 381268473
+14031000000 14031707474 4677000000 4677235824 382032704 382268528
+14034000000 14034707585 4678000000 4678235861 383032704 383268565
+14037000000 14037707745 4679000000 4679235915 384032704 384268619
+14040000000 14040707857 4680000000 4680235952 385032704 385268656
+14043000000 14043708055 4681000000 4681236018 386032704 386268722
+14046000000 14046708145 4682000000 4682236048 387032704 387268752
+14049000000 14049708370 4683000000 4683236123 388032704 388268827
+14052000000 14052708502 4684000000 4684236167 389032704 389268871
+14055000000 14055708641 4685000000 4685236213 390032704 390268917
+14058000000 14058708692 4686000000 4686236230 391032704 391268934
+14061000000 14061708903 4687000000 4687236301 392032704 392269005
+14064000000 14064709112 4688000000 4688236370 393032704 393269074
+14067000000 14067709240 4689000000 4689236413 394032704 394269117
+14070000000 14070709383 4690000000 4690236461 395032704 395269165
+14073000000 14073709554 4691000000 4691236518 396032704 396269222
+14076000000 14076709651 4692000000 4692236550 397032704 397269254
+14079000000 14079709864 4693000000 4693236621 398032704 398269325
+14082000000 14082709994 4694000000 4694236664 399032704 399269368
+14085000000 14085710144 4695000000 4695236714 400032704 400269418
+14088000000 14088710304 4696000000 4696236768 401032704 401269472
+14091000000 14091710400 4697000000 4697236800 402032704 402269504
+14094000000 14094710588 4698000000 4698236862 403032704 403269566
+14097000000 14097710756 4699000000 4699236918 404032704 404269622
+14100000000 14100710892 4700000000 4700236964 405032704 405269668
+14103000000 14103711067 4701000000 4701237022 406032704 406269726
+14106000000 14106711189 4702000000 4702237063 407032704 407269767
+14109000000 14109711339 4703000000 4703237113 408032704 408269817
+14112000000 14112711487 4704000000 4704237162 409032704 409269866
+14115000000 14115711693 4705000000 4705237231 410032704 410269935
+14118000000 14118711807 4706000000 4706237269 411032704 411269973
+14121000000 14121711939 4707000000 4707237313 412032704 412270017
+14124000000 14124712113 4708000000 4708237371 413032704 413270075
+14127000000 14127712232 4709000000 4709237410 414032704 414270114
+14130000000 14130712356 4710000000 4710237452 415032704 415270156
+14133000000 14133712575 4711000000 4711237525 416032704 416270229
+14136000000 14136712711 4712000000 4712237570 417032704 417270274
+14139000000 14139712862 4713000000 4713237620 418032704 418270324
+14142000000 14142713022 4714000000 4714237674 419032704 419270378
+14145000000 14145713143 4715000000 4715237714 420032704 420270418
+14148000000 14148713224 4716000000 4716237741 421032704 421270445
+14151000000 14151713432 4717000000 4717237810 422032704 422270514
+14154000000 14154713587 4718000000 4718237862 423032704 423270566
+14157000000 14157713746 4719000000 4719237915 424032704 424270619
+14160000000 14160713898 4720000000 4720237966 425032704 425270670
+14163000000 14163714020 4721000000 4721238006 426032704 426270710
+14166000000 14166714198 4722000000 4722238066 427032704 427270770
+14169000000 14169714347 4723000000 4723238115 428032704 428270819
+14172000000 14172714475 4724000000 4724238158 429032704 429270862
+14175000000 14175714644 4725000000 4725238214 430032704 430270918
+14178000000 14178714764 4726000000 4726238254 431032704 431270958
+14181000000 14181714691 4727000000 4727238230 432032704 432270934
+14184000000 14184715014 4728000000 4728238338 433032704 433271042
+14187000000 14187715267 4729000000 4729238422 434032704 434271126
+14190000000 14190715377 4730000000 4730238459 435032704 435271163
+14193000000 14193715556 4731000000 4731238518 436032704 436271222
+14196000000 14196715604 4732000000 4732238534 437032704 437271238
+14199000000 14199715858 4733000000 4733238619 438032704 438271323
+14202000000 14202715977 4734000000 4734238659 439032704 439271363
+14205000000 14205716148 4735000000 4735238716 440032704 440271420
+14208000000 14208716295 4736000000 4736238765 441032704 441271469
+14211000000 14211716448 4737000000 4737238816 442032704 442271520
+14214000000 14214716594 4738000000 4738238864 443032704 443271568
+14217000000 14217716738 4739000000 4739238912 444032704 444271616
+14220000000 14220716901 4740000000 4740238967 445032704 445271671
+14223000000 14223717053 4741000000 4741239017 446032704 446271721
+14226000000 14226717207 4742000000 4742239069 447032704 447271773
+14229000000 14229717327 4743000000 4743239109 448032704 448271813
+14232000000 14232717536 4744000000 4744239178 449032704 449271882
+14235000000 14235717666 4745000000 4745239222 450032704 450271926
+14238000000 14238717780 4746000000 4746239260 451032704 451271964
+14241000000 14241717941 4747000000 4747239313 452032704 452272017
+14244000000 14244718076 4748000000 4748239358 453032704 453272062
+14247000000 14247718219 4749000000 4749239406 454032704 454272110
+14250000000 14250718319 4750000000 4750239439 455032704 455272143
+14253000000 14253718553 4751000000 4751239517 456032704 456272221
+14256000000 14256718626 4752000000 4752239542 457032704 457272246
+14259000000 14259718747 4753000000 4753239582 458032704 458272286
+14262000000 14262718936 4754000000 4754239645 459032704 459272349
+14265000000 14265719090 4755000000 4755239696 460032704 460272400
+14268000000 14268719269 4756000000 4756239756 461032704 461272460
+14271000000 14271719415 4757000000 4757239805 462032704 462272509
+14274000000 14274719542 4758000000 4758239847 463032704 463272551
+14277000000 14277719716 4759000000 4759239905 464032704 464272609
+14280000000 14280719780 4760000000 4760239926 465032704 465272630
+14283000000 14283719987 4761000000 4761239995 466032704 466272699
+14286000000 14286720168 4762000000 4762240056 467032704 467272760
+14289000000 14289720317 4763000000 4763240105 468032704 468272809
+14292000000 14292720374 4764000000 4764240124 469032704 469272828
+14295000000 14295720570 4765000000 4765240190 470032704 470272894
+14298000000 14298720760 4766000000 4766240253 471032704 471272957
+14301000000 14301720905 4767000000 4767240301 472032704 472273005
+14304000000 14304721077 4768000000 4768240359 473032704 473273063
+14307000000 14307721210 4769000000 4769240403 474032704 474273107
+14310000000 14310721281 4770000000 4770240427 475032704 475273131
+14313000000 14313721507 4771000000 4771240502 476032704 476273206
+14316000000 14316721667 4772000000 4772240555 477032704 477273259
+14319000000 14319721799 4773000000 4773240599 478032704 478273303
+14322000000 14322721907 4774000000 4774240635 479032704 479273339
+14325000000 14325722118 4775000000 4775240706 480032704 480273410
+14328000000 14328722284 4776000000 4776240761 481032704 481273465
+14331000000 14331722395 4777000000 4777240798 482032704 482273502
+14334000000 14334722555 4778000000 4778240851 483032704 483273555
+14337000000 14337722667 4779000000 4779240889 484032704 484273593
+14340000000 14340722865 4780000000 4780240955 485032704 485273659
+14343000000 14343722955 4781000000 4781240985 486032704 486273689
+14346000000 14346723180 4782000000 4782241060 487032704 487273764
+14349000000 14349723312 4783000000 4783241104 488032704 488273808
+14352000000 14352723451 4784000000 4784241150 489032704 489273854
+14355000000 14355723502 4785000000 4785241167 490032704 490273871
+14358000000 14358723713 4786000000 4786241237 491032704 491273941
+14361000000 14361723922 4787000000 4787241307 492032704 492274011
+14364000000 14364724050 4788000000 4788241350 493032704 493274054
+14367000000 14367724193 4789000000 4789241397 494032704 494274101
+14370000000 14370724364 4790000000 4790241454 495032704 495274158
+14373000000 14373724461 4791000000 4791241487 496032704 496274191
+14376000000 14376724674 4792000000 4792241558 497032704 497274262
+14379000000 14379724804 4793000000 4793241601 498032704 498274305
+14382000000 14382724954 4794000000 4794241651 499032704 499274355
+14385000000 14385725114 4795000000 4795241704 500032704 500274408
+14388000000 14388725210 4796000000 4796241736 501032704 501274440
+14391000000 14391725398 4797000000 4797241799 502032704 502274503
+14394000000 14394725566 4798000000 4798241855 503032704 503274559
+14397000000 14397725702 4799000000 4799241900 504032704 504274604
+14400000000 14400725877 4800000000 4800241959 505032704 505274663
+14403000000 14403725999 4801000000 4801241999 506032704 506274703
+14406000000 14406726149 4802000000 4802242049 507032704 507274753
+14409000000 14409726297 4803000000 4803242099 508032704 508274803
+14412000000 14412726503 4804000000 4804242167 509032704 509274871
+14415000000 14415726617 4805000000 4805242205 510032704 510274909
+14418000000 14418726749 4806000000 4806242249 511032704 511274953
+14421000000 14421726923 4807000000 4807242307 512032704 512275011
+14424000000 14424727042 4808000000 4808242347 513032704 513275051
+14427000000 14427727166 4809000000 4809242388 514032704 514275092
+14430000000 14430727385 4810000000 4810242461 515032704 515275165
+14433000000 14433727521 4811000000 4811242507 516032704 516275211
+14436000000 14436727672 4812000000 4812242557 517032704 517275261
+14439000000 14439727832 4813000000 4813242610 518032704 518275314
+14442000000 14442727953 4814000000 4814242651 519032704 519275355
+14445000000 14445728034 4815000000 4815242678 520032704 520275382
+14448000000 14448728242 4816000000 4816242747 521032704 521275451
+14451000000 14451728397 4817000000 4817242799 522032704 522275503
+14454000000 14454728556 4818000000 4818242852 523032704 523275556
+14457000000 14457728708 4819000000 4819242902 524032704 524275606
+14460000000 14460728830 4820000000 4820242943 525032704 525275647
+14463000000 14463729008 4821000000 4821243002 526032704 526275706
+14466000000 14466729157 4822000000 4822243052 527032704 527275756
+14469000000 14469729285 4823000000 4823243095 528032704 528275799
+14472000000 14472729454 4824000000 4824243151 529032704 529275855
+14475000000 14475729574 4825000000 4825243191 530032704 530275895
+14478000000 14478729501 4826000000 4826243167 531032704 531275871
+14481000000 14481729824 4827000000 4827243274 532032704 532275978
+14484000000 14484730077 4828000000 4828243359 533032704 533276063
+14487000000 14487730187 4829000000 4829243395 534032704 534276099
+14490000000 14490730366 4830000000 4830243455 535032704 535276159
+14493000000 14493730414 4831000000 4831243471 536032704 536276175
+14496000000 14496730668 4832000000 4832243556 537032704 537276260
+14499000000 14499730787 4833000000 4833243595 538032704 538276299
+14502000000 14502730958 4834000000 4834243652 539032704 539276356
+14505000000 14505731105 4835000000 4835243701 540032704 540276405
+14508000000 14508731258 4836000000 4836243752 541032704 541276456
+14511000000 14511731404 4837000000 4837243801 542032704 542276505
+14514000000 14514731548 4838000000 4838243849 543032704 543276553
+14517000000 14517731711 4839000000 4839243903 544032704 544276607
+14520000000 14520731863 4840000000 4840243954 545032704 545276658
+14523000000 14523732017 4841000000 4841244005 546032704 546276709
+14526000000 14526732137 4842000000 4842244045 547032704 547276749
+14529000000 14529732346 4843000000 4843244115 548032704 548276819
+14532000000 14532732476 4844000000 4844244158 549032704 549276862
+14535000000 14535732590 4845000000 4845244196 550032704 550276900
+14538000000 14538732751 4846000000 4846244250 551032704 551276954
+14541000000 14541732886 4847000000 4847244295 552032704 552276999
+14544000000 14544733029 4848000000 4848244343 553032704 553277047
+14547000000 14547733129 4849000000 4849244376 554032704 554277080
+14550000000 14550733363 4850000000 4850244454 555032704 555277158
+14553000000 14553733436 4851000000 4851244478 556032704 556277182
+14556000000 14556733557 4852000000 4852244519 557032704 557277223
+14559000000 14559733746 4853000000 4853244582 558032704 558277286
+14562000000 14562733900 4854000000 4854244633 559032704 559277337
+14565000000 14565734079 4855000000 4855244693 560032704 560277397
+14568000000 14568734225 4856000000 4856244741 561032704 561277445
+14571000000 14571734352 4857000000 4857244784 562032704 562277488
+14574000000 14574734526 4858000000 4858244842 563032704 563277546
+14577000000 14577734590 4859000000 4859244863 564032704 564277567
+14580000000 14580734797 4860000000 4860244932 565032704 565277636
+14583000000 14583734978 4861000000 4861244992 566032704 566277696
+14586000000 14586735127 4862000000 4862245042 567032704 567277746
+14589000000 14589735184 4863000000 4863245061 568032704 568277765
+14592000000 14592735380 4864000000 4864245126 569032704 569277830
+14595000000 14595735570 4865000000 4865245190 570032704 570277894
+14598000000 14598735715 4866000000 4866245238 571032704 571277942
+14601000000 14601735887 4867000000 4867245295 572032704 572277999
+14604000000 14604736020 4868000000 4868245340 573032704 573278044
+14607000000 14607736091 4869000000 4869245363 574032704 574278067
+14610000000 14610736317 4870000000 4870245439 575032704 575278143
+14613000000 14613736477 4871000000 4871245492 576032704 576278196
+14616000000 14616736609 4872000000 4872245536 577032704 577278240
+14619000000 14619736717 4873000000 4873245572 578032704 578278276
+14622000000 14622736928 4874000000 4874245642 579032704 579278346
+14625000000 14625737094 4875000000 4875245698 580032704 580278402
+14628000000 14628737205 4876000000 4876245735 581032704 581278439
+14631000000 14631737365 4877000000 4877245788 582032704 582278492
+14634000000 14634737477 4878000000 4878245825 583032704 583278529
+14637000000 14637737675 4879000000 4879245891 584032704 584278595
+14640000000 14640737765 4880000000 4880245921 585032704 585278625
+14643000000 14643737990 4881000000 4881245996 586032704 586278700
+14646000000 14646738122 4882000000 4882246040 587032704 587278744
+14649000000 14649738261 4883000000 4883246087 588032704 588278791
+14652000000 14652738312 4884000000 4884246104 589032704 589278808
+14655000000 14655738523 4885000000 4885246174 590032704 590278878
+14658000000 14658738732 4886000000 4886246244 591032704 591278948
+14661000000 14661738860 4887000000 4887246286 592032704 592278990
+14664000000 14664739003 4888000000 4888246334 593032704 593279038
+14667000000 14667739174 4889000000 4889246391 594032704 594279095
+14670000000 14670739271 4890000000 4890246423 595032704 595279127
+14673000000 14673739484 4891000000 4891246494 596032704 596279198
+14676000000 14676739614 4892000000 4892246538 597032704 597279242
+14679000000 14679739764 4893000000 4893246588 598032704 598279292
+14682000000 14682739924 4894000000 4894246641 599032704 599279345
+14685000000 14685740020 4895000000 4895246673 600032704 600279377
+14688000000 14688740208 4896000000 4896246736 601032704 601279440
+14691000000 14691740376 4897000000 4897246792 602032704 602279496
+14694000000 14694740512 4898000000 4898246837 603032704 603279541
+14697000000 14697740687 4899000000 4899246895 604032704 604279599
+14700000000 14700740809 4900000000 4900246936 605032704 605279640
+14703000000 14703740959 4901000000 4901246986 606032704 606279690
+14706000000 14706741107 4902000000 4902247035 607032704 607279739
+14709000000 14709741313 4903000000 4903247104 608032704 608279808
+14712000000 14712741427 4904000000 4904247142 609032704 609279846
+14715000000 14715741559 4905000000 4905247186 610032704 610279890
+14718000000 14718741733 4906000000 4906247244 611032704 611279948
+14721000000 14721741852 4907000000 4907247284 612032704 612279988
+14724000000 14724741976 4908000000 4908247325 613032704 613280029
+14727000000 14727742195 4909000000 4909247398 614032704 614280102
+14730000000 14730742331 4910000000 4910247443 615032704 615280147
+14733000000 14733742482 4911000000 4911247494 616032704 616280198
+14736000000 14736742642 4912000000 4912247547 617032704 617280251
+14739000000 14739742763 4913000000 4913247587 618032704 618280291
+14742000000 14742742844 4914000000 4914247614 619032704 619280318
+14745000000 14745743052 4915000000 4915247684 620032704 620280388
+14748000000 14748743207 4916000000 4916247735 621032704 621280439
+14751000000 14751743366 4917000000 4917247788 622032704 622280492
+14754000000 14754743518 4918000000 4918247839 623032704 623280543
+14757000000 14757743640 4919000000 4919247880 624032704 624280584
+14760000000 14760743818 4920000000 4920247939 625032704 625280643
+14763000000 14763743967 4921000000 4921247989 626032704 626280693
+14766000000 14766744095 4922000000 4922248031 627032704 627280735
+14769000000 14769744264 4923000000 4923248088 628032704 628280792
+14772000000 14772744384 4924000000 4924248128 629032704 629280832
+14775000000 14775744311 4925000000 4925248103 630032704 630280807
+14778000000 14778744634 4926000000 4926248211 631032704 631280915
+14781000000 14781744887 4927000000 4927248295 632032704 632280999
+14784000000 14784744997 4928000000 4928248332 633032704 633281036
+14787000000 14787745176 4929000000 4929248392 634032704 634281096
+14790000000 14790745224 4930000000 4930248408 635032704 635281112
+14793000000 14793745478 4931000000 4931248492 636032704 636281196
+14796000000 14796745597 4932000000 4932248532 637032704 637281236
+14799000000 14799745768 4933000000 4933248589 638032704 638281293
+14802000000 14802745915 4934000000 4934248638 639032704 639281342
+14805000000 14805746068 4935000000 4935248689 640032704 640281393
+14808000000 14808746214 4936000000 4936248738 641032704 641281442
+14811000000 14811746358 4937000000 4937248786 642032704 642281490
+14814000000 14814746521 4938000000 4938248840 643032704 643281544
+14817000000 14817746673 4939000000 4939248891 644032704 644281595
+14820000000 14820746827 4940000000 4940248942 645032704 645281646
+14823000000 14823746947 4941000000 4941248982 646032704 646281686
+14826000000 14826747156 4942000000 4942249052 647032704 647281756
+14829000000 14829747286 4943000000 4943249095 648032704 648281799
+14832000000 14832747400 4944000000 4944249133 649032704 649281837
+14835000000 14835747561 4945000000 4945249187 650032704 650281891
+14838000000 14838747696 4946000000 4946249232 651032704 651281936
+14841000000 14841747839 4947000000 4947249279 652032704 652281983
+14844000000 14844747939 4948000000 4948249313 653032704 653282017
+14847000000 14847748173 4949000000 4949249391 654032704 654282095
+14850000000 14850748246 4950000000 4950249415 655032704 655282119
+14853000000 14853748367 4951000000 4951249455 656032704 656282159
+14856000000 14856748556 4952000000 4952249518 657032704 657282222
+14859000000 14859748710 4953000000 4953249570 658032704 658282274
+14862000000 14862748889 4954000000 4954249629 659032704 659282333
+14865000000 14865749035 4955000000 4955249678 660032704 660282382
+14868000000 14868749162 4956000000 4956249720 661032704 661282424
+14871000000 14871749336 4957000000 4957249778 662032704 662282482
+14874000000 14874749400 4958000000 4958249800 663032704 663282504
+14877000000 14877749607 4959000000 4959249869 664032704 664282573
+14880000000 14880749788 4960000000 4960249929 665032704 665282633
+14883000000 14883749937 4961000000 4961249979 666032704 666282683
+14886000000 14886749994 4962000000 4962249998 667032704 667282702
+14889000000 14889750190 4963000000 4963250063 668032704 668282767
+14892000000 14892750380 4964000000 4964250126 669032704 669282830
+14895000000 14895750525 4965000000 4965250175 670032704 670282879
+14898000000 14898750697 4966000000 4966250232 671032704 671282936
+14901000000 14901750830 4967000000 4967250276 672032704 672282980
+14904000000 14904750901 4968000000 4968250300 673032704 673283004
+14907000000 14907751127 4969000000 4969250375 674032704 674283079
+14910000000 14910751287 4970000000 4970250429 675032704 675283133
+14913000000 14913751419 4971000000 4971250473 676032704 676283177
+14916000000 14916751527 4972000000 4972250509 677032704 677283213
+14919000000 14919751738 4973000000 4973250579 678032704 678283283
+14922000000 14922751904 4974000000 4974250634 679032704 679283338
+14925000000 14925752015 4975000000 4975250671 680032704 680283375
+14928000000 14928752175 4976000000 4976250725 681032704 681283429
+14931000000 14931752287 4977000000 4977250762 682032704 682283466
+14934000000 14934752485 4978000000 4978250828 683032704 683283532
+14937000000 14937752575 4979000000 4979250858 684032704 684283562
+14940000000 14940752800 4980000000 4980250933 685032704 685283637
+14943000000 14943752932 4981000000 4981250977 686032704 686283681
+14946000000 14946753071 4982000000 4982251023 687032704 687283727
+14949000000 14949753122 4983000000 4983251040 688032704 688283744
+14952000000 14952753333 4984000000 4984251111 689032704 689283815
+14955000000 14955753542 4985000000 4985251180 690032704 690283884
+14958000000 14958753670 4986000000 4986251223 691032704 691283927
+14961000000 14961753813 4987000000 4987251271 692032704 692283975
+14964000000 14964753984 4988000000 4988251328 693032704 693284032
+14967000000 14967754081 4989000000 4989251360 694032704 694284064
+14970000000 14970754294 4990000000 4990251431 695032704 695284135
+14973000000 14973754424 4991000000 4991251474 696032704 696284178
+14976000000 14976754574 4992000000 4992251524 697032704 697284228
+14979000000 14979754734 4993000000 4993251578 698032704 698284282
+14982000000 14982754830 4994000000 4994251610 699032704 699284314
+14985000000 14985755018 4995000000 4995251672 700032704 700284376
+14988000000 14988755186 4996000000 4996251728 701032704 701284432
+14991000000 14991755322 4997000000 4997251774 702032704 702284478
+14994000000 14994755497 4998000000 4998251832 703032704 703284536
+14997000000 14997755619 4999000000 4999251873 704032704 704284577
+15000000000 15000755769 5000000000 5000251923 705032704 705284627
+15003000000 15003755917 5001000000 5001251972 706032704 706284676
+15006000000 15006756123 5002000000 5002252041 707032704 707284745
+15009000000 15009756237 5003000000 5003252079 708032704 708284783
+15012000000 15012756369 5004000000 5004252123 709032704 709284827
+15015000000 15015756543 5005000000 5005252181 710032704 710284885
+15018000000 15018756662 5006000000 5006252220 711032704 711284924
+15021000000 15021756786 5007000000 5007252262 712032704 712284966
+15024000000 15024757005 5008000000 5008252335 713032704 713285039
+15027000000 15027757141 5009000000 5009252380 714032704 714285084
+15030000000 15030757292 5010000000 5010252430 715032704 715285134
+15033000000 15033757452 5011000000 5011252484 716032704 716285188
+15036000000 15036757573 5012000000 5012252524 717032704 717285228
+15039000000 15039757654 5013000000 5013252551 718032704 718285255
+15042000000 15042757862 5014000000 5014252620 719032704 719285324
+15045000000 15045758017 5015000000 5015252672 720032704 720285376
+15048000000 15048758176 5016000000 5016252725 721032704 721285429
+15051000000 15051758328 5017000000 5017252776 722032704 722285480
+15054000000 15054758450 5018000000 5018252816 723032704 723285520
+15057000000 15057758628 5019000000 5019252876 724032704 724285580
+15060000000 15060758777 5020000000 5020252925 725032704 725285629
+15063000000 15063758905 5021000000 5021252968 726032704 726285672
+15066000000 15066759074 5022000000 5022253024 727032704 727285728
+15069000000 15069759194 5023000000 5023253064 728032704 728285768
+15072000000 15072759121 5024000000 5024253040 729032704 729285744
+15075000000 15075759444 5025000000 5025253148 730032704 730285852
+15078000000 15078759697 5026000000 5026253232 731032704 731285936
+15081000000 15081759807 5027000000 5027253269 732032704 732285973
+15084000000 15084759986 5028000000 5028253328 733032704 733286032
+15087000000 15087760034 5029000000 5029253344 734032704 734286048
+15090000000 15090760288 5030000000 5030253429 735032704 735286133
+15093000000 15093760407 5031000000 5031253469 736032704 736286173
+15096000000 15096760578 5032000000 5032253526 737032704 737286230
+15099000000 15099760725 5033000000 5033253575 738032704 738286279
+15102000000 15102760878 5034000000 5034253626 739032704 739286330
+15105000000 15105761024 5035000000 5035253674 740032704 740286378
+15108000000 15108761168 5036000000 5036253722 741032704 741286426
+15111000000 15111761331 5037000000 5037253777 742032704 742286481
+15114000000 15114761483 5038000000 5038253827 743032704 743286531
+15117000000 15117761637 5039000000 5039253879 744032704 744286583
+15120000000 15120761757 5040000000 5040253919 745032704 745286623
+15123000000 15123761966 5041000000 5041253988 746032704 746286692
+15126000000 15126762096 5042000000 5042254032 747032704 747286736
+15129000000 15129762210 5043000000 5043254070 748032704 748286774
+15132000000 15132762371 5044000000 5044254123 749032704 749286827
+15135000000 15135762506 5045000000 5045254168 750032704 750286872
+15138000000 15138762649 5046000000 5046254216 751032704 751286920
+15141000000 15141762749 5047000000 5047254249 752032704 752286953
+15144000000 15144762983 5048000000 5048254327 753032704 753287031
+15147000000 15147763056 5049000000 5049254352 754032704 754287056
+15150000000 15150763177 5050000000 5050254392 755032704 755287096
+15153000000 15153763366 5051000000 5051254455 756032704 756287159
+15156000000 15156763520 5052000000 5052254506 757032704 757287210
+15159000000 15159763699 5053000000 5053254566 758032704 758287270
+15162000000 15162763845 5054000000 5054254615 759032704 759287319
+15165000000 15165763972 5055000000 5055254657 760032704 760287361
+15168000000 15168764146 5056000000 5056254715 761032704 761287419
+15171000000 15171764210 5057000000 5057254736 762032704 762287440
+15174000000 15174764417 5058000000 5058254805 763032704 763287509
+15177000000 15177764598 5059000000 5059254866 764032704 764287570
+15180000000 15180764747 5060000000 5060254915 765032704 765287619
+15183000000 15183764804 5061000000 5061254934 766032704 766287638
+15186000000 15186765000 5062000000 5062255000 767032704 767287704
+15189000000 15189765190 5063000000 5063255063 768032704 768287767
+15192000000 15192765335 5064000000 5064255111 769032704 769287815
+15195000000 15195765507 5065000000 5065255169 770032704 770287873
+15198000000 15198765640 5066000000 5066255213 771032704 771287917
+15201000000 15201765711 5067000000 5067255237 772032704 772287941
+15204000000 15204765937 5068000000 5068255312 773032704 773288016
+15207000000 15207766097 5069000000 5069255365 774032704 774288069
+15210000000 15210766229 5070000000 5070255409 775032704 775288113
+15213000000 15213766337 5071000000 5071255445 776032704 776288149
+15216000000 15216766548 5072000000 5072255516 777032704 777288220
+15219000000 15219766714 5073000000 5073255571 778032704 778288275
+15222000000 15222766825 5074000000 5074255608 779032704 779288312
+15225000000 15225766985 5075000000 5075255661 780032704 780288365
+15228000000 15228767097 5076000000 5076255699 781032704 781288403
+15231000000 15231767295 5077000000 5077255765 782032704 782288469
+15234000000 15234767385 5078000000 5078255795 783032704 783288499
+15237000000 15237767610 5079000000 5079255870 784032704 784288574
+15240000000 15240767742 5080000000 5080255914 785032704 785288618
+15243000000 15243767881 5081000000 5081255960 786032704 786288664
+15246000000 15246767932 5082000000 5082255977 787032704 787288681
+15249000000 15249768143 5083000000 5083256047 788032704 788288751
+15252000000 15252768352 5084000000 5084256117 789032704 789288821
+15255000000 15255768480 5085000000 5085256160 790032704 790288864
+15258000000 15258768623 5086000000 5086256207 791032704 791288911
+15261000000 15261768794 5087000000 5087256264 792032704 792288968
+15264000000 15264768891 5088000000 5088256297 793032704 793289001
+15267000000 15267769104 5089000000 5089256368 794032704 794289072
+15270000000 15270769234 5090000000 5090256411 795032704 795289115
+15273000000 15273769384 5091000000 5091256461 796032704 796289165
+15276000000 15276769544 5092000000 5092256514 797032704 797289218
+15279000000 15279769640 5093000000 5093256546 798032704 798289250
+15282000000 15282769828 5094000000 5094256609 799032704 799289313
+15285000000 15285769996 5095000000 5095256665 800032704 800289369
+15288000000 15288770132 5096000000 5096256710 801032704 801289414
+15291000000 15291770307 5097000000 5097256769 802032704 802289473
+15294000000 15294770429 5098000000 5098256809 803032704 803289513
+15297000000 15297770579 5099000000 5099256859 804032704 804289563
+15300000000 15300770727 5100000000 5100256909 805032704 805289613
+15303000000 15303770933 5101000000 5101256977 806032704 806289681
+15306000000 15306771047 5102000000 5102257015 807032704 807289719
+15309000000 15309771179 5103000000 5103257059 808032704 808289763
+15312000000 15312771353 5104000000 5104257117 809032704 809289821
+15315000000 15315771472 5105000000 5105257157 810032704 810289861
+15318000000 15318771596 5106000000 5106257198 811032704 811289902
+15321000000 15321771815 5107000000 5107257271 812032704 812289975
+15324000000 15324771951 5108000000 5108257317 813032704 813290021
+15327000000 15327772102 5109000000 5109257367 814032704 814290071
+15330000000 15330772262 5110000000 5110257420 815032704 815290124
+15333000000 15333772383 5111000000 5111257461 816032704 816290165
+15336000000 15336772464 5112000000 5112257488 817032704 817290192
+15339000000 15339772672 5113000000 5113257557 818032704 818290261
+15342000000 15342772827 5114000000 5114257609 819032704 819290313
+15345000000 15345772986 5115000000 5115257662 820032704 820290366
+15348000000 15348773138 5116000000 5116257712 821032704 821290416
+15351000000 15351773260 5117000000 5117257753 822032704 822290457
+15354000000 15354773438 5118000000 5118257812 823032704 823290516
+15357000000 15357773587 5119000000 5119257862 824032704 824290566
+15360000000 15360773715 5120000000 5120257905 825032704 825290609
+15363000000 15363773884 5121000000 5121257961 826032704 826290665
+15366000000 15366774004 5122000000 5122258001 827032704 827290705
+15369000000 15369773931 5123000000 5123257977 828032704 828290681
+15372000000 15372774254 5124000000 5124258084 829032704 829290788
+15375000000 15375774507 5125000000 5125258169 830032704 830290873
+15378000000 15378774617 5126000000 5126258205 831032704 831290909
+15381000000 15381774796 5127000000 5127258265 832032704 832290969
+15384000000 15384774844 5128000000 5128258281 833032704 833290985
+15387000000 15387775098 5129000000 5129258366 834032704 834291070
+15390000000 15390775217 5130000000 5130258405 835032704 835291109
+15393000000 15393775388 5131000000 5131258462 836032704 836291166
+15396000000 15396775535 5132000000 5132258511 837032704 837291215
+15399000000 15399775688 5133000000 5133258562 838032704 838291266
+15402000000 15402775834 5134000000 5134258611 839032704 839291315
+15405000000 15405775978 5135000000 5135258659 840032704 840291363
+15408000000 15408776141 5136000000 5136258713 841032704 841291417
+15411000000 15411776293 5137000000 5137258764 842032704 842291468
+15414000000 15414776447 5138000000 5138258815 843032704 843291519
+15417000000 15417776567 5139000000 5139258855 844032704 844291559
+15420000000 15420776776 5140000000 5140258925 845032704 845291629
+15423000000 15423776906 5141000000 5141258968 846032704 846291672
+15426000000 15426777020 5142000000 5142259006 847032704 847291710
+15429000000 15429777181 5143000000 5143259060 848032704 848291764
+15432000000 15432777316 5144000000 5144259105 849032704 849291809
+15435000000 15435777459 5145000000 5145259153 850032704 850291857
+15438000000 15438777559 5146000000 5146259186 851032704 851291890
+15441000000 15441777793 5147000000 5147259264 852032704 852291968
+15444000000 15444777866 5148000000 5148259288 853032704 853291992
+15447000000 15447777987 5149000000 5149259329 854032704 854292033
+15450000000 15450778176 5150000000 5150259392 855032704 855292096
+15453000000 15453778330 5151000000 5151259443 856032704 856292147
+15456000000 15456778509 5152000000 5152259503 857032704 857292207
+15459000000 15459778655 5153000000 5153259551 858032704 858292255
+15462000000 15462778782 5154000000 5154259594 859032704 859292298
+15465000000 15465778956 5155000000 5155259652 860032704 860292356
+15468000000 15468779020 5156000000 5156259673 861032704 861292377
+15471000000 15471779227 5157000000 5157259742 862032704 862292446
+15474000000 15474779408 5158000000 5158259802 863032704 863292506
+15477000000 15477779557 5159000000 5159259852 864032704 864292556
+15480000000 15480779614 5160000000 5160259871 865032704 865292575
+15483000000 15483779810 5161000000 5161259936 866032704 866292640
+15486000000 15486780000 5162000000 5162260000 867032704 867292704
+15489000000 15489780145 5163000000 5163260048 868032704 868292752
+15492000000 15492780317 5164000000 5164260105 869032704 869292809
+15495000000 15495780450 5165000000 5165260150 870032704 870292854
+15498000000 15498780521 5166000000 5166260173 871032704 871292877
+15501000000 15501780747 5167000000 5167260249 872032704 872292953
+15504000000 15504780907 5168000000 5168260302 873032704 873293006
+15507000000 15507781039 5169000000 5169260346 874032704 874293050
+15510000000 15510781147 5170000000 5170260382 875032704 875293086
+15513000000 15513781358 5171000000 5171260452 876032704 876293156
+15516000000 15516781524 5172000000 5172260508 877032704 877293212
+15519000000 15519781635 5173000000 5173260545 878032704 878293249
+15522000000 15522781795 5174000000 5174260598 879032704 879293302
+15525000000 15525781907 5175000000 5175260635 880032704 880293339
+15528000000 15528782105 5176000000 5176260701 881032704 881293405
+15531000000 15531782195 5177000000 5177260731 882032704 882293435
+15534000000 15534782420 5178000000 5178260806 883032704 883293510
+15537000000 15537782552 5179000000 5179260850 884032704 884293554
+15540000000 15540782691 5180000000 5180260897 885032704 885293601
+15543000000 15543782742 5181000000 5181260914 886032704 886293618
+15546000000 15546782953 5182000000 5182260984 887032704 887293688
+15549000000 15549783162 5183000000 5183261054 888032704 888293758
+15552000000 15552783290 5184000000 5184261096 889032704 889293800
+15555000000 15555783433 5185000000 5185261144 890032704 890293848
+15558000000 15558783604 5186000000 5186261201 891032704 891293905
+15561000000 15561783701 5187000000 5187261233 892032704 892293937
+15564000000 15564783914 5188000000 5188261304 893032704 893294008
+15567000000 15567784044 5189000000 5189261348 894032704 894294052
+15570000000 15570784194 5190000000 5190261398 895032704 895294102
+15573000000 15573784354 5191000000 5191261451 896032704 896294155
+15576000000 15576784450 5192000000 5192261483 897032704 897294187
+15579000000 15579784638 5193000000 5193261546 898032704 898294250
+15582000000 15582784806 5194000000 5194261602 899032704 899294306
+15585000000 15585784942 5195000000 5195261647 900032704 900294351
+15588000000 15588785117 5196000000 5196261705 901032704 901294409
+15591000000 15591785239 5197000000 5197261746 902032704 902294450
+15594000000 15594785389 5198000000 5198261796 903032704 903294500
+15597000000 15597785537 5199000000 5199261845 904032704 904294549
+15600000000 15600785743 5200000000 5200261914 905032704 905294618
+15603000000 15603785857 5201000000 5201261952 906032704 906294656
+15606000000 15606785989 5202000000 5202261996 907032704 907294700
+15609000000 15609786163 5203000000 5203262054 908032704 908294758
+15612000000 15612786282 5204000000 5204262094 909032704 909294798
+15615000000 15615786406 5205000000 5205262135 910032704 910294839
+15618000000 15618786625 5206000000 5206262208 911032704 911294912
+15621000000 15621786761 5207000000 5207262253 912032704 912294957
+15624000000 15624786912 5208000000 5208262304 913032704 913295008
+15627000000 15627787072 5209000000 5209262357 914032704 914295061
+15630000000 15630787193 5210000000 5210262397 915032704 915295101
+15633000000 15633787274 5211000000 5211262424 916032704 916295128
+15636000000 15636787482 5212000000 5212262494 917032704 917295198
+15639000000 15639787637 5213000000 5213262545 918032704 918295249
+15642000000 15642787796 5214000000 5214262598 919032704 919295302
+15645000000 15645787948 5215000000 5215262649 920032704 920295353
+15648000000 15648788070 5216000000 5216262690 921032704 921295394
+15651000000 15651788248 5217000000 5217262749 922032704 922295453
+15654000000 15654788397 5218000000 5218262799 923032704 923295503
+15657000000 15657788525 5219000000 5219262841 924032704 924295545
+15660000000 15660788694 5220000000 5220262898 925032704 925295602
+15663000000 15663788814 5221000000 5221262938 926032704 926295642
+15666000000 15666788741 5222000000 5222262913 927032704 927295617
+15669000000 15669789064 5223000000 5223263021 928032704 928295725
+15672000000 15672789317 5224000000 5224263105 929032704 929295809
+15675000000 15675789427 5225000000 5225263142 930032704 930295846
+15678000000 15678789606 5226000000 5226263202 931032704 931295906
+15681000000 15681789654 5227000000 5227263218 932032704 932295922
+15684000000 15684789908 5228000000 5228263302 933032704 933296006
+15687000000 15687790027 5229000000 5229263342 934032704 934296046
+15690000000 15690790198 5230000000 5230263399 935032704 935296103
+15693000000 15693790345 5231000000 5231263448 936032704 936296152
+15696000000 15696790498 5232000000 5232263499 937032704 937296203
+15699000000 15699790644 5233000000 5233263548 938032704 938296252
+15702000000 15702790788 5234000000 5234263596 939032704 939296300
+15705000000 15705790951 5235000000 5235263650 940032704 940296354
+15708000000 15708791103 5236000000 5236263701 941032704 941296405
+15711000000 15711791257 5237000000 5237263752 942032704 942296456
+15714000000 15714791377 5238000000 5238263792 943032704 943296496
+15717000000 15717791586 5239000000 5239263862 944032704 944296566
+15720000000 15720791716 5240000000 5240263905 945032704 945296609
+15723000000 15723791830 5241000000 5241263943 946032704 946296647
+15726000000 15726791991 5242000000 5242263997 947032704 947296701
+15729000000 15729792126 5243000000 5243264042 948032704 948296746
+15732000000 15732792269 5244000000 5244264089 949032704 949296793
+15735000000 15735792369 5245000000 5245264123 950032704 950296827
+15738000000 15738792603 5246000000 5246264201 951032704 951296905
+15741000000 15741792676 5247000000 5247264225 952032704 952296929
+15744000000 15744792797 5248000000 5248264265 953032704 953296969
+15747000000 15747792986 5249000000 5249264328 954032704 954297032
+15750000000 15750793140 5250000000 5250264380 955032704 955297084
+15753000000 15753793319 5251000000 5251264439 956032704 956297143
+15756000000 15756793465 5252000000 5252264488 957032704 957297192
+15759000000 15759793592 5253000000 5253264530 958032704 958297234
+15762000000 15762793766 5254000000 5254264588 959032704 959297292
+15765000000 15765793830 5255000000 5255264610 960032704 960297314
+15768000000 15768794037 5256000000 5256264679 961032704 961297383
+15771000000 15771794218 5257000000 5257264739 962032704 962297443
+15774000000 15774794367 5258000000 5258264789 963032704 963297493
+15777000000 15777794424 5259000000 5259264808 964032704 964297512
+15780000000 15780794620 5260000000 5260264873 965032704 965297577
+15783000000 15783794810 5261000000 5261264936 966032704 966297640
+15786000000 15786794955 5262000000 5262264985 967032704 967297689
+15789000000 15789795127 5263000000 5263265042 968032704 968297746
+15792000000 15792795260 5264000000 5264265086 969032704 969297790
+15795000000 15795795331 5265000000 5265265110 970032704 970297814
+15798000000 15798795557 5266000000 5266265185 971032704 971297889
+15801000000 15801795717 5267000000 5267265239 972032704 972297943
+15804000000 15804795849 5268000000 5268265283 973032704 973297987
+15807000000 15807795957 5269000000 5269265319 974032704 974298023
+15810000000 15810796168 5270000000 5270265389 975032704 975298093
+15813000000 15813796334 5271000000 5271265444 976032704 976298148
+15816000000 15816796445 5272000000 5272265481 977032704 977298185
+15819000000 15819796605 5273000000 5273265535 978032704 978298239
+15822000000 15822796717 5274000000 5274265572 979032704 979298276
+15825000000 15825796915 5275000000 5275265638 980032704 980298342
+15828000000 15828797005 5276000000 5276265668 981032704 981298372
+15831000000 15831797230 5277000000 5277265743 982032704 982298447
+15834000000 15834797362 5278000000 5278265787 983032704 983298491
+15837000000 15837797501 5279000000 5279265833 984032704 984298537
+15840000000 15840797552 5280000000 5280265850 985032704 985298554
+15843000000 15843797763 5281000000 5281265921 986032704 986298625
+15846000000 15846797972 5282000000 5282265990 987032704 987298694
+15849000000 15849798100 5283000000 5283266033 988032704 988298737
+15852000000 15852798243 5284000000 5284266081 989032704 989298785
+15855000000 15855798414 5285000000 5285266138 990032704 990298842
+15858000000 15858798511 5286000000 5286266170 991032704 991298874
+15861000000 15861798724 5287000000 5287266241 992032704 992298945
+15864000000 15864798854 5288000000 5288266284 993032704 993298988
+15867000000 15867799004 5289000000 5289266334 994032704 994299038
+15870000000 15870799164 5290000000 5290266388 995032704 995299092
+15873000000 15873799260 5291000000 5291266420 996032704 996299124
+15876000000 15876799448 5292000000 5292266482 997032704 997299186
+15879000000 15879799616 5293000000 5293266538 998032704 998299242
+15882000000 15882799752 5294000000 5294266584 999032704 999299288
+15885000000 15885799927 5295000000 5295266642 1000032704 1000299346
+15888000000 15888800049 5296000000 5296266683 1001032704 1001299387
+15891000000 15891800199 5297000000 5297266733 1002032704 1002299437
+15894000000 15894800347 5298000000 5298266782 1003032704 1003299486
+15897000000 15897800553 5299000000 5299266851 1004032704 1004299555
+15900000000 15900800667 5300000000 5300266889 1005032704 1005299593
+15903000000 15903800799 5301000000 5301266933 1006032704 1006299637
+15906000000 15906800973 5302000000 5302266991 1007032704 1007299695
+15909000000 15909801092 5303000000 5303267030 1008032704 1008299734
+15912000000 15912801216 5304000000 5304267072 1009032704 1009299776
+15915000000 15915801435 5305000000 5305267145 1010032704 1010299849
+15918000000 15918801571 5306000000 5306267190 1011032704 1011299894
+15921000000 15921801722 5307000000 5307267240 1012032704 1012299944
+15924000000 15924801882 5308000000 5308267294 1013032704 1013299998
+15927000000 15927802003 5309000000 5309267334 1014032704 1014300038
+15930000000 15930802084 5310000000 5310267361 1015032704 1015300065
+15933000000 15933802292 5311000000 5311267430 1016032704 1016300134
+15936000000 15936802447 5312000000 5312267482 1017032704 1017300186
+15939000000 15939802606 5313000000 5313267535 1018032704 1018300239
+15942000000 15942802758 5314000000 5314267586 1019032704 1019300290
+15945000000 15945802880 5315000000 5315267626 1020032704 1020300330
+15948000000 15948803058 5316000000 5316267686 1021032704 1021300390
+15951000000 15951803207 5317000000 5317267735 1022032704 1022300439
+15954000000 15954803335 5318000000 5318267778 1023032704 1023300482
+15957000000 15957803504 5319000000 5319267834 1024032704 1024300538
+15960000000 15960803624 5320000000 5320267874 1025032704 1025300578
+15963000000 15963803551 5321000000 5321267850 1026032704 1026300554
+15966000000 15966803874 5322000000 5322267958 1027032704 1027300662
+15969000000 15969804127 5323000000 5323268042 1028032704 1028300746
+15972000000 15972804237 5324000000 5324268079 1029032704 1029300783
+15975000000 15975804416 5325000000 5325268138 1030032704 1030300842
+15978000000 15978804464 5326000000 5326268154 1031032704 1031300858
+15981000000 15981804718 5327000000 5327268239 1032032704 1032300943
+15984000000 15984804837 5328000000 5328268279 1033032704 1033300983
+15987000000 15987805008 5329000000 5329268336 1034032704 1034301040
+15990000000 15990805155 5330000000 5330268385 1035032704 1035301089
+15993000000 15993805308 5331000000 5331268436 1036032704 1036301140
+15996000000 15996805454 5332000000 5332268484 1037032704 1037301188
+15999000000 15999805598 5333000000 5333268532 1038032704 1038301236
+16002000000 16002805761 5334000000 5334268587 1039032704 1039301291
+16005000000 16005805913 5335000000 5335268637 1040032704 1040301341
+16008000000 16008806067 5336000000 5336268689 1041032704 1041301393
+16011000000 16011806187 5337000000 5337268729 1042032704 1042301433
+16014000000 16014806396 5338000000 5338268798 1043032704 1043301502
+16017000000 16017806526 5339000000 5339268842 1044032704 1044301546
+16020000000 16020806640 5340000000 5340268880 1045032704 1045301584
+16023000000 16023806801 5341000000 5341268933 1046032704 1046301637
+16026000000 16026806936 5342000000 5342268978 1047032704 1047301682
+16029000000 16029807079 5343000000 5343269026 1048032704 1048301730
+16032000000 16032807179 5344000000 5344269059 1049032704 1049301763
+16035000000 16035807413 5345000000 5345269137 1050032704 1050301841
+16038000000 16038807486 5346000000 5346269162 1051032704 1051301866
+16041000000 16041807607 5347000000 5347269202 1052032704 1052301906
+16044000000 16044807796 5348000000 5348269265 1053032704 1053301969
+16047000000 16047807950 5349000000 5349269316 1054032704 1054302020
+16050000000 16050808129 5350000000 5350269376 1055032704 1055302080
+16053000000 16053808275 5351000000 5351269425 1056032704 1056302129
+16056000000 16056808402 5352000000 5352269467 1057032704 1057302171
+16059000000 16059808576 5353000000 5353269525 1058032704 1058302229
+16062000000 16062808640 5354000000 5354269546 1059032704 1059302250
+16065000000 16065808847 5355000000 5355269615 1060032704 1060302319
+16068000000 16068809028 5356000000 5356269676 1061032704 1061302380
+16071000000 16071809177 5357000000 5357269725 1062032704 1062302429
+16074000000 16074809234 5358000000 5358269744 1063032704 1063302448
+16077000000 16077809430 5359000000 5359269810 1064032704 1064302514
+16080000000 16080809620 5360000000 5360269873 1065032704 1065302577
+16083000000 16083809765 5361000000 5361269921 1066032704 1066302625
+16086000000 16086809937 5362000000 5362269979 1067032704 1067302683
+16089000000 16089810070 5363000000 5363270023 1068032704 1068302727
+16092000000 16092810141 5364000000 5364270047 1069032704 1069302751
+16095000000 16095810367 5365000000 5365270122 1070032704 1070302826
+16098000000 16098810527 5366000000 5366270175 1071032704 1071302879
+16101000000 16101810659 5367000000 5367270219 1072032704 1072302923
+16104000000 16104810767 5368000000 5368270255 1073032704 1073302959
+16107000000 16107810978 5369000000 5369270326 1074032704 1074303030
+16110000000 16110811144 5370000000 5370270381 1075032704 1075303085
+16113000000 16113811255 5371000000 5371270418 1076032704 1076303122
+16116000000 16116811415 5372000000 5372270471 1077032704 1077303175
+16119000000 16119811527 5373000000 5373270509 1078032704 1078303213
+16122000000 16122811725 5374000000 5374270575 1079032704 1079303279
+16125000000 16125811815 5375000000 5375270605 1080032704 1080303309
+16128000000 16128812040 5376000000 5376270680 1081032704 1081303384
+16131000000 16131812172 5377000000 5377270724 1082032704 1082303428
+16134000000 16134812311 5378000000 5378270770 1083032704 1083303474
+16137000000 16137812362 5379000000 5379270787 1084032704 1084303491
+16140000000 16140812573 5380000000 5380270857 1085032704 1085303561
+16143000000 16143812782 5381000000 5381270927 1086032704 1086303631
+16146000000 16146812910 5382000000 5382270970 1087032704 1087303674
+16149000000 16149813053 5383000000 5383271017 1088032704 1088303721
+16152000000 16152813224 5384000000 5384271074 1089032704 1089303778
+16155000000 16155813321 5385000000 5385271107 1090032704 1090303811
+16158000000 16158813534 5386000000 5386271178 1091032704 1091303882
+16161000000 16161813664 5387000000 5387271221 1092032704 1092303925
+16164000000 16164813814 5388000000 5388271271 1093032704 1093303975
+16167000000 16167813974 5389000000 5389271324 1094032704 1094304028
+16170000000 16170814070 5390000000 5390271356 1095032704 1095304060
+16173000000 16173814258 5391000000 5391271419 1096032704 1096304123
+16176000000 16176814426 5392000000 5392271475 1097032704 1097304179
+16179000000 16179814562 5393000000 5393271520 1098032704 1098304224
+16182000000 16182814737 5394000000 5394271579 1099032704 1099304283
+16185000000 16185814859 5395000000 5395271619 1100032704 1100304323
+16188000000 16188815009 5396000000 5396271669 1101032704 1101304373
+16191000000 16191815157 5397000000 5397271719 1102032704 1102304423
+16194000000 16194815363 5398000000 5398271787 1103032704 1103304491
+16197000000 16197815477 5399000000 5399271825 1104032704 1104304529
+16200000000 16200815609 5400000000 5400271869 1105032704 1105304573
+16203000000 16203815783 5401000000 5401271927 1106032704 1106304631
+16206000000 16206815902 5402000000 5402271967 1107032704 1107304671
+16209000000 16209816026 5403000000 5403272008 1108032704 1108304712
+16212000000 16212816245 5404000000 5404272081 1109032704 1109304785
+16215000000 16215816381 5405000000 5405272127 1110032704 1110304831
+16218000000 16218816532 5406000000 5406272177 1111032704 1111304881
+16221000000 16221816692 5407000000 5407272230 1112032704 1112304934
+16224000000 16224816813 5408000000 5408272271 1113032704 1113304975
+16227000000 16227816894 5409000000 5409272298 1114032704 1114305002
+16230000000 16230817102 5410000000 5410272367 1115032704 1115305071
+16233000000 16233817257 5411000000 5411272419 1116032704 1116305123
+16236000000 16236817416 5412000000 5412272472 1117032704 1117305176
+16239000000 16239817568 5413000000 5413272522 1118032704 1118305226
+16242000000 16242817690 5414000000 5414272563 1119032704 1119305267
+16245000000 16245817868 5415000000 5415272622 1120032704 1120305326
+16248000000 16248818017 5416000000 5416272672 1121032704 1121305376
+16251000000 16251818145 5417000000 5417272715 1122032704 1122305419
+16254000000 16254818314 5418000000 5418272771 1123032704 1123305475
+16257000000 16257818434 5419000000 5419272811 1124032704 1124305515
+16260000000 16260818361 5420000000 5420272787 1125032704 1125305491
+16263000000 16263818684 5421000000 5421272894 1126032704 1126305598
+16266000000 16266818937 5422000000 5422272979 1127032704 1127305683
+16269000000 16269819047 5423000000 5423273015 1128032704 1128305719
+16272000000 16272819226 5424000000 5424273075 1129032704 1129305779
+16275000000 16275819274 5425000000 5425273091 1130032704 1130305795
+16278000000 16278819528 5426000000 5426273176 1131032704 1131305880
+16281000000 16281819647 5427000000 5427273215 1132032704 1132305919
+16284000000 16284819818 5428000000 5428273272 1133032704 1133305976
+16287000000 16287819965 5429000000 5429273321 1134032704 1134306025
+16290000000 16290820118 5430000000 5430273372 1135032704 1135306076
+16293000000 16293820264 5431000000 5431273421 1136032704 1136306125
+16296000000 16296820408 5432000000 5432273469 1137032704 1137306173
+16299000000 16299820571 5433000000 5433273523 1138032704 1138306227
+16302000000 16302820723 5434000000 5434273574 1139032704 1139306278
+16305000000 16305820877 5435000000 5435273625 1140032704 1140306329
+16308000000 16308820997 5436000000 5436273665 1141032704 1141306369
+16311000000 16311821206 5437000000 5437273735 1142032704 1142306439
+16314000000 16314821336 5438000000 5438273778 1143032704 1143306482
+16317000000 16317821450 5439000000 5439273816 1144032704 1144306520
+16320000000 16320821611 5440000000 5440273870 1145032704 1145306574
+16323000000 16323821746 5441000000 5441273915 1146032704 1146306619
+16326000000 16326821889 5442000000 5442273963 1147032704 1147306667
+16329000000 16329821989 5443000000 5443273996 1148032704 1148306700
+16332000000 16332822223 5444000000 5444274074 1149032704 1149306778
+16335000000 16335822296 5445000000 5445274098 1150032704 1150306802
+16338000000 16338822417 5446000000 5446274139 1151032704 1151306843
+16341000000 16341822606 5447000000 5447274202 1152032704 1152306906
+16344000000 16344822760 5448000000 5448274253 1153032704 1153306957
+16347000000 16347822939 5449000000 5449274313 1154032704 1154307017
+16350000000 16350823085 5450000000 5450274361 1155032704 1155307065
+16353000000 16353823212 5451000000 5451274404 1156032704 1156307108
+16356000000 16356823386 5452000000 5452274462 1157032704 1157307166
+16359000000 16359823450 5453000000 5453274483 1158032704 1158307187
+16362000000 16362823657 5454000000 5454274552 1159032704 1159307256
+16365000000 16365823838 5455000000 5455274612 1160032704 1160307316
+16368000000 16368823987 5456000000 5456274662 1161032704 1161307366
+16371000000 16371824044 5457000000 5457274681 1162032704 1162307385
+16374000000 16374824240 5458000000 5458274746 1163032704 1163307450
+16377000000 16377824430 5459000000 5459274810 1164032704 1164307514
+16380000000 16380824575 5460000000 5460274858 1165032704 1165307562
+16383000000 16383824747 5461000000 5461274915 1166032704 1166307619
+16386000000 16386824880 5462000000 5462274960 1167032704 1167307664
+16389000000 16389824951 5463000000 5463274983 1168032704 1168307687
+16392000000 16392825177 5464000000 5464275059 1169032704 1169307763
+16395000000 16395825337 5465000000 5465275112 1170032704 1170307816
+16398000000 16398825469 5466000000 5466275156 1171032704 1171307860
+16401000000 16401825577 5467000000 5467275192 1172032704 1172307896
+16404000000 16404825788 5468000000 5468275262 1173032704 1173307966
+16407000000 16407825954 5469000000 5469275318 1174032704 1174308022
+16410000000 16410826065 5470000000 5470275355 1175032704 1175308059
+16413000000 16413826225 5471000000 5471275408 1176032704 1176308112
+16416000000 16416826337 5472000000 5472275445 1177032704 1177308149
+16419000000 16419826535 5473000000 5473275511 1178032704 1178308215
+16422000000 16422826625 5474000000 5474275541 1179032704 1179308245
+16425000000 16425826850 5475000000 5475275616 1180032704 1180308320
+16428000000 16428826982 5476000000 5476275660 1181032704 1181308364
+16431000000 16431827121 5477000000 5477275707 1182032704 1182308411
+16434000000 16434827172 5478000000 5478275724 1183032704 1183308428
+16437000000 16437827383 5479000000 5479275794 1184032704 1184308498
+16440000000 16440827592 5480000000 5480275864 1185032704 1185308568
+16443000000 16443827720 5481000000 5481275906 1186032704 1186308610
+16446000000 16446827863 5482000000 5482275954 1187032704 1187308658
+16449000000 16449828034 5483000000 5483276011 1188032704 1188308715
+16452000000 16452828131 5484000000 5484276043 1189032704 1189308747
+16455000000 16455828344 5485000000 5485276114 1190032704 1190308818
+16458000000 16458828474 5486000000 5486276158 1191032704 1191308862
+16461000000 16461828624 5487000000 5487276208 1192032704 1192308912
+16464000000 16464828784 5488000000 5488276261 1193032704 1193308965
+16467000000 16467828880 5489000000 5489276293 1194032704 1194308997
+16470000000 16470829068 5490000000 5490276356 1195032704 1195309060
+16473000000 16473829236 5491000000 5491276412 1196032704 1196309116
+16476000000 16476829372 5492000000 5492276457 1197032704 1197309161
+16479000000 16479829547 5493000000 5493276515 1198032704 1198309219
+16482000000 16482829669 5494000000 5494276556 1199032704 1199309260
+16485000000 16485829819 5495000000 5495276606 1200032704 1200309310
+16488000000 16488829967 5496000000 5496276655 1201032704 1201309359
+16491000000 16491830173 5497000000 5497276724 1202032704 1202309428
+16494000000 16494830287 5498000000 5498276762 1203032704 1203309466
+16497000000 16497830419 5499000000 5499276806 1204032704 1204309510
+16500000000 16500830593 5500000000 5500276864 1205032704 1205309568
+16503000000 16503830712 5501000000 5501276904 1206032704 1206309608
+16506000000 16506830836 5502000000 5502276945 1207032704 1207309649
+16509000000 16509831055 5503000000 5503277018 1208032704 1208309722
+16512000000 16512831191 5504000000 5504277063 1209032704 1209309767
+16515000000 16515831342 5505000000 5505277114 1210032704 1210309818
+16518000000 16518831502 5506000000 5506277167 1211032704 1211309871
+16521000000 16521831623 5507000000 5507277207 1212032704 1212309911
+16524000000 16524831704 5508000000 5508277234 1213032704 1213309938
+16527000000 16527831912 5509000000 5509277304 1214032704 1214310008
+16530000000 16530832067 5510000000 5510277355 1215032704 1215310059
+16533000000 16533832226 5511000000 5511277408 1216032704 1216310112
+16536000000 16536832378 5512000000 5512277459 1217032704 1217310163
+16539000000 16539832500 5513000000 5513277500 1218032704 1218310204
+16542000000 16542832678 5514000000 5514277559 1219032704 1219310263
+16545000000 16545832827 5515000000 5515277609 1220032704 1220310313
+16548000000 16548832955 5516000000 5516277651 1221032704 1221310355
+16551000000 16551833124 5517000000 5517277708 1222032704 1222310412
+16554000000 16554833244 5518000000 5518277748 1223032704 1223310452
+16557000000 16557833171 5519000000 5519277723 1224032704 1224310427
+16560000000 16560833494 5520000000 5520277831 1225032704 1225310535
+16563000000 16563833747 5521000000 5521277915 1226032704 1226310619
+16566000000 16566833857 5522000000 5522277952 1227032704 1227310656
+16569000000 16569834036 5523000000 5523278012 1228032704 1228310716
+16572000000 16572834084 5524000000 5524278028 1229032704 1229310732
+16575000000 16575834338 5525000000 5525278112 1230032704 1230310816
+16578000000 16578834457 5526000000 5526278152 1231032704 1231310856
+16581000000 16581834628 5527000000 5527278209 1232032704 1232310913
+16584000000 16584834775 5528000000 5528278258 1233032704 1233310962
+16587000000 16587834928 5529000000 5529278309 1234032704 1234311013
+16590000000 16590835074 5530000000 5530278358 1235032704 1235311062
+16593000000 16593835218 5531000000 5531278406 1236032704 1236311110
+16596000000 16596835381 5532000000 5532278460 1237032704 1237311164
+16599000000 16599835533 5533000000 5533278511 1238032704 1238311215
+16602000000 16602835687 5534000000 5534278562 1239032704 1239311266
+16605000000 16605835807 5535000000 5535278602 1240032704 1240311306
+16608000000 16608836016 5536000000 5536278672 1241032704 1241311376
+16611000000 16611836146 5537000000 5537278715 1242032704 1242311419
+16614000000 16614836260 5538000000 5538278753 1243032704 1243311457
+16617000000 16617836421 5539000000 5539278807 1244032704 1244311511
+16620000000 16620836556 5540000000 5540278852 1245032704 1245311556
+16623000000 16623836699 5541000000 5541278899 1246032704 1246311603
+16626000000 16626836799 5542000000 5542278933 1247032704 1247311637
+16629000000 16629837033 5543000000 5543279011 1248032704 1248311715
+16632000000 16632837106 5544000000 5544279035 1249032704 1249311739
+16635000000 16635837227 5545000000 5545279075 1250032704 1250311779
+16638000000 16638837416 5546000000 5546279138 1251032704 1251311842
+16641000000 16641837570 5547000000 5547279190 1252032704 1252311894
+16644000000 16644837749 5548000000 5548279249 1253032704 1253311953
+16647000000 16647837895 5549000000 5549279298 1254032704 1254312002
+16650000000 16650838022 5550000000 5550279340 1255032704 1255312044
+16653000000 16653838196 5551000000 5551279398 1256032704 1256312102
+16656000000 16656838260 5552000000 5552279420 1257032704 1257312124
+16659000000 16659838467 5553000000 5553279489 1258032704 1258312193
+16662000000 16662838648 5554000000 5554279549 1259032704 1259312253
+16665000000 16665838797 5555000000 5555279599 1260032704 1260312303
+16668000000 16668838854 5556000000 5556279618 1261032704 1261312322
+16671000000 16671839050 5557000000 5557279683 1262032704 1262312387
+16674000000 16674839240 5558000000 5558279746 1263032704 1263312450
+16677000000 16677839385 5559000000 5559279795 1264032704 1264312499
+16680000000 16680839557 5560000000 5560279852 1265032704 1265312556
+16683000000 16683839690 5561000000 5561279896 1266032704 1266312600
+16686000000 16686839761 5562000000 5562279920 1267032704 1267312624
+16689000000 16689839987 5563000000 5563279995 1268032704 1268312699
+16692000000 16692840147 5564000000 5564280049 1269032704 1269312753
+16695000000 16695840279 5565000000 5565280093 1270032704 1270312797
+16698000000 16698840387 5566000000 5566280129 1271032704 1271312833
+16701000000 16701840598 5567000000 5567280199 1272032704 1272312903
+16704000000 16704840764 5568000000 5568280254 1273032704 1273312958
+16707000000 16707840875 5569000000 5569280291 1274032704 1274312995
+16710000000 16710841035 5570000000 5570280345 1275032704 1275313049
+16713000000 16713841147 5571000000 5571280382 1276032704 1276313086
+16716000000 16716841345 5572000000 5572280448 1277032704 1277313152
+16719000000 16719841435 5573000000 5573280478 1278032704 1278313182
+16722000000 16722841660 5574000000 5574280553 1279032704 1279313257
+16725000000 16725841792 5575000000 5575280597 1280032704 1280313301
+16728000000 16728841931 5576000000 5576280643 1281032704 1281313347
+16731000000 16731841982 5577000000 5577280660 1282032704 1282313364
+16734000000 16734842193 5578000000 5578280731 1283032704 1283313435
+16737000000 16737842402 5579000000 5579280800 1284032704 1284313504
+16740000000 16740842530 5580000000 5580280843 1285032704 1285313547
+16743000000 16743842673 5581000000 5581280891 1286032704 1286313595
+16746000000 16746842844 5582000000 5582280948 1287032704 1287313652
+16749000000 16749842941 5583000000 5583280980 1288032704 1288313684
+16752000000 16752843154 5584000000 5584281051 1289032704 1289313755
+16755000000 16755843284 5585000000 5585281094 1290032704 1290313798
+16758000000 16758843434 5586000000 5586281144 1291032704 1291313848
+16761000000 16761843594 5587000000 5587281198 1292032704 1292313902
+16764000000 16764843690 5588000000 5588281230 1293032704 1293313934
+16767000000 16767843878 5589000000 5589281292 1294032704 1294313996
+16770000000 16770844046 5590000000 5590281348 1295032704 1295314052
+16773000000 16773844182 5591000000 5591281394 1296032704 1296314098
+16776000000 16776844357 5592000000 5592281452 1297032704 1297314156
+16779000000 16779844479 5593000000 5593281493 1298032704 1298314197
+16782000000 16782844629 5594000000 5594281543 1299032704 1299314247
+16785000000 16785844777 5595000000 5595281592 1300032704 1300314296
+16788000000 16788844983 5596000000 5596281661 1301032704 1301314365
+16791000000 16791845097 5597000000 5597281699 1302032704 1302314403
+16794000000 16794845229 5598000000 5598281743 1303032704 1303314447
+16797000000 16797845403 5599000000 5599281801 1304032704 1304314505
+16800000000 16800845522 5600000000 5600281840 1305032704 1305314544
+16803000000 16803845646 5601000000 5601281882 1306032704 1306314586
+16806000000 16806845865 5602000000 5602281955 1307032704 1307314659
+16809000000 16809846001 5603000000 5603282000 1308032704 1308314704
+16812000000 16812846152 5604000000 5604282050 1309032704 1309314754
+16815000000 16815846312 5605000000 5605282104 1310032704 1310314808
+16818000000 16818846433 5606000000 5606282144 1311032704 1311314848
+16821000000 16821846514 5607000000 5607282171 1312032704 1312314875
+16824000000 16824846722 5608000000 5608282240 1313032704 1313314944
+16827000000 16827846877 5609000000 5609282292 1314032704 1314314996
+16830000000 16830847036 5610000000 5610282345 1315032704 1315315049
+16833000000 16833847188 5611000000 5611282396 1316032704 1316315100
+16836000000 16836847310 5612000000 5612282436 1317032704 1317315140
+16839000000 16839847488 5613000000 5613282496 1318032704 1318315200
+16842000000 16842847637 5614000000 5614282545 1319032704 1319315249
+16845000000 16845847765 5615000000 5615282588 1320032704 1320315292
+16848000000 16848847934 5616000000 5616282644 1321032704 1321315348
+16851000000 16851848054 5617000000 5617282684 1322032704 1322315388
+16854000000 16854847981 5618000000 5618282660 1323032704 1323315364
+16857000000 16857848304 5619000000 5619282768 1324032704 1324315472
+16860000000 16860848557 5620000000 5620282852 1325032704 1325315556
+16863000000 16863848667 5621000000 5621282889 1326032704 1326315593
+16866000000 16866848846 5622000000 5622282948 1327032704 1327315652
+16869000000 16869848894 5623000000 5623282964 1328032704 1328315668
+16872000000 16872849148 5624000000 5624283049 1329032704 1329315753
+16875000000 16875849267 5625000000 5625283089 1330032704 1330315793
+16878000000 16878849438 5626000000 5626283146 1331032704 1331315850
+16881000000 16881849585 5627000000 5627283195 1332032704 1332315899
+16884000000 16884849738 5628000000 5628283246 1333032704 1333315950
+16887000000 16887849884 5629000000 5629283294 1334032704 1334315998
+16890000000 16890850028 5630000000 5630283342 1335032704 1335316046
+16893000000 16893850191 5631000000 5631283397 1336032704 1336316101
+16896000000 16896850343 5632000000 5632283447 1337032704 1337316151
+16899000000 16899850497 5633000000 5633283499 1338032704 1338316203
+16902000000 16902850617 5634000000 5634283539 1339032704 1339316243
+16905000000 16905850826 5635000000 5635283608 1340032704 1340316312
+16908000000 16908850956 5636000000 5636283652 1341032704 1341316356
+16911000000 16911851070 5637000000 5637283690 1342032704 1342316394
+16914000000 16914851231 5638000000 5638283743 1343032704 1343316447
+16917000000 16917851366 5639000000 5639283788 1344032704 1344316492
+16920000000 16920851509 5640000000 5640283836 1345032704 1345316540
+16923000000 16923851609 5641000000 5641283869 1346032704 1346316573
+16926000000 16926851843 5642000000 5642283947 1347032704 1347316651
+16929000000 16929851916 5643000000 5643283972 1348032704 1348316676
+16932000000 16932852037 5644000000 5644284012 1349032704 1349316716
+16935000000 16935852226 5645000000 5645284075 1350032704 1350316779
+16938000000 16938852380 5646000000 5646284126 1351032704 1351316830
+16941000000 16941852559 5647000000 5647284186 1352032704 1352316890
+16944000000 16944852705 5648000000 5648284235 1353032704 1353316939
+16947000000 16947852832 5649000000 5649284277 1354032704 1354316981
+16950000000 16950853006 5650000000 5650284335 1355032704 1355317039
+16953000000 16953853070 5651000000 5651284356 1356032704 1356317060
+16956000000 16956853277 5652000000 5652284425 1357032704 1357317129
+16959000000 16959853458 5653000000 5653284486 1358032704 1358317190
+16962000000 16962853607 5654000000 5654284535 1359032704 1359317239
+16965000000 16965853664 5655000000 5655284554 1360032704 1360317258
+16968000000 16968853860 5656000000 5656284620 1361032704 1361317324
+16971000000 16971854050 5657000000 5657284683 1362032704 1362317387
+16974000000 16974854195 5658000000 5658284731 1363032704 1363317435
+16977000000 16977854367 5659000000 5659284789 1364032704 1364317493
+16980000000 16980854500 5660000000 5660284833 1365032704 1365317537
+16983000000 16983854571 5661000000 5661284857 1366032704 1366317561
+16986000000 16986854797 5662000000 5662284932 1367032704 1367317636
+16989000000 16989854957 5663000000 5663284985 1368032704 1368317689
+16992000000 16992855089 5664000000 5664285029 1369032704 1369317733
+16995000000 16995855197 5665000000 5665285065 1370032704 1370317769
+16998000000 16998855408 5666000000 5666285136 1371032704 1371317840
+17001000000 17001855574 5667000000 5667285191 1372032704 1372317895
+17004000000 17004855685 5668000000 5668285228 1373032704 1373317932
+17007000000 17007855845 5669000000 5669285281 1374032704 1374317985
+17010000000 17010855957 5670000000 5670285319 1375032704 1375318023
+17013000000 17013856155 5671000000 5671285385 1376032704 1376318089
+17016000000 17016856245 5672000000 5672285415 1377032704 1377318119
+17019000000 17019856470 5673000000 5673285490 1378032704 1378318194
+17022000000 17022856602 5674000000 5674285534 1379032704 1379318238
+17025000000 17025856741 5675000000 5675285580 1380032704 1380318284
+17028000000 17028856792 5676000000 5676285597 1381032704 1381318301
+17031000000 17031857003 5677000000 5677285667 1382032704 1382318371
+17034000000 17034857212 5678000000 5678285737 1383032704 1383318441
+17037000000 17037857340 5679000000 5679285780 1384032704 1384318484
+17040000000 17040857483 5680000000 5680285827 1385032704 1385318531
+17043000000 17043857654 5681000000 5681285884 1386032704 1386318588
+17046000000 17046857751 5682000000 5682285917 1387032704 1387318621
+17049000000 17049857964 5683000000 5683285988 1388032704 1388318692
+17052000000 17052858094 5684000000 5684286031 1389032704 1389318735
+17055000000 17055858244 5685000000 5685286081 1390032704 1390318785
+17058000000 17058858404 5686000000 5686286134 1391032704 1391318838
+17061000000 17061858500 5687000000 5687286166 1392032704 1392318870
+17064000000 17064858688 5688000000 5688286229 1393032704 1393318933
+17067000000 17067858856 5689000000 5689286285 1394032704 1394318989
+17070000000 17070858992 5690000000 5690286330 1395032704 1395319034
+17073000000 17073859167 5691000000 5691286389 1396032704 1396319093
+17076000000 17076859289 5692000000 5692286429 1397032704 1397319133
+17079000000 17079859439 5693000000 5693286479 1398032704 1398319183
+17082000000 17082859587 5694000000 5694286529 1399032704 1399319233
+17085000000 17085859793 5695000000 5695286597 1400032704 1400319301
+17088000000 17088859907 5696000000 5696286635 1401032704 1401319339
+17091000000 17091860039 5697000000 5697286679 1402032704 1402319383
+17094000000 17094860213 5698000000 5698286737 1403032704 1403319441
+17097000000 17097860332 5699000000 5699286777 1404032704 1404319481
+17100000000 17100860456 5700000000 5700286818 1405032704 1405319522
+17103000000 17103860675 5701000000 5701286891 1406032704 1406319595
+17106000000 17106860811 5702000000 5702286937 1407032704 1407319641
+17109000000 17109860962 5703000000 5703286987 1408032704 1408319691
+17112000000 17112861122 5704000000 5704287040 1409032704 1409319744
+17115000000 17115861243 5705000000 5705287081 1410032704 1410319785
+17118000000 17118861324 5706000000 5706287108 1411032704 1411319812
+17121000000 17121861532 5707000000 5707287177 1412032704 1412319881
+17124000000 17124861687 5708000000 5708287229 1413032704 1413319933
+17127000000 17127861846 5709000000 5709287282 1414032704 1414319986
+17130000000 17130861998 5710000000 5710287332 1415032704 1415320036
+17133000000 17133862120 5711000000 5711287373 1416032704 1416320077
+17136000000 17136862298 5712000000 5712287432 1417032704 1417320136
+17139000000 17139862447 5713000000 5713287482 1418032704 1418320186
+17142000000 17142862575 5714000000 5714287525 1419032704 1419320229
+17145000000 17145862744 5715000000 5715287581 1420032704 1420320285
+17148000000 17148862864 5716000000 5716287621 1421032704 1421320325
+17151000000 17151862791 5717000000 5717287597 1422032704 1422320301
+17154000000 17154863114 5718000000 5718287704 1423032704 1423320408
+17157000000 17157863367 5719000000 5719287789 1424032704 1424320493
+17160000000 17160863477 5720000000 5720287825 1425032704 1425320529
+17163000000 17163863656 5721000000 5721287885 1426032704 1426320589
+17166000000 17166863704 5722000000 5722287901 1427032704 1427320605
+17169000000 17169863958 5723000000 5723287986 1428032704 1428320690
+17172000000 17172864077 5724000000 5724288025 1429032704 1429320729
+17175000000 17175864248 5725000000 5725288082 1430032704 1430320786
+17178000000 17178864395 5726000000 5726288131 1431032704 1431320835
+17181000000 17181864548 5727000000 5727288182 1432032704 1432320886
+17184000000 17184864694 5728000000 5728288231 1433032704 1433320935
+17187000000 17187864838 5729000000 5729288279 1434032704 1434320983
+17190000000 17190865001 5730000000 5730288333 1435032704 1435321037
+17193000000 17193865153 5731000000 5731288384 1436032704 1436321088
+17196000000 17196865307 5732000000 5732288435 1437032704 1437321139
+17199000000 17199865427 5733000000 5733288475 1438032704 1438321179
+17202000000 17202865636 5734000000 5734288545 1439032704 1439321249
+17205000000 17205865766 5735000000 5735288588 1440032704 1440321292
+17208000000 17208865880 5736000000 5736288626 1441032704 1441321330
+17211000000 17211866041 5737000000 5737288680 1442032704 1442321384
+17214000000 17214866176 5738000000 5738288725 1443032704 1443321429
+17217000000 17217866319 5739000000 5739288773 1444032704 1444321477
+17220000000 17220866419 5740000000 5740288806 1445032704 1445321510
+17223000000 17223866653 5741000000 5741288884 1446032704 1446321588
+17226000000 17226866726 5742000000 5742288908 1447032704 1447321612
+17229000000 17229866847 5743000000 5743288949 1448032704 1448321653
+17232000000 17232867036 5744000000 5744289012 1449032704 1449321716
+17235000000 17235867190 5745000000 5745289063 1450032704 1450321767
+17238000000 17238867369 5746000000 5746289123 1451032704 1451321827
+17241000000 17241867515 5747000000 5747289171 1452032704 1452321875
+17244000000 17244867642 5748000000 5748289214 1453032704 1453321918
+17247000000 17247867816 5749000000 5749289272 1454032704 1454321976
+17250000000 17250867880 5750000000 5750289293 1455032704 1455321997
+17253000000 17253868087 5751000000 5751289362 1456032704 1456322066
+17256000000 17256868268 5752000000 5752289422 1457032704 1457322126
+17259000000 17259868417 5753000000 5753289472 1458032704 1458322176
+17262000000 17262868474 5754000000 5754289491 1459032704 1459322195
+17265000000 17265868670 5755000000 5755289556 1460032704 1460322260
+17268000000 17268868860 5756000000 5756289620 1461032704 1461322324
+17271000000 17271869005 5757000000 5757289668 1462032704 1462322372
+17274000000 17274869177 5758000000 5758289725 1463032704 1463322429
+17277000000 17277869310 5759000000 5759289770 1464032704 1464322474
+17280000000 17280869381 5760000000 5760289793 1465032704 1465322497
+17283000000 17283869607 5761000000 5761289869 1466032704 1466322573
+17286000000 17286869767 5762000000 5762289922 1467032704 1467322626
+17289000000 17289869899 5763000000 5763289966 1468032704 1468322670
+17292000000 17292870007 5764000000 5764290002 1469032704 1469322706
+17295000000 17295870218 5765000000 5765290072 1470032704 1470322776
+17298000000 17298870384 5766000000 5766290128 1471032704 1471322832
+17301000000 17301870495 5767000000 5767290165 1472032704 1472322869
+17304000000 17304870655 5768000000 5768290218 1473032704 1473322922
+17307000000 17307870767 5769000000 5769290255 1474032704 1474322959
+17310000000 17310870965 5770000000 5770290321 1475032704 1475323025
+17313000000 17313871055 5771000000 5771290351 1476032704 1476323055
+17316000000 17316871280 5772000000 5772290426 1477032704 1477323130
+17319000000 17319871412 5773000000 5773290470 1478032704 1478323174
+17322000000 17322871551 5774000000 5774290517 1479032704 1479323221
+17325000000 17325871602 5775000000 5775290534 1480032704 1480323238
+17328000000 17328871813 5776000000 5776290604 1481032704 1481323308
+17331000000 17331872022 5777000000 5777290674 1482032704 1482323378
+17334000000 17334872150 5778000000 5778290716 1483032704 1483323420
+17337000000 17337872293 5779000000 5779290764 1484032704 1484323468
+17340000000 17340872464 5780000000 5780290821 1485032704 1485323525
+17343000000 17343872561 5781000000 5781290853 1486032704 1486323557
+17346000000 17346872774 5782000000 5782290924 1487032704 1487323628
+17349000000 17349872904 5783000000 5783290968 1488032704 1488323672
+17352000000 17352873054 5784000000 5784291018 1489032704 1489323722
+17355000000 17355873214 5785000000 5785291071 1490032704 1490323775
+17358000000 17358873310 5786000000 5786291103 1491032704 1491323807
+17361000000 17361873498 5787000000 5787291166 1492032704 1492323870
+17364000000 17364873666 5788000000 5788291222 1493032704 1493323926
+17367000000 17367873802 5789000000 5789291267 1494032704 1494323971
+17370000000 17370873977 5790000000 5790291325 1495032704 1495324029
+17373000000 17373874099 5791000000 5791291366 1496032704 1496324070
+17376000000 17376874249 5792000000 5792291416 1497032704 1497324120
+17379000000 17379874397 5793000000 5793291465 1498032704 1498324169
+17382000000 17382874603 5794000000 5794291534 1499032704 1499324238
+17385000000 17385874717 5795000000 5795291572 1500032704 1500324276
+17388000000 17388874849 5796000000 5796291616 1501032704 1501324320
+17391000000 17391875023 5797000000 5797291674 1502032704 1502324378
+17394000000 17394875142 5798000000 5798291714 1503032704 1503324418
+17397000000 17397875266 5799000000 5799291755 1504032704 1504324459
+17400000000 17400875485 5800000000 5800291828 1505032704 1505324532
+17403000000 17403875621 5801000000 5801291873 1506032704 1506324577
+17406000000 17406875772 5802000000 5802291924 1507032704 1507324628
+17409000000 17409875932 5803000000 5803291977 1508032704 1508324681
+17412000000 17412876053 5804000000 5804292017 1509032704 1509324721
+17415000000 17415876134 5805000000 5805292044 1510032704 1510324748
+17418000000 17418876342 5806000000 5806292114 1511032704 1511324818
+17421000000 17421876497 5807000000 5807292165 1512032704 1512324869
+17424000000 17424876656 5808000000 5808292218 1513032704 1513324922
+17427000000 17427876808 5809000000 5809292269 1514032704 1514324973
+17430000000 17430876930 5810000000 5810292310 1515032704 1515325014
+17433000000 17433877108 5811000000 5811292369 1516032704 1516325073
+17436000000 17436877257 5812000000 5812292419 1517032704 1517325123
+17439000000 17439877385 5813000000 5813292461 1518032704 1518325165
+17442000000 17442877554 5814000000 5814292518 1519032704 1519325222
+17445000000 17445877674 5815000000 5815292558 1520032704 1520325262
+17448000000 17448877601 5816000000 5816292533 1521032704 1521325237
+17451000000 17451877924 5817000000 5817292641 1522032704 1522325345
+17454000000 17454878177 5818000000 5818292725 1523032704 1523325429
+17457000000 17457878287 5819000000 5819292762 1524032704 1524325466
+17460000000 17460878466 5820000000 5820292822 1525032704 1525325526
+17463000000 17463878514 5821000000 5821292838 1526032704 1526325542
+17466000000 17466878768 5822000000 5822292922 1527032704 1527325626
+17469000000 17469878887 5823000000 5823292962 1528032704 1528325666
+17472000000 17472879058 5824000000 5824293019 1529032704 1529325723
+17475000000 17475879205 5825000000 5825293068 1530032704 1530325772
+17478000000 17478879358 5826000000 5826293119 1531032704 1531325823
+17481000000 17481879504 5827000000 5827293168 1532032704 1532325872
+17484000000 17484879648 5828000000 5828293216 1533032704 1533325920
+17487000000 17487879811 5829000000 5829293270 1534032704 1534325974
+17490000000 17490879963 5830000000 5830293321 1535032704 1535326025
+17493000000 17493880117 5831000000 5831293372 1536032704 1536326076
+17496000000 17496880237 5832000000 5832293412 1537032704 1537326116
+17499000000 17499880446 5833000000 5833293482 1538032704 1538326186
+17502000000 17502880576 5834000000 5834293525 1539032704 1539326229
+17505000000 17505880690 5835000000 5835293563 1540032704 1540326267
+17508000000 17508880851 5836000000 5836293617 1541032704 1541326321
+17511000000 17511880986 5837000000 5837293662 1542032704 1542326366
+17514000000 17514881129 5838000000 5838293709 1543032704 1543326413
+17517000000 17517881229 5839000000 5839293743 1544032704 1544326447
+17520000000 17520881463 5840000000 5840293821 1545032704 1545326525
+17523000000 17523881536 5841000000 5841293845 1546032704 1546326549
+17526000000 17526881657 5842000000 5842293885 1547032704 1547326589
+17529000000 17529881846 5843000000 5843293948 1548032704 1548326652
+17532000000 17532882000 5844000000 5844294000 1549032704 1549326704
+17535000000 17535882179 5845000000 5845294059 1550032704 1550326763
+17538000000 17538882325 5846000000 5846294108 1551032704 1551326812
+17541000000 17541882452 5847000000 5847294150 1552032704 1552326854
+17544000000 17544882626 5848000000 5848294208 1553032704 1553326912
+17547000000 17547882690 5849000000 5849294230 1554032704 1554326934
+17550000000 17550882897 5850000000 5850294299 1555032704 1555327003
+17553000000 17553883078 5851000000 5851294359 1556032704 1556327063
+17556000000 17556883227 5852000000 5852294409 1557032704 1557327113
+17559000000 17559883284 5853000000 5853294428 1558032704 1558327132
+17562000000 17562883480 5854000000 5854294493 1559032704 1559327197
+17565000000 17565883670 5855000000 5855294556 1560032704 1560327260
+17568000000 17568883815 5856000000 5856294605 1561032704 1561327309
+17571000000 17571883987 5857000000 5857294662 1562032704 1562327366
+17574000000 17574884120 5858000000 5858294706 1563032704 1563327410
+17577000000 17577884191 5859000000 5859294730 1564032704 1564327434
+17580000000 17580884417 5860000000 5860294805 1565032704 1565327509
+17583000000 17583884577 5861000000 5861294859 1566032704 1566327563
+17586000000 17586884709 5862000000 5862294903 1567032704 1567327607
+17589000000 17589884817 5863000000 5863294939 1568032704 1568327643
+17592000000 17592885028 5864000000 5864295009 1569032704 1569327713
+17595000000 17595885194 5865000000 5865295064 1570032704 1570327768
+17598000000 17598885305 5866000000 5866295101 1571032704 1571327805
+17601000000 17601885465 5867000000 5867295155 1572032704 1572327859
+17604000000 17604885577 5868000000 5868295192 1573032704 1573327896
+17607000000 17607885775 5869000000 5869295258 1574032704 1574327962
+17610000000 17610885865 5870000000 5870295288 1575032704 1575327992
+17613000000 17613886090 5871000000 5871295363 1576032704 1576328067
+17616000000 17616886222 5872000000 5872295407 1577032704 1577328111
+17619000000 17619886361 5873000000 5873295453 1578032704 1578328157
+17622000000 17622886412 5874000000 5874295470 1579032704 1579328174
+17625000000 17625886623 5875000000 5875295541 1580032704 1580328245
+17628000000 17628886832 5876000000 5876295610 1581032704 1581328314
+17631000000 17631886960 5877000000 5877295653 1582032704 1582328357
+17634000000 17634887103 5878000000 5878295701 1583032704 1583328405
+17637000000 17637887274 5879000000 5879295758 1584032704 1584328462
+17640000000 17640887371 5880000000 5880295790 1585032704 1585328494
+17643000000 17643887584 5881000000 5881295861 1586032704 1586328565
+17646000000 17646887714 5882000000 5882295904 1587032704 1587328608
+17649000000 17649887864 5883000000 5883295954 1588032704 1588328658
+17652000000 17652888024 5884000000 5884296008 1589032704 1589328712
+17655000000 17655888120 5885000000 5885296040 1590032704 1590328744
+17658000000 17658888308 5886000000 5886296102 1591032704 1591328806
+17661000000 17661888476 5887000000 5887296158 1592032704 1592328862
+17664000000 17664888612 5888000000 5888296204 1593032704 1593328908
+17667000000 17667888787 5889000000 5889296262 1594032704 1594328966
+17670000000 17670888909 5890000000 5890296303 1595032704 1595329007
+17673000000 17673889059 5891000000 5891296353 1596032704 1596329057
+17676000000 17676889207 5892000000 5892296402 1597032704 1597329106
+17679000000 17679889413 5893000000 5893296471 1598032704 1598329175
+17682000000 17682889527 5894000000 5894296509 1599032704 1599329213
+17685000000 17685889659 5895000000 5895296553 1600032704 1600329257
+17688000000 17688889833 5896000000 5896296611 1601032704 1601329315
+17691000000 17691889952 5897000000 5897296650 1602032704 1602329354
+17694000000 17694890076 5898000000 5898296692 1603032704 1603329396
+17697000000 17697890295 5899000000 5899296765 1604032704 1604329469
+17700000000 17700890431 5900000000 5900296810 1605032704 1605329514
+17703000000 17703890582 5901000000 5901296860 1606032704 1606329564
+17706000000 17706890742 5902000000 5902296914 1607032704 1607329618
+17709000000 17709890863 5903000000 5903296954 1608032704 1608329658
+17712000000 17712890944 5904000000 5904296981 1609032704 1609329685
+17715000000 17715891152 5905000000 5905297050 1610032704 1610329754
+17718000000 17718891307 5906000000 5906297102 1611032704 1611329806
+17721000000 17721891466 5907000000 5907297155 1612032704 1612329859
+17724000000 17724891618 5908000000 5908297206 1613032704 1613329910
+17727000000 17727891740 5909000000 5909297246 1614032704 1614329950
+17730000000 17730891918 5910000000 5910297306 1615032704 1615330010
+17733000000 17733892067 5911000000 5911297355 1616032704 1616330059
+17736000000 17736892195 5912000000 5912297398 1617032704 1617330102
+17739000000 17739892364 5913000000 5913297454 1618032704 1618330158
+17742000000 17742892484 5914000000 5914297494 1619032704 1619330198
+17745000000 17745892411 5915000000 5915297470 1620032704 1620330174
+17748000000 17748892734 5916000000 5916297578 1621032704 1621330282
+17751000000 17751892987 5917000000 5917297662 1622032704 1622330366
+17754000000 17754893097 5918000000 5918297699 1623032704 1623330403
+17757000000 17757893276 5919000000 5919297758 1624032704 1624330462
+17760000000 17760893324 5920000000 5920297774 1625032704 1625330478
+17763000000 17763893578 5921000000 5921297859 1626032704 1626330563
+17766000000 17766893697 5922000000 5922297899 1627032704 1627330603
+17769000000 17769893868 5923000000 5923297956 1628032704 1628330660
+17772000000 17772894015 5924000000 5924298005 1629032704 1629330709
+17775000000 17775894168 5925000000 5925298056 1630032704 1630330760
+17778000000 17778894314 5926000000 5926298104 1631032704 1631330808
+17781000000 17781894458 5927000000 5927298152 1632032704 1632330856
+17784000000 17784894621 5928000000 5928298207 1633032704 1633330911
+17787000000 17787894773 5929000000 5929298257 1634032704 1634330961
+17790000000 17790894927 5930000000 5930298309 1635032704 1635331013
+17793000000 17793895047 5931000000 5931298349 1636032704 1636331053
+17796000000 17796895256 5932000000 5932298418 1637032704 1637331122
+17799000000 17799895386 5933000000 5933298462 1638032704 1638331166
+17802000000 17802895500 5934000000 5934298500 1639032704 1639331204
+17805000000 17805895661 5935000000 5935298553 1640032704 1640331257
+17808000000 17808895796 5936000000 5936298598 1641032704 1641331302
+17811000000 17811895939 5937000000 5937298646 1642032704 1642331350
+17814000000 17814896039 5938000000 5938298679 1643032704 1643331383
+17817000000 17817896273 5939000000 5939298757 1644032704 1644331461
+17820000000 17820896346 5940000000 5940298782 1645032704 1645331486
+17823000000 17823896467 5941000000 5941298822 1646032704 1646331526
+17826000000 17826896656 5942000000 5942298885 1647032704 1647331589
+17829000000 17829896810 5943000000 5943298936 1648032704 1648331640
+17832000000 17832896989 5944000000 5944298996 1649032704 1649331700
+17835000000 17835897135 5945000000 5945299045 1650032704 1650331749
+17838000000 17838897262 5946000000 5946299087 1651032704 1651331791
+17841000000 17841897436 5947000000 5947299145 1652032704 1652331849
+17844000000 17844897500 5948000000 5948299166 1653032704 1653331870
+17847000000 17847897707 5949000000 5949299235 1654032704 1654331939
+17850000000 17850897888 5950000000 5950299296 1655032704 1655332000
+17853000000 17853898037 5951000000 5951299345 1656032704 1656332049
+17856000000 17856898094 5952000000 5952299364 1657032704 1657332068
+17859000000 17859898290 5953000000 5953299430 1658032704 1658332134
+17862000000 17862898480 5954000000 5954299493 1659032704 1659332197
+17865000000 17865898625 5955000000 5955299541 1660032704 1660332245
+17868000000 17868898797 5956000000 5956299599 1661032704 1661332303
+17871000000 17871898930 5957000000 5957299643 1662032704 1662332347
+17874000000 17874899001 5958000000 5958299667 1663032704 1663332371
+17877000000 17877899227 5959000000 5959299742 1664032704 1664332446
+17880000000 17880899387 5960000000 5960299795 1665032704 1665332499
+17883000000 17883899519 5961000000 5961299839 1666032704 1666332543
+17886000000 17886899627 5962000000 5962299875 1667032704 1667332579
+17889000000 17889899838 5963000000 5963299946 1668032704 1668332650
+17892000000 17892900004 5964000000 5964300001 1669032704 1669332705
+17895000000 17895900115 5965000000 5965300038 1670032704 1670332742
+17898000000 17898900275 5966000000 5966300091 1671032704 1671332795
+17901000000 17901900387 5967000000 5967300129 1672032704 1672332833
+17904000000 17904900585 5968000000 5968300195 1673032704 1673332899
+17907000000 17907900675 5969000000 5969300225 1674032704 1674332929
+17910000000 17910900900 5970000000 5970300300 1675032704 1675333004
+17913000000 17913901032 5971000000 5971300344 1676032704 1676333048
+17916000000 17916901171 5972000000 5972300390 1677032704 1677333094
+17919000000 17919901222 5973000000 5973300407 1678032704 1678333111
+17922000000 17922901433 5974000000 5974300477 1679032704 1679333181
+17925000000 17925901642 5975000000 5975300547 1680032704 1680333251
+17928000000 17928901770 5976000000 5976300590 1681032704 1681333294
+17931000000 17931901913 5977000000 5977300637 1682032704 1682333341
+17934000000 17934902084 5978000000 5978300694 1683032704 1683333398
+17937000000 17937902181 5979000000 5979300727 1684032704 1684333431
+17940000000 17940902394 5980000000 5980300798 1685032704 1685333502
+17943000000 17943902524 5981000000 5981300841 1686032704 1686333545
+17946000000 17946902674 5982000000 5982300891 1687032704 1687333595
+17949000000 17949902834 5983000000 5983300944 1688032704 1688333648
+17952000000 17952902930 5984000000 5984300976 1689032704 1689333680
+17955000000 17955903118 5985000000 5985301039 1690032704 1690333743
+17958000000 17958903286 5986000000 5986301095 1691032704 1691333799
+17961000000 17961903422 5987000000 5987301140 1692032704 1692333844
+17964000000 17964903597 5988000000 5988301199 1693032704 1693333903
+17967000000 17967903719 5989000000 5989301239 1694032704 1694333943
+17970000000 17970903869 5990000000 5990301289 1695032704 1695333993
+17973000000 17973904017 5991000000 5991301339 1696032704 1696334043
+17976000000 17976904223 5992000000 5992301407 1697032704 1697334111
+17979000000 17979904337 5993000000 5993301445 1698032704 1698334149
+17982000000 17982904469 5994000000 5994301489 1699032704 1699334193
+17985000000 17985904643 5995000000 5995301547 1700032704 1700334251
+17988000000 17988904762 5996000000 5996301587 1701032704 1701334291
+17991000000 17991904886 5997000000 5997301628 1702032704 1702334332
+17994000000 17994905105 5998000000 5998301701 1703032704 1703334405
+17997000000 17997905241 5999000000 5999301747 1704032704 1704334451
+18000000000 18000905392 6000000000 6000301797 1705032704 1705334501
+18003000000 18003905552 6001000000 6001301850 1706032704 1706334554
+18006000000 18006905673 6002000000 6002301891 1707032704 1707334595
+18009000000 18009905754 6003000000 6003301918 1708032704 1708334622
+18012000000 18012905962 6004000000 6004301987 1709032704 1709334691
+18015000000 18015906117 6005000000 6005302039 1710032704 1710334743
+18018000000 18018906276 6006000000 6006302092 1711032704 1711334796
+18021000000 18021906428 6007000000 6007302142 1712032704 1712334846
+18024000000 18024906550 6008000000 6008302183 1713032704 1713334887
+18027000000 18027906728 6009000000 6009302242 1714032704 1714334946
+18030000000 18030906877 6010000000 6010302292 1715032704 1715334996
+18033000000 18033907005 6011000000 6011302335 1716032704 1716335039
+18036000000 18036907174 6012000000 6012302391 1717032704 1717335095
+18039000000 18039907294 6013000000 6013302431 1718032704 1718335135
+18042000000 18042907221 6014000000 6014302407 1719032704 1719335111
+18045000000 18045907544 6015000000 6015302514 1720032704 1720335218
+18048000000 18048907797 6016000000 6016302599 1721032704 1721335303
+18051000000 18051907907 6017000000 6017302635 1722032704 1722335339
+18054000000 18054908086 6018000000 6018302695 1723032704 1723335399
+18057000000 18057908134 6019000000 6019302711 1724032704 1724335415
+18060000000 18060908388 6020000000 6020302796 1725032704 1725335500
+18063000000 18063908507 6021000000 6021302835 1726032704 1726335539
+18066000000 18066908678 6022000000 6022302892 1727032704 1727335596
+18069000000 18069908825 6023000000 6023302941 1728032704 1728335645
+18072000000 18072908978 6024000000 6024302992 1729032704 1729335696
+18075000000 18075909124 6025000000 6025303041 1730032704 1730335745
+18078000000 18078909268 6026000000 6026303089 1731032704 1731335793
+18081000000 18081909431 6027000000 6027303143 1732032704 1732335847
+18084000000 18084909583 6028000000 6028303194 1733032704 1733335898
+18087000000 18087909737 6029000000 6029303245 1734032704 1734335949
+18090000000 18090909857 6030000000 6030303285 1735032704 1735335989
+18093000000 18093910066 6031000000 6031303355 1736032704 1736336059
+18096000000 18096910196 6032000000 6032303398 1737032704 1737336102
+18099000000 18099910310 6033000000 6033303436 1738032704 1738336140
+18102000000 18102910471 6034000000 6034303490 1739032704 1739336194
+18105000000 18105910606 6035000000 6035303535 1740032704 1740336239
+18108000000 18108910749 6036000000 6036303583 1741032704 1741336287
+18111000000 18111910849 6037000000 6037303616 1742032704 1742336320
+18114000000 18114911083 6038000000 6038303694 1743032704 1743336398
+18117000000 18117911156 6039000000 6039303718 1744032704 1744336422
+18120000000 18120911277 6040000000 6040303759 1745032704 1745336463
+18123000000 18123911466 6041000000 6041303822 1746032704 1746336526
+18126000000 18126911620 6042000000 6042303873 1747032704 1747336577
+18129000000 18129911799 6043000000 6043303933 1748032704 1748336637
+18132000000 18132911945 6044000000 6044303981 1749032704 1749336685
+18135000000 18135912072 6045000000 6045304024 1750032704 1750336728
+18138000000 18138912246 6046000000 6046304082 1751032704 1751336786
+18141000000 18141912310 6047000000 6047304103 1752032704 1752336807
+18144000000 18144912517 6048000000 6048304172 1753032704 1753336876
+18147000000 18147912698 6049000000 6049304232 1754032704 1754336936
+18150000000 18150912847 6050000000 6050304282 1755032704 1755336986
+18153000000 18153912904 6051000000 6051304301 1756032704 1756337005
+18156000000 18156913100 6052000000 6052304366 1757032704 1757337070
+18159000000 18159913290 6053000000 6053304430 1758032704 1758337134
+18162000000 18162913435 6054000000 6054304478 1759032704 1759337182
+18165000000 18165913607 6055000000 6055304535 1760032704 1760337239
+18168000000 18168913740 6056000000 6056304580 1761032704 1761337284
+18171000000 18171913811 6057000000 6057304603 1762032704 1762337307
+18174000000 18174914037 6058000000 6058304679 1763032704 1763337383
+18177000000 18177914197 6059000000 6059304732 1764032704 1764337436
+18180000000 18180914329 6060000000 6060304776 1765032704 1765337480
+18183000000 18183914437 6061000000 6061304812 1766032704 1766337516
+18186000000 18186914648 6062000000 6062304882 1767032704 1767337586
+18189000000 18189914814 6063000000 6063304938 1768032704 1768337642
+18192000000 18192914925 6064000000 6064304975 1769032704 1769337679
+18195000000 18195915085 6065000000 6065305028 1770032704 1770337732
+18198000000 18198915197 6066000000 6066305065 1771032704 1771337769
+18201000000 18201915395 6067000000 6067305131 1772032704 1772337835
+18204000000 18204915485 6068000000 6068305161 1773032704 1773337865
+18207000000 18207915710 6069000000 6069305236 1774032704 1774337940
+18210000000 18210915842 6070000000 6070305280 1775032704 1775337984
+18213000000 18213915981 6071000000 6071305327 1776032704 1776338031
+18216000000 18216916032 6072000000 6072305344 1777032704 1777338048
+18219000000 18219916243 6073000000 6073305414 1778032704 1778338118
+18222000000 18222916452 6074000000 6074305484 1779032704 1779338188
+18225000000 18225916580 6075000000 6075305526 1780032704 1780338230
+18228000000 18228916723 6076000000 6076305574 1781032704 1781338278
+18231000000 18231916894 6077000000 6077305631 1782032704 1782338335
+18234000000 18234916991 6078000000 6078305663 1783032704 1783338367
+18237000000 18237917204 6079000000 6079305734 1784032704 1784338438
+18240000000 18240917334 6080000000 6080305778 1785032704 1785338482
+18243000000 18243917484 6081000000 6081305828 1786032704 1786338532
+18246000000 18246917644 6082000000 6082305881 1787032704 1787338585
+18249000000 18249917740 6083000000 6083305913 1788032704 1788338617
+18252000000 18252917928 6084000000 6084305976 1789032704 1789338680
+18255000000 18255918096 6085000000 6085306032 1790032704 1790338736
+18258000000 18258918232 6086000000 6086306077 1791032704 1791338781
+18261000000 18261918407 6087000000 6087306135 1792032704 1792338839
+18264000000 18264918529 6088000000 6088306176 1793032704 1793338880
+18267000000 18267918679 6089000000 6089306226 1794032704 1794338930
+18270000000 18270918827 6090000000 6090306275 1795032704 1795338979
+18273000000 18273919033 6091000000 6091306344 1796032704 1796339048
+18276000000 18276919147 6092000000 6092306382 1797032704 1797339086
+18279000000 18279919279 6093000000 6093306426 1798032704 1798339130
+18282000000 18282919453 6094000000 6094306484 1799032704 1799339188
+18285000000 18285919572 6095000000 6095306524 1800032704 1800339228
+18288000000 18288919696 6096000000 6096306565 1801032704 1801339269
+18291000000 18291919915 6097000000 6097306638 1802032704 1802339342
+18294000000 18294920051 6098000000 6098306683 1803032704 1803339387
+18297000000 18297920202 6099000000 6099306734 1804032704 1804339438
+18300000000 18300920362 6100000000 6100306787 1805032704 1805339491
+18303000000 18303920483 6101000000 6101306827 1806032704 1806339531
+18306000000 18306920564 6102000000 6102306854 1807032704 1807339558
+18309000000 18309920772 6103000000 6103306924 1808032704 1808339628
+18312000000 18312920927 6104000000 6104306975 1809032704 1809339679
+18315000000 18315921086 6105000000 6105307028 1810032704 1810339732
+18318000000 18318921238 6106000000 6106307079 1811032704 1811339783
+18321000000 18321921360 6107000000 6107307120 1812032704 1812339824
+18324000000 18324921538 6108000000 6108307179 1813032704 1813339883
+18327000000 18327921687 6109000000 6109307229 1814032704 1814339933
+18330000000 18330921815 6110000000 6110307271 1815032704 1815339975
+18333000000 18333921984 6111000000 6111307328 1816032704 1816340032
+18336000000 18336922104 6112000000 6112307368 1817032704 1817340072
+18339000000 18339922031 6113000000 6113307343 1818032704 1818340047
+18342000000 18342922354 6114000000 6114307451 1819032704 1819340155
+18345000000 18345922607 6115000000 6115307535 1820032704 1820340239
+18348000000 18348922717 6116000000 6116307572 1821032704 1821340276
+18351000000 18351922896 6117000000 6117307632 1822032704 1822340336
+18354000000 18354922944 6118000000 6118307648 1823032704 1823340352
+18357000000 18357923198 6119000000 6119307732 1824032704 1824340436
+18360000000 18360923317 6120000000 6120307772 1825032704 1825340476
+18363000000 18363923488 6121000000 6121307829 1826032704 1826340533
+18366000000 18366923635 6122000000 6122307878 1827032704 1827340582
+18369000000 18369923788 6123000000 6123307929 1828032704 1828340633
+18372000000 18372923934 6124000000 6124307978 1829032704 1829340682
+18375000000 18375924078 6125000000 6125308026 1830032704 1830340730
+18378000000 18378924241 6126000000 6126308080 1831032704 1831340784
+18381000000 18381924393 6127000000 6127308131 1832032704 1832340835
+18384000000 18384924547 6128000000 6128308182 1833032704 1833340886
+18387000000 18387924667 6129000000 6129308222 1834032704 1834340926
+18390000000 18390924876 6130000000 6130308292 1835032704 1835340996
+18393000000 18393925006 6131000000 6131308335 1836032704 1836341039
+18396000000 18396925120 6132000000 6132308373 1837032704 1837341077
+18399000000 18399925281 6133000000 6133308427 1838032704 1838341131
+18402000000 18402925416 6134000000 6134308472 1839032704 1839341176
+18405000000 18405925559 6135000000 6135308519 1840032704 1840341223
+18408000000 18408925659 6136000000 6136308553 1841032704 1841341257
+18411000000 18411925893 6137000000 6137308631 1842032704 1842341335
+18414000000 18414925966 6138000000 6138308655 1843032704 1843341359
+18417000000 18417926087 6139000000 6139308695 1844032704 1844341399
+18420000000 18420926276 6140000000 6140308758 1845032704 1845341462
+18423000000 18423926430 6141000000 6141308810 1846032704 1846341514
+18426000000 18426926609 6142000000 6142308869 1847032704 1847341573
+18429000000 18429926755 6143000000 6143308918 1848032704 1848341622
+18432000000 18432926882 6144000000 6144308960 1849032704 1849341664
+18435000000 18435927056 6145000000 6145309018 1850032704 1850341722
+18438000000 18438927120 6146000000 6146309040 1851032704 1851341744
+18441000000 18441927327 6147000000 6147309109 1852032704 1852341813
+18444000000 18444927508 6148000000 6148309169 1853032704 1853341873
+18447000000 18447927657 6149000000 6149309219 1854032704 1854341923
+18450000000 18450927714 6150000000 6150309238 1855032704 1855341942
+18453000000 18453927910 6151000000 6151309303 1856032704 1856342007
+18456000000 18456928100 6152000000 6152309366 1857032704 1857342070
+18459000000 18459928245 6153000000 6153309415 1858032704 1858342119
+18462000000 18462928417 6154000000 6154309472 1859032704 1859342176
+18465000000 18465928550 6155000000 6155309516 1860032704 1860342220
+18468000000 18468928621 6156000000 6156309540 1861032704 1861342244
+18471000000 18471928847 6157000000 6157309615 1862032704 1862342319
+18474000000 18474929007 6158000000 6158309669 1863032704 1863342373
+18477000000 18477929139 6159000000 6159309713 1864032704 1864342417
+18480000000 18480929247 6160000000 6160309749 1865032704 1865342453
+18483000000 18483929458 6161000000 6161309819 1866032704 1866342523
+18486000000 18486929624 6162000000 6162309874 1867032704 1867342578
+18489000000 18489929735 6163000000 6163309911 1868032704 1868342615
+18492000000 18492929895 6164000000 6164309965 1869032704 1869342669
+18495000000 18495930007 6165000000 6165310002 1870032704 1870342706
+18498000000 18498930205 6166000000 6166310068 1871032704 1871342772
+18501000000 18501930295 6167000000 6167310098 1872032704 1872342802
+18504000000 18504930520 6168000000 6168310173 1873032704 1873342877
+18507000000 18507930652 6169000000 6169310217 1874032704 1874342921
+18510000000 18510930791 6170000000 6170310263 1875032704 1875342967
+18513000000 18513930842 6171000000 6171310280 1876032704 1876342984
+18516000000 18516931053 6172000000 6172310351 1877032704 1877343055
+18519000000 18519931262 6173000000 6173310420 1878032704 1878343124
+18522000000 18522931390 6174000000 6174310463 1879032704 1879343167
+18525000000 18525931533 6175000000 6175310511 1880032704 1880343215
+18528000000 18528931704 6176000000 6176310568 1881032704 1881343272
+18531000000 18531931801 6177000000 6177310600 1882032704 1882343304
+18534000000 18534932014 6178000000 6178310671 1883032704 1883343375
+18537000000 18537932144 6179000000 6179310714 1884032704 1884343418
+18540000000 18540932294 6180000000 6180310764 1885032704 1885343468
+18543000000 18543932454 6181000000 6181310818 1886032704 1886343522
+18546000000 18546932550 6182000000 6182310850 1887032704 1887343554
+18549000000 18549932738 6183000000 6183310912 1888032704 1888343616
+18552000000 18552932906 6184000000 6184310968 1889032704 1889343672
+18555000000 18555933042 6185000000 6185311014 1890032704 1890343718
+18558000000 18558933217 6186000000 6186311072 1891032704 1891343776
+18561000000 18561933339 6187000000 6187311113 1892032704 1892343817
+18564000000 18564933489 6188000000 6188311163 1893032704 1893343867
+18567000000 18567933637 6189000000 6189311212 1894032704 1894343916
+18570000000 18570933843 6190000000 6190311281 1895032704 1895343985
+18573000000 18573933957 6191000000 6191311319 1896032704 1896344023
+18576000000 18576934089 6192000000 6192311363 1897032704 1897344067
+18579000000 18579934263 6193000000 6193311421 1898032704 1898344125
+18582000000 18582934382 6194000000 6194311460 1899032704 1899344164
+18585000000 18585934506 6195000000 6195311502 1900032704 1900344206
+18588000000 18588934725 6196000000 6196311575 1901032704 1901344279
+18591000000 18591934861 6197000000 6197311620 1902032704 1902344324
+18594000000 18594935012 6198000000 6198311670 1903032704 1903344374
+18597000000 18597935172 6199000000 6199311724 1904032704 1904344428
+18600000000 18600935293 6200000000 6200311764 1905032704 1905344468
+18603000000 18603935374 6201000000 6201311791 1906032704 1906344495
+18606000000 18606935582 6202000000 6202311860 1907032704 1907344564
+18609000000 18609935737 6203000000 6203311912 1908032704 1908344616
+18612000000 18612935896 6204000000 6204311965 1909032704 1909344669
+18615000000 18615936048 6205000000 6205312016 1910032704 1910344720
+18618000000 18618936170 6206000000 6206312056 1911032704 1911344760
+18621000000 18621936348 6207000000 6207312116 1912032704 1912344820
+18624000000 18624936497 6208000000 6208312165 1913032704 1913344869
+18627000000 18627936625 6209000000 6209312208 1914032704 1914344912
+18630000000 18630936794 6210000000 6210312264 1915032704 1915344968
+18633000000 18633936914 6211000000 6211312304 1916032704 1916345008
+18636000000 18636936841 6212000000 6212312280 1917032704 1917344984
+18639000000 18639937164 6213000000 6213312388 1918032704 1918345092
+18642000000 18642937417 6214000000 6214312472 1919032704 1919345176
+18645000000 18645937527 6215000000 6215312509 1920032704 1920345213
+18648000000 18648937706 6216000000 6216312568 1921032704 1921345272
+18651000000 18651937754 6217000000 6217312584 1922032704 1922345288
+18654000000 18654938008 6218000000 6218312669 1923032704 1923345373
+18657000000 18657938127 6219000000 6219312709 1924032704 1924345413
+18660000000 18660938298 6220000000 6220312766 1925032704 1925345470
+18663000000 18663938445 6221000000 6221312815 1926032704 1926345519
+18666000000 18666938598 6222000000 6222312866 1927032704 1927345570
+18669000000 18669938744 6223000000 6223312914 1928032704 1928345618
+18672000000 18672938888 6224000000 6224312962 1929032704 1929345666
+18675000000 18675939051 6225000000 6225313017 1930032704 1930345721
+18678000000 18678939203 6226000000 6226313067 1931032704 1931345771
+18681000000 18681939357 6227000000 6227313119 1932032704 1932345823
+18684000000 18684939477 6228000000 6228313159 1933032704 1933345863
+18687000000 18687939686 6229000000 6229313228 1934032704 1934345932
+18690000000 18690939816 6230000000 6230313272 1935032704 1935345976
+18693000000 18693939930 6231000000 6231313310 1936032704 1936346014
+18696000000 18696940091 6232000000 6232313363 1937032704 1937346067
+18699000000 18699940226 6233000000 6233313408 1938032704 1938346112
+18702000000 18702940369 6234000000 6234313456 1939032704 1939346160
+18705000000 18705940469 6235000000 6235313489 1940032704 1940346193
+18708000000 18708940703 6236000000 6236313567 1941032704 1941346271
+18711000000 18711940776 6237000000 6237313592 1942032704 1942346296
+18714000000 18714940897 6238000000 6238313632 1943032704 1943346336
+18717000000 18717941086 6239000000 6239313695 1944032704 1944346399
+18720000000 18720941240 6240000000 6240313746 1945032704 1945346450
+18723000000 18723941419 6241000000 6241313806 1946032704 1946346510
+18726000000 18726941565 6242000000 6242313855 1947032704 1947346559
+18729000000 18729941692 6243000000 6243313897 1948032704 1948346601
+18732000000 18732941866 6244000000 6244313955 1949032704 1949346659
+18735000000 18735941930 6245000000 6245313976 1950032704 1950346680
+18738000000 18738942137 6246000000 6246314045 1951032704 1951346749
+18741000000 18741942318 6247000000 6247314106 1952032704 1952346810
+18744000000 18744942467 6248000000 6248314155 1953032704 1953346859
+18747000000 18747942524 6249000000 6249314174 1954032704 1954346878
+18750000000 18750942720 6250000000 6250314240 1955032704 1955346944
+18753000000 18753942910 6251000000 6251314303 1956032704 1956347007
+18756000000 18756943055 6252000000 6252314351 1957032704 1957347055
+18759000000 18759943227 6253000000 6253314409 1958032704 1958347113
+18762000000 18762943360 6254000000 6254314453 1959032704 1959347157
+18765000000 18765943431 6255000000 6255314477 1960032704 1960347181
+18768000000 18768943657 6256000000 6256314552 1961032704 1961347256
+18771000000 18771943817 6257000000 6257314605 1962032704 1962347309
+18774000000 18774943949 6258000000 6258314649 1963032704 1963347353
+18777000000 18777944057 6259000000 6259314685 1964032704 1964347389
+18780000000 18780944268 6260000000 6260314756 1965032704 1965347460
+18783000000 18783944434 6261000000 6261314811 1966032704 1966347515
+18786000000 18786944545 6262000000 6262314848 1967032704 1967347552
+18789000000 18789944705 6263000000 6263314901 1968032704 1968347605
+18792000000 18792944817 6264000000 6264314939 1969032704 1969347643
+18795000000 18795945015 6265000000 6265315005 1970032704 1970347709
+18798000000 18798945105 6266000000 6266315035 1971032704 1971347739
+18801000000 18801945330 6267000000 6267315110 1972032704 1972347814
+18804000000 18804945462 6268000000 6268315154 1973032704 1973347858
+18807000000 18807945601 6269000000 6269315200 1974032704 1974347904
+18810000000 18810945652 6270000000 6270315217 1975032704 1975347921
+18813000000 18813945863 6271000000 6271315287 1976032704 1976347991
+18816000000 18816946072 6272000000 6272315357 1977032704 1977348061
+18819000000 18819946200 6273000000 6273315400 1978032704 1978348104
+18822000000 18822946343 6274000000 6274315447 1979032704 1979348151
+18825000000 18825946514 6275000000 6275315504 1980032704 1980348208
+18828000000 18828946611 6276000000 6276315537 1981032704 1981348241
+18831000000 18831946824 6277000000 6277315608 1982032704 1982348312
+18834000000 18834946954 6278000000 6278315651 1983032704 1983348355
+18837000000 18837947104 6279000000 6279315701 1984032704 1984348405
+18840000000 18840947264 6280000000 6280315754 1985032704 1985348458
+18843000000 18843947360 6281000000 6281315786 1986032704 1986348490
+18846000000 18846947548 6282000000 6282315849 1987032704 1987348553
+18849000000 18849947716 6283000000 6283315905 1988032704 1988348609
+18852000000 18852947852 6284000000 6284315950 1989032704 1989348654
+18855000000 18855948027 6285000000 6285316009 1990032704 1990348713
+18858000000 18858948149 6286000000 6286316049 1991032704 1991348753
+18861000000 18861948299 6287000000 6287316099 1992032704 1992348803
+18864000000 18864948447 6288000000 6288316149 1993032704 1993348853
+18867000000 18867948653 6289000000 6289316217 1994032704 1994348921
+18870000000 18870948767 6290000000 6290316255 1995032704 1995348959
+18873000000 18873948899 6291000000 6291316299 1996032704 1996349003
+18876000000 18876949073 6292000000 6292316357 1997032704 1997349061
+18879000000 18879949192 6293000000 6293316397 1998032704 1998349101
+18882000000 18882949316 6294000000 6294316438 1999032704 1999349142
+18885000000 18885949535 6295000000 6295316511 2000032704 2000349215
+18888000000 18888949671 6296000000 6296316557 2001032704 2001349261
+18891000000 18891949822 6297000000 6297316607 2002032704 2002349311
+18894000000 18894949982 6298000000 6298316660 2003032704 2003349364
+18897000000 18897950103 6299000000 6299316701 2004032704 2004349405
+18900000000 18900950184 6300000000 6300316728 2005032704 2005349432
+18903000000 18903950392 6301000000 6301316797 2006032704 2006349501
+18906000000 18906950547 6302000000 6302316849 2007032704 2007349553
+18909000000 18909950706 6303000000 6303316902 2008032704 2008349606
+18912000000 18912950858 6304000000 6304316952 2009032704 2009349656
+18915000000 18915950980 6305000000 6305316993 2010032704 2010349697
+18918000000 18918951158 6306000000 6306317052 2011032704 2011349756
+18921000000 18921951307 6307000000 6307317102 2012032704 2012349806
+18924000000 18924951435 6308000000 6308317145 2013032704 2013349849
+18927000000 18927951604 6309000000 6309317201 2014032704 2014349905
+18930000000 18930951724 6310000000 6310317241 2015032704 2015349945
+18933000000 18933951651 6311000000 6311317217 2016032704 2016349921
+18936000000 18936951974 6312000000 6312317324 2017032704 2017350028
+18939000000 18939952227 6313000000 6313317409 2018032704 2018350113
+18942000000 18942952337 6314000000 6314317445 2019032704 2019350149
+18945000000 18945952516 6315000000 6315317505 2020032704 2020350209
+18948000000 18948952564 6316000000 6316317521 2021032704 2021350225
+18951000000 18951952818 6317000000 6317317606 2022032704 2022350310
+18954000000 18954952937 6318000000 6318317645 2023032704 2023350349
+18957000000 18957953108 6319000000 6319317702 2024032704 2024350406
+18960000000 18960953255 6320000000 6320317751 2025032704 2025350455
+18963000000 18963953408 6321000000 6321317802 2026032704 2026350506
+18966000000 18966953554 6322000000 6322317851 2027032704 2027350555
+18969000000 18969953698 6323000000 6323317899 2028032704 2028350603
+18972000000 18972953861 6324000000 6324317953 2029032704 2029350657
+18975000000 18975954013 6325000000 6325318004 2030032704 2030350708
+18978000000 18978954167 6326000000 6326318055 2031032704 2031350759
+18981000000 18981954287 6327000000 6327318095 2032032704 2032350799
+18984000000 18984954496 6328000000 6328318165 2033032704 2033350869
+18987000000 18987954626 6329000000 6329318208 2034032704 2034350912
+18990000000 18990954740 6330000000 6330318246 2035032704 2035350950
+18993000000 18993954901 6331000000 6331318300 2036032704 2036351004
+18996000000 18996955036 6332000000 6332318345 2037032704 2037351049
+18999000000 18999955179 6333000000 6333318393 2038032704 2038351097
+19002000000 19002955279 6334000000 6334318426 2039032704 2039351130
+19005000000 19005955513 6335000000 6335318504 2040032704 2040351208
+19008000000 19008955586 6336000000 6336318528 2041032704 2041351232
+19011000000 19011955707 6337000000 6337318569 2042032704 2042351273
+19014000000 19014955896 6338000000 6338318632 2043032704 2043351336
+19017000000 19017956050 6339000000 6339318683 2044032704 2044351387
+19020000000 19020956229 6340000000 6340318743 2045032704 2045351447
+19023000000 19023956375 6341000000 6341318791 2046032704 2046351495
+19026000000 19026956502 6342000000 6342318834 2047032704 2047351538
+19029000000 19029956676 6343000000 6343318892 2048032704 2048351596
+19032000000 19032956740 6344000000 6344318913 2049032704 2049351617
+19035000000 19035956947 6345000000 6345318982 2050032704 2050351686
+19038000000 19038957128 6346000000 6346319042 2051032704 2051351746
+19041000000 19041957277 6347000000 6347319092 2052032704 2052351796
+19044000000 19044957334 6348000000 6348319111 2053032704 2053351815
+19047000000 19047957530 6349000000 6349319176 2054032704 2054351880
+19050000000 19050957720 6350000000 6350319240 2055032704 2055351944
+19053000000 19053957865 6351000000 6351319288 2056032704 2056351992
+19056000000 19056958037 6352000000 6352319345 2057032704 2057352049
+19059000000 19059958170 6353000000 6353319390 2058032704 2058352094
+19062000000 19062958241 6354000000 6354319413 2059032704 2059352117
+19065000000 19065958467 6355000000 6355319489 2060032704 2060352193
+19068000000 19068958627 6356000000 6356319542 2061032704 2061352246
+19071000000 19071958759 6357000000 6357319586 2062032704 2062352290
+19074000000 19074958867 6358000000 6358319622 2063032704 2063352326
+19077000000 19077959078 6359000000 6359319692 2064032704 2064352396
+19080000000 19080959244 6360000000 6360319748 2065032704 2065352452
+19083000000 19083959355 6361000000 6361319785 2066032704 2066352489
+19086000000 19086959515 6362000000 6362319838 2067032704 2067352542
+19089000000 19089959627 6363000000 6363319875 2068032704 2068352579
+19092000000 19092959825 6364000000 6364319941 2069032704 2069352645
+19095000000 19095959915 6365000000 6365319971 2070032704 2070352675
+19098000000 19098960140 6366000000 6366320046 2071032704 2071352750
+19101000000 19101960272 6367000000 6367320090 2072032704 2072352794
+19104000000 19104960411 6368000000 6368320137 2073032704 2073352841
+19107000000 19107960462 6369000000 6369320154 2074032704 2074352858
+19110000000 19110960673 6370000000 6370320224 2075032704 2075352928
+19113000000 19113960882 6371000000 6371320294 2076032704 2076352998
+19116000000 19116961010 6372000000 6372320336 2077032704 2077353040
+19119000000 19119961153 6373000000 6373320384 2078032704 2078353088
+19122000000 19122961324 6374000000 6374320441 2079032704 2079353145
+19125000000 19125961421 6375000000 6375320473 2080032704 2080353177
+19128000000 19128961634 6376000000 6376320544 2081032704 2081353248
+19131000000 19131961764 6377000000 6377320588 2082032704 2082353292
+19134000000 19134961914 6378000000 6378320638 2083032704 2083353342
+19137000000 19137962074 6379000000 6379320691 2084032704 2084353395
+19140000000 19140962170 6380000000 6380320723 2085032704 2085353427
+19143000000 19143962358 6381000000 6381320786 2086032704 2086353490
+19146000000 19146962526 6382000000 6382320842 2087032704 2087353546
+19149000000 19149962662 6383000000 6383320887 2088032704 2088353591
+19152000000 19152962837 6384000000 6384320945 2089032704 2089353649
+19155000000 19155962959 6385000000 6385320986 2090032704 2090353690
+19158000000 19158963109 6386000000 6386321036 2091032704 2091353740
+19161000000 19161963257 6387000000 6387321085 2092032704 2092353789
+19164000000 19164963463 6388000000 6388321154 2093032704 2093353858
+19167000000 19167963577 6389000000 6389321192 2094032704 2094353896
+19170000000 19170963709 6390000000 6390321236 2095032704 2095353940
+19173000000 19173963883 6391000000 6391321294 2096032704 2096353998
+19176000000 19176964002 6392000000 6392321334 2097032704 2097354038
+19179000000 19179964126 6393000000 6393321375 2098032704 2098354079
+19182000000 19182964345 6394000000 6394321448 2099032704 2099354152
+19185000000 19185964481 6395000000 6395321493 2100032704 2100354197
+19188000000 19188964632 6396000000 6396321544 2101032704 2101354248
+19191000000 19191964792 6397000000 6397321597 2102032704 2102354301
+19194000000 19194964913 6398000000 6398321637 2103032704 2103354341
+19197000000 19197964994 6399000000 6399321664 2104032704 2104354368
+19200000000 19200965202 6400000000 6400321734 2105032704 2105354438
+19203000000 19203965357 6401000000 6401321785 2106032704 2106354489
+19206000000 19206965516 6402000000 6402321838 2107032704 2107354542
+19209000000 19209965668 6403000000 6403321889 2108032704 2108354593
+19212000000 19212965790 6404000000 6404321930 2109032704 2109354634
+19215000000 19215965968 6405000000 6405321989 2110032704 2110354693
+19218000000 19218966117 6406000000 6406322039 2111032704 2111354743
+19221000000 19221966245 6407000000 6407322081 2112032704 2112354785
+19224000000 19224966414 6408000000 6408322138 2113032704 2113354842
+19227000000 19227966534 6409000000 6409322178 2114032704 2114354882
+19230000000 19230966461 6410000000 6410322153 2115032704 2115354857
+19233000000 19233966784 6411000000 6411322261 2116032704 2116354965
+19236000000 19236967037 6412000000 6412322345 2117032704 2117355049
+19239000000 19239967147 6413000000 6413322382 2118032704 2118355086
+19242000000 19242967326 6414000000 6414322442 2119032704 2119355146
+19245000000 19245967374 6415000000 6415322458 2120032704 2120355162
+19248000000 19248967628 6416000000 6416322542 2121032704 2121355246
+19251000000 19251967747 6417000000 6417322582 2122032704 2122355286
+19254000000 19254967918 6418000000 6418322639 2123032704 2123355343
+19257000000 19257968065 6419000000 6419322688 2124032704 2124355392
+19260000000 19260968218 6420000000 6420322739 2125032704 2125355443
+19263000000 19263968364 6421000000 6421322788 2126032704 2126355492
+19266000000 19266968508 6422000000 6422322836 2127032704 2127355540
+19269000000 19269968671 6423000000 6423322890 2128032704 2128355594
+19272000000 19272968823 6424000000 6424322941 2129032704 2129355645
+19275000000 19275968977 6425000000 6425322992 2130032704 2130355696
+19278000000 19278969097 6426000000 6426323032 2131032704 2131355736
+19281000000 19281969306 6427000000 6427323102 2132032704 2132355806
+19284000000 19284969436 6428000000 6428323145 2133032704 2133355849
+19287000000 19287969550 6429000000 6429323183 2134032704 2134355887
+19290000000 19290969711 6430000000 6430323237 2135032704 2135355941
+19293000000 19293969846 6431000000 6431323282 2136032704 2136355986
+19296000000 19296969989 6432000000 6432323329 2137032704 2137356033
+19299000000 19299970089 6433000000 6433323363 2138032704 2138356067
+19302000000 19302970323 6434000000 6434323441 2139032704 2139356145
+19305000000 19305970396 6435000000 6435323465 2140032704 2140356169
+19308000000 19308970517 6436000000 6436323505 2141032704 2141356209
+19311000000 19311970706 6437000000 6437323568 2142032704 2142356272
+19314000000 19314970860 6438000000 6438323620 2143032704 2143356324
+19317000000 19317971039 6439000000 6439323679 2144032704 2144356383
+19320000000 19320971185 6440000000 6440323728 2145032704 2145356432
+19323000000 19323971312 6441000000 6441323770 2146032704 2146356474
+19326000000 19326971486 6442000000 6442323828 2147032704 2147356532
+19329000000 19329971550 6443000000 6443323850 2148032704 2148356554
+19332000000 19332971757 6444000000 6444323919 2149032704 2149356623
+19335000000 19335971938 6445000000 6445323979 2150032704 2150356683
+19338000000 19338972087 6446000000 6446324029 2151032704 2151356733
+19341000000 19341972144 6447000000 6447324048 2152032704 2152356752
+19344000000 19344972340 6448000000 6448324113 2153032704 2153356817
+19347000000 19347972530 6449000000 6449324176 2154032704 2154356880
+19350000000 19350972675 6450000000 6450324225 2155032704 2155356929
+19353000000 19353972847 6451000000 6451324282 2156032704 2156356986
+19356000000 19356972980 6452000000 6452324326 2157032704 2157357030
+19359000000 19359973051 6453000000 6453324350 2158032704 2158357054
+19362000000 19362973277 6454000000 6454324425 2159032704 2159357129
+19365000000 19365973437 6455000000 6455324479 2160032704 2160357183
+19368000000 19368973569 6456000000 6456324523 2161032704 2161357227
+19371000000 19371973677 6457000000 6457324559 2162032704 2162357263
+19374000000 19374973888 6458000000 6458324629 2163032704 2163357333
+19377000000 19377974054 6459000000 6459324684 2164032704 2164357388
+19380000000 19380974165 6460000000 6460324721 2165032704 2165357425
+19383000000 19383974325 6461000000 6461324775 2166032704 2166357479
+19386000000 19386974437 6462000000 6462324812 2167032704 2167357516
+19389000000 19389974635 6463000000 6463324878 2168032704 2168357582
+19392000000 19392974725 6464000000 6464324908 2169032704 2169357612
+19395000000 19395974950 6465000000 6465324983 2170032704 2170357687
+19398000000 19398975082 6466000000 6466325027 2171032704 2171357731
+19401000000 19401975221 6467000000 6467325073 2172032704 2172357777
+19404000000 19404975272 6468000000 6468325090 2173032704 2173357794
+19407000000 19407975483 6469000000 6469325161 2174032704 2174357865
+19410000000 19410975692 6470000000 6470325230 2175032704 2175357934
+19413000000 19413975820 6471000000 6471325273 2176032704 2176357977
+19416000000 19416975963 6472000000 6472325321 2177032704 2177358025
+19419000000 19419976134 6473000000 6473325378 2178032704 2178358082
+19422000000 19422976231 6474000000 6474325410 2179032704 2179358114
+19425000000 19425976444 6475000000 6475325481 2180032704 2180358185
+19428000000 19428976574 6476000000 6476325524 2181032704 2181358228
+19431000000 19431976724 6477000000 6477325574 2182032704 2182358278
+19434000000 19434976884 6478000000 6478325628 2183032704 2183358332
+19437000000 19437976980 6479000000 6479325660 2184032704 2184358364
+19440000000 19440977168 6480000000 6480325722 2185032704 2185358426
+19443000000 19443977336 6481000000 6481325778 2186032704 2186358482
+19446000000 19446977472 6482000000 6482325824 2187032704 2187358528
+19449000000 19449977647 6483000000 6483325882 2188032704 2188358586
+19452000000 19452977769 6484000000 6484325923 2189032704 2189358627
+19455000000 19455977919 6485000000 6485325973 2190032704 2190358677
+19458000000 19458978067 6486000000 6486326022 2191032704 2191358726
+19461000000 19461978273 6487000000 6487326091 2192032704 2192358795
+19464000000 19464978387 6488000000 6488326129 2193032704 2193358833
+19467000000 19467978519 6489000000 6489326173 2194032704 2194358877
+19470000000 19470978693 6490000000 6490326231 2195032704 2195358935
+19473000000 19473978812 6491000000 6491326270 2196032704 2196358974
+19476000000 19476978936 6492000000 6492326312 2197032704 2197359016
+19479000000 19479979155 6493000000 6493326385 2198032704 2198359089
+19482000000 19482979291 6494000000 6494326430 2199032704 2199359134
+19485000000 19485979442 6495000000 6495326480 2200032704 2200359184
+19488000000 19488979602 6496000000 6496326534 2201032704 2201359238
+19491000000 19491979723 6497000000 6497326574 2202032704 2202359278
+19494000000 19494979804 6498000000 6498326601 2203032704 2203359305
+19497000000 19497980012 6499000000 6499326670 2204032704 2204359374
+19500000000 19500980167 6500000000 6500326722 2205032704 2205359426
+19503000000 19503980326 6501000000 6501326775 2206032704 2206359479
+19506000000 19506980478 6502000000 6502326826 2207032704 2207359530
+19509000000 19509980600 6503000000 6503326866 2208032704 2208359570
+19512000000 19512980778 6504000000 6504326926 2209032704 2209359630
+19515000000 19515980927 6505000000 6505326975 2210032704 2210359679
+19518000000 19518981055 6506000000 6506327018 2211032704 2211359722
+19521000000 19521981224 6507000000 6507327074 2212032704 2212359778
+19524000000 19524981344 6508000000 6508327114 2213032704 2213359818
+19527000000 19527981271 6509000000 6509327090 2214032704 2214359794
+19530000000 19530981594 6510000000 6510327198 2215032704 2215359902
+19533000000 19533981847 6511000000 6511327282 2216032704 2216359986
+19536000000 19536981957 6512000000 6512327319 2217032704 2217360023
+19539000000 19539982136 6513000000 6513327378 2218032704 2218360082
+19542000000 19542982184 6514000000 6514327394 2219032704 2219360098
+19545000000 19545982438 6515000000 6515327479 2220032704 2220360183
+19548000000 19548982557 6516000000 6516327519 2221032704 2221360223
+19551000000 19551982728 6517000000 6517327576 2222032704 2222360280
+19554000000 19554982875 6518000000 6518327625 2223032704 2223360329
+19557000000 19557983028 6519000000 6519327676 2224032704 2224360380
+19560000000 19560983174 6520000000 6520327724 2225032704 2225360428
+19563000000 19563983318 6521000000 6521327772 2226032704 2226360476
+19566000000 19566983481 6522000000 6522327827 2227032704 2227360531
+19569000000 19569983633 6523000000 6523327877 2228032704 2228360581
+19572000000 19572983787 6524000000 6524327929 2229032704 2229360633
+19575000000 19575983907 6525000000 6525327969 2230032704 2230360673
+19578000000 19578984116 6526000000 6526328038 2231032704 2231360742
+19581000000 19581984246 6527000000 6527328082 2232032704 2232360786
+19584000000 19584984360 6528000000 6528328120 2233032704 2233360824
+19587000000 19587984521 6529000000 6529328173 2234032704 2234360877
+19590000000 19590984656 6530000000 6530328218 2235032704 2235360922
+19593000000 19593984799 6531000000 6531328266 2236032704 2236360970
+19596000000 19596984899 6532000000 6532328299 2237032704 2237361003
+19599000000 19599985133 6533000000 6533328377 2238032704 2238361081
+19602000000 19602985206 6534000000 6534328402 2239032704 2239361106
+19605000000 19605985327 6535000000 6535328442 2240032704 2240361146
+19608000000 19608985516 6536000000 6536328505 2241032704 2241361209
+19611000000 19611985670 6537000000 6537328556 2242032704 2242361260
+19614000000 19614985849 6538000000 6538328616 2243032704 2243361320
+19617000000 19617985995 6539000000 6539328665 2244032704 2244361369
+19620000000 19620986122 6540000000 6540328707 2245032704 2245361411
+19623000000 19623986296 6541000000 6541328765 2246032704 2246361469
+19626000000 19626986360 6542000000 6542328786 2247032704 2247361490
+19629000000 19629986567 6543000000 6543328855 2248032704 2248361559
+19632000000 19632986748 6544000000 6544328916 2249032704 2249361620
+19635000000 19635986897 6545000000 6545328965 2250032704 2250361669
+19638000000 19638986954 6546000000 6546328984 2251032704 2251361688
+19641000000 19641987150 6547000000 6547329050 2252032704 2252361754
+19644000000 19644987340 6548000000 6548329113 2253032704 2253361817
+19647000000 19647987485 6549000000 6549329161 2254032704 2254361865
+19650000000 19650987657 6550000000 6550329219 2255032704 2255361923
+19653000000 19653987790 6551000000 6551329263 2256032704 2256361967
+19656000000 19656987861 6552000000 6552329287 2257032704 2257361991
+19659000000 19659988087 6553000000 6553329362 2258032704 2258362066
+19662000000 19662988247 6554000000 6554329415 2259032704 2259362119
+19665000000 19665988379 6555000000 6555329459 2260032704 2260362163
+19668000000 19668988487 6556000000 6556329495 2261032704 2261362199
+19671000000 19671988698 6557000000 6557329566 2262032704 2262362270
+19674000000 19674988864 6558000000 6558329621 2263032704 2263362325
+19677000000 19677988975 6559000000 6559329658 2264032704 2264362362
+19680000000 19680989135 6560000000 6560329711 2265032704 2265362415
+19683000000 19683989247 6561000000 6561329749 2266032704 2266362453
+19686000000 19686989445 6562000000 6562329815 2267032704 2267362519
+19689000000 19689989535 6563000000 6563329845 2268032704 2268362549
+19692000000 19692989760 6564000000 6564329920 2269032704 2269362624
+19695000000 19695989892 6565000000 6565329964 2270032704 2270362668
+19698000000 19698990031 6566000000 6566330010 2271032704 2271362714
+19701000000 19701990082 6567000000 6567330027 2272032704 2272362731
+19704000000 19704990293 6568000000 6568330097 2273032704 2273362801
+19707000000 19707990502 6569000000 6569330167 2274032704 2274362871
+19710000000 19710990630 6570000000 6570330210 2275032704 2275362914
+19713000000 19713990773 6571000000 6571330257 2276032704 2276362961
+19716000000 19716990944 6572000000 6572330314 2277032704 2277363018
+19719000000 19719991041 6573000000 6573330347 2278032704 2278363051
+19722000000 19722991254 6574000000 6574330418 2279032704 2279363122
+19725000000 19725991384 6575000000 6575330461 2280032704 2280363165
+19728000000 19728991534 6576000000 6576330511 2281032704 2281363215
+19731000000 19731991694 6577000000 6577330564 2282032704 2282363268
+19734000000 19734991790 6578000000 6578330596 2283032704 2283363300
+19737000000 19737991978 6579000000 6579330659 2284032704 2284363363
+19740000000 19740992146 6580000000 6580330715 2285032704 2285363419
+19743000000 19743992282 6581000000 6581330760 2286032704 2286363464
+19746000000 19746992457 6582000000 6582330819 2287032704 2287363523
+19749000000 19749992579 6583000000 6583330859 2288032704 2288363563
+19752000000 19752992729 6584000000 6584330909 2289032704 2289363613
+19755000000 19755992877 6585000000 6585330959 2290032704 2290363663
+19758000000 19758993083 6586000000 6586331027 2291032704 2291363731
+19761000000 19761993197 6587000000 6587331065 2292032704 2292363769
+19764000000 19764993329 6588000000 6588331109 2293032704 2293363813
+19767000000 19767993503 6589000000 6589331167 2294032704 2294363871
+19770000000 19770993622 6590000000 6590331207 2295032704 2295363911
+19773000000 19773993746 6591000000 6591331248 2296032704 2296363952
+19776000000 19776993965 6592000000 6592331321 2297032704 2297364025
+19779000000 19779994101 6593000000 6593331367 2298032704 2298364071
+19782000000 19782994252 6594000000 6594331417 2299032704 2299364121
+19785000000 19785994412 6595000000 6595331470 2300032704 2300364174
+19788000000 19788994533 6596000000 6596331511 2301032704 2301364215
+19791000000 19791994614 6597000000 6597331538 2302032704 2302364242
+19794000000 19794994822 6598000000 6598331607 2303032704 2303364311
+19797000000 19797994977 6599000000 6599331659 2304032704 2304364363
+19800000000 19800995136 6600000000 6600331712 2305032704 2305364416
+19803000000 19803995288 6601000000 6601331762 2306032704 2306364466
+19806000000 19806995410 6602000000 6602331803 2307032704 2307364507
+19809000000 19809995588 6603000000 6603331862 2308032704 2308364566
+19812000000 19812995737 6604000000 6604331912 2309032704 2309364616
+19815000000 19815995865 6605000000 6605331955 2310032704 2310364659
+19818000000 19818996034 6606000000 6606332011 2311032704 2311364715
+19821000000 19821996154 6607000000 6607332051 2312032704 2312364755
+19824000000 19824996081 6608000000 6608332027 2313032704 2313364731
+19827000000 19827996404 6609000000 6609332134 2314032704 2314364838
+19830000000 19830996657 6610000000 6610332219 2315032704 2315364923
+19833000000 19833996767 6611000000 6611332255 2316032704 2316364959
+19836000000 19836996946 6612000000 6612332315 2317032704 2317365019
+19839000000 19839996994 6613000000 6613332331 2318032704 2318365035
+19842000000 19842997248 6614000000 6614332416 2319032704 2319365120
+19845000000 19845997367 6615000000 6615332455 2320032704 2320365159
+19848000000 19848997538 6616000000 6616332512 2321032704 2321365216
+19851000000 19851997685 6617000000 6617332561 2322032704 2322365265
+19854000000 19854997838 6618000000 6618332612 2323032704 2323365316
+19857000000 19857997984 6619000000 6619332661 2324032704 2324365365
+19860000000 19860998128 6620000000 6620332709 2325032704 2325365413
+19863000000 19863998291 6621000000 6621332763 2326032704 2326365467
+19866000000 19866998443 6622000000 6622332814 2327032704 2327365518
+19869000000 19869998597 6623000000 6623332865 2328032704 2328365569
+19872000000 19872998717 6624000000 6624332905 2329032704 2329365609
+19875000000 19875998926 6625000000 6625332975 2330032704 2330365679
+19878000000 19878999056 6626000000 6626333018 2331032704 2331365722
+19881000000 19881999170 6627000000 6627333056 2332032704 2332365760
+19884000000 19884999331 6628000000 6628333110 2333032704 2333365814
+19887000000 19887999466 6629000000 6629333155 2334032704 2334365859
+19890000000 19890999609 6630000000 6630333203 2335032704 2335365907
+19893000000 19893999709 6631000000 6631333236 2336032704 2336365940
+19896000000 19896999943 6632000000 6632333314 2337032704 2337366018
+19899000000 19900000016 6633000000 6633333338 2338032704 2338366042
+19902000000 19903000137 6634000000 6634333379 2339032704 2339366083
+19905000000 19906000326 6635000000 6635333442 2340032704 2340366146
+19908000000 19909000480 6636000000 6636333493 2341032704 2341366197
+19911000000 19912000659 6637000000 6637333553 2342032704 2342366257
+19914000000 19915000805 6638000000 6638333601 2343032704 2343366305
+19917000000 19918000932 6639000000 6639333644 2344032704 2344366348
+19920000000 19921001106 6640000000 6640333702 2345032704 2345366406
+19923000000 19924001170 6641000000 6641333723 2346032704 2346366427
+19926000000 19927001377 6642000000 6642333792 2347032704 2347366496
+19929000000 19930001558 6643000000 6643333852 2348032704 2348366556
+19932000000 19933001707 6644000000 6644333902 2349032704 2349366606
+19935000000 19936001764 6645000000 6645333921 2350032704 2350366625
+19938000000 19939001960 6646000000 6646333986 2351032704 2351366690
+19941000000 19942002150 6647000000 6647334050 2352032704 2352366754
+19944000000 19945002295 6648000000 6648334098 2353032704 2353366802
+19947000000 19948002467 6649000000 6649334155 2354032704 2354366859
+19950000000 19951002600 6650000000 6650334200 2355032704 2355366904
+19953000000 19954002671 6651000000 6651334223 2356032704 2356366927
+19956000000 19957002897 6652000000 6652334299 2357032704 2357367003
+19959000000 19960003057 6653000000 6653334352 2358032704 2358367056
+19962000000 19963003189 6654000000 6654334396 2359032704 2359367100
+19965000000 19966003297 6655000000 6655334432 2360032704 2360367136
+19968000000 19969003508 6656000000 6656334502 2361032704 2361367206
+19971000000 19972003674 6657000000 6657334558 2362032704 2362367262
+19974000000 19975003785 6658000000 6658334595 2363032704 2363367299
+19977000000 19978003945 6659000000 6659334648 2364032704 2364367352
+19980000000 19981004057 6660000000 6660334685 2365032704 2365367389
+19983000000 19984004255 6661000000 6661334751 2366032704 2366367455
+19986000000 19987004345 6662000000 6662334781 2367032704 2367367485
+19989000000 19990004570 6663000000 6663334856 2368032704 2368367560
+19992000000 19993004702 6664000000 6664334900 2369032704 2369367604
+19995000000 19996004841 6665000000 6665334947 2370032704 2370367651
+19998000000 19999004892 6666000000 6666334964 2371032704 2371367668
+20001000000 20002005103 6667000000 6667335034 2372032704 2372367738
+20004000000 20005005312 6668000000 6668335104 2373032704 2373367808
+20007000000 20008005440 6669000000 6669335146 2374032704 2374367850
+20010000000 20011005583 6670000000 6670335194 2375032704 2375367898
+20013000000 20014005754 6671000000 6671335251 2376032704 2376367955
+20016000000 20017005851 6672000000 6672335283 2377032704 2377367987
+20019000000 20020006064 6673000000 6673335354 2378032704 2378368058
+20022000000 20023006194 6674000000 6674335398 2379032704 2379368102
+20025000000 20026006344 6675000000 6675335448 2380032704 2380368152
+20028000000 20029006504 6676000000 6676335501 2381032704 2381368205
+20031000000 20032006600 6677000000 6677335533 2382032704 2382368237
+20034000000 20035006788 6678000000 6678335596 2383032704 2383368300
+20037000000 20038006956 6679000000 6679335652 2384032704 2384368356
+20040000000 20041007092 6680000000 6680335697 2385032704 2385368401
+20043000000 20044007267 6681000000 6681335755 2386032704 2386368459
+20046000000 20047007389 6682000000 6682335796 2387032704 2387368500
+20049000000 20050007539 6683000000 6683335846 2388032704 2388368550
+20052000000 20053007687 6684000000 6684335895 2389032704 2389368599
+20055000000 20056007893 6685000000 6685335964 2390032704 2390368668
+20058000000 20059008007 6686000000 6686336002 2391032704 2391368706
+20061000000 20062008139 6687000000 6687336046 2392032704 2392368750
+20064000000 20065008313 6688000000 6688336104 2393032704 2393368808
+20067000000 20068008432 6689000000 6689336144 2394032704 2394368848
+20070000000 20071008556 6690000000 6690336185 2395032704 2395368889
+20073000000 20074008775 6691000000 6691336258 2396032704 2396368962
+20076000000 20077008911 6692000000 6692336303 2397032704 2397369007
+20079000000 20080009062 6693000000 6693336354 2398032704 2398369058
+20082000000 20083009222 6694000000 6694336407 2399032704 2399369111
+20085000000 20086009343 6695000000 6695336447 2400032704 2400369151
+20088000000 20089009424 6696000000 6696336474 2401032704 2401369178
+20091000000 20092009632 6697000000 6697336544 2402032704 2402369248
+20094000000 20095009787 6698000000 6698336595 2403032704 2403369299
+20097000000 20098009946 6699000000 6699336648 2404032704 2404369352
+20100000000 20101010098 6700000000 6700336699 2405032704 2405369403
+20103000000 20104010220 6701000000 6701336740 2406032704 2406369444
+20106000000 20107010398 6702000000 6702336799 2407032704 2407369503
+20109000000 20110010547 6703000000 6703336849 2408032704 2408369553
+20112000000 20113010675 6704000000 6704336891 2409032704 2409369595
+20115000000 20116010844 6705000000 6705336948 2410032704 2410369652
+20118000000 20119010964 6706000000 6706336988 2411032704 2411369692
+20121000000 20122010891 6707000000 6707336963 2412032704 2412369667
+20124000000 20125011214 6708000000 6708337071 2413032704 2413369775
+20127000000 20128011467 6709000000 6709337155 2414032704 2414369859
+20130000000 20131011577 6710000000 6710337192 2415032704 2415369896
+20133000000 20134011756 6711000000 6711337252 2416032704 2416369956
+20136000000 20137011804 6712000000 6712337268 2417032704 2417369972
+20139000000 20140012058 6713000000 6713337352 2418032704 2418370056
+20142000000 20143012177 6714000000 6714337392 2419032704 2419370096
+20145000000 20146012348 6715000000 6715337449 2420032704 2420370153
+20148000000 20149012495 6716000000 6716337498 2421032704 2421370202
+20151000000 20152012648 6717000000 6717337549 2422032704 2422370253
+20154000000 20155012794 6718000000 6718337598 2423032704 2423370302
+20157000000 20158012938 6719000000 6719337646 2424032704 2424370350
+20160000000 20161013101 6720000000 6720337700 2425032704 2425370404
+20163000000 20164013253 6721000000 6721337751 2426032704 2426370455
+20166000000 20167013407 6722000000 6722337802 2427032704 2427370506
+20169000000 20170013527 6723000000 6723337842 2428032704 2428370546
+20172000000 20173013736 6724000000 6724337912 2429032704 2429370616
+20175000000 20176013866 6725000000 6725337955 2430032704 2430370659
+20178000000 20179013980 6726000000 6726337993 2431032704 2431370697
+20181000000 20182014141 6727000000 6727338047 2432032704 2432370751
+20184000000 20185014276 6728000000 6728338092 2433032704 2433370796
+20187000000 20188014419 6729000000 6729338139 2434032704 2434370843
+20190000000 20191014519 6730000000 6730338173 2435032704 2435370877
+20193000000 20194014753 6731000000 6731338251 2436032704 2436370955
+20196000000 20197014826 6732000000 6732338275 2437032704 2437370979
+20199000000 20200014947 6733000000 6733338315 2438032704 2438371019
+20202000000 20203015136 6734000000 6734338378 2439032704 2439371082
+20205000000 20206015290 6735000000 6735338430 2440032704 2440371134
+20208000000 20209015469 6736000000 6736338489 2441032704 2441371193
+20211000000 20212015615 6737000000 6737338538 2442032704 2442371242
+20214000000 20215015742 6738000000 6738338580 2443032704 2443371284
+20217000000 20218015916 6739000000 6739338638 2444032704 2444371342
+20220000000 20221015980 6740000000 6740338660 2445032704 2445371364
+20223000000 20224016187 6741000000 6741338729 2446032704 2446371433
+20226000000 20227016368 6742000000 6742338789 2447032704 2447371493
+20229000000 20230016517 6743000000 6743338839 2448032704 2448371543
+20232000000 20233016574 6744000000 6744338858 2449032704 2449371562
+20235000000 20236016770 6745000000 6745338923 2450032704 2450371627
+20238000000 20239016960 6746000000 6746338986 2451032704 2451371690
+20241000000 20242017105 6747000000 6747339035 2452032704 2452371739
+20244000000 20245017277 6748000000 6748339092 2453032704 2453371796
+20247000000 20248017410 6749000000 6749339136 2454032704 2454371840
+20250000000 20251017481 6750000000 6750339160 2455032704 2455371864
+20253000000 20254017707 6751000000 6751339235 2456032704 2456371939
+20256000000 20257017867 6752000000 6752339289 2457032704 2457371993
+20259000000 20260017999 6753000000 6753339333 2458032704 2458372037
+20262000000 20263018107 6754000000 6754339369 2459032704 2459372073
+20265000000 20266018318 6755000000 6755339439 2460032704 2460372143
+20268000000 20269018484 6756000000 6756339494 2461032704 2461372198
+20271000000 20272018595 6757000000 6757339531 2462032704 2462372235
+20274000000 20275018755 6758000000 6758339585 2463032704 2463372289
+20277000000 20278018867 6759000000 6759339622 2464032704 2464372326
+20280000000 20281019065 6760000000 6760339688 2465032704 2465372392
+20283000000 20284019155 6761000000 6761339718 2466032704 2466372422
+20286000000 20287019380 6762000000 6762339793 2467032704 2467372497
+20289000000 20290019512 6763000000 6763339837 2468032704 2468372541
+20292000000 20293019651 6764000000 6764339883 2469032704 2469372587
+20295000000 20296019702 6765000000 6765339900 2470032704 2470372604
+20298000000 20299019913 6766000000 6766339971 2471032704 2471372675
+20301000000 20302020122 6767000000 6767340040 2472032704 2472372744
+20304000000 20305020250 6768000000 6768340083 2473032704 2473372787
+20307000000 20308020393 6769000000 6769340131 2474032704 2474372835
+20310000000 20311020564 6770000000 6770340188 2475032704 2475372892
+20313000000 20314020661 6771000000 6771340220 2476032704 2476372924
+20316000000 20317020874 6772000000 6772340291 2477032704 2477372995
+20319000000 20320021004 6773000000 6773340334 2478032704 2478373038
+20322000000 20323021154 6774000000 6774340384 2479032704 2479373088
+20325000000 20326021314 6775000000 6775340438 2480032704 2480373142
+20328000000 20329021410 6776000000 6776340470 2481032704 2481373174
+20331000000 20332021598 6777000000 6777340532 2482032704 2482373236
+20334000000 20335021766 6778000000 6778340588 2483032704 2483373292
+20337000000 20338021902 6779000000 6779340634 2484032704 2484373338
+20340000000 20341022077 6780000000 6780340692 2485032704 2485373396
+20343000000 20344022199 6781000000 6781340733 2486032704 2486373437
+20346000000 20347022349 6782000000 6782340783 2487032704 2487373487
+20349000000 20350022497 6783000000 6783340832 2488032704 2488373536
+20352000000 20353022703 6784000000 6784340901 2489032704 2489373605
+20355000000 20356022817 6785000000 6785340939 2490032704 2490373643
+20358000000 20359022949 6786000000 6786340983 2491032704 2491373687
+20361000000 20362023123 6787000000 6787341041 2492032704 2492373745
+20364000000 20365023242 6788000000 6788341080 2493032704 2493373784
+20367000000 20368023366 6789000000 6789341122 2494032704 2494373826
+20370000000 20371023585 6790000000 6790341195 2495032704 2495373899
+20373000000 20374023721 6791000000 6791341240 2496032704 2496373944
+20376000000 20377023872 6792000000 6792341290 2497032704 2497373994
+20379000000 20380024032 6793000000 6793341344 2498032704 2498374048
+20382000000 20383024153 6794000000 6794341384 2499032704 2499374088
+20385000000 20386024234 6795000000 6795341411 2500032704 2500374115
+20388000000 20389024442 6796000000 6796341480 2501032704 2501374184
+20391000000 20392024597 6797000000 6797341532 2502032704 2502374236
+20394000000 20395024756 6798000000 6798341585 2503032704 2503374289
+20397000000 20398024908 6799000000 6799341636 2504032704 2504374340
+20400000000 20401025030 6800000000 6800341676 2505032704 2505374380
+20403000000 20404025208 6801000000 6801341736 2506032704 2506374440
+20406000000 20407025357 6802000000 6802341785 2507032704 2507374489
+20409000000 20410025485 6803000000 6803341828 2508032704 2508374532
+20412000000 20413025654 6804000000 6804341884 2509032704 2509374588
+20415000000 20416025774 6805000000 6805341924 2510032704 2510374628
+20418000000 20419025701 6806000000 6806341900 2511032704 2511374604
+20421000000 20422026024 6807000000 6807342008 2512032704 2512374712
+20424000000 20425026277 6808000000 6808342092 2513032704 2513374796
+20427000000 20428026387 6809000000 6809342129 2514032704 2514374833
+20430000000 20431026566 6810000000 6810342188 2515032704 2515374892
+20433000000 20434026614 6811000000 6811342204 2516032704 2516374908
+20436000000 20437026868 6812000000 6812342289 2517032704 2517374993
+20439000000 20440026987 6813000000 6813342329 2518032704 2518375033
+20442000000 20443027158 6814000000 6814342386 2519032704 2519375090
+20445000000 20446027305 6815000000 6815342435 2520032704 2520375139
+20448000000 20449027458 6816000000 6816342486 2521032704 2521375190
+20451000000 20452027604 6817000000 6817342534 2522032704 2522375238
+20454000000 20455027748 6818000000 6818342582 2523032704 2523375286
+20457000000 20458027911 6819000000 6819342637 2524032704 2524375341
+20460000000 20461028063 6820000000 6820342687 2525032704 2525375391
+20463000000 20464028217 6821000000 6821342739 2526032704 2526375443
+20466000000 20467028337 6822000000 6822342779 2527032704 2527375483
+20469000000 20470028546 6823000000 6823342848 2528032704 2528375552
+20472000000 20473028676 6824000000 6824342892 2529032704 2529375596
+20475000000 20476028790 6825000000 6825342930 2530032704 2530375634
+20478000000 20479028951 6826000000 6826342983 2531032704 2531375687
+20481000000 20482029086 6827000000 6827343028 2532032704 2532375732
+20484000000 20485029229 6828000000 6828343076 2533032704 2533375780
+20487000000 20488029329 6829000000 6829343109 2534032704 2534375813
+20490000000 20491029563 6830000000 6830343187 2535032704 2535375891
+20493000000 20494029636 6831000000 6831343212 2536032704 2536375916
+20496000000 20497029757 6832000000 6832343252 2537032704 2537375956
+20499000000 20500029946 6833000000 6833343315 2538032704 2538376019
+20502000000 20503030100 6834000000 6834343366 2539032704 2539376070
+20505000000 20506030279 6835000000 6835343426 2540032704 2540376130
+20508000000 20509030425 6836000000 6836343475 2541032704 2541376179
+20511000000 20512030552 6837000000 6837343517 2542032704 2542376221
+20514000000 20515030726 6838000000 6838343575 2543032704 2543376279
+20517000000 20518030790 6839000000 6839343596 2544032704 2544376300
+20520000000 20521030997 6840000000 6840343665 2545032704 2545376369
+20523000000 20524031178 6841000000 6841343726 2546032704 2546376430
+20526000000 20527031327 6842000000 6842343775 2547032704 2547376479
+20529000000 20530031384 6843000000 6843343794 2548032704 2548376498
+20532000000 20533031580 6844000000 6844343860 2549032704 2549376564
+20535000000 20536031770 6845000000 6845343923 2550032704 2550376627
+20538000000 20539031915 6846000000 6846343971 2551032704 2551376675
+20541000000 20542032087 6847000000 6847344029 2552032704 2552376733
+20544000000 20545032220 6848000000 6848344073 2553032704 2553376777
+20547000000 20548032291 6849000000 6849344097 2554032704 2554376801
+20550000000 20551032517 6850000000 6850344172 2555032704 2555376876
+20553000000 20554032677 6851000000 6851344225 2556032704 2556376929
+20556000000 20557032809 6852000000 6852344269 2557032704 2557376973
+20559000000 20560032917 6853000000 6853344305 2558032704 2558377009
+20562000000 20563033128 6854000000 6854344376 2559032704 2559377080
+20565000000 20566033294 6855000000 6855344431 2560032704 2560377135
+20568000000 20569033405 6856000000 6856344468 2561032704 2561377172
+20571000000 20572033565 6857000000 6857344521 2562032704 2562377225
+20574000000 20575033677 6858000000 6858344559 2563032704 2563377263
+20577000000 20578033875 6859000000 6859344625 2564032704 2564377329
+20580000000 20581033965 6860000000 6860344655 2565032704 2565377359
+20583000000 20584034190 6861000000 6861344730 2566032704 2566377434
+20586000000 20587034322 6862000000 6862344774 2567032704 2567377478
+20589000000 20590034461 6863000000 6863344820 2568032704 2568377524
+20592000000 20593034512 6864000000 6864344837 2569032704 2569377541
+20595000000 20596034723 6865000000 6865344907 2570032704 2570377611
+20598000000 20599034932 6866000000 6866344977 2571032704 2571377681
+20601000000 20602035060 6867000000 6867345020 2572032704 2572377724
+20604000000 20605035203 6868000000 6868345067 2573032704 2573377771
+20607000000 20608035374 6869000000 6869345124 2574032704 2574377828
+20610000000 20611035471 6870000000 6870345157 2575032704 2575377861
+20613000000 20614035684 6871000000 6871345228 2576032704 2576377932
+20616000000 20617035814 6872000000 6872345271 2577032704 2577377975
+20619000000 20620035964 6873000000 6873345321 2578032704 2578378025
+20622000000 20623036124 6874000000 6874345374 2579032704 2579378078
+20625000000 20626036220 6875000000 6875345406 2580032704 2580378110
+20628000000 20629036408 6876000000 6876345469 2581032704 2581378173
+20631000000 20632036576 6877000000 6877345525 2582032704 2582378229
+20634000000 20635036712 6878000000 6878345570 2583032704 2583378274
+20637000000 20638036887 6879000000 6879345629 2584032704 2584378333
+20640000000 20641037009 6880000000 6880345669 2585032704 2585378373
+20643000000 20644037159 6881000000 6881345719 2586032704 2586378423
+20646000000 20647037307 6882000000 6882345769 2587032704 2587378473
+20649000000 20650037513 6883000000 6883345837 2588032704 2588378541
+20652000000 20653037627 6884000000 6884345875 2589032704 2589378579
+20655000000 20656037759 6885000000 6885345919 2590032704 2590378623
+20658000000 20659037933 6886000000 6886345977 2591032704 2591378681
+20661000000 20662038052 6887000000 6887346017 2592032704 2592378721
+20664000000 20665038176 6888000000 6888346058 2593032704 2593378762
+20667000000 20668038395 6889000000 6889346131 2594032704 2594378835
+20670000000 20671038531 6890000000 6890346177 2595032704 2595378881
+20673000000 20674038682 6891000000 6891346227 2596032704 2596378931
+20676000000 20677038842 6892000000 6892346280 2597032704 2597378984
+20679000000 20680038963 6893000000 6893346321 2598032704 2598379025
+20682000000 20683039044 6894000000 6894346348 2599032704 2599379052
+20685000000 20686039252 6895000000 6895346417 2600032704 2600379121
+20688000000 20689039407 6896000000 6896346469 2601032704 2601379173
+20691000000 20692039566 6897000000 6897346522 2602032704 2602379226
+20694000000 20695039718 6898000000 6898346572 2603032704 2603379276
+20697000000 20698039840 6899000000 6899346613 2604032704 2604379317
+20700000000 20701040018 6900000000 6900346672 2605032704 2605379376
+20703000000 20704040167 6901000000 6901346722 2606032704 2606379426
+20706000000 20707040295 6902000000 6902346765 2607032704 2607379469
+20709000000 20710040464 6903000000 6903346821 2608032704 2608379525
+20712000000 20713040584 6904000000 6904346861 2609032704 2609379565
+20715000000 20716040511 6905000000 6905346837 2610032704 2610379541
+20718000000 20719040834 6906000000 6906346944 2611032704 2611379648
+20721000000 20722041087 6907000000 6907347029 2612032704 2612379733
+20724000000 20725041197 6908000000 6908347065 2613032704 2613379769
+20727000000 20728041376 6909000000 6909347125 2614032704 2614379829
+20730000000 20731041424 6910000000 6910347141 2615032704 2615379845
+20733000000 20734041678 6911000000 6911347226 2616032704 2616379930
+20736000000 20737041797 6912000000 6912347265 2617032704 2617379969
+20739000000 20740041968 6913000000 6913347322 2618032704 2618380026
+20742000000 20743042115 6914000000 6914347371 2619032704 2619380075
+20745000000 20746042268 6915000000 6915347422 2620032704 2620380126
+20748000000 20749042414 6916000000 6916347471 2621032704 2621380175
+20751000000 20752042558 6917000000 6917347519 2622032704 2622380223
+20754000000 20755042721 6918000000 6918347573 2623032704 2623380277
+20757000000 20758042873 6919000000 6919347624 2624032704 2624380328
+20760000000 20761043027 6920000000 6920347675 2625032704 2625380379
+20763000000 20764043147 6921000000 6921347715 2626032704 2626380419
+20766000000 20767043356 6922000000 6922347785 2627032704 2627380489
+20769000000 20770043486 6923000000 6923347828 2628032704 2628380532
+20772000000 20773043600 6924000000 6924347866 2629032704 2629380570
+20775000000 20776043761 6925000000 6925347920 2630032704 2630380624
+20778000000 20779043896 6926000000 6926347965 2631032704 2631380669
+20781000000 20782044039 6927000000 6927348013 2632032704 2632380717
+20784000000 20785044139 6928000000 6928348046 2633032704 2633380750
+20787000000 20788044373 6929000000 6929348124 2634032704 2634380828
+20790000000 20791044446 6930000000 6930348148 2635032704 2635380852
+20793000000 20794044567 6931000000 6931348189 2636032704 2636380893
+20796000000 20797044756 6932000000 6932348252 2637032704 2637380956
+20799000000 20800044910 6933000000 6933348303 2638032704 2638381007
+20802000000 20803045089 6934000000 6934348363 2639032704 2639381067
+20805000000 20806045235 6935000000 6935348411 2640032704 2640381115
+20808000000 20809045362 6936000000 6936348454 2641032704 2641381158
+20811000000 20812045536 6937000000 6937348512 2642032704 2642381216
+20814000000 20815045600 6938000000 6938348533 2643032704 2643381237
+20817000000 20818045807 6939000000 6939348602 2644032704 2644381306
+20820000000 20821045988 6940000000 6940348662 2645032704 2645381366
+20823000000 20824046137 6941000000 6941348712 2646032704 2646381416
+20826000000 20827046194 6942000000 6942348731 2647032704 2647381435
+20829000000 20830046390 6943000000 6943348796 2648032704 2648381500
+20832000000 20833046580 6944000000 6944348860 2649032704 2649381564
+20835000000 20836046725 6945000000 6945348908 2650032704 2650381612
+20838000000 20839046897 6946000000 6946348965 2651032704 2651381669
+20841000000 20842047030 6947000000 6947349010 2652032704 2652381714
+20844000000 20845047101 6948000000 6948349033 2653032704 2653381737
+20847000000 20848047327 6949000000 6949349109 2654032704 2654381813
+20850000000 20851047487 6950000000 6950349162 2655032704 2655381866
+20853000000 20854047619 6951000000 6951349206 2656032704 2656381910
+20856000000 20857047727 6952000000 6952349242 2657032704 2657381946
+20859000000 20860047938 6953000000 6953349312 2658032704 2658382016
+20862000000 20863048104 6954000000 6954349368 2659032704 2659382072
+20865000000 20866048215 6955000000 6955349405 2660032704 2660382109
+20868000000 20869048375 6956000000 6956349458 2661032704 2661382162
+20871000000 20872048487 6957000000 6957349495 2662032704 2662382199
+20874000000 20875048685 6958000000 6958349561 2663032704 2663382265
+20877000000 20878048775 6959000000 6959349591 2664032704 2664382295
+20880000000 20881049000 6960000000 6960349666 2665032704 2665382370
+20883000000 20884049132 6961000000 6961349710 2666032704 2666382414
+20886000000 20887049271 6962000000 6962349757 2667032704 2667382461
+20889000000 20890049322 6963000000 6963349774 2668032704 2668382478
+20892000000 20893049533 6964000000 6964349844 2669032704 2669382548
+20895000000 20896049742 6965000000 6965349914 2670032704 2670382618
+20898000000 20899049870 6966000000 6966349956 2671032704 2671382660
+20901000000 20902050013 6967000000 6967350004 2672032704 2672382708
+20904000000 20905050184 6968000000 6968350061 2673032704 2673382765
+20907000000 20908050281 6969000000 6969350093 2674032704 2674382797
+20910000000 20911050494 6970000000 6970350164 2675032704 2675382868
+20913000000 20914050624 6971000000 6971350208 2676032704 2676382912
+20916000000 20917050774 6972000000 6972350258 2677032704 2677382962
+20919000000 20920050934 6973000000 6973350311 2678032704 2678383015
+20922000000 20923051030 6974000000 6974350343 2679032704 2679383047
+20925000000 20926051218 6975000000 6975350406 2680032704 2680383110
+20928000000 20929051386 6976000000 6976350462 2681032704 2681383166
+20931000000 20932051522 6977000000 6977350507 2682032704 2682383211
+20934000000 20935051697 6978000000 6978350565 2683032704 2683383269
+20937000000 20938051819 6979000000 6979350606 2684032704 2684383310
+20940000000 20941051969 6980000000 6980350656 2685032704 2685383360
+20943000000 20944052117 6981000000 6981350705 2686032704 2686383409
+20946000000 20947052323 6982000000 6982350774 2687032704 2687383478
+20949000000 20950052437 6983000000 6983350812 2688032704 2688383516
+20952000000 20953052569 6984000000 6984350856 2689032704 2689383560
+20955000000 20956052743 6985000000 6985350914 2690032704 2690383618
+20958000000 20959052862 6986000000 6986350954 2691032704 2691383658
+20961000000 20962052986 6987000000 6987350995 2692032704 2692383699
+20964000000 20965053205 6988000000 6988351068 2693032704 2693383772
+20967000000 20968053341 6989000000 6989351113 2694032704 2694383817
+20970000000 20971053492 6990000000 6990351164 2695032704 2695383868
+20973000000 20974053652 6991000000 6991351217 2696032704 2696383921
+20976000000 20977053773 6992000000 6992351257 2697032704 2697383961
+20979000000 20980053854 6993000000 6993351284 2698032704 2698383988
+20982000000 20983054062 6994000000 6994351354 2699032704 2699384058
+20985000000 20986054217 6995000000 6995351405 2700032704 2700384109
+20988000000 20989054376 6996000000 6996351458 2701032704 2701384162
+20991000000 20992054528 6997000000 6997351509 2702032704 2702384213
+20994000000 20995054650 6998000000 6998351550 2703032704 2703384254
+20997000000 20998054828 6999000000 6999351609 2704032704 2704384313
+21000000000 21001054977 7000000000 7000351659 2705032704 2705384363
+21003000000 21004055105 7001000000 7001351701 2706032704 2706384405
+21006000000 21007055274 7002000000 7002351758 2707032704 2707384462
+21009000000 21010055394 7003000000 7003351798 2708032704 2708384502
+21012000000 21013055321 7004000000 7004351773 2709032704 2709384477
+21015000000 21016055644 7005000000 7005351881 2710032704 2710384585
+21018000000 21019055897 7006000000 7006351965 2711032704 2711384669
+21021000000 21022056007 7007000000 7007352002 2712032704 2712384706
+21024000000 21025056186 7008000000 7008352062 2713032704 2713384766
+21027000000 21028056234 7009000000 7009352078 2714032704 2714384782
+21030000000 21031056488 7010000000 7010352162 2715032704 2715384866
+21033000000 21034056607 7011000000 7011352202 2716032704 2716384906
+21036000000 21037056778 7012000000 7012352259 2717032704 2717384963
+21039000000 21040056925 7013000000 7013352308 2718032704 2718385012
+21042000000 21043057078 7014000000 7014352359 2719032704 2719385063
+21045000000 21046057224 7015000000 7015352408 2720032704 2720385112
+21048000000 21049057368 7016000000 7016352456 2721032704 2721385160
+21051000000 21052057531 7017000000 7017352510 2722032704 2722385214
+21054000000 21055057683 7018000000 7018352561 2723032704 2723385265
+21057000000 21058057837 7019000000 7019352612 2724032704 2724385316
+21060000000 21061057957 7020000000 7020352652 2725032704 2725385356
+21063000000 21064058166 7021000000 7021352722 2726032704 2726385426
+21066000000 21067058296 7022000000 7022352765 2727032704 2727385469
+21069000000 21070058410 7023000000 7023352803 2728032704 2728385507
+21072000000 21073058571 7024000000 7024352857 2729032704 2729385561
+21075000000 21076058706 7025000000 7025352902 2730032704 2730385606
+21078000000 21079058849 7026000000 7026352949 2731032704 2731385653
+21081000000 21082058949 7027000000 7027352983 2732032704 2732385687
+21084000000 21085059183 7028000000 7028353061 2733032704 2733385765
+21087000000 21088059256 7029000000 7029353085 2734032704 2734385789
+21090000000 21091059377 7030000000 7030353125 2735032704 2735385829
+21093000000 21094059566 7031000000 7031353188 2736032704 2736385892
+21096000000 21097059720 7032000000 7032353240 2737032704 2737385944
+21099000000 21100059899 7033000000 7033353299 2738032704 2738386003
+21102000000 21103060045 7034000000 7034353348 2739032704 2739386052
+21105000000 21106060172 7035000000 7035353390 2740032704 2740386094
+21108000000 21109060346 7036000000 7036353448 2741032704 2741386152
+21111000000 21112060410 7037000000 7037353470 2742032704 2742386174
+21114000000 21115060617 7038000000 7038353539 2743032704 2743386243
+21117000000 21118060798 7039000000 7039353599 2744032704 2744386303
+21120000000 21121060947 7040000000 7040353649 2745032704 2745386353
+21123000000 21124061004 7041000000 7041353668 2746032704 2746386372
+21126000000 21127061200 7042000000 7042353733 2747032704 2747386437
+21129000000 21130061390 7043000000 7043353796 2748032704 2748386500
+21132000000 21133061535 7044000000 7044353845 2749032704 2749386549
+21135000000 21136061707 7045000000 7045353902 2750032704 2750386606
+21138000000 21139061840 7046000000 7046353946 2751032704 2751386650
+21141000000 21142061911 7047000000 7047353970 2752032704 2752386674
+21144000000 21145062137 7048000000 7048354045 2753032704 2753386749
+21147000000 21148062297 7049000000 7049354099 2754032704 2754386803
+21150000000 21151062429 7050000000 7050354143 2755032704 2755386847
+21153000000 21154062537 7051000000 7051354179 2756032704 2756386883
+21156000000 21157062748 7052000000 7052354249 2757032704 2757386953
+21159000000 21160062914 7053000000 7053354304 2758032704 2758387008
+21162000000 21163063025 7054000000 7054354341 2759032704 2759387045
+21165000000 21166063185 7055000000 7055354395 2760032704 2760387099
+21168000000 21169063297 7056000000 7056354432 2761032704 2761387136
+21171000000 21172063495 7057000000 7057354498 2762032704 2762387202
+21174000000 21175063585 7058000000 7058354528 2763032704 2763387232
+21177000000 21178063810 7059000000 7059354603 2764032704 2764387307
+21180000000 21181063942 7060000000 7060354647 2765032704 2765387351
+21183000000 21184064081 7061000000 7061354693 2766032704 2766387397
+21186000000 21187064132 7062000000 7062354710 2767032704 2767387414
+21189000000 21190064343 7063000000 7063354781 2768032704 2768387485
+21192000000 21193064552 7064000000 7064354850 2769032704 2769387554
+21195000000 21196064680 7065000000 7065354893 2770032704 2770387597
+21198000000 21199064823 7066000000 7066354941 2771032704 2771387645
+21201000000 21202064994 7067000000 7067354998 2772032704 2772387702
+21204000000 21205065091 7068000000 7068355030 2773032704 2773387734
+21207000000 21208065304 7069000000 7069355101 2774032704 2774387805
+21210000000 21211065434 7070000000 7070355144 2775032704 2775387848
+21213000000 21214065584 7071000000 7071355194 2776032704 2776387898
+21216000000 21217065744 7072000000 7072355248 2777032704 2777387952
+21219000000 21220065840 7073000000 7073355280 2778032704 2778387984
+21222000000 21223066028 7074000000 7074355342 2779032704 2779388046
+21225000000 21226066196 7075000000 7075355398 2780032704 2780388102
+21228000000 21229066332 7076000000 7076355444 2781032704 2781388148
+21231000000 21232066507 7077000000 7077355502 2782032704 2782388206
+21234000000 21235066629 7078000000 7078355543 2783032704 2783388247
+21237000000 21238066779 7079000000 7079355593 2784032704 2784388297
+21240000000 21241066927 7080000000 7080355642 2785032704 2785388346
+21243000000 21244067133 7081000000 7081355711 2786032704 2786388415
+21246000000 21247067247 7082000000 7082355749 2787032704 2787388453
+21249000000 21250067379 7083000000 7083355793 2788032704 2788388497
+21252000000 21253067553 7084000000 7084355851 2789032704 2789388555
+21255000000 21256067672 7085000000 7085355890 2790032704 2790388594
+21258000000 21259067796 7086000000 7086355932 2791032704 2791388636
+21261000000 21262068015 7087000000 7087356005 2792032704 2792388709
+21264000000 21265068151 7088000000 7088356050 2793032704 2793388754
+21267000000 21268068302 7089000000 7089356100 2794032704 2794388804
+21270000000 21271068462 7090000000 7090356154 2795032704 2795388858
+21273000000 21274068583 7091000000 7091356194 2796032704 2796388898
+21276000000 21277068664 7092000000 7092356221 2797032704 2797388925
+21279000000 21280068872 7093000000 7093356290 2798032704 2798388994
+21282000000 21283069027 7094000000 7094356342 2799032704 2799389046
+21285000000 21286069186 7095000000 7095356395 2800032704 2800389099
+21288000000 21289069338 7096000000 7096356446 2801032704 2801389150
+21291000000 21292069460 7097000000 7097356486 2802032704 2802389190
+21294000000 21295069638 7098000000 7098356546 2803032704 2803389250
+21297000000 21298069787 7099000000 7099356595 2804032704 2804389299
+21300000000 21301069915 7100000000 7100356638 2805032704 2805389342
+21303000000 21304070084 7101000000 7101356694 2806032704 2806389398
+21306000000 21307070204 7102000000 7102356734 2807032704 2807389438
+21309000000 21310070131 7103000000 7103356710 2808032704 2808389414
+21312000000 21313070454 7104000000 7104356818 2809032704 2809389522
+21315000000 21316070707 7105000000 7105356902 2810032704 2810389606
+21318000000 21319070817 7106000000 7106356939 2811032704 2811389643
+21321000000 21322070996 7107000000 7107356998 2812032704 2812389702
+21324000000 21325071044 7108000000 7108357014 2813032704 2813389718
+21327000000 21328071298 7109000000 7109357099 2814032704 2814389803
+21330000000 21331071417 7110000000 7110357139 2815032704 2815389843
+21333000000 21334071588 7111000000 7111357196 2816032704 2816389900
+21336000000 21337071735 7112000000 7112357245 2817032704 2817389949
+21339000000 21340071888 7113000000 7113357296 2818032704 2818390000
+21342000000 21343072034 7114000000 7114357344 2819032704 2819390048
+21345000000 21346072178 7115000000 7115357392 2820032704 2820390096
+21348000000 21349072341 7116000000 7116357447 2821032704 2821390151
+21351000000 21352072493 7117000000 7117357497 2822032704 2822390201
+21354000000 21355072647 7118000000 7118357549 2823032704 2823390253
+21357000000 21358072767 7119000000 7119357589 2824032704 2824390293
+21360000000 21361072976 7120000000 7120357658 2825032704 2825390362
+21363000000 21364073106 7121000000 7121357702 2826032704 2826390406
+21366000000 21367073220 7122000000 7122357740 2827032704 2827390444
+21369000000 21370073381 7123000000 7123357793 2828032704 2828390497
+21372000000 21373073516 7124000000 7124357838 2829032704 2829390542
+21375000000 21376073659 7125000000 7125357886 2830032704 2830390590
+21378000000 21379073759 7126000000 7126357919 2831032704 2831390623
+21381000000 21382073993 7127000000 7127357997 2832032704 2832390701
+21384000000 21385074066 7128000000 7128358022 2833032704 2833390726
+21387000000 21388074187 7129000000 7129358062 2834032704 2834390766
+21390000000 21391074376 7130000000 7130358125 2835032704 2835390829
+21393000000 21394074530 7131000000 7131358176 2836032704 2836390880
+21396000000 21397074709 7132000000 7132358236 2837032704 2837390940
+21399000000 21400074855 7133000000 7133358285 2838032704 2838390989
+21402000000 21403074982 7134000000 7134358327 2839032704 2839391031
+21405000000 21406075156 7135000000 7135358385 2840032704 2840391089
+21408000000 21409075220 7136000000 7136358406 2841032704 2841391110
+21411000000 21412075427 7137000000 7137358475 2842032704 2842391179
+21414000000 21415075608 7138000000 7138358536 2843032704 2843391240
+21417000000 21418075757 7139000000 7139358585 2844032704 2844391289
+21420000000 21421075814 7140000000 7140358604 2845032704 2845391308
+21423000000 21424076010 7141000000 7141358670 2846032704 2846391374
+21426000000 21427076200 7142000000 7142358733 2847032704 2847391437
+21429000000 21430076345 7143000000 7143358781 2848032704 2848391485
+21432000000 21433076517 7144000000 7144358839 2849032704 2849391543
+21435000000 21436076650 7145000000 7145358883 2850032704 2850391587
+21438000000 21439076721 7146000000 7146358907 2851032704 2851391611
+21441000000 21442076947 7147000000 7147358982 2852032704 2852391686
+21444000000 21445077107 7148000000 7148359035 2853032704 2853391739
+21447000000 21448077239 7149000000 7149359079 2854032704 2854391783
+21450000000 21451077347 7150000000 7150359115 2855032704 2855391819
+21453000000 21454077558 7151000000 7151359186 2856032704 2856391890
+21456000000 21457077724 7152000000 7152359241 2857032704 2857391945
+21459000000 21460077835 7153000000 7153359278 2858032704 2858391982
+21462000000 21463077995 7154000000 7154359331 2859032704 2859392035
+21465000000 21466078107 7155000000 7155359369 2860032704 2860392073
+21468000000 21469078305 7156000000 7156359435 2861032704 2861392139
+21471000000 21472078395 7157000000 7157359465 2862032704 2862392169
+21474000000 21475078620 7158000000 7158359540 2863032704 2863392244
+21477000000 21478078752 7159000000 7159359584 2864032704 2864392288
+21480000000 21481078891 7160000000 7160359630 2865032704 2865392334
+21483000000 21484078942 7161000000 7161359647 2866032704 2866392351
+21486000000 21487079153 7162000000 7162359717 2867032704 2867392421
+21489000000 21490079362 7163000000 7163359787 2868032704 2868392491
+21492000000 21493079490 7164000000 7164359830 2869032704 2869392534
+21495000000 21496079633 7165000000 7165359877 2870032704 2870392581
+21498000000 21499079804 7166000000 7166359934 2871032704 2871392638
+21501000000 21502079901 7167000000 7167359967 2872032704 2872392671
+21504000000 21505080114 7168000000 7168360038 2873032704 2873392742
+21507000000 21508080244 7169000000 7169360081 2874032704 2874392785
+21510000000 21511080394 7170000000 7170360131 2875032704 2875392835
+21513000000 21514080554 7171000000 7171360184 2876032704 2876392888
+21516000000 21517080650 7172000000 7172360216 2877032704 2877392920
+21519000000 21520080838 7173000000 7173360279 2878032704 2878392983
+21522000000 21523081006 7174000000 7174360335 2879032704 2879393039
+21525000000 21526081142 7175000000 7175360380 2880032704 2880393084
+21528000000 21529081317 7176000000 7176360439 2881032704 2881393143
+21531000000 21532081439 7177000000 7177360479 2882032704 2882393183
+21534000000 21535081589 7178000000 7178360529 2883032704 2883393233
+21537000000 21538081737 7179000000 7179360579 2884032704 2884393283
+21540000000 21541081943 7180000000 7180360647 2885032704 2885393351
+21543000000 21544082057 7181000000 7181360685 2886032704 2886393389
+21546000000 21547082189 7182000000 7182360729 2887032704 2887393433
+21549000000 21550082363 7183000000 7183360787 2888032704 2888393491
+21552000000 21553082482 7184000000 7184360827 2889032704 2889393531
+21555000000 21556082606 7185000000 7185360868 2890032704 2890393572
+21558000000 21559082825 7186000000 7186360941 2891032704 2891393645
+21561000000 21562082961 7187000000 7187360987 2892032704 2892393691
+21564000000 21565083112 7188000000 7188361037 2893032704 2893393741
+21567000000 21568083272 7189000000 7189361090 2894032704 2894393794
+21570000000 21571083393 7190000000 7190361131 2895032704 2895393835
+21573000000 21574083474 7191000000 7191361158 2896032704 2896393862
+21576000000 21577083682 7192000000 7192361227 2897032704 2897393931
+21579000000 21580083837 7193000000 7193361279 2898032704 2898393983
+21582000000 21583083996 7194000000 7194361332 2899032704 2899394036
+21585000000 21586084148 7195000000 7195361382 2900032704 2900394086
+21588000000 21589084270 7196000000 7196361423 2901032704 2901394127
+21591000000 21592084448 7197000000 7197361482 2902032704 2902394186
+21594000000 21595084597 7198000000 7198361532 2903032704 2903394236
+21597000000 21598084725 7199000000 7199361575 2904032704 2904394279
+21600000000 21601084894 7200000000 7200361631 2905032704 2905394335
+21603000000 21604085014 7201000000 7201361671 2906032704 2906394375
+21606000000 21607084941 7202000000 7202361647 2907032704 2907394351
+21609000000 21610085264 7203000000 7203361754 2908032704 2908394458
+21612000000 21613085517 7204000000 7204361839 2909032704 2909394543
+21615000000 21616085627 7205000000 7205361875 2910032704 2910394579
+21618000000 21619085806 7206000000 7206361935 2911032704 2911394639
+21621000000 21622085854 7207000000 7207361951 2912032704 2912394655
+21624000000 21625086108 7208000000 7208362036 2913032704 2913394740
+21627000000 21628086227 7209000000 7209362075 2914032704 2914394779
+21630000000 21631086398 7210000000 7210362132 2915032704 2915394836
+21633000000 21634086545 7211000000 7211362181 2916032704 2916394885
+21636000000 21637086698 7212000000 7212362232 2917032704 2917394936
+21639000000 21640086844 7213000000 7213362281 2918032704 2918394985
+21642000000 21643086988 7214000000 7214362329 2919032704 2919395033
+21645000000 21646087151 7215000000 7215362383 2920032704 2920395087
+21648000000 21649087303 7216000000 7216362434 2921032704 2921395138
+21651000000 21652087457 7217000000 7217362485 2922032704 2922395189
+21654000000 21655087577 7218000000 7218362525 2923032704 2923395229
+21657000000 21658087786 7219000000 7219362595 2924032704 2924395299
+21660000000 21661087916 7220000000 7220362638 2925032704 2925395342
+21663000000 21664088030 7221000000 7221362676 2926032704 2926395380
+21666000000 21667088191 7222000000 7222362730 2927032704 2927395434
+21669000000 21670088326 7223000000 7223362775 2928032704 2928395479
+21672000000 21673088469 7224000000 7224362823 2929032704 2929395527
+21675000000 21676088569 7225000000 7225362856 2930032704 2930395560
+21678000000 21679088803 7226000000 7226362934 2931032704 2931395638
+21681000000 21682088876 7227000000 7227362958 2932032704 2932395662
+21684000000 21685088997 7228000000 7228362999 2933032704 2933395703
+21687000000 21688089186 7229000000 7229363062 2934032704 2934395766
+21690000000 21691089340 7230000000 7230363113 2935032704 2935395817
+21693000000 21694089519 7231000000 7231363173 2936032704 2936395877
+21696000000 21697089665 7232000000 7232363221 2937032704 2937395925
+21699000000 21700089792 7233000000 7233363264 2938032704 2938395968
+21702000000 21703089966 7234000000 7234363322 2939032704 2939396026
+21705000000 21706090030 7235000000 7235363343 2940032704 2940396047
+21708000000 21709090237 7236000000 7236363412 2941032704 2941396116
+21711000000 21712090418 7237000000 7237363472 2942032704 2942396176
+21714000000 21715090567 7238000000 7238363522 2943032704 2943396226
+21717000000 21718090624 7239000000 7239363541 2944032704 2944396245
+21720000000 21721090820 7240000000 7240363606 2945032704 2945396310
+21723000000 21724091010 7241000000 7241363670 2946032704 2946396374
+21726000000 21727091155 7242000000 7242363718 2947032704 2947396422
+21729000000 21730091327 7243000000 7243363775 2948032704 2948396479
+21732000000 21733091460 7244000000 7244363820 2949032704 2949396524
+21735000000 21736091531 7245000000 7245363843 2950032704 2950396547
+21738000000 21739091757 7246000000 7246363919 2951032704 2951396623
+21741000000 21742091917 7247000000 7247363972 2952032704 2952396676
+21744000000 21745092049 7248000000 7248364016 2953032704 2953396720
+21747000000 21748092157 7249000000 7249364052 2954032704 2954396756
+21750000000 21751092368 7250000000 7250364122 2955032704 2955396826
+21753000000 21754092534 7251000000 7251364178 2956032704 2956396882
+21756000000 21757092645 7252000000 7252364215 2957032704 2957396919
+21759000000 21760092805 7253000000 7253364268 2958032704 2958396972
+21762000000 21763092917 7254000000 7254364305 2959032704 2959397009
+21765000000 21766093115 7255000000 7255364371 2960032704 2960397075
+21768000000 21769093205 7256000000 7256364401 2961032704 2961397105
+21771000000 21772093430 7257000000 7257364476 2962032704 2962397180
+21774000000 21775093562 7258000000 7258364520 2963032704 2963397224
+21777000000 21778093701 7259000000 7259364567 2964032704 2964397271
+21780000000 21781093752 7260000000 7260364584 2965032704 2965397288
+21783000000 21784093963 7261000000 7261364654 2966032704 2966397358
+21786000000 21787094172 7262000000 7262364724 2967032704 2967397428
+21789000000 21790094300 7263000000 7263364766 2968032704 2968397470
+21792000000 21793094443 7264000000 7264364814 2969032704 2969397518
+21795000000 21796094614 7265000000 7265364871 2970032704 2970397575
+21798000000 21799094711 7266000000 7266364903 2971032704 2971397607
+21801000000 21802094924 7267000000 7267364974 2972032704 2972397678
+21804000000 21805095054 7268000000 7268365018 2973032704 2973397722
+21807000000 21808095204 7269000000 7269365068 2974032704 2974397772
+21810000000 21811095364 7270000000 7270365121 2975032704 2975397825
+21813000000 21814095460 7271000000 7271365153 2976032704 2976397857
+21816000000 21817095648 7272000000 7272365216 2977032704 2977397920
+21819000000 21820095816 7273000000 7273365272 2978032704 2978397976
+21822000000 21823095952 7274000000 7274365317 2979032704 2979398021
+21825000000 21826096127 7275000000 7275365375 2980032704 2980398079
+21828000000 21829096249 7276000000 7276365416 2981032704 2981398120
+21831000000 21832096399 7277000000 7277365466 2982032704 2982398170
+21834000000 21835096547 7278000000 7278365515 2983032704 2983398219
+21837000000 21838096753 7279000000 7279365584 2984032704 2984398288
+21840000000 21841096867 7280000000 7280365622 2985032704 2985398326
+21843000000 21844096999 7281000000 7281365666 2986032704 2986398370
+21846000000 21847097173 7282000000 7282365724 2987032704 2987398428
+21849000000 21850097292 7283000000 7283365764 2988032704 2988398468
+21852000000 21853097416 7284000000 7284365805 2989032704 2989398509
+21855000000 21856097635 7285000000 7285365878 2990032704 2990398582
+21858000000 21859097771 7286000000 7286365923 2991032704 2991398627
+21861000000 21862097922 7287000000 7287365974 2992032704 2992398678
+21864000000 21865098082 7288000000 7288366027 2993032704 2993398731
+21867000000 21868098203 7289000000 7289366067 2994032704 2994398771
+21870000000 21871098284 7290000000 7290366094 2995032704 2995398798
+21873000000 21874098492 7291000000 7291366164 2996032704 2996398868
+21876000000 21877098647 7292000000 7292366215 2997032704 2997398919
+21879000000 21880098806 7293000000 7293366268 2998032704 2998398972
+21882000000 21883098958 7294000000 7294366319 2999032704 2999399023
+21885000000 21886099080 7295000000 7295366360 3000032704 3000399064
+21888000000 21889099258 7296000000 7296366419 3001032704 3001399123
+21891000000 21892099407 7297000000 7297366469 3002032704 3002399173
+21894000000 21895099535 7298000000 7298366511 3003032704 3003399215
+21897000000 21898099704 7299000000 7299366568 3004032704 3004399272
+21900000000 21901099824 7300000000 7300366608 3005032704 3005399312
+21903000000 21904099751 7301000000 7301366583 3006032704 3006399287
+21906000000 21907100074 7302000000 7302366691 3007032704 3007399395
+21909000000 21910100327 7303000000 7303366775 3008032704 3008399479
+21912000000 21913100437 7304000000 7304366812 3009032704 3009399516
+21915000000 21916100616 7305000000 7305366872 3010032704 3010399576
+21918000000 21919100664 7306000000 7306366888 3011032704 3011399592
+21921000000 21922100918 7307000000 7307366972 3012032704 3012399676
+21924000000 21925101037 7308000000 7308367012 3013032704 3013399716
+21927000000 21928101208 7309000000 7309367069 3014032704 3014399773
+21930000000 21931101355 7310000000 7310367118 3015032704 3015399822
+21933000000 21934101508 7311000000 7311367169 3016032704 3016399873
+21936000000 21937101654 7312000000 7312367218 3017032704 3017399922
+21939000000 21940101798 7313000000 7313367266 3018032704 3018399970
+21942000000 21943101961 7314000000 7314367320 3019032704 3019400024
+21945000000 21946102113 7315000000 7315367371 3020032704 3020400075
+21948000000 21949102267 7316000000 7316367422 3021032704 3021400126
+21951000000 21952102387 7317000000 7317367462 3022032704 3022400166
+21954000000 21955102596 7318000000 7318367532 3023032704 3023400236
+21957000000 21958102726 7319000000 7319367575 3024032704 3024400279
+21960000000 21961102840 7320000000 7320367613 3025032704 3025400317
+21963000000 21964103001 7321000000 7321367667 3026032704 3026400371
+21966000000 21967103136 7322000000 7322367712 3027032704 3027400416
+21969000000 21970103279 7323000000 7323367759 3028032704 3028400463
+21972000000 21973103379 7324000000 7324367793 3029032704 3029400497
+21975000000 21976103613 7325000000 7325367871 3030032704 3030400575
+21978000000 21979103686 7326000000 7326367895 3031032704 3031400599
+21981000000 21982103807 7327000000 7327367935 3032032704 3032400639
+21984000000 21985103996 7328000000 7328367998 3033032704 3033400702
+21987000000 21988104150 7329000000 7329368050 3034032704 3034400754
+21990000000 21991104329 7330000000 7330368109 3035032704 3035400813
+21993000000 21994104475 7331000000 7331368158 3036032704 3036400862
+21996000000 21997104602 7332000000 7332368200 3037032704 3037400904
+21999000000 22000104776 7333000000 7333368258 3038032704 3038400962
+22002000000 22003104840 7334000000 7334368280 3039032704 3039400984
+22005000000 22006105047 7335000000 7335368349 3040032704 3040401053
+22008000000 22009105228 7336000000 7336368409 3041032704 3041401113
+22011000000 22012105377 7337000000 7337368459 3042032704 3042401163
+22014000000 22015105434 7338000000 7338368478 3043032704 3043401182
+22017000000 22018105630 7339000000 7339368543 3044032704 3044401247
+22020000000 22021105820 7340000000 7340368606 3045032704 3045401310
+22023000000 22024105965 7341000000 7341368655 3046032704 3046401359
+22026000000 22027106137 7342000000 7342368712 3047032704 3047401416
+22029000000 22030106270 7343000000 7343368756 3048032704 3048401460
+22032000000 22033106341 7344000000 7344368780 3049032704 3049401484
+22035000000 22036106567 7345000000 7345368855 3050032704 3050401559
+22038000000 22039106727 7346000000 7346368909 3051032704 3051401613
+22041000000 22042106859 7347000000 7347368953 3052032704 3052401657
+22044000000 22045106967 7348000000 7348368989 3053032704 3053401693
+22047000000 22048107178 7349000000 7349369059 3054032704 3054401763
+22050000000 22051107344 7350000000 7350369114 3055032704 3055401818
+22053000000 22054107455 7351000000 7351369151 3056032704 3056401855
+22056000000 22057107615 7352000000 7352369205 3057032704 3057401909
+22059000000 22060107727 7353000000 7353369242 3058032704 3058401946
+22062000000 22063107925 7354000000 7354369308 3059032704 3059402012
+22065000000 22066108015 7355000000 7355369338 3060032704 3060402042
+22068000000 22069108240 7356000000 7356369413 3061032704 3061402117
+22071000000 22072108372 7357000000 7357369457 3062032704 3062402161
+22074000000 22075108511 7358000000 7358369503 3063032704 3063402207
+22077000000 22078108562 7359000000 7359369520 3064032704 3064402224
+22080000000 22081108773 7360000000 7360369591 3065032704 3065402295
+22083000000 22084108982 7361000000 7361369660 3066032704 3066402364
+22086000000 22087109110 7362000000 7362369703 3067032704 3067402407
+22089000000 22090109253 7363000000 7363369751 3068032704 3068402455
+22092000000 22093109424 7364000000 7364369808 3069032704 3069402512
+22095000000 22096109521 7365000000 7365369840 3070032704 3070402544
+22098000000 22099109734 7366000000 7366369911 3071032704 3071402615
+22101000000 22102109864 7367000000 7367369954 3072032704 3072402658
+22104000000 22105110014 7368000000 7368370004 3073032704 3073402708
+22107000000 22108110174 7369000000 7369370058 3074032704 3074402762
+22110000000 22111110270 7370000000 7370370090 3075032704 3075402794
+22113000000 22114110458 7371000000 7371370152 3076032704 3076402856
+22116000000 22117110626 7372000000 7372370208 3077032704 3077402912
+22119000000 22120110762 7373000000 7373370254 3078032704 3078402958
+22122000000 22123110937 7374000000 7374370312 3079032704 3079403016
+22125000000 22126111059 7375000000 7375370353 3080032704 3080403057
+22128000000 22129111209 7376000000 7376370403 3081032704 3081403107
+22131000000 22132111357 7377000000 7377370452 3082032704 3082403156
+22134000000 22135111563 7378000000 7378370521 3083032704 3083403225
+22137000000 22138111677 7379000000 7379370559 3084032704 3084403263
+22140000000 22141111809 7380000000 7380370603 3085032704 3085403307
+22143000000 22144111983 7381000000 7381370661 3086032704 3086403365
+22146000000 22147112102 7382000000 7382370700 3087032704 3087403404
+22149000000 22150112226 7383000000 7383370742 3088032704 3088403446
+22152000000 22153112445 7384000000 7384370815 3089032704 3089403519
+22155000000 22156112581 7385000000 7385370860 3090032704 3090403564
+22158000000 22159112732 7386000000 7386370910 3091032704 3091403614
+22161000000 22162112892 7387000000 7387370964 3092032704 3092403668
+22164000000 22165113013 7388000000 7388371004 3093032704 3093403708
+22167000000 22168113094 7389000000 7389371031 3094032704 3094403735
+22170000000 22171113302 7390000000 7390371100 3095032704 3095403804
+22173000000 22174113457 7391000000 7391371152 3096032704 3096403856
+22176000000 22177113616 7392000000 7392371205 3097032704 3097403909
+22179000000 22180113768 7393000000 7393371256 3098032704 3098403960
+22182000000 22183113890 7394000000 7394371296 3099032704 3099404000
+22185000000 22186114068 7395000000 7395371356 3100032704 3100404060
+22188000000 22189114217 7396000000 7396371405 3101032704 3101404109
+22191000000 22192114345 7397000000 7397371448 3102032704 3102404152
+22194000000 22195114514 7398000000 7398371504 3103032704 3103404208
+22197000000 22198114634 7399000000 7399371544 3104032704 3104404248
+22200000000 22201114561 7400000000 7400371520 3105032704 3105404224
+22203000000 22204114884 7401000000 7401371628 3106032704 3106404332
+22206000000 22207115137 7402000000 7402371712 3107032704 3107404416
+22209000000 22210115247 7403000000 7403371749 3108032704 3108404453
+22212000000 22213115426 7404000000 7404371808 3109032704 3109404512
+22215000000 22216115474 7405000000 7405371824 3110032704 3110404528
+22218000000 22219115728 7406000000 7406371909 3111032704 3111404613
+22221000000 22222115847 7407000000 7407371949 3112032704 3112404653
+22224000000 22225116018 7408000000 7408372006 3113032704 3113404710
+22227000000 22228116165 7409000000 7409372055 3114032704 3114404759
+22230000000 22231116318 7410000000 7410372106 3115032704 3115404810
+22233000000 22234116464 7411000000 7411372154 3116032704 3116404858
+22236000000 22237116608 7412000000 7412372202 3117032704 3117404906
+22239000000 22240116771 7413000000 7413372257 3118032704 3118404961
+22242000000 22243116923 7414000000 7414372307 3119032704 3119405011
+22245000000 22246117077 7415000000 7415372359 3120032704 3120405063
+22248000000 22249117197 7416000000 7416372399 3121032704 3121405103
+22251000000 22252117406 7417000000 7417372468 3122032704 3122405172
+22254000000 22255117536 7418000000 7418372512 3123032704 3123405216
+22257000000 22258117650 7419000000 7419372550 3124032704 3124405254
+22260000000 22261117811 7420000000 7420372603 3125032704 3125405307
+22263000000 22264117946 7421000000 7421372648 3126032704 3126405352
+22266000000 22267118089 7422000000 7422372696 3127032704 3127405400
+22269000000 22270118189 7423000000 7423372729 3128032704 3128405433
+22272000000 22273118423 7424000000 7424372807 3129032704 3129405511
+22275000000 22276118496 7425000000 7425372832 3130032704 3130405536
+22278000000 22279118617 7426000000 7426372872 3131032704 3131405576
+22281000000 22282118806 7427000000 7427372935 3132032704 3132405639
+22284000000 22285118960 7428000000 7428372986 3133032704 3133405690
+22287000000 22288119139 7429000000 7429373046 3134032704 3134405750
+22290000000 22291119285 7430000000 7430373095 3135032704 3135405799
+22293000000 22294119412 7431000000 7431373137 3136032704 3136405841
+22296000000 22297119586 7432000000 7432373195 3137032704 3137405899
+22299000000 22300119650 7433000000 7433373216 3138032704 3138405920
+22302000000 22303119857 7434000000 7434373285 3139032704 3139405989
+22305000000 22306120038 7435000000 7435373346 3140032704 3140406050
+22308000000 22309120187 7436000000 7436373395 3141032704 3141406099
+22311000000 22312120244 7437000000 7437373414 3142032704 3142406118
+22314000000 22315120440 7438000000 7438373480 3143032704 3143406184
+22317000000 22318120630 7439000000 7439373543 3144032704 3144406247
+22320000000 22321120775 7440000000 7440373591 3145032704 3145406295
+22323000000 22324120947 7441000000 7441373649 3146032704 3146406353
+22326000000 22327121080 7442000000 7442373693 3147032704 3147406397
+22329000000 22330121151 7443000000 7443373717 3148032704 3148406421
+22332000000 22333121377 7444000000 7444373792 3149032704 3149406496
+22335000000 22336121537 7445000000 7445373845 3150032704 3150406549
+22338000000 22339121669 7446000000 7446373889 3151032704 3151406593
+22341000000 22342121777 7447000000 7447373925 3152032704 3152406629
+22344000000 22345121988 7448000000 7448373996 3153032704 3153406700
+22347000000 22348122154 7449000000 7449374051 3154032704 3154406755
+22350000000 22351122265 7450000000 7450374088 3155032704 3155406792
+22353000000 22354122425 7451000000 7451374141 3156032704 3156406845
+22356000000 22357122537 7452000000 7452374179 3157032704 3157406883
+22359000000 22360122735 7453000000 7453374245 3158032704 3158406949
+22362000000 22363122825 7454000000 7454374275 3159032704 3159406979
+22365000000 22366123050 7455000000 7455374350 3160032704 3160407054
+22368000000 22369123182 7456000000 7456374394 3161032704 3161407098
+22371000000 22372123321 7457000000 7457374440 3162032704 3162407144
+22374000000 22375123372 7458000000 7458374457 3163032704 3163407161
+22377000000 22378123583 7459000000 7459374527 3164032704 3164407231
+22380000000 22381123792 7460000000 7460374597 3165032704 3165407301
+22383000000 22384123920 7461000000 7461374640 3166032704 3166407344
+22386000000 22387124063 7462000000 7462374687 3167032704 3167407391
+22389000000 22390124234 7463000000 7463374744 3168032704 3168407448
+22392000000 22393124331 7464000000 7464374777 3169032704 3169407481
+22395000000 22396124544 7465000000 7465374848 3170032704 3170407552
+22398000000 22399124674 7466000000 7466374891 3171032704 3171407595
+22401000000 22402124824 7467000000 7467374941 3172032704 3172407645
+22404000000 22405124984 7468000000 7468374994 3173032704 3173407698
+22407000000 22408125080 7469000000 7469375026 3174032704 3174407730
+22410000000 22411125268 7470000000 7470375089 3175032704 3175407793
+22413000000 22414125436 7471000000 7471375145 3176032704 3176407849
+22416000000 22417125572 7472000000 7472375190 3177032704 3177407894
+22419000000 22420125747 7473000000 7473375249 3178032704 3178407953
+22422000000 22423125869 7474000000 7474375289 3179032704 3179407993
+22425000000 22426126019 7475000000 7475375339 3180032704 3180408043
+22428000000 22429126167 7476000000 7476375389 3181032704 3181408093
+22431000000 22432126373 7477000000 7477375457 3182032704 3182408161
+22434000000 22435126487 7478000000 7478375495 3183032704 3183408199
+22437000000 22438126619 7479000000 7479375539 3184032704 3184408243
+22440000000 22441126793 7480000000 7480375597 3185032704 3185408301
+22443000000 22444126912 7481000000 7481375637 3186032704 3186408341
+22446000000 22447127036 7482000000 7482375678 3187032704 3187408382
+22449000000 22450127255 7483000000 7483375751 3188032704 3188408455
+22452000000 22453127391 7484000000 7484375797 3189032704 3189408501
+22455000000 22456127542 7485000000 7485375847 3190032704 3190408551
+22458000000 22459127702 7486000000 7486375900 3191032704 3191408604
+22461000000 22462127823 7487000000 7487375941 3192032704 3192408645
+22464000000 22465127904 7488000000 7488375968 3193032704 3193408672
+22467000000 22468128112 7489000000 7489376037 3194032704 3194408741
+22470000000 22471128267 7490000000 7490376089 3195032704 3195408793
+22473000000 22474128426 7491000000 7491376142 3196032704 3196408846
+22476000000 22477128578 7492000000 7492376192 3197032704 3197408896
+22479000000 22480128700 7493000000 7493376233 3198032704 3198408937
+22482000000 22483128878 7494000000 7494376292 3199032704 3199408996
+22485000000 22486129027 7495000000 7495376342 3200032704 3200409046
+22488000000 22489129155 7496000000 7496376385 3201032704 3201409089
+22491000000 22492129324 7497000000 7497376441 3202032704 3202409145
+22494000000 22495129444 7498000000 7498376481 3203032704 3203409185
+22497000000 22498129371 7499000000 7499376457 3204032704 3204409161
+22500000000 22501129694 7500000000 7500376564 3205032704 3205409268
+22503000000 22504129947 7501000000 7501376649 3206032704 3206409353
+22506000000 22507130057 7502000000 7502376685 3207032704 3207409389
+22509000000 22510130236 7503000000 7503376745 3208032704 3208409449
+22512000000 22513130284 7504000000 7504376761 3209032704 3209409465
+22515000000 22516130538 7505000000 7505376846 3210032704 3210409550
+22518000000 22519130657 7506000000 7506376885 3211032704 3211409589
+22521000000 22522130828 7507000000 7507376942 3212032704 3212409646
+22524000000 22525130975 7508000000 7508376991 3213032704 3213409695
+22527000000 22528131128 7509000000 7509377042 3214032704 3214409746
+22530000000 22531131274 7510000000 7510377091 3215032704 3215409795
+22533000000 22534131418 7511000000 7511377139 3216032704 3216409843
+22536000000 22537131581 7512000000 7512377193 3217032704 3217409897
+22539000000 22540131733 7513000000 7513377244 3218032704 3218409948
+22542000000 22543131887 7514000000 7514377295 3219032704 3219409999
+22545000000 22546132007 7515000000 7515377335 3220032704 3220410039
+22548000000 22549132216 7516000000 7516377405 3221032704 3221410109
+22551000000 22552132346 7517000000 7517377448 3222032704 3222410152
+22554000000 22555132460 7518000000 7518377486 3223032704 3223410190
+22557000000 22558132621 7519000000 7519377540 3224032704 3224410244
+22560000000 22561132756 7520000000 7520377585 3225032704 3225410289
+22563000000 22564132899 7521000000 7521377633 3226032704 3226410337
+22566000000 22567132999 7522000000 7522377666 3227032704 3227410370
+22569000000 22570133233 7523000000 7523377744 3228032704 3228410448
+22572000000 22573133306 7524000000 7524377768 3229032704 3229410472
+22575000000 22576133427 7525000000 7525377809 3230032704 3230410513
+22578000000 22579133616 7526000000 7526377872 3231032704 3231410576
+22581000000 22582133770 7527000000 7527377923 3232032704 3232410627
+22584000000 22585133949 7528000000 7528377983 3233032704 3233410687
+22587000000 22588134095 7529000000 7529378031 3234032704 3234410735
+22590000000 22591134222 7530000000 7530378074 3235032704 3235410778
+22593000000 22594134396 7531000000 7531378132 3236032704 3236410836
+22596000000 22597134460 7532000000 7532378153 3237032704 3237410857
+22599000000 22600134667 7533000000 7533378222 3238032704 3238410926
+22602000000 22603134848 7534000000 7534378282 3239032704 3239410986
+22605000000 22606134997 7535000000 7535378332 3240032704 3240411036
+22608000000 22609135054 7536000000 7536378351 3241032704 3241411055
+22611000000 22612135250 7537000000 7537378416 3242032704 3242411120
+22614000000 22615135440 7538000000 7538378480 3243032704 3243411184
+22617000000 22618135585 7539000000 7539378528 3244032704 3244411232
+22620000000 22621135757 7540000000 7540378585 3245032704 3245411289
+22623000000 22624135890 7541000000 7541378630 3246032704 3246411334
+22626000000 22627135961 7542000000 7542378653 3247032704 3247411357
+22629000000 22630136187 7543000000 7543378729 3248032704 3248411433
+22632000000 22633136347 7544000000 7544378782 3249032704 3249411486
+22635000000 22636136479 7545000000 7545378826 3250032704 3250411530
+22638000000 22639136587 7546000000 7546378862 3251032704 3251411566
+22641000000 22642136798 7547000000 7547378932 3252032704 3252411636
+22644000000 22645136964 7548000000 7548378988 3253032704 3253411692
+22647000000 22648137075 7549000000 7549379025 3254032704 3254411729
+22650000000 22651137235 7550000000 7550379078 3255032704 3255411782
+22653000000 22654137347 7551000000 7551379115 3256032704 3256411819
+22656000000 22657137545 7552000000 7552379181 3257032704 3257411885
+22659000000 22660137635 7553000000 7553379211 3258032704 3258411915
+22662000000 22663137860 7554000000 7554379286 3259032704 3259411990
+22665000000 22666137992 7555000000 7555379330 3260032704 3260412034
+22668000000 22669138131 7556000000 7556379377 3261032704 3261412081
+22671000000 22672138182 7557000000 7557379394 3262032704 3262412098
+22674000000 22675138393 7558000000 7558379464 3263032704 3263412168
+22677000000 22678138602 7559000000 7559379534 3264032704 3264412238
+22680000000 22681138730 7560000000 7560379576 3265032704 3265412280
+22683000000 22684138873 7561000000 7561379624 3266032704 3266412328
+22686000000 22687139044 7562000000 7562379681 3267032704 3267412385
+22689000000 22690139141 7563000000 7563379713 3268032704 3268412417
+22692000000 22693139354 7564000000 7564379784 3269032704 3269412488
+22695000000 22696139484 7565000000 7565379828 3270032704 3270412532
+22698000000 22699139634 7566000000 7566379878 3271032704 3271412582
+22701000000 22702139794 7567000000 7567379931 3272032704 3272412635
+22704000000 22705139890 7568000000 7568379963 3273032704 3273412667
+22707000000 22708140078 7569000000 7569380026 3274032704 3274412730
+22710000000 22711140246 7570000000 7570380082 3275032704 3275412786
+22713000000 22714140382 7571000000 7571380127 3276032704 3276412831
+22716000000 22717140557 7572000000 7572380185 3277032704 3277412889
+22719000000 22720140679 7573000000 7573380226 3278032704 3278412930
+22722000000 22723140829 7574000000 7574380276 3279032704 3279412980
+22725000000 22726140977 7575000000 7575380325 3280032704 3280413029
+22728000000 22729141183 7576000000 7576380394 3281032704 3281413098
+22731000000 22732141297 7577000000 7577380432 3282032704 3282413136
+22734000000 22735141429 7578000000 7578380476 3283032704 3283413180
+22737000000 22738141603 7579000000 7579380534 3284032704 3284413238
+22740000000 22741141722 7580000000 7580380574 3285032704 3285413278
+22743000000 22744141846 7581000000 7581380615 3286032704 3286413319
+22746000000 22747142065 7582000000 7582380688 3287032704 3287413392
+22749000000 22750142201 7583000000 7583380733 3288032704 3288413437
+22752000000 22753142352 7584000000 7584380784 3289032704 3289413488
+22755000000 22756142512 7585000000 7585380837 3290032704 3290413541
+22758000000 22759142633 7586000000 7586380877 3291032704 3291413581
+22761000000 22762142714 7587000000 7587380904 3292032704 3292413608
+22764000000 22765142922 7588000000 7588380974 3293032704 3293413678
+22767000000 22768143077 7589000000 7589381025 3294032704 3294413729
+22770000000 22771143236 7590000000 7590381078 3295032704 3295413782
+22773000000 22774143388 7591000000 7591381129 3296032704 3296413833
+22776000000 22777143510 7592000000 7592381170 3297032704 3297413874
+22779000000 22780143688 7593000000 7593381229 3298032704 3298413933
+22782000000 22783143837 7594000000 7594381279 3299032704 3299413983
+22785000000 22786143965 7595000000 7595381321 3300032704 3300414025
+22788000000 22789144134 7596000000 7596381378 3301032704 3301414082
+22791000000 22792144254 7597000000 7597381418 3302032704 3302414122
+22794000000 22795144181 7598000000 7598381393 3303032704 3303414097
+22797000000 22798144504 7599000000 7599381501 3304032704 3304414205
+22800000000 22801144757 7600000000 7600381585 3305032704 3305414289
+22803000000 22804144867 7601000000 7601381622 3306032704 3306414326
+22806000000 22807145046 7602000000 7602381682 3307032704 3307414386
+22809000000 22810145094 7603000000 7603381698 3308032704 3308414402
+22812000000 22813145348 7604000000 7604381782 3309032704 3309414486
+22815000000 22816145467 7605000000 7605381822 3310032704 3310414526
+22818000000 22819145638 7606000000 7606381879 3311032704 3311414583
+22821000000 22822145785 7607000000 7607381928 3312032704 3312414632
+22824000000 22825145938 7608000000 7608381979 3313032704 3313414683
+22827000000 22828146084 7609000000 7609382028 3314032704 3314414732
+22830000000 22831146228 7610000000 7610382076 3315032704 3315414780
+22833000000 22834146391 7611000000 7611382130 3316032704 3316414834
+22836000000 22837146543 7612000000 7612382181 3317032704 3317414885
+22839000000 22840146697 7613000000 7613382232 3318032704 3318414936
+22842000000 22843146817 7614000000 7614382272 3319032704 3319414976
+22845000000 22846147026 7615000000 7615382342 3320032704 3320415046
+22848000000 22849147156 7616000000 7616382385 3321032704 3321415089
+22851000000 22852147270 7617000000 7617382423 3322032704 3322415127
+22854000000 22855147431 7618000000 7618382477 3323032704 3323415181
+22857000000 22858147566 7619000000 7619382522 3324032704 3324415226
+22860000000 22861147709 7620000000 7620382569 3325032704 3325415273
+22863000000 22864147809 7621000000 7621382603 3326032704 3326415307
+22866000000 22867148043 7622000000 7622382681 3327032704 3327415385
+22869000000 22870148116 7623000000 7623382705 3328032704 3328415409
+22872000000 22873148237 7624000000 7624382745 3329032704 3329415449
+22875000000 22876148426 7625000000 7625382808 3330032704 3330415512
+22878000000 22879148580 7626000000 7626382860 3331032704 3331415564
+22881000000 22882148759 7627000000 7627382919 3332032704 3332415623
+22884000000 22885148905 7628000000 7628382968 3333032704 3333415672
+22887000000 22888149032 7629000000 7629383010 3334032704 3334415714
+22890000000 22891149206 7630000000 7630383068 3335032704 3335415772
+22893000000 22894149270 7631000000 7631383090 3336032704 3336415794
+22896000000 22897149477 7632000000 7632383159 3337032704 3337415863
+22899000000 22900149658 7633000000 7633383219 3338032704 3338415923
+22902000000 22903149807 7634000000 7634383269 3339032704 3339415973
+22905000000 22906149864 7635000000 7635383288 3340032704 3340415992
+22908000000 22909150060 7636000000 7636383353 3341032704 3341416057
+22911000000 22912150250 7637000000 7637383416 3342032704 3342416120
+22914000000 22915150395 7638000000 7638383465 3343032704 3343416169
+22917000000 22918150567 7639000000 7639383522 3344032704 3344416226
+22920000000 22921150700 7640000000 7640383566 3345032704 3345416270
+22923000000 22924150771 7641000000 7641383590 3346032704 3346416294
+22926000000 22927150997 7642000000 7642383665 3347032704 3347416369
+22929000000 22930151157 7643000000 7643383719 3348032704 3348416423
+22932000000 22933151289 7644000000 7644383763 3349032704 3349416467
+22935000000 22936151397 7645000000 7645383799 3350032704 3350416503
+22938000000 22939151608 7646000000 7646383869 3351032704 3351416573
+22941000000 22942151774 7647000000 7647383924 3352032704 3352416628
+22944000000 22945151885 7648000000 7648383961 3353032704 3353416665
+22947000000 22948152045 7649000000 7649384015 3354032704 3354416719
+22950000000 22951152157 7650000000 7650384052 3355032704 3355416756
+22953000000 22954152355 7651000000 7651384118 3356032704 3356416822
+22956000000 22957152445 7652000000 7652384148 3357032704 3357416852
+22959000000 22960152670 7653000000 7653384223 3358032704 3358416927
+22962000000 22963152802 7654000000 7654384267 3359032704 3359416971
+22965000000 22966152941 7655000000 7655384313 3360032704 3360417017
+22968000000 22969152992 7656000000 7656384330 3361032704 3361417034
+22971000000 22972153203 7657000000 7657384401 3362032704 3362417105
+22974000000 22975153412 7658000000 7658384470 3363032704 3363417174
+22977000000 22978153540 7659000000 7659384513 3364032704 3364417217
+22980000000 22981153683 7660000000 7660384561 3365032704 3365417265
+22983000000 22984153854 7661000000 7661384618 3366032704 3366417322
+22986000000 22987153951 7662000000 7662384650 3367032704 3367417354
+22989000000 22990154164 7663000000 7663384721 3368032704 3368417425
+22992000000 22993154294 7664000000 7664384764 3369032704 3369417468
+22995000000 22996154444 7665000000 7665384814 3370032704 3370417518
+22998000000 22999154604 7666000000 7666384868 3371032704 3371417572
+23001000000 23002154700 7667000000 7667384900 3372032704 3372417604
+23004000000 23005154888 7668000000 7668384962 3373032704 3373417666
+23007000000 23008155056 7669000000 7669385018 3374032704 3374417722
+23010000000 23011155192 7670000000 7670385064 3375032704 3375417768
+23013000000 23014155367 7671000000 7671385122 3376032704 3376417826
+23016000000 23017155489 7672000000 7672385163 3377032704 3377417867
+23019000000 23020155639 7673000000 7673385213 3378032704 3378417917
+23022000000 23023155787 7674000000 7674385262 3379032704 3379417966
+23025000000 23026155993 7675000000 7675385331 3380032704 3380418035
+23028000000 23029156107 7676000000 7676385369 3381032704 3381418073
+23031000000 23032156239 7677000000 7677385413 3382032704 3382418117
+23034000000 23035156413 7678000000 7678385471 3383032704 3383418175
+23037000000 23038156532 7679000000 7679385510 3384032704 3384418214
+23040000000 23041156656 7680000000 7680385552 3385032704 3385418256
+23043000000 23044156875 7681000000 7681385625 3386032704 3386418329
+23046000000 23047157011 7682000000 7682385670 3387032704 3387418374
+23049000000 23050157162 7683000000 7683385720 3388032704 3388418424
+23052000000 23053157322 7684000000 7684385774 3389032704 3389418478
+23055000000 23056157443 7685000000 7685385814 3390032704 3390418518
+23058000000 23059157524 7686000000 7686385841 3391032704 3391418545
+23061000000 23062157732 7687000000 7687385910 3392032704 3392418614
+23064000000 23065157887 7688000000 7688385962 3393032704 3393418666
+23067000000 23068158046 7689000000 7689386015 3394032704 3394418719
+23070000000 23071158198 7690000000 7690386066 3395032704 3395418770
+23073000000 23074158320 7691000000 7691386106 3396032704 3396418810
+23076000000 23077158498 7692000000 7692386166 3397032704 3397418870
+23079000000 23080158647 7693000000 7693386215 3398032704 3398418919
+23082000000 23083158775 7694000000 7694386258 3399032704 3399418962
+23085000000 23086158944 7695000000 7695386314 3400032704 3400419018
+23088000000 23089159064 7696000000 7696386354 3401032704 3401419058
+23091000000 23092158991 7697000000 7697386330 3402032704 3402419034
+23094000000 23095159314 7698000000 7698386438 3403032704 3403419142
+23097000000 23098159567 7699000000 7699386522 3404032704 3404419226
+23100000000 23101159677 7700000000 7700386559 3405032704 3405419263
+23103000000 23104159856 7701000000 7701386618 3406032704 3406419322
+23106000000 23107159904 7702000000 7702386634 3407032704 3407419338
+23109000000 23110160158 7703000000 7703386719 3408032704 3408419423
+23112000000 23113160277 7704000000 7704386759 3409032704 3409419463
+23115000000 23116160448 7705000000 7705386816 3410032704 3410419520
+23118000000 23119160595 7706000000 7706386865 3411032704 3411419569
+23121000000 23122160748 7707000000 7707386916 3412032704 3412419620
+23124000000 23125160894 7708000000 7708386964 3413032704 3413419668
+23127000000 23128161038 7709000000 7709387012 3414032704 3414419716
+23130000000 23131161201 7710000000 7710387067 3415032704 3415419771
+23133000000 23134161353 7711000000 7711387117 3416032704 3416419821
+23136000000 23137161507 7712000000 7712387169 3417032704 3417419873
+23139000000 23140161627 7713000000 7713387209 3418032704 3418419913
+23142000000 23143161836 7714000000 7714387278 3419032704 3419419982
+23145000000 23146161966 7715000000 7715387322 3420032704 3420420026
+23148000000 23149162080 7716000000 7716387360 3421032704 3421420064
+23151000000 23152162241 7717000000 7717387413 3422032704 3422420117
+23154000000 23155162376 7718000000 7718387458 3423032704 3423420162
+23157000000 23158162519 7719000000 7719387506 3424032704 3424420210
+23160000000 23161162619 7720000000 7720387539 3425032704 3425420243
+23163000000 23164162853 7721000000 7721387617 3426032704 3426420321
+23166000000 23167162926 7722000000 7722387642 3427032704 3427420346
+23169000000 23170163047 7723000000 7723387682 3428032704 3428420386
+23172000000 23173163236 7724000000 7724387745 3429032704 3429420449
+23175000000 23176163390 7725000000 7725387796 3430032704 3430420500
+23178000000 23179163569 7726000000 7726387856 3431032704 3431420560
+23181000000 23182163715 7727000000 7727387905 3432032704 3432420609
+23184000000 23185163842 7728000000 7728387947 3433032704 3433420651
+23187000000 23188164016 7729000000 7729388005 3434032704 3434420709
+23190000000 23191164080 7730000000 7730388026 3435032704 3435420730
+23193000000 23194164287 7731000000 7731388095 3436032704 3436420799
+23196000000 23197164468 7732000000 7732388156 3437032704 3437420860
+23199000000 23200164617 7733000000 7733388205 3438032704 3438420909
+23202000000 23203164674 7734000000 7734388224 3439032704 3439420928
+23205000000 23206164870 7735000000 7735388290 3440032704 3440420994
+23208000000 23209165060 7736000000 7736388353 3441032704 3441421057
+23211000000 23212165205 7737000000 7737388401 3442032704 3442421105
+23214000000 23215165377 7738000000 7738388459 3443032704 3443421163
+23217000000 23218165510 7739000000 7739388503 3444032704 3444421207
+23220000000 23221165581 7740000000 7740388527 3445032704 3445421231
+23223000000 23224165807 7741000000 7741388602 3446032704 3446421306
+23226000000 23227165967 7742000000 7742388655 3447032704 3447421359
+23229000000 23230166099 7743000000 7743388699 3448032704 3448421403
+23232000000 23233166207 7744000000 7744388735 3449032704 3449421439
+23235000000 23236166418 7745000000 7745388806 3450032704 3450421510
+23238000000 23239166584 7746000000 7746388861 3451032704 3451421565
+23241000000 23242166695 7747000000 7747388898 3452032704 3452421602
+23244000000 23245166855 7748000000 7748388951 3453032704 3453421655
+23247000000 23248166967 7749000000 7749388989 3454032704 3454421693
+23250000000 23251167165 7750000000 7750389055 3455032704 3455421759
+23253000000 23254167255 7751000000 7751389085 3456032704 3456421789
+23256000000 23257167480 7752000000 7752389160 3457032704 3457421864
+23259000000 23260167612 7753000000 7753389204 3458032704 3458421908
+23262000000 23263167751 7754000000 7754389250 3459032704 3459421954
+23265000000 23266167802 7755000000 7755389267 3460032704 3460421971
+23268000000 23269168013 7756000000 7756389337 3461032704 3461422041
+23271000000 23272168222 7757000000 7757389407 3462032704 3462422111
+23274000000 23275168350 7758000000 7758389450 3463032704 3463422154
+23277000000 23278168493 7759000000 7759389497 3464032704 3464422201
+23280000000 23281168664 7760000000 7760389554 3465032704 3465422258
+23283000000 23284168761 7761000000 7761389587 3466032704 3466422291
+23286000000 23287168974 7762000000 7762389658 3467032704 3467422362
+23289000000 23290169104 7763000000 7763389701 3468032704 3468422405
+23292000000 23293169254 7764000000 7764389751 3469032704 3469422455
+23295000000 23296169414 7765000000 7765389804 3470032704 3470422508
+23298000000 23299169510 7766000000 7766389836 3471032704 3471422540
+23301000000 23302169698 7767000000 7767389899 3472032704 3472422603
+23304000000 23305169866 7768000000 7768389955 3473032704 3473422659
+23307000000 23308170002 7769000000 7769390000 3474032704 3474422704
+23310000000 23311170177 7770000000 7770390059 3475032704 3475422763
+23313000000 23314170299 7771000000 7771390099 3476032704 3476422803
+23316000000 23317170449 7772000000 7772390149 3477032704 3477422853
+23319000000 23320170597 7773000000 7773390199 3478032704 3478422903
+23322000000 23323170803 7774000000 7774390267 3479032704 3479422971
+23325000000 23326170917 7775000000 7775390305 3480032704 3480423009
+23328000000 23329171049 7776000000 7776390349 3481032704 3481423053
+23331000000 23332171223 7777000000 7777390407 3482032704 3482423111
+23334000000 23335171342 7778000000 7778390447 3483032704 3483423151
+23337000000 23338171466 7779000000 7779390488 3484032704 3484423192
+23340000000 23341171685 7780000000 7780390561 3485032704 3485423265
+23343000000 23344171821 7781000000 7781390607 3486032704 3486423311
+23346000000 23347171972 7782000000 7782390657 3487032704 3487423361
+23349000000 23350172132 7783000000 7783390710 3488032704 3488423414
+23352000000 23353172253 7784000000 7784390751 3489032704 3489423455
+23355000000 23356172334 7785000000 7785390778 3490032704 3490423482
+23358000000 23359172542 7786000000 7786390847 3491032704 3491423551
+23361000000 23362172697 7787000000 7787390899 3492032704 3492423603
+23364000000 23365172856 7788000000 7788390952 3493032704 3493423656
+23367000000 23368173008 7789000000 7789391002 3494032704 3494423706
+23370000000 23371173130 7790000000 7790391043 3495032704 3495423747
+23373000000 23374173308 7791000000 7791391102 3496032704 3496423806
+23376000000 23377173457 7792000000 7792391152 3497032704 3497423856
+23379000000 23380173585 7793000000 7793391195 3498032704 3498423899
+23382000000 23383173754 7794000000 7794391251 3499032704 3499423955
+23385000000 23386173874 7795000000 7795391291 3500032704 3500423995
+23388000000 23389173801 7796000000 7796391267 3501032704 3501423971
+23391000000 23392174124 7797000000 7797391374 3502032704 3502424078
+23394000000 23395174377 7798000000 7798391459 3503032704 3503424163
+23397000000 23398174487 7799000000 7799391495 3504032704 3504424199
+23400000000 23401174666 7800000000 7800391555 3505032704 3505424259
+23403000000 23404174714 7801000000 7801391571 3506032704 3506424275
+23406000000 23407174968 7802000000 7802391656 3507032704 3507424360
+23409000000 23410175087 7803000000 7803391695 3508032704 3508424399
+23412000000 23413175258 7804000000 7804391752 3509032704 3509424456
+23415000000 23416175405 7805000000 7805391801 3510032704 3510424505
+23418000000 23419175558 7806000000 7806391852 3511032704 3511424556
+23421000000 23422175704 7807000000 7807391901 3512032704 3512424605
+23424000000 23425175848 7808000000 7808391949 3513032704 3513424653
+23427000000 23428176011 7809000000 7809392003 3514032704 3514424707
+23430000000 23431176163 7810000000 7810392054 3515032704 3515424758
+23433000000 23434176317 7811000000 7811392105 3516032704 3516424809
+23436000000 23437176437 7812000000 7812392145 3517032704 3517424849
+23439000000 23440176646 7813000000 7813392215 3518032704 3518424919
+23442000000 23443176776 7814000000 7814392258 3519032704 3519424962
+23445000000 23446176890 7815000000 7815392296 3520032704 3520425000
+23448000000 23449177051 7816000000 7816392350 3521032704 3521425054
+23451000000 23452177186 7817000000 7817392395 3522032704 3522425099
+23454000000 23455177329 7818000000 7818392443 3523032704 3523425147
+23457000000 23458177429 7819000000 7819392476 3524032704 3524425180
+23460000000 23461177663 7820000000 7820392554 3525032704 3525425258
+23463000000 23464177736 7821000000 7821392578 3526032704 3526425282
+23466000000 23467177857 7822000000 7822392619 3527032704 3527425323
+23469000000 23470178046 7823000000 7823392682 3528032704 3528425386
+23472000000 23473178200 7824000000 7824392733 3529032704 3529425437
+23475000000 23476178379 7825000000 7825392793 3530032704 3530425497
+23478000000 23479178525 7826000000 7826392841 3531032704 3531425545
+23481000000 23482178652 7827000000 7827392884 3532032704 3532425588
+23484000000 23485178826 7828000000 7828392942 3533032704 3533425646
+23487000000 23488178890 7829000000 7829392963 3534032704 3534425667
+23490000000 23491179097 7830000000 7830393032 3535032704 3535425736
+23493000000 23494179278 7831000000 7831393092 3536032704 3536425796
+23496000000 23497179427 7832000000 7832393142 3537032704 3537425846
+23499000000 23500179484 7833000000 7833393161 3538032704 3538425865
+23502000000 23503179680 7834000000 7834393226 3539032704 3539425930
+23505000000 23506179870 7835000000 7835393290 3540032704 3540425994
+23508000000 23509180015 7836000000 7836393338 3541032704 3541426042
+23511000000 23512180187 7837000000 7837393395 3542032704 3542426099
+23514000000 23515180320 7838000000 7838393440 3543032704 3543426144
+23517000000 23518180391 7839000000 7839393463 3544032704 3544426167
+23520000000 23521180617 7840000000 7840393539 3545032704 3545426243
+23523000000 23524180777 7841000000 7841393592 3546032704 3546426296
+23526000000 23527180909 7842000000 7842393636 3547032704 3547426340
+23529000000 23530181017 7843000000 7843393672 3548032704 3548426376
+23532000000 23533181228 7844000000 7844393742 3549032704 3549426446
+23535000000 23536181394 7845000000 7845393798 3550032704 3550426502
+23538000000 23539181505 7846000000 7846393835 3551032704 3551426539
+23541000000 23542181665 7847000000 7847393888 3552032704 3552426592
+23544000000 23545181777 7848000000 7848393925 3553032704 3553426629
+23547000000 23548181975 7849000000 7849393991 3554032704 3554426695
+23550000000 23551182065 7850000000 7850394021 3555032704 3555426725
+23553000000 23554182290 7851000000 7851394096 3556032704 3556426800
+23556000000 23557182422 7852000000 7852394140 3557032704 3557426844
+23559000000 23560182561 7853000000 7853394187 3558032704 3558426891
+23562000000 23563182612 7854000000 7854394204 3559032704 3559426908
+23565000000 23566182823 7855000000 7855394274 3560032704 3560426978
+23568000000 23569183032 7856000000 7856394344 3561032704 3561427048
+23571000000 23572183160 7857000000 7857394386 3562032704 3562427090
+23574000000 23575183303 7858000000 7858394434 3563032704 3563427138
+23577000000 23578183474 7859000000 7859394491 3564032704 3564427195
+23580000000 23581183571 7860000000 7860394523 3565032704 3565427227
+23583000000 23584183784 7861000000 7861394594 3566032704 3566427298
+23586000000 23587183914 7862000000 7862394638 3567032704 3567427342
+23589000000 23590184064 7863000000 7863394688 3568032704 3568427392
+23592000000 23593184224 7864000000 7864394741 3569032704 3569427445
+23595000000 23596184320 7865000000 7865394773 3570032704 3570427477
+23598000000 23599184508 7866000000 7866394836 3571032704 3571427540
+23601000000 23602184676 7867000000 7867394892 3572032704 3572427596
+23604000000 23605184812 7868000000 7868394937 3573032704 3573427641
+23607000000 23608184987 7869000000 7869394995 3574032704 3574427699
+23610000000 23611185109 7870000000 7870395036 3575032704 3575427740
+23613000000 23614185259 7871000000 7871395086 3576032704 3576427790
+23616000000 23617185407 7872000000 7872395135 3577032704 3577427839
+23619000000 23620185613 7873000000 7873395204 3578032704 3578427908
+23622000000 23623185727 7874000000 7874395242 3579032704 3579427946
+23625000000 23626185859 7875000000 7875395286 3580032704 3580427990
+23628000000 23629186033 7876000000 7876395344 3581032704 3581428048
+23631000000 23632186152 7877000000 7877395384 3582032704 3582428088
+23634000000 23635186276 7878000000 7878395425 3583032704 3583428129
+23637000000 23638186495 7879000000 7879395498 3584032704 3584428202
+23640000000 23641186631 7880000000 7880395543 3585032704 3585428247
+23643000000 23644186782 7881000000 7881395594 3586032704 3586428298
+23646000000 23647186942 7882000000 7882395647 3587032704 3587428351
+23649000000 23650187063 7883000000 7883395687 3588032704 3588428391
+23652000000 23653187144 7884000000 7884395714 3589032704 3589428418
+23655000000 23656187352 7885000000 7885395784 3590032704 3590428488
+23658000000 23659187507 7886000000 7886395835 3591032704 3591428539
+23661000000 23662187666 7887000000 7887395888 3592032704 3592428592
+23664000000 23665187818 7888000000 7888395939 3593032704 3593428643
+23667000000 23668187940 7889000000 7889395980 3594032704 3594428684
+23670000000 23671188118 7890000000 7890396039 3595032704 3595428743
+23673000000 23674188267 7891000000 7891396089 3596032704 3596428793
+23676000000 23677188395 7892000000 7892396131 3597032704 3597428835
+23679000000 23680188564 7893000000 7893396188 3598032704 3598428892
+23682000000 23683188684 7894000000 7894396228 3599032704 3599428932
+23685000000 23686188611 7895000000 7895396203 3600032704 3600428907
+23688000000 23689188934 7896000000 7896396311 3601032704 3601429015
+23691000000 23692189187 7897000000 7897396395 3602032704 3602429099
+23694000000 23695189297 7898000000 7898396432 3603032704 3603429136
+23697000000 23698189476 7899000000 7899396492 3604032704 3604429196
+23700000000 23701189524 7900000000 7900396508 3605032704 3605429212
+23703000000 23704189778 7901000000 7901396592 3606032704 3606429296
+23706000000 23707189897 7902000000 7902396632 3607032704 3607429336
+23709000000 23710190068 7903000000 7903396689 3608032704 3608429393
+23712000000 23713190215 7904000000 7904396738 3609032704 3609429442
+23715000000 23716190368 7905000000 7905396789 3610032704 3610429493
+23718000000 23719190514 7906000000 7906396838 3611032704 3611429542
+23721000000 23722190658 7907000000 7907396886 3612032704 3612429590
+23724000000 23725190821 7908000000 7908396940 3613032704 3613429644
+23727000000 23728190973 7909000000 7909396991 3614032704 3614429695
+23730000000 23731191127 7910000000 7910397042 3615032704 3615429746
+23733000000 23734191247 7911000000 7911397082 3616032704 3616429786
+23736000000 23737191456 7912000000 7912397152 3617032704 3617429856
+23739000000 23740191586 7913000000 7913397195 3618032704 3618429899
+23742000000 23743191700 7914000000 7914397233 3619032704 3619429937
+23745000000 23746191861 7915000000 7915397287 3620032704 3620429991
+23748000000 23749191996 7916000000 7916397332 3621032704 3621430036
+23751000000 23752192139 7917000000 7917397379 3622032704 3622430083
+23754000000 23755192239 7918000000 7918397413 3623032704 3623430117
+23757000000 23758192473 7919000000 7919397491 3624032704 3624430195
+23760000000 23761192546 7920000000 7920397515 3625032704 3625430219
+23763000000 23764192667 7921000000 7921397555 3626032704 3626430259
+23766000000 23767192856 7922000000 7922397618 3627032704 3627430322
+23769000000 23770193010 7923000000 7923397670 3628032704 3628430374
+23772000000 23773193189 7924000000 7924397729 3629032704 3629430433
+23775000000 23776193335 7925000000 7925397778 3630032704 3630430482
+23778000000 23779193462 7926000000 7926397820 3631032704 3631430524
+23781000000 23782193636 7927000000 7927397878 3632032704 3632430582
+23784000000 23785193700 7928000000 7928397900 3633032704 3633430604
+23787000000 23788193907 7929000000 7929397969 3634032704 3634430673
+23790000000 23791194088 7930000000 7930398029 3635032704 3635430733
+23793000000 23794194237 7931000000 7931398079 3636032704 3636430783
+23796000000 23797194294 7932000000 7932398098 3637032704 3637430802
+23799000000 23800194490 7933000000 7933398163 3638032704 3638430867
+23802000000 23803194680 7934000000 7934398226 3639032704 3639430930
+23805000000 23806194825 7935000000 7935398275 3640032704 3640430979
+23808000000 23809194997 7936000000 7936398332 3641032704 3641431036
+23811000000 23812195130 7937000000 7937398376 3642032704 3642431080
+23814000000 23815195201 7938000000 7938398400 3643032704 3643431104
+23817000000 23818195427 7939000000 7939398475 3644032704 3644431179
+23820000000 23821195587 7940000000 7940398529 3645032704 3645431233
+23823000000 23824195719 7941000000 7941398573 3646032704 3646431277
+23826000000 23827195827 7942000000 7942398609 3647032704 3647431313
+23829000000 23830196038 7943000000 7943398679 3648032704 3648431383
+23832000000 23833196204 7944000000 7944398734 3649032704 3649431438
+23835000000 23836196315 7945000000 7945398771 3650032704 3650431475
+23838000000 23839196475 7946000000 7946398825 3651032704 3651431529
+23841000000 23842196587 7947000000 7947398862 3652032704 3652431566
+23844000000 23845196785 7948000000 7948398928 3653032704 3653431632
+23847000000 23848196875 7949000000 7949398958 3654032704 3654431662
+23850000000 23851197100 7950000000 7950399033 3655032704 3655431737
+23853000000 23854197232 7951000000 7951399077 3656032704 3656431781
+23856000000 23857197371 7952000000 7952399123 3657032704 3657431827
+23859000000 23860197422 7953000000 7953399140 3658032704 3658431844
+23862000000 23863197633 7954000000 7954399211 3659032704 3659431915
+23865000000 23866197842 7955000000 7955399280 3660032704 3660431984
+23868000000 23869197970 7956000000 7956399323 3661032704 3661432027
+23871000000 23872198113 7957000000 7957399371 3662032704 3662432075
+23874000000 23875198284 7958000000 7958399428 3663032704 3663432132
+23877000000 23878198381 7959000000 7959399460 3664032704 3664432164
+23880000000 23881198594 7960000000 7960399531 3665032704 3665432235
+23883000000 23884198724 7961000000 7961399574 3666032704 3666432278
+23886000000 23887198874 7962000000 7962399624 3667032704 3667432328
+23889000000 23890199034 7963000000 7963399678 3668032704 3668432382
+23892000000 23893199130 7964000000 7964399710 3669032704 3669432414
+23895000000 23896199318 7965000000 7965399772 3670032704 3670432476
+23898000000 23899199486 7966000000 7966399828 3671032704 3671432532
+23901000000 23902199622 7967000000 7967399874 3672032704 3672432578
+23904000000 23905199797 7968000000 7968399932 3673032704 3673432636
+23907000000 23908199919 7969000000 7969399973 3674032704 3674432677
+23910000000 23911200069 7970000000 7970400023 3675032704 3675432727
+23913000000 23914200217 7971000000 7971400072 3676032704 3676432776
+23916000000 23917200423 7972000000 7972400141 3677032704 3677432845
+23919000000 23920200537 7973000000 7973400179 3678032704 3678432883
+23922000000 23923200669 7974000000 7974400223 3679032704 3679432927
+23925000000 23926200843 7975000000 7975400281 3680032704 3680432985
+23928000000 23929200962 7976000000 7976400320 3681032704 3681433024
+23931000000 23932201086 7977000000 7977400362 3682032704 3682433066
+23934000000 23935201305 7978000000 7978400435 3683032704 3683433139
+23937000000 23938201441 7979000000 7979400480 3684032704 3684433184
+23940000000 23941201592 7980000000 7980400530 3685032704 3685433234
+23943000000 23944201752 7981000000 7981400584 3686032704 3686433288
+23946000000 23947201873 7982000000 7982400624 3687032704 3687433328
+23949000000 23950201954 7983000000 7983400651 3688032704 3688433355
+23952000000 23953202162 7984000000 7984400720 3689032704 3689433424
+23955000000 23956202317 7985000000 7985400772 3690032704 3690433476
+23958000000 23959202476 7986000000 7986400825 3691032704 3691433529
+23961000000 23962202628 7987000000 7987400876 3692032704 3692433580
+23964000000 23965202750 7988000000 7988400916 3693032704 3693433620
+23967000000 23968202928 7989000000 7989400976 3694032704 3694433680
+23970000000 23971203077 7990000000 7990401025 3695032704 3695433729
+23973000000 23974203205 7991000000 7991401068 3696032704 3696433772
+23976000000 23977203374 7992000000 7992401124 3697032704 3697433828
+23979000000 23980203494 7993000000 7993401164 3698032704 3698433868
+23982000000 23983203421 7994000000 7994401140 3699032704 3699433844
+23985000000 23986203744 7995000000 7995401248 3700032704 3700433952
+23988000000 23989203997 7996000000 7996401332 3701032704 3701434036
+23991000000 23992204107 7997000000 7997401369 3702032704 3702434073
+23994000000 23995204286 7998000000 7998401428 3703032704 3703434132
+23997000000 23998204334 7999000000 7999401444 3704032704 3704434148
+24000000000 24001204588 8000000000 8000401529 3705032704 3705434233
+24003000000 24004204707 8001000000 8001401569 3706032704 3706434273
+24006000000 24007204878 8002000000 8002401626 3707032704 3707434330
+24009000000 24010205025 8003000000 8003401675 3708032704 3708434379
+24012000000 24013205178 8004000000 8004401726 3709032704 3709434430
+24015000000 24016205324 8005000000 8005401774 3710032704 3710434478
+24018000000 24019205468 8006000000 8006401822 3711032704 3711434526
+24021000000 24022205631 8007000000 8007401877 3712032704 3712434581
+24024000000 24025205783 8008000000 8008401927 3713032704 3713434631
+24027000000 24028205937 8009000000 8009401979 3714032704 3714434683
+24030000000 24031206057 8010000000 8010402019 3715032704 3715434723
+24033000000 24034206266 8011000000 8011402088 3716032704 3716434792
+24036000000 24037206396 8012000000 8012402132 3717032704 3717434836
+24039000000 24040206510 8013000000 8013402170 3718032704 3718434874
+24042000000 24043206671 8014000000 8014402223 3719032704 3719434927
+24045000000 24046206806 8015000000 8015402268 3720032704 3720434972
+24048000000 24049206949 8016000000 8016402316 3721032704 3721435020
+24051000000 24052207049 8017000000 8017402349 3722032704 3722435053
+24054000000 24055207283 8018000000 8018402427 3723032704 3723435131
+24057000000 24058207356 8019000000 8019402452 3724032704 3724435156
+24060000000 24061207477 8020000000 8020402492 3725032704 3725435196
+24063000000 24064207666 8021000000 8021402555 3726032704 3726435259
+24066000000 24067207820 8022000000 8022402606 3727032704 3727435310
+24069000000 24070207999 8023000000 8023402666 3728032704 3728435370
+24072000000 24073208145 8024000000 8024402715 3729032704 3729435419
+24075000000 24076208272 8025000000 8025402757 3730032704 3730435461
+24078000000 24079208446 8026000000 8026402815 3731032704 3731435519
+24081000000 24082208510 8027000000 8027402836 3732032704 3732435540
+24084000000 24085208717 8028000000 8028402905 3733032704 3733435609
+24087000000 24088208898 8029000000 8029402966 3734032704 3734435670
+24090000000 24091209047 8030000000 8030403015 3735032704 3735435719
+24093000000 24094209104 8031000000 8031403034 3736032704 3736435738
+24096000000 24097209300 8032000000 8032403100 3737032704 3737435804
+24099000000 24100209490 8033000000 8033403163 3738032704 3738435867
+24102000000 24103209635 8034000000 8034403211 3739032704 3739435915
+24105000000 24106209807 8035000000 8035403269 3740032704 3740435973
+24108000000 24109209940 8036000000 8036403313 3741032704 3741436017
+24111000000 24112210011 8037000000 8037403337 3742032704 3742436041
+24114000000 24115210237 8038000000 8038403412 3743032704 3743436116
+24117000000 24118210397 8039000000 8039403465 3744032704 3744436169
+24120000000 24121210529 8040000000 8040403509 3745032704 3745436213
+24123000000 24124210637 8041000000 8041403545 3746032704 3746436249
+24126000000 24127210848 8042000000 8042403616 3747032704 3747436320
+24129000000 24130211014 8043000000 8043403671 3748032704 3748436375
+24132000000 24133211125 8044000000 8044403708 3749032704 3749436412
+24135000000 24136211285 8045000000 8045403761 3750032704 3750436465
+24138000000 24139211397 8046000000 8046403799 3751032704 3751436503
+24141000000 24142211595 8047000000 8047403865 3752032704 3752436569
+24144000000 24145211685 8048000000 8048403895 3753032704 3753436599
+24147000000 24148211910 8049000000 8049403970 3754032704 3754436674
+24150000000 24151212042 8050000000 8050404014 3755032704 3755436718
+24153000000 24154212181 8051000000 8051404060 3756032704 3756436764
+24156000000 24157212232 8052000000 8052404077 3757032704 3757436781
+24159000000 24160212443 8053000000 8053404147 3758032704 3758436851
+24162000000 24163212652 8054000000 8054404217 3759032704 3759436921
+24165000000 24166212780 8055000000 8055404260 3760032704 3760436964
+24168000000 24169212923 8056000000 8056404307 3761032704 3761437011
+24171000000 24172213094 8057000000 8057404364 3762032704 3762437068
+24174000000 24175213191 8058000000 8058404397 3763032704 3763437101
+24177000000 24178213404 8059000000 8059404468 3764032704 3764437172
+24180000000 24181213534 8060000000 8060404511 3765032704 3765437215
+24183000000 24184213684 8061000000 8061404561 3766032704 3766437265
+24186000000 24187213844 8062000000 8062404614 3767032704 3767437318
+24189000000 24190213940 8063000000 8063404646 3768032704 3768437350
+24192000000 24193214128 8064000000 8064404709 3769032704 3769437413
+24195000000 24196214296 8065000000 8065404765 3770032704 3770437469
+24198000000 24199214432 8066000000 8066404810 3771032704 3771437514
+24201000000 24202214607 8067000000 8067404869 3772032704 3772437573
+24204000000 24205214729 8068000000 8068404909 3773032704 3773437613
+24207000000 24208214879 8069000000 8069404959 3774032704 3774437663
+24210000000 24211215027 8070000000 8070405009 3775032704 3775437713
+24213000000 24214215233 8071000000 8071405077 3776032704 3776437781
+24216000000 24217215347 8072000000 8072405115 3777032704 3777437819
+24219000000 24220215479 8073000000 8073405159 3778032704 3778437863
+24222000000 24223215653 8074000000 8074405217 3779032704 3779437921
+24225000000 24226215772 8075000000 8075405257 3780032704 3780437961
+24228000000 24229215896 8076000000 8076405298 3781032704 3781438002
+24231000000 24232216115 8077000000 8077405371 3782032704 3782438075
+24234000000 24235216251 8078000000 8078405417 3783032704 3783438121
+24237000000 24238216402 8079000000 8079405467 3784032704 3784438171
+24240000000 24241216562 8080000000 8080405520 3785032704 3785438224
+24243000000 24244216683 8081000000 8081405561 3786032704 3786438265
+24246000000 24247216764 8082000000 8082405588 3787032704 3787438292
+24249000000 24250216972 8083000000 8083405657 3788032704 3788438361
+24252000000 24253217127 8084000000 8084405709 3789032704 3789438413
+24255000000 24256217286 8085000000 8085405762 3790032704 3790438466
+24258000000 24259217438 8086000000 8086405812 3791032704 3791438516
+24261000000 24262217560 8087000000 8087405853 3792032704 3792438557
+24264000000 24265217738 8088000000 8088405912 3793032704 3793438616
+24267000000 24268217887 8089000000 8089405962 3794032704 3794438666
+24270000000 24271218015 8090000000 8090406005 3795032704 3795438709
+24273000000 24274218184 8091000000 8091406061 3796032704 3796438765
+24276000000 24277218304 8092000000 8092406101 3797032704 3797438805
+24279000000 24280218231 8093000000 8093406077 3798032704 3798438781
+24282000000 24283218554 8094000000 8094406184 3799032704 3799438888
+24285000000 24286218807 8095000000 8095406269 3800032704 3800438973
+24288000000 24289218917 8096000000 8096406305 3801032704 3801439009
+24291000000 24292219096 8097000000 8097406365 3802032704 3802439069
+24294000000 24295219144 8098000000 8098406381 3803032704 3803439085
+24297000000 24298219398 8099000000 8099406466 3804032704 3804439170
+24300000000 24301219517 8100000000 8100406505 3805032704 3805439209
+24303000000 24304219688 8101000000 8101406562 3806032704 3806439266
+24306000000 24307219835 8102000000 8102406611 3807032704 3807439315
+24309000000 24310219988 8103000000 8103406662 3808032704 3808439366
+24312000000 24313220134 8104000000 8104406711 3809032704 3809439415
+24315000000 24316220278 8105000000 8105406759 3810032704 3810439463
+24318000000 24319220441 8106000000 8106406813 3811032704 3811439517
+24321000000 24322220593 8107000000 8107406864 3812032704 3812439568
+24324000000 24325220747 8108000000 8108406915 3813032704 3813439619
+24327000000 24328220867 8109000000 8109406955 3814032704 3814439659
+24330000000 24331221076 8110000000 8110407025 3815032704 3815439729
+24333000000 24334221206 8111000000 8111407068 3816032704 3816439772
+24336000000 24337221320 8112000000 8112407106 3817032704 3817439810
+24339000000 24340221481 8113000000 8113407160 3818032704 3818439864
+24342000000 24343221616 8114000000 8114407205 3819032704 3819439909
+24345000000 24346221759 8115000000 8115407253 3820032704 3820439957
+24348000000 24349221859 8116000000 8116407286 3821032704 3821439990
+24351000000 24352222093 8117000000 8117407364 3822032704 3822440068
+24354000000 24355222166 8118000000 8118407388 3823032704 3823440092
+24357000000 24358222287 8119000000 8119407429 3824032704 3824440133
+24360000000 24361222476 8120000000 8120407492 3825032704 3825440196
+24363000000 24364222630 8121000000 8121407543 3826032704 3826440247
+24366000000 24367222809 8122000000 8122407603 3827032704 3827440307
+24369000000 24370222955 8123000000 8123407651 3828032704 3828440355
+24372000000 24373223082 8124000000 8124407694 3829032704 3829440398
+24375000000 24376223256 8125000000 8125407752 3830032704 3830440456
+24378000000 24379223320 8126000000 8126407773 3831032704 3831440477
+24381000000 24382223527 8127000000 8127407842 3832032704 3832440546
+24384000000 24385223708 8128000000 8128407902 3833032704 3833440606
+24387000000 24388223857 8129000000 8129407952 3834032704 3834440656
+24390000000 24391223914 8130000000 8130407971 3835032704 3835440675
+24393000000 24394224110 8131000000 8131408036 3836032704 3836440740
+24396000000 24397224300 8132000000 8132408100 3837032704 3837440804
+24399000000 24400224445 8133000000 8133408148 3838032704 3838440852
+24402000000 24403224617 8134000000 8134408205 3839032704 3839440909
+24405000000 24406224750 8135000000 8135408250 3840032704 3840440954
+24408000000 24409224821 8136000000 8136408273 3841032704 3841440977
+24411000000 24412225047 8137000000 8137408349 3842032704 3842441053
+24414000000 24415225207 8138000000 8138408402 3843032704 3843441106
+24417000000 24418225339 8139000000 8139408446 3844032704 3844441150
+24420000000 24421225447 8140000000 8140408482 3845032704 3845441186
+24423000000 24424225658 8141000000 8141408552 3846032704 3846441256
+24426000000 24427225824 8142000000 8142408608 3847032704 3847441312
+24429000000 24430225935 8143000000 8143408645 3848032704 3848441349
+24432000000 24433226095 8144000000 8144408698 3849032704 3849441402
+24435000000 24436226207 8145000000 8145408735 3850032704 3850441439
+24438000000 24439226405 8146000000 8146408801 3851032704 3851441505
+24441000000 24442226495 8147000000 8147408831 3852032704 3852441535
+24444000000 24445226720 8148000000 8148408906 3853032704 3853441610
+24447000000 24448226852 8149000000 8149408950 3854032704 3854441654
+24450000000 24451226991 8150000000 8150408997 3855032704 3855441701
+24453000000 24454227042 8151000000 8151409014 3856032704 3856441718
+24456000000 24457227253 8152000000 8152409084 3857032704 3857441788
+24459000000 24460227462 8153000000 8153409154 3858032704 3858441858
+24462000000 24463227590 8154000000 8154409196 3859032704 3859441900
+24465000000 24466227733 8155000000 8155409244 3860032704 3860441948
+24468000000 24469227904 8156000000 8156409301 3861032704 3861442005
+24471000000 24472228001 8157000000 8157409333 3862032704 3862442037
+24474000000 24475228214 8158000000 8158409404 3863032704 3863442108
+24477000000 24478228344 8159000000 8159409448 3864032704 3864442152
+24480000000 24481228494 8160000000 8160409498 3865032704 3865442202
+24483000000 24484228654 8161000000 8161409551 3866032704 3866442255
+24486000000 24487228750 8162000000 8162409583 3867032704 3867442287
+24489000000 24490228938 8163000000 8163409646 3868032704 3868442350
+24492000000 24493229106 8164000000 8164409702 3869032704 3869442406
+24495000000 24496229242 8165000000 8165409747 3870032704 3870442451
+24498000000 24499229417 8166000000 8166409805 3871032704 3871442509
+24501000000 24502229539 8167000000 8167409846 3872032704 3872442550
+24504000000 24505229689 8168000000 8168409896 3873032704 3873442600
+24507000000 24508229837 8169000000 8169409945 3874032704 3874442649
+24510000000 24511230043 8170000000 8170410014 3875032704 3875442718
+24513000000 24514230157 8171000000 8171410052 3876032704 3876442756
+24516000000 24517230289 8172000000 8172410096 3877032704 3877442800
+24519000000 24520230463 8173000000 8173410154 3878032704 3878442858
+24522000000 24523230582 8174000000 8174410194 3879032704 3879442898
+24525000000 24526230706 8175000000 8175410235 3880032704 3880442939
+24528000000 24529230925 8176000000 8176410308 3881032704 3881443012
+24531000000 24532231061 8177000000 8177410353 3882032704 3882443057
+24534000000 24535231212 8178000000 8178410404 3883032704 3883443108
+24537000000 24538231372 8179000000 8179410457 3884032704 3884443161
+24540000000 24541231493 8180000000 8180410497 3885032704 3885443201
+24543000000 24544231574 8181000000 8181410524 3886032704 3886443228
+24546000000 24547231782 8182000000 8182410594 3887032704 3887443298
+24549000000 24550231937 8183000000 8183410645 3888032704 3888443349
+24552000000 24553232096 8184000000 8184410698 3889032704 3889443402
+24555000000 24556232248 8185000000 8185410749 3890032704 3890443453
+24558000000 24559232370 8186000000 8186410790 3891032704 3891443494
+24561000000 24562232548 8187000000 8187410849 3892032704 3892443553
+24564000000 24565232697 8188000000 8188410899 3893032704 3893443603
+24567000000 24568232825 8189000000 8189410941 3894032704 3894443645
+24570000000 24571232994 8190000000 8190410998 3895032704 3895443702
+24573000000 24574233114 8191000000 8191411038 3896032704 3896443742
+24576000000 24577233041 8192000000 8192411013 3897032704 3897443717
+24579000000 24580233364 8193000000 8193411121 3898032704 3898443825
+24582000000 24583233617 8194000000 8194411205 3899032704 3899443909
+24585000000 24586233727 8195000000 8195411242 3900032704 3900443946
+24588000000 24589233906 8196000000 8196411302 3901032704 3901444006
+24591000000 24592233954 8197000000 8197411318 3902032704 3902444022
+24594000000 24595234208 8198000000 8198411402 3903032704 3903444106
+24597000000 24598234327 8199000000 8199411442 3904032704 3904444146
+24600000000 24601234498 8200000000 8200411499 3905032704 3905444203
+24603000000 24604234645 8201000000 8201411548 3906032704 3906444252
+24606000000 24607234798 8202000000 8202411599 3907032704 3907444303
+24609000000 24610234944 8203000000 8203411648 3908032704 3908444352
+24612000000 24613235088 8204000000 8204411696 3909032704 3909444400
+24615000000 24616235251 8205000000 8205411750 3910032704 3910444454
+24618000000 24619235403 8206000000 8206411801 3911032704 3911444505
+24621000000 24622235557 8207000000 8207411852 3912032704 3912444556
+24624000000 24625235677 8208000000 8208411892 3913032704 3913444596
+24627000000 24628235886 8209000000 8209411962 3914032704 3914444666
+24630000000 24631236016 8210000000 8210412005 3915032704 3915444709
+24633000000 24634236130 8211000000 8211412043 3916032704 3916444747
+24636000000 24637236291 8212000000 8212412097 3917032704 3917444801
+24639000000 24640236426 8213000000 8213412142 3918032704 3918444846
+24642000000 24643236569 8214000000 8214412189 3919032704 3919444893
+24645000000 24646236669 8215000000 8215412223 3920032704 3920444927
+24648000000 24649236903 8216000000 8216412301 3921032704 3921445005
+24651000000 24652236976 8217000000 8217412325 3922032704 3922445029
+24654000000 24655237097 8218000000 8218412365 3923032704 3923445069
+24657000000 24658237286 8219000000 8219412428 3924032704 3924445132
+24660000000 24661237440 8220000000 8220412480 3925032704 3925445184
+24663000000 24664237619 8221000000 8221412539 3926032704 3926445243
+24666000000 24667237765 8222000000 8222412588 3927032704 3927445292
+24669000000 24670237892 8223000000 8223412630 3928032704 3928445334
+24672000000 24673238066 8224000000 8224412688 3929032704 3929445392
+24675000000 24676238130 8225000000 8225412710 3930032704 3930445414
+24678000000 24679238337 8226000000 8226412779 3931032704 3931445483
+24681000000 24682238518 8227000000 8227412839 3932032704 3932445543
+24684000000 24685238667 8228000000 8228412889 3933032704 3933445593
+24687000000 24688238724 8229000000 8229412908 3934032704 3934445612
+24690000000 24691238920 8230000000 8230412973 3935032704 3935445677
+24693000000 24694239110 8231000000 8231413036 3936032704 3936445740
+24696000000 24697239255 8232000000 8232413085 3937032704 3937445789
+24699000000 24700239427 8233000000 8233413142 3938032704 3938445846
+24702000000 24703239560 8234000000 8234413186 3939032704 3939445890
+24705000000 24706239631 8235000000 8235413210 3940032704 3940445914
+24708000000 24709239857 8236000000 8236413285 3941032704 3941445989
+24711000000 24712240017 8237000000 8237413339 3942032704 3942446043
+24714000000 24715240149 8238000000 8238413383 3943032704 3943446087
+24717000000 24718240257 8239000000 8239413419 3944032704 3944446123
+24720000000 24721240468 8240000000 8240413489 3945032704 3945446193
+24723000000 24724240634 8241000000 8241413544 3946032704 3946446248
+24726000000 24727240745 8242000000 8242413581 3947032704 3947446285
+24729000000 24730240905 8243000000 8243413635 3948032704 3948446339
+24732000000 24733241017 8244000000 8244413672 3949032704 3949446376
+24735000000 24736241215 8245000000 8245413738 3950032704 3950446442
+24738000000 24739241305 8246000000 8246413768 3951032704 3951446472
+24741000000 24742241530 8247000000 8247413843 3952032704 3952446547
+24744000000 24745241662 8248000000 8248413887 3953032704 3953446591
+24747000000 24748241801 8249000000 8249413933 3954032704 3954446637
+24750000000 24751241852 8250000000 8250413950 3955032704 3955446654
+24753000000 24754242063 8251000000 8251414021 3956032704 3956446725
+24756000000 24757242272 8252000000 8252414090 3957032704 3957446794
+24759000000 24760242400 8253000000 8253414133 3958032704 3958446837
+24762000000 24763242543 8254000000 8254414181 3959032704 3959446885
+24765000000 24766242714 8255000000 8255414238 3960032704 3960446942
+24768000000 24769242811 8256000000 8256414270 3961032704 3961446974
+24771000000 24772243024 8257000000 8257414341 3962032704 3962447045
+24774000000 24775243154 8258000000 8258414384 3963032704 3963447088
+24777000000 24778243304 8259000000 8259414434 3964032704 3964447138
+24780000000 24781243464 8260000000 8260414488 3965032704 3965447192
+24783000000 24784243560 8261000000 8261414520 3966032704 3966447224
+24786000000 24787243748 8262000000 8262414582 3967032704 3967447286
+24789000000 24790243916 8263000000 8263414638 3968032704 3968447342
+24792000000 24793244052 8264000000 8264414684 3969032704 3969447388
+24795000000 24796244227 8265000000 8265414742 3970032704 3970447446
+24798000000 24799244349 8266000000 8266414783 3971032704 3971447487
+24801000000 24802244499 8267000000 8267414833 3972032704 3972447537
+24804000000 24805244647 8268000000 8268414882 3973032704 3973447586
+24807000000 24808244853 8269000000 8269414951 3974032704 3974447655
+24810000000 24811244967 8270000000 8270414989 3975032704 3975447693
+24813000000 24814245099 8271000000 8271415033 3976032704 3976447737
+24816000000 24817245273 8272000000 8272415091 3977032704 3977447795
+24819000000 24820245392 8273000000 8273415130 3978032704 3978447834
+24822000000 24823245516 8274000000 8274415172 3979032704 3979447876
+24825000000 24826245735 8275000000 8275415245 3980032704 3980447949
+24828000000 24829245871 8276000000 8276415290 3981032704 3981447994
+24831000000 24832246022 8277000000 8277415340 3982032704 3982448044
+24834000000 24835246182 8278000000 8278415394 3983032704 3983448098
+24837000000 24838246303 8279000000 8279415434 3984032704 3984448138
+24840000000 24841246384 8280000000 8280415461 3985032704 3985448165
+24843000000 24844246592 8281000000 8281415530 3986032704 3986448234
+24846000000 24847246747 8282000000 8282415582 3987032704 3987448286
+24849000000 24850246906 8283000000 8283415635 3988032704 3988448339
+24852000000 24853247058 8284000000 8284415686 3989032704 3989448390
+24855000000 24856247180 8285000000 8285415726 3990032704 3990448430
+24858000000 24859247358 8286000000 8286415786 3991032704 3991448490
+24861000000 24862247507 8287000000 8287415835 3992032704 3992448539
+24864000000 24865247635 8288000000 8288415878 3993032704 3993448582
+24867000000 24868247804 8289000000 8289415934 3994032704 3994448638
+24870000000 24871247924 8290000000 8290415974 3995032704 3995448678
+24873000000 24874247851 8291000000 8291415950 3996032704 3996448654
+24876000000 24877248174 8292000000 8292416058 3997032704 3997448762
+24879000000 24880248427 8293000000 8293416142 3998032704 3998448846
+24882000000 24883248537 8294000000 8294416179 3999032704 3999448883
+24885000000 24886248716 8295000000 8295416238 4000032704 4000448942
+24888000000 24889248764 8296000000 8296416254 4001032704 4001448958
+24891000000 24892249018 8297000000 8297416339 4002032704 4002449043
+24894000000 24895249137 8298000000 8298416379 4003032704 4003449083
+24897000000 24898249308 8299000000 8299416436 4004032704 4004449140
+24900000000 24901249455 8300000000 8300416485 4005032704 4005449189
+24903000000 24904249608 8301000000 8301416536 4006032704 4006449240
+24906000000 24907249754 8302000000 8302416584 4007032704 4007449288
+24909000000 24910249898 8303000000 8303416632 4008032704 4008449336
+24912000000 24913250061 8304000000 8304416687 4009032704 4009449391
+24915000000 24916250213 8305000000 8305416737 4010032704 4010449441
+24918000000 24919250367 8306000000 8306416789 4011032704 4011449493
+24921000000 24922250487 8307000000 8307416829 4012032704 4012449533
+24924000000 24925250696 8308000000 8308416898 4013032704 4013449602
+24927000000 24928250826 8309000000 8309416942 4014032704 4014449646
+24930000000 24931250940 8310000000 8310416980 4015032704 4015449684
+24933000000 24934251101 8311000000 8311417033 4016032704 4016449737
+24936000000 24937251236 8312000000 8312417078 4017032704 4017449782
+24939000000 24940251379 8313000000 8313417126 4018032704 4018449830
+24942000000 24943251479 8314000000 8314417159 4019032704 4019449863
+24945000000 24946251713 8315000000 8315417237 4020032704 4020449941
+24948000000 24949251786 8316000000 8316417262 4021032704 4021449966
+24951000000 24952251907 8317000000 8317417302 4022032704 4022450006
+24954000000 24955252096 8318000000 8318417365 4023032704 4023450069
+24957000000 24958252250 8319000000 8319417416 4024032704 4024450120
+24960000000 24961252429 8320000000 8320417476 4025032704 4025450180
+24963000000 24964252575 8321000000 8321417525 4026032704 4026450229
+24966000000 24967252702 8322000000 8322417567 4027032704 4027450271
+24969000000 24970252876 8323000000 8323417625 4028032704 4028450329
+24972000000 24973252940 8324000000 8324417646 4029032704 4029450350
+24975000000 24976253147 8325000000 8325417715 4030032704 4030450419
+24978000000 24979253328 8326000000 8326417776 4031032704 4031450480
+24981000000 24982253477 8327000000 8327417825 4032032704 4032450529
+24984000000 24985253534 8328000000 8328417844 4033032704 4033450548
+24987000000 24988253730 8329000000 8329417910 4034032704 4034450614
+24990000000 24991253920 8330000000 8330417973 4035032704 4035450677
+24993000000 24994254065 8331000000 8331418021 4036032704 4036450725
+24996000000 24997254237 8332000000 8332418079 4037032704 4037450783
+24999000000 25000254370 8333000000 8333418123 4038032704 4038450827
+25002000000 25003254441 8334000000 8334418147 4039032704 4039450851
+25005000000 25006254667 8335000000 8335418222 4040032704 4040450926
+25008000000 25009254827 8336000000 8336418275 4041032704 4041450979
+25011000000 25012254959 8337000000 8337418319 4042032704 4042451023
+25014000000 25015255067 8338000000 8338418355 4043032704 4043451059
+25017000000 25018255278 8339000000 8339418426 4044032704 4044451130
+25020000000 25021255444 8340000000 8340418481 4045032704 4045451185
+25023000000 25024255555 8341000000 8341418518 4046032704 4046451222
+25026000000 25027255715 8342000000 8342418571 4047032704 4047451275
+25029000000 25030255827 8343000000 8343418609 4048032704 4048451313
+25032000000 25033256025 8344000000 8344418675 4049032704 4049451379
+25035000000 25036256115 8345000000 8345418705 4050032704 4050451409
+25038000000 25039256340 8346000000 8346418780 4051032704 4051451484
+25041000000 25042256472 8347000000 8347418824 4052032704 4052451528
+25044000000 25045256611 8348000000 8348418870 4053032704 4053451574
+25047000000 25048256662 8349000000 8349418887 4054032704 4054451591
+25050000000 25051256873 8350000000 8350418957 4055032704 4055451661
+25053000000 25054257082 8351000000 8351419027 4056032704 4056451731
+25056000000 25057257210 8352000000 8352419070 4057032704 4057451774
+25059000000 25060257353 8353000000 8353419117 4058032704 4058451821
+25062000000 25063257524 8354000000 8354419174 4059032704 4059451878
+25065000000 25066257621 8355000000 8355419207 4060032704 4060451911
+25068000000 25069257834 8356000000 8356419278 4061032704 4061451982
+25071000000 25072257964 8357000000 8357419321 4062032704 4062452025
+25074000000 25075258114 8358000000 8358419371 4063032704 4063452075
+25077000000 25078258274 8359000000 8359419424 4064032704 4064452128
+25080000000 25081258370 8360000000 8360419456 4065032704 4065452160
+25083000000 25084258558 8361000000 8361419519 4066032704 4066452223
+25086000000 25087258726 8362000000 8362419575 4067032704 4067452279
+25089000000 25090258862 8363000000 8363419620 4068032704 4068452324
+25092000000 25093259037 8364000000 8364419679 4069032704 4069452383
+25095000000 25096259159 8365000000 8365419719 4070032704 4070452423
+25098000000 25099259309 8366000000 8366419769 4071032704 4071452473
+25101000000 25102259457 8367000000 8367419819 4072032704 4072452523
+25104000000 25105259663 8368000000 8368419887 4073032704 4073452591
+25107000000 25108259777 8369000000 8369419925 4074032704 4074452629
+25110000000 25111259909 8370000000 8370419969 4075032704 4075452673
+25113000000 25114260083 8371000000 8371420027 4076032704 4076452731
+25116000000 25117260202 8372000000 8372420067 4077032704 4077452771
+25119000000 25120260326 8373000000 8373420108 4078032704 4078452812
+25122000000 25123260545 8374000000 8374420181 4079032704 4079452885
+25125000000 25126260681 8375000000 8375420227 4080032704 4080452931
+25128000000 25129260832 8376000000 8376420277 4081032704 4081452981
+25131000000 25132260992 8377000000 8377420330 4082032704 4082453034
+25134000000 25135261113 8378000000 8378420371 4083032704 4083453075
+25137000000 25138261194 8379000000 8379420398 4084032704 4084453102
+25140000000 25141261402 8380000000 8380420467 4085032704 4085453171
+25143000000 25144261557 8381000000 8381420519 4086032704 4086453223
+25146000000 25147261716 8382000000 8382420572 4087032704 4087453276
+25149000000 25150261868 8383000000 8383420622 4088032704 4088453326
+25152000000 25153261990 8384000000 8384420663 4089032704 4089453367
+25155000000 25156262168 8385000000 8385420722 4090032704 4090453426
+25158000000 25159262317 8386000000 8386420772 4091032704 4091453476
+25161000000 25162262445 8387000000 8387420815 4092032704 4092453519
+25164000000 25165262614 8388000000 8388420871 4093032704 4093453575
+25167000000 25168262734 8389000000 8389420911 4094032704 4094453615
+25170000000 25171262661 8390000000 8390420887 4095032704 4095453591
+25173000000 25174262984 8391000000 8391420994 4096032704 4096453698
+25176000000 25177263237 8392000000 8392421079 4097032704 4097453783
+25179000000 25180263347 8393000000 8393421115 4098032704 4098453819
+25182000000 25183263526 8394000000 8394421175 4099032704 4099453879
+25185000000 25186263574 8395000000 8395421191 4100032704 4100453895
+25188000000 25189263828 8396000000 8396421276 4101032704 4101453980
+25191000000 25192263947 8397000000 8397421315 4102032704 4102454019
+25194000000 25195264118 8398000000 8398421372 4103032704 4103454076
+25197000000 25198264265 8399000000 8399421421 4104032704 4104454125
+25200000000 25201264418 8400000000 8400421472 4105032704 4105454176
+25203000000 25204264564 8401000000 8401421521 4106032704 4106454225
+25206000000 25207264708 8402000000 8402421569 4107032704 4107454273
+25209000000 25210264871 8403000000 8403421623 4108032704 4108454327
+25212000000 25213265023 8404000000 8404421674 4109032704 4109454378
+25215000000 25216265177 8405000000 8405421725 4110032704 4110454429
+25218000000 25219265297 8406000000 8406421765 4111032704 4111454469
+25221000000 25222265506 8407000000 8407421835 4112032704 4112454539
+25224000000 25225265636 8408000000 8408421878 4113032704 4113454582
+25227000000 25228265750 8409000000 8409421916 4114032704 4114454620
+25230000000 25231265911 8410000000 8410421970 4115032704 4115454674
+25233000000 25234266046 8411000000 8411422015 4116032704 4116454719
+25236000000 25237266189 8412000000 8412422063 4117032704 4117454767
+25239000000 25240266289 8413000000 8413422096 4118032704 4118454800
+25242000000 25243266523 8414000000 8414422174 4119032704 4119454878
+25245000000 25246266596 8415000000 8415422198 4120032704 4120454902
+25248000000 25249266717 8416000000 8416422239 4121032704 4121454943
+25251000000 25252266906 8417000000 8417422302 4122032704 4122455006
+25254000000 25255267060 8418000000 8418422353 4123032704 4123455057
+25257000000 25258267239 8419000000 8419422413 4124032704 4124455117
+25260000000 25261267385 8420000000 8420422461 4125032704 4125455165
+25263000000 25264267512 8421000000 8421422504 4126032704 4126455208
+25266000000 25267267686 8422000000 8422422562 4127032704 4127455266
+25269000000 25270267750 8423000000 8423422583 4128032704 4128455287
+25272000000 25273267957 8424000000 8424422652 4129032704 4129455356
+25275000000 25276268138 8425000000 8425422712 4130032704 4130455416
+25278000000 25279268287 8426000000 8426422762 4131032704 4131455466
+25281000000 25282268344 8427000000 8427422781 4132032704 4132455485
+25284000000 25285268540 8428000000 8428422846 4133032704 4133455550
+25287000000 25288268730 8429000000 8429422910 4134032704 4134455614
+25290000000 25291268875 8430000000 8430422958 4135032704 4135455662
+25293000000 25294269047 8431000000 8431423015 4136032704 4136455719
+25296000000 25297269180 8432000000 8432423060 4137032704 4137455764
+25299000000 25300269251 8433000000 8433423083 4138032704 4138455787
+25302000000 25303269477 8434000000 8434423159 4139032704 4139455863
+25305000000 25306269637 8435000000 8435423212 4140032704 4140455916
+25308000000 25309269769 8436000000 8436423256 4141032704 4141455960
+25311000000 25312269877 8437000000 8437423292 4142032704 4142455996
+25314000000 25315270088 8438000000 8438423362 4143032704 4143456066
+25317000000 25318270254 8439000000 8439423418 4144032704 4144456122
+25320000000 25321270365 8440000000 8440423455 4145032704 4145456159
+25323000000 25324270525 8441000000 8441423508 4146032704 4146456212
+25326000000 25327270637 8442000000 8442423545 4147032704 4147456249
+25329000000 25330270835 8443000000 8443423611 4148032704 4148456315
+25332000000 25333270925 8444000000 8444423641 4149032704 4149456345
+25335000000 25336271150 8445000000 8445423716 4150032704 4150456420
+25338000000 25339271282 8446000000 8446423760 4151032704 4151456464
+25341000000 25342271421 8447000000 8447423807 4152032704 4152456511
+25344000000 25345271472 8448000000 8448423824 4153032704 4153456528
+25347000000 25348271683 8449000000 8449423894 4154032704 4154456598
+25350000000 25351271892 8450000000 8450423964 4155032704 4155456668
+25353000000 25354272020 8451000000 8451424006 4156032704 4156456710
+25356000000 25357272163 8452000000 8452424054 4157032704 4157456758
+25359000000 25360272334 8453000000 8453424111 4158032704 4158456815
+25362000000 25363272431 8454000000 8454424143 4159032704 4159456847
+25365000000 25366272644 8455000000 8455424214 4160032704 4160456918
+25368000000 25369272774 8456000000 8456424258 4161032704 4161456962
+25371000000 25372272924 8457000000 8457424308 4162032704 4162457012
+25374000000 25375273084 8458000000 8458424361 4163032704 4163457065
+25377000000 25378273180 8459000000 8459424393 4164032704 4164457097
+25380000000 25381273368 8460000000 8460424456 4165032704 4165457160
+25383000000 25384273536 8461000000 8461424512 4166032704 4166457216
+25386000000 25387273672 8462000000 8462424557 4167032704 4167457261
+25389000000 25390273847 8463000000 8463424615 4168032704 4168457319
+25392000000 25393273969 8464000000 8464424656 4169032704 4169457360
+25395000000 25396274119 8465000000 8465424706 4170032704 4170457410
+25398000000 25399274267 8466000000 8466424755 4171032704 4171457459
+25401000000 25402274473 8467000000 8467424824 4172032704 4172457528
+25404000000 25405274587 8468000000 8468424862 4173032704 4173457566
+25407000000 25408274719 8469000000 8469424906 4174032704 4174457610
+25410000000 25411274893 8470000000 8470424964 4175032704 4175457668
+25413000000 25414275012 8471000000 8471425004 4176032704 4176457708
+25416000000 25417275136 8472000000 8472425045 4177032704 4177457749
+25419000000 25420275355 8473000000 8473425118 4178032704 4178457822
+25422000000 25423275491 8474000000 8474425163 4179032704 4179457867
+25425000000 25426275642 8475000000 8475425214 4180032704 4180457918
+25428000000 25429275802 8476000000 8476425267 4181032704 4181457971
+25431000000 25432275923 8477000000 8477425307 4182032704 4182458011
+25434000000 25435276004 8478000000 8478425334 4183032704 4183458038
+25437000000 25438276212 8479000000 8479425404 4184032704 4184458108
+25440000000 25441276367 8480000000 8480425455 4185032704 4185458159
+25443000000 25444276526 8481000000 8481425508 4186032704 4186458212
+25446000000 25447276678 8482000000 8482425559 4187032704 4187458263
+25449000000 25450276800 8483000000 8483425600 4188032704 4188458304
+25452000000 25453276978 8484000000 8484425659 4189032704 4189458363
+25455000000 25456277127 8485000000 8485425709 4190032704 4190458413
+25458000000 25459277255 8486000000 8486425751 4191032704 4191458455
+25461000000 25462277424 8487000000 8487425808 4192032704 4192458512
+25464000000 25465277544 8488000000 8488425848 4193032704 4193458552
+25467000000 25468277471 8489000000 8489425823 4194032704 4194458527
+25470000000 25471277794 8490000000 8490425931 4195032704 4195458635
+25473000000 25474278047 8491000000 8491426015 4196032704 4196458719
+25476000000 25477278157 8492000000 8492426052 4197032704 4197458756
+25479000000 25480278336 8493000000 8493426112 4198032704 4198458816
+25482000000 25483278384 8494000000 8494426128 4199032704 4199458832
+25485000000 25486278638 8495000000 8495426212 4200032704 4200458916
+25488000000 25489278757 8496000000 8496426252 4201032704 4201458956
+25491000000 25492278928 8497000000 8497426309 4202032704 4202459013
+25494000000 25495279075 8498000000 8498426358 4203032704 4203459062
+25497000000 25498279228 8499000000 8499426409 4204032704 4204459113
+25500000000 25501279374 8500000000 8500426458 4205032704 4205459162
+25503000000 25504279518 8501000000 8501426506 4206032704 4206459210
+25506000000 25507279681 8502000000 8502426560 4207032704 4207459264
+25509000000 25510279833 8503000000 8503426611 4208032704 4208459315
+25512000000 25513279987 8504000000 8504426662 4209032704 4209459366
+25515000000 25516280107 8505000000 8505426702 4210032704 4210459406
+25518000000 25519280316 8506000000 8506426772 4211032704 4211459476
+25521000000 25522280446 8507000000 8507426815 4212032704 4212459519
+25524000000 25525280560 8508000000 8508426853 4213032704 4213459557
+25527000000 25528280721 8509000000 8509426907 4214032704 4214459611
+25530000000 25531280856 8510000000 8510426952 4215032704 4215459656
+25533000000 25534280999 8511000000 8511426999 4216032704 4216459703
+25536000000 25537281099 8512000000 8512427033 4217032704 4217459737
+25539000000 25540281333 8513000000 8513427111 4218032704 4218459815
+25542000000 25543281406 8514000000 8514427135 4219032704 4219459839
+25545000000 25546281527 8515000000 8515427175 4220032704 4220459879
+25548000000 25549281716 8516000000 8516427238 4221032704 4221459942
+25551000000 25552281870 8517000000 8517427290 4222032704 4222459994
+25554000000 25555282049 8518000000 8518427349 4223032704 4223460053
+25557000000 25558282195 8519000000 8519427398 4224032704 4224460102
+25560000000 25561282322 8520000000 8520427440 4225032704 4225460144
+25563000000 25564282496 8521000000 8521427498 4226032704 4226460202
+25566000000 25567282560 8522000000 8522427520 4227032704 4227460224
+25569000000 25570282767 8523000000 8523427589 4228032704 4228460293
+25572000000 25573282948 8524000000 8524427649 4229032704 4229460353
+25575000000 25576283097 8525000000 8525427699 4230032704 4230460403
+25578000000 25579283154 8526000000 8526427718 4231032704 4231460422
+25581000000 25582283350 8527000000 8527427783 4232032704 4232460487
+25584000000 25585283540 8528000000 8528427846 4233032704 4233460550
+25587000000 25588283685 8529000000 8529427895 4234032704 4234460599
+25590000000 25591283857 8530000000 8530427952 4235032704 4235460656
+25593000000 25594283990 8531000000 8531427996 4236032704 4236460700
+25596000000 25597284061 8532000000 8532428020 4237032704 4237460724
+25599000000 25600284287 8533000000 8533428095 4238032704 4238460799
+25602000000 25603284447 8534000000 8534428149 4239032704 4239460853
+25605000000 25606284579 8535000000 8535428193 4240032704 4240460897
+25608000000 25609284687 8536000000 8536428229 4241032704 4241460933
+25611000000 25612284898 8537000000 8537428299 4242032704 4242461003
+25614000000 25615285064 8538000000 8538428354 4243032704 4243461058
+25617000000 25618285175 8539000000 8539428391 4244032704 4244461095
+25620000000 25621285335 8540000000 8540428445 4245032704 4245461149
+25623000000 25624285447 8541000000 8541428482 4246032704 4246461186
+25626000000 25627285645 8542000000 8542428548 4247032704 4247461252
+25629000000 25630285735 8543000000 8543428578 4248032704 4248461282
+25632000000 25633285960 8544000000 8544428653 4249032704 4249461357
+25635000000 25636286092 8545000000 8545428697 4250032704 4250461401
+25638000000 25639286231 8546000000 8546428743 4251032704 4251461447
+25641000000 25642286282 8547000000 8547428760 4252032704 4252461464
+25644000000 25645286493 8548000000 8548428831 4253032704 4253461535
+25647000000 25648286702 8549000000 8549428900 4254032704 4254461604
+25650000000 25651286830 8550000000 8550428943 4255032704 4255461647
+25653000000 25654286973 8551000000 8551428991 4256032704 4256461695
+25656000000 25657287144 8552000000 8552429048 4257032704 4257461752
+25659000000 25660287241 8553000000 8553429080 4258032704 4258461784
+25662000000 25663287454 8554000000 8554429151 4259032704 4259461855
+25665000000 25666287584 8555000000 8555429194 4260032704 4260461898
+25668000000 25669287734 8556000000 8556429244 4261032704 4261461948
+25671000000 25672287894 8557000000 8557429298 4262032704 4262462002
+25674000000 25675287990 8558000000 8558429330 4263032704 4263462034
+25677000000 25678288178 8559000000 8559429392 4264032704 4264462096
+25680000000 25681288346 8560000000 8560429448 4265032704 4265462152
+25683000000 25684288482 8561000000 8561429494 4266032704 4266462198
+25686000000 25687288657 8562000000 8562429552 4267032704 4267462256
+25689000000 25690288779 8563000000 8563429593 4268032704 4268462297
+25692000000 25693288929 8564000000 8564429643 4269032704 4269462347
+25695000000 25696289077 8565000000 8565429692 4270032704 4270462396
+25698000000 25699289283 8566000000 8566429761 4271032704 4271462465
+25701000000 25702289397 8567000000 8567429799 4272032704 4272462503
+25704000000 25705289529 8568000000 8568429843 4273032704 4273462547
+25707000000 25708289703 8569000000 8569429901 4274032704 4274462605
+25710000000 25711289822 8570000000 8570429940 4275032704 4275462644
+25713000000 25714289946 8571000000 8571429982 4276032704 4276462686
+25716000000 25717290165 8572000000 8572430055 4277032704 4277462759
+25719000000 25720290301 8573000000 8573430100 4278032704 4278462804
+25722000000 25723290452 8574000000 8574430150 4279032704 4279462854
+25725000000 25726290612 8575000000 8575430204 4280032704 4280462908
+25728000000 25729290733 8576000000 8576430244 4281032704 4281462948
+25731000000 25732290814 8577000000 8577430271 4282032704 4282462975
+25734000000 25735291022 8578000000 8578430340 4283032704 4283463044
+25737000000 25738291177 8579000000 8579430392 4284032704 4284463096
+25740000000 25741291336 8580000000 8580430445 4285032704 4285463149
+25743000000 25744291488 8581000000 8581430496 4286032704 4286463200
+25746000000 25747291610 8582000000 8582430536 4287032704 4287463240
+25749000000 25750291788 8583000000 8583430596 4288032704 4288463300
+25752000000 25753291937 8584000000 8584430645 4289032704 4289463349
+25755000000 25756292065 8585000000 8585430688 4290032704 4290463392
+25758000000 25759292234 8586000000 8586430744 4291032704 4291463448
+25761000000 25762292354 8587000000 8587430784 4292032704 4292463488
+25764000000 25765292281 8588000000 8588430760 4293032704 4293463464
+25767000000 25768292604 8589000000 8589430868 4294032704 4294463572
+25770000000 25771292857 8590000000 8590430952 65408 496360
+25773000000 25774292967 8591000000 8591430989 1065408 1496397
+25776000000 25777293146 8592000000 8592431048 2065408 2496456
+25779000000 25780293194 8593000000 8593431064 3065408 3496472
+25782000000 25783293448 8594000000 8594431149 4065408 4496557
+25785000000 25786293567 8595000000 8595431189 5065408 5496597
+25788000000 25789293738 8596000000 8596431246 6065408 6496654
+25791000000 25792293885 8597000000 8597431295 7065408 7496703
+25794000000 25795294038 8598000000 8598431346 8065408 8496754
+25797000000 25798294184 8599000000 8599431394 9065408 9496802
+25800000000 25801294328 8600000000 8600431442 10065408 10496850
+25803000000 25804294491 8601000000 8601431497 11065408 11496905
+25806000000 25807294643 8602000000 8602431547 12065408 12496955
+25809000000 25810294797 8603000000 8603431599 13065408 13497007
+25812000000 25813294917 8604000000 8604431639 14065408 14497047
+25815000000 25816295126 8605000000 8605431708 15065408 15497116
+25818000000 25819295256 8606000000 8606431752 16065408 16497160
+25821000000 25822295370 8607000000 8607431790 17065408 17497198
+25824000000 25825295531 8608000000 8608431843 18065408 18497251
+25827000000 25828295666 8609000000 8609431888 19065408 19497296
+25830000000 25831295809 8610000000 8610431936 20065408 20497344
+25833000000 25834295909 8611000000 8611431969 21065408 21497377
+25836000000 25837296143 8612000000 8612432047 22065408 22497455
+25839000000 25840296216 8613000000 8613432072 23065408 23497480
+25842000000 25843296337 8614000000 8614432112 24065408 24497520
+25845000000 25846296526 8615000000 8615432175 25065408 25497583
+25848000000 25849296680 8616000000 8616432226 26065408 26497634
+25851000000 25852296859 8617000000 8617432286 27065408 27497694
+25854000000 25855297005 8618000000 8618432335 28065408 28497743
+25857000000 25858297132 8619000000 8619432377 29065408 29497785
+25860000000 25861297306 8620000000 8620432435 30065408 30497843
+25863000000 25864297370 8621000000 8621432456 31065408 31497864
+25866000000 25867297577 8622000000 8622432525 32065408 32497933
+25869000000 25870297758 8623000000 8623432586 33065408 33497994
+25872000000 25873297907 8624000000 8624432635 34065408 34498043
+25875000000 25876297964 8625000000 8625432654 35065408 35498062
+25878000000 25879298160 8626000000 8626432720 36065408 36498128
+25881000000 25882298350 8627000000 8627432783 37065408 37498191
+25884000000 25885298495 8628000000 8628432831 38065408 38498239
+25887000000 25888298667 8629000000 8629432889 39065408 39498297
+25890000000 25891298800 8630000000 8630432933 40065408 40498341
+25893000000 25894298871 8631000000 8631432957 41065408 41498365
+25896000000 25897299097 8632000000 8632433032 42065408 42498440
+25899000000 25900299257 8633000000 8633433085 43065408 43498493
+25902000000 25903299389 8634000000 8634433129 44065408 44498537
+25905000000 25906299497 8635000000 8635433165 45065408 45498573
+25908000000 25909299708 8636000000 8636433236 46065408 46498644
+25911000000 25912299874 8637000000 8637433291 47065408 47498699
+25914000000 25915299985 8638000000 8638433328 48065408 48498736
+25917000000 25918300145 8639000000 8639433381 49065408 49498789
+25920000000 25921300257 8640000000 8640433419 50065408 50498827
+25923000000 25924300455 8641000000 8641433485 51065408 51498893
+25926000000 25927300545 8642000000 8642433515 52065408 52498923
+25929000000 25930300770 8643000000 8643433590 53065408 53498998
+25932000000 25933300902 8644000000 8644433634 54065408 54499042
+25935000000 25936301041 8645000000 8645433680 55065408 55499088
+25938000000 25939301092 8646000000 8646433697 56065408 56499105
+25941000000 25942301303 8647000000 8647433767 57065408 57499175
+25944000000 25945301512 8648000000 8648433837 58065408 58499245
+25947000000 25948301640 8649000000 8649433880 59065408 59499288
+25950000000 25951301783 8650000000 8650433927 60065408 60499335
+25953000000 25954301954 8651000000 8651433984 61065408 61499392
+25956000000 25957302051 8652000000 8652434017 62065408 62499425
+25959000000 25960302264 8653000000 8653434088 63065408 63499496
+25962000000 25963302394 8654000000 8654434131 64065408 64499539
+25965000000 25966302544 8655000000 8655434181 65065408 65499589
+25968000000 25969302704 8656000000 8656434234 66065408 66499642
+25971000000 25972302800 8657000000 8657434266 67065408 67499674
+25974000000 25975302988 8658000000 8658434329 68065408 68499737
+25977000000 25978303156 8659000000 8659434385 69065408 69499793
+25980000000 25981303292 8660000000 8660434430 70065408 70499838
+25983000000 25984303467 8661000000 8661434489 71065408 71499897
+25986000000 25987303589 8662000000 8662434529 72065408 72499937
+25989000000 25990303739 8663000000 8663434579 73065408 73499987
+25992000000 25993303887 8664000000 8664434629 74065408 74500037
+25995000000 25996304093 8665000000 8665434697 75065408 75500105
+25998000000 25999304207 8666000000 8666434735 76065408 76500143
+26001000000 26002304339 8667000000 8667434779 77065408 77500187
+26004000000 26005304513 8668000000 8668434837 78065408 78500245
+26007000000 26008304632 8669000000 8669434877 79065408 79500285
+26010000000 26011304756 8670000000 8670434918 80065408 80500326
+26013000000 26014304975 8671000000 8671434991 81065408 81500399
+26016000000 26017305111 8672000000 8672435037 82065408 82500445
+26019000000 26020305262 8673000000 8673435087 83065408 83500495
+26022000000 26023305422 8674000000 8674435140 84065408 84500548
+26025000000 26026305543 8675000000 8675435181 85065408 85500589
+26028000000 26029305624 8676000000 8676435208 86065408 86500616
+26031000000 26032305832 8677000000 8677435277 87065408 87500685
+26034000000 26035305987 8678000000 8678435329 88065408 88500737
+26037000000 26038306146 8679000000 8679435382 89065408 89500790
+26040000000 26041306298 8680000000 8680435432 90065408 90500840
+26043000000 26044306420 8681000000 8681435473 91065408 91500881
+26046000000 26047306598 8682000000 8682435532 92065408 92500940
+26049000000 26050306747 8683000000 8683435582 93065408 93500990
+26052000000 26053306875 8684000000 8684435625 94065408 94501033
+26055000000 26056307044 8685000000 8685435681 95065408 95501089
+26058000000 26059307164 8686000000 8686435721 96065408 96501129
+26061000000 26062307091 8687000000 8687435697 97065408 97501105
+26064000000 26065307414 8688000000 8688435804 98065408 98501212
+26067000000 26068307667 8689000000 8689435889 99065408 99501297
+26070000000 26071307777 8690000000 8690435925 100065408 100501333
+26073000000 26074307956 8691000000 8691435985 101065408 101501393
+26076000000 26077308004 8692000000 8692436001 102065408 102501409
+26079000000 26080308258 8693000000 8693436086 103065408 103501494
+26082000000 26083308377 8694000000 8694436125 104065408 104501533
+26085000000 26086308548 8695000000 8695436182 105065408 105501590
+26088000000 26089308695 8696000000 8696436231 106065408 106501639
+26091000000 26092308848 8697000000 8697436282 107065408 107501690
+26094000000 26095308994 8698000000 8698436331 108065408 108501739
+26097000000 26098309138 8699000000 8699436379 109065408 109501787
+26100000000 26101309301 8700000000 8700436433 110065408 110501841
+26103000000 26104309453 8701000000 8701436484 111065408 111501892
+26106000000 26107309607 8702000000 8702436535 112065408 112501943
+26109000000 26110309727 8703000000 8703436575 113065408 113501983
+26112000000 26113309936 8704000000 8704436645 114065408 114502053
+26115000000 26116310066 8705000000 8705436688 115065408 115502096
+26118000000 26119310180 8706000000 8706436726 116065408 116502134
+26121000000 26122310341 8707000000 8707436780 117065408 117502188
+26124000000 26125310476 8708000000 8708436825 118065408 118502233
+26127000000 26128310619 8709000000 8709436873 119065408 119502281
+26130000000 26131310719 8710000000 8710436906 120065408 120502314
+26133000000 26134310953 8711000000 8711436984 121065408 121502392
+26136000000 26137311026 8712000000 8712437008 122065408 122502416
+26139000000 26140311147 8713000000 8713437049 123065408 123502457
+26142000000 26143311336 8714000000 8714437112 124065408 124502520
+26145000000 26146311490 8715000000 8715437163 125065408 125502571
+26148000000 26149311669 8716000000 8716437223 126065408 126502631
+26151000000 26152311815 8717000000 8717437271 127065408 127502679
+26154000000 26155311942 8718000000 8718437314 128065408 128502722
+26157000000 26158312116 8719000000 8719437372 129065408 129502780
+26160000000 26161312180 8720000000 8720437393 130065408 130502801
+26163000000 26164312387 8721000000 8721437462 131065408 131502870
+26166000000 26167312568 8722000000 8722437522 132065408 132502930
+26169000000 26170312717 8723000000 8723437572 133065408 133502980
+26172000000 26173312774 8724000000 8724437591 134065408 134502999
+26175000000 26176312970 8725000000 8725437656 135065408 135503064
+26178000000 26179313160 8726000000 8726437720 136065408 136503128
+26181000000 26182313305 8727000000 8727437768 137065408 137503176
+26184000000 26185313477 8728000000 8728437825 138065408 138503233
+26187000000 26188313610 8729000000 8729437870 139065408 139503278
+26190000000 26191313681 8730000000 8730437893 140065408 140503301
+26193000000 26194313907 8731000000 8731437969 141065408 141503377
+26196000000 26197314067 8732000000 8732438022 142065408 142503430
+26199000000 26200314199 8733000000 8733438066 143065408 143503474
+26202000000 26203314307 8734000000 8734438102 144065408 144503510
+26205000000 26206314518 8735000000 8735438172 145065408 145503580
+26208000000 26209314684 8736000000 8736438228 146065408 146503636
+26211000000 26212314795 8737000000 8737438265 147065408 147503673
+26214000000 26215314955 8738000000 8738438318 148065408 148503726
+26217000000 26218315067 8739000000 8739438355 149065408 149503763
+26220000000 26221315265 8740000000 8740438421 150065408 150503829
+26223000000 26224315355 8741000000 8741438451 151065408 151503859
+26226000000 26227315580 8742000000 8742438526 152065408 152503934
+26229000000 26230315712 8743000000 8743438570 153065408 153503978
+26232000000 26233315851 8744000000 8744438617 154065408 154504025
+26235000000 26236315902 8745000000 8745438634 155065408 155504042
+26238000000 26239316113 8746000000 8746438704 156065408 156504112
+26241000000 26242316322 8747000000 8747438774 157065408 157504182
+26244000000 26245316450 8748000000 8748438816 158065408 158504224
+26247000000 26248316593 8749000000 8749438864 159065408 159504272
+26250000000 26251316764 8750000000 8750438921 160065408 160504329
+26253000000 26254316861 8751000000 8751438953 161065408 161504361
+26256000000 26257317074 8752000000 8752439024 162065408 162504432
+26259000000 26260317204 8753000000 8753439068 163065408 163504476
+26262000000 26263317354 8754000000 8754439118 164065408 164504526
+26265000000 26266317514 8755000000 8755439171 165065408 165504579
+26268000000 26269317610 8756000000 8756439203 166065408 166504611
+26271000000 26272317798 8757000000 8757439266 167065408 167504674
+26274000000 26275317966 8758000000 8758439322 168065408 168504730
+26277000000 26278318102 8759000000 8759439367 169065408 169504775
+26280000000 26281318277 8760000000 8760439425 170065408 170504833
+26283000000 26284318399 8761000000 8761439466 171065408 171504874
+26286000000 26287318549 8762000000 8762439516 172065408 172504924
+26289000000 26290318697 8763000000 8763439565 173065408 173504973
+26292000000 26293318903 8764000000 8764439634 174065408 174505042
+26295000000 26296319017 8765000000 8765439672 175065408 175505080
+26298000000 26299319149 8766000000 8766439716 176065408 176505124
+26301000000 26302319323 8767000000 8767439774 177065408 177505182
+26304000000 26305319442 8768000000 8768439814 178065408 178505222
+26307000000 26308319566 8769000000 8769439855 179065408 179505263
+26310000000 26311319785 8770000000 8770439928 180065408 180505336
+26313000000 26314319921 8771000000 8771439973 181065408 181505381
+26316000000 26317320072 8772000000 8772440024 182065408 182505432
+26319000000 26320320232 8773000000 8773440077 183065408 183505485
+26322000000 26323320353 8774000000 8774440117 184065408 184505525
+26325000000 26326320434 8775000000 8775440144 185065408 185505552
+26328000000 26329320642 8776000000 8776440214 186065408 186505622
+26331000000 26332320797 8777000000 8777440265 187065408 187505673
+26334000000 26335320956 8778000000 8778440318 188065408 188505726
+26337000000 26338321108 8779000000 8779440369 189065408 189505777
+26340000000 26341321230 8780000000 8780440410 190065408 190505818
+26343000000 26344321408 8781000000 8781440469 191065408 191505877
+26346000000 26347321557 8782000000 8782440519 192065408 192505927
+26349000000 26350321685 8783000000 8783440561 193065408 193505969
+26352000000 26353321854 8784000000 8784440618 194065408 194506026
+26355000000 26356321974 8785000000 8785440658 195065408 195506066
+26358000000 26359321901 8786000000 8786440633 196065408 196506041
+26361000000 26362322224 8787000000 8787440741 197065408 197506149
+26364000000 26365322477 8788000000 8788440825 198065408 198506233
+26367000000 26368322587 8789000000 8789440862 199065408 199506270
+26370000000 26371322766 8790000000 8790440922 200065408 200506330
+26373000000 26374322814 8791000000 8791440938 201065408 201506346
+26376000000 26377323068 8792000000 8792441022 202065408 202506430
+26379000000 26380323187 8793000000 8793441062 203065408 203506470
+26382000000 26383323358 8794000000 8794441119 204065408 204506527
+26385000000 26386323505 8795000000 8795441168 205065408 205506576
+26388000000 26389323658 8796000000 8796441219 206065408 206506627
+26391000000 26392323804 8797000000 8797441268 207065408 207506676
+26394000000 26395323948 8798000000 8798441316 208065408 208506724
+26397000000 26398324111 8799000000 8799441370 209065408 209506778
+26400000000 26401324263 8800000000 8800441421 210065408 210506829
+26403000000 26404324417 8801000000 8801441472 211065408 211506880
+26406000000 26407324537 8802000000 8802441512 212065408 212506920
+26409000000 26410324746 8803000000 8803441582 213065408 213506990
+26412000000 26413324876 8804000000 8804441625 214065408 214507033
+26415000000 26416324990 8805000000 8805441663 215065408 215507071
+26418000000 26419325151 8806000000 8806441717 216065408 216507125
+26421000000 26422325286 8807000000 8807441762 217065408 217507170
+26424000000 26425325429 8808000000 8808441809 218065408 218507217
+26427000000 26428325529 8809000000 8809441843 219065408 219507251
+26430000000 26431325763 8810000000 8810441921 220065408 220507329
+26433000000 26434325836 8811000000 8811441945 221065408 221507353
+26436000000 26437325957 8812000000 8812441985 222065408 222507393
+26439000000 26440326146 8813000000 8813442048 223065408 223507456
+26442000000 26443326300 8814000000 8814442100 224065408 224507508
+26445000000 26446326479 8815000000 8815442159 225065408 225507567
+26448000000 26449326625 8816000000 8816442208 226065408 226507616
+26451000000 26452326752 8817000000 8817442250 227065408 227507658
+26454000000 26455326926 8818000000 8818442308 228065408 228507716
+26457000000 26458326990 8819000000 8819442330 229065408 229507738
+26460000000 26461327197 8820000000 8820442399 230065408 230507807
+26463000000 26464327378 8821000000 8821442459 231065408 231507867
+26466000000 26467327527 8822000000 8822442509 232065408 232507917
+26469000000 26470327584 8823000000 8823442528 233065408 233507936
+26472000000 26473327780 8824000000 8824442593 234065408 234508001
+26475000000 26476327970 8825000000 8825442656 235065408 235508064
+26478000000 26479328115 8826000000 8826442705 236065408 236508113
+26481000000 26482328287 8827000000 8827442762 237065408 237508170
+26484000000 26485328420 8828000000 8828442806 238065408 238508214
+26487000000 26488328491 8829000000 8829442830 239065408 239508238
+26490000000 26491328717 8830000000 8830442905 240065408 240508313
+26493000000 26494328877 8831000000 8831442959 241065408 241508367
+26496000000 26497329009 8832000000 8832443003 242065408 242508411
+26499000000 26500329117 8833000000 8833443039 243065408 243508447
+26502000000 26503329328 8834000000 8834443109 244065408 244508517
+26505000000 26506329494 8835000000 8835443164 245065408 245508572
+26508000000 26509329605 8836000000 8836443201 246065408 246508609
+26511000000 26512329765 8837000000 8837443255 247065408 247508663
+26514000000 26515329877 8838000000 8838443292 248065408 248508700
+26517000000 26518330075 8839000000 8839443358 249065408 249508766
+26520000000 26521330165 8840000000 8840443388 250065408 250508796
+26523000000 26524330390 8841000000 8841443463 251065408 251508871
+26526000000 26527330522 8842000000 8842443507 252065408 252508915
+26529000000 26530330661 8843000000 8843443553 253065408 253508961
+26532000000 26533330712 8844000000 8844443570 254065408 254508978
+26535000000 26536330923 8845000000 8845443641 255065408 255509049
+26538000000 26539331132 8846000000 8846443710 256065408 256509118
+26541000000 26542331260 8847000000 8847443753 257065408 257509161
+26544000000 26545331403 8848000000 8848443801 258065408 258509209
+26547000000 26548331574 8849000000 8849443858 259065408 259509266
+26550000000 26551331671 8850000000 8850443890 260065408 260509298
+26553000000 26554331884 8851000000 8851443961 261065408 261509369
+26556000000 26557332014 8852000000 8852444004 262065408 262509412
+26559000000 26560332164 8853000000 8853444054 263065408 263509462
+26562000000 26563332324 8854000000 8854444108 264065408 264509516
+26565000000 26566332420 8855000000 8855444140 265065408 265509548
+26568000000 26569332608 8856000000 8856444202 266065408 266509610
+26571000000 26572332776 8857000000 8857444258 267065408 267509666
+26574000000 26575332912 8858000000 8858444304 268065408 268509712
+26577000000 26578333087 8859000000 8859444362 269065408 269509770
+26580000000 26581333209 8860000000 8860444403 270065408 270509811
+26583000000 26584333359 8861000000 8861444453 271065408 271509861
+26586000000 26587333507 8862000000 8862444502 272065408 272509910
+26589000000 26590333713 8863000000 8863444571 273065408 273509979
+26592000000 26593333827 8864000000 8864444609 274065408 274510017
+26595000000 26596333959 8865000000 8865444653 275065408 275510061
+26598000000 26599334133 8866000000 8866444711 276065408 276510119
+26601000000 26602334252 8867000000 8867444750 277065408 277510158
+26604000000 26605334376 8868000000 8868444792 278065408 278510200
+26607000000 26608334595 8869000000 8869444865 279065408 279510273
+26610000000 26611334731 8870000000 8870444910 280065408 280510318
+26613000000 26614334882 8871000000 8871444960 281065408 281510368
+26616000000 26617335042 8872000000 8872445014 282065408 282510422
+26619000000 26620335163 8873000000 8873445054 283065408 283510462
+26622000000 26623335244 8874000000 8874445081 284065408 284510489
+26625000000 26626335452 8875000000 8875445150 285065408 285510558
+26628000000 26629335607 8876000000 8876445202 286065408 286510610
+26631000000 26632335766 8877000000 8877445255 287065408 287510663
+26634000000 26635335918 8878000000 8878445306 288065408 288510714
+26637000000 26638336040 8879000000 8879445346 289065408 289510754
+26640000000 26641336218 8880000000 8880445406 290065408 290510814
+26643000000 26644336367 8881000000 8881445455 291065408 291510863
+26646000000 26647336495 8882000000 8882445498 292065408 292510906
+26649000000 26650336664 8883000000 8883445554 293065408 293510962
+26652000000 26653336784 8884000000 8884445594 294065408 294511002
+26655000000 26656336711 8885000000 8885445570 295065408 295510978
+26658000000 26659337034 8886000000 8886445678 296065408 296511086
+26661000000 26662337287 8887000000 8887445762 297065408 297511170
+26664000000 26665337397 8888000000 8888445799 298065408 298511207
+26667000000 26668337576 8889000000 8889445858 299065408 299511266
+26670000000 26671337624 8890000000 8890445874 300065408 300511282
+26673000000 26674337878 8891000000 8891445959 301065408 301511367
+26676000000 26677337997 8892000000 8892445999 302065408 302511407
+26679000000 26680338168 8893000000 8893446056 303065408 303511464
+26682000000 26683338315 8894000000 8894446105 304065408 304511513
+26685000000 26686338468 8895000000 8895446156 305065408 305511564
+26688000000 26689338614 8896000000 8896446204 306065408 306511612
+26691000000 26692338758 8897000000 8897446252 307065408 307511660
+26694000000 26695338921 8898000000 8898446307 308065408 308511715
+26697000000 26698339073 8899000000 8899446357 309065408 309511765
+26700000000 26701339227 8900000000 8900446409 310065408 310511817
+26703000000 26704339347 8901000000 8901446449 311065408 311511857
+26706000000 26707339556 8902000000 8902446518 312065408 312511926
+26709000000 26710339686 8903000000 8903446562 313065408 313511970
+26712000000 26713339800 8904000000 8904446600 314065408 314512008
+26715000000 26716339961 8905000000 8905446653 315065408 315512061
+26718000000 26719340096 8906000000 8906446698 316065408 316512106
+26721000000 26722340239 8907000000 8907446746 317065408 317512154
+26724000000 26725340339 8908000000 8908446779 318065408 318512187
+26727000000 26728340573 8909000000 8909446857 319065408 319512265
+26730000000 26731340646 8910000000 8910446882 320065408 320512290
+26733000000 26734340767 8911000000 8911446922 321065408 321512330
+26736000000 26737340956 8912000000 8912446985 322065408 322512393
+26739000000 26740341110 8913000000 8913447036 323065408 323512444
+26742000000 26743341289 8914000000 8914447096 324065408 324512504
+26745000000 26746341435 8915000000 8915447145 325065408 325512553
+26748000000 26749341562 8916000000 8916447187 326065408 326512595
+26751000000 26752341736 8917000000 8917447245 327065408 327512653
+26754000000 26755341800 8918000000 8918447266 328065408 328512674
+26757000000 26758342007 8919000000 8919447335 329065408 329512743
+26760000000 26761342188 8920000000 8920447396 330065408 330512804
+26763000000 26764342337 8921000000 8921447445 331065408 331512853
+26766000000 26767342394 8922000000 8922447464 332065408 332512872
+26769000000 26770342590 8923000000 8923447530 333065408 333512938
+26772000000 26773342780 8924000000 8924447593 334065408 334513001
+26775000000 26776342925 8925000000 8925447641 335065408 335513049
+26778000000 26779343097 8926000000 8926447699 336065408 336513107
+26781000000 26782343230 8927000000 8927447743 337065408 337513151
+26784000000 26785343301 8928000000 8928447767 338065408 338513175
+26787000000 26788343527 8929000000 8929447842 339065408 339513250
+26790000000 26791343687 8930000000 8930447895 340065408 340513303
+26793000000 26794343819 8931000000 8931447939 341065408 341513347
+26796000000 26797343927 8932000000 8932447975 342065408 342513383
+26799000000 26800344138 8933000000 8933448046 343065408 343513454
+26802000000 26803344304 8934000000 8934448101 344065408 344513509
+26805000000 26806344415 8935000000 8935448138 345065408 345513546
+26808000000 26809344575 8936000000 8936448191 346065408 346513599
+26811000000 26812344687 8937000000 8937448229 347065408 347513637
+26814000000 26815344885 8938000000 8938448295 348065408 348513703
+26817000000 26818344975 8939000000 8939448325 349065408 349513733
+26820000000 26821345200 8940000000 8940448400 350065408 350513808
+26823000000 26824345332 8941000000 8941448444 351065408 351513852
+26826000000 26827345471 8942000000 8942448490 352065408 352513898
+26829000000 26830345522 8943000000 8943448507 353065408 353513915
+26832000000 26833345733 8944000000 8944448577 354065408 354513985
+26835000000 26836345942 8945000000 8945448647 355065408 355514055
+26838000000 26839346070 8946000000 8946448690 356065408 356514098
+26841000000 26842346213 8947000000 8947448737 357065408 357514145
+26844000000 26845346384 8948000000 8948448794 358065408 358514202
+26847000000 26848346481 8949000000 8949448827 359065408 359514235
+26850000000 26851346694 8950000000 8950448898 360065408 360514306
+26853000000 26854346824 8951000000 8951448941 361065408 361514349
+26856000000 26857346974 8952000000 8952448991 362065408 362514399
+26859000000 26860347134 8953000000 8953449044 363065408 363514452
+26862000000 26863347230 8954000000 8954449076 364065408 364514484
+26865000000 26866347418 8955000000 8955449139 365065408 365514547
+26868000000 26869347586 8956000000 8956449195 366065408 366514603
+26871000000 26872347722 8957000000 8957449240 367065408 367514648
+26874000000 26875347897 8958000000 8958449299 368065408 368514707
+26877000000 26878348019 8959000000 8959449339 369065408 369514747
+26880000000 26881348169 8960000000 8960449389 370065408 370514797
+26883000000 26884348317 8961000000 8961449439 371065408 371514847
+26886000000 26887348523 8962000000 8962449507 372065408 372514915
+26889000000 26890348637 8963000000 8963449545 373065408 373514953
+26892000000 26893348769 8964000000 8964449589 374065408 374514997
+26895000000 26896348943 8965000000 8965449647 375065408 375515055
+26898000000 26899349062 8966000000 8966449687 376065408 376515095
+26901000000 26902349186 8967000000 8967449728 377065408 377515136
+26904000000 26905349405 8968000000 8968449801 378065408 378515209
+26907000000 26908349541 8969000000 8969449847 379065408 379515255
+26910000000 26911349692 8970000000 8970449897 380065408 380515305
+26913000000 26914349852 8971000000 8971449950 381065408 381515358
+26916000000 26917349973 8972000000 8972449991 382065408 382515399
+26919000000 26920350054 8973000000 8973450018 383065408 383515426
+26922000000 26923350262 8974000000 8974450087 384065408 384515495
+26925000000 26926350417 8975000000 8975450139 385065408 385515547
+26928000000 26929350576 8976000000 8976450192 386065408 386515600
+26931000000 26932350728 8977000000 8977450242 387065408 387515650
+26934000000 26935350850 8978000000 8978450283 388065408 388515691
+26937000000 26938351028 8979000000 8979450342 389065408 389515750
+26940000000 26941351177 8980000000 8980450392 390065408 390515800
+26943000000 26944351305 8981000000 8981450435 391065408 391515843
+26946000000 26947351474 8982000000 8982450491 392065408 392515899
+26949000000 26950351594 8983000000 8983450531 393065408 393515939
+26952000000 26953351521 8984000000 8984450507 394065408 394515915
+26955000000 26956351844 8985000000 8985450614 395065408 395516022
+26958000000 26959352097 8986000000 8986450699 396065408 396516107
+26961000000 26962352207 8987000000 8987450735 397065408 397516143
+26964000000 26965352386 8988000000 8988450795 398065408 398516203
+26967000000 26968352434 8989000000 8989450811 399065408 399516219
+26970000000 26971352688 8990000000 8990450896 400065408 400516304
+26973000000 26974352807 8991000000 8991450935 401065408 401516343
+26976000000 26977352978 8992000000 8992450992 402065408 402516400
+26979000000 26980353125 8993000000 8993451041 403065408 403516449
+26982000000 26983353278 8994000000 8994451092 404065408 404516500
+26985000000 26986353424 8995000000 8995451141 405065408 405516549
+26988000000 26989353568 8996000000 8996451189 406065408 406516597
+26991000000 26992353731 8997000000 8997451243 407065408 407516651
+26994000000 26995353883 8998000000 8998451294 408065408 408516702
+26997000000 26998354037 8999000000 8999451345 409065408 409516753
+27000000000 27001354157 9000000000 9000451385 410065408 410516793
+27003000000 27004354366 9001000000 9001451455 411065408 411516863
+27006000000 27007354496 9002000000 9002451498 412065408 412516906
+27009000000 27010354610 9003000000 9003451536 413065408 413516944
+27012000000 27013354771 9004000000 9004451590 414065408 414516998
+27015000000 27016354906 9005000000 9005451635 415065408 415517043
+27018000000 27019355049 9006000000 9006451683 416065408 416517091
+27021000000 27022355149 9007000000 9007451716 417065408 417517124
+27024000000 27025355383 9008000000 9008451794 418065408 418517202
+27027000000 27028355456 9009000000 9009451818 419065408 419517226
+27030000000 27031355577 9010000000 9010451859 420065408 420517267
+27033000000 27034355766 9011000000 9011451922 421065408 421517330
+27036000000 27037355920 9012000000 9012451973 422065408 422517381
+27039000000 27040356099 9013000000 9013452033 423065408 423517441
+27042000000 27043356245 9014000000 9014452081 424065408 424517489
+27045000000 27046356372 9015000000 9015452124 425065408 425517532
+27048000000 27049356546 9016000000 9016452182 426065408 426517590
+27051000000 27052356610 9017000000 9017452203 427065408 427517611
+27054000000 27055356817 9018000000 9018452272 428065408 428517680
+27057000000 27058356998 9019000000 9019452332 429065408 429517740
+27060000000 27061357147 9020000000 9020452382 430065408 430517790
+27063000000 27064357204 9021000000 9021452401 431065408 431517809
+27066000000 27067357400 9022000000 9022452466 432065408 432517874
+27069000000 27070357590 9023000000 9023452530 433065408 433517938
+27072000000 27073357735 9024000000 9024452578 434065408 434517986
+27075000000 27076357907 9025000000 9025452635 435065408 435518043
+27078000000 27079358040 9026000000 9026452680 436065408 436518088
+27081000000 27082358111 9027000000 9027452703 437065408 437518111
+27084000000 27085358337 9028000000 9028452779 438065408 438518187
+27087000000 27088358497 9029000000 9029452832 439065408 439518240
+27090000000 27091358629 9030000000 9030452876 440065408 440518284
+27093000000 27094358737 9031000000 9031452912 441065408 441518320
+27096000000 27097358948 9032000000 9032452982 442065408 442518390
+27099000000 27100359114 9033000000 9033453038 443065408 443518446
+27102000000 27103359225 9034000000 9034453075 444065408 444518483
+27105000000 27106359385 9035000000 9035453128 445065408 445518536
+27108000000 27109359497 9036000000 9036453165 446065408 446518573
+27111000000 27112359695 9037000000 9037453231 447065408 447518639
+27114000000 27115359785 9038000000 9038453261 448065408 448518669
+27117000000 27118360010 9039000000 9039453336 449065408 449518744
+27120000000 27121360142 9040000000 9040453380 450065408 450518788
+27123000000 27124360281 9041000000 9041453427 451065408 451518835
+27126000000 27127360332 9042000000 9042453444 452065408 452518852
+27129000000 27130360543 9043000000 9043453514 453065408 453518922
+27132000000 27133360752 9044000000 9044453584 454065408 454518992
+27135000000 27136360880 9045000000 9045453626 455065408 455519034
+27138000000 27139361023 9046000000 9046453674 456065408 456519082
+27141000000 27142361194 9047000000 9047453731 457065408 457519139
+27144000000 27145361291 9048000000 9048453763 458065408 458519171
+27147000000 27148361504 9049000000 9049453834 459065408 459519242
+27150000000 27151361634 9050000000 9050453878 460065408 460519286
+27153000000 27154361784 9051000000 9051453928 461065408 461519336
+27156000000 27157361944 9052000000 9052453981 462065408 462519389
+27159000000 27160362040 9053000000 9053454013 463065408 463519421
+27162000000 27163362228 9054000000 9054454076 464065408 464519484
+27165000000 27166362396 9055000000 9055454132 465065408 465519540
+27168000000 27169362532 9056000000 9056454177 466065408 466519585
+27171000000 27172362707 9057000000 9057454235 467065408 467519643
+27174000000 27175362829 9058000000 9058454276 468065408 468519684
+27177000000 27178362979 9059000000 9059454326 469065408 469519734
+27180000000 27181363127 9060000000 9060454375 470065408 470519783
+27183000000 27184363333 9061000000 9061454444 471065408 471519852
+27186000000 27187363447 9062000000 9062454482 472065408 472519890
+27189000000 27190363579 9063000000 9063454526 473065408 473519934
+27192000000 27193363753 9064000000 9064454584 474065408 474519992
+27195000000 27196363872 9065000000 9065454624 475065408 475520032
+27198000000 27199363996 9066000000 9066454665 476065408 476520073
+27201000000 27202364215 9067000000 9067454738 477065408 477520146
+27204000000 27205364351 9068000000 9068454783 478065408 478520191
+27207000000 27208364502 9069000000 9069454834 479065408 479520242
+27210000000 27211364662 9070000000 9070454887 480065408 480520295
+27213000000 27214364783 9071000000 9071454927 481065408 481520335
+27216000000 27217364864 9072000000 9072454954 482065408 482520362
+27219000000 27220365072 9073000000 9073455024 483065408 483520432
+27222000000 27223365227 9074000000 9074455075 484065408 484520483
+27225000000 27226365386 9075000000 9075455128 485065408 485520536
+27228000000 27229365538 9076000000 9076455179 486065408 486520587
+27231000000 27232365660 9077000000 9077455220 487065408 487520628
+27234000000 27235365838 9078000000 9078455279 488065408 488520687
+27237000000 27238365987 9079000000 9079455329 489065408 489520737
+27240000000 27241366115 9080000000 9080455371 490065408 490520779
+27243000000 27244366284 9081000000 9081455428 491065408 491520836
+27246000000 27247366404 9082000000 9082455468 492065408 492520876
+27249000000 27250366331 9083000000 9083455443 493065408 493520851
+27252000000 27253366654 9084000000 9084455551 494065408 494520959
+27255000000 27256366907 9085000000 9085455635 495065408 495521043
+27258000000 27259367017 9086000000 9086455672 496065408 496521080
+27261000000 27262367196 9087000000 9087455732 497065408 497521140
+27264000000 27265367244 9088000000 9088455748 498065408 498521156
+27267000000 27268367498 9089000000 9089455832 499065408 499521240
+27270000000 27271367617 9090000000 9090455872 500065408 500521280
+27273000000 27274367788 9091000000 9091455929 501065408 501521337
+27276000000 27277367935 9092000000 9092455978 502065408 502521386
+27279000000 27280368088 9093000000 9093456029 503065408 503521437
+27282000000 27283368234 9094000000 9094456078 504065408 504521486
+27285000000 27286368378 9095000000 9095456126 505065408 505521534
+27288000000 27289368541 9096000000 9096456180 506065408 506521588
+27291000000 27292368693 9097000000 9097456231 507065408 507521639
+27294000000 27295368847 9098000000 9098456282 508065408 508521690
+27297000000 27298368967 9099000000 9099456322 509065408 509521730
+27300000000 27301369176 9100000000 9100456392 510065408 510521800
+27303000000 27304369306 9101000000 9101456435 511065408 511521843
+27306000000 27307369420 9102000000 9102456473 512065408 512521881
+27309000000 27310369581 9103000000 9103456527 513065408 513521935
+27312000000 27313369716 9104000000 9104456572 514065408 514521980
+27315000000 27316369859 9105000000 9105456619 515065408 515522027
+27318000000 27319369959 9106000000 9106456653 516065408 516522061
+27321000000 27322370193 9107000000 9107456731 517065408 517522139
+27324000000 27325370266 9108000000 9108456755 518065408 518522163
+27327000000 27328370387 9109000000 9109456795 519065408 519522203
+27330000000 27331370576 9110000000 9110456858 520065408 520522266
+27333000000 27334370730 9111000000 9111456910 521065408 521522318
+27336000000 27337370909 9112000000 9112456969 522065408 522522377
+27339000000 27340371055 9113000000 9113457018 523065408 523522426
+27342000000 27343371182 9114000000 9114457060 524065408 524522468
+27345000000 27346371356 9115000000 9115457118 525065408 525522526
+27348000000 27349371420 9116000000 9116457140 526065408 526522548
+27351000000 27352371627 9117000000 9117457209 527065408 527522617
+27354000000 27355371808 9118000000 9118457269 528065408 528522677
+27357000000 27358371957 9119000000 9119457319 529065408 529522727
+27360000000 27361372014 9120000000 9120457338 530065408 530522746
+27363000000 27364372210 9121000000 9121457403 531065408 531522811
+27366000000 27367372400 9122000000 9122457466 532065408 532522874
+27369000000 27370372545 9123000000 9123457515 533065408 533522923
+27372000000 27373372717 9124000000 9124457572 534065408 534522980
+27375000000 27376372850 9125000000 9125457616 535065408 535523024
+27378000000 27379372921 9126000000 9126457640 536065408 536523048
+27381000000 27382373147 9127000000 9127457715 537065408 537523123
+27384000000 27385373307 9128000000 9128457769 538065408 538523177
+27387000000 27388373439 9129000000 9129457813 539065408 539523221
+27390000000 27391373547 9130000000 9130457849 540065408 540523257
+27393000000 27394373758 9131000000 9131457919 541065408 541523327
+27396000000 27397373924 9132000000 9132457974 542065408 542523382
+27399000000 27400374035 9133000000 9133458011 543065408 543523419
+27402000000 27403374195 9134000000 9134458065 544065408 544523473
+27405000000 27406374307 9135000000 9135458102 545065408 545523510
+27408000000 27409374505 9136000000 9136458168 546065408 546523576
+27411000000 27412374595 9137000000 9137458198 547065408 547523606
+27414000000 27415374820 9138000000 9138458273 548065408 548523681
+27417000000 27418374952 9139000000 9139458317 549065408 549523725
+27420000000 27421375091 9140000000 9140458363 550065408 550523771
+27423000000 27424375142 9141000000 9141458380 551065408 551523788
+27426000000 27427375353 9142000000 9142458451 552065408 552523859
+27429000000 27430375562 9143000000 9143458520 553065408 553523928
+27432000000 27433375690 9144000000 9144458563 554065408 554523971
+27435000000 27436375833 9145000000 9145458611 555065408 555524019
+27438000000 27439376004 9146000000 9146458668 556065408 556524076
+27441000000 27442376101 9147000000 9147458700 557065408 557524108
+27444000000 27445376314 9148000000 9148458771 558065408 558524179
+27447000000 27448376444 9149000000 9149458814 559065408 559524222
+27450000000 27451376594 9150000000 9150458864 560065408 560524272
+27453000000 27454376754 9151000000 9151458918 561065408 561524326
+27456000000 27457376850 9152000000 9152458950 562065408 562524358
+27459000000 27460377038 9153000000 9153459012 563065408 563524420
+27462000000 27463377206 9154000000 9154459068 564065408 564524476
+27465000000 27466377342 9155000000 9155459114 565065408 565524522
+27468000000 27469377517 9156000000 9156459172 566065408 566524580
+27471000000 27472377639 9157000000 9157459213 567065408 567524621
+27474000000 27475377789 9158000000 9158459263 568065408 568524671
+27477000000 27478377937 9159000000 9159459312 569065408 569524720
+27480000000 27481378143 9160000000 9160459381 570065408 570524789
+27483000000 27484378257 9161000000 9161459419 571065408 571524827
+27486000000 27487378389 9162000000 9162459463 572065408 572524871
+27489000000 27490378563 9163000000 9163459521 573065408 573524929
+27492000000 27493378682 9164000000 9164459560 574065408 574524968
+27495000000 27496378806 9165000000 9165459602 575065408 575525010
+27498000000 27499379025 9166000000 9166459675 576065408 576525083
+27501000000 27502379161 9167000000 9167459720 577065408 577525128
+27504000000 27505379312 9168000000 9168459770 578065408 578525178
+27507000000 27508379472 9169000000 9169459824 579065408 579525232
+27510000000 27511379593 9170000000 9170459864 580065408 580525272
+27513000000 27514379674 9171000000 9171459891 581065408 581525299
+27516000000 27517379882 9172000000 9172459960 582065408 582525368
+27519000000 27520380037 9173000000 9173460012 583065408 583525420
+27522000000 27523380196 9174000000 9174460065 584065408 584525473
+27525000000 27526380348 9175000000 9175460116 585065408 585525524
+27528000000 27529380470 9176000000 9176460156 586065408 586525564
+27531000000 27532380648 9177000000 9177460216 587065408 587525624
+27534000000 27535380797 9178000000 9178460265 588065408 588525673
+27537000000 27538380925 9179000000 9179460308 589065408 589525716
+27540000000 27541381094 9180000000 9180460364 590065408 590525772
+27543000000 27544381214 9181000000 9181460404 591065408 591525812
+27546000000 27547381141 9182000000 9182460380 592065408 592525788
+27549000000 27550381464 9183000000 9183460488 593065408 593525896
+27552000000 27553381717 9184000000 9184460572 594065408 594525980
+27555000000 27556381827 9185000000 9185460609 595065408 595526017
+27558000000 27559382006 9186000000 9186460668 596065408 596526076
+27561000000 27562382054 9187000000 9187460684 597065408 597526092
+27564000000 27565382308 9188000000 9188460769 598065408 598526177
+27567000000 27568382427 9189000000 9189460809 599065408 599526217
+27570000000 27571382598 9190000000 9190460866 600065408 600526274
+27573000000 27574382745 9191000000 9191460915 601065408 601526323
+27576000000 27577382898 9192000000 9192460966 602065408 602526374
+27579000000 27580383044 9193000000 9193461014 603065408 603526422
+27582000000 27583383188 9194000000 9194461062 604065408 604526470
+27585000000 27586383351 9195000000 9195461117 605065408 605526525
+27588000000 27589383503 9196000000 9196461167 606065408 606526575
+27591000000 27592383657 9197000000 9197461219 607065408 607526627
+27594000000 27595383777 9198000000 9198461259 608065408 608526667
+27597000000 27598383986 9199000000 9199461328 609065408 609526736
+27600000000 27601384116 9200000000 9200461372 610065408 610526780
+27603000000 27604384230 9201000000 9201461410 611065408 611526818
+27606000000 27607384391 9202000000 9202461463 612065408 612526871
+27609000000 27610384526 9203000000 9203461508 613065408 613526916
+27612000000 27613384669 9204000000 9204461556 614065408 614526964
+27615000000 27616384769 9205000000 9205461589 615065408 615526997
+27618000000 27619385003 9206000000 9206461667 616065408 616527075
+27621000000 27622385076 9207000000 9207461692 617065408 617527100
+27624000000 27625385197 9208000000 9208461732 618065408 618527140
+27627000000 27628385386 9209000000 9209461795 619065408 619527203
+27630000000 27631385540 9210000000 9210461846 620065408 620527254
+27633000000 27634385719 9211000000 9211461906 621065408 621527314
+27636000000 27637385865 9212000000 9212461955 622065408 622527363
+27639000000 27640385992 9213000000 9213461997 623065408 623527405
+27642000000 27643386166 9214000000 9214462055 624065408 624527463
+27645000000 27646386230 9215000000 9215462076 625065408 625527484
+27648000000 27649386437 9216000000 9216462145 626065408 626527553
+27651000000 27652386618 9217000000 9217462206 627065408 627527614
+27654000000 27655386767 9218000000 9218462255 628065408 628527663
+27657000000 27658386824 9219000000 9219462274 629065408 629527682
+27660000000 27661387020 9220000000 9220462340 630065408 630527748
+27663000000 27664387210 9221000000 9221462403 631065408 631527811
+27666000000 27667387355 9222000000 9222462451 632065408 632527859
+27669000000 27670387527 9223000000 9223462509 633065408 633527917
+27672000000 27673387660 9224000000 9224462553 634065408 634527961
+27675000000 27676387731 9225000000 9225462577 635065408 635527985
+27678000000 27679387957 9226000000 9226462652 636065408 636528060
+27681000000 27682388117 9227000000 9227462705 637065408 637528113
+27684000000 27685388249 9228000000 9228462749 638065408 638528157
+27687000000 27688388357 9229000000 9229462785 639065408 639528193
+27690000000 27691388568 9230000000 9230462856 640065408 640528264
+27693000000 27694388734 9231000000 9231462911 641065408 641528319
+27696000000 27697388845 9232000000 9232462948 642065408 642528356
+27699000000 27700389005 9233000000 9233463001 643065408 643528409
+27702000000 27703389117 9234000000 9234463039 644065408 644528447
+27705000000 27706389315 9235000000 9235463105 645065408 645528513
+27708000000 27709389405 9236000000 9236463135 646065408 646528543
+27711000000 27712389630 9237000000 9237463210 647065408 647528618
+27714000000 27715389762 9238000000 9238463254 648065408 648528662
+27717000000 27718389901 9239000000 9239463300 649065408 649528708
+27720000000 27721389952 9240000000 9240463317 650065408 650528725
+27723000000 27724390163 9241000000 9241463387 651065408 651528795
+27726000000 27727390372 9242000000 9242463457 652065408 652528865
+27729000000 27730390500 9243000000 9243463500 653065408 653528908
+27732000000 27733390643 9244000000 9244463547 654065408 654528955
+27735000000 27736390814 9245000000 9245463604 655065408 655529012
+27738000000 27739390911 9246000000 9246463637 656065408 656529045
+27741000000 27742391124 9247000000 9247463708 657065408 657529116
+27744000000 27745391254 9248000000 9248463751 658065408 658529159
+27747000000 27748391404 9249000000 9249463801 659065408 659529209
+27750000000 27751391564 9250000000 9250463854 660065408 660529262
+27753000000 27754391660 9251000000 9251463886 661065408 661529294
+27756000000 27757391848 9252000000 9252463949 662065408 662529357
+27759000000 27760392016 9253000000 9253464005 663065408 663529413
+27762000000 27763392152 9254000000 9254464050 664065408 664529458
+27765000000 27766392327 9255000000 9255464109 665065408 665529517
+27768000000 27769392449 9256000000 9256464149 666065408 666529557
+27771000000 27772392599 9257000000 9257464199 667065408 667529607
+27774000000 27775392747 9258000000 9258464249 668065408 668529657
+27777000000 27778392953 9259000000 9259464317 669065408 669529725
+27780000000 27781393067 9260000000 9260464355 670065408 670529763
+27783000000 27784393199 9261000000 9261464399 671065408 671529807
+27786000000 27787393373 9262000000 9262464457 672065408 672529865
+27789000000 27790393492 9263000000 9263464497 673065408 673529905
+27792000000 27793393616 9264000000 9264464538 674065408 674529946
+27795000000 27796393835 9265000000 9265464611 675065408 675530019
+27798000000 27799393971 9266000000 9266464657 676065408 676530065
+27801000000 27802394122 9267000000 9267464707 677065408 677530115
+27804000000 27805394282 9268000000 9268464760 678065408 678530168
+27807000000 27808394403 9269000000 9269464801 679065408 679530209
+27810000000 27811394484 9270000000 9270464828 680065408 680530236
+27813000000 27814394692 9271000000 9271464897 681065408 681530305
+27816000000 27817394847 9272000000 9272464949 682065408 682530357
+27819000000 27820395006 9273000000 9273465002 683065408 683530410
+27822000000 27823395158 9274000000 9274465052 684065408 684530460
+27825000000 27826395280 9275000000 9275465093 685065408 685530501
+27828000000 27829395458 9276000000 9276465152 686065408 686530560
+27831000000 27832395607 9277000000 9277465202 687065408 687530610
+27834000000 27835395735 9278000000 9278465245 688065408 688530653
+27837000000 27838395904 9279000000 9279465301 689065408 689530709
+27840000000 27841396024 9280000000 9280465341 690065408 690530749
+27843000000 27844395951 9281000000 9281465317 691065408 691530725
+27846000000 27847396274 9282000000 9282465424 692065408 692530832
+27849000000 27850396527 9283000000 9283465509 693065408 693530917
+27852000000 27853396637 9284000000 9284465545 694065408 694530953
+27855000000 27856396816 9285000000 9285465605 695065408 695531013
+27858000000 27859396864 9286000000 9286465621 696065408 696531029
+27861000000 27862397118 9287000000 9287465706 697065408 697531114
+27864000000 27865397237 9288000000 9288465745 698065408 698531153
+27867000000 27868397408 9289000000 9289465802 699065408 699531210
+27870000000 27871397555 9290000000 9290465851 700065408 700531259
+27873000000 27874397708 9291000000 9291465902 701065408 701531310
+27876000000 27877397854 9292000000 9292465951 702065408 702531359
+27879000000 27880397998 9293000000 9293465999 703065408 703531407
+27882000000 27883398161 9294000000 9294466053 704065408 704531461
+27885000000 27886398313 9295000000 9295466104 705065408 705531512
+27888000000 27889398467 9296000000 9296466155 706065408 706531563
+27891000000 27892398587 9297000000 9297466195 707065408 707531603
+27894000000 27895398796 9298000000 9298466265 708065408 708531673
+27897000000 27898398926 9299000000 9299466308 709065408 709531716
+27900000000 27901399040 9300000000 9300466346 710065408 710531754
+27903000000 27904399201 9301000000 9301466400 711065408 711531808
+27906000000 27907399336 9302000000 9302466445 712065408 712531853
+27909000000 27910399479 9303000000 9303466493 713065408 713531901
+27912000000 27913399579 9304000000 9304466526 714065408 714531934
+27915000000 27916399813 9305000000 9305466604 715065408 715532012
+27918000000 27919399886 9306000000 9306466628 716065408 716532036
+27921000000 27922400007 9307000000 9307466669 717065408 717532077
+27924000000 27925400196 9308000000 9308466732 718065408 718532140
+27927000000 27928400350 9309000000 9309466783 719065408 719532191
+27930000000 27931400529 9310000000 9310466843 720065408 720532251
+27933000000 27934400675 9311000000 9311466891 721065408 721532299
+27936000000 27937400802 9312000000 9312466934 722065408 722532342
+27939000000 27940400976 9313000000 9313466992 723065408 723532400
+27942000000 27943401040 9314000000 9314467013 724065408 724532421
+27945000000 27946401247 9315000000 9315467082 725065408 725532490
+27948000000 27949401428 9316000000 9316467142 726065408 726532550
+27951000000 27952401577 9317000000 9317467192 727065408 727532600
+27954000000 27955401634 9318000000 9318467211 728065408 728532619
+27957000000 27958401830 9319000000 9319467276 729065408 729532684
+27960000000 27961402020 9320000000 9320467340 730065408 730532748
+27963000000 27964402165 9321000000 9321467388 731065408 731532796
+27966000000 27967402337 9322000000 9322467445 732065408 732532853
+27969000000 27970402470 9323000000 9323467490 733065408 733532898
+27972000000 27973402541 9324000000 9324467513 734065408 734532921
+27975000000 27976402767 9325000000 9325467589 735065408 735532997
+27978000000 27979402927 9326000000 9326467642 736065408 736533050
+27981000000 27982403059 9327000000 9327467686 737065408 737533094
+27984000000 27985403167 9328000000 9328467722 738065408 738533130
+27987000000 27988403378 9329000000 9329467792 739065408 739533200
+27990000000 27991403544 9330000000 9330467848 740065408 740533256
+27993000000 27994403655 9331000000 9331467885 741065408 741533293
+27996000000 27997403815 9332000000 9332467938 742065408 742533346
+27999000000 28000403927 9333000000 9333467975 743065408 743533383
+28002000000 28003404125 9334000000 9334468041 744065408 744533449
+28005000000 28006404215 9335000000 9335468071 745065408 745533479
+28008000000 28009404440 9336000000 9336468146 746065408 746533554
+28011000000 28012404572 9337000000 9337468190 747065408 747533598
+28014000000 28015404711 9338000000 9338468237 748065408 748533645
+28017000000 28018404762 9339000000 9339468254 749065408 749533662
+28020000000 28021404973 9340000000 9340468324 750065408 750533732
+28023000000 28024405182 9341000000 9341468394 751065408 751533802
+28026000000 28027405310 9342000000 9342468436 752065408 752533844
+28029000000 28030405453 9343000000 9343468484 753065408 753533892
+28032000000 28033405624 9344000000 9344468541 754065408 754533949
+28035000000 28036405721 9345000000 9345468573 755065408 755533981
+28038000000 28039405934 9346000000 9346468644 756065408 756534052
+28041000000 28042406064 9347000000 9347468688 757065408 757534096
+28044000000 28045406214 9348000000 9348468738 758065408 758534146
+28047000000 28048406374 9349000000 9349468791 759065408 759534199
+28050000000 28051406470 9350000000 9350468823 760065408 760534231
+28053000000 28054406658 9351000000 9351468886 761065408 761534294
+28056000000 28057406826 9352000000 9352468942 762065408 762534350
+28059000000 28060406962 9353000000 9353468987 763065408 763534395
+28062000000 28063407137 9354000000 9354469045 764065408 764534453
+28065000000 28066407259 9355000000 9355469086 765065408 765534494
+28068000000 28069407409 9356000000 9356469136 766065408 766534544
+28071000000 28072407557 9357000000 9357469185 767065408 767534593
+28074000000 28075407763 9358000000 9358469254 768065408 768534662
+28077000000 28078407877 9359000000 9359469292 769065408 769534700
+28080000000 28081408009 9360000000 9360469336 770065408 770534744
+28083000000 28084408183 9361000000 9361469394 771065408 771534802
+28086000000 28087408302 9362000000 9362469434 772065408 772534842
+28089000000 28090408426 9363000000 9363469475 773065408 773534883
+28092000000 28093408645 9364000000 9364469548 774065408 774534956
+28095000000 28096408781 9365000000 9365469593 775065408 775535001
+28098000000 28099408932 9366000000 9366469644 776065408 776535052
+28101000000 28102409092 9367000000 9367469697 777065408 777535105
+28104000000 28105409213 9368000000 9368469737 778065408 778535145
+28107000000 28108409294 9369000000 9369469764 779065408 779535172
+28110000000 28111409502 9370000000 9370469834 780065408 780535242
+28113000000 28114409657 9371000000 9371469885 781065408 781535293
+28116000000 28117409816 9372000000 9372469938 782065408 782535346
+28119000000 28120409968 9373000000 9373469989 783065408 783535397
+28122000000 28123410090 9374000000 9374470030 784065408 784535438
+28125000000 28126410268 9375000000 9375470089 785065408 785535497
+28128000000 28129410417 9376000000 9376470139 786065408 786535547
+28131000000 28132410545 9377000000 9377470181 787065408 787535589
+28134000000 28135410714 9378000000 9378470238 788065408 788535646
+28137000000 28138410834 9379000000 9379470278 789065408 789535686
+28140000000 28141410761 9380000000 9380470253 790065408 790535661
+28143000000 28144411084 9381000000 9381470361 791065408 791535769
+28146000000 28147411337 9382000000 9382470445 792065408 792535853
+28149000000 28150411447 9383000000 9383470482 793065408 793535890
+28152000000 28153411626 9384000000 9384470542 794065408 794535950
+28155000000 28156411674 9385000000 9385470558 795065408 795535966
+28158000000 28159411928 9386000000 9386470642 796065408 796536050
+28161000000 28162412047 9387000000 9387470682 797065408 797536090
+28164000000 28165412218 9388000000 9388470739 798065408 798536147
+28167000000 28168412365 9389000000 9389470788 799065408 799536196
+28170000000 28171412518 9390000000 9390470839 800065408 800536247
+28173000000 28174412664 9391000000 9391470888 801065408 801536296
+28176000000 28177412808 9392000000 9392470936 802065408 802536344
+28179000000 28180412971 9393000000 9393470990 803065408 803536398
+28182000000 28183413123 9394000000 9394471041 804065408 804536449
+28185000000 28186413277 9395000000 9395471092 805065408 805536500
+28188000000 28189413397 9396000000 9396471132 806065408 806536540
+28191000000 28192413606 9397000000 9397471202 807065408 807536610
+28194000000 28195413736 9398000000 9398471245 808065408 808536653
+28197000000 28198413850 9399000000 9399471283 809065408 809536691
+28200000000 28201414011 9400000000 9400471337 810065408 810536745
+28203000000 28204414146 9401000000 9401471382 811065408 811536790
+28206000000 28207414289 9402000000 9402471429 812065408 812536837
+28209000000 28210414389 9403000000 9403471463 813065408 813536871
+28212000000 28213414623 9404000000 9404471541 814065408 814536949
+28215000000 28216414696 9405000000 9405471565 815065408 815536973
+28218000000 28219414817 9406000000 9406471605 816065408 816537013
+28221000000 28222415006 9407000000 9407471668 817065408 817537076
+28224000000 28225415160 9408000000 9408471720 818065408 818537128
+28227000000 28228415339 9409000000 9409471779 819065408 819537187
+28230000000 28231415485 9410000000 9410471828 820065408 820537236
+28233000000 28234415612 9411000000 9411471870 821065408 821537278
+28236000000 28237415786 9412000000 9412471928 822065408 822537336
+28239000000 28240415850 9413000000 9413471950 823065408 823537358
+28242000000 28243416057 9414000000 9414472019 824065408 824537427
+28245000000 28246416238 9415000000 9415472079 825065408 825537487
+28248000000 28249416387 9416000000 9416472129 826065408 826537537
+28251000000 28252416444 9417000000 9417472148 827065408 827537556
+28254000000 28255416640 9418000000 9418472213 828065408 828537621
+28257000000 28258416830 9419000000 9419472276 829065408 829537684
+28260000000 28261416975 9420000000 9420472325 830065408 830537733
+28263000000 28264417147 9421000000 9421472382 831065408 831537790
+28266000000 28267417280 9422000000 9422472426 832065408 832537834
+28269000000 28270417351 9423000000 9423472450 833065408 833537858
+28272000000 28273417577 9424000000 9424472525 834065408 834537933
+28275000000 28276417737 9425000000 9425472579 835065408 835537987
+28278000000 28279417869 9426000000 9426472623 836065408 836538031
+28281000000 28282417977 9427000000 9427472659 837065408 837538067
+28284000000 28285418188 9428000000 9428472729 838065408 838538137
+28287000000 28288418354 9429000000 9429472784 839065408 839538192
+28290000000 28291418465 9430000000 9430472821 840065408 840538229
+28293000000 28294418625 9431000000 9431472875 841065408 841538283
+28296000000 28297418737 9432000000 9432472912 842065408 842538320
+28299000000 28300418935 9433000000 9433472978 843065408 843538386
+28302000000 28303419025 9434000000 9434473008 844065408 844538416
+28305000000 28306419250 9435000000 9435473083 845065408 845538491
+28308000000 28309419382 9436000000 9436473127 846065408 846538535
+28311000000 28312419521 9437000000 9437473173 847065408 847538581
+28314000000 28315419572 9438000000 9438473190 848065408 848538598
+28317000000 28318419783 9439000000 9439473261 849065408 849538669
+28320000000 28321419992 9440000000 9440473330 850065408 850538738
+28323000000 28324420120 9441000000 9441473373 851065408 851538781
+28326000000 28327420263 9442000000 9442473421 852065408 852538829
+28329000000 28330420434 9443000000 9443473478 853065408 853538886
+28332000000 28333420531 9444000000 9444473510 854065408 854538918
+28335000000 28336420744 9445000000 9445473581 855065408 855538989
+28338000000 28339420874 9446000000 9446473624 856065408 856539032
+28341000000 28342421024 9447000000 9447473674 857065408 857539082
+28344000000 28345421184 9448000000 9448473728 858065408 858539136
+28347000000 28348421280 9449000000 9449473760 859065408 859539168
+28350000000 28351421468 9450000000 9450473822 860065408 860539230
+28353000000 28354421636 9451000000 9451473878 861065408 861539286
+28356000000 28357421772 9452000000 9452473924 862065408 862539332
+28359000000 28360421947 9453000000 9453473982 863065408 863539390
+28362000000 28363422069 9454000000 9454474023 864065408 864539431
+28365000000 28366422219 9455000000 9455474073 865065408 865539481
+28368000000 28369422367 9456000000 9456474122 866065408 866539530
+28371000000 28372422573 9457000000 9457474191 867065408 867539599
+28374000000 28375422687 9458000000 9458474229 868065408 868539637
+28377000000 28378422819 9459000000 9459474273 869065408 869539681
+28380000000 28381422993 9460000000 9460474331 870065408 870539739
+28383000000 28384423112 9461000000 9461474370 871065408 871539778
+28386000000 28387423236 9462000000 9462474412 872065408 872539820
+28389000000 28390423455 9463000000 9463474485 873065408 873539893
+28392000000 28393423591 9464000000 9464474530 874065408 874539938
+28395000000 28396423742 9465000000 9465474580 875065408 875539988
+28398000000 28399423902 9466000000 9466474634 876065408 876540042
+28401000000 28402424023 9467000000 9467474674 877065408 877540082
+28404000000 28405424104 9468000000 9468474701 878065408 878540109
+28407000000 28408424312 9469000000 9469474770 879065408 879540178
+28410000000 28411424467 9470000000 9470474822 880065408 880540230
+28413000000 28414424626 9471000000 9471474875 881065408 881540283
+28416000000 28417424778 9472000000 9472474926 882065408 882540334
+28419000000 28420424900 9473000000 9473474966 883065408 883540374
+28422000000 28423425078 9474000000 9474475026 884065408 884540434
+28425000000 28426425227 9475000000 9475475075 885065408 885540483
+28428000000 28429425355 9476000000 9476475118 886065408 886540526
+28431000000 28432425524 9477000000 9477475174 887065408 887540582
+28434000000 28435425644 9478000000 9478475214 888065408 888540622
+28437000000 28438425571 9479000000 9479475190 889065408 889540598
+28440000000 28441425894 9480000000 9480475298 890065408 890540706
+28443000000 28444426147 9481000000 9481475382 891065408 891540790
+28446000000 28447426257 9482000000 9482475419 892065408 892540827
+28449000000 28450426436 9483000000 9483475478 893065408 893540886
+28452000000 28453426484 9484000000 9484475494 894065408 894540902
+28455000000 28456426738 9485000000 9485475579 895065408 895540987
+28458000000 28459426857 9486000000 9486475619 896065408 896541027
+28461000000 28462427028 9487000000 9487475676 897065408 897541084
+28464000000 28465427175 9488000000 9488475725 898065408 898541133
+28467000000 28468427328 9489000000 9489475776 899065408 899541184
+28470000000 28471427474 9490000000 9490475824 900065408 900541232
+28473000000 28474427618 9491000000 9491475872 901065408 901541280
+28476000000 28477427781 9492000000 9492475927 902065408 902541335
+28479000000 28480427933 9493000000 9493475977 903065408 903541385
+28482000000 28483428087 9494000000 9494476029 904065408 904541437
+28485000000 28486428207 9495000000 9495476069 905065408 905541477
+28488000000 28489428416 9496000000 9496476138 906065408 906541546
+28491000000 28492428546 9497000000 9497476182 907065408 907541590
+28494000000 28495428660 9498000000 9498476220 908065408 908541628
+28497000000 28498428821 9499000000 9499476273 909065408 909541681
+28500000000 28501428956 9500000000 9500476318 910065408 910541726
+28503000000 28504429099 9501000000 9501476366 911065408 911541774
+28506000000 28507429199 9502000000 9502476399 912065408 912541807
+28509000000 28510429433 9503000000 9503476477 913065408 913541885
+28512000000 28513429506 9504000000 9504476502 914065408 914541910
+28515000000 28516429627 9505000000 9505476542 915065408 915541950
+28518000000 28519429816 9506000000 9506476605 916065408 916542013
+28521000000 28522429970 9507000000 9507476656 917065408 917542064
+28524000000 28525430149 9508000000 9508476716 918065408 918542124
+28527000000 28528430295 9509000000 9509476765 919065408 919542173
+28530000000 28531430422 9510000000 9510476807 920065408 920542215
+28533000000 28534430596 9511000000 9511476865 921065408 921542273
+28536000000 28537430660 9512000000 9512476886 922065408 922542294
+28539000000 28540430867 9513000000 9513476955 923065408 923542363
+28542000000 28543431048 9514000000 9514477016 924065408 924542424
+28545000000 28546431197 9515000000 9515477065 925065408 925542473
+28548000000 28549431254 9516000000 9516477084 926065408 926542492
+28551000000 28552431450 9517000000 9517477150 927065408 927542558
+28554000000 28555431640 9518000000 9518477213 928065408 928542621
+28557000000 28558431785 9519000000 9519477261 929065408 929542669
+28560000000 28561431957 9520000000 9520477319 930065408 930542727
+28563000000 28564432090 9521000000 9521477363 931065408 931542771
+28566000000 28567432161 9522000000 9522477387 932065408 932542795
+28569000000 28570432387 9523000000 9523477462 933065408 933542870
+28572000000 28573432547 9524000000 9524477515 934065408 934542923
+28575000000 28576432679 9525000000 9525477559 935065408 935542967
+28578000000 28579432787 9526000000 9526477595 936065408 936543003
+28581000000 28582432998 9527000000 9527477666 937065408 937543074
+28584000000 28585433164 9528000000 9528477721 938065408 938543129
+28587000000 28588433275 9529000000 9529477758 939065408 939543166
+28590000000 28591433435 9530000000 9530477811 940065408 940543219
+28593000000 28594433547 9531000000 9531477849 941065408 941543257
+28596000000 28597433745 9532000000 9532477915 942065408 942543323
+28599000000 28600433835 9533000000 9533477945 943065408 943543353
+28602000000 28603434060 9534000000 9534478020 944065408 944543428
+28605000000 28606434192 9535000000 9535478064 945065408 945543472
+28608000000 28609434331 9536000000 9536478110 946065408 946543518
+28611000000 28612434382 9537000000 9537478127 947065408 947543535
+28614000000 28615434593 9538000000 9538478197 948065408 948543605
+28617000000 28618434802 9539000000 9539478267 949065408 949543675
+28620000000 28621434930 9540000000 9540478310 950065408 950543718
+28623000000 28624435073 9541000000 9541478357 951065408 951543765
+28626000000 28627435244 9542000000 9542478414 952065408 952543822
+28629000000 28630435341 9543000000 9543478447 953065408 953543855
+28632000000 28633435554 9544000000 9544478518 954065408 954543926
+28635000000 28636435684 9545000000 9545478561 955065408 955543969
+28638000000 28639435834 9546000000 9546478611 956065408 956544019
+28641000000 28642435994 9547000000 9547478664 957065408 957544072
+28644000000 28645436090 9548000000 9548478696 958065408 958544104
+28647000000 28648436278 9549000000 9549478759 959065408 959544167
+28650000000 28651436446 9550000000 9550478815 960065408 960544223
+28653000000 28654436582 9551000000 9551478860 961065408 961544268
+28656000000 28657436757 9552000000 9552478919 962065408 962544327
+28659000000 28660436879 9553000000 9553478959 963065408 963544367
+28662000000 28663437029 9554000000 9554479009 964065408 964544417
+28665000000 28666437177 9555000000 9555479059 965065408 965544467
+28668000000 28669437383 9556000000 9556479127 966065408 966544535
+28671000000 28672437497 9557000000 9557479165 967065408 967544573
+28674000000 28675437629 9558000000 9558479209 968065408 968544617
+28677000000 28678437803 9559000000 9559479267 969065408 969544675
+28680000000 28681437922 9560000000 9560479307 970065408 970544715
+28683000000 28684438046 9561000000 9561479348 971065408 971544756
+28686000000 28687438265 9562000000 9562479421 972065408 972544829
+28689000000 28690438401 9563000000 9563479467 973065408 973544875
+28692000000 28693438552 9564000000 9564479517 974065408 974544925
+28695000000 28696438712 9565000000 9565479570 975065408 975544978
+28698000000 28699438833 9566000000 9566479611 976065408 976545019
+28701000000 28702438914 9567000000 9567479638 977065408 977545046
+28704000000 28705439122 9568000000 9568479707 978065408 978545115
+28707000000 28708439277 9569000000 9569479759 979065408 979545167
+28710000000 28711439436 9570000000 9570479812 980065408 980545220
+28713000000 28714439588 9571000000 9571479862 981065408 981545270
+28716000000 28717439710 9572000000 9572479903 982065408 982545311
+28719000000 28720439888 9573000000 9573479962 983065408 983545370
+28722000000 28723440037 9574000000 9574480012 984065408 984545420
+28725000000 28726440165 9575000000 9575480055 985065408 985545463
+28728000000 28729440334 9576000000 9576480111 986065408 986545519
+28731000000 28732440454 9577000000 9577480151 987065408 987545559
+28734000000 28735440381 9578000000 9578480127 988065408 988545535
+28737000000 28738440704 9579000000 9579480234 989065408 989545642
+28740000000 28741440957 9580000000 9580480319 990065408 990545727
+28743000000 28744441067 9581000000 9581480355 991065408 991545763
+28746000000 28747441246 9582000000 9582480415 992065408 992545823
+28749000000 28750441294 9583000000 9583480431 993065408 993545839
+28752000000 28753441548 9584000000 9584480516 994065408 994545924
+28755000000 28756441667 9585000000 9585480555 995065408 995545963
+28758000000 28759441838 9586000000 9586480612 996065408 996546020
+28761000000 28762441985 9587000000 9587480661 997065408 997546069
+28764000000 28765442138 9588000000 9588480712 998065408 998546120
+28767000000 28768442284 9589000000 9589480761 999065408 999546169
+28770000000 28771442428 9590000000 9590480809 1000065408 1000546217
+28773000000 28774442591 9591000000 9591480863 1001065408 1001546271
+28776000000 28777442743 9592000000 9592480914 1002065408 1002546322
+28779000000 28780442897 9593000000 9593480965 1003065408 1003546373
+28782000000 28783443017 9594000000 9594481005 1004065408 1004546413
+28785000000 28786443226 9595000000 9595481075 1005065408 1005546483
+28788000000 28789443356 9596000000 9596481118 1006065408 1006546526
+28791000000 28792443470 9597000000 9597481156 1007065408 1007546564
+28794000000 28795443631 9598000000 9598481210 1008065408 1008546618
+28797000000 28798443766 9599000000 9599481255 1009065408 1009546663
+28800000000 28801443909 9600000000 9600481303 1010065408 1010546711
+28803000000 28804444009 9601000000 9601481336 1011065408 1011546744
+28806000000 28807444243 9602000000 9602481414 1012065408 1012546822
+28809000000 28810444316 9603000000 9603481438 1013065408 1013546846
+28812000000 28813444437 9604000000 9604481479 1014065408 1014546887
+28815000000 28816444626 9605000000 9605481542 1015065408 1015546950
+28818000000 28819444780 9606000000 9606481593 1016065408 1016547001
+28821000000 28822444959 9607000000 9607481653 1017065408 1017547061
+28824000000 28825445105 9608000000 9608481701 1018065408 1018547109
+28827000000 28828445232 9609000000 9609481744 1019065408 1019547152
+28830000000 28831445406 9610000000 9610481802 1020065408 1020547210
+28833000000 28834445470 9611000000 9611481823 1021065408 1021547231
+28836000000 28837445677 9612000000 9612481892 1022065408 1022547300
+28839000000 28840445858 9613000000 9613481952 1023065408 1023547360
+28842000000 28843446007 9614000000 9614482002 1024065408 1024547410
+28845000000 28846446064 9615000000 9615482021 1025065408 1025547429
+28848000000 28849446260 9616000000 9616482086 1026065408 1026547494
+28851000000 28852446450 9617000000 9617482150 1027065408 1027547558
+28854000000 28855446595 9618000000 9618482198 1028065408 1028547606
+28857000000 28858446767 9619000000 9619482255 1029065408 1029547663
+28860000000 28861446900 9620000000 9620482300 1030065408 1030547708
+28863000000 28864446971 9621000000 9621482323 1031065408 1031547731
+28866000000 28867447197 9622000000 9622482399 1032065408 1032547807
+28869000000 28870447357 9623000000 9623482452 1033065408 1033547860
+28872000000 28873447489 9624000000 9624482496 1034065408 1034547904
+28875000000 28876447597 9625000000 9625482532 1035065408 1035547940
+28878000000 28879447808 9626000000 9626482602 1036065408 1036548010
+28881000000 28882447974 9627000000 9627482658 1037065408 1037548066
+28884000000 28885448085 9628000000 9628482695 1038065408 1038548103
+28887000000 28888448245 9629000000 9629482748 1039065408 1039548156
+28890000000 28891448357 9630000000 9630482785 1040065408 1040548193
+28893000000 28894448555 9631000000 9631482851 1041065408 1041548259
+28896000000 28897448645 9632000000 9632482881 1042065408 1042548289
+28899000000 28900448870 9633000000 9633482956 1043065408 1043548364
+28902000000 28903449002 9634000000 9634483000 1044065408 1044548408
+28905000000 28906449141 9635000000 9635483047 1045065408 1045548455
+28908000000 28909449192 9636000000 9636483064 1046065408 1046548472
+28911000000 28912449403 9637000000 9637483134 1047065408 1047548542
+28914000000 28915449612 9638000000 9638483204 1048065408 1048548612
+28917000000 28918449740 9639000000 9639483246 1049065408 1049548654
+28920000000 28921449883 9640000000 9640483294 1050065408 1050548702
+28923000000 28924450054 9641000000 9641483351 1051065408 1051548759
+28926000000 28927450151 9642000000 9642483383 1052065408 1052548791
+28929000000 28930450364 9643000000 9643483454 1053065408 1053548862
+28932000000 28933450494 9644000000 9644483498 1054065408 1054548906
+28935000000 28936450644 9645000000 9645483548 1055065408 1055548956
+28938000000 28939450804 9646000000 9646483601 1056065408 1056549009
+28941000000 28942450900 9647000000 9647483633 1057065408 1057549041
+28944000000 28945451088 9648000000 9648483696 1058065408 1058549104
+28947000000 28948451256 9649000000 9649483752 1059065408 1059549160
+28950000000 28951451392 9650000000 9650483797 1060065408 1060549205
+28953000000 28954451567 9651000000 9651483855 1061065408 1061549263
+28956000000 28957451689 9652000000 9652483896 1062065408 1062549304
+28959000000 28960451839 9653000000 9653483946 1063065408 1063549354
+28962000000 28963451987 9654000000 9654483995 1064065408 1064549403
+28965000000 28966452193 9655000000 9655484064 1065065408 1065549472
+28968000000 28969452307 9656000000 9656484102 1066065408 1066549510
+28971000000 28972452439 9657000000 9657484146 1067065408 1067549554
+28974000000 28975452613 9658000000 9658484204 1068065408 1068549612
+28977000000 28978452732 9659000000 9659484244 1069065408 1069549652
+28980000000 28981452856 9660000000 9660484285 1070065408 1070549693
+28983000000 28984453075 9661000000 9661484358 1071065408 1071549766
+28986000000 28987453211 9662000000 9662484403 1072065408 1072549811
+28989000000 28990453362 9663000000 9663484454 1073065408 1073549862
+28992000000 28993453522 9664000000 9664484507 1074065408 1074549915
+28995000000 28996453643 9665000000 9665484547 1075065408 1075549955
+28998000000 28999453724 9666000000 9666484574 1076065408 1076549982
+29001000000 29002453932 9667000000 9667484644 1077065408 1077550052
+29004000000 29005454087 9668000000 9668484695 1078065408 1078550103
+29007000000 29008454246 9669000000 9669484748 1079065408 1079550156
+29010000000 29011454398 9670000000 9670484799 1080065408 1080550207
+29013000000 29014454520 9671000000 9671484840 1081065408 1081550248
+29016000000 29017454698 9672000000 9672484899 1082065408 1082550307
+29019000000 29020454847 9673000000 9673484949 1083065408 1083550357
+29022000000 29023454975 9674000000 9674484991 1084065408 1084550399
+29025000000 29026455144 9675000000 9675485048 1085065408 1085550456
+29028000000 29029455264 9676000000 9676485088 1086065408 1086550496
+29031000000 29032455191 9677000000 9677485063 1087065408 1087550471
+29034000000 29035455514 9678000000 9678485171 1088065408 1088550579
+29037000000 29038455767 9679000000 9679485255 1089065408 1089550663
+29040000000 29041455877 9680000000 9680485292 1090065408 1090550700
+29043000000 29044456056 9681000000 9681485352 1091065408 1091550760
+29046000000 29047456104 9682000000 9682485368 1092065408 1092550776
+29049000000 29050456358 9683000000 9683485452 1093065408 1093550860
+29052000000 29053456477 9684000000 9684485492 1094065408 1094550900
+29055000000 29056456648 9685000000 9685485549 1095065408 1095550957
+29058000000 29059456795 9686000000 9686485598 1096065408 1096551006
+29061000000 29062456948 9687000000 9687485649 1097065408 1097551057
+29064000000 29065457094 9688000000 9688485698 1098065408 1098551106
+29067000000 29068457238 9689000000 9689485746 1099065408 1099551154
+29070000000 29071457401 9690000000 9690485800 1100065408 1100551208
+29073000000 29074457553 9691000000 9691485851 1101065408 1101551259
+29076000000 29077457707 9692000000 9692485902 1102065408 1102551310
+29079000000 29080457827 9693000000 9693485942 1103065408 1103551350
+29082000000 29083458036 9694000000 9694486012 1104065408 1104551420
+29085000000 29086458166 9695000000 9695486055 1105065408 1105551463
+29088000000 29089458280 9696000000 9696486093 1106065408 1106551501
+29091000000 29092458441 9697000000 9697486147 1107065408 1107551555
+29094000000 29095458576 9698000000 9698486192 1108065408 1108551600
+29097000000 29098458719 9699000000 9699486239 1109065408 1109551647
+29100000000 29101458819 9700000000 9700486273 1110065408 1110551681
+29103000000 29104459053 9701000000 9701486351 1111065408 1111551759
+29106000000 29107459126 9702000000 9702486375 1112065408 1112551783
+29109000000 29110459247 9703000000 9703486415 1113065408 1113551823
+29112000000 29113459436 9704000000 9704486478 1114065408 1114551886
+29115000000 29116459590 9705000000 9705486530 1115065408 1115551938
+29118000000 29119459769 9706000000 9706486589 1116065408 1116551997
+29121000000 29122459915 9707000000 9707486638 1117065408 1117552046
+29124000000 29125460042 9708000000 9708486680 1118065408 1118552088
+29127000000 29128460216 9709000000 9709486738 1119065408 1119552146
+29130000000 29131460280 9710000000 9710486760 1120065408 1120552168
+29133000000 29134460487 9711000000 9711486829 1121065408 1121552237
+29136000000 29137460668 9712000000 9712486889 1122065408 1122552297
+29139000000 29140460817 9713000000 9713486939 1123065408 1123552347
+29142000000 29143460874 9714000000 9714486958 1124065408 1124552366
+29145000000 29146461070 9715000000 9715487023 1125065408 1125552431
+29148000000 29149461260 9716000000 9716487086 1126065408 1126552494
+29151000000 29152461405 9717000000 9717487135 1127065408 1127552543
+29154000000 29155461577 9718000000 9718487192 1128065408 1128552600
+29157000000 29158461710 9719000000 9719487236 1129065408 1129552644
+29160000000 29161461781 9720000000 9720487260 1130065408 1130552668
+29163000000 29164462007 9721000000 9721487335 1131065408 1131552743
+29166000000 29167462167 9722000000 9722487389 1132065408 1132552797
+29169000000 29170462299 9723000000 9723487433 1133065408 1133552841
+29172000000 29173462407 9724000000 9724487469 1134065408 1134552877
+29175000000 29176462618 9725000000 9725487539 1135065408 1135552947
+29178000000 29179462784 9726000000 9726487594 1136065408 1136553002
+29181000000 29182462895 9727000000 9727487631 1137065408 1137553039
+29184000000 29185463055 9728000000 9728487685 1138065408 1138553093
+29187000000 29188463167 9729000000 9729487722 1139065408 1139553130
+29190000000 29191463365 9730000000 9730487788 1140065408 1140553196
+29193000000 29194463455 9731000000 9731487818 1141065408 1141553226
+29196000000 29197463680 9732000000 9732487893 1142065408 1142553301
+29199000000 29200463812 9733000000 9733487937 1143065408 1143553345
+29202000000 29203463951 9734000000 9734487983 1144065408 1144553391
+29205000000 29206464002 9735000000 9735488000 1145065408 1145553408
+29208000000 29209464213 9736000000 9736488071 1146065408 1146553479
+29211000000 29212464422 9737000000 9737488140 1147065408 1147553548
+29214000000 29215464550 9738000000 9738488183 1148065408 1148553591
+29217000000 29218464693 9739000000 9739488231 1149065408 1149553639
+29220000000 29221464864 9740000000 9740488288 1150065408 1150553696
+29223000000 29224464961 9741000000 9741488320 1151065408 1151553728
+29226000000 29227465174 9742000000 9742488391 1152065408 1152553799
+29229000000 29230465304 9743000000 9743488434 1153065408 1153553842
+29232000000 29233465454 9744000000 9744488484 1154065408 1154553892
+29235000000 29236465614 9745000000 9745488538 1155065408 1155553946
+29238000000 29239465710 9746000000 9746488570 1156065408 1156553978
+29241000000 29242465898 9747000000 9747488632 1157065408 1157554040
+29244000000 29245466066 9748000000 9748488688 1158065408 1158554096
+29247000000 29248466202 9749000000 9749488734 1159065408 1159554142
+29250000000 29251466377 9750000000 9750488792 1160065408 1160554200
+29253000000 29254466499 9751000000 9751488833 1161065408 1161554241
+29256000000 29257466649 9752000000 9752488883 1162065408 1162554291
+29259000000 29260466797 9753000000 9753488932 1163065408 1163554340
+29262000000 29263467003 9754000000 9754489001 1164065408 1164554409
+29265000000 29266467117 9755000000 9755489039 1165065408 1165554447
+29268000000 29269467249 9756000000 9756489083 1166065408 1166554491
+29271000000 29272467423 9757000000 9757489141 1167065408 1167554549
+29274000000 29275467542 9758000000 9758489180 1168065408 1168554588
+29277000000 29278467666 9759000000 9759489222 1169065408 1169554630
+29280000000 29281467885 9760000000 9760489295 1170065408 1170554703
+29283000000 29284468021 9761000000 9761489340 1171065408 1171554748
+29286000000 29287468172 9762000000 9762489390 1172065408 1172554798
+29289000000 29290468332 9763000000 9763489444 1173065408 1173554852
+29292000000 29293468453 9764000000 9764489484 1174065408 1174554892
+29295000000 29296468534 9765000000 9765489511 1175065408 1175554919
+29298000000 29299468742 9766000000 9766489580 1176065408 1176554988
+29301000000 29302468897 9767000000 9767489632 1177065408 1177555040
+29304000000 29305469056 9768000000 9768489685 1178065408 1178555093
+29307000000 29308469208 9769000000 9769489736 1179065408 1179555144
+29310000000 29311469330 9770000000 9770489776 1180065408 1180555184
+29313000000 29314469508 9771000000 9771489836 1181065408 1181555244
+29316000000 29317469657 9772000000 9772489885 1182065408 1182555293
+29319000000 29320469785 9773000000 9773489928 1183065408 1183555336
+29322000000 29323469954 9774000000 9774489984 1184065408 1184555392
+29325000000 29326470074 9775000000 9775490024 1185065408 1185555432
+29328000000 29329470001 9776000000 9776490000 1186065408 1186555408
+29331000000 29332470324 9777000000 9777490108 1187065408 1187555516
+29334000000 29335470577 9778000000 9778490192 1188065408 1188555600
+29337000000 29338470687 9779000000 9779490229 1189065408 1189555637
+29340000000 29341470866 9780000000 9780490288 1190065408 1190555696
+29343000000 29344470914 9781000000 9781490304 1191065408 1191555712
+29346000000 29347471168 9782000000 9782490389 1192065408 1192555797
+29349000000 29350471287 9783000000 9783490429 1193065408 1193555837
+29352000000 29353471458 9784000000 9784490486 1194065408 1194555894
+29355000000 29356471605 9785000000 9785490535 1195065408 1195555943
+29358000000 29359471758 9786000000 9786490586 1196065408 1196555994
+29361000000 29362471904 9787000000 9787490634 1197065408 1197556042
+29364000000 29365472048 9788000000 9788490682 1198065408 1198556090
+29367000000 29368472211 9789000000 9789490737 1199065408 1199556145
+29370000000 29371472363 9790000000 9790490787 1200065408 1200556195
+29373000000 29374472517 9791000000 9791490839 1201065408 1201556247
+29376000000 29377472637 9792000000 9792490879 1202065408 1202556287
+29379000000 29380472846 9793000000 9793490948 1203065408 1203556356
+29382000000 29383472976 9794000000 9794490992 1204065408 1204556400
+29385000000 29386473090 9795000000 9795491030 1205065408 1205556438
+29388000000 29389473251 9796000000 9796491083 1206065408 1206556491
+29391000000 29392473386 9797000000 9797491128 1207065408 1207556536
+29394000000 29395473529 9798000000 9798491176 1208065408 1208556584
+29397000000 29398473629 9799000000 9799491209 1209065408 1209556617
+29400000000 29401473863 9800000000 9800491287 1210065408 1210556695
+29403000000 29404473936 9801000000 9801491312 1211065408 1211556720
+29406000000 29407474057 9802000000 9802491352 1212065408 1212556760
+29409000000 29410474246 9803000000 9803491415 1213065408 1213556823
+29412000000 29413474400 9804000000 9804491466 1214065408 1214556874
+29415000000 29416474579 9805000000 9805491526 1215065408 1215556934
+29418000000 29419474725 9806000000 9806491575 1216065408 1216556983
+29421000000 29422474852 9807000000 9807491617 1217065408 1217557025
+29424000000 29425475026 9808000000 9808491675 1218065408 1218557083
+29427000000 29428475090 9809000000 9809491696 1219065408 1219557104
+29430000000 29431475297 9810000000 9810491765 1220065408 1220557173
+29433000000 29434475478 9811000000 9811491826 1221065408 1221557234
+29436000000 29437475627 9812000000 9812491875 1222065408 1222557283
+29439000000 29440475684 9813000000 9813491894 1223065408 1223557302
+29442000000 29443475880 9814000000 9814491960 1224065408 1224557368
+29445000000 29446476070 9815000000 9815492023 1225065408 1225557431
+29448000000 29449476215 9816000000 9816492071 1226065408 1226557479
+29451000000 29452476387 9817000000 9817492129 1227065408 1227557537
+29454000000 29455476520 9818000000 9818492173 1228065408 1228557581
+29457000000 29458476591 9819000000 9819492197 1229065408 1229557605
+29460000000 29461476817 9820000000 9820492272 1230065408 1230557680
+29463000000 29464476977 9821000000 9821492325 1231065408 1231557733
+29466000000 29467477109 9822000000 9822492369 1232065408 1232557777
+29469000000 29470477217 9823000000 9823492405 1233065408 1233557813
+29472000000 29473477428 9824000000 9824492476 1234065408 1234557884
+29475000000 29476477594 9825000000 9825492531 1235065408 1235557939
+29478000000 29479477705 9826000000 9826492568 1236065408 1236557976
+29481000000 29482477865 9827000000 9827492621 1237065408 1237558029
+29484000000 29485477977 9828000000 9828492659 1238065408 1238558067
+29487000000 29488478175 9829000000 9829492725 1239065408 1239558133
+29490000000 29491478265 9830000000 9830492755 1240065408 1240558163
+29493000000 29494478490 9831000000 9831492830 1241065408 1241558238
+29496000000 29497478622 9832000000 9832492874 1242065408 1242558282
+29499000000 29500478761 9833000000 9833492920 1243065408 1243558328
+29502000000 29503478812 9834000000 9834492937 1244065408 1244558345
+29505000000 29506479023 9835000000 9835493007 1245065408 1245558415
+29508000000 29509479232 9836000000 9836493077 1246065408 1246558485
+29511000000 29512479360 9837000000 9837493120 1247065408 1247558528
+29514000000 29515479503 9838000000 9838493167 1248065408 1248558575
+29517000000 29518479674 9839000000 9839493224 1249065408 1249558632
+29520000000 29521479771 9840000000 9840493257 1250065408 1250558665
+29523000000 29524479984 9841000000 9841493328 1251065408 1251558736
+29526000000 29527480114 9842000000 9842493371 1252065408 1252558779
+29529000000 29530480264 9843000000 9843493421 1253065408 1253558829
+29532000000 29533480424 9844000000 9844493474 1254065408 1254558882
+29535000000 29536480520 9845000000 9845493506 1255065408 1255558914
+29538000000 29539480708 9846000000 9846493569 1256065408 1256558977
+29541000000 29542480876 9847000000 9847493625 1257065408 1257559033
+29544000000 29545481012 9848000000 9848493670 1258065408 1258559078
+29547000000 29548481187 9849000000 9849493729 1259065408 1259559137
+29550000000 29551481309 9850000000 9850493769 1260065408 1260559177
+29553000000 29554481459 9851000000 9851493819 1261065408 1261559227
+29556000000 29557481607 9852000000 9852493869 1262065408 1262559277
+29559000000 29560481813 9853000000 9853493937 1263065408 1263559345
+29562000000 29563481927 9854000000 9854493975 1264065408 1264559383
+29565000000 29566482059 9855000000 9855494019 1265065408 1265559427
+29568000000 29569482233 9856000000 9856494077 1266065408 1266559485
+29571000000 29572482352 9857000000 9857494117 1267065408 1267559525
+29574000000 29575482476 9858000000 9858494158 1268065408 1268559566
+29577000000 29578482695 9859000000 9859494231 1269065408 1269559639
+29580000000 29581482831 9860000000 9860494277 1270065408 1270559685
+29583000000 29584482982 9861000000 9861494327 1271065408 1271559735
+29586000000 29587483142 9862000000 9862494380 1272065408 1272559788
+29589000000 29590483263 9863000000 9863494421 1273065408 1273559829
+29592000000 29593483344 9864000000 9864494448 1274065408 1274559856
+29595000000 29596483552 9865000000 9865494517 1275065408 1275559925
+29598000000 29599483707 9866000000 9866494569 1276065408 1276559977
+29601000000 29602483866 9867000000 9867494622 1277065408 1277560030
+29604000000 29605484018 9868000000 9868494672 1278065408 1278560080
+29607000000 29608484140 9869000000 9869494713 1279065408 1279560121
+29610000000 29611484318 9870000000 9870494772 1280065408 1280560180
+29613000000 29614484467 9871000000 9871494822 1281065408 1281560230
+29616000000 29617484595 9872000000 9872494865 1282065408 1282560273
+29619000000 29620484764 9873000000 9873494921 1283065408 1283560329
+29622000000 29623484884 9874000000 9874494961 1284065408 1284560369
+29625000000 29626484811 9875000000 9875494937 1285065408 1285560345
+29628000000 29629485134 9876000000 9876495044 1286065408 1286560452
+29631000000 29632485387 9877000000 9877495129 1287065408 1287560537
+29634000000 29635485497 9878000000 9878495165 1288065408 1288560573
+29637000000 29638485676 9879000000 9879495225 1289065408 1289560633
+29640000000 29641485724 9880000000 9880495241 1290065408 1290560649
+29643000000 29644485978 9881000000 9881495326 1291065408 1291560734
+29646000000 29647486097 9882000000 9882495365 1292065408 1292560773
+29649000000 29650486268 9883000000 9883495422 1293065408 1293560830
+29652000000 29653486415 9884000000 9884495471 1294065408 1294560879
+29655000000 29656486568 9885000000 9885495522 1295065408 1295560930
+29658000000 29659486714 9886000000 9886495571 1296065408 1296560979
+29661000000 29662486858 9887000000 9887495619 1297065408 1297561027
+29664000000 29665487021 9888000000 9888495673 1298065408 1298561081
+29667000000 29668487173 9889000000 9889495724 1299065408 1299561132
+29670000000 29671487327 9890000000 9890495775 1300065408 1300561183
+29673000000 29674487447 9891000000 9891495815 1301065408 1301561223
+29676000000 29677487656 9892000000 9892495885 1302065408 1302561293
+29679000000 29680487786 9893000000 9893495928 1303065408 1303561336
+29682000000 29683487900 9894000000 9894495966 1304065408 1304561374
+29685000000 29686488061 9895000000 9895496020 1305065408 1305561428
+29688000000 29689488196 9896000000 9896496065 1306065408 1306561473
+29691000000 29692488339 9897000000 9897496113 1307065408 1307561521
+29694000000 29695488439 9898000000 9898496146 1308065408 1308561554
+29697000000 29698488673 9899000000 9899496224 1309065408 1309561632
+29700000000 29701488746 9900000000 9900496248 1310065408 1310561656
+29703000000 29704488867 9901000000 9901496289 1311065408 1311561697
+29706000000 29707489056 9902000000 9902496352 1312065408 1312561760
+29709000000 29710489210 9903000000 9903496403 1313065408 1313561811
+29712000000 29713489389 9904000000 9904496463 1314065408 1314561871
+29715000000 29716489535 9905000000 9905496511 1315065408 1315561919
+29718000000 29719489662 9906000000 9906496554 1316065408 1316561962
+29721000000 29722489836 9907000000 9907496612 1317065408 1317562020
+29724000000 29725489900 9908000000 9908496633 1318065408 1318562041
+29727000000 29728490107 9909000000 9909496702 1319065408 1319562110
+29730000000 29731490288 9910000000 9910496762 1320065408 1320562170
+29733000000 29734490437 9911000000 9911496812 1321065408 1321562220
+29736000000 29737490494 9912000000 9912496831 1322065408 1322562239
+29739000000 29740490690 9913000000 9913496896 1323065408 1323562304
+29742000000 29743490880 9914000000 9914496960 1324065408 1324562368
+29745000000 29746491025 9915000000 9915497008 1325065408 1325562416
+29748000000 29749491197 9916000000 9916497065 1326065408 1326562473
+29751000000 29752491330 9917000000 9917497110 1327065408 1327562518
+29754000000 29755491401 9918000000 9918497133 1328065408 1328562541
+29757000000 29758491627 9919000000 9919497209 1329065408 1329562617
+29760000000 29761491787 9920000000 9920497262 1330065408 1330562670
+29763000000 29764491919 9921000000 9921497306 1331065408 1331562714
+29766000000 29767492027 9922000000 9922497342 1332065408 1332562750
+29769000000 29770492238 9923000000 9923497412 1333065408 1333562820
+29772000000 29773492404 9924000000 9924497468 1334065408 1334562876
+29775000000 29776492515 9925000000 9925497505 1335065408 1335562913
+29778000000 29779492675 9926000000 9926497558 1336065408 1336562966
+29781000000 29782492787 9927000000 9927497595 1337065408 1337563003
+29784000000 29785492985 9928000000 9928497661 1338065408 1338563069
+29787000000 29788493075 9929000000 9929497691 1339065408 1339563099
+29790000000 29791493300 9930000000 9930497766 1340065408 1340563174
+29793000000 29794493432 9931000000 9931497810 1341065408 1341563218
+29796000000 29797493571 9932000000 9932497857 1342065408 1342563265
+29799000000 29800493622 9933000000 9933497874 1343065408 1343563282
+29802000000 29803493833 9934000000 9934497944 1344065408 1344563352
+29805000000 29806494042 9935000000 9935498014 1345065408 1345563422
+29808000000 29809494170 9936000000 9936498056 1346065408 1346563464
+29811000000 29812494313 9937000000 9937498104 1347065408 1347563512
+29814000000 29815494484 9938000000 9938498161 1348065408 1348563569
+29817000000 29818494581 9939000000 9939498193 1349065408 1349563601
+29820000000 29821494794 9940000000 9940498264 1350065408 1350563672
+29823000000 29824494924 9941000000 9941498308 1351065408 1351563716
+29826000000 29827495074 9942000000 9942498358 1352065408 1352563766
+29829000000 29830495234 9943000000 9943498411 1353065408 1353563819
+29832000000 29833495330 9944000000 9944498443 1354065408 1354563851
+29835000000 29836495518 9945000000 9945498506 1355065408 1355563914
+29838000000 29839495686 9946000000 9946498562 1356065408 1356563970
+29841000000 29842495822 9947000000 9947498607 1357065408 1357564015
+29844000000 29845495997 9948000000 9948498665 1358065408 1358564073
+29847000000 29848496119 9949000000 9949498706 1359065408 1359564114
+29850000000 29851496269 9950000000 9950498756 1360065408 1360564164
+29853000000 29854496417 9951000000 9951498805 1361065408 1361564213
+29856000000 29857496623 9952000000 9952498874 1362065408 1362564282
+29859000000 29860496737 9953000000 9953498912 1363065408 1363564320
+29862000000 29863496869 9954000000 9954498956 1364065408 1364564364
+29865000000 29866497043 9955000000 9955499014 1365065408 1365564422
+29868000000 29869497162 9956000000 9956499054 1366065408 1366564462
+29871000000 29872497286 9957000000 9957499095 1367065408 1367564503
+29874000000 29875497505 9958000000 9958499168 1368065408 1368564576
+29877000000 29878497641 9959000000 9959499213 1369065408 1369564621
+29880000000 29881497792 9960000000 9960499264 1370065408 1370564672
+29883000000 29884497952 9961000000 9961499317 1371065408 1371564725
+29886000000 29887498073 9962000000 9962499357 1372065408 1372564765
+29889000000 29890498154 9963000000 9963499384 1373065408 1373564792
+29892000000 29893498362 9964000000 9964499454 1374065408 1374564862
+29895000000 29896498517 9965000000 9965499505 1375065408 1375564913
+29898000000 29899498676 9966000000 9966499558 1376065408 1376564966
+29901000000 29902498828 9967000000 9967499609 1377065408 1377565017
+29904000000 29905498950 9968000000 9968499650 1378065408 1378565058
+29907000000 29908499128 9969000000 9969499709 1379065408 1379565117
+29910000000 29911499277 9970000000 9970499759 1380065408 1380565167
+29913000000 29914499405 9971000000 9971499801 1381065408 1381565209
+29916000000 29917499574 9972000000 9972499858 1382065408 1382565266
+29919000000 29920499694 9973000000 9973499898 1383065408 1383565306
+29922000000 29923499621 9974000000 9974499873 1384065408 1384565281
+29925000000 29926499944 9975000000 9975499981 1385065408 1385565389
+29928000000 29929500197 9976000000 9976500065 1386065408 1386565473
+29931000000 29932500307 9977000000 9977500102 1387065408 1387565510
+29934000000 29935500486 9978000000 9978500162 1388065408 1388565570
+29937000000 29938500534 9979000000 9979500178 1389065408 1389565586
+29940000000 29941500788 9980000000 9980500262 1390065408 1390565670
+29943000000 29944500907 9981000000 9981500302 1391065408 1391565710
+29946000000 29947501078 9982000000 9982500359 1392065408 1392565767
+29949000000 29950501225 9983000000 9983500408 1393065408 1393565816
+29952000000 29953501378 9984000000 9984500459 1394065408 1394565867
+29955000000 29956501524 9985000000 9985500508 1395065408 1395565916
+29958000000 29959501668 9986000000 9986500556 1396065408 1396565964
+29961000000 29962501831 9987000000 9987500610 1397065408 1397566018
+29964000000 29965501983 9988000000 9988500661 1398065408 1398566069
+29967000000 29968502137 9989000000 9989500712 1399065408 1399566120
+29970000000 29971502257 9990000000 9990500752 1400065408 1400566160
+29973000000 29974502466 9991000000 9991500822 1401065408 1401566230
+29976000000 29977502596 9992000000 9992500865 1402065408 1402566273
+29979000000 29980502710 9993000000 9993500903 1403065408 1403566311
+29982000000 29983502871 9994000000 9994500957 1404065408 1404566365
+29985000000 29986503006 9995000000 9995501002 1405065408 1405566410
+29988000000 29989503149 9996000000 9996501049 1406065408 1406566457
+29991000000 29992503249 9997000000 9997501083 1407065408 1407566491
+29994000000 29995503483 9998000000 9998501161 1408065408 1408566569
+29997000000 29998503556 9999000000 9999501185 1409065408 1409566593
+30000000000 30001503677 10000000000 10000501225 1410065408 1410566633
+30003000000 30004503866 10001000000 10001501288 1411065408 1411566696
+30006000000 30007504020 10002000000 10002501340 1412065408 1412566748
+30009000000 30010504199 10003000000 10003501399 1413065408 1413566807
+30012000000 30013504345 10004000000 10004501448 1414065408 1414566856
+30015000000 30016504472 10005000000 10005501490 1415065408 1415566898
+30018000000 30019504646 10006000000 10006501548 1416065408 1416566956
+30021000000 30022504710 10007000000 10007501570 1417065408 1417566978
+30024000000 30025504917 10008000000 10008501639 1418065408 1418567047
+30027000000 30028505098 10009000000 10009501699 1419065408 1419567107
+30030000000 30031505247 10010000000 10010501749 1420065408 1420567157
+30033000000 30034505304 10011000000 10011501768 1421065408 1421567176
+30036000000 30037505500 10012000000 10012501833 1422065408 1422567241
+30039000000 30040505690 10013000000 10013501896 1423065408 1423567304
+30042000000 30043505835 10014000000 10014501945 1424065408 1424567353
+30045000000 30046506007 10015000000 10015502002 1425065408 1425567410
+30048000000 30049506140 10016000000 10016502046 1426065408 1426567454
+30051000000 30052506211 10017000000 10017502070 1427065408 1427567478
+30054000000 30055506437 10018000000 10018502145 1428065408 1428567553
+30057000000 30058506597 10019000000 10019502199 1429065408 1429567607
+30060000000 30061506729 10020000000 10020502243 1430065408 1430567651
+30063000000 30064506837 10021000000 10021502279 1431065408 1431567687
+30066000000 30067507048 10022000000 10022502349 1432065408 1432567757
+30069000000 30070507214 10023000000 10023502404 1433065408 1433567812
+30072000000 30073507325 10024000000 10024502441 1434065408 1434567849
+30075000000 30076507485 10025000000 10025502495 1435065408 1435567903
+30078000000 30079507597 10026000000 10026502532 1436065408 1436567940
+30081000000 30082507795 10027000000 10027502598 1437065408 1437568006
+30084000000 30085507885 10028000000 10028502628 1438065408 1438568036
+30087000000 30088508110 10029000000 10029502703 1439065408 1439568111
+30090000000 30091508242 10030000000 10030502747 1440065408 1440568155
+30093000000 30094508381 10031000000 10031502793 1441065408 1441568201
+30096000000 30097508432 10032000000 10032502810 1442065408 1442568218
+30099000000 30100508643 10033000000 10033502881 1443065408 1443568289
+30102000000 30103508852 10034000000 10034502950 1444065408 1444568358
+30105000000 30106508980 10035000000 10035502993 1445065408 1445568401
+30108000000 30109509123 10036000000 10036503041 1446065408 1446568449
+30111000000 30112509294 10037000000 10037503098 1447065408 1447568506
+30114000000 30115509391 10038000000 10038503130 1448065408 1448568538
+30117000000 30118509604 10039000000 10039503201 1449065408 1449568609
+30120000000 30121509734 10040000000 10040503244 1450065408 1450568652
+30123000000 30124509884 10041000000 10041503294 1451065408 1451568702
+30126000000 30127510044 10042000000 10042503348 1452065408 1452568756
+30129000000 30130510140 10043000000 10043503380 1453065408 1453568788
+30132000000 30133510328 10044000000 10044503442 1454065408 1454568850
+30135000000 30136510496 10045000000 10045503498 1455065408 1455568906
+30138000000 30139510632 10046000000 10046503544 1456065408 1456568952
+30141000000 30142510807 10047000000 10047503602 1457065408 1457569010
+30144000000 30145510929 10048000000 10048503643 1458065408 1458569051
+30147000000 30148511079 10049000000 10049503693 1459065408 1459569101
+30150000000 30151511227 10050000000 10050503742 1460065408 1460569150
+30153000000 30154511433 10051000000 10051503811 1461065408 1461569219
+30156000000 30157511547 10052000000 10052503849 1462065408 1462569257
+30159000000 30160511679 10053000000 10053503893 1463065408 1463569301
+30162000000 30163511853 10054000000 10054503951 1464065408 1464569359
+30165000000 30166511972 10055000000 10055503990 1465065408 1465569398
+30168000000 30169512096 10056000000 10056504032 1466065408 1466569440
+30171000000 30172512315 10057000000 10057504105 1467065408 1467569513
+30174000000 30175512451 10058000000 10058504150 1468065408 1468569558
+30177000000 30178512602 10059000000 10059504200 1469065408 1469569608
+30180000000 30181512762 10060000000 10060504254 1470065408 1470569662
+30183000000 30184512883 10061000000 10061504294 1471065408 1471569702
+30186000000 30187512964 10062000000 10062504321 1472065408 1472569729
+30189000000 30190513172 10063000000 10063504390 1473065408 1473569798
+30192000000 30193513327 10064000000 10064504442 1474065408 1474569850
+30195000000 30196513486 10065000000 10065504495 1475065408 1475569903
+30198000000 30199513638 10066000000 10066504546 1476065408 1476569954
+30201000000 30202513760 10067000000 10067504586 1477065408 1477569994
+30204000000 30205513938 10068000000 10068504646 1478065408 1478570054
+30207000000 30208514087 10069000000 10069504695 1479065408 1479570103
+30210000000 30211514215 10070000000 10070504738 1480065408 1480570146
+30213000000 30214514384 10071000000 10071504794 1481065408 1481570202
+30216000000 30217514504 10072000000 10072504834 1482065408 1482570242
+30219000000 30220514431 10073000000 10073504810 1483065408 1483570218
+30222000000 30223514754 10074000000 10074504918 1484065408 1484570326
+30225000000 30226515007 10075000000 10075505002 1485065408 1485570410
+30228000000 30229515117 10076000000 10076505039 1486065408 1486570447
+30231000000 30232515296 10077000000 10077505098 1487065408 1487570506
+30234000000 30235515344 10078000000 10078505114 1488065408 1488570522
+30237000000 30238515598 10079000000 10079505199 1489065408 1489570607
+30240000000 30241515717 10080000000 10080505239 1490065408 1490570647
+30243000000 30244515888 10081000000 10081505296 1491065408 1491570704
+30246000000 30247516035 10082000000 10082505345 1492065408 1492570753
+30249000000 30250516188 10083000000 10083505396 1493065408 1493570804
+30252000000 30253516334 10084000000 10084505444 1494065408 1494570852
+30255000000 30256516478 10085000000 10085505492 1495065408 1495570900
+30258000000 30259516641 10086000000 10086505547 1496065408 1496570955
+30261000000 30262516793 10087000000 10087505597 1497065408 1497571005
+30264000000 30265516947 10088000000 10088505649 1498065408 1498571057
+30267000000 30268517067 10089000000 10089505689 1499065408 1499571097
+30270000000 30271517276 10090000000 10090505758 1500065408 1500571166
+30273000000 30274517406 10091000000 10091505802 1501065408 1501571210
+30276000000 30277517520 10092000000 10092505840 1502065408 1502571248
+30279000000 30280517681 10093000000 10093505893 1503065408 1503571301
+30282000000 30283517816 10094000000 10094505938 1504065408 1504571346
+30285000000 30286517959 10095000000 10095505986 1505065408 1505571394
+30288000000 30289518059 10096000000 10096506019 1506065408 1506571427
+30291000000 30292518293 10097000000 10097506097 1507065408 1507571505
+30294000000 30295518366 10098000000 10098506122 1508065408 1508571530
+30297000000 30298518487 10099000000 10099506162 1509065408 1509571570
+30300000000 30301518676 10100000000 10100506225 1510065408 1510571633
+30303000000 30304518830 10101000000 10101506276 1511065408 1511571684
+30306000000 30307519009 10102000000 10102506336 1512065408 1512571744
+30309000000 30310519155 10103000000 10103506385 1513065408 1513571793
+30312000000 30313519282 10104000000 10104506427 1514065408 1514571835
+30315000000 30316519456 10105000000 10105506485 1515065408 1515571893
+30318000000 30319519520 10106000000 10106506506 1516065408 1516571914
+30321000000 30322519727 10107000000 10107506575 1517065408 1517571983
+30324000000 30325519908 10108000000 10108506636 1518065408 1518572044
+30327000000 30328520057 10109000000 10109506685 1519065408 1519572093
+30330000000 30331520114 10110000000 10110506704 1520065408 1520572112
+30333000000 30334520310 10111000000 10111506770 1521065408 1521572178
+30336000000 30337520500 10112000000 10112506833 1522065408 1522572241
+30339000000 30340520645 10113000000 10113506881 1523065408 1523572289
+30342000000 30343520817 10114000000 10114506939 1524065408 1524572347
+30345000000 30346520950 10115000000 10115506983 1525065408 1525572391
+30348000000 30349521021 10116000000 10116507007 1526065408 1526572415
+30351000000 30352521247 10117000000 10117507082 1527065408 1527572490
+30354000000 30355521407 10118000000 10118507135 1528065408 1528572543
+30357000000 30358521539 10119000000 10119507179 1529065408 1529572587
+30360000000 30361521647 10120000000 10120507215 1530065408 1530572623
+30363000000 30364521858 10121000000 10121507286 1531065408 1531572694
+30366000000 30367522024 10122000000 10122507341 1532065408 1532572749
+30369000000 30370522135 10123000000 10123507378 1533065408 1533572786
+30372000000 30373522295 10124000000 10124507431 1534065408 1534572839
+30375000000 30376522407 10125000000 10125507469 1535065408 1535572877
+30378000000 30379522605 10126000000 10126507535 1536065408 1536572943
+30381000000 30382522695 10127000000 10127507565 1537065408 1537572973
+30384000000 30385522920 10128000000 10128507640 1538065408 1538573048
+30387000000 30388523052 10129000000 10129507684 1539065408 1539573092
+30390000000 30391523191 10130000000 10130507730 1540065408 1540573138
+30393000000 30394523242 10131000000 10131507747 1541065408 1541573155
+30396000000 30397523453 10132000000 10132507817 1542065408 1542573225
+30399000000 30400523662 10133000000 10133507887 1543065408 1543573295
+30402000000 30403523790 10134000000 10134507930 1544065408 1544573338
+30405000000 30406523933 10135000000 10135507977 1545065408 1545573385
+30408000000 30409524104 10136000000 10136508034 1546065408 1546573442
+30411000000 30412524201 10137000000 10137508067 1547065408 1547573475
+30414000000 30415524414 10138000000 10138508138 1548065408 1548573546
+30417000000 30418524544 10139000000 10139508181 1549065408 1549573589
+30420000000 30421524694 10140000000 10140508231 1550065408 1550573639
+30423000000 30424524854 10141000000 10141508284 1551065408 1551573692
+30426000000 30427524950 10142000000 10142508316 1552065408 1552573724
+30429000000 30430525138 10143000000 10143508379 1553065408 1553573787
+30432000000 30433525306 10144000000 10144508435 1554065408 1554573843
+30435000000 30436525442 10145000000 10145508480 1555065408 1555573888
+30438000000 30439525617 10146000000 10146508539 1556065408 1556573947
+30441000000 30442525739 10147000000 10147508579 1557065408 1557573987
+30444000000 30445525889 10148000000 10148508629 1558065408 1558574037
+30447000000 30448526037 10149000000 10149508679 1559065408 1559574087
+30450000000 30451526243 10150000000 10150508747 1560065408 1560574155
+30453000000 30454526357 10151000000 10151508785 1561065408 1561574193
+30456000000 30457526489 10152000000 10152508829 1562065408 1562574237
+30459000000 30460526663 10153000000 10153508887 1563065408 1563574295
+30462000000 30463526782 10154000000 10154508927 1564065408 1564574335
+30465000000 30466526906 10155000000 10155508968 1565065408 1565574376
+30468000000 30469527125 10156000000 10156509041 1566065408 1566574449
+30471000000 30472527261 10157000000 10157509087 1567065408 1567574495
+30474000000 30475527412 10158000000 10158509137 1568065408 1568574545
+30477000000 30478527572 10159000000 10159509190 1569065408 1569574598
+30480000000 30481527693 10160000000 10160509231 1570065408 1570574639
+30483000000 30484527774 10161000000 10161509258 1571065408 1571574666
+30486000000 30487527982 10162000000 10162509327 1572065408 1572574735
+30489000000 30490528137 10163000000 10163509379 1573065408 1573574787
+30492000000 30493528296 10164000000 10164509432 1574065408 1574574840
+30495000000 30496528448 10165000000 10165509482 1575065408 1575574890
+30498000000 30499528570 10166000000 10166509523 1576065408 1576574931
+30501000000 30502528748 10167000000 10167509582 1577065408 1577574990
+30504000000 30505528897 10168000000 10168509632 1578065408 1578575040
+30507000000 30508529025 10169000000 10169509675 1579065408 1579575083
+30510000000 30511529194 10170000000 10170509731 1580065408 1580575139
+30513000000 30514529314 10171000000 10171509771 1581065408 1581575179
+30516000000 30517529241 10172000000 10172509747 1582065408 1582575155
+30519000000 30520529564 10173000000 10173509854 1583065408 1583575262
+30522000000 30523529817 10174000000 10174509939 1584065408 1584575347
+30525000000 30526529927 10175000000 10175509975 1585065408 1585575383
+30528000000 30529530106 10176000000 10176510035 1586065408 1586575443
+30531000000 30532530154 10177000000 10177510051 1587065408 1587575459
+30534000000 30535530408 10178000000 10178510136 1588065408 1588575544
+30537000000 30538530527 10179000000 10179510175 1589065408 1589575583
+30540000000 30541530698 10180000000 10180510232 1590065408 1590575640
+30543000000 30544530845 10181000000 10181510281 1591065408 1591575689
+30546000000 30547530998 10182000000 10182510332 1592065408 1592575740
+30549000000 30550531144 10183000000 10183510381 1593065408 1593575789
+30552000000 30553531288 10184000000 10184510429 1594065408 1594575837
+30555000000 30556531451 10185000000 10185510483 1595065408 1595575891
+30558000000 30559531603 10186000000 10186510534 1596065408 1596575942
+30561000000 30562531757 10187000000 10187510585 1597065408 1597575993
+30564000000 30565531877 10188000000 10188510625 1598065408 1598576033
+30567000000 30568532086 10189000000 10189510695 1599065408 1599576103
+30570000000 30571532216 10190000000 10190510738 1600065408 1600576146
+30573000000 30574532330 10191000000 10191510776 1601065408 1601576184
+30576000000 30577532491 10192000000 10192510830 1602065408 1602576238
+30579000000 30580532626 10193000000 10193510875 1603065408 1603576283
+30582000000 30583532769 10194000000 10194510923 1604065408 1604576331
+30585000000 30586532869 10195000000 10195510956 1605065408 1605576364
+30588000000 30589533103 10196000000 10196511034 1606065408 1606576442
+30591000000 30592533176 10197000000 10197511058 1607065408 1607576466
+30594000000 30595533297 10198000000 10198511099 1608065408 1608576507
+30597000000 30598533486 10199000000 10199511162 1609065408 1609576570
+30600000000 30601533640 10200000000 10200511213 1610065408 1610576621
+30603000000 30604533819 10201000000 10201511273 1611065408 1611576681
+30606000000 30607533965 10202000000 10202511321 1612065408 1612576729
+30609000000 30610534092 10203000000 10203511364 1613065408 1613576772
+30612000000 30613534266 10204000000 10204511422 1614065408 1614576830
+30615000000 30616534330 10205000000 10205511443 1615065408 1615576851
+30618000000 30619534537 10206000000 10206511512 1616065408 1616576920
+30621000000 30622534718 10207000000 10207511572 1617065408 1617576980
+30624000000 30625534867 10208000000 10208511622 1618065408 1618577030
+30627000000 30628534924 10209000000 10209511641 1619065408 1619577049
+30630000000 30631535120 10210000000 10210511706 1620065408 1620577114
+30633000000 30634535310 10211000000 10211511770 1621065408 1621577178
+30636000000 30637535455 10212000000 10212511818 1622065408 1622577226
+30639000000 30640535627 10213000000 10213511875 1623065408 1623577283
+30642000000 30643535760 10214000000 10214511920 1624065408 1624577328
+30645000000 30646535831 10215000000 10215511943 1625065408 1625577351
+30648000000 30649536057 10216000000 10216512019 1626065408 1626577427
+30651000000 30652536217 10217000000 10217512072 1627065408 1627577480
+30654000000 30655536349 10218000000 10218512116 1628065408 1628577524
+30657000000 30658536457 10219000000 10219512152 1629065408 1629577560
+30660000000 30661536668 10220000000 10220512222 1630065408 1630577630
+30663000000 30664536834 10221000000 10221512278 1631065408 1631577686
+30666000000 30667536945 10222000000 10222512315 1632065408 1632577723
+30669000000 30670537105 10223000000 10223512368 1633065408 1633577776
+30672000000 30673537217 10224000000 10224512405 1634065408 1634577813
+30675000000 30676537415 10225000000 10225512471 1635065408 1635577879
+30678000000 30679537505 10226000000 10226512501 1636065408 1636577909
+30681000000 30682537730 10227000000 10227512576 1637065408 1637577984
+30684000000 30685537862 10228000000 10228512620 1638065408 1638578028
+30687000000 30688538001 10229000000 10229512667 1639065408 1639578075
+30690000000 30691538052 10230000000 10230512684 1640065408 1640578092
+30693000000 30694538263 10231000000 10231512754 1641065408 1641578162
+30696000000 30697538472 10232000000 10232512824 1642065408 1642578232
+30699000000 30700538600 10233000000 10233512866 1643065408 1643578274
+30702000000 30703538743 10234000000 10234512914 1644065408 1644578322
+30705000000 30706538914 10235000000 10235512971 1645065408 1645578379
+30708000000 30709539011 10236000000 10236513003 1646065408 1646578411
+30711000000 30712539224 10237000000 10237513074 1647065408 1647578482
+30714000000 30715539354 10238000000 10238513118 1648065408 1648578526
+30717000000 30718539504 10239000000 10239513168 1649065408 1649578576
+30720000000 30721539664 10240000000 10240513221 1650065408 1650578629
+30723000000 30724539760 10241000000 10241513253 1651065408 1651578661
+30726000000 30727539948 10242000000 10242513316 1652065408 1652578724
+30729000000 30730540116 10243000000 10243513372 1653065408 1653578780
+30732000000 30733540252 10244000000 10244513417 1654065408 1654578825
+30735000000 30736540427 10245000000 10245513475 1655065408 1655578883
+30738000000 30739540549 10246000000 10246513516 1656065408 1656578924
+30741000000 30742540699 10247000000 10247513566 1657065408 1657578974
+30744000000 30745540847 10248000000 10248513615 1658065408 1658579023
+30747000000 30748541053 10249000000 10249513684 1659065408 1659579092
+30750000000 30751541167 10250000000 10250513722 1660065408 1660579130
+30753000000 30754541299 10251000000 10251513766 1661065408 1661579174
+30756000000 30757541473 10252000000 10252513824 1662065408 1662579232
+30759000000 30760541592 10253000000 10253513864 1663065408 1663579272
+30762000000 30763541716 10254000000 10254513905 1664065408 1664579313
+30765000000 30766541935 10255000000 10255513978 1665065408 1665579386
+30768000000 30769542071 10256000000 10256514023 1666065408 1666579431
+30771000000 30772542222 10257000000 10257514074 1667065408 1667579482
+30774000000 30775542382 10258000000 10258514127 1668065408 1668579535
+30777000000 30778542503 10259000000 10259514167 1669065408 1669579575
+30780000000 30781542584 10260000000 10260514194 1670065408 1670579602
+30783000000 30784542792 10261000000 10261514264 1671065408 1671579672
+30786000000 30787542947 10262000000 10262514315 1672065408 1672579723
+30789000000 30790543106 10263000000 10263514368 1673065408 1673579776
+30792000000 30793543258 10264000000 10264514419 1674065408 1674579827
+30795000000 30796543380 10265000000 10265514460 1675065408 1675579868
+30798000000 30799543558 10266000000 10266514519 1676065408 1676579927
+30801000000 30802543707 10267000000 10267514569 1677065408 1677579977
+30804000000 30805543835 10268000000 10268514611 1678065408 1678580019
+30807000000 30808544004 10269000000 10269514668 1679065408 1679580076
+30810000000 30811544124 10270000000 10270514708 1680065408 1680580116
+30813000000 30814544051 10271000000 10271514683 1681065408 1681580091
+30816000000 30817544374 10272000000 10272514791 1682065408 1682580199
+30819000000 30820544627 10273000000 10273514875 1683065408 1683580283
+30822000000 30823544737 10274000000 10274514912 1684065408 1684580320
+30825000000 30826544916 10275000000 10275514972 1685065408 1685580380
+30828000000 30829544964 10276000000 10276514988 1686065408 1686580396
+30831000000 30832545218 10277000000 10277515072 1687065408 1687580480
+30834000000 30835545337 10278000000 10278515112 1688065408 1688580520
+30837000000 30838545508 10279000000 10279515169 1689065408 1689580577
+30840000000 30841545655 10280000000 10280515218 1690065408 1690580626
+30843000000 30844545808 10281000000 10281515269 1691065408 1691580677
+30846000000 30847545954 10282000000 10282515318 1692065408 1692580726
+30849000000 30850546098 10283000000 10283515366 1693065408 1693580774
+30852000000 30853546261 10284000000 10284515420 1694065408 1694580828
+30855000000 30856546413 10285000000 10285515471 1695065408 1695580879
+30858000000 30859546567 10286000000 10286515522 1696065408 1696580930
+30861000000 30862546687 10287000000 10287515562 1697065408 1697580970
+30864000000 30865546896 10288000000 10288515632 1698065408 1698581040
+30867000000 30868547026 10289000000 10289515675 1699065408 1699581083
+30870000000 30871547140 10290000000 10290515713 1700065408 1700581121
+30873000000 30874547301 10291000000 10291515767 1701065408 1701581175
+30876000000 30877547436 10292000000 10292515812 1702065408 1702581220
+30879000000 30880547579 10293000000 10293515859 1703065408 1703581267
+30882000000 30883547679 10294000000 10294515893 1704065408 1704581301
+30885000000 30886547913 10295000000 10295515971 1705065408 1705581379
+30888000000 30889547986 10296000000 10296515995 1706065408 1706581403
+30891000000 30892548107 10297000000 10297516035 1707065408 1707581443
+30894000000 30895548296 10298000000 10298516098 1708065408 1708581506
+30897000000 30898548450 10299000000 10299516150 1709065408 1709581558
+30900000000 30901548629 10300000000 10300516209 1710065408 1710581617
+30903000000 30904548775 10301000000 10301516258 1711065408 1711581666
+30906000000 30907548902 10302000000 10302516300 1712065408 1712581708
+30909000000 30910549076 10303000000 10303516358 1713065408 1713581766
+30912000000 30913549140 10304000000 10304516380 1714065408 1714581788
+30915000000 30916549347 10305000000 10305516449 1715065408 1715581857
+30918000000 30919549528 10306000000 10306516509 1716065408 1716581917
+30921000000 30922549677 10307000000 10307516559 1717065408 1717581967
+30924000000 30925549734 10308000000 10308516578 1718065408 1718581986
+30927000000 30928549930 10309000000 10309516643 1719065408 1719582051
+30930000000 30931550120 10310000000 10310516706 1720065408 1720582114
+30933000000 30934550265 10311000000 10311516755 1721065408 1721582163
+30936000000 30937550437 10312000000 10312516812 1722065408 1722582220
+30939000000 30940550570 10313000000 10313516856 1723065408 1723582264
+30942000000 30943550641 10314000000 10314516880 1724065408 1724582288
+30945000000 30946550867 10315000000 10315516955 1725065408 1725582363
+30948000000 30949551027 10316000000 10316517009 1726065408 1726582417
+30951000000 30952551159 10317000000 10317517053 1727065408 1727582461
+30954000000 30955551267 10318000000 10318517089 1728065408 1728582497
+30957000000 30958551478 10319000000 10319517159 1729065408 1729582567
+30960000000 30961551644 10320000000 10320517214 1730065408 1730582622
+30963000000 30964551755 10321000000 10321517251 1731065408 1731582659
+30966000000 30967551915 10322000000 10322517305 1732065408 1732582713
+30969000000 30970552027 10323000000 10323517342 1733065408 1733582750
+30972000000 30973552225 10324000000 10324517408 1734065408 1734582816
+30975000000 30976552315 10325000000 10325517438 1735065408 1735582846
+30978000000 30979552540 10326000000 10326517513 1736065408 1736582921
+30981000000 30982552672 10327000000 10327517557 1737065408 1737582965
+30984000000 30985552811 10328000000 10328517603 1738065408 1738583011
+30987000000 30988552862 10329000000 10329517620 1739065408 1739583028
+30990000000 30991553073 10330000000 10330517691 1740065408 1740583099
+30993000000 30994553282 10331000000 10331517760 1741065408 1741583168
+30996000000 30997553410 10332000000 10332517803 1742065408 1742583211
+30999000000 31000553553 10333000000 10333517851 1743065408 1743583259
+31002000000 31003553724 10334000000 10334517908 1744065408 1744583316
+31005000000 31006553821 10335000000 10335517940 1745065408 1745583348
+31008000000 31009554034 10336000000 10336518011 1746065408 1746583419
+31011000000 31012554164 10337000000 10337518054 1747065408 1747583462
+31014000000 31015554314 10338000000 10338518104 1748065408 1748583512
+31017000000 31018554474 10339000000 10339518158 1749065408 1749583566
+31020000000 31021554570 10340000000 10340518190 1750065408 1750583598
+31023000000 31024554758 10341000000 10341518252 1751065408 1751583660
+31026000000 31027554926 10342000000 10342518308 1752065408 1752583716
+31029000000 31030555062 10343000000 10343518354 1753065408 1753583762
+31032000000 31033555237 10344000000 10344518412 1754065408 1754583820
+31035000000 31036555359 10345000000 10345518453 1755065408 1755583861
+31038000000 31039555509 10346000000 10346518503 1756065408 1756583911
+31041000000 31042555657 10347000000 10347518552 1757065408 1757583960
+31044000000 31045555863 10348000000 10348518621 1758065408 1758584029
+31047000000 31048555977 10349000000 10349518659 1759065408 1759584067
+31050000000 31051556109 10350000000 10350518703 1760065408 1760584111
+31053000000 31054556283 10351000000 10351518761 1761065408 1761584169
+31056000000 31057556402 10352000000 10352518800 1762065408 1762584208
+31059000000 31060556526 10353000000 10353518842 1763065408 1763584250
+31062000000 31063556745 10354000000 10354518915 1764065408 1764584323
+31065000000 31066556881 10355000000 10355518960 1765065408 1765584368
+31068000000 31069557032 10356000000 10356519010 1766065408 1766584418
+31071000000 31072557192 10357000000 10357519064 1767065408 1767584472
+31074000000 31075557313 10358000000 10358519104 1768065408 1768584512
+31077000000 31078557394 10359000000 10359519131 1769065408 1769584539
+31080000000 31081557602 10360000000 10360519200 1770065408 1770584608
+31083000000 31084557757 10361000000 10361519252 1771065408 1771584660
+31086000000 31087557916 10362000000 10362519305 1772065408 1772584713
+31089000000 31090558068 10363000000 10363519356 1773065408 1773584764
+31092000000 31093558190 10364000000 10364519396 1774065408 1774584804
+31095000000 31096558368 10365000000 10365519456 1775065408 1775584864
+31098000000 31099558517 10366000000 10366519505 1776065408 1776584913
+31101000000 31102558645 10367000000 10367519548 1777065408 1777584956
+31104000000 31105558814 10368000000 10368519604 1778065408 1778585012
+31107000000 31108558934 10369000000 10369519644 1779065408 1779585052
+31110000000 31111558861 10370000000 10370519620 1780065408 1780585028
+31113000000 31114559184 10371000000 10371519728 1781065408 1781585136
+31116000000 31117559437 10372000000 10372519812 1782065408 1782585220
+31119000000 31120559547 10373000000 10373519849 1783065408 1783585257
+31122000000 31123559726 10374000000 10374519908 1784065408 1784585316
+31125000000 31126559774 10375000000 10375519924 1785065408 1785585332
+31128000000 31129560028 10376000000 10376520009 1786065408 1786585417
+31131000000 31132560147 10377000000 10377520049 1787065408 1787585457
+31134000000 31135560318 10378000000 10378520106 1788065408 1788585514
+31137000000 31138560465 10379000000 10379520155 1789065408 1789585563
+31140000000 31141560618 10380000000 10380520206 1790065408 1790585614
+31143000000 31144560764 10381000000 10381520254 1791065408 1791585662
+31146000000 31147560908 10382000000 10382520302 1792065408 1792585710
+31149000000 31150561071 10383000000 10383520357 1793065408 1793585765
+31152000000 31153561223 10384000000 10384520407 1794065408 1794585815
+31155000000 31156561377 10385000000 10385520459 1795065408 1795585867
+31158000000 31159561497 10386000000 10386520499 1796065408 1796585907
+31161000000 31162561706 10387000000 10387520568 1797065408 1797585976
+31164000000 31165561836 10388000000 10388520612 1798065408 1798586020
+31167000000 31168561950 10389000000 10389520650 1799065408 1799586058
+31170000000 31171562111 10390000000 10390520703 1800065408 1800586111
+31173000000 31174562246 10391000000 10391520748 1801065408 1801586156
+31176000000 31177562389 10392000000 10392520796 1802065408 1802586204
+31179000000 31180562489 10393000000 10393520829 1803065408 1803586237
+31182000000 31183562723 10394000000 10394520907 1804065408 1804586315
+31185000000 31186562796 10395000000 10395520932 1805065408 1805586340
+31188000000 31189562917 10396000000 10396520972 1806065408 1806586380
+31191000000 31192563106 10397000000 10397521035 1807065408 1807586443
+31194000000 31195563260 10398000000 10398521086 1808065408 1808586494
+31197000000 31198563439 10399000000 10399521146 1809065408 1809586554
+31200000000 31201563585 10400000000 10400521195 1810065408 1810586603
+31203000000 31204563712 10401000000 10401521237 1811065408 1811586645
+31206000000 31207563886 10402000000 10402521295 1812065408 1812586703
+31209000000 31210563950 10403000000 10403521316 1813065408 1813586724
+31212000000 31213564157 10404000000 10404521385 1814065408 1814586793
+31215000000 31216564338 10405000000 10405521446 1815065408 1815586854
+31218000000 31219564487 10406000000 10406521495 1816065408 1816586903
+31221000000 31222564544 10407000000 10407521514 1817065408 1817586922
+31224000000 31225564740 10408000000 10408521580 1818065408 1818586988
+31227000000 31228564930 10409000000 10409521643 1819065408 1819587051
+31230000000 31231565075 10410000000 10410521691 1820065408 1820587099
+31233000000 31234565247 10411000000 10411521749 1821065408 1821587157
+31236000000 31237565380 10412000000 10412521793 1822065408 1822587201
+31239000000 31240565451 10413000000 10413521817 1823065408 1823587225
+31242000000 31243565677 10414000000 10414521892 1824065408 1824587300
+31245000000 31246565837 10415000000 10415521945 1825065408 1825587353
+31248000000 31249565969 10416000000 10416521989 1826065408 1826587397
+31251000000 31252566077 10417000000 10417522025 1827065408 1827587433
+31254000000 31255566288 10418000000 10418522096 1828065408 1828587504
+31257000000 31258566454 10419000000 10419522151 1829065408 1829587559
+31260000000 31261566565 10420000000 10420522188 1830065408 1830587596
+31263000000 31264566725 10421000000 10421522241 1831065408 1831587649
+31266000000 31267566837 10422000000 10422522279 1832065408 1832587687
+31269000000 31270567035 10423000000 10423522345 1833065408 1833587753
+31272000000 31273567125 10424000000 10424522375 1834065408 1834587783
+31275000000 31276567350 10425000000 10425522450 1835065408 1835587858
+31278000000 31279567482 10426000000 10426522494 1836065408 1836587902
+31281000000 31282567621 10427000000 10427522540 1837065408 1837587948
+31284000000 31285567672 10428000000 10428522557 1838065408 1838587965
+31287000000 31288567883 10429000000 10429522627 1839065408 1839588035
+31290000000 31291568092 10430000000 10430522697 1840065408 1840588105
+31293000000 31294568220 10431000000 10431522740 1841065408 1841588148
+31296000000 31297568363 10432000000 10432522787 1842065408 1842588195
+31299000000 31300568534 10433000000 10433522844 1843065408 1843588252
+31302000000 31303568631 10434000000 10434522877 1844065408 1844588285
+31305000000 31306568844 10435000000 10435522948 1845065408 1845588356
+31308000000 31309568974 10436000000 10436522991 1846065408 1846588399
+31311000000 31312569124 10437000000 10437523041 1847065408 1847588449
+31314000000 31315569284 10438000000 10438523094 1848065408 1848588502
+31317000000 31318569380 10439000000 10439523126 1849065408 1849588534
+31320000000 31321569568 10440000000 10440523189 1850065408 1850588597
+31323000000 31324569736 10441000000 10441523245 1851065408 1851588653
+31326000000 31327569872 10442000000 10442523290 1852065408 1852588698
+31329000000 31330570047 10443000000 10443523349 1853065408 1853588757
+31332000000 31333570169 10444000000 10444523389 1854065408 1854588797
+31335000000 31336570319 10445000000 10445523439 1855065408 1855588847
+31338000000 31339570467 10446000000 10446523489 1856065408 1856588897
+31341000000 31342570673 10447000000 10447523557 1857065408 1857588965
+31344000000 31345570787 10448000000 10448523595 1858065408 1858589003
+31347000000 31348570919 10449000000 10449523639 1859065408 1859589047
+31350000000 31351571093 10450000000 10450523697 1860065408 1860589105
+31353000000 31354571212 10451000000 10451523737 1861065408 1861589145
+31356000000 31357571336 10452000000 10452523778 1862065408 1862589186
+31359000000 31360571555 10453000000 10453523851 1863065408 1863589259
+31362000000 31363571691 10454000000 10454523897 1864065408 1864589305
+31365000000 31366571842 10455000000 10455523947 1865065408 1865589355
+31368000000 31369572002 10456000000 10456524000 1866065408 1866589408
+31371000000 31372572123 10457000000 10457524041 1867065408 1867589449
+31374000000 31375572204 10458000000 10458524068 1868065408 1868589476
+31377000000 31378572412 10459000000 10459524137 1869065408 1869589545
+31380000000 31381572567 10460000000 10460524189 1870065408 1870589597
+31383000000 31384572726 10461000000 10461524242 1871065408 1871589650
+31386000000 31387572878 10462000000 10462524292 1872065408 1872589700
+31389000000 31390573000 10463000000 10463524333 1873065408 1873589741
+31392000000 31393573178 10464000000 10464524392 1874065408 1874589800
+31395000000 31396573327 10465000000 10465524442 1875065408 1875589850
+31398000000 31399573455 10466000000 10466524485 1876065408 1876589893
+31401000000 31402573624 10467000000 10467524541 1877065408 1877589949
+31404000000 31405573744 10468000000 10468524581 1878065408 1878589989
+31407000000 31408573671 10469000000 10469524557 1879065408 1879589965
+31410000000 31411573994 10470000000 10470524664 1880065408 1880590072
+31413000000 31414574247 10471000000 10471524749 1881065408 1881590157
+31416000000 31417574357 10472000000 10472524785 1882065408 1882590193
+31419000000 31420574536 10473000000 10473524845 1883065408 1883590253
+31422000000 31423574584 10474000000 10474524861 1884065408 1884590269
+31425000000 31426574838 10475000000 10475524946 1885065408 1885590354
+31428000000 31429574957 10476000000 10476524985 1886065408 1886590393
+31431000000 31432575128 10477000000 10477525042 1887065408 1887590450
+31434000000 31435575275 10478000000 10478525091 1888065408 1888590499
+31437000000 31438575428 10479000000 10479525142 1889065408 1889590550
+31440000000 31441575574 10480000000 10480525191 1890065408 1890590599
+31443000000 31444575718 10481000000 10481525239 1891065408 1891590647
+31446000000 31447575881 10482000000 10482525293 1892065408 1892590701
+31449000000 31450576033 10483000000 10483525344 1893065408 1893590752
+31452000000 31453576187 10484000000 10484525395 1894065408 1894590803
+31455000000 31456576307 10485000000 10485525435 1895065408 1895590843
+31458000000 31459576516 10486000000 10486525505 1896065408 1896590913
+31461000000 31462576646 10487000000 10487525548 1897065408 1897590956
+31464000000 31465576760 10488000000 10488525586 1898065408 1898590994
+31467000000 31468576921 10489000000 10489525640 1899065408 1899591048
+31470000000 31471577056 10490000000 10490525685 1900065408 1900591093
+31473000000 31474577199 10491000000 10491525733 1901065408 1901591141
+31476000000 31477577299 10492000000 10492525766 1902065408 1902591174
+31479000000 31480577533 10493000000 10493525844 1903065408 1903591252
+31482000000 31483577606 10494000000 10494525868 1904065408 1904591276
+31485000000 31486577727 10495000000 10495525909 1905065408 1905591317
+31488000000 31489577916 10496000000 10496525972 1906065408 1906591380
+31491000000 31492578070 10497000000 10497526023 1907065408 1907591431
+31494000000 31495578249 10498000000 10498526083 1908065408 1908591491
+31497000000 31498578395 10499000000 10499526131 1909065408 1909591539
+31500000000 31501578522 10500000000 10500526174 1910065408 1910591582
+31503000000 31504578696 10501000000 10501526232 1911065408 1911591640
+31506000000 31507578760 10502000000 10502526253 1912065408 1912591661
+31509000000 31510578967 10503000000 10503526322 1913065408 1913591730
+31512000000 31513579148 10504000000 10504526382 1914065408 1914591790
+31515000000 31516579297 10505000000 10505526432 1915065408 1915591840
+31518000000 31519579354 10506000000 10506526451 1916065408 1916591859
+31521000000 31522579550 10507000000 10507526516 1917065408 1917591924
+31524000000 31525579740 10508000000 10508526580 1918065408 1918591988
+31527000000 31528579885 10509000000 10509526628 1919065408 1919592036
+31530000000 31531580057 10510000000 10510526685 1920065408 1920592093
+31533000000 31534580190 10511000000 10511526730 1921065408 1921592138
+31536000000 31537580261 10512000000 10512526753 1922065408 1922592161
+31539000000 31540580487 10513000000 10513526829 1923065408 1923592237
+31542000000 31543580647 10514000000 10514526882 1924065408 1924592290
+31545000000 31546580779 10515000000 10515526926 1925065408 1925592334
+31548000000 31549580887 10516000000 10516526962 1926065408 1926592370
+31551000000 31552581098 10517000000 10517527032 1927065408 1927592440
+31554000000 31555581264 10518000000 10518527088 1928065408 1928592496
+31557000000 31558581375 10519000000 10519527125 1929065408 1929592533
+31560000000 31561581535 10520000000 10520527178 1930065408 1930592586
+31563000000 31564581647 10521000000 10521527215 1931065408 1931592623
+31566000000 31567581845 10522000000 10522527281 1932065408 1932592689
+31569000000 31570581935 10523000000 10523527311 1933065408 1933592719
+31572000000 31573582160 10524000000 10524527386 1934065408 1934592794
+31575000000 31576582292 10525000000 10525527430 1935065408 1935592838
+31578000000 31579582431 10526000000 10526527477 1936065408 1936592885
+31581000000 31582582482 10527000000 10527527494 1937065408 1937592902
+31584000000 31585582693 10528000000 10528527564 1938065408 1938592972
+31587000000 31588582902 10529000000 10529527634 1939065408 1939593042
+31590000000 31591583030 10530000000 10530527676 1940065408 1940593084
+31593000000 31594583173 10531000000 10531527724 1941065408 1941593132
+31596000000 31597583344 10532000000 10532527781 1942065408 1942593189
+31599000000 31600583441 10533000000 10533527813 1943065408 1943593221
+31602000000 31603583654 10534000000 10534527884 1944065408 1944593292
+31605000000 31606583784 10535000000 10535527928 1945065408 1945593336
+31608000000 31609583934 10536000000 10536527978 1946065408 1946593386
+31611000000 31612584094 10537000000 10537528031 1947065408 1947593439
+31614000000 31615584190 10538000000 10538528063 1948065408 1948593471
+31617000000 31618584378 10539000000 10539528126 1949065408 1949593534
+31620000000 31621584546 10540000000 10540528182 1950065408 1950593590
+31623000000 31624584682 10541000000 10541528227 1951065408 1951593635
+31626000000 31627584857 10542000000 10542528285 1952065408 1952593693
+31629000000 31630584979 10543000000 10543528326 1953065408 1953593734
+31632000000 31633585129 10544000000 10544528376 1954065408 1954593784
+31635000000 31636585277 10545000000 10545528425 1955065408 1955593833
+31638000000 31639585483 10546000000 10546528494 1956065408 1956593902
+31641000000 31642585597 10547000000 10547528532 1957065408 1957593940
+31644000000 31645585729 10548000000 10548528576 1958065408 1958593984
+31647000000 31648585903 10549000000 10549528634 1959065408 1959594042
+31650000000 31651586022 10550000000 10550528674 1960065408 1960594082
+31653000000 31654586146 10551000000 10551528715 1961065408 1961594123
+31656000000 31657586365 10552000000 10552528788 1962065408 1962594196
+31659000000 31660586501 10553000000 10553528833 1963065408 1963594241
+31662000000 31663586652 10554000000 10554528884 1964065408 1964594292
+31665000000 31666586812 10555000000 10555528937 1965065408 1965594345
+31668000000 31669586933 10556000000 10556528977 1966065408 1966594385
+31671000000 31672587014 10557000000 10557529004 1967065408 1967594412
+31674000000 31675587222 10558000000 10558529074 1968065408 1968594482
+31677000000 31678587377 10559000000 10559529125 1969065408 1969594533
+31680000000 31681587536 10560000000 10560529178 1970065408 1970594586
+31683000000 31684587688 10561000000 10561529229 1971065408 1971594637
+31686000000 31687587810 10562000000 10562529270 1972065408 1972594678
+31689000000 31690587988 10563000000 10563529329 1973065408 1973594737
+31692000000 31693588137 10564000000 10564529379 1974065408 1974594787
+31695000000 31696588265 10565000000 10565529421 1975065408 1975594829
+31698000000 31699588434 10566000000 10566529478 1976065408 1976594886
+31701000000 31702588554 10567000000 10567529518 1977065408 1977594926
+31704000000 31705588481 10568000000 10568529493 1978065408 1978594901
+31707000000 31708588804 10569000000 10569529601 1979065408 1979595009
+31710000000 31711589057 10570000000 10570529685 1980065408 1980595093
+31713000000 31714589167 10571000000 10571529722 1981065408 1981595130
+31716000000 31717589346 10572000000 10572529782 1982065408 1982595190
+31719000000 31720589394 10573000000 10573529798 1983065408 1983595206
+31722000000 31723589648 10574000000 10574529882 1984065408 1984595290
+31725000000 31726589767 10575000000 10575529922 1985065408 1985595330
+31728000000 31729589938 10576000000 10576529979 1986065408 1986595387
+31731000000 31732590085 10577000000 10577530028 1987065408 1987595436
+31734000000 31735590238 10578000000 10578530079 1988065408 1988595487
+31737000000 31738590384 10579000000 10579530128 1989065408 1989595536
+31740000000 31741590528 10580000000 10580530176 1990065408 1990595584
+31743000000 31744590691 10581000000 10581530230 1991065408 1991595638
+31746000000 31747590843 10582000000 10582530281 1992065408 1992595689
+31749000000 31750590997 10583000000 10583530332 1993065408 1993595740
+31752000000 31753591117 10584000000 10584530372 1994065408 1994595780
+31755000000 31756591326 10585000000 10585530442 1995065408 1995595850
+31758000000 31759591456 10586000000 10586530485 1996065408 1996595893
+31761000000 31762591570 10587000000 10587530523 1997065408 1997595931
+31764000000 31765591731 10588000000 10588530577 1998065408 1998595985
+31767000000 31768591866 10589000000 10589530622 1999065408 1999596030
+31770000000 31771592009 10590000000 10590530669 2000065408 2000596077
+31773000000 31774592109 10591000000 10591530703 2001065408 2001596111
+31776000000 31777592343 10592000000 10592530781 2002065408 2002596189
+31779000000 31780592416 10593000000 10593530805 2003065408 2003596213
+31782000000 31783592537 10594000000 10594530845 2004065408 2004596253
+31785000000 31786592726 10595000000 10595530908 2005065408 2005596316
+31788000000 31789592880 10596000000 10596530960 2006065408 2006596368
+31791000000 31792593059 10597000000 10597531019 2007065408 2007596427
+31794000000 31795593205 10598000000 10598531068 2008065408 2008596476
+31797000000 31798593332 10599000000 10599531110 2009065408 2009596518
+31800000000 31801593506 10600000000 10600531168 2010065408 2010596576
+31803000000 31804593570 10601000000 10601531190 2011065408 2011596598
+31806000000 31807593777 10602000000 10602531259 2012065408 2012596667
+31809000000 31810593958 10603000000 10603531319 2013065408 2013596727
+31812000000 31813594107 10604000000 10604531369 2014065408 2014596777
+31815000000 31816594164 10605000000 10605531388 2015065408 2015596796
+31818000000 31819594360 10606000000 10606531453 2016065408 2016596861
+31821000000 31822594550 10607000000 10607531516 2017065408 2017596924
+31824000000 31825594695 10608000000 10608531565 2018065408 2018596973
+31827000000 31828594867 10609000000 10609531622 2019065408 2019597030
+31830000000 31831595000 10610000000 10610531666 2020065408 2020597074
+31833000000 31834595071 10611000000 10611531690 2021065408 2021597098
+31836000000 31837595297 10612000000 10612531765 2022065408 2022597173
+31839000000 31840595457 10613000000 10613531819 2023065408 2023597227
+31842000000 31843595589 10614000000 10614531863 2024065408 2024597271
+31845000000 31846595697 10615000000 10615531899 2025065408 2025597307
+31848000000 31849595908 10616000000 10616531969 2026065408 2026597377
+31851000000 31852596074 10617000000 10617532024 2027065408 2027597432
+31854000000 31855596185 10618000000 10618532061 2028065408 2028597469
+31857000000 31858596345 10619000000 10619532115 2029065408 2029597523
+31860000000 31861596457 10620000000 10620532152 2030065408 2030597560
+31863000000 31864596655 10621000000 10621532218 2031065408 2031597626
+31866000000 31867596745 10622000000 10622532248 2032065408 2032597656
+31869000000 31870596970 10623000000 10623532323 2033065408 2033597731
+31872000000 31873597102 10624000000 10624532367 2034065408 2034597775
+31875000000 31876597241 10625000000 10625532413 2035065408 2035597821
+31878000000 31879597292 10626000000 10626532430 2036065408 2036597838
+31881000000 31882597503 10627000000 10627532501 2037065408 2037597909
+31884000000 31885597712 10628000000 10628532570 2038065408 2038597978
+31887000000 31888597840 10629000000 10629532613 2039065408 2039598021
+31890000000 31891597983 10630000000 10630532661 2040065408 2040598069
+31893000000 31894598154 10631000000 10631532718 2041065408 2041598126
+31896000000 31897598251 10632000000 10632532750 2042065408 2042598158
+31899000000 31900598464 10633000000 10633532821 2043065408 2043598229
+31902000000 31903598594 10634000000 10634532864 2044065408 2044598272
+31905000000 31906598744 10635000000 10635532914 2045065408 2045598322
+31908000000 31909598904 10636000000 10636532968 2046065408 2046598376
+31911000000 31912599000 10637000000 10637533000 2047065408 2047598408
+31914000000 31915599188 10638000000 10638533062 2048065408 2048598470
+31917000000 31918599356 10639000000 10639533118 2049065408 2049598526
+31920000000 31921599492 10640000000 10640533164 2050065408 2050598572
+31923000000 31924599667 10641000000 10641533222 2051065408 2051598630
+31926000000 31927599789 10642000000 10642533263 2052065408 2052598671
+31929000000 31930599939 10643000000 10643533313 2053065408 2053598721
+31932000000 31933600087 10644000000 10644533362 2054065408 2054598770
+31935000000 31936600293 10645000000 10645533431 2055065408 2055598839
+31938000000 31939600407 10646000000 10646533469 2056065408 2056598877
+31941000000 31942600539 10647000000 10647533513 2057065408 2057598921
+31944000000 31945600713 10648000000 10648533571 2058065408 2058598979
+31947000000 31948600832 10649000000 10649533610 2059065408 2059599018
+31950000000 31951600956 10650000000 10650533652 2060065408 2060599060
+31953000000 31954601175 10651000000 10651533725 2061065408 2061599133
+31956000000 31957601311 10652000000 10652533770 2062065408 2062599178
+31959000000 31960601462 10653000000 10653533820 2063065408 2063599228
+31962000000 31963601622 10654000000 10654533874 2064065408 2064599282
+31965000000 31966601743 10655000000 10655533914 2065065408 2065599322
+31968000000 31969601824 10656000000 10656533941 2066065408 2066599349
+31971000000 31972602032 10657000000 10657534010 2067065408 2067599418
+31974000000 31975602187 10658000000 10658534062 2068065408 2068599470
+31977000000 31978602346 10659000000 10659534115 2069065408 2069599523
+31980000000 31981602498 10660000000 10660534166 2070065408 2070599574
+31983000000 31984602620 10661000000 10661534206 2071065408 2071599614
+31986000000 31987602798 10662000000 10662534266 2072065408 2072599674
+31989000000 31990602947 10663000000 10663534315 2073065408 2073599723
+31992000000 31993603075 10664000000 10664534358 2074065408 2074599766
+31995000000 31996603244 10665000000 10665534414 2075065408 2075599822
+31998000000 31999603364 10666000000 10666534454 2076065408 2076599862
+32001000000 32002603291 10667000000 10667534430 2077065408 2077599838
+32004000000 32005603614 10668000000 10668534538 2078065408 2078599946
+32007000000 32008603867 10669000000 10669534622 2079065408 2079600030
+32010000000 32011603977 10670000000 10670534659 2080065408 2080600067
+32013000000 32014604156 10671000000 10671534718 2081065408 2081600126
+32016000000 32017604204 10672000000 10672534734 2082065408 2082600142
+32019000000 32020604458 10673000000 10673534819 2083065408 2083600227
+32022000000 32023604577 10674000000 10674534859 2084065408 2084600267
+32025000000 32026604748 10675000000 10675534916 2085065408 2085600324
+32028000000 32029604895 10676000000 10676534965 2086065408 2086600373
+32031000000 32032605048 10677000000 10677535016 2087065408 2087600424
+32034000000 32035605194 10678000000 10678535064 2088065408 2088600472
+32037000000 32038605338 10679000000 10679535112 2089065408 2089600520
+32040000000 32041605501 10680000000 10680535167 2090065408 2090600575
+32043000000 32044605653 10681000000 10681535217 2091065408 2091600625
+32046000000 32047605807 10682000000 10682535269 2092065408 2092600677
+32049000000 32050605927 10683000000 10683535309 2093065408 2093600717
+32052000000 32053606136 10684000000 10684535378 2094065408 2094600786
+32055000000 32056606266 10685000000 10685535422 2095065408 2095600830
+32058000000 32059606380 10686000000 10686535460 2096065408 2096600868
+32061000000 32062606541 10687000000 10687535513 2097065408 2097600921
+32064000000 32065606676 10688000000 10688535558 2098065408 2098600966
+32067000000 32068606819 10689000000 10689535606 2099065408 2099601014
+32070000000 32071606919 10690000000 10690535639 2100065408 2100601047
+32073000000 32074607153 10691000000 10691535717 2101065408 2101601125
+32076000000 32077607226 10692000000 10692535742 2102065408 2102601150
+32079000000 32080607347 10693000000 10693535782 2103065408 2103601190
+32082000000 32083607536 10694000000 10694535845 2104065408 2104601253
+32085000000 32086607690 10695000000 10695535896 2105065408 2105601304
+32088000000 32089607869 10696000000 10696535956 2106065408 2106601364
+32091000000 32092608015 10697000000 10697536005 2107065408 2107601413
+32094000000 32095608142 10698000000 10698536047 2108065408 2108601455
+32097000000 32098608316 10699000000 10699536105 2109065408 2109601513
+32100000000 32101608380 10700000000 10700536126 2110065408 2110601534
+32103000000 32104608587 10701000000 10701536195 2111065408 2111601603
+32106000000 32107608768 10702000000 10702536256 2112065408 2112601664
+32109000000 32110608917 10703000000 10703536305 2113065408 2113601713
+32112000000 32113608974 10704000000 10704536324 2114065408 2114601732
+32115000000 32116609170 10705000000 10705536390 2115065408 2115601798
+32118000000 32119609360 10706000000 10706536453 2116065408 2116601861
+32121000000 32122609505 10707000000 10707536501 2117065408 2117601909
+32124000000 32125609677 10708000000 10708536559 2118065408 2118601967
+32127000000 32128609810 10709000000 10709536603 2119065408 2119602011
+32130000000 32131609881 10710000000 10710536627 2120065408 2120602035
+32133000000 32134610107 10711000000 10711536702 2121065408 2121602110
+32136000000 32137610267 10712000000 10712536755 2122065408 2122602163
+32139000000 32140610399 10713000000 10713536799 2123065408 2123602207
+32142000000 32143610507 10714000000 10714536835 2124065408 2124602243
+32145000000 32146610718 10715000000 10715536906 2125065408 2125602314
+32148000000 32149610884 10716000000 10716536961 2126065408 2126602369
+32151000000 32152610995 10717000000 10717536998 2127065408 2127602406
+32154000000 32155611155 10718000000 10718537051 2128065408 2128602459
+32157000000 32158611267 10719000000 10719537089 2129065408 2129602497
+32160000000 32161611465 10720000000 10720537155 2130065408 2130602563
+32163000000 32164611555 10721000000 10721537185 2131065408 2131602593
+32166000000 32167611780 10722000000 10722537260 2132065408 2132602668
+32169000000 32170611912 10723000000 10723537304 2133065408 2133602712
+32172000000 32173612051 10724000000 10724537350 2134065408 2134602758
+32175000000 32176612102 10725000000 10725537367 2135065408 2135602775
+32178000000 32179612313 10726000000 10726537437 2136065408 2136602845
+32181000000 32182612522 10727000000 10727537507 2137065408 2137602915
+32184000000 32185612650 10728000000 10728537550 2138065408 2138602958
+32187000000 32188612793 10729000000 10729537597 2139065408 2139603005
+32190000000 32191612964 10730000000 10730537654 2140065408 2140603062
+32193000000 32194613061 10731000000 10731537687 2141065408 2141603095
+32196000000 32197613274 10732000000 10732537758 2142065408 2142603166
+32199000000 32200613404 10733000000 10733537801 2143065408 2143603209
+32202000000 32203613554 10734000000 10734537851 2144065408 2144603259
+32205000000 32206613714 10735000000 10735537904 2145065408 2145603312
+32208000000 32209613810 10736000000 10736537936 2146065408 2146603344
+32211000000 32212613998 10737000000 10737537999 2147065408 2147603407
+32214000000 32215614166 10738000000 10738538055 2148065408 2148603463
+32217000000 32218614302 10739000000 10739538100 2149065408 2149603508
+32220000000 32221614477 10740000000 10740538159 2150065408 2150603567
+32223000000 32224614599 10741000000 10741538199 2151065408 2151603607
+32226000000 32227614749 10742000000 10742538249 2152065408 2152603657
+32229000000 32230614897 10743000000 10743538299 2153065408 2153603707
+32232000000 32233615103 10744000000 10744538367 2154065408 2154603775
+32235000000 32236615217 10745000000 10745538405 2155065408 2155603813
+32238000000 32239615349 10746000000 10746538449 2156065408 2156603857
+32241000000 32242615523 10747000000 10747538507 2157065408 2157603915
+32244000000 32245615642 10748000000 10748538547 2158065408 2158603955
+32247000000 32248615766 10749000000 10749538588 2159065408 2159603996
+32250000000 32251615985 10750000000 10750538661 2160065408 2160604069
+32253000000 32254616121 10751000000 10751538707 2161065408 2161604115
+32256000000 32257616272 10752000000 10752538757 2162065408 2162604165
+32259000000 32260616432 10753000000 10753538810 2163065408 2163604218
+32262000000 32263616553 10754000000 10754538851 2164065408 2164604259
+32265000000 32266616634 10755000000 10755538878 2165065408 2165604286
+32268000000 32269616842 10756000000 10756538947 2166065408 2166604355
+32271000000 32272616997 10757000000 10757538999 2167065408 2167604407
+32274000000 32275617156 10758000000 10758539052 2168065408 2168604460
+32277000000 32278617308 10759000000 10759539102 2169065408 2169604510
+32280000000 32281617430 10760000000 10760539143 2170065408 2170604551
+32283000000 32284617608 10761000000 10761539202 2171065408 2171604610
+32286000000 32287617757 10762000000 10762539252 2172065408 2172604660
+32289000000 32290617885 10763000000 10763539295 2173065408 2173604703
+32292000000 32293618054 10764000000 10764539351 2174065408 2174604759
+32295000000 32296618174 10765000000 10765539391 2175065408 2175604799
+32298000000 32299618101 10766000000 10766539367 2176065408 2176604775
+32301000000 32302618424 10767000000 10767539474 2177065408 2177604882
+32304000000 32305618677 10768000000 10768539559 2178065408 2178604967
+32307000000 32308618787 10769000000 10769539595 2179065408 2179605003
+32310000000 32311618966 10770000000 10770539655 2180065408 2180605063
+32313000000 32314619014 10771000000 10771539671 2181065408 2181605079
+32316000000 32317619268 10772000000 10772539756 2182065408 2182605164
+32319000000 32320619387 10773000000 10773539795 2183065408 2183605203
+32322000000 32323619558 10774000000 10774539852 2184065408 2184605260
+32325000000 32326619705 10775000000 10775539901 2185065408 2185605309
+32328000000 32329619858 10776000000 10776539952 2186065408 2186605360
+32331000000 32332620004 10777000000 10777540001 2187065408 2187605409
+32334000000 32335620148 10778000000 10778540049 2188065408 2188605457
+32337000000 32338620311 10779000000 10779540103 2189065408 2189605511
+32340000000 32341620463 10780000000 10780540154 2190065408 2190605562
+32343000000 32344620617 10781000000 10781540205 2191065408 2191605613
+32346000000 32347620737 10782000000 10782540245 2192065408 2192605653
+32349000000 32350620946 10783000000 10783540315 2193065408 2193605723
+32352000000 32353621076 10784000000 10784540358 2194065408 2194605766
+32355000000 32356621190 10785000000 10785540396 2195065408 2195605804
+32358000000 32359621351 10786000000 10786540450 2196065408 2196605858
+32361000000 32362621486 10787000000 10787540495 2197065408 2197605903
+32364000000 32365621629 10788000000 10788540543 2198065408 2198605951
+32367000000 32368621729 10789000000 10789540576 2199065408 2199605984
+32370000000 32371621963 10790000000 10790540654 2200065408 2200606062
+32373000000 32374622036 10791000000 10791540678 2201065408 2201606086
+32376000000 32377622157 10792000000 10792540719 2202065408 2202606127
+32379000000 32380622346 10793000000 10793540782 2203065408 2203606190
+32382000000 32383622500 10794000000 10794540833 2204065408 2204606241
+32385000000 32386622679 10795000000 10795540893 2205065408 2205606301
+32388000000 32389622825 10796000000 10796540941 2206065408 2206606349
+32391000000 32392622952 10797000000 10797540984 2207065408 2207606392
+32394000000 32395623126 10798000000 10798541042 2208065408 2208606450
+32397000000 32398623190 10799000000 10799541063 2209065408 2209606471
+32400000000 32401623397 10800000000 10800541132 2210065408 2210606540
+32403000000 32404623578 10801000000 10801541192 2211065408 2211606600
+32406000000 32407623727 10802000000 10802541242 2212065408 2212606650
+32409000000 32410623784 10803000000 10803541261 2213065408 2213606669
+32412000000 32413623980 10804000000 10804541326 2214065408 2214606734
+32415000000 32416624170 10805000000 10805541390 2215065408 2215606798
+32418000000 32419624315 10806000000 10806541438 2216065408 2216606846
+32421000000 32422624487 10807000000 10807541495 2217065408 2217606903
+32424000000 32425624620 10808000000 10808541540 2218065408 2218606948
+32427000000 32428624691 10809000000 10809541563 2219065408 2219606971
+32430000000 32431624917 10810000000 10810541639 2220065408 2220607047
+32433000000 32434625077 10811000000 10811541692 2221065408 2221607100
+32436000000 32437625209 10812000000 10812541736 2222065408 2222607144
+32439000000 32440625317 10813000000 10813541772 2223065408 2223607180
+32442000000 32443625528 10814000000 10814541842 2224065408 2224607250
+32445000000 32446625694 10815000000 10815541898 2225065408 2225607306
+32448000000 32449625805 10816000000 10816541935 2226065408 2226607343
+32451000000 32452625965 10817000000 10817541988 2227065408 2227607396
+32454000000 32455626077 10818000000 10818542025 2228065408 2228607433
+32457000000 32458626275 10819000000 10819542091 2229065408 2229607499
+32460000000 32461626365 10820000000 10820542121 2230065408 2230607529
+32463000000 32464626590 10821000000 10821542196 2231065408 2231607604
+32466000000 32467626722 10822000000 10822542240 2232065408 2232607648
+32469000000 32470626861 10823000000 10823542287 2233065408 2233607695
+32472000000 32473626912 10824000000 10824542304 2234065408 2234607712
+32475000000 32476627123 10825000000 10825542374 2235065408 2235607782
+32478000000 32479627332 10826000000 10826542444 2236065408 2236607852
+32481000000 32482627460 10827000000 10827542486 2237065408 2237607894
+32484000000 32485627603 10828000000 10828542534 2238065408 2238607942
+32487000000 32488627774 10829000000 10829542591 2239065408 2239607999
+32490000000 32491627871 10830000000 10830542623 2240065408 2240608031
+32493000000 32494628084 10831000000 10831542694 2241065408 2241608102
+32496000000 32497628214 10832000000 10832542738 2242065408 2242608146
+32499000000 32500628364 10833000000 10833542788 2243065408 2243608196
+32502000000 32503628524 10834000000 10834542841 2244065408 2244608249
+32505000000 32506628620 10835000000 10835542873 2245065408 2245608281
+32508000000 32509628808 10836000000 10836542936 2246065408 2246608344
+32511000000 32512628976 10837000000 10837542992 2247065408 2247608400
+32514000000 32515629112 10838000000 10838543037 2248065408 2248608445
+32517000000 32518629287 10839000000 10839543095 2249065408 2249608503
+32520000000 32521629409 10840000000 10840543136 2250065408 2250608544
+32523000000 32524629559 10841000000 10841543186 2251065408 2251608594
+32526000000 32527629707 10842000000 10842543235 2252065408 2252608643
+32529000000 32530629913 10843000000 10843543304 2253065408 2253608712
+32532000000 32533630027 10844000000 10844543342 2254065408 2254608750
+32535000000 32536630159 10845000000 10845543386 2255065408 2255608794
+32538000000 32539630333 10846000000 10846543444 2256065408 2256608852
+32541000000 32542630452 10847000000 10847543484 2257065408 2257608892
+32544000000 32545630576 10848000000 10848543525 2258065408 2258608933
+32547000000 32548630795 10849000000 10849543598 2259065408 2259609006
+32550000000 32551630931 10850000000 10850543643 2260065408 2260609051
+32553000000 32554631082 10851000000 10851543694 2261065408 2261609102
+32556000000 32557631242 10852000000 10852543747 2262065408 2262609155
+32559000000 32560631363 10853000000 10853543787 2263065408 2263609195
+32562000000 32563631444 10854000000 10854543814 2264065408 2264609222
+32565000000 32566631652 10855000000 10855543884 2265065408 2265609292
+32568000000 32569631807 10856000000 10856543935 2266065408 2266609343
+32571000000 32572631966 10857000000 10857543988 2267065408 2267609396
+32574000000 32575632118 10858000000 10858544039 2268065408 2268609447
+32577000000 32578632240 10859000000 10859544080 2269065408 2269609488
+32580000000 32581632418 10860000000 10860544139 2270065408 2270609547
+32583000000 32584632567 10861000000 10861544189 2271065408 2271609597
+32586000000 32587632695 10862000000 10862544231 2272065408 2272609639
+32589000000 32590632864 10863000000 10863544288 2273065408 2273609696
+32592000000 32593632984 10864000000 10864544328 2274065408 2274609736
+32595000000 32596632911 10865000000 10865544303 2275065408 2275609711
+32598000000 32599633234 10866000000 10866544411 2276065408 2276609819
+32601000000 32602633487 10867000000 10867544495 2277065408 2277609903
+32604000000 32605633597 10868000000 10868544532 2278065408 2278609940
+32607000000 32608633776 10869000000 10869544592 2279065408 2279610000
+32610000000 32611633824 10870000000 10870544608 2280065408 2280610016
+32613000000 32614634078 10871000000 10871544692 2281065408 2281610100
+32616000000 32617634197 10872000000 10872544732 2282065408 2282610140
+32619000000 32620634368 10873000000 10873544789 2283065408 2283610197
+32622000000 32623634515 10874000000 10874544838 2284065408 2284610246
+32625000000 32626634668 10875000000 10875544889 2285065408 2285610297
+32628000000 32629634814 10876000000 10876544938 2286065408 2286610346
+32631000000 32632634958 10877000000 10877544986 2287065408 2287610394
+32634000000 32635635121 10878000000 10878545040 2288065408 2288610448
+32637000000 32638635273 10879000000 10879545091 2289065408 2289610499
+32640000000 32641635427 10880000000 10880545142 2290065408 2290610550
+32643000000 32644635547 10881000000 10881545182 2291065408 2291610590
+32646000000 32647635756 10882000000 10882545252 2292065408 2292610660
+32649000000 32650635886 10883000000 10883545295 2293065408 2293610703
+32652000000 32653636000 10884000000 10884545333 2294065408 2294610741
+32655000000 32656636161 10885000000 10885545387 2295065408 2295610795
+32658000000 32659636296 10886000000 10886545432 2296065408 2296610840
+32661000000 32662636439 10887000000 10887545479 2297065408 2297610887
+32664000000 32665636539 10888000000 10888545513 2298065408 2298610921
+32667000000 32668636773 10889000000 10889545591 2299065408 2299610999
+32670000000 32671636846 10890000000 10890545615 2300065408 2300611023
+32673000000 32674636967 10891000000 10891545655 2301065408 2301611063
+32676000000 32677637156 10892000000 10892545718 2302065408 2302611126
+32679000000 32680637310 10893000000 10893545770 2303065408 2303611178
+32682000000 32683637489 10894000000 10894545829 2304065408 2304611237
+32685000000 32686637635 10895000000 10895545878 2305065408 2305611286
+32688000000 32689637762 10896000000 10896545920 2306065408 2306611328
+32691000000 32692637936 10897000000 10897545978 2307065408 2307611386
+32694000000 32695638000 10898000000 10898546000 2308065408 2308611408
+32697000000 32698638207 10899000000 10899546069 2309065408 2309611477
+32700000000 32701638388 10900000000 10900546129 2310065408 2310611537
+32703000000 32704638537 10901000000 10901546179 2311065408 2311611587
+32706000000 32707638594 10902000000 10902546198 2312065408 2312611606
+32709000000 32710638790 10903000000 10903546263 2313065408 2313611671
+32712000000 32713638980 10904000000 10904546326 2314065408 2314611734
+32715000000 32716639125 10905000000 10905546375 2315065408 2315611783
+32718000000 32719639297 10906000000 10906546432 2316065408 2316611840
+32721000000 32722639430 10907000000 10907546476 2317065408 2317611884
+32724000000 32725639501 10908000000 10908546500 2318065408 2318611908
+32727000000 32728639727 10909000000 10909546575 2319065408 2319611983
+32730000000 32731639887 10910000000 10910546629 2320065408 2320612037
+32733000000 32734640019 10911000000 10911546673 2321065408 2321612081
+32736000000 32737640127 10912000000 10912546709 2322065408 2322612117
+32739000000 32740640338 10913000000 10913546779 2323065408 2323612187
+32742000000 32743640504 10914000000 10914546834 2324065408 2324612242
+32745000000 32746640615 10915000000 10915546871 2325065408 2325612279
+32748000000 32749640775 10916000000 10916546925 2326065408 2326612333
+32751000000 32752640887 10917000000 10917546962 2327065408 2327612370
+32754000000 32755641085 10918000000 10918547028 2328065408 2328612436
+32757000000 32758641175 10919000000 10919547058 2329065408 2329612466
+32760000000 32761641400 10920000000 10920547133 2330065408 2330612541
+32763000000 32764641532 10921000000 10921547177 2331065408 2331612585
+32766000000 32767641671 10922000000 10922547223 2332065408 2332612631
+32769000000 32770641722 10923000000 10923547240 2333065408 2333612648
+32772000000 32773641933 10924000000 10924547311 2334065408 2334612719
+32775000000 32776642142 10925000000 10925547380 2335065408 2335612788
+32778000000 32779642270 10926000000 10926547423 2336065408 2336612831
+32781000000 32782642413 10927000000 10927547471 2337065408 2337612879
+32784000000 32785642584 10928000000 10928547528 2338065408 2338612936
+32787000000 32788642681 10929000000 10929547560 2339065408 2339612968
+32790000000 32791642894 10930000000 10930547631 2340065408 2340613039
+32793000000 32794643024 10931000000 10931547674 2341065408 2341613082
+32796000000 32797643174 10932000000 10932547724 2342065408 2342613132
+32799000000 32800643334 10933000000 10933547778 2343065408 2343613186
+32802000000 32803643430 10934000000 10934547810 2344065408 2344613218
+32805000000 32806643618 10935000000 10935547872 2345065408 2345613280
+32808000000 32809643786 10936000000 10936547928 2346065408 2346613336
+32811000000 32812643922 10937000000 10937547974 2347065408 2347613382
+32814000000 32815644097 10938000000 10938548032 2348065408 2348613440
+32817000000 32818644219 10939000000 10939548073 2349065408 2349613481
+32820000000 32821644369 10940000000 10940548123 2350065408 2350613531
+32823000000 32824644517 10941000000 10941548172 2351065408 2351613580
+32826000000 32827644723 10942000000 10942548241 2352065408 2352613649
+32829000000 32830644837 10943000000 10943548279 2353065408 2353613687
+32832000000 32833644969 10944000000 10944548323 2354065408 2354613731
+32835000000 32836645143 10945000000 10945548381 2355065408 2355613789
+32838000000 32839645262 10946000000 10946548420 2356065408 2356613828
+32841000000 32842645386 10947000000 10947548462 2357065408 2357613870
+32844000000 32845645605 10948000000 10948548535 2358065408 2358613943
+32847000000 32848645741 10949000000 10949548580 2359065408 2359613988
+32850000000 32851645892 10950000000 10950548630 2360065408 2360614038
+32853000000 32854646052 10951000000 10951548684 2361065408 2361614092
+32856000000 32857646173 10952000000 10952548724 2362065408 2362614132
+32859000000 32860646254 10953000000 10953548751 2363065408 2363614159
+32862000000 32863646462 10954000000 10954548820 2364065408 2364614228
+32865000000 32866646617 10955000000 10955548872 2365065408 2365614280
+32868000000 32869646776 10956000000 10956548925 2366065408 2366614333
+32871000000 32872646928 10957000000 10957548976 2367065408 2367614384
+32874000000 32875647050 10958000000 10958549016 2368065408 2368614424
+32877000000 32878647228 10959000000 10959549076 2369065408 2369614484
+32880000000 32881647377 10960000000 10960549125 2370065408 2370614533
+32883000000 32884647505 10961000000 10961549168 2371065408 2371614576
+32886000000 32887647674 10962000000 10962549224 2372065408 2372614632
+32889000000 32890647794 10963000000 10963549264 2373065408 2373614672
+32892000000 32893647721 10964000000 10964549240 2374065408 2374614648
+32895000000 32896648044 10965000000 10965549348 2375065408 2375614756
+32898000000 32899648297 10966000000 10966549432 2376065408 2376614840
+32901000000 32902648407 10967000000 10967549469 2377065408 2377614877
+32904000000 32905648586 10968000000 10968549528 2378065408 2378614936
+32907000000 32908648634 10969000000 10969549544 2379065408 2379614952
+32910000000 32911648888 10970000000 10970549629 2380065408 2380615037
+32913000000 32914649007 10971000000 10971549669 2381065408 2381615077
+32916000000 32917649178 10972000000 10972549726 2382065408 2382615134
+32919000000 32920649325 10973000000 10973549775 2383065408 2383615183
+32922000000 32923649478 10974000000 10974549826 2384065408 2384615234
+32925000000 32926649624 10975000000 10975549874 2385065408 2385615282
+32928000000 32929649768 10976000000 10976549922 2386065408 2386615330
+32931000000 32932649931 10977000000 10977549977 2387065408 2387615385
+32934000000 32935650083 10978000000 10978550027 2388065408 2388615435
+32937000000 32938650237 10979000000 10979550079 2389065408 2389615487
+32940000000 32941650357 10980000000 10980550119 2390065408 2390615527
+32943000000 32944650566 10981000000 10981550188 2391065408 2391615596
+32946000000 32947650696 10982000000 10982550232 2392065408 2392615640
+32949000000 32950650810 10983000000 10983550270 2393065408 2393615678
+32952000000 32953650971 10984000000 10984550323 2394065408 2394615731
+32955000000 32956651106 10985000000 10985550368 2395065408 2395615776
+32958000000 32959651249 10986000000 10986550416 2396065408 2396615824
+32961000000 32962651349 10987000000 10987550449 2397065408 2397615857
+32964000000 32965651583 10988000000 10988550527 2398065408 2398615935
+32967000000 32968651656 10989000000 10989550552 2399065408 2399615960
+32970000000 32971651777 10990000000 10990550592 2400065408 2400616000
+32973000000 32974651966 10991000000 10991550655 2401065408 2401616063
+32976000000 32977652120 10992000000 10992550706 2402065408 2402616114
+32979000000 32980652299 10993000000 10993550766 2403065408 2403616174
+32982000000 32983652445 10994000000 10994550815 2404065408 2404616223
+32985000000 32986652572 10995000000 10995550857 2405065408 2405616265
+32988000000 32989652746 10996000000 10996550915 2406065408 2406616323
+32991000000 32992652810 10997000000 10997550936 2407065408 2407616344
+32994000000 32995653017 10998000000 10998551005 2408065408 2408616413
+32997000000 32998653198 10999000000 10999551066 2409065408 2409616474
+33000000000 33001653347 11000000000 11000551115 2410065408 2410616523
+33003000000 33004653404 11001000000 11001551134 2411065408 2411616542
+33006000000 33007653600 11002000000 11002551200 2412065408 2412616608
+33009000000 33010653790 11003000000 11003551263 2413065408 2413616671
+33012000000 33013653935 11004000000 11004551311 2414065408 2414616719
+33015000000 33016654107 11005000000 11005551369 2415065408 2415616777
+33018000000 33019654240 11006000000 11006551413 2416065408 2416616821
+33021000000 33022654311 11007000000 11007551437 2417065408 2417616845
+33024000000 33025654537 11008000000 11008551512 2418065408 2418616920
+33027000000 33028654697 11009000000 11009551565 2419065408 2419616973
+33030000000 33031654829 11010000000 11010551609 2420065408 2420617017
+33033000000 33034654937 11011000000 11011551645 2421065408 2421617053
+33036000000 33037655148 11012000000 11012551716 2422065408 2422617124
+33039000000 33040655314 11013000000 11013551771 2423065408 2423617179
+33042000000 33043655425 11014000000 11014551808 2424065408 2424617216
+33045000000 33046655585 11015000000 11015551861 2425065408 2425617269
+33048000000 33049655697 11016000000 11016551899 2426065408 2426617307
+33051000000 33052655895 11017000000 11017551965 2427065408 2427617373
+33054000000 33055655985 11018000000 11018551995 2428065408 2428617403
+33057000000 33058656210 11019000000 11019552070 2429065408 2429617478
+33060000000 33061656342 11020000000 11020552114 2430065408 2430617522
+33063000000 33064656481 11021000000 11021552160 2431065408 2431617568
+33066000000 33067656532 11022000000 11022552177 2432065408 2432617585
+33069000000 33070656743 11023000000 11023552247 2433065408 2433617655
+33072000000 33073656952 11024000000 11024552317 2434065408 2434617725
+33075000000 33076657080 11025000000 11025552360 2435065408 2435617768
+33078000000 33079657223 11026000000 11026552407 2436065408 2436617815
+33081000000 33082657394 11027000000 11027552464 2437065408 2437617872
+33084000000 33085657491 11028000000 11028552497 2438065408 2438617905
+33087000000 33088657704 11029000000 11029552568 2439065408 2439617976
+33090000000 33091657834 11030000000 11030552611 2440065408 2440618019
+33093000000 33094657984 11031000000 11031552661 2441065408 2441618069
+33096000000 33097658144 11032000000 11032552714 2442065408 2442618122
+33099000000 33100658240 11033000000 11033552746 2443065408 2443618154
+33102000000 33103658428 11034000000 11034552809 2444065408 2444618217
+33105000000 33106658596 11035000000 11035552865 2445065408 2445618273
+33108000000 33109658732 11036000000 11036552910 2446065408 2446618318
+33111000000 33112658907 11037000000 11037552969 2447065408 2447618377
+33114000000 33115659029 11038000000 11038553009 2448065408 2448618417
+33117000000 33118659179 11039000000 11039553059 2449065408 2449618467
+33120000000 33121659327 11040000000 11040553109 2450065408 2450618517
+33123000000 33124659533 11041000000 11041553177 2451065408 2451618585
+33126000000 33127659647 11042000000 11042553215 2452065408 2452618623
+33129000000 33130659779 11043000000 11043553259 2453065408 2453618667
+33132000000 33133659953 11044000000 11044553317 2454065408 2454618725
+33135000000 33136660072 11045000000 11045553357 2455065408 2455618765
+33138000000 33139660196 11046000000 11046553398 2456065408 2456618806
+33141000000 33142660415 11047000000 11047553471 2457065408 2457618879
+33144000000 33145660551 11048000000 11048553517 2458065408 2458618925
+33147000000 33148660702 11049000000 11049553567 2459065408 2459618975
+33150000000 33151660862 11050000000 11050553620 2460065408 2460619028
+33153000000 33154660983 11051000000 11051553661 2461065408 2461619069
+33156000000 33157661064 11052000000 11052553688 2462065408 2462619096
+33159000000 33160661272 11053000000 11053553757 2463065408 2463619165
+33162000000 33163661427 11054000000 11054553809 2464065408 2464619217
+33165000000 33166661586 11055000000 11055553862 2465065408 2465619270
+33168000000 33169661738 11056000000 11056553912 2466065408 2466619320
+33171000000 33172661860 11057000000 11057553953 2467065408 2467619361
+33174000000 33175662038 11058000000 11058554012 2468065408 2468619420
+33177000000 33178662187 11059000000 11059554062 2469065408 2469619470
+33180000000 33181662315 11060000000 11060554105 2470065408 2470619513
+33183000000 33184662484 11061000000 11061554161 2471065408 2471619569
+33186000000 33187662604 11062000000 11062554201 2472065408 2472619609
+33189000000 33190662531 11063000000 11063554177 2473065408 2473619585
+33192000000 33193662854 11064000000 11064554284 2474065408 2474619692
+33195000000 33196663107 11065000000 11065554369 2475065408 2475619777
+33198000000 33199663217 11066000000 11066554405 2476065408 2476619813
+33201000000 33202663396 11067000000 11067554465 2477065408 2477619873
+33204000000 33205663444 11068000000 11068554481 2478065408 2478619889
+33207000000 33208663698 11069000000 11069554566 2479065408 2479619974
+33210000000 33211663817 11070000000 11070554605 2480065408 2480620013
+33213000000 33214663988 11071000000 11071554662 2481065408 2481620070
+33216000000 33217664135 11072000000 11072554711 2482065408 2482620119
+33219000000 33220664288 11073000000 11073554762 2483065408 2483620170
+33222000000 33223664434 11074000000 11074554811 2484065408 2484620219
+33225000000 33226664578 11075000000 11075554859 2485065408 2485620267
+33228000000 33229664741 11076000000 11076554913 2486065408 2486620321
+33231000000 33232664893 11077000000 11077554964 2487065408 2487620372
+33234000000 33235665047 11078000000 11078555015 2488065408 2488620423
+33237000000 33238665167 11079000000 11079555055 2489065408 2489620463
+33240000000 33241665376 11080000000 11080555125 2490065408 2490620533
+33243000000 33244665506 11081000000 11081555168 2491065408 2491620576
+33246000000 33247665620 11082000000 11082555206 2492065408 2492620614
+33249000000 33250665781 11083000000 11083555260 2493065408 2493620668
+33252000000 33253665916 11084000000 11084555305 2494065408 2494620713
+33255000000 33256666059 11085000000 11085555353 2495065408 2495620761
+33258000000 33259666159 11086000000 11086555386 2496065408 2496620794
+33261000000 33262666393 11087000000 11087555464 2497065408 2497620872
+33264000000 33265666466 11088000000 11088555488 2498065408 2498620896
+33267000000 33268666587 11089000000 11089555529 2499065408 2499620937
+33270000000 33271666776 11090000000 11090555592 2500065408 2500621000
+33273000000 33274666930 11091000000 11091555643 2501065408 2501621051
+33276000000 33277667109 11092000000 11092555703 2502065408 2502621111
+33279000000 33280667255 11093000000 11093555751 2503065408 2503621159
+33282000000 33283667382 11094000000 11094555794 2504065408 2504621202
+33285000000 33286667556 11095000000 11095555852 2505065408 2505621260
+33288000000 33289667620 11096000000 11096555873 2506065408 2506621281
+33291000000 33292667827 11097000000 11097555942 2507065408 2507621350
+33294000000 33295668008 11098000000 11098556002 2508065408 2508621410
+33297000000 33298668157 11099000000 11099556052 2509065408 2509621460
+33300000000 33301668214 11100000000 11100556071 2510065408 2510621479
+33303000000 33304668410 11101000000 11101556136 2511065408 2511621544
+33306000000 33307668600 11102000000 11102556200 2512065408 2512621608
+33309000000 33310668745 11103000000 11103556248 2513065408 2513621656
+33312000000 33313668917 11104000000 11104556305 2514065408 2514621713
+33315000000 33316669050 11105000000 11105556350 2515065408 2515621758
+33318000000 33319669121 11106000000 11106556373 2516065408 2516621781
+33321000000 33322669347 11107000000 11107556449 2517065408 2517621857
+33324000000 33325669507 11108000000 11108556502 2518065408 2518621910
+33327000000 33328669639 11109000000 11109556546 2519065408 2519621954
+33330000000 33331669747 11110000000 11110556582 2520065408 2520621990
+33333000000 33334669958 11111000000 11111556652 2521065408 2521622060
+33336000000 33337670124 11112000000 11112556708 2522065408 2522622116
+33339000000 33340670235 11113000000 11113556745 2523065408 2523622153
+33342000000 33343670395 11114000000 11114556798 2524065408 2524622206
+33345000000 33346670507 11115000000 11115556835 2525065408 2525622243
+33348000000 33349670705 11116000000 11116556901 2526065408 2526622309
+33351000000 33352670795 11117000000 11117556931 2527065408 2527622339
+33354000000 33355671020 11118000000 11118557006 2528065408 2528622414
+33357000000 33358671152 11119000000 11119557050 2529065408 2529622458
+33360000000 33361671291 11120000000 11120557097 2530065408 2530622505
+33363000000 33364671342 11121000000 11121557114 2531065408 2531622522
+33366000000 33367671553 11122000000 11122557184 2532065408 2532622592
+33369000000 33370671762 11123000000 11123557254 2533065408 2533622662
+33372000000 33373671890 11124000000 11124557296 2534065408 2534622704
+33375000000 33376672033 11125000000 11125557344 2535065408 2535622752
+33378000000 33379672204 11126000000 11126557401 2536065408 2536622809
+33381000000 33382672301 11127000000 11127557433 2537065408 2537622841
+33384000000 33385672514 11128000000 11128557504 2538065408 2538622912
+33387000000 33388672644 11129000000 11129557548 2539065408 2539622956
+33390000000 33391672794 11130000000 11130557598 2540065408 2540623006
+33393000000 33394672954 11131000000 11131557651 2541065408 2541623059
+33396000000 33397673050 11132000000 11132557683 2542065408 2542623091
+33399000000 33400673238 11133000000 11133557746 2543065408 2543623154
+33402000000 33403673406 11134000000 11134557802 2544065408 2544623210
+33405000000 33406673542 11135000000 11135557847 2545065408 2545623255
+33408000000 33409673717 11136000000 11136557905 2546065408 2546623313
+33411000000 33412673839 11137000000 11137557946 2547065408 2547623354
+33414000000 33415673989 11138000000 11138557996 2548065408 2548623404
+33417000000 33418674137 11139000000 11139558045 2549065408 2549623453
+33420000000 33421674343 11140000000 11140558114 2550065408 2550623522
+33423000000 33424674457 11141000000 11141558152 2551065408 2551623560
+33426000000 33427674589 11142000000 11142558196 2552065408 2552623604
+33429000000 33430674763 11143000000 11143558254 2553065408 2553623662
+33432000000 33433674882 11144000000 11144558294 2554065408 2554623702
+33435000000 33436675006 11145000000 11145558335 2555065408 2555623743
+33438000000 33439675225 11146000000 11146558408 2556065408 2556623816
+33441000000 33442675361 11147000000 11147558453 2557065408 2557623861
+33444000000 33445675512 11148000000 11148558504 2558065408 2558623912
+33447000000 33448675672 11149000000 11149558557 2559065408 2559623965
+33450000000 33451675793 11150000000 11150558597 2560065408 2560624005
+33453000000 33454675874 11151000000 11151558624 2561065408 2561624032
+33456000000 33457676082 11152000000 11152558694 2562065408 2562624102
+33459000000 33460676237 11153000000 11153558745 2563065408 2563624153
+33462000000 33463676396 11154000000 11154558798 2564065408 2564624206
+33465000000 33466676548 11155000000 11155558849 2565065408 2565624257
+33468000000 33469676670 11156000000 11156558890 2566065408 2566624298
+33471000000 33472676848 11157000000 11157558949 2567065408 2567624357
+33474000000 33475676997 11158000000 11158558999 2568065408 2568624407
+33477000000 33478677125 11159000000 11159559041 2569065408 2569624449
+33480000000 33481677294 11160000000 11160559098 2570065408 2570624506
+33483000000 33484677414 11161000000 11161559138 2571065408 2571624546
+33486000000 33487677341 11162000000 11162559113 2572065408 2572624521
+33489000000 33490677664 11163000000 11163559221 2573065408 2573624629
+33492000000 33493677917 11164000000 11164559305 2574065408 2574624713
+33495000000 33496678027 11165000000 11165559342 2575065408 2575624750
+33498000000 33499678206 11166000000 11166559402 2576065408 2576624810
+33501000000 33502678254 11167000000 11167559418 2577065408 2577624826
+33504000000 33505678508 11168000000 11168559502 2578065408 2578624910
+33507000000 33508678627 11169000000 11169559542 2579065408 2579624950
+33510000000 33511678798 11170000000 11170559599 2580065408 2580625007
+33513000000 33514678945 11171000000 11171559648 2581065408 2581625056
+33516000000 33517679098 11172000000 11172559699 2582065408 2582625107
+33519000000 33520679244 11173000000 11173559748 2583065408 2583625156
+33522000000 33523679388 11174000000 11174559796 2584065408 2584625204
+33525000000 33526679551 11175000000 11175559850 2585065408 2585625258
+33528000000 33529679703 11176000000 11176559901 2586065408 2586625309
+33531000000 33532679857 11177000000 11177559952 2587065408 2587625360
+33534000000 33535679977 11178000000 11178559992 2588065408 2588625400
+33537000000 33538680186 11179000000 11179560062 2589065408 2589625470
+33540000000 33541680316 11180000000 11180560105 2590065408 2590625513
+33543000000 33544680430 11181000000 11181560143 2591065408 2591625551
+33546000000 33547680591 11182000000 11182560197 2592065408 2592625605
+33549000000 33550680726 11183000000 11183560242 2593065408 2593625650
+33552000000 33553680869 11184000000 11184560289 2594065408 2594625697
+33555000000 33556680969 11185000000 11185560323 2595065408 2595625731
+33558000000 33559681203 11186000000 11186560401 2596065408 2596625809
+33561000000 33562681276 11187000000 11187560425 2597065408 2597625833
+33564000000 33565681397 11188000000 11188560465 2598065408 2598625873
+33567000000 33568681586 11189000000 11189560528 2599065408 2599625936
+33570000000 33571681740 11190000000 11190560580 2600065408 2600625988
+33573000000 33574681919 11191000000 11191560639 2601065408 2601626047
+33576000000 33577682065 11192000000 11192560688 2602065408 2602626096
+33579000000 33580682192 11193000000 11193560730 2603065408 2603626138
+33582000000 33583682366 11194000000 11194560788 2604065408 2604626196
+33585000000 33586682430 11195000000 11195560810 2605065408 2605626218
+33588000000 33589682637 11196000000 11196560879 2606065408 2606626287
+33591000000 33592682818 11197000000 11197560939 2607065408 2607626347
+33594000000 33595682967 11198000000 11198560989 2608065408 2608626397
+33597000000 33598683024 11199000000 11199561008 2609065408 2609626416
+33600000000 33601683220 11200000000 11200561073 2610065408 2610626481
+33603000000 33604683410 11201000000 11201561136 2611065408 2611626544
+33606000000 33607683555 11202000000 11202561185 2612065408 2612626593
+33609000000 33610683727 11203000000 11203561242 2613065408 2613626650
+33612000000 33613683860 11204000000 11204561286 2614065408 2614626694
+33615000000 33616683931 11205000000 11205561310 2615065408 2615626718
+33618000000 33619684157 11206000000 11206561385 2616065408 2616626793
+33621000000 33622684317 11207000000 11207561439 2617065408 2617626847
+33624000000 33625684449 11208000000 11208561483 2618065408 2618626891
+33627000000 33628684557 11209000000 11209561519 2619065408 2619626927
+33630000000 33631684768 11210000000 11210561589 2620065408 2620626997
+33633000000 33634684934 11211000000 11211561644 2621065408 2621627052
+33636000000 33637685045 11212000000 11212561681 2622065408 2622627089
+33639000000 33640685205 11213000000 11213561735 2623065408 2623627143
+33642000000 33643685317 11214000000 11214561772 2624065408 2624627180
+33645000000 33646685515 11215000000 11215561838 2625065408 2625627246
+33648000000 33649685605 11216000000 11216561868 2626065408 2626627276
+33651000000 33652685830 11217000000 11217561943 2627065408 2627627351
+33654000000 33655685962 11218000000 11218561987 2628065408 2628627395
+33657000000 33658686101 11219000000 11219562033 2629065408 2629627441
+33660000000 33661686152 11220000000 11220562050 2630065408 2630627458
+33663000000 33664686363 11221000000 11221562121 2631065408 2631627529
+33666000000 33667686572 11222000000 11222562190 2632065408 2632627598
+33669000000 33670686700 11223000000 11223562233 2633065408 2633627641
+33672000000 33673686843 11224000000 11224562281 2634065408 2634627689
+33675000000 33676687014 11225000000 11225562338 2635065408 2635627746
+33678000000 33679687111 11226000000 11226562370 2636065408 2636627778
+33681000000 33682687324 11227000000 11227562441 2637065408 2637627849
+33684000000 33685687454 11228000000 11228562484 2638065408 2638627892
+33687000000 33688687604 11229000000 11229562534 2639065408 2639627942
+33690000000 33691687764 11230000000 11230562588 2640065408 2640627996
+33693000000 33694687860 11231000000 11231562620 2641065408 2641628028
+33696000000 33697688048 11232000000 11232562682 2642065408 2642628090
+33699000000 33700688216 11233000000 11233562738 2643065408 2643628146
+33702000000 33703688352 11234000000 11234562784 2644065408 2644628192
+33705000000 33706688527 11235000000 11235562842 2645065408 2645628250
+33708000000 33709688649 11236000000 11236562883 2646065408 2646628291
+33711000000 33712688799 11237000000 11237562933 2647065408 2647628341
+33714000000 33715688947 11238000000 11238562982 2648065408 2648628390
+33717000000 33718689153 11239000000 11239563051 2649065408 2649628459
+33720000000 33721689267 11240000000 11240563089 2650065408 2650628497
+33723000000 33724689399 11241000000 11241563133 2651065408 2651628541
+33726000000 33727689573 11242000000 11242563191 2652065408 2652628599
+33729000000 33730689692 11243000000 11243563230 2653065408 2653628638
+33732000000 33733689816 11244000000 11244563272 2654065408 2654628680
+33735000000 33736690035 11245000000 11245563345 2655065408 2655628753
+33738000000 33739690171 11246000000 11246563390 2656065408 2656628798
+33741000000 33742690322 11247000000 11247563440 2657065408 2657628848
+33744000000 33745690482 11248000000 11248563494 2658065408 2658628902
+33747000000 33748690603 11249000000 11249563534 2659065408 2659628942
+33750000000 33751690684 11250000000 11250563561 2660065408 2660628969
+33753000000 33754690892 11251000000 11251563630 2661065408 2661629038
+33756000000 33757691047 11252000000 11252563682 2662065408 2662629090
+33759000000 33760691206 11253000000 11253563735 2663065408 2663629143
+33762000000 33763691358 11254000000 11254563786 2664065408 2664629194
+33765000000 33766691480 11255000000 11255563826 2665065408 2665629234
+33768000000 33769691658 11256000000 11256563886 2666065408 2666629294
+33771000000 33772691807 11257000000 11257563935 2667065408 2667629343
+33774000000 33775691935 11258000000 11258563978 2668065408 2668629386
+33777000000 33778692104 11259000000 11259564034 2669065408 2669629442
+33780000000 33781692224 11260000000 11260564074 2670065408 2670629482
+33783000000 33784692151 11261000000 11261564050 2671065408 2671629458
+33786000000 33787692474 11262000000 11262564158 2672065408 2672629566
+33789000000 33790692727 11263000000 11263564242 2673065408 2673629650
+33792000000 33793692837 11264000000 11264564279 2674065408 2674629687
+33795000000 33796693016 11265000000 11265564338 2675065408 2675629746
+33798000000 33799693064 11266000000 11266564354 2676065408 2676629762
+33801000000 33802693318 11267000000 11267564439 2677065408 2677629847
+33804000000 33805693437 11268000000 11268564479 2678065408 2678629887
+33807000000 33808693608 11269000000 11269564536 2679065408 2679629944
+33810000000 33811693755 11270000000 11270564585 2680065408 2680629993
+33813000000 33814693908 11271000000 11271564636 2681065408 2681630044
+33816000000 33817694054 11272000000 11272564684 2682065408 2682630092
+33819000000 33820694198 11273000000 11273564732 2683065408 2683630140
+33822000000 33823694361 11274000000 11274564787 2684065408 2684630195
+33825000000 33826694513 11275000000 11275564837 2685065408 2685630245
+33828000000 33829694667 11276000000 11276564889 2686065408 2686630297
+33831000000 33832694787 11277000000 11277564929 2687065408 2687630337
+33834000000 33835694996 11278000000 11278564998 2688065408 2688630406
+33837000000 33838695126 11279000000 11279565042 2689065408 2689630450
+33840000000 33841695240 11280000000 11280565080 2690065408 2690630488
+33843000000 33844695401 11281000000 11281565133 2691065408 2691630541
+33846000000 33847695536 11282000000 11282565178 2692065408 2692630586
+33849000000 33850695679 11283000000 11283565226 2693065408 2693630634
+33852000000 33853695779 11284000000 11284565259 2694065408 2694630667
+33855000000 33856696013 11285000000 11285565337 2695065408 2695630745
+33858000000 33859696086 11286000000 11286565362 2696065408 2696630770
+33861000000 33862696207 11287000000 11287565402 2697065408 2697630810
+33864000000 33865696396 11288000000 11288565465 2698065408 2698630873
+33867000000 33868696550 11289000000 11289565516 2699065408 2699630924
+33870000000 33871696729 11290000000 11290565576 2700065408 2700630984
+33873000000 33874696875 11291000000 11291565625 2701065408 2701631033
+33876000000 33877697002 11292000000 11292565667 2702065408 2702631075
+33879000000 33880697176 11293000000 11293565725 2703065408 2703631133
+33882000000 33883697240 11294000000 11294565746 2704065408 2704631154
+33885000000 33886697447 11295000000 11295565815 2705065408 2705631223
+33888000000 33889697628 11296000000 11296565876 2706065408 2706631284
+33891000000 33892697777 11297000000 11297565925 2707065408 2707631333
+33894000000 33895697834 11298000000 11298565944 2708065408 2708631352
+33897000000 33898698030 11299000000 11299566010 2709065408 2709631418
+33900000000 33901698220 11300000000 11300566073 2710065408 2710631481
+33903000000 33904698365 11301000000 11301566121 2711065408 2711631529
+33906000000 33907698537 11302000000 11302566179 2712065408 2712631587
+33909000000 33910698670 11303000000 11303566223 2713065408 2713631631
+33912000000 33913698741 11304000000 11304566247 2714065408 2714631655
+33915000000 33916698967 11305000000 11305566322 2715065408 2715631730
+33918000000 33919699127 11306000000 11306566375 2716065408 2716631783
+33921000000 33922699259 11307000000 11307566419 2717065408 2717631827
+33924000000 33925699367 11308000000 11308566455 2718065408 2718631863
+33927000000 33928699578 11309000000 11309566526 2719065408 2719631934
+33930000000 33931699744 11310000000 11310566581 2720065408 2720631989
+33933000000 33934699855 11311000000 11311566618 2721065408 2721632026
+33936000000 33937700015 11312000000 11312566671 2722065408 2722632079
+33939000000 33940700127 11313000000 11313566709 2723065408 2723632117
+33942000000 33943700325 11314000000 11314566775 2724065408 2724632183
+33945000000 33946700415 11315000000 11315566805 2725065408 2725632213
+33948000000 33949700640 11316000000 11316566880 2726065408 2726632288
+33951000000 33952700772 11317000000 11317566924 2727065408 2727632332
+33954000000 33955700911 11318000000 11318566970 2728065408 2728632378
+33957000000 33958700962 11319000000 11319566987 2729065408 2729632395
+33960000000 33961701173 11320000000 11320567057 2730065408 2730632465
+33963000000 33964701382 11321000000 11321567127 2731065408 2731632535
+33966000000 33967701510 11322000000 11322567170 2732065408 2732632578
+33969000000 33970701653 11323000000 11323567217 2733065408 2733632625
+33972000000 33973701824 11324000000 11324567274 2734065408 2734632682
+33975000000 33976701921 11325000000 11325567307 2735065408 2735632715
+33978000000 33979702134 11326000000 11326567378 2736065408 2736632786
+33981000000 33982702264 11327000000 11327567421 2737065408 2737632829
+33984000000 33985702414 11328000000 11328567471 2738065408 2738632879
+33987000000 33988702574 11329000000 11329567524 2739065408 2739632932
+33990000000 33991702670 11330000000 11330567556 2740065408 2740632964
+33993000000 33994702858 11331000000 11331567619 2741065408 2741633027
+33996000000 33997703026 11332000000 11332567675 2742065408 2742633083
+33999000000 34000703162 11333000000 11333567720 2743065408 2743633128
+34002000000 34003703337 11334000000 11334567779 2744065408 2744633187
+34005000000 34006703459 11335000000 11335567819 2745065408 2745633227
+34008000000 34009703609 11336000000 11336567869 2746065408 2746633277
+34011000000 34012703757 11337000000 11337567919 2747065408 2747633327
+34014000000 34015703963 11338000000 11338567987 2748065408 2748633395
+34017000000 34018704077 11339000000 11339568025 2749065408 2749633433
+34020000000 34021704209 11340000000 11340568069 2750065408 2750633477
+34023000000 34024704383 11341000000 11341568127 2751065408 2751633535
+34026000000 34027704502 11342000000 11342568167 2752065408 2752633575
+34029000000 34030704626 11343000000 11343568208 2753065408 2753633616
+34032000000 34033704845 11344000000 11344568281 2754065408 2754633689
+34035000000 34036704981 11345000000 11345568327 2755065408 2755633735
+34038000000 34039705132 11346000000 11346568377 2756065408 2756633785
+34041000000 34042705292 11347000000 11347568430 2757065408 2757633838
+34044000000 34045705413 11348000000 11348568471 2758065408 2758633879
+34047000000 34048705494 11349000000 11349568498 2759065408 2759633906
+34050000000 34051705702 11350000000 11350568567 2760065408 2760633975
+34053000000 34054705857 11351000000 11351568619 2761065408 2761634027
+34056000000 34057706016 11352000000 11352568672 2762065408 2762634080
+34059000000 34060706168 11353000000 11353568722 2763065408 2763634130
+34062000000 34063706290 11354000000 11354568763 2764065408 2764634171
+34065000000 34066706468 11355000000 11355568822 2765065408 2765634230
+34068000000 34069706617 11356000000 11356568872 2766065408 2766634280
+34071000000 34072706745 11357000000 11357568915 2767065408 2767634323
+34074000000 34075706914 11358000000 11358568971 2768065408 2768634379
+34077000000 34078707034 11359000000 11359569011 2769065408 2769634419
+34080000000 34081706961 11360000000 11360568987 2770065408 2770634395
+34083000000 34084707284 11361000000 11361569094 2771065408 2771634502
+34086000000 34087707537 11362000000 11362569179 2772065408 2772634587
+34089000000 34090707647 11363000000 11363569215 2773065408 2773634623
+34092000000 34093707826 11364000000 11364569275 2774065408 2774634683
+34095000000 34096707874 11365000000 11365569291 2775065408 2775634699
+34098000000 34099708128 11366000000 11366569376 2776065408 2776634784
+34101000000 34102708247 11367000000 11367569415 2777065408 2777634823
+34104000000 34105708418 11368000000 11368569472 2778065408 2778634880
+34107000000 34108708565 11369000000 11369569521 2779065408 2779634929
+34110000000 34111708718 11370000000 11370569572 2780065408 2780634980
+34113000000 34114708864 11371000000 11371569621 2781065408 2781635029
+34116000000 34117709008 11372000000 11372569669 2782065408 2782635077
+34119000000 34120709171 11373000000 11373569723 2783065408 2783635131
+34122000000 34123709323 11374000000 11374569774 2784065408 2784635182
+34125000000 34126709477 11375000000 11375569825 2785065408 2785635233
+34128000000 34129709597 11376000000 11376569865 2786065408 2786635273
+34131000000 34132709806 11377000000 11377569935 2787065408 2787635343
+34134000000 34135709936 11378000000 11378569978 2788065408 2788635386
+34137000000 34138710050 11379000000 11379570016 2789065408 2789635424
+34140000000 34141710211 11380000000 11380570070 2790065408 2790635478
+34143000000 34144710346 11381000000 11381570115 2791065408 2791635523
+34146000000 34147710489 11382000000 11382570163 2792065408 2792635571
+34149000000 34150710589 11383000000 11383570196 2793065408 2793635604
+34152000000 34153710823 11384000000 11384570274 2794065408 2794635682
+34155000000 34156710896 11385000000 11385570298 2795065408 2795635706
+34158000000 34159711017 11386000000 11386570339 2796065408 2796635747
+34161000000 34162711206 11387000000 11387570402 2797065408 2797635810
+34164000000 34165711360 11388000000 11388570453 2798065408 2798635861
+34167000000 34168711539 11389000000 11389570513 2799065408 2799635921
+34170000000 34171711685 11390000000 11390570561 2800065408 2800635969
+34173000000 34174711812 11391000000 11391570604 2801065408 2801636012
+34176000000 34177711986 11392000000 11392570662 2802065408 2802636070
+34179000000 34180712050 11393000000 11393570683 2803065408 2803636091
+34182000000 34183712257 11394000000 11394570752 2804065408 2804636160
+34185000000 34186712438 11395000000 11395570812 2805065408 2805636220
+34188000000 34189712587 11396000000 11396570862 2806065408 2806636270
+34191000000 34192712644 11397000000 11397570881 2807065408 2807636289
+34194000000 34195712840 11398000000 11398570946 2808065408 2808636354
+34197000000 34198713030 11399000000 11399571010 2809065408 2809636418
+34200000000 34201713175 11400000000 11400571058 2810065408 2810636466
+34203000000 34204713347 11401000000 11401571115 2811065408 2811636523
+34206000000 34207713480 11402000000 11402571160 2812065408 2812636568
+34209000000 34210713551 11403000000 11403571183 2813065408 2813636591
+34212000000 34213713777 11404000000 11404571259 2814065408 2814636667
+34215000000 34216713937 11405000000 11405571312 2815065408 2815636720
+34218000000 34219714069 11406000000 11406571356 2816065408 2816636764
+34221000000 34222714177 11407000000 11407571392 2817065408 2817636800
+34224000000 34225714388 11408000000 11408571462 2818065408 2818636870
+34227000000 34228714554 11409000000 11409571518 2819065408 2819636926
+34230000000 34231714665 11410000000 11410571555 2820065408 2820636963
+34233000000 34234714825 11411000000 11411571608 2821065408 2821637016
+34236000000 34237714937 11412000000 11412571645 2822065408 2822637053
+34239000000 34240715135 11413000000 11413571711 2823065408 2823637119
+34242000000 34243715225 11414000000 11414571741 2824065408 2824637149
+34245000000 34246715450 11415000000 11415571816 2825065408 2825637224
+34248000000 34249715582 11416000000 11416571860 2826065408 2826637268
+34251000000 34252715721 11417000000 11417571907 2827065408 2827637315
+34254000000 34255715772 11418000000 11418571924 2828065408 2828637332
+34257000000 34258715983 11419000000 11419571994 2829065408 2829637402
+34260000000 34261716192 11420000000 11420572064 2830065408 2830637472
+34263000000 34264716320 11421000000 11421572106 2831065408 2831637514
+34266000000 34267716463 11422000000 11422572154 2832065408 2832637562
+34269000000 34270716634 11423000000 11423572211 2833065408 2833637619
+34272000000 34273716731 11424000000 11424572243 2834065408 2834637651
+34275000000 34276716944 11425000000 11425572314 2835065408 2835637722
+34278000000 34279717074 11426000000 11426572358 2836065408 2836637766
+34281000000 34282717224 11427000000 11427572408 2837065408 2837637816
+34284000000 34285717384 11428000000 11428572461 2838065408 2838637869
+34287000000 34288717480 11429000000 11429572493 2839065408 2839637901
+34290000000 34291717668 11430000000 11430572556 2840065408 2840637964
+34293000000 34294717836 11431000000 11431572612 2841065408 2841638020
+34296000000 34297717972 11432000000 11432572657 2842065408 2842638065
+34299000000 34300718147 11433000000 11433572715 2843065408 2843638123
+34302000000 34303718269 11434000000 11434572756 2844065408 2844638164
+34305000000 34306718419 11435000000 11435572806 2845065408 2845638214
+34308000000 34309718567 11436000000 11436572855 2846065408 2846638263
+34311000000 34312718773 11437000000 11437572924 2847065408 2847638332
+34314000000 34315718887 11438000000 11438572962 2848065408 2848638370
+34317000000 34318719019 11439000000 11439573006 2849065408 2849638414
+34320000000 34321719193 11440000000 11440573064 2850065408 2850638472
+34323000000 34324719312 11441000000 11441573104 2851065408 2851638512
+34326000000 34327719436 11442000000 11442573145 2852065408 2852638553
+34329000000 34330719655 11443000000 11443573218 2853065408 2853638626
+34332000000 34333719791 11444000000 11444573263 2854065408 2854638671
+34335000000 34336719942 11445000000 11445573314 2855065408 2855638722
+34338000000 34339720102 11446000000 11446573367 2856065408 2856638775
+34341000000 34342720223 11447000000 11447573407 2857065408 2857638815
+34344000000 34345720304 11448000000 11448573434 2858065408 2858638842
+34347000000 34348720512 11449000000 11449573504 2859065408 2859638912
+34350000000 34351720667 11450000000 11450573555 2860065408 2860638963
+34353000000 34354720826 11451000000 11451573608 2861065408 2861639016
+34356000000 34357720978 11452000000 11452573659 2862065408 2862639067
+34359000000 34360721100 11453000000 11453573700 2863065408 2863639108
+34362000000 34363721278 11454000000 11454573759 2864065408 2864639167
+34365000000 34366721427 11455000000 11455573809 2865065408 2865639217
+34368000000 34369721555 11456000000 11456573851 2866065408 2866639259
+34371000000 34372721724 11457000000 11457573908 2867065408 2867639316
+34374000000 34375721844 11458000000 11458573948 2868065408 2868639356
+34377000000 34378721771 11459000000 11459573923 2869065408 2869639331
+34380000000 34381722094 11460000000 11460574031 2870065408 2870639439
+34383000000 34384722347 11461000000 11461574115 2871065408 2871639523
+34386000000 34387722457 11462000000 11462574152 2872065408 2872639560
+34389000000 34390722636 11463000000 11463574212 2873065408 2873639620
+34392000000 34393722684 11464000000 11464574228 2874065408 2874639636
+34395000000 34396722938 11465000000 11465574312 2875065408 2875639720
+34398000000 34399723057 11466000000 11466574352 2876065408 2876639760
+34401000000 34402723228 11467000000 11467574409 2877065408 2877639817
+34404000000 34405723375 11468000000 11468574458 2878065408 2878639866
+34407000000 34408723528 11469000000 11469574509 2879065408 2879639917
+34410000000 34411723674 11470000000 11470574558 2880065408 2880639966
+34413000000 34414723818 11471000000 11471574606 2881065408 2881640014
+34416000000 34417723981 11472000000 11472574660 2882065408 2882640068
+34419000000 34420724133 11473000000 11473574711 2883065408 2883640119
+34422000000 34423724287 11474000000 11474574762 2884065408 2884640170
+34425000000 34426724407 11475000000 11475574802 2885065408 2885640210
+34428000000 34429724616 11476000000 11476574872 2886065408 2886640280
+34431000000 34432724746 11477000000 11477574915 2887065408 2887640323
+34434000000 34435724860 11478000000 11478574953 2888065408 2888640361
+34437000000 34438725021 11479000000 11479575007 2889065408 2889640415
+34440000000 34441725156 11480000000 11480575052 2890065408 2890640460
+34443000000 34444725299 11481000000 11481575099 2891065408 2891640507
+34446000000 34447725399 11482000000 11482575133 2892065408 2892640541
+34449000000 34450725633 11483000000 11483575211 2893065408 2893640619
+34452000000 34453725706 11484000000 11484575235 2894065408 2894640643
+34455000000 34456725827 11485000000 11485575275 2895065408 2895640683
+34458000000 34459726016 11486000000 11486575338 2896065408 2896640746
+34461000000 34462726170 11487000000 11487575390 2897065408 2897640798
+34464000000 34465726349 11488000000 11488575449 2898065408 2898640857
+34467000000 34468726495 11489000000 11489575498 2899065408 2899640906
+34470000000 34471726622 11490000000 11490575540 2900065408 2900640948
+34473000000 34474726796 11491000000 11491575598 2901065408 2901641006
+34476000000 34477726860 11492000000 11492575620 2902065408 2902641028
+34479000000 34480727067 11493000000 11493575689 2903065408 2903641097
+34482000000 34483727248 11494000000 11494575749 2904065408 2904641157
+34485000000 34486727397 11495000000 11495575799 2905065408 2905641207
+34488000000 34489727454 11496000000 11496575818 2906065408 2906641226
+34491000000 34492727650 11497000000 11497575883 2907065408 2907641291
+34494000000 34495727840 11498000000 11498575946 2908065408 2908641354
+34497000000 34498727985 11499000000 11499575995 2909065408 2909641403
+34500000000 34501728157 11500000000 11500576052 2910065408 2910641460
+34503000000 34504728290 11501000000 11501576096 2911065408 2911641504
+34506000000 34507728361 11502000000 11502576120 2912065408 2912641528
+34509000000 34510728587 11503000000 11503576195 2913065408 2913641603
+34512000000 34513728747 11504000000 11504576249 2914065408 2914641657
+34515000000 34516728879 11505000000 11505576293 2915065408 2915641701
+34518000000 34519728987 11506000000 11506576329 2916065408 2916641737
+34521000000 34522729198 11507000000 11507576399 2917065408 2917641807
+34524000000 34525729364 11508000000 11508576454 2918065408 2918641862
+34527000000 34528729475 11509000000 11509576491 2919065408 2919641899
+34530000000 34531729635 11510000000 11510576545 2920065408 2920641953
+34533000000 34534729747 11511000000 11511576582 2921065408 2921641990
+34536000000 34537729945 11512000000 11512576648 2922065408 2922642056
+34539000000 34540730035 11513000000 11513576678 2923065408 2923642086
+34542000000 34543730260 11514000000 11514576753 2924065408 2924642161
+34545000000 34546730392 11515000000 11515576797 2925065408 2925642205
+34548000000 34549730531 11516000000 11516576843 2926065408 2926642251
+34551000000 34552730582 11517000000 11517576860 2927065408 2927642268
+34554000000 34555730793 11518000000 11518576931 2928065408 2928642339
+34557000000 34558731002 11519000000 11519577000 2929065408 2929642408
+34560000000 34561731130 11520000000 11520577043 2930065408 2930642451
+34563000000 34564731273 11521000000 11521577091 2931065408 2931642499
+34566000000 34567731444 11522000000 11522577148 2932065408 2932642556
+34569000000 34570731541 11523000000 11523577180 2933065408 2933642588
+34572000000 34573731754 11524000000 11524577251 2934065408 2934642659
+34575000000 34576731884 11525000000 11525577294 2935065408 2935642702
+34578000000 34579732034 11526000000 11526577344 2936065408 2936642752
+34581000000 34582732194 11527000000 11527577398 2937065408 2937642806
+34584000000 34585732290 11528000000 11528577430 2938065408 2938642838
+34587000000 34588732478 11529000000 11529577492 2939065408 2939642900
+34590000000 34591732646 11530000000 11530577548 2940065408 2940642956
+34593000000 34594732782 11531000000 11531577594 2941065408 2941643002
+34596000000 34597732957 11532000000 11532577652 2942065408 2942643060
+34599000000 34600733079 11533000000 11533577693 2943065408 2943643101
+34602000000 34603733229 11534000000 11534577743 2944065408 2944643151
+34605000000 34606733377 11535000000 11535577792 2945065408 2945643200
+34608000000 34609733583 11536000000 11536577861 2946065408 2946643269
+34611000000 34612733697 11537000000 11537577899 2947065408 2947643307
+34614000000 34615733829 11538000000 11538577943 2948065408 2948643351
+34617000000 34618734003 11539000000 11539578001 2949065408 2949643409
+34620000000 34621734122 11540000000 11540578040 2950065408 2950643448
+34623000000 34624734246 11541000000 11541578082 2951065408 2951643490
+34626000000 34627734465 11542000000 11542578155 2952065408 2952643563
+34629000000 34630734601 11543000000 11543578200 2953065408 2953643608
+34632000000 34633734752 11544000000 11544578250 2954065408 2954643658
+34635000000 34636734912 11545000000 11545578304 2955065408 2955643712
+34638000000 34639735033 11546000000 11546578344 2956065408 2956643752
+34641000000 34642735114 11547000000 11547578371 2957065408 2957643779
+34644000000 34645735322 11548000000 11548578440 2958065408 2958643848
+34647000000 34648735477 11549000000 11549578492 2959065408 2959643900
+34650000000 34651735636 11550000000 11550578545 2960065408 2960643953
+34653000000 34654735788 11551000000 11551578596 2961065408 2961644004
+34656000000 34657735910 11552000000 11552578636 2962065408 2962644044
+34659000000 34660736088 11553000000 11553578696 2963065408 2963644104
+34662000000 34663736237 11554000000 11554578745 2964065408 2964644153
+34665000000 34666736365 11555000000 11555578788 2965065408 2965644196
+34668000000 34669736534 11556000000 11556578844 2966065408 2966644252
+34671000000 34672736654 11557000000 11557578884 2967065408 2967644292
+34674000000 34675736581 11558000000 11558578860 2968065408 2968644268
+34677000000 34678736904 11559000000 11559578968 2969065408 2969644376
+34680000000 34681737157 11560000000 11560579052 2970065408 2970644460
+34683000000 34684737267 11561000000 11561579089 2971065408 2971644497
+34686000000 34687737446 11562000000 11562579148 2972065408 2972644556
+34689000000 34690737494 11563000000 11563579164 2973065408 2973644572
+34692000000 34693737748 11564000000 11564579249 2974065408 2974644657
+34695000000 34696737867 11565000000 11565579289 2975065408 2975644697
+34698000000 34699738038 11566000000 11566579346 2976065408 2976644754
+34701000000 34702738185 11567000000 11567579395 2977065408 2977644803
+34704000000 34705738338 11568000000 11568579446 2978065408 2978644854
+34707000000 34708738484 11569000000 11569579494 2979065408 2979644902
+34710000000 34711738628 11570000000 11570579542 2980065408 2980644950
+34713000000 34714738791 11571000000 11571579597 2981065408 2981645005
+34716000000 34717738943 11572000000 11572579647 2982065408 2982645055
+34719000000 34720739097 11573000000 11573579699 2983065408 2983645107
+34722000000 34723739217 11574000000 11574579739 2984065408 2984645147
+34725000000 34726739426 11575000000 11575579808 2985065408 2985645216
+34728000000 34729739556 11576000000 11576579852 2986065408 2986645260
+34731000000 34732739670 11577000000 11577579890 2987065408 2987645298
+34734000000 34735739831 11578000000 11578579943 2988065408 2988645351
+34737000000 34738739966 11579000000 11579579988 2989065408 2989645396
+34740000000 34741740109 11580000000 11580580036 2990065408 2990645444
+34743000000 34744740209 11581000000 11581580069 2991065408 2991645477
+34746000000 34747740443 11582000000 11582580147 2992065408 2992645555
+34749000000 34750740516 11583000000 11583580172 2993065408 2993645580
+34752000000 34753740637 11584000000 11584580212 2994065408 2994645620
+34755000000 34756740826 11585000000 11585580275 2995065408 2995645683
+34758000000 34759740980 11586000000 11586580326 2996065408 2996645734
+34761000000 34762741159 11587000000 11587580386 2997065408 2997645794
+34764000000 34765741305 11588000000 11588580435 2998065408 2998645843
+34767000000 34768741432 11589000000 11589580477 2999065408 2999645885
+34770000000 34771741606 11590000000 11590580535 3000065408 3000645943
+34773000000 34774741670 11591000000 11591580556 3001065408 3001645964
+34776000000 34777741877 11592000000 11592580625 3002065408 3002646033
+34779000000 34780742058 11593000000 11593580686 3003065408 3003646094
+34782000000 34783742207 11594000000 11594580735 3004065408 3004646143
+34785000000 34786742264 11595000000 11595580754 3005065408 3005646162
+34788000000 34789742460 11596000000 11596580820 3006065408 3006646228
+34791000000 34792742650 11597000000 11597580883 3007065408 3007646291
+34794000000 34795742795 11598000000 11598580931 3008065408 3008646339
+34797000000 34798742967 11599000000 11599580989 3009065408 3009646397
+34800000000 34801743100 11600000000 11600581033 3010065408 3010646441
+34803000000 34804743171 11601000000 11601581057 3011065408 3011646465
+34806000000 34807743397 11602000000 11602581132 3012065408 3012646540
+34809000000 34810743557 11603000000 11603581185 3013065408 3013646593
+34812000000 34813743689 11604000000 11604581229 3014065408 3014646637
+34815000000 34816743797 11605000000 11605581265 3015065408 3015646673
+34818000000 34819744008 11606000000 11606581336 3016065408 3016646744
+34821000000 34822744174 11607000000 11607581391 3017065408 3017646799
+34824000000 34825744285 11608000000 11608581428 3018065408 3018646836
+34827000000 34828744445 11609000000 11609581481 3019065408 3019646889
+34830000000 34831744557 11610000000 11610581519 3020065408 3020646927
+34833000000 34834744755 11611000000 11611581585 3021065408 3021646993
+34836000000 34837744845 11612000000 11612581615 3022065408 3022647023
+34839000000 34840745070 11613000000 11613581690 3023065408 3023647098
+34842000000 34843745202 11614000000 11614581734 3024065408 3024647142
+34845000000 34846745341 11615000000 11615581780 3025065408 3025647188
+34848000000 34849745392 11616000000 11616581797 3026065408 3026647205
+34851000000 34852745603 11617000000 11617581867 3027065408 3027647275
+34854000000 34855745812 11618000000 11618581937 3028065408 3028647345
+34857000000 34858745940 11619000000 11619581980 3029065408 3029647388
+34860000000 34861746083 11620000000 11620582027 3030065408 3030647435
+34863000000 34864746254 11621000000 11621582084 3031065408 3031647492
+34866000000 34867746351 11622000000 11622582117 3032065408 3032647525
+34869000000 34870746564 11623000000 11623582188 3033065408 3033647596
+34872000000 34873746694 11624000000 11624582231 3034065408 3034647639
+34875000000 34876746844 11625000000 11625582281 3035065408 3035647689
+34878000000 34879747004 11626000000 11626582334 3036065408 3036647742
+34881000000 34882747100 11627000000 11627582366 3037065408 3037647774
+34884000000 34885747288 11628000000 11628582429 3038065408 3038647837
+34887000000 34888747456 11629000000 11629582485 3039065408 3039647893
+34890000000 34891747592 11630000000 11630582530 3040065408 3040647938
+34893000000 34894747767 11631000000 11631582589 3041065408 3041647997
+34896000000 34897747889 11632000000 11632582629 3042065408 3042648037
+34899000000 34900748039 11633000000 11633582679 3043065408 3043648087
+34902000000 34903748187 11634000000 11634582729 3044065408 3044648137
+34905000000 34906748393 11635000000 11635582797 3045065408 3045648205
+34908000000 34909748507 11636000000 11636582835 3046065408 3046648243
+34911000000 34912748639 11637000000 11637582879 3047065408 3047648287
+34914000000 34915748813 11638000000 11638582937 3048065408 3048648345
+34917000000 34918748932 11639000000 11639582977 3049065408 3049648385
+34920000000 34921749056 11640000000 11640583018 3050065408 3050648426
+34923000000 34924749275 11641000000 11641583091 3051065408 3051648499
+34926000000 34927749411 11642000000 11642583137 3052065408 3052648545
+34929000000 34930749562 11643000000 11643583187 3053065408 3053648595
+34932000000 34933749722 11644000000 11644583240 3054065408 3054648648
+34935000000 34936749843 11645000000 11645583281 3055065408 3055648689
+34938000000 34939749924 11646000000 11646583308 3056065408 3056648716
+34941000000 34942750132 11647000000 11647583377 3057065408 3057648785
+34944000000 34945750287 11648000000 11648583429 3058065408 3058648837
+34947000000 34948750446 11649000000 11649583482 3059065408 3059648890
+34950000000 34951750598 11650000000 11650583532 3060065408 3060648940
+34953000000 34954750720 11651000000 11651583573 3061065408 3061648981
+34956000000 34957750898 11652000000 11652583632 3062065408 3062649040
+34959000000 34960751047 11653000000 11653583682 3063065408 3063649090
+34962000000 34963751175 11654000000 11654583725 3064065408 3064649133
+34965000000 34966751344 11655000000 11655583781 3065065408 3065649189
+34968000000 34969751464 11656000000 11656583821 3066065408 3066649229
+34971000000 34972751391 11657000000 11657583797 3067065408 3067649205
+34974000000 34975751714 11658000000 11658583904 3068065408 3068649312
+34977000000 34978751967 11659000000 11659583989 3069065408 3069649397
+34980000000 34981752077 11660000000 11660584025 3070065408 3070649433
+34983000000 34984752256 11661000000 11661584085 3071065408 3071649493
+34986000000 34987752304 11662000000 11662584101 3072065408 3072649509
+34989000000 34990752558 11663000000 11663584186 3073065408 3073649594
+34992000000 34993752677 11664000000 11664584225 3074065408 3074649633
+34995000000 34996752848 11665000000 11665584282 3075065408 3075649690
+34998000000 34999752995 11666000000 11666584331 3076065408 3076649739
+35001000000 35002753148 11667000000 11667584382 3077065408 3077649790
+35004000000 35005753294 11668000000 11668584431 3078065408 3078649839
+35007000000 35008753438 11669000000 11669584479 3079065408 3079649887
+35010000000 35011753601 11670000000 11670584533 3080065408 3080649941
+35013000000 35014753753 11671000000 11671584584 3081065408 3081649992
+35016000000 35017753907 11672000000 11672584635 3082065408 3082650043
+35019000000 35020754027 11673000000 11673584675 3083065408 3083650083
+35022000000 35023754236 11674000000 11674584745 3084065408 3084650153
+35025000000 35026754366 11675000000 11675584788 3085065408 3085650196
+35028000000 35029754480 11676000000 11676584826 3086065408 3086650234
+35031000000 35032754641 11677000000 11677584880 3087065408 3087650288
+35034000000 35035754776 11678000000 11678584925 3088065408 3088650333
+35037000000 35038754919 11679000000 11679584973 3089065408 3089650381
+35040000000 35041755019 11680000000 11680585006 3090065408 3090650414
+35043000000 35044755253 11681000000 11681585084 3091065408 3091650492
+35046000000 35047755326 11682000000 11682585108 3092065408 3092650516
+35049000000 35050755447 11683000000 11683585149 3093065408 3093650557
+35052000000 35053755636 11684000000 11684585212 3094065408 3094650620
+35055000000 35056755790 11685000000 11685585263 3095065408 3095650671
+35058000000 35059755969 11686000000 11686585323 3096065408 3096650731
+35061000000 35062756115 11687000000 11687585371 3097065408 3097650779
+35064000000 35065756242 11688000000 11688585414 3098065408 3098650822
+35067000000 35068756416 11689000000 11689585472 3099065408 3099650880
+35070000000 35071756480 11690000000 11690585493 3100065408 3100650901
+35073000000 35074756687 11691000000 11691585562 3101065408 3101650970
+35076000000 35077756868 11692000000 11692585622 3102065408 3102651030
+35079000000 35080757017 11693000000 11693585672 3103065408 3103651080
+35082000000 35083757074 11694000000 11694585691 3104065408 3104651099
+35085000000 35086757270 11695000000 11695585756 3105065408 3105651164
+35088000000 35089757460 11696000000 11696585820 3106065408 3106651228
+35091000000 35092757605 11697000000 11697585868 3107065408 3107651276
+35094000000 35095757777 11698000000 11698585925 3108065408 3108651333
+35097000000 35098757910 11699000000 11699585970 3109065408 3109651378
+35100000000 35101757981 11700000000 11700585993 3110065408 3110651401
+35103000000 35104758207 11701000000 11701586069 3111065408 3111651477
+35106000000 35107758367 11702000000 11702586122 3112065408 3112651530
+35109000000 35110758499 11703000000 11703586166 3113065408 3113651574
+35112000000 35113758607 11704000000 11704586202 3114065408 3114651610
+35115000000 35116758818 11705000000 11705586272 3115065408 3115651680
+35118000000 35119758984 11706000000 11706586328 3116065408 3116651736
+35121000000 35122759095 11707000000 11707586365 3117065408 3117651773
+35124000000 35125759255 11708000000 11708586418 3118065408 3118651826
+35127000000 35128759367 11709000000 11709586455 3119065408 3119651863
+35130000000 35131759565 11710000000 11710586521 3120065408 3120651929
+35133000000 35134759655 11711000000 11711586551 3121065408 3121651959
+35136000000 35137759880 11712000000 11712586626 3122065408 3122652034
+35139000000 35140760012 11713000000 11713586670 3123065408 3123652078
+35142000000 35143760151 11714000000 11714586717 3124065408 3124652125
+35145000000 35146760202 11715000000 11715586734 3125065408 3125652142
+35148000000 35149760413 11716000000 11716586804 3126065408 3126652212
+35151000000 35152760622 11717000000 11717586874 3127065408 3127652282
+35154000000 35155760750 11718000000 11718586916 3128065408 3128652324
+35157000000 35158760893 11719000000 11719586964 3129065408 3129652372
+35160000000 35161761064 11720000000 11720587021 3130065408 3130652429
+35163000000 35164761161 11721000000 11721587053 3131065408 3131652461
+35166000000 35167761374 11722000000 11722587124 3132065408 3132652532
+35169000000 35170761504 11723000000 11723587168 3133065408 3133652576
+35172000000 35173761654 11724000000 11724587218 3134065408 3134652626
+35175000000 35176761814 11725000000 11725587271 3135065408 3135652679
+35178000000 35179761910 11726000000 11726587303 3136065408 3136652711
+35181000000 35182762098 11727000000 11727587366 3137065408 3137652774
+35184000000 35185762266 11728000000 11728587422 3138065408 3138652830
+35187000000 35188762402 11729000000 11729587467 3139065408 3139652875
+35190000000 35191762577 11730000000 11730587525 3140065408 3140652933
+35193000000 35194762699 11731000000 11731587566 3141065408 3141652974
+35196000000 35197762849 11732000000 11732587616 3142065408 3142653024
+35199000000 35200762997 11733000000 11733587665 3143065408 3143653073
+35202000000 35203763203 11734000000 11734587734 3144065408 3144653142
+35205000000 35206763317 11735000000 11735587772 3145065408 3145653180
+35208000000 35209763449 11736000000 11736587816 3146065408 3146653224
+35211000000 35212763623 11737000000 11737587874 3147065408 3147653282
+35214000000 35215763742 11738000000 11738587914 3148065408 3148653322
+35217000000 35218763866 11739000000 11739587955 3149065408 3149653363
+35220000000 35221764085 11740000000 11740588028 3150065408 3150653436
+35223000000 35224764221 11741000000 11741588073 3151065408 3151653481
+35226000000 35227764372 11742000000 11742588124 3152065408 3152653532
+35229000000 35230764532 11743000000 11743588177 3153065408 3153653585
+35232000000 35233764653 11744000000 11744588217 3154065408 3154653625
+35235000000 35236764734 11745000000 11745588244 3155065408 3155653652
+35238000000 35239764942 11746000000 11746588314 3156065408 3156653722
+35241000000 35242765097 11747000000 11747588365 3157065408 3157653773
+35244000000 35245765256 11748000000 11748588418 3158065408 3158653826
+35247000000 35248765408 11749000000 11749588469 3159065408 3159653877
+35250000000 35251765530 11750000000 11750588510 3160065408 3160653918
+35253000000 35254765708 11751000000 11751588569 3161065408 3161653977
+35256000000 35257765857 11752000000 11752588619 3162065408 3162654027
+35259000000 35260765985 11753000000 11753588661 3163065408 3163654069
+35262000000 35263766154 11754000000 11754588718 3164065408 3164654126
+35265000000 35266766274 11755000000 11755588758 3165065408 3165654166
+35268000000 35269766201 11756000000 11756588733 3166065408 3166654141
+35271000000 35272766524 11757000000 11757588841 3167065408 3167654249
+35274000000 35275766777 11758000000 11758588925 3168065408 3168654333
+35277000000 35278766887 11759000000 11759588962 3169065408 3169654370
+35280000000 35281767066 11760000000 11760589022 3170065408 3170654430
+35283000000 35284767114 11761000000 11761589038 3171065408 3171654446
+35286000000 35287767368 11762000000 11762589122 3172065408 3172654530
+35289000000 35290767487 11763000000 11763589162 3173065408 3173654570
+35292000000 35293767658 11764000000 11764589219 3174065408 3174654627
+35295000000 35296767805 11765000000 11765589268 3175065408 3175654676
+35298000000 35299767958 11766000000 11766589319 3176065408 3176654727
+35301000000 35302768104 11767000000 11767589368 3177065408 3177654776
+35304000000 35305768248 11768000000 11768589416 3178065408 3178654824
+35307000000 35308768411 11769000000 11769589470 3179065408 3179654878
+35310000000 35311768563 11770000000 11770589521 3180065408 3180654929
+35313000000 35314768717 11771000000 11771589572 3181065408 3181654980
+35316000000 35317768837 11772000000 11772589612 3182065408 3182655020
+35319000000 35320769046 11773000000 11773589682 3183065408 3183655090
+35322000000 35323769176 11774000000 11774589725 3184065408 3184655133
+35325000000 35326769290 11775000000 11775589763 3185065408 3185655171
+35328000000 35329769451 11776000000 11776589817 3186065408 3186655225
+35331000000 35332769586 11777000000 11777589862 3187065408 3187655270
+35334000000 35335769729 11778000000 11778589909 3188065408 3188655317
+35337000000 35338769829 11779000000 11779589943 3189065408 3189655351
+35340000000 35341770063 11780000000 11780590021 3190065408 3190655429
+35343000000 35344770136 11781000000 11781590045 3191065408 3191655453
+35346000000 35347770257 11782000000 11782590085 3192065408 3192655493
+35349000000 35350770446 11783000000 11783590148 3193065408 3193655556
+35352000000 35353770600 11784000000 11784590200 3194065408 3194655608
+35355000000 35356770779 11785000000 11785590259 3195065408 3195655667
+35358000000 35359770925 11786000000 11786590308 3196065408 3196655716
+35361000000 35362771052 11787000000 11787590350 3197065408 3197655758
+35364000000 35365771226 11788000000 11788590408 3198065408 3198655816
+35367000000 35368771290 11789000000 11789590430 3199065408 3199655838
+35370000000 35371771497 11790000000 11790590499 3200065408 3200655907
+35373000000 35374771678 11791000000 11791590559 3201065408 3201655967
+35376000000 35377771827 11792000000 11792590609 3202065408 3202656017
+35379000000 35380771884 11793000000 11793590628 3203065408 3203656036
+35382000000 35383772080 11794000000 11794590693 3204065408 3204656101
+35385000000 35386772270 11795000000 11795590756 3205065408 3205656164
+35388000000 35389772415 11796000000 11796590805 3206065408 3206656213
+35391000000 35392772587 11797000000 11797590862 3207065408 3207656270
+35394000000 35395772720 11798000000 11798590906 3208065408 3208656314
+35397000000 35398772791 11799000000 11799590930 3209065408 3209656338
+35400000000 35401773017 11800000000 11800591005 3210065408 3210656413
+35403000000 35404773177 11801000000 11801591059 3211065408 3211656467
+35406000000 35407773309 11802000000 11802591103 3212065408 3212656511
+35409000000 35410773417 11803000000 11803591139 3213065408 3213656547
+35412000000 35413773628 11804000000 11804591209 3214065408 3214656617
+35415000000 35416773794 11805000000 11805591264 3215065408 3215656672
+35418000000 35419773905 11806000000 11806591301 3216065408 3216656709
+35421000000 35422774065 11807000000 11807591355 3217065408 3217656763
+35424000000 35425774177 11808000000 11808591392 3218065408 3218656800
+35427000000 35428774375 11809000000 11809591458 3219065408 3219656866
+35430000000 35431774465 11810000000 11810591488 3220065408 3220656896
+35433000000 35434774690 11811000000 11811591563 3221065408 3221656971
+35436000000 35437774822 11812000000 11812591607 3222065408 3222657015
+35439000000 35440774961 11813000000 11813591653 3223065408 3223657061
+35442000000 35443775012 11814000000 11814591670 3224065408 3224657078
+35445000000 35446775223 11815000000 11815591741 3225065408 3225657149
+35448000000 35449775432 11816000000 11816591810 3226065408 3226657218
+35451000000 35452775560 11817000000 11817591853 3227065408 3227657261
+35454000000 35455775703 11818000000 11818591901 3228065408 3228657309
+35457000000 35458775874 11819000000 11819591958 3229065408 3229657366
+35460000000 35461775971 11820000000 11820591990 3230065408 3230657398
+35463000000 35464776184 11821000000 11821592061 3231065408 3231657469
+35466000000 35467776314 11822000000 11822592104 3232065408 3232657512
+35469000000 35470776464 11823000000 11823592154 3233065408 3233657562
+35472000000 35473776624 11824000000 11824592208 3234065408 3234657616
+35475000000 35476776720 11825000000 11825592240 3235065408 3235657648
+35478000000 35479776908 11826000000 11826592302 3236065408 3236657710
+35481000000 35482777076 11827000000 11827592358 3237065408 3237657766
+35484000000 35485777212 11828000000 11828592404 3238065408 3238657812
+35487000000 35488777387 11829000000 11829592462 3239065408 3239657870
+35490000000 35491777509 11830000000 11830592503 3240065408 3240657911
+35493000000 35494777659 11831000000 11831592553 3241065408 3241657961
+35496000000 35497777807 11832000000 11832592602 3242065408 3242658010
+35499000000 35500778013 11833000000 11833592671 3243065408 3243658079
+35502000000 35503778127 11834000000 11834592709 3244065408 3244658117
+35505000000 35506778259 11835000000 11835592753 3245065408 3245658161
+35508000000 35509778433 11836000000 11836592811 3246065408 3246658219
+35511000000 35512778552 11837000000 11837592850 3247065408 3247658258
+35514000000 35515778676 11838000000 11838592892 3248065408 3248658300
+35517000000 35518778895 11839000000 11839592965 3249065408 3249658373
+35520000000 35521779031 11840000000 11840593010 3250065408 3250658418
+35523000000 35524779182 11841000000 11841593060 3251065408 3251658468
+35526000000 35527779342 11842000000 11842593114 3252065408 3252658522
+35529000000 35530779463 11843000000 11843593154 3253065408 3253658562
+35532000000 35533779544 11844000000 11844593181 3254065408 3254658589
+35535000000 35536779752 11845000000 11845593250 3255065408 3255658658
+35538000000 35539779907 11846000000 11846593302 3256065408 3256658710
+35541000000 35542780066 11847000000 11847593355 3257065408 3257658763
+35544000000 35545780218 11848000000 11848593406 3258065408 3258658814
+35547000000 35548780340 11849000000 11849593446 3259065408 3259658854
+35550000000 35551780518 11850000000 11850593506 3260065408 3260658914
+35553000000 35554780667 11851000000 11851593555 3261065408 3261658963
+35556000000 35557780795 11852000000 11852593598 3262065408 3262659006
+35559000000 35560780964 11853000000 11853593654 3263065408 3263659062
+35562000000 35563781084 11854000000 11854593694 3264065408 3264659102
+35565000000 35566781011 11855000000 11855593670 3265065408 3265659078
+35568000000 35569781334 11856000000 11856593778 3266065408 3266659186
+35571000000 35572781587 11857000000 11857593862 3267065408 3267659270
+35574000000 35575781697 11858000000 11858593899 3268065408 3268659307
+35577000000 35578781876 11859000000 11859593958 3269065408 3269659366
+35580000000 35581781924 11860000000 11860593974 3270065408 3270659382
+35583000000 35584782178 11861000000 11861594059 3271065408 3271659467
+35586000000 35587782297 11862000000 11862594099 3272065408 3272659507
+35589000000 35590782468 11863000000 11863594156 3273065408 3273659564
+35592000000 35593782615 11864000000 11864594205 3274065408 3274659613
+35595000000 35596782768 11865000000 11865594256 3275065408 3275659664
+35598000000 35599782914 11866000000 11866594304 3276065408 3276659712
+35601000000 35602783058 11867000000 11867594352 3277065408 3277659760
+35604000000 35605783221 11868000000 11868594407 3278065408 3278659815
+35607000000 35608783373 11869000000 11869594457 3279065408 3279659865
+35610000000 35611783527 11870000000 11870594509 3280065408 3280659917
+35613000000 35614783647 11871000000 11871594549 3281065408 3281659957
+35616000000 35617783856 11872000000 11872594618 3282065408 3282660026
+35619000000 35620783986 11873000000 11873594662 3283065408 3283660070
+35622000000 35623784100 11874000000 11874594700 3284065408 3284660108
+35625000000 35626784261 11875000000 11875594753 3285065408 3285660161
+35628000000 35629784396 11876000000 11876594798 3286065408 3286660206
+35631000000 35632784539 11877000000 11877594846 3287065408 3287660254
+35634000000 35635784639 11878000000 11878594879 3288065408 3288660287
+35637000000 35638784873 11879000000 11879594957 3289065408 3289660365
+35640000000 35641784946 11880000000 11880594982 3290065408 3290660390
+35643000000 35644785067 11881000000 11881595022 3291065408 3291660430
+35646000000 35647785256 11882000000 11882595085 3292065408 3292660493
+35649000000 35650785410 11883000000 11883595136 3293065408 3293660544
+35652000000 35653785589 11884000000 11884595196 3294065408 3294660604
+35655000000 35656785735 11885000000 11885595245 3295065408 3295660653
+35658000000 35659785862 11886000000 11886595287 3296065408 3296660695
+35661000000 35662786036 11887000000 11887595345 3297065408 3297660753
+35664000000 35665786100 11888000000 11888595366 3298065408 3298660774
+35667000000 35668786307 11889000000 11889595435 3299065408 3299660843
+35670000000 35671786488 11890000000 11890595496 3300065408 3300660904
+35673000000 35674786637 11891000000 11891595545 3301065408 3301660953
+35676000000 35677786694 11892000000 11892595564 3302065408 3302660972
+35679000000 35680786890 11893000000 11893595630 3303065408 3303661038
+35682000000 35683787080 11894000000 11894595693 3304065408 3304661101
+35685000000 35686787225 11895000000 11895595741 3305065408 3305661149
+35688000000 35689787397 11896000000 11896595799 3306065408 3306661207
+35691000000 35692787530 11897000000 11897595843 3307065408 3307661251
+35694000000 35695787601 11898000000 11898595867 3308065408 3308661275
+35697000000 35698787827 11899000000 11899595942 3309065408 3309661350
+35700000000 35701787987 11900000000 11900595995 3310065408 3310661403
+35703000000 35704788119 11901000000 11901596039 3311065408 3311661447
+35706000000 35707788227 11902000000 11902596075 3312065408 3312661483
+35709000000 35710788438 11903000000 11903596146 3313065408 3313661554
+35712000000 35713788604 11904000000 11904596201 3314065408 3314661609
+35715000000 35716788715 11905000000 11905596238 3315065408 3315661646
+35718000000 35719788875 11906000000 11906596291 3316065408 3316661699
+35721000000 35722788987 11907000000 11907596329 3317065408 3317661737
+35724000000 35725789185 11908000000 11908596395 3318065408 3318661803
+35727000000 35728789275 11909000000 11909596425 3319065408 3319661833
+35730000000 35731789500 11910000000 11910596500 3320065408 3320661908
+35733000000 35734789632 11911000000 11911596544 3321065408 3321661952
+35736000000 35737789771 11912000000 11912596590 3322065408 3322661998
+35739000000 35740789822 11913000000 11913596607 3323065408 3323662015
+35742000000 35743790033 11914000000 11914596677 3324065408 3324662085
+35745000000 35746790242 11915000000 11915596747 3325065408 3325662155
+35748000000 35749790370 11916000000 11916596790 3326065408 3326662198
+35751000000 35752790513 11917000000 11917596837 3327065408 3327662245
+35754000000 35755790684 11918000000 11918596894 3328065408 3328662302
+35757000000 35758790781 11919000000 11919596927 3329065408 3329662335
+35760000000 35761790994 11920000000 11920596998 3330065408 3330662406
+35763000000 35764791124 11921000000 11921597041 3331065408 3331662449
+35766000000 35767791274 11922000000 11922597091 3332065408 3332662499
+35769000000 35770791434 11923000000 11923597144 3333065408 3333662552
+35772000000 35773791530 11924000000 11924597176 3334065408 3334662584
+35775000000 35776791718 11925000000 11925597239 3335065408 3335662647
+35778000000 35779791886 11926000000 11926597295 3336065408 3336662703
+35781000000 35782792022 11927000000 11927597340 3337065408 3337662748
+35784000000 35785792197 11928000000 11928597399 3338065408 3338662807
+35787000000 35788792319 11929000000 11929597439 3339065408 3339662847
+35790000000 35791792469 11930000000 11930597489 3340065408 3340662897
+35793000000 35794792617 11931000000 11931597539 3341065408 3341662947
+35796000000 35797792823 11932000000 11932597607 3342065408 3342663015
+35799000000 35800792937 11933000000 11933597645 3343065408 3343663053
+35802000000 35803793069 11934000000 11934597689 3344065408 3344663097
+35805000000 35806793243 11935000000 11935597747 3345065408 3345663155
+35808000000 35809793362 11936000000 11936597787 3346065408 3346663195
+35811000000 35812793486 11937000000 11937597828 3347065408 3347663236
+35814000000 35815793705 11938000000 11938597901 3348065408 3348663309
+35817000000 35818793841 11939000000 11939597947 3349065408 3349663355
+35820000000 35821793992 11940000000 11940597997 3350065408 3350663405
+35823000000 35824794152 11941000000 11941598050 3351065408 3351663458
+35826000000 35827794273 11942000000 11942598091 3352065408 3352663499
+35829000000 35830794354 11943000000 11943598118 3353065408 3353663526
+35832000000 35833794562 11944000000 11944598187 3354065408 3354663595
+35835000000 35836794717 11945000000 11945598239 3355065408 3355663647
+35838000000 35839794876 11946000000 11946598292 3356065408 3356663700
+35841000000 35842795028 11947000000 11947598342 3357065408 3357663750
+35844000000 35845795150 11948000000 11948598383 3358065408 3358663791
+35847000000 35848795328 11949000000 11949598442 3359065408 3359663850
+35850000000 35851795477 11950000000 11950598492 3360065408 3360663900
+35853000000 35854795605 11951000000 11951598535 3361065408 3361663943
+35856000000 35857795774 11952000000 11952598591 3362065408 3362663999
+35859000000 35860795894 11953000000 11953598631 3363065408 3363664039
+35862000000 35863795821 11954000000 11954598607 3364065408 3364664015
+35865000000 35866796144 11955000000 11955598714 3365065408 3365664122
+35868000000 35869796397 11956000000 11956598799 3366065408 3366664207
+35871000000 35872796507 11957000000 11957598835 3367065408 3367664243
+35874000000 35875796686 11958000000 11958598895 3368065408 3368664303
+35877000000 35878796734 11959000000 11959598911 3369065408 3369664319
+35880000000 35881796988 11960000000 11960598996 3370065408 3370664404
+35883000000 35884797107 11961000000 11961599035 3371065408 3371664443
+35886000000 35887797278 11962000000 11962599092 3372065408 3372664500
+35889000000 35890797425 11963000000 11963599141 3373065408 3373664549
+35892000000 35893797578 11964000000 11964599192 3374065408 3374664600
+35895000000 35896797724 11965000000 11965599241 3375065408 3375664649
+35898000000 35899797868 11966000000 11966599289 3376065408 3376664697
+35901000000 35902798031 11967000000 11967599343 3377065408 3377664751
+35904000000 35905798183 11968000000 11968599394 3378065408 3378664802
+35907000000 35908798337 11969000000 11969599445 3379065408 3379664853
+35910000000 35911798457 11970000000 11970599485 3380065408 3380664893
+35913000000 35914798666 11971000000 11971599555 3381065408 3381664963
+35916000000 35917798796 11972000000 11972599598 3382065408 3382665006
+35919000000 35920798910 11973000000 11973599636 3383065408 3383665044
+35922000000 35923799071 11974000000 11974599690 3384065408 3384665098
+35925000000 35926799206 11975000000 11975599735 3385065408 3385665143
+35928000000 35929799349 11976000000 11976599783 3386065408 3386665191
+35931000000 35932799449 11977000000 11977599816 3387065408 3387665224
+35934000000 35935799683 11978000000 11978599894 3388065408 3388665302
+35937000000 35938799756 11979000000 11979599918 3389065408 3389665326
+35940000000 35941799877 11980000000 11980599959 3390065408 3390665367
+35943000000 35944800066 11981000000 11981600022 3391065408 3391665430
+35946000000 35947800220 11982000000 11982600073 3392065408 3392665481
+35949000000 35950800399 11983000000 11983600133 3393065408 3393665541
+35952000000 35953800545 11984000000 11984600181 3394065408 3394665589
+35955000000 35956800672 11985000000 11985600224 3395065408 3395665632
+35958000000 35959800846 11986000000 11986600282 3396065408 3396665690
+35961000000 35962800910 11987000000 11987600303 3397065408 3397665711
+35964000000 35965801117 11988000000 11988600372 3398065408 3398665780
+35967000000 35968801298 11989000000 11989600432 3399065408 3399665840
+35970000000 35971801447 11990000000 11990600482 3400065408 3400665890
+35973000000 35974801504 11991000000 11991600501 3401065408 3401665909
+35976000000 35977801700 11992000000 11992600566 3402065408 3402665974
+35979000000 35980801890 11993000000 11993600630 3403065408 3403666038
+35982000000 35983802035 11994000000 11994600678 3404065408 3404666086
+35985000000 35986802207 11995000000 11995600735 3405065408 3405666143
+35988000000 35989802340 11996000000 11996600780 3406065408 3406666188
+35991000000 35992802411 11997000000 11997600803 3407065408 3407666211
+35994000000 35995802637 11998000000 11998600879 3408065408 3408666287
+35997000000 35998802797 11999000000 11999600932 3409065408 3409666340
+36000000000 36001802929 12000000000 12000600976 3410065408 3410666384
+36003000000 36004803037 12001000000 12001601012 3411065408 3411666420
+36006000000 36007803248 12002000000 12002601082 3412065408 3412666490
+36009000000 36010803414 12003000000 12003601138 3413065408 3413666546
+36012000000 36013803525 12004000000 12004601175 3414065408 3414666583
+36015000000 36016803685 12005000000 12005601228 3415065408 3415666636
+36018000000 36019803797 12006000000 12006601265 3416065408 3416666673
+36021000000 36022803995 12007000000 12007601331 3417065408 3417666739
+36024000000 36025804085 12008000000 12008601361 3418065408 3418666769
+36027000000 36028804310 12009000000 12009601436 3419065408 3419666844
+36030000000 36031804442 12010000000 12010601480 3420065408 3420666888
+36033000000 36034804581 12011000000 12011601527 3421065408 3421666935
+36036000000 36037804632 12012000000 12012601544 3422065408 3422666952
+36039000000 36040804843 12013000000 12013601614 3423065408 3423667022
+36042000000 36043805052 12014000000 12014601684 3424065408 3424667092
+36045000000 36046805180 12015000000 12015601726 3425065408 3425667134
+36048000000 36049805323 12016000000 12016601774 3426065408 3426667182
+36051000000 36052805494 12017000000 12017601831 3427065408 3427667239
+36054000000 36055805591 12018000000 12018601863 3428065408 3428667271
+36057000000 36058805804 12019000000 12019601934 3429065408 3429667342
+36060000000 36061805934 12020000000 12020601978 3430065408 3430667386
+36063000000 36064806084 12021000000 12021602028 3431065408 3431667436
+36066000000 36067806244 12022000000 12022602081 3432065408 3432667489
+36069000000 36070806340 12023000000 12023602113 3433065408 3433667521
+36072000000 36073806528 12024000000 12024602176 3434065408 3434667584
+36075000000 36076806696 12025000000 12025602232 3435065408 3435667640
+36078000000 36079806832 12026000000 12026602277 3436065408 3436667685
+36081000000 36082807007 12027000000 12027602335 3437065408 3437667743
+36084000000 36085807129 12028000000 12028602376 3438065408 3438667784
+36087000000 36088807279 12029000000 12029602426 3439065408 3439667834
+36090000000 36091807427 12030000000 12030602475 3440065408 3440667883
+36093000000 36094807633 12031000000 12031602544 3441065408 3441667952
+36096000000 36097807747 12032000000 12032602582 3442065408 3442667990
+36099000000 36100807879 12033000000 12033602626 3443065408 3443668034
+36102000000 36103808053 12034000000 12034602684 3444065408 3444668092
+36105000000 36106808172 12035000000 12035602724 3445065408 3445668132
+36108000000 36109808296 12036000000 12036602765 3446065408 3446668173
+36111000000 36112808515 12037000000 12037602838 3447065408 3447668246
+36114000000 36115808651 12038000000 12038602883 3448065408 3448668291
+36117000000 36118808802 12039000000 12039602934 3449065408 3449668342
+36120000000 36121808962 12040000000 12040602987 3450065408 3450668395
+36123000000 36124809083 12041000000 12041603027 3451065408 3451668435
+36126000000 36127809164 12042000000 12042603054 3452065408 3452668462
+36129000000 36130809372 12043000000 12043603124 3453065408 3453668532
+36132000000 36133809527 12044000000 12044603175 3454065408 3454668583
+36135000000 36136809686 12045000000 12045603228 3455065408 3455668636
+36138000000 36139809838 12046000000 12046603279 3456065408 3456668687
+36141000000 36142809960 12047000000 12047603320 3457065408 3457668728
+36144000000 36145810138 12048000000 12048603379 3458065408 3458668787
+36147000000 36148810287 12049000000 12049603429 3459065408 3459668837
+36150000000 36151810415 12050000000 12050603471 3460065408 3460668879
+36153000000 36154810584 12051000000 12051603528 3461065408 3461668936
+36156000000 36157810704 12052000000 12052603568 3462065408 3462668976
+36159000000 36160810631 12053000000 12053603543 3463065408 3463668951
+36162000000 36163810954 12054000000 12054603651 3464065408 3464669059
+36165000000 36166811207 12055000000 12055603735 3465065408 3465669143
+36168000000 36169811317 12056000000 12056603772 3466065408 3466669180
+36171000000 36172811496 12057000000 12057603832 3467065408 3467669240
+36174000000 36175811544 12058000000 12058603848 3468065408 3468669256
+36177000000 36178811798 12059000000 12059603932 3469065408 3469669340
+36180000000 36181811917 12060000000 12060603972 3470065408 3470669380
+36183000000 36184812088 12061000000 12061604029 3471065408 3471669437
+36186000000 36187812235 12062000000 12062604078 3472065408 3472669486
+36189000000 36190812388 12063000000 12063604129 3473065408 3473669537
+36192000000 36193812534 12064000000 12064604178 3474065408 3474669586
+36195000000 36196812678 12065000000 12065604226 3475065408 3475669634
+36198000000 36199812841 12066000000 12066604280 3476065408 3476669688
+36201000000 36202812993 12067000000 12067604331 3477065408 3477669739
+36204000000 36205813147 12068000000 12068604382 3478065408 3478669790
+36207000000 36208813267 12069000000 12069604422 3479065408 3479669830
+36210000000 36211813476 12070000000 12070604492 3480065408 3480669900
+36213000000 36214813606 12071000000 12071604535 3481065408 3481669943
+36216000000 36217813720 12072000000 12072604573 3482065408 3482669981
+36219000000 36220813881 12073000000 12073604627 3483065408 3483670035
+36222000000 36223814016 12074000000 12074604672 3484065408 3484670080
+36225000000 36226814159 12075000000 12075604719 3485065408 3485670127
+36228000000 36229814259 12076000000 12076604753 3486065408 3486670161
+36231000000 36232814493 12077000000 12077604831 3487065408 3487670239
+36234000000 36235814566 12078000000 12078604855 3488065408 3488670263
+36237000000 36238814687 12079000000 12079604895 3489065408 3489670303
+36240000000 36241814876 12080000000 12080604958 3490065408 3490670366
+36243000000 36244815030 12081000000 12081605010 3491065408 3491670418
+36246000000 36247815209 12082000000 12082605069 3492065408 3492670477
+36249000000 36250815355 12083000000 12083605118 3493065408 3493670526
+36252000000 36253815482 12084000000 12084605160 3494065408 3494670568
+36255000000 36256815656 12085000000 12085605218 3495065408 3495670626
+36258000000 36259815720 12086000000 12086605240 3496065408 3496670648
+36261000000 36262815927 12087000000 12087605309 3497065408 3497670717
+36264000000 36265816108 12088000000 12088605369 3498065408 3498670777
+36267000000 36268816257 12089000000 12089605419 3499065408 3499670827
+36270000000 36271816314 12090000000 12090605438 3500065408 3500670846
+36273000000 36274816510 12091000000 12091605503 3501065408 3501670911
+36276000000 36277816700 12092000000 12092605566 3502065408 3502670974
+36279000000 36280816845 12093000000 12093605615 3503065408 3503671023
+36282000000 36283817017 12094000000 12094605672 3504065408 3504671080
+36285000000 36286817150 12095000000 12095605716 3505065408 3505671124
+36288000000 36289817221 12096000000 12096605740 3506065408 3506671148
+36291000000 36292817447 12097000000 12097605815 3507065408 3507671223
+36294000000 36295817607 12098000000 12098605869 3508065408 3508671277
+36297000000 36298817739 12099000000 12099605913 3509065408 3509671321
+36300000000 36301817847 12100000000 12100605949 3510065408 3510671357
+36303000000 36304818058 12101000000 12101606019 3511065408 3511671427
+36306000000 36307818224 12102000000 12102606074 3512065408 3512671482
+36309000000 36310818335 12103000000 12103606111 3513065408 3513671519
+36312000000 36313818495 12104000000 12104606165 3514065408 3514671573
+36315000000 36316818607 12105000000 12105606202 3515065408 3515671610
+36318000000 36319818805 12106000000 12106606268 3516065408 3516671676
+36321000000 36322818895 12107000000 12107606298 3517065408 3517671706
+36324000000 36325819120 12108000000 12108606373 3518065408 3518671781
+36327000000 36328819252 12109000000 12109606417 3519065408 3519671825
+36330000000 36331819391 12110000000 12110606463 3520065408 3520671871
+36333000000 36334819442 12111000000 12111606480 3521065408 3521671888
+36336000000 36337819653 12112000000 12112606551 3522065408 3522671959
+36339000000 36340819862 12113000000 12113606620 3523065408 3523672028
+36342000000 36343819990 12114000000 12114606663 3524065408 3524672071
+36345000000 36346820133 12115000000 12115606711 3525065408 3525672119
+36348000000 36349820304 12116000000 12116606768 3526065408 3526672176
+36351000000 36352820401 12117000000 12117606800 3527065408 3527672208
+36354000000 36355820614 12118000000 12118606871 3528065408 3528672279
+36357000000 36358820744 12119000000 12119606914 3529065408 3529672322
+36360000000 36361820894 12120000000 12120606964 3530065408 3530672372
+36363000000 36364821054 12121000000 12121607018 3531065408 3531672426
+36366000000 36367821150 12122000000 12122607050 3532065408 3532672458
+36369000000 36370821338 12123000000 12123607112 3533065408 3533672520
+36372000000 36373821506 12124000000 12124607168 3534065408 3534672576
+36375000000 36376821642 12125000000 12125607214 3535065408 3535672622
+36378000000 36379821817 12126000000 12126607272 3536065408 3536672680
+36381000000 36382821939 12127000000 12127607313 3537065408 3537672721
+36384000000 36385822089 12128000000 12128607363 3538065408 3538672771
+36387000000 36388822237 12129000000 12129607412 3539065408 3539672820
+36390000000 36391822443 12130000000 12130607481 3540065408 3540672889
+36393000000 36394822557 12131000000 12131607519 3541065408 3541672927
+36396000000 36397822689 12132000000 12132607563 3542065408 3542672971
+36399000000 36400822863 12133000000 12133607621 3543065408 3543673029
+36402000000 36403822982 12134000000 12134607660 3544065408 3544673068
+36405000000 36406823106 12135000000 12135607702 3545065408 3545673110
+36408000000 36409823325 12136000000 12136607775 3546065408 3546673183
+36411000000 36412823461 12137000000 12137607820 3547065408 3547673228
+36414000000 36415823612 12138000000 12138607870 3548065408 3548673278
+36417000000 36418823772 12139000000 12139607924 3549065408 3549673332
+36420000000 36421823893 12140000000 12140607964 3550065408 3550673372
+36423000000 36424823974 12141000000 12141607991 3551065408 3551673399
+36426000000 36427824182 12142000000 12142608060 3552065408 3552673468
+36429000000 36430824337 12143000000 12143608112 3553065408 3553673520
+36432000000 36433824496 12144000000 12144608165 3554065408 3554673573
+36435000000 36436824648 12145000000 12145608216 3555065408 3555673624
+36438000000 36439824770 12146000000 12146608256 3556065408 3556673664
+36441000000 36442824948 12147000000 12147608316 3557065408 3557673724
+36444000000 36445825097 12148000000 12148608365 3558065408 3558673773
+36447000000 36448825225 12149000000 12149608408 3559065408 3559673816
+36450000000 36451825394 12150000000 12150608464 3560065408 3560673872
+36453000000 36454825514 12151000000 12151608504 3561065408 3561673912
+36456000000 36457825441 12152000000 12152608480 3562065408 3562673888
+36459000000 36460825764 12153000000 12153608588 3563065408 3563673996
+36462000000 36463826017 12154000000 12154608672 3564065408 3564674080
+36465000000 36466826127 12155000000 12155608709 3565065408 3565674117
+36468000000 36469826306 12156000000 12156608768 3566065408 3566674176
+36471000000 36472826354 12157000000 12157608784 3567065408 3567674192
+36474000000 36475826608 12158000000 12158608869 3568065408 3568674277
+36477000000 36478826727 12159000000 12159608909 3569065408 3569674317
+36480000000 36481826898 12160000000 12160608966 3570065408 3570674374
+36483000000 36484827045 12161000000 12161609015 3571065408 3571674423
+36486000000 36487827198 12162000000 12162609066 3572065408 3572674474
+36489000000 36490827344 12163000000 12163609114 3573065408 3573674522
+36492000000 36493827488 12164000000 12164609162 3574065408 3574674570
+36495000000 36496827651 12165000000 12165609217 3575065408 3575674625
+36498000000 36499827803 12166000000 12166609267 3576065408 3576674675
+36501000000 36502827957 12167000000 12167609319 3577065408 3577674727
+36504000000 36505828077 12168000000 12168609359 3578065408 3578674767
+36507000000 36508828286 12169000000 12169609428 3579065408 3579674836
+36510000000 36511828416 12170000000 12170609472 3580065408 3580674880
+36513000000 36514828530 12171000000 12171609510 3581065408 3581674918
+36516000000 36517828691 12172000000 12172609563 3582065408 3582674971
+36519000000 36520828826 12173000000 12173609608 3583065408 3583675016
+36522000000 36523828969 12174000000 12174609656 3584065408 3584675064
+36525000000 36526829069 12175000000 12175609689 3585065408 3585675097
+36528000000 36529829303 12176000000 12176609767 3586065408 3586675175
+36531000000 36532829376 12177000000 12177609792 3587065408 3587675200
+36534000000 36535829497 12178000000 12178609832 3588065408 3588675240
+36537000000 36538829686 12179000000 12179609895 3589065408 3589675303
+36540000000 36541829840 12180000000 12180609946 3590065408 3590675354
+36543000000 36544830019 12181000000 12181610006 3591065408 3591675414
+36546000000 36547830165 12182000000 12182610055 3592065408 3592675463
+36549000000 36550830292 12183000000 12183610097 3593065408 3593675505
+36552000000 36553830466 12184000000 12184610155 3594065408 3594675563
+36555000000 36556830530 12185000000 12185610176 3595065408 3595675584
+36558000000 36559830737 12186000000 12186610245 3596065408 3596675653
+36561000000 36562830918 12187000000 12187610306 3597065408 3597675714
+36564000000 36565831067 12188000000 12188610355 3598065408 3598675763
+36567000000 36568831124 12189000000 12189610374 3599065408 3599675782
+36570000000 36571831320 12190000000 12190610440 3600065408 3600675848
+36573000000 36574831510 12191000000 12191610503 3601065408 3601675911
+36576000000 36577831655 12192000000 12192610551 3602065408 3602675959
+36579000000 36580831827 12193000000 12193610609 3603065408 3603676017
+36582000000 36583831960 12194000000 12194610653 3604065408 3604676061
+36585000000 36586832031 12195000000 12195610677 3605065408 3605676085
+36588000000 36589832257 12196000000 12196610752 3606065408 3606676160
+36591000000 36592832417 12197000000 12197610805 3607065408 3607676213
+36594000000 36595832549 12198000000 12198610849 3608065408 3608676257
+36597000000 36598832657 12199000000 12199610885 3609065408 3609676293
+36600000000 36601832868 12200000000 12200610956 3610065408 3610676364
+36603000000 36604833034 12201000000 12201611011 3611065408 3611676419
+36606000000 36607833145 12202000000 12202611048 3612065408 3612676456
+36609000000 36610833305 12203000000 12203611101 3613065408 3613676509
+36612000000 36613833417 12204000000 12204611139 3614065408 3614676547
+36615000000 36616833615 12205000000 12205611205 3615065408 3615676613
+36618000000 36619833705 12206000000 12206611235 3616065408 3616676643
+36621000000 36622833930 12207000000 12207611310 3617065408 3617676718
+36624000000 36625834062 12208000000 12208611354 3618065408 3618676762
+36627000000 36628834201 12209000000 12209611400 3619065408 3619676808
+36630000000 36631834252 12210000000 12210611417 3620065408 3620676825
+36633000000 36634834463 12211000000 12211611487 3621065408 3621676895
+36636000000 36637834672 12212000000 12212611557 3622065408 3622676965
+36639000000 36640834800 12213000000 12213611600 3623065408 3623677008
+36642000000 36643834943 12214000000 12214611647 3624065408 3624677055
+36645000000 36646835114 12215000000 12215611704 3625065408 3625677112
+36648000000 36649835211 12216000000 12216611737 3626065408 3626677145
+36651000000 36652835424 12217000000 12217611808 3627065408 3627677216
+36654000000 36655835554 12218000000 12218611851 3628065408 3628677259
+36657000000 36658835704 12219000000 12219611901 3629065408 3629677309
+36660000000 36661835864 12220000000 12220611954 3630065408 3630677362
+36663000000 36664835960 12221000000 12221611986 3631065408 3631677394
+36666000000 36667836148 12222000000 12222612049 3632065408 3632677457
+36669000000 36670836316 12223000000 12223612105 3633065408 3633677513
+36672000000 36673836452 12224000000 12224612150 3634065408 3634677558
+36675000000 36676836627 12225000000 12225612209 3635065408 3635677617
+36678000000 36679836749 12226000000 12226612249 3636065408 3636677657
+36681000000 36682836899 12227000000 12227612299 3637065408 3637677707
+36684000000 36685837047 12228000000 12228612349 3638065408 3638677757
+36687000000 36688837253 12229000000 12229612417 3639065408 3639677825
+36690000000 36691837367 12230000000 12230612455 3640065408 3640677863
+36693000000 36694837499 12231000000 12231612499 3641065408 3641677907
+36696000000 36697837673 12232000000 12232612557 3642065408 3642677965
+36699000000 36700837792 12233000000 12233612597 3643065408 3643678005
+36702000000 36703837916 12234000000 12234612638 3644065408 3644678046
+36705000000 36706838135 12235000000 12235612711 3645065408 3645678119
+36708000000 36709838271 12236000000 12236612757 3646065408 3646678165
+36711000000 36712838422 12237000000 12237612807 3647065408 3647678215
+36714000000 36715838582 12238000000 12238612860 3648065408 3648678268
+36717000000 36718838703 12239000000 12239612901 3649065408 3649678309
+36720000000 36721838784 12240000000 12240612928 3650065408 3650678336
+36723000000 36724838992 12241000000 12241612997 3651065408 3651678405
+36726000000 36727839147 12242000000 12242613049 3652065408 3652678457
+36729000000 36730839306 12243000000 12243613102 3653065408 3653678510
+36732000000 36733839458 12244000000 12244613152 3654065408 3654678560
+36735000000 36736839580 12245000000 12245613193 3655065408 3655678601
+36738000000 36739839758 12246000000 12246613252 3656065408 3656678660
+36741000000 36742839907 12247000000 12247613302 3657065408 3657678710
+36744000000 36745840035 12248000000 12248613345 3658065408 3658678753
+36747000000 36748840204 12249000000 12249613401 3659065408 3659678809
+36750000000 36751840324 12250000000 12250613441 3660065408 3660678849
+36753000000 36754840251 12251000000 12251613417 3661065408 3661678825
+36756000000 36757840574 12252000000 12252613524 3662065408 3662678932
+36759000000 36760840827 12253000000 12253613609 3663065408 3663679017
+36762000000 36763840937 12254000000 12254613645 3664065408 3664679053
+36765000000 36766841116 12255000000 12255613705 3665065408 3665679113
+36768000000 36769841164 12256000000 12256613721 3666065408 3666679129
+36771000000 36772841418 12257000000 12257613806 3667065408 3667679214
+36774000000 36775841537 12258000000 12258613845 3668065408 3668679253
+36777000000 36778841708 12259000000 12259613902 3669065408 3669679310
+36780000000 36781841855 12260000000 12260613951 3670065408 3670679359
+36783000000 36784842008 12261000000 12261614002 3671065408 3671679410
+36786000000 36787842154 12262000000 12262614051 3672065408 3672679459
+36789000000 36790842298 12263000000 12263614099 3673065408 3673679507
+36792000000 36793842461 12264000000 12264614153 3674065408 3674679561
+36795000000 36796842613 12265000000 12265614204 3675065408 3675679612
+36798000000 36799842767 12266000000 12266614255 3676065408 3676679663
+36801000000 36802842887 12267000000 12267614295 3677065408 3677679703
+36804000000 36805843096 12268000000 12268614365 3678065408 3678679773
+36807000000 36808843226 12269000000 12269614408 3679065408 3679679816
+36810000000 36811843340 12270000000 12270614446 3680065408 3680679854
+36813000000 36814843501 12271000000 12271614500 3681065408 3681679908
+36816000000 36817843636 12272000000 12272614545 3682065408 3682679953
+36819000000 36820843779 12273000000 12273614593 3683065408 3683680001
+36822000000 36823843879 12274000000 12274614626 3684065408 3684680034
+36825000000 36826844113 12275000000 12275614704 3685065408 3685680112
+36828000000 36829844186 12276000000 12276614728 3686065408 3686680136
+36831000000 36832844307 12277000000 12277614769 3687065408 3687680177
+36834000000 36835844496 12278000000 12278614832 3688065408 3688680240
+36837000000 36838844650 12279000000 12279614883 3689065408 3689680291
+36840000000 36841844829 12280000000 12280614943 3690065408 3690680351
+36843000000 36844844975 12281000000 12281614991 3691065408 3691680399
+36846000000 36847845102 12282000000 12282615034 3692065408 3692680442
+36849000000 36850845276 12283000000 12283615092 3693065408 3693680500
+36852000000 36853845340 12284000000 12284615113 3694065408 3694680521
+36855000000 36856845547 12285000000 12285615182 3695065408 3695680590
+36858000000 36859845728 12286000000 12286615242 3696065408 3696680650
+36861000000 36862845877 12287000000 12287615292 3697065408 3697680700
+36864000000 36865845934 12288000000 12288615311 3698065408 3698680719
+36867000000 36868846130 12289000000 12289615376 3699065408 3699680784
+36870000000 36871846320 12290000000 12290615440 3700065408 3700680848
+36873000000 36874846465 12291000000 12291615488 3701065408 3701680896
+36876000000 36877846637 12292000000 12292615545 3702065408 3702680953
+36879000000 36880846770 12293000000 12293615590 3703065408 3703680998
+36882000000 36883846841 12294000000 12294615613 3704065408 3704681021
+36885000000 36886847067 12295000000 12295615689 3705065408 3705681097
+36888000000 36889847227 12296000000 12296615742 3706065408 3706681150
+36891000000 36892847359 12297000000 12297615786 3707065408 3707681194
+36894000000 36895847467 12298000000 12298615822 3708065408 3708681230
+36897000000 36898847678 12299000000 12299615892 3709065408 3709681300
+36900000000 36901847844 12300000000 12300615948 3710065408 3710681356
+36903000000 36904847955 12301000000 12301615985 3711065408 3711681393
+36906000000 36907848115 12302000000 12302616038 3712065408 3712681446
+36909000000 36910848227 12303000000 12303616075 3713065408 3713681483
+36912000000 36913848425 12304000000 12304616141 3714065408 3714681549
+36915000000 36916848515 12305000000 12305616171 3715065408 3715681579
+36918000000 36919848740 12306000000 12306616246 3716065408 3716681654
+36921000000 36922848872 12307000000 12307616290 3717065408 3717681698
+36924000000 36925849011 12308000000 12308616337 3718065408 3718681745
+36927000000 36928849062 12309000000 12309616354 3719065408 3719681762
+36930000000 36931849273 12310000000 12310616424 3720065408 3720681832
+36933000000 36934849482 12311000000 12311616494 3721065408 3721681902
+36936000000 36937849610 12312000000 12312616536 3722065408 3722681944
+36939000000 36940849753 12313000000 12313616584 3723065408 3723681992
+36942000000 36943849924 12314000000 12314616641 3724065408 3724682049
+36945000000 36946850021 12315000000 12315616673 3725065408 3725682081
+36948000000 36949850234 12316000000 12316616744 3726065408 3726682152
+36951000000 36952850364 12317000000 12317616788 3727065408 3727682196
+36954000000 36955850514 12318000000 12318616838 3728065408 3728682246
+36957000000 36958850674 12319000000 12319616891 3729065408 3729682299
+36960000000 36961850770 12320000000 12320616923 3730065408 3730682331
+36963000000 36964850958 12321000000 12321616986 3731065408 3731682394
+36966000000 36967851126 12322000000 12322617042 3732065408 3732682450
+36969000000 36970851262 12323000000 12323617087 3733065408 3733682495
+36972000000 36973851437 12324000000 12324617145 3734065408 3734682553
+36975000000 36976851559 12325000000 12325617186 3735065408 3735682594
+36978000000 36979851709 12326000000 12326617236 3736065408 3736682644
+36981000000 36982851857 12327000000 12327617285 3737065408 3737682693
+36984000000 36985852063 12328000000 12328617354 3738065408 3738682762
+36987000000 36988852177 12329000000 12329617392 3739065408 3739682800
+36990000000 36991852309 12330000000 12330617436 3740065408 3740682844
+36993000000 36994852483 12331000000 12331617494 3741065408 3741682902
+36996000000 36997852602 12332000000 12332617534 3742065408 3742682942
+36999000000 37000852726 12333000000 12333617575 3743065408 3743682983
+37002000000 37003852945 12334000000 12334617648 3744065408 3744683056
+37005000000 37006853081 12335000000 12335617693 3745065408 3745683101
+37008000000 37009853232 12336000000 12336617744 3746065408 3746683152
+37011000000 37012853392 12337000000 12337617797 3747065408 3747683205
+37014000000 37015853513 12338000000 12338617837 3748065408 3748683245
+37017000000 37018853594 12339000000 12339617864 3749065408 3749683272
+37020000000 37021853802 12340000000 12340617934 3750065408 3750683342
+37023000000 37024853957 12341000000 12341617985 3751065408 3751683393
+37026000000 37027854116 12342000000 12342618038 3752065408 3752683446
+37029000000 37030854268 12343000000 12343618089 3753065408 3753683497
+37032000000 37033854390 12344000000 12344618130 3754065408 3754683538
+37035000000 37036854568 12345000000 12345618189 3755065408 3755683597
+37038000000 37039854717 12346000000 12346618239 3756065408 3756683647
+37041000000 37042854845 12347000000 12347618281 3757065408 3757683689
+37044000000 37045855014 12348000000 12348618338 3758065408 3758683746
+37047000000 37048855134 12349000000 12349618378 3759065408 3759683786
+37050000000 37051855061 12350000000 12350618353 3760065408 3760683761
+37053000000 37054855384 12351000000 12351618461 3761065408 3761683869
+37056000000 37057855637 12352000000 12352618545 3762065408 3762683953
+37059000000 37060855747 12353000000 12353618582 3763065408 3763683990
+37062000000 37063855926 12354000000 12354618642 3764065408 3764684050
+37065000000 37066855974 12355000000 12355618658 3765065408 3765684066
+37068000000 37069856228 12356000000 12356618742 3766065408 3766684150
+37071000000 37072856347 12357000000 12357618782 3767065408 3767684190
+37074000000 37075856518 12358000000 12358618839 3768065408 3768684247
+37077000000 37078856665 12359000000 12359618888 3769065408 3769684296
+37080000000 37081856818 12360000000 12360618939 3770065408 3770684347
+37083000000 37084856964 12361000000 12361618988 3771065408 3771684396
+37086000000 37087857108 12362000000 12362619036 3772065408 3772684444
+37089000000 37090857271 12363000000 12363619090 3773065408 3773684498
+37092000000 37093857423 12364000000 12364619141 3774065408 3774684549
+37095000000 37096857577 12365000000 12365619192 3775065408 3775684600
+37098000000 37099857697 12366000000 12366619232 3776065408 3776684640
+37101000000 37102857906 12367000000 12367619302 3777065408 3777684710
+37104000000 37105858036 12368000000 12368619345 3778065408 3778684753
+37107000000 37108858150 12369000000 12369619383 3779065408 3779684791
+37110000000 37111858311 12370000000 12370619437 3780065408 3780684845
+37113000000 37114858446 12371000000 12371619482 3781065408 3781684890
+37116000000 37117858589 12372000000 12372619529 3782065408 3782684937
+37119000000 37120858689 12373000000 12373619563 3783065408 3783684971
+37122000000 37123858923 12374000000 12374619641 3784065408 3784685049
+37125000000 37126858996 12375000000 12375619665 3785065408 3785685073
+37128000000 37129859117 12376000000 12376619705 3786065408 3786685113
+37131000000 37132859306 12377000000 12377619768 3787065408 3787685176
+37134000000 37135859460 12378000000 12378619820 3788065408 3788685228
+37137000000 37138859639 12379000000 12379619879 3789065408 3789685287
+37140000000 37141859785 12380000000 12380619928 3790065408 3790685336
+37143000000 37144859912 12381000000 12381619970 3791065408 3791685378
+37146000000 37147860086 12382000000 12382620028 3792065408 3792685436
+37149000000 37150860150 12383000000 12383620050 3793065408 3793685458
+37152000000 37153860357 12384000000 12384620119 3794065408 3794685527
+37155000000 37156860538 12385000000 12385620179 3795065408 3795685587
+37158000000 37159860687 12386000000 12386620229 3796065408 3796685637
+37161000000 37162860744 12387000000 12387620248 3797065408 3797685656
+37164000000 37165860940 12388000000 12388620313 3798065408 3798685721
+37167000000 37168861130 12389000000 12389620376 3799065408 3799685784
+37170000000 37171861275 12390000000 12390620425 3800065408 3800685833
+37173000000 37174861447 12391000000 12391620482 3801065408 3801685890
+37176000000 37177861580 12392000000 12392620526 3802065408 3802685934
+37179000000 37180861651 12393000000 12393620550 3803065408 3803685958
+37182000000 37183861877 12394000000 12394620625 3804065408 3804686033
+37185000000 37186862037 12395000000 12395620679 3805065408 3805686087
+37188000000 37189862169 12396000000 12396620723 3806065408 3806686131
+37191000000 37192862277 12397000000 12397620759 3807065408 3807686167
+37194000000 37195862488 12398000000 12398620829 3808065408 3808686237
+37197000000 37198862654 12399000000 12399620884 3809065408 3809686292
+37200000000 37201862765 12400000000 12400620921 3810065408 3810686329
+37203000000 37204862925 12401000000 12401620975 3811065408 3811686383
+37206000000 37207863037 12402000000 12402621012 3812065408 3812686420
+37209000000 37210863235 12403000000 12403621078 3813065408 3813686486
+37212000000 37213863325 12404000000 12404621108 3814065408 3814686516
+37215000000 37216863550 12405000000 12405621183 3815065408 3815686591
+37218000000 37219863682 12406000000 12406621227 3816065408 3816686635
+37221000000 37222863821 12407000000 12407621273 3817065408 3817686681
+37224000000 37225863872 12408000000 12408621290 3818065408 3818686698
+37227000000 37228864083 12409000000 12409621361 3819065408 3819686769
+37230000000 37231864292 12410000000 12410621430 3820065408 3820686838
+37233000000 37234864420 12411000000 12411621473 3821065408 3821686881
+37236000000 37237864563 12412000000 12412621521 3822065408 3822686929
+37239000000 37240864734 12413000000 12413621578 3823065408 3823686986
+37242000000 37243864831 12414000000 12414621610 3824065408 3824687018
+37245000000 37246865044 12415000000 12415621681 3825065408 3825687089
+37248000000 37249865174 12416000000 12416621724 3826065408 3826687132
+37251000000 37252865324 12417000000 12417621774 3827065408 3827687182
+37254000000 37255865484 12418000000 12418621828 3828065408 3828687236
+37257000000 37258865580 12419000000 12419621860 3829065408 3829687268
+37260000000 37261865768 12420000000 12420621922 3830065408 3830687330
+37263000000 37264865936 12421000000 12421621978 3831065408 3831687386
+37266000000 37267866072 12422000000 12422622024 3832065408 3832687432
+37269000000 37270866247 12423000000 12423622082 3833065408 3833687490
+37272000000 37273866369 12424000000 12424622123 3834065408 3834687531
+37275000000 37276866519 12425000000 12425622173 3835065408 3835687581
+37278000000 37279866667 12426000000 12426622222 3836065408 3836687630
+37281000000 37282866873 12427000000 12427622291 3837065408 3837687699
+37284000000 37285866987 12428000000 12428622329 3838065408 3838687737
+37287000000 37288867119 12429000000 12429622373 3839065408 3839687781
+37290000000 37291867293 12430000000 12430622431 3840065408 3840687839
+37293000000 37294867412 12431000000 12431622470 3841065408 3841687878
+37296000000 37297867536 12432000000 12432622512 3842065408 3842687920
+37299000000 37300867755 12433000000 12433622585 3843065408 3843687993
+37302000000 37303867891 12434000000 12434622630 3844065408 3844688038
+37305000000 37306868042 12435000000 12435622680 3845065408 3845688088
+37308000000 37309868202 12436000000 12436622734 3846065408 3846688142
+37311000000 37312868323 12437000000 12437622774 3847065408 3847688182
+37314000000 37315868404 12438000000 12438622801 3848065408 3848688209
+37317000000 37318868612 12439000000 12439622870 3849065408 3849688278
+37320000000 37321868767 12440000000 12440622922 3850065408 3850688330
+37323000000 37324868926 12441000000 12441622975 3851065408 3851688383
+37326000000 37327869078 12442000000 12442623026 3852065408 3852688434
+37329000000 37330869200 12443000000 12443623066 3853065408 3853688474
+37332000000 37333869378 12444000000 12444623126 3854065408 3854688534
+37335000000 37336869527 12445000000 12445623175 3855065408 3855688583
+37338000000 37339869655 12446000000 12446623218 3856065408 3856688626
+37341000000 37342869824 12447000000 12447623274 3857065408 3857688682
+37344000000 37345869944 12448000000 12448623314 3858065408 3858688722
+37347000000 37348869871 12449000000 12449623290 3859065408 3859688698
+37350000000 37351870194 12450000000 12450623398 3860065408 3860688806
+37353000000 37354870447 12451000000 12451623482 3861065408 3861688890
+37356000000 37357870557 12452000000 12452623519 3862065408 3862688927
+37359000000 37360870736 12453000000 12453623578 3863065408 3863688986
+37362000000 37363870784 12454000000 12454623594 3864065408 3864689002
+37365000000 37366871038 12455000000 12455623679 3865065408 3865689087
+37368000000 37369871157 12456000000 12456623719 3866065408 3866689127
+37371000000 37372871328 12457000000 12457623776 3867065408 3867689184
+37374000000 37375871475 12458000000 12458623825 3868065408 3868689233
+37377000000 37378871628 12459000000 12459623876 3869065408 3869689284
+37380000000 37381871774 12460000000 12460623924 3870065408 3870689332
+37383000000 37384871918 12461000000 12461623972 3871065408 3871689380
+37386000000 37387872081 12462000000 12462624027 3872065408 3872689435
+37389000000 37390872233 12463000000 12463624077 3873065408 3873689485
+37392000000 37393872387 12464000000 12464624129 3874065408 3874689537
+37395000000 37396872507 12465000000 12465624169 3875065408 3875689577
+37398000000 37399872716 12466000000 12466624238 3876065408 3876689646
+37401000000 37402872846 12467000000 12467624282 3877065408 3877689690
+37404000000 37405872960 12468000000 12468624320 3878065408 3878689728
+37407000000 37408873121 12469000000 12469624373 3879065408 3879689781
+37410000000 37411873256 12470000000 12470624418 3880065408 3880689826
+37413000000 37414873399 12471000000 12471624466 3881065408 3881689874
+37416000000 37417873499 12472000000 12472624499 3882065408 3882689907
+37419000000 37420873733 12473000000 12473624577 3883065408 3883689985
+37422000000 37423873806 12474000000 12474624602 3884065408 3884690010
+37425000000 37426873927 12475000000 12475624642 3885065408 3885690050
+37428000000 37429874116 12476000000 12476624705 3886065408 3886690113
+37431000000 37432874270 12477000000 12477624756 3887065408 3887690164
+37434000000 37435874449 12478000000 12478624816 3888065408 3888690224
+37437000000 37438874595 12479000000 12479624865 3889065408 3889690273
+37440000000 37441874722 12480000000 12480624907 3890065408 3890690315
+37443000000 37444874896 12481000000 12481624965 3891065408 3891690373
+37446000000 37447874960 12482000000 12482624986 3892065408 3892690394
+37449000000 37450875167 12483000000 12483625055 3893065408 3893690463
+37452000000 37453875348 12484000000 12484625116 3894065408 3894690524
+37455000000 37456875497 12485000000 12485625165 3895065408 3895690573
+37458000000 37459875554 12486000000 12486625184 3896065408 3896690592
+37461000000 37462875750 12487000000 12487625250 3897065408 3897690658
+37464000000 37465875940 12488000000 12488625313 3898065408 3898690721
+37467000000 37468876085 12489000000 12489625361 3899065408 3899690769
+37470000000 37471876257 12490000000 12490625419 3900065408 3900690827
+37473000000 37474876390 12491000000 12491625463 3901065408 3901690871
+37476000000 37477876461 12492000000 12492625487 3902065408 3902690895
+37479000000 37480876687 12493000000 12493625562 3903065408 3903690970
+37482000000 37483876847 12494000000 12494625615 3904065408 3904691023
+37485000000 37486876979 12495000000 12495625659 3905065408 3905691067
+37488000000 37489877087 12496000000 12496625695 3906065408 3906691103
+37491000000 37492877298 12497000000 12497625766 3907065408 3907691174
+37494000000 37495877464 12498000000 12498625821 3908065408 3908691229
+37497000000 37498877575 12499000000 12499625858 3909065408 3909691266
+37500000000 37501877735 12500000000 12500625911 3910065408 3910691319
+37503000000 37504877847 12501000000 12501625949 3911065408 3911691357
+37506000000 37507878045 12502000000 12502626015 3912065408 3912691423
+37509000000 37510878135 12503000000 12503626045 3913065408 3913691453
+37512000000 37513878360 12504000000 12504626120 3914065408 3914691528
+37515000000 37516878492 12505000000 12505626164 3915065408 3915691572
+37518000000 37519878631 12506000000 12506626210 3916065408 3916691618
+37521000000 37522878682 12507000000 12507626227 3917065408 3917691635
+37524000000 37525878893 12508000000 12508626297 3918065408 3918691705
+37527000000 37528879102 12509000000 12509626367 3919065408 3919691775
+37530000000 37531879230 12510000000 12510626410 3920065408 3920691818
+37533000000 37534879373 12511000000 12511626457 3921065408 3921691865
+37536000000 37537879544 12512000000 12512626514 3922065408 3922691922
+37539000000 37540879641 12513000000 12513626547 3923065408 3923691955
+37542000000 37543879854 12514000000 12514626618 3924065408 3924692026
+37545000000 37546879984 12515000000 12515626661 3925065408 3925692069
+37548000000 37549880134 12516000000 12516626711 3926065408 3926692119
+37551000000 37552880294 12517000000 12517626764 3927065408 3927692172
+37554000000 37555880390 12518000000 12518626796 3928065408 3928692204
+37557000000 37558880578 12519000000 12519626859 3929065408 3929692267
+37560000000 37561880746 12520000000 12520626915 3930065408 3930692323
+37563000000 37564880882 12521000000 12521626960 3931065408 3931692368
+37566000000 37567881057 12522000000 12522627019 3932065408 3932692427
+37569000000 37570881179 12523000000 12523627059 3933065408 3933692467
+37572000000 37573881329 12524000000 12524627109 3934065408 3934692517
+37575000000 37576881477 12525000000 12525627159 3935065408 3935692567
+37578000000 37579881683 12526000000 12526627227 3936065408 3936692635
+37581000000 37582881797 12527000000 12527627265 3937065408 3937692673
+37584000000 37585881929 12528000000 12528627309 3938065408 3938692717
+37587000000 37588882103 12529000000 12529627367 3939065408 3939692775
+37590000000 37591882222 12530000000 12530627407 3940065408 3940692815
+37593000000 37594882346 12531000000 12531627448 3941065408 3941692856
+37596000000 37597882565 12532000000 12532627521 3942065408 3942692929
+37599000000 37600882701 12533000000 12533627567 3943065408 3943692975
+37602000000 37603882852 12534000000 12534627617 3944065408 3944693025
+37605000000 37606883012 12535000000 12535627670 3945065408 3945693078
+37608000000 37609883133 12536000000 12536627711 3946065408 3946693119
+37611000000 37612883214 12537000000 12537627738 3947065408 3947693146
+37614000000 37615883422 12538000000 12538627807 3948065408 3948693215
+37617000000 37618883577 12539000000 12539627859 3949065408 3949693267
+37620000000 37621883736 12540000000 12540627912 3950065408 3950693320
+37623000000 37624883888 12541000000 12541627962 3951065408 3951693370
+37626000000 37627884010 12542000000 12542628003 3952065408 3952693411
+37629000000 37630884188 12543000000 12543628062 3953065408 3953693470
+37632000000 37633884337 12544000000 12544628112 3954065408 3954693520
+37635000000 37636884465 12545000000 12545628155 3955065408 3955693563
+37638000000 37639884634 12546000000 12546628211 3956065408 3956693619
+37641000000 37642884754 12547000000 12547628251 3957065408 3957693659
+37644000000 37645884681 12548000000 12548628227 3958065408 3958693635
+37647000000 37648885004 12549000000 12549628334 3959065408 3959693742
+37650000000 37651885257 12550000000 12550628419 3960065408 3960693827
+37653000000 37654885367 12551000000 12551628455 3961065408 3961693863
+37656000000 37657885546 12552000000 12552628515 3962065408 3962693923
+37659000000 37660885594 12553000000 12553628531 3963065408 3963693939
+37662000000 37663885848 12554000000 12554628616 3964065408 3964694024
+37665000000 37666885967 12555000000 12555628655 3965065408 3965694063
+37668000000 37669886138 12556000000 12556628712 3966065408 3966694120
+37671000000 37672886285 12557000000 12557628761 3967065408 3967694169
+37674000000 37675886438 12558000000 12558628812 3968065408 3968694220
+37677000000 37678886584 12559000000 12559628861 3969065408 3969694269
+37680000000 37681886728 12560000000 12560628909 3970065408 3970694317
+37683000000 37684886891 12561000000 12561628963 3971065408 3971694371
+37686000000 37687887043 12562000000 12562629014 3972065408 3972694422
+37689000000 37690887197 12563000000 12563629065 3973065408 3973694473
+37692000000 37693887317 12564000000 12564629105 3974065408 3974694513
+37695000000 37696887526 12565000000 12565629175 3975065408 3975694583
+37698000000 37699887656 12566000000 12566629218 3976065408 3976694626
+37701000000 37702887770 12567000000 12567629256 3977065408 3977694664
+37704000000 37705887931 12568000000 12568629310 3978065408 3978694718
+37707000000 37708888066 12569000000 12569629355 3979065408 3979694763
+37710000000 37711888209 12570000000 12570629403 3980065408 3980694811
+37713000000 37714888309 12571000000 12571629436 3981065408 3981694844
+37716000000 37717888543 12572000000 12572629514 3982065408 3982694922
+37719000000 37720888616 12573000000 12573629538 3983065408 3983694946
+37722000000 37723888737 12574000000 12574629579 3984065408 3984694987
+37725000000 37726888926 12575000000 12575629642 3985065408 3985695050
+37728000000 37729889080 12576000000 12576629693 3986065408 3986695101
+37731000000 37732889259 12577000000 12577629753 3987065408 3987695161
+37734000000 37735889405 12578000000 12578629801 3988065408 3988695209
+37737000000 37738889532 12579000000 12579629844 3989065408 3989695252
+37740000000 37741889706 12580000000 12580629902 3990065408 3990695310
+37743000000 37744889770 12581000000 12581629923 3991065408 3991695331
+37746000000 37747889977 12582000000 12582629992 3992065408 3992695400
+37749000000 37750890158 12583000000 12583630052 3993065408 3993695460
+37752000000 37753890307 12584000000 12584630102 3994065408 3994695510
+37755000000 37756890364 12585000000 12585630121 3995065408 3995695529
+37758000000 37759890560 12586000000 12586630186 3996065408 3996695594
+37761000000 37762890750 12587000000 12587630250 3997065408 3997695658
+37764000000 37765890895 12588000000 12588630298 3998065408 3998695706
+37767000000 37768891067 12589000000 12589630355 3999065408 3999695763
+37770000000 37771891200 12590000000 12590630400 4000065408 4000695808
+37773000000 37774891271 12591000000 12591630423 4001065408 4001695831
+37776000000 37777891497 12592000000 12592630499 4002065408 4002695907
+37779000000 37780891657 12593000000 12593630552 4003065408 4003695960
+37782000000 37783891789 12594000000 12594630596 4004065408 4004696004
+37785000000 37786891897 12595000000 12595630632 4005065408 4005696040
+37788000000 37789892108 12596000000 12596630702 4006065408 4006696110
+37791000000 37792892274 12597000000 12597630758 4007065408 4007696166
+37794000000 37795892385 12598000000 12598630795 4008065408 4008696203
+37797000000 37798892545 12599000000 12599630848 4009065408 4009696256
+37800000000 37801892657 12600000000 12600630885 4010065408 4010696293
+37803000000 37804892855 12601000000 12601630951 4011065408 4011696359
+37806000000 37807892945 12602000000 12602630981 4012065408 4012696389
+37809000000 37810893170 12603000000 12603631056 4013065408 4013696464
+37812000000 37813893302 12604000000 12604631100 4014065408 4014696508
+37815000000 37816893441 12605000000 12605631147 4015065408 4015696555
+37818000000 37819893492 12606000000 12606631164 4016065408 4016696572
+37821000000 37822893703 12607000000 12607631234 4017065408 4017696642
+37824000000 37825893912 12608000000 12608631304 4018065408 4018696712
+37827000000 37828894040 12609000000 12609631346 4019065408 4019696754
+37830000000 37831894183 12610000000 12610631394 4020065408 4020696802
+37833000000 37834894354 12611000000 12611631451 4021065408 4021696859
+37836000000 37837894451 12612000000 12612631483 4022065408 4022696891
+37839000000 37840894664 12613000000 12613631554 4023065408 4023696962
+37842000000 37843894794 12614000000 12614631598 4024065408 4024697006
+37845000000 37846894944 12615000000 12615631648 4025065408 4025697056
+37848000000 37849895104 12616000000 12616631701 4026065408 4026697109
+37851000000 37852895200 12617000000 12617631733 4027065408 4027697141
+37854000000 37855895388 12618000000 12618631796 4028065408 4028697204
+37857000000 37858895556 12619000000 12619631852 4029065408 4029697260
+37860000000 37861895692 12620000000 12620631897 4030065408 4030697305
+37863000000 37864895867 12621000000 12621631955 4031065408 4031697363
+37866000000 37867895989 12622000000 12622631996 4032065408 4032697404
+37869000000 37870896139 12623000000 12623632046 4033065408 4033697454
+37872000000 37873896287 12624000000 12624632095 4034065408 4034697503
+37875000000 37876896493 12625000000 12625632164 4035065408 4035697572
+37878000000 37879896607 12626000000 12626632202 4036065408 4036697610
+37881000000 37882896739 12627000000 12627632246 4037065408 4037697654
+37884000000 37885896913 12628000000 12628632304 4038065408 4038697712
+37887000000 37888897032 12629000000 12629632344 4039065408 4039697752
+37890000000 37891897156 12630000000 12630632385 4040065408 4040697793
+37893000000 37894897375 12631000000 12631632458 4041065408 4041697866
+37896000000 37897897511 12632000000 12632632503 4042065408 4042697911
+37899000000 37900897662 12633000000 12633632554 4043065408 4043697962
+37902000000 37903897822 12634000000 12634632607 4044065408 4044698015
+37905000000 37906897943 12635000000 12635632647 4045065408 4045698055
+37908000000 37909898024 12636000000 12636632674 4046065408 4046698082
+37911000000 37912898232 12637000000 12637632744 4047065408 4047698152
+37914000000 37915898387 12638000000 12638632795 4048065408 4048698203
+37917000000 37918898546 12639000000 12639632848 4049065408 4049698256
+37920000000 37921898698 12640000000 12640632899 4050065408 4050698307
+37923000000 37924898820 12641000000 12641632940 4051065408 4051698348
+37926000000 37927898998 12642000000 12642632999 4052065408 4052698407
+37929000000 37930899147 12643000000 12643633049 4053065408 4053698457
+37932000000 37933899275 12644000000 12644633091 4054065408 4054698499
+37935000000 37936899444 12645000000 12645633148 4055065408 4055698556
+37938000000 37939899564 12646000000 12646633188 4056065408 4056698596
+37941000000 37942899491 12647000000 12647633163 4057065408 4057698571
+37944000000 37945899814 12648000000 12648633271 4058065408 4058698679
+37947000000 37948900067 12649000000 12649633355 4059065408 4059698763
+37950000000 37951900177 12650000000 12650633392 4060065408 4060698800
+37953000000 37954900356 12651000000 12651633452 4061065408 4061698860
+37956000000 37957900404 12652000000 12652633468 4062065408 4062698876
+37959000000 37960900658 12653000000 12653633552 4063065408 4063698960
+37962000000 37963900777 12654000000 12654633592 4064065408 4064699000
+37965000000 37966900948 12655000000 12655633649 4065065408 4065699057
+37968000000 37969901095 12656000000 12656633698 4066065408 4066699106
+37971000000 37972901248 12657000000 12657633749 4067065408 4067699157
+37974000000 37975901394 12658000000 12658633798 4068065408 4068699206
+37977000000 37978901538 12659000000 12659633846 4069065408 4069699254
+37980000000 37981901701 12660000000 12660633900 4070065408 4070699308
+37983000000 37984901853 12661000000 12661633951 4071065408 4071699359
+37986000000 37987902007 12662000000 12662634002 4072065408 4072699410
+37989000000 37990902127 12663000000 12663634042 4073065408 4073699450
+37992000000 37993902336 12664000000 12664634112 4074065408 4074699520
+37995000000 37996902466 12665000000 12665634155 4075065408 4075699563
+37998000000 37999902580 12666000000 12666634193 4076065408 4076699601
+38001000000 38002902741 12667000000 12667634247 4077065408 4077699655
+38004000000 38005902876 12668000000 12668634292 4078065408 4078699700
+38007000000 38008903019 12669000000 12669634339 4079065408 4079699747
+38010000000 38011903119 12670000000 12670634373 4080065408 4080699781
+38013000000 38014903353 12671000000 12671634451 4081065408 4081699859
+38016000000 38017903426 12672000000 12672634475 4082065408 4082699883
+38019000000 38020903547 12673000000 12673634515 4083065408 4083699923
+38022000000 38023903736 12674000000 12674634578 4084065408 4084699986
+38025000000 38026903890 12675000000 12675634630 4085065408 4085700038
+38028000000 38029904069 12676000000 12676634689 4086065408 4086700097
+38031000000 38032904215 12677000000 12677634738 4087065408 4087700146
+38034000000 38035904342 12678000000 12678634780 4088065408 4088700188
+38037000000 38038904516 12679000000 12679634838 4089065408 4089700246
+38040000000 38041904580 12680000000 12680634860 4090065408 4090700268
+38043000000 38044904787 12681000000 12681634929 4091065408 4091700337
+38046000000 38047904968 12682000000 12682634989 4092065408 4092700397
+38049000000 38050905117 12683000000 12683635039 4093065408 4093700447
+38052000000 38053905174 12684000000 12684635058 4094065408 4094700466
+38055000000 38056905370 12685000000 12685635123 4095065408 4095700531
+38058000000 38059905560 12686000000 12686635186 4096065408 4096700594
+38061000000 38062905705 12687000000 12687635235 4097065408 4097700643
+38064000000 38065905877 12688000000 12688635292 4098065408 4098700700
+38067000000 38068906010 12689000000 12689635336 4099065408 4099700744
+38070000000 38071906081 12690000000 12690635360 4100065408 4100700768
+38073000000 38074906307 12691000000 12691635435 4101065408 4101700843
+38076000000 38077906467 12692000000 12692635489 4102065408 4102700897
+38079000000 38080906599 12693000000 12693635533 4103065408 4103700941
+38082000000 38083906707 12694000000 12694635569 4104065408 4104700977
+38085000000 38086906918 12695000000 12695635639 4105065408 4105701047
+38088000000 38089907084 12696000000 12696635694 4106065408 4106701102
+38091000000 38092907195 12697000000 12697635731 4107065408 4107701139
+38094000000 38095907355 12698000000 12698635785 4108065408 4108701193
+38097000000 38098907467 12699000000 12699635822 4109065408 4109701230
+38100000000 38101907665 12700000000 12700635888 4110065408 4110701296
+38103000000 38104907755 12701000000 12701635918 4111065408 4111701326
+38106000000 38107907980 12702000000 12702635993 4112065408 4112701401
+38109000000 38110908112 12703000000 12703636037 4113065408 4113701445
+38112000000 38113908251 12704000000 12704636083 4114065408 4114701491
+38115000000 38116908302 12705000000 12705636100 4115065408 4115701508
+38118000000 38119908513 12706000000 12706636171 4116065408 4116701579
+38121000000 38122908722 12707000000 12707636240 4117065408 4117701648
+38124000000 38125908850 12708000000 12708636283 4118065408 4118701691
+38127000000 38128908993 12709000000 12709636331 4119065408 4119701739
+38130000000 38131909164 12710000000 12710636388 4120065408 4120701796
+38133000000 38134909261 12711000000 12711636420 4121065408 4121701828
+38136000000 38137909474 12712000000 12712636491 4122065408 4122701899
+38139000000 38140909604 12713000000 12713636534 4123065408 4123701942
+38142000000 38143909754 12714000000 12714636584 4124065408 4124701992
+38145000000 38146909914 12715000000 12715636638 4125065408 4125702046
+38148000000 38149910010 12716000000 12716636670 4126065408 4126702078
+38151000000 38152910198 12717000000 12717636732 4127065408 4127702140
+38154000000 38155910366 12718000000 12718636788 4128065408 4128702196
+38157000000 38158910502 12719000000 12719636834 4129065408 4129702242
+38160000000 38161910677 12720000000 12720636892 4130065408 4130702300
+38163000000 38164910799 12721000000 12721636933 4131065408 4131702341
+38166000000 38167910949 12722000000 12722636983 4132065408 4132702391
+38169000000 38170911097 12723000000 12723637032 4133065408 4133702440
+38172000000 38173911303 12724000000 12724637101 4134065408 4134702509
+38175000000 38176911417 12725000000 12725637139 4135065408 4135702547
+38178000000 38179911549 12726000000 12726637183 4136065408 4136702591
+38181000000 38182911723 12727000000 12727637241 4137065408 4137702649
+38184000000 38185911842 12728000000 12728637280 4138065408 4138702688
+38187000000 38188911966 12729000000 12729637322 4139065408 4139702730
+38190000000 38191912185 12730000000 12730637395 4140065408 4140702803
+38193000000 38194912321 12731000000 12731637440 4141065408 4141702848
+38196000000 38197912472 12732000000 12732637490 4142065408 4142702898
+38199000000 38200912632 12733000000 12733637544 4143065408 4143702952
+38202000000 38203912753 12734000000 12734637584 4144065408 4144702992
+38205000000 38206912834 12735000000 12735637611 4145065408 4145703019
+38208000000 38209913042 12736000000 12736637680 4146065408 4146703088
+38211000000 38212913197 12737000000 12737637732 4147065408 4147703140
+38214000000 38215913356 12738000000 12738637785 4148065408 4148703193
+38217000000 38218913508 12739000000 12739637836 4149065408 4149703244
+38220000000 38221913630 12740000000 12740637876 4150065408 4150703284
+38223000000 38224913808 12741000000 12741637936 4151065408 4151703344
+38226000000 38227913957 12742000000 12742637985 4152065408 4152703393
+38229000000 38230914085 12743000000 12743638028 4153065408 4153703436
+38232000000 38233914254 12744000000 12744638084 4154065408 4154703492
+38235000000 38236914374 12745000000 12745638124 4155065408 4155703532
+38238000000 38239914301 12746000000 12746638100 4156065408 4156703508
+38241000000 38242914624 12747000000 12747638208 4157065408 4157703616
+38244000000 38245914877 12748000000 12748638292 4158065408 4158703700
+38247000000 38248914987 12749000000 12749638329 4159065408 4159703737
+38250000000 38251915166 12750000000 12750638388 4160065408 4160703796
+38253000000 38254915214 12751000000 12751638404 4161065408 4161703812
+38256000000 38257915468 12752000000 12752638489 4162065408 4162703897
+38259000000 38260915587 12753000000 12753638529 4163065408 4163703937
+38262000000 38263915758 12754000000 12754638586 4164065408 4164703994
+38265000000 38266915905 12755000000 12755638635 4165065408 4165704043
+38268000000 38269916058 12756000000 12756638686 4166065408 4166704094
+38271000000 38272916204 12757000000 12757638734 4167065408 4167704142
+38274000000 38275916348 12758000000 12758638782 4168065408 4168704190
+38277000000 38278916511 12759000000 12759638837 4169065408 4169704245
+38280000000 38281916663 12760000000 12760638887 4170065408 4170704295
+38283000000 38284916817 12761000000 12761638939 4171065408 4171704347
+38286000000 38287916937 12762000000 12762638979 4172065408 4172704387
+38289000000 38290917146 12763000000 12763639048 4173065408 4173704456
+38292000000 38293917276 12764000000 12764639092 4174065408 4174704500
+38295000000 38296917390 12765000000 12765639130 4175065408 4175704538
+38298000000 38299917551 12766000000 12766639183 4176065408 4176704591
+38301000000 38302917686 12767000000 12767639228 4177065408 4177704636
+38304000000 38305917829 12768000000 12768639276 4178065408 4178704684
+38307000000 38308917929 12769000000 12769639309 4179065408 4179704717
+38310000000 38311918163 12770000000 12770639387 4180065408 4180704795
+38313000000 38314918236 12771000000 12771639412 4181065408 4181704820
+38316000000 38317918357 12772000000 12772639452 4182065408 4182704860
+38319000000 38320918546 12773000000 12773639515 4183065408 4183704923
+38322000000 38323918700 12774000000 12774639566 4184065408 4184704974
+38325000000 38326918879 12775000000 12775639626 4185065408 4185705034
+38328000000 38329919025 12776000000 12776639675 4186065408 4186705083
+38331000000 38332919152 12777000000 12777639717 4187065408 4187705125
+38334000000 38335919326 12778000000 12778639775 4188065408 4188705183
+38337000000 38338919390 12779000000 12779639796 4189065408 4189705204
+38340000000 38341919597 12780000000 12780639865 4190065408 4190705273
+38343000000 38344919778 12781000000 12781639926 4191065408 4191705334
+38346000000 38347919927 12782000000 12782639975 4192065408 4192705383
+38349000000 38350919984 12783000000 12783639994 4193065408 4193705402
+38352000000 38353920180 12784000000 12784640060 4194065408 4194705468
+38355000000 38356920370 12785000000 12785640123 4195065408 4195705531
+38358000000 38359920515 12786000000 12786640171 4196065408 4196705579
+38361000000 38362920687 12787000000 12787640229 4197065408 4197705637
+38364000000 38365920820 12788000000 12788640273 4198065408 4198705681
+38367000000 38368920891 12789000000 12789640297 4199065408 4199705705
+38370000000 38371921117 12790000000 12790640372 4200065408 4200705780
+38373000000 38374921277 12791000000 12791640425 4201065408 4201705833
+38376000000 38377921409 12792000000 12792640469 4202065408 4202705877
+38379000000 38380921517 12793000000 12793640505 4203065408 4203705913
+38382000000 38383921728 12794000000 12794640576 4204065408 4204705984
+38385000000 38386921894 12795000000 12795640631 4205065408 4205706039
+38388000000 38389922005 12796000000 12796640668 4206065408 4206706076
+38391000000 38392922165 12797000000 12797640721 4207065408 4207706129
+38394000000 38395922277 12798000000 12798640759 4208065408 4208706167
+38397000000 38398922475 12799000000 12799640825 4209065408 4209706233
+38400000000 38401922565 12800000000 12800640855 4210065408 4210706263
+38403000000 38404922790 12801000000 12801640930 4211065408 4211706338
+38406000000 38407922922 12802000000 12802640974 4212065408 4212706382
+38409000000 38410923061 12803000000 12803641020 4213065408 4213706428
+38412000000 38413923112 12804000000 12804641037 4214065408 4214706445
+38415000000 38416923323 12805000000 12805641107 4215065408 4215706515
+38418000000 38419923532 12806000000 12806641177 4216065408 4216706585
+38421000000 38422923660 12807000000 12807641220 4217065408 4217706628
+38424000000 38425923803 12808000000 12808641267 4218065408 4218706675
+38427000000 38428923974 12809000000 12809641324 4219065408 4219706732
+38430000000 38431924071 12810000000 12810641357 4220065408 4220706765
+38433000000 38434924284 12811000000 12811641428 4221065408 4221706836
+38436000000 38437924414 12812000000 12812641471 4222065408 4222706879
+38439000000 38440924564 12813000000 12813641521 4223065408 4223706929
+38442000000 38443924724 12814000000 12814641574 4224065408 4224706982
+38445000000 38446924820 12815000000 12815641606 4225065408 4225707014
+38448000000 38449925008 12816000000 12816641669 4226065408 4226707077
+38451000000 38452925176 12817000000 12817641725 4227065408 4227707133
+38454000000 38455925312 12818000000 12818641770 4228065408 4228707178
+38457000000 38458925487 12819000000 12819641829 4229065408 4229707237
+38460000000 38461925609 12820000000 12820641869 4230065408 4230707277
+38463000000 38464925759 12821000000 12821641919 4231065408 4231707327
+38466000000 38467925907 12822000000 12822641969 4232065408 4232707377
+38469000000 38470926113 12823000000 12823642037 4233065408 4233707445
+38472000000 38473926227 12824000000 12824642075 4234065408 4234707483
+38475000000 38476926359 12825000000 12825642119 4235065408 4235707527
+38478000000 38479926533 12826000000 12826642177 4236065408 4236707585
+38481000000 38482926652 12827000000 12827642217 4237065408 4237707625
+38484000000 38485926776 12828000000 12828642258 4238065408 4238707666
+38487000000 38488926995 12829000000 12829642331 4239065408 4239707739
+38490000000 38491927131 12830000000 12830642377 4240065408 4240707785
+38493000000 38494927282 12831000000 12831642427 4241065408 4241707835
+38496000000 38497927442 12832000000 12832642480 4242065408 4242707888
+38499000000 38500927563 12833000000 12833642521 4243065408 4243707929
+38502000000 38503927644 12834000000 12834642548 4244065408 4244707956
+38505000000 38506927852 12835000000 12835642617 4245065408 4245708025
+38508000000 38509928007 12836000000 12836642669 4246065408 4246708077
+38511000000 38512928166 12837000000 12837642722 4247065408 4247708130
+38514000000 38515928318 12838000000 12838642772 4248065408 4248708180
+38517000000 38518928440 12839000000 12839642813 4249065408 4249708221
+38520000000 38521928618 12840000000 12840642872 4250065408 4250708280
+38523000000 38524928767 12841000000 12841642922 4251065408 4251708330
+38526000000 38527928895 12842000000 12842642965 4252065408 4252708373
+38529000000 38530929064 12843000000 12843643021 4253065408 4253708429
+38532000000 38533929184 12844000000 12844643061 4254065408 4254708469
+38535000000 38536929111 12845000000 12845643037 4255065408 4255708445
+38538000000 38539929434 12846000000 12846643144 4256065408 4256708552
+38541000000 38542929687 12847000000 12847643229 4257065408 4257708637
+38544000000 38545929797 12848000000 12848643265 4258065408 4258708673
+38547000000 38548929976 12849000000 12849643325 4259065408 4259708733
+38550000000 38551930024 12850000000 12850643341 4260065408 4260708749
+38553000000 38554930278 12851000000 12851643426 4261065408 4261708834
+38556000000 38557930397 12852000000 12852643465 4262065408 4262708873
+38559000000 38560930568 12853000000 12853643522 4263065408 4263708930
+38562000000 38563930715 12854000000 12854643571 4264065408 4264708979
+38565000000 38566930868 12855000000 12855643622 4265065408 4265709030
+38568000000 38569931014 12856000000 12856643671 4266065408 4266709079
+38571000000 38572931158 12857000000 12857643719 4267065408 4267709127
+38574000000 38575931321 12858000000 12858643773 4268065408 4268709181
+38577000000 38578931473 12859000000 12859643824 4269065408 4269709232
+38580000000 38581931627 12860000000 12860643875 4270065408 4270709283
+38583000000 38584931747 12861000000 12861643915 4271065408 4271709323
+38586000000 38587931956 12862000000 12862643985 4272065408 4272709393
+38589000000 38590932086 12863000000 12863644028 4273065408 4273709436
+38592000000 38593932200 12864000000 12864644066 4274065408 4274709474
+38595000000 38596932361 12865000000 12865644120 4275065408 4275709528
+38598000000 38599932496 12866000000 12866644165 4276065408 4276709573
+38601000000 38602932639 12867000000 12867644213 4277065408 4277709621
+38604000000 38605932739 12868000000 12868644246 4278065408 4278709654
+38607000000 38608932973 12869000000 12869644324 4279065408 4279709732
+38610000000 38611933046 12870000000 12870644348 4280065408 4280709756
+38613000000 38614933167 12871000000 12871644389 4281065408 4281709797
+38616000000 38617933356 12872000000 12872644452 4282065408 4282709860
+38619000000 38620933510 12873000000 12873644503 4283065408 4283709911
+38622000000 38623933689 12874000000 12874644563 4284065408 4284709971
+38625000000 38626933835 12875000000 12875644611 4285065408 4285710019
+38628000000 38629933962 12876000000 12876644654 4286065408 4286710062
+38631000000 38632934136 12877000000 12877644712 4287065408 4287710120
+38634000000 38635934200 12878000000 12878644733 4288065408 4288710141
+38637000000 38638934407 12879000000 12879644802 4289065408 4289710210
+38640000000 38641934588 12880000000 12880644862 4290065408 4290710270
+38643000000 38644934737 12881000000 12881644912 4291065408 4291710320
+38646000000 38647934794 12882000000 12882644931 4292065408 4292710339
+38649000000 38650934990 12883000000 12883644996 4293065408 4293710404
+38652000000 38653935180 12884000000 12884645060 4294065408 4294710468
+38655000000 38656935325 12885000000 12885645108 98112 743220
+38658000000 38659935497 12886000000 12886645165 1098112 1743277
+38661000000 38662935630 12887000000 12887645210 2098112 2743322
+38664000000 38665935701 12888000000 12888645233 3098112 3743345
+38667000000 38668935927 12889000000 12889645309 4098112 4743421
+38670000000 38671936087 12890000000 12890645362 5098112 5743474
+38673000000 38674936219 12891000000 12891645406 6098112 6743518
+38676000000 38677936327 12892000000 12892645442 7098112 7743554
+38679000000 38680936538 12893000000 12893645512 8098112 8743624
+38682000000 38683936704 12894000000 12894645568 9098112 9743680
+38685000000 38686936815 12895000000 12895645605 10098112 10743717
+38688000000 38689936975 12896000000 12896645658 11098112 11743770
+38691000000 38692937087 12897000000 12897645695 12098112 12743807
+38694000000 38695937285 12898000000 12898645761 13098112 13743873
+38697000000 38698937375 12899000000 12899645791 14098112 14743903
+38700000000 38701937600 12900000000 12900645866 15098112 15743978
+38703000000 38704937732 12901000000 12901645910 16098112 16744022
+38706000000 38707937871 12902000000 12902645957 17098112 17744069
+38709000000 38710937922 12903000000 12903645974 18098112 18744086
+38712000000 38713938133 12904000000 12904646044 19098112 19744156
+38715000000 38716938342 12905000000 12905646114 20098112 20744226
+38718000000 38719938470 12906000000 12906646156 21098112 21744268
+38721000000 38722938613 12907000000 12907646204 22098112 22744316
+38724000000 38725938784 12908000000 12908646261 23098112 23744373
+38727000000 38728938881 12909000000 12909646293 24098112 24744405
+38730000000 38731939094 12910000000 12910646364 25098112 25744476
+38733000000 38734939224 12911000000 12911646408 26098112 26744520
+38736000000 38737939374 12912000000 12912646458 27098112 27744570
+38739000000 38740939534 12913000000 12913646511 28098112 28744623
+38742000000 38743939630 12914000000 12914646543 29098112 29744655
+38745000000 38746939818 12915000000 12915646606 30098112 30744718
+38748000000 38749939986 12916000000 12916646662 31098112 31744774
+38751000000 38752940122 12917000000 12917646707 32098112 32744819
+38754000000 38755940297 12918000000 12918646765 33098112 33744877
+38757000000 38758940419 12919000000 12919646806 34098112 34744918
+38760000000 38761940569 12920000000 12920646856 35098112 35744968
+38763000000 38764940717 12921000000 12921646905 36098112 36745017
+38766000000 38767940923 12922000000 12922646974 37098112 37745086
+38769000000 38770941037 12923000000 12923647012 38098112 38745124
+38772000000 38773941169 12924000000 12924647056 39098112 39745168
+38775000000 38776941343 12925000000 12925647114 40098112 40745226
+38778000000 38779941462 12926000000 12926647154 41098112 41745266
+38781000000 38782941586 12927000000 12927647195 42098112 42745307
+38784000000 38785941805 12928000000 12928647268 43098112 43745380
+38787000000 38788941941 12929000000 12929647313 44098112 44745425
+38790000000 38791942092 12930000000 12930647364 45098112 45745476
+38793000000 38794942252 12931000000 12931647417 46098112 46745529
+38796000000 38797942373 12932000000 12932647457 47098112 47745569
+38799000000 38800942454 12933000000 12933647484 48098112 48745596
+38802000000 38803942662 12934000000 12934647554 49098112 49745666
+38805000000 38806942817 12935000000 12935647605 50098112 50745717
+38808000000 38809942976 12936000000 12936647658 51098112 51745770
+38811000000 38812943128 12937000000 12937647709 52098112 52745821
+38814000000 38815943250 12938000000 12938647750 53098112 53745862
+38817000000 38818943428 12939000000 12939647809 54098112 54745921
+38820000000 38821943577 12940000000 12940647859 55098112 55745971
+38823000000 38824943705 12941000000 12941647901 56098112 56746013
+38826000000 38827943874 12942000000 12942647958 57098112 57746070
+38829000000 38830943994 12943000000 12943647998 58098112 58746110
+38832000000 38833943921 12944000000 12944647973 59098112 59746085
+38835000000 38836944244 12945000000 12945648081 60098112 60746193
+38838000000 38839944497 12946000000 12946648165 61098112 61746277
+38841000000 38842944607 12947000000 12947648202 62098112 62746314
+38844000000 38845944786 12948000000 12948648262 63098112 63746374
+38847000000 38848944834 12949000000 12949648278 64098112 64746390
+38850000000 38851945088 12950000000 12950648362 65098112 65746474
+38853000000 38854945207 12951000000 12951648402 66098112 66746514
+38856000000 38857945378 12952000000 12952648459 67098112 67746571
+38859000000 38860945525 12953000000 12953648508 68098112 68746620
+38862000000 38863945678 12954000000 12954648559 69098112 69746671
+38865000000 38866945824 12955000000 12955648608 70098112 70746720
+38868000000 38869945968 12956000000 12956648656 71098112 71746768
+38871000000 38872946131 12957000000 12957648710 72098112 72746822
+38874000000 38875946283 12958000000 12958648761 73098112 73746873
+38877000000 38878946437 12959000000 12959648812 74098112 74746924
+38880000000 38881946557 12960000000 12960648852 75098112 75746964
+38883000000 38884946766 12961000000 12961648922 76098112 76747034
+38886000000 38887946896 12962000000 12962648965 77098112 77747077
+38889000000 38890947010 12963000000 12963649003 78098112 78747115
+38892000000 38893947171 12964000000 12964649057 79098112 79747169
+38895000000 38896947306 12965000000 12965649102 80098112 80747214
+38898000000 38899947449 12966000000 12966649149 81098112 81747261
+38901000000 38902947549 12967000000 12967649183 82098112 82747295
+38904000000 38905947783 12968000000 12968649261 83098112 83747373
+38907000000 38908947856 12969000000 12969649285 84098112 84747397
+38910000000 38911947977 12970000000 12970649325 85098112 85747437
+38913000000 38914948166 12971000000 12971649388 86098112 86747500
+38916000000 38917948320 12972000000 12972649440 87098112 87747552
+38919000000 38920948499 12973000000 12973649499 88098112 88747611
+38922000000 38923948645 12974000000 12974649548 89098112 89747660
+38925000000 38926948772 12975000000 12975649590 90098112 90747702
+38928000000 38929948946 12976000000 12976649648 91098112 91747760
+38931000000 38932949010 12977000000 12977649670 92098112 92747782
+38934000000 38935949217 12978000000 12978649739 93098112 93747851
+38937000000 38938949398 12979000000 12979649799 94098112 94747911
+38940000000 38941949547 12980000000 12980649849 95098112 95747961
+38943000000 38944949604 12981000000 12981649868 96098112 96747980
+38946000000 38947949800 12982000000 12982649933 97098112 97748045
+38949000000 38950949990 12983000000 12983649996 98098112 98748108
+38952000000 38953950135 12984000000 12984650045 99098112 99748157
+38955000000 38956950307 12985000000 12985650102 100098112 100748214
+38958000000 38959950440 12986000000 12986650146 101098112 101748258
+38961000000 38962950511 12987000000 12987650170 102098112 102748282
+38964000000 38965950737 12988000000 12988650245 103098112 103748357
+38967000000 38968950897 12989000000 12989650299 104098112 104748411
+38970000000 38971951029 12990000000 12990650343 105098112 105748455
+38973000000 38974951137 12991000000 12991650379 106098112 106748491
+38976000000 38977951348 12992000000 12992650449 107098112 107748561
+38979000000 38980951514 12993000000 12993650504 108098112 108748616
+38982000000 38983951625 12994000000 12994650541 109098112 109748653
+38985000000 38986951785 12995000000 12995650595 110098112 110748707
+38988000000 38989951897 12996000000 12996650632 111098112 111748744
+38991000000 38992952095 12997000000 12997650698 112098112 112748810
+38994000000 38995952185 12998000000 12998650728 113098112 113748840
+38997000000 38998952410 12999000000 12999650803 114098112 114748915
+39000000000 39001952542 13000000000 13000650847 115098112 115748959
+39003000000 39004952681 13001000000 13001650893 116098112 116749005
+39006000000 39007952732 13002000000 13002650910 117098112 117749022
+39009000000 39010952943 13003000000 13003650981 118098112 118749093
+39012000000 39013953152 13004000000 13004651050 119098112 119749162
+39015000000 39016953280 13005000000 13005651093 120098112 120749205
+39018000000 39019953423 13006000000 13006651141 121098112 121749253
+39021000000 39022953594 13007000000 13007651198 122098112 122749310
+39024000000 39025953691 13008000000 13008651230 123098112 123749342
+39027000000 39028953904 13009000000 13009651301 124098112 124749413
+39030000000 39031954034 13010000000 13010651344 125098112 125749456
+39033000000 39034954184 13011000000 13011651394 126098112 126749506
+39036000000 39037954344 13012000000 13012651448 127098112 127749560
+39039000000 39040954440 13013000000 13013651480 128098112 128749592
+39042000000 39043954628 13014000000 13014651542 129098112 129749654
+39045000000 39046954796 13015000000 13015651598 130098112 130749710
+39048000000 39049954932 13016000000 13016651644 131098112 131749756
+39051000000 39052955107 13017000000 13017651702 132098112 132749814
+39054000000 39055955229 13018000000 13018651743 133098112 133749855
+39057000000 39058955379 13019000000 13019651793 134098112 134749905
+39060000000 39061955527 13020000000 13020651842 135098112 135749954
+39063000000 39064955733 13021000000 13021651911 136098112 136750023
+39066000000 39067955847 13022000000 13022651949 137098112 137750061
+39069000000 39070955979 13023000000 13023651993 138098112 138750105
+39072000000 39073956153 13024000000 13024652051 139098112 139750163
+39075000000 39076956272 13025000000 13025652090 140098112 140750202
+39078000000 39079956396 13026000000 13026652132 141098112 141750244
+39081000000 39082956615 13027000000 13027652205 142098112 142750317
+39084000000 39085956751 13028000000 13028652250 143098112 143750362
+39087000000 39088956902 13029000000 13029652300 144098112 144750412
+39090000000 39091957062 13030000000 13030652354 145098112 145750466
+39093000000 39094957183 13031000000 13031652394 146098112 146750506
+39096000000 39097957264 13032000000 13032652421 147098112 147750533
+39099000000 39100957472 13033000000 13033652490 148098112 148750602
+39102000000 39103957627 13034000000 13034652542 149098112 149750654
+39105000000 39106957786 13035000000 13035652595 150098112 150750707
+39108000000 39109957938 13036000000 13036652646 151098112 151750758
+39111000000 39112958060 13037000000 13037652686 152098112 152750798
+39114000000 39115958238 13038000000 13038652746 153098112 153750858
+39117000000 39118958387 13039000000 13039652795 154098112 154750907
+39120000000 39121958515 13040000000 13040652838 155098112 155750950
+39123000000 39124958684 13041000000 13041652894 156098112 156751006
+39126000000 39127958804 13042000000 13042652934 157098112 157751046
+39129000000 39130958731 13043000000 13043652910 158098112 158751022
+39132000000 39133959054 13044000000 13044653018 159098112 159751130
+39135000000 39136959307 13045000000 13045653102 160098112 160751214
+39138000000 39139959417 13046000000 13046653139 161098112 161751251
+39141000000 39142959596 13047000000 13047653198 162098112 162751310
+39144000000 39145959644 13048000000 13048653214 163098112 163751326
+39147000000 39148959898 13049000000 13049653299 164098112 164751411
+39150000000 39151960017 13050000000 13050653339 165098112 165751451
+39153000000 39154960188 13051000000 13051653396 166098112 166751508
+39156000000 39157960335 13052000000 13052653445 167098112 167751557
+39159000000 39160960488 13053000000 13053653496 168098112 168751608
+39162000000 39163960634 13054000000 13054653544 169098112 169751656
+39165000000 39166960778 13055000000 13055653592 170098112 170751704
+39168000000 39169960941 13056000000 13056653647 171098112 171751759
+39171000000 39172961093 13057000000 13057653697 172098112 172751809
+39174000000 39175961247 13058000000 13058653749 173098112 173751861
+39177000000 39178961367 13059000000 13059653789 174098112 174751901
+39180000000 39181961576 13060000000 13060653858 175098112 175751970
+39183000000 39184961706 13061000000 13061653902 176098112 176752014
+39186000000 39187961820 13062000000 13062653940 177098112 177752052
+39189000000 39190961981 13063000000 13063653993 178098112 178752105
+39192000000 39193962116 13064000000 13064654038 179098112 179752150
+39195000000 39196962259 13065000000 13065654086 180098112 180752198
+39198000000 39199962359 13066000000 13066654119 181098112 181752231
+39201000000 39202962593 13067000000 13067654197 182098112 182752309
+39204000000 39205962666 13068000000 13068654222 183098112 183752334
+39207000000 39208962787 13069000000 13069654262 184098112 184752374
+39210000000 39211962976 13070000000 13070654325 185098112 185752437
+39213000000 39214963130 13071000000 13071654376 186098112 186752488
+39216000000 39217963309 13072000000 13072654436 187098112 187752548
+39219000000 39220963455 13073000000 13073654485 188098112 188752597
+39222000000 39223963582 13074000000 13074654527 189098112 189752639
+39225000000 39226963756 13075000000 13075654585 190098112 190752697
+39228000000 39229963820 13076000000 13076654606 191098112 191752718
+39231000000 39232964027 13077000000 13077654675 192098112 192752787
+39234000000 39235964208 13078000000 13078654736 193098112 193752848
+39237000000 39238964357 13079000000 13079654785 194098112 194752897
+39240000000 39241964414 13080000000 13080654804 195098112 195752916
+39243000000 39244964610 13081000000 13081654870 196098112 196752982
+39246000000 39247964800 13082000000 13082654933 197098112 197753045
+39249000000 39250964945 13083000000 13083654981 198098112 198753093
+39252000000 39253965117 13084000000 13084655039 199098112 199753151
+39255000000 39256965250 13085000000 13085655083 200098112 200753195
+39258000000 39259965321 13086000000 13086655107 201098112 201753219
+39261000000 39262965547 13087000000 13087655182 202098112 202753294
+39264000000 39265965707 13088000000 13088655235 203098112 203753347
+39267000000 39268965839 13089000000 13089655279 204098112 204753391
+39270000000 39271965947 13090000000 13090655315 205098112 205753427
+39273000000 39274966158 13091000000 13091655386 206098112 206753498
+39276000000 39277966324 13092000000 13092655441 207098112 207753553
+39279000000 39280966435 13093000000 13093655478 208098112 208753590
+39282000000 39283966595 13094000000 13094655531 209098112 209753643
+39285000000 39286966707 13095000000 13095655569 210098112 210753681
+39288000000 39289966905 13096000000 13096655635 211098112 211753747
+39291000000 39292966995 13097000000 13097655665 212098112 212753777
+39294000000 39295967220 13098000000 13098655740 213098112 213753852
+39297000000 39298967352 13099000000 13099655784 214098112 214753896
+39300000000 39301967491 13100000000 13100655830 215098112 215753942
+39303000000 39304967542 13101000000 13101655847 216098112 216753959
+39306000000 39307967753 13102000000 13102655917 217098112 217754029
+39309000000 39310967962 13103000000 13103655987 218098112 218754099
+39312000000 39313968090 13104000000 13104656030 219098112 219754142
+39315000000 39316968233 13105000000 13105656077 220098112 220754189
+39318000000 39319968404 13106000000 13106656134 221098112 221754246
+39321000000 39322968501 13107000000 13107656167 222098112 222754279
+39324000000 39325968714 13108000000 13108656238 223098112 223754350
+39327000000 39328968844 13109000000 13109656281 224098112 224754393
+39330000000 39331968994 13110000000 13110656331 225098112 225754443
+39333000000 39334969154 13111000000 13111656384 226098112 226754496
+39336000000 39337969250 13112000000 13112656416 227098112 227754528
+39339000000 39340969438 13113000000 13113656479 228098112 228754591
+39342000000 39343969606 13114000000 13114656535 229098112 229754647
+39345000000 39346969742 13115000000 13115656580 230098112 230754692
+39348000000 39349969917 13116000000 13116656639 231098112 231754751
+39351000000 39352970039 13117000000 13117656679 232098112 232754791
+39354000000 39355970189 13118000000 13118656729 233098112 233754841
+39357000000 39358970337 13119000000 13119656779 234098112 234754891
+39360000000 39361970543 13120000000 13120656847 235098112 235754959
+39363000000 39364970657 13121000000 13121656885 236098112 236754997
+39366000000 39367970789 13122000000 13122656929 237098112 237755041
+39369000000 39370970963 13123000000 13123656987 238098112 238755099
+39372000000 39373971082 13124000000 13124657027 239098112 239755139
+39375000000 39376971206 13125000000 13125657068 240098112 240755180
+39378000000 39379971425 13126000000 13126657141 241098112 241755253
+39381000000 39382971561 13127000000 13127657187 242098112 242755299
+39384000000 39385971712 13128000000 13128657237 243098112 243755349
+39387000000 39388971872 13129000000 13129657290 244098112 244755402
+39390000000 39391971993 13130000000 13130657331 245098112 245755443
+39393000000 39394972074 13131000000 13131657358 246098112 246755470
+39396000000 39397972282 13132000000 13132657427 247098112 247755539
+39399000000 39400972437 13133000000 13133657479 248098112 248755591
+39402000000 39403972596 13134000000 13134657532 249098112 249755644
+39405000000 39406972748 13135000000 13135657582 250098112 250755694
+39408000000 39409972870 13136000000 13136657623 251098112 251755735
+39411000000 39412973048 13137000000 13137657682 252098112 252755794
+39414000000 39415973197 13138000000 13138657732 253098112 253755844
+39417000000 39418973325 13139000000 13139657775 254098112 254755887
+39420000000 39421973494 13140000000 13140657831 255098112 255755943
+39423000000 39424973614 13141000000 13141657871 256098112 256755983
+39426000000 39427973541 13142000000 13142657847 257098112 257755959
+39429000000 39430973864 13143000000 13143657954 258098112 258756066
+39432000000 39433974117 13144000000 13144658039 259098112 259756151
+39435000000 39436974227 13145000000 13145658075 260098112 260756187
+39438000000 39439974406 13146000000 13146658135 261098112 261756247
+39441000000 39442974454 13147000000 13147658151 262098112 262756263
+39444000000 39445974708 13148000000 13148658236 263098112 263756348
+39447000000 39448974827 13149000000 13149658275 264098112 264756387
+39450000000 39451974998 13150000000 13150658332 265098112 265756444
+39453000000 39454975145 13151000000 13151658381 266098112 266756493
+39456000000 39457975298 13152000000 13152658432 267098112 267756544
+39459000000 39460975444 13153000000 13153658481 268098112 268756593
+39462000000 39463975588 13154000000 13154658529 269098112 269756641
+39465000000 39466975751 13155000000 13155658583 270098112 270756695
+39468000000 39469975903 13156000000 13156658634 271098112 271756746
+39471000000 39472976057 13157000000 13157658685 272098112 272756797
+39474000000 39475976177 13158000000 13158658725 273098112 273756837
+39477000000 39478976386 13159000000 13159658795 274098112 274756907
+39480000000 39481976516 13160000000 13160658838 275098112 275756950
+39483000000 39484976630 13161000000 13161658876 276098112 276756988
+39486000000 39487976791 13162000000 13162658930 277098112 277757042
+39489000000 39490976926 13163000000 13163658975 278098112 278757087
+39492000000 39493977069 13164000000 13164659023 279098112 279757135
+39495000000 39496977169 13165000000 13165659056 280098112 280757168
+39498000000 39499977403 13166000000 13166659134 281098112 281757246
+39501000000 39502977476 13167000000 13167659158 282098112 282757270
+39504000000 39505977597 13168000000 13168659199 283098112 283757311
+39507000000 39508977786 13169000000 13169659262 284098112 284757374
+39510000000 39511977940 13170000000 13170659313 285098112 285757425
+39513000000 39514978119 13171000000 13171659373 286098112 286757485
+39516000000 39517978265 13172000000 13172659421 287098112 287757533
+39519000000 39520978392 13173000000 13173659464 288098112 288757576
+39522000000 39523978566 13174000000 13174659522 289098112 289757634
+39525000000 39526978630 13175000000 13175659543 290098112 290757655
+39528000000 39529978837 13176000000 13176659612 291098112 291757724
+39531000000 39532979018 13177000000 13177659672 292098112 292757784
+39534000000 39535979167 13178000000 13178659722 293098112 293757834
+39537000000 39538979224 13179000000 13179659741 294098112 294757853
+39540000000 39541979420 13180000000 13180659806 295098112 295757918
+39543000000 39544979610 13181000000 13181659870 296098112 296757982
+39546000000 39547979755 13182000000 13182659918 297098112 297758030
+39549000000 39550979927 13183000000 13183659975 298098112 298758087
+39552000000 39553980060 13184000000 13184660020 299098112 299758132
+39555000000 39556980131 13185000000 13185660043 300098112 300758155
+39558000000 39559980357 13186000000 13186660119 301098112 301758231
+39561000000 39562980517 13187000000 13187660172 302098112 302758284
+39564000000 39565980649 13188000000 13188660216 303098112 303758328
+39567000000 39568980757 13189000000 13189660252 304098112 304758364
+39570000000 39571980968 13190000000 13190660322 305098112 305758434
+39573000000 39574981134 13191000000 13191660378 306098112 306758490
+39576000000 39577981245 13192000000 13192660415 307098112 307758527
+39579000000 39580981405 13193000000 13193660468 308098112 308758580
+39582000000 39583981517 13194000000 13194660505 309098112 309758617
+39585000000 39586981715 13195000000 13195660571 310098112 310758683
+39588000000 39589981805 13196000000 13196660601 311098112 311758713
+39591000000 39592982030 13197000000 13197660676 312098112 312758788
+39594000000 39595982162 13198000000 13198660720 313098112 313758832
+39597000000 39598982301 13199000000 13199660767 314098112 314758879
+39600000000 39601982352 13200000000 13200660784 315098112 315758896
+39603000000 39604982563 13201000000 13201660854 316098112 316758966
+39606000000 39607982772 13202000000 13202660924 317098112 317759036
+39609000000 39610982900 13203000000 13203660966 318098112 318759078
+39612000000 39613983043 13204000000 13204661014 319098112 319759126
+39615000000 39616983214 13205000000 13205661071 320098112 320759183
+39618000000 39619983311 13206000000 13206661103 321098112 321759215
+39621000000 39622983524 13207000000 13207661174 322098112 322759286
+39624000000 39625983654 13208000000 13208661218 323098112 323759330
+39627000000 39628983804 13209000000 13209661268 324098112 324759380
+39630000000 39631983964 13210000000 13210661321 325098112 325759433
+39633000000 39634984060 13211000000 13211661353 326098112 326759465
+39636000000 39637984248 13212000000 13212661416 327098112 327759528
+39639000000 39640984416 13213000000 13213661472 328098112 328759584
+39642000000 39643984552 13214000000 13214661517 329098112 329759629
+39645000000 39646984727 13215000000 13215661575 330098112 330759687
+39648000000 39649984849 13216000000 13216661616 331098112 331759728
+39651000000 39652984999 13217000000 13217661666 332098112 332759778
+39654000000 39655985147 13218000000 13218661715 333098112 333759827
+39657000000 39658985353 13219000000 13219661784 334098112 334759896
+39660000000 39661985467 13220000000 13220661822 335098112 335759934
+39663000000 39664985599 13221000000 13221661866 336098112 336759978
+39666000000 39667985773 13222000000 13222661924 337098112 337760036
+39669000000 39670985892 13223000000 13223661964 338098112 338760076
+39672000000 39673986016 13224000000 13224662005 339098112 339760117
+39675000000 39676986235 13225000000 13225662078 340098112 340760190
+39678000000 39679986371 13226000000 13226662123 341098112 341760235
+39681000000 39682986522 13227000000 13227662174 342098112 342760286
+39684000000 39685986682 13228000000 13228662227 343098112 343760339
+39687000000 39688986803 13229000000 13229662267 344098112 344760379
+39690000000 39691986884 13230000000 13230662294 345098112 345760406
+39693000000 39694987092 13231000000 13231662364 346098112 346760476
+39696000000 39697987247 13232000000 13232662415 347098112 347760527
+39699000000 39700987406 13233000000 13233662468 348098112 348760580
+39702000000 39703987558 13234000000 13234662519 349098112 349760631
+39705000000 39706987680 13235000000 13235662560 350098112 350760672
+39708000000 39709987858 13236000000 13236662619 351098112 351760731
+39711000000 39712988007 13237000000 13237662669 352098112 352760781
+39714000000 39715988135 13238000000 13238662711 353098112 353760823
+39717000000 39718988304 13239000000 13239662768 354098112 354760880
+39720000000 39721988424 13240000000 13240662808 355098112 355760920
+39723000000 39724988351 13241000000 13241662783 356098112 356760895
+39726000000 39727988674 13242000000 13242662891 357098112 357761003
+39729000000 39730988927 13243000000 13243662975 358098112 358761087
+39732000000 39733989037 13244000000 13244663012 359098112 359761124
+39735000000 39736989216 13245000000 13245663072 360098112 360761184
+39738000000 39739989264 13246000000 13246663088 361098112 361761200
+39741000000 39742989518 13247000000 13247663172 362098112 362761284
+39744000000 39745989637 13248000000 13248663212 363098112 363761324
+39747000000 39748989808 13249000000 13249663269 364098112 364761381
+39750000000 39751989955 13250000000 13250663318 365098112 365761430
+39753000000 39754990108 13251000000 13251663369 366098112 366761481
+39756000000 39757990254 13252000000 13252663418 367098112 367761530
+39759000000 39760990398 13253000000 13253663466 368098112 368761578
+39762000000 39763990561 13254000000 13254663520 369098112 369761632
+39765000000 39766990713 13255000000 13255663571 370098112 370761683
+39768000000 39769990867 13256000000 13256663622 371098112 371761734
+39771000000 39772990987 13257000000 13257663662 372098112 372761774
+39774000000 39775991196 13258000000 13258663732 373098112 373761844
+39777000000 39778991326 13259000000 13259663775 374098112 374761887
+39780000000 39781991440 13260000000 13260663813 375098112 375761925
+39783000000 39784991601 13261000000 13261663867 376098112 376761979
+39786000000 39787991736 13262000000 13262663912 377098112 377762024
+39789000000 39790991879 13263000000 13263663959 378098112 378762071
+39792000000 39793991979 13264000000 13264663993 379098112 379762105
+39795000000 39796992213 13265000000 13265664071 380098112 380762183
+39798000000 39799992286 13266000000 13266664095 381098112 381762207
+39801000000 39802992407 13267000000 13267664135 382098112 382762247
+39804000000 39805992596 13268000000 13268664198 383098112 383762310
+39807000000 39808992750 13269000000 13269664250 384098112 384762362
+39810000000 39811992929 13270000000 13270664309 385098112 385762421
+39813000000 39814993075 13271000000 13271664358 386098112 386762470
+39816000000 39817993202 13272000000 13272664400 387098112 387762512
+39819000000 39820993376 13273000000 13273664458 388098112 388762570
+39822000000 39823993440 13274000000 13274664480 389098112 389762592
+39825000000 39826993647 13275000000 13275664549 390098112 390762661
+39828000000 39829993828 13276000000 13276664609 391098112 391762721
+39831000000 39832993977 13277000000 13277664659 392098112 392762771
+39834000000 39835994034 13278000000 13278664678 393098112 393762790
+39837000000 39838994230 13279000000 13279664743 394098112 394762855
+39840000000 39841994420 13280000000 13280664806 395098112 395762918
+39843000000 39844994565 13281000000 13281664855 396098112 396762967
+39846000000 39847994737 13282000000 13282664912 397098112 397763024
+39849000000 39850994870 13283000000 13283664956 398098112 398763068
+39852000000 39853994941 13284000000 13284664980 399098112 399763092
+39855000000 39856995167 13285000000 13285665055 400098112 400763167
+39858000000 39859995327 13286000000 13286665109 401098112 401763221
+39861000000 39862995459 13287000000 13287665153 402098112 402763265
+39864000000 39865995567 13288000000 13288665189 403098112 403763301
+39867000000 39868995778 13289000000 13289665259 404098112 404763371
+39870000000 39871995944 13290000000 13290665314 405098112 405763426
+39873000000 39874996055 13291000000 13291665351 406098112 406763463
+39876000000 39877996215 13292000000 13292665405 407098112 407763517
+39879000000 39880996327 13293000000 13293665442 408098112 408763554
+39882000000 39883996525 13294000000 13294665508 409098112 409763620
+39885000000 39886996615 13295000000 13295665538 410098112 410763650
+39888000000 39889996840 13296000000 13296665613 411098112 411763725
+39891000000 39892996972 13297000000 13297665657 412098112 412763769
+39894000000 39895997111 13298000000 13298665703 413098112 413763815
+39897000000 39898997162 13299000000 13299665720 414098112 414763832
+39900000000 39901997373 13300000000 13300665791 415098112 415763903
+39903000000 39904997582 13301000000 13301665860 416098112 416763972
+39906000000 39907997710 13302000000 13302665903 417098112 417764015
+39909000000 39910997853 13303000000 13303665951 418098112 418764063
+39912000000 39913998024 13304000000 13304666008 419098112 419764120
+39915000000 39916998121 13305000000 13305666040 420098112 420764152
+39918000000 39919998334 13306000000 13306666111 421098112 421764223
+39921000000 39922998464 13307000000 13307666154 422098112 422764266
+39924000000 39925998614 13308000000 13308666204 423098112 423764316
+39927000000 39928998774 13309000000 13309666258 424098112 424764370
+39930000000 39931998870 13310000000 13310666290 425098112 425764402
+39933000000 39934999058 13311000000 13311666352 426098112 426764464
+39936000000 39937999226 13312000000 13312666408 427098112 427764520
+39939000000 39940999362 13313000000 13313666454 428098112 428764566
+39942000000 39943999537 13314000000 13314666512 429098112 429764624
+39945000000 39946999659 13315000000 13315666553 430098112 430764665
+39948000000 39949999809 13316000000 13316666603 431098112 431764715
+39951000000 39952999957 13317000000 13317666652 432098112 432764764
+39954000000 39956000163 13318000000 13318666721 433098112 433764833
+39957000000 39959000277 13319000000 13319666759 434098112 434764871
+39960000000 39962000409 13320000000 13320666803 435098112 435764915
+39963000000 39965000583 13321000000 13321666861 436098112 436764973
+39966000000 39968000702 13322000000 13322666900 437098112 437765012
+39969000000 39971000826 13323000000 13323666942 438098112 438765054
+39972000000 39974001045 13324000000 13324667015 439098112 439765127
+39975000000 39977001181 13325000000 13325667060 440098112 440765172
+39978000000 39980001332 13326000000 13326667110 441098112 441765222
+39981000000 39983001492 13327000000 13327667164 442098112 442765276
+39984000000 39986001613 13328000000 13328667204 443098112 443765316
+39987000000 39989001694 13329000000 13329667231 444098112 444765343
+39990000000 39992001902 13330000000 13330667300 445098112 445765412
+39993000000 39995002057 13331000000 13331667352 446098112 446765464
+39996000000 39998002216 13332000000 13332667405 447098112 447765517
+39999000000 40001002368 13333000000 13333667456 448098112 448765568
+40002000000 40004002490 13334000000 13334667496 449098112 449765608
+40005000000 40007002668 13335000000 13335667556 450098112 450765668
+40008000000 40010002817 13336000000 13336667605 451098112 451765717
+40011000000 40013002945 13337000000 13337667648 452098112 452765760
+40014000000 40016003114 13338000000 13338667704 453098112 453765816
+40017000000 40019003234 13339000000 13339667744 454098112 454765856
+40020000000 40022003161 13340000000 13340667720 455098112 455765832
+40023000000 40025003484 13341000000 13341667828 456098112 456765940
+40026000000 40028003737 13342000000 13342667912 457098112 457766024
+40029000000 40031003847 13343000000 13343667949 458098112 458766061
+40032000000 40034004026 13344000000 13344668008 459098112 459766120
+40035000000 40037004074 13345000000 13345668024 460098112 460766136
+40038000000 40040004328 13346000000 13346668109 461098112 461766221
+40041000000 40043004447 13347000000 13347668149 462098112 462766261
+40044000000 40046004618 13348000000 13348668206 463098112 463766318
+40047000000 40049004765 13349000000 13349668255 464098112 464766367
+40050000000 40052004918 13350000000 13350668306 465098112 465766418
+40053000000 40055005064 13351000000 13351668354 466098112 466766466
+40056000000 40058005208 13352000000 13352668402 467098112 467766514
+40059000000 40061005371 13353000000 13353668457 468098112 468766569
+40062000000 40064005523 13354000000 13354668507 469098112 469766619
+40065000000 40067005677 13355000000 13355668559 470098112 470766671
+40068000000 40070005797 13356000000 13356668599 471098112 471766711
+40071000000 40073006006 13357000000 13357668668 472098112 472766780
+40074000000 40076006136 13358000000 13358668712 473098112 473766824
+40077000000 40079006250 13359000000 13359668750 474098112 474766862
+40080000000 40082006411 13360000000 13360668803 475098112 475766915
+40083000000 40085006546 13361000000 13361668848 476098112 476766960
+40086000000 40088006689 13362000000 13362668896 477098112 477767008
+40089000000 40091006789 13363000000 13363668929 478098112 478767041
+40092000000 40094007023 13364000000 13364669007 479098112 479767119
+40095000000 40097007096 13365000000 13365669032 480098112 480767144
+40098000000 40100007217 13366000000 13366669072 481098112 481767184
+40101000000 40103007406 13367000000 13367669135 482098112 482767247
+40104000000 40106007560 13368000000 13368669186 483098112 483767298
+40107000000 40109007739 13369000000 13369669246 484098112 484767358
+40110000000 40112007885 13370000000 13370669295 485098112 485767407
+40113000000 40115008012 13371000000 13371669337 486098112 486767449
+40116000000 40118008186 13372000000 13372669395 487098112 487767507
+40119000000 40121008250 13373000000 13373669416 488098112 488767528
+40122000000 40124008457 13374000000 13374669485 489098112 489767597
+40125000000 40127008638 13375000000 13375669546 490098112 490767658
+40128000000 40130008787 13376000000 13376669595 491098112 491767707
+40131000000 40133008844 13377000000 13377669614 492098112 492767726
+40134000000 40136009040 13378000000 13378669680 493098112 493767792
+40137000000 40139009230 13379000000 13379669743 494098112 494767855
+40140000000 40142009375 13380000000 13380669791 495098112 495767903
+40143000000 40145009547 13381000000 13381669849 496098112 496767961
+40146000000 40148009680 13382000000 13382669893 497098112 497768005
+40149000000 40151009751 13383000000 13383669917 498098112 498768029
+40152000000 40154009977 13384000000 13384669992 499098112 499768104
+40155000000 40157010137 13385000000 13385670045 500098112 500768157
+40158000000 40160010269 13386000000 13386670089 501098112 501768201
+40161000000 40163010377 13387000000 13387670125 502098112 502768237
+40164000000 40166010588 13388000000 13388670196 503098112 503768308
+40167000000 40169010754 13389000000 13389670251 504098112 504768363
+40170000000 40172010865 13390000000 13390670288 505098112 505768400
+40173000000 40175011025 13391000000 13391670341 506098112 506768453
+40176000000 40178011137 13392000000 13392670379 507098112 507768491
+40179000000 40181011335 13393000000 13393670445 508098112 508768557
+40182000000 40184011425 13394000000 13394670475 509098112 509768587
+40185000000 40187011650 13395000000 13395670550 510098112 510768662
+40188000000 40190011782 13396000000 13396670594 511098112 511768706
+40191000000 40193011921 13397000000 13397670640 512098112 512768752
+40194000000 40196011972 13398000000 13398670657 513098112 513768769
+40197000000 40199012183 13399000000 13399670727 514098112 514768839
+40200000000 40202012392 13400000000 13400670797 515098112 515768909
+40203000000 40205012520 13401000000 13401670840 516098112 516768952
+40206000000 40208012663 13402000000 13402670887 517098112 517768999
+40209000000 40211012834 13403000000 13403670944 518098112 518769056
+40212000000 40214012931 13404000000 13404670977 519098112 519769089
+40215000000 40217013144 13405000000 13405671048 520098112 520769160
+40218000000 40220013274 13406000000 13406671091 521098112 521769203
+40221000000 40223013424 13407000000 13407671141 522098112 522769253
+40224000000 40226013584 13408000000 13408671194 523098112 523769306
+40227000000 40229013680 13409000000 13409671226 524098112 524769338
+40230000000 40232013868 13410000000 13410671289 525098112 525769401
+40233000000 40235014036 13411000000 13411671345 526098112 526769457
+40236000000 40238014172 13412000000 13412671390 527098112 527769502
+40239000000 40241014347 13413000000 13413671449 528098112 528769561
+40242000000 40244014469 13414000000 13414671489 529098112 529769601
+40245000000 40247014619 13415000000 13415671539 530098112 530769651
+40248000000 40250014767 13416000000 13416671589 531098112 531769701
+40251000000 40253014973 13417000000 13417671657 532098112 532769769
+40254000000 40256015087 13418000000 13418671695 533098112 533769807
+40257000000 40259015219 13419000000 13419671739 534098112 534769851
+40260000000 40262015393 13420000000 13420671797 535098112 535769909
+40263000000 40265015512 13421000000 13421671837 536098112 536769949
+40266000000 40268015636 13422000000 13422671878 537098112 537769990
+40269000000 40271015855 13423000000 13423671951 538098112 538770063
+40272000000 40274015991 13424000000 13424671997 539098112 539770109
+40275000000 40277016142 13425000000 13425672047 540098112 540770159
+40278000000 40280016302 13426000000 13426672100 541098112 541770212
+40281000000 40283016423 13427000000 13427672141 542098112 542770253
+40284000000 40286016504 13428000000 13428672168 543098112 543770280
+40287000000 40289016712 13429000000 13429672237 544098112 544770349
+40290000000 40292016867 13430000000 13430672289 545098112 545770401
+40293000000 40295017026 13431000000 13431672342 546098112 546770454
+40296000000 40298017178 13432000000 13432672392 547098112 547770504
+40299000000 40301017300 13433000000 13433672433 548098112 548770545
+40302000000 40304017478 13434000000 13434672492 549098112 549770604
+40305000000 40307017627 13435000000 13435672542 550098112 550770654
+40308000000 40310017755 13436000000 13436672585 551098112 551770697
+40311000000 40313017924 13437000000 13437672641 552098112 552770753
+40314000000 40316018044 13438000000 13438672681 553098112 553770793
+40317000000 40319017971 13439000000 13439672657 554098112 554770769
+40320000000 40322018294 13440000000 13440672764 555098112 555770876
+40323000000 40325018547 13441000000 13441672849 556098112 556770961
+40326000000 40328018657 13442000000 13442672885 557098112 557770997
+40329000000 40331018836 13443000000 13443672945 558098112 558771057
+40332000000 40334018884 13444000000 13444672961 559098112 559771073
+40335000000 40337019138 13445000000 13445673046 560098112 560771158
+40338000000 40340019257 13446000000 13446673085 561098112 561771197
+40341000000 40343019428 13447000000 13447673142 562098112 562771254
+40344000000 40346019575 13448000000 13448673191 563098112 563771303
+40347000000 40349019728 13449000000 13449673242 564098112 564771354
+40350000000 40352019874 13450000000 13450673291 565098112 565771403
+40353000000 40355020018 13451000000 13451673339 566098112 566771451
+40356000000 40358020181 13452000000 13452673393 567098112 567771505
+40359000000 40361020333 13453000000 13453673444 568098112 568771556
+40362000000 40364020487 13454000000 13454673495 569098112 569771607
+40365000000 40367020607 13455000000 13455673535 570098112 570771647
+40368000000 40370020816 13456000000 13456673605 571098112 571771717
+40371000000 40373020946 13457000000 13457673648 572098112 572771760
+40374000000 40376021060 13458000000 13458673686 573098112 573771798
+40377000000 40379021221 13459000000 13459673740 574098112 574771852
+40380000000 40382021356 13460000000 13460673785 575098112 575771897
+40383000000 40385021499 13461000000 13461673833 576098112 576771945
+40386000000 40388021599 13462000000 13462673866 577098112 577771978
+40389000000 40391021833 13463000000 13463673944 578098112 578772056
+40392000000 40394021906 13464000000 13464673968 579098112 579772080
+40395000000 40397022027 13465000000 13465674009 580098112 580772121
+40398000000 40400022216 13466000000 13466674072 581098112 581772184
+40401000000 40403022370 13467000000 13467674123 582098112 582772235
+40404000000 40406022549 13468000000 13468674183 583098112 583772295
+40407000000 40409022695 13469000000 13469674231 584098112 584772343
+40410000000 40412022822 13470000000 13470674274 585098112 585772386
+40413000000 40415022996 13471000000 13471674332 586098112 586772444
+40416000000 40418023060 13472000000 13472674353 587098112 587772465
+40419000000 40421023267 13473000000 13473674422 588098112 588772534
+40422000000 40424023448 13474000000 13474674482 589098112 589772594
+40425000000 40427023597 13475000000 13475674532 590098112 590772644
+40428000000 40430023654 13476000000 13476674551 591098112 591772663
+40431000000 40433023850 13477000000 13477674616 592098112 592772728
+40434000000 40436024040 13478000000 13478674680 593098112 593772792
+40437000000 40439024185 13479000000 13479674728 594098112 594772840
+40440000000 40442024357 13480000000 13480674785 595098112 595772897
+40443000000 40445024490 13481000000 13481674830 596098112 596772942
+40446000000 40448024561 13482000000 13482674853 597098112 597772965
+40449000000 40451024787 13483000000 13483674929 598098112 598773041
+40452000000 40454024947 13484000000 13484674982 599098112 599773094
+40455000000 40457025079 13485000000 13485675026 600098112 600773138
+40458000000 40460025187 13486000000 13486675062 601098112 601773174
+40461000000 40463025398 13487000000 13487675132 602098112 602773244
+40464000000 40466025564 13488000000 13488675188 603098112 603773300
+40467000000 40469025675 13489000000 13489675225 604098112 604773337
+40470000000 40472025835 13490000000 13490675278 605098112 605773390
+40473000000 40475025947 13491000000 13491675315 606098112 606773427
+40476000000 40478026145 13492000000 13492675381 607098112 607773493
+40479000000 40481026235 13493000000 13493675411 608098112 608773523
+40482000000 40484026460 13494000000 13494675486 609098112 609773598
+40485000000 40487026592 13495000000 13495675530 610098112 610773642
+40488000000 40490026731 13496000000 13496675577 611098112 611773689
+40491000000 40493026782 13497000000 13497675594 612098112 612773706
+40494000000 40496026993 13498000000 13498675664 613098112 613773776
+40497000000 40499027202 13499000000 13499675734 614098112 614773846
+40500000000 40502027330 13500000000 13500675776 615098112 615773888
+40503000000 40505027473 13501000000 13501675824 616098112 616773936
+40506000000 40508027644 13502000000 13502675881 617098112 617773993
+40509000000 40511027741 13503000000 13503675913 618098112 618774025
+40512000000 40514027954 13504000000 13504675984 619098112 619774096
+40515000000 40517028084 13505000000 13505676028 620098112 620774140
+40518000000 40520028234 13506000000 13506676078 621098112 621774190
+40521000000 40523028394 13507000000 13507676131 622098112 622774243
+40524000000 40526028490 13508000000 13508676163 623098112 623774275
+40527000000 40529028678 13509000000 13509676226 624098112 624774338
+40530000000 40532028846 13510000000 13510676282 625098112 625774394
+40533000000 40535028982 13511000000 13511676327 626098112 626774439
+40536000000 40538029157 13512000000 13512676385 627098112 627774497
+40539000000 40541029279 13513000000 13513676426 628098112 628774538
+40542000000 40544029429 13514000000 13514676476 629098112 629774588
+40545000000 40547029577 13515000000 13515676525 630098112 630774637
+40548000000 40550029783 13516000000 13516676594 631098112 631774706
+40551000000 40553029897 13517000000 13517676632 632098112 632774744
+40554000000 40556030029 13518000000 13518676676 633098112 633774788
+40557000000 40559030203 13519000000 13519676734 634098112 634774846
+40560000000 40562030322 13520000000 13520676774 635098112 635774886
+40563000000 40565030446 13521000000 13521676815 636098112 636774927
+40566000000 40568030665 13522000000 13522676888 637098112 637775000
+40569000000 40571030801 13523000000 13523676933 638098112 638775045
+40572000000 40574030952 13524000000 13524676984 639098112 639775096
+40575000000 40577031112 13525000000 13525677037 640098112 640775149
+40578000000 40580031233 13526000000 13526677077 641098112 641775189
+40581000000 40583031314 13527000000 13527677104 642098112 642775216
+40584000000 40586031522 13528000000 13528677174 643098112 643775286
+40587000000 40589031677 13529000000 13529677225 644098112 644775337
+40590000000 40592031836 13530000000 13530677278 645098112 645775390
+40593000000 40595031988 13531000000 13531677329 646098112 646775441
+40596000000 40598032110 13532000000 13532677370 647098112 647775482
+40599000000 40601032288 13533000000 13533677429 648098112 648775541
+40602000000 40604032437 13534000000 13534677479 649098112 649775591
+40605000000 40607032565 13535000000 13535677521 650098112 650775633
+40608000000 40610032734 13536000000 13536677578 651098112 651775690
+40611000000 40613032854 13537000000 13537677618 652098112 652775730
+40614000000 40616032781 13538000000 13538677593 653098112 653775705
+40617000000 40619033104 13539000000 13539677701 654098112 654775813
+40620000000 40622033357 13540000000 13540677785 655098112 655775897
+40623000000 40625033467 13541000000 13541677822 656098112 656775934
+40626000000 40628033646 13542000000 13542677882 657098112 657775994
+40629000000 40631033694 13543000000 13543677898 658098112 658776010
+40632000000 40634033948 13544000000 13544677982 659098112 659776094
+40635000000 40637034067 13545000000 13545678022 660098112 660776134
+40638000000 40640034238 13546000000 13546678079 661098112 661776191
+40641000000 40643034385 13547000000 13547678128 662098112 662776240
+40644000000 40646034538 13548000000 13548678179 663098112 663776291
+40647000000 40649034684 13549000000 13549678228 664098112 664776340
+40650000000 40652034828 13550000000 13550678276 665098112 665776388
+40653000000 40655034991 13551000000 13551678330 666098112 666776442
+40656000000 40658035143 13552000000 13552678381 667098112 667776493
+40659000000 40661035297 13553000000 13553678432 668098112 668776544
+40662000000 40664035417 13554000000 13554678472 669098112 669776584
+40665000000 40667035626 13555000000 13555678542 670098112 670776654
+40668000000 40670035756 13556000000 13556678585 671098112 671776697
+40671000000 40673035870 13557000000 13557678623 672098112 672776735
+40674000000 40676036031 13558000000 13558678677 673098112 673776789
+40677000000 40679036166 13559000000 13559678722 674098112 674776834
+40680000000 40682036309 13560000000 13560678769 675098112 675776881
+40683000000 40685036409 13561000000 13561678803 676098112 676776915
+40686000000 40688036643 13562000000 13562678881 677098112 677776993
+40689000000 40691036716 13563000000 13563678905 678098112 678777017
+40692000000 40694036837 13564000000 13564678945 679098112 679777057
+40695000000 40697037026 13565000000 13565679008 680098112 680777120
+40698000000 40700037180 13566000000 13566679060 681098112 681777172
+40701000000 40703037359 13567000000 13567679119 682098112 682777231
+40704000000 40706037505 13568000000 13568679168 683098112 683777280
+40707000000 40709037632 13569000000 13569679210 684098112 684777322
+40710000000 40712037806 13570000000 13570679268 685098112 685777380
+40713000000 40715037870 13571000000 13571679290 686098112 686777402
+40716000000 40718038077 13572000000 13572679359 687098112 687777471
+40719000000 40721038258 13573000000 13573679419 688098112 688777531
+40722000000 40724038407 13574000000 13574679469 689098112 689777581
+40725000000 40727038464 13575000000 13575679488 690098112 690777600
+40728000000 40730038660 13576000000 13576679553 691098112 691777665
+40731000000 40733038850 13577000000 13577679616 692098112 692777728
+40734000000 40736038995 13578000000 13578679665 693098112 693777777
+40737000000 40739039167 13579000000 13579679722 694098112 694777834
+40740000000 40742039300 13580000000 13580679766 695098112 695777878
+40743000000 40745039371 13581000000 13581679790 696098112 696777902
+40746000000 40748039597 13582000000 13582679865 697098112 697777977
+40749000000 40751039757 13583000000 13583679919 698098112 698778031
+40752000000 40754039889 13584000000 13584679963 699098112 699778075
+40755000000 40757039997 13585000000 13585679999 700098112 700778111
+40758000000 40760040208 13586000000 13586680069 701098112 701778181
+40761000000 40763040374 13587000000 13587680124 702098112 702778236
+40764000000 40766040485 13588000000 13588680161 703098112 703778273
+40767000000 40769040645 13589000000 13589680215 704098112 704778327
+40770000000 40772040757 13590000000 13590680252 705098112 705778364
+40773000000 40775040955 13591000000 13591680318 706098112 706778430
+40776000000 40778041045 13592000000 13592680348 707098112 707778460
+40779000000 40781041270 13593000000 13593680423 708098112 708778535
+40782000000 40784041402 13594000000 13594680467 709098112 709778579
+40785000000 40787041541 13595000000 13595680513 710098112 710778625
+40788000000 40790041592 13596000000 13596680530 711098112 711778642
+40791000000 40793041803 13597000000 13597680601 712098112 712778713
+40794000000 40796042012 13598000000 13598680670 713098112 713778782
+40797000000 40799042140 13599000000 13599680713 714098112 714778825
+40800000000 40802042283 13600000000 13600680761 715098112 715778873
+40803000000 40805042454 13601000000 13601680818 716098112 716778930
+40806000000 40808042551 13602000000 13602680850 717098112 717778962
+40809000000 40811042764 13603000000 13603680921 718098112 718779033
+40812000000 40814042894 13604000000 13604680964 719098112 719779076
+40815000000 40817043044 13605000000 13605681014 720098112 720779126
+40818000000 40820043204 13606000000 13606681068 721098112 721779180
+40821000000 40823043300 13607000000 13607681100 722098112 722779212
+40824000000 40826043488 13608000000 13608681162 723098112 723779274
+40827000000 40829043656 13609000000 13609681218 724098112 724779330
+40830000000 40832043792 13610000000 13610681264 725098112 725779376
+40833000000 40835043967 13611000000 13611681322 726098112 726779434
+40836000000 40838044089 13612000000 13612681363 727098112 727779475
+40839000000 40841044239 13613000000 13613681413 728098112 728779525
+40842000000 40844044387 13614000000 13614681462 729098112 729779574
+40845000000 40847044593 13615000000 13615681531 730098112 730779643
+40848000000 40850044707 13616000000 13616681569 731098112 731779681
+40851000000 40853044839 13617000000 13617681613 732098112 732779725
+40854000000 40856045013 13618000000 13618681671 733098112 733779783
+40857000000 40859045132 13619000000 13619681710 734098112 734779822
+40860000000 40862045256 13620000000 13620681752 735098112 735779864
+40863000000 40865045475 13621000000 13621681825 736098112 736779937
+40866000000 40868045611 13622000000 13622681870 737098112 737779982
+40869000000 40871045762 13623000000 13623681920 738098112 738780032
+40872000000 40874045922 13624000000 13624681974 739098112 739780086
+40875000000 40877046043 13625000000 13625682014 740098112 740780126
+40878000000 40880046124 13626000000 13626682041 741098112 741780153
+40881000000 40883046332 13627000000 13627682110 742098112 742780222
+40884000000 40886046487 13628000000 13628682162 743098112 743780274
+40887000000 40889046646 13629000000 13629682215 744098112 744780327
+40890000000 40892046798 13630000000 13630682266 745098112 745780378
+40893000000 40895046920 13631000000 13631682306 746098112 746780418
+40896000000 40898047098 13632000000 13632682366 747098112 747780478
+40899000000 40901047247 13633000000 13633682415 748098112 748780527
+40902000000 40904047375 13634000000 13634682458 749098112 749780570
+40905000000 40907047544 13635000000 13635682514 750098112 750780626
+40908000000 40910047664 13636000000 13636682554 751098112 751780666
+40911000000 40913047591 13637000000 13637682530 752098112 752780642
+40914000000 40916047914 13638000000 13638682638 753098112 753780750
+40917000000 40919048167 13639000000 13639682722 754098112 754780834
+40920000000 40922048277 13640000000 13640682759 755098112 755780871
+40923000000 40925048456 13641000000 13641682818 756098112 756780930
+40926000000 40928048504 13642000000 13642682834 757098112 757780946
+40929000000 40931048758 13643000000 13643682919 758098112 758781031
+40932000000 40934048877 13644000000 13644682959 759098112 759781071
+40935000000 40937049048 13645000000 13645683016 760098112 760781128
+40938000000 40940049195 13646000000 13646683065 761098112 761781177
+40941000000 40943049348 13647000000 13647683116 762098112 762781228
+40944000000 40946049494 13648000000 13648683164 763098112 763781276
+40947000000 40949049638 13649000000 13649683212 764098112 764781324
+40950000000 40952049801 13650000000 13650683267 765098112 765781379
+40953000000 40955049953 13651000000 13651683317 766098112 766781429
+40956000000 40958050107 13652000000 13652683369 767098112 767781481
+40959000000 40961050227 13653000000 13653683409 768098112 768781521
+40962000000 40964050436 13654000000 13654683478 769098112 769781590
+40965000000 40967050566 13655000000 13655683522 770098112 770781634
+40968000000 40970050680 13656000000 13656683560 771098112 771781672
+40971000000 40973050841 13657000000 13657683613 772098112 772781725
+40974000000 40976050976 13658000000 13658683658 773098112 773781770
+40977000000 40979051119 13659000000 13659683706 774098112 774781818
+40980000000 40982051219 13660000000 13660683739 775098112 775781851
+40983000000 40985051453 13661000000 13661683817 776098112 776781929
+40986000000 40988051526 13662000000 13662683842 777098112 777781954
+40989000000 40991051647 13663000000 13663683882 778098112 778781994
+40992000000 40994051836 13664000000 13664683945 779098112 779782057
+40995000000 40997051990 13665000000 13665683996 780098112 780782108
+40998000000 41000052169 13666000000 13666684056 781098112 781782168
+41001000000 41003052315 13667000000 13667684105 782098112 782782217
+41004000000 41006052442 13668000000 13668684147 783098112 783782259
+41007000000 41009052616 13669000000 13669684205 784098112 784782317
+41010000000 41012052680 13670000000 13670684226 785098112 785782338
+41013000000 41015052887 13671000000 13671684295 786098112 786782407
+41016000000 41018053068 13672000000 13672684356 787098112 787782468
+41019000000 41021053217 13673000000 13673684405 788098112 788782517
+41022000000 41024053274 13674000000 13674684424 789098112 789782536
+41025000000 41027053470 13675000000 13675684490 790098112 790782602
+41028000000 41030053660 13676000000 13676684553 791098112 791782665
+41031000000 41033053805 13677000000 13677684601 792098112 792782713
+41034000000 41036053977 13678000000 13678684659 793098112 793782771
+41037000000 41039054110 13679000000 13679684703 794098112 794782815
+41040000000 41042054181 13680000000 13680684727 795098112 795782839
+41043000000 41045054407 13681000000 13681684802 796098112 796782914
+41046000000 41048054567 13682000000 13682684855 797098112 797782967
+41049000000 41051054699 13683000000 13683684899 798098112 798783011
+41052000000 41054054807 13684000000 13684684935 799098112 799783047
+41055000000 41057055018 13685000000 13685685006 800098112 800783118
+41058000000 41060055184 13686000000 13686685061 801098112 801783173
+41061000000 41063055295 13687000000 13687685098 802098112 802783210
+41064000000 41066055455 13688000000 13688685151 803098112 803783263
+41067000000 41069055567 13689000000 13689685189 804098112 804783301
+41070000000 41072055765 13690000000 13690685255 805098112 805783367
+41073000000 41075055855 13691000000 13691685285 806098112 806783397
+41076000000 41078056080 13692000000 13692685360 807098112 807783472
+41079000000 41081056212 13693000000 13693685404 808098112 808783516
+41082000000 41084056351 13694000000 13694685450 809098112 809783562
+41085000000 41087056402 13695000000 13695685467 810098112 810783579
+41088000000 41090056613 13696000000 13696685537 811098112 811783649
+41091000000 41093056822 13697000000 13697685607 812098112 812783719
+41094000000 41096056950 13698000000 13698685650 813098112 813783762
+41097000000 41099057093 13699000000 13699685697 814098112 814783809
+41100000000 41102057264 13700000000 13700685754 815098112 815783866
+41103000000 41105057361 13701000000 13701685787 816098112 816783899
+41106000000 41108057574 13702000000 13702685858 817098112 817783970
+41109000000 41111057704 13703000000 13703685901 818098112 818784013
+41112000000 41114057854 13704000000 13704685951 819098112 819784063
+41115000000 41117058014 13705000000 13705686004 820098112 820784116
+41118000000 41120058110 13706000000 13706686036 821098112 821784148
+41121000000 41123058298 13707000000 13707686099 822098112 822784211
+41124000000 41126058466 13708000000 13708686155 823098112 823784267
+41127000000 41129058602 13709000000 13709686200 824098112 824784312
+41130000000 41132058777 13710000000 13710686259 825098112 825784371
+41133000000 41135058899 13711000000 13711686299 826098112 826784411
+41136000000 41138059049 13712000000 13712686349 827098112 827784461
+41139000000 41141059197 13713000000 13713686399 828098112 828784511
+41142000000 41144059403 13714000000 13714686467 829098112 829784579
+41145000000 41147059517 13715000000 13715686505 830098112 830784617
+41148000000 41150059649 13716000000 13716686549 831098112 831784661
+41151000000 41153059823 13717000000 13717686607 832098112 832784719
+41154000000 41156059942 13718000000 13718686647 833098112 833784759
+41157000000 41159060066 13719000000 13719686688 834098112 834784800
+41160000000 41162060285 13720000000 13720686761 835098112 835784873
+41163000000 41165060421 13721000000 13721686807 836098112 836784919
+41166000000 41168060572 13722000000 13722686857 837098112 837784969
+41169000000 41171060732 13723000000 13723686910 838098112 838785022
+41172000000 41174060853 13724000000 13724686951 839098112 839785063
+41175000000 41177060934 13725000000 13725686978 840098112 840785090
+41178000000 41180061142 13726000000 13726687047 841098112 841785159
+41181000000 41183061297 13727000000 13727687099 842098112 842785211
+41184000000 41186061456 13728000000 13728687152 843098112 843785264
+41187000000 41189061608 13729000000 13729687202 844098112 844785314
+41190000000 41192061730 13730000000 13730687243 845098112 845785355
+41193000000 41195061908 13731000000 13731687302 846098112 846785414
+41196000000 41198062057 13732000000 13732687352 847098112 847785464
+41199000000 41201062185 13733000000 13733687395 848098112 848785507
+41202000000 41204062354 13734000000 13734687451 849098112 849785563
+41205000000 41207062474 13735000000 13735687491 850098112 850785603
+41208000000 41210062401 13736000000 13736687467 851098112 851785579
+41211000000 41213062724 13737000000 13737687574 852098112 852785686
+41214000000 41216062977 13738000000 13738687659 853098112 853785771
+41217000000 41219063087 13739000000 13739687695 854098112 854785807
+41220000000 41222063266 13740000000 13740687755 855098112 855785867
+41223000000 41225063314 13741000000 13741687771 856098112 856785883
+41226000000 41228063568 13742000000 13742687856 857098112 857785968
+41229000000 41231063687 13743000000 13743687895 858098112 858786007
+41232000000 41234063858 13744000000 13744687952 859098112 859786064
+41235000000 41237064005 13745000000 13745688001 860098112 860786113
+41238000000 41240064158 13746000000 13746688052 861098112 861786164
+41241000000 41243064304 13747000000 13747688101 862098112 862786213
+41244000000 41246064448 13748000000 13748688149 863098112 863786261
+41247000000 41249064611 13749000000 13749688203 864098112 864786315
+41250000000 41252064763 13750000000 13750688254 865098112 865786366
+41253000000 41255064917 13751000000 13751688305 866098112 866786417
+41256000000 41258065037 13752000000 13752688345 867098112 867786457
+41259000000 41261065246 13753000000 13753688415 868098112 868786527
+41262000000 41264065376 13754000000 13754688458 869098112 869786570
+41265000000 41267065490 13755000000 13755688496 870098112 870786608
+41268000000 41270065651 13756000000 13756688550 871098112 871786662
+41271000000 41273065786 13757000000 13757688595 872098112 872786707
+41274000000 41276065929 13758000000 13758688643 873098112 873786755
+41277000000 41279066029 13759000000 13759688676 874098112 874786788
+41280000000 41282066263 13760000000 13760688754 875098112 875786866
+41283000000 41285066336 13761000000 13761688778 876098112 876786890
+41286000000 41288066457 13762000000 13762688819 877098112 877786931
+41289000000 41291066646 13763000000 13763688882 878098112 878786994
+41292000000 41294066800 13764000000 13764688933 879098112 879787045
+41295000000 41297066979 13765000000 13765688993 880098112 880787105
+41298000000 41300067125 13766000000 13766689041 881098112 881787153
+41301000000 41303067252 13767000000 13767689084 882098112 882787196
+41304000000 41306067426 13768000000 13768689142 883098112 883787254
+41307000000 41309067490 13769000000 13769689163 884098112 884787275
+41310000000 41312067697 13770000000 13770689232 885098112 885787344
+41313000000 41315067878 13771000000 13771689292 886098112 886787404
+41316000000 41318068027 13772000000 13772689342 887098112 887787454
+41319000000 41321068084 13773000000 13773689361 888098112 888787473
+41322000000 41324068280 13774000000 13774689426 889098112 889787538
+41325000000 41327068470 13775000000 13775689490 890098112 890787602
+41328000000 41330068615 13776000000 13776689538 891098112 891787650
+41331000000 41333068787 13777000000 13777689595 892098112 892787707
+41334000000 41336068920 13778000000 13778689640 893098112 893787752
+41337000000 41339068991 13779000000 13779689663 894098112 894787775
+41340000000 41342069217 13780000000 13780689739 895098112 895787851
+41343000000 41345069377 13781000000 13781689792 896098112 896787904
+41346000000 41348069509 13782000000 13782689836 897098112 897787948
+41349000000 41351069617 13783000000 13783689872 898098112 898787984
+41352000000 41354069828 13784000000 13784689942 899098112 899788054
+41355000000 41357069994 13785000000 13785689998 900098112 900788110
+41358000000 41360070105 13786000000 13786690035 901098112 901788147
+41361000000 41363070265 13787000000 13787690088 902098112 902788200
+41364000000 41366070377 13788000000 13788690125 903098112 903788237
+41367000000 41369070575 13789000000 13789690191 904098112 904788303
+41370000000 41372070665 13790000000 13790690221 905098112 905788333
+41373000000 41375070890 13791000000 13791690296 906098112 906788408
+41376000000 41378071022 13792000000 13792690340 907098112 907788452
+41379000000 41381071161 13793000000 13793690387 908098112 908788499
+41382000000 41384071212 13794000000 13794690404 909098112 909788516
+41385000000 41387071423 13795000000 13795690474 910098112 910788586
+41388000000 41390071632 13796000000 13796690544 911098112 911788656
+41391000000 41393071760 13797000000 13797690586 912098112 912788698
+41394000000 41396071903 13798000000 13798690634 913098112 913788746
+41397000000 41399072074 13799000000 13799690691 914098112 914788803
+41400000000 41402072171 13800000000 13800690723 915098112 915788835
+41403000000 41405072384 13801000000 13801690794 916098112 916788906
+41406000000 41408072514 13802000000 13802690838 917098112 917788950
+41409000000 41411072664 13803000000 13803690888 918098112 918789000
+41412000000 41414072824 13804000000 13804690941 919098112 919789053
+41415000000 41417072920 13805000000 13805690973 920098112 920789085
+41418000000 41420073108 13806000000 13806691036 921098112 921789148
+41421000000 41423073276 13807000000 13807691092 922098112 922789204
+41424000000 41426073412 13808000000 13808691137 923098112 923789249
+41427000000 41429073587 13809000000 13809691195 924098112 924789307
+41430000000 41432073709 13810000000 13810691236 925098112 925789348
+41433000000 41435073859 13811000000 13811691286 926098112 926789398
+41436000000 41438074007 13812000000 13812691335 927098112 927789447
+41439000000 41441074213 13813000000 13813691404 928098112 928789516
+41442000000 41444074327 13814000000 13814691442 929098112 929789554
+41445000000 41447074459 13815000000 13815691486 930098112 930789598
+41448000000 41450074633 13816000000 13816691544 931098112 931789656
+41451000000 41453074752 13817000000 13817691584 932098112 932789696
+41454000000 41456074876 13818000000 13818691625 933098112 933789737
+41457000000 41459075095 13819000000 13819691698 934098112 934789810
+41460000000 41462075231 13820000000 13820691743 935098112 935789855
+41463000000 41465075382 13821000000 13821691794 936098112 936789906
+41466000000 41468075542 13822000000 13822691847 937098112 937789959
+41469000000 41471075663 13823000000 13823691887 938098112 938789999
+41472000000 41474075744 13824000000 13824691914 939098112 939790026
+41475000000 41477075952 13825000000 13825691984 940098112 940790096
+41478000000 41480076107 13826000000 13826692035 941098112 941790147
+41481000000 41483076266 13827000000 13827692088 942098112 942790200
+41484000000 41486076418 13828000000 13828692139 943098112 943790251
+41487000000 41489076540 13829000000 13829692180 944098112 944790292
+41490000000 41492076718 13830000000 13830692239 945098112 945790351
+41493000000 41495076867 13831000000 13831692289 946098112 946790401
+41496000000 41498076995 13832000000 13832692331 947098112 947790443
+41499000000 41501077164 13833000000 13833692388 948098112 948790500
+41502000000 41504077284 13834000000 13834692428 949098112 949790540
+41505000000 41507077211 13835000000 13835692403 950098112 950790515
+41508000000 41510077534 13836000000 13836692511 951098112 951790623
+41511000000 41513077787 13837000000 13837692595 952098112 952790707
+41514000000 41516077897 13838000000 13838692632 953098112 953790744
+41517000000 41519078076 13839000000 13839692692 954098112 954790804
+41520000000 41522078124 13840000000 13840692708 955098112 955790820
+41523000000 41525078378 13841000000 13841692792 956098112 956790904
+41526000000 41528078497 13842000000 13842692832 957098112 957790944
+41529000000 41531078668 13843000000 13843692889 958098112 958791001
+41532000000 41534078815 13844000000 13844692938 959098112 959791050
+41535000000 41537078968 13845000000 13845692989 960098112 960791101
+41538000000 41540079114 13846000000 13846693038 961098112 961791150
+41541000000 41543079258 13847000000 13847693086 962098112 962791198
+41544000000 41546079421 13848000000 13848693140 963098112 963791252
+41547000000 41549079573 13849000000 13849693191 964098112 964791303
+41550000000 41552079727 13850000000 13850693242 965098112 965791354
+41553000000 41555079847 13851000000 13851693282 966098112 966791394
+41556000000 41558080056 13852000000 13852693352 967098112 967791464
+41559000000 41561080186 13853000000 13853693395 968098112 968791507
+41562000000 41564080300 13854000000 13854693433 969098112 969791545
+41565000000 41567080461 13855000000 13855693487 970098112 970791599
+41568000000 41570080596 13856000000 13856693532 971098112 971791644
+41571000000 41573080739 13857000000 13857693579 972098112 972791691
+41574000000 41576080839 13858000000 13858693613 973098112 973791725
+41577000000 41579081073 13859000000 13859693691 974098112 974791803
+41580000000 41582081146 13860000000 13860693715 975098112 975791827
+41583000000 41585081267 13861000000 13861693755 976098112 976791867
+41586000000 41588081456 13862000000 13862693818 977098112 977791930
+41589000000 41591081610 13863000000 13863693870 978098112 978791982
+41592000000 41594081789 13864000000 13864693929 979098112 979792041
+41595000000 41597081935 13865000000 13865693978 980098112 980792090
+41598000000 41600082062 13866000000 13866694020 981098112 981792132
+41601000000 41603082236 13867000000 13867694078 982098112 982792190
+41604000000 41606082300 13868000000 13868694100 983098112 983792212
+41607000000 41609082507 13869000000 13869694169 984098112 984792281
+41610000000 41612082688 13870000000 13870694229 985098112 985792341
+41613000000 41615082837 13871000000 13871694279 986098112 986792391
+41616000000 41618082894 13872000000 13872694298 987098112 987792410
+41619000000 41621083090 13873000000 13873694363 988098112 988792475
+41622000000 41624083280 13874000000 13874694426 989098112 989792538
+41625000000 41627083425 13875000000 13875694475 990098112 990792587
+41628000000 41630083597 13876000000 13876694532 991098112 991792644
+41631000000 41633083730 13877000000 13877694576 992098112 992792688
+41634000000 41636083801 13878000000 13878694600 993098112 993792712
+41637000000 41639084027 13879000000 13879694675 994098112 994792787
+41640000000 41642084187 13880000000 13880694729 995098112 995792841
+41643000000 41645084319 13881000000 13881694773 996098112 996792885
+41646000000 41648084427 13882000000 13882694809 997098112 997792921
+41649000000 41651084638 13883000000 13883694879 998098112 998792991
+41652000000 41654084804 13884000000 13884694934 999098112 999793046
+41655000000 41657084915 13885000000 13885694971 1000098112 1000793083
+41658000000 41660085075 13886000000 13886695025 1001098112 1001793137
+41661000000 41663085187 13887000000 13887695062 1002098112 1002793174
+41664000000 41666085385 13888000000 13888695128 1003098112 1003793240
+41667000000 41669085475 13889000000 13889695158 1004098112 1004793270
+41670000000 41672085700 13890000000 13890695233 1005098112 1005793345
+41673000000 41675085832 13891000000 13891695277 1006098112 1006793389
+41676000000 41678085971 13892000000 13892695323 1007098112 1007793435
+41679000000 41681086022 13893000000 13893695340 1008098112 1008793452
+41682000000 41684086233 13894000000 13894695411 1009098112 1009793523
+41685000000 41687086442 13895000000 13895695480 1010098112 1010793592
+41688000000 41690086570 13896000000 13896695523 1011098112 1011793635
+41691000000 41693086713 13897000000 13897695571 1012098112 1012793683
+41694000000 41696086884 13898000000 13898695628 1013098112 1013793740
+41697000000 41699086981 13899000000 13899695660 1014098112 1014793772
+41700000000 41702087194 13900000000 13900695731 1015098112 1015793843
+41703000000 41705087324 13901000000 13901695774 1016098112 1016793886
+41706000000 41708087474 13902000000 13902695824 1017098112 1017793936
+41709000000 41711087634 13903000000 13903695878 1018098112 1018793990
+41712000000 41714087730 13904000000 13904695910 1019098112 1019794022
+41715000000 41717087918 13905000000 13905695972 1020098112 1020794084
+41718000000 41720088086 13906000000 13906696028 1021098112 1021794140
+41721000000 41723088222 13907000000 13907696074 1022098112 1022794186
+41724000000 41726088397 13908000000 13908696132 1023098112 1023794244
+41727000000 41729088519 13909000000 13909696173 1024098112 1024794285
+41730000000 41732088669 13910000000 13910696223 1025098112 1025794335
+41733000000 41735088817 13911000000 13911696272 1026098112 1026794384
+41736000000 41738089023 13912000000 13912696341 1027098112 1027794453
+41739000000 41741089137 13913000000 13913696379 1028098112 1028794491
+41742000000 41744089269 13914000000 13914696423 1029098112 1029794535
+41745000000 41747089443 13915000000 13915696481 1030098112 1030794593
+41748000000 41750089562 13916000000 13916696520 1031098112 1031794632
+41751000000 41753089686 13917000000 13917696562 1032098112 1032794674
+41754000000 41756089905 13918000000 13918696635 1033098112 1033794747
+41757000000 41759090041 13919000000 13919696680 1034098112 1034794792
+41760000000 41762090192 13920000000 13920696730 1035098112 1035794842
+41763000000 41765090352 13921000000 13921696784 1036098112 1036794896
+41766000000 41768090473 13922000000 13922696824 1037098112 1037794936
+41769000000 41771090554 13923000000 13923696851 1038098112 1038794963
+41772000000 41774090762 13924000000 13924696920 1039098112 1039795032
+41775000000 41777090917 13925000000 13925696972 1040098112 1040795084
+41778000000 41780091076 13926000000 13926697025 1041098112 1041795137
+41781000000 41783091228 13927000000 13927697076 1042098112 1042795188
+41784000000 41786091350 13928000000 13928697116 1043098112 1043795228
+41787000000 41789091528 13929000000 13929697176 1044098112 1044795288
+41790000000 41792091677 13930000000 13930697225 1045098112 1045795337
+41793000000 41795091805 13931000000 13931697268 1046098112 1046795380
+41796000000 41798091974 13932000000 13932697324 1047098112 1047795436
+41799000000 41801092094 13933000000 13933697364 1048098112 1048795476
+41802000000 41804092021 13934000000 13934697340 1049098112 1049795452
+41805000000 41807092344 13935000000 13935697448 1050098112 1050795560
+41808000000 41810092597 13936000000 13936697532 1051098112 1051795644
+41811000000 41813092707 13937000000 13937697569 1052098112 1052795681
+41814000000 41816092886 13938000000 13938697628 1053098112 1053795740
+41817000000 41819092934 13939000000 13939697644 1054098112 1054795756
+41820000000 41822093188 13940000000 13940697729 1055098112 1055795841
+41823000000 41825093307 13941000000 13941697769 1056098112 1056795881
+41826000000 41828093478 13942000000 13942697826 1057098112 1057795938
+41829000000 41831093625 13943000000 13943697875 1058098112 1058795987
+41832000000 41834093778 13944000000 13944697926 1059098112 1059796038
+41835000000 41837093924 13945000000 13945697974 1060098112 1060796086
+41838000000 41840094068 13946000000 13946698022 1061098112 1061796134
+41841000000 41843094231 13947000000 13947698077 1062098112 1062796189
+41844000000 41846094383 13948000000 13948698127 1063098112 1063796239
+41847000000 41849094537 13949000000 13949698179 1064098112 1064796291
+41850000000 41852094657 13950000000 13950698219 1065098112 1065796331
+41853000000 41855094866 13951000000 13951698288 1066098112 1066796400
+41856000000 41858094996 13952000000 13952698332 1067098112 1067796444
+41859000000 41861095110 13953000000 13953698370 1068098112 1068796482
+41862000000 41864095271 13954000000 13954698423 1069098112 1069796535
+41865000000 41867095406 13955000000 13955698468 1070098112 1070796580
+41868000000 41870095549 13956000000 13956698516 1071098112 1071796628
+41871000000 41873095649 13957000000 13957698549 1072098112 1072796661
+41874000000 41876095883 13958000000 13958698627 1073098112 1073796739
+41877000000 41879095956 13959000000 13959698652 1074098112 1074796764
+41880000000 41882096077 13960000000 13960698692 1075098112 1075796804
+41883000000 41885096266 13961000000 13961698755 1076098112 1076796867
+41886000000 41888096420 13962000000 13962698806 1077098112 1077796918
+41889000000 41891096599 13963000000 13963698866 1078098112 1078796978
+41892000000 41894096745 13964000000 13964698915 1079098112 1079797027
+41895000000 41897096872 13965000000 13965698957 1080098112 1080797069
+41898000000 41900097046 13966000000 13966699015 1081098112 1081797127
+41901000000 41903097110 13967000000 13967699036 1082098112 1082797148
+41904000000 41906097317 13968000000 13968699105 1083098112 1083797217
+41907000000 41909097498 13969000000 13969699166 1084098112 1084797278
+41910000000 41912097647 13970000000 13970699215 1085098112 1085797327
+41913000000 41915097704 13971000000 13971699234 1086098112 1086797346
+41916000000 41918097900 13972000000 13972699300 1087098112 1087797412
+41919000000 41921098090 13973000000 13973699363 1088098112 1088797475
+41922000000 41924098235 13974000000 13974699411 1089098112 1089797523
+41925000000 41927098407 13975000000 13975699469 1090098112 1090797581
+41928000000 41930098540 13976000000 13976699513 1091098112 1091797625
+41931000000 41933098611 13977000000 13977699537 1092098112 1092797649
+41934000000 41936098837 13978000000 13978699612 1093098112 1093797724
+41937000000 41939098997 13979000000 13979699665 1094098112 1094797777
+41940000000 41942099129 13980000000 13980699709 1095098112 1095797821
+41943000000 41945099237 13981000000 13981699745 1096098112 1096797857
+41946000000 41948099448 13982000000 13982699816 1097098112 1097797928
+41949000000 41951099614 13983000000 13983699871 1098098112 1098797983
+41952000000 41954099725 13984000000 13984699908 1099098112 1099798020
+41955000000 41957099885 13985000000 13985699961 1100098112 1100798073
+41958000000 41960099997 13986000000 13986699999 1101098112 1101798111
+41961000000 41963100195 13987000000 13987700065 1102098112 1102798177
+41964000000 41966100285 13988000000 13988700095 1103098112 1103798207
+41967000000 41969100510 13989000000 13989700170 1104098112 1104798282
+41970000000 41972100642 13990000000 13990700214 1105098112 1105798326
+41973000000 41975100781 13991000000 13991700260 1106098112 1106798372
+41976000000 41978100832 13992000000 13992700277 1107098112 1107798389
+41979000000 41981101043 13993000000 13993700347 1108098112 1108798459
+41982000000 41984101252 13994000000 13994700417 1109098112 1109798529
+41985000000 41987101380 13995000000 13995700460 1110098112 1110798572
+41988000000 41990101523 13996000000 13996700507 1111098112 1111798619
+41991000000 41993101694 13997000000 13997700564 1112098112 1112798676
+41994000000 41996101791 13998000000 13998700597 1113098112 1113798709
+41997000000 41999102004 13999000000 13999700668 1114098112 1114798780
+42000000000 42002102134 14000000000 14000700711 1115098112 1115798823
+42003000000 42005102284 14001000000 14001700761 1116098112 1116798873
+42006000000 42008102444 14002000000 14002700814 1117098112 1117798926
+42009000000 42011102540 14003000000 14003700846 1118098112 1118798958
+42012000000 42014102728 14004000000 14004700909 1119098112 1119799021
+42015000000 42017102896 14005000000 14005700965 1120098112 1120799077
+42018000000 42020103032 14006000000 14006701010 1121098112 1121799122
+42021000000 42023103207 14007000000 14007701069 1122098112 1122799181
+42024000000 42026103329 14008000000 14008701109 1123098112 1123799221
+42027000000 42029103479 14009000000 14009701159 1124098112 1124799271
+42030000000 42032103627 14010000000 14010701209 1125098112 1125799321
+42033000000 42035103833 14011000000 14011701277 1126098112 1126799389
+42036000000 42038103947 14012000000 14012701315 1127098112 1127799427
+42039000000 42041104079 14013000000 14013701359 1128098112 1128799471
+42042000000 42044104253 14014000000 14014701417 1129098112 1129799529
+42045000000 42047104372 14015000000 14015701457 1130098112 1130799569
+42048000000 42050104496 14016000000 14016701498 1131098112 1131799610
+42051000000 42053104715 14017000000 14017701571 1132098112 1132799683
+42054000000 42056104851 14018000000 14018701617 1133098112 1133799729
+42057000000 42059105002 14019000000 14019701667 1134098112 1134799779
+42060000000 42062105162 14020000000 14020701720 1135098112 1135799832
+42063000000 42065105283 14021000000 14021701761 1136098112 1136799873
+42066000000 42068105364 14022000000 14022701788 1137098112 1137799900
+42069000000 42071105572 14023000000 14023701857 1138098112 1138799969
+42072000000 42074105727 14024000000 14024701909 1139098112 1139800021
+42075000000 42077105886 14025000000 14025701962 1140098112 1140800074
+42078000000 42080106038 14026000000 14026702012 1141098112 1141800124
+42081000000 42083106160 14027000000 14027702053 1142098112 1142800165
+42084000000 42086106338 14028000000 14028702112 1143098112 1143800224
+42087000000 42089106487 14029000000 14029702162 1144098112 1144800274
+42090000000 42092106615 14030000000 14030702205 1145098112 1145800317
+42093000000 42095106784 14031000000 14031702261 1146098112 1146800373
+42096000000 42098106904 14032000000 14032702301 1147098112 1147800413
+42099000000 42101106831 14033000000 14033702277 1148098112 1148800389
+42102000000 42104107154 14034000000 14034702384 1149098112 1149800496
+42105000000 42107107407 14035000000 14035702469 1150098112 1150800581
+42108000000 42110107517 14036000000 14036702505 1151098112 1151800617
+42111000000 42113107696 14037000000 14037702565 1152098112 1152800677
+42114000000 42116107744 14038000000 14038702581 1153098112 1153800693
+42117000000 42119107998 14039000000 14039702666 1154098112 1154800778
+42120000000 42122108117 14040000000 14040702705 1155098112 1155800817
+42123000000 42125108288 14041000000 14041702762 1156098112 1156800874
+42126000000 42128108435 14042000000 14042702811 1157098112 1157800923
+42129000000 42131108588 14043000000 14043702862 1158098112 1158800974
+42132000000 42134108734 14044000000 14044702911 1159098112 1159801023
+42135000000 42137108878 14045000000 14045702959 1160098112 1160801071
+42138000000 42140109041 14046000000 14046703013 1161098112 1161801125
+42141000000 42143109193 14047000000 14047703064 1162098112 1162801176
+42144000000 42146109347 14048000000 14048703115 1163098112 1163801227
+42147000000 42149109467 14049000000 14049703155 1164098112 1164801267
+42150000000 42152109676 14050000000 14050703225 1165098112 1165801337
+42153000000 42155109806 14051000000 14051703268 1166098112 1166801380
+42156000000 42158109920 14052000000 14052703306 1167098112 1167801418
+42159000000 42161110081 14053000000 14053703360 1168098112 1168801472
+42162000000 42164110216 14054000000 14054703405 1169098112 1169801517
+42165000000 42167110359 14055000000 14055703453 1170098112 1170801565
+42168000000 42170110459 14056000000 14056703486 1171098112 1171801598
+42171000000 42173110693 14057000000 14057703564 1172098112 1172801676
+42174000000 42176110766 14058000000 14058703588 1173098112 1173801700
+42177000000 42179110887 14059000000 14059703629 1174098112 1174801741
+42180000000 42182111076 14060000000 14060703692 1175098112 1175801804
+42183000000 42185111230 14061000000 14061703743 1176098112 1176801855
+42186000000 42188111409 14062000000 14062703803 1177098112 1177801915
+42189000000 42191111555 14063000000 14063703851 1178098112 1178801963
+42192000000 42194111682 14064000000 14064703894 1179098112 1179802006
+42195000000 42197111856 14065000000 14065703952 1180098112 1180802064
+42198000000 42200111920 14066000000 14066703973 1181098112 1181802085
+42201000000 42203112127 14067000000 14067704042 1182098112 1182802154
+42204000000 42206112308 14068000000 14068704102 1183098112 1183802214
+42207000000 42209112457 14069000000 14069704152 1184098112 1184802264
+42210000000 42212112514 14070000000 14070704171 1185098112 1185802283
+42213000000 42215112710 14071000000 14071704236 1186098112 1186802348
+42216000000 42218112900 14072000000 14072704300 1187098112 1187802412
+42219000000 42221113045 14073000000 14073704348 1188098112 1188802460
+42222000000 42224113217 14074000000 14074704405 1189098112 1189802517
+42225000000 42227113350 14075000000 14075704450 1190098112 1190802562
+42228000000 42230113421 14076000000 14076704473 1191098112 1191802585
+42231000000 42233113647 14077000000 14077704549 1192098112 1192802661
+42234000000 42236113807 14078000000 14078704602 1193098112 1193802714
+42237000000 42239113939 14079000000 14079704646 1194098112 1194802758
+42240000000 42242114047 14080000000 14080704682 1195098112 1195802794
+42243000000 42245114258 14081000000 14081704752 1196098112 1196802864
+42246000000 42248114424 14082000000 14082704808 1197098112 1197802920
+42249000000 42251114535 14083000000 14083704845 1198098112 1198802957
+42252000000 42254114695 14084000000 14084704898 1199098112 1199803010
+42255000000 42257114807 14085000000 14085704935 1200098112 1200803047
+42258000000 42260115005 14086000000 14086705001 1201098112 1201803113
+42261000000 42263115095 14087000000 14087705031 1202098112 1202803143
+42264000000 42266115320 14088000000 14088705106 1203098112 1203803218
+42267000000 42269115452 14089000000 14089705150 1204098112 1204803262
+42270000000 42272115591 14090000000 14090705197 1205098112 1205803309
+42273000000 42275115642 14091000000 14091705214 1206098112 1206803326
+42276000000 42278115853 14092000000 14092705284 1207098112 1207803396
+42279000000 42281116062 14093000000 14093705354 1208098112 1208803466
+42282000000 42284116190 14094000000 14094705396 1209098112 1209803508
+42285000000 42287116333 14095000000 14095705444 1210098112 1210803556
+42288000000 42290116504 14096000000 14096705501 1211098112 1211803613
+42291000000 42293116601 14097000000 14097705533 1212098112 1212803645
+42294000000 42296116814 14098000000 14098705604 1213098112 1213803716
+42297000000 42299116944 14099000000 14099705648 1214098112 1214803760
+42300000000 42302117094 14100000000 14100705698 1215098112 1215803810
+42303000000 42305117254 14101000000 14101705751 1216098112 1216803863
+42306000000 42308117350 14102000000 14102705783 1217098112 1217803895
+42309000000 42311117538 14103000000 14103705846 1218098112 1218803958
+42312000000 42314117706 14104000000 14104705902 1219098112 1219804014
+42315000000 42317117842 14105000000 14105705947 1220098112 1220804059
+42318000000 42320118017 14106000000 14106706005 1221098112 1221804117
+42321000000 42323118139 14107000000 14107706046 1222098112 1222804158
+42324000000 42326118289 14108000000 14108706096 1223098112 1223804208
+42327000000 42329118437 14109000000 14109706145 1224098112 1224804257
+42330000000 42332118643 14110000000 14110706214 1225098112 1225804326
+42333000000 42335118757 14111000000 14111706252 1226098112 1226804364
+42336000000 42338118889 14112000000 14112706296 1227098112 1227804408
+42339000000 42341119063 14113000000 14113706354 1228098112 1228804466
+42342000000 42344119182 14114000000 14114706394 1229098112 1229804506
+42345000000 42347119306 14115000000 14115706435 1230098112 1230804547
+42348000000 42350119525 14116000000 14116706508 1231098112 1231804620
+42351000000 42353119661 14117000000 14117706553 1232098112 1232804665
+42354000000 42356119812 14118000000 14118706604 1233098112 1233804716
+42357000000 42359119972 14119000000 14119706657 1234098112 1234804769
+42360000000 42362120093 14120000000 14120706697 1235098112 1235804809
+42363000000 42365120174 14121000000 14121706724 1236098112 1236804836
+42366000000 42368120382 14122000000 14122706794 1237098112 1237804906
+42369000000 42371120537 14123000000 14123706845 1238098112 1238804957
+42372000000 42374120696 14124000000 14124706898 1239098112 1239805010
+42375000000 42377120848 14125000000 14125706949 1240098112 1240805061
+42378000000 42380120970 14126000000 14126706990 1241098112 1241805102
+42381000000 42383121148 14127000000 14127707049 1242098112 1242805161
+42384000000 42386121297 14128000000 14128707099 1243098112 1243805211
+42387000000 42389121425 14129000000 14129707141 1244098112 1244805253
+42390000000 42392121594 14130000000 14130707198 1245098112 1245805310
+42393000000 42395121714 14131000000 14131707238 1246098112 1246805350
+42396000000 42398121641 14132000000 14132707213 1247098112 1247805325
+42399000000 42401121964 14133000000 14133707321 1248098112 1248805433
+42402000000 42404122217 14134000000 14134707405 1249098112 1249805517
+42405000000 42407122327 14135000000 14135707442 1250098112 1250805554
+42408000000 42410122506 14136000000 14136707502 1251098112 1251805614
+42411000000 42413122554 14137000000 14137707518 1252098112 1252805630
+42414000000 42416122808 14138000000 14138707602 1253098112 1253805714
+42417000000 42419122927 14139000000 14139707642 1254098112 1254805754
+42420000000 42422123098 14140000000 14140707699 1255098112 1255805811
+42423000000 42425123245 14141000000 14141707748 1256098112 1256805860
+42426000000 42428123398 14142000000 14142707799 1257098112 1257805911
+42429000000 42431123544 14143000000 14143707848 1258098112 1258805960
+42432000000 42434123688 14144000000 14144707896 1259098112 1259806008
+42435000000 42437123851 14145000000 14145707950 1260098112 1260806062
+42438000000 42440124003 14146000000 14146708001 1261098112 1261806113
+42441000000 42443124157 14147000000 14147708052 1262098112 1262806164
+42444000000 42446124277 14148000000 14148708092 1263098112 1263806204
+42447000000 42449124486 14149000000 14149708162 1264098112 1264806274
+42450000000 42452124616 14150000000 14150708205 1265098112 1265806317
+42453000000 42455124730 14151000000 14151708243 1266098112 1266806355
+42456000000 42458124891 14152000000 14152708297 1267098112 1267806409
+42459000000 42461125026 14153000000 14153708342 1268098112 1268806454
+42462000000 42464125169 14154000000 14154708389 1269098112 1269806501
+42465000000 42467125269 14155000000 14155708423 1270098112 1270806535
+42468000000 42470125503 14156000000 14156708501 1271098112 1271806613
+42471000000 42473125576 14157000000 14157708525 1272098112 1272806637
+42474000000 42476125697 14158000000 14158708565 1273098112 1273806677
+42477000000 42479125886 14159000000 14159708628 1274098112 1274806740
+42480000000 42482126040 14160000000 14160708680 1275098112 1275806792
+42483000000 42485126219 14161000000 14161708739 1276098112 1276806851
+42486000000 42488126365 14162000000 14162708788 1277098112 1277806900
+42489000000 42491126492 14163000000 14163708830 1278098112 1278806942
+42492000000 42494126666 14164000000 14164708888 1279098112 1279807000
+42495000000 42497126730 14165000000 14165708910 1280098112 1280807022
+42498000000 42500126937 14166000000 14166708979 1281098112 1281807091
+42501000000 42503127118 14167000000 14167709039 1282098112 1282807151
+42504000000 42506127267 14168000000 14168709089 1283098112 1283807201
+42507000000 42509127324 14169000000 14169709108 1284098112 1284807220
+42510000000 42512127520 14170000000 14170709173 1285098112 1285807285
+42513000000 42515127710 14171000000 14171709236 1286098112 1286807348
+42516000000 42518127855 14172000000 14172709285 1287098112 1287807397
+42519000000 42521128027 14173000000 14173709342 1288098112 1288807454
+42522000000 42524128160 14174000000 14174709386 1289098112 1289807498
+42525000000 42527128231 14175000000 14175709410 1290098112 1290807522
+42528000000 42530128457 14176000000 14176709485 1291098112 1291807597
+42531000000 42533128617 14177000000 14177709539 1292098112 1292807651
+42534000000 42536128749 14178000000 14178709583 1293098112 1293807695
+42537000000 42539128857 14179000000 14179709619 1294098112 1294807731
+42540000000 42542129068 14180000000 14180709689 1295098112 1295807801
+42543000000 42545129234 14181000000 14181709744 1296098112 1296807856
+42546000000 42548129345 14182000000 14182709781 1297098112 1297807893
+42549000000 42551129505 14183000000 14183709835 1298098112 1298807947
+42552000000 42554129617 14184000000 14184709872 1299098112 1299807984
+42555000000 42557129815 14185000000 14185709938 1300098112 1300808050
+42558000000 42560129905 14186000000 14186709968 1301098112 1301808080
+42561000000 42563130130 14187000000 14187710043 1302098112 1302808155
+42564000000 42566130262 14188000000 14188710087 1303098112 1303808199
+42567000000 42569130401 14189000000 14189710133 1304098112 1304808245
+42570000000 42572130452 14190000000 14190710150 1305098112 1305808262
+42573000000 42575130663 14191000000 14191710221 1306098112 1306808333
+42576000000 42578130872 14192000000 14192710290 1307098112 1307808402
+42579000000 42581131000 14193000000 14193710333 1308098112 1308808445
+42582000000 42584131143 14194000000 14194710381 1309098112 1309808493
+42585000000 42587131314 14195000000 14195710438 1310098112 1310808550
+42588000000 42590131411 14196000000 14196710470 1311098112 1311808582
+42591000000 42593131624 14197000000 14197710541 1312098112 1312808653
+42594000000 42596131754 14198000000 14198710584 1313098112 1313808696
+42597000000 42599131904 14199000000 14199710634 1314098112 1314808746
+42600000000 42602132064 14200000000 14200710688 1315098112 1315808800
+42603000000 42605132160 14201000000 14201710720 1316098112 1316808832
+42606000000 42608132348 14202000000 14202710782 1317098112 1317808894
+42609000000 42611132516 14203000000 14203710838 1318098112 1318808950
+42612000000 42614132652 14204000000 14204710884 1319098112 1319808996
+42615000000 42617132827 14205000000 14205710942 1320098112 1320809054
+42618000000 42620132949 14206000000 14206710983 1321098112 1321809095
+42621000000 42623133099 14207000000 14207711033 1322098112 1322809145
+42624000000 42626133247 14208000000 14208711082 1323098112 1323809194
+42627000000 42629133453 14209000000 14209711151 1324098112 1324809263
+42630000000 42632133567 14210000000 14210711189 1325098112 1325809301
+42633000000 42635133699 14211000000 14211711233 1326098112 1326809345
+42636000000 42638133873 14212000000 14212711291 1327098112 1327809403
+42639000000 42641133992 14213000000 14213711330 1328098112 1328809442
+42642000000 42644134116 14214000000 14214711372 1329098112 1329809484
+42645000000 42647134335 14215000000 14215711445 1330098112 1330809557
+42648000000 42650134471 14216000000 14216711490 1331098112 1331809602
+42651000000 42653134622 14217000000 14217711540 1332098112 1332809652
+42654000000 42656134782 14218000000 14218711594 1333098112 1333809706
+42657000000 42659134903 14219000000 14219711634 1334098112 1334809746
+42660000000 42662134984 14220000000 14220711661 1335098112 1335809773
+42663000000 42665135192 14221000000 14221711730 1336098112 1336809842
+42666000000 42668135347 14222000000 14222711782 1337098112 1337809894
+42669000000 42671135506 14223000000 14223711835 1338098112 1338809947
+42672000000 42674135658 14224000000 14224711886 1339098112 1339809998
+42675000000 42677135780 14225000000 14225711926 1340098112 1340810038
+42678000000 42680135958 14226000000 14226711986 1341098112 1341810098
+42681000000 42683136107 14227000000 14227712035 1342098112 1342810147
+42684000000 42686136235 14228000000 14228712078 1343098112 1343810190
+42687000000 42689136404 14229000000 14229712134 1344098112 1344810246
+42690000000 42692136524 14230000000 14230712174 1345098112 1345810286
+42693000000 42695136451 14231000000 14231712150 1346098112 1346810262
+42696000000 42698136774 14232000000 14232712258 1347098112 1347810370
+42699000000 42701137027 14233000000 14233712342 1348098112 1348810454
+42702000000 42704137137 14234000000 14234712379 1349098112 1349810491
+42705000000 42707137316 14235000000 14235712438 1350098112 1350810550
+42708000000 42710137364 14236000000 14236712454 1351098112 1351810566
+42711000000 42713137618 14237000000 14237712539 1352098112 1352810651
+42714000000 42716137737 14238000000 14238712579 1353098112 1353810691
+42717000000 42719137908 14239000000 14239712636 1354098112 1354810748
+42720000000 42722138055 14240000000 14240712685 1355098112 1355810797
+42723000000 42725138208 14241000000 14241712736 1356098112 1356810848
+42726000000 42728138354 14242000000 14242712784 1357098112 1357810896
+42729000000 42731138498 14243000000 14243712832 1358098112 1358810944
+42732000000 42734138661 14244000000 14244712887 1359098112 1359810999
+42735000000 42737138813 14245000000 14245712937 1360098112 1360811049
+42738000000 42740138967 14246000000 14246712989 1361098112 1361811101
+42741000000 42743139087 14247000000 14247713029 1362098112 1362811141
+42744000000 42746139296 14248000000 14248713098 1363098112 1363811210
+42747000000 42749139426 14249000000 14249713142 1364098112 1364811254
+42750000000 42752139540 14250000000 14250713180 1365098112 1365811292
+42753000000 42755139701 14251000000 14251713233 1366098112 1366811345
+42756000000 42758139836 14252000000 14252713278 1367098112 1367811390
+42759000000 42761139979 14253000000 14253713326 1368098112 1368811438
+42762000000 42764140079 14254000000 14254713359 1369098112 1369811471
+42765000000 42767140313 14255000000 14255713437 1370098112 1370811549
+42768000000 42770140386 14256000000 14256713462 1371098112 1371811574
+42771000000 42773140507 14257000000 14257713502 1372098112 1372811614
+42774000000 42776140696 14258000000 14258713565 1373098112 1373811677
+42777000000 42779140850 14259000000 14259713616 1374098112 1374811728
+42780000000 42782141029 14260000000 14260713676 1375098112 1375811788
+42783000000 42785141175 14261000000 14261713725 1376098112 1376811837
+42786000000 42788141302 14262000000 14262713767 1377098112 1377811879
+42789000000 42791141476 14263000000 14263713825 1378098112 1378811937
+42792000000 42794141540 14264000000 14264713846 1379098112 1379811958
+42795000000 42797141747 14265000000 14265713915 1380098112 1380812027
+42798000000 42800141928 14266000000 14266713976 1381098112 1381812088
+42801000000 42803142077 14267000000 14267714025 1382098112 1382812137
+42804000000 42806142134 14268000000 14268714044 1383098112 1383812156
+42807000000 42809142330 14269000000 14269714110 1384098112 1384812222
+42810000000 42812142520 14270000000 14270714173 1385098112 1385812285
+42813000000 42815142665 14271000000 14271714221 1386098112 1386812333
+42816000000 42818142837 14272000000 14272714279 1387098112 1387812391
+42819000000 42821142970 14273000000 14273714323 1388098112 1388812435
+42822000000 42824143041 14274000000 14274714347 1389098112 1389812459
+42825000000 42827143267 14275000000 14275714422 1390098112 1390812534
+42828000000 42830143427 14276000000 14276714475 1391098112 1391812587
+42831000000 42833143559 14277000000 14277714519 1392098112 1392812631
+42834000000 42836143667 14278000000 14278714555 1393098112 1393812667
+42837000000 42839143878 14279000000 14279714626 1394098112 1394812738
+42840000000 42842144044 14280000000 14280714681 1395098112 1395812793
+42843000000 42845144155 14281000000 14281714718 1396098112 1396812830
+42846000000 42848144315 14282000000 14282714771 1397098112 1397812883
+42849000000 42851144427 14283000000 14283714809 1398098112 1398812921
+42852000000 42854144625 14284000000 14284714875 1399098112 1399812987
+42855000000 42857144715 14285000000 14285714905 1400098112 1400813017
+42858000000 42860144940 14286000000 14286714980 1401098112 1401813092
+42861000000 42863145072 14287000000 14287715024 1402098112 1402813136
+42864000000 42866145211 14288000000 14288715070 1403098112 1403813182
+42867000000 42869145262 14289000000 14289715087 1404098112 1404813199
+42870000000 42872145473 14290000000 14290715157 1405098112 1405813269
+42873000000 42875145682 14291000000 14291715227 1406098112 1406813339
+42876000000 42878145810 14292000000 14292715270 1407098112 1407813382
+42879000000 42881145953 14293000000 14293715317 1408098112 1408813429
+42882000000 42884146124 14294000000 14294715374 1409098112 1409813486
+42885000000 42887146221 14295000000 14295715407 1410098112 1410813519
+42888000000 42890146434 14296000000 14296715478 1411098112 1411813590
+42891000000 42893146564 14297000000 14297715521 1412098112 1412813633
+42894000000 42896146714 14298000000 14298715571 1413098112 1413813683
+42897000000 42899146874 14299000000 14299715624 1414098112 1414813736
+42900000000 42902146970 14300000000 14300715656 1415098112 1415813768
+42903000000 42905147158 14301000000 14301715719 1416098112 1416813831
+42906000000 42908147326 14302000000 14302715775 1417098112 1417813887
+42909000000 42911147462 14303000000 14303715820 1418098112 1418813932
+42912000000 42914147637 14304000000 14304715879 1419098112 1419813991
+42915000000 42917147759 14305000000 14305715919 1420098112 1420814031
+42918000000 42920147909 14306000000 14306715969 1421098112 1421814081
+42921000000 42923148057 14307000000 14307716019 1422098112 1422814131
+42924000000 42926148263 14308000000 14308716087 1423098112 1423814199
+42927000000 42929148377 14309000000 14309716125 1424098112 1424814237
+42930000000 42932148509 14310000000 14310716169 1425098112 1425814281
+42933000000 42935148683 14311000000 14311716227 1426098112 1426814339
+42936000000 42938148802 14312000000 14312716267 1427098112 1427814379
+42939000000 42941148926 14313000000 14313716308 1428098112 1428814420
+42942000000 42944149145 14314000000 14314716381 1429098112 1429814493
+42945000000 42947149281 14315000000 14315716427 1430098112 1430814539
+42948000000 42950149432 14316000000 14316716477 1431098112 1431814589
+42951000000 42953149592 14317000000 14317716530 1432098112 1432814642
+42954000000 42956149713 14318000000 14318716571 1433098112 1433814683
+42957000000 42959149794 14319000000 14319716598 1434098112 1434814710
+42960000000 42962150002 14320000000 14320716667 1435098112 1435814779
+42963000000 42965150157 14321000000 14321716719 1436098112 1436814831
+42966000000 42968150316 14322000000 14322716772 1437098112 1437814884
+42969000000 42971150468 14323000000 14323716822 1438098112 1438814934
+42972000000 42974150590 14324000000 14324716863 1439098112 1439814975
+42975000000 42977150768 14325000000 14325716922 1440098112 1440815034
+42978000000 42980150917 14326000000 14326716972 1441098112 1441815084
+42981000000 42983151045 14327000000 14327717015 1442098112 1442815127
+42984000000 42986151214 14328000000 14328717071 1443098112 1443815183
+42987000000 42989151334 14329000000 14329717111 1444098112 1444815223
+42990000000 42992151261 14330000000 14330717087 1445098112 1445815199
+42993000000 42995151584 14331000000 14331717194 1446098112 1446815306
+42996000000 42998151837 14332000000 14332717279 1447098112 1447815391
+42999000000 43001151947 14333000000 14333717315 1448098112 1448815427
+43002000000 43004152126 14334000000 14334717375 1449098112 1449815487
+43005000000 43007152174 14335000000 14335717391 1450098112 1450815503
+43008000000 43010152428 14336000000 14336717476 1451098112 1451815588
+43011000000 43013152547 14337000000 14337717515 1452098112 1452815627
+43014000000 43016152718 14338000000 14338717572 1453098112 1453815684
+43017000000 43019152865 14339000000 14339717621 1454098112 1454815733
+43020000000 43022153018 14340000000 14340717672 1455098112 1455815784
+43023000000 43025153164 14341000000 14341717721 1456098112 1456815833
+43026000000 43028153308 14342000000 14342717769 1457098112 1457815881
+43029000000 43031153471 14343000000 14343717823 1458098112 1458815935
+43032000000 43034153623 14344000000 14344717874 1459098112 1459815986
+43035000000 43037153777 14345000000 14345717925 1460098112 1460816037
+43038000000 43040153897 14346000000 14346717965 1461098112 1461816077
+43041000000 43043154106 14347000000 14347718035 1462098112 1462816147
+43044000000 43046154236 14348000000 14348718078 1463098112 1463816190
+43047000000 43049154350 14349000000 14349718116 1464098112 1464816228
+43050000000 43052154511 14350000000 14350718170 1465098112 1465816282
+43053000000 43055154646 14351000000 14351718215 1466098112 1466816327
+43056000000 43058154789 14352000000 14352718263 1467098112 1467816375
+43059000000 43061154889 14353000000 14353718296 1468098112 1468816408
+43062000000 43064155123 14354000000 14354718374 1469098112 1469816486
+43065000000 43067155196 14355000000 14355718398 1470098112 1470816510
+43068000000 43070155317 14356000000 14356718439 1471098112 1471816551
+43071000000 43073155506 14357000000 14357718502 1472098112 1472816614
+43074000000 43076155660 14358000000 14358718553 1473098112 1473816665
+43077000000 43079155839 14359000000 14359718613 1474098112 1474816725
+43080000000 43082155985 14360000000 14360718661 1475098112 1475816773
+43083000000 43085156112 14361000000 14361718704 1476098112 1476816816
+43086000000 43088156286 14362000000 14362718762 1477098112 1477816874
+43089000000 43091156350 14363000000 14363718783 1478098112 1478816895
+43092000000 43094156557 14364000000 14364718852 1479098112 1479816964
+43095000000 43097156738 14365000000 14365718912 1480098112 1480817024
+43098000000 43100156887 14366000000 14366718962 1481098112 1481817074
+43101000000 43103156944 14367000000 14367718981 1482098112 1482817093
+43104000000 43106157140 14368000000 14368719046 1483098112 1483817158
+43107000000 43109157330 14369000000 14369719110 1484098112 1484817222
+43110000000 43112157475 14370000000 14370719158 1485098112 1485817270
+43113000000 43115157647 14371000000 14371719215 1486098112 1486817327
+43116000000 43118157780 14372000000 14372719260 1487098112 1487817372
+43119000000 43121157851 14373000000 14373719283 1488098112 1488817395
+43122000000 43124158077 14374000000 14374719359 1489098112 1489817471
+43125000000 43127158237 14375000000 14375719412 1490098112 1490817524
+43128000000 43130158369 14376000000 14376719456 1491098112 1491817568
+43131000000 43133158477 14377000000 14377719492 1492098112 1492817604
+43134000000 43136158688 14378000000 14378719562 1493098112 1493817674
+43137000000 43139158854 14379000000 14379719618 1494098112 1494817730
+43140000000 43142158965 14380000000 14380719655 1495098112 1495817767
+43143000000 43145159125 14381000000 14381719708 1496098112 1496817820
+43146000000 43148159237 14382000000 14382719745 1497098112 1497817857
+43149000000 43151159435 14383000000 14383719811 1498098112 1498817923
+43152000000 43154159525 14384000000 14384719841 1499098112 1499817953
+43155000000 43157159750 14385000000 14385719916 1500098112 1500818028
+43158000000 43160159882 14386000000 14386719960 1501098112 1501818072
+43161000000 43163160021 14387000000 14387720007 1502098112 1502818119
+43164000000 43166160072 14388000000 14388720024 1503098112 1503818136
+43167000000 43169160283 14389000000 14389720094 1504098112 1504818206
+43170000000 43172160492 14390000000 14390720164 1505098112 1505818276
+43173000000 43175160620 14391000000 14391720206 1506098112 1506818318
+43176000000 43178160763 14392000000 14392720254 1507098112 1507818366
+43179000000 43181160934 14393000000 14393720311 1508098112 1508818423
+43182000000 43184161031 14394000000 14394720343 1509098112 1509818455
+43185000000 43187161244 14395000000 14395720414 1510098112 1510818526
+43188000000 43190161374 14396000000 14396720458 1511098112 1511818570
+43191000000 43193161524 14397000000 14397720508 1512098112 1512818620
+43194000000 43196161684 14398000000 14398720561 1513098112 1513818673
+43197000000 43199161780 14399000000 14399720593 1514098112 1514818705
+43200000000 43202161968 14400000000 14400720656 1515098112 1515818768
+43203000000 43205162136 14401000000 14401720712 1516098112 1516818824
+43206000000 43208162272 14402000000 14402720757 1517098112 1517818869
+43209000000 43211162447 14403000000 14403720815 1518098112 1518818927
+43212000000 43214162569 14404000000 14404720856 1519098112 1519818968
+43215000000 43217162719 14405000000 14405720906 1520098112 1520819018
+43218000000 43220162867 14406000000 14406720955 1521098112 1521819067
+43221000000 43223163073 14407000000 14407721024 1522098112 1522819136
+43224000000 43226163187 14408000000 14408721062 1523098112 1523819174
+43227000000 43229163319 14409000000 14409721106 1524098112 1524819218
+43230000000 43232163493 14410000000 14410721164 1525098112 1525819276
+43233000000 43235163612 14411000000 14411721204 1526098112 1526819316
+43236000000 43238163736 14412000000 14412721245 1527098112 1527819357
+43239000000 43241163955 14413000000 14413721318 1528098112 1528819430
+43242000000 43244164091 14414000000 14414721363 1529098112 1529819475
+43245000000 43247164242 14415000000 14415721414 1530098112 1530819526
+43248000000 43250164402 14416000000 14416721467 1531098112 1531819579
+43251000000 43253164523 14417000000 14417721507 1532098112 1532819619
+43254000000 43256164604 14418000000 14418721534 1533098112 1533819646
+43257000000 43259164812 14419000000 14419721604 1534098112 1534819716
+43260000000 43262164967 14420000000 14420721655 1535098112 1535819767
+43263000000 43265165126 14421000000 14421721708 1536098112 1536819820
+43266000000 43268165278 14422000000 14422721759 1537098112 1537819871
+43269000000 43271165400 14423000000 14423721800 1538098112 1538819912
+43272000000 43274165578 14424000000 14424721859 1539098112 1539819971
+43275000000 43277165727 14425000000 14425721909 1540098112 1540820021
+43278000000 43280165855 14426000000 14426721951 1541098112 1541820063
+43281000000 43283166024 14427000000 14427722008 1542098112 1542820120
+43284000000 43286166144 14428000000 14428722048 1543098112 1543820160
+43287000000 43289166071 14429000000 14429722023 1544098112 1544820135
+43290000000 43292166394 14430000000 14430722131 1545098112 1545820243
+43293000000 43295166647 14431000000 14431722215 1546098112 1546820327
+43296000000 43298166757 14432000000 14432722252 1547098112 1547820364
+43299000000 43301166936 14433000000 14433722312 1548098112 1548820424
+43302000000 43304166984 14434000000 14434722328 1549098112 1549820440
+43305000000 43307167238 14435000000 14435722412 1550098112 1550820524
+43308000000 43310167357 14436000000 14436722452 1551098112 1551820564
+43311000000 43313167528 14437000000 14437722509 1552098112 1552820621
+43314000000 43316167675 14438000000 14438722558 1553098112 1553820670
+43317000000 43319167828 14439000000 14439722609 1554098112 1554820721
+43320000000 43322167974 14440000000 14440722658 1555098112 1555820770
+43323000000 43325168118 14441000000 14441722706 1556098112 1556820818
+43326000000 43328168281 14442000000 14442722760 1557098112 1557820872
+43329000000 43331168433 14443000000 14443722811 1558098112 1558820923
+43332000000 43334168587 14444000000 14444722862 1559098112 1559820974
+43335000000 43337168707 14445000000 14445722902 1560098112 1560821014
+43338000000 43340168916 14446000000 14446722972 1561098112 1561821084
+43341000000 43343169046 14447000000 14447723015 1562098112 1562821127
+43344000000 43346169160 14448000000 14448723053 1563098112 1563821165
+43347000000 43349169321 14449000000 14449723107 1564098112 1564821219
+43350000000 43352169456 14450000000 14450723152 1565098112 1565821264
+43353000000 43355169599 14451000000 14451723199 1566098112 1566821311
+43356000000 43358169699 14452000000 14452723233 1567098112 1567821345
+43359000000 43361169933 14453000000 14453723311 1568098112 1568821423
+43362000000 43364170006 14454000000 14454723335 1569098112 1569821447
+43365000000 43367170127 14455000000 14455723375 1570098112 1570821487
+43368000000 43370170316 14456000000 14456723438 1571098112 1571821550
+43371000000 43373170470 14457000000 14457723490 1572098112 1572821602
+43374000000 43376170649 14458000000 14458723549 1573098112 1573821661
+43377000000 43379170795 14459000000 14459723598 1574098112 1574821710
+43380000000 43382170922 14460000000 14460723640 1575098112 1575821752
+43383000000 43385171096 14461000000 14461723698 1576098112 1576821810
+43386000000 43388171160 14462000000 14462723720 1577098112 1577821832
+43389000000 43391171367 14463000000 14463723789 1578098112 1578821901
+43392000000 43394171548 14464000000 14464723849 1579098112 1579821961
+43395000000 43397171697 14465000000 14465723899 1580098112 1580822011
+43398000000 43400171754 14466000000 14466723918 1581098112 1581822030
+43401000000 43403171950 14467000000 14467723983 1582098112 1582822095
+43404000000 43406172140 14468000000 14468724046 1583098112 1583822158
+43407000000 43409172285 14469000000 14469724095 1584098112 1584822207
+43410000000 43412172457 14470000000 14470724152 1585098112 1585822264
+43413000000 43415172590 14471000000 14471724196 1586098112 1586822308
+43416000000 43418172661 14472000000 14472724220 1587098112 1587822332
+43419000000 43421172887 14473000000 14473724295 1588098112 1588822407
+43422000000 43424173047 14474000000 14474724349 1589098112 1589822461
+43425000000 43427173179 14475000000 14475724393 1590098112 1590822505
+43428000000 43430173287 14476000000 14476724429 1591098112 1591822541
+43431000000 43433173498 14477000000 14477724499 1592098112 1592822611
+43434000000 43436173664 14478000000 14478724554 1593098112 1593822666
+43437000000 43439173775 14479000000 14479724591 1594098112 1594822703
+43440000000 43442173935 14480000000 14480724645 1595098112 1595822757
+43443000000 43445174047 14481000000 14481724682 1596098112 1596822794
+43446000000 43448174245 14482000000 14482724748 1597098112 1597822860
+43449000000 43451174335 14483000000 14483724778 1598098112 1598822890
+43452000000 43454174560 14484000000 14484724853 1599098112 1599822965
+43455000000 43457174692 14485000000 14485724897 1600098112 1600823009
+43458000000 43460174831 14486000000 14486724943 1601098112 1601823055
+43461000000 43463174882 14487000000 14487724960 1602098112 1602823072
+43464000000 43466175093 14488000000 14488725031 1603098112 1603823143
+43467000000 43469175302 14489000000 14489725100 1604098112 1604823212
+43470000000 43472175430 14490000000 14490725143 1605098112 1605823255
+43473000000 43475175573 14491000000 14491725191 1606098112 1606823303
+43476000000 43478175744 14492000000 14492725248 1607098112 1607823360
+43479000000 43481175841 14493000000 14493725280 1608098112 1608823392
+43482000000 43484176054 14494000000 14494725351 1609098112 1609823463
+43485000000 43487176184 14495000000 14495725394 1610098112 1610823506
+43488000000 43490176334 14496000000 14496725444 1611098112 1611823556
+43491000000 43493176494 14497000000 14497725498 1612098112 1612823610
+43494000000 43496176590 14498000000 14498725530 1613098112 1613823642
+43497000000 43499176778 14499000000 14499725592 1614098112 1614823704
+43500000000 43502176946 14500000000 14500725648 1615098112 1615823760
+43503000000 43505177082 14501000000 14501725694 1616098112 1616823806
+43506000000 43508177257 14502000000 14502725752 1617098112 1617823864
+43509000000 43511177379 14503000000 14503725793 1618098112 1618823905
+43512000000 43514177529 14504000000 14504725843 1619098112 1619823955
+43515000000 43517177677 14505000000 14505725892 1620098112 1620824004
+43518000000 43520177883 14506000000 14506725961 1621098112 1621824073
+43521000000 43523177997 14507000000 14507725999 1622098112 1622824111
+43524000000 43526178129 14508000000 14508726043 1623098112 1623824155
+43527000000 43529178303 14509000000 14509726101 1624098112 1624824213
+43530000000 43532178422 14510000000 14510726140 1625098112 1625824252
+43533000000 43535178546 14511000000 14511726182 1626098112 1626824294
+43536000000 43538178765 14512000000 14512726255 1627098112 1627824367
+43539000000 43541178901 14513000000 14513726300 1628098112 1628824412
+43542000000 43544179052 14514000000 14514726350 1629098112 1629824462
+43545000000 43547179212 14515000000 14515726404 1630098112 1630824516
+43548000000 43550179333 14516000000 14516726444 1631098112 1631824556
+43551000000 43553179414 14517000000 14517726471 1632098112 1632824583
+43554000000 43556179622 14518000000 14518726540 1633098112 1633824652
+43557000000 43559179777 14519000000 14519726592 1634098112 1634824704
+43560000000 43562179936 14520000000 14520726645 1635098112 1635824757
+43563000000 43565180088 14521000000 14521726696 1636098112 1636824808
+43566000000 43568180210 14522000000 14522726736 1637098112 1637824848
+43569000000 43571180388 14523000000 14523726796 1638098112 1638824908
+43572000000 43574180537 14524000000 14524726845 1639098112 1639824957
+43575000000 43577180665 14525000000 14525726888 1640098112 1640825000
+43578000000 43580180834 14526000000 14526726944 1641098112 1641825056
+43581000000 43583180954 14527000000 14527726984 1642098112 1642825096
+43584000000 43586180881 14528000000 14528726960 1643098112 1643825072
+43587000000 43589181204 14529000000 14529727068 1644098112 1644825180
+43590000000 43592181457 14530000000 14530727152 1645098112 1645825264
+43593000000 43595181567 14531000000 14531727189 1646098112 1646825301
+43596000000 43598181746 14532000000 14532727248 1647098112 1647825360
+43599000000 43601181794 14533000000 14533727264 1648098112 1648825376
+43602000000 43604182048 14534000000 14534727349 1649098112 1649825461
+43605000000 43607182167 14535000000 14535727389 1650098112 1650825501
+43608000000 43610182338 14536000000 14536727446 1651098112 1651825558
+43611000000 43613182485 14537000000 14537727495 1652098112 1652825607
+43614000000 43616182638 14538000000 14538727546 1653098112 1653825658
+43617000000 43619182784 14539000000 14539727594 1654098112 1654825706
+43620000000 43622182928 14540000000 14540727642 1655098112 1655825754
+43623000000 43625183091 14541000000 14541727697 1656098112 1656825809
+43626000000 43628183243 14542000000 14542727747 1657098112 1657825859
+43629000000 43631183397 14543000000 14543727799 1658098112 1658825911
+43632000000 43634183517 14544000000 14544727839 1659098112 1659825951
+43635000000 43637183726 14545000000 14545727908 1660098112 1660826020
+43638000000 43640183856 14546000000 14546727952 1661098112 1661826064
+43641000000 43643183970 14547000000 14547727990 1662098112 1662826102
+43644000000 43646184131 14548000000 14548728043 1663098112 1663826155
+43647000000 43649184266 14549000000 14549728088 1664098112 1664826200
+43650000000 43652184409 14550000000 14550728136 1665098112 1665826248
+43653000000 43655184509 14551000000 14551728169 1666098112 1666826281
+43656000000 43658184743 14552000000 14552728247 1667098112 1667826359
+43659000000 43661184816 14553000000 14553728272 1668098112 1668826384
+43662000000 43664184937 14554000000 14554728312 1669098112 1669826424
+43665000000 43667185126 14555000000 14555728375 1670098112 1670826487
+43668000000 43670185280 14556000000 14556728426 1671098112 1671826538
+43671000000 43673185459 14557000000 14557728486 1672098112 1672826598
+43674000000 43676185605 14558000000 14558728535 1673098112 1673826647
+43677000000 43679185732 14559000000 14559728577 1674098112 1674826689
+43680000000 43682185906 14560000000 14560728635 1675098112 1675826747
+43683000000 43685185970 14561000000 14561728656 1676098112 1676826768
+43686000000 43688186177 14562000000 14562728725 1677098112 1677826837
+43689000000 43691186358 14563000000 14563728786 1678098112 1678826898
+43692000000 43694186507 14564000000 14564728835 1679098112 1679826947
+43695000000 43697186564 14565000000 14565728854 1680098112 1680826966
+43698000000 43700186760 14566000000 14566728920 1681098112 1681827032
+43701000000 43703186950 14567000000 14567728983 1682098112 1682827095
+43704000000 43706187095 14568000000 14568729031 1683098112 1683827143
+43707000000 43709187267 14569000000 14569729089 1684098112 1684827201
+43710000000 43712187400 14570000000 14570729133 1685098112 1685827245
+43713000000 43715187471 14571000000 14571729157 1686098112 1686827269
+43716000000 43718187697 14572000000 14572729232 1687098112 1687827344
+43719000000 43721187857 14573000000 14573729285 1688098112 1688827397
+43722000000 43724187989 14574000000 14574729329 1689098112 1689827441
+43725000000 43727188097 14575000000 14575729365 1690098112 1690827477
+43728000000 43730188308 14576000000 14576729436 1691098112 1691827548
+43731000000 43733188474 14577000000 14577729491 1692098112 1692827603
+43734000000 43736188585 14578000000 14578729528 1693098112 1693827640
+43737000000 43739188745 14579000000 14579729581 1694098112 1694827693
+43740000000 43742188857 14580000000 14580729619 1695098112 1695827731
+43743000000 43745189055 14581000000 14581729685 1696098112 1696827797
+43746000000 43748189145 14582000000 14582729715 1697098112 1697827827
+43749000000 43751189370 14583000000 14583729790 1698098112 1698827902
+43752000000 43754189502 14584000000 14584729834 1699098112 1699827946
+43755000000 43757189641 14585000000 14585729880 1700098112 1700827992
+43758000000 43760189692 14586000000 14586729897 1701098112 1701828009
+43761000000 43763189903 14587000000 14587729967 1702098112 1702828079
+43764000000 43766190112 14588000000 14588730037 1703098112 1703828149
+43767000000 43769190240 14589000000 14589730080 1704098112 1704828192
+43770000000 43772190383 14590000000 14590730127 1705098112 1705828239
+43773000000 43775190554 14591000000 14591730184 1706098112 1706828296
+43776000000 43778190651 14592000000 14592730217 1707098112 1707828329
+43779000000 43781190864 14593000000 14593730288 1708098112 1708828400
+43782000000 43784190994 14594000000 14594730331 1709098112 1709828443
+43785000000 43787191144 14595000000 14595730381 1710098112 1710828493
+43788000000 43790191304 14596000000 14596730434 1711098112 1711828546
+43791000000 43793191400 14597000000 14597730466 1712098112 1712828578
+43794000000 43796191588 14598000000 14598730529 1713098112 1713828641
+43797000000 43799191756 14599000000 14599730585 1714098112 1714828697
+43800000000 43802191892 14600000000 14600730630 1715098112 1715828742
+43803000000 43805192067 14601000000 14601730689 1716098112 1716828801
+43806000000 43808192189 14602000000 14602730729 1717098112 1717828841
+43809000000 43811192339 14603000000 14603730779 1718098112 1718828891
+43812000000 43814192487 14604000000 14604730829 1719098112 1719828941
+43815000000 43817192693 14605000000 14605730897 1720098112 1720829009
+43818000000 43820192807 14606000000 14606730935 1721098112 1721829047
+43821000000 43823192939 14607000000 14607730979 1722098112 1722829091
+43824000000 43826193113 14608000000 14608731037 1723098112 1723829149
+43827000000 43829193232 14609000000 14609731077 1724098112 1724829189
+43830000000 43832193356 14610000000 14610731118 1725098112 1725829230
+43833000000 43835193575 14611000000 14611731191 1726098112 1726829303
+43836000000 43838193711 14612000000 14612731237 1727098112 1727829349
+43839000000 43841193862 14613000000 14613731287 1728098112 1728829399
+43842000000 43844194022 14614000000 14614731340 1729098112 1729829452
+43845000000 43847194143 14615000000 14615731381 1730098112 1730829493
+43848000000 43850194224 14616000000 14616731408 1731098112 1731829520
+43851000000 43853194432 14617000000 14617731477 1732098112 1732829589
+43854000000 43856194587 14618000000 14618731529 1733098112 1733829641
+43857000000 43859194746 14619000000 14619731582 1734098112 1734829694
+43860000000 43862194898 14620000000 14620731632 1735098112 1735829744
+43863000000 43865195020 14621000000 14621731673 1736098112 1736829785
+43866000000 43868195198 14622000000 14622731732 1737098112 1737829844
+43869000000 43871195347 14623000000 14623731782 1738098112 1738829894
+43872000000 43874195475 14624000000 14624731825 1739098112 1739829937
+43875000000 43877195644 14625000000 14625731881 1740098112 1740829993
+43878000000 43880195764 14626000000 14626731921 1741098112 1741830033
+43881000000 43883195691 14627000000 14627731897 1742098112 1742830009
+43884000000 43886196014 14628000000 14628732004 1743098112 1743830116
+43887000000 43889196267 14629000000 14629732089 1744098112 1744830201
+43890000000 43892196377 14630000000 14630732125 1745098112 1745830237
+43893000000 43895196556 14631000000 14631732185 1746098112 1746830297
+43896000000 43898196604 14632000000 14632732201 1747098112 1747830313
+43899000000 43901196858 14633000000 14633732286 1748098112 1748830398
+43902000000 43904196977 14634000000 14634732325 1749098112 1749830437
+43905000000 43907197148 14635000000 14635732382 1750098112 1750830494
+43908000000 43910197295 14636000000 14636732431 1751098112 1751830543
+43911000000 43913197448 14637000000 14637732482 1752098112 1752830594
+43914000000 43916197594 14638000000 14638732531 1753098112 1753830643
+43917000000 43919197738 14639000000 14639732579 1754098112 1754830691
+43920000000 43922197901 14640000000 14640732633 1755098112 1755830745
+43923000000 43925198053 14641000000 14641732684 1756098112 1756830796
+43926000000 43928198207 14642000000 14642732735 1757098112 1757830847
+43929000000 43931198327 14643000000 14643732775 1758098112 1758830887
+43932000000 43934198536 14644000000 14644732845 1759098112 1759830957
+43935000000 43937198666 14645000000 14645732888 1760098112 1760831000
+43938000000 43940198780 14646000000 14646732926 1761098112 1761831038
+43941000000 43943198941 14647000000 14647732980 1762098112 1762831092
+43944000000 43946199076 14648000000 14648733025 1763098112 1763831137
+43947000000 43949199219 14649000000 14649733073 1764098112 1764831185
+43950000000 43952199319 14650000000 14650733106 1765098112 1765831218
+43953000000 43955199553 14651000000 14651733184 1766098112 1766831296
+43956000000 43958199626 14652000000 14652733208 1767098112 1767831320
+43959000000 43961199747 14653000000 14653733249 1768098112 1768831361
+43962000000 43964199936 14654000000 14654733312 1769098112 1769831424
+43965000000 43967200090 14655000000 14655733363 1770098112 1770831475
+43968000000 43970200269 14656000000 14656733423 1771098112 1771831535
+43971000000 43973200415 14657000000 14657733471 1772098112 1772831583
+43974000000 43976200542 14658000000 14658733514 1773098112 1773831626
+43977000000 43979200716 14659000000 14659733572 1774098112 1774831684
+43980000000 43982200780 14660000000 14660733593 1775098112 1775831705
+43983000000 43985200987 14661000000 14661733662 1776098112 1776831774
+43986000000 43988201168 14662000000 14662733722 1777098112 1777831834
+43989000000 43991201317 14663000000 14663733772 1778098112 1778831884
+43992000000 43994201374 14664000000 14664733791 1779098112 1779831903
+43995000000 43997201570 14665000000 14665733856 1780098112 1780831968
+43998000000 44000201760 14666000000 14666733920 1781098112 1781832032
+44001000000 44003201905 14667000000 14667733968 1782098112 1782832080
+44004000000 44006202077 14668000000 14668734025 1783098112 1783832137
+44007000000 44009202210 14669000000 14669734070 1784098112 1784832182
+44010000000 44012202281 14670000000 14670734093 1785098112 1785832205
+44013000000 44015202507 14671000000 14671734169 1786098112 1786832281
+44016000000 44018202667 14672000000 14672734222 1787098112 1787832334
+44019000000 44021202799 14673000000 14673734266 1788098112 1788832378
+44022000000 44024202907 14674000000 14674734302 1789098112 1789832414
+44025000000 44027203118 14675000000 14675734372 1790098112 1790832484
+44028000000 44030203284 14676000000 14676734428 1791098112 1791832540
+44031000000 44033203395 14677000000 14677734465 1792098112 1792832577
+44034000000 44036203555 14678000000 14678734518 1793098112 1793832630
+44037000000 44039203667 14679000000 14679734555 1794098112 1794832667
+44040000000 44042203865 14680000000 14680734621 1795098112 1795832733
+44043000000 44045203955 14681000000 14681734651 1796098112 1796832763
+44046000000 44048204180 14682000000 14682734726 1797098112 1797832838
+44049000000 44051204312 14683000000 14683734770 1798098112 1798832882
+44052000000 44054204451 14684000000 14684734817 1799098112 1799832929
+44055000000 44057204502 14685000000 14685734834 1800098112 1800832946
+44058000000 44060204713 14686000000 14686734904 1801098112 1801833016
+44061000000 44063204922 14687000000 14687734974 1802098112 1802833086
+44064000000 44066205050 14688000000 14688735016 1803098112 1803833128
+44067000000 44069205193 14689000000 14689735064 1804098112 1804833176
+44070000000 44072205364 14690000000 14690735121 1805098112 1805833233
+44073000000 44075205461 14691000000 14691735153 1806098112 1806833265
+44076000000 44078205674 14692000000 14692735224 1807098112 1807833336
+44079000000 44081205804 14693000000 14693735268 1808098112 1808833380
+44082000000 44084205954 14694000000 14694735318 1809098112 1809833430
+44085000000 44087206114 14695000000 14695735371 1810098112 1810833483
+44088000000 44090206210 14696000000 14696735403 1811098112 1811833515
+44091000000 44093206398 14697000000 14697735466 1812098112 1812833578
+44094000000 44096206566 14698000000 14698735522 1813098112 1813833634
+44097000000 44099206702 14699000000 14699735567 1814098112 1814833679
+44100000000 44102206877 14700000000 14700735625 1815098112 1815833737
+44103000000 44105206999 14701000000 14701735666 1816098112 1816833778
+44106000000 44108207149 14702000000 14702735716 1817098112 1817833828
+44109000000 44111207297 14703000000 14703735765 1818098112 1818833877
+44112000000 44114207503 14704000000 14704735834 1819098112 1819833946
+44115000000 44117207617 14705000000 14705735872 1820098112 1820833984
+44118000000 44120207749 14706000000 14706735916 1821098112 1821834028
+44121000000 44123207923 14707000000 14707735974 1822098112 1822834086
+44124000000 44126208042 14708000000 14708736014 1823098112 1823834126
+44127000000 44129208166 14709000000 14709736055 1824098112 1824834167
+44130000000 44132208385 14710000000 14710736128 1825098112 1825834240
+44133000000 44135208521 14711000000 14711736173 1826098112 1826834285
+44136000000 44138208672 14712000000 14712736224 1827098112 1827834336
+44139000000 44141208832 14713000000 14713736277 1828098112 1828834389
+44142000000 44144208953 14714000000 14714736317 1829098112 1829834429
+44145000000 44147209034 14715000000 14715736344 1830098112 1830834456
+44148000000 44150209242 14716000000 14716736414 1831098112 1831834526
+44151000000 44153209397 14717000000 14717736465 1832098112 1832834577
+44154000000 44156209556 14718000000 14718736518 1833098112 1833834630
+44157000000 44159209708 14719000000 14719736569 1834098112 1834834681
+44160000000 44162209830 14720000000 14720736610 1835098112 1835834722
+44163000000 44165210008 14721000000 14721736669 1836098112 1836834781
+44166000000 44168210157 14722000000 14722736719 1837098112 1837834831
+44169000000 44171210285 14723000000 14723736761 1838098112 1838834873
+44172000000 44174210454 14724000000 14724736818 1839098112 1839834930
+44175000000 44177210574 14725000000 14725736858 1840098112 1840834970
+44178000000 44180210501 14726000000 14726736833 1841098112 1841834945
+44181000000 44183210824 14727000000 14727736941 1842098112 1842835053
+44184000000 44186211077 14728000000 14728737025 1843098112 1843835137
+44187000000 44189211187 14729000000 14729737062 1844098112 1844835174
+44190000000 44192211366 14730000000 14730737122 1845098112 1845835234
+44193000000 44195211414 14731000000 14731737138 1846098112 1846835250
+44196000000 44198211668 14732000000 14732737222 1847098112 1847835334
+44199000000 44201211787 14733000000 14733737262 1848098112 1848835374
+44202000000 44204211958 14734000000 14734737319 1849098112 1849835431
+44205000000 44207212105 14735000000 14735737368 1850098112 1850835480
+44208000000 44210212258 14736000000 14736737419 1851098112 1851835531
+44211000000 44213212404 14737000000 14737737468 1852098112 1852835580
+44214000000 44216212548 14738000000 14738737516 1853098112 1853835628
+44217000000 44219212711 14739000000 14739737570 1854098112 1854835682
+44220000000 44222212863 14740000000 14740737621 1855098112 1855835733
+44223000000 44225213017 14741000000 14741737672 1856098112 1856835784
+44226000000 44228213137 14742000000 14742737712 1857098112 1857835824
+44229000000 44231213346 14743000000 14743737782 1858098112 1858835894
+44232000000 44234213476 14744000000 14744737825 1859098112 1859835937
+44235000000 44237213590 14745000000 14745737863 1860098112 1860835975
+44238000000 44240213751 14746000000 14746737917 1861098112 1861836029
+44241000000 44243213886 14747000000 14747737962 1862098112 1862836074
+44244000000 44246214029 14748000000 14748738009 1863098112 1863836121
+44247000000 44249214129 14749000000 14749738043 1864098112 1864836155
+44250000000 44252214363 14750000000 14750738121 1865098112 1865836233
+44253000000 44255214436 14751000000 14751738145 1866098112 1866836257
+44256000000 44258214557 14752000000 14752738185 1867098112 1867836297
+44259000000 44261214746 14753000000 14753738248 1868098112 1868836360
+44262000000 44264214900 14754000000 14754738300 1869098112 1869836412
+44265000000 44267215079 14755000000 14755738359 1870098112 1870836471
+44268000000 44270215225 14756000000 14756738408 1871098112 1871836520
+44271000000 44273215352 14757000000 14757738450 1872098112 1872836562
+44274000000 44276215526 14758000000 14758738508 1873098112 1873836620
+44277000000 44279215590 14759000000 14759738530 1874098112 1874836642
+44280000000 44282215797 14760000000 14760738599 1875098112 1875836711
+44283000000 44285215978 14761000000 14761738659 1876098112 1876836771
+44286000000 44288216127 14762000000 14762738709 1877098112 1877836821
+44289000000 44291216184 14763000000 14763738728 1878098112 1878836840
+44292000000 44294216380 14764000000 14764738793 1879098112 1879836905
+44295000000 44297216570 14765000000 14765738856 1880098112 1880836968
+44298000000 44300216715 14766000000 14766738905 1881098112 1881837017
+44301000000 44303216887 14767000000 14767738962 1882098112 1882837074
+44304000000 44306217020 14768000000 14768739006 1883098112 1883837118
+44307000000 44309217091 14769000000 14769739030 1884098112 1884837142
+44310000000 44312217317 14770000000 14770739105 1885098112 1885837217
+44313000000 44315217477 14771000000 14771739159 1886098112 1886837271
+44316000000 44318217609 14772000000 14772739203 1887098112 1887837315
+44319000000 44321217717 14773000000 14773739239 1888098112 1888837351
+44322000000 44324217928 14774000000 14774739309 1889098112 1889837421
+44325000000 44327218094 14775000000 14775739364 1890098112 1890837476
+44328000000 44330218205 14776000000 14776739401 1891098112 1891837513
+44331000000 44333218365 14777000000 14777739455 1892098112 1892837567
+44334000000 44336218477 14778000000 14778739492 1893098112 1893837604
+44337000000 44339218675 14779000000 14779739558 1894098112 1894837670
+44340000000 44342218765 14780000000 14780739588 1895098112 1895837700
+44343000000 44345218990 14781000000 14781739663 1896098112 1896837775
+44346000000 44348219122 14782000000 14782739707 1897098112 1897837819
+44349000000 44351219261 14783000000 14783739753 1898098112 1898837865
+44352000000 44354219312 14784000000 14784739770 1899098112 1899837882
+44355000000 44357219523 14785000000 14785739841 1900098112 1900837953
+44358000000 44360219732 14786000000 14786739910 1901098112 1901838022
+44361000000 44363219860 14787000000 14787739953 1902098112 1902838065
+44364000000 44366220003 14788000000 14788740001 1903098112 1903838113
+44367000000 44369220174 14789000000 14789740058 1904098112 1904838170
+44370000000 44372220271 14790000000 14790740090 1905098112 1905838202
+44373000000 44375220484 14791000000 14791740161 1906098112 1906838273
+44376000000 44378220614 14792000000 14792740204 1907098112 1907838316
+44379000000 44381220764 14793000000 14793740254 1908098112 1908838366
+44382000000 44384220924 14794000000 14794740308 1909098112 1909838420
+44385000000 44387221020 14795000000 14795740340 1910098112 1910838452
+44388000000 44390221208 14796000000 14796740402 1911098112 1911838514
+44391000000 44393221376 14797000000 14797740458 1912098112 1912838570
+44394000000 44396221512 14798000000 14798740504 1913098112 1913838616
+44397000000 44399221687 14799000000 14799740562 1914098112 1914838674
+44400000000 44402221809 14800000000 14800740603 1915098112 1915838715
+44403000000 44405221959 14801000000 14801740653 1916098112 1916838765
+44406000000 44408222107 14802000000 14802740702 1917098112 1917838814
+44409000000 44411222313 14803000000 14803740771 1918098112 1918838883
+44412000000 44414222427 14804000000 14804740809 1919098112 1919838921
+44415000000 44417222559 14805000000 14805740853 1920098112 1920838965
+44418000000 44420222733 14806000000 14806740911 1921098112 1921839023
+44421000000 44423222852 14807000000 14807740950 1922098112 1922839062
+44424000000 44426222976 14808000000 14808740992 1923098112 1923839104
+44427000000 44429223195 14809000000 14809741065 1924098112 1924839177
+44430000000 44432223331 14810000000 14810741110 1925098112 1925839222
+44433000000 44435223482 14811000000 14811741160 1926098112 1926839272
+44436000000 44438223642 14812000000 14812741214 1927098112 1927839326
+44439000000 44441223763 14813000000 14813741254 1928098112 1928839366
+44442000000 44444223844 14814000000 14814741281 1929098112 1929839393
+44445000000 44447224052 14815000000 14815741350 1930098112 1930839462
+44448000000 44450224207 14816000000 14816741402 1931098112 1931839514
+44451000000 44453224366 14817000000 14817741455 1932098112 1932839567
+44454000000 44456224518 14818000000 14818741506 1933098112 1933839618
+44457000000 44459224640 14819000000 14819741546 1934098112 1934839658
+44460000000 44462224818 14820000000 14820741606 1935098112 1935839718
+44463000000 44465224967 14821000000 14821741655 1936098112 1936839767
+44466000000 44468225095 14822000000 14822741698 1937098112 1937839810
+44469000000 44471225264 14823000000 14823741754 1938098112 1938839866
+44472000000 44474225384 14824000000 14824741794 1939098112 1939839906
+44475000000 44477225311 14825000000 14825741770 1940098112 1940839882
+44478000000 44480225634 14826000000 14826741878 1941098112 1941839990
+44481000000 44483225887 14827000000 14827741962 1942098112 1942840074
+44484000000 44486225997 14828000000 14828741999 1943098112 1943840111
+44487000000 44489226176 14829000000 14829742058 1944098112 1944840170
+44490000000 44492226224 14830000000 14830742074 1945098112 1945840186
+44493000000 44495226478 14831000000 14831742159 1946098112 1946840271
+44496000000 44498226597 14832000000 14832742199 1947098112 1947840311
+44499000000 44501226768 14833000000 14833742256 1948098112 1948840368
+44502000000 44504226915 14834000000 14834742305 1949098112 1949840417
+44505000000 44507227068 14835000000 14835742356 1950098112 1950840468
+44508000000 44510227214 14836000000 14836742404 1951098112 1951840516
+44511000000 44513227358 14837000000 14837742452 1952098112 1952840564
+44514000000 44516227521 14838000000 14838742507 1953098112 1953840619
+44517000000 44519227673 14839000000 14839742557 1954098112 1954840669
+44520000000 44522227827 14840000000 14840742609 1955098112 1955840721
+44523000000 44525227947 14841000000 14841742649 1956098112 1956840761
+44526000000 44528228156 14842000000 14842742718 1957098112 1957840830
+44529000000 44531228286 14843000000 14843742762 1958098112 1958840874
+44532000000 44534228400 14844000000 14844742800 1959098112 1959840912
+44535000000 44537228561 14845000000 14845742853 1960098112 1960840965
+44538000000 44540228696 14846000000 14846742898 1961098112 1961841010
+44541000000 44543228839 14847000000 14847742946 1962098112 1962841058
+44544000000 44546228939 14848000000 14848742979 1963098112 1963841091
+44547000000 44549229173 14849000000 14849743057 1964098112 1964841169
+44550000000 44552229246 14850000000 14850743082 1965098112 1965841194
+44553000000 44555229367 14851000000 14851743122 1966098112 1966841234
+44556000000 44558229556 14852000000 14852743185 1967098112 1967841297
+44559000000 44561229710 14853000000 14853743236 1968098112 1968841348
+44562000000 44564229889 14854000000 14854743296 1969098112 1969841408
+44565000000 44567230035 14855000000 14855743345 1970098112 1970841457
+44568000000 44570230162 14856000000 14856743387 1971098112 1971841499
+44571000000 44573230336 14857000000 14857743445 1972098112 1972841557
+44574000000 44576230400 14858000000 14858743466 1973098112 1973841578
+44577000000 44579230607 14859000000 14859743535 1974098112 1974841647
+44580000000 44582230788 14860000000 14860743596 1975098112 1975841708
+44583000000 44585230937 14861000000 14861743645 1976098112 1976841757
+44586000000 44588230994 14862000000 14862743664 1977098112 1977841776
+44589000000 44591231190 14863000000 14863743730 1978098112 1978841842
+44592000000 44594231380 14864000000 14864743793 1979098112 1979841905
+44595000000 44597231525 14865000000 14865743841 1980098112 1980841953
+44598000000 44600231697 14866000000 14866743899 1981098112 1981842011
+44601000000 44603231830 14867000000 14867743943 1982098112 1982842055
+44604000000 44606231901 14868000000 14868743967 1983098112 1983842079
+44607000000 44609232127 14869000000 14869744042 1984098112 1984842154
+44610000000 44612232287 14870000000 14870744095 1985098112 1985842207
+44613000000 44615232419 14871000000 14871744139 1986098112 1986842251
+44616000000 44618232527 14872000000 14872744175 1987098112 1987842287
+44619000000 44621232738 14873000000 14873744246 1988098112 1988842358
+44622000000 44624232904 14874000000 14874744301 1989098112 1989842413
+44625000000 44627233015 14875000000 14875744338 1990098112 1990842450
+44628000000 44630233175 14876000000 14876744391 1991098112 1991842503
+44631000000 44633233287 14877000000 14877744429 1992098112 1992842541
+44634000000 44636233485 14878000000 14878744495 1993098112 1993842607
+44637000000 44639233575 14879000000 14879744525 1994098112 1994842637
+44640000000 44642233800 14880000000 14880744600 1995098112 1995842712
+44643000000 44645233932 14881000000 14881744644 1996098112 1996842756
+44646000000 44648234071 14882000000 14882744690 1997098112 1997842802
+44649000000 44651234122 14883000000 14883744707 1998098112 1998842819
+44652000000 44654234333 14884000000 14884744777 1999098112 1999842889
+44655000000 44657234542 14885000000 14885744847 2000098112 2000842959
+44658000000 44660234670 14886000000 14886744890 2001098112 2001843002
+44661000000 44663234813 14887000000 14887744937 2002098112 2002843049
+44664000000 44666234984 14888000000 14888744994 2003098112 2003843106
+44667000000 44669235081 14889000000 14889745027 2004098112 2004843139
+44670000000 44672235294 14890000000 14890745098 2005098112 2005843210
+44673000000 44675235424 14891000000 14891745141 2006098112 2006843253
+44676000000 44678235574 14892000000 14892745191 2007098112 2007843303
+44679000000 44681235734 14893000000 14893745244 2008098112 2008843356
+44682000000 44684235830 14894000000 14894745276 2009098112 2009843388
+44685000000 44687236018 14895000000 14895745339 2010098112 2010843451
+44688000000 44690236186 14896000000 14896745395 2011098112 2011843507
+44691000000 44693236322 14897000000 14897745440 2012098112 2012843552
+44694000000 44696236497 14898000000 14898745499 2013098112 2013843611
+44697000000 44699236619 14899000000 14899745539 2014098112 2014843651
+44700000000 44702236769 14900000000 14900745589 2015098112 2015843701
+44703000000 44705236917 14901000000 14901745639 2016098112 2016843751
+44706000000 44708237123 14902000000 14902745707 2017098112 2017843819
+44709000000 44711237237 14903000000 14903745745 2018098112 2018843857
+44712000000 44714237369 14904000000 14904745789 2019098112 2019843901
+44715000000 44717237543 14905000000 14905745847 2020098112 2020843959
+44718000000 44720237662 14906000000 14906745887 2021098112 2021843999
+44721000000 44723237786 14907000000 14907745928 2022098112 2022844040
+44724000000 44726238005 14908000000 14908746001 2023098112 2023844113
+44727000000 44729238141 14909000000 14909746047 2024098112 2024844159
+44730000000 44732238292 14910000000 14910746097 2025098112 2025844209
+44733000000 44735238452 14911000000 14911746150 2026098112 2026844262
+44736000000 44738238573 14912000000 14912746191 2027098112 2027844303
+44739000000 44741238654 14913000000 14913746218 2028098112 2028844330
+44742000000 44744238862 14914000000 14914746287 2029098112 2029844399
+44745000000 44747239017 14915000000 14915746339 2030098112 2030844451
+44748000000 44750239176 14916000000 14916746392 2031098112 2031844504
+44751000000 44753239328 14917000000 14917746442 2032098112 2032844554
+44754000000 44756239450 14918000000 14918746483 2033098112 2033844595
+44757000000 44759239628 14919000000 14919746542 2034098112 2034844654
+44760000000 44762239777 14920000000 14920746592 2035098112 2035844704
+44763000000 44765239905 14921000000 14921746635 2036098112 2036844747
+44766000000 44768240074 14922000000 14922746691 2037098112 2037844803
+44769000000 44771240194 14923000000 14923746731 2038098112 2038844843
+44772000000 44774240121 14924000000 14924746707 2039098112 2039844819
+44775000000 44777240444 14925000000 14925746814 2040098112 2040844926
+44778000000 44780240697 14926000000 14926746899 2041098112 2041845011
+44781000000 44783240807 14927000000 14927746935 2042098112 2042845047
+44784000000 44786240986 14928000000 14928746995 2043098112 2043845107
+44787000000 44789241034 14929000000 14929747011 2044098112 2044845123
+44790000000 44792241288 14930000000 14930747096 2045098112 2045845208
+44793000000 44795241407 14931000000 14931747135 2046098112 2046845247
+44796000000 44798241578 14932000000 14932747192 2047098112 2047845304
+44799000000 44801241725 14933000000 14933747241 2048098112 2048845353
+44802000000 44804241878 14934000000 14934747292 2049098112 2049845404
+44805000000 44807242024 14935000000 14935747341 2050098112 2050845453
+44808000000 44810242168 14936000000 14936747389 2051098112 2051845501
+44811000000 44813242331 14937000000 14937747443 2052098112 2052845555
+44814000000 44816242483 14938000000 14938747494 2053098112 2053845606
+44817000000 44819242637 14939000000 14939747545 2054098112 2054845657
+44820000000 44822242757 14940000000 14940747585 2055098112 2055845697
+44823000000 44825242966 14941000000 14941747655 2056098112 2056845767
+44826000000 44828243096 14942000000 14942747698 2057098112 2057845810
+44829000000 44831243210 14943000000 14943747736 2058098112 2058845848
+44832000000 44834243371 14944000000 14944747790 2059098112 2059845902
+44835000000 44837243506 14945000000 14945747835 2060098112 2060845947
+44838000000 44840243649 14946000000 14946747883 2061098112 2061845995
+44841000000 44843243749 14947000000 14947747916 2062098112 2062846028
+44844000000 44846243983 14948000000 14948747994 2063098112 2063846106
+44847000000 44849244056 14949000000 14949748018 2064098112 2064846130
+44850000000 44852244177 14950000000 14950748059 2065098112 2065846171
+44853000000 44855244366 14951000000 14951748122 2066098112 2066846234
+44856000000 44858244520 14952000000 14952748173 2067098112 2067846285
+44859000000 44861244699 14953000000 14953748233 2068098112 2068846345
+44862000000 44864244845 14954000000 14954748281 2069098112 2069846393
+44865000000 44867244972 14955000000 14955748324 2070098112 2070846436
+44868000000 44870245146 14956000000 14956748382 2071098112 2071846494
+44871000000 44873245210 14957000000 14957748403 2072098112 2072846515
+44874000000 44876245417 14958000000 14958748472 2073098112 2073846584
+44877000000 44879245598 14959000000 14959748532 2074098112 2074846644
+44880000000 44882245747 14960000000 14960748582 2075098112 2075846694
+44883000000 44885245804 14961000000 14961748601 2076098112 2076846713
+44886000000 44888246000 14962000000 14962748666 2077098112 2077846778
+44889000000 44891246190 14963000000 14963748730 2078098112 2078846842
+44892000000 44894246335 14964000000 14964748778 2079098112 2079846890
+44895000000 44897246507 14965000000 14965748835 2080098112 2080846947
+44898000000 44900246640 14966000000 14966748880 2081098112 2081846992
+44901000000 44903246711 14967000000 14967748903 2082098112 2082847015
+44904000000 44906246937 14968000000 14968748979 2083098112 2083847091
+44907000000 44909247097 14969000000 14969749032 2084098112 2084847144
+44910000000 44912247229 14970000000 14970749076 2085098112 2085847188
+44913000000 44915247337 14971000000 14971749112 2086098112 2086847224
+44916000000 44918247548 14972000000 14972749182 2087098112 2087847294
+44919000000 44921247714 14973000000 14973749238 2088098112 2088847350
+44922000000 44924247825 14974000000 14974749275 2089098112 2089847387
+44925000000 44927247985 14975000000 14975749328 2090098112 2090847440
+44928000000 44930248097 14976000000 14976749365 2091098112 2091847477
+44931000000 44933248295 14977000000 14977749431 2092098112 2092847543
+44934000000 44936248385 14978000000 14978749461 2093098112 2093847573
+44937000000 44939248610 14979000000 14979749536 2094098112 2094847648
+44940000000 44942248742 14980000000 14980749580 2095098112 2095847692
+44943000000 44945248881 14981000000 14981749627 2096098112 2096847739
+44946000000 44948248932 14982000000 14982749644 2097098112 2097847756
+44949000000 44951249143 14983000000 14983749714 2098098112 2098847826
+44952000000 44954249352 14984000000 14984749784 2099098112 2099847896
+44955000000 44957249480 14985000000 14985749826 2100098112 2100847938
+44958000000 44960249623 14986000000 14986749874 2101098112 2101847986
+44961000000 44963249794 14987000000 14987749931 2102098112 2102848043
+44964000000 44966249891 14988000000 14988749963 2103098112 2103848075
+44967000000 44969250104 14989000000 14989750034 2104098112 2104848146
+44970000000 44972250234 14990000000 14990750078 2105098112 2105848190
+44973000000 44975250384 14991000000 14991750128 2106098112 2106848240
+44976000000 44978250544 14992000000 14992750181 2107098112 2107848293
+44979000000 44981250640 14993000000 14993750213 2108098112 2108848325
+44982000000 44984250828 14994000000 14994750276 2109098112 2109848388
+44985000000 44987250996 14995000000 14995750332 2110098112 2110848444
+44988000000 44990251132 14996000000 14996750377 2111098112 2111848489
+44991000000 44993251307 14997000000 14997750435 2112098112 2112848547
+44994000000 44996251429 14998000000 14998750476 2113098112 2113848588
+44997000000 44999251579 14999000000 14999750526 2114098112 2114848638
+45000000000 45002251727 15000000000 15000750575 2115098112 2115848687
+45003000000 45005251933 15001000000 15001750644 2116098112 2116848756
+45006000000 45008252047 15002000000 15002750682 2117098112 2117848794
+45009000000 45011252179 15003000000 15003750726 2118098112 2118848838
+45012000000 45014252353 15004000000 15004750784 2119098112 2119848896
+45015000000 45017252472 15005000000 15005750824 2120098112 2120848936
+45018000000 45020252596 15006000000 15006750865 2121098112 2121848977
+45021000000 45023252815 15007000000 15007750938 2122098112 2122849050
+45024000000 45026252951 15008000000 15008750983 2123098112 2123849095
+45027000000 45029253102 15009000000 15009751034 2124098112 2124849146
+45030000000 45032253262 15010000000 15010751087 2125098112 2125849199
+45033000000 45035253383 15011000000 15011751127 2126098112 2126849239
+45036000000 45038253464 15012000000 15012751154 2127098112 2127849266
+45039000000 45041253672 15013000000 15013751224 2128098112 2128849336
+45042000000 45044253827 15014000000 15014751275 2129098112 2129849387
+45045000000 45047253986 15015000000 15015751328 2130098112 2130849440
+45048000000 45050254138 15016000000 15016751379 2131098112 2131849491
+45051000000 45053254260 15017000000 15017751420 2132098112 2132849532
+45054000000 45056254438 15018000000 15018751479 2133098112 2133849591
+45057000000 45059254587 15019000000 15019751529 2134098112 2134849641
+45060000000 45062254715 15020000000 15020751571 2135098112 2135849683
+45063000000 45065254884 15021000000 15021751628 2136098112 2136849740
+45066000000 45068255004 15022000000 15022751668 2137098112 2137849780
+45069000000 45071254931 15023000000 15023751643 2138098112 2138849755
+45072000000 45074255254 15024000000 15024751751 2139098112 2139849863
+45075000000 45077255507 15025000000 15025751835 2140098112 2140849947
+45078000000 45080255617 15026000000 15026751872 2141098112 2141849984
+45081000000 45083255796 15027000000 15027751932 2142098112 2142850044
+45084000000 45086255844 15028000000 15028751948 2143098112 2143850060
+45087000000 45089256098 15029000000 15029752032 2144098112 2144850144
+45090000000 45092256217 15030000000 15030752072 2145098112 2145850184
+45093000000 45095256388 15031000000 15031752129 2146098112 2146850241
+45096000000 45098256535 15032000000 15032752178 2147098112 2147850290
+45099000000 45101256688 15033000000 15033752229 2148098112 2148850341
+45102000000 45104256834 15034000000 15034752278 2149098112 2149850390
+45105000000 45107256978 15035000000 15035752326 2150098112 2150850438
+45108000000 45110257141 15036000000 15036752380 2151098112 2151850492
+45111000000 45113257293 15037000000 15037752431 2152098112 2152850543
+45114000000 45116257447 15038000000 15038752482 2153098112 2153850594
+45117000000 45119257567 15039000000 15039752522 2154098112 2154850634
+45120000000 45122257776 15040000000 15040752592 2155098112 2155850704
+45123000000 45125257906 15041000000 15041752635 2156098112 2156850747
+45126000000 45128258020 15042000000 15042752673 2157098112 2157850785
+45129000000 45131258181 15043000000 15043752727 2158098112 2158850839
+45132000000 45134258316 15044000000 15044752772 2159098112 2159850884
+45135000000 45137258459 15045000000 15045752819 2160098112 2160850931
+45138000000 45140258559 15046000000 15046752853 2161098112 2161850965
+45141000000 45143258793 15047000000 15047752931 2162098112 2162851043
+45144000000 45146258866 15048000000 15048752955 2163098112 2163851067
+45147000000 45149258987 15049000000 15049752995 2164098112 2164851107
+45150000000 45152259176 15050000000 15050753058 2165098112 2165851170
+45153000000 45155259330 15051000000 15051753110 2166098112 2166851222
+45156000000 45158259509 15052000000 15052753169 2167098112 2167851281
+45159000000 45161259655 15053000000 15053753218 2168098112 2168851330
+45162000000 45164259782 15054000000 15054753260 2169098112 2169851372
+45165000000 45167259956 15055000000 15055753318 2170098112 2170851430
+45168000000 45170260020 15056000000 15056753340 2171098112 2171851452
+45171000000 45173260227 15057000000 15057753409 2172098112 2172851521
+45174000000 45176260408 15058000000 15058753469 2173098112 2173851581
+45177000000 45179260557 15059000000 15059753519 2174098112 2174851631
+45180000000 45182260614 15060000000 15060753538 2175098112 2175851650
+45183000000 45185260810 15061000000 15061753603 2176098112 2176851715
+45186000000 45188261000 15062000000 15062753666 2177098112 2177851778
+45189000000 45191261145 15063000000 15063753715 2178098112 2178851827
+45192000000 45194261317 15064000000 15064753772 2179098112 2179851884
+45195000000 45197261450 15065000000 15065753816 2180098112 2180851928
+45198000000 45200261521 15066000000 15066753840 2181098112 2181851952
+45201000000 45203261747 15067000000 15067753915 2182098112 2182852027
+45204000000 45206261907 15068000000 15068753969 2183098112 2183852081
+45207000000 45209262039 15069000000 15069754013 2184098112 2184852125
+45210000000 45212262147 15070000000 15070754049 2185098112 2185852161
+45213000000 45215262358 15071000000 15071754119 2186098112 2186852231
+45216000000 45218262524 15072000000 15072754174 2187098112 2187852286
+45219000000 45221262635 15073000000 15073754211 2188098112 2188852323
+45222000000 45224262795 15074000000 15074754265 2189098112 2189852377
+45225000000 45227262907 15075000000 15075754302 2190098112 2190852414
+45228000000 45230263105 15076000000 15076754368 2191098112 2191852480
+45231000000 45233263195 15077000000 15077754398 2192098112 2192852510
+45234000000 45236263420 15078000000 15078754473 2193098112 2193852585
+45237000000 45239263552 15079000000 15079754517 2194098112 2194852629
+45240000000 45242263691 15080000000 15080754563 2195098112 2195852675
+45243000000 45245263742 15081000000 15081754580 2196098112 2196852692
+45246000000 45248263953 15082000000 15082754651 2197098112 2197852763
+45249000000 45251264162 15083000000 15083754720 2198098112 2198852832
+45252000000 45254264290 15084000000 15084754763 2199098112 2199852875
+45255000000 45257264433 15085000000 15085754811 2200098112 2200852923
+45258000000 45260264604 15086000000 15086754868 2201098112 2201852980
+45261000000 45263264701 15087000000 15087754900 2202098112 2202853012
+45264000000 45266264914 15088000000 15088754971 2203098112 2203853083
+45267000000 45269265044 15089000000 15089755014 2204098112 2204853126
+45270000000 45272265194 15090000000 15090755064 2205098112 2205853176
+45273000000 45275265354 15091000000 15091755118 2206098112 2206853230
+45276000000 45278265450 15092000000 15092755150 2207098112 2207853262
+45279000000 45281265638 15093000000 15093755212 2208098112 2208853324
+45282000000 45284265806 15094000000 15094755268 2209098112 2209853380
+45285000000 45287265942 15095000000 15095755314 2210098112 2210853426
+45288000000 45290266117 15096000000 15096755372 2211098112 2211853484
+45291000000 45293266239 15097000000 15097755413 2212098112 2212853525
+45294000000 45296266389 15098000000 15098755463 2213098112 2213853575
+45297000000 45299266537 15099000000 15099755512 2214098112 2214853624
+45300000000 45302266743 15100000000 15100755581 2215098112 2215853693
+45303000000 45305266857 15101000000 15101755619 2216098112 2216853731
+45306000000 45308266989 15102000000 15102755663 2217098112 2217853775
+45309000000 45311267163 15103000000 15103755721 2218098112 2218853833
+45312000000 45314267282 15104000000 15104755760 2219098112 2219853872
+45315000000 45317267406 15105000000 15105755802 2220098112 2220853914
+45318000000 45320267625 15106000000 15106755875 2221098112 2221853987
+45321000000 45323267761 15107000000 15107755920 2222098112 2222854032
+45324000000 45326267912 15108000000 15108755970 2223098112 2223854082
+45327000000 45329268072 15109000000 15109756024 2224098112 2224854136
+45330000000 45332268193 15110000000 15110756064 2225098112 2225854176
+45333000000 45335268274 15111000000 15111756091 2226098112 2226854203
+45336000000 45338268482 15112000000 15112756160 2227098112 2227854272
+45339000000 45341268637 15113000000 15113756212 2228098112 2228854324
+45342000000 45344268796 15114000000 15114756265 2229098112 2229854377
+45345000000 45347268948 15115000000 15115756316 2230098112 2230854428
+45348000000 45350269070 15116000000 15116756356 2231098112 2231854468
+45351000000 45353269248 15117000000 15117756416 2232098112 2232854528
+45354000000 45356269397 15118000000 15118756465 2233098112 2233854577
+45357000000 45359269525 15119000000 15119756508 2234098112 2234854620
+45360000000 45362269694 15120000000 15120756564 2235098112 2235854676
+45363000000 45365269814 15121000000 15121756604 2236098112 2236854716
+45366000000 45368269741 15122000000 15122756580 2237098112 2237854692
+45369000000 45371270064 15123000000 15123756688 2238098112 2238854800
+45372000000 45374270317 15124000000 15124756772 2239098112 2239854884
+45375000000 45377270427 15125000000 15125756809 2240098112 2240854921
+45378000000 45380270606 15126000000 15126756868 2241098112 2241854980
+45381000000 45383270654 15127000000 15127756884 2242098112 2242854996
+45384000000 45386270908 15128000000 15128756969 2243098112 2243855081
+45387000000 45389271027 15129000000 15129757009 2244098112 2244855121
+45390000000 45392271198 15130000000 15130757066 2245098112 2245855178
+45393000000 45395271345 15131000000 15131757115 2246098112 2246855227
+45396000000 45398271498 15132000000 15132757166 2247098112 2247855278
+45399000000 45401271644 15133000000 15133757214 2248098112 2248855326
+45402000000 45404271788 15134000000 15134757262 2249098112 2249855374
+45405000000 45407271951 15135000000 15135757317 2250098112 2250855429
+45408000000 45410272103 15136000000 15136757367 2251098112 2251855479
+45411000000 45413272257 15137000000 15137757419 2252098112 2252855531
+45414000000 45416272377 15138000000 15138757459 2253098112 2253855571
+45417000000 45419272586 15139000000 15139757528 2254098112 2254855640
+45420000000 45422272716 15140000000 15140757572 2255098112 2255855684
+45423000000 45425272830 15141000000 15141757610 2256098112 2256855722
+45426000000 45428272991 15142000000 15142757663 2257098112 2257855775
+45429000000 45431273126 15143000000 15143757708 2258098112 2258855820
+45432000000 45434273269 15144000000 15144757756 2259098112 2259855868
+45435000000 45437273369 15145000000 15145757789 2260098112 2260855901
+45438000000 45440273603 15146000000 15146757867 2261098112 2261855979
+45441000000 45443273676 15147000000 15147757892 2262098112 2262856004
+45444000000 45446273797 15148000000 15148757932 2263098112 2263856044
+45447000000 45449273986 15149000000 15149757995 2264098112 2264856107
+45450000000 45452274140 15150000000 15150758046 2265098112 2265856158
+45453000000 45455274319 15151000000 15151758106 2266098112 2266856218
+45456000000 45458274465 15152000000 15152758155 2267098112 2267856267
+45459000000 45461274592 15153000000 15153758197 2268098112 2268856309
+45462000000 45464274766 15154000000 15154758255 2269098112 2269856367
+45465000000 45467274830 15155000000 15155758276 2270098112 2270856388
+45468000000 45470275037 15156000000 15156758345 2271098112 2271856457
+45471000000 45473275218 15157000000 15157758406 2272098112 2272856518
+45474000000 45476275367 15158000000 15158758455 2273098112 2273856567
+45477000000 45479275424 15159000000 15159758474 2274098112 2274856586
+45480000000 45482275620 15160000000 15160758540 2275098112 2275856652
+45483000000 45485275810 15161000000 15161758603 2276098112 2276856715
+45486000000 45488275955 15162000000 15162758651 2277098112 2277856763
+45489000000 45491276127 15163000000 15163758709 2278098112 2278856821
+45492000000 45494276260 15164000000 15164758753 2279098112 2279856865
+45495000000 45497276331 15165000000 15165758777 2280098112 2280856889
+45498000000 45500276557 15166000000 15166758852 2281098112 2281856964
+45501000000 45503276717 15167000000 15167758905 2282098112 2282857017
+45504000000 45506276849 15168000000 15168758949 2283098112 2283857061
+45507000000 45509276957 15169000000 15169758985 2284098112 2284857097
+45510000000 45512277168 15170000000 15170759056 2285098112 2285857168
+45513000000 45515277334 15171000000 15171759111 2286098112 2286857223
+45516000000 45518277445 15172000000 15172759148 2287098112 2287857260
+45519000000 45521277605 15173000000 15173759201 2288098112 2288857313
+45522000000 45524277717 15174000000 15174759239 2289098112 2289857351
+45525000000 45527277915 15175000000 15175759305 2290098112 2290857417
+45528000000 45530278005 15176000000 15176759335 2291098112 2291857447
+45531000000 45533278230 15177000000 15177759410 2292098112 2292857522
+45534000000 45536278362 15178000000 15178759454 2293098112 2293857566
+45537000000 45539278501 15179000000 15179759500 2294098112 2294857612
+45540000000 45542278552 15180000000 15180759517 2295098112 2295857629
+45543000000 45545278763 15181000000 15181759587 2296098112 2296857699
+45546000000 45548278972 15182000000 15182759657 2297098112 2297857769
+45549000000 45551279100 15183000000 15183759700 2298098112 2298857812
+45552000000 45554279243 15184000000 15184759747 2299098112 2299857859
+45555000000 45557279414 15185000000 15185759804 2300098112 2300857916
+45558000000 45560279511 15186000000 15186759837 2301098112 2301857949
+45561000000 45563279724 15187000000 15187759908 2302098112 2302858020
+45564000000 45566279854 15188000000 15188759951 2303098112 2303858063
+45567000000 45569280004 15189000000 15189760001 2304098112 2304858113
+45570000000 45572280164 15190000000 15190760054 2305098112 2305858166
+45573000000 45575280260 15191000000 15191760086 2306098112 2306858198
+45576000000 45578280448 15192000000 15192760149 2307098112 2307858261
+45579000000 45581280616 15193000000 15193760205 2308098112 2308858317
+45582000000 45584280752 15194000000 15194760250 2309098112 2309858362
+45585000000 45587280927 15195000000 15195760309 2310098112 2310858421
+45588000000 45590281049 15196000000 15196760349 2311098112 2311858461
+45591000000 45593281199 15197000000 15197760399 2312098112 2312858511
+45594000000 45596281347 15198000000 15198760449 2313098112 2313858561
+45597000000 45599281553 15199000000 15199760517 2314098112 2314858629
+45600000000 45602281667 15200000000 15200760555 2315098112 2315858667
+45603000000 45605281799 15201000000 15201760599 2316098112 2316858711
+45606000000 45608281973 15202000000 15202760657 2317098112 2317858769
+45609000000 45611282092 15203000000 15203760697 2318098112 2318858809
+45612000000 45614282216 15204000000 15204760738 2319098112 2319858850
+45615000000 45617282435 15205000000 15205760811 2320098112 2320858923
+45618000000 45620282571 15206000000 15206760857 2321098112 2321858969
+45621000000 45623282722 15207000000 15207760907 2322098112 2322859019
+45624000000 45626282882 15208000000 15208760960 2323098112 2323859072
+45627000000 45629283003 15209000000 15209761001 2324098112 2324859113
+45630000000 45632283084 15210000000 15210761028 2325098112 2325859140
+45633000000 45635283292 15211000000 15211761097 2326098112 2326859209
+45636000000 45638283447 15212000000 15212761149 2327098112 2327859261
+45639000000 45641283606 15213000000 15213761202 2328098112 2328859314
+45642000000 45644283758 15214000000 15214761252 2329098112 2329859364
+45645000000 45647283880 15215000000 15215761293 2330098112 2330859405
+45648000000 45650284058 15216000000 15216761352 2331098112 2331859464
+45651000000 45653284207 15217000000 15217761402 2332098112 2332859514
+45654000000 45656284335 15218000000 15218761445 2333098112 2333859557
+45657000000 45659284504 15219000000 15219761501 2334098112 2334859613
+45660000000 45662284624 15220000000 15220761541 2335098112 2335859653
+45663000000 45665284551 15221000000 15221761517 2336098112 2336859629
+45666000000 45668284874 15222000000 15222761624 2337098112 2337859736
+45669000000 45671285127 15223000000 15223761709 2338098112 2338859821
+45672000000 45674285237 15224000000 15224761745 2339098112 2339859857
+45675000000 45677285416 15225000000 15225761805 2340098112 2340859917
+45678000000 45680285464 15226000000 15226761821 2341098112 2341859933
+45681000000 45683285718 15227000000 15227761906 2342098112 2342860018
+45684000000 45686285837 15228000000 15228761945 2343098112 2343860057
+45687000000 45689286008 15229000000 15229762002 2344098112 2344860114
+45690000000 45692286155 15230000000 15230762051 2345098112 2345860163
+45693000000 45695286308 15231000000 15231762102 2346098112 2346860214
+45696000000 45698286454 15232000000 15232762151 2347098112 2347860263
+45699000000 45701286598 15233000000 15233762199 2348098112 2348860311
+45702000000 45704286761 15234000000 15234762253 2349098112 2349860365
+45705000000 45707286913 15235000000 15235762304 2350098112 2350860416
+45708000000 45710287067 15236000000 15236762355 2351098112 2351860467
+45711000000 45713287187 15237000000 15237762395 2352098112 2352860507
+45714000000 45716287396 15238000000 15238762465 2353098112 2353860577
+45717000000 45719287526 15239000000 15239762508 2354098112 2354860620
+45720000000 45722287640 15240000000 15240762546 2355098112 2355860658
+45723000000 45725287801 15241000000 15241762600 2356098112 2356860712
+45726000000 45728287936 15242000000 15242762645 2357098112 2357860757
+45729000000 45731288079 15243000000 15243762693 2358098112 2358860805
+45732000000 45734288179 15244000000 15244762726 2359098112 2359860838
+45735000000 45737288413 15245000000 15245762804 2360098112 2360860916
+45738000000 45740288486 15246000000 15246762828 2361098112 2361860940
+45741000000 45743288607 15247000000 15247762869 2362098112 2362860981
+45744000000 45746288796 15248000000 15248762932 2363098112 2363861044
+45747000000 45749288950 15249000000 15249762983 2364098112 2364861095
+45750000000 45752289129 15250000000 15250763043 2365098112 2365861155
+45753000000 45755289275 15251000000 15251763091 2366098112 2366861203
+45756000000 45758289402 15252000000 15252763134 2367098112 2367861246
+45759000000 45761289576 15253000000 15253763192 2368098112 2368861304
+45762000000 45764289640 15254000000 15254763213 2369098112 2369861325
+45765000000 45767289847 15255000000 15255763282 2370098112 2370861394
+45768000000 45770290028 15256000000 15256763342 2371098112 2371861454
+45771000000 45773290177 15257000000 15257763392 2372098112 2372861504
+45774000000 45776290234 15258000000 15258763411 2373098112 2373861523
+45777000000 45779290430 15259000000 15259763476 2374098112 2374861588
+45780000000 45782290620 15260000000 15260763540 2375098112 2375861652
+45783000000 45785290765 15261000000 15261763588 2376098112 2376861700
+45786000000 45788290937 15262000000 15262763645 2377098112 2377861757
+45789000000 45791291070 15263000000 15263763690 2378098112 2378861802
+45792000000 45794291141 15264000000 15264763713 2379098112 2379861825
+45795000000 45797291367 15265000000 15265763789 2380098112 2380861901
+45798000000 45800291527 15266000000 15266763842 2381098112 2381861954
+45801000000 45803291659 15267000000 15267763886 2382098112 2382861998
+45804000000 45806291767 15268000000 15268763922 2383098112 2383862034
+45807000000 45809291978 15269000000 15269763992 2384098112 2384862104
+45810000000 45812292144 15270000000 15270764048 2385098112 2385862160
+45813000000 45815292255 15271000000 15271764085 2386098112 2386862197
+45816000000 45818292415 15272000000 15272764138 2387098112 2387862250
+45819000000 45821292527 15273000000 15273764175 2388098112 2388862287
+45822000000 45824292725 15274000000 15274764241 2389098112 2389862353
+45825000000 45827292815 15275000000 15275764271 2390098112 2390862383
+45828000000 45830293040 15276000000 15276764346 2391098112 2391862458
+45831000000 45833293172 15277000000 15277764390 2392098112 2392862502
+45834000000 45836293311 15278000000 15278764437 2393098112 2393862549
+45837000000 45839293362 15279000000 15279764454 2394098112 2394862566
+45840000000 45842293573 15280000000 15280764524 2395098112 2395862636
+45843000000 45845293782 15281000000 15281764594 2396098112 2396862706
+45846000000 45848293910 15282000000 15282764636 2397098112 2397862748
+45849000000 45851294053 15283000000 15283764684 2398098112 2398862796
+45852000000 45854294224 15284000000 15284764741 2399098112 2399862853
+45855000000 45857294321 15285000000 15285764773 2400098112 2400862885
+45858000000 45860294534 15286000000 15286764844 2401098112 2401862956
+45861000000 45863294664 15287000000 15287764888 2402098112 2402863000
+45864000000 45866294814 15288000000 15288764938 2403098112 2403863050
+45867000000 45869294974 15289000000 15289764991 2404098112 2404863103
+45870000000 45872295070 15290000000 15290765023 2405098112 2405863135
+45873000000 45875295258 15291000000 15291765086 2406098112 2406863198
+45876000000 45878295426 15292000000 15292765142 2407098112 2407863254
+45879000000 45881295562 15293000000 15293765187 2408098112 2408863299
+45882000000 45884295737 15294000000 15294765245 2409098112 2409863357
+45885000000 45887295859 15295000000 15295765286 2410098112 2410863398
+45888000000 45890296009 15296000000 15296765336 2411098112 2411863448
+45891000000 45893296157 15297000000 15297765385 2412098112 2412863497
+45894000000 45896296363 15298000000 15298765454 2413098112 2413863566
+45897000000 45899296477 15299000000 15299765492 2414098112 2414863604
+45900000000 45902296609 15300000000 15300765536 2415098112 2415863648
+45903000000 45905296783 15301000000 15301765594 2416098112 2416863706
+45906000000 45908296902 15302000000 15302765634 2417098112 2417863746
+45909000000 45911297026 15303000000 15303765675 2418098112 2418863787
+45912000000 45914297245 15304000000 15304765748 2419098112 2419863860
+45915000000 45917297381 15305000000 15305765793 2420098112 2420863905
+45918000000 45920297532 15306000000 15306765844 2421098112 2421863956
+45921000000 45923297692 15307000000 15307765897 2422098112 2422864009
+45924000000 45926297813 15308000000 15308765937 2423098112 2423864049
+45927000000 45929297894 15309000000 15309765964 2424098112 2424864076
+45930000000 45932298102 15310000000 15310766034 2425098112 2425864146
+45933000000 45935298257 15311000000 15311766085 2426098112 2426864197
+45936000000 45938298416 15312000000 15312766138 2427098112 2427864250
+45939000000 45941298568 15313000000 15313766189 2428098112 2428864301
+45942000000 45944298690 15314000000 15314766230 2429098112 2429864342
+45945000000 45947298868 15315000000 15315766289 2430098112 2430864401
+45948000000 45950299017 15316000000 15316766339 2431098112 2431864451
+45951000000 45953299145 15317000000 15317766381 2432098112 2432864493
+45954000000 45956299314 15318000000 15318766438 2433098112 2433864550
+45957000000 45959299434 15319000000 15319766478 2434098112 2434864590
+45960000000 45962299361 15320000000 15320766453 2435098112 2435864565
+45963000000 45965299684 15321000000 15321766561 2436098112 2436864673
+45966000000 45968299937 15322000000 15322766645 2437098112 2437864757
+45969000000 45971300047 15323000000 15323766682 2438098112 2438864794
+45972000000 45974300226 15324000000 15324766742 2439098112 2439864854
+45975000000 45977300274 15325000000 15325766758 2440098112 2440864870
+45978000000 45980300528 15326000000 15326766842 2441098112 2441864954
+45981000000 45983300647 15327000000 15327766882 2442098112 2442864994
+45984000000 45986300818 15328000000 15328766939 2443098112 2443865051
+45987000000 45989300965 15329000000 15329766988 2444098112 2444865100
+45990000000 45992301118 15330000000 15330767039 2445098112 2445865151
+45993000000 45995301264 15331000000 15331767088 2446098112 2446865200
+45996000000 45998301408 15332000000 15332767136 2447098112 2447865248
+45999000000 46001301571 15333000000 15333767190 2448098112 2448865302
+46002000000 46004301723 15334000000 15334767241 2449098112 2449865353
+46005000000 46007301877 15335000000 15335767292 2450098112 2450865404
+46008000000 46010301997 15336000000 15336767332 2451098112 2451865444
+46011000000 46013302206 15337000000 15337767402 2452098112 2452865514
+46014000000 46016302336 15338000000 15338767445 2453098112 2453865557
+46017000000 46019302450 15339000000 15339767483 2454098112 2454865595
+46020000000 46022302611 15340000000 15340767537 2455098112 2455865649
+46023000000 46025302746 15341000000 15341767582 2456098112 2456865694
+46026000000 46028302889 15342000000 15342767629 2457098112 2457865741
+46029000000 46031302989 15343000000 15343767663 2458098112 2458865775
+46032000000 46034303223 15344000000 15344767741 2459098112 2459865853
+46035000000 46037303296 15345000000 15345767765 2460098112 2460865877
+46038000000 46040303417 15346000000 15346767805 2461098112 2461865917
+46041000000 46043303606 15347000000 15347767868 2462098112 2462865980
+46044000000 46046303760 15348000000 15348767920 2463098112 2463866032
+46047000000 46049303939 15349000000 15349767979 2464098112 2464866091
+46050000000 46052304085 15350000000 15350768028 2465098112 2465866140
+46053000000 46055304212 15351000000 15351768070 2466098112 2466866182
+46056000000 46058304386 15352000000 15352768128 2467098112 2467866240
+46059000000 46061304450 15353000000 15353768150 2468098112 2468866262
+46062000000 46064304657 15354000000 15354768219 2469098112 2469866331
+46065000000 46067304838 15355000000 15355768279 2470098112 2470866391
+46068000000 46070304987 15356000000 15356768329 2471098112 2471866441
+46071000000 46073305044 15357000000 15357768348 2472098112 2472866460
+46074000000 46076305240 15358000000 15358768413 2473098112 2473866525
+46077000000 46079305430 15359000000 15359768476 2474098112 2474866588
+46080000000 46082305575 15360000000 15360768525 2475098112 2475866637
+46083000000 46085305747 15361000000 15361768582 2476098112 2476866694
+46086000000 46088305880 15362000000 15362768626 2477098112 2477866738
+46089000000 46091305951 15363000000 15363768650 2478098112 2478866762
+46092000000 46094306177 15364000000 15364768725 2479098112 2479866837
+46095000000 46097306337 15365000000 15365768779 2480098112 2480866891
+46098000000 46100306469 15366000000 15366768823 2481098112 2481866935
+46101000000 46103306577 15367000000 15367768859 2482098112 2482866971
+46104000000 46106306788 15368000000 15368768929 2483098112 2483867041
+46107000000 46109306954 15369000000 15369768984 2484098112 2484867096
+46110000000 46112307065 15370000000 15370769021 2485098112 2485867133
+46113000000 46115307225 15371000000 15371769075 2486098112 2486867187
+46116000000 46118307337 15372000000 15372769112 2487098112 2487867224
+46119000000 46121307535 15373000000 15373769178 2488098112 2488867290
+46122000000 46124307625 15374000000 15374769208 2489098112 2489867320
+46125000000 46127307850 15375000000 15375769283 2490098112 2490867395
+46128000000 46130307982 15376000000 15376769327 2491098112 2491867439
+46131000000 46133308121 15377000000 15377769373 2492098112 2492867485
+46134000000 46136308172 15378000000 15378769390 2493098112 2493867502
+46137000000 46139308383 15379000000 15379769461 2494098112 2494867573
+46140000000 46142308592 15380000000 15380769530 2495098112 2495867642
+46143000000 46145308720 15381000000 15381769573 2496098112 2496867685
+46146000000 46148308863 15382000000 15382769621 2497098112 2497867733
+46149000000 46151309034 15383000000 15383769678 2498098112 2498867790
+46152000000 46154309131 15384000000 15384769710 2499098112 2499867822
+46155000000 46157309344 15385000000 15385769781 2500098112 2500867893
+46158000000 46160309474 15386000000 15386769824 2501098112 2501867936
+46161000000 46163309624 15387000000 15387769874 2502098112 2502867986
+46164000000 46166309784 15388000000 15388769928 2503098112 2503868040
+46167000000 46169309880 15389000000 15389769960 2504098112 2504868072
+46170000000 46172310068 15390000000 15390770022 2505098112 2505868134
+46173000000 46175310236 15391000000 15391770078 2506098112 2506868190
+46176000000 46178310372 15392000000 15392770124 2507098112 2507868236
+46179000000 46181310547 15393000000 15393770182 2508098112 2508868294
+46182000000 46184310669 15394000000 15394770223 2509098112 2509868335
+46185000000 46187310819 15395000000 15395770273 2510098112 2510868385
+46188000000 46190310967 15396000000 15396770322 2511098112 2511868434
+46191000000 46193311173 15397000000 15397770391 2512098112 2512868503
+46194000000 46196311287 15398000000 15398770429 2513098112 2513868541
+46197000000 46199311419 15399000000 15399770473 2514098112 2514868585
+46200000000 46202311593 15400000000 15400770531 2515098112 2515868643
+46203000000 46205311712 15401000000 15401770570 2516098112 2516868682
+46206000000 46208311836 15402000000 15402770612 2517098112 2517868724
+46209000000 46211312055 15403000000 15403770685 2518098112 2518868797
+46212000000 46214312191 15404000000 15404770730 2519098112 2519868842
+46215000000 46217312342 15405000000 15405770780 2520098112 2520868892
+46218000000 46220312502 15406000000 15406770834 2521098112 2521868946
+46221000000 46223312623 15407000000 15407770874 2522098112 2522868986
+46224000000 46226312704 15408000000 15408770901 2523098112 2523869013
+46227000000 46229312912 15409000000 15409770970 2524098112 2524869082
+46230000000 46232313067 15410000000 15410771022 2525098112 2525869134
+46233000000 46235313226 15411000000 15411771075 2526098112 2526869187
+46236000000 46238313378 15412000000 15412771126 2527098112 2527869238
+46239000000 46241313500 15413000000 15413771166 2528098112 2528869278
+46242000000 46244313678 15414000000 15414771226 2529098112 2529869338
+46245000000 46247313827 15415000000 15415771275 2530098112 2530869387
+46248000000 46250313955 15416000000 15416771318 2531098112 2531869430
+46251000000 46253314124 15417000000 15417771374 2532098112 2532869486
+46254000000 46256314244 15418000000 15418771414 2533098112 2533869526
+46257000000 46259314171 15419000000 15419771390 2534098112 2534869502
+46260000000 46262314494 15420000000 15420771498 2535098112 2535869610
+46263000000 46265314747 15421000000 15421771582 2536098112 2536869694
+46266000000 46268314857 15422000000 15422771619 2537098112 2537869731
+46269000000 46271315036 15423000000 15423771678 2538098112 2538869790
+46272000000 46274315084 15424000000 15424771694 2539098112 2539869806
+46275000000 46277315338 15425000000 15425771779 2540098112 2540869891
+46278000000 46280315457 15426000000 15426771819 2541098112 2541869931
+46281000000 46283315628 15427000000 15427771876 2542098112 2542869988
+46284000000 46286315775 15428000000 15428771925 2543098112 2543870037
+46287000000 46289315928 15429000000 15429771976 2544098112 2544870088
+46290000000 46292316074 15430000000 15430772024 2545098112 2545870136
+46293000000 46295316218 15431000000 15431772072 2546098112 2546870184
+46296000000 46298316381 15432000000 15432772127 2547098112 2547870239
+46299000000 46301316533 15433000000 15433772177 2548098112 2548870289
+46302000000 46304316687 15434000000 15434772229 2549098112 2549870341
+46305000000 46307316807 15435000000 15435772269 2550098112 2550870381
+46308000000 46310317016 15436000000 15436772338 2551098112 2551870450
+46311000000 46313317146 15437000000 15437772382 2552098112 2552870494
+46314000000 46316317260 15438000000 15438772420 2553098112 2553870532
+46317000000 46319317421 15439000000 15439772473 2554098112 2554870585
+46320000000 46322317556 15440000000 15440772518 2555098112 2555870630
+46323000000 46325317699 15441000000 15441772566 2556098112 2556870678
+46326000000 46328317799 15442000000 15442772599 2557098112 2557870711
+46329000000 46331318033 15443000000 15443772677 2558098112 2558870789
+46332000000 46334318106 15444000000 15444772702 2559098112 2559870814
+46335000000 46337318227 15445000000 15445772742 2560098112 2560870854
+46338000000 46340318416 15446000000 15446772805 2561098112 2561870917
+46341000000 46343318570 15447000000 15447772856 2562098112 2562870968
+46344000000 46346318749 15448000000 15448772916 2563098112 2563871028
+46347000000 46349318895 15449000000 15449772965 2564098112 2564871077
+46350000000 46352319022 15450000000 15450773007 2565098112 2565871119
+46353000000 46355319196 15451000000 15451773065 2566098112 2566871177
+46356000000 46358319260 15452000000 15452773086 2567098112 2567871198
+46359000000 46361319467 15453000000 15453773155 2568098112 2568871267
+46362000000 46364319648 15454000000 15454773216 2569098112 2569871328
+46365000000 46367319797 15455000000 15455773265 2570098112 2570871377
+46368000000 46370319854 15456000000 15456773284 2571098112 2571871396
+46371000000 46373320050 15457000000 15457773350 2572098112 2572871462
+46374000000 46376320240 15458000000 15458773413 2573098112 2573871525
+46377000000 46379320385 15459000000 15459773461 2574098112 2574871573
+46380000000 46382320557 15460000000 15460773519 2575098112 2575871631
+46383000000 46385320690 15461000000 15461773563 2576098112 2576871675
+46386000000 46388320761 15462000000 15462773587 2577098112 2577871699
+46389000000 46391320987 15463000000 15463773662 2578098112 2578871774
+46392000000 46394321147 15464000000 15464773715 2579098112 2579871827
+46395000000 46397321279 15465000000 15465773759 2580098112 2580871871
+46398000000 46400321387 15466000000 15466773795 2581098112 2581871907
+46401000000 46403321598 15467000000 15467773866 2582098112 2582871978
+46404000000 46406321764 15468000000 15468773921 2583098112 2583872033
+46407000000 46409321875 15469000000 15469773958 2584098112 2584872070
+46410000000 46412322035 15470000000 15470774011 2585098112 2585872123
+46413000000 46415322147 15471000000 15471774049 2586098112 2586872161
+46416000000 46418322345 15472000000 15472774115 2587098112 2587872227
+46419000000 46421322435 15473000000 15473774145 2588098112 2588872257
+46422000000 46424322660 15474000000 15474774220 2589098112 2589872332
+46425000000 46427322792 15475000000 15475774264 2590098112 2590872376
+46428000000 46430322931 15476000000 15476774310 2591098112 2591872422
+46431000000 46433322982 15477000000 15477774327 2592098112 2592872439
+46434000000 46436323193 15478000000 15478774397 2593098112 2593872509
+46437000000 46439323402 15479000000 15479774467 2594098112 2594872579
+46440000000 46442323530 15480000000 15480774510 2595098112 2595872622
+46443000000 46445323673 15481000000 15481774557 2596098112 2596872669
+46446000000 46448323844 15482000000 15482774614 2597098112 2597872726
+46449000000 46451323941 15483000000 15483774647 2598098112 2598872759
+46452000000 46454324154 15484000000 15484774718 2599098112 2599872830
+46455000000 46457324284 15485000000 15485774761 2600098112 2600872873
+46458000000 46460324434 15486000000 15486774811 2601098112 2601872923
+46461000000 46463324594 15487000000 15487774864 2602098112 2602872976
+46464000000 46466324690 15488000000 15488774896 2603098112 2603873008
+46467000000 46469324878 15489000000 15489774959 2604098112 2604873071
+46470000000 46472325046 15490000000 15490775015 2605098112 2605873127
+46473000000 46475325182 15491000000 15491775060 2606098112 2606873172
+46476000000 46478325357 15492000000 15492775119 2607098112 2607873231
+46479000000 46481325479 15493000000 15493775159 2608098112 2608873271
+46482000000 46484325629 15494000000 15494775209 2609098112 2609873321
+46485000000 46487325777 15495000000 15495775259 2610098112 2610873371
+46488000000 46490325983 15496000000 15496775327 2611098112 2611873439
+46491000000 46493326097 15497000000 15497775365 2612098112 2612873477
+46494000000 46496326229 15498000000 15498775409 2613098112 2613873521
+46497000000 46499326403 15499000000 15499775467 2614098112 2614873579
+46500000000 46502326522 15500000000 15500775507 2615098112 2615873619
+46503000000 46505326646 15501000000 15501775548 2616098112 2616873660
+46506000000 46508326865 15502000000 15502775621 2617098112 2617873733
+46509000000 46511327001 15503000000 15503775667 2618098112 2618873779
+46512000000 46514327152 15504000000 15504775717 2619098112 2619873829
+46515000000 46517327312 15505000000 15505775770 2620098112 2620873882
+46518000000 46520327433 15506000000 15506775811 2621098112 2621873923
+46521000000 46523327514 15507000000 15507775838 2622098112 2622873950
+46524000000 46526327722 15508000000 15508775907 2623098112 2623874019
+46527000000 46529327877 15509000000 15509775959 2624098112 2624874071
+46530000000 46532328036 15510000000 15510776012 2625098112 2625874124
+46533000000 46535328188 15511000000 15511776062 2626098112 2626874174
+46536000000 46538328310 15512000000 15512776103 2627098112 2627874215
+46539000000 46541328488 15513000000 15513776162 2628098112 2628874274
+46542000000 46544328637 15514000000 15514776212 2629098112 2629874324
+46545000000 46547328765 15515000000 15515776255 2630098112 2630874367
+46548000000 46550328934 15516000000 15516776311 2631098112 2631874423
+46551000000 46553329054 15517000000 15517776351 2632098112 2632874463
+46554000000 46556328981 15518000000 15518776327 2633098112 2633874439
+46557000000 46559329304 15519000000 15519776434 2634098112 2634874546
+46560000000 46562329557 15520000000 15520776519 2635098112 2635874631
+46563000000 46565329667 15521000000 15521776555 2636098112 2636874667
+46566000000 46568329846 15522000000 15522776615 2637098112 2637874727
+46569000000 46571329894 15523000000 15523776631 2638098112 2638874743
+46572000000 46574330148 15524000000 15524776716 2639098112 2639874828
+46575000000 46577330267 15525000000 15525776755 2640098112 2640874867
+46578000000 46580330438 15526000000 15526776812 2641098112 2641874924
+46581000000 46583330585 15527000000 15527776861 2642098112 2642874973
+46584000000 46586330738 15528000000 15528776912 2643098112 2643875024
+46587000000 46589330884 15529000000 15529776961 2644098112 2644875073
+46590000000 46592331028 15530000000 15530777009 2645098112 2645875121
+46593000000 46595331191 15531000000 15531777063 2646098112 2646875175
+46596000000 46598331343 15532000000 15532777114 2647098112 2647875226
+46599000000 46601331497 15533000000 15533777165 2648098112 2648875277
+46602000000 46604331617 15534000000 15534777205 2649098112 2649875317
+46605000000 46607331826 15535000000 15535777275 2650098112 2650875387
+46608000000 46610331956 15536000000 15536777318 2651098112 2651875430
+46611000000 46613332070 15537000000 15537777356 2652098112 2652875468
+46614000000 46616332231 15538000000 15538777410 2653098112 2653875522
+46617000000 46619332366 15539000000 15539777455 2654098112 2654875567
+46620000000 46622332509 15540000000 15540777503 2655098112 2655875615
+46623000000 46625332609 15541000000 15541777536 2656098112 2656875648
+46626000000 46628332843 15542000000 15542777614 2657098112 2657875726
+46629000000 46631332916 15543000000 15543777638 2658098112 2658875750
+46632000000 46634333037 15544000000 15544777679 2659098112 2659875791
+46635000000 46637333226 15545000000 15545777742 2660098112 2660875854
+46638000000 46640333380 15546000000 15546777793 2661098112 2661875905
+46641000000 46643333559 15547000000 15547777853 2662098112 2662875965
+46644000000 46646333705 15548000000 15548777901 2663098112 2663876013
+46647000000 46649333832 15549000000 15549777944 2664098112 2664876056
+46650000000 46652334006 15550000000 15550778002 2665098112 2665876114
+46653000000 46655334070 15551000000 15551778023 2666098112 2666876135
+46656000000 46658334277 15552000000 15552778092 2667098112 2667876204
+46659000000 46661334458 15553000000 15553778152 2668098112 2668876264
+46662000000 46664334607 15554000000 15554778202 2669098112 2669876314
+46665000000 46667334664 15555000000 15555778221 2670098112 2670876333
+46668000000 46670334860 15556000000 15556778286 2671098112 2671876398
+46671000000 46673335050 15557000000 15557778350 2672098112 2672876462
+46674000000 46676335195 15558000000 15558778398 2673098112 2673876510
+46677000000 46679335367 15559000000 15559778455 2674098112 2674876567
+46680000000 46682335500 15560000000 15560778500 2675098112 2675876612
+46683000000 46685335571 15561000000 15561778523 2676098112 2676876635
+46686000000 46688335797 15562000000 15562778599 2677098112 2677876711
+46689000000 46691335957 15563000000 15563778652 2678098112 2678876764
+46692000000 46694336089 15564000000 15564778696 2679098112 2679876808
+46695000000 46697336197 15565000000 15565778732 2680098112 2680876844
+46698000000 46700336408 15566000000 15566778802 2681098112 2681876914
+46701000000 46703336574 15567000000 15567778858 2682098112 2682876970
+46704000000 46706336685 15568000000 15568778895 2683098112 2683877007
+46707000000 46709336845 15569000000 15569778948 2684098112 2684877060
+46710000000 46712336957 15570000000 15570778985 2685098112 2685877097
+46713000000 46715337155 15571000000 15571779051 2686098112 2686877163
+46716000000 46718337245 15572000000 15572779081 2687098112 2687877193
+46719000000 46721337470 15573000000 15573779156 2688098112 2688877268
+46722000000 46724337602 15574000000 15574779200 2689098112 2689877312
+46725000000 46727337741 15575000000 15575779247 2690098112 2690877359
+46728000000 46730337792 15576000000 15576779264 2691098112 2691877376
+46731000000 46733338003 15577000000 15577779334 2692098112 2692877446
+46734000000 46736338212 15578000000 15578779404 2693098112 2693877516
+46737000000 46739338340 15579000000 15579779446 2694098112 2694877558
+46740000000 46742338483 15580000000 15580779494 2695098112 2695877606
+46743000000 46745338654 15581000000 15581779551 2696098112 2696877663
+46746000000 46748338751 15582000000 15582779583 2697098112 2697877695
+46749000000 46751338964 15583000000 15583779654 2698098112 2698877766
+46752000000 46754339094 15584000000 15584779698 2699098112 2699877810
+46755000000 46757339244 15585000000 15585779748 2700098112 2700877860
+46758000000 46760339404 15586000000 15586779801 2701098112 2701877913
+46761000000 46763339500 15587000000 15587779833 2702098112 2702877945
+46764000000 46766339688 15588000000 15588779896 2703098112 2703878008
+46767000000 46769339856 15589000000 15589779952 2704098112 2704878064
+46770000000 46772339992 15590000000 15590779997 2705098112 2705878109
+46773000000 46775340167 15591000000 15591780055 2706098112 2706878167
+46776000000 46778340289 15592000000 15592780096 2707098112 2707878208
+46779000000 46781340439 15593000000 15593780146 2708098112 2708878258
+46782000000 46784340587 15594000000 15594780195 2709098112 2709878307
+46785000000 46787340793 15595000000 15595780264 2710098112 2710878376
+46788000000 46790340907 15596000000 15596780302 2711098112 2711878414
+46791000000 46793341039 15597000000 15597780346 2712098112 2712878458
+46794000000 46796341213 15598000000 15598780404 2713098112 2713878516
+46797000000 46799341332 15599000000 15599780444 2714098112 2714878556
+46800000000 46802341456 15600000000 15600780485 2715098112 2715878597
+46803000000 46805341675 15601000000 15601780558 2716098112 2716878670
+46806000000 46808341811 15602000000 15602780603 2717098112 2717878715
+46809000000 46811341962 15603000000 15603780654 2718098112 2718878766
+46812000000 46814342122 15604000000 15604780707 2719098112 2719878819
+46815000000 46817342243 15605000000 15605780747 2720098112 2720878859
+46818000000 46820342324 15606000000 15606780774 2721098112 2721878886
+46821000000 46823342532 15607000000 15607780844 2722098112 2722878956
+46824000000 46826342687 15608000000 15608780895 2723098112 2723879007
+46827000000 46829342846 15609000000 15609780948 2724098112 2724879060
+46830000000 46832342998 15610000000 15610780999 2725098112 2725879111
+46833000000 46835343120 15611000000 15611781040 2726098112 2726879152
+46836000000 46838343298 15612000000 15612781099 2727098112 2727879211
+46839000000 46841343447 15613000000 15613781149 2728098112 2728879261
+46842000000 46844343575 15614000000 15614781191 2729098112 2729879303
+46845000000 46847343744 15615000000 15615781248 2730098112 2730879360
+46848000000 46850343864 15616000000 15616781288 2731098112 2731879400
+46851000000 46853343791 15617000000 15617781263 2732098112 2732879375
+46854000000 46856344114 15618000000 15618781371 2733098112 2733879483
+46857000000 46859344367 15619000000 15619781455 2734098112 2734879567
+46860000000 46862344477 15620000000 15620781492 2735098112 2735879604
+46863000000 46865344656 15621000000 15621781552 2736098112 2736879664
+46866000000 46868344704 15622000000 15622781568 2737098112 2737879680
+46869000000 46871344958 15623000000 15623781652 2738098112 2738879764
+46872000000 46874345077 15624000000 15624781692 2739098112 2739879804
+46875000000 46877345248 15625000000 15625781749 2740098112 2740879861
+46878000000 46880345395 15626000000 15626781798 2741098112 2741879910
+46881000000 46883345548 15627000000 15627781849 2742098112 2742879961
+46884000000 46886345694 15628000000 15628781898 2743098112 2743880010
+46887000000 46889345838 15629000000 15629781946 2744098112 2744880058
+46890000000 46892346001 15630000000 15630782000 2745098112 2745880112
+46893000000 46895346153 15631000000 15631782051 2746098112 2746880163
+46896000000 46898346307 15632000000 15632782102 2747098112 2747880214
+46899000000 46901346427 15633000000 15633782142 2748098112 2748880254
+46902000000 46904346636 15634000000 15634782212 2749098112 2749880324
+46905000000 46907346766 15635000000 15635782255 2750098112 2750880367
+46908000000 46910346880 15636000000 15636782293 2751098112 2751880405
+46911000000 46913347041 15637000000 15637782347 2752098112 2752880459
+46914000000 46916347176 15638000000 15638782392 2753098112 2753880504
+46917000000 46919347319 15639000000 15639782439 2754098112 2754880551
+46920000000 46922347419 15640000000 15640782473 2755098112 2755880585
+46923000000 46925347653 15641000000 15641782551 2756098112 2756880663
+46926000000 46928347726 15642000000 15642782575 2757098112 2757880687
+46929000000 46931347847 15643000000 15643782615 2758098112 2758880727
+46932000000 46934348036 15644000000 15644782678 2759098112 2759880790
+46935000000 46937348190 15645000000 15645782730 2760098112 2760880842
+46938000000 46940348369 15646000000 15646782789 2761098112 2761880901
+46941000000 46943348515 15647000000 15647782838 2762098112 2762880950
+46944000000 46946348642 15648000000 15648782880 2763098112 2763880992
+46947000000 46949348816 15649000000 15649782938 2764098112 2764881050
+46950000000 46952348880 15650000000 15650782960 2765098112 2765881072
+46953000000 46955349087 15651000000 15651783029 2766098112 2766881141
+46956000000 46958349268 15652000000 15652783089 2767098112 2767881201
+46959000000 46961349417 15653000000 15653783139 2768098112 2768881251
+46962000000 46964349474 15654000000 15654783158 2769098112 2769881270
+46965000000 46967349670 15655000000 15655783223 2770098112 2770881335
+46968000000 46970349860 15656000000 15656783286 2771098112 2771881398
+46971000000 46973350005 15657000000 15657783335 2772098112 2772881447
+46974000000 46976350177 15658000000 15658783392 2773098112 2773881504
+46977000000 46979350310 15659000000 15659783436 2774098112 2774881548
+46980000000 46982350381 15660000000 15660783460 2775098112 2775881572
+46983000000 46985350607 15661000000 15661783535 2776098112 2776881647
+46986000000 46988350767 15662000000 15662783589 2777098112 2777881701
+46989000000 46991350899 15663000000 15663783633 2778098112 2778881745
+46992000000 46994351007 15664000000 15664783669 2779098112 2779881781
+46995000000 46997351218 15665000000 15665783739 2780098112 2780881851
+46998000000 47000351384 15666000000 15666783794 2781098112 2781881906
+47001000000 47003351495 15667000000 15667783831 2782098112 2782881943
+47004000000 47006351655 15668000000 15668783885 2783098112 2783881997
+47007000000 47009351767 15669000000 15669783922 2784098112 2784882034
+47010000000 47012351965 15670000000 15670783988 2785098112 2785882100
+47013000000 47015352055 15671000000 15671784018 2786098112 2786882130
+47016000000 47018352280 15672000000 15672784093 2787098112 2787882205
+47019000000 47021352412 15673000000 15673784137 2788098112 2788882249
+47022000000 47024352551 15674000000 15674784183 2789098112 2789882295
+47025000000 47027352602 15675000000 15675784200 2790098112 2790882312
+47028000000 47030352813 15676000000 15676784271 2791098112 2791882383
+47031000000 47033353022 15677000000 15677784340 2792098112 2792882452
+47034000000 47036353150 15678000000 15678784383 2793098112 2793882495
+47037000000 47039353293 15679000000 15679784431 2794098112 2794882543
+47040000000 47042353464 15680000000 15680784488 2795098112 2795882600
+47043000000 47045353561 15681000000 15681784520 2796098112 2796882632
+47046000000 47048353774 15682000000 15682784591 2797098112 2797882703
+47049000000 47051353904 15683000000 15683784634 2798098112 2798882746
+47052000000 47054354054 15684000000 15684784684 2799098112 2799882796
+47055000000 47057354214 15685000000 15685784738 2800098112 2800882850
+47058000000 47060354310 15686000000 15686784770 2801098112 2801882882
+47061000000 47063354498 15687000000 15687784832 2802098112 2802882944
+47064000000 47066354666 15688000000 15688784888 2803098112 2803883000
+47067000000 47069354802 15689000000 15689784934 2804098112 2804883046
+47070000000 47072354977 15690000000 15690784992 2805098112 2805883104
+47073000000 47075355099 15691000000 15691785033 2806098112 2806883145
+47076000000 47078355249 15692000000 15692785083 2807098112 2807883195
+47079000000 47081355397 15693000000 15693785132 2808098112 2808883244
+47082000000 47084355603 15694000000 15694785201 2809098112 2809883313
+47085000000 47087355717 15695000000 15695785239 2810098112 2810883351
+47088000000 47090355849 15696000000 15696785283 2811098112 2811883395
+47091000000 47093356023 15697000000 15697785341 2812098112 2812883453
+47094000000 47096356142 15698000000 15698785380 2813098112 2813883492
+47097000000 47099356266 15699000000 15699785422 2814098112 2814883534
+47100000000 47102356485 15700000000 15700785495 2815098112 2815883607
+47103000000 47105356621 15701000000 15701785540 2816098112 2816883652
+47106000000 47108356772 15702000000 15702785590 2817098112 2817883702
+47109000000 47111356932 15703000000 15703785644 2818098112 2818883756
+47112000000 47114357053 15704000000 15704785684 2819098112 2819883796
+47115000000 47117357134 15705000000 15705785711 2820098112 2820883823
+47118000000 47120357342 15706000000 15706785780 2821098112 2821883892
+47121000000 47123357497 15707000000 15707785832 2822098112 2822883944
+47124000000 47126357656 15708000000 15708785885 2823098112 2823883997
+47127000000 47129357808 15709000000 15709785936 2824098112 2824884048
+47130000000 47132357930 15710000000 15710785976 2825098112 2825884088
+47133000000 47135358108 15711000000 15711786036 2826098112 2826884148
+47136000000 47138358257 15712000000 15712786085 2827098112 2827884197
+47139000000 47141358385 15713000000 15713786128 2828098112 2828884240
+47142000000 47144358554 15714000000 15714786184 2829098112 2829884296
+47145000000 47147358674 15715000000 15715786224 2830098112 2830884336
+47148000000 47150358601 15716000000 15716786200 2831098112 2831884312
+47151000000 47153358924 15717000000 15717786308 2832098112 2832884420
+47154000000 47156359177 15718000000 15718786392 2833098112 2833884504
+47157000000 47159359287 15719000000 15719786429 2834098112 2834884541
+47160000000 47162359466 15720000000 15720786488 2835098112 2835884600
+47163000000 47165359514 15721000000 15721786504 2836098112 2836884616
+47166000000 47168359768 15722000000 15722786589 2837098112 2837884701
+47169000000 47171359887 15723000000 15723786629 2838098112 2838884741
+47172000000 47174360058 15724000000 15724786686 2839098112 2839884798
+47175000000 47177360205 15725000000 15725786735 2840098112 2840884847
+47178000000 47180360358 15726000000 15726786786 2841098112 2841884898
+47181000000 47183360504 15727000000 15727786834 2842098112 2842884946
+47184000000 47186360648 15728000000 15728786882 2843098112 2843884994
+47187000000 47189360811 15729000000 15729786937 2844098112 2844885049
+47190000000 47192360963 15730000000 15730786987 2845098112 2845885099
+47193000000 47195361117 15731000000 15731787039 2846098112 2846885151
+47196000000 47198361237 15732000000 15732787079 2847098112 2847885191
+47199000000 47201361446 15733000000 15733787148 2848098112 2848885260
+47202000000 47204361576 15734000000 15734787192 2849098112 2849885304
+47205000000 47207361690 15735000000 15735787230 2850098112 2850885342
+47208000000 47210361851 15736000000 15736787283 2851098112 2851885395
+47211000000 47213361986 15737000000 15737787328 2852098112 2852885440
+47214000000 47216362129 15738000000 15738787376 2853098112 2853885488
+47217000000 47219362229 15739000000 15739787409 2854098112 2854885521
+47220000000 47222362463 15740000000 15740787487 2855098112 2855885599
+47223000000 47225362536 15741000000 15741787512 2856098112 2856885624
+47226000000 47228362657 15742000000 15742787552 2857098112 2857885664
+47229000000 47231362846 15743000000 15743787615 2858098112 2858885727
+47232000000 47234363000 15744000000 15744787666 2859098112 2859885778
+47235000000 47237363179 15745000000 15745787726 2860098112 2860885838
+47238000000 47240363325 15746000000 15746787775 2861098112 2861885887
+47241000000 47243363452 15747000000 15747787817 2862098112 2862885929
+47244000000 47246363626 15748000000 15748787875 2863098112 2863885987
+47247000000 47249363690 15749000000 15749787896 2864098112 2864886008
+47250000000 47252363897 15750000000 15750787965 2865098112 2865886077
+47253000000 47255364078 15751000000 15751788026 2866098112 2866886138
+47256000000 47258364227 15752000000 15752788075 2867098112 2867886187
+47259000000 47261364284 15753000000 15753788094 2868098112 2868886206
+47262000000 47264364480 15754000000 15754788160 2869098112 2869886272
+47265000000 47267364670 15755000000 15755788223 2870098112 2870886335
+47268000000 47270364815 15756000000 15756788271 2871098112 2871886383
+47271000000 47273364987 15757000000 15757788329 2872098112 2872886441
+47274000000 47276365120 15758000000 15758788373 2873098112 2873886485
+47277000000 47279365191 15759000000 15759788397 2874098112 2874886509
+47280000000 47282365417 15760000000 15760788472 2875098112 2875886584
+47283000000 47285365577 15761000000 15761788525 2876098112 2876886637
+47286000000 47288365709 15762000000 15762788569 2877098112 2877886681
+47289000000 47291365817 15763000000 15763788605 2878098112 2878886717
+47292000000 47294366028 15764000000 15764788676 2879098112 2879886788
+47295000000 47297366194 15765000000 15765788731 2880098112 2880886843
+47298000000 47300366305 15766000000 15766788768 2881098112 2881886880
+47301000000 47303366465 15767000000 15767788821 2882098112 2882886933
+47304000000 47306366577 15768000000 15768788859 2883098112 2883886971
+47307000000 47309366775 15769000000 15769788925 2884098112 2884887037
+47310000000 47312366865 15770000000 15770788955 2885098112 2885887067
+47313000000 47315367090 15771000000 15771789030 2886098112 2886887142
+47316000000 47318367222 15772000000 15772789074 2887098112 2887887186
+47319000000 47321367361 15773000000 15773789120 2888098112 2888887232
+47322000000 47324367412 15774000000 15774789137 2889098112 2889887249
+47325000000 47327367623 15775000000 15775789207 2890098112 2890887319
+47328000000 47330367832 15776000000 15776789277 2891098112 2891887389
+47331000000 47333367960 15777000000 15777789320 2892098112 2892887432
+47334000000 47336368103 15778000000 15778789367 2893098112 2893887479
+47337000000 47339368274 15779000000 15779789424 2894098112 2894887536
+47340000000 47342368371 15780000000 15780789457 2895098112 2895887569
+47343000000 47345368584 15781000000 15781789528 2896098112 2896887640
+47346000000 47348368714 15782000000 15782789571 2897098112 2897887683
+47349000000 47351368864 15783000000 15783789621 2898098112 2898887733
+47352000000 47354369024 15784000000 15784789674 2899098112 2899887786
+47355000000 47357369120 15785000000 15785789706 2900098112 2900887818
+47358000000 47360369308 15786000000 15786789769 2901098112 2901887881
+47361000000 47363369476 15787000000 15787789825 2902098112 2902887937
+47364000000 47366369612 15788000000 15788789870 2903098112 2903887982
+47367000000 47369369787 15789000000 15789789929 2904098112 2904888041
+47370000000 47372369909 15790000000 15790789969 2905098112 2905888081
+47373000000 47375370059 15791000000 15791790019 2906098112 2906888131
+47376000000 47378370207 15792000000 15792790069 2907098112 2907888181
+47379000000 47381370413 15793000000 15793790137 2908098112 2908888249
+47382000000 47384370527 15794000000 15794790175 2909098112 2909888287
+47385000000 47387370659 15795000000 15795790219 2910098112 2910888331
+47388000000 47390370833 15796000000 15796790277 2911098112 2911888389
+47391000000 47393370952 15797000000 15797790317 2912098112 2912888429
+47394000000 47396371076 15798000000 15798790358 2913098112 2913888470
+47397000000 47399371295 15799000000 15799790431 2914098112 2914888543
+47400000000 47402371431 15800000000 15800790477 2915098112 2915888589
+47403000000 47405371582 15801000000 15801790527 2916098112 2916888639
+47406000000 47408371742 15802000000 15802790580 2917098112 2917888692
+47409000000 47411371863 15803000000 15803790621 2918098112 2918888733
+47412000000 47414371944 15804000000 15804790648 2919098112 2919888760
+47415000000 47417372152 15805000000 15805790717 2920098112 2920888829
+47418000000 47420372307 15806000000 15806790769 2921098112 2921888881
+47421000000 47423372466 15807000000 15807790822 2922098112 2922888934
+47424000000 47426372618 15808000000 15808790872 2923098112 2923888984
+47427000000 47429372740 15809000000 15809790913 2924098112 2924889025
+47430000000 47432372918 15810000000 15810790972 2925098112 2925889084
+47433000000 47435373067 15811000000 15811791022 2926098112 2926889134
+47436000000 47438373195 15812000000 15812791065 2927098112 2927889177
+47439000000 47441373364 15813000000 15813791121 2928098112 2928889233
+47442000000 47444373484 15814000000 15814791161 2929098112 2929889273
+47445000000 47447373411 15815000000 15815791137 2930098112 2930889249
+47448000000 47450373734 15816000000 15816791244 2931098112 2931889356
+47451000000 47453373987 15817000000 15817791329 2932098112 2932889441
+47454000000 47456374097 15818000000 15818791365 2933098112 2933889477
+47457000000 47459374276 15819000000 15819791425 2934098112 2934889537
+47460000000 47462374324 15820000000 15820791441 2935098112 2935889553
+47463000000 47465374578 15821000000 15821791526 2936098112 2936889638
+47466000000 47468374697 15822000000 15822791565 2937098112 2937889677
+47469000000 47471374868 15823000000 15823791622 2938098112 2938889734
+47472000000 47474375015 15824000000 15824791671 2939098112 2939889783
+47475000000 47477375168 15825000000 15825791722 2940098112 2940889834
+47478000000 47480375314 15826000000 15826791771 2941098112 2941889883
+47481000000 47483375458 15827000000 15827791819 2942098112 2942889931
+47484000000 47486375621 15828000000 15828791873 2943098112 2943889985
+47487000000 47489375773 15829000000 15829791924 2944098112 2944890036
+47490000000 47492375927 15830000000 15830791975 2945098112 2945890087
+47493000000 47495376047 15831000000 15831792015 2946098112 2946890127
+47496000000 47498376256 15832000000 15832792085 2947098112 2947890197
+47499000000 47501376386 15833000000 15833792128 2948098112 2948890240
+47502000000 47504376500 15834000000 15834792166 2949098112 2949890278
+47505000000 47507376661 15835000000 15835792220 2950098112 2950890332
+47508000000 47510376796 15836000000 15836792265 2951098112 2951890377
+47511000000 47513376939 15837000000 15837792313 2952098112 2952890425
+47514000000 47516377039 15838000000 15838792346 2953098112 2953890458
+47517000000 47519377273 15839000000 15839792424 2954098112 2954890536
+47520000000 47522377346 15840000000 15840792448 2955098112 2955890560
+47523000000 47525377467 15841000000 15841792489 2956098112 2956890601
+47526000000 47528377656 15842000000 15842792552 2957098112 2957890664
+47529000000 47531377810 15843000000 15843792603 2958098112 2958890715
+47532000000 47534377989 15844000000 15844792663 2959098112 2959890775
+47535000000 47537378135 15845000000 15845792711 2960098112 2960890823
+47538000000 47540378262 15846000000 15846792754 2961098112 2961890866
+47541000000 47543378436 15847000000 15847792812 2962098112 2962890924
+47544000000 47546378500 15848000000 15848792833 2963098112 2963890945
+47547000000 47549378707 15849000000 15849792902 2964098112 2964891014
+47550000000 47552378888 15850000000 15850792962 2965098112 2965891074
+47553000000 47555379037 15851000000 15851793012 2966098112 2966891124
+47556000000 47558379094 15852000000 15852793031 2967098112 2967891143
+47559000000 47561379290 15853000000 15853793096 2968098112 2968891208
+47562000000 47564379480 15854000000 15854793160 2969098112 2969891272
+47565000000 47567379625 15855000000 15855793208 2970098112 2970891320
+47568000000 47570379797 15856000000 15856793265 2971098112 2971891377
+47571000000 47573379930 15857000000 15857793310 2972098112 2972891422
+47574000000 47576380001 15858000000 15858793333 2973098112 2973891445
+47577000000 47579380227 15859000000 15859793409 2974098112 2974891521
+47580000000 47582380387 15860000000 15860793462 2975098112 2975891574
+47583000000 47585380519 15861000000 15861793506 2976098112 2976891618
+47586000000 47588380627 15862000000 15862793542 2977098112 2977891654
+47589000000 47591380838 15863000000 15863793612 2978098112 2978891724
+47592000000 47594381004 15864000000 15864793668 2979098112 2979891780
+47595000000 47597381115 15865000000 15865793705 2980098112 2980891817
+47598000000 47600381275 15866000000 15866793758 2981098112 2981891870
+47601000000 47603381387 15867000000 15867793795 2982098112 2982891907
+47604000000 47606381585 15868000000 15868793861 2983098112 2983891973
+47607000000 47609381675 15869000000 15869793891 2984098112 2984892003
+47610000000 47612381900 15870000000 15870793966 2985098112 2985892078
+47613000000 47615382032 15871000000 15871794010 2986098112 2986892122
+47616000000 47618382171 15872000000 15872794057 2987098112 2987892169
+47619000000 47621382222 15873000000 15873794074 2988098112 2988892186
+47622000000 47624382433 15874000000 15874794144 2989098112 2989892256
+47625000000 47627382642 15875000000 15875794214 2990098112 2990892326
+47628000000 47630382770 15876000000 15876794256 2991098112 2991892368
+47631000000 47633382913 15877000000 15877794304 2992098112 2992892416
+47634000000 47636383084 15878000000 15878794361 2993098112 2993892473
+47637000000 47639383181 15879000000 15879794393 2994098112 2994892505
+47640000000 47642383394 15880000000 15880794464 2995098112 2995892576
+47643000000 47645383524 15881000000 15881794508 2996098112 2996892620
+47646000000 47648383674 15882000000 15882794558 2997098112 2997892670
+47649000000 47651383834 15883000000 15883794611 2998098112 2998892723
+47652000000 47654383930 15884000000 15884794643 2999098112 2999892755
+47655000000 47657384118 15885000000 15885794706 3000098112 3000892818
+47658000000 47660384286 15886000000 15886794762 3001098112 3001892874
+47661000000 47663384422 15887000000 15887794807 3002098112 3002892919
+47664000000 47666384597 15888000000 15888794865 3003098112 3003892977
+47667000000 47669384719 15889000000 15889794906 3004098112 3004893018
+47670000000 47672384869 15890000000 15890794956 3005098112 3005893068
+47673000000 47675385017 15891000000 15891795005 3006098112 3006893117
+47676000000 47678385223 15892000000 15892795074 3007098112 3007893186
+47679000000 47681385337 15893000000 15893795112 3008098112 3008893224
+47682000000 47684385469 15894000000 15894795156 3009098112 3009893268
+47685000000 47687385643 15895000000 15895795214 3010098112 3010893326
+47688000000 47690385762 15896000000 15896795254 3011098112 3011893366
+47691000000 47693385886 15897000000 15897795295 3012098112 3012893407
+47694000000 47696386105 15898000000 15898795368 3013098112 3013893480
+47697000000 47699386241 15899000000 15899795413 3014098112 3014893525
+47700000000 47702386392 15900000000 15900795464 3015098112 3015893576
+47703000000 47705386552 15901000000 15901795517 3016098112 3016893629
+47706000000 47708386673 15902000000 15902795557 3017098112 3017893669
+47709000000 47711386754 15903000000 15903795584 3018098112 3018893696
+47712000000 47714386962 15904000000 15904795654 3019098112 3019893766
+47715000000 47717387117 15905000000 15905795705 3020098112 3020893817
+47718000000 47720387276 15906000000 15906795758 3021098112 3021893870
+47721000000 47723387428 15907000000 15907795809 3022098112 3022893921
+47724000000 47726387550 15908000000 15908795850 3023098112 3023893962
+47727000000 47729387728 15909000000 15909795909 3024098112 3024894021
+47730000000 47732387877 15910000000 15910795959 3025098112 3025894071
+47733000000 47735388005 15911000000 15911796001 3026098112 3026894113
+47736000000 47738388174 15912000000 15912796058 3027098112 3027894170
+47739000000 47741388294 15913000000 15913796098 3028098112 3028894210
+47742000000 47744388221 15914000000 15914796073 3029098112 3029894185
+47745000000 47747388544 15915000000 15915796181 3030098112 3030894293
+47748000000 47750388797 15916000000 15916796265 3031098112 3031894377
+47751000000 47753388907 15917000000 15917796302 3032098112 3032894414
+47754000000 47756389086 15918000000 15918796362 3033098112 3033894474
+47757000000 47759389134 15919000000 15919796378 3034098112 3034894490
+47760000000 47762389388 15920000000 15920796462 3035098112 3035894574
+47763000000 47765389507 15921000000 15921796502 3036098112 3036894614
+47766000000 47768389678 15922000000 15922796559 3037098112 3037894671
+47769000000 47771389825 15923000000 15923796608 3038098112 3038894720
+47772000000 47774389978 15924000000 15924796659 3039098112 3039894771
+47775000000 47777390124 15925000000 15925796708 3040098112 3040894820
+47778000000 47780390268 15926000000 15926796756 3041098112 3041894868
+47781000000 47783390431 15927000000 15927796810 3042098112 3042894922
+47784000000 47786390583 15928000000 15928796861 3043098112 3043894973
+47787000000 47789390737 15929000000 15929796912 3044098112 3044895024
+47790000000 47792390857 15930000000 15930796952 3045098112 3045895064
+47793000000 47795391066 15931000000 15931797022 3046098112 3046895134
+47796000000 47798391196 15932000000 15932797065 3047098112 3047895177
+47799000000 47801391310 15933000000 15933797103 3048098112 3048895215
+47802000000 47804391471 15934000000 15934797157 3049098112 3049895269
+47805000000 47807391606 15935000000 15935797202 3050098112 3050895314
+47808000000 47810391749 15936000000 15936797249 3051098112 3051895361
+47811000000 47813391849 15937000000 15937797283 3052098112 3052895395
+47814000000 47816392083 15938000000 15938797361 3053098112 3053895473
+47817000000 47819392156 15939000000 15939797385 3054098112 3054895497
+47820000000 47822392277 15940000000 15940797425 3055098112 3055895537
+47823000000 47825392466 15941000000 15941797488 3056098112 3056895600
+47826000000 47828392620 15942000000 15942797540 3057098112 3057895652
+47829000000 47831392799 15943000000 15943797599 3058098112 3058895711
+47832000000 47834392945 15944000000 15944797648 3059098112 3059895760
+47835000000 47837393072 15945000000 15945797690 3060098112 3060895802
+47838000000 47840393246 15946000000 15946797748 3061098112 3061895860
+47841000000 47843393310 15947000000 15947797770 3062098112 3062895882
+47844000000 47846393517 15948000000 15948797839 3063098112 3063895951
+47847000000 47849393698 15949000000 15949797899 3064098112 3064896011
+47850000000 47852393847 15950000000 15950797949 3065098112 3065896061
+47853000000 47855393904 15951000000 15951797968 3066098112 3066896080
+47856000000 47858394100 15952000000 15952798033 3067098112 3067896145
+47859000000 47861394290 15953000000 15953798096 3068098112 3068896208
+47862000000 47864394435 15954000000 15954798145 3069098112 3069896257
+47865000000 47867394607 15955000000 15955798202 3070098112 3070896314
+47868000000 47870394740 15956000000 15956798246 3071098112 3071896358
+47871000000 47873394811 15957000000 15957798270 3072098112 3072896382
+47874000000 47876395037 15958000000 15958798345 3073098112 3073896457
+47877000000 47879395197 15959000000 15959798399 3074098112 3074896511
+47880000000 47882395329 15960000000 15960798443 3075098112 3075896555
+47883000000 47885395437 15961000000 15961798479 3076098112 3076896591
+47886000000 47888395648 15962000000 15962798549 3077098112 3077896661
+47889000000 47891395814 15963000000 15963798604 3078098112 3078896716
+47892000000 47894395925 15964000000 15964798641 3079098112 3079896753
+47895000000 47897396085 15965000000 15965798695 3080098112 3080896807
+47898000000 47900396197 15966000000 15966798732 3081098112 3081896844
+47901000000 47903396395 15967000000 15967798798 3082098112 3082896910
+47904000000 47906396485 15968000000 15968798828 3083098112 3083896940
+47907000000 47909396710 15969000000 15969798903 3084098112 3084897015
+47910000000 47912396842 15970000000 15970798947 3085098112 3085897059
+47913000000 47915396981 15971000000 15971798993 3086098112 3086897105
+47916000000 47918397032 15972000000 15972799010 3087098112 3087897122
+47919000000 47921397243 15973000000 15973799081 3088098112 3088897193
+47922000000 47924397452 15974000000 15974799150 3089098112 3089897262
+47925000000 47927397580 15975000000 15975799193 3090098112 3090897305
+47928000000 47930397723 15976000000 15976799241 3091098112 3091897353
+47931000000 47933397894 15977000000 15977799298 3092098112 3092897410
+47934000000 47936397991 15978000000 15978799330 3093098112 3093897442
+47937000000 47939398204 15979000000 15979799401 3094098112 3094897513
+47940000000 47942398334 15980000000 15980799444 3095098112 3095897556
+47943000000 47945398484 15981000000 15981799494 3096098112 3096897606
+47946000000 47948398644 15982000000 15982799548 3097098112 3097897660
+47949000000 47951398740 15983000000 15983799580 3098098112 3098897692
+47952000000 47954398928 15984000000 15984799642 3099098112 3099897754
+47955000000 47957399096 15985000000 15985799698 3100098112 3100897810
+47958000000 47960399232 15986000000 15986799744 3101098112 3101897856
+47961000000 47963399407 15987000000 15987799802 3102098112 3102897914
+47964000000 47966399529 15988000000 15988799843 3103098112 3103897955
+47967000000 47969399679 15989000000 15989799893 3104098112 3104898005
+47970000000 47972399827 15990000000 15990799942 3105098112 3105898054
+47973000000 47975400033 15991000000 15991800011 3106098112 3106898123
+47976000000 47978400147 15992000000 15992800049 3107098112 3107898161
+47979000000 47981400279 15993000000 15993800093 3108098112 3108898205
+47982000000 47984400453 15994000000 15994800151 3109098112 3109898263
+47985000000 47987400572 15995000000 15995800190 3110098112 3110898302
+47988000000 47990400696 15996000000 15996800232 3111098112 3111898344
+47991000000 47993400915 15997000000 15997800305 3112098112 3112898417
+47994000000 47996401051 15998000000 15998800350 3113098112 3113898462
+47997000000 47999401202 15999000000 15999800400 3114098112 3114898512
+48000000000 48002401362 16000000000 16000800454 3115098112 3115898566
+48003000000 48005401483 16001000000 16001800494 3116098112 3116898606
+48006000000 48008401564 16002000000 16002800521 3117098112 3117898633
+48009000000 48011401772 16003000000 16003800590 3118098112 3118898702
+48012000000 48014401927 16004000000 16004800642 3119098112 3119898754
+48015000000 48017402086 16005000000 16005800695 3120098112 3120898807
+48018000000 48020402238 16006000000 16006800746 3121098112 3121898858
+48021000000 48023402360 16007000000 16007800786 3122098112 3122898898
+48024000000 48026402538 16008000000 16008800846 3123098112 3123898958
+48027000000 48029402687 16009000000 16009800895 3124098112 3124899007
+48030000000 48032402815 16010000000 16010800938 3125098112 3125899050
+48033000000 48035402984 16011000000 16011800994 3126098112 3126899106
+48036000000 48038403104 16012000000 16012801034 3127098112 3127899146
+48039000000 48041403031 16013000000 16013801010 3128098112 3128899122
+48042000000 48044403354 16014000000 16014801118 3129098112 3129899230
+48045000000 48047403607 16015000000 16015801202 3130098112 3130899314
+48048000000 48050403717 16016000000 16016801239 3131098112 3131899351
+48051000000 48053403896 16017000000 16017801298 3132098112 3132899410
+48054000000 48056403944 16018000000 16018801314 3133098112 3133899426
+48057000000 48059404198 16019000000 16019801399 3134098112 3134899511
+48060000000 48062404317 16020000000 16020801439 3135098112 3135899551
+48063000000 48065404488 16021000000 16021801496 3136098112 3136899608
+48066000000 48068404635 16022000000 16022801545 3137098112 3137899657
+48069000000 48071404788 16023000000 16023801596 3138098112 3138899708
+48072000000 48074404934 16024000000 16024801644 3139098112 3139899756
+48075000000 48077405078 16025000000 16025801692 3140098112 3140899804
+48078000000 48080405241 16026000000 16026801747 3141098112 3141899859
+48081000000 48083405393 16027000000 16027801797 3142098112 3142899909
+48084000000 48086405547 16028000000 16028801849 3143098112 3143899961
+48087000000 48089405667 16029000000 16029801889 3144098112 3144900001
+48090000000 48092405876 16030000000 16030801958 3145098112 3145900070
+48093000000 48095406006 16031000000 16031802002 3146098112 3146900114
+48096000000 48098406120 16032000000 16032802040 3147098112 3147900152
+48099000000 48101406281 16033000000 16033802093 3148098112 3148900205
+48102000000 48104406416 16034000000 16034802138 3149098112 3149900250
+48105000000 48107406559 16035000000 16035802186 3150098112 3150900298
+48108000000 48110406659 16036000000 16036802219 3151098112 3151900331
+48111000000 48113406893 16037000000 16037802297 3152098112 3152900409
+48114000000 48116406966 16038000000 16038802322 3153098112 3153900434
+48117000000 48119407087 16039000000 16039802362 3154098112 3154900474
+48120000000 48122407276 16040000000 16040802425 3155098112 3155900537
+48123000000 48125407430 16041000000 16041802476 3156098112 3156900588
+48126000000 48128407609 16042000000 16042802536 3157098112 3157900648
+48129000000 48131407755 16043000000 16043802585 3158098112 3158900697
+48132000000 48134407882 16044000000 16044802627 3159098112 3159900739
+48135000000 48137408056 16045000000 16045802685 3160098112 3160900797
+48138000000 48140408120 16046000000 16046802706 3161098112 3161900818
+48141000000 48143408327 16047000000 16047802775 3162098112 3162900887
+48144000000 48146408508 16048000000 16048802836 3163098112 3163900948
+48147000000 48149408657 16049000000 16049802885 3164098112 3164900997
+48150000000 48152408714 16050000000 16050802904 3165098112 3165901016
+48153000000 48155408910 16051000000 16051802970 3166098112 3166901082
+48156000000 48158409100 16052000000 16052803033 3167098112 3167901145
+48159000000 48161409245 16053000000 16053803081 3168098112 3168901193
+48162000000 48164409417 16054000000 16054803139 3169098112 3169901251
+48165000000 48167409550 16055000000 16055803183 3170098112 3170901295
+48168000000 48170409621 16056000000 16056803207 3171098112 3171901319
+48171000000 48173409847 16057000000 16057803282 3172098112 3172901394
+48174000000 48176410007 16058000000 16058803335 3173098112 3173901447
+48177000000 48179410139 16059000000 16059803379 3174098112 3174901491
+48180000000 48182410247 16060000000 16060803415 3175098112 3175901527
+48183000000 48185410458 16061000000 16061803486 3176098112 3176901598
+48186000000 48188410624 16062000000 16062803541 3177098112 3177901653
+48189000000 48191410735 16063000000 16063803578 3178098112 3178901690
+48192000000 48194410895 16064000000 16064803631 3179098112 3179901743
+48195000000 48197411007 16065000000 16065803669 3180098112 3180901781
+48198000000 48200411205 16066000000 16066803735 3181098112 3181901847
+48201000000 48203411295 16067000000 16067803765 3182098112 3182901877
+48204000000 48206411520 16068000000 16068803840 3183098112 3183901952
+48207000000 48209411652 16069000000 16069803884 3184098112 3184901996
+48210000000 48212411791 16070000000 16070803930 3185098112 3185902042
+48213000000 48215411842 16071000000 16071803947 3186098112 3186902059
+48216000000 48218412053 16072000000 16072804017 3187098112 3187902129
+48219000000 48221412262 16073000000 16073804087 3188098112 3188902199
+48222000000 48224412390 16074000000 16074804130 3189098112 3189902242
+48225000000 48227412533 16075000000 16075804177 3190098112 3190902289
+48228000000 48230412704 16076000000 16076804234 3191098112 3191902346
+48231000000 48233412801 16077000000 16077804267 3192098112 3192902379
+48234000000 48236413014 16078000000 16078804338 3193098112 3193902450
+48237000000 48239413144 16079000000 16079804381 3194098112 3194902493
+48240000000 48242413294 16080000000 16080804431 3195098112 3195902543
+48243000000 48245413454 16081000000 16081804484 3196098112 3196902596
+48246000000 48248413550 16082000000 16082804516 3197098112 3197902628
+48249000000 48251413738 16083000000 16083804579 3198098112 3198902691
+48252000000 48254413906 16084000000 16084804635 3199098112 3199902747
+48255000000 48257414042 16085000000 16085804680 3200098112 3200902792
+48258000000 48260414217 16086000000 16086804739 3201098112 3201902851
+48261000000 48263414339 16087000000 16087804779 3202098112 3202902891
+48264000000 48266414489 16088000000 16088804829 3203098112 3203902941
+48267000000 48269414637 16089000000 16089804879 3204098112 3204902991
+48270000000 48272414843 16090000000 16090804947 3205098112 3205903059
+48273000000 48275414957 16091000000 16091804985 3206098112 3206903097
+48276000000 48278415089 16092000000 16092805029 3207098112 3207903141
+48279000000 48281415263 16093000000 16093805087 3208098112 3208903199
+48282000000 48284415382 16094000000 16094805127 3209098112 3209903239
+48285000000 48287415506 16095000000 16095805168 3210098112 3210903280
+48288000000 48290415725 16096000000 16096805241 3211098112 3211903353
+48291000000 48293415861 16097000000 16097805287 3212098112 3212903399
+48294000000 48296416012 16098000000 16098805337 3213098112 3213903449
+48297000000 48299416172 16099000000 16099805390 3214098112 3214903502
+48300000000 48302416293 16100000000 16100805431 3215098112 3215903543
+48303000000 48305416374 16101000000 16101805458 3216098112 3216903570
+48306000000 48308416582 16102000000 16102805527 3217098112 3217903639
+48309000000 48311416737 16103000000 16103805579 3218098112 3218903691
+48312000000 48314416896 16104000000 16104805632 3219098112 3219903744
+48315000000 48317417048 16105000000 16105805682 3220098112 3220903794
+48318000000 48320417170 16106000000 16106805723 3221098112 3221903835
+48321000000 48323417348 16107000000 16107805782 3222098112 3222903894
+48324000000 48326417497 16108000000 16108805832 3223098112 3223903944
+48327000000 48329417625 16109000000 16109805875 3224098112 3224903987
+48330000000 48332417794 16110000000 16110805931 3225098112 3225904043
+48333000000 48335417914 16111000000 16111805971 3226098112 3226904083
+48336000000 48338417841 16112000000 16112805947 3227098112 3227904059
+48339000000 48341418164 16113000000 16113806054 3228098112 3228904166
+48342000000 48344418417 16114000000 16114806139 3229098112 3229904251
+48345000000 48347418527 16115000000 16115806175 3230098112 3230904287
+48348000000 48350418706 16116000000 16116806235 3231098112 3231904347
+48351000000 48353418754 16117000000 16117806251 3232098112 3232904363
+48354000000 48356419008 16118000000 16118806336 3233098112 3233904448
+48357000000 48359419127 16119000000 16119806375 3234098112 3234904487
+48360000000 48362419298 16120000000 16120806432 3235098112 3235904544
+48363000000 48365419445 16121000000 16121806481 3236098112 3236904593
+48366000000 48368419598 16122000000 16122806532 3237098112 3237904644
+48369000000 48371419744 16123000000 16123806581 3238098112 3238904693
+48372000000 48374419888 16124000000 16124806629 3239098112 3239904741
+48375000000 48377420051 16125000000 16125806683 3240098112 3240904795
+48378000000 48380420203 16126000000 16126806734 3241098112 3241904846
+48381000000 48383420357 16127000000 16127806785 3242098112 3242904897
+48384000000 48386420477 16128000000 16128806825 3243098112 3243904937
+48387000000 48389420686 16129000000 16129806895 3244098112 3244905007
+48390000000 48392420816 16130000000 16130806938 3245098112 3245905050
+48393000000 48395420930 16131000000 16131806976 3246098112 3246905088
+48396000000 48398421091 16132000000 16132807030 3247098112 3247905142
+48399000000 48401421226 16133000000 16133807075 3248098112 3248905187
+48402000000 48404421369 16134000000 16134807123 3249098112 3249905235
+48405000000 48407421469 16135000000 16135807156 3250098112 3250905268
+48408000000 48410421703 16136000000 16136807234 3251098112 3251905346
+48411000000 48413421776 16137000000 16137807258 3252098112 3252905370
+48414000000 48416421897 16138000000 16138807299 3253098112 3253905411
+48417000000 48419422086 16139000000 16139807362 3254098112 3254905474
+48420000000 48422422240 16140000000 16140807413 3255098112 3255905525
+48423000000 48425422419 16141000000 16141807473 3256098112 3256905585
+48426000000 48428422565 16142000000 16142807521 3257098112 3257905633
+48429000000 48431422692 16143000000 16143807564 3258098112 3258905676
+48432000000 48434422866 16144000000 16144807622 3259098112 3259905734
+48435000000 48437422930 16145000000 16145807643 3260098112 3260905755
+48438000000 48440423137 16146000000 16146807712 3261098112 3261905824
+48441000000 48443423318 16147000000 16147807772 3262098112 3262905884
+48444000000 48446423467 16148000000 16148807822 3263098112 3263905934
+48447000000 48449423524 16149000000 16149807841 3264098112 3264905953
+48450000000 48452423720 16150000000 16150807906 3265098112 3265906018
+48453000000 48455423910 16151000000 16151807970 3266098112 3266906082
+48456000000 48458424055 16152000000 16152808018 3267098112 3267906130
+48459000000 48461424227 16153000000 16153808075 3268098112 3268906187
+48462000000 48464424360 16154000000 16154808120 3269098112 3269906232
+48465000000 48467424431 16155000000 16155808143 3270098112 3270906255
+48468000000 48470424657 16156000000 16156808219 3271098112 3271906331
+48471000000 48473424817 16157000000 16157808272 3272098112 3272906384
+48474000000 48476424949 16158000000 16158808316 3273098112 3273906428
+48477000000 48479425057 16159000000 16159808352 3274098112 3274906464
+48480000000 48482425268 16160000000 16160808422 3275098112 3275906534
+48483000000 48485425434 16161000000 16161808478 3276098112 3276906590
+48486000000 48488425545 16162000000 16162808515 3277098112 3277906627
+48489000000 48491425705 16163000000 16163808568 3278098112 3278906680
+48492000000 48494425817 16164000000 16164808605 3279098112 3279906717
+48495000000 48497426015 16165000000 16165808671 3280098112 3280906783
+48498000000 48500426105 16166000000 16166808701 3281098112 3281906813
+48501000000 48503426330 16167000000 16167808776 3282098112 3282906888
+48504000000 48506426462 16168000000 16168808820 3283098112 3283906932
+48507000000 48509426601 16169000000 16169808867 3284098112 3284906979
+48510000000 48512426652 16170000000 16170808884 3285098112 3285906996
+48513000000 48515426863 16171000000 16171808954 3286098112 3286907066
+48516000000 48518427072 16172000000 16172809024 3287098112 3287907136
+48519000000 48521427200 16173000000 16173809066 3288098112 3288907178
+48522000000 48524427343 16174000000 16174809114 3289098112 3289907226
+48525000000 48527427514 16175000000 16175809171 3290098112 3290907283
+48528000000 48530427611 16176000000 16176809203 3291098112 3291907315
+48531000000 48533427824 16177000000 16177809274 3292098112 3292907386
+48534000000 48536427954 16178000000 16178809318 3293098112 3293907430
+48537000000 48539428104 16179000000 16179809368 3294098112 3294907480
+48540000000 48542428264 16180000000 16180809421 3295098112 3295907533
+48543000000 48545428360 16181000000 16181809453 3296098112 3296907565
+48546000000 48548428548 16182000000 16182809516 3297098112 3297907628
+48549000000 48551428716 16183000000 16183809572 3298098112 3298907684
+48552000000 48554428852 16184000000 16184809617 3299098112 3299907729
+48555000000 48557429027 16185000000 16185809675 3300098112 3300907787
+48558000000 48560429149 16186000000 16186809716 3301098112 3301907828
+48561000000 48563429299 16187000000 16187809766 3302098112 3302907878
+48564000000 48566429447 16188000000 16188809815 3303098112 3303907927
+48567000000 48569429653 16189000000 16189809884 3304098112 3304907996
+48570000000 48572429767 16190000000 16190809922 3305098112 3305908034
+48573000000 48575429899 16191000000 16191809966 3306098112 3306908078
+48576000000 48578430073 16192000000 16192810024 3307098112 3307908136
+48579000000 48581430192 16193000000 16193810064 3308098112 3308908176
+48582000000 48584430316 16194000000 16194810105 3309098112 3309908217
+48585000000 48587430535 16195000000 16195810178 3310098112 3310908290
+48588000000 48590430671 16196000000 16196810223 3311098112 3311908335
+48591000000 48593430822 16197000000 16197810274 3312098112 3312908386
+48594000000 48596430982 16198000000 16198810327 3313098112 3313908439
+48597000000 48599431103 16199000000 16199810367 3314098112 3314908479
+48600000000 48602431184 16200000000 16200810394 3315098112 3315908506
+48603000000 48605431392 16201000000 16201810464 3316098112 3316908576
+48606000000 48608431547 16202000000 16202810515 3317098112 3317908627
+48609000000 48611431706 16203000000 16203810568 3318098112 3318908680
+48612000000 48614431858 16204000000 16204810619 3319098112 3319908731
+48615000000 48617431980 16205000000 16205810660 3320098112 3320908772
+48618000000 48620432158 16206000000 16206810719 3321098112 3321908831
+48621000000 48623432307 16207000000 16207810769 3322098112 3322908881
+48624000000 48626432435 16208000000 16208810811 3323098112 3323908923
+48627000000 48629432604 16209000000 16209810868 3324098112 3324908980
+48630000000 48632432724 16210000000 16210810908 3325098112 3325909020
+48633000000 48635432651 16211000000 16211810883 3326098112 3326908995
+48636000000 48638432974 16212000000 16212810991 3327098112 3327909103
+48639000000 48641433227 16213000000 16213811075 3328098112 3328909187
+48642000000 48644433337 16214000000 16214811112 3329098112 3329909224
+48645000000 48647433516 16215000000 16215811172 3330098112 3330909284
+48648000000 48650433564 16216000000 16216811188 3331098112 3331909300
+48651000000 48653433818 16217000000 16217811272 3332098112 3332909384
+48654000000 48656433937 16218000000 16218811312 3333098112 3333909424
+48657000000 48659434108 16219000000 16219811369 3334098112 3334909481
+48660000000 48662434255 16220000000 16220811418 3335098112 3335909530
+48663000000 48665434408 16221000000 16221811469 3336098112 3336909581
+48666000000 48668434554 16222000000 16222811518 3337098112 3337909630
+48669000000 48671434698 16223000000 16223811566 3338098112 3338909678
+48672000000 48674434861 16224000000 16224811620 3339098112 3339909732
+48675000000 48677435013 16225000000 16225811671 3340098112 3340909783
+48678000000 48680435167 16226000000 16226811722 3341098112 3341909834
+48681000000 48683435287 16227000000 16227811762 3342098112 3342909874
+48684000000 48686435496 16228000000 16228811832 3343098112 3343909944
+48687000000 48689435626 16229000000 16229811875 3344098112 3344909987
+48690000000 48692435740 16230000000 16230811913 3345098112 3345910025
+48693000000 48695435901 16231000000 16231811967 3346098112 3346910079
+48696000000 48698436036 16232000000 16232812012 3347098112 3347910124
+48699000000 48701436179 16233000000 16233812059 3348098112 3348910171
+48702000000 48704436279 16234000000 16234812093 3349098112 3349910205
+48705000000 48707436513 16235000000 16235812171 3350098112 3350910283
+48708000000 48710436586 16236000000 16236812195 3351098112 3351910307
+48711000000 48713436707 16237000000 16237812235 3352098112 3352910347
+48714000000 48716436896 16238000000 16238812298 3353098112 3353910410
+48717000000 48719437050 16239000000 16239812350 3354098112 3354910462
+48720000000 48722437229 16240000000 16240812409 3355098112 3355910521
+48723000000 48725437375 16241000000 16241812458 3356098112 3356910570
+48726000000 48728437502 16242000000 16242812500 3357098112 3357910612
+48729000000 48731437676 16243000000 16243812558 3358098112 3358910670
+48732000000 48734437740 16244000000 16244812580 3359098112 3359910692
+48735000000 48737437947 16245000000 16245812649 3360098112 3360910761
+48738000000 48740438128 16246000000 16246812709 3361098112 3361910821
+48741000000 48743438277 16247000000 16247812759 3362098112 3362910871
+48744000000 48746438334 16248000000 16248812778 3363098112 3363910890
+48747000000 48749438530 16249000000 16249812843 3364098112 3364910955
+48750000000 48752438720 16250000000 16250812906 3365098112 3365911018
+48753000000 48755438865 16251000000 16251812955 3366098112 3366911067
+48756000000 48758439037 16252000000 16252813012 3367098112 3367911124
+48759000000 48761439170 16253000000 16253813056 3368098112 3368911168
+48762000000 48764439241 16254000000 16254813080 3369098112 3369911192
+48765000000 48767439467 16255000000 16255813155 3370098112 3370911267
+48768000000 48770439627 16256000000 16256813209 3371098112 3371911321
+48771000000 48773439759 16257000000 16257813253 3372098112 3372911365
+48774000000 48776439867 16258000000 16258813289 3373098112 3373911401
+48777000000 48779440078 16259000000 16259813359 3374098112 3374911471
+48780000000 48782440244 16260000000 16260813414 3375098112 3375911526
+48783000000 48785440355 16261000000 16261813451 3376098112 3376911563
+48786000000 48788440515 16262000000 16262813505 3377098112 3377911617
+48789000000 48791440627 16263000000 16263813542 3378098112 3378911654
+48792000000 48794440825 16264000000 16264813608 3379098112 3379911720
+48795000000 48797440915 16265000000 16265813638 3380098112 3380911750
+48798000000 48800441140 16266000000 16266813713 3381098112 3381911825
+48801000000 48803441272 16267000000 16267813757 3382098112 3382911869
+48804000000 48806441411 16268000000 16268813803 3383098112 3383911915
+48807000000 48809441462 16269000000 16269813820 3384098112 3384911932
+48810000000 48812441673 16270000000 16270813891 3385098112 3385912003
+48813000000 48815441882 16271000000 16271813960 3386098112 3386912072
+48816000000 48818442010 16272000000 16272814003 3387098112 3387912115
+48819000000 48821442153 16273000000 16273814051 3388098112 3388912163
+48822000000 48824442324 16274000000 16274814108 3389098112 3389912220
+48825000000 48827442421 16275000000 16275814140 3390098112 3390912252
+48828000000 48830442634 16276000000 16276814211 3391098112 3391912323
+48831000000 48833442764 16277000000 16277814254 3392098112 3392912366
+48834000000 48836442914 16278000000 16278814304 3393098112 3393912416
+48837000000 48839443074 16279000000 16279814358 3394098112 3394912470
+48840000000 48842443170 16280000000 16280814390 3395098112 3395912502
+48843000000 48845443358 16281000000 16281814452 3396098112 3396912564
+48846000000 48848443526 16282000000 16282814508 3397098112 3397912620
+48849000000 48851443662 16283000000 16283814554 3398098112 3398912666
+48852000000 48854443837 16284000000 16284814612 3399098112 3399912724
+48855000000 48857443959 16285000000 16285814653 3400098112 3400912765
+48858000000 48860444109 16286000000 16286814703 3401098112 3401912815
+48861000000 48863444257 16287000000 16287814752 3402098112 3402912864
+48864000000 48866444463 16288000000 16288814821 3403098112 3403912933
+48867000000 48869444577 16289000000 16289814859 3404098112 3404912971
+48870000000 48872444709 16290000000 16290814903 3405098112 3405913015
+48873000000 48875444883 16291000000 16291814961 3406098112 3406913073
+48876000000 48878445002 16292000000 16292815000 3407098112 3407913112
+48879000000 48881445126 16293000000 16293815042 3408098112 3408913154
+48882000000 48884445345 16294000000 16294815115 3409098112 3409913227
+48885000000 48887445481 16295000000 16295815160 3410098112 3410913272
+48888000000 48890445632 16296000000 16296815210 3411098112 3411913322
+48891000000 48893445792 16297000000 16297815264 3412098112 3412913376
+48894000000 48896445913 16298000000 16298815304 3413098112 3413913416
+48897000000 48899445994 16299000000 16299815331 3414098112 3414913443
+48900000000 48902446202 16300000000 16300815400 3415098112 3415913512
+48903000000 48905446357 16301000000 16301815452 3416098112 3416913564
+48906000000 48908446516 16302000000 16302815505 3417098112 3417913617
+48909000000 48911446668 16303000000 16303815556 3418098112 3418913668
+48912000000 48914446790 16304000000 16304815596 3419098112 3419913708
+48915000000 48917446968 16305000000 16305815656 3420098112 3420913768
+48918000000 48920447117 16306000000 16306815705 3421098112 3421913817
+48921000000 48923447245 16307000000 16307815748 3422098112 3422913860
+48924000000 48926447414 16308000000 16308815804 3423098112 3423913916
+48927000000 48929447534 16309000000 16309815844 3424098112 3424913956
+48930000000 48932447461 16310000000 16310815820 3425098112 3425913932
+48933000000 48935447784 16311000000 16311815928 3426098112 3426914040
+48936000000 48938448037 16312000000 16312816012 3427098112 3427914124
+48939000000 48941448147 16313000000 16313816049 3428098112 3428914161
+48942000000 48944448326 16314000000 16314816108 3429098112 3429914220
+48945000000 48947448374 16315000000 16315816124 3430098112 3430914236
+48948000000 48950448628 16316000000 16316816209 3431098112 3431914321
+48951000000 48953448747 16317000000 16317816249 3432098112 3432914361
+48954000000 48956448918 16318000000 16318816306 3433098112 3433914418
+48957000000 48959449065 16319000000 16319816355 3434098112 3434914467
+48960000000 48962449218 16320000000 16320816406 3435098112 3435914518
+48963000000 48965449364 16321000000 16321816454 3436098112 3436914566
+48966000000 48968449508 16322000000 16322816502 3437098112 3437914614
+48969000000 48971449671 16323000000 16323816557 3438098112 3438914669
+48972000000 48974449823 16324000000 16324816607 3439098112 3439914719
+48975000000 48977449977 16325000000 16325816659 3440098112 3440914771
+48978000000 48980450097 16326000000 16326816699 3441098112 3441914811
+48981000000 48983450306 16327000000 16327816768 3442098112 3442914880
+48984000000 48986450436 16328000000 16328816812 3443098112 3443914924
+48987000000 48989450550 16329000000 16329816850 3444098112 3444914962
+48990000000 48992450711 16330000000 16330816903 3445098112 3445915015
+48993000000 48995450846 16331000000 16331816948 3446098112 3446915060
+48996000000 48998450989 16332000000 16332816996 3447098112 3447915108
+48999000000 49001451089 16333000000 16333817029 3448098112 3448915141
+49002000000 49004451323 16334000000 16334817107 3449098112 3449915219
+49005000000 49007451396 16335000000 16335817132 3450098112 3450915244
+49008000000 49010451517 16336000000 16336817172 3451098112 3451915284
+49011000000 49013451706 16337000000 16337817235 3452098112 3452915347
+49014000000 49016451860 16338000000 16338817286 3453098112 3453915398
+49017000000 49019452039 16339000000 16339817346 3454098112 3454915458
+49020000000 49022452185 16340000000 16340817395 3455098112 3455915507
+49023000000 49025452312 16341000000 16341817437 3456098112 3456915549
+49026000000 49028452486 16342000000 16342817495 3457098112 3457915607
+49029000000 49031452550 16343000000 16343817516 3458098112 3458915628
+49032000000 49034452757 16344000000 16344817585 3459098112 3459915697
+49035000000 49037452938 16345000000 16345817646 3460098112 3460915758
+49038000000 49040453087 16346000000 16346817695 3461098112 3461915807
+49041000000 49043453144 16347000000 16347817714 3462098112 3462915826
+49044000000 49046453340 16348000000 16348817780 3463098112 3463915892
+49047000000 49049453530 16349000000 16349817843 3464098112 3464915955
+49050000000 49052453675 16350000000 16350817891 3465098112 3465916003
+49053000000 49055453847 16351000000 16351817949 3466098112 3466916061
+49056000000 49058453980 16352000000 16352817993 3467098112 3467916105
+49059000000 49061454051 16353000000 16353818017 3468098112 3468916129
+49062000000 49064454277 16354000000 16354818092 3469098112 3469916204
+49065000000 49067454437 16355000000 16355818145 3470098112 3470916257
+49068000000 49070454569 16356000000 16356818189 3471098112 3471916301
+49071000000 49073454677 16357000000 16357818225 3472098112 3472916337
+49074000000 49076454888 16358000000 16358818296 3473098112 3473916408
+49077000000 49079455054 16359000000 16359818351 3474098112 3474916463
+49080000000 49082455165 16360000000 16360818388 3475098112 3475916500
+49083000000 49085455325 16361000000 16361818441 3476098112 3476916553
+49086000000 49088455437 16362000000 16362818479 3477098112 3477916591
+49089000000 49091455635 16363000000 16363818545 3478098112 3478916657
+49092000000 49094455725 16364000000 16364818575 3479098112 3479916687
+49095000000 49097455950 16365000000 16365818650 3480098112 3480916762
+49098000000 49100456082 16366000000 16366818694 3481098112 3481916806
+49101000000 49103456221 16367000000 16367818740 3482098112 3482916852
+49104000000 49106456272 16368000000 16368818757 3483098112 3483916869
+49107000000 49109456483 16369000000 16369818827 3484098112 3484916939
+49110000000 49112456692 16370000000 16370818897 3485098112 3485917009
+49113000000 49115456820 16371000000 16371818940 3486098112 3486917052
+49116000000 49118456963 16372000000 16372818987 3487098112 3487917099
+49119000000 49121457134 16373000000 16373819044 3488098112 3488917156
+49122000000 49124457231 16374000000 16374819077 3489098112 3489917189
+49125000000 49127457444 16375000000 16375819148 3490098112 3490917260
+49128000000 49130457574 16376000000 16376819191 3491098112 3491917303
+49131000000 49133457724 16377000000 16377819241 3492098112 3492917353
+49134000000 49136457884 16378000000 16378819294 3493098112 3493917406
+49137000000 49139457980 16379000000 16379819326 3494098112 3494917438
+49140000000 49142458168 16380000000 16380819389 3495098112 3495917501
+49143000000 49145458336 16381000000 16381819445 3496098112 3496917557
+49146000000 49148458472 16382000000 16382819490 3497098112 3497917602
+49149000000 49151458647 16383000000 16383819549 3498098112 3498917661
+49152000000 49154458769 16384000000 16384819589 3499098112 3499917701
+49155000000 49157458919 16385000000 16385819639 3500098112 3500917751
+49158000000 49160459067 16386000000 16386819689 3501098112 3501917801
+49161000000 49163459273 16387000000 16387819757 3502098112 3502917869
+49164000000 49166459387 16388000000 16388819795 3503098112 3503917907
+49167000000 49169459519 16389000000 16389819839 3504098112 3504917951
+49170000000 49172459693 16390000000 16390819897 3505098112 3505918009
+49173000000 49175459812 16391000000 16391819937 3506098112 3506918049
+49176000000 49178459936 16392000000 16392819978 3507098112 3507918090
+49179000000 49181460155 16393000000 16393820051 3508098112 3508918163
+49182000000 49184460291 16394000000 16394820097 3509098112 3509918209
+49185000000 49187460442 16395000000 16395820147 3510098112 3510918259
+49188000000 49190460602 16396000000 16396820200 3511098112 3511918312
+49191000000 49193460723 16397000000 16397820241 3512098112 3512918353
+49194000000 49196460804 16398000000 16398820268 3513098112 3513918380
+49197000000 49199461012 16399000000 16399820337 3514098112 3514918449
+49200000000 49202461167 16400000000 16400820389 3515098112 3515918501
+49203000000 49205461326 16401000000 16401820442 3516098112 3516918554
+49206000000 49208461478 16402000000 16402820492 3517098112 3517918604
+49209000000 49211461600 16403000000 16403820533 3518098112 3518918645
+49212000000 49214461778 16404000000 16404820592 3519098112 3519918704
+49215000000 49217461927 16405000000 16405820642 3520098112 3520918754
+49218000000 49220462055 16406000000 16406820685 3521098112 3521918797
+49221000000 49223462224 16407000000 16407820741 3522098112 3522918853
+49224000000 49226462344 16408000000 16408820781 3523098112 3523918893
+49227000000 49229462271 16409000000 16409820757 3524098112 3524918869
+49230000000 49232462594 16410000000 16410820864 3525098112 3525918976
+49233000000 49235462847 16411000000 16411820949 3526098112 3526919061
+49236000000 49238462957 16412000000 16412820985 3527098112 3527919097
+49239000000 49241463136 16413000000 16413821045 3528098112 3528919157
+49242000000 49244463184 16414000000 16414821061 3529098112 3529919173
+49245000000 49247463438 16415000000 16415821146 3530098112 3530919258
+49248000000 49250463557 16416000000 16416821185 3531098112 3531919297
+49251000000 49253463728 16417000000 16417821242 3532098112 3532919354
+49254000000 49256463875 16418000000 16418821291 3533098112 3533919403
+49257000000 49259464028 16419000000 16419821342 3534098112 3534919454
+49260000000 49262464174 16420000000 16420821391 3535098112 3535919503
+49263000000 49265464318 16421000000 16421821439 3536098112 3536919551
+49266000000 49268464481 16422000000 16422821493 3537098112 3537919605
+49269000000 49271464633 16423000000 16423821544 3538098112 3538919656
+49272000000 49274464787 16424000000 16424821595 3539098112 3539919707
+49275000000 49277464907 16425000000 16425821635 3540098112 3540919747
+49278000000 49280465116 16426000000 16426821705 3541098112 3541919817
+49281000000 49283465246 16427000000 16427821748 3542098112 3542919860
+49284000000 49286465360 16428000000 16428821786 3543098112 3543919898
+49287000000 49289465521 16429000000 16429821840 3544098112 3544919952
+49290000000 49292465656 16430000000 16430821885 3545098112 3545919997
+49293000000 49295465799 16431000000 16431821933 3546098112 3546920045
+49296000000 49298465899 16432000000 16432821966 3547098112 3547920078
+49299000000 49301466133 16433000000 16433822044 3548098112 3548920156
+49302000000 49304466206 16434000000 16434822068 3549098112 3549920180
+49305000000 49307466327 16435000000 16435822109 3550098112 3550920221
+49308000000 49310466516 16436000000 16436822172 3551098112 3551920284
+49311000000 49313466670 16437000000 16437822223 3552098112 3552920335
+49314000000 49316466849 16438000000 16438822283 3553098112 3553920395
+49317000000 49319466995 16439000000 16439822331 3554098112 3554920443
+49320000000 49322467122 16440000000 16440822374 3555098112 3555920486
+49323000000 49325467296 16441000000 16441822432 3556098112 3556920544
+49326000000 49328467360 16442000000 16442822453 3557098112 3557920565
+49329000000 49331467567 16443000000 16443822522 3558098112 3558920634
+49332000000 49334467748 16444000000 16444822582 3559098112 3559920694
+49335000000 49337467897 16445000000 16445822632 3560098112 3560920744
+49338000000 49340467954 16446000000 16446822651 3561098112 3561920763
+49341000000 49343468150 16447000000 16447822716 3562098112 3562920828
+49344000000 49346468340 16448000000 16448822780 3563098112 3563920892
+49347000000 49349468485 16449000000 16449822828 3564098112 3564920940
+49350000000 49352468657 16450000000 16450822885 3565098112 3565920997
+49353000000 49355468790 16451000000 16451822930 3566098112 3566921042
+49356000000 49358468861 16452000000 16452822953 3567098112 3567921065
+49359000000 49361469087 16453000000 16453823029 3568098112 3568921141
+49362000000 49364469247 16454000000 16454823082 3569098112 3569921194
+49365000000 49367469379 16455000000 16455823126 3570098112 3570921238
+49368000000 49370469487 16456000000 16456823162 3571098112 3571921274
+49371000000 49373469698 16457000000 16457823232 3572098112 3572921344
+49374000000 49376469864 16458000000 16458823288 3573098112 3573921400
+49377000000 49379469975 16459000000 16459823325 3574098112 3574921437
+49380000000 49382470135 16460000000 16460823378 3575098112 3575921490
+49383000000 49385470247 16461000000 16461823415 3576098112 3576921527
+49386000000 49388470445 16462000000 16462823481 3577098112 3577921593
+49389000000 49391470535 16463000000 16463823511 3578098112 3578921623
+49392000000 49394470760 16464000000 16464823586 3579098112 3579921698
+49395000000 49397470892 16465000000 16465823630 3580098112 3580921742
+49398000000 49400471031 16466000000 16466823677 3581098112 3581921789
+49401000000 49403471082 16467000000 16467823694 3582098112 3582921806
+49404000000 49406471293 16468000000 16468823764 3583098112 3583921876
+49407000000 49409471502 16469000000 16469823834 3584098112 3584921946
+49410000000 49412471630 16470000000 16470823876 3585098112 3585921988
+49413000000 49415471773 16471000000 16471823924 3586098112 3586922036
+49416000000 49418471944 16472000000 16472823981 3587098112 3587922093
+49419000000 49421472041 16473000000 16473824013 3588098112 3588922125
+49422000000 49424472254 16474000000 16474824084 3589098112 3589922196
+49425000000 49427472384 16475000000 16475824128 3590098112 3590922240
+49428000000 49430472534 16476000000 16476824178 3591098112 3591922290
+49431000000 49433472694 16477000000 16477824231 3592098112 3592922343
+49434000000 49436472790 16478000000 16478824263 3593098112 3593922375
+49437000000 49439472978 16479000000 16479824326 3594098112 3594922438
+49440000000 49442473146 16480000000 16480824382 3595098112 3595922494
+49443000000 49445473282 16481000000 16481824427 3596098112 3596922539
+49446000000 49448473457 16482000000 16482824485 3597098112 3597922597
+49449000000 49451473579 16483000000 16483824526 3598098112 3598922638
+49452000000 49454473729 16484000000 16484824576 3599098112 3599922688
+49455000000 49457473877 16485000000 16485824625 3600098112 3600922737
+49458000000 49460474083 16486000000 16486824694 3601098112 3601922806
+49461000000 49463474197 16487000000 16487824732 3602098112 3602922844
+49464000000 49466474329 16488000000 16488824776 3603098112 3603922888
+49467000000 49469474503 16489000000 16489824834 3604098112 3604922946
+49470000000 49472474622 16490000000 16490824874 3605098112 3605922986
+49473000000 49475474746 16491000000 16491824915 3606098112 3606923027
+49476000000 49478474965 16492000000 16492824988 3607098112 3607923100
+49479000000 49481475101 16493000000 16493825033 3608098112 3608923145
+49482000000 49484475252 16494000000 16494825084 3609098112 3609923196
+49485000000 49487475412 16495000000 16495825137 3610098112 3610923249
+49488000000 49490475533 16496000000 16496825177 3611098112 3611923289
+49491000000 49493475614 16497000000 16497825204 3612098112 3612923316
+49494000000 49496475822 16498000000 16498825274 3613098112 3613923386
+49497000000 49499475977 16499000000 16499825325 3614098112 3614923437
+49500000000 49502476136 16500000000 16500825378 3615098112 3615923490
+49503000000 49505476288 16501000000 16501825429 3616098112 3616923541
+49506000000 49508476410 16502000000 16502825470 3617098112 3617923582
+49509000000 49511476588 16503000000 16503825529 3618098112 3618923641
+49512000000 49514476737 16504000000 16504825579 3619098112 3619923691
+49515000000 49517476865 16505000000 16505825621 3620098112 3620923733
+49518000000 49520477034 16506000000 16506825678 3621098112 3621923790
+49521000000 49523477154 16507000000 16507825718 3622098112 3622923830
+49524000000 49526477081 16508000000 16508825693 3623098112 3623923805
+49527000000 49529477404 16509000000 16509825801 3624098112 3624923913
+49530000000 49532477657 16510000000 16510825885 3625098112 3625923997
+49533000000 49535477767 16511000000 16511825922 3626098112 3626924034
+49536000000 49538477946 16512000000 16512825982 3627098112 3627924094
+49539000000 49541477994 16513000000 16513825998 3628098112 3628924110
+49542000000 49544478248 16514000000 16514826082 3629098112 3629924194
+49545000000 49547478367 16515000000 16515826122 3630098112 3630924234
+49548000000 49550478538 16516000000 16516826179 3631098112 3631924291
+49551000000 49553478685 16517000000 16517826228 3632098112 3632924340
+49554000000 49556478838 16518000000 16518826279 3633098112 3633924391
+49557000000 49559478984 16519000000 16519826328 3634098112 3634924440
+49560000000 49562479128 16520000000 16520826376 3635098112 3635924488
+49563000000 49565479291 16521000000 16521826430 3636098112 3636924542
+49566000000 49568479443 16522000000 16522826481 3637098112 3637924593
+49569000000 49571479597 16523000000 16523826532 3638098112 3638924644
+49572000000 49574479717 16524000000 16524826572 3639098112 3639924684
+49575000000 49577479926 16525000000 16525826642 3640098112 3640924754
+49578000000 49580480056 16526000000 16526826685 3641098112 3641924797
+49581000000 49583480170 16527000000 16527826723 3642098112 3642924835
+49584000000 49586480331 16528000000 16528826777 3643098112 3643924889
+49587000000 49589480466 16529000000 16529826822 3644098112 3644924934
+49590000000 49592480609 16530000000 16530826869 3645098112 3645924981
+49593000000 49595480709 16531000000 16531826903 3646098112 3646925015
+49596000000 49598480943 16532000000 16532826981 3647098112 3647925093
+49599000000 49601481016 16533000000 16533827005 3648098112 3648925117
+49602000000 49604481137 16534000000 16534827045 3649098112 3649925157
+49605000000 49607481326 16535000000 16535827108 3650098112 3650925220
+49608000000 49610481480 16536000000 16536827160 3651098112 3651925272
+49611000000 49613481659 16537000000 16537827219 3652098112 3652925331
+49614000000 49616481805 16538000000 16538827268 3653098112 3653925380
+49617000000 49619481932 16539000000 16539827310 3654098112 3654925422
+49620000000 49622482106 16540000000 16540827368 3655098112 3655925480
+49623000000 49625482170 16541000000 16541827390 3656098112 3656925502
+49626000000 49628482377 16542000000 16542827459 3657098112 3657925571
+49629000000 49631482558 16543000000 16543827519 3658098112 3658925631
+49632000000 49634482707 16544000000 16544827569 3659098112 3659925681
+49635000000 49637482764 16545000000 16545827588 3660098112 3660925700
+49638000000 49640482960 16546000000 16546827653 3661098112 3661925765
+49641000000 49643483150 16547000000 16547827716 3662098112 3662925828
+49644000000 49646483295 16548000000 16548827765 3663098112 3663925877
+49647000000 49649483467 16549000000 16549827822 3664098112 3664925934
+49650000000 49652483600 16550000000 16550827866 3665098112 3665925978
+49653000000 49655483671 16551000000 16551827890 3666098112 3666926002
+49656000000 49658483897 16552000000 16552827965 3667098112 3667926077
+49659000000 49661484057 16553000000 16553828019 3668098112 3668926131
+49662000000 49664484189 16554000000 16554828063 3669098112 3669926175
+49665000000 49667484297 16555000000 16555828099 3670098112 3670926211
+49668000000 49670484508 16556000000 16556828169 3671098112 3671926281
+49671000000 49673484674 16557000000 16557828224 3672098112 3672926336
+49674000000 49676484785 16558000000 16558828261 3673098112 3673926373
+49677000000 49679484945 16559000000 16559828315 3674098112 3674926427
+49680000000 49682485057 16560000000 16560828352 3675098112 3675926464
+49683000000 49685485255 16561000000 16561828418 3676098112 3676926530
+49686000000 49688485345 16562000000 16562828448 3677098112 3677926560
+49689000000 49691485570 16563000000 16563828523 3678098112 3678926635
+49692000000 49694485702 16564000000 16564828567 3679098112 3679926679
+49695000000 49697485841 16565000000 16565828613 3680098112 3680926725
+49698000000 49700485892 16566000000 16566828630 3681098112 3681926742
+49701000000 49703486103 16567000000 16567828701 3682098112 3682926813
+49704000000 49706486312 16568000000 16568828770 3683098112 3683926882
+49707000000 49709486440 16569000000 16569828813 3684098112 3684926925
+49710000000 49712486583 16570000000 16570828861 3685098112 3685926973
+49713000000 49715486754 16571000000 16571828918 3686098112 3686927030
+49716000000 49718486851 16572000000 16572828950 3687098112 3687927062
+49719000000 49721487064 16573000000 16573829021 3688098112 3688927133
+49722000000 49724487194 16574000000 16574829064 3689098112 3689927176
+49725000000 49727487344 16575000000 16575829114 3690098112 3690927226
+49728000000 49730487504 16576000000 16576829168 3691098112 3691927280
+49731000000 49733487600 16577000000 16577829200 3692098112 3692927312
+49734000000 49736487788 16578000000 16578829262 3693098112 3693927374
+49737000000 49739487956 16579000000 16579829318 3694098112 3694927430
+49740000000 49742488092 16580000000 16580829364 3695098112 3695927476
+49743000000 49745488267 16581000000 16581829422 3696098112 3696927534
+49746000000 49748488389 16582000000 16582829463 3697098112 3697927575
+49749000000 49751488539 16583000000 16583829513 3698098112 3698927625
+49752000000 49754488687 16584000000 16584829562 3699098112 3699927674
+49755000000 49757488893 16585000000 16585829631 3700098112 3700927743
+49758000000 49760489007 16586000000 16586829669 3701098112 3701927781
+49761000000 49763489139 16587000000 16587829713 3702098112 3702927825
+49764000000 49766489313 16588000000 16588829771 3703098112 3703927883
+49767000000 49769489432 16589000000 16589829810 3704098112 3704927922
+49770000000 49772489556 16590000000 16590829852 3705098112 3705927964
+49773000000 49775489775 16591000000 16591829925 3706098112 3706928037
+49776000000 49778489911 16592000000 16592829970 3707098112 3707928082
+49779000000 49781490062 16593000000 16593830020 3708098112 3708928132
+49782000000 49784490222 16594000000 16594830074 3709098112 3709928186
+49785000000 49787490343 16595000000 16595830114 3710098112 3710928226
+49788000000 49790490424 16596000000 16596830141 3711098112 3711928253
+49791000000 49793490632 16597000000 16597830210 3712098112 3712928322
+49794000000 49796490787 16598000000 16598830262 3713098112 3713928374
+49797000000 49799490946 16599000000 16599830315 3714098112 3714928427
+49800000000 49802491098 16600000000 16600830366 3715098112 3715928478
+49803000000 49805491220 16601000000 16601830406 3716098112 3716928518
+49806000000 49808491398 16602000000 16602830466 3717098112 3717928578
+49809000000 49811491547 16603000000 16603830515 3718098112 3718928627
+49812000000 49814491675 16604000000 16604830558 3719098112 3719928670
+49815000000 49817491844 16605000000 16605830614 3720098112 3720928726
+49818000000 49820491964 16606000000 16606830654 3721098112 3721928766
+49821000000 49823491891 16607000000 16607830630 3722098112 3722928742
+49824000000 49826492214 16608000000 16608830738 3723098112 3723928850
+49827000000 49829492467 16609000000 16609830822 3724098112 3724928934
+49830000000 49832492577 16610000000 16610830859 3725098112 3725928971
+49833000000 49835492756 16611000000 16611830918 3726098112 3726929030
+49836000000 49838492804 16612000000 16612830934 3727098112 3727929046
+49839000000 49841493058 16613000000 16613831019 3728098112 3728929131
+49842000000 49844493177 16614000000 16614831059 3729098112 3729929171
+49845000000 49847493348 16615000000 16615831116 3730098112 3730929228
+49848000000 49850493495 16616000000 16616831165 3731098112 3731929277
+49851000000 49853493648 16617000000 16617831216 3732098112 3732929328
+49854000000 49856493794 16618000000 16618831264 3733098112 3733929376
+49857000000 49859493938 16619000000 16619831312 3734098112 3734929424
+49860000000 49862494101 16620000000 16620831367 3735098112 3735929479
+49863000000 49865494253 16621000000 16621831417 3736098112 3736929529
+49866000000 49868494407 16622000000 16622831469 3737098112 3737929581
+49869000000 49871494527 16623000000 16623831509 3738098112 3738929621
+49872000000 49874494736 16624000000 16624831578 3739098112 3739929690
+49875000000 49877494866 16625000000 16625831622 3740098112 3740929734
+49878000000 49880494980 16626000000 16626831660 3741098112 3741929772
+49881000000 49883495141 16627000000 16627831713 3742098112 3742929825
+49884000000 49886495276 16628000000 16628831758 3743098112 3743929870
+49887000000 49889495419 16629000000 16629831806 3744098112 3744929918
+49890000000 49892495519 16630000000 16630831839 3745098112 3745929951
+49893000000 49895495753 16631000000 16631831917 3746098112 3746930029
+49896000000 49898495826 16632000000 16632831942 3747098112 3747930054
+49899000000 49901495947 16633000000 16633831982 3748098112 3748930094
+49902000000 49904496136 16634000000 16634832045 3749098112 3749930157
+49905000000 49907496290 16635000000 16635832096 3750098112 3750930208
+49908000000 49910496469 16636000000 16636832156 3751098112 3751930268
+49911000000 49913496615 16637000000 16637832205 3752098112 3752930317
+49914000000 49916496742 16638000000 16638832247 3753098112 3753930359
+49917000000 49919496916 16639000000 16639832305 3754098112 3754930417
+49920000000 49922496980 16640000000 16640832326 3755098112 3755930438
+49923000000 49925497187 16641000000 16641832395 3756098112 3756930507
+49926000000 49928497368 16642000000 16642832456 3757098112 3757930568
+49929000000 49931497517 16643000000 16643832505 3758098112 3758930617
+49932000000 49934497574 16644000000 16644832524 3759098112 3759930636
+49935000000 49937497770 16645000000 16645832590 3760098112 3760930702
+49938000000 49940497960 16646000000 16646832653 3761098112 3761930765
+49941000000 49943498105 16647000000 16647832701 3762098112 3762930813
+49944000000 49946498277 16648000000 16648832759 3763098112 3763930871
+49947000000 49949498410 16649000000 16649832803 3764098112 3764930915
+49950000000 49952498481 16650000000 16650832827 3765098112 3765930939
+49953000000 49955498707 16651000000 16651832902 3766098112 3766931014
+49956000000 49958498867 16652000000 16652832955 3767098112 3767931067
+49959000000 49961498999 16653000000 16653832999 3768098112 3768931111
+49962000000 49964499107 16654000000 16654833035 3769098112 3769931147
+49965000000 49967499318 16655000000 16655833106 3770098112 3770931218
+49968000000 49970499484 16656000000 16656833161 3771098112 3771931273
+49971000000 49973499595 16657000000 16657833198 3772098112 3772931310
+49974000000 49976499755 16658000000 16658833251 3773098112 3773931363
+49977000000 49979499867 16659000000 16659833289 3774098112 3774931401
+49980000000 49982500065 16660000000 16660833355 3775098112 3775931467
+49983000000 49985500155 16661000000 16661833385 3776098112 3776931497
+49986000000 49988500380 16662000000 16662833460 3777098112 3777931572
+49989000000 49991500512 16663000000 16663833504 3778098112 3778931616
+49992000000 49994500651 16664000000 16664833550 3779098112 3779931662
+49995000000 49997500702 16665000000 16665833567 3780098112 3780931679
+49998000000 50000500913 16666000000 16666833637 3781098112 3781931749
+50001000000 50003501122 16667000000 16667833707 3782098112 3782931819
+50004000000 50006501250 16668000000 16668833750 3783098112 3783931862
+50007000000 50009501393 16669000000 16669833797 3784098112 3784931909
+50010000000 50012501564 16670000000 16670833854 3785098112 3785931966
+50013000000 50015501661 16671000000 16671833887 3786098112 3786931999
+50016000000 50018501874 16672000000 16672833958 3787098112 3787932070
+50019000000 50021502004 16673000000 16673834001 3788098112 3788932113
+50022000000 50024502154 16674000000 16674834051 3789098112 3789932163
+50025000000 50027502314 16675000000 16675834104 3790098112 3790932216
+50028000000 50030502410 16676000000 16676834136 3791098112 3791932248
+50031000000 50033502598 16677000000 16677834199 3792098112 3792932311
+50034000000 50036502766 16678000000 16678834255 3793098112 3793932367
+50037000000 50039502902 16679000000 16679834300 3794098112 3794932412
+50040000000 50042503077 16680000000 16680834359 3795098112 3795932471
+50043000000 50045503199 16681000000 16681834399 3796098112 3796932511
+50046000000 50048503349 16682000000 16682834449 3797098112 3797932561
+50049000000 50051503497 16683000000 16683834499 3798098112 3798932611
+50052000000 50054503703 16684000000 16684834567 3799098112 3799932679
+50055000000 50057503817 16685000000 16685834605 3800098112 3800932717
+50058000000 50060503949 16686000000 16686834649 3801098112 3801932761
+50061000000 50063504123 16687000000 16687834707 3802098112 3802932819
+50064000000 50066504242 16688000000 16688834747 3803098112 3803932859
+50067000000 50069504366 16689000000 16689834788 3804098112 3804932900
+50070000000 50072504585 16690000000 16690834861 3805098112 3805932973
+50073000000 50075504721 16691000000 16691834907 3806098112 3806933019
+50076000000 50078504872 16692000000 16692834957 3807098112 3807933069
+50079000000 50081505032 16693000000 16693835010 3808098112 3808933122
+50082000000 50084505153 16694000000 16694835051 3809098112 3809933163
+50085000000 50087505234 16695000000 16695835078 3810098112 3810933190
+50088000000 50090505442 16696000000 16696835147 3811098112 3811933259
+50091000000 50093505597 16697000000 16697835199 3812098112 3812933311
+50094000000 50096505756 16698000000 16698835252 3813098112 3813933364
+50097000000 50099505908 16699000000 16699835302 3814098112 3814933414
+50100000000 50102506030 16700000000 16700835343 3815098112 3815933455
+50103000000 50105506208 16701000000 16701835402 3816098112 3816933514
+50106000000 50108506357 16702000000 16702835452 3817098112 3817933564
+50109000000 50111506485 16703000000 16703835495 3818098112 3818933607
+50112000000 50114506654 16704000000 16704835551 3819098112 3819933663
+50115000000 50117506774 16705000000 16705835591 3820098112 3820933703
+50118000000 50120506701 16706000000 16706835567 3821098112 3821933679
+50121000000 50123507024 16707000000 16707835674 3822098112 3822933786
+50124000000 50126507277 16708000000 16708835759 3823098112 3823933871
+50127000000 50129507387 16709000000 16709835795 3824098112 3824933907
+50130000000 50132507566 16710000000 16710835855 3825098112 3825933967
+50133000000 50135507614 16711000000 16711835871 3826098112 3826933983
+50136000000 50138507868 16712000000 16712835956 3827098112 3827934068
+50139000000 50141507987 16713000000 16713835995 3828098112 3828934107
+50142000000 50144508158 16714000000 16714836052 3829098112 3829934164
+50145000000 50147508305 16715000000 16715836101 3830098112 3830934213
+50148000000 50150508458 16716000000 16716836152 3831098112 3831934264
+50151000000 50153508604 16717000000 16717836201 3832098112 3832934313
+50154000000 50156508748 16718000000 16718836249 3833098112 3833934361
+50157000000 50159508911 16719000000 16719836303 3834098112 3834934415
+50160000000 50162509063 16720000000 16720836354 3835098112 3835934466
+50163000000 50165509217 16721000000 16721836405 3836098112 3836934517
+50166000000 50168509337 16722000000 16722836445 3837098112 3837934557
+50169000000 50171509546 16723000000 16723836515 3838098112 3838934627
+50172000000 50174509676 16724000000 16724836558 3839098112 3839934670
+50175000000 50177509790 16725000000 16725836596 3840098112 3840934708
+50178000000 50180509951 16726000000 16726836650 3841098112 3841934762
+50181000000 50183510086 16727000000 16727836695 3842098112 3842934807
+50184000000 50186510229 16728000000 16728836743 3843098112 3843934855
+50187000000 50189510329 16729000000 16729836776 3844098112 3844934888
+50190000000 50192510563 16730000000 16730836854 3845098112 3845934966
+50193000000 50195510636 16731000000 16731836878 3846098112 3846934990
+50196000000 50198510757 16732000000 16732836919 3847098112 3847935031
+50199000000 50201510946 16733000000 16733836982 3848098112 3848935094
+50202000000 50204511100 16734000000 16734837033 3849098112 3849935145
+50205000000 50207511279 16735000000 16735837093 3850098112 3850935205
+50208000000 50210511425 16736000000 16736837141 3851098112 3851935253
+50211000000 50213511552 16737000000 16737837184 3852098112 3852935296
+50214000000 50216511726 16738000000 16738837242 3853098112 3853935354
+50217000000 50219511790 16739000000 16739837263 3854098112 3854935375
+50220000000 50222511997 16740000000 16740837332 3855098112 3855935444
+50223000000 50225512178 16741000000 16741837392 3856098112 3856935504
+50226000000 50228512327 16742000000 16742837442 3857098112 3857935554
+50229000000 50231512384 16743000000 16743837461 3858098112 3858935573
+50232000000 50234512580 16744000000 16744837526 3859098112 3859935638
+50235000000 50237512770 16745000000 16745837590 3860098112 3860935702
+50238000000 50240512915 16746000000 16746837638 3861098112 3861935750
+50241000000 50243513087 16747000000 16747837695 3862098112 3862935807
+50244000000 50246513220 16748000000 16748837740 3863098112 3863935852
+50247000000 50249513291 16749000000 16749837763 3864098112 3864935875
+50250000000 50252513517 16750000000 16750837839 3865098112 3865935951
+50253000000 50255513677 16751000000 16751837892 3866098112 3866936004
+50256000000 50258513809 16752000000 16752837936 3867098112 3867936048
+50259000000 50261513917 16753000000 16753837972 3868098112 3868936084
+50262000000 50264514128 16754000000 16754838042 3869098112 3869936154
+50265000000 50267514294 16755000000 16755838098 3870098112 3870936210
+50268000000 50270514405 16756000000 16756838135 3871098112 3871936247
+50271000000 50273514565 16757000000 16757838188 3872098112 3872936300
+50274000000 50276514677 16758000000 16758838225 3873098112 3873936337
+50277000000 50279514875 16759000000 16759838291 3874098112 3874936403
+50280000000 50282514965 16760000000 16760838321 3875098112 3875936433
+50283000000 50285515190 16761000000 16761838396 3876098112 3876936508
+50286000000 50288515322 16762000000 16762838440 3877098112 3877936552
+50289000000 50291515461 16763000000 16763838487 3878098112 3878936599
+50292000000 50294515512 16764000000 16764838504 3879098112 3879936616
+50295000000 50297515723 16765000000 16765838574 3880098112 3880936686
+50298000000 50300515932 16766000000 16766838644 3881098112 3881936756
+50301000000 50303516060 16767000000 16767838686 3882098112 3882936798
+50304000000 50306516203 16768000000 16768838734 3883098112 3883936846
+50307000000 50309516374 16769000000 16769838791 3884098112 3884936903
+50310000000 50312516471 16770000000 16770838823 3885098112 3885936935
+50313000000 50315516684 16771000000 16771838894 3886098112 3886937006
+50316000000 50318516814 16772000000 16772838938 3887098112 3887937050
+50319000000 50321516964 16773000000 16773838988 3888098112 3888937100
+50322000000 50324517124 16774000000 16774839041 3889098112 3889937153
+50325000000 50327517220 16775000000 16775839073 3890098112 3890937185
+50328000000 50330517408 16776000000 16776839136 3891098112 3891937248
+50331000000 50333517576 16777000000 16777839192 3892098112 3892937304
+50334000000 50336517712 16778000000 16778839237 3893098112 3893937349
+50337000000 50339517887 16779000000 16779839295 3894098112 3894937407
+50340000000 50342518009 16780000000 16780839336 3895098112 3895937448
+50343000000 50345518159 16781000000 16781839386 3896098112 3896937498
+50346000000 50348518307 16782000000 16782839435 3897098112 3897937547
+50349000000 50351518513 16783000000 16783839504 3898098112 3898937616
+50352000000 50354518627 16784000000 16784839542 3899098112 3899937654
+50355000000 50357518759 16785000000 16785839586 3900098112 3900937698
+50358000000 50360518933 16786000000 16786839644 3901098112 3901937756
+50361000000 50363519052 16787000000 16787839684 3902098112 3902937796
+50364000000 50366519176 16788000000 16788839725 3903098112 3903937837
+50367000000 50369519395 16789000000 16789839798 3904098112 3904937910
+50370000000 50372519531 16790000000 16790839843 3905098112 3905937955
+50373000000 50375519682 16791000000 16791839894 3906098112 3906938006
+50376000000 50378519842 16792000000 16792839947 3907098112 3907938059
+50379000000 50381519963 16793000000 16793839987 3908098112 3908938099
+50382000000 50384520044 16794000000 16794840014 3909098112 3909938126
+50385000000 50387520252 16795000000 16795840084 3910098112 3910938196
+50388000000 50390520407 16796000000 16796840135 3911098112 3911938247
+50391000000 50393520566 16797000000 16797840188 3912098112 3912938300
+50394000000 50396520718 16798000000 16798840239 3913098112 3913938351
+50397000000 50399520840 16799000000 16799840280 3914098112 3914938392
+50400000000 50402521018 16800000000 16800840339 3915098112 3915938451
+50403000000 50405521167 16801000000 16801840389 3916098112 3916938501
+50406000000 50408521295 16802000000 16802840431 3917098112 3917938543
+50409000000 50411521464 16803000000 16803840488 3918098112 3918938600
+50412000000 50414521584 16804000000 16804840528 3919098112 3919938640
+50415000000 50417521511 16805000000 16805840503 3920098112 3920938615
+50418000000 50420521834 16806000000 16806840611 3921098112 3921938723
+50421000000 50423522087 16807000000 16807840695 3922098112 3922938807
+50424000000 50426522197 16808000000 16808840732 3923098112 3923938844
+50427000000 50429522376 16809000000 16809840792 3924098112 3924938904
+50430000000 50432522424 16810000000 16810840808 3925098112 3925938920
+50433000000 50435522678 16811000000 16811840892 3926098112 3926939004
+50436000000 50438522797 16812000000 16812840932 3927098112 3927939044
+50439000000 50441522968 16813000000 16813840989 3928098112 3928939101
+50442000000 50444523115 16814000000 16814841038 3929098112 3929939150
+50445000000 50447523268 16815000000 16815841089 3930098112 3930939201
+50448000000 50450523414 16816000000 16816841138 3931098112 3931939250
+50451000000 50453523558 16817000000 16817841186 3932098112 3932939298
+50454000000 50456523721 16818000000 16818841240 3933098112 3933939352
+50457000000 50459523873 16819000000 16819841291 3934098112 3934939403
+50460000000 50462524027 16820000000 16820841342 3935098112 3935939454
+50463000000 50465524147 16821000000 16821841382 3936098112 3936939494
+50466000000 50468524356 16822000000 16822841452 3937098112 3937939564
+50469000000 50471524486 16823000000 16823841495 3938098112 3938939607
+50472000000 50474524600 16824000000 16824841533 3939098112 3939939645
+50475000000 50477524761 16825000000 16825841587 3940098112 3940939699
+50478000000 50480524896 16826000000 16826841632 3941098112 3941939744
+50481000000 50483525039 16827000000 16827841679 3942098112 3942939791
+50484000000 50486525139 16828000000 16828841713 3943098112 3943939825
+50487000000 50489525373 16829000000 16829841791 3944098112 3944939903
+50490000000 50492525446 16830000000 16830841815 3945098112 3945939927
+50493000000 50495525567 16831000000 16831841855 3946098112 3946939967
+50496000000 50498525756 16832000000 16832841918 3947098112 3947940030
+50499000000 50501525910 16833000000 16833841970 3948098112 3948940082
+50502000000 50504526089 16834000000 16834842029 3949098112 3949940141
+50505000000 50507526235 16835000000 16835842078 3950098112 3950940190
+50508000000 50510526362 16836000000 16836842120 3951098112 3951940232
+50511000000 50513526536 16837000000 16837842178 3952098112 3952940290
+50514000000 50516526600 16838000000 16838842200 3953098112 3953940312
+50517000000 50519526807 16839000000 16839842269 3954098112 3954940381
+50520000000 50522526988 16840000000 16840842329 3955098112 3955940441
+50523000000 50525527137 16841000000 16841842379 3956098112 3956940491
+50526000000 50528527194 16842000000 16842842398 3957098112 3957940510
+50529000000 50531527390 16843000000 16843842463 3958098112 3958940575
+50532000000 50534527580 16844000000 16844842526 3959098112 3959940638
+50535000000 50537527725 16845000000 16845842575 3960098112 3960940687
+50538000000 50540527897 16846000000 16846842632 3961098112 3961940744
+50541000000 50543528030 16847000000 16847842676 3962098112 3962940788
+50544000000 50546528101 16848000000 16848842700 3963098112 3963940812
+50547000000 50549528327 16849000000 16849842775 3964098112 3964940887
+50550000000 50552528487 16850000000 16850842829 3965098112 3965940941
+50553000000 50555528619 16851000000 16851842873 3966098112 3966940985
+50556000000 50558528727 16852000000 16852842909 3967098112 3967941021
+50559000000 50561528938 16853000000 16853842979 3968098112 3968941091
+50562000000 50564529104 16854000000 16854843034 3969098112 3969941146
+50565000000 50567529215 16855000000 16855843071 3970098112 3970941183
+50568000000 50570529375 16856000000 16856843125 3971098112 3971941237
+50571000000 50573529487 16857000000 16857843162 3972098112 3972941274
+50574000000 50576529685 16858000000 16858843228 3973098112 3973941340
+50577000000 50579529775 16859000000 16859843258 3974098112 3974941370
+50580000000 50582530000 16860000000 16860843333 3975098112 3975941445
+50583000000 50585530132 16861000000 16861843377 3976098112 3976941489
+50586000000 50588530271 16862000000 16862843423 3977098112 3977941535
+50589000000 50591530322 16863000000 16863843440 3978098112 3978941552
+50592000000 50594530533 16864000000 16864843511 3979098112 3979941623
+50595000000 50597530742 16865000000 16865843580 3980098112 3980941692
+50598000000 50600530870 16866000000 16866843623 3981098112 3981941735
+50601000000 50603531013 16867000000 16867843671 3982098112 3982941783
+50604000000 50606531184 16868000000 16868843728 3983098112 3983941840
+50607000000 50609531281 16869000000 16869843760 3984098112 3984941872
+50610000000 50612531494 16870000000 16870843831 3985098112 3985941943
+50613000000 50615531624 16871000000 16871843874 3986098112 3986941986
+50616000000 50618531774 16872000000 16872843924 3987098112 3987942036
+50619000000 50621531934 16873000000 16873843978 3988098112 3988942090
+50622000000 50624532030 16874000000 16874844010 3989098112 3989942122
+50625000000 50627532218 16875000000 16875844072 3990098112 3990942184
+50628000000 50630532386 16876000000 16876844128 3991098112 3991942240
+50631000000 50633532522 16877000000 16877844174 3992098112 3992942286
+50634000000 50636532697 16878000000 16878844232 3993098112 3993942344
+50637000000 50639532819 16879000000 16879844273 3994098112 3994942385
+50640000000 50642532969 16880000000 16880844323 3995098112 3995942435
+50643000000 50645533117 16881000000 16881844372 3996098112 3996942484
+50646000000 50648533323 16882000000 16882844441 3997098112 3997942553
+50649000000 50651533437 16883000000 16883844479 3998098112 3998942591
+50652000000 50654533569 16884000000 16884844523 3999098112 3999942635
+50655000000 50657533743 16885000000 16885844581 4000098112 4000942693
+50658000000 50660533862 16886000000 16886844620 4001098112 4001942732
+50661000000 50663533986 16887000000 16887844662 4002098112 4002942774
+50664000000 50666534205 16888000000 16888844735 4003098112 4003942847
+50667000000 50669534341 16889000000 16889844780 4004098112 4004942892
+50670000000 50672534492 16890000000 16890844830 4005098112 4005942942
+50673000000 50675534652 16891000000 16891844884 4006098112 4006942996
+50676000000 50678534773 16892000000 16892844924 4007098112 4007943036
+50679000000 50681534854 16893000000 16893844951 4008098112 4008943063
+50682000000 50684535062 16894000000 16894845020 4009098112 4009943132
+50685000000 50687535217 16895000000 16895845072 4010098112 4010943184
+50688000000 50690535376 16896000000 16896845125 4011098112 4011943237
+50691000000 50693535528 16897000000 16897845176 4012098112 4012943288
+50694000000 50696535650 16898000000 16898845216 4013098112 4013943328
+50697000000 50699535828 16899000000 16899845276 4014098112 4014943388
+50700000000 50702535977 16900000000 16900845325 4015098112 4015943437
+50703000000 50705536105 16901000000 16901845368 4016098112 4016943480
+50706000000 50708536274 16902000000 16902845424 4017098112 4017943536
+50709000000 50711536394 16903000000 16903845464 4018098112 4018943576
+50712000000 50714536321 16904000000 16904845440 4019098112 4019943552
+50715000000 50717536644 16905000000 16905845548 4020098112 4020943660
+50718000000 50720536897 16906000000 16906845632 4021098112 4021943744
+50721000000 50723537007 16907000000 16907845669 4022098112 4022943781
+50724000000 50726537186 16908000000 16908845728 4023098112 4023943840
+50727000000 50729537234 16909000000 16909845744 4024098112 4024943856
+50730000000 50732537488 16910000000 16910845829 4025098112 4025943941
+50733000000 50735537607 16911000000 16911845869 4026098112 4026943981
+50736000000 50738537778 16912000000 16912845926 4027098112 4027944038
+50739000000 50741537925 16913000000 16913845975 4028098112 4028944087
+50742000000 50744538078 16914000000 16914846026 4029098112 4029944138
+50745000000 50747538224 16915000000 16915846074 4030098112 4030944186
+50748000000 50750538368 16916000000 16916846122 4031098112 4031944234
+50751000000 50753538531 16917000000 16917846177 4032098112 4032944289
+50754000000 50756538683 16918000000 16918846227 4033098112 4033944339
+50757000000 50759538837 16919000000 16919846279 4034098112 4034944391
+50760000000 50762538957 16920000000 16920846319 4035098112 4035944431
+50763000000 50765539166 16921000000 16921846388 4036098112 4036944500
+50766000000 50768539296 16922000000 16922846432 4037098112 4037944544
+50769000000 50771539410 16923000000 16923846470 4038098112 4038944582
+50772000000 50774539571 16924000000 16924846523 4039098112 4039944635
+50775000000 50777539706 16925000000 16925846568 4040098112 4040944680
+50778000000 50780539849 16926000000 16926846616 4041098112 4041944728
+50781000000 50783539949 16927000000 16927846649 4042098112 4042944761
+50784000000 50786540183 16928000000 16928846727 4043098112 4043944839
+50787000000 50789540256 16929000000 16929846752 4044098112 4044944864
+50790000000 50792540377 16930000000 16930846792 4045098112 4045944904
+50793000000 50795540566 16931000000 16931846855 4046098112 4046944967
+50796000000 50798540720 16932000000 16932846906 4047098112 4047945018
+50799000000 50801540899 16933000000 16933846966 4048098112 4048945078
+50802000000 50804541045 16934000000 16934847015 4049098112 4049945127
+50805000000 50807541172 16935000000 16935847057 4050098112 4050945169
+50808000000 50810541346 16936000000 16936847115 4051098112 4051945227
+50811000000 50813541410 16937000000 16937847136 4052098112 4052945248
+50814000000 50816541617 16938000000 16938847205 4053098112 4053945317
+50817000000 50819541798 16939000000 16939847266 4054098112 4054945378
+50820000000 50822541947 16940000000 16940847315 4055098112 4055945427
+50823000000 50825542004 16941000000 16941847334 4056098112 4056945446
+50826000000 50828542200 16942000000 16942847400 4057098112 4057945512
+50829000000 50831542390 16943000000 16943847463 4058098112 4058945575
+50832000000 50834542535 16944000000 16944847511 4059098112 4059945623
+50835000000 50837542707 16945000000 16945847569 4060098112 4060945681
+50838000000 50840542840 16946000000 16946847613 4061098112 4061945725
+50841000000 50843542911 16947000000 16947847637 4062098112 4062945749
+50844000000 50846543137 16948000000 16948847712 4063098112 4063945824
+50847000000 50849543297 16949000000 16949847765 4064098112 4064945877
+50850000000 50852543429 16950000000 16950847809 4065098112 4065945921
+50853000000 50855543537 16951000000 16951847845 4066098112 4066945957
+50856000000 50858543748 16952000000 16952847916 4067098112 4067946028
+50859000000 50861543914 16953000000 16953847971 4068098112 4068946083
+50862000000 50864544025 16954000000 16954848008 4069098112 4069946120
+50865000000 50867544185 16955000000 16955848061 4070098112 4070946173
+50868000000 50870544297 16956000000 16956848099 4071098112 4071946211
+50871000000 50873544495 16957000000 16957848165 4072098112 4072946277
+50874000000 50876544585 16958000000 16958848195 4073098112 4073946307
+50877000000 50879544810 16959000000 16959848270 4074098112 4074946382
+50880000000 50882544942 16960000000 16960848314 4075098112 4075946426
+50883000000 50885545081 16961000000 16961848360 4076098112 4076946472
+50886000000 50888545132 16962000000 16962848377 4077098112 4077946489
+50889000000 50891545343 16963000000 16963848447 4078098112 4078946559
+50892000000 50894545552 16964000000 16964848517 4079098112 4079946629
+50895000000 50897545680 16965000000 16965848560 4080098112 4080946672
+50898000000 50900545823 16966000000 16966848607 4081098112 4081946719
+50901000000 50903545994 16967000000 16967848664 4082098112 4082946776
+50904000000 50906546091 16968000000 16968848697 4083098112 4083946809
+50907000000 50909546304 16969000000 16969848768 4084098112 4084946880
+50910000000 50912546434 16970000000 16970848811 4085098112 4085946923
+50913000000 50915546584 16971000000 16971848861 4086098112 4086946973
+50916000000 50918546744 16972000000 16972848914 4087098112 4087947026
+50919000000 50921546840 16973000000 16973848946 4088098112 4088947058
+50922000000 50924547028 16974000000 16974849009 4089098112 4089947121
+50925000000 50927547196 16975000000 16975849065 4090098112 4090947177
+50928000000 50930547332 16976000000 16976849110 4091098112 4091947222
+50931000000 50933547507 16977000000 16977849169 4092098112 4092947281
+50934000000 50936547629 16978000000 16978849209 4093098112 4093947321
+50937000000 50939547779 16979000000 16979849259 4094098112 4094947371
+50940000000 50942547927 16980000000 16980849309 4095098112 4095947421
+50943000000 50945548133 16981000000 16981849377 4096098112 4096947489
+50946000000 50948548247 16982000000 16982849415 4097098112 4097947527
+50949000000 50951548379 16983000000 16983849459 4098098112 4098947571
+50952000000 50954548553 16984000000 16984849517 4099098112 4099947629
+50955000000 50957548672 16985000000 16985849557 4100098112 4100947669
+50958000000 50960548796 16986000000 16986849598 4101098112 4101947710
+50961000000 50963549015 16987000000 16987849671 4102098112 4102947783
+50964000000 50966549151 16988000000 16988849717 4103098112 4103947829
+50967000000 50969549302 16989000000 16989849767 4104098112 4104947879
+50970000000 50972549462 16990000000 16990849820 4105098112 4105947932
+50973000000 50975549583 16991000000 16991849861 4106098112 4106947973
+50976000000 50978549664 16992000000 16992849888 4107098112 4107948000
+50979000000 50981549872 16993000000 16993849957 4108098112 4108948069
+50982000000 50984550027 16994000000 16994850009 4109098112 4109948121
+50985000000 50987550186 16995000000 16995850062 4110098112 4110948174
+50988000000 50990550338 16996000000 16996850112 4111098112 4111948224
+50991000000 50993550460 16997000000 16997850153 4112098112 4112948265
+50994000000 50996550638 16998000000 16998850212 4113098112 4113948324
+50997000000 50999550787 16999000000 16999850262 4114098112 4114948374
+51000000000 51002550915 17000000000 17000850305 4115098112 4115948417
+51003000000 51005551084 17001000000 17001850361 4116098112 4116948473
+51006000000 51008551204 17002000000 17002850401 4117098112 4117948513
+51009000000 51011551131 17003000000 17003850377 4118098112 4118948489
+51012000000 51014551454 17004000000 17004850484 4119098112 4119948596
+51015000000 51017551707 17005000000 17005850569 4120098112 4120948681
+51018000000 51020551817 17006000000 17006850605 4121098112 4121948717
+51021000000 51023551996 17007000000 17007850665 4122098112 4122948777
+51024000000 51026552044 17008000000 17008850681 4123098112 4123948793
+51027000000 51029552298 17009000000 17009850766 4124098112 4124948878
+51030000000 51032552417 17010000000 17010850805 4125098112 4125948917
+51033000000 51035552588 17011000000 17011850862 4126098112 4126948974
+51036000000 51038552735 17012000000 17012850911 4127098112 4127949023
+51039000000 51041552888 17013000000 17013850962 4128098112 4128949074
+51042000000 51044553034 17014000000 17014851011 4129098112 4129949123
+51045000000 51047553178 17015000000 17015851059 4130098112 4130949171
+51048000000 51050553341 17016000000 17016851113 4131098112 4131949225
+51051000000 51053553493 17017000000 17017851164 4132098112 4132949276
+51054000000 51056553647 17018000000 17018851215 4133098112 4133949327
+51057000000 51059553767 17019000000 17019851255 4134098112 4134949367
+51060000000 51062553976 17020000000 17020851325 4135098112 4135949437
+51063000000 51065554106 17021000000 17021851368 4136098112 4136949480
+51066000000 51068554220 17022000000 17022851406 4137098112 4137949518
+51069000000 51071554381 17023000000 17023851460 4138098112 4138949572
+51072000000 51074554516 17024000000 17024851505 4139098112 4139949617
+51075000000 51077554659 17025000000 17025851553 4140098112 4140949665
+51078000000 51080554759 17026000000 17026851586 4141098112 4141949698
+51081000000 51083554993 17027000000 17027851664 4142098112 4142949776
+51084000000 51086555066 17028000000 17028851688 4143098112 4143949800
+51087000000 51089555187 17029000000 17029851729 4144098112 4144949841
+51090000000 51092555376 17030000000 17030851792 4145098112 4145949904
+51093000000 51095555530 17031000000 17031851843 4146098112 4146949955
+51096000000 51098555709 17032000000 17032851903 4147098112 4147950015
+51099000000 51101555855 17033000000 17033851951 4148098112 4148950063
+51102000000 51104555982 17034000000 17034851994 4149098112 4149950106
+51105000000 51107556156 17035000000 17035852052 4150098112 4150950164
+51108000000 51110556220 17036000000 17036852073 4151098112 4151950185
+51111000000 51113556427 17037000000 17037852142 4152098112 4152950254
+51114000000 51116556608 17038000000 17038852202 4153098112 4153950314
+51117000000 51119556757 17039000000 17039852252 4154098112 4154950364
+51120000000 51122556814 17040000000 17040852271 4155098112 4155950383
+51123000000 51125557010 17041000000 17041852336 4156098112 4156950448
+51126000000 51128557200 17042000000 17042852400 4157098112 4157950512
+51129000000 51131557345 17043000000 17043852448 4158098112 4158950560
+51132000000 51134557517 17044000000 17044852505 4159098112 4159950617
+51135000000 51137557650 17045000000 17045852550 4160098112 4160950662
+51138000000 51140557721 17046000000 17046852573 4161098112 4161950685
+51141000000 51143557947 17047000000 17047852649 4162098112 4162950761
+51144000000 51146558107 17048000000 17048852702 4163098112 4163950814
+51147000000 51149558239 17049000000 17049852746 4164098112 4164950858
+51150000000 51152558347 17050000000 17050852782 4165098112 4165950894
+51153000000 51155558558 17051000000 17051852852 4166098112 4166950964
+51156000000 51158558724 17052000000 17052852908 4167098112 4167951020
+51159000000 51161558835 17053000000 17053852945 4168098112 4168951057
+51162000000 51164558995 17054000000 17054852998 4169098112 4169951110
+51165000000 51167559107 17055000000 17055853035 4170098112 4170951147
+51168000000 51170559305 17056000000 17056853101 4171098112 4171951213
+51171000000 51173559395 17057000000 17057853131 4172098112 4172951243
+51174000000 51176559620 17058000000 17058853206 4173098112 4173951318
+51177000000 51179559752 17059000000 17059853250 4174098112 4174951362
+51180000000 51182559891 17060000000 17060853297 4175098112 4175951409
+51183000000 51185559942 17061000000 17061853314 4176098112 4176951426
+51186000000 51188560153 17062000000 17062853384 4177098112 4177951496
+51189000000 51191560362 17063000000 17063853454 4178098112 4178951566
+51192000000 51194560490 17064000000 17064853496 4179098112 4179951608
+51195000000 51197560633 17065000000 17065853544 4180098112 4180951656
+51198000000 51200560804 17066000000 17066853601 4181098112 4181951713
+51201000000 51203560901 17067000000 17067853633 4182098112 4182951745
+51204000000 51206561114 17068000000 17068853704 4183098112 4183951816
+51207000000 51209561244 17069000000 17069853748 4184098112 4184951860
+51210000000 51212561394 17070000000 17070853798 4185098112 4185951910
+51213000000 51215561554 17071000000 17071853851 4186098112 4186951963
+51216000000 51218561650 17072000000 17072853883 4187098112 4187951995
+51219000000 51221561838 17073000000 17073853946 4188098112 4188952058
+51222000000 51224562006 17074000000 17074854002 4189098112 4189952114
+51225000000 51227562142 17075000000 17075854047 4190098112 4190952159
+51228000000 51230562317 17076000000 17076854105 4191098112 4191952217
+51231000000 51233562439 17077000000 17077854146 4192098112 4192952258
+51234000000 51236562589 17078000000 17078854196 4193098112 4193952308
+51237000000 51239562737 17079000000 17079854245 4194098112 4194952357
+51240000000 51242562943 17080000000 17080854314 4195098112 4195952426
+51243000000 51245563057 17081000000 17081854352 4196098112 4196952464
+51246000000 51248563189 17082000000 17082854396 4197098112 4197952508
+51249000000 51251563363 17083000000 17083854454 4198098112 4198952566
+51252000000 51254563482 17084000000 17084854494 4199098112 4199952606
+51255000000 51257563606 17085000000 17085854535 4200098112 4200952647
+51258000000 51260563825 17086000000 17086854608 4201098112 4201952720
+51261000000 51263563961 17087000000 17087854653 4202098112 4202952765
+51264000000 51266564112 17088000000 17088854704 4203098112 4203952816
+51267000000 51269564272 17089000000 17089854757 4204098112 4204952869
+51270000000 51272564393 17090000000 17090854797 4205098112 4205952909
+51273000000 51275564474 17091000000 17091854824 4206098112 4206952936
+51276000000 51278564682 17092000000 17092854894 4207098112 4207953006
+51279000000 51281564837 17093000000 17093854945 4208098112 4208953057
+51282000000 51284564996 17094000000 17094854998 4209098112 4209953110
+51285000000 51287565148 17095000000 17095855049 4210098112 4210953161
+51288000000 51290565270 17096000000 17096855090 4211098112 4211953202
+51291000000 51293565448 17097000000 17097855149 4212098112 4212953261
+51294000000 51296565597 17098000000 17098855199 4213098112 4213953311
+51297000000 51299565725 17099000000 17099855241 4214098112 4214953353
+51300000000 51302565894 17100000000 17100855298 4215098112 4215953410
+51303000000 51305566014 17101000000 17101855338 4216098112 4216953450
+51306000000 51308565941 17102000000 17102855313 4217098112 4217953425
+51309000000 51311566264 17103000000 17103855421 4218098112 4218953533
+51312000000 51314566517 17104000000 17104855505 4219098112 4219953617
+51315000000 51317566627 17105000000 17105855542 4220098112 4220953654
+51318000000 51320566806 17106000000 17106855602 4221098112 4221953714
+51321000000 51323566854 17107000000 17107855618 4222098112 4222953730
+51324000000 51326567108 17108000000 17108855702 4223098112 4223953814
+51327000000 51329567227 17109000000 17109855742 4224098112 4224953854
+51330000000 51332567398 17110000000 17110855799 4225098112 4225953911
+51333000000 51335567545 17111000000 17111855848 4226098112 4226953960
+51336000000 51338567698 17112000000 17112855899 4227098112 4227954011
+51339000000 51341567844 17113000000 17113855948 4228098112 4228954060
+51342000000 51344567988 17114000000 17114855996 4229098112 4229954108
+51345000000 51347568151 17115000000 17115856050 4230098112 4230954162
+51348000000 51350568303 17116000000 17116856101 4231098112 4231954213
+51351000000 51353568457 17117000000 17117856152 4232098112 4232954264
+51354000000 51356568577 17118000000 17118856192 4233098112 4233954304
+51357000000 51359568786 17119000000 17119856262 4234098112 4234954374
+51360000000 51362568916 17120000000 17120856305 4235098112 4235954417
+51363000000 51365569030 17121000000 17121856343 4236098112 4236954455
+51366000000 51368569191 17122000000 17122856397 4237098112 4237954509
+51369000000 51371569326 17123000000 17123856442 4238098112 4238954554
+51372000000 51374569469 17124000000 17124856489 4239098112 4239954601
+51375000000 51377569569 17125000000 17125856523 4240098112 4240954635
+51378000000 51380569803 17126000000 17126856601 4241098112 4241954713
+51381000000 51383569876 17127000000 17127856625 4242098112 4242954737
+51384000000 51386569997 17128000000 17128856665 4243098112 4243954777
+51387000000 51389570186 17129000000 17129856728 4244098112 4244954840
+51390000000 51392570340 17130000000 17130856780 4245098112 4245954892
+51393000000 51395570519 17131000000 17131856839 4246098112 4246954951
+51396000000 51398570665 17132000000 17132856888 4247098112 4247955000
+51399000000 51401570792 17133000000 17133856930 4248098112 4248955042
+51402000000 51404570966 17134000000 17134856988 4249098112 4249955100
+51405000000 51407571030 17135000000 17135857010 4250098112 4250955122
+51408000000 51410571237 17136000000 17136857079 4251098112 4251955191
+51411000000 51413571418 17137000000 17137857139 4252098112 4252955251
+51414000000 51416571567 17138000000 17138857189 4253098112 4253955301
+51417000000 51419571624 17139000000 17139857208 4254098112 4254955320
+51420000000 51422571820 17140000000 17140857273 4255098112 4255955385
+51423000000 51425572010 17141000000 17141857336 4256098112 4256955448
+51426000000 51428572155 17142000000 17142857385 4257098112 4257955497
+51429000000 51431572327 17143000000 17143857442 4258098112 4258955554
+51432000000 51434572460 17144000000 17144857486 4259098112 4259955598
+51435000000 51437572531 17145000000 17145857510 4260098112 4260955622
+51438000000 51440572757 17146000000 17146857585 4261098112 4261955697
+51441000000 51443572917 17147000000 17147857639 4262098112 4262955751
+51444000000 51446573049 17148000000 17148857683 4263098112 4263955795
+51447000000 51449573157 17149000000 17149857719 4264098112 4264955831
+51450000000 51452573368 17150000000 17150857789 4265098112 4265955901
+51453000000 51455573534 17151000000 17151857844 4266098112 4266955956
+51456000000 51458573645 17152000000 17152857881 4267098112 4267955993
+51459000000 51461573805 17153000000 17153857935 4268098112 4268956047
+51462000000 51464573917 17154000000 17154857972 4269098112 4269956084
+51465000000 51467574115 17155000000 17155858038 4270098112 4270956150
+51468000000 51470574205 17156000000 17156858068 4271098112 4271956180
+51471000000 51473574430 17157000000 17157858143 4272098112 4272956255
+51474000000 51476574562 17158000000 17158858187 4273098112 4273956299
+51477000000 51479574701 17159000000 17159858233 4274098112 4274956345
+51480000000 51482574752 17160000000 17160858250 4275098112 4275956362
+51483000000 51485574963 17161000000 17161858321 4276098112 4276956433
+51486000000 51488575172 17162000000 17162858390 4277098112 4277956502
+51489000000 51491575300 17163000000 17163858433 4278098112 4278956545
+51492000000 51494575443 17164000000 17164858481 4279098112 4279956593
+51495000000 51497575614 17165000000 17165858538 4280098112 4280956650
+51498000000 51500575711 17166000000 17166858570 4281098112 4281956682
+51501000000 51503575924 17167000000 17167858641 4282098112 4282956753
+51504000000 51506576054 17168000000 17168858684 4283098112 4283956796
+51507000000 51509576204 17169000000 17169858734 4284098112 4284956846
+51510000000 51512576364 17170000000 17170858788 4285098112 4285956900
+51513000000 51515576460 17171000000 17171858820 4286098112 4286956932
+51516000000 51518576648 17172000000 17172858882 4287098112 4287956994
+51519000000 51521576816 17173000000 17173858938 4288098112 4288957050
+51522000000 51524576952 17174000000 17174858984 4289098112 4289957096
+51525000000 51527577127 17175000000 17175859042 4290098112 4290957154
+51528000000 51530577249 17176000000 17176859083 4291098112 4291957195
+51531000000 51533577399 17177000000 17177859133 4292098112 4292957245
+51534000000 51536577547 17178000000 17178859182 4293098112 4293957294
+51537000000 51539577753 17179000000 17179859251 4294098112 4294957363
+51540000000 51542577867 17180000000 17180859289 130816 990105
+51543000000 51545577999 17181000000 17181859333 1130816 1990149
+51546000000 51548578173 17182000000 17182859391 2130816 2990207
+51549000000 51551578292 17183000000 17183859430 3130816 3990246
+51552000000 51554578416 17184000000 17184859472 4130816 4990288
+51555000000 51557578635 17185000000 17185859545 5130816 5990361
+51558000000 51560578771 17186000000 17186859590 6130816 6990406
+51561000000 51563578922 17187000000 17187859640 7130816 7990456
+51564000000 51566579082 17188000000 17188859694 8130816 8990510
+51567000000 51569579203 17189000000 17189859734 9130816 9990550
+51570000000 51572579284 17190000000 17190859761 10130816 10990577
+51573000000 51575579492 17191000000 17191859830 11130816 11990646
+51576000000 51578579647 17192000000 17192859882 12130816 12990698
+51579000000 51581579806 17193000000 17193859935 13130816 13990751
+51582000000 51584579958 17194000000 17194859986 14130816 14990802
+51585000000 51587580080 17195000000 17195860026 15130816 15990842
+51588000000 51590580258 17196000000 17196860086 16130816 16990902
+51591000000 51593580407 17197000000 17197860135 17130816 17990951
+51594000000 51596580535 17198000000 17198860178 18130816 18990994
+51597000000 51599580704 17199000000 17199860234 19130816 19991050
+51600000000 51602580824 17200000000 17200860274 20130816 20991090
+51603000000 51605580751 17201000000 17201860250 21130816 21991066
+51606000000 51608581074 17202000000 17202860358 22130816 22991174
+51609000000 51611581327 17203000000 17203860442 23130816 23991258
+51612000000 51614581437 17204000000 17204860479 24130816 24991295
+51615000000 51617581616 17205000000 17205860538 25130816 25991354
+51618000000 51620581664 17206000000 17206860554 26130816 26991370
+51621000000 51623581918 17207000000 17207860639 27130816 27991455
+51624000000 51626582037 17208000000 17208860679 28130816 28991495
+51627000000 51629582208 17209000000 17209860736 29130816 29991552
+51630000000 51632582355 17210000000 17210860785 30130816 30991601
+51633000000 51635582508 17211000000 17211860836 31130816 31991652
+51636000000 51638582654 17212000000 17212860884 32130816 32991700
+51639000000 51641582798 17213000000 17213860932 33130816 33991748
+51642000000 51644582961 17214000000 17214860987 34130816 34991803
+51645000000 51647583113 17215000000 17215861037 35130816 35991853
+51648000000 51650583267 17216000000 17216861089 36130816 36991905
+51651000000 51653583387 17217000000 17217861129 37130816 37991945
+51654000000 51656583596 17218000000 17218861198 38130816 38992014
+51657000000 51659583726 17219000000 17219861242 39130816 39992058
+51660000000 51662583840 17220000000 17220861280 40130816 40992096
+51663000000 51665584001 17221000000 17221861333 41130816 41992149
+51666000000 51668584136 17222000000 17222861378 42130816 42992194
+51669000000 51671584279 17223000000 17223861426 43130816 43992242
+51672000000 51674584379 17224000000 17224861459 44130816 44992275
+51675000000 51677584613 17225000000 17225861537 45130816 45992353
+51678000000 51680584686 17226000000 17226861562 46130816 46992378
+51681000000 51683584807 17227000000 17227861602 47130816 47992418
+51684000000 51686584996 17228000000 17228861665 48130816 48992481
+51687000000 51689585150 17229000000 17229861716 49130816 49992532
+51690000000 51692585329 17230000000 17230861776 50130816 50992592
+51693000000 51695585475 17231000000 17231861825 51130816 51992641
+51696000000 51698585602 17232000000 17232861867 52130816 52992683
+51699000000 51701585776 17233000000 17233861925 53130816 53992741
+51702000000 51704585840 17234000000 17234861946 54130816 54992762
+51705000000 51707586047 17235000000 17235862015 55130816 55992831
+51708000000 51710586228 17236000000 17236862076 56130816 56992892
+51711000000 51713586377 17237000000 17237862125 57130816 57992941
+51714000000 51716586434 17238000000 17238862144 58130816 58992960
+51717000000 51719586630 17239000000 17239862210 59130816 59993026
+51720000000 51722586820 17240000000 17240862273 60130816 60993089
+51723000000 51725586965 17241000000 17241862321 61130816 61993137
+51726000000 51728587137 17242000000 17242862379 62130816 62993195
+51729000000 51731587270 17243000000 17243862423 63130816 63993239
+51732000000 51734587341 17244000000 17244862447 64130816 64993263
+51735000000 51737587567 17245000000 17245862522 65130816 65993338
+51738000000 51740587727 17246000000 17246862575 66130816 66993391
+51741000000 51743587859 17247000000 17247862619 67130816 67993435
+51744000000 51746587967 17248000000 17248862655 68130816 68993471
+51747000000 51749588178 17249000000 17249862726 69130816 69993542
+51750000000 51752588344 17250000000 17250862781 70130816 70993597
+51753000000 51755588455 17251000000 17251862818 71130816 71993634
+51756000000 51758588615 17252000000 17252862871 72130816 72993687
+51759000000 51761588727 17253000000 17253862909 73130816 73993725
+51762000000 51764588925 17254000000 17254862975 74130816 74993791
+51765000000 51767589015 17255000000 17255863005 75130816 75993821
+51768000000 51770589240 17256000000 17256863080 76130816 76993896
+51771000000 51773589372 17257000000 17257863124 77130816 77993940
+51774000000 51776589511 17258000000 17258863170 78130816 78993986
+51777000000 51779589562 17259000000 17259863187 79130816 79994003
+51780000000 51782589773 17260000000 17260863257 80130816 80994073
+51783000000 51785589982 17261000000 17261863327 81130816 81994143
+51786000000 51788590110 17262000000 17262863370 82130816 82994186
+51789000000 51791590253 17263000000 17263863417 83130816 83994233
+51792000000 51794590424 17264000000 17264863474 84130816 84994290
+51795000000 51797590521 17265000000 17265863507 85130816 85994323
+51798000000 51800590734 17266000000 17266863578 86130816 86994394
+51801000000 51803590864 17267000000 17267863621 87130816 87994437
+51804000000 51806591014 17268000000 17268863671 88130816 88994487
+51807000000 51809591174 17269000000 17269863724 89130816 89994540
+51810000000 51812591270 17270000000 17270863756 90130816 90994572
+51813000000 51815591458 17271000000 17271863819 91130816 91994635
+51816000000 51818591626 17272000000 17272863875 92130816 92994691
+51819000000 51821591762 17273000000 17273863920 93130816 93994736
+51822000000 51824591937 17274000000 17274863979 94130816 94994795
+51825000000 51827592059 17275000000 17275864019 95130816 95994835
+51828000000 51830592209 17276000000 17276864069 96130816 96994885
+51831000000 51833592357 17277000000 17277864119 97130816 97994935
+51834000000 51836592563 17278000000 17278864187 98130816 98995003
+51837000000 51839592677 17279000000 17279864225 99130816 99995041
+51840000000 51842592809 17280000000 17280864269 100130816 100995085
+51843000000 51845592983 17281000000 17281864327 101130816 101995143
+51846000000 51848593102 17282000000 17282864367 102130816 102995183
+51849000000 51851593226 17283000000 17283864408 103130816 103995224
+51852000000 51854593445 17284000000 17284864481 104130816 104995297
+51855000000 51857593581 17285000000 17285864527 105130816 105995343
+51858000000 51860593732 17286000000 17286864577 106130816 106995393
+51861000000 51863593892 17287000000 17287864630 107130816 107995446
+51864000000 51866594013 17288000000 17288864671 108130816 108995487
+51867000000 51869594094 17289000000 17289864698 109130816 109995514
+51870000000 51872594302 17290000000 17290864767 110130816 110995583
+51873000000 51875594457 17291000000 17291864819 111130816 111995635
+51876000000 51878594616 17292000000 17292864872 112130816 112995688
+51879000000 51881594768 17293000000 17293864922 113130816 113995738
+51882000000 51884594890 17294000000 17294864963 114130816 114995779
+51885000000 51887595068 17295000000 17295865022 115130816 115995838
+51888000000 51890595217 17296000000 17296865072 116130816 116995888
+51891000000 51893595345 17297000000 17297865115 117130816 117995931
+51894000000 51896595514 17298000000 17298865171 118130816 118995987
+51897000000 51899595634 17299000000 17299865211 119130816 119996027
+51900000000 51902595561 17300000000 17300865187 120130816 120996003
+51903000000 51905595884 17301000000 17301865294 121130816 121996110
+51906000000 51908596137 17302000000 17302865379 122130816 122996195
+51909000000 51911596247 17303000000 17303865415 123130816 123996231
+51912000000 51914596426 17304000000 17304865475 124130816 124996291
+51915000000 51917596474 17305000000 17305865491 125130816 125996307
+51918000000 51920596728 17306000000 17306865576 126130816 126996392
+51921000000 51923596847 17307000000 17307865615 127130816 127996431
+51924000000 51926597018 17308000000 17308865672 128130816 128996488
+51927000000 51929597165 17309000000 17309865721 129130816 129996537
+51930000000 51932597318 17310000000 17310865772 130130816 130996588
+51933000000 51935597464 17311000000 17311865821 131130816 131996637
+51936000000 51938597608 17312000000 17312865869 132130816 132996685
+51939000000 51941597771 17313000000 17313865923 133130816 133996739
+51942000000 51944597923 17314000000 17314865974 134130816 134996790
+51945000000 51947598077 17315000000 17315866025 135130816 135996841
+51948000000 51950598197 17316000000 17316866065 136130816 136996881
+51951000000 51953598406 17317000000 17317866135 137130816 137996951
+51954000000 51956598536 17318000000 17318866178 138130816 138996994
+51957000000 51959598650 17319000000 17319866216 139130816 139997032
+51960000000 51962598811 17320000000 17320866270 140130816 140997086
+51963000000 51965598946 17321000000 17321866315 141130816 141997131
+51966000000 51968599089 17322000000 17322866363 142130816 142997179
+51969000000 51971599189 17323000000 17323866396 143130816 143997212
+51972000000 51974599423 17324000000 17324866474 144130816 144997290
+51975000000 51977599496 17325000000 17325866498 145130816 145997314
+51978000000 51980599617 17326000000 17326866539 146130816 146997355
+51981000000 51983599806 17327000000 17327866602 147130816 147997418
+51984000000 51986599960 17328000000 17328866653 148130816 148997469
+51987000000 51989600139 17329000000 17329866713 149130816 149997529
+51990000000 51992600285 17330000000 17330866761 150130816 150997577
+51993000000 51995600412 17331000000 17331866804 151130816 151997620
+51996000000 51998600586 17332000000 17332866862 152130816 152997678
+51999000000 52001600650 17333000000 17333866883 153130816 153997699
+52002000000 52004600857 17334000000 17334866952 154130816 154997768
+52005000000 52007601038 17335000000 17335867012 155130816 155997828
+52008000000 52010601187 17336000000 17336867062 156130816 156997878
+52011000000 52013601244 17337000000 17337867081 157130816 157997897
+52014000000 52016601440 17338000000 17338867146 158130816 158997962
+52017000000 52019601630 17339000000 17339867210 159130816 159998026
+52020000000 52022601775 17340000000 17340867258 160130816 160998074
+52023000000 52025601947 17341000000 17341867315 161130816 161998131
+52026000000 52028602080 17342000000 17342867360 162130816 162998176
+52029000000 52031602151 17343000000 17343867383 163130816 163998199
+52032000000 52034602377 17344000000 17344867459 164130816 164998275
+52035000000 52037602537 17345000000 17345867512 165130816 165998328
+52038000000 52040602669 17346000000 17346867556 166130816 166998372
+52041000000 52043602777 17347000000 17347867592 167130816 167998408
+52044000000 52046602988 17348000000 17348867662 168130816 168998478
+52047000000 52049603154 17349000000 17349867718 169130816 169998534
+52050000000 52052603265 17350000000 17350867755 170130816 170998571
+52053000000 52055603425 17351000000 17351867808 171130816 171998624
+52056000000 52058603537 17352000000 17352867845 172130816 172998661
+52059000000 52061603735 17353000000 17353867911 173130816 173998727
+52062000000 52064603825 17354000000 17354867941 174130816 174998757
+52065000000 52067604050 17355000000 17355868016 175130816 175998832
+52068000000 52070604182 17356000000 17356868060 176130816 176998876
+52071000000 52073604321 17357000000 17357868107 177130816 177998923
+52074000000 52076604372 17358000000 17358868124 178130816 178998940
+52077000000 52079604583 17359000000 17359868194 179130816 179999010
+52080000000 52082604792 17360000000 17360868264 180130816 180999080
+52083000000 52085604920 17361000000 17361868306 181130816 181999122
+52086000000 52088605063 17362000000 17362868354 182130816 182999170
+52089000000 52091605234 17363000000 17363868411 183130816 183999227
+52092000000 52094605331 17364000000 17364868443 184130816 184999259
+52095000000 52097605544 17365000000 17365868514 185130816 185999330
+52098000000 52100605674 17366000000 17366868558 186130816 186999374
+52101000000 52103605824 17367000000 17367868608 187130816 187999424
+52104000000 52106605984 17368000000 17368868661 188130816 188999477
+52107000000 52109606080 17369000000 17369868693 189130816 189999509
+52110000000 52112606268 17370000000 17370868756 190130816 190999572
+52113000000 52115606436 17371000000 17371868812 191130816 191999628
+52116000000 52118606572 17372000000 17372868857 192130816 192999673
+52119000000 52121606747 17373000000 17373868915 193130816 193999731
+52122000000 52124606869 17374000000 17374868956 194130816 194999772
+52125000000 52127607019 17375000000 17375869006 195130816 195999822
+52128000000 52130607167 17376000000 17376869055 196130816 196999871
+52131000000 52133607373 17377000000 17377869124 197130816 197999940
+52134000000 52136607487 17378000000 17378869162 198130816 198999978
+52137000000 52139607619 17379000000 17379869206 199130816 200000022
+52140000000 52142607793 17380000000 17380869264 200130816 201000080
+52143000000 52145607912 17381000000 17381869304 201130816 202000120
+52146000000 52148608036 17382000000 17382869345 202130816 203000161
+52149000000 52151608255 17383000000 17383869418 203130816 204000234
+52152000000 52154608391 17384000000 17384869463 204130816 205000279
+52155000000 52157608542 17385000000 17385869514 205130816 206000330
+52158000000 52160608702 17386000000 17386869567 206130816 207000383
+52161000000 52163608823 17387000000 17387869607 207130816 208000423
+52164000000 52166608904 17388000000 17388869634 208130816 209000450
+52167000000 52169609112 17389000000 17389869704 209130816 210000520
+52170000000 52172609267 17390000000 17390869755 210130816 211000571
+52173000000 52175609426 17391000000 17391869808 211130816 212000624
+52176000000 52178609578 17392000000 17392869859 212130816 213000675
+52179000000 52181609700 17393000000 17393869900 213130816 214000716
+52182000000 52184609878 17394000000 17394869959 214130816 215000775
+52185000000 52187610027 17395000000 17395870009 215130816 216000825
+52188000000 52190610155 17396000000 17396870051 216130816 217000867
+52191000000 52193610324 17397000000 17397870108 217130816 218000924
+52194000000 52196610444 17398000000 17398870148 218130816 219000964
+52197000000 52199610371 17399000000 17399870123 219130816 220000939
+52200000000 52202610694 17400000000 17400870231 220130816 221001047
+52203000000 52205610947 17401000000 17401870315 221130816 222001131
+52206000000 52208611057 17402000000 17402870352 222130816 223001168
+52209000000 52211611236 17403000000 17403870412 223130816 224001228
+52212000000 52214611284 17404000000 17404870428 224130816 225001244
+52215000000 52217611538 17405000000 17405870512 225130816 226001328
+52218000000 52220611657 17406000000 17406870552 226130816 227001368
+52221000000 52223611828 17407000000 17407870609 227130816 228001425
+52224000000 52226611975 17408000000 17408870658 228130816 229001474
+52227000000 52229612128 17409000000 17409870709 229130816 230001525
+52230000000 52232612274 17410000000 17410870758 230130816 231001574
+52233000000 52235612418 17411000000 17411870806 231130816 232001622
+52236000000 52238612581 17412000000 17412870860 232130816 233001676
+52239000000 52241612733 17413000000 17413870911 233130816 234001727
+52242000000 52244612887 17414000000 17414870962 234130816 235001778
+52245000000 52247613007 17415000000 17415871002 235130816 236001818
+52248000000 52250613216 17416000000 17416871072 236130816 237001888
+52251000000 52253613346 17417000000 17417871115 237130816 238001931
+52254000000 52256613460 17418000000 17418871153 238130816 239001969
+52257000000 52259613621 17419000000 17419871207 239130816 240002023
+52260000000 52262613756 17420000000 17420871252 240130816 241002068
+52263000000 52265613899 17421000000 17421871299 241130816 242002115
+52266000000 52268613999 17422000000 17422871333 242130816 243002149
+52269000000 52271614233 17423000000 17423871411 243130816 244002227
+52272000000 52274614306 17424000000 17424871435 244130816 245002251
+52275000000 52277614427 17425000000 17425871475 245130816 246002291
+52278000000 52280614616 17426000000 17426871538 246130816 247002354
+52281000000 52283614770 17427000000 17427871590 247130816 248002406
+52284000000 52286614949 17428000000 17428871649 248130816 249002465
+52287000000 52289615095 17429000000 17429871698 249130816 250002514
+52290000000 52292615222 17430000000 17430871740 250130816 251002556
+52293000000 52295615396 17431000000 17431871798 251130816 252002614
+52296000000 52298615460 17432000000 17432871820 252130816 253002636
+52299000000 52301615667 17433000000 17433871889 253130816 254002705
+52302000000 52304615848 17434000000 17434871949 254130816 255002765
+52305000000 52307615997 17435000000 17435871999 255130816 256002815
+52308000000 52310616054 17436000000 17436872018 256130816 257002834
+52311000000 52313616250 17437000000 17437872083 257130816 258002899
+52314000000 52316616440 17438000000 17438872146 258130816 259002962
+52317000000 52319616585 17439000000 17439872195 259130816 260003011
+52320000000 52322616757 17440000000 17440872252 260130816 261003068
+52323000000 52325616890 17441000000 17441872296 261130816 262003112
+52326000000 52328616961 17442000000 17442872320 262130816 263003136
+52329000000 52331617187 17443000000 17443872395 263130816 264003211
+52332000000 52334617347 17444000000 17444872449 264130816 265003265
+52335000000 52337617479 17445000000 17445872493 265130816 266003309
+52338000000 52340617587 17446000000 17446872529 266130816 267003345
+52341000000 52343617798 17447000000 17447872599 267130816 268003415
+52344000000 52346617964 17448000000 17448872654 268130816 269003470
+52347000000 52349618075 17449000000 17449872691 269130816 270003507
+52350000000 52352618235 17450000000 17450872745 270130816 271003561
+52353000000 52355618347 17451000000 17451872782 271130816 272003598
+52356000000 52358618545 17452000000 17452872848 272130816 273003664
+52359000000 52361618635 17453000000 17453872878 273130816 274003694
+52362000000 52364618860 17454000000 17454872953 274130816 275003769
+52365000000 52367618992 17455000000 17455872997 275130816 276003813
+52368000000 52370619131 17456000000 17456873043 276130816 277003859
+52371000000 52373619182 17457000000 17457873060 277130816 278003876
+52374000000 52376619393 17458000000 17458873131 278130816 279003947
+52377000000 52379619602 17459000000 17459873200 279130816 280004016
+52380000000 52382619730 17460000000 17460873243 280130816 281004059
+52383000000 52385619873 17461000000 17461873291 281130816 282004107
+52386000000 52388620044 17462000000 17462873348 282130816 283004164
+52389000000 52391620141 17463000000 17463873380 283130816 284004196
+52392000000 52394620354 17464000000 17464873451 284130816 285004267
+52395000000 52397620484 17465000000 17465873494 285130816 286004310
+52398000000 52400620634 17466000000 17466873544 286130816 287004360
+52401000000 52403620794 17467000000 17467873598 287130816 288004414
+52404000000 52406620890 17468000000 17468873630 288130816 289004446
+52407000000 52409621078 17469000000 17469873692 289130816 290004508
+52410000000 52412621246 17470000000 17470873748 290130816 291004564
+52413000000 52415621382 17471000000 17471873794 291130816 292004610
+52416000000 52418621557 17472000000 17472873852 292130816 293004668
+52419000000 52421621679 17473000000 17473873893 293130816 294004709
+52422000000 52424621829 17474000000 17474873943 294130816 295004759
+52425000000 52427621977 17475000000 17475873992 295130816 296004808
+52428000000 52430622183 17476000000 17476874061 296130816 297004877
+52431000000 52433622297 17477000000 17477874099 297130816 298004915
+52434000000 52436622429 17478000000 17478874143 298130816 299004959
+52437000000 52439622603 17479000000 17479874201 299130816 300005017
+52440000000 52442622722 17480000000 17480874240 300130816 301005056
+52443000000 52445622846 17481000000 17481874282 301130816 302005098
+52446000000 52448623065 17482000000 17482874355 302130816 303005171
+52449000000 52451623201 17483000000 17483874400 303130816 304005216
+52452000000 52454623352 17484000000 17484874450 304130816 305005266
+52455000000 52457623512 17485000000 17485874504 305130816 306005320
+52458000000 52460623633 17486000000 17486874544 306130816 307005360
+52461000000 52463623714 17487000000 17487874571 307130816 308005387
+52464000000 52466623922 17488000000 17488874640 308130816 309005456
+52467000000 52469624077 17489000000 17489874692 309130816 310005508
+52470000000 52472624236 17490000000 17490874745 310130816 311005561
+52473000000 52475624388 17491000000 17491874796 311130816 312005612
+52476000000 52478624510 17492000000 17492874836 312130816 313005652
+52479000000 52481624688 17493000000 17493874896 313130816 314005712
+52482000000 52484624837 17494000000 17494874945 314130816 315005761
+52485000000 52487624965 17495000000 17495874988 315130816 316005804
+52488000000 52490625134 17496000000 17496875044 316130816 317005860
+52491000000 52493625254 17497000000 17497875084 317130816 318005900
+52494000000 52496625181 17498000000 17498875060 318130816 319005876
+52497000000 52499625504 17499000000 17499875168 319130816 320005984
+52500000000 52502625757 17500000000 17500875252 320130816 321006068
+52503000000 52505625867 17501000000 17501875289 321130816 322006105
+52506000000 52508626046 17502000000 17502875348 322130816 323006164
+52509000000 52511626094 17503000000 17503875364 323130816 324006180
+52512000000 52514626348 17504000000 17504875449 324130816 325006265
+52515000000 52517626467 17505000000 17505875489 325130816 326006305
+52518000000 52520626638 17506000000 17506875546 326130816 327006362
+52521000000 52523626785 17507000000 17507875595 327130816 328006411
+52524000000 52526626938 17508000000 17508875646 328130816 329006462
+52527000000 52529627084 17509000000 17509875694 329130816 330006510
+52530000000 52532627228 17510000000 17510875742 330130816 331006558
+52533000000 52535627391 17511000000 17511875797 331130816 332006613
+52536000000 52538627543 17512000000 17512875847 332130816 333006663
+52539000000 52541627697 17513000000 17513875899 333130816 334006715
+52542000000 52544627817 17514000000 17514875939 334130816 335006755
+52545000000 52547628026 17515000000 17515876008 335130816 336006824
+52548000000 52550628156 17516000000 17516876052 336130816 337006868
+52551000000 52553628270 17517000000 17517876090 337130816 338006906
+52554000000 52556628431 17518000000 17518876143 338130816 339006959
+52557000000 52559628566 17519000000 17519876188 339130816 340007004
+52560000000 52562628709 17520000000 17520876236 340130816 341007052
+52563000000 52565628809 17521000000 17521876269 341130816 342007085
+52566000000 52568629043 17522000000 17522876347 342130816 343007163
+52569000000 52571629116 17523000000 17523876372 343130816 344007188
+52572000000 52574629237 17524000000 17524876412 344130816 345007228
+52575000000 52577629426 17525000000 17525876475 345130816 346007291
+52578000000 52580629580 17526000000 17526876526 346130816 347007342
+52581000000 52583629759 17527000000 17527876586 347130816 348007402
+52584000000 52586629905 17528000000 17528876635 348130816 349007451
+52587000000 52589630032 17529000000 17529876677 349130816 350007493
+52590000000 52592630206 17530000000 17530876735 350130816 351007551
+52593000000 52595630270 17531000000 17531876756 351130816 352007572
+52596000000 52598630477 17532000000 17532876825 352130816 353007641
+52599000000 52601630658 17533000000 17533876886 353130816 354007702
+52602000000 52604630807 17534000000 17534876935 354130816 355007751
+52605000000 52607630864 17535000000 17535876954 355130816 356007770
+52608000000 52610631060 17536000000 17536877020 356130816 357007836
+52611000000 52613631250 17537000000 17537877083 357130816 358007899
+52614000000 52616631395 17538000000 17538877131 358130816 359007947
+52617000000 52619631567 17539000000 17539877189 359130816 360008005
+52620000000 52622631700 17540000000 17540877233 360130816 361008049
+52623000000 52625631771 17541000000 17541877257 361130816 362008073
+52626000000 52628631997 17542000000 17542877332 362130816 363008148
+52629000000 52631632157 17543000000 17543877385 363130816 364008201
+52632000000 52634632289 17544000000 17544877429 364130816 365008245
+52635000000 52637632397 17545000000 17545877465 365130816 366008281
+52638000000 52640632608 17546000000 17546877536 366130816 367008352
+52641000000 52643632774 17547000000 17547877591 367130816 368008407
+52644000000 52646632885 17548000000 17548877628 368130816 369008444
+52647000000 52649633045 17549000000 17549877681 369130816 370008497
+52650000000 52652633157 17550000000 17550877719 370130816 371008535
+52653000000 52655633355 17551000000 17551877785 371130816 372008601
+52656000000 52658633445 17552000000 17552877815 372130816 373008631
+52659000000 52661633670 17553000000 17553877890 373130816 374008706
+52662000000 52664633802 17554000000 17554877934 374130816 375008750
+52665000000 52667633941 17555000000 17555877980 375130816 376008796
+52668000000 52670633992 17556000000 17556877997 376130816 377008813
+52671000000 52673634203 17557000000 17557878067 377130816 378008883
+52674000000 52676634412 17558000000 17558878137 378130816 379008953
+52677000000 52679634540 17559000000 17559878180 379130816 380008996
+52680000000 52682634683 17560000000 17560878227 380130816 381009043
+52683000000 52685634854 17561000000 17561878284 381130816 382009100
+52686000000 52688634951 17562000000 17562878317 382130816 383009133
+52689000000 52691635164 17563000000 17563878388 383130816 384009204
+52692000000 52694635294 17564000000 17564878431 384130816 385009247
+52695000000 52697635444 17565000000 17565878481 385130816 386009297
+52698000000 52700635604 17566000000 17566878534 386130816 387009350
+52701000000 52703635700 17567000000 17567878566 387130816 388009382
+52704000000 52706635888 17568000000 17568878629 388130816 389009445
+52707000000 52709636056 17569000000 17569878685 389130816 390009501
+52710000000 52712636192 17570000000 17570878730 390130816 391009546
+52713000000 52715636367 17571000000 17571878789 391130816 392009605
+52716000000 52718636489 17572000000 17572878829 392130816 393009645
+52719000000 52721636639 17573000000 17573878879 393130816 394009695
+52722000000 52724636787 17574000000 17574878929 394130816 395009745
+52725000000 52727636993 17575000000 17575878997 395130816 396009813
+52728000000 52730637107 17576000000 17576879035 396130816 397009851
+52731000000 52733637239 17577000000 17577879079 397130816 398009895
+52734000000 52736637413 17578000000 17578879137 398130816 399009953
+52737000000 52739637532 17579000000 17579879177 399130816 400009993
+52740000000 52742637656 17580000000 17580879218 400130816 401010034
+52743000000 52745637875 17581000000 17581879291 401130816 402010107
+52746000000 52748638011 17582000000 17582879337 402130816 403010153
+52749000000 52751638162 17583000000 17583879387 403130816 404010203
+52752000000 52754638322 17584000000 17584879440 404130816 405010256
+52755000000 52757638443 17585000000 17585879481 405130816 406010297
+52758000000 52760638524 17586000000 17586879508 406130816 407010324
+52761000000 52763638732 17587000000 17587879577 407130816 408010393
+52764000000 52766638887 17588000000 17588879629 408130816 409010445
+52767000000 52769639046 17589000000 17589879682 409130816 410010498
+52770000000 52772639198 17590000000 17590879732 410130816 411010548
+52773000000 52775639320 17591000000 17591879773 411130816 412010589
+52776000000 52778639498 17592000000 17592879832 412130816 413010648
+52779000000 52781639647 17593000000 17593879882 413130816 414010698
+52782000000 52784639775 17594000000 17594879925 414130816 415010741
+52785000000 52787639944 17595000000 17595879981 415130816 416010797
+52788000000 52790640064 17596000000 17596880021 416130816 417010837
+52791000000 52793639991 17597000000 17597879997 417130816 418010813
+52794000000 52796640314 17598000000 17598880104 418130816 419010920
+52797000000 52799640567 17599000000 17599880189 419130816 420011005
+52800000000 52802640677 17600000000 17600880225 420130816 421011041
+52803000000 52805640856 17601000000 17601880285 421130816 422011101
+52806000000 52808640904 17602000000 17602880301 422130816 423011117
+52809000000 52811641158 17603000000 17603880386 423130816 424011202
+52812000000 52814641277 17604000000 17604880425 424130816 425011241
+52815000000 52817641448 17605000000 17605880482 425130816 426011298
+52818000000 52820641595 17606000000 17606880531 426130816 427011347
+52821000000 52823641748 17607000000 17607880582 427130816 428011398
+52824000000 52826641894 17608000000 17608880631 428130816 429011447
+52827000000 52829642038 17609000000 17609880679 429130816 430011495
+52830000000 52832642201 17610000000 17610880733 430130816 431011549
+52833000000 52835642353 17611000000 17611880784 431130816 432011600
+52836000000 52838642507 17612000000 17612880835 432130816 433011651
+52839000000 52841642627 17613000000 17613880875 433130816 434011691
+52842000000 52844642836 17614000000 17614880945 434130816 435011761
+52845000000 52847642966 17615000000 17615880988 435130816 436011804
+52848000000 52850643080 17616000000 17616881026 436130816 437011842
+52851000000 52853643241 17617000000 17617881080 437130816 438011896
+52854000000 52856643376 17618000000 17618881125 438130816 439011941
+52857000000 52859643519 17619000000 17619881173 439130816 440011989
+52860000000 52862643619 17620000000 17620881206 440130816 441012022
+52863000000 52865643853 17621000000 17621881284 441130816 442012100
+52866000000 52868643926 17622000000 17622881308 442130816 443012124
+52869000000 52871644047 17623000000 17623881349 443130816 444012165
+52872000000 52874644236 17624000000 17624881412 444130816 445012228
+52875000000 52877644390 17625000000 17625881463 445130816 446012279
+52878000000 52880644569 17626000000 17626881523 446130816 447012339
+52881000000 52883644715 17627000000 17627881571 447130816 448012387
+52884000000 52886644842 17628000000 17628881614 448130816 449012430
+52887000000 52889645016 17629000000 17629881672 449130816 450012488
+52890000000 52892645080 17630000000 17630881693 450130816 451012509
+52893000000 52895645287 17631000000 17631881762 451130816 452012578
+52896000000 52898645468 17632000000 17632881822 452130816 453012638
+52899000000 52901645617 17633000000 17633881872 453130816 454012688
+52902000000 52904645674 17634000000 17634881891 454130816 455012707
+52905000000 52907645870 17635000000 17635881956 455130816 456012772
+52908000000 52910646060 17636000000 17636882020 456130816 457012836
+52911000000 52913646205 17637000000 17637882068 457130816 458012884
+52914000000 52916646377 17638000000 17638882125 458130816 459012941
+52917000000 52919646510 17639000000 17639882170 459130816 460012986
+52920000000 52922646581 17640000000 17640882193 460130816 461013009
+52923000000 52925646807 17641000000 17641882269 461130816 462013085
+52926000000 52928646967 17642000000 17642882322 462130816 463013138
+52929000000 52931647099 17643000000 17643882366 463130816 464013182
+52932000000 52934647207 17644000000 17644882402 464130816 465013218
+52935000000 52937647418 17645000000 17645882472 465130816 466013288
+52938000000 52940647584 17646000000 17646882528 466130816 467013344
+52941000000 52943647695 17647000000 17647882565 467130816 468013381
+52944000000 52946647855 17648000000 17648882618 468130816 469013434
+52947000000 52949647967 17649000000 17649882655 469130816 470013471
+52950000000 52952648165 17650000000 17650882721 470130816 471013537
+52953000000 52955648255 17651000000 17651882751 471130816 472013567
+52956000000 52958648480 17652000000 17652882826 472130816 473013642
+52959000000 52961648612 17653000000 17653882870 473130816 474013686
+52962000000 52964648751 17654000000 17654882917 474130816 475013733
+52965000000 52967648802 17655000000 17655882934 475130816 476013750
+52968000000 52970649013 17656000000 17656883004 476130816 477013820
+52971000000 52973649222 17657000000 17657883074 477130816 478013890
+52974000000 52976649350 17658000000 17658883116 478130816 479013932
+52977000000 52979649493 17659000000 17659883164 479130816 480013980
+52980000000 52982649664 17660000000 17660883221 480130816 481014037
+52983000000 52985649761 17661000000 17661883253 481130816 482014069
+52986000000 52988649974 17662000000 17662883324 482130816 483014140
+52989000000 52991650104 17663000000 17663883368 483130816 484014184
+52992000000 52994650254 17664000000 17664883418 484130816 485014234
+52995000000 52997650414 17665000000 17665883471 485130816 486014287
+52998000000 53000650510 17666000000 17666883503 486130816 487014319
+53001000000 53003650698 17667000000 17667883566 487130816 488014382
+53004000000 53006650866 17668000000 17668883622 488130816 489014438
+53007000000 53009651002 17669000000 17669883667 489130816 490014483
+53010000000 53012651177 17670000000 17670883725 490130816 491014541
+53013000000 53015651299 17671000000 17671883766 491130816 492014582
+53016000000 53018651449 17672000000 17672883816 492130816 493014632
+53019000000 53021651597 17673000000 17673883865 493130816 494014681
+53022000000 53024651803 17674000000 17674883934 494130816 495014750
+53025000000 53027651917 17675000000 17675883972 495130816 496014788
+53028000000 53030652049 17676000000 17676884016 496130816 497014832
+53031000000 53033652223 17677000000 17677884074 497130816 498014890
+53034000000 53036652342 17678000000 17678884114 498130816 499014930
+53037000000 53039652466 17679000000 17679884155 499130816 500014971
+53040000000 53042652685 17680000000 17680884228 500130816 501015044
+53043000000 53045652821 17681000000 17681884273 501130816 502015089
+53046000000 53048652972 17682000000 17682884324 502130816 503015140
+53049000000 53051653132 17683000000 17683884377 503130816 504015193
+53052000000 53054653253 17684000000 17684884417 504130816 505015233
+53055000000 53057653334 17685000000 17685884444 505130816 506015260
+53058000000 53060653542 17686000000 17686884514 506130816 507015330
+53061000000 53063653697 17687000000 17687884565 507130816 508015381
+53064000000 53066653856 17688000000 17688884618 508130816 509015434
+53067000000 53069654008 17689000000 17689884669 509130816 510015485
+53070000000 53072654130 17690000000 17690884710 510130816 511015526
+53073000000 53075654308 17691000000 17691884769 511130816 512015585
+53076000000 53078654457 17692000000 17692884819 512130816 513015635
+53079000000 53081654585 17693000000 17693884861 513130816 514015677
+53082000000 53084654754 17694000000 17694884918 514130816 515015734
+53085000000 53087654874 17695000000 17695884958 515130816 516015774
+53088000000 53090654801 17696000000 17696884933 516130816 517015749
+53091000000 53093655124 17697000000 17697885041 517130816 518015857
+53094000000 53096655377 17698000000 17698885125 518130816 519015941
+53097000000 53099655487 17699000000 17699885162 519130816 520015978
+53100000000 53102655666 17700000000 17700885222 520130816 521016038
+53103000000 53105655714 17701000000 17701885238 521130816 522016054
+53106000000 53108655968 17702000000 17702885322 522130816 523016138
+53109000000 53111656087 17703000000 17703885362 523130816 524016178
+53112000000 53114656258 17704000000 17704885419 524130816 525016235
+53115000000 53117656405 17705000000 17705885468 525130816 526016284
+53118000000 53120656558 17706000000 17706885519 526130816 527016335
+53121000000 53123656704 17707000000 17707885568 527130816 528016384
+53124000000 53126656848 17708000000 17708885616 528130816 529016432
+53127000000 53129657011 17709000000 17709885670 529130816 530016486
+53130000000 53132657163 17710000000 17710885721 530130816 531016537
+53133000000 53135657317 17711000000 17711885772 531130816 532016588
+53136000000 53138657437 17712000000 17712885812 532130816 533016628
+53139000000 53141657646 17713000000 17713885882 533130816 534016698
+53142000000 53144657776 17714000000 17714885925 534130816 535016741
+53145000000 53147657890 17715000000 17715885963 535130816 536016779
+53148000000 53150658051 17716000000 17716886017 536130816 537016833
+53151000000 53153658186 17717000000 17717886062 537130816 538016878
+53154000000 53156658329 17718000000 17718886109 538130816 539016925
+53157000000 53159658429 17719000000 17719886143 539130816 540016959
+53160000000 53162658663 17720000000 17720886221 540130816 541017037
+53163000000 53165658736 17721000000 17721886245 541130816 542017061
+53166000000 53168658857 17722000000 17722886285 542130816 543017101
+53169000000 53171659046 17723000000 17723886348 543130816 544017164
+53172000000 53174659200 17724000000 17724886400 544130816 545017216
+53175000000 53177659379 17725000000 17725886459 545130816 546017275
+53178000000 53180659525 17726000000 17726886508 546130816 547017324
+53181000000 53183659652 17727000000 17727886550 547130816 548017366
+53184000000 53186659826 17728000000 17728886608 548130816 549017424
+53187000000 53189659890 17729000000 17729886630 549130816 550017446
+53190000000 53192660097 17730000000 17730886699 550130816 551017515
+53193000000 53195660278 17731000000 17731886759 551130816 552017575
+53196000000 53198660427 17732000000 17732886809 552130816 553017625
+53199000000 53201660484 17733000000 17733886828 553130816 554017644
+53202000000 53204660680 17734000000 17734886893 554130816 555017709
+53205000000 53207660870 17735000000 17735886956 555130816 556017772
+53208000000 53210661015 17736000000 17736887005 556130816 557017821
+53211000000 53213661187 17737000000 17737887062 557130816 558017878
+53214000000 53216661320 17738000000 17738887106 558130816 559017922
+53217000000 53219661391 17739000000 17739887130 559130816 560017946
+53220000000 53222661617 17740000000 17740887205 560130816 561018021
+53223000000 53225661777 17741000000 17741887259 561130816 562018075
+53226000000 53228661909 17742000000 17742887303 562130816 563018119
+53229000000 53231662017 17743000000 17743887339 563130816 564018155
+53232000000 53234662228 17744000000 17744887409 564130816 565018225
+53235000000 53237662394 17745000000 17745887464 565130816 566018280
+53238000000 53240662505 17746000000 17746887501 566130816 567018317
+53241000000 53243662665 17747000000 17747887555 567130816 568018371
+53244000000 53246662777 17748000000 17748887592 568130816 569018408
+53247000000 53249662975 17749000000 17749887658 569130816 570018474
+53250000000 53252663065 17750000000 17750887688 570130816 571018504
+53253000000 53255663290 17751000000 17751887763 571130816 572018579
+53256000000 53258663422 17752000000 17752887807 572130816 573018623
+53259000000 53261663561 17753000000 17753887853 573130816 574018669
+53262000000 53264663612 17754000000 17754887870 574130816 575018686
+53265000000 53267663823 17755000000 17755887941 575130816 576018757
+53268000000 53270664032 17756000000 17756888010 576130816 577018826
+53271000000 53273664160 17757000000 17757888053 577130816 578018869
+53274000000 53276664303 17758000000 17758888101 578130816 579018917
+53277000000 53279664474 17759000000 17759888158 579130816 580018974
+53280000000 53282664571 17760000000 17760888190 580130816 581019006
+53283000000 53285664784 17761000000 17761888261 581130816 582019077
+53286000000 53288664914 17762000000 17762888304 582130816 583019120
+53289000000 53291665064 17763000000 17763888354 583130816 584019170
+53292000000 53294665224 17764000000 17764888408 584130816 585019224
+53295000000 53297665320 17765000000 17765888440 585130816 586019256
+53298000000 53300665508 17766000000 17766888502 586130816 587019318
+53301000000 53303665676 17767000000 17767888558 587130816 588019374
+53304000000 53306665812 17768000000 17768888604 588130816 589019420
+53307000000 53309665987 17769000000 17769888662 589130816 590019478
+53310000000 53312666109 17770000000 17770888703 590130816 591019519
+53313000000 53315666259 17771000000 17771888753 591130816 592019569
+53316000000 53318666407 17772000000 17772888802 592130816 593019618
+53319000000 53321666613 17773000000 17773888871 593130816 594019687
+53322000000 53324666727 17774000000 17774888909 594130816 595019725
+53325000000 53327666859 17775000000 17775888953 595130816 596019769
+53328000000 53330667033 17776000000 17776889011 596130816 597019827
+53331000000 53333667152 17777000000 17777889050 597130816 598019866
+53334000000 53336667276 17778000000 17778889092 598130816 599019908
+53337000000 53339667495 17779000000 17779889165 599130816 600019981
+53340000000 53342667631 17780000000 17780889210 600130816 601020026
+53343000000 53345667782 17781000000 17781889260 601130816 602020076
+53346000000 53348667942 17782000000 17782889314 602130816 603020130
+53349000000 53351668063 17783000000 17783889354 603130816 604020170
+53352000000 53354668144 17784000000 17784889381 604130816 605020197
+53355000000 53357668352 17785000000 17785889450 605130816 606020266
+53358000000 53360668507 17786000000 17786889502 606130816 607020318
+53361000000 53363668666 17787000000 17787889555 607130816 608020371
+53364000000 53366668818 17788000000 17788889606 608130816 609020422
+53367000000 53369668940 17789000000 17789889646 609130816 610020462
+53370000000 53372669118 17790000000 17790889706 610130816 611020522
+53373000000 53375669267 17791000000 17791889755 611130816 612020571
+53376000000 53378669395 17792000000 17792889798 612130816 613020614
+53379000000 53381669564 17793000000 17793889854 613130816 614020670
+53382000000 53384669684 17794000000 17794889894 614130816 615020710
+53385000000 53387669611 17795000000 17795889870 615130816 616020686
+53388000000 53390669934 17796000000 17796889978 616130816 617020794
+53391000000 53393670187 17797000000 17797890062 617130816 618020878
+53394000000 53396670297 17798000000 17798890099 618130816 619020915
+53397000000 53399670476 17799000000 17799890158 619130816 620020974
+53400000000 53402670524 17800000000 17800890174 620130816 621020990
+53403000000 53405670778 17801000000 17801890259 621130816 622021075
+53406000000 53408670897 17802000000 17802890299 622130816 623021115
+53409000000 53411671068 17803000000 17803890356 623130816 624021172
+53412000000 53414671215 17804000000 17804890405 624130816 625021221
+53415000000 53417671368 17805000000 17805890456 625130816 626021272
+53418000000 53420671514 17806000000 17806890504 626130816 627021320
+53421000000 53423671658 17807000000 17807890552 627130816 628021368
+53424000000 53426671821 17808000000 17808890607 628130816 629021423
+53427000000 53429671973 17809000000 17809890657 629130816 630021473
+53430000000 53432672127 17810000000 17810890709 630130816 631021525
+53433000000 53435672247 17811000000 17811890749 631130816 632021565
+53436000000 53438672456 17812000000 17812890818 632130816 633021634
+53439000000 53441672586 17813000000 17813890862 633130816 634021678
+53442000000 53444672700 17814000000 17814890900 634130816 635021716
+53445000000 53447672861 17815000000 17815890953 635130816 636021769
+53448000000 53450672996 17816000000 17816890998 636130816 637021814
+53451000000 53453673139 17817000000 17817891046 637130816 638021862
+53454000000 53456673239 17818000000 17818891079 638130816 639021895
+53457000000 53459673473 17819000000 17819891157 639130816 640021973
+53460000000 53462673546 17820000000 17820891182 640130816 641021998
+53463000000 53465673667 17821000000 17821891222 641130816 642022038
+53466000000 53468673856 17822000000 17822891285 642130816 643022101
+53469000000 53471674010 17823000000 17823891336 643130816 644022152
+53472000000 53474674189 17824000000 17824891396 644130816 645022212
+53475000000 53477674335 17825000000 17825891445 645130816 646022261
+53478000000 53480674462 17826000000 17826891487 646130816 647022303
+53481000000 53483674636 17827000000 17827891545 647130816 648022361
+53484000000 53486674700 17828000000 17828891566 648130816 649022382
+53487000000 53489674907 17829000000 17829891635 649130816 650022451
+53490000000 53492675088 17830000000 17830891696 650130816 651022512
+53493000000 53495675237 17831000000 17831891745 651130816 652022561
+53496000000 53498675294 17832000000 17832891764 652130816 653022580
+53499000000 53501675490 17833000000 17833891830 653130816 654022646
+53502000000 53504675680 17834000000 17834891893 654130816 655022709
+53505000000 53507675825 17835000000 17835891941 655130816 656022757
+53508000000 53510675997 17836000000 17836891999 656130816 657022815
+53511000000 53513676130 17837000000 17837892043 657130816 658022859
+53514000000 53516676201 17838000000 17838892067 658130816 659022883
+53517000000 53519676427 17839000000 17839892142 659130816 660022958
+53520000000 53522676587 17840000000 17840892195 660130816 661023011
+53523000000 53525676719 17841000000 17841892239 661130816 662023055
+53526000000 53528676827 17842000000 17842892275 662130816 663023091
+53529000000 53531677038 17843000000 17843892346 663130816 664023162
+53532000000 53534677204 17844000000 17844892401 664130816 665023217
+53535000000 53537677315 17845000000 17845892438 665130816 666023254
+53538000000 53540677475 17846000000 17846892491 666130816 667023307
+53541000000 53543677587 17847000000 17847892529 667130816 668023345
+53544000000 53546677785 17848000000 17848892595 668130816 669023411
+53547000000 53549677875 17849000000 17849892625 669130816 670023441
+53550000000 53552678100 17850000000 17850892700 670130816 671023516
+53553000000 53555678232 17851000000 17851892744 671130816 672023560
+53556000000 53558678371 17852000000 17852892790 672130816 673023606
+53559000000 53561678422 17853000000 17853892807 673130816 674023623
+53562000000 53564678633 17854000000 17854892877 674130816 675023693
+53565000000 53567678842 17855000000 17855892947 675130816 676023763
+53568000000 53570678970 17856000000 17856892990 676130816 677023806
+53571000000 53573679113 17857000000 17857893037 677130816 678023853
+53574000000 53576679284 17858000000 17858893094 678130816 679023910
+53577000000 53579679381 17859000000 17859893127 679130816 680023943
+53580000000 53582679594 17860000000 17860893198 680130816 681024014
+53583000000 53585679724 17861000000 17861893241 681130816 682024057
+53586000000 53588679874 17862000000 17862893291 682130816 683024107
+53589000000 53591680034 17863000000 17863893344 683130816 684024160
+53592000000 53594680130 17864000000 17864893376 684130816 685024192
+53595000000 53597680318 17865000000 17865893439 685130816 686024255
+53598000000 53600680486 17866000000 17866893495 686130816 687024311
+53601000000 53603680622 17867000000 17867893540 687130816 688024356
+53604000000 53606680797 17868000000 17868893599 688130816 689024415
+53607000000 53609680919 17869000000 17869893639 689130816 690024455
+53610000000 53612681069 17870000000 17870893689 690130816 691024505
+53613000000 53615681217 17871000000 17871893739 691130816 692024555
+53616000000 53618681423 17872000000 17872893807 692130816 693024623
+53619000000 53621681537 17873000000 17873893845 693130816 694024661
+53622000000 53624681669 17874000000 17874893889 694130816 695024705
+53625000000 53627681843 17875000000 17875893947 695130816 696024763
+53628000000 53630681962 17876000000 17876893987 696130816 697024803
+53631000000 53633682086 17877000000 17877894028 697130816 698024844
+53634000000 53636682305 17878000000 17878894101 698130816 699024917
+53637000000 53639682441 17879000000 17879894147 699130816 700024963
+53640000000 53642682592 17880000000 17880894197 700130816 701025013
+53643000000 53645682752 17881000000 17881894250 701130816 702025066
+53646000000 53648682873 17882000000 17882894291 702130816 703025107
+53649000000 53651682954 17883000000 17883894318 703130816 704025134
+53652000000 53654683162 17884000000 17884894387 704130816 705025203
+53655000000 53657683317 17885000000 17885894439 705130816 706025255
+53658000000 53660683476 17886000000 17886894492 706130816 707025308
+53661000000 53663683628 17887000000 17887894542 707130816 708025358
+53664000000 53666683750 17888000000 17888894583 708130816 709025399
+53667000000 53669683928 17889000000 17889894642 709130816 710025458
+53670000000 53672684077 17890000000 17890894692 710130816 711025508
+53673000000 53675684205 17891000000 17891894735 711130816 712025551
+53676000000 53678684374 17892000000 17892894791 712130816 713025607
+53679000000 53681684494 17893000000 17893894831 713130816 714025647
+53682000000 53684684421 17894000000 17894894807 714130816 715025623
+53685000000 53687684744 17895000000 17895894914 715130816 716025730
+53688000000 53690684997 17896000000 17896894999 716130816 717025815
+53691000000 53693685107 17897000000 17897895035 717130816 718025851
+53694000000 53696685286 17898000000 17898895095 718130816 719025911
+53697000000 53699685334 17899000000 17899895111 719130816 720025927
+53700000000 53702685588 17900000000 17900895196 720130816 721026012
+53703000000 53705685707 17901000000 17901895235 721130816 722026051
+53706000000 53708685878 17902000000 17902895292 722130816 723026108
+53709000000 53711686025 17903000000 17903895341 723130816 724026157
+53712000000 53714686178 17904000000 17904895392 724130816 725026208
+53715000000 53717686324 17905000000 17905895441 725130816 726026257
+53718000000 53720686468 17906000000 17906895489 726130816 727026305
+53721000000 53723686631 17907000000 17907895543 727130816 728026359
+53724000000 53726686783 17908000000 17908895594 728130816 729026410
+53727000000 53729686937 17909000000 17909895645 729130816 730026461
+53730000000 53732687057 17910000000 17910895685 730130816 731026501
+53733000000 53735687266 17911000000 17911895755 731130816 732026571
+53736000000 53738687396 17912000000 17912895798 732130816 733026614
+53739000000 53741687510 17913000000 17913895836 733130816 734026652
+53742000000 53744687671 17914000000 17914895890 734130816 735026706
+53745000000 53747687806 17915000000 17915895935 735130816 736026751
+53748000000 53750687949 17916000000 17916895983 736130816 737026799
+53751000000 53753688049 17917000000 17917896016 737130816 738026832
+53754000000 53756688283 17918000000 17918896094 738130816 739026910
+53757000000 53759688356 17919000000 17919896118 739130816 740026934
+53760000000 53762688477 17920000000 17920896159 740130816 741026975
+53763000000 53765688666 17921000000 17921896222 741130816 742027038
+53766000000 53768688820 17922000000 17922896273 742130816 743027089
+53769000000 53771688999 17923000000 17923896333 743130816 744027149
+53772000000 53774689145 17924000000 17924896381 744130816 745027197
+53775000000 53777689272 17925000000 17925896424 745130816 746027240
+53778000000 53780689446 17926000000 17926896482 746130816 747027298
+53781000000 53783689510 17927000000 17927896503 747130816 748027319
+53784000000 53786689717 17928000000 17928896572 748130816 749027388
+53787000000 53789689898 17929000000 17929896632 749130816 750027448
+53790000000 53792690047 17930000000 17930896682 750130816 751027498
+53793000000 53795690104 17931000000 17931896701 751130816 752027517
+53796000000 53798690300 17932000000 17932896766 752130816 753027582
+53799000000 53801690490 17933000000 17933896830 753130816 754027646
+53802000000 53804690635 17934000000 17934896878 754130816 755027694
+53805000000 53807690807 17935000000 17935896935 755130816 756027751
+53808000000 53810690940 17936000000 17936896980 756130816 757027796
+53811000000 53813691011 17937000000 17937897003 757130816 758027819
+53814000000 53816691237 17938000000 17938897079 758130816 759027895
+53817000000 53819691397 17939000000 17939897132 759130816 760027948
+53820000000 53822691529 17940000000 17940897176 760130816 761027992
+53823000000 53825691637 17941000000 17941897212 761130816 762028028
+53826000000 53828691848 17942000000 17942897282 762130816 763028098
+53829000000 53831692014 17943000000 17943897338 763130816 764028154
+53832000000 53834692125 17944000000 17944897375 764130816 765028191
+53835000000 53837692285 17945000000 17945897428 765130816 766028244
+53838000000 53840692397 17946000000 17946897465 766130816 767028281
+53841000000 53843692595 17947000000 17947897531 767130816 768028347
+53844000000 53846692685 17948000000 17948897561 768130816 769028377
+53847000000 53849692910 17949000000 17949897636 769130816 770028452
+53850000000 53852693042 17950000000 17950897680 770130816 771028496
+53853000000 53855693181 17951000000 17951897727 771130816 772028543
+53856000000 53858693232 17952000000 17952897744 772130816 773028560
+53859000000 53861693443 17953000000 17953897814 773130816 774028630
+53862000000 53864693652 17954000000 17954897884 774130816 775028700
+53865000000 53867693780 17955000000 17955897926 775130816 776028742
+53868000000 53870693923 17956000000 17956897974 776130816 777028790
+53871000000 53873694094 17957000000 17957898031 777130816 778028847
+53874000000 53876694191 17958000000 17958898063 778130816 779028879
+53877000000 53879694404 17959000000 17959898134 779130816 780028950
+53880000000 53882694534 17960000000 17960898178 780130816 781028994
+53883000000 53885694684 17961000000 17961898228 781130816 782029044
+53886000000 53888694844 17962000000 17962898281 782130816 783029097
+53889000000 53891694940 17963000000 17963898313 783130816 784029129
+53892000000 53894695128 17964000000 17964898376 784130816 785029192
+53895000000 53897695296 17965000000 17965898432 785130816 786029248
+53898000000 53900695432 17966000000 17966898477 786130816 787029293
+53901000000 53903695607 17967000000 17967898535 787130816 788029351
+53904000000 53906695729 17968000000 17968898576 788130816 789029392
+53907000000 53909695879 17969000000 17969898626 789130816 790029442
+53910000000 53912696027 17970000000 17970898675 790130816 791029491
+53913000000 53915696233 17971000000 17971898744 791130816 792029560
+53916000000 53918696347 17972000000 17972898782 792130816 793029598
+53919000000 53921696479 17973000000 17973898826 793130816 794029642
+53922000000 53924696653 17974000000 17974898884 794130816 795029700
+53925000000 53927696772 17975000000 17975898924 795130816 796029740
+53928000000 53930696896 17976000000 17976898965 796130816 797029781
+53931000000 53933697115 17977000000 17977899038 797130816 798029854
+53934000000 53936697251 17978000000 17978899083 798130816 799029899
+53937000000 53939697402 17979000000 17979899134 799130816 800029950
+53940000000 53942697562 17980000000 17980899187 800130816 801030003
+53943000000 53945697683 17981000000 17981899227 801130816 802030043
+53946000000 53948697764 17982000000 17982899254 802130816 803030070
+53949000000 53951697972 17983000000 17983899324 803130816 804030140
+53952000000 53954698127 17984000000 17984899375 804130816 805030191
+53955000000 53957698286 17985000000 17985899428 805130816 806030244
+53958000000 53960698438 17986000000 17986899479 806130816 807030295
+53961000000 53963698560 17987000000 17987899520 807130816 808030336
+53964000000 53966698738 17988000000 17988899579 808130816 809030395
+53967000000 53969698887 17989000000 17989899629 809130816 810030445
+53970000000 53972699015 17990000000 17990899671 810130816 811030487
+53973000000 53975699184 17991000000 17991899728 811130816 812030544
+53976000000 53978699304 17992000000 17992899768 812130816 813030584
+53979000000 53981699231 17993000000 17993899743 813130816 814030559
+53982000000 53984699554 17994000000 17994899851 814130816 815030667
+53985000000 53987699807 17995000000 17995899935 815130816 816030751
+53988000000 53990699917 17996000000 17996899972 816130816 817030788
+53991000000 53993700096 17997000000 17997900032 817130816 818030848
+53994000000 53996700144 17998000000 17998900048 818130816 819030864
+53997000000 53999700398 17999000000 17999900132 819130816 820030948
+54000000000 54002700517 18000000000 18000900172 820130816 821030988
+54003000000 54005700688 18001000000 18001900229 821130816 822031045
+54006000000 54008700835 18002000000 18002900278 822130816 823031094
+54009000000 54011700988 18003000000 18003900329 823130816 824031145
+54012000000 54014701134 18004000000 18004900378 824130816 825031194
+54015000000 54017701278 18005000000 18005900426 825130816 826031242
+54018000000 54020701441 18006000000 18006900480 826130816 827031296
+54021000000 54023701593 18007000000 18007900531 827130816 828031347
+54024000000 54026701747 18008000000 18008900582 828130816 829031398
+54027000000 54029701867 18009000000 18009900622 829130816 830031438
+54030000000 54032702076 18010000000 18010900692 830130816 831031508
+54033000000 54035702206 18011000000 18011900735 831130816 832031551
+54036000000 54038702320 18012000000 18012900773 832130816 833031589
+54039000000 54041702481 18013000000 18013900827 833130816 834031643
+54042000000 54044702616 18014000000 18014900872 834130816 835031688
+54045000000 54047702759 18015000000 18015900919 835130816 836031735
+54048000000 54050702859 18016000000 18016900953 836130816 837031769
+54051000000 54053703093 18017000000 18017901031 837130816 838031847
+54054000000 54056703166 18018000000 18018901055 838130816 839031871
+54057000000 54059703287 18019000000 18019901095 839130816 840031911
+54060000000 54062703476 18020000000 18020901158 840130816 841031974
+54063000000 54065703630 18021000000 18021901210 841130816 842032026
+54066000000 54068703809 18022000000 18022901269 842130816 843032085
+54069000000 54071703955 18023000000 18023901318 843130816 844032134
+54072000000 54074704082 18024000000 18024901360 844130816 845032176
+54075000000 54077704256 18025000000 18025901418 845130816 846032234
+54078000000 54080704320 18026000000 18026901440 846130816 847032256
+54081000000 54083704527 18027000000 18027901509 847130816 848032325
+54084000000 54086704708 18028000000 18028901569 848130816 849032385
+54087000000 54089704857 18029000000 18029901619 849130816 850032435
+54090000000 54092704914 18030000000 18030901638 850130816 851032454
+54093000000 54095705110 18031000000 18031901703 851130816 852032519
+54096000000 54098705300 18032000000 18032901766 852130816 853032582
+54099000000 54101705445 18033000000 18033901815 853130816 854032631
+54102000000 54104705617 18034000000 18034901872 854130816 855032688
+54105000000 54107705750 18035000000 18035901916 855130816 856032732
+54108000000 54110705821 18036000000 18036901940 856130816 857032756
+54111000000 54113706047 18037000000 18037902015 857130816 858032831
+54114000000 54116706207 18038000000 18038902069 858130816 859032885
+54117000000 54119706339 18039000000 18039902113 859130816 860032929
+54120000000 54122706447 18040000000 18040902149 860130816 861032965
+54123000000 54125706658 18041000000 18041902219 861130816 862033035
+54126000000 54128706824 18042000000 18042902274 862130816 863033090
+54129000000 54131706935 18043000000 18043902311 863130816 864033127
+54132000000 54134707095 18044000000 18044902365 864130816 865033181
+54135000000 54137707207 18045000000 18045902402 865130816 866033218
+54138000000 54140707405 18046000000 18046902468 866130816 867033284
+54141000000 54143707495 18047000000 18047902498 867130816 868033314
+54144000000 54146707720 18048000000 18048902573 868130816 869033389
+54147000000 54149707852 18049000000 18049902617 869130816 870033433
+54150000000 54152707991 18050000000 18050902663 870130816 871033479
+54153000000 54155708042 18051000000 18051902680 871130816 872033496
+54156000000 54158708253 18052000000 18052902751 872130816 873033567
+54159000000 54161708462 18053000000 18053902820 873130816 874033636
+54162000000 54164708590 18054000000 18054902863 874130816 875033679
+54165000000 54167708733 18055000000 18055902911 875130816 876033727
+54168000000 54170708904 18056000000 18056902968 876130816 877033784
+54171000000 54173709001 18057000000 18057903000 877130816 878033816
+54174000000 54176709214 18058000000 18058903071 878130816 879033887
+54177000000 54179709344 18059000000 18059903114 879130816 880033930
+54180000000 54182709494 18060000000 18060903164 880130816 881033980
+54183000000 54185709654 18061000000 18061903218 881130816 882034034
+54186000000 54188709750 18062000000 18062903250 882130816 883034066
+54189000000 54191709938 18063000000 18063903312 883130816 884034128
+54192000000 54194710106 18064000000 18064903368 884130816 885034184
+54195000000 54197710242 18065000000 18065903414 885130816 886034230
+54198000000 54200710417 18066000000 18066903472 886130816 887034288
+54201000000 54203710539 18067000000 18067903513 887130816 888034329
+54204000000 54206710689 18068000000 18068903563 888130816 889034379
+54207000000 54209710837 18069000000 18069903612 889130816 890034428
+54210000000 54212711043 18070000000 18070903681 890130816 891034497
+54213000000 54215711157 18071000000 18071903719 891130816 892034535
+54216000000 54218711289 18072000000 18072903763 892130816 893034579
+54219000000 54221711463 18073000000 18073903821 893130816 894034637
+54222000000 54224711582 18074000000 18074903860 894130816 895034676
+54225000000 54227711706 18075000000 18075903902 895130816 896034718
+54228000000 54230711925 18076000000 18076903975 896130816 897034791
+54231000000 54233712061 18077000000 18077904020 897130816 898034836
+54234000000 54236712212 18078000000 18078904070 898130816 899034886
+54237000000 54239712372 18079000000 18079904124 899130816 900034940
+54240000000 54242712493 18080000000 18080904164 900130816 901034980
+54243000000 54245712574 18081000000 18081904191 901130816 902035007
+54246000000 54248712782 18082000000 18082904260 902130816 903035076
+54249000000 54251712937 18083000000 18083904312 903130816 904035128
+54252000000 54254713096 18084000000 18084904365 904130816 905035181
+54255000000 54257713248 18085000000 18085904416 905130816 906035232
+54258000000 54260713370 18086000000 18086904456 906130816 907035272
+54261000000 54263713548 18087000000 18087904516 907130816 908035332
+54264000000 54266713697 18088000000 18088904565 908130816 909035381
+54267000000 54269713825 18089000000 18089904608 909130816 910035424
+54270000000 54272713994 18090000000 18090904664 910130816 911035480
+54273000000 54275714114 18091000000 18091904704 911130816 912035520
+54276000000 54278714041 18092000000 18092904680 912130816 913035496
+54279000000 54281714364 18093000000 18093904788 913130816 914035604
+54282000000 54284714617 18094000000 18094904872 914130816 915035688
+54285000000 54287714727 18095000000 18095904909 915130816 916035725
+54288000000 54290714906 18096000000 18096904968 916130816 917035784
+54291000000 54293714954 18097000000 18097904984 917130816 918035800
+54294000000 54296715208 18098000000 18098905069 918130816 919035885
+54297000000 54299715327 18099000000 18099905109 919130816 920035925
+54300000000 54302715498 18100000000 18100905166 920130816 921035982
+54303000000 54305715645 18101000000 18101905215 921130816 922036031
+54306000000 54308715798 18102000000 18102905266 922130816 923036082
+54309000000 54311715944 18103000000 18103905314 923130816 924036130
+54312000000 54314716088 18104000000 18104905362 924130816 925036178
+54315000000 54317716251 18105000000 18105905417 925130816 926036233
+54318000000 54320716403 18106000000 18106905467 926130816 927036283
+54321000000 54323716557 18107000000 18107905519 927130816 928036335
+54324000000 54326716677 18108000000 18108905559 928130816 929036375
+54327000000 54329716886 18109000000 18109905628 929130816 930036444
+54330000000 54332717016 18110000000 18110905672 930130816 931036488
+54333000000 54335717130 18111000000 18111905710 931130816 932036526
+54336000000 54338717291 18112000000 18112905763 932130816 933036579
+54339000000 54341717426 18113000000 18113905808 933130816 934036624
+54342000000 54344717569 18114000000 18114905856 934130816 935036672
+54345000000 54347717669 18115000000 18115905889 935130816 936036705
+54348000000 54350717903 18116000000 18116905967 936130816 937036783
+54351000000 54353717976 18117000000 18117905992 937130816 938036808
+54354000000 54356718097 18118000000 18118906032 938130816 939036848
+54357000000 54359718286 18119000000 18119906095 939130816 940036911
+54360000000 54362718440 18120000000 18120906146 940130816 941036962
+54363000000 54365718619 18121000000 18121906206 941130816 942037022
+54366000000 54368718765 18122000000 18122906255 942130816 943037071
+54369000000 54371718892 18123000000 18123906297 943130816 944037113
+54372000000 54374719066 18124000000 18124906355 944130816 945037171
+54375000000 54377719130 18125000000 18125906376 945130816 946037192
+54378000000 54380719337 18126000000 18126906445 946130816 947037261
+54381000000 54383719518 18127000000 18127906506 947130816 948037322
+54384000000 54386719667 18128000000 18128906555 948130816 949037371
+54387000000 54389719724 18129000000 18129906574 949130816 950037390
+54390000000 54392719920 18130000000 18130906640 950130816 951037456
+54393000000 54395720110 18131000000 18131906703 951130816 952037519
+54396000000 54398720255 18132000000 18132906751 952130816 953037567
+54399000000 54401720427 18133000000 18133906809 953130816 954037625
+54402000000 54404720560 18134000000 18134906853 954130816 955037669
+54405000000 54407720631 18135000000 18135906877 955130816 956037693
+54408000000 54410720857 18136000000 18136906952 956130816 957037768
+54411000000 54413721017 18137000000 18137907005 957130816 958037821
+54414000000 54416721149 18138000000 18138907049 958130816 959037865
+54417000000 54419721257 18139000000 18139907085 959130816 960037901
+54420000000 54422721468 18140000000 18140907156 960130816 961037972
+54423000000 54425721634 18141000000 18141907211 961130816 962038027
+54426000000 54428721745 18142000000 18142907248 962130816 963038064
+54429000000 54431721905 18143000000 18143907301 963130816 964038117
+54432000000 54434722017 18144000000 18144907339 964130816 965038155
+54435000000 54437722215 18145000000 18145907405 965130816 966038221
+54438000000 54440722305 18146000000 18146907435 966130816 967038251
+54441000000 54443722530 18147000000 18147907510 967130816 968038326
+54444000000 54446722662 18148000000 18148907554 968130816 969038370
+54447000000 54449722801 18149000000 18149907600 969130816 970038416
+54450000000 54452722852 18150000000 18150907617 970130816 971038433
+54453000000 54455723063 18151000000 18151907687 971130816 972038503
+54456000000 54458723272 18152000000 18152907757 972130816 973038573
+54459000000 54461723400 18153000000 18153907800 973130816 974038616
+54462000000 54464723543 18154000000 18154907847 974130816 975038663
+54465000000 54467723714 18155000000 18155907904 975130816 976038720
+54468000000 54470723811 18156000000 18156907937 976130816 977038753
+54471000000 54473724024 18157000000 18157908008 977130816 978038824
+54474000000 54476724154 18158000000 18158908051 978130816 979038867
+54477000000 54479724304 18159000000 18159908101 979130816 980038917
+54480000000 54482724464 18160000000 18160908154 980130816 981038970
+54483000000 54485724560 18161000000 18161908186 981130816 982039002
+54486000000 54488724748 18162000000 18162908249 982130816 983039065
+54489000000 54491724916 18163000000 18163908305 983130816 984039121
+54492000000 54494725052 18164000000 18164908350 984130816 985039166
+54495000000 54497725227 18165000000 18165908409 985130816 986039225
+54498000000 54500725349 18166000000 18166908449 986130816 987039265
+54501000000 54503725499 18167000000 18167908499 987130816 988039315
+54504000000 54506725647 18168000000 18168908549 988130816 989039365
+54507000000 54509725853 18169000000 18169908617 989130816 990039433
+54510000000 54512725967 18170000000 18170908655 990130816 991039471
+54513000000 54515726099 18171000000 18171908699 991130816 992039515
+54516000000 54518726273 18172000000 18172908757 992130816 993039573
+54519000000 54521726392 18173000000 18173908797 993130816 994039613
+54522000000 54524726516 18174000000 18174908838 994130816 995039654
+54525000000 54527726735 18175000000 18175908911 995130816 996039727
+54528000000 54530726871 18176000000 18176908957 996130816 997039773
+54531000000 54533727022 18177000000 18177909007 997130816 998039823
+54534000000 54536727182 18178000000 18178909060 998130816 999039876
+54537000000 54539727303 18179000000 18179909101 999130816 1000039917
+54540000000 54542727384 18180000000 18180909128 1000130816 1001039944
+54543000000 54545727592 18181000000 18181909197 1001130816 1002040013
+54546000000 54548727747 18182000000 18182909249 1002130816 1003040065
+54549000000 54551727906 18183000000 18183909302 1003130816 1004040118
+54552000000 54554728058 18184000000 18184909352 1004130816 1005040168
+54555000000 54557728180 18185000000 18185909393 1005130816 1006040209
+54558000000 54560728358 18186000000 18186909452 1006130816 1007040268
+54561000000 54563728507 18187000000 18187909502 1007130816 1008040318
+54564000000 54566728635 18188000000 18188909545 1008130816 1009040361
+54567000000 54569728804 18189000000 18189909601 1009130816 1010040417
+54570000000 54572728924 18190000000 18190909641 1010130816 1011040457
+54573000000 54575728851 18191000000 18191909617 1011130816 1012040433
+54576000000 54578729174 18192000000 18192909724 1012130816 1013040540
+54579000000 54581729427 18193000000 18193909809 1013130816 1014040625
+54582000000 54584729537 18194000000 18194909845 1014130816 1015040661
+54585000000 54587729716 18195000000 18195909905 1015130816 1016040721
+54588000000 54590729764 18196000000 18196909921 1016130816 1017040737
+54591000000 54593730018 18197000000 18197910006 1017130816 1018040822
+54594000000 54596730137 18198000000 18198910045 1018130816 1019040861
+54597000000 54599730308 18199000000 18199910102 1019130816 1020040918
+54600000000 54602730455 18200000000 18200910151 1020130816 1021040967
+54603000000 54605730608 18201000000 18201910202 1021130816 1022041018
+54606000000 54608730754 18202000000 18202910251 1022130816 1023041067
+54609000000 54611730898 18203000000 18203910299 1023130816 1024041115
+54612000000 54614731061 18204000000 18204910353 1024130816 1025041169
+54615000000 54617731213 18205000000 18205910404 1025130816 1026041220
+54618000000 54620731367 18206000000 18206910455 1026130816 1027041271
+54621000000 54623731487 18207000000 18207910495 1027130816 1028041311
+54624000000 54626731696 18208000000 18208910565 1028130816 1029041381
+54627000000 54629731826 18209000000 18209910608 1029130816 1030041424
+54630000000 54632731940 18210000000 18210910646 1030130816 1031041462
+54633000000 54635732101 18211000000 18211910700 1031130816 1032041516
+54636000000 54638732236 18212000000 18212910745 1032130816 1033041561
+54639000000 54641732379 18213000000 18213910793 1033130816 1034041609
+54642000000 54644732479 18214000000 18214910826 1034130816 1035041642
+54645000000 54647732713 18215000000 18215910904 1035130816 1036041720
+54648000000 54650732786 18216000000 18216910928 1036130816 1037041744
+54651000000 54653732907 18217000000 18217910969 1037130816 1038041785
+54654000000 54656733096 18218000000 18218911032 1038130816 1039041848
+54657000000 54659733250 18219000000 18219911083 1039130816 1040041899
+54660000000 54662733429 18220000000 18220911143 1040130816 1041041959
+54663000000 54665733575 18221000000 18221911191 1041130816 1042042007
+54666000000 54668733702 18222000000 18222911234 1042130816 1043042050
+54669000000 54671733876 18223000000 18223911292 1043130816 1044042108
+54672000000 54674733940 18224000000 18224911313 1044130816 1045042129
+54675000000 54677734147 18225000000 18225911382 1045130816 1046042198
+54678000000 54680734328 18226000000 18226911442 1046130816 1047042258
+54681000000 54683734477 18227000000 18227911492 1047130816 1048042308
+54684000000 54686734534 18228000000 18228911511 1048130816 1049042327
+54687000000 54689734730 18229000000 18229911576 1049130816 1050042392
+54690000000 54692734920 18230000000 18230911640 1050130816 1051042456
+54693000000 54695735065 18231000000 18231911688 1051130816 1052042504
+54696000000 54698735237 18232000000 18232911745 1052130816 1053042561
+54699000000 54701735370 18233000000 18233911790 1053130816 1054042606
+54702000000 54704735441 18234000000 18234911813 1054130816 1055042629
+54705000000 54707735667 18235000000 18235911889 1055130816 1056042705
+54708000000 54710735827 18236000000 18236911942 1056130816 1057042758
+54711000000 54713735959 18237000000 18237911986 1057130816 1058042802
+54714000000 54716736067 18238000000 18238912022 1058130816 1059042838
+54717000000 54719736278 18239000000 18239912092 1059130816 1060042908
+54720000000 54722736444 18240000000 18240912148 1060130816 1061042964
+54723000000 54725736555 18241000000 18241912185 1061130816 1062043001
+54726000000 54728736715 18242000000 18242912238 1062130816 1063043054
+54729000000 54731736827 18243000000 18243912275 1063130816 1064043091
+54732000000 54734737025 18244000000 18244912341 1064130816 1065043157
+54735000000 54737737115 18245000000 18245912371 1065130816 1066043187
+54738000000 54740737340 18246000000 18246912446 1066130816 1067043262
+54741000000 54743737472 18247000000 18247912490 1067130816 1068043306
+54744000000 54746737611 18248000000 18248912537 1068130816 1069043353
+54747000000 54749737662 18249000000 18249912554 1069130816 1070043370
+54750000000 54752737873 18250000000 18250912624 1070130816 1071043440
+54753000000 54755738082 18251000000 18251912694 1071130816 1072043510
+54756000000 54758738210 18252000000 18252912736 1072130816 1073043552
+54759000000 54761738353 18253000000 18253912784 1073130816 1074043600
+54762000000 54764738524 18254000000 18254912841 1074130816 1075043657
+54765000000 54767738621 18255000000 18255912873 1075130816 1076043689
+54768000000 54770738834 18256000000 18256912944 1076130816 1077043760
+54771000000 54773738964 18257000000 18257912988 1077130816 1078043804
+54774000000 54776739114 18258000000 18258913038 1078130816 1079043854
+54777000000 54779739274 18259000000 18259913091 1079130816 1080043907
+54780000000 54782739370 18260000000 18260913123 1080130816 1081043939
+54783000000 54785739558 18261000000 18261913186 1081130816 1082044002
+54786000000 54788739726 18262000000 18262913242 1082130816 1083044058
+54789000000 54791739862 18263000000 18263913287 1083130816 1084044103
+54792000000 54794740037 18264000000 18264913345 1084130816 1085044161
+54795000000 54797740159 18265000000 18265913386 1085130816 1086044202
+54798000000 54800740309 18266000000 18266913436 1086130816 1087044252
+54801000000 54803740457 18267000000 18267913485 1087130816 1088044301
+54804000000 54806740663 18268000000 18268913554 1088130816 1089044370
+54807000000 54809740777 18269000000 18269913592 1089130816 1090044408
+54810000000 54812740909 18270000000 18270913636 1090130816 1091044452
+54813000000 54815741083 18271000000 18271913694 1091130816 1092044510
+54816000000 54818741202 18272000000 18272913734 1092130816 1093044550
+54819000000 54821741326 18273000000 18273913775 1093130816 1094044591
+54822000000 54824741545 18274000000 18274913848 1094130816 1095044664
+54825000000 54827741681 18275000000 18275913893 1095130816 1096044709
+54828000000 54830741832 18276000000 18276913944 1096130816 1097044760
+54831000000 54833741992 18277000000 18277913997 1097130816 1098044813
+54834000000 54836742113 18278000000 18278914037 1098130816 1099044853
+54837000000 54839742194 18279000000 18279914064 1099130816 1100044880
+54840000000 54842742402 18280000000 18280914134 1100130816 1101044950
+54843000000 54845742557 18281000000 18281914185 1101130816 1102045001
+54846000000 54848742716 18282000000 18282914238 1102130816 1103045054
+54849000000 54851742868 18283000000 18283914289 1103130816 1104045105
+54852000000 54854742990 18284000000 18284914330 1104130816 1105045146
+54855000000 54857743168 18285000000 18285914389 1105130816 1106045205
+54858000000 54860743317 18286000000 18286914439 1106130816 1107045255
+54861000000 54863743445 18287000000 18287914481 1107130816 1108045297
+54864000000 54866743614 18288000000 18288914538 1108130816 1109045354
+54867000000 54869743734 18289000000 18289914578 1109130816 1110045394
+54870000000 54872743661 18290000000 18290914553 1110130816 1111045369
+54873000000 54875743984 18291000000 18291914661 1111130816 1112045477
+54876000000 54878744237 18292000000 18292914745 1112130816 1113045561
+54879000000 54881744347 18293000000 18293914782 1113130816 1114045598
+54882000000 54884744526 18294000000 18294914842 1114130816 1115045658
+54885000000 54887744574 18295000000 18295914858 1115130816 1116045674
+54888000000 54890744828 18296000000 18296914942 1116130816 1117045758
+54891000000 54893744947 18297000000 18297914982 1117130816 1118045798
+54894000000 54896745118 18298000000 18298915039 1118130816 1119045855
+54897000000 54899745265 18299000000 18299915088 1119130816 1120045904
+54900000000 54902745418 18300000000 18300915139 1120130816 1121045955
+54903000000 54905745564 18301000000 18301915188 1121130816 1122046004
+54906000000 54908745708 18302000000 18302915236 1122130816 1123046052
+54909000000 54911745871 18303000000 18303915290 1123130816 1124046106
+54912000000 54914746023 18304000000 18304915341 1124130816 1125046157
+54915000000 54917746177 18305000000 18305915392 1125130816 1126046208
+54918000000 54920746297 18306000000 18306915432 1126130816 1127046248
+54921000000 54923746506 18307000000 18307915502 1127130816 1128046318
+54924000000 54926746636 18308000000 18308915545 1128130816 1129046361
+54927000000 54929746750 18309000000 18309915583 1129130816 1130046399
+54930000000 54932746911 18310000000 18310915637 1130130816 1131046453
+54933000000 54935747046 18311000000 18311915682 1131130816 1132046498
+54936000000 54938747189 18312000000 18312915729 1132130816 1133046545
+54939000000 54941747289 18313000000 18313915763 1133130816 1134046579
+54942000000 54944747523 18314000000 18314915841 1134130816 1135046657
+54945000000 54947747596 18315000000 18315915865 1135130816 1136046681
+54948000000 54950747717 18316000000 18316915905 1136130816 1137046721
+54951000000 54953747906 18317000000 18317915968 1137130816 1138046784
+54954000000 54956748060 18318000000 18318916020 1138130816 1139046836
+54957000000 54959748239 18319000000 18319916079 1139130816 1140046895
+54960000000 54962748385 18320000000 18320916128 1140130816 1141046944
+54963000000 54965748512 18321000000 18321916170 1141130816 1142046986
+54966000000 54968748686 18322000000 18322916228 1142130816 1143047044
+54969000000 54971748750 18323000000 18323916250 1143130816 1144047066
+54972000000 54974748957 18324000000 18324916319 1144130816 1145047135
+54975000000 54977749138 18325000000 18325916379 1145130816 1146047195
+54978000000 54980749287 18326000000 18326916429 1146130816 1147047245
+54981000000 54983749344 18327000000 18327916448 1147130816 1148047264
+54984000000 54986749540 18328000000 18328916513 1148130816 1149047329
+54987000000 54989749730 18329000000 18329916576 1149130816 1150047392
+54990000000 54992749875 18330000000 18330916625 1150130816 1151047441
+54993000000 54995750047 18331000000 18331916682 1151130816 1152047498
+54996000000 54998750180 18332000000 18332916726 1152130816 1153047542
+54999000000 55001750251 18333000000 18333916750 1153130816 1154047566
+55002000000 55004750477 18334000000 18334916825 1154130816 1155047641
+55005000000 55007750637 18335000000 18335916879 1155130816 1156047695
+55008000000 55010750769 18336000000 18336916923 1156130816 1157047739
+55011000000 55013750877 18337000000 18337916959 1157130816 1158047775
+55014000000 55016751088 18338000000 18338917029 1158130816 1159047845
+55017000000 55019751254 18339000000 18339917084 1159130816 1160047900
+55020000000 55022751365 18340000000 18340917121 1160130816 1161047937
+55023000000 55025751525 18341000000 18341917175 1161130816 1162047991
+55026000000 55028751637 18342000000 18342917212 1162130816 1163048028
+55029000000 55031751835 18343000000 18343917278 1163130816 1164048094
+55032000000 55034751925 18344000000 18344917308 1164130816 1165048124
+55035000000 55037752150 18345000000 18345917383 1165130816 1166048199
+55038000000 55040752282 18346000000 18346917427 1166130816 1167048243
+55041000000 55043752421 18347000000 18347917473 1167130816 1168048289
+55044000000 55046752472 18348000000 18348917490 1168130816 1169048306
+55047000000 55049752683 18349000000 18349917561 1169130816 1170048377
+55050000000 55052752892 18350000000 18350917630 1170130816 1171048446
+55053000000 55055753020 18351000000 18351917673 1171130816 1172048489
+55056000000 55058753163 18352000000 18352917721 1172130816 1173048537
+55059000000 55061753334 18353000000 18353917778 1173130816 1174048594
+55062000000 55064753431 18354000000 18354917810 1174130816 1175048626
+55065000000 55067753644 18355000000 18355917881 1175130816 1176048697
+55068000000 55070753774 18356000000 18356917924 1176130816 1177048740
+55071000000 55073753924 18357000000 18357917974 1177130816 1178048790
+55074000000 55076754084 18358000000 18358918028 1178130816 1179048844
+55077000000 55079754180 18359000000 18359918060 1179130816 1180048876
+55080000000 55082754368 18360000000 18360918122 1180130816 1181048938
+55083000000 55085754536 18361000000 18361918178 1181130816 1182048994
+55086000000 55088754672 18362000000 18362918224 1182130816 1183049040
+55089000000 55091754847 18363000000 18363918282 1183130816 1184049098
+55092000000 55094754969 18364000000 18364918323 1184130816 1185049139
+55095000000 55097755119 18365000000 18365918373 1185130816 1186049189
+55098000000 55100755267 18366000000 18366918422 1186130816 1187049238
+55101000000 55103755473 18367000000 18367918491 1187130816 1188049307
+55104000000 55106755587 18368000000 18368918529 1188130816 1189049345
+55107000000 55109755719 18369000000 18369918573 1189130816 1190049389
+55110000000 55112755893 18370000000 18370918631 1190130816 1191049447
+55113000000 55115756012 18371000000 18371918670 1191130816 1192049486
+55116000000 55118756136 18372000000 18372918712 1192130816 1193049528
+55119000000 55121756355 18373000000 18373918785 1193130816 1194049601
+55122000000 55124756491 18374000000 18374918830 1194130816 1195049646
+55125000000 55127756642 18375000000 18375918880 1195130816 1196049696
+55128000000 55130756802 18376000000 18376918934 1196130816 1197049750
+55131000000 55133756923 18377000000 18377918974 1197130816 1198049790
+55134000000 55136757004 18378000000 18378919001 1198130816 1199049817
+55137000000 55139757212 18379000000 18379919070 1199130816 1200049886
+55140000000 55142757367 18380000000 18380919122 1200130816 1201049938
+55143000000 55145757526 18381000000 18381919175 1201130816 1202049991
+55146000000 55148757678 18382000000 18382919226 1202130816 1203050042
+55149000000 55151757800 18383000000 18383919266 1203130816 1204050082
+55152000000 55154757978 18384000000 18384919326 1204130816 1205050142
+55155000000 55157758127 18385000000 18385919375 1205130816 1206050191
+55158000000 55160758255 18386000000 18386919418 1206130816 1207050234
+55161000000 55163758424 18387000000 18387919474 1207130816 1208050290
+55164000000 55166758544 18388000000 18388919514 1208130816 1209050330
+55167000000 55169758471 18389000000 18389919490 1209130816 1210050306
+55170000000 55172758794 18390000000 18390919598 1210130816 1211050414
+55173000000 55175759047 18391000000 18391919682 1211130816 1212050498
+55176000000 55178759157 18392000000 18392919719 1212130816 1213050535
+55179000000 55181759336 18393000000 18393919778 1213130816 1214050594
+55182000000 55184759384 18394000000 18394919794 1214130816 1215050610
+55185000000 55187759638 18395000000 18395919879 1215130816 1216050695
+55188000000 55190759757 18396000000 18396919919 1216130816 1217050735
+55191000000 55193759928 18397000000 18397919976 1217130816 1218050792
+55194000000 55196760075 18398000000 18398920025 1218130816 1219050841
+55197000000 55199760228 18399000000 18399920076 1219130816 1220050892
+55200000000 55202760374 18400000000 18400920124 1220130816 1221050940
+55203000000 55205760518 18401000000 18401920172 1221130816 1222050988
+55206000000 55208760681 18402000000 18402920227 1222130816 1223051043
+55209000000 55211760833 18403000000 18403920277 1223130816 1224051093
+55212000000 55214760987 18404000000 18404920329 1224130816 1225051145
+55215000000 55217761107 18405000000 18405920369 1225130816 1226051185
+55218000000 55220761316 18406000000 18406920438 1226130816 1227051254
+55221000000 55223761446 18407000000 18407920482 1227130816 1228051298
+55224000000 55226761560 18408000000 18408920520 1228130816 1229051336
+55227000000 55229761721 18409000000 18409920573 1229130816 1230051389
+55230000000 55232761856 18410000000 18410920618 1230130816 1231051434
+55233000000 55235761999 18411000000 18411920666 1231130816 1232051482
+55236000000 55238762099 18412000000 18412920699 1232130816 1233051515
+55239000000 55241762333 18413000000 18413920777 1233130816 1234051593
+55242000000 55244762406 18414000000 18414920802 1234130816 1235051618
+55245000000 55247762527 18415000000 18415920842 1235130816 1236051658
+55248000000 55250762716 18416000000 18416920905 1236130816 1237051721
+55251000000 55253762870 18417000000 18417920956 1237130816 1238051772
+55254000000 55256763049 18418000000 18418921016 1238130816 1239051832
+55257000000 55259763195 18419000000 18419921065 1239130816 1240051881
+55260000000 55262763322 18420000000 18420921107 1240130816 1241051923
+55263000000 55265763496 18421000000 18421921165 1241130816 1242051981
+55266000000 55268763560 18422000000 18422921186 1242130816 1243052002
+55269000000 55271763767 18423000000 18423921255 1243130816 1244052071
+55272000000 55274763948 18424000000 18424921316 1244130816 1245052132
+55275000000 55277764097 18425000000 18425921365 1245130816 1246052181
+55278000000 55280764154 18426000000 18426921384 1246130816 1247052200
+55281000000 55283764350 18427000000 18427921450 1247130816 1248052266
+55284000000 55286764540 18428000000 18428921513 1248130816 1249052329
+55287000000 55289764685 18429000000 18429921561 1249130816 1250052377
+55290000000 55292764857 18430000000 18430921619 1250130816 1251052435
+55293000000 55295764990 18431000000 18431921663 1251130816 1252052479
+55296000000 55298765061 18432000000 18432921687 1252130816 1253052503
+55299000000 55301765287 18433000000 18433921762 1253130816 1254052578
+55302000000 55304765447 18434000000 18434921815 1254130816 1255052631
+55305000000 55307765579 18435000000 18435921859 1255130816 1256052675
+55308000000 55310765687 18436000000 18436921895 1256130816 1257052711
+55311000000 55313765898 18437000000 18437921966 1257130816 1258052782
+55314000000 55316766064 18438000000 18438922021 1258130816 1259052837
+55317000000 55319766175 18439000000 18439922058 1259130816 1260052874
+55320000000 55322766335 18440000000 18440922111 1260130816 1261052927
+55323000000 55325766447 18441000000 18441922149 1261130816 1262052965
+55326000000 55328766645 18442000000 18442922215 1262130816 1263053031
+55329000000 55331766735 18443000000 18443922245 1263130816 1264053061
+55332000000 55334766960 18444000000 18444922320 1264130816 1265053136
+55335000000 55337767092 18445000000 18445922364 1265130816 1266053180
+55338000000 55340767231 18446000000 18446922410 1266130816 1267053226
+55341000000 55343767282 18447000000 18447922427 1267130816 1268053243
+55344000000 55346767493 18448000000 18448922497 1268130816 1269053313
+55347000000 55349767702 18449000000 18449922567 1269130816 1270053383
+55350000000 55352767830 18450000000 18450922610 1270130816 1271053426
+55353000000 55355767973 18451000000 18451922657 1271130816 1272053473
+55356000000 55358768144 18452000000 18452922714 1272130816 1273053530
+55359000000 55361768241 18453000000 18453922747 1273130816 1274053563
+55362000000 55364768454 18454000000 18454922818 1274130816 1275053634
+55365000000 55367768584 18455000000 18455922861 1275130816 1276053677
+55368000000 55370768734 18456000000 18456922911 1276130816 1277053727
+55371000000 55373768894 18457000000 18457922964 1277130816 1278053780
+55374000000 55376768990 18458000000 18458922996 1278130816 1279053812
+55377000000 55379769178 18459000000 18459923059 1279130816 1280053875
+55380000000 55382769346 18460000000 18460923115 1280130816 1281053931
+55383000000 55385769482 18461000000 18461923160 1281130816 1282053976
+55386000000 55388769657 18462000000 18462923219 1282130816 1283054035
+55389000000 55391769779 18463000000 18463923259 1283130816 1284054075
+55392000000 55394769929 18464000000 18464923309 1284130816 1285054125
+55395000000 55397770077 18465000000 18465923359 1285130816 1286054175
+55398000000 55400770283 18466000000 18466923427 1286130816 1287054243
+55401000000 55403770397 18467000000 18467923465 1287130816 1288054281
+55404000000 55406770529 18468000000 18468923509 1288130816 1289054325
+55407000000 55409770703 18469000000 18469923567 1289130816 1290054383
+55410000000 55412770822 18470000000 18470923607 1290130816 1291054423
+55413000000 55415770946 18471000000 18471923648 1291130816 1292054464
+55416000000 55418771165 18472000000 18472923721 1292130816 1293054537
+55419000000 55421771301 18473000000 18473923767 1293130816 1294054583
+55422000000 55424771452 18474000000 18474923817 1294130816 1295054633
+55425000000 55427771612 18475000000 18475923870 1295130816 1296054686
+55428000000 55430771733 18476000000 18476923911 1296130816 1297054727
+55431000000 55433771814 18477000000 18477923938 1297130816 1298054754
+55434000000 55436772022 18478000000 18478924007 1298130816 1299054823
+55437000000 55439772177 18479000000 18479924059 1299130816 1300054875
+55440000000 55442772336 18480000000 18480924112 1300130816 1301054928
+55443000000 55445772488 18481000000 18481924162 1301130816 1302054978
+55446000000 55448772610 18482000000 18482924203 1302130816 1303055019
+55449000000 55451772788 18483000000 18483924262 1303130816 1304055078
+55452000000 55454772937 18484000000 18484924312 1304130816 1305055128
+55455000000 55457773065 18485000000 18485924355 1305130816 1306055171
+55458000000 55460773234 18486000000 18486924411 1306130816 1307055227
+55461000000 55463773354 18487000000 18487924451 1307130816 1308055267
+55464000000 55466773281 18488000000 18488924427 1308130816 1309055243
+55467000000 55469773604 18489000000 18489924534 1309130816 1310055350
+55470000000 55472773857 18490000000 18490924619 1310130816 1311055435
+55473000000 55475773967 18491000000 18491924655 1311130816 1312055471
+55476000000 55478774146 18492000000 18492924715 1312130816 1313055531
+55479000000 55481774194 18493000000 18493924731 1313130816 1314055547
+55482000000 55484774448 18494000000 18494924816 1314130816 1315055632
+55485000000 55487774567 18495000000 18495924855 1315130816 1316055671
+55488000000 55490774738 18496000000 18496924912 1316130816 1317055728
+55491000000 55493774885 18497000000 18497924961 1317130816 1318055777
+55494000000 55496775038 18498000000 18498925012 1318130816 1319055828
+55497000000 55499775184 18499000000 18499925061 1319130816 1320055877
+55500000000 55502775328 18500000000 18500925109 1320130816 1321055925
+55503000000 55505775491 18501000000 18501925163 1321130816 1322055979
+55506000000 55508775643 18502000000 18502925214 1322130816 1323056030
+55509000000 55511775797 18503000000 18503925265 1323130816 1324056081
+55512000000 55514775917 18504000000 18504925305 1324130816 1325056121
+55515000000 55517776126 18505000000 18505925375 1325130816 1326056191
+55518000000 55520776256 18506000000 18506925418 1326130816 1327056234
+55521000000 55523776370 18507000000 18507925456 1327130816 1328056272
+55524000000 55526776531 18508000000 18508925510 1328130816 1329056326
+55527000000 55529776666 18509000000 18509925555 1329130816 1330056371
+55530000000 55532776809 18510000000 18510925603 1330130816 1331056419
+55533000000 55535776909 18511000000 18511925636 1331130816 1332056452
+55536000000 55538777143 18512000000 18512925714 1332130816 1333056530
+55539000000 55541777216 18513000000 18513925738 1333130816 1334056554
+55542000000 55544777337 18514000000 18514925779 1334130816 1335056595
+55545000000 55547777526 18515000000 18515925842 1335130816 1336056658
+55548000000 55550777680 18516000000 18516925893 1336130816 1337056709
+55551000000 55553777859 18517000000 18517925953 1337130816 1338056769
+55554000000 55556778005 18518000000 18518926001 1338130816 1339056817
+55557000000 55559778132 18519000000 18519926044 1339130816 1340056860
+55560000000 55562778306 18520000000 18520926102 1340130816 1341056918
+55563000000 55565778370 18521000000 18521926123 1341130816 1342056939
+55566000000 55568778577 18522000000 18522926192 1342130816 1343057008
+55569000000 55571778758 18523000000 18523926252 1343130816 1344057068
+55572000000 55574778907 18524000000 18524926302 1344130816 1345057118
+55575000000 55577778964 18525000000 18525926321 1345130816 1346057137
+55578000000 55580779160 18526000000 18526926386 1346130816 1347057202
+55581000000 55583779350 18527000000 18527926450 1347130816 1348057266
+55584000000 55586779495 18528000000 18528926498 1348130816 1349057314
+55587000000 55589779667 18529000000 18529926555 1349130816 1350057371
+55590000000 55592779800 18530000000 18530926600 1350130816 1351057416
+55593000000 55595779871 18531000000 18531926623 1351130816 1352057439
+55596000000 55598780097 18532000000 18532926699 1352130816 1353057515
+55599000000 55601780257 18533000000 18533926752 1353130816 1354057568
+55602000000 55604780389 18534000000 18534926796 1354130816 1355057612
+55605000000 55607780497 18535000000 18535926832 1355130816 1356057648
+55608000000 55610780708 18536000000 18536926902 1356130816 1357057718
+55611000000 55613780874 18537000000 18537926958 1357130816 1358057774
+55614000000 55616780985 18538000000 18538926995 1358130816 1359057811
+55617000000 55619781145 18539000000 18539927048 1359130816 1360057864
+55620000000 55622781257 18540000000 18540927085 1360130816 1361057901
+55623000000 55625781455 18541000000 18541927151 1361130816 1362057967
+55626000000 55628781545 18542000000 18542927181 1362130816 1363057997
+55629000000 55631781770 18543000000 18543927256 1363130816 1364058072
+55632000000 55634781902 18544000000 18544927300 1364130816 1365058116
+55635000000 55637782041 18545000000 18545927347 1365130816 1366058163
+55638000000 55640782092 18546000000 18546927364 1366130816 1367058180
+55641000000 55643782303 18547000000 18547927434 1367130816 1368058250
+55644000000 55646782512 18548000000 18548927504 1368130816 1369058320
+55647000000 55649782640 18549000000 18549927546 1369130816 1370058362
+55650000000 55652782783 18550000000 18550927594 1370130816 1371058410
+55653000000 55655782954 18551000000 18551927651 1371130816 1372058467
+55656000000 55658783051 18552000000 18552927683 1372130816 1373058499
+55659000000 55661783264 18553000000 18553927754 1373130816 1374058570
+55662000000 55664783394 18554000000 18554927798 1374130816 1375058614
+55665000000 55667783544 18555000000 18555927848 1375130816 1376058664
+55668000000 55670783704 18556000000 18556927901 1376130816 1377058717
+55671000000 55673783800 18557000000 18557927933 1377130816 1378058749
+55674000000 55676783988 18558000000 18558927996 1378130816 1379058812
+55677000000 55679784156 18559000000 18559928052 1379130816 1380058868
+55680000000 55682784292 18560000000 18560928097 1380130816 1381058913
+55683000000 55685784467 18561000000 18561928155 1381130816 1382058971
+55686000000 55688784589 18562000000 18562928196 1382130816 1383059012
+55689000000 55691784739 18563000000 18563928246 1383130816 1384059062
+55692000000 55694784887 18564000000 18564928295 1384130816 1385059111
+55695000000 55697785093 18565000000 18565928364 1385130816 1386059180
+55698000000 55700785207 18566000000 18566928402 1386130816 1387059218
+55701000000 55703785339 18567000000 18567928446 1387130816 1388059262
+55704000000 55706785513 18568000000 18568928504 1388130816 1389059320
+55707000000 55709785632 18569000000 18569928544 1389130816 1390059360
+55710000000 55712785756 18570000000 18570928585 1390130816 1391059401
+55713000000 55715785975 18571000000 18571928658 1391130816 1392059474
+55716000000 55718786111 18572000000 18572928703 1392130816 1393059519
+55719000000 55721786262 18573000000 18573928754 1393130816 1394059570
+55722000000 55724786422 18574000000 18574928807 1394130816 1395059623
+55725000000 55727786543 18575000000 18575928847 1395130816 1396059663
+55728000000 55730786624 18576000000 18576928874 1396130816 1397059690
+55731000000 55733786832 18577000000 18577928944 1397130816 1398059760
+55734000000 55736786987 18578000000 18578928995 1398130816 1399059811
+55737000000 55739787146 18579000000 18579929048 1399130816 1400059864
+55740000000 55742787298 18580000000 18580929099 1400130816 1401059915
+55743000000 55745787420 18581000000 18581929140 1401130816 1402059956
+55746000000 55748787598 18582000000 18582929199 1402130816 1403060015
+55749000000 55751787747 18583000000 18583929249 1403130816 1404060065
+55752000000 55754787875 18584000000 18584929291 1404130816 1405060107
+55755000000 55757788044 18585000000 18585929348 1405130816 1406060164
+55758000000 55760788164 18586000000 18586929388 1406130816 1407060204
+55761000000 55763788091 18587000000 18587929363 1407130816 1408060179
+55764000000 55766788414 18588000000 18588929471 1408130816 1409060287
+55767000000 55769788667 18589000000 18589929555 1409130816 1410060371
+55770000000 55772788777 18590000000 18590929592 1410130816 1411060408
+55773000000 55775788956 18591000000 18591929652 1411130816 1412060468
+55776000000 55778789004 18592000000 18592929668 1412130816 1413060484
+55779000000 55781789258 18593000000 18593929752 1413130816 1414060568
+55782000000 55784789377 18594000000 18594929792 1414130816 1415060608
+55785000000 55787789548 18595000000 18595929849 1415130816 1416060665
+55788000000 55790789695 18596000000 18596929898 1416130816 1417060714
+55791000000 55793789848 18597000000 18597929949 1417130816 1418060765
+55794000000 55796789994 18598000000 18598929998 1418130816 1419060814
+55797000000 55799790138 18599000000 18599930046 1419130816 1420060862
+55800000000 55802790301 18600000000 18600930100 1420130816 1421060916
+55803000000 55805790453 18601000000 18601930151 1421130816 1422060967
+55806000000 55808790607 18602000000 18602930202 1422130816 1423061018
+55809000000 55811790727 18603000000 18603930242 1423130816 1424061058
+55812000000 55814790936 18604000000 18604930312 1424130816 1425061128
+55815000000 55817791066 18605000000 18605930355 1425130816 1426061171
+55818000000 55820791180 18606000000 18606930393 1426130816 1427061209
+55821000000 55823791341 18607000000 18607930447 1427130816 1428061263
+55824000000 55826791476 18608000000 18608930492 1428130816 1429061308
+55827000000 55829791619 18609000000 18609930539 1429130816 1430061355
+55830000000 55832791719 18610000000 18610930573 1430130816 1431061389
+55833000000 55835791953 18611000000 18611930651 1431130816 1432061467
+55836000000 55838792026 18612000000 18612930675 1432130816 1433061491
+55839000000 55841792147 18613000000 18613930715 1433130816 1434061531
+55842000000 55844792336 18614000000 18614930778 1434130816 1435061594
+55845000000 55847792490 18615000000 18615930830 1435130816 1436061646
+55848000000 55850792669 18616000000 18616930889 1436130816 1437061705
+55851000000 55853792815 18617000000 18617930938 1437130816 1438061754
+55854000000 55856792942 18618000000 18618930980 1438130816 1439061796
+55857000000 55859793116 18619000000 18619931038 1439130816 1440061854
+55860000000 55862793180 18620000000 18620931060 1440130816 1441061876
+55863000000 55865793387 18621000000 18621931129 1441130816 1442061945
+55866000000 55868793568 18622000000 18622931189 1442130816 1443062005
+55869000000 55871793717 18623000000 18623931239 1443130816 1444062055
+55872000000 55874793774 18624000000 18624931258 1444130816 1445062074
+55875000000 55877793970 18625000000 18625931323 1445130816 1446062139
+55878000000 55880794160 18626000000 18626931386 1446130816 1447062202
+55881000000 55883794305 18627000000 18627931435 1447130816 1448062251
+55884000000 55886794477 18628000000 18628931492 1448130816 1449062308
+55887000000 55889794610 18629000000 18629931536 1449130816 1450062352
+55890000000 55892794681 18630000000 18630931560 1450130816 1451062376
+55893000000 55895794907 18631000000 18631931635 1451130816 1452062451
+55896000000 55898795067 18632000000 18632931689 1452130816 1453062505
+55899000000 55901795199 18633000000 18633931733 1453130816 1454062549
+55902000000 55904795307 18634000000 18634931769 1454130816 1455062585
+55905000000 55907795518 18635000000 18635931839 1455130816 1456062655
+55908000000 55910795684 18636000000 18636931894 1456130816 1457062710
+55911000000 55913795795 18637000000 18637931931 1457130816 1458062747
+55914000000 55916795955 18638000000 18638931985 1458130816 1459062801
+55917000000 55919796067 18639000000 18639932022 1459130816 1460062838
+55920000000 55922796265 18640000000 18640932088 1460130816 1461062904
+55923000000 55925796355 18641000000 18641932118 1461130816 1462062934
+55926000000 55928796580 18642000000 18642932193 1462130816 1463063009
+55929000000 55931796712 18643000000 18643932237 1463130816 1464063053
+55932000000 55934796851 18644000000 18644932283 1464130816 1465063099
+55935000000 55937796902 18645000000 18645932300 1465130816 1466063116
+55938000000 55940797113 18646000000 18646932371 1466130816 1467063187
+55941000000 55943797322 18647000000 18647932440 1467130816 1468063256
+55944000000 55946797450 18648000000 18648932483 1468130816 1469063299
+55947000000 55949797593 18649000000 18649932531 1469130816 1470063347
+55950000000 55952797764 18650000000 18650932588 1470130816 1471063404
+55953000000 55955797861 18651000000 18651932620 1471130816 1472063436
+55956000000 55958798074 18652000000 18652932691 1472130816 1473063507
+55959000000 55961798204 18653000000 18653932734 1473130816 1474063550
+55962000000 55964798354 18654000000 18654932784 1474130816 1475063600
+55965000000 55967798514 18655000000 18655932838 1475130816 1476063654
+55968000000 55970798610 18656000000 18656932870 1476130816 1477063686
+55971000000 55973798798 18657000000 18657932932 1477130816 1478063748
+55974000000 55976798966 18658000000 18658932988 1478130816 1479063804
+55977000000 55979799102 18659000000 18659933034 1479130816 1480063850
+55980000000 55982799277 18660000000 18660933092 1480130816 1481063908
+55983000000 55985799399 18661000000 18661933133 1481130816 1482063949
+55986000000 55988799549 18662000000 18662933183 1482130816 1483063999
+55989000000 55991799697 18663000000 18663933232 1483130816 1484064048
+55992000000 55994799903 18664000000 18664933301 1484130816 1485064117
+55995000000 55997800017 18665000000 18665933339 1485130816 1486064155
+55998000000 56000800149 18666000000 18666933383 1486130816 1487064199
+56001000000 56003800323 18667000000 18667933441 1487130816 1488064257
+56004000000 56006800442 18668000000 18668933480 1488130816 1489064296
+56007000000 56009800566 18669000000 18669933522 1489130816 1490064338
+56010000000 56012800785 18670000000 18670933595 1490130816 1491064411
+56013000000 56015800921 18671000000 18671933640 1491130816 1492064456
+56016000000 56018801072 18672000000 18672933690 1492130816 1493064506
+56019000000 56021801232 18673000000 18673933744 1493130816 1494064560
+56022000000 56024801353 18674000000 18674933784 1494130816 1495064600
+56025000000 56027801434 18675000000 18675933811 1495130816 1496064627
+56028000000 56030801642 18676000000 18676933880 1496130816 1497064696
+56031000000 56033801797 18677000000 18677933932 1497130816 1498064748
+56034000000 56036801956 18678000000 18678933985 1498130816 1499064801
+56037000000 56039802108 18679000000 18679934036 1499130816 1500064852
+56040000000 56042802230 18680000000 18680934076 1500130816 1501064892
+56043000000 56045802408 18681000000 18681934136 1501130816 1502064952
+56046000000 56048802557 18682000000 18682934185 1502130816 1503065001
+56049000000 56051802685 18683000000 18683934228 1503130816 1504065044
+56052000000 56054802854 18684000000 18684934284 1504130816 1505065100
+56055000000 56057802974 18685000000 18685934324 1505130816 1506065140
+56058000000 56060802901 18686000000 18686934300 1506130816 1507065116
+56061000000 56063803224 18687000000 18687934408 1507130816 1508065224
+56064000000 56066803477 18688000000 18688934492 1508130816 1509065308
+56067000000 56069803587 18689000000 18689934529 1509130816 1510065345
+56070000000 56072803766 18690000000 18690934588 1510130816 1511065404
+56073000000 56075803814 18691000000 18691934604 1511130816 1512065420
+56076000000 56078804068 18692000000 18692934689 1512130816 1513065505
+56079000000 56081804187 18693000000 18693934729 1513130816 1514065545
+56082000000 56084804358 18694000000 18694934786 1514130816 1515065602
+56085000000 56087804505 18695000000 18695934835 1515130816 1516065651
+56088000000 56090804658 18696000000 18696934886 1516130816 1517065702
+56091000000 56093804804 18697000000 18697934934 1517130816 1518065750
+56094000000 56096804948 18698000000 18698934982 1518130816 1519065798
+56097000000 56099805111 18699000000 18699935037 1519130816 1520065853
+56100000000 56102805263 18700000000 18700935087 1520130816 1521065903
+56103000000 56105805417 18701000000 18701935139 1521130816 1522065955
+56106000000 56108805537 18702000000 18702935179 1522130816 1523065995
+56109000000 56111805746 18703000000 18703935248 1523130816 1524066064
+56112000000 56114805876 18704000000 18704935292 1524130816 1525066108
+56115000000 56117805990 18705000000 18705935330 1525130816 1526066146
+56118000000 56120806151 18706000000 18706935383 1526130816 1527066199
+56121000000 56123806286 18707000000 18707935428 1527130816 1528066244
+56124000000 56126806429 18708000000 18708935476 1528130816 1529066292
+56127000000 56129806529 18709000000 18709935509 1529130816 1530066325
+56130000000 56132806763 18710000000 18710935587 1530130816 1531066403
+56133000000 56135806836 18711000000 18711935612 1531130816 1532066428
+56136000000 56138806957 18712000000 18712935652 1532130816 1533066468
+56139000000 56141807146 18713000000 18713935715 1533130816 1534066531
+56142000000 56144807300 18714000000 18714935766 1534130816 1535066582
+56145000000 56147807479 18715000000 18715935826 1535130816 1536066642
+56148000000 56150807625 18716000000 18716935875 1536130816 1537066691
+56151000000 56153807752 18717000000 18717935917 1537130816 1538066733
+56154000000 56156807926 18718000000 18718935975 1538130816 1539066791
+56157000000 56159807990 18719000000 18719935996 1539130816 1540066812
+56160000000 56162808197 18720000000 18720936065 1540130816 1541066881
+56163000000 56165808378 18721000000 18721936126 1541130816 1542066942
+56166000000 56168808527 18722000000 18722936175 1542130816 1543066991
+56169000000 56171808584 18723000000 18723936194 1543130816 1544067010
+56172000000 56174808780 18724000000 18724936260 1544130816 1545067076
+56175000000 56177808970 18725000000 18725936323 1545130816 1546067139
+56178000000 56180809115 18726000000 18726936371 1546130816 1547067187
+56181000000 56183809287 18727000000 18727936429 1547130816 1548067245
+56184000000 56186809420 18728000000 18728936473 1548130816 1549067289
+56187000000 56189809491 18729000000 18729936497 1549130816 1550067313
+56190000000 56192809717 18730000000 18730936572 1550130816 1551067388
+56193000000 56195809877 18731000000 18731936625 1551130816 1552067441
+56196000000 56198810009 18732000000 18732936669 1552130816 1553067485
+56199000000 56201810117 18733000000 18733936705 1553130816 1554067521
+56202000000 56204810328 18734000000 18734936776 1554130816 1555067592
+56205000000 56207810494 18735000000 18735936831 1555130816 1556067647
+56208000000 56210810605 18736000000 18736936868 1556130816 1557067684
+56211000000 56213810765 18737000000 18737936921 1557130816 1558067737
+56214000000 56216810877 18738000000 18738936959 1558130816 1559067775
+56217000000 56219811075 18739000000 18739937025 1559130816 1560067841
+56220000000 56222811165 18740000000 18740937055 1560130816 1561067871
+56223000000 56225811390 18741000000 18741937130 1561130816 1562067946
+56226000000 56228811522 18742000000 18742937174 1562130816 1563067990
+56229000000 56231811661 18743000000 18743937220 1563130816 1564068036
+56232000000 56234811712 18744000000 18744937237 1564130816 1565068053
+56235000000 56237811923 18745000000 18745937307 1565130816 1566068123
+56238000000 56240812132 18746000000 18746937377 1566130816 1567068193
+56241000000 56243812260 18747000000 18747937420 1567130816 1568068236
+56244000000 56246812403 18748000000 18748937467 1568130816 1569068283
+56247000000 56249812574 18749000000 18749937524 1569130816 1570068340
+56250000000 56252812671 18750000000 18750937557 1570130816 1571068373
+56253000000 56255812884 18751000000 18751937628 1571130816 1572068444
+56256000000 56258813014 18752000000 18752937671 1572130816 1573068487
+56259000000 56261813164 18753000000 18753937721 1573130816 1574068537
+56262000000 56264813324 18754000000 18754937774 1574130816 1575068590
+56265000000 56267813420 18755000000 18755937806 1575130816 1576068622
+56268000000 56270813608 18756000000 18756937869 1576130816 1577068685
+56271000000 56273813776 18757000000 18757937925 1577130816 1578068741
+56274000000 56276813912 18758000000 18758937970 1578130816 1579068786
+56277000000 56279814087 18759000000 18759938029 1579130816 1580068845
+56280000000 56282814209 18760000000 18760938069 1580130816 1581068885
+56283000000 56285814359 18761000000 18761938119 1581130816 1582068935
+56286000000 56288814507 18762000000 18762938169 1582130816 1583068985
+56289000000 56291814713 18763000000 18763938237 1583130816 1584069053
+56292000000 56294814827 18764000000 18764938275 1584130816 1585069091
+56295000000 56297814959 18765000000 18765938319 1585130816 1586069135
+56298000000 56300815133 18766000000 18766938377 1586130816 1587069193
+56301000000 56303815252 18767000000 18767938417 1587130816 1588069233
+56304000000 56306815376 18768000000 18768938458 1588130816 1589069274
+56307000000 56309815595 18769000000 18769938531 1589130816 1590069347
+56310000000 56312815731 18770000000 18770938577 1590130816 1591069393
+56313000000 56315815882 18771000000 18771938627 1591130816 1592069443
+56316000000 56318816042 18772000000 18772938680 1592130816 1593069496
+56319000000 56321816163 18773000000 18773938721 1593130816 1594069537
+56322000000 56324816244 18774000000 18774938748 1594130816 1595069564
+56325000000 56327816452 18775000000 18775938817 1595130816 1596069633
+56328000000 56330816607 18776000000 18776938869 1596130816 1597069685
+56331000000 56333816766 18777000000 18777938922 1597130816 1598069738
+56334000000 56336816918 18778000000 18778938972 1598130816 1599069788
+56337000000 56339817040 18779000000 18779939013 1599130816 1600069829
+56340000000 56342817218 18780000000 18780939072 1600130816 1601069888
+56343000000 56345817367 18781000000 18781939122 1601130816 1602069938
+56346000000 56348817495 18782000000 18782939165 1602130816 1603069981
+56349000000 56351817664 18783000000 18783939221 1603130816 1604070037
+56352000000 56354817784 18784000000 18784939261 1604130816 1605070077
+56355000000 56357817711 18785000000 18785939237 1605130816 1606070053
+56358000000 56360818034 18786000000 18786939344 1606130816 1607070160
+56361000000 56363818287 18787000000 18787939429 1607130816 1608070245
+56364000000 56366818397 18788000000 18788939465 1608130816 1609070281
+56367000000 56369818576 18789000000 18789939525 1609130816 1610070341
+56370000000 56372818624 18790000000 18790939541 1610130816 1611070357
+56373000000 56375818878 18791000000 18791939626 1611130816 1612070442
+56376000000 56378818997 18792000000 18792939665 1612130816 1613070481
+56379000000 56381819168 18793000000 18793939722 1613130816 1614070538
+56382000000 56384819315 18794000000 18794939771 1614130816 1615070587
+56385000000 56387819468 18795000000 18795939822 1615130816 1616070638
+56388000000 56390819614 18796000000 18796939871 1616130816 1617070687
+56391000000 56393819758 18797000000 18797939919 1617130816 1618070735
+56394000000 56396819921 18798000000 18798939973 1618130816 1619070789
+56397000000 56399820073 18799000000 18799940024 1619130816 1620070840
+56400000000 56402820227 18800000000 18800940075 1620130816 1621070891
+56403000000 56405820347 18801000000 18801940115 1621130816 1622070931
+56406000000 56408820556 18802000000 18802940185 1622130816 1623071001
+56409000000 56411820686 18803000000 18803940228 1623130816 1624071044
+56412000000 56414820800 18804000000 18804940266 1624130816 1625071082
+56415000000 56417820961 18805000000 18805940320 1625130816 1626071136
+56418000000 56420821096 18806000000 18806940365 1626130816 1627071181
+56421000000 56423821239 18807000000 18807940413 1627130816 1628071229
+56424000000 56426821339 18808000000 18808940446 1628130816 1629071262
+56427000000 56429821573 18809000000 18809940524 1629130816 1630071340
+56430000000 56432821646 18810000000 18810940548 1630130816 1631071364
+56433000000 56435821767 18811000000 18811940589 1631130816 1632071405
+56436000000 56438821956 18812000000 18812940652 1632130816 1633071468
+56439000000 56441822110 18813000000 18813940703 1633130816 1634071519
+56442000000 56444822289 18814000000 18814940763 1634130816 1635071579
+56445000000 56447822435 18815000000 18815940811 1635130816 1636071627
+56448000000 56450822562 18816000000 18816940854 1636130816 1637071670
+56451000000 56453822736 18817000000 18817940912 1637130816 1638071728
+56454000000 56456822800 18818000000 18818940933 1638130816 1639071749
+56457000000 56459823007 18819000000 18819941002 1639130816 1640071818
+56460000000 56462823188 18820000000 18820941062 1640130816 1641071878
+56463000000 56465823337 18821000000 18821941112 1641130816 1642071928
+56466000000 56468823394 18822000000 18822941131 1642130816 1643071947
+56469000000 56471823590 18823000000 18823941196 1643130816 1644072012
+56472000000 56474823780 18824000000 18824941260 1644130816 1645072076
+56475000000 56477823925 18825000000 18825941308 1645130816 1646072124
+56478000000 56480824097 18826000000 18826941365 1646130816 1647072181
+56481000000 56483824230 18827000000 18827941410 1647130816 1648072226
+56484000000 56486824301 18828000000 18828941433 1648130816 1649072249
+56487000000 56489824527 18829000000 18829941509 1649130816 1650072325
+56490000000 56492824687 18830000000 18830941562 1650130816 1651072378
+56493000000 56495824819 18831000000 18831941606 1651130816 1652072422
+56496000000 56498824927 18832000000 18832941642 1652130816 1653072458
+56499000000 56501825138 18833000000 18833941712 1653130816 1654072528
+56502000000 56504825304 18834000000 18834941768 1654130816 1655072584
+56505000000 56507825415 18835000000 18835941805 1655130816 1656072621
+56508000000 56510825575 18836000000 18836941858 1656130816 1657072674
+56511000000 56513825687 18837000000 18837941895 1657130816 1658072711
+56514000000 56516825885 18838000000 18838941961 1658130816 1659072777
+56517000000 56519825975 18839000000 18839941991 1659130816 1660072807
+56520000000 56522826200 18840000000 18840942066 1660130816 1661072882
+56523000000 56525826332 18841000000 18841942110 1661130816 1662072926
+56526000000 56528826471 18842000000 18842942157 1662130816 1663072973
+56529000000 56531826522 18843000000 18843942174 1663130816 1664072990
+56532000000 56534826733 18844000000 18844942244 1664130816 1665073060
+56535000000 56537826942 18845000000 18845942314 1665130816 1666073130
+56538000000 56540827070 18846000000 18846942356 1666130816 1667073172
+56541000000 56543827213 18847000000 18847942404 1667130816 1668073220
+56544000000 56546827384 18848000000 18848942461 1668130816 1669073277
+56547000000 56549827481 18849000000 18849942493 1669130816 1670073309
+56550000000 56552827694 18850000000 18850942564 1670130816 1671073380
+56553000000 56555827824 18851000000 18851942608 1671130816 1672073424
+56556000000 56558827974 18852000000 18852942658 1672130816 1673073474
+56559000000 56561828134 18853000000 18853942711 1673130816 1674073527
+56562000000 56564828230 18854000000 18854942743 1674130816 1675073559
+56565000000 56567828418 18855000000 18855942806 1675130816 1676073622
+56568000000 56570828586 18856000000 18856942862 1676130816 1677073678
+56571000000 56573828722 18857000000 18857942907 1677130816 1678073723
+56574000000 56576828897 18858000000 18858942965 1678130816 1679073781
+56577000000 56579829019 18859000000 18859943006 1679130816 1680073822
+56580000000 56582829169 18860000000 18860943056 1680130816 1681073872
+56583000000 56585829317 18861000000 18861943105 1681130816 1682073921
+56586000000 56588829523 18862000000 18862943174 1682130816 1683073990
+56589000000 56591829637 18863000000 18863943212 1683130816 1684074028
+56592000000 56594829769 18864000000 18864943256 1684130816 1685074072
+56595000000 56597829943 18865000000 18865943314 1685130816 1686074130
+56598000000 56600830062 18866000000 18866943354 1686130816 1687074170
+56601000000 56603830186 18867000000 18867943395 1687130816 1688074211
+56604000000 56606830405 18868000000 18868943468 1688130816 1689074284
+56607000000 56609830541 18869000000 18869943513 1689130816 1690074329
+56610000000 56612830692 18870000000 18870943564 1690130816 1691074380
+56613000000 56615830852 18871000000 18871943617 1691130816 1692074433
+56616000000 56618830973 18872000000 18872943657 1692130816 1693074473
+56619000000 56621831054 18873000000 18873943684 1693130816 1694074500
+56622000000 56624831262 18874000000 18874943754 1694130816 1695074570
+56625000000 56627831417 18875000000 18875943805 1695130816 1696074621
+56628000000 56630831576 18876000000 18876943858 1696130816 1697074674
+56631000000 56633831728 18877000000 18877943909 1697130816 1698074725
+56634000000 56636831850 18878000000 18878943950 1698130816 1699074766
+56637000000 56639832028 18879000000 18879944009 1699130816 1700074825
+56640000000 56642832177 18880000000 18880944059 1700130816 1701074875
+56643000000 56645832305 18881000000 18881944101 1701130816 1702074917
+56646000000 56648832474 18882000000 18882944158 1702130816 1703074974
+56649000000 56651832594 18883000000 18883944198 1703130816 1704075014
+56652000000 56654832521 18884000000 18884944173 1704130816 1705074989
+56655000000 56657832844 18885000000 18885944281 1705130816 1706075097
+56658000000 56660833097 18886000000 18886944365 1706130816 1707075181
+56661000000 56663833207 18887000000 18887944402 1707130816 1708075218
+56664000000 56666833386 18888000000 18888944462 1708130816 1709075278
+56667000000 56669833434 18889000000 18889944478 1709130816 1710075294
+56670000000 56672833688 18890000000 18890944562 1710130816 1711075378
+56673000000 56675833807 18891000000 18891944602 1711130816 1712075418
+56676000000 56678833978 18892000000 18892944659 1712130816 1713075475
+56679000000 56681834125 18893000000 18893944708 1713130816 1714075524
+56682000000 56684834278 18894000000 18894944759 1714130816 1715075575
+56685000000 56687834424 18895000000 18895944808 1715130816 1716075624
+56688000000 56690834568 18896000000 18896944856 1716130816 1717075672
+56691000000 56693834731 18897000000 18897944910 1717130816 1718075726
+56694000000 56696834883 18898000000 18898944961 1718130816 1719075777
+56697000000 56699835037 18899000000 18899945012 1719130816 1720075828
+56700000000 56702835157 18900000000 18900945052 1720130816 1721075868
+56703000000 56705835366 18901000000 18901945122 1721130816 1722075938
+56706000000 56708835496 18902000000 18902945165 1722130816 1723075981
+56709000000 56711835610 18903000000 18903945203 1723130816 1724076019
+56712000000 56714835771 18904000000 18904945257 1724130816 1725076073
+56715000000 56717835906 18905000000 18905945302 1725130816 1726076118
+56718000000 56720836049 18906000000 18906945349 1726130816 1727076165
+56721000000 56723836149 18907000000 18907945383 1727130816 1728076199
+56724000000 56726836383 18908000000 18908945461 1728130816 1729076277
+56727000000 56729836456 18909000000 18909945485 1729130816 1730076301
+56730000000 56732836577 18910000000 18910945525 1730130816 1731076341
+56733000000 56735836766 18911000000 18911945588 1731130816 1732076404
+56736000000 56738836920 18912000000 18912945640 1732130816 1733076456
+56739000000 56741837099 18913000000 18913945699 1733130816 1734076515
+56742000000 56744837245 18914000000 18914945748 1734130816 1735076564
+56745000000 56747837372 18915000000 18915945790 1735130816 1736076606
+56748000000 56750837546 18916000000 18916945848 1736130816 1737076664
+56751000000 56753837610 18917000000 18917945870 1737130816 1738076686
+56754000000 56756837817 18918000000 18918945939 1738130816 1739076755
+56757000000 56759837998 18919000000 18919945999 1739130816 1740076815
+56760000000 56762838147 18920000000 18920946049 1740130816 1741076865
+56763000000 56765838204 18921000000 18921946068 1741130816 1742076884
+56766000000 56768838400 18922000000 18922946133 1742130816 1743076949
+56769000000 56771838590 18923000000 18923946196 1743130816 1744077012
+56772000000 56774838735 18924000000 18924946245 1744130816 1745077061
+56775000000 56777838907 18925000000 18925946302 1745130816 1746077118
+56778000000 56780839040 18926000000 18926946346 1746130816 1747077162
+56781000000 56783839111 18927000000 18927946370 1747130816 1748077186
+56784000000 56786839337 18928000000 18928946445 1748130816 1749077261
+56787000000 56789839497 18929000000 18929946499 1749130816 1750077315
+56790000000 56792839629 18930000000 18930946543 1750130816 1751077359
+56793000000 56795839737 18931000000 18931946579 1751130816 1752077395
+56796000000 56798839948 18932000000 18932946649 1752130816 1753077465
+56799000000 56801840114 18933000000 18933946704 1753130816 1754077520
+56802000000 56804840225 18934000000 18934946741 1754130816 1755077557
+56805000000 56807840385 18935000000 18935946795 1755130816 1756077611
+56808000000 56810840497 18936000000 18936946832 1756130816 1757077648
+56811000000 56813840695 18937000000 18937946898 1757130816 1758077714
+56814000000 56816840785 18938000000 18938946928 1758130816 1759077744
+56817000000 56819841010 18939000000 18939947003 1759130816 1760077819
+56820000000 56822841142 18940000000 18940947047 1760130816 1761077863
+56823000000 56825841281 18941000000 18941947093 1761130816 1762077909
+56826000000 56828841332 18942000000 18942947110 1762130816 1763077926
+56829000000 56831841543 18943000000 18943947181 1763130816 1764077997
+56832000000 56834841752 18944000000 18944947250 1764130816 1765078066
+56835000000 56837841880 18945000000 18945947293 1765130816 1766078109
+56838000000 56840842023 18946000000 18946947341 1766130816 1767078157
+56841000000 56843842194 18947000000 18947947398 1767130816 1768078214
+56844000000 56846842291 18948000000 18948947430 1768130816 1769078246
+56847000000 56849842504 18949000000 18949947501 1769130816 1770078317
+56850000000 56852842634 18950000000 18950947544 1770130816 1771078360
+56853000000 56855842784 18951000000 18951947594 1771130816 1772078410
+56856000000 56858842944 18952000000 18952947648 1772130816 1773078464
+56859000000 56861843040 18953000000 18953947680 1773130816 1774078496
+56862000000 56864843228 18954000000 18954947742 1774130816 1775078558
+56865000000 56867843396 18955000000 18955947798 1775130816 1776078614
+56868000000 56870843532 18956000000 18956947844 1776130816 1777078660
+56871000000 56873843707 18957000000 18957947902 1777130816 1778078718
+56874000000 56876843829 18958000000 18958947943 1778130816 1779078759
+56877000000 56879843979 18959000000 18959947993 1779130816 1780078809
+56880000000 56882844127 18960000000 18960948042 1780130816 1781078858
+56883000000 56885844333 18961000000 18961948111 1781130816 1782078927
+56886000000 56888844447 18962000000 18962948149 1782130816 1783078965
+56889000000 56891844579 18963000000 18963948193 1783130816 1784079009
+56892000000 56894844753 18964000000 18964948251 1784130816 1785079067
+56895000000 56897844872 18965000000 18965948290 1785130816 1786079106
+56898000000 56900844996 18966000000 18966948332 1786130816 1787079148
+56901000000 56903845215 18967000000 18967948405 1787130816 1788079221
+56904000000 56906845351 18968000000 18968948450 1788130816 1789079266
+56907000000 56909845502 18969000000 18969948500 1789130816 1790079316
+56910000000 56912845662 18970000000 18970948554 1790130816 1791079370
+56913000000 56915845783 18971000000 18971948594 1791130816 1792079410
+56916000000 56918845864 18972000000 18972948621 1792130816 1793079437
+56919000000 56921846072 18973000000 18973948690 1793130816 1794079506
+56922000000 56924846227 18974000000 18974948742 1794130816 1795079558
+56925000000 56927846386 18975000000 18975948795 1795130816 1796079611
+56928000000 56930846538 18976000000 18976948846 1796130816 1797079662
+56931000000 56933846660 18977000000 18977948886 1797130816 1798079702
+56934000000 56936846838 18978000000 18978948946 1798130816 1799079762
+56937000000 56939846987 18979000000 18979948995 1799130816 1800079811
+56940000000 56942847115 18980000000 18980949038 1800130816 1801079854
+56943000000 56945847284 18981000000 18981949094 1801130816 1802079910
+56946000000 56948847404 18982000000 18982949134 1802130816 1803079950
+56949000000 56951847331 18983000000 18983949110 1803130816 1804079926
+56952000000 56954847654 18984000000 18984949218 1804130816 1805080034
+56955000000 56957847907 18985000000 18985949302 1805130816 1806080118
+56958000000 56960848017 18986000000 18986949339 1806130816 1807080155
+56961000000 56963848196 18987000000 18987949398 1807130816 1808080214
+56964000000 56966848244 18988000000 18988949414 1808130816 1809080230
+56967000000 56969848498 18989000000 18989949499 1809130816 1810080315
+56970000000 56972848617 18990000000 18990949539 1810130816 1811080355
+56973000000 56975848788 18991000000 18991949596 1811130816 1812080412
+56976000000 56978848935 18992000000 18992949645 1812130816 1813080461
+56979000000 56981849088 18993000000 18993949696 1813130816 1814080512
+56982000000 56984849234 18994000000 18994949744 1814130816 1815080560
+56985000000 56987849378 18995000000 18995949792 1815130816 1816080608
+56988000000 56990849541 18996000000 18996949847 1816130816 1817080663
+56991000000 56993849693 18997000000 18997949897 1817130816 1818080713
+56994000000 56996849847 18998000000 18998949949 1818130816 1819080765
+56997000000 56999849967 18999000000 18999949989 1819130816 1820080805
+57000000000 57002850176 19000000000 19000950058 1820130816 1821080874
+57003000000 57005850306 19001000000 19001950102 1821130816 1822080918
+57006000000 57008850420 19002000000 19002950140 1822130816 1823080956
+57009000000 57011850581 19003000000 19003950193 1823130816 1824081009
+57012000000 57014850716 19004000000 19004950238 1824130816 1825081054
+57015000000 57017850859 19005000000 19005950286 1825130816 1826081102
+57018000000 57020850959 19006000000 19006950319 1826130816 1827081135
+57021000000 57023851193 19007000000 19007950397 1827130816 1828081213
+57024000000 57026851266 19008000000 19008950422 1828130816 1829081238
+57027000000 57029851387 19009000000 19009950462 1829130816 1830081278
+57030000000 57032851576 19010000000 19010950525 1830130816 1831081341
+57033000000 57035851730 19011000000 19011950576 1831130816 1832081392
+57036000000 57038851909 19012000000 19012950636 1832130816 1833081452
+57039000000 57041852055 19013000000 19013950685 1833130816 1834081501
+57042000000 57044852182 19014000000 19014950727 1834130816 1835081543
+57045000000 57047852356 19015000000 19015950785 1835130816 1836081601
+57048000000 57050852420 19016000000 19016950806 1836130816 1837081622
+57051000000 57053852627 19017000000 19017950875 1837130816 1838081691
+57054000000 57056852808 19018000000 19018950936 1838130816 1839081752
+57057000000 57059852957 19019000000 19019950985 1839130816 1840081801
+57060000000 57062853014 19020000000 19020951004 1840130816 1841081820
+57063000000 57065853210 19021000000 19021951070 1841130816 1842081886
+57066000000 57068853400 19022000000 19022951133 1842130816 1843081949
+57069000000 57071853545 19023000000 19023951181 1843130816 1844081997
+57072000000 57074853717 19024000000 19024951239 1844130816 1845082055
+57075000000 57077853850 19025000000 19025951283 1845130816 1846082099
+57078000000 57080853921 19026000000 19026951307 1846130816 1847082123
+57081000000 57083854147 19027000000 19027951382 1847130816 1848082198
+57084000000 57086854307 19028000000 19028951435 1848130816 1849082251
+57087000000 57089854439 19029000000 19029951479 1849130816 1850082295
+57090000000 57092854547 19030000000 19030951515 1850130816 1851082331
+57093000000 57095854758 19031000000 19031951586 1851130816 1852082402
+57096000000 57098854924 19032000000 19032951641 1852130816 1853082457
+57099000000 57101855035 19033000000 19033951678 1853130816 1854082494
+57102000000 57104855195 19034000000 19034951731 1854130816 1855082547
+57105000000 57107855307 19035000000 19035951769 1855130816 1856082585
+57108000000 57110855505 19036000000 19036951835 1856130816 1857082651
+57111000000 57113855595 19037000000 19037951865 1857130816 1858082681
+57114000000 57116855820 19038000000 19038951940 1858130816 1859082756
+57117000000 57119855952 19039000000 19039951984 1859130816 1860082800
+57120000000 57122856091 19040000000 19040952030 1860130816 1861082846
+57123000000 57125856142 19041000000 19041952047 1861130816 1862082863
+57126000000 57128856353 19042000000 19042952117 1862130816 1863082933
+57129000000 57131856562 19043000000 19043952187 1863130816 1864083003
+57132000000 57134856690 19044000000 19044952230 1864130816 1865083046
+57135000000 57137856833 19045000000 19045952277 1865130816 1866083093
+57138000000 57140857004 19046000000 19046952334 1866130816 1867083150
+57141000000 57143857101 19047000000 19047952367 1867130816 1868083183
+57144000000 57146857314 19048000000 19048952438 1868130816 1869083254
+57147000000 57149857444 19049000000 19049952481 1869130816 1870083297
+57150000000 57152857594 19050000000 19050952531 1870130816 1871083347
+57153000000 57155857754 19051000000 19051952584 1871130816 1872083400
+57156000000 57158857850 19052000000 19052952616 1872130816 1873083432
+57159000000 57161858038 19053000000 19053952679 1873130816 1874083495
+57162000000 57164858206 19054000000 19054952735 1874130816 1875083551
+57165000000 57167858342 19055000000 19055952780 1875130816 1876083596
+57168000000 57170858517 19056000000 19056952839 1876130816 1877083655
+57171000000 57173858639 19057000000 19057952879 1877130816 1878083695
+57174000000 57176858789 19058000000 19058952929 1878130816 1879083745
+57177000000 57179858937 19059000000 19059952979 1879130816 1880083795
+57180000000 57182859143 19060000000 19060953047 1880130816 1881083863
+57183000000 57185859257 19061000000 19061953085 1881130816 1882083901
+57186000000 57188859389 19062000000 19062953129 1882130816 1883083945
+57189000000 57191859563 19063000000 19063953187 1883130816 1884084003
+57192000000 57194859682 19064000000 19064953227 1884130816 1885084043
+57195000000 57197859806 19065000000 19065953268 1885130816 1886084084
+57198000000 57200860025 19066000000 19066953341 1886130816 1887084157
+57201000000 57203860161 19067000000 19067953387 1887130816 1888084203
+57204000000 57206860312 19068000000 19068953437 1888130816 1889084253
+57207000000 57209860472 19069000000 19069953490 1889130816 1890084306
+57210000000 57212860593 19070000000 19070953531 1890130816 1891084347
+57213000000 57215860674 19071000000 19071953558 1891130816 1892084374
+57216000000 57218860882 19072000000 19072953627 1892130816 1893084443
+57219000000 57221861037 19073000000 19073953679 1893130816 1894084495
+57222000000 57224861196 19074000000 19074953732 1894130816 1895084548
+57225000000 57227861348 19075000000 19075953782 1895130816 1896084598
+57228000000 57230861470 19076000000 19076953823 1896130816 1897084639
+57231000000 57233861648 19077000000 19077953882 1897130816 1898084698
+57234000000 57236861797 19078000000 19078953932 1898130816 1899084748
+57237000000 57239861925 19079000000 19079953975 1899130816 1900084791
+57240000000 57242862094 19080000000 19080954031 1900130816 1901084847
+57243000000 57245862214 19081000000 19081954071 1901130816 1902084887
+57246000000 57248862141 19082000000 19082954047 1902130816 1903084863
+57249000000 57251862464 19083000000 19083954154 1903130816 1904084970
+57252000000 57254862717 19084000000 19084954239 1904130816 1905085055
+57255000000 57257862827 19085000000 19085954275 1905130816 1906085091
+57258000000 57260863006 19086000000 19086954335 1906130816 1907085151
+57261000000 57263863054 19087000000 19087954351 1907130816 1908085167
+57264000000 57266863308 19088000000 19088954436 1908130816 1909085252
+57267000000 57269863427 19089000000 19089954475 1909130816 1910085291
+57270000000 57272863598 19090000000 19090954532 1910130816 1911085348
+57273000000 57275863745 19091000000 19091954581 1911130816 1912085397
+57276000000 57278863898 19092000000 19092954632 1912130816 1913085448
+57279000000 57281864044 19093000000 19093954681 1913130816 1914085497
+57282000000 57284864188 19094000000 19094954729 1914130816 1915085545
+57285000000 57287864351 19095000000 19095954783 1915130816 1916085599
+57288000000 57290864503 19096000000 19096954834 1916130816 1917085650
+57291000000 57293864657 19097000000 19097954885 1917130816 1918085701
+57294000000 57296864777 19098000000 19098954925 1918130816 1919085741
+57297000000 57299864986 19099000000 19099954995 1919130816 1920085811
+57300000000 57302865116 19100000000 19100955038 1920130816 1921085854
+57303000000 57305865230 19101000000 19101955076 1921130816 1922085892
+57306000000 57308865391 19102000000 19102955130 1922130816 1923085946
+57309000000 57311865526 19103000000 19103955175 1923130816 1924085991
+57312000000 57314865669 19104000000 19104955223 1924130816 1925086039
+57315000000 57317865769 19105000000 19105955256 1925130816 1926086072
+57318000000 57320866003 19106000000 19106955334 1926130816 1927086150
+57321000000 57323866076 19107000000 19107955358 1927130816 1928086174
+57324000000 57326866197 19108000000 19108955399 1928130816 1929086215
+57327000000 57329866386 19109000000 19109955462 1929130816 1930086278
+57330000000 57332866540 19110000000 19110955513 1930130816 1931086329
+57333000000 57335866719 19111000000 19111955573 1931130816 1932086389
+57336000000 57338866865 19112000000 19112955621 1932130816 1933086437
+57339000000 57341866992 19113000000 19113955664 1933130816 1934086480
+57342000000 57344867166 19114000000 19114955722 1934130816 1935086538
+57345000000 57347867230 19115000000 19115955743 1935130816 1936086559
+57348000000 57350867437 19116000000 19116955812 1936130816 1937086628
+57351000000 57353867618 19117000000 19117955872 1937130816 1938086688
+57354000000 57356867767 19118000000 19118955922 1938130816 1939086738
+57357000000 57359867824 19119000000 19119955941 1939130816 1940086757
+57360000000 57362868020 19120000000 19120956006 1940130816 1941086822
+57363000000 57365868210 19121000000 19121956070 1941130816 1942086886
+57366000000 57368868355 19122000000 19122956118 1942130816 1943086934
+57369000000 57371868527 19123000000 19123956175 1943130816 1944086991
+57372000000 57374868660 19124000000 19124956220 1944130816 1945087036
+57375000000 57377868731 19125000000 19125956243 1945130816 1946087059
+57378000000 57380868957 19126000000 19126956319 1946130816 1947087135
+57381000000 57383869117 19127000000 19127956372 1947130816 1948087188
+57384000000 57386869249 19128000000 19128956416 1948130816 1949087232
+57387000000 57389869357 19129000000 19129956452 1949130816 1950087268
+57390000000 57392869568 19130000000 19130956522 1950130816 1951087338
+57393000000 57395869734 19131000000 19131956578 1951130816 1952087394
+57396000000 57398869845 19132000000 19132956615 1952130816 1953087431
+57399000000 57401870005 19133000000 19133956668 1953130816 1954087484
+57402000000 57404870117 19134000000 19134956705 1954130816 1955087521
+57405000000 57407870315 19135000000 19135956771 1955130816 1956087587
+57408000000 57410870405 19136000000 19136956801 1956130816 1957087617
+57411000000 57413870630 19137000000 19137956876 1957130816 1958087692
+57414000000 57416870762 19138000000 19138956920 1958130816 1959087736
+57417000000 57419870901 19139000000 19139956967 1959130816 1960087783
+57420000000 57422870952 19140000000 19140956984 1960130816 1961087800
+57423000000 57425871163 19141000000 19141957054 1961130816 1962087870
+57426000000 57428871372 19142000000 19142957124 1962130816 1963087940
+57429000000 57431871500 19143000000 19143957166 1963130816 1964087982
+57432000000 57434871643 19144000000 19144957214 1964130816 1965088030
+57435000000 57437871814 19145000000 19145957271 1965130816 1966088087
+57438000000 57440871911 19146000000 19146957303 1966130816 1967088119
+57441000000 57443872124 19147000000 19147957374 1967130816 1968088190
+57444000000 57446872254 19148000000 19148957418 1968130816 1969088234
+57447000000 57449872404 19149000000 19149957468 1969130816 1970088284
+57450000000 57452872564 19150000000 19150957521 1970130816 1971088337
+57453000000 57455872660 19151000000 19151957553 1971130816 1972088369
+57456000000 57458872848 19152000000 19152957616 1972130816 1973088432
+57459000000 57461873016 19153000000 19153957672 1973130816 1974088488
+57462000000 57464873152 19154000000 19154957717 1974130816 1975088533
+57465000000 57467873327 19155000000 19155957775 1975130816 1976088591
+57468000000 57470873449 19156000000 19156957816 1976130816 1977088632
+57471000000 57473873599 19157000000 19157957866 1977130816 1978088682
+57474000000 57476873747 19158000000 19158957915 1978130816 1979088731
+57477000000 57479873953 19159000000 19159957984 1979130816 1980088800
+57480000000 57482874067 19160000000 19160958022 1980130816 1981088838
+57483000000 57485874199 19161000000 19161958066 1981130816 1982088882
+57486000000 57488874373 19162000000 19162958124 1982130816 1983088940
+57489000000 57491874492 19163000000 19163958164 1983130816 1984088980
+57492000000 57494874616 19164000000 19164958205 1984130816 1985089021
+57495000000 57497874835 19165000000 19165958278 1985130816 1986089094
+57498000000 57500874971 19166000000 19166958323 1986130816 1987089139
+57501000000 57503875122 19167000000 19167958374 1987130816 1988089190
+57504000000 57506875282 19168000000 19168958427 1988130816 1989089243
+57507000000 57509875403 19169000000 19169958467 1989130816 1990089283
+57510000000 57512875484 19170000000 19170958494 1990130816 1991089310
+57513000000 57515875692 19171000000 19171958564 1991130816 1992089380
+57516000000 57518875847 19172000000 19172958615 1992130816 1993089431
+57519000000 57521876006 19173000000 19173958668 1993130816 1994089484
+57522000000 57524876158 19174000000 19174958719 1994130816 1995089535
+57525000000 57527876280 19175000000 19175958760 1995130816 1996089576
+57528000000 57530876458 19176000000 19176958819 1996130816 1997089635
+57531000000 57533876607 19177000000 19177958869 1997130816 1998089685
+57534000000 57536876735 19178000000 19178958911 1998130816 1999089727
+57537000000 57539876904 19179000000 19179958968 1999130816 2000089784
+57540000000 57542877024 19180000000 19180959008 2000130816 2001089824
+57543000000 57545876951 19181000000 19181958983 2001130816 2002089799
+57546000000 57548877274 19182000000 19182959091 2002130816 2003089907
+57549000000 57551877527 19183000000 19183959175 2003130816 2004089991
+57552000000 57554877637 19184000000 19184959212 2004130816 2005090028
+57555000000 57557877816 19185000000 19185959272 2005130816 2006090088
+57558000000 57560877864 19186000000 19186959288 2006130816 2007090104
+57561000000 57563878118 19187000000 19187959372 2007130816 2008090188
+57564000000 57566878237 19188000000 19188959412 2008130816 2009090228
+57567000000 57569878408 19189000000 19189959469 2009130816 2010090285
+57570000000 57572878555 19190000000 19190959518 2010130816 2011090334
+57573000000 57575878708 19191000000 19191959569 2011130816 2012090385
+57576000000 57578878854 19192000000 19192959618 2012130816 2013090434
+57579000000 57581878998 19193000000 19193959666 2013130816 2014090482
+57582000000 57584879161 19194000000 19194959720 2014130816 2015090536
+57585000000 57587879313 19195000000 19195959771 2015130816 2016090587
+57588000000 57590879467 19196000000 19196959822 2016130816 2017090638
+57591000000 57593879587 19197000000 19197959862 2017130816 2018090678
+57594000000 57596879796 19198000000 19198959932 2018130816 2019090748
+57597000000 57599879926 19199000000 19199959975 2019130816 2020090791
+57600000000 57602880040 19200000000 19200960013 2020130816 2021090829
+57603000000 57605880201 19201000000 19201960067 2021130816 2022090883
+57606000000 57608880336 19202000000 19202960112 2022130816 2023090928
+57609000000 57611880479 19203000000 19203960159 2023130816 2024090975
+57612000000 57614880579 19204000000 19204960193 2024130816 2025091009
+57615000000 57617880813 19205000000 19205960271 2025130816 2026091087
+57618000000 57620880886 19206000000 19206960295 2026130816 2027091111
+57621000000 57623881007 19207000000 19207960335 2027130816 2028091151
+57624000000 57626881196 19208000000 19208960398 2028130816 2029091214
+57627000000 57629881350 19209000000 19209960450 2029130816 2030091266
+57630000000 57632881529 19210000000 19210960509 2030130816 2031091325
+57633000000 57635881675 19211000000 19211960558 2031130816 2032091374
+57636000000 57638881802 19212000000 19212960600 2032130816 2033091416
+57639000000 57641881976 19213000000 19213960658 2033130816 2034091474
+57642000000 57644882040 19214000000 19214960680 2034130816 2035091496
+57645000000 57647882247 19215000000 19215960749 2035130816 2036091565
+57648000000 57650882428 19216000000 19216960809 2036130816 2037091625
+57651000000 57653882577 19217000000 19217960859 2037130816 2038091675
+57654000000 57656882634 19218000000 19218960878 2038130816 2039091694
+57657000000 57659882830 19219000000 19219960943 2039130816 2040091759
+57660000000 57662883020 19220000000 19220961006 2040130816 2041091822
+57663000000 57665883165 19221000000 19221961055 2041130816 2042091871
+57666000000 57668883337 19222000000 19222961112 2042130816 2043091928
+57669000000 57671883470 19223000000 19223961156 2043130816 2044091972
+57672000000 57674883541 19224000000 19224961180 2044130816 2045091996
+57675000000 57677883767 19225000000 19225961255 2045130816 2046092071
+57678000000 57680883927 19226000000 19226961309 2046130816 2047092125
+57681000000 57683884059 19227000000 19227961353 2047130816 2048092169
+57684000000 57686884167 19228000000 19228961389 2048130816 2049092205
+57687000000 57689884378 19229000000 19229961459 2049130816 2050092275
+57690000000 57692884544 19230000000 19230961514 2050130816 2051092330
+57693000000 57695884655 19231000000 19231961551 2051130816 2052092367
+57696000000 57698884815 19232000000 19232961605 2052130816 2053092421
+57699000000 57701884927 19233000000 19233961642 2053130816 2054092458
+57702000000 57704885125 19234000000 19234961708 2054130816 2055092524
+57705000000 57707885215 19235000000 19235961738 2055130816 2056092554
+57708000000 57710885440 19236000000 19236961813 2056130816 2057092629
+57711000000 57713885572 19237000000 19237961857 2057130816 2058092673
+57714000000 57716885711 19238000000 19238961903 2058130816 2059092719
+57717000000 57719885762 19239000000 19239961920 2059130816 2060092736
+57720000000 57722885973 19240000000 19240961991 2060130816 2061092807
+57723000000 57725886182 19241000000 19241962060 2061130816 2062092876
+57726000000 57728886310 19242000000 19242962103 2062130816 2063092919
+57729000000 57731886453 19243000000 19243962151 2063130816 2064092967
+57732000000 57734886624 19244000000 19244962208 2064130816 2065093024
+57735000000 57737886721 19245000000 19245962240 2065130816 2066093056
+57738000000 57740886934 19246000000 19246962311 2066130816 2067093127
+57741000000 57743887064 19247000000 19247962354 2067130816 2068093170
+57744000000 57746887214 19248000000 19248962404 2068130816 2069093220
+57747000000 57749887374 19249000000 19249962458 2069130816 2070093274
+57750000000 57752887470 19250000000 19250962490 2070130816 2071093306
+57753000000 57755887658 19251000000 19251962552 2071130816 2072093368
+57756000000 57758887826 19252000000 19252962608 2072130816 2073093424
+57759000000 57761887962 19253000000 19253962654 2073130816 2074093470
+57762000000 57764888137 19254000000 19254962712 2074130816 2075093528
+57765000000 57767888259 19255000000 19255962753 2075130816 2076093569
+57768000000 57770888409 19256000000 19256962803 2076130816 2077093619
+57771000000 57773888557 19257000000 19257962852 2077130816 2078093668
+57774000000 57776888763 19258000000 19258962921 2078130816 2079093737
+57777000000 57779888877 19259000000 19259962959 2079130816 2080093775
+57780000000 57782889009 19260000000 19260963003 2080130816 2081093819
+57783000000 57785889183 19261000000 19261963061 2081130816 2082093877
+57786000000 57788889302 19262000000 19262963100 2082130816 2083093916
+57789000000 57791889426 19263000000 19263963142 2083130816 2084093958
+57792000000 57794889645 19264000000 19264963215 2084130816 2085094031
+57795000000 57797889781 19265000000 19265963260 2085130816 2086094076
+57798000000 57800889932 19266000000 19266963310 2086130816 2087094126
+57801000000 57803890092 19267000000 19267963364 2087130816 2088094180
+57804000000 57806890213 19268000000 19268963404 2088130816 2089094220
+57807000000 57809890294 19269000000 19269963431 2089130816 2090094247
+57810000000 57812890502 19270000000 19270963500 2090130816 2091094316
+57813000000 57815890657 19271000000 19271963552 2091130816 2092094368
+57816000000 57818890816 19272000000 19272963605 2092130816 2093094421
+57819000000 57821890968 19273000000 19273963656 2093130816 2094094472
+57822000000 57824891090 19274000000 19274963696 2094130816 2095094512
+57825000000 57827891268 19275000000 19275963756 2095130816 2096094572
+57828000000 57830891417 19276000000 19276963805 2096130816 2097094621
+57831000000 57833891545 19277000000 19277963848 2097130816 2098094664
+57834000000 57836891714 19278000000 19278963904 2098130816 2099094720
+57837000000 57839891834 19279000000 19279963944 2099130816 2100094760
+57840000000 57842891761 19280000000 19280963920 2100130816 2101094736
+57843000000 57845892084 19281000000 19281964028 2101130816 2102094844
+57846000000 57848892337 19282000000 19282964112 2102130816 2103094928
+57849000000 57851892447 19283000000 19283964149 2103130816 2104094965
+57852000000 57854892626 19284000000 19284964208 2104130816 2105095024
+57855000000 57857892674 19285000000 19285964224 2105130816 2106095040
+57858000000 57860892928 19286000000 19286964309 2106130816 2107095125
+57861000000 57863893047 19287000000 19287964349 2107130816 2108095165
+57864000000 57866893218 19288000000 19288964406 2108130816 2109095222
+57867000000 57869893365 19289000000 19289964455 2109130816 2110095271
+57870000000 57872893518 19290000000 19290964506 2110130816 2111095322
+57873000000 57875893664 19291000000 19291964554 2111130816 2112095370
+57876000000 57878893808 19292000000 19292964602 2112130816 2113095418
+57879000000 57881893971 19293000000 19293964657 2113130816 2114095473
+57882000000 57884894123 19294000000 19294964707 2114130816 2115095523
+57885000000 57887894277 19295000000 19295964759 2115130816 2116095575
+57888000000 57890894397 19296000000 19296964799 2116130816 2117095615
+57891000000 57893894606 19297000000 19297964868 2117130816 2118095684
+57894000000 57896894736 19298000000 19298964912 2118130816 2119095728
+57897000000 57899894850 19299000000 19299964950 2119130816 2120095766
+57900000000 57902895011 19300000000 19300965003 2120130816 2121095819
+57903000000 57905895146 19301000000 19301965048 2121130816 2122095864
+57906000000 57908895289 19302000000 19302965096 2122130816 2123095912
+57909000000 57911895389 19303000000 19303965129 2123130816 2124095945
+57912000000 57914895623 19304000000 19304965207 2124130816 2125096023
+57915000000 57917895696 19305000000 19305965232 2125130816 2126096048
+57918000000 57920895817 19306000000 19306965272 2126130816 2127096088
+57921000000 57923896006 19307000000 19307965335 2127130816 2128096151
+57924000000 57926896160 19308000000 19308965386 2128130816 2129096202
+57927000000 57929896339 19309000000 19309965446 2129130816 2130096262
+57930000000 57932896485 19310000000 19310965495 2130130816 2131096311
+57933000000 57935896612 19311000000 19311965537 2131130816 2132096353
+57936000000 57938896786 19312000000 19312965595 2132130816 2133096411
+57939000000 57941896850 19313000000 19313965616 2133130816 2134096432
+57942000000 57944897057 19314000000 19314965685 2134130816 2135096501
+57945000000 57947897238 19315000000 19315965746 2135130816 2136096562
+57948000000 57950897387 19316000000 19316965795 2136130816 2137096611
+57951000000 57953897444 19317000000 19317965814 2137130816 2138096630
+57954000000 57956897640 19318000000 19318965880 2138130816 2139096696
+57957000000 57959897830 19319000000 19319965943 2139130816 2140096759
+57960000000 57962897975 19320000000 19320965991 2140130816 2141096807
+57963000000 57965898147 19321000000 19321966049 2141130816 2142096865
+57966000000 57968898280 19322000000 19322966093 2142130816 2143096909
+57969000000 57971898351 19323000000 19323966117 2143130816 2144096933
+57972000000 57974898577 19324000000 19324966192 2144130816 2145097008
+57975000000 57977898737 19325000000 19325966245 2145130816 2146097061
+57978000000 57980898869 19326000000 19326966289 2146130816 2147097105
+57981000000 57983898977 19327000000 19327966325 2147130816 2148097141
+57984000000 57986899188 19328000000 19328966396 2148130816 2149097212
+57987000000 57989899354 19329000000 19329966451 2149130816 2150097267
+57990000000 57992899465 19330000000 19330966488 2150130816 2151097304
+57993000000 57995899625 19331000000 19331966541 2151130816 2152097357
+57996000000 57998899737 19332000000 19332966579 2152130816 2153097395
+57999000000 58001899935 19333000000 19333966645 2153130816 2154097461
+58002000000 58004900025 19334000000 19334966675 2154130816 2155097491
+58005000000 58007900250 19335000000 19335966750 2155130816 2156097566
+58008000000 58010900382 19336000000 19336966794 2156130816 2157097610
+58011000000 58013900521 19337000000 19337966840 2157130816 2158097656
+58014000000 58016900572 19338000000 19338966857 2158130816 2159097673
+58017000000 58019900783 19339000000 19339966927 2159130816 2160097743
+58020000000 58022900992 19340000000 19340966997 2160130816 2161097813
+58023000000 58025901120 19341000000 19341967040 2161130816 2162097856
+58026000000 58028901263 19342000000 19342967087 2162130816 2163097903
+58029000000 58031901434 19343000000 19343967144 2163130816 2164097960
+58032000000 58034901531 19344000000 19344967177 2164130816 2165097993
+58035000000 58037901744 19345000000 19345967248 2165130816 2166098064
+58038000000 58040901874 19346000000 19346967291 2166130816 2167098107
+58041000000 58043902024 19347000000 19347967341 2167130816 2168098157
+58044000000 58046902184 19348000000 19348967394 2168130816 2169098210
+58047000000 58049902280 19349000000 19349967426 2169130816 2170098242
+58050000000 58052902468 19350000000 19350967489 2170130816 2171098305
+58053000000 58055902636 19351000000 19351967545 2171130816 2172098361
+58056000000 58058902772 19352000000 19352967590 2172130816 2173098406
+58059000000 58061902947 19353000000 19353967649 2173130816 2174098465
+58062000000 58064903069 19354000000 19354967689 2174130816 2175098505
+58065000000 58067903219 19355000000 19355967739 2175130816 2176098555
+58068000000 58070903367 19356000000 19356967789 2176130816 2177098605
+58071000000 58073903573 19357000000 19357967857 2177130816 2178098673
+58074000000 58076903687 19358000000 19358967895 2178130816 2179098711
+58077000000 58079903819 19359000000 19359967939 2179130816 2180098755
+58080000000 58082903993 19360000000 19360967997 2180130816 2181098813
+58083000000 58085904112 19361000000 19361968037 2181130816 2182098853
+58086000000 58088904236 19362000000 19362968078 2182130816 2183098894
+58089000000 58091904455 19363000000 19363968151 2183130816 2184098967
+58092000000 58094904591 19364000000 19364968197 2184130816 2185099013
+58095000000 58097904742 19365000000 19365968247 2185130816 2186099063
+58098000000 58100904902 19366000000 19366968300 2186130816 2187099116
+58101000000 58103905023 19367000000 19367968341 2187130816 2188099157
+58104000000 58106905104 19368000000 19368968368 2188130816 2189099184
+58107000000 58109905312 19369000000 19369968437 2189130816 2190099253
+58110000000 58112905467 19370000000 19370968489 2190130816 2191099305
+58113000000 58115905626 19371000000 19371968542 2191130816 2192099358
+58116000000 58118905778 19372000000 19372968592 2192130816 2193099408
+58119000000 58121905900 19373000000 19373968633 2193130816 2194099449
+58122000000 58124906078 19374000000 19374968692 2194130816 2195099508
+58125000000 58127906227 19375000000 19375968742 2195130816 2196099558
+58128000000 58130906355 19376000000 19376968785 2196130816 2197099601
+58131000000 58133906524 19377000000 19377968841 2197130816 2198099657
+58134000000 58136906644 19378000000 19378968881 2198130816 2199099697
+58137000000 58139906571 19379000000 19379968857 2199130816 2200099673
+58140000000 58142906894 19380000000 19380968964 2200130816 2201099780
+58143000000 58145907147 19381000000 19381969049 2201130816 2202099865
+58146000000 58148907257 19382000000 19382969085 2202130816 2203099901
+58149000000 58151907436 19383000000 19383969145 2203130816 2204099961
+58152000000 58154907484 19384000000 19384969161 2204130816 2205099977
+58155000000 58157907738 19385000000 19385969246 2205130816 2206100062
+58158000000 58160907857 19386000000 19386969285 2206130816 2207100101
+58161000000 58163908028 19387000000 19387969342 2207130816 2208100158
+58164000000 58166908175 19388000000 19388969391 2208130816 2209100207
+58167000000 58169908328 19389000000 19389969442 2209130816 2210100258
+58170000000 58172908474 19390000000 19390969491 2210130816 2211100307
+58173000000 58175908618 19391000000 19391969539 2211130816 2212100355
+58176000000 58178908781 19392000000 19392969593 2212130816 2213100409
+58179000000 58181908933 19393000000 19393969644 2213130816 2214100460
+58182000000 58184909087 19394000000 19394969695 2214130816 2215100511
+58185000000 58187909207 19395000000 19395969735 2215130816 2216100551
+58188000000 58190909416 19396000000 19396969805 2216130816 2217100621
+58191000000 58193909546 19397000000 19397969848 2217130816 2218100664
+58194000000 58196909660 19398000000 19398969886 2218130816 2219100702
+58197000000 58199909821 19399000000 19399969940 2219130816 2220100756
+58200000000 58202909956 19400000000 19400969985 2220130816 2221100801
+58203000000 58205910099 19401000000 19401970033 2221130816 2222100849
+58206000000 58208910199 19402000000 19402970066 2222130816 2223100882
+58209000000 58211910433 19403000000 19403970144 2223130816 2224100960
+58212000000 58214910506 19404000000 19404970168 2224130816 2225100984
+58215000000 58217910627 19405000000 19405970209 2225130816 2226101025
+58218000000 58220910816 19406000000 19406970272 2226130816 2227101088
+58221000000 58223910970 19407000000 19407970323 2227130816 2228101139
+58224000000 58226911149 19408000000 19408970383 2228130816 2229101199
+58227000000 58229911295 19409000000 19409970431 2229130816 2230101247
+58230000000 58232911422 19410000000 19410970474 2230130816 2231101290
+58233000000 58235911596 19411000000 19411970532 2231130816 2232101348
+58236000000 58238911660 19412000000 19412970553 2232130816 2233101369
+58239000000 58241911867 19413000000 19413970622 2233130816 2234101438
+58242000000 58244912048 19414000000 19414970682 2234130816 2235101498
+58245000000 58247912197 19415000000 19415970732 2235130816 2236101548
+58248000000 58250912254 19416000000 19416970751 2236130816 2237101567
+58251000000 58253912450 19417000000 19417970816 2237130816 2238101632
+58254000000 58256912640 19418000000 19418970880 2238130816 2239101696
+58257000000 58259912785 19419000000 19419970928 2239130816 2240101744
+58260000000 58262912957 19420000000 19420970985 2240130816 2241101801
+58263000000 58265913090 19421000000 19421971030 2241130816 2242101846
+58266000000 58268913161 19422000000 19422971053 2242130816 2243101869
+58269000000 58271913387 19423000000 19423971129 2243130816 2244101945
+58272000000 58274913547 19424000000 19424971182 2244130816 2245101998
+58275000000 58277913679 19425000000 19425971226 2245130816 2246102042
+58278000000 58280913787 19426000000 19426971262 2246130816 2247102078
+58281000000 58283913998 19427000000 19427971332 2247130816 2248102148
+58284000000 58286914164 19428000000 19428971388 2248130816 2249102204
+58287000000 58289914275 19429000000 19429971425 2249130816 2250102241
+58290000000 58292914435 19430000000 19430971478 2250130816 2251102294
+58293000000 58295914547 19431000000 19431971515 2251130816 2252102331
+58296000000 58298914745 19432000000 19432971581 2252130816 2253102397
+58299000000 58301914835 19433000000 19433971611 2253130816 2254102427
+58302000000 58304915060 19434000000 19434971686 2254130816 2255102502
+58305000000 58307915192 19435000000 19435971730 2255130816 2256102546
+58308000000 58310915331 19436000000 19436971777 2256130816 2257102593
+58311000000 58313915382 19437000000 19437971794 2257130816 2258102610
+58314000000 58316915593 19438000000 19438971864 2258130816 2259102680
+58317000000 58319915802 19439000000 19439971934 2259130816 2260102750
+58320000000 58322915930 19440000000 19440971976 2260130816 2261102792
+58323000000 58325916073 19441000000 19441972024 2261130816 2262102840
+58326000000 58328916244 19442000000 19442972081 2262130816 2263102897
+58329000000 58331916341 19443000000 19443972113 2263130816 2264102929
+58332000000 58334916554 19444000000 19444972184 2264130816 2265103000
+58335000000 58337916684 19445000000 19445972228 2265130816 2266103044
+58338000000 58340916834 19446000000 19446972278 2266130816 2267103094
+58341000000 58343916994 19447000000 19447972331 2267130816 2268103147
+58344000000 58346917090 19448000000 19448972363 2268130816 2269103179
+58347000000 58349917278 19449000000 19449972426 2269130816 2270103242
+58350000000 58352917446 19450000000 19450972482 2270130816 2271103298
+58353000000 58355917582 19451000000 19451972527 2271130816 2272103343
+58356000000 58358917757 19452000000 19452972585 2272130816 2273103401
+58359000000 58361917879 19453000000 19453972626 2273130816 2274103442
+58362000000 58364918029 19454000000 19454972676 2274130816 2275103492
+58365000000 58367918177 19455000000 19455972725 2275130816 2276103541
+58368000000 58370918383 19456000000 19456972794 2276130816 2277103610
+58371000000 58373918497 19457000000 19457972832 2277130816 2278103648
+58374000000 58376918629 19458000000 19458972876 2278130816 2279103692
+58377000000 58379918803 19459000000 19459972934 2279130816 2280103750
+58380000000 58382918922 19460000000 19460972974 2280130816 2281103790
+58383000000 58385919046 19461000000 19461973015 2281130816 2282103831
+58386000000 58388919265 19462000000 19462973088 2282130816 2283103904
+58389000000 58391919401 19463000000 19463973133 2283130816 2284103949
+58392000000 58394919552 19464000000 19464973184 2284130816 2285104000
+58395000000 58397919712 19465000000 19465973237 2285130816 2286104053
+58398000000 58400919833 19466000000 19466973277 2286130816 2287104093
+58401000000 58403919914 19467000000 19467973304 2287130816 2288104120
+58404000000 58406920122 19468000000 19468973374 2288130816 2289104190
+58407000000 58409920277 19469000000 19469973425 2289130816 2290104241
+58410000000 58412920436 19470000000 19470973478 2290130816 2291104294
+58413000000 58415920588 19471000000 19471973529 2291130816 2292104345
+58416000000 58418920710 19472000000 19472973570 2292130816 2293104386
+58419000000 58421920888 19473000000 19473973629 2293130816 2294104445
+58422000000 58424921037 19474000000 19474973679 2294130816 2295104495
+58425000000 58427921165 19475000000 19475973721 2295130816 2296104537
+58428000000 58430921334 19476000000 19476973778 2296130816 2297104594
+58431000000 58433921454 19477000000 19477973818 2297130816 2298104634
+58434000000 58436921381 19478000000 19478973793 2298130816 2299104609
+58437000000 58439921704 19479000000 19479973901 2299130816 2300104717
+58440000000 58442921957 19480000000 19480973985 2300130816 2301104801
+58443000000 58445922067 19481000000 19481974022 2301130816 2302104838
+58446000000 58448922246 19482000000 19482974082 2302130816 2303104898
+58449000000 58451922294 19483000000 19483974098 2303130816 2304104914
+58452000000 58454922548 19484000000 19484974182 2304130816 2305104998
+58455000000 58457922667 19485000000 19485974222 2305130816 2306105038
+58458000000 58460922838 19486000000 19486974279 2306130816 2307105095
+58461000000 58463922985 19487000000 19487974328 2307130816 2308105144
+58464000000 58466923138 19488000000 19488974379 2308130816 2309105195
+58467000000 58469923284 19489000000 19489974428 2309130816 2310105244
+58470000000 58472923428 19490000000 19490974476 2310130816 2311105292
+58473000000 58475923591 19491000000 19491974530 2311130816 2312105346
+58476000000 58478923743 19492000000 19492974581 2312130816 2313105397
+58479000000 58481923897 19493000000 19493974632 2313130816 2314105448
+58482000000 58484924017 19494000000 19494974672 2314130816 2315105488
+58485000000 58487924226 19495000000 19495974742 2315130816 2316105558
+58488000000 58490924356 19496000000 19496974785 2316130816 2317105601
+58491000000 58493924470 19497000000 19497974823 2317130816 2318105639
+58494000000 58496924631 19498000000 19498974877 2318130816 2319105693
+58497000000 58499924766 19499000000 19499974922 2319130816 2320105738
+58500000000 58502924909 19500000000 19500974969 2320130816 2321105785
+58503000000 58505925009 19501000000 19501975003 2321130816 2322105819
+58506000000 58508925243 19502000000 19502975081 2322130816 2323105897
+58509000000 58511925316 19503000000 19503975105 2323130816 2324105921
+58512000000 58514925437 19504000000 19504975145 2324130816 2325105961
+58515000000 58517925626 19505000000 19505975208 2325130816 2326106024
+58518000000 58520925780 19506000000 19506975260 2326130816 2327106076
+58521000000 58523925959 19507000000 19507975319 2327130816 2328106135
+58524000000 58526926105 19508000000 19508975368 2328130816 2329106184
+58527000000 58529926232 19509000000 19509975410 2329130816 2330106226
+58530000000 58532926406 19510000000 19510975468 2330130816 2331106284
+58533000000 58535926470 19511000000 19511975490 2331130816 2332106306
+58536000000 58538926677 19512000000 19512975559 2332130816 2333106375
+58539000000 58541926858 19513000000 19513975619 2333130816 2334106435
+58542000000 58544927007 19514000000 19514975669 2334130816 2335106485
+58545000000 58547927064 19515000000 19515975688 2335130816 2336106504
+58548000000 58550927260 19516000000 19516975753 2336130816 2337106569
+58551000000 58553927450 19517000000 19517975816 2337130816 2338106632
+58554000000 58556927595 19518000000 19518975865 2338130816 2339106681
+58557000000 58559927767 19519000000 19519975922 2339130816 2340106738
+58560000000 58562927900 19520000000 19520975966 2340130816 2341106782
+58563000000 58565927971 19521000000 19521975990 2341130816 2342106806
+58566000000 58568928197 19522000000 19522976065 2342130816 2343106881
+58569000000 58571928357 19523000000 19523976119 2343130816 2344106935
+58572000000 58574928489 19524000000 19524976163 2344130816 2345106979
+58575000000 58577928597 19525000000 19525976199 2345130816 2346107015
+58578000000 58580928808 19526000000 19526976269 2346130816 2347107085
+58581000000 58583928974 19527000000 19527976324 2347130816 2348107140
+58584000000 58586929085 19528000000 19528976361 2348130816 2349107177
+58587000000 58589929245 19529000000 19529976415 2349130816 2350107231
+58590000000 58592929357 19530000000 19530976452 2350130816 2351107268
+58593000000 58595929555 19531000000 19531976518 2351130816 2352107334
+58596000000 58598929645 19532000000 19532976548 2352130816 2353107364
+58599000000 58601929870 19533000000 19533976623 2353130816 2354107439
+58602000000 58604930002 19534000000 19534976667 2354130816 2355107483
+58605000000 58607930141 19535000000 19535976713 2355130816 2356107529
+58608000000 58610930192 19536000000 19536976730 2356130816 2357107546
+58611000000 58613930403 19537000000 19537976801 2357130816 2358107617
+58614000000 58616930612 19538000000 19538976870 2358130816 2359107686
+58617000000 58619930740 19539000000 19539976913 2359130816 2360107729
+58620000000 58622930883 19540000000 19540976961 2360130816 2361107777
+58623000000 58625931054 19541000000 19541977018 2361130816 2362107834
+58626000000 58628931151 19542000000 19542977050 2362130816 2363107866
+58629000000 58631931364 19543000000 19543977121 2363130816 2364107937
+58632000000 58634931494 19544000000 19544977164 2364130816 2365107980
+58635000000 58637931644 19545000000 19545977214 2365130816 2366108030
+58638000000 58640931804 19546000000 19546977268 2366130816 2367108084
+58641000000 58643931900 19547000000 19547977300 2367130816 2368108116
+58644000000 58646932088 19548000000 19548977362 2368130816 2369108178
+58647000000 58649932256 19549000000 19549977418 2369130816 2370108234
+58650000000 58652932392 19550000000 19550977464 2370130816 2371108280
+58653000000 58655932567 19551000000 19551977522 2371130816 2372108338
+58656000000 58658932689 19552000000 19552977563 2372130816 2373108379
+58659000000 58661932839 19553000000 19553977613 2373130816 2374108429
+58662000000 58664932987 19554000000 19554977662 2374130816 2375108478
+58665000000 58667933193 19555000000 19555977731 2375130816 2376108547
+58668000000 58670933307 19556000000 19556977769 2376130816 2377108585
+58671000000 58673933439 19557000000 19557977813 2377130816 2378108629
+58674000000 58676933613 19558000000 19558977871 2378130816 2379108687
+58677000000 58679933732 19559000000 19559977910 2379130816 2380108726
+58680000000 58682933856 19560000000 19560977952 2380130816 2381108768
+58683000000 58685934075 19561000000 19561978025 2381130816 2382108841
+58686000000 58688934211 19562000000 19562978070 2382130816 2383108886
+58689000000 58691934362 19563000000 19563978120 2383130816 2384108936
+58692000000 58694934522 19564000000 19564978174 2384130816 2385108990
+58695000000 58697934643 19565000000 19565978214 2385130816 2386109030
+58698000000 58700934724 19566000000 19566978241 2386130816 2387109057
+58701000000 58703934932 19567000000 19567978310 2387130816 2388109126
+58704000000 58706935087 19568000000 19568978362 2388130816 2389109178
+58707000000 58709935246 19569000000 19569978415 2389130816 2390109231
+58710000000 58712935398 19570000000 19570978466 2390130816 2391109282
+58713000000 58715935520 19571000000 19571978506 2391130816 2392109322
+58716000000 58718935698 19572000000 19572978566 2392130816 2393109382
+58719000000 58721935847 19573000000 19573978615 2393130816 2394109431
+58722000000 58724935975 19574000000 19574978658 2394130816 2395109474
+58725000000 58727936144 19575000000 19575978714 2395130816 2396109530
+58728000000 58730936264 19576000000 19576978754 2396130816 2397109570
+58731000000 58733936191 19577000000 19577978730 2397130816 2398109546
+58734000000 58736936514 19578000000 19578978838 2398130816 2399109654
+58737000000 58739936767 19579000000 19579978922 2399130816 2400109738
+58740000000 58742936877 19580000000 19580978959 2400130816 2401109775
+58743000000 58745937056 19581000000 19581979018 2401130816 2402109834
+58746000000 58748937104 19582000000 19582979034 2402130816 2403109850
+58749000000 58751937358 19583000000 19583979119 2403130816 2404109935
+58752000000 58754937477 19584000000 19584979159 2404130816 2405109975
+58755000000 58757937648 19585000000 19585979216 2405130816 2406110032
+58758000000 58760937795 19586000000 19586979265 2406130816 2407110081
+58761000000 58763937948 19587000000 19587979316 2407130816 2408110132
+58764000000 58766938094 19588000000 19588979364 2408130816 2409110180
+58767000000 58769938238 19589000000 19589979412 2409130816 2410110228
+58770000000 58772938401 19590000000 19590979467 2410130816 2411110283
+58773000000 58775938553 19591000000 19591979517 2411130816 2412110333
+58776000000 58778938707 19592000000 19592979569 2412130816 2413110385
+58779000000 58781938827 19593000000 19593979609 2413130816 2414110425
+58782000000 58784939036 19594000000 19594979678 2414130816 2415110494
+58785000000 58787939166 19595000000 19595979722 2415130816 2416110538
+58788000000 58790939280 19596000000 19596979760 2416130816 2417110576
+58791000000 58793939441 19597000000 19597979813 2417130816 2418110629
+58794000000 58796939576 19598000000 19598979858 2418130816 2419110674
+58797000000 58799939719 19599000000 19599979906 2419130816 2420110722
+58800000000 58802939819 19600000000 19600979939 2420130816 2421110755
+58803000000 58805940053 19601000000 19601980017 2421130816 2422110833
+58806000000 58808940126 19602000000 19602980042 2422130816 2423110858
+58809000000 58811940247 19603000000 19603980082 2423130816 2424110898
+58812000000 58814940436 19604000000 19604980145 2424130816 2425110961
+58815000000 58817940590 19605000000 19605980196 2425130816 2426111012
+58818000000 58820940769 19606000000 19606980256 2426130816 2427111072
+58821000000 58823940915 19607000000 19607980305 2427130816 2428111121
+58824000000 58826941042 19608000000 19608980347 2428130816 2429111163
+58827000000 58829941216 19609000000 19609980405 2429130816 2430111221
+58830000000 58832941280 19610000000 19610980426 2430130816 2431111242
+58833000000 58835941487 19611000000 19611980495 2431130816 2432111311
+58836000000 58838941668 19612000000 19612980556 2432130816 2433111372
+58839000000 58841941817 19613000000 19613980605 2433130816 2434111421
+58842000000 58844941874 19614000000 19614980624 2434130816 2435111440
+58845000000 58847942070 19615000000 19615980690 2435130816 2436111506
+58848000000 58850942260 19616000000 19616980753 2436130816 2437111569
+58851000000 58853942405 19617000000 19617980801 2437130816 2438111617
+58854000000 58856942577 19618000000 19618980859 2438130816 2439111675
+58857000000 58859942710 19619000000 19619980903 2439130816 2440111719
+58860000000 58862942781 19620000000 19620980927 2440130816 2441111743
+58863000000 58865943007 19621000000 19621981002 2441130816 2442111818
+58866000000 58868943167 19622000000 19622981055 2442130816 2443111871
+58869000000 58871943299 19623000000 19623981099 2443130816 2444111915
+58872000000 58874943407 19624000000 19624981135 2444130816 2445111951
+58875000000 58877943618 19625000000 19625981206 2445130816 2446112022
+58878000000 58880943784 19626000000 19626981261 2446130816 2447112077
+58881000000 58883943895 19627000000 19627981298 2447130816 2448112114
+58884000000 58886944055 19628000000 19628981351 2448130816 2449112167
+58887000000 58889944167 19629000000 19629981389 2449130816 2450112205
+58890000000 58892944365 19630000000 19630981455 2450130816 2451112271
+58893000000 58895944455 19631000000 19631981485 2451130816 2452112301
+58896000000 58898944680 19632000000 19632981560 2452130816 2453112376
+58899000000 58901944812 19633000000 19633981604 2453130816 2454112420
+58902000000 58904944951 19634000000 19634981650 2454130816 2455112466
+58905000000 58907945002 19635000000 19635981667 2455130816 2456112483
+58908000000 58910945213 19636000000 19636981737 2456130816 2457112553
+58911000000 58913945422 19637000000 19637981807 2457130816 2458112623
+58914000000 58916945550 19638000000 19638981850 2458130816 2459112666
+58917000000 58919945693 19639000000 19639981897 2459130816 2460112713
+58920000000 58922945864 19640000000 19640981954 2460130816 2461112770
+58923000000 58925945961 19641000000 19641981987 2461130816 2462112803
+58926000000 58928946174 19642000000 19642982058 2462130816 2463112874
+58929000000 58931946304 19643000000 19643982101 2463130816 2464112917
+58932000000 58934946454 19644000000 19644982151 2464130816 2465112967
+58935000000 58937946614 19645000000 19645982204 2465130816 2466113020
+58938000000 58940946710 19646000000 19646982236 2466130816 2467113052
+58941000000 58943946898 19647000000 19647982299 2467130816 2468113115
+58944000000 58946947066 19648000000 19648982355 2468130816 2469113171
+58947000000 58949947202 19649000000 19649982400 2469130816 2470113216
+58950000000 58952947377 19650000000 19650982459 2470130816 2471113275
+58953000000 58955947499 19651000000 19651982499 2471130816 2472113315
+58956000000 58958947649 19652000000 19652982549 2472130816 2473113365
+58959000000 58961947797 19653000000 19653982599 2473130816 2474113415
+58962000000 58964948003 19654000000 19654982667 2474130816 2475113483
+58965000000 58967948117 19655000000 19655982705 2475130816 2476113521
+58968000000 58970948249 19656000000 19656982749 2476130816 2477113565
+58971000000 58973948423 19657000000 19657982807 2477130816 2478113623
+58974000000 58976948542 19658000000 19658982847 2478130816 2479113663
+58977000000 58979948666 19659000000 19659982888 2479130816 2480113704
+58980000000 58982948885 19660000000 19660982961 2480130816 2481113777
+58983000000 58985949021 19661000000 19661983007 2481130816 2482113823
+58986000000 58988949172 19662000000 19662983057 2482130816 2483113873
+58989000000 58991949332 19663000000 19663983110 2483130816 2484113926
+58992000000 58994949453 19664000000 19664983151 2484130816 2485113967
+58995000000 58997949534 19665000000 19665983178 2485130816 2486113994
+58998000000 59000949742 19666000000 19666983247 2486130816 2487114063
+59001000000 59003949897 19667000000 19667983299 2487130816 2488114115
+59004000000 59006950056 19668000000 19668983352 2488130816 2489114168
+59007000000 59009950208 19669000000 19669983402 2489130816 2490114218
+59010000000 59012950330 19670000000 19670983443 2490130816 2491114259
+59013000000 59015950508 19671000000 19671983502 2491130816 2492114318
+59016000000 59018950657 19672000000 19672983552 2492130816 2493114368
+59019000000 59021950785 19673000000 19673983595 2493130816 2494114411
+59022000000 59024950954 19674000000 19674983651 2494130816 2495114467
+59025000000 59027951074 19675000000 19675983691 2495130816 2496114507
+59028000000 59030951001 19676000000 19676983667 2496130816 2497114483
+59031000000 59033951324 19677000000 19677983774 2497130816 2498114590
+59034000000 59036951577 19678000000 19678983859 2498130816 2499114675
+59037000000 59039951687 19679000000 19679983895 2499130816 2500114711
+59040000000 59042951866 19680000000 19680983955 2500130816 2501114771
+59043000000 59045951914 19681000000 19681983971 2501130816 2502114787
+59046000000 59048952168 19682000000 19682984056 2502130816 2503114872
+59049000000 59051952287 19683000000 19683984095 2503130816 2504114911
+59052000000 59054952458 19684000000 19684984152 2504130816 2505114968
+59055000000 59057952605 19685000000 19685984201 2505130816 2506115017
+59058000000 59060952758 19686000000 19686984252 2506130816 2507115068
+59061000000 59063952904 19687000000 19687984301 2507130816 2508115117
+59064000000 59066953048 19688000000 19688984349 2508130816 2509115165
+59067000000 59069953211 19689000000 19689984403 2509130816 2510115219
+59070000000 59072953363 19690000000 19690984454 2510130816 2511115270
+59073000000 59075953517 19691000000 19691984505 2511130816 2512115321
+59076000000 59078953637 19692000000 19692984545 2512130816 2513115361
+59079000000 59081953846 19693000000 19693984615 2513130816 2514115431
+59082000000 59084953976 19694000000 19694984658 2514130816 2515115474
+59085000000 59087954090 19695000000 19695984696 2515130816 2516115512
+59088000000 59090954251 19696000000 19696984750 2516130816 2517115566
+59091000000 59093954386 19697000000 19697984795 2517130816 2518115611
+59094000000 59096954529 19698000000 19698984843 2518130816 2519115659
+59097000000 59099954629 19699000000 19699984876 2519130816 2520115692
+59100000000 59102954863 19700000000 19700984954 2520130816 2521115770
+59103000000 59105954936 19701000000 19701984978 2521130816 2522115794
+59106000000 59108955057 19702000000 19702985019 2522130816 2523115835
+59109000000 59111955246 19703000000 19703985082 2523130816 2524115898
+59112000000 59114955400 19704000000 19704985133 2524130816 2525115949
+59115000000 59117955579 19705000000 19705985193 2525130816 2526116009
+59118000000 59120955725 19706000000 19706985241 2526130816 2527116057
+59121000000 59123955852 19707000000 19707985284 2527130816 2528116100
+59124000000 59126956026 19708000000 19708985342 2528130816 2529116158
+59127000000 59129956090 19709000000 19709985363 2529130816 2530116179
+59130000000 59132956297 19710000000 19710985432 2530130816 2531116248
+59133000000 59135956478 19711000000 19711985492 2531130816 2532116308
+59136000000 59138956627 19712000000 19712985542 2532130816 2533116358
+59139000000 59141956684 19713000000 19713985561 2533130816 2534116377
+59142000000 59144956880 19714000000 19714985626 2534130816 2535116442
+59145000000 59147957070 19715000000 19715985690 2535130816 2536116506
+59148000000 59150957215 19716000000 19716985738 2536130816 2537116554
+59151000000 59153957387 19717000000 19717985795 2537130816 2538116611
+59154000000 59156957520 19718000000 19718985840 2538130816 2539116656
+59157000000 59159957591 19719000000 19719985863 2539130816 2540116679
+59160000000 59162957817 19720000000 19720985939 2540130816 2541116755
+59163000000 59165957977 19721000000 19721985992 2541130816 2542116808
+59166000000 59168958109 19722000000 19722986036 2542130816 2543116852
+59169000000 59171958217 19723000000 19723986072 2543130816 2544116888
+59172000000 59174958428 19724000000 19724986142 2544130816 2545116958
+59175000000 59177958594 19725000000 19725986198 2545130816 2546117014
+59178000000 59180958705 19726000000 19726986235 2546130816 2547117051
+59181000000 59183958865 19727000000 19727986288 2547130816 2548117104
+59184000000 59186958977 19728000000 19728986325 2548130816 2549117141
+59187000000 59189959175 19729000000 19729986391 2549130816 2550117207
+59190000000 59192959265 19730000000 19730986421 2550130816 2551117237
+59193000000 59195959490 19731000000 19731986496 2551130816 2552117312
+59196000000 59198959622 19732000000 19732986540 2552130816 2553117356
+59199000000 59201959761 19733000000 19733986587 2553130816 2554117403
+59202000000 59204959812 19734000000 19734986604 2554130816 2555117420
+59205000000 59207960023 19735000000 19735986674 2555130816 2556117490
+59208000000 59210960232 19736000000 19736986744 2556130816 2557117560
+59211000000 59213960360 19737000000 19737986786 2557130816 2558117602
+59214000000 59216960503 19738000000 19738986834 2558130816 2559117650
+59217000000 59219960674 19739000000 19739986891 2559130816 2560117707
+59220000000 59222960771 19740000000 19740986923 2560130816 2561117739
+59223000000 59225960984 19741000000 19741986994 2561130816 2562117810
+59226000000 59228961114 19742000000 19742987038 2562130816 2563117854
+59229000000 59231961264 19743000000 19743987088 2563130816 2564117904
+59232000000 59234961424 19744000000 19744987141 2564130816 2565117957
+59235000000 59237961520 19745000000 19745987173 2565130816 2566117989
+59238000000 59240961708 19746000000 19746987236 2566130816 2567118052
+59241000000 59243961876 19747000000 19747987292 2567130816 2568118108
+59244000000 59246962012 19748000000 19748987337 2568130816 2569118153
+59247000000 59249962187 19749000000 19749987395 2569130816 2570118211
+59250000000 59252962309 19750000000 19750987436 2570130816 2571118252
+59253000000 59255962459 19751000000 19751987486 2571130816 2572118302
+59256000000 59258962607 19752000000 19752987535 2572130816 2573118351
+59259000000 59261962813 19753000000 19753987604 2573130816 2574118420
+59262000000 59264962927 19754000000 19754987642 2574130816 2575118458
+59265000000 59267963059 19755000000 19755987686 2575130816 2576118502
+59268000000 59270963233 19756000000 19756987744 2576130816 2577118560
+59271000000 59273963352 19757000000 19757987784 2577130816 2578118600
+59274000000 59276963476 19758000000 19758987825 2578130816 2579118641
+59277000000 59279963695 19759000000 19759987898 2579130816 2580118714
+59280000000 59282963831 19760000000 19760987943 2580130816 2581118759
+59283000000 59285963982 19761000000 19761987994 2581130816 2582118810
+59286000000 59288964142 19762000000 19762988047 2582130816 2583118863
+59289000000 59291964263 19763000000 19763988087 2583130816 2584118903
+59292000000 59294964344 19764000000 19764988114 2584130816 2585118930
+59295000000 59297964552 19765000000 19765988184 2585130816 2586119000
+59298000000 59300964707 19766000000 19766988235 2586130816 2587119051
+59301000000 59303964866 19767000000 19767988288 2587130816 2588119104
+59304000000 59306965018 19768000000 19768988339 2588130816 2589119155
+59307000000 59309965140 19769000000 19769988380 2589130816 2590119196
+59310000000 59312965318 19770000000 19770988439 2590130816 2591119255
+59313000000 59315965467 19771000000 19771988489 2591130816 2592119305
+59316000000 59318965595 19772000000 19772988531 2592130816 2593119347
+59319000000 59321965764 19773000000 19773988588 2593130816 2594119404
+59322000000 59324965884 19774000000 19774988628 2594130816 2595119444
+59325000000 59327965811 19775000000 19775988603 2595130816 2596119419
+59328000000 59330966134 19776000000 19776988711 2596130816 2597119527
+59331000000 59333966387 19777000000 19777988795 2597130816 2598119611
+59334000000 59336966497 19778000000 19778988832 2598130816 2599119648
+59337000000 59339966676 19779000000 19779988892 2599130816 2600119708
+59340000000 59342966724 19780000000 19780988908 2600130816 2601119724
+59343000000 59345966978 19781000000 19781988992 2601130816 2602119808
+59346000000 59348967097 19782000000 19782989032 2602130816 2603119848
+59349000000 59351967268 19783000000 19783989089 2603130816 2604119905
+59352000000 59354967415 19784000000 19784989138 2604130816 2605119954
+59355000000 59357967568 19785000000 19785989189 2605130816 2606120005
+59358000000 59360967714 19786000000 19786989238 2606130816 2607120054
+59361000000 59363967858 19787000000 19787989286 2607130816 2608120102
+59364000000 59366968021 19788000000 19788989340 2608130816 2609120156
+59367000000 59369968173 19789000000 19789989391 2609130816 2610120207
+59370000000 59372968327 19790000000 19790989442 2610130816 2611120258
+59373000000 59375968447 19791000000 19791989482 2611130816 2612120298
+59376000000 59378968656 19792000000 19792989552 2612130816 2613120368
+59379000000 59381968786 19793000000 19793989595 2613130816 2614120411
+59382000000 59384968900 19794000000 19794989633 2614130816 2615120449
+59385000000 59387969061 19795000000 19795989687 2615130816 2616120503
+59388000000 59390969196 19796000000 19796989732 2616130816 2617120548
+59391000000 59393969339 19797000000 19797989779 2617130816 2618120595
+59394000000 59396969439 19798000000 19798989813 2618130816 2619120629
+59397000000 59399969673 19799000000 19799989891 2619130816 2620120707
+59400000000 59402969746 19800000000 19800989915 2620130816 2621120731
+59403000000 59405969867 19801000000 19801989955 2621130816 2622120771
+59406000000 59408970056 19802000000 19802990018 2622130816 2623120834
+59409000000 59411970210 19803000000 19803990070 2623130816 2624120886
+59412000000 59414970389 19804000000 19804990129 2624130816 2625120945
+59415000000 59417970535 19805000000 19805990178 2625130816 2626120994
+59418000000 59420970662 19806000000 19806990220 2626130816 2627121036
+59421000000 59423970836 19807000000 19807990278 2627130816 2628121094
+59424000000 59426970900 19808000000 19808990300 2628130816 2629121116
+59427000000 59429971107 19809000000 19809990369 2629130816 2630121185
+59430000000 59432971288 19810000000 19810990429 2630130816 2631121245
+59433000000 59435971437 19811000000 19811990479 2631130816 2632121295
+59436000000 59438971494 19812000000 19812990498 2632130816 2633121314
+59439000000 59441971690 19813000000 19813990563 2633130816 2634121379
+59442000000 59444971880 19814000000 19814990626 2634130816 2635121442
+59445000000 59447972025 19815000000 19815990675 2635130816 2636121491
+59448000000 59450972197 19816000000 19816990732 2636130816 2637121548
+59451000000 59453972330 19817000000 19817990776 2637130816 2638121592
+59454000000 59456972401 19818000000 19818990800 2638130816 2639121616
+59457000000 59459972627 19819000000 19819990875 2639130816 2640121691
+59460000000 59462972787 19820000000 19820990929 2640130816 2641121745
+59463000000 59465972919 19821000000 19821990973 2641130816 2642121789
+59466000000 59468973027 19822000000 19822991009 2642130816 2643121825
+59469000000 59471973238 19823000000 19823991079 2643130816 2644121895
+59472000000 59474973404 19824000000 19824991134 2644130816 2645121950
+59475000000 59477973515 19825000000 19825991171 2645130816 2646121987
+59478000000 59480973675 19826000000 19826991225 2646130816 2647122041
+59481000000 59483973787 19827000000 19827991262 2647130816 2648122078
+59484000000 59486973985 19828000000 19828991328 2648130816 2649122144
+59487000000 59489974075 19829000000 19829991358 2649130816 2650122174
+59490000000 59492974300 19830000000 19830991433 2650130816 2651122249
+59493000000 59495974432 19831000000 19831991477 2651130816 2652122293
+59496000000 59498974571 19832000000 19832991523 2652130816 2653122339
+59499000000 59501974622 19833000000 19833991540 2653130816 2654122356
+59502000000 59504974833 19834000000 19834991611 2654130816 2655122427
+59505000000 59507975042 19835000000 19835991680 2655130816 2656122496
+59508000000 59510975170 19836000000 19836991723 2656130816 2657122539
+59511000000 59513975313 19837000000 19837991771 2657130816 2658122587
+59514000000 59516975484 19838000000 19838991828 2658130816 2659122644
+59517000000 59519975581 19839000000 19839991860 2659130816 2660122676
+59520000000 59522975794 19840000000 19840991931 2660130816 2661122747
+59523000000 59525975924 19841000000 19841991974 2661130816 2662122790
+59526000000 59528976074 19842000000 19842992024 2662130816 2663122840
+59529000000 59531976234 19843000000 19843992078 2663130816 2664122894
+59532000000 59534976330 19844000000 19844992110 2664130816 2665122926
+59535000000 59537976518 19845000000 19845992172 2665130816 2666122988
+59538000000 59540976686 19846000000 19846992228 2666130816 2667123044
+59541000000 59543976822 19847000000 19847992274 2667130816 2668123090
+59544000000 59546976997 19848000000 19848992332 2668130816 2669123148
+59547000000 59549977119 19849000000 19849992373 2669130816 2670123189
+59550000000 59552977269 19850000000 19850992423 2670130816 2671123239
+59553000000 59555977417 19851000000 19851992472 2671130816 2672123288
+59556000000 59558977623 19852000000 19852992541 2672130816 2673123357
+59559000000 59561977737 19853000000 19853992579 2673130816 2674123395
+59562000000 59564977869 19854000000 19854992623 2674130816 2675123439
+59565000000 59567978043 19855000000 19855992681 2675130816 2676123497
+59568000000 59570978162 19856000000 19856992720 2676130816 2677123536
+59571000000 59573978286 19857000000 19857992762 2677130816 2678123578
+59574000000 59576978505 19858000000 19858992835 2678130816 2679123651
+59577000000 59579978641 19859000000 19859992880 2679130816 2680123696
+59580000000 59582978792 19860000000 19860992930 2680130816 2681123746
+59583000000 59585978952 19861000000 19861992984 2681130816 2682123800
+59586000000 59588979073 19862000000 19862993024 2682130816 2683123840
+59589000000 59591979154 19863000000 19863993051 2683130816 2684123867
+59592000000 59594979362 19864000000 19864993120 2684130816 2685123936
+59595000000 59597979517 19865000000 19865993172 2685130816 2686123988
+59598000000 59600979676 19866000000 19866993225 2686130816 2687124041
+59601000000 59603979828 19867000000 19867993276 2687130816 2688124092
+59604000000 59606979950 19868000000 19868993316 2688130816 2689124132
+59607000000 59609980128 19869000000 19869993376 2689130816 2690124192
+59610000000 59612980277 19870000000 19870993425 2690130816 2691124241
+59613000000 59615980405 19871000000 19871993468 2691130816 2692124284
+59616000000 59618980574 19872000000 19872993524 2692130816 2693124340
+59619000000 59621980694 19873000000 19873993564 2693130816 2694124380
+59622000000 59624980621 19874000000 19874993540 2694130816 2695124356
+59625000000 59627980944 19875000000 19875993648 2695130816 2696124464
+59628000000 59630981197 19876000000 19876993732 2696130816 2697124548
+59631000000 59633981307 19877000000 19877993769 2697130816 2698124585
+59634000000 59636981486 19878000000 19878993828 2698130816 2699124644
+59637000000 59639981534 19879000000 19879993844 2699130816 2700124660
+59640000000 59642981788 19880000000 19880993929 2700130816 2701124745
+59643000000 59645981907 19881000000 19881993969 2701130816 2702124785
+59646000000 59648982078 19882000000 19882994026 2702130816 2703124842
+59649000000 59651982225 19883000000 19883994075 2703130816 2704124891
+59652000000 59654982378 19884000000 19884994126 2704130816 2705124942
+59655000000 59657982524 19885000000 19885994174 2705130816 2706124990
+59658000000 59660982668 19886000000 19886994222 2706130816 2707125038
+59661000000 59663982831 19887000000 19887994277 2707130816 2708125093
+59664000000 59666982983 19888000000 19888994327 2708130816 2709125143
+59667000000 59669983137 19889000000 19889994379 2709130816 2710125195
+59670000000 59672983257 19890000000 19890994419 2710130816 2711125235
+59673000000 59675983466 19891000000 19891994488 2711130816 2712125304
+59676000000 59678983596 19892000000 19892994532 2712130816 2713125348
+59679000000 59681983710 19893000000 19893994570 2713130816 2714125386
+59682000000 59684983871 19894000000 19894994623 2714130816 2715125439
+59685000000 59687984006 19895000000 19895994668 2715130816 2716125484
+59688000000 59690984149 19896000000 19896994716 2716130816 2717125532
+59691000000 59693984249 19897000000 19897994749 2717130816 2718125565
+59694000000 59696984483 19898000000 19898994827 2718130816 2719125643
+59697000000 59699984556 19899000000 19899994852 2719130816 2720125668
+59700000000 59702984677 19900000000 19900994892 2720130816 2721125708
+59703000000 59705984866 19901000000 19901994955 2721130816 2722125771
+59706000000 59708985020 19902000000 19902995006 2722130816 2723125822
+59709000000 59711985199 19903000000 19903995066 2723130816 2724125882
+59712000000 59714985345 19904000000 19904995115 2724130816 2725125931
+59715000000 59717985472 19905000000 19905995157 2725130816 2726125973
+59718000000 59720985646 19906000000 19906995215 2726130816 2727126031
+59721000000 59723985710 19907000000 19907995236 2727130816 2728126052
+59724000000 59726985917 19908000000 19908995305 2728130816 2729126121
+59727000000 59729986098 19909000000 19909995366 2729130816 2730126182
+59730000000 59732986247 19910000000 19910995415 2730130816 2731126231
+59733000000 59735986304 19911000000 19911995434 2731130816 2732126250
+59736000000 59738986500 19912000000 19912995500 2732130816 2733126316
+59739000000 59741986690 19913000000 19913995563 2733130816 2734126379
+59742000000 59744986835 19914000000 19914995611 2734130816 2735126427
+59745000000 59747987007 19915000000 19915995669 2735130816 2736126485
+59748000000 59750987140 19916000000 19916995713 2736130816 2737126529
+59751000000 59753987211 19917000000 19917995737 2737130816 2738126553
+59754000000 59756987437 19918000000 19918995812 2738130816 2739126628
+59757000000 59759987597 19919000000 19919995865 2739130816 2740126681
+59760000000 59762987729 19920000000 19920995909 2740130816 2741126725
+59763000000 59765987837 19921000000 19921995945 2741130816 2742126761
+59766000000 59768988048 19922000000 19922996016 2742130816 2743126832
+59769000000 59771988214 19923000000 19923996071 2743130816 2744126887
+59772000000 59774988325 19924000000 19924996108 2744130816 2745126924
+59775000000 59777988485 19925000000 19925996161 2745130816 2746126977
+59778000000 59780988597 19926000000 19926996199 2746130816 2747127015
+59781000000 59783988795 19927000000 19927996265 2747130816 2748127081
+59784000000 59786988885 19928000000 19928996295 2748130816 2749127111
+59787000000 59789989110 19929000000 19929996370 2749130816 2750127186
+59790000000 59792989242 19930000000 19930996414 2750130816 2751127230
+59793000000 59795989381 19931000000 19931996460 2751130816 2752127276
+59796000000 59798989432 19932000000 19932996477 2752130816 2753127293
+59799000000 59801989643 19933000000 19933996547 2753130816 2754127363
+59802000000 59804989852 19934000000 19934996617 2754130816 2755127433
+59805000000 59807989980 19935000000 19935996660 2755130816 2756127476
+59808000000 59810990123 19936000000 19936996707 2756130816 2757127523
+59811000000 59813990294 19937000000 19937996764 2757130816 2758127580
+59814000000 59816990391 19938000000 19938996797 2758130816 2759127613
+59817000000 59819990604 19939000000 19939996868 2759130816 2760127684
+59820000000 59822990734 19940000000 19940996911 2760130816 2761127727
+59823000000 59825990884 19941000000 19941996961 2761130816 2762127777
+59826000000 59828991044 19942000000 19942997014 2762130816 2763127830
+59829000000 59831991140 19943000000 19943997046 2763130816 2764127862
+59832000000 59834991328 19944000000 19944997109 2764130816 2765127925
+59835000000 59837991496 19945000000 19945997165 2765130816 2766127981
+59838000000 59840991632 19946000000 19946997210 2766130816 2767128026
+59841000000 59843991807 19947000000 19947997269 2767130816 2768128085
+59844000000 59846991929 19948000000 19948997309 2768130816 2769128125
+59847000000 59849992079 19949000000 19949997359 2769130816 2770128175
+59850000000 59852992227 19950000000 19950997409 2770130816 2771128225
+59853000000 59855992433 19951000000 19951997477 2771130816 2772128293
+59856000000 59858992547 19952000000 19952997515 2772130816 2773128331
+59859000000 59861992679 19953000000 19953997559 2773130816 2774128375
+59862000000 59864992853 19954000000 19954997617 2774130816 2775128433
+59865000000 59867992972 19955000000 19955997657 2775130816 2776128473
+59868000000 59870993096 19956000000 19956997698 2776130816 2777128514
+59871000000 59873993315 19957000000 19957997771 2777130816 2778128587
+59874000000 59876993451 19958000000 19958997817 2778130816 2779128633
+59877000000 59879993602 19959000000 19959997867 2779130816 2780128683
+59880000000 59882993762 19960000000 19960997920 2780130816 2781128736
+59883000000 59885993883 19961000000 19961997961 2781130816 2782128777
+59886000000 59888993964 19962000000 19962997988 2782130816 2783128804
+59889000000 59891994172 19963000000 19963998057 2783130816 2784128873
+59892000000 59894994327 19964000000 19964998109 2784130816 2785128925
+59895000000 59897994486 19965000000 19965998162 2785130816 2786128978
+59898000000 59900994638 19966000000 19966998212 2786130816 2787129028
+59901000000 59903994760 19967000000 19967998253 2787130816 2788129069
+59904000000 59906994938 19968000000 19968998312 2788130816 2789129128
+59907000000 59909995087 19969000000 19969998362 2789130816 2790129178
+59910000000 59912995215 19970000000 19970998405 2790130816 2791129221
+59913000000 59915995384 19971000000 19971998461 2791130816 2792129277
+59916000000 59918995504 19972000000 19972998501 2792130816 2793129317
+59919000000 59921995431 19973000000 19973998477 2793130816 2794129293
+59922000000 59924995754 19974000000 19974998584 2794130816 2795129400
+59925000000 59927996007 19975000000 19975998669 2795130816 2796129485
+59928000000 59930996117 19976000000 19976998705 2796130816 2797129521
+59931000000 59933996296 19977000000 19977998765 2797130816 2798129581
+59934000000 59936996344 19978000000 19978998781 2798130816 2799129597
+59937000000 59939996598 19979000000 19979998866 2799130816 2800129682
+59940000000 59942996717 19980000000 19980998905 2800130816 2801129721
+59943000000 59945996888 19981000000 19981998962 2801130816 2802129778
+59946000000 59948997035 19982000000 19982999011 2802130816 2803129827
+59949000000 59951997188 19983000000 19983999062 2803130816 2804129878
+59952000000 59954997334 19984000000 19984999111 2804130816 2805129927
+59955000000 59957997478 19985000000 19985999159 2805130816 2806129975
+59958000000 59960997641 19986000000 19986999213 2806130816 2807130029
+59961000000 59963997793 19987000000 19987999264 2807130816 2808130080
+59964000000 59966997947 19988000000 19988999315 2808130816 2809130131
+59967000000 59969998067 19989000000 19989999355 2809130816 2810130171
+59970000000 59972998276 19990000000 19990999425 2810130816 2811130241
+59973000000 59975998406 19991000000 19991999468 2811130816 2812130284
+59976000000 59978998520 19992000000 19992999506 2812130816 2813130322
+59979000000 59981998681 19993000000 19993999560 2813130816 2814130376
+59982000000 59984998816 19994000000 19994999605 2814130816 2815130421
+59985000000 59987998959 19995000000 19995999653 2815130816 2816130469
+59988000000 59990999059 19996000000 19996999686 2816130816 2817130502
+59991000000 59993999293 19997000000 19997999764 2817130816 2818130580
+59994000000 59996999366 19998000000 19998999788 2818130816 2819130604
+59997000000 59999999487 19999000000 19999999829 2819130816 2820130645
+60000000000 60002999676 20000000000 20000999892 2820130816 2821130708
+60003000000 60005999830 20001000000 20001999943 2821130816 2822130759
+60006000000 60009000009 20002000000 20003000003 2822130816 2823130819
+60009000000 60012000155 20003000000 20004000051 2823130816 2824130867
+60012000000 60015000282 20004000000 20005000094 2824130816 2825130910
+60015000000 60018000456 20005000000 20006000152 2825130816 2826130968
+60018000000 60021000520 20006000000 20007000173 2826130816 2827130989
+60021000000 60024000727 20007000000 20008000242 2827130816 2828131058
+60024000000 60027000908 20008000000 20009000302 2828130816 2829131118
+60027000000 60030001057 20009000000 20010000352 2829130816 2830131168
+60030000000 60033001114 20010000000 20011000371 2830130816 2831131187
+60033000000 60036001310 20011000000 20012000436 2831130816 2832131252
+60036000000 60039001500 20012000000 20013000500 2832130816 2833131316
+60039000000 60042001645 20013000000 20014000548 2833130816 2834131364
+60042000000 60045001817 20014000000 20015000605 2834130816 2835131421
+60045000000 60048001950 20015000000 20016000650 2835130816 2836131466
+60048000000 60051002021 20016000000 20017000673 2836130816 2837131489
+60051000000 60054002247 20017000000 20018000749 2837130816 2838131565
+60054000000 60057002407 20018000000 20019000802 2838130816 2839131618
+60057000000 60060002539 20019000000 20020000846 2839130816 2840131662
+60060000000 60063002647 20020000000 20021000882 2840130816 2841131698
+60063000000 60066002858 20021000000 20022000952 2841130816 2842131768
+60066000000 60069003024 20022000000 20023001008 2842130816 2843131824
+60069000000 60072003135 20023000000 20024001045 2843130816 2844131861
+60072000000 60075003295 20024000000 20025001098 2844130816 2845131914
+60075000000 60078003407 20025000000 20026001135 2845130816 2846131951
+60078000000 60081003605 20026000000 20027001201 2846130816 2847132017
+60081000000 60084003695 20027000000 20028001231 2847130816 2848132047
+60084000000 60087003920 20028000000 20029001306 2848130816 2849132122
+60087000000 60090004052 20029000000 20030001350 2849130816 2850132166
+60090000000 60093004191 20030000000 20031001397 2850130816 2851132213
+60093000000 60096004242 20031000000 20032001414 2851130816 2852132230
+60096000000 60099004453 20032000000 20033001484 2852130816 2853132300
+60099000000 60102004662 20033000000 20034001554 2853130816 2854132370
+60102000000 60105004790 20034000000 20035001596 2854130816 2855132412
+60105000000 60108004933 20035000000 20036001644 2855130816 2856132460
+60108000000 60111005104 20036000000 20037001701 2856130816 2857132517
+60111000000 60114005201 20037000000 20038001733 2857130816 2858132549
+60114000000 60117005414 20038000000 20039001804 2858130816 2859132620
+60117000000 60120005544 20039000000 20040001848 2859130816 2860132664
+60120000000 60123005694 20040000000 20041001898 2860130816 2861132714
+60123000000 60126005854 20041000000 20042001951 2861130816 2862132767
+60126000000 60129005950 20042000000 20043001983 2862130816 2863132799
+60129000000 60132006138 20043000000 20044002046 2863130816 2864132862
+60132000000 60135006306 20044000000 20045002102 2864130816 2865132918
+60135000000 60138006442 20045000000 20046002147 2865130816 2866132963
+60138000000 60141006617 20046000000 20047002205 2866130816 2867133021
+60141000000 60144006739 20047000000 20048002246 2867130816 2868133062
+60144000000 60147006889 20048000000 20049002296 2868130816 2869133112
+60147000000 60150007037 20049000000 20050002345 2869130816 2870133161
+60150000000 60153007243 20050000000 20051002414 2870130816 2871133230
+60153000000 60156007357 20051000000 20052002452 2871130816 2872133268
+60156000000 60159007489 20052000000 20053002496 2872130816 2873133312
+60159000000 60162007663 20053000000 20054002554 2873130816 2874133370
+60162000000 60165007782 20054000000 20055002594 2874130816 2875133410
+60165000000 60168007906 20055000000 20056002635 2875130816 2876133451
+60168000000 60171008125 20056000000 20057002708 2876130816 2877133524
+60171000000 60174008261 20057000000 20058002753 2877130816 2878133569
+60174000000 60177008412 20058000000 20059002804 2878130816 2879133620
+60177000000 60180008572 20059000000 20060002857 2879130816 2880133673
+60180000000 60183008693 20060000000 20061002897 2880130816 2881133713
+60183000000 60186008774 20061000000 20062002924 2881130816 2882133740
+60186000000 60189008982 20062000000 20063002994 2882130816 2883133810
+60189000000 60192009137 20063000000 20064003045 2883130816 2884133861
+60192000000 60195009296 20064000000 20065003098 2884130816 2885133914
+60195000000 60198009448 20065000000 20066003149 2885130816 2886133965
+60198000000 60201009570 20066000000 20067003190 2886130816 2887134006
+60201000000 60204009748 20067000000 20068003249 2887130816 2888134065
+60204000000 60207009897 20068000000 20069003299 2888130816 2889134115
+60207000000 60210010025 20069000000 20070003341 2889130816 2890134157
+60210000000 60213010194 20070000000 20071003398 2890130816 2891134214
+60213000000 60216010314 20071000000 20072003438 2891130816 2892134254
+60216000000 60219010241 20072000000 20073003413 2892130816 2893134229
+60219000000 60222010564 20073000000 20074003521 2893130816 2894134337
+60222000000 60225010817 20074000000 20075003605 2894130816 2895134421
+60225000000 60228010927 20075000000 20076003642 2895130816 2896134458
+60228000000 60231011106 20076000000 20077003702 2896130816 2897134518
+60231000000 60234011154 20077000000 20078003718 2897130816 2898134534
+60234000000 60237011408 20078000000 20079003802 2898130816 2899134618
+60237000000 60240011527 20079000000 20080003842 2899130816 2900134658
+60240000000 60243011698 20080000000 20081003899 2900130816 2901134715
+60243000000 60246011845 20081000000 20082003948 2901130816 2902134764
+60246000000 60249011998 20082000000 20083003999 2902130816 2903134815
+60249000000 60252012144 20083000000 20084004048 2903130816 2904134864
+60252000000 60255012288 20084000000 20085004096 2904130816 2905134912
+60255000000 60258012451 20085000000 20086004150 2905130816 2906134966
+60258000000 60261012603 20086000000 20087004201 2906130816 2907135017
+60261000000 60264012757 20087000000 20088004252 2907130816 2908135068
+60264000000 60267012877 20088000000 20089004292 2908130816 2909135108
+60267000000 60270013086 20089000000 20090004362 2909130816 2910135178
+60270000000 60273013216 20090000000 20091004405 2910130816 2911135221
+60273000000 60276013330 20091000000 20092004443 2911130816 2912135259
+60276000000 60279013491 20092000000 20093004497 2912130816 2913135313
+60279000000 60282013626 20093000000 20094004542 2913130816 2914135358
+60282000000 60285013769 20094000000 20095004589 2914130816 2915135405
+60285000000 60288013869 20095000000 20096004623 2915130816 2916135439
+60288000000 60291014103 20096000000 20097004701 2916130816 2917135517
+60291000000 60294014176 20097000000 20098004725 2917130816 2918135541
+60294000000 60297014297 20098000000 20099004765 2918130816 2919135581
+60297000000 60300014486 20099000000 20100004828 2919130816 2920135644
+60300000000 60303014640 20100000000 20101004880 2920130816 2921135696
+60303000000 60306014819 20101000000 20102004939 2921130816 2922135755
+60306000000 60309014965 20102000000 20103004988 2922130816 2923135804
+60309000000 60312015092 20103000000 20104005030 2923130816 2924135846
+60312000000 60315015266 20104000000 20105005088 2924130816 2925135904
+60315000000 60318015330 20105000000 20106005110 2925130816 2926135926
+60318000000 60321015537 20106000000 20107005179 2926130816 2927135995
+60321000000 60324015718 20107000000 20108005239 2927130816 2928136055
+60324000000 60327015867 20108000000 20109005289 2928130816 2929136105
+60327000000 60330015924 20109000000 20110005308 2929130816 2930136124
+60330000000 60333016120 20110000000 20111005373 2930130816 2931136189
+60333000000 60336016310 20111000000 20112005436 2931130816 2932136252
+60336000000 60339016455 20112000000 20113005485 2932130816 2933136301
+60339000000 60342016627 20113000000 20114005542 2933130816 2934136358
+60342000000 60345016760 20114000000 20115005586 2934130816 2935136402
+60345000000 60348016831 20115000000 20116005610 2935130816 2936136426
+60348000000 60351017057 20116000000 20117005685 2936130816 2937136501
+60351000000 60354017217 20117000000 20118005739 2937130816 2938136555
+60354000000 60357017349 20118000000 20119005783 2938130816 2939136599
+60357000000 60360017457 20119000000 20120005819 2939130816 2940136635
+60360000000 60363017668 20120000000 20121005889 2940130816 2941136705
+60363000000 60366017834 20121000000 20122005944 2941130816 2942136760
+60366000000 60369017945 20122000000 20123005981 2942130816 2943136797
+60369000000 60372018105 20123000000 20124006035 2943130816 2944136851
+60372000000 60375018217 20124000000 20125006072 2944130816 2945136888
+60375000000 60378018415 20125000000 20126006138 2945130816 2946136954
+60378000000 60381018505 20126000000 20127006168 2946130816 2947136984
+60381000000 60384018730 20127000000 20128006243 2947130816 2948137059
+60384000000 60387018862 20128000000 20129006287 2948130816 2949137103
+60387000000 60390019001 20129000000 20130006333 2949130816 2950137149
+60390000000 60393019052 20130000000 20131006350 2950130816 2951137166
+60393000000 60396019263 20131000000 20132006421 2951130816 2952137237
+60396000000 60399019472 20132000000 20133006490 2952130816 2953137306
+60399000000 60402019600 20133000000 20134006533 2953130816 2954137349
+60402000000 60405019743 20134000000 20135006581 2954130816 2955137397
+60405000000 60408019914 20135000000 20136006638 2955130816 2956137454
+60408000000 60411020011 20136000000 20137006670 2956130816 2957137486
+60411000000 60414020224 20137000000 20138006741 2957130816 2958137557
+60414000000 60417020354 20138000000 20139006784 2958130816 2959137600
+60417000000 60420020504 20139000000 20140006834 2959130816 2960137650
+60420000000 60423020664 20140000000 20141006888 2960130816 2961137704
+60423000000 60426020760 20141000000 20142006920 2961130816 2962137736
+60426000000 60429020948 20142000000 20143006982 2962130816 2963137798
+60429000000 60432021116 20143000000 20144007038 2963130816 2964137854
+60432000000 60435021252 20144000000 20145007084 2964130816 2965137900
+60435000000 60438021427 20145000000 20146007142 2965130816 2966137958
+60438000000 60441021549 20146000000 20147007183 2966130816 2967137999
+60441000000 60444021699 20147000000 20148007233 2967130816 2968138049
+60444000000 60447021847 20148000000 20149007282 2968130816 2969138098
+60447000000 60450022053 20149000000 20150007351 2969130816 2970138167
+60450000000 60453022167 20150000000 20151007389 2970130816 2971138205
+60453000000 60456022299 20151000000 20152007433 2971130816 2972138249
+60456000000 60459022473 20152000000 20153007491 2972130816 2973138307
+60459000000 60462022592 20153000000 20154007530 2973130816 2974138346
+60462000000 60465022716 20154000000 20155007572 2974130816 2975138388
+60465000000 60468022935 20155000000 20156007645 2975130816 2976138461
+60468000000 60471023071 20156000000 20157007690 2976130816 2977138506
+60471000000 60474023222 20157000000 20158007740 2977130816 2978138556
+60474000000 60477023382 20158000000 20159007794 2978130816 2979138610
+60477000000 60480023503 20159000000 20160007834 2979130816 2980138650
+60480000000 60483023584 20160000000 20161007861 2980130816 2981138677
+60483000000 60486023792 20161000000 20162007930 2981130816 2982138746
+60486000000 60489023947 20162000000 20163007982 2982130816 2983138798
+60489000000 60492024106 20163000000 20164008035 2983130816 2984138851
+60492000000 60495024258 20164000000 20165008086 2984130816 2985138902
+60495000000 60498024380 20165000000 20166008126 2985130816 2986138942
+60498000000 60501024558 20166000000 20167008186 2986130816 2987139002
+60501000000 60504024707 20167000000 20168008235 2987130816 2988139051
+60504000000 60507024835 20168000000 20169008278 2988130816 2989139094
+60507000000 60510025004 20169000000 20170008334 2989130816 2990139150
+60510000000 60513025124 20170000000 20171008374 2990130816 2991139190
+60513000000 60516025051 20171000000 20172008350 2991130816 2992139166
+60516000000 60519025374 20172000000 20173008458 2992130816 2993139274
+60519000000 60522025627 20173000000 20174008542 2993130816 2994139358
+60522000000 60525025737 20174000000 20175008579 2994130816 2995139395
+60525000000 60528025916 20175000000 20176008638 2995130816 2996139454
+60528000000 60531025964 20176000000 20177008654 2996130816 2997139470
+60531000000 60534026218 20177000000 20178008739 2997130816 2998139555
+60534000000 60537026337 20178000000 20179008779 2998130816 2999139595
+60537000000 60540026508 20179000000 20180008836 2999130816 3000139652
+60540000000 60543026655 20180000000 20181008885 3000130816 3001139701
+60543000000 60546026808 20181000000 20182008936 3001130816 3002139752
+60546000000 60549026954 20182000000 20183008984 3002130816 3003139800
+60549000000 60552027098 20183000000 20184009032 3003130816 3004139848
+60552000000 60555027261 20184000000 20185009087 3004130816 3005139903
+60555000000 60558027413 20185000000 20186009137 3005130816 3006139953
+60558000000 60561027567 20186000000 20187009189 3006130816 3007140005
+60561000000 60564027687 20187000000 20188009229 3007130816 3008140045
+60564000000 60567027896 20188000000 20189009298 3008130816 3009140114
+60567000000 60570028026 20189000000 20190009342 3009130816 3010140158
+60570000000 60573028140 20190000000 20191009380 3010130816 3011140196
+60573000000 60576028301 20191000000 20192009433 3011130816 3012140249
+60576000000 60579028436 20192000000 20193009478 3012130816 3013140294
+60579000000 60582028579 20193000000 20194009526 3013130816 3014140342
+60582000000 60585028679 20194000000 20195009559 3014130816 3015140375
+60585000000 60588028913 20195000000 20196009637 3015130816 3016140453
+60588000000 60591028986 20196000000 20197009662 3016130816 3017140478
+60591000000 60594029107 20197000000 20198009702 3017130816 3018140518
+60594000000 60597029296 20198000000 20199009765 3018130816 3019140581
+60597000000 60600029450 20199000000 20200009816 3019130816 3020140632
+60600000000 60603029629 20200000000 20201009876 3020130816 3021140692
+60603000000 60606029775 20201000000 20202009925 3021130816 3022140741
+60606000000 60609029902 20202000000 20203009967 3022130816 3023140783
+60609000000 60612030076 20203000000 20204010025 3023130816 3024140841
+60612000000 60615030140 20204000000 20205010046 3024130816 3025140862
+60615000000 60618030347 20205000000 20206010115 3025130816 3026140931
+60618000000 60621030528 20206000000 20207010176 3026130816 3027140992
+60621000000 60624030677 20207000000 20208010225 3027130816 3028141041
+60624000000 60627030734 20208000000 20209010244 3028130816 3029141060
+60627000000 60630030930 20209000000 20210010310 3029130816 3030141126
+60630000000 60633031120 20210000000 20211010373 3030130816 3031141189
+60633000000 60636031265 20211000000 20212010421 3031130816 3032141237
+60636000000 60639031437 20212000000 20213010479 3032130816 3033141295
+60639000000 60642031570 20213000000 20214010523 3033130816 3034141339
+60642000000 60645031641 20214000000 20215010547 3034130816 3035141363
+60645000000 60648031867 20215000000 20216010622 3035130816 3036141438
+60648000000 60651032027 20216000000 20217010675 3036130816 3037141491
+60651000000 60654032159 20217000000 20218010719 3037130816 3038141535
+60654000000 60657032267 20218000000 20219010755 3038130816 3039141571
+60657000000 60660032478 20219000000 20220010826 3039130816 3040141642
+60660000000 60663032644 20220000000 20221010881 3040130816 3041141697
+60663000000 60666032755 20221000000 20222010918 3041130816 3042141734
+60666000000 60669032915 20222000000 20223010971 3042130816 3043141787
+60669000000 60672033027 20223000000 20224011009 3043130816 3044141825
+60672000000 60675033225 20224000000 20225011075 3044130816 3045141891
+60675000000 60678033315 20225000000 20226011105 3045130816 3046141921
+60678000000 60681033540 20226000000 20227011180 3046130816 3047141996
+60681000000 60684033672 20227000000 20228011224 3047130816 3048142040
+60684000000 60687033811 20228000000 20229011270 3048130816 3049142086
+60687000000 60690033862 20229000000 20230011287 3049130816 3050142103
+60690000000 60693034073 20230000000 20231011357 3050130816 3051142173
+60693000000 60696034282 20231000000 20232011427 3051130816 3052142243
+60696000000 60699034410 20232000000 20233011470 3052130816 3053142286
+60699000000 60702034553 20233000000 20234011517 3053130816 3054142333
+60702000000 60705034724 20234000000 20235011574 3054130816 3055142390
+60705000000 60708034821 20235000000 20236011607 3055130816 3056142423
+60708000000 60711035034 20236000000 20237011678 3056130816 3057142494
+60711000000 60714035164 20237000000 20238011721 3057130816 3058142537
+60714000000 60717035314 20238000000 20239011771 3058130816 3059142587
+60717000000 60720035474 20239000000 20240011824 3059130816 3060142640
+60720000000 60723035570 20240000000 20241011856 3060130816 3061142672
+60723000000 60726035758 20241000000 20242011919 3061130816 3062142735
+60726000000 60729035926 20242000000 20243011975 3062130816 3063142791
+60729000000 60732036062 20243000000 20244012020 3063130816 3064142836
+60732000000 60735036237 20244000000 20245012079 3064130816 3065142895
+60735000000 60738036359 20245000000 20246012119 3065130816 3066142935
+60738000000 60741036509 20246000000 20247012169 3066130816 3067142985
+60741000000 60744036657 20247000000 20248012219 3067130816 3068143035
+60744000000 60747036863 20248000000 20249012287 3068130816 3069143103
+60747000000 60750036977 20249000000 20250012325 3069130816 3070143141
+60750000000 60753037109 20250000000 20251012369 3070130816 3071143185
+60753000000 60756037283 20251000000 20252012427 3071130816 3072143243
+60756000000 60759037402 20252000000 20253012467 3072130816 3073143283
+60759000000 60762037526 20253000000 20254012508 3073130816 3074143324
+60762000000 60765037745 20254000000 20255012581 3074130816 3075143397
+60765000000 60768037881 20255000000 20256012627 3075130816 3076143443
+60768000000 60771038032 20256000000 20257012677 3076130816 3077143493
+60771000000 60774038192 20257000000 20258012730 3077130816 3078143546
+60774000000 60777038313 20258000000 20259012771 3078130816 3079143587
+60777000000 60780038394 20259000000 20260012798 3079130816 3080143614
+60780000000 60783038602 20260000000 20261012867 3080130816 3081143683
+60783000000 60786038757 20261000000 20262012919 3081130816 3082143735
+60786000000 60789038916 20262000000 20263012972 3082130816 3083143788
+60789000000 60792039068 20263000000 20264013022 3083130816 3084143838
+60792000000 60795039190 20264000000 20265013063 3084130816 3085143879
+60795000000 60798039368 20265000000 20266013122 3085130816 3086143938
+60798000000 60801039517 20266000000 20267013172 3086130816 3087143988
+60801000000 60804039645 20267000000 20268013215 3087130816 3088144031
+60804000000 60807039814 20268000000 20269013271 3088130816 3089144087
+60807000000 60810039934 20269000000 20270013311 3089130816 3090144127
+60810000000 60813039861 20270000000 20271013287 3090130816 3091144103
+60813000000 60816040184 20271000000 20272013394 3091130816 3092144210
+60816000000 60819040437 20272000000 20273013479 3092130816 3093144295
+60819000000 60822040547 20273000000 20274013515 3093130816 3094144331
+60822000000 60825040726 20274000000 20275013575 3094130816 3095144391
+60825000000 60828040774 20275000000 20276013591 3095130816 3096144407
+60828000000 60831041028 20276000000 20277013676 3096130816 3097144492
+60831000000 60834041147 20277000000 20278013715 3097130816 3098144531
+60834000000 60837041318 20278000000 20279013772 3098130816 3099144588
+60837000000 60840041465 20279000000 20280013821 3099130816 3100144637
+60840000000 60843041618 20280000000 20281013872 3100130816 3101144688
+60843000000 60846041764 20281000000 20282013921 3101130816 3102144737
+60846000000 60849041908 20282000000 20283013969 3102130816 3103144785
+60849000000 60852042071 20283000000 20284014023 3103130816 3104144839
+60852000000 60855042223 20284000000 20285014074 3104130816 3105144890
+60855000000 60858042377 20285000000 20286014125 3105130816 3106144941
+60858000000 60861042497 20286000000 20287014165 3106130816 3107144981
+60861000000 60864042706 20287000000 20288014235 3107130816 3108145051
+60864000000 60867042836 20288000000 20289014278 3108130816 3109145094
+60867000000 60870042950 20289000000 20290014316 3109130816 3110145132
+60870000000 60873043111 20290000000 20291014370 3110130816 3111145186
+60873000000 60876043246 20291000000 20292014415 3111130816 3112145231
+60876000000 60879043389 20292000000 20293014463 3112130816 3113145279
+60879000000 60882043489 20293000000 20294014496 3113130816 3114145312
+60882000000 60885043723 20294000000 20295014574 3114130816 3115145390
+60885000000 60888043796 20295000000 20296014598 3115130816 3116145414
+60888000000 60891043917 20296000000 20297014639 3116130816 3117145455
+60891000000 60894044106 20297000000 20298014702 3117130816 3118145518
+60894000000 60897044260 20298000000 20299014753 3118130816 3119145569
+60897000000 60900044439 20299000000 20300014813 3119130816 3120145629
+60900000000 60903044585 20300000000 20301014861 3120130816 3121145677
+60903000000 60906044712 20301000000 20302014904 3121130816 3122145720
+60906000000 60909044886 20302000000 20303014962 3122130816 3123145778
+60909000000 60912044950 20303000000 20304014983 3123130816 3124145799
+60912000000 60915045157 20304000000 20305015052 3124130816 3125145868
+60915000000 60918045338 20305000000 20306015112 3125130816 3126145928
+60918000000 60921045487 20306000000 20307015162 3126130816 3127145978
+60921000000 60924045544 20307000000 20308015181 3127130816 3128145997
+60924000000 60927045740 20308000000 20309015246 3128130816 3129146062
+60927000000 60930045930 20309000000 20310015310 3129130816 3130146126
+60930000000 60933046075 20310000000 20311015358 3130130816 3131146174
+60933000000 60936046247 20311000000 20312015415 3131130816 3132146231
+60936000000 60939046380 20312000000 20313015460 3132130816 3133146276
+60939000000 60942046451 20313000000 20314015483 3133130816 3134146299
+60942000000 60945046677 20314000000 20315015559 3134130816 3135146375
+60945000000 60948046837 20315000000 20316015612 3135130816 3136146428
+60948000000 60951046969 20316000000 20317015656 3136130816 3137146472
+60951000000 60954047077 20317000000 20318015692 3137130816 3138146508
+60954000000 60957047288 20318000000 20319015762 3138130816 3139146578
+60957000000 60960047454 20319000000 20320015818 3139130816 3140146634
+60960000000 60963047565 20320000000 20321015855 3140130816 3141146671
+60963000000 60966047725 20321000000 20322015908 3141130816 3142146724
+60966000000 60969047837 20322000000 20323015945 3142130816 3143146761
+60969000000 60972048035 20323000000 20324016011 3143130816 3144146827
+60972000000 60975048125 20324000000 20325016041 3144130816 3145146857
+60975000000 60978048350 20325000000 20326016116 3145130816 3146146932
+60978000000 60981048482 20326000000 20327016160 3146130816 3147146976
+60981000000 60984048621 20327000000 20328016207 3147130816 3148147023
+60984000000 60987048672 20328000000 20329016224 3148130816 3149147040
+60987000000 60990048883 20329000000 20330016294 3149130816 3150147110
+60990000000 60993049092 20330000000 20331016364 3150130816 3151147180
+60993000000 60996049220 20331000000 20332016406 3151130816 3152147222
+60996000000 60999049363 20332000000 20333016454 3152130816 3153147270
+60999000000 61002049534 20333000000 20334016511 3153130816 3154147327
+61002000000 61005049631 20334000000 20335016543 3154130816 3155147359
+61005000000 61008049844 20335000000 20336016614 3155130816 3156147430
+61008000000 61011049974 20336000000 20337016658 3156130816 3157147474
+61011000000 61014050124 20337000000 20338016708 3157130816 3158147524
+61014000000 61017050284 20338000000 20339016761 3158130816 3159147577
+61017000000 61020050380 20339000000 20340016793 3159130816 3160147609
+61020000000 61023050568 20340000000 20341016856 3160130816 3161147672
+61023000000 61026050736 20341000000 20342016912 3161130816 3162147728
+61026000000 61029050872 20342000000 20343016957 3162130816 3163147773
+61029000000 61032051047 20343000000 20344017015 3163130816 3164147831
+61032000000 61035051169 20344000000 20345017056 3164130816 3165147872
+61035000000 61038051319 20345000000 20346017106 3165130816 3166147922
+61038000000 61041051467 20346000000 20347017155 3166130816 3167147971
+61041000000 61044051673 20347000000 20348017224 3167130816 3168148040
+61044000000 61047051787 20348000000 20349017262 3168130816 3169148078
+61047000000 61050051919 20349000000 20350017306 3169130816 3170148122
+61050000000 61053052093 20350000000 20351017364 3170130816 3171148180
+61053000000 61056052212 20351000000 20352017404 3171130816 3172148220
+61056000000 61059052336 20352000000 20353017445 3172130816 3173148261
+61059000000 61062052555 20353000000 20354017518 3173130816 3174148334
+61062000000 61065052691 20354000000 20355017563 3174130816 3175148379
+61065000000 61068052842 20355000000 20356017614 3175130816 3176148430
+61068000000 61071053002 20356000000 20357017667 3176130816 3177148483
+61071000000 61074053123 20357000000 20358017707 3177130816 3178148523
+61074000000 61077053204 20358000000 20359017734 3178130816 3179148550
+61077000000 61080053412 20359000000 20360017804 3179130816 3180148620
+61080000000 61083053567 20360000000 20361017855 3180130816 3181148671
+61083000000 61086053726 20361000000 20362017908 3181130816 3182148724
+61086000000 61089053878 20362000000 20363017959 3182130816 3183148775
+61089000000 61092054000 20363000000 20364018000 3183130816 3184148816
+61092000000 61095054178 20364000000 20365018059 3184130816 3185148875
+61095000000 61098054327 20365000000 20366018109 3185130816 3186148925
+61098000000 61101054455 20366000000 20367018151 3186130816 3187148967
+61101000000 61104054624 20367000000 20368018208 3187130816 3188149024
+61104000000 61107054744 20368000000 20369018248 3188130816 3189149064
+61107000000 61110054671 20369000000 20370018223 3189130816 3190149039
+61110000000 61113054994 20370000000 20371018331 3190130816 3191149147
+61113000000 61116055247 20371000000 20372018415 3191130816 3192149231
+61116000000 61119055357 20372000000 20373018452 3192130816 3193149268
+61119000000 61122055536 20373000000 20374018512 3193130816 3194149328
+61122000000 61125055584 20374000000 20375018528 3194130816 3195149344
+61125000000 61128055838 20375000000 20376018612 3195130816 3196149428
+61128000000 61131055957 20376000000 20377018652 3196130816 3197149468
+61131000000 61134056128 20377000000 20378018709 3197130816 3198149525
+61134000000 61137056275 20378000000 20379018758 3198130816 3199149574
+61137000000 61140056428 20379000000 20380018809 3199130816 3200149625
+61140000000 61143056574 20380000000 20381018858 3200130816 3201149674
+61143000000 61146056718 20381000000 20382018906 3201130816 3202149722
+61146000000 61149056881 20382000000 20383018960 3202130816 3203149776
+61149000000 61152057033 20383000000 20384019011 3203130816 3204149827
+61152000000 61155057187 20384000000 20385019062 3204130816 3205149878
+61155000000 61158057307 20385000000 20386019102 3205130816 3206149918
+61158000000 61161057516 20386000000 20387019172 3206130816 3207149988
+61161000000 61164057646 20387000000 20388019215 3207130816 3208150031
+61164000000 61167057760 20388000000 20389019253 3208130816 3209150069
+61167000000 61170057921 20389000000 20390019307 3209130816 3210150123
+61170000000 61173058056 20390000000 20391019352 3210130816 3211150168
+61173000000 61176058199 20391000000 20392019399 3211130816 3212150215
+61176000000 61179058299 20392000000 20393019433 3212130816 3213150249
+61179000000 61182058533 20393000000 20394019511 3213130816 3214150327
+61182000000 61185058606 20394000000 20395019535 3214130816 3215150351
+61185000000 61188058727 20395000000 20396019575 3215130816 3216150391
+61188000000 61191058916 20396000000 20397019638 3216130816 3217150454
+61191000000 61194059070 20397000000 20398019690 3217130816 3218150506
+61194000000 61197059249 20398000000 20399019749 3218130816 3219150565
+61197000000 61200059395 20399000000 20400019798 3219130816 3220150614
+61200000000 61203059522 20400000000 20401019840 3220130816 3221150656
+61203000000 61206059696 20401000000 20402019898 3221130816 3222150714
+61206000000 61209059760 20402000000 20403019920 3222130816 3223150736
+61209000000 61212059967 20403000000 20404019989 3223130816 3224150805
+61212000000 61215060148 20404000000 20405020049 3224130816 3225150865
+61215000000 61218060297 20405000000 20406020099 3225130816 3226150915
+61218000000 61221060354 20406000000 20407020118 3226130816 3227150934
+61221000000 61224060550 20407000000 20408020183 3227130816 3228150999
+61224000000 61227060740 20408000000 20409020246 3228130816 3229151062
+61227000000 61230060885 20409000000 20410020295 3229130816 3230151111
+61230000000 61233061057 20410000000 20411020352 3230130816 3231151168
+61233000000 61236061190 20411000000 20412020396 3231130816 3232151212
+61236000000 61239061261 20412000000 20413020420 3232130816 3233151236
+61239000000 61242061487 20413000000 20414020495 3233130816 3234151311
+61242000000 61245061647 20414000000 20415020549 3234130816 3235151365
+61245000000 61248061779 20415000000 20416020593 3235130816 3236151409
+61248000000 61251061887 20416000000 20417020629 3236130816 3237151445
+61251000000 61254062098 20417000000 20418020699 3237130816 3238151515
+61254000000 61257062264 20418000000 20419020754 3238130816 3239151570
+61257000000 61260062375 20419000000 20420020791 3239130816 3240151607
+61260000000 61263062535 20420000000 20421020845 3240130816 3241151661
+61263000000 61266062647 20421000000 20422020882 3241130816 3242151698
+61266000000 61269062845 20422000000 20423020948 3242130816 3243151764
+61269000000 61272062935 20423000000 20424020978 3243130816 3244151794
+61272000000 61275063160 20424000000 20425021053 3244130816 3245151869
+61275000000 61278063292 20425000000 20426021097 3245130816 3246151913
+61278000000 61281063431 20426000000 20427021143 3246130816 3247151959
+61281000000 61284063482 20427000000 20428021160 3247130816 3248151976
+61284000000 61287063693 20428000000 20429021231 3248130816 3249152047
+61287000000 61290063902 20429000000 20430021300 3249130816 3250152116
+61290000000 61293064030 20430000000 20431021343 3250130816 3251152159
+61293000000 61296064173 20431000000 20432021391 3251130816 3252152207
+61296000000 61299064344 20432000000 20433021448 3252130816 3253152264
+61299000000 61302064441 20433000000 20434021480 3253130816 3254152296
+61302000000 61305064654 20434000000 20435021551 3254130816 3255152367
+61305000000 61308064784 20435000000 20436021594 3255130816 3256152410
+61308000000 61311064934 20436000000 20437021644 3256130816 3257152460
+61311000000 61314065094 20437000000 20438021698 3257130816 3258152514
+61314000000 61317065190 20438000000 20439021730 3258130816 3259152546
+61317000000 61320065378 20439000000 20440021792 3259130816 3260152608
+61320000000 61323065546 20440000000 20441021848 3260130816 3261152664
+61323000000 61326065682 20441000000 20442021894 3261130816 3262152710
+61326000000 61329065857 20442000000 20443021952 3262130816 3263152768
+61329000000 61332065979 20443000000 20444021993 3263130816 3264152809
+61332000000 61335066129 20444000000 20445022043 3264130816 3265152859
+61335000000 61338066277 20445000000 20446022092 3265130816 3266152908
+61338000000 61341066483 20446000000 20447022161 3266130816 3267152977
+61341000000 61344066597 20447000000 20448022199 3267130816 3268153015
+61344000000 61347066729 20448000000 20449022243 3268130816 3269153059
+61347000000 61350066903 20449000000 20450022301 3269130816 3270153117
+61350000000 61353067022 20450000000 20451022340 3270130816 3271153156
+61353000000 61356067146 20451000000 20452022382 3271130816 3272153198
+61356000000 61359067365 20452000000 20453022455 3272130816 3273153271
+61359000000 61362067501 20453000000 20454022500 3273130816 3274153316
+61362000000 61365067652 20454000000 20455022550 3274130816 3275153366
+61365000000 61368067812 20455000000 20456022604 3275130816 3276153420
+61368000000 61371067933 20456000000 20457022644 3276130816 3277153460
+61371000000 61374068014 20457000000 20458022671 3277130816 3278153487
+61374000000 61377068222 20458000000 20459022740 3278130816 3279153556
+61377000000 61380068377 20459000000 20460022792 3279130816 3280153608
+61380000000 61383068536 20460000000 20461022845 3280130816 3281153661
+61383000000 61386068688 20461000000 20462022896 3281130816 3282153712
+61386000000 61389068810 20462000000 20463022936 3282130816 3283153752
+61389000000 61392068988 20463000000 20464022996 3283130816 3284153812
+61392000000 61395069137 20464000000 20465023045 3284130816 3285153861
+61395000000 61398069265 20465000000 20466023088 3285130816 3286153904
+61398000000 61401069434 20466000000 20467023144 3286130816 3287153960
+61401000000 61404069554 20467000000 20468023184 3287130816 3288154000
+61404000000 61407069481 20468000000 20469023160 3288130816 3289153976
+61407000000 61410069804 20469000000 20470023268 3289130816 3290154084
+61410000000 61413070057 20470000000 20471023352 3290130816 3291154168
+61413000000 61416070167 20471000000 20472023389 3291130816 3292154205
+61416000000 61419070346 20472000000 20473023448 3292130816 3293154264
+61419000000 61422070394 20473000000 20474023464 3293130816 3294154280
+61422000000 61425070648 20474000000 20475023549 3294130816 3295154365
+61425000000 61428070767 20475000000 20476023589 3295130816 3296154405
+61428000000 61431070938 20476000000 20477023646 3296130816 3297154462
+61431000000 61434071085 20477000000 20478023695 3297130816 3298154511
+61434000000 61437071238 20478000000 20479023746 3298130816 3299154562
+61437000000 61440071384 20479000000 20480023794 3299130816 3300154610
+61440000000 61443071528 20480000000 20481023842 3300130816 3301154658
+61443000000 61446071691 20481000000 20482023897 3301130816 3302154713
+61446000000 61449071843 20482000000 20483023947 3302130816 3303154763
+61449000000 61452071997 20483000000 20484023999 3303130816 3304154815
+61452000000 61455072117 20484000000 20485024039 3304130816 3305154855
+61455000000 61458072326 20485000000 20486024108 3305130816 3306154924
+61458000000 61461072456 20486000000 20487024152 3306130816 3307154968
+61461000000 61464072570 20487000000 20488024190 3307130816 3308155006
+61464000000 61467072731 20488000000 20489024243 3308130816 3309155059
+61467000000 61470072866 20489000000 20490024288 3309130816 3310155104
+61470000000 61473073009 20490000000 20491024336 3310130816 3311155152
+61473000000 61476073109 20491000000 20492024369 3311130816 3312155185
+61476000000 61479073343 20492000000 20493024447 3312130816 3313155263
+61479000000 61482073416 20493000000 20494024472 3313130816 3314155288
+61482000000 61485073537 20494000000 20495024512 3314130816 3315155328
+61485000000 61488073726 20495000000 20496024575 3315130816 3316155391
+61488000000 61491073880 20496000000 20497024626 3316130816 3317155442
+61491000000 61494074059 20497000000 20498024686 3317130816 3318155502
+61494000000 61497074205 20498000000 20499024735 3318130816 3319155551
+61497000000 61500074332 20499000000 20500024777 3319130816 3320155593
+61500000000 61503074506 20500000000 20501024835 3320130816 3321155651
+61503000000 61506074570 20501000000 20502024856 3321130816 3322155672
+61506000000 61509074777 20502000000 20503024925 3322130816 3323155741
+61509000000 61512074958 20503000000 20504024986 3323130816 3324155802
+61512000000 61515075107 20504000000 20505025035 3324130816 3325155851
+61515000000 61518075164 20505000000 20506025054 3325130816 3326155870
+61518000000 61521075360 20506000000 20507025120 3326130816 3327155936
+61521000000 61524075550 20507000000 20508025183 3327130816 3328155999
+61524000000 61527075695 20508000000 20509025231 3328130816 3329156047
+61527000000 61530075867 20509000000 20510025289 3329130816 3330156105
+61530000000 61533076000 20510000000 20511025333 3330130816 3331156149
+61533000000 61536076071 20511000000 20512025357 3331130816 3332156173
+61536000000 61539076297 20512000000 20513025432 3332130816 3333156248
+61539000000 61542076457 20513000000 20514025485 3333130816 3334156301
+61542000000 61545076589 20514000000 20515025529 3334130816 3335156345
+61545000000 61548076697 20515000000 20516025565 3335130816 3336156381
+61548000000 61551076908 20516000000 20517025636 3336130816 3337156452
+61551000000 61554077074 20517000000 20518025691 3337130816 3338156507
+61554000000 61557077185 20518000000 20519025728 3338130816 3339156544
+61557000000 61560077345 20519000000 20520025781 3339130816 3340156597
+61560000000 61563077457 20520000000 20521025819 3340130816 3341156635
+61563000000 61566077655 20521000000 20522025885 3341130816 3342156701
+61566000000 61569077745 20522000000 20523025915 3342130816 3343156731
+61569000000 61572077970 20523000000 20524025990 3343130816 3344156806
+61572000000 61575078102 20524000000 20525026034 3344130816 3345156850
+61575000000 61578078241 20525000000 20526026080 3345130816 3346156896
+61578000000 61581078292 20526000000 20527026097 3346130816 3347156913
+61581000000 61584078503 20527000000 20528026167 3347130816 3348156983
+61584000000 61587078712 20528000000 20529026237 3348130816 3349157053
+61587000000 61590078840 20529000000 20530026280 3349130816 3350157096
+61590000000 61593078983 20530000000 20531026327 3350130816 3351157143
+61593000000 61596079154 20531000000 20532026384 3351130816 3352157200
+61596000000 61599079251 20532000000 20533026417 3352130816 3353157233
+61599000000 61602079464 20533000000 20534026488 3353130816 3354157304
+61602000000 61605079594 20534000000 20535026531 3354130816 3355157347
+61605000000 61608079744 20535000000 20536026581 3355130816 3356157397
+61608000000 61611079904 20536000000 20537026634 3356130816 3357157450
+61611000000 61614080000 20537000000 20538026666 3357130816 3358157482
+61614000000 61617080188 20538000000 20539026729 3358130816 3359157545
+61617000000 61620080356 20539000000 20540026785 3359130816 3360157601
+61620000000 61623080492 20540000000 20541026830 3360130816 3361157646
+61623000000 61626080667 20541000000 20542026889 3361130816 3362157705
+61626000000 61629080789 20542000000 20543026929 3362130816 3363157745
+61629000000 61632080939 20543000000 20544026979 3363130816 3364157795
+61632000000 61635081087 20544000000 20545027029 3364130816 3365157845
+61635000000 61638081293 20545000000 20546027097 3365130816 3366157913
+61638000000 61641081407 20546000000 20547027135 3366130816 3367157951
+61641000000 61644081539 20547000000 20548027179 3367130816 3368157995
+61644000000 61647081713 20548000000 20549027237 3368130816 3369158053
+61647000000 61650081832 20549000000 20550027277 3369130816 3370158093
+61650000000 61653081956 20550000000 20551027318 3370130816 3371158134
+61653000000 61656082175 20551000000 20552027391 3371130816 3372158207
+61656000000 61659082311 20552000000 20553027437 3372130816 3373158253
+61659000000 61662082462 20553000000 20554027487 3373130816 3374158303
+61662000000 61665082622 20554000000 20555027540 3374130816 3375158356
+61665000000 61668082743 20555000000 20556027581 3375130816 3376158397
+61668000000 61671082824 20556000000 20557027608 3376130816 3377158424
+61671000000 61674083032 20557000000 20558027677 3377130816 3378158493
+61674000000 61677083187 20558000000 20559027729 3378130816 3379158545
+61677000000 61680083346 20559000000 20560027782 3379130816 3380158598
+61680000000 61683083498 20560000000 20561027832 3380130816 3381158648
+61683000000 61686083620 20561000000 20562027873 3381130816 3382158689
+61686000000 61689083798 20562000000 20563027932 3382130816 3383158748
+61689000000 61692083947 20563000000 20564027982 3383130816 3384158798
+61692000000 61695084075 20564000000 20565028025 3384130816 3385158841
+61695000000 61698084244 20565000000 20566028081 3385130816 3386158897
+61698000000 61701084364 20566000000 20567028121 3386130816 3387158937
+61701000000 61704084291 20567000000 20568028097 3387130816 3388158913
+61704000000 61707084614 20568000000 20569028204 3388130816 3389159020
+61707000000 61710084867 20569000000 20570028289 3389130816 3390159105
+61710000000 61713084977 20570000000 20571028325 3390130816 3391159141
+61713000000 61716085156 20571000000 20572028385 3391130816 3392159201
+61716000000 61719085204 20572000000 20573028401 3392130816 3393159217
+61719000000 61722085458 20573000000 20574028486 3393130816 3394159302
+61722000000 61725085577 20574000000 20575028525 3394130816 3395159341
+61725000000 61728085748 20575000000 20576028582 3395130816 3396159398
+61728000000 61731085895 20576000000 20577028631 3396130816 3397159447
+61731000000 61734086048 20577000000 20578028682 3397130816 3398159498
+61734000000 61737086194 20578000000 20579028731 3398130816 3399159547
+61737000000 61740086338 20579000000 20580028779 3399130816 3400159595
+61740000000 61743086501 20580000000 20581028833 3400130816 3401159649
+61743000000 61746086653 20581000000 20582028884 3401130816 3402159700
+61746000000 61749086807 20582000000 20583028935 3402130816 3403159751
+61749000000 61752086927 20583000000 20584028975 3403130816 3404159791
+61752000000 61755087136 20584000000 20585029045 3404130816 3405159861
+61755000000 61758087266 20585000000 20586029088 3405130816 3406159904
+61758000000 61761087380 20586000000 20587029126 3406130816 3407159942
+61761000000 61764087541 20587000000 20588029180 3407130816 3408159996
+61764000000 61767087676 20588000000 20589029225 3408130816 3409160041
+61767000000 61770087819 20589000000 20590029273 3409130816 3410160089
+61770000000 61773087919 20590000000 20591029306 3410130816 3411160122
+61773000000 61776088153 20591000000 20592029384 3411130816 3412160200
+61776000000 61779088226 20592000000 20593029408 3412130816 3413160224
+61779000000 61782088347 20593000000 20594029449 3413130816 3414160265
+61782000000 61785088536 20594000000 20595029512 3414130816 3415160328
+61785000000 61788088690 20595000000 20596029563 3415130816 3416160379
+61788000000 61791088869 20596000000 20597029623 3416130816 3417160439
+61791000000 61794089015 20597000000 20598029671 3417130816 3418160487
+61794000000 61797089142 20598000000 20599029714 3418130816 3419160530
+61797000000 61800089316 20599000000 20600029772 3419130816 3420160588
+61800000000 61803089380 20600000000 20601029793 3420130816 3421160609
+61803000000 61806089587 20601000000 20602029862 3421130816 3422160678
+61806000000 61809089768 20602000000 20603029922 3422130816 3423160738
+61809000000 61812089917 20603000000 20604029972 3423130816 3424160788
+61812000000 61815089974 20604000000 20605029991 3424130816 3425160807
+61815000000 61818090170 20605000000 20606030056 3425130816 3426160872
+61818000000 61821090360 20606000000 20607030120 3426130816 3427160936
+61821000000 61824090505 20607000000 20608030168 3427130816 3428160984
+61824000000 61827090677 20608000000 20609030225 3428130816 3429161041
+61827000000 61830090810 20609000000 20610030270 3429130816 3430161086
+61830000000 61833090881 20610000000 20611030293 3430130816 3431161109
+61833000000 61836091107 20611000000 20612030369 3431130816 3432161185
+61836000000 61839091267 20612000000 20613030422 3432130816 3433161238
+61839000000 61842091399 20613000000 20614030466 3433130816 3434161282
+61842000000 61845091507 20614000000 20615030502 3434130816 3435161318
+61845000000 61848091718 20615000000 20616030572 3435130816 3436161388
+61848000000 61851091884 20616000000 20617030628 3436130816 3437161444
+61851000000 61854091995 20617000000 20618030665 3437130816 3438161481
+61854000000 61857092155 20618000000 20619030718 3438130816 3439161534
+61857000000 61860092267 20619000000 20620030755 3439130816 3440161571
+61860000000 61863092465 20620000000 20621030821 3440130816 3441161637
+61863000000 61866092555 20621000000 20622030851 3441130816 3442161667
+61866000000 61869092780 20622000000 20623030926 3442130816 3443161742
+61869000000 61872092912 20623000000 20624030970 3443130816 3444161786
+61872000000 61875093051 20624000000 20625031017 3444130816 3445161833
+61875000000 61878093102 20625000000 20626031034 3445130816 3446161850
+61878000000 61881093313 20626000000 20627031104 3446130816 3447161920
+61881000000 61884093522 20627000000 20628031174 3447130816 3448161990
+61884000000 61887093650 20628000000 20629031216 3448130816 3449162032
+61887000000 61890093793 20629000000 20630031264 3449130816 3450162080
+61890000000 61893093964 20630000000 20631031321 3450130816 3451162137
+61893000000 61896094061 20631000000 20632031353 3451130816 3452162169
+61896000000 61899094274 20632000000 20633031424 3452130816 3453162240
+61899000000 61902094404 20633000000 20634031468 3453130816 3454162284
+61902000000 61905094554 20634000000 20635031518 3454130816 3455162334
+61905000000 61908094714 20635000000 20636031571 3455130816 3456162387
+61908000000 61911094810 20636000000 20637031603 3456130816 3457162419
+61911000000 61914094998 20637000000 20638031666 3457130816 3458162482
+61914000000 61917095166 20638000000 20639031722 3458130816 3459162538
+61917000000 61920095302 20639000000 20640031767 3459130816 3460162583
+61920000000 61923095477 20640000000 20641031825 3460130816 3461162641
+61923000000 61926095599 20641000000 20642031866 3461130816 3462162682
+61926000000 61929095749 20642000000 20643031916 3462130816 3463162732
+61929000000 61932095897 20643000000 20644031965 3463130816 3464162781
+61932000000 61935096103 20644000000 20645032034 3464130816 3465162850
+61935000000 61938096217 20645000000 20646032072 3465130816 3466162888
+61938000000 61941096349 20646000000 20647032116 3466130816 3467162932
+61941000000 61944096523 20647000000 20648032174 3467130816 3468162990
+61944000000 61947096642 20648000000 20649032214 3468130816 3469163030
+61947000000 61950096766 20649000000 20650032255 3469130816 3470163071
+61950000000 61953096985 20650000000 20651032328 3470130816 3471163144
+61953000000 61956097121 20651000000 20652032373 3471130816 3472163189
+61956000000 61959097272 20652000000 20653032424 3472130816 3473163240
+61959000000 61962097432 20653000000 20654032477 3473130816 3474163293
+61962000000 61965097553 20654000000 20655032517 3474130816 3475163333
+61965000000 61968097634 20655000000 20656032544 3475130816 3476163360
+61968000000 61971097842 20656000000 20657032614 3476130816 3477163430
+61971000000 61974097997 20657000000 20658032665 3477130816 3478163481
+61974000000 61977098156 20658000000 20659032718 3478130816 3479163534
+61977000000 61980098308 20659000000 20660032769 3479130816 3480163585
+61980000000 61983098430 20660000000 20661032810 3480130816 3481163626
+61983000000 61986098608 20661000000 20662032869 3481130816 3482163685
+61986000000 61989098757 20662000000 20663032919 3482130816 3483163735
+61989000000 61992098885 20663000000 20664032961 3483130816 3484163777
+61992000000 61995099054 20664000000 20665033018 3484130816 3485163834
+61995000000 61998099174 20665000000 20666033058 3485130816 3486163874
+61998000000 62001099101 20666000000 20667033033 3486130816 3487163849
+62001000000 62004099424 20667000000 20668033141 3487130816 3488163957
+62004000000 62007099677 20668000000 20669033225 3488130816 3489164041
+62007000000 62010099787 20669000000 20670033262 3489130816 3490164078
+62010000000 62013099966 20670000000 20671033322 3490130816 3491164138
+62013000000 62016100014 20671000000 20672033338 3491130816 3492164154
+62016000000 62019100268 20672000000 20673033422 3492130816 3493164238
+62019000000 62022100387 20673000000 20674033462 3493130816 3494164278
+62022000000 62025100558 20674000000 20675033519 3494130816 3495164335
+62025000000 62028100705 20675000000 20676033568 3495130816 3496164384
+62028000000 62031100858 20676000000 20677033619 3496130816 3497164435
+62031000000 62034101004 20677000000 20678033668 3497130816 3498164484
+62034000000 62037101148 20678000000 20679033716 3498130816 3499164532
+62037000000 62040101311 20679000000 20680033770 3499130816 3500164586
+62040000000 62043101463 20680000000 20681033821 3500130816 3501164637
+62043000000 62046101617 20681000000 20682033872 3501130816 3502164688
+62046000000 62049101737 20682000000 20683033912 3502130816 3503164728
+62049000000 62052101946 20683000000 20684033982 3503130816 3504164798
+62052000000 62055102076 20684000000 20685034025 3504130816 3505164841
+62055000000 62058102190 20685000000 20686034063 3505130816 3506164879
+62058000000 62061102351 20686000000 20687034117 3506130816 3507164933
+62061000000 62064102486 20687000000 20688034162 3507130816 3508164978
+62064000000 62067102629 20688000000 20689034209 3508130816 3509165025
+62067000000 62070102729 20689000000 20690034243 3509130816 3510165059
+62070000000 62073102963 20690000000 20691034321 3510130816 3511165137
+62073000000 62076103036 20691000000 20692034345 3511130816 3512165161
+62076000000 62079103157 20692000000 20693034385 3512130816 3513165201
+62079000000 62082103346 20693000000 20694034448 3513130816 3514165264
+62082000000 62085103500 20694000000 20695034500 3514130816 3515165316
+62085000000 62088103679 20695000000 20696034559 3515130816 3516165375
+62088000000 62091103825 20696000000 20697034608 3516130816 3517165424
+62091000000 62094103952 20697000000 20698034650 3517130816 3518165466
+62094000000 62097104126 20698000000 20699034708 3518130816 3519165524
+62097000000 62100104190 20699000000 20700034730 3519130816 3520165546
+62100000000 62103104397 20700000000 20701034799 3520130816 3521165615
+62103000000 62106104578 20701000000 20702034859 3521130816 3522165675
+62106000000 62109104727 20702000000 20703034909 3522130816 3523165725
+62109000000 62112104784 20703000000 20704034928 3523130816 3524165744
+62112000000 62115104980 20704000000 20705034993 3524130816 3525165809
+62115000000 62118105170 20705000000 20706035056 3525130816 3526165872
+62118000000 62121105315 20706000000 20707035105 3526130816 3527165921
+62121000000 62124105487 20707000000 20708035162 3527130816 3528165978
+62124000000 62127105620 20708000000 20709035206 3528130816 3529166022
+62127000000 62130105691 20709000000 20710035230 3529130816 3530166046
+62130000000 62133105917 20710000000 20711035305 3530130816 3531166121
+62133000000 62136106077 20711000000 20712035359 3531130816 3532166175
+62136000000 62139106209 20712000000 20713035403 3532130816 3533166219
+62139000000 62142106317 20713000000 20714035439 3533130816 3534166255
+62142000000 62145106528 20714000000 20715035509 3534130816 3535166325
+62145000000 62148106694 20715000000 20716035564 3535130816 3536166380
+62148000000 62151106805 20716000000 20717035601 3536130816 3537166417
+62151000000 62154106965 20717000000 20718035655 3537130816 3538166471
+62154000000 62157107077 20718000000 20719035692 3538130816 3539166508
+62157000000 62160107275 20719000000 20720035758 3539130816 3540166574
+62160000000 62163107365 20720000000 20721035788 3540130816 3541166604
+62163000000 62166107590 20721000000 20722035863 3541130816 3542166679
+62166000000 62169107722 20722000000 20723035907 3542130816 3543166723
+62169000000 62172107861 20723000000 20724035953 3543130816 3544166769
+62172000000 62175107912 20724000000 20725035970 3544130816 3545166786
+62175000000 62178108123 20725000000 20726036041 3545130816 3546166857
+62178000000 62181108332 20726000000 20727036110 3546130816 3547166926
+62181000000 62184108460 20727000000 20728036153 3547130816 3548166969
+62184000000 62187108603 20728000000 20729036201 3548130816 3549167017
+62187000000 62190108774 20729000000 20730036258 3549130816 3550167074
+62190000000 62193108871 20730000000 20731036290 3550130816 3551167106
+62193000000 62196109084 20731000000 20732036361 3551130816 3552167177
+62196000000 62199109214 20732000000 20733036404 3552130816 3553167220
+62199000000 62202109364 20733000000 20734036454 3553130816 3554167270
+62202000000 62205109524 20734000000 20735036508 3554130816 3555167324
+62205000000 62208109620 20735000000 20736036540 3555130816 3556167356
+62208000000 62211109808 20736000000 20737036602 3556130816 3557167418
+62211000000 62214109976 20737000000 20738036658 3557130816 3558167474
+62214000000 62217110112 20738000000 20739036704 3558130816 3559167520
+62217000000 62220110287 20739000000 20740036762 3559130816 3560167578
+62220000000 62223110409 20740000000 20741036803 3560130816 3561167619
+62223000000 62226110559 20741000000 20742036853 3561130816 3562167669
+62226000000 62229110707 20742000000 20743036902 3562130816 3563167718
+62229000000 62232110913 20743000000 20744036971 3563130816 3564167787
+62232000000 62235111027 20744000000 20745037009 3564130816 3565167825
+62235000000 62238111159 20745000000 20746037053 3565130816 3566167869
+62238000000 62241111333 20746000000 20747037111 3566130816 3567167927
+62241000000 62244111452 20747000000 20748037150 3567130816 3568167966
+62244000000 62247111576 20748000000 20749037192 3568130816 3569168008
+62247000000 62250111795 20749000000 20750037265 3569130816 3570168081
+62250000000 62253111931 20750000000 20751037310 3570130816 3571168126
+62253000000 62256112082 20751000000 20752037360 3571130816 3572168176
+62256000000 62259112242 20752000000 20753037414 3572130816 3573168230
+62259000000 62262112363 20753000000 20754037454 3573130816 3574168270
+62262000000 62265112444 20754000000 20755037481 3574130816 3575168297
+62265000000 62268112652 20755000000 20756037550 3575130816 3576168366
+62268000000 62271112807 20756000000 20757037602 3576130816 3577168418
+62271000000 62274112966 20757000000 20758037655 3577130816 3578168471
+62274000000 62277113118 20758000000 20759037706 3578130816 3579168522
+62277000000 62280113240 20759000000 20760037746 3579130816 3580168562
+62280000000 62283113418 20760000000 20761037806 3580130816 3581168622
+62283000000 62286113567 20761000000 20762037855 3581130816 3582168671
+62286000000 62289113695 20762000000 20763037898 3582130816 3583168714
+62289000000 62292113864 20763000000 20764037954 3583130816 3584168770
+62292000000 62295113984 20764000000 20765037994 3584130816 3585168810
+62295000000 62298113911 20765000000 20766037970 3585130816 3586168786
+62298000000 62301114234 20766000000 20767038078 3586130816 3587168894
+62301000000 62304114487 20767000000 20768038162 3587130816 3588168978
+62304000000 62307114597 20768000000 20769038199 3588130816 3589169015
+62307000000 62310114776 20769000000 20770038258 3589130816 3590169074
+62310000000 62313114824 20770000000 20771038274 3590130816 3591169090
+62313000000 62316115078 20771000000 20772038359 3591130816 3592169175
+62316000000 62319115197 20772000000 20773038399 3592130816 3593169215
+62319000000 62322115368 20773000000 20774038456 3593130816 3594169272
+62322000000 62325115515 20774000000 20775038505 3594130816 3595169321
+62325000000 62328115668 20775000000 20776038556 3595130816 3596169372
+62328000000 62331115814 20776000000 20777038604 3596130816 3597169420
+62331000000 62334115958 20777000000 20778038652 3597130816 3598169468
+62334000000 62337116121 20778000000 20779038707 3598130816 3599169523
+62337000000 62340116273 20779000000 20780038757 3599130816 3600169573
+62340000000 62343116427 20780000000 20781038809 3600130816 3601169625
+62343000000 62346116547 20781000000 20782038849 3601130816 3602169665
+62346000000 62349116756 20782000000 20783038918 3602130816 3603169734
+62349000000 62352116886 20783000000 20784038962 3603130816 3604169778
+62352000000 62355117000 20784000000 20785039000 3604130816 3605169816
+62355000000 62358117161 20785000000 20786039053 3605130816 3606169869
+62358000000 62361117296 20786000000 20787039098 3606130816 3607169914
+62361000000 62364117439 20787000000 20788039146 3607130816 3608169962
+62364000000 62367117539 20788000000 20789039179 3608130816 3609169995
+62367000000 62370117773 20789000000 20790039257 3609130816 3610170073
+62370000000 62373117846 20790000000 20791039282 3610130816 3611170098
+62373000000 62376117967 20791000000 20792039322 3611130816 3612170138
+62376000000 62379118156 20792000000 20793039385 3612130816 3613170201
+62379000000 62382118310 20793000000 20794039436 3613130816 3614170252
+62382000000 62385118489 20794000000 20795039496 3614130816 3615170312
+62385000000 62388118635 20795000000 20796039545 3615130816 3616170361
+62388000000 62391118762 20796000000 20797039587 3616130816 3617170403
+62391000000 62394118936 20797000000 20798039645 3617130816 3618170461
+62394000000 62397119000 20798000000 20799039666 3618130816 3619170482
+62397000000 62400119207 20799000000 20800039735 3619130816 3620170551
+62400000000 62403119388 20800000000 20801039796 3620130816 3621170612
+62403000000 62406119537 20801000000 20802039845 3621130816 3622170661
+62406000000 62409119594 20802000000 20803039864 3622130816 3623170680
+62409000000 62412119790 20803000000 20804039930 3623130816 3624170746
+62412000000 62415119980 20804000000 20805039993 3624130816 3625170809
+62415000000 62418120125 20805000000 20806040041 3625130816 3626170857
+62418000000 62421120297 20806000000 20807040099 3626130816 3627170915
+62421000000 62424120430 20807000000 20808040143 3627130816 3628170959
+62424000000 62427120501 20808000000 20809040167 3628130816 3629170983
+62427000000 62430120727 20809000000 20810040242 3629130816 3630171058
+62430000000 62433120887 20810000000 20811040295 3630130816 3631171111
+62433000000 62436121019 20811000000 20812040339 3631130816 3632171155
+62436000000 62439121127 20812000000 20813040375 3632130816 3633171191
+62439000000 62442121338 20813000000 20814040446 3633130816 3634171262
+62442000000 62445121504 20814000000 20815040501 3634130816 3635171317
+62445000000 62448121615 20815000000 20816040538 3635130816 3636171354
+62448000000 62451121775 20816000000 20817040591 3636130816 3637171407
+62451000000 62454121887 20817000000 20818040629 3637130816 3638171445
+62454000000 62457122085 20818000000 20819040695 3638130816 3639171511
+62457000000 62460122175 20819000000 20820040725 3639130816 3640171541
+62460000000 62463122400 20820000000 20821040800 3640130816 3641171616
+62463000000 62466122532 20821000000 20822040844 3641130816 3642171660
+62466000000 62469122671 20822000000 20823040890 3642130816 3643171706
+62469000000 62472122722 20823000000 20824040907 3643130816 3644171723
+62472000000 62475122933 20824000000 20825040977 3644130816 3645171793
+62475000000 62478123142 20825000000 20826041047 3645130816 3646171863
+62478000000 62481123270 20826000000 20827041090 3646130816 3647171906
+62481000000 62484123413 20827000000 20828041137 3647130816 3648171953
+62484000000 62487123584 20828000000 20829041194 3648130816 3649172010
+62487000000 62490123681 20829000000 20830041227 3649130816 3650172043
+62490000000 62493123894 20830000000 20831041298 3650130816 3651172114
+62493000000 62496124024 20831000000 20832041341 3651130816 3652172157
+62496000000 62499124174 20832000000 20833041391 3652130816 3653172207
+62499000000 62502124334 20833000000 20834041444 3653130816 3654172260
+62502000000 62505124430 20834000000 20835041476 3654130816 3655172292
+62505000000 62508124618 20835000000 20836041539 3655130816 3656172355
+62508000000 62511124786 20836000000 20837041595 3656130816 3657172411
+62511000000 62514124922 20837000000 20838041640 3657130816 3658172456
+62514000000 62517125097 20838000000 20839041699 3658130816 3659172515
+62517000000 62520125219 20839000000 20840041739 3659130816 3660172555
+62520000000 62523125369 20840000000 20841041789 3660130816 3661172605
+62523000000 62526125517 20841000000 20842041839 3661130816 3662172655
+62526000000 62529125723 20842000000 20843041907 3662130816 3663172723
+62529000000 62532125837 20843000000 20844041945 3663130816 3664172761
+62532000000 62535125969 20844000000 20845041989 3664130816 3665172805
+62535000000 62538126143 20845000000 20846042047 3665130816 3666172863
+62538000000 62541126262 20846000000 20847042087 3666130816 3667172903
+62541000000 62544126386 20847000000 20848042128 3667130816 3668172944
+62544000000 62547126605 20848000000 20849042201 3668130816 3669173017
+62547000000 62550126741 20849000000 20850042247 3669130816 3670173063
+62550000000 62553126892 20850000000 20851042297 3670130816 3671173113
+62553000000 62556127052 20851000000 20852042350 3671130816 3672173166
+62556000000 62559127173 20852000000 20853042391 3672130816 3673173207
+62559000000 62562127254 20853000000 20854042418 3673130816 3674173234
+62562000000 62565127462 20854000000 20855042487 3674130816 3675173303
+62565000000 62568127617 20855000000 20856042539 3675130816 3676173355
+62568000000 62571127776 20856000000 20857042592 3676130816 3677173408
+62571000000 62574127928 20857000000 20858042642 3677130816 3678173458
+62574000000 62577128050 20858000000 20859042683 3678130816 3679173499
+62577000000 62580128228 20859000000 20860042742 3679130816 3680173558
+62580000000 62583128377 20860000000 20861042792 3680130816 3681173608
+62583000000 62586128505 20861000000 20862042835 3681130816 3682173651
+62586000000 62589128674 20862000000 20863042891 3682130816 3683173707
+62589000000 62592128794 20863000000 20864042931 3683130816 3684173747
+62592000000 62595128721 20864000000 20865042907 3684130816 3685173723
+62595000000 62598129044 20865000000 20866043014 3685130816 3686173830
+62598000000 62601129297 20866000000 20867043099 3686130816 3687173915
+62601000000 62604129407 20867000000 20868043135 3687130816 3688173951
+62604000000 62607129586 20868000000 20869043195 3688130816 3689174011
+62607000000 62610129634 20869000000 20870043211 3689130816 3690174027
+62610000000 62613129888 20870000000 20871043296 3690130816 3691174112
+62613000000 62616130007 20871000000 20872043335 3691130816 3692174151
+62616000000 62619130178 20872000000 20873043392 3692130816 3693174208
+62619000000 62622130325 20873000000 20874043441 3693130816 3694174257
+62622000000 62625130478 20874000000 20875043492 3694130816 3695174308
+62625000000 62628130624 20875000000 20876043541 3695130816 3696174357
+62628000000 62631130768 20876000000 20877043589 3696130816 3697174405
+62631000000 62634130931 20877000000 20878043643 3697130816 3698174459
+62634000000 62637131083 20878000000 20879043694 3698130816 3699174510
+62637000000 62640131237 20879000000 20880043745 3699130816 3700174561
+62640000000 62643131357 20880000000 20881043785 3700130816 3701174601
+62643000000 62646131566 20881000000 20882043855 3701130816 3702174671
+62646000000 62649131696 20882000000 20883043898 3702130816 3703174714
+62649000000 62652131810 20883000000 20884043936 3703130816 3704174752
+62652000000 62655131971 20884000000 20885043990 3704130816 3705174806
+62655000000 62658132106 20885000000 20886044035 3705130816 3706174851
+62658000000 62661132249 20886000000 20887044083 3706130816 3707174899
+62661000000 62664132349 20887000000 20888044116 3707130816 3708174932
+62664000000 62667132583 20888000000 20889044194 3708130816 3709175010
+62667000000 62670132656 20889000000 20890044218 3709130816 3710175034
+62670000000 62673132777 20890000000 20891044259 3710130816 3711175075
+62673000000 62676132966 20891000000 20892044322 3711130816 3712175138
+62676000000 62679133120 20892000000 20893044373 3712130816 3713175189
+62679000000 62682133299 20893000000 20894044433 3713130816 3714175249
+62682000000 62685133445 20894000000 20895044481 3714130816 3715175297
+62685000000 62688133572 20895000000 20896044524 3715130816 3716175340
+62688000000 62691133746 20896000000 20897044582 3716130816 3717175398
+62691000000 62694133810 20897000000 20898044603 3717130816 3718175419
+62694000000 62697134017 20898000000 20899044672 3718130816 3719175488
+62697000000 62700134198 20899000000 20900044732 3719130816 3720175548
+62700000000 62703134347 20900000000 20901044782 3720130816 3721175598
+62703000000 62706134404 20901000000 20902044801 3721130816 3722175617
+62706000000 62709134600 20902000000 20903044866 3722130816 3723175682
+62709000000 62712134790 20903000000 20904044930 3723130816 3724175746
+62712000000 62715134935 20904000000 20905044978 3724130816 3725175794
+62715000000 62718135107 20905000000 20906045035 3725130816 3726175851
+62718000000 62721135240 20906000000 20907045080 3726130816 3727175896
+62721000000 62724135311 20907000000 20908045103 3727130816 3728175919
+62724000000 62727135537 20908000000 20909045179 3728130816 3729175995
+62727000000 62730135697 20909000000 20910045232 3729130816 3730176048
+62730000000 62733135829 20910000000 20911045276 3730130816 3731176092
+62733000000 62736135937 20911000000 20912045312 3731130816 3732176128
+62736000000 62739136148 20912000000 20913045382 3732130816 3733176198
+62739000000 62742136314 20913000000 20914045438 3733130816 3734176254
+62742000000 62745136425 20914000000 20915045475 3734130816 3735176291
+62745000000 62748136585 20915000000 20916045528 3735130816 3736176344
+62748000000 62751136697 20916000000 20917045565 3736130816 3737176381
+62751000000 62754136895 20917000000 20918045631 3737130816 3738176447
+62754000000 62757136985 20918000000 20919045661 3738130816 3739176477
+62757000000 62760137210 20919000000 20920045736 3739130816 3740176552
+62760000000 62763137342 20920000000 20921045780 3740130816 3741176596
+62763000000 62766137481 20921000000 20922045827 3741130816 3742176643
+62766000000 62769137532 20922000000 20923045844 3742130816 3743176660
+62769000000 62772137743 20923000000 20924045914 3743130816 3744176730
+62772000000 62775137952 20924000000 20925045984 3744130816 3745176800
+62775000000 62778138080 20925000000 20926046026 3745130816 3746176842
+62778000000 62781138223 20926000000 20927046074 3746130816 3747176890
+62781000000 62784138394 20927000000 20928046131 3747130816 3748176947
+62784000000 62787138491 20928000000 20929046163 3748130816 3749176979
+62787000000 62790138704 20929000000 20930046234 3749130816 3750177050
+62790000000 62793138834 20930000000 20931046278 3750130816 3751177094
+62793000000 62796138984 20931000000 20932046328 3751130816 3752177144
+62796000000 62799139144 20932000000 20933046381 3752130816 3753177197
+62799000000 62802139240 20933000000 20934046413 3753130816 3754177229
+62802000000 62805139428 20934000000 20935046476 3754130816 3755177292
+62805000000 62808139596 20935000000 20936046532 3755130816 3756177348
+62808000000 62811139732 20936000000 20937046577 3756130816 3757177393
+62811000000 62814139907 20937000000 20938046635 3757130816 3758177451
+62814000000 62817140029 20938000000 20939046676 3758130816 3759177492
+62817000000 62820140179 20939000000 20940046726 3759130816 3760177542
+62820000000 62823140327 20940000000 20941046775 3760130816 3761177591
+62823000000 62826140533 20941000000 20942046844 3761130816 3762177660
+62826000000 62829140647 20942000000 20943046882 3762130816 3763177698
+62829000000 62832140779 20943000000 20944046926 3763130816 3764177742
+62832000000 62835140953 20944000000 20945046984 3764130816 3765177800
+62835000000 62838141072 20945000000 20946047024 3765130816 3766177840
+62838000000 62841141196 20946000000 20947047065 3766130816 3767177881
+62841000000 62844141415 20947000000 20948047138 3767130816 3768177954
+62844000000 62847141551 20948000000 20949047183 3768130816 3769177999
+62847000000 62850141702 20949000000 20950047234 3769130816 3770178050
+62850000000 62853141862 20950000000 20951047287 3770130816 3771178103
+62853000000 62856141983 20951000000 20952047327 3771130816 3772178143
+62856000000 62859142064 20952000000 20953047354 3772130816 3773178170
+62859000000 62862142272 20953000000 20954047424 3773130816 3774178240
+62862000000 62865142427 20954000000 20955047475 3774130816 3775178291
+62865000000 62868142586 20955000000 20956047528 3775130816 3776178344
+62868000000 62871142738 20956000000 20957047579 3776130816 3777178395
+62871000000 62874142860 20957000000 20958047620 3777130816 3778178436
+62874000000 62877143038 20958000000 20959047679 3778130816 3779178495
+62877000000 62880143187 20959000000 20960047729 3779130816 3780178545
+62880000000 62883143315 20960000000 20961047771 3780130816 3781178587
+62883000000 62886143484 20961000000 20962047828 3781130816 3782178644
+62886000000 62889143604 20962000000 20963047868 3782130816 3783178684
+62889000000 62892143531 20963000000 20964047843 3783130816 3784178659
+62892000000 62895143854 20964000000 20965047951 3784130816 3785178767
+62895000000 62898144107 20965000000 20966048035 3785130816 3786178851
+62898000000 62901144217 20966000000 20967048072 3786130816 3787178888
+62901000000 62904144396 20967000000 20968048132 3787130816 3788178948
+62904000000 62907144444 20968000000 20969048148 3788130816 3789178964
+62907000000 62910144698 20969000000 20970048232 3789130816 3790179048
+62910000000 62913144817 20970000000 20971048272 3790130816 3791179088
+62913000000 62916144988 20971000000 20972048329 3791130816 3792179145
+62916000000 62919145135 20972000000 20973048378 3792130816 3793179194
+62919000000 62922145288 20973000000 20974048429 3793130816 3794179245
+62922000000 62925145434 20974000000 20975048478 3794130816 3795179294
+62925000000 62928145578 20975000000 20976048526 3795130816 3796179342
+62928000000 62931145741 20976000000 20977048580 3796130816 3797179396
+62931000000 62934145893 20977000000 20978048631 3797130816 3798179447
+62934000000 62937146047 20978000000 20979048682 3798130816 3799179498
+62937000000 62940146167 20979000000 20980048722 3799130816 3800179538
+62940000000 62943146376 20980000000 20981048792 3800130816 3801179608
+62943000000 62946146506 20981000000 20982048835 3801130816 3802179651
+62946000000 62949146620 20982000000 20983048873 3802130816 3803179689
+62949000000 62952146781 20983000000 20984048927 3803130816 3804179743
+62952000000 62955146916 20984000000 20985048972 3804130816 3805179788
+62955000000 62958147059 20985000000 20986049019 3805130816 3806179835
+62958000000 62961147159 20986000000 20987049053 3806130816 3807179869
+62961000000 62964147393 20987000000 20988049131 3807130816 3808179947
+62964000000 62967147466 20988000000 20989049155 3808130816 3809179971
+62967000000 62970147587 20989000000 20990049195 3809130816 3810180011
+62970000000 62973147776 20990000000 20991049258 3810130816 3811180074
+62973000000 62976147930 20991000000 20992049310 3811130816 3812180126
+62976000000 62979148109 20992000000 20993049369 3812130816 3813180185
+62979000000 62982148255 20993000000 20994049418 3813130816 3814180234
+62982000000 62985148382 20994000000 20995049460 3814130816 3815180276
+62985000000 62988148556 20995000000 20996049518 3815130816 3816180334
+62988000000 62991148620 20996000000 20997049540 3816130816 3817180356
+62991000000 62994148827 20997000000 20998049609 3817130816 3818180425
+62994000000 62997149008 20998000000 20999049669 3818130816 3819180485
+62997000000 63000149157 20999000000 21000049719 3819130816 3820180535
+63000000000 63003149214 21000000000 21001049738 3820130816 3821180554
+63003000000 63006149410 21001000000 21002049803 3821130816 3822180619
+63006000000 63009149600 21002000000 21003049866 3822130816 3823180682
+63009000000 63012149745 21003000000 21004049915 3823130816 3824180731
+63012000000 63015149917 21004000000 21005049972 3824130816 3825180788
+63015000000 63018150050 21005000000 21006050016 3825130816 3826180832
+63018000000 63021150121 21006000000 21007050040 3826130816 3827180856
+63021000000 63024150347 21007000000 21008050115 3827130816 3828180931
+63024000000 63027150507 21008000000 21009050169 3828130816 3829180985
+63027000000 63030150639 21009000000 21010050213 3829130816 3830181029
+63030000000 63033150747 21010000000 21011050249 3830130816 3831181065
+63033000000 63036150958 21011000000 21012050319 3831130816 3832181135
+63036000000 63039151124 21012000000 21013050374 3832130816 3833181190
+63039000000 63042151235 21013000000 21014050411 3833130816 3834181227
+63042000000 63045151395 21014000000 21015050465 3834130816 3835181281
+63045000000 63048151507 21015000000 21016050502 3835130816 3836181318
+63048000000 63051151705 21016000000 21017050568 3836130816 3837181384
+63051000000 63054151795 21017000000 21018050598 3837130816 3838181414
+63054000000 63057152020 21018000000 21019050673 3838130816 3839181489
+63057000000 63060152152 21019000000 21020050717 3839130816 3840181533
+63060000000 63063152291 21020000000 21021050763 3840130816 3841181579
+63063000000 63066152342 21021000000 21022050780 3841130816 3842181596
+63066000000 63069152553 21022000000 21023050851 3842130816 3843181667
+63069000000 63072152762 21023000000 21024050920 3843130816 3844181736
+63072000000 63075152890 21024000000 21025050963 3844130816 3845181779
+63075000000 63078153033 21025000000 21026051011 3845130816 3846181827
+63078000000 63081153204 21026000000 21027051068 3846130816 3847181884
+63081000000 63084153301 21027000000 21028051100 3847130816 3848181916
+63084000000 63087153514 21028000000 21029051171 3848130816 3849181987
+63087000000 63090153644 21029000000 21030051214 3849130816 3850182030
+63090000000 63093153794 21030000000 21031051264 3850130816 3851182080
+63093000000 63096153954 21031000000 21032051318 3851130816 3852182134
+63096000000 63099154050 21032000000 21033051350 3852130816 3853182166
+63099000000 63102154238 21033000000 21034051412 3853130816 3854182228
+63102000000 63105154406 21034000000 21035051468 3854130816 3855182284
+63105000000 63108154542 21035000000 21036051514 3855130816 3856182330
+63108000000 63111154717 21036000000 21037051572 3856130816 3857182388
+63111000000 63114154839 21037000000 21038051613 3857130816 3858182429
+63114000000 63117154989 21038000000 21039051663 3858130816 3859182479
+63117000000 63120155137 21039000000 21040051712 3859130816 3860182528
+63120000000 63123155343 21040000000 21041051781 3860130816 3861182597
+63123000000 63126155457 21041000000 21042051819 3861130816 3862182635
+63126000000 63129155589 21042000000 21043051863 3862130816 3863182679
+63129000000 63132155763 21043000000 21044051921 3863130816 3864182737
+63132000000 63135155882 21044000000 21045051960 3864130816 3865182776
+63135000000 63138156006 21045000000 21046052002 3865130816 3866182818
+63138000000 63141156225 21046000000 21047052075 3866130816 3867182891
+63141000000 63144156361 21047000000 21048052120 3867130816 3868182936
+63144000000 63147156512 21048000000 21049052170 3868130816 3869182986
+63147000000 63150156672 21049000000 21050052224 3869130816 3870183040
+63150000000 63153156793 21050000000 21051052264 3870130816 3871183080
+63153000000 63156156874 21051000000 21052052291 3871130816 3872183107
+63156000000 63159157082 21052000000 21053052360 3872130816 3873183176
+63159000000 63162157237 21053000000 21054052412 3873130816 3874183228
+63162000000 63165157396 21054000000 21055052465 3874130816 3875183281
+63165000000 63168157548 21055000000 21056052516 3875130816 3876183332
+63168000000 63171157670 21056000000 21057052556 3876130816 3877183372
+63171000000 63174157848 21057000000 21058052616 3877130816 3878183432
+63174000000 63177157997 21058000000 21059052665 3878130816 3879183481
+63177000000 63180158125 21059000000 21060052708 3879130816 3880183524
+63180000000 63183158294 21060000000 21061052764 3880130816 3881183580
+63183000000 63186158414 21061000000 21062052804 3881130816 3882183620
+63186000000 63189158341 21062000000 21063052780 3882130816 3883183596
+63189000000 63192158664 21063000000 21064052888 3883130816 3884183704
+63192000000 63195158917 21064000000 21065052972 3884130816 3885183788
+63195000000 63198159027 21065000000 21066053009 3885130816 3886183825
+63198000000 63201159206 21066000000 21067053068 3886130816 3887183884
+63201000000 63204159254 21067000000 21068053084 3887130816 3888183900
+63204000000 63207159508 21068000000 21069053169 3888130816 3889183985
+63207000000 63210159627 21069000000 21070053209 3889130816 3890184025
+63210000000 63213159798 21070000000 21071053266 3890130816 3891184082
+63213000000 63216159945 21071000000 21072053315 3891130816 3892184131
+63216000000 63219160098 21072000000 21073053366 3892130816 3893184182
+63219000000 63222160244 21073000000 21074053414 3893130816 3894184230
+63222000000 63225160388 21074000000 21075053462 3894130816 3895184278
+63225000000 63228160551 21075000000 21076053517 3895130816 3896184333
+63228000000 63231160703 21076000000 21077053567 3896130816 3897184383
+63231000000 63234160857 21077000000 21078053619 3897130816 3898184435
+63234000000 63237160977 21078000000 21079053659 3898130816 3899184475
+63237000000 63240161186 21079000000 21080053728 3899130816 3900184544
+63240000000 63243161316 21080000000 21081053772 3900130816 3901184588
+63243000000 63246161430 21081000000 21082053810 3901130816 3902184626
+63246000000 63249161591 21082000000 21083053863 3902130816 3903184679
+63249000000 63252161726 21083000000 21084053908 3903130816 3904184724
+63252000000 63255161869 21084000000 21085053956 3904130816 3905184772
+63255000000 63258161969 21085000000 21086053989 3905130816 3906184805
+63258000000 63261162203 21086000000 21087054067 3906130816 3907184883
+63261000000 63264162276 21087000000 21088054092 3907130816 3908184908
+63264000000 63267162397 21088000000 21089054132 3908130816 3909184948
+63267000000 63270162586 21089000000 21090054195 3909130816 3910185011
+63270000000 63273162740 21090000000 21091054246 3910130816 3911185062
+63273000000 63276162919 21091000000 21092054306 3911130816 3912185122
+63276000000 63279163065 21092000000 21093054355 3912130816 3913185171
+63279000000 63282163192 21093000000 21094054397 3913130816 3914185213
+63282000000 63285163366 21094000000 21095054455 3914130816 3915185271
+63285000000 63288163430 21095000000 21096054476 3915130816 3916185292
+63288000000 63291163637 21096000000 21097054545 3916130816 3917185361
+63291000000 63294163818 21097000000 21098054606 3917130816 3918185422
+63294000000 63297163967 21098000000 21099054655 3918130816 3919185471
+63297000000 63300164024 21099000000 21100054674 3919130816 3920185490
+63300000000 63303164220 21100000000 21101054740 3920130816 3921185556
+63303000000 63306164410 21101000000 21102054803 3921130816 3922185619
+63306000000 63309164555 21102000000 21103054851 3922130816 3923185667
+63309000000 63312164727 21103000000 21104054909 3923130816 3924185725
+63312000000 63315164860 21104000000 21105054953 3924130816 3925185769
+63315000000 63318164931 21105000000 21106054977 3925130816 3926185793
+63318000000 63321165157 21106000000 21107055052 3926130816 3927185868
+63321000000 63324165317 21107000000 21108055105 3927130816 3928185921
+63324000000 63327165449 21108000000 21109055149 3928130816 3929185965
+63327000000 63330165557 21109000000 21110055185 3929130816 3930186001
+63330000000 63333165768 21110000000 21111055256 3930130816 3931186072
+63333000000 63336165934 21111000000 21112055311 3931130816 3932186127
+63336000000 63339166045 21112000000 21113055348 3932130816 3933186164
+63339000000 63342166205 21113000000 21114055401 3933130816 3934186217
+63342000000 63345166317 21114000000 21115055439 3934130816 3935186255
+63345000000 63348166515 21115000000 21116055505 3935130816 3936186321
+63348000000 63351166605 21116000000 21117055535 3936130816 3937186351
+63351000000 63354166830 21117000000 21118055610 3937130816 3938186426
+63354000000 63357166962 21118000000 21119055654 3938130816 3939186470
+63357000000 63360167101 21119000000 21120055700 3939130816 3940186516
+63360000000 63363167152 21120000000 21121055717 3940130816 3941186533
+63363000000 63366167363 21121000000 21122055787 3941130816 3942186603
+63366000000 63369167572 21122000000 21123055857 3942130816 3943186673
+63369000000 63372167700 21123000000 21124055900 3943130816 3944186716
+63372000000 63375167843 21124000000 21125055947 3944130816 3945186763
+63375000000 63378168014 21125000000 21126056004 3945130816 3946186820
+63378000000 63381168111 21126000000 21127056037 3946130816 3947186853
+63381000000 63384168324 21127000000 21128056108 3947130816 3948186924
+63384000000 63387168454 21128000000 21129056151 3948130816 3949186967
+63387000000 63390168604 21129000000 21130056201 3949130816 3950187017
+63390000000 63393168764 21130000000 21131056254 3950130816 3951187070
+63393000000 63396168860 21131000000 21132056286 3951130816 3952187102
+63396000000 63399169048 21132000000 21133056349 3952130816 3953187165
+63399000000 63402169216 21133000000 21134056405 3953130816 3954187221
+63402000000 63405169352 21134000000 21135056450 3954130816 3955187266
+63405000000 63408169527 21135000000 21136056509 3955130816 3956187325
+63408000000 63411169649 21136000000 21137056549 3956130816 3957187365
+63411000000 63414169799 21137000000 21138056599 3957130816 3958187415
+63414000000 63417169947 21138000000 21139056649 3958130816 3959187465
+63417000000 63420170153 21139000000 21140056717 3959130816 3960187533
+63420000000 63423170267 21140000000 21141056755 3960130816 3961187571
+63423000000 63426170399 21141000000 21142056799 3961130816 3962187615
+63426000000 63429170573 21142000000 21143056857 3962130816 3963187673
+63429000000 63432170692 21143000000 21144056897 3963130816 3964187713
+63432000000 63435170816 21144000000 21145056938 3964130816 3965187754
+63435000000 63438171035 21145000000 21146057011 3965130816 3966187827
+63438000000 63441171171 21146000000 21147057057 3966130816 3967187873
+63441000000 63444171322 21147000000 21148057107 3967130816 3968187923
+63444000000 63447171482 21148000000 21149057160 3968130816 3969187976
+63447000000 63450171603 21149000000 21150057201 3969130816 3970188017
+63450000000 63453171684 21150000000 21151057228 3970130816 3971188044
+63453000000 63456171892 21151000000 21152057297 3971130816 3972188113
+63456000000 63459172047 21152000000 21153057349 3972130816 3973188165
+63459000000 63462172206 21153000000 21154057402 3973130816 3974188218
+63462000000 63465172358 21154000000 21155057452 3974130816 3975188268
+63465000000 63468172480 21155000000 21156057493 3975130816 3976188309
+63468000000 63471172658 21156000000 21157057552 3976130816 3977188368
+63471000000 63474172807 21157000000 21158057602 3977130816 3978188418
+63474000000 63477172935 21158000000 21159057645 3978130816 3979188461
+63477000000 63480173104 21159000000 21160057701 3979130816 3980188517
+63480000000 63483173224 21160000000 21161057741 3980130816 3981188557
+63483000000 63486173151 21161000000 21162057717 3981130816 3982188533
+63486000000 63489173474 21162000000 21163057824 3982130816 3983188640
+63489000000 63492173727 21163000000 21164057909 3983130816 3984188725
+63492000000 63495173837 21164000000 21165057945 3984130816 3985188761
+63495000000 63498174016 21165000000 21166058005 3985130816 3986188821
+63498000000 63501174064 21166000000 21167058021 3986130816 3987188837
+63501000000 63504174318 21167000000 21168058106 3987130816 3988188922
+63504000000 63507174437 21168000000 21169058145 3988130816 3989188961
+63507000000 63510174608 21169000000 21170058202 3989130816 3990189018
+63510000000 63513174755 21170000000 21171058251 3990130816 3991189067
+63513000000 63516174908 21171000000 21172058302 3991130816 3992189118
+63516000000 63519175054 21172000000 21173058351 3992130816 3993189167
+63519000000 63522175198 21173000000 21174058399 3993130816 3994189215
+63522000000 63525175361 21174000000 21175058453 3994130816 3995189269
+63525000000 63528175513 21175000000 21176058504 3995130816 3996189320
+63528000000 63531175667 21176000000 21177058555 3996130816 3997189371
+63531000000 63534175787 21177000000 21178058595 3997130816 3998189411
+63534000000 63537175996 21178000000 21179058665 3998130816 3999189481
+63537000000 63540176126 21179000000 21180058708 3999130816 4000189524
+63540000000 63543176240 21180000000 21181058746 4000130816 4001189562
+63543000000 63546176401 21181000000 21182058800 4001130816 4002189616
+63546000000 63549176536 21182000000 21183058845 4002130816 4003189661
+63549000000 63552176679 21183000000 21184058893 4003130816 4004189709
+63552000000 63555176779 21184000000 21185058926 4004130816 4005189742
+63555000000 63558177013 21185000000 21186059004 4005130816 4006189820
+63558000000 63561177086 21186000000 21187059028 4006130816 4007189844
+63561000000 63564177207 21187000000 21188059069 4007130816 4008189885
+63564000000 63567177396 21188000000 21189059132 4008130816 4009189948
+63567000000 63570177550 21189000000 21190059183 4009130816 4010189999
+63570000000 63573177729 21190000000 21191059243 4010130816 4011190059
+63573000000 63576177875 21191000000 21192059291 4011130816 4012190107
+63576000000 63579178002 21192000000 21193059334 4012130816 4013190150
+63579000000 63582178176 21193000000 21194059392 4013130816 4014190208
+63582000000 63585178240 21194000000 21195059413 4014130816 4015190229
+63585000000 63588178447 21195000000 21196059482 4015130816 4016190298
+63588000000 63591178628 21196000000 21197059542 4016130816 4017190358
+63591000000 63594178777 21197000000 21198059592 4017130816 4018190408
+63594000000 63597178834 21198000000 21199059611 4018130816 4019190427
+63597000000 63600179030 21199000000 21200059676 4019130816 4020190492
+63600000000 63603179220 21200000000 21201059740 4020130816 4021190556
+63603000000 63606179365 21201000000 21202059788 4021130816 4022190604
+63606000000 63609179537 21202000000 21203059845 4022130816 4023190661
+63609000000 63612179670 21203000000 21204059890 4023130816 4024190706
+63612000000 63615179741 21204000000 21205059913 4024130816 4025190729
+63615000000 63618179967 21205000000 21206059989 4025130816 4026190805
+63618000000 63621180127 21206000000 21207060042 4026130816 4027190858
+63621000000 63624180259 21207000000 21208060086 4027130816 4028190902
+63624000000 63627180367 21208000000 21209060122 4028130816 4029190938
+63627000000 63630180578 21209000000 21210060192 4029130816 4030191008
+63630000000 63633180744 21210000000 21211060248 4030130816 4031191064
+63633000000 63636180855 21211000000 21212060285 4031130816 4032191101
+63636000000 63639181015 21212000000 21213060338 4032130816 4033191154
+63639000000 63642181127 21213000000 21214060375 4033130816 4034191191
+63642000000 63645181325 21214000000 21215060441 4034130816 4035191257
+63645000000 63648181415 21215000000 21216060471 4035130816 4036191287
+63648000000 63651181640 21216000000 21217060546 4036130816 4037191362
+63651000000 63654181772 21217000000 21218060590 4037130816 4038191406
+63654000000 63657181911 21218000000 21219060637 4038130816 4039191453
+63657000000 63660181962 21219000000 21220060654 4039130816 4040191470
+63660000000 63663182173 21220000000 21221060724 4040130816 4041191540
+63663000000 63666182382 21221000000 21222060794 4041130816 4042191610
+63666000000 63669182510 21222000000 21223060836 4042130816 4043191652
+63669000000 63672182653 21223000000 21224060884 4043130816 4044191700
+63672000000 63675182824 21224000000 21225060941 4044130816 4045191757
+63675000000 63678182921 21225000000 21226060973 4045130816 4046191789
+63678000000 63681183134 21226000000 21227061044 4046130816 4047191860
+63681000000 63684183264 21227000000 21228061088 4047130816 4048191904
+63684000000 63687183414 21228000000 21229061138 4048130816 4049191954
+63687000000 63690183574 21229000000 21230061191 4049130816 4050192007
+63690000000 63693183670 21230000000 21231061223 4050130816 4051192039
+63693000000 63696183858 21231000000 21232061286 4051130816 4052192102
+63696000000 63699184026 21232000000 21233061342 4052130816 4053192158
+63699000000 63702184162 21233000000 21234061387 4053130816 4054192203
+63702000000 63705184337 21234000000 21235061445 4054130816 4055192261
+63705000000 63708184459 21235000000 21236061486 4055130816 4056192302
+63708000000 63711184609 21236000000 21237061536 4056130816 4057192352
+63711000000 63714184757 21237000000 21238061585 4057130816 4058192401
+63714000000 63717184963 21238000000 21239061654 4058130816 4059192470
+63717000000 63720185077 21239000000 21240061692 4059130816 4060192508
+63720000000 63723185209 21240000000 21241061736 4060130816 4061192552
+63723000000 63726185383 21241000000 21242061794 4061130816 4062192610
+63726000000 63729185502 21242000000 21243061834 4062130816 4063192650
+63729000000 63732185626 21243000000 21244061875 4063130816 4064192691
+63732000000 63735185845 21244000000 21245061948 4064130816 4065192764
+63735000000 63738185981 21245000000 21246061993 4065130816 4066192809
+63738000000 63741186132 21246000000 21247062044 4066130816 4067192860
+63741000000 63744186292 21247000000 21248062097 4067130816 4068192913
+63744000000 63747186413 21248000000 21249062137 4068130816 4069192953
+63747000000 63750186494 21249000000 21250062164 4069130816 4070192980
+63750000000 63753186702 21250000000 21251062234 4070130816 4071193050
+63753000000 63756186857 21251000000 21252062285 4071130816 4072193101
+63756000000 63759187016 21252000000 21253062338 4072130816 4073193154
+63759000000 63762187168 21253000000 21254062389 4073130816 4074193205
+63762000000 63765187290 21254000000 21255062430 4074130816 4075193246
+63765000000 63768187468 21255000000 21256062489 4075130816 4076193305
+63768000000 63771187617 21256000000 21257062539 4076130816 4077193355
+63771000000 63774187745 21257000000 21258062581 4077130816 4078193397
+63774000000 63777187914 21258000000 21259062638 4078130816 4079193454
+63777000000 63780188034 21259000000 21260062678 4079130816 4080193494
+63780000000 63783187961 21260000000 21261062653 4080130816 4081193469
+63783000000 63786188284 21261000000 21262062761 4081130816 4082193577
+63786000000 63789188537 21262000000 21263062845 4082130816 4083193661
+63789000000 63792188647 21263000000 21264062882 4083130816 4084193698
+63792000000 63795188826 21264000000 21265062942 4084130816 4085193758
+63795000000 63798188874 21265000000 21266062958 4085130816 4086193774
+63798000000 63801189128 21266000000 21267063042 4086130816 4087193858
+63801000000 63804189247 21267000000 21268063082 4087130816 4088193898
+63804000000 63807189418 21268000000 21269063139 4088130816 4089193955
+63807000000 63810189565 21269000000 21270063188 4089130816 4090194004
+63810000000 63813189718 21270000000 21271063239 4090130816 4091194055
+63813000000 63816189864 21271000000 21272063288 4091130816 4092194104
+63816000000 63819190008 21272000000 21273063336 4092130816 4093194152
+63819000000 63822190171 21273000000 21274063390 4093130816 4094194206
+63822000000 63825190323 21274000000 21275063441 4094130816 4095194257
+63825000000 63828190477 21275000000 21276063492 4095130816 4096194308
+63828000000 63831190597 21276000000 21277063532 4096130816 4097194348
+63831000000 63834190806 21277000000 21278063602 4097130816 4098194418
+63834000000 63837190936 21278000000 21279063645 4098130816 4099194461
+63837000000 63840191050 21279000000 21280063683 4099130816 4100194499
+63840000000 63843191211 21280000000 21281063737 4100130816 4101194553
+63843000000 63846191346 21281000000 21282063782 4101130816 4102194598
+63846000000 63849191489 21282000000 21283063829 4102130816 4103194645
+63849000000 63852191589 21283000000 21284063863 4103130816 4104194679
+63852000000 63855191823 21284000000 21285063941 4104130816 4105194757
+63855000000 63858191896 21285000000 21286063965 4105130816 4106194781
+63858000000 63861192017 21286000000 21287064005 4106130816 4107194821
+63861000000 63864192206 21287000000 21288064068 4107130816 4108194884
+63864000000 63867192360 21288000000 21289064120 4108130816 4109194936
+63867000000 63870192539 21289000000 21290064179 4109130816 4110194995
+63870000000 63873192685 21290000000 21291064228 4110130816 4111195044
+63873000000 63876192812 21291000000 21292064270 4111130816 4112195086
+63876000000 63879192986 21292000000 21293064328 4112130816 4113195144
+63879000000 63882193050 21293000000 21294064350 4113130816 4114195166
+63882000000 63885193257 21294000000 21295064419 4114130816 4115195235
+63885000000 63888193438 21295000000 21296064479 4115130816 4116195295
+63888000000 63891193587 21296000000 21297064529 4116130816 4117195345
+63891000000 63894193644 21297000000 21298064548 4117130816 4118195364
+63894000000 63897193840 21298000000 21299064613 4118130816 4119195429
+63897000000 63900194030 21299000000 21300064676 4119130816 4120195492
+63900000000 63903194175 21300000000 21301064725 4120130816 4121195541
+63903000000 63906194347 21301000000 21302064782 4121130816 4122195598
+63906000000 63909194480 21302000000 21303064826 4122130816 4123195642
+63909000000 63912194551 21303000000 21304064850 4123130816 4124195666
+63912000000 63915194777 21304000000 21305064925 4124130816 4125195741
+63915000000 63918194937 21305000000 21306064979 4125130816 4126195795
+63918000000 63921195069 21306000000 21307065023 4126130816 4127195839
+63921000000 63924195177 21307000000 21308065059 4127130816 4128195875
+63924000000 63927195388 21308000000 21309065129 4128130816 4129195945
+63927000000 63930195554 21309000000 21310065184 4129130816 4130196000
+63930000000 63933195665 21310000000 21311065221 4130130816 4131196037
+63933000000 63936195825 21311000000 21312065275 4131130816 4132196091
+63936000000 63939195937 21312000000 21313065312 4132130816 4133196128
+63939000000 63942196135 21313000000 21314065378 4133130816 4134196194
+63942000000 63945196225 21314000000 21315065408 4134130816 4135196224
+63945000000 63948196450 21315000000 21316065483 4135130816 4136196299
+63948000000 63951196582 21316000000 21317065527 4136130816 4137196343
+63951000000 63954196721 21317000000 21318065573 4137130816 4138196389
+63954000000 63957196772 21318000000 21319065590 4138130816 4139196406
+63957000000 63960196983 21319000000 21320065661 4139130816 4140196477
+63960000000 63963197192 21320000000 21321065730 4140130816 4141196546
+63963000000 63966197320 21321000000 21322065773 4141130816 4142196589
+63966000000 63969197463 21322000000 21323065821 4142130816 4143196637
+63969000000 63972197634 21323000000 21324065878 4143130816 4144196694
+63972000000 63975197731 21324000000 21325065910 4144130816 4145196726
+63975000000 63978197944 21325000000 21326065981 4145130816 4146196797
+63978000000 63981198074 21326000000 21327066024 4146130816 4147196840
+63981000000 63984198224 21327000000 21328066074 4147130816 4148196890
+63984000000 63987198384 21328000000 21329066128 4148130816 4149196944
+63987000000 63990198480 21329000000 21330066160 4149130816 4150196976
+63990000000 63993198668 21330000000 21331066222 4150130816 4151197038
+63993000000 63996198836 21331000000 21332066278 4151130816 4152197094
+63996000000 63999198972 21332000000 21333066324 4152130816 4153197140
+63999000000 64002199147 21333000000 21334066382 4153130816 4154197198
+64002000000 64005199269 21334000000 21335066423 4154130816 4155197239
+64005000000 64008199419 21335000000 21336066473 4155130816 4156197289
+64008000000 64011199567 21336000000 21337066522 4156130816 4157197338
+64011000000 64014199773 21337000000 21338066591 4157130816 4158197407
+64014000000 64017199887 21338000000 21339066629 4158130816 4159197445
+64017000000 64020200019 21339000000 21340066673 4159130816 4160197489
+64020000000 64023200193 21340000000 21341066731 4160130816 4161197547
+64023000000 64026200312 21341000000 21342066770 4161130816 4162197586
+64026000000 64029200436 21342000000 21343066812 4162130816 4163197628
+64029000000 64032200655 21343000000 21344066885 4163130816 4164197701
+64032000000 64035200791 21344000000 21345066930 4164130816 4165197746
+64035000000 64038200942 21345000000 21346066980 4165130816 4166197796
+64038000000 64041201102 21346000000 21347067034 4166130816 4167197850
+64041000000 64044201223 21347000000 21348067074 4167130816 4168197890
+64044000000 64047201304 21348000000 21349067101 4168130816 4169197917
+64047000000 64050201512 21349000000 21350067170 4169130816 4170197986
+64050000000 64053201667 21350000000 21351067222 4170130816 4171198038
+64053000000 64056201826 21351000000 21352067275 4171130816 4172198091
+64056000000 64059201978 21352000000 21353067326 4172130816 4173198142
+64059000000 64062202100 21353000000 21354067366 4173130816 4174198182
+64062000000 64065202278 21354000000 21355067426 4174130816 4175198242
+64065000000 64068202427 21355000000 21356067475 4175130816 4176198291
+64068000000 64071202555 21356000000 21357067518 4176130816 4177198334
+64071000000 64074202724 21357000000 21358067574 4177130816 4178198390
+64074000000 64077202844 21358000000 21359067614 4178130816 4179198430
+64077000000 64080202771 21359000000 21360067590 4179130816 4180198406
+64080000000 64083203094 21360000000 21361067698 4180130816 4181198514
+64083000000 64086203347 21361000000 21362067782 4181130816 4182198598
+64086000000 64089203457 21362000000 21363067819 4182130816 4183198635
+64089000000 64092203636 21363000000 21364067878 4183130816 4184198694
+64092000000 64095203684 21364000000 21365067894 4184130816 4185198710
+64095000000 64098203938 21365000000 21366067979 4185130816 4186198795
+64098000000 64101204057 21366000000 21367068019 4186130816 4187198835
+64101000000 64104204228 21367000000 21368068076 4187130816 4188198892
+64104000000 64107204375 21368000000 21369068125 4188130816 4189198941
+64107000000 64110204528 21369000000 21370068176 4189130816 4190198992
+64110000000 64113204674 21370000000 21371068224 4190130816 4191199040
+64113000000 64116204818 21371000000 21372068272 4191130816 4192199088
+64116000000 64119204981 21372000000 21373068327 4192130816 4193199143
+64119000000 64122205133 21373000000 21374068377 4193130816 4194199193
+64122000000 64125205287 21374000000 21375068429 4194130816 4195199245
+64125000000 64128205407 21375000000 21376068469 4195130816 4196199285
+64128000000 64131205616 21376000000 21377068538 4196130816 4197199354
+64131000000 64134205746 21377000000 21378068582 4197130816 4198199398
+64134000000 64137205860 21378000000 21379068620 4198130816 4199199436
+64137000000 64140206021 21379000000 21380068673 4199130816 4200199489
+64140000000 64143206156 21380000000 21381068718 4200130816 4201199534
+64143000000 64146206299 21381000000 21382068766 4201130816 4202199582
+64146000000 64149206399 21382000000 21383068799 4202130816 4203199615
+64149000000 64152206633 21383000000 21384068877 4203130816 4204199693
+64152000000 64155206706 21384000000 21385068902 4204130816 4205199718
+64155000000 64158206827 21385000000 21386068942 4205130816 4206199758
+64158000000 64161207016 21386000000 21387069005 4206130816 4207199821
+64161000000 64164207170 21387000000 21388069056 4207130816 4208199872
+64164000000 64167207349 21388000000 21389069116 4208130816 4209199932
+64167000000 64170207495 21389000000 21390069165 4209130816 4210199981
+64170000000 64173207622 21390000000 21391069207 4210130816 4211200023
+64173000000 64176207796 21391000000 21392069265 4211130816 4212200081
+64176000000 64179207860 21392000000 21393069286 4212130816 4213200102
+64179000000 64182208067 21393000000 21394069355 4213130816 4214200171
+64182000000 64185208248 21394000000 21395069416 4214130816 4215200232
+64185000000 64188208397 21395000000 21396069465 4215130816 4216200281
+64188000000 64191208454 21396000000 21397069484 4216130816 4217200300
+64191000000 64194208650 21397000000 21398069550 4217130816 4218200366
+64194000000 64197208840 21398000000 21399069613 4218130816 4219200429
+64197000000 64200208985 21399000000 21400069661 4219130816 4220200477
+64200000000 64203209157 21400000000 21401069719 4220130816 4221200535
+64203000000 64206209290 21401000000 21402069763 4221130816 4222200579
+64206000000 64209209361 21402000000 21403069787 4222130816 4223200603
+64209000000 64212209587 21403000000 21404069862 4223130816 4224200678
+64212000000 64215209747 21404000000 21405069915 4224130816 4225200731
+64215000000 64218209879 21405000000 21406069959 4225130816 4226200775
+64218000000 64221209987 21406000000 21407069995 4226130816 4227200811
+64221000000 64224210198 21407000000 21408070066 4227130816 4228200882
+64224000000 64227210364 21408000000 21409070121 4228130816 4229200937
+64227000000 64230210475 21409000000 21410070158 4229130816 4230200974
+64230000000 64233210635 21410000000 21411070211 4230130816 4231201027
+64233000000 64236210747 21411000000 21412070249 4231130816 4232201065
+64236000000 64239210945 21412000000 21413070315 4232130816 4233201131
+64239000000 64242211035 21413000000 21414070345 4233130816 4234201161
+64242000000 64245211260 21414000000 21415070420 4234130816 4235201236
+64245000000 64248211392 21415000000 21416070464 4235130816 4236201280
+64248000000 64251211531 21416000000 21417070510 4236130816 4237201326
+64251000000 64254211582 21417000000 21418070527 4237130816 4238201343
+64254000000 64257211793 21418000000 21419070597 4238130816 4239201413
+64257000000 64260212002 21419000000 21420070667 4239130816 4240201483
+64260000000 64263212130 21420000000 21421070710 4240130816 4241201526
+64263000000 64266212273 21421000000 21422070757 4241130816 4242201573
+64266000000 64269212444 21422000000 21423070814 4242130816 4243201630
+64269000000 64272212541 21423000000 21424070847 4243130816 4244201663
+64272000000 64275212754 21424000000 21425070918 4244130816 4245201734
+64275000000 64278212884 21425000000 21426070961 4245130816 4246201777
+64278000000 64281213034 21426000000 21427071011 4246130816 4247201827
+64281000000 64284213194 21427000000 21428071064 4247130816 4248201880
+64284000000 64287213290 21428000000 21429071096 4248130816 4249201912
+64287000000 64290213478 21429000000 21430071159 4249130816 4250201975
+64290000000 64293213646 21430000000 21431071215 4250130816 4251202031
+64293000000 64296213782 21431000000 21432071260 4251130816 4252202076
+64296000000 64299213957 21432000000 21433071319 4252130816 4253202135
+64299000000 64302214079 21433000000 21434071359 4253130816 4254202175
+64302000000 64305214229 21434000000 21435071409 4254130816 4255202225
+64305000000 64308214377 21435000000 21436071459 4255130816 4256202275
+64308000000 64311214583 21436000000 21437071527 4256130816 4257202343
+64311000000 64314214697 21437000000 21438071565 4257130816 4258202381
+64314000000 64317214829 21438000000 21439071609 4258130816 4259202425
+64317000000 64320215003 21439000000 21440071667 4259130816 4260202483
+64320000000 64323215122 21440000000 21441071707 4260130816 4261202523
+64323000000 64326215246 21441000000 21442071748 4261130816 4262202564
+64326000000 64329215465 21442000000 21443071821 4262130816 4263202637
+64329000000 64332215601 21443000000 21444071867 4263130816 4264202683
+64332000000 64335215752 21444000000 21445071917 4264130816 4265202733
+64335000000 64338215912 21445000000 21446071970 4265130816 4266202786
+64338000000 64341216033 21446000000 21447072011 4266130816 4267202827
+64341000000 64344216114 21447000000 21448072038 4267130816 4268202854
+64344000000 64347216322 21448000000 21449072107 4268130816 4269202923
+64347000000 64350216477 21449000000 21450072159 4269130816 4270202975
+64350000000 64353216636 21450000000 21451072212 4270130816 4271203028
+64353000000 64356216788 21451000000 21452072262 4271130816 4272203078
+64356000000 64359216910 21452000000 21453072303 4272130816 4273203119
+64359000000 64362217088 21453000000 21454072362 4273130816 4274203178
+64362000000 64365217237 21454000000 21455072412 4274130816 4275203228
+64365000000 64368217365 21455000000 21456072455 4275130816 4276203271
+64368000000 64371217534 21456000000 21457072511 4276130816 4277203327
+64371000000 64374217654 21457000000 21458072551 4277130816 4278203367
+64374000000 64377217581 21458000000 21459072527 4278130816 4279203343
+64377000000 64380217904 21459000000 21460072634 4279130816 4280203450
+64380000000 64383218157 21460000000 21461072719 4280130816 4281203535
+64383000000 64386218267 21461000000 21462072755 4281130816 4282203571
+64386000000 64389218446 21462000000 21463072815 4282130816 4283203631
+64389000000 64392218494 21463000000 21464072831 4283130816 4284203647
+64392000000 64395218748 21464000000 21465072916 4284130816 4285203732
+64395000000 64398218867 21465000000 21466072955 4285130816 4286203771
+64398000000 64401219038 21466000000 21467073012 4286130816 4287203828
+64401000000 64404219185 21467000000 21468073061 4287130816 4288203877
+64404000000 64407219338 21468000000 21469073112 4288130816 4289203928
+64407000000 64410219484 21469000000 21470073161 4289130816 4290203977
+64410000000 64413219628 21470000000 21471073209 4290130816 4291204025
+64413000000 64416219791 21471000000 21472073263 4291130816 4292204079
+64416000000 64419219943 21472000000 21473073314 4292130816 4293204130
+64419000000 64422220097 21473000000 21474073365 4293130816 4294204181
+64422000000 64425220217 21474000000 21475073405 4294130816 236925
+64425000000 64428220426 21475000000 21476073475 163520 1236995
+64428000000 64431220556 21476000000 21477073518 1163520 2237038
+64431000000 64434220670 21477000000 21478073556 2163520 3237076
+64434000000 64437220831 21478000000 21479073610 3163520 4237130
+64437000000 64440220966 21479000000 21480073655 4163520 5237175
+64440000000 64443221109 21480000000 21481073703 5163520 6237223
+64443000000 64446221209 21481000000 21482073736 6163520 7237256
+64446000000 64449221443 21482000000 21483073814 7163520 8237334
+64449000000 64452221516 21483000000 21484073838 8163520 9237358
+64452000000 64455221637 21484000000 21485073879 9163520 10237399
+64455000000 64458221826 21485000000 21486073942 10163520 11237462
+64458000000 64461221980 21486000000 21487073993 11163520 12237513
+64461000000 64464222159 21487000000 21488074053 12163520 13237573
+64464000000 64467222305 21488000000 21489074101 13163520 14237621
+64467000000 64470222432 21489000000 21490074144 14163520 15237664
+64470000000 64473222606 21490000000 21491074202 15163520 16237722
+64473000000 64476222670 21491000000 21492074223 16163520 17237743
+64476000000 64479222877 21492000000 21493074292 17163520 18237812
+64479000000 64482223058 21493000000 21494074352 18163520 19237872
+64482000000 64485223207 21494000000 21495074402 19163520 20237922
+64485000000 64488223264 21495000000 21496074421 20163520 21237941
+64488000000 64491223460 21496000000 21497074486 21163520 22238006
+64491000000 64494223650 21497000000 21498074550 22163520 23238070
+64494000000 64497223795 21498000000 21499074598 23163520 24238118
+64497000000 64500223967 21499000000 21500074655 24163520 25238175
+64500000000 64503224100 21500000000 21501074700 25163520 26238220
+64503000000 64506224171 21501000000 21502074723 26163520 27238243
+64506000000 64509224397 21502000000 21503074799 27163520 28238319
+64509000000 64512224557 21503000000 21504074852 28163520 29238372
+64512000000 64515224689 21504000000 21505074896 29163520 30238416
+64515000000 64518224797 21505000000 21506074932 30163520 31238452
+64518000000 64521225008 21506000000 21507075002 31163520 32238522
+64521000000 64524225174 21507000000 21508075058 32163520 33238578
+64524000000 64527225285 21508000000 21509075095 33163520 34238615
+64527000000 64530225445 21509000000 21510075148 34163520 35238668
+64530000000 64533225557 21510000000 21511075185 35163520 36238705
+64533000000 64536225755 21511000000 21512075251 36163520 37238771
+64536000000 64539225845 21512000000 21513075281 37163520 38238801
+64539000000 64542226070 21513000000 21514075356 38163520 39238876
+64542000000 64545226202 21514000000 21515075400 39163520 40238920
+64545000000 64548226341 21515000000 21516075447 40163520 41238967
+64548000000 64551226392 21516000000 21517075464 41163520 42238984
+64551000000 64554226603 21517000000 21518075534 42163520 43239054
+64554000000 64557226812 21518000000 21519075604 43163520 44239124
+64557000000 64560226940 21519000000 21520075646 44163520 45239166
+64560000000 64563227083 21520000000 21521075694 45163520 46239214
+64563000000 64566227254 21521000000 21522075751 46163520 47239271
+64566000000 64569227351 21522000000 21523075783 47163520 48239303
+64569000000 64572227564 21523000000 21524075854 48163520 49239374
+64572000000 64575227694 21524000000 21525075898 49163520 50239418
+64575000000 64578227844 21525000000 21526075948 50163520 51239468
+64578000000 64581228004 21526000000 21527076001 51163520 52239521
+64581000000 64584228100 21527000000 21528076033 52163520 53239553
+64584000000 64587228288 21528000000 21529076096 53163520 54239616
+64587000000 64590228456 21529000000 21530076152 54163520 55239672
+64590000000 64593228592 21530000000 21531076197 55163520 56239717
+64593000000 64596228767 21531000000 21532076255 56163520 57239775
+64596000000 64599228889 21532000000 21533076296 57163520 58239816
+64599000000 64602229039 21533000000 21534076346 58163520 59239866
+64602000000 64605229187 21534000000 21535076395 59163520 60239915
+64605000000 64608229393 21535000000 21536076464 60163520 61239984
+64608000000 64611229507 21536000000 21537076502 61163520 62240022
+64611000000 64614229639 21537000000 21538076546 62163520 63240066
+64614000000 64617229813 21538000000 21539076604 63163520 64240124
+64617000000 64620229932 21539000000 21540076644 64163520 65240164
+64620000000 64623230056 21540000000 21541076685 65163520 66240205
+64623000000 64626230275 21541000000 21542076758 66163520 67240278
+64626000000 64629230411 21542000000 21543076803 67163520 68240323
+64629000000 64632230562 21543000000 21544076854 68163520 69240374
+64632000000 64635230722 21544000000 21545076907 69163520 70240427
+64635000000 64638230843 21545000000 21546076947 70163520 71240467
+64638000000 64641230924 21546000000 21547076974 71163520 72240494
+64641000000 64644231132 21547000000 21548077044 72163520 73240564
+64644000000 64647231287 21548000000 21549077095 73163520 74240615
+64647000000 64650231446 21549000000 21550077148 74163520 75240668
+64650000000 64653231598 21550000000 21551077199 75163520 76240719
+64653000000 64656231720 21551000000 21552077240 76163520 77240760
+64656000000 64659231898 21552000000 21553077299 77163520 78240819
+64659000000 64662232047 21553000000 21554077349 78163520 79240869
+64662000000 64665232175 21554000000 21555077391 79163520 80240911
+64665000000 64668232344 21555000000 21556077448 80163520 81240968
+64668000000 64671232464 21556000000 21557077488 81163520 82241008
+64671000000 64674232391 21557000000 21558077463 82163520 83240983
+64674000000 64677232714 21558000000 21559077571 83163520 84241091
+64677000000 64680232967 21559000000 21560077655 84163520 85241175
+64680000000 64683233077 21560000000 21561077692 85163520 86241212
+64683000000 64686233256 21561000000 21562077752 86163520 87241272
+64686000000 64689233304 21562000000 21563077768 87163520 88241288
+64689000000 64692233558 21563000000 21564077852 88163520 89241372
+64692000000 64695233677 21564000000 21565077892 89163520 90241412
+64695000000 64698233848 21565000000 21566077949 90163520 91241469
+64698000000 64701233995 21566000000 21567077998 91163520 92241518
+64701000000 64704234148 21567000000 21568078049 92163520 93241569
+64704000000 64707234294 21568000000 21569078098 93163520 94241618
+64707000000 64710234438 21569000000 21570078146 94163520 95241666
+64710000000 64713234601 21570000000 21571078200 95163520 96241720
+64713000000 64716234753 21571000000 21572078251 96163520 97241771
+64716000000 64719234907 21572000000 21573078302 97163520 98241822
+64719000000 64722235027 21573000000 21574078342 98163520 99241862
+64722000000 64725235236 21574000000 21575078412 99163520 100241932
+64725000000 64728235366 21575000000 21576078455 100163520 101241975
+64728000000 64731235480 21576000000 21577078493 101163520 102242013
+64731000000 64734235641 21577000000 21578078547 102163520 103242067
+64734000000 64737235776 21578000000 21579078592 103163520 104242112
+64737000000 64740235919 21579000000 21580078639 104163520 105242159
+64740000000 64743236019 21580000000 21581078673 105163520 106242193
+64743000000 64746236253 21581000000 21582078751 106163520 107242271
+64746000000 64749236326 21582000000 21583078775 107163520 108242295
+64749000000 64752236447 21583000000 21584078815 108163520 109242335
+64752000000 64755236636 21584000000 21585078878 109163520 110242398
+64755000000 64758236790 21585000000 21586078930 110163520 111242450
+64758000000 64761236969 21586000000 21587078989 111163520 112242509
+64761000000 64764237115 21587000000 21588079038 112163520 113242558
+64764000000 64767237242 21588000000 21589079080 113163520 114242600
+64767000000 64770237416 21589000000 21590079138 114163520 115242658
+64770000000 64773237480 21590000000 21591079160 115163520 116242680
+64773000000 64776237687 21591000000 21592079229 116163520 117242749
+64776000000 64779237868 21592000000 21593079289 117163520 118242809
+64779000000 64782238017 21593000000 21594079339 118163520 119242859
+64782000000 64785238074 21594000000 21595079358 119163520 120242878
+64785000000 64788238270 21595000000 21596079423 120163520 121242943
+64788000000 64791238460 21596000000 21597079486 121163520 122243006
+64791000000 64794238605 21597000000 21598079535 122163520 123243055
+64794000000 64797238777 21598000000 21599079592 123163520 124243112
+64797000000 64800238910 21599000000 21600079636 124163520 125243156
+64800000000 64803238981 21600000000 21601079660 125163520 126243180
+64803000000 64806239207 21601000000 21602079735 126163520 127243255
+64806000000 64809239367 21602000000 21603079789 127163520 128243309
+64809000000 64812239499 21603000000 21604079833 128163520 129243353
+64812000000 64815239607 21604000000 21605079869 129163520 130243389
+64815000000 64818239818 21605000000 21606079939 130163520 131243459
+64818000000 64821239984 21606000000 21607079994 131163520 132243514
+64821000000 64824240095 21607000000 21608080031 132163520 133243551
+64824000000 64827240255 21608000000 21609080085 133163520 134243605
+64827000000 64830240367 21609000000 21610080122 134163520 135243642
+64830000000 64833240565 21610000000 21611080188 135163520 136243708
+64833000000 64836240655 21611000000 21612080218 136163520 137243738
+64836000000 64839240880 21612000000 21613080293 137163520 138243813
+64839000000 64842241012 21613000000 21614080337 138163520 139243857
+64842000000 64845241151 21614000000 21615080383 139163520 140243903
+64845000000 64848241202 21615000000 21616080400 140163520 141243920
+64848000000 64851241413 21616000000 21617080471 141163520 142243991
+64851000000 64854241622 21617000000 21618080540 142163520 143244060
+64854000000 64857241750 21618000000 21619080583 143163520 144244103
+64857000000 64860241893 21619000000 21620080631 144163520 145244151
+64860000000 64863242064 21620000000 21621080688 145163520 146244208
+64863000000 64866242161 21621000000 21622080720 146163520 147244240
+64866000000 64869242374 21622000000 21623080791 147163520 148244311
+64869000000 64872242504 21623000000 21624080834 148163520 149244354
+64872000000 64875242654 21624000000 21625080884 149163520 150244404
+64875000000 64878242814 21625000000 21626080938 150163520 151244458
+64878000000 64881242910 21626000000 21627080970 151163520 152244490
+64881000000 64884243098 21627000000 21628081032 152163520 153244552
+64884000000 64887243266 21628000000 21629081088 153163520 154244608
+64887000000 64890243402 21629000000 21630081134 154163520 155244654
+64890000000 64893243577 21630000000 21631081192 155163520 156244712
+64893000000 64896243699 21631000000 21632081233 156163520 157244753
+64896000000 64899243849 21632000000 21633081283 157163520 158244803
+64899000000 64902243997 21633000000 21634081332 158163520 159244852
+64902000000 64905244203 21634000000 21635081401 159163520 160244921
+64905000000 64908244317 21635000000 21636081439 160163520 161244959
+64908000000 64911244449 21636000000 21637081483 161163520 162245003
+64911000000 64914244623 21637000000 21638081541 162163520 163245061
+64914000000 64917244742 21638000000 21639081580 163163520 164245100
+64917000000 64920244866 21639000000 21640081622 164163520 165245142
+64920000000 64923245085 21640000000 21641081695 165163520 166245215
+64923000000 64926245221 21641000000 21642081740 166163520 167245260
+64926000000 64929245372 21642000000 21643081790 167163520 168245310
+64929000000 64932245532 21643000000 21644081844 168163520 169245364
+64932000000 64935245653 21644000000 21645081884 169163520 170245404
+64935000000 64938245734 21645000000 21646081911 170163520 171245431
+64938000000 64941245942 21646000000 21647081980 171163520 172245500
+64941000000 64944246097 21647000000 21648082032 172163520 173245552
+64944000000 64947246256 21648000000 21649082085 173163520 174245605
+64947000000 64950246408 21649000000 21650082136 174163520 175245656
+64950000000 64953246530 21650000000 21651082176 175163520 176245696
+64953000000 64956246708 21651000000 21652082236 176163520 177245756
+64956000000 64959246857 21652000000 21653082285 177163520 178245805
+64959000000 64962246985 21653000000 21654082328 178163520 179245848
+64962000000 64965247154 21654000000 21655082384 179163520 180245904
+64965000000 64968247274 21655000000 21656082424 180163520 181245944
+64968000000 64971247201 21656000000 21657082400 181163520 182245920
+64971000000 64974247524 21657000000 21658082508 182163520 183246028
+64974000000 64977247777 21658000000 21659082592 183163520 184246112
+64977000000 64980247887 21659000000 21660082629 184163520 185246149
+64980000000 64983248066 21660000000 21661082688 185163520 186246208
+64983000000 64986248114 21661000000 21662082704 186163520 187246224
+64986000000 64989248368 21662000000 21663082789 187163520 188246309
+64989000000 64992248487 21663000000 21664082829 188163520 189246349
+64992000000 64995248658 21664000000 21665082886 189163520 190246406
+64995000000 64998248805 21665000000 21666082935 190163520 191246455
+64998000000 65001248958 21666000000 21667082986 191163520 192246506
+65001000000 65004249104 21667000000 21668083034 192163520 193246554
+65004000000 65007249248 21668000000 21669083082 193163520 194246602
+65007000000 65010249411 21669000000 21670083137 194163520 195246657
+65010000000 65013249563 21670000000 21671083187 195163520 196246707
+65013000000 65016249717 21671000000 21672083239 196163520 197246759
+65016000000 65019249837 21672000000 21673083279 197163520 198246799
+65019000000 65022250046 21673000000 21674083348 198163520 199246868
+65022000000 65025250176 21674000000 21675083392 199163520 200246912
+65025000000 65028250290 21675000000 21676083430 200163520 201246950
+65028000000 65031250451 21676000000 21677083483 201163520 202247003
+65031000000 65034250586 21677000000 21678083528 202163520 203247048
+65034000000 65037250729 21678000000 21679083576 203163520 204247096
+65037000000 65040250829 21679000000 21680083609 204163520 205247129
+65040000000 65043251063 21680000000 21681083687 205163520 206247207
+65043000000 65046251136 21681000000 21682083712 206163520 207247232
+65046000000 65049251257 21682000000 21683083752 207163520 208247272
+65049000000 65052251446 21683000000 21684083815 208163520 209247335
+65052000000 65055251600 21684000000 21685083866 209163520 210247386
+65055000000 65058251779 21685000000 21686083926 210163520 211247446
+65058000000 65061251925 21686000000 21687083975 211163520 212247495
+65061000000 65064252052 21687000000 21688084017 212163520 213247537
+65064000000 65067252226 21688000000 21689084075 213163520 214247595
+65067000000 65070252290 21689000000 21690084096 214163520 215247616
+65070000000 65073252497 21690000000 21691084165 215163520 216247685
+65073000000 65076252678 21691000000 21692084226 216163520 217247746
+65076000000 65079252827 21692000000 21693084275 217163520 218247795
+65079000000 65082252884 21693000000 21694084294 218163520 219247814
+65082000000 65085253080 21694000000 21695084360 219163520 220247880
+65085000000 65088253270 21695000000 21696084423 220163520 221247943
+65088000000 65091253415 21696000000 21697084471 221163520 222247991
+65091000000 65094253587 21697000000 21698084529 222163520 223248049
+65094000000 65097253720 21698000000 21699084573 223163520 224248093
+65097000000 65100253791 21699000000 21700084597 224163520 225248117
+65100000000 65103254017 21700000000 21701084672 225163520 226248192
+65103000000 65106254177 21701000000 21702084725 226163520 227248245
+65106000000 65109254309 21702000000 21703084769 227163520 228248289
+65109000000 65112254417 21703000000 21704084805 228163520 229248325
+65112000000 65115254628 21704000000 21705084876 229163520 230248396
+65115000000 65118254794 21705000000 21706084931 230163520 231248451
+65118000000 65121254905 21706000000 21707084968 231163520 232248488
+65121000000 65124255065 21707000000 21708085021 232163520 233248541
+65124000000 65127255177 21708000000 21709085059 233163520 234248579
+65127000000 65130255375 21709000000 21710085125 234163520 235248645
+65130000000 65133255465 21710000000 21711085155 235163520 236248675
+65133000000 65136255690 21711000000 21712085230 236163520 237248750
+65136000000 65139255822 21712000000 21713085274 237163520 238248794
+65139000000 65142255961 21713000000 21714085320 238163520 239248840
+65142000000 65145256012 21714000000 21715085337 239163520 240248857
+65145000000 65148256223 21715000000 21716085407 240163520 241248927
+65148000000 65151256432 21716000000 21717085477 241163520 242248997
+65151000000 65154256560 21717000000 21718085520 242163520 243249040
+65154000000 65157256703 21718000000 21719085567 243163520 244249087
+65157000000 65160256874 21719000000 21720085624 244163520 245249144
+65160000000 65163256971 21720000000 21721085657 245163520 246249177
+65163000000 65166257184 21721000000 21722085728 246163520 247249248
+65166000000 65169257314 21722000000 21723085771 247163520 248249291
+65169000000 65172257464 21723000000 21724085821 248163520 249249341
+65172000000 65175257624 21724000000 21725085874 249163520 250249394
+65175000000 65178257720 21725000000 21726085906 250163520 251249426
+65178000000 65181257908 21726000000 21727085969 251163520 252249489
+65181000000 65184258076 21727000000 21728086025 252163520 253249545
+65184000000 65187258212 21728000000 21729086070 253163520 254249590
+65187000000 65190258387 21729000000 21730086129 254163520 255249649
+65190000000 65193258509 21730000000 21731086169 255163520 256249689
+65193000000 65196258659 21731000000 21732086219 256163520 257249739
+65196000000 65199258807 21732000000 21733086269 257163520 258249789
+65199000000 65202259013 21733000000 21734086337 258163520 259249857
+65202000000 65205259127 21734000000 21735086375 259163520 260249895
+65205000000 65208259259 21735000000 21736086419 260163520 261249939
+65208000000 65211259433 21736000000 21737086477 261163520 262249997
+65211000000 65214259552 21737000000 21738086517 262163520 263250037
+65214000000 65217259676 21738000000 21739086558 263163520 264250078
+65217000000 65220259895 21739000000 21740086631 264163520 265250151
+65220000000 65223260031 21740000000 21741086677 265163520 266250197
+65223000000 65226260182 21741000000 21742086727 266163520 267250247
+65226000000 65229260342 21742000000 21743086780 267163520 268250300
+65229000000 65232260463 21743000000 21744086821 268163520 269250341
+65232000000 65235260544 21744000000 21745086848 269163520 270250368
+65235000000 65238260752 21745000000 21746086917 270163520 271250437
+65238000000 65241260907 21746000000 21747086969 271163520 272250489
+65241000000 65244261066 21747000000 21748087022 272163520 273250542
+65244000000 65247261218 21748000000 21749087072 273163520 274250592
+65247000000 65250261340 21749000000 21750087113 274163520 275250633
+65250000000 65253261518 21750000000 21751087172 275163520 276250692
+65253000000 65256261667 21751000000 21752087222 276163520 277250742
+65256000000 65259261795 21752000000 21753087265 277163520 278250785
+65259000000 65262261964 21753000000 21754087321 278163520 279250841
+65262000000 65265262084 21754000000 21755087361 279163520 280250881
+65265000000 65268262011 21755000000 21756087337 280163520 281250857
+65268000000 65271262334 21756000000 21757087444 281163520 282250964
+65271000000 65274262587 21757000000 21758087529 282163520 283251049
+65274000000 65277262697 21758000000 21759087565 283163520 284251085
+65277000000 65280262876 21759000000 21760087625 284163520 285251145
+65280000000 65283262924 21760000000 21761087641 285163520 286251161
+65283000000 65286263178 21761000000 21762087726 286163520 287251246
+65286000000 65289263297 21762000000 21763087765 287163520 288251285
+65289000000 65292263468 21763000000 21764087822 288163520 289251342
+65292000000 65295263615 21764000000 21765087871 289163520 290251391
+65295000000 65298263768 21765000000 21766087922 290163520 291251442
+65298000000 65301263914 21766000000 21767087971 291163520 292251491
+65301000000 65304264058 21767000000 21768088019 292163520 293251539
+65304000000 65307264221 21768000000 21769088073 293163520 294251593
+65307000000 65310264373 21769000000 21770088124 294163520 295251644
+65310000000 65313264527 21770000000 21771088175 295163520 296251695
+65313000000 65316264647 21771000000 21772088215 296163520 297251735
+65316000000 65319264856 21772000000 21773088285 297163520 298251805
+65319000000 65322264986 21773000000 21774088328 298163520 299251848
+65322000000 65325265100 21774000000 21775088366 299163520 300251886
+65325000000 65328265261 21775000000 21776088420 300163520 301251940
+65328000000 65331265396 21776000000 21777088465 301163520 302251985
+65331000000 65334265539 21777000000 21778088513 302163520 303252033
+65334000000 65337265639 21778000000 21779088546 303163520 304252066
+65337000000 65340265873 21779000000 21780088624 304163520 305252144
+65340000000 65343265946 21780000000 21781088648 305163520 306252168
+65343000000 65346266067 21781000000 21782088689 306163520 307252209
+65346000000 65349266256 21782000000 21783088752 307163520 308252272
+65349000000 65352266410 21783000000 21784088803 308163520 309252323
+65352000000 65355266589 21784000000 21785088863 309163520 310252383
+65355000000 65358266735 21785000000 21786088911 310163520 311252431
+65358000000 65361266862 21786000000 21787088954 311163520 312252474
+65361000000 65364267036 21787000000 21788089012 312163520 313252532
+65364000000 65367267100 21788000000 21789089033 313163520 314252553
+65367000000 65370267307 21789000000 21790089102 314163520 315252622
+65370000000 65373267488 21790000000 21791089162 315163520 316252682
+65373000000 65376267637 21791000000 21792089212 316163520 317252732
+65376000000 65379267694 21792000000 21793089231 317163520 318252751
+65379000000 65382267890 21793000000 21794089296 318163520 319252816
+65382000000 65385268080 21794000000 21795089360 319163520 320252880
+65385000000 65388268225 21795000000 21796089408 320163520 321252928
+65388000000 65391268397 21796000000 21797089465 321163520 322252985
+65391000000 65394268530 21797000000 21798089510 322163520 323253030
+65394000000 65397268601 21798000000 21799089533 323163520 324253053
+65397000000 65400268827 21799000000 21800089609 324163520 325253129
+65400000000 65403268987 21800000000 21801089662 325163520 326253182
+65403000000 65406269119 21801000000 21802089706 326163520 327253226
+65406000000 65409269227 21802000000 21803089742 327163520 328253262
+65409000000 65412269438 21803000000 21804089812 328163520 329253332
+65412000000 65415269604 21804000000 21805089868 329163520 330253388
+65415000000 65418269715 21805000000 21806089905 330163520 331253425
+65418000000 65421269875 21806000000 21807089958 331163520 332253478
+65421000000 65424269987 21807000000 21808089995 332163520 333253515
+65424000000 65427270185 21808000000 21809090061 333163520 334253581
+65427000000 65430270275 21809000000 21810090091 334163520 335253611
+65430000000 65433270500 21810000000 21811090166 335163520 336253686
+65433000000 65436270632 21811000000 21812090210 336163520 337253730
+65436000000 65439270771 21812000000 21813090257 337163520 338253777
+65439000000 65442270822 21813000000 21814090274 338163520 339253794
+65442000000 65445271033 21814000000 21815090344 339163520 340253864
+65445000000 65448271242 21815000000 21816090414 340163520 341253934
+65448000000 65451271370 21816000000 21817090456 341163520 342253976
+65451000000 65454271513 21817000000 21818090504 342163520 343254024
+65454000000 65457271684 21818000000 21819090561 343163520 344254081
+65457000000 65460271781 21819000000 21820090593 344163520 345254113
+65460000000 65463271994 21820000000 21821090664 345163520 346254184
+65463000000 65466272124 21821000000 21822090708 346163520 347254228
+65466000000 65469272274 21822000000 21823090758 347163520 348254278
+65469000000 65472272434 21823000000 21824090811 348163520 349254331
+65472000000 65475272530 21824000000 21825090843 349163520 350254363
+65475000000 65478272718 21825000000 21826090906 350163520 351254426
+65478000000 65481272886 21826000000 21827090962 351163520 352254482
+65481000000 65484273022 21827000000 21828091007 352163520 353254527
+65484000000 65487273197 21828000000 21829091065 353163520 354254585
+65487000000 65490273319 21829000000 21830091106 354163520 355254626
+65490000000 65493273469 21830000000 21831091156 355163520 356254676
+65493000000 65496273617 21831000000 21832091205 356163520 357254725
+65496000000 65499273823 21832000000 21833091274 357163520 358254794
+65499000000 65502273937 21833000000 21834091312 358163520 359254832
+65502000000 65505274069 21834000000 21835091356 359163520 360254876
+65505000000 65508274243 21835000000 21836091414 360163520 361254934
+65508000000 65511274362 21836000000 21837091454 361163520 362254974
+65511000000 65514274486 21837000000 21838091495 362163520 363255015
+65514000000 65517274705 21838000000 21839091568 363163520 364255088
+65517000000 65520274841 21839000000 21840091613 364163520 365255133
+65520000000 65523274992 21840000000 21841091664 365163520 366255184
+65523000000 65526275152 21841000000 21842091717 366163520 367255237
+65526000000 65529275273 21842000000 21843091757 367163520 368255277
+65529000000 65532275354 21843000000 21844091784 368163520 369255304
+65532000000 65535275562 21844000000 21845091854 369163520 370255374
+65535000000 65538275717 21845000000 21846091905 370163520 371255425
+65538000000 65541275876 21846000000 21847091958 371163520 372255478
+65541000000 65544276028 21847000000 21848092009 372163520 373255529
+65544000000 65547276150 21848000000 21849092050 373163520 374255570
+65547000000 65550276328 21849000000 21850092109 374163520 375255629
+65550000000 65553276477 21850000000 21851092159 375163520 376255679
+65553000000 65556276605 21851000000 21852092201 376163520 377255721
+65556000000 65559276774 21852000000 21853092258 377163520 378255778
+65559000000 65562276894 21853000000 21854092298 378163520 379255818
+65562000000 65565276821 21854000000 21855092273 379163520 380255793
+65565000000 65568277144 21855000000 21856092381 380163520 381255901
+65568000000 65571277397 21856000000 21857092465 381163520 382255985
+65571000000 65574277507 21857000000 21858092502 382163520 383256022
+65574000000 65577277686 21858000000 21859092562 383163520 384256082
+65577000000 65580277734 21859000000 21860092578 384163520 385256098
+65580000000 65583277988 21860000000 21861092662 385163520 386256182
+65583000000 65586278107 21861000000 21862092702 386163520 387256222
+65586000000 65589278278 21862000000 21863092759 387163520 388256279
+65589000000 65592278425 21863000000 21864092808 388163520 389256328
+65592000000 65595278578 21864000000 21865092859 389163520 390256379
+65595000000 65598278724 21865000000 21866092908 390163520 391256428
+65598000000 65601278868 21866000000 21867092956 391163520 392256476
+65601000000 65604279031 21867000000 21868093010 392163520 393256530
+65604000000 65607279183 21868000000 21869093061 393163520 394256581
+65607000000 65610279337 21869000000 21870093112 394163520 395256632
+65610000000 65613279457 21870000000 21871093152 395163520 396256672
+65613000000 65616279666 21871000000 21872093222 396163520 397256742
+65616000000 65619279796 21872000000 21873093265 397163520 398256785
+65619000000 65622279910 21873000000 21874093303 398163520 399256823
+65622000000 65625280071 21874000000 21875093357 399163520 400256877
+65625000000 65628280206 21875000000 21876093402 400163520 401256922
+65628000000 65631280349 21876000000 21877093449 401163520 402256969
+65631000000 65634280449 21877000000 21878093483 402163520 403257003
+65634000000 65637280683 21878000000 21879093561 403163520 404257081
+65637000000 65640280756 21879000000 21880093585 404163520 405257105
+65640000000 65643280877 21880000000 21881093625 405163520 406257145
+65643000000 65646281066 21881000000 21882093688 406163520 407257208
+65646000000 65649281220 21882000000 21883093740 407163520 408257260
+65649000000 65652281399 21883000000 21884093799 408163520 409257319
+65652000000 65655281545 21884000000 21885093848 409163520 410257368
+65655000000 65658281672 21885000000 21886093890 410163520 411257410
+65658000000 65661281846 21886000000 21887093948 411163520 412257468
+65661000000 65664281910 21887000000 21888093970 412163520 413257490
+65664000000 65667282117 21888000000 21889094039 413163520 414257559
+65667000000 65670282298 21889000000 21890094099 414163520 415257619
+65670000000 65673282447 21890000000 21891094149 415163520 416257669
+65673000000 65676282504 21891000000 21892094168 416163520 417257688
+65676000000 65679282700 21892000000 21893094233 417163520 418257753
+65679000000 65682282890 21893000000 21894094296 418163520 419257816
+65682000000 65685283035 21894000000 21895094345 419163520 420257865
+65685000000 65688283207 21895000000 21896094402 420163520 421257922
+65688000000 65691283340 21896000000 21897094446 421163520 422257966
+65691000000 65694283411 21897000000 21898094470 422163520 423257990
+65694000000 65697283637 21898000000 21899094545 423163520 424258065
+65697000000 65700283797 21899000000 21900094599 424163520 425258119
+65700000000 65703283929 21900000000 21901094643 425163520 426258163
+65703000000 65706284037 21901000000 21902094679 426163520 427258199
+65706000000 65709284248 21902000000 21903094749 427163520 428258269
+65709000000 65712284414 21903000000 21904094804 428163520 429258324
+65712000000 65715284525 21904000000 21905094841 429163520 430258361
+65715000000 65718284685 21905000000 21906094895 430163520 431258415
+65718000000 65721284797 21906000000 21907094932 431163520 432258452
+65721000000 65724284995 21907000000 21908094998 432163520 433258518
+65724000000 65727285085 21908000000 21909095028 433163520 434258548
+65727000000 65730285310 21909000000 21910095103 434163520 435258623
+65730000000 65733285442 21910000000 21911095147 435163520 436258667
+65733000000 65736285581 21911000000 21912095193 436163520 437258713
+65736000000 65739285632 21912000000 21913095210 437163520 438258730
+65739000000 65742285843 21913000000 21914095281 438163520 439258801
+65742000000 65745286052 21914000000 21915095350 439163520 440258870
+65745000000 65748286180 21915000000 21916095393 440163520 441258913
+65748000000 65751286323 21916000000 21917095441 441163520 442258961
+65751000000 65754286494 21917000000 21918095498 442163520 443259018
+65754000000 65757286591 21918000000 21919095530 443163520 444259050
+65757000000 65760286804 21919000000 21920095601 444163520 445259121
+65760000000 65763286934 21920000000 21921095644 445163520 446259164
+65763000000 65766287084 21921000000 21922095694 446163520 447259214
+65766000000 65769287244 21922000000 21923095748 447163520 448259268
+65769000000 65772287340 21923000000 21924095780 448163520 449259300
+65772000000 65775287528 21924000000 21925095842 449163520 450259362
+65775000000 65778287696 21925000000 21926095898 450163520 451259418
+65778000000 65781287832 21926000000 21927095944 451163520 452259464
+65781000000 65784288007 21927000000 21928096002 452163520 453259522
+65784000000 65787288129 21928000000 21929096043 453163520 454259563
+65787000000 65790288279 21929000000 21930096093 454163520 455259613
+65790000000 65793288427 21930000000 21931096142 455163520 456259662
+65793000000 65796288633 21931000000 21932096211 456163520 457259731
+65796000000 65799288747 21932000000 21933096249 457163520 458259769
+65799000000 65802288879 21933000000 21934096293 458163520 459259813
+65802000000 65805289053 21934000000 21935096351 459163520 460259871
+65805000000 65808289172 21935000000 21936096390 460163520 461259910
+65808000000 65811289296 21936000000 21937096432 461163520 462259952
+65811000000 65814289515 21937000000 21938096505 462163520 463260025
+65814000000 65817289651 21938000000 21939096550 463163520 464260070
+65817000000 65820289802 21939000000 21940096600 464163520 465260120
+65820000000 65823289962 21940000000 21941096654 465163520 466260174
+65823000000 65826290083 21941000000 21942096694 466163520 467260214
+65826000000 65829290164 21942000000 21943096721 467163520 468260241
+65829000000 65832290372 21943000000 21944096790 468163520 469260310
+65832000000 65835290527 21944000000 21945096842 469163520 470260362
+65835000000 65838290686 21945000000 21946096895 470163520 471260415
+65838000000 65841290838 21946000000 21947096946 471163520 472260466
+65841000000 65844290960 21947000000 21948096986 472163520 473260506
+65844000000 65847291138 21948000000 21949097046 473163520 474260566
+65847000000 65850291287 21949000000 21950097095 474163520 475260615
+65850000000 65853291415 21950000000 21951097138 475163520 476260658
+65853000000 65856291584 21951000000 21952097194 476163520 477260714
+65856000000 65859291704 21952000000 21953097234 477163520 478260754
+65859000000 65862291631 21953000000 21954097210 478163520 479260730
+65862000000 65865291954 21954000000 21955097318 479163520 480260838
+65865000000 65868292207 21955000000 21956097402 480163520 481260922
+65868000000 65871292317 21956000000 21957097439 481163520 482260959
+65871000000 65874292496 21957000000 21958097498 482163520 483261018
+65874000000 65877292544 21958000000 21959097514 483163520 484261034
+65877000000 65880292798 21959000000 21960097599 484163520 485261119
+65880000000 65883292917 21960000000 21961097639 485163520 486261159
+65883000000 65886293088 21961000000 21962097696 486163520 487261216
+65886000000 65889293235 21962000000 21963097745 487163520 488261265
+65889000000 65892293388 21963000000 21964097796 488163520 489261316
+65892000000 65895293534 21964000000 21965097844 489163520 490261364
+65895000000 65898293678 21965000000 21966097892 490163520 491261412
+65898000000 65901293841 21966000000 21967097947 491163520 492261467
+65901000000 65904293993 21967000000 21968097997 492163520 493261517
+65904000000 65907294147 21968000000 21969098049 493163520 494261569
+65907000000 65910294267 21969000000 21970098089 494163520 495261609
+65910000000 65913294476 21970000000 21971098158 495163520 496261678
+65913000000 65916294606 21971000000 21972098202 496163520 497261722
+65916000000 65919294720 21972000000 21973098240 497163520 498261760
+65919000000 65922294881 21973000000 21974098293 498163520 499261813
+65922000000 65925295016 21974000000 21975098338 499163520 500261858
+65925000000 65928295159 21975000000 21976098386 500163520 501261906
+65928000000 65931295259 21976000000 21977098419 501163520 502261939
+65931000000 65934295493 21977000000 21978098497 502163520 503262017
+65934000000 65937295566 21978000000 21979098522 503163520 504262042
+65937000000 65940295687 21979000000 21980098562 504163520 505262082
+65940000000 65943295876 21980000000 21981098625 505163520 506262145
+65943000000 65946296030 21981000000 21982098676 506163520 507262196
+65946000000 65949296209 21982000000 21983098736 507163520 508262256
+65949000000 65952296355 21983000000 21984098785 508163520 509262305
+65952000000 65955296482 21984000000 21985098827 509163520 510262347
+65955000000 65958296656 21985000000 21986098885 510163520 511262405
+65958000000 65961296720 21986000000 21987098906 511163520 512262426
+65961000000 65964296927 21987000000 21988098975 512163520 513262495
+65964000000 65967297108 21988000000 21989099036 513163520 514262556
+65967000000 65970297257 21989000000 21990099085 514163520 515262605
+65970000000 65973297314 21990000000 21991099104 515163520 516262624
+65973000000 65976297510 21991000000 21992099170 516163520 517262690
+65976000000 65979297700 21992000000 21993099233 517163520 518262753
+65979000000 65982297845 21993000000 21994099281 518163520 519262801
+65982000000 65985298017 21994000000 21995099339 519163520 520262859
+65985000000 65988298150 21995000000 21996099383 520163520 521262903
+65988000000 65991298221 21996000000 21997099407 521163520 522262927
+65991000000 65994298447 21997000000 21998099482 522163520 523263002
+65994000000 65997298607 21998000000 21999099535 523163520 524263055
+65997000000 66000298739 21999000000 22000099579 524163520 525263099
+66000000000 66003298847 22000000000 22001099615 525163520 526263135
+66003000000 66006299058 22001000000 22002099686 526163520 527263206
+66006000000 66009299224 22002000000 22003099741 527163520 528263261
+66009000000 66012299335 22003000000 22004099778 528163520 529263298
+66012000000 66015299495 22004000000 22005099831 529163520 530263351
+66015000000 66018299607 22005000000 22006099869 530163520 531263389
+66018000000 66021299805 22006000000 22007099935 531163520 532263455
+66021000000 66024299895 22007000000 22008099965 532163520 533263485
+66024000000 66027300120 22008000000 22009100040 533163520 534263560
+66027000000 66030300252 22009000000 22010100084 534163520 535263604
+66030000000 66033300391 22010000000 22011100130 535163520 536263650
+66033000000 66036300442 22011000000 22012100147 536163520 537263667
+66036000000 66039300653 22012000000 22013100217 537163520 538263737
+66039000000 66042300862 22013000000 22014100287 538163520 539263807
+66042000000 66045300990 22014000000 22015100330 539163520 540263850
+66045000000 66048301133 22015000000 22016100377 540163520 541263897
+66048000000 66051301304 22016000000 22017100434 541163520 542263954
+66051000000 66054301401 22017000000 22018100467 542163520 543263987
+66054000000 66057301614 22018000000 22019100538 543163520 544264058
+66057000000 66060301744 22019000000 22020100581 544163520 545264101
+66060000000 66063301894 22020000000 22021100631 545163520 546264151
+66063000000 66066302054 22021000000 22022100684 546163520 547264204
+66066000000 66069302150 22022000000 22023100716 547163520 548264236
+66069000000 66072302338 22023000000 22024100779 548163520 549264299
+66072000000 66075302506 22024000000 22025100835 549163520 550264355
+66075000000 66078302642 22025000000 22026100880 550163520 551264400
+66078000000 66081302817 22026000000 22027100939 551163520 552264459
+66081000000 66084302939 22027000000 22028100979 552163520 553264499
+66084000000 66087303089 22028000000 22029101029 553163520 554264549
+66087000000 66090303237 22029000000 22030101079 554163520 555264599
+66090000000 66093303443 22030000000 22031101147 555163520 556264667
+66093000000 66096303557 22031000000 22032101185 556163520 557264705
+66096000000 66099303689 22032000000 22033101229 557163520 558264749
+66099000000 66102303863 22033000000 22034101287 558163520 559264807
+66102000000 66105303982 22034000000 22035101327 559163520 560264847
+66105000000 66108304106 22035000000 22036101368 560163520 561264888
+66108000000 66111304325 22036000000 22037101441 561163520 562264961
+66111000000 66114304461 22037000000 22038101487 562163520 563265007
+66114000000 66117304612 22038000000 22039101537 563163520 564265057
+66117000000 66120304772 22039000000 22040101590 564163520 565265110
+66120000000 66123304893 22040000000 22041101631 565163520 566265151
+66123000000 66126304974 22041000000 22042101658 566163520 567265178
+66126000000 66129305182 22042000000 22043101727 567163520 568265247
+66129000000 66132305337 22043000000 22044101779 568163520 569265299
+66132000000 66135305496 22044000000 22045101832 569163520 570265352
+66135000000 66138305648 22045000000 22046101882 570163520 571265402
+66138000000 66141305770 22046000000 22047101923 571163520 572265443
+66141000000 66144305948 22047000000 22048101982 572163520 573265502
+66144000000 66147306097 22048000000 22049102032 573163520 574265552
+66147000000 66150306225 22049000000 22050102075 574163520 575265595
+66150000000 66153306394 22050000000 22051102131 575163520 576265651
+66153000000 66156306514 22051000000 22052102171 576163520 577265691
+66156000000 66159306441 22052000000 22053102147 577163520 578265667
+66159000000 66162306764 22053000000 22054102254 578163520 579265774
+66162000000 66165307017 22054000000 22055102339 579163520 580265859
+66165000000 66168307127 22055000000 22056102375 580163520 581265895
+66168000000 66171307306 22056000000 22057102435 581163520 582265955
+66171000000 66174307354 22057000000 22058102451 582163520 583265971
+66174000000 66177307608 22058000000 22059102536 583163520 584266056
+66177000000 66180307727 22059000000 22060102575 584163520 585266095
+66180000000 66183307898 22060000000 22061102632 585163520 586266152
+66183000000 66186308045 22061000000 22062102681 586163520 587266201
+66186000000 66189308198 22062000000 22063102732 587163520 588266252
+66189000000 66192308344 22063000000 22064102781 588163520 589266301
+66192000000 66195308488 22064000000 22065102829 589163520 590266349
+66195000000 66198308651 22065000000 22066102883 590163520 591266403
+66198000000 66201308803 22066000000 22067102934 591163520 592266454
+66201000000 66204308957 22067000000 22068102985 592163520 593266505
+66204000000 66207309077 22068000000 22069103025 593163520 594266545
+66207000000 66210309286 22069000000 22070103095 594163520 595266615
+66210000000 66213309416 22070000000 22071103138 595163520 596266658
+66213000000 66216309530 22071000000 22072103176 596163520 597266696
+66216000000 66219309691 22072000000 22073103230 597163520 598266750
+66219000000 66222309826 22073000000 22074103275 598163520 599266795
+66222000000 66225309969 22074000000 22075103323 599163520 600266843
+66225000000 66228310069 22075000000 22076103356 600163520 601266876
+66228000000 66231310303 22076000000 22077103434 601163520 602266954
+66231000000 66234310376 22077000000 22078103458 602163520 603266978
+66234000000 66237310497 22078000000 22079103499 603163520 604267019
+66237000000 66240310686 22079000000 22080103562 604163520 605267082
+66240000000 66243310840 22080000000 22081103613 605163520 606267133
+66243000000 66246311019 22081000000 22082103673 606163520 607267193
+66246000000 66249311165 22082000000 22083103721 607163520 608267241
+66249000000 66252311292 22083000000 22084103764 608163520 609267284
+66252000000 66255311466 22084000000 22085103822 609163520 610267342
+66255000000 66258311530 22085000000 22086103843 610163520 611267363
+66258000000 66261311737 22086000000 22087103912 611163520 612267432
+66261000000 66264311918 22087000000 22088103972 612163520 613267492
+66264000000 66267312067 22088000000 22089104022 613163520 614267542
+66267000000 66270312124 22089000000 22090104041 614163520 615267561
+66270000000 66273312320 22090000000 22091104106 615163520 616267626
+66273000000 66276312510 22091000000 22092104170 616163520 617267690
+66276000000 66279312655 22092000000 22093104218 617163520 618267738
+66279000000 66282312827 22093000000 22094104275 618163520 619267795
+66282000000 66285312960 22094000000 22095104320 619163520 620267840
+66285000000 66288313031 22095000000 22096104343 620163520 621267863
+66288000000 66291313257 22096000000 22097104419 621163520 622267939
+66291000000 66294313417 22097000000 22098104472 622163520 623267992
+66294000000 66297313549 22098000000 22099104516 623163520 624268036
+66297000000 66300313657 22099000000 22100104552 624163520 625268072
+66300000000 66303313868 22100000000 22101104622 625163520 626268142
+66303000000 66306314034 22101000000 22102104678 626163520 627268198
+66306000000 66309314145 22102000000 22103104715 627163520 628268235
+66309000000 66312314305 22103000000 22104104768 628163520 629268288
+66312000000 66315314417 22104000000 22105104805 629163520 630268325
+66315000000 66318314615 22105000000 22106104871 630163520 631268391
+66318000000 66321314705 22106000000 22107104901 631163520 632268421
+66321000000 66324314930 22107000000 22108104976 632163520 633268496
+66324000000 66327315062 22108000000 22109105020 633163520 634268540
+66327000000 66330315201 22109000000 22110105067 634163520 635268587
+66330000000 66333315252 22110000000 22111105084 635163520 636268604
+66333000000 66336315463 22111000000 22112105154 636163520 637268674
+66336000000 66339315672 22112000000 22113105224 637163520 638268744
+66339000000 66342315800 22113000000 22114105266 638163520 639268786
+66342000000 66345315943 22114000000 22115105314 639163520 640268834
+66345000000 66348316114 22115000000 22116105371 640163520 641268891
+66348000000 66351316211 22116000000 22117105403 641163520 642268923
+66351000000 66354316424 22117000000 22118105474 642163520 643268994
+66354000000 66357316554 22118000000 22119105518 643163520 644269038
+66357000000 66360316704 22119000000 22120105568 644163520 645269088
+66360000000 66363316864 22120000000 22121105621 645163520 646269141
+66363000000 66366316960 22121000000 22122105653 646163520 647269173
+66366000000 66369317148 22122000000 22123105716 647163520 648269236
+66369000000 66372317316 22123000000 22124105772 648163520 649269292
+66372000000 66375317452 22124000000 22125105817 649163520 650269337
+66375000000 66378317627 22125000000 22126105875 650163520 651269395
+66378000000 66381317749 22126000000 22127105916 651163520 652269436
+66381000000 66384317899 22127000000 22128105966 652163520 653269486
+66384000000 66387318047 22128000000 22129106015 653163520 654269535
+66387000000 66390318253 22129000000 22130106084 654163520 655269604
+66390000000 66393318367 22130000000 22131106122 655163520 656269642
+66393000000 66396318499 22131000000 22132106166 656163520 657269686
+66396000000 66399318673 22132000000 22133106224 657163520 658269744
+66399000000 66402318792 22133000000 22134106264 658163520 659269784
+66402000000 66405318916 22134000000 22135106305 659163520 660269825
+66405000000 66408319135 22135000000 22136106378 660163520 661269898
+66408000000 66411319271 22136000000 22137106423 661163520 662269943
+66411000000 66414319422 22137000000 22138106474 662163520 663269994
+66414000000 66417319582 22138000000 22139106527 663163520 664270047
+66417000000 66420319703 22139000000 22140106567 664163520 665270087
+66420000000 66423319784 22140000000 22141106594 665163520 666270114
+66423000000 66426319992 22141000000 22142106664 666163520 667270184
+66426000000 66429320147 22142000000 22143106715 667163520 668270235
+66429000000 66432320306 22143000000 22144106768 668163520 669270288
+66432000000 66435320458 22144000000 22145106819 669163520 670270339
+66435000000 66438320580 22145000000 22146106860 670163520 671270380
+66438000000 66441320758 22146000000 22147106919 671163520 672270439
+66441000000 66444320907 22147000000 22148106969 672163520 673270489
+66444000000 66447321035 22148000000 22149107011 673163520 674270531
+66447000000 66450321204 22149000000 22150107068 674163520 675270588
+66450000000 66453321324 22150000000 22151107108 675163520 676270628
+66453000000 66456321251 22151000000 22152107083 676163520 677270603
+66456000000 66459321574 22152000000 22153107191 677163520 678270711
+66459000000 66462321827 22153000000 22154107275 678163520 679270795
+66462000000 66465321937 22154000000 22155107312 679163520 680270832
+66465000000 66468322116 22155000000 22156107372 680163520 681270892
+66468000000 66471322164 22156000000 22157107388 681163520 682270908
+66471000000 66474322418 22157000000 22158107472 682163520 683270992
+66474000000 66477322537 22158000000 22159107512 683163520 684271032
+66477000000 66480322708 22159000000 22160107569 684163520 685271089
+66480000000 66483322855 22160000000 22161107618 685163520 686271138
+66483000000 66486323008 22161000000 22162107669 686163520 687271189
+66486000000 66489323154 22162000000 22163107718 687163520 688271238
+66489000000 66492323298 22163000000 22164107766 688163520 689271286
+66492000000 66495323461 22164000000 22165107820 689163520 690271340
+66495000000 66498323613 22165000000 22166107871 690163520 691271391
+66498000000 66501323767 22166000000 22167107922 691163520 692271442
+66501000000 66504323887 22167000000 22168107962 692163520 693271482
+66504000000 66507324096 22168000000 22169108032 693163520 694271552
+66507000000 66510324226 22169000000 22170108075 694163520 695271595
+66510000000 66513324340 22170000000 22171108113 695163520 696271633
+66513000000 66516324501 22171000000 22172108167 696163520 697271687
+66516000000 66519324636 22172000000 22173108212 697163520 698271732
+66519000000 66522324779 22173000000 22174108259 698163520 699271779
+66522000000 66525324879 22174000000 22175108293 699163520 700271813
+66525000000 66528325113 22175000000 22176108371 700163520 701271891
+66528000000 66531325186 22176000000 22177108395 701163520 702271915
+66531000000 66534325307 22177000000 22178108435 702163520 703271955
+66534000000 66537325496 22178000000 22179108498 703163520 704272018
+66537000000 66540325650 22179000000 22180108550 704163520 705272070
+66540000000 66543325829 22180000000 22181108609 705163520 706272129
+66543000000 66546325975 22181000000 22182108658 706163520 707272178
+66546000000 66549326102 22182000000 22183108700 707163520 708272220
+66549000000 66552326276 22183000000 22184108758 708163520 709272278
+66552000000 66555326340 22184000000 22185108780 709163520 710272300
+66555000000 66558326547 22185000000 22186108849 710163520 711272369
+66558000000 66561326728 22186000000 22187108909 711163520 712272429
+66561000000 66564326877 22187000000 22188108959 712163520 713272479
+66564000000 66567326934 22188000000 22189108978 713163520 714272498
+66567000000 66570327130 22189000000 22190109043 714163520 715272563
+66570000000 66573327320 22190000000 22191109106 715163520 716272626
+66573000000 66576327465 22191000000 22192109155 716163520 717272675
+66576000000 66579327637 22192000000 22193109212 717163520 718272732
+66579000000 66582327770 22193000000 22194109256 718163520 719272776
+66582000000 66585327841 22194000000 22195109280 719163520 720272800
+66585000000 66588328067 22195000000 22196109355 720163520 721272875
+66588000000 66591328227 22196000000 22197109409 721163520 722272929
+66591000000 66594328359 22197000000 22198109453 722163520 723272973
+66594000000 66597328467 22198000000 22199109489 723163520 724273009
+66597000000 66600328678 22199000000 22200109559 724163520 725273079
+66600000000 66603328844 22200000000 22201109614 725163520 726273134
+66603000000 66606328955 22201000000 22202109651 726163520 727273171
+66606000000 66609329115 22202000000 22203109705 727163520 728273225
+66609000000 66612329227 22203000000 22204109742 728163520 729273262
+66612000000 66615329425 22204000000 22205109808 729163520 730273328
+66615000000 66618329515 22205000000 22206109838 730163520 731273358
+66618000000 66621329740 22206000000 22207109913 731163520 732273433
+66621000000 66624329872 22207000000 22208109957 732163520 733273477
+66624000000 66627330011 22208000000 22209110003 733163520 734273523
+66627000000 66630330062 22209000000 22210110020 734163520 735273540
+66630000000 66633330273 22210000000 22211110091 735163520 736273611
+66633000000 66636330482 22211000000 22212110160 736163520 737273680
+66636000000 66639330610 22212000000 22213110203 737163520 738273723
+66639000000 66642330753 22213000000 22214110251 738163520 739273771
+66642000000 66645330924 22214000000 22215110308 739163520 740273828
+66645000000 66648331021 22215000000 22216110340 740163520 741273860
+66648000000 66651331234 22216000000 22217110411 741163520 742273931
+66651000000 66654331364 22217000000 22218110454 742163520 743273974
+66654000000 66657331514 22218000000 22219110504 743163520 744274024
+66657000000 66660331674 22219000000 22220110558 744163520 745274078
+66660000000 66663331770 22220000000 22221110590 745163520 746274110
+66663000000 66666331958 22221000000 22222110652 746163520 747274172
+66666000000 66669332126 22222000000 22223110708 747163520 748274228
+66669000000 66672332262 22223000000 22224110754 748163520 749274274
+66672000000 66675332437 22224000000 22225110812 749163520 750274332
+66675000000 66678332559 22225000000 22226110853 750163520 751274373
+66678000000 66681332709 22226000000 22227110903 751163520 752274423
+66681000000 66684332857 22227000000 22228110952 752163520 753274472
+66684000000 66687333063 22228000000 22229111021 753163520 754274541
+66687000000 66690333177 22229000000 22230111059 754163520 755274579
+66690000000 66693333309 22230000000 22231111103 755163520 756274623
+66693000000 66696333483 22231000000 22232111161 756163520 757274681
+66696000000 66699333602 22232000000 22233111200 757163520 758274720
+66699000000 66702333726 22233000000 22234111242 758163520 759274762
+66702000000 66705333945 22234000000 22235111315 759163520 760274835
+66705000000 66708334081 22235000000 22236111360 760163520 761274880
+66708000000 66711334232 22236000000 22237111410 761163520 762274930
+66711000000 66714334392 22237000000 22238111464 762163520 763274984
+66714000000 66717334513 22238000000 22239111504 763163520 764275024
+66717000000 66720334594 22239000000 22240111531 764163520 765275051
+66720000000 66723334802 22240000000 22241111600 765163520 766275120
+66723000000 66726334957 22241000000 22242111652 766163520 767275172
+66726000000 66729335116 22242000000 22243111705 767163520 768275225
+66729000000 66732335268 22243000000 22244111756 768163520 769275276
+66732000000 66735335390 22244000000 22245111796 769163520 770275316
+66735000000 66738335568 22245000000 22246111856 770163520 771275376
+66738000000 66741335717 22246000000 22247111905 771163520 772275425
+66741000000 66744335845 22247000000 22248111948 772163520 773275468
+66744000000 66747336014 22248000000 22249112004 773163520 774275524
+66747000000 66750336134 22249000000 22250112044 774163520 775275564
+66750000000 66753336061 22250000000 22251112020 775163520 776275540
+66753000000 66756336384 22251000000 22252112128 776163520 777275648
+66756000000 66759336637 22252000000 22253112212 777163520 778275732
+66759000000 66762336747 22253000000 22254112249 778163520 779275769
+66762000000 66765336926 22254000000 22255112308 779163520 780275828
+66765000000 66768336974 22255000000 22256112324 780163520 781275844
+66768000000 66771337228 22256000000 22257112409 781163520 782275929
+66771000000 66774337347 22257000000 22258112449 782163520 783275969
+66774000000 66777337518 22258000000 22259112506 783163520 784276026
+66777000000 66780337665 22259000000 22260112555 784163520 785276075
+66780000000 66783337818 22260000000 22261112606 785163520 786276126
+66783000000 66786337964 22261000000 22262112654 786163520 787276174
+66786000000 66789338108 22262000000 22263112702 787163520 788276222
+66789000000 66792338271 22263000000 22264112757 788163520 789276277
+66792000000 66795338423 22264000000 22265112807 789163520 790276327
+66795000000 66798338577 22265000000 22266112859 790163520 791276379
+66798000000 66801338697 22266000000 22267112899 791163520 792276419
+66801000000 66804338906 22267000000 22268112968 792163520 793276488
+66804000000 66807339036 22268000000 22269113012 793163520 794276532
+66807000000 66810339150 22269000000 22270113050 794163520 795276570
+66810000000 66813339311 22270000000 22271113103 795163520 796276623
+66813000000 66816339446 22271000000 22272113148 796163520 797276668
+66816000000 66819339589 22272000000 22273113196 797163520 798276716
+66819000000 66822339689 22273000000 22274113229 798163520 799276749
+66822000000 66825339923 22274000000 22275113307 799163520 800276827
+66825000000 66828339996 22275000000 22276113332 800163520 801276852
+66828000000 66831340117 22276000000 22277113372 801163520 802276892
+66831000000 66834340306 22277000000 22278113435 802163520 803276955
+66834000000 66837340460 22278000000 22279113486 803163520 804277006
+66837000000 66840340639 22279000000 22280113546 804163520 805277066
+66840000000 66843340785 22280000000 22281113595 805163520 806277115
+66843000000 66846340912 22281000000 22282113637 806163520 807277157
+66846000000 66849341086 22282000000 22283113695 807163520 808277215
+66849000000 66852341150 22283000000 22284113716 808163520 809277236
+66852000000 66855341357 22284000000 22285113785 809163520 810277305
+66855000000 66858341538 22285000000 22286113846 810163520 811277366
+66858000000 66861341687 22286000000 22287113895 811163520 812277415
+66861000000 66864341744 22287000000 22288113914 812163520 813277434
+66864000000 66867341940 22288000000 22289113980 813163520 814277500
+66867000000 66870342130 22289000000 22290114043 814163520 815277563
+66870000000 66873342275 22290000000 22291114091 815163520 816277611
+66873000000 66876342447 22291000000 22292114149 816163520 817277669
+66876000000 66879342580 22292000000 22293114193 817163520 818277713
+66879000000 66882342651 22293000000 22294114217 818163520 819277737
+66882000000 66885342877 22294000000 22295114292 819163520 820277812
+66885000000 66888343037 22295000000 22296114345 820163520 821277865
+66888000000 66891343169 22296000000 22297114389 821163520 822277909
+66891000000 66894343277 22297000000 22298114425 822163520 823277945
+66894000000 66897343488 22298000000 22299114496 823163520 824278016
+66897000000 66900343654 22299000000 22300114551 824163520 825278071
+66900000000 66903343765 22300000000 22301114588 825163520 826278108
+66903000000 66906343925 22301000000 22302114641 826163520 827278161
+66906000000 66909344037 22302000000 22303114679 827163520 828278199
+66909000000 66912344235 22303000000 22304114745 828163520 829278265
+66912000000 66915344325 22304000000 22305114775 829163520 830278295
+66915000000 66918344550 22305000000 22306114850 830163520 831278370
+66918000000 66921344682 22306000000 22307114894 831163520 832278414
+66921000000 66924344821 22307000000 22308114940 832163520 833278460
+66924000000 66927344872 22308000000 22309114957 833163520 834278477
+66927000000 66930345083 22309000000 22310115027 834163520 835278547
+66930000000 66933345292 22310000000 22311115097 835163520 836278617
+66933000000 66936345420 22311000000 22312115140 836163520 837278660
+66936000000 66939345563 22312000000 22313115187 837163520 838278707
+66939000000 66942345734 22313000000 22314115244 838163520 839278764
+66942000000 66945345831 22314000000 22315115277 839163520 840278797
+66945000000 66948346044 22315000000 22316115348 840163520 841278868
+66948000000 66951346174 22316000000 22317115391 841163520 842278911
+66951000000 66954346324 22317000000 22318115441 842163520 843278961
+66954000000 66957346484 22318000000 22319115494 843163520 844279014
+66957000000 66960346580 22319000000 22320115526 844163520 845279046
+66960000000 66963346768 22320000000 22321115589 845163520 846279109
+66963000000 66966346936 22321000000 22322115645 846163520 847279165
+66966000000 66969347072 22322000000 22323115690 847163520 848279210
+66969000000 66972347247 22323000000 22324115749 848163520 849279269
+66972000000 66975347369 22324000000 22325115789 849163520 850279309
+66975000000 66978347519 22325000000 22326115839 850163520 851279359
+66978000000 66981347667 22326000000 22327115889 851163520 852279409
+66981000000 66984347873 22327000000 22328115957 852163520 853279477
+66984000000 66987347987 22328000000 22329115995 853163520 854279515
+66987000000 66990348119 22329000000 22330116039 854163520 855279559
+66990000000 66993348293 22330000000 22331116097 855163520 856279617
+66993000000 66996348412 22331000000 22332116137 856163520 857279657
+66996000000 66999348536 22332000000 22333116178 857163520 858279698
+66999000000 67002348755 22333000000 22334116251 858163520 859279771
+67002000000 67005348891 22334000000 22335116297 859163520 860279817
+67005000000 67008349042 22335000000 22336116347 860163520 861279867
+67008000000 67011349202 22336000000 22337116400 861163520 862279920
+67011000000 67014349323 22337000000 22338116441 862163520 863279961
+67014000000 67017349404 22338000000 22339116468 863163520 864279988
+67017000000 67020349612 22339000000 22340116537 864163520 865280057
+67020000000 67023349767 22340000000 22341116589 865163520 866280109
+67023000000 67026349926 22341000000 22342116642 866163520 867280162
+67026000000 67029350078 22342000000 22343116692 867163520 868280212
+67029000000 67032350200 22343000000 22344116733 868163520 869280253
+67032000000 67035350378 22344000000 22345116792 869163520 870280312
+67035000000 67038350527 22345000000 22346116842 870163520 871280362
+67038000000 67041350655 22346000000 22347116885 871163520 872280405
+67041000000 67044350824 22347000000 22348116941 872163520 873280461
+67044000000 67047350944 22348000000 22349116981 873163520 874280501
+67047000000 67050350871 22349000000 22350116957 874163520 875280477
+67050000000 67053351194 22350000000 22351117064 875163520 876280584
+67053000000 67056351447 22351000000 22352117149 876163520 877280669
+67056000000 67059351557 22352000000 22353117185 877163520 878280705
+67059000000 67062351736 22353000000 22354117245 878163520 879280765
+67062000000 67065351784 22354000000 22355117261 879163520 880280781
+67065000000 67068352038 22355000000 22356117346 880163520 881280866
+67068000000 67071352157 22356000000 22357117385 881163520 882280905
+67071000000 67074352328 22357000000 22358117442 882163520 883280962
+67074000000 67077352475 22358000000 22359117491 883163520 884281011
+67077000000 67080352628 22359000000 22360117542 884163520 885281062
+67080000000 67083352774 22360000000 22361117591 885163520 886281111
+67083000000 67086352918 22361000000 22362117639 886163520 887281159
+67086000000 67089353081 22362000000 22363117693 887163520 888281213
+67089000000 67092353233 22363000000 22364117744 888163520 889281264
+67092000000 67095353387 22364000000 22365117795 889163520 890281315
+67095000000 67098353507 22365000000 22366117835 890163520 891281355
+67098000000 67101353716 22366000000 22367117905 891163520 892281425
+67101000000 67104353846 22367000000 22368117948 892163520 893281468
+67104000000 67107353960 22368000000 22369117986 893163520 894281506
+67107000000 67110354121 22369000000 22370118040 894163520 895281560
+67110000000 67113354256 22370000000 22371118085 895163520 896281605
+67113000000 67116354399 22371000000 22372118133 896163520 897281653
+67116000000 67119354499 22372000000 22373118166 897163520 898281686
+67119000000 67122354733 22373000000 22374118244 898163520 899281764
+67122000000 67125354806 22374000000 22375118268 899163520 900281788
+67125000000 67128354927 22375000000 22376118309 900163520 901281829
+67128000000 67131355116 22376000000 22377118372 901163520 902281892
+67131000000 67134355270 22377000000 22378118423 902163520 903281943
+67134000000 67137355449 22378000000 22379118483 903163520 904282003
+67137000000 67140355595 22379000000 22380118531 904163520 905282051
+67140000000 67143355722 22380000000 22381118574 905163520 906282094
+67143000000 67146355896 22381000000 22382118632 906163520 907282152
+67146000000 67149355960 22382000000 22383118653 907163520 908282173
+67149000000 67152356167 22383000000 22384118722 908163520 909282242
+67152000000 67155356348 22384000000 22385118782 909163520 910282302
+67155000000 67158356497 22385000000 22386118832 910163520 911282352
+67158000000 67161356554 22386000000 22387118851 911163520 912282371
+67161000000 67164356750 22387000000 22388118916 912163520 913282436
+67164000000 67167356940 22388000000 22389118980 913163520 914282500
+67167000000 67170357085 22389000000 22390119028 914163520 915282548
+67170000000 67173357257 22390000000 22391119085 915163520 916282605
+67173000000 67176357390 22391000000 22392119130 916163520 917282650
+67176000000 67179357461 22392000000 22393119153 917163520 918282673
+67179000000 67182357687 22393000000 22394119229 918163520 919282749
+67182000000 67185357847 22394000000 22395119282 919163520 920282802
+67185000000 67188357979 22395000000 22396119326 920163520 921282846
+67188000000 67191358087 22396000000 22397119362 921163520 922282882
+67191000000 67194358298 22397000000 22398119432 922163520 923282952
+67194000000 67197358464 22398000000 22399119488 923163520 924283008
+67197000000 67200358575 22399000000 22400119525 924163520 925283045
+67200000000 67203358735 22400000000 22401119578 925163520 926283098
+67203000000 67206358847 22401000000 22402119615 926163520 927283135
+67206000000 67209359045 22402000000 22403119681 927163520 928283201
+67209000000 67212359135 22403000000 22404119711 928163520 929283231
+67212000000 67215359360 22404000000 22405119786 929163520 930283306
+67215000000 67218359492 22405000000 22406119830 930163520 931283350
+67218000000 67221359631 22406000000 22407119877 931163520 932283397
+67221000000 67224359682 22407000000 22408119894 932163520 933283414
+67224000000 67227359893 22408000000 22409119964 933163520 934283484
+67227000000 67230360102 22409000000 22410120034 934163520 935283554
+67230000000 67233360230 22410000000 22411120076 935163520 936283596
+67233000000 67236360373 22411000000 22412120124 936163520 937283644
+67236000000 67239360544 22412000000 22413120181 937163520 938283701
+67239000000 67242360641 22413000000 22414120213 938163520 939283733
+67242000000 67245360854 22414000000 22415120284 939163520 940283804
+67245000000 67248360984 22415000000 22416120328 940163520 941283848
+67248000000 67251361134 22416000000 22417120378 941163520 942283898
+67251000000 67254361294 22417000000 22418120431 942163520 943283951
+67254000000 67257361390 22418000000 22419120463 943163520 944283983
+67257000000 67260361578 22419000000 22420120526 944163520 945284046
+67260000000 67263361746 22420000000 22421120582 945163520 946284102
+67263000000 67266361882 22421000000 22422120627 946163520 947284147
+67266000000 67269362057 22422000000 22423120685 947163520 948284205
+67269000000 67272362179 22423000000 22424120726 948163520 949284246
+67272000000 67275362329 22424000000 22425120776 949163520 950284296
+67275000000 67278362477 22425000000 22426120825 950163520 951284345
+67278000000 67281362683 22426000000 22427120894 951163520 952284414
+67281000000 67284362797 22427000000 22428120932 952163520 953284452
+67284000000 67287362929 22428000000 22429120976 953163520 954284496
+67287000000 67290363103 22429000000 22430121034 954163520 955284554
+67290000000 67293363222 22430000000 22431121074 955163520 956284594
+67293000000 67296363346 22431000000 22432121115 956163520 957284635
+67296000000 67299363565 22432000000 22433121188 957163520 958284708
+67299000000 67302363701 22433000000 22434121233 958163520 959284753
+67302000000 67305363852 22434000000 22435121284 959163520 960284804
+67305000000 67308364012 22435000000 22436121337 960163520 961284857
+67308000000 67311364133 22436000000 22437121377 961163520 962284897
+67311000000 67314364214 22437000000 22438121404 962163520 963284924
+67314000000 67317364422 22438000000 22439121474 963163520 964284994
+67317000000 67320364577 22439000000 22440121525 964163520 965285045
+67320000000 67323364736 22440000000 22441121578 965163520 966285098
+67323000000 67326364888 22441000000 22442121629 966163520 967285149
+67326000000 67329365010 22442000000 22443121670 967163520 968285190
+67329000000 67332365188 22443000000 22444121729 968163520 969285249
+67332000000 67335365337 22444000000 22445121779 969163520 970285299
+67335000000 67338365465 22445000000 22446121821 970163520 971285341
+67338000000 67341365634 22446000000 22447121878 971163520 972285398
+67341000000 67344365754 22447000000 22448121918 972163520 973285438
+67344000000 67347365681 22448000000 22449121893 973163520 974285413
+67347000000 67350366004 22449000000 22450122001 974163520 975285521
+67350000000 67353366257 22450000000 22451122085 975163520 976285605
+67353000000 67356366367 22451000000 22452122122 976163520 977285642
+67356000000 67359366546 22452000000 22453122182 977163520 978285702
+67359000000 67362366594 22453000000 22454122198 978163520 979285718
+67362000000 67365366848 22454000000 22455122282 979163520 980285802
+67365000000 67368366967 22455000000 22456122322 980163520 981285842
+67368000000 67371367138 22456000000 22457122379 981163520 982285899
+67371000000 67374367285 22457000000 22458122428 982163520 983285948
+67374000000 67377367438 22458000000 22459122479 983163520 984285999
+67377000000 67380367584 22459000000 22460122528 984163520 985286048
+67380000000 67383367728 22460000000 22461122576 985163520 986286096
+67383000000 67386367891 22461000000 22462122630 986163520 987286150
+67386000000 67389368043 22462000000 22463122681 987163520 988286201
+67389000000 67392368197 22463000000 22464122732 988163520 989286252
+67392000000 67395368317 22464000000 22465122772 989163520 990286292
+67395000000 67398368526 22465000000 22466122842 990163520 991286362
+67398000000 67401368656 22466000000 22467122885 991163520 992286405
+67401000000 67404368770 22467000000 22468122923 992163520 993286443
+67404000000 67407368931 22468000000 22469122977 993163520 994286497
+67407000000 67410369066 22469000000 22470123022 994163520 995286542
+67410000000 67413369209 22470000000 22471123069 995163520 996286589
+67413000000 67416369309 22471000000 22472123103 996163520 997286623
+67416000000 67419369543 22472000000 22473123181 997163520 998286701
+67419000000 67422369616 22473000000 22474123205 998163520 999286725
+67422000000 67425369737 22474000000 22475123245 999163520 1000286765
+67425000000 67428369926 22475000000 22476123308 1000163520 1001286828
+67428000000 67431370080 22476000000 22477123360 1001163520 1002286880
+67431000000 67434370259 22477000000 22478123419 1002163520 1003286939
+67434000000 67437370405 22478000000 22479123468 1003163520 1004286988
+67437000000 67440370532 22479000000 22480123510 1004163520 1005287030
+67440000000 67443370706 22480000000 22481123568 1005163520 1006287088
+67443000000 67446370770 22481000000 22482123590 1006163520 1007287110
+67446000000 67449370977 22482000000 22483123659 1007163520 1008287179
+67449000000 67452371158 22483000000 22484123719 1008163520 1009287239
+67452000000 67455371307 22484000000 22485123769 1009163520 1010287289
+67455000000 67458371364 22485000000 22486123788 1010163520 1011287308
+67458000000 67461371560 22486000000 22487123853 1011163520 1012287373
+67461000000 67464371750 22487000000 22488123916 1012163520 1013287436
+67464000000 67467371895 22488000000 22489123965 1013163520 1014287485
+67467000000 67470372067 22489000000 22490124022 1014163520 1015287542
+67470000000 67473372200 22490000000 22491124066 1015163520 1016287586
+67473000000 67476372271 22491000000 22492124090 1016163520 1017287610
+67476000000 67479372497 22492000000 22493124165 1017163520 1018287685
+67479000000 67482372657 22493000000 22494124219 1018163520 1019287739
+67482000000 67485372789 22494000000 22495124263 1019163520 1020287783
+67485000000 67488372897 22495000000 22496124299 1020163520 1021287819
+67488000000 67491373108 22496000000 22497124369 1021163520 1022287889
+67491000000 67494373274 22497000000 22498124424 1022163520 1023287944
+67494000000 67497373385 22498000000 22499124461 1023163520 1024287981
+67497000000 67500373545 22499000000 22500124515 1024163520 1025288035
+67500000000 67503373657 22500000000 22501124552 1025163520 1026288072
+67503000000 67506373855 22501000000 22502124618 1026163520 1027288138
+67506000000 67509373945 22502000000 22503124648 1027163520 1028288168
+67509000000 67512374170 22503000000 22504124723 1028163520 1029288243
+67512000000 67515374302 22504000000 22505124767 1029163520 1030288287
+67515000000 67518374441 22505000000 22506124813 1030163520 1031288333
+67518000000 67521374492 22506000000 22507124830 1031163520 1032288350
+67521000000 67524374703 22507000000 22508124901 1032163520 1033288421
+67524000000 67527374912 22508000000 22509124970 1033163520 1034288490
+67527000000 67530375040 22509000000 22510125013 1034163520 1035288533
+67530000000 67533375183 22510000000 22511125061 1035163520 1036288581
+67533000000 67536375354 22511000000 22512125118 1036163520 1037288638
+67536000000 67539375451 22512000000 22513125150 1037163520 1038288670
+67539000000 67542375664 22513000000 22514125221 1038163520 1039288741
+67542000000 67545375794 22514000000 22515125264 1039163520 1040288784
+67545000000 67548375944 22515000000 22516125314 1040163520 1041288834
+67548000000 67551376104 22516000000 22517125368 1041163520 1042288888
+67551000000 67554376200 22517000000 22518125400 1042163520 1043288920
+67554000000 67557376388 22518000000 22519125462 1043163520 1044288982
+67557000000 67560376556 22519000000 22520125518 1044163520 1045289038
+67560000000 67563376692 22520000000 22521125564 1045163520 1046289084
+67563000000 67566376867 22521000000 22522125622 1046163520 1047289142
+67566000000 67569376989 22522000000 22523125663 1047163520 1048289183
+67569000000 67572377139 22523000000 22524125713 1048163520 1049289233
+67572000000 67575377287 22524000000 22525125762 1049163520 1050289282
+67575000000 67578377493 22525000000 22526125831 1050163520 1051289351
+67578000000 67581377607 22526000000 22527125869 1051163520 1052289389
+67581000000 67584377739 22527000000 22528125913 1052163520 1053289433
+67584000000 67587377913 22528000000 22529125971 1053163520 1054289491
+67587000000 67590378032 22529000000 22530126010 1054163520 1055289530
+67590000000 67593378156 22530000000 22531126052 1055163520 1056289572
+67593000000 67596378375 22531000000 22532126125 1056163520 1057289645
+67596000000 67599378511 22532000000 22533126170 1057163520 1058289690
+67599000000 67602378662 22533000000 22534126220 1058163520 1059289740
+67602000000 67605378822 22534000000 22535126274 1059163520 1060289794
+67605000000 67608378943 22535000000 22536126314 1060163520 1061289834
+67608000000 67611379024 22536000000 22537126341 1061163520 1062289861
+67611000000 67614379232 22537000000 22538126410 1062163520 1063289930
+67614000000 67617379387 22538000000 22539126462 1063163520 1064289982
+67617000000 67620379546 22539000000 22540126515 1064163520 1065290035
+67620000000 67623379698 22540000000 22541126566 1065163520 1066290086
+67623000000 67626379820 22541000000 22542126606 1066163520 1067290126
+67626000000 67629379998 22542000000 22543126666 1067163520 1068290186
+67629000000 67632380147 22543000000 22544126715 1068163520 1069290235
+67632000000 67635380275 22544000000 22545126758 1069163520 1070290278
+67635000000 67638380444 22545000000 22546126814 1070163520 1071290334
+67638000000 67641380564 22546000000 22547126854 1071163520 1072290374
+67641000000 67644380491 22547000000 22548126830 1072163520 1073290350
+67644000000 67647380814 22548000000 22549126938 1073163520 1074290458
+67647000000 67650381067 22549000000 22550127022 1074163520 1075290542
+67650000000 67653381177 22550000000 22551127059 1075163520 1076290579
+67653000000 67656381356 22551000000 22552127118 1076163520 1077290638
+67656000000 67659381404 22552000000 22553127134 1077163520 1078290654
+67659000000 67662381658 22553000000 22554127219 1078163520 1079290739
+67662000000 67665381777 22554000000 22555127259 1079163520 1080290779
+67665000000 67668381948 22555000000 22556127316 1080163520 1081290836
+67668000000 67671382095 22556000000 22557127365 1081163520 1082290885
+67671000000 67674382248 22557000000 22558127416 1082163520 1083290936
+67674000000 67677382394 22558000000 22559127464 1083163520 1084290984
+67677000000 67680382538 22559000000 22560127512 1084163520 1085291032
+67680000000 67683382701 22560000000 22561127567 1085163520 1086291087
+67683000000 67686382853 22561000000 22562127617 1086163520 1087291137
+67686000000 67689383007 22562000000 22563127669 1087163520 1088291189
+67689000000 67692383127 22563000000 22564127709 1088163520 1089291229
+67692000000 67695383336 22564000000 22565127778 1089163520 1090291298
+67695000000 67698383466 22565000000 22566127822 1090163520 1091291342
+67698000000 67701383580 22566000000 22567127860 1091163520 1092291380
+67701000000 67704383741 22567000000 22568127913 1092163520 1093291433
+67704000000 67707383876 22568000000 22569127958 1093163520 1094291478
+67707000000 67710384019 22569000000 22570128006 1094163520 1095291526
+67710000000 67713384119 22570000000 22571128039 1095163520 1096291559
+67713000000 67716384353 22571000000 22572128117 1096163520 1097291637
+67716000000 67719384426 22572000000 22573128142 1097163520 1098291662
+67719000000 67722384547 22573000000 22574128182 1098163520 1099291702
+67722000000 67725384736 22574000000 22575128245 1099163520 1100291765
+67725000000 67728384890 22575000000 22576128296 1100163520 1101291816
+67728000000 67731385069 22576000000 22577128356 1101163520 1102291876
+67731000000 67734385215 22577000000 22578128405 1102163520 1103291925
+67734000000 67737385342 22578000000 22579128447 1103163520 1104291967
+67737000000 67740385516 22579000000 22580128505 1104163520 1105292025
+67740000000 67743385580 22580000000 22581128526 1105163520 1106292046
+67743000000 67746385787 22581000000 22582128595 1106163520 1107292115
+67746000000 67749385968 22582000000 22583128656 1107163520 1108292176
+67749000000 67752386117 22583000000 22584128705 1108163520 1109292225
+67752000000 67755386174 22584000000 22585128724 1109163520 1110292244
+67755000000 67758386370 22585000000 22586128790 1110163520 1111292310
+67758000000 67761386560 22586000000 22587128853 1111163520 1112292373
+67761000000 67764386705 22587000000 22588128901 1112163520 1113292421
+67764000000 67767386877 22588000000 22589128959 1113163520 1114292479
+67767000000 67770387010 22589000000 22590129003 1114163520 1115292523
+67770000000 67773387081 22590000000 22591129027 1115163520 1116292547
+67773000000 67776387307 22591000000 22592129102 1116163520 1117292622
+67776000000 67779387467 22592000000 22593129155 1117163520 1118292675
+67779000000 67782387599 22593000000 22594129199 1118163520 1119292719
+67782000000 67785387707 22594000000 22595129235 1119163520 1120292755
+67785000000 67788387918 22595000000 22596129306 1120163520 1121292826
+67788000000 67791388084 22596000000 22597129361 1121163520 1122292881
+67791000000 67794388195 22597000000 22598129398 1122163520 1123292918
+67794000000 67797388355 22598000000 22599129451 1123163520 1124292971
+67797000000 67800388467 22599000000 22600129489 1124163520 1125293009
+67800000000 67803388665 22600000000 22601129555 1125163520 1126293075
+67803000000 67806388755 22601000000 22602129585 1126163520 1127293105
+67806000000 67809388980 22602000000 22603129660 1127163520 1128293180
+67809000000 67812389112 22603000000 22604129704 1128163520 1129293224
+67812000000 67815389251 22604000000 22605129750 1129163520 1130293270
+67815000000 67818389302 22605000000 22606129767 1130163520 1131293287
+67818000000 67821389513 22606000000 22607129837 1131163520 1132293357
+67821000000 67824389722 22607000000 22608129907 1132163520 1133293427
+67824000000 67827389850 22608000000 22609129950 1133163520 1134293470
+67827000000 67830389993 22609000000 22610129997 1134163520 1135293517
+67830000000 67833390164 22610000000 22611130054 1135163520 1136293574
+67833000000 67836390261 22611000000 22612130087 1136163520 1137293607
+67836000000 67839390474 22612000000 22613130158 1137163520 1138293678
+67839000000 67842390604 22613000000 22614130201 1138163520 1139293721
+67842000000 67845390754 22614000000 22615130251 1139163520 1140293771
+67845000000 67848390914 22615000000 22616130304 1140163520 1141293824
+67848000000 67851391010 22616000000 22617130336 1141163520 1142293856
+67851000000 67854391198 22617000000 22618130399 1142163520 1143293919
+67854000000 67857391366 22618000000 22619130455 1143163520 1144293975
+67857000000 67860391502 22619000000 22620130500 1144163520 1145294020
+67860000000 67863391677 22620000000 22621130559 1145163520 1146294079
+67863000000 67866391799 22621000000 22622130599 1146163520 1147294119
+67866000000 67869391949 22622000000 22623130649 1147163520 1148294169
+67869000000 67872392097 22623000000 22624130699 1148163520 1149294219
+67872000000 67875392303 22624000000 22625130767 1149163520 1150294287
+67875000000 67878392417 22625000000 22626130805 1150163520 1151294325
+67878000000 67881392549 22626000000 22627130849 1151163520 1152294369
+67881000000 67884392723 22627000000 22628130907 1152163520 1153294427
+67884000000 67887392842 22628000000 22629130947 1153163520 1154294467
+67887000000 67890392966 22629000000 22630130988 1154163520 1155294508
+67890000000 67893393185 22630000000 22631131061 1155163520 1156294581
+67893000000 67896393321 22631000000 22632131107 1156163520 1157294627
+67896000000 67899393472 22632000000 22633131157 1157163520 1158294677
+67899000000 67902393632 22633000000 22634131210 1158163520 1159294730
+67902000000 67905393753 22634000000 22635131251 1159163520 1160294771
+67905000000 67908393834 22635000000 22636131278 1160163520 1161294798
+67908000000 67911394042 22636000000 22637131347 1161163520 1162294867
+67911000000 67914394197 22637000000 22638131399 1162163520 1163294919
+67914000000 67917394356 22638000000 22639131452 1163163520 1164294972
+67917000000 67920394508 22639000000 22640131502 1164163520 1165295022
+67920000000 67923394630 22640000000 22641131543 1165163520 1166295063
+67923000000 67926394808 22641000000 22642131602 1166163520 1167295122
+67926000000 67929394957 22642000000 22643131652 1167163520 1168295172
+67929000000 67932395085 22643000000 22644131695 1168163520 1169295215
+67932000000 67935395254 22644000000 22645131751 1169163520 1170295271
+67935000000 67938395374 22645000000 22646131791 1170163520 1171295311
+67938000000 67941395301 22646000000 22647131767 1171163520 1172295287
+67941000000 67944395624 22647000000 22648131874 1172163520 1173295394
+67944000000 67947395877 22648000000 22649131959 1173163520 1174295479
+67947000000 67950395987 22649000000 22650131995 1174163520 1175295515
+67950000000 67953396166 22650000000 22651132055 1175163520 1176295575
+67953000000 67956396214 22651000000 22652132071 1176163520 1177295591
+67956000000 67959396468 22652000000 22653132156 1177163520 1178295676
+67959000000 67962396587 22653000000 22654132195 1178163520 1179295715
+67962000000 67965396758 22654000000 22655132252 1179163520 1180295772
+67965000000 67968396905 22655000000 22656132301 1180163520 1181295821
+67968000000 67971397058 22656000000 22657132352 1181163520 1182295872
+67971000000 67974397204 22657000000 22658132401 1182163520 1183295921
+67974000000 67977397348 22658000000 22659132449 1183163520 1184295969
+67977000000 67980397511 22659000000 22660132503 1184163520 1185296023
+67980000000 67983397663 22660000000 22661132554 1185163520 1186296074
+67983000000 67986397817 22661000000 22662132605 1186163520 1187296125
+67986000000 67989397937 22662000000 22663132645 1187163520 1188296165
+67989000000 67992398146 22663000000 22664132715 1188163520 1189296235
+67992000000 67995398276 22664000000 22665132758 1189163520 1190296278
+67995000000 67998398390 22665000000 22666132796 1190163520 1191296316
+67998000000 68001398551 22666000000 22667132850 1191163520 1192296370
+68001000000 68004398686 22667000000 22668132895 1192163520 1193296415
+68004000000 68007398829 22668000000 22669132943 1193163520 1194296463
+68007000000 68010398929 22669000000 22670132976 1194163520 1195296496
+68010000000 68013399163 22670000000 22671133054 1195163520 1196296574
+68013000000 68016399236 22671000000 22672133078 1196163520 1197296598
+68016000000 68019399357 22672000000 22673133119 1197163520 1198296639
+68019000000 68022399546 22673000000 22674133182 1198163520 1199296702
+68022000000 68025399700 22674000000 22675133233 1199163520 1200296753
+68025000000 68028399879 22675000000 22676133293 1200163520 1201296813
+68028000000 68031400025 22676000000 22677133341 1201163520 1202296861
+68031000000 68034400152 22677000000 22678133384 1202163520 1203296904
+68034000000 68037400326 22678000000 22679133442 1203163520 1204296962
+68037000000 68040400390 22679000000 22680133463 1204163520 1205296983
+68040000000 68043400597 22680000000 22681133532 1205163520 1206297052
+68043000000 68046400778 22681000000 22682133592 1206163520 1207297112
+68046000000 68049400927 22682000000 22683133642 1207163520 1208297162
+68049000000 68052400984 22683000000 22684133661 1208163520 1209297181
+68052000000 68055401180 22684000000 22685133726 1209163520 1210297246
+68055000000 68058401370 22685000000 22686133790 1210163520 1211297310
+68058000000 68061401515 22686000000 22687133838 1211163520 1212297358
+68061000000 68064401687 22687000000 22688133895 1212163520 1213297415
+68064000000 68067401820 22688000000 22689133940 1213163520 1214297460
+68067000000 68070401891 22689000000 22690133963 1214163520 1215297483
+68070000000 68073402117 22690000000 22691134039 1215163520 1216297559
+68073000000 68076402277 22691000000 22692134092 1216163520 1217297612
+68076000000 68079402409 22692000000 22693134136 1217163520 1218297656
+68079000000 68082402517 22693000000 22694134172 1218163520 1219297692
+68082000000 68085402728 22694000000 22695134242 1219163520 1220297762
+68085000000 68088402894 22695000000 22696134298 1220163520 1221297818
+68088000000 68091403005 22696000000 22697134335 1221163520 1222297855
+68091000000 68094403165 22697000000 22698134388 1222163520 1223297908
+68094000000 68097403277 22698000000 22699134425 1223163520 1224297945
+68097000000 68100403475 22699000000 22700134491 1224163520 1225298011
+68100000000 68103403565 22700000000 22701134521 1225163520 1226298041
+68103000000 68106403790 22701000000 22702134596 1226163520 1227298116
+68106000000 68109403922 22702000000 22703134640 1227163520 1228298160
+68109000000 68112404061 22703000000 22704134687 1228163520 1229298207
+68112000000 68115404112 22704000000 22705134704 1229163520 1230298224
+68115000000 68118404323 22705000000 22706134774 1230163520 1231298294
+68118000000 68121404532 22706000000 22707134844 1231163520 1232298364
+68121000000 68124404660 22707000000 22708134886 1232163520 1233298406
+68124000000 68127404803 22708000000 22709134934 1233163520 1234298454
+68127000000 68130404974 22709000000 22710134991 1234163520 1235298511
+68130000000 68133405071 22710000000 22711135023 1235163520 1236298543
+68133000000 68136405284 22711000000 22712135094 1236163520 1237298614
+68136000000 68139405414 22712000000 22713135138 1237163520 1238298658
+68139000000 68142405564 22713000000 22714135188 1238163520 1239298708
+68142000000 68145405724 22714000000 22715135241 1239163520 1240298761
+68145000000 68148405820 22715000000 22716135273 1240163520 1241298793
+68148000000 68151406008 22716000000 22717135336 1241163520 1242298856
+68151000000 68154406176 22717000000 22718135392 1242163520 1243298912
+68154000000 68157406312 22718000000 22719135437 1243163520 1244298957
+68157000000 68160406487 22719000000 22720135495 1244163520 1245299015
+68160000000 68163406609 22720000000 22721135536 1245163520 1246299056
+68163000000 68166406759 22721000000 22722135586 1246163520 1247299106
+68166000000 68169406907 22722000000 22723135635 1247163520 1248299155
+68169000000 68172407113 22723000000 22724135704 1248163520 1249299224
+68172000000 68175407227 22724000000 22725135742 1249163520 1250299262
+68175000000 68178407359 22725000000 22726135786 1250163520 1251299306
+68178000000 68181407533 22726000000 22727135844 1251163520 1252299364
+68181000000 68184407652 22727000000 22728135884 1252163520 1253299404
+68184000000 68187407776 22728000000 22729135925 1253163520 1254299445
+68187000000 68190407995 22729000000 22730135998 1254163520 1255299518
+68190000000 68193408131 22730000000 22731136043 1255163520 1256299563
+68193000000 68196408282 22731000000 22732136094 1256163520 1257299614
+68196000000 68199408442 22732000000 22733136147 1257163520 1258299667
+68199000000 68202408563 22733000000 22734136187 1258163520 1259299707
+68202000000 68205408644 22734000000 22735136214 1259163520 1260299734
+68205000000 68208408852 22735000000 22736136284 1260163520 1261299804
+68208000000 68211409007 22736000000 22737136335 1261163520 1262299855
+68211000000 68214409166 22737000000 22738136388 1262163520 1263299908
+68214000000 68217409318 22738000000 22739136439 1263163520 1264299959
+68217000000 68220409440 22739000000 22740136480 1264163520 1265300000
+68220000000 68223409618 22740000000 22741136539 1265163520 1266300059
+68223000000 68226409767 22741000000 22742136589 1266163520 1267300109
+68226000000 68229409895 22742000000 22743136631 1267163520 1268300151
+68229000000 68232410064 22743000000 22744136688 1268163520 1269300208
+68232000000 68235410184 22744000000 22745136728 1269163520 1270300248
+68235000000 68238410111 22745000000 22746136703 1270163520 1271300223
+68238000000 68241410434 22746000000 22747136811 1271163520 1272300331
+68241000000 68244410687 22747000000 22748136895 1272163520 1273300415
+68244000000 68247410797 22748000000 22749136932 1273163520 1274300452
+68247000000 68250410976 22749000000 22750136992 1274163520 1275300512
+68250000000 68253411024 22750000000 22751137008 1275163520 1276300528
+68253000000 68256411278 22751000000 22752137092 1276163520 1277300612
+68256000000 68259411397 22752000000 22753137132 1277163520 1278300652
+68259000000 68262411568 22753000000 22754137189 1278163520 1279300709
+68262000000 68265411715 22754000000 22755137238 1279163520 1280300758
+68265000000 68268411868 22755000000 22756137289 1280163520 1281300809
+68268000000 68271412014 22756000000 22757137338 1281163520 1282300858
+68271000000 68274412158 22757000000 22758137386 1282163520 1283300906
+68274000000 68277412321 22758000000 22759137440 1283163520 1284300960
+68277000000 68280412473 22759000000 22760137491 1284163520 1285301011
+68280000000 68283412627 22760000000 22761137542 1285163520 1286301062
+68283000000 68286412747 22761000000 22762137582 1286163520 1287301102
+68286000000 68289412956 22762000000 22763137652 1287163520 1288301172
+68289000000 68292413086 22763000000 22764137695 1288163520 1289301215
+68292000000 68295413200 22764000000 22765137733 1289163520 1290301253
+68295000000 68298413361 22765000000 22766137787 1290163520 1291301307
+68298000000 68301413496 22766000000 22767137832 1291163520 1292301352
+68301000000 68304413639 22767000000 22768137879 1292163520 1293301399
+68304000000 68307413739 22768000000 22769137913 1293163520 1294301433
+68307000000 68310413973 22769000000 22770137991 1294163520 1295301511
+68310000000 68313414046 22770000000 22771138015 1295163520 1296301535
+68313000000 68316414167 22771000000 22772138055 1296163520 1297301575
+68316000000 68319414356 22772000000 22773138118 1297163520 1298301638
+68319000000 68322414510 22773000000 22774138170 1298163520 1299301690
+68322000000 68325414689 22774000000 22775138229 1299163520 1300301749
+68325000000 68328414835 22775000000 22776138278 1300163520 1301301798
+68328000000 68331414962 22776000000 22777138320 1301163520 1302301840
+68331000000 68334415136 22777000000 22778138378 1302163520 1303301898
+68334000000 68337415200 22778000000 22779138400 1303163520 1304301920
+68337000000 68340415407 22779000000 22780138469 1304163520 1305301989
+68340000000 68343415588 22780000000 22781138529 1305163520 1306302049
+68343000000 68346415737 22781000000 22782138579 1306163520 1307302099
+68346000000 68349415794 22782000000 22783138598 1307163520 1308302118
+68349000000 68352415990 22783000000 22784138663 1308163520 1309302183
+68352000000 68355416180 22784000000 22785138726 1309163520 1310302246
+68355000000 68358416325 22785000000 22786138775 1310163520 1311302295
+68358000000 68361416497 22786000000 22787138832 1311163520 1312302352
+68361000000 68364416630 22787000000 22788138876 1312163520 1313302396
+68364000000 68367416701 22788000000 22789138900 1313163520 1314302420
+68367000000 68370416927 22789000000 22790138975 1314163520 1315302495
+68370000000 68373417087 22790000000 22791139029 1315163520 1316302549
+68373000000 68376417219 22791000000 22792139073 1316163520 1317302593
+68376000000 68379417327 22792000000 22793139109 1317163520 1318302629
+68379000000 68382417538 22793000000 22794139179 1318163520 1319302699
+68382000000 68385417704 22794000000 22795139234 1319163520 1320302754
+68385000000 68388417815 22795000000 22796139271 1320163520 1321302791
+68388000000 68391417975 22796000000 22797139325 1321163520 1322302845
+68391000000 68394418087 22797000000 22798139362 1322163520 1323302882
+68394000000 68397418285 22798000000 22799139428 1323163520 1324302948
+68397000000 68400418375 22799000000 22800139458 1324163520 1325302978
+68400000000 68403418600 22800000000 22801139533 1325163520 1326303053
+68403000000 68406418732 22801000000 22802139577 1326163520 1327303097
+68406000000 68409418871 22802000000 22803139623 1327163520 1328303143
+68409000000 68412418922 22803000000 22804139640 1328163520 1329303160
+68412000000 68415419133 22804000000 22805139711 1329163520 1330303231
+68415000000 68418419342 22805000000 22806139780 1330163520 1331303300
+68418000000 68421419470 22806000000 22807139823 1331163520 1332303343
+68421000000 68424419613 22807000000 22808139871 1332163520 1333303391
+68424000000 68427419784 22808000000 22809139928 1333163520 1334303448
+68427000000 68430419881 22809000000 22810139960 1334163520 1335303480
+68430000000 68433420094 22810000000 22811140031 1335163520 1336303551
+68433000000 68436420224 22811000000 22812140074 1336163520 1337303594
+68436000000 68439420374 22812000000 22813140124 1337163520 1338303644
+68439000000 68442420534 22813000000 22814140178 1338163520 1339303698
+68442000000 68445420630 22814000000 22815140210 1339163520 1340303730
+68445000000 68448420818 22815000000 22816140272 1340163520 1341303792
+68448000000 68451420986 22816000000 22817140328 1341163520 1342303848
+68451000000 68454421122 22817000000 22818140374 1342163520 1343303894
+68454000000 68457421297 22818000000 22819140432 1343163520 1344303952
+68457000000 68460421419 22819000000 22820140473 1344163520 1345303993
+68460000000 68463421569 22820000000 22821140523 1345163520 1346304043
+68463000000 68466421717 22821000000 22822140572 1346163520 1347304092
+68466000000 68469421923 22822000000 22823140641 1347163520 1348304161
+68469000000 68472422037 22823000000 22824140679 1348163520 1349304199
+68472000000 68475422169 22824000000 22825140723 1349163520 1350304243
+68475000000 68478422343 22825000000 22826140781 1350163520 1351304301
+68478000000 68481422462 22826000000 22827140820 1351163520 1352304340
+68481000000 68484422586 22827000000 22828140862 1352163520 1353304382
+68484000000 68487422805 22828000000 22829140935 1353163520 1354304455
+68487000000 68490422941 22829000000 22830140980 1354163520 1355304500
+68490000000 68493423092 22830000000 22831141030 1355163520 1356304550
+68493000000 68496423252 22831000000 22832141084 1356163520 1357304604
+68496000000 68499423373 22832000000 22833141124 1357163520 1358304644
+68499000000 68502423454 22833000000 22834141151 1358163520 1359304671
+68502000000 68505423662 22834000000 22835141220 1359163520 1360304740
+68505000000 68508423817 22835000000 22836141272 1360163520 1361304792
+68508000000 68511423976 22836000000 22837141325 1361163520 1362304845
+68511000000 68514424128 22837000000 22838141376 1362163520 1363304896
+68514000000 68517424250 22838000000 22839141416 1363163520 1364304936
+68517000000 68520424428 22839000000 22840141476 1364163520 1365304996
+68520000000 68523424577 22840000000 22841141525 1365163520 1366305045
+68523000000 68526424705 22841000000 22842141568 1366163520 1367305088
+68526000000 68529424874 22842000000 22843141624 1367163520 1368305144
+68529000000 68532424994 22843000000 22844141664 1368163520 1369305184
+68532000000 68535424921 22844000000 22845141640 1369163520 1370305160
+68535000000 68538425244 22845000000 22846141748 1370163520 1371305268
+68538000000 68541425497 22846000000 22847141832 1371163520 1372305352
+68541000000 68544425607 22847000000 22848141869 1372163520 1373305389
+68544000000 68547425786 22848000000 22849141928 1373163520 1374305448
+68547000000 68550425834 22849000000 22850141944 1374163520 1375305464
+68550000000 68553426088 22850000000 22851142029 1375163520 1376305549
+68553000000 68556426207 22851000000 22852142069 1376163520 1377305589
+68556000000 68559426378 22852000000 22853142126 1377163520 1378305646
+68559000000 68562426525 22853000000 22854142175 1378163520 1379305695
+68562000000 68565426678 22854000000 22855142226 1379163520 1380305746
+68565000000 68568426824 22855000000 22856142274 1380163520 1381305794
+68568000000 68571426968 22856000000 22857142322 1381163520 1382305842
+68571000000 68574427131 22857000000 22858142377 1382163520 1383305897
+68574000000 68577427283 22858000000 22859142427 1383163520 1384305947
+68577000000 68580427437 22859000000 22860142479 1384163520 1385305999
+68580000000 68583427557 22860000000 22861142519 1385163520 1386306039
+68583000000 68586427766 22861000000 22862142588 1386163520 1387306108
+68586000000 68589427896 22862000000 22863142632 1387163520 1388306152
+68589000000 68592428010 22863000000 22864142670 1388163520 1389306190
+68592000000 68595428171 22864000000 22865142723 1389163520 1390306243
+68595000000 68598428306 22865000000 22866142768 1390163520 1391306288
+68598000000 68601428449 22866000000 22867142816 1391163520 1392306336
+68601000000 68604428549 22867000000 22868142849 1392163520 1393306369
+68604000000 68607428783 22868000000 22869142927 1393163520 1394306447
+68607000000 68610428856 22869000000 22870142952 1394163520 1395306472
+68610000000 68613428977 22870000000 22871142992 1395163520 1396306512
+68613000000 68616429166 22871000000 22872143055 1396163520 1397306575
+68616000000 68619429320 22872000000 22873143106 1397163520 1398306626
+68619000000 68622429499 22873000000 22874143166 1398163520 1399306686
+68622000000 68625429645 22874000000 22875143215 1399163520 1400306735
+68625000000 68628429772 22875000000 22876143257 1400163520 1401306777
+68628000000 68631429946 22876000000 22877143315 1401163520 1402306835
+68631000000 68634430010 22877000000 22878143336 1402163520 1403306856
+68634000000 68637430217 22878000000 22879143405 1403163520 1404306925
+68637000000 68640430398 22879000000 22880143466 1404163520 1405306986
+68640000000 68643430547 22880000000 22881143515 1405163520 1406307035
+68643000000 68646430604 22881000000 22882143534 1406163520 1407307054
+68646000000 68649430800 22882000000 22883143600 1407163520 1408307120
+68649000000 68652430990 22883000000 22884143663 1408163520 1409307183
+68652000000 68655431135 22884000000 22885143711 1409163520 1410307231
+68655000000 68658431307 22885000000 22886143769 1410163520 1411307289
+68658000000 68661431440 22886000000 22887143813 1411163520 1412307333
+68661000000 68664431511 22887000000 22888143837 1412163520 1413307357
+68664000000 68667431737 22888000000 22889143912 1413163520 1414307432
+68667000000 68670431897 22889000000 22890143965 1414163520 1415307485
+68670000000 68673432029 22890000000 22891144009 1415163520 1416307529
+68673000000 68676432137 22891000000 22892144045 1416163520 1417307565
+68676000000 68679432348 22892000000 22893144116 1417163520 1418307636
+68679000000 68682432514 22893000000 22894144171 1418163520 1419307691
+68682000000 68685432625 22894000000 22895144208 1419163520 1420307728
+68685000000 68688432785 22895000000 22896144261 1420163520 1421307781
+68688000000 68691432897 22896000000 22897144299 1421163520 1422307819
+68691000000 68694433095 22897000000 22898144365 1422163520 1423307885
+68694000000 68697433185 22898000000 22899144395 1423163520 1424307915
+68697000000 68700433410 22899000000 22900144470 1424163520 1425307990
+68700000000 68703433542 22900000000 22901144514 1425163520 1426308034
+68703000000 68706433681 22901000000 22902144560 1426163520 1427308080
+68706000000 68709433732 22902000000 22903144577 1427163520 1428308097
+68709000000 68712433943 22903000000 22904144647 1428163520 1429308167
+68712000000 68715434152 22904000000 22905144717 1429163520 1430308237
+68715000000 68718434280 22905000000 22906144760 1430163520 1431308280
+68718000000 68721434423 22906000000 22907144807 1431163520 1432308327
+68721000000 68724434594 22907000000 22908144864 1432163520 1433308384
+68724000000 68727434691 22908000000 22909144897 1433163520 1434308417
+68727000000 68730434904 22909000000 22910144968 1434163520 1435308488
+68730000000 68733435034 22910000000 22911145011 1435163520 1436308531
+68733000000 68736435184 22911000000 22912145061 1436163520 1437308581
+68736000000 68739435344 22912000000 22913145114 1437163520 1438308634
+68739000000 68742435440 22913000000 22914145146 1438163520 1439308666
+68742000000 68745435628 22914000000 22915145209 1439163520 1440308729
+68745000000 68748435796 22915000000 22916145265 1440163520 1441308785
+68748000000 68751435932 22916000000 22917145310 1441163520 1442308830
+68751000000 68754436107 22917000000 22918145369 1442163520 1443308889
+68754000000 68757436229 22918000000 22919145409 1443163520 1444308929
+68757000000 68760436379 22919000000 22920145459 1444163520 1445308979
+68760000000 68763436527 22920000000 22921145509 1445163520 1446309029
+68763000000 68766436733 22921000000 22922145577 1446163520 1447309097
+68766000000 68769436847 22922000000 22923145615 1447163520 1448309135
+68769000000 68772436979 22923000000 22924145659 1448163520 1449309179
+68772000000 68775437153 22924000000 22925145717 1449163520 1450309237
+68775000000 68778437272 22925000000 22926145757 1450163520 1451309277
+68778000000 68781437396 22926000000 22927145798 1451163520 1452309318
+68781000000 68784437615 22927000000 22928145871 1452163520 1453309391
+68784000000 68787437751 22928000000 22929145917 1453163520 1454309437
+68787000000 68790437902 22929000000 22930145967 1454163520 1455309487
+68790000000 68793438062 22930000000 22931146020 1455163520 1456309540
+68793000000 68796438183 22931000000 22932146061 1456163520 1457309581
+68796000000 68799438264 22932000000 22933146088 1457163520 1458309608
+68799000000 68802438472 22933000000 22934146157 1458163520 1459309677
+68802000000 68805438627 22934000000 22935146209 1459163520 1460309729
+68805000000 68808438786 22935000000 22936146262 1460163520 1461309782
+68808000000 68811438938 22936000000 22937146312 1461163520 1462309832
+68811000000 68814439060 22937000000 22938146353 1462163520 1463309873
+68814000000 68817439238 22938000000 22939146412 1463163520 1464309932
+68817000000 68820439387 22939000000 22940146462 1464163520 1465309982
+68820000000 68823439515 22940000000 22941146505 1465163520 1466310025
+68823000000 68826439684 22941000000 22942146561 1466163520 1467310081
+68826000000 68829439804 22942000000 22943146601 1467163520 1468310121
+68829000000 68832439731 22943000000 22944146577 1468163520 1469310097
+68832000000 68835440054 22944000000 22945146684 1469163520 1470310204
+68835000000 68838440307 22945000000 22946146769 1470163520 1471310289
+68838000000 68841440417 22946000000 22947146805 1471163520 1472310325
+68841000000 68844440596 22947000000 22948146865 1472163520 1473310385
+68844000000 68847440644 22948000000 22949146881 1473163520 1474310401
+68847000000 68850440898 22949000000 22950146966 1474163520 1475310486
+68850000000 68853441017 22950000000 22951147005 1475163520 1476310525
+68853000000 68856441188 22951000000 22952147062 1476163520 1477310582
+68856000000 68859441335 22952000000 22953147111 1477163520 1478310631
+68859000000 68862441488 22953000000 22954147162 1478163520 1479310682
+68862000000 68865441634 22954000000 22955147211 1479163520 1480310731
+68865000000 68868441778 22955000000 22956147259 1480163520 1481310779
+68868000000 68871441941 22956000000 22957147313 1481163520 1482310833
+68871000000 68874442093 22957000000 22958147364 1482163520 1483310884
+68874000000 68877442247 22958000000 22959147415 1483163520 1484310935
+68877000000 68880442367 22959000000 22960147455 1484163520 1485310975
+68880000000 68883442576 22960000000 22961147525 1485163520 1486311045
+68883000000 68886442706 22961000000 22962147568 1486163520 1487311088
+68886000000 68889442820 22962000000 22963147606 1487163520 1488311126
+68889000000 68892442981 22963000000 22964147660 1488163520 1489311180
+68892000000 68895443116 22964000000 22965147705 1489163520 1490311225
+68895000000 68898443259 22965000000 22966147753 1490163520 1491311273
+68898000000 68901443359 22966000000 22967147786 1491163520 1492311306
+68901000000 68904443593 22967000000 22968147864 1492163520 1493311384
+68904000000 68907443666 22968000000 22969147888 1493163520 1494311408
+68907000000 68910443787 22969000000 22970147929 1494163520 1495311449
+68910000000 68913443976 22970000000 22971147992 1495163520 1496311512
+68913000000 68916444130 22971000000 22972148043 1496163520 1497311563
+68916000000 68919444309 22972000000 22973148103 1497163520 1498311623
+68919000000 68922444455 22973000000 22974148151 1498163520 1499311671
+68922000000 68925444582 22974000000 22975148194 1499163520 1500311714
+68925000000 68928444756 22975000000 22976148252 1500163520 1501311772
+68928000000 68931444820 22976000000 22977148273 1501163520 1502311793
+68931000000 68934445027 22977000000 22978148342 1502163520 1503311862
+68934000000 68937445208 22978000000 22979148402 1503163520 1504311922
+68937000000 68940445357 22979000000 22980148452 1504163520 1505311972
+68940000000 68943445414 22980000000 22981148471 1505163520 1506311991
+68943000000 68946445610 22981000000 22982148536 1506163520 1507312056
+68946000000 68949445800 22982000000 22983148600 1507163520 1508312120
+68949000000 68952445945 22983000000 22984148648 1508163520 1509312168
+68952000000 68955446117 22984000000 22985148705 1509163520 1510312225
+68955000000 68958446250 22985000000 22986148750 1510163520 1511312270
+68958000000 68961446321 22986000000 22987148773 1511163520 1512312293
+68961000000 68964446547 22987000000 22988148849 1512163520 1513312369
+68964000000 68967446707 22988000000 22989148902 1513163520 1514312422
+68967000000 68970446839 22989000000 22990148946 1514163520 1515312466
+68970000000 68973446947 22990000000 22991148982 1515163520 1516312502
+68973000000 68976447158 22991000000 22992149052 1516163520 1517312572
+68976000000 68979447324 22992000000 22993149108 1517163520 1518312628
+68979000000 68982447435 22993000000 22994149145 1518163520 1519312665
+68982000000 68985447595 22994000000 22995149198 1519163520 1520312718
+68985000000 68988447707 22995000000 22996149235 1520163520 1521312755
+68988000000 68991447905 22996000000 22997149301 1521163520 1522312821
+68991000000 68994447995 22997000000 22998149331 1522163520 1523312851
+68994000000 68997448220 22998000000 22999149406 1523163520 1524312926
+68997000000 69000448352 22999000000 23000149450 1524163520 1525312970
+69000000000 69003448491 23000000000 23001149497 1525163520 1526313017
+69003000000 69006448542 23001000000 23002149514 1526163520 1527313034
+69006000000 69009448753 23002000000 23003149584 1527163520 1528313104
+69009000000 69012448962 23003000000 23004149654 1528163520 1529313174
+69012000000 69015449090 23004000000 23005149696 1529163520 1530313216
+69015000000 69018449233 23005000000 23006149744 1530163520 1531313264
+69018000000 69021449404 23006000000 23007149801 1531163520 1532313321
+69021000000 69024449501 23007000000 23008149833 1532163520 1533313353
+69024000000 69027449714 23008000000 23009149904 1533163520 1534313424
+69027000000 69030449844 23009000000 23010149948 1534163520 1535313468
+69030000000 69033449994 23010000000 23011149998 1535163520 1536313518
+69033000000 69036450154 23011000000 23012150051 1536163520 1537313571
+69036000000 69039450250 23012000000 23013150083 1537163520 1538313603
+69039000000 69042450438 23013000000 23014150146 1538163520 1539313666
+69042000000 69045450606 23014000000 23015150202 1539163520 1540313722
+69045000000 69048450742 23015000000 23016150247 1540163520 1541313767
+69048000000 69051450917 23016000000 23017150305 1541163520 1542313825
+69051000000 69054451039 23017000000 23018150346 1542163520 1543313866
+69054000000 69057451189 23018000000 23019150396 1543163520 1544313916
+69057000000 69060451337 23019000000 23020150445 1544163520 1545313965
+69060000000 69063451543 23020000000 23021150514 1545163520 1546314034
+69063000000 69066451657 23021000000 23022150552 1546163520 1547314072
+69066000000 69069451789 23022000000 23023150596 1547163520 1548314116
+69069000000 69072451963 23023000000 23024150654 1548163520 1549314174
+69072000000 69075452082 23024000000 23025150694 1549163520 1550314214
+69075000000 69078452206 23025000000 23026150735 1550163520 1551314255
+69078000000 69081452425 23026000000 23027150808 1551163520 1552314328
+69081000000 69084452561 23027000000 23028150853 1552163520 1553314373
+69084000000 69087452712 23028000000 23029150904 1553163520 1554314424
+69087000000 69090452872 23029000000 23030150957 1554163520 1555314477
+69090000000 69093452993 23030000000 23031150997 1555163520 1556314517
+69093000000 69096453074 23031000000 23032151024 1556163520 1557314544
+69096000000 69099453282 23032000000 23033151094 1557163520 1558314614
+69099000000 69102453437 23033000000 23034151145 1558163520 1559314665
+69102000000 69105453596 23034000000 23035151198 1559163520 1560314718
+69105000000 69108453748 23035000000 23036151249 1560163520 1561314769
+69108000000 69111453870 23036000000 23037151290 1561163520 1562314810
+69111000000 69114454048 23037000000 23038151349 1562163520 1563314869
+69114000000 69117454197 23038000000 23039151399 1563163520 1564314919
+69117000000 69120454325 23039000000 23040151441 1564163520 1565314961
+69120000000 69123454494 23040000000 23041151498 1565163520 1566315018
+69123000000 69126454614 23041000000 23042151538 1566163520 1567315058
+69126000000 69129454541 23042000000 23043151513 1567163520 1568315033
+69129000000 69132454864 23043000000 23044151621 1568163520 1569315141
+69132000000 69135455117 23044000000 23045151705 1569163520 1570315225
+69135000000 69138455227 23045000000 23046151742 1570163520 1571315262
+69138000000 69141455406 23046000000 23047151802 1571163520 1572315322
+69141000000 69144455454 23047000000 23048151818 1572163520 1573315338
+69144000000 69147455708 23048000000 23049151902 1573163520 1574315422
+69147000000 69150455827 23049000000 23050151942 1574163520 1575315462
+69150000000 69153455998 23050000000 23051151999 1575163520 1576315519
+69153000000 69156456145 23051000000 23052152048 1576163520 1577315568
+69156000000 69159456298 23052000000 23053152099 1577163520 1578315619
+69159000000 69162456444 23053000000 23054152148 1578163520 1579315668
+69162000000 69165456588 23054000000 23055152196 1579163520 1580315716
+69165000000 69168456751 23055000000 23056152250 1580163520 1581315770
+69168000000 69171456903 23056000000 23057152301 1581163520 1582315821
+69171000000 69174457057 23057000000 23058152352 1582163520 1583315872
+69174000000 69177457177 23058000000 23059152392 1583163520 1584315912
+69177000000 69180457386 23059000000 23060152462 1584163520 1585315982
+69180000000 69183457516 23060000000 23061152505 1585163520 1586316025
+69183000000 69186457630 23061000000 23062152543 1586163520 1587316063
+69186000000 69189457791 23062000000 23063152597 1587163520 1588316117
+69189000000 69192457926 23063000000 23064152642 1588163520 1589316162
+69192000000 69195458069 23064000000 23065152689 1589163520 1590316209
+69195000000 69198458169 23065000000 23066152723 1590163520 1591316243
+69198000000 69201458403 23066000000 23067152801 1591163520 1592316321
+69201000000 69204458476 23067000000 23068152825 1592163520 1593316345
+69204000000 69207458597 23068000000 23069152865 1593163520 1594316385
+69207000000 69210458786 23069000000 23070152928 1594163520 1595316448
+69210000000 69213458940 23070000000 23071152980 1595163520 1596316500
+69213000000 69216459119 23071000000 23072153039 1596163520 1597316559
+69216000000 69219459265 23072000000 23073153088 1597163520 1598316608
+69219000000 69222459392 23073000000 23074153130 1598163520 1599316650
+69222000000 69225459566 23074000000 23075153188 1599163520 1600316708
+69225000000 69228459630 23075000000 23076153210 1600163520 1601316730
+69228000000 69231459837 23076000000 23077153279 1601163520 1602316799
+69231000000 69234460018 23077000000 23078153339 1602163520 1603316859
+69234000000 69237460167 23078000000 23079153389 1603163520 1604316909
+69237000000 69240460224 23079000000 23080153408 1604163520 1605316928
+69240000000 69243460420 23080000000 23081153473 1605163520 1606316993
+69243000000 69246460610 23081000000 23082153536 1606163520 1607317056
+69246000000 69249460755 23082000000 23083153585 1607163520 1608317105
+69249000000 69252460927 23083000000 23084153642 1608163520 1609317162
+69252000000 69255461060 23084000000 23085153686 1609163520 1610317206
+69255000000 69258461131 23085000000 23086153710 1610163520 1611317230
+69258000000 69261461357 23086000000 23087153785 1611163520 1612317305
+69261000000 69264461517 23087000000 23088153839 1612163520 1613317359
+69264000000 69267461649 23088000000 23089153883 1613163520 1614317403
+69267000000 69270461757 23089000000 23090153919 1614163520 1615317439
+69270000000 69273461968 23090000000 23091153989 1615163520 1616317509
+69273000000 69276462134 23091000000 23092154044 1616163520 1617317564
+69276000000 69279462245 23092000000 23093154081 1617163520 1618317601
+69279000000 69282462405 23093000000 23094154135 1618163520 1619317655
+69282000000 69285462517 23094000000 23095154172 1619163520 1620317692
+69285000000 69288462715 23095000000 23096154238 1620163520 1621317758
+69288000000 69291462805 23096000000 23097154268 1621163520 1622317788
+69291000000 69294463030 23097000000 23098154343 1622163520 1623317863
+69294000000 69297463162 23098000000 23099154387 1623163520 1624317907
+69297000000 69300463301 23099000000 23100154433 1624163520 1625317953
+69300000000 69303463352 23100000000 23101154450 1625163520 1626317970
+69303000000 69306463563 23101000000 23102154521 1626163520 1627318041
+69306000000 69309463772 23102000000 23103154590 1627163520 1628318110
+69309000000 69312463900 23103000000 23104154633 1628163520 1629318153
+69312000000 69315464043 23104000000 23105154681 1629163520 1630318201
+69315000000 69318464214 23105000000 23106154738 1630163520 1631318258
+69318000000 69321464311 23106000000 23107154770 1631163520 1632318290
+69321000000 69324464524 23107000000 23108154841 1632163520 1633318361
+69324000000 69327464654 23108000000 23109154884 1633163520 1634318404
+69327000000 69330464804 23109000000 23110154934 1634163520 1635318454
+69330000000 69333464964 23110000000 23111154988 1635163520 1636318508
+69333000000 69336465060 23111000000 23112155020 1636163520 1637318540
+69336000000 69339465248 23112000000 23113155082 1637163520 1638318602
+69339000000 69342465416 23113000000 23114155138 1638163520 1639318658
+69342000000 69345465552 23114000000 23115155184 1639163520 1640318704
+69345000000 69348465727 23115000000 23116155242 1640163520 1641318762
+69348000000 69351465849 23116000000 23117155283 1641163520 1642318803
+69351000000 69354465999 23117000000 23118155333 1642163520 1643318853
+69354000000 69357466147 23118000000 23119155382 1643163520 1644318902
+69357000000 69360466353 23119000000 23120155451 1644163520 1645318971
+69360000000 69363466467 23120000000 23121155489 1645163520 1646319009
+69363000000 69366466599 23121000000 23122155533 1646163520 1647319053
+69366000000 69369466773 23122000000 23123155591 1647163520 1648319111
+69369000000 69372466892 23123000000 23124155630 1648163520 1649319150
+69372000000 69375467016 23124000000 23125155672 1649163520 1650319192
+69375000000 69378467235 23125000000 23126155745 1650163520 1651319265
+69378000000 69381467371 23126000000 23127155790 1651163520 1652319310
+69381000000 69384467522 23127000000 23128155840 1652163520 1653319360
+69384000000 69387467682 23128000000 23129155894 1653163520 1654319414
+69387000000 69390467803 23129000000 23130155934 1654163520 1655319454
+69390000000 69393467884 23130000000 23131155961 1655163520 1656319481
+69393000000 69396468092 23131000000 23132156030 1656163520 1657319550
+69396000000 69399468247 23132000000 23133156082 1657163520 1658319602
+69399000000 69402468406 23133000000 23134156135 1658163520 1659319655
+69402000000 69405468558 23134000000 23135156186 1659163520 1660319706
+69405000000 69408468680 23135000000 23136156226 1660163520 1661319746
+69408000000 69411468858 23136000000 23137156286 1661163520 1662319806
+69411000000 69414469007 23137000000 23138156335 1662163520 1663319855
+69414000000 69417469135 23138000000 23139156378 1663163520 1664319898
+69417000000 69420469304 23139000000 23140156434 1664163520 1665319954
+69420000000 69423469424 23140000000 23141156474 1665163520 1666319994
+69423000000 69426469351 23141000000 23142156450 1666163520 1667319970
+69426000000 69429469674 23142000000 23143156558 1667163520 1668320078
+69429000000 69432469927 23143000000 23144156642 1668163520 1669320162
+69432000000 69435470037 23144000000 23145156679 1669163520 1670320199
+69435000000 69438470216 23145000000 23146156738 1670163520 1671320258
+69438000000 69441470264 23146000000 23147156754 1671163520 1672320274
+69441000000 69444470518 23147000000 23148156839 1672163520 1673320359
+69444000000 69447470637 23148000000 23149156879 1673163520 1674320399
+69447000000 69450470808 23149000000 23150156936 1674163520 1675320456
+69450000000 69453470955 23150000000 23151156985 1675163520 1676320505
+69453000000 69456471108 23151000000 23152157036 1676163520 1677320556
+69456000000 69459471254 23152000000 23153157084 1677163520 1678320604
+69459000000 69462471398 23153000000 23154157132 1678163520 1679320652
+69462000000 69465471561 23154000000 23155157187 1679163520 1680320707
+69465000000 69468471713 23155000000 23156157237 1680163520 1681320757
+69468000000 69471471867 23156000000 23157157289 1681163520 1682320809
+69471000000 69474471987 23157000000 23158157329 1682163520 1683320849
+69474000000 69477472196 23158000000 23159157398 1683163520 1684320918
+69477000000 69480472326 23159000000 23160157442 1684163520 1685320962
+69480000000 69483472440 23160000000 23161157480 1685163520 1686321000
+69483000000 69486472601 23161000000 23162157533 1686163520 1687321053
+69486000000 69489472736 23162000000 23163157578 1687163520 1688321098
+69489000000 69492472879 23163000000 23164157626 1688163520 1689321146
+69492000000 69495472979 23164000000 23165157659 1689163520 1690321179
+69495000000 69498473213 23165000000 23166157737 1690163520 1691321257
+69498000000 69501473286 23166000000 23167157762 1691163520 1692321282
+69501000000 69504473407 23167000000 23168157802 1692163520 1693321322
+69504000000 69507473596 23168000000 23169157865 1693163520 1694321385
+69507000000 69510473750 23169000000 23170157916 1694163520 1695321436
+69510000000 69513473929 23170000000 23171157976 1695163520 1696321496
+69513000000 69516474075 23171000000 23172158025 1696163520 1697321545
+69516000000 69519474202 23172000000 23173158067 1697163520 1698321587
+69519000000 69522474376 23173000000 23174158125 1698163520 1699321645
+69522000000 69525474440 23174000000 23175158146 1699163520 1700321666
+69525000000 69528474647 23175000000 23176158215 1700163520 1701321735
+69528000000 69531474828 23176000000 23177158276 1701163520 1702321796
+69531000000 69534474977 23177000000 23178158325 1702163520 1703321845
+69534000000 69537475034 23178000000 23179158344 1703163520 1704321864
+69537000000 69540475230 23179000000 23180158410 1704163520 1705321930
+69540000000 69543475420 23180000000 23181158473 1705163520 1706321993
+69543000000 69546475565 23181000000 23182158521 1706163520 1707322041
+69546000000 69549475737 23182000000 23183158579 1707163520 1708322099
+69549000000 69552475870 23183000000 23184158623 1708163520 1709322143
+69552000000 69555475941 23184000000 23185158647 1709163520 1710322167
+69555000000 69558476167 23185000000 23186158722 1710163520 1711322242
+69558000000 69561476327 23186000000 23187158775 1711163520 1712322295
+69561000000 69564476459 23187000000 23188158819 1712163520 1713322339
+69564000000 69567476567 23188000000 23189158855 1713163520 1714322375
+69567000000 69570476778 23189000000 23190158926 1714163520 1715322446
+69570000000 69573476944 23190000000 23191158981 1715163520 1716322501
+69573000000 69576477055 23191000000 23192159018 1716163520 1717322538
+69576000000 69579477215 23192000000 23193159071 1717163520 1718322591
+69579000000 69582477327 23193000000 23194159109 1718163520 1719322629
+69582000000 69585477525 23194000000 23195159175 1719163520 1720322695
+69585000000 69588477615 23195000000 23196159205 1720163520 1721322725
+69588000000 69591477840 23196000000 23197159280 1721163520 1722322800
+69591000000 69594477972 23197000000 23198159324 1722163520 1723322844
+69594000000 69597478111 23198000000 23199159370 1723163520 1724322890
+69597000000 69600478162 23199000000 23200159387 1724163520 1725322907
+69600000000 69603478373 23200000000 23201159457 1725163520 1726322977
+69603000000 69606478582 23201000000 23202159527 1726163520 1727323047
+69606000000 69609478710 23202000000 23203159570 1727163520 1728323090
+69609000000 69612478853 23203000000 23204159617 1728163520 1729323137
+69612000000 69615479024 23204000000 23205159674 1729163520 1730323194
+69615000000 69618479121 23205000000 23206159707 1730163520 1731323227
+69618000000 69621479334 23206000000 23207159778 1731163520 1732323298
+69621000000 69624479464 23207000000 23208159821 1732163520 1733323341
+69624000000 69627479614 23208000000 23209159871 1733163520 1734323391
+69627000000 69630479774 23209000000 23210159924 1734163520 1735323444
+69630000000 69633479870 23210000000 23211159956 1735163520 1736323476
+69633000000 69636480058 23211000000 23212160019 1736163520 1737323539
+69636000000 69639480226 23212000000 23213160075 1737163520 1738323595
+69639000000 69642480362 23213000000 23214160120 1738163520 1739323640
+69642000000 69645480537 23214000000 23215160179 1739163520 1740323699
+69645000000 69648480659 23215000000 23216160219 1740163520 1741323739
+69648000000 69651480809 23216000000 23217160269 1741163520 1742323789
+69651000000 69654480957 23217000000 23218160319 1742163520 1743323839
+69654000000 69657481163 23218000000 23219160387 1743163520 1744323907
+69657000000 69660481277 23219000000 23220160425 1744163520 1745323945
+69660000000 69663481409 23220000000 23221160469 1745163520 1746323989
+69663000000 69666481583 23221000000 23222160527 1746163520 1747324047
+69666000000 69669481702 23222000000 23223160567 1747163520 1748324087
+69669000000 69672481826 23223000000 23224160608 1748163520 1749324128
+69672000000 69675482045 23224000000 23225160681 1749163520 1750324201
+69675000000 69678482181 23225000000 23226160727 1750163520 1751324247
+69678000000 69681482332 23226000000 23227160777 1751163520 1752324297
+69681000000 69684482492 23227000000 23228160830 1752163520 1753324350
+69684000000 69687482613 23228000000 23229160871 1753163520 1754324391
+69687000000 69690482694 23229000000 23230160898 1754163520 1755324418
+69690000000 69693482902 23230000000 23231160967 1755163520 1756324487
+69693000000 69696483057 23231000000 23232161019 1756163520 1757324539
+69696000000 69699483216 23232000000 23233161072 1757163520 1758324592
+69699000000 69702483368 23233000000 23234161122 1758163520 1759324642
+69702000000 69705483490 23234000000 23235161163 1759163520 1760324683
+69705000000 69708483668 23235000000 23236161222 1760163520 1761324742
+69708000000 69711483817 23236000000 23237161272 1761163520 1762324792
+69711000000 69714483945 23237000000 23238161315 1762163520 1763324835
+69714000000 69717484114 23238000000 23239161371 1763163520 1764324891
+69717000000 69720484234 23239000000 23240161411 1764163520 1765324931
+69720000000 69723484161 23240000000 23241161387 1765163520 1766324907
+69723000000 69726484484 23241000000 23242161494 1766163520 1767325014
+69726000000 69729484737 23242000000 23243161579 1767163520 1768325099
+69729000000 69732484847 23243000000 23244161615 1768163520 1769325135
+69732000000 69735485026 23244000000 23245161675 1769163520 1770325195
+69735000000 69738485074 23245000000 23246161691 1770163520 1771325211
+69738000000 69741485328 23246000000 23247161776 1771163520 1772325296
+69741000000 69744485447 23247000000 23248161815 1772163520 1773325335
+69744000000 69747485618 23248000000 23249161872 1773163520 1774325392
+69747000000 69750485765 23249000000 23250161921 1774163520 1775325441
+69750000000 69753485918 23250000000 23251161972 1775163520 1776325492
+69753000000 69756486064 23251000000 23252162021 1776163520 1777325541
+69756000000 69759486208 23252000000 23253162069 1777163520 1778325589
+69759000000 69762486371 23253000000 23254162123 1778163520 1779325643
+69762000000 69765486523 23254000000 23255162174 1779163520 1780325694
+69765000000 69768486677 23255000000 23256162225 1780163520 1781325745
+69768000000 69771486797 23256000000 23257162265 1781163520 1782325785
+69771000000 69774487006 23257000000 23258162335 1782163520 1783325855
+69774000000 69777487136 23258000000 23259162378 1783163520 1784325898
+69777000000 69780487250 23259000000 23260162416 1784163520 1785325936
+69780000000 69783487411 23260000000 23261162470 1785163520 1786325990
+69783000000 69786487546 23261000000 23262162515 1786163520 1787326035
+69786000000 69789487689 23262000000 23263162563 1787163520 1788326083
+69789000000 69792487789 23263000000 23264162596 1788163520 1789326116
+69792000000 69795488023 23264000000 23265162674 1789163520 1790326194
+69795000000 69798488096 23265000000 23266162698 1790163520 1791326218
+69798000000 69801488217 23266000000 23267162739 1791163520 1792326259
+69801000000 69804488406 23267000000 23268162802 1792163520 1793326322
+69804000000 69807488560 23268000000 23269162853 1793163520 1794326373
+69807000000 69810488739 23269000000 23270162913 1794163520 1795326433
+69810000000 69813488885 23270000000 23271162961 1795163520 1796326481
+69813000000 69816489012 23271000000 23272163004 1796163520 1797326524
+69816000000 69819489186 23272000000 23273163062 1797163520 1798326582
+69819000000 69822489250 23273000000 23274163083 1798163520 1799326603
+69822000000 69825489457 23274000000 23275163152 1799163520 1800326672
+69825000000 69828489638 23275000000 23276163212 1800163520 1801326732
+69828000000 69831489787 23276000000 23277163262 1801163520 1802326782
+69831000000 69834489844 23277000000 23278163281 1802163520 1803326801
+69834000000 69837490040 23278000000 23279163346 1803163520 1804326866
+69837000000 69840490230 23279000000 23280163410 1804163520 1805326930
+69840000000 69843490375 23280000000 23281163458 1805163520 1806326978
+69843000000 69846490547 23281000000 23282163515 1806163520 1807327035
+69846000000 69849490680 23282000000 23283163560 1807163520 1808327080
+69849000000 69852490751 23283000000 23284163583 1808163520 1809327103
+69852000000 69855490977 23284000000 23285163659 1809163520 1810327179
+69855000000 69858491137 23285000000 23286163712 1810163520 1811327232
+69858000000 69861491269 23286000000 23287163756 1811163520 1812327276
+69861000000 69864491377 23287000000 23288163792 1812163520 1813327312
+69864000000 69867491588 23288000000 23289163862 1813163520 1814327382
+69867000000 69870491754 23289000000 23290163918 1814163520 1815327438
+69870000000 69873491865 23290000000 23291163955 1815163520 1816327475
+69873000000 69876492025 23291000000 23292164008 1816163520 1817327528
+69876000000 69879492137 23292000000 23293164045 1817163520 1818327565
+69879000000 69882492335 23293000000 23294164111 1818163520 1819327631
+69882000000 69885492425 23294000000 23295164141 1819163520 1820327661
+69885000000 69888492650 23295000000 23296164216 1820163520 1821327736
+69888000000 69891492782 23296000000 23297164260 1821163520 1822327780
+69891000000 69894492921 23297000000 23298164307 1822163520 1823327827
+69894000000 69897492972 23298000000 23299164324 1823163520 1824327844
+69897000000 69900493183 23299000000 23300164394 1824163520 1825327914
+69900000000 69903493392 23300000000 23301164464 1825163520 1826327984
+69903000000 69906493520 23301000000 23302164506 1826163520 1827328026
+69906000000 69909493663 23302000000 23303164554 1827163520 1828328074
+69909000000 69912493834 23303000000 23304164611 1828163520 1829328131
+69912000000 69915493931 23304000000 23305164643 1829163520 1830328163
+69915000000 69918494144 23305000000 23306164714 1830163520 1831328234
+69918000000 69921494274 23306000000 23307164758 1831163520 1832328278
+69921000000 69924494424 23307000000 23308164808 1832163520 1833328328
+69924000000 69927494584 23308000000 23309164861 1833163520 1834328381
+69927000000 69930494680 23309000000 23310164893 1834163520 1835328413
+69930000000 69933494868 23310000000 23311164956 1835163520 1836328476
+69933000000 69936495036 23311000000 23312165012 1836163520 1837328532
+69936000000 69939495172 23312000000 23313165057 1837163520 1838328577
+69939000000 69942495347 23313000000 23314165115 1838163520 1839328635
+69942000000 69945495469 23314000000 23315165156 1839163520 1840328676
+69945000000 69948495619 23315000000 23316165206 1840163520 1841328726
+69948000000 69951495767 23316000000 23317165255 1841163520 1842328775
+69951000000 69954495973 23317000000 23318165324 1842163520 1843328844
+69954000000 69957496087 23318000000 23319165362 1843163520 1844328882
+69957000000 69960496219 23319000000 23320165406 1844163520 1845328926
+69960000000 69963496393 23320000000 23321165464 1845163520 1846328984
+69963000000 69966496512 23321000000 23322165504 1846163520 1847329024
+69966000000 69969496636 23322000000 23323165545 1847163520 1848329065
+69969000000 69972496855 23323000000 23324165618 1848163520 1849329138
+69972000000 69975496991 23324000000 23325165663 1849163520 1850329183
+69975000000 69978497142 23325000000 23326165714 1850163520 1851329234
+69978000000 69981497302 23326000000 23327165767 1851163520 1852329287
+69981000000 69984497423 23327000000 23328165807 1852163520 1853329327
+69984000000 69987497504 23328000000 23329165834 1853163520 1854329354
+69987000000 69990497712 23329000000 23330165904 1854163520 1855329424
+69990000000 69993497867 23330000000 23331165955 1855163520 1856329475
+69993000000 69996498026 23331000000 23332166008 1856163520 1857329528
+69996000000 69999498178 23332000000 23333166059 1857163520 1858329579
+69999000000 70002498300 23333000000 23334166100 1858163520 1859329620
+70002000000 70005498478 23334000000 23335166159 1859163520 1860329679
+70005000000 70008498627 23335000000 23336166209 1860163520 1861329729
+70008000000 70011498755 23336000000 23337166251 1861163520 1862329771
+70011000000 70014498924 23337000000 23338166308 1862163520 1863329828
+70014000000 70017499044 23338000000 23339166348 1863163520 1864329868
+70017000000 70020498971 23339000000 23340166323 1864163520 1865329843
+70020000000 70023499294 23340000000 23341166431 1865163520 1866329951
+70023000000 70026499547 23341000000 23342166515 1866163520 1867330035
+70026000000 70029499657 23342000000 23343166552 1867163520 1868330072
+70029000000 70032499836 23343000000 23344166612 1868163520 1869330132
+70032000000 70035499884 23344000000 23345166628 1869163520 1870330148
+70035000000 70038500138 23345000000 23346166712 1870163520 1871330232
+70038000000 70041500257 23346000000 23347166752 1871163520 1872330272
+70041000000 70044500428 23347000000 23348166809 1872163520 1873330329
+70044000000 70047500575 23348000000 23349166858 1873163520 1874330378
+70047000000 70050500728 23349000000 23350166909 1874163520 1875330429
+70050000000 70053500874 23350000000 23351166958 1875163520 1876330478
+70053000000 70056501018 23351000000 23352167006 1876163520 1877330526
+70056000000 70059501181 23352000000 23353167060 1877163520 1878330580
+70059000000 70062501333 23353000000 23354167111 1878163520 1879330631
+70062000000 70065501487 23354000000 23355167162 1879163520 1880330682
+70065000000 70068501607 23355000000 23356167202 1880163520 1881330722
+70068000000 70071501816 23356000000 23357167272 1881163520 1882330792
+70071000000 70074501946 23357000000 23358167315 1882163520 1883330835
+70074000000 70077502060 23358000000 23359167353 1883163520 1884330873
+70077000000 70080502221 23359000000 23360167407 1884163520 1885330927
+70080000000 70083502356 23360000000 23361167452 1885163520 1886330972
+70083000000 70086502499 23361000000 23362167499 1886163520 1887331019
+70086000000 70089502599 23362000000 23363167533 1887163520 1888331053
+70089000000 70092502833 23363000000 23364167611 1888163520 1889331131
+70092000000 70095502906 23364000000 23365167635 1889163520 1890331155
+70095000000 70098503027 23365000000 23366167675 1890163520 1891331195
+70098000000 70101503216 23366000000 23367167738 1891163520 1892331258
+70101000000 70104503370 23367000000 23368167790 1892163520 1893331310
+70104000000 70107503549 23368000000 23369167849 1893163520 1894331369
+70107000000 70110503695 23369000000 23370167898 1894163520 1895331418
+70110000000 70113503822 23370000000 23371167940 1895163520 1896331460
+70113000000 70116503996 23371000000 23372167998 1896163520 1897331518
+70116000000 70119504060 23372000000 23373168020 1897163520 1898331540
+70119000000 70122504267 23373000000 23374168089 1898163520 1899331609
+70122000000 70125504448 23374000000 23375168149 1899163520 1900331669
+70125000000 70128504597 23375000000 23376168199 1900163520 1901331719
+70128000000 70131504654 23376000000 23377168218 1901163520 1902331738
+70131000000 70134504850 23377000000 23378168283 1902163520 1903331803
+70134000000 70137505040 23378000000 23379168346 1903163520 1904331866
+70137000000 70140505185 23379000000 23380168395 1904163520 1905331915
+70140000000 70143505357 23380000000 23381168452 1905163520 1906331972
+70143000000 70146505490 23381000000 23382168496 1906163520 1907332016
+70146000000 70149505561 23382000000 23383168520 1907163520 1908332040
+70149000000 70152505787 23383000000 23384168595 1908163520 1909332115
+70152000000 70155505947 23384000000 23385168649 1909163520 1910332169
+70155000000 70158506079 23385000000 23386168693 1910163520 1911332213
+70158000000 70161506187 23386000000 23387168729 1911163520 1912332249
+70161000000 70164506398 23387000000 23388168799 1912163520 1913332319
+70164000000 70167506564 23388000000 23389168854 1913163520 1914332374
+70167000000 70170506675 23389000000 23390168891 1914163520 1915332411
+70170000000 70173506835 23390000000 23391168945 1915163520 1916332465
+70173000000 70176506947 23391000000 23392168982 1916163520 1917332502
+70176000000 70179507145 23392000000 23393169048 1917163520 1918332568
+70179000000 70182507235 23393000000 23394169078 1918163520 1919332598
+70182000000 70185507460 23394000000 23395169153 1919163520 1920332673
+70185000000 70188507592 23395000000 23396169197 1920163520 1921332717
+70188000000 70191507731 23396000000 23397169243 1921163520 1922332763
+70191000000 70194507782 23397000000 23398169260 1922163520 1923332780
+70194000000 70197507993 23398000000 23399169331 1923163520 1924332851
+70197000000 70200508202 23399000000 23400169400 1924163520 1925332920
+70200000000 70203508330 23400000000 23401169443 1925163520 1926332963
+70203000000 70206508473 23401000000 23402169491 1926163520 1927333011
+70206000000 70209508644 23402000000 23403169548 1927163520 1928333068
+70209000000 70212508741 23403000000 23404169580 1928163520 1929333100
+70212000000 70215508954 23404000000 23405169651 1929163520 1930333171
+70215000000 70218509084 23405000000 23406169694 1930163520 1931333214
+70218000000 70221509234 23406000000 23407169744 1931163520 1932333264
+70221000000 70224509394 23407000000 23408169798 1932163520 1933333318
+70224000000 70227509490 23408000000 23409169830 1933163520 1934333350
+70227000000 70230509678 23409000000 23410169892 1934163520 1935333412
+70230000000 70233509846 23410000000 23411169948 1935163520 1936333468
+70233000000 70236509982 23411000000 23412169994 1936163520 1937333514
+70236000000 70239510157 23412000000 23413170052 1937163520 1938333572
+70239000000 70242510279 23413000000 23414170093 1938163520 1939333613
+70242000000 70245510429 23414000000 23415170143 1939163520 1940333663
+70245000000 70248510577 23415000000 23416170192 1940163520 1941333712
+70248000000 70251510783 23416000000 23417170261 1941163520 1942333781
+70251000000 70254510897 23417000000 23418170299 1942163520 1943333819
+70254000000 70257511029 23418000000 23419170343 1943163520 1944333863
+70257000000 70260511203 23419000000 23420170401 1944163520 1945333921
+70260000000 70263511322 23420000000 23421170440 1945163520 1946333960
+70263000000 70266511446 23421000000 23422170482 1946163520 1947334002
+70266000000 70269511665 23422000000 23423170555 1947163520 1948334075
+70269000000 70272511801 23423000000 23424170600 1948163520 1949334120
+70272000000 70275511952 23424000000 23425170650 1949163520 1950334170
+70275000000 70278512112 23425000000 23426170704 1950163520 1951334224
+70278000000 70281512233 23426000000 23427170744 1951163520 1952334264
+70281000000 70284512314 23427000000 23428170771 1952163520 1953334291
+70284000000 70287512522 23428000000 23429170840 1953163520 1954334360
+70287000000 70290512677 23429000000 23430170892 1954163520 1955334412
+70290000000 70293512836 23430000000 23431170945 1955163520 1956334465
+70293000000 70296512988 23431000000 23432170996 1956163520 1957334516
+70296000000 70299513110 23432000000 23433171036 1957163520 1958334556
+70299000000 70302513288 23433000000 23434171096 1958163520 1959334616
+70302000000 70305513437 23434000000 23435171145 1959163520 1960334665
+70305000000 70308513565 23435000000 23436171188 1960163520 1961334708
+70308000000 70311513734 23436000000 23437171244 1961163520 1962334764
+70311000000 70314513854 23437000000 23438171284 1962163520 1963334804
+70314000000 70317513781 23438000000 23439171260 1963163520 1964334780
+70317000000 70320514104 23439000000 23440171368 1964163520 1965334888
+70320000000 70323514357 23440000000 23441171452 1965163520 1966334972
+70323000000 70326514467 23441000000 23442171489 1966163520 1967335009
+70326000000 70329514646 23442000000 23443171548 1967163520 1968335068
+70329000000 70332514694 23443000000 23444171564 1968163520 1969335084
+70332000000 70335514948 23444000000 23445171649 1969163520 1970335169
+70335000000 70338515067 23445000000 23446171689 1970163520 1971335209
+70338000000 70341515238 23446000000 23447171746 1971163520 1972335266
+70341000000 70344515385 23447000000 23448171795 1972163520 1973335315
+70344000000 70347515538 23448000000 23449171846 1973163520 1974335366
+70347000000 70350515684 23449000000 23450171894 1974163520 1975335414
+70350000000 70353515828 23450000000 23451171942 1975163520 1976335462
+70353000000 70356515991 23451000000 23452171997 1976163520 1977335517
+70356000000 70359516143 23452000000 23453172047 1977163520 1978335567
+70359000000 70362516297 23453000000 23454172099 1978163520 1979335619
+70362000000 70365516417 23454000000 23455172139 1979163520 1980335659
+70365000000 70368516626 23455000000 23456172208 1980163520 1981335728
+70368000000 70371516756 23456000000 23457172252 1981163520 1982335772
+70371000000 70374516870 23457000000 23458172290 1982163520 1983335810
+70374000000 70377517031 23458000000 23459172343 1983163520 1984335863
+70377000000 70380517166 23459000000 23460172388 1984163520 1985335908
+70380000000 70383517309 23460000000 23461172436 1985163520 1986335956
+70383000000 70386517409 23461000000 23462172469 1986163520 1987335989
+70386000000 70389517643 23462000000 23463172547 1987163520 1988336067
+70389000000 70392517716 23463000000 23464172572 1988163520 1989336092
+70392000000 70395517837 23464000000 23465172612 1989163520 1990336132
+70395000000 70398518026 23465000000 23466172675 1990163520 1991336195
+70398000000 70401518180 23466000000 23467172726 1991163520 1992336246
+70401000000 70404518359 23467000000 23468172786 1992163520 1993336306
+70404000000 70407518505 23468000000 23469172835 1993163520 1994336355
+70407000000 70410518632 23469000000 23470172877 1994163520 1995336397
+70410000000 70413518806 23470000000 23471172935 1995163520 1996336455
+70413000000 70416518870 23471000000 23472172956 1996163520 1997336476
+70416000000 70419519077 23472000000 23473173025 1997163520 1998336545
+70419000000 70422519258 23473000000 23474173086 1998163520 1999336606
+70422000000 70425519407 23474000000 23475173135 1999163520 2000336655
+70425000000 70428519464 23475000000 23476173154 2000163520 2001336674
+70428000000 70431519660 23476000000 23477173220 2001163520 2002336740
+70431000000 70434519850 23477000000 23478173283 2002163520 2003336803
+70434000000 70437519995 23478000000 23479173331 2003163520 2004336851
+70437000000 70440520167 23479000000 23480173389 2004163520 2005336909
+70440000000 70443520300 23480000000 23481173433 2005163520 2006336953
+70443000000 70446520371 23481000000 23482173457 2006163520 2007336977
+70446000000 70449520597 23482000000 23483173532 2007163520 2008337052
+70449000000 70452520757 23483000000 23484173585 2008163520 2009337105
+70452000000 70455520889 23484000000 23485173629 2009163520 2010337149
+70455000000 70458520997 23485000000 23486173665 2010163520 2011337185
+70458000000 70461521208 23486000000 23487173736 2011163520 2012337256
+70461000000 70464521374 23487000000 23488173791 2012163520 2013337311
+70464000000 70467521485 23488000000 23489173828 2013163520 2014337348
+70467000000 70470521645 23489000000 23490173881 2014163520 2015337401
+70470000000 70473521757 23490000000 23491173919 2015163520 2016337439
+70473000000 70476521955 23491000000 23492173985 2016163520 2017337505
+70476000000 70479522045 23492000000 23493174015 2017163520 2018337535
+70479000000 70482522270 23493000000 23494174090 2018163520 2019337610
+70482000000 70485522402 23494000000 23495174134 2019163520 2020337654
+70485000000 70488522541 23495000000 23496174180 2020163520 2021337700
+70488000000 70491522592 23496000000 23497174197 2021163520 2022337717
+70491000000 70494522803 23497000000 23498174267 2022163520 2023337787
+70494000000 70497523012 23498000000 23499174337 2023163520 2024337857
+70497000000 70500523140 23499000000 23500174380 2024163520 2025337900
+70500000000 70503523283 23500000000 23501174427 2025163520 2026337947
+70503000000 70506523454 23501000000 23502174484 2026163520 2027338004
+70506000000 70509523551 23502000000 23503174517 2027163520 2028338037
+70509000000 70512523764 23503000000 23504174588 2028163520 2029338108
+70512000000 70515523894 23504000000 23505174631 2029163520 2030338151
+70515000000 70518524044 23505000000 23506174681 2030163520 2031338201
+70518000000 70521524204 23506000000 23507174734 2031163520 2032338254
+70521000000 70524524300 23507000000 23508174766 2032163520 2033338286
+70524000000 70527524488 23508000000 23509174829 2033163520 2034338349
+70527000000 70530524656 23509000000 23510174885 2034163520 2035338405
+70530000000 70533524792 23510000000 23511174930 2035163520 2036338450
+70533000000 70536524967 23511000000 23512174989 2036163520 2037338509
+70536000000 70539525089 23512000000 23513175029 2037163520 2038338549
+70539000000 70542525239 23513000000 23514175079 2038163520 2039338599
+70542000000 70545525387 23514000000 23515175129 2039163520 2040338649
+70545000000 70548525593 23515000000 23516175197 2040163520 2041338717
+70548000000 70551525707 23516000000 23517175235 2041163520 2042338755
+70551000000 70554525839 23517000000 23518175279 2042163520 2043338799
+70554000000 70557526013 23518000000 23519175337 2043163520 2044338857
+70557000000 70560526132 23519000000 23520175377 2044163520 2045338897
+70560000000 70563526256 23520000000 23521175418 2045163520 2046338938
+70563000000 70566526475 23521000000 23522175491 2046163520 2047339011
+70566000000 70569526611 23522000000 23523175537 2047163520 2048339057
+70569000000 70572526762 23523000000 23524175587 2048163520 2049339107
+70572000000 70575526922 23524000000 23525175640 2049163520 2050339160
+70575000000 70578527043 23525000000 23526175681 2050163520 2051339201
+70578000000 70581527124 23526000000 23527175708 2051163520 2052339228
+70581000000 70584527332 23527000000 23528175777 2052163520 2053339297
+70584000000 70587527487 23528000000 23529175829 2053163520 2054339349
+70587000000 70590527646 23529000000 23530175882 2054163520 2055339402
+70590000000 70593527798 23530000000 23531175932 2055163520 2056339452
+70593000000 70596527920 23531000000 23532175973 2056163520 2057339493
+70596000000 70599528098 23532000000 23533176032 2057163520 2058339552
+70599000000 70602528247 23533000000 23534176082 2058163520 2059339602
+70602000000 70605528375 23534000000 23535176125 2059163520 2060339645
+70605000000 70608528544 23535000000 23536176181 2060163520 2061339701
+70608000000 70611528664 23536000000 23537176221 2061163520 2062339741
+70611000000 70614528591 23537000000 23538176197 2062163520 2063339717
+70614000000 70617528914 23538000000 23539176304 2063163520 2064339824
+70617000000 70620529167 23539000000 23540176389 2064163520 2065339909
+70620000000 70623529277 23540000000 23541176425 2065163520 2066339945
+70623000000 70626529456 23541000000 23542176485 2066163520 2067340005
+70626000000 70629529504 23542000000 23543176501 2067163520 2068340021
+70629000000 70632529758 23543000000 23544176586 2068163520 2069340106
+70632000000 70635529877 23544000000 23545176625 2069163520 2070340145
+70635000000 70638530048 23545000000 23546176682 2070163520 2071340202
+70638000000 70641530195 23546000000 23547176731 2071163520 2072340251
+70641000000 70644530348 23547000000 23548176782 2072163520 2073340302
+70644000000 70647530494 23548000000 23549176831 2073163520 2074340351
+70647000000 70650530638 23549000000 23550176879 2074163520 2075340399
+70650000000 70653530801 23550000000 23551176933 2075163520 2076340453
+70653000000 70656530953 23551000000 23552176984 2076163520 2077340504
+70656000000 70659531107 23552000000 23553177035 2077163520 2078340555
+70659000000 70662531227 23553000000 23554177075 2078163520 2079340595
+70662000000 70665531436 23554000000 23555177145 2079163520 2080340665
+70665000000 70668531566 23555000000 23556177188 2080163520 2081340708
+70668000000 70671531680 23556000000 23557177226 2081163520 2082340746
+70671000000 70674531841 23557000000 23558177280 2082163520 2083340800
+70674000000 70677531976 23558000000 23559177325 2083163520 2084340845
+70677000000 70680532119 23559000000 23560177373 2084163520 2085340893
+70680000000 70683532219 23560000000 23561177406 2085163520 2086340926
+70683000000 70686532453 23561000000 23562177484 2086163520 2087341004
+70686000000 70689532526 23562000000 23563177508 2087163520 2088341028
+70689000000 70692532647 23563000000 23564177549 2088163520 2089341069
+70692000000 70695532836 23564000000 23565177612 2089163520 2090341132
+70695000000 70698532990 23565000000 23566177663 2090163520 2091341183
+70698000000 70701533169 23566000000 23567177723 2091163520 2092341243
+70701000000 70704533315 23567000000 23568177771 2092163520 2093341291
+70704000000 70707533442 23568000000 23569177814 2093163520 2094341334
+70707000000 70710533616 23569000000 23570177872 2094163520 2095341392
+70710000000 70713533680 23570000000 23571177893 2095163520 2096341413
+70713000000 70716533887 23571000000 23572177962 2096163520 2097341482
+70716000000 70719534068 23572000000 23573178022 2097163520 2098341542
+70719000000 70722534217 23573000000 23574178072 2098163520 2099341592
+70722000000 70725534274 23574000000 23575178091 2099163520 2100341611
+70725000000 70728534470 23575000000 23576178156 2100163520 2101341676
+70728000000 70731534660 23576000000 23577178220 2101163520 2102341740
+70731000000 70734534805 23577000000 23578178268 2102163520 2103341788
+70734000000 70737534977 23578000000 23579178325 2103163520 2104341845
+70737000000 70740535110 23579000000 23580178370 2104163520 2105341890
+70740000000 70743535181 23580000000 23581178393 2105163520 2106341913
+70743000000 70746535407 23581000000 23582178469 2106163520 2107341989
+70746000000 70749535567 23582000000 23583178522 2107163520 2108342042
+70749000000 70752535699 23583000000 23584178566 2108163520 2109342086
+70752000000 70755535807 23584000000 23585178602 2109163520 2110342122
+70755000000 70758536018 23585000000 23586178672 2110163520 2111342192
+70758000000 70761536184 23586000000 23587178728 2111163520 2112342248
+70761000000 70764536295 23587000000 23588178765 2112163520 2113342285
+70764000000 70767536455 23588000000 23589178818 2113163520 2114342338
+70767000000 70770536567 23589000000 23590178855 2114163520 2115342375
+70770000000 70773536765 23590000000 23591178921 2115163520 2116342441
+70773000000 70776536855 23591000000 23592178951 2116163520 2117342471
+70776000000 70779537080 23592000000 23593179026 2117163520 2118342546
+70779000000 70782537212 23593000000 23594179070 2118163520 2119342590
+70782000000 70785537351 23594000000 23595179117 2119163520 2120342637
+70785000000 70788537402 23595000000 23596179134 2120163520 2121342654
+70788000000 70791537613 23596000000 23597179204 2121163520 2122342724
+70791000000 70794537822 23597000000 23598179274 2122163520 2123342794
+70794000000 70797537950 23598000000 23599179316 2123163520 2124342836
+70797000000 70800538093 23599000000 23600179364 2124163520 2125342884
+70800000000 70803538264 23600000000 23601179421 2125163520 2126342941
+70803000000 70806538361 23601000000 23602179453 2126163520 2127342973
+70806000000 70809538574 23602000000 23603179524 2127163520 2128343044
+70809000000 70812538704 23603000000 23604179568 2128163520 2129343088
+70812000000 70815538854 23604000000 23605179618 2129163520 2130343138
+70815000000 70818539014 23605000000 23606179671 2130163520 2131343191
+70818000000 70821539110 23606000000 23607179703 2131163520 2132343223
+70821000000 70824539298 23607000000 23608179766 2132163520 2133343286
+70824000000 70827539466 23608000000 23609179822 2133163520 2134343342
+70827000000 70830539602 23609000000 23610179867 2134163520 2135343387
+70830000000 70833539777 23610000000 23611179925 2135163520 2136343445
+70833000000 70836539899 23611000000 23612179966 2136163520 2137343486
+70836000000 70839540049 23612000000 23613180016 2137163520 2138343536
+70839000000 70842540197 23613000000 23614180065 2138163520 2139343585
+70842000000 70845540403 23614000000 23615180134 2139163520 2140343654
+70845000000 70848540517 23615000000 23616180172 2140163520 2141343692
+70848000000 70851540649 23616000000 23617180216 2141163520 2142343736
+70851000000 70854540823 23617000000 23618180274 2142163520 2143343794
+70854000000 70857540942 23618000000 23619180314 2143163520 2144343834
+70857000000 70860541066 23619000000 23620180355 2144163520 2145343875
+70860000000 70863541285 23620000000 23621180428 2145163520 2146343948
+70863000000 70866541421 23621000000 23622180473 2146163520 2147343993
+70866000000 70869541572 23622000000 23623180524 2147163520 2148344044
+70869000000 70872541732 23623000000 23624180577 2148163520 2149344097
+70872000000 70875541853 23624000000 23625180617 2149163520 2150344137
+70875000000 70878541934 23625000000 23626180644 2150163520 2151344164
+70878000000 70881542142 23626000000 23627180714 2151163520 2152344234
+70881000000 70884542297 23627000000 23628180765 2152163520 2153344285
+70884000000 70887542456 23628000000 23629180818 2153163520 2154344338
+70887000000 70890542608 23629000000 23630180869 2154163520 2155344389
+70890000000 70893542730 23630000000 23631180910 2155163520 2156344430
+70893000000 70896542908 23631000000 23632180969 2156163520 2157344489
+70896000000 70899543057 23632000000 23633181019 2157163520 2158344539
+70899000000 70902543185 23633000000 23634181061 2158163520 2159344581
+70902000000 70905543354 23634000000 23635181118 2159163520 2160344638
+70905000000 70908543474 23635000000 23636181158 2160163520 2161344678
+70908000000 70911543401 23636000000 23637181133 2161163520 2162344653
+70911000000 70914543724 23637000000 23638181241 2162163520 2163344761
+70914000000 70917543977 23638000000 23639181325 2163163520 2164344845
+70917000000 70920544087 23639000000 23640181362 2164163520 2165344882
+70920000000 70923544266 23640000000 23641181422 2165163520 2166344942
+70923000000 70926544314 23641000000 23642181438 2166163520 2167344958
+70926000000 70929544568 23642000000 23643181522 2167163520 2168345042
+70929000000 70932544687 23643000000 23644181562 2168163520 2169345082
+70932000000 70935544858 23644000000 23645181619 2169163520 2170345139
+70935000000 70938545005 23645000000 23646181668 2170163520 2171345188
+70938000000 70941545158 23646000000 23647181719 2171163520 2172345239
+70941000000 70944545304 23647000000 23648181768 2172163520 2173345288
+70944000000 70947545448 23648000000 23649181816 2173163520 2174345336
+70947000000 70950545611 23649000000 23650181870 2174163520 2175345390
+70950000000 70953545763 23650000000 23651181921 2175163520 2176345441
+70953000000 70956545917 23651000000 23652181972 2176163520 2177345492
+70956000000 70959546037 23652000000 23653182012 2177163520 2178345532
+70959000000 70962546246 23653000000 23654182082 2178163520 2179345602
+70962000000 70965546376 23654000000 23655182125 2179163520 2180345645
+70965000000 70968546490 23655000000 23656182163 2180163520 2181345683
+70968000000 70971546651 23656000000 23657182217 2181163520 2182345737
+70971000000 70974546786 23657000000 23658182262 2182163520 2183345782
+70974000000 70977546929 23658000000 23659182309 2183163520 2184345829
+70977000000 70980547029 23659000000 23660182343 2184163520 2185345863
+70980000000 70983547263 23660000000 23661182421 2185163520 2186345941
+70983000000 70986547336 23661000000 23662182445 2186163520 2187345965
+70986000000 70989547457 23662000000 23663182485 2187163520 2188346005
+70989000000 70992547646 23663000000 23664182548 2188163520 2189346068
+70992000000 70995547800 23664000000 23665182600 2189163520 2190346120
+70995000000 70998547979 23665000000 23666182659 2190163520 2191346179
+70998000000 71001548125 23666000000 23667182708 2191163520 2192346228
+71001000000 71004548252 23667000000 23668182750 2192163520 2193346270
+71004000000 71007548426 23668000000 23669182808 2193163520 2194346328
+71007000000 71010548490 23669000000 23670182830 2194163520 2195346350
+71010000000 71013548697 23670000000 23671182899 2195163520 2196346419
+71013000000 71016548878 23671000000 23672182959 2196163520 2197346479
+71016000000 71019549027 23672000000 23673183009 2197163520 2198346529
+71019000000 71022549084 23673000000 23674183028 2198163520 2199346548
+71022000000 71025549280 23674000000 23675183093 2199163520 2200346613
+71025000000 71028549470 23675000000 23676183156 2200163520 2201346676
+71028000000 71031549615 23676000000 23677183205 2201163520 2202346725
+71031000000 71034549787 23677000000 23678183262 2202163520 2203346782
+71034000000 71037549920 23678000000 23679183306 2203163520 2204346826
+71037000000 71040549991 23679000000 23680183330 2204163520 2205346850
+71040000000 71043550217 23680000000 23681183405 2205163520 2206346925
+71043000000 71046550377 23681000000 23682183459 2206163520 2207346979
+71046000000 71049550509 23682000000 23683183503 2207163520 2208347023
+71049000000 71052550617 23683000000 23684183539 2208163520 2209347059
+71052000000 71055550828 23684000000 23685183609 2209163520 2210347129
+71055000000 71058550994 23685000000 23686183664 2210163520 2211347184
+71058000000 71061551105 23686000000 23687183701 2211163520 2212347221
+71061000000 71064551265 23687000000 23688183755 2212163520 2213347275
+71064000000 71067551377 23688000000 23689183792 2213163520 2214347312
+71067000000 71070551575 23689000000 23690183858 2214163520 2215347378
+71070000000 71073551665 23690000000 23691183888 2215163520 2216347408
+71073000000 71076551890 23691000000 23692183963 2216163520 2217347483
+71076000000 71079552022 23692000000 23693184007 2217163520 2218347527
+71079000000 71082552161 23693000000 23694184053 2218163520 2219347573
+71082000000 71085552212 23694000000 23695184070 2219163520 2220347590
+71085000000 71088552423 23695000000 23696184141 2220163520 2221347661
+71088000000 71091552632 23696000000 23697184210 2221163520 2222347730
+71091000000 71094552760 23697000000 23698184253 2222163520 2223347773
+71094000000 71097552903 23698000000 23699184301 2223163520 2224347821
+71097000000 71100553074 23699000000 23700184358 2224163520 2225347878
+71100000000 71103553171 23700000000 23701184390 2225163520 2226347910
+71103000000 71106553384 23701000000 23702184461 2226163520 2227347981
+71106000000 71109553514 23702000000 23703184504 2227163520 2228348024
+71109000000 71112553664 23703000000 23704184554 2228163520 2229348074
+71112000000 71115553824 23704000000 23705184608 2229163520 2230348128
+71115000000 71118553920 23705000000 23706184640 2230163520 2231348160
+71118000000 71121554108 23706000000 23707184702 2231163520 2232348222
+71121000000 71124554276 23707000000 23708184758 2232163520 2233348278
+71124000000 71127554412 23708000000 23709184804 2233163520 2234348324
+71127000000 71130554587 23709000000 23710184862 2234163520 2235348382
+71130000000 71133554709 23710000000 23711184903 2235163520 2236348423
+71133000000 71136554859 23711000000 23712184953 2236163520 2237348473
+71136000000 71139555007 23712000000 23713185002 2237163520 2238348522
+71139000000 71142555213 23713000000 23714185071 2238163520 2239348591
+71142000000 71145555327 23714000000 23715185109 2239163520 2240348629
+71145000000 71148555459 23715000000 23716185153 2240163520 2241348673
+71148000000 71151555633 23716000000 23717185211 2241163520 2242348731
+71151000000 71154555752 23717000000 23718185250 2242163520 2243348770
+71154000000 71157555876 23718000000 23719185292 2243163520 2244348812
+71157000000 71160556095 23719000000 23720185365 2244163520 2245348885
+71160000000 71163556231 23720000000 23721185410 2245163520 2246348930
+71163000000 71166556382 23721000000 23722185460 2246163520 2247348980
+71166000000 71169556542 23722000000 23723185514 2247163520 2248349034
+71169000000 71172556663 23723000000 23724185554 2248163520 2249349074
+71172000000 71175556744 23724000000 23725185581 2249163520 2250349101
+71175000000 71178556952 23725000000 23726185650 2250163520 2251349170
+71178000000 71181557107 23726000000 23727185702 2251163520 2252349222
+71181000000 71184557266 23727000000 23728185755 2252163520 2253349275
+71184000000 71187557418 23728000000 23729185806 2253163520 2254349326
+71187000000 71190557540 23729000000 23730185846 2254163520 2255349366
+71190000000 71193557718 23730000000 23731185906 2255163520 2256349426
+71193000000 71196557867 23731000000 23732185955 2256163520 2257349475
+71196000000 71199557995 23732000000 23733185998 2257163520 2258349518
+71199000000 71202558164 23733000000 23734186054 2258163520 2259349574
+71202000000 71205558284 23734000000 23735186094 2259163520 2260349614
+71205000000 71208558211 23735000000 23736186070 2260163520 2261349590
+71208000000 71211558534 23736000000 23737186178 2261163520 2262349698
+71211000000 71214558787 23737000000 23738186262 2262163520 2263349782
+71214000000 71217558897 23738000000 23739186299 2263163520 2264349819
+71217000000 71220559076 23739000000 23740186358 2264163520 2265349878
+71220000000 71223559124 23740000000 23741186374 2265163520 2266349894
+71223000000 71226559378 23741000000 23742186459 2266163520 2267349979
+71226000000 71229559497 23742000000 23743186499 2267163520 2268350019
+71229000000 71232559668 23743000000 23744186556 2268163520 2269350076
+71232000000 71235559815 23744000000 23745186605 2269163520 2270350125
+71235000000 71238559968 23745000000 23746186656 2270163520 2271350176
+71238000000 71241560114 23746000000 23747186704 2271163520 2272350224
+71241000000 71244560258 23747000000 23748186752 2272163520 2273350272
+71244000000 71247560421 23748000000 23749186807 2273163520 2274350327
+71247000000 71250560573 23749000000 23750186857 2274163520 2275350377
+71250000000 71253560727 23750000000 23751186909 2275163520 2276350429
+71253000000 71256560847 23751000000 23752186949 2276163520 2277350469
+71256000000 71259561056 23752000000 23753187018 2277163520 2278350538
+71259000000 71262561186 23753000000 23754187062 2278163520 2279350582
+71262000000 71265561300 23754000000 23755187100 2279163520 2280350620
+71265000000 71268561461 23755000000 23756187153 2280163520 2281350673
+71268000000 71271561596 23756000000 23757187198 2281163520 2282350718
+71271000000 71274561739 23757000000 23758187246 2282163520 2283350766
+71274000000 71277561839 23758000000 23759187279 2283163520 2284350799
+71277000000 71280562073 23759000000 23760187357 2284163520 2285350877
+71280000000 71283562146 23760000000 23761187382 2285163520 2286350902
+71283000000 71286562267 23761000000 23762187422 2286163520 2287350942
+71286000000 71289562456 23762000000 23763187485 2287163520 2288351005
+71289000000 71292562610 23763000000 23764187536 2288163520 2289351056
+71292000000 71295562789 23764000000 23765187596 2289163520 2290351116
+71295000000 71298562935 23765000000 23766187645 2290163520 2291351165
+71298000000 71301563062 23766000000 23767187687 2291163520 2292351207
+71301000000 71304563236 23767000000 23768187745 2292163520 2293351265
+71304000000 71307563300 23768000000 23769187766 2293163520 2294351286
+71307000000 71310563507 23769000000 23770187835 2294163520 2295351355
+71310000000 71313563688 23770000000 23771187896 2295163520 2296351416
+71313000000 71316563837 23771000000 23772187945 2296163520 2297351465
+71316000000 71319563894 23772000000 23773187964 2297163520 2298351484
+71319000000 71322564090 23773000000 23774188030 2298163520 2299351550
+71322000000 71325564280 23774000000 23775188093 2299163520 2300351613
+71325000000 71328564425 23775000000 23776188141 2300163520 2301351661
+71328000000 71331564597 23776000000 23777188199 2301163520 2302351719
+71331000000 71334564730 23777000000 23778188243 2302163520 2303351763
+71334000000 71337564801 23778000000 23779188267 2303163520 2304351787
+71337000000 71340565027 23779000000 23780188342 2304163520 2305351862
+71340000000 71343565187 23780000000 23781188395 2305163520 2306351915
+71343000000 71346565319 23781000000 23782188439 2306163520 2307351959
+71346000000 71349565427 23782000000 23783188475 2307163520 2308351995
+71349000000 71352565638 23783000000 23784188546 2308163520 2309352066
+71352000000 71355565804 23784000000 23785188601 2309163520 2310352121
+71355000000 71358565915 23785000000 23786188638 2310163520 2311352158
+71358000000 71361566075 23786000000 23787188691 2311163520 2312352211
+71361000000 71364566187 23787000000 23788188729 2312163520 2313352249
+71364000000 71367566385 23788000000 23789188795 2313163520 2314352315
+71367000000 71370566475 23789000000 23790188825 2314163520 2315352345
+71370000000 71373566700 23790000000 23791188900 2315163520 2316352420
+71373000000 71376566832 23791000000 23792188944 2316163520 2317352464
+71376000000 71379566971 23792000000 23793188990 2317163520 2318352510
+71379000000 71382567022 23793000000 23794189007 2318163520 2319352527
+71382000000 71385567233 23794000000 23795189077 2319163520 2320352597
+71385000000 71388567442 23795000000 23796189147 2320163520 2321352667
+71388000000 71391567570 23796000000 23797189190 2321163520 2322352710
+71391000000 71394567713 23797000000 23798189237 2322163520 2323352757
+71394000000 71397567884 23798000000 23799189294 2323163520 2324352814
+71397000000 71400567981 23799000000 23800189327 2324163520 2325352847
+71400000000 71403568194 23800000000 23801189398 2325163520 2326352918
+71403000000 71406568324 23801000000 23802189441 2326163520 2327352961
+71406000000 71409568474 23802000000 23803189491 2327163520 2328353011
+71409000000 71412568634 23803000000 23804189544 2328163520 2329353064
+71412000000 71415568730 23804000000 23805189576 2329163520 2330353096
+71415000000 71418568918 23805000000 23806189639 2330163520 2331353159
+71418000000 71421569086 23806000000 23807189695 2331163520 2332353215
+71421000000 71424569222 23807000000 23808189740 2332163520 2333353260
+71424000000 71427569397 23808000000 23809189799 2333163520 2334353319
+71427000000 71430569519 23809000000 23810189839 2334163520 2335353359
+71430000000 71433569669 23810000000 23811189889 2335163520 2336353409
+71433000000 71436569817 23811000000 23812189939 2336163520 2337353459
+71436000000 71439570023 23812000000 23813190007 2337163520 2338353527
+71439000000 71442570137 23813000000 23814190045 2338163520 2339353565
+71442000000 71445570269 23814000000 23815190089 2339163520 2340353609
+71445000000 71448570443 23815000000 23816190147 2340163520 2341353667
+71448000000 71451570562 23816000000 23817190187 2341163520 2342353707
+71451000000 71454570686 23817000000 23818190228 2342163520 2343353748
+71454000000 71457570905 23818000000 23819190301 2343163520 2344353821
+71457000000 71460571041 23819000000 23820190347 2344163520 2345353867
+71460000000 71463571192 23820000000 23821190397 2345163520 2346353917
+71463000000 71466571352 23821000000 23822190450 2346163520 2347353970
+71466000000 71469571473 23822000000 23823190491 2347163520 2348354011
+71469000000 71472571554 23823000000 23824190518 2348163520 2349354038
+71472000000 71475571762 23824000000 23825190587 2349163520 2350354107
+71475000000 71478571917 23825000000 23826190639 2350163520 2351354159
+71478000000 71481572076 23826000000 23827190692 2351163520 2352354212
+71481000000 71484572228 23827000000 23828190742 2352163520 2353354262
+71484000000 71487572350 23828000000 23829190783 2353163520 2354354303
+71487000000 71490572528 23829000000 23830190842 2354163520 2355354362
+71490000000 71493572677 23830000000 23831190892 2355163520 2356354412
+71493000000 71496572805 23831000000 23832190935 2356163520 2357354455
+71496000000 71499572974 23832000000 23833190991 2357163520 2358354511
+71499000000 71502573094 23833000000 23834191031 2358163520 2359354551
+71502000000 71505573021 23834000000 23835191007 2359163520 2360354527
+71505000000 71508573344 23835000000 23836191114 2360163520 2361354634
+71508000000 71511573597 23836000000 23837191199 2361163520 2362354719
+71511000000 71514573707 23837000000 23838191235 2362163520 2363354755
+71514000000 71517573886 23838000000 23839191295 2363163520 2364354815
+71517000000 71520573934 23839000000 23840191311 2364163520 2365354831
+71520000000 71523574188 23840000000 23841191396 2365163520 2366354916
+71523000000 71526574307 23841000000 23842191435 2366163520 2367354955
+71526000000 71529574478 23842000000 23843191492 2367163520 2368355012
+71529000000 71532574625 23843000000 23844191541 2368163520 2369355061
+71532000000 71535574778 23844000000 23845191592 2369163520 2370355112
+71535000000 71538574924 23845000000 23846191641 2370163520 2371355161
+71538000000 71541575068 23846000000 23847191689 2371163520 2372355209
+71541000000 71544575231 23847000000 23848191743 2372163520 2373355263
+71544000000 71547575383 23848000000 23849191794 2373163520 2374355314
+71547000000 71550575537 23849000000 23850191845 2374163520 2375355365
+71550000000 71553575657 23850000000 23851191885 2375163520 2376355405
+71553000000 71556575866 23851000000 23852191955 2376163520 2377355475
+71556000000 71559575996 23852000000 23853191998 2377163520 2378355518
+71559000000 71562576110 23853000000 23854192036 2378163520 2379355556
+71562000000 71565576271 23854000000 23855192090 2379163520 2380355610
+71565000000 71568576406 23855000000 23856192135 2380163520 2381355655
+71568000000 71571576549 23856000000 23857192183 2381163520 2382355703
+71571000000 71574576649 23857000000 23858192216 2382163520 2383355736
+71574000000 71577576883 23858000000 23859192294 2383163520 2384355814
+71577000000 71580576956 23859000000 23860192318 2384163520 2385355838
+71580000000 71583577077 23860000000 23861192359 2385163520 2386355879
+71583000000 71586577266 23861000000 23862192422 2386163520 2387355942
+71586000000 71589577420 23862000000 23863192473 2387163520 2388355993
+71589000000 71592577599 23863000000 23864192533 2388163520 2389356053
+71592000000 71595577745 23864000000 23865192581 2389163520 2390356101
+71595000000 71598577872 23865000000 23866192624 2390163520 2391356144
+71598000000 71601578046 23866000000 23867192682 2391163520 2392356202
+71601000000 71604578110 23867000000 23868192703 2392163520 2393356223
+71604000000 71607578317 23868000000 23869192772 2393163520 2394356292
+71607000000 71610578498 23869000000 23870192832 2394163520 2395356352
+71610000000 71613578647 23870000000 23871192882 2395163520 2396356402
+71613000000 71616578704 23871000000 23872192901 2396163520 2397356421
+71616000000 71619578900 23872000000 23873192966 2397163520 2398356486
+71619000000 71622579090 23873000000 23874193030 2398163520 2399356550
+71622000000 71625579235 23874000000 23875193078 2399163520 2400356598
+71625000000 71628579407 23875000000 23876193135 2400163520 2401356655
+71628000000 71631579540 23876000000 23877193180 2401163520 2402356700
+71631000000 71634579611 23877000000 23878193203 2402163520 2403356723
+71634000000 71637579837 23878000000 23879193279 2403163520 2404356799
+71637000000 71640579997 23879000000 23880193332 2404163520 2405356852
+71640000000 71643580129 23880000000 23881193376 2405163520 2406356896
+71643000000 71646580237 23881000000 23882193412 2406163520 2407356932
+71646000000 71649580448 23882000000 23883193482 2407163520 2408357002
+71649000000 71652580614 23883000000 23884193538 2408163520 2409357058
+71652000000 71655580725 23884000000 23885193575 2409163520 2410357095
+71655000000 71658580885 23885000000 23886193628 2410163520 2411357148
+71658000000 71661580997 23886000000 23887193665 2411163520 2412357185
+71661000000 71664581195 23887000000 23888193731 2412163520 2413357251
+71664000000 71667581285 23888000000 23889193761 2413163520 2414357281
+71667000000 71670581510 23889000000 23890193836 2414163520 2415357356
+71670000000 71673581642 23890000000 23891193880 2415163520 2416357400
+71673000000 71676581781 23891000000 23892193927 2416163520 2417357447
+71676000000 71679581832 23892000000 23893193944 2417163520 2418357464
+71679000000 71682582043 23893000000 23894194014 2418163520 2419357534
+71682000000 71685582252 23894000000 23895194084 2419163520 2420357604
+71685000000 71688582380 23895000000 23896194126 2420163520 2421357646
+71688000000 71691582523 23896000000 23897194174 2421163520 2422357694
+71691000000 71694582694 23897000000 23898194231 2422163520 2423357751
+71694000000 71697582791 23898000000 23899194263 2423163520 2424357783
+71697000000 71700583004 23899000000 23900194334 2424163520 2425357854
+71700000000 71703583134 23900000000 23901194378 2425163520 2426357898
+71703000000 71706583284 23901000000 23902194428 2426163520 2427357948
+71706000000 71709583444 23902000000 23903194481 2427163520 2428358001
+71709000000 71712583540 23903000000 23904194513 2428163520 2429358033
+71712000000 71715583728 23904000000 23905194576 2429163520 2430358096
+71715000000 71718583896 23905000000 23906194632 2430163520 2431358152
+71718000000 71721584032 23906000000 23907194677 2431163520 2432358197
+71721000000 71724584207 23907000000 23908194735 2432163520 2433358255
+71724000000 71727584329 23908000000 23909194776 2433163520 2434358296
+71727000000 71730584479 23909000000 23910194826 2434163520 2435358346
+71730000000 71733584627 23910000000 23911194875 2435163520 2436358395
+71733000000 71736584833 23911000000 23912194944 2436163520 2437358464
+71736000000 71739584947 23912000000 23913194982 2437163520 2438358502
+71739000000 71742585079 23913000000 23914195026 2438163520 2439358546
+71742000000 71745585253 23914000000 23915195084 2439163520 2440358604
+71745000000 71748585372 23915000000 23916195124 2440163520 2441358644
+71748000000 71751585496 23916000000 23917195165 2441163520 2442358685
+71751000000 71754585715 23917000000 23918195238 2442163520 2443358758
+71754000000 71757585851 23918000000 23919195283 2443163520 2444358803
+71757000000 71760586002 23919000000 23920195334 2444163520 2445358854
+71760000000 71763586162 23920000000 23921195387 2445163520 2446358907
+71763000000 71766586283 23921000000 23922195427 2446163520 2447358947
+71766000000 71769586364 23922000000 23923195454 2447163520 2448358974
+71769000000 71772586572 23923000000 23924195524 2448163520 2449359044
+71772000000 71775586727 23924000000 23925195575 2449163520 2450359095
+71775000000 71778586886 23925000000 23926195628 2450163520 2451359148
+71778000000 71781587038 23926000000 23927195679 2451163520 2452359199
+71781000000 71784587160 23927000000 23928195720 2452163520 2453359240
+71784000000 71787587338 23928000000 23929195779 2453163520 2454359299
+71787000000 71790587487 23929000000 23930195829 2454163520 2455359349
+71790000000 71793587615 23930000000 23931195871 2455163520 2456359391
+71793000000 71796587784 23931000000 23932195928 2456163520 2457359448
+71796000000 71799587904 23932000000 23933195968 2457163520 2458359488
+71799000000 71802587831 23933000000 23934195943 2458163520 2459359463
+71802000000 71805588154 23934000000 23935196051 2459163520 2460359571
+71805000000 71808588407 23935000000 23936196135 2460163520 2461359655
+71808000000 71811588517 23936000000 23937196172 2461163520 2462359692
+71811000000 71814588696 23937000000 23938196232 2462163520 2463359752
+71814000000 71817588744 23938000000 23939196248 2463163520 2464359768
+71817000000 71820588998 23939000000 23940196332 2464163520 2465359852
+71820000000 71823589117 23940000000 23941196372 2465163520 2466359892
+71823000000 71826589288 23941000000 23942196429 2466163520 2467359949
+71826000000 71829589435 23942000000 23943196478 2467163520 2468359998
+71829000000 71832589588 23943000000 23944196529 2468163520 2469360049
+71832000000 71835589734 23944000000 23945196578 2469163520 2470360098
+71835000000 71838589878 23945000000 23946196626 2470163520 2471360146
+71838000000 71841590041 23946000000 23947196680 2471163520 2472360200
+71841000000 71844590193 23947000000 23948196731 2472163520 2473360251
+71844000000 71847590347 23948000000 23949196782 2473163520 2474360302
+71847000000 71850590467 23949000000 23950196822 2474163520 2475360342
+71850000000 71853590676 23950000000 23951196892 2475163520 2476360412
+71853000000 71856590806 23951000000 23952196935 2476163520 2477360455
+71856000000 71859590920 23952000000 23953196973 2477163520 2478360493
+71859000000 71862591081 23953000000 23954197027 2478163520 2479360547
+71862000000 71865591216 23954000000 23955197072 2479163520 2480360592
+71865000000 71868591359 23955000000 23956197119 2480163520 2481360639
+71868000000 71871591459 23956000000 23957197153 2481163520 2482360673
+71871000000 71874591693 23957000000 23958197231 2482163520 2483360751
+71874000000 71877591766 23958000000 23959197255 2483163520 2484360775
+71877000000 71880591887 23959000000 23960197295 2484163520 2485360815
+71880000000 71883592076 23960000000 23961197358 2485163520 2486360878
+71883000000 71886592230 23961000000 23962197410 2486163520 2487360930
+71886000000 71889592409 23962000000 23963197469 2487163520 2488360989
+71889000000 71892592555 23963000000 23964197518 2488163520 2489361038
+71892000000 71895592682 23964000000 23965197560 2489163520 2490361080
+71895000000 71898592856 23965000000 23966197618 2490163520 2491361138
+71898000000 71901592920 23966000000 23967197640 2491163520 2492361160
+71901000000 71904593127 23967000000 23968197709 2492163520 2493361229
+71904000000 71907593308 23968000000 23969197769 2493163520 2494361289
+71907000000 71910593457 23969000000 23970197819 2494163520 2495361339
+71910000000 71913593514 23970000000 23971197838 2495163520 2496361358
+71913000000 71916593710 23971000000 23972197903 2496163520 2497361423
+71916000000 71919593900 23972000000 23973197966 2497163520 2498361486
+71919000000 71922594045 23973000000 23974198015 2498163520 2499361535
+71922000000 71925594217 23974000000 23975198072 2499163520 2500361592
+71925000000 71928594350 23975000000 23976198116 2500163520 2501361636
+71928000000 71931594421 23976000000 23977198140 2501163520 2502361660
+71931000000 71934594647 23977000000 23978198215 2502163520 2503361735
+71934000000 71937594807 23978000000 23979198269 2503163520 2504361789
+71937000000 71940594939 23979000000 23980198313 2504163520 2505361833
+71940000000 71943595047 23980000000 23981198349 2505163520 2506361869
+71943000000 71946595258 23981000000 23982198419 2506163520 2507361939
+71946000000 71949595424 23982000000 23983198474 2507163520 2508361994
+71949000000 71952595535 23983000000 23984198511 2508163520 2509362031
+71952000000 71955595695 23984000000 23985198565 2509163520 2510362085
+71955000000 71958595807 23985000000 23986198602 2510163520 2511362122
+71958000000 71961596005 23986000000 23987198668 2511163520 2512362188
+71961000000 71964596095 23987000000 23988198698 2512163520 2513362218
+71964000000 71967596320 23988000000 23989198773 2513163520 2514362293
+71967000000 71970596452 23989000000 23990198817 2514163520 2515362337
+71970000000 71973596591 23990000000 23991198863 2515163520 2516362383
+71973000000 71976596642 23991000000 23992198880 2516163520 2517362400
+71976000000 71979596853 23992000000 23993198951 2517163520 2518362471
+71979000000 71982597062 23993000000 23994199020 2518163520 2519362540
+71982000000 71985597190 23994000000 23995199063 2519163520 2520362583
+71985000000 71988597333 23995000000 23996199111 2520163520 2521362631
+71988000000 71991597504 23996000000 23997199168 2521163520 2522362688
+71991000000 71994597601 23997000000 23998199200 2522163520 2523362720
+71994000000 71997597814 23998000000 23999199271 2523163520 2524362791
+71997000000 72000597944 23999000000 24000199314 2524163520 2525362834
+72000000000 72003598094 24000000000 24001199364 2525163520 2526362884
+72003000000 72006598254 24001000000 24002199418 2526163520 2527362938
+72006000000 72009598350 24002000000 24003199450 2527163520 2528362970
+72009000000 72012598538 24003000000 24004199512 2528163520 2529363032
+72012000000 72015598706 24004000000 24005199568 2529163520 2530363088
+72015000000 72018598842 24005000000 24006199614 2530163520 2531363134
+72018000000 72021599017 24006000000 24007199672 2531163520 2532363192
+72021000000 72024599139 24007000000 24008199713 2532163520 2533363233
+72024000000 72027599289 24008000000 24009199763 2533163520 2534363283
+72027000000 72030599437 24009000000 24010199812 2534163520 2535363332
+72030000000 72033599643 24010000000 24011199881 2535163520 2536363401
+72033000000 72036599757 24011000000 24012199919 2536163520 2537363439
+72036000000 72039599889 24012000000 24013199963 2537163520 2538363483
+72039000000 72042600063 24013000000 24014200021 2538163520 2539363541
+72042000000 72045600182 24014000000 24015200060 2539163520 2540363580
+72045000000 72048600306 24015000000 24016200102 2540163520 2541363622
+72048000000 72051600525 24016000000 24017200175 2541163520 2542363695
+72051000000 72054600661 24017000000 24018200220 2542163520 2543363740
+72054000000 72057600812 24018000000 24019200270 2543163520 2544363790
+72057000000 72060600972 24019000000 24020200324 2544163520 2545363844
+72060000000 72063601093 24020000000 24021200364 2545163520 2546363884
+72063000000 72066601174 24021000000 24022200391 2546163520 2547363911
+72066000000 72069601382 24022000000 24023200460 2547163520 2548363980
+72069000000 72072601537 24023000000 24024200512 2548163520 2549364032
+72072000000 72075601696 24024000000 24025200565 2549163520 2550364085
+72075000000 72078601848 24025000000 24026200616 2550163520 2551364136
+72078000000 72081601970 24026000000 24027200656 2551163520 2552364176
+72081000000 72084602148 24027000000 24028200716 2552163520 2553364236
+72084000000 72087602297 24028000000 24029200765 2553163520 2554364285
+72087000000 72090602425 24029000000 24030200808 2554163520 2555364328
+72090000000 72093602594 24030000000 24031200864 2555163520 2556364384
+72093000000 72096602714 24031000000 24032200904 2556163520 2557364424
+72096000000 72099602641 24032000000 24033200880 2557163520 2558364400
+72099000000 72102602964 24033000000 24034200988 2558163520 2559364508
+72102000000 72105603217 24034000000 24035201072 2559163520 2560364592
+72105000000 72108603327 24035000000 24036201109 2560163520 2561364629
+72108000000 72111603506 24036000000 24037201168 2561163520 2562364688
+72111000000 72114603554 24037000000 24038201184 2562163520 2563364704
+72114000000 72117603808 24038000000 24039201269 2563163520 2564364789
+72117000000 72120603927 24039000000 24040201309 2564163520 2565364829
+72120000000 72123604098 24040000000 24041201366 2565163520 2566364886
+72123000000 72126604245 24041000000 24042201415 2566163520 2567364935
+72126000000 72129604398 24042000000 24043201466 2567163520 2568364986
+72129000000 72132604544 24043000000 24044201514 2568163520 2569365034
+72132000000 72135604688 24044000000 24045201562 2569163520 2570365082
+72135000000 72138604851 24045000000 24046201617 2570163520 2571365137
+72138000000 72141605003 24046000000 24047201667 2571163520 2572365187
+72141000000 72144605157 24047000000 24048201719 2572163520 2573365239
+72144000000 72147605277 24048000000 24049201759 2573163520 2574365279
+72147000000 72150605486 24049000000 24050201828 2574163520 2575365348
+72150000000 72153605616 24050000000 24051201872 2575163520 2576365392
+72153000000 72156605730 24051000000 24052201910 2576163520 2577365430
+72156000000 72159605891 24052000000 24053201963 2577163520 2578365483
+72159000000 72162606026 24053000000 24054202008 2578163520 2579365528
+72162000000 72165606169 24054000000 24055202056 2579163520 2580365576
+72165000000 72168606269 24055000000 24056202089 2580163520 2581365609
+72168000000 72171606503 24056000000 24057202167 2581163520 2582365687
+72171000000 72174606576 24057000000 24058202192 2582163520 2583365712
+72174000000 72177606697 24058000000 24059202232 2583163520 2584365752
+72177000000 72180606886 24059000000 24060202295 2584163520 2585365815
+72180000000 72183607040 24060000000 24061202346 2585163520 2586365866
+72183000000 72186607219 24061000000 24062202406 2586163520 2587365926
+72186000000 72189607365 24062000000 24063202455 2587163520 2588365975
+72189000000 72192607492 24063000000 24064202497 2588163520 2589366017
+72192000000 72195607666 24064000000 24065202555 2589163520 2590366075
+72195000000 72198607730 24065000000 24066202576 2590163520 2591366096
+72198000000 72201607937 24066000000 24067202645 2591163520 2592366165
+72201000000 72204608118 24067000000 24068202706 2592163520 2593366226
+72204000000 72207608267 24068000000 24069202755 2593163520 2594366275
+72207000000 72210608324 24069000000 24070202774 2594163520 2595366294
+72210000000 72213608520 24070000000 24071202840 2595163520 2596366360
+72213000000 72216608710 24071000000 24072202903 2596163520 2597366423
+72216000000 72219608855 24072000000 24073202951 2597163520 2598366471
+72219000000 72222609027 24073000000 24074203009 2598163520 2599366529
+72222000000 72225609160 24074000000 24075203053 2599163520 2600366573
+72225000000 72228609231 24075000000 24076203077 2600163520 2601366597
+72228000000 72231609457 24076000000 24077203152 2601163520 2602366672
+72231000000 72234609617 24077000000 24078203205 2602163520 2603366725
+72234000000 72237609749 24078000000 24079203249 2603163520 2604366769
+72237000000 72240609857 24079000000 24080203285 2604163520 2605366805
+72240000000 72243610068 24080000000 24081203356 2605163520 2606366876
+72243000000 72246610234 24081000000 24082203411 2606163520 2607366931
+72246000000 72249610345 24082000000 24083203448 2607163520 2608366968
+72249000000 72252610505 24083000000 24084203501 2608163520 2609367021
+72252000000 72255610617 24084000000 24085203539 2609163520 2610367059
+72255000000 72258610815 24085000000 24086203605 2610163520 2611367125
+72258000000 72261610905 24086000000 24087203635 2611163520 2612367155
+72261000000 72264611130 24087000000 24088203710 2612163520 2613367230
+72264000000 72267611262 24088000000 24089203754 2613163520 2614367274
+72267000000 72270611401 24089000000 24090203800 2614163520 2615367320
+72270000000 72273611452 24090000000 24091203817 2615163520 2616367337
+72273000000 72276611663 24091000000 24092203887 2616163520 2617367407
+72276000000 72279611872 24092000000 24093203957 2617163520 2618367477
+72279000000 72282612000 24093000000 24094204000 2618163520 2619367520
+72282000000 72285612143 24094000000 24095204047 2619163520 2620367567
+72285000000 72288612314 24095000000 24096204104 2620163520 2621367624
+72288000000 72291612411 24096000000 24097204137 2621163520 2622367657
+72291000000 72294612624 24097000000 24098204208 2622163520 2623367728
+72294000000 72297612754 24098000000 24099204251 2623163520 2624367771
+72297000000 72300612904 24099000000 24100204301 2624163520 2625367821
+72300000000 72303613064 24100000000 24101204354 2625163520 2626367874
+72303000000 72306613160 24101000000 24102204386 2626163520 2627367906
+72306000000 72309613348 24102000000 24103204449 2627163520 2628367969
+72309000000 72312613516 24103000000 24104204505 2628163520 2629368025
+72312000000 72315613652 24104000000 24105204550 2629163520 2630368070
+72315000000 72318613827 24105000000 24106204609 2630163520 2631368129
+72318000000 72321613949 24106000000 24107204649 2631163520 2632368169
+72321000000 72324614099 24107000000 24108204699 2632163520 2633368219
+72324000000 72327614247 24108000000 24109204749 2633163520 2634368269
+72327000000 72330614453 24109000000 24110204817 2634163520 2635368337
+72330000000 72333614567 24110000000 24111204855 2635163520 2636368375
+72333000000 72336614699 24111000000 24112204899 2636163520 2637368419
+72336000000 72339614873 24112000000 24113204957 2637163520 2638368477
+72339000000 72342614992 24113000000 24114204997 2638163520 2639368517
+72342000000 72345615116 24114000000 24115205038 2639163520 2640368558
+72345000000 72348615335 24115000000 24116205111 2640163520 2641368631
+72348000000 72351615471 24116000000 24117205157 2641163520 2642368677
+72351000000 72354615622 24117000000 24118205207 2642163520 2643368727
+72354000000 72357615782 24118000000 24119205260 2643163520 2644368780
+72357000000 72360615903 24119000000 24120205301 2644163520 2645368821
+72360000000 72363615984 24120000000 24121205328 2645163520 2646368848
+72363000000 72366616192 24121000000 24122205397 2646163520 2647368917
+72366000000 72369616347 24122000000 24123205449 2647163520 2648368969
+72369000000 72372616506 24123000000 24124205502 2648163520 2649369022
+72372000000 72375616658 24124000000 24125205552 2649163520 2650369072
+72375000000 72378616780 24125000000 24126205593 2650163520 2651369113
+72378000000 72381616958 24126000000 24127205652 2651163520 2652369172
+72381000000 72384617107 24127000000 24128205702 2652163520 2653369222
+72384000000 72387617235 24128000000 24129205745 2653163520 2654369265
+72387000000 72390617404 24129000000 24130205801 2654163520 2655369321
+72390000000 72393617524 24130000000 24131205841 2655163520 2656369361
+72393000000 72396617451 24131000000 24132205817 2656163520 2657369337
+72396000000 72399617774 24132000000 24133205924 2657163520 2658369444
+72399000000 72402618027 24133000000 24134206009 2658163520 2659369529
+72402000000 72405618137 24134000000 24135206045 2659163520 2660369565
+72405000000 72408618316 24135000000 24136206105 2660163520 2661369625
+72408000000 72411618364 24136000000 24137206121 2661163520 2662369641
+72411000000 72414618618 24137000000 24138206206 2662163520 2663369726
+72414000000 72417618737 24138000000 24139206245 2663163520 2664369765
+72417000000 72420618908 24139000000 24140206302 2664163520 2665369822
+72420000000 72423619055 24140000000 24141206351 2665163520 2666369871
+72423000000 72426619208 24141000000 24142206402 2666163520 2667369922
+72426000000 72429619354 24142000000 24143206451 2667163520 2668369971
+72429000000 72432619498 24143000000 24144206499 2668163520 2669370019
+72432000000 72435619661 24144000000 24145206553 2669163520 2670370073
+72435000000 72438619813 24145000000 24146206604 2670163520 2671370124
+72438000000 72441619967 24146000000 24147206655 2671163520 2672370175
+72441000000 72444620087 24147000000 24148206695 2672163520 2673370215
+72444000000 72447620296 24148000000 24149206765 2673163520 2674370285
+72447000000 72450620426 24149000000 24150206808 2674163520 2675370328
+72450000000 72453620540 24150000000 24151206846 2675163520 2676370366
+72453000000 72456620701 24151000000 24152206900 2676163520 2677370420
+72456000000 72459620836 24152000000 24153206945 2677163520 2678370465
+72459000000 72462620979 24153000000 24154206993 2678163520 2679370513
+72462000000 72465621079 24154000000 24155207026 2679163520 2680370546
+72465000000 72468621313 24155000000 24156207104 2680163520 2681370624
+72468000000 72471621386 24156000000 24157207128 2681163520 2682370648
+72471000000 72474621507 24157000000 24158207169 2682163520 2683370689
+72474000000 72477621696 24158000000 24159207232 2683163520 2684370752
+72477000000 72480621850 24159000000 24160207283 2684163520 2685370803
+72480000000 72483622029 24160000000 24161207343 2685163520 2686370863
+72483000000 72486622175 24161000000 24162207391 2686163520 2687370911
+72486000000 72489622302 24162000000 24163207434 2687163520 2688370954
+72489000000 72492622476 24163000000 24164207492 2688163520 2689371012
+72492000000 72495622540 24164000000 24165207513 2689163520 2690371033
+72495000000 72498622747 24165000000 24166207582 2690163520 2691371102
+72498000000 72501622928 24166000000 24167207642 2691163520 2692371162
+72501000000 72504623077 24167000000 24168207692 2692163520 2693371212
+72504000000 72507623134 24168000000 24169207711 2693163520 2694371231
+72507000000 72510623330 24169000000 24170207776 2694163520 2695371296
+72510000000 72513623520 24170000000 24171207840 2695163520 2696371360
+72513000000 72516623665 24171000000 24172207888 2696163520 2697371408
+72516000000 72519623837 24172000000 24173207945 2697163520 2698371465
+72519000000 72522623970 24173000000 24174207990 2698163520 2699371510
+72522000000 72525624041 24174000000 24175208013 2699163520 2700371533
+72525000000 72528624267 24175000000 24176208089 2700163520 2701371609
+72528000000 72531624427 24176000000 24177208142 2701163520 2702371662
+72531000000 72534624559 24177000000 24178208186 2702163520 2703371706
+72534000000 72537624667 24178000000 24179208222 2703163520 2704371742
+72537000000 72540624878 24179000000 24180208292 2704163520 2705371812
+72540000000 72543625044 24180000000 24181208348 2705163520 2706371868
+72543000000 72546625155 24181000000 24182208385 2706163520 2707371905
+72546000000 72549625315 24182000000 24183208438 2707163520 2708371958
+72549000000 72552625427 24183000000 24184208475 2708163520 2709371995
+72552000000 72555625625 24184000000 24185208541 2709163520 2710372061
+72555000000 72558625715 24185000000 24186208571 2710163520 2711372091
+72558000000 72561625940 24186000000 24187208646 2711163520 2712372166
+72561000000 72564626072 24187000000 24188208690 2712163520 2713372210
+72564000000 72567626211 24188000000 24189208737 2713163520 2714372257
+72567000000 72570626262 24189000000 24190208754 2714163520 2715372274
+72570000000 72573626473 24190000000 24191208824 2715163520 2716372344
+72573000000 72576626682 24191000000 24192208894 2716163520 2717372414
+72576000000 72579626810 24192000000 24193208936 2717163520 2718372456
+72579000000 72582626953 24193000000 24194208984 2718163520 2719372504
+72582000000 72585627124 24194000000 24195209041 2719163520 2720372561
+72585000000 72588627221 24195000000 24196209073 2720163520 2721372593
+72588000000 72591627434 24196000000 24197209144 2721163520 2722372664
+72591000000 72594627564 24197000000 24198209188 2722163520 2723372708
+72594000000 72597627714 24198000000 24199209238 2723163520 2724372758
+72597000000 72600627874 24199000000 24200209291 2724163520 2725372811
+72600000000 72603627970 24200000000 24201209323 2725163520 2726372843
+72603000000 72606628158 24201000000 24202209386 2726163520 2727372906
+72606000000 72609628326 24202000000 24203209442 2727163520 2728372962
+72609000000 72612628462 24203000000 24204209487 2728163520 2729373007
+72612000000 72615628637 24204000000 24205209545 2729163520 2730373065
+72615000000 72618628759 24205000000 24206209586 2730163520 2731373106
+72618000000 72621628909 24206000000 24207209636 2731163520 2732373156
+72621000000 72624629057 24207000000 24208209685 2732163520 2733373205
+72624000000 72627629263 24208000000 24209209754 2733163520 2734373274
+72627000000 72630629377 24209000000 24210209792 2734163520 2735373312
+72630000000 72633629509 24210000000 24211209836 2735163520 2736373356
+72633000000 72636629683 24211000000 24212209894 2736163520 2737373414
+72636000000 72639629802 24212000000 24213209934 2737163520 2738373454
+72639000000 72642629926 24213000000 24214209975 2738163520 2739373495
+72642000000 72645630145 24214000000 24215210048 2739163520 2740373568
+72645000000 72648630281 24215000000 24216210093 2740163520 2741373613
+72648000000 72651630432 24216000000 24217210144 2741163520 2742373664
+72651000000 72654630592 24217000000 24218210197 2742163520 2743373717
+72654000000 72657630713 24218000000 24219210237 2743163520 2744373757
+72657000000 72660630794 24219000000 24220210264 2744163520 2745373784
+72660000000 72663631002 24220000000 24221210334 2745163520 2746373854
+72663000000 72666631157 24221000000 24222210385 2746163520 2747373905
+72666000000 72669631316 24222000000 24223210438 2747163520 2748373958
+72669000000 72672631468 24223000000 24224210489 2748163520 2749374009
+72672000000 72675631590 24224000000 24225210530 2749163520 2750374050
+72675000000 72678631768 24225000000 24226210589 2750163520 2751374109
+72678000000 72681631917 24226000000 24227210639 2751163520 2752374159
+72681000000 72684632045 24227000000 24228210681 2752163520 2753374201
+72684000000 72687632214 24228000000 24229210738 2753163520 2754374258
+72687000000 72690632334 24229000000 24230210778 2754163520 2755374298
+72690000000 72693632261 24230000000 24231210753 2755163520 2756374273
+72693000000 72696632584 24231000000 24232210861 2756163520 2757374381
+72696000000 72699632837 24232000000 24233210945 2757163520 2758374465
+72699000000 72702632947 24233000000 24234210982 2758163520 2759374502
+72702000000 72705633126 24234000000 24235211042 2759163520 2760374562
+72705000000 72708633174 24235000000 24236211058 2760163520 2761374578
+72708000000 72711633428 24236000000 24237211142 2761163520 2762374662
+72711000000 72714633547 24237000000 24238211182 2762163520 2763374702
+72714000000 72717633718 24238000000 24239211239 2763163520 2764374759
+72717000000 72720633865 24239000000 24240211288 2764163520 2765374808
+72720000000 72723634018 24240000000 24241211339 2765163520 2766374859
+72723000000 72726634164 24241000000 24242211388 2766163520 2767374908
+72726000000 72729634308 24242000000 24243211436 2767163520 2768374956
+72729000000 72732634471 24243000000 24244211490 2768163520 2769375010
+72732000000 72735634623 24244000000 24245211541 2769163520 2770375061
+72735000000 72738634777 24245000000 24246211592 2770163520 2771375112
+72738000000 72741634897 24246000000 24247211632 2771163520 2772375152
+72741000000 72744635106 24247000000 24248211702 2772163520 2773375222
+72744000000 72747635236 24248000000 24249211745 2773163520 2774375265
+72747000000 72750635350 24249000000 24250211783 2774163520 2775375303
+72750000000 72753635511 24250000000 24251211837 2775163520 2776375357
+72753000000 72756635646 24251000000 24252211882 2776163520 2777375402
+72756000000 72759635789 24252000000 24253211929 2777163520 2778375449
+72759000000 72762635889 24253000000 24254211963 2778163520 2779375483
+72762000000 72765636123 24254000000 24255212041 2779163520 2780375561
+72765000000 72768636196 24255000000 24256212065 2780163520 2781375585
+72768000000 72771636317 24256000000 24257212105 2781163520 2782375625
+72771000000 72774636506 24257000000 24258212168 2782163520 2783375688
+72774000000 72777636660 24258000000 24259212220 2783163520 2784375740
+72777000000 72780636839 24259000000 24260212279 2784163520 2785375799
+72780000000 72783636985 24260000000 24261212328 2785163520 2786375848
+72783000000 72786637112 24261000000 24262212370 2786163520 2787375890
+72786000000 72789637286 24262000000 24263212428 2787163520 2788375948
+72789000000 72792637350 24263000000 24264212450 2788163520 2789375970
+72792000000 72795637557 24264000000 24265212519 2789163520 2790376039
+72795000000 72798637738 24265000000 24266212579 2790163520 2791376099
+72798000000 72801637887 24266000000 24267212629 2791163520 2792376149
+72801000000 72804637944 24267000000 24268212648 2792163520 2793376168
+72804000000 72807638140 24268000000 24269212713 2793163520 2794376233
+72807000000 72810638330 24269000000 24270212776 2794163520 2795376296
+72810000000 72813638475 24270000000 24271212825 2795163520 2796376345
+72813000000 72816638647 24271000000 24272212882 2796163520 2797376402
+72816000000 72819638780 24272000000 24273212926 2797163520 2798376446
+72819000000 72822638851 24273000000 24274212950 2798163520 2799376470
+72822000000 72825639077 24274000000 24275213025 2799163520 2800376545
+72825000000 72828639237 24275000000 24276213079 2800163520 2801376599
+72828000000 72831639369 24276000000 24277213123 2801163520 2802376643
+72831000000 72834639477 24277000000 24278213159 2802163520 2803376679
+72834000000 72837639688 24278000000 24279213229 2803163520 2804376749
+72837000000 72840639854 24279000000 24280213284 2804163520 2805376804
+72840000000 72843639965 24280000000 24281213321 2805163520 2806376841
+72843000000 72846640125 24281000000 24282213375 2806163520 2807376895
+72846000000 72849640237 24282000000 24283213412 2807163520 2808376932
+72849000000 72852640435 24283000000 24284213478 2808163520 2809376998
+72852000000 72855640525 24284000000 24285213508 2809163520 2810377028
+72855000000 72858640750 24285000000 24286213583 2810163520 2811377103
+72858000000 72861640882 24286000000 24287213627 2811163520 2812377147
+72861000000 72864641021 24287000000 24288213673 2812163520 2813377193
+72864000000 72867641072 24288000000 24289213690 2813163520 2814377210
+72867000000 72870641283 24289000000 24290213761 2814163520 2815377281
+72870000000 72873641492 24290000000 24291213830 2815163520 2816377350
+72873000000 72876641620 24291000000 24292213873 2816163520 2817377393
+72876000000 72879641763 24292000000 24293213921 2817163520 2818377441
+72879000000 72882641934 24293000000 24294213978 2818163520 2819377498
+72882000000 72885642031 24294000000 24295214010 2819163520 2820377530
+72885000000 72888642244 24295000000 24296214081 2820163520 2821377601
+72888000000 72891642374 24296000000 24297214124 2821163520 2822377644
+72891000000 72894642524 24297000000 24298214174 2822163520 2823377694
+72894000000 72897642684 24298000000 24299214228 2823163520 2824377748
+72897000000 72900642780 24299000000 24300214260 2824163520 2825377780
+72900000000 72903642968 24300000000 24301214322 2825163520 2826377842
+72903000000 72906643136 24301000000 24302214378 2826163520 2827377898
+72906000000 72909643272 24302000000 24303214424 2827163520 2828377944
+72909000000 72912643447 24303000000 24304214482 2828163520 2829378002
+72912000000 72915643569 24304000000 24305214523 2829163520 2830378043
+72915000000 72918643719 24305000000 24306214573 2830163520 2831378093
+72918000000 72921643867 24306000000 24307214622 2831163520 2832378142
+72921000000 72924644073 24307000000 24308214691 2832163520 2833378211
+72924000000 72927644187 24308000000 24309214729 2833163520 2834378249
+72927000000 72930644319 24309000000 24310214773 2834163520 2835378293
+72930000000 72933644493 24310000000 24311214831 2835163520 2836378351
+72933000000 72936644612 24311000000 24312214870 2836163520 2837378390
+72936000000 72939644736 24312000000 24313214912 2837163520 2838378432
+72939000000 72942644955 24313000000 24314214985 2838163520 2839378505
+72942000000 72945645091 24314000000 24315215030 2839163520 2840378550
+72945000000 72948645242 24315000000 24316215080 2840163520 2841378600
+72948000000 72951645402 24316000000 24317215134 2841163520 2842378654
+72951000000 72954645523 24317000000 24318215174 2842163520 2843378694
+72954000000 72957645604 24318000000 24319215201 2843163520 2844378721
+72957000000 72960645812 24319000000 24320215270 2844163520 2845378790
+72960000000 72963645967 24320000000 24321215322 2845163520 2846378842
+72963000000 72966646126 24321000000 24322215375 2846163520 2847378895
+72966000000 72969646278 24322000000 24323215426 2847163520 2848378946
+72969000000 72972646400 24323000000 24324215466 2848163520 2849378986
+72972000000 72975646578 24324000000 24325215526 2849163520 2850379046
+72975000000 72978646727 24325000000 24326215575 2850163520 2851379095
+72978000000 72981646855 24326000000 24327215618 2851163520 2852379138
+72981000000 72984647024 24327000000 24328215674 2852163520 2853379194
+72984000000 72987647144 24328000000 24329215714 2853163520 2854379234
+72987000000 72990647071 24329000000 24330215690 2854163520 2855379210
+72990000000 72993647394 24330000000 24331215798 2855163520 2856379318
+72993000000 72996647647 24331000000 24332215882 2856163520 2857379402
+72996000000 72999647757 24332000000 24333215919 2857163520 2858379439
+72999000000 73002647936 24333000000 24334215978 2858163520 2859379498
+73002000000 73005647984 24334000000 24335215994 2859163520 2860379514
+73005000000 73008648238 24335000000 24336216079 2860163520 2861379599
+73008000000 73011648357 24336000000 24337216119 2861163520 2862379639
+73011000000 73014648528 24337000000 24338216176 2862163520 2863379696
+73014000000 73017648675 24338000000 24339216225 2863163520 2864379745
+73017000000 73020648828 24339000000 24340216276 2864163520 2865379796
+73020000000 73023648974 24340000000 24341216324 2865163520 2866379844
+73023000000 73026649118 24341000000 24342216372 2866163520 2867379892
+73026000000 73029649281 24342000000 24343216427 2867163520 2868379947
+73029000000 73032649433 24343000000 24344216477 2868163520 2869379997
+73032000000 73035649587 24344000000 24345216529 2869163520 2870380049
+73035000000 73038649707 24345000000 24346216569 2870163520 2871380089
+73038000000 73041649916 24346000000 24347216638 2871163520 2872380158
+73041000000 73044650046 24347000000 24348216682 2872163520 2873380202
+73044000000 73047650160 24348000000 24349216720 2873163520 2874380240
+73047000000 73050650321 24349000000 24350216773 2874163520 2875380293
+73050000000 73053650456 24350000000 24351216818 2875163520 2876380338
+73053000000 73056650599 24351000000 24352216866 2876163520 2877380386
+73056000000 73059650699 24352000000 24353216899 2877163520 2878380419
+73059000000 73062650933 24353000000 24354216977 2878163520 2879380497
+73062000000 73065651006 24354000000 24355217002 2879163520 2880380522
+73065000000 73068651127 24355000000 24356217042 2880163520 2881380562
+73068000000 73071651316 24356000000 24357217105 2881163520 2882380625
+73071000000 73074651470 24357000000 24358217156 2882163520 2883380676
+73074000000 73077651649 24358000000 24359217216 2883163520 2884380736
+73077000000 73080651795 24359000000 24360217265 2884163520 2885380785
+73080000000 73083651922 24360000000 24361217307 2885163520 2886380827
+73083000000 73086652096 24361000000 24362217365 2886163520 2887380885
+73086000000 73089652160 24362000000 24363217386 2887163520 2888380906
+73089000000 73092652367 24363000000 24364217455 2888163520 2889380975
+73092000000 73095652548 24364000000 24365217516 2889163520 2890381036
+73095000000 73098652697 24365000000 24366217565 2890163520 2891381085
+73098000000 73101652754 24366000000 24367217584 2891163520 2892381104
+73101000000 73104652950 24367000000 24368217650 2892163520 2893381170
+73104000000 73107653140 24368000000 24369217713 2893163520 2894381233
+73107000000 73110653285 24369000000 24370217761 2894163520 2895381281
+73110000000 73113653457 24370000000 24371217819 2895163520 2896381339
+73113000000 73116653590 24371000000 24372217863 2896163520 2897381383
+73116000000 73119653661 24372000000 24373217887 2897163520 2898381407
+73119000000 73122653887 24373000000 24374217962 2898163520 2899381482
+73122000000 73125654047 24374000000 24375218015 2899163520 2900381535
+73125000000 73128654179 24375000000 24376218059 2900163520 2901381579
+73128000000 73131654287 24376000000 24377218095 2901163520 2902381615
+73131000000 73134654498 24377000000 24378218166 2902163520 2903381686
+73134000000 73137654664 24378000000 24379218221 2903163520 2904381741
+73137000000 73140654775 24379000000 24380218258 2904163520 2905381778
+73140000000 73143654935 24380000000 24381218311 2905163520 2906381831
+73143000000 73146655047 24381000000 24382218349 2906163520 2907381869
+73146000000 73149655245 24382000000 24383218415 2907163520 2908381935
+73149000000 73152655335 24383000000 24384218445 2908163520 2909381965
+73152000000 73155655560 24384000000 24385218520 2909163520 2910382040
+73155000000 73158655692 24385000000 24386218564 2910163520 2911382084
+73158000000 73161655831 24386000000 24387218610 2911163520 2912382130
+73161000000 73164655882 24387000000 24388218627 2912163520 2913382147
+73164000000 73167656093 24388000000 24389218697 2913163520 2914382217
+73167000000 73170656302 24389000000 24390218767 2914163520 2915382287
+73170000000 73173656430 24390000000 24391218810 2915163520 2916382330
+73173000000 73176656573 24391000000 24392218857 2916163520 2917382377
+73176000000 73179656744 24392000000 24393218914 2917163520 2918382434
+73179000000 73182656841 24393000000 24394218947 2918163520 2919382467
+73182000000 73185657054 24394000000 24395219018 2919163520 2920382538
+73185000000 73188657184 24395000000 24396219061 2920163520 2921382581
+73188000000 73191657334 24396000000 24397219111 2921163520 2922382631
+73191000000 73194657494 24397000000 24398219164 2922163520 2923382684
+73194000000 73197657590 24398000000 24399219196 2923163520 2924382716
+73197000000 73200657778 24399000000 24400219259 2924163520 2925382779
+73200000000 73203657946 24400000000 24401219315 2925163520 2926382835
+73203000000 73206658082 24401000000 24402219360 2926163520 2927382880
+73206000000 73209658257 24402000000 24403219419 2927163520 2928382939
+73209000000 73212658379 24403000000 24404219459 2928163520 2929382979
+73212000000 73215658529 24404000000 24405219509 2929163520 2930383029
+73215000000 73218658677 24405000000 24406219559 2930163520 2931383079
+73218000000 73221658883 24406000000 24407219627 2931163520 2932383147
+73221000000 73224658997 24407000000 24408219665 2932163520 2933383185
+73224000000 73227659129 24408000000 24409219709 2933163520 2934383229
+73227000000 73230659303 24409000000 24410219767 2934163520 2935383287
+73230000000 73233659422 24410000000 24411219807 2935163520 2936383327
+73233000000 73236659546 24411000000 24412219848 2936163520 2937383368
+73236000000 73239659765 24412000000 24413219921 2937163520 2938383441
+73239000000 73242659901 24413000000 24414219967 2938163520 2939383487
+73242000000 73245660052 24414000000 24415220017 2939163520 2940383537
+73245000000 73248660212 24415000000 24416220070 2940163520 2941383590
+73248000000 73251660333 24416000000 24417220111 2941163520 2942383631
+73251000000 73254660414 24417000000 24418220138 2942163520 2943383658
+73254000000 73257660622 24418000000 24419220207 2943163520 2944383727
+73257000000 73260660777 24419000000 24420220259 2944163520 2945383779
+73260000000 73263660936 24420000000 24421220312 2945163520 2946383832
+73263000000 73266661088 24421000000 24422220362 2946163520 2947383882
+73266000000 73269661210 24422000000 24423220403 2947163520 2948383923
+73269000000 73272661388 24423000000 24424220462 2948163520 2949383982
+73272000000 73275661537 24424000000 24425220512 2949163520 2950384032
+73275000000 73278661665 24425000000 24426220555 2950163520 2951384075
+73278000000 73281661834 24426000000 24427220611 2951163520 2952384131
+73281000000 73284661954 24427000000 24428220651 2952163520 2953384171
+73284000000 73287661881 24428000000 24429220627 2953163520 2954384147
+73287000000 73290662204 24429000000 24430220734 2954163520 2955384254
+73290000000 73293662457 24430000000 24431220819 2955163520 2956384339
+73293000000 73296662567 24431000000 24432220855 2956163520 2957384375
+73296000000 73299662746 24432000000 24433220915 2957163520 2958384435
+73299000000 73302662794 24433000000 24434220931 2958163520 2959384451
+73302000000 73305663048 24434000000 24435221016 2959163520 2960384536
+73305000000 73308663167 24435000000 24436221055 2960163520 2961384575
+73308000000 73311663338 24436000000 24437221112 2961163520 2962384632
+73311000000 73314663485 24437000000 24438221161 2962163520 2963384681
+73314000000 73317663638 24438000000 24439221212 2963163520 2964384732
+73317000000 73320663784 24439000000 24440221261 2964163520 2965384781
+73320000000 73323663928 24440000000 24441221309 2965163520 2966384829
+73323000000 73326664091 24441000000 24442221363 2966163520 2967384883
+73326000000 73329664243 24442000000 24443221414 2967163520 2968384934
+73329000000 73332664397 24443000000 24444221465 2968163520 2969384985
+73332000000 73335664517 24444000000 24445221505 2969163520 2970385025
+73335000000 73338664726 24445000000 24446221575 2970163520 2971385095
+73338000000 73341664856 24446000000 24447221618 2971163520 2972385138
+73341000000 73344664970 24447000000 24448221656 2972163520 2973385176
+73344000000 73347665131 24448000000 24449221710 2973163520 2974385230
+73347000000 73350665266 24449000000 24450221755 2974163520 2975385275
+73350000000 73353665409 24450000000 24451221803 2975163520 2976385323
+73353000000 73356665509 24451000000 24452221836 2976163520 2977385356
+73356000000 73359665743 24452000000 24453221914 2977163520 2978385434
+73359000000 73362665816 24453000000 24454221938 2978163520 2979385458
+73362000000 73365665937 24454000000 24455221979 2979163520 2980385499
+73365000000 73368666126 24455000000 24456222042 2980163520 2981385562
+73368000000 73371666280 24456000000 24457222093 2981163520 2982385613
+73371000000 73374666459 24457000000 24458222153 2982163520 2983385673
+73374000000 73377666605 24458000000 24459222201 2983163520 2984385721
+73377000000 73380666732 24459000000 24460222244 2984163520 2985385764
+73380000000 73383666906 24460000000 24461222302 2985163520 2986385822
+73383000000 73386666970 24461000000 24462222323 2986163520 2987385843
+73386000000 73389667177 24462000000 24463222392 2987163520 2988385912
+73389000000 73392667358 24463000000 24464222452 2988163520 2989385972
+73392000000 73395667507 24464000000 24465222502 2989163520 2990386022
+73395000000 73398667564 24465000000 24466222521 2990163520 2991386041
+73398000000 73401667760 24466000000 24467222586 2991163520 2992386106
+73401000000 73404667950 24467000000 24468222650 2992163520 2993386170
+73404000000 73407668095 24468000000 24469222698 2993163520 2994386218
+73407000000 73410668267 24469000000 24470222755 2994163520 2995386275
+73410000000 73413668400 24470000000 24471222800 2995163520 2996386320
+73413000000 73416668471 24471000000 24472222823 2996163520 2997386343
+73416000000 73419668697 24472000000 24473222899 2997163520 2998386419
+73419000000 73422668857 24473000000 24474222952 2998163520 2999386472
+73422000000 73425668989 24474000000 24475222996 2999163520 3000386516
+73425000000 73428669097 24475000000 24476223032 3000163520 3001386552
+73428000000 73431669308 24476000000 24477223102 3001163520 3002386622
+73431000000 73434669474 24477000000 24478223158 3002163520 3003386678
+73434000000 73437669585 24478000000 24479223195 3003163520 3004386715
+73437000000 73440669745 24479000000 24480223248 3004163520 3005386768
+73440000000 73443669857 24480000000 24481223285 3005163520 3006386805
+73443000000 73446670055 24481000000 24482223351 3006163520 3007386871
+73446000000 73449670145 24482000000 24483223381 3007163520 3008386901
+73449000000 73452670370 24483000000 24484223456 3008163520 3009386976
+73452000000 73455670502 24484000000 24485223500 3009163520 3010387020
+73455000000 73458670641 24485000000 24486223547 3010163520 3011387067
+73458000000 73461670692 24486000000 24487223564 3011163520 3012387084
+73461000000 73464670903 24487000000 24488223634 3012163520 3013387154
+73464000000 73467671112 24488000000 24489223704 3013163520 3014387224
+73467000000 73470671240 24489000000 24490223746 3014163520 3015387266
+73470000000 73473671383 24490000000 24491223794 3015163520 3016387314
+73473000000 73476671554 24491000000 24492223851 3016163520 3017387371
+73476000000 73479671651 24492000000 24493223883 3017163520 3018387403
+73479000000 73482671864 24493000000 24494223954 3018163520 3019387474
+73482000000 73485671994 24494000000 24495223998 3019163520 3020387518
+73485000000 73488672144 24495000000 24496224048 3020163520 3021387568
+73488000000 73491672304 24496000000 24497224101 3021163520 3022387621
+73491000000 73494672400 24497000000 24498224133 3022163520 3023387653
+73494000000 73497672588 24498000000 24499224196 3023163520 3024387716
+73497000000 73500672756 24499000000 24500224252 3024163520 3025387772
+73500000000 73503672892 24500000000 24501224297 3025163520 3026387817
+73503000000 73506673067 24501000000 24502224355 3026163520 3027387875
+73506000000 73509673189 24502000000 24503224396 3027163520 3028387916
+73509000000 73512673339 24503000000 24504224446 3028163520 3029387966
+73512000000 73515673487 24504000000 24505224495 3029163520 3030388015
+73515000000 73518673693 24505000000 24506224564 3030163520 3031388084
+73518000000 73521673807 24506000000 24507224602 3031163520 3032388122
+73521000000 73524673939 24507000000 24508224646 3032163520 3033388166
+73524000000 73527674113 24508000000 24509224704 3033163520 3034388224
+73527000000 73530674232 24509000000 24510224744 3034163520 3035388264
+73530000000 73533674356 24510000000 24511224785 3035163520 3036388305
+73533000000 73536674575 24511000000 24512224858 3036163520 3037388378
+73536000000 73539674711 24512000000 24513224903 3037163520 3038388423
+73539000000 73542674862 24513000000 24514224954 3038163520 3039388474
+73542000000 73545675022 24514000000 24515225007 3039163520 3040388527
+73545000000 73548675143 24515000000 24516225047 3040163520 3041388567
+73548000000 73551675224 24516000000 24517225074 3041163520 3042388594
+73551000000 73554675432 24517000000 24518225144 3042163520 3043388664
+73554000000 73557675587 24518000000 24519225195 3043163520 3044388715
+73557000000 73560675746 24519000000 24520225248 3044163520 3045388768
+73560000000 73563675898 24520000000 24521225299 3045163520 3046388819
+73563000000 73566676020 24521000000 24522225340 3046163520 3047388860
+73566000000 73569676198 24522000000 24523225399 3047163520 3048388919
+73569000000 73572676347 24523000000 24524225449 3048163520 3049388969
+73572000000 73575676475 24524000000 24525225491 3049163520 3050389011
+73575000000 73578676644 24525000000 24526225548 3050163520 3051389068
+73578000000 73581676764 24526000000 24527225588 3051163520 3052389108
+73581000000 73584676691 24527000000 24528225563 3052163520 3053389083
+73584000000 73587677014 24528000000 24529225671 3053163520 3054389191
+73587000000 73590677267 24529000000 24530225755 3054163520 3055389275
+73590000000 73593677377 24530000000 24531225792 3055163520 3056389312
+73593000000 73596677556 24531000000 24532225852 3056163520 3057389372
+73596000000 73599677604 24532000000 24533225868 3057163520 3058389388
+73599000000 73602677858 24533000000 24534225952 3058163520 3059389472
+73602000000 73605677977 24534000000 24535225992 3059163520 3060389512
+73605000000 73608678148 24535000000 24536226049 3060163520 3061389569
+73608000000 73611678295 24536000000 24537226098 3061163520 3062389618
+73611000000 73614678448 24537000000 24538226149 3062163520 3063389669
+73614000000 73617678594 24538000000 24539226198 3063163520 3064389718
+73617000000 73620678738 24539000000 24540226246 3064163520 3065389766
+73620000000 73623678901 24540000000 24541226300 3065163520 3066389820
+73623000000 73626679053 24541000000 24542226351 3066163520 3067389871
+73626000000 73629679207 24542000000 24543226402 3067163520 3068389922
+73629000000 73632679327 24543000000 24544226442 3068163520 3069389962
+73632000000 73635679536 24544000000 24545226512 3069163520 3070390032
+73635000000 73638679666 24545000000 24546226555 3070163520 3071390075
+73638000000 73641679780 24546000000 24547226593 3071163520 3072390113
+73641000000 73644679941 24547000000 24548226647 3072163520 3073390167
+73644000000 73647680076 24548000000 24549226692 3073163520 3074390212
+73647000000 73650680219 24549000000 24550226739 3074163520 3075390259
+73650000000 73653680319 24550000000 24551226773 3075163520 3076390293
+73653000000 73656680553 24551000000 24552226851 3076163520 3077390371
+73656000000 73659680626 24552000000 24553226875 3077163520 3078390395
+73659000000 73662680747 24553000000 24554226915 3078163520 3079390435
+73662000000 73665680936 24554000000 24555226978 3079163520 3080390498
+73665000000 73668681090 24555000000 24556227030 3080163520 3081390550
+73668000000 73671681269 24556000000 24557227089 3081163520 3082390609
+73671000000 73674681415 24557000000 24558227138 3082163520 3083390658
+73674000000 73677681542 24558000000 24559227180 3083163520 3084390700
+73677000000 73680681716 24559000000 24560227238 3084163520 3085390758
+73680000000 73683681780 24560000000 24561227260 3085163520 3086390780
+73683000000 73686681987 24561000000 24562227329 3086163520 3087390849
+73686000000 73689682168 24562000000 24563227389 3087163520 3088390909
+73689000000 73692682317 24563000000 24564227439 3088163520 3089390959
+73692000000 73695682374 24564000000 24565227458 3089163520 3090390978
+73695000000 73698682570 24565000000 24566227523 3090163520 3091391043
+73698000000 73701682760 24566000000 24567227586 3091163520 3092391106
+73701000000 73704682905 24567000000 24568227635 3092163520 3093391155
+73704000000 73707683077 24568000000 24569227692 3093163520 3094391212
+73707000000 73710683210 24569000000 24570227736 3094163520 3095391256
+73710000000 73713683281 24570000000 24571227760 3095163520 3096391280
+73713000000 73716683507 24571000000 24572227835 3096163520 3097391355
+73716000000 73719683667 24572000000 24573227889 3097163520 3098391409
+73719000000 73722683799 24573000000 24574227933 3098163520 3099391453
+73722000000 73725683907 24574000000 24575227969 3099163520 3100391489
+73725000000 73728684118 24575000000 24576228039 3100163520 3101391559
+73728000000 73731684284 24576000000 24577228094 3101163520 3102391614
+73731000000 73734684395 24577000000 24578228131 3102163520 3103391651
+73734000000 73737684555 24578000000 24579228185 3103163520 3104391705
+73737000000 73740684667 24579000000 24580228222 3104163520 3105391742
+73740000000 73743684865 24580000000 24581228288 3105163520 3106391808
+73743000000 73746684955 24581000000 24582228318 3106163520 3107391838
+73746000000 73749685180 24582000000 24583228393 3107163520 3108391913
+73749000000 73752685312 24583000000 24584228437 3108163520 3109391957
+73752000000 73755685451 24584000000 24585228483 3109163520 3110392003
+73755000000 73758685502 24585000000 24586228500 3110163520 3111392020
+73758000000 73761685713 24586000000 24587228571 3111163520 3112392091
+73761000000 73764685922 24587000000 24588228640 3112163520 3113392160
+73764000000 73767686050 24588000000 24589228683 3113163520 3114392203
+73767000000 73770686193 24589000000 24590228731 3114163520 3115392251
+73770000000 73773686364 24590000000 24591228788 3115163520 3116392308
+73773000000 73776686461 24591000000 24592228820 3116163520 3117392340
+73776000000 73779686674 24592000000 24593228891 3117163520 3118392411
+73779000000 73782686804 24593000000 24594228934 3118163520 3119392454
+73782000000 73785686954 24594000000 24595228984 3119163520 3120392504
+73785000000 73788687114 24595000000 24596229038 3120163520 3121392558
+73788000000 73791687210 24596000000 24597229070 3121163520 3122392590
+73791000000 73794687398 24597000000 24598229132 3122163520 3123392652
+73794000000 73797687566 24598000000 24599229188 3123163520 3124392708
+73797000000 73800687702 24599000000 24600229234 3124163520 3125392754
+73800000000 73803687877 24600000000 24601229292 3125163520 3126392812
+73803000000 73806687999 24601000000 24602229333 3126163520 3127392853
+73806000000 73809688149 24602000000 24603229383 3127163520 3128392903
+73809000000 73812688297 24603000000 24604229432 3128163520 3129392952
+73812000000 73815688503 24604000000 24605229501 3129163520 3130393021
+73815000000 73818688617 24605000000 24606229539 3130163520 3131393059
+73818000000 73821688749 24606000000 24607229583 3131163520 3132393103
+73821000000 73824688923 24607000000 24608229641 3132163520 3133393161
+73824000000 73827689042 24608000000 24609229680 3133163520 3134393200
+73827000000 73830689166 24609000000 24610229722 3134163520 3135393242
+73830000000 73833689385 24610000000 24611229795 3135163520 3136393315
+73833000000 73836689521 24611000000 24612229840 3136163520 3137393360
+73836000000 73839689672 24612000000 24613229890 3137163520 3138393410
+73839000000 73842689832 24613000000 24614229944 3138163520 3139393464
+73842000000 73845689953 24614000000 24615229984 3139163520 3140393504
+73845000000 73848690034 24615000000 24616230011 3140163520 3141393531
+73848000000 73851690242 24616000000 24617230080 3141163520 3142393600
+73851000000 73854690397 24617000000 24618230132 3142163520 3143393652
+73854000000 73857690556 24618000000 24619230185 3143163520 3144393705
+73857000000 73860690708 24619000000 24620230236 3144163520 3145393756
+73860000000 73863690830 24620000000 24621230276 3145163520 3146393796
+73863000000 73866691008 24621000000 24622230336 3146163520 3147393856
+73866000000 73869691157 24622000000 24623230385 3147163520 3148393905
+73869000000 73872691285 24623000000 24624230428 3148163520 3149393948
+73872000000 73875691454 24624000000 24625230484 3149163520 3150394004
+73875000000 73878691574 24625000000 24626230524 3150163520 3151394044
+73878000000 73881691501 24626000000 24627230500 3151163520 3152394020
+73881000000 73884691824 24627000000 24628230608 3152163520 3153394128
+73884000000 73887692077 24628000000 24629230692 3153163520 3154394212
+73887000000 73890692187 24629000000 24630230729 3154163520 3155394249
+73890000000 73893692366 24630000000 24631230788 3155163520 3156394308
+73893000000 73896692414 24631000000 24632230804 3156163520 3157394324
+73896000000 73899692668 24632000000 24633230889 3157163520 3158394409
+73899000000 73902692787 24633000000 24634230929 3158163520 3159394449
+73902000000 73905692958 24634000000 24635230986 3159163520 3160394506
+73905000000 73908693105 24635000000 24636231035 3160163520 3161394555
+73908000000 73911693258 24636000000 24637231086 3161163520 3162394606
+73911000000 73914693404 24637000000 24638231134 3162163520 3163394654
+73914000000 73917693548 24638000000 24639231182 3163163520 3164394702
+73917000000 73920693711 24639000000 24640231237 3164163520 3165394757
+73920000000 73923693863 24640000000 24641231287 3165163520 3166394807
+73923000000 73926694017 24641000000 24642231339 3166163520 3167394859
+73926000000 73929694137 24642000000 24643231379 3167163520 3168394899
+73929000000 73932694346 24643000000 24644231448 3168163520 3169394968
+73932000000 73935694476 24644000000 24645231492 3169163520 3170395012
+73935000000 73938694590 24645000000 24646231530 3170163520 3171395050
+73938000000 73941694751 24646000000 24647231583 3171163520 3172395103
+73941000000 73944694886 24647000000 24648231628 3172163520 3173395148
+73944000000 73947695029 24648000000 24649231676 3173163520 3174395196
+73947000000 73950695129 24649000000 24650231709 3174163520 3175395229
+73950000000 73953695363 24650000000 24651231787 3175163520 3176395307
+73953000000 73956695436 24651000000 24652231812 3176163520 3177395332
+73956000000 73959695557 24652000000 24653231852 3177163520 3178395372
+73959000000 73962695746 24653000000 24654231915 3178163520 3179395435
+73962000000 73965695900 24654000000 24655231966 3179163520 3180395486
+73965000000 73968696079 24655000000 24656232026 3180163520 3181395546
+73968000000 73971696225 24656000000 24657232075 3181163520 3182395595
+73971000000 73974696352 24657000000 24658232117 3182163520 3183395637
+73974000000 73977696526 24658000000 24659232175 3183163520 3184395695
+73977000000 73980696590 24659000000 24660232196 3184163520 3185395716
+73980000000 73983696797 24660000000 24661232265 3185163520 3186395785
+73983000000 73986696978 24661000000 24662232326 3186163520 3187395846
+73986000000 73989697127 24662000000 24663232375 3187163520 3188395895
+73989000000 73992697184 24663000000 24664232394 3188163520 3189395914
+73992000000 73995697380 24664000000 24665232460 3189163520 3190395980
+73995000000 73998697570 24665000000 24666232523 3190163520 3191396043
+73998000000 74001697715 24666000000 24667232571 3191163520 3192396091
+74001000000 74004697887 24667000000 24668232629 3192163520 3193396149
+74004000000 74007698020 24668000000 24669232673 3193163520 3194396193
+74007000000 74010698091 24669000000 24670232697 3194163520 3195396217
+74010000000 74013698317 24670000000 24671232772 3195163520 3196396292
+74013000000 74016698477 24671000000 24672232825 3196163520 3197396345
+74016000000 74019698609 24672000000 24673232869 3197163520 3198396389
+74019000000 74022698717 24673000000 24674232905 3198163520 3199396425
+74022000000 74025698928 24674000000 24675232976 3199163520 3200396496
+74025000000 74028699094 24675000000 24676233031 3200163520 3201396551
+74028000000 74031699205 24676000000 24677233068 3201163520 3202396588
+74031000000 74034699365 24677000000 24678233121 3202163520 3203396641
+74034000000 74037699477 24678000000 24679233159 3203163520 3204396679
+74037000000 74040699675 24679000000 24680233225 3204163520 3205396745
+74040000000 74043699765 24680000000 24681233255 3205163520 3206396775
+74043000000 74046699990 24681000000 24682233330 3206163520 3207396850
+74046000000 74049700122 24682000000 24683233374 3207163520 3208396894
+74049000000 74052700261 24683000000 24684233420 3208163520 3209396940
+74052000000 74055700312 24684000000 24685233437 3209163520 3210396957
+74055000000 74058700523 24685000000 24686233507 3210163520 3211397027
+74058000000 74061700732 24686000000 24687233577 3211163520 3212397097
+74061000000 74064700860 24687000000 24688233620 3212163520 3213397140
+74064000000 74067701003 24688000000 24689233667 3213163520 3214397187
+74067000000 74070701174 24689000000 24690233724 3214163520 3215397244
+74070000000 74073701271 24690000000 24691233757 3215163520 3216397277
+74073000000 74076701484 24691000000 24692233828 3216163520 3217397348
+74076000000 74079701614 24692000000 24693233871 3217163520 3218397391
+74079000000 74082701764 24693000000 24694233921 3218163520 3219397441
+74082000000 74085701924 24694000000 24695233974 3219163520 3220397494
+74085000000 74088702020 24695000000 24696234006 3220163520 3221397526
+74088000000 74091702208 24696000000 24697234069 3221163520 3222397589
+74091000000 74094702376 24697000000 24698234125 3222163520 3223397645
+74094000000 74097702512 24698000000 24699234170 3223163520 3224397690
+74097000000 74100702687 24699000000 24700234229 3224163520 3225397749
+74100000000 74103702809 24700000000 24701234269 3225163520 3226397789
+74103000000 74106702959 24701000000 24702234319 3226163520 3227397839
+74106000000 74109703107 24702000000 24703234369 3227163520 3228397889
+74109000000 74112703313 24703000000 24704234437 3228163520 3229397957
+74112000000 74115703427 24704000000 24705234475 3229163520 3230397995
+74115000000 74118703559 24705000000 24706234519 3230163520 3231398039
+74118000000 74121703733 24706000000 24707234577 3231163520 3232398097
+74121000000 74124703852 24707000000 24708234617 3232163520 3233398137
+74124000000 74127703976 24708000000 24709234658 3233163520 3234398178
+74127000000 74130704195 24709000000 24710234731 3234163520 3235398251
+74130000000 74133704331 24710000000 24711234777 3235163520 3236398297
+74133000000 74136704482 24711000000 24712234827 3236163520 3237398347
+74136000000 74139704642 24712000000 24713234880 3237163520 3238398400
+74139000000 74142704763 24713000000 24714234921 3238163520 3239398441
+74142000000 74145704844 24714000000 24715234948 3239163520 3240398468
+74145000000 74148705052 24715000000 24716235017 3240163520 3241398537
+74148000000 74151705207 24716000000 24717235069 3241163520 3242398589
+74151000000 74154705366 24717000000 24718235122 3242163520 3243398642
+74154000000 74157705518 24718000000 24719235172 3243163520 3244398692
+74157000000 74160705640 24719000000 24720235213 3244163520 3245398733
+74160000000 74163705818 24720000000 24721235272 3245163520 3246398792
+74163000000 74166705967 24721000000 24722235322 3246163520 3247398842
+74166000000 74169706095 24722000000 24723235365 3247163520 3248398885
+74169000000 74172706264 24723000000 24724235421 3248163520 3249398941
+74172000000 74175706384 24724000000 24725235461 3249163520 3250398981
+74175000000 74178706311 24725000000 24726235437 3250163520 3251398957
+74178000000 74181706634 24726000000 24727235544 3251163520 3252399064
+74181000000 74184706887 24727000000 24728235629 3252163520 3253399149
+74184000000 74187706997 24728000000 24729235665 3253163520 3254399185
+74187000000 74190707176 24729000000 24730235725 3254163520 3255399245
+74190000000 74193707224 24730000000 24731235741 3255163520 3256399261
+74193000000 74196707478 24731000000 24732235826 3256163520 3257399346
+74196000000 74199707597 24732000000 24733235865 3257163520 3258399385
+74199000000 74202707768 24733000000 24734235922 3258163520 3259399442
+74202000000 74205707915 24734000000 24735235971 3259163520 3260399491
+74205000000 74208708068 24735000000 24736236022 3260163520 3261399542
+74208000000 74211708214 24736000000 24737236071 3261163520 3262399591
+74211000000 74214708358 24737000000 24738236119 3262163520 3263399639
+74214000000 74217708521 24738000000 24739236173 3263163520 3264399693
+74217000000 74220708673 24739000000 24740236224 3264163520 3265399744
+74220000000 74223708827 24740000000 24741236275 3265163520 3266399795
+74223000000 74226708947 24741000000 24742236315 3266163520 3267399835
+74226000000 74229709156 24742000000 24743236385 3267163520 3268399905
+74229000000 74232709286 24743000000 24744236428 3268163520 3269399948
+74232000000 74235709400 24744000000 24745236466 3269163520 3270399986
+74235000000 74238709561 24745000000 24746236520 3270163520 3271400040
+74238000000 74241709696 24746000000 24747236565 3271163520 3272400085
+74241000000 74244709839 24747000000 24748236613 3272163520 3273400133
+74244000000 74247709939 24748000000 24749236646 3273163520 3274400166
+74247000000 74250710173 24749000000 24750236724 3274163520 3275400244
+74250000000 74253710246 24750000000 24751236748 3275163520 3276400268
+74253000000 74256710367 24751000000 24752236789 3276163520 3277400309
+74256000000 74259710556 24752000000 24753236852 3277163520 3278400372
+74259000000 74262710710 24753000000 24754236903 3278163520 3279400423
+74262000000 74265710889 24754000000 24755236963 3279163520 3280400483
+74265000000 74268711035 24755000000 24756237011 3280163520 3281400531
+74268000000 74271711162 24756000000 24757237054 3281163520 3282400574
+74271000000 74274711336 24757000000 24758237112 3282163520 3283400632
+74274000000 74277711400 24758000000 24759237133 3283163520 3284400653
+74277000000 74280711607 24759000000 24760237202 3284163520 3285400722
+74280000000 74283711788 24760000000 24761237262 3285163520 3286400782
+74283000000 74286711937 24761000000 24762237312 3286163520 3287400832
+74286000000 74289711994 24762000000 24763237331 3287163520 3288400851
+74289000000 74292712190 24763000000 24764237396 3288163520 3289400916
+74292000000 74295712380 24764000000 24765237460 3289163520 3290400980
+74295000000 74298712525 24765000000 24766237508 3290163520 3291401028
+74298000000 74301712697 24766000000 24767237565 3291163520 3292401085
+74301000000 74304712830 24767000000 24768237610 3292163520 3293401130
+74304000000 74307712901 24768000000 24769237633 3293163520 3294401153
+74307000000 74310713127 24769000000 24770237709 3294163520 3295401229
+74310000000 74313713287 24770000000 24771237762 3295163520 3296401282
+74313000000 74316713419 24771000000 24772237806 3296163520 3297401326
+74316000000 74319713527 24772000000 24773237842 3297163520 3298401362
+74319000000 74322713738 24773000000 24774237912 3298163520 3299401432
+74322000000 74325713904 24774000000 24775237968 3299163520 3300401488
+74325000000 74328714015 24775000000 24776238005 3300163520 3301401525
+74328000000 74331714175 24776000000 24777238058 3301163520 3302401578
+74331000000 74334714287 24777000000 24778238095 3302163520 3303401615
+74334000000 74337714485 24778000000 24779238161 3303163520 3304401681
+74337000000 74340714575 24779000000 24780238191 3304163520 3305401711
+74340000000 74343714800 24780000000 24781238266 3305163520 3306401786
+74343000000 74346714932 24781000000 24782238310 3306163520 3307401830
+74346000000 74349715071 24782000000 24783238357 3307163520 3308401877
+74349000000 74352715122 24783000000 24784238374 3308163520 3309401894
+74352000000 74355715333 24784000000 24785238444 3309163520 3310401964
+74355000000 74358715542 24785000000 24786238514 3310163520 3311402034
+74358000000 74361715670 24786000000 24787238556 3311163520 3312402076
+74361000000 74364715813 24787000000 24788238604 3312163520 3313402124
+74364000000 74367715984 24788000000 24789238661 3313163520 3314402181
+74367000000 74370716081 24789000000 24790238693 3314163520 3315402213
+74370000000 74373716294 24790000000 24791238764 3315163520 3316402284
+74373000000 74376716424 24791000000 24792238808 3316163520 3317402328
+74376000000 74379716574 24792000000 24793238858 3317163520 3318402378
+74379000000 74382716734 24793000000 24794238911 3318163520 3319402431
+74382000000 74385716830 24794000000 24795238943 3319163520 3320402463
+74385000000 74388717018 24795000000 24796239006 3320163520 3321402526
+74388000000 74391717186 24796000000 24797239062 3321163520 3322402582
+74391000000 74394717322 24797000000 24798239107 3322163520 3323402627
+74394000000 74397717497 24798000000 24799239165 3323163520 3324402685
+74397000000 74400717619 24799000000 24800239206 3324163520 3325402726
+74400000000 74403717769 24800000000 24801239256 3325163520 3326402776
+74403000000 74406717917 24801000000 24802239305 3326163520 3327402825
+74406000000 74409718123 24802000000 24803239374 3327163520 3328402894
+74409000000 74412718237 24803000000 24804239412 3328163520 3329402932
+74412000000 74415718369 24804000000 24805239456 3329163520 3330402976
+74415000000 74418718543 24805000000 24806239514 3330163520 3331403034
+74418000000 74421718662 24806000000 24807239554 3331163520 3332403074
+74421000000 74424718786 24807000000 24808239595 3332163520 3333403115
+74424000000 74427719005 24808000000 24809239668 3333163520 3334403188
+74427000000 74430719141 24809000000 24810239713 3334163520 3335403233
+74430000000 74433719292 24810000000 24811239764 3335163520 3336403284
+74433000000 74436719452 24811000000 24812239817 3336163520 3337403337
+74436000000 74439719573 24812000000 24813239857 3337163520 3338403377
+74439000000 74442719654 24813000000 24814239884 3338163520 3339403404
+74442000000 74445719862 24814000000 24815239954 3339163520 3340403474
+74445000000 74448720017 24815000000 24816240005 3340163520 3341403525
+74448000000 74451720176 24816000000 24817240058 3341163520 3342403578
+74451000000 74454720328 24817000000 24818240109 3342163520 3343403629
+74454000000 74457720450 24818000000 24819240150 3343163520 3344403670
+74457000000 74460720628 24819000000 24820240209 3344163520 3345403729
+74460000000 74463720777 24820000000 24821240259 3345163520 3346403779
+74463000000 74466720905 24821000000 24822240301 3346163520 3347403821
+74466000000 74469721074 24822000000 24823240358 3347163520 3348403878
+74469000000 74472721194 24823000000 24824240398 3348163520 3349403918
+74472000000 74475721121 24824000000 24825240373 3349163520 3350403893
+74475000000 74478721444 24825000000 24826240481 3350163520 3351404001
+74478000000 74481721697 24826000000 24827240565 3351163520 3352404085
+74481000000 74484721807 24827000000 24828240602 3352163520 3353404122
+74484000000 74487721986 24828000000 24829240662 3353163520 3354404182
+74487000000 74490722034 24829000000 24830240678 3354163520 3355404198
+74490000000 74493722288 24830000000 24831240762 3355163520 3356404282
+74493000000 74496722407 24831000000 24832240802 3356163520 3357404322
+74496000000 74499722578 24832000000 24833240859 3357163520 3358404379
+74499000000 74502722725 24833000000 24834240908 3358163520 3359404428
+74502000000 74505722878 24834000000 24835240959 3359163520 3360404479
+74505000000 74508723024 24835000000 24836241008 3360163520 3361404528
+74508000000 74511723168 24836000000 24837241056 3361163520 3362404576
+74511000000 74514723331 24837000000 24838241110 3362163520 3363404630
+74514000000 74517723483 24838000000 24839241161 3363163520 3364404681
+74517000000 74520723637 24839000000 24840241212 3364163520 3365404732
+74520000000 74523723757 24840000000 24841241252 3365163520 3366404772
+74523000000 74526723966 24841000000 24842241322 3366163520 3367404842
+74526000000 74529724096 24842000000 24843241365 3367163520 3368404885
+74529000000 74532724210 24843000000 24844241403 3368163520 3369404923
+74532000000 74535724371 24844000000 24845241457 3369163520 3370404977
+74535000000 74538724506 24845000000 24846241502 3370163520 3371405022
+74538000000 74541724649 24846000000 24847241549 3371163520 3372405069
+74541000000 74544724749 24847000000 24848241583 3372163520 3373405103
+74544000000 74547724983 24848000000 24849241661 3373163520 3374405181
+74547000000 74550725056 24849000000 24850241685 3374163520 3375405205
+74550000000 74553725177 24850000000 24851241725 3375163520 3376405245
+74553000000 74556725366 24851000000 24852241788 3376163520 3377405308
+74556000000 74559725520 24852000000 24853241840 3377163520 3378405360
+74559000000 74562725699 24853000000 24854241899 3378163520 3379405419
+74562000000 74565725845 24854000000 24855241948 3379163520 3380405468
+74565000000 74568725972 24855000000 24856241990 3380163520 3381405510
+74568000000 74571726146 24856000000 24857242048 3381163520 3382405568
+74571000000 74574726210 24857000000 24858242070 3382163520 3383405590
+74574000000 74577726417 24858000000 24859242139 3383163520 3384405659
+74577000000 74580726598 24859000000 24860242199 3384163520 3385405719
+74580000000 74583726747 24860000000 24861242249 3385163520 3386405769
+74583000000 74586726804 24861000000 24862242268 3386163520 3387405788
+74586000000 74589727000 24862000000 24863242333 3387163520 3388405853
+74589000000 74592727190 24863000000 24864242396 3388163520 3389405916
+74592000000 74595727335 24864000000 24865242445 3389163520 3390405965
+74595000000 74598727507 24865000000 24866242502 3390163520 3391406022
+74598000000 74601727640 24866000000 24867242546 3391163520 3392406066
+74601000000 74604727711 24867000000 24868242570 3392163520 3393406090
+74604000000 74607727937 24868000000 24869242645 3393163520 3394406165
+74607000000 74610728097 24869000000 24870242699 3394163520 3395406219
+74610000000 74613728229 24870000000 24871242743 3395163520 3396406263
+74613000000 74616728337 24871000000 24872242779 3396163520 3397406299
+74616000000 74619728548 24872000000 24873242849 3397163520 3398406369
+74619000000 74622728714 24873000000 24874242904 3398163520 3399406424
+74622000000 74625728825 24874000000 24875242941 3399163520 3400406461
+74625000000 74628728985 24875000000 24876242995 3400163520 3401406515
+74628000000 74631729097 24876000000 24877243032 3401163520 3402406552
+74631000000 74634729295 24877000000 24878243098 3402163520 3403406618
+74634000000 74637729385 24878000000 24879243128 3403163520 3404406648
+74637000000 74640729610 24879000000 24880243203 3404163520 3405406723
+74640000000 74643729742 24880000000 24881243247 3405163520 3406406767
+74643000000 74646729881 24881000000 24882243293 3406163520 3407406813
+74646000000 74649729932 24882000000 24883243310 3407163520 3408406830
+74649000000 74652730143 24883000000 24884243381 3408163520 3409406901
+74652000000 74655730352 24884000000 24885243450 3409163520 3410406970
+74655000000 74658730480 24885000000 24886243493 3410163520 3411407013
+74658000000 74661730623 24886000000 24887243541 3411163520 3412407061
+74661000000 74664730794 24887000000 24888243598 3412163520 3413407118
+74664000000 74667730891 24888000000 24889243630 3413163520 3414407150
+74667000000 74670731104 24889000000 24890243701 3414163520 3415407221
+74670000000 74673731234 24890000000 24891243744 3415163520 3416407264
+74673000000 74676731384 24891000000 24892243794 3416163520 3417407314
+74676000000 74679731544 24892000000 24893243848 3417163520 3418407368
+74679000000 74682731640 24893000000 24894243880 3418163520 3419407400
+74682000000 74685731828 24894000000 24895243942 3419163520 3420407462
+74685000000 74688731996 24895000000 24896243998 3420163520 3421407518
+74688000000 74691732132 24896000000 24897244044 3421163520 3422407564
+74691000000 74694732307 24897000000 24898244102 3422163520 3423407622
+74694000000 74697732429 24898000000 24899244143 3423163520 3424407663
+74697000000 74700732579 24899000000 24900244193 3424163520 3425407713
+74700000000 74703732727 24900000000 24901244242 3425163520 3426407762
+74703000000 74706732933 24901000000 24902244311 3426163520 3427407831
+74706000000 74709733047 24902000000 24903244349 3427163520 3428407869
+74709000000 74712733179 24903000000 24904244393 3428163520 3429407913
+74712000000 74715733353 24904000000 24905244451 3429163520 3430407971
+74715000000 74718733472 24905000000 24906244490 3430163520 3431408010
+74718000000 74721733596 24906000000 24907244532 3431163520 3432408052
+74721000000 74724733815 24907000000 24908244605 3432163520 3433408125
+74724000000 74727733951 24908000000 24909244650 3433163520 3434408170
+74727000000 74730734102 24909000000 24910244700 3434163520 3435408220
+74730000000 74733734262 24910000000 24911244754 3435163520 3436408274
+74733000000 74736734383 24911000000 24912244794 3436163520 3437408314
+74736000000 74739734464 24912000000 24913244821 3437163520 3438408341
+74739000000 74742734672 24913000000 24914244890 3438163520 3439408410
+74742000000 74745734827 24914000000 24915244942 3439163520 3440408462
+74745000000 74748734986 24915000000 24916244995 3440163520 3441408515
+74748000000 74751735138 24916000000 24917245046 3441163520 3442408566
+74751000000 74754735260 24917000000 24918245086 3442163520 3443408606
+74754000000 74757735438 24918000000 24919245146 3443163520 3444408666
+74757000000 74760735587 24919000000 24920245195 3444163520 3445408715
+74760000000 74763735715 24920000000 24921245238 3445163520 3446408758
+74763000000 74766735884 24921000000 24922245294 3446163520 3447408814
+74766000000 74769736004 24922000000 24923245334 3447163520 3448408854
+74769000000 74772735931 24923000000 24924245310 3448163520 3449408830
+74772000000 74775736254 24924000000 24925245418 3449163520 3450408938
+74775000000 74778736507 24925000000 24926245502 3450163520 3451409022
+74778000000 74781736617 24926000000 24927245539 3451163520 3452409059
+74781000000 74784736796 24927000000 24928245598 3452163520 3453409118
+74784000000 74787736844 24928000000 24929245614 3453163520 3454409134
+74787000000 74790737098 24929000000 24930245699 3454163520 3455409219
+74790000000 74793737217 24930000000 24931245739 3455163520 3456409259
+74793000000 74796737388 24931000000 24932245796 3456163520 3457409316
+74796000000 74799737535 24932000000 24933245845 3457163520 3458409365
+74799000000 74802737688 24933000000 24934245896 3458163520 3459409416
+74802000000 74805737834 24934000000 24935245944 3459163520 3460409464
+74805000000 74808737978 24935000000 24936245992 3460163520 3461409512
+74808000000 74811738141 24936000000 24937246047 3461163520 3462409567
+74811000000 74814738293 24937000000 24938246097 3462163520 3463409617
+74814000000 74817738447 24938000000 24939246149 3463163520 3464409669
+74817000000 74820738567 24939000000 24940246189 3464163520 3465409709
+74820000000 74823738776 24940000000 24941246258 3465163520 3466409778
+74823000000 74826738906 24941000000 24942246302 3466163520 3467409822
+74826000000 74829739020 24942000000 24943246340 3467163520 3468409860
+74829000000 74832739181 24943000000 24944246393 3468163520 3469409913
+74832000000 74835739316 24944000000 24945246438 3469163520 3470409958
+74835000000 74838739459 24945000000 24946246486 3470163520 3471410006
+74838000000 74841739559 24946000000 24947246519 3471163520 3472410039
+74841000000 74844739793 24947000000 24948246597 3472163520 3473410117
+74844000000 74847739866 24948000000 24949246622 3473163520 3474410142
+74847000000 74850739987 24949000000 24950246662 3474163520 3475410182
+74850000000 74853740176 24950000000 24951246725 3475163520 3476410245
+74853000000 74856740330 24951000000 24952246776 3476163520 3477410296
+74856000000 74859740509 24952000000 24953246836 3477163520 3478410356
+74859000000 74862740655 24953000000 24954246885 3478163520 3479410405
+74862000000 74865740782 24954000000 24955246927 3479163520 3480410447
+74865000000 74868740956 24955000000 24956246985 3480163520 3481410505
+74868000000 74871741020 24956000000 24957247006 3481163520 3482410526
+74871000000 74874741227 24957000000 24958247075 3482163520 3483410595
+74874000000 74877741408 24958000000 24959247136 3483163520 3484410656
+74877000000 74880741557 24959000000 24960247185 3484163520 3485410705
+74880000000 74883741614 24960000000 24961247204 3485163520 3486410724
+74883000000 74886741810 24961000000 24962247270 3486163520 3487410790
+74886000000 74889742000 24962000000 24963247333 3487163520 3488410853
+74889000000 74892742145 24963000000 24964247381 3488163520 3489410901
+74892000000 74895742317 24964000000 24965247439 3489163520 3490410959
+74895000000 74898742450 24965000000 24966247483 3490163520 3491411003
+74898000000 74901742521 24966000000 24967247507 3491163520 3492411027
+74901000000 74904742747 24967000000 24968247582 3492163520 3493411102
+74904000000 74907742907 24968000000 24969247635 3493163520 3494411155
+74907000000 74910743039 24969000000 24970247679 3494163520 3495411199
+74910000000 74913743147 24970000000 24971247715 3495163520 3496411235
+74913000000 74916743358 24971000000 24972247786 3496163520 3497411306
+74916000000 74919743524 24972000000 24973247841 3497163520 3498411361
+74919000000 74922743635 24973000000 24974247878 3498163520 3499411398
+74922000000 74925743795 24974000000 24975247931 3499163520 3500411451
+74925000000 74928743907 24975000000 24976247969 3500163520 3501411489
+74928000000 74931744105 24976000000 24977248035 3501163520 3502411555
+74931000000 74934744195 24977000000 24978248065 3502163520 3503411585
+74934000000 74937744420 24978000000 24979248140 3503163520 3504411660
+74937000000 74940744552 24979000000 24980248184 3504163520 3505411704
+74940000000 74943744691 24980000000 24981248230 3505163520 3506411750
+74943000000 74946744742 24981000000 24982248247 3506163520 3507411767
+74946000000 74949744953 24982000000 24983248317 3507163520 3508411837
+74949000000 74952745162 24983000000 24984248387 3508163520 3509411907
+74952000000 74955745290 24984000000 24985248430 3509163520 3510411950
+74955000000 74958745433 24985000000 24986248477 3510163520 3511411997
+74958000000 74961745604 24986000000 24987248534 3511163520 3512412054
+74961000000 74964745701 24987000000 24988248567 3512163520 3513412087
+74964000000 74967745914 24988000000 24989248638 3513163520 3514412158
+74967000000 74970746044 24989000000 24990248681 3514163520 3515412201
+74970000000 74973746194 24990000000 24991248731 3515163520 3516412251
+74973000000 74976746354 24991000000 24992248784 3516163520 3517412304
+74976000000 74979746450 24992000000 24993248816 3517163520 3518412336
+74979000000 74982746638 24993000000 24994248879 3518163520 3519412399
+74982000000 74985746806 24994000000 24995248935 3519163520 3520412455
+74985000000 74988746942 24995000000 24996248980 3520163520 3521412500
+74988000000 74991747117 24996000000 24997249039 3521163520 3522412559
+74991000000 74994747239 24997000000 24998249079 3522163520 3523412599
+74994000000 74997747389 24998000000 24999249129 3523163520 3524412649
+74997000000 75000747537 24999000000 25000249179 3524163520 3525412699
+75000000000 75003747743 25000000000 25001249247 3525163520 3526412767
+75003000000 75006747857 25001000000 25002249285 3526163520 3527412805
+75006000000 75009747989 25002000000 25003249329 3527163520 3528412849
+75009000000 75012748163 25003000000 25004249387 3528163520 3529412907
+75012000000 75015748282 25004000000 25005249427 3529163520 3530412947
+75015000000 75018748406 25005000000 25006249468 3530163520 3531412988
+75018000000 75021748625 25006000000 25007249541 3531163520 3532413061
+75021000000 75024748761 25007000000 25008249587 3532163520 3533413107
+75024000000 75027748912 25008000000 25009249637 3533163520 3534413157
+75027000000 75030749072 25009000000 25010249690 3534163520 3535413210
+75030000000 75033749193 25010000000 25011249731 3535163520 3536413251
+75033000000 75036749274 25011000000 25012249758 3536163520 3537413278
+75036000000 75039749482 25012000000 25013249827 3537163520 3538413347
+75039000000 75042749637 25013000000 25014249879 3538163520 3539413399
+75042000000 75045749796 25014000000 25015249932 3539163520 3540413452
+75045000000 75048749948 25015000000 25016249982 3540163520 3541413502
+75048000000 75051750070 25016000000 25017250023 3541163520 3542413543
+75051000000 75054750248 25017000000 25018250082 3542163520 3543413602
+75054000000 75057750397 25018000000 25019250132 3543163520 3544413652
+75057000000 75060750525 25019000000 25020250175 3544163520 3545413695
+75060000000 75063750694 25020000000 25021250231 3545163520 3546413751
+75063000000 75066750814 25021000000 25022250271 3546163520 3547413791
+75066000000 75069750741 25022000000 25023250247 3547163520 3548413767
+75069000000 75072751064 25023000000 25024250354 3548163520 3549413874
+75072000000 75075751317 25024000000 25025250439 3549163520 3550413959
+75075000000 75078751427 25025000000 25026250475 3550163520 3551413995
+75078000000 75081751606 25026000000 25027250535 3551163520 3552414055
+75081000000 75084751654 25027000000 25028250551 3552163520 3553414071
+75084000000 75087751908 25028000000 25029250636 3553163520 3554414156
+75087000000 75090752027 25029000000 25030250675 3554163520 3555414195
+75090000000 75093752198 25030000000 25031250732 3555163520 3556414252
+75093000000 75096752345 25031000000 25032250781 3556163520 3557414301
+75096000000 75099752498 25032000000 25033250832 3557163520 3558414352
+75099000000 75102752644 25033000000 25034250881 3558163520 3559414401
+75102000000 75105752788 25034000000 25035250929 3559163520 3560414449
+75105000000 75108752951 25035000000 25036250983 3560163520 3561414503
+75108000000 75111753103 25036000000 25037251034 3561163520 3562414554
+75111000000 75114753257 25037000000 25038251085 3562163520 3563414605
+75114000000 75117753377 25038000000 25039251125 3563163520 3564414645
+75117000000 75120753586 25039000000 25040251195 3564163520 3565414715
+75120000000 75123753716 25040000000 25041251238 3565163520 3566414758
+75123000000 75126753830 25041000000 25042251276 3566163520 3567414796
+75126000000 75129753991 25042000000 25043251330 3567163520 3568414850
+75129000000 75132754126 25043000000 25044251375 3568163520 3569414895
+75132000000 75135754269 25044000000 25045251423 3569163520 3570414943
+75135000000 75138754369 25045000000 25046251456 3570163520 3571414976
+75138000000 75141754603 25046000000 25047251534 3571163520 3572415054
+75141000000 75144754676 25047000000 25048251558 3572163520 3573415078
+75144000000 75147754797 25048000000 25049251599 3573163520 3574415119
+75147000000 75150754986 25049000000 25050251662 3574163520 3575415182
+75150000000 75153755140 25050000000 25051251713 3575163520 3576415233
+75153000000 75156755319 25051000000 25052251773 3576163520 3577415293
+75156000000 75159755465 25052000000 25053251821 3577163520 3578415341
+75159000000 75162755592 25053000000 25054251864 3578163520 3579415384
+75162000000 75165755766 25054000000 25055251922 3579163520 3580415442
+75165000000 75168755830 25055000000 25056251943 3580163520 3581415463
+75168000000 75171756037 25056000000 25057252012 3581163520 3582415532
+75171000000 75174756218 25057000000 25058252072 3582163520 3583415592
+75174000000 75177756367 25058000000 25059252122 3583163520 3584415642
+75177000000 75180756424 25059000000 25060252141 3584163520 3585415661
+75180000000 75183756620 25060000000 25061252206 3585163520 3586415726
+75183000000 75186756810 25061000000 25062252270 3586163520 3587415790
+75186000000 75189756955 25062000000 25063252318 3587163520 3588415838
+75189000000 75192757127 25063000000 25064252375 3588163520 3589415895
+75192000000 75195757260 25064000000 25065252420 3589163520 3590415940
+75195000000 75198757331 25065000000 25066252443 3590163520 3591415963
+75198000000 75201757557 25066000000 25067252519 3591163520 3592416039
+75201000000 75204757717 25067000000 25068252572 3592163520 3593416092
+75204000000 75207757849 25068000000 25069252616 3593163520 3594416136
+75207000000 75210757957 25069000000 25070252652 3594163520 3595416172
+75210000000 75213758168 25070000000 25071252722 3595163520 3596416242
+75213000000 75216758334 25071000000 25072252778 3596163520 3597416298
+75216000000 75219758445 25072000000 25073252815 3597163520 3598416335
+75219000000 75222758605 25073000000 25074252868 3598163520 3599416388
+75222000000 75225758717 25074000000 25075252905 3599163520 3600416425
+75225000000 75228758915 25075000000 25076252971 3600163520 3601416491
+75228000000 75231759005 25076000000 25077253001 3601163520 3602416521
+75231000000 75234759230 25077000000 25078253076 3602163520 3603416596
+75234000000 75237759362 25078000000 25079253120 3603163520 3604416640
+75237000000 75240759501 25079000000 25080253167 3604163520 3605416687
+75240000000 75243759552 25080000000 25081253184 3605163520 3606416704
+75243000000 75246759763 25081000000 25082253254 3606163520 3607416774
+75246000000 75249759972 25082000000 25083253324 3607163520 3608416844
+75249000000 75252760100 25083000000 25084253366 3608163520 3609416886
+75252000000 75255760243 25084000000 25085253414 3609163520 3610416934
+75255000000 75258760414 25085000000 25086253471 3610163520 3611416991
+75258000000 75261760511 25086000000 25087253503 3611163520 3612417023
+75261000000 75264760724 25087000000 25088253574 3612163520 3613417094
+75264000000 75267760854 25088000000 25089253618 3613163520 3614417138
+75267000000 75270761004 25089000000 25090253668 3614163520 3615417188
+75270000000 75273761164 25090000000 25091253721 3615163520 3616417241
+75273000000 75276761260 25091000000 25092253753 3616163520 3617417273
+75276000000 75279761448 25092000000 25093253816 3617163520 3618417336
+75279000000 75282761616 25093000000 25094253872 3618163520 3619417392
+75282000000 75285761752 25094000000 25095253917 3619163520 3620417437
+75285000000 75288761927 25095000000 25096253975 3620163520 3621417495
+75288000000 75291762049 25096000000 25097254016 3621163520 3622417536
+75291000000 75294762199 25097000000 25098254066 3622163520 3623417586
+75294000000 75297762347 25098000000 25099254115 3623163520 3624417635
+75297000000 75300762553 25099000000 25100254184 3624163520 3625417704
+75300000000 75303762667 25100000000 25101254222 3625163520 3626417742
+75303000000 75306762799 25101000000 25102254266 3626163520 3627417786
+75306000000 75309762973 25102000000 25103254324 3627163520 3628417844
+75309000000 75312763092 25103000000 25104254364 3628163520 3629417884
+75312000000 75315763216 25104000000 25105254405 3629163520 3630417925
+75315000000 75318763435 25105000000 25106254478 3630163520 3631417998
+75318000000 75321763571 25106000000 25107254523 3631163520 3632418043
+75321000000 75324763722 25107000000 25108254574 3632163520 3633418094
+75324000000 75327763882 25108000000 25109254627 3633163520 3634418147
+75327000000 75330764003 25109000000 25110254667 3634163520 3635418187
+75330000000 75333764084 25110000000 25111254694 3635163520 3636418214
+75333000000 75336764292 25111000000 25112254764 3636163520 3637418284
+75336000000 75339764447 25112000000 25113254815 3637163520 3638418335
+75339000000 75342764606 25113000000 25114254868 3638163520 3639418388
+75342000000 75345764758 25114000000 25115254919 3639163520 3640418439
+75345000000 75348764880 25115000000 25116254960 3640163520 3641418480
+75348000000 75351765058 25116000000 25117255019 3641163520 3642418539
+75351000000 75354765207 25117000000 25118255069 3642163520 3643418589
+75354000000 75357765335 25118000000 25119255111 3643163520 3644418631
+75357000000 75360765504 25119000000 25120255168 3644163520 3645418688
+75360000000 75363765624 25120000000 25121255208 3645163520 3646418728
+75363000000 75366765551 25121000000 25122255183 3646163520 3647418703
+75366000000 75369765874 25122000000 25123255291 3647163520 3648418811
+75369000000 75372766127 25123000000 25124255375 3648163520 3649418895
+75372000000 75375766237 25124000000 25125255412 3649163520 3650418932
+75375000000 75378766416 25125000000 25126255472 3650163520 3651418992
+75378000000 75381766464 25126000000 25127255488 3651163520 3652419008
+75381000000 75384766718 25127000000 25128255572 3652163520 3653419092
+75384000000 75387766837 25128000000 25129255612 3653163520 3654419132
+75387000000 75390767008 25129000000 25130255669 3654163520 3655419189
+75390000000 75393767155 25130000000 25131255718 3655163520 3656419238
+75393000000 75396767308 25131000000 25132255769 3656163520 3657419289
+75396000000 75399767454 25132000000 25133255818 3657163520 3658419338
+75399000000 75402767598 25133000000 25134255866 3658163520 3659419386
+75402000000 75405767761 25134000000 25135255920 3659163520 3660419440
+75405000000 75408767913 25135000000 25136255971 3660163520 3661419491
+75408000000 75411768067 25136000000 25137256022 3661163520 3662419542
+75411000000 75414768187 25137000000 25138256062 3662163520 3663419582
+75414000000 75417768396 25138000000 25139256132 3663163520 3664419652
+75417000000 75420768526 25139000000 25140256175 3664163520 3665419695
+75420000000 75423768640 25140000000 25141256213 3665163520 3666419733
+75423000000 75426768801 25141000000 25142256267 3666163520 3667419787
+75426000000 75429768936 25142000000 25143256312 3667163520 3668419832
+75429000000 75432769079 25143000000 25144256359 3668163520 3669419879
+75432000000 75435769179 25144000000 25145256393 3669163520 3670419913
+75435000000 75438769413 25145000000 25146256471 3670163520 3671419991
+75438000000 75441769486 25146000000 25147256495 3671163520 3672420015
+75441000000 75444769607 25147000000 25148256535 3672163520 3673420055
+75444000000 75447769796 25148000000 25149256598 3673163520 3674420118
+75447000000 75450769950 25149000000 25150256650 3674163520 3675420170
+75450000000 75453770129 25150000000 25151256709 3675163520 3676420229
+75453000000 75456770275 25151000000 25152256758 3676163520 3677420278
+75456000000 75459770402 25152000000 25153256800 3677163520 3678420320
+75459000000 75462770576 25153000000 25154256858 3678163520 3679420378
+75462000000 75465770640 25154000000 25155256880 3679163520 3680420400
+75465000000 75468770847 25155000000 25156256949 3680163520 3681420469
+75468000000 75471771028 25156000000 25157257009 3681163520 3682420529
+75471000000 75474771177 25157000000 25158257059 3682163520 3683420579
+75474000000 75477771234 25158000000 25159257078 3683163520 3684420598
+75477000000 75480771430 25159000000 25160257143 3684163520 3685420663
+75480000000 75483771620 25160000000 25161257206 3685163520 3686420726
+75483000000 75486771765 25161000000 25162257255 3686163520 3687420775
+75486000000 75489771937 25162000000 25163257312 3687163520 3688420832
+75489000000 75492772070 25163000000 25164257356 3688163520 3689420876
+75492000000 75495772141 25164000000 25165257380 3689163520 3690420900
+75495000000 75498772367 25165000000 25166257455 3690163520 3691420975
+75498000000 75501772527 25166000000 25167257509 3691163520 3692421029
+75501000000 75504772659 25167000000 25168257553 3692163520 3693421073
+75504000000 75507772767 25168000000 25169257589 3693163520 3694421109
+75507000000 75510772978 25169000000 25170257659 3694163520 3695421179
+75510000000 75513773144 25170000000 25171257714 3695163520 3696421234
+75513000000 75516773255 25171000000 25172257751 3696163520 3697421271
+75516000000 75519773415 25172000000 25173257805 3697163520 3698421325
+75519000000 75522773527 25173000000 25174257842 3698163520 3699421362
+75522000000 75525773725 25174000000 25175257908 3699163520 3700421428
+75525000000 75528773815 25175000000 25176257938 3700163520 3701421458
+75528000000 75531774040 25176000000 25177258013 3701163520 3702421533
+75531000000 75534774172 25177000000 25178258057 3702163520 3703421577
+75534000000 75537774311 25178000000 25179258103 3703163520 3704421623
+75537000000 75540774362 25179000000 25180258120 3704163520 3705421640
+75540000000 75543774573 25180000000 25181258191 3705163520 3706421711
+75543000000 75546774782 25181000000 25182258260 3706163520 3707421780
+75546000000 75549774910 25182000000 25183258303 3707163520 3708421823
+75549000000 75552775053 25183000000 25184258351 3708163520 3709421871
+75552000000 75555775224 25184000000 25185258408 3709163520 3710421928
+75555000000 75558775321 25185000000 25186258440 3710163520 3711421960
+75558000000 75561775534 25186000000 25187258511 3711163520 3712422031
+75561000000 75564775664 25187000000 25188258554 3712163520 3713422074
+75564000000 75567775814 25188000000 25189258604 3713163520 3714422124
+75567000000 75570775974 25189000000 25190258658 3714163520 3715422178
+75570000000 75573776070 25190000000 25191258690 3715163520 3716422210
+75573000000 75576776258 25191000000 25192258752 3716163520 3717422272
+75576000000 75579776426 25192000000 25193258808 3717163520 3718422328
+75579000000 75582776562 25193000000 25194258854 3718163520 3719422374
+75582000000 75585776737 25194000000 25195258912 3719163520 3720422432
+75585000000 75588776859 25195000000 25196258953 3720163520 3721422473
+75588000000 75591777009 25196000000 25197259003 3721163520 3722422523
+75591000000 75594777157 25197000000 25198259052 3722163520 3723422572
+75594000000 75597777363 25198000000 25199259121 3723163520 3724422641
+75597000000 75600777477 25199000000 25200259159 3724163520 3725422679
+75600000000 75603777609 25200000000 25201259203 3725163520 3726422723
+75603000000 75606777783 25201000000 25202259261 3726163520 3727422781
+75606000000 75609777902 25202000000 25203259300 3727163520 3728422820
+75609000000 75612778026 25203000000 25204259342 3728163520 3729422862
+75612000000 75615778245 25204000000 25205259415 3729163520 3730422935
+75615000000 75618778381 25205000000 25206259460 3730163520 3731422980
+75618000000 75621778532 25206000000 25207259510 3731163520 3732423030
+75621000000 75624778692 25207000000 25208259564 3732163520 3733423084
+75624000000 75627778813 25208000000 25209259604 3733163520 3734423124
+75627000000 75630778894 25209000000 25210259631 3734163520 3735423151
+75630000000 75633779102 25210000000 25211259700 3735163520 3736423220
+75633000000 75636779257 25211000000 25212259752 3736163520 3737423272
+75636000000 75639779416 25212000000 25213259805 3737163520 3738423325
+75639000000 75642779568 25213000000 25214259856 3738163520 3739423376
+75642000000 75645779690 25214000000 25215259896 3739163520 3740423416
+75645000000 75648779868 25215000000 25216259956 3740163520 3741423476
+75648000000 75651780017 25216000000 25217260005 3741163520 3742423525
+75651000000 75654780145 25217000000 25218260048 3742163520 3743423568
+75654000000 75657780314 25218000000 25219260104 3743163520 3744423624
+75657000000 75660780434 25219000000 25220260144 3744163520 3745423664
+75660000000 75663780361 25220000000 25221260120 3745163520 3746423640
+75663000000 75666780684 25221000000 25222260228 3746163520 3747423748
+75666000000 75669780937 25222000000 25223260312 3747163520 3748423832
+75669000000 75672781047 25223000000 25224260349 3748163520 3749423869
+75672000000 75675781226 25224000000 25225260408 3749163520 3750423928
+75675000000 75678781274 25225000000 25226260424 3750163520 3751423944
+75678000000 75681781528 25226000000 25227260509 3751163520 3752424029
+75681000000 75684781647 25227000000 25228260549 3752163520 3753424069
+75684000000 75687781818 25228000000 25229260606 3753163520 3754424126
+75687000000 75690781965 25229000000 25230260655 3754163520 3755424175
+75690000000 75693782118 25230000000 25231260706 3755163520 3756424226
+75693000000 75696782264 25231000000 25232260754 3756163520 3757424274
+75696000000 75699782408 25232000000 25233260802 3757163520 3758424322
+75699000000 75702782571 25233000000 25234260857 3758163520 3759424377
+75702000000 75705782723 25234000000 25235260907 3759163520 3760424427
+75705000000 75708782877 25235000000 25236260959 3760163520 3761424479
+75708000000 75711782997 25236000000 25237260999 3761163520 3762424519
+75711000000 75714783206 25237000000 25238261068 3762163520 3763424588
+75714000000 75717783336 25238000000 25239261112 3763163520 3764424632
+75717000000 75720783450 25239000000 25240261150 3764163520 3765424670
+75720000000 75723783611 25240000000 25241261203 3765163520 3766424723
+75723000000 75726783746 25241000000 25242261248 3766163520 3767424768
+75726000000 75729783889 25242000000 25243261296 3767163520 3768424816
+75729000000 75732783989 25243000000 25244261329 3768163520 3769424849
+75732000000 75735784223 25244000000 25245261407 3769163520 3770424927
+75735000000 75738784296 25245000000 25246261432 3770163520 3771424952
+75738000000 75741784417 25246000000 25247261472 3771163520 3772424992
+75741000000 75744784606 25247000000 25248261535 3772163520 3773425055
+75744000000 75747784760 25248000000 25249261586 3773163520 3774425106
+75747000000 75750784939 25249000000 25250261646 3774163520 3775425166
+75750000000 75753785085 25250000000 25251261695 3775163520 3776425215
+75753000000 75756785212 25251000000 25252261737 3776163520 3777425257
+75756000000 75759785386 25252000000 25253261795 3777163520 3778425315
+75759000000 75762785450 25253000000 25254261816 3778163520 3779425336
+75762000000 75765785657 25254000000 25255261885 3779163520 3780425405
+75765000000 75768785838 25255000000 25256261946 3780163520 3781425466
+75768000000 75771785987 25256000000 25257261995 3781163520 3782425515
+75771000000 75774786044 25257000000 25258262014 3782163520 3783425534
+75774000000 75777786240 25258000000 25259262080 3783163520 3784425600
+75777000000 75780786430 25259000000 25260262143 3784163520 3785425663
+75780000000 75783786575 25260000000 25261262191 3785163520 3786425711
+75783000000 75786786747 25261000000 25262262249 3786163520 3787425769
+75786000000 75789786880 25262000000 25263262293 3787163520 3788425813
+75789000000 75792786951 25263000000 25264262317 3788163520 3789425837
+75792000000 75795787177 25264000000 25265262392 3789163520 3790425912
+75795000000 75798787337 25265000000 25266262445 3790163520 3791425965
+75798000000 75801787469 25266000000 25267262489 3791163520 3792426009
+75801000000 75804787577 25267000000 25268262525 3792163520 3793426045
+75804000000 75807787788 25268000000 25269262596 3793163520 3794426116
+75807000000 75810787954 25269000000 25270262651 3794163520 3795426171
+75810000000 75813788065 25270000000 25271262688 3795163520 3796426208
+75813000000 75816788225 25271000000 25272262741 3796163520 3797426261
+75816000000 75819788337 25272000000 25273262779 3797163520 3798426299
+75819000000 75822788535 25273000000 25274262845 3798163520 3799426365
+75822000000 75825788625 25274000000 25275262875 3799163520 3800426395
+75825000000 75828788850 25275000000 25276262950 3800163520 3801426470
+75828000000 75831788982 25276000000 25277262994 3801163520 3802426514
+75831000000 75834789121 25277000000 25278263040 3802163520 3803426560
+75834000000 75837789172 25278000000 25279263057 3803163520 3804426577
+75837000000 75840789383 25279000000 25280263127 3804163520 3805426647
+75840000000 75843789592 25280000000 25281263197 3805163520 3806426717
+75843000000 75846789720 25281000000 25282263240 3806163520 3807426760
+75846000000 75849789863 25282000000 25283263287 3807163520 3808426807
+75849000000 75852790034 25283000000 25284263344 3808163520 3809426864
+75852000000 75855790131 25284000000 25285263377 3809163520 3810426897
+75855000000 75858790344 25285000000 25286263448 3810163520 3811426968
+75858000000 75861790474 25286000000 25287263491 3811163520 3812427011
+75861000000 75864790624 25287000000 25288263541 3812163520 3813427061
+75864000000 75867790784 25288000000 25289263594 3813163520 3814427114
+75867000000 75870790880 25289000000 25290263626 3814163520 3815427146
+75870000000 75873791068 25290000000 25291263689 3815163520 3816427209
+75873000000 75876791236 25291000000 25292263745 3816163520 3817427265
+75876000000 75879791372 25292000000 25293263790 3817163520 3818427310
+75879000000 75882791547 25293000000 25294263849 3818163520 3819427369
+75882000000 75885791669 25294000000 25295263889 3819163520 3820427409
+75885000000 75888791819 25295000000 25296263939 3820163520 3821427459
+75888000000 75891791967 25296000000 25297263989 3821163520 3822427509
+75891000000 75894792173 25297000000 25298264057 3822163520 3823427577
+75894000000 75897792287 25298000000 25299264095 3823163520 3824427615
+75897000000 75900792419 25299000000 25300264139 3824163520 3825427659
+75900000000 75903792593 25300000000 25301264197 3825163520 3826427717
+75903000000 75906792712 25301000000 25302264237 3826163520 3827427757
+75906000000 75909792836 25302000000 25303264278 3827163520 3828427798
+75909000000 75912793055 25303000000 25304264351 3828163520 3829427871
+75912000000 75915793191 25304000000 25305264397 3829163520 3830427917
+75915000000 75918793342 25305000000 25306264447 3830163520 3831427967
+75918000000 75921793502 25306000000 25307264500 3831163520 3832428020
+75921000000 75924793623 25307000000 25308264541 3832163520 3833428061
+75924000000 75927793704 25308000000 25309264568 3833163520 3834428088
+75927000000 75930793912 25309000000 25310264637 3834163520 3835428157
+75930000000 75933794067 25310000000 25311264689 3835163520 3836428209
+75933000000 75936794226 25311000000 25312264742 3836163520 3837428262
+75936000000 75939794378 25312000000 25313264792 3837163520 3838428312
+75939000000 75942794500 25313000000 25314264833 3838163520 3839428353
+75942000000 75945794678 25314000000 25315264892 3839163520 3840428412
+75945000000 75948794827 25315000000 25316264942 3840163520 3841428462
+75948000000 75951794955 25316000000 25317264985 3841163520 3842428505
+75951000000 75954795124 25317000000 25318265041 3842163520 3843428561
+75954000000 75957795244 25318000000 25319265081 3843163520 3844428601
+75957000000 75960795171 25319000000 25320265057 3844163520 3845428577
+75960000000 75963795494 25320000000 25321265164 3845163520 3846428684
+75963000000 75966795747 25321000000 25322265249 3846163520 3847428769
+75966000000 75969795857 25322000000 25323265285 3847163520 3848428805
+75969000000 75972796036 25323000000 25324265345 3848163520 3849428865
+75972000000 75975796084 25324000000 25325265361 3849163520 3850428881
+75975000000 75978796338 25325000000 25326265446 3850163520 3851428966
+75978000000 75981796457 25326000000 25327265485 3851163520 3852429005
+75981000000 75984796628 25327000000 25328265542 3852163520 3853429062
+75984000000 75987796775 25328000000 25329265591 3853163520 3854429111
+75987000000 75990796928 25329000000 25330265642 3854163520 3855429162
+75990000000 75993797074 25330000000 25331265691 3855163520 3856429211
+75993000000 75996797218 25331000000 25332265739 3856163520 3857429259
+75996000000 75999797381 25332000000 25333265793 3857163520 3858429313
+75999000000 76002797533 25333000000 25334265844 3858163520 3859429364
+76002000000 76005797687 25334000000 25335265895 3859163520 3860429415
+76005000000 76008797807 25335000000 25336265935 3860163520 3861429455
+76008000000 76011798016 25336000000 25337266005 3861163520 3862429525
+76011000000 76014798146 25337000000 25338266048 3862163520 3863429568
+76014000000 76017798260 25338000000 25339266086 3863163520 3864429606
+76017000000 76020798421 25339000000 25340266140 3864163520 3865429660
+76020000000 76023798556 25340000000 25341266185 3865163520 3866429705
+76023000000 76026798699 25341000000 25342266233 3866163520 3867429753
+76026000000 76029798799 25342000000 25343266266 3867163520 3868429786
+76029000000 76032799033 25343000000 25344266344 3868163520 3869429864
+76032000000 76035799106 25344000000 25345266368 3869163520 3870429888
+76035000000 76038799227 25345000000 25346266409 3870163520 3871429929
+76038000000 76041799416 25346000000 25347266472 3871163520 3872429992
+76041000000 76044799570 25347000000 25348266523 3872163520 3873430043
+76044000000 76047799749 25348000000 25349266583 3873163520 3874430103
+76047000000 76050799895 25349000000 25350266631 3874163520 3875430151
+76050000000 76053800022 25350000000 25351266674 3875163520 3876430194
+76053000000 76056800196 25351000000 25352266732 3876163520 3877430252
+76056000000 76059800260 25352000000 25353266753 3877163520 3878430273
+76059000000 76062800467 25353000000 25354266822 3878163520 3879430342
+76062000000 76065800648 25354000000 25355266882 3879163520 3880430402
+76065000000 76068800797 25355000000 25356266932 3880163520 3881430452
+76068000000 76071800854 25356000000 25357266951 3881163520 3882430471
+76071000000 76074801050 25357000000 25358267016 3882163520 3883430536
+76074000000 76077801240 25358000000 25359267080 3883163520 3884430600
+76077000000 76080801385 25359000000 25360267128 3884163520 3885430648
+76080000000 76083801557 25360000000 25361267185 3885163520 3886430705
+76083000000 76086801690 25361000000 25362267230 3886163520 3887430750
+76086000000 76089801761 25362000000 25363267253 3887163520 3888430773
+76089000000 76092801987 25363000000 25364267329 3888163520 3889430849
+76092000000 76095802147 25364000000 25365267382 3889163520 3890430902
+76095000000 76098802279 25365000000 25366267426 3890163520 3891430946
+76098000000 76101802387 25366000000 25367267462 3891163520 3892430982
+76101000000 76104802598 25367000000 25368267532 3892163520 3893431052
+76104000000 76107802764 25368000000 25369267588 3893163520 3894431108
+76107000000 76110802875 25369000000 25370267625 3894163520 3895431145
+76110000000 76113803035 25370000000 25371267678 3895163520 3896431198
+76113000000 76116803147 25371000000 25372267715 3896163520 3897431235
+76116000000 76119803345 25372000000 25373267781 3897163520 3898431301
+76119000000 76122803435 25373000000 25374267811 3898163520 3899431331
+76122000000 76125803660 25374000000 25375267886 3899163520 3900431406
+76125000000 76128803792 25375000000 25376267930 3900163520 3901431450
+76128000000 76131803931 25376000000 25377267977 3901163520 3902431497
+76131000000 76134803982 25377000000 25378267994 3902163520 3903431514
+76134000000 76137804193 25378000000 25379268064 3903163520 3904431584
+76137000000 76140804402 25379000000 25380268134 3904163520 3905431654
+76140000000 76143804530 25380000000 25381268176 3905163520 3906431696
+76143000000 76146804673 25381000000 25382268224 3906163520 3907431744
+76146000000 76149804844 25382000000 25383268281 3907163520 3908431801
+76149000000 76152804941 25383000000 25384268313 3908163520 3909431833
+76152000000 76155805154 25384000000 25385268384 3909163520 3910431904
+76155000000 76158805284 25385000000 25386268428 3910163520 3911431948
+76158000000 76161805434 25386000000 25387268478 3911163520 3912431998
+76161000000 76164805594 25387000000 25388268531 3912163520 3913432051
+76164000000 76167805690 25388000000 25389268563 3913163520 3914432083
+76167000000 76170805878 25389000000 25390268626 3914163520 3915432146
+76170000000 76173806046 25390000000 25391268682 3915163520 3916432202
+76173000000 76176806182 25391000000 25392268727 3916163520 3917432247
+76176000000 76179806357 25392000000 25393268785 3917163520 3918432305
+76179000000 76182806479 25393000000 25394268826 3918163520 3919432346
+76182000000 76185806629 25394000000 25395268876 3919163520 3920432396
+76185000000 76188806777 25395000000 25396268925 3920163520 3921432445
+76188000000 76191806983 25396000000 25397268994 3921163520 3922432514
+76191000000 76194807097 25397000000 25398269032 3922163520 3923432552
+76194000000 76197807229 25398000000 25399269076 3923163520 3924432596
+76197000000 76200807403 25399000000 25400269134 3924163520 3925432654
+76200000000 76203807522 25400000000 25401269174 3925163520 3926432694
+76203000000 76206807646 25401000000 25402269215 3926163520 3927432735
+76206000000 76209807865 25402000000 25403269288 3927163520 3928432808
+76209000000 76212808001 25403000000 25404269333 3928163520 3929432853
+76212000000 76215808152 25404000000 25405269384 3929163520 3930432904
+76215000000 76218808312 25405000000 25406269437 3930163520 3931432957
+76218000000 76221808433 25406000000 25407269477 3931163520 3932432997
+76221000000 76224808514 25407000000 25408269504 3932163520 3933433024
+76224000000 76227808722 25408000000 25409269574 3933163520 3934433094
+76227000000 76230808877 25409000000 25410269625 3934163520 3935433145
+76230000000 76233809036 25410000000 25411269678 3935163520 3936433198
+76233000000 76236809188 25411000000 25412269729 3936163520 3937433249
+76236000000 76239809310 25412000000 25413269770 3937163520 3938433290
+76239000000 76242809488 25413000000 25414269829 3938163520 3939433349
+76242000000 76245809637 25414000000 25415269879 3939163520 3940433399
+76245000000 76248809765 25415000000 25416269921 3940163520 3941433441
+76248000000 76251809934 25416000000 25417269978 3941163520 3942433498
+76251000000 76254810054 25417000000 25418270018 3942163520 3943433538
+76254000000 76257809981 25418000000 25419269993 3943163520 3944433513
+76257000000 76260810304 25419000000 25420270101 3944163520 3945433621
+76260000000 76263810557 25420000000 25421270185 3945163520 3946433705
+76263000000 76266810667 25421000000 25422270222 3946163520 3947433742
+76266000000 76269810846 25422000000 25423270282 3947163520 3948433802
+76269000000 76272810894 25423000000 25424270298 3948163520 3949433818
+76272000000 76275811148 25424000000 25425270382 3949163520 3950433902
+76275000000 76278811267 25425000000 25426270422 3950163520 3951433942
+76278000000 76281811438 25426000000 25427270479 3951163520 3952433999
+76281000000 76284811585 25427000000 25428270528 3952163520 3953434048
+76284000000 76287811738 25428000000 25429270579 3953163520 3954434099
+76287000000 76290811884 25429000000 25430270628 3954163520 3955434148
+76290000000 76293812028 25430000000 25431270676 3955163520 3956434196
+76293000000 76296812191 25431000000 25432270730 3956163520 3957434250
+76296000000 76299812343 25432000000 25433270781 3957163520 3958434301
+76299000000 76302812497 25433000000 25434270832 3958163520 3959434352
+76302000000 76305812617 25434000000 25435270872 3959163520 3960434392
+76305000000 76308812826 25435000000 25436270942 3960163520 3961434462
+76308000000 76311812956 25436000000 25437270985 3961163520 3962434505
+76311000000 76314813070 25437000000 25438271023 3962163520 3963434543
+76314000000 76317813231 25438000000 25439271077 3963163520 3964434597
+76317000000 76320813366 25439000000 25440271122 3964163520 3965434642
+76320000000 76323813509 25440000000 25441271169 3965163520 3966434689
+76323000000 76326813609 25441000000 25442271203 3966163520 3967434723
+76326000000 76329813843 25442000000 25443271281 3967163520 3968434801
+76329000000 76332813916 25443000000 25444271305 3968163520 3969434825
+76332000000 76335814037 25444000000 25445271345 3969163520 3970434865
+76335000000 76338814226 25445000000 25446271408 3970163520 3971434928
+76338000000 76341814380 25446000000 25447271460 3971163520 3972434980
+76341000000 76344814559 25447000000 25448271519 3972163520 3973435039
+76344000000 76347814705 25448000000 25449271568 3973163520 3974435088
+76347000000 76350814832 25449000000 25450271610 3974163520 3975435130
+76350000000 76353815006 25450000000 25451271668 3975163520 3976435188
+76353000000 76356815070 25451000000 25452271690 3976163520 3977435210
+76356000000 76359815277 25452000000 25453271759 3977163520 3978435279
+76359000000 76362815458 25453000000 25454271819 3978163520 3979435339
+76362000000 76365815607 25454000000 25455271869 3979163520 3980435389
+76365000000 76368815664 25455000000 25456271888 3980163520 3981435408
+76368000000 76371815860 25456000000 25457271953 3981163520 3982435473
+76371000000 76374816050 25457000000 25458272016 3982163520 3983435536
+76374000000 76377816195 25458000000 25459272065 3983163520 3984435585
+76377000000 76380816367 25459000000 25460272122 3984163520 3985435642
+76380000000 76383816500 25460000000 25461272166 3985163520 3986435686
+76383000000 76386816571 25461000000 25462272190 3986163520 3987435710
+76386000000 76389816797 25462000000 25463272265 3987163520 3988435785
+76389000000 76392816957 25463000000 25464272319 3988163520 3989435839
+76392000000 76395817089 25464000000 25465272363 3989163520 3990435883
+76395000000 76398817197 25465000000 25466272399 3990163520 3991435919
+76398000000 76401817408 25466000000 25467272469 3991163520 3992435989
+76401000000 76404817574 25467000000 25468272524 3992163520 3993436044
+76404000000 76407817685 25468000000 25469272561 3993163520 3994436081
+76407000000 76410817845 25469000000 25470272615 3994163520 3995436135
+76410000000 76413817957 25470000000 25471272652 3995163520 3996436172
+76413000000 76416818155 25471000000 25472272718 3996163520 3997436238
+76416000000 76419818245 25472000000 25473272748 3997163520 3998436268
+76419000000 76422818470 25473000000 25474272823 3998163520 3999436343
+76422000000 76425818602 25474000000 25475272867 3999163520 4000436387
+76425000000 76428818741 25475000000 25476272913 4000163520 4001436433
+76428000000 76431818792 25476000000 25477272930 4001163520 4002436450
+76431000000 76434819003 25477000000 25478273001 4002163520 4003436521
+76434000000 76437819212 25478000000 25479273070 4003163520 4004436590
+76437000000 76440819340 25479000000 25480273113 4004163520 4005436633
+76440000000 76443819483 25480000000 25481273161 4005163520 4006436681
+76443000000 76446819654 25481000000 25482273218 4006163520 4007436738
+76446000000 76449819751 25482000000 25483273250 4007163520 4008436770
+76449000000 76452819964 25483000000 25484273321 4008163520 4009436841
+76452000000 76455820094 25484000000 25485273364 4009163520 4010436884
+76455000000 76458820244 25485000000 25486273414 4010163520 4011436934
+76458000000 76461820404 25486000000 25487273468 4011163520 4012436988
+76461000000 76464820500 25487000000 25488273500 4012163520 4013437020
+76464000000 76467820688 25488000000 25489273562 4013163520 4014437082
+76467000000 76470820856 25489000000 25490273618 4014163520 4015437138
+76470000000 76473820992 25490000000 25491273664 4015163520 4016437184
+76473000000 76476821167 25491000000 25492273722 4016163520 4017437242
+76476000000 76479821289 25492000000 25493273763 4017163520 4018437283
+76479000000 76482821439 25493000000 25494273813 4018163520 4019437333
+76482000000 76485821587 25494000000 25495273862 4019163520 4020437382
+76485000000 76488821793 25495000000 25496273931 4020163520 4021437451
+76488000000 76491821907 25496000000 25497273969 4021163520 4022437489
+76491000000 76494822039 25497000000 25498274013 4022163520 4023437533
+76494000000 76497822213 25498000000 25499274071 4023163520 4024437591
+76497000000 76500822332 25499000000 25500274110 4024163520 4025437630
+76500000000 76503822456 25500000000 25501274152 4025163520 4026437672
+76503000000 76506822675 25501000000 25502274225 4026163520 4027437745
+76506000000 76509822811 25502000000 25503274270 4027163520 4028437790
+76509000000 76512822962 25503000000 25504274320 4028163520 4029437840
+76512000000 76515823122 25504000000 25505274374 4029163520 4030437894
+76515000000 76518823243 25505000000 25506274414 4030163520 4031437934
+76518000000 76521823324 25506000000 25507274441 4031163520 4032437961
+76521000000 76524823532 25507000000 25508274510 4032163520 4033438030
+76524000000 76527823687 25508000000 25509274562 4033163520 4034438082
+76527000000 76530823846 25509000000 25510274615 4034163520 4035438135
+76530000000 76533823998 25510000000 25511274666 4035163520 4036438186
+76533000000 76536824120 25511000000 25512274706 4036163520 4037438226
+76536000000 76539824298 25512000000 25513274766 4037163520 4038438286
+76539000000 76542824447 25513000000 25514274815 4038163520 4039438335
+76542000000 76545824575 25514000000 25515274858 4039163520 4040438378
+76545000000 76548824744 25515000000 25516274914 4040163520 4041438434
+76548000000 76551824864 25516000000 25517274954 4041163520 4042438474
+76551000000 76554824791 25517000000 25518274930 4042163520 4043438450
+76554000000 76557825114 25518000000 25519275038 4043163520 4044438558
+76557000000 76560825367 25519000000 25520275122 4044163520 4045438642
+76560000000 76563825477 25520000000 25521275159 4045163520 4046438679
+76563000000 76566825656 25521000000 25522275218 4046163520 4047438738
+76566000000 76569825704 25522000000 25523275234 4047163520 4048438754
+76569000000 76572825958 25523000000 25524275319 4048163520 4049438839
+76572000000 76575826077 25524000000 25525275359 4049163520 4050438879
+76575000000 76578826248 25525000000 25526275416 4050163520 4051438936
+76578000000 76581826395 25526000000 25527275465 4051163520 4052438985
+76581000000 76584826548 25527000000 25528275516 4052163520 4053439036
+76584000000 76587826694 25528000000 25529275564 4053163520 4054439084
+76587000000 76590826838 25529000000 25530275612 4054163520 4055439132
+76590000000 76593827001 25530000000 25531275667 4055163520 4056439187
+76593000000 76596827153 25531000000 25532275717 4056163520 4057439237
+76596000000 76599827307 25532000000 25533275769 4057163520 4058439289
+76599000000 76602827427 25533000000 25534275809 4058163520 4059439329
+76602000000 76605827636 25534000000 25535275878 4059163520 4060439398
+76605000000 76608827766 25535000000 25536275922 4060163520 4061439442
+76608000000 76611827880 25536000000 25537275960 4061163520 4062439480
+76611000000 76614828041 25537000000 25538276013 4062163520 4063439533
+76614000000 76617828176 25538000000 25539276058 4063163520 4064439578
+76617000000 76620828319 25539000000 25540276106 4064163520 4065439626
+76620000000 76623828419 25540000000 25541276139 4065163520 4066439659
+76623000000 76626828653 25541000000 25542276217 4066163520 4067439737
+76626000000 76629828726 25542000000 25543276242 4067163520 4068439762
+76629000000 76632828847 25543000000 25544276282 4068163520 4069439802
+76632000000 76635829036 25544000000 25545276345 4069163520 4070439865
+76635000000 76638829190 25545000000 25546276396 4070163520 4071439916
+76638000000 76641829369 25546000000 25547276456 4071163520 4072439976
+76641000000 76644829515 25547000000 25548276505 4072163520 4073440025
+76644000000 76647829642 25548000000 25549276547 4073163520 4074440067
+76647000000 76650829816 25549000000 25550276605 4074163520 4075440125
+76650000000 76653829880 25550000000 25551276626 4075163520 4076440146
+76653000000 76656830087 25551000000 25552276695 4076163520 4077440215
+76656000000 76659830268 25552000000 25553276756 4077163520 4078440276
+76659000000 76662830417 25553000000 25554276805 4078163520 4079440325
+76662000000 76665830474 25554000000 25555276824 4079163520 4080440344
+76665000000 76668830670 25555000000 25556276890 4080163520 4081440410
+76668000000 76671830860 25556000000 25557276953 4081163520 4082440473
+76671000000 76674831005 25557000000 25558277001 4082163520 4083440521
+76674000000 76677831177 25558000000 25559277059 4083163520 4084440579
+76677000000 76680831310 25559000000 25560277103 4084163520 4085440623
+76680000000 76683831381 25560000000 25561277127 4085163520 4086440647
+76683000000 76686831607 25561000000 25562277202 4086163520 4087440722
+76686000000 76689831767 25562000000 25563277255 4087163520 4088440775
+76689000000 76692831899 25563000000 25564277299 4088163520 4089440819
+76692000000 76695832007 25564000000 25565277335 4089163520 4090440855
+76695000000 76698832218 25565000000 25566277406 4090163520 4091440926
+76698000000 76701832384 25566000000 25567277461 4091163520 4092440981
+76701000000 76704832495 25567000000 25568277498 4092163520 4093441018
+76704000000 76707832655 25568000000 25569277551 4093163520 4094441071
+76707000000 76710832767 25569000000 25570277589 4094163520 4095441109
+76710000000 76713832965 25570000000 25571277655 4095163520 4096441175
+76713000000 76716833055 25571000000 25572277685 4096163520 4097441205
+76716000000 76719833280 25572000000 25573277760 4097163520 4098441280
+76719000000 76722833412 25573000000 25574277804 4098163520 4099441324
+76722000000 76725833551 25574000000 25575277850 4099163520 4100441370
+76725000000 76728833602 25575000000 25576277867 4100163520 4101441387
+76728000000 76731833813 25576000000 25577277937 4101163520 4102441457
+76731000000 76734834022 25577000000 25578278007 4102163520 4103441527
+76734000000 76737834150 25578000000 25579278050 4103163520 4104441570
+76737000000 76740834293 25579000000 25580278097 4104163520 4105441617
+76740000000 76743834464 25580000000 25581278154 4105163520 4106441674
+76743000000 76746834561 25581000000 25582278187 4106163520 4107441707
+76746000000 76749834774 25582000000 25583278258 4107163520 4108441778
+76749000000 76752834904 25583000000 25584278301 4108163520 4109441821
+76752000000 76755835054 25584000000 25585278351 4109163520 4110441871
+76755000000 76758835214 25585000000 25586278404 4110163520 4111441924
+76758000000 76761835310 25586000000 25587278436 4111163520 4112441956
+76761000000 76764835498 25587000000 25588278499 4112163520 4113442019
+76764000000 76767835666 25588000000 25589278555 4113163520 4114442075
+76767000000 76770835802 25589000000 25590278600 4114163520 4115442120
+76770000000 76773835977 25590000000 25591278659 4115163520 4116442179
+76773000000 76776836099 25591000000 25592278699 4116163520 4117442219
+76776000000 76779836249 25592000000 25593278749 4117163520 4118442269
+76779000000 76782836397 25593000000 25594278799 4118163520 4119442319
+76782000000 76785836603 25594000000 25595278867 4119163520 4120442387
+76785000000 76788836717 25595000000 25596278905 4120163520 4121442425
+76788000000 76791836849 25596000000 25597278949 4121163520 4122442469
+76791000000 76794837023 25597000000 25598279007 4122163520 4123442527
+76794000000 76797837142 25598000000 25599279047 4123163520 4124442567
+76797000000 76800837266 25599000000 25600279088 4124163520 4125442608
+76800000000 76803837485 25600000000 25601279161 4125163520 4126442681
+76803000000 76806837621 25601000000 25602279207 4126163520 4127442727
+76806000000 76809837772 25602000000 25603279257 4127163520 4128442777
+76809000000 76812837932 25603000000 25604279310 4128163520 4129442830
+76812000000 76815838053 25604000000 25605279351 4129163520 4130442871
+76815000000 76818838134 25605000000 25606279378 4130163520 4131442898
+76818000000 76821838342 25606000000 25607279447 4131163520 4132442967
+76821000000 76824838497 25607000000 25608279499 4132163520 4133443019
+76824000000 76827838656 25608000000 25609279552 4133163520 4134443072
+76827000000 76830838808 25609000000 25610279602 4134163520 4135443122
+76830000000 76833838930 25610000000 25611279643 4135163520 4136443163
+76833000000 76836839108 25611000000 25612279702 4136163520 4137443222
+76836000000 76839839257 25612000000 25613279752 4137163520 4138443272
+76839000000 76842839385 25613000000 25614279795 4138163520 4139443315
+76842000000 76845839554 25614000000 25615279851 4139163520 4140443371
+76845000000 76848839674 25615000000 25616279891 4140163520 4141443411
+76848000000 76851839601 25616000000 25617279867 4141163520 4142443387
+76851000000 76854839924 25617000000 25618279974 4142163520 4143443494
+76854000000 76857840177 25618000000 25619280059 4143163520 4144443579
+76857000000 76860840287 25619000000 25620280095 4144163520 4145443615
+76860000000 76863840466 25620000000 25621280155 4145163520 4146443675
+76863000000 76866840514 25621000000 25622280171 4146163520 4147443691
+76866000000 76869840768 25622000000 25623280256 4147163520 4148443776
+76869000000 76872840887 25623000000 25624280295 4148163520 4149443815
+76872000000 76875841058 25624000000 25625280352 4149163520 4150443872
+76875000000 76878841205 25625000000 25626280401 4150163520 4151443921
+76878000000 76881841358 25626000000 25627280452 4151163520 4152443972
+76881000000 76884841504 25627000000 25628280501 4152163520 4153444021
+76884000000 76887841648 25628000000 25629280549 4153163520 4154444069
+76887000000 76890841811 25629000000 25630280603 4154163520 4155444123
+76890000000 76893841963 25630000000 25631280654 4155163520 4156444174
+76893000000 76896842117 25631000000 25632280705 4156163520 4157444225
+76896000000 76899842237 25632000000 25633280745 4157163520 4158444265
+76899000000 76902842446 25633000000 25634280815 4158163520 4159444335
+76902000000 76905842576 25634000000 25635280858 4159163520 4160444378
+76905000000 76908842690 25635000000 25636280896 4160163520 4161444416
+76908000000 76911842851 25636000000 25637280950 4161163520 4162444470
+76911000000 76914842986 25637000000 25638280995 4162163520 4163444515
+76914000000 76917843129 25638000000 25639281043 4163163520 4164444563
+76917000000 76920843229 25639000000 25640281076 4164163520 4165444596
+76920000000 76923843463 25640000000 25641281154 4165163520 4166444674
+76923000000 76926843536 25641000000 25642281178 4166163520 4167444698
+76926000000 76929843657 25642000000 25643281219 4167163520 4168444739
+76929000000 76932843846 25643000000 25644281282 4168163520 4169444802
+76932000000 76935844000 25644000000 25645281333 4169163520 4170444853
+76935000000 76938844179 25645000000 25646281393 4170163520 4171444913
+76938000000 76941844325 25646000000 25647281441 4171163520 4172444961
+76941000000 76944844452 25647000000 25648281484 4172163520 4173445004
+76944000000 76947844626 25648000000 25649281542 4173163520 4174445062
+76947000000 76950844690 25649000000 25650281563 4174163520 4175445083
+76950000000 76953844897 25650000000 25651281632 4175163520 4176445152
+76953000000 76956845078 25651000000 25652281692 4176163520 4177445212
+76956000000 76959845227 25652000000 25653281742 4177163520 4178445262
+76959000000 76962845284 25653000000 25654281761 4178163520 4179445281
+76962000000 76965845480 25654000000 25655281826 4179163520 4180445346
+76965000000 76968845670 25655000000 25656281890 4180163520 4181445410
+76968000000 76971845815 25656000000 25657281938 4181163520 4182445458
+76971000000 76974845987 25657000000 25658281995 4182163520 4183445515
+76974000000 76977846120 25658000000 25659282040 4183163520 4184445560
+76977000000 76980846191 25659000000 25660282063 4184163520 4185445583
+76980000000 76983846417 25660000000 25661282139 4185163520 4186445659
+76983000000 76986846577 25661000000 25662282192 4186163520 4187445712
+76986000000 76989846709 25662000000 25663282236 4187163520 4188445756
+76989000000 76992846817 25663000000 25664282272 4188163520 4189445792
+76992000000 76995847028 25664000000 25665282342 4189163520 4190445862
+76995000000 76998847194 25665000000 25666282398 4190163520 4191445918
+76998000000 77001847305 25666000000 25667282435 4191163520 4192445955
+77001000000 77004847465 25667000000 25668282488 4192163520 4193446008
+77004000000 77007847577 25668000000 25669282525 4193163520 4194446045
+77007000000 77010847775 25669000000 25670282591 4194163520 4195446111
+77010000000 77013847865 25670000000 25671282621 4195163520 4196446141
+77013000000 77016848090 25671000000 25672282696 4196163520 4197446216
+77016000000 77019848222 25672000000 25673282740 4197163520 4198446260
+77019000000 77022848361 25673000000 25674282787 4198163520 4199446307
+77022000000 77025848412 25674000000 25675282804 4199163520 4200446324
+77025000000 77028848623 25675000000 25676282874 4200163520 4201446394
+77028000000 77031848832 25676000000 25677282944 4201163520 4202446464
+77031000000 77034848960 25677000000 25678282986 4202163520 4203446506
+77034000000 77037849103 25678000000 25679283034 4203163520 4204446554
+77037000000 77040849274 25679000000 25680283091 4204163520 4205446611
+77040000000 77043849371 25680000000 25681283123 4205163520 4206446643
+77043000000 77046849584 25681000000 25682283194 4206163520 4207446714
+77046000000 77049849714 25682000000 25683283238 4207163520 4208446758
+77049000000 77052849864 25683000000 25684283288 4208163520 4209446808
+77052000000 77055850024 25684000000 25685283341 4209163520 4210446861
+77055000000 77058850120 25685000000 25686283373 4210163520 4211446893
+77058000000 77061850308 25686000000 25687283436 4211163520 4212446956
+77061000000 77064850476 25687000000 25688283492 4212163520 4213447012
+77064000000 77067850612 25688000000 25689283537 4213163520 4214447057
+77067000000 77070850787 25689000000 25690283595 4214163520 4215447115
+77070000000 77073850909 25690000000 25691283636 4215163520 4216447156
+77073000000 77076851059 25691000000 25692283686 4216163520 4217447206
+77076000000 77079851207 25692000000 25693283735 4217163520 4218447255
+77079000000 77082851413 25693000000 25694283804 4218163520 4219447324
+77082000000 77085851527 25694000000 25695283842 4219163520 4220447362
+77085000000 77088851659 25695000000 25696283886 4220163520 4221447406
+77088000000 77091851833 25696000000 25697283944 4221163520 4222447464
+77091000000 77094851952 25697000000 25698283984 4222163520 4223447504
+77094000000 77097852076 25698000000 25699284025 4223163520 4224447545
+77097000000 77100852295 25699000000 25700284098 4224163520 4225447618
+77100000000 77103852431 25700000000 25701284143 4225163520 4226447663
+77103000000 77106852582 25701000000 25702284194 4226163520 4227447714
+77106000000 77109852742 25702000000 25703284247 4227163520 4228447767
+77109000000 77112852863 25703000000 25704284287 4228163520 4229447807
+77112000000 77115852944 25704000000 25705284314 4229163520 4230447834
+77115000000 77118853152 25705000000 25706284384 4230163520 4231447904
+77118000000 77121853307 25706000000 25707284435 4231163520 4232447955
+77121000000 77124853466 25707000000 25708284488 4232163520 4233448008
+77124000000 77127853618 25708000000 25709284539 4233163520 4234448059
+77127000000 77130853740 25709000000 25710284580 4234163520 4235448100
+77130000000 77133853918 25710000000 25711284639 4235163520 4236448159
+77133000000 77136854067 25711000000 25712284689 4236163520 4237448209
+77136000000 77139854195 25712000000 25713284731 4237163520 4238448251
+77139000000 77142854364 25713000000 25714284788 4238163520 4239448308
+77142000000 77145854484 25714000000 25715284828 4239163520 4240448348
+77145000000 77148854411 25715000000 25716284803 4240163520 4241448323
+77148000000 77151854734 25716000000 25717284911 4241163520 4242448431
+77151000000 77154854987 25717000000 25718284995 4242163520 4243448515
+77154000000 77157855097 25718000000 25719285032 4243163520 4244448552
+77157000000 77160855276 25719000000 25720285092 4244163520 4245448612
+77160000000 77163855324 25720000000 25721285108 4245163520 4246448628
+77163000000 77166855578 25721000000 25722285192 4246163520 4247448712
+77166000000 77169855697 25722000000 25723285232 4247163520 4248448752
+77169000000 77172855868 25723000000 25724285289 4248163520 4249448809
+77172000000 77175856015 25724000000 25725285338 4249163520 4250448858
+77175000000 77178856168 25725000000 25726285389 4250163520 4251448909
+77178000000 77181856314 25726000000 25727285438 4251163520 4252448958
+77181000000 77184856458 25727000000 25728285486 4252163520 4253449006
+77184000000 77187856621 25728000000 25729285540 4253163520 4254449060
+77187000000 77190856773 25729000000 25730285591 4254163520 4255449111
+77190000000 77193856927 25730000000 25731285642 4255163520 4256449162
+77193000000 77196857047 25731000000 25732285682 4256163520 4257449202
+77196000000 77199857256 25732000000 25733285752 4257163520 4258449272
+77199000000 77202857386 25733000000 25734285795 4258163520 4259449315
+77202000000 77205857500 25734000000 25735285833 4259163520 4260449353
+77205000000 77208857661 25735000000 25736285887 4260163520 4261449407
+77208000000 77211857796 25736000000 25737285932 4261163520 4262449452
+77211000000 77214857939 25737000000 25738285979 4262163520 4263449499
+77214000000 77217858039 25738000000 25739286013 4263163520 4264449533
+77217000000 77220858273 25739000000 25740286091 4264163520 4265449611
+77220000000 77223858346 25740000000 25741286115 4265163520 4266449635
+77223000000 77226858467 25741000000 25742286155 4266163520 4267449675
+77226000000 77229858656 25742000000 25743286218 4267163520 4268449738
+77229000000 77232858810 25743000000 25744286270 4268163520 4269449790
+77232000000 77235858989 25744000000 25745286329 4269163520 4270449849
+77235000000 77238859135 25745000000 25746286378 4270163520 4271449898
+77238000000 77241859262 25746000000 25747286420 4271163520 4272449940
+77241000000 77244859436 25747000000 25748286478 4272163520 4273449998
+77244000000 77247859500 25748000000 25749286500 4273163520 4274450020
+77247000000 77250859707 25749000000 25750286569 4274163520 4275450089
+77250000000 77253859888 25750000000 25751286629 4275163520 4276450149
+77253000000 77256860037 25751000000 25752286679 4276163520 4277450199
+77256000000 77259860094 25752000000 25753286698 4277163520 4278450218
+77259000000 77262860290 25753000000 25754286763 4278163520 4279450283
+77262000000 77265860480 25754000000 25755286826 4279163520 4280450346
+77265000000 77268860625 25755000000 25756286875 4280163520 4281450395
+77268000000 77271860797 25756000000 25757286932 4281163520 4282450452
+77271000000 77274860930 25757000000 25758286976 4282163520 4283450496
+77274000000 77277861001 25758000000 25759287000 4283163520 4284450520
+77277000000 77280861227 25759000000 25760287075 4284163520 4285450595
+77280000000 77283861387 25760000000 25761287129 4285163520 4286450649
+77283000000 77286861519 25761000000 25762287173 4286163520 4287450693
+77286000000 77289861627 25762000000 25763287209 4287163520 4288450729
+77289000000 77292861838 25763000000 25764287279 4288163520 4289450799
+77292000000 77295862004 25764000000 25765287334 4289163520 4290450854
+77295000000 77298862115 25765000000 25766287371 4290163520 4291450891
+77298000000 77301862275 25766000000 25767287425 4291163520 4292450945
+77301000000 77304862387 25767000000 25768287462 4292163520 4293450982
+77304000000 77307862585 25768000000 25769287528 4293163520 4294451048
+77307000000 77310862675 25769000000 25770287558 4294163520 483782
+77310000000 77313862900 25770000000 25771287633 196224 1483857
+77313000000 77316863032 25771000000 25772287677 1196224 2483901
+77316000000 77319863171 25772000000 25773287723 2196224 3483947
+77319000000 77322863222 25773000000 25774287740 3196224 4483964
+77322000000 77325863433 25774000000 25775287811 4196224 5484035
+77325000000 77328863642 25775000000 25776287880 5196224 6484104
+77328000000 77331863770 25776000000 25777287923 6196224 7484147
+77331000000 77334863913 25777000000 25778287971 7196224 8484195
+77334000000 77337864084 25778000000 25779288028 8196224 9484252
+77337000000 77340864181 25779000000 25780288060 9196224 10484284
+77340000000 77343864394 25780000000 25781288131 10196224 11484355
+77343000000 77346864524 25781000000 25782288174 11196224 12484398
+77346000000 77349864674 25782000000 25783288224 12196224 13484448
+77349000000 77352864834 25783000000 25784288278 13196224 14484502
+77352000000 77355864930 25784000000 25785288310 14196224 15484534
+77355000000 77358865118 25785000000 25786288372 15196224 16484596
+77358000000 77361865286 25786000000 25787288428 16196224 17484652
+77361000000 77364865422 25787000000 25788288474 17196224 18484698
+77364000000 77367865597 25788000000 25789288532 18196224 19484756
+77367000000 77370865719 25789000000 25790288573 19196224 20484797
+77370000000 77373865869 25790000000 25791288623 20196224 21484847
+77373000000 77376866017 25791000000 25792288672 21196224 22484896
+77376000000 77379866223 25792000000 25793288741 22196224 23484965
+77379000000 77382866337 25793000000 25794288779 23196224 24485003
+77382000000 77385866469 25794000000 25795288823 24196224 25485047
+77385000000 77388866643 25795000000 25796288881 25196224 26485105
+77388000000 77391866762 25796000000 25797288920 26196224 27485144
+77391000000 77394866886 25797000000 25798288962 27196224 28485186
+77394000000 77397867105 25798000000 25799289035 28196224 29485259
+77397000000 77400867241 25799000000 25800289080 29196224 30485304
+77400000000 77403867392 25800000000 25801289130 30196224 31485354
+77403000000 77406867552 25801000000 25802289184 31196224 32485408
+77406000000 77409867673 25802000000 25803289224 32196224 33485448
+77409000000 77412867754 25803000000 25804289251 33196224 34485475
+77412000000 77415867962 25804000000 25805289320 34196224 35485544
+77415000000 77418868117 25805000000 25806289372 35196224 36485596
+77418000000 77421868276 25806000000 25807289425 36196224 37485649
+77421000000 77424868428 25807000000 25808289476 37196224 38485700
+77424000000 77427868550 25808000000 25809289516 38196224 39485740
+77427000000 77430868728 25809000000 25810289576 39196224 40485800
+77430000000 77433868877 25810000000 25811289625 40196224 41485849
+77433000000 77436869005 25811000000 25812289668 41196224 42485892
+77436000000 77439869174 25812000000 25813289724 42196224 43485948
+77439000000 77442869294 25813000000 25814289764 43196224 44485988
+77442000000 77445869221 25814000000 25815289740 44196224 45485964
+77445000000 77448869544 25815000000 25816289848 45196224 46486072
+77448000000 77451869797 25816000000 25817289932 46196224 47486156
+77451000000 77454869907 25817000000 25818289969 47196224 48486193
+77454000000 77457870086 25818000000 25819290028 48196224 49486252
+77457000000 77460870134 25819000000 25820290044 49196224 50486268
+77460000000 77463870388 25820000000 25821290129 50196224 51486353
+77463000000 77466870507 25821000000 25822290169 51196224 52486393
+77466000000 77469870678 25822000000 25823290226 52196224 53486450
+77469000000 77472870825 25823000000 25824290275 53196224 54486499
+77472000000 77475870978 25824000000 25825290326 54196224 55486550
+77475000000 77478871124 25825000000 25826290374 55196224 56486598
+77478000000 77481871268 25826000000 25827290422 56196224 57486646
+77481000000 77484871431 25827000000 25828290477 57196224 58486701
+77484000000 77487871583 25828000000 25829290527 58196224 59486751
+77487000000 77490871737 25829000000 25830290579 59196224 60486803
+77490000000 77493871857 25830000000 25831290619 60196224 61486843
+77493000000 77496872066 25831000000 25832290688 61196224 62486912
+77496000000 77499872196 25832000000 25833290732 62196224 63486956
+77499000000 77502872310 25833000000 25834290770 63196224 64486994
+77502000000 77505872471 25834000000 25835290823 64196224 65487047
+77505000000 77508872606 25835000000 25836290868 65196224 66487092
+77508000000 77511872749 25836000000 25837290916 66196224 67487140
+77511000000 77514872849 25837000000 25838290949 67196224 68487173
+77514000000 77517873083 25838000000 25839291027 68196224 69487251
+77517000000 77520873156 25839000000 25840291052 69196224 70487276
+77520000000 77523873277 25840000000 25841291092 70196224 71487316
+77523000000 77526873466 25841000000 25842291155 71196224 72487379
+77526000000 77529873620 25842000000 25843291206 72196224 73487430
+77529000000 77532873799 25843000000 25844291266 73196224 74487490
+77532000000 77535873945 25844000000 25845291315 74196224 75487539
+77535000000 77538874072 25845000000 25846291357 75196224 76487581
+77538000000 77541874246 25846000000 25847291415 76196224 77487639
+77541000000 77544874310 25847000000 25848291436 77196224 78487660
+77544000000 77547874517 25848000000 25849291505 78196224 79487729
+77547000000 77550874698 25849000000 25850291566 79196224 80487790
+77550000000 77553874847 25850000000 25851291615 80196224 81487839
+77553000000 77556874904 25851000000 25852291634 81196224 82487858
+77556000000 77559875100 25852000000 25853291700 82196224 83487924
+77559000000 77562875290 25853000000 25854291763 83196224 84487987
+77562000000 77565875435 25854000000 25855291811 84196224 85488035
+77565000000 77568875607 25855000000 25856291869 85196224 86488093
+77568000000 77571875740 25856000000 25857291913 86196224 87488137
+77571000000 77574875811 25857000000 25858291937 87196224 88488161
+77574000000 77577876037 25858000000 25859292012 88196224 89488236
+77577000000 77580876197 25859000000 25860292065 89196224 90488289
+77580000000 77583876329 25860000000 25861292109 90196224 91488333
+77583000000 77586876437 25861000000 25862292145 91196224 92488369
+77586000000 77589876648 25862000000 25863292216 92196224 93488440
+77589000000 77592876814 25863000000 25864292271 93196224 94488495
+77592000000 77595876925 25864000000 25865292308 94196224 95488532
+77595000000 77598877085 25865000000 25866292361 95196224 96488585
+77598000000 77601877197 25866000000 25867292399 96196224 97488623
+77601000000 77604877395 25867000000 25868292465 97196224 98488689
+77604000000 77607877485 25868000000 25869292495 98196224 99488719
+77607000000 77610877710 25869000000 25870292570 99196224 100488794
+77610000000 77613877842 25870000000 25871292614 100196224 101488838
+77613000000 77616877981 25871000000 25872292660 101196224 102488884
+77616000000 77619878032 25872000000 25873292677 102196224 103488901
+77619000000 77622878243 25873000000 25874292747 103196224 104488971
+77622000000 77625878452 25874000000 25875292817 104196224 105489041
+77625000000 77628878580 25875000000 25876292860 105196224 106489084
+77628000000 77631878723 25876000000 25877292907 106196224 107489131
+77631000000 77634878894 25877000000 25878292964 107196224 108489188
+77634000000 77637878991 25878000000 25879292997 108196224 109489221
+77637000000 77640879204 25879000000 25880293068 109196224 110489292
+77640000000 77643879334 25880000000 25881293111 110196224 111489335
+77643000000 77646879484 25881000000 25882293161 111196224 112489385
+77646000000 77649879644 25882000000 25883293214 112196224 113489438
+77649000000 77652879740 25883000000 25884293246 113196224 114489470
+77652000000 77655879928 25884000000 25885293309 114196224 115489533
+77655000000 77658880096 25885000000 25886293365 115196224 116489589
+77658000000 77661880232 25886000000 25887293410 116196224 117489634
+77661000000 77664880407 25887000000 25888293469 117196224 118489693
+77664000000 77667880529 25888000000 25889293509 118196224 119489733
+77667000000 77670880679 25889000000 25890293559 119196224 120489783
+77670000000 77673880827 25890000000 25891293609 120196224 121489833
+77673000000 77676881033 25891000000 25892293677 121196224 122489901
+77676000000 77679881147 25892000000 25893293715 122196224 123489939
+77679000000 77682881279 25893000000 25894293759 123196224 124489983
+77682000000 77685881453 25894000000 25895293817 124196224 125490041
+77685000000 77688881572 25895000000 25896293857 125196224 126490081
+77688000000 77691881696 25896000000 25897293898 126196224 127490122
+77691000000 77694881915 25897000000 25898293971 127196224 128490195
+77694000000 77697882051 25898000000 25899294017 128196224 129490241
+77697000000 77700882202 25899000000 25900294067 129196224 130490291
+77700000000 77703882362 25900000000 25901294120 130196224 131490344
+77703000000 77706882483 25901000000 25902294161 131196224 132490385
+77706000000 77709882564 25902000000 25903294188 132196224 133490412
+77709000000 77712882772 25903000000 25904294257 133196224 134490481
+77712000000 77715882927 25904000000 25905294309 134196224 135490533
+77715000000 77718883086 25905000000 25906294362 135196224 136490586
+77718000000 77721883238 25906000000 25907294412 136196224 137490636
+77721000000 77724883360 25907000000 25908294453 137196224 138490677
+77724000000 77727883538 25908000000 25909294512 138196224 139490736
+77727000000 77730883687 25909000000 25910294562 139196224 140490786
+77730000000 77733883815 25910000000 25911294605 140196224 141490829
+77733000000 77736883984 25911000000 25912294661 141196224 142490885
+77736000000 77739884104 25912000000 25913294701 142196224 143490925
+77739000000 77742884031 25913000000 25914294677 143196224 144490901
+77742000000 77745884354 25914000000 25915294784 144196224 145491008
+77745000000 77748884607 25915000000 25916294869 145196224 146491093
+77748000000 77751884717 25916000000 25917294905 146196224 147491129
+77751000000 77754884896 25917000000 25918294965 147196224 148491189
+77754000000 77757884944 25918000000 25919294981 148196224 149491205
+77757000000 77760885198 25919000000 25920295066 149196224 150491290
+77760000000 77763885317 25920000000 25921295105 150196224 151491329
+77763000000 77766885488 25921000000 25922295162 151196224 152491386
+77766000000 77769885635 25922000000 25923295211 152196224 153491435
+77769000000 77772885788 25923000000 25924295262 153196224 154491486
+77772000000 77775885934 25924000000 25925295311 154196224 155491535
+77775000000 77778886078 25925000000 25926295359 155196224 156491583
+77778000000 77781886241 25926000000 25927295413 156196224 157491637
+77781000000 77784886393 25927000000 25928295464 157196224 158491688
+77784000000 77787886547 25928000000 25929295515 158196224 159491739
+77787000000 77790886667 25929000000 25930295555 159196224 160491779
+77790000000 77793886876 25930000000 25931295625 160196224 161491849
+77793000000 77796887006 25931000000 25932295668 161196224 162491892
+77796000000 77799887120 25932000000 25933295706 162196224 163491930
+77799000000 77802887281 25933000000 25934295760 163196224 164491984
+77802000000 77805887416 25934000000 25935295805 164196224 165492029
+77805000000 77808887559 25935000000 25936295853 165196224 166492077
+77808000000 77811887659 25936000000 25937295886 166196224 167492110
+77811000000 77814887893 25937000000 25938295964 167196224 168492188
+77814000000 77817887966 25938000000 25939295988 168196224 169492212
+77817000000 77820888087 25939000000 25940296029 169196224 170492253
+77820000000 77823888276 25940000000 25941296092 170196224 171492316
+77823000000 77826888430 25941000000 25942296143 171196224 172492367
+77826000000 77829888609 25942000000 25943296203 172196224 173492427
+77829000000 77832888755 25943000000 25944296251 173196224 174492475
+77832000000 77835888882 25944000000 25945296294 174196224 175492518
+77835000000 77838889056 25945000000 25946296352 175196224 176492576
+77838000000 77841889120 25946000000 25947296373 176196224 177492597
+77841000000 77844889327 25947000000 25948296442 177196224 178492666
+77844000000 77847889508 25948000000 25949296502 178196224 179492726
+77847000000 77850889657 25949000000 25950296552 179196224 180492776
+77850000000 77853889714 25950000000 25951296571 180196224 181492795
+77853000000 77856889910 25951000000 25952296636 181196224 182492860
+77856000000 77859890100 25952000000 25953296700 182196224 183492924
+77859000000 77862890245 25953000000 25954296748 183196224 184492972
+77862000000 77865890417 25954000000 25955296805 184196224 185493029
+77865000000 77868890550 25955000000 25956296850 185196224 186493074
+77868000000 77871890621 25956000000 25957296873 186196224 187493097
+77871000000 77874890847 25957000000 25958296949 187196224 188493173
+77874000000 77877891007 25958000000 25959297002 188196224 189493226
+77877000000 77880891139 25959000000 25960297046 189196224 190493270
+77880000000 77883891247 25960000000 25961297082 190196224 191493306
+77883000000 77886891458 25961000000 25962297152 191196224 192493376
+77886000000 77889891624 25962000000 25963297208 192196224 193493432
+77889000000 77892891735 25963000000 25964297245 193196224 194493469
+77892000000 77895891895 25964000000 25965297298 194196224 195493522
+77895000000 77898892007 25965000000 25966297335 195196224 196493559
+77898000000 77901892205 25966000000 25967297401 196196224 197493625
+77901000000 77904892295 25967000000 25968297431 197196224 198493655
+77904000000 77907892520 25968000000 25969297506 198196224 199493730
+77907000000 77910892652 25969000000 25970297550 199196224 200493774
+77910000000 77913892791 25970000000 25971297597 200196224 201493821
+77913000000 77916892842 25971000000 25972297614 201196224 202493838
+77916000000 77919893053 25972000000 25973297684 202196224 203493908
+77919000000 77922893262 25973000000 25974297754 203196224 204493978
+77922000000 77925893390 25974000000 25975297796 204196224 205494020
+77925000000 77928893533 25975000000 25976297844 205196224 206494068
+77928000000 77931893704 25976000000 25977297901 206196224 207494125
+77931000000 77934893801 25977000000 25978297933 207196224 208494157
+77934000000 77937894014 25978000000 25979298004 208196224 209494228
+77937000000 77940894144 25979000000 25980298048 209196224 210494272
+77940000000 77943894294 25980000000 25981298098 210196224 211494322
+77943000000 77946894454 25981000000 25982298151 211196224 212494375
+77946000000 77949894550 25982000000 25983298183 212196224 213494407
+77949000000 77952894738 25983000000 25984298246 213196224 214494470
+77952000000 77955894906 25984000000 25985298302 214196224 215494526
+77955000000 77958895042 25985000000 25986298347 215196224 216494571
+77958000000 77961895217 25986000000 25987298405 216196224 217494629
+77961000000 77964895339 25987000000 25988298446 217196224 218494670
+77964000000 77967895489 25988000000 25989298496 218196224 219494720
+77967000000 77970895637 25989000000 25990298545 219196224 220494769
+77970000000 77973895843 25990000000 25991298614 220196224 221494838
+77973000000 77976895957 25991000000 25992298652 221196224 222494876
+77976000000 77979896089 25992000000 25993298696 222196224 223494920
+77979000000 77982896263 25993000000 25994298754 223196224 224494978
+77982000000 77985896382 25994000000 25995298794 224196224 225495018
+77985000000 77988896506 25995000000 25996298835 225196224 226495059
+77988000000 77991896725 25996000000 25997298908 226196224 227495132
+77991000000 77994896861 25997000000 25998298953 227196224 228495177
+77994000000 77997897012 25998000000 25999299004 228196224 229495228
+77997000000 78000897172 25999000000 26000299057 229196224 230495281
+78000000000 78003897293 26000000000 26001299097 230196224 231495321
+78003000000 78006897374 26001000000 26002299124 231196224 232495348
+78006000000 78009897582 26002000000 26003299194 232196224 233495418
+78009000000 78012897737 26003000000 26004299245 233196224 234495469
+78012000000 78015897896 26004000000 26005299298 234196224 235495522
+78015000000 78018898048 26005000000 26006299349 235196224 236495573
+78018000000 78021898170 26006000000 26007299390 236196224 237495614
+78021000000 78024898348 26007000000 26008299449 237196224 238495673
+78024000000 78027898497 26008000000 26009299499 238196224 239495723
+78027000000 78030898625 26009000000 26010299541 239196224 240495765
+78030000000 78033898794 26010000000 26011299598 240196224 241495822
+78033000000 78036898914 26011000000 26012299638 241196224 242495862
+78036000000 78039898841 26012000000 26013299613 242196224 243495837
+78039000000 78042899164 26013000000 26014299721 243196224 244495945
+78042000000 78045899417 26014000000 26015299805 244196224 245496029
+78045000000 78048899527 26015000000 26016299842 245196224 246496066
+78048000000 78051899706 26016000000 26017299902 246196224 247496126
+78051000000 78054899754 26017000000 26018299918 247196224 248496142
+78054000000 78057900008 26018000000 26019300002 248196224 249496226
+78057000000 78060900127 26019000000 26020300042 249196224 250496266
+78060000000 78063900298 26020000000 26021300099 250196224 251496323
+78063000000 78066900445 26021000000 26022300148 251196224 252496372
+78066000000 78069900598 26022000000 26023300199 252196224 253496423
+78069000000 78072900744 26023000000 26024300248 253196224 254496472
+78072000000 78075900888 26024000000 26025300296 254196224 255496520
+78075000000 78078901051 26025000000 26026300350 255196224 256496574
+78078000000 78081901203 26026000000 26027300401 256196224 257496625
+78081000000 78084901357 26027000000 26028300452 257196224 258496676
+78084000000 78087901477 26028000000 26029300492 258196224 259496716
+78087000000 78090901686 26029000000 26030300562 259196224 260496786
+78090000000 78093901816 26030000000 26031300605 260196224 261496829
+78093000000 78096901930 26031000000 26032300643 261196224 262496867
+78096000000 78099902091 26032000000 26033300697 262196224 263496921
+78099000000 78102902226 26033000000 26034300742 263196224 264496966
+78102000000 78105902369 26034000000 26035300789 264196224 265497013
+78105000000 78108902469 26035000000 26036300823 265196224 266497047
+78108000000 78111902703 26036000000 26037300901 266196224 267497125
+78111000000 78114902776 26037000000 26038300925 267196224 268497149
+78114000000 78117902897 26038000000 26039300965 268196224 269497189
+78117000000 78120903086 26039000000 26040301028 269196224 270497252
+78120000000 78123903240 26040000000 26041301080 270196224 271497304
+78123000000 78126903419 26041000000 26042301139 271196224 272497363
+78126000000 78129903565 26042000000 26043301188 272196224 273497412
+78129000000 78132903692 26043000000 26044301230 273196224 274497454
+78132000000 78135903866 26044000000 26045301288 274196224 275497512
+78135000000 78138903930 26045000000 26046301310 275196224 276497534
+78138000000 78141904137 26046000000 26047301379 276196224 277497603
+78141000000 78144904318 26047000000 26048301439 277196224 278497663
+78144000000 78147904467 26048000000 26049301489 278196224 279497713
+78147000000 78150904524 26049000000 26050301508 279196224 280497732
+78150000000 78153904720 26050000000 26051301573 280196224 281497797
+78153000000 78156904910 26051000000 26052301636 281196224 282497860
+78156000000 78159905055 26052000000 26053301685 282196224 283497909
+78159000000 78162905227 26053000000 26054301742 283196224 284497966
+78162000000 78165905360 26054000000 26055301786 284196224 285498010
+78165000000 78168905431 26055000000 26056301810 285196224 286498034
+78168000000 78171905657 26056000000 26057301885 286196224 287498109
+78171000000 78174905817 26057000000 26058301939 287196224 288498163
+78174000000 78177905949 26058000000 26059301983 288196224 289498207
+78177000000 78180906057 26059000000 26060302019 289196224 290498243
+78180000000 78183906268 26060000000 26061302089 290196224 291498313
+78183000000 78186906434 26061000000 26062302144 291196224 292498368
+78186000000 78189906545 26062000000 26063302181 292196224 293498405
+78189000000 78192906705 26063000000 26064302235 293196224 294498459
+78192000000 78195906817 26064000000 26065302272 294196224 295498496
+78195000000 78198907015 26065000000 26066302338 295196224 296498562
+78198000000 78201907105 26066000000 26067302368 296196224 297498592
+78201000000 78204907330 26067000000 26068302443 297196224 298498667
+78204000000 78207907462 26068000000 26069302487 298196224 299498711
+78207000000 78210907601 26069000000 26070302533 299196224 300498757
+78210000000 78213907652 26070000000 26071302550 300196224 301498774
+78213000000 78216907863 26071000000 26072302621 301196224 302498845
+78216000000 78219908072 26072000000 26073302690 302196224 303498914
+78219000000 78222908200 26073000000 26074302733 303196224 304498957
+78222000000 78225908343 26074000000 26075302781 304196224 305499005
+78225000000 78228908514 26075000000 26076302838 305196224 306499062
+78228000000 78231908611 26076000000 26077302870 306196224 307499094
+78231000000 78234908824 26077000000 26078302941 307196224 308499165
+78234000000 78237908954 26078000000 26079302984 308196224 309499208
+78237000000 78240909104 26079000000 26080303034 309196224 310499258
+78240000000 78243909264 26080000000 26081303088 310196224 311499312
+78243000000 78246909360 26081000000 26082303120 311196224 312499344
+78246000000 78249909548 26082000000 26083303182 312196224 313499406
+78249000000 78252909716 26083000000 26084303238 313196224 314499462
+78252000000 78255909852 26084000000 26085303284 314196224 315499508
+78255000000 78258910027 26085000000 26086303342 315196224 316499566
+78258000000 78261910149 26086000000 26087303383 316196224 317499607
+78261000000 78264910299 26087000000 26088303433 317196224 318499657
+78264000000 78267910447 26088000000 26089303482 318196224 319499706
+78267000000 78270910653 26089000000 26090303551 319196224 320499775
+78270000000 78273910767 26090000000 26091303589 320196224 321499813
+78273000000 78276910899 26091000000 26092303633 321196224 322499857
+78276000000 78279911073 26092000000 26093303691 322196224 323499915
+78279000000 78282911192 26093000000 26094303730 323196224 324499954
+78282000000 78285911316 26094000000 26095303772 324196224 325499996
+78285000000 78288911535 26095000000 26096303845 325196224 326500069
+78288000000 78291911671 26096000000 26097303890 326196224 327500114
+78291000000 78294911822 26097000000 26098303940 327196224 328500164
+78294000000 78297911982 26098000000 26099303994 328196224 329500218
+78297000000 78300912103 26099000000 26100304034 329196224 330500258
+78300000000 78303912184 26100000000 26101304061 330196224 331500285
+78303000000 78306912392 26101000000 26102304130 331196224 332500354
+78306000000 78309912547 26102000000 26103304182 332196224 333500406
+78309000000 78312912706 26103000000 26104304235 333196224 334500459
+78312000000 78315912858 26104000000 26105304286 334196224 335500510
+78315000000 78318912980 26105000000 26106304326 335196224 336500550
+78318000000 78321913158 26106000000 26107304386 336196224 337500610
+78321000000 78324913307 26107000000 26108304435 337196224 338500659
+78324000000 78327913435 26108000000 26109304478 338196224 339500702
+78327000000 78330913604 26109000000 26110304534 339196224 340500758
+78330000000 78333913724 26110000000 26111304574 340196224 341500798
+78333000000 78336913651 26111000000 26112304550 341196224 342500774
+78336000000 78339913974 26112000000 26113304658 342196224 343500882
+78339000000 78342914227 26113000000 26114304742 343196224 344500966
+78342000000 78345914337 26114000000 26115304779 344196224 345501003
+78345000000 78348914516 26115000000 26116304838 345196224 346501062
+78348000000 78351914564 26116000000 26117304854 346196224 347501078
+78351000000 78354914818 26117000000 26118304939 347196224 348501163
+78354000000 78357914937 26118000000 26119304979 348196224 349501203
+78357000000 78360915108 26119000000 26120305036 349196224 350501260
+78360000000 78363915255 26120000000 26121305085 350196224 351501309
+78363000000 78366915408 26121000000 26122305136 351196224 352501360
+78366000000 78369915554 26122000000 26123305184 352196224 353501408
+78369000000 78372915698 26123000000 26124305232 353196224 354501456
+78372000000 78375915861 26124000000 26125305287 354196224 355501511
+78375000000 78378916013 26125000000 26126305337 355196224 356501561
+78378000000 78381916167 26126000000 26127305389 356196224 357501613
+78381000000 78384916287 26127000000 26128305429 357196224 358501653
+78384000000 78387916496 26128000000 26129305498 358196224 359501722
+78387000000 78390916626 26129000000 26130305542 359196224 360501766
+78390000000 78393916740 26130000000 26131305580 360196224 361501804
+78393000000 78396916901 26131000000 26132305633 361196224 362501857
+78396000000 78399917036 26132000000 26133305678 362196224 363501902
+78399000000 78402917179 26133000000 26134305726 363196224 364501950
+78402000000 78405917279 26134000000 26135305759 364196224 365501983
+78405000000 78408917513 26135000000 26136305837 365196224 366502061
+78408000000 78411917586 26136000000 26137305862 366196224 367502086
+78411000000 78414917707 26137000000 26138305902 367196224 368502126
+78414000000 78417917896 26138000000 26139305965 368196224 369502189
+78417000000 78420918050 26139000000 26140306016 369196224 370502240
+78420000000 78423918229 26140000000 26141306076 370196224 371502300
+78423000000 78426918375 26141000000 26142306125 371196224 372502349
+78426000000 78429918502 26142000000 26143306167 372196224 373502391
+78429000000 78432918676 26143000000 26144306225 373196224 374502449
+78432000000 78435918740 26144000000 26145306246 374196224 375502470
+78435000000 78438918947 26145000000 26146306315 375196224 376502539
+78438000000 78441919128 26146000000 26147306376 376196224 377502600
+78441000000 78444919277 26147000000 26148306425 377196224 378502649
+78444000000 78447919334 26148000000 26149306444 378196224 379502668
+78447000000 78450919530 26149000000 26150306510 379196224 380502734
+78450000000 78453919720 26150000000 26151306573 380196224 381502797
+78453000000 78456919865 26151000000 26152306621 381196224 382502845
+78456000000 78459920037 26152000000 26153306679 382196224 383502903
+78459000000 78462920170 26153000000 26154306723 383196224 384502947
+78462000000 78465920241 26154000000 26155306747 384196224 385502971
+78465000000 78468920467 26155000000 26156306822 385196224 386503046
+78468000000 78471920627 26156000000 26157306875 386196224 387503099
+78471000000 78474920759 26157000000 26158306919 387196224 388503143
+78474000000 78477920867 26158000000 26159306955 388196224 389503179
+78477000000 78480921078 26159000000 26160307026 389196224 390503250
+78480000000 78483921244 26160000000 26161307081 390196224 391503305
+78483000000 78486921355 26161000000 26162307118 391196224 392503342
+78486000000 78489921515 26162000000 26163307171 392196224 393503395
+78489000000 78492921627 26163000000 26164307209 393196224 394503433
+78492000000 78495921825 26164000000 26165307275 394196224 395503499
+78495000000 78498921915 26165000000 26166307305 395196224 396503529
+78498000000 78501922140 26166000000 26167307380 396196224 397503604
+78501000000 78504922272 26167000000 26168307424 397196224 398503648
+78504000000 78507922411 26168000000 26169307470 398196224 399503694
+78507000000 78510922462 26169000000 26170307487 399196224 400503711
+78510000000 78513922673 26170000000 26171307557 400196224 401503781
+78513000000 78516922882 26171000000 26172307627 401196224 402503851
+78516000000 78519923010 26172000000 26173307670 402196224 403503894
+78519000000 78522923153 26173000000 26174307717 403196224 404503941
+78522000000 78525923324 26174000000 26175307774 404196224 405503998
+78525000000 78528923421 26175000000 26176307807 405196224 406504031
+78528000000 78531923634 26176000000 26177307878 406196224 407504102
+78531000000 78534923764 26177000000 26178307921 407196224 408504145
+78534000000 78537923914 26178000000 26179307971 408196224 409504195
+78537000000 78540924074 26179000000 26180308024 409196224 410504248
+78540000000 78543924170 26180000000 26181308056 410196224 411504280
+78543000000 78546924358 26181000000 26182308119 411196224 412504343
+78546000000 78549924526 26182000000 26183308175 412196224 413504399
+78549000000 78552924662 26183000000 26184308220 413196224 414504444
+78552000000 78555924837 26184000000 26185308279 414196224 415504503
+78555000000 78558924959 26185000000 26186308319 415196224 416504543
+78558000000 78561925109 26186000000 26187308369 416196224 417504593
+78561000000 78564925257 26187000000 26188308419 417196224 418504643
+78564000000 78567925463 26188000000 26189308487 418196224 419504711
+78567000000 78570925577 26189000000 26190308525 419196224 420504749
+78570000000 78573925709 26190000000 26191308569 420196224 421504793
+78573000000 78576925883 26191000000 26192308627 421196224 422504851
+78576000000 78579926002 26192000000 26193308667 422196224 423504891
+78579000000 78582926126 26193000000 26194308708 423196224 424504932
+78582000000 78585926345 26194000000 26195308781 424196224 425505005
+78585000000 78588926481 26195000000 26196308827 425196224 426505051
+78588000000 78591926632 26196000000 26197308877 426196224 427505101
+78591000000 78594926792 26197000000 26198308930 427196224 428505154
+78594000000 78597926913 26198000000 26199308971 428196224 429505195
+78597000000 78600926994 26199000000 26200308998 429196224 430505222
+78600000000 78603927202 26200000000 26201309067 430196224 431505291
+78603000000 78606927357 26201000000 26202309119 431196224 432505343
+78606000000 78609927516 26202000000 26203309172 432196224 433505396
+78609000000 78612927668 26203000000 26204309222 433196224 434505446
+78612000000 78615927790 26204000000 26205309263 434196224 435505487
+78615000000 78618927968 26205000000 26206309322 435196224 436505546
+78618000000 78621928117 26206000000 26207309372 436196224 437505596
+78621000000 78624928245 26207000000 26208309415 437196224 438505639
+78624000000 78627928414 26208000000 26209309471 438196224 439505695
+78627000000 78630928534 26209000000 26210309511 439196224 440505735
+78630000000 78633928461 26210000000 26211309487 440196224 441505711
+78633000000 78636928784 26211000000 26212309594 441196224 442505818
+78636000000 78639929037 26212000000 26213309679 442196224 443505903
+78639000000 78642929147 26213000000 26214309715 443196224 444505939
+78642000000 78645929326 26214000000 26215309775 444196224 445505999
+78645000000 78648929374 26215000000 26216309791 445196224 446506015
+78648000000 78651929628 26216000000 26217309876 446196224 447506100
+78651000000 78654929747 26217000000 26218309915 447196224 448506139
+78654000000 78657929918 26218000000 26219309972 448196224 449506196
+78657000000 78660930065 26219000000 26220310021 449196224 450506245
+78660000000 78663930218 26220000000 26221310072 450196224 451506296
+78663000000 78666930364 26221000000 26222310121 451196224 452506345
+78666000000 78669930508 26222000000 26223310169 452196224 453506393
+78669000000 78672930671 26223000000 26224310223 453196224 454506447
+78672000000 78675930823 26224000000 26225310274 454196224 455506498
+78675000000 78678930977 26225000000 26226310325 455196224 456506549
+78678000000 78681931097 26226000000 26227310365 456196224 457506589
+78681000000 78684931306 26227000000 26228310435 457196224 458506659
+78684000000 78687931436 26228000000 26229310478 458196224 459506702
+78687000000 78690931550 26229000000 26230310516 459196224 460506740
+78690000000 78693931711 26230000000 26231310570 460196224 461506794
+78693000000 78696931846 26231000000 26232310615 461196224 462506839
+78696000000 78699931989 26232000000 26233310663 462196224 463506887
+78699000000 78702932089 26233000000 26234310696 463196224 464506920
+78702000000 78705932323 26234000000 26235310774 464196224 465506998
+78705000000 78708932396 26235000000 26236310798 465196224 466507022
+78708000000 78711932517 26236000000 26237310839 466196224 467507063
+78711000000 78714932706 26237000000 26238310902 467196224 468507126
+78714000000 78717932860 26238000000 26239310953 468196224 469507177
+78717000000 78720933039 26239000000 26240311013 469196224 470507237
+78720000000 78723933185 26240000000 26241311061 470196224 471507285
+78723000000 78726933312 26241000000 26242311104 471196224 472507328
+78726000000 78729933486 26242000000 26243311162 472196224 473507386
+78729000000 78732933550 26243000000 26244311183 473196224 474507407
+78732000000 78735933757 26244000000 26245311252 474196224 475507476
+78735000000 78738933938 26245000000 26246311312 475196224 476507536
+78738000000 78741934087 26246000000 26247311362 476196224 477507586
+78741000000 78744934144 26247000000 26248311381 477196224 478507605
+78744000000 78747934340 26248000000 26249311446 478196224 479507670
+78747000000 78750934530 26249000000 26250311510 479196224 480507734
+78750000000 78753934675 26250000000 26251311558 480196224 481507782
+78753000000 78756934847 26251000000 26252311615 481196224 482507839
+78756000000 78759934980 26252000000 26253311660 482196224 483507884
+78759000000 78762935051 26253000000 26254311683 483196224 484507907
+78762000000 78765935277 26254000000 26255311759 484196224 485507983
+78765000000 78768935437 26255000000 26256311812 485196224 486508036
+78768000000 78771935569 26256000000 26257311856 486196224 487508080
+78771000000 78774935677 26257000000 26258311892 487196224 488508116
+78774000000 78777935888 26258000000 26259311962 488196224 489508186
+78777000000 78780936054 26259000000 26260312018 489196224 490508242
+78780000000 78783936165 26260000000 26261312055 490196224 491508279
+78783000000 78786936325 26261000000 26262312108 491196224 492508332
+78786000000 78789936437 26262000000 26263312145 492196224 493508369
+78789000000 78792936635 26263000000 26264312211 493196224 494508435
+78792000000 78795936725 26264000000 26265312241 494196224 495508465
+78795000000 78798936950 26265000000 26266312316 495196224 496508540
+78798000000 78801937082 26266000000 26267312360 496196224 497508584
+78801000000 78804937221 26267000000 26268312407 497196224 498508631
+78804000000 78807937272 26268000000 26269312424 498196224 499508648
+78807000000 78810937483 26269000000 26270312494 499196224 500508718
+78810000000 78813937692 26270000000 26271312564 500196224 501508788
+78813000000 78816937820 26271000000 26272312606 501196224 502508830
+78816000000 78819937963 26272000000 26273312654 502196224 503508878
+78819000000 78822938134 26273000000 26274312711 503196224 504508935
+78822000000 78825938231 26274000000 26275312743 504196224 505508967
+78825000000 78828938444 26275000000 26276312814 505196224 506509038
+78828000000 78831938574 26276000000 26277312858 506196224 507509082
+78831000000 78834938724 26277000000 26278312908 507196224 508509132
+78834000000 78837938884 26278000000 26279312961 508196224 509509185
+78837000000 78840938980 26279000000 26280312993 509196224 510509217
+78840000000 78843939168 26280000000 26281313056 510196224 511509280
+78843000000 78846939336 26281000000 26282313112 511196224 512509336
+78846000000 78849939472 26282000000 26283313157 512196224 513509381
+78849000000 78852939647 26283000000 26284313215 513196224 514509439
+78852000000 78855939769 26284000000 26285313256 514196224 515509480
+78855000000 78858939919 26285000000 26286313306 515196224 516509530
+78858000000 78861940067 26286000000 26287313355 516196224 517509579
+78861000000 78864940273 26287000000 26288313424 517196224 518509648
+78864000000 78867940387 26288000000 26289313462 518196224 519509686
+78867000000 78870940519 26289000000 26290313506 519196224 520509730
+78870000000 78873940693 26290000000 26291313564 520196224 521509788
+78873000000 78876940812 26291000000 26292313604 521196224 522509828
+78876000000 78879940936 26292000000 26293313645 522196224 523509869
+78879000000 78882941155 26293000000 26294313718 523196224 524509942
+78882000000 78885941291 26294000000 26295313763 524196224 525509987
+78885000000 78888941442 26295000000 26296313814 525196224 526510038
+78888000000 78891941602 26296000000 26297313867 526196224 527510091
+78891000000 78894941723 26297000000 26298313907 527196224 528510131
+78894000000 78897941804 26298000000 26299313934 528196224 529510158
+78897000000 78900942012 26299000000 26300314004 529196224 530510228
+78900000000 78903942167 26300000000 26301314055 530196224 531510279
+78903000000 78906942326 26301000000 26302314108 531196224 532510332
+78906000000 78909942478 26302000000 26303314159 532196224 533510383
+78909000000 78912942600 26303000000 26304314200 533196224 534510424
+78912000000 78915942778 26304000000 26305314259 534196224 535510483
+78915000000 78918942927 26305000000 26306314309 535196224 536510533
+78918000000 78921943055 26306000000 26307314351 536196224 537510575
+78921000000 78924943224 26307000000 26308314408 537196224 538510632
+78924000000 78927943344 26308000000 26309314448 538196224 539510672
+78927000000 78930943271 26309000000 26310314423 539196224 540510647
+78930000000 78933943594 26310000000 26311314531 540196224 541510755
+78933000000 78936943847 26311000000 26312314615 541196224 542510839
+78936000000 78939943957 26312000000 26313314652 542196224 543510876
+78939000000 78942944136 26313000000 26314314712 543196224 544510936
+78942000000 78945944184 26314000000 26315314728 544196224 545510952
+78945000000 78948944438 26315000000 26316314812 545196224 546511036
+78948000000 78951944557 26316000000 26317314852 546196224 547511076
+78951000000 78954944728 26317000000 26318314909 547196224 548511133
+78954000000 78957944875 26318000000 26319314958 548196224 549511182
+78957000000 78960945028 26319000000 26320315009 549196224 550511233
+78960000000 78963945174 26320000000 26321315058 550196224 551511282
+78963000000 78966945318 26321000000 26322315106 551196224 552511330
+78966000000 78969945481 26322000000 26323315160 552196224 553511384
+78969000000 78972945633 26323000000 26324315211 553196224 554511435
+78972000000 78975945787 26324000000 26325315262 554196224 555511486
+78975000000 78978945907 26325000000 26326315302 555196224 556511526
+78978000000 78981946116 26326000000 26327315372 556196224 557511596
+78981000000 78984946246 26327000000 26328315415 557196224 558511639
+78984000000 78987946360 26328000000 26329315453 558196224 559511677
+78987000000 78990946521 26329000000 26330315507 559196224 560511731
+78990000000 78993946656 26330000000 26331315552 560196224 561511776
+78993000000 78996946799 26331000000 26332315599 561196224 562511823
+78996000000 78999946899 26332000000 26333315633 562196224 563511857
+78999000000 79002947133 26333000000 26334315711 563196224 564511935
+79002000000 79005947206 26334000000 26335315735 564196224 565511959
+79005000000 79008947327 26335000000 26336315775 565196224 566511999
+79008000000 79011947516 26336000000 26337315838 566196224 567512062
+79011000000 79014947670 26337000000 26338315890 567196224 568512114
+79014000000 79017947849 26338000000 26339315949 568196224 569512173
+79017000000 79020947995 26339000000 26340315998 569196224 570512222
+79020000000 79023948122 26340000000 26341316040 570196224 571512264
+79023000000 79026948296 26341000000 26342316098 571196224 572512322
+79026000000 79029948360 26342000000 26343316120 572196224 573512344
+79029000000 79032948567 26343000000 26344316189 573196224 574512413
+79032000000 79035948748 26344000000 26345316249 574196224 575512473
+79035000000 79038948897 26345000000 26346316299 575196224 576512523
+79038000000 79041948954 26346000000 26347316318 576196224 577512542
+79041000000 79044949150 26347000000 26348316383 577196224 578512607
+79044000000 79047949340 26348000000 26349316446 578196224 579512670
+79047000000 79050949485 26349000000 26350316495 579196224 580512719
+79050000000 79053949657 26350000000 26351316552 580196224 581512776
+79053000000 79056949790 26351000000 26352316596 581196224 582512820
+79056000000 79059949861 26352000000 26353316620 582196224 583512844
+79059000000 79062950087 26353000000 26354316695 583196224 584512919
+79062000000 79065950247 26354000000 26355316749 584196224 585512973
+79065000000 79068950379 26355000000 26356316793 585196224 586513017
+79068000000 79071950487 26356000000 26357316829 586196224 587513053
+79071000000 79074950698 26357000000 26358316899 587196224 588513123
+79074000000 79077950864 26358000000 26359316954 588196224 589513178
+79077000000 79080950975 26359000000 26360316991 589196224 590513215
+79080000000 79083951135 26360000000 26361317045 590196224 591513269
+79083000000 79086951247 26361000000 26362317082 591196224 592513306
+79086000000 79089951445 26362000000 26363317148 592196224 593513372
+79089000000 79092951535 26363000000 26364317178 593196224 594513402
+79092000000 79095951760 26364000000 26365317253 594196224 595513477
+79095000000 79098951892 26365000000 26366317297 595196224 596513521
+79098000000 79101952031 26366000000 26367317343 596196224 597513567
+79101000000 79104952082 26367000000 26368317360 597196224 598513584
+79104000000 79107952293 26368000000 26369317431 598196224 599513655
+79107000000 79110952502 26369000000 26370317500 599196224 600513724
+79110000000 79113952630 26370000000 26371317543 600196224 601513767
+79113000000 79116952773 26371000000 26372317591 601196224 602513815
+79116000000 79119952944 26372000000 26373317648 602196224 603513872
+79119000000 79122953041 26373000000 26374317680 603196224 604513904
+79122000000 79125953254 26374000000 26375317751 604196224 605513975
+79125000000 79128953384 26375000000 26376317794 605196224 606514018
+79128000000 79131953534 26376000000 26377317844 606196224 607514068
+79131000000 79134953694 26377000000 26378317898 607196224 608514122
+79134000000 79137953790 26378000000 26379317930 608196224 609514154
+79137000000 79140953978 26379000000 26380317992 609196224 610514216
+79140000000 79143954146 26380000000 26381318048 610196224 611514272
+79143000000 79146954282 26381000000 26382318094 611196224 612514318
+79146000000 79149954457 26382000000 26383318152 612196224 613514376
+79149000000 79152954579 26383000000 26384318193 613196224 614514417
+79152000000 79155954729 26384000000 26385318243 614196224 615514467
+79155000000 79158954877 26385000000 26386318292 615196224 616514516
+79158000000 79161955083 26386000000 26387318361 616196224 617514585
+79161000000 79164955197 26387000000 26388318399 617196224 618514623
+79164000000 79167955329 26388000000 26389318443 618196224 619514667
+79167000000 79170955503 26389000000 26390318501 619196224 620514725
+79170000000 79173955622 26390000000 26391318540 620196224 621514764
+79173000000 79176955746 26391000000 26392318582 621196224 622514806
+79176000000 79179955965 26392000000 26393318655 622196224 623514879
+79179000000 79182956101 26393000000 26394318700 623196224 624514924
+79182000000 79185956252 26394000000 26395318750 624196224 625514974
+79185000000 79188956412 26395000000 26396318804 625196224 626515028
+79188000000 79191956533 26396000000 26397318844 626196224 627515068
+79191000000 79194956614 26397000000 26398318871 627196224 628515095
+79194000000 79197956822 26398000000 26399318940 628196224 629515164
+79197000000 79200956977 26399000000 26400318992 629196224 630515216
+79200000000 79203957136 26400000000 26401319045 630196224 631515269
+79203000000 79206957288 26401000000 26402319096 631196224 632515320
+79206000000 79209957410 26402000000 26403319136 632196224 633515360
+79209000000 79212957588 26403000000 26404319196 633196224 634515420
+79212000000 79215957737 26404000000 26405319245 634196224 635515469
+79215000000 79218957865 26405000000 26406319288 635196224 636515512
+79218000000 79221958034 26406000000 26407319344 636196224 637515568
+79221000000 79224958154 26407000000 26408319384 637196224 638515608
+79224000000 79227958081 26408000000 26409319360 638196224 639515584
+79227000000 79230958404 26409000000 26410319468 639196224 640515692
+79230000000 79233958657 26410000000 26411319552 640196224 641515776
+79233000000 79236958767 26411000000 26412319589 641196224 642515813
+79236000000 79239958946 26412000000 26413319648 642196224 643515872
+79239000000 79242958994 26413000000 26414319664 643196224 644515888
+79242000000 79245959248 26414000000 26415319749 644196224 645515973
+79245000000 79248959367 26415000000 26416319789 645196224 646516013
+79248000000 79251959538 26416000000 26417319846 646196224 647516070
+79251000000 79254959685 26417000000 26418319895 647196224 648516119
+79254000000 79257959838 26418000000 26419319946 648196224 649516170
+79257000000 79260959984 26419000000 26420319994 649196224 650516218
+79260000000 79263960128 26420000000 26421320042 650196224 651516266
+79263000000 79266960291 26421000000 26422320097 651196224 652516321
+79266000000 79269960443 26422000000 26423320147 652196224 653516371
+79269000000 79272960597 26423000000 26424320199 653196224 654516423
+79272000000 79275960717 26424000000 26425320239 654196224 655516463
+79275000000 79278960926 26425000000 26426320308 655196224 656516532
+79278000000 79281961056 26426000000 26427320352 656196224 657516576
+79281000000 79284961170 26427000000 26428320390 657196224 658516614
+79284000000 79287961331 26428000000 26429320443 658196224 659516667
+79287000000 79290961466 26429000000 26430320488 659196224 660516712
+79290000000 79293961609 26430000000 26431320536 660196224 661516760
+79293000000 79296961709 26431000000 26432320569 661196224 662516793
+79296000000 79299961943 26432000000 26433320647 662196224 663516871
+79299000000 79302962016 26433000000 26434320672 663196224 664516896
+79302000000 79305962137 26434000000 26435320712 664196224 665516936
+79305000000 79308962326 26435000000 26436320775 665196224 666516999
+79308000000 79311962480 26436000000 26437320826 666196224 667517050
+79311000000 79314962659 26437000000 26438320886 667196224 668517110
+79314000000 79317962805 26438000000 26439320935 668196224 669517159
+79317000000 79320962932 26439000000 26440320977 669196224 670517201
+79320000000 79323963106 26440000000 26441321035 670196224 671517259
+79323000000 79326963170 26441000000 26442321056 671196224 672517280
+79326000000 79329963377 26442000000 26443321125 672196224 673517349
+79329000000 79332963558 26443000000 26444321186 673196224 674517410
+79332000000 79335963707 26444000000 26445321235 674196224 675517459
+79335000000 79338963764 26445000000 26446321254 675196224 676517478
+79338000000 79341963960 26446000000 26447321320 676196224 677517544
+79341000000 79344964150 26447000000 26448321383 677196224 678517607
+79344000000 79347964295 26448000000 26449321431 678196224 679517655
+79347000000 79350964467 26449000000 26450321489 679196224 680517713
+79350000000 79353964600 26450000000 26451321533 680196224 681517757
+79353000000 79356964671 26451000000 26452321557 681196224 682517781
+79356000000 79359964897 26452000000 26453321632 682196224 683517856
+79359000000 79362965057 26453000000 26454321685 683196224 684517909
+79362000000 79365965189 26454000000 26455321729 684196224 685517953
+79365000000 79368965297 26455000000 26456321765 685196224 686517989
+79368000000 79371965508 26456000000 26457321836 686196224 687518060
+79371000000 79374965674 26457000000 26458321891 687196224 688518115
+79374000000 79377965785 26458000000 26459321928 688196224 689518152
+79377000000 79380965945 26459000000 26460321981 689196224 690518205
+79380000000 79383966057 26460000000 26461322019 690196224 691518243
+79383000000 79386966255 26461000000 26462322085 691196224 692518309
+79386000000 79389966345 26462000000 26463322115 692196224 693518339
+79389000000 79392966570 26463000000 26464322190 693196224 694518414
+79392000000 79395966702 26464000000 26465322234 694196224 695518458
+79395000000 79398966841 26465000000 26466322280 695196224 696518504
+79398000000 79401966892 26466000000 26467322297 696196224 697518521
+79401000000 79404967103 26467000000 26468322367 697196224 698518591
+79404000000 79407967312 26468000000 26469322437 698196224 699518661
+79407000000 79410967440 26469000000 26470322480 699196224 700518704
+79410000000 79413967583 26470000000 26471322527 700196224 701518751
+79413000000 79416967754 26471000000 26472322584 701196224 702518808
+79416000000 79419967851 26472000000 26473322617 702196224 703518841
+79419000000 79422968064 26473000000 26474322688 703196224 704518912
+79422000000 79425968194 26474000000 26475322731 704196224 705518955
+79425000000 79428968344 26475000000 26476322781 705196224 706519005
+79428000000 79431968504 26476000000 26477322834 706196224 707519058
+79431000000 79434968600 26477000000 26478322866 707196224 708519090
+79434000000 79437968788 26478000000 26479322929 708196224 709519153
+79437000000 79440968956 26479000000 26480322985 709196224 710519209
+79440000000 79443969092 26480000000 26481323030 710196224 711519254
+79443000000 79446969267 26481000000 26482323089 711196224 712519313
+79446000000 79449969389 26482000000 26483323129 712196224 713519353
+79449000000 79452969539 26483000000 26484323179 713196224 714519403
+79452000000 79455969687 26484000000 26485323229 714196224 715519453
+79455000000 79458969893 26485000000 26486323297 715196224 716519521
+79458000000 79461970007 26486000000 26487323335 716196224 717519559
+79461000000 79464970139 26487000000 26488323379 717196224 718519603
+79464000000 79467970313 26488000000 26489323437 718196224 719519661
+79467000000 79470970432 26489000000 26490323477 719196224 720519701
+79470000000 79473970556 26490000000 26491323518 720196224 721519742
+79473000000 79476970775 26491000000 26492323591 721196224 722519815
+79476000000 79479970911 26492000000 26493323637 722196224 723519861
+79479000000 79482971062 26493000000 26494323687 723196224 724519911
+79482000000 79485971222 26494000000 26495323740 724196224 725519964
+79485000000 79488971343 26495000000 26496323781 725196224 726520005
+79488000000 79491971424 26496000000 26497323808 726196224 727520032
+79491000000 79494971632 26497000000 26498323877 727196224 728520101
+79494000000 79497971787 26498000000 26499323929 728196224 729520153
+79497000000 79500971946 26499000000 26500323982 729196224 730520206
+79500000000 79503972098 26500000000 26501324032 730196224 731520256
+79503000000 79506972220 26501000000 26502324073 731196224 732520297
+79506000000 79509972398 26502000000 26503324132 732196224 733520356
+79509000000 79512972547 26503000000 26504324182 733196224 734520406
+79512000000 79515972675 26504000000 26505324225 734196224 735520449
+79515000000 79518972844 26505000000 26506324281 735196224 736520505
+79518000000 79521972964 26506000000 26507324321 736196224 737520545
+79521000000 79524972891 26507000000 26508324297 737196224 738520521
+79524000000 79527973214 26508000000 26509324404 738196224 739520628
+79527000000 79530973467 26509000000 26510324489 739196224 740520713
+79530000000 79533973577 26510000000 26511324525 740196224 741520749
+79533000000 79536973756 26511000000 26512324585 741196224 742520809
+79536000000 79539973804 26512000000 26513324601 742196224 743520825
+79539000000 79542974058 26513000000 26514324686 743196224 744520910
+79542000000 79545974177 26514000000 26515324725 744196224 745520949
+79545000000 79548974348 26515000000 26516324782 745196224 746521006
+79548000000 79551974495 26516000000 26517324831 746196224 747521055
+79551000000 79554974648 26517000000 26518324882 747196224 748521106
+79554000000 79557974794 26518000000 26519324931 748196224 749521155
+79557000000 79560974938 26519000000 26520324979 749196224 750521203
+79560000000 79563975101 26520000000 26521325033 750196224 751521257
+79563000000 79566975253 26521000000 26522325084 751196224 752521308
+79566000000 79569975407 26522000000 26523325135 752196224 753521359
+79569000000 79572975527 26523000000 26524325175 753196224 754521399
+79572000000 79575975736 26524000000 26525325245 754196224 755521469
+79575000000 79578975866 26525000000 26526325288 755196224 756521512
+79578000000 79581975980 26526000000 26527325326 756196224 757521550
+79581000000 79584976141 26527000000 26528325380 757196224 758521604
+79584000000 79587976276 26528000000 26529325425 758196224 759521649
+79587000000 79590976419 26529000000 26530325473 759196224 760521697
+79590000000 79593976519 26530000000 26531325506 760196224 761521730
+79593000000 79596976753 26531000000 26532325584 761196224 762521808
+79596000000 79599976826 26532000000 26533325608 762196224 763521832
+79599000000 79602976947 26533000000 26534325649 763196224 764521873
+79602000000 79605977136 26534000000 26535325712 764196224 765521936
+79605000000 79608977290 26535000000 26536325763 765196224 766521987
+79608000000 79611977469 26536000000 26537325823 766196224 767522047
+79611000000 79614977615 26537000000 26538325871 767196224 768522095
+79614000000 79617977742 26538000000 26539325914 768196224 769522138
+79617000000 79620977916 26539000000 26540325972 769196224 770522196
+79620000000 79623977980 26540000000 26541325993 770196224 771522217
+79623000000 79626978187 26541000000 26542326062 771196224 772522286
+79626000000 79629978368 26542000000 26543326122 772196224 773522346
+79629000000 79632978517 26543000000 26544326172 773196224 774522396
+79632000000 79635978574 26544000000 26545326191 774196224 775522415
+79635000000 79638978770 26545000000 26546326256 775196224 776522480
+79638000000 79641978960 26546000000 26547326320 776196224 777522544
+79641000000 79644979105 26547000000 26548326368 777196224 778522592
+79644000000 79647979277 26548000000 26549326425 778196224 779522649
+79647000000 79650979410 26549000000 26550326470 779196224 780522694
+79650000000 79653979481 26550000000 26551326493 780196224 781522717
+79653000000 79656979707 26551000000 26552326569 781196224 782522793
+79656000000 79659979867 26552000000 26553326622 782196224 783522846
+79659000000 79662979999 26553000000 26554326666 783196224 784522890
+79662000000 79665980107 26554000000 26555326702 784196224 785522926
+79665000000 79668980318 26555000000 26556326772 785196224 786522996
+79668000000 79671980484 26556000000 26557326828 786196224 787523052
+79671000000 79674980595 26557000000 26558326865 787196224 788523089
+79674000000 79677980755 26558000000 26559326918 788196224 789523142
+79677000000 79680980867 26559000000 26560326955 789196224 790523179
+79680000000 79683981065 26560000000 26561327021 790196224 791523245
+79683000000 79686981155 26561000000 26562327051 791196224 792523275
+79686000000 79689981380 26562000000 26563327126 792196224 793523350
+79689000000 79692981512 26563000000 26564327170 793196224 794523394
+79692000000 79695981651 26564000000 26565327217 794196224 795523441
+79695000000 79698981702 26565000000 26566327234 795196224 796523458
+79698000000 79701981913 26566000000 26567327304 796196224 797523528
+79701000000 79704982122 26567000000 26568327374 797196224 798523598
+79704000000 79707982250 26568000000 26569327416 798196224 799523640
+79707000000 79710982393 26569000000 26570327464 799196224 800523688
+79710000000 79713982564 26570000000 26571327521 800196224 801523745
+79713000000 79716982661 26571000000 26572327553 801196224 802523777
+79716000000 79719982874 26572000000 26573327624 802196224 803523848
+79719000000 79722983004 26573000000 26574327668 803196224 804523892
+79722000000 79725983154 26574000000 26575327718 804196224 805523942
+79725000000 79728983314 26575000000 26576327771 805196224 806523995
+79728000000 79731983410 26576000000 26577327803 806196224 807524027
+79731000000 79734983598 26577000000 26578327866 807196224 808524090
+79734000000 79737983766 26578000000 26579327922 808196224 809524146
+79737000000 79740983902 26579000000 26580327967 809196224 810524191
+79740000000 79743984077 26580000000 26581328025 810196224 811524249
+79743000000 79746984199 26581000000 26582328066 811196224 812524290
+79746000000 79749984349 26582000000 26583328116 812196224 813524340
+79749000000 79752984497 26583000000 26584328165 813196224 814524389
+79752000000 79755984703 26584000000 26585328234 814196224 815524458
+79755000000 79758984817 26585000000 26586328272 815196224 816524496
+79758000000 79761984949 26586000000 26587328316 816196224 817524540
+79761000000 79764985123 26587000000 26588328374 817196224 818524598
+79764000000 79767985242 26588000000 26589328414 818196224 819524638
+79767000000 79770985366 26589000000 26590328455 819196224 820524679
+79770000000 79773985585 26590000000 26591328528 820196224 821524752
+79773000000 79776985721 26591000000 26592328573 821196224 822524797
+79776000000 79779985872 26592000000 26593328624 822196224 823524848
+79779000000 79782986032 26593000000 26594328677 823196224 824524901
+79782000000 79785986153 26594000000 26595328717 824196224 825524941
+79785000000 79788986234 26595000000 26596328744 825196224 826524968
+79788000000 79791986442 26596000000 26597328814 826196224 827525038
+79791000000 79794986597 26597000000 26598328865 827196224 828525089
+79794000000 79797986756 26598000000 26599328918 828196224 829525142
+79797000000 79800986908 26599000000 26600328969 829196224 830525193
+79800000000 79803987030 26600000000 26601329010 830196224 831525234
+79803000000 79806987208 26601000000 26602329069 831196224 832525293
+79806000000 79809987357 26602000000 26603329119 832196224 833525343
+79809000000 79812987485 26603000000 26604329161 833196224 834525385
+79812000000 79815987654 26604000000 26605329218 834196224 835525442
+79815000000 79818987774 26605000000 26606329258 835196224 836525482
+79818000000 79821987701 26606000000 26607329233 836196224 837525457
+79821000000 79824988024 26607000000 26608329341 837196224 838525565
+79824000000 79827988277 26608000000 26609329425 838196224 839525649
+79827000000 79830988387 26609000000 26610329462 839196224 840525686
+79830000000 79833988566 26610000000 26611329522 840196224 841525746
+79833000000 79836988614 26611000000 26612329538 841196224 842525762
+79836000000 79839988868 26612000000 26613329622 842196224 843525846
+79839000000 79842988987 26613000000 26614329662 843196224 844525886
+79842000000 79845989158 26614000000 26615329719 844196224 845525943
+79845000000 79848989305 26615000000 26616329768 845196224 846525992
+79848000000 79851989458 26616000000 26617329819 846196224 847526043
+79851000000 79854989604 26617000000 26618329868 847196224 848526092
+79854000000 79857989748 26618000000 26619329916 848196224 849526140
+79857000000 79860989911 26619000000 26620329970 849196224 850526194
+79860000000 79863990063 26620000000 26621330021 850196224 851526245
+79863000000 79866990217 26621000000 26622330072 851196224 852526296
+79866000000 79869990337 26622000000 26623330112 852196224 853526336
+79869000000 79872990546 26623000000 26624330182 853196224 854526406
+79872000000 79875990676 26624000000 26625330225 854196224 855526449
+79875000000 79878990790 26625000000 26626330263 855196224 856526487
+79878000000 79881990951 26626000000 26627330317 856196224 857526541
+79881000000 79884991086 26627000000 26628330362 857196224 858526586
+79884000000 79887991229 26628000000 26629330409 858196224 859526633
+79887000000 79890991329 26629000000 26630330443 859196224 860526667
+79890000000 79893991563 26630000000 26631330521 860196224 861526745
+79893000000 79896991636 26631000000 26632330545 861196224 862526769
+79896000000 79899991757 26632000000 26633330585 862196224 863526809
+79899000000 79902991946 26633000000 26634330648 863196224 864526872
+79902000000 79905992100 26634000000 26635330700 864196224 865526924
+79905000000 79908992279 26635000000 26636330759 865196224 866526983
+79908000000 79911992425 26636000000 26637330808 866196224 867527032
+79911000000 79914992552 26637000000 26638330850 867196224 868527074
+79914000000 79917992726 26638000000 26639330908 868196224 869527132
+79917000000 79920992790 26639000000 26640330930 869196224 870527154
+79920000000 79923992997 26640000000 26641330999 870196224 871527223
+79923000000 79926993178 26641000000 26642331059 871196224 872527283
+79926000000 79929993327 26642000000 26643331109 872196224 873527333
+79929000000 79932993384 26643000000 26644331128 873196224 874527352
+79932000000 79935993580 26644000000 26645331193 874196224 875527417
+79935000000 79938993770 26645000000 26646331256 875196224 876527480
+79938000000 79941993915 26646000000 26647331305 876196224 877527529
+79941000000 79944994087 26647000000 26648331362 877196224 878527586
+79944000000 79947994220 26648000000 26649331406 878196224 879527630
+79947000000 79950994291 26649000000 26650331430 879196224 880527654
+79950000000 79953994517 26650000000 26651331505 880196224 881527729
+79953000000 79956994677 26651000000 26652331559 881196224 882527783
+79956000000 79959994809 26652000000 26653331603 882196224 883527827
+79959000000 79962994917 26653000000 26654331639 883196224 884527863
+79962000000 79965995128 26654000000 26655331709 884196224 885527933
+79965000000 79968995294 26655000000 26656331764 885196224 886527988
+79968000000 79971995405 26656000000 26657331801 886196224 887528025
+79971000000 79974995565 26657000000 26658331855 887196224 888528079
+79974000000 79977995677 26658000000 26659331892 888196224 889528116
+79977000000 79980995875 26659000000 26660331958 889196224 890528182
+79980000000 79983995965 26660000000 26661331988 890196224 891528212
+79983000000 79986996190 26661000000 26662332063 891196224 892528287
+79986000000 79989996322 26662000000 26663332107 892196224 893528331
+79989000000 79992996461 26663000000 26664332153 893196224 894528377
+79992000000 79995996512 26664000000 26665332170 894196224 895528394
+79995000000 79998996723 26665000000 26666332241 895196224 896528465
+79998000000 80001996932 26666000000 26667332310 896196224 897528534
+80001000000 80004997060 26667000000 26668332353 897196224 898528577
+80004000000 80007997203 26668000000 26669332401 898196224 899528625
+80007000000 80010997374 26669000000 26670332458 899196224 900528682
+80010000000 80013997471 26670000000 26671332490 900196224 901528714
+80013000000 80016997684 26671000000 26672332561 901196224 902528785
+80016000000 80019997814 26672000000 26673332604 902196224 903528828
+80019000000 80022997964 26673000000 26674332654 903196224 904528878
+80022000000 80025998124 26674000000 26675332708 904196224 905528932
+80025000000 80028998220 26675000000 26676332740 905196224 906528964
+80028000000 80031998408 26676000000 26677332802 906196224 907529026
+80031000000 80034998576 26677000000 26678332858 907196224 908529082
+80034000000 80037998712 26678000000 26679332904 908196224 909529128
+80037000000 80040998887 26679000000 26680332962 909196224 910529186
+80040000000 80043999009 26680000000 26681333003 910196224 911529227
+80043000000 80046999159 26681000000 26682333053 911196224 912529277
+80046000000 80049999307 26682000000 26683333102 912196224 913529326
+80049000000 80052999513 26683000000 26684333171 913196224 914529395
+80052000000 80055999627 26684000000 26685333209 914196224 915529433
+80055000000 80058999759 26685000000 26686333253 915196224 916529477
+80058000000 80061999933 26686000000 26687333311 916196224 917529535
+80061000000 80065000052 26687000000 26688333350 917196224 918529574
+80064000000 80068000176 26688000000 26689333392 918196224 919529616
+80067000000 80071000395 26689000000 26690333465 919196224 920529689
+80070000000 80074000531 26690000000 26691333510 920196224 921529734
+80073000000 80077000682 26691000000 26692333560 921196224 922529784
+80076000000 80080000842 26692000000 26693333614 922196224 923529838
+80079000000 80083000963 26693000000 26694333654 923196224 924529878
+80082000000 80086001044 26694000000 26695333681 924196224 925529905
+80085000000 80089001252 26695000000 26696333750 925196224 926529974
+80088000000 80092001407 26696000000 26697333802 926196224 927530026
+80091000000 80095001566 26697000000 26698333855 927196224 928530079
+80094000000 80098001718 26698000000 26699333906 928196224 929530130
+80097000000 80101001840 26699000000 26700333946 929196224 930530170
+80100000000 80104002018 26700000000 26701334006 930196224 931530230
+80103000000 80107002167 26701000000 26702334055 931196224 932530279
+80106000000 80110002295 26702000000 26703334098 932196224 933530322
+80109000000 80113002464 26703000000 26704334154 933196224 934530378
+80112000000 80116002584 26704000000 26705334194 934196224 935530418
+80115000000 80119002511 26705000000 26706334170 935196224 936530394
+80118000000 80122002834 26706000000 26707334278 936196224 937530502
+80121000000 80125003087 26707000000 26708334362 937196224 938530586
+80124000000 80128003197 26708000000 26709334399 938196224 939530623
+80127000000 80131003376 26709000000 26710334458 939196224 940530682
+80130000000 80134003424 26710000000 26711334474 940196224 941530698
+80133000000 80137003678 26711000000 26712334559 941196224 942530783
+80136000000 80140003797 26712000000 26713334599 942196224 943530823
+80139000000 80143003968 26713000000 26714334656 943196224 944530880
+80142000000 80146004115 26714000000 26715334705 944196224 945530929
+80145000000 80149004268 26715000000 26716334756 945196224 946530980
+80148000000 80152004414 26716000000 26717334804 946196224 947531028
+80151000000 80155004558 26717000000 26718334852 947196224 948531076
+80154000000 80158004721 26718000000 26719334907 948196224 949531131
+80157000000 80161004873 26719000000 26720334957 949196224 950531181
+80160000000 80164005027 26720000000 26721335009 950196224 951531233
+80163000000 80167005147 26721000000 26722335049 951196224 952531273
+80166000000 80170005356 26722000000 26723335118 952196224 953531342
+80169000000 80173005486 26723000000 26724335162 953196224 954531386
+80172000000 80176005600 26724000000 26725335200 954196224 955531424
+80175000000 80179005761 26725000000 26726335253 955196224 956531477
+80178000000 80182005896 26726000000 26727335298 956196224 957531522
+80181000000 80185006039 26727000000 26728335346 957196224 958531570
+80184000000 80188006139 26728000000 26729335379 958196224 959531603
+80187000000 80191006373 26729000000 26730335457 959196224 960531681
+80190000000 80194006446 26730000000 26731335482 960196224 961531706
+80193000000 80197006567 26731000000 26732335522 961196224 962531746
+80196000000 80200006756 26732000000 26733335585 962196224 963531809
+80199000000 80203006910 26733000000 26734335636 963196224 964531860
+80202000000 80206007089 26734000000 26735335696 964196224 965531920
+80205000000 80209007235 26735000000 26736335745 965196224 966531969
+80208000000 80212007362 26736000000 26737335787 966196224 967532011
+80211000000 80215007536 26737000000 26738335845 967196224 968532069
+80214000000 80218007600 26738000000 26739335866 968196224 969532090
+80217000000 80221007807 26739000000 26740335935 969196224 970532159
+80220000000 80224007988 26740000000 26741335996 970196224 971532220
+80223000000 80227008137 26741000000 26742336045 971196224 972532269
+80226000000 80230008194 26742000000 26743336064 972196224 973532288
+80229000000 80233008390 26743000000 26744336130 973196224 974532354
+80232000000 80236008580 26744000000 26745336193 974196224 975532417
+80235000000 80239008725 26745000000 26746336241 975196224 976532465
+80238000000 80242008897 26746000000 26747336299 976196224 977532523
+80241000000 80245009030 26747000000 26748336343 977196224 978532567
+80244000000 80248009101 26748000000 26749336367 978196224 979532591
+80247000000 80251009327 26749000000 26750336442 979196224 980532666
+80250000000 80254009487 26750000000 26751336495 980196224 981532719
+80253000000 80257009619 26751000000 26752336539 981196224 982532763
+80256000000 80260009727 26752000000 26753336575 982196224 983532799
+80259000000 80263009938 26753000000 26754336646 983196224 984532870
+80262000000 80266010104 26754000000 26755336701 984196224 985532925
+80265000000 80269010215 26755000000 26756336738 985196224 986532962
+80268000000 80272010375 26756000000 26757336791 986196224 987533015
+80271000000 80275010487 26757000000 26758336829 987196224 988533053
+80274000000 80278010685 26758000000 26759336895 988196224 989533119
+80277000000 80281010775 26759000000 26760336925 989196224 990533149
+80280000000 80284011000 26760000000 26761337000 990196224 991533224
+80283000000 80287011132 26761000000 26762337044 991196224 992533268
+80286000000 80290011271 26762000000 26763337090 992196224 993533314
+80289000000 80293011322 26763000000 26764337107 993196224 994533331
+80292000000 80296011533 26764000000 26765337177 994196224 995533401
+80295000000 80299011742 26765000000 26766337247 995196224 996533471
+80298000000 80302011870 26766000000 26767337290 996196224 997533514
+80301000000 80305012013 26767000000 26768337337 997196224 998533561
+80304000000 80308012184 26768000000 26769337394 998196224 999533618
+80307000000 80311012281 26769000000 26770337427 999196224 1000533651
+80310000000 80314012494 26770000000 26771337498 1000196224 1001533722
+80313000000 80317012624 26771000000 26772337541 1001196224 1002533765
+80316000000 80320012774 26772000000 26773337591 1002196224 1003533815
+80319000000 80323012934 26773000000 26774337644 1003196224 1004533868
+80322000000 80326013030 26774000000 26775337676 1004196224 1005533900
+80325000000 80329013218 26775000000 26776337739 1005196224 1006533963
+80328000000 80332013386 26776000000 26777337795 1006196224 1007534019
+80331000000 80335013522 26777000000 26778337840 1007196224 1008534064
+80334000000 80338013697 26778000000 26779337899 1008196224 1009534123
+80337000000 80341013819 26779000000 26780337939 1009196224 1010534163
+80340000000 80344013969 26780000000 26781337989 1010196224 1011534213
+80343000000 80347014117 26781000000 26782338039 1011196224 1012534263
+80346000000 80350014323 26782000000 26783338107 1012196224 1013534331
+80349000000 80353014437 26783000000 26784338145 1013196224 1014534369
+80352000000 80356014569 26784000000 26785338189 1014196224 1015534413
+80355000000 80359014743 26785000000 26786338247 1015196224 1016534471
+80358000000 80362014862 26786000000 26787338287 1016196224 1017534511
+80361000000 80365014986 26787000000 26788338328 1017196224 1018534552
+80364000000 80368015205 26788000000 26789338401 1018196224 1019534625
+80367000000 80371015341 26789000000 26790338447 1019196224 1020534671
+80370000000 80374015492 26790000000 26791338497 1020196224 1021534721
+80373000000 80377015652 26791000000 26792338550 1021196224 1022534774
+80376000000 80380015773 26792000000 26793338591 1022196224 1023534815
+80379000000 80383015854 26793000000 26794338618 1023196224 1024534842
+80382000000 80386016062 26794000000 26795338687 1024196224 1025534911
+80385000000 80389016217 26795000000 26796338739 1025196224 1026534963
+80388000000 80392016376 26796000000 26797338792 1026196224 1027535016
+80391000000 80395016528 26797000000 26798338842 1027196224 1028535066
+80394000000 80398016650 26798000000 26799338883 1028196224 1029535107
+80397000000 80401016828 26799000000 26800338942 1029196224 1030535166
+80400000000 80404016977 26800000000 26801338992 1030196224 1031535216
+80403000000 80407017105 26801000000 26802339035 1031196224 1032535259
+80406000000 80410017274 26802000000 26803339091 1032196224 1033535315
+80409000000 80413017394 26803000000 26804339131 1033196224 1034535355
+80412000000 80416017321 26804000000 26805339107 1034196224 1035535331
+80415000000 80419017644 26805000000 26806339214 1035196224 1036535438
+80418000000 80422017897 26806000000 26807339299 1036196224 1037535523
+80421000000 80425018007 26807000000 26808339335 1037196224 1038535559
+80424000000 80428018186 26808000000 26809339395 1038196224 1039535619
+80427000000 80431018234 26809000000 26810339411 1039196224 1040535635
+80430000000 80434018488 26810000000 26811339496 1040196224 1041535720
+80433000000 80437018607 26811000000 26812339535 1041196224 1042535759
+80436000000 80440018778 26812000000 26813339592 1042196224 1043535816
+80439000000 80443018925 26813000000 26814339641 1043196224 1044535865
+80442000000 80446019078 26814000000 26815339692 1044196224 1045535916
+80445000000 80449019224 26815000000 26816339741 1045196224 1046535965
+80448000000 80452019368 26816000000 26817339789 1046196224 1047536013
+80451000000 80455019531 26817000000 26818339843 1047196224 1048536067
+80454000000 80458019683 26818000000 26819339894 1048196224 1049536118
+80457000000 80461019837 26819000000 26820339945 1049196224 1050536169
+80460000000 80464019957 26820000000 26821339985 1050196224 1051536209
+80463000000 80467020166 26821000000 26822340055 1051196224 1052536279
+80466000000 80470020296 26822000000 26823340098 1052196224 1053536322
+80469000000 80473020410 26823000000 26824340136 1053196224 1054536360
+80472000000 80476020571 26824000000 26825340190 1054196224 1055536414
+80475000000 80479020706 26825000000 26826340235 1055196224 1056536459
+80478000000 80482020849 26826000000 26827340283 1056196224 1057536507
+80481000000 80485020949 26827000000 26828340316 1057196224 1058536540
+80484000000 80488021183 26828000000 26829340394 1058196224 1059536618
+80487000000 80491021256 26829000000 26830340418 1059196224 1060536642
+80490000000 80494021377 26830000000 26831340459 1060196224 1061536683
+80493000000 80497021566 26831000000 26832340522 1061196224 1062536746
+80496000000 80500021720 26832000000 26833340573 1062196224 1063536797
+80499000000 80503021899 26833000000 26834340633 1063196224 1064536857
+80502000000 80506022045 26834000000 26835340681 1064196224 1065536905
+80505000000 80509022172 26835000000 26836340724 1065196224 1066536948
+80508000000 80512022346 26836000000 26837340782 1066196224 1067537006
+80511000000 80515022410 26837000000 26838340803 1067196224 1068537027
+80514000000 80518022617 26838000000 26839340872 1068196224 1069537096
+80517000000 80521022798 26839000000 26840340932 1069196224 1070537156
+80520000000 80524022947 26840000000 26841340982 1070196224 1071537206
+80523000000 80527023004 26841000000 26842341001 1071196224 1072537225
+80526000000 80530023200 26842000000 26843341066 1072196224 1073537290
+80529000000 80533023390 26843000000 26844341130 1073196224 1074537354
+80532000000 80536023535 26844000000 26845341178 1074196224 1075537402
+80535000000 80539023707 26845000000 26846341235 1075196224 1076537459
+80538000000 80542023840 26846000000 26847341280 1076196224 1077537504
+80541000000 80545023911 26847000000 26848341303 1077196224 1078537527
+80544000000 80548024137 26848000000 26849341379 1078196224 1079537603
+80547000000 80551024297 26849000000 26850341432 1079196224 1080537656
+80550000000 80554024429 26850000000 26851341476 1080196224 1081537700
+80553000000 80557024537 26851000000 26852341512 1081196224 1082537736
+80556000000 80560024748 26852000000 26853341582 1082196224 1083537806
+80559000000 80563024914 26853000000 26854341638 1083196224 1084537862
+80562000000 80566025025 26854000000 26855341675 1084196224 1085537899
+80565000000 80569025185 26855000000 26856341728 1085196224 1086537952
+80568000000 80572025297 26856000000 26857341765 1086196224 1087537989
+80571000000 80575025495 26857000000 26858341831 1087196224 1088538055
+80574000000 80578025585 26858000000 26859341861 1088196224 1089538085
+80577000000 80581025810 26859000000 26860341936 1089196224 1090538160
+80580000000 80584025942 26860000000 26861341980 1090196224 1091538204
+80583000000 80587026081 26861000000 26862342027 1091196224 1092538251
+80586000000 80590026132 26862000000 26863342044 1092196224 1093538268
+80589000000 80593026343 26863000000 26864342114 1093196224 1094538338
+80592000000 80596026552 26864000000 26865342184 1094196224 1095538408
+80595000000 80599026680 26865000000 26866342226 1095196224 1096538450
+80598000000 80602026823 26866000000 26867342274 1096196224 1097538498
+80601000000 80605026994 26867000000 26868342331 1097196224 1098538555
+80604000000 80608027091 26868000000 26869342363 1098196224 1099538587
+80607000000 80611027304 26869000000 26870342434 1099196224 1100538658
+80610000000 80614027434 26870000000 26871342478 1100196224 1101538702
+80613000000 80617027584 26871000000 26872342528 1101196224 1102538752
+80616000000 80620027744 26872000000 26873342581 1102196224 1103538805
+80619000000 80623027840 26873000000 26874342613 1103196224 1104538837
+80622000000 80626028028 26874000000 26875342676 1104196224 1105538900
+80625000000 80629028196 26875000000 26876342732 1105196224 1106538956
+80628000000 80632028332 26876000000 26877342777 1106196224 1107539001
+80631000000 80635028507 26877000000 26878342835 1107196224 1108539059
+80634000000 80638028629 26878000000 26879342876 1108196224 1109539100
+80637000000 80641028779 26879000000 26880342926 1109196224 1110539150
+80640000000 80644028927 26880000000 26881342975 1110196224 1111539199
+80643000000 80647029133 26881000000 26882343044 1111196224 1112539268
+80646000000 80650029247 26882000000 26883343082 1112196224 1113539306
+80649000000 80653029379 26883000000 26884343126 1113196224 1114539350
+80652000000 80656029553 26884000000 26885343184 1114196224 1115539408
+80655000000 80659029672 26885000000 26886343224 1115196224 1116539448
+80658000000 80662029796 26886000000 26887343265 1116196224 1117539489
+80661000000 80665030015 26887000000 26888343338 1117196224 1118539562
+80664000000 80668030151 26888000000 26889343383 1118196224 1119539607
+80667000000 80671030302 26889000000 26890343434 1119196224 1120539658
+80670000000 80674030462 26890000000 26891343487 1120196224 1121539711
+80673000000 80677030583 26891000000 26892343527 1121196224 1122539751
+80676000000 80680030664 26892000000 26893343554 1122196224 1123539778
+80679000000 80683030872 26893000000 26894343624 1123196224 1124539848
+80682000000 80686031027 26894000000 26895343675 1124196224 1125539899
+80685000000 80689031186 26895000000 26896343728 1125196224 1126539952
+80688000000 80692031338 26896000000 26897343779 1126196224 1127540003
+80691000000 80695031460 26897000000 26898343820 1127196224 1128540044
+80694000000 80698031638 26898000000 26899343879 1128196224 1129540103
+80697000000 80701031787 26899000000 26900343929 1129196224 1130540153
+80700000000 80704031915 26900000000 26901343971 1130196224 1131540195
+80703000000 80707032084 26901000000 26902344028 1131196224 1132540252
+80706000000 80710032204 26902000000 26903344068 1132196224 1133540292
+80709000000 80713032131 26903000000 26904344043 1133196224 1134540267
+80712000000 80716032454 26904000000 26905344151 1134196224 1135540375
+80715000000 80719032707 26905000000 26906344235 1135196224 1136540459
+80718000000 80722032817 26906000000 26907344272 1136196224 1137540496
+80721000000 80725032996 26907000000 26908344332 1137196224 1138540556
+80724000000 80728033044 26908000000 26909344348 1138196224 1139540572
+80727000000 80731033298 26909000000 26910344432 1139196224 1140540656
+80730000000 80734033417 26910000000 26911344472 1140196224 1141540696
+80733000000 80737033588 26911000000 26912344529 1141196224 1142540753
+80736000000 80740033735 26912000000 26913344578 1142196224 1143540802
+80739000000 80743033888 26913000000 26914344629 1143196224 1144540853
+80742000000 80746034034 26914000000 26915344678 1144196224 1145540902
+80745000000 80749034178 26915000000 26916344726 1145196224 1146540950
+80748000000 80752034341 26916000000 26917344780 1146196224 1147541004
+80751000000 80755034493 26917000000 26918344831 1147196224 1148541055
+80754000000 80758034647 26918000000 26919344882 1148196224 1149541106
+80757000000 80761034767 26919000000 26920344922 1149196224 1150541146
+80760000000 80764034976 26920000000 26921344992 1150196224 1151541216
+80763000000 80767035106 26921000000 26922345035 1151196224 1152541259
+80766000000 80770035220 26922000000 26923345073 1152196224 1153541297
+80769000000 80773035381 26923000000 26924345127 1153196224 1154541351
+80772000000 80776035516 26924000000 26925345172 1154196224 1155541396
+80775000000 80779035659 26925000000 26926345219 1155196224 1156541443
+80778000000 80782035759 26926000000 26927345253 1156196224 1157541477
+80781000000 80785035993 26927000000 26928345331 1157196224 1158541555
+80784000000 80788036066 26928000000 26929345355 1158196224 1159541579
+80787000000 80791036187 26929000000 26930345395 1159196224 1160541619
+80790000000 80794036376 26930000000 26931345458 1160196224 1161541682
+80793000000 80797036530 26931000000 26932345510 1161196224 1162541734
+80796000000 80800036709 26932000000 26933345569 1162196224 1163541793
+80799000000 80803036855 26933000000 26934345618 1163196224 1164541842
+80802000000 80806036982 26934000000 26935345660 1164196224 1165541884
+80805000000 80809037156 26935000000 26936345718 1165196224 1166541942
+80808000000 80812037220 26936000000 26937345740 1166196224 1167541964
+80811000000 80815037427 26937000000 26938345809 1167196224 1168542033
+80814000000 80818037608 26938000000 26939345869 1168196224 1169542093
+80817000000 80821037757 26939000000 26940345919 1169196224 1170542143
+80820000000 80824037814 26940000000 26941345938 1170196224 1171542162
+80823000000 80827038010 26941000000 26942346003 1171196224 1172542227
+80826000000 80830038200 26942000000 26943346066 1172196224 1173542290
+80829000000 80833038345 26943000000 26944346115 1173196224 1174542339
+80832000000 80836038517 26944000000 26945346172 1174196224 1175542396
+80835000000 80839038650 26945000000 26946346216 1175196224 1176542440
+80838000000 80842038721 26946000000 26947346240 1176196224 1177542464
+80841000000 80845038947 26947000000 26948346315 1177196224 1178542539
+80844000000 80848039107 26948000000 26949346369 1178196224 1179542593
+80847000000 80851039239 26949000000 26950346413 1179196224 1180542637
+80850000000 80854039347 26950000000 26951346449 1180196224 1181542673
+80853000000 80857039558 26951000000 26952346519 1181196224 1182542743
+80856000000 80860039724 26952000000 26953346574 1182196224 1183542798
+80859000000 80863039835 26953000000 26954346611 1183196224 1184542835
+80862000000 80866039995 26954000000 26955346665 1184196224 1185542889
+80865000000 80869040107 26955000000 26956346702 1185196224 1186542926
+80868000000 80872040305 26956000000 26957346768 1186196224 1187542992
+80871000000 80875040395 26957000000 26958346798 1187196224 1188543022
+80874000000 80878040620 26958000000 26959346873 1188196224 1189543097
+80877000000 80881040752 26959000000 26960346917 1189196224 1190543141
+80880000000 80884040891 26960000000 26961346963 1190196224 1191543187
+80883000000 80887040942 26961000000 26962346980 1191196224 1192543204
+80886000000 80890041153 26962000000 26963347051 1192196224 1193543275
+80889000000 80893041362 26963000000 26964347120 1193196224 1194543344
+80892000000 80896041490 26964000000 26965347163 1194196224 1195543387
+80895000000 80899041633 26965000000 26966347211 1195196224 1196543435
+80898000000 80902041804 26966000000 26967347268 1196196224 1197543492
+80901000000 80905041901 26967000000 26968347300 1197196224 1198543524
+80904000000 80908042114 26968000000 26969347371 1198196224 1199543595
+80907000000 80911042244 26969000000 26970347414 1199196224 1200543638
+80910000000 80914042394 26970000000 26971347464 1200196224 1201543688
+80913000000 80917042554 26971000000 26972347518 1201196224 1202543742
+80916000000 80920042650 26972000000 26973347550 1202196224 1203543774
+80919000000 80923042838 26973000000 26974347612 1203196224 1204543836
+80922000000 80926043006 26974000000 26975347668 1204196224 1205543892
+80925000000 80929043142 26975000000 26976347714 1205196224 1206543938
+80928000000 80932043317 26976000000 26977347772 1206196224 1207543996
+80931000000 80935043439 26977000000 26978347813 1207196224 1208544037
+80934000000 80938043589 26978000000 26979347863 1208196224 1209544087
+80937000000 80941043737 26979000000 26980347912 1209196224 1210544136
+80940000000 80944043943 26980000000 26981347981 1210196224 1211544205
+80943000000 80947044057 26981000000 26982348019 1211196224 1212544243
+80946000000 80950044189 26982000000 26983348063 1212196224 1213544287
+80949000000 80953044363 26983000000 26984348121 1213196224 1214544345
+80952000000 80956044482 26984000000 26985348160 1214196224 1215544384
+80955000000 80959044606 26985000000 26986348202 1215196224 1216544426
+80958000000 80962044825 26986000000 26987348275 1216196224 1217544499
+80961000000 80965044961 26987000000 26988348320 1217196224 1218544544
+80964000000 80968045112 26988000000 26989348370 1218196224 1219544594
+80967000000 80971045272 26989000000 26990348424 1219196224 1220544648
+80970000000 80974045393 26990000000 26991348464 1220196224 1221544688
+80973000000 80977045474 26991000000 26992348491 1221196224 1222544715
+80976000000 80980045682 26992000000 26993348560 1222196224 1223544784
+80979000000 80983045837 26993000000 26994348612 1223196224 1224544836
+80982000000 80986045996 26994000000 26995348665 1224196224 1225544889
+80985000000 80989046148 26995000000 26996348716 1225196224 1226544940
+80988000000 80992046270 26996000000 26997348756 1226196224 1227544980
+80991000000 80995046448 26997000000 26998348816 1227196224 1228545040
+80994000000 80998046597 26998000000 26999348865 1228196224 1229545089
+80997000000 81001046725 26999000000 27000348908 1229196224 1230545132
+81000000000 81004046894 27000000000 27001348964 1230196224 1231545188
+81003000000 81007047014 27001000000 27002349004 1231196224 1232545228
+81006000000 81010046941 27002000000 27003348980 1232196224 1233545204
+81009000000 81013047264 27003000000 27004349088 1233196224 1234545312
+81012000000 81016047517 27004000000 27005349172 1234196224 1235545396
+81015000000 81019047627 27005000000 27006349209 1235196224 1236545433
+81018000000 81022047806 27006000000 27007349268 1236196224 1237545492
+81021000000 81025047854 27007000000 27008349284 1237196224 1238545508
+81024000000 81028048108 27008000000 27009349369 1238196224 1239545593
+81027000000 81031048227 27009000000 27010349409 1239196224 1240545633
+81030000000 81034048398 27010000000 27011349466 1240196224 1241545690
+81033000000 81037048545 27011000000 27012349515 1241196224 1242545739
+81036000000 81040048698 27012000000 27013349566 1242196224 1243545790
+81039000000 81043048844 27013000000 27014349614 1243196224 1244545838
+81042000000 81046048988 27014000000 27015349662 1244196224 1245545886
+81045000000 81049049151 27015000000 27016349717 1245196224 1246545941
+81048000000 81052049303 27016000000 27017349767 1246196224 1247545991
+81051000000 81055049457 27017000000 27018349819 1247196224 1248546043
+81054000000 81058049577 27018000000 27019349859 1248196224 1249546083
+81057000000 81061049786 27019000000 27020349928 1249196224 1250546152
+81060000000 81064049916 27020000000 27021349972 1250196224 1251546196
+81063000000 81067050030 27021000000 27022350010 1251196224 1252546234
+81066000000 81070050191 27022000000 27023350063 1252196224 1253546287
+81069000000 81073050326 27023000000 27024350108 1253196224 1254546332
+81072000000 81076050469 27024000000 27025350156 1254196224 1255546380
+81075000000 81079050569 27025000000 27026350189 1255196224 1256546413
+81078000000 81082050803 27026000000 27027350267 1256196224 1257546491
+81081000000 81085050876 27027000000 27028350292 1257196224 1258546516
+81084000000 81088050997 27028000000 27029350332 1258196224 1259546556
+81087000000 81091051186 27029000000 27030350395 1259196224 1260546619
+81090000000 81094051340 27030000000 27031350446 1260196224 1261546670
+81093000000 81097051519 27031000000 27032350506 1261196224 1262546730
+81096000000 81100051665 27032000000 27033350555 1262196224 1263546779
+81099000000 81103051792 27033000000 27034350597 1263196224 1264546821
+81102000000 81106051966 27034000000 27035350655 1264196224 1265546879
+81105000000 81109052030 27035000000 27036350676 1265196224 1266546900
+81108000000 81112052237 27036000000 27037350745 1266196224 1267546969
+81111000000 81115052418 27037000000 27038350806 1267196224 1268547030
+81114000000 81118052567 27038000000 27039350855 1268196224 1269547079
+81117000000 81121052624 27039000000 27040350874 1269196224 1270547098
+81120000000 81124052820 27040000000 27041350940 1270196224 1271547164
+81123000000 81127053010 27041000000 27042351003 1271196224 1272547227
+81126000000 81130053155 27042000000 27043351051 1272196224 1273547275
+81129000000 81133053327 27043000000 27044351109 1273196224 1274547333
+81132000000 81136053460 27044000000 27045351153 1274196224 1275547377
+81135000000 81139053531 27045000000 27046351177 1275196224 1276547401
+81138000000 81142053757 27046000000 27047351252 1276196224 1277547476
+81141000000 81145053917 27047000000 27048351305 1277196224 1278547529
+81144000000 81148054049 27048000000 27049351349 1278196224 1279547573
+81147000000 81151054157 27049000000 27050351385 1279196224 1280547609
+81150000000 81154054368 27050000000 27051351456 1280196224 1281547680
+81153000000 81157054534 27051000000 27052351511 1281196224 1282547735
+81156000000 81160054645 27052000000 27053351548 1282196224 1283547772
+81159000000 81163054805 27053000000 27054351601 1283196224 1284547825
+81162000000 81166054917 27054000000 27055351639 1284196224 1285547863
+81165000000 81169055115 27055000000 27056351705 1285196224 1286547929
+81168000000 81172055205 27056000000 27057351735 1286196224 1287547959
+81171000000 81175055430 27057000000 27058351810 1287196224 1288548034
+81174000000 81178055562 27058000000 27059351854 1288196224 1289548078
+81177000000 81181055701 27059000000 27060351900 1289196224 1290548124
+81180000000 81184055752 27060000000 27061351917 1290196224 1291548141
+81183000000 81187055963 27061000000 27062351987 1291196224 1292548211
+81186000000 81190056172 27062000000 27063352057 1292196224 1293548281
+81189000000 81193056300 27063000000 27064352100 1293196224 1294548324
+81192000000 81196056443 27064000000 27065352147 1294196224 1295548371
+81195000000 81199056614 27065000000 27066352204 1295196224 1296548428
+81198000000 81202056711 27066000000 27067352237 1296196224 1297548461
+81201000000 81205056924 27067000000 27068352308 1297196224 1298548532
+81204000000 81208057054 27068000000 27069352351 1298196224 1299548575
+81207000000 81211057204 27069000000 27070352401 1299196224 1300548625
+81210000000 81214057364 27070000000 27071352454 1300196224 1301548678
+81213000000 81217057460 27071000000 27072352486 1301196224 1302548710
+81216000000 81220057648 27072000000 27073352549 1302196224 1303548773
+81219000000 81223057816 27073000000 27074352605 1303196224 1304548829
+81222000000 81226057952 27074000000 27075352650 1304196224 1305548874
+81225000000 81229058127 27075000000 27076352709 1305196224 1306548933
+81228000000 81232058249 27076000000 27077352749 1306196224 1307548973
+81231000000 81235058399 27077000000 27078352799 1307196224 1308549023
+81234000000 81238058547 27078000000 27079352849 1308196224 1309549073
+81237000000 81241058753 27079000000 27080352917 1309196224 1310549141
+81240000000 81244058867 27080000000 27081352955 1310196224 1311549179
+81243000000 81247058999 27081000000 27082352999 1311196224 1312549223
+81246000000 81250059173 27082000000 27083353057 1312196224 1313549281
+81249000000 81253059292 27083000000 27084353097 1313196224 1314549321
+81252000000 81256059416 27084000000 27085353138 1314196224 1315549362
+81255000000 81259059635 27085000000 27086353211 1315196224 1316549435
+81258000000 81262059771 27086000000 27087353257 1316196224 1317549481
+81261000000 81265059922 27087000000 27088353307 1317196224 1318549531
+81264000000 81268060082 27088000000 27089353360 1318196224 1319549584
+81267000000 81271060203 27089000000 27090353401 1319196224 1320549625
+81270000000 81274060284 27090000000 27091353428 1320196224 1321549652
+81273000000 81277060492 27091000000 27092353497 1321196224 1322549721
+81276000000 81280060647 27092000000 27093353549 1322196224 1323549773
+81279000000 81283060806 27093000000 27094353602 1323196224 1324549826
+81282000000 81286060958 27094000000 27095353652 1324196224 1325549876
+81285000000 81289061080 27095000000 27096353693 1325196224 1326549917
+81288000000 81292061258 27096000000 27097353752 1326196224 1327549976
+81291000000 81295061407 27097000000 27098353802 1327196224 1328550026
+81294000000 81298061535 27098000000 27099353845 1328196224 1329550069
+81297000000 81301061704 27099000000 27100353901 1329196224 1330550125
+81300000000 81304061824 27100000000 27101353941 1330196224 1331550165
+81303000000 81307061751 27101000000 27102353917 1331196224 1332550141
+81306000000 81310062074 27102000000 27103354024 1332196224 1333550248
+81309000000 81313062327 27103000000 27104354109 1333196224 1334550333
+81312000000 81316062437 27104000000 27105354145 1334196224 1335550369
+81315000000 81319062616 27105000000 27106354205 1335196224 1336550429
+81318000000 81322062664 27106000000 27107354221 1336196224 1337550445
+81321000000 81325062918 27107000000 27108354306 1337196224 1338550530
+81324000000 81328063037 27108000000 27109354345 1338196224 1339550569
+81327000000 81331063208 27109000000 27110354402 1339196224 1340550626
+81330000000 81334063355 27110000000 27111354451 1340196224 1341550675
+81333000000 81337063508 27111000000 27112354502 1341196224 1342550726
+81336000000 81340063654 27112000000 27113354551 1342196224 1343550775
+81339000000 81343063798 27113000000 27114354599 1343196224 1344550823
+81342000000 81346063961 27114000000 27115354653 1344196224 1345550877
+81345000000 81349064113 27115000000 27116354704 1345196224 1346550928
+81348000000 81352064267 27116000000 27117354755 1346196224 1347550979
+81351000000 81355064387 27117000000 27118354795 1347196224 1348551019
+81354000000 81358064596 27118000000 27119354865 1348196224 1349551089
+81357000000 81361064726 27119000000 27120354908 1349196224 1350551132
+81360000000 81364064840 27120000000 27121354946 1350196224 1351551170
+81363000000 81367065001 27121000000 27122355000 1351196224 1352551224
+81366000000 81370065136 27122000000 27123355045 1352196224 1353551269
+81369000000 81373065279 27123000000 27124355093 1353196224 1354551317
+81372000000 81376065379 27124000000 27125355126 1354196224 1355551350
+81375000000 81379065613 27125000000 27126355204 1355196224 1356551428
+81378000000 81382065686 27126000000 27127355228 1356196224 1357551452
+81381000000 81385065807 27127000000 27128355269 1357196224 1358551493
+81384000000 81388065996 27128000000 27129355332 1358196224 1359551556
+81387000000 81391066150 27129000000 27130355383 1359196224 1360551607
+81390000000 81394066329 27130000000 27131355443 1360196224 1361551667
+81393000000 81397066475 27131000000 27132355491 1361196224 1362551715
+81396000000 81400066602 27132000000 27133355534 1362196224 1363551758
+81399000000 81403066776 27133000000 27134355592 1363196224 1364551816
+81402000000 81406066840 27134000000 27135355613 1364196224 1365551837
+81405000000 81409067047 27135000000 27136355682 1365196224 1366551906
+81408000000 81412067228 27136000000 27137355742 1366196224 1367551966
+81411000000 81415067377 27137000000 27138355792 1367196224 1368552016
+81414000000 81418067434 27138000000 27139355811 1368196224 1369552035
+81417000000 81421067630 27139000000 27140355876 1369196224 1370552100
+81420000000 81424067820 27140000000 27141355940 1370196224 1371552164
+81423000000 81427067965 27141000000 27142355988 1371196224 1372552212
+81426000000 81430068137 27142000000 27143356045 1372196224 1373552269
+81429000000 81433068270 27143000000 27144356090 1373196224 1374552314
+81432000000 81436068341 27144000000 27145356113 1374196224 1375552337
+81435000000 81439068567 27145000000 27146356189 1375196224 1376552413
+81438000000 81442068727 27146000000 27147356242 1376196224 1377552466
+81441000000 81445068859 27147000000 27148356286 1377196224 1378552510
+81444000000 81448068967 27148000000 27149356322 1378196224 1379552546
+81447000000 81451069178 27149000000 27150356392 1379196224 1380552616
+81450000000 81454069344 27150000000 27151356448 1380196224 1381552672
+81453000000 81457069455 27151000000 27152356485 1381196224 1382552709
+81456000000 81460069615 27152000000 27153356538 1382196224 1383552762
+81459000000 81463069727 27153000000 27154356575 1383196224 1384552799
+81462000000 81466069925 27154000000 27155356641 1384196224 1385552865
+81465000000 81469070015 27155000000 27156356671 1385196224 1386552895
+81468000000 81472070240 27156000000 27157356746 1386196224 1387552970
+81471000000 81475070372 27157000000 27158356790 1387196224 1388553014
+81474000000 81478070511 27158000000 27159356837 1388196224 1389553061
+81477000000 81481070562 27159000000 27160356854 1389196224 1390553078
+81480000000 81484070773 27160000000 27161356924 1390196224 1391553148
+81483000000 81487070982 27161000000 27162356994 1391196224 1392553218
+81486000000 81490071110 27162000000 27163357036 1392196224 1393553260
+81489000000 81493071253 27163000000 27164357084 1393196224 1394553308
+81492000000 81496071424 27164000000 27165357141 1394196224 1395553365
+81495000000 81499071521 27165000000 27166357173 1395196224 1396553397
+81498000000 81502071734 27166000000 27167357244 1396196224 1397553468
+81501000000 81505071864 27167000000 27168357288 1397196224 1398553512
+81504000000 81508072014 27168000000 27169357338 1398196224 1399553562
+81507000000 81511072174 27169000000 27170357391 1399196224 1400553615
+81510000000 81514072270 27170000000 27171357423 1400196224 1401553647
+81513000000 81517072458 27171000000 27172357486 1401196224 1402553710
+81516000000 81520072626 27172000000 27173357542 1402196224 1403553766
+81519000000 81523072762 27173000000 27174357587 1403196224 1404553811
+81522000000 81526072937 27174000000 27175357645 1404196224 1405553869
+81525000000 81529073059 27175000000 27176357686 1405196224 1406553910
+81528000000 81532073209 27176000000 27177357736 1406196224 1407553960
+81531000000 81535073357 27177000000 27178357785 1407196224 1408554009
+81534000000 81538073563 27178000000 27179357854 1408196224 1409554078
+81537000000 81541073677 27179000000 27180357892 1409196224 1410554116
+81540000000 81544073809 27180000000 27181357936 1410196224 1411554160
+81543000000 81547073983 27181000000 27182357994 1411196224 1412554218
+81546000000 81550074102 27182000000 27183358034 1412196224 1413554258
+81549000000 81553074226 27183000000 27184358075 1413196224 1414554299
+81552000000 81556074445 27184000000 27185358148 1414196224 1415554372
+81555000000 81559074581 27185000000 27186358193 1415196224 1416554417
+81558000000 81562074732 27186000000 27187358244 1416196224 1417554468
+81561000000 81565074892 27187000000 27188358297 1417196224 1418554521
+81564000000 81568075013 27188000000 27189358337 1418196224 1419554561
+81567000000 81571075094 27189000000 27190358364 1419196224 1420554588
+81570000000 81574075302 27190000000 27191358434 1420196224 1421554658
+81573000000 81577075457 27191000000 27192358485 1421196224 1422554709
+81576000000 81580075616 27192000000 27193358538 1422196224 1423554762
+81579000000 81583075768 27193000000 27194358589 1423196224 1424554813
+81582000000 81586075890 27194000000 27195358630 1424196224 1425554854
+81585000000 81589076068 27195000000 27196358689 1425196224 1426554913
+81588000000 81592076217 27196000000 27197358739 1426196224 1427554963
+81591000000 81595076345 27197000000 27198358781 1427196224 1428555005
+81594000000 81598076514 27198000000 27199358838 1428196224 1429555062
+81597000000 81601076634 27199000000 27200358878 1429196224 1430555102
+81600000000 81604076561 27200000000 27201358853 1430196224 1431555077
+81603000000 81607076884 27201000000 27202358961 1431196224 1432555185
+81606000000 81610077137 27202000000 27203359045 1432196224 1433555269
+81609000000 81613077247 27203000000 27204359082 1433196224 1434555306
+81612000000 81616077426 27204000000 27205359142 1434196224 1435555366
+81615000000 81619077474 27205000000 27206359158 1435196224 1436555382
+81618000000 81622077728 27206000000 27207359242 1436196224 1437555466
+81621000000 81625077847 27207000000 27208359282 1437196224 1438555506
+81624000000 81628078018 27208000000 27209359339 1438196224 1439555563
+81627000000 81631078165 27209000000 27210359388 1439196224 1440555612
+81630000000 81634078318 27210000000 27211359439 1440196224 1441555663
+81633000000 81637078464 27211000000 27212359488 1441196224 1442555712
+81636000000 81640078608 27212000000 27213359536 1442196224 1443555760
+81639000000 81643078771 27213000000 27214359590 1443196224 1444555814
+81642000000 81646078923 27214000000 27215359641 1444196224 1445555865
+81645000000 81649079077 27215000000 27216359692 1445196224 1446555916
+81648000000 81652079197 27216000000 27217359732 1446196224 1447555956
+81651000000 81655079406 27217000000 27218359802 1447196224 1448556026
+81654000000 81658079536 27218000000 27219359845 1448196224 1449556069
+81657000000 81661079650 27219000000 27220359883 1449196224 1450556107
+81660000000 81664079811 27220000000 27221359937 1450196224 1451556161
+81663000000 81667079946 27221000000 27222359982 1451196224 1452556206
+81666000000 81670080089 27222000000 27223360029 1452196224 1453556253
+81669000000 81673080189 27223000000 27224360063 1453196224 1454556287
+81672000000 81676080423 27224000000 27225360141 1454196224 1455556365
+81675000000 81679080496 27225000000 27226360165 1455196224 1456556389
+81678000000 81682080617 27226000000 27227360205 1456196224 1457556429
+81681000000 81685080806 27227000000 27228360268 1457196224 1458556492
+81684000000 81688080960 27228000000 27229360320 1458196224 1459556544
+81687000000 81691081139 27229000000 27230360379 1459196224 1460556603
+81690000000 81694081285 27230000000 27231360428 1460196224 1461556652
+81693000000 81697081412 27231000000 27232360470 1461196224 1462556694
+81696000000 81700081586 27232000000 27233360528 1462196224 1463556752
+81699000000 81703081650 27233000000 27234360550 1463196224 1464556774
+81702000000 81706081857 27234000000 27235360619 1464196224 1465556843
+81705000000 81709082038 27235000000 27236360679 1465196224 1466556903
+81708000000 81712082187 27236000000 27237360729 1466196224 1467556953
+81711000000 81715082244 27237000000 27238360748 1467196224 1468556972
+81714000000 81718082440 27238000000 27239360813 1468196224 1469557037
+81717000000 81721082630 27239000000 27240360876 1469196224 1470557100
+81720000000 81724082775 27240000000 27241360925 1470196224 1471557149
+81723000000 81727082947 27241000000 27242360982 1471196224 1472557206
+81726000000 81730083080 27242000000 27243361026 1472196224 1473557250
+81729000000 81733083151 27243000000 27244361050 1473196224 1474557274
+81732000000 81736083377 27244000000 27245361125 1474196224 1475557349
+81735000000 81739083537 27245000000 27246361179 1475196224 1476557403
+81738000000 81742083669 27246000000 27247361223 1476196224 1477557447
+81741000000 81745083777 27247000000 27248361259 1477196224 1478557483
+81744000000 81748083988 27248000000 27249361329 1478196224 1479557553
+81747000000 81751084154 27249000000 27250361384 1479196224 1480557608
+81750000000 81754084265 27250000000 27251361421 1480196224 1481557645
+81753000000 81757084425 27251000000 27252361475 1481196224 1482557699
+81756000000 81760084537 27252000000 27253361512 1482196224 1483557736
+81759000000 81763084735 27253000000 27254361578 1483196224 1484557802
+81762000000 81766084825 27254000000 27255361608 1484196224 1485557832
+81765000000 81769085050 27255000000 27256361683 1485196224 1486557907
+81768000000 81772085182 27256000000 27257361727 1486196224 1487557951
+81771000000 81775085321 27257000000 27258361773 1487196224 1488557997
+81774000000 81778085372 27258000000 27259361790 1488196224 1489558014
+81777000000 81781085583 27259000000 27260361861 1489196224 1490558085
+81780000000 81784085792 27260000000 27261361930 1490196224 1491558154
+81783000000 81787085920 27261000000 27262361973 1491196224 1492558197
+81786000000 81790086063 27262000000 27263362021 1492196224 1493558245
+81789000000 81793086234 27263000000 27264362078 1493196224 1494558302
+81792000000 81796086331 27264000000 27265362110 1494196224 1495558334
+81795000000 81799086544 27265000000 27266362181 1495196224 1496558405
+81798000000 81802086674 27266000000 27267362224 1496196224 1497558448
+81801000000 81805086824 27267000000 27268362274 1497196224 1498558498
+81804000000 81808086984 27268000000 27269362328 1498196224 1499558552
+81807000000 81811087080 27269000000 27270362360 1499196224 1500558584
+81810000000 81814087268 27270000000 27271362422 1500196224 1501558646
+81813000000 81817087436 27271000000 27272362478 1501196224 1502558702
+81816000000 81820087572 27272000000 27273362524 1502196224 1503558748
+81819000000 81823087747 27273000000 27274362582 1503196224 1504558806
+81822000000 81826087869 27274000000 27275362623 1504196224 1505558847
+81825000000 81829088019 27275000000 27276362673 1505196224 1506558897
+81828000000 81832088167 27276000000 27277362722 1506196224 1507558946
+81831000000 81835088373 27277000000 27278362791 1507196224 1508559015
+81834000000 81838088487 27278000000 27279362829 1508196224 1509559053
+81837000000 81841088619 27279000000 27280362873 1509196224 1510559097
+81840000000 81844088793 27280000000 27281362931 1510196224 1511559155
+81843000000 81847088912 27281000000 27282362970 1511196224 1512559194
+81846000000 81850089036 27282000000 27283363012 1512196224 1513559236
+81849000000 81853089255 27283000000 27284363085 1513196224 1514559309
+81852000000 81856089391 27284000000 27285363130 1514196224 1515559354
+81855000000 81859089542 27285000000 27286363180 1515196224 1516559404
+81858000000 81862089702 27286000000 27287363234 1516196224 1517559458
+81861000000 81865089823 27287000000 27288363274 1517196224 1518559498
+81864000000 81868089904 27288000000 27289363301 1518196224 1519559525
+81867000000 81871090112 27289000000 27290363370 1519196224 1520559594
+81870000000 81874090267 27290000000 27291363422 1520196224 1521559646
+81873000000 81877090426 27291000000 27292363475 1521196224 1522559699
+81876000000 81880090578 27292000000 27293363526 1522196224 1523559750
+81879000000 81883090700 27293000000 27294363566 1523196224 1524559790
+81882000000 81886090878 27294000000 27295363626 1524196224 1525559850
+81885000000 81889091027 27295000000 27296363675 1525196224 1526559899
+81888000000 81892091155 27296000000 27297363718 1526196224 1527559942
+81891000000 81895091324 27297000000 27298363774 1527196224 1528559998
+81894000000 81898091444 27298000000 27299363814 1528196224 1529560038
+81897000000 81901091371 27299000000 27300363790 1529196224 1530560014
+81900000000 81904091694 27300000000 27301363898 1530196224 1531560122
+81903000000 81907091947 27301000000 27302363982 1531196224 1532560206
+81906000000 81910092057 27302000000 27303364019 1532196224 1533560243
+81909000000 81913092236 27303000000 27304364078 1533196224 1534560302
+81912000000 81916092284 27304000000 27305364094 1534196224 1535560318
+81915000000 81919092538 27305000000 27306364179 1535196224 1536560403
+81918000000 81922092657 27306000000 27307364219 1536196224 1537560443
+81921000000 81925092828 27307000000 27308364276 1537196224 1538560500
+81924000000 81928092975 27308000000 27309364325 1538196224 1539560549
+81927000000 81931093128 27309000000 27310364376 1539196224 1540560600
+81930000000 81934093274 27310000000 27311364424 1540196224 1541560648
+81933000000 81937093418 27311000000 27312364472 1541196224 1542560696
+81936000000 81940093581 27312000000 27313364527 1542196224 1543560751
+81939000000 81943093733 27313000000 27314364577 1543196224 1544560801
+81942000000 81946093887 27314000000 27315364629 1544196224 1545560853
+81945000000 81949094007 27315000000 27316364669 1545196224 1546560893
+81948000000 81952094216 27316000000 27317364738 1546196224 1547560962
+81951000000 81955094346 27317000000 27318364782 1547196224 1548561006
+81954000000 81958094460 27318000000 27319364820 1548196224 1549561044
+81957000000 81961094621 27319000000 27320364873 1549196224 1550561097
+81960000000 81964094756 27320000000 27321364918 1550196224 1551561142
+81963000000 81967094899 27321000000 27322364966 1551196224 1552561190
+81966000000 81970094999 27322000000 27323364999 1552196224 1553561223
+81969000000 81973095233 27323000000 27324365077 1553196224 1554561301
+81972000000 81976095306 27324000000 27325365102 1554196224 1555561326
+81975000000 81979095427 27325000000 27326365142 1555196224 1556561366
+81978000000 81982095616 27326000000 27327365205 1556196224 1557561429
+81981000000 81985095770 27327000000 27328365256 1557196224 1558561480
+81984000000 81988095949 27328000000 27329365316 1558196224 1559561540
+81987000000 81991096095 27329000000 27330365365 1559196224 1560561589
+81990000000 81994096222 27330000000 27331365407 1560196224 1561561631
+81993000000 81997096396 27331000000 27332365465 1561196224 1562561689
+81996000000 82000096460 27332000000 27333365486 1562196224 1563561710
+81999000000 82003096667 27333000000 27334365555 1563196224 1564561779
+82002000000 82006096848 27334000000 27335365616 1564196224 1565561840
+82005000000 82009096997 27335000000 27336365665 1565196224 1566561889
+82008000000 82012097054 27336000000 27337365684 1566196224 1567561908
+82011000000 82015097250 27337000000 27338365750 1567196224 1568561974
+82014000000 82018097440 27338000000 27339365813 1568196224 1569562037
+82017000000 82021097585 27339000000 27340365861 1569196224 1570562085
+82020000000 82024097757 27340000000 27341365919 1570196224 1571562143
+82023000000 82027097890 27341000000 27342365963 1571196224 1572562187
+82026000000 82030097961 27342000000 27343365987 1572196224 1573562211
+82029000000 82033098187 27343000000 27344366062 1573196224 1574562286
+82032000000 82036098347 27344000000 27345366115 1574196224 1575562339
+82035000000 82039098479 27345000000 27346366159 1575196224 1576562383
+82038000000 82042098587 27346000000 27347366195 1576196224 1577562419
+82041000000 82045098798 27347000000 27348366266 1577196224 1578562490
+82044000000 82048098964 27348000000 27349366321 1578196224 1579562545
+82047000000 82051099075 27349000000 27350366358 1579196224 1580562582
+82050000000 82054099235 27350000000 27351366411 1580196224 1581562635
+82053000000 82057099347 27351000000 27352366449 1581196224 1582562673
+82056000000 82060099545 27352000000 27353366515 1582196224 1583562739
+82059000000 82063099635 27353000000 27354366545 1583196224 1584562769
+82062000000 82066099860 27354000000 27355366620 1584196224 1585562844
+82065000000 82069099992 27355000000 27356366664 1585196224 1586562888
+82068000000 82072100131 27356000000 27357366710 1586196224 1587562934
+82071000000 82075100182 27357000000 27358366727 1587196224 1588562951
+82074000000 82078100393 27358000000 27359366797 1588196224 1589563021
+82077000000 82081100602 27359000000 27360366867 1589196224 1590563091
+82080000000 82084100730 27360000000 27361366910 1590196224 1591563134
+82083000000 82087100873 27361000000 27362366957 1591196224 1592563181
+82086000000 82090101044 27362000000 27363367014 1592196224 1593563238
+82089000000 82093101141 27363000000 27364367047 1593196224 1594563271
+82092000000 82096101354 27364000000 27365367118 1594196224 1595563342
+82095000000 82099101484 27365000000 27366367161 1595196224 1596563385
+82098000000 82102101634 27366000000 27367367211 1596196224 1597563435
+82101000000 82105101794 27367000000 27368367264 1597196224 1598563488
+82104000000 82108101890 27368000000 27369367296 1598196224 1599563520
+82107000000 82111102078 27369000000 27370367359 1599196224 1600563583
+82110000000 82114102246 27370000000 27371367415 1600196224 1601563639
+82113000000 82117102382 27371000000 27372367460 1601196224 1602563684
+82116000000 82120102557 27372000000 27373367519 1602196224 1603563743
+82119000000 82123102679 27373000000 27374367559 1603196224 1604563783
+82122000000 82126102829 27374000000 27375367609 1604196224 1605563833
+82125000000 82129102977 27375000000 27376367659 1605196224 1606563883
+82128000000 82132103183 27376000000 27377367727 1606196224 1607563951
+82131000000 82135103297 27377000000 27378367765 1607196224 1608563989
+82134000000 82138103429 27378000000 27379367809 1608196224 1609564033
+82137000000 82141103603 27379000000 27380367867 1609196224 1610564091
+82140000000 82144103722 27380000000 27381367907 1610196224 1611564131
+82143000000 82147103846 27381000000 27382367948 1611196224 1612564172
+82146000000 82150104065 27382000000 27383368021 1612196224 1613564245
+82149000000 82153104201 27383000000 27384368067 1613196224 1614564291
+82152000000 82156104352 27384000000 27385368117 1614196224 1615564341
+82155000000 82159104512 27385000000 27386368170 1615196224 1616564394
+82158000000 82162104633 27386000000 27387368211 1616196224 1617564435
+82161000000 82165104714 27387000000 27388368238 1617196224 1618564462
+82164000000 82168104922 27388000000 27389368307 1618196224 1619564531
+82167000000 82171105077 27389000000 27390368359 1619196224 1620564583
+82170000000 82174105236 27390000000 27391368412 1620196224 1621564636
+82173000000 82177105388 27391000000 27392368462 1621196224 1622564686
+82176000000 82180105510 27392000000 27393368503 1622196224 1623564727
+82179000000 82183105688 27393000000 27394368562 1623196224 1624564786
+82182000000 82186105837 27394000000 27395368612 1624196224 1625564836
+82185000000 82189105965 27395000000 27396368655 1625196224 1626564879
+82188000000 82192106134 27396000000 27397368711 1626196224 1627564935
+82191000000 82195106254 27397000000 27398368751 1627196224 1628564975
+82194000000 82198106181 27398000000 27399368727 1628196224 1629564951
+82197000000 82201106504 27399000000 27400368834 1629196224 1630565058
+82200000000 82204106757 27400000000 27401368919 1630196224 1631565143
+82203000000 82207106867 27401000000 27402368955 1631196224 1632565179
+82206000000 82210107046 27402000000 27403369015 1632196224 1633565239
+82209000000 82213107094 27403000000 27404369031 1633196224 1634565255
+82212000000 82216107348 27404000000 27405369116 1634196224 1635565340
+82215000000 82219107467 27405000000 27406369155 1635196224 1636565379
+82218000000 82222107638 27406000000 27407369212 1636196224 1637565436
+82221000000 82225107785 27407000000 27408369261 1637196224 1638565485
+82224000000 82228107938 27408000000 27409369312 1638196224 1639565536
+82227000000 82231108084 27409000000 27410369361 1639196224 1640565585
+82230000000 82234108228 27410000000 27411369409 1640196224 1641565633
+82233000000 82237108391 27411000000 27412369463 1641196224 1642565687
+82236000000 82240108543 27412000000 27413369514 1642196224 1643565738
+82239000000 82243108697 27413000000 27414369565 1643196224 1644565789
+82242000000 82246108817 27414000000 27415369605 1644196224 1645565829
+82245000000 82249109026 27415000000 27416369675 1645196224 1646565899
+82248000000 82252109156 27416000000 27417369718 1646196224 1647565942
+82251000000 82255109270 27417000000 27418369756 1647196224 1648565980
+82254000000 82258109431 27418000000 27419369810 1648196224 1649566034
+82257000000 82261109566 27419000000 27420369855 1649196224 1650566079
+82260000000 82264109709 27420000000 27421369903 1650196224 1651566127
+82263000000 82267109809 27421000000 27422369936 1651196224 1652566160
+82266000000 82270110043 27422000000 27423370014 1652196224 1653566238
+82269000000 82273110116 27423000000 27424370038 1653196224 1654566262
+82272000000 82276110237 27424000000 27425370079 1654196224 1655566303
+82275000000 82279110426 27425000000 27426370142 1655196224 1656566366
+82278000000 82282110580 27426000000 27427370193 1656196224 1657566417
+82281000000 82285110759 27427000000 27428370253 1657196224 1658566477
+82284000000 82288110905 27428000000 27429370301 1658196224 1659566525
+82287000000 82291111032 27429000000 27430370344 1659196224 1660566568
+82290000000 82294111206 27430000000 27431370402 1660196224 1661566626
+82293000000 82297111270 27431000000 27432370423 1661196224 1662566647
+82296000000 82300111477 27432000000 27433370492 1662196224 1663566716
+82299000000 82303111658 27433000000 27434370552 1663196224 1664566776
+82302000000 82306111807 27434000000 27435370602 1664196224 1665566826
+82305000000 82309111864 27435000000 27436370621 1665196224 1666566845
+82308000000 82312112060 27436000000 27437370686 1666196224 1667566910
+82311000000 82315112250 27437000000 27438370750 1667196224 1668566974
+82314000000 82318112395 27438000000 27439370798 1668196224 1669567022
+82317000000 82321112567 27439000000 27440370855 1669196224 1670567079
+82320000000 82324112700 27440000000 27441370900 1670196224 1671567124
+82323000000 82327112771 27441000000 27442370923 1671196224 1672567147
+82326000000 82330112997 27442000000 27443370999 1672196224 1673567223
+82329000000 82333113157 27443000000 27444371052 1673196224 1674567276
+82332000000 82336113289 27444000000 27445371096 1674196224 1675567320
+82335000000 82339113397 27445000000 27446371132 1675196224 1676567356
+82338000000 82342113608 27446000000 27447371202 1676196224 1677567426
+82341000000 82345113774 27447000000 27448371258 1677196224 1678567482
+82344000000 82348113885 27448000000 27449371295 1678196224 1679567519
+82347000000 82351114045 27449000000 27450371348 1679196224 1680567572
+82350000000 82354114157 27450000000 27451371385 1680196224 1681567609
+82353000000 82357114355 27451000000 27452371451 1681196224 1682567675
+82356000000 82360114445 27452000000 27453371481 1682196224 1683567705
+82359000000 82363114670 27453000000 27454371556 1683196224 1684567780
+82362000000 82366114802 27454000000 27455371600 1684196224 1685567824
+82365000000 82369114941 27455000000 27456371647 1685196224 1686567871
+82368000000 82372114992 27456000000 27457371664 1686196224 1687567888
+82371000000 82375115203 27457000000 27458371734 1687196224 1688567958
+82374000000 82378115412 27458000000 27459371804 1688196224 1689568028
+82377000000 82381115540 27459000000 27460371846 1689196224 1690568070
+82380000000 82384115683 27460000000 27461371894 1690196224 1691568118
+82383000000 82387115854 27461000000 27462371951 1691196224 1692568175
+82386000000 82390115951 27462000000 27463371983 1692196224 1693568207
+82389000000 82393116164 27463000000 27464372054 1693196224 1694568278
+82392000000 82396116294 27464000000 27465372098 1694196224 1695568322
+82395000000 82399116444 27465000000 27466372148 1695196224 1696568372
+82398000000 82402116604 27466000000 27467372201 1696196224 1697568425
+82401000000 82405116700 27467000000 27468372233 1697196224 1698568457
+82404000000 82408116888 27468000000 27469372296 1698196224 1699568520
+82407000000 82411117056 27469000000 27470372352 1699196224 1700568576
+82410000000 82414117192 27470000000 27471372397 1700196224 1701568621
+82413000000 82417117367 27471000000 27472372455 1701196224 1702568679
+82416000000 82420117489 27472000000 27473372496 1702196224 1703568720
+82419000000 82423117639 27473000000 27474372546 1703196224 1704568770
+82422000000 82426117787 27474000000 27475372595 1704196224 1705568819
+82425000000 82429117993 27475000000 27476372664 1705196224 1706568888
+82428000000 82432118107 27476000000 27477372702 1706196224 1707568926
+82431000000 82435118239 27477000000 27478372746 1707196224 1708568970
+82434000000 82438118413 27478000000 27479372804 1708196224 1709569028
+82437000000 82441118532 27479000000 27480372844 1709196224 1710569068
+82440000000 82444118656 27480000000 27481372885 1710196224 1711569109
+82443000000 82447118875 27481000000 27482372958 1711196224 1712569182
+82446000000 82450119011 27482000000 27483373003 1712196224 1713569227
+82449000000 82453119162 27483000000 27484373054 1713196224 1714569278
+82452000000 82456119322 27484000000 27485373107 1714196224 1715569331
+82455000000 82459119443 27485000000 27486373147 1715196224 1716569371
+82458000000 82462119524 27486000000 27487373174 1716196224 1717569398
+82461000000 82465119732 27487000000 27488373244 1717196224 1718569468
+82464000000 82468119887 27488000000 27489373295 1718196224 1719569519
+82467000000 82471120046 27489000000 27490373348 1719196224 1720569572
+82470000000 82474120198 27490000000 27491373399 1720196224 1721569623
+82473000000 82477120320 27491000000 27492373440 1721196224 1722569664
+82476000000 82480120498 27492000000 27493373499 1722196224 1723569723
+82479000000 82483120647 27493000000 27494373549 1723196224 1724569773
+82482000000 82486120775 27494000000 27495373591 1724196224 1725569815
+82485000000 82489120944 27495000000 27496373648 1725196224 1726569872
+82488000000 82492121064 27496000000 27497373688 1726196224 1727569912
+82491000000 82495120991 27497000000 27498373663 1727196224 1728569887
+82494000000 82498121314 27498000000 27499373771 1728196224 1729569995
+82497000000 82501121567 27499000000 27500373855 1729196224 1730570079
+82500000000 82504121677 27500000000 27501373892 1730196224 1731570116
+82503000000 82507121856 27501000000 27502373952 1731196224 1732570176
+82506000000 82510121904 27502000000 27503373968 1732196224 1733570192
+82509000000 82513122158 27503000000 27504374052 1733196224 1734570276
+82512000000 82516122277 27504000000 27505374092 1734196224 1735570316
+82515000000 82519122448 27505000000 27506374149 1735196224 1736570373
+82518000000 82522122595 27506000000 27507374198 1736196224 1737570422
+82521000000 82525122748 27507000000 27508374249 1737196224 1738570473
+82524000000 82528122894 27508000000 27509374298 1738196224 1739570522
+82527000000 82531123038 27509000000 27510374346 1739196224 1740570570
+82530000000 82534123201 27510000000 27511374400 1740196224 1741570624
+82533000000 82537123353 27511000000 27512374451 1741196224 1742570675
+82536000000 82540123507 27512000000 27513374502 1742196224 1743570726
+82539000000 82543123627 27513000000 27514374542 1743196224 1744570766
+82542000000 82546123836 27514000000 27515374612 1744196224 1745570836
+82545000000 82549123966 27515000000 27516374655 1745196224 1746570879
+82548000000 82552124080 27516000000 27517374693 1746196224 1747570917
+82551000000 82555124241 27517000000 27518374747 1747196224 1748570971
+82554000000 82558124376 27518000000 27519374792 1748196224 1749571016
+82557000000 82561124519 27519000000 27520374839 1749196224 1750571063
+82560000000 82564124619 27520000000 27521374873 1750196224 1751571097
+82563000000 82567124853 27521000000 27522374951 1751196224 1752571175
+82566000000 82570124926 27522000000 27523374975 1752196224 1753571199
+82569000000 82573125047 27523000000 27524375015 1753196224 1754571239
+82572000000 82576125236 27524000000 27525375078 1754196224 1755571302
+82575000000 82579125390 27525000000 27526375130 1755196224 1756571354
+82578000000 82582125569 27526000000 27527375189 1756196224 1757571413
+82581000000 82585125715 27527000000 27528375238 1757196224 1758571462
+82584000000 82588125842 27528000000 27529375280 1758196224 1759571504
+82587000000 82591126016 27529000000 27530375338 1759196224 1760571562
+82590000000 82594126080 27530000000 27531375360 1760196224 1761571584
+82593000000 82597126287 27531000000 27532375429 1761196224 1762571653
+82596000000 82600126468 27532000000 27533375489 1762196224 1763571713
+82599000000 82603126617 27533000000 27534375539 1763196224 1764571763
+82602000000 82606126674 27534000000 27535375558 1764196224 1765571782
+82605000000 82609126870 27535000000 27536375623 1765196224 1766571847
+82608000000 82612127060 27536000000 27537375686 1766196224 1767571910
+82611000000 82615127205 27537000000 27538375735 1767196224 1768571959
+82614000000 82618127377 27538000000 27539375792 1768196224 1769572016
+82617000000 82621127510 27539000000 27540375836 1769196224 1770572060
+82620000000 82624127581 27540000000 27541375860 1770196224 1771572084
+82623000000 82627127807 27541000000 27542375935 1771196224 1772572159
+82626000000 82630127967 27542000000 27543375989 1772196224 1773572213
+82629000000 82633128099 27543000000 27544376033 1773196224 1774572257
+82632000000 82636128207 27544000000 27545376069 1774196224 1775572293
+82635000000 82639128418 27545000000 27546376139 1775196224 1776572363
+82638000000 82642128584 27546000000 27547376194 1776196224 1777572418
+82641000000 82645128695 27547000000 27548376231 1777196224 1778572455
+82644000000 82648128855 27548000000 27549376285 1778196224 1779572509
+82647000000 82651128967 27549000000 27550376322 1779196224 1780572546
+82650000000 82654129165 27550000000 27551376388 1780196224 1781572612
+82653000000 82657129255 27551000000 27552376418 1781196224 1782572642
+82656000000 82660129480 27552000000 27553376493 1782196224 1783572717
+82659000000 82663129612 27553000000 27554376537 1783196224 1784572761
+82662000000 82666129751 27554000000 27555376583 1784196224 1785572807
+82665000000 82669129802 27555000000 27556376600 1785196224 1786572824
+82668000000 82672130013 27556000000 27557376671 1786196224 1787572895
+82671000000 82675130222 27557000000 27558376740 1787196224 1788572964
+82674000000 82678130350 27558000000 27559376783 1788196224 1789573007
+82677000000 82681130493 27559000000 27560376831 1789196224 1790573055
+82680000000 82684130664 27560000000 27561376888 1790196224 1791573112
+82683000000 82687130761 27561000000 27562376920 1791196224 1792573144
+82686000000 82690130974 27562000000 27563376991 1792196224 1793573215
+82689000000 82693131104 27563000000 27564377034 1793196224 1794573258
+82692000000 82696131254 27564000000 27565377084 1794196224 1795573308
+82695000000 82699131414 27565000000 27566377138 1795196224 1796573362
+82698000000 82702131510 27566000000 27567377170 1796196224 1797573394
+82701000000 82705131698 27567000000 27568377232 1797196224 1798573456
+82704000000 82708131866 27568000000 27569377288 1798196224 1799573512
+82707000000 82711132002 27569000000 27570377334 1799196224 1800573558
+82710000000 82714132177 27570000000 27571377392 1800196224 1801573616
+82713000000 82717132299 27571000000 27572377433 1801196224 1802573657
+82716000000 82720132449 27572000000 27573377483 1802196224 1803573707
+82719000000 82723132597 27573000000 27574377532 1803196224 1804573756
+82722000000 82726132803 27574000000 27575377601 1804196224 1805573825
+82725000000 82729132917 27575000000 27576377639 1805196224 1806573863
+82728000000 82732133049 27576000000 27577377683 1806196224 1807573907
+82731000000 82735133223 27577000000 27578377741 1807196224 1808573965
+82734000000 82738133342 27578000000 27579377780 1808196224 1809574004
+82737000000 82741133466 27579000000 27580377822 1809196224 1810574046
+82740000000 82744133685 27580000000 27581377895 1810196224 1811574119
+82743000000 82747133821 27581000000 27582377940 1811196224 1812574164
+82746000000 82750133972 27582000000 27583377990 1812196224 1813574214
+82749000000 82753134132 27583000000 27584378044 1813196224 1814574268
+82752000000 82756134253 27584000000 27585378084 1814196224 1815574308
+82755000000 82759134334 27585000000 27586378111 1815196224 1816574335
+82758000000 82762134542 27586000000 27587378180 1816196224 1817574404
+82761000000 82765134697 27587000000 27588378232 1817196224 1818574456
+82764000000 82768134856 27588000000 27589378285 1818196224 1819574509
+82767000000 82771135008 27589000000 27590378336 1819196224 1820574560
+82770000000 82774135130 27590000000 27591378376 1820196224 1821574600
+82773000000 82777135308 27591000000 27592378436 1821196224 1822574660
+82776000000 82780135457 27592000000 27593378485 1822196224 1823574709
+82779000000 82783135585 27593000000 27594378528 1823196224 1824574752
+82782000000 82786135754 27594000000 27595378584 1824196224 1825574808
+82785000000 82789135874 27595000000 27596378624 1825196224 1826574848
+82788000000 82792135801 27596000000 27597378600 1826196224 1827574824
+82791000000 82795136124 27597000000 27598378708 1827196224 1828574932
+82794000000 82798136377 27598000000 27599378792 1828196224 1829575016
+82797000000 82801136487 27599000000 27600378829 1829196224 1830575053
+82800000000 82804136666 27600000000 27601378888 1830196224 1831575112
+82803000000 82807136714 27601000000 27602378904 1831196224 1832575128
+82806000000 82810136968 27602000000 27603378989 1832196224 1833575213
+82809000000 82813137087 27603000000 27604379029 1833196224 1834575253
+82812000000 82816137258 27604000000 27605379086 1834196224 1835575310
+82815000000 82819137405 27605000000 27606379135 1835196224 1836575359
+82818000000 82822137558 27606000000 27607379186 1836196224 1837575410
+82821000000 82825137704 27607000000 27608379234 1837196224 1838575458
+82824000000 82828137848 27608000000 27609379282 1838196224 1839575506
+82827000000 82831138011 27609000000 27610379337 1839196224 1840575561
+82830000000 82834138163 27610000000 27611379387 1840196224 1841575611
+82833000000 82837138317 27611000000 27612379439 1841196224 1842575663
+82836000000 82840138437 27612000000 27613379479 1842196224 1843575703
+82839000000 82843138646 27613000000 27614379548 1843196224 1844575772
+82842000000 82846138776 27614000000 27615379592 1844196224 1845575816
+82845000000 82849138890 27615000000 27616379630 1845196224 1846575854
+82848000000 82852139051 27616000000 27617379683 1846196224 1847575907
+82851000000 82855139186 27617000000 27618379728 1847196224 1848575952
+82854000000 82858139329 27618000000 27619379776 1848196224 1849576000
+82857000000 82861139429 27619000000 27620379809 1849196224 1850576033
+82860000000 82864139663 27620000000 27621379887 1850196224 1851576111
+82863000000 82867139736 27621000000 27622379912 1851196224 1852576136
+82866000000 82870139857 27622000000 27623379952 1852196224 1853576176
+82869000000 82873140046 27623000000 27624380015 1853196224 1854576239
+82872000000 82876140200 27624000000 27625380066 1854196224 1855576290
+82875000000 82879140379 27625000000 27626380126 1855196224 1856576350
+82878000000 82882140525 27626000000 27627380175 1856196224 1857576399
+82881000000 82885140652 27627000000 27628380217 1857196224 1858576441
+82884000000 82888140826 27628000000 27629380275 1858196224 1859576499
+82887000000 82891140890 27629000000 27630380296 1859196224 1860576520
+82890000000 82894141097 27630000000 27631380365 1860196224 1861576589
+82893000000 82897141278 27631000000 27632380426 1861196224 1862576650
+82896000000 82900141427 27632000000 27633380475 1862196224 1863576699
+82899000000 82903141484 27633000000 27634380494 1863196224 1864576718
+82902000000 82906141680 27634000000 27635380560 1864196224 1865576784
+82905000000 82909141870 27635000000 27636380623 1865196224 1866576847
+82908000000 82912142015 27636000000 27637380671 1866196224 1867576895
+82911000000 82915142187 27637000000 27638380729 1867196224 1868576953
+82914000000 82918142320 27638000000 27639380773 1868196224 1869576997
+82917000000 82921142391 27639000000 27640380797 1869196224 1870577021
+82920000000 82924142617 27640000000 27641380872 1870196224 1871577096
+82923000000 82927142777 27641000000 27642380925 1871196224 1872577149
+82926000000 82930142909 27642000000 27643380969 1872196224 1873577193
+82929000000 82933143017 27643000000 27644381005 1873196224 1874577229
+82932000000 82936143228 27644000000 27645381076 1874196224 1875577300
+82935000000 82939143394 27645000000 27646381131 1875196224 1876577355
+82938000000 82942143505 27646000000 27647381168 1876196224 1877577392
+82941000000 82945143665 27647000000 27648381221 1877196224 1878577445
+82944000000 82948143777 27648000000 27649381259 1878196224 1879577483
+82947000000 82951143975 27649000000 27650381325 1879196224 1880577549
+82950000000 82954144065 27650000000 27651381355 1880196224 1881577579
+82953000000 82957144290 27651000000 27652381430 1881196224 1882577654
+82956000000 82960144422 27652000000 27653381474 1882196224 1883577698
+82959000000 82963144561 27653000000 27654381520 1883196224 1884577744
+82962000000 82966144612 27654000000 27655381537 1884196224 1885577761
+82965000000 82969144823 27655000000 27656381607 1885196224 1886577831
+82968000000 82972145032 27656000000 27657381677 1886196224 1887577901
+82971000000 82975145160 27657000000 27658381720 1887196224 1888577944
+82974000000 82978145303 27658000000 27659381767 1888196224 1889577991
+82977000000 82981145474 27659000000 27660381824 1889196224 1890578048
+82980000000 82984145571 27660000000 27661381857 1890196224 1891578081
+82983000000 82987145784 27661000000 27662381928 1891196224 1892578152
+82986000000 82990145914 27662000000 27663381971 1892196224 1893578195
+82989000000 82993146064 27663000000 27664382021 1893196224 1894578245
+82992000000 82996146224 27664000000 27665382074 1894196224 1895578298
+82995000000 82999146320 27665000000 27666382106 1895196224 1896578330
+82998000000 83002146508 27666000000 27667382169 1896196224 1897578393
+83001000000 83005146676 27667000000 27668382225 1897196224 1898578449
+83004000000 83008146812 27668000000 27669382270 1898196224 1899578494
+83007000000 83011146987 27669000000 27670382329 1899196224 1900578553
+83010000000 83014147109 27670000000 27671382369 1900196224 1901578593
+83013000000 83017147259 27671000000 27672382419 1901196224 1902578643
+83016000000 83020147407 27672000000 27673382469 1902196224 1903578693
+83019000000 83023147613 27673000000 27674382537 1903196224 1904578761
+83022000000 83026147727 27674000000 27675382575 1904196224 1905578799
+83025000000 83029147859 27675000000 27676382619 1905196224 1906578843
+83028000000 83032148033 27676000000 27677382677 1906196224 1907578901
+83031000000 83035148152 27677000000 27678382717 1907196224 1908578941
+83034000000 83038148276 27678000000 27679382758 1908196224 1909578982
+83037000000 83041148495 27679000000 27680382831 1909196224 1910579055
+83040000000 83044148631 27680000000 27681382877 1910196224 1911579101
+83043000000 83047148782 27681000000 27682382927 1911196224 1912579151
+83046000000 83050148942 27682000000 27683382980 1912196224 1913579204
+83049000000 83053149063 27683000000 27684383021 1913196224 1914579245
+83052000000 83056149144 27684000000 27685383048 1914196224 1915579272
+83055000000 83059149352 27685000000 27686383117 1915196224 1916579341
+83058000000 83062149507 27686000000 27687383169 1916196224 1917579393
+83061000000 83065149666 27687000000 27688383222 1917196224 1918579446
+83064000000 83068149818 27688000000 27689383272 1918196224 1919579496
+83067000000 83071149940 27689000000 27690383313 1919196224 1920579537
+83070000000 83074150118 27690000000 27691383372 1920196224 1921579596
+83073000000 83077150267 27691000000 27692383422 1921196224 1922579646
+83076000000 83080150395 27692000000 27693383465 1922196224 1923579689
+83079000000 83083150564 27693000000 27694383521 1923196224 1924579745
+83082000000 83086150684 27694000000 27695383561 1924196224 1925579785
+83085000000 83089150611 27695000000 27696383537 1925196224 1926579761
+83088000000 83092150934 27696000000 27697383644 1926196224 1927579868
+83091000000 83095151187 27697000000 27698383729 1927196224 1928579953
+83094000000 83098151297 27698000000 27699383765 1928196224 1929579989
+83097000000 83101151476 27699000000 27700383825 1929196224 1930580049
+83100000000 83104151524 27700000000 27701383841 1930196224 1931580065
+83103000000 83107151778 27701000000 27702383926 1931196224 1932580150
+83106000000 83110151897 27702000000 27703383965 1932196224 1933580189
+83109000000 83113152068 27703000000 27704384022 1933196224 1934580246
+83112000000 83116152215 27704000000 27705384071 1934196224 1935580295
+83115000000 83119152368 27705000000 27706384122 1935196224 1936580346
+83118000000 83122152514 27706000000 27707384171 1936196224 1937580395
+83121000000 83125152658 27707000000 27708384219 1937196224 1938580443
+83124000000 83128152821 27708000000 27709384273 1938196224 1939580497
+83127000000 83131152973 27709000000 27710384324 1939196224 1940580548
+83130000000 83134153127 27710000000 27711384375 1940196224 1941580599
+83133000000 83137153247 27711000000 27712384415 1941196224 1942580639
+83136000000 83140153456 27712000000 27713384485 1942196224 1943580709
+83139000000 83143153586 27713000000 27714384528 1943196224 1944580752
+83142000000 83146153700 27714000000 27715384566 1944196224 1945580790
+83145000000 83149153861 27715000000 27716384620 1945196224 1946580844
+83148000000 83152153996 27716000000 27717384665 1946196224 1947580889
+83151000000 83155154139 27717000000 27718384713 1947196224 1948580937
+83154000000 83158154239 27718000000 27719384746 1948196224 1949580970
+83157000000 83161154473 27719000000 27720384824 1949196224 1950581048
+83160000000 83164154546 27720000000 27721384848 1950196224 1951581072
+83163000000 83167154667 27721000000 27722384889 1951196224 1952581113
+83166000000 83170154856 27722000000 27723384952 1952196224 1953581176
+83169000000 83173155010 27723000000 27724385003 1953196224 1954581227
+83172000000 83176155189 27724000000 27725385063 1954196224 1955581287
+83175000000 83179155335 27725000000 27726385111 1955196224 1956581335
+83178000000 83182155462 27726000000 27727385154 1956196224 1957581378
+83181000000 83185155636 27727000000 27728385212 1957196224 1958581436
+83184000000 83188155700 27728000000 27729385233 1958196224 1959581457
+83187000000 83191155907 27729000000 27730385302 1959196224 1960581526
+83190000000 83194156088 27730000000 27731385362 1960196224 1961581586
+83193000000 83197156237 27731000000 27732385412 1961196224 1962581636
+83196000000 83200156294 27732000000 27733385431 1962196224 1963581655
+83199000000 83203156490 27733000000 27734385496 1963196224 1964581720
+83202000000 83206156680 27734000000 27735385560 1964196224 1965581784
+83205000000 83209156825 27735000000 27736385608 1965196224 1966581832
+83208000000 83212156997 27736000000 27737385665 1966196224 1967581889
+83211000000 83215157130 27737000000 27738385710 1967196224 1968581934
+83214000000 83218157201 27738000000 27739385733 1968196224 1969581957
+83217000000 83221157427 27739000000 27740385809 1969196224 1970582033
+83220000000 83224157587 27740000000 27741385862 1970196224 1971582086
+83223000000 83227157719 27741000000 27742385906 1971196224 1972582130
+83226000000 83230157827 27742000000 27743385942 1972196224 1973582166
+83229000000 83233158038 27743000000 27744386012 1973196224 1974582236
+83232000000 83236158204 27744000000 27745386068 1974196224 1975582292
+83235000000 83239158315 27745000000 27746386105 1975196224 1976582329
+83238000000 83242158475 27746000000 27747386158 1976196224 1977582382
+83241000000 83245158587 27747000000 27748386195 1977196224 1978582419
+83244000000 83248158785 27748000000 27749386261 1978196224 1979582485
+83247000000 83251158875 27749000000 27750386291 1979196224 1980582515
+83250000000 83254159100 27750000000 27751386366 1980196224 1981582590
+83253000000 83257159232 27751000000 27752386410 1981196224 1982582634
+83256000000 83260159371 27752000000 27753386457 1982196224 1983582681
+83259000000 83263159422 27753000000 27754386474 1983196224 1984582698
+83262000000 83266159633 27754000000 27755386544 1984196224 1985582768
+83265000000 83269159842 27755000000 27756386614 1985196224 1986582838
+83268000000 83272159970 27756000000 27757386656 1986196224 1987582880
+83271000000 83275160113 27757000000 27758386704 1987196224 1988582928
+83274000000 83278160284 27758000000 27759386761 1988196224 1989582985
+83277000000 83281160381 27759000000 27760386793 1989196224 1990583017
+83280000000 83284160594 27760000000 27761386864 1990196224 1991583088
+83283000000 83287160724 27761000000 27762386908 1991196224 1992583132
+83286000000 83290160874 27762000000 27763386958 1992196224 1993583182
+83289000000 83293161034 27763000000 27764387011 1993196224 1994583235
+83292000000 83296161130 27764000000 27765387043 1994196224 1995583267
+83295000000 83299161318 27765000000 27766387106 1995196224 1996583330
+83298000000 83302161486 27766000000 27767387162 1996196224 1997583386
+83301000000 83305161622 27767000000 27768387207 1997196224 1998583431
+83304000000 83308161797 27768000000 27769387265 1998196224 1999583489
+83307000000 83311161919 27769000000 27770387306 1999196224 2000583530
+83310000000 83314162069 27770000000 27771387356 2000196224 2001583580
+83313000000 83317162217 27771000000 27772387405 2001196224 2002583629
+83316000000 83320162423 27772000000 27773387474 2002196224 2003583698
+83319000000 83323162537 27773000000 27774387512 2003196224 2004583736
+83322000000 83326162669 27774000000 27775387556 2004196224 2005583780
+83325000000 83329162843 27775000000 27776387614 2005196224 2006583838
+83328000000 83332162962 27776000000 27777387654 2006196224 2007583878
+83331000000 83335163086 27777000000 27778387695 2007196224 2008583919
+83334000000 83338163305 27778000000 27779387768 2008196224 2009583992
+83337000000 83341163441 27779000000 27780387813 2009196224 2010584037
+83340000000 83344163592 27780000000 27781387864 2010196224 2011584088
+83343000000 83347163752 27781000000 27782387917 2011196224 2012584141
+83346000000 83350163873 27782000000 27783387957 2012196224 2013584181
+83349000000 83353163954 27783000000 27784387984 2013196224 2014584208
+83352000000 83356164162 27784000000 27785388054 2014196224 2015584278
+83355000000 83359164317 27785000000 27786388105 2015196224 2016584329
+83358000000 83362164476 27786000000 27787388158 2016196224 2017584382
+83361000000 83365164628 27787000000 27788388209 2017196224 2018584433
+83364000000 83368164750 27788000000 27789388250 2018196224 2019584474
+83367000000 83371164928 27789000000 27790388309 2019196224 2020584533
+83370000000 83374165077 27790000000 27791388359 2020196224 2021584583
+83373000000 83377165205 27791000000 27792388401 2021196224 2022584625
+83376000000 83380165374 27792000000 27793388458 2022196224 2023584682
+83379000000 83383165494 27793000000 27794388498 2023196224 2024584722
+83382000000 83386165421 27794000000 27795388473 2024196224 2025584697
+83385000000 83389165744 27795000000 27796388581 2025196224 2026584805
+83388000000 83392165997 27796000000 27797388665 2026196224 2027584889
+83391000000 83395166107 27797000000 27798388702 2027196224 2028584926
+83394000000 83398166286 27798000000 27799388762 2028196224 2029584986
+83397000000 83401166334 27799000000 27800388778 2029196224 2030585002
+83400000000 83404166588 27800000000 27801388862 2030196224 2031585086
+83403000000 83407166707 27801000000 27802388902 2031196224 2032585126
+83406000000 83410166878 27802000000 27803388959 2032196224 2033585183
+83409000000 83413167025 27803000000 27804389008 2033196224 2034585232
+83412000000 83416167178 27804000000 27805389059 2034196224 2035585283
+83415000000 83419167324 27805000000 27806389108 2035196224 2036585332
+83418000000 83422167468 27806000000 27807389156 2036196224 2037585380
+83421000000 83425167631 27807000000 27808389210 2037196224 2038585434
+83424000000 83428167783 27808000000 27809389261 2038196224 2039585485
+83427000000 83431167937 27809000000 27810389312 2039196224 2040585536
+83430000000 83434168057 27810000000 27811389352 2040196224 2041585576
+83433000000 83437168266 27811000000 27812389422 2041196224 2042585646
+83436000000 83440168396 27812000000 27813389465 2042196224 2043585689
+83439000000 83443168510 27813000000 27814389503 2043196224 2044585727
+83442000000 83446168671 27814000000 27815389557 2044196224 2045585781
+83445000000 83449168806 27815000000 27816389602 2045196224 2046585826
+83448000000 83452168949 27816000000 27817389649 2046196224 2047585873
+83451000000 83455169049 27817000000 27818389683 2047196224 2048585907
+83454000000 83458169283 27818000000 27819389761 2048196224 2049585985
+83457000000 83461169356 27819000000 27820389785 2049196224 2050586009
+83460000000 83464169477 27820000000 27821389825 2050196224 2051586049
+83463000000 83467169666 27821000000 27822389888 2051196224 2052586112
+83466000000 83470169820 27822000000 27823389940 2052196224 2053586164
+83469000000 83473169999 27823000000 27824389999 2053196224 2054586223
+83472000000 83476170145 27824000000 27825390048 2054196224 2055586272
+83475000000 83479170272 27825000000 27826390090 2055196224 2056586314
+83478000000 83482170446 27826000000 27827390148 2056196224 2057586372
+83481000000 83485170510 27827000000 27828390170 2057196224 2058586394
+83484000000 83488170717 27828000000 27829390239 2058196224 2059586463
+83487000000 83491170898 27829000000 27830390299 2059196224 2060586523
+83490000000 83494171047 27830000000 27831390349 2060196224 2061586573
+83493000000 83497171104 27831000000 27832390368 2061196224 2062586592
+83496000000 83500171300 27832000000 27833390433 2062196224 2063586657
+83499000000 83503171490 27833000000 27834390496 2063196224 2064586720
+83502000000 83506171635 27834000000 27835390545 2064196224 2065586769
+83505000000 83509171807 27835000000 27836390602 2065196224 2066586826
+83508000000 83512171940 27836000000 27837390646 2066196224 2067586870
+83511000000 83515172011 27837000000 27838390670 2067196224 2068586894
+83514000000 83518172237 27838000000 27839390745 2068196224 2069586969
+83517000000 83521172397 27839000000 27840390799 2069196224 2070587023
+83520000000 83524172529 27840000000 27841390843 2070196224 2071587067
+83523000000 83527172637 27841000000 27842390879 2071196224 2072587103
+83526000000 83530172848 27842000000 27843390949 2072196224 2073587173
+83529000000 83533173014 27843000000 27844391004 2073196224 2074587228
+83532000000 83536173125 27844000000 27845391041 2074196224 2075587265
+83535000000 83539173285 27845000000 27846391095 2075196224 2076587319
+83538000000 83542173397 27846000000 27847391132 2076196224 2077587356
+83541000000 83545173595 27847000000 27848391198 2077196224 2078587422
+83544000000 83548173685 27848000000 27849391228 2078196224 2079587452
+83547000000 83551173910 27849000000 27850391303 2079196224 2080587527
+83550000000 83554174042 27850000000 27851391347 2080196224 2081587571
+83553000000 83557174181 27851000000 27852391393 2081196224 2082587617
+83556000000 83560174232 27852000000 27853391410 2082196224 2083587634
+83559000000 83563174443 27853000000 27854391481 2083196224 2084587705
+83562000000 83566174652 27854000000 27855391550 2084196224 2085587774
+83565000000 83569174780 27855000000 27856391593 2085196224 2086587817
+83568000000 83572174923 27856000000 27857391641 2086196224 2087587865
+83571000000 83575175094 27857000000 27858391698 2087196224 2088587922
+83574000000 83578175191 27858000000 27859391730 2088196224 2089587954
+83577000000 83581175404 27859000000 27860391801 2089196224 2090588025
+83580000000 83584175534 27860000000 27861391844 2090196224 2091588068
+83583000000 83587175684 27861000000 27862391894 2091196224 2092588118
+83586000000 83590175844 27862000000 27863391948 2092196224 2093588172
+83589000000 83593175940 27863000000 27864391980 2093196224 2094588204
+83592000000 83596176128 27864000000 27865392042 2094196224 2095588266
+83595000000 83599176296 27865000000 27866392098 2095196224 2096588322
+83598000000 83602176432 27866000000 27867392144 2096196224 2097588368
+83601000000 83605176607 27867000000 27868392202 2097196224 2098588426
+83604000000 83608176729 27868000000 27869392243 2098196224 2099588467
+83607000000 83611176879 27869000000 27870392293 2099196224 2100588517
+83610000000 83614177027 27870000000 27871392342 2100196224 2101588566
+83613000000 83617177233 27871000000 27872392411 2101196224 2102588635
+83616000000 83620177347 27872000000 27873392449 2102196224 2103588673
+83619000000 83623177479 27873000000 27874392493 2103196224 2104588717
+83622000000 83626177653 27874000000 27875392551 2104196224 2105588775
+83625000000 83629177772 27875000000 27876392590 2105196224 2106588814
+83628000000 83632177896 27876000000 27877392632 2106196224 2107588856
+83631000000 83635178115 27877000000 27878392705 2107196224 2108588929
+83634000000 83638178251 27878000000 27879392750 2108196224 2109588974
+83637000000 83641178402 27879000000 27880392800 2109196224 2110589024
+83640000000 83644178562 27880000000 27881392854 2110196224 2111589078
+83643000000 83647178683 27881000000 27882392894 2111196224 2112589118
+83646000000 83650178764 27882000000 27883392921 2112196224 2113589145
+83649000000 83653178972 27883000000 27884392990 2113196224 2114589214
+83652000000 83656179127 27884000000 27885393042 2114196224 2115589266
+83655000000 83659179286 27885000000 27886393095 2115196224 2116589319
+83658000000 83662179438 27886000000 27887393146 2116196224 2117589370
+83661000000 83665179560 27887000000 27888393186 2117196224 2118589410
+83664000000 83668179738 27888000000 27889393246 2118196224 2119589470
+83667000000 83671179887 27889000000 27890393295 2119196224 2120589519
+83670000000 83674180015 27890000000 27891393338 2120196224 2121589562
+83673000000 83677180184 27891000000 27892393394 2121196224 2122589618
+83676000000 83680180304 27892000000 27893393434 2122196224 2123589658
+83679000000 83683180231 27893000000 27894393410 2123196224 2124589634
+83682000000 83686180554 27894000000 27895393518 2124196224 2125589742
+83685000000 83689180807 27895000000 27896393602 2125196224 2126589826
+83688000000 83692180917 27896000000 27897393639 2126196224 2127589863
+83691000000 83695181096 27897000000 27898393698 2127196224 2128589922
+83694000000 83698181144 27898000000 27899393714 2128196224 2129589938
+83697000000 83701181398 27899000000 27900393799 2129196224 2130590023
+83700000000 83704181517 27900000000 27901393839 2130196224 2131590063
+83703000000 83707181688 27901000000 27902393896 2131196224 2132590120
+83706000000 83710181835 27902000000 27903393945 2132196224 2133590169
+83709000000 83713181988 27903000000 27904393996 2133196224 2134590220
+83712000000 83716182134 27904000000 27905394044 2134196224 2135590268
+83715000000 83719182278 27905000000 27906394092 2135196224 2136590316
+83718000000 83722182441 27906000000 27907394147 2136196224 2137590371
+83721000000 83725182593 27907000000 27908394197 2137196224 2138590421
+83724000000 83728182747 27908000000 27909394249 2138196224 2139590473
+83727000000 83731182867 27909000000 27910394289 2139196224 2140590513
+83730000000 83734183076 27910000000 27911394358 2140196224 2141590582
+83733000000 83737183206 27911000000 27912394402 2141196224 2142590626
+83736000000 83740183320 27912000000 27913394440 2142196224 2143590664
+83739000000 83743183481 27913000000 27914394493 2143196224 2144590717
+83742000000 83746183616 27914000000 27915394538 2144196224 2145590762
+83745000000 83749183759 27915000000 27916394586 2145196224 2146590810
+83748000000 83752183859 27916000000 27917394619 2146196224 2147590843
+83751000000 83755184093 27917000000 27918394697 2147196224 2148590921
+83754000000 83758184166 27918000000 27919394722 2148196224 2149590946
+83757000000 83761184287 27919000000 27920394762 2149196224 2150590986
+83760000000 83764184476 27920000000 27921394825 2150196224 2151591049
+83763000000 83767184630 27921000000 27922394876 2151196224 2152591100
+83766000000 83770184809 27922000000 27923394936 2152196224 2153591160
+83769000000 83773184955 27923000000 27924394985 2153196224 2154591209
+83772000000 83776185082 27924000000 27925395027 2154196224 2155591251
+83775000000 83779185256 27925000000 27926395085 2155196224 2156591309
+83778000000 83782185320 27926000000 27927395106 2156196224 2157591330
+83781000000 83785185527 27927000000 27928395175 2157196224 2158591399
+83784000000 83788185708 27928000000 27929395236 2158196224 2159591460
+83787000000 83791185857 27929000000 27930395285 2159196224 2160591509
+83790000000 83794185914 27930000000 27931395304 2160196224 2161591528
+83793000000 83797186110 27931000000 27932395370 2161196224 2162591594
+83796000000 83800186300 27932000000 27933395433 2162196224 2163591657
+83799000000 83803186445 27933000000 27934395481 2163196224 2164591705
+83802000000 83806186617 27934000000 27935395539 2164196224 2165591763
+83805000000 83809186750 27935000000 27936395583 2165196224 2166591807
+83808000000 83812186821 27936000000 27937395607 2166196224 2167591831
+83811000000 83815187047 27937000000 27938395682 2167196224 2168591906
+83814000000 83818187207 27938000000 27939395735 2168196224 2169591959
+83817000000 83821187339 27939000000 27940395779 2169196224 2170592003
+83820000000 83824187447 27940000000 27941395815 2170196224 2171592039
+83823000000 83827187658 27941000000 27942395886 2171196224 2172592110
+83826000000 83830187824 27942000000 27943395941 2172196224 2173592165
+83829000000 83833187935 27943000000 27944395978 2173196224 2174592202
+83832000000 83836188095 27944000000 27945396031 2174196224 2175592255
+83835000000 83839188207 27945000000 27946396069 2175196224 2176592293
+83838000000 83842188405 27946000000 27947396135 2176196224 2177592359
+83841000000 83845188495 27947000000 27948396165 2177196224 2178592389
+83844000000 83848188720 27948000000 27949396240 2178196224 2179592464
+83847000000 83851188852 27949000000 27950396284 2179196224 2180592508
+83850000000 83854188991 27950000000 27951396330 2180196224 2181592554
+83853000000 83857189042 27951000000 27952396347 2181196224 2182592571
+83856000000 83860189253 27952000000 27953396417 2182196224 2183592641
+83859000000 83863189462 27953000000 27954396487 2183196224 2184592711
+83862000000 83866189590 27954000000 27955396530 2184196224 2185592754
+83865000000 83869189733 27955000000 27956396577 2185196224 2186592801
+83868000000 83872189904 27956000000 27957396634 2186196224 2187592858
+83871000000 83875190001 27957000000 27958396667 2187196224 2188592891
+83874000000 83878190214 27958000000 27959396738 2188196224 2189592962
+83877000000 83881190344 27959000000 27960396781 2189196224 2190593005
+83880000000 83884190494 27960000000 27961396831 2190196224 2191593055
+83883000000 83887190654 27961000000 27962396884 2191196224 2192593108
+83886000000 83890190750 27962000000 27963396916 2192196224 2193593140
+83889000000 83893190938 27963000000 27964396979 2193196224 2194593203
+83892000000 83896191106 27964000000 27965397035 2194196224 2195593259
+83895000000 83899191242 27965000000 27966397080 2195196224 2196593304
+83898000000 83902191417 27966000000 27967397139 2196196224 2197593363
+83901000000 83905191539 27967000000 27968397179 2197196224 2198593403
+83904000000 83908191689 27968000000 27969397229 2198196224 2199593453
+83907000000 83911191837 27969000000 27970397279 2199196224 2200593503
+83910000000 83914192043 27970000000 27971397347 2200196224 2201593571
+83913000000 83917192157 27971000000 27972397385 2201196224 2202593609
+83916000000 83920192289 27972000000 27973397429 2202196224 2203593653
+83919000000 83923192463 27973000000 27974397487 2203196224 2204593711
+83922000000 83926192582 27974000000 27975397527 2204196224 2205593751
+83925000000 83929192706 27975000000 27976397568 2205196224 2206593792
+83928000000 83932192925 27976000000 27977397641 2206196224 2207593865
+83931000000 83935193061 27977000000 27978397687 2207196224 2208593911
+83934000000 83938193212 27978000000 27979397737 2208196224 2209593961
+83937000000 83941193372 27979000000 27980397790 2209196224 2210594014
+83940000000 83944193493 27980000000 27981397831 2210196224 2211594055
+83943000000 83947193574 27981000000 27982397858 2211196224 2212594082
+83946000000 83950193782 27982000000 27983397927 2212196224 2213594151
+83949000000 83953193937 27983000000 27984397979 2213196224 2214594203
+83952000000 83956194096 27984000000 27985398032 2214196224 2215594256
+83955000000 83959194248 27985000000 27986398082 2215196224 2216594306
+83958000000 83962194370 27986000000 27987398123 2216196224 2217594347
+83961000000 83965194548 27987000000 27988398182 2217196224 2218594406
+83964000000 83968194697 27988000000 27989398232 2218196224 2219594456
+83967000000 83971194825 27989000000 27990398275 2219196224 2220594499
+83970000000 83974194994 27990000000 27991398331 2220196224 2221594555
+83973000000 83977195114 27991000000 27992398371 2221196224 2222594595
+83976000000 83980195041 27992000000 27993398347 2222196224 2223594571
+83979000000 83983195364 27993000000 27994398454 2223196224 2224594678
+83982000000 83986195617 27994000000 27995398539 2224196224 2225594763
+83985000000 83989195727 27995000000 27996398575 2225196224 2226594799
+83988000000 83992195906 27996000000 27997398635 2226196224 2227594859
+83991000000 83995195954 27997000000 27998398651 2227196224 2228594875
+83994000000 83998196208 27998000000 27999398736 2228196224 2229594960
+83997000000 84001196327 27999000000 28000398775 2229196224 2230594999
+84000000000 84004196498 28000000000 28001398832 2230196224 2231595056
+84003000000 84007196645 28001000000 28002398881 2231196224 2232595105
+84006000000 84010196798 28002000000 28003398932 2232196224 2233595156
+84009000000 84013196944 28003000000 28004398981 2233196224 2234595205
+84012000000 84016197088 28004000000 28005399029 2234196224 2235595253
+84015000000 84019197251 28005000000 28006399083 2235196224 2236595307
+84018000000 84022197403 28006000000 28007399134 2236196224 2237595358
+84021000000 84025197557 28007000000 28008399185 2237196224 2238595409
+84024000000 84028197677 28008000000 28009399225 2238196224 2239595449
+84027000000 84031197886 28009000000 28010399295 2239196224 2240595519
+84030000000 84034198016 28010000000 28011399338 2240196224 2241595562
+84033000000 84037198130 28011000000 28012399376 2241196224 2242595600
+84036000000 84040198291 28012000000 28013399430 2242196224 2243595654
+84039000000 84043198426 28013000000 28014399475 2243196224 2244595699
+84042000000 84046198569 28014000000 28015399523 2244196224 2245595747
+84045000000 84049198669 28015000000 28016399556 2245196224 2246595780
+84048000000 84052198903 28016000000 28017399634 2246196224 2247595858
+84051000000 84055198976 28017000000 28018399658 2247196224 2248595882
+84054000000 84058199097 28018000000 28019399699 2248196224 2249595923
+84057000000 84061199286 28019000000 28020399762 2249196224 2250595986
+84060000000 84064199440 28020000000 28021399813 2250196224 2251596037
+84063000000 84067199619 28021000000 28022399873 2251196224 2252596097
+84066000000 84070199765 28022000000 28023399921 2252196224 2253596145
+84069000000 84073199892 28023000000 28024399964 2253196224 2254596188
+84072000000 84076200066 28024000000 28025400022 2254196224 2255596246
+84075000000 84079200130 28025000000 28026400043 2255196224 2256596267
+84078000000 84082200337 28026000000 28027400112 2256196224 2257596336
+84081000000 84085200518 28027000000 28028400172 2257196224 2258596396
+84084000000 84088200667 28028000000 28029400222 2258196224 2259596446
+84087000000 84091200724 28029000000 28030400241 2259196224 2260596465
+84090000000 84094200920 28030000000 28031400306 2260196224 2261596530
+84093000000 84097201110 28031000000 28032400370 2261196224 2262596594
+84096000000 84100201255 28032000000 28033400418 2262196224 2263596642
+84099000000 84103201427 28033000000 28034400475 2263196224 2264596699
+84102000000 84106201560 28034000000 28035400520 2264196224 2265596744
+84105000000 84109201631 28035000000 28036400543 2265196224 2266596767
+84108000000 84112201857 28036000000 28037400619 2266196224 2267596843
+84111000000 84115202017 28037000000 28038400672 2267196224 2268596896
+84114000000 84118202149 28038000000 28039400716 2268196224 2269596940
+84117000000 84121202257 28039000000 28040400752 2269196224 2270596976
+84120000000 84124202468 28040000000 28041400822 2270196224 2271597046
+84123000000 84127202634 28041000000 28042400878 2271196224 2272597102
+84126000000 84130202745 28042000000 28043400915 2272196224 2273597139
+84129000000 84133202905 28043000000 28044400968 2273196224 2274597192
+84132000000 84136203017 28044000000 28045401005 2274196224 2275597229
+84135000000 84139203215 28045000000 28046401071 2275196224 2276597295
+84138000000 84142203305 28046000000 28047401101 2276196224 2277597325
+84141000000 84145203530 28047000000 28048401176 2277196224 2278597400
+84144000000 84148203662 28048000000 28049401220 2278196224 2279597444
+84147000000 84151203801 28049000000 28050401267 2279196224 2280597491
+84150000000 84154203852 28050000000 28051401284 2280196224 2281597508
+84153000000 84157204063 28051000000 28052401354 2281196224 2282597578
+84156000000 84160204272 28052000000 28053401424 2282196224 2283597648
+84159000000 84163204400 28053000000 28054401466 2283196224 2284597690
+84162000000 84166204543 28054000000 28055401514 2284196224 2285597738
+84165000000 84169204714 28055000000 28056401571 2285196224 2286597795
+84168000000 84172204811 28056000000 28057401603 2286196224 2287597827
+84171000000 84175205024 28057000000 28058401674 2287196224 2288597898
+84174000000 84178205154 28058000000 28059401718 2288196224 2289597942
+84177000000 84181205304 28059000000 28060401768 2289196224 2290597992
+84180000000 84184205464 28060000000 28061401821 2290196224 2291598045
+84183000000 84187205560 28061000000 28062401853 2291196224 2292598077
+84186000000 84190205748 28062000000 28063401916 2292196224 2293598140
+84189000000 84193205916 28063000000 28064401972 2293196224 2294598196
+84192000000 84196206052 28064000000 28065402017 2294196224 2295598241
+84195000000 84199206227 28065000000 28066402075 2295196224 2296598299
+84198000000 84202206349 28066000000 28067402116 2296196224 2297598340
+84201000000 84205206499 28067000000 28068402166 2297196224 2298598390
+84204000000 84208206647 28068000000 28069402215 2298196224 2299598439
+84207000000 84211206853 28069000000 28070402284 2299196224 2300598508
+84210000000 84214206967 28070000000 28071402322 2300196224 2301598546
+84213000000 84217207099 28071000000 28072402366 2301196224 2302598590
+84216000000 84220207273 28072000000 28073402424 2302196224 2303598648
+84219000000 84223207392 28073000000 28074402464 2303196224 2304598688
+84222000000 84226207516 28074000000 28075402505 2304196224 2305598729
+84225000000 84229207735 28075000000 28076402578 2305196224 2306598802
+84228000000 84232207871 28076000000 28077402623 2306196224 2307598847
+84231000000 84235208022 28077000000 28078402674 2307196224 2308598898
+84234000000 84238208182 28078000000 28079402727 2308196224 2309598951
+84237000000 84241208303 28079000000 28080402767 2309196224 2310598991
+84240000000 84244208384 28080000000 28081402794 2310196224 2311599018
+84243000000 84247208592 28081000000 28082402864 2311196224 2312599088
+84246000000 84250208747 28082000000 28083402915 2312196224 2313599139
+84249000000 84253208906 28083000000 28084402968 2313196224 2314599192
+84252000000 84256209058 28084000000 28085403019 2314196224 2315599243
+84255000000 84259209180 28085000000 28086403060 2315196224 2316599284
+84258000000 84262209358 28086000000 28087403119 2316196224 2317599343
+84261000000 84265209507 28087000000 28088403169 2317196224 2318599393
+84264000000 84268209635 28088000000 28089403211 2318196224 2319599435
+84267000000 84271209804 28089000000 28090403268 2319196224 2320599492
+84270000000 84274209924 28090000000 28091403308 2320196224 2321599532
+84273000000 84277209851 28091000000 28092403283 2321196224 2322599507
+84276000000 84280210174 28092000000 28093403391 2322196224 2323599615
+84279000000 84283210427 28093000000 28094403475 2323196224 2324599699
+84282000000 84286210537 28094000000 28095403512 2324196224 2325599736
+84285000000 84289210716 28095000000 28096403572 2325196224 2326599796
+84288000000 84292210764 28096000000 28097403588 2326196224 2327599812
+84291000000 84295211018 28097000000 28098403672 2327196224 2328599896
+84294000000 84298211137 28098000000 28099403712 2328196224 2329599936
+84297000000 84301211308 28099000000 28100403769 2329196224 2330599993
+84300000000 84304211455 28100000000 28101403818 2330196224 2331600042
+84303000000 84307211608 28101000000 28102403869 2331196224 2332600093
+84306000000 84310211754 28102000000 28103403918 2332196224 2333600142
+84309000000 84313211898 28103000000 28104403966 2333196224 2334600190
+84312000000 84316212061 28104000000 28105404020 2334196224 2335600244
+84315000000 84319212213 28105000000 28106404071 2335196224 2336600295
+84318000000 84322212367 28106000000 28107404122 2336196224 2337600346
+84321000000 84325212487 28107000000 28108404162 2337196224 2338600386
+84324000000 84328212696 28108000000 28109404232 2338196224 2339600456
+84327000000 84331212826 28109000000 28110404275 2339196224 2340600499
+84330000000 84334212940 28110000000 28111404313 2340196224 2341600537
+84333000000 84337213101 28111000000 28112404367 2341196224 2342600591
+84336000000 84340213236 28112000000 28113404412 2342196224 2343600636
+84339000000 84343213379 28113000000 28114404459 2343196224 2344600683
+84342000000 84346213479 28114000000 28115404493 2344196224 2345600717
+84345000000 84349213713 28115000000 28116404571 2345196224 2346600795
+84348000000 84352213786 28116000000 28117404595 2346196224 2347600819
+84351000000 84355213907 28117000000 28118404635 2347196224 2348600859
+84354000000 84358214096 28118000000 28119404698 2348196224 2349600922
+84357000000 84361214250 28119000000 28120404750 2349196224 2350600974
+84360000000 84364214429 28120000000 28121404809 2350196224 2351601033
+84363000000 84367214575 28121000000 28122404858 2351196224 2352601082
+84366000000 84370214702 28122000000 28123404900 2352196224 2353601124
+84369000000 84373214876 28123000000 28124404958 2353196224 2354601182
+84372000000 84376214940 28124000000 28125404980 2354196224 2355601204
+84375000000 84379215147 28125000000 28126405049 2355196224 2356601273
+84378000000 84382215328 28126000000 28127405109 2356196224 2357601333
+84381000000 84385215477 28127000000 28128405159 2357196224 2358601383
+84384000000 84388215534 28128000000 28129405178 2358196224 2359601402
+84387000000 84391215730 28129000000 28130405243 2359196224 2360601467
+84390000000 84394215920 28130000000 28131405306 2360196224 2361601530
+84393000000 84397216065 28131000000 28132405355 2361196224 2362601579
+84396000000 84400216237 28132000000 28133405412 2362196224 2363601636
+84399000000 84403216370 28133000000 28134405456 2363196224 2364601680
+84402000000 84406216441 28134000000 28135405480 2364196224 2365601704
+84405000000 84409216667 28135000000 28136405555 2365196224 2366601779
+84408000000 84412216827 28136000000 28137405609 2366196224 2367601833
+84411000000 84415216959 28137000000 28138405653 2367196224 2368601877
+84414000000 84418217067 28138000000 28139405689 2368196224 2369601913
+84417000000 84421217278 28139000000 28140405759 2369196224 2370601983
+84420000000 84424217444 28140000000 28141405814 2370196224 2371602038
+84423000000 84427217555 28141000000 28142405851 2371196224 2372602075
+84426000000 84430217715 28142000000 28143405905 2372196224 2373602129
+84429000000 84433217827 28143000000 28144405942 2373196224 2374602166
+84432000000 84436218025 28144000000 28145406008 2374196224 2375602232
+84435000000 84439218115 28145000000 28146406038 2375196224 2376602262
+84438000000 84442218340 28146000000 28147406113 2376196224 2377602337
+84441000000 84445218472 28147000000 28148406157 2377196224 2378602381
+84444000000 84448218611 28148000000 28149406203 2378196224 2379602427
+84447000000 84451218662 28149000000 28150406220 2379196224 2380602444
+84450000000 84454218873 28150000000 28151406291 2380196224 2381602515
+84453000000 84457219082 28151000000 28152406360 2381196224 2382602584
+84456000000 84460219210 28152000000 28153406403 2382196224 2383602627
+84459000000 84463219353 28153000000 28154406451 2383196224 2384602675
+84462000000 84466219524 28154000000 28155406508 2384196224 2385602732
+84465000000 84469219621 28155000000 28156406540 2385196224 2386602764
+84468000000 84472219834 28156000000 28157406611 2386196224 2387602835
+84471000000 84475219964 28157000000 28158406654 2387196224 2388602878
+84474000000 84478220114 28158000000 28159406704 2388196224 2389602928
+84477000000 84481220274 28159000000 28160406758 2389196224 2390602982
+84480000000 84484220370 28160000000 28161406790 2390196224 2391603014
+84483000000 84487220558 28161000000 28162406852 2391196224 2392603076
+84486000000 84490220726 28162000000 28163406908 2392196224 2393603132
+84489000000 84493220862 28163000000 28164406954 2393196224 2394603178
+84492000000 84496221037 28164000000 28165407012 2394196224 2395603236
+84495000000 84499221159 28165000000 28166407053 2395196224 2396603277
+84498000000 84502221309 28166000000 28167407103 2396196224 2397603327
+84501000000 84505221457 28167000000 28168407152 2397196224 2398603376
+84504000000 84508221663 28168000000 28169407221 2398196224 2399603445
+84507000000 84511221777 28169000000 28170407259 2399196224 2400603483
+84510000000 84514221909 28170000000 28171407303 2400196224 2401603527
+84513000000 84517222083 28171000000 28172407361 2401196224 2402603585
+84516000000 84520222202 28172000000 28173407400 2402196224 2403603624
+84519000000 84523222326 28173000000 28174407442 2403196224 2404603666
+84522000000 84526222545 28174000000 28175407515 2404196224 2405603739
+84525000000 84529222681 28175000000 28176407560 2405196224 2406603784
+84528000000 84532222832 28176000000 28177407610 2406196224 2407603834
+84531000000 84535222992 28177000000 28178407664 2407196224 2408603888
+84534000000 84538223113 28178000000 28179407704 2408196224 2409603928
+84537000000 84541223194 28179000000 28180407731 2409196224 2410603955
+84540000000 84544223402 28180000000 28181407800 2410196224 2411604024
+84543000000 84547223557 28181000000 28182407852 2411196224 2412604076
+84546000000 84550223716 28182000000 28183407905 2412196224 2413604129
+84549000000 84553223868 28183000000 28184407956 2413196224 2414604180
+84552000000 84556223990 28184000000 28185407996 2414196224 2415604220
+84555000000 84559224168 28185000000 28186408056 2415196224 2416604280
+84558000000 84562224317 28186000000 28187408105 2416196224 2417604329
+84561000000 84565224445 28187000000 28188408148 2417196224 2418604372
+84564000000 84568224614 28188000000 28189408204 2418196224 2419604428
+84567000000 84571224734 28189000000 28190408244 2419196224 2420604468
+84570000000 84574224661 28190000000 28191408220 2420196224 2421604444
+84573000000 84577224984 28191000000 28192408328 2421196224 2422604552
+84576000000 84580225237 28192000000 28193408412 2422196224 2423604636
+84579000000 84583225347 28193000000 28194408449 2423196224 2424604673
+84582000000 84586225526 28194000000 28195408508 2424196224 2425604732
+84585000000 84589225574 28195000000 28196408524 2425196224 2426604748
+84588000000 84592225828 28196000000 28197408609 2426196224 2427604833
+84591000000 84595225947 28197000000 28198408649 2427196224 2428604873
+84594000000 84598226118 28198000000 28199408706 2428196224 2429604930
+84597000000 84601226265 28199000000 28200408755 2429196224 2430604979
+84600000000 84604226418 28200000000 28201408806 2430196224 2431605030
+84603000000 84607226564 28201000000 28202408854 2431196224 2432605078
+84606000000 84610226708 28202000000 28203408902 2432196224 2433605126
+84609000000 84613226871 28203000000 28204408957 2433196224 2434605181
+84612000000 84616227023 28204000000 28205409007 2434196224 2435605231
+84615000000 84619227177 28205000000 28206409059 2435196224 2436605283
+84618000000 84622227297 28206000000 28207409099 2436196224 2437605323
+84621000000 84625227506 28207000000 28208409168 2437196224 2438605392
+84624000000 84628227636 28208000000 28209409212 2438196224 2439605436
+84627000000 84631227750 28209000000 28210409250 2439196224 2440605474
+84630000000 84634227911 28210000000 28211409303 2440196224 2441605527
+84633000000 84637228046 28211000000 28212409348 2441196224 2442605572
+84636000000 84640228189 28212000000 28213409396 2442196224 2443605620
+84639000000 84643228289 28213000000 28214409429 2443196224 2444605653
+84642000000 84646228523 28214000000 28215409507 2444196224 2445605731
+84645000000 84649228596 28215000000 28216409532 2445196224 2446605756
+84648000000 84652228717 28216000000 28217409572 2446196224 2447605796
+84651000000 84655228906 28217000000 28218409635 2447196224 2448605859
+84654000000 84658229060 28218000000 28219409686 2448196224 2449605910
+84657000000 84661229239 28219000000 28220409746 2449196224 2450605970
+84660000000 84664229385 28220000000 28221409795 2450196224 2451606019
+84663000000 84667229512 28221000000 28222409837 2451196224 2452606061
+84666000000 84670229686 28222000000 28223409895 2452196224 2453606119
+84669000000 84673229750 28223000000 28224409916 2453196224 2454606140
+84672000000 84676229957 28224000000 28225409985 2454196224 2455606209
+84675000000 84679230138 28225000000 28226410046 2455196224 2456606270
+84678000000 84682230287 28226000000 28227410095 2456196224 2457606319
+84681000000 84685230344 28227000000 28228410114 2457196224 2458606338
+84684000000 84688230540 28228000000 28229410180 2458196224 2459606404
+84687000000 84691230730 28229000000 28230410243 2459196224 2460606467
+84690000000 84694230875 28230000000 28231410291 2460196224 2461606515
+84693000000 84697231047 28231000000 28232410349 2461196224 2462606573
+84696000000 84700231180 28232000000 28233410393 2462196224 2463606617
+84699000000 84703231251 28233000000 28234410417 2463196224 2464606641
+84702000000 84706231477 28234000000 28235410492 2464196224 2465606716
+84705000000 84709231637 28235000000 28236410545 2465196224 2466606769
+84708000000 84712231769 28236000000 28237410589 2466196224 2467606813
+84711000000 84715231877 28237000000 28238410625 2467196224 2468606849
+84714000000 84718232088 28238000000 28239410696 2468196224 2469606920
+84717000000 84721232254 28239000000 28240410751 2469196224 2470606975
+84720000000 84724232365 28240000000 28241410788 2470196224 2471607012
+84723000000 84727232525 28241000000 28242410841 2471196224 2472607065
+84726000000 84730232637 28242000000 28243410879 2472196224 2473607103
+84729000000 84733232835 28243000000 28244410945 2473196224 2474607169
+84732000000 84736232925 28244000000 28245410975 2474196224 2475607199
+84735000000 84739233150 28245000000 28246411050 2475196224 2476607274
+84738000000 84742233282 28246000000 28247411094 2476196224 2477607318
+84741000000 84745233421 28247000000 28248411140 2477196224 2478607364
+84744000000 84748233472 28248000000 28249411157 2478196224 2479607381
+84747000000 84751233683 28249000000 28250411227 2479196224 2480607451
+84750000000 84754233892 28250000000 28251411297 2480196224 2481607521
+84753000000 84757234020 28251000000 28252411340 2481196224 2482607564
+84756000000 84760234163 28252000000 28253411387 2482196224 2483607611
+84759000000 84763234334 28253000000 28254411444 2483196224 2484607668
+84762000000 84766234431 28254000000 28255411477 2484196224 2485607701
+84765000000 84769234644 28255000000 28256411548 2485196224 2486607772
+84768000000 84772234774 28256000000 28257411591 2486196224 2487607815
+84771000000 84775234924 28257000000 28258411641 2487196224 2488607865
+84774000000 84778235084 28258000000 28259411694 2488196224 2489607918
+84777000000 84781235180 28259000000 28260411726 2489196224 2490607950
+84780000000 84784235368 28260000000 28261411789 2490196224 2491608013
+84783000000 84787235536 28261000000 28262411845 2491196224 2492608069
+84786000000 84790235672 28262000000 28263411890 2492196224 2493608114
+84789000000 84793235847 28263000000 28264411949 2493196224 2494608173
+84792000000 84796235969 28264000000 28265411989 2494196224 2495608213
+84795000000 84799236119 28265000000 28266412039 2495196224 2496608263
+84798000000 84802236267 28266000000 28267412089 2496196224 2497608313
+84801000000 84805236473 28267000000 28268412157 2497196224 2498608381
+84804000000 84808236587 28268000000 28269412195 2498196224 2499608419
+84807000000 84811236719 28269000000 28270412239 2499196224 2500608463
+84810000000 84814236893 28270000000 28271412297 2500196224 2501608521
+84813000000 84817237012 28271000000 28272412337 2501196224 2502608561
+84816000000 84820237136 28272000000 28273412378 2502196224 2503608602
+84819000000 84823237355 28273000000 28274412451 2503196224 2504608675
+84822000000 84826237491 28274000000 28275412497 2504196224 2505608721
+84825000000 84829237642 28275000000 28276412547 2505196224 2506608771
+84828000000 84832237802 28276000000 28277412600 2506196224 2507608824
+84831000000 84835237923 28277000000 28278412641 2507196224 2508608865
+84834000000 84838238004 28278000000 28279412668 2508196224 2509608892
+84837000000 84841238212 28279000000 28280412737 2509196224 2510608961
+84840000000 84844238367 28280000000 28281412789 2510196224 2511609013
+84843000000 84847238526 28281000000 28282412842 2511196224 2512609066
+84846000000 84850238678 28282000000 28283412892 2512196224 2513609116
+84849000000 84853238800 28283000000 28284412933 2513196224 2514609157
+84852000000 84856238978 28284000000 28285412992 2514196224 2515609216
+84855000000 84859239127 28285000000 28286413042 2515196224 2516609266
+84858000000 84862239255 28286000000 28287413085 2516196224 2517609309
+84861000000 84865239424 28287000000 28288413141 2517196224 2518609365
+84864000000 84868239544 28288000000 28289413181 2518196224 2519609405
+84867000000 84871239471 28289000000 28290413157 2519196224 2520609381
+84870000000 84874239794 28290000000 28291413264 2520196224 2521609488
+84873000000 84877240047 28291000000 28292413349 2521196224 2522609573
+84876000000 84880240157 28292000000 28293413385 2522196224 2523609609
+84879000000 84883240336 28293000000 28294413445 2523196224 2524609669
+84882000000 84886240384 28294000000 28295413461 2524196224 2525609685
+84885000000 84889240638 28295000000 28296413546 2525196224 2526609770
+84888000000 84892240757 28296000000 28297413585 2526196224 2527609809
+84891000000 84895240928 28297000000 28298413642 2527196224 2528609866
+84894000000 84898241075 28298000000 28299413691 2528196224 2529609915
+84897000000 84901241228 28299000000 28300413742 2529196224 2530609966
+84900000000 84904241374 28300000000 28301413791 2530196224 2531610015
+84903000000 84907241518 28301000000 28302413839 2531196224 2532610063
+84906000000 84910241681 28302000000 28303413893 2532196224 2533610117
+84909000000 84913241833 28303000000 28304413944 2533196224 2534610168
+84912000000 84916241987 28304000000 28305413995 2534196224 2535610219
+84915000000 84919242107 28305000000 28306414035 2535196224 2536610259
+84918000000 84922242316 28306000000 28307414105 2536196224 2537610329
+84921000000 84925242446 28307000000 28308414148 2537196224 2538610372
+84924000000 84928242560 28308000000 28309414186 2538196224 2539610410
+84927000000 84931242721 28309000000 28310414240 2539196224 2540610464
+84930000000 84934242856 28310000000 28311414285 2540196224 2541610509
+84933000000 84937242999 28311000000 28312414333 2541196224 2542610557
+84936000000 84940243099 28312000000 28313414366 2542196224 2543610590
+84939000000 84943243333 28313000000 28314414444 2543196224 2544610668
+84942000000 84946243406 28314000000 28315414468 2544196224 2545610692
+84945000000 84949243527 28315000000 28316414509 2545196224 2546610733
+84948000000 84952243716 28316000000 28317414572 2546196224 2547610796
+84951000000 84955243870 28317000000 28318414623 2547196224 2548610847
+84954000000 84958244049 28318000000 28319414683 2548196224 2549610907
+84957000000 84961244195 28319000000 28320414731 2549196224 2550610955
+84960000000 84964244322 28320000000 28321414774 2550196224 2551610998
+84963000000 84967244496 28321000000 28322414832 2551196224 2552611056
+84966000000 84970244560 28322000000 28323414853 2552196224 2553611077
+84969000000 84973244767 28323000000 28324414922 2553196224 2554611146
+84972000000 84976244948 28324000000 28325414982 2554196224 2555611206
+84975000000 84979245097 28325000000 28326415032 2555196224 2556611256
+84978000000 84982245154 28326000000 28327415051 2556196224 2557611275
+84981000000 84985245350 28327000000 28328415116 2557196224 2558611340
+84984000000 84988245540 28328000000 28329415180 2558196224 2559611404
+84987000000 84991245685 28329000000 28330415228 2559196224 2560611452
+84990000000 84994245857 28330000000 28331415285 2560196224 2561611509
+84993000000 84997245990 28331000000 28332415330 2561196224 2562611554
+84996000000 85000246061 28332000000 28333415353 2562196224 2563611577
+84999000000 85003246287 28333000000 28334415429 2563196224 2564611653
+85002000000 85006246447 28334000000 28335415482 2564196224 2565611706
+85005000000 85009246579 28335000000 28336415526 2565196224 2566611750
+85008000000 85012246687 28336000000 28337415562 2566196224 2567611786
+85011000000 85015246898 28337000000 28338415632 2567196224 2568611856
+85014000000 85018247064 28338000000 28339415688 2568196224 2569611912
+85017000000 85021247175 28339000000 28340415725 2569196224 2570611949
+85020000000 85024247335 28340000000 28341415778 2570196224 2571612002
+85023000000 85027247447 28341000000 28342415815 2571196224 2572612039
+85026000000 85030247645 28342000000 28343415881 2572196224 2573612105
+85029000000 85033247735 28343000000 28344415911 2573196224 2574612135
+85032000000 85036247960 28344000000 28345415986 2574196224 2575612210
+85035000000 85039248092 28345000000 28346416030 2575196224 2576612254
+85038000000 85042248231 28346000000 28347416077 2576196224 2577612301
+85041000000 85045248282 28347000000 28348416094 2577196224 2578612318
+85044000000 85048248493 28348000000 28349416164 2578196224 2579612388
+85047000000 85051248702 28349000000 28350416234 2579196224 2580612458
+85050000000 85054248830 28350000000 28351416276 2580196224 2581612500
+85053000000 85057248973 28351000000 28352416324 2581196224 2582612548
+85056000000 85060249144 28352000000 28353416381 2582196224 2583612605
+85059000000 85063249241 28353000000 28354416413 2583196224 2584612637
+85062000000 85066249454 28354000000 28355416484 2584196224 2585612708
+85065000000 85069249584 28355000000 28356416528 2585196224 2586612752
+85068000000 85072249734 28356000000 28357416578 2586196224 2587612802
+85071000000 85075249894 28357000000 28358416631 2587196224 2588612855
+85074000000 85078249990 28358000000 28359416663 2588196224 2589612887
+85077000000 85081250178 28359000000 28360416726 2589196224 2590612950
+85080000000 85084250346 28360000000 28361416782 2590196224 2591613006
+85083000000 85087250482 28361000000 28362416827 2591196224 2592613051
+85086000000 85090250657 28362000000 28363416885 2592196224 2593613109
+85089000000 85093250779 28363000000 28364416926 2593196224 2594613150
+85092000000 85096250929 28364000000 28365416976 2594196224 2595613200
+85095000000 85099251077 28365000000 28366417025 2595196224 2596613249
+85098000000 85102251283 28366000000 28367417094 2596196224 2597613318
+85101000000 85105251397 28367000000 28368417132 2597196224 2598613356
+85104000000 85108251529 28368000000 28369417176 2598196224 2599613400
+85107000000 85111251703 28369000000 28370417234 2599196224 2600613458
+85110000000 85114251822 28370000000 28371417274 2600196224 2601613498
+85113000000 85117251946 28371000000 28372417315 2601196224 2602613539
+85116000000 85120252165 28372000000 28373417388 2602196224 2603613612
+85119000000 85123252301 28373000000 28374417433 2603196224 2604613657
+85122000000 85126252452 28374000000 28375417484 2604196224 2605613708
+85125000000 85129252612 28375000000 28376417537 2605196224 2606613761
+85128000000 85132252733 28376000000 28377417577 2606196224 2607613801
+85131000000 85135252814 28377000000 28378417604 2607196224 2608613828
+85134000000 85138253022 28378000000 28379417674 2608196224 2609613898
+85137000000 85141253177 28379000000 28380417725 2609196224 2610613949
+85140000000 85144253336 28380000000 28381417778 2610196224 2611614002
+85143000000 85147253488 28381000000 28382417829 2611196224 2612614053
+85146000000 85150253610 28382000000 28383417870 2612196224 2613614094
+85149000000 85153253788 28383000000 28384417929 2613196224 2614614153
+85152000000 85156253937 28384000000 28385417979 2614196224 2615614203
+85155000000 85159254065 28385000000 28386418021 2615196224 2616614245
+85158000000 85162254234 28386000000 28387418078 2616196224 2617614302
+85161000000 85165254354 28387000000 28388418118 2617196224 2618614342
+85164000000 85168254281 28388000000 28389418093 2618196224 2619614317
+85167000000 85171254604 28389000000 28390418201 2619196224 2620614425
+85170000000 85174254857 28390000000 28391418285 2620196224 2621614509
+85173000000 85177254967 28391000000 28392418322 2621196224 2622614546
+85176000000 85180255146 28392000000 28393418382 2622196224 2623614606
+85179000000 85183255194 28393000000 28394418398 2623196224 2624614622
+85182000000 85186255448 28394000000 28395418482 2624196224 2625614706
+85185000000 85189255567 28395000000 28396418522 2625196224 2626614746
+85188000000 85192255738 28396000000 28397418579 2626196224 2627614803
+85191000000 85195255885 28397000000 28398418628 2627196224 2628614852
+85194000000 85198256038 28398000000 28399418679 2628196224 2629614903
+85197000000 85201256184 28399000000 28400418728 2629196224 2630614952
+85200000000 85204256328 28400000000 28401418776 2630196224 2631615000
+85203000000 85207256491 28401000000 28402418830 2631196224 2632615054
+85206000000 85210256643 28402000000 28403418881 2632196224 2633615105
+85209000000 85213256797 28403000000 28404418932 2633196224 2634615156
+85212000000 85216256917 28404000000 28405418972 2634196224 2635615196
+85215000000 85219257126 28405000000 28406419042 2635196224 2636615266
+85218000000 85222257256 28406000000 28407419085 2636196224 2637615309
+85221000000 85225257370 28407000000 28408419123 2637196224 2638615347
+85224000000 85228257531 28408000000 28409419177 2638196224 2639615401
+85227000000 85231257666 28409000000 28410419222 2639196224 2640615446
+85230000000 85234257809 28410000000 28411419269 2640196224 2641615493
+85233000000 85237257909 28411000000 28412419303 2641196224 2642615527
+85236000000 85240258143 28412000000 28413419381 2642196224 2643615605
+85239000000 85243258216 28413000000 28414419405 2643196224 2644615629
+85242000000 85246258337 28414000000 28415419445 2644196224 2645615669
+85245000000 85249258526 28415000000 28416419508 2645196224 2646615732
+85248000000 85252258680 28416000000 28417419560 2646196224 2647615784
+85251000000 85255258859 28417000000 28418419619 2647196224 2648615843
+85254000000 85258259005 28418000000 28419419668 2648196224 2649615892
+85257000000 85261259132 28419000000 28420419710 2649196224 2650615934
+85260000000 85264259306 28420000000 28421419768 2650196224 2651615992
+85263000000 85267259370 28421000000 28422419790 2651196224 2652616014
+85266000000 85270259577 28422000000 28423419859 2652196224 2653616083
+85269000000 85273259758 28423000000 28424419919 2653196224 2654616143
+85272000000 85276259907 28424000000 28425419969 2654196224 2655616193
+85275000000 85279259964 28425000000 28426419988 2655196224 2656616212
+85278000000 85282260160 28426000000 28427420053 2656196224 2657616277
+85281000000 85285260350 28427000000 28428420116 2657196224 2658616340
+85284000000 85288260495 28428000000 28429420165 2658196224 2659616389
+85287000000 85291260667 28429000000 28430420222 2659196224 2660616446
+85290000000 85294260800 28430000000 28431420266 2660196224 2661616490
+85293000000 85297260871 28431000000 28432420290 2661196224 2662616514
+85296000000 85300261097 28432000000 28433420365 2662196224 2663616589
+85299000000 85303261257 28433000000 28434420419 2663196224 2664616643
+85302000000 85306261389 28434000000 28435420463 2664196224 2665616687
+85305000000 85309261497 28435000000 28436420499 2665196224 2666616723
+85308000000 85312261708 28436000000 28437420569 2666196224 2667616793
+85311000000 85315261874 28437000000 28438420624 2667196224 2668616848
+85314000000 85318261985 28438000000 28439420661 2668196224 2669616885
+85317000000 85321262145 28439000000 28440420715 2669196224 2670616939
+85320000000 85324262257 28440000000 28441420752 2670196224 2671616976
+85323000000 85327262455 28441000000 28442420818 2671196224 2672617042
+85326000000 85330262545 28442000000 28443420848 2672196224 2673617072
+85329000000 85333262770 28443000000 28444420923 2673196224 2674617147
+85332000000 85336262902 28444000000 28445420967 2674196224 2675617191
+85335000000 85339263041 28445000000 28446421013 2675196224 2676617237
+85338000000 85342263092 28446000000 28447421030 2676196224 2677617254
+85341000000 85345263303 28447000000 28448421101 2677196224 2678617325
+85344000000 85348263512 28448000000 28449421170 2678196224 2679617394
+85347000000 85351263640 28449000000 28450421213 2679196224 2680617437
+85350000000 85354263783 28450000000 28451421261 2680196224 2681617485
+85353000000 85357263954 28451000000 28452421318 2681196224 2682617542
+85356000000 85360264051 28452000000 28453421350 2682196224 2683617574
+85359000000 85363264264 28453000000 28454421421 2683196224 2684617645
+85362000000 85366264394 28454000000 28455421464 2684196224 2685617688
+85365000000 85369264544 28455000000 28456421514 2685196224 2686617738
+85368000000 85372264704 28456000000 28457421568 2686196224 2687617792
+85371000000 85375264800 28457000000 28458421600 2687196224 2688617824
+85374000000 85378264988 28458000000 28459421662 2688196224 2689617886
+85377000000 85381265156 28459000000 28460421718 2689196224 2690617942
+85380000000 85384265292 28460000000 28461421764 2690196224 2691617988
+85383000000 85387265467 28461000000 28462421822 2691196224 2692618046
+85386000000 85390265589 28462000000 28463421863 2692196224 2693618087
+85389000000 85393265739 28463000000 28464421913 2693196224 2694618137
+85392000000 85396265887 28464000000 28465421962 2694196224 2695618186
+85395000000 85399266093 28465000000 28466422031 2695196224 2696618255
+85398000000 85402266207 28466000000 28467422069 2696196224 2697618293
+85401000000 85405266339 28467000000 28468422113 2697196224 2698618337
+85404000000 85408266513 28468000000 28469422171 2698196224 2699618395
+85407000000 85411266632 28469000000 28470422210 2699196224 2700618434
+85410000000 85414266756 28470000000 28471422252 2700196224 2701618476
+85413000000 85417266975 28471000000 28472422325 2701196224 2702618549
+85416000000 85420267111 28472000000 28473422370 2702196224 2703618594
+85419000000 85423267262 28473000000 28474422420 2703196224 2704618644
+85422000000 85426267422 28474000000 28475422474 2704196224 2705618698
+85425000000 85429267543 28475000000 28476422514 2705196224 2706618738
+85428000000 85432267624 28476000000 28477422541 2706196224 2707618765
+85431000000 85435267832 28477000000 28478422610 2707196224 2708618834
+85434000000 85438267987 28478000000 28479422662 2708196224 2709618886
+85437000000 85441268146 28479000000 28480422715 2709196224 2710618939
+85440000000 85444268298 28480000000 28481422766 2710196224 2711618990
+85443000000 85447268420 28481000000 28482422806 2711196224 2712619030
+85446000000 85450268598 28482000000 28483422866 2712196224 2713619090
+85449000000 85453268747 28483000000 28484422915 2713196224 2714619139
+85452000000 85456268875 28484000000 28485422958 2714196224 2715619182
+85455000000 85459269044 28485000000 28486423014 2715196224 2716619238
+85458000000 85462269164 28486000000 28487423054 2716196224 2717619278
+85461000000 85465269091 28487000000 28488423030 2717196224 2718619254
+85464000000 85468269414 28488000000 28489423138 2718196224 2719619362
+85467000000 85471269667 28489000000 28490423222 2719196224 2720619446
+85470000000 85474269777 28490000000 28491423259 2720196224 2721619483
+85473000000 85477269956 28491000000 28492423318 2721196224 2722619542
+85476000000 85480270004 28492000000 28493423334 2722196224 2723619558
+85479000000 85483270258 28493000000 28494423419 2723196224 2724619643
+85482000000 85486270377 28494000000 28495423459 2724196224 2725619683
+85485000000 85489270548 28495000000 28496423516 2725196224 2726619740
+85488000000 85492270695 28496000000 28497423565 2726196224 2727619789
+85491000000 85495270848 28497000000 28498423616 2727196224 2728619840
+85494000000 85498270994 28498000000 28499423664 2728196224 2729619888
+85497000000 85501271138 28499000000 28500423712 2729196224 2730619936
+85500000000 85504271301 28500000000 28501423767 2730196224 2731619991
+85503000000 85507271453 28501000000 28502423817 2731196224 2732620041
+85506000000 85510271607 28502000000 28503423869 2732196224 2733620093
+85509000000 85513271727 28503000000 28504423909 2733196224 2734620133
+85512000000 85516271936 28504000000 28505423978 2734196224 2735620202
+85515000000 85519272066 28505000000 28506424022 2735196224 2736620246
+85518000000 85522272180 28506000000 28507424060 2736196224 2737620284
+85521000000 85525272341 28507000000 28508424113 2737196224 2738620337
+85524000000 85528272476 28508000000 28509424158 2738196224 2739620382
+85527000000 85531272619 28509000000 28510424206 2739196224 2740620430
+85530000000 85534272719 28510000000 28511424239 2740196224 2741620463
+85533000000 85537272953 28511000000 28512424317 2741196224 2742620541
+85536000000 85540273026 28512000000 28513424342 2742196224 2743620566
+85539000000 85543273147 28513000000 28514424382 2743196224 2744620606
+85542000000 85546273336 28514000000 28515424445 2744196224 2745620669
+85545000000 85549273490 28515000000 28516424496 2745196224 2746620720
+85548000000 85552273669 28516000000 28517424556 2746196224 2747620780
+85551000000 85555273815 28517000000 28518424605 2747196224 2748620829
+85554000000 85558273942 28518000000 28519424647 2748196224 2749620871
+85557000000 85561274116 28519000000 28520424705 2749196224 2750620929
+85560000000 85564274180 28520000000 28521424726 2750196224 2751620950
+85563000000 85567274387 28521000000 28522424795 2751196224 2752621019
+85566000000 85570274568 28522000000 28523424856 2752196224 2753621080
+85569000000 85573274717 28523000000 28524424905 2753196224 2754621129
+85572000000 85576274774 28524000000 28525424924 2754196224 2755621148
+85575000000 85579274970 28525000000 28526424990 2755196224 2756621214
+85578000000 85582275160 28526000000 28527425053 2756196224 2757621277
+85581000000 85585275305 28527000000 28528425101 2757196224 2758621325
+85584000000 85588275477 28528000000 28529425159 2758196224 2759621383
+85587000000 85591275610 28529000000 28530425203 2759196224 2760621427
+85590000000 85594275681 28530000000 28531425227 2760196224 2761621451
+85593000000 85597275907 28531000000 28532425302 2761196224 2762621526
+85596000000 85600276067 28532000000 28533425355 2762196224 2763621579
+85599000000 85603276199 28533000000 28534425399 2763196224 2764621623
+85602000000 85606276307 28534000000 28535425435 2764196224 2765621659
+85605000000 85609276518 28535000000 28536425506 2765196224 2766621730
+85608000000 85612276684 28536000000 28537425561 2766196224 2767621785
+85611000000 85615276795 28537000000 28538425598 2767196224 2768621822
+85614000000 85618276955 28538000000 28539425651 2768196224 2769621875
+85617000000 85621277067 28539000000 28540425689 2769196224 2770621913
+85620000000 85624277265 28540000000 28541425755 2770196224 2771621979
+85623000000 85627277355 28541000000 28542425785 2771196224 2772622009
+85626000000 85630277580 28542000000 28543425860 2772196224 2773622084
+85629000000 85633277712 28543000000 28544425904 2773196224 2774622128
+85632000000 85636277851 28544000000 28545425950 2774196224 2775622174
+85635000000 85639277902 28545000000 28546425967 2775196224 2776622191
+85638000000 85642278113 28546000000 28547426037 2776196224 2777622261
+85641000000 85645278322 28547000000 28548426107 2777196224 2778622331
+85644000000 85648278450 28548000000 28549426150 2778196224 2779622374
+85647000000 85651278593 28549000000 28550426197 2779196224 2780622421
+85650000000 85654278764 28550000000 28551426254 2780196224 2781622478
+85653000000 85657278861 28551000000 28552426287 2781196224 2782622511
+85656000000 85660279074 28552000000 28553426358 2782196224 2783622582
+85659000000 85663279204 28553000000 28554426401 2783196224 2784622625
+85662000000 85666279354 28554000000 28555426451 2784196224 2785622675
+85665000000 85669279514 28555000000 28556426504 2785196224 2786622728
+85668000000 85672279610 28556000000 28557426536 2786196224 2787622760
+85671000000 85675279798 28557000000 28558426599 2787196224 2788622823
+85674000000 85678279966 28558000000 28559426655 2788196224 2789622879
+85677000000 85681280102 28559000000 28560426700 2789196224 2790622924
+85680000000 85684280277 28560000000 28561426759 2790196224 2791622983
+85683000000 85687280399 28561000000 28562426799 2791196224 2792623023
+85686000000 85690280549 28562000000 28563426849 2792196224 2793623073
+85689000000 85693280697 28563000000 28564426899 2793196224 2794623123
+85692000000 85696280903 28564000000 28565426967 2794196224 2795623191
+85695000000 85699281017 28565000000 28566427005 2795196224 2796623229
+85698000000 85702281149 28566000000 28567427049 2796196224 2797623273
+85701000000 85705281323 28567000000 28568427107 2797196224 2798623331
+85704000000 85708281442 28568000000 28569427147 2798196224 2799623371
+85707000000 85711281566 28569000000 28570427188 2799196224 2800623412
+85710000000 85714281785 28570000000 28571427261 2800196224 2801623485
+85713000000 85717281921 28571000000 28572427307 2801196224 2802623531
+85716000000 85720282072 28572000000 28573427357 2802196224 2803623581
+85719000000 85723282232 28573000000 28574427410 2803196224 2804623634
+85722000000 85726282353 28574000000 28575427451 2804196224 2805623675
+85725000000 85729282434 28575000000 28576427478 2805196224 2806623702
+85728000000 85732282642 28576000000 28577427547 2806196224 2807623771
+85731000000 85735282797 28577000000 28578427599 2807196224 2808623823
+85734000000 85738282956 28578000000 28579427652 2808196224 2809623876
+85737000000 85741283108 28579000000 28580427702 2809196224 2810623926
+85740000000 85744283230 28580000000 28581427743 2810196224 2811623967
+85743000000 85747283408 28581000000 28582427802 2811196224 2812624026
+85746000000 85750283557 28582000000 28583427852 2812196224 2813624076
+85749000000 85753283685 28583000000 28584427895 2813196224 2814624119
+85752000000 85756283854 28584000000 28585427951 2814196224 2815624175
+85755000000 85759283974 28585000000 28586427991 2815196224 2816624215
+85758000000 85762283901 28586000000 28587427967 2816196224 2817624191
+85761000000 85765284224 28587000000 28588428074 2817196224 2818624298
+85764000000 85768284477 28588000000 28589428159 2818196224 2819624383
+85767000000 85771284587 28589000000 28590428195 2819196224 2820624419
+85770000000 85774284766 28590000000 28591428255 2820196224 2821624479
+85773000000 85777284814 28591000000 28592428271 2821196224 2822624495
+85776000000 85780285068 28592000000 28593428356 2822196224 2823624580
+85779000000 85783285187 28593000000 28594428395 2823196224 2824624619
+85782000000 85786285358 28594000000 28595428452 2824196224 2825624676
+85785000000 85789285505 28595000000 28596428501 2825196224 2826624725
+85788000000 85792285658 28596000000 28597428552 2826196224 2827624776
+85791000000 85795285804 28597000000 28598428601 2827196224 2828624825
+85794000000 85798285948 28598000000 28599428649 2828196224 2829624873
+85797000000 85801286111 28599000000 28600428703 2829196224 2830624927
+85800000000 85804286263 28600000000 28601428754 2830196224 2831624978
+85803000000 85807286417 28601000000 28602428805 2831196224 2832625029
+85806000000 85810286537 28602000000 28603428845 2832196224 2833625069
+85809000000 85813286746 28603000000 28604428915 2833196224 2834625139
+85812000000 85816286876 28604000000 28605428958 2834196224 2835625182
+85815000000 85819286990 28605000000 28606428996 2835196224 2836625220
+85818000000 85822287151 28606000000 28607429050 2836196224 2837625274
+85821000000 85825287286 28607000000 28608429095 2837196224 2838625319
+85824000000 85828287429 28608000000 28609429143 2838196224 2839625367
+85827000000 85831287529 28609000000 28610429176 2839196224 2840625400
+85830000000 85834287763 28610000000 28611429254 2840196224 2841625478
+85833000000 85837287836 28611000000 28612429278 2841196224 2842625502
+85836000000 85840287957 28612000000 28613429319 2842196224 2843625543
+85839000000 85843288146 28613000000 28614429382 2843196224 2844625606
+85842000000 85846288300 28614000000 28615429433 2844196224 2845625657
+85845000000 85849288479 28615000000 28616429493 2845196224 2846625717
+85848000000 85852288625 28616000000 28617429541 2846196224 2847625765
+85851000000 85855288752 28617000000 28618429584 2847196224 2848625808
+85854000000 85858288926 28618000000 28619429642 2848196224 2849625866
+85857000000 85861288990 28619000000 28620429663 2849196224 2850625887
+85860000000 85864289197 28620000000 28621429732 2850196224 2851625956
+85863000000 85867289378 28621000000 28622429792 2851196224 2852626016
+85866000000 85870289527 28622000000 28623429842 2852196224 2853626066
+85869000000 85873289584 28623000000 28624429861 2853196224 2854626085
+85872000000 85876289780 28624000000 28625429926 2854196224 2855626150
+85875000000 85879289970 28625000000 28626429990 2855196224 2856626214
+85878000000 85882290115 28626000000 28627430038 2856196224 2857626262
+85881000000 85885290287 28627000000 28628430095 2857196224 2858626319
+85884000000 85888290420 28628000000 28629430140 2858196224 2859626364
+85887000000 85891290491 28629000000 28630430163 2859196224 2860626387
+85890000000 85894290717 28630000000 28631430239 2860196224 2861626463
+85893000000 85897290877 28631000000 28632430292 2861196224 2862626516
+85896000000 85900291009 28632000000 28633430336 2862196224 2863626560
+85899000000 85903291117 28633000000 28634430372 2863196224 2864626596
+85902000000 85906291328 28634000000 28635430442 2864196224 2865626666
+85905000000 85909291494 28635000000 28636430498 2865196224 2866626722
+85908000000 85912291605 28636000000 28637430535 2866196224 2867626759
+85911000000 85915291765 28637000000 28638430588 2867196224 2868626812
+85914000000 85918291877 28638000000 28639430625 2868196224 2869626849
+85917000000 85921292075 28639000000 28640430691 2869196224 2870626915
+85920000000 85924292165 28640000000 28641430721 2870196224 2871626945
+85923000000 85927292390 28641000000 28642430796 2871196224 2872627020
+85926000000 85930292522 28642000000 28643430840 2872196224 2873627064
+85929000000 85933292661 28643000000 28644430887 2873196224 2874627111
+85932000000 85936292712 28644000000 28645430904 2874196224 2875627128
+85935000000 85939292923 28645000000 28646430974 2875196224 2876627198
+85938000000 85942293132 28646000000 28647431044 2876196224 2877627268
+85941000000 85945293260 28647000000 28648431086 2877196224 2878627310
+85944000000 85948293403 28648000000 28649431134 2878196224 2879627358
+85947000000 85951293574 28649000000 28650431191 2879196224 2880627415
+85950000000 85954293671 28650000000 28651431223 2880196224 2881627447
+85953000000 85957293884 28651000000 28652431294 2881196224 2882627518
+85956000000 85960294014 28652000000 28653431338 2882196224 2883627562
+85959000000 85963294164 28653000000 28654431388 2883196224 2884627612
+85962000000 85966294324 28654000000 28655431441 2884196224 2885627665
+85965000000 85969294420 28655000000 28656431473 2885196224 2886627697
+85968000000 85972294608 28656000000 28657431536 2886196224 2887627760
+85971000000 85975294776 28657000000 28658431592 2887196224 2888627816
+85974000000 85978294912 28658000000 28659431637 2888196224 2889627861
+85977000000 85981295087 28659000000 28660431695 2889196224 2890627919
+85980000000 85984295209 28660000000 28661431736 2890196224 2891627960
+85983000000 85987295359 28661000000 28662431786 2891196224 2892628010
+85986000000 85990295507 28662000000 28663431835 2892196224 2893628059
+85989000000 85993295713 28663000000 28664431904 2893196224 2894628128
+85992000000 85996295827 28664000000 28665431942 2894196224 2895628166
+85995000000 85999295959 28665000000 28666431986 2895196224 2896628210
+85998000000 86002296133 28666000000 28667432044 2896196224 2897628268
+86001000000 86005296252 28667000000 28668432084 2897196224 2898628308
+86004000000 86008296376 28668000000 28669432125 2898196224 2899628349
+86007000000 86011296595 28669000000 28670432198 2899196224 2900628422
+86010000000 86014296731 28670000000 28671432243 2900196224 2901628467
+86013000000 86017296882 28671000000 28672432294 2901196224 2902628518
+86016000000 86020297042 28672000000 28673432347 2902196224 2903628571
+86019000000 86023297163 28673000000 28674432387 2903196224 2904628611
+86022000000 86026297244 28674000000 28675432414 2904196224 2905628638
+86025000000 86029297452 28675000000 28676432484 2905196224 2906628708
+86028000000 86032297607 28676000000 28677432535 2906196224 2907628759
+86031000000 86035297766 28677000000 28678432588 2907196224 2908628812
+86034000000 86038297918 28678000000 28679432639 2908196224 2909628863
+86037000000 86041298040 28679000000 28680432680 2909196224 2910628904
+86040000000 86044298218 28680000000 28681432739 2910196224 2911628963
+86043000000 86047298367 28681000000 28682432789 2911196224 2912629013
+86046000000 86050298495 28682000000 28683432831 2912196224 2913629055
+86049000000 86053298664 28683000000 28684432888 2913196224 2914629112
+86052000000 86056298784 28684000000 28685432928 2914196224 2915629152
+86055000000 86059298711 28685000000 28686432903 2915196224 2916629127
+86058000000 86062299034 28686000000 28687433011 2916196224 2917629235
+86061000000 86065299287 28687000000 28688433095 2917196224 2918629319
+86064000000 86068299397 28688000000 28689433132 2918196224 2919629356
+86067000000 86071299576 28689000000 28690433192 2919196224 2920629416
+86070000000 86074299624 28690000000 28691433208 2920196224 2921629432
+86073000000 86077299878 28691000000 28692433292 2921196224 2922629516
+86076000000 86080299997 28692000000 28693433332 2922196224 2923629556
+86079000000 86083300168 28693000000 28694433389 2923196224 2924629613
+86082000000 86086300315 28694000000 28695433438 2924196224 2925629662
+86085000000 86089300468 28695000000 28696433489 2925196224 2926629713
+86088000000 86092300614 28696000000 28697433538 2926196224 2927629762
+86091000000 86095300758 28697000000 28698433586 2927196224 2928629810
+86094000000 86098300921 28698000000 28699433640 2928196224 2929629864
+86097000000 86101301073 28699000000 28700433691 2929196224 2930629915
+86100000000 86104301227 28700000000 28701433742 2930196224 2931629966
+86103000000 86107301347 28701000000 28702433782 2931196224 2932630006
+86106000000 86110301556 28702000000 28703433852 2932196224 2933630076
+86109000000 86113301686 28703000000 28704433895 2933196224 2934630119
+86112000000 86116301800 28704000000 28705433933 2934196224 2935630157
+86115000000 86119301961 28705000000 28706433987 2935196224 2936630211
+86118000000 86122302096 28706000000 28707434032 2936196224 2937630256
+86121000000 86125302239 28707000000 28708434079 2937196224 2938630303
+86124000000 86128302339 28708000000 28709434113 2938196224 2939630337
+86127000000 86131302573 28709000000 28710434191 2939196224 2940630415
+86130000000 86134302646 28710000000 28711434215 2940196224 2941630439
+86133000000 86137302767 28711000000 28712434255 2941196224 2942630479
+86136000000 86140302956 28712000000 28713434318 2942196224 2943630542
+86139000000 86143303110 28713000000 28714434370 2943196224 2944630594
+86142000000 86146303289 28714000000 28715434429 2944196224 2945630653
+86145000000 86149303435 28715000000 28716434478 2945196224 2946630702
+86148000000 86152303562 28716000000 28717434520 2946196224 2947630744
+86151000000 86155303736 28717000000 28718434578 2947196224 2948630802
+86154000000 86158303800 28718000000 28719434600 2948196224 2949630824
+86157000000 86161304007 28719000000 28720434669 2949196224 2950630893
+86160000000 86164304188 28720000000 28721434729 2950196224 2951630953
+86163000000 86167304337 28721000000 28722434779 2951196224 2952631003
+86166000000 86170304394 28722000000 28723434798 2952196224 2953631022
+86169000000 86173304590 28723000000 28724434863 2953196224 2954631087
+86172000000 86176304780 28724000000 28725434926 2954196224 2955631150
+86175000000 86179304925 28725000000 28726434975 2955196224 2956631199
+86178000000 86182305097 28726000000 28727435032 2956196224 2957631256
+86181000000 86185305230 28727000000 28728435076 2957196224 2958631300
+86184000000 86188305301 28728000000 28729435100 2958196224 2959631324
+86187000000 86191305527 28729000000 28730435175 2959196224 2960631399
+86190000000 86194305687 28730000000 28731435229 2960196224 2961631453
+86193000000 86197305819 28731000000 28732435273 2961196224 2962631497
+86196000000 86200305927 28732000000 28733435309 2962196224 2963631533
+86199000000 86203306138 28733000000 28734435379 2963196224 2964631603
+86202000000 86206306304 28734000000 28735435434 2964196224 2965631658
+86205000000 86209306415 28735000000 28736435471 2965196224 2966631695
+86208000000 86212306575 28736000000 28737435525 2966196224 2967631749
+86211000000 86215306687 28737000000 28738435562 2967196224 2968631786
+86214000000 86218306885 28738000000 28739435628 2968196224 2969631852
+86217000000 86221306975 28739000000 28740435658 2969196224 2970631882
+86220000000 86224307200 28740000000 28741435733 2970196224 2971631957
+86223000000 86227307332 28741000000 28742435777 2971196224 2972632001
+86226000000 86230307471 28742000000 28743435823 2972196224 2973632047
+86229000000 86233307522 28743000000 28744435840 2973196224 2974632064
+86232000000 86236307733 28744000000 28745435911 2974196224 2975632135
+86235000000 86239307942 28745000000 28746435980 2975196224 2976632204
+86238000000 86242308070 28746000000 28747436023 2976196224 2977632247
+86241000000 86245308213 28747000000 28748436071 2977196224 2978632295
+86244000000 86248308384 28748000000 28749436128 2978196224 2979632352
+86247000000 86251308481 28749000000 28750436160 2979196224 2980632384
+86250000000 86254308694 28750000000 28751436231 2980196224 2981632455
+86253000000 86257308824 28751000000 28752436274 2981196224 2982632498
+86256000000 86260308974 28752000000 28753436324 2982196224 2983632548
+86259000000 86263309134 28753000000 28754436378 2983196224 2984632602
+86262000000 86266309230 28754000000 28755436410 2984196224 2985632634
+86265000000 86269309418 28755000000 28756436472 2985196224 2986632696
+86268000000 86272309586 28756000000 28757436528 2986196224 2987632752
+86271000000 86275309722 28757000000 28758436574 2987196224 2988632798
+86274000000 86278309897 28758000000 28759436632 2988196224 2989632856
+86277000000 86281310019 28759000000 28760436673 2989196224 2990632897
+86280000000 86284310169 28760000000 28761436723 2990196224 2991632947
+86283000000 86287310317 28761000000 28762436772 2991196224 2992632996
+86286000000 86290310523 28762000000 28763436841 2992196224 2993633065
+86289000000 86293310637 28763000000 28764436879 2993196224 2994633103
+86292000000 86296310769 28764000000 28765436923 2994196224 2995633147
+86295000000 86299310943 28765000000 28766436981 2995196224 2996633205
+86298000000 86302311062 28766000000 28767437020 2996196224 2997633244
+86301000000 86305311186 28767000000 28768437062 2997196224 2998633286
+86304000000 86308311405 28768000000 28769437135 2998196224 2999633359
+86307000000 86311311541 28769000000 28770437180 2999196224 3000633404
+86310000000 86314311692 28770000000 28771437230 3000196224 3001633454
+86313000000 86317311852 28771000000 28772437284 3001196224 3002633508
+86316000000 86320311973 28772000000 28773437324 3002196224 3003633548
+86319000000 86323312054 28773000000 28774437351 3003196224 3004633575
+86322000000 86326312262 28774000000 28775437420 3004196224 3005633644
+86325000000 86329312417 28775000000 28776437472 3005196224 3006633696
+86328000000 86332312576 28776000000 28777437525 3006196224 3007633749
+86331000000 86335312728 28777000000 28778437576 3007196224 3008633800
+86334000000 86338312850 28778000000 28779437616 3008196224 3009633840
+86337000000 86341313028 28779000000 28780437676 3009196224 3010633900
+86340000000 86344313177 28780000000 28781437725 3010196224 3011633949
+86343000000 86347313305 28781000000 28782437768 3011196224 3012633992
+86346000000 86350313474 28782000000 28783437824 3012196224 3013634048
+86349000000 86353313594 28783000000 28784437864 3013196224 3014634088
+86352000000 86356313521 28784000000 28785437840 3014196224 3015634064
+86355000000 86359313844 28785000000 28786437948 3015196224 3016634172
+86358000000 86362314097 28786000000 28787438032 3016196224 3017634256
+86361000000 86365314207 28787000000 28788438069 3017196224 3018634293
+86364000000 86368314386 28788000000 28789438128 3018196224 3019634352
+86367000000 86371314434 28789000000 28790438144 3019196224 3020634368
+86370000000 86374314688 28790000000 28791438229 3020196224 3021634453
+86373000000 86377314807 28791000000 28792438269 3021196224 3022634493
+86376000000 86380314978 28792000000 28793438326 3022196224 3023634550
+86379000000 86383315125 28793000000 28794438375 3023196224 3024634599
+86382000000 86386315278 28794000000 28795438426 3024196224 3025634650
+86385000000 86389315424 28795000000 28796438474 3025196224 3026634698
+86388000000 86392315568 28796000000 28797438522 3026196224 3027634746
+86391000000 86395315731 28797000000 28798438577 3027196224 3028634801
+86394000000 86398315883 28798000000 28799438627 3028196224 3029634851
+86397000000 86401316037 28799000000 28800438679 3029196224 3030634903
+86400000000 86404316157 28800000000 28801438719 3030196224 3031634943
+86403000000 86407316366 28801000000 28802438788 3031196224 3032635012
+86406000000 86410316496 28802000000 28803438832 3032196224 3033635056
+86409000000 86413316610 28803000000 28804438870 3033196224 3034635094
+86412000000 86416316771 28804000000 28805438923 3034196224 3035635147
+86415000000 86419316906 28805000000 28806438968 3035196224 3036635192
+86418000000 86422317049 28806000000 28807439016 3036196224 3037635240
+86421000000 86425317149 28807000000 28808439049 3037196224 3038635273
+86424000000 86428317383 28808000000 28809439127 3038196224 3039635351
+86427000000 86431317456 28809000000 28810439152 3039196224 3040635376
+86430000000 86434317577 28810000000 28811439192 3040196224 3041635416
+86433000000 86437317766 28811000000 28812439255 3041196224 3042635479
+86436000000 86440317920 28812000000 28813439306 3042196224 3043635530
+86439000000 86443318099 28813000000 28814439366 3043196224 3044635590
+86442000000 86446318245 28814000000 28815439415 3044196224 3045635639
+86445000000 86449318372 28815000000 28816439457 3045196224 3046635681
+86448000000 86452318546 28816000000 28817439515 3046196224 3047635739
+86451000000 86455318610 28817000000 28818439536 3047196224 3048635760
+86454000000 86458318817 28818000000 28819439605 3048196224 3049635829
+86457000000 86461318998 28819000000 28820439666 3049196224 3050635890
+86460000000 86464319147 28820000000 28821439715 3050196224 3051635939
+86463000000 86467319204 28821000000 28822439734 3051196224 3052635958
+86466000000 86470319400 28822000000 28823439800 3052196224 3053636024
+86469000000 86473319590 28823000000 28824439863 3053196224 3054636087
+86472000000 86476319735 28824000000 28825439911 3054196224 3055636135
+86475000000 86479319907 28825000000 28826439969 3055196224 3056636193
+86478000000 86482320040 28826000000 28827440013 3056196224 3057636237
+86481000000 86485320111 28827000000 28828440037 3057196224 3058636261
+86484000000 86488320337 28828000000 28829440112 3058196224 3059636336
+86487000000 86491320497 28829000000 28830440165 3059196224 3060636389
+86490000000 86494320629 28830000000 28831440209 3060196224 3061636433
+86493000000 86497320737 28831000000 28832440245 3061196224 3062636469
+86496000000 86500320948 28832000000 28833440316 3062196224 3063636540
+86499000000 86503321114 28833000000 28834440371 3063196224 3064636595
+86502000000 86506321225 28834000000 28835440408 3064196224 3065636632
+86505000000 86509321385 28835000000 28836440461 3065196224 3066636685
+86508000000 86512321497 28836000000 28837440499 3066196224 3067636723
+86511000000 86515321695 28837000000 28838440565 3067196224 3068636789
+86514000000 86518321785 28838000000 28839440595 3068196224 3069636819
+86517000000 86521322010 28839000000 28840440670 3069196224 3070636894
+86520000000 86524322142 28840000000 28841440714 3070196224 3071636938
+86523000000 86527322281 28841000000 28842440760 3071196224 3072636984
+86526000000 86530322332 28842000000 28843440777 3072196224 3073637001
+86529000000 86533322543 28843000000 28844440847 3073196224 3074637071
+86532000000 86536322752 28844000000 28845440917 3074196224 3075637141
+86535000000 86539322880 28845000000 28846440960 3075196224 3076637184
+86538000000 86542323023 28846000000 28847441007 3076196224 3077637231
+86541000000 86545323194 28847000000 28848441064 3077196224 3078637288
+86544000000 86548323291 28848000000 28849441097 3078196224 3079637321
+86547000000 86551323504 28849000000 28850441168 3079196224 3080637392
+86550000000 86554323634 28850000000 28851441211 3080196224 3081637435
+86553000000 86557323784 28851000000 28852441261 3081196224 3082637485
+86556000000 86560323944 28852000000 28853441314 3082196224 3083637538
+86559000000 86563324040 28853000000 28854441346 3083196224 3084637570
+86562000000 86566324228 28854000000 28855441409 3084196224 3085637633
+86565000000 86569324396 28855000000 28856441465 3085196224 3086637689
+86568000000 86572324532 28856000000 28857441510 3086196224 3087637734
+86571000000 86575324707 28857000000 28858441569 3087196224 3088637793
+86574000000 86578324829 28858000000 28859441609 3088196224 3089637833
+86577000000 86581324979 28859000000 28860441659 3089196224 3090637883
+86580000000 86584325127 28860000000 28861441709 3090196224 3091637933
+86583000000 86587325333 28861000000 28862441777 3091196224 3092638001
+86586000000 86590325447 28862000000 28863441815 3092196224 3093638039
+86589000000 86593325579 28863000000 28864441859 3093196224 3094638083
+86592000000 86596325753 28864000000 28865441917 3094196224 3095638141
+86595000000 86599325872 28865000000 28866441957 3095196224 3096638181
+86598000000 86602325996 28866000000 28867441998 3096196224 3097638222
+86601000000 86605326215 28867000000 28868442071 3097196224 3098638295
+86604000000 86608326351 28868000000 28869442117 3098196224 3099638341
+86607000000 86611326502 28869000000 28870442167 3099196224 3100638391
+86610000000 86614326662 28870000000 28871442220 3100196224 3101638444
+86613000000 86617326783 28871000000 28872442261 3101196224 3102638485
+86616000000 86620326864 28872000000 28873442288 3102196224 3103638512
+86619000000 86623327072 28873000000 28874442357 3103196224 3104638581
+86622000000 86626327227 28874000000 28875442409 3104196224 3105638633
+86625000000 86629327386 28875000000 28876442462 3105196224 3106638686
+86628000000 86632327538 28876000000 28877442512 3106196224 3107638736
+86631000000 86635327660 28877000000 28878442553 3107196224 3108638777
+86634000000 86638327838 28878000000 28879442612 3108196224 3109638836
+86637000000 86641327987 28879000000 28880442662 3109196224 3110638886
+86640000000 86644328115 28880000000 28881442705 3110196224 3111638929
+86643000000 86647328284 28881000000 28882442761 3111196224 3112638985
+86646000000 86650328404 28882000000 28883442801 3112196224 3113639025
+86649000000 86653328331 28883000000 28884442777 3113196224 3114639001
+86652000000 86656328654 28884000000 28885442884 3114196224 3115639108
+86655000000 86659328907 28885000000 28886442969 3115196224 3116639193
+86658000000 86662329017 28886000000 28887443005 3116196224 3117639229
+86661000000 86665329196 28887000000 28888443065 3117196224 3118639289
+86664000000 86668329244 28888000000 28889443081 3118196224 3119639305
+86667000000 86671329498 28889000000 28890443166 3119196224 3120639390
+86670000000 86674329617 28890000000 28891443205 3120196224 3121639429
+86673000000 86677329788 28891000000 28892443262 3121196224 3122639486
+86676000000 86680329935 28892000000 28893443311 3122196224 3123639535
+86679000000 86683330088 28893000000 28894443362 3123196224 3124639586
+86682000000 86686330234 28894000000 28895443411 3124196224 3125639635
+86685000000 86689330378 28895000000 28896443459 3125196224 3126639683
+86688000000 86692330541 28896000000 28897443513 3126196224 3127639737
+86691000000 86695330693 28897000000 28898443564 3127196224 3128639788
+86694000000 86698330847 28898000000 28899443615 3128196224 3129639839
+86697000000 86701330967 28899000000 28900443655 3129196224 3130639879
+86700000000 86704331176 28900000000 28901443725 3130196224 3131639949
+86703000000 86707331306 28901000000 28902443768 3131196224 3132639992
+86706000000 86710331420 28902000000 28903443806 3132196224 3133640030
+86709000000 86713331581 28903000000 28904443860 3133196224 3134640084
+86712000000 86716331716 28904000000 28905443905 3134196224 3135640129
+86715000000 86719331859 28905000000 28906443953 3135196224 3136640177
+86718000000 86722331959 28906000000 28907443986 3136196224 3137640210
+86721000000 86725332193 28907000000 28908444064 3137196224 3138640288
+86724000000 86728332266 28908000000 28909444088 3138196224 3139640312
+86727000000 86731332387 28909000000 28910444129 3139196224 3140640353
+86730000000 86734332576 28910000000 28911444192 3140196224 3141640416
+86733000000 86737332730 28911000000 28912444243 3141196224 3142640467
+86736000000 86740332909 28912000000 28913444303 3142196224 3143640527
+86739000000 86743333055 28913000000 28914444351 3143196224 3144640575
+86742000000 86746333182 28914000000 28915444394 3144196224 3145640618
+86745000000 86749333356 28915000000 28916444452 3145196224 3146640676
+86748000000 86752333420 28916000000 28917444473 3146196224 3147640697
+86751000000 86755333627 28917000000 28918444542 3147196224 3148640766
+86754000000 86758333808 28918000000 28919444602 3148196224 3149640826
+86757000000 86761333957 28919000000 28920444652 3149196224 3150640876
+86760000000 86764334014 28920000000 28921444671 3150196224 3151640895
+86763000000 86767334210 28921000000 28922444736 3151196224 3152640960
+86766000000 86770334400 28922000000 28923444800 3152196224 3153641024
+86769000000 86773334545 28923000000 28924444848 3153196224 3154641072
+86772000000 86776334717 28924000000 28925444905 3154196224 3155641129
+86775000000 86779334850 28925000000 28926444950 3155196224 3156641174
+86778000000 86782334921 28926000000 28927444973 3156196224 3157641197
+86781000000 86785335147 28927000000 28928445049 3157196224 3158641273
+86784000000 86788335307 28928000000 28929445102 3158196224 3159641326
+86787000000 86791335439 28929000000 28930445146 3159196224 3160641370
+86790000000 86794335547 28930000000 28931445182 3160196224 3161641406
+86793000000 86797335758 28931000000 28932445252 3161196224 3162641476
+86796000000 86800335924 28932000000 28933445308 3162196224 3163641532
+86799000000 86803336035 28933000000 28934445345 3163196224 3164641569
+86802000000 86806336195 28934000000 28935445398 3164196224 3165641622
+86805000000 86809336307 28935000000 28936445435 3165196224 3166641659
+86808000000 86812336505 28936000000 28937445501 3166196224 3167641725
+86811000000 86815336595 28937000000 28938445531 3167196224 3168641755
+86814000000 86818336820 28938000000 28939445606 3168196224 3169641830
+86817000000 86821336952 28939000000 28940445650 3169196224 3170641874
+86820000000 86824337091 28940000000 28941445697 3170196224 3171641921
+86823000000 86827337142 28941000000 28942445714 3171196224 3172641938
+86826000000 86830337353 28942000000 28943445784 3172196224 3173642008
+86829000000 86833337562 28943000000 28944445854 3173196224 3174642078
+86832000000 86836337690 28944000000 28945445896 3174196224 3175642120
+86835000000 86839337833 28945000000 28946445944 3175196224 3176642168
+86838000000 86842338004 28946000000 28947446001 3176196224 3177642225
+86841000000 86845338101 28947000000 28948446033 3177196224 3178642257
+86844000000 86848338314 28948000000 28949446104 3178196224 3179642328
+86847000000 86851338444 28949000000 28950446148 3179196224 3180642372
+86850000000 86854338594 28950000000 28951446198 3180196224 3181642422
+86853000000 86857338754 28951000000 28952446251 3181196224 3182642475
+86856000000 86860338850 28952000000 28953446283 3182196224 3183642507
+86859000000 86863339038 28953000000 28954446346 3183196224 3184642570
+86862000000 86866339206 28954000000 28955446402 3184196224 3185642626
+86865000000 86869339342 28955000000 28956446447 3185196224 3186642671
+86868000000 86872339517 28956000000 28957446505 3186196224 3187642729
+86871000000 86875339639 28957000000 28958446546 3187196224 3188642770
+86874000000 86878339789 28958000000 28959446596 3188196224 3189642820
+86877000000 86881339937 28959000000 28960446645 3189196224 3190642869
+86880000000 86884340143 28960000000 28961446714 3190196224 3191642938
+86883000000 86887340257 28961000000 28962446752 3191196224 3192642976
+86886000000 86890340389 28962000000 28963446796 3192196224 3193643020
+86889000000 86893340563 28963000000 28964446854 3193196224 3194643078
+86892000000 86896340682 28964000000 28965446894 3194196224 3195643118
+86895000000 86899340806 28965000000 28966446935 3195196224 3196643159
+86898000000 86902341025 28966000000 28967447008 3196196224 3197643232
+86901000000 86905341161 28967000000 28968447053 3197196224 3198643277
+86904000000 86908341312 28968000000 28969447104 3198196224 3199643328
+86907000000 86911341472 28969000000 28970447157 3199196224 3200643381
+86910000000 86914341593 28970000000 28971447197 3200196224 3201643421
+86913000000 86917341674 28971000000 28972447224 3201196224 3202643448
+86916000000 86920341882 28972000000 28973447294 3202196224 3203643518
+86919000000 86923342037 28973000000 28974447345 3203196224 3204643569
+86922000000 86926342196 28974000000 28975447398 3204196224 3205643622
+86925000000 86929342348 28975000000 28976447449 3205196224 3206643673
+86928000000 86932342470 28976000000 28977447490 3206196224 3207643714
+86931000000 86935342648 28977000000 28978447549 3207196224 3208643773
+86934000000 86938342797 28978000000 28979447599 3208196224 3209643823
+86937000000 86941342925 28979000000 28980447641 3209196224 3210643865
+86940000000 86944343094 28980000000 28981447698 3210196224 3211643922
+86943000000 86947343214 28981000000 28982447738 3211196224 3212643962
+86946000000 86950343141 28982000000 28983447713 3212196224 3213643937
+86949000000 86953343464 28983000000 28984447821 3213196224 3214644045
+86952000000 86956343717 28984000000 28985447905 3214196224 3215644129
+86955000000 86959343827 28985000000 28986447942 3215196224 3216644166
+86958000000 86962344006 28986000000 28987448002 3216196224 3217644226
+86961000000 86965344054 28987000000 28988448018 3217196224 3218644242
+86964000000 86968344308 28988000000 28989448102 3218196224 3219644326
+86967000000 86971344427 28989000000 28990448142 3219196224 3220644366
+86970000000 86974344598 28990000000 28991448199 3220196224 3221644423
+86973000000 86977344745 28991000000 28992448248 3221196224 3222644472
+86976000000 86980344898 28992000000 28993448299 3222196224 3223644523
+86979000000 86983345044 28993000000 28994448348 3223196224 3224644572
+86982000000 86986345188 28994000000 28995448396 3224196224 3225644620
+86985000000 86989345351 28995000000 28996448450 3225196224 3226644674
+86988000000 86992345503 28996000000 28997448501 3226196224 3227644725
+86991000000 86995345657 28997000000 28998448552 3227196224 3228644776
+86994000000 86998345777 28998000000 28999448592 3228196224 3229644816
+86997000000 87001345986 28999000000 29000448662 3229196224 3230644886
+87000000000 87004346116 29000000000 29001448705 3230196224 3231644929
+87003000000 87007346230 29001000000 29002448743 3231196224 3232644967
+87006000000 87010346391 29002000000 29003448797 3232196224 3233645021
+87009000000 87013346526 29003000000 29004448842 3233196224 3234645066
+87012000000 87016346669 29004000000 29005448889 3234196224 3235645113
+87015000000 87019346769 29005000000 29006448923 3235196224 3236645147
+87018000000 87022347003 29006000000 29007449001 3236196224 3237645225
+87021000000 87025347076 29007000000 29008449025 3237196224 3238645249
+87024000000 87028347197 29008000000 29009449065 3238196224 3239645289
+87027000000 87031347386 29009000000 29010449128 3239196224 3240645352
+87030000000 87034347540 29010000000 29011449180 3240196224 3241645404
+87033000000 87037347719 29011000000 29012449239 3241196224 3242645463
+87036000000 87040347865 29012000000 29013449288 3242196224 3243645512
+87039000000 87043347992 29013000000 29014449330 3243196224 3244645554
+87042000000 87046348166 29014000000 29015449388 3244196224 3245645612
+87045000000 87049348230 29015000000 29016449410 3245196224 3246645634
+87048000000 87052348437 29016000000 29017449479 3246196224 3247645703
+87051000000 87055348618 29017000000 29018449539 3247196224 3248645763
+87054000000 87058348767 29018000000 29019449589 3248196224 3249645813
+87057000000 87061348824 29019000000 29020449608 3249196224 3250645832
+87060000000 87064349020 29020000000 29021449673 3250196224 3251645897
+87063000000 87067349210 29021000000 29022449736 3251196224 3252645960
+87066000000 87070349355 29022000000 29023449785 3252196224 3253646009
+87069000000 87073349527 29023000000 29024449842 3253196224 3254646066
+87072000000 87076349660 29024000000 29025449886 3254196224 3255646110
+87075000000 87079349731 29025000000 29026449910 3255196224 3256646134
+87078000000 87082349957 29026000000 29027449985 3256196224 3257646209
+87081000000 87085350117 29027000000 29028450039 3257196224 3258646263
+87084000000 87088350249 29028000000 29029450083 3258196224 3259646307
+87087000000 87091350357 29029000000 29030450119 3259196224 3260646343
+87090000000 87094350568 29030000000 29031450189 3260196224 3261646413
+87093000000 87097350734 29031000000 29032450244 3261196224 3262646468
+87096000000 87100350845 29032000000 29033450281 3262196224 3263646505
+87099000000 87103351005 29033000000 29034450335 3263196224 3264646559
+87102000000 87106351117 29034000000 29035450372 3264196224 3265646596
+87105000000 87109351315 29035000000 29036450438 3265196224 3266646662
+87108000000 87112351405 29036000000 29037450468 3266196224 3267646692
+87111000000 87115351630 29037000000 29038450543 3267196224 3268646767
+87114000000 87118351762 29038000000 29039450587 3268196224 3269646811
+87117000000 87121351901 29039000000 29040450633 3269196224 3270646857
+87120000000 87124351952 29040000000 29041450650 3270196224 3271646874
+87123000000 87127352163 29041000000 29042450721 3271196224 3272646945
+87126000000 87130352372 29042000000 29043450790 3272196224 3273647014
+87129000000 87133352500 29043000000 29044450833 3273196224 3274647057
+87132000000 87136352643 29044000000 29045450881 3274196224 3275647105
+87135000000 87139352814 29045000000 29046450938 3275196224 3276647162
+87138000000 87142352911 29046000000 29047450970 3276196224 3277647194
+87141000000 87145353124 29047000000 29048451041 3277196224 3278647265
+87144000000 87148353254 29048000000 29049451084 3278196224 3279647308
+87147000000 87151353404 29049000000 29050451134 3279196224 3280647358
+87150000000 87154353564 29050000000 29051451188 3280196224 3281647412
+87153000000 87157353660 29051000000 29052451220 3281196224 3282647444
+87156000000 87160353848 29052000000 29053451282 3282196224 3283647506
+87159000000 87163354016 29053000000 29054451338 3283196224 3284647562
+87162000000 87166354152 29054000000 29055451384 3284196224 3285647608
+87165000000 87169354327 29055000000 29056451442 3285196224 3286647666
+87168000000 87172354449 29056000000 29057451483 3286196224 3287647707
+87171000000 87175354599 29057000000 29058451533 3287196224 3288647757
+87174000000 87178354747 29058000000 29059451582 3288196224 3289647806
+87177000000 87181354953 29059000000 29060451651 3289196224 3290647875
+87180000000 87184355067 29060000000 29061451689 3290196224 3291647913
+87183000000 87187355199 29061000000 29062451733 3291196224 3292647957
+87186000000 87190355373 29062000000 29063451791 3292196224 3293648015
+87189000000 87193355492 29063000000 29064451830 3293196224 3294648054
+87192000000 87196355616 29064000000 29065451872 3294196224 3295648096
+87195000000 87199355835 29065000000 29066451945 3295196224 3296648169
+87198000000 87202355971 29066000000 29067451990 3296196224 3297648214
+87201000000 87205356122 29067000000 29068452040 3297196224 3298648264
+87204000000 87208356282 29068000000 29069452094 3298196224 3299648318
+87207000000 87211356403 29069000000 29070452134 3299196224 3300648358
+87210000000 87214356484 29070000000 29071452161 3300196224 3301648385
+87213000000 87217356692 29071000000 29072452230 3301196224 3302648454
+87216000000 87220356847 29072000000 29073452282 3302196224 3303648506
+87219000000 87223357006 29073000000 29074452335 3303196224 3304648559
+87222000000 87226357158 29074000000 29075452386 3304196224 3305648610
+87225000000 87229357280 29075000000 29076452426 3305196224 3306648650
+87228000000 87232357458 29076000000 29077452486 3306196224 3307648710
+87231000000 87235357607 29077000000 29078452535 3307196224 3308648759
+87234000000 87238357735 29078000000 29079452578 3308196224 3309648802
+87237000000 87241357904 29079000000 29080452634 3309196224 3310648858
+87240000000 87244358024 29080000000 29081452674 3310196224 3311648898
+87243000000 87247357951 29081000000 29082452650 3311196224 3312648874
+87246000000 87250358274 29082000000 29083452758 3312196224 3313648982
+87249000000 87253358527 29083000000 29084452842 3313196224 3314649066
+87252000000 87256358637 29084000000 29085452879 3314196224 3315649103
+87255000000 87259358816 29085000000 29086452938 3315196224 3316649162
+87258000000 87262358864 29086000000 29087452954 3316196224 3317649178
+87261000000 87265359118 29087000000 29088453039 3317196224 3318649263
+87264000000 87268359237 29088000000 29089453079 3318196224 3319649303
+87267000000 87271359408 29089000000 29090453136 3319196224 3320649360
+87270000000 87274359555 29090000000 29091453185 3320196224 3321649409
+87273000000 87277359708 29091000000 29092453236 3321196224 3322649460
+87276000000 87280359854 29092000000 29093453284 3322196224 3323649508
+87279000000 87283359998 29093000000 29094453332 3323196224 3324649556
+87282000000 87286360161 29094000000 29095453387 3324196224 3325649611
+87285000000 87289360313 29095000000 29096453437 3325196224 3326649661
+87288000000 87292360467 29096000000 29097453489 3326196224 3327649713
+87291000000 87295360587 29097000000 29098453529 3327196224 3328649753
+87294000000 87298360796 29098000000 29099453598 3328196224 3329649822
+87297000000 87301360926 29099000000 29100453642 3329196224 3330649866
+87300000000 87304361040 29100000000 29101453680 3330196224 3331649904
+87303000000 87307361201 29101000000 29102453733 3331196224 3332649957
+87306000000 87310361336 29102000000 29103453778 3332196224 3333650002
+87309000000 87313361479 29103000000 29104453826 3333196224 3334650050
+87312000000 87316361579 29104000000 29105453859 3334196224 3335650083
+87315000000 87319361813 29105000000 29106453937 3335196224 3336650161
+87318000000 87322361886 29106000000 29107453962 3336196224 3337650186
+87321000000 87325362007 29107000000 29108454002 3337196224 3338650226
+87324000000 87328362196 29108000000 29109454065 3338196224 3339650289
+87327000000 87331362350 29109000000 29110454116 3339196224 3340650340
+87330000000 87334362529 29110000000 29111454176 3340196224 3341650400
+87333000000 87337362675 29111000000 29112454225 3341196224 3342650449
+87336000000 87340362802 29112000000 29113454267 3342196224 3343650491
+87339000000 87343362976 29113000000 29114454325 3343196224 3344650549
+87342000000 87346363040 29114000000 29115454346 3344196224 3345650570
+87345000000 87349363247 29115000000 29116454415 3345196224 3346650639
+87348000000 87352363428 29116000000 29117454476 3346196224 3347650700
+87351000000 87355363577 29117000000 29118454525 3347196224 3348650749
+87354000000 87358363634 29118000000 29119454544 3348196224 3349650768
+87357000000 87361363830 29119000000 29120454610 3349196224 3350650834
+87360000000 87364364020 29120000000 29121454673 3350196224 3351650897
+87363000000 87367364165 29121000000 29122454721 3351196224 3352650945
+87366000000 87370364337 29122000000 29123454779 3352196224 3353651003
+87369000000 87373364470 29123000000 29124454823 3353196224 3354651047
+87372000000 87376364541 29124000000 29125454847 3354196224 3355651071
+87375000000 87379364767 29125000000 29126454922 3355196224 3356651146
+87378000000 87382364927 29126000000 29127454975 3356196224 3357651199
+87381000000 87385365059 29127000000 29128455019 3357196224 3358651243
+87384000000 87388365167 29128000000 29129455055 3358196224 3359651279
+87387000000 87391365378 29129000000 29130455126 3359196224 3360651350
+87390000000 87394365544 29130000000 29131455181 3360196224 3361651405
+87393000000 87397365655 29131000000 29132455218 3361196224 3362651442
+87396000000 87400365815 29132000000 29133455271 3362196224 3363651495
+87399000000 87403365927 29133000000 29134455309 3363196224 3364651533
+87402000000 87406366125 29134000000 29135455375 3364196224 3365651599
+87405000000 87409366215 29135000000 29136455405 3365196224 3366651629
+87408000000 87412366440 29136000000 29137455480 3366196224 3367651704
+87411000000 87415366572 29137000000 29138455524 3367196224 3368651748
+87414000000 87418366711 29138000000 29139455570 3368196224 3369651794
+87417000000 87421366762 29139000000 29140455587 3369196224 3370651811
+87420000000 87424366973 29140000000 29141455657 3370196224 3371651881
+87423000000 87427367182 29141000000 29142455727 3371196224 3372651951
+87426000000 87430367310 29142000000 29143455770 3372196224 3373651994
+87429000000 87433367453 29143000000 29144455817 3373196224 3374652041
+87432000000 87436367624 29144000000 29145455874 3374196224 3375652098
+87435000000 87439367721 29145000000 29146455907 3375196224 3376652131
+87438000000 87442367934 29146000000 29147455978 3376196224 3377652202
+87441000000 87445368064 29147000000 29148456021 3377196224 3378652245
+87444000000 87448368214 29148000000 29149456071 3378196224 3379652295
+87447000000 87451368374 29149000000 29150456124 3379196224 3380652348
+87450000000 87454368470 29150000000 29151456156 3380196224 3381652380
+87453000000 87457368658 29151000000 29152456219 3381196224 3382652443
+87456000000 87460368826 29152000000 29153456275 3382196224 3383652499
+87459000000 87463368962 29153000000 29154456320 3383196224 3384652544
+87462000000 87466369137 29154000000 29155456379 3384196224 3385652603
+87465000000 87469369259 29155000000 29156456419 3385196224 3386652643
+87468000000 87472369409 29156000000 29157456469 3386196224 3387652693
+87471000000 87475369557 29157000000 29158456519 3387196224 3388652743
+87474000000 87478369763 29158000000 29159456587 3388196224 3389652811
+87477000000 87481369877 29159000000 29160456625 3389196224 3390652849
+87480000000 87484370009 29160000000 29161456669 3390196224 3391652893
+87483000000 87487370183 29161000000 29162456727 3391196224 3392652951
+87486000000 87490370302 29162000000 29163456767 3392196224 3393652991
+87489000000 87493370426 29163000000 29164456808 3393196224 3394653032
+87492000000 87496370645 29164000000 29165456881 3394196224 3395653105
+87495000000 87499370781 29165000000 29166456927 3395196224 3396653151
+87498000000 87502370932 29166000000 29167456977 3396196224 3397653201
+87501000000 87505371092 29167000000 29168457030 3397196224 3398653254
+87504000000 87508371213 29168000000 29169457071 3398196224 3399653295
+87507000000 87511371294 29169000000 29170457098 3399196224 3400653322
+87510000000 87514371502 29170000000 29171457167 3400196224 3401653391
+87513000000 87517371657 29171000000 29172457219 3401196224 3402653443
+87516000000 87520371816 29172000000 29173457272 3402196224 3403653496
+87519000000 87523371968 29173000000 29174457322 3403196224 3404653546
+87522000000 87526372090 29174000000 29175457363 3404196224 3405653587
+87525000000 87529372268 29175000000 29176457422 3405196224 3406653646
+87528000000 87532372417 29176000000 29177457472 3406196224 3407653696
+87531000000 87535372545 29177000000 29178457515 3407196224 3408653739
+87534000000 87538372714 29178000000 29179457571 3408196224 3409653795
+87537000000 87541372834 29179000000 29180457611 3409196224 3410653835
+87540000000 87544372761 29180000000 29181457587 3410196224 3411653811
+87543000000 87547373084 29181000000 29182457694 3411196224 3412653918
+87546000000 87550373337 29182000000 29183457779 3412196224 3413654003
+87549000000 87553373447 29183000000 29184457815 3413196224 3414654039
+87552000000 87556373626 29184000000 29185457875 3414196224 3415654099
+87555000000 87559373674 29185000000 29186457891 3415196224 3416654115
+87558000000 87562373928 29186000000 29187457976 3416196224 3417654200
+87561000000 87565374047 29187000000 29188458015 3417196224 3418654239
+87564000000 87568374218 29188000000 29189458072 3418196224 3419654296
+87567000000 87571374365 29189000000 29190458121 3419196224 3420654345
+87570000000 87574374518 29190000000 29191458172 3420196224 3421654396
+87573000000 87577374664 29191000000 29192458221 3421196224 3422654445
+87576000000 87580374808 29192000000 29193458269 3422196224 3423654493
+87579000000 87583374971 29193000000 29194458323 3423196224 3424654547
+87582000000 87586375123 29194000000 29195458374 3424196224 3425654598
+87585000000 87589375277 29195000000 29196458425 3425196224 3426654649
+87588000000 87592375397 29196000000 29197458465 3426196224 3427654689
+87591000000 87595375606 29197000000 29198458535 3427196224 3428654759
+87594000000 87598375736 29198000000 29199458578 3428196224 3429654802
+87597000000 87601375850 29199000000 29200458616 3429196224 3430654840
+87600000000 87604376011 29200000000 29201458670 3430196224 3431654894
+87603000000 87607376146 29201000000 29202458715 3431196224 3432654939
+87606000000 87610376289 29202000000 29203458763 3432196224 3433654987
+87609000000 87613376389 29203000000 29204458796 3433196224 3434655020
+87612000000 87616376623 29204000000 29205458874 3434196224 3435655098
+87615000000 87619376696 29205000000 29206458898 3435196224 3436655122
+87618000000 87622376817 29206000000 29207458939 3436196224 3437655163
+87621000000 87625377006 29207000000 29208459002 3437196224 3438655226
+87624000000 87628377160 29208000000 29209459053 3438196224 3439655277
+87627000000 87631377339 29209000000 29210459113 3439196224 3440655337
+87630000000 87634377485 29210000000 29211459161 3440196224 3441655385
+87633000000 87637377612 29211000000 29212459204 3441196224 3442655428
+87636000000 87640377786 29212000000 29213459262 3442196224 3443655486
+87639000000 87643377850 29213000000 29214459283 3443196224 3444655507
+87642000000 87646378057 29214000000 29215459352 3444196224 3445655576
+87645000000 87649378238 29215000000 29216459412 3445196224 3446655636
+87648000000 87652378387 29216000000 29217459462 3446196224 3447655686
+87651000000 87655378444 29217000000 29218459481 3447196224 3448655705
+87654000000 87658378640 29218000000 29219459546 3448196224 3449655770
+87657000000 87661378830 29219000000 29220459610 3449196224 3450655834
+87660000000 87664378975 29220000000 29221459658 3450196224 3451655882
+87663000000 87667379147 29221000000 29222459715 3451196224 3452655939
+87666000000 87670379280 29222000000 29223459760 3452196224 3453655984
+87669000000 87673379351 29223000000 29224459783 3453196224 3454656007
+87672000000 87676379577 29224000000 29225459859 3454196224 3455656083
+87675000000 87679379737 29225000000 29226459912 3455196224 3456656136
+87678000000 87682379869 29226000000 29227459956 3456196224 3457656180
+87681000000 87685379977 29227000000 29228459992 3457196224 3458656216
+87684000000 87688380188 29228000000 29229460062 3458196224 3459656286
+87687000000 87691380354 29229000000 29230460118 3459196224 3460656342
+87690000000 87694380465 29230000000 29231460155 3460196224 3461656379
+87693000000 87697380625 29231000000 29232460208 3461196224 3462656432
+87696000000 87700380737 29232000000 29233460245 3462196224 3463656469
+87699000000 87703380935 29233000000 29234460311 3463196224 3464656535
+87702000000 87706381025 29234000000 29235460341 3464196224 3465656565
+87705000000 87709381250 29235000000 29236460416 3465196224 3466656640
+87708000000 87712381382 29236000000 29237460460 3466196224 3467656684
+87711000000 87715381521 29237000000 29238460507 3467196224 3468656731
+87714000000 87718381572 29238000000 29239460524 3468196224 3469656748
+87717000000 87721381783 29239000000 29240460594 3469196224 3470656818
+87720000000 87724381992 29240000000 29241460664 3470196224 3471656888
+87723000000 87727382120 29241000000 29242460706 3471196224 3472656930
+87726000000 87730382263 29242000000 29243460754 3472196224 3473656978
+87729000000 87733382434 29243000000 29244460811 3473196224 3474657035
+87732000000 87736382531 29244000000 29245460843 3474196224 3475657067
+87735000000 87739382744 29245000000 29246460914 3475196224 3476657138
+87738000000 87742382874 29246000000 29247460958 3476196224 3477657182
+87741000000 87745383024 29247000000 29248461008 3477196224 3478657232
+87744000000 87748383184 29248000000 29249461061 3478196224 3479657285
+87747000000 87751383280 29249000000 29250461093 3479196224 3480657317
+87750000000 87754383468 29250000000 29251461156 3480196224 3481657380
+87753000000 87757383636 29251000000 29252461212 3481196224 3482657436
+87756000000 87760383772 29252000000 29253461257 3482196224 3483657481
+87759000000 87763383947 29253000000 29254461315 3483196224 3484657539
+87762000000 87766384069 29254000000 29255461356 3484196224 3485657580
+87765000000 87769384219 29255000000 29256461406 3485196224 3486657630
+87768000000 87772384367 29256000000 29257461455 3486196224 3487657679
+87771000000 87775384573 29257000000 29258461524 3487196224 3488657748
+87774000000 87778384687 29258000000 29259461562 3488196224 3489657786
+87777000000 87781384819 29259000000 29260461606 3489196224 3490657830
+87780000000 87784384993 29260000000 29261461664 3490196224 3491657888
+87783000000 87787385112 29261000000 29262461704 3491196224 3492657928
+87786000000 87790385236 29262000000 29263461745 3492196224 3493657969
+87789000000 87793385455 29263000000 29264461818 3493196224 3494658042
+87792000000 87796385591 29264000000 29265461863 3494196224 3495658087
+87795000000 87799385742 29265000000 29266461914 3495196224 3496658138
+87798000000 87802385902 29266000000 29267461967 3496196224 3497658191
+87801000000 87805386023 29267000000 29268462007 3497196224 3498658231
+87804000000 87808386104 29268000000 29269462034 3498196224 3499658258
+87807000000 87811386312 29269000000 29270462104 3499196224 3500658328
+87810000000 87814386467 29270000000 29271462155 3500196224 3501658379
+87813000000 87817386626 29271000000 29272462208 3501196224 3502658432
+87816000000 87820386778 29272000000 29273462259 3502196224 3503658483
+87819000000 87823386900 29273000000 29274462300 3503196224 3504658524
+87822000000 87826387078 29274000000 29275462359 3504196224 3505658583
+87825000000 87829387227 29275000000 29276462409 3505196224 3506658633
+87828000000 87832387355 29276000000 29277462451 3506196224 3507658675
+87831000000 87835387524 29277000000 29278462508 3507196224 3508658732
+87834000000 87838387644 29278000000 29279462548 3508196224 3509658772
+87837000000 87841387571 29279000000 29280462523 3509196224 3510658747
+87840000000 87844387894 29280000000 29281462631 3510196224 3511658855
+87843000000 87847388147 29281000000 29282462715 3511196224 3512658939
+87846000000 87850388257 29282000000 29283462752 3512196224 3513658976
+87849000000 87853388436 29283000000 29284462812 3513196224 3514659036
+87852000000 87856388484 29284000000 29285462828 3514196224 3515659052
+87855000000 87859388738 29285000000 29286462912 3515196224 3516659136
+87858000000 87862388857 29286000000 29287462952 3516196224 3517659176
+87861000000 87865389028 29287000000 29288463009 3517196224 3518659233
+87864000000 87868389175 29288000000 29289463058 3518196224 3519659282
+87867000000 87871389328 29289000000 29290463109 3519196224 3520659333
+87870000000 87874389474 29290000000 29291463158 3520196224 3521659382
+87873000000 87877389618 29291000000 29292463206 3521196224 3522659430
+87876000000 87880389781 29292000000 29293463260 3522196224 3523659484
+87879000000 87883389933 29293000000 29294463311 3523196224 3524659535
+87882000000 87886390087 29294000000 29295463362 3524196224 3525659586
+87885000000 87889390207 29295000000 29296463402 3525196224 3526659626
+87888000000 87892390416 29296000000 29297463472 3526196224 3527659696
+87891000000 87895390546 29297000000 29298463515 3527196224 3528659739
+87894000000 87898390660 29298000000 29299463553 3528196224 3529659777
+87897000000 87901390821 29299000000 29300463607 3529196224 3530659831
+87900000000 87904390956 29300000000 29301463652 3530196224 3531659876
+87903000000 87907391099 29301000000 29302463699 3531196224 3532659923
+87906000000 87910391199 29302000000 29303463733 3532196224 3533659957
+87909000000 87913391433 29303000000 29304463811 3533196224 3534660035
+87912000000 87916391506 29304000000 29305463835 3534196224 3535660059
+87915000000 87919391627 29305000000 29306463875 3535196224 3536660099
+87918000000 87922391816 29306000000 29307463938 3536196224 3537660162
+87921000000 87925391970 29307000000 29308463990 3537196224 3538660214
+87924000000 87928392149 29308000000 29309464049 3538196224 3539660273
+87927000000 87931392295 29309000000 29310464098 3539196224 3540660322
+87930000000 87934392422 29310000000 29311464140 3540196224 3541660364
+87933000000 87937392596 29311000000 29312464198 3541196224 3542660422
+87936000000 87940392660 29312000000 29313464220 3542196224 3543660444
+87939000000 87943392867 29313000000 29314464289 3543196224 3544660513
+87942000000 87946393048 29314000000 29315464349 3544196224 3545660573
+87945000000 87949393197 29315000000 29316464399 3545196224 3546660623
+87948000000 87952393254 29316000000 29317464418 3546196224 3547660642
+87951000000 87955393450 29317000000 29318464483 3547196224 3548660707
+87954000000 87958393640 29318000000 29319464546 3548196224 3549660770
+87957000000 87961393785 29319000000 29320464595 3549196224 3550660819
+87960000000 87964393957 29320000000 29321464652 3550196224 3551660876
+87963000000 87967394090 29321000000 29322464696 3551196224 3552660920
+87966000000 87970394161 29322000000 29323464720 3552196224 3553660944
+87969000000 87973394387 29323000000 29324464795 3553196224 3554661019
+87972000000 87976394547 29324000000 29325464849 3554196224 3555661073
+87975000000 87979394679 29325000000 29326464893 3555196224 3556661117
+87978000000 87982394787 29326000000 29327464929 3556196224 3557661153
+87981000000 87985394998 29327000000 29328464999 3557196224 3558661223
+87984000000 87988395164 29328000000 29329465054 3558196224 3559661278
+87987000000 87991395275 29329000000 29330465091 3559196224 3560661315
+87990000000 87994395435 29330000000 29331465145 3560196224 3561661369
+87993000000 87997395547 29331000000 29332465182 3561196224 3562661406
+87996000000 88000395745 29332000000 29333465248 3562196224 3563661472
+87999000000 88003395835 29333000000 29334465278 3563196224 3564661502
+88002000000 88006396060 29334000000 29335465353 3564196224 3565661577
+88005000000 88009396192 29335000000 29336465397 3565196224 3566661621
+88008000000 88012396331 29336000000 29337465443 3566196224 3567661667
+88011000000 88015396382 29337000000 29338465460 3567196224 3568661684
+88014000000 88018396593 29338000000 29339465531 3568196224 3569661755
+88017000000 88021396802 29339000000 29340465600 3569196224 3570661824
+88020000000 88024396930 29340000000 29341465643 3570196224 3571661867
+88023000000 88027397073 29341000000 29342465691 3571196224 3572661915
+88026000000 88030397244 29342000000 29343465748 3572196224 3573661972
+88029000000 88033397341 29343000000 29344465780 3573196224 3574662004
+88032000000 88036397554 29344000000 29345465851 3574196224 3575662075
+88035000000 88039397684 29345000000 29346465894 3575196224 3576662118
+88038000000 88042397834 29346000000 29347465944 3576196224 3577662168
+88041000000 88045397994 29347000000 29348465998 3577196224 3578662222
+88044000000 88048398090 29348000000 29349466030 3578196224 3579662254
+88047000000 88051398278 29349000000 29350466092 3579196224 3580662316
+88050000000 88054398446 29350000000 29351466148 3580196224 3581662372
+88053000000 88057398582 29351000000 29352466194 3581196224 3582662418
+88056000000 88060398757 29352000000 29353466252 3582196224 3583662476
+88059000000 88063398879 29353000000 29354466293 3583196224 3584662517
+88062000000 88066399029 29354000000 29355466343 3584196224 3585662567
+88065000000 88069399177 29355000000 29356466392 3585196224 3586662616
+88068000000 88072399383 29356000000 29357466461 3586196224 3587662685
+88071000000 88075399497 29357000000 29358466499 3587196224 3588662723
+88074000000 88078399629 29358000000 29359466543 3588196224 3589662767
+88077000000 88081399803 29359000000 29360466601 3589196224 3590662825
+88080000000 88084399922 29360000000 29361466640 3590196224 3591662864
+88083000000 88087400046 29361000000 29362466682 3591196224 3592662906
+88086000000 88090400265 29362000000 29363466755 3592196224 3593662979
+88089000000 88093400401 29363000000 29364466800 3593196224 3594663024
+88092000000 88096400552 29364000000 29365466850 3594196224 3595663074
+88095000000 88099400712 29365000000 29366466904 3595196224 3596663128
+88098000000 88102400833 29366000000 29367466944 3596196224 3597663168
+88101000000 88105400914 29367000000 29368466971 3597196224 3598663195
+88104000000 88108401122 29368000000 29369467040 3598196224 3599663264
+88107000000 88111401277 29369000000 29370467092 3599196224 3600663316
+88110000000 88114401436 29370000000 29371467145 3600196224 3601663369
+88113000000 88117401588 29371000000 29372467196 3601196224 3602663420
+88116000000 88120401710 29372000000 29373467236 3602196224 3603663460
+88119000000 88123401888 29373000000 29374467296 3603196224 3604663520
+88122000000 88126402037 29374000000 29375467345 3604196224 3605663569
+88125000000 88129402165 29375000000 29376467388 3605196224 3606663612
+88128000000 88132402334 29376000000 29377467444 3606196224 3607663668
+88131000000 88135402454 29377000000 29378467484 3607196224 3608663708
+88134000000 88138402381 29378000000 29379467460 3608196224 3609663684
+88137000000 88141402704 29379000000 29380467568 3609196224 3610663792
+88140000000 88144402957 29380000000 29381467652 3610196224 3611663876
+88143000000 88147403067 29381000000 29382467689 3611196224 3612663913
+88146000000 88150403246 29382000000 29383467748 3612196224 3613663972
+88149000000 88153403294 29383000000 29384467764 3613196224 3614663988
+88152000000 88156403548 29384000000 29385467849 3614196224 3615664073
+88155000000 88159403667 29385000000 29386467889 3615196224 3616664113
+88158000000 88162403838 29386000000 29387467946 3616196224 3617664170
+88161000000 88165403985 29387000000 29388467995 3617196224 3618664219
+88164000000 88168404138 29388000000 29389468046 3618196224 3619664270
+88167000000 88171404284 29389000000 29390468094 3619196224 3620664318
+88170000000 88174404428 29390000000 29391468142 3620196224 3621664366
+88173000000 88177404591 29391000000 29392468197 3621196224 3622664421
+88176000000 88180404743 29392000000 29393468247 3622196224 3623664471
+88179000000 88183404897 29393000000 29394468299 3623196224 3624664523
+88182000000 88186405017 29394000000 29395468339 3624196224 3625664563
+88185000000 88189405226 29395000000 29396468408 3625196224 3626664632
+88188000000 88192405356 29396000000 29397468452 3626196224 3627664676
+88191000000 88195405470 29397000000 29398468490 3627196224 3628664714
+88194000000 88198405631 29398000000 29399468543 3628196224 3629664767
+88197000000 88201405766 29399000000 29400468588 3629196224 3630664812
+88200000000 88204405909 29400000000 29401468636 3630196224 3631664860
+88203000000 88207406009 29401000000 29402468669 3631196224 3632664893
+88206000000 88210406243 29402000000 29403468747 3632196224 3633664971
+88209000000 88213406316 29403000000 29404468772 3633196224 3634664996
+88212000000 88216406437 29404000000 29405468812 3634196224 3635665036
+88215000000 88219406626 29405000000 29406468875 3635196224 3636665099
+88218000000 88222406780 29406000000 29407468926 3636196224 3637665150
+88221000000 88225406959 29407000000 29408468986 3637196224 3638665210
+88224000000 88228407105 29408000000 29409469035 3638196224 3639665259
+88227000000 88231407232 29409000000 29410469077 3639196224 3640665301
+88230000000 88234407406 29410000000 29411469135 3640196224 3641665359
+88233000000 88237407470 29411000000 29412469156 3641196224 3642665380
+88236000000 88240407677 29412000000 29413469225 3642196224 3643665449
+88239000000 88243407858 29413000000 29414469286 3643196224 3644665510
+88242000000 88246408007 29414000000 29415469335 3644196224 3645665559
+88245000000 88249408064 29415000000 29416469354 3645196224 3646665578
+88248000000 88252408260 29416000000 29417469420 3646196224 3647665644
+88251000000 88255408450 29417000000 29418469483 3647196224 3648665707
+88254000000 88258408595 29418000000 29419469531 3648196224 3649665755
+88257000000 88261408767 29419000000 29420469589 3649196224 3650665813
+88260000000 88264408900 29420000000 29421469633 3650196224 3651665857
+88263000000 88267408971 29421000000 29422469657 3651196224 3652665881
+88266000000 88270409197 29422000000 29423469732 3652196224 3653665956
+88269000000 88273409357 29423000000 29424469785 3653196224 3654666009
+88272000000 88276409489 29424000000 29425469829 3654196224 3655666053
+88275000000 88279409597 29425000000 29426469865 3655196224 3656666089
+88278000000 88282409808 29426000000 29427469936 3656196224 3657666160
+88281000000 88285409974 29427000000 29428469991 3657196224 3658666215
+88284000000 88288410085 29428000000 29429470028 3658196224 3659666252
+88287000000 88291410245 29429000000 29430470081 3659196224 3660666305
+88290000000 88294410357 29430000000 29431470119 3660196224 3661666343
+88293000000 88297410555 29431000000 29432470185 3661196224 3662666409
+88296000000 88300410645 29432000000 29433470215 3662196224 3663666439
+88299000000 88303410870 29433000000 29434470290 3663196224 3664666514
+88302000000 88306411002 29434000000 29435470334 3664196224 3665666558
+88305000000 88309411141 29435000000 29436470380 3665196224 3666666604
+88308000000 88312411192 29436000000 29437470397 3666196224 3667666621
+88311000000 88315411403 29437000000 29438470467 3667196224 3668666691
+88314000000 88318411612 29438000000 29439470537 3668196224 3669666761
+88317000000 88321411740 29439000000 29440470580 3669196224 3670666804
+88320000000 88324411883 29440000000 29441470627 3670196224 3671666851
+88323000000 88327412054 29441000000 29442470684 3671196224 3672666908
+88326000000 88330412151 29442000000 29443470717 3672196224 3673666941
+88329000000 88333412364 29443000000 29444470788 3673196224 3674667012
+88332000000 88336412494 29444000000 29445470831 3674196224 3675667055
+88335000000 88339412644 29445000000 29446470881 3675196224 3676667105
+88338000000 88342412804 29446000000 29447470934 3676196224 3677667158
+88341000000 88345412900 29447000000 29448470966 3677196224 3678667190
+88344000000 88348413088 29448000000 29449471029 3678196224 3679667253
+88347000000 88351413256 29449000000 29450471085 3679196224 3680667309
+88350000000 88354413392 29450000000 29451471130 3680196224 3681667354
+88353000000 88357413567 29451000000 29452471189 3681196224 3682667413
+88356000000 88360413689 29452000000 29453471229 3682196224 3683667453
+88359000000 88363413839 29453000000 29454471279 3683196224 3684667503
+88362000000 88366413987 29454000000 29455471329 3684196224 3685667553
+88365000000 88369414193 29455000000 29456471397 3685196224 3686667621
+88368000000 88372414307 29456000000 29457471435 3686196224 3687667659
+88371000000 88375414439 29457000000 29458471479 3687196224 3688667703
+88374000000 88378414613 29458000000 29459471537 3688196224 3689667761
+88377000000 88381414732 29459000000 29460471577 3689196224 3690667801
+88380000000 88384414856 29460000000 29461471618 3690196224 3691667842
+88383000000 88387415075 29461000000 29462471691 3691196224 3692667915
+88386000000 88390415211 29462000000 29463471737 3692196224 3693667961
+88389000000 88393415362 29463000000 29464471787 3693196224 3694668011
+88392000000 88396415522 29464000000 29465471840 3694196224 3695668064
+88395000000 88399415643 29465000000 29466471881 3695196224 3696668105
+88398000000 88402415724 29466000000 29467471908 3696196224 3697668132
+88401000000 88405415932 29467000000 29468471977 3697196224 3698668201
+88404000000 88408416087 29468000000 29469472029 3698196224 3699668253
+88407000000 88411416246 29469000000 29470472082 3699196224 3700668306
+88410000000 88414416398 29470000000 29471472132 3700196224 3701668356
+88413000000 88417416520 29471000000 29472472173 3701196224 3702668397
+88416000000 88420416698 29472000000 29473472232 3702196224 3703668456
+88419000000 88423416847 29473000000 29474472282 3703196224 3704668506
+88422000000 88426416975 29474000000 29475472325 3704196224 3705668549
+88425000000 88429417144 29475000000 29476472381 3705196224 3706668605
+88428000000 88432417264 29476000000 29477472421 3706196224 3707668645
+88431000000 88435417191 29477000000 29478472397 3707196224 3708668621
+88434000000 88438417514 29478000000 29479472504 3708196224 3709668728
+88437000000 88441417767 29479000000 29480472589 3709196224 3710668813
+88440000000 88444417877 29480000000 29481472625 3710196224 3711668849
+88443000000 88447418056 29481000000 29482472685 3711196224 3712668909
+88446000000 88450418104 29482000000 29483472701 3712196224 3713668925
+88449000000 88453418358 29483000000 29484472786 3713196224 3714669010
+88452000000 88456418477 29484000000 29485472825 3714196224 3715669049
+88455000000 88459418648 29485000000 29486472882 3715196224 3716669106
+88458000000 88462418795 29486000000 29487472931 3716196224 3717669155
+88461000000 88465418948 29487000000 29488472982 3717196224 3718669206
+88464000000 88468419094 29488000000 29489473031 3718196224 3719669255
+88467000000 88471419238 29489000000 29490473079 3719196224 3720669303
+88470000000 88474419401 29490000000 29491473133 3720196224 3721669357
+88473000000 88477419553 29491000000 29492473184 3721196224 3722669408
+88476000000 88480419707 29492000000 29493473235 3722196224 3723669459
+88479000000 88483419827 29493000000 29494473275 3723196224 3724669499
+88482000000 88486420036 29494000000 29495473345 3724196224 3725669569
+88485000000 88489420166 29495000000 29496473388 3725196224 3726669612
+88488000000 88492420280 29496000000 29497473426 3726196224 3727669650
+88491000000 88495420441 29497000000 29498473480 3727196224 3728669704
+88494000000 88498420576 29498000000 29499473525 3728196224 3729669749
+88497000000 88501420719 29499000000 29500473573 3729196224 3730669797
+88500000000 88504420819 29500000000 29501473606 3730196224 3731669830
+88503000000 88507421053 29501000000 29502473684 3731196224 3732669908
+88506000000 88510421126 29502000000 29503473708 3732196224 3733669932
+88509000000 88513421247 29503000000 29504473749 3733196224 3734669973
+88512000000 88516421436 29504000000 29505473812 3734196224 3735670036
+88515000000 88519421590 29505000000 29506473863 3735196224 3736670087
+88518000000 88522421769 29506000000 29507473923 3736196224 3737670147
+88521000000 88525421915 29507000000 29508473971 3737196224 3738670195
+88524000000 88528422042 29508000000 29509474014 3738196224 3739670238
+88527000000 88531422216 29509000000 29510474072 3739196224 3740670296
+88530000000 88534422280 29510000000 29511474093 3740196224 3741670317
+88533000000 88537422487 29511000000 29512474162 3741196224 3742670386
+88536000000 88540422668 29512000000 29513474222 3742196224 3743670446
+88539000000 88543422817 29513000000 29514474272 3743196224 3744670496
+88542000000 88546422874 29514000000 29515474291 3744196224 3745670515
+88545000000 88549423070 29515000000 29516474356 3745196224 3746670580
+88548000000 88552423260 29516000000 29517474420 3746196224 3747670644
+88551000000 88555423405 29517000000 29518474468 3747196224 3748670692
+88554000000 88558423577 29518000000 29519474525 3748196224 3749670749
+88557000000 88561423710 29519000000 29520474570 3749196224 3750670794
+88560000000 88564423781 29520000000 29521474593 3750196224 3751670817
+88563000000 88567424007 29521000000 29522474669 3751196224 3752670893
+88566000000 88570424167 29522000000 29523474722 3752196224 3753670946
+88569000000 88573424299 29523000000 29524474766 3753196224 3754670990
+88572000000 88576424407 29524000000 29525474802 3754196224 3755671026
+88575000000 88579424618 29525000000 29526474872 3755196224 3756671096
+88578000000 88582424784 29526000000 29527474928 3756196224 3757671152
+88581000000 88585424895 29527000000 29528474965 3757196224 3758671189
+88584000000 88588425055 29528000000 29529475018 3758196224 3759671242
+88587000000 88591425167 29529000000 29530475055 3759196224 3760671279
+88590000000 88594425365 29530000000 29531475121 3760196224 3761671345
+88593000000 88597425455 29531000000 29532475151 3761196224 3762671375
+88596000000 88600425680 29532000000 29533475226 3762196224 3763671450
+88599000000 88603425812 29533000000 29534475270 3763196224 3764671494
+88602000000 88606425951 29534000000 29535475317 3764196224 3765671541
+88605000000 88609426002 29535000000 29536475334 3765196224 3766671558
+88608000000 88612426213 29536000000 29537475404 3766196224 3767671628
+88611000000 88615426422 29537000000 29538475474 3767196224 3768671698
+88614000000 88618426550 29538000000 29539475516 3768196224 3769671740
+88617000000 88621426693 29539000000 29540475564 3769196224 3770671788
+88620000000 88624426864 29540000000 29541475621 3770196224 3771671845
+88623000000 88627426961 29541000000 29542475653 3771196224 3772671877
+88626000000 88630427174 29542000000 29543475724 3772196224 3773671948
+88629000000 88633427304 29543000000 29544475768 3773196224 3774671992
+88632000000 88636427454 29544000000 29545475818 3774196224 3775672042
+88635000000 88639427614 29545000000 29546475871 3775196224 3776672095
+88638000000 88642427710 29546000000 29547475903 3776196224 3777672127
+88641000000 88645427898 29547000000 29548475966 3777196224 3778672190
+88644000000 88648428066 29548000000 29549476022 3778196224 3779672246
+88647000000 88651428202 29549000000 29550476067 3779196224 3780672291
+88650000000 88654428377 29550000000 29551476125 3780196224 3781672349
+88653000000 88657428499 29551000000 29552476166 3781196224 3782672390
+88656000000 88660428649 29552000000 29553476216 3782196224 3783672440
+88659000000 88663428797 29553000000 29554476265 3783196224 3784672489
+88662000000 88666429003 29554000000 29555476334 3784196224 3785672558
+88665000000 88669429117 29555000000 29556476372 3785196224 3786672596
+88668000000 88672429249 29556000000 29557476416 3786196224 3787672640
+88671000000 88675429423 29557000000 29558476474 3787196224 3788672698
+88674000000 88678429542 29558000000 29559476514 3788196224 3789672738
+88677000000 88681429666 29559000000 29560476555 3789196224 3790672779
+88680000000 88684429885 29560000000 29561476628 3790196224 3791672852
+88683000000 88687430021 29561000000 29562476673 3791196224 3792672897
+88686000000 88690430172 29562000000 29563476724 3792196224 3793672948
+88689000000 88693430332 29563000000 29564476777 3793196224 3794673001
+88692000000 88696430453 29564000000 29565476817 3794196224 3795673041
+88695000000 88699430534 29565000000 29566476844 3795196224 3796673068
+88698000000 88702430742 29566000000 29567476914 3796196224 3797673138
+88701000000 88705430897 29567000000 29568476965 3797196224 3798673189
+88704000000 88708431056 29568000000 29569477018 3798196224 3799673242
+88707000000 88711431208 29569000000 29570477069 3799196224 3800673293
+88710000000 88714431330 29570000000 29571477110 3800196224 3801673334
+88713000000 88717431508 29571000000 29572477169 3801196224 3802673393
+88716000000 88720431657 29572000000 29573477219 3802196224 3803673443
+88719000000 88723431785 29573000000 29574477261 3803196224 3804673485
+88722000000 88726431954 29574000000 29575477318 3804196224 3805673542
+88725000000 88729432074 29575000000 29576477358 3805196224 3806673582
+88728000000 88732432001 29576000000 29577477333 3806196224 3807673557
+88731000000 88735432324 29577000000 29578477441 3807196224 3808673665
+88734000000 88738432577 29578000000 29579477525 3808196224 3809673749
+88737000000 88741432687 29579000000 29580477562 3809196224 3810673786
+88740000000 88744432866 29580000000 29581477622 3810196224 3811673846
+88743000000 88747432914 29581000000 29582477638 3811196224 3812673862
+88746000000 88750433168 29582000000 29583477722 3812196224 3813673946
+88749000000 88753433287 29583000000 29584477762 3813196224 3814673986
+88752000000 88756433458 29584000000 29585477819 3814196224 3815674043
+88755000000 88759433605 29585000000 29586477868 3815196224 3816674092
+88758000000 88762433758 29586000000 29587477919 3816196224 3817674143
+88761000000 88765433904 29587000000 29588477968 3817196224 3818674192
+88764000000 88768434048 29588000000 29589478016 3818196224 3819674240
+88767000000 88771434211 29589000000 29590478070 3819196224 3820674294
+88770000000 88774434363 29590000000 29591478121 3820196224 3821674345
+88773000000 88777434517 29591000000 29592478172 3821196224 3822674396
+88776000000 88780434637 29592000000 29593478212 3822196224 3823674436
+88779000000 88783434846 29593000000 29594478282 3823196224 3824674506
+88782000000 88786434976 29594000000 29595478325 3824196224 3825674549
+88785000000 88789435090 29595000000 29596478363 3825196224 3826674587
+88788000000 88792435251 29596000000 29597478417 3826196224 3827674641
+88791000000 88795435386 29597000000 29598478462 3827196224 3828674686
+88794000000 88798435529 29598000000 29599478509 3828196224 3829674733
+88797000000 88801435629 29599000000 29600478543 3829196224 3830674767
+88800000000 88804435863 29600000000 29601478621 3830196224 3831674845
+88803000000 88807435936 29601000000 29602478645 3831196224 3832674869
+88806000000 88810436057 29602000000 29603478685 3832196224 3833674909
+88809000000 88813436246 29603000000 29604478748 3833196224 3834674972
+88812000000 88816436400 29604000000 29605478800 3834196224 3835675024
+88815000000 88819436579 29605000000 29606478859 3835196224 3836675083
+88818000000 88822436725 29606000000 29607478908 3836196224 3837675132
+88821000000 88825436852 29607000000 29608478950 3837196224 3838675174
+88824000000 88828437026 29608000000 29609479008 3838196224 3839675232
+88827000000 88831437090 29609000000 29610479030 3839196224 3840675254
+88830000000 88834437297 29610000000 29611479099 3840196224 3841675323
+88833000000 88837437478 29611000000 29612479159 3841196224 3842675383
+88836000000 88840437627 29612000000 29613479209 3842196224 3843675433
+88839000000 88843437684 29613000000 29614479228 3843196224 3844675452
+88842000000 88846437880 29614000000 29615479293 3844196224 3845675517
+88845000000 88849438070 29615000000 29616479356 3845196224 3846675580
+88848000000 88852438215 29616000000 29617479405 3846196224 3847675629
+88851000000 88855438387 29617000000 29618479462 3847196224 3848675686
+88854000000 88858438520 29618000000 29619479506 3848196224 3849675730
+88857000000 88861438591 29619000000 29620479530 3849196224 3850675754
+88860000000 88864438817 29620000000 29621479605 3850196224 3851675829
+88863000000 88867438977 29621000000 29622479659 3851196224 3852675883
+88866000000 88870439109 29622000000 29623479703 3852196224 3853675927
+88869000000 88873439217 29623000000 29624479739 3853196224 3854675963
+88872000000 88876439428 29624000000 29625479809 3854196224 3855676033
+88875000000 88879439594 29625000000 29626479864 3855196224 3856676088
+88878000000 88882439705 29626000000 29627479901 3856196224 3857676125
+88881000000 88885439865 29627000000 29628479955 3857196224 3858676179
+88884000000 88888439977 29628000000 29629479992 3858196224 3859676216
+88887000000 88891440175 29629000000 29630480058 3859196224 3860676282
+88890000000 88894440265 29630000000 29631480088 3860196224 3861676312
+88893000000 88897440490 29631000000 29632480163 3861196224 3862676387
+88896000000 88900440622 29632000000 29633480207 3862196224 3863676431
+88899000000 88903440761 29633000000 29634480253 3863196224 3864676477
+88902000000 88906440812 29634000000 29635480270 3864196224 3865676494
+88905000000 88909441023 29635000000 29636480341 3865196224 3866676565
+88908000000 88912441232 29636000000 29637480410 3866196224 3867676634
+88911000000 88915441360 29637000000 29638480453 3867196224 3868676677
+88914000000 88918441503 29638000000 29639480501 3868196224 3869676725
+88917000000 88921441674 29639000000 29640480558 3869196224 3870676782
+88920000000 88924441771 29640000000 29641480590 3870196224 3871676814
+88923000000 88927441984 29641000000 29642480661 3871196224 3872676885
+88926000000 88930442114 29642000000 29643480704 3872196224 3873676928
+88929000000 88933442264 29643000000 29644480754 3873196224 3874676978
+88932000000 88936442424 29644000000 29645480808 3874196224 3875677032
+88935000000 88939442520 29645000000 29646480840 3875196224 3876677064
+88938000000 88942442708 29646000000 29647480902 3876196224 3877677126
+88941000000 88945442876 29647000000 29648480958 3877196224 3878677182
+88944000000 88948443012 29648000000 29649481004 3878196224 3879677228
+88947000000 88951443187 29649000000 29650481062 3879196224 3880677286
+88950000000 88954443309 29650000000 29651481103 3880196224 3881677327
+88953000000 88957443459 29651000000 29652481153 3881196224 3882677377
+88956000000 88960443607 29652000000 29653481202 3882196224 3883677426
+88959000000 88963443813 29653000000 29654481271 3883196224 3884677495
+88962000000 88966443927 29654000000 29655481309 3884196224 3885677533
+88965000000 88969444059 29655000000 29656481353 3885196224 3886677577
+88968000000 88972444233 29656000000 29657481411 3886196224 3887677635
+88971000000 88975444352 29657000000 29658481450 3887196224 3888677674
+88974000000 88978444476 29658000000 29659481492 3888196224 3889677716
+88977000000 88981444695 29659000000 29660481565 3889196224 3890677789
+88980000000 88984444831 29660000000 29661481610 3890196224 3891677834
+88983000000 88987444982 29661000000 29662481660 3891196224 3892677884
+88986000000 88990445142 29662000000 29663481714 3892196224 3893677938
+88989000000 88993445263 29663000000 29664481754 3893196224 3894677978
+88992000000 88996445344 29664000000 29665481781 3894196224 3895678005
+88995000000 88999445552 29665000000 29666481850 3895196224 3896678074
+88998000000 89002445707 29666000000 29667481902 3896196224 3897678126
+89001000000 89005445866 29667000000 29668481955 3897196224 3898678179
+89004000000 89008446018 29668000000 29669482006 3898196224 3899678230
+89007000000 89011446140 29669000000 29670482046 3899196224 3900678270
+89010000000 89014446318 29670000000 29671482106 3900196224 3901678330
+89013000000 89017446467 29671000000 29672482155 3901196224 3902678379
+89016000000 89020446595 29672000000 29673482198 3902196224 3903678422
+89019000000 89023446764 29673000000 29674482254 3903196224 3904678478
+89022000000 89026446884 29674000000 29675482294 3904196224 3905678518
+89025000000 89029446811 29675000000 29676482270 3905196224 3906678494
+89028000000 89032447134 29676000000 29677482378 3906196224 3907678602
+89031000000 89035447387 29677000000 29678482462 3907196224 3908678686
+89034000000 89038447497 29678000000 29679482499 3908196224 3909678723
+89037000000 89041447676 29679000000 29680482558 3909196224 3910678782
+89040000000 89044447724 29680000000 29681482574 3910196224 3911678798
+89043000000 89047447978 29681000000 29682482659 3911196224 3912678883
+89046000000 89050448097 29682000000 29683482699 3912196224 3913678923
+89049000000 89053448268 29683000000 29684482756 3913196224 3914678980
+89052000000 89056448415 29684000000 29685482805 3914196224 3915679029
+89055000000 89059448568 29685000000 29686482856 3915196224 3916679080
+89058000000 89062448714 29686000000 29687482904 3916196224 3917679128
+89061000000 89065448858 29687000000 29688482952 3917196224 3918679176
+89064000000 89068449021 29688000000 29689483007 3918196224 3919679231
+89067000000 89071449173 29689000000 29690483057 3919196224 3920679281
+89070000000 89074449327 29690000000 29691483109 3920196224 3921679333
+89073000000 89077449447 29691000000 29692483149 3921196224 3922679373
+89076000000 89080449656 29692000000 29693483218 3922196224 3923679442
+89079000000 89083449786 29693000000 29694483262 3923196224 3924679486
+89082000000 89086449900 29694000000 29695483300 3924196224 3925679524
+89085000000 89089450061 29695000000 29696483353 3925196224 3926679577
+89088000000 89092450196 29696000000 29697483398 3926196224 3927679622
+89091000000 89095450339 29697000000 29698483446 3927196224 3928679670
+89094000000 89098450439 29698000000 29699483479 3928196224 3929679703
+89097000000 89101450673 29699000000 29700483557 3929196224 3930679781
+89100000000 89104450746 29700000000 29701483582 3930196224 3931679806
+89103000000 89107450867 29701000000 29702483622 3931196224 3932679846
+89106000000 89110451056 29702000000 29703483685 3932196224 3933679909
+89109000000 89113451210 29703000000 29704483736 3933196224 3934679960
+89112000000 89116451389 29704000000 29705483796 3934196224 3935680020
+89115000000 89119451535 29705000000 29706483845 3935196224 3936680069
+89118000000 89122451662 29706000000 29707483887 3936196224 3937680111
+89121000000 89125451836 29707000000 29708483945 3937196224 3938680169
+89124000000 89128451900 29708000000 29709483966 3938196224 3939680190
+89127000000 89131452107 29709000000 29710484035 3939196224 3940680259
+89130000000 89134452288 29710000000 29711484096 3940196224 3941680320
+89133000000 89137452437 29711000000 29712484145 3941196224 3942680369
+89136000000 89140452494 29712000000 29713484164 3942196224 3943680388
+89139000000 89143452690 29713000000 29714484230 3943196224 3944680454
+89142000000 89146452880 29714000000 29715484293 3944196224 3945680517
+89145000000 89149453025 29715000000 29716484341 3945196224 3946680565
+89148000000 89152453197 29716000000 29717484399 3946196224 3947680623
+89151000000 89155453330 29717000000 29718484443 3947196224 3948680667
+89154000000 89158453401 29718000000 29719484467 3948196224 3949680691
+89157000000 89161453627 29719000000 29720484542 3949196224 3950680766
+89160000000 89164453787 29720000000 29721484595 3950196224 3951680819
+89163000000 89167453919 29721000000 29722484639 3951196224 3952680863
+89166000000 89170454027 29722000000 29723484675 3952196224 3953680899
+89169000000 89173454238 29723000000 29724484746 3953196224 3954680970
+89172000000 89176454404 29724000000 29725484801 3954196224 3955681025
+89175000000 89179454515 29725000000 29726484838 3955196224 3956681062
+89178000000 89182454675 29726000000 29727484891 3956196224 3957681115
+89181000000 89185454787 29727000000 29728484929 3957196224 3958681153
+89184000000 89188454985 29728000000 29729484995 3958196224 3959681219
+89187000000 89191455075 29729000000 29730485025 3959196224 3960681249
+89190000000 89194455300 29730000000 29731485100 3960196224 3961681324
+89193000000 89197455432 29731000000 29732485144 3961196224 3962681368
+89196000000 89200455571 29732000000 29733485190 3962196224 3963681414
+89199000000 89203455622 29733000000 29734485207 3963196224 3964681431
+89202000000 89206455833 29734000000 29735485277 3964196224 3965681501
+89205000000 89209456042 29735000000 29736485347 3965196224 3966681571
+89208000000 89212456170 29736000000 29737485390 3966196224 3967681614
+89211000000 89215456313 29737000000 29738485437 3967196224 3968681661
+89214000000 89218456484 29738000000 29739485494 3968196224 3969681718
+89217000000 89221456581 29739000000 29740485527 3969196224 3970681751
+89220000000 89224456794 29740000000 29741485598 3970196224 3971681822
+89223000000 89227456924 29741000000 29742485641 3971196224 3972681865
+89226000000 89230457074 29742000000 29743485691 3972196224 3973681915
+89229000000 89233457234 29743000000 29744485744 3973196224 3974681968
+89232000000 89236457330 29744000000 29745485776 3974196224 3975682000
+89235000000 89239457518 29745000000 29746485839 3975196224 3976682063
+89238000000 89242457686 29746000000 29747485895 3976196224 3977682119
+89241000000 89245457822 29747000000 29748485940 3977196224 3978682164
+89244000000 89248457997 29748000000 29749485999 3978196224 3979682223
+89247000000 89251458119 29749000000 29750486039 3979196224 3980682263
+89250000000 89254458269 29750000000 29751486089 3980196224 3981682313
+89253000000 89257458417 29751000000 29752486139 3981196224 3982682363
+89256000000 89260458623 29752000000 29753486207 3982196224 3983682431
+89259000000 89263458737 29753000000 29754486245 3983196224 3984682469
+89262000000 89266458869 29754000000 29755486289 3984196224 3985682513
+89265000000 89269459043 29755000000 29756486347 3985196224 3986682571
+89268000000 89272459162 29756000000 29757486387 3986196224 3987682611
+89271000000 89275459286 29757000000 29758486428 3987196224 3988682652
+89274000000 89278459505 29758000000 29759486501 3988196224 3989682725
+89277000000 89281459641 29759000000 29760486547 3989196224 3990682771
+89280000000 89284459792 29760000000 29761486597 3990196224 3991682821
+89283000000 89287459952 29761000000 29762486650 3991196224 3992682874
+89286000000 89290460073 29762000000 29763486691 3992196224 3993682915
+89289000000 89293460154 29763000000 29764486718 3993196224 3994682942
+89292000000 89296460362 29764000000 29765486787 3994196224 3995683011
+89295000000 89299460517 29765000000 29766486839 3995196224 3996683063
+89298000000 89302460676 29766000000 29767486892 3996196224 3997683116
+89301000000 89305460828 29767000000 29768486942 3997196224 3998683166
+89304000000 89308460950 29768000000 29769486983 3998196224 3999683207
+89307000000 89311461128 29769000000 29770487042 3999196224 4000683266
+89310000000 89314461277 29770000000 29771487092 4000196224 4001683316
+89313000000 89317461405 29771000000 29772487135 4001196224 4002683359
+89316000000 89320461574 29772000000 29773487191 4002196224 4003683415
+89319000000 89323461694 29773000000 29774487231 4003196224 4004683455
+89322000000 89326461621 29774000000 29775487207 4004196224 4005683431
+89325000000 89329461944 29775000000 29776487314 4005196224 4006683538
+89328000000 89332462197 29776000000 29777487399 4006196224 4007683623
+89331000000 89335462307 29777000000 29778487435 4007196224 4008683659
+89334000000 89338462486 29778000000 29779487495 4008196224 4009683719
+89337000000 89341462534 29779000000 29780487511 4009196224 4010683735
+89340000000 89344462788 29780000000 29781487596 4010196224 4011683820
+89343000000 89347462907 29781000000 29782487635 4011196224 4012683859
+89346000000 89350463078 29782000000 29783487692 4012196224 4013683916
+89349000000 89353463225 29783000000 29784487741 4013196224 4014683965
+89352000000 89356463378 29784000000 29785487792 4014196224 4015684016
+89355000000 89359463524 29785000000 29786487841 4015196224 4016684065
+89358000000 89362463668 29786000000 29787487889 4016196224 4017684113
+89361000000 89365463831 29787000000 29788487943 4017196224 4018684167
+89364000000 89368463983 29788000000 29789487994 4018196224 4019684218
+89367000000 89371464137 29789000000 29790488045 4019196224 4020684269
+89370000000 89374464257 29790000000 29791488085 4020196224 4021684309
+89373000000 89377464466 29791000000 29792488155 4021196224 4022684379
+89376000000 89380464596 29792000000 29793488198 4022196224 4023684422
+89379000000 89383464710 29793000000 29794488236 4023196224 4024684460
+89382000000 89386464871 29794000000 29795488290 4024196224 4025684514
+89385000000 89389465006 29795000000 29796488335 4025196224 4026684559
+89388000000 89392465149 29796000000 29797488383 4026196224 4027684607
+89391000000 89395465249 29797000000 29798488416 4027196224 4028684640
+89394000000 89398465483 29798000000 29799488494 4028196224 4029684718
+89397000000 89401465556 29799000000 29800488518 4029196224 4030684742
+89400000000 89404465677 29800000000 29801488559 4030196224 4031684783
+89403000000 89407465866 29801000000 29802488622 4031196224 4032684846
+89406000000 89410466020 29802000000 29803488673 4032196224 4033684897
+89409000000 89413466199 29803000000 29804488733 4033196224 4034684957
+89412000000 89416466345 29804000000 29805488781 4034196224 4035685005
+89415000000 89419466472 29805000000 29806488824 4035196224 4036685048
+89418000000 89422466646 29806000000 29807488882 4036196224 4037685106
+89421000000 89425466710 29807000000 29808488903 4037196224 4038685127
+89424000000 89428466917 29808000000 29809488972 4038196224 4039685196
+89427000000 89431467098 29809000000 29810489032 4039196224 4040685256
+89430000000 89434467247 29810000000 29811489082 4040196224 4041685306
+89433000000 89437467304 29811000000 29812489101 4041196224 4042685325
+89436000000 89440467500 29812000000 29813489166 4042196224 4043685390
+89439000000 89443467690 29813000000 29814489230 4043196224 4044685454
+89442000000 89446467835 29814000000 29815489278 4044196224 4045685502
+89445000000 89449468007 29815000000 29816489335 4045196224 4046685559
+89448000000 89452468140 29816000000 29817489380 4046196224 4047685604
+89451000000 89455468211 29817000000 29818489403 4047196224 4048685627
+89454000000 89458468437 29818000000 29819489479 4048196224 4049685703
+89457000000 89461468597 29819000000 29820489532 4049196224 4050685756
+89460000000 89464468729 29820000000 29821489576 4050196224 4051685800
+89463000000 89467468837 29821000000 29822489612 4051196224 4052685836
+89466000000 89470469048 29822000000 29823489682 4052196224 4053685906
+89469000000 89473469214 29823000000 29824489738 4053196224 4054685962
+89472000000 89476469325 29824000000 29825489775 4054196224 4055685999
+89475000000 89479469485 29825000000 29826489828 4055196224 4056686052
+89478000000 89482469597 29826000000 29827489865 4056196224 4057686089
+89481000000 89485469795 29827000000 29828489931 4057196224 4058686155
+89484000000 89488469885 29828000000 29829489961 4058196224 4059686185
+89487000000 89491470110 29829000000 29830490036 4059196224 4060686260
+89490000000 89494470242 29830000000 29831490080 4060196224 4061686304
+89493000000 89497470381 29831000000 29832490127 4061196224 4062686351
+89496000000 89500470432 29832000000 29833490144 4062196224 4063686368
+89499000000 89503470643 29833000000 29834490214 4063196224 4064686438
+89502000000 89506470852 29834000000 29835490284 4064196224 4065686508
+89505000000 89509470980 29835000000 29836490326 4065196224 4066686550
+89508000000 89512471123 29836000000 29837490374 4066196224 4067686598
+89511000000 89515471294 29837000000 29838490431 4067196224 4068686655
+89514000000 89518471391 29838000000 29839490463 4068196224 4069686687
+89517000000 89521471604 29839000000 29840490534 4069196224 4070686758
+89520000000 89524471734 29840000000 29841490578 4070196224 4071686802
+89523000000 89527471884 29841000000 29842490628 4071196224 4072686852
+89526000000 89530472044 29842000000 29843490681 4072196224 4073686905
+89529000000 89533472140 29843000000 29844490713 4073196224 4074686937
+89532000000 89536472328 29844000000 29845490776 4074196224 4075687000
+89535000000 89539472496 29845000000 29846490832 4075196224 4076687056
+89538000000 89542472632 29846000000 29847490877 4076196224 4077687101
+89541000000 89545472807 29847000000 29848490935 4077196224 4078687159
+89544000000 89548472929 29848000000 29849490976 4078196224 4079687200
+89547000000 89551473079 29849000000 29850491026 4079196224 4080687250
+89550000000 89554473227 29850000000 29851491075 4080196224 4081687299
+89553000000 89557473433 29851000000 29852491144 4081196224 4082687368
+89556000000 89560473547 29852000000 29853491182 4082196224 4083687406
+89559000000 89563473679 29853000000 29854491226 4083196224 4084687450
+89562000000 89566473853 29854000000 29855491284 4084196224 4085687508
+89565000000 89569473972 29855000000 29856491324 4085196224 4086687548
+89568000000 89572474096 29856000000 29857491365 4086196224 4087687589
+89571000000 89575474315 29857000000 29858491438 4087196224 4088687662
+89574000000 89578474451 29858000000 29859491483 4088196224 4089687707
+89577000000 89581474602 29859000000 29860491534 4089196224 4090687758
+89580000000 89584474762 29860000000 29861491587 4090196224 4091687811
+89583000000 89587474883 29861000000 29862491627 4091196224 4092687851
+89586000000 89590474964 29862000000 29863491654 4092196224 4093687878
+89589000000 89593475172 29863000000 29864491724 4093196224 4094687948
+89592000000 89596475327 29864000000 29865491775 4094196224 4095687999
+89595000000 89599475486 29865000000 29866491828 4095196224 4096688052
+89598000000 89602475638 29866000000 29867491879 4096196224 4097688103
+89601000000 89605475760 29867000000 29868491920 4097196224 4098688144
+89604000000 89608475938 29868000000 29869491979 4098196224 4099688203
+89607000000 89611476087 29869000000 29870492029 4099196224 4100688253
+89610000000 89614476215 29870000000 29871492071 4100196224 4101688295
+89613000000 89617476384 29871000000 29872492128 4101196224 4102688352
+89616000000 89620476504 29872000000 29873492168 4102196224 4103688392
+89619000000 89623476431 29873000000 29874492143 4103196224 4104688367
+89622000000 89626476754 29874000000 29875492251 4104196224 4105688475
+89625000000 89629477007 29875000000 29876492335 4105196224 4106688559
+89628000000 89632477117 29876000000 29877492372 4106196224 4107688596
+89631000000 89635477296 29877000000 29878492432 4107196224 4108688656
+89634000000 89638477344 29878000000 29879492448 4108196224 4109688672
+89637000000 89641477598 29879000000 29880492532 4109196224 4110688756
+89640000000 89644477717 29880000000 29881492572 4110196224 4111688796
+89643000000 89647477888 29881000000 29882492629 4111196224 4112688853
+89646000000 89650478035 29882000000 29883492678 4112196224 4113688902
+89649000000 89653478188 29883000000 29884492729 4113196224 4114688953
+89652000000 89656478334 29884000000 29885492778 4114196224 4115689002
+89655000000 89659478478 29885000000 29886492826 4115196224 4116689050
+89658000000 89662478641 29886000000 29887492880 4116196224 4117689104
+89661000000 89665478793 29887000000 29888492931 4117196224 4118689155
+89664000000 89668478947 29888000000 29889492982 4118196224 4119689206
+89667000000 89671479067 29889000000 29890493022 4119196224 4120689246
+89670000000 89674479276 29890000000 29891493092 4120196224 4121689316
+89673000000 89677479406 29891000000 29892493135 4121196224 4122689359
+89676000000 89680479520 29892000000 29893493173 4122196224 4123689397
+89679000000 89683479681 29893000000 29894493227 4123196224 4124689451
+89682000000 89686479816 29894000000 29895493272 4124196224 4125689496
+89685000000 89689479959 29895000000 29896493319 4125196224 4126689543
+89688000000 89692480059 29896000000 29897493353 4126196224 4127689577
+89691000000 89695480293 29897000000 29898493431 4127196224 4128689655
+89694000000 89698480366 29898000000 29899493455 4128196224 4129689679
+89697000000 89701480487 29899000000 29900493495 4129196224 4130689719
+89700000000 89704480676 29900000000 29901493558 4130196224 4131689782
+89703000000 89707480830 29901000000 29902493610 4131196224 4132689834
+89706000000 89710481009 29902000000 29903493669 4132196224 4133689893
+89709000000 89713481155 29903000000 29904493718 4133196224 4134689942
+89712000000 89716481282 29904000000 29905493760 4134196224 4135689984
+89715000000 89719481456 29905000000 29906493818 4135196224 4136690042
+89718000000 89722481520 29906000000 29907493840 4136196224 4137690064
+89721000000 89725481727 29907000000 29908493909 4137196224 4138690133
+89724000000 89728481908 29908000000 29909493969 4138196224 4139690193
+89727000000 89731482057 29909000000 29910494019 4139196224 4140690243
+89730000000 89734482114 29910000000 29911494038 4140196224 4141690262
+89733000000 89737482310 29911000000 29912494103 4141196224 4142690327
+89736000000 89740482500 29912000000 29913494166 4142196224 4143690390
+89739000000 89743482645 29913000000 29914494215 4143196224 4144690439
+89742000000 89746482817 29914000000 29915494272 4144196224 4145690496
+89745000000 89749482950 29915000000 29916494316 4145196224 4146690540
+89748000000 89752483021 29916000000 29917494340 4146196224 4147690564
+89751000000 89755483247 29917000000 29918494415 4147196224 4148690639
+89754000000 89758483407 29918000000 29919494469 4148196224 4149690693
+89757000000 89761483539 29919000000 29920494513 4149196224 4150690737
+89760000000 89764483647 29920000000 29921494549 4150196224 4151690773
+89763000000 89767483858 29921000000 29922494619 4151196224 4152690843
+89766000000 89770484024 29922000000 29923494674 4152196224 4153690898
+89769000000 89773484135 29923000000 29924494711 4153196224 4154690935
+89772000000 89776484295 29924000000 29925494765 4154196224 4155690989
+89775000000 89779484407 29925000000 29926494802 4155196224 4156691026
+89778000000 89782484605 29926000000 29927494868 4156196224 4157691092
+89781000000 89785484695 29927000000 29928494898 4157196224 4158691122
+89784000000 89788484920 29928000000 29929494973 4158196224 4159691197
+89787000000 89791485052 29929000000 29930495017 4159196224 4160691241
+89790000000 89794485191 29930000000 29931495063 4160196224 4161691287
+89793000000 89797485242 29931000000 29932495080 4161196224 4162691304
+89796000000 89800485453 29932000000 29933495151 4162196224 4163691375
+89799000000 89803485662 29933000000 29934495220 4163196224 4164691444
+89802000000 89806485790 29934000000 29935495263 4164196224 4165691487
+89805000000 89809485933 29935000000 29936495311 4165196224 4166691535
+89808000000 89812486104 29936000000 29937495368 4166196224 4167691592
+89811000000 89815486201 29937000000 29938495400 4167196224 4168691624
+89814000000 89818486414 29938000000 29939495471 4168196224 4169691695
+89817000000 89821486544 29939000000 29940495514 4169196224 4170691738
+89820000000 89824486694 29940000000 29941495564 4170196224 4171691788
+89823000000 89827486854 29941000000 29942495618 4171196224 4172691842
+89826000000 89830486950 29942000000 29943495650 4172196224 4173691874
+89829000000 89833487138 29943000000 29944495712 4173196224 4174691936
+89832000000 89836487306 29944000000 29945495768 4174196224 4175691992
+89835000000 89839487442 29945000000 29946495814 4175196224 4176692038
+89838000000 89842487617 29946000000 29947495872 4176196224 4177692096
+89841000000 89845487739 29947000000 29948495913 4177196224 4178692137
+89844000000 89848487889 29948000000 29949495963 4178196224 4179692187
+89847000000 89851488037 29949000000 29950496012 4179196224 4180692236
+89850000000 89854488243 29950000000 29951496081 4180196224 4181692305
+89853000000 89857488357 29951000000 29952496119 4181196224 4182692343
+89856000000 89860488489 29952000000 29953496163 4182196224 4183692387
+89859000000 89863488663 29953000000 29954496221 4183196224 4184692445
+89862000000 89866488782 29954000000 29955496260 4184196224 4185692484
+89865000000 89869488906 29955000000 29956496302 4185196224 4186692526
+89868000000 89872489125 29956000000 29957496375 4186196224 4187692599
+89871000000 89875489261 29957000000 29958496420 4187196224 4188692644
+89874000000 89878489412 29958000000 29959496470 4188196224 4189692694
+89877000000 89881489572 29959000000 29960496524 4189196224 4190692748
+89880000000 89884489693 29960000000 29961496564 4190196224 4191692788
+89883000000 89887489774 29961000000 29962496591 4191196224 4192692815
+89886000000 89890489982 29962000000 29963496660 4192196224 4193692884
+89889000000 89893490137 29963000000 29964496712 4193196224 4194692936
+89892000000 89896490296 29964000000 29965496765 4194196224 4195692989
+89895000000 89899490448 29965000000 29966496816 4195196224 4196693040
+89898000000 89902490570 29966000000 29967496856 4196196224 4197693080
+89901000000 89905490748 29967000000 29968496916 4197196224 4198693140
+89904000000 89908490897 29968000000 29969496965 4198196224 4199693189
+89907000000 89911491025 29969000000 29970497008 4199196224 4200693232
+89910000000 89914491194 29970000000 29971497064 4200196224 4201693288
+89913000000 89917491314 29971000000 29972497104 4201196224 4202693328
+89916000000 89920491241 29972000000 29973497080 4202196224 4203693304
+89919000000 89923491564 29973000000 29974497188 4203196224 4204693412
+89922000000 89926491817 29974000000 29975497272 4204196224 4205693496
+89925000000 89929491927 29975000000 29976497309 4205196224 4206693533
+89928000000 89932492106 29976000000 29977497368 4206196224 4207693592
+89931000000 89935492154 29977000000 29978497384 4207196224 4208693608
+89934000000 89938492408 29978000000 29979497469 4208196224 4209693693
+89937000000 89941492527 29979000000 29980497509 4209196224 4210693733
+89940000000 89944492698 29980000000 29981497566 4210196224 4211693790
+89943000000 89947492845 29981000000 29982497615 4211196224 4212693839
+89946000000 89950492998 29982000000 29983497666 4212196224 4213693890
+89949000000 89953493144 29983000000 29984497714 4213196224 4214693938
+89952000000 89956493288 29984000000 29985497762 4214196224 4215693986
+89955000000 89959493451 29985000000 29986497817 4215196224 4216694041
+89958000000 89962493603 29986000000 29987497867 4216196224 4217694091
+89961000000 89965493757 29987000000 29988497919 4217196224 4218694143
+89964000000 89968493877 29988000000 29989497959 4218196224 4219694183
+89967000000 89971494086 29989000000 29990498028 4219196224 4220694252
+89970000000 89974494216 29990000000 29991498072 4220196224 4221694296
+89973000000 89977494330 29991000000 29992498110 4221196224 4222694334
+89976000000 89980494491 29992000000 29993498163 4222196224 4223694387
+89979000000 89983494626 29993000000 29994498208 4223196224 4224694432
+89982000000 89986494769 29994000000 29995498256 4224196224 4225694480
+89985000000 89989494869 29995000000 29996498289 4225196224 4226694513
+89988000000 89992495103 29996000000 29997498367 4226196224 4227694591
+89991000000 89995495176 29997000000 29998498392 4227196224 4228694616
+89994000000 89998495297 29998000000 29999498432 4228196224 4229694656
+89997000000 90001495486 29999000000 30000498495 4229196224 4230694719
+90000000000 90004495640 30000000000 30001498546 4230196224 4231694770
+90003000000 90007495819 30001000000 30002498606 4231196224 4232694830
+90006000000 90010495965 30002000000 30003498655 4232196224 4233694879
+90009000000 90013496092 30003000000 30004498697 4233196224 4234694921
+90012000000 90016496266 30004000000 30005498755 4234196224 4235694979
+90015000000 90019496330 30005000000 30006498776 4235196224 4236695000
+90018000000 90022496537 30006000000 30007498845 4236196224 4237695069
+90021000000 90025496718 30007000000 30008498906 4237196224 4238695130
+90024000000 90028496867 30008000000 30009498955 4238196224 4239695179
+90027000000 90031496924 30009000000 30010498974 4239196224 4240695198
+90030000000 90034497120 30010000000 30011499040 4240196224 4241695264
+90033000000 90037497310 30011000000 30012499103 4241196224 4242695327
+90036000000 90040497455 30012000000 30013499151 4242196224 4243695375
+90039000000 90043497627 30013000000 30014499209 4243196224 4244695433
+90042000000 90046497760 30014000000 30015499253 4244196224 4245695477
+90045000000 90049497831 30015000000 30016499277 4245196224 4246695501
+90048000000 90052498057 30016000000 30017499352 4246196224 4247695576
+90051000000 90055498217 30017000000 30018499405 4247196224 4248695629
+90054000000 90058498349 30018000000 30019499449 4248196224 4249695673
+90057000000 90061498457 30019000000 30020499485 4249196224 4250695709
+90060000000 90064498668 30020000000 30021499556 4250196224 4251695780
+90063000000 90067498834 30021000000 30022499611 4251196224 4252695835
+90066000000 90070498945 30022000000 30023499648 4252196224 4253695872
+90069000000 90073499105 30023000000 30024499701 4253196224 4254695925
+90072000000 90076499217 30024000000 30025499739 4254196224 4255695963
+90075000000 90079499415 30025000000 30026499805 4255196224 4256696029
+90078000000 90082499505 30026000000 30027499835 4256196224 4257696059
+90081000000 90085499730 30027000000 30028499910 4257196224 4258696134
+90084000000 90088499862 30028000000 30029499954 4258196224 4259696178
+90087000000 90091500001 30029000000 30030500000 4259196224 4260696224
+90090000000 90094500052 30030000000 30031500017 4260196224 4261696241
+90093000000 90097500263 30031000000 30032500087 4261196224 4262696311
+90096000000 90100500472 30032000000 30033500157 4262196224 4263696381
+90099000000 90103500600 30033000000 30034500200 4263196224 4264696424
+90102000000 90106500743 30034000000 30035500247 4264196224 4265696471
+90105000000 90109500914 30035000000 30036500304 4265196224 4266696528
+90108000000 90112501011 30036000000 30037500337 4266196224 4267696561
+90111000000 90115501224 30037000000 30038500408 4267196224 4268696632
+90114000000 90118501354 30038000000 30039500451 4268196224 4269696675
+90117000000 90121501504 30039000000 30040500501 4269196224 4270696725
+90120000000 90124501664 30040000000 30041500554 4270196224 4271696778
+90123000000 90127501760 30041000000 30042500586 4271196224 4272696810
+90126000000 90130501948 30042000000 30043500649 4272196224 4273696873
+90129000000 90133502116 30043000000 30044500705 4273196224 4274696929
+90132000000 90136502252 30044000000 30045500750 4274196224 4275696974
+90135000000 90139502427 30045000000 30046500809 4275196224 4276697033
+90138000000 90142502549 30046000000 30047500849 4276196224 4277697073
+90141000000 90145502699 30047000000 30048500899 4277196224 4278697123
+90144000000 90148502847 30048000000 30049500949 4278196224 4279697173
+90147000000 90151503053 30049000000 30050501017 4279196224 4280697241
+90150000000 90154503167 30050000000 30051501055 4280196224 4281697279
+90153000000 90157503299 30051000000 30052501099 4281196224 4282697323
+90156000000 90160503473 30052000000 30053501157 4282196224 4283697381
+90159000000 90163503592 30053000000 30054501197 4283196224 4284697421
+90162000000 90166503716 30054000000 30055501238 4284196224 4285697462
+90165000000 90169503935 30055000000 30056501311 4285196224 4286697535
+90168000000 90172504071 30056000000 30057501357 4286196224 4287697581
+90171000000 90175504222 30057000000 30058501407 4287196224 4288697631
+90174000000 90178504382 30058000000 30059501460 4288196224 4289697684
+90177000000 90181504503 30059000000 30060501501 4289196224 4290697725
+90180000000 90184504584 30060000000 30061501528 4290196224 4291697752
+90183000000 90187504792 30061000000 30062501597 4291196224 4292697821
+90186000000 90190504947 30062000000 30063501649 4292196224 4293697873
+90189000000 90193505106 30063000000 30064501702 4293196224 4294697926
+90192000000 90196505258 30064000000 30065501752 4294196224 730680
+90195000000 90199505380 30065000000 30066501793 228928 1730721
+90198000000 90202505558 30066000000 30067501852 1228928 2730780
+90201000000 90205505707 30067000000 30068501902 2228928 3730830
+90204000000 90208505835 30068000000 30069501945 3228928 4730873
+90207000000 90211506004 30069000000 30070502001 4228928 5730929
+90210000000 90214506124 30070000000 30071502041 5228928 6730969
+90213000000 90217506051 30071000000 30072502017 6228928 7730945
+90216000000 90220506374 30072000000 30073502124 7228928 8731052
+90219000000 90223506627 30073000000 30074502209 8228928 9731137
+90222000000 90226506737 30074000000 30075502245 9228928 10731173
+90225000000 90229506916 30075000000 30076502305 10228928 11731233
+90228000000 90232506964 30076000000 30077502321 11228928 12731249
+90231000000 90235507218 30077000000 30078502406 12228928 13731334
+90234000000 90238507337 30078000000 30079502445 13228928 14731373
+90237000000 90241507508 30079000000 30080502502 14228928 15731430
+90240000000 90244507655 30080000000 30081502551 15228928 16731479
+90243000000 90247507808 30081000000 30082502602 16228928 17731530
+90246000000 90250507954 30082000000 30083502651 17228928 18731579
+90249000000 90253508098 30083000000 30084502699 18228928 19731627
+90252000000 90256508261 30084000000 30085502753 19228928 20731681
+90255000000 90259508413 30085000000 30086502804 20228928 21731732
+90258000000 90262508567 30086000000 30087502855 21228928 22731783
+90261000000 90265508687 30087000000 30088502895 22228928 23731823
+90264000000 90268508896 30088000000 30089502965 23228928 24731893
+90267000000 90271509026 30089000000 30090503008 24228928 25731936
+90270000000 90274509140 30090000000 30091503046 25228928 26731974
+90273000000 90277509301 30091000000 30092503100 26228928 27732028
+90276000000 90280509436 30092000000 30093503145 27228928 28732073
+90279000000 90283509579 30093000000 30094503193 28228928 29732121
+90282000000 90286509679 30094000000 30095503226 29228928 30732154
+90285000000 90289509913 30095000000 30096503304 30228928 31732232
+90288000000 90292509986 30096000000 30097503328 31228928 32732256
+90291000000 90295510107 30097000000 30098503369 32228928 33732297
+90294000000 90298510296 30098000000 30099503432 33228928 34732360
+90297000000 90301510450 30099000000 30100503483 34228928 35732411
+90300000000 90304510629 30100000000 30101503543 35228928 36732471
+90303000000 90307510775 30101000000 30102503591 36228928 37732519
+90306000000 90310510902 30102000000 30103503634 37228928 38732562
+90309000000 90313511076 30103000000 30104503692 38228928 39732620
+90312000000 90316511140 30104000000 30105503713 39228928 40732641
+90315000000 90319511347 30105000000 30106503782 40228928 41732710
+90318000000 90322511528 30106000000 30107503842 41228928 42732770
+90321000000 90325511677 30107000000 30108503892 42228928 43732820
+90324000000 90328511734 30108000000 30109503911 43228928 44732839
+90327000000 90331511930 30109000000 30110503976 44228928 45732904
+90330000000 90334512120 30110000000 30111504040 45228928 46732968
+90333000000 90337512265 30111000000 30112504088 46228928 47733016
+90336000000 90340512437 30112000000 30113504145 47228928 48733073
+90339000000 90343512570 30113000000 30114504190 48228928 49733118
+90342000000 90346512641 30114000000 30115504213 49228928 50733141
+90345000000 90349512867 30115000000 30116504289 50228928 51733217
+90348000000 90352513027 30116000000 30117504342 51228928 52733270
+90351000000 90355513159 30117000000 30118504386 52228928 53733314
+90354000000 90358513267 30118000000 30119504422 53228928 54733350
+90357000000 90361513478 30119000000 30120504492 54228928 55733420
+90360000000 90364513644 30120000000 30121504548 55228928 56733476
+90363000000 90367513755 30121000000 30122504585 56228928 57733513
+90366000000 90370513915 30122000000 30123504638 57228928 58733566
+90369000000 90373514027 30123000000 30124504675 58228928 59733603
+90372000000 90376514225 30124000000 30125504741 59228928 60733669
+90375000000 90379514315 30125000000 30126504771 60228928 61733699
+90378000000 90382514540 30126000000 30127504846 61228928 62733774
+90381000000 90385514672 30127000000 30128504890 62228928 63733818
+90384000000 90388514811 30128000000 30129504937 63228928 64733865
+90387000000 90391514862 30129000000 30130504954 64228928 65733882
+90390000000 90394515073 30130000000 30131505024 65228928 66733952
+90393000000 90397515282 30131000000 30132505094 66228928 67734022
+90396000000 90400515410 30132000000 30133505136 67228928 68734064
+90399000000 90403515553 30133000000 30134505184 68228928 69734112
+90402000000 90406515724 30134000000 30135505241 69228928 70734169
+90405000000 90409515821 30135000000 30136505273 70228928 71734201
+90408000000 90412516034 30136000000 30137505344 71228928 72734272
+90411000000 90415516164 30137000000 30138505388 72228928 73734316
+90414000000 90418516314 30138000000 30139505438 73228928 74734366
+90417000000 90421516474 30139000000 30140505491 74228928 75734419
+90420000000 90424516570 30140000000 30141505523 75228928 76734451
+90423000000 90427516758 30141000000 30142505586 76228928 77734514
+90426000000 90430516926 30142000000 30143505642 77228928 78734570
+90429000000 90433517062 30143000000 30144505687 78228928 79734615
+90432000000 90436517237 30144000000 30145505745 79228928 80734673
+90435000000 90439517359 30145000000 30146505786 80228928 81734714
+90438000000 90442517509 30146000000 30147505836 81228928 82734764
+90441000000 90445517657 30147000000 30148505885 82228928 83734813
+90444000000 90448517863 30148000000 30149505954 83228928 84734882
+90447000000 90451517977 30149000000 30150505992 84228928 85734920
+90450000000 90454518109 30150000000 30151506036 85228928 86734964
+90453000000 90457518283 30151000000 30152506094 86228928 87735022
+90456000000 90460518402 30152000000 30153506134 87228928 88735062
+90459000000 90463518526 30153000000 30154506175 88228928 89735103
+90462000000 90466518745 30154000000 30155506248 89228928 90735176
+90465000000 90469518881 30155000000 30156506293 90228928 91735221
+90468000000 90472519032 30156000000 30157506344 91228928 92735272
+90471000000 90475519192 30157000000 30158506397 92228928 93735325
+90474000000 90478519313 30158000000 30159506437 93228928 94735365
+90477000000 90481519394 30159000000 30160506464 94228928 95735392
+90480000000 90484519602 30160000000 30161506534 95228928 96735462
+90483000000 90487519757 30161000000 30162506585 96228928 97735513
+90486000000 90490519916 30162000000 30163506638 97228928 98735566
+90489000000 90493520068 30163000000 30164506689 98228928 99735617
+90492000000 90496520190 30164000000 30165506730 99228928 100735658
+90495000000 90499520368 30165000000 30166506789 100228928 101735717
+90498000000 90502520517 30166000000 30167506839 101228928 102735767
+90501000000 90505520645 30167000000 30168506881 102228928 103735809
+90504000000 90508520814 30168000000 30169506938 103228928 104735866
+90507000000 90511520934 30169000000 30170506978 104228928 105735906
+90510000000 90514520861 30170000000 30171506953 105228928 106735881
+90513000000 90517521184 30171000000 30172507061 106228928 107735989
+90516000000 90520521437 30172000000 30173507145 107228928 108736073
+90519000000 90523521547 30173000000 30174507182 108228928 109736110
+90522000000 90526521726 30174000000 30175507242 109228928 110736170
+90525000000 90529521774 30175000000 30176507258 110228928 111736186
+90528000000 90532522028 30176000000 30177507342 111228928 112736270
+90531000000 90535522147 30177000000 30178507382 112228928 113736310
+90534000000 90538522318 30178000000 30179507439 113228928 114736367
+90537000000 90541522465 30179000000 30180507488 114228928 115736416
+90540000000 90544522618 30180000000 30181507539 115228928 116736467
+90543000000 90547522764 30181000000 30182507588 116228928 117736516
+90546000000 90550522908 30182000000 30183507636 117228928 118736564
+90549000000 90553523071 30183000000 30184507690 118228928 119736618
+90552000000 90556523223 30184000000 30185507741 119228928 120736669
+90555000000 90559523377 30185000000 30186507792 120228928 121736720
+90558000000 90562523497 30186000000 30187507832 121228928 122736760
+90561000000 90565523706 30187000000 30188507902 122228928 123736830
+90564000000 90568523836 30188000000 30189507945 123228928 124736873
+90567000000 90571523950 30189000000 30190507983 124228928 125736911
+90570000000 90574524111 30190000000 30191508037 125228928 126736965
+90573000000 90577524246 30191000000 30192508082 126228928 127737010
+90576000000 90580524389 30192000000 30193508129 127228928 128737057
+90579000000 90583524489 30193000000 30194508163 128228928 129737091
+90582000000 90586524723 30194000000 30195508241 129228928 130737169
+90585000000 90589524796 30195000000 30196508265 130228928 131737193
+90588000000 90592524917 30196000000 30197508305 131228928 132737233
+90591000000 90595525106 30197000000 30198508368 132228928 133737296
+90594000000 90598525260 30198000000 30199508420 133228928 134737348
+90597000000 90601525439 30199000000 30200508479 134228928 135737407
+90600000000 90604525585 30200000000 30201508528 135228928 136737456
+90603000000 90607525712 30201000000 30202508570 136228928 137737498
+90606000000 90610525886 30202000000 30203508628 137228928 138737556
+90609000000 90613525950 30203000000 30204508650 138228928 139737578
+90612000000 90616526157 30204000000 30205508719 139228928 140737647
+90615000000 90619526338 30205000000 30206508779 140228928 141737707
+90618000000 90622526487 30206000000 30207508829 141228928 142737757
+90621000000 90625526544 30207000000 30208508848 142228928 143737776
+90624000000 90628526740 30208000000 30209508913 143228928 144737841
+90627000000 90631526930 30209000000 30210508976 144228928 145737904
+90630000000 90634527075 30210000000 30211509025 145228928 146737953
+90633000000 90637527247 30211000000 30212509082 146228928 147738010
+90636000000 90640527380 30212000000 30213509126 147228928 148738054
+90639000000 90643527451 30213000000 30214509150 148228928 149738078
+90642000000 90646527677 30214000000 30215509225 149228928 150738153
+90645000000 90649527837 30215000000 30216509279 150228928 151738207
+90648000000 90652527969 30216000000 30217509323 151228928 152738251
+90651000000 90655528077 30217000000 30218509359 152228928 153738287
+90654000000 90658528288 30218000000 30219509429 153228928 154738357
+90657000000 90661528454 30219000000 30220509484 154228928 155738412
+90660000000 90664528565 30220000000 30221509521 155228928 156738449
+90663000000 90667528725 30221000000 30222509575 156228928 157738503
+90666000000 90670528837 30222000000 30223509612 157228928 158738540
+90669000000 90673529035 30223000000 30224509678 158228928 159738606
+90672000000 90676529125 30224000000 30225509708 159228928 160738636
+90675000000 90679529350 30225000000 30226509783 160228928 161738711
+90678000000 90682529482 30226000000 30227509827 161228928 162738755
+90681000000 90685529621 30227000000 30228509873 162228928 163738801
+90684000000 90688529672 30228000000 30229509890 163228928 164738818
+90687000000 90691529883 30229000000 30230509961 164228928 165738889
+90690000000 90694530092 30230000000 30231510030 165228928 166738958
+90693000000 90697530220 30231000000 30232510073 166228928 167739001
+90696000000 90700530363 30232000000 30233510121 167228928 168739049
+90699000000 90703530534 30233000000 30234510178 168228928 169739106
+90702000000 90706530631 30234000000 30235510210 169228928 170739138
+90705000000 90709530844 30235000000 30236510281 170228928 171739209
+90708000000 90712530974 30236000000 30237510324 171228928 172739252
+90711000000 90715531124 30237000000 30238510374 172228928 173739302
+90714000000 90718531284 30238000000 30239510428 173228928 174739356
+90717000000 90721531380 30239000000 30240510460 174228928 175739388
+90720000000 90724531568 30240000000 30241510522 175228928 176739450
+90723000000 90727531736 30241000000 30242510578 176228928 177739506
+90726000000 90730531872 30242000000 30243510624 177228928 178739552
+90729000000 90733532047 30243000000 30244510682 178228928 179739610
+90732000000 90736532169 30244000000 30245510723 179228928 180739651
+90735000000 90739532319 30245000000 30246510773 180228928 181739701
+90738000000 90742532467 30246000000 30247510822 181228928 182739750
+90741000000 90745532673 30247000000 30248510891 182228928 183739819
+90744000000 90748532787 30248000000 30249510929 183228928 184739857
+90747000000 90751532919 30249000000 30250510973 184228928 185739901
+90750000000 90754533093 30250000000 30251511031 185228928 186739959
+90753000000 90757533212 30251000000 30252511070 186228928 187739998
+90756000000 90760533336 30252000000 30253511112 187228928 188740040
+90759000000 90763533555 30253000000 30254511185 188228928 189740113
+90762000000 90766533691 30254000000 30255511230 189228928 190740158
+90765000000 90769533842 30255000000 30256511280 190228928 191740208
+90768000000 90772534002 30256000000 30257511334 191228928 192740262
+90771000000 90775534123 30257000000 30258511374 192228928 193740302
+90774000000 90778534204 30258000000 30259511401 193228928 194740329
+90777000000 90781534412 30259000000 30260511470 194228928 195740398
+90780000000 90784534567 30260000000 30261511522 195228928 196740450
+90783000000 90787534726 30261000000 30262511575 196228928 197740503
+90786000000 90790534878 30262000000 30263511626 197228928 198740554
+90789000000 90793535000 30263000000 30264511666 198228928 199740594
+90792000000 90796535178 30264000000 30265511726 199228928 200740654
+90795000000 90799535327 30265000000 30266511775 200228928 201740703
+90798000000 90802535455 30266000000 30267511818 201228928 202740746
+90801000000 90805535624 30267000000 30268511874 202228928 203740802
+90804000000 90808535744 30268000000 30269511914 203228928 204740842
+90807000000 90811535671 30269000000 30270511890 204228928 205740818
+90810000000 90814535994 30270000000 30271511998 205228928 206740926
+90813000000 90817536247 30271000000 30272512082 206228928 207741010
+90816000000 90820536357 30272000000 30273512119 207228928 208741047
+90819000000 90823536536 30273000000 30274512178 208228928 209741106
+90822000000 90826536584 30274000000 30275512194 209228928 210741122
+90825000000 90829536838 30275000000 30276512279 210228928 211741207
+90828000000 90832536957 30276000000 30277512319 211228928 212741247
+90831000000 90835537128 30277000000 30278512376 212228928 213741304
+90834000000 90838537275 30278000000 30279512425 213228928 214741353
+90837000000 90841537428 30279000000 30280512476 214228928 215741404
+90840000000 90844537574 30280000000 30281512524 215228928 216741452
+90843000000 90847537718 30281000000 30282512572 216228928 217741500
+90846000000 90850537881 30282000000 30283512627 217228928 218741555
+90849000000 90853538033 30283000000 30284512677 218228928 219741605
+90852000000 90856538187 30284000000 30285512729 219228928 220741657
+90855000000 90859538307 30285000000 30286512769 220228928 221741697
+90858000000 90862538516 30286000000 30287512838 221228928 222741766
+90861000000 90865538646 30287000000 30288512882 222228928 223741810
+90864000000 90868538760 30288000000 30289512920 223228928 224741848
+90867000000 90871538921 30289000000 30290512973 224228928 225741901
+90870000000 90874539056 30290000000 30291513018 225228928 226741946
+90873000000 90877539199 30291000000 30292513066 226228928 227741994
+90876000000 90880539299 30292000000 30293513099 227228928 228742027
+90879000000 90883539533 30293000000 30294513177 228228928 229742105
+90882000000 90886539606 30294000000 30295513202 229228928 230742130
+90885000000 90889539727 30295000000 30296513242 230228928 231742170
+90888000000 90892539916 30296000000 30297513305 231228928 232742233
+90891000000 90895540070 30297000000 30298513356 232228928 233742284
+90894000000 90898540249 30298000000 30299513416 233228928 234742344
+90897000000 90901540395 30299000000 30300513465 234228928 235742393
+90900000000 90904540522 30300000000 30301513507 235228928 236742435
+90903000000 90907540696 30301000000 30302513565 236228928 237742493
+90906000000 90910540760 30302000000 30303513586 237228928 238742514
+90909000000 90913540967 30303000000 30304513655 238228928 239742583
+90912000000 90916541148 30304000000 30305513716 239228928 240742644
+90915000000 90919541297 30305000000 30306513765 240228928 241742693
+90918000000 90922541354 30306000000 30307513784 241228928 242742712
+90921000000 90925541550 30307000000 30308513850 242228928 243742778
+90924000000 90928541740 30308000000 30309513913 243228928 244742841
+90927000000 90931541885 30309000000 30310513961 244228928 245742889
+90930000000 90934542057 30310000000 30311514019 245228928 246742947
+90933000000 90937542190 30311000000 30312514063 246228928 247742991
+90936000000 90940542261 30312000000 30313514087 247228928 248743015
+90939000000 90943542487 30313000000 30314514162 248228928 249743090
+90942000000 90946542647 30314000000 30315514215 249228928 250743143
+90945000000 90949542779 30315000000 30316514259 250228928 251743187
+90948000000 90952542887 30316000000 30317514295 251228928 252743223
+90951000000 90955543098 30317000000 30318514366 252228928 253743294
+90954000000 90958543264 30318000000 30319514421 253228928 254743349
+90957000000 90961543375 30319000000 30320514458 254228928 255743386
+90960000000 90964543535 30320000000 30321514511 255228928 256743439
+90963000000 90967543647 30321000000 30322514549 256228928 257743477
+90966000000 90970543845 30322000000 30323514615 257228928 258743543
+90969000000 90973543935 30323000000 30324514645 258228928 259743573
+90972000000 90976544160 30324000000 30325514720 259228928 260743648
+90975000000 90979544292 30325000000 30326514764 260228928 261743692
+90978000000 90982544431 30326000000 30327514810 261228928 262743738
+90981000000 90985544482 30327000000 30328514827 262228928 263743755
+90984000000 90988544693 30328000000 30329514897 263228928 264743825
+90987000000 90991544902 30329000000 30330514967 264228928 265743895
+90990000000 90994545030 30330000000 30331515010 265228928 266743938
+90993000000 90997545173 30331000000 30332515057 266228928 267743985
+90996000000 91000545344 30332000000 30333515114 267228928 268744042
+90999000000 91003545441 30333000000 30334515147 268228928 269744075
+91002000000 91006545654 30334000000 30335515218 269228928 270744146
+91005000000 91009545784 30335000000 30336515261 270228928 271744189
+91008000000 91012545934 30336000000 30337515311 271228928 272744239
+91011000000 91015546094 30337000000 30338515364 272228928 273744292
+91014000000 91018546190 30338000000 30339515396 273228928 274744324
+91017000000 91021546378 30339000000 30340515459 274228928 275744387
+91020000000 91024546546 30340000000 30341515515 275228928 276744443
+91023000000 91027546682 30341000000 30342515560 276228928 277744488
+91026000000 91030546857 30342000000 30343515619 277228928 278744547
+91029000000 91033546979 30343000000 30344515659 278228928 279744587
+91032000000 91036547129 30344000000 30345515709 279228928 280744637
+91035000000 91039547277 30345000000 30346515759 280228928 281744687
+91038000000 91042547483 30346000000 30347515827 281228928 282744755
+91041000000 91045547597 30347000000 30348515865 282228928 283744793
+91044000000 91048547729 30348000000 30349515909 283228928 284744837
+91047000000 91051547903 30349000000 30350515967 284228928 285744895
+91050000000 91054548022 30350000000 30351516007 285228928 286744935
+91053000000 91057548146 30351000000 30352516048 286228928 287744976
+91056000000 91060548365 30352000000 30353516121 287228928 288745049
+91059000000 91063548501 30353000000 30354516167 288228928 289745095
+91062000000 91066548652 30354000000 30355516217 289228928 290745145
+91065000000 91069548812 30355000000 30356516270 290228928 291745198
+91068000000 91072548933 30356000000 30357516311 291228928 292745239
+91071000000 91075549014 30357000000 30358516338 292228928 293745266
+91074000000 91078549222 30358000000 30359516407 293228928 294745335
+91077000000 91081549377 30359000000 30360516459 294228928 295745387
+91080000000 91084549536 30360000000 30361516512 295228928 296745440
+91083000000 91087549688 30361000000 30362516562 296228928 297745490
+91086000000 91090549810 30362000000 30363516603 297228928 298745531
+91089000000 91093549988 30363000000 30364516662 298228928 299745590
+91092000000 91096550137 30364000000 30365516712 299228928 300745640
+91095000000 91099550265 30365000000 30366516755 300228928 301745683
+91098000000 91102550434 30366000000 30367516811 301228928 302745739
+91101000000 91105550554 30367000000 30368516851 302228928 303745779
+91104000000 91108550481 30368000000 30369516827 303228928 304745755
+91107000000 91111550804 30369000000 30370516934 304228928 305745862
+91110000000 91114551057 30370000000 30371517019 305228928 306745947
+91113000000 91117551167 30371000000 30372517055 306228928 307745983
+91116000000 91120551346 30372000000 30373517115 307228928 308746043
+91119000000 91123551394 30373000000 30374517131 308228928 309746059
+91122000000 91126551648 30374000000 30375517216 309228928 310746144
+91125000000 91129551767 30375000000 30376517255 310228928 311746183
+91128000000 91132551938 30376000000 30377517312 311228928 312746240
+91131000000 91135552085 30377000000 30378517361 312228928 313746289
+91134000000 91138552238 30378000000 30379517412 313228928 314746340
+91137000000 91141552384 30379000000 30380517461 314228928 315746389
+91140000000 91144552528 30380000000 30381517509 315228928 316746437
+91143000000 91147552691 30381000000 30382517563 316228928 317746491
+91146000000 91150552843 30382000000 30383517614 317228928 318746542
+91149000000 91153552997 30383000000 30384517665 318228928 319746593
+91152000000 91156553117 30384000000 30385517705 319228928 320746633
+91155000000 91159553326 30385000000 30386517775 320228928 321746703
+91158000000 91162553456 30386000000 30387517818 321228928 322746746
+91161000000 91165553570 30387000000 30388517856 322228928 323746784
+91164000000 91168553731 30388000000 30389517910 323228928 324746838
+91167000000 91171553866 30389000000 30390517955 324228928 325746883
+91170000000 91174554009 30390000000 30391518003 325228928 326746931
+91173000000 91177554109 30391000000 30392518036 326228928 327746964
+91176000000 91180554343 30392000000 30393518114 327228928 328747042
+91179000000 91183554416 30393000000 30394518138 328228928 329747066
+91182000000 91186554537 30394000000 30395518179 329228928 330747107
+91185000000 91189554726 30395000000 30396518242 330228928 331747170
+91188000000 91192554880 30396000000 30397518293 331228928 332747221
+91191000000 91195555059 30397000000 30398518353 332228928 333747281
+91194000000 91198555205 30398000000 30399518401 333228928 334747329
+91197000000 91201555332 30399000000 30400518444 334228928 335747372
+91200000000 91204555506 30400000000 30401518502 335228928 336747430
+91203000000 91207555570 30401000000 30402518523 336228928 337747451
+91206000000 91210555777 30402000000 30403518592 337228928 338747520
+91209000000 91213555958 30403000000 30404518652 338228928 339747580
+91212000000 91216556107 30404000000 30405518702 339228928 340747630
+91215000000 91219556164 30405000000 30406518721 340228928 341747649
+91218000000 91222556360 30406000000 30407518786 341228928 342747714
+91221000000 91225556550 30407000000 30408518850 342228928 343747778
+91224000000 91228556695 30408000000 30409518898 343228928 344747826
+91227000000 91231556867 30409000000 30410518955 344228928 345747883
+91230000000 91234557000 30410000000 30411519000 345228928 346747928
+91233000000 91237557071 30411000000 30412519023 346228928 347747951
+91236000000 91240557297 30412000000 30413519099 347228928 348748027
+91239000000 91243557457 30413000000 30414519152 348228928 349748080
+91242000000 91246557589 30414000000 30415519196 349228928 350748124
+91245000000 91249557697 30415000000 30416519232 350228928 351748160
+91248000000 91252557908 30416000000 30417519302 351228928 352748230
+91251000000 91255558074 30417000000 30418519358 352228928 353748286
+91254000000 91258558185 30418000000 30419519395 353228928 354748323
+91257000000 91261558345 30419000000 30420519448 354228928 355748376
+91260000000 91264558457 30420000000 30421519485 355228928 356748413
+91263000000 91267558655 30421000000 30422519551 356228928 357748479
+91266000000 91270558745 30422000000 30423519581 357228928 358748509
+91269000000 91273558970 30423000000 30424519656 358228928 359748584
+91272000000 91276559102 30424000000 30425519700 359228928 360748628
+91275000000 91279559241 30425000000 30426519747 360228928 361748675
+91278000000 91282559292 30426000000 30427519764 361228928 362748692
+91281000000 91285559503 30427000000 30428519834 362228928 363748762
+91284000000 91288559712 30428000000 30429519904 363228928 364748832
+91287000000 91291559840 30429000000 30430519946 364228928 365748874
+91290000000 91294559983 30430000000 30431519994 365228928 366748922
+91293000000 91297560154 30431000000 30432520051 366228928 367748979
+91296000000 91300560251 30432000000 30433520083 367228928 368749011
+91299000000 91303560464 30433000000 30434520154 368228928 369749082
+91302000000 91306560594 30434000000 30435520198 369228928 370749126
+91305000000 91309560744 30435000000 30436520248 370228928 371749176
+91308000000 91312560904 30436000000 30437520301 371228928 372749229
+91311000000 91315561000 30437000000 30438520333 372228928 373749261
+91314000000 91318561188 30438000000 30439520396 373228928 374749324
+91317000000 91321561356 30439000000 30440520452 374228928 375749380
+91320000000 91324561492 30440000000 30441520497 375228928 376749425
+91323000000 91327561667 30441000000 30442520555 376228928 377749483
+91326000000 91330561789 30442000000 30443520596 377228928 378749524
+91329000000 91333561939 30443000000 30444520646 378228928 379749574
+91332000000 91336562087 30444000000 30445520695 379228928 380749623
+91335000000 91339562293 30445000000 30446520764 380228928 381749692
+91338000000 91342562407 30446000000 30447520802 381228928 382749730
+91341000000 91345562539 30447000000 30448520846 382228928 383749774
+91344000000 91348562713 30448000000 30449520904 383228928 384749832
+91347000000 91351562832 30449000000 30450520944 384228928 385749872
+91350000000 91354562956 30450000000 30451520985 385228928 386749913
+91353000000 91357563175 30451000000 30452521058 386228928 387749986
+91356000000 91360563311 30452000000 30453521103 387228928 388750031
+91359000000 91363563462 30453000000 30454521154 388228928 389750082
+91362000000 91366563622 30454000000 30455521207 389228928 390750135
+91365000000 91369563743 30455000000 30456521247 390228928 391750175
+91368000000 91372563824 30456000000 30457521274 391228928 392750202
+91371000000 91375564032 30457000000 30458521344 392228928 393750272
+91374000000 91378564187 30458000000 30459521395 393228928 394750323
+91377000000 91381564346 30459000000 30460521448 394228928 395750376
+91380000000 91384564498 30460000000 30461521499 395228928 396750427
+91383000000 91387564620 30461000000 30462521540 396228928 397750468
+91386000000 91390564798 30462000000 30463521599 397228928 398750527
+91389000000 91393564947 30463000000 30464521649 398228928 399750577
+91392000000 91396565075 30464000000 30465521691 399228928 400750619
+91395000000 91399565244 30465000000 30466521748 400228928 401750676
+91398000000 91402565364 30466000000 30467521788 401228928 402750716
+91401000000 91405565291 30467000000 30468521763 402228928 403750691
+91404000000 91408565614 30468000000 30469521871 403228928 404750799
+91407000000 91411565867 30469000000 30470521955 404228928 405750883
+91410000000 91414565977 30470000000 30471521992 405228928 406750920
+91413000000 91417566156 30471000000 30472522052 406228928 407750980
+91416000000 91420566204 30472000000 30473522068 407228928 408750996
+91419000000 91423566458 30473000000 30474522152 408228928 409751080
+91422000000 91426566577 30474000000 30475522192 409228928 410751120
+91425000000 91429566748 30475000000 30476522249 410228928 411751177
+91428000000 91432566895 30476000000 30477522298 411228928 412751226
+91431000000 91435567048 30477000000 30478522349 412228928 413751277
+91434000000 91438567194 30478000000 30479522398 413228928 414751326
+91437000000 91441567338 30479000000 30480522446 414228928 415751374
+91440000000 91444567501 30480000000 30481522500 415228928 416751428
+91443000000 91447567653 30481000000 30482522551 416228928 417751479
+91446000000 91450567807 30482000000 30483522602 417228928 418751530
+91449000000 91453567927 30483000000 30484522642 418228928 419751570
+91452000000 91456568136 30484000000 30485522712 419228928 420751640
+91455000000 91459568266 30485000000 30486522755 420228928 421751683
+91458000000 91462568380 30486000000 30487522793 421228928 422751721
+91461000000 91465568541 30487000000 30488522847 422228928 423751775
+91464000000 91468568676 30488000000 30489522892 423228928 424751820
+91467000000 91471568819 30489000000 30490522939 424228928 425751867
+91470000000 91474568919 30490000000 30491522973 425228928 426751901
+91473000000 91477569153 30491000000 30492523051 426228928 427751979
+91476000000 91480569226 30492000000 30493523075 427228928 428752003
+91479000000 91483569347 30493000000 30494523115 428228928 429752043
+91482000000 91486569536 30494000000 30495523178 429228928 430752106
+91485000000 91489569690 30495000000 30496523230 430228928 431752158
+91488000000 91492569869 30496000000 30497523289 431228928 432752217
+91491000000 91495570015 30497000000 30498523338 432228928 433752266
+91494000000 91498570142 30498000000 30499523380 433228928 434752308
+91497000000 91501570316 30499000000 30500523438 434228928 435752366
+91500000000 91504570380 30500000000 30501523460 435228928 436752388
+91503000000 91507570587 30501000000 30502523529 436228928 437752457
+91506000000 91510570768 30502000000 30503523589 437228928 438752517
+91509000000 91513570917 30503000000 30504523639 438228928 439752567
+91512000000 91516570974 30504000000 30505523658 439228928 440752586
+91515000000 91519571170 30505000000 30506523723 440228928 441752651
+91518000000 91522571360 30506000000 30507523786 441228928 442752714
+91521000000 91525571505 30507000000 30508523835 442228928 443752763
+91524000000 91528571677 30508000000 30509523892 443228928 444752820
+91527000000 91531571810 30509000000 30510523936 444228928 445752864
+91530000000 91534571881 30510000000 30511523960 445228928 446752888
+91533000000 91537572107 30511000000 30512524035 446228928 447752963
+91536000000 91540572267 30512000000 30513524089 447228928 448753017
+91539000000 91543572399 30513000000 30514524133 448228928 449753061
+91542000000 91546572507 30514000000 30515524169 449228928 450753097
+91545000000 91549572718 30515000000 30516524239 450228928 451753167
+91548000000 91552572884 30516000000 30517524294 451228928 452753222
+91551000000 91555572995 30517000000 30518524331 452228928 453753259
+91554000000 91558573155 30518000000 30519524385 453228928 454753313
+91557000000 91561573267 30519000000 30520524422 454228928 455753350
+91560000000 91564573465 30520000000 30521524488 455228928 456753416
+91563000000 91567573555 30521000000 30522524518 456228928 457753446
+91566000000 91570573780 30522000000 30523524593 457228928 458753521
+91569000000 91573573912 30523000000 30524524637 458228928 459753565
+91572000000 91576574051 30524000000 30525524683 459228928 460753611
+91575000000 91579574102 30525000000 30526524700 460228928 461753628
+91578000000 91582574313 30526000000 30527524771 461228928 462753699
+91581000000 91585574522 30527000000 30528524840 462228928 463753768
+91584000000 91588574650 30528000000 30529524883 463228928 464753811
+91587000000 91591574793 30529000000 30530524931 464228928 465753859
+91590000000 91594574964 30530000000 30531524988 465228928 466753916
+91593000000 91597575061 30531000000 30532525020 466228928 467753948
+91596000000 91600575274 30532000000 30533525091 467228928 468754019
+91599000000 91603575404 30533000000 30534525134 468228928 469754062
+91602000000 91606575554 30534000000 30535525184 469228928 470754112
+91605000000 91609575714 30535000000 30536525238 470228928 471754166
+91608000000 91612575810 30536000000 30537525270 471228928 472754198
+91611000000 91615575998 30537000000 30538525332 472228928 473754260
+91614000000 91618576166 30538000000 30539525388 473228928 474754316
+91617000000 91621576302 30539000000 30540525434 474228928 475754362
+91620000000 91624576477 30540000000 30541525492 475228928 476754420
+91623000000 91627576599 30541000000 30542525533 476228928 477754461
+91626000000 91630576749 30542000000 30543525583 477228928 478754511
+91629000000 91633576897 30543000000 30544525632 478228928 479754560
+91632000000 91636577103 30544000000 30545525701 479228928 480754629
+91635000000 91639577217 30545000000 30546525739 480228928 481754667
+91638000000 91642577349 30546000000 30547525783 481228928 482754711
+91641000000 91645577523 30547000000 30548525841 482228928 483754769
+91644000000 91648577642 30548000000 30549525880 483228928 484754808
+91647000000 91651577766 30549000000 30550525922 484228928 485754850
+91650000000 91654577985 30550000000 30551525995 485228928 486754923
+91653000000 91657578121 30551000000 30552526040 486228928 487754968
+91656000000 91660578272 30552000000 30553526090 487228928 488755018
+91659000000 91663578432 30553000000 30554526144 488228928 489755072
+91662000000 91666578553 30554000000 30555526184 489228928 490755112
+91665000000 91669578634 30555000000 30556526211 490228928 491755139
+91668000000 91672578842 30556000000 30557526280 491228928 492755208
+91671000000 91675578997 30557000000 30558526332 492228928 493755260
+91674000000 91678579156 30558000000 30559526385 493228928 494755313
+91677000000 91681579308 30559000000 30560526436 494228928 495755364
+91680000000 91684579430 30560000000 30561526476 495228928 496755404
+91683000000 91687579608 30561000000 30562526536 496228928 497755464
+91686000000 91690579757 30562000000 30563526585 497228928 498755513
+91689000000 91693579885 30563000000 30564526628 498228928 499755556
+91692000000 91696580054 30564000000 30565526684 499228928 500755612
+91695000000 91699580174 30565000000 30566526724 500228928 501755652
+91698000000 91702580101 30566000000 30567526700 501228928 502755628
+91701000000 91705580424 30567000000 30568526808 502228928 503755736
+91704000000 91708580677 30568000000 30569526892 503228928 504755820
+91707000000 91711580787 30569000000 30570526929 504228928 505755857
+91710000000 91714580966 30570000000 30571526988 505228928 506755916
+91713000000 91717581014 30571000000 30572527004 506228928 507755932
+91716000000 91720581268 30572000000 30573527089 507228928 508756017
+91719000000 91723581387 30573000000 30574527129 508228928 509756057
+91722000000 91726581558 30574000000 30575527186 509228928 510756114
+91725000000 91729581705 30575000000 30576527235 510228928 511756163
+91728000000 91732581858 30576000000 30577527286 511228928 512756214
+91731000000 91735582004 30577000000 30578527334 512228928 513756262
+91734000000 91738582148 30578000000 30579527382 513228928 514756310
+91737000000 91741582311 30579000000 30580527437 514228928 515756365
+91740000000 91744582463 30580000000 30581527487 515228928 516756415
+91743000000 91747582617 30581000000 30582527539 516228928 517756467
+91746000000 91750582737 30582000000 30583527579 517228928 518756507
+91749000000 91753582946 30583000000 30584527648 518228928 519756576
+91752000000 91756583076 30584000000 30585527692 519228928 520756620
+91755000000 91759583190 30585000000 30586527730 520228928 521756658
+91758000000 91762583351 30586000000 30587527783 521228928 522756711
+91761000000 91765583486 30587000000 30588527828 522228928 523756756
+91764000000 91768583629 30588000000 30589527876 523228928 524756804
+91767000000 91771583729 30589000000 30590527909 524228928 525756837
+91770000000 91774583963 30590000000 30591527987 525228928 526756915
+91773000000 91777584036 30591000000 30592528012 526228928 527756940
+91776000000 91780584157 30592000000 30593528052 527228928 528756980
+91779000000 91783584346 30593000000 30594528115 528228928 529757043
+91782000000 91786584500 30594000000 30595528166 529228928 530757094
+91785000000 91789584679 30595000000 30596528226 530228928 531757154
+91788000000 91792584825 30596000000 30597528275 531228928 532757203
+91791000000 91795584952 30597000000 30598528317 532228928 533757245
+91794000000 91798585126 30598000000 30599528375 533228928 534757303
+91797000000 91801585190 30599000000 30600528396 534228928 535757324
+91800000000 91804585397 30600000000 30601528465 535228928 536757393
+91803000000 91807585578 30601000000 30602528526 536228928 537757454
+91806000000 91810585727 30602000000 30603528575 537228928 538757503
+91809000000 91813585784 30603000000 30604528594 538228928 539757522
+91812000000 91816585980 30604000000 30605528660 539228928 540757588
+91815000000 91819586170 30605000000 30606528723 540228928 541757651
+91818000000 91822586315 30606000000 30607528771 541228928 542757699
+91821000000 91825586487 30607000000 30608528829 542228928 543757757
+91824000000 91828586620 30608000000 30609528873 543228928 544757801
+91827000000 91831586691 30609000000 30610528897 544228928 545757825
+91830000000 91834586917 30610000000 30611528972 545228928 546757900
+91833000000 91837587077 30611000000 30612529025 546228928 547757953
+91836000000 91840587209 30612000000 30613529069 547228928 548757997
+91839000000 91843587317 30613000000 30614529105 548228928 549758033
+91842000000 91846587528 30614000000 30615529176 549228928 550758104
+91845000000 91849587694 30615000000 30616529231 550228928 551758159
+91848000000 91852587805 30616000000 30617529268 551228928 552758196
+91851000000 91855587965 30617000000 30618529321 552228928 553758249
+91854000000 91858588077 30618000000 30619529359 553228928 554758287
+91857000000 91861588275 30619000000 30620529425 554228928 555758353
+91860000000 91864588365 30620000000 30621529455 555228928 556758383
+91863000000 91867588590 30621000000 30622529530 556228928 557758458
+91866000000 91870588722 30622000000 30623529574 557228928 558758502
+91869000000 91873588861 30623000000 30624529620 558228928 559758548
+91872000000 91876588912 30624000000 30625529637 559228928 560758565
+91875000000 91879589123 30625000000 30626529707 560228928 561758635
+91878000000 91882589332 30626000000 30627529777 561228928 562758705
+91881000000 91885589460 30627000000 30628529820 562228928 563758748
+91884000000 91888589603 30628000000 30629529867 563228928 564758795
+91887000000 91891589774 30629000000 30630529924 564228928 565758852
+91890000000 91894589871 30630000000 30631529957 565228928 566758885
+91893000000 91897590084 30631000000 30632530028 566228928 567758956
+91896000000 91900590214 30632000000 30633530071 567228928 568758999
+91899000000 91903590364 30633000000 30634530121 568228928 569759049
+91902000000 91906590524 30634000000 30635530174 569228928 570759102
+91905000000 91909590620 30635000000 30636530206 570228928 571759134
+91908000000 91912590808 30636000000 30637530269 571228928 572759197
+91911000000 91915590976 30637000000 30638530325 572228928 573759253
+91914000000 91918591112 30638000000 30639530370 573228928 574759298
+91917000000 91921591287 30639000000 30640530429 574228928 575759357
+91920000000 91924591409 30640000000 30641530469 575228928 576759397
+91923000000 91927591559 30641000000 30642530519 576228928 577759447
+91926000000 91930591707 30642000000 30643530569 577228928 578759497
+91929000000 91933591913 30643000000 30644530637 578228928 579759565
+91932000000 91936592027 30644000000 30645530675 579228928 580759603
+91935000000 91939592159 30645000000 30646530719 580228928 581759647
+91938000000 91942592333 30646000000 30647530777 581228928 582759705
+91941000000 91945592452 30647000000 30648530817 582228928 583759745
+91944000000 91948592576 30648000000 30649530858 583228928 584759786
+91947000000 91951592795 30649000000 30650530931 584228928 585759859
+91950000000 91954592931 30650000000 30651530977 585228928 586759905
+91953000000 91957593082 30651000000 30652531027 586228928 587759955
+91956000000 91960593242 30652000000 30653531080 587228928 588760008
+91959000000 91963593363 30653000000 30654531121 588228928 589760049
+91962000000 91966593444 30654000000 30655531148 589228928 590760076
+91965000000 91969593652 30655000000 30656531217 590228928 591760145
+91968000000 91972593807 30656000000 30657531269 591228928 592760197
+91971000000 91975593966 30657000000 30658531322 592228928 593760250
+91974000000 91978594118 30658000000 30659531372 593228928 594760300
+91977000000 91981594240 30659000000 30660531413 594228928 595760341
+91980000000 91984594418 30660000000 30661531472 595228928 596760400
+91983000000 91987594567 30661000000 30662531522 596228928 597760450
+91986000000 91990594695 30662000000 30663531565 597228928 598760493
+91989000000 91993594864 30663000000 30664531621 598228928 599760549
+91992000000 91996594984 30664000000 30665531661 599228928 600760589
+91995000000 91999594911 30665000000 30666531637 600228928 601760565
+91998000000 92002595234 30666000000 30667531744 601228928 602760672
+92001000000 92005595487 30667000000 30668531829 602228928 603760757
+92004000000 92008595597 30668000000 30669531865 603228928 604760793
+92007000000 92011595776 30669000000 30670531925 604228928 605760853
+92010000000 92014595824 30670000000 30671531941 605228928 606760869
+92013000000 92017596078 30671000000 30672532026 606228928 607760954
+92016000000 92020596197 30672000000 30673532065 607228928 608760993
+92019000000 92023596368 30673000000 30674532122 608228928 609761050
+92022000000 92026596515 30674000000 30675532171 609228928 610761099
+92025000000 92029596668 30675000000 30676532222 610228928 611761150
+92028000000 92032596814 30676000000 30677532271 611228928 612761199
+92031000000 92035596958 30677000000 30678532319 612228928 613761247
+92034000000 92038597121 30678000000 30679532373 613228928 614761301
+92037000000 92041597273 30679000000 30680532424 614228928 615761352
+92040000000 92044597427 30680000000 30681532475 615228928 616761403
+92043000000 92047597547 30681000000 30682532515 616228928 617761443
+92046000000 92050597756 30682000000 30683532585 617228928 618761513
+92049000000 92053597886 30683000000 30684532628 618228928 619761556
+92052000000 92056598000 30684000000 30685532666 619228928 620761594
+92055000000 92059598161 30685000000 30686532720 620228928 621761648
+92058000000 92062598296 30686000000 30687532765 621228928 622761693
+92061000000 92065598439 30687000000 30688532813 622228928 623761741
+92064000000 92068598539 30688000000 30689532846 623228928 624761774
+92067000000 92071598773 30689000000 30690532924 624228928 625761852
+92070000000 92074598846 30690000000 30691532948 625228928 626761876
+92073000000 92077598967 30691000000 30692532989 626228928 627761917
+92076000000 92080599156 30692000000 30693533052 627228928 628761980
+92079000000 92083599310 30693000000 30694533103 628228928 629762031
+92082000000 92086599489 30694000000 30695533163 629228928 630762091
+92085000000 92089599635 30695000000 30696533211 630228928 631762139
+92088000000 92092599762 30696000000 30697533254 631228928 632762182
+92091000000 92095599936 30697000000 30698533312 632228928 633762240
+92094000000 92098600000 30698000000 30699533333 633228928 634762261
+92097000000 92101600207 30699000000 30700533402 634228928 635762330
+92100000000 92104600388 30700000000 30701533462 635228928 636762390
+92103000000 92107600537 30701000000 30702533512 636228928 637762440
+92106000000 92110600594 30702000000 30703533531 637228928 638762459
+92109000000 92113600790 30703000000 30704533596 638228928 639762524
+92112000000 92116600980 30704000000 30705533660 639228928 640762588
+92115000000 92119601125 30705000000 30706533708 640228928 641762636
+92118000000 92122601297 30706000000 30707533765 641228928 642762693
+92121000000 92125601430 30707000000 30708533810 642228928 643762738
+92124000000 92128601501 30708000000 30709533833 643228928 644762761
+92127000000 92131601727 30709000000 30710533909 644228928 645762837
+92130000000 92134601887 30710000000 30711533962 645228928 646762890
+92133000000 92137602019 30711000000 30712534006 646228928 647762934
+92136000000 92140602127 30712000000 30713534042 647228928 648762970
+92139000000 92143602338 30713000000 30714534112 648228928 649763040
+92142000000 92146602504 30714000000 30715534168 649228928 650763096
+92145000000 92149602615 30715000000 30716534205 650228928 651763133
+92148000000 92152602775 30716000000 30717534258 651228928 652763186
+92151000000 92155602887 30717000000 30718534295 652228928 653763223
+92154000000 92158603085 30718000000 30719534361 653228928 654763289
+92157000000 92161603175 30719000000 30720534391 654228928 655763319
+92160000000 92164603400 30720000000 30721534466 655228928 656763394
+92163000000 92167603532 30721000000 30722534510 656228928 657763438
+92166000000 92170603671 30722000000 30723534557 657228928 658763485
+92169000000 92173603722 30723000000 30724534574 658228928 659763502
+92172000000 92176603933 30724000000 30725534644 659228928 660763572
+92175000000 92179604142 30725000000 30726534714 660228928 661763642
+92178000000 92182604270 30726000000 30727534756 661228928 662763684
+92181000000 92185604413 30727000000 30728534804 662228928 663763732
+92184000000 92188604584 30728000000 30729534861 663228928 664763789
+92187000000 92191604681 30729000000 30730534893 664228928 665763821
+92190000000 92194604894 30730000000 30731534964 665228928 666763892
+92193000000 92197605024 30731000000 30732535008 666228928 667763936
+92196000000 92200605174 30732000000 30733535058 667228928 668763986
+92199000000 92203605334 30733000000 30734535111 668228928 669764039
+92202000000 92206605430 30734000000 30735535143 669228928 670764071
+92205000000 92209605618 30735000000 30736535206 670228928 671764134
+92208000000 92212605786 30736000000 30737535262 671228928 672764190
+92211000000 92215605922 30737000000 30738535307 672228928 673764235
+92214000000 92218606097 30738000000 30739535365 673228928 674764293
+92217000000 92221606219 30739000000 30740535406 674228928 675764334
+92220000000 92224606369 30740000000 30741535456 675228928 676764384
+92223000000 92227606517 30741000000 30742535505 676228928 677764433
+92226000000 92230606723 30742000000 30743535574 677228928 678764502
+92229000000 92233606837 30743000000 30744535612 678228928 679764540
+92232000000 92236606969 30744000000 30745535656 679228928 680764584
+92235000000 92239607143 30745000000 30746535714 680228928 681764642
+92238000000 92242607262 30746000000 30747535754 681228928 682764682
+92241000000 92245607386 30747000000 30748535795 682228928 683764723
+92244000000 92248607605 30748000000 30749535868 683228928 684764796
+92247000000 92251607741 30749000000 30750535913 684228928 685764841
+92250000000 92254607892 30750000000 30751535964 685228928 686764892
+92253000000 92257608052 30751000000 30752536017 686228928 687764945
+92256000000 92260608173 30752000000 30753536057 687228928 688764985
+92259000000 92263608254 30753000000 30754536084 688228928 689765012
+92262000000 92266608462 30754000000 30755536154 689228928 690765082
+92265000000 92269608617 30755000000 30756536205 690228928 691765133
+92268000000 92272608776 30756000000 30757536258 691228928 692765186
+92271000000 92275608928 30757000000 30758536309 692228928 693765237
+92274000000 92278609050 30758000000 30759536350 693228928 694765278
+92277000000 92281609228 30759000000 30760536409 694228928 695765337
+92280000000 92284609377 30760000000 30761536459 695228928 696765387
+92283000000 92287609505 30761000000 30762536501 696228928 697765429
+92286000000 92290609674 30762000000 30763536558 697228928 698765486
+92289000000 92293609794 30763000000 30764536598 698228928 699765526
+92292000000 92296609721 30764000000 30765536573 699228928 700765501
+92295000000 92299610044 30765000000 30766536681 700228928 701765609
+92298000000 92302610297 30766000000 30767536765 701228928 702765693
+92301000000 92305610407 30767000000 30768536802 702228928 703765730
+92304000000 92308610586 30768000000 30769536862 703228928 704765790
+92307000000 92311610634 30769000000 30770536878 704228928 705765806
+92310000000 92314610888 30770000000 30771536962 705228928 706765890
+92313000000 92317611007 30771000000 30772537002 706228928 707765930
+92316000000 92320611178 30772000000 30773537059 707228928 708765987
+92319000000 92323611325 30773000000 30774537108 708228928 709766036
+92322000000 92326611478 30774000000 30775537159 709228928 710766087
+92325000000 92329611624 30775000000 30776537208 710228928 711766136
+92328000000 92332611768 30776000000 30777537256 711228928 712766184
+92331000000 92335611931 30777000000 30778537310 712228928 713766238
+92334000000 92338612083 30778000000 30779537361 713228928 714766289
+92337000000 92341612237 30779000000 30780537412 714228928 715766340
+92340000000 92344612357 30780000000 30781537452 715228928 716766380
+92343000000 92347612566 30781000000 30782537522 716228928 717766450
+92346000000 92350612696 30782000000 30783537565 717228928 718766493
+92349000000 92353612810 30783000000 30784537603 718228928 719766531
+92352000000 92356612971 30784000000 30785537657 719228928 720766585
+92355000000 92359613106 30785000000 30786537702 720228928 721766630
+92358000000 92362613249 30786000000 30787537749 721228928 722766677
+92361000000 92365613349 30787000000 30788537783 722228928 723766711
+92364000000 92368613583 30788000000 30789537861 723228928 724766789
+92367000000 92371613656 30789000000 30790537885 724228928 725766813
+92370000000 92374613777 30790000000 30791537925 725228928 726766853
+92373000000 92377613966 30791000000 30792537988 726228928 727766916
+92376000000 92380614120 30792000000 30793538040 727228928 728766968
+92379000000 92383614299 30793000000 30794538099 728228928 729767027
+92382000000 92386614445 30794000000 30795538148 729228928 730767076
+92385000000 92389614572 30795000000 30796538190 730228928 731767118
+92388000000 92392614746 30796000000 30797538248 731228928 732767176
+92391000000 92395614810 30797000000 30798538270 732228928 733767198
+92394000000 92398615017 30798000000 30799538339 733228928 734767267
+92397000000 92401615198 30799000000 30800538399 734228928 735767327
+92400000000 92404615347 30800000000 30801538449 735228928 736767377
+92403000000 92407615404 30801000000 30802538468 736228928 737767396
+92406000000 92410615600 30802000000 30803538533 737228928 738767461
+92409000000 92413615790 30803000000 30804538596 738228928 739767524
+92412000000 92416615935 30804000000 30805538645 739228928 740767573
+92415000000 92419616107 30805000000 30806538702 740228928 741767630
+92418000000 92422616240 30806000000 30807538746 741228928 742767674
+92421000000 92425616311 30807000000 30808538770 742228928 743767698
+92424000000 92428616537 30808000000 30809538845 743228928 744767773
+92427000000 92431616697 30809000000 30810538899 744228928 745767827
+92430000000 92434616829 30810000000 30811538943 745228928 746767871
+92433000000 92437616937 30811000000 30812538979 746228928 747767907
+92436000000 92440617148 30812000000 30813539049 747228928 748767977
+92439000000 92443617314 30813000000 30814539104 748228928 749768032
+92442000000 92446617425 30814000000 30815539141 749228928 750768069
+92445000000 92449617585 30815000000 30816539195 750228928 751768123
+92448000000 92452617697 30816000000 30817539232 751228928 752768160
+92451000000 92455617895 30817000000 30818539298 752228928 753768226
+92454000000 92458617985 30818000000 30819539328 753228928 754768256
+92457000000 92461618210 30819000000 30820539403 754228928 755768331
+92460000000 92464618342 30820000000 30821539447 755228928 756768375
+92463000000 92467618481 30821000000 30822539493 756228928 757768421
+92466000000 92470618532 30822000000 30823539510 757228928 758768438
+92469000000 92473618743 30823000000 30824539581 758228928 759768509
+92472000000 92476618952 30824000000 30825539650 759228928 760768578
+92475000000 92479619080 30825000000 30826539693 760228928 761768621
+92478000000 92482619223 30826000000 30827539741 761228928 762768669
+92481000000 92485619394 30827000000 30828539798 762228928 763768726
+92484000000 92488619491 30828000000 30829539830 763228928 764768758
+92487000000 92491619704 30829000000 30830539901 764228928 765768829
+92490000000 92494619834 30830000000 30831539944 765228928 766768872
+92493000000 92497619984 30831000000 30832539994 766228928 767768922
+92496000000 92500620144 30832000000 30833540048 767228928 768768976
+92499000000 92503620240 30833000000 30834540080 768228928 769769008
+92502000000 92506620428 30834000000 30835540142 769228928 770769070
+92505000000 92509620596 30835000000 30836540198 770228928 771769126
+92508000000 92512620732 30836000000 30837540244 771228928 772769172
+92511000000 92515620907 30837000000 30838540302 772228928 773769230
+92514000000 92518621029 30838000000 30839540343 773228928 774769271
+92517000000 92521621179 30839000000 30840540393 774228928 775769321
+92520000000 92524621327 30840000000 30841540442 775228928 776769370
+92523000000 92527621533 30841000000 30842540511 776228928 777769439
+92526000000 92530621647 30842000000 30843540549 777228928 778769477
+92529000000 92533621779 30843000000 30844540593 778228928 779769521
+92532000000 92536621953 30844000000 30845540651 779228928 780769579
+92535000000 92539622072 30845000000 30846540690 780228928 781769618
+92538000000 92542622196 30846000000 30847540732 781228928 782769660
+92541000000 92545622415 30847000000 30848540805 782228928 783769733
+92544000000 92548622551 30848000000 30849540850 783228928 784769778
+92547000000 92551622702 30849000000 30850540900 784228928 785769828
+92550000000 92554622862 30850000000 30851540954 785228928 786769882
+92553000000 92557622983 30851000000 30852540994 786228928 787769922
+92556000000 92560623064 30852000000 30853541021 787228928 788769949
+92559000000 92563623272 30853000000 30854541090 788228928 789770018
+92562000000 92566623427 30854000000 30855541142 789228928 790770070
+92565000000 92569623586 30855000000 30856541195 790228928 791770123
+92568000000 92572623738 30856000000 30857541246 791228928 792770174
+92571000000 92575623860 30857000000 30858541286 792228928 793770214
+92574000000 92578624038 30858000000 30859541346 793228928 794770274
+92577000000 92581624187 30859000000 30860541395 794228928 795770323
+92580000000 92584624315 30860000000 30861541438 795228928 796770366
+92583000000 92587624484 30861000000 30862541494 796228928 797770422
+92586000000 92590624604 30862000000 30863541534 797228928 798770462
+92589000000 92593624531 30863000000 30864541510 798228928 799770438
+92592000000 92596624854 30864000000 30865541618 799228928 800770546
+92595000000 92599625107 30865000000 30866541702 800228928 801770630
+92598000000 92602625217 30866000000 30867541739 801228928 802770667
+92601000000 92605625396 30867000000 30868541798 802228928 803770726
+92604000000 92608625444 30868000000 30869541814 803228928 804770742
+92607000000 92611625698 30869000000 30870541899 804228928 805770827
+92610000000 92614625817 30870000000 30871541939 805228928 806770867
+92613000000 92617625988 30871000000 30872541996 806228928 807770924
+92616000000 92620626135 30872000000 30873542045 807228928 808770973
+92619000000 92623626288 30873000000 30874542096 808228928 809771024
+92622000000 92626626434 30874000000 30875542144 809228928 810771072
+92625000000 92629626578 30875000000 30876542192 810228928 811771120
+92628000000 92632626741 30876000000 30877542247 811228928 812771175
+92631000000 92635626893 30877000000 30878542297 812228928 813771225
+92634000000 92638627047 30878000000 30879542349 813228928 814771277
+92637000000 92641627167 30879000000 30880542389 814228928 815771317
+92640000000 92644627376 30880000000 30881542458 815228928 816771386
+92643000000 92647627506 30881000000 30882542502 816228928 817771430
+92646000000 92650627620 30882000000 30883542540 817228928 818771468
+92649000000 92653627781 30883000000 30884542593 818228928 819771521
+92652000000 92656627916 30884000000 30885542638 819228928 820771566
+92655000000 92659628059 30885000000 30886542686 820228928 821771614
+92658000000 92662628159 30886000000 30887542719 821228928 822771647
+92661000000 92665628393 30887000000 30888542797 822228928 823771725
+92664000000 92668628466 30888000000 30889542822 823228928 824771750
+92667000000 92671628587 30889000000 30890542862 824228928 825771790
+92670000000 92674628776 30890000000 30891542925 825228928 826771853
+92673000000 92677628930 30891000000 30892542976 826228928 827771904
+92676000000 92680629109 30892000000 30893543036 827228928 828771964
+92679000000 92683629255 30893000000 30894543085 828228928 829772013
+92682000000 92686629382 30894000000 30895543127 829228928 830772055
+92685000000 92689629556 30895000000 30896543185 830228928 831772113
+92688000000 92692629620 30896000000 30897543206 831228928 832772134
+92691000000 92695629827 30897000000 30898543275 832228928 833772203
+92694000000 92698630008 30898000000 30899543336 833228928 834772264
+92697000000 92701630157 30899000000 30900543385 834228928 835772313
+92700000000 92704630214 30900000000 30901543404 835228928 836772332
+92703000000 92707630410 30901000000 30902543470 836228928 837772398
+92706000000 92710630600 30902000000 30903543533 837228928 838772461
+92709000000 92713630745 30903000000 30904543581 838228928 839772509
+92712000000 92716630917 30904000000 30905543639 839228928 840772567
+92715000000 92719631050 30905000000 30906543683 840228928 841772611
+92718000000 92722631121 30906000000 30907543707 841228928 842772635
+92721000000 92725631347 30907000000 30908543782 842228928 843772710
+92724000000 92728631507 30908000000 30909543835 843228928 844772763
+92727000000 92731631639 30909000000 30910543879 844228928 845772807
+92730000000 92734631747 30910000000 30911543915 845228928 846772843
+92733000000 92737631958 30911000000 30912543986 846228928 847772914
+92736000000 92740632124 30912000000 30913544041 847228928 848772969
+92739000000 92743632235 30913000000 30914544078 848228928 849773006
+92742000000 92746632395 30914000000 30915544131 849228928 850773059
+92745000000 92749632507 30915000000 30916544169 850228928 851773097
+92748000000 92752632705 30916000000 30917544235 851228928 852773163
+92751000000 92755632795 30917000000 30918544265 852228928 853773193
+92754000000 92758633020 30918000000 30919544340 853228928 854773268
+92757000000 92761633152 30919000000 30920544384 854228928 855773312
+92760000000 92764633291 30920000000 30921544430 855228928 856773358
+92763000000 92767633342 30921000000 30922544447 856228928 857773375
+92766000000 92770633553 30922000000 30923544517 857228928 858773445
+92769000000 92773633762 30923000000 30924544587 858228928 859773515
+92772000000 92776633890 30924000000 30925544630 859228928 860773558
+92775000000 92779634033 30925000000 30926544677 860228928 861773605
+92778000000 92782634204 30926000000 30927544734 861228928 862773662
+92781000000 92785634301 30927000000 30928544767 862228928 863773695
+92784000000 92788634514 30928000000 30929544838 863228928 864773766
+92787000000 92791634644 30929000000 30930544881 864228928 865773809
+92790000000 92794634794 30930000000 30931544931 865228928 866773859
+92793000000 92797634954 30931000000 30932544984 866228928 867773912
+92796000000 92800635050 30932000000 30933545016 867228928 868773944
+92799000000 92803635238 30933000000 30934545079 868228928 869774007
+92802000000 92806635406 30934000000 30935545135 869228928 870774063
+92805000000 92809635542 30935000000 30936545180 870228928 871774108
+92808000000 92812635717 30936000000 30937545239 871228928 872774167
+92811000000 92815635839 30937000000 30938545279 872228928 873774207
+92814000000 92818635989 30938000000 30939545329 873228928 874774257
+92817000000 92821636137 30939000000 30940545379 874228928 875774307
+92820000000 92824636343 30940000000 30941545447 875228928 876774375
+92823000000 92827636457 30941000000 30942545485 876228928 877774413
+92826000000 92830636589 30942000000 30943545529 877228928 878774457
+92829000000 92833636763 30943000000 30944545587 878228928 879774515
+92832000000 92836636882 30944000000 30945545627 879228928 880774555
+92835000000 92839637006 30945000000 30946545668 880228928 881774596
+92838000000 92842637225 30946000000 30947545741 881228928 882774669
+92841000000 92845637361 30947000000 30948545787 882228928 883774715
+92844000000 92848637512 30948000000 30949545837 883228928 884774765
+92847000000 92851637672 30949000000 30950545890 884228928 885774818
+92850000000 92854637793 30950000000 30951545931 885228928 886774859
+92853000000 92857637874 30951000000 30952545958 886228928 887774886
+92856000000 92860638082 30952000000 30953546027 887228928 888774955
+92859000000 92863638237 30953000000 30954546079 888228928 889775007
+92862000000 92866638396 30954000000 30955546132 889228928 890775060
+92865000000 92869638548 30955000000 30956546182 890228928 891775110
+92868000000 92872638670 30956000000 30957546223 891228928 892775151
+92871000000 92875638848 30957000000 30958546282 892228928 893775210
+92874000000 92878638997 30958000000 30959546332 893228928 894775260
+92877000000 92881639125 30959000000 30960546375 894228928 895775303
+92880000000 92884639294 30960000000 30961546431 895228928 896775359
+92883000000 92887639414 30961000000 30962546471 896228928 897775399
+92886000000 92890639341 30962000000 30963546447 897228928 898775375
+92889000000 92893639664 30963000000 30964546554 898228928 899775482
+92892000000 92896639917 30964000000 30965546639 899228928 900775567
+92895000000 92899640027 30965000000 30966546675 900228928 901775603
+92898000000 92902640206 30966000000 30967546735 901228928 902775663
+92901000000 92905640254 30967000000 30968546751 902228928 903775679
+92904000000 92908640508 30968000000 30969546836 903228928 904775764
+92907000000 92911640627 30969000000 30970546875 904228928 905775803
+92910000000 92914640798 30970000000 30971546932 905228928 906775860
+92913000000 92917640945 30971000000 30972546981 906228928 907775909
+92916000000 92920641098 30972000000 30973547032 907228928 908775960
+92919000000 92923641244 30973000000 30974547081 908228928 909776009
+92922000000 92926641388 30974000000 30975547129 909228928 910776057
+92925000000 92929641551 30975000000 30976547183 910228928 911776111
+92928000000 92932641703 30976000000 30977547234 911228928 912776162
+92931000000 92935641857 30977000000 30978547285 912228928 913776213
+92934000000 92938641977 30978000000 30979547325 913228928 914776253
+92937000000 92941642186 30979000000 30980547395 914228928 915776323
+92940000000 92944642316 30980000000 30981547438 915228928 916776366
+92943000000 92947642430 30981000000 30982547476 916228928 917776404
+92946000000 92950642591 30982000000 30983547530 917228928 918776458
+92949000000 92953642726 30983000000 30984547575 918228928 919776503
+92952000000 92956642869 30984000000 30985547623 919228928 920776551
+92955000000 92959642969 30985000000 30986547656 920228928 921776584
+92958000000 92962643203 30986000000 30987547734 921228928 922776662
+92961000000 92965643276 30987000000 30988547758 922228928 923776686
+92964000000 92968643397 30988000000 30989547799 923228928 924776727
+92967000000 92971643586 30989000000 30990547862 924228928 925776790
+92970000000 92974643740 30990000000 30991547913 925228928 926776841
+92973000000 92977643919 30991000000 30992547973 926228928 927776901
+92976000000 92980644065 30992000000 30993548021 927228928 928776949
+92979000000 92983644192 30993000000 30994548064 928228928 929776992
+92982000000 92986644366 30994000000 30995548122 929228928 930777050
+92985000000 92989644430 30995000000 30996548143 930228928 931777071
+92988000000 92992644637 30996000000 30997548212 931228928 932777140
+92991000000 92995644818 30997000000 30998548272 932228928 933777200
+92994000000 92998644967 30998000000 30999548322 933228928 934777250
+92997000000 93001645024 30999000000 31000548341 934228928 935777269
+93000000000 93004645220 31000000000 31001548406 935228928 936777334
+93003000000 93007645410 31001000000 31002548470 936228928 937777398
+93006000000 93010645555 31002000000 31003548518 937228928 938777446
+93009000000 93013645727 31003000000 31004548575 938228928 939777503
+93012000000 93016645860 31004000000 31005548620 939228928 940777548
+93015000000 93019645931 31005000000 31006548643 940228928 941777571
+93018000000 93022646157 31006000000 31007548719 941228928 942777647
+93021000000 93025646317 31007000000 31008548772 942228928 943777700
+93024000000 93028646449 31008000000 31009548816 943228928 944777744
+93027000000 93031646557 31009000000 31010548852 944228928 945777780
+93030000000 93034646768 31010000000 31011548922 945228928 946777850
+93033000000 93037646934 31011000000 31012548978 946228928 947777906
+93036000000 93040647045 31012000000 31013549015 947228928 948777943
+93039000000 93043647205 31013000000 31014549068 948228928 949777996
+93042000000 93046647317 31014000000 31015549105 949228928 950778033
+93045000000 93049647515 31015000000 31016549171 950228928 951778099
+93048000000 93052647605 31016000000 31017549201 951228928 952778129
+93051000000 93055647830 31017000000 31018549276 952228928 953778204
+93054000000 93058647962 31018000000 31019549320 953228928 954778248
+93057000000 93061648101 31019000000 31020549367 954228928 955778295
+93060000000 93064648152 31020000000 31021549384 955228928 956778312
+93063000000 93067648363 31021000000 31022549454 956228928 957778382
+93066000000 93070648572 31022000000 31023549524 957228928 958778452
+93069000000 93073648700 31023000000 31024549566 958228928 959778494
+93072000000 93076648843 31024000000 31025549614 959228928 960778542
+93075000000 93079649014 31025000000 31026549671 960228928 961778599
+93078000000 93082649111 31026000000 31027549703 961228928 962778631
+93081000000 93085649324 31027000000 31028549774 962228928 963778702
+93084000000 93088649454 31028000000 31029549818 963228928 964778746
+93087000000 93091649604 31029000000 31030549868 964228928 965778796
+93090000000 93094649764 31030000000 31031549921 965228928 966778849
+93093000000 93097649860 31031000000 31032549953 966228928 967778881
+93096000000 93100650048 31032000000 31033550016 967228928 968778944
+93099000000 93103650216 31033000000 31034550072 968228928 969779000
+93102000000 93106650352 31034000000 31035550117 969228928 970779045
+93105000000 93109650527 31035000000 31036550175 970228928 971779103
+93108000000 93112650649 31036000000 31037550216 971228928 972779144
+93111000000 93115650799 31037000000 31038550266 972228928 973779194
+93114000000 93118650947 31038000000 31039550315 973228928 974779243
+93117000000 93121651153 31039000000 31040550384 974228928 975779312
+93120000000 93124651267 31040000000 31041550422 975228928 976779350
+93123000000 93127651399 31041000000 31042550466 976228928 977779394
+93126000000 93130651573 31042000000 31043550524 977228928 978779452
+93129000000 93133651692 31043000000 31044550564 978228928 979779492
+93132000000 93136651816 31044000000 31045550605 979228928 980779533
+93135000000 93139652035 31045000000 31046550678 980228928 981779606
+93138000000 93142652171 31046000000 31047550723 981228928 982779651
+93141000000 93145652322 31047000000 31048550774 982228928 983779702
+93144000000 93148652482 31048000000 31049550827 983228928 984779755
+93147000000 93151652603 31049000000 31050550867 984228928 985779795
+93150000000 93154652684 31050000000 31051550894 985228928 986779822
+93153000000 93157652892 31051000000 31052550964 986228928 987779892
+93156000000 93160653047 31052000000 31053551015 987228928 988779943
+93159000000 93163653206 31053000000 31054551068 988228928 989779996
+93162000000 93166653358 31054000000 31055551119 989228928 990780047
+93165000000 93169653480 31055000000 31056551160 990228928 991780088
+93168000000 93172653658 31056000000 31057551219 991228928 992780147
+93171000000 93175653807 31057000000 31058551269 992228928 993780197
+93174000000 93178653935 31058000000 31059551311 993228928 994780239
+93177000000 93181654104 31059000000 31060551368 994228928 995780296
+93180000000 93184654224 31060000000 31061551408 995228928 996780336
+93183000000 93187654151 31061000000 31062551383 996228928 997780311
+93186000000 93190654474 31062000000 31063551491 997228928 998780419
+93189000000 93193654727 31063000000 31064551575 998228928 999780503
+93192000000 93196654837 31064000000 31065551612 999228928 1000780540
+93195000000 93199655016 31065000000 31066551672 1000228928 1001780600
+93198000000 93202655064 31066000000 31067551688 1001228928 1002780616
+93201000000 93205655318 31067000000 31068551772 1002228928 1003780700
+93204000000 93208655437 31068000000 31069551812 1003228928 1004780740
+93207000000 93211655608 31069000000 31070551869 1004228928 1005780797
+93210000000 93214655755 31070000000 31071551918 1005228928 1006780846
+93213000000 93217655908 31071000000 31072551969 1006228928 1007780897
+93216000000 93220656054 31072000000 31073552018 1007228928 1008780946
+93219000000 93223656198 31073000000 31074552066 1008228928 1009780994
+93222000000 93226656361 31074000000 31075552120 1009228928 1010781048
+93225000000 93229656513 31075000000 31076552171 1010228928 1011781099
+93228000000 93232656667 31076000000 31077552222 1011228928 1012781150
+93231000000 93235656787 31077000000 31078552262 1012228928 1013781190
+93234000000 93238656996 31078000000 31079552332 1013228928 1014781260
+93237000000 93241657126 31079000000 31080552375 1014228928 1015781303
+93240000000 93244657240 31080000000 31081552413 1015228928 1016781341
+93243000000 93247657401 31081000000 31082552467 1016228928 1017781395
+93246000000 93250657536 31082000000 31083552512 1017228928 1018781440
+93249000000 93253657679 31083000000 31084552559 1018228928 1019781487
+93252000000 93256657779 31084000000 31085552593 1019228928 1020781521
+93255000000 93259658013 31085000000 31086552671 1020228928 1021781599
+93258000000 93262658086 31086000000 31087552695 1021228928 1022781623
+93261000000 93265658207 31087000000 31088552735 1022228928 1023781663
+93264000000 93268658396 31088000000 31089552798 1023228928 1024781726
+93267000000 93271658550 31089000000 31090552850 1024228928 1025781778
+93270000000 93274658729 31090000000 31091552909 1025228928 1026781837
+93273000000 93277658875 31091000000 31092552958 1026228928 1027781886
+93276000000 93280659002 31092000000 31093553000 1027228928 1028781928
+93279000000 93283659176 31093000000 31094553058 1028228928 1029781986
+93282000000 93286659240 31094000000 31095553080 1029228928 1030782008
+93285000000 93289659447 31095000000 31096553149 1030228928 1031782077
+93288000000 93292659628 31096000000 31097553209 1031228928 1032782137
+93291000000 93295659777 31097000000 31098553259 1032228928 1033782187
+93294000000 93298659834 31098000000 31099553278 1033228928 1034782206
+93297000000 93301660030 31099000000 31100553343 1034228928 1035782271
+93300000000 93304660220 31100000000 31101553406 1035228928 1036782334
+93303000000 93307660365 31101000000 31102553455 1036228928 1037782383
+93306000000 93310660537 31102000000 31103553512 1037228928 1038782440
+93309000000 93313660670 31103000000 31104553556 1038228928 1039782484
+93312000000 93316660741 31104000000 31105553580 1039228928 1040782508
+93315000000 93319660967 31105000000 31106553655 1040228928 1041782583
+93318000000 93322661127 31106000000 31107553709 1041228928 1042782637
+93321000000 93325661259 31107000000 31108553753 1042228928 1043782681
+93324000000 93328661367 31108000000 31109553789 1043228928 1044782717
+93327000000 93331661578 31109000000 31110553859 1044228928 1045782787
+93330000000 93334661744 31110000000 31111553914 1045228928 1046782842
+93333000000 93337661855 31111000000 31112553951 1046228928 1047782879
+93336000000 93340662015 31112000000 31113554005 1047228928 1048782933
+93339000000 93343662127 31113000000 31114554042 1048228928 1049782970
+93342000000 93346662325 31114000000 31115554108 1049228928 1050783036
+93345000000 93349662415 31115000000 31116554138 1050228928 1051783066
+93348000000 93352662640 31116000000 31117554213 1051228928 1052783141
+93351000000 93355662772 31117000000 31118554257 1052228928 1053783185
+93354000000 93358662911 31118000000 31119554303 1053228928 1054783231
+93357000000 93361662962 31119000000 31120554320 1054228928 1055783248
+93360000000 93364663173 31120000000 31121554391 1055228928 1056783319
+93363000000 93367663382 31121000000 31122554460 1056228928 1057783388
+93366000000 93370663510 31122000000 31123554503 1057228928 1058783431
+93369000000 93373663653 31123000000 31124554551 1058228928 1059783479
+93372000000 93376663824 31124000000 31125554608 1059228928 1060783536
+93375000000 93379663921 31125000000 31126554640 1060228928 1061783568
+93378000000 93382664134 31126000000 31127554711 1061228928 1062783639
+93381000000 93385664264 31127000000 31128554754 1062228928 1063783682
+93384000000 93388664414 31128000000 31129554804 1063228928 1064783732
+93387000000 93391664574 31129000000 31130554858 1064228928 1065783786
+93390000000 93394664670 31130000000 31131554890 1065228928 1066783818
+93393000000 93397664858 31131000000 31132554952 1066228928 1067783880
+93396000000 93400665026 31132000000 31133555008 1067228928 1068783936
+93399000000 93403665162 31133000000 31134555054 1068228928 1069783982
+93402000000 93406665337 31134000000 31135555112 1069228928 1070784040
+93405000000 93409665459 31135000000 31136555153 1070228928 1071784081
+93408000000 93412665609 31136000000 31137555203 1071228928 1072784131
+93411000000 93415665757 31137000000 31138555252 1072228928 1073784180
+93414000000 93418665963 31138000000 31139555321 1073228928 1074784249
+93417000000 93421666077 31139000000 31140555359 1074228928 1075784287
+93420000000 93424666209 31140000000 31141555403 1075228928 1076784331
+93423000000 93427666383 31141000000 31142555461 1076228928 1077784389
+93426000000 93430666502 31142000000 31143555500 1077228928 1078784428
+93429000000 93433666626 31143000000 31144555542 1078228928 1079784470
+93432000000 93436666845 31144000000 31145555615 1079228928 1080784543
+93435000000 93439666981 31145000000 31146555660 1080228928 1081784588
+93438000000 93442667132 31146000000 31147555710 1081228928 1082784638
+93441000000 93445667292 31147000000 31148555764 1082228928 1083784692
+93444000000 93448667413 31148000000 31149555804 1083228928 1084784732
+93447000000 93451667494 31149000000 31150555831 1084228928 1085784759
+93450000000 93454667702 31150000000 31151555900 1085228928 1086784828
+93453000000 93457667857 31151000000 31152555952 1086228928 1087784880
+93456000000 93460668016 31152000000 31153556005 1087228928 1088784933
+93459000000 93463668168 31153000000 31154556056 1088228928 1089784984
+93462000000 93466668290 31154000000 31155556096 1089228928 1090785024
+93465000000 93469668468 31155000000 31156556156 1090228928 1091785084
+93468000000 93472668617 31156000000 31157556205 1091228928 1092785133
+93471000000 93475668745 31157000000 31158556248 1092228928 1093785176
+93474000000 93478668914 31158000000 31159556304 1093228928 1094785232
+93477000000 93481669034 31159000000 31160556344 1094228928 1095785272
+93480000000 93484668961 31160000000 31161556320 1095228928 1096785248
+93483000000 93487669284 31161000000 31162556428 1096228928 1097785356
+93486000000 93490669537 31162000000 31163556512 1097228928 1098785440
+93489000000 93493669647 31163000000 31164556549 1098228928 1099785477
+93492000000 93496669826 31164000000 31165556608 1099228928 1100785536
+93495000000 93499669874 31165000000 31166556624 1100228928 1101785552
+93498000000 93502670128 31166000000 31167556709 1101228928 1102785637
+93501000000 93505670247 31167000000 31168556749 1102228928 1103785677
+93504000000 93508670418 31168000000 31169556806 1103228928 1104785734
+93507000000 93511670565 31169000000 31170556855 1104228928 1105785783
+93510000000 93514670718 31170000000 31171556906 1105228928 1106785834
+93513000000 93517670864 31171000000 31172556954 1106228928 1107785882
+93516000000 93520671008 31172000000 31173557002 1107228928 1108785930
+93519000000 93523671171 31173000000 31174557057 1108228928 1109785985
+93522000000 93526671323 31174000000 31175557107 1109228928 1110786035
+93525000000 93529671477 31175000000 31176557159 1110228928 1111786087
+93528000000 93532671597 31176000000 31177557199 1111228928 1112786127
+93531000000 93535671806 31177000000 31178557268 1112228928 1113786196
+93534000000 93538671936 31178000000 31179557312 1113228928 1114786240
+93537000000 93541672050 31179000000 31180557350 1114228928 1115786278
+93540000000 93544672211 31180000000 31181557403 1115228928 1116786331
+93543000000 93547672346 31181000000 31182557448 1116228928 1117786376
+93546000000 93550672489 31182000000 31183557496 1117228928 1118786424
+93549000000 93553672589 31183000000 31184557529 1118228928 1119786457
+93552000000 93556672823 31184000000 31185557607 1119228928 1120786535
+93555000000 93559672896 31185000000 31186557632 1120228928 1121786560
+93558000000 93562673017 31186000000 31187557672 1121228928 1122786600
+93561000000 93565673206 31187000000 31188557735 1122228928 1123786663
+93564000000 93568673360 31188000000 31189557786 1123228928 1124786714
+93567000000 93571673539 31189000000 31190557846 1124228928 1125786774
+93570000000 93574673685 31190000000 31191557895 1125228928 1126786823
+93573000000 93577673812 31191000000 31192557937 1126228928 1127786865
+93576000000 93580673986 31192000000 31193557995 1127228928 1128786923
+93579000000 93583674050 31193000000 31194558016 1128228928 1129786944
+93582000000 93586674257 31194000000 31195558085 1129228928 1130787013
+93585000000 93589674438 31195000000 31196558146 1130228928 1131787074
+93588000000 93592674587 31196000000 31197558195 1131228928 1132787123
+93591000000 93595674644 31197000000 31198558214 1132228928 1133787142
+93594000000 93598674840 31198000000 31199558280 1133228928 1134787208
+93597000000 93601675030 31199000000 31200558343 1134228928 1135787271
+93600000000 93604675175 31200000000 31201558391 1135228928 1136787319
+93603000000 93607675347 31201000000 31202558449 1136228928 1137787377
+93606000000 93610675480 31202000000 31203558493 1137228928 1138787421
+93609000000 93613675551 31203000000 31204558517 1138228928 1139787445
+93612000000 93616675777 31204000000 31205558592 1139228928 1140787520
+93615000000 93619675937 31205000000 31206558645 1140228928 1141787573
+93618000000 93622676069 31206000000 31207558689 1141228928 1142787617
+93621000000 93625676177 31207000000 31208558725 1142228928 1143787653
+93624000000 93628676388 31208000000 31209558796 1143228928 1144787724
+93627000000 93631676554 31209000000 31210558851 1144228928 1145787779
+93630000000 93634676665 31210000000 31211558888 1145228928 1146787816
+93633000000 93637676825 31211000000 31212558941 1146228928 1147787869
+93636000000 93640676937 31212000000 31213558979 1147228928 1148787907
+93639000000 93643677135 31213000000 31214559045 1148228928 1149787973
+93642000000 93646677225 31214000000 31215559075 1149228928 1150788003
+93645000000 93649677450 31215000000 31216559150 1150228928 1151788078
+93648000000 93652677582 31216000000 31217559194 1151228928 1152788122
+93651000000 93655677721 31217000000 31218559240 1152228928 1153788168
+93654000000 93658677772 31218000000 31219559257 1153228928 1154788185
+93657000000 93661677983 31219000000 31220559327 1154228928 1155788255
+93660000000 93664678192 31220000000 31221559397 1155228928 1156788325
+93663000000 93667678320 31221000000 31222559440 1156228928 1157788368
+93666000000 93670678463 31222000000 31223559487 1157228928 1158788415
+93669000000 93673678634 31223000000 31224559544 1158228928 1159788472
+93672000000 93676678731 31224000000 31225559577 1159228928 1160788505
+93675000000 93679678944 31225000000 31226559648 1160228928 1161788576
+93678000000 93682679074 31226000000 31227559691 1161228928 1162788619
+93681000000 93685679224 31227000000 31228559741 1162228928 1163788669
+93684000000 93688679384 31228000000 31229559794 1163228928 1164788722
+93687000000 93691679480 31229000000 31230559826 1164228928 1165788754
+93690000000 93694679668 31230000000 31231559889 1165228928 1166788817
+93693000000 93697679836 31231000000 31232559945 1166228928 1167788873
+93696000000 93700679972 31232000000 31233559990 1167228928 1168788918
+93699000000 93703680147 31233000000 31234560049 1168228928 1169788977
+93702000000 93706680269 31234000000 31235560089 1169228928 1170789017
+93705000000 93709680419 31235000000 31236560139 1170228928 1171789067
+93708000000 93712680567 31236000000 31237560189 1171228928 1172789117
+93711000000 93715680773 31237000000 31238560257 1172228928 1173789185
+93714000000 93718680887 31238000000 31239560295 1173228928 1174789223
+93717000000 93721681019 31239000000 31240560339 1174228928 1175789267
+93720000000 93724681193 31240000000 31241560397 1175228928 1176789325
+93723000000 93727681312 31241000000 31242560437 1176228928 1177789365
+93726000000 93730681436 31242000000 31243560478 1177228928 1178789406
+93729000000 93733681655 31243000000 31244560551 1178228928 1179789479
+93732000000 93736681791 31244000000 31245560597 1179228928 1180789525
+93735000000 93739681942 31245000000 31246560647 1180228928 1181789575
+93738000000 93742682102 31246000000 31247560700 1181228928 1182789628
+93741000000 93745682223 31247000000 31248560741 1182228928 1183789669
+93744000000 93748682304 31248000000 31249560768 1183228928 1184789696
+93747000000 93751682512 31249000000 31250560837 1184228928 1185789765
+93750000000 93754682667 31250000000 31251560889 1185228928 1186789817
+93753000000 93757682826 31251000000 31252560942 1186228928 1187789870
+93756000000 93760682978 31252000000 31253560992 1187228928 1188789920
+93759000000 93763683100 31253000000 31254561033 1188228928 1189789961
+93762000000 93766683278 31254000000 31255561092 1189228928 1190790020
+93765000000 93769683427 31255000000 31256561142 1190228928 1191790070
+93768000000 93772683555 31256000000 31257561185 1191228928 1192790113
+93771000000 93775683724 31257000000 31258561241 1192228928 1193790169
+93774000000 93778683844 31258000000 31259561281 1193228928 1194790209
+93777000000 93781683771 31259000000 31260561257 1194228928 1195790185
+93780000000 93784684094 31260000000 31261561364 1195228928 1196790292
+93783000000 93787684347 31261000000 31262561449 1196228928 1197790377
+93786000000 93790684457 31262000000 31263561485 1197228928 1198790413
+93789000000 93793684636 31263000000 31264561545 1198228928 1199790473
+93792000000 93796684684 31264000000 31265561561 1199228928 1200790489
+93795000000 93799684938 31265000000 31266561646 1200228928 1201790574
+93798000000 93802685057 31266000000 31267561685 1201228928 1202790613
+93801000000 93805685228 31267000000 31268561742 1202228928 1203790670
+93804000000 93808685375 31268000000 31269561791 1203228928 1204790719
+93807000000 93811685528 31269000000 31270561842 1204228928 1205790770
+93810000000 93814685674 31270000000 31271561891 1205228928 1206790819
+93813000000 93817685818 31271000000 31272561939 1206228928 1207790867
+93816000000 93820685981 31272000000 31273561993 1207228928 1208790921
+93819000000 93823686133 31273000000 31274562044 1208228928 1209790972
+93822000000 93826686287 31274000000 31275562095 1209228928 1210791023
+93825000000 93829686407 31275000000 31276562135 1210228928 1211791063
+93828000000 93832686616 31276000000 31277562205 1211228928 1212791133
+93831000000 93835686746 31277000000 31278562248 1212228928 1213791176
+93834000000 93838686860 31278000000 31279562286 1213228928 1214791214
+93837000000 93841687021 31279000000 31280562340 1214228928 1215791268
+93840000000 93844687156 31280000000 31281562385 1215228928 1216791313
+93843000000 93847687299 31281000000 31282562433 1216228928 1217791361
+93846000000 93850687399 31282000000 31283562466 1217228928 1218791394
+93849000000 93853687633 31283000000 31284562544 1218228928 1219791472
+93852000000 93856687706 31284000000 31285562568 1219228928 1220791496
+93855000000 93859687827 31285000000 31286562609 1220228928 1221791537
+93858000000 93862688016 31286000000 31287562672 1221228928 1222791600
+93861000000 93865688170 31287000000 31288562723 1222228928 1223791651
+93864000000 93868688349 31288000000 31289562783 1223228928 1224791711
+93867000000 93871688495 31289000000 31290562831 1224228928 1225791759
+93870000000 93874688622 31290000000 31291562874 1225228928 1226791802
+93873000000 93877688796 31291000000 31292562932 1226228928 1227791860
+93876000000 93880688860 31292000000 31293562953 1227228928 1228791881
+93879000000 93883689067 31293000000 31294563022 1228228928 1229791950
+93882000000 93886689248 31294000000 31295563082 1229228928 1230792010
+93885000000 93889689397 31295000000 31296563132 1230228928 1231792060
+93888000000 93892689454 31296000000 31297563151 1231228928 1232792079
+93891000000 93895689650 31297000000 31298563216 1232228928 1233792144
+93894000000 93898689840 31298000000 31299563280 1233228928 1234792208
+93897000000 93901689985 31299000000 31300563328 1234228928 1235792256
+93900000000 93904690157 31300000000 31301563385 1235228928 1236792313
+93903000000 93907690290 31301000000 31302563430 1236228928 1237792358
+93906000000 93910690361 31302000000 31303563453 1237228928 1238792381
+93909000000 93913690587 31303000000 31304563529 1238228928 1239792457
+93912000000 93916690747 31304000000 31305563582 1239228928 1240792510
+93915000000 93919690879 31305000000 31306563626 1240228928 1241792554
+93918000000 93922690987 31306000000 31307563662 1241228928 1242792590
+93921000000 93925691198 31307000000 31308563732 1242228928 1243792660
+93924000000 93928691364 31308000000 31309563788 1243228928 1244792716
+93927000000 93931691475 31309000000 31310563825 1244228928 1245792753
+93930000000 93934691635 31310000000 31311563878 1245228928 1246792806
+93933000000 93937691747 31311000000 31312563915 1246228928 1247792843
+93936000000 93940691945 31312000000 31313563981 1247228928 1248792909
+93939000000 93943692035 31313000000 31314564011 1248228928 1249792939
+93942000000 93946692260 31314000000 31315564086 1249228928 1250793014
+93945000000 93949692392 31315000000 31316564130 1250228928 1251793058
+93948000000 93952692531 31316000000 31317564177 1251228928 1252793105
+93951000000 93955692582 31317000000 31318564194 1252228928 1253793122
+93954000000 93958692793 31318000000 31319564264 1253228928 1254793192
+93957000000 93961693002 31319000000 31320564334 1254228928 1255793262
+93960000000 93964693130 31320000000 31321564376 1255228928 1256793304
+93963000000 93967693273 31321000000 31322564424 1256228928 1257793352
+93966000000 93970693444 31322000000 31323564481 1257228928 1258793409
+93969000000 93973693541 31323000000 31324564513 1258228928 1259793441
+93972000000 93976693754 31324000000 31325564584 1259228928 1260793512
+93975000000 93979693884 31325000000 31326564628 1260228928 1261793556
+93978000000 93982694034 31326000000 31327564678 1261228928 1262793606
+93981000000 93985694194 31327000000 31328564731 1262228928 1263793659
+93984000000 93988694290 31328000000 31329564763 1263228928 1264793691
+93987000000 93991694478 31329000000 31330564826 1264228928 1265793754
+93990000000 93994694646 31330000000 31331564882 1265228928 1266793810
+93993000000 93997694782 31331000000 31332564927 1266228928 1267793855
+93996000000 94000694957 31332000000 31333564985 1267228928 1268793913
+93999000000 94003695079 31333000000 31334565026 1268228928 1269793954
+94002000000 94006695229 31334000000 31335565076 1269228928 1270794004
+94005000000 94009695377 31335000000 31336565125 1270228928 1271794053
+94008000000 94012695583 31336000000 31337565194 1271228928 1272794122
+94011000000 94015695697 31337000000 31338565232 1272228928 1273794160
+94014000000 94018695829 31338000000 31339565276 1273228928 1274794204
+94017000000 94021696003 31339000000 31340565334 1274228928 1275794262
+94020000000 94024696122 31340000000 31341565374 1275228928 1276794302
+94023000000 94027696246 31341000000 31342565415 1276228928 1277794343
+94026000000 94030696465 31342000000 31343565488 1277228928 1278794416
+94029000000 94033696601 31343000000 31344565533 1278228928 1279794461
+94032000000 94036696752 31344000000 31345565584 1279228928 1280794512
+94035000000 94039696912 31345000000 31346565637 1280228928 1281794565
+94038000000 94042697033 31346000000 31347565677 1281228928 1282794605
+94041000000 94045697114 31347000000 31348565704 1282228928 1283794632
+94044000000 94048697322 31348000000 31349565774 1283228928 1284794702
+94047000000 94051697477 31349000000 31350565825 1284228928 1285794753
+94050000000 94054697636 31350000000 31351565878 1285228928 1286794806
+94053000000 94057697788 31351000000 31352565929 1286228928 1287794857
+94056000000 94060697910 31352000000 31353565970 1287228928 1288794898
+94059000000 94063698088 31353000000 31354566029 1288228928 1289794957
+94062000000 94066698237 31354000000 31355566079 1289228928 1290795007
+94065000000 94069698365 31355000000 31356566121 1290228928 1291795049
+94068000000 94072698534 31356000000 31357566178 1291228928 1292795106
+94071000000 94075698654 31357000000 31358566218 1292228928 1293795146
+94074000000 94078698581 31358000000 31359566193 1293228928 1294795121
+94077000000 94081698904 31359000000 31360566301 1294228928 1295795229
+94080000000 94084699157 31360000000 31361566385 1295228928 1296795313
+94083000000 94087699267 31361000000 31362566422 1296228928 1297795350
+94086000000 94090699446 31362000000 31363566482 1297228928 1298795410
+94089000000 94093699494 31363000000 31364566498 1298228928 1299795426
+94092000000 94096699748 31364000000 31365566582 1299228928 1300795510
+94095000000 94099699867 31365000000 31366566622 1300228928 1301795550
+94098000000 94102700038 31366000000 31367566679 1301228928 1302795607
+94101000000 94105700185 31367000000 31368566728 1302228928 1303795656
+94104000000 94108700338 31368000000 31369566779 1303228928 1304795707
+94107000000 94111700484 31369000000 31370566828 1304228928 1305795756
+94110000000 94114700628 31370000000 31371566876 1305228928 1306795804
+94113000000 94117700791 31371000000 31372566930 1306228928 1307795858
+94116000000 94120700943 31372000000 31373566981 1307228928 1308795909
+94119000000 94123701097 31373000000 31374567032 1308228928 1309795960
+94122000000 94126701217 31374000000 31375567072 1309228928 1310796000
+94125000000 94129701426 31375000000 31376567142 1310228928 1311796070
+94128000000 94132701556 31376000000 31377567185 1311228928 1312796113
+94131000000 94135701670 31377000000 31378567223 1312228928 1313796151
+94134000000 94138701831 31378000000 31379567277 1313228928 1314796205
+94137000000 94141701966 31379000000 31380567322 1314228928 1315796250
+94140000000 94144702109 31380000000 31381567369 1315228928 1316796297
+94143000000 94147702209 31381000000 31382567403 1316228928 1317796331
+94146000000 94150702443 31382000000 31383567481 1317228928 1318796409
+94149000000 94153702516 31383000000 31384567505 1318228928 1319796433
+94152000000 94156702637 31384000000 31385567545 1319228928 1320796473
+94155000000 94159702826 31385000000 31386567608 1320228928 1321796536
+94158000000 94162702980 31386000000 31387567660 1321228928 1322796588
+94161000000 94165703159 31387000000 31388567719 1322228928 1323796647
+94164000000 94168703305 31388000000 31389567768 1323228928 1324796696
+94167000000 94171703432 31389000000 31390567810 1324228928 1325796738
+94170000000 94174703606 31390000000 31391567868 1325228928 1326796796
+94173000000 94177703670 31391000000 31392567890 1326228928 1327796818
+94176000000 94180703877 31392000000 31393567959 1327228928 1328796887
+94179000000 94183704058 31393000000 31394568019 1328228928 1329796947
+94182000000 94186704207 31394000000 31395568069 1329228928 1330796997
+94185000000 94189704264 31395000000 31396568088 1330228928 1331797016
+94188000000 94192704460 31396000000 31397568153 1331228928 1332797081
+94191000000 94195704650 31397000000 31398568216 1332228928 1333797144
+94194000000 94198704795 31398000000 31399568265 1333228928 1334797193
+94197000000 94201704967 31399000000 31400568322 1334228928 1335797250
+94200000000 94204705100 31400000000 31401568366 1335228928 1336797294
+94203000000 94207705171 31401000000 31402568390 1336228928 1337797318
+94206000000 94210705397 31402000000 31403568465 1337228928 1338797393
+94209000000 94213705557 31403000000 31404568519 1338228928 1339797447
+94212000000 94216705689 31404000000 31405568563 1339228928 1340797491
+94215000000 94219705797 31405000000 31406568599 1340228928 1341797527
+94218000000 94222706008 31406000000 31407568669 1341228928 1342797597
+94221000000 94225706174 31407000000 31408568724 1342228928 1343797652
+94224000000 94228706285 31408000000 31409568761 1343228928 1344797689
+94227000000 94231706445 31409000000 31410568815 1344228928 1345797743
+94230000000 94234706557 31410000000 31411568852 1345228928 1346797780
+94233000000 94237706755 31411000000 31412568918 1346228928 1347797846
+94236000000 94240706845 31412000000 31413568948 1347228928 1348797876
+94239000000 94243707070 31413000000 31414569023 1348228928 1349797951
+94242000000 94246707202 31414000000 31415569067 1349228928 1350797995
+94245000000 94249707341 31415000000 31416569113 1350228928 1351798041
+94248000000 94252707392 31416000000 31417569130 1351228928 1352798058
+94251000000 94255707603 31417000000 31418569201 1352228928 1353798129
+94254000000 94258707812 31418000000 31419569270 1353228928 1354798198
+94257000000 94261707940 31419000000 31420569313 1354228928 1355798241
+94260000000 94264708083 31420000000 31421569361 1355228928 1356798289
+94263000000 94267708254 31421000000 31422569418 1356228928 1357798346
+94266000000 94270708351 31422000000 31423569450 1357228928 1358798378
+94269000000 94273708564 31423000000 31424569521 1358228928 1359798449
+94272000000 94276708694 31424000000 31425569564 1359228928 1360798492
+94275000000 94279708844 31425000000 31426569614 1360228928 1361798542
+94278000000 94282709004 31426000000 31427569668 1361228928 1362798596
+94281000000 94285709100 31427000000 31428569700 1362228928 1363798628
+94284000000 94288709288 31428000000 31429569762 1363228928 1364798690
+94287000000 94291709456 31429000000 31430569818 1364228928 1365798746
+94290000000 94294709592 31430000000 31431569864 1365228928 1366798792
+94293000000 94297709767 31431000000 31432569922 1366228928 1367798850
+94296000000 94300709889 31432000000 31433569963 1367228928 1368798891
+94299000000 94303710039 31433000000 31434570013 1368228928 1369798941
+94302000000 94306710187 31434000000 31435570062 1369228928 1370798990
+94305000000 94309710393 31435000000 31436570131 1370228928 1371799059
+94308000000 94312710507 31436000000 31437570169 1371228928 1372799097
+94311000000 94315710639 31437000000 31438570213 1372228928 1373799141
+94314000000 94318710813 31438000000 31439570271 1373228928 1374799199
+94317000000 94321710932 31439000000 31440570310 1374228928 1375799238
+94320000000 94324711056 31440000000 31441570352 1375228928 1376799280
+94323000000 94327711275 31441000000 31442570425 1376228928 1377799353
+94326000000 94330711411 31442000000 31443570470 1377228928 1378799398
+94329000000 94333711562 31443000000 31444570520 1378228928 1379799448
+94332000000 94336711722 31444000000 31445570574 1379228928 1380799502
+94335000000 94339711843 31445000000 31446570614 1380228928 1381799542
+94338000000 94342711924 31446000000 31447570641 1381228928 1382799569
+94341000000 94345712132 31447000000 31448570710 1382228928 1383799638
+94344000000 94348712287 31448000000 31449570762 1383228928 1384799690
+94347000000 94351712446 31449000000 31450570815 1384228928 1385799743
+94350000000 94354712598 31450000000 31451570866 1385228928 1386799794
+94353000000 94357712720 31451000000 31452570906 1386228928 1387799834
+94356000000 94360712898 31452000000 31453570966 1387228928 1388799894
+94359000000 94363713047 31453000000 31454571015 1388228928 1389799943
+94362000000 94366713175 31454000000 31455571058 1389228928 1390799986
+94365000000 94369713344 31455000000 31456571114 1390228928 1391800042
+94368000000 94372713464 31456000000 31457571154 1391228928 1392800082
+94371000000 94375713391 31457000000 31458571130 1392228928 1393800058
+94374000000 94378713714 31458000000 31459571238 1393228928 1394800166
+94377000000 94381713967 31459000000 31460571322 1394228928 1395800250
+94380000000 94384714077 31460000000 31461571359 1395228928 1396800287
+94383000000 94387714256 31461000000 31462571418 1396228928 1397800346
+94386000000 94390714304 31462000000 31463571434 1397228928 1398800362
+94389000000 94393714558 31463000000 31464571519 1398228928 1399800447
+94392000000 94396714677 31464000000 31465571559 1399228928 1400800487
+94395000000 94399714848 31465000000 31466571616 1400228928 1401800544
+94398000000 94402714995 31466000000 31467571665 1401228928 1402800593
+94401000000 94405715148 31467000000 31468571716 1402228928 1403800644
+94404000000 94408715294 31468000000 31469571764 1403228928 1404800692
+94407000000 94411715438 31469000000 31470571812 1404228928 1405800740
+94410000000 94414715601 31470000000 31471571867 1405228928 1406800795
+94413000000 94417715753 31471000000 31472571917 1406228928 1407800845
+94416000000 94420715907 31472000000 31473571969 1407228928 1408800897
+94419000000 94423716027 31473000000 31474572009 1408228928 1409800937
+94422000000 94426716236 31474000000 31475572078 1409228928 1410801006
+94425000000 94429716366 31475000000 31476572122 1410228928 1411801050
+94428000000 94432716480 31476000000 31477572160 1411228928 1412801088
+94431000000 94435716641 31477000000 31478572213 1412228928 1413801141
+94434000000 94438716776 31478000000 31479572258 1413228928 1414801186
+94437000000 94441716919 31479000000 31480572306 1414228928 1415801234
+94440000000 94444717019 31480000000 31481572339 1415228928 1416801267
+94443000000 94447717253 31481000000 31482572417 1416228928 1417801345
+94446000000 94450717326 31482000000 31483572442 1417228928 1418801370
+94449000000 94453717447 31483000000 31484572482 1418228928 1419801410
+94452000000 94456717636 31484000000 31485572545 1419228928 1420801473
+94455000000 94459717790 31485000000 31486572596 1420228928 1421801524
+94458000000 94462717969 31486000000 31487572656 1421228928 1422801584
+94461000000 94465718115 31487000000 31488572705 1422228928 1423801633
+94464000000 94468718242 31488000000 31489572747 1423228928 1424801675
+94467000000 94471718416 31489000000 31490572805 1424228928 1425801733
+94470000000 94474718480 31490000000 31491572826 1425228928 1426801754
+94473000000 94477718687 31491000000 31492572895 1426228928 1427801823
+94476000000 94480718868 31492000000 31493572956 1427228928 1428801884
+94479000000 94483719017 31493000000 31494573005 1428228928 1429801933
+94482000000 94486719074 31494000000 31495573024 1429228928 1430801952
+94485000000 94489719270 31495000000 31496573090 1430228928 1431802018
+94488000000 94492719460 31496000000 31497573153 1431228928 1432802081
+94491000000 94495719605 31497000000 31498573201 1432228928 1433802129
+94494000000 94498719777 31498000000 31499573259 1433228928 1434802187
+94497000000 94501719910 31499000000 31500573303 1434228928 1435802231
+94500000000 94504719981 31500000000 31501573327 1435228928 1436802255
+94503000000 94507720207 31501000000 31502573402 1436228928 1437802330
+94506000000 94510720367 31502000000 31503573455 1437228928 1438802383
+94509000000 94513720499 31503000000 31504573499 1438228928 1439802427
+94512000000 94516720607 31504000000 31505573535 1439228928 1440802463
+94515000000 94519720818 31505000000 31506573606 1440228928 1441802534
+94518000000 94522720984 31506000000 31507573661 1441228928 1442802589
+94521000000 94525721095 31507000000 31508573698 1442228928 1443802626
+94524000000 94528721255 31508000000 31509573751 1443228928 1444802679
+94527000000 94531721367 31509000000 31510573789 1444228928 1445802717
+94530000000 94534721565 31510000000 31511573855 1445228928 1446802783
+94533000000 94537721655 31511000000 31512573885 1446228928 1447802813
+94536000000 94540721880 31512000000 31513573960 1447228928 1448802888
+94539000000 94543722012 31513000000 31514574004 1448228928 1449802932
+94542000000 94546722151 31514000000 31515574050 1449228928 1450802978
+94545000000 94549722202 31515000000 31516574067 1450228928 1451802995
+94548000000 94552722413 31516000000 31517574137 1451228928 1452803065
+94551000000 94555722622 31517000000 31518574207 1452228928 1453803135
+94554000000 94558722750 31518000000 31519574250 1453228928 1454803178
+94557000000 94561722893 31519000000 31520574297 1454228928 1455803225
+94560000000 94564723064 31520000000 31521574354 1455228928 1456803282
+94563000000 94567723161 31521000000 31522574387 1456228928 1457803315
+94566000000 94570723374 31522000000 31523574458 1457228928 1458803386
+94569000000 94573723504 31523000000 31524574501 1458228928 1459803429
+94572000000 94576723654 31524000000 31525574551 1459228928 1460803479
+94575000000 94579723814 31525000000 31526574604 1460228928 1461803532
+94578000000 94582723910 31526000000 31527574636 1461228928 1462803564
+94581000000 94585724098 31527000000 31528574699 1462228928 1463803627
+94584000000 94588724266 31528000000 31529574755 1463228928 1464803683
+94587000000 94591724402 31529000000 31530574800 1464228928 1465803728
+94590000000 94594724577 31530000000 31531574859 1465228928 1466803787
+94593000000 94597724699 31531000000 31532574899 1466228928 1467803827
+94596000000 94600724849 31532000000 31533574949 1467228928 1468803877
+94599000000 94603724997 31533000000 31534574999 1468228928 1469803927
+94602000000 94606725203 31534000000 31535575067 1469228928 1470803995
+94605000000 94609725317 31535000000 31536575105 1470228928 1471804033
+94608000000 94612725449 31536000000 31537575149 1471228928 1472804077
+94611000000 94615725623 31537000000 31538575207 1472228928 1473804135
+94614000000 94618725742 31538000000 31539575247 1473228928 1474804175
+94617000000 94621725866 31539000000 31540575288 1474228928 1475804216
+94620000000 94624726085 31540000000 31541575361 1475228928 1476804289
+94623000000 94627726221 31541000000 31542575407 1476228928 1477804335
+94626000000 94630726372 31542000000 31543575457 1477228928 1478804385
+94629000000 94633726532 31543000000 31544575510 1478228928 1479804438
+94632000000 94636726653 31544000000 31545575551 1479228928 1480804479
+94635000000 94639726734 31545000000 31546575578 1480228928 1481804506
+94638000000 94642726942 31546000000 31547575647 1481228928 1482804575
+94641000000 94645727097 31547000000 31548575699 1482228928 1483804627
+94644000000 94648727256 31548000000 31549575752 1483228928 1484804680
+94647000000 94651727408 31549000000 31550575802 1484228928 1485804730
+94650000000 94654727530 31550000000 31551575843 1485228928 1486804771
+94653000000 94657727708 31551000000 31552575902 1486228928 1487804830
+94656000000 94660727857 31552000000 31553575952 1487228928 1488804880
+94659000000 94663727985 31553000000 31554575995 1488228928 1489804923
+94662000000 94666728154 31554000000 31555576051 1489228928 1490804979
+94665000000 94669728274 31555000000 31556576091 1490228928 1491805019
+94668000000 94672728201 31556000000 31557576067 1491228928 1492804995
+94671000000 94675728524 31557000000 31558576174 1492228928 1493805102
+94674000000 94678728777 31558000000 31559576259 1493228928 1494805187
+94677000000 94681728887 31559000000 31560576295 1494228928 1495805223
+94680000000 94684729066 31560000000 31561576355 1495228928 1496805283
+94683000000 94687729114 31561000000 31562576371 1496228928 1497805299
+94686000000 94690729368 31562000000 31563576456 1497228928 1498805384
+94689000000 94693729487 31563000000 31564576495 1498228928 1499805423
+94692000000 94696729658 31564000000 31565576552 1499228928 1500805480
+94695000000 94699729805 31565000000 31566576601 1500228928 1501805529
+94698000000 94702729958 31566000000 31567576652 1501228928 1502805580
+94701000000 94705730104 31567000000 31568576701 1502228928 1503805629
+94704000000 94708730248 31568000000 31569576749 1503228928 1504805677
+94707000000 94711730411 31569000000 31570576803 1504228928 1505805731
+94710000000 94714730563 31570000000 31571576854 1505228928 1506805782
+94713000000 94717730717 31571000000 31572576905 1506228928 1507805833
+94716000000 94720730837 31572000000 31573576945 1507228928 1508805873
+94719000000 94723731046 31573000000 31574577015 1508228928 1509805943
+94722000000 94726731176 31574000000 31575577058 1509228928 1510805986
+94725000000 94729731290 31575000000 31576577096 1510228928 1511806024
+94728000000 94732731451 31576000000 31577577150 1511228928 1512806078
+94731000000 94735731586 31577000000 31578577195 1512228928 1513806123
+94734000000 94738731729 31578000000 31579577243 1513228928 1514806171
+94737000000 94741731829 31579000000 31580577276 1514228928 1515806204
+94740000000 94744732063 31580000000 31581577354 1515228928 1516806282
+94743000000 94747732136 31581000000 31582577378 1516228928 1517806306
+94746000000 94750732257 31582000000 31583577419 1517228928 1518806347
+94749000000 94753732446 31583000000 31584577482 1518228928 1519806410
+94752000000 94756732600 31584000000 31585577533 1519228928 1520806461
+94755000000 94759732779 31585000000 31586577593 1520228928 1521806521
+94758000000 94762732925 31586000000 31587577641 1521228928 1522806569
+94761000000 94765733052 31587000000 31588577684 1522228928 1523806612
+94764000000 94768733226 31588000000 31589577742 1523228928 1524806670
+94767000000 94771733290 31589000000 31590577763 1524228928 1525806691
+94770000000 94774733497 31590000000 31591577832 1525228928 1526806760
+94773000000 94777733678 31591000000 31592577892 1526228928 1527806820
+94776000000 94780733827 31592000000 31593577942 1527228928 1528806870
+94779000000 94783733884 31593000000 31594577961 1528228928 1529806889
+94782000000 94786734080 31594000000 31595578026 1529228928 1530806954
+94785000000 94789734270 31595000000 31596578090 1530228928 1531807018
+94788000000 94792734415 31596000000 31597578138 1531228928 1532807066
+94791000000 94795734587 31597000000 31598578195 1532228928 1533807123
+94794000000 94798734720 31598000000 31599578240 1533228928 1534807168
+94797000000 94801734791 31599000000 31600578263 1534228928 1535807191
+94800000000 94804735017 31600000000 31601578339 1535228928 1536807267
+94803000000 94807735177 31601000000 31602578392 1536228928 1537807320
+94806000000 94810735309 31602000000 31603578436 1537228928 1538807364
+94809000000 94813735417 31603000000 31604578472 1538228928 1539807400
+94812000000 94816735628 31604000000 31605578542 1539228928 1540807470
+94815000000 94819735794 31605000000 31606578598 1540228928 1541807526
+94818000000 94822735905 31606000000 31607578635 1541228928 1542807563
+94821000000 94825736065 31607000000 31608578688 1542228928 1543807616
+94824000000 94828736177 31608000000 31609578725 1543228928 1544807653
+94827000000 94831736375 31609000000 31610578791 1544228928 1545807719
+94830000000 94834736465 31610000000 31611578821 1545228928 1546807749
+94833000000 94837736690 31611000000 31612578896 1546228928 1547807824
+94836000000 94840736822 31612000000 31613578940 1547228928 1548807868
+94839000000 94843736961 31613000000 31614578987 1548228928 1549807915
+94842000000 94846737012 31614000000 31615579004 1549228928 1550807932
+94845000000 94849737223 31615000000 31616579074 1550228928 1551808002
+94848000000 94852737432 31616000000 31617579144 1551228928 1552808072
+94851000000 94855737560 31617000000 31618579186 1552228928 1553808114
+94854000000 94858737703 31618000000 31619579234 1553228928 1554808162
+94857000000 94861737874 31619000000 31620579291 1554228928 1555808219
+94860000000 94864737971 31620000000 31621579323 1555228928 1556808251
+94863000000 94867738184 31621000000 31622579394 1556228928 1557808322
+94866000000 94870738314 31622000000 31623579438 1557228928 1558808366
+94869000000 94873738464 31623000000 31624579488 1558228928 1559808416
+94872000000 94876738624 31624000000 31625579541 1559228928 1560808469
+94875000000 94879738720 31625000000 31626579573 1560228928 1561808501
+94878000000 94882738908 31626000000 31627579636 1561228928 1562808564
+94881000000 94885739076 31627000000 31628579692 1562228928 1563808620
+94884000000 94888739212 31628000000 31629579737 1563228928 1564808665
+94887000000 94891739387 31629000000 31630579795 1564228928 1565808723
+94890000000 94894739509 31630000000 31631579836 1565228928 1566808764
+94893000000 94897739659 31631000000 31632579886 1566228928 1567808814
+94896000000 94900739807 31632000000 31633579935 1567228928 1568808863
+94899000000 94903740013 31633000000 31634580004 1568228928 1569808932
+94902000000 94906740127 31634000000 31635580042 1569228928 1570808970
+94905000000 94909740259 31635000000 31636580086 1570228928 1571809014
+94908000000 94912740433 31636000000 31637580144 1571228928 1572809072
+94911000000 94915740552 31637000000 31638580184 1572228928 1573809112
+94914000000 94918740676 31638000000 31639580225 1573228928 1574809153
+94917000000 94921740895 31639000000 31640580298 1574228928 1575809226
+94920000000 94924741031 31640000000 31641580343 1575228928 1576809271
+94923000000 94927741182 31641000000 31642580394 1576228928 1577809322
+94926000000 94930741342 31642000000 31643580447 1577228928 1578809375
+94929000000 94933741463 31643000000 31644580487 1578228928 1579809415
+94932000000 94936741544 31644000000 31645580514 1579228928 1580809442
+94935000000 94939741752 31645000000 31646580584 1580228928 1581809512
+94938000000 94942741907 31646000000 31647580635 1581228928 1582809563
+94941000000 94945742066 31647000000 31648580688 1582228928 1583809616
+94944000000 94948742218 31648000000 31649580739 1583228928 1584809667
+94947000000 94951742340 31649000000 31650580780 1584228928 1585809708
+94950000000 94954742518 31650000000 31651580839 1585228928 1586809767
+94953000000 94957742667 31651000000 31652580889 1586228928 1587809817
+94956000000 94960742795 31652000000 31653580931 1587228928 1588809859
+94959000000 94963742964 31653000000 31654580988 1588228928 1589809916
+94962000000 94966743084 31654000000 31655581028 1589228928 1590809956
+94965000000 94969743011 31655000000 31656581003 1590228928 1591809931
+94968000000 94972743334 31656000000 31657581111 1591228928 1592810039
+94971000000 94975743587 31657000000 31658581195 1592228928 1593810123
+94974000000 94978743697 31658000000 31659581232 1593228928 1594810160
+94977000000 94981743876 31659000000 31660581292 1594228928 1595810220
+94980000000 94984743924 31660000000 31661581308 1595228928 1596810236
+94983000000 94987744178 31661000000 31662581392 1596228928 1597810320
+94986000000 94990744297 31662000000 31663581432 1597228928 1598810360
+94989000000 94993744468 31663000000 31664581489 1598228928 1599810417
+94992000000 94996744615 31664000000 31665581538 1599228928 1600810466
+94995000000 94999744768 31665000000 31666581589 1600228928 1601810517
+94998000000 95002744914 31666000000 31667581638 1601228928 1602810566
+95001000000 95005745058 31667000000 31668581686 1602228928 1603810614
+95004000000 95008745221 31668000000 31669581740 1603228928 1604810668
+95007000000 95011745373 31669000000 31670581791 1604228928 1605810719
+95010000000 95014745527 31670000000 31671581842 1605228928 1606810770
+95013000000 95017745647 31671000000 31672581882 1606228928 1607810810
+95016000000 95020745856 31672000000 31673581952 1607228928 1608810880
+95019000000 95023745986 31673000000 31674581995 1608228928 1609810923
+95022000000 95026746100 31674000000 31675582033 1609228928 1610810961
+95025000000 95029746261 31675000000 31676582087 1610228928 1611811015
+95028000000 95032746396 31676000000 31677582132 1611228928 1612811060
+95031000000 95035746539 31677000000 31678582179 1612228928 1613811107
+95034000000 95038746639 31678000000 31679582213 1613228928 1614811141
+95037000000 95041746873 31679000000 31680582291 1614228928 1615811219
+95040000000 95044746946 31680000000 31681582315 1615228928 1616811243
+95043000000 95047747067 31681000000 31682582355 1616228928 1617811283
+95046000000 95050747256 31682000000 31683582418 1617228928 1618811346
+95049000000 95053747410 31683000000 31684582470 1618228928 1619811398
+95052000000 95056747589 31684000000 31685582529 1619228928 1620811457
+95055000000 95059747735 31685000000 31686582578 1620228928 1621811506
+95058000000 95062747862 31686000000 31687582620 1621228928 1622811548
+95061000000 95065748036 31687000000 31688582678 1622228928 1623811606
+95064000000 95068748100 31688000000 31689582700 1623228928 1624811628
+95067000000 95071748307 31689000000 31690582769 1624228928 1625811697
+95070000000 95074748488 31690000000 31691582829 1625228928 1626811757
+95073000000 95077748637 31691000000 31692582879 1626228928 1627811807
+95076000000 95080748694 31692000000 31693582898 1627228928 1628811826
+95079000000 95083748890 31693000000 31694582963 1628228928 1629811891
+95082000000 95086749080 31694000000 31695583026 1629228928 1630811954
+95085000000 95089749225 31695000000 31696583075 1630228928 1631812003
+95088000000 95092749397 31696000000 31697583132 1631228928 1632812060
+95091000000 95095749530 31697000000 31698583176 1632228928 1633812104
+95094000000 95098749601 31698000000 31699583200 1633228928 1634812128
+95097000000 95101749827 31699000000 31700583275 1634228928 1635812203
+95100000000 95104749987 31700000000 31701583329 1635228928 1636812257
+95103000000 95107750119 31701000000 31702583373 1636228928 1637812301
+95106000000 95110750227 31702000000 31703583409 1637228928 1638812337
+95109000000 95113750438 31703000000 31704583479 1638228928 1639812407
+95112000000 95116750604 31704000000 31705583534 1639228928 1640812462
+95115000000 95119750715 31705000000 31706583571 1640228928 1641812499
+95118000000 95122750875 31706000000 31707583625 1641228928 1642812553
+95121000000 95125750987 31707000000 31708583662 1642228928 1643812590
+95124000000 95128751185 31708000000 31709583728 1643228928 1644812656
+95127000000 95131751275 31709000000 31710583758 1644228928 1645812686
+95130000000 95134751500 31710000000 31711583833 1645228928 1646812761
+95133000000 95137751632 31711000000 31712583877 1646228928 1647812805
+95136000000 95140751771 31712000000 31713583923 1647228928 1648812851
+95139000000 95143751822 31713000000 31714583940 1648228928 1649812868
+95142000000 95146752033 31714000000 31715584011 1649228928 1650812939
+95145000000 95149752242 31715000000 31716584080 1650228928 1651813008
+95148000000 95152752370 31716000000 31717584123 1651228928 1652813051
+95151000000 95155752513 31717000000 31718584171 1652228928 1653813099
+95154000000 95158752684 31718000000 31719584228 1653228928 1654813156
+95157000000 95161752781 31719000000 31720584260 1654228928 1655813188
+95160000000 95164752994 31720000000 31721584331 1655228928 1656813259
+95163000000 95167753124 31721000000 31722584374 1656228928 1657813302
+95166000000 95170753274 31722000000 31723584424 1657228928 1658813352
+95169000000 95173753434 31723000000 31724584478 1658228928 1659813406
+95172000000 95176753530 31724000000 31725584510 1659228928 1660813438
+95175000000 95179753718 31725000000 31726584572 1660228928 1661813500
+95178000000 95182753886 31726000000 31727584628 1661228928 1662813556
+95181000000 95185754022 31727000000 31728584674 1662228928 1663813602
+95184000000 95188754197 31728000000 31729584732 1663228928 1664813660
+95187000000 95191754319 31729000000 31730584773 1664228928 1665813701
+95190000000 95194754469 31730000000 31731584823 1665228928 1666813751
+95193000000 95197754617 31731000000 31732584872 1666228928 1667813800
+95196000000 95200754823 31732000000 31733584941 1667228928 1668813869
+95199000000 95203754937 31733000000 31734584979 1668228928 1669813907
+95202000000 95206755069 31734000000 31735585023 1669228928 1670813951
+95205000000 95209755243 31735000000 31736585081 1670228928 1671814009
+95208000000 95212755362 31736000000 31737585120 1671228928 1672814048
+95211000000 95215755486 31737000000 31738585162 1672228928 1673814090
+95214000000 95218755705 31738000000 31739585235 1673228928 1674814163
+95217000000 95221755841 31739000000 31740585280 1674228928 1675814208
+95220000000 95224755992 31740000000 31741585330 1675228928 1676814258
+95223000000 95227756152 31741000000 31742585384 1676228928 1677814312
+95226000000 95230756273 31742000000 31743585424 1677228928 1678814352
+95229000000 95233756354 31743000000 31744585451 1678228928 1679814379
+95232000000 95236756562 31744000000 31745585520 1679228928 1680814448
+95235000000 95239756717 31745000000 31746585572 1680228928 1681814500
+95238000000 95242756876 31746000000 31747585625 1681228928 1682814553
+95241000000 95245757028 31747000000 31748585676 1682228928 1683814604
+95244000000 95248757150 31748000000 31749585716 1683228928 1684814644
+95247000000 95251757328 31749000000 31750585776 1684228928 1685814704
+95250000000 95254757477 31750000000 31751585825 1685228928 1686814753
+95253000000 95257757605 31751000000 31752585868 1686228928 1687814796
+95256000000 95260757774 31752000000 31753585924 1687228928 1688814852
+95259000000 95263757894 31753000000 31754585964 1688228928 1689814892
+95262000000 95266757821 31754000000 31755585940 1689228928 1690814868
+95265000000 95269758144 31755000000 31756586048 1690228928 1691814976
+95268000000 95272758397 31756000000 31757586132 1691228928 1692815060
+95271000000 95275758507 31757000000 31758586169 1692228928 1693815097
+95274000000 95278758686 31758000000 31759586228 1693228928 1694815156
+95277000000 95281758734 31759000000 31760586244 1694228928 1695815172
+95280000000 95284758988 31760000000 31761586329 1695228928 1696815257
+95283000000 95287759107 31761000000 31762586369 1696228928 1697815297
+95286000000 95290759278 31762000000 31763586426 1697228928 1698815354
+95289000000 95293759425 31763000000 31764586475 1698228928 1699815403
+95292000000 95296759578 31764000000 31765586526 1699228928 1700815454
+95295000000 95299759724 31765000000 31766586574 1700228928 1701815502
+95298000000 95302759868 31766000000 31767586622 1701228928 1702815550
+95301000000 95305760031 31767000000 31768586677 1702228928 1703815605
+95304000000 95308760183 31768000000 31769586727 1703228928 1704815655
+95307000000 95311760337 31769000000 31770586779 1704228928 1705815707
+95310000000 95314760457 31770000000 31771586819 1705228928 1706815747
+95313000000 95317760666 31771000000 31772586888 1706228928 1707815816
+95316000000 95320760796 31772000000 31773586932 1707228928 1708815860
+95319000000 95323760910 31773000000 31774586970 1708228928 1709815898
+95322000000 95326761071 31774000000 31775587023 1709228928 1710815951
+95325000000 95329761206 31775000000 31776587068 1710228928 1711815996
+95328000000 95332761349 31776000000 31777587116 1711228928 1712816044
+95331000000 95335761449 31777000000 31778587149 1712228928 1713816077
+95334000000 95338761683 31778000000 31779587227 1713228928 1714816155
+95337000000 95341761756 31779000000 31780587252 1714228928 1715816180
+95340000000 95344761877 31780000000 31781587292 1715228928 1716816220
+95343000000 95347762066 31781000000 31782587355 1716228928 1717816283
+95346000000 95350762220 31782000000 31783587406 1717228928 1718816334
+95349000000 95353762399 31783000000 31784587466 1718228928 1719816394
+95352000000 95356762545 31784000000 31785587515 1719228928 1720816443
+95355000000 95359762672 31785000000 31786587557 1720228928 1721816485
+95358000000 95362762846 31786000000 31787587615 1721228928 1722816543
+95361000000 95365762910 31787000000 31788587636 1722228928 1723816564
+95364000000 95368763117 31788000000 31789587705 1723228928 1724816633
+95367000000 95371763298 31789000000 31790587766 1724228928 1725816694
+95370000000 95374763447 31790000000 31791587815 1725228928 1726816743
+95373000000 95377763504 31791000000 31792587834 1726228928 1727816762
+95376000000 95380763700 31792000000 31793587900 1727228928 1728816828
+95379000000 95383763890 31793000000 31794587963 1728228928 1729816891
+95382000000 95386764035 31794000000 31795588011 1729228928 1730816939
+95385000000 95389764207 31795000000 31796588069 1730228928 1731816997
+95388000000 95392764340 31796000000 31797588113 1731228928 1732817041
+95391000000 95395764411 31797000000 31798588137 1732228928 1733817065
+95394000000 95398764637 31798000000 31799588212 1733228928 1734817140
+95397000000 95401764797 31799000000 31800588265 1734228928 1735817193
+95400000000 95404764929 31800000000 31801588309 1735228928 1736817237
+95403000000 95407765037 31801000000 31802588345 1736228928 1737817273
+95406000000 95410765248 31802000000 31803588416 1737228928 1738817344
+95409000000 95413765414 31803000000 31804588471 1738228928 1739817399
+95412000000 95416765525 31804000000 31805588508 1739228928 1740817436
+95415000000 95419765685 31805000000 31806588561 1740228928 1741817489
+95418000000 95422765797 31806000000 31807588599 1741228928 1742817527
+95421000000 95425765995 31807000000 31808588665 1742228928 1743817593
+95424000000 95428766085 31808000000 31809588695 1743228928 1744817623
+95427000000 95431766310 31809000000 31810588770 1744228928 1745817698
+95430000000 95434766442 31810000000 31811588814 1745228928 1746817742
+95433000000 95437766581 31811000000 31812588860 1746228928 1747817788
+95436000000 95440766632 31812000000 31813588877 1747228928 1748817805
+95439000000 95443766843 31813000000 31814588947 1748228928 1749817875
+95442000000 95446767052 31814000000 31815589017 1749228928 1750817945
+95445000000 95449767180 31815000000 31816589060 1750228928 1751817988
+95448000000 95452767323 31816000000 31817589107 1751228928 1752818035
+95451000000 95455767494 31817000000 31818589164 1752228928 1753818092
+95454000000 95458767591 31818000000 31819589197 1753228928 1754818125
+95457000000 95461767804 31819000000 31820589268 1754228928 1755818196
+95460000000 95464767934 31820000000 31821589311 1755228928 1756818239
+95463000000 95467768084 31821000000 31822589361 1756228928 1757818289
+95466000000 95470768244 31822000000 31823589414 1757228928 1758818342
+95469000000 95473768340 31823000000 31824589446 1758228928 1759818374
+95472000000 95476768528 31824000000 31825589509 1759228928 1760818437
+95475000000 95479768696 31825000000 31826589565 1760228928 1761818493
+95478000000 95482768832 31826000000 31827589610 1761228928 1762818538
+95481000000 95485769007 31827000000 31828589669 1762228928 1763818597
+95484000000 95488769129 31828000000 31829589709 1763228928 1764818637
+95487000000 95491769279 31829000000 31830589759 1764228928 1765818687
+95490000000 95494769427 31830000000 31831589809 1765228928 1766818737
+95493000000 95497769633 31831000000 31832589877 1766228928 1767818805
+95496000000 95500769747 31832000000 31833589915 1767228928 1768818843
+95499000000 95503769879 31833000000 31834589959 1768228928 1769818887
+95502000000 95506770053 31834000000 31835590017 1769228928 1770818945
+95505000000 95509770172 31835000000 31836590057 1770228928 1771818985
+95508000000 95512770296 31836000000 31837590098 1771228928 1772819026
+95511000000 95515770515 31837000000 31838590171 1772228928 1773819099
+95514000000 95518770651 31838000000 31839590217 1773228928 1774819145
+95517000000 95521770802 31839000000 31840590267 1774228928 1775819195
+95520000000 95524770962 31840000000 31841590320 1775228928 1776819248
+95523000000 95527771083 31841000000 31842590361 1776228928 1777819289
+95526000000 95530771164 31842000000 31843590388 1777228928 1778819316
+95529000000 95533771372 31843000000 31844590457 1778228928 1779819385
+95532000000 95536771527 31844000000 31845590509 1779228928 1780819437
+95535000000 95539771686 31845000000 31846590562 1780228928 1781819490
+95538000000 95542771838 31846000000 31847590612 1781228928 1782819540
+95541000000 95545771960 31847000000 31848590653 1782228928 1783819581
+95544000000 95548772138 31848000000 31849590712 1783228928 1784819640
+95547000000 95551772287 31849000000 31850590762 1784228928 1785819690
+95550000000 95554772415 31850000000 31851590805 1785228928 1786819733
+95553000000 95557772584 31851000000 31852590861 1786228928 1787819789
+95556000000 95560772704 31852000000 31853590901 1787228928 1788819829
+95559000000 95563772631 31853000000 31854590877 1788228928 1789819805
+95562000000 95566772954 31854000000 31855590984 1789228928 1790819912
+95565000000 95569773207 31855000000 31856591069 1790228928 1791819997
+95568000000 95572773317 31856000000 31857591105 1791228928 1792820033
+95571000000 95575773496 31857000000 31858591165 1792228928 1793820093
+95574000000 95578773544 31858000000 31859591181 1793228928 1794820109
+95577000000 95581773798 31859000000 31860591266 1794228928 1795820194
+95580000000 95584773917 31860000000 31861591305 1795228928 1796820233
+95583000000 95587774088 31861000000 31862591362 1796228928 1797820290
+95586000000 95590774235 31862000000 31863591411 1797228928 1798820339
+95589000000 95593774388 31863000000 31864591462 1798228928 1799820390
+95592000000 95596774534 31864000000 31865591511 1799228928 1800820439
+95595000000 95599774678 31865000000 31866591559 1800228928 1801820487
+95598000000 95602774841 31866000000 31867591613 1801228928 1802820541
+95601000000 95605774993 31867000000 31868591664 1802228928 1803820592
+95604000000 95608775147 31868000000 31869591715 1803228928 1804820643
+95607000000 95611775267 31869000000 31870591755 1804228928 1805820683
+95610000000 95614775476 31870000000 31871591825 1805228928 1806820753
+95613000000 95617775606 31871000000 31872591868 1806228928 1807820796
+95616000000 95620775720 31872000000 31873591906 1807228928 1808820834
+95619000000 95623775881 31873000000 31874591960 1808228928 1809820888
+95622000000 95626776016 31874000000 31875592005 1809228928 1810820933
+95625000000 95629776159 31875000000 31876592053 1810228928 1811820981
+95628000000 95632776259 31876000000 31877592086 1811228928 1812821014
+95631000000 95635776493 31877000000 31878592164 1812228928 1813821092
+95634000000 95638776566 31878000000 31879592188 1813228928 1814821116
+95637000000 95641776687 31879000000 31880592229 1814228928 1815821157
+95640000000 95644776876 31880000000 31881592292 1815228928 1816821220
+95643000000 95647777030 31881000000 31882592343 1816228928 1817821271
+95646000000 95650777209 31882000000 31883592403 1817228928 1818821331
+95649000000 95653777355 31883000000 31884592451 1818228928 1819821379
+95652000000 95656777482 31884000000 31885592494 1819228928 1820821422
+95655000000 95659777656 31885000000 31886592552 1820228928 1821821480
+95658000000 95662777720 31886000000 31887592573 1821228928 1822821501
+95661000000 95665777927 31887000000 31888592642 1822228928 1823821570
+95664000000 95668778108 31888000000 31889592702 1823228928 1824821630
+95667000000 95671778257 31889000000 31890592752 1824228928 1825821680
+95670000000 95674778314 31890000000 31891592771 1825228928 1826821699
+95673000000 95677778510 31891000000 31892592836 1826228928 1827821764
+95676000000 95680778700 31892000000 31893592900 1827228928 1828821828
+95679000000 95683778845 31893000000 31894592948 1828228928 1829821876
+95682000000 95686779017 31894000000 31895593005 1829228928 1830821933
+95685000000 95689779150 31895000000 31896593050 1830228928 1831821978
+95688000000 95692779221 31896000000 31897593073 1831228928 1832822001
+95691000000 95695779447 31897000000 31898593149 1832228928 1833822077
+95694000000 95698779607 31898000000 31899593202 1833228928 1834822130
+95697000000 95701779739 31899000000 31900593246 1834228928 1835822174
+95700000000 95704779847 31900000000 31901593282 1835228928 1836822210
+95703000000 95707780058 31901000000 31902593352 1836228928 1837822280
+95706000000 95710780224 31902000000 31903593408 1837228928 1838822336
+95709000000 95713780335 31903000000 31904593445 1838228928 1839822373
+95712000000 95716780495 31904000000 31905593498 1839228928 1840822426
+95715000000 95719780607 31905000000 31906593535 1840228928 1841822463
+95718000000 95722780805 31906000000 31907593601 1841228928 1842822529
+95721000000 95725780895 31907000000 31908593631 1842228928 1843822559
+95724000000 95728781120 31908000000 31909593706 1843228928 1844822634
+95727000000 95731781252 31909000000 31910593750 1844228928 1845822678
+95730000000 95734781391 31910000000 31911593797 1845228928 1846822725
+95733000000 95737781442 31911000000 31912593814 1846228928 1847822742
+95736000000 95740781653 31912000000 31913593884 1847228928 1848822812
+95739000000 95743781862 31913000000 31914593954 1848228928 1849822882
+95742000000 95746781990 31914000000 31915593996 1849228928 1850822924
+95745000000 95749782133 31915000000 31916594044 1850228928 1851822972
+95748000000 95752782304 31916000000 31917594101 1851228928 1852823029
+95751000000 95755782401 31917000000 31918594133 1852228928 1853823061
+95754000000 95758782614 31918000000 31919594204 1853228928 1854823132
+95757000000 95761782744 31919000000 31920594248 1854228928 1855823176
+95760000000 95764782894 31920000000 31921594298 1855228928 1856823226
+95763000000 95767783054 31921000000 31922594351 1856228928 1857823279
+95766000000 95770783150 31922000000 31923594383 1857228928 1858823311
+95769000000 95773783338 31923000000 31924594446 1858228928 1859823374
+95772000000 95776783506 31924000000 31925594502 1859228928 1860823430
+95775000000 95779783642 31925000000 31926594547 1860228928 1861823475
+95778000000 95782783817 31926000000 31927594605 1861228928 1862823533
+95781000000 95785783939 31927000000 31928594646 1862228928 1863823574
+95784000000 95788784089 31928000000 31929594696 1863228928 1864823624
+95787000000 95791784237 31929000000 31930594745 1864228928 1865823673
+95790000000 95794784443 31930000000 31931594814 1865228928 1866823742
+95793000000 95797784557 31931000000 31932594852 1866228928 1867823780
+95796000000 95800784689 31932000000 31933594896 1867228928 1868823824
+95799000000 95803784863 31933000000 31934594954 1868228928 1869823882
+95802000000 95806784982 31934000000 31935594994 1869228928 1870823922
+95805000000 95809785106 31935000000 31936595035 1870228928 1871823963
+95808000000 95812785325 31936000000 31937595108 1871228928 1872824036
+95811000000 95815785461 31937000000 31938595153 1872228928 1873824081
+95814000000 95818785612 31938000000 31939595204 1873228928 1874824132
+95817000000 95821785772 31939000000 31940595257 1874228928 1875824185
+95820000000 95824785893 31940000000 31941595297 1875228928 1876824225
+95823000000 95827785974 31941000000 31942595324 1876228928 1877824252
+95826000000 95830786182 31942000000 31943595394 1877228928 1878824322
+95829000000 95833786337 31943000000 31944595445 1878228928 1879824373
+95832000000 95836786496 31944000000 31945595498 1879228928 1880824426
+95835000000 95839786648 31945000000 31946595549 1880228928 1881824477
+95838000000 95842786770 31946000000 31947595590 1881228928 1882824518
+95841000000 95845786948 31947000000 31948595649 1882228928 1883824577
+95844000000 95848787097 31948000000 31949595699 1883228928 1884824627
+95847000000 95851787225 31949000000 31950595741 1884228928 1885824669
+95850000000 95854787394 31950000000 31951595798 1885228928 1886824726
+95853000000 95857787514 31951000000 31952595838 1886228928 1887824766
+95856000000 95860787441 31952000000 31953595813 1887228928 1888824741
+95859000000 95863787764 31953000000 31954595921 1888228928 1889824849
+95862000000 95866788017 31954000000 31955596005 1889228928 1890824933
+95865000000 95869788127 31955000000 31956596042 1890228928 1891824970
+95868000000 95872788306 31956000000 31957596102 1891228928 1892825030
+95871000000 95875788354 31957000000 31958596118 1892228928 1893825046
+95874000000 95878788608 31958000000 31959596202 1893228928 1894825130
+95877000000 95881788727 31959000000 31960596242 1894228928 1895825170
+95880000000 95884788898 31960000000 31961596299 1895228928 1896825227
+95883000000 95887789045 31961000000 31962596348 1896228928 1897825276
+95886000000 95890789198 31962000000 31963596399 1897228928 1898825327
+95889000000 95893789344 31963000000 31964596448 1898228928 1899825376
+95892000000 95896789488 31964000000 31965596496 1899228928 1900825424
+95895000000 95899789651 31965000000 31966596550 1900228928 1901825478
+95898000000 95902789803 31966000000 31967596601 1901228928 1902825529
+95901000000 95905789957 31967000000 31968596652 1902228928 1903825580
+95904000000 95908790077 31968000000 31969596692 1903228928 1904825620
+95907000000 95911790286 31969000000 31970596762 1904228928 1905825690
+95910000000 95914790416 31970000000 31971596805 1905228928 1906825733
+95913000000 95917790530 31971000000 31972596843 1906228928 1907825771
+95916000000 95920790691 31972000000 31973596897 1907228928 1908825825
+95919000000 95923790826 31973000000 31974596942 1908228928 1909825870
+95922000000 95926790969 31974000000 31975596989 1909228928 1910825917
+95925000000 95929791069 31975000000 31976597023 1910228928 1911825951
+95928000000 95932791303 31976000000 31977597101 1911228928 1912826029
+95931000000 95935791376 31977000000 31978597125 1912228928 1913826053
+95934000000 95938791497 31978000000 31979597165 1913228928 1914826093
+95937000000 95941791686 31979000000 31980597228 1914228928 1915826156
+95940000000 95944791840 31980000000 31981597280 1915228928 1916826208
+95943000000 95947792019 31981000000 31982597339 1916228928 1917826267
+95946000000 95950792165 31982000000 31983597388 1917228928 1918826316
+95949000000 95953792292 31983000000 31984597430 1918228928 1919826358
+95952000000 95956792466 31984000000 31985597488 1919228928 1920826416
+95955000000 95959792530 31985000000 31986597510 1920228928 1921826438
+95958000000 95962792737 31986000000 31987597579 1921228928 1922826507
+95961000000 95965792918 31987000000 31988597639 1922228928 1923826567
+95964000000 95968793067 31988000000 31989597689 1923228928 1924826617
+95967000000 95971793124 31989000000 31990597708 1924228928 1925826636
+95970000000 95974793320 31990000000 31991597773 1925228928 1926826701
+95973000000 95977793510 31991000000 31992597836 1926228928 1927826764
+95976000000 95980793655 31992000000 31993597885 1927228928 1928826813
+95979000000 95983793827 31993000000 31994597942 1928228928 1929826870
+95982000000 95986793960 31994000000 31995597986 1929228928 1930826914
+95985000000 95989794031 31995000000 31996598010 1930228928 1931826938
+95988000000 95992794257 31996000000 31997598085 1931228928 1932827013
+95991000000 95995794417 31997000000 31998598139 1932228928 1933827067
+95994000000 95998794549 31998000000 31999598183 1933228928 1934827111
+95997000000 96001794657 31999000000 32000598219 1934228928 1935827147
+96000000000 96004794868 32000000000 32001598289 1935228928 1936827217
+96003000000 96007795034 32001000000 32002598344 1936228928 1937827272
+96006000000 96010795145 32002000000 32003598381 1937228928 1938827309
+96009000000 96013795305 32003000000 32004598435 1938228928 1939827363
+96012000000 96016795417 32004000000 32005598472 1939228928 1940827400
+96015000000 96019795615 32005000000 32006598538 1940228928 1941827466
+96018000000 96022795705 32006000000 32007598568 1941228928 1942827496
+96021000000 96025795930 32007000000 32008598643 1942228928 1943827571
+96024000000 96028796062 32008000000 32009598687 1943228928 1944827615
+96027000000 96031796201 32009000000 32010598733 1944228928 1945827661
+96030000000 96034796252 32010000000 32011598750 1945228928 1946827678
+96033000000 96037796463 32011000000 32012598821 1946228928 1947827749
+96036000000 96040796672 32012000000 32013598890 1947228928 1948827818
+96039000000 96043796800 32013000000 32014598933 1948228928 1949827861
+96042000000 96046796943 32014000000 32015598981 1949228928 1950827909
+96045000000 96049797114 32015000000 32016599038 1950228928 1951827966
+96048000000 96052797211 32016000000 32017599070 1951228928 1952827998
+96051000000 96055797424 32017000000 32018599141 1952228928 1953828069
+96054000000 96058797554 32018000000 32019599184 1953228928 1954828112
+96057000000 96061797704 32019000000 32020599234 1954228928 1955828162
+96060000000 96064797864 32020000000 32021599288 1955228928 1956828216
+96063000000 96067797960 32021000000 32022599320 1956228928 1957828248
+96066000000 96070798148 32022000000 32023599382 1957228928 1958828310
+96069000000 96073798316 32023000000 32024599438 1958228928 1959828366
+96072000000 96076798452 32024000000 32025599484 1959228928 1960828412
+96075000000 96079798627 32025000000 32026599542 1960228928 1961828470
+96078000000 96082798749 32026000000 32027599583 1961228928 1962828511
+96081000000 96085798899 32027000000 32028599633 1962228928 1963828561
+96084000000 96088799047 32028000000 32029599682 1963228928 1964828610
+96087000000 96091799253 32029000000 32030599751 1964228928 1965828679
+96090000000 96094799367 32030000000 32031599789 1965228928 1966828717
+96093000000 96097799499 32031000000 32032599833 1966228928 1967828761
+96096000000 96100799673 32032000000 32033599891 1967228928 1968828819
+96099000000 96103799792 32033000000 32034599930 1968228928 1969828858
+96102000000 96106799916 32034000000 32035599972 1969228928 1970828900
+96105000000 96109800135 32035000000 32036600045 1970228928 1971828973
+96108000000 96112800271 32036000000 32037600090 1971228928 1972829018
+96111000000 96115800422 32037000000 32038600140 1972228928 1973829068
+96114000000 96118800582 32038000000 32039600194 1973228928 1974829122
+96117000000 96121800703 32039000000 32040600234 1974228928 1975829162
+96120000000 96124800784 32040000000 32041600261 1975228928 1976829189
+96123000000 96127800992 32041000000 32042600330 1976228928 1977829258
+96126000000 96130801147 32042000000 32043600382 1977228928 1978829310
+96129000000 96133801306 32043000000 32044600435 1978228928 1979829363
+96132000000 96136801458 32044000000 32045600486 1979228928 1980829414
+96135000000 96139801580 32045000000 32046600526 1980228928 1981829454
+96138000000 96142801758 32046000000 32047600586 1981228928 1982829514
+96141000000 96145801907 32047000000 32048600635 1982228928 1983829563
+96144000000 96148802035 32048000000 32049600678 1983228928 1984829606
+96147000000 96151802204 32049000000 32050600734 1984228928 1985829662
+96150000000 96154802324 32050000000 32051600774 1985228928 1986829702
+96153000000 96157802251 32051000000 32052600750 1986228928 1987829678
+96156000000 96160802574 32052000000 32053600858 1987228928 1988829786
+96159000000 96163802827 32053000000 32054600942 1988228928 1989829870
+96162000000 96166802937 32054000000 32055600979 1989228928 1990829907
+96165000000 96169803116 32055000000 32056601038 1990228928 1991829966
+96168000000 96172803164 32056000000 32057601054 1991228928 1992829982
+96171000000 96175803418 32057000000 32058601139 1992228928 1993830067
+96174000000 96178803537 32058000000 32059601179 1993228928 1994830107
+96177000000 96181803708 32059000000 32060601236 1994228928 1995830164
+96180000000 96184803855 32060000000 32061601285 1995228928 1996830213
+96183000000 96187804008 32061000000 32062601336 1996228928 1997830264
+96186000000 96190804154 32062000000 32063601384 1997228928 1998830312
+96189000000 96193804298 32063000000 32064601432 1998228928 1999830360
+96192000000 96196804461 32064000000 32065601487 1999228928 2000830415
+96195000000 96199804613 32065000000 32066601537 2000228928 2001830465
+96198000000 96202804767 32066000000 32067601589 2001228928 2002830517
+96201000000 96205804887 32067000000 32068601629 2002228928 2003830557
+96204000000 96208805096 32068000000 32069601698 2003228928 2004830626
+96207000000 96211805226 32069000000 32070601742 2004228928 2005830670
+96210000000 96214805340 32070000000 32071601780 2005228928 2006830708
+96213000000 96217805501 32071000000 32072601833 2006228928 2007830761
+96216000000 96220805636 32072000000 32073601878 2007228928 2008830806
+96219000000 96223805779 32073000000 32074601926 2008228928 2009830854
+96222000000 96226805879 32074000000 32075601959 2009228928 2010830887
+96225000000 96229806113 32075000000 32076602037 2010228928 2011830965
+96228000000 96232806186 32076000000 32077602062 2011228928 2012830990
+96231000000 96235806307 32077000000 32078602102 2012228928 2013831030
+96234000000 96238806496 32078000000 32079602165 2013228928 2014831093
+96237000000 96241806650 32079000000 32080602216 2014228928 2015831144
+96240000000 96244806829 32080000000 32081602276 2015228928 2016831204
+96243000000 96247806975 32081000000 32082602325 2016228928 2017831253
+96246000000 96250807102 32082000000 32083602367 2017228928 2018831295
+96249000000 96253807276 32083000000 32084602425 2018228928 2019831353
+96252000000 96256807340 32084000000 32085602446 2019228928 2020831374
+96255000000 96259807547 32085000000 32086602515 2020228928 2021831443
+96258000000 96262807728 32086000000 32087602576 2021228928 2022831504
+96261000000 96265807877 32087000000 32088602625 2022228928 2023831553
+96264000000 96268807934 32088000000 32089602644 2023228928 2024831572
+96267000000 96271808130 32089000000 32090602710 2024228928 2025831638
+96270000000 96274808320 32090000000 32091602773 2025228928 2026831701
+96273000000 96277808465 32091000000 32092602821 2026228928 2027831749
+96276000000 96280808637 32092000000 32093602879 2027228928 2028831807
+96279000000 96283808770 32093000000 32094602923 2028228928 2029831851
+96282000000 96286808841 32094000000 32095602947 2029228928 2030831875
+96285000000 96289809067 32095000000 32096603022 2030228928 2031831950
+96288000000 96292809227 32096000000 32097603075 2031228928 2032832003
+96291000000 96295809359 32097000000 32098603119 2032228928 2033832047
+96294000000 96298809467 32098000000 32099603155 2033228928 2034832083
+96297000000 96301809678 32099000000 32100603226 2034228928 2035832154
+96300000000 96304809844 32100000000 32101603281 2035228928 2036832209
+96303000000 96307809955 32101000000 32102603318 2036228928 2037832246
+96306000000 96310810115 32102000000 32103603371 2037228928 2038832299
+96309000000 96313810227 32103000000 32104603409 2038228928 2039832337
+96312000000 96316810425 32104000000 32105603475 2039228928 2040832403
+96315000000 96319810515 32105000000 32106603505 2040228928 2041832433
+96318000000 96322810740 32106000000 32107603580 2041228928 2042832508
+96321000000 96325810872 32107000000 32108603624 2042228928 2043832552
+96324000000 96328811011 32108000000 32109603670 2043228928 2044832598
+96327000000 96331811062 32109000000 32110603687 2044228928 2045832615
+96330000000 96334811273 32110000000 32111603757 2045228928 2046832685
+96333000000 96337811482 32111000000 32112603827 2046228928 2047832755
+96336000000 96340811610 32112000000 32113603870 2047228928 2048832798
+96339000000 96343811753 32113000000 32114603917 2048228928 2049832845
+96342000000 96346811924 32114000000 32115603974 2049228928 2050832902
+96345000000 96349812021 32115000000 32116604007 2050228928 2051832935
+96348000000 96352812234 32116000000 32117604078 2051228928 2052833006
+96351000000 96355812364 32117000000 32118604121 2052228928 2053833049
+96354000000 96358812514 32118000000 32119604171 2053228928 2054833099
+96357000000 96361812674 32119000000 32120604224 2054228928 2055833152
+96360000000 96364812770 32120000000 32121604256 2055228928 2056833184
+96363000000 96367812958 32121000000 32122604319 2056228928 2057833247
+96366000000 96370813126 32122000000 32123604375 2057228928 2058833303
+96369000000 96373813262 32123000000 32124604420 2058228928 2059833348
+96372000000 96376813437 32124000000 32125604479 2059228928 2060833407
+96375000000 96379813559 32125000000 32126604519 2060228928 2061833447
+96378000000 96382813709 32126000000 32127604569 2061228928 2062833497
+96381000000 96385813857 32127000000 32128604619 2062228928 2063833547
+96384000000 96388814063 32128000000 32129604687 2063228928 2064833615
+96387000000 96391814177 32129000000 32130604725 2064228928 2065833653
+96390000000 96394814309 32130000000 32131604769 2065228928 2066833697
+96393000000 96397814483 32131000000 32132604827 2066228928 2067833755
+96396000000 96400814602 32132000000 32133604867 2067228928 2068833795
+96399000000 96403814726 32133000000 32134604908 2068228928 2069833836
+96402000000 96406814945 32134000000 32135604981 2069228928 2070833909
+96405000000 96409815081 32135000000 32136605027 2070228928 2071833955
+96408000000 96412815232 32136000000 32137605077 2071228928 2072834005
+96411000000 96415815392 32137000000 32138605130 2072228928 2073834058
+96414000000 96418815513 32138000000 32139605171 2073228928 2074834099
+96417000000 96421815594 32139000000 32140605198 2074228928 2075834126
+96420000000 96424815802 32140000000 32141605267 2075228928 2076834195
+96423000000 96427815957 32141000000 32142605319 2076228928 2077834247
+96426000000 96430816116 32142000000 32143605372 2077228928 2078834300
+96429000000 96433816268 32143000000 32144605422 2078228928 2079834350
+96432000000 96436816390 32144000000 32145605463 2079228928 2080834391
+96435000000 96439816568 32145000000 32146605522 2080228928 2081834450
+96438000000 96442816717 32146000000 32147605572 2081228928 2082834500
+96441000000 96445816845 32147000000 32148605615 2082228928 2083834543
+96444000000 96448817014 32148000000 32149605671 2083228928 2084834599
+96447000000 96451817134 32149000000 32150605711 2084228928 2085834639
+96450000000 96454817061 32150000000 32151605687 2085228928 2086834615
+96453000000 96457817384 32151000000 32152605794 2086228928 2087834722
+96456000000 96460817637 32152000000 32153605879 2087228928 2088834807
+96459000000 96463817747 32153000000 32154605915 2088228928 2089834843
+96462000000 96466817926 32154000000 32155605975 2089228928 2090834903
+96465000000 96469817974 32155000000 32156605991 2090228928 2091834919
+96468000000 96472818228 32156000000 32157606076 2091228928 2092835004
+96471000000 96475818347 32157000000 32158606115 2092228928 2093835043
+96474000000 96478818518 32158000000 32159606172 2093228928 2094835100
+96477000000 96481818665 32159000000 32160606221 2094228928 2095835149
+96480000000 96484818818 32160000000 32161606272 2095228928 2096835200
+96483000000 96487818964 32161000000 32162606321 2096228928 2097835249
+96486000000 96490819108 32162000000 32163606369 2097228928 2098835297
+96489000000 96493819271 32163000000 32164606423 2098228928 2099835351
+96492000000 96496819423 32164000000 32165606474 2099228928 2100835402
+96495000000 96499819577 32165000000 32166606525 2100228928 2101835453
+96498000000 96502819697 32166000000 32167606565 2101228928 2102835493
+96501000000 96505819906 32167000000 32168606635 2102228928 2103835563
+96504000000 96508820036 32168000000 32169606678 2103228928 2104835606
+96507000000 96511820150 32169000000 32170606716 2104228928 2105835644
+96510000000 96514820311 32170000000 32171606770 2105228928 2106835698
+96513000000 96517820446 32171000000 32172606815 2106228928 2107835743
+96516000000 96520820589 32172000000 32173606863 2107228928 2108835791
+96519000000 96523820689 32173000000 32174606896 2108228928 2109835824
+96522000000 96526820923 32174000000 32175606974 2109228928 2110835902
+96525000000 96529820996 32175000000 32176606998 2110228928 2111835926
+96528000000 96532821117 32176000000 32177607039 2111228928 2112835967
+96531000000 96535821306 32177000000 32178607102 2112228928 2113836030
+96534000000 96538821460 32178000000 32179607153 2113228928 2114836081
+96537000000 96541821639 32179000000 32180607213 2114228928 2115836141
+96540000000 96544821785 32180000000 32181607261 2115228928 2116836189
+96543000000 96547821912 32181000000 32182607304 2116228928 2117836232
+96546000000 96550822086 32182000000 32183607362 2117228928 2118836290
+96549000000 96553822150 32183000000 32184607383 2118228928 2119836311
+96552000000 96556822357 32184000000 32185607452 2119228928 2120836380
+96555000000 96559822538 32185000000 32186607512 2120228928 2121836440
+96558000000 96562822687 32186000000 32187607562 2121228928 2122836490
+96561000000 96565822744 32187000000 32188607581 2122228928 2123836509
+96564000000 96568822940 32188000000 32189607646 2123228928 2124836574
+96567000000 96571823130 32189000000 32190607710 2124228928 2125836638
+96570000000 96574823275 32190000000 32191607758 2125228928 2126836686
+96573000000 96577823447 32191000000 32192607815 2126228928 2127836743
+96576000000 96580823580 32192000000 32193607860 2127228928 2128836788
+96579000000 96583823651 32193000000 32194607883 2128228928 2129836811
+96582000000 96586823877 32194000000 32195607959 2129228928 2130836887
+96585000000 96589824037 32195000000 32196608012 2130228928 2131836940
+96588000000 96592824169 32196000000 32197608056 2131228928 2132836984
+96591000000 96595824277 32197000000 32198608092 2132228928 2133837020
+96594000000 96598824488 32198000000 32199608162 2133228928 2134837090
+96597000000 96601824654 32199000000 32200608218 2134228928 2135837146
+96600000000 96604824765 32200000000 32201608255 2135228928 2136837183
+96603000000 96607824925 32201000000 32202608308 2136228928 2137837236
+96606000000 96610825037 32202000000 32203608345 2137228928 2138837273
+96609000000 96613825235 32203000000 32204608411 2138228928 2139837339
+96612000000 96616825325 32204000000 32205608441 2139228928 2140837369
+96615000000 96619825550 32205000000 32206608516 2140228928 2141837444
+96618000000 96622825682 32206000000 32207608560 2141228928 2142837488
+96621000000 96625825821 32207000000 32208608607 2142228928 2143837535
+96624000000 96628825872 32208000000 32209608624 2143228928 2144837552
+96627000000 96631826083 32209000000 32210608694 2144228928 2145837622
+96630000000 96634826292 32210000000 32211608764 2145228928 2146837692
+96633000000 96637826420 32211000000 32212608806 2146228928 2147837734
+96636000000 96640826563 32212000000 32213608854 2147228928 2148837782
+96639000000 96643826734 32213000000 32214608911 2148228928 2149837839
+96642000000 96646826831 32214000000 32215608943 2149228928 2150837871
+96645000000 96649827044 32215000000 32216609014 2150228928 2151837942
+96648000000 96652827174 32216000000 32217609058 2151228928 2152837986
+96651000000 96655827324 32217000000 32218609108 2152228928 2153838036
+96654000000 96658827484 32218000000 32219609161 2153228928 2154838089
+96657000000 96661827580 32219000000 32220609193 2154228928 2155838121
+96660000000 96664827768 32220000000 32221609256 2155228928 2156838184
+96663000000 96667827936 32221000000 32222609312 2156228928 2157838240
+96666000000 96670828072 32222000000 32223609357 2157228928 2158838285
+96669000000 96673828247 32223000000 32224609415 2158228928 2159838343
+96672000000 96676828369 32224000000 32225609456 2159228928 2160838384
+96675000000 96679828519 32225000000 32226609506 2160228928 2161838434
+96678000000 96682828667 32226000000 32227609555 2161228928 2162838483
+96681000000 96685828873 32227000000 32228609624 2162228928 2163838552
+96684000000 96688828987 32228000000 32229609662 2163228928 2164838590
+96687000000 96691829119 32229000000 32230609706 2164228928 2165838634
+96690000000 96694829293 32230000000 32231609764 2165228928 2166838692
+96693000000 96697829412 32231000000 32232609804 2166228928 2167838732
+96696000000 96700829536 32232000000 32233609845 2167228928 2168838773
+96699000000 96703829755 32233000000 32234609918 2168228928 2169838846
+96702000000 96706829891 32234000000 32235609963 2169228928 2170838891
+96705000000 96709830042 32235000000 32236610014 2170228928 2171838942
+96708000000 96712830202 32236000000 32237610067 2171228928 2172838995
+96711000000 96715830323 32237000000 32238610107 2172228928 2173839035
+96714000000 96718830404 32238000000 32239610134 2173228928 2174839062
+96717000000 96721830612 32239000000 32240610204 2174228928 2175839132
+96720000000 96724830767 32240000000 32241610255 2175228928 2176839183
+96723000000 96727830926 32241000000 32242610308 2176228928 2177839236
+96726000000 96730831078 32242000000 32243610359 2177228928 2178839287
+96729000000 96733831200 32243000000 32244610400 2178228928 2179839328
+96732000000 96736831378 32244000000 32245610459 2179228928 2180839387
+96735000000 96739831527 32245000000 32246610509 2180228928 2181839437
+96738000000 96742831655 32246000000 32247610551 2181228928 2182839479
+96741000000 96745831824 32247000000 32248610608 2182228928 2183839536
+96744000000 96748831944 32248000000 32249610648 2183228928 2184839576
+96747000000 96751831871 32249000000 32250610623 2184228928 2185839551
+96750000000 96754832194 32250000000 32251610731 2185228928 2186839659
+96753000000 96757832447 32251000000 32252610815 2186228928 2187839743
+96756000000 96760832557 32252000000 32253610852 2187228928 2188839780
+96759000000 96763832736 32253000000 32254610912 2188228928 2189839840
+96762000000 96766832784 32254000000 32255610928 2189228928 2190839856
+96765000000 96769833038 32255000000 32256611012 2190228928 2191839940
+96768000000 96772833157 32256000000 32257611052 2191228928 2192839980
+96771000000 96775833328 32257000000 32258611109 2192228928 2193840037
+96774000000 96778833475 32258000000 32259611158 2193228928 2194840086
+96777000000 96781833628 32259000000 32260611209 2194228928 2195840137
+96780000000 96784833774 32260000000 32261611258 2195228928 2196840186
+96783000000 96787833918 32261000000 32262611306 2196228928 2197840234
+96786000000 96790834081 32262000000 32263611360 2197228928 2198840288
+96789000000 96793834233 32263000000 32264611411 2198228928 2199840339
+96792000000 96796834387 32264000000 32265611462 2199228928 2200840390
+96795000000 96799834507 32265000000 32266611502 2200228928 2201840430
+96798000000 96802834716 32266000000 32267611572 2201228928 2202840500
+96801000000 96805834846 32267000000 32268611615 2202228928 2203840543
+96804000000 96808834960 32268000000 32269611653 2203228928 2204840581
+96807000000 96811835121 32269000000 32270611707 2204228928 2205840635
+96810000000 96814835256 32270000000 32271611752 2205228928 2206840680
+96813000000 96817835399 32271000000 32272611799 2206228928 2207840727
+96816000000 96820835499 32272000000 32273611833 2207228928 2208840761
+96819000000 96823835733 32273000000 32274611911 2208228928 2209840839
+96822000000 96826835806 32274000000 32275611935 2209228928 2210840863
+96825000000 96829835927 32275000000 32276611975 2210228928 2211840903
+96828000000 96832836116 32276000000 32277612038 2211228928 2212840966
+96831000000 96835836270 32277000000 32278612090 2212228928 2213841018
+96834000000 96838836449 32278000000 32279612149 2213228928 2214841077
+96837000000 96841836595 32279000000 32280612198 2214228928 2215841126
+96840000000 96844836722 32280000000 32281612240 2215228928 2216841168
+96843000000 96847836896 32281000000 32282612298 2216228928 2217841226
+96846000000 96850836960 32282000000 32283612320 2217228928 2218841248
+96849000000 96853837167 32283000000 32284612389 2218228928 2219841317
+96852000000 96856837348 32284000000 32285612449 2219228928 2220841377
+96855000000 96859837497 32285000000 32286612499 2220228928 2221841427
+96858000000 96862837554 32286000000 32287612518 2221228928 2222841446
+96861000000 96865837750 32287000000 32288612583 2222228928 2223841511
+96864000000 96868837940 32288000000 32289612646 2223228928 2224841574
+96867000000 96871838085 32289000000 32290612695 2224228928 2225841623
+96870000000 96874838257 32290000000 32291612752 2225228928 2226841680
+96873000000 96877838390 32291000000 32292612796 2226228928 2227841724
+96876000000 96880838461 32292000000 32293612820 2227228928 2228841748
+96879000000 96883838687 32293000000 32294612895 2228228928 2229841823
+96882000000 96886838847 32294000000 32295612949 2229228928 2230841877
+96885000000 96889838979 32295000000 32296612993 2230228928 2231841921
+96888000000 96892839087 32296000000 32297613029 2231228928 2232841957
+96891000000 96895839298 32297000000 32298613099 2232228928 2233842027
+96894000000 96898839464 32298000000 32299613154 2233228928 2234842082
+96897000000 96901839575 32299000000 32300613191 2234228928 2235842119
+96900000000 96904839735 32300000000 32301613245 2235228928 2236842173
+96903000000 96907839847 32301000000 32302613282 2236228928 2237842210
+96906000000 96910840045 32302000000 32303613348 2237228928 2238842276
+96909000000 96913840135 32303000000 32304613378 2238228928 2239842306
+96912000000 96916840360 32304000000 32305613453 2239228928 2240842381
+96915000000 96919840492 32305000000 32306613497 2240228928 2241842425
+96918000000 96922840631 32306000000 32307613543 2241228928 2242842471
+96921000000 96925840682 32307000000 32308613560 2242228928 2243842488
+96924000000 96928840893 32308000000 32309613631 2243228928 2244842559
+96927000000 96931841102 32309000000 32310613700 2244228928 2245842628
+96930000000 96934841230 32310000000 32311613743 2245228928 2246842671
+96933000000 96937841373 32311000000 32312613791 2246228928 2247842719
+96936000000 96940841544 32312000000 32313613848 2247228928 2248842776
+96939000000 96943841641 32313000000 32314613880 2248228928 2249842808
+96942000000 96946841854 32314000000 32315613951 2249228928 2250842879
+96945000000 96949841984 32315000000 32316613994 2250228928 2251842922
+96948000000 96952842134 32316000000 32317614044 2251228928 2252842972
+96951000000 96955842294 32317000000 32318614098 2252228928 2253843026
+96954000000 96958842390 32318000000 32319614130 2253228928 2254843058
+96957000000 96961842578 32319000000 32320614192 2254228928 2255843120
+96960000000 96964842746 32320000000 32321614248 2255228928 2256843176
+96963000000 96967842882 32321000000 32322614294 2256228928 2257843222
+96966000000 96970843057 32322000000 32323614352 2257228928 2258843280
+96969000000 96973843179 32323000000 32324614393 2258228928 2259843321
+96972000000 96976843329 32324000000 32325614443 2259228928 2260843371
+96975000000 96979843477 32325000000 32326614492 2260228928 2261843420
+96978000000 96982843683 32326000000 32327614561 2261228928 2262843489
+96981000000 96985843797 32327000000 32328614599 2262228928 2263843527
+96984000000 96988843929 32328000000 32329614643 2263228928 2264843571
+96987000000 96991844103 32329000000 32330614701 2264228928 2265843629
+96990000000 96994844222 32330000000 32331614740 2265228928 2266843668
+96993000000 96997844346 32331000000 32332614782 2266228928 2267843710
+96996000000 97000844565 32332000000 32333614855 2267228928 2268843783
+96999000000 97003844701 32333000000 32334614900 2268228928 2269843828
+97002000000 97006844852 32334000000 32335614950 2269228928 2270843878
+97005000000 97009845012 32335000000 32336615004 2270228928 2271843932
+97008000000 97012845133 32336000000 32337615044 2271228928 2272843972
+97011000000 97015845214 32337000000 32338615071 2272228928 2273843999
+97014000000 97018845422 32338000000 32339615140 2273228928 2274844068
+97017000000 97021845577 32339000000 32340615192 2274228928 2275844120
+97020000000 97024845736 32340000000 32341615245 2275228928 2276844173
+97023000000 97027845888 32341000000 32342615296 2276228928 2277844224
+97026000000 97030846010 32342000000 32343615336 2277228928 2278844264
+97029000000 97033846188 32343000000 32344615396 2278228928 2279844324
+97032000000 97036846337 32344000000 32345615445 2279228928 2280844373
+97035000000 97039846465 32345000000 32346615488 2280228928 2281844416
+97038000000 97042846634 32346000000 32347615544 2281228928 2282844472
+97041000000 97045846754 32347000000 32348615584 2282228928 2283844512
+97044000000 97048846681 32348000000 32349615560 2283228928 2284844488
+97047000000 97051847004 32349000000 32350615668 2284228928 2285844596
+97050000000 97054847257 32350000000 32351615752 2285228928 2286844680
+97053000000 97057847367 32351000000 32352615789 2286228928 2287844717
+97056000000 97060847546 32352000000 32353615848 2287228928 2288844776
+97059000000 97063847594 32353000000 32354615864 2288228928 2289844792
+97062000000 97066847848 32354000000 32355615949 2289228928 2290844877
+97065000000 97069847967 32355000000 32356615989 2290228928 2291844917
+97068000000 97072848138 32356000000 32357616046 2291228928 2292844974
+97071000000 97075848285 32357000000 32358616095 2292228928 2293845023
+97074000000 97078848438 32358000000 32359616146 2293228928 2294845074
+97077000000 97081848584 32359000000 32360616194 2294228928 2295845122
+97080000000 97084848728 32360000000 32361616242 2295228928 2296845170
+97083000000 97087848891 32361000000 32362616297 2296228928 2297845225
+97086000000 97090849043 32362000000 32363616347 2297228928 2298845275
+97089000000 97093849197 32363000000 32364616399 2298228928 2299845327
+97092000000 97096849317 32364000000 32365616439 2299228928 2300845367
+97095000000 97099849526 32365000000 32366616508 2300228928 2301845436
+97098000000 97102849656 32366000000 32367616552 2301228928 2302845480
+97101000000 97105849770 32367000000 32368616590 2302228928 2303845518
+97104000000 97108849931 32368000000 32369616643 2303228928 2304845571
+97107000000 97111850066 32369000000 32370616688 2304228928 2305845616
+97110000000 97114850209 32370000000 32371616736 2305228928 2306845664
+97113000000 97117850309 32371000000 32372616769 2306228928 2307845697
+97116000000 97120850543 32372000000 32373616847 2307228928 2308845775
+97119000000 97123850616 32373000000 32374616872 2308228928 2309845800
+97122000000 97126850737 32374000000 32375616912 2309228928 2310845840
+97125000000 97129850926 32375000000 32376616975 2310228928 2311845903
+97128000000 97132851080 32376000000 32377617026 2311228928 2312845954
+97131000000 97135851259 32377000000 32378617086 2312228928 2313846014
+97134000000 97138851405 32378000000 32379617135 2313228928 2314846063
+97137000000 97141851532 32379000000 32380617177 2314228928 2315846105
+97140000000 97144851706 32380000000 32381617235 2315228928 2316846163
+97143000000 97147851770 32381000000 32382617256 2316228928 2317846184
+97146000000 97150851977 32382000000 32383617325 2317228928 2318846253
+97149000000 97153852158 32383000000 32384617386 2318228928 2319846314
+97152000000 97156852307 32384000000 32385617435 2319228928 2320846363
+97155000000 97159852364 32385000000 32386617454 2320228928 2321846382
+97158000000 97162852560 32386000000 32387617520 2321228928 2322846448
+97161000000 97165852750 32387000000 32388617583 2322228928 2323846511
+97164000000 97168852895 32388000000 32389617631 2323228928 2324846559
+97167000000 97171853067 32389000000 32390617689 2324228928 2325846617
+97170000000 97174853200 32390000000 32391617733 2325228928 2326846661
+97173000000 97177853271 32391000000 32392617757 2326228928 2327846685
+97176000000 97180853497 32392000000 32393617832 2327228928 2328846760
+97179000000 97183853657 32393000000 32394617885 2328228928 2329846813
+97182000000 97186853789 32394000000 32395617929 2329228928 2330846857
+97185000000 97189853897 32395000000 32396617965 2330228928 2331846893
+97188000000 97192854108 32396000000 32397618036 2331228928 2332846964
+97191000000 97195854274 32397000000 32398618091 2332228928 2333847019
+97194000000 97198854385 32398000000 32399618128 2333228928 2334847056
+97197000000 97201854545 32399000000 32400618181 2334228928 2335847109
+97200000000 97204854657 32400000000 32401618219 2335228928 2336847147
+97203000000 97207854855 32401000000 32402618285 2336228928 2337847213
+97206000000 97210854945 32402000000 32403618315 2337228928 2338847243
+97209000000 97213855170 32403000000 32404618390 2338228928 2339847318
+97212000000 97216855302 32404000000 32405618434 2339228928 2340847362
+97215000000 97219855441 32405000000 32406618480 2340228928 2341847408
+97218000000 97222855492 32406000000 32407618497 2341228928 2342847425
+97221000000 97225855703 32407000000 32408618567 2342228928 2343847495
+97224000000 97228855912 32408000000 32409618637 2343228928 2344847565
+97227000000 97231856040 32409000000 32410618680 2344228928 2345847608
+97230000000 97234856183 32410000000 32411618727 2345228928 2346847655
+97233000000 97237856354 32411000000 32412618784 2346228928 2347847712
+97236000000 97240856451 32412000000 32413618817 2347228928 2348847745
+97239000000 97243856664 32413000000 32414618888 2348228928 2349847816
+97242000000 97246856794 32414000000 32415618931 2349228928 2350847859
+97245000000 97249856944 32415000000 32416618981 2350228928 2351847909
+97248000000 97252857104 32416000000 32417619034 2351228928 2352847962
+97251000000 97255857200 32417000000 32418619066 2352228928 2353847994
+97254000000 97258857388 32418000000 32419619129 2353228928 2354848057
+97257000000 97261857556 32419000000 32420619185 2354228928 2355848113
+97260000000 97264857692 32420000000 32421619230 2355228928 2356848158
+97263000000 97267857867 32421000000 32422619289 2356228928 2357848217
+97266000000 97270857989 32422000000 32423619329 2357228928 2358848257
+97269000000 97273858139 32423000000 32424619379 2358228928 2359848307
+97272000000 97276858287 32424000000 32425619429 2359228928 2360848357
+97275000000 97279858493 32425000000 32426619497 2360228928 2361848425
+97278000000 97282858607 32426000000 32427619535 2361228928 2362848463
+97281000000 97285858739 32427000000 32428619579 2362228928 2363848507
+97284000000 97288858913 32428000000 32429619637 2363228928 2364848565
+97287000000 97291859032 32429000000 32430619677 2364228928 2365848605
+97290000000 97294859156 32430000000 32431619718 2365228928 2366848646
+97293000000 97297859375 32431000000 32432619791 2366228928 2367848719
+97296000000 97300859511 32432000000 32433619837 2367228928 2368848765
+97299000000 97303859662 32433000000 32434619887 2368228928 2369848815
+97302000000 97306859822 32434000000 32435619940 2369228928 2370848868
+97305000000 97309859943 32435000000 32436619981 2370228928 2371848909
+97308000000 97312860024 32436000000 32437620008 2371228928 2372848936
+97311000000 97315860232 32437000000 32438620077 2372228928 2373849005
+97314000000 97318860387 32438000000 32439620129 2373228928 2374849057
+97317000000 97321860546 32439000000 32440620182 2374228928 2375849110
+97320000000 97324860698 32440000000 32441620232 2375228928 2376849160
+97323000000 97327860820 32441000000 32442620273 2376228928 2377849201
+97326000000 97330860998 32442000000 32443620332 2377228928 2378849260
+97329000000 97333861147 32443000000 32444620382 2378228928 2379849310
+97332000000 97336861275 32444000000 32445620425 2379228928 2380849353
+97335000000 97339861444 32445000000 32446620481 2380228928 2381849409
+97338000000 97342861564 32446000000 32447620521 2381228928 2382849449
+97341000000 97345861491 32447000000 32448620497 2382228928 2383849425
+97344000000 97348861814 32448000000 32449620604 2383228928 2384849532
+97347000000 97351862067 32449000000 32450620689 2384228928 2385849617
+97350000000 97354862177 32450000000 32451620725 2385228928 2386849653
+97353000000 97357862356 32451000000 32452620785 2386228928 2387849713
+97356000000 97360862404 32452000000 32453620801 2387228928 2388849729
+97359000000 97363862658 32453000000 32454620886 2388228928 2389849814
+97362000000 97366862777 32454000000 32455620925 2389228928 2390849853
+97365000000 97369862948 32455000000 32456620982 2390228928 2391849910
+97368000000 97372863095 32456000000 32457621031 2391228928 2392849959
+97371000000 97375863248 32457000000 32458621082 2392228928 2393850010
+97374000000 97378863394 32458000000 32459621131 2393228928 2394850059
+97377000000 97381863538 32459000000 32460621179 2394228928 2395850107
+97380000000 97384863701 32460000000 32461621233 2395228928 2396850161
+97383000000 97387863853 32461000000 32462621284 2396228928 2397850212
+97386000000 97390864007 32462000000 32463621335 2397228928 2398850263
+97389000000 97393864127 32463000000 32464621375 2398228928 2399850303
+97392000000 97396864336 32464000000 32465621445 2399228928 2400850373
+97395000000 97399864466 32465000000 32466621488 2400228928 2401850416
+97398000000 97402864580 32466000000 32467621526 2401228928 2402850454
+97401000000 97405864741 32467000000 32468621580 2402228928 2403850508
+97404000000 97408864876 32468000000 32469621625 2403228928 2404850553
+97407000000 97411865019 32469000000 32470621673 2404228928 2405850601
+97410000000 97414865119 32470000000 32471621706 2405228928 2406850634
+97413000000 97417865353 32471000000 32472621784 2406228928 2407850712
+97416000000 97420865426 32472000000 32473621808 2407228928 2408850736
+97419000000 97423865547 32473000000 32474621849 2408228928 2409850777
+97422000000 97426865736 32474000000 32475621912 2409228928 2410850840
+97425000000 97429865890 32475000000 32476621963 2410228928 2411850891
+97428000000 97432866069 32476000000 32477622023 2411228928 2412850951
+97431000000 97435866215 32477000000 32478622071 2412228928 2413850999
+97434000000 97438866342 32478000000 32479622114 2413228928 2414851042
+97437000000 97441866516 32479000000 32480622172 2414228928 2415851100
+97440000000 97444866580 32480000000 32481622193 2415228928 2416851121
+97443000000 97447866787 32481000000 32482622262 2416228928 2417851190
+97446000000 97450866968 32482000000 32483622322 2417228928 2418851250
+97449000000 97453867117 32483000000 32484622372 2418228928 2419851300
+97452000000 97456867174 32484000000 32485622391 2419228928 2420851319
+97455000000 97459867370 32485000000 32486622456 2420228928 2421851384
+97458000000 97462867560 32486000000 32487622520 2421228928 2422851448
+97461000000 97465867705 32487000000 32488622568 2422228928 2423851496
+97464000000 97468867877 32488000000 32489622625 2423228928 2424851553
+97467000000 97471868010 32489000000 32490622670 2424228928 2425851598
+97470000000 97474868081 32490000000 32491622693 2425228928 2426851621
+97473000000 97477868307 32491000000 32492622769 2426228928 2427851697
+97476000000 97480868467 32492000000 32493622822 2427228928 2428851750
+97479000000 97483868599 32493000000 32494622866 2428228928 2429851794
+97482000000 97486868707 32494000000 32495622902 2429228928 2430851830
+97485000000 97489868918 32495000000 32496622972 2430228928 2431851900
+97488000000 97492869084 32496000000 32497623028 2431228928 2432851956
+97491000000 97495869195 32497000000 32498623065 2432228928 2433851993
+97494000000 97498869355 32498000000 32499623118 2433228928 2434852046
+97497000000 97501869467 32499000000 32500623155 2434228928 2435852083
+97500000000 97504869665 32500000000 32501623221 2435228928 2436852149
+97503000000 97507869755 32501000000 32502623251 2436228928 2437852179
+97506000000 97510869980 32502000000 32503623326 2437228928 2438852254
+97509000000 97513870112 32503000000 32504623370 2438228928 2439852298
+97512000000 97516870251 32504000000 32505623417 2439228928 2440852345
+97515000000 97519870302 32505000000 32506623434 2440228928 2441852362
+97518000000 97522870513 32506000000 32507623504 2441228928 2442852432
+97521000000 97525870722 32507000000 32508623574 2442228928 2443852502
+97524000000 97528870850 32508000000 32509623616 2443228928 2444852544
+97527000000 97531870993 32509000000 32510623664 2444228928 2445852592
+97530000000 97534871164 32510000000 32511623721 2445228928 2446852649
+97533000000 97537871261 32511000000 32512623753 2446228928 2447852681
+97536000000 97540871474 32512000000 32513623824 2447228928 2448852752
+97539000000 97543871604 32513000000 32514623868 2448228928 2449852796
+97542000000 97546871754 32514000000 32515623918 2449228928 2450852846
+97545000000 97549871914 32515000000 32516623971 2450228928 2451852899
+97548000000 97552872010 32516000000 32517624003 2451228928 2452852931
+97551000000 97555872198 32517000000 32518624066 2452228928 2453852994
+97554000000 97558872366 32518000000 32519624122 2453228928 2454853050
+97557000000 97561872502 32519000000 32520624167 2454228928 2455853095
+97560000000 97564872677 32520000000 32521624225 2455228928 2456853153
+97563000000 97567872799 32521000000 32522624266 2456228928 2457853194
+97566000000 97570872949 32522000000 32523624316 2457228928 2458853244
+97569000000 97573873097 32523000000 32524624365 2458228928 2459853293
+97572000000 97576873303 32524000000 32525624434 2459228928 2460853362
+97575000000 97579873417 32525000000 32526624472 2460228928 2461853400
+97578000000 97582873549 32526000000 32527624516 2461228928 2462853444
+97581000000 97585873723 32527000000 32528624574 2462228928 2463853502
+97584000000 97588873842 32528000000 32529624614 2463228928 2464853542
+97587000000 97591873966 32529000000 32530624655 2464228928 2465853583
+97590000000 97594874185 32530000000 32531624728 2465228928 2466853656
+97593000000 97597874321 32531000000 32532624773 2466228928 2467853701
+97596000000 97600874472 32532000000 32533624824 2467228928 2468853752
+97599000000 97603874632 32533000000 32534624877 2468228928 2469853805
+97602000000 97606874753 32534000000 32535624917 2469228928 2470853845
+97605000000 97609874834 32535000000 32536624944 2470228928 2471853872
+97608000000 97612875042 32536000000 32537625014 2471228928 2472853942
+97611000000 97615875197 32537000000 32538625065 2472228928 2473853993
+97614000000 97618875356 32538000000 32539625118 2473228928 2474854046
+97617000000 97621875508 32539000000 32540625169 2474228928 2475854097
+97620000000 97624875630 32540000000 32541625210 2475228928 2476854138
+97623000000 97627875808 32541000000 32542625269 2476228928 2477854197
+97626000000 97630875957 32542000000 32543625319 2477228928 2478854247
+97629000000 97633876085 32543000000 32544625361 2478228928 2479854289
+97632000000 97636876254 32544000000 32545625418 2479228928 2480854346
+97635000000 97639876374 32545000000 32546625458 2480228928 2481854386
+97638000000 97642876301 32546000000 32547625433 2481228928 2482854361
+97641000000 97645876624 32547000000 32548625541 2482228928 2483854469
+97644000000 97648876877 32548000000 32549625625 2483228928 2484854553
+97647000000 97651876987 32549000000 32550625662 2484228928 2485854590
+97650000000 97654877166 32550000000 32551625722 2485228928 2486854650
+97653000000 97657877214 32551000000 32552625738 2486228928 2487854666
+97656000000 97660877468 32552000000 32553625822 2487228928 2488854750
+97659000000 97663877587 32553000000 32554625862 2488228928 2489854790
+97662000000 97666877758 32554000000 32555625919 2489228928 2490854847
+97665000000 97669877905 32555000000 32556625968 2490228928 2491854896
+97668000000 97672878058 32556000000 32557626019 2491228928 2492854947
+97671000000 97675878204 32557000000 32558626068 2492228928 2493854996
+97674000000 97678878348 32558000000 32559626116 2493228928 2494855044
+97677000000 97681878511 32559000000 32560626170 2494228928 2495855098
+97680000000 97684878663 32560000000 32561626221 2495228928 2496855149
+97683000000 97687878817 32561000000 32562626272 2496228928 2497855200
+97686000000 97690878937 32562000000 32563626312 2497228928 2498855240
+97689000000 97693879146 32563000000 32564626382 2498228928 2499855310
+97692000000 97696879276 32564000000 32565626425 2499228928 2500855353
+97695000000 97699879390 32565000000 32566626463 2500228928 2501855391
+97698000000 97702879551 32566000000 32567626517 2501228928 2502855445
+97701000000 97705879686 32567000000 32568626562 2502228928 2503855490
+97704000000 97708879829 32568000000 32569626609 2503228928 2504855537
+97707000000 97711879929 32569000000 32570626643 2504228928 2505855571
+97710000000 97714880163 32570000000 32571626721 2505228928 2506855649
+97713000000 97717880236 32571000000 32572626745 2506228928 2507855673
+97716000000 97720880357 32572000000 32573626785 2507228928 2508855713
+97719000000 97723880546 32573000000 32574626848 2508228928 2509855776
+97722000000 97726880700 32574000000 32575626900 2509228928 2510855828
+97725000000 97729880879 32575000000 32576626959 2510228928 2511855887
+97728000000 97732881025 32576000000 32577627008 2511228928 2512855936
+97731000000 97735881152 32577000000 32578627050 2512228928 2513855978
+97734000000 97738881326 32578000000 32579627108 2513228928 2514856036
+97737000000 97741881390 32579000000 32580627130 2514228928 2515856058
+97740000000 97744881597 32580000000 32581627199 2515228928 2516856127
+97743000000 97747881778 32581000000 32582627259 2516228928 2517856187
+97746000000 97750881927 32582000000 32583627309 2517228928 2518856237
+97749000000 97753881984 32583000000 32584627328 2518228928 2519856256
+97752000000 97756882180 32584000000 32585627393 2519228928 2520856321
+97755000000 97759882370 32585000000 32586627456 2520228928 2521856384
+97758000000 97762882515 32586000000 32587627505 2521228928 2522856433
+97761000000 97765882687 32587000000 32588627562 2522228928 2523856490
+97764000000 97768882820 32588000000 32589627606 2523228928 2524856534
+97767000000 97771882891 32589000000 32590627630 2524228928 2525856558
+97770000000 97774883117 32590000000 32591627705 2525228928 2526856633
+97773000000 97777883277 32591000000 32592627759 2526228928 2527856687
+97776000000 97780883409 32592000000 32593627803 2527228928 2528856731
+97779000000 97783883517 32593000000 32594627839 2528228928 2529856767
+97782000000 97786883728 32594000000 32595627909 2529228928 2530856837
+97785000000 97789883894 32595000000 32596627964 2530228928 2531856892
+97788000000 97792884005 32596000000 32597628001 2531228928 2532856929
+97791000000 97795884165 32597000000 32598628055 2532228928 2533856983
+97794000000 97798884277 32598000000 32599628092 2533228928 2534857020
+97797000000 97801884475 32599000000 32600628158 2534228928 2535857086
+97800000000 97804884565 32600000000 32601628188 2535228928 2536857116
+97803000000 97807884790 32601000000 32602628263 2536228928 2537857191
+97806000000 97810884922 32602000000 32603628307 2537228928 2538857235
+97809000000 97813885061 32603000000 32604628353 2538228928 2539857281
+97812000000 97816885112 32604000000 32605628370 2539228928 2540857298
+97815000000 97819885323 32605000000 32606628441 2540228928 2541857369
+97818000000 97822885532 32606000000 32607628510 2541228928 2542857438
+97821000000 97825885660 32607000000 32608628553 2542228928 2543857481
+97824000000 97828885803 32608000000 32609628601 2543228928 2544857529
+97827000000 97831885974 32609000000 32610628658 2544228928 2545857586
+97830000000 97834886071 32610000000 32611628690 2545228928 2546857618
+97833000000 97837886284 32611000000 32612628761 2546228928 2547857689
+97836000000 97840886414 32612000000 32613628804 2547228928 2548857732
+97839000000 97843886564 32613000000 32614628854 2548228928 2549857782
+97842000000 97846886724 32614000000 32615628908 2549228928 2550857836
+97845000000 97849886820 32615000000 32616628940 2550228928 2551857868
+97848000000 97852887008 32616000000 32617629002 2551228928 2552857930
+97851000000 97855887176 32617000000 32618629058 2552228928 2553857986
+97854000000 97858887312 32618000000 32619629104 2553228928 2554858032
+97857000000 97861887487 32619000000 32620629162 2554228928 2555858090
+97860000000 97864887609 32620000000 32621629203 2555228928 2556858131
+97863000000 97867887759 32621000000 32622629253 2556228928 2557858181
+97866000000 97870887907 32622000000 32623629302 2557228928 2558858230
+97869000000 97873888113 32623000000 32624629371 2558228928 2559858299
+97872000000 97876888227 32624000000 32625629409 2559228928 2560858337
+97875000000 97879888359 32625000000 32626629453 2560228928 2561858381
+97878000000 97882888533 32626000000 32627629511 2561228928 2562858439
+97881000000 97885888652 32627000000 32628629550 2562228928 2563858478
+97884000000 97888888776 32628000000 32629629592 2563228928 2564858520
+97887000000 97891888995 32629000000 32630629665 2564228928 2565858593
+97890000000 97894889131 32630000000 32631629710 2565228928 2566858638
+97893000000 97897889282 32631000000 32632629760 2566228928 2567858688
+97896000000 97900889442 32632000000 32633629814 2567228928 2568858742
+97899000000 97903889563 32633000000 32634629854 2568228928 2569858782
+97902000000 97906889644 32634000000 32635629881 2569228928 2570858809
+97905000000 97909889852 32635000000 32636629950 2570228928 2571858878
+97908000000 97912890007 32636000000 32637630002 2571228928 2572858930
+97911000000 97915890166 32637000000 32638630055 2572228928 2573858983
+97914000000 97918890318 32638000000 32639630106 2573228928 2574859034
+97917000000 97921890440 32639000000 32640630146 2574228928 2575859074
+97920000000 97924890618 32640000000 32641630206 2575228928 2576859134
+97923000000 97927890767 32641000000 32642630255 2576228928 2577859183
+97926000000 97930890895 32642000000 32643630298 2577228928 2578859226
+97929000000 97933891064 32643000000 32644630354 2578228928 2579859282
+97932000000 97936891184 32644000000 32645630394 2579228928 2580859322
+97935000000 97939891111 32645000000 32646630370 2580228928 2581859298
+97938000000 97942891434 32646000000 32647630478 2581228928 2582859406
+97941000000 97945891687 32647000000 32648630562 2582228928 2583859490
+97944000000 97948891797 32648000000 32649630599 2583228928 2584859527
+97947000000 97951891976 32649000000 32650630658 2584228928 2585859586
+97950000000 97954892024 32650000000 32651630674 2585228928 2586859602
+97953000000 97957892278 32651000000 32652630759 2586228928 2587859687
+97956000000 97960892397 32652000000 32653630799 2587228928 2588859727
+97959000000 97963892568 32653000000 32654630856 2588228928 2589859784
+97962000000 97966892715 32654000000 32655630905 2589228928 2590859833
+97965000000 97969892868 32655000000 32656630956 2590228928 2591859884
+97968000000 97972893014 32656000000 32657631004 2591228928 2592859932
+97971000000 97975893158 32657000000 32658631052 2592228928 2593859980
+97974000000 97978893321 32658000000 32659631107 2593228928 2594860035
+97977000000 97981893473 32659000000 32660631157 2594228928 2595860085
+97980000000 97984893627 32660000000 32661631209 2595228928 2596860137
+97983000000 97987893747 32661000000 32662631249 2596228928 2597860177
+97986000000 97990893956 32662000000 32663631318 2597228928 2598860246
+97989000000 97993894086 32663000000 32664631362 2598228928 2599860290
+97992000000 97996894200 32664000000 32665631400 2599228928 2600860328
+97995000000 97999894361 32665000000 32666631453 2600228928 2601860381
+97998000000 98002894496 32666000000 32667631498 2601228928 2602860426
+98001000000 98005894639 32667000000 32668631546 2602228928 2603860474
+98004000000 98008894739 32668000000 32669631579 2603228928 2604860507
+98007000000 98011894973 32669000000 32670631657 2604228928 2605860585
+98010000000 98014895046 32670000000 32671631682 2605228928 2606860610
+98013000000 98017895167 32671000000 32672631722 2606228928 2607860650
+98016000000 98020895356 32672000000 32673631785 2607228928 2608860713
+98019000000 98023895510 32673000000 32674631836 2608228928 2609860764
+98022000000 98026895689 32674000000 32675631896 2609228928 2610860824
+98025000000 98029895835 32675000000 32676631945 2610228928 2611860873
+98028000000 98032895962 32676000000 32677631987 2611228928 2612860915
+98031000000 98035896136 32677000000 32678632045 2612228928 2613860973
+98034000000 98038896200 32678000000 32679632066 2613228928 2614860994
+98037000000 98041896407 32679000000 32680632135 2614228928 2615861063
+98040000000 98044896588 32680000000 32681632196 2615228928 2616861124
+98043000000 98047896737 32681000000 32682632245 2616228928 2617861173
+98046000000 98050896794 32682000000 32683632264 2617228928 2618861192
+98049000000 98053896990 32683000000 32684632330 2618228928 2619861258
+98052000000 98056897180 32684000000 32685632393 2619228928 2620861321
+98055000000 98059897325 32685000000 32686632441 2620228928 2621861369
+98058000000 98062897497 32686000000 32687632499 2621228928 2622861427
+98061000000 98065897630 32687000000 32688632543 2622228928 2623861471
+98064000000 98068897701 32688000000 32689632567 2623228928 2624861495
+98067000000 98071897927 32689000000 32690632642 2624228928 2625861570
+98070000000 98074898087 32690000000 32691632695 2625228928 2626861623
+98073000000 98077898219 32691000000 32692632739 2626228928 2627861667
+98076000000 98080898327 32692000000 32693632775 2627228928 2628861703
+98079000000 98083898538 32693000000 32694632846 2628228928 2629861774
+98082000000 98086898704 32694000000 32695632901 2629228928 2630861829
+98085000000 98089898815 32695000000 32696632938 2630228928 2631861866
+98088000000 98092898975 32696000000 32697632991 2631228928 2632861919
+98091000000 98095899087 32697000000 32698633029 2632228928 2633861957
+98094000000 98098899285 32698000000 32699633095 2633228928 2634862023
+98097000000 98101899375 32699000000 32700633125 2634228928 2635862053
+98100000000 98104899600 32700000000 32701633200 2635228928 2636862128
+98103000000 98107899732 32701000000 32702633244 2636228928 2637862172
+98106000000 98110899871 32702000000 32703633290 2637228928 2638862218
+98109000000 98113899922 32703000000 32704633307 2638228928 2639862235
+98112000000 98116900133 32704000000 32705633377 2639228928 2640862305
+98115000000 98119900342 32705000000 32706633447 2640228928 2641862375
+98118000000 98122900470 32706000000 32707633490 2641228928 2642862418
+98121000000 98125900613 32707000000 32708633537 2642228928 2643862465
+98124000000 98128900784 32708000000 32709633594 2643228928 2644862522
+98127000000 98131900881 32709000000 32710633627 2644228928 2645862555
+98130000000 98134901094 32710000000 32711633698 2645228928 2646862626
+98133000000 98137901224 32711000000 32712633741 2646228928 2647862669
+98136000000 98140901374 32712000000 32713633791 2647228928 2648862719
+98139000000 98143901534 32713000000 32714633844 2648228928 2649862772
+98142000000 98146901630 32714000000 32715633876 2649228928 2650862804
+98145000000 98149901818 32715000000 32716633939 2650228928 2651862867
+98148000000 98152901986 32716000000 32717633995 2651228928 2652862923
+98151000000 98155902122 32717000000 32718634040 2652228928 2653862968
+98154000000 98158902297 32718000000 32719634099 2653228928 2654863027
+98157000000 98161902419 32719000000 32720634139 2654228928 2655863067
+98160000000 98164902569 32720000000 32721634189 2655228928 2656863117
+98163000000 98167902717 32721000000 32722634239 2656228928 2657863167
+98166000000 98170902923 32722000000 32723634307 2657228928 2658863235
+98169000000 98173903037 32723000000 32724634345 2658228928 2659863273
+98172000000 98176903169 32724000000 32725634389 2659228928 2660863317
+98175000000 98179903343 32725000000 32726634447 2660228928 2661863375
+98178000000 98182903462 32726000000 32727634487 2661228928 2662863415
+98181000000 98185903586 32727000000 32728634528 2662228928 2663863456
+98184000000 98188903805 32728000000 32729634601 2663228928 2664863529
+98187000000 98191903941 32729000000 32730634647 2664228928 2665863575
+98190000000 98194904092 32730000000 32731634697 2665228928 2666863625
+98193000000 98197904252 32731000000 32732634750 2666228928 2667863678
+98196000000 98200904373 32732000000 32733634791 2667228928 2668863719
+98199000000 98203904454 32733000000 32734634818 2668228928 2669863746
+98202000000 98206904662 32734000000 32735634887 2669228928 2670863815
+98205000000 98209904817 32735000000 32736634939 2670228928 2671863867
+98208000000 98212904976 32736000000 32737634992 2671228928 2672863920
+98211000000 98215905128 32737000000 32738635042 2672228928 2673863970
+98214000000 98218905250 32738000000 32739635083 2673228928 2674864011
+98217000000 98221905428 32739000000 32740635142 2674228928 2675864070
+98220000000 98224905577 32740000000 32741635192 2675228928 2676864120
+98223000000 98227905705 32741000000 32742635235 2676228928 2677864163
+98226000000 98230905874 32742000000 32743635291 2677228928 2678864219
+98229000000 98233905994 32743000000 32744635331 2678228928 2679864259
+98232000000 98236905921 32744000000 32745635307 2679228928 2680864235
+98235000000 98239906244 32745000000 32746635414 2680228928 2681864342
+98238000000 98242906497 32746000000 32747635499 2681228928 2682864427
+98241000000 98245906607 32747000000 32748635535 2682228928 2683864463
+98244000000 98248906786 32748000000 32749635595 2683228928 2684864523
+98247000000 98251906834 32749000000 32750635611 2684228928 2685864539
+98250000000 98254907088 32750000000 32751635696 2685228928 2686864624
+98253000000 98257907207 32751000000 32752635735 2686228928 2687864663
+98256000000 98260907378 32752000000 32753635792 2687228928 2688864720
+98259000000 98263907525 32753000000 32754635841 2688228928 2689864769
+98262000000 98266907678 32754000000 32755635892 2689228928 2690864820
+98265000000 98269907824 32755000000 32756635941 2690228928 2691864869
+98268000000 98272907968 32756000000 32757635989 2691228928 2692864917
+98271000000 98275908131 32757000000 32758636043 2692228928 2693864971
+98274000000 98278908283 32758000000 32759636094 2693228928 2694865022
+98277000000 98281908437 32759000000 32760636145 2694228928 2695865073
+98280000000 98284908557 32760000000 32761636185 2695228928 2696865113
+98283000000 98287908766 32761000000 32762636255 2696228928 2697865183
+98286000000 98290908896 32762000000 32763636298 2697228928 2698865226
+98289000000 98293909010 32763000000 32764636336 2698228928 2699865264
+98292000000 98296909171 32764000000 32765636390 2699228928 2700865318
+98295000000 98299909306 32765000000 32766636435 2700228928 2701865363
+98298000000 98302909449 32766000000 32767636483 2701228928 2702865411
+98301000000 98305909549 32767000000 32768636516 2702228928 2703865444
+98304000000 98308909783 32768000000 32769636594 2703228928 2704865522
+98307000000 98311909856 32769000000 32770636618 2704228928 2705865546
+98310000000 98314909977 32770000000 32771636659 2705228928 2706865587
+98313000000 98317910166 32771000000 32772636722 2706228928 2707865650
+98316000000 98320910320 32772000000 32773636773 2707228928 2708865701
+98319000000 98323910499 32773000000 32774636833 2708228928 2709865761
+98322000000 98326910645 32774000000 32775636881 2709228928 2710865809
+98325000000 98329910772 32775000000 32776636924 2710228928 2711865852
+98328000000 98332910946 32776000000 32777636982 2711228928 2712865910
+98331000000 98335911010 32777000000 32778637003 2712228928 2713865931
+98334000000 98338911217 32778000000 32779637072 2713228928 2714866000
+98337000000 98341911398 32779000000 32780637132 2714228928 2715866060
+98340000000 98344911547 32780000000 32781637182 2715228928 2716866110
+98343000000 98347911604 32781000000 32782637201 2716228928 2717866129
+98346000000 98350911800 32782000000 32783637266 2717228928 2718866194
+98349000000 98353911990 32783000000 32784637330 2718228928 2719866258
+98352000000 98356912135 32784000000 32785637378 2719228928 2720866306
+98355000000 98359912307 32785000000 32786637435 2720228928 2721866363
+98358000000 98362912440 32786000000 32787637480 2721228928 2722866408
+98361000000 98365912511 32787000000 32788637503 2722228928 2723866431
+98364000000 98368912737 32788000000 32789637579 2723228928 2724866507
+98367000000 98371912897 32789000000 32790637632 2724228928 2725866560
+98370000000 98374913029 32790000000 32791637676 2725228928 2726866604
+98373000000 98377913137 32791000000 32792637712 2726228928 2727866640
+98376000000 98380913348 32792000000 32793637782 2727228928 2728866710
+98379000000 98383913514 32793000000 32794637838 2728228928 2729866766
+98382000000 98386913625 32794000000 32795637875 2729228928 2730866803
+98385000000 98389913785 32795000000 32796637928 2730228928 2731866856
+98388000000 98392913897 32796000000 32797637965 2731228928 2732866893
+98391000000 98395914095 32797000000 32798638031 2732228928 2733866959
+98394000000 98398914185 32798000000 32799638061 2733228928 2734866989
+98397000000 98401914410 32799000000 32800638136 2734228928 2735867064
+98400000000 98404914542 32800000000 32801638180 2735228928 2736867108
+98403000000 98407914681 32801000000 32802638227 2736228928 2737867155
+98406000000 98410914732 32802000000 32803638244 2737228928 2738867172
+98409000000 98413914943 32803000000 32804638314 2738228928 2739867242
+98412000000 98416915152 32804000000 32805638384 2739228928 2740867312
+98415000000 98419915280 32805000000 32806638426 2740228928 2741867354
+98418000000 98422915423 32806000000 32807638474 2741228928 2742867402
+98421000000 98425915594 32807000000 32808638531 2742228928 2743867459
+98424000000 98428915691 32808000000 32809638563 2743228928 2744867491
+98427000000 98431915904 32809000000 32810638634 2744228928 2745867562
+98430000000 98434916034 32810000000 32811638678 2745228928 2746867606
+98433000000 98437916184 32811000000 32812638728 2746228928 2747867656
+98436000000 98440916344 32812000000 32813638781 2747228928 2748867709
+98439000000 98443916440 32813000000 32814638813 2748228928 2749867741
+98442000000 98446916628 32814000000 32815638876 2749228928 2750867804
+98445000000 98449916796 32815000000 32816638932 2750228928 2751867860
+98448000000 98452916932 32816000000 32817638977 2751228928 2752867905
+98451000000 98455917107 32817000000 32818639035 2752228928 2753867963
+98454000000 98458917229 32818000000 32819639076 2753228928 2754868004
+98457000000 98461917379 32819000000 32820639126 2754228928 2755868054
+98460000000 98464917527 32820000000 32821639175 2755228928 2756868103
+98463000000 98467917733 32821000000 32822639244 2756228928 2757868172
+98466000000 98470917847 32822000000 32823639282 2757228928 2758868210
+98469000000 98473917979 32823000000 32824639326 2758228928 2759868254
+98472000000 98476918153 32824000000 32825639384 2759228928 2760868312
+98475000000 98479918272 32825000000 32826639424 2760228928 2761868352
+98478000000 98482918396 32826000000 32827639465 2761228928 2762868393
+98481000000 98485918615 32827000000 32828639538 2762228928 2763868466
+98484000000 98488918751 32828000000 32829639583 2763228928 2764868511
+98487000000 98491918902 32829000000 32830639634 2764228928 2765868562
+98490000000 98494919062 32830000000 32831639687 2765228928 2766868615
+98493000000 98497919183 32831000000 32832639727 2766228928 2767868655
+98496000000 98500919264 32832000000 32833639754 2767228928 2768868682
+98499000000 98503919472 32833000000 32834639824 2768228928 2769868752
+98502000000 98506919627 32834000000 32835639875 2769228928 2770868803
+98505000000 98509919786 32835000000 32836639928 2770228928 2771868856
+98508000000 98512919938 32836000000 32837639979 2771228928 2772868907
+98511000000 98515920060 32837000000 32838640020 2772228928 2773868948
+98514000000 98518920238 32838000000 32839640079 2773228928 2774869007
+98517000000 98521920387 32839000000 32840640129 2774228928 2775869057
+98520000000 98524920515 32840000000 32841640171 2775228928 2776869099
+98523000000 98527920684 32841000000 32842640228 2776228928 2777869156
+98526000000 98530920804 32842000000 32843640268 2777228928 2778869196
+98529000000 98533920731 32843000000 32844640243 2778228928 2779869171
+98532000000 98536921054 32844000000 32845640351 2779228928 2780869279
+98535000000 98539921307 32845000000 32846640435 2780228928 2781869363
+98538000000 98542921417 32846000000 32847640472 2781228928 2782869400
+98541000000 98545921596 32847000000 32848640532 2782228928 2783869460
+98544000000 98548921644 32848000000 32849640548 2783228928 2784869476
+98547000000 98551921898 32849000000 32850640632 2784228928 2785869560
+98550000000 98554922017 32850000000 32851640672 2785228928 2786869600
+98553000000 98557922188 32851000000 32852640729 2786228928 2787869657
+98556000000 98560922335 32852000000 32853640778 2787228928 2788869706
+98559000000 98563922488 32853000000 32854640829 2788228928 2789869757
+98562000000 98566922634 32854000000 32855640878 2789228928 2790869806
+98565000000 98569922778 32855000000 32856640926 2790228928 2791869854
+98568000000 98572922941 32856000000 32857640980 2791228928 2792869908
+98571000000 98575923093 32857000000 32858641031 2792228928 2793869959
+98574000000 98578923247 32858000000 32859641082 2793228928 2794870010
+98577000000 98581923367 32859000000 32860641122 2794228928 2795870050
+98580000000 98584923576 32860000000 32861641192 2795228928 2796870120
+98583000000 98587923706 32861000000 32862641235 2796228928 2797870163
+98586000000 98590923820 32862000000 32863641273 2797228928 2798870201
+98589000000 98593923981 32863000000 32864641327 2798228928 2799870255
+98592000000 98596924116 32864000000 32865641372 2799228928 2800870300
+98595000000 98599924259 32865000000 32866641419 2800228928 2801870347
+98598000000 98602924359 32866000000 32867641453 2801228928 2802870381
+98601000000 98605924593 32867000000 32868641531 2802228928 2803870459
+98604000000 98608924666 32868000000 32869641555 2803228928 2804870483
+98607000000 98611924787 32869000000 32870641595 2804228928 2805870523
+98610000000 98614924976 32870000000 32871641658 2805228928 2806870586
+98613000000 98617925130 32871000000 32872641710 2806228928 2807870638
+98616000000 98620925309 32872000000 32873641769 2807228928 2808870697
+98619000000 98623925455 32873000000 32874641818 2808228928 2809870746
+98622000000 98626925582 32874000000 32875641860 2809228928 2810870788
+98625000000 98629925756 32875000000 32876641918 2810228928 2811870846
+98628000000 98632925820 32876000000 32877641940 2811228928 2812870868
+98631000000 98635926027 32877000000 32878642009 2812228928 2813870937
+98634000000 98638926208 32878000000 32879642069 2813228928 2814870997
+98637000000 98641926357 32879000000 32880642119 2814228928 2815871047
+98640000000 98644926414 32880000000 32881642138 2815228928 2816871066
+98643000000 98647926610 32881000000 32882642203 2816228928 2817871131
+98646000000 98650926800 32882000000 32883642266 2817228928 2818871194
+98649000000 98653926945 32883000000 32884642315 2818228928 2819871243
+98652000000 98656927117 32884000000 32885642372 2819228928 2820871300
+98655000000 98659927250 32885000000 32886642416 2820228928 2821871344
+98658000000 98662927321 32886000000 32887642440 2821228928 2822871368
+98661000000 98665927547 32887000000 32888642515 2822228928 2823871443
+98664000000 98668927707 32888000000 32889642569 2823228928 2824871497
+98667000000 98671927839 32889000000 32890642613 2824228928 2825871541
+98670000000 98674927947 32890000000 32891642649 2825228928 2826871577
+98673000000 98677928158 32891000000 32892642719 2826228928 2827871647
+98676000000 98680928324 32892000000 32893642774 2827228928 2828871702
+98679000000 98683928435 32893000000 32894642811 2828228928 2829871739
+98682000000 98686928595 32894000000 32895642865 2829228928 2830871793
+98685000000 98689928707 32895000000 32896642902 2830228928 2831871830
+98688000000 98692928905 32896000000 32897642968 2831228928 2832871896
+98691000000 98695928995 32897000000 32898642998 2832228928 2833871926
+98694000000 98698929220 32898000000 32899643073 2833228928 2834872001
+98697000000 98701929352 32899000000 32900643117 2834228928 2835872045
+98700000000 98704929491 32900000000 32901643163 2835228928 2836872091
+98703000000 98707929542 32901000000 32902643180 2836228928 2837872108
+98706000000 98710929753 32902000000 32903643251 2837228928 2838872179
+98709000000 98713929962 32903000000 32904643320 2838228928 2839872248
+98712000000 98716930090 32904000000 32905643363 2839228928 2840872291
+98715000000 98719930233 32905000000 32906643411 2840228928 2841872339
+98718000000 98722930404 32906000000 32907643468 2841228928 2842872396
+98721000000 98725930501 32907000000 32908643500 2842228928 2843872428
+98724000000 98728930714 32908000000 32909643571 2843228928 2844872499
+98727000000 98731930844 32909000000 32910643614 2844228928 2845872542
+98730000000 98734930994 32910000000 32911643664 2845228928 2846872592
+98733000000 98737931154 32911000000 32912643718 2846228928 2847872646
+98736000000 98740931250 32912000000 32913643750 2847228928 2848872678
+98739000000 98743931438 32913000000 32914643812 2848228928 2849872740
+98742000000 98746931606 32914000000 32915643868 2849228928 2850872796
+98745000000 98749931742 32915000000 32916643914 2850228928 2851872842
+98748000000 98752931917 32916000000 32917643972 2851228928 2852872900
+98751000000 98755932039 32917000000 32918644013 2852228928 2853872941
+98754000000 98758932189 32918000000 32919644063 2853228928 2854872991
+98757000000 98761932337 32919000000 32920644112 2854228928 2855873040
+98760000000 98764932543 32920000000 32921644181 2855228928 2856873109
+98763000000 98767932657 32921000000 32922644219 2856228928 2857873147
+98766000000 98770932789 32922000000 32923644263 2857228928 2858873191
+98769000000 98773932963 32923000000 32924644321 2858228928 2859873249
+98772000000 98776933082 32924000000 32925644360 2859228928 2860873288
+98775000000 98779933206 32925000000 32926644402 2860228928 2861873330
+98778000000 98782933425 32926000000 32927644475 2861228928 2862873403
+98781000000 98785933561 32927000000 32928644520 2862228928 2863873448
+98784000000 98788933712 32928000000 32929644570 2863228928 2864873498
+98787000000 98791933872 32929000000 32930644624 2864228928 2865873552
+98790000000 98794933993 32930000000 32931644664 2865228928 2866873592
+98793000000 98797934074 32931000000 32932644691 2866228928 2867873619
+98796000000 98800934282 32932000000 32933644760 2867228928 2868873688
+98799000000 98803934437 32933000000 32934644812 2868228928 2869873740
+98802000000 98806934596 32934000000 32935644865 2869228928 2870873793
+98805000000 98809934748 32935000000 32936644916 2870228928 2871873844
+98808000000 98812934870 32936000000 32937644956 2871228928 2872873884
+98811000000 98815935048 32937000000 32938645016 2872228928 2873873944
+98814000000 98818935197 32938000000 32939645065 2873228928 2874873993
+98817000000 98821935325 32939000000 32940645108 2874228928 2875874036
+98820000000 98824935494 32940000000 32941645164 2875228928 2876874092
+98823000000 98827935614 32941000000 32942645204 2876228928 2877874132
+98826000000 98830935541 32942000000 32943645180 2877228928 2878874108
+98829000000 98833935864 32943000000 32944645288 2878228928 2879874216
+98832000000 98836936117 32944000000 32945645372 2879228928 2880874300
+98835000000 98839936227 32945000000 32946645409 2880228928 2881874337
+98838000000 98842936406 32946000000 32947645468 2881228928 2882874396
+98841000000 98845936454 32947000000 32948645484 2882228928 2883874412
+98844000000 98848936708 32948000000 32949645569 2883228928 2884874497
+98847000000 98851936827 32949000000 32950645609 2884228928 2885874537
+98850000000 98854936998 32950000000 32951645666 2885228928 2886874594
+98853000000 98857937145 32951000000 32952645715 2886228928 2887874643
+98856000000 98860937298 32952000000 32953645766 2887228928 2888874694
+98859000000 98863937444 32953000000 32954645814 2888228928 2889874742
+98862000000 98866937588 32954000000 32955645862 2889228928 2890874790
+98865000000 98869937751 32955000000 32956645917 2890228928 2891874845
+98868000000 98872937903 32956000000 32957645967 2891228928 2892874895
+98871000000 98875938057 32957000000 32958646019 2892228928 2893874947
+98874000000 98878938177 32958000000 32959646059 2893228928 2894874987
+98877000000 98881938386 32959000000 32960646128 2894228928 2895875056
+98880000000 98884938516 32960000000 32961646172 2895228928 2896875100
+98883000000 98887938630 32961000000 32962646210 2896228928 2897875138
+98886000000 98890938791 32962000000 32963646263 2897228928 2898875191
+98889000000 98893938926 32963000000 32964646308 2898228928 2899875236
+98892000000 98896939069 32964000000 32965646356 2899228928 2900875284
+98895000000 98899939169 32965000000 32966646389 2900228928 2901875317
+98898000000 98902939403 32966000000 32967646467 2901228928 2902875395
+98901000000 98905939476 32967000000 32968646492 2902228928 2903875420
+98904000000 98908939597 32968000000 32969646532 2903228928 2904875460
+98907000000 98911939786 32969000000 32970646595 2904228928 2905875523
+98910000000 98914939940 32970000000 32971646646 2905228928 2906875574
+98913000000 98917940119 32971000000 32972646706 2906228928 2907875634
+98916000000 98920940265 32972000000 32973646755 2907228928 2908875683
+98919000000 98923940392 32973000000 32974646797 2908228928 2909875725
+98922000000 98926940566 32974000000 32975646855 2909228928 2910875783
+98925000000 98929940630 32975000000 32976646876 2910228928 2911875804
+98928000000 98932940837 32976000000 32977646945 2911228928 2912875873
+98931000000 98935941018 32977000000 32978647006 2912228928 2913875934
+98934000000 98938941167 32978000000 32979647055 2913228928 2914875983
+98937000000 98941941224 32979000000 32980647074 2914228928 2915876002
+98940000000 98944941420 32980000000 32981647140 2915228928 2916876068
+98943000000 98947941610 32981000000 32982647203 2916228928 2917876131
+98946000000 98950941755 32982000000 32983647251 2917228928 2918876179
+98949000000 98953941927 32983000000 32984647309 2918228928 2919876237
+98952000000 98956942060 32984000000 32985647353 2919228928 2920876281
+98955000000 98959942131 32985000000 32986647377 2920228928 2921876305
+98958000000 98962942357 32986000000 32987647452 2921228928 2922876380
+98961000000 98965942517 32987000000 32988647505 2922228928 2923876433
+98964000000 98968942649 32988000000 32989647549 2923228928 2924876477
+98967000000 98971942757 32989000000 32990647585 2924228928 2925876513
+98970000000 98974942968 32990000000 32991647656 2925228928 2926876584
+98973000000 98977943134 32991000000 32992647711 2926228928 2927876639
+98976000000 98980943245 32992000000 32993647748 2927228928 2928876676
+98979000000 98983943405 32993000000 32994647801 2928228928 2929876729
+98982000000 98986943517 32994000000 32995647839 2929228928 2930876767
+98985000000 98989943715 32995000000 32996647905 2930228928 2931876833
+98988000000 98992943805 32996000000 32997647935 2931228928 2932876863
+98991000000 98995944030 32997000000 32998648010 2932228928 2933876938
+98994000000 98998944162 32998000000 32999648054 2933228928 2934876982
+98997000000 99001944301 32999000000 33000648100 2934228928 2935877028
+99000000000 99004944352 33000000000 33001648117 2935228928 2936877045
+99003000000 99007944563 33001000000 33002648187 2936228928 2937877115
+99006000000 99010944772 33002000000 33003648257 2937228928 2938877185
+99009000000 99013944900 33003000000 33004648300 2938228928 2939877228
+99012000000 99016945043 33004000000 33005648347 2939228928 2940877275
+99015000000 99019945214 33005000000 33006648404 2940228928 2941877332
+99018000000 99022945311 33006000000 33007648437 2941228928 2942877365
+99021000000 99025945524 33007000000 33008648508 2942228928 2943877436
+99024000000 99028945654 33008000000 33009648551 2943228928 2944877479
+99027000000 99031945804 33009000000 33010648601 2944228928 2945877529
+99030000000 99034945964 33010000000 33011648654 2945228928 2946877582
+99033000000 99037946060 33011000000 33012648686 2946228928 2947877614
+99036000000 99040946248 33012000000 33013648749 2947228928 2948877677
+99039000000 99043946416 33013000000 33014648805 2948228928 2949877733
+99042000000 99046946552 33014000000 33015648850 2949228928 2950877778
+99045000000 99049946727 33015000000 33016648909 2950228928 2951877837
+99048000000 99052946849 33016000000 33017648949 2951228928 2952877877
+99051000000 99055946999 33017000000 33018648999 2952228928 2953877927
+99054000000 99058947147 33018000000 33019649049 2953228928 2954877977
+99057000000 99061947353 33019000000 33020649117 2954228928 2955878045
+99060000000 99064947467 33020000000 33021649155 2955228928 2956878083
+99063000000 99067947599 33021000000 33022649199 2956228928 2957878127
+99066000000 99070947773 33022000000 33023649257 2957228928 2958878185
+99069000000 99073947892 33023000000 33024649297 2958228928 2959878225
+99072000000 99076948016 33024000000 33025649338 2959228928 2960878266
+99075000000 99079948235 33025000000 33026649411 2960228928 2961878339
+99078000000 99082948371 33026000000 33027649457 2961228928 2962878385
+99081000000 99085948522 33027000000 33028649507 2962228928 2963878435
+99084000000 99088948682 33028000000 33029649560 2963228928 2964878488
+99087000000 99091948803 33029000000 33030649601 2964228928 2965878529
+99090000000 99094948884 33030000000 33031649628 2965228928 2966878556
+99093000000 99097949092 33031000000 33032649697 2966228928 2967878625
+99096000000 99100949247 33032000000 33033649749 2967228928 2968878677
+99099000000 99103949406 33033000000 33034649802 2968228928 2969878730
+99102000000 99106949558 33034000000 33035649852 2969228928 2970878780
+99105000000 99109949680 33035000000 33036649893 2970228928 2971878821
+99108000000 99112949858 33036000000 33037649952 2971228928 2972878880
+99111000000 99115950007 33037000000 33038650002 2972228928 2973878930
+99114000000 99118950135 33038000000 33039650045 2973228928 2974878973
+99117000000 99121950304 33039000000 33040650101 2974228928 2975879029
+99120000000 99124950424 33040000000 33041650141 2975228928 2976879069
+99123000000 99127950351 33041000000 33042650117 2976228928 2977879045
+99126000000 99130950674 33042000000 33043650224 2977228928 2978879152
+99129000000 99133950927 33043000000 33044650309 2978228928 2979879237
+99132000000 99136951037 33044000000 33045650345 2979228928 2980879273
+99135000000 99139951216 33045000000 33046650405 2980228928 2981879333
+99138000000 99142951264 33046000000 33047650421 2981228928 2982879349
+99141000000 99145951518 33047000000 33048650506 2982228928 2983879434
+99144000000 99148951637 33048000000 33049650545 2983228928 2984879473
+99147000000 99151951808 33049000000 33050650602 2984228928 2985879530
+99150000000 99154951955 33050000000 33051650651 2985228928 2986879579
+99153000000 99157952108 33051000000 33052650702 2986228928 2987879630
+99156000000 99160952254 33052000000 33053650751 2987228928 2988879679
+99159000000 99163952398 33053000000 33054650799 2988228928 2989879727
+99162000000 99166952561 33054000000 33055650853 2989228928 2990879781
+99165000000 99169952713 33055000000 33056650904 2990228928 2991879832
+99168000000 99172952867 33056000000 33057650955 2991228928 2992879883
+99171000000 99175952987 33057000000 33058650995 2992228928 2993879923
+99174000000 99178953196 33058000000 33059651065 2993228928 2994879993
+99177000000 99181953326 33059000000 33060651108 2994228928 2995880036
+99180000000 99184953440 33060000000 33061651146 2995228928 2996880074
+99183000000 99187953601 33061000000 33062651200 2996228928 2997880128
+99186000000 99190953736 33062000000 33063651245 2997228928 2998880173
+99189000000 99193953879 33063000000 33064651293 2998228928 2999880221
+99192000000 99196953979 33064000000 33065651326 2999228928 3000880254
+99195000000 99199954213 33065000000 33066651404 3000228928 3001880332
+99198000000 99202954286 33066000000 33067651428 3001228928 3002880356
+99201000000 99205954407 33067000000 33068651469 3002228928 3003880397
+99204000000 99208954596 33068000000 33069651532 3003228928 3004880460
+99207000000 99211954750 33069000000 33070651583 3004228928 3005880511
+99210000000 99214954929 33070000000 33071651643 3005228928 3006880571
+99213000000 99217955075 33071000000 33072651691 3006228928 3007880619
+99216000000 99220955202 33072000000 33073651734 3007228928 3008880662
+99219000000 99223955376 33073000000 33074651792 3008228928 3009880720
+99222000000 99226955440 33074000000 33075651813 3009228928 3010880741
+99225000000 99229955647 33075000000 33076651882 3010228928 3011880810
+99228000000 99232955828 33076000000 33077651942 3011228928 3012880870
+99231000000 99235955977 33077000000 33078651992 3012228928 3013880920
+99234000000 99238956034 33078000000 33079652011 3013228928 3014880939
+99237000000 99241956230 33079000000 33080652076 3014228928 3015881004
+99240000000 99244956420 33080000000 33081652140 3015228928 3016881068
+99243000000 99247956565 33081000000 33082652188 3016228928 3017881116
+99246000000 99250956737 33082000000 33083652245 3017228928 3018881173
+99249000000 99253956870 33083000000 33084652290 3018228928 3019881218
+99252000000 99256956941 33084000000 33085652313 3019228928 3020881241
+99255000000 99259957167 33085000000 33086652389 3020228928 3021881317
+99258000000 99262957327 33086000000 33087652442 3021228928 3022881370
+99261000000 99265957459 33087000000 33088652486 3022228928 3023881414
+99264000000 99268957567 33088000000 33089652522 3023228928 3024881450
+99267000000 99271957778 33089000000 33090652592 3024228928 3025881520
+99270000000 99274957944 33090000000 33091652648 3025228928 3026881576
+99273000000 99277958055 33091000000 33092652685 3026228928 3027881613
+99276000000 99280958215 33092000000 33093652738 3027228928 3028881666
+99279000000 99283958327 33093000000 33094652775 3028228928 3029881703
+99282000000 99286958525 33094000000 33095652841 3029228928 3030881769
+99285000000 99289958615 33095000000 33096652871 3030228928 3031881799
+99288000000 99292958840 33096000000 33097652946 3031228928 3032881874
+99291000000 99295958972 33097000000 33098652990 3032228928 3033881918
+99294000000 99298959111 33098000000 33099653037 3033228928 3034881965
+99297000000 99301959162 33099000000 33100653054 3034228928 3035881982
+99300000000 99304959373 33100000000 33101653124 3035228928 3036882052
+99303000000 99307959582 33101000000 33102653194 3036228928 3037882122
+99306000000 99310959710 33102000000 33103653236 3037228928 3038882164
+99309000000 99313959853 33103000000 33104653284 3038228928 3039882212
+99312000000 99316960024 33104000000 33105653341 3039228928 3040882269
+99315000000 99319960121 33105000000 33106653373 3040228928 3041882301
+99318000000 99322960334 33106000000 33107653444 3041228928 3042882372
+99321000000 99325960464 33107000000 33108653488 3042228928 3043882416
+99324000000 99328960614 33108000000 33109653538 3043228928 3044882466
+99327000000 99331960774 33109000000 33110653591 3044228928 3045882519
+99330000000 99334960870 33110000000 33111653623 3045228928 3046882551
+99333000000 99337961058 33111000000 33112653686 3046228928 3047882614
+99336000000 99340961226 33112000000 33113653742 3047228928 3048882670
+99339000000 99343961362 33113000000 33114653787 3048228928 3049882715
+99342000000 99346961537 33114000000 33115653845 3049228928 3050882773
+99345000000 99349961659 33115000000 33116653886 3050228928 3051882814
+99348000000 99352961809 33116000000 33117653936 3051228928 3052882864
+99351000000 99355961957 33117000000 33118653985 3052228928 3053882913
+99354000000 99358962163 33118000000 33119654054 3053228928 3054882982
+99357000000 99361962277 33119000000 33120654092 3054228928 3055883020
+99360000000 99364962409 33120000000 33121654136 3055228928 3056883064
+99363000000 99367962583 33121000000 33122654194 3056228928 3057883122
+99366000000 99370962702 33122000000 33123654234 3057228928 3058883162
+99369000000 99373962826 33123000000 33124654275 3058228928 3059883203
+99372000000 99376963045 33124000000 33125654348 3059228928 3060883276
+99375000000 99379963181 33125000000 33126654393 3060228928 3061883321
+99378000000 99382963332 33126000000 33127654444 3061228928 3062883372
+99381000000 99385963492 33127000000 33128654497 3062228928 3063883425
+99384000000 99388963613 33128000000 33129654537 3063228928 3064883465
+99387000000 99391963694 33129000000 33130654564 3064228928 3065883492
+99390000000 99394963902 33130000000 33131654634 3065228928 3066883562
+99393000000 99397964057 33131000000 33132654685 3066228928 3067883613
+99396000000 99400964216 33132000000 33133654738 3067228928 3068883666
+99399000000 99403964368 33133000000 33134654789 3068228928 3069883717
+99402000000 99406964490 33134000000 33135654830 3069228928 3070883758
+99405000000 99409964668 33135000000 33136654889 3070228928 3071883817
+99408000000 99412964817 33136000000 33137654939 3071228928 3072883867
+99411000000 99415964945 33137000000 33138654981 3072228928 3073883909
+99414000000 99418965114 33138000000 33139655038 3073228928 3074883966
+99417000000 99421965234 33139000000 33140655078 3074228928 3075884006
+99420000000 99424965161 33140000000 33141655053 3075228928 3076883981
+99423000000 99427965484 33141000000 33142655161 3076228928 3077884089
+99426000000 99430965737 33142000000 33143655245 3077228928 3078884173
+99429000000 99433965847 33143000000 33144655282 3078228928 3079884210
+99432000000 99436966026 33144000000 33145655342 3079228928 3080884270
+99435000000 99439966074 33145000000 33146655358 3080228928 3081884286
+99438000000 99442966328 33146000000 33147655442 3081228928 3082884370
+99441000000 99445966447 33147000000 33148655482 3082228928 3083884410
+99444000000 99448966618 33148000000 33149655539 3083228928 3084884467
+99447000000 99451966765 33149000000 33150655588 3084228928 3085884516
+99450000000 99454966918 33150000000 33151655639 3085228928 3086884567
+99453000000 99457967064 33151000000 33152655688 3086228928 3087884616
+99456000000 99460967208 33152000000 33153655736 3087228928 3088884664
+99459000000 99463967371 33153000000 33154655790 3088228928 3089884718
+99462000000 99466967523 33154000000 33155655841 3089228928 3090884769
+99465000000 99469967677 33155000000 33156655892 3090228928 3091884820
+99468000000 99472967797 33156000000 33157655932 3091228928 3092884860
+99471000000 99475968006 33157000000 33158656002 3092228928 3093884930
+99474000000 99478968136 33158000000 33159656045 3093228928 3094884973
+99477000000 99481968250 33159000000 33160656083 3094228928 3095885011
+99480000000 99484968411 33160000000 33161656137 3095228928 3096885065
+99483000000 99487968546 33161000000 33162656182 3096228928 3097885110
+99486000000 99490968689 33162000000 33163656229 3097228928 3098885157
+99489000000 99493968789 33163000000 33164656263 3098228928 3099885191
+99492000000 99496969023 33164000000 33165656341 3099228928 3100885269
+99495000000 99499969096 33165000000 33166656365 3100228928 3101885293
+99498000000 99502969217 33166000000 33167656405 3101228928 3102885333
+99501000000 99505969406 33167000000 33168656468 3102228928 3103885396
+99504000000 99508969560 33168000000 33169656520 3103228928 3104885448
+99507000000 99511969739 33169000000 33170656579 3104228928 3105885507
+99510000000 99514969885 33170000000 33171656628 3105228928 3106885556
+99513000000 99517970012 33171000000 33172656670 3106228928 3107885598
+99516000000 99520970186 33172000000 33173656728 3107228928 3108885656
+99519000000 99523970250 33173000000 33174656750 3108228928 3109885678
+99522000000 99526970457 33174000000 33175656819 3109228928 3110885747
+99525000000 99529970638 33175000000 33176656879 3110228928 3111885807
+99528000000 99532970787 33176000000 33177656929 3111228928 3112885857
+99531000000 99535970844 33177000000 33178656948 3112228928 3113885876
+99534000000 99538971040 33178000000 33179657013 3113228928 3114885941
+99537000000 99541971230 33179000000 33180657076 3114228928 3115886004
+99540000000 99544971375 33180000000 33181657125 3115228928 3116886053
+99543000000 99547971547 33181000000 33182657182 3116228928 3117886110
+99546000000 99550971680 33182000000 33183657226 3117228928 3118886154
+99549000000 99553971751 33183000000 33184657250 3118228928 3119886178
+99552000000 99556971977 33184000000 33185657325 3119228928 3120886253
+99555000000 99559972137 33185000000 33186657379 3120228928 3121886307
+99558000000 99562972269 33186000000 33187657423 3121228928 3122886351
+99561000000 99565972377 33187000000 33188657459 3122228928 3123886387
+99564000000 99568972588 33188000000 33189657529 3123228928 3124886457
+99567000000 99571972754 33189000000 33190657584 3124228928 3125886512
+99570000000 99574972865 33190000000 33191657621 3125228928 3126886549
+99573000000 99577973025 33191000000 33192657675 3126228928 3127886603
+99576000000 99580973137 33192000000 33193657712 3127228928 3128886640
+99579000000 99583973335 33193000000 33194657778 3128228928 3129886706
+99582000000 99586973425 33194000000 33195657808 3129228928 3130886736
+99585000000 99589973650 33195000000 33196657883 3130228928 3131886811
+99588000000 99592973782 33196000000 33197657927 3131228928 3132886855
+99591000000 99595973921 33197000000 33198657973 3132228928 3133886901
+99594000000 99598973972 33198000000 33199657990 3133228928 3134886918
+99597000000 99601974183 33199000000 33200658061 3134228928 3135886989
+99600000000 99604974392 33200000000 33201658130 3135228928 3136887058
+99603000000 99607974520 33201000000 33202658173 3136228928 3137887101
+99606000000 99610974663 33202000000 33203658221 3137228928 3138887149
+99609000000 99613974834 33203000000 33204658278 3138228928 3139887206
+99612000000 99616974931 33204000000 33205658310 3139228928 3140887238
+99615000000 99619975144 33205000000 33206658381 3140228928 3141887309
+99618000000 99622975274 33206000000 33207658424 3141228928 3142887352
+99621000000 99625975424 33207000000 33208658474 3142228928 3143887402
+99624000000 99628975584 33208000000 33209658528 3143228928 3144887456
+99627000000 99631975680 33209000000 33210658560 3144228928 3145887488
+99630000000 99634975868 33210000000 33211658622 3145228928 3146887550
+99633000000 99637976036 33211000000 33212658678 3146228928 3147887606
+99636000000 99640976172 33212000000 33213658724 3147228928 3148887652
+99639000000 99643976347 33213000000 33214658782 3148228928 3149887710
+99642000000 99646976469 33214000000 33215658823 3149228928 3150887751
+99645000000 99649976619 33215000000 33216658873 3150228928 3151887801
+99648000000 99652976767 33216000000 33217658922 3151228928 3152887850
+99651000000 99655976973 33217000000 33218658991 3152228928 3153887919
+99654000000 99658977087 33218000000 33219659029 3153228928 3154887957
+99657000000 99661977219 33219000000 33220659073 3154228928 3155888001
+99660000000 99664977393 33220000000 33221659131 3155228928 3156888059
+99663000000 99667977512 33221000000 33222659170 3156228928 3157888098
+99666000000 99670977636 33222000000 33223659212 3157228928 3158888140
+99669000000 99673977855 33223000000 33224659285 3158228928 3159888213
+99672000000 99676977991 33224000000 33225659330 3159228928 3160888258
+99675000000 99679978142 33225000000 33226659380 3160228928 3161888308
+99678000000 99682978302 33226000000 33227659434 3161228928 3162888362
+99681000000 99685978423 33227000000 33228659474 3162228928 3163888402
+99684000000 99688978504 33228000000 33229659501 3163228928 3164888429
+99687000000 99691978712 33229000000 33230659570 3164228928 3165888498
+99690000000 99694978867 33230000000 33231659622 3165228928 3166888550
+99693000000 99697979026 33231000000 33232659675 3166228928 3167888603
+99696000000 99700979178 33232000000 33233659726 3167228928 3168888654
+99699000000 99703979300 33233000000 33234659766 3168228928 3169888694
+99702000000 99706979478 33234000000 33235659826 3169228928 3170888754
+99705000000 99709979627 33235000000 33236659875 3170228928 3171888803
+99708000000 99712979755 33236000000 33237659918 3171228928 3172888846
+99711000000 99715979924 33237000000 33238659974 3172228928 3173888902
+99714000000 99718980044 33238000000 33239660014 3173228928 3174888942
+99717000000 99721979971 33239000000 33240659990 3174228928 3175888918
+99720000000 99724980294 33240000000 33241660098 3175228928 3176889026
+99723000000 99727980547 33241000000 33242660182 3176228928 3177889110
+99726000000 99730980657 33242000000 33243660219 3177228928 3178889147
+99729000000 99733980836 33243000000 33244660278 3178228928 3179889206
+99732000000 99736980884 33244000000 33245660294 3179228928 3180889222
+99735000000 99739981138 33245000000 33246660379 3180228928 3181889307
+99738000000 99742981257 33246000000 33247660419 3181228928 3182889347
+99741000000 99745981428 33247000000 33248660476 3182228928 3183889404
+99744000000 99748981575 33248000000 33249660525 3183228928 3184889453
+99747000000 99751981728 33249000000 33250660576 3184228928 3185889504
+99750000000 99754981874 33250000000 33251660624 3185228928 3186889552
+99753000000 99757982018 33251000000 33252660672 3186228928 3187889600
+99756000000 99760982181 33252000000 33253660727 3187228928 3188889655
+99759000000 99763982333 33253000000 33254660777 3188228928 3189889705
+99762000000 99766982487 33254000000 33255660829 3189228928 3190889757
+99765000000 99769982607 33255000000 33256660869 3190228928 3191889797
+99768000000 99772982816 33256000000 33257660938 3191228928 3192889866
+99771000000 99775982946 33257000000 33258660982 3192228928 3193889910
+99774000000 99778983060 33258000000 33259661020 3193228928 3194889948
+99777000000 99781983221 33259000000 33260661073 3194228928 3195890001
+99780000000 99784983356 33260000000 33261661118 3195228928 3196890046
+99783000000 99787983499 33261000000 33262661166 3196228928 3197890094
+99786000000 99790983599 33262000000 33263661199 3197228928 3198890127
+99789000000 99793983833 33263000000 33264661277 3198228928 3199890205
+99792000000 99796983906 33264000000 33265661302 3199228928 3200890230
+99795000000 99799984027 33265000000 33266661342 3200228928 3201890270
+99798000000 99802984216 33266000000 33267661405 3201228928 3202890333
+99801000000 99805984370 33267000000 33268661456 3202228928 3203890384
+99804000000 99808984549 33268000000 33269661516 3203228928 3204890444
+99807000000 99811984695 33269000000 33270661565 3204228928 3205890493
+99810000000 99814984822 33270000000 33271661607 3205228928 3206890535
+99813000000 99817984996 33271000000 33272661665 3206228928 3207890593
+99816000000 99820985060 33272000000 33273661686 3207228928 3208890614
+99819000000 99823985267 33273000000 33274661755 3208228928 3209890683
+99822000000 99826985448 33274000000 33275661816 3209228928 3210890744
+99825000000 99829985597 33275000000 33276661865 3210228928 3211890793
+99828000000 99832985654 33276000000 33277661884 3211228928 3212890812
+99831000000 99835985850 33277000000 33278661950 3212228928 3213890878
+99834000000 99838986040 33278000000 33279662013 3213228928 3214890941
+99837000000 99841986185 33279000000 33280662061 3214228928 3215890989
+99840000000 99844986357 33280000000 33281662119 3215228928 3216891047
+99843000000 99847986490 33281000000 33282662163 3216228928 3217891091
+99846000000 99850986561 33282000000 33283662187 3217228928 3218891115
+99849000000 99853986787 33283000000 33284662262 3218228928 3219891190
+99852000000 99856986947 33284000000 33285662315 3219228928 3220891243
+99855000000 99859987079 33285000000 33286662359 3220228928 3221891287
+99858000000 99862987187 33286000000 33287662395 3221228928 3222891323
+99861000000 99865987398 33287000000 33288662466 3222228928 3223891394
+99864000000 99868987564 33288000000 33289662521 3223228928 3224891449
+99867000000 99871987675 33289000000 33290662558 3224228928 3225891486
+99870000000 99874987835 33290000000 33291662611 3225228928 3226891539
+99873000000 99877987947 33291000000 33292662649 3226228928 3227891577
+99876000000 99880988145 33292000000 33293662715 3227228928 3228891643
+99879000000 99883988235 33293000000 33294662745 3228228928 3229891673
+99882000000 99886988460 33294000000 33295662820 3229228928 3230891748
+99885000000 99889988592 33295000000 33296662864 3230228928 3231891792
+99888000000 99892988731 33296000000 33297662910 3231228928 3232891838
+99891000000 99895988782 33297000000 33298662927 3232228928 3233891855
+99894000000 99898988993 33298000000 33299662997 3233228928 3234891925
+99897000000 99901989202 33299000000 33300663067 3234228928 3235891995
+99900000000 99904989330 33300000000 33301663110 3235228928 3236892038
+99903000000 99907989473 33301000000 33302663157 3236228928 3237892085
+99906000000 99910989644 33302000000 33303663214 3237228928 3238892142
+99909000000 99913989741 33303000000 33304663247 3238228928 3239892175
+99912000000 99916989954 33304000000 33305663318 3239228928 3240892246
+99915000000 99919990084 33305000000 33306663361 3240228928 3241892289
+99918000000 99922990234 33306000000 33307663411 3241228928 3242892339
+99921000000 99925990394 33307000000 33308663464 3242228928 3243892392
+99924000000 99928990490 33308000000 33309663496 3243228928 3244892424
+99927000000 99931990678 33309000000 33310663559 3244228928 3245892487
+99930000000 99934990846 33310000000 33311663615 3245228928 3246892543
+99933000000 99937990982 33311000000 33312663660 3246228928 3247892588
+99936000000 99940991157 33312000000 33313663719 3247228928 3248892647
+99939000000 99943991279 33313000000 33314663759 3248228928 3249892687
+99942000000 99946991429 33314000000 33315663809 3249228928 3250892737
+99945000000 99949991577 33315000000 33316663859 3250228928 3251892787
+99948000000 99952991783 33316000000 33317663927 3251228928 3252892855
+99951000000 99955991897 33317000000 33318663965 3252228928 3253892893
+99954000000 99958992029 33318000000 33319664009 3253228928 3254892937
+99957000000 99961992203 33319000000 33320664067 3254228928 3255892995
+99960000000 99964992322 33320000000 33321664107 3255228928 3256893035
+99963000000 99967992446 33321000000 33322664148 3256228928 3257893076
+99966000000 99970992665 33322000000 33323664221 3257228928 3258893149
+99969000000 99973992801 33323000000 33324664267 3258228928 3259893195
+99972000000 99976992952 33324000000 33325664317 3259228928 3260893245
+99975000000 99979993112 33325000000 33326664370 3260228928 3261893298
+99978000000 99982993233 33326000000 33327664411 3261228928 3262893339
+99981000000 99985993314 33327000000 33328664438 3262228928 3263893366
+99984000000 99988993522 33328000000 33329664507 3263228928 3264893435
+99987000000 99991993677 33329000000 33330664559 3264228928 3265893487
+99990000000 99994993836 33330000000 33331664612 3265228928 3266893540
+99993000000 99997993988 33331000000 33332664662 3266228928 3267893590
+99996000000 100000994110 33332000000 33333664703 3267228928 3268893631
+99999000000 100003994288 33333000000 33334664762 3268228928 3269893690
+100002000000 100006994437 33334000000 33335664812 3269228928 3270893740
+100005000000 100009994565 33335000000 33336664855 3270228928 3271893783
+100008000000 100012994734 33336000000 33337664911 3271228928 3272893839
+100011000000 100015994854 33337000000 33338664951 3272228928 3273893879
+100014000000 100018994781 33338000000 33339664927 3273228928 3274893855
+100017000000 100021995104 33339000000 33340665034 3274228928 3275893962
+100020000000 100024995357 33340000000 33341665119 3275228928 3276894047
+100023000000 100027995467 33341000000 33342665155 3276228928 3277894083
+100026000000 100030995646 33342000000 33343665215 3277228928 3278894143
+100029000000 100033995694 33343000000 33344665231 3278228928 3279894159
+100032000000 100036995948 33344000000 33345665316 3279228928 3280894244
+100035000000 100039996067 33345000000 33346665355 3280228928 3281894283
+100038000000 100042996238 33346000000 33347665412 3281228928 3282894340
+100041000000 100045996385 33347000000 33348665461 3282228928 3283894389
+100044000000 100048996538 33348000000 33349665512 3283228928 3284894440
+100047000000 100051996684 33349000000 33350665561 3284228928 3285894489
+100050000000 100054996828 33350000000 33351665609 3285228928 3286894537
+100053000000 100057996991 33351000000 33352665663 3286228928 3287894591
+100056000000 100060997143 33352000000 33353665714 3287228928 3288894642
+100059000000 100063997297 33353000000 33354665765 3288228928 3289894693
+100062000000 100066997417 33354000000 33355665805 3289228928 3290894733
+100065000000 100069997626 33355000000 33356665875 3290228928 3291894803
+100068000000 100072997756 33356000000 33357665918 3291228928 3292894846
+100071000000 100075997870 33357000000 33358665956 3292228928 3293894884
+100074000000 100078998031 33358000000 33359666010 3293228928 3294894938
+100077000000 100081998166 33359000000 33360666055 3294228928 3295894983
+100080000000 100084998309 33360000000 33361666103 3295228928 3296895031
+100083000000 100087998409 33361000000 33362666136 3296228928 3297895064
+100086000000 100090998643 33362000000 33363666214 3297228928 3298895142
+100089000000 100093998716 33363000000 33364666238 3298228928 3299895166
+100092000000 100096998837 33364000000 33365666279 3299228928 3300895207
+100095000000 100099999026 33365000000 33366666342 3300228928 3301895270
+100098000000 100102999180 33366000000 33367666393 3301228928 3302895321
+100101000000 100105999359 33367000000 33368666453 3302228928 3303895381
+100104000000 100108999505 33368000000 33369666501 3303228928 3304895429
+100107000000 100111999632 33369000000 33370666544 3304228928 3305895472
+100110000000 100114999806 33370000000 33371666602 3305228928 3306895530
+100113000000 100117999870 33371000000 33372666623 3306228928 3307895551
+100116000000 100121000077 33372000000 33373666692 3307228928 3308895620
+100119000000 100124000258 33373000000 33374666752 3308228928 3309895680
+100122000000 100127000407 33374000000 33375666802 3309228928 3310895730
+100125000000 100130000464 33375000000 33376666821 3310228928 3311895749
+100128000000 100133000660 33376000000 33377666886 3311228928 3312895814
+100131000000 100136000850 33377000000 33378666950 3312228928 3313895878
+100134000000 100139000995 33378000000 33379666998 3313228928 3314895926
+100137000000 100142001167 33379000000 33380667055 3314228928 3315895983
+100140000000 100145001300 33380000000 33381667100 3315228928 3316896028
+100143000000 100148001371 33381000000 33382667123 3316228928 3317896051
+100146000000 100151001597 33382000000 33383667199 3317228928 3318896127
+100149000000 100154001757 33383000000 33384667252 3318228928 3319896180
+100152000000 100157001889 33384000000 33385667296 3319228928 3320896224
+100155000000 100160001997 33385000000 33386667332 3320228928 3321896260
+100158000000 100163002208 33386000000 33387667402 3321228928 3322896330
+100161000000 100166002374 33387000000 33388667458 3322228928 3323896386
+100164000000 100169002485 33388000000 33389667495 3323228928 3324896423
+100167000000 100172002645 33389000000 33390667548 3324228928 3325896476
+100170000000 100175002757 33390000000 33391667585 3325228928 3326896513
+100173000000 100178002955 33391000000 33392667651 3326228928 3327896579
+100176000000 100181003045 33392000000 33393667681 3327228928 3328896609
+100179000000 100184003270 33393000000 33394667756 3328228928 3329896684
+100182000000 100187003402 33394000000 33395667800 3329228928 3330896728
+100185000000 100190003541 33395000000 33396667847 3330228928 3331896775
+100188000000 100193003592 33396000000 33397667864 3331228928 3332896792
+100191000000 100196003803 33397000000 33398667934 3332228928 3333896862
+100194000000 100199004012 33398000000 33399668004 3333228928 3334896932
+100197000000 100202004140 33399000000 33400668046 3334228928 3335896974
+100200000000 100205004283 33400000000 33401668094 3335228928 3336897022
+100203000000 100208004454 33401000000 33402668151 3336228928 3337897079
+100206000000 100211004551 33402000000 33403668183 3337228928 3338897111
+100209000000 100214004764 33403000000 33404668254 3338228928 3339897182
+100212000000 100217004894 33404000000 33405668298 3339228928 3340897226
+100215000000 100220005044 33405000000 33406668348 3340228928 3341897276
+100218000000 100223005204 33406000000 33407668401 3341228928 3342897329
+100221000000 100226005300 33407000000 33408668433 3342228928 3343897361
+100224000000 100229005488 33408000000 33409668496 3343228928 3344897424
+100227000000 100232005656 33409000000 33410668552 3344228928 3345897480
+100230000000 100235005792 33410000000 33411668597 3345228928 3346897525
+100233000000 100238005967 33411000000 33412668655 3346228928 3347897583
+100236000000 100241006089 33412000000 33413668696 3347228928 3348897624
+100239000000 100244006239 33413000000 33414668746 3348228928 3349897674
+100242000000 100247006387 33414000000 33415668795 3349228928 3350897723
+100245000000 100250006593 33415000000 33416668864 3350228928 3351897792
+100248000000 100253006707 33416000000 33417668902 3351228928 3352897830
+100251000000 100256006839 33417000000 33418668946 3352228928 3353897874
+100254000000 100259007013 33418000000 33419669004 3353228928 3354897932
+100257000000 100262007132 33419000000 33420669044 3354228928 3355897972
+100260000000 100265007256 33420000000 33421669085 3355228928 3356898013
+100263000000 100268007475 33421000000 33422669158 3356228928 3357898086
+100266000000 100271007611 33422000000 33423669203 3357228928 3358898131
+100269000000 100274007762 33423000000 33424669254 3358228928 3359898182
+100272000000 100277007922 33424000000 33425669307 3359228928 3360898235
+100275000000 100280008043 33425000000 33426669347 3360228928 3361898275
+100278000000 100283008124 33426000000 33427669374 3361228928 3362898302
+100281000000 100286008332 33427000000 33428669444 3362228928 3363898372
+100284000000 100289008487 33428000000 33429669495 3363228928 3364898423
+100287000000 100292008646 33429000000 33430669548 3364228928 3365898476
+100290000000 100295008798 33430000000 33431669599 3365228928 3366898527
+100293000000 100298008920 33431000000 33432669640 3366228928 3367898568
+100296000000 100301009098 33432000000 33433669699 3367228928 3368898627
+100299000000 100304009247 33433000000 33434669749 3368228928 3369898677
+100302000000 100307009375 33434000000 33435669791 3369228928 3370898719
+100305000000 100310009544 33435000000 33436669848 3370228928 3371898776
+100308000000 100313009664 33436000000 33437669888 3371228928 3372898816
+100311000000 100316009591 33437000000 33438669863 3372228928 3373898791
+100314000000 100319009914 33438000000 33439669971 3373228928 3374898899
+100317000000 100322010167 33439000000 33440670055 3374228928 3375898983
+100320000000 100325010277 33440000000 33441670092 3375228928 3376899020
+100323000000 100328010456 33441000000 33442670152 3376228928 3377899080
+100326000000 100331010504 33442000000 33443670168 3377228928 3378899096
+100329000000 100334010758 33443000000 33444670252 3378228928 3379899180
+100332000000 100337010877 33444000000 33445670292 3379228928 3380899220
+100335000000 100340011048 33445000000 33446670349 3380228928 3381899277
+100338000000 100343011195 33446000000 33447670398 3381228928 3382899326
+100341000000 100346011348 33447000000 33448670449 3382228928 3383899377
+100344000000 100349011494 33448000000 33449670498 3383228928 3384899426
+100347000000 100352011638 33449000000 33450670546 3384228928 3385899474
+100350000000 100355011801 33450000000 33451670600 3385228928 3386899528
+100353000000 100358011953 33451000000 33452670651 3386228928 3387899579
+100356000000 100361012107 33452000000 33453670702 3387228928 3388899630
+100359000000 100364012227 33453000000 33454670742 3388228928 3389899670
+100362000000 100367012436 33454000000 33455670812 3389228928 3390899740
+100365000000 100370012566 33455000000 33456670855 3390228928 3391899783
+100368000000 100373012680 33456000000 33457670893 3391228928 3392899821
+100371000000 100376012841 33457000000 33458670947 3392228928 3393899875
+100374000000 100379012976 33458000000 33459670992 3393228928 3394899920
+100377000000 100382013119 33459000000 33460671039 3394228928 3395899967
+100380000000 100385013219 33460000000 33461671073 3395228928 3396900001
+100383000000 100388013453 33461000000 33462671151 3396228928 3397900079
+100386000000 100391013526 33462000000 33463671175 3397228928 3398900103
+100389000000 100394013647 33463000000 33464671215 3398228928 3399900143
+100392000000 100397013836 33464000000 33465671278 3399228928 3400900206
+100395000000 100400013990 33465000000 33466671330 3400228928 3401900258
+100398000000 100403014169 33466000000 33467671389 3401228928 3402900317
+100401000000 100406014315 33467000000 33468671438 3402228928 3403900366
+100404000000 100409014442 33468000000 33469671480 3403228928 3404900408
+100407000000 100412014616 33469000000 33470671538 3404228928 3405900466
+100410000000 100415014680 33470000000 33471671560 3405228928 3406900488
+100413000000 100418014887 33471000000 33472671629 3406228928 3407900557
+100416000000 100421015068 33472000000 33473671689 3407228928 3408900617
+100419000000 100424015217 33473000000 33474671739 3408228928 3409900667
+100422000000 100427015274 33474000000 33475671758 3409228928 3410900686
+100425000000 100430015470 33475000000 33476671823 3410228928 3411900751
+100428000000 100433015660 33476000000 33477671886 3411228928 3412900814
+100431000000 100436015805 33477000000 33478671935 3412228928 3413900863
+100434000000 100439015977 33478000000 33479671992 3413228928 3414900920
+100437000000 100442016110 33479000000 33480672036 3414228928 3415900964
+100440000000 100445016181 33480000000 33481672060 3415228928 3416900988
+100443000000 100448016407 33481000000 33482672135 3416228928 3417901063
+100446000000 100451016567 33482000000 33483672189 3417228928 3418901117
+100449000000 100454016699 33483000000 33484672233 3418228928 3419901161
+100452000000 100457016807 33484000000 33485672269 3419228928 3420901197
+100455000000 100460017018 33485000000 33486672339 3420228928 3421901267
+100458000000 100463017184 33486000000 33487672394 3421228928 3422901322
+100461000000 100466017295 33487000000 33488672431 3422228928 3423901359
+100464000000 100469017455 33488000000 33489672485 3423228928 3424901413
+100467000000 100472017567 33489000000 33490672522 3424228928 3425901450
+100470000000 100475017765 33490000000 33491672588 3425228928 3426901516
+100473000000 100478017855 33491000000 33492672618 3426228928 3427901546
+100476000000 100481018080 33492000000 33493672693 3427228928 3428901621
+100479000000 100484018212 33493000000 33494672737 3428228928 3429901665
+100482000000 100487018351 33494000000 33495672783 3429228928 3430901711
+100485000000 100490018402 33495000000 33496672800 3430228928 3431901728
+100488000000 100493018613 33496000000 33497672871 3431228928 3432901799
+100491000000 100496018822 33497000000 33498672940 3432228928 3433901868
+100494000000 100499018950 33498000000 33499672983 3433228928 3434901911
+100497000000 100502019093 33499000000 33500673031 3434228928 3435901959
+100500000000 100505019264 33500000000 33501673088 3435228928 3436902016
+100503000000 100508019361 33501000000 33502673120 3436228928 3437902048
+100506000000 100511019574 33502000000 33503673191 3437228928 3438902119
+100509000000 100514019704 33503000000 33504673234 3438228928 3439902162
+100512000000 100517019854 33504000000 33505673284 3439228928 3440902212
+100515000000 100520020014 33505000000 33506673338 3440228928 3441902266
+100518000000 100523020110 33506000000 33507673370 3441228928 3442902298
+100521000000 100526020298 33507000000 33508673432 3442228928 3443902360
+100524000000 100529020466 33508000000 33509673488 3443228928 3444902416
+100527000000 100532020602 33509000000 33510673534 3444228928 3445902462
+100530000000 100535020777 33510000000 33511673592 3445228928 3446902520
+100533000000 100538020899 33511000000 33512673633 3446228928 3447902561
+100536000000 100541021049 33512000000 33513673683 3447228928 3448902611
+100539000000 100544021197 33513000000 33514673732 3448228928 3449902660
+100542000000 100547021403 33514000000 33515673801 3449228928 3450902729
+100545000000 100550021517 33515000000 33516673839 3450228928 3451902767
+100548000000 100553021649 33516000000 33517673883 3451228928 3452902811
+100551000000 100556021823 33517000000 33518673941 3452228928 3453902869
+100554000000 100559021942 33518000000 33519673980 3453228928 3454902908
+100557000000 100562022066 33519000000 33520674022 3454228928 3455902950
+100560000000 100565022285 33520000000 33521674095 3455228928 3456903023
+100563000000 100568022421 33521000000 33522674140 3456228928 3457903068
+100566000000 100571022572 33522000000 33523674190 3457228928 3458903118
+100569000000 100574022732 33523000000 33524674244 3458228928 3459903172
+100572000000 100577022853 33524000000 33525674284 3459228928 3460903212
+100575000000 100580022934 33525000000 33526674311 3460228928 3461903239
+100578000000 100583023142 33526000000 33527674380 3461228928 3462903308
+100581000000 100586023297 33527000000 33528674432 3462228928 3463903360
+100584000000 100589023456 33528000000 33529674485 3463228928 3464903413
+100587000000 100592023608 33529000000 33530674536 3464228928 3465903464
+100590000000 100595023730 33530000000 33531674576 3465228928 3466903504
+100593000000 100598023908 33531000000 33532674636 3466228928 3467903564
+100596000000 100601024057 33532000000 33533674685 3467228928 3468903613
+100599000000 100604024185 33533000000 33534674728 3468228928 3469903656
+100602000000 100607024354 33534000000 33535674784 3469228928 3470903712
+100605000000 100610024474 33535000000 33536674824 3470228928 3471903752
+100608000000 100613024401 33536000000 33537674800 3471228928 3472903728
+100611000000 100616024724 33537000000 33538674908 3472228928 3473903836
+100614000000 100619024977 33538000000 33539674992 3473228928 3474903920
+100617000000 100622025087 33539000000 33540675029 3474228928 3475903957
+100620000000 100625025266 33540000000 33541675088 3475228928 3476904016
+100623000000 100628025314 33541000000 33542675104 3476228928 3477904032
+100626000000 100631025568 33542000000 33543675189 3477228928 3478904117
+100629000000 100634025687 33543000000 33544675229 3478228928 3479904157
+100632000000 100637025858 33544000000 33545675286 3479228928 3480904214
+100635000000 100640026005 33545000000 33546675335 3480228928 3481904263
+100638000000 100643026158 33546000000 33547675386 3481228928 3482904314
+100641000000 100646026304 33547000000 33548675434 3482228928 3483904362
+100644000000 100649026448 33548000000 33549675482 3483228928 3484904410
+100647000000 100652026611 33549000000 33550675537 3484228928 3485904465
+100650000000 100655026763 33550000000 33551675587 3485228928 3486904515
+100653000000 100658026917 33551000000 33552675639 3486228928 3487904567
+100656000000 100661027037 33552000000 33553675679 3487228928 3488904607
+100659000000 100664027246 33553000000 33554675748 3488228928 3489904676
+100662000000 100667027376 33554000000 33555675792 3489228928 3490904720
+100665000000 100670027490 33555000000 33556675830 3490228928 3491904758
+100668000000 100673027651 33556000000 33557675883 3491228928 3492904811
+100671000000 100676027786 33557000000 33558675928 3492228928 3493904856
+100674000000 100679027929 33558000000 33559675976 3493228928 3494904904
+100677000000 100682028029 33559000000 33560676009 3494228928 3495904937
+100680000000 100685028263 33560000000 33561676087 3495228928 3496905015
+100683000000 100688028336 33561000000 33562676112 3496228928 3497905040
+100686000000 100691028457 33562000000 33563676152 3497228928 3498905080
+100689000000 100694028646 33563000000 33564676215 3498228928 3499905143
+100692000000 100697028800 33564000000 33565676266 3499228928 3500905194
+100695000000 100700028979 33565000000 33566676326 3500228928 3501905254
+100698000000 100703029125 33566000000 33567676375 3501228928 3502905303
+100701000000 100706029252 33567000000 33568676417 3502228928 3503905345
+100704000000 100709029426 33568000000 33569676475 3503228928 3504905403
+100707000000 100712029490 33569000000 33570676496 3504228928 3505905424
+100710000000 100715029697 33570000000 33571676565 3505228928 3506905493
+100713000000 100718029878 33571000000 33572676626 3506228928 3507905554
+100716000000 100721030027 33572000000 33573676675 3507228928 3508905603
+100719000000 100724030084 33573000000 33574676694 3508228928 3509905622
+100722000000 100727030280 33574000000 33575676760 3509228928 3510905688
+100725000000 100730030470 33575000000 33576676823 3510228928 3511905751
+100728000000 100733030615 33576000000 33577676871 3511228928 3512905799
+100731000000 100736030787 33577000000 33578676929 3512228928 3513905857
+100734000000 100739030920 33578000000 33579676973 3513228928 3514905901
+100737000000 100742030991 33579000000 33580676997 3514228928 3515905925
+100740000000 100745031217 33580000000 33581677072 3515228928 3516906000
+100743000000 100748031377 33581000000 33582677125 3516228928 3517906053
+100746000000 100751031509 33582000000 33583677169 3517228928 3518906097
+100749000000 100754031617 33583000000 33584677205 3518228928 3519906133
+100752000000 100757031828 33584000000 33585677276 3519228928 3520906204
+100755000000 100760031994 33585000000 33586677331 3520228928 3521906259
+100758000000 100763032105 33586000000 33587677368 3521228928 3522906296
+100761000000 100766032265 33587000000 33588677421 3522228928 3523906349
+100764000000 100769032377 33588000000 33589677459 3523228928 3524906387
+100767000000 100772032575 33589000000 33590677525 3524228928 3525906453
+100770000000 100775032665 33590000000 33591677555 3525228928 3526906483
+100773000000 100778032890 33591000000 33592677630 3526228928 3527906558
+100776000000 100781033022 33592000000 33593677674 3527228928 3528906602
+100779000000 100784033161 33593000000 33594677720 3528228928 3529906648
+100782000000 100787033212 33594000000 33595677737 3529228928 3530906665
+100785000000 100790033423 33595000000 33596677807 3530228928 3531906735
+100788000000 100793033632 33596000000 33597677877 3531228928 3532906805
+100791000000 100796033760 33597000000 33598677920 3532228928 3533906848
+100794000000 100799033903 33598000000 33599677967 3533228928 3534906895
+100797000000 100802034074 33599000000 33600678024 3534228928 3535906952
+100800000000 100805034171 33600000000 33601678057 3535228928 3536906985
+100803000000 100808034384 33601000000 33602678128 3536228928 3537907056
+100806000000 100811034514 33602000000 33603678171 3537228928 3538907099
+100809000000 100814034664 33603000000 33604678221 3538228928 3539907149
+100812000000 100817034824 33604000000 33605678274 3539228928 3540907202
+100815000000 100820034920 33605000000 33606678306 3540228928 3541907234
+100818000000 100823035108 33606000000 33607678369 3541228928 3542907297
+100821000000 100826035276 33607000000 33608678425 3542228928 3543907353
+100824000000 100829035412 33608000000 33609678470 3543228928 3544907398
+100827000000 100832035587 33609000000 33610678529 3544228928 3545907457
+100830000000 100835035709 33610000000 33611678569 3545228928 3546907497
+100833000000 100838035859 33611000000 33612678619 3546228928 3547907547
+100836000000 100841036007 33612000000 33613678669 3547228928 3548907597
+100839000000 100844036213 33613000000 33614678737 3548228928 3549907665
+100842000000 100847036327 33614000000 33615678775 3549228928 3550907703
+100845000000 100850036459 33615000000 33616678819 3550228928 3551907747
+100848000000 100853036633 33616000000 33617678877 3551228928 3552907805
+100851000000 100856036752 33617000000 33618678917 3552228928 3553907845
+100854000000 100859036876 33618000000 33619678958 3553228928 3554907886
+100857000000 100862037095 33619000000 33620679031 3554228928 3555907959
+100860000000 100865037231 33620000000 33621679077 3555228928 3556908005
+100863000000 100868037382 33621000000 33622679127 3556228928 3557908055
+100866000000 100871037542 33622000000 33623679180 3557228928 3558908108
+100869000000 100874037663 33623000000 33624679221 3558228928 3559908149
+100872000000 100877037744 33624000000 33625679248 3559228928 3560908176
+100875000000 100880037952 33625000000 33626679317 3560228928 3561908245
+100878000000 100883038107 33626000000 33627679369 3561228928 3562908297
+100881000000 100886038266 33627000000 33628679422 3562228928 3563908350
+100884000000 100889038418 33628000000 33629679472 3563228928 3564908400
+100887000000 100892038540 33629000000 33630679513 3564228928 3565908441
+100890000000 100895038718 33630000000 33631679572 3565228928 3566908500
+100893000000 100898038867 33631000000 33632679622 3566228928 3567908550
+100896000000 100901038995 33632000000 33633679665 3567228928 3568908593
+100899000000 100904039164 33633000000 33634679721 3568228928 3569908649
+100902000000 100907039284 33634000000 33635679761 3569228928 3570908689
+100905000000 100910039211 33635000000 33636679737 3570228928 3571908665
+100908000000 100913039534 33636000000 33637679844 3571228928 3572908772
+100911000000 100916039787 33637000000 33638679929 3572228928 3573908857
+100914000000 100919039897 33638000000 33639679965 3573228928 3574908893
+100917000000 100922040076 33639000000 33640680025 3574228928 3575908953
+100920000000 100925040124 33640000000 33641680041 3575228928 3576908969
+100923000000 100928040378 33641000000 33642680126 3576228928 3577909054
+100926000000 100931040497 33642000000 33643680165 3577228928 3578909093
+100929000000 100934040668 33643000000 33644680222 3578228928 3579909150
+100932000000 100937040815 33644000000 33645680271 3579228928 3580909199
+100935000000 100940040968 33645000000 33646680322 3580228928 3581909250
+100938000000 100943041114 33646000000 33647680371 3581228928 3582909299
+100941000000 100946041258 33647000000 33648680419 3582228928 3583909347
+100944000000 100949041421 33648000000 33649680473 3583228928 3584909401
+100947000000 100952041573 33649000000 33650680524 3584228928 3585909452
+100950000000 100955041727 33650000000 33651680575 3585228928 3586909503
+100953000000 100958041847 33651000000 33652680615 3586228928 3587909543
+100956000000 100961042056 33652000000 33653680685 3587228928 3588909613
+100959000000 100964042186 33653000000 33654680728 3588228928 3589909656
+100962000000 100967042300 33654000000 33655680766 3589228928 3590909694
+100965000000 100970042461 33655000000 33656680820 3590228928 3591909748
+100968000000 100973042596 33656000000 33657680865 3591228928 3592909793
+100971000000 100976042739 33657000000 33658680913 3592228928 3593909841
+100974000000 100979042839 33658000000 33659680946 3593228928 3594909874
+100977000000 100982043073 33659000000 33660681024 3594228928 3595909952
+100980000000 100985043146 33660000000 33661681048 3595228928 3596909976
+100983000000 100988043267 33661000000 33662681089 3596228928 3597910017
+100986000000 100991043456 33662000000 33663681152 3597228928 3598910080
+100989000000 100994043610 33663000000 33664681203 3598228928 3599910131
+100992000000 100997043789 33664000000 33665681263 3599228928 3600910191
+100995000000 101000043935 33665000000 33666681311 3600228928 3601910239
+100998000000 101003044062 33666000000 33667681354 3601228928 3602910282
+101001000000 101006044236 33667000000 33668681412 3602228928 3603910340
+101004000000 101009044300 33668000000 33669681433 3603228928 3604910361
+101007000000 101012044507 33669000000 33670681502 3604228928 3605910430
+101010000000 101015044688 33670000000 33671681562 3605228928 3606910490
+101013000000 101018044837 33671000000 33672681612 3606228928 3607910540
+101016000000 101021044894 33672000000 33673681631 3607228928 3608910559
+101019000000 101024045090 33673000000 33674681696 3608228928 3609910624
+101022000000 101027045280 33674000000 33675681760 3609228928 3610910688
+101025000000 101030045425 33675000000 33676681808 3610228928 3611910736
+101028000000 101033045597 33676000000 33677681865 3611228928 3612910793
+101031000000 101036045730 33677000000 33678681910 3612228928 3613910838
+101034000000 101039045801 33678000000 33679681933 3613228928 3614910861
+101037000000 101042046027 33679000000 33680682009 3614228928 3615910937
+101040000000 101045046187 33680000000 33681682062 3615228928 3616910990
+101043000000 101048046319 33681000000 33682682106 3616228928 3617911034
+101046000000 101051046427 33682000000 33683682142 3617228928 3618911070
+101049000000 101054046638 33683000000 33684682212 3618228928 3619911140
+101052000000 101057046804 33684000000 33685682268 3619228928 3620911196
+101055000000 101060046915 33685000000 33686682305 3620228928 3621911233
+101058000000 101063047075 33686000000 33687682358 3621228928 3622911286
+101061000000 101066047187 33687000000 33688682395 3622228928 3623911323
+101064000000 101069047385 33688000000 33689682461 3623228928 3624911389
+101067000000 101072047475 33689000000 33690682491 3624228928 3625911419
+101070000000 101075047700 33690000000 33691682566 3625228928 3626911494
+101073000000 101078047832 33691000000 33692682610 3626228928 3627911538
+101076000000 101081047971 33692000000 33693682657 3627228928 3628911585
+101079000000 101084048022 33693000000 33694682674 3628228928 3629911602
+101082000000 101087048233 33694000000 33695682744 3629228928 3630911672
+101085000000 101090048442 33695000000 33696682814 3630228928 3631911742
+101088000000 101093048570 33696000000 33697682856 3631228928 3632911784
+101091000000 101096048713 33697000000 33698682904 3632228928 3633911832
+101094000000 101099048884 33698000000 33699682961 3633228928 3634911889
+101097000000 101102048981 33699000000 33700682993 3634228928 3635911921
+101100000000 101105049194 33700000000 33701683064 3635228928 3636911992
+101103000000 101108049324 33701000000 33702683108 3636228928 3637912036
+101106000000 101111049474 33702000000 33703683158 3637228928 3638912086
+101109000000 101114049634 33703000000 33704683211 3638228928 3639912139
+101112000000 101117049730 33704000000 33705683243 3639228928 3640912171
+101115000000 101120049918 33705000000 33706683306 3640228928 3641912234
+101118000000 101123050086 33706000000 33707683362 3641228928 3642912290
+101121000000 101126050222 33707000000 33708683407 3642228928 3643912335
+101124000000 101129050397 33708000000 33709683465 3643228928 3644912393
+101127000000 101132050519 33709000000 33710683506 3644228928 3645912434
+101130000000 101135050669 33710000000 33711683556 3645228928 3646912484
+101133000000 101138050817 33711000000 33712683605 3646228928 3647912533
+101136000000 101141051023 33712000000 33713683674 3647228928 3648912602
+101139000000 101144051137 33713000000 33714683712 3648228928 3649912640
+101142000000 101147051269 33714000000 33715683756 3649228928 3650912684
+101145000000 101150051443 33715000000 33716683814 3650228928 3651912742
+101148000000 101153051562 33716000000 33717683854 3651228928 3652912782
+101151000000 101156051686 33717000000 33718683895 3652228928 3653912823
+101154000000 101159051905 33718000000 33719683968 3653228928 3654912896
+101157000000 101162052041 33719000000 33720684013 3654228928 3655912941
+101160000000 101165052192 33720000000 33721684064 3655228928 3656912992
+101163000000 101168052352 33721000000 33722684117 3656228928 3657913045
+101166000000 101171052473 33722000000 33723684157 3657228928 3658913085
+101169000000 101174052554 33723000000 33724684184 3658228928 3659913112
+101172000000 101177052762 33724000000 33725684254 3659228928 3660913182
+101175000000 101180052917 33725000000 33726684305 3660228928 3661913233
+101178000000 101183053076 33726000000 33727684358 3661228928 3662913286
+101181000000 101186053228 33727000000 33728684409 3662228928 3663913337
+101184000000 101189053350 33728000000 33729684450 3663228928 3664913378
+101187000000 101192053528 33729000000 33730684509 3664228928 3665913437
+101190000000 101195053677 33730000000 33731684559 3665228928 3666913487
+101193000000 101198053805 33731000000 33732684601 3666228928 3667913529
+101196000000 101201053974 33732000000 33733684658 3667228928 3668913586
+101199000000 101204054094 33733000000 33734684698 3668228928 3669913626
+101202000000 101207054021 33734000000 33735684673 3669228928 3670913601
+101205000000 101210054344 33735000000 33736684781 3670228928 3671913709
+101208000000 101213054597 33736000000 33737684865 3671228928 3672913793
+101211000000 101216054707 33737000000 33738684902 3672228928 3673913830
+101214000000 101219054886 33738000000 33739684962 3673228928 3674913890
+101217000000 101222054934 33739000000 33740684978 3674228928 3675913906
+101220000000 101225055188 33740000000 33741685062 3675228928 3676913990
+101223000000 101228055307 33741000000 33742685102 3676228928 3677914030
+101226000000 101231055478 33742000000 33743685159 3677228928 3678914087
+101229000000 101234055625 33743000000 33744685208 3678228928 3679914136
+101232000000 101237055778 33744000000 33745685259 3679228928 3680914187
+101235000000 101240055924 33745000000 33746685308 3680228928 3681914236
+101238000000 101243056068 33746000000 33747685356 3681228928 3682914284
+101241000000 101246056231 33747000000 33748685410 3682228928 3683914338
+101244000000 101249056383 33748000000 33749685461 3683228928 3684914389
+101247000000 101252056537 33749000000 33750685512 3684228928 3685914440
+101250000000 101255056657 33750000000 33751685552 3685228928 3686914480
+101253000000 101258056866 33751000000 33752685622 3686228928 3687914550
+101256000000 101261056996 33752000000 33753685665 3687228928 3688914593
+101259000000 101264057110 33753000000 33754685703 3688228928 3689914631
+101262000000 101267057271 33754000000 33755685757 3689228928 3690914685
+101265000000 101270057406 33755000000 33756685802 3690228928 3691914730
+101268000000 101273057549 33756000000 33757685849 3691228928 3692914777
+101271000000 101276057649 33757000000 33758685883 3692228928 3693914811
+101274000000 101279057883 33758000000 33759685961 3693228928 3694914889
+101277000000 101282057956 33759000000 33760685985 3694228928 3695914913
+101280000000 101285058077 33760000000 33761686025 3695228928 3696914953
+101283000000 101288058266 33761000000 33762686088 3696228928 3697915016
+101286000000 101291058420 33762000000 33763686140 3697228928 3698915068
+101289000000 101294058599 33763000000 33764686199 3698228928 3699915127
+101292000000 101297058745 33764000000 33765686248 3699228928 3700915176
+101295000000 101300058872 33765000000 33766686290 3700228928 3701915218
+101298000000 101303059046 33766000000 33767686348 3701228928 3702915276
+101301000000 101306059110 33767000000 33768686370 3702228928 3703915298
+101304000000 101309059317 33768000000 33769686439 3703228928 3704915367
+101307000000 101312059498 33769000000 33770686499 3704228928 3705915427
+101310000000 101315059647 33770000000 33771686549 3705228928 3706915477
+101313000000 101318059704 33771000000 33772686568 3706228928 3707915496
+101316000000 101321059900 33772000000 33773686633 3707228928 3708915561
+101319000000 101324060090 33773000000 33774686696 3708228928 3709915624
+101322000000 101327060235 33774000000 33775686745 3709228928 3710915673
+101325000000 101330060407 33775000000 33776686802 3710228928 3711915730
+101328000000 101333060540 33776000000 33777686846 3711228928 3712915774
+101331000000 101336060611 33777000000 33778686870 3712228928 3713915798
+101334000000 101339060837 33778000000 33779686945 3713228928 3714915873
+101337000000 101342060997 33779000000 33780686999 3714228928 3715915927
+101340000000 101345061129 33780000000 33781687043 3715228928 3716915971
+101343000000 101348061237 33781000000 33782687079 3716228928 3717916007
+101346000000 101351061448 33782000000 33783687149 3717228928 3718916077
+101349000000 101354061614 33783000000 33784687204 3718228928 3719916132
+101352000000 101357061725 33784000000 33785687241 3719228928 3720916169
+101355000000 101360061885 33785000000 33786687295 3720228928 3721916223
+101358000000 101363061997 33786000000 33787687332 3721228928 3722916260
+101361000000 101366062195 33787000000 33788687398 3722228928 3723916326
+101364000000 101369062285 33788000000 33789687428 3723228928 3724916356
+101367000000 101372062510 33789000000 33790687503 3724228928 3725916431
+101370000000 101375062642 33790000000 33791687547 3725228928 3726916475
+101373000000 101378062781 33791000000 33792687593 3726228928 3727916521
+101376000000 101381062832 33792000000 33793687610 3727228928 3728916538
+101379000000 101384063043 33793000000 33794687681 3728228928 3729916609
+101382000000 101387063252 33794000000 33795687750 3729228928 3730916678
+101385000000 101390063380 33795000000 33796687793 3730228928 3731916721
+101388000000 101393063523 33796000000 33797687841 3731228928 3732916769
+101391000000 101396063694 33797000000 33798687898 3732228928 3733916826
+101394000000 101399063791 33798000000 33799687930 3733228928 3734916858
+101397000000 101402064004 33799000000 33800688001 3734228928 3735916929
+101400000000 101405064134 33800000000 33801688044 3735228928 3736916972
+101403000000 101408064284 33801000000 33802688094 3736228928 3737917022
+101406000000 101411064444 33802000000 33803688148 3737228928 3738917076
+101409000000 101414064540 33803000000 33804688180 3738228928 3739917108
+101412000000 101417064728 33804000000 33805688242 3739228928 3740917170
+101415000000 101420064896 33805000000 33806688298 3740228928 3741917226
+101418000000 101423065032 33806000000 33807688344 3741228928 3742917272
+101421000000 101426065207 33807000000 33808688402 3742228928 3743917330
+101424000000 101429065329 33808000000 33809688443 3743228928 3744917371
+101427000000 101432065479 33809000000 33810688493 3744228928 3745917421
+101430000000 101435065627 33810000000 33811688542 3745228928 3746917470
+101433000000 101438065833 33811000000 33812688611 3746228928 3747917539
+101436000000 101441065947 33812000000 33813688649 3747228928 3748917577
+101439000000 101444066079 33813000000 33814688693 3748228928 3749917621
+101442000000 101447066253 33814000000 33815688751 3749228928 3750917679
+101445000000 101450066372 33815000000 33816688790 3750228928 3751917718
+101448000000 101453066496 33816000000 33817688832 3751228928 3752917760
+101451000000 101456066715 33817000000 33818688905 3752228928 3753917833
+101454000000 101459066851 33818000000 33819688950 3753228928 3754917878
+101457000000 101462067002 33819000000 33820689000 3754228928 3755917928
+101460000000 101465067162 33820000000 33821689054 3755228928 3756917982
+101463000000 101468067283 33821000000 33822689094 3756228928 3757918022
+101466000000 101471067364 33822000000 33823689121 3757228928 3758918049
+101469000000 101474067572 33823000000 33824689190 3758228928 3759918118
+101472000000 101477067727 33824000000 33825689242 3759228928 3760918170
+101475000000 101480067886 33825000000 33826689295 3760228928 3761918223
+101478000000 101483068038 33826000000 33827689346 3761228928 3762918274
+101481000000 101486068160 33827000000 33828689386 3762228928 3763918314
+101484000000 101489068338 33828000000 33829689446 3763228928 3764918374
+101487000000 101492068487 33829000000 33830689495 3764228928 3765918423
+101490000000 101495068615 33830000000 33831689538 3765228928 3766918466
+101493000000 101498068784 33831000000 33832689594 3766228928 3767918522
+101496000000 101501068904 33832000000 33833689634 3767228928 3768918562
+101499000000 101504068831 33833000000 33834689610 3768228928 3769918538
+101502000000 101507069154 33834000000 33835689718 3769228928 3770918646
+101505000000 101510069407 33835000000 33836689802 3770228928 3771918730
+101508000000 101513069517 33836000000 33837689839 3771228928 3772918767
+101511000000 101516069696 33837000000 33838689898 3772228928 3773918826
+101514000000 101519069744 33838000000 33839689914 3773228928 3774918842
+101517000000 101522069998 33839000000 33840689999 3774228928 3775918927
+101520000000 101525070117 33840000000 33841690039 3775228928 3776918967
+101523000000 101528070288 33841000000 33842690096 3776228928 3777919024
+101526000000 101531070435 33842000000 33843690145 3777228928 3778919073
+101529000000 101534070588 33843000000 33844690196 3778228928 3779919124
+101532000000 101537070734 33844000000 33845690244 3779228928 3780919172
+101535000000 101540070878 33845000000 33846690292 3780228928 3781919220
+101538000000 101543071041 33846000000 33847690347 3781228928 3782919275
+101541000000 101546071193 33847000000 33848690397 3782228928 3783919325
+101544000000 101549071347 33848000000 33849690449 3783228928 3784919377
+101547000000 101552071467 33849000000 33850690489 3784228928 3785919417
+101550000000 101555071676 33850000000 33851690558 3785228928 3786919486
+101553000000 101558071806 33851000000 33852690602 3786228928 3787919530
+101556000000 101561071920 33852000000 33853690640 3787228928 3788919568
+101559000000 101564072081 33853000000 33854690693 3788228928 3789919621
+101562000000 101567072216 33854000000 33855690738 3789228928 3790919666
+101565000000 101570072359 33855000000 33856690786 3790228928 3791919714
+101568000000 101573072459 33856000000 33857690819 3791228928 3792919747
+101571000000 101576072693 33857000000 33858690897 3792228928 3793919825
+101574000000 101579072766 33858000000 33859690922 3793228928 3794919850
+101577000000 101582072887 33859000000 33860690962 3794228928 3795919890
+101580000000 101585073076 33860000000 33861691025 3795228928 3796919953
+101583000000 101588073230 33861000000 33862691076 3796228928 3797920004
+101586000000 101591073409 33862000000 33863691136 3797228928 3798920064
+101589000000 101594073555 33863000000 33864691185 3798228928 3799920113
+101592000000 101597073682 33864000000 33865691227 3799228928 3800920155
+101595000000 101600073856 33865000000 33866691285 3800228928 3801920213
+101598000000 101603073920 33866000000 33867691306 3801228928 3802920234
+101601000000 101606074127 33867000000 33868691375 3802228928 3803920303
+101604000000 101609074308 33868000000 33869691436 3803228928 3804920364
+101607000000 101612074457 33869000000 33870691485 3804228928 3805920413
+101610000000 101615074514 33870000000 33871691504 3805228928 3806920432
+101613000000 101618074710 33871000000 33872691570 3806228928 3807920498
+101616000000 101621074900 33872000000 33873691633 3807228928 3808920561
+101619000000 101624075045 33873000000 33874691681 3808228928 3809920609
+101622000000 101627075217 33874000000 33875691739 3809228928 3810920667
+101625000000 101630075350 33875000000 33876691783 3810228928 3811920711
+101628000000 101633075421 33876000000 33877691807 3811228928 3812920735
+101631000000 101636075647 33877000000 33878691882 3812228928 3813920810
+101634000000 101639075807 33878000000 33879691935 3813228928 3814920863
+101637000000 101642075939 33879000000 33880691979 3814228928 3815920907
+101640000000 101645076047 33880000000 33881692015 3815228928 3816920943
+101643000000 101648076258 33881000000 33882692086 3816228928 3817921014
+101646000000 101651076424 33882000000 33883692141 3817228928 3818921069
+101649000000 101654076535 33883000000 33884692178 3818228928 3819921106
+101652000000 101657076695 33884000000 33885692231 3819228928 3820921159
+101655000000 101660076807 33885000000 33886692269 3820228928 3821921197
+101658000000 101663077005 33886000000 33887692335 3821228928 3822921263
+101661000000 101666077095 33887000000 33888692365 3822228928 3823921293
+101664000000 101669077320 33888000000 33889692440 3823228928 3824921368
+101667000000 101672077452 33889000000 33890692484 3824228928 3825921412
+101670000000 101675077591 33890000000 33891692530 3825228928 3826921458
+101673000000 101678077642 33891000000 33892692547 3826228928 3827921475
+101676000000 101681077853 33892000000 33893692617 3827228928 3828921545
+101679000000 101684078062 33893000000 33894692687 3828228928 3829921615
+101682000000 101687078190 33894000000 33895692730 3829228928 3830921658
+101685000000 101690078333 33895000000 33896692777 3830228928 3831921705
+101688000000 101693078504 33896000000 33897692834 3831228928 3832921762
+101691000000 101696078601 33897000000 33898692867 3832228928 3833921795
+101694000000 101699078814 33898000000 33899692938 3833228928 3834921866
+101697000000 101702078944 33899000000 33900692981 3834228928 3835921909
+101700000000 101705079094 33900000000 33901693031 3835228928 3836921959
+101703000000 101708079254 33901000000 33902693084 3836228928 3837922012
+101706000000 101711079350 33902000000 33903693116 3837228928 3838922044
+101709000000 101714079538 33903000000 33904693179 3838228928 3839922107
+101712000000 101717079706 33904000000 33905693235 3839228928 3840922163
+101715000000 101720079842 33905000000 33906693280 3840228928 3841922208
+101718000000 101723080017 33906000000 33907693339 3841228928 3842922267
+101721000000 101726080139 33907000000 33908693379 3842228928 3843922307
+101724000000 101729080289 33908000000 33909693429 3843228928 3844922357
+101727000000 101732080437 33909000000 33910693479 3844228928 3845922407
+101730000000 101735080643 33910000000 33911693547 3845228928 3846922475
+101733000000 101738080757 33911000000 33912693585 3846228928 3847922513
+101736000000 101741080889 33912000000 33913693629 3847228928 3848922557
+101739000000 101744081063 33913000000 33914693687 3848228928 3849922615
+101742000000 101747081182 33914000000 33915693727 3849228928 3850922655
+101745000000 101750081306 33915000000 33916693768 3850228928 3851922696
+101748000000 101753081525 33916000000 33917693841 3851228928 3852922769
+101751000000 101756081661 33917000000 33918693887 3852228928 3853922815
+101754000000 101759081812 33918000000 33919693937 3853228928 3854922865
+101757000000 101762081972 33919000000 33920693990 3854228928 3855922918
+101760000000 101765082093 33920000000 33921694031 3855228928 3856922959
+101763000000 101768082174 33921000000 33922694058 3856228928 3857922986
+101766000000 101771082382 33922000000 33923694127 3857228928 3858923055
+101769000000 101774082537 33923000000 33924694179 3858228928 3859923107
+101772000000 101777082696 33924000000 33925694232 3859228928 3860923160
+101775000000 101780082848 33925000000 33926694282 3860228928 3861923210
+101778000000 101783082970 33926000000 33927694323 3861228928 3862923251
+101781000000 101786083148 33927000000 33928694382 3862228928 3863923310
+101784000000 101789083297 33928000000 33929694432 3863228928 3864923360
+101787000000 101792083425 33929000000 33930694475 3864228928 3865923403
+101790000000 101795083594 33930000000 33931694531 3865228928 3866923459
+101793000000 101798083714 33931000000 33932694571 3866228928 3867923499
+101796000000 101801083641 33932000000 33933694547 3867228928 3868923475
+101799000000 101804083964 33933000000 33934694654 3868228928 3869923582
+101802000000 101807084217 33934000000 33935694739 3869228928 3870923667
+101805000000 101810084327 33935000000 33936694775 3870228928 3871923703
+101808000000 101813084506 33936000000 33937694835 3871228928 3872923763
+101811000000 101816084554 33937000000 33938694851 3872228928 3873923779
+101814000000 101819084808 33938000000 33939694936 3873228928 3874923864
+101817000000 101822084927 33939000000 33940694975 3874228928 3875923903
+101820000000 101825085098 33940000000 33941695032 3875228928 3876923960
+101823000000 101828085245 33941000000 33942695081 3876228928 3877924009
+101826000000 101831085398 33942000000 33943695132 3877228928 3878924060
+101829000000 101834085544 33943000000 33944695181 3878228928 3879924109
+101832000000 101837085688 33944000000 33945695229 3879228928 3880924157
+101835000000 101840085851 33945000000 33946695283 3880228928 3881924211
+101838000000 101843086003 33946000000 33947695334 3881228928 3882924262
+101841000000 101846086157 33947000000 33948695385 3882228928 3883924313
+101844000000 101849086277 33948000000 33949695425 3883228928 3884924353
+101847000000 101852086486 33949000000 33950695495 3884228928 3885924423
+101850000000 101855086616 33950000000 33951695538 3885228928 3886924466
+101853000000 101858086730 33951000000 33952695576 3886228928 3887924504
+101856000000 101861086891 33952000000 33953695630 3887228928 3888924558
+101859000000 101864087026 33953000000 33954695675 3888228928 3889924603
+101862000000 101867087169 33954000000 33955695723 3889228928 3890924651
+101865000000 101870087269 33955000000 33956695756 3890228928 3891924684
+101868000000 101873087503 33956000000 33957695834 3891228928 3892924762
+101871000000 101876087576 33957000000 33958695858 3892228928 3893924786
+101874000000 101879087697 33958000000 33959695899 3893228928 3894924827
+101877000000 101882087886 33959000000 33960695962 3894228928 3895924890
+101880000000 101885088040 33960000000 33961696013 3895228928 3896924941
+101883000000 101888088219 33961000000 33962696073 3896228928 3897925001
+101886000000 101891088365 33962000000 33963696121 3897228928 3898925049
+101889000000 101894088492 33963000000 33964696164 3898228928 3899925092
+101892000000 101897088666 33964000000 33965696222 3899228928 3900925150
+101895000000 101900088730 33965000000 33966696243 3900228928 3901925171
+101898000000 101903088937 33966000000 33967696312 3901228928 3902925240
+101901000000 101906089118 33967000000 33968696372 3902228928 3903925300
+101904000000 101909089267 33968000000 33969696422 3903228928 3904925350
+101907000000 101912089324 33969000000 33970696441 3904228928 3905925369
+101910000000 101915089520 33970000000 33971696506 3905228928 3906925434
+101913000000 101918089710 33971000000 33972696570 3906228928 3907925498
+101916000000 101921089855 33972000000 33973696618 3907228928 3908925546
+101919000000 101924090027 33973000000 33974696675 3908228928 3909925603
+101922000000 101927090160 33974000000 33975696720 3909228928 3910925648
+101925000000 101930090231 33975000000 33976696743 3910228928 3911925671
+101928000000 101933090457 33976000000 33977696819 3911228928 3912925747
+101931000000 101936090617 33977000000 33978696872 3912228928 3913925800
+101934000000 101939090749 33978000000 33979696916 3913228928 3914925844
+101937000000 101942090857 33979000000 33980696952 3914228928 3915925880
+101940000000 101945091068 33980000000 33981697022 3915228928 3916925950
+101943000000 101948091234 33981000000 33982697078 3916228928 3917926006
+101946000000 101951091345 33982000000 33983697115 3917228928 3918926043
+101949000000 101954091505 33983000000 33984697168 3918228928 3919926096
+101952000000 101957091617 33984000000 33985697205 3919228928 3920926133
+101955000000 101960091815 33985000000 33986697271 3920228928 3921926199
+101958000000 101963091905 33986000000 33987697301 3921228928 3922926229
+101961000000 101966092130 33987000000 33988697376 3922228928 3923926304
+101964000000 101969092262 33988000000 33989697420 3923228928 3924926348
+101967000000 101972092401 33989000000 33990697467 3924228928 3925926395
+101970000000 101975092452 33990000000 33991697484 3925228928 3926926412
+101973000000 101978092663 33991000000 33992697554 3926228928 3927926482
+101976000000 101981092872 33992000000 33993697624 3927228928 3928926552
+101979000000 101984093000 33993000000 33994697666 3928228928 3929926594
+101982000000 101987093143 33994000000 33995697714 3929228928 3930926642
+101985000000 101990093314 33995000000 33996697771 3930228928 3931926699
+101988000000 101993093411 33996000000 33997697803 3931228928 3932926731
+101991000000 101996093624 33997000000 33998697874 3932228928 3933926802
+101994000000 101999093754 33998000000 33999697918 3933228928 3934926846
+101997000000 102002093904 33999000000 34000697968 3934228928 3935926896
+102000000000 102005094064 34000000000 34001698021 3935228928 3936926949
+102003000000 102008094160 34001000000 34002698053 3936228928 3937926981
+102006000000 102011094348 34002000000 34003698116 3937228928 3938927044
+102009000000 102014094516 34003000000 34004698172 3938228928 3939927100
+102012000000 102017094652 34004000000 34005698217 3939228928 3940927145
+102015000000 102020094827 34005000000 34006698275 3940228928 3941927203
+102018000000 102023094949 34006000000 34007698316 3941228928 3942927244
+102021000000 102026095099 34007000000 34008698366 3942228928 3943927294
+102024000000 102029095247 34008000000 34009698415 3943228928 3944927343
+102027000000 102032095453 34009000000 34010698484 3944228928 3945927412
+102030000000 102035095567 34010000000 34011698522 3945228928 3946927450
+102033000000 102038095699 34011000000 34012698566 3946228928 3947927494
+102036000000 102041095873 34012000000 34013698624 3947228928 3948927552
+102039000000 102044095992 34013000000 34014698664 3948228928 3949927592
+102042000000 102047096116 34014000000 34015698705 3949228928 3950927633
+102045000000 102050096335 34015000000 34016698778 3950228928 3951927706
+102048000000 102053096471 34016000000 34017698823 3951228928 3952927751
+102051000000 102056096622 34017000000 34018698874 3952228928 3953927802
+102054000000 102059096782 34018000000 34019698927 3953228928 3954927855
+102057000000 102062096903 34019000000 34020698967 3954228928 3955927895
+102060000000 102065096984 34020000000 34021698994 3955228928 3956927922
+102063000000 102068097192 34021000000 34022699064 3956228928 3957927992
+102066000000 102071097347 34022000000 34023699115 3957228928 3958928043
+102069000000 102074097506 34023000000 34024699168 3958228928 3959928096
+102072000000 102077097658 34024000000 34025699219 3959228928 3960928147
+102075000000 102080097780 34025000000 34026699260 3960228928 3961928188
+102078000000 102083097958 34026000000 34027699319 3961228928 3962928247
+102081000000 102086098107 34027000000 34028699369 3962228928 3963928297
+102084000000 102089098235 34028000000 34029699411 3963228928 3964928339
+102087000000 102092098404 34029000000 34030699468 3964228928 3965928396
+102090000000 102095098524 34030000000 34031699508 3965228928 3966928436
+102093000000 102098098451 34031000000 34032699483 3966228928 3967928411
+102096000000 102101098774 34032000000 34033699591 3967228928 3968928519
+102099000000 102104099027 34033000000 34034699675 3968228928 3969928603
+102102000000 102107099137 34034000000 34035699712 3969228928 3970928640
+102105000000 102110099316 34035000000 34036699772 3970228928 3971928700
+102108000000 102113099364 34036000000 34037699788 3971228928 3972928716
+102111000000 102116099618 34037000000 34038699872 3972228928 3973928800
+102114000000 102119099737 34038000000 34039699912 3973228928 3974928840
+102117000000 102122099908 34039000000 34040699969 3974228928 3975928897
+102120000000 102125100055 34040000000 34041700018 3975228928 3976928946
+102123000000 102128100208 34041000000 34042700069 3976228928 3977928997
+102126000000 102131100354 34042000000 34043700118 3977228928 3978929046
+102129000000 102134100498 34043000000 34044700166 3978228928 3979929094
+102132000000 102137100661 34044000000 34045700220 3979228928 3980929148
+102135000000 102140100813 34045000000 34046700271 3980228928 3981929199
+102138000000 102143100967 34046000000 34047700322 3981228928 3982929250
+102141000000 102146101087 34047000000 34048700362 3982228928 3983929290
+102144000000 102149101296 34048000000 34049700432 3983228928 3984929360
+102147000000 102152101426 34049000000 34050700475 3984228928 3985929403
+102150000000 102155101540 34050000000 34051700513 3985228928 3986929441
+102153000000 102158101701 34051000000 34052700567 3986228928 3987929495
+102156000000 102161101836 34052000000 34053700612 3987228928 3988929540
+102159000000 102164101979 34053000000 34054700659 3988228928 3989929587
+102162000000 102167102079 34054000000 34055700693 3989228928 3990929621
+102165000000 102170102313 34055000000 34056700771 3990228928 3991929699
+102168000000 102173102386 34056000000 34057700795 3991228928 3992929723
+102171000000 102176102507 34057000000 34058700835 3992228928 3993929763
+102174000000 102179102696 34058000000 34059700898 3993228928 3994929826
+102177000000 102182102850 34059000000 34060700950 3994228928 3995929878
+102180000000 102185103029 34060000000 34061701009 3995228928 3996929937
+102183000000 102188103175 34061000000 34062701058 3996228928 3997929986
+102186000000 102191103302 34062000000 34063701100 3997228928 3998930028
+102189000000 102194103476 34063000000 34064701158 3998228928 3999930086
+102192000000 102197103540 34064000000 34065701180 3999228928 4000930108
+102195000000 102200103747 34065000000 34066701249 4000228928 4001930177
+102198000000 102203103928 34066000000 34067701309 4001228928 4002930237
+102201000000 102206104077 34067000000 34068701359 4002228928 4003930287
+102204000000 102209104134 34068000000 34069701378 4003228928 4004930306
+102207000000 102212104330 34069000000 34070701443 4004228928 4005930371
+102210000000 102215104520 34070000000 34071701506 4005228928 4006930434
+102213000000 102218104665 34071000000 34072701555 4006228928 4007930483
+102216000000 102221104837 34072000000 34073701612 4007228928 4008930540
+102219000000 102224104970 34073000000 34074701656 4008228928 4009930584
+102222000000 102227105041 34074000000 34075701680 4009228928 4010930608
+102225000000 102230105267 34075000000 34076701755 4010228928 4011930683
+102228000000 102233105427 34076000000 34077701809 4011228928 4012930737
+102231000000 102236105559 34077000000 34078701853 4012228928 4013930781
+102234000000 102239105667 34078000000 34079701889 4013228928 4014930817
+102237000000 102242105878 34079000000 34080701959 4014228928 4015930887
+102240000000 102245106044 34080000000 34081702014 4015228928 4016930942
+102243000000 102248106155 34081000000 34082702051 4016228928 4017930979
+102246000000 102251106315 34082000000 34083702105 4017228928 4018931033
+102249000000 102254106427 34083000000 34084702142 4018228928 4019931070
+102252000000 102257106625 34084000000 34085702208 4019228928 4020931136
+102255000000 102260106715 34085000000 34086702238 4020228928 4021931166
+102258000000 102263106940 34086000000 34087702313 4021228928 4022931241
+102261000000 102266107072 34087000000 34088702357 4022228928 4023931285
+102264000000 102269107211 34088000000 34089702403 4023228928 4024931331
+102267000000 102272107262 34089000000 34090702420 4024228928 4025931348
+102270000000 102275107473 34090000000 34091702491 4025228928 4026931419
+102273000000 102278107682 34091000000 34092702560 4026228928 4027931488
+102276000000 102281107810 34092000000 34093702603 4027228928 4028931531
+102279000000 102284107953 34093000000 34094702651 4028228928 4029931579
+102282000000 102287108124 34094000000 34095702708 4029228928 4030931636
+102285000000 102290108221 34095000000 34096702740 4030228928 4031931668
+102288000000 102293108434 34096000000 34097702811 4031228928 4032931739
+102291000000 102296108564 34097000000 34098702854 4032228928 4033931782
+102294000000 102299108714 34098000000 34099702904 4033228928 4034931832
+102297000000 102302108874 34099000000 34100702958 4034228928 4035931886
+102300000000 102305108970 34100000000 34101702990 4035228928 4036931918
+102303000000 102308109158 34101000000 34102703052 4036228928 4037931980
+102306000000 102311109326 34102000000 34103703108 4037228928 4038932036
+102309000000 102314109462 34103000000 34104703154 4038228928 4039932082
+102312000000 102317109637 34104000000 34105703212 4039228928 4040932140
+102315000000 102320109759 34105000000 34106703253 4040228928 4041932181
+102318000000 102323109909 34106000000 34107703303 4041228928 4042932231
+102321000000 102326110057 34107000000 34108703352 4042228928 4043932280
+102324000000 102329110263 34108000000 34109703421 4043228928 4044932349
+102327000000 102332110377 34109000000 34110703459 4044228928 4045932387
+102330000000 102335110509 34110000000 34111703503 4045228928 4046932431
+102333000000 102338110683 34111000000 34112703561 4046228928 4047932489
+102336000000 102341110802 34112000000 34113703600 4047228928 4048932528
+102339000000 102344110926 34113000000 34114703642 4048228928 4049932570
+102342000000 102347111145 34114000000 34115703715 4049228928 4050932643
+102345000000 102350111281 34115000000 34116703760 4050228928 4051932688
+102348000000 102353111432 34116000000 34117703810 4051228928 4052932738
+102351000000 102356111592 34117000000 34118703864 4052228928 4053932792
+102354000000 102359111713 34118000000 34119703904 4053228928 4054932832
+102357000000 102362111794 34119000000 34120703931 4054228928 4055932859
+102360000000 102365112002 34120000000 34121704000 4055228928 4056932928
+102363000000 102368112157 34121000000 34122704052 4056228928 4057932980
+102366000000 102371112316 34122000000 34123704105 4057228928 4058933033
+102369000000 102374112468 34123000000 34124704156 4058228928 4059933084
+102372000000 102377112590 34124000000 34125704196 4059228928 4060933124
+102375000000 102380112768 34125000000 34126704256 4060228928 4061933184
+102378000000 102383112917 34126000000 34127704305 4061228928 4062933233
+102381000000 102386113045 34127000000 34128704348 4062228928 4063933276
+102384000000 102389113214 34128000000 34129704404 4063228928 4064933332
+102387000000 102392113334 34129000000 34130704444 4064228928 4065933372
+102390000000 102395113261 34130000000 34131704420 4065228928 4066933348
+102393000000 102398113584 34131000000 34132704528 4066228928 4067933456
+102396000000 102401113837 34132000000 34133704612 4067228928 4068933540
+102399000000 102404113947 34133000000 34134704649 4068228928 4069933577
+102402000000 102407114126 34134000000 34135704708 4069228928 4070933636
+102405000000 102410114174 34135000000 34136704724 4070228928 4071933652
+102408000000 102413114428 34136000000 34137704809 4071228928 4072933737
+102411000000 102416114547 34137000000 34138704849 4072228928 4073933777
+102414000000 102419114718 34138000000 34139704906 4073228928 4074933834
+102417000000 102422114865 34139000000 34140704955 4074228928 4075933883
+102420000000 102425115018 34140000000 34141705006 4075228928 4076933934
+102423000000 102428115164 34141000000 34142705054 4076228928 4077933982
+102426000000 102431115308 34142000000 34143705102 4077228928 4078934030
+102429000000 102434115471 34143000000 34144705157 4078228928 4079934085
+102432000000 102437115623 34144000000 34145705207 4079228928 4080934135
+102435000000 102440115777 34145000000 34146705259 4080228928 4081934187
+102438000000 102443115897 34146000000 34147705299 4081228928 4082934227
+102441000000 102446116106 34147000000 34148705368 4082228928 4083934296
+102444000000 102449116236 34148000000 34149705412 4083228928 4084934340
+102447000000 102452116350 34149000000 34150705450 4084228928 4085934378
+102450000000 102455116511 34150000000 34151705503 4085228928 4086934431
+102453000000 102458116646 34151000000 34152705548 4086228928 4087934476
+102456000000 102461116789 34152000000 34153705596 4087228928 4088934524
+102459000000 102464116889 34153000000 34154705629 4088228928 4089934557
+102462000000 102467117123 34154000000 34155705707 4089228928 4090934635
+102465000000 102470117196 34155000000 34156705732 4090228928 4091934660
+102468000000 102473117317 34156000000 34157705772 4091228928 4092934700
+102471000000 102476117506 34157000000 34158705835 4092228928 4093934763
+102474000000 102479117660 34158000000 34159705886 4093228928 4094934814
+102477000000 102482117839 34159000000 34160705946 4094228928 4095934874
+102480000000 102485117985 34160000000 34161705995 4095228928 4096934923
+102483000000 102488118112 34161000000 34162706037 4096228928 4097934965
+102486000000 102491118286 34162000000 34163706095 4097228928 4098935023
+102489000000 102494118350 34163000000 34164706116 4098228928 4099935044
+102492000000 102497118557 34164000000 34165706185 4099228928 4100935113
+102495000000 102500118738 34165000000 34166706246 4100228928 4101935174
+102498000000 102503118887 34166000000 34167706295 4101228928 4102935223
+102501000000 102506118944 34167000000 34168706314 4102228928 4103935242
+102504000000 102509119140 34168000000 34169706380 4103228928 4104935308
+102507000000 102512119330 34169000000 34170706443 4104228928 4105935371
+102510000000 102515119475 34170000000 34171706491 4105228928 4106935419
+102513000000 102518119647 34171000000 34172706549 4106228928 4107935477
+102516000000 102521119780 34172000000 34173706593 4107228928 4108935521
+102519000000 102524119851 34173000000 34174706617 4108228928 4109935545
+102522000000 102527120077 34174000000 34175706692 4109228928 4110935620
+102525000000 102530120237 34175000000 34176706745 4110228928 4111935673
+102528000000 102533120369 34176000000 34177706789 4111228928 4112935717
+102531000000 102536120477 34177000000 34178706825 4112228928 4113935753
+102534000000 102539120688 34178000000 34179706896 4113228928 4114935824
+102537000000 102542120854 34179000000 34180706951 4114228928 4115935879
+102540000000 102545120965 34180000000 34181706988 4115228928 4116935916
+102543000000 102548121125 34181000000 34182707041 4116228928 4117935969
+102546000000 102551121237 34182000000 34183707079 4117228928 4118936007
+102549000000 102554121435 34183000000 34184707145 4118228928 4119936073
+102552000000 102557121525 34184000000 34185707175 4119228928 4120936103
+102555000000 102560121750 34185000000 34186707250 4120228928 4121936178
+102558000000 102563121882 34186000000 34187707294 4121228928 4122936222
+102561000000 102566122021 34187000000 34188707340 4122228928 4123936268
+102564000000 102569122072 34188000000 34189707357 4123228928 4124936285
+102567000000 102572122283 34189000000 34190707427 4124228928 4125936355
+102570000000 102575122492 34190000000 34191707497 4125228928 4126936425
+102573000000 102578122620 34191000000 34192707540 4126228928 4127936468
+102576000000 102581122763 34192000000 34193707587 4127228928 4128936515
+102579000000 102584122934 34193000000 34194707644 4128228928 4129936572
+102582000000 102587123031 34194000000 34195707677 4129228928 4130936605
+102585000000 102590123244 34195000000 34196707748 4130228928 4131936676
+102588000000 102593123374 34196000000 34197707791 4131228928 4132936719
+102591000000 102596123524 34197000000 34198707841 4132228928 4133936769
+102594000000 102599123684 34198000000 34199707894 4133228928 4134936822
+102597000000 102602123780 34199000000 34200707926 4134228928 4135936854
+102600000000 102605123968 34200000000 34201707989 4135228928 4136936917
+102603000000 102608124136 34201000000 34202708045 4136228928 4137936973
+102606000000 102611124272 34202000000 34203708090 4137228928 4138937018
+102609000000 102614124447 34203000000 34204708149 4138228928 4139937077
+102612000000 102617124569 34204000000 34205708189 4139228928 4140937117
+102615000000 102620124719 34205000000 34206708239 4140228928 4141937167
+102618000000 102623124867 34206000000 34207708289 4141228928 4142937217
+102621000000 102626125073 34207000000 34208708357 4142228928 4143937285
+102624000000 102629125187 34208000000 34209708395 4143228928 4144937323
+102627000000 102632125319 34209000000 34210708439 4144228928 4145937367
+102630000000 102635125493 34210000000 34211708497 4145228928 4146937425
+102633000000 102638125612 34211000000 34212708537 4146228928 4147937465
+102636000000 102641125736 34212000000 34213708578 4147228928 4148937506
+102639000000 102644125955 34213000000 34214708651 4148228928 4149937579
+102642000000 102647126091 34214000000 34215708697 4149228928 4150937625
+102645000000 102650126242 34215000000 34216708747 4150228928 4151937675
+102648000000 102653126402 34216000000 34217708800 4151228928 4152937728
+102651000000 102656126523 34217000000 34218708841 4152228928 4153937769
+102654000000 102659126604 34218000000 34219708868 4153228928 4154937796
+102657000000 102662126812 34219000000 34220708937 4154228928 4155937865
+102660000000 102665126967 34220000000 34221708989 4155228928 4156937917
+102663000000 102668127126 34221000000 34222709042 4156228928 4157937970
+102666000000 102671127278 34222000000 34223709092 4157228928 4158938020
+102669000000 102674127400 34223000000 34224709133 4158228928 4159938061
+102672000000 102677127578 34224000000 34225709192 4159228928 4160938120
+102675000000 102680127727 34225000000 34226709242 4160228928 4161938170
+102678000000 102683127855 34226000000 34227709285 4161228928 4162938213
+102681000000 102686128024 34227000000 34228709341 4162228928 4163938269
+102684000000 102689128144 34228000000 34229709381 4163228928 4164938309
+102687000000 102692128071 34229000000 34230709357 4164228928 4165938285
+102690000000 102695128394 34230000000 34231709464 4165228928 4166938392
+102693000000 102698128647 34231000000 34232709549 4166228928 4167938477
+102696000000 102701128757 34232000000 34233709585 4167228928 4168938513
+102699000000 102704128936 34233000000 34234709645 4168228928 4169938573
+102702000000 102707128984 34234000000 34235709661 4169228928 4170938589
+102705000000 102710129238 34235000000 34236709746 4170228928 4171938674
+102708000000 102713129357 34236000000 34237709785 4171228928 4172938713
+102711000000 102716129528 34237000000 34238709842 4172228928 4173938770
+102714000000 102719129675 34238000000 34239709891 4173228928 4174938819
+102717000000 102722129828 34239000000 34240709942 4174228928 4175938870
+102720000000 102725129974 34240000000 34241709991 4175228928 4176938919
+102723000000 102728130118 34241000000 34242710039 4176228928 4177938967
+102726000000 102731130281 34242000000 34243710093 4177228928 4178939021
+102729000000 102734130433 34243000000 34244710144 4178228928 4179939072
+102732000000 102737130587 34244000000 34245710195 4179228928 4180939123
+102735000000 102740130707 34245000000 34246710235 4180228928 4181939163
+102738000000 102743130916 34246000000 34247710305 4181228928 4182939233
+102741000000 102746131046 34247000000 34248710348 4182228928 4183939276
+102744000000 102749131160 34248000000 34249710386 4183228928 4184939314
+102747000000 102752131321 34249000000 34250710440 4184228928 4185939368
+102750000000 102755131456 34250000000 34251710485 4185228928 4186939413
+102753000000 102758131599 34251000000 34252710533 4186228928 4187939461
+102756000000 102761131699 34252000000 34253710566 4187228928 4188939494
+102759000000 102764131933 34253000000 34254710644 4188228928 4189939572
+102762000000 102767132006 34254000000 34255710668 4189228928 4190939596
+102765000000 102770132127 34255000000 34256710709 4190228928 4191939637
+102768000000 102773132316 34256000000 34257710772 4191228928 4192939700
+102771000000 102776132470 34257000000 34258710823 4192228928 4193939751
+102774000000 102779132649 34258000000 34259710883 4193228928 4194939811
+102777000000 102782132795 34259000000 34260710931 4194228928 4195939859
+102780000000 102785132922 34260000000 34261710974 4195228928 4196939902
+102783000000 102788133096 34261000000 34262711032 4196228928 4197939960
+102786000000 102791133160 34262000000 34263711053 4197228928 4198939981
+102789000000 102794133367 34263000000 34264711122 4198228928 4199940050
+102792000000 102797133548 34264000000 34265711182 4199228928 4200940110
+102795000000 102800133697 34265000000 34266711232 4200228928 4201940160
+102798000000 102803133754 34266000000 34267711251 4201228928 4202940179
+102801000000 102806133950 34267000000 34268711316 4202228928 4203940244
+102804000000 102809134140 34268000000 34269711380 4203228928 4204940308
+102807000000 102812134285 34269000000 34270711428 4204228928 4205940356
+102810000000 102815134457 34270000000 34271711485 4205228928 4206940413
+102813000000 102818134590 34271000000 34272711530 4206228928 4207940458
+102816000000 102821134661 34272000000 34273711553 4207228928 4208940481
+102819000000 102824134887 34273000000 34274711629 4208228928 4209940557
+102822000000 102827135047 34274000000 34275711682 4209228928 4210940610
+102825000000 102830135179 34275000000 34276711726 4210228928 4211940654
+102828000000 102833135287 34276000000 34277711762 4211228928 4212940690
+102831000000 102836135498 34277000000 34278711832 4212228928 4213940760
+102834000000 102839135664 34278000000 34279711888 4213228928 4214940816
+102837000000 102842135775 34279000000 34280711925 4214228928 4215940853
+102840000000 102845135935 34280000000 34281711978 4215228928 4216940906
+102843000000 102848136047 34281000000 34282712015 4216228928 4217940943
+102846000000 102851136245 34282000000 34283712081 4217228928 4218941009
+102849000000 102854136335 34283000000 34284712111 4218228928 4219941039
+102852000000 102857136560 34284000000 34285712186 4219228928 4220941114
+102855000000 102860136692 34285000000 34286712230 4220228928 4221941158
+102858000000 102863136831 34286000000 34287712277 4221228928 4222941205
+102861000000 102866136882 34287000000 34288712294 4222228928 4223941222
+102864000000 102869137093 34288000000 34289712364 4223228928 4224941292
+102867000000 102872137302 34289000000 34290712434 4224228928 4225941362
+102870000000 102875137430 34290000000 34291712476 4225228928 4226941404
+102873000000 102878137573 34291000000 34292712524 4226228928 4227941452
+102876000000 102881137744 34292000000 34293712581 4227228928 4228941509
+102879000000 102884137841 34293000000 34294712613 4228228928 4229941541
+102882000000 102887138054 34294000000 34295712684 4229228928 4230941612
+102885000000 102890138184 34295000000 34296712728 4230228928 4231941656
+102888000000 102893138334 34296000000 34297712778 4231228928 4232941706
+102891000000 102896138494 34297000000 34298712831 4232228928 4233941759
+102894000000 102899138590 34298000000 34299712863 4233228928 4234941791
+102897000000 102902138778 34299000000 34300712926 4234228928 4235941854
+102900000000 102905138946 34300000000 34301712982 4235228928 4236941910
+102903000000 102908139082 34301000000 34302713027 4236228928 4237941955
+102906000000 102911139257 34302000000 34303713085 4237228928 4238942013
+102909000000 102914139379 34303000000 34304713126 4238228928 4239942054
+102912000000 102917139529 34304000000 34305713176 4239228928 4240942104
+102915000000 102920139677 34305000000 34306713225 4240228928 4241942153
+102918000000 102923139883 34306000000 34307713294 4241228928 4242942222
+102921000000 102926139997 34307000000 34308713332 4242228928 4243942260
+102924000000 102929140129 34308000000 34309713376 4243228928 4244942304
+102927000000 102932140303 34309000000 34310713434 4244228928 4245942362
+102930000000 102935140422 34310000000 34311713474 4245228928 4246942402
+102933000000 102938140546 34311000000 34312713515 4246228928 4247942443
+102936000000 102941140765 34312000000 34313713588 4247228928 4248942516
+102939000000 102944140901 34313000000 34314713633 4248228928 4249942561
+102942000000 102947141052 34314000000 34315713684 4249228928 4250942612
+102945000000 102950141212 34315000000 34316713737 4250228928 4251942665
+102948000000 102953141333 34316000000 34317713777 4251228928 4252942705
+102951000000 102956141414 34317000000 34318713804 4252228928 4253942732
+102954000000 102959141622 34318000000 34319713874 4253228928 4254942802
+102957000000 102962141777 34319000000 34320713925 4254228928 4255942853
+102960000000 102965141936 34320000000 34321713978 4255228928 4256942906
+102963000000 102968142088 34321000000 34322714029 4256228928 4257942957
+102966000000 102971142210 34322000000 34323714070 4257228928 4258942998
+102969000000 102974142388 34323000000 34324714129 4258228928 4259943057
+102972000000 102977142537 34324000000 34325714179 4259228928 4260943107
+102975000000 102980142665 34325000000 34326714221 4260228928 4261943149
+102978000000 102983142834 34326000000 34327714278 4261228928 4262943206
+102981000000 102986142954 34327000000 34328714318 4262228928 4263943246
+102984000000 102989142881 34328000000 34329714293 4263228928 4264943221
+102987000000 102992143204 34329000000 34330714401 4264228928 4265943329
+102990000000 102995143457 34330000000 34331714485 4265228928 4266943413
+102993000000 102998143567 34331000000 34332714522 4266228928 4267943450
+102996000000 103001143746 34332000000 34333714582 4267228928 4268943510
+102999000000 103004143794 34333000000 34334714598 4268228928 4269943526
+103002000000 103007144048 34334000000 34335714682 4269228928 4270943610
+103005000000 103010144167 34335000000 34336714722 4270228928 4271943650
+103008000000 103013144338 34336000000 34337714779 4271228928 4272943707
+103011000000 103016144485 34337000000 34338714828 4272228928 4273943756
+103014000000 103019144638 34338000000 34339714879 4273228928 4274943807
+103017000000 103022144784 34339000000 34340714928 4274228928 4275943856
+103020000000 103025144928 34340000000 34341714976 4275228928 4276943904
+103023000000 103028145091 34341000000 34342715030 4276228928 4277943958
+103026000000 103031145243 34342000000 34343715081 4277228928 4278944009
+103029000000 103034145397 34343000000 34344715132 4278228928 4279944060
+103032000000 103037145517 34344000000 34345715172 4279228928 4280944100
+103035000000 103040145726 34345000000 34346715242 4280228928 4281944170
+103038000000 103043145856 34346000000 34347715285 4281228928 4282944213
+103041000000 103046145970 34347000000 34348715323 4282228928 4283944251
+103044000000 103049146131 34348000000 34349715377 4283228928 4284944305
+103047000000 103052146266 34349000000 34350715422 4284228928 4285944350
+103050000000 103055146409 34350000000 34351715469 4285228928 4286944397
+103053000000 103058146509 34351000000 34352715503 4286228928 4287944431
+103056000000 103061146743 34352000000 34353715581 4287228928 4288944509
+103059000000 103064146816 34353000000 34354715605 4288228928 4289944533
+103062000000 103067146937 34354000000 34355715645 4289228928 4290944573
+103065000000 103070147126 34355000000 34356715708 4290228928 4291944636
+103068000000 103073147280 34356000000 34357715760 4291228928 4292944688
+103071000000 103076147459 34357000000 34358715819 4292228928 4293944747
+103074000000 103079147605 34358000000 34359715868 4293228928 4294944796
+103077000000 103082147732 34359000000 34360715910 4294228928 977542
+103080000000 103085147906 34360000000 34361715968 261632 1977600
+103083000000 103088147970 34361000000 34362715990 1261632 2977622
+103086000000 103091148177 34362000000 34363716059 2261632 3977691
+103089000000 103094148358 34363000000 34364716119 3261632 4977751
+103092000000 103097148507 34364000000 34365716169 4261632 5977801
+103095000000 103100148564 34365000000 34366716188 5261632 6977820
+103098000000 103103148760 34366000000 34367716253 6261632 7977885
+103101000000 103106148950 34367000000 34368716316 7261632 8977948
+103104000000 103109149095 34368000000 34369716365 8261632 9977997
+103107000000 103112149267 34369000000 34370716422 9261632 10978054
+103110000000 103115149400 34370000000 34371716466 10261632 11978098
+103113000000 103118149471 34371000000 34372716490 11261632 12978122
+103116000000 103121149697 34372000000 34373716565 12261632 13978197
+103119000000 103124149857 34373000000 34374716619 13261632 14978251
+103122000000 103127149989 34374000000 34375716663 14261632 15978295
+103125000000 103130150097 34375000000 34376716699 15261632 16978331
+103128000000 103133150308 34376000000 34377716769 16261632 17978401
+103131000000 103136150474 34377000000 34378716824 17261632 18978456
+103134000000 103139150585 34378000000 34379716861 18261632 19978493
+103137000000 103142150745 34379000000 34380716915 19261632 20978547
+103140000000 103145150857 34380000000 34381716952 20261632 21978584
+103143000000 103148151055 34381000000 34382717018 21261632 22978650
+103146000000 103151151145 34382000000 34383717048 22261632 23978680
+103149000000 103154151370 34383000000 34384717123 23261632 24978755
+103152000000 103157151502 34384000000 34385717167 24261632 25978799
+103155000000 103160151641 34385000000 34386717213 25261632 26978845
+103158000000 103163151692 34386000000 34387717230 26261632 27978862
+103161000000 103166151903 34387000000 34388717301 27261632 28978933
+103164000000 103169152112 34388000000 34389717370 28261632 29979002
+103167000000 103172152240 34389000000 34390717413 29261632 30979045
+103170000000 103175152383 34390000000 34391717461 30261632 31979093
+103173000000 103178152554 34391000000 34392717518 31261632 32979150
+103176000000 103181152651 34392000000 34393717550 32261632 33979182
+103179000000 103184152864 34393000000 34394717621 33261632 34979253
+103182000000 103187152994 34394000000 34395717664 34261632 35979296
+103185000000 103190153144 34395000000 34396717714 35261632 36979346
+103188000000 103193153304 34396000000 34397717768 36261632 37979400
+103191000000 103196153400 34397000000 34398717800 37261632 38979432
+103194000000 103199153588 34398000000 34399717862 38261632 39979494
+103197000000 103202153756 34399000000 34400717918 39261632 40979550
+103200000000 103205153892 34400000000 34401717964 40261632 41979596
+103203000000 103208154067 34401000000 34402718022 41261632 42979654
+103206000000 103211154189 34402000000 34403718063 42261632 43979695
+103209000000 103214154339 34403000000 34404718113 43261632 44979745
+103212000000 103217154487 34404000000 34405718162 44261632 45979794
+103215000000 103220154693 34405000000 34406718231 45261632 46979863
+103218000000 103223154807 34406000000 34407718269 46261632 47979901
+103221000000 103226154939 34407000000 34408718313 47261632 48979945
+103224000000 103229155113 34408000000 34409718371 48261632 49980003
+103227000000 103232155232 34409000000 34410718410 49261632 50980042
+103230000000 103235155356 34410000000 34411718452 50261632 51980084
+103233000000 103238155575 34411000000 34412718525 51261632 52980157
+103236000000 103241155711 34412000000 34413718570 52261632 53980202
+103239000000 103244155862 34413000000 34414718620 53261632 54980252
+103242000000 103247156022 34414000000 34415718674 54261632 55980306
+103245000000 103250156143 34415000000 34416718714 55261632 56980346
+103248000000 103253156224 34416000000 34417718741 56261632 57980373
+103251000000 103256156432 34417000000 34418718810 57261632 58980442
+103254000000 103259156587 34418000000 34419718862 58261632 59980494
+103257000000 103262156746 34419000000 34420718915 59261632 60980547
+103260000000 103265156898 34420000000 34421718966 60261632 61980598
+103263000000 103268157020 34421000000 34422719006 61261632 62980638
+103266000000 103271157198 34422000000 34423719066 62261632 63980698
+103269000000 103274157347 34423000000 34424719115 63261632 64980747
+103272000000 103277157475 34424000000 34425719158 64261632 65980790
+103275000000 103280157644 34425000000 34426719214 65261632 66980846
+103278000000 103283157764 34426000000 34427719254 66261632 67980886
+103281000000 103286157691 34427000000 34428719230 67261632 68980862
+103284000000 103289158014 34428000000 34429719338 68261632 69980970
+103287000000 103292158267 34429000000 34430719422 69261632 70981054
+103290000000 103295158377 34430000000 34431719459 70261632 71981091
+103293000000 103298158556 34431000000 34432719518 71261632 72981150
+103296000000 103301158604 34432000000 34433719534 72261632 73981166
+103299000000 103304158858 34433000000 34434719619 73261632 74981251
+103302000000 103307158977 34434000000 34435719659 74261632 75981291
+103305000000 103310159148 34435000000 34436719716 75261632 76981348
+103308000000 103313159295 34436000000 34437719765 76261632 77981397
+103311000000 103316159448 34437000000 34438719816 77261632 78981448
+103314000000 103319159594 34438000000 34439719864 78261632 79981496
+103317000000 103322159738 34439000000 34440719912 79261632 80981544
+103320000000 103325159901 34440000000 34441719967 80261632 81981599
+103323000000 103328160053 34441000000 34442720017 81261632 82981649
+103326000000 103331160207 34442000000 34443720069 82261632 83981701
+103329000000 103334160327 34443000000 34444720109 83261632 84981741
+103332000000 103337160536 34444000000 34445720178 84261632 85981810
+103335000000 103340160666 34445000000 34446720222 85261632 86981854
+103338000000 103343160780 34446000000 34447720260 86261632 87981892
+103341000000 103346160941 34447000000 34448720313 87261632 88981945
+103344000000 103349161076 34448000000 34449720358 88261632 89981990
+103347000000 103352161219 34449000000 34450720406 89261632 90982038
+103350000000 103355161319 34450000000 34451720439 90261632 91982071
+103353000000 103358161553 34451000000 34452720517 91261632 92982149
+103356000000 103361161626 34452000000 34453720542 92261632 93982174
+103359000000 103364161747 34453000000 34454720582 93261632 94982214
+103362000000 103367161936 34454000000 34455720645 94261632 95982277
+103365000000 103370162090 34455000000 34456720696 95261632 96982328
+103368000000 103373162269 34456000000 34457720756 96261632 97982388
+103371000000 103376162415 34457000000 34458720805 97261632 98982437
+103374000000 103379162542 34458000000 34459720847 98261632 99982479
+103377000000 103382162716 34459000000 34460720905 99261632 100982537
+103380000000 103385162780 34460000000 34461720926 100261632 101982558
+103383000000 103388162987 34461000000 34462720995 101261632 102982627
+103386000000 103391163168 34462000000 34463721056 102261632 103982688
+103389000000 103394163317 34463000000 34464721105 103261632 104982737
+103392000000 103397163374 34464000000 34465721124 104261632 105982756
+103395000000 103400163570 34465000000 34466721190 105261632 106982822
+103398000000 103403163760 34466000000 34467721253 106261632 107982885
+103401000000 103406163905 34467000000 34468721301 107261632 108982933
+103404000000 103409164077 34468000000 34469721359 108261632 109982991
+103407000000 103412164210 34469000000 34470721403 109261632 110983035
+103410000000 103415164281 34470000000 34471721427 110261632 111983059
+103413000000 103418164507 34471000000 34472721502 111261632 112983134
+103416000000 103421164667 34472000000 34473721555 112261632 113983187
+103419000000 103424164799 34473000000 34474721599 113261632 114983231
+103422000000 103427164907 34474000000 34475721635 114261632 115983267
+103425000000 103430165118 34475000000 34476721706 115261632 116983338
+103428000000 103433165284 34476000000 34477721761 116261632 117983393
+103431000000 103436165395 34477000000 34478721798 117261632 118983430
+103434000000 103439165555 34478000000 34479721851 118261632 119983483
+103437000000 103442165667 34479000000 34480721889 119261632 120983521
+103440000000 103445165865 34480000000 34481721955 120261632 121983587
+103443000000 103448165955 34481000000 34482721985 121261632 122983617
+103446000000 103451166180 34482000000 34483722060 122261632 123983692
+103449000000 103454166312 34483000000 34484722104 123261632 124983736
+103452000000 103457166451 34484000000 34485722150 124261632 125983782
+103455000000 103460166502 34485000000 34486722167 125261632 126983799
+103458000000 103463166713 34486000000 34487722237 126261632 127983869
+103461000000 103466166922 34487000000 34488722307 127261632 128983939
+103464000000 103469167050 34488000000 34489722350 128261632 129983982
+103467000000 103472167193 34489000000 34490722397 129261632 130984029
+103470000000 103475167364 34490000000 34491722454 130261632 131984086
+103473000000 103478167461 34491000000 34492722487 131261632 132984119
+103476000000 103481167674 34492000000 34493722558 132261632 133984190
+103479000000 103484167804 34493000000 34494722601 133261632 134984233
+103482000000 103487167954 34494000000 34495722651 134261632 135984283
+103485000000 103490168114 34495000000 34496722704 135261632 136984336
+103488000000 103493168210 34496000000 34497722736 136261632 137984368
+103491000000 103496168398 34497000000 34498722799 137261632 138984431
+103494000000 103499168566 34498000000 34499722855 138261632 139984487
+103497000000 103502168702 34499000000 34500722900 139261632 140984532
+103500000000 103505168877 34500000000 34501722959 140261632 141984591
+103503000000 103508168999 34501000000 34502722999 141261632 142984631
+103506000000 103511169149 34502000000 34503723049 142261632 143984681
+103509000000 103514169297 34503000000 34504723099 143261632 144984731
+103512000000 103517169503 34504000000 34505723167 144261632 145984799
+103515000000 103520169617 34505000000 34506723205 145261632 146984837
+103518000000 103523169749 34506000000 34507723249 146261632 147984881
+103521000000 103526169923 34507000000 34508723307 147261632 148984939
+103524000000 103529170042 34508000000 34509723347 148261632 149984979
+103527000000 103532170166 34509000000 34510723388 149261632 150985020
+103530000000 103535170385 34510000000 34511723461 150261632 151985093
+103533000000 103538170521 34511000000 34512723507 151261632 152985139
+103536000000 103541170672 34512000000 34513723557 152261632 153985189
+103539000000 103544170832 34513000000 34514723610 153261632 154985242
+103542000000 103547170953 34514000000 34515723651 154261632 155985283
+103545000000 103550171034 34515000000 34516723678 155261632 156985310
+103548000000 103553171242 34516000000 34517723747 156261632 157985379
+103551000000 103556171397 34517000000 34518723799 157261632 158985431
+103554000000 103559171556 34518000000 34519723852 158261632 159985484
+103557000000 103562171708 34519000000 34520723902 159261632 160985534
+103560000000 103565171830 34520000000 34521723943 160261632 161985575
+103563000000 103568172008 34521000000 34522724002 161261632 162985634
+103566000000 103571172157 34522000000 34523724052 162261632 163985684
+103569000000 103574172285 34523000000 34524724095 163261632 164985727
+103572000000 103577172454 34524000000 34525724151 164261632 165985783
+103575000000 103580172574 34525000000 34526724191 165261632 166985823
+103578000000 103583172501 34526000000 34527724167 166261632 167985799
+103581000000 103586172824 34527000000 34528724274 167261632 168985906
+103584000000 103589173077 34528000000 34529724359 168261632 169985991
+103587000000 103592173187 34529000000 34530724395 169261632 170986027
+103590000000 103595173366 34530000000 34531724455 170261632 171986087
+103593000000 103598173414 34531000000 34532724471 171261632 172986103
+103596000000 103601173668 34532000000 34533724556 172261632 173986188
+103599000000 103604173787 34533000000 34534724595 173261632 174986227
+103602000000 103607173958 34534000000 34535724652 174261632 175986284
+103605000000 103610174105 34535000000 34536724701 175261632 176986333
+103608000000 103613174258 34536000000 34537724752 176261632 177986384
+103611000000 103616174404 34537000000 34538724801 177261632 178986433
+103614000000 103619174548 34538000000 34539724849 178261632 179986481
+103617000000 103622174711 34539000000 34540724903 179261632 180986535
+103620000000 103625174863 34540000000 34541724954 180261632 181986586
+103623000000 103628175017 34541000000 34542725005 181261632 182986637
+103626000000 103631175137 34542000000 34543725045 182261632 183986677
+103629000000 103634175346 34543000000 34544725115 183261632 184986747
+103632000000 103637175476 34544000000 34545725158 184261632 185986790
+103635000000 103640175590 34545000000 34546725196 185261632 186986828
+103638000000 103643175751 34546000000 34547725250 186261632 187986882
+103641000000 103646175886 34547000000 34548725295 187261632 188986927
+103644000000 103649176029 34548000000 34549725343 188261632 189986975
+103647000000 103652176129 34549000000 34550725376 189261632 190987008
+103650000000 103655176363 34550000000 34551725454 190261632 191987086
+103653000000 103658176436 34551000000 34552725478 191261632 192987110
+103656000000 103661176557 34552000000 34553725519 192261632 193987151
+103659000000 103664176746 34553000000 34554725582 193261632 194987214
+103662000000 103667176900 34554000000 34555725633 194261632 195987265
+103665000000 103670177079 34555000000 34556725693 195261632 196987325
+103668000000 103673177225 34556000000 34557725741 196261632 197987373
+103671000000 103676177352 34557000000 34558725784 197261632 198987416
+103674000000 103679177526 34558000000 34559725842 198261632 199987474
+103677000000 103682177590 34559000000 34560725863 199261632 200987495
+103680000000 103685177797 34560000000 34561725932 200261632 201987564
+103683000000 103688177978 34561000000 34562725992 201261632 202987624
+103686000000 103691178127 34562000000 34563726042 202261632 203987674
+103689000000 103694178184 34563000000 34564726061 203261632 204987693
+103692000000 103697178380 34564000000 34565726126 204261632 205987758
+103695000000 103700178570 34565000000 34566726190 205261632 206987822
+103698000000 103703178715 34566000000 34567726238 206261632 207987870
+103701000000 103706178887 34567000000 34568726295 207261632 208987927
+103704000000 103709179020 34568000000 34569726340 208261632 209987972
+103707000000 103712179091 34569000000 34570726363 209261632 210987995
+103710000000 103715179317 34570000000 34571726439 210261632 211988071
+103713000000 103718179477 34571000000 34572726492 211261632 212988124
+103716000000 103721179609 34572000000 34573726536 212261632 213988168
+103719000000 103724179717 34573000000 34574726572 213261632 214988204
+103722000000 103727179928 34574000000 34575726642 214261632 215988274
+103725000000 103730180094 34575000000 34576726698 215261632 216988330
+103728000000 103733180205 34576000000 34577726735 216261632 217988367
+103731000000 103736180365 34577000000 34578726788 217261632 218988420
+103734000000 103739180477 34578000000 34579726825 218261632 219988457
+103737000000 103742180675 34579000000 34580726891 219261632 220988523
+103740000000 103745180765 34580000000 34581726921 220261632 221988553
+103743000000 103748180990 34581000000 34582726996 221261632 222988628
+103746000000 103751181122 34582000000 34583727040 222261632 223988672
+103749000000 103754181261 34583000000 34584727087 223261632 224988719
+103752000000 103757181312 34584000000 34585727104 224261632 225988736
+103755000000 103760181523 34585000000 34586727174 225261632 226988806
+103758000000 103763181732 34586000000 34587727244 226261632 227988876
+103761000000 103766181860 34587000000 34588727286 227261632 228988918
+103764000000 103769182003 34588000000 34589727334 228261632 229988966
+103767000000 103772182174 34589000000 34590727391 229261632 230989023
+103770000000 103775182271 34590000000 34591727423 230261632 231989055
+103773000000 103778182484 34591000000 34592727494 231261632 232989126
+103776000000 103781182614 34592000000 34593727538 232261632 233989170
+103779000000 103784182764 34593000000 34594727588 233261632 234989220
+103782000000 103787182924 34594000000 34595727641 234261632 235989273
+103785000000 103790183020 34595000000 34596727673 235261632 236989305
+103788000000 103793183208 34596000000 34597727736 236261632 237989368
+103791000000 103796183376 34597000000 34598727792 237261632 238989424
+103794000000 103799183512 34598000000 34599727837 238261632 239989469
+103797000000 103802183687 34599000000 34600727895 239261632 240989527
+103800000000 103805183809 34600000000 34601727936 240261632 241989568
+103803000000 103808183959 34601000000 34602727986 241261632 242989618
+103806000000 103811184107 34602000000 34603728035 242261632 243989667
+103809000000 103814184313 34603000000 34604728104 243261632 244989736
+103812000000 103817184427 34604000000 34605728142 244261632 245989774
+103815000000 103820184559 34605000000 34606728186 245261632 246989818
+103818000000 103823184733 34606000000 34607728244 246261632 247989876
+103821000000 103826184852 34607000000 34608728284 247261632 248989916
+103824000000 103829184976 34608000000 34609728325 248261632 249989957
+103827000000 103832185195 34609000000 34610728398 249261632 250990030
+103830000000 103835185331 34610000000 34611728443 250261632 251990075
+103833000000 103838185482 34611000000 34612728494 251261632 252990126
+103836000000 103841185642 34612000000 34613728547 252261632 253990179
+103839000000 103844185763 34613000000 34614728587 253261632 254990219
+103842000000 103847185844 34614000000 34615728614 254261632 255990246
+103845000000 103850186052 34615000000 34616728684 255261632 256990316
+103848000000 103853186207 34616000000 34617728735 256261632 257990367
+103851000000 103856186366 34617000000 34618728788 257261632 258990420
+103854000000 103859186518 34618000000 34619728839 258261632 259990471
+103857000000 103862186640 34619000000 34620728880 259261632 260990512
+103860000000 103865186818 34620000000 34621728939 260261632 261990571
+103863000000 103868186967 34621000000 34622728989 261261632 262990621
+103866000000 103871187095 34622000000 34623729031 262261632 263990663
+103869000000 103874187264 34623000000 34624729088 263261632 264990720
+103872000000 103877187384 34624000000 34625729128 264261632 265990760
+103875000000 103880187311 34625000000 34626729103 265261632 266990735
+103878000000 103883187634 34626000000 34627729211 266261632 267990843
+103881000000 103886187887 34627000000 34628729295 267261632 268990927
+103884000000 103889187997 34628000000 34629729332 268261632 269990964
+103887000000 103892188176 34629000000 34630729392 269261632 270991024
+103890000000 103895188224 34630000000 34631729408 270261632 271991040
+103893000000 103898188478 34631000000 34632729492 271261632 272991124
+103896000000 103901188597 34632000000 34633729532 272261632 273991164
+103899000000 103904188768 34633000000 34634729589 273261632 274991221
+103902000000 103907188915 34634000000 34635729638 274261632 275991270
+103905000000 103910189068 34635000000 34636729689 275261632 276991321
+103908000000 103913189214 34636000000 34637729738 276261632 277991370
+103911000000 103916189358 34637000000 34638729786 277261632 278991418
+103914000000 103919189521 34638000000 34639729840 278261632 279991472
+103917000000 103922189673 34639000000 34640729891 279261632 280991523
+103920000000 103925189827 34640000000 34641729942 280261632 281991574
+103923000000 103928189947 34641000000 34642729982 281261632 282991614
+103926000000 103931190156 34642000000 34643730052 282261632 283991684
+103929000000 103934190286 34643000000 34644730095 283261632 284991727
+103932000000 103937190400 34644000000 34645730133 284261632 285991765
+103935000000 103940190561 34645000000 34646730187 285261632 286991819
+103938000000 103943190696 34646000000 34647730232 286261632 287991864
+103941000000 103946190839 34647000000 34648730279 287261632 288991911
+103944000000 103949190939 34648000000 34649730313 288261632 289991945
+103947000000 103952191173 34649000000 34650730391 289261632 290992023
+103950000000 103955191246 34650000000 34651730415 290261632 291992047
+103953000000 103958191367 34651000000 34652730455 291261632 292992087
+103956000000 103961191556 34652000000 34653730518 292261632 293992150
+103959000000 103964191710 34653000000 34654730570 293261632 294992202
+103962000000 103967191889 34654000000 34655730629 294261632 295992261
+103965000000 103970192035 34655000000 34656730678 295261632 296992310
+103968000000 103973192162 34656000000 34657730720 296261632 297992352
+103971000000 103976192336 34657000000 34658730778 297261632 298992410
+103974000000 103979192400 34658000000 34659730800 298261632 299992432
+103977000000 103982192607 34659000000 34660730869 299261632 300992501
+103980000000 103985192788 34660000000 34661730929 300261632 301992561
+103983000000 103988192937 34661000000 34662730979 301261632 302992611
+103986000000 103991192994 34662000000 34663730998 302261632 303992630
+103989000000 103994193190 34663000000 34664731063 303261632 304992695
+103992000000 103997193380 34664000000 34665731126 304261632 305992758
+103995000000 104000193525 34665000000 34666731175 305261632 306992807
+103998000000 104003193697 34666000000 34667731232 306261632 307992864
+104001000000 104006193830 34667000000 34668731276 307261632 308992908
+104004000000 104009193901 34668000000 34669731300 308261632 309992932
+104007000000 104012194127 34669000000 34670731375 309261632 310993007
+104010000000 104015194287 34670000000 34671731429 310261632 311993061
+104013000000 104018194419 34671000000 34672731473 311261632 312993105
+104016000000 104021194527 34672000000 34673731509 312261632 313993141
+104019000000 104024194738 34673000000 34674731579 313261632 314993211
+104022000000 104027194904 34674000000 34675731634 314261632 315993266
+104025000000 104030195015 34675000000 34676731671 315261632 316993303
+104028000000 104033195175 34676000000 34677731725 316261632 317993357
+104031000000 104036195287 34677000000 34678731762 317261632 318993394
+104034000000 104039195485 34678000000 34679731828 318261632 319993460
+104037000000 104042195575 34679000000 34680731858 319261632 320993490
+104040000000 104045195800 34680000000 34681731933 320261632 321993565
+104043000000 104048195932 34681000000 34682731977 321261632 322993609
+104046000000 104051196071 34682000000 34683732023 322261632 323993655
+104049000000 104054196122 34683000000 34684732040 323261632 324993672
+104052000000 104057196333 34684000000 34685732111 324261632 325993743
+104055000000 104060196542 34685000000 34686732180 325261632 326993812
+104058000000 104063196670 34686000000 34687732223 326261632 327993855
+104061000000 104066196813 34687000000 34688732271 327261632 328993903
+104064000000 104069196984 34688000000 34689732328 328261632 329993960
+104067000000 104072197081 34689000000 34690732360 329261632 330993992
+104070000000 104075197294 34690000000 34691732431 330261632 331994063
+104073000000 104078197424 34691000000 34692732474 331261632 332994106
+104076000000 104081197574 34692000000 34693732524 332261632 333994156
+104079000000 104084197734 34693000000 34694732578 333261632 334994210
+104082000000 104087197830 34694000000 34695732610 334261632 335994242
+104085000000 104090198018 34695000000 34696732672 335261632 336994304
+104088000000 104093198186 34696000000 34697732728 336261632 337994360
+104091000000 104096198322 34697000000 34698732774 337261632 338994406
+104094000000 104099198497 34698000000 34699732832 338261632 339994464
+104097000000 104102198619 34699000000 34700732873 339261632 340994505
+104100000000 104105198769 34700000000 34701732923 340261632 341994555
+104103000000 104108198917 34701000000 34702732972 341261632 342994604
+104106000000 104111199123 34702000000 34703733041 342261632 343994673
+104109000000 104114199237 34703000000 34704733079 343261632 344994711
+104112000000 104117199369 34704000000 34705733123 344261632 345994755
+104115000000 104120199543 34705000000 34706733181 345261632 346994813
+104118000000 104123199662 34706000000 34707733220 346261632 347994852
+104121000000 104126199786 34707000000 34708733262 347261632 348994894
+104124000000 104129200005 34708000000 34709733335 348261632 349994967
+104127000000 104132200141 34709000000 34710733380 349261632 350995012
+104130000000 104135200292 34710000000 34711733430 350261632 351995062
+104133000000 104138200452 34711000000 34712733484 351261632 352995116
+104136000000 104141200573 34712000000 34713733524 352261632 353995156
+104139000000 104144200654 34713000000 34714733551 353261632 354995183
+104142000000 104147200862 34714000000 34715733620 354261632 355995252
+104145000000 104150201017 34715000000 34716733672 355261632 356995304
+104148000000 104153201176 34716000000 34717733725 356261632 357995357
+104151000000 104156201328 34717000000 34718733776 357261632 358995408
+104154000000 104159201450 34718000000 34719733816 358261632 359995448
+104157000000 104162201628 34719000000 34720733876 359261632 360995508
+104160000000 104165201777 34720000000 34721733925 360261632 361995557
+104163000000 104168201905 34721000000 34722733968 361261632 362995600
+104166000000 104171202074 34722000000 34723734024 362261632 363995656
+104169000000 104174202194 34723000000 34724734064 363261632 364995696
+104172000000 104177202121 34724000000 34725734040 364261632 365995672
+104175000000 104180202444 34725000000 34726734148 365261632 366995780
+104178000000 104183202697 34726000000 34727734232 366261632 367995864
+104181000000 104186202807 34727000000 34728734269 367261632 368995901
+104184000000 104189202986 34728000000 34729734328 368261632 369995960
+104187000000 104192203034 34729000000 34730734344 369261632 370995976
+104190000000 104195203288 34730000000 34731734429 370261632 371996061
+104193000000 104198203407 34731000000 34732734469 371261632 372996101
+104196000000 104201203578 34732000000 34733734526 372261632 373996158
+104199000000 104204203725 34733000000 34734734575 373261632 374996207
+104202000000 104207203878 34734000000 34735734626 374261632 375996258
+104205000000 104210204024 34735000000 34736734674 375261632 376996306
+104208000000 104213204168 34736000000 34737734722 376261632 377996354
+104211000000 104216204331 34737000000 34738734777 377261632 378996409
+104214000000 104219204483 34738000000 34739734827 378261632 379996459
+104217000000 104222204637 34739000000 34740734879 379261632 380996511
+104220000000 104225204757 34740000000 34741734919 380261632 381996551
+104223000000 104228204966 34741000000 34742734988 381261632 382996620
+104226000000 104231205096 34742000000 34743735032 382261632 383996664
+104229000000 104234205210 34743000000 34744735070 383261632 384996702
+104232000000 104237205371 34744000000 34745735123 384261632 385996755
+104235000000 104240205506 34745000000 34746735168 385261632 386996800
+104238000000 104243205649 34746000000 34747735216 386261632 387996848
+104241000000 104246205749 34747000000 34748735249 387261632 388996881
+104244000000 104249205983 34748000000 34749735327 388261632 389996959
+104247000000 104252206056 34749000000 34750735352 389261632 390996984
+104250000000 104255206177 34750000000 34751735392 390261632 391997024
+104253000000 104258206366 34751000000 34752735455 391261632 392997087
+104256000000 104261206520 34752000000 34753735506 392261632 393997138
+104259000000 104264206699 34753000000 34754735566 393261632 394997198
+104262000000 104267206845 34754000000 34755735615 394261632 395997247
+104265000000 104270206972 34755000000 34756735657 395261632 396997289
+104268000000 104273207146 34756000000 34757735715 396261632 397997347
+104271000000 104276207210 34757000000 34758735736 397261632 398997368
+104274000000 104279207417 34758000000 34759735805 398261632 399997437
+104277000000 104282207598 34759000000 34760735866 399261632 400997498
+104280000000 104285207747 34760000000 34761735915 400261632 401997547
+104283000000 104288207804 34761000000 34762735934 401261632 402997566
+104286000000 104291208000 34762000000 34763736000 402261632 403997632
+104289000000 104294208190 34763000000 34764736063 403261632 404997695
+104292000000 104297208335 34764000000 34765736111 404261632 405997743
+104295000000 104300208507 34765000000 34766736169 405261632 406997801
+104298000000 104303208640 34766000000 34767736213 406261632 407997845
+104301000000 104306208711 34767000000 34768736237 407261632 408997869
+104304000000 104309208937 34768000000 34769736312 408261632 409997944
+104307000000 104312209097 34769000000 34770736365 409261632 410997997
+104310000000 104315209229 34770000000 34771736409 410261632 411998041
+104313000000 104318209337 34771000000 34772736445 411261632 412998077
+104316000000 104321209548 34772000000 34773736516 412261632 413998148
+104319000000 104324209714 34773000000 34774736571 413261632 414998203
+104322000000 104327209825 34774000000 34775736608 414261632 415998240
+104325000000 104330209985 34775000000 34776736661 415261632 416998293
+104328000000 104333210097 34776000000 34777736699 416261632 417998331
+104331000000 104336210295 34777000000 34778736765 417261632 418998397
+104334000000 104339210385 34778000000 34779736795 418261632 419998427
+104337000000 104342210610 34779000000 34780736870 419261632 420998502
+104340000000 104345210742 34780000000 34781736914 420261632 421998546
+104343000000 104348210881 34781000000 34782736960 421261632 422998592
+104346000000 104351210932 34782000000 34783736977 422261632 423998609
+104349000000 104354211143 34783000000 34784737047 423261632 424998679
+104352000000 104357211352 34784000000 34785737117 424261632 425998749
+104355000000 104360211480 34785000000 34786737160 425261632 426998792
+104358000000 104363211623 34786000000 34787737207 426261632 427998839
+104361000000 104366211794 34787000000 34788737264 427261632 428998896
+104364000000 104369211891 34788000000 34789737297 428261632 429998929
+104367000000 104372212104 34789000000 34790737368 429261632 430999000
+104370000000 104375212234 34790000000 34791737411 430261632 431999043
+104373000000 104378212384 34791000000 34792737461 431261632 432999093
+104376000000 104381212544 34792000000 34793737514 432261632 433999146
+104379000000 104384212640 34793000000 34794737546 433261632 434999178
+104382000000 104387212828 34794000000 34795737609 434261632 435999241
+104385000000 104390212996 34795000000 34796737665 435261632 436999297
+104388000000 104393213132 34796000000 34797737710 436261632 437999342
+104391000000 104396213307 34797000000 34798737769 437261632 438999401
+104394000000 104399213429 34798000000 34799737809 438261632 439999441
+104397000000 104402213579 34799000000 34800737859 439261632 440999491
+104400000000 104405213727 34800000000 34801737909 440261632 441999541
+104403000000 104408213933 34801000000 34802737977 441261632 442999609
+104406000000 104411214047 34802000000 34803738015 442261632 443999647
+104409000000 104414214179 34803000000 34804738059 443261632 444999691
+104412000000 104417214353 34804000000 34805738117 444261632 445999749
+104415000000 104420214472 34805000000 34806738157 445261632 446999789
+104418000000 104423214596 34806000000 34807738198 446261632 447999830
+104421000000 104426214815 34807000000 34808738271 447261632 448999903
+104424000000 104429214951 34808000000 34809738317 448261632 449999949
+104427000000 104432215102 34809000000 34810738367 449261632 450999999
+104430000000 104435215262 34810000000 34811738420 450261632 452000052
+104433000000 104438215383 34811000000 34812738461 451261632 453000093
+104436000000 104441215464 34812000000 34813738488 452261632 454000120
+104439000000 104444215672 34813000000 34814738557 453261632 455000189
+104442000000 104447215827 34814000000 34815738609 454261632 456000241
+104445000000 104450215986 34815000000 34816738662 455261632 457000294
+104448000000 104453216138 34816000000 34817738712 456261632 458000344
+104451000000 104456216260 34817000000 34818738753 457261632 459000385
+104454000000 104459216438 34818000000 34819738812 458261632 460000444
+104457000000 104462216587 34819000000 34820738862 459261632 461000494
+104460000000 104465216715 34820000000 34821738905 460261632 462000537
+104463000000 104468216884 34821000000 34822738961 461261632 463000593
+104466000000 104471217004 34822000000 34823739001 462261632 464000633
+104469000000 104474216931 34823000000 34824738977 463261632 465000609
+104472000000 104477217254 34824000000 34825739084 464261632 466000716
+104475000000 104480217507 34825000000 34826739169 465261632 467000801
+104478000000 104483217617 34826000000 34827739205 466261632 468000837
+104481000000 104486217796 34827000000 34828739265 467261632 469000897
+104484000000 104489217844 34828000000 34829739281 468261632 470000913
+104487000000 104492218098 34829000000 34830739366 469261632 471000998
+104490000000 104495218217 34830000000 34831739405 470261632 472001037
+104493000000 104498218388 34831000000 34832739462 471261632 473001094
+104496000000 104501218535 34832000000 34833739511 472261632 474001143
+104499000000 104504218688 34833000000 34834739562 473261632 475001194
+104502000000 104507218834 34834000000 34835739611 474261632 476001243
+104505000000 104510218978 34835000000 34836739659 475261632 477001291
+104508000000 104513219141 34836000000 34837739713 476261632 478001345
+104511000000 104516219293 34837000000 34838739764 477261632 479001396
+104514000000 104519219447 34838000000 34839739815 478261632 480001447
+104517000000 104522219567 34839000000 34840739855 479261632 481001487
+104520000000 104525219776 34840000000 34841739925 480261632 482001557
+104523000000 104528219906 34841000000 34842739968 481261632 483001600
+104526000000 104531220020 34842000000 34843740006 482261632 484001638
+104529000000 104534220181 34843000000 34844740060 483261632 485001692
+104532000000 104537220316 34844000000 34845740105 484261632 486001737
+104535000000 104540220459 34845000000 34846740153 485261632 487001785
+104538000000 104543220559 34846000000 34847740186 486261632 488001818
+104541000000 104546220793 34847000000 34848740264 487261632 489001896
+104544000000 104549220866 34848000000 34849740288 488261632 490001920
+104547000000 104552220987 34849000000 34850740329 489261632 491001961
+104550000000 104555221176 34850000000 34851740392 490261632 492002024
+104553000000 104558221330 34851000000 34852740443 491261632 493002075
+104556000000 104561221509 34852000000 34853740503 492261632 494002135
+104559000000 104564221655 34853000000 34854740551 493261632 495002183
+104562000000 104567221782 34854000000 34855740594 494261632 496002226
+104565000000 104570221956 34855000000 34856740652 495261632 497002284
+104568000000 104573222020 34856000000 34857740673 496261632 498002305
+104571000000 104576222227 34857000000 34858740742 497261632 499002374
+104574000000 104579222408 34858000000 34859740802 498261632 500002434
+104577000000 104582222557 34859000000 34860740852 499261632 501002484
+104580000000 104585222614 34860000000 34861740871 500261632 502002503
+104583000000 104588222810 34861000000 34862740936 501261632 503002568
+104586000000 104591223000 34862000000 34863741000 502261632 504002632
+104589000000 104594223145 34863000000 34864741048 503261632 505002680
+104592000000 104597223317 34864000000 34865741105 504261632 506002737
+104595000000 104600223450 34865000000 34866741150 505261632 507002782
+104598000000 104603223521 34866000000 34867741173 506261632 508002805
+104601000000 104606223747 34867000000 34868741249 507261632 509002881
+104604000000 104609223907 34868000000 34869741302 508261632 510002934
+104607000000 104612224039 34869000000 34870741346 509261632 511002978
+104610000000 104615224147 34870000000 34871741382 510261632 512003014
+104613000000 104618224358 34871000000 34872741452 511261632 513003084
+104616000000 104621224524 34872000000 34873741508 512261632 514003140
+104619000000 104624224635 34873000000 34874741545 513261632 515003177
+104622000000 104627224795 34874000000 34875741598 514261632 516003230
+104625000000 104630224907 34875000000 34876741635 515261632 517003267
+104628000000 104633225105 34876000000 34877741701 516261632 518003333
+104631000000 104636225195 34877000000 34878741731 517261632 519003363
+104634000000 104639225420 34878000000 34879741806 518261632 520003438
+104637000000 104642225552 34879000000 34880741850 519261632 521003482
+104640000000 104645225691 34880000000 34881741897 520261632 522003529
+104643000000 104648225742 34881000000 34882741914 521261632 523003546
+104646000000 104651225953 34882000000 34883741984 522261632 524003616
+104649000000 104654226162 34883000000 34884742054 523261632 525003686
+104652000000 104657226290 34884000000 34885742096 524261632 526003728
+104655000000 104660226433 34885000000 34886742144 525261632 527003776
+104658000000 104663226604 34886000000 34887742201 526261632 528003833
+104661000000 104666226701 34887000000 34888742233 527261632 529003865
+104664000000 104669226914 34888000000 34889742304 528261632 530003936
+104667000000 104672227044 34889000000 34890742348 529261632 531003980
+104670000000 104675227194 34890000000 34891742398 530261632 532004030
+104673000000 104678227354 34891000000 34892742451 531261632 533004083
+104676000000 104681227450 34892000000 34893742483 532261632 534004115
+104679000000 104684227638 34893000000 34894742546 533261632 535004178
+104682000000 104687227806 34894000000 34895742602 534261632 536004234
+104685000000 104690227942 34895000000 34896742647 535261632 537004279
+104688000000 104693228117 34896000000 34897742705 536261632 538004337
+104691000000 104696228239 34897000000 34898742746 537261632 539004378
+104694000000 104699228389 34898000000 34899742796 538261632 540004428
+104697000000 104702228537 34899000000 34900742845 539261632 541004477
+104700000000 104705228743 34900000000 34901742914 540261632 542004546
+104703000000 104708228857 34901000000 34902742952 541261632 543004584
+104706000000 104711228989 34902000000 34903742996 542261632 544004628
+104709000000 104714229163 34903000000 34904743054 543261632 545004686
+104712000000 104717229282 34904000000 34905743094 544261632 546004726
+104715000000 104720229406 34905000000 34906743135 545261632 547004767
+104718000000 104723229625 34906000000 34907743208 546261632 548004840
+104721000000 104726229761 34907000000 34908743253 547261632 549004885
+104724000000 104729229912 34908000000 34909743304 548261632 550004936
+104727000000 104732230072 34909000000 34910743357 549261632 551004989
+104730000000 104735230193 34910000000 34911743397 550261632 552005029
+104733000000 104738230274 34911000000 34912743424 551261632 553005056
+104736000000 104741230482 34912000000 34913743494 552261632 554005126
+104739000000 104744230637 34913000000 34914743545 553261632 555005177
+104742000000 104747230796 34914000000 34915743598 554261632 556005230
+104745000000 104750230948 34915000000 34916743649 555261632 557005281
+104748000000 104753231070 34916000000 34917743690 556261632 558005322
+104751000000 104756231248 34917000000 34918743749 557261632 559005381
+104754000000 104759231397 34918000000 34919743799 558261632 560005431
+104757000000 104762231525 34919000000 34920743841 559261632 561005473
+104760000000 104765231694 34920000000 34921743898 560261632 562005530
+104763000000 104768231814 34921000000 34922743938 561261632 563005570
+104766000000 104771231741 34922000000 34923743913 562261632 564005545
+104769000000 104774232064 34923000000 34924744021 563261632 565005653
+104772000000 104777232317 34924000000 34925744105 564261632 566005737
+104775000000 104780232427 34925000000 34926744142 565261632 567005774
+104778000000 104783232606 34926000000 34927744202 566261632 568005834
+104781000000 104786232654 34927000000 34928744218 567261632 569005850
+104784000000 104789232908 34928000000 34929744302 568261632 570005934
+104787000000 104792233027 34929000000 34930744342 569261632 571005974
+104790000000 104795233198 34930000000 34931744399 570261632 572006031
+104793000000 104798233345 34931000000 34932744448 571261632 573006080
+104796000000 104801233498 34932000000 34933744499 572261632 574006131
+104799000000 104804233644 34933000000 34934744548 573261632 575006180
+104802000000 104807233788 34934000000 34935744596 574261632 576006228
+104805000000 104810233951 34935000000 34936744650 575261632 577006282
+104808000000 104813234103 34936000000 34937744701 576261632 578006333
+104811000000 104816234257 34937000000 34938744752 577261632 579006384
+104814000000 104819234377 34938000000 34939744792 578261632 580006424
+104817000000 104822234586 34939000000 34940744862 579261632 581006494
+104820000000 104825234716 34940000000 34941744905 580261632 582006537
+104823000000 104828234830 34941000000 34942744943 581261632 583006575
+104826000000 104831234991 34942000000 34943744997 582261632 584006629
+104829000000 104834235126 34943000000 34944745042 583261632 585006674
+104832000000 104837235269 34944000000 34945745089 584261632 586006721
+104835000000 104840235369 34945000000 34946745123 585261632 587006755
+104838000000 104843235603 34946000000 34947745201 586261632 588006833
+104841000000 104846235676 34947000000 34948745225 587261632 589006857
+104844000000 104849235797 34948000000 34949745265 588261632 590006897
+104847000000 104852235986 34949000000 34950745328 589261632 591006960
+104850000000 104855236140 34950000000 34951745380 590261632 592007012
+104853000000 104858236319 34951000000 34952745439 591261632 593007071
+104856000000 104861236465 34952000000 34953745488 592261632 594007120
+104859000000 104864236592 34953000000 34954745530 593261632 595007162
+104862000000 104867236766 34954000000 34955745588 594261632 596007220
+104865000000 104870236830 34955000000 34956745610 595261632 597007242
+104868000000 104873237037 34956000000 34957745679 596261632 598007311
+104871000000 104876237218 34957000000 34958745739 597261632 599007371
+104874000000 104879237367 34958000000 34959745789 598261632 600007421
+104877000000 104882237424 34959000000 34960745808 599261632 601007440
+104880000000 104885237620 34960000000 34961745873 600261632 602007505
+104883000000 104888237810 34961000000 34962745936 601261632 603007568
+104886000000 104891237955 34962000000 34963745985 602261632 604007617
+104889000000 104894238127 34963000000 34964746042 603261632 605007674
+104892000000 104897238260 34964000000 34965746086 604261632 606007718
+104895000000 104900238331 34965000000 34966746110 605261632 607007742
+104898000000 104903238557 34966000000 34967746185 606261632 608007817
+104901000000 104906238717 34967000000 34968746239 607261632 609007871
+104904000000 104909238849 34968000000 34969746283 608261632 610007915
+104907000000 104912238957 34969000000 34970746319 609261632 611007951
+104910000000 104915239168 34970000000 34971746389 610261632 612008021
+104913000000 104918239334 34971000000 34972746444 611261632 613008076
+104916000000 104921239445 34972000000 34973746481 612261632 614008113
+104919000000 104924239605 34973000000 34974746535 613261632 615008167
+104922000000 104927239717 34974000000 34975746572 614261632 616008204
+104925000000 104930239915 34975000000 34976746638 615261632 617008270
+104928000000 104933240005 34976000000 34977746668 616261632 618008300
+104931000000 104936240230 34977000000 34978746743 617261632 619008375
+104934000000 104939240362 34978000000 34979746787 618261632 620008419
+104937000000 104942240501 34979000000 34980746833 619261632 621008465
+104940000000 104945240552 34980000000 34981746850 620261632 622008482
+104943000000 104948240763 34981000000 34982746921 621261632 623008553
+104946000000 104951240972 34982000000 34983746990 622261632 624008622
+104949000000 104954241100 34983000000 34984747033 623261632 625008665
+104952000000 104957241243 34984000000 34985747081 624261632 626008713
+104955000000 104960241414 34985000000 34986747138 625261632 627008770
+104958000000 104963241511 34986000000 34987747170 626261632 628008802
+104961000000 104966241724 34987000000 34988747241 627261632 629008873
+104964000000 104969241854 34988000000 34989747284 628261632 630008916
+104967000000 104972242004 34989000000 34990747334 629261632 631008966
+104970000000 104975242164 34990000000 34991747388 630261632 632009020
+104973000000 104978242260 34991000000 34992747420 631261632 633009052
+104976000000 104981242448 34992000000 34993747482 632261632 634009114
+104979000000 104984242616 34993000000 34994747538 633261632 635009170
+104982000000 104987242752 34994000000 34995747584 634261632 636009216
+104985000000 104990242927 34995000000 34996747642 635261632 637009274
+104988000000 104993243049 34996000000 34997747683 636261632 638009315
+104991000000 104996243199 34997000000 34998747733 637261632 639009365
+104994000000 104999243347 34998000000 34999747782 638261632 640009414
+104997000000 105002243553 34999000000 35000747851 639261632 641009483
+105000000000 105005243667 35000000000 35001747889 640261632 642009521
+105003000000 105008243799 35001000000 35002747933 641261632 643009565
+105006000000 105011243973 35002000000 35003747991 642261632 644009623
+105009000000 105014244092 35003000000 35004748030 643261632 645009662
+105012000000 105017244216 35004000000 35005748072 644261632 646009704
+105015000000 105020244435 35005000000 35006748145 645261632 647009777
+105018000000 105023244571 35006000000 35007748190 646261632 648009822
+105021000000 105026244722 35007000000 35008748240 647261632 649009872
+105024000000 105029244882 35008000000 35009748294 648261632 650009926
+105027000000 105032245003 35009000000 35010748334 649261632 651009966
+105030000000 105035245084 35010000000 35011748361 650261632 652009993
+105033000000 105038245292 35011000000 35012748430 651261632 653010062
+105036000000 105041245447 35012000000 35013748482 652261632 654010114
+105039000000 105044245606 35013000000 35014748535 653261632 655010167
+105042000000 105047245758 35014000000 35015748586 654261632 656010218
+105045000000 105050245880 35015000000 35016748626 655261632 657010258
+105048000000 105053246058 35016000000 35017748686 656261632 658010318
+105051000000 105056246207 35017000000 35018748735 657261632 659010367
+105054000000 105059246335 35018000000 35019748778 658261632 660010410
+105057000000 105062246504 35019000000 35020748834 659261632 661010466
+105060000000 105065246624 35020000000 35021748874 660261632 662010506
+105063000000 105068246551 35021000000 35022748850 661261632 663010482
+105066000000 105071246874 35022000000 35023748958 662261632 664010590
+105069000000 105074247127 35023000000 35024749042 663261632 665010674
+105072000000 105077247237 35024000000 35025749079 664261632 666010711
+105075000000 105080247416 35025000000 35026749138 665261632 667010770
+105078000000 105083247464 35026000000 35027749154 666261632 668010786
+105081000000 105086247718 35027000000 35028749239 667261632 669010871
+105084000000 105089247837 35028000000 35029749279 668261632 670010911
+105087000000 105092248008 35029000000 35030749336 669261632 671010968
+105090000000 105095248155 35030000000 35031749385 670261632 672011017
+105093000000 105098248308 35031000000 35032749436 671261632 673011068
+105096000000 105101248454 35032000000 35033749484 672261632 674011116
+105099000000 105104248598 35033000000 35034749532 673261632 675011164
+105102000000 105107248761 35034000000 35035749587 674261632 676011219
+105105000000 105110248913 35035000000 35036749637 675261632 677011269
+105108000000 105113249067 35036000000 35037749689 676261632 678011321
+105111000000 105116249187 35037000000 35038749729 677261632 679011361
+105114000000 105119249396 35038000000 35039749798 678261632 680011430
+105117000000 105122249526 35039000000 35040749842 679261632 681011474
+105120000000 105125249640 35040000000 35041749880 680261632 682011512
+105123000000 105128249801 35041000000 35042749933 681261632 683011565
+105126000000 105131249936 35042000000 35043749978 682261632 684011610
+105129000000 105134250079 35043000000 35044750026 683261632 685011658
+105132000000 105137250179 35044000000 35045750059 684261632 686011691
+105135000000 105140250413 35045000000 35046750137 685261632 687011769
+105138000000 105143250486 35046000000 35047750162 686261632 688011794
+105141000000 105146250607 35047000000 35048750202 687261632 689011834
+105144000000 105149250796 35048000000 35049750265 688261632 690011897
+105147000000 105152250950 35049000000 35050750316 689261632 691011948
+105150000000 105155251129 35050000000 35051750376 690261632 692012008
+105153000000 105158251275 35051000000 35052750425 691261632 693012057
+105156000000 105161251402 35052000000 35053750467 692261632 694012099
+105159000000 105164251576 35053000000 35054750525 693261632 695012157
+105162000000 105167251640 35054000000 35055750546 694261632 696012178
+105165000000 105170251847 35055000000 35056750615 695261632 697012247
+105168000000 105173252028 35056000000 35057750676 696261632 698012308
+105171000000 105176252177 35057000000 35058750725 697261632 699012357
+105174000000 105179252234 35058000000 35059750744 698261632 700012376
+105177000000 105182252430 35059000000 35060750810 699261632 701012442
+105180000000 105185252620 35060000000 35061750873 700261632 702012505
+105183000000 105188252765 35061000000 35062750921 701261632 703012553
+105186000000 105191252937 35062000000 35063750979 702261632 704012611
+105189000000 105194253070 35063000000 35064751023 703261632 705012655
+105192000000 105197253141 35064000000 35065751047 704261632 706012679
+105195000000 105200253367 35065000000 35066751122 705261632 707012754
+105198000000 105203253527 35066000000 35067751175 706261632 708012807
+105201000000 105206253659 35067000000 35068751219 707261632 709012851
+105204000000 105209253767 35068000000 35069751255 708261632 710012887
+105207000000 105212253978 35069000000 35070751326 709261632 711012958
+105210000000 105215254144 35070000000 35071751381 710261632 712013013
+105213000000 105218254255 35071000000 35072751418 711261632 713013050
+105216000000 105221254415 35072000000 35073751471 712261632 714013103
+105219000000 105224254527 35073000000 35074751509 713261632 715013141
+105222000000 105227254725 35074000000 35075751575 714261632 716013207
+105225000000 105230254815 35075000000 35076751605 715261632 717013237
+105228000000 105233255040 35076000000 35077751680 716261632 718013312
+105231000000 105236255172 35077000000 35078751724 717261632 719013356
+105234000000 105239255311 35078000000 35079751770 718261632 720013402
+105237000000 105242255362 35079000000 35080751787 719261632 721013419
+105240000000 105245255573 35080000000 35081751857 720261632 722013489
+105243000000 105248255782 35081000000 35082751927 721261632 723013559
+105246000000 105251255910 35082000000 35083751970 722261632 724013602
+105249000000 105254256053 35083000000 35084752017 723261632 725013649
+105252000000 105257256224 35084000000 35085752074 724261632 726013706
+105255000000 105260256321 35085000000 35086752107 725261632 727013739
+105258000000 105263256534 35086000000 35087752178 726261632 728013810
+105261000000 105266256664 35087000000 35088752221 727261632 729013853
+105264000000 105269256814 35088000000 35089752271 728261632 730013903
+105267000000 105272256974 35089000000 35090752324 729261632 731013956
+105270000000 105275257070 35090000000 35091752356 730261632 732013988
+105273000000 105278257258 35091000000 35092752419 731261632 733014051
+105276000000 105281257426 35092000000 35093752475 732261632 734014107
+105279000000 105284257562 35093000000 35094752520 733261632 735014152
+105282000000 105287257737 35094000000 35095752579 734261632 736014211
+105285000000 105290257859 35095000000 35096752619 735261632 737014251
+105288000000 105293258009 35096000000 35097752669 736261632 738014301
+105291000000 105296258157 35097000000 35098752719 737261632 739014351
+105294000000 105299258363 35098000000 35099752787 738261632 740014419
+105297000000 105302258477 35099000000 35100752825 739261632 741014457
+105300000000 105305258609 35100000000 35101752869 740261632 742014501
+105303000000 105308258783 35101000000 35102752927 741261632 743014559
+105306000000 105311258902 35102000000 35103752967 742261632 744014599
+105309000000 105314259026 35103000000 35104753008 743261632 745014640
+105312000000 105317259245 35104000000 35105753081 744261632 746014713
+105315000000 105320259381 35105000000 35106753127 745261632 747014759
+105318000000 105323259532 35106000000 35107753177 746261632 748014809
+105321000000 105326259692 35107000000 35108753230 747261632 749014862
+105324000000 105329259813 35108000000 35109753271 748261632 750014903
+105327000000 105332259894 35109000000 35110753298 749261632 751014930
+105330000000 105335260102 35110000000 35111753367 750261632 752014999
+105333000000 105338260257 35111000000 35112753419 751261632 753015051
+105336000000 105341260416 35112000000 35113753472 752261632 754015104
+105339000000 105344260568 35113000000 35114753522 753261632 755015154
+105342000000 105347260690 35114000000 35115753563 754261632 756015195
+105345000000 105350260868 35115000000 35116753622 755261632 757015254
+105348000000 105353261017 35116000000 35117753672 756261632 758015304
+105351000000 105356261145 35117000000 35118753715 757261632 759015347
+105354000000 105359261314 35118000000 35119753771 758261632 760015403
+105357000000 105362261434 35119000000 35120753811 759261632 761015443
+105360000000 105365261361 35120000000 35121753787 760261632 762015419
+105363000000 105368261684 35121000000 35122753894 761261632 763015526
+105366000000 105371261937 35122000000 35123753979 762261632 764015611
+105369000000 105374262047 35123000000 35124754015 763261632 765015647
+105372000000 105377262226 35124000000 35125754075 764261632 766015707
+105375000000 105380262274 35125000000 35126754091 765261632 767015723
+105378000000 105383262528 35126000000 35127754176 766261632 768015808
+105381000000 105386262647 35127000000 35128754215 767261632 769015847
+105384000000 105389262818 35128000000 35129754272 768261632 770015904
+105387000000 105392262965 35129000000 35130754321 769261632 771015953
+105390000000 105395263118 35130000000 35131754372 770261632 772016004
+105393000000 105398263264 35131000000 35132754421 771261632 773016053
+105396000000 105401263408 35132000000 35133754469 772261632 774016101
+105399000000 105404263571 35133000000 35134754523 773261632 775016155
+105402000000 105407263723 35134000000 35135754574 774261632 776016206
+105405000000 105410263877 35135000000 35136754625 775261632 777016257
+105408000000 105413263997 35136000000 35137754665 776261632 778016297
+105411000000 105416264206 35137000000 35138754735 777261632 779016367
+105414000000 105419264336 35138000000 35139754778 778261632 780016410
+105417000000 105422264450 35139000000 35140754816 779261632 781016448
+105420000000 105425264611 35140000000 35141754870 780261632 782016502
+105423000000 105428264746 35141000000 35142754915 781261632 783016547
+105426000000 105431264889 35142000000 35143754963 782261632 784016595
+105429000000 105434264989 35143000000 35144754996 783261632 785016628
+105432000000 105437265223 35144000000 35145755074 784261632 786016706
+105435000000 105440265296 35145000000 35146755098 785261632 787016730
+105438000000 105443265417 35146000000 35147755139 786261632 788016771
+105441000000 105446265606 35147000000 35148755202 787261632 789016834
+105444000000 105449265760 35148000000 35149755253 788261632 790016885
+105447000000 105452265939 35149000000 35150755313 789261632 791016945
+105450000000 105455266085 35150000000 35151755361 790261632 792016993
+105453000000 105458266212 35151000000 35152755404 791261632 793017036
+105456000000 105461266386 35152000000 35153755462 792261632 794017094
+105459000000 105464266450 35153000000 35154755483 793261632 795017115
+105462000000 105467266657 35154000000 35155755552 794261632 796017184
+105465000000 105470266838 35155000000 35156755612 795261632 797017244
+105468000000 105473266987 35156000000 35157755662 796261632 798017294
+105471000000 105476267044 35157000000 35158755681 797261632 799017313
+105474000000 105479267240 35158000000 35159755746 798261632 800017378
+105477000000 105482267430 35159000000 35160755810 799261632 801017442
+105480000000 105485267575 35160000000 35161755858 800261632 802017490
+105483000000 105488267747 35161000000 35162755915 801261632 803017547
+105486000000 105491267880 35162000000 35163755960 802261632 804017592
+105489000000 105494267951 35163000000 35164755983 803261632 805017615
+105492000000 105497268177 35164000000 35165756059 804261632 806017691
+105495000000 105500268337 35165000000 35166756112 805261632 807017744
+105498000000 105503268469 35166000000 35167756156 806261632 808017788
+105501000000 105506268577 35167000000 35168756192 807261632 809017824
+105504000000 105509268788 35168000000 35169756262 808261632 810017894
+105507000000 105512268954 35169000000 35170756318 809261632 811017950
+105510000000 105515269065 35170000000 35171756355 810261632 812017987
+105513000000 105518269225 35171000000 35172756408 811261632 813018040
+105516000000 105521269337 35172000000 35173756445 812261632 814018077
+105519000000 105524269535 35173000000 35174756511 813261632 815018143
+105522000000 105527269625 35174000000 35175756541 814261632 816018173
+105525000000 105530269850 35175000000 35176756616 815261632 817018248
+105528000000 105533269982 35176000000 35177756660 816261632 818018292
+105531000000 105536270121 35177000000 35178756707 817261632 819018339
+105534000000 105539270172 35178000000 35179756724 818261632 820018356
+105537000000 105542270383 35179000000 35180756794 819261632 821018426
+105540000000 105545270592 35180000000 35181756864 820261632 822018496
+105543000000 105548270720 35181000000 35182756906 821261632 823018538
+105546000000 105551270863 35182000000 35183756954 822261632 824018586
+105549000000 105554271034 35183000000 35184757011 823261632 825018643
+105552000000 105557271131 35184000000 35185757043 824261632 826018675
+105555000000 105560271344 35185000000 35186757114 825261632 827018746
+105558000000 105563271474 35186000000 35187757158 826261632 828018790
+105561000000 105566271624 35187000000 35188757208 827261632 829018840
+105564000000 105569271784 35188000000 35189757261 828261632 830018893
+105567000000 105572271880 35189000000 35190757293 829261632 831018925
+105570000000 105575272068 35190000000 35191757356 830261632 832018988
+105573000000 105578272236 35191000000 35192757412 831261632 833019044
+105576000000 105581272372 35192000000 35193757457 832261632 834019089
+105579000000 105584272547 35193000000 35194757515 833261632 835019147
+105582000000 105587272669 35194000000 35195757556 834261632 836019188
+105585000000 105590272819 35195000000 35196757606 835261632 837019238
+105588000000 105593272967 35196000000 35197757655 836261632 838019287
+105591000000 105596273173 35197000000 35198757724 837261632 839019356
+105594000000 105599273287 35198000000 35199757762 838261632 840019394
+105597000000 105602273419 35199000000 35200757806 839261632 841019438
+105600000000 105605273593 35200000000 35201757864 840261632 842019496
+105603000000 105608273712 35201000000 35202757904 841261632 843019536
+105606000000 105611273836 35202000000 35203757945 842261632 844019577
+105609000000 105614274055 35203000000 35204758018 843261632 845019650
+105612000000 105617274191 35204000000 35205758063 844261632 846019695
+105615000000 105620274342 35205000000 35206758114 845261632 847019746
+105618000000 105623274502 35206000000 35207758167 846261632 848019799
+105621000000 105626274623 35207000000 35208758207 847261632 849019839
+105624000000 105629274704 35208000000 35209758234 848261632 850019866
+105627000000 105632274912 35209000000 35210758304 849261632 851019936
+105630000000 105635275067 35210000000 35211758355 850261632 852019987
+105633000000 105638275226 35211000000 35212758408 851261632 853020040
+105636000000 105641275378 35212000000 35213758459 852261632 854020091
+105639000000 105644275500 35213000000 35214758500 853261632 855020132
+105642000000 105647275678 35214000000 35215758559 854261632 856020191
+105645000000 105650275827 35215000000 35216758609 855261632 857020241
+105648000000 105653275955 35216000000 35217758651 856261632 858020283
+105651000000 105656276124 35217000000 35218758708 857261632 859020340
+105654000000 105659276244 35218000000 35219758748 858261632 860020380
+105657000000 105662276171 35219000000 35220758723 859261632 861020355
+105660000000 105665276494 35220000000 35221758831 860261632 862020463
+105663000000 105668276747 35221000000 35222758915 861261632 863020547
+105666000000 105671276857 35222000000 35223758952 862261632 864020584
+105669000000 105674277036 35223000000 35224759012 863261632 865020644
+105672000000 105677277084 35224000000 35225759028 864261632 866020660
+105675000000 105680277338 35225000000 35226759112 865261632 867020744
+105678000000 105683277457 35226000000 35227759152 866261632 868020784
+105681000000 105686277628 35227000000 35228759209 867261632 869020841
+105684000000 105689277775 35228000000 35229759258 868261632 870020890
+105687000000 105692277928 35229000000 35230759309 869261632 871020941
+105690000000 105695278074 35230000000 35231759358 870261632 872020990
+105693000000 105698278218 35231000000 35232759406 871261632 873021038
+105696000000 105701278381 35232000000 35233759460 872261632 874021092
+105699000000 105704278533 35233000000 35234759511 873261632 875021143
+105702000000 105707278687 35234000000 35235759562 874261632 876021194
+105705000000 105710278807 35235000000 35236759602 875261632 877021234
+105708000000 105713279016 35236000000 35237759672 876261632 878021304
+105711000000 105716279146 35237000000 35238759715 877261632 879021347
+105714000000 105719279260 35238000000 35239759753 878261632 880021385
+105717000000 105722279421 35239000000 35240759807 879261632 881021439
+105720000000 105725279556 35240000000 35241759852 880261632 882021484
+105723000000 105728279699 35241000000 35242759899 881261632 883021531
+105726000000 105731279799 35242000000 35243759933 882261632 884021565
+105729000000 105734280033 35243000000 35244760011 883261632 885021643
+105732000000 105737280106 35244000000 35245760035 884261632 886021667
+105735000000 105740280227 35245000000 35246760075 885261632 887021707
+105738000000 105743280416 35246000000 35247760138 886261632 888021770
+105741000000 105746280570 35247000000 35248760190 887261632 889021822
+105744000000 105749280749 35248000000 35249760249 888261632 890021881
+105747000000 105752280895 35249000000 35250760298 889261632 891021930
+105750000000 105755281022 35250000000 35251760340 890261632 892021972
+105753000000 105758281196 35251000000 35252760398 891261632 893022030
+105756000000 105761281260 35252000000 35253760420 892261632 894022052
+105759000000 105764281467 35253000000 35254760489 893261632 895022121
+105762000000 105767281648 35254000000 35255760549 894261632 896022181
+105765000000 105770281797 35255000000 35256760599 895261632 897022231
+105768000000 105773281854 35256000000 35257760618 896261632 898022250
+105771000000 105776282050 35257000000 35258760683 897261632 899022315
+105774000000 105779282240 35258000000 35259760746 898261632 900022378
+105777000000 105782282385 35259000000 35260760795 899261632 901022427
+105780000000 105785282557 35260000000 35261760852 900261632 902022484
+105783000000 105788282690 35261000000 35262760896 901261632 903022528
+105786000000 105791282761 35262000000 35263760920 902261632 904022552
+105789000000 105794282987 35263000000 35264760995 903261632 905022627
+105792000000 105797283147 35264000000 35265761049 904261632 906022681
+105795000000 105800283279 35265000000 35266761093 905261632 907022725
+105798000000 105803283387 35266000000 35267761129 906261632 908022761
+105801000000 105806283598 35267000000 35268761199 907261632 909022831
+105804000000 105809283764 35268000000 35269761254 908261632 910022886
+105807000000 105812283875 35269000000 35270761291 909261632 911022923
+105810000000 105815284035 35270000000 35271761345 910261632 912022977
+105813000000 105818284147 35271000000 35272761382 911261632 913023014
+105816000000 105821284345 35272000000 35273761448 912261632 914023080
+105819000000 105824284435 35273000000 35274761478 913261632 915023110
+105822000000 105827284660 35274000000 35275761553 914261632 916023185
+105825000000 105830284792 35275000000 35276761597 915261632 917023229
+105828000000 105833284931 35276000000 35277761643 916261632 918023275
+105831000000 105836284982 35277000000 35278761660 917261632 919023292
+105834000000 105839285193 35278000000 35279761731 918261632 920023363
+105837000000 105842285402 35279000000 35280761800 919261632 921023432
+105840000000 105845285530 35280000000 35281761843 920261632 922023475
+105843000000 105848285673 35281000000 35282761891 921261632 923023523
+105846000000 105851285844 35282000000 35283761948 922261632 924023580
+105849000000 105854285941 35283000000 35284761980 923261632 925023612
+105852000000 105857286154 35284000000 35285762051 924261632 926023683
+105855000000 105860286284 35285000000 35286762094 925261632 927023726
+105858000000 105863286434 35286000000 35287762144 926261632 928023776
+105861000000 105866286594 35287000000 35288762198 927261632 929023830
+105864000000 105869286690 35288000000 35289762230 928261632 930023862
+105867000000 105872286878 35289000000 35290762292 929261632 931023924
+105870000000 105875287046 35290000000 35291762348 930261632 932023980
+105873000000 105878287182 35291000000 35292762394 931261632 933024026
+105876000000 105881287357 35292000000 35293762452 932261632 934024084
+105879000000 105884287479 35293000000 35294762493 933261632 935024125
+105882000000 105887287629 35294000000 35295762543 934261632 936024175
+105885000000 105890287777 35295000000 35296762592 935261632 937024224
+105888000000 105893287983 35296000000 35297762661 936261632 938024293
+105891000000 105896288097 35297000000 35298762699 937261632 939024331
+105894000000 105899288229 35298000000 35299762743 938261632 940024375
+105897000000 105902288403 35299000000 35300762801 939261632 941024433
+105900000000 105905288522 35300000000 35301762840 940261632 942024472
+105903000000 105908288646 35301000000 35302762882 941261632 943024514
+105906000000 105911288865 35302000000 35303762955 942261632 944024587
+105909000000 105914289001 35303000000 35304763000 943261632 945024632
+105912000000 105917289152 35304000000 35305763050 944261632 946024682
+105915000000 105920289312 35305000000 35306763104 945261632 947024736
+105918000000 105923289433 35306000000 35307763144 946261632 948024776
+105921000000 105926289514 35307000000 35308763171 947261632 949024803
+105924000000 105929289722 35308000000 35309763240 948261632 950024872
+105927000000 105932289877 35309000000 35310763292 949261632 951024924
+105930000000 105935290036 35310000000 35311763345 950261632 952024977
+105933000000 105938290188 35311000000 35312763396 951261632 953025028
+105936000000 105941290310 35312000000 35313763436 952261632 954025068
+105939000000 105944290488 35313000000 35314763496 953261632 955025128
+105942000000 105947290637 35314000000 35315763545 954261632 956025177
+105945000000 105950290765 35315000000 35316763588 955261632 957025220
+105948000000 105953290934 35316000000 35317763644 956261632 958025276
+105951000000 105956291054 35317000000 35318763684 957261632 959025316
+105954000000 105959290981 35318000000 35319763660 958261632 960025292
+105957000000 105962291304 35319000000 35320763768 959261632 961025400
+105960000000 105965291557 35320000000 35321763852 960261632 962025484
+105963000000 105968291667 35321000000 35322763889 961261632 963025521
+105966000000 105971291846 35322000000 35323763948 962261632 964025580
+105969000000 105974291894 35323000000 35324763964 963261632 965025596
+105972000000 105977292148 35324000000 35325764049 964261632 966025681
+105975000000 105980292267 35325000000 35326764089 965261632 967025721
+105978000000 105983292438 35326000000 35327764146 966261632 968025778
+105981000000 105986292585 35327000000 35328764195 967261632 969025827
+105984000000 105989292738 35328000000 35329764246 968261632 970025878
+105987000000 105992292884 35329000000 35330764294 969261632 971025926
+105990000000 105995293028 35330000000 35331764342 970261632 972025974
+105993000000 105998293191 35331000000 35332764397 971261632 973026029
+105996000000 106001293343 35332000000 35333764447 972261632 974026079
+105999000000 106004293497 35333000000 35334764499 973261632 975026131
+106002000000 106007293617 35334000000 35335764539 974261632 976026171
+106005000000 106010293826 35335000000 35336764608 975261632 977026240
+106008000000 106013293956 35336000000 35337764652 976261632 978026284
+106011000000 106016294070 35337000000 35338764690 977261632 979026322
+106014000000 106019294231 35338000000 35339764743 978261632 980026375
+106017000000 106022294366 35339000000 35340764788 979261632 981026420
+106020000000 106025294509 35340000000 35341764836 980261632 982026468
+106023000000 106028294609 35341000000 35342764869 981261632 983026501
+106026000000 106031294843 35342000000 35343764947 982261632 984026579
+106029000000 106034294916 35343000000 35344764972 983261632 985026604
+106032000000 106037295037 35344000000 35345765012 984261632 986026644
+106035000000 106040295226 35345000000 35346765075 985261632 987026707
+106038000000 106043295380 35346000000 35347765126 986261632 988026758
+106041000000 106046295559 35347000000 35348765186 987261632 989026818
+106044000000 106049295705 35348000000 35349765235 988261632 990026867
+106047000000 106052295832 35349000000 35350765277 989261632 991026909
+106050000000 106055296006 35350000000 35351765335 990261632 992026967
+106053000000 106058296070 35351000000 35352765356 991261632 993026988
+106056000000 106061296277 35352000000 35353765425 992261632 994027057
+106059000000 106064296458 35353000000 35354765486 993261632 995027118
+106062000000 106067296607 35354000000 35355765535 994261632 996027167
+106065000000 106070296664 35355000000 35356765554 995261632 997027186
+106068000000 106073296860 35356000000 35357765620 996261632 998027252
+106071000000 106076297050 35357000000 35358765683 997261632 999027315
+106074000000 106079297195 35358000000 35359765731 998261632 1000027363
+106077000000 106082297367 35359000000 35360765789 999261632 1001027421
+106080000000 106085297500 35360000000 35361765833 1000261632 1002027465
+106083000000 106088297571 35361000000 35362765857 1001261632 1003027489
+106086000000 106091297797 35362000000 35363765932 1002261632 1004027564
+106089000000 106094297957 35363000000 35364765985 1003261632 1005027617
+106092000000 106097298089 35364000000 35365766029 1004261632 1006027661
+106095000000 106100298197 35365000000 35366766065 1005261632 1007027697
+106098000000 106103298408 35366000000 35367766136 1006261632 1008027768
+106101000000 106106298574 35367000000 35368766191 1007261632 1009027823
+106104000000 106109298685 35368000000 35369766228 1008261632 1010027860
+106107000000 106112298845 35369000000 35370766281 1009261632 1011027913
+106110000000 106115298957 35370000000 35371766319 1010261632 1012027951
+106113000000 106118299155 35371000000 35372766385 1011261632 1013028017
+106116000000 106121299245 35372000000 35373766415 1012261632 1014028047
+106119000000 106124299470 35373000000 35374766490 1013261632 1015028122
+106122000000 106127299602 35374000000 35375766534 1014261632 1016028166
+106125000000 106130299741 35375000000 35376766580 1015261632 1017028212
+106128000000 106133299792 35376000000 35377766597 1016261632 1018028229
+106131000000 106136300003 35377000000 35378766667 1017261632 1019028299
+106134000000 106139300212 35378000000 35379766737 1018261632 1020028369
+106137000000 106142300340 35379000000 35380766780 1019261632 1021028412
+106140000000 106145300483 35380000000 35381766827 1020261632 1022028459
+106143000000 106148300654 35381000000 35382766884 1021261632 1023028516
+106146000000 106151300751 35382000000 35383766917 1022261632 1024028549
+106149000000 106154300964 35383000000 35384766988 1023261632 1025028620
+106152000000 106157301094 35384000000 35385767031 1024261632 1026028663
+106155000000 106160301244 35385000000 35386767081 1025261632 1027028713
+106158000000 106163301404 35386000000 35387767134 1026261632 1028028766
+106161000000 106166301500 35387000000 35388767166 1027261632 1029028798
+106164000000 106169301688 35388000000 35389767229 1028261632 1030028861
+106167000000 106172301856 35389000000 35390767285 1029261632 1031028917
+106170000000 106175301992 35390000000 35391767330 1030261632 1032028962
+106173000000 106178302167 35391000000 35392767389 1031261632 1033029021
+106176000000 106181302289 35392000000 35393767429 1032261632 1034029061
+106179000000 106184302439 35393000000 35394767479 1033261632 1035029111
+106182000000 106187302587 35394000000 35395767529 1034261632 1036029161
+106185000000 106190302793 35395000000 35396767597 1035261632 1037029229
+106188000000 106193302907 35396000000 35397767635 1036261632 1038029267
+106191000000 106196303039 35397000000 35398767679 1037261632 1039029311
+106194000000 106199303213 35398000000 35399767737 1038261632 1040029369
+106197000000 106202303332 35399000000 35400767777 1039261632 1041029409
+106200000000 106205303456 35400000000 35401767818 1040261632 1042029450
+106203000000 106208303675 35401000000 35402767891 1041261632 1043029523
+106206000000 106211303811 35402000000 35403767937 1042261632 1044029569
+106209000000 106214303962 35403000000 35404767987 1043261632 1045029619
+106212000000 106217304122 35404000000 35405768040 1044261632 1046029672
+106215000000 106220304243 35405000000 35406768081 1045261632 1047029713
+106218000000 106223304324 35406000000 35407768108 1046261632 1048029740
+106221000000 106226304532 35407000000 35408768177 1047261632 1049029809
+106224000000 106229304687 35408000000 35409768229 1048261632 1050029861
+106227000000 106232304846 35409000000 35410768282 1049261632 1051029914
+106230000000 106235304998 35410000000 35411768332 1050261632 1052029964
+106233000000 106238305120 35411000000 35412768373 1051261632 1053030005
+106236000000 106241305298 35412000000 35413768432 1052261632 1054030064
+106239000000 106244305447 35413000000 35414768482 1053261632 1055030114
+106242000000 106247305575 35414000000 35415768525 1054261632 1056030157
+106245000000 106250305744 35415000000 35416768581 1055261632 1057030213
+106248000000 106253305864 35416000000 35417768621 1056261632 1058030253
+106251000000 106256305791 35417000000 35418768597 1057261632 1059030229
+106254000000 106259306114 35418000000 35419768704 1058261632 1060030336
+106257000000 106262306367 35419000000 35420768789 1059261632 1061030421
+106260000000 106265306477 35420000000 35421768825 1060261632 1062030457
+106263000000 106268306656 35421000000 35422768885 1061261632 1063030517
+106266000000 106271306704 35422000000 35423768901 1062261632 1064030533
+106269000000 106274306958 35423000000 35424768986 1063261632 1065030618
+106272000000 106277307077 35424000000 35425769025 1064261632 1066030657
+106275000000 106280307248 35425000000 35426769082 1065261632 1067030714
+106278000000 106283307395 35426000000 35427769131 1066261632 1068030763
+106281000000 106286307548 35427000000 35428769182 1067261632 1069030814
+106284000000 106289307694 35428000000 35429769231 1068261632 1070030863
+106287000000 106292307838 35429000000 35430769279 1069261632 1071030911
+106290000000 106295308001 35430000000 35431769333 1070261632 1072030965
+106293000000 106298308153 35431000000 35432769384 1071261632 1073031016
+106296000000 106301308307 35432000000 35433769435 1072261632 1074031067
+106299000000 106304308427 35433000000 35434769475 1073261632 1075031107
+106302000000 106307308636 35434000000 35435769545 1074261632 1076031177
+106305000000 106310308766 35435000000 35436769588 1075261632 1077031220
+106308000000 106313308880 35436000000 35437769626 1076261632 1078031258
+106311000000 106316309041 35437000000 35438769680 1077261632 1079031312
+106314000000 106319309176 35438000000 35439769725 1078261632 1080031357
+106317000000 106322309319 35439000000 35440769773 1079261632 1081031405
+106320000000 106325309419 35440000000 35441769806 1080261632 1082031438
+106323000000 106328309653 35441000000 35442769884 1081261632 1083031516
+106326000000 106331309726 35442000000 35443769908 1082261632 1084031540
+106329000000 106334309847 35443000000 35444769949 1083261632 1085031581
+106332000000 106337310036 35444000000 35445770012 1084261632 1086031644
+106335000000 106340310190 35445000000 35446770063 1085261632 1087031695
+106338000000 106343310369 35446000000 35447770123 1086261632 1088031755
+106341000000 106346310515 35447000000 35448770171 1087261632 1089031803
+106344000000 106349310642 35448000000 35449770214 1088261632 1090031846
+106347000000 106352310816 35449000000 35450770272 1089261632 1091031904
+106350000000 106355310880 35450000000 35451770293 1090261632 1092031925
+106353000000 106358311087 35451000000 35452770362 1091261632 1093031994
+106356000000 106361311268 35452000000 35453770422 1092261632 1094032054
+106359000000 106364311417 35453000000 35454770472 1093261632 1095032104
+106362000000 106367311474 35454000000 35455770491 1094261632 1096032123
+106365000000 106370311670 35455000000 35456770556 1095261632 1097032188
+106368000000 106373311860 35456000000 35457770620 1096261632 1098032252
+106371000000 106376312005 35457000000 35458770668 1097261632 1099032300
+106374000000 106379312177 35458000000 35459770725 1098261632 1100032357
+106377000000 106382312310 35459000000 35460770770 1099261632 1101032402
+106380000000 106385312381 35460000000 35461770793 1100261632 1102032425
+106383000000 106388312607 35461000000 35462770869 1101261632 1103032501
+106386000000 106391312767 35462000000 35463770922 1102261632 1104032554
+106389000000 106394312899 35463000000 35464770966 1103261632 1105032598
+106392000000 106397313007 35464000000 35465771002 1104261632 1106032634
+106395000000 106400313218 35465000000 35466771072 1105261632 1107032704
+106398000000 106403313384 35466000000 35467771128 1106261632 1108032760
+106401000000 106406313495 35467000000 35468771165 1107261632 1109032797
+106404000000 106409313655 35468000000 35469771218 1108261632 1110032850
+106407000000 106412313767 35469000000 35470771255 1109261632 1111032887
+106410000000 106415313965 35470000000 35471771321 1110261632 1112032953
+106413000000 106418314055 35471000000 35472771351 1111261632 1113032983
+106416000000 106421314280 35472000000 35473771426 1112261632 1114033058
+106419000000 106424314412 35473000000 35474771470 1113261632 1115033102
+106422000000 106427314551 35474000000 35475771517 1114261632 1116033149
+106425000000 106430314602 35475000000 35476771534 1115261632 1117033166
+106428000000 106433314813 35476000000 35477771604 1116261632 1118033236
+106431000000 106436315022 35477000000 35478771674 1117261632 1119033306
+106434000000 106439315150 35478000000 35479771716 1118261632 1120033348
+106437000000 106442315293 35479000000 35480771764 1119261632 1121033396
+106440000000 106445315464 35480000000 35481771821 1120261632 1122033453
+106443000000 106448315561 35481000000 35482771853 1121261632 1123033485
+106446000000 106451315774 35482000000 35483771924 1122261632 1124033556
+106449000000 106454315904 35483000000 35484771968 1123261632 1125033600
+106452000000 106457316054 35484000000 35485772018 1124261632 1126033650
+106455000000 106460316214 35485000000 35486772071 1125261632 1127033703
+106458000000 106463316310 35486000000 35487772103 1126261632 1128033735
+106461000000 106466316498 35487000000 35488772166 1127261632 1129033798
+106464000000 106469316666 35488000000 35489772222 1128261632 1130033854
+106467000000 106472316802 35489000000 35490772267 1129261632 1131033899
+106470000000 106475316977 35490000000 35491772325 1130261632 1132033957
+106473000000 106478317099 35491000000 35492772366 1131261632 1133033998
+106476000000 106481317249 35492000000 35493772416 1132261632 1134034048
+106479000000 106484317397 35493000000 35494772465 1133261632 1135034097
+106482000000 106487317603 35494000000 35495772534 1134261632 1136034166
+106485000000 106490317717 35495000000 35496772572 1135261632 1137034204
+106488000000 106493317849 35496000000 35497772616 1136261632 1138034248
+106491000000 106496318023 35497000000 35498772674 1137261632 1139034306
+106494000000 106499318142 35498000000 35499772714 1138261632 1140034346
+106497000000 106502318266 35499000000 35500772755 1139261632 1141034387
+106500000000 106505318485 35500000000 35501772828 1140261632 1142034460
+106503000000 106508318621 35501000000 35502772873 1141261632 1143034505
+106506000000 106511318772 35502000000 35503772924 1142261632 1144034556
+106509000000 106514318932 35503000000 35504772977 1143261632 1145034609
+106512000000 106517319053 35504000000 35505773017 1144261632 1146034649
+106515000000 106520319134 35505000000 35506773044 1145261632 1147034676
+106518000000 106523319342 35506000000 35507773114 1146261632 1148034746
+106521000000 106526319497 35507000000 35508773165 1147261632 1149034797
+106524000000 106529319656 35508000000 35509773218 1148261632 1150034850
+106527000000 106532319808 35509000000 35510773269 1149261632 1151034901
+106530000000 106535319930 35510000000 35511773310 1150261632 1152034942
+106533000000 106538320108 35511000000 35512773369 1151261632 1153035001
+106536000000 106541320257 35512000000 35513773419 1152261632 1154035051
+106539000000 106544320385 35513000000 35514773461 1153261632 1155035093
+106542000000 106547320554 35514000000 35515773518 1154261632 1156035150
+106545000000 106550320674 35515000000 35516773558 1155261632 1157035190
+106548000000 106553320601 35516000000 35517773533 1156261632 1158035165
+106551000000 106556320924 35517000000 35518773641 1157261632 1159035273
+106554000000 106559321177 35518000000 35519773725 1158261632 1160035357
+106557000000 106562321287 35519000000 35520773762 1159261632 1161035394
+106560000000 106565321466 35520000000 35521773822 1160261632 1162035454
+106563000000 106568321514 35521000000 35522773838 1161261632 1163035470
+106566000000 106571321768 35522000000 35523773922 1162261632 1164035554
+106569000000 106574321887 35523000000 35524773962 1163261632 1165035594
+106572000000 106577322058 35524000000 35525774019 1164261632 1166035651
+106575000000 106580322205 35525000000 35526774068 1165261632 1167035700
+106578000000 106583322358 35526000000 35527774119 1166261632 1168035751
+106581000000 106586322504 35527000000 35528774168 1167261632 1169035800
+106584000000 106589322648 35528000000 35529774216 1168261632 1170035848
+106587000000 106592322811 35529000000 35530774270 1169261632 1171035902
+106590000000 106595322963 35530000000 35531774321 1170261632 1172035953
+106593000000 106598323117 35531000000 35532774372 1171261632 1173036004
+106596000000 106601323237 35532000000 35533774412 1172261632 1174036044
+106599000000 106604323446 35533000000 35534774482 1173261632 1175036114
+106602000000 106607323576 35534000000 35535774525 1174261632 1176036157
+106605000000 106610323690 35535000000 35536774563 1175261632 1177036195
+106608000000 106613323851 35536000000 35537774617 1176261632 1178036249
+106611000000 106616323986 35537000000 35538774662 1177261632 1179036294
+106614000000 106619324129 35538000000 35539774709 1178261632 1180036341
+106617000000 106622324229 35539000000 35540774743 1179261632 1181036375
+106620000000 106625324463 35540000000 35541774821 1180261632 1182036453
+106623000000 106628324536 35541000000 35542774845 1181261632 1183036477
+106626000000 106631324657 35542000000 35543774885 1182261632 1184036517
+106629000000 106634324846 35543000000 35544774948 1183261632 1185036580
+106632000000 106637325000 35544000000 35545775000 1184261632 1186036632
+106635000000 106640325179 35545000000 35546775059 1185261632 1187036691
+106638000000 106643325325 35546000000 35547775108 1186261632 1188036740
+106641000000 106646325452 35547000000 35548775150 1187261632 1189036782
+106644000000 106649325626 35548000000 35549775208 1188261632 1190036840
+106647000000 106652325690 35549000000 35550775230 1189261632 1191036862
+106650000000 106655325897 35550000000 35551775299 1190261632 1192036931
+106653000000 106658326078 35551000000 35552775359 1191261632 1193036991
+106656000000 106661326227 35552000000 35553775409 1192261632 1194037041
+106659000000 106664326284 35553000000 35554775428 1193261632 1195037060
+106662000000 106667326480 35554000000 35555775493 1194261632 1196037125
+106665000000 106670326670 35555000000 35556775556 1195261632 1197037188
+106668000000 106673326815 35556000000 35557775605 1196261632 1198037237
+106671000000 106676326987 35557000000 35558775662 1197261632 1199037294
+106674000000 106679327120 35558000000 35559775706 1198261632 1200037338
+106677000000 106682327191 35559000000 35560775730 1199261632 1201037362
+106680000000 106685327417 35560000000 35561775805 1200261632 1202037437
+106683000000 106688327577 35561000000 35562775859 1201261632 1203037491
+106686000000 106691327709 35562000000 35563775903 1202261632 1204037535
+106689000000 106694327817 35563000000 35564775939 1203261632 1205037571
+106692000000 106697328028 35564000000 35565776009 1204261632 1206037641
+106695000000 106700328194 35565000000 35566776064 1205261632 1207037696
+106698000000 106703328305 35566000000 35567776101 1206261632 1208037733
+106701000000 106706328465 35567000000 35568776155 1207261632 1209037787
+106704000000 106709328577 35568000000 35569776192 1208261632 1210037824
+106707000000 106712328775 35569000000 35570776258 1209261632 1211037890
+106710000000 106715328865 35570000000 35571776288 1210261632 1212037920
+106713000000 106718329090 35571000000 35572776363 1211261632 1213037995
+106716000000 106721329222 35572000000 35573776407 1212261632 1214038039
+106719000000 106724329361 35573000000 35574776453 1213261632 1215038085
+106722000000 106727329412 35574000000 35575776470 1214261632 1216038102
+106725000000 106730329623 35575000000 35576776541 1215261632 1217038173
+106728000000 106733329832 35576000000 35577776610 1216261632 1218038242
+106731000000 106736329960 35577000000 35578776653 1217261632 1219038285
+106734000000 106739330103 35578000000 35579776701 1218261632 1220038333
+106737000000 106742330274 35579000000 35580776758 1219261632 1221038390
+106740000000 106745330371 35580000000 35581776790 1220261632 1222038422
+106743000000 106748330584 35581000000 35582776861 1221261632 1223038493
+106746000000 106751330714 35582000000 35583776904 1222261632 1224038536
+106749000000 106754330864 35583000000 35584776954 1223261632 1225038586
+106752000000 106757331024 35584000000 35585777008 1224261632 1226038640
+106755000000 106760331120 35585000000 35586777040 1225261632 1227038672
+106758000000 106763331308 35586000000 35587777102 1226261632 1228038734
+106761000000 106766331476 35587000000 35588777158 1227261632 1229038790
+106764000000 106769331612 35588000000 35589777204 1228261632 1230038836
+106767000000 106772331787 35589000000 35590777262 1229261632 1231038894
+106770000000 106775331909 35590000000 35591777303 1230261632 1232038935
+106773000000 106778332059 35591000000 35592777353 1231261632 1233038985
+106776000000 106781332207 35592000000 35593777402 1232261632 1234039034
+106779000000 106784332413 35593000000 35594777471 1233261632 1235039103
+106782000000 106787332527 35594000000 35595777509 1234261632 1236039141
+106785000000 106790332659 35595000000 35596777553 1235261632 1237039185
+106788000000 106793332833 35596000000 35597777611 1236261632 1238039243
+106791000000 106796332952 35597000000 35598777650 1237261632 1239039282
+106794000000 106799333076 35598000000 35599777692 1238261632 1240039324
+106797000000 106802333295 35599000000 35600777765 1239261632 1241039397
+106800000000 106805333431 35600000000 35601777810 1240261632 1242039442
+106803000000 106808333582 35601000000 35602777860 1241261632 1243039492
+106806000000 106811333742 35602000000 35603777914 1242261632 1244039546
+106809000000 106814333863 35603000000 35604777954 1243261632 1245039586
+106812000000 106817333944 35604000000 35605777981 1244261632 1246039613
+106815000000 106820334152 35605000000 35606778050 1245261632 1247039682
+106818000000 106823334307 35606000000 35607778102 1246261632 1248039734
+106821000000 106826334466 35607000000 35608778155 1247261632 1249039787
+106824000000 106829334618 35608000000 35609778206 1248261632 1250039838
+106827000000 106832334740 35609000000 35610778246 1249261632 1251039878
+106830000000 106835334918 35610000000 35611778306 1250261632 1252039938
+106833000000 106838335067 35611000000 35612778355 1251261632 1253039987
+106836000000 106841335195 35612000000 35613778398 1252261632 1254040030
+106839000000 106844335364 35613000000 35614778454 1253261632 1255040086
+106842000000 106847335484 35614000000 35615778494 1254261632 1256040126
+106845000000 106850335411 35615000000 35616778470 1255261632 1257040102
+106848000000 106853335734 35616000000 35617778578 1256261632 1258040210
+106851000000 106856335987 35617000000 35618778662 1257261632 1259040294
+106854000000 106859336097 35618000000 35619778699 1258261632 1260040331
+106857000000 106862336276 35619000000 35620778758 1259261632 1261040390
+106860000000 106865336324 35620000000 35621778774 1260261632 1262040406
+106863000000 106868336578 35621000000 35622778859 1261261632 1263040491
+106866000000 106871336697 35622000000 35623778899 1262261632 1264040531
+106869000000 106874336868 35623000000 35624778956 1263261632 1265040588
+106872000000 106877337015 35624000000 35625779005 1264261632 1266040637
+106875000000 106880337168 35625000000 35626779056 1265261632 1267040688
+106878000000 106883337314 35626000000 35627779104 1266261632 1268040736
+106881000000 106886337458 35627000000 35628779152 1267261632 1269040784
+106884000000 106889337621 35628000000 35629779207 1268261632 1270040839
+106887000000 106892337773 35629000000 35630779257 1269261632 1271040889
+106890000000 106895337927 35630000000 35631779309 1270261632 1272040941
+106893000000 106898338047 35631000000 35632779349 1271261632 1273040981
+106896000000 106901338256 35632000000 35633779418 1272261632 1274041050
+106899000000 106904338386 35633000000 35634779462 1273261632 1275041094
+106902000000 106907338500 35634000000 35635779500 1274261632 1276041132
+106905000000 106910338661 35635000000 35636779553 1275261632 1277041185
+106908000000 106913338796 35636000000 35637779598 1276261632 1278041230
+106911000000 106916338939 35637000000 35638779646 1277261632 1279041278
+106914000000 106919339039 35638000000 35639779679 1278261632 1280041311
+106917000000 106922339273 35639000000 35640779757 1279261632 1281041389
+106920000000 106925339346 35640000000 35641779782 1280261632 1282041414
+106923000000 106928339467 35641000000 35642779822 1281261632 1283041454
+106926000000 106931339656 35642000000 35643779885 1282261632 1284041517
+106929000000 106934339810 35643000000 35644779936 1283261632 1285041568
+106932000000 106937339989 35644000000 35645779996 1284261632 1286041628
+106935000000 106940340135 35645000000 35646780045 1285261632 1287041677
+106938000000 106943340262 35646000000 35647780087 1286261632 1288041719
+106941000000 106946340436 35647000000 35648780145 1287261632 1289041777
+106944000000 106949340500 35648000000 35649780166 1288261632 1290041798
+106947000000 106952340707 35649000000 35650780235 1289261632 1291041867
+106950000000 106955340888 35650000000 35651780296 1290261632 1292041928
+106953000000 106958341037 35651000000 35652780345 1291261632 1293041977
+106956000000 106961341094 35652000000 35653780364 1292261632 1294041996
+106959000000 106964341290 35653000000 35654780430 1293261632 1295042062
+106962000000 106967341480 35654000000 35655780493 1294261632 1296042125
+106965000000 106970341625 35655000000 35656780541 1295261632 1297042173
+106968000000 106973341797 35656000000 35657780599 1296261632 1298042231
+106971000000 106976341930 35657000000 35658780643 1297261632 1299042275
+106974000000 106979342001 35658000000 35659780667 1298261632 1300042299
+106977000000 106982342227 35659000000 35660780742 1299261632 1301042374
+106980000000 106985342387 35660000000 35661780795 1300261632 1302042427
+106983000000 106988342519 35661000000 35662780839 1301261632 1303042471
+106986000000 106991342627 35662000000 35663780875 1302261632 1304042507
+106989000000 106994342838 35663000000 35664780946 1303261632 1305042578
+106992000000 106997343004 35664000000 35665781001 1304261632 1306042633
+106995000000 107000343115 35665000000 35666781038 1305261632 1307042670
+106998000000 107003343275 35666000000 35667781091 1306261632 1308042723
+107001000000 107006343387 35667000000 35668781129 1307261632 1309042761
+107004000000 107009343585 35668000000 35669781195 1308261632 1310042827
+107007000000 107012343675 35669000000 35670781225 1309261632 1311042857
+107010000000 107015343900 35670000000 35671781300 1310261632 1312042932
+107013000000 107018344032 35671000000 35672781344 1311261632 1313042976
+107016000000 107021344171 35672000000 35673781390 1312261632 1314043022
+107019000000 107024344222 35673000000 35674781407 1313261632 1315043039
+107022000000 107027344433 35674000000 35675781477 1314261632 1316043109
+107025000000 107030344642 35675000000 35676781547 1315261632 1317043179
+107028000000 107033344770 35676000000 35677781590 1316261632 1318043222
+107031000000 107036344913 35677000000 35678781637 1317261632 1319043269
+107034000000 107039345084 35678000000 35679781694 1318261632 1320043326
+107037000000 107042345181 35679000000 35680781727 1319261632 1321043359
+107040000000 107045345394 35680000000 35681781798 1320261632 1322043430
+107043000000 107048345524 35681000000 35682781841 1321261632 1323043473
+107046000000 107051345674 35682000000 35683781891 1322261632 1324043523
+107049000000 107054345834 35683000000 35684781944 1323261632 1325043576
+107052000000 107057345930 35684000000 35685781976 1324261632 1326043608
+107055000000 107060346118 35685000000 35686782039 1325261632 1327043671
+107058000000 107063346286 35686000000 35687782095 1326261632 1328043727
+107061000000 107066346422 35687000000 35688782140 1327261632 1329043772
+107064000000 107069346597 35688000000 35689782199 1328261632 1330043831
+107067000000 107072346719 35689000000 35690782239 1329261632 1331043871
+107070000000 107075346869 35690000000 35691782289 1330261632 1332043921
+107073000000 107078347017 35691000000 35692782339 1331261632 1333043971
+107076000000 107081347223 35692000000 35693782407 1332261632 1334044039
+107079000000 107084347337 35693000000 35694782445 1333261632 1335044077
+107082000000 107087347469 35694000000 35695782489 1334261632 1336044121
+107085000000 107090347643 35695000000 35696782547 1335261632 1337044179
+107088000000 107093347762 35696000000 35697782587 1336261632 1338044219
+107091000000 107096347886 35697000000 35698782628 1337261632 1339044260
+107094000000 107099348105 35698000000 35699782701 1338261632 1340044333
+107097000000 107102348241 35699000000 35700782747 1339261632 1341044379
+107100000000 107105348392 35700000000 35701782797 1340261632 1342044429
+107103000000 107108348552 35701000000 35702782850 1341261632 1343044482
+107106000000 107111348673 35702000000 35703782891 1342261632 1344044523
+107109000000 107114348754 35703000000 35704782918 1343261632 1345044550
+107112000000 107117348962 35704000000 35705782987 1344261632 1346044619
+107115000000 107120349117 35705000000 35706783039 1345261632 1347044671
+107118000000 107123349276 35706000000 35707783092 1346261632 1348044724
+107121000000 107126349428 35707000000 35708783142 1347261632 1349044774
+107124000000 107129349550 35708000000 35709783183 1348261632 1350044815
+107127000000 107132349728 35709000000 35710783242 1349261632 1351044874
+107130000000 107135349877 35710000000 35711783292 1350261632 1352044924
+107133000000 107138350005 35711000000 35712783335 1351261632 1353044967
+107136000000 107141350174 35712000000 35713783391 1352261632 1354045023
+107139000000 107144350294 35713000000 35714783431 1353261632 1355045063
+107142000000 107147350221 35714000000 35715783407 1354261632 1356045039
+107145000000 107150350544 35715000000 35716783514 1355261632 1357045146
+107148000000 107153350797 35716000000 35717783599 1356261632 1358045231
+107151000000 107156350907 35717000000 35718783635 1357261632 1359045267
+107154000000 107159351086 35718000000 35719783695 1358261632 1360045327
+107157000000 107162351134 35719000000 35720783711 1359261632 1361045343
+107160000000 107165351388 35720000000 35721783796 1360261632 1362045428
+107163000000 107168351507 35721000000 35722783835 1361261632 1363045467
+107166000000 107171351678 35722000000 35723783892 1362261632 1364045524
+107169000000 107174351825 35723000000 35724783941 1363261632 1365045573
+107172000000 107177351978 35724000000 35725783992 1364261632 1366045624
+107175000000 107180352124 35725000000 35726784041 1365261632 1367045673
+107178000000 107183352268 35726000000 35727784089 1366261632 1368045721
+107181000000 107186352431 35727000000 35728784143 1367261632 1369045775
+107184000000 107189352583 35728000000 35729784194 1368261632 1370045826
+107187000000 107192352737 35729000000 35730784245 1369261632 1371045877
+107190000000 107195352857 35730000000 35731784285 1370261632 1372045917
+107193000000 107198353066 35731000000 35732784355 1371261632 1373045987
+107196000000 107201353196 35732000000 35733784398 1372261632 1374046030
+107199000000 107204353310 35733000000 35734784436 1373261632 1375046068
+107202000000 107207353471 35734000000 35735784490 1374261632 1376046122
+107205000000 107210353606 35735000000 35736784535 1375261632 1377046167
+107208000000 107213353749 35736000000 35737784583 1376261632 1378046215
+107211000000 107216353849 35737000000 35738784616 1377261632 1379046248
+107214000000 107219354083 35738000000 35739784694 1378261632 1380046326
+107217000000 107222354156 35739000000 35740784718 1379261632 1381046350
+107220000000 107225354277 35740000000 35741784759 1380261632 1382046391
+107223000000 107228354466 35741000000 35742784822 1381261632 1383046454
+107226000000 107231354620 35742000000 35743784873 1382261632 1384046505
+107229000000 107234354799 35743000000 35744784933 1383261632 1385046565
+107232000000 107237354945 35744000000 35745784981 1384261632 1386046613
+107235000000 107240355072 35745000000 35746785024 1385261632 1387046656
+107238000000 107243355246 35746000000 35747785082 1386261632 1388046714
+107241000000 107246355310 35747000000 35748785103 1387261632 1389046735
+107244000000 107249355517 35748000000 35749785172 1388261632 1390046804
+107247000000 107252355698 35749000000 35750785232 1389261632 1391046864
+107250000000 107255355847 35750000000 35751785282 1390261632 1392046914
+107253000000 107258355904 35751000000 35752785301 1391261632 1393046933
+107256000000 107261356100 35752000000 35753785366 1392261632 1394046998
+107259000000 107264356290 35753000000 35754785430 1393261632 1395047062
+107262000000 107267356435 35754000000 35755785478 1394261632 1396047110
+107265000000 107270356607 35755000000 35756785535 1395261632 1397047167
+107268000000 107273356740 35756000000 35757785580 1396261632 1398047212
+107271000000 107276356811 35757000000 35758785603 1397261632 1399047235
+107274000000 107279357037 35758000000 35759785679 1398261632 1400047311
+107277000000 107282357197 35759000000 35760785732 1399261632 1401047364
+107280000000 107285357329 35760000000 35761785776 1400261632 1402047408
+107283000000 107288357437 35761000000 35762785812 1401261632 1403047444
+107286000000 107291357648 35762000000 35763785882 1402261632 1404047514
+107289000000 107294357814 35763000000 35764785938 1403261632 1405047570
+107292000000 107297357925 35764000000 35765785975 1404261632 1406047607
+107295000000 107300358085 35765000000 35766786028 1405261632 1407047660
+107298000000 107303358197 35766000000 35767786065 1406261632 1408047697
+107301000000 107306358395 35767000000 35768786131 1407261632 1409047763
+107304000000 107309358485 35768000000 35769786161 1408261632 1410047793
+107307000000 107312358710 35769000000 35770786236 1409261632 1411047868
+107310000000 107315358842 35770000000 35771786280 1410261632 1412047912
+107313000000 107318358981 35771000000 35772786327 1411261632 1413047959
+107316000000 107321359032 35772000000 35773786344 1412261632 1414047976
+107319000000 107324359243 35773000000 35774786414 1413261632 1415048046
+107322000000 107327359452 35774000000 35775786484 1414261632 1416048116
+107325000000 107330359580 35775000000 35776786526 1415261632 1417048158
+107328000000 107333359723 35776000000 35777786574 1416261632 1418048206
+107331000000 107336359894 35777000000 35778786631 1417261632 1419048263
+107334000000 107339359991 35778000000 35779786663 1418261632 1420048295
+107337000000 107342360204 35779000000 35780786734 1419261632 1421048366
+107340000000 107345360334 35780000000 35781786778 1420261632 1422048410
+107343000000 107348360484 35781000000 35782786828 1421261632 1423048460
+107346000000 107351360644 35782000000 35783786881 1422261632 1424048513
+107349000000 107354360740 35783000000 35784786913 1423261632 1425048545
+107352000000 107357360928 35784000000 35785786976 1424261632 1426048608
+107355000000 107360361096 35785000000 35786787032 1425261632 1427048664
+107358000000 107363361232 35786000000 35787787077 1426261632 1428048709
+107361000000 107366361407 35787000000 35788787135 1427261632 1429048767
+107364000000 107369361529 35788000000 35789787176 1428261632 1430048808
+107367000000 107372361679 35789000000 35790787226 1429261632 1431048858
+107370000000 107375361827 35790000000 35791787275 1430261632 1432048907
+107373000000 107378362033 35791000000 35792787344 1431261632 1433048976
+107376000000 107381362147 35792000000 35793787382 1432261632 1434049014
+107379000000 107384362279 35793000000 35794787426 1433261632 1435049058
+107382000000 107387362453 35794000000 35795787484 1434261632 1436049116
+107385000000 107390362572 35795000000 35796787524 1435261632 1437049156
+107388000000 107393362696 35796000000 35797787565 1436261632 1438049197
+107391000000 107396362915 35797000000 35798787638 1437261632 1439049270
+107394000000 107399363051 35798000000 35799787683 1438261632 1440049315
+107397000000 107402363202 35799000000 35800787734 1439261632 1441049366
+107400000000 107405363362 35800000000 35801787787 1440261632 1442049419
+107403000000 107408363483 35801000000 35802787827 1441261632 1443049459
+107406000000 107411363564 35802000000 35803787854 1442261632 1444049486
+107409000000 107414363772 35803000000 35804787924 1443261632 1445049556
+107412000000 107417363927 35804000000 35805787975 1444261632 1446049607
+107415000000 107420364086 35805000000 35806788028 1445261632 1447049660
+107418000000 107423364238 35806000000 35807788079 1446261632 1448049711
+107421000000 107426364360 35807000000 35808788120 1447261632 1449049752
+107424000000 107429364538 35808000000 35809788179 1448261632 1450049811
+107427000000 107432364687 35809000000 35810788229 1449261632 1451049861
+107430000000 107435364815 35810000000 35811788271 1450261632 1452049903
+107433000000 107438364984 35811000000 35812788328 1451261632 1453049960
+107436000000 107441365104 35812000000 35813788368 1452261632 1454050000
+107439000000 107444365031 35813000000 35814788343 1453261632 1455049975
+107442000000 107447365354 35814000000 35815788451 1454261632 1456050083
+107445000000 107450365607 35815000000 35816788535 1455261632 1457050167
+107448000000 107453365717 35816000000 35817788572 1456261632 1458050204
+107451000000 107456365896 35817000000 35818788632 1457261632 1459050264
+107454000000 107459365944 35818000000 35819788648 1458261632 1460050280
+107457000000 107462366198 35819000000 35820788732 1459261632 1461050364
+107460000000 107465366317 35820000000 35821788772 1460261632 1462050404
+107463000000 107468366488 35821000000 35822788829 1461261632 1463050461
+107466000000 107471366635 35822000000 35823788878 1462261632 1464050510
+107469000000 107474366788 35823000000 35824788929 1463261632 1465050561
+107472000000 107477366934 35824000000 35825788978 1464261632 1466050610
+107475000000 107480367078 35825000000 35826789026 1465261632 1467050658
+107478000000 107483367241 35826000000 35827789080 1466261632 1468050712
+107481000000 107486367393 35827000000 35828789131 1467261632 1469050763
+107484000000 107489367547 35828000000 35829789182 1468261632 1470050814
+107487000000 107492367667 35829000000 35830789222 1469261632 1471050854
+107490000000 107495367876 35830000000 35831789292 1470261632 1472050924
+107493000000 107498368006 35831000000 35832789335 1471261632 1473050967
+107496000000 107501368120 35832000000 35833789373 1472261632 1474051005
+107499000000 107504368281 35833000000 35834789427 1473261632 1475051059
+107502000000 107507368416 35834000000 35835789472 1474261632 1476051104
+107505000000 107510368559 35835000000 35836789519 1475261632 1477051151
+107508000000 107513368659 35836000000 35837789553 1476261632 1478051185
+107511000000 107516368893 35837000000 35838789631 1477261632 1479051263
+107514000000 107519368966 35838000000 35839789655 1478261632 1480051287
+107517000000 107522369087 35839000000 35840789695 1479261632 1481051327
+107520000000 107525369276 35840000000 35841789758 1480261632 1482051390
+107523000000 107528369430 35841000000 35842789810 1481261632 1483051442
+107526000000 107531369609 35842000000 35843789869 1482261632 1484051501
+107529000000 107534369755 35843000000 35844789918 1483261632 1485051550
+107532000000 107537369882 35844000000 35845789960 1484261632 1486051592
+107535000000 107540370056 35845000000 35846790018 1485261632 1487051650
+107538000000 107543370120 35846000000 35847790040 1486261632 1488051672
+107541000000 107546370327 35847000000 35848790109 1487261632 1489051741
+107544000000 107549370508 35848000000 35849790169 1488261632 1490051801
+107547000000 107552370657 35849000000 35850790219 1489261632 1491051851
+107550000000 107555370714 35850000000 35851790238 1490261632 1492051870
+107553000000 107558370910 35851000000 35852790303 1491261632 1493051935
+107556000000 107561371100 35852000000 35853790366 1492261632 1494051998
+107559000000 107564371245 35853000000 35854790415 1493261632 1495052047
+107562000000 107567371417 35854000000 35855790472 1494261632 1496052104
+107565000000 107570371550 35855000000 35856790516 1495261632 1497052148
+107568000000 107573371621 35856000000 35857790540 1496261632 1498052172
+107571000000 107576371847 35857000000 35858790615 1497261632 1499052247
+107574000000 107579372007 35858000000 35859790669 1498261632 1500052301
+107577000000 107582372139 35859000000 35860790713 1499261632 1501052345
+107580000000 107585372247 35860000000 35861790749 1500261632 1502052381
+107583000000 107588372458 35861000000 35862790819 1501261632 1503052451
+107586000000 107591372624 35862000000 35863790874 1502261632 1504052506
+107589000000 107594372735 35863000000 35864790911 1503261632 1505052543
+107592000000 107597372895 35864000000 35865790965 1504261632 1506052597
+107595000000 107600373007 35865000000 35866791002 1505261632 1507052634
+107598000000 107603373205 35866000000 35867791068 1506261632 1508052700
+107601000000 107606373295 35867000000 35868791098 1507261632 1509052730
+107604000000 107609373520 35868000000 35869791173 1508261632 1510052805
+107607000000 107612373652 35869000000 35870791217 1509261632 1511052849
+107610000000 107615373791 35870000000 35871791263 1510261632 1512052895
+107613000000 107618373842 35871000000 35872791280 1511261632 1513052912
+107616000000 107621374053 35872000000 35873791351 1512261632 1514052983
+107619000000 107624374262 35873000000 35874791420 1513261632 1515053052
+107622000000 107627374390 35874000000 35875791463 1514261632 1516053095
+107625000000 107630374533 35875000000 35876791511 1515261632 1517053143
+107628000000 107633374704 35876000000 35877791568 1516261632 1518053200
+107631000000 107636374801 35877000000 35878791600 1517261632 1519053232
+107634000000 107639375014 35878000000 35879791671 1518261632 1520053303
+107637000000 107642375144 35879000000 35880791714 1519261632 1521053346
+107640000000 107645375294 35880000000 35881791764 1520261632 1522053396
+107643000000 107648375454 35881000000 35882791818 1521261632 1523053450
+107646000000 107651375550 35882000000 35883791850 1522261632 1524053482
+107649000000 107654375738 35883000000 35884791912 1523261632 1525053544
+107652000000 107657375906 35884000000 35885791968 1524261632 1526053600
+107655000000 107660376042 35885000000 35886792014 1525261632 1527053646
+107658000000 107663376217 35886000000 35887792072 1526261632 1528053704
+107661000000 107666376339 35887000000 35888792113 1527261632 1529053745
+107664000000 107669376489 35888000000 35889792163 1528261632 1530053795
+107667000000 107672376637 35889000000 35890792212 1529261632 1531053844
+107670000000 107675376843 35890000000 35891792281 1530261632 1532053913
+107673000000 107678376957 35891000000 35892792319 1531261632 1533053951
+107676000000 107681377089 35892000000 35893792363 1532261632 1534053995
+107679000000 107684377263 35893000000 35894792421 1533261632 1535054053
+107682000000 107687377382 35894000000 35895792460 1534261632 1536054092
+107685000000 107690377506 35895000000 35896792502 1535261632 1537054134
+107688000000 107693377725 35896000000 35897792575 1536261632 1538054207
+107691000000 107696377861 35897000000 35898792620 1537261632 1539054252
+107694000000 107699378012 35898000000 35899792670 1538261632 1540054302
+107697000000 107702378172 35899000000 35900792724 1539261632 1541054356
+107700000000 107705378293 35900000000 35901792764 1540261632 1542054396
+107703000000 107708378374 35901000000 35902792791 1541261632 1543054423
+107706000000 107711378582 35902000000 35903792860 1542261632 1544054492
+107709000000 107714378737 35903000000 35904792912 1543261632 1545054544
+107712000000 107717378896 35904000000 35905792965 1544261632 1546054597
+107715000000 107720379048 35905000000 35906793016 1545261632 1547054648
+107718000000 107723379170 35906000000 35907793056 1546261632 1548054688
+107721000000 107726379348 35907000000 35908793116 1547261632 1549054748
+107724000000 107729379497 35908000000 35909793165 1548261632 1550054797
+107727000000 107732379625 35909000000 35910793208 1549261632 1551054840
+107730000000 107735379794 35910000000 35911793264 1550261632 1552054896
+107733000000 107738379914 35911000000 35912793304 1551261632 1553054936
+107736000000 107741379841 35912000000 35913793280 1552261632 1554054912
+107739000000 107744380164 35913000000 35914793388 1553261632 1555055020
+107742000000 107747380417 35914000000 35915793472 1554261632 1556055104
+107745000000 107750380527 35915000000 35916793509 1555261632 1557055141
+107748000000 107753380706 35916000000 35917793568 1556261632 1558055200
+107751000000 107756380754 35917000000 35918793584 1557261632 1559055216
+107754000000 107759381008 35918000000 35919793669 1558261632 1560055301
+107757000000 107762381127 35919000000 35920793709 1559261632 1561055341
+107760000000 107765381298 35920000000 35921793766 1560261632 1562055398
+107763000000 107768381445 35921000000 35922793815 1561261632 1563055447
+107766000000 107771381598 35922000000 35923793866 1562261632 1564055498
+107769000000 107774381744 35923000000 35924793914 1563261632 1565055546
+107772000000 107777381888 35924000000 35925793962 1564261632 1566055594
+107775000000 107780382051 35925000000 35926794017 1565261632 1567055649
+107778000000 107783382203 35926000000 35927794067 1566261632 1568055699
+107781000000 107786382357 35927000000 35928794119 1567261632 1569055751
+107784000000 107789382477 35928000000 35929794159 1568261632 1570055791
+107787000000 107792382686 35929000000 35930794228 1569261632 1571055860
+107790000000 107795382816 35930000000 35931794272 1570261632 1572055904
+107793000000 107798382930 35931000000 35932794310 1571261632 1573055942
+107796000000 107801383091 35932000000 35933794363 1572261632 1574055995
+107799000000 107804383226 35933000000 35934794408 1573261632 1575056040
+107802000000 107807383369 35934000000 35935794456 1574261632 1576056088
+107805000000 107810383469 35935000000 35936794489 1575261632 1577056121
+107808000000 107813383703 35936000000 35937794567 1576261632 1578056199
+107811000000 107816383776 35937000000 35938794592 1577261632 1579056224
+107814000000 107819383897 35938000000 35939794632 1578261632 1580056264
+107817000000 107822384086 35939000000 35940794695 1579261632 1581056327
+107820000000 107825384240 35940000000 35941794746 1580261632 1582056378
+107823000000 107828384419 35941000000 35942794806 1581261632 1583056438
+107826000000 107831384565 35942000000 35943794855 1582261632 1584056487
+107829000000 107834384692 35943000000 35944794897 1583261632 1585056529
+107832000000 107837384866 35944000000 35945794955 1584261632 1586056587
+107835000000 107840384930 35945000000 35946794976 1585261632 1587056608
+107838000000 107843385137 35946000000 35947795045 1586261632 1588056677
+107841000000 107846385318 35947000000 35948795106 1587261632 1589056738
+107844000000 107849385467 35948000000 35949795155 1588261632 1590056787
+107847000000 107852385524 35949000000 35950795174 1589261632 1591056806
+107850000000 107855385720 35950000000 35951795240 1590261632 1592056872
+107853000000 107858385910 35951000000 35952795303 1591261632 1593056935
+107856000000 107861386055 35952000000 35953795351 1592261632 1594056983
+107859000000 107864386227 35953000000 35954795409 1593261632 1595057041
+107862000000 107867386360 35954000000 35955795453 1594261632 1596057085
+107865000000 107870386431 35955000000 35956795477 1595261632 1597057109
+107868000000 107873386657 35956000000 35957795552 1596261632 1598057184
+107871000000 107876386817 35957000000 35958795605 1597261632 1599057237
+107874000000 107879386949 35958000000 35959795649 1598261632 1600057281
+107877000000 107882387057 35959000000 35960795685 1599261632 1601057317
+107880000000 107885387268 35960000000 35961795756 1600261632 1602057388
+107883000000 107888387434 35961000000 35962795811 1601261632 1603057443
+107886000000 107891387545 35962000000 35963795848 1602261632 1604057480
+107889000000 107894387705 35963000000 35964795901 1603261632 1605057533
+107892000000 107897387817 35964000000 35965795939 1604261632 1606057571
+107895000000 107900388015 35965000000 35966796005 1605261632 1607057637
+107898000000 107903388105 35966000000 35967796035 1606261632 1608057667
+107901000000 107906388330 35967000000 35968796110 1607261632 1609057742
+107904000000 107909388462 35968000000 35969796154 1608261632 1610057786
+107907000000 107912388601 35969000000 35970796200 1609261632 1611057832
+107910000000 107915388652 35970000000 35971796217 1610261632 1612057849
+107913000000 107918388863 35971000000 35972796287 1611261632 1613057919
+107916000000 107921389072 35972000000 35973796357 1612261632 1614057989
+107919000000 107924389200 35973000000 35974796400 1613261632 1615058032
+107922000000 107927389343 35974000000 35975796447 1614261632 1616058079
+107925000000 107930389514 35975000000 35976796504 1615261632 1617058136
+107928000000 107933389611 35976000000 35977796537 1616261632 1618058169
+107931000000 107936389824 35977000000 35978796608 1617261632 1619058240
+107934000000 107939389954 35978000000 35979796651 1618261632 1620058283
+107937000000 107942390104 35979000000 35980796701 1619261632 1621058333
+107940000000 107945390264 35980000000 35981796754 1620261632 1622058386
+107943000000 107948390360 35981000000 35982796786 1621261632 1623058418
+107946000000 107951390548 35982000000 35983796849 1622261632 1624058481
+107949000000 107954390716 35983000000 35984796905 1623261632 1625058537
+107952000000 107957390852 35984000000 35985796950 1624261632 1626058582
+107955000000 107960391027 35985000000 35986797009 1625261632 1627058641
+107958000000 107963391149 35986000000 35987797049 1626261632 1628058681
+107961000000 107966391299 35987000000 35988797099 1627261632 1629058731
+107964000000 107969391447 35988000000 35989797149 1628261632 1630058781
+107967000000 107972391653 35989000000 35990797217 1629261632 1631058849
+107970000000 107975391767 35990000000 35991797255 1630261632 1632058887
+107973000000 107978391899 35991000000 35992797299 1631261632 1633058931
+107976000000 107981392073 35992000000 35993797357 1632261632 1634058989
+107979000000 107984392192 35993000000 35994797397 1633261632 1635059029
+107982000000 107987392316 35994000000 35995797438 1634261632 1636059070
+107985000000 107990392535 35995000000 35996797511 1635261632 1637059143
+107988000000 107993392671 35996000000 35997797557 1636261632 1638059189
+107991000000 107996392822 35997000000 35998797607 1637261632 1639059239
+107994000000 107999392982 35998000000 35999797660 1638261632 1640059292
+107997000000 108002393103 35999000000 36000797701 1639261632 1641059333
+108000000000 108005393184 36000000000 36001797728 1640261632 1642059360
+108003000000 108008393392 36001000000 36002797797 1641261632 1643059429
+108006000000 108011393547 36002000000 36003797849 1642261632 1644059481
+108009000000 108014393706 36003000000 36004797902 1643261632 1645059534
+108012000000 108017393858 36004000000 36005797952 1644261632 1646059584
+108015000000 108020393980 36005000000 36006797993 1645261632 1647059625
+108018000000 108023394158 36006000000 36007798052 1646261632 1648059684
+108021000000 108026394307 36007000000 36008798102 1647261632 1649059734
+108024000000 108029394435 36008000000 36009798145 1648261632 1650059777
+108027000000 108032394604 36009000000 36010798201 1649261632 1651059833
+108030000000 108035394724 36010000000 36011798241 1650261632 1652059873
+108033000000 108038394651 36011000000 36012798217 1651261632 1653059849
+108036000000 108041394974 36012000000 36013798324 1652261632 1654059956
+108039000000 108044395227 36013000000 36014798409 1653261632 1655060041
+108042000000 108047395337 36014000000 36015798445 1654261632 1656060077
+108045000000 108050395516 36015000000 36016798505 1655261632 1657060137
+108048000000 108053395564 36016000000 36017798521 1656261632 1658060153
+108051000000 108056395818 36017000000 36018798606 1657261632 1659060238
+108054000000 108059395937 36018000000 36019798645 1658261632 1660060277
+108057000000 108062396108 36019000000 36020798702 1659261632 1661060334
+108060000000 108065396255 36020000000 36021798751 1660261632 1662060383
+108063000000 108068396408 36021000000 36022798802 1661261632 1663060434
+108066000000 108071396554 36022000000 36023798851 1662261632 1664060483
+108069000000 108074396698 36023000000 36024798899 1663261632 1665060531
+108072000000 108077396861 36024000000 36025798953 1664261632 1666060585
+108075000000 108080397013 36025000000 36026799004 1665261632 1667060636
+108078000000 108083397167 36026000000 36027799055 1666261632 1668060687
+108081000000 108086397287 36027000000 36028799095 1667261632 1669060727
+108084000000 108089397496 36028000000 36029799165 1668261632 1670060797
+108087000000 108092397626 36029000000 36030799208 1669261632 1671060840
+108090000000 108095397740 36030000000 36031799246 1670261632 1672060878
+108093000000 108098397901 36031000000 36032799300 1671261632 1673060932
+108096000000 108101398036 36032000000 36033799345 1672261632 1674060977
+108099000000 108104398179 36033000000 36034799393 1673261632 1675061025
+108102000000 108107398279 36034000000 36035799426 1674261632 1676061058
+108105000000 108110398513 36035000000 36036799504 1675261632 1677061136
+108108000000 108113398586 36036000000 36037799528 1676261632 1678061160
+108111000000 108116398707 36037000000 36038799569 1677261632 1679061201
+108114000000 108119398896 36038000000 36039799632 1678261632 1680061264
+108117000000 108122399050 36039000000 36040799683 1679261632 1681061315
+108120000000 108125399229 36040000000 36041799743 1680261632 1682061375
+108123000000 108128399375 36041000000 36042799791 1681261632 1683061423
+108126000000 108131399502 36042000000 36043799834 1682261632 1684061466
+108129000000 108134399676 36043000000 36044799892 1683261632 1685061524
+108132000000 108137399740 36044000000 36045799913 1684261632 1686061545
+108135000000 108140399947 36045000000 36046799982 1685261632 1687061614
+108138000000 108143400128 36046000000 36047800042 1686261632 1688061674
+108141000000 108146400277 36047000000 36048800092 1687261632 1689061724
+108144000000 108149400334 36048000000 36049800111 1688261632 1690061743
+108147000000 108152400530 36049000000 36050800176 1689261632 1691061808
+108150000000 108155400720 36050000000 36051800240 1690261632 1692061872
+108153000000 108158400865 36051000000 36052800288 1691261632 1693061920
+108156000000 108161401037 36052000000 36053800345 1692261632 1694061977
+108159000000 108164401170 36053000000 36054800390 1693261632 1695062022
+108162000000 108167401241 36054000000 36055800413 1694261632 1696062045
+108165000000 108170401467 36055000000 36056800489 1695261632 1697062121
+108168000000 108173401627 36056000000 36057800542 1696261632 1698062174
+108171000000 108176401759 36057000000 36058800586 1697261632 1699062218
+108174000000 108179401867 36058000000 36059800622 1698261632 1700062254
+108177000000 108182402078 36059000000 36060800692 1699261632 1701062324
+108180000000 108185402244 36060000000 36061800748 1700261632 1702062380
+108183000000 108188402355 36061000000 36062800785 1701261632 1703062417
+108186000000 108191402515 36062000000 36063800838 1702261632 1704062470
+108189000000 108194402627 36063000000 36064800875 1703261632 1705062507
+108192000000 108197402825 36064000000 36065800941 1704261632 1706062573
+108195000000 108200402915 36065000000 36066800971 1705261632 1707062603
+108198000000 108203403140 36066000000 36067801046 1706261632 1708062678
+108201000000 108206403272 36067000000 36068801090 1707261632 1709062722
+108204000000 108209403411 36068000000 36069801137 1708261632 1710062769
+108207000000 108212403462 36069000000 36070801154 1709261632 1711062786
+108210000000 108215403673 36070000000 36071801224 1710261632 1712062856
+108213000000 108218403882 36071000000 36072801294 1711261632 1713062926
+108216000000 108221404010 36072000000 36073801336 1712261632 1714062968
+108219000000 108224404153 36073000000 36074801384 1713261632 1715063016
+108222000000 108227404324 36074000000 36075801441 1714261632 1716063073
+108225000000 108230404421 36075000000 36076801473 1715261632 1717063105
+108228000000 108233404634 36076000000 36077801544 1716261632 1718063176
+108231000000 108236404764 36077000000 36078801588 1717261632 1719063220
+108234000000 108239404914 36078000000 36079801638 1718261632 1720063270
+108237000000 108242405074 36079000000 36080801691 1719261632 1721063323
+108240000000 108245405170 36080000000 36081801723 1720261632 1722063355
+108243000000 108248405358 36081000000 36082801786 1721261632 1723063418
+108246000000 108251405526 36082000000 36083801842 1722261632 1724063474
+108249000000 108254405662 36083000000 36084801887 1723261632 1725063519
+108252000000 108257405837 36084000000 36085801945 1724261632 1726063577
+108255000000 108260405959 36085000000 36086801986 1725261632 1727063618
+108258000000 108263406109 36086000000 36087802036 1726261632 1728063668
+108261000000 108266406257 36087000000 36088802085 1727261632 1729063717
+108264000000 108269406463 36088000000 36089802154 1728261632 1730063786
+108267000000 108272406577 36089000000 36090802192 1729261632 1731063824
+108270000000 108275406709 36090000000 36091802236 1730261632 1732063868
+108273000000 108278406883 36091000000 36092802294 1731261632 1733063926
+108276000000 108281407002 36092000000 36093802334 1732261632 1734063966
+108279000000 108284407126 36093000000 36094802375 1733261632 1735064007
+108282000000 108287407345 36094000000 36095802448 1734261632 1736064080
+108285000000 108290407481 36095000000 36096802493 1735261632 1737064125
+108288000000 108293407632 36096000000 36097802544 1736261632 1738064176
+108291000000 108296407792 36097000000 36098802597 1737261632 1739064229
+108294000000 108299407913 36098000000 36099802637 1738261632 1740064269
+108297000000 108302407994 36099000000 36100802664 1739261632 1741064296
+108300000000 108305408202 36100000000 36101802734 1740261632 1742064366
+108303000000 108308408357 36101000000 36102802785 1741261632 1743064417
+108306000000 108311408516 36102000000 36103802838 1742261632 1744064470
+108309000000 108314408668 36103000000 36104802889 1743261632 1745064521
+108312000000 108317408790 36104000000 36105802930 1744261632 1746064562
+108315000000 108320408968 36105000000 36106802989 1745261632 1747064621
+108318000000 108323409117 36106000000 36107803039 1746261632 1748064671
+108321000000 108326409245 36107000000 36108803081 1747261632 1749064713
+108324000000 108329409414 36108000000 36109803138 1748261632 1750064770
+108327000000 108332409534 36109000000 36110803178 1749261632 1751064810
+108330000000 108335409461 36110000000 36111803153 1750261632 1752064785
+108333000000 108338409784 36111000000 36112803261 1751261632 1753064893
+108336000000 108341410037 36112000000 36113803345 1752261632 1754064977
+108339000000 108344410147 36113000000 36114803382 1753261632 1755065014
+108342000000 108347410326 36114000000 36115803442 1754261632 1756065074
+108345000000 108350410374 36115000000 36116803458 1755261632 1757065090
+108348000000 108353410628 36116000000 36117803542 1756261632 1758065174
+108351000000 108356410747 36117000000 36118803582 1757261632 1759065214
+108354000000 108359410918 36118000000 36119803639 1758261632 1760065271
+108357000000 108362411065 36119000000 36120803688 1759261632 1761065320
+108360000000 108365411218 36120000000 36121803739 1760261632 1762065371
+108363000000 108368411364 36121000000 36122803788 1761261632 1763065420
+108366000000 108371411508 36122000000 36123803836 1762261632 1764065468
+108369000000 108374411671 36123000000 36124803890 1763261632 1765065522
+108372000000 108377411823 36124000000 36125803941 1764261632 1766065573
+108375000000 108380411977 36125000000 36126803992 1765261632 1767065624
+108378000000 108383412097 36126000000 36127804032 1766261632 1768065664
+108381000000 108386412306 36127000000 36128804102 1767261632 1769065734
+108384000000 108389412436 36128000000 36129804145 1768261632 1770065777
+108387000000 108392412550 36129000000 36130804183 1769261632 1771065815
+108390000000 108395412711 36130000000 36131804237 1770261632 1772065869
+108393000000 108398412846 36131000000 36132804282 1771261632 1773065914
+108396000000 108401412989 36132000000 36133804329 1772261632 1774065961
+108399000000 108404413089 36133000000 36134804363 1773261632 1775065995
+108402000000 108407413323 36134000000 36135804441 1774261632 1776066073
+108405000000 108410413396 36135000000 36136804465 1775261632 1777066097
+108408000000 108413413517 36136000000 36137804505 1776261632 1778066137
+108411000000 108416413706 36137000000 36138804568 1777261632 1779066200
+108414000000 108419413860 36138000000 36139804620 1778261632 1780066252
+108417000000 108422414039 36139000000 36140804679 1779261632 1781066311
+108420000000 108425414185 36140000000 36141804728 1780261632 1782066360
+108423000000 108428414312 36141000000 36142804770 1781261632 1783066402
+108426000000 108431414486 36142000000 36143804828 1782261632 1784066460
+108429000000 108434414550 36143000000 36144804850 1783261632 1785066482
+108432000000 108437414757 36144000000 36145804919 1784261632 1786066551
+108435000000 108440414938 36145000000 36146804979 1785261632 1787066611
+108438000000 108443415087 36146000000 36147805029 1786261632 1788066661
+108441000000 108446415144 36147000000 36148805048 1787261632 1789066680
+108444000000 108449415340 36148000000 36149805113 1788261632 1790066745
+108447000000 108452415530 36149000000 36150805176 1789261632 1791066808
+108450000000 108455415675 36150000000 36151805225 1790261632 1792066857
+108453000000 108458415847 36151000000 36152805282 1791261632 1793066914
+108456000000 108461415980 36152000000 36153805326 1792261632 1794066958
+108459000000 108464416051 36153000000 36154805350 1793261632 1795066982
+108462000000 108467416277 36154000000 36155805425 1794261632 1796067057
+108465000000 108470416437 36155000000 36156805479 1795261632 1797067111
+108468000000 108473416569 36156000000 36157805523 1796261632 1798067155
+108471000000 108476416677 36157000000 36158805559 1797261632 1799067191
+108474000000 108479416888 36158000000 36159805629 1798261632 1800067261
+108477000000 108482417054 36159000000 36160805684 1799261632 1801067316
+108480000000 108485417165 36160000000 36161805721 1800261632 1802067353
+108483000000 108488417325 36161000000 36162805775 1801261632 1803067407
+108486000000 108491417437 36162000000 36163805812 1802261632 1804067444
+108489000000 108494417635 36163000000 36164805878 1803261632 1805067510
+108492000000 108497417725 36164000000 36165805908 1804261632 1806067540
+108495000000 108500417950 36165000000 36166805983 1805261632 1807067615
+108498000000 108503418082 36166000000 36167806027 1806261632 1808067659
+108501000000 108506418221 36167000000 36168806073 1807261632 1809067705
+108504000000 108509418272 36168000000 36169806090 1808261632 1810067722
+108507000000 108512418483 36169000000 36170806161 1809261632 1811067793
+108510000000 108515418692 36170000000 36171806230 1810261632 1812067862
+108513000000 108518418820 36171000000 36172806273 1811261632 1813067905
+108516000000 108521418963 36172000000 36173806321 1812261632 1814067953
+108519000000 108524419134 36173000000 36174806378 1813261632 1815068010
+108522000000 108527419231 36174000000 36175806410 1814261632 1816068042
+108525000000 108530419444 36175000000 36176806481 1815261632 1817068113
+108528000000 108533419574 36176000000 36177806524 1816261632 1818068156
+108531000000 108536419724 36177000000 36178806574 1817261632 1819068206
+108534000000 108539419884 36178000000 36179806628 1818261632 1820068260
+108537000000 108542419980 36179000000 36180806660 1819261632 1821068292
+108540000000 108545420168 36180000000 36181806722 1820261632 1822068354
+108543000000 108548420336 36181000000 36182806778 1821261632 1823068410
+108546000000 108551420472 36182000000 36183806824 1822261632 1824068456
+108549000000 108554420647 36183000000 36184806882 1823261632 1825068514
+108552000000 108557420769 36184000000 36185806923 1824261632 1826068555
+108555000000 108560420919 36185000000 36186806973 1825261632 1827068605
+108558000000 108563421067 36186000000 36187807022 1826261632 1828068654
+108561000000 108566421273 36187000000 36188807091 1827261632 1829068723
+108564000000 108569421387 36188000000 36189807129 1828261632 1830068761
+108567000000 108572421519 36189000000 36190807173 1829261632 1831068805
+108570000000 108575421693 36190000000 36191807231 1830261632 1832068863
+108573000000 108578421812 36191000000 36192807270 1831261632 1833068902
+108576000000 108581421936 36192000000 36193807312 1832261632 1834068944
+108579000000 108584422155 36193000000 36194807385 1833261632 1835069017
+108582000000 108587422291 36194000000 36195807430 1834261632 1836069062
+108585000000 108590422442 36195000000 36196807480 1835261632 1837069112
+108588000000 108593422602 36196000000 36197807534 1836261632 1838069166
+108591000000 108596422723 36197000000 36198807574 1837261632 1839069206
+108594000000 108599422804 36198000000 36199807601 1838261632 1840069233
+108597000000 108602423012 36199000000 36200807670 1839261632 1841069302
+108600000000 108605423167 36200000000 36201807722 1840261632 1842069354
+108603000000 108608423326 36201000000 36202807775 1841261632 1843069407
+108606000000 108611423478 36202000000 36203807826 1842261632 1844069458
+108609000000 108614423600 36203000000 36204807866 1843261632 1845069498
+108612000000 108617423778 36204000000 36205807926 1844261632 1846069558
+108615000000 108620423927 36205000000 36206807975 1845261632 1847069607
+108618000000 108623424055 36206000000 36207808018 1846261632 1848069650
+108621000000 108626424224 36207000000 36208808074 1847261632 1849069706
+108624000000 108629424344 36208000000 36209808114 1848261632 1850069746
+108627000000 108632424271 36209000000 36210808090 1849261632 1851069722
+108630000000 108635424594 36210000000 36211808198 1850261632 1852069830
+108633000000 108638424847 36211000000 36212808282 1851261632 1853069914
+108636000000 108641424957 36212000000 36213808319 1852261632 1854069951
+108639000000 108644425136 36213000000 36214808378 1853261632 1855070010
+108642000000 108647425184 36214000000 36215808394 1854261632 1856070026
+108645000000 108650425438 36215000000 36216808479 1855261632 1857070111
+108648000000 108653425557 36216000000 36217808519 1856261632 1858070151
+108651000000 108656425728 36217000000 36218808576 1857261632 1859070208
+108654000000 108659425875 36218000000 36219808625 1858261632 1860070257
+108657000000 108662426028 36219000000 36220808676 1859261632 1861070308
+108660000000 108665426174 36220000000 36221808724 1860261632 1862070356
+108663000000 108668426318 36221000000 36222808772 1861261632 1863070404
+108666000000 108671426481 36222000000 36223808827 1862261632 1864070459
+108669000000 108674426633 36223000000 36224808877 1863261632 1865070509
+108672000000 108677426787 36224000000 36225808929 1864261632 1866070561
+108675000000 108680426907 36225000000 36226808969 1865261632 1867070601
+108678000000 108683427116 36226000000 36227809038 1866261632 1868070670
+108681000000 108686427246 36227000000 36228809082 1867261632 1869070714
+108684000000 108689427360 36228000000 36229809120 1868261632 1870070752
+108687000000 108692427521 36229000000 36230809173 1869261632 1871070805
+108690000000 108695427656 36230000000 36231809218 1870261632 1872070850
+108693000000 108698427799 36231000000 36232809266 1871261632 1873070898
+108696000000 108701427899 36232000000 36233809299 1872261632 1874070931
+108699000000 108704428133 36233000000 36234809377 1873261632 1875071009
+108702000000 108707428206 36234000000 36235809402 1874261632 1876071034
+108705000000 108710428327 36235000000 36236809442 1875261632 1877071074
+108708000000 108713428516 36236000000 36237809505 1876261632 1878071137
+108711000000 108716428670 36237000000 36238809556 1877261632 1879071188
+108714000000 108719428849 36238000000 36239809616 1878261632 1880071248
+108717000000 108722428995 36239000000 36240809665 1879261632 1881071297
+108720000000 108725429122 36240000000 36241809707 1880261632 1882071339
+108723000000 108728429296 36241000000 36242809765 1881261632 1883071397
+108726000000 108731429360 36242000000 36243809786 1882261632 1884071418
+108729000000 108734429567 36243000000 36244809855 1883261632 1885071487
+108732000000 108737429748 36244000000 36245809916 1884261632 1886071548
+108735000000 108740429897 36245000000 36246809965 1885261632 1887071597
+108738000000 108743429954 36246000000 36247809984 1886261632 1888071616
+108741000000 108746430150 36247000000 36248810050 1887261632 1889071682
+108744000000 108749430340 36248000000 36249810113 1888261632 1890071745
+108747000000 108752430485 36249000000 36250810161 1889261632 1891071793
+108750000000 108755430657 36250000000 36251810219 1890261632 1892071851
+108753000000 108758430790 36251000000 36252810263 1891261632 1893071895
+108756000000 108761430861 36252000000 36253810287 1892261632 1894071919
+108759000000 108764431087 36253000000 36254810362 1893261632 1895071994
+108762000000 108767431247 36254000000 36255810415 1894261632 1896072047
+108765000000 108770431379 36255000000 36256810459 1895261632 1897072091
+108768000000 108773431487 36256000000 36257810495 1896261632 1898072127
+108771000000 108776431698 36257000000 36258810566 1897261632 1899072198
+108774000000 108779431864 36258000000 36259810621 1898261632 1900072253
+108777000000 108782431975 36259000000 36260810658 1899261632 1901072290
+108780000000 108785432135 36260000000 36261810711 1900261632 1902072343
+108783000000 108788432247 36261000000 36262810749 1901261632 1903072381
+108786000000 108791432445 36262000000 36263810815 1902261632 1904072447
+108789000000 108794432535 36263000000 36264810845 1903261632 1905072477
+108792000000 108797432760 36264000000 36265810920 1904261632 1906072552
+108795000000 108800432892 36265000000 36266810964 1905261632 1907072596
+108798000000 108803433031 36266000000 36267811010 1906261632 1908072642
+108801000000 108806433082 36267000000 36268811027 1907261632 1909072659
+108804000000 108809433293 36268000000 36269811097 1908261632 1910072729
+108807000000 108812433502 36269000000 36270811167 1909261632 1911072799
+108810000000 108815433630 36270000000 36271811210 1910261632 1912072842
+108813000000 108818433773 36271000000 36272811257 1911261632 1913072889
+108816000000 108821433944 36272000000 36273811314 1912261632 1914072946
+108819000000 108824434041 36273000000 36274811347 1913261632 1915072979
+108822000000 108827434254 36274000000 36275811418 1914261632 1916073050
+108825000000 108830434384 36275000000 36276811461 1915261632 1917073093
+108828000000 108833434534 36276000000 36277811511 1916261632 1918073143
+108831000000 108836434694 36277000000 36278811564 1917261632 1919073196
+108834000000 108839434790 36278000000 36279811596 1918261632 1920073228
+108837000000 108842434978 36279000000 36280811659 1919261632 1921073291
+108840000000 108845435146 36280000000 36281811715 1920261632 1922073347
+108843000000 108848435282 36281000000 36282811760 1921261632 1923073392
+108846000000 108851435457 36282000000 36283811819 1922261632 1924073451
+108849000000 108854435579 36283000000 36284811859 1923261632 1925073491
+108852000000 108857435729 36284000000 36285811909 1924261632 1926073541
+108855000000 108860435877 36285000000 36286811959 1925261632 1927073591
+108858000000 108863436083 36286000000 36287812027 1926261632 1928073659
+108861000000 108866436197 36287000000 36288812065 1927261632 1929073697
+108864000000 108869436329 36288000000 36289812109 1928261632 1930073741
+108867000000 108872436503 36289000000 36290812167 1929261632 1931073799
+108870000000 108875436622 36290000000 36291812207 1930261632 1932073839
+108873000000 108878436746 36291000000 36292812248 1931261632 1933073880
+108876000000 108881436965 36292000000 36293812321 1932261632 1934073953
+108879000000 108884437101 36293000000 36294812367 1933261632 1935073999
+108882000000 108887437252 36294000000 36295812417 1934261632 1936074049
+108885000000 108890437412 36295000000 36296812470 1935261632 1937074102
+108888000000 108893437533 36296000000 36297812511 1936261632 1938074143
+108891000000 108896437614 36297000000 36298812538 1937261632 1939074170
+108894000000 108899437822 36298000000 36299812607 1938261632 1940074239
+108897000000 108902437977 36299000000 36300812659 1939261632 1941074291
+108900000000 108905438136 36300000000 36301812712 1940261632 1942074344
+108903000000 108908438288 36301000000 36302812762 1941261632 1943074394
+108906000000 108911438410 36302000000 36303812803 1942261632 1944074435
+108909000000 108914438588 36303000000 36304812862 1943261632 1945074494
+108912000000 108917438737 36304000000 36305812912 1944261632 1946074544
+108915000000 108920438865 36305000000 36306812955 1945261632 1947074587
+108918000000 108923439034 36306000000 36307813011 1946261632 1948074643
+108921000000 108926439154 36307000000 36308813051 1947261632 1949074683
+108924000000 108929439081 36308000000 36309813027 1948261632 1950074659
+108927000000 108932439404 36309000000 36310813134 1949261632 1951074766
+108930000000 108935439657 36310000000 36311813219 1950261632 1952074851
+108933000000 108938439767 36311000000 36312813255 1951261632 1953074887
+108936000000 108941439946 36312000000 36313813315 1952261632 1954074947
+108939000000 108944439994 36313000000 36314813331 1953261632 1955074963
+108942000000 108947440248 36314000000 36315813416 1954261632 1956075048
+108945000000 108950440367 36315000000 36316813455 1955261632 1957075087
+108948000000 108953440538 36316000000 36317813512 1956261632 1958075144
+108951000000 108956440685 36317000000 36318813561 1957261632 1959075193
+108954000000 108959440838 36318000000 36319813612 1958261632 1960075244
+108957000000 108962440984 36319000000 36320813661 1959261632 1961075293
+108960000000 108965441128 36320000000 36321813709 1960261632 1962075341
+108963000000 108968441291 36321000000 36322813763 1961261632 1963075395
+108966000000 108971441443 36322000000 36323813814 1962261632 1964075446
+108969000000 108974441597 36323000000 36324813865 1963261632 1965075497
+108972000000 108977441717 36324000000 36325813905 1964261632 1966075537
+108975000000 108980441926 36325000000 36326813975 1965261632 1967075607
+108978000000 108983442056 36326000000 36327814018 1966261632 1968075650
+108981000000 108986442170 36327000000 36328814056 1967261632 1969075688
+108984000000 108989442331 36328000000 36329814110 1968261632 1970075742
+108987000000 108992442466 36329000000 36330814155 1969261632 1971075787
+108990000000 108995442609 36330000000 36331814203 1970261632 1972075835
+108993000000 108998442709 36331000000 36332814236 1971261632 1973075868
+108996000000 109001442943 36332000000 36333814314 1972261632 1974075946
+108999000000 109004443016 36333000000 36334814338 1973261632 1975075970
+109002000000 109007443137 36334000000 36335814379 1974261632 1976076011
+109005000000 109010443326 36335000000 36336814442 1975261632 1977076074
+109008000000 109013443480 36336000000 36337814493 1976261632 1978076125
+109011000000 109016443659 36337000000 36338814553 1977261632 1979076185
+109014000000 109019443805 36338000000 36339814601 1978261632 1980076233
+109017000000 109022443932 36339000000 36340814644 1979261632 1981076276
+109020000000 109025444106 36340000000 36341814702 1980261632 1982076334
+109023000000 109028444170 36341000000 36342814723 1981261632 1983076355
+109026000000 109031444377 36342000000 36343814792 1982261632 1984076424
+109029000000 109034444558 36343000000 36344814852 1983261632 1985076484
+109032000000 109037444707 36344000000 36345814902 1984261632 1986076534
+109035000000 109040444764 36345000000 36346814921 1985261632 1987076553
+109038000000 109043444960 36346000000 36347814986 1986261632 1988076618
+109041000000 109046445150 36347000000 36348815050 1987261632 1989076682
+109044000000 109049445295 36348000000 36349815098 1988261632 1990076730
+109047000000 109052445467 36349000000 36350815155 1989261632 1991076787
+109050000000 109055445600 36350000000 36351815200 1990261632 1992076832
+109053000000 109058445671 36351000000 36352815223 1991261632 1993076855
+109056000000 109061445897 36352000000 36353815299 1992261632 1994076931
+109059000000 109064446057 36353000000 36354815352 1993261632 1995076984
+109062000000 109067446189 36354000000 36355815396 1994261632 1996077028
+109065000000 109070446297 36355000000 36356815432 1995261632 1997077064
+109068000000 109073446508 36356000000 36357815502 1996261632 1998077134
+109071000000 109076446674 36357000000 36358815558 1997261632 1999077190
+109074000000 109079446785 36358000000 36359815595 1998261632 2000077227
+109077000000 109082446945 36359000000 36360815648 1999261632 2001077280
+109080000000 109085447057 36360000000 36361815685 2000261632 2002077317
+109083000000 109088447255 36361000000 36362815751 2001261632 2003077383
+109086000000 109091447345 36362000000 36363815781 2002261632 2004077413
+109089000000 109094447570 36363000000 36364815856 2003261632 2005077488
+109092000000 109097447702 36364000000 36365815900 2004261632 2006077532
+109095000000 109100447841 36365000000 36366815947 2005261632 2007077579
+109098000000 109103447892 36366000000 36367815964 2006261632 2008077596
+109101000000 109106448103 36367000000 36368816034 2007261632 2009077666
+109104000000 109109448312 36368000000 36369816104 2008261632 2010077736
+109107000000 109112448440 36369000000 36370816146 2009261632 2011077778
+109110000000 109115448583 36370000000 36371816194 2010261632 2012077826
+109113000000 109118448754 36371000000 36372816251 2011261632 2013077883
+109116000000 109121448851 36372000000 36373816283 2012261632 2014077915
+109119000000 109124449064 36373000000 36374816354 2013261632 2015077986
+109122000000 109127449194 36374000000 36375816398 2014261632 2016078030
+109125000000 109130449344 36375000000 36376816448 2015261632 2017078080
+109128000000 109133449504 36376000000 36377816501 2016261632 2018078133
+109131000000 109136449600 36377000000 36378816533 2017261632 2019078165
+109134000000 109139449788 36378000000 36379816596 2018261632 2020078228
+109137000000 109142449956 36379000000 36380816652 2019261632 2021078284
+109140000000 109145450092 36380000000 36381816697 2020261632 2022078329
+109143000000 109148450267 36381000000 36382816755 2021261632 2023078387
+109146000000 109151450389 36382000000 36383816796 2022261632 2024078428
+109149000000 109154450539 36383000000 36384816846 2023261632 2025078478
+109152000000 109157450687 36384000000 36385816895 2024261632 2026078527
+109155000000 109160450893 36385000000 36386816964 2025261632 2027078596
+109158000000 109163451007 36386000000 36387817002 2026261632 2028078634
+109161000000 109166451139 36387000000 36388817046 2027261632 2029078678
+109164000000 109169451313 36388000000 36389817104 2028261632 2030078736
+109167000000 109172451432 36389000000 36390817144 2029261632 2031078776
+109170000000 109175451556 36390000000 36391817185 2030261632 2032078817
+109173000000 109178451775 36391000000 36392817258 2031261632 2033078890
+109176000000 109181451911 36392000000 36393817303 2032261632 2034078935
+109179000000 109184452062 36393000000 36394817354 2033261632 2035078986
+109182000000 109187452222 36394000000 36395817407 2034261632 2036079039
+109185000000 109190452343 36395000000 36396817447 2035261632 2037079079
+109188000000 109193452424 36396000000 36397817474 2036261632 2038079106
+109191000000 109196452632 36397000000 36398817544 2037261632 2039079176
+109194000000 109199452787 36398000000 36399817595 2038261632 2040079227
+109197000000 109202452946 36399000000 36400817648 2039261632 2041079280
+109200000000 109205453098 36400000000 36401817699 2040261632 2042079331
+109203000000 109208453220 36401000000 36402817740 2041261632 2043079372
+109206000000 109211453398 36402000000 36403817799 2042261632 2044079431
+109209000000 109214453547 36403000000 36404817849 2043261632 2045079481
+109212000000 109217453675 36404000000 36405817891 2044261632 2046079523
+109215000000 109220453844 36405000000 36406817948 2045261632 2047079580
+109218000000 109223453964 36406000000 36407817988 2046261632 2048079620
+109221000000 109226453891 36407000000 36408817963 2047261632 2049079595
+109224000000 109229454214 36408000000 36409818071 2048261632 2050079703
+109227000000 109232454467 36409000000 36410818155 2049261632 2051079787
+109230000000 109235454577 36410000000 36411818192 2050261632 2052079824
+109233000000 109238454756 36411000000 36412818252 2051261632 2053079884
+109236000000 109241454804 36412000000 36413818268 2052261632 2054079900
+109239000000 109244455058 36413000000 36414818352 2053261632 2055079984
+109242000000 109247455177 36414000000 36415818392 2054261632 2056080024
+109245000000 109250455348 36415000000 36416818449 2055261632 2057080081
+109248000000 109253455495 36416000000 36417818498 2056261632 2058080130
+109251000000 109256455648 36417000000 36418818549 2057261632 2059080181
+109254000000 109259455794 36418000000 36419818598 2058261632 2060080230
+109257000000 109262455938 36419000000 36420818646 2059261632 2061080278
+109260000000 109265456101 36420000000 36421818700 2060261632 2062080332
+109263000000 109268456253 36421000000 36422818751 2061261632 2063080383
+109266000000 109271456407 36422000000 36423818802 2062261632 2064080434
+109269000000 109274456527 36423000000 36424818842 2063261632 2065080474
+109272000000 109277456736 36424000000 36425818912 2064261632 2066080544
+109275000000 109280456866 36425000000 36426818955 2065261632 2067080587
+109278000000 109283456980 36426000000 36427818993 2066261632 2068080625
+109281000000 109286457141 36427000000 36428819047 2067261632 2069080679
+109284000000 109289457276 36428000000 36429819092 2068261632 2070080724
+109287000000 109292457419 36429000000 36430819139 2069261632 2071080771
+109290000000 109295457519 36430000000 36431819173 2070261632 2072080805
+109293000000 109298457753 36431000000 36432819251 2071261632 2073080883
+109296000000 109301457826 36432000000 36433819275 2072261632 2074080907
+109299000000 109304457947 36433000000 36434819315 2073261632 2075080947
+109302000000 109307458136 36434000000 36435819378 2074261632 2076081010
+109305000000 109310458290 36435000000 36436819430 2075261632 2077081062
+109308000000 109313458469 36436000000 36437819489 2076261632 2078081121
+109311000000 109316458615 36437000000 36438819538 2077261632 2079081170
+109314000000 109319458742 36438000000 36439819580 2078261632 2080081212
+109317000000 109322458916 36439000000 36440819638 2079261632 2081081270
+109320000000 109325458980 36440000000 36441819660 2080261632 2082081292
+109323000000 109328459187 36441000000 36442819729 2081261632 2083081361
+109326000000 109331459368 36442000000 36443819789 2082261632 2084081421
+109329000000 109334459517 36443000000 36444819839 2083261632 2085081471
+109332000000 109337459574 36444000000 36445819858 2084261632 2086081490
+109335000000 109340459770 36445000000 36446819923 2085261632 2087081555
+109338000000 109343459960 36446000000 36447819986 2086261632 2088081618
+109341000000 109346460105 36447000000 36448820035 2087261632 2089081667
+109344000000 109349460277 36448000000 36449820092 2088261632 2090081724
+109347000000 109352460410 36449000000 36450820136 2089261632 2091081768
+109350000000 109355460481 36450000000 36451820160 2090261632 2092081792
+109353000000 109358460707 36451000000 36452820235 2091261632 2093081867
+109356000000 109361460867 36452000000 36453820289 2092261632 2094081921
+109359000000 109364460999 36453000000 36454820333 2093261632 2095081965
+109362000000 109367461107 36454000000 36455820369 2094261632 2096082001
+109365000000 109370461318 36455000000 36456820439 2095261632 2097082071
+109368000000 109373461484 36456000000 36457820494 2096261632 2098082126
+109371000000 109376461595 36457000000 36458820531 2097261632 2099082163
+109374000000 109379461755 36458000000 36459820585 2098261632 2100082217
+109377000000 109382461867 36459000000 36460820622 2099261632 2101082254
+109380000000 109385462065 36460000000 36461820688 2100261632 2102082320
+109383000000 109388462155 36461000000 36462820718 2101261632 2103082350
+109386000000 109391462380 36462000000 36463820793 2102261632 2104082425
+109389000000 109394462512 36463000000 36464820837 2103261632 2105082469
+109392000000 109397462651 36464000000 36465820883 2104261632 2106082515
+109395000000 109400462702 36465000000 36466820900 2105261632 2107082532
+109398000000 109403462913 36466000000 36467820971 2106261632 2108082603
+109401000000 109406463122 36467000000 36468821040 2107261632 2109082672
+109404000000 109409463250 36468000000 36469821083 2108261632 2110082715
+109407000000 109412463393 36469000000 36470821131 2109261632 2111082763
+109410000000 109415463564 36470000000 36471821188 2110261632 2112082820
+109413000000 109418463661 36471000000 36472821220 2111261632 2113082852
+109416000000 109421463874 36472000000 36473821291 2112261632 2114082923
+109419000000 109424464004 36473000000 36474821334 2113261632 2115082966
+109422000000 109427464154 36474000000 36475821384 2114261632 2116083016
+109425000000 109430464314 36475000000 36476821438 2115261632 2117083070
+109428000000 109433464410 36476000000 36477821470 2116261632 2118083102
+109431000000 109436464598 36477000000 36478821532 2117261632 2119083164
+109434000000 109439464766 36478000000 36479821588 2118261632 2120083220
+109437000000 109442464902 36479000000 36480821634 2119261632 2121083266
+109440000000 109445465077 36480000000 36481821692 2120261632 2122083324
+109443000000 109448465199 36481000000 36482821733 2121261632 2123083365
+109446000000 109451465349 36482000000 36483821783 2122261632 2124083415
+109449000000 109454465497 36483000000 36484821832 2123261632 2125083464
+109452000000 109457465703 36484000000 36485821901 2124261632 2126083533
+109455000000 109460465817 36485000000 36486821939 2125261632 2127083571
+109458000000 109463465949 36486000000 36487821983 2126261632 2128083615
+109461000000 109466466123 36487000000 36488822041 2127261632 2129083673
+109464000000 109469466242 36488000000 36489822080 2128261632 2130083712
+109467000000 109472466366 36489000000 36490822122 2129261632 2131083754
+109470000000 109475466585 36490000000 36491822195 2130261632 2132083827
+109473000000 109478466721 36491000000 36492822240 2131261632 2133083872
+109476000000 109481466872 36492000000 36493822290 2132261632 2134083922
+109479000000 109484467032 36493000000 36494822344 2133261632 2135083976
+109482000000 109487467153 36494000000 36495822384 2134261632 2136084016
+109485000000 109490467234 36495000000 36496822411 2135261632 2137084043
+109488000000 109493467442 36496000000 36497822480 2136261632 2138084112
+109491000000 109496467597 36497000000 36498822532 2137261632 2139084164
+109494000000 109499467756 36498000000 36499822585 2138261632 2140084217
+109497000000 109502467908 36499000000 36500822636 2139261632 2141084268
+109500000000 109505468030 36500000000 36501822676 2140261632 2142084308
+109503000000 109508468208 36501000000 36502822736 2141261632 2143084368
+109506000000 109511468357 36502000000 36503822785 2142261632 2144084417
+109509000000 109514468485 36503000000 36504822828 2143261632 2145084460
+109512000000 109517468654 36504000000 36505822884 2144261632 2146084516
+109515000000 109520468774 36505000000 36506822924 2145261632 2147084556
+109518000000 109523468701 36506000000 36507822900 2146261632 2148084532
+109521000000 109526469024 36507000000 36508823008 2147261632 2149084640
+109524000000 109529469277 36508000000 36509823092 2148261632 2150084724
+109527000000 109532469387 36509000000 36510823129 2149261632 2151084761
+109530000000 109535469566 36510000000 36511823188 2150261632 2152084820
+109533000000 109538469614 36511000000 36512823204 2151261632 2153084836
+109536000000 109541469868 36512000000 36513823289 2152261632 2154084921
+109539000000 109544469987 36513000000 36514823329 2153261632 2155084961
+109542000000 109547470158 36514000000 36515823386 2154261632 2156085018
+109545000000 109550470305 36515000000 36516823435 2155261632 2157085067
+109548000000 109553470458 36516000000 36517823486 2156261632 2158085118
+109551000000 109556470604 36517000000 36518823534 2157261632 2159085166
+109554000000 109559470748 36518000000 36519823582 2158261632 2160085214
+109557000000 109562470911 36519000000 36520823637 2159261632 2161085269
+109560000000 109565471063 36520000000 36521823687 2160261632 2162085319
+109563000000 109568471217 36521000000 36522823739 2161261632 2163085371
+109566000000 109571471337 36522000000 36523823779 2162261632 2164085411
+109569000000 109574471546 36523000000 36524823848 2163261632 2165085480
+109572000000 109577471676 36524000000 36525823892 2164261632 2166085524
+109575000000 109580471790 36525000000 36526823930 2165261632 2167085562
+109578000000 109583471951 36526000000 36527823983 2166261632 2168085615
+109581000000 109586472086 36527000000 36528824028 2167261632 2169085660
+109584000000 109589472229 36528000000 36529824076 2168261632 2170085708
+109587000000 109592472329 36529000000 36530824109 2169261632 2171085741
+109590000000 109595472563 36530000000 36531824187 2170261632 2172085819
+109593000000 109598472636 36531000000 36532824212 2171261632 2173085844
+109596000000 109601472757 36532000000 36533824252 2172261632 2174085884
+109599000000 109604472946 36533000000 36534824315 2173261632 2175085947
+109602000000 109607473100 36534000000 36535824366 2174261632 2176085998
+109605000000 109610473279 36535000000 36536824426 2175261632 2177086058
+109608000000 109613473425 36536000000 36537824475 2176261632 2178086107
+109611000000 109616473552 36537000000 36538824517 2177261632 2179086149
+109614000000 109619473726 36538000000 36539824575 2178261632 2180086207
+109617000000 109622473790 36539000000 36540824596 2179261632 2181086228
+109620000000 109625473997 36540000000 36541824665 2180261632 2182086297
+109623000000 109628474178 36541000000 36542824726 2181261632 2183086358
+109626000000 109631474327 36542000000 36543824775 2182261632 2184086407
+109629000000 109634474384 36543000000 36544824794 2183261632 2185086426
+109632000000 109637474580 36544000000 36545824860 2184261632 2186086492
+109635000000 109640474770 36545000000 36546824923 2185261632 2187086555
+109638000000 109643474915 36546000000 36547824971 2186261632 2188086603
+109641000000 109646475087 36547000000 36548825029 2187261632 2189086661
+109644000000 109649475220 36548000000 36549825073 2188261632 2190086705
+109647000000 109652475291 36549000000 36550825097 2189261632 2191086729
+109650000000 109655475517 36550000000 36551825172 2190261632 2192086804
+109653000000 109658475677 36551000000 36552825225 2191261632 2193086857
+109656000000 109661475809 36552000000 36553825269 2192261632 2194086901
+109659000000 109664475917 36553000000 36554825305 2193261632 2195086937
+109662000000 109667476128 36554000000 36555825376 2194261632 2196087008
+109665000000 109670476294 36555000000 36556825431 2195261632 2197087063
+109668000000 109673476405 36556000000 36557825468 2196261632 2198087100
+109671000000 109676476565 36557000000 36558825521 2197261632 2199087153
+109674000000 109679476677 36558000000 36559825559 2198261632 2200087191
+109677000000 109682476875 36559000000 36560825625 2199261632 2201087257
+109680000000 109685476965 36560000000 36561825655 2200261632 2202087287
+109683000000 109688477190 36561000000 36562825730 2201261632 2203087362
+109686000000 109691477322 36562000000 36563825774 2202261632 2204087406
+109689000000 109694477461 36563000000 36564825820 2203261632 2205087452
+109692000000 109697477512 36564000000 36565825837 2204261632 2206087469
+109695000000 109700477723 36565000000 36566825907 2205261632 2207087539
+109698000000 109703477932 36566000000 36567825977 2206261632 2208087609
+109701000000 109706478060 36567000000 36568826020 2207261632 2209087652
+109704000000 109709478203 36568000000 36569826067 2208261632 2210087699
+109707000000 109712478374 36569000000 36570826124 2209261632 2211087756
+109710000000 109715478471 36570000000 36571826157 2210261632 2212087789
+109713000000 109718478684 36571000000 36572826228 2211261632 2213087860
+109716000000 109721478814 36572000000 36573826271 2212261632 2214087903
+109719000000 109724478964 36573000000 36574826321 2213261632 2215087953
+109722000000 109727479124 36574000000 36575826374 2214261632 2216088006
+109725000000 109730479220 36575000000 36576826406 2215261632 2217088038
+109728000000 109733479408 36576000000 36577826469 2216261632 2218088101
+109731000000 109736479576 36577000000 36578826525 2217261632 2219088157
+109734000000 109739479712 36578000000 36579826570 2218261632 2220088202
+109737000000 109742479887 36579000000 36580826629 2219261632 2221088261
+109740000000 109745480009 36580000000 36581826669 2220261632 2222088301
+109743000000 109748480159 36581000000 36582826719 2221261632 2223088351
+109746000000 109751480307 36582000000 36583826769 2222261632 2224088401
+109749000000 109754480513 36583000000 36584826837 2223261632 2225088469
+109752000000 109757480627 36584000000 36585826875 2224261632 2226088507
+109755000000 109760480759 36585000000 36586826919 2225261632 2227088551
+109758000000 109763480933 36586000000 36587826977 2226261632 2228088609
+109761000000 109766481052 36587000000 36588827017 2227261632 2229088649
+109764000000 109769481176 36588000000 36589827058 2228261632 2230088690
+109767000000 109772481395 36589000000 36590827131 2229261632 2231088763
+109770000000 109775481531 36590000000 36591827177 2230261632 2232088809
+109773000000 109778481682 36591000000 36592827227 2231261632 2233088859
+109776000000 109781481842 36592000000 36593827280 2232261632 2234088912
+109779000000 109784481963 36593000000 36594827321 2233261632 2235088953
+109782000000 109787482044 36594000000 36595827348 2234261632 2236088980
+109785000000 109790482252 36595000000 36596827417 2235261632 2237089049
+109788000000 109793482407 36596000000 36597827469 2236261632 2238089101
+109791000000 109796482566 36597000000 36598827522 2237261632 2239089154
+109794000000 109799482718 36598000000 36599827572 2238261632 2240089204
+109797000000 109802482840 36599000000 36600827613 2239261632 2241089245
+109800000000 109805483018 36600000000 36601827672 2240261632 2242089304
+109803000000 109808483167 36601000000 36602827722 2241261632 2243089354
+109806000000 109811483295 36602000000 36603827765 2242261632 2244089397
+109809000000 109814483464 36603000000 36604827821 2243261632 2245089453
+109812000000 109817483584 36604000000 36605827861 2244261632 2246089493
+109815000000 109820483511 36605000000 36606827837 2245261632 2247089469
+109818000000 109823483834 36606000000 36607827944 2246261632 2248089576
+109821000000 109826484087 36607000000 36608828029 2247261632 2249089661
+109824000000 109829484197 36608000000 36609828065 2248261632 2250089697
+109827000000 109832484376 36609000000 36610828125 2249261632 2251089757
+109830000000 109835484424 36610000000 36611828141 2250261632 2252089773
+109833000000 109838484678 36611000000 36612828226 2251261632 2253089858
+109836000000 109841484797 36612000000 36613828265 2252261632 2254089897
+109839000000 109844484968 36613000000 36614828322 2253261632 2255089954
+109842000000 109847485115 36614000000 36615828371 2254261632 2256090003
+109845000000 109850485268 36615000000 36616828422 2255261632 2257090054
+109848000000 109853485414 36616000000 36617828471 2256261632 2258090103
+109851000000 109856485558 36617000000 36618828519 2257261632 2259090151
+109854000000 109859485721 36618000000 36619828573 2258261632 2260090205
+109857000000 109862485873 36619000000 36620828624 2259261632 2261090256
+109860000000 109865486027 36620000000 36621828675 2260261632 2262090307
+109863000000 109868486147 36621000000 36622828715 2261261632 2263090347
+109866000000 109871486356 36622000000 36623828785 2262261632 2264090417
+109869000000 109874486486 36623000000 36624828828 2263261632 2265090460
+109872000000 109877486600 36624000000 36625828866 2264261632 2266090498
+109875000000 109880486761 36625000000 36626828920 2265261632 2267090552
+109878000000 109883486896 36626000000 36627828965 2266261632 2268090597
+109881000000 109886487039 36627000000 36628829013 2267261632 2269090645
+109884000000 109889487139 36628000000 36629829046 2268261632 2270090678
+109887000000 109892487373 36629000000 36630829124 2269261632 2271090756
+109890000000 109895487446 36630000000 36631829148 2270261632 2272090780
+109893000000 109898487567 36631000000 36632829189 2271261632 2273090821
+109896000000 109901487756 36632000000 36633829252 2272261632 2274090884
+109899000000 109904487910 36633000000 36634829303 2273261632 2275090935
+109902000000 109907488089 36634000000 36635829363 2274261632 2276090995
+109905000000 109910488235 36635000000 36636829411 2275261632 2277091043
+109908000000 109913488362 36636000000 36637829454 2276261632 2278091086
+109911000000 109916488536 36637000000 36638829512 2277261632 2279091144
+109914000000 109919488600 36638000000 36639829533 2278261632 2280091165
+109917000000 109922488807 36639000000 36640829602 2279261632 2281091234
+109920000000 109925488988 36640000000 36641829662 2280261632 2282091294
+109923000000 109928489137 36641000000 36642829712 2281261632 2283091344
+109926000000 109931489194 36642000000 36643829731 2282261632 2284091363
+109929000000 109934489390 36643000000 36644829796 2283261632 2285091428
+109932000000 109937489580 36644000000 36645829860 2284261632 2286091492
+109935000000 109940489725 36645000000 36646829908 2285261632 2287091540
+109938000000 109943489897 36646000000 36647829965 2286261632 2288091597
+109941000000 109946490030 36647000000 36648830010 2287261632 2289091642
+109944000000 109949490101 36648000000 36649830033 2288261632 2290091665
+109947000000 109952490327 36649000000 36650830109 2289261632 2291091741
+109950000000 109955490487 36650000000 36651830162 2290261632 2292091794
+109953000000 109958490619 36651000000 36652830206 2291261632 2293091838
+109956000000 109961490727 36652000000 36653830242 2292261632 2294091874
+109959000000 109964490938 36653000000 36654830312 2293261632 2295091944
+109962000000 109967491104 36654000000 36655830368 2294261632 2296092000
+109965000000 109970491215 36655000000 36656830405 2295261632 2297092037
+109968000000 109973491375 36656000000 36657830458 2296261632 2298092090
+109971000000 109976491487 36657000000 36658830495 2297261632 2299092127
+109974000000 109979491685 36658000000 36659830561 2298261632 2300092193
+109977000000 109982491775 36659000000 36660830591 2299261632 2301092223
+109980000000 109985492000 36660000000 36661830666 2300261632 2302092298
+109983000000 109988492132 36661000000 36662830710 2301261632 2303092342
+109986000000 109991492271 36662000000 36663830757 2302261632 2304092389
+109989000000 109994492322 36663000000 36664830774 2303261632 2305092406
+109992000000 109997492533 36664000000 36665830844 2304261632 2306092476
+109995000000 110000492742 36665000000 36666830914 2305261632 2307092546
+109998000000 110003492870 36666000000 36667830956 2306261632 2308092588
+110001000000 110006493013 36667000000 36668831004 2307261632 2309092636
+110004000000 110009493184 36668000000 36669831061 2308261632 2310092693
+110007000000 110012493281 36669000000 36670831093 2309261632 2311092725
+110010000000 110015493494 36670000000 36671831164 2310261632 2312092796
+110013000000 110018493624 36671000000 36672831208 2311261632 2313092840
+110016000000 110021493774 36672000000 36673831258 2312261632 2314092890
+110019000000 110024493934 36673000000 36674831311 2313261632 2315092943
+110022000000 110027494030 36674000000 36675831343 2314261632 2316092975
+110025000000 110030494218 36675000000 36676831406 2315261632 2317093038
+110028000000 110033494386 36676000000 36677831462 2316261632 2318093094
+110031000000 110036494522 36677000000 36678831507 2317261632 2319093139
+110034000000 110039494697 36678000000 36679831565 2318261632 2320093197
+110037000000 110042494819 36679000000 36680831606 2319261632 2321093238
+110040000000 110045494969 36680000000 36681831656 2320261632 2322093288
+110043000000 110048495117 36681000000 36682831705 2321261632 2323093337
+110046000000 110051495323 36682000000 36683831774 2322261632 2324093406
+110049000000 110054495437 36683000000 36684831812 2323261632 2325093444
+110052000000 110057495569 36684000000 36685831856 2324261632 2326093488
+110055000000 110060495743 36685000000 36686831914 2325261632 2327093546
+110058000000 110063495862 36686000000 36687831954 2326261632 2328093586
+110061000000 110066495986 36687000000 36688831995 2327261632 2329093627
+110064000000 110069496205 36688000000 36689832068 2328261632 2330093700
+110067000000 110072496341 36689000000 36690832113 2329261632 2331093745
+110070000000 110075496492 36690000000 36691832164 2330261632 2332093796
+110073000000 110078496652 36691000000 36692832217 2331261632 2333093849
+110076000000 110081496773 36692000000 36693832257 2332261632 2334093889
+110079000000 110084496854 36693000000 36694832284 2333261632 2335093916
+110082000000 110087497062 36694000000 36695832354 2334261632 2336093986
+110085000000 110090497217 36695000000 36696832405 2335261632 2337094037
+110088000000 110093497376 36696000000 36697832458 2336261632 2338094090
+110091000000 110096497528 36697000000 36698832509 2337261632 2339094141
+110094000000 110099497650 36698000000 36699832550 2338261632 2340094182
+110097000000 110102497828 36699000000 36700832609 2339261632 2341094241
+110100000000 110105497977 36700000000 36701832659 2340261632 2342094291
+110103000000 110108498105 36701000000 36702832701 2341261632 2343094333
+110106000000 110111498274 36702000000 36703832758 2342261632 2344094390
+110109000000 110114498394 36703000000 36704832798 2343261632 2345094430
+110112000000 110117498321 36704000000 36705832773 2344261632 2346094405
+110115000000 110120498644 36705000000 36706832881 2345261632 2347094513
+110118000000 110123498897 36706000000 36707832965 2346261632 2348094597
+110121000000 110126499007 36707000000 36708833002 2347261632 2349094634
+110124000000 110129499186 36708000000 36709833062 2348261632 2350094694
+110127000000 110132499234 36709000000 36710833078 2349261632 2351094710
+110130000000 110135499488 36710000000 36711833162 2350261632 2352094794
+110133000000 110138499607 36711000000 36712833202 2351261632 2353094834
+110136000000 110141499778 36712000000 36713833259 2352261632 2354094891
+110139000000 110144499925 36713000000 36714833308 2353261632 2355094940
+110142000000 110147500078 36714000000 36715833359 2354261632 2356094991
+110145000000 110150500224 36715000000 36716833408 2355261632 2357095040
+110148000000 110153500368 36716000000 36717833456 2356261632 2358095088
+110151000000 110156500531 36717000000 36718833510 2357261632 2359095142
+110154000000 110159500683 36718000000 36719833561 2358261632 2360095193
+110157000000 110162500837 36719000000 36720833612 2359261632 2361095244
+110160000000 110165500957 36720000000 36721833652 2360261632 2362095284
+110163000000 110168501166 36721000000 36722833722 2361261632 2363095354
+110166000000 110171501296 36722000000 36723833765 2362261632 2364095397
+110169000000 110174501410 36723000000 36724833803 2363261632 2365095435
+110172000000 110177501571 36724000000 36725833857 2364261632 2366095489
+110175000000 110180501706 36725000000 36726833902 2365261632 2367095534
+110178000000 110183501849 36726000000 36727833949 2366261632 2368095581
+110181000000 110186501949 36727000000 36728833983 2367261632 2369095615
+110184000000 110189502183 36728000000 36729834061 2368261632 2370095693
+110187000000 110192502256 36729000000 36730834085 2369261632 2371095717
+110190000000 110195502377 36730000000 36731834125 2370261632 2372095757
+110193000000 110198502566 36731000000 36732834188 2371261632 2373095820
+110196000000 110201502720 36732000000 36733834240 2372261632 2374095872
+110199000000 110204502899 36733000000 36734834299 2373261632 2375095931
+110202000000 110207503045 36734000000 36735834348 2374261632 2376095980
+110205000000 110210503172 36735000000 36736834390 2375261632 2377096022
+110208000000 110213503346 36736000000 36737834448 2376261632 2378096080
+110211000000 110216503410 36737000000 36738834470 2377261632 2379096102
+110214000000 110219503617 36738000000 36739834539 2378261632 2380096171
+110217000000 110222503798 36739000000 36740834599 2379261632 2381096231
+110220000000 110225503947 36740000000 36741834649 2380261632 2382096281
+110223000000 110228504004 36741000000 36742834668 2381261632 2383096300
+110226000000 110231504200 36742000000 36743834733 2382261632 2384096365
+110229000000 110234504390 36743000000 36744834796 2383261632 2385096428
+110232000000 110237504535 36744000000 36745834845 2384261632 2386096477
+110235000000 110240504707 36745000000 36746834902 2385261632 2387096534
+110238000000 110243504840 36746000000 36747834946 2386261632 2388096578
+110241000000 110246504911 36747000000 36748834970 2387261632 2389096602
+110244000000 110249505137 36748000000 36749835045 2388261632 2390096677
+110247000000 110252505297 36749000000 36750835099 2389261632 2391096731
+110250000000 110255505429 36750000000 36751835143 2390261632 2392096775
+110253000000 110258505537 36751000000 36752835179 2391261632 2393096811
+110256000000 110261505748 36752000000 36753835249 2392261632 2394096881
+110259000000 110264505914 36753000000 36754835304 2393261632 2395096936
+110262000000 110267506025 36754000000 36755835341 2394261632 2396096973
+110265000000 110270506185 36755000000 36756835395 2395261632 2397097027
+110268000000 110273506297 36756000000 36757835432 2396261632 2398097064
+110271000000 110276506495 36757000000 36758835498 2397261632 2399097130
+110274000000 110279506585 36758000000 36759835528 2398261632 2400097160
+110277000000 110282506810 36759000000 36760835603 2399261632 2401097235
+110280000000 110285506942 36760000000 36761835647 2400261632 2402097279
+110283000000 110288507081 36761000000 36762835693 2401261632 2403097325
+110286000000 110291507132 36762000000 36763835710 2402261632 2404097342
+110289000000 110294507343 36763000000 36764835781 2403261632 2405097413
+110292000000 110297507552 36764000000 36765835850 2404261632 2406097482
+110295000000 110300507680 36765000000 36766835893 2405261632 2407097525
+110298000000 110303507823 36766000000 36767835941 2406261632 2408097573
+110301000000 110306507994 36767000000 36768835998 2407261632 2409097630
+110304000000 110309508091 36768000000 36769836030 2408261632 2410097662
+110307000000 110312508304 36769000000 36770836101 2409261632 2411097733
+110310000000 110315508434 36770000000 36771836144 2410261632 2412097776
+110313000000 110318508584 36771000000 36772836194 2411261632 2413097826
+110316000000 110321508744 36772000000 36773836248 2412261632 2414097880
+110319000000 110324508840 36773000000 36774836280 2413261632 2415097912
+110322000000 110327509028 36774000000 36775836342 2414261632 2416097974
+110325000000 110330509196 36775000000 36776836398 2415261632 2417098030
+110328000000 110333509332 36776000000 36777836444 2416261632 2418098076
+110331000000 110336509507 36777000000 36778836502 2417261632 2419098134
+110334000000 110339509629 36778000000 36779836543 2418261632 2420098175
+110337000000 110342509779 36779000000 36780836593 2419261632 2421098225
+110340000000 110345509927 36780000000 36781836642 2420261632 2422098274
+110343000000 110348510133 36781000000 36782836711 2421261632 2423098343
+110346000000 110351510247 36782000000 36783836749 2422261632 2424098381
+110349000000 110354510379 36783000000 36784836793 2423261632 2425098425
+110352000000 110357510553 36784000000 36785836851 2424261632 2426098483
+110355000000 110360510672 36785000000 36786836890 2425261632 2427098522
+110358000000 110363510796 36786000000 36787836932 2426261632 2428098564
+110361000000 110366511015 36787000000 36788837005 2427261632 2429098637
+110364000000 110369511151 36788000000 36789837050 2428261632 2430098682
+110367000000 110372511302 36789000000 36790837100 2429261632 2431098732
+110370000000 110375511462 36790000000 36791837154 2430261632 2432098786
+110373000000 110378511583 36791000000 36792837194 2431261632 2433098826
+110376000000 110381511664 36792000000 36793837221 2432261632 2434098853
+110379000000 110384511872 36793000000 36794837290 2433261632 2435098922
+110382000000 110387512027 36794000000 36795837342 2434261632 2436098974
+110385000000 110390512186 36795000000 36796837395 2435261632 2437099027
+110388000000 110393512338 36796000000 36797837446 2436261632 2438099078
+110391000000 110396512460 36797000000 36798837486 2437261632 2439099118
+110394000000 110399512638 36798000000 36799837546 2438261632 2440099178
+110397000000 110402512787 36799000000 36800837595 2439261632 2441099227
+110400000000 110405512915 36800000000 36801837638 2440261632 2442099270
+110403000000 110408513084 36801000000 36802837694 2441261632 2443099326
+110406000000 110411513204 36802000000 36803837734 2442261632 2444099366
+110409000000 110414513131 36803000000 36804837710 2443261632 2445099342
+110412000000 110417513454 36804000000 36805837818 2444261632 2446099450
+110415000000 110420513707 36805000000 36806837902 2445261632 2447099534
+110418000000 110423513817 36806000000 36807837939 2446261632 2448099571
+110421000000 110426513996 36807000000 36808837998 2447261632 2449099630
+110424000000 110429514044 36808000000 36809838014 2448261632 2450099646
+110427000000 110432514298 36809000000 36810838099 2449261632 2451099731
+110430000000 110435514417 36810000000 36811838139 2450261632 2452099771
+110433000000 110438514588 36811000000 36812838196 2451261632 2453099828
+110436000000 110441514735 36812000000 36813838245 2452261632 2454099877
+110439000000 110444514888 36813000000 36814838296 2453261632 2455099928
+110442000000 110447515034 36814000000 36815838344 2454261632 2456099976
+110445000000 110450515178 36815000000 36816838392 2455261632 2457100024
+110448000000 110453515341 36816000000 36817838447 2456261632 2458100079
+110451000000 110456515493 36817000000 36818838497 2457261632 2459100129
+110454000000 110459515647 36818000000 36819838549 2458261632 2460100181
+110457000000 110462515767 36819000000 36820838589 2459261632 2461100221
+110460000000 110465515976 36820000000 36821838658 2460261632 2462100290
+110463000000 110468516106 36821000000 36822838702 2461261632 2463100334
+110466000000 110471516220 36822000000 36823838740 2462261632 2464100372
+110469000000 110474516381 36823000000 36824838793 2463261632 2465100425
+110472000000 110477516516 36824000000 36825838838 2464261632 2466100470
+110475000000 110480516659 36825000000 36826838886 2465261632 2467100518
+110478000000 110483516759 36826000000 36827838919 2466261632 2468100551
+110481000000 110486516993 36827000000 36828838997 2467261632 2469100629
+110484000000 110489517066 36828000000 36829839022 2468261632 2470100654
+110487000000 110492517187 36829000000 36830839062 2469261632 2471100694
+110490000000 110495517376 36830000000 36831839125 2470261632 2472100757
+110493000000 110498517530 36831000000 36832839176 2471261632 2473100808
+110496000000 110501517709 36832000000 36833839236 2472261632 2474100868
+110499000000 110504517855 36833000000 36834839285 2473261632 2475100917
+110502000000 110507517982 36834000000 36835839327 2474261632 2476100959
+110505000000 110510518156 36835000000 36836839385 2475261632 2477101017
+110508000000 110513518220 36836000000 36837839406 2476261632 2478101038
+110511000000 110516518427 36837000000 36838839475 2477261632 2479101107
+110514000000 110519518608 36838000000 36839839536 2478261632 2480101168
+110517000000 110522518757 36839000000 36840839585 2479261632 2481101217
+110520000000 110525518814 36840000000 36841839604 2480261632 2482101236
+110523000000 110528519010 36841000000 36842839670 2481261632 2483101302
+110526000000 110531519200 36842000000 36843839733 2482261632 2484101365
+110529000000 110534519345 36843000000 36844839781 2483261632 2485101413
+110532000000 110537519517 36844000000 36845839839 2484261632 2486101471
+110535000000 110540519650 36845000000 36846839883 2485261632 2487101515
+110538000000 110543519721 36846000000 36847839907 2486261632 2488101539
+110541000000 110546519947 36847000000 36848839982 2487261632 2489101614
+110544000000 110549520107 36848000000 36849840035 2488261632 2490101667
+110547000000 110552520239 36849000000 36850840079 2489261632 2491101711
+110550000000 110555520347 36850000000 36851840115 2490261632 2492101747
+110553000000 110558520558 36851000000 36852840186 2491261632 2493101818
+110556000000 110561520724 36852000000 36853840241 2492261632 2494101873
+110559000000 110564520835 36853000000 36854840278 2493261632 2495101910
+110562000000 110567520995 36854000000 36855840331 2494261632 2496101963
+110565000000 110570521107 36855000000 36856840369 2495261632 2497102001
+110568000000 110573521305 36856000000 36857840435 2496261632 2498102067
+110571000000 110576521395 36857000000 36858840465 2497261632 2499102097
+110574000000 110579521620 36858000000 36859840540 2498261632 2500102172
+110577000000 110582521752 36859000000 36860840584 2499261632 2501102216
+110580000000 110585521891 36860000000 36861840630 2500261632 2502102262
+110583000000 110588521942 36861000000 36862840647 2501261632 2503102279
+110586000000 110591522153 36862000000 36863840717 2502261632 2504102349
+110589000000 110594522362 36863000000 36864840787 2503261632 2505102419
+110592000000 110597522490 36864000000 36865840830 2504261632 2506102462
+110595000000 110600522633 36865000000 36866840877 2505261632 2507102509
+110598000000 110603522804 36866000000 36867840934 2506261632 2508102566
+110601000000 110606522901 36867000000 36868840967 2507261632 2509102599
+110604000000 110609523114 36868000000 36869841038 2508261632 2510102670
+110607000000 110612523244 36869000000 36870841081 2509261632 2511102713
+110610000000 110615523394 36870000000 36871841131 2510261632 2512102763
+110613000000 110618523554 36871000000 36872841184 2511261632 2513102816
+110616000000 110621523650 36872000000 36873841216 2512261632 2514102848
+110619000000 110624523838 36873000000 36874841279 2513261632 2515102911
+110622000000 110627524006 36874000000 36875841335 2514261632 2516102967
+110625000000 110630524142 36875000000 36876841380 2515261632 2517103012
+110628000000 110633524317 36876000000 36877841439 2516261632 2518103071
+110631000000 110636524439 36877000000 36878841479 2517261632 2519103111
+110634000000 110639524589 36878000000 36879841529 2518261632 2520103161
+110637000000 110642524737 36879000000 36880841579 2519261632 2521103211
+110640000000 110645524943 36880000000 36881841647 2520261632 2522103279
+110643000000 110648525057 36881000000 36882841685 2521261632 2523103317
+110646000000 110651525189 36882000000 36883841729 2522261632 2524103361
+110649000000 110654525363 36883000000 36884841787 2523261632 2525103419
+110652000000 110657525482 36884000000 36885841827 2524261632 2526103459
+110655000000 110660525606 36885000000 36886841868 2525261632 2527103500
+110658000000 110663525825 36886000000 36887841941 2526261632 2528103573
+110661000000 110666525961 36887000000 36888841987 2527261632 2529103619
+110664000000 110669526112 36888000000 36889842037 2528261632 2530103669
+110667000000 110672526272 36889000000 36890842090 2529261632 2531103722
+110670000000 110675526393 36890000000 36891842131 2530261632 2532103763
+110673000000 110678526474 36891000000 36892842158 2531261632 2533103790
+110676000000 110681526682 36892000000 36893842227 2532261632 2534103859
+110679000000 110684526837 36893000000 36894842279 2533261632 2535103911
+110682000000 110687526996 36894000000 36895842332 2534261632 2536103964
+110685000000 110690527148 36895000000 36896842382 2535261632 2537104014
+110688000000 110693527270 36896000000 36897842423 2536261632 2538104055
+110691000000 110696527448 36897000000 36898842482 2537261632 2539104114
+110694000000 110699527597 36898000000 36899842532 2538261632 2540104164
+110697000000 110702527725 36899000000 36900842575 2539261632 2541104207
+110700000000 110705527894 36900000000 36901842631 2540261632 2542104263
+110703000000 110708528014 36901000000 36902842671 2541261632 2543104303
+110706000000 110711527941 36902000000 36903842647 2542261632 2544104279
+110709000000 110714528264 36903000000 36904842754 2543261632 2545104386
+110712000000 110717528517 36904000000 36905842839 2544261632 2546104471
+110715000000 110720528627 36905000000 36906842875 2545261632 2547104507
+110718000000 110723528806 36906000000 36907842935 2546261632 2548104567
+110721000000 110726528854 36907000000 36908842951 2547261632 2549104583
+110724000000 110729529108 36908000000 36909843036 2548261632 2550104668
+110727000000 110732529227 36909000000 36910843075 2549261632 2551104707
+110730000000 110735529398 36910000000 36911843132 2550261632 2552104764
+110733000000 110738529545 36911000000 36912843181 2551261632 2553104813
+110736000000 110741529698 36912000000 36913843232 2552261632 2554104864
+110739000000 110744529844 36913000000 36914843281 2553261632 2555104913
+110742000000 110747529988 36914000000 36915843329 2554261632 2556104961
+110745000000 110750530151 36915000000 36916843383 2555261632 2557105015
+110748000000 110753530303 36916000000 36917843434 2556261632 2558105066
+110751000000 110756530457 36917000000 36918843485 2557261632 2559105117
+110754000000 110759530577 36918000000 36919843525 2558261632 2560105157
+110757000000 110762530786 36919000000 36920843595 2559261632 2561105227
+110760000000 110765530916 36920000000 36921843638 2560261632 2562105270
+110763000000 110768531030 36921000000 36922843676 2561261632 2563105308
+110766000000 110771531191 36922000000 36923843730 2562261632 2564105362
+110769000000 110774531326 36923000000 36924843775 2563261632 2565105407
+110772000000 110777531469 36924000000 36925843823 2564261632 2566105455
+110775000000 110780531569 36925000000 36926843856 2565261632 2567105488
+110778000000 110783531803 36926000000 36927843934 2566261632 2568105566
+110781000000 110786531876 36927000000 36928843958 2567261632 2569105590
+110784000000 110789531997 36928000000 36929843999 2568261632 2570105631
+110787000000 110792532186 36929000000 36930844062 2569261632 2571105694
+110790000000 110795532340 36930000000 36931844113 2570261632 2572105745
+110793000000 110798532519 36931000000 36932844173 2571261632 2573105805
+110796000000 110801532665 36932000000 36933844221 2572261632 2574105853
+110799000000 110804532792 36933000000 36934844264 2573261632 2575105896
+110802000000 110807532966 36934000000 36935844322 2574261632 2576105954
+110805000000 110810533030 36935000000 36936844343 2575261632 2577105975
+110808000000 110813533237 36936000000 36937844412 2576261632 2578106044
+110811000000 110816533418 36937000000 36938844472 2577261632 2579106104
+110814000000 110819533567 36938000000 36939844522 2578261632 2580106154
+110817000000 110822533624 36939000000 36940844541 2579261632 2581106173
+110820000000 110825533820 36940000000 36941844606 2580261632 2582106238
+110823000000 110828534010 36941000000 36942844670 2581261632 2583106302
+110826000000 110831534155 36942000000 36943844718 2582261632 2584106350
+110829000000 110834534327 36943000000 36944844775 2583261632 2585106407
+110832000000 110837534460 36944000000 36945844820 2584261632 2586106452
+110835000000 110840534531 36945000000 36946844843 2585261632 2587106475
+110838000000 110843534757 36946000000 36947844919 2586261632 2588106551
+110841000000 110846534917 36947000000 36948844972 2587261632 2589106604
+110844000000 110849535049 36948000000 36949845016 2588261632 2590106648
+110847000000 110852535157 36949000000 36950845052 2589261632 2591106684
+110850000000 110855535368 36950000000 36951845122 2590261632 2592106754
+110853000000 110858535534 36951000000 36952845178 2591261632 2593106810
+110856000000 110861535645 36952000000 36953845215 2592261632 2594106847
+110859000000 110864535805 36953000000 36954845268 2593261632 2595106900
+110862000000 110867535917 36954000000 36955845305 2594261632 2596106937
+110865000000 110870536115 36955000000 36956845371 2595261632 2597107003
+110868000000 110873536205 36956000000 36957845401 2596261632 2598107033
+110871000000 110876536430 36957000000 36958845476 2597261632 2599107108
+110874000000 110879536562 36958000000 36959845520 2598261632 2600107152
+110877000000 110882536701 36959000000 36960845567 2599261632 2601107199
+110880000000 110885536752 36960000000 36961845584 2600261632 2602107216
+110883000000 110888536963 36961000000 36962845654 2601261632 2603107286
+110886000000 110891537172 36962000000 36963845724 2602261632 2604107356
+110889000000 110894537300 36963000000 36964845766 2603261632 2605107398
+110892000000 110897537443 36964000000 36965845814 2604261632 2606107446
+110895000000 110900537614 36965000000 36966845871 2605261632 2607107503
+110898000000 110903537711 36966000000 36967845903 2606261632 2608107535
+110901000000 110906537924 36967000000 36968845974 2607261632 2609107606
+110904000000 110909538054 36968000000 36969846018 2608261632 2610107650
+110907000000 110912538204 36969000000 36970846068 2609261632 2611107700
+110910000000 110915538364 36970000000 36971846121 2610261632 2612107753
+110913000000 110918538460 36971000000 36972846153 2611261632 2613107785
+110916000000 110921538648 36972000000 36973846216 2612261632 2614107848
+110919000000 110924538816 36973000000 36974846272 2613261632 2615107904
+110922000000 110927538952 36974000000 36975846317 2614261632 2616107949
+110925000000 110930539127 36975000000 36976846375 2615261632 2617108007
+110928000000 110933539249 36976000000 36977846416 2616261632 2618108048
+110931000000 110936539399 36977000000 36978846466 2617261632 2619108098
+110934000000 110939539547 36978000000 36979846515 2618261632 2620108147
+110937000000 110942539753 36979000000 36980846584 2619261632 2621108216
+110940000000 110945539867 36980000000 36981846622 2620261632 2622108254
+110943000000 110948539999 36981000000 36982846666 2621261632 2623108298
+110946000000 110951540173 36982000000 36983846724 2622261632 2624108356
+110949000000 110954540292 36983000000 36984846764 2623261632 2625108396
+110952000000 110957540416 36984000000 36985846805 2624261632 2626108437
+110955000000 110960540635 36985000000 36986846878 2625261632 2627108510
+110958000000 110963540771 36986000000 36987846923 2626261632 2628108555
+110961000000 110966540922 36987000000 36988846974 2627261632 2629108606
+110964000000 110969541082 36988000000 36989847027 2628261632 2630108659
+110967000000 110972541203 36989000000 36990847067 2629261632 2631108699
+110970000000 110975541284 36990000000 36991847094 2630261632 2632108726
+110973000000 110978541492 36991000000 36992847164 2631261632 2633108796
+110976000000 110981541647 36992000000 36993847215 2632261632 2634108847
+110979000000 110984541806 36993000000 36994847268 2633261632 2635108900
+110982000000 110987541958 36994000000 36995847319 2634261632 2636108951
+110985000000 110990542080 36995000000 36996847360 2635261632 2637108992
+110988000000 110993542258 36996000000 36997847419 2636261632 2638109051
+110991000000 110996542407 36997000000 36998847469 2637261632 2639109101
+110994000000 110999542535 36998000000 36999847511 2638261632 2640109143
+110997000000 111002542704 36999000000 37000847568 2639261632 2641109200
+111000000000 111005542824 37000000000 37001847608 2640261632 2642109240
+111003000000 111008542751 37001000000 37002847583 2641261632 2643109215
+111006000000 111011543074 37002000000 37003847691 2642261632 2644109323
+111009000000 111014543327 37003000000 37004847775 2643261632 2645109407
+111012000000 111017543437 37004000000 37005847812 2644261632 2646109444
+111015000000 111020543616 37005000000 37006847872 2645261632 2647109504
+111018000000 111023543664 37006000000 37007847888 2646261632 2648109520
+111021000000 111026543918 37007000000 37008847972 2647261632 2649109604
+111024000000 111029544037 37008000000 37009848012 2648261632 2650109644
+111027000000 111032544208 37009000000 37010848069 2649261632 2651109701
+111030000000 111035544355 37010000000 37011848118 2650261632 2652109750
+111033000000 111038544508 37011000000 37012848169 2651261632 2653109801
+111036000000 111041544654 37012000000 37013848218 2652261632 2654109850
+111039000000 111044544798 37013000000 37014848266 2653261632 2655109898
+111042000000 111047544961 37014000000 37015848320 2654261632 2656109952
+111045000000 111050545113 37015000000 37016848371 2655261632 2657110003
+111048000000 111053545267 37016000000 37017848422 2656261632 2658110054
+111051000000 111056545387 37017000000 37018848462 2657261632 2659110094
+111054000000 111059545596 37018000000 37019848532 2658261632 2660110164
+111057000000 111062545726 37019000000 37020848575 2659261632 2661110207
+111060000000 111065545840 37020000000 37021848613 2660261632 2662110245
+111063000000 111068546001 37021000000 37022848667 2661261632 2663110299
+111066000000 111071546136 37022000000 37023848712 2662261632 2664110344
+111069000000 111074546279 37023000000 37024848759 2663261632 2665110391
+111072000000 111077546379 37024000000 37025848793 2664261632 2666110425
+111075000000 111080546613 37025000000 37026848871 2665261632 2667110503
+111078000000 111083546686 37026000000 37027848895 2666261632 2668110527
+111081000000 111086546807 37027000000 37028848935 2667261632 2669110567
+111084000000 111089546996 37028000000 37029848998 2668261632 2670110630
+111087000000 111092547150 37029000000 37030849050 2669261632 2671110682
+111090000000 111095547329 37030000000 37031849109 2670261632 2672110741
+111093000000 111098547475 37031000000 37032849158 2671261632 2673110790
+111096000000 111101547602 37032000000 37033849200 2672261632 2674110832
+111099000000 111104547776 37033000000 37034849258 2673261632 2675110890
+111102000000 111107547840 37034000000 37035849280 2674261632 2676110912
+111105000000 111110548047 37035000000 37036849349 2675261632 2677110981
+111108000000 111113548228 37036000000 37037849409 2676261632 2678111041
+111111000000 111116548377 37037000000 37038849459 2677261632 2679111091
+111114000000 111119548434 37038000000 37039849478 2678261632 2680111110
+111117000000 111122548630 37039000000 37040849543 2679261632 2681111175
+111120000000 111125548820 37040000000 37041849606 2680261632 2682111238
+111123000000 111128548965 37041000000 37042849655 2681261632 2683111287
+111126000000 111131549137 37042000000 37043849712 2682261632 2684111344
+111129000000 111134549270 37043000000 37044849756 2683261632 2685111388
+111132000000 111137549341 37044000000 37045849780 2684261632 2686111412
+111135000000 111140549567 37045000000 37046849855 2685261632 2687111487
+111138000000 111143549727 37046000000 37047849909 2686261632 2688111541
+111141000000 111146549859 37047000000 37048849953 2687261632 2689111585
+111144000000 111149549967 37048000000 37049849989 2688261632 2690111621
+111147000000 111152550178 37049000000 37050850059 2689261632 2691111691
+111150000000 111155550344 37050000000 37051850114 2690261632 2692111746
+111153000000 111158550455 37051000000 37052850151 2691261632 2693111783
+111156000000 111161550615 37052000000 37053850205 2692261632 2694111837
+111159000000 111164550727 37053000000 37054850242 2693261632 2695111874
+111162000000 111167550925 37054000000 37055850308 2694261632 2696111940
+111165000000 111170551015 37055000000 37056850338 2695261632 2697111970
+111168000000 111173551240 37056000000 37057850413 2696261632 2698112045
+111171000000 111176551372 37057000000 37058850457 2697261632 2699112089
+111174000000 111179551511 37058000000 37059850503 2698261632 2700112135
+111177000000 111182551562 37059000000 37060850520 2699261632 2701112152
+111180000000 111185551773 37060000000 37061850591 2700261632 2702112223
+111183000000 111188551982 37061000000 37062850660 2701261632 2703112292
+111186000000 111191552110 37062000000 37063850703 2702261632 2704112335
+111189000000 111194552253 37063000000 37064850751 2703261632 2705112383
+111192000000 111197552424 37064000000 37065850808 2704261632 2706112440
+111195000000 111200552521 37065000000 37066850840 2705261632 2707112472
+111198000000 111203552734 37066000000 37067850911 2706261632 2708112543
+111201000000 111206552864 37067000000 37068850954 2707261632 2709112586
+111204000000 111209553014 37068000000 37069851004 2708261632 2710112636
+111207000000 111212553174 37069000000 37070851058 2709261632 2711112690
+111210000000 111215553270 37070000000 37071851090 2710261632 2712112722
+111213000000 111218553458 37071000000 37072851152 2711261632 2713112784
+111216000000 111221553626 37072000000 37073851208 2712261632 2714112840
+111219000000 111224553762 37073000000 37074851254 2713261632 2715112886
+111222000000 111227553937 37074000000 37075851312 2714261632 2716112944
+111225000000 111230554059 37075000000 37076851353 2715261632 2717112985
+111228000000 111233554209 37076000000 37077851403 2716261632 2718113035
+111231000000 111236554357 37077000000 37078851452 2717261632 2719113084
+111234000000 111239554563 37078000000 37079851521 2718261632 2720113153
+111237000000 111242554677 37079000000 37080851559 2719261632 2721113191
+111240000000 111245554809 37080000000 37081851603 2720261632 2722113235
+111243000000 111248554983 37081000000 37082851661 2721261632 2723113293
+111246000000 111251555102 37082000000 37083851700 2722261632 2724113332
+111249000000 111254555226 37083000000 37084851742 2723261632 2725113374
+111252000000 111257555445 37084000000 37085851815 2724261632 2726113447
+111255000000 111260555581 37085000000 37086851860 2725261632 2727113492
+111258000000 111263555732 37086000000 37087851910 2726261632 2728113542
+111261000000 111266555892 37087000000 37088851964 2727261632 2729113596
+111264000000 111269556013 37088000000 37089852004 2728261632 2730113636
+111267000000 111272556094 37089000000 37090852031 2729261632 2731113663
+111270000000 111275556302 37090000000 37091852100 2730261632 2732113732
+111273000000 111278556457 37091000000 37092852152 2731261632 2733113784
+111276000000 111281556616 37092000000 37093852205 2732261632 2734113837
+111279000000 111284556768 37093000000 37094852256 2733261632 2735113888
+111282000000 111287556890 37094000000 37095852296 2734261632 2736113928
+111285000000 111290557068 37095000000 37096852356 2735261632 2737113988
+111288000000 111293557217 37096000000 37097852405 2736261632 2738114037
+111291000000 111296557345 37097000000 37098852448 2737261632 2739114080
+111294000000 111299557514 37098000000 37099852504 2738261632 2740114136
+111297000000 111302557634 37099000000 37100852544 2739261632 2741114176
+111300000000 111305557561 37100000000 37101852520 2740261632 2742114152
+111303000000 111308557884 37101000000 37102852628 2741261632 2743114260
+111306000000 111311558137 37102000000 37103852712 2742261632 2744114344
+111309000000 111314558247 37103000000 37104852749 2743261632 2745114381
+111312000000 111317558426 37104000000 37105852808 2744261632 2746114440
+111315000000 111320558474 37105000000 37106852824 2745261632 2747114456
+111318000000 111323558728 37106000000 37107852909 2746261632 2748114541
+111321000000 111326558847 37107000000 37108852949 2747261632 2749114581
+111324000000 111329559018 37108000000 37109853006 2748261632 2750114638
+111327000000 111332559165 37109000000 37110853055 2749261632 2751114687
+111330000000 111335559318 37110000000 37111853106 2750261632 2752114738
+111333000000 111338559464 37111000000 37112853154 2751261632 2753114786
+111336000000 111341559608 37112000000 37113853202 2752261632 2754114834
+111339000000 111344559771 37113000000 37114853257 2753261632 2755114889
+111342000000 111347559923 37114000000 37115853307 2754261632 2756114939
+111345000000 111350560077 37115000000 37116853359 2755261632 2757114991
+111348000000 111353560197 37116000000 37117853399 2756261632 2758115031
+111351000000 111356560406 37117000000 37118853468 2757261632 2759115100
+111354000000 111359560536 37118000000 37119853512 2758261632 2760115144
+111357000000 111362560650 37119000000 37120853550 2759261632 2761115182
+111360000000 111365560811 37120000000 37121853603 2760261632 2762115235
+111363000000 111368560946 37121000000 37122853648 2761261632 2763115280
+111366000000 111371561089 37122000000 37123853696 2762261632 2764115328
+111369000000 111374561189 37123000000 37124853729 2763261632 2765115361
+111372000000 111377561423 37124000000 37125853807 2764261632 2766115439
+111375000000 111380561496 37125000000 37126853832 2765261632 2767115464
+111378000000 111383561617 37126000000 37127853872 2766261632 2768115504
+111381000000 111386561806 37127000000 37128853935 2767261632 2769115567
+111384000000 111389561960 37128000000 37129853986 2768261632 2770115618
+111387000000 111392562139 37129000000 37130854046 2769261632 2771115678
+111390000000 111395562285 37130000000 37131854095 2770261632 2772115727
+111393000000 111398562412 37131000000 37132854137 2771261632 2773115769
+111396000000 111401562586 37132000000 37133854195 2772261632 2774115827
+111399000000 111404562650 37133000000 37134854216 2773261632 2775115848
+111402000000 111407562857 37134000000 37135854285 2774261632 2776115917
+111405000000 111410563038 37135000000 37136854346 2775261632 2777115978
+111408000000 111413563187 37136000000 37137854395 2776261632 2778116027
+111411000000 111416563244 37137000000 37138854414 2777261632 2779116046
+111414000000 111419563440 37138000000 37139854480 2778261632 2780116112
+111417000000 111422563630 37139000000 37140854543 2779261632 2781116175
+111420000000 111425563775 37140000000 37141854591 2780261632 2782116223
+111423000000 111428563947 37141000000 37142854649 2781261632 2783116281
+111426000000 111431564080 37142000000 37143854693 2782261632 2784116325
+111429000000 111434564151 37143000000 37144854717 2783261632 2785116349
+111432000000 111437564377 37144000000 37145854792 2784261632 2786116424
+111435000000 111440564537 37145000000 37146854845 2785261632 2787116477
+111438000000 111443564669 37146000000 37147854889 2786261632 2788116521
+111441000000 111446564777 37147000000 37148854925 2787261632 2789116557
+111444000000 111449564988 37148000000 37149854996 2788261632 2790116628
+111447000000 111452565154 37149000000 37150855051 2789261632 2791116683
+111450000000 111455565265 37150000000 37151855088 2790261632 2792116720
+111453000000 111458565425 37151000000 37152855141 2791261632 2793116773
+111456000000 111461565537 37152000000 37153855179 2792261632 2794116811
+111459000000 111464565735 37153000000 37154855245 2793261632 2795116877
+111462000000 111467565825 37154000000 37155855275 2794261632 2796116907
+111465000000 111470566050 37155000000 37156855350 2795261632 2797116982
+111468000000 111473566182 37156000000 37157855394 2796261632 2798117026
+111471000000 111476566321 37157000000 37158855440 2797261632 2799117072
+111474000000 111479566372 37158000000 37159855457 2798261632 2800117089
+111477000000 111482566583 37159000000 37160855527 2799261632 2801117159
+111480000000 111485566792 37160000000 37161855597 2800261632 2802117229
+111483000000 111488566920 37161000000 37162855640 2801261632 2803117272
+111486000000 111491567063 37162000000 37163855687 2802261632 2804117319
+111489000000 111494567234 37163000000 37164855744 2803261632 2805117376
+111492000000 111497567331 37164000000 37165855777 2804261632 2806117409
+111495000000 111500567544 37165000000 37166855848 2805261632 2807117480
+111498000000 111503567674 37166000000 37167855891 2806261632 2808117523
+111501000000 111506567824 37167000000 37168855941 2807261632 2809117573
+111504000000 111509567984 37168000000 37169855994 2808261632 2810117626
+111507000000 111512568080 37169000000 37170856026 2809261632 2811117658
+111510000000 111515568268 37170000000 37171856089 2810261632 2812117721
+111513000000 111518568436 37171000000 37172856145 2811261632 2813117777
+111516000000 111521568572 37172000000 37173856190 2812261632 2814117822
+111519000000 111524568747 37173000000 37174856249 2813261632 2815117881
+111522000000 111527568869 37174000000 37175856289 2814261632 2816117921
+111525000000 111530569019 37175000000 37176856339 2815261632 2817117971
+111528000000 111533569167 37176000000 37177856389 2816261632 2818118021
+111531000000 111536569373 37177000000 37178856457 2817261632 2819118089
+111534000000 111539569487 37178000000 37179856495 2818261632 2820118127
+111537000000 111542569619 37179000000 37180856539 2819261632 2821118171
+111540000000 111545569793 37180000000 37181856597 2820261632 2822118229
+111543000000 111548569912 37181000000 37182856637 2821261632 2823118269
+111546000000 111551570036 37182000000 37183856678 2822261632 2824118310
+111549000000 111554570255 37183000000 37184856751 2823261632 2825118383
+111552000000 111557570391 37184000000 37185856797 2824261632 2826118429
+111555000000 111560570542 37185000000 37186856847 2825261632 2827118479
+111558000000 111563570702 37186000000 37187856900 2826261632 2828118532
+111561000000 111566570823 37187000000 37188856941 2827261632 2829118573
+111564000000 111569570904 37188000000 37189856968 2828261632 2830118600
+111567000000 111572571112 37189000000 37190857037 2829261632 2831118669
+111570000000 111575571267 37190000000 37191857089 2830261632 2832118721
+111573000000 111578571426 37191000000 37192857142 2831261632 2833118774
+111576000000 111581571578 37192000000 37193857192 2832261632 2834118824
+111579000000 111584571700 37193000000 37194857233 2833261632 2835118865
+111582000000 111587571878 37194000000 37195857292 2834261632 2836118924
+111585000000 111590572027 37195000000 37196857342 2835261632 2837118974
+111588000000 111593572155 37196000000 37197857385 2836261632 2838119017
+111591000000 111596572324 37197000000 37198857441 2837261632 2839119073
+111594000000 111599572444 37198000000 37199857481 2838261632 2840119113
+111597000000 111602572371 37199000000 37200857457 2839261632 2841119089
+111600000000 111605572694 37200000000 37201857564 2840261632 2842119196
+111603000000 111608572947 37201000000 37202857649 2841261632 2843119281
+111606000000 111611573057 37202000000 37203857685 2842261632 2844119317
+111609000000 111614573236 37203000000 37204857745 2843261632 2845119377
+111612000000 111617573284 37204000000 37205857761 2844261632 2846119393
+111615000000 111620573538 37205000000 37206857846 2845261632 2847119478
+111618000000 111623573657 37206000000 37207857885 2846261632 2848119517
+111621000000 111626573828 37207000000 37208857942 2847261632 2849119574
+111624000000 111629573975 37208000000 37209857991 2848261632 2850119623
+111627000000 111632574128 37209000000 37210858042 2849261632 2851119674
+111630000000 111635574274 37210000000 37211858091 2850261632 2852119723
+111633000000 111638574418 37211000000 37212858139 2851261632 2853119771
+111636000000 111641574581 37212000000 37213858193 2852261632 2854119825
+111639000000 111644574733 37213000000 37214858244 2853261632 2855119876
+111642000000 111647574887 37214000000 37215858295 2854261632 2856119927
+111645000000 111650575007 37215000000 37216858335 2855261632 2857119967
+111648000000 111653575216 37216000000 37217858405 2856261632 2858120037
+111651000000 111656575346 37217000000 37218858448 2857261632 2859120080
+111654000000 111659575460 37218000000 37219858486 2858261632 2860120118
+111657000000 111662575621 37219000000 37220858540 2859261632 2861120172
+111660000000 111665575756 37220000000 37221858585 2860261632 2862120217
+111663000000 111668575899 37221000000 37222858633 2861261632 2863120265
+111666000000 111671575999 37222000000 37223858666 2862261632 2864120298
+111669000000 111674576233 37223000000 37224858744 2863261632 2865120376
+111672000000 111677576306 37224000000 37225858768 2864261632 2866120400
+111675000000 111680576427 37225000000 37226858809 2865261632 2867120441
+111678000000 111683576616 37226000000 37227858872 2866261632 2868120504
+111681000000 111686576770 37227000000 37228858923 2867261632 2869120555
+111684000000 111689576949 37228000000 37229858983 2868261632 2870120615
+111687000000 111692577095 37229000000 37230859031 2869261632 2871120663
+111690000000 111695577222 37230000000 37231859074 2870261632 2872120706
+111693000000 111698577396 37231000000 37232859132 2871261632 2873120764
+111696000000 111701577460 37232000000 37233859153 2872261632 2874120785
+111699000000 111704577667 37233000000 37234859222 2873261632 2875120854
+111702000000 111707577848 37234000000 37235859282 2874261632 2876120914
+111705000000 111710577997 37235000000 37236859332 2875261632 2877120964
+111708000000 111713578054 37236000000 37237859351 2876261632 2878120983
+111711000000 111716578250 37237000000 37238859416 2877261632 2879121048
+111714000000 111719578440 37238000000 37239859480 2878261632 2880121112
+111717000000 111722578585 37239000000 37240859528 2879261632 2881121160
+111720000000 111725578757 37240000000 37241859585 2880261632 2882121217
+111723000000 111728578890 37241000000 37242859630 2881261632 2883121262
+111726000000 111731578961 37242000000 37243859653 2882261632 2884121285
+111729000000 111734579187 37243000000 37244859729 2883261632 2885121361
+111732000000 111737579347 37244000000 37245859782 2884261632 2886121414
+111735000000 111740579479 37245000000 37246859826 2885261632 2887121458
+111738000000 111743579587 37246000000 37247859862 2886261632 2888121494
+111741000000 111746579798 37247000000 37248859932 2887261632 2889121564
+111744000000 111749579964 37248000000 37249859988 2888261632 2890121620
+111747000000 111752580075 37249000000 37250860025 2889261632 2891121657
+111750000000 111755580235 37250000000 37251860078 2890261632 2892121710
+111753000000 111758580347 37251000000 37252860115 2891261632 2893121747
+111756000000 111761580545 37252000000 37253860181 2892261632 2894121813
+111759000000 111764580635 37253000000 37254860211 2893261632 2895121843
+111762000000 111767580860 37254000000 37255860286 2894261632 2896121918
+111765000000 111770580992 37255000000 37256860330 2895261632 2897121962
+111768000000 111773581131 37256000000 37257860377 2896261632 2898122009
+111771000000 111776581182 37257000000 37258860394 2897261632 2899122026
+111774000000 111779581393 37258000000 37259860464 2898261632 2900122096
+111777000000 111782581602 37259000000 37260860534 2899261632 2901122166
+111780000000 111785581730 37260000000 37261860576 2900261632 2902122208
+111783000000 111788581873 37261000000 37262860624 2901261632 2903122256
+111786000000 111791582044 37262000000 37263860681 2902261632 2904122313
+111789000000 111794582141 37263000000 37264860713 2903261632 2905122345
+111792000000 111797582354 37264000000 37265860784 2904261632 2906122416
+111795000000 111800582484 37265000000 37266860828 2905261632 2907122460
+111798000000 111803582634 37266000000 37267860878 2906261632 2908122510
+111801000000 111806582794 37267000000 37268860931 2907261632 2909122563
+111804000000 111809582890 37268000000 37269860963 2908261632 2910122595
+111807000000 111812583078 37269000000 37270861026 2909261632 2911122658
+111810000000 111815583246 37270000000 37271861082 2910261632 2912122714
+111813000000 111818583382 37271000000 37272861127 2911261632 2913122759
+111816000000 111821583557 37272000000 37273861185 2912261632 2914122817
+111819000000 111824583679 37273000000 37274861226 2913261632 2915122858
+111822000000 111827583829 37274000000 37275861276 2914261632 2916122908
+111825000000 111830583977 37275000000 37276861325 2915261632 2917122957
+111828000000 111833584183 37276000000 37277861394 2916261632 2918123026
+111831000000 111836584297 37277000000 37278861432 2917261632 2919123064
+111834000000 111839584429 37278000000 37279861476 2918261632 2920123108
+111837000000 111842584603 37279000000 37280861534 2919261632 2921123166
+111840000000 111845584722 37280000000 37281861574 2920261632 2922123206
+111843000000 111848584846 37281000000 37282861615 2921261632 2923123247
+111846000000 111851585065 37282000000 37283861688 2922261632 2924123320
+111849000000 111854585201 37283000000 37284861733 2923261632 2925123365
+111852000000 111857585352 37284000000 37285861784 2924261632 2926123416
+111855000000 111860585512 37285000000 37286861837 2925261632 2927123469
+111858000000 111863585633 37286000000 37287861877 2926261632 2928123509
+111861000000 111866585714 37287000000 37288861904 2927261632 2929123536
+111864000000 111869585922 37288000000 37289861974 2928261632 2930123606
+111867000000 111872586077 37289000000 37290862025 2929261632 2931123657
+111870000000 111875586236 37290000000 37291862078 2930261632 2932123710
+111873000000 111878586388 37291000000 37292862129 2931261632 2933123761
+111876000000 111881586510 37292000000 37293862170 2932261632 2934123802
+111879000000 111884586688 37293000000 37294862229 2933261632 2935123861
+111882000000 111887586837 37294000000 37295862279 2934261632 2936123911
+111885000000 111890586965 37295000000 37296862321 2935261632 2937123953
+111888000000 111893587134 37296000000 37297862378 2936261632 2938124010
+111891000000 111896587254 37297000000 37298862418 2937261632 2939124050
+111894000000 111899587181 37298000000 37299862393 2938261632 2940124025
+111897000000 111902587504 37299000000 37300862501 2939261632 2941124133
+111900000000 111905587757 37300000000 37301862585 2940261632 2942124217
+111903000000 111908587867 37301000000 37302862622 2941261632 2943124254
+111906000000 111911588046 37302000000 37303862682 2942261632 2944124314
+111909000000 111914588094 37303000000 37304862698 2943261632 2945124330
+111912000000 111917588348 37304000000 37305862782 2944261632 2946124414
+111915000000 111920588467 37305000000 37306862822 2945261632 2947124454
+111918000000 111923588638 37306000000 37307862879 2946261632 2948124511
+111921000000 111926588785 37307000000 37308862928 2947261632 2949124560
+111924000000 111929588938 37308000000 37309862979 2948261632 2950124611
+111927000000 111932589084 37309000000 37310863028 2949261632 2951124660
+111930000000 111935589228 37310000000 37311863076 2950261632 2952124708
+111933000000 111938589391 37311000000 37312863130 2951261632 2953124762
+111936000000 111941589543 37312000000 37313863181 2952261632 2954124813
+111939000000 111944589697 37313000000 37314863232 2953261632 2955124864
+111942000000 111947589817 37314000000 37315863272 2954261632 2956124904
+111945000000 111950590026 37315000000 37316863342 2955261632 2957124974
+111948000000 111953590156 37316000000 37317863385 2956261632 2958125017
+111951000000 111956590270 37317000000 37318863423 2957261632 2959125055
+111954000000 111959590431 37318000000 37319863477 2958261632 2960125109
+111957000000 111962590566 37319000000 37320863522 2959261632 2961125154
+111960000000 111965590709 37320000000 37321863569 2960261632 2962125201
+111963000000 111968590809 37321000000 37322863603 2961261632 2963125235
+111966000000 111971591043 37322000000 37323863681 2962261632 2964125313
+111969000000 111974591116 37323000000 37324863705 2963261632 2965125337
+111972000000 111977591237 37324000000 37325863745 2964261632 2966125377
+111975000000 111980591426 37325000000 37326863808 2965261632 2967125440
+111978000000 111983591580 37326000000 37327863860 2966261632 2968125492
+111981000000 111986591759 37327000000 37328863919 2967261632 2969125551
+111984000000 111989591905 37328000000 37329863968 2968261632 2970125600
+111987000000 111992592032 37329000000 37330864010 2969261632 2971125642
+111990000000 111995592206 37330000000 37331864068 2970261632 2972125700
+111993000000 111998592270 37331000000 37332864090 2971261632 2973125722
+111996000000 112001592477 37332000000 37333864159 2972261632 2974125791
+111999000000 112004592658 37333000000 37334864219 2973261632 2975125851
+112002000000 112007592807 37334000000 37335864269 2974261632 2976125901
+112005000000 112010592864 37335000000 37336864288 2975261632 2977125920
+112008000000 112013593060 37336000000 37337864353 2976261632 2978125985
+112011000000 112016593250 37337000000 37338864416 2977261632 2979126048
+112014000000 112019593395 37338000000 37339864465 2978261632 2980126097
+112017000000 112022593567 37339000000 37340864522 2979261632 2981126154
+112020000000 112025593700 37340000000 37341864566 2980261632 2982126198
+112023000000 112028593771 37341000000 37342864590 2981261632 2983126222
+112026000000 112031593997 37342000000 37343864665 2982261632 2984126297
+112029000000 112034594157 37343000000 37344864719 2983261632 2985126351
+112032000000 112037594289 37344000000 37345864763 2984261632 2986126395
+112035000000 112040594397 37345000000 37346864799 2985261632 2987126431
+112038000000 112043594608 37346000000 37347864869 2986261632 2988126501
+112041000000 112046594774 37347000000 37348864924 2987261632 2989126556
+112044000000 112049594885 37348000000 37349864961 2988261632 2990126593
+112047000000 112052595045 37349000000 37350865015 2989261632 2991126647
+112050000000 112055595157 37350000000 37351865052 2990261632 2992126684
+112053000000 112058595355 37351000000 37352865118 2991261632 2993126750
+112056000000 112061595445 37352000000 37353865148 2992261632 2994126780
+112059000000 112064595670 37353000000 37354865223 2993261632 2995126855
+112062000000 112067595802 37354000000 37355865267 2994261632 2996126899
+112065000000 112070595941 37355000000 37356865313 2995261632 2997126945
+112068000000 112073595992 37356000000 37357865330 2996261632 2998126962
+112071000000 112076596203 37357000000 37358865401 2997261632 2999127033
+112074000000 112079596412 37358000000 37359865470 2998261632 3000127102
+112077000000 112082596540 37359000000 37360865513 2999261632 3001127145
+112080000000 112085596683 37360000000 37361865561 3000261632 3002127193
+112083000000 112088596854 37361000000 37362865618 3001261632 3003127250
+112086000000 112091596951 37362000000 37363865650 3002261632 3004127282
+112089000000 112094597164 37363000000 37364865721 3003261632 3005127353
+112092000000 112097597294 37364000000 37365865764 3004261632 3006127396
+112095000000 112100597444 37365000000 37366865814 3005261632 3007127446
+112098000000 112103597604 37366000000 37367865868 3006261632 3008127500
+112101000000 112106597700 37367000000 37368865900 3007261632 3009127532
+112104000000 112109597888 37368000000 37369865962 3008261632 3010127594
+112107000000 112112598056 37369000000 37370866018 3009261632 3011127650
+112110000000 112115598192 37370000000 37371866064 3010261632 3012127696
+112113000000 112118598367 37371000000 37372866122 3011261632 3013127754
+112116000000 112121598489 37372000000 37373866163 3012261632 3014127795
+112119000000 112124598639 37373000000 37374866213 3013261632 3015127845
+112122000000 112127598787 37374000000 37375866262 3014261632 3016127894
+112125000000 112130598993 37375000000 37376866331 3015261632 3017127963
+112128000000 112133599107 37376000000 37377866369 3016261632 3018128001
+112131000000 112136599239 37377000000 37378866413 3017261632 3019128045
+112134000000 112139599413 37378000000 37379866471 3018261632 3020128103
+112137000000 112142599532 37379000000 37380866510 3019261632 3021128142
+112140000000 112145599656 37380000000 37381866552 3020261632 3022128184
+112143000000 112148599875 37381000000 37382866625 3021261632 3023128257
+112146000000 112151600011 37382000000 37383866670 3022261632 3024128302
+112149000000 112154600162 37383000000 37384866720 3023261632 3025128352
+112152000000 112157600322 37384000000 37385866774 3024261632 3026128406
+112155000000 112160600443 37385000000 37386866814 3025261632 3027128446
+112158000000 112163600524 37386000000 37387866841 3026261632 3028128473
+112161000000 112166600732 37387000000 37388866910 3027261632 3029128542
+112164000000 112169600887 37388000000 37389866962 3028261632 3030128594
+112167000000 112172601046 37389000000 37390867015 3029261632 3031128647
+112170000000 112175601198 37390000000 37391867066 3030261632 3032128698
+112173000000 112178601320 37391000000 37392867106 3031261632 3033128738
+112176000000 112181601498 37392000000 37393867166 3032261632 3034128798
+112179000000 112184601647 37393000000 37394867215 3033261632 3035128847
+112182000000 112187601775 37394000000 37395867258 3034261632 3036128890
+112185000000 112190601944 37395000000 37396867314 3035261632 3037128946
+112188000000 112193602064 37396000000 37397867354 3036261632 3038128986
+112191000000 112196601991 37397000000 37398867330 3037261632 3039128962
+112194000000 112199602314 37398000000 37399867438 3038261632 3040129070
+112197000000 112202602567 37399000000 37400867522 3039261632 3041129154
+112200000000 112205602677 37400000000 37401867559 3040261632 3042129191
+112203000000 112208602856 37401000000 37402867618 3041261632 3043129250
+112206000000 112211602904 37402000000 37403867634 3042261632 3044129266
+112209000000 112214603158 37403000000 37404867719 3043261632 3045129351
+112212000000 112217603277 37404000000 37405867759 3044261632 3046129391
+112215000000 112220603448 37405000000 37406867816 3045261632 3047129448
+112218000000 112223603595 37406000000 37407867865 3046261632 3048129497
+112221000000 112226603748 37407000000 37408867916 3047261632 3049129548
+112224000000 112229603894 37408000000 37409867964 3048261632 3050129596
+112227000000 112232604038 37409000000 37410868012 3049261632 3051129644
+112230000000 112235604201 37410000000 37411868067 3050261632 3052129699
+112233000000 112238604353 37411000000 37412868117 3051261632 3053129749
+112236000000 112241604507 37412000000 37413868169 3052261632 3054129801
+112239000000 112244604627 37413000000 37414868209 3053261632 3055129841
+112242000000 112247604836 37414000000 37415868278 3054261632 3056129910
+112245000000 112250604966 37415000000 37416868322 3055261632 3057129954
+112248000000 112253605080 37416000000 37417868360 3056261632 3058129992
+112251000000 112256605241 37417000000 37418868413 3057261632 3059130045
+112254000000 112259605376 37418000000 37419868458 3058261632 3060130090
+112257000000 112262605519 37419000000 37420868506 3059261632 3061130138
+112260000000 112265605619 37420000000 37421868539 3060261632 3062130171
+112263000000 112268605853 37421000000 37422868617 3061261632 3063130249
+112266000000 112271605926 37422000000 37423868642 3062261632 3064130274
+112269000000 112274606047 37423000000 37424868682 3063261632 3065130314
+112272000000 112277606236 37424000000 37425868745 3064261632 3066130377
+112275000000 112280606390 37425000000 37426868796 3065261632 3067130428
+112278000000 112283606569 37426000000 37427868856 3066261632 3068130488
+112281000000 112286606715 37427000000 37428868905 3067261632 3069130537
+112284000000 112289606842 37428000000 37429868947 3068261632 3070130579
+112287000000 112292607016 37429000000 37430869005 3069261632 3071130637
+112290000000 112295607080 37430000000 37431869026 3070261632 3072130658
+112293000000 112298607287 37431000000 37432869095 3071261632 3073130727
+112296000000 112301607468 37432000000 37433869156 3072261632 3074130788
+112299000000 112304607617 37433000000 37434869205 3073261632 3075130837
+112302000000 112307607674 37434000000 37435869224 3074261632 3076130856
+112305000000 112310607870 37435000000 37436869290 3075261632 3077130922
+112308000000 112313608060 37436000000 37437869353 3076261632 3078130985
+112311000000 112316608205 37437000000 37438869401 3077261632 3079131033
+112314000000 112319608377 37438000000 37439869459 3078261632 3080131091
+112317000000 112322608510 37439000000 37440869503 3079261632 3081131135
+112320000000 112325608581 37440000000 37441869527 3080261632 3082131159
+112323000000 112328608807 37441000000 37442869602 3081261632 3083131234
+112326000000 112331608967 37442000000 37443869655 3082261632 3084131287
+112329000000 112334609099 37443000000 37444869699 3083261632 3085131331
+112332000000 112337609207 37444000000 37445869735 3084261632 3086131367
+112335000000 112340609418 37445000000 37446869806 3085261632 3087131438
+112338000000 112343609584 37446000000 37447869861 3086261632 3088131493
+112341000000 112346609695 37447000000 37448869898 3087261632 3089131530
+112344000000 112349609855 37448000000 37449869951 3088261632 3090131583
+112347000000 112352609967 37449000000 37450869989 3089261632 3091131621
+112350000000 112355610165 37450000000 37451870055 3090261632 3092131687
+112353000000 112358610255 37451000000 37452870085 3091261632 3093131717
+112356000000 112361610480 37452000000 37453870160 3092261632 3094131792
+112359000000 112364610612 37453000000 37454870204 3093261632 3095131836
+112362000000 112367610751 37454000000 37455870250 3094261632 3096131882
+112365000000 112370610802 37455000000 37456870267 3095261632 3097131899
+112368000000 112373611013 37456000000 37457870337 3096261632 3098131969
+112371000000 112376611222 37457000000 37458870407 3097261632 3099132039
+112374000000 112379611350 37458000000 37459870450 3098261632 3100132082
+112377000000 112382611493 37459000000 37460870497 3099261632 3101132129
+112380000000 112385611664 37460000000 37461870554 3100261632 3102132186
+112383000000 112388611761 37461000000 37462870587 3101261632 3103132219
+112386000000 112391611974 37462000000 37463870658 3102261632 3104132290
+112389000000 112394612104 37463000000 37464870701 3103261632 3105132333
+112392000000 112397612254 37464000000 37465870751 3104261632 3106132383
+112395000000 112400612414 37465000000 37466870804 3105261632 3107132436
+112398000000 112403612510 37466000000 37467870836 3106261632 3108132468
+112401000000 112406612698 37467000000 37468870899 3107261632 3109132531
+112404000000 112409612866 37468000000 37469870955 3108261632 3110132587
+112407000000 112412613002 37469000000 37470871000 3109261632 3111132632
+112410000000 112415613177 37470000000 37471871059 3110261632 3112132691
+112413000000 112418613299 37471000000 37472871099 3111261632 3113132731
+112416000000 112421613449 37472000000 37473871149 3112261632 3114132781
+112419000000 112424613597 37473000000 37474871199 3113261632 3115132831
+112422000000 112427613803 37474000000 37475871267 3114261632 3116132899
+112425000000 112430613917 37475000000 37476871305 3115261632 3117132937
+112428000000 112433614049 37476000000 37477871349 3116261632 3118132981
+112431000000 112436614223 37477000000 37478871407 3117261632 3119133039
+112434000000 112439614342 37478000000 37479871447 3118261632 3120133079
+112437000000 112442614466 37479000000 37480871488 3119261632 3121133120
+112440000000 112445614685 37480000000 37481871561 3120261632 3122133193
+112443000000 112448614821 37481000000 37482871607 3121261632 3123133239
+112446000000 112451614972 37482000000 37483871657 3122261632 3124133289
+112449000000 112454615132 37483000000 37484871710 3123261632 3125133342
+112452000000 112457615253 37484000000 37485871751 3124261632 3126133383
+112455000000 112460615334 37485000000 37486871778 3125261632 3127133410
+112458000000 112463615542 37486000000 37487871847 3126261632 3128133479
+112461000000 112466615697 37487000000 37488871899 3127261632 3129133531
+112464000000 112469615856 37488000000 37489871952 3128261632 3130133584
+112467000000 112472616008 37489000000 37490872002 3129261632 3131133634
+112470000000 112475616130 37490000000 37491872043 3130261632 3132133675
+112473000000 112478616308 37491000000 37492872102 3131261632 3133133734
+112476000000 112481616457 37492000000 37493872152 3132261632 3134133784
+112479000000 112484616585 37493000000 37494872195 3133261632 3135133827
+112482000000 112487616754 37494000000 37495872251 3134261632 3136133883
+112485000000 112490616874 37495000000 37496872291 3135261632 3137133923
+112488000000 112493616801 37496000000 37497872267 3136261632 3138133899
+112491000000 112496617124 37497000000 37498872374 3137261632 3139134006
+112494000000 112499617377 37498000000 37499872459 3138261632 3140134091
+112497000000 112502617487 37499000000 37500872495 3139261632 3141134127
+112500000000 112505617666 37500000000 37501872555 3140261632 3142134187
+112503000000 112508617714 37501000000 37502872571 3141261632 3143134203
+112506000000 112511617968 37502000000 37503872656 3142261632 3144134288
+112509000000 112514618087 37503000000 37504872695 3143261632 3145134327
+112512000000 112517618258 37504000000 37505872752 3144261632 3146134384
+112515000000 112520618405 37505000000 37506872801 3145261632 3147134433
+112518000000 112523618558 37506000000 37507872852 3146261632 3148134484
+112521000000 112526618704 37507000000 37508872901 3147261632 3149134533
+112524000000 112529618848 37508000000 37509872949 3148261632 3150134581
+112527000000 112532619011 37509000000 37510873003 3149261632 3151134635
+112530000000 112535619163 37510000000 37511873054 3150261632 3152134686
+112533000000 112538619317 37511000000 37512873105 3151261632 3153134737
+112536000000 112541619437 37512000000 37513873145 3152261632 3154134777
+112539000000 112544619646 37513000000 37514873215 3153261632 3155134847
+112542000000 112547619776 37514000000 37515873258 3154261632 3156134890
+112545000000 112550619890 37515000000 37516873296 3155261632 3157134928
+112548000000 112553620051 37516000000 37517873350 3156261632 3158134982
+112551000000 112556620186 37517000000 37518873395 3157261632 3159135027
+112554000000 112559620329 37518000000 37519873443 3158261632 3160135075
+112557000000 112562620429 37519000000 37520873476 3159261632 3161135108
+112560000000 112565620663 37520000000 37521873554 3160261632 3162135186
+112563000000 112568620736 37521000000 37522873578 3161261632 3163135210
+112566000000 112571620857 37522000000 37523873619 3162261632 3164135251
+112569000000 112574621046 37523000000 37524873682 3163261632 3165135314
+112572000000 112577621200 37524000000 37525873733 3164261632 3166135365
+112575000000 112580621379 37525000000 37526873793 3165261632 3167135425
+112578000000 112583621525 37526000000 37527873841 3166261632 3168135473
+112581000000 112586621652 37527000000 37528873884 3167261632 3169135516
+112584000000 112589621826 37528000000 37529873942 3168261632 3170135574
+112587000000 112592621890 37529000000 37530873963 3169261632 3171135595
+112590000000 112595622097 37530000000 37531874032 3170261632 3172135664
+112593000000 112598622278 37531000000 37532874092 3171261632 3173135724
+112596000000 112601622427 37532000000 37533874142 3172261632 3174135774
+112599000000 112604622484 37533000000 37534874161 3173261632 3175135793
+112602000000 112607622680 37534000000 37535874226 3174261632 3176135858
+112605000000 112610622870 37535000000 37536874290 3175261632 3177135922
+112608000000 112613623015 37536000000 37537874338 3176261632 3178135970
+112611000000 112616623187 37537000000 37538874395 3177261632 3179136027
+112614000000 112619623320 37538000000 37539874440 3178261632 3180136072
+112617000000 112622623391 37539000000 37540874463 3179261632 3181136095
+112620000000 112625623617 37540000000 37541874539 3180261632 3182136171
+112623000000 112628623777 37541000000 37542874592 3181261632 3183136224
+112626000000 112631623909 37542000000 37543874636 3182261632 3184136268
+112629000000 112634624017 37543000000 37544874672 3183261632 3185136304
+112632000000 112637624228 37544000000 37545874742 3184261632 3186136374
+112635000000 112640624394 37545000000 37546874798 3185261632 3187136430
+112638000000 112643624505 37546000000 37547874835 3186261632 3188136467
+112641000000 112646624665 37547000000 37548874888 3187261632 3189136520
+112644000000 112649624777 37548000000 37549874925 3188261632 3190136557
+112647000000 112652624975 37549000000 37550874991 3189261632 3191136623
+112650000000 112655625065 37550000000 37551875021 3190261632 3192136653
+112653000000 112658625290 37551000000 37552875096 3191261632 3193136728
+112656000000 112661625422 37552000000 37553875140 3192261632 3194136772
+112659000000 112664625561 37553000000 37554875187 3193261632 3195136819
+112662000000 112667625612 37554000000 37555875204 3194261632 3196136836
+112665000000 112670625823 37555000000 37556875274 3195261632 3197136906
+112668000000 112673626032 37556000000 37557875344 3196261632 3198136976
+112671000000 112676626160 37557000000 37558875386 3197261632 3199137018
+112674000000 112679626303 37558000000 37559875434 3198261632 3200137066
+112677000000 112682626474 37559000000 37560875491 3199261632 3201137123
+112680000000 112685626571 37560000000 37561875523 3200261632 3202137155
+112683000000 112688626784 37561000000 37562875594 3201261632 3203137226
+112686000000 112691626914 37562000000 37563875638 3202261632 3204137270
+112689000000 112694627064 37563000000 37564875688 3203261632 3205137320
+112692000000 112697627224 37564000000 37565875741 3204261632 3206137373
+112695000000 112700627320 37565000000 37566875773 3205261632 3207137405
+112698000000 112703627508 37566000000 37567875836 3206261632 3208137468
+112701000000 112706627676 37567000000 37568875892 3207261632 3209137524
+112704000000 112709627812 37568000000 37569875937 3208261632 3210137569
+112707000000 112712627987 37569000000 37570875995 3209261632 3211137627
+112710000000 112715628109 37570000000 37571876036 3210261632 3212137668
+112713000000 112718628259 37571000000 37572876086 3211261632 3213137718
+112716000000 112721628407 37572000000 37573876135 3212261632 3214137767
+112719000000 112724628613 37573000000 37574876204 3213261632 3215137836
+112722000000 112727628727 37574000000 37575876242 3214261632 3216137874
+112725000000 112730628859 37575000000 37576876286 3215261632 3217137918
+112728000000 112733629033 37576000000 37577876344 3216261632 3218137976
+112731000000 112736629152 37577000000 37578876384 3217261632 3219138016
+112734000000 112739629276 37578000000 37579876425 3218261632 3220138057
+112737000000 112742629495 37579000000 37580876498 3219261632 3221138130
+112740000000 112745629631 37580000000 37581876543 3220261632 3222138175
+112743000000 112748629782 37581000000 37582876594 3221261632 3223138226
+112746000000 112751629942 37582000000 37583876647 3222261632 3224138279
+112749000000 112754630063 37583000000 37584876687 3223261632 3225138319
+112752000000 112757630144 37584000000 37585876714 3224261632 3226138346
+112755000000 112760630352 37585000000 37586876784 3225261632 3227138416
+112758000000 112763630507 37586000000 37587876835 3226261632 3228138467
+112761000000 112766630666 37587000000 37588876888 3227261632 3229138520
+112764000000 112769630818 37588000000 37589876939 3228261632 3230138571
+112767000000 112772630940 37589000000 37590876980 3229261632 3231138612
+112770000000 112775631118 37590000000 37591877039 3230261632 3232138671
+112773000000 112778631267 37591000000 37592877089 3231261632 3233138721
+112776000000 112781631395 37592000000 37593877131 3232261632 3234138763
+112779000000 112784631564 37593000000 37594877188 3233261632 3235138820
+112782000000 112787631684 37594000000 37595877228 3234261632 3236138860
+112785000000 112790631611 37595000000 37596877203 3235261632 3237138835
+112788000000 112793631934 37596000000 37597877311 3236261632 3238138943
+112791000000 112796632187 37597000000 37598877395 3237261632 3239139027
+112794000000 112799632297 37598000000 37599877432 3238261632 3240139064
+112797000000 112802632476 37599000000 37600877492 3239261632 3241139124
+112800000000 112805632524 37600000000 37601877508 3240261632 3242139140
+112803000000 112808632778 37601000000 37602877592 3241261632 3243139224
+112806000000 112811632897 37602000000 37603877632 3242261632 3244139264
+112809000000 112814633068 37603000000 37604877689 3243261632 3245139321
+112812000000 112817633215 37604000000 37605877738 3244261632 3246139370
+112815000000 112820633368 37605000000 37606877789 3245261632 3247139421
+112818000000 112823633514 37606000000 37607877838 3246261632 3248139470
+112821000000 112826633658 37607000000 37608877886 3247261632 3249139518
+112824000000 112829633821 37608000000 37609877940 3248261632 3250139572
+112827000000 112832633973 37609000000 37610877991 3249261632 3251139623
+112830000000 112835634127 37610000000 37611878042 3250261632 3252139674
+112833000000 112838634247 37611000000 37612878082 3251261632 3253139714
+112836000000 112841634456 37612000000 37613878152 3252261632 3254139784
+112839000000 112844634586 37613000000 37614878195 3253261632 3255139827
+112842000000 112847634700 37614000000 37615878233 3254261632 3256139865
+112845000000 112850634861 37615000000 37616878287 3255261632 3257139919
+112848000000 112853634996 37616000000 37617878332 3256261632 3258139964
+112851000000 112856635139 37617000000 37618878379 3257261632 3259140011
+112854000000 112859635239 37618000000 37619878413 3258261632 3260140045
+112857000000 112862635473 37619000000 37620878491 3259261632 3261140123
+112860000000 112865635546 37620000000 37621878515 3260261632 3262140147
+112863000000 112868635667 37621000000 37622878555 3261261632 3263140187
+112866000000 112871635856 37622000000 37623878618 3262261632 3264140250
+112869000000 112874636010 37623000000 37624878670 3263261632 3265140302
+112872000000 112877636189 37624000000 37625878729 3264261632 3266140361
+112875000000 112880636335 37625000000 37626878778 3265261632 3267140410
+112878000000 112883636462 37626000000 37627878820 3266261632 3268140452
+112881000000 112886636636 37627000000 37628878878 3267261632 3269140510
+112884000000 112889636700 37628000000 37629878900 3268261632 3270140532
+112887000000 112892636907 37629000000 37630878969 3269261632 3271140601
+112890000000 112895637088 37630000000 37631879029 3270261632 3272140661
+112893000000 112898637237 37631000000 37632879079 3271261632 3273140711
+112896000000 112901637294 37632000000 37633879098 3272261632 3274140730
+112899000000 112904637490 37633000000 37634879163 3273261632 3275140795
+112902000000 112907637680 37634000000 37635879226 3274261632 3276140858
+112905000000 112910637825 37635000000 37636879275 3275261632 3277140907
+112908000000 112913637997 37636000000 37637879332 3276261632 3278140964
+112911000000 112916638130 37637000000 37638879376 3277261632 3279141008
+112914000000 112919638201 37638000000 37639879400 3278261632 3280141032
+112917000000 112922638427 37639000000 37640879475 3279261632 3281141107
+112920000000 112925638587 37640000000 37641879529 3280261632 3282141161
+112923000000 112928638719 37641000000 37642879573 3281261632 3283141205
+112926000000 112931638827 37642000000 37643879609 3282261632 3284141241
+112929000000 112934639038 37643000000 37644879679 3283261632 3285141311
+112932000000 112937639204 37644000000 37645879734 3284261632 3286141366
+112935000000 112940639315 37645000000 37646879771 3285261632 3287141403
+112938000000 112943639475 37646000000 37647879825 3286261632 3288141457
+112941000000 112946639587 37647000000 37648879862 3287261632 3289141494
+112944000000 112949639785 37648000000 37649879928 3288261632 3290141560
+112947000000 112952639875 37649000000 37650879958 3289261632 3291141590
+112950000000 112955640100 37650000000 37651880033 3290261632 3292141665
+112953000000 112958640232 37651000000 37652880077 3291261632 3293141709
+112956000000 112961640371 37652000000 37653880123 3292261632 3294141755
+112959000000 112964640422 37653000000 37654880140 3293261632 3295141772
+112962000000 112967640633 37654000000 37655880211 3294261632 3296141843
+112965000000 112970640842 37655000000 37656880280 3295261632 3297141912
+112968000000 112973640970 37656000000 37657880323 3296261632 3298141955
+112971000000 112976641113 37657000000 37658880371 3297261632 3299142003
+112974000000 112979641284 37658000000 37659880428 3298261632 3300142060
+112977000000 112982641381 37659000000 37660880460 3299261632 3301142092
+112980000000 112985641594 37660000000 37661880531 3300261632 3302142163
+112983000000 112988641724 37661000000 37662880574 3301261632 3303142206
+112986000000 112991641874 37662000000 37663880624 3302261632 3304142256
+112989000000 112994642034 37663000000 37664880678 3303261632 3305142310
+112992000000 112997642130 37664000000 37665880710 3304261632 3306142342
+112995000000 113000642318 37665000000 37666880772 3305261632 3307142404
+112998000000 113003642486 37666000000 37667880828 3306261632 3308142460
+113001000000 113006642622 37667000000 37668880874 3307261632 3309142506
+113004000000 113009642797 37668000000 37669880932 3308261632 3310142564
+113007000000 113012642919 37669000000 37670880973 3309261632 3311142605
+113010000000 113015643069 37670000000 37671881023 3310261632 3312142655
+113013000000 113018643217 37671000000 37672881072 3311261632 3313142704
+113016000000 113021643423 37672000000 37673881141 3312261632 3314142773
+113019000000 113024643537 37673000000 37674881179 3313261632 3315142811
+113022000000 113027643669 37674000000 37675881223 3314261632 3316142855
+113025000000 113030643843 37675000000 37676881281 3315261632 3317142913
+113028000000 113033643962 37676000000 37677881320 3316261632 3318142952
+113031000000 113036644086 37677000000 37678881362 3317261632 3319142994
+113034000000 113039644305 37678000000 37679881435 3318261632 3320143067
+113037000000 113042644441 37679000000 37680881480 3319261632 3321143112
+113040000000 113045644592 37680000000 37681881530 3320261632 3322143162
+113043000000 113048644752 37681000000 37682881584 3321261632 3323143216
+113046000000 113051644873 37682000000 37683881624 3322261632 3324143256
+113049000000 113054644954 37683000000 37684881651 3323261632 3325143283
+113052000000 113057645162 37684000000 37685881720 3324261632 3326143352
+113055000000 113060645317 37685000000 37686881772 3325261632 3327143404
+113058000000 113063645476 37686000000 37687881825 3326261632 3328143457
+113061000000 113066645628 37687000000 37688881876 3327261632 3329143508
+113064000000 113069645750 37688000000 37689881916 3328261632 3330143548
+113067000000 113072645928 37689000000 37690881976 3329261632 3331143608
+113070000000 113075646077 37690000000 37691882025 3330261632 3332143657
+113073000000 113078646205 37691000000 37692882068 3331261632 3333143700
+113076000000 113081646374 37692000000 37693882124 3332261632 3334143756
+113079000000 113084646494 37693000000 37694882164 3333261632 3335143796
+113082000000 113087646421 37694000000 37695882140 3334261632 3336143772
+113085000000 113090646744 37695000000 37696882248 3335261632 3337143880
+113088000000 113093646997 37696000000 37697882332 3336261632 3338143964
+113091000000 113096647107 37697000000 37698882369 3337261632 3339144001
+113094000000 113099647286 37698000000 37699882428 3338261632 3340144060
+113097000000 113102647334 37699000000 37700882444 3339261632 3341144076
+113100000000 113105647588 37700000000 37701882529 3340261632 3342144161
+113103000000 113108647707 37701000000 37702882569 3341261632 3343144201
+113106000000 113111647878 37702000000 37703882626 3342261632 3344144258
+113109000000 113114648025 37703000000 37704882675 3343261632 3345144307
+113112000000 113117648178 37704000000 37705882726 3344261632 3346144358
+113115000000 113120648324 37705000000 37706882774 3345261632 3347144406
+113118000000 113123648468 37706000000 37707882822 3346261632 3348144454
+113121000000 113126648631 37707000000 37708882877 3347261632 3349144509
+113124000000 113129648783 37708000000 37709882927 3348261632 3350144559
+113127000000 113132648937 37709000000 37710882979 3349261632 3351144611
+113130000000 113135649057 37710000000 37711883019 3350261632 3352144651
+113133000000 113138649266 37711000000 37712883088 3351261632 3353144720
+113136000000 113141649396 37712000000 37713883132 3352261632 3354144764
+113139000000 113144649510 37713000000 37714883170 3353261632 3355144802
+113142000000 113147649671 37714000000 37715883223 3354261632 3356144855
+113145000000 113150649806 37715000000 37716883268 3355261632 3357144900
+113148000000 113153649949 37716000000 37717883316 3356261632 3358144948
+113151000000 113156650049 37717000000 37718883349 3357261632 3359144981
+113154000000 113159650283 37718000000 37719883427 3358261632 3360145059
+113157000000 113162650356 37719000000 37720883452 3359261632 3361145084
+113160000000 113165650477 37720000000 37721883492 3360261632 3362145124
+113163000000 113168650666 37721000000 37722883555 3361261632 3363145187
+113166000000 113171650820 37722000000 37723883606 3362261632 3364145238
+113169000000 113174650999 37723000000 37724883666 3363261632 3365145298
+113172000000 113177651145 37724000000 37725883715 3364261632 3366145347
+113175000000 113180651272 37725000000 37726883757 3365261632 3367145389
+113178000000 113183651446 37726000000 37727883815 3366261632 3368145447
+113181000000 113186651510 37727000000 37728883836 3367261632 3369145468
+113184000000 113189651717 37728000000 37729883905 3368261632 3370145537
+113187000000 113192651898 37729000000 37730883966 3369261632 3371145598
+113190000000 113195652047 37730000000 37731884015 3370261632 3372145647
+113193000000 113198652104 37731000000 37732884034 3371261632 3373145666
+113196000000 113201652300 37732000000 37733884100 3372261632 3374145732
+113199000000 113204652490 37733000000 37734884163 3373261632 3375145795
+113202000000 113207652635 37734000000 37735884211 3374261632 3376145843
+113205000000 113210652807 37735000000 37736884269 3375261632 3377145901
+113208000000 113213652940 37736000000 37737884313 3376261632 3378145945
+113211000000 113216653011 37737000000 37738884337 3377261632 3379145969
+113214000000 113219653237 37738000000 37739884412 3378261632 3380146044
+113217000000 113222653397 37739000000 37740884465 3379261632 3381146097
+113220000000 113225653529 37740000000 37741884509 3380261632 3382146141
+113223000000 113228653637 37741000000 37742884545 3381261632 3383146177
+113226000000 113231653848 37742000000 37743884616 3382261632 3384146248
+113229000000 113234654014 37743000000 37744884671 3383261632 3385146303
+113232000000 113237654125 37744000000 37745884708 3384261632 3386146340
+113235000000 113240654285 37745000000 37746884761 3385261632 3387146393
+113238000000 113243654397 37746000000 37747884799 3386261632 3388146431
+113241000000 113246654595 37747000000 37748884865 3387261632 3389146497
+113244000000 113249654685 37748000000 37749884895 3388261632 3390146527
+113247000000 113252654910 37749000000 37750884970 3389261632 3391146602
+113250000000 113255655042 37750000000 37751885014 3390261632 3392146646
+113253000000 113258655181 37751000000 37752885060 3391261632 3393146692
+113256000000 113261655232 37752000000 37753885077 3392261632 3394146709
+113259000000 113264655443 37753000000 37754885147 3393261632 3395146779
+113262000000 113267655652 37754000000 37755885217 3394261632 3396146849
+113265000000 113270655780 37755000000 37756885260 3395261632 3397146892
+113268000000 113273655923 37756000000 37757885307 3396261632 3398146939
+113271000000 113276656094 37757000000 37758885364 3397261632 3399146996
+113274000000 113279656191 37758000000 37759885397 3398261632 3400147029
+113277000000 113282656404 37759000000 37760885468 3399261632 3401147100
+113280000000 113285656534 37760000000 37761885511 3400261632 3402147143
+113283000000 113288656684 37761000000 37762885561 3401261632 3403147193
+113286000000 113291656844 37762000000 37763885614 3402261632 3404147246
+113289000000 113294656940 37763000000 37764885646 3403261632 3405147278
+113292000000 113297657128 37764000000 37765885709 3404261632 3406147341
+113295000000 113300657296 37765000000 37766885765 3405261632 3407147397
+113298000000 113303657432 37766000000 37767885810 3406261632 3408147442
+113301000000 113306657607 37767000000 37768885869 3407261632 3409147501
+113304000000 113309657729 37768000000 37769885909 3408261632 3410147541
+113307000000 113312657879 37769000000 37770885959 3409261632 3411147591
+113310000000 113315658027 37770000000 37771886009 3410261632 3412147641
+113313000000 113318658233 37771000000 37772886077 3411261632 3413147709
+113316000000 113321658347 37772000000 37773886115 3412261632 3414147747
+113319000000 113324658479 37773000000 37774886159 3413261632 3415147791
+113322000000 113327658653 37774000000 37775886217 3414261632 3416147849
+113325000000 113330658772 37775000000 37776886257 3415261632 3417147889
+113328000000 113333658896 37776000000 37777886298 3416261632 3418147930
+113331000000 113336659115 37777000000 37778886371 3417261632 3419148003
+113334000000 113339659251 37778000000 37779886417 3418261632 3420148049
+113337000000 113342659402 37779000000 37780886467 3419261632 3421148099
+113340000000 113345659562 37780000000 37781886520 3420261632 3422148152
+113343000000 113348659683 37781000000 37782886561 3421261632 3423148193
+113346000000 113351659764 37782000000 37783886588 3422261632 3424148220
+113349000000 113354659972 37783000000 37784886657 3423261632 3425148289
+113352000000 113357660127 37784000000 37785886709 3424261632 3426148341
+113355000000 113360660286 37785000000 37786886762 3425261632 3427148394
+113358000000 113363660438 37786000000 37787886812 3426261632 3428148444
+113361000000 113366660560 37787000000 37788886853 3427261632 3429148485
+113364000000 113369660738 37788000000 37789886912 3428261632 3430148544
+113367000000 113372660887 37789000000 37790886962 3429261632 3431148594
+113370000000 113375661015 37790000000 37791887005 3430261632 3432148637
+113373000000 113378661184 37791000000 37792887061 3431261632 3433148693
+113376000000 113381661304 37792000000 37793887101 3432261632 3434148733
+113379000000 113384661231 37793000000 37794887077 3433261632 3435148709
+113382000000 113387661554 37794000000 37795887184 3434261632 3436148816
+113385000000 113390661807 37795000000 37796887269 3435261632 3437148901
+113388000000 113393661917 37796000000 37797887305 3436261632 3438148937
+113391000000 113396662096 37797000000 37798887365 3437261632 3439148997
+113394000000 113399662144 37798000000 37799887381 3438261632 3440149013
+113397000000 113402662398 37799000000 37800887466 3439261632 3441149098
+113400000000 113405662517 37800000000 37801887505 3440261632 3442149137
+113403000000 113408662688 37801000000 37802887562 3441261632 3443149194
+113406000000 113411662835 37802000000 37803887611 3442261632 3444149243
+113409000000 113414662988 37803000000 37804887662 3443261632 3445149294
+113412000000 113417663134 37804000000 37805887711 3444261632 3446149343
+113415000000 113420663278 37805000000 37806887759 3445261632 3447149391
+113418000000 113423663441 37806000000 37807887813 3446261632 3448149445
+113421000000 113426663593 37807000000 37808887864 3447261632 3449149496
+113424000000 113429663747 37808000000 37809887915 3448261632 3450149547
+113427000000 113432663867 37809000000 37810887955 3449261632 3451149587
+113430000000 113435664076 37810000000 37811888025 3450261632 3452149657
+113433000000 113438664206 37811000000 37812888068 3451261632 3453149700
+113436000000 113441664320 37812000000 37813888106 3452261632 3454149738
+113439000000 113444664481 37813000000 37814888160 3453261632 3455149792
+113442000000 113447664616 37814000000 37815888205 3454261632 3456149837
+113445000000 113450664759 37815000000 37816888253 3455261632 3457149885
+113448000000 113453664859 37816000000 37817888286 3456261632 3458149918
+113451000000 113456665093 37817000000 37818888364 3457261632 3459149996
+113454000000 113459665166 37818000000 37819888388 3458261632 3460150020
+113457000000 113462665287 37819000000 37820888429 3459261632 3461150061
+113460000000 113465665476 37820000000 37821888492 3460261632 3462150124
+113463000000 113468665630 37821000000 37822888543 3461261632 3463150175
+113466000000 113471665809 37822000000 37823888603 3462261632 3464150235
+113469000000 113474665955 37823000000 37824888651 3463261632 3465150283
+113472000000 113477666082 37824000000 37825888694 3464261632 3466150326
+113475000000 113480666256 37825000000 37826888752 3465261632 3467150384
+113478000000 113483666320 37826000000 37827888773 3466261632 3468150405
+113481000000 113486666527 37827000000 37828888842 3467261632 3469150474
+113484000000 113489666708 37828000000 37829888902 3468261632 3470150534
+113487000000 113492666857 37829000000 37830888952 3469261632 3471150584
+113490000000 113495666914 37830000000 37831888971 3470261632 3472150603
+113493000000 113498667110 37831000000 37832889036 3471261632 3473150668
+113496000000 113501667300 37832000000 37833889100 3472261632 3474150732
+113499000000 113504667445 37833000000 37834889148 3473261632 3475150780
+113502000000 113507667617 37834000000 37835889205 3474261632 3476150837
+113505000000 113510667750 37835000000 37836889250 3475261632 3477150882
+113508000000 113513667821 37836000000 37837889273 3476261632 3478150905
+113511000000 113516668047 37837000000 37838889349 3477261632 3479150981
+113514000000 113519668207 37838000000 37839889402 3478261632 3480151034
+113517000000 113522668339 37839000000 37840889446 3479261632 3481151078
+113520000000 113525668447 37840000000 37841889482 3480261632 3482151114
+113523000000 113528668658 37841000000 37842889552 3481261632 3483151184
+113526000000 113531668824 37842000000 37843889608 3482261632 3484151240
+113529000000 113534668935 37843000000 37844889645 3483261632 3485151277
+113532000000 113537669095 37844000000 37845889698 3484261632 3486151330
+113535000000 113540669207 37845000000 37846889735 3485261632 3487151367
+113538000000 113543669405 37846000000 37847889801 3486261632 3488151433
+113541000000 113546669495 37847000000 37848889831 3487261632 3489151463
+113544000000 113549669720 37848000000 37849889906 3488261632 3490151538
+113547000000 113552669852 37849000000 37850889950 3489261632 3491151582
+113550000000 113555669991 37850000000 37851889997 3490261632 3492151629
+113553000000 113558670042 37851000000 37852890014 3491261632 3493151646
+113556000000 113561670253 37852000000 37853890084 3492261632 3494151716
+113559000000 113564670462 37853000000 37854890154 3493261632 3495151786
+113562000000 113567670590 37854000000 37855890196 3494261632 3496151828
+113565000000 113570670733 37855000000 37856890244 3495261632 3497151876
+113568000000 113573670904 37856000000 37857890301 3496261632 3498151933
+113571000000 113576671001 37857000000 37858890333 3497261632 3499151965
+113574000000 113579671214 37858000000 37859890404 3498261632 3500152036
+113577000000 113582671344 37859000000 37860890448 3499261632 3501152080
+113580000000 113585671494 37860000000 37861890498 3500261632 3502152130
+113583000000 113588671654 37861000000 37862890551 3501261632 3503152183
+113586000000 113591671750 37862000000 37863890583 3502261632 3504152215
+113589000000 113594671938 37863000000 37864890646 3503261632 3505152278
+113592000000 113597672106 37864000000 37865890702 3504261632 3506152334
+113595000000 113600672242 37865000000 37866890747 3505261632 3507152379
+113598000000 113603672417 37866000000 37867890805 3506261632 3508152437
+113601000000 113606672539 37867000000 37868890846 3507261632 3509152478
+113604000000 113609672689 37868000000 37869890896 3508261632 3510152528
+113607000000 113612672837 37869000000 37870890945 3509261632 3511152577
+113610000000 113615673043 37870000000 37871891014 3510261632 3512152646
+113613000000 113618673157 37871000000 37872891052 3511261632 3513152684
+113616000000 113621673289 37872000000 37873891096 3512261632 3514152728
+113619000000 113624673463 37873000000 37874891154 3513261632 3515152786
+113622000000 113627673582 37874000000 37875891194 3514261632 3516152826
+113625000000 113630673706 37875000000 37876891235 3515261632 3517152867
+113628000000 113633673925 37876000000 37877891308 3516261632 3518152940
+113631000000 113636674061 37877000000 37878891353 3517261632 3519152985
+113634000000 113639674212 37878000000 37879891404 3518261632 3520153036
+113637000000 113642674372 37879000000 37880891457 3519261632 3521153089
+113640000000 113645674493 37880000000 37881891497 3520261632 3522153129
+113643000000 113648674574 37881000000 37882891524 3521261632 3523153156
+113646000000 113651674782 37882000000 37883891594 3522261632 3524153226
+113649000000 113654674937 37883000000 37884891645 3523261632 3525153277
+113652000000 113657675096 37884000000 37885891698 3524261632 3526153330
+113655000000 113660675248 37885000000 37886891749 3525261632 3527153381
+113658000000 113663675370 37886000000 37887891790 3526261632 3528153422
+113661000000 113666675548 37887000000 37888891849 3527261632 3529153481
+113664000000 113669675697 37888000000 37889891899 3528261632 3530153531
+113667000000 113672675825 37889000000 37890891941 3529261632 3531153573
+113670000000 113675675994 37890000000 37891891998 3530261632 3532153630
+113673000000 113678676114 37891000000 37892892038 3531261632 3533153670
+113676000000 113681676041 37892000000 37893892013 3532261632 3534153645
+113679000000 113684676364 37893000000 37894892121 3533261632 3535153753
+113682000000 113687676617 37894000000 37895892205 3534261632 3536153837
+113685000000 113690676727 37895000000 37896892242 3535261632 3537153874
+113688000000 113693676906 37896000000 37897892302 3536261632 3538153934
+113691000000 113696676954 37897000000 37898892318 3537261632 3539153950
+113694000000 113699677208 37898000000 37899892402 3538261632 3540154034
+113697000000 113702677327 37899000000 37900892442 3539261632 3541154074
+113700000000 113705677498 37900000000 37901892499 3540261632 3542154131
+113703000000 113708677645 37901000000 37902892548 3541261632 3543154180
+113706000000 113711677798 37902000000 37903892599 3542261632 3544154231
+113709000000 113714677944 37903000000 37904892648 3543261632 3545154280
+113712000000 113717678088 37904000000 37905892696 3544261632 3546154328
+113715000000 113720678251 37905000000 37906892750 3545261632 3547154382
+113718000000 113723678403 37906000000 37907892801 3546261632 3548154433
+113721000000 113726678557 37907000000 37908892852 3547261632 3549154484
+113724000000 113729678677 37908000000 37909892892 3548261632 3550154524
+113727000000 113732678886 37909000000 37910892962 3549261632 3551154594
+113730000000 113735679016 37910000000 37911893005 3550261632 3552154637
+113733000000 113738679130 37911000000 37912893043 3551261632 3553154675
+113736000000 113741679291 37912000000 37913893097 3552261632 3554154729
+113739000000 113744679426 37913000000 37914893142 3553261632 3555154774
+113742000000 113747679569 37914000000 37915893189 3554261632 3556154821
+113745000000 113750679669 37915000000 37916893223 3555261632 3557154855
+113748000000 113753679903 37916000000 37917893301 3556261632 3558154933
+113751000000 113756679976 37917000000 37918893325 3557261632 3559154957
+113754000000 113759680097 37918000000 37919893365 3558261632 3560154997
+113757000000 113762680286 37919000000 37920893428 3559261632 3561155060
+113760000000 113765680440 37920000000 37921893480 3560261632 3562155112
+113763000000 113768680619 37921000000 37922893539 3561261632 3563155171
+113766000000 113771680765 37922000000 37923893588 3562261632 3564155220
+113769000000 113774680892 37923000000 37924893630 3563261632 3565155262
+113772000000 113777681066 37924000000 37925893688 3564261632 3566155320
+113775000000 113780681130 37925000000 37926893710 3565261632 3567155342
+113778000000 113783681337 37926000000 37927893779 3566261632 3568155411
+113781000000 113786681518 37927000000 37928893839 3567261632 3569155471
+113784000000 113789681667 37928000000 37929893889 3568261632 3570155521
+113787000000 113792681724 37929000000 37930893908 3569261632 3571155540
+113790000000 113795681920 37930000000 37931893973 3570261632 3572155605
+113793000000 113798682110 37931000000 37932894036 3571261632 3573155668
+113796000000 113801682255 37932000000 37933894085 3572261632 3574155717
+113799000000 113804682427 37933000000 37934894142 3573261632 3575155774
+113802000000 113807682560 37934000000 37935894186 3574261632 3576155818
+113805000000 113810682631 37935000000 37936894210 3575261632 3577155842
+113808000000 113813682857 37936000000 37937894285 3576261632 3578155917
+113811000000 113816683017 37937000000 37938894339 3577261632 3579155971
+113814000000 113819683149 37938000000 37939894383 3578261632 3580156015
+113817000000 113822683257 37939000000 37940894419 3579261632 3581156051
+113820000000 113825683468 37940000000 37941894489 3580261632 3582156121
+113823000000 113828683634 37941000000 37942894544 3581261632 3583156176
+113826000000 113831683745 37942000000 37943894581 3582261632 3584156213
+113829000000 113834683905 37943000000 37944894635 3583261632 3585156267
+113832000000 113837684017 37944000000 37945894672 3584261632 3586156304
+113835000000 113840684215 37945000000 37946894738 3585261632 3587156370
+113838000000 113843684305 37946000000 37947894768 3586261632 3588156400
+113841000000 113846684530 37947000000 37948894843 3587261632 3589156475
+113844000000 113849684662 37948000000 37949894887 3588261632 3590156519
+113847000000 113852684801 37949000000 37950894933 3589261632 3591156565
+113850000000 113855684852 37950000000 37951894950 3590261632 3592156582
+113853000000 113858685063 37951000000 37952895021 3591261632 3593156653
+113856000000 113861685272 37952000000 37953895090 3592261632 3594156722
+113859000000 113864685400 37953000000 37954895133 3593261632 3595156765
+113862000000 113867685543 37954000000 37955895181 3594261632 3596156813
+113865000000 113870685714 37955000000 37956895238 3595261632 3597156870
+113868000000 113873685811 37956000000 37957895270 3596261632 3598156902
+113871000000 113876686024 37957000000 37958895341 3597261632 3599156973
+113874000000 113879686154 37958000000 37959895384 3598261632 3600157016
+113877000000 113882686304 37959000000 37960895434 3599261632 3601157066
+113880000000 113885686464 37960000000 37961895488 3600261632 3602157120
+113883000000 113888686560 37961000000 37962895520 3601261632 3603157152
+113886000000 113891686748 37962000000 37963895582 3602261632 3604157214
+113889000000 113894686916 37963000000 37964895638 3603261632 3605157270
+113892000000 113897687052 37964000000 37965895684 3604261632 3606157316
+113895000000 113900687227 37965000000 37966895742 3605261632 3607157374
+113898000000 113903687349 37966000000 37967895783 3606261632 3608157415
+113901000000 113906687499 37967000000 37968895833 3607261632 3609157465
+113904000000 113909687647 37968000000 37969895882 3608261632 3610157514
+113907000000 113912687853 37969000000 37970895951 3609261632 3611157583
+113910000000 113915687967 37970000000 37971895989 3610261632 3612157621
+113913000000 113918688099 37971000000 37972896033 3611261632 3613157665
+113916000000 113921688273 37972000000 37973896091 3612261632 3614157723
+113919000000 113924688392 37973000000 37974896130 3613261632 3615157762
+113922000000 113927688516 37974000000 37975896172 3614261632 3616157804
+113925000000 113930688735 37975000000 37976896245 3615261632 3617157877
+113928000000 113933688871 37976000000 37977896290 3616261632 3618157922
+113931000000 113936689022 37977000000 37978896340 3617261632 3619157972
+113934000000 113939689182 37978000000 37979896394 3618261632 3620158026
+113937000000 113942689303 37979000000 37980896434 3619261632 3621158066
+113940000000 113945689384 37980000000 37981896461 3620261632 3622158093
+113943000000 113948689592 37981000000 37982896530 3621261632 3623158162
+113946000000 113951689747 37982000000 37983896582 3622261632 3624158214
+113949000000 113954689906 37983000000 37984896635 3623261632 3625158267
+113952000000 113957690058 37984000000 37985896686 3624261632 3626158318
+113955000000 113960690180 37985000000 37986896726 3625261632 3627158358
+113958000000 113963690358 37986000000 37987896786 3626261632 3628158418
+113961000000 113966690507 37987000000 37988896835 3627261632 3629158467
+113964000000 113969690635 37988000000 37989896878 3628261632 3630158510
+113967000000 113972690804 37989000000 37990896934 3629261632 3631158566
+113970000000 113975690924 37990000000 37991896974 3630261632 3632158606
+113973000000 113978690851 37991000000 37992896950 3631261632 3633158582
+113976000000 113981691174 37992000000 37993897058 3632261632 3634158690
+113979000000 113984691427 37993000000 37994897142 3633261632 3635158774
+113982000000 113987691537 37994000000 37995897179 3634261632 3636158811
+113985000000 113990691716 37995000000 37996897238 3635261632 3637158870
+113988000000 113993691764 37996000000 37997897254 3636261632 3638158886
+113991000000 113996692018 37997000000 37998897339 3637261632 3639158971
+113994000000 113999692137 37998000000 37999897379 3638261632 3640159011
+113997000000 114002692308 37999000000 38000897436 3639261632 3641159068
+114000000000 114005692455 38000000000 38001897485 3640261632 3642159117
+114003000000 114008692608 38001000000 38002897536 3641261632 3643159168
+114006000000 114011692754 38002000000 38003897584 3642261632 3644159216
+114009000000 114014692898 38003000000 38004897632 3643261632 3645159264
+114012000000 114017693061 38004000000 38005897687 3644261632 3646159319
+114015000000 114020693213 38005000000 38006897737 3645261632 3647159369
+114018000000 114023693367 38006000000 38007897789 3646261632 3648159421
+114021000000 114026693487 38007000000 38008897829 3647261632 3649159461
+114024000000 114029693696 38008000000 38009897898 3648261632 3650159530
+114027000000 114032693826 38009000000 38010897942 3649261632 3651159574
+114030000000 114035693940 38010000000 38011897980 3650261632 3652159612
+114033000000 114038694101 38011000000 38012898033 3651261632 3653159665
+114036000000 114041694236 38012000000 38013898078 3652261632 3654159710
+114039000000 114044694379 38013000000 38014898126 3653261632 3655159758
+114042000000 114047694479 38014000000 38015898159 3654261632 3656159791
+114045000000 114050694713 38015000000 38016898237 3655261632 3657159869
+114048000000 114053694786 38016000000 38017898262 3656261632 3658159894
+114051000000 114056694907 38017000000 38018898302 3657261632 3659159934
+114054000000 114059695096 38018000000 38019898365 3658261632 3660159997
+114057000000 114062695250 38019000000 38020898416 3659261632 3661160048
+114060000000 114065695429 38020000000 38021898476 3660261632 3662160108
+114063000000 114068695575 38021000000 38022898525 3661261632 3663160157
+114066000000 114071695702 38022000000 38023898567 3662261632 3664160199
+114069000000 114074695876 38023000000 38024898625 3663261632 3665160257
+114072000000 114077695940 38024000000 38025898646 3664261632 3666160278
+114075000000 114080696147 38025000000 38026898715 3665261632 3667160347
+114078000000 114083696328 38026000000 38027898776 3666261632 3668160408
+114081000000 114086696477 38027000000 38028898825 3667261632 3669160457
+114084000000 114089696534 38028000000 38029898844 3668261632 3670160476
+114087000000 114092696730 38029000000 38030898910 3669261632 3671160542
+114090000000 114095696920 38030000000 38031898973 3670261632 3672160605
+114093000000 114098697065 38031000000 38032899021 3671261632 3673160653
+114096000000 114101697237 38032000000 38033899079 3672261632 3674160711
+114099000000 114104697370 38033000000 38034899123 3673261632 3675160755
+114102000000 114107697441 38034000000 38035899147 3674261632 3676160779
+114105000000 114110697667 38035000000 38036899222 3675261632 3677160854
+114108000000 114113697827 38036000000 38037899275 3676261632 3678160907
+114111000000 114116697959 38037000000 38038899319 3677261632 3679160951
+114114000000 114119698067 38038000000 38039899355 3678261632 3680160987
+114117000000 114122698278 38039000000 38040899426 3679261632 3681161058
+114120000000 114125698444 38040000000 38041899481 3680261632 3682161113
+114123000000 114128698555 38041000000 38042899518 3681261632 3683161150
+114126000000 114131698715 38042000000 38043899571 3682261632 3684161203
+114129000000 114134698827 38043000000 38044899609 3683261632 3685161241
+114132000000 114137699025 38044000000 38045899675 3684261632 3686161307
+114135000000 114140699115 38045000000 38046899705 3685261632 3687161337
+114138000000 114143699340 38046000000 38047899780 3686261632 3688161412
+114141000000 114146699472 38047000000 38048899824 3687261632 3689161456
+114144000000 114149699611 38048000000 38049899870 3688261632 3690161502
+114147000000 114152699662 38049000000 38050899887 3689261632 3691161519
+114150000000 114155699873 38050000000 38051899957 3690261632 3692161589
+114153000000 114158700082 38051000000 38052900027 3691261632 3693161659
+114156000000 114161700210 38052000000 38053900070 3692261632 3694161702
+114159000000 114164700353 38053000000 38054900117 3693261632 3695161749
+114162000000 114167700524 38054000000 38055900174 3694261632 3696161806
+114165000000 114170700621 38055000000 38056900207 3695261632 3697161839
+114168000000 114173700834 38056000000 38057900278 3696261632 3698161910
+114171000000 114176700964 38057000000 38058900321 3697261632 3699161953
+114174000000 114179701114 38058000000 38059900371 3698261632 3700162003
+114177000000 114182701274 38059000000 38060900424 3699261632 3701162056
+114180000000 114185701370 38060000000 38061900456 3700261632 3702162088
+114183000000 114188701558 38061000000 38062900519 3701261632 3703162151
+114186000000 114191701726 38062000000 38063900575 3702261632 3704162207
+114189000000 114194701862 38063000000 38064900620 3703261632 3705162252
+114192000000 114197702037 38064000000 38065900679 3704261632 3706162311
+114195000000 114200702159 38065000000 38066900719 3705261632 3707162351
+114198000000 114203702309 38066000000 38067900769 3706261632 3708162401
+114201000000 114206702457 38067000000 38068900819 3707261632 3709162451
+114204000000 114209702663 38068000000 38069900887 3708261632 3710162519
+114207000000 114212702777 38069000000 38070900925 3709261632 3711162557
+114210000000 114215702909 38070000000 38071900969 3710261632 3712162601
+114213000000 114218703083 38071000000 38072901027 3711261632 3713162659
+114216000000 114221703202 38072000000 38073901067 3712261632 3714162699
+114219000000 114224703326 38073000000 38074901108 3713261632 3715162740
+114222000000 114227703545 38074000000 38075901181 3714261632 3716162813
+114225000000 114230703681 38075000000 38076901227 3715261632 3717162859
+114228000000 114233703832 38076000000 38077901277 3716261632 3718162909
+114231000000 114236703992 38077000000 38078901330 3717261632 3719162962
+114234000000 114239704113 38078000000 38079901371 3718261632 3720163003
+114237000000 114242704194 38079000000 38080901398 3719261632 3721163030
+114240000000 114245704402 38080000000 38081901467 3720261632 3722163099
+114243000000 114248704557 38081000000 38082901519 3721261632 3723163151
+114246000000 114251704716 38082000000 38083901572 3722261632 3724163204
+114249000000 114254704868 38083000000 38084901622 3723261632 3725163254
+114252000000 114257704990 38084000000 38085901663 3724261632 3726163295
+114255000000 114260705168 38085000000 38086901722 3725261632 3727163354
+114258000000 114263705317 38086000000 38087901772 3726261632 3728163404
+114261000000 114266705445 38087000000 38088901815 3727261632 3729163447
+114264000000 114269705614 38088000000 38089901871 3728261632 3730163503
+114267000000 114272705734 38089000000 38090901911 3729261632 3731163543
+114270000000 114275705661 38090000000 38091901887 3730261632 3732163519
+114273000000 114278705984 38091000000 38092901994 3731261632 3733163626
+114276000000 114281706237 38092000000 38093902079 3732261632 3734163711
+114279000000 114284706347 38093000000 38094902115 3733261632 3735163747
+114282000000 114287706526 38094000000 38095902175 3734261632 3736163807
+114285000000 114290706574 38095000000 38096902191 3735261632 3737163823
+114288000000 114293706828 38096000000 38097902276 3736261632 3738163908
+114291000000 114296706947 38097000000 38098902315 3737261632 3739163947
+114294000000 114299707118 38098000000 38099902372 3738261632 3740164004
+114297000000 114302707265 38099000000 38100902421 3739261632 3741164053
+114300000000 114305707418 38100000000 38101902472 3740261632 3742164104
+114303000000 114308707564 38101000000 38102902521 3741261632 3743164153
+114306000000 114311707708 38102000000 38103902569 3742261632 3744164201
+114309000000 114314707871 38103000000 38104902623 3743261632 3745164255
+114312000000 114317708023 38104000000 38105902674 3744261632 3746164306
+114315000000 114320708177 38105000000 38106902725 3745261632 3747164357
+114318000000 114323708297 38106000000 38107902765 3746261632 3748164397
+114321000000 114326708506 38107000000 38108902835 3747261632 3749164467
+114324000000 114329708636 38108000000 38109902878 3748261632 3750164510
+114327000000 114332708750 38109000000 38110902916 3749261632 3751164548
+114330000000 114335708911 38110000000 38111902970 3750261632 3752164602
+114333000000 114338709046 38111000000 38112903015 3751261632 3753164647
+114336000000 114341709189 38112000000 38113903063 3752261632 3754164695
+114339000000 114344709289 38113000000 38114903096 3753261632 3755164728
+114342000000 114347709523 38114000000 38115903174 3754261632 3756164806
+114345000000 114350709596 38115000000 38116903198 3755261632 3757164830
+114348000000 114353709717 38116000000 38117903239 3756261632 3758164871
+114351000000 114356709906 38117000000 38118903302 3757261632 3759164934
+114354000000 114359710060 38118000000 38119903353 3758261632 3760164985
+114357000000 114362710239 38119000000 38120903413 3759261632 3761165045
+114360000000 114365710385 38120000000 38121903461 3760261632 3762165093
+114363000000 114368710512 38121000000 38122903504 3761261632 3763165136
+114366000000 114371710686 38122000000 38123903562 3762261632 3764165194
+114369000000 114374710750 38123000000 38124903583 3763261632 3765165215
+114372000000 114377710957 38124000000 38125903652 3764261632 3766165284
+114375000000 114380711138 38125000000 38126903712 3765261632 3767165344
+114378000000 114383711287 38126000000 38127903762 3766261632 3768165394
+114381000000 114386711344 38127000000 38128903781 3767261632 3769165413
+114384000000 114389711540 38128000000 38129903846 3768261632 3770165478
+114387000000 114392711730 38129000000 38130903910 3769261632 3771165542
+114390000000 114395711875 38130000000 38131903958 3770261632 3772165590
+114393000000 114398712047 38131000000 38132904015 3771261632 3773165647
+114396000000 114401712180 38132000000 38133904060 3772261632 3774165692
+114399000000 114404712251 38133000000 38134904083 3773261632 3775165715
+114402000000 114407712477 38134000000 38135904159 3774261632 3776165791
+114405000000 114410712637 38135000000 38136904212 3775261632 3777165844
+114408000000 114413712769 38136000000 38137904256 3776261632 3778165888
+114411000000 114416712877 38137000000 38138904292 3777261632 3779165924
+114414000000 114419713088 38138000000 38139904362 3778261632 3780165994
+114417000000 114422713254 38139000000 38140904418 3779261632 3781166050
+114420000000 114425713365 38140000000 38141904455 3780261632 3782166087
+114423000000 114428713525 38141000000 38142904508 3781261632 3783166140
+114426000000 114431713637 38142000000 38143904545 3782261632 3784166177
+114429000000 114434713835 38143000000 38144904611 3783261632 3785166243
+114432000000 114437713925 38144000000 38145904641 3784261632 3786166273
+114435000000 114440714150 38145000000 38146904716 3785261632 3787166348
+114438000000 114443714282 38146000000 38147904760 3786261632 3788166392
+114441000000 114446714421 38147000000 38148904807 3787261632 3789166439
+114444000000 114449714472 38148000000 38149904824 3788261632 3790166456
+114447000000 114452714683 38149000000 38150904894 3789261632 3791166526
+114450000000 114455714892 38150000000 38151904964 3790261632 3792166596
+114453000000 114458715020 38151000000 38152905006 3791261632 3793166638
+114456000000 114461715163 38152000000 38153905054 3792261632 3794166686
+114459000000 114464715334 38153000000 38154905111 3793261632 3795166743
+114462000000 114467715431 38154000000 38155905143 3794261632 3796166775
+114465000000 114470715644 38155000000 38156905214 3795261632 3797166846
+114468000000 114473715774 38156000000 38157905258 3796261632 3798166890
+114471000000 114476715924 38157000000 38158905308 3797261632 3799166940
+114474000000 114479716084 38158000000 38159905361 3798261632 3800166993
+114477000000 114482716180 38159000000 38160905393 3799261632 3801167025
+114480000000 114485716368 38160000000 38161905456 3800261632 3802167088
+114483000000 114488716536 38161000000 38162905512 3801261632 3803167144
+114486000000 114491716672 38162000000 38163905557 3802261632 3804167189
+114489000000 114494716847 38163000000 38164905615 3803261632 3805167247
+114492000000 114497716969 38164000000 38165905656 3804261632 3806167288
+114495000000 114500717119 38165000000 38166905706 3805261632 3807167338
+114498000000 114503717267 38166000000 38167905755 3806261632 3808167387
+114501000000 114506717473 38167000000 38168905824 3807261632 3809167456
+114504000000 114509717587 38168000000 38169905862 3808261632 3810167494
+114507000000 114512717719 38169000000 38170905906 3809261632 3811167538
+114510000000 114515717893 38170000000 38171905964 3810261632 3812167596
+114513000000 114518718012 38171000000 38172906004 3811261632 3813167636
+114516000000 114521718136 38172000000 38173906045 3812261632 3814167677
+114519000000 114524718355 38173000000 38174906118 3813261632 3815167750
+114522000000 114527718491 38174000000 38175906163 3814261632 3816167795
+114525000000 114530718642 38175000000 38176906214 3815261632 3817167846
+114528000000 114533718802 38176000000 38177906267 3816261632 3818167899
+114531000000 114536718923 38177000000 38178906307 3817261632 3819167939
+114534000000 114539719004 38178000000 38179906334 3818261632 3820167966
+114537000000 114542719212 38179000000 38180906404 3819261632 3821168036
+114540000000 114545719367 38180000000 38181906455 3820261632 3822168087
+114543000000 114548719526 38181000000 38182906508 3821261632 3823168140
+114546000000 114551719678 38182000000 38183906559 3822261632 3824168191
+114549000000 114554719800 38183000000 38184906600 3823261632 3825168232
+114552000000 114557719978 38184000000 38185906659 3824261632 3826168291
+114555000000 114560720127 38185000000 38186906709 3825261632 3827168341
+114558000000 114563720255 38186000000 38187906751 3826261632 3828168383
+114561000000 114566720424 38187000000 38188906808 3827261632 3829168440
+114564000000 114569720544 38188000000 38189906848 3828261632 3830168480
+114567000000 114572720471 38189000000 38190906823 3829261632 3831168455
+114570000000 114575720794 38190000000 38191906931 3830261632 3832168563
+114573000000 114578721047 38191000000 38192907015 3831261632 3833168647
+114576000000 114581721157 38192000000 38193907052 3832261632 3834168684
+114579000000 114584721336 38193000000 38194907112 3833261632 3835168744
+114582000000 114587721384 38194000000 38195907128 3834261632 3836168760
+114585000000 114590721638 38195000000 38196907212 3835261632 3837168844
+114588000000 114593721757 38196000000 38197907252 3836261632 3838168884
+114591000000 114596721928 38197000000 38198907309 3837261632 3839168941
+114594000000 114599722075 38198000000 38199907358 3838261632 3840168990
+114597000000 114602722228 38199000000 38200907409 3839261632 3841169041
+114600000000 114605722374 38200000000 38201907458 3840261632 3842169090
+114603000000 114608722518 38201000000 38202907506 3841261632 3843169138
+114606000000 114611722681 38202000000 38203907560 3842261632 3844169192
+114609000000 114614722833 38203000000 38204907611 3843261632 3845169243
+114612000000 114617722987 38204000000 38205907662 3844261632 3846169294
+114615000000 114620723107 38205000000 38206907702 3845261632 3847169334
+114618000000 114623723316 38206000000 38207907772 3846261632 3848169404
+114621000000 114626723446 38207000000 38208907815 3847261632 3849169447
+114624000000 114629723560 38208000000 38209907853 3848261632 3850169485
+114627000000 114632723721 38209000000 38210907907 3849261632 3851169539
+114630000000 114635723856 38210000000 38211907952 3850261632 3852169584
+114633000000 114638723999 38211000000 38212907999 3851261632 3853169631
+114636000000 114641724099 38212000000 38213908033 3852261632 3854169665
+114639000000 114644724333 38213000000 38214908111 3853261632 3855169743
+114642000000 114647724406 38214000000 38215908135 3854261632 3856169767
+114645000000 114650724527 38215000000 38216908175 3855261632 3857169807
+114648000000 114653724716 38216000000 38217908238 3856261632 3858169870
+114651000000 114656724870 38217000000 38218908290 3857261632 3859169922
+114654000000 114659725049 38218000000 38219908349 3858261632 3860169981
+114657000000 114662725195 38219000000 38220908398 3859261632 3861170030
+114660000000 114665725322 38220000000 38221908440 3860261632 3862170072
+114663000000 114668725496 38221000000 38222908498 3861261632 3863170130
+114666000000 114671725560 38222000000 38223908520 3862261632 3864170152
+114669000000 114674725767 38223000000 38224908589 3863261632 3865170221
+114672000000 114677725948 38224000000 38225908649 3864261632 3866170281
+114675000000 114680726097 38225000000 38226908699 3865261632 3867170331
+114678000000 114683726154 38226000000 38227908718 3866261632 3868170350
+114681000000 114686726350 38227000000 38228908783 3867261632 3869170415
+114684000000 114689726540 38228000000 38229908846 3868261632 3870170478
+114687000000 114692726685 38229000000 38230908895 3869261632 3871170527
+114690000000 114695726857 38230000000 38231908952 3870261632 3872170584
+114693000000 114698726990 38231000000 38232908996 3871261632 3873170628
+114696000000 114701727061 38232000000 38233909020 3872261632 3874170652
+114699000000 114704727287 38233000000 38234909095 3873261632 3875170727
+114702000000 114707727447 38234000000 38235909149 3874261632 3876170781
+114705000000 114710727579 38235000000 38236909193 3875261632 3877170825
+114708000000 114713727687 38236000000 38237909229 3876261632 3878170861
+114711000000 114716727898 38237000000 38238909299 3877261632 3879170931
+114714000000 114719728064 38238000000 38239909354 3878261632 3880170986
+114717000000 114722728175 38239000000 38240909391 3879261632 3881171023
+114720000000 114725728335 38240000000 38241909445 3880261632 3882171077
+114723000000 114728728447 38241000000 38242909482 3881261632 3883171114
+114726000000 114731728645 38242000000 38243909548 3882261632 3884171180
+114729000000 114734728735 38243000000 38244909578 3883261632 3885171210
+114732000000 114737728960 38244000000 38245909653 3884261632 3886171285
+114735000000 114740729092 38245000000 38246909697 3885261632 3887171329
+114738000000 114743729231 38246000000 38247909743 3886261632 3888171375
+114741000000 114746729282 38247000000 38248909760 3887261632 3889171392
+114744000000 114749729493 38248000000 38249909831 3888261632 3890171463
+114747000000 114752729702 38249000000 38250909900 3889261632 3891171532
+114750000000 114755729830 38250000000 38251909943 3890261632 3892171575
+114753000000 114758729973 38251000000 38252909991 3891261632 3893171623
+114756000000 114761730144 38252000000 38253910048 3892261632 3894171680
+114759000000 114764730241 38253000000 38254910080 3893261632 3895171712
+114762000000 114767730454 38254000000 38255910151 3894261632 3896171783
+114765000000 114770730584 38255000000 38256910194 3895261632 3897171826
+114768000000 114773730734 38256000000 38257910244 3896261632 3898171876
+114771000000 114776730894 38257000000 38258910298 3897261632 3899171930
+114774000000 114779730990 38258000000 38259910330 3898261632 3900171962
+114777000000 114782731178 38259000000 38260910392 3899261632 3901172024
+114780000000 114785731346 38260000000 38261910448 3900261632 3902172080
+114783000000 114788731482 38261000000 38262910494 3901261632 3903172126
+114786000000 114791731657 38262000000 38263910552 3902261632 3904172184
+114789000000 114794731779 38263000000 38264910593 3903261632 3905172225
+114792000000 114797731929 38264000000 38265910643 3904261632 3906172275
+114795000000 114800732077 38265000000 38266910692 3905261632 3907172324
+114798000000 114803732283 38266000000 38267910761 3906261632 3908172393
+114801000000 114806732397 38267000000 38268910799 3907261632 3909172431
+114804000000 114809732529 38268000000 38269910843 3908261632 3910172475
+114807000000 114812732703 38269000000 38270910901 3909261632 3911172533
+114810000000 114815732822 38270000000 38271910940 3910261632 3912172572
+114813000000 114818732946 38271000000 38272910982 3911261632 3913172614
+114816000000 114821733165 38272000000 38273911055 3912261632 3914172687
+114819000000 114824733301 38273000000 38274911100 3913261632 3915172732
+114822000000 114827733452 38274000000 38275911150 3914261632 3916172782
+114825000000 114830733612 38275000000 38276911204 3915261632 3917172836
+114828000000 114833733733 38276000000 38277911244 3916261632 3918172876
+114831000000 114836733814 38277000000 38278911271 3917261632 3919172903
+114834000000 114839734022 38278000000 38279911340 3918261632 3920172972
+114837000000 114842734177 38279000000 38280911392 3919261632 3921173024
+114840000000 114845734336 38280000000 38281911445 3920261632 3922173077
+114843000000 114848734488 38281000000 38282911496 3921261632 3923173128
+114846000000 114851734610 38282000000 38283911536 3922261632 3924173168
+114849000000 114854734788 38283000000 38284911596 3923261632 3925173228
+114852000000 114857734937 38284000000 38285911645 3924261632 3926173277
+114855000000 114860735065 38285000000 38286911688 3925261632 3927173320
+114858000000 114863735234 38286000000 38287911744 3926261632 3928173376
+114861000000 114866735354 38287000000 38288911784 3927261632 3929173416
+114864000000 114869735281 38288000000 38289911760 3928261632 3930173392
+114867000000 114872735604 38289000000 38290911868 3929261632 3931173500
+114870000000 114875735857 38290000000 38291911952 3930261632 3932173584
+114873000000 114878735967 38291000000 38292911989 3931261632 3933173621
+114876000000 114881736146 38292000000 38293912048 3932261632 3934173680
+114879000000 114884736194 38293000000 38294912064 3933261632 3935173696
+114882000000 114887736448 38294000000 38295912149 3934261632 3936173781
+114885000000 114890736567 38295000000 38296912189 3935261632 3937173821
+114888000000 114893736738 38296000000 38297912246 3936261632 3938173878
+114891000000 114896736885 38297000000 38298912295 3937261632 3939173927
+114894000000 114899737038 38298000000 38299912346 3938261632 3940173978
+114897000000 114902737184 38299000000 38300912394 3939261632 3941174026
+114900000000 114905737328 38300000000 38301912442 3940261632 3942174074
+114903000000 114908737491 38301000000 38302912497 3941261632 3943174129
+114906000000 114911737643 38302000000 38303912547 3942261632 3944174179
+114909000000 114914737797 38303000000 38304912599 3943261632 3945174231
+114912000000 114917737917 38304000000 38305912639 3944261632 3946174271
+114915000000 114920738126 38305000000 38306912708 3945261632 3947174340
+114918000000 114923738256 38306000000 38307912752 3946261632 3948174384
+114921000000 114926738370 38307000000 38308912790 3947261632 3949174422
+114924000000 114929738531 38308000000 38309912843 3948261632 3950174475
+114927000000 114932738666 38309000000 38310912888 3949261632 3951174520
+114930000000 114935738809 38310000000 38311912936 3950261632 3952174568
+114933000000 114938738909 38311000000 38312912969 3951261632 3953174601
+114936000000 114941739143 38312000000 38313913047 3952261632 3954174679
+114939000000 114944739216 38313000000 38314913072 3953261632 3955174704
+114942000000 114947739337 38314000000 38315913112 3954261632 3956174744
+114945000000 114950739526 38315000000 38316913175 3955261632 3957174807
+114948000000 114953739680 38316000000 38317913226 3956261632 3958174858
+114951000000 114956739859 38317000000 38318913286 3957261632 3959174918
+114954000000 114959740005 38318000000 38319913335 3958261632 3960174967
+114957000000 114962740132 38319000000 38320913377 3959261632 3961175009
+114960000000 114965740306 38320000000 38321913435 3960261632 3962175067
+114963000000 114968740370 38321000000 38322913456 3961261632 3963175088
+114966000000 114971740577 38322000000 38323913525 3962261632 3964175157
+114969000000 114974740758 38323000000 38324913586 3963261632 3965175218
+114972000000 114977740907 38324000000 38325913635 3964261632 3966175267
+114975000000 114980740964 38325000000 38326913654 3965261632 3967175286
+114978000000 114983741160 38326000000 38327913720 3966261632 3968175352
+114981000000 114986741350 38327000000 38328913783 3967261632 3969175415
+114984000000 114989741495 38328000000 38329913831 3968261632 3970175463
+114987000000 114992741667 38329000000 38330913889 3969261632 3971175521
+114990000000 114995741800 38330000000 38331913933 3970261632 3972175565
+114993000000 114998741871 38331000000 38332913957 3971261632 3973175589
+114996000000 115001742097 38332000000 38333914032 3972261632 3974175664
+114999000000 115004742257 38333000000 38334914085 3973261632 3975175717
+115002000000 115007742389 38334000000 38335914129 3974261632 3976175761
+115005000000 115010742497 38335000000 38336914165 3975261632 3977175797
+115008000000 115013742708 38336000000 38337914236 3976261632 3978175868
+115011000000 115016742874 38337000000 38338914291 3977261632 3979175923
+115014000000 115019742985 38338000000 38339914328 3978261632 3980175960
+115017000000 115022743145 38339000000 38340914381 3979261632 3981176013
+115020000000 115025743257 38340000000 38341914419 3980261632 3982176051
+115023000000 115028743455 38341000000 38342914485 3981261632 3983176117
+115026000000 115031743545 38342000000 38343914515 3982261632 3984176147
+115029000000 115034743770 38343000000 38344914590 3983261632 3985176222
+115032000000 115037743902 38344000000 38345914634 3984261632 3986176266
+115035000000 115040744041 38345000000 38346914680 3985261632 3987176312
+115038000000 115043744092 38346000000 38347914697 3986261632 3988176329
+115041000000 115046744303 38347000000 38348914767 3987261632 3989176399
+115044000000 115049744512 38348000000 38349914837 3988261632 3990176469
+115047000000 115052744640 38349000000 38350914880 3989261632 3991176512
+115050000000 115055744783 38350000000 38351914927 3990261632 3992176559
+115053000000 115058744954 38351000000 38352914984 3991261632 3993176616
+115056000000 115061745051 38352000000 38353915017 3992261632 3994176649
+115059000000 115064745264 38353000000 38354915088 3993261632 3995176720
+115062000000 115067745394 38354000000 38355915131 3994261632 3996176763
+115065000000 115070745544 38355000000 38356915181 3995261632 3997176813
+115068000000 115073745704 38356000000 38357915234 3996261632 3998176866
+115071000000 115076745800 38357000000 38358915266 3997261632 3999176898
+115074000000 115079745988 38358000000 38359915329 3998261632 4000176961
+115077000000 115082746156 38359000000 38360915385 3999261632 4001177017
+115080000000 115085746292 38360000000 38361915430 4000261632 4002177062
+115083000000 115088746467 38361000000 38362915489 4001261632 4003177121
+115086000000 115091746589 38362000000 38363915529 4002261632 4004177161
+115089000000 115094746739 38363000000 38364915579 4003261632 4005177211
+115092000000 115097746887 38364000000 38365915629 4004261632 4006177261
+115095000000 115100747093 38365000000 38366915697 4005261632 4007177329
+115098000000 115103747207 38366000000 38367915735 4006261632 4008177367
+115101000000 115106747339 38367000000 38368915779 4007261632 4009177411
+115104000000 115109747513 38368000000 38369915837 4008261632 4010177469
+115107000000 115112747632 38369000000 38370915877 4009261632 4011177509
+115110000000 115115747756 38370000000 38371915918 4010261632 4012177550
+115113000000 115118747975 38371000000 38372915991 4011261632 4013177623
+115116000000 115121748111 38372000000 38373916037 4012261632 4014177669
+115119000000 115124748262 38373000000 38374916087 4013261632 4015177719
+115122000000 115127748422 38374000000 38375916140 4014261632 4016177772
+115125000000 115130748543 38375000000 38376916181 4015261632 4017177813
+115128000000 115133748624 38376000000 38377916208 4016261632 4018177840
+115131000000 115136748832 38377000000 38378916277 4017261632 4019177909
+115134000000 115139748987 38378000000 38379916329 4018261632 4020177961
+115137000000 115142749146 38379000000 38380916382 4019261632 4021178014
+115140000000 115145749298 38380000000 38381916432 4020261632 4022178064
+115143000000 115148749420 38381000000 38382916473 4021261632 4023178105
+115146000000 115151749598 38382000000 38383916532 4022261632 4024178164
+115149000000 115154749747 38383000000 38384916582 4023261632 4025178214
+115152000000 115157749875 38384000000 38385916625 4024261632 4026178257
+115155000000 115160750044 38385000000 38386916681 4025261632 4027178313
+115158000000 115163750164 38386000000 38387916721 4026261632 4028178353
+115161000000 115166750091 38387000000 38388916697 4027261632 4029178329
+115164000000 115169750414 38388000000 38389916804 4028261632 4030178436
+115167000000 115172750667 38389000000 38390916889 4029261632 4031178521
+115170000000 115175750777 38390000000 38391916925 4030261632 4032178557
+115173000000 115178750956 38391000000 38392916985 4031261632 4033178617
+115176000000 115181751004 38392000000 38393917001 4032261632 4034178633
+115179000000 115184751258 38393000000 38394917086 4033261632 4035178718
+115182000000 115187751377 38394000000 38395917125 4034261632 4036178757
+115185000000 115190751548 38395000000 38396917182 4035261632 4037178814
+115188000000 115193751695 38396000000 38397917231 4036261632 4038178863
+115191000000 115196751848 38397000000 38398917282 4037261632 4039178914
+115194000000 115199751994 38398000000 38399917331 4038261632 4040178963
+115197000000 115202752138 38399000000 38400917379 4039261632 4041179011
+115200000000 115205752301 38400000000 38401917433 4040261632 4042179065
+115203000000 115208752453 38401000000 38402917484 4041261632 4043179116
+115206000000 115211752607 38402000000 38403917535 4042261632 4044179167
+115209000000 115214752727 38403000000 38404917575 4043261632 4045179207
+115212000000 115217752936 38404000000 38405917645 4044261632 4046179277
+115215000000 115220753066 38405000000 38406917688 4045261632 4047179320
+115218000000 115223753180 38406000000 38407917726 4046261632 4048179358
+115221000000 115226753341 38407000000 38408917780 4047261632 4049179412
+115224000000 115229753476 38408000000 38409917825 4048261632 4050179457
+115227000000 115232753619 38409000000 38410917873 4049261632 4051179505
+115230000000 115235753719 38410000000 38411917906 4050261632 4052179538
+115233000000 115238753953 38411000000 38412917984 4051261632 4053179616
+115236000000 115241754026 38412000000 38413918008 4052261632 4054179640
+115239000000 115244754147 38413000000 38414918049 4053261632 4055179681
+115242000000 115247754336 38414000000 38415918112 4054261632 4056179744
+115245000000 115250754490 38415000000 38416918163 4055261632 4057179795
+115248000000 115253754669 38416000000 38417918223 4056261632 4058179855
+115251000000 115256754815 38417000000 38418918271 4057261632 4059179903
+115254000000 115259754942 38418000000 38419918314 4058261632 4060179946
+115257000000 115262755116 38419000000 38420918372 4059261632 4061180004
+115260000000 115265755180 38420000000 38421918393 4060261632 4062180025
+115263000000 115268755387 38421000000 38422918462 4061261632 4063180094
+115266000000 115271755568 38422000000 38423918522 4062261632 4064180154
+115269000000 115274755717 38423000000 38424918572 4063261632 4065180204
+115272000000 115277755774 38424000000 38425918591 4064261632 4066180223
+115275000000 115280755970 38425000000 38426918656 4065261632 4067180288
+115278000000 115283756160 38426000000 38427918720 4066261632 4068180352
+115281000000 115286756305 38427000000 38428918768 4067261632 4069180400
+115284000000 115289756477 38428000000 38429918825 4068261632 4070180457
+115287000000 115292756610 38429000000 38430918870 4069261632 4071180502
+115290000000 115295756681 38430000000 38431918893 4070261632 4072180525
+115293000000 115298756907 38431000000 38432918969 4071261632 4073180601
+115296000000 115301757067 38432000000 38433919022 4072261632 4074180654
+115299000000 115304757199 38433000000 38434919066 4073261632 4075180698
+115302000000 115307757307 38434000000 38435919102 4074261632 4076180734
+115305000000 115310757518 38435000000 38436919172 4075261632 4077180804
+115308000000 115313757684 38436000000 38437919228 4076261632 4078180860
+115311000000 115316757795 38437000000 38438919265 4077261632 4079180897
+115314000000 115319757955 38438000000 38439919318 4078261632 4080180950
+115317000000 115322758067 38439000000 38440919355 4079261632 4081180987
+115320000000 115325758265 38440000000 38441919421 4080261632 4082181053
+115323000000 115328758355 38441000000 38442919451 4081261632 4083181083
+115326000000 115331758580 38442000000 38443919526 4082261632 4084181158
+115329000000 115334758712 38443000000 38444919570 4083261632 4085181202
+115332000000 115337758851 38444000000 38445919617 4084261632 4086181249
+115335000000 115340758902 38445000000 38446919634 4085261632 4087181266
+115338000000 115343759113 38446000000 38447919704 4086261632 4088181336
+115341000000 115346759322 38447000000 38448919774 4087261632 4089181406
+115344000000 115349759450 38448000000 38449919816 4088261632 4090181448
+115347000000 115352759593 38449000000 38450919864 4089261632 4091181496
+115350000000 115355759764 38450000000 38451919921 4090261632 4092181553
+115353000000 115358759861 38451000000 38452919953 4091261632 4093181585
+115356000000 115361760074 38452000000 38453920024 4092261632 4094181656
+115359000000 115364760204 38453000000 38454920068 4093261632 4095181700
+115362000000 115367760354 38454000000 38455920118 4094261632 4096181750
+115365000000 115370760514 38455000000 38456920171 4095261632 4097181803
+115368000000 115373760610 38456000000 38457920203 4096261632 4098181835
+115371000000 115376760798 38457000000 38458920266 4097261632 4099181898
+115374000000 115379760966 38458000000 38459920322 4098261632 4100181954
+115377000000 115382761102 38459000000 38460920367 4099261632 4101181999
+115380000000 115385761277 38460000000 38461920425 4100261632 4102182057
+115383000000 115388761399 38461000000 38462920466 4101261632 4103182098
+115386000000 115391761549 38462000000 38463920516 4102261632 4104182148
+115389000000 115394761697 38463000000 38464920565 4103261632 4105182197
+115392000000 115397761903 38464000000 38465920634 4104261632 4106182266
+115395000000 115400762017 38465000000 38466920672 4105261632 4107182304
+115398000000 115403762149 38466000000 38467920716 4106261632 4108182348
+115401000000 115406762323 38467000000 38468920774 4107261632 4109182406
+115404000000 115409762442 38468000000 38469920814 4108261632 4110182446
+115407000000 115412762566 38469000000 38470920855 4109261632 4111182487
+115410000000 115415762785 38470000000 38471920928 4110261632 4112182560
+115413000000 115418762921 38471000000 38472920973 4111261632 4113182605
+115416000000 115421763072 38472000000 38473921024 4112261632 4114182656
+115419000000 115424763232 38473000000 38474921077 4113261632 4115182709
+115422000000 115427763353 38474000000 38475921117 4114261632 4116182749
+115425000000 115430763434 38475000000 38476921144 4115261632 4117182776
+115428000000 115433763642 38476000000 38477921214 4116261632 4118182846
+115431000000 115436763797 38477000000 38478921265 4117261632 4119182897
+115434000000 115439763956 38478000000 38479921318 4118261632 4120182950
+115437000000 115442764108 38479000000 38480921369 4119261632 4121183001
+115440000000 115445764230 38480000000 38481921410 4120261632 4122183042
+115443000000 115448764408 38481000000 38482921469 4121261632 4123183101
+115446000000 115451764557 38482000000 38483921519 4122261632 4124183151
+115449000000 115454764685 38483000000 38484921561 4123261632 4125183193
+115452000000 115457764854 38484000000 38485921618 4124261632 4126183250
+115455000000 115460764974 38485000000 38486921658 4125261632 4127183290
+115458000000 115463764901 38486000000 38487921633 4126261632 4128183265
+115461000000 115466765224 38487000000 38488921741 4127261632 4129183373
+115464000000 115469765477 38488000000 38489921825 4128261632 4130183457
+115467000000 115472765587 38489000000 38490921862 4129261632 4131183494
+115470000000 115475765766 38490000000 38491921922 4130261632 4132183554
+115473000000 115478765814 38491000000 38492921938 4131261632 4133183570
+115476000000 115481766068 38492000000 38493922022 4132261632 4134183654
+115479000000 115484766187 38493000000 38494922062 4133261632 4135183694
+115482000000 115487766358 38494000000 38495922119 4134261632 4136183751
+115485000000 115490766505 38495000000 38496922168 4135261632 4137183800
+115488000000 115493766658 38496000000 38497922219 4136261632 4138183851
+115491000000 115496766804 38497000000 38498922268 4137261632 4139183900
+115494000000 115499766948 38498000000 38499922316 4138261632 4140183948
+115497000000 115502767111 38499000000 38500922370 4139261632 4141184002
+115500000000 115505767263 38500000000 38501922421 4140261632 4142184053
+115503000000 115508767417 38501000000 38502922472 4141261632 4143184104
+115506000000 115511767537 38502000000 38503922512 4142261632 4144184144
+115509000000 115514767746 38503000000 38504922582 4143261632 4145184214
+115512000000 115517767876 38504000000 38505922625 4144261632 4146184257
+115515000000 115520767990 38505000000 38506922663 4145261632 4147184295
+115518000000 115523768151 38506000000 38507922717 4146261632 4148184349
+115521000000 115526768286 38507000000 38508922762 4147261632 4149184394
+115524000000 115529768429 38508000000 38509922809 4148261632 4150184441
+115527000000 115532768529 38509000000 38510922843 4149261632 4151184475
+115530000000 115535768763 38510000000 38511922921 4150261632 4152184553
+115533000000 115538768836 38511000000 38512922945 4151261632 4153184577
+115536000000 115541768957 38512000000 38513922985 4152261632 4154184617
+115539000000 115544769146 38513000000 38514923048 4153261632 4155184680
+115542000000 115547769300 38514000000 38515923100 4154261632 4156184732
+115545000000 115550769479 38515000000 38516923159 4155261632 4157184791
+115548000000 115553769625 38516000000 38517923208 4156261632 4158184840
+115551000000 115556769752 38517000000 38518923250 4157261632 4159184882
+115554000000 115559769926 38518000000 38519923308 4158261632 4160184940
+115557000000 115562769990 38519000000 38520923330 4159261632 4161184962
+115560000000 115565770197 38520000000 38521923399 4160261632 4162185031
+115563000000 115568770378 38521000000 38522923459 4161261632 4163185091
+115566000000 115571770527 38522000000 38523923509 4162261632 4164185141
+115569000000 115574770584 38523000000 38524923528 4163261632 4165185160
+115572000000 115577770780 38524000000 38525923593 4164261632 4166185225
+115575000000 115580770970 38525000000 38526923656 4165261632 4167185288
+115578000000 115583771115 38526000000 38527923705 4166261632 4168185337
+115581000000 115586771287 38527000000 38528923762 4167261632 4169185394
+115584000000 115589771420 38528000000 38529923806 4168261632 4170185438
+115587000000 115592771491 38529000000 38530923830 4169261632 4171185462
+115590000000 115595771717 38530000000 38531923905 4170261632 4172185537
+115593000000 115598771877 38531000000 38532923959 4171261632 4173185591
+115596000000 115601772009 38532000000 38533924003 4172261632 4174185635
+115599000000 115604772117 38533000000 38534924039 4173261632 4175185671
+115602000000 115607772328 38534000000 38535924109 4174261632 4176185741
+115605000000 115610772494 38535000000 38536924164 4175261632 4177185796
+115608000000 115613772605 38536000000 38537924201 4176261632 4178185833
+115611000000 115616772765 38537000000 38538924255 4177261632 4179185887
+115614000000 115619772877 38538000000 38539924292 4178261632 4180185924
+115617000000 115622773075 38539000000 38540924358 4179261632 4181185990
+115620000000 115625773165 38540000000 38541924388 4180261632 4182186020
+115623000000 115628773390 38541000000 38542924463 4181261632 4183186095
+115626000000 115631773522 38542000000 38543924507 4182261632 4184186139
+115629000000 115634773661 38543000000 38544924553 4183261632 4185186185
+115632000000 115637773712 38544000000 38545924570 4184261632 4186186202
+115635000000 115640773923 38545000000 38546924641 4185261632 4187186273
+115638000000 115643774132 38546000000 38547924710 4186261632 4188186342
+115641000000 115646774260 38547000000 38548924753 4187261632 4189186385
+115644000000 115649774403 38548000000 38549924801 4188261632 4190186433
+115647000000 115652774574 38549000000 38550924858 4189261632 4191186490
+115650000000 115655774671 38550000000 38551924890 4190261632 4192186522
+115653000000 115658774884 38551000000 38552924961 4191261632 4193186593
+115656000000 115661775014 38552000000 38553925004 4192261632 4194186636
+115659000000 115664775164 38553000000 38554925054 4193261632 4195186686
+115662000000 115667775324 38554000000 38555925108 4194261632 4196186740
+115665000000 115670775420 38555000000 38556925140 4195261632 4197186772
+115668000000 115673775608 38556000000 38557925202 4196261632 4198186834
+115671000000 115676775776 38557000000 38558925258 4197261632 4199186890
+115674000000 115679775912 38558000000 38559925304 4198261632 4200186936
+115677000000 115682776087 38559000000 38560925362 4199261632 4201186994
+115680000000 115685776209 38560000000 38561925403 4200261632 4202187035
+115683000000 115688776359 38561000000 38562925453 4201261632 4203187085
+115686000000 115691776507 38562000000 38563925502 4202261632 4204187134
+115689000000 115694776713 38563000000 38564925571 4203261632 4205187203
+115692000000 115697776827 38564000000 38565925609 4204261632 4206187241
+115695000000 115700776959 38565000000 38566925653 4205261632 4207187285
+115698000000 115703777133 38566000000 38567925711 4206261632 4208187343
+115701000000 115706777252 38567000000 38568925750 4207261632 4209187382
+115704000000 115709777376 38568000000 38569925792 4208261632 4210187424
+115707000000 115712777595 38569000000 38570925865 4209261632 4211187497
+115710000000 115715777731 38570000000 38571925910 4210261632 4212187542
+115713000000 115718777882 38571000000 38572925960 4211261632 4213187592
+115716000000 115721778042 38572000000 38573926014 4212261632 4214187646
+115719000000 115724778163 38573000000 38574926054 4213261632 4215187686
+115722000000 115727778244 38574000000 38575926081 4214261632 4216187713
+115725000000 115730778452 38575000000 38576926150 4215261632 4217187782
+115728000000 115733778607 38576000000 38577926202 4216261632 4218187834
+115731000000 115736778766 38577000000 38578926255 4217261632 4219187887
+115734000000 115739778918 38578000000 38579926306 4218261632 4220187938
+115737000000 115742779040 38579000000 38580926346 4219261632 4221187978
+115740000000 115745779218 38580000000 38581926406 4220261632 4222188038
+115743000000 115748779367 38581000000 38582926455 4221261632 4223188087
+115746000000 115751779495 38582000000 38583926498 4222261632 4224188130
+115749000000 115754779664 38583000000 38584926554 4223261632 4225188186
+115752000000 115757779784 38584000000 38585926594 4224261632 4226188226
+115755000000 115760779711 38585000000 38586926570 4225261632 4227188202
+115758000000 115763780034 38586000000 38587926678 4226261632 4228188310
+115761000000 115766780287 38587000000 38588926762 4227261632 4229188394
+115764000000 115769780397 38588000000 38589926799 4228261632 4230188431
+115767000000 115772780576 38589000000 38590926858 4229261632 4231188490
+115770000000 115775780624 38590000000 38591926874 4230261632 4232188506
+115773000000 115778780878 38591000000 38592926959 4231261632 4233188591
+115776000000 115781780997 38592000000 38593926999 4232261632 4234188631
+115779000000 115784781168 38593000000 38594927056 4233261632 4235188688
+115782000000 115787781315 38594000000 38595927105 4234261632 4236188737
+115785000000 115790781468 38595000000 38596927156 4235261632 4237188788
+115788000000 115793781614 38596000000 38597927204 4236261632 4238188836
+115791000000 115796781758 38597000000 38598927252 4237261632 4239188884
+115794000000 115799781921 38598000000 38599927307 4238261632 4240188939
+115797000000 115802782073 38599000000 38600927357 4239261632 4241188989
+115800000000 115805782227 38600000000 38601927409 4240261632 4242189041
+115803000000 115808782347 38601000000 38602927449 4241261632 4243189081
+115806000000 115811782556 38602000000 38603927518 4242261632 4244189150
+115809000000 115814782686 38603000000 38604927562 4243261632 4245189194
+115812000000 115817782800 38604000000 38605927600 4244261632 4246189232
+115815000000 115820782961 38605000000 38606927653 4245261632 4247189285
+115818000000 115823783096 38606000000 38607927698 4246261632 4248189330
+115821000000 115826783239 38607000000 38608927746 4247261632 4249189378
+115824000000 115829783339 38608000000 38609927779 4248261632 4250189411
+115827000000 115832783573 38609000000 38610927857 4249261632 4251189489
+115830000000 115835783646 38610000000 38611927882 4250261632 4252189514
+115833000000 115838783767 38611000000 38612927922 4251261632 4253189554
+115836000000 115841783956 38612000000 38613927985 4252261632 4254189617
+115839000000 115844784110 38613000000 38614928036 4253261632 4255189668
+115842000000 115847784289 38614000000 38615928096 4254261632 4256189728
+115845000000 115850784435 38615000000 38616928145 4255261632 4257189777
+115848000000 115853784562 38616000000 38617928187 4256261632 4258189819
+115851000000 115856784736 38617000000 38618928245 4257261632 4259189877
+115854000000 115859784800 38618000000 38619928266 4258261632 4260189898
+115857000000 115862785007 38619000000 38620928335 4259261632 4261189967
+115860000000 115865785188 38620000000 38621928396 4260261632 4262190028
+115863000000 115868785337 38621000000 38622928445 4261261632 4263190077
+115866000000 115871785394 38622000000 38623928464 4262261632 4264190096
+115869000000 115874785590 38623000000 38624928530 4263261632 4265190162
+115872000000 115877785780 38624000000 38625928593 4264261632 4266190225
+115875000000 115880785925 38625000000 38626928641 4265261632 4267190273
+115878000000 115883786097 38626000000 38627928699 4266261632 4268190331
+115881000000 115886786230 38627000000 38628928743 4267261632 4269190375
+115884000000 115889786301 38628000000 38629928767 4268261632 4270190399
+115887000000 115892786527 38629000000 38630928842 4269261632 4271190474
+115890000000 115895786687 38630000000 38631928895 4270261632 4272190527
+115893000000 115898786819 38631000000 38632928939 4271261632 4273190571
+115896000000 115901786927 38632000000 38633928975 4272261632 4274190607
+115899000000 115904787138 38633000000 38634929046 4273261632 4275190678
+115902000000 115907787304 38634000000 38635929101 4274261632 4276190733
+115905000000 115910787415 38635000000 38636929138 4275261632 4277190770
+115908000000 115913787575 38636000000 38637929191 4276261632 4278190823
+115911000000 115916787687 38637000000 38638929229 4277261632 4279190861
+115914000000 115919787885 38638000000 38639929295 4278261632 4280190927
+115917000000 115922787975 38639000000 38640929325 4279261632 4281190957
+115920000000 115925788200 38640000000 38641929400 4280261632 4282191032
+115923000000 115928788332 38641000000 38642929444 4281261632 4283191076
+115926000000 115931788471 38642000000 38643929490 4282261632 4284191122
+115929000000 115934788522 38643000000 38644929507 4283261632 4285191139
+115932000000 115937788733 38644000000 38645929577 4284261632 4286191209
+115935000000 115940788942 38645000000 38646929647 4285261632 4287191279
+115938000000 115943789070 38646000000 38647929690 4286261632 4288191322
+115941000000 115946789213 38647000000 38648929737 4287261632 4289191369
+115944000000 115949789384 38648000000 38649929794 4288261632 4290191426
+115947000000 115952789481 38649000000 38650929827 4289261632 4291191459
+115950000000 115955789694 38650000000 38651929898 4290261632 4292191530
+115953000000 115958789824 38651000000 38652929941 4291261632 4293191573
+115956000000 115961789974 38652000000 38653929991 4292261632 4294191623
+115959000000 115964790134 38653000000 38654930044 4293261632 224380
+115962000000 115967790230 38654000000 38655930076 4294261632 1224412
+115965000000 115970790418 38655000000 38656930139 294336 2224475
+115968000000 115973790586 38656000000 38657930195 1294336 3224531
+115971000000 115976790722 38657000000 38658930240 2294336 4224576
+115974000000 115979790897 38658000000 38659930299 3294336 5224635
+115977000000 115982791019 38659000000 38660930339 4294336 6224675
+115980000000 115985791169 38660000000 38661930389 5294336 7224725
+115983000000 115988791317 38661000000 38662930439 6294336 8224775
+115986000000 115991791523 38662000000 38663930507 7294336 9224843
+115989000000 115994791637 38663000000 38664930545 8294336 10224881
+115992000000 115997791769 38664000000 38665930589 9294336 11224925
+115995000000 116000791943 38665000000 38666930647 10294336 12224983
+115998000000 116003792062 38666000000 38667930687 11294336 13225023
+116001000000 116006792186 38667000000 38668930728 12294336 14225064
+116004000000 116009792405 38668000000 38669930801 13294336 15225137
+116007000000 116012792541 38669000000 38670930847 14294336 16225183
+116010000000 116015792692 38670000000 38671930897 15294336 17225233
+116013000000 116018792852 38671000000 38672930950 16294336 18225286
+116016000000 116021792973 38672000000 38673930991 17294336 19225327
+116019000000 116024793054 38673000000 38674931018 18294336 20225354
+116022000000 116027793262 38674000000 38675931087 19294336 21225423
+116025000000 116030793417 38675000000 38676931139 20294336 22225475
+116028000000 116033793576 38676000000 38677931192 21294336 23225528
+116031000000 116036793728 38677000000 38678931242 22294336 24225578
+116034000000 116039793850 38678000000 38679931283 23294336 25225619
+116037000000 116042794028 38679000000 38680931342 24294336 26225678
+116040000000 116045794177 38680000000 38681931392 25294336 27225728
+116043000000 116048794305 38681000000 38682931435 26294336 28225771
+116046000000 116051794474 38682000000 38683931491 27294336 29225827
+116049000000 116054794594 38683000000 38684931531 28294336 30225867
+116052000000 116057794521 38684000000 38685931507 29294336 31225843
+116055000000 116060794844 38685000000 38686931614 30294336 32225950
+116058000000 116063795097 38686000000 38687931699 31294336 33226035
+116061000000 116066795207 38687000000 38688931735 32294336 34226071
+116064000000 116069795386 38688000000 38689931795 33294336 35226131
+116067000000 116072795434 38689000000 38690931811 34294336 36226147
+116070000000 116075795688 38690000000 38691931896 35294336 37226232
+116073000000 116078795807 38691000000 38692931935 36294336 38226271
+116076000000 116081795978 38692000000 38693931992 37294336 39226328
+116079000000 116084796125 38693000000 38694932041 38294336 40226377
+116082000000 116087796278 38694000000 38695932092 39294336 41226428
+116085000000 116090796424 38695000000 38696932141 40294336 42226477
+116088000000 116093796568 38696000000 38697932189 41294336 43226525
+116091000000 116096796731 38697000000 38698932243 42294336 44226579
+116094000000 116099796883 38698000000 38699932294 43294336 45226630
+116097000000 116102797037 38699000000 38700932345 44294336 46226681
+116100000000 116105797157 38700000000 38701932385 45294336 47226721
+116103000000 116108797366 38701000000 38702932455 46294336 48226791
+116106000000 116111797496 38702000000 38703932498 47294336 49226834
+116109000000 116114797610 38703000000 38704932536 48294336 50226872
+116112000000 116117797771 38704000000 38705932590 49294336 51226926
+116115000000 116120797906 38705000000 38706932635 50294336 52226971
+116118000000 116123798049 38706000000 38707932683 51294336 53227019
+116121000000 116126798149 38707000000 38708932716 52294336 54227052
+116124000000 116129798383 38708000000 38709932794 53294336 55227130
+116127000000 116132798456 38709000000 38710932818 54294336 56227154
+116130000000 116135798577 38710000000 38711932859 55294336 57227195
+116133000000 116138798766 38711000000 38712932922 56294336 58227258
+116136000000 116141798920 38712000000 38713932973 57294336 59227309
+116139000000 116144799099 38713000000 38714933033 58294336 60227369
+116142000000 116147799245 38714000000 38715933081 59294336 61227417
+116145000000 116150799372 38715000000 38716933124 60294336 62227460
+116148000000 116153799546 38716000000 38717933182 61294336 63227518
+116151000000 116156799610 38717000000 38718933203 62294336 64227539
+116154000000 116159799817 38718000000 38719933272 63294336 65227608
+116157000000 116162799998 38719000000 38720933332 64294336 66227668
+116160000000 116165800147 38720000000 38721933382 65294336 67227718
+116163000000 116168800204 38721000000 38722933401 66294336 68227737
+116166000000 116171800400 38722000000 38723933466 67294336 69227802
+116169000000 116174800590 38723000000 38724933530 68294336 70227866
+116172000000 116177800735 38724000000 38725933578 69294336 71227914
+116175000000 116180800907 38725000000 38726933635 70294336 72227971
+116178000000 116183801040 38726000000 38727933680 71294336 73228016
+116181000000 116186801111 38727000000 38728933703 72294336 74228039
+116184000000 116189801337 38728000000 38729933779 73294336 75228115
+116187000000 116192801497 38729000000 38730933832 74294336 76228168
+116190000000 116195801629 38730000000 38731933876 75294336 77228212
+116193000000 116198801737 38731000000 38732933912 76294336 78228248
+116196000000 116201801948 38732000000 38733933982 77294336 79228318
+116199000000 116204802114 38733000000 38734934038 78294336 80228374
+116202000000 116207802225 38734000000 38735934075 79294336 81228411
+116205000000 116210802385 38735000000 38736934128 80294336 82228464
+116208000000 116213802497 38736000000 38737934165 81294336 83228501
+116211000000 116216802695 38737000000 38738934231 82294336 84228567
+116214000000 116219802785 38738000000 38739934261 83294336 85228597
+116217000000 116222803010 38739000000 38740934336 84294336 86228672
+116220000000 116225803142 38740000000 38741934380 85294336 87228716
+116223000000 116228803281 38741000000 38742934427 86294336 88228763
+116226000000 116231803332 38742000000 38743934444 87294336 89228780
+116229000000 116234803543 38743000000 38744934514 88294336 90228850
+116232000000 116237803752 38744000000 38745934584 89294336 91228920
+116235000000 116240803880 38745000000 38746934626 90294336 92228962
+116238000000 116243804023 38746000000 38747934674 91294336 93229010
+116241000000 116246804194 38747000000 38748934731 92294336 94229067
+116244000000 116249804291 38748000000 38749934763 93294336 95229099
+116247000000 116252804504 38749000000 38750934834 94294336 96229170
+116250000000 116255804634 38750000000 38751934878 95294336 97229214
+116253000000 116258804784 38751000000 38752934928 96294336 98229264
+116256000000 116261804944 38752000000 38753934981 97294336 99229317
+116259000000 116264805040 38753000000 38754935013 98294336 100229349
+116262000000 116267805228 38754000000 38755935076 99294336 101229412
+116265000000 116270805396 38755000000 38756935132 100294336 102229468
+116268000000 116273805532 38756000000 38757935177 101294336 103229513
+116271000000 116276805707 38757000000 38758935235 102294336 104229571
+116274000000 116279805829 38758000000 38759935276 103294336 105229612
+116277000000 116282805979 38759000000 38760935326 104294336 106229662
+116280000000 116285806127 38760000000 38761935375 105294336 107229711
+116283000000 116288806333 38761000000 38762935444 106294336 108229780
+116286000000 116291806447 38762000000 38763935482 107294336 109229818
+116289000000 116294806579 38763000000 38764935526 108294336 110229862
+116292000000 116297806753 38764000000 38765935584 109294336 111229920
+116295000000 116300806872 38765000000 38766935624 110294336 112229960
+116298000000 116303806996 38766000000 38767935665 111294336 113230001
+116301000000 116306807215 38767000000 38768935738 112294336 114230074
+116304000000 116309807351 38768000000 38769935783 113294336 115230119
+116307000000 116312807502 38769000000 38770935834 114294336 116230170
+116310000000 116315807662 38770000000 38771935887 115294336 117230223
+116313000000 116318807783 38771000000 38772935927 116294336 118230263
+116316000000 116321807864 38772000000 38773935954 117294336 119230290
+116319000000 116324808072 38773000000 38774936024 118294336 120230360
+116322000000 116327808227 38774000000 38775936075 119294336 121230411
+116325000000 116330808386 38775000000 38776936128 120294336 122230464
+116328000000 116333808538 38776000000 38777936179 121294336 123230515
+116331000000 116336808660 38777000000 38778936220 122294336 124230556
+116334000000 116339808838 38778000000 38779936279 123294336 125230615
+116337000000 116342808987 38779000000 38780936329 124294336 126230665
+116340000000 116345809115 38780000000 38781936371 125294336 127230707
+116343000000 116348809284 38781000000 38782936428 126294336 128230764
+116346000000 116351809404 38782000000 38783936468 127294336 129230804
+116349000000 116354809331 38783000000 38784936443 128294336 130230779
+116352000000 116357809654 38784000000 38785936551 129294336 131230887
+116355000000 116360809907 38785000000 38786936635 130294336 132230971
+116358000000 116363810017 38786000000 38787936672 131294336 133231008
+116361000000 116366810196 38787000000 38788936732 132294336 134231068
+116364000000 116369810244 38788000000 38789936748 133294336 135231084
+116367000000 116372810498 38789000000 38790936832 134294336 136231168
+116370000000 116375810617 38790000000 38791936872 135294336 137231208
+116373000000 116378810788 38791000000 38792936929 136294336 138231265
+116376000000 116381810935 38792000000 38793936978 137294336 139231314
+116379000000 116384811088 38793000000 38794937029 138294336 140231365
+116382000000 116387811234 38794000000 38795937078 139294336 141231414
+116385000000 116390811378 38795000000 38796937126 140294336 142231462
+116388000000 116393811541 38796000000 38797937180 141294336 143231516
+116391000000 116396811693 38797000000 38798937231 142294336 144231567
+116394000000 116399811847 38798000000 38799937282 143294336 145231618
+116397000000 116402811967 38799000000 38800937322 144294336 146231658
+116400000000 116405812176 38800000000 38801937392 145294336 147231728
+116403000000 116408812306 38801000000 38802937435 146294336 148231771
+116406000000 116411812420 38802000000 38803937473 147294336 149231809
+116409000000 116414812581 38803000000 38804937527 148294336 150231863
+116412000000 116417812716 38804000000 38805937572 149294336 151231908
+116415000000 116420812859 38805000000 38806937619 150294336 152231955
+116418000000 116423812959 38806000000 38807937653 151294336 153231989
+116421000000 116426813193 38807000000 38808937731 152294336 154232067
+116424000000 116429813266 38808000000 38809937755 153294336 155232091
+116427000000 116432813387 38809000000 38810937795 154294336 156232131
+116430000000 116435813576 38810000000 38811937858 155294336 157232194
+116433000000 116438813730 38811000000 38812937910 156294336 158232246
+116436000000 116441813909 38812000000 38813937969 157294336 159232305
+116439000000 116444814055 38813000000 38814938018 158294336 160232354
+116442000000 116447814182 38814000000 38815938060 159294336 161232396
+116445000000 116450814356 38815000000 38816938118 160294336 162232454
+116448000000 116453814420 38816000000 38817938140 161294336 163232476
+116451000000 116456814627 38817000000 38818938209 162294336 164232545
+116454000000 116459814808 38818000000 38819938269 163294336 165232605
+116457000000 116462814957 38819000000 38820938319 164294336 166232655
+116460000000 116465815014 38820000000 38821938338 165294336 167232674
+116463000000 116468815210 38821000000 38822938403 166294336 168232739
+116466000000 116471815400 38822000000 38823938466 167294336 169232802
+116469000000 116474815545 38823000000 38824938515 168294336 170232851
+116472000000 116477815717 38824000000 38825938572 169294336 171232908
+116475000000 116480815850 38825000000 38826938616 170294336 172232952
+116478000000 116483815921 38826000000 38827938640 171294336 173232976
+116481000000 116486816147 38827000000 38828938715 172294336 174233051
+116484000000 116489816307 38828000000 38829938769 173294336 175233105
+116487000000 116492816439 38829000000 38830938813 174294336 176233149
+116490000000 116495816547 38830000000 38831938849 175294336 177233185
+116493000000 116498816758 38831000000 38832938919 176294336 178233255
+116496000000 116501816924 38832000000 38833938974 177294336 179233310
+116499000000 116504817035 38833000000 38834939011 178294336 180233347
+116502000000 116507817195 38834000000 38835939065 179294336 181233401
+116505000000 116510817307 38835000000 38836939102 180294336 182233438
+116508000000 116513817505 38836000000 38837939168 181294336 183233504
+116511000000 116516817595 38837000000 38838939198 182294336 184233534
+116514000000 116519817820 38838000000 38839939273 183294336 185233609
+116517000000 116522817952 38839000000 38840939317 184294336 186233653
+116520000000 116525818091 38840000000 38841939363 185294336 187233699
+116523000000 116528818142 38841000000 38842939380 186294336 188233716
+116526000000 116531818353 38842000000 38843939451 187294336 189233787
+116529000000 116534818562 38843000000 38844939520 188294336 190233856
+116532000000 116537818690 38844000000 38845939563 189294336 191233899
+116535000000 116540818833 38845000000 38846939611 190294336 192233947
+116538000000 116543819004 38846000000 38847939668 191294336 193234004
+116541000000 116546819101 38847000000 38848939700 192294336 194234036
+116544000000 116549819314 38848000000 38849939771 193294336 195234107
+116547000000 116552819444 38849000000 38850939814 194294336 196234150
+116550000000 116555819594 38850000000 38851939864 195294336 197234200
+116553000000 116558819754 38851000000 38852939918 196294336 198234254
+116556000000 116561819850 38852000000 38853939950 197294336 199234286
+116559000000 116564820038 38853000000 38854940012 198294336 200234348
+116562000000 116567820206 38854000000 38855940068 199294336 201234404
+116565000000 116570820342 38855000000 38856940114 200294336 202234450
+116568000000 116573820517 38856000000 38857940172 201294336 203234508
+116571000000 116576820639 38857000000 38858940213 202294336 204234549
+116574000000 116579820789 38858000000 38859940263 203294336 205234599
+116577000000 116582820937 38859000000 38860940312 204294336 206234648
+116580000000 116585821143 38860000000 38861940381 205294336 207234717
+116583000000 116588821257 38861000000 38862940419 206294336 208234755
+116586000000 116591821389 38862000000 38863940463 207294336 209234799
+116589000000 116594821563 38863000000 38864940521 208294336 210234857
+116592000000 116597821682 38864000000 38865940560 209294336 211234896
+116595000000 116600821806 38865000000 38866940602 210294336 212234938
+116598000000 116603822025 38866000000 38867940675 211294336 213235011
+116601000000 116606822161 38867000000 38868940720 212294336 214235056
+116604000000 116609822312 38868000000 38869940770 213294336 215235106
+116607000000 116612822472 38869000000 38870940824 214294336 216235160
+116610000000 116615822593 38870000000 38871940864 215294336 217235200
+116613000000 116618822674 38871000000 38872940891 216294336 218235227
+116616000000 116621822882 38872000000 38873940960 217294336 219235296
+116619000000 116624823037 38873000000 38874941012 218294336 220235348
+116622000000 116627823196 38874000000 38875941065 219294336 221235401
+116625000000 116630823348 38875000000 38876941116 220294336 222235452
+116628000000 116633823470 38876000000 38877941156 221294336 223235492
+116631000000 116636823648 38877000000 38878941216 222294336 224235552
+116634000000 116639823797 38878000000 38879941265 223294336 225235601
+116637000000 116642823925 38879000000 38880941308 224294336 226235644
+116640000000 116645824094 38880000000 38881941364 225294336 227235700
+116643000000 116648824214 38881000000 38882941404 226294336 228235740
+116646000000 116651824141 38882000000 38883941380 227294336 229235716
+116649000000 116654824464 38883000000 38884941488 228294336 230235824
+116652000000 116657824717 38884000000 38885941572 229294336 231235908
+116655000000 116660824827 38885000000 38886941609 230294336 232235945
+116658000000 116663825006 38886000000 38887941668 231294336 233236004
+116661000000 116666825054 38887000000 38888941684 232294336 234236020
+116664000000 116669825308 38888000000 38889941769 233294336 235236105
+116667000000 116672825427 38889000000 38890941809 234294336 236236145
+116670000000 116675825598 38890000000 38891941866 235294336 237236202
+116673000000 116678825745 38891000000 38892941915 236294336 238236251
+116676000000 116681825898 38892000000 38893941966 237294336 239236302
+116679000000 116684826044 38893000000 38894942014 238294336 240236350
+116682000000 116687826188 38894000000 38895942062 239294336 241236398
+116685000000 116690826351 38895000000 38896942117 240294336 242236453
+116688000000 116693826503 38896000000 38897942167 241294336 243236503
+116691000000 116696826657 38897000000 38898942219 242294336 244236555
+116694000000 116699826777 38898000000 38899942259 243294336 245236595
+116697000000 116702826986 38899000000 38900942328 244294336 246236664
+116700000000 116705827116 38900000000 38901942372 245294336 247236708
+116703000000 116708827230 38901000000 38902942410 246294336 248236746
+116706000000 116711827391 38902000000 38903942463 247294336 249236799
+116709000000 116714827526 38903000000 38904942508 248294336 250236844
+116712000000 116717827669 38904000000 38905942556 249294336 251236892
+116715000000 116720827769 38905000000 38906942589 250294336 252236925
+116718000000 116723828003 38906000000 38907942667 251294336 253237003
+116721000000 116726828076 38907000000 38908942692 252294336 254237028
+116724000000 116729828197 38908000000 38909942732 253294336 255237068
+116727000000 116732828386 38909000000 38910942795 254294336 256237131
+116730000000 116735828540 38910000000 38911942846 255294336 257237182
+116733000000 116738828719 38911000000 38912942906 256294336 258237242
+116736000000 116741828865 38912000000 38913942955 257294336 259237291
+116739000000 116744828992 38913000000 38914942997 258294336 260237333
+116742000000 116747829166 38914000000 38915943055 259294336 261237391
+116745000000 116750829230 38915000000 38916943076 260294336 262237412
+116748000000 116753829437 38916000000 38917943145 261294336 263237481
+116751000000 116756829618 38917000000 38918943206 262294336 264237542
+116754000000 116759829767 38918000000 38919943255 263294336 265237591
+116757000000 116762829824 38919000000 38920943274 264294336 266237610
+116760000000 116765830020 38920000000 38921943340 265294336 267237676
+116763000000 116768830210 38921000000 38922943403 266294336 268237739
+116766000000 116771830355 38922000000 38923943451 267294336 269237787
+116769000000 116774830527 38923000000 38924943509 268294336 270237845
+116772000000 116777830660 38924000000 38925943553 269294336 271237889
+116775000000 116780830731 38925000000 38926943577 270294336 272237913
+116778000000 116783830957 38926000000 38927943652 271294336 273237988
+116781000000 116786831117 38927000000 38928943705 272294336 274238041
+116784000000 116789831249 38928000000 38929943749 273294336 275238085
+116787000000 116792831357 38929000000 38930943785 274294336 276238121
+116790000000 116795831568 38930000000 38931943856 275294336 277238192
+116793000000 116798831734 38931000000 38932943911 276294336 278238247
+116796000000 116801831845 38932000000 38933943948 277294336 279238284
+116799000000 116804832005 38933000000 38934944001 278294336 280238337
+116802000000 116807832117 38934000000 38935944039 279294336 281238375
+116805000000 116810832315 38935000000 38936944105 280294336 282238441
+116808000000 116813832405 38936000000 38937944135 281294336 283238471
+116811000000 116816832630 38937000000 38938944210 282294336 284238546
+116814000000 116819832762 38938000000 38939944254 283294336 285238590
+116817000000 116822832901 38939000000 38940944300 284294336 286238636
+116820000000 116825832952 38940000000 38941944317 285294336 287238653
+116823000000 116828833163 38941000000 38942944387 286294336 288238723
+116826000000 116831833372 38942000000 38943944457 287294336 289238793
+116829000000 116834833500 38943000000 38944944500 288294336 290238836
+116832000000 116837833643 38944000000 38945944547 289294336 291238883
+116835000000 116840833814 38945000000 38946944604 290294336 292238940
+116838000000 116843833911 38946000000 38947944637 291294336 293238973
+116841000000 116846834124 38947000000 38948944708 292294336 294239044
+116844000000 116849834254 38948000000 38949944751 293294336 295239087
+116847000000 116852834404 38949000000 38950944801 294294336 296239137
+116850000000 116855834564 38950000000 38951944854 295294336 297239190
+116853000000 116858834660 38951000000 38952944886 296294336 298239222
+116856000000 116861834848 38952000000 38953944949 297294336 299239285
+116859000000 116864835016 38953000000 38954945005 298294336 300239341
+116862000000 116867835152 38954000000 38955945050 299294336 301239386
+116865000000 116870835327 38955000000 38956945109 300294336 302239445
+116868000000 116873835449 38956000000 38957945149 301294336 303239485
+116871000000 116876835599 38957000000 38958945199 302294336 304239535
+116874000000 116879835747 38958000000 38959945249 303294336 305239585
+116877000000 116882835953 38959000000 38960945317 304294336 306239653
+116880000000 116885836067 38960000000 38961945355 305294336 307239691
+116883000000 116888836199 38961000000 38962945399 306294336 308239735
+116886000000 116891836373 38962000000 38963945457 307294336 309239793
+116889000000 116894836492 38963000000 38964945497 308294336 310239833
+116892000000 116897836616 38964000000 38965945538 309294336 311239874
+116895000000 116900836835 38965000000 38966945611 310294336 312239947
+116898000000 116903836971 38966000000 38967945657 311294336 313239993
+116901000000 116906837122 38967000000 38968945707 312294336 314240043
+116904000000 116909837282 38968000000 38969945760 313294336 315240096
+116907000000 116912837403 38969000000 38970945801 314294336 316240137
+116910000000 116915837484 38970000000 38971945828 315294336 317240164
+116913000000 116918837692 38971000000 38972945897 316294336 318240233
+116916000000 116921837847 38972000000 38973945949 317294336 319240285
+116919000000 116924838006 38973000000 38974946002 318294336 320240338
+116922000000 116927838158 38974000000 38975946052 319294336 321240388
+116925000000 116930838280 38975000000 38976946093 320294336 322240429
+116928000000 116933838458 38976000000 38977946152 321294336 323240488
+116931000000 116936838607 38977000000 38978946202 322294336 324240538
+116934000000 116939838735 38978000000 38979946245 323294336 325240581
+116937000000 116942838904 38979000000 38980946301 324294336 326240637
+116940000000 116945839024 38980000000 38981946341 325294336 327240677
+116943000000 116948838951 38981000000 38982946317 326294336 328240653
+116946000000 116951839274 38982000000 38983946424 327294336 329240760
+116949000000 116954839527 38983000000 38984946509 328294336 330240845
+116952000000 116957839637 38984000000 38985946545 329294336 331240881
+116955000000 116960839816 38985000000 38986946605 330294336 332240941
+116958000000 116963839864 38986000000 38987946621 331294336 333240957
+116961000000 116966840118 38987000000 38988946706 332294336 334241042
+116964000000 116969840237 38988000000 38989946745 333294336 335241081
+116967000000 116972840408 38989000000 38990946802 334294336 336241138
+116970000000 116975840555 38990000000 38991946851 335294336 337241187
+116973000000 116978840708 38991000000 38992946902 336294336 338241238
+116976000000 116981840854 38992000000 38993946951 337294336 339241287
+116979000000 116984840998 38993000000 38994946999 338294336 340241335
+116982000000 116987841161 38994000000 38995947053 339294336 341241389
+116985000000 116990841313 38995000000 38996947104 340294336 342241440
+116988000000 116993841467 38996000000 38997947155 341294336 343241491
+116991000000 116996841587 38997000000 38998947195 342294336 344241531
+116994000000 116999841796 38998000000 38999947265 343294336 345241601
+116997000000 117002841926 38999000000 39000947308 344294336 346241644
+117000000000 117005842040 39000000000 39001947346 345294336 347241682
+117003000000 117008842201 39001000000 39002947400 346294336 348241736
+117006000000 117011842336 39002000000 39003947445 347294336 349241781
+117009000000 117014842479 39003000000 39004947493 348294336 350241829
+117012000000 117017842579 39004000000 39005947526 349294336 351241862
+117015000000 117020842813 39005000000 39006947604 350294336 352241940
+117018000000 117023842886 39006000000 39007947628 351294336 353241964
+117021000000 117026843007 39007000000 39008947669 352294336 354242005
+117024000000 117029843196 39008000000 39009947732 353294336 355242068
+117027000000 117032843350 39009000000 39010947783 354294336 356242119
+117030000000 117035843529 39010000000 39011947843 355294336 357242179
+117033000000 117038843675 39011000000 39012947891 356294336 358242227
+117036000000 117041843802 39012000000 39013947934 357294336 359242270
+117039000000 117044843976 39013000000 39014947992 358294336 360242328
+117042000000 117047844040 39014000000 39015948013 359294336 361242349
+117045000000 117050844247 39015000000 39016948082 360294336 362242418
+117048000000 117053844428 39016000000 39017948142 361294336 363242478
+117051000000 117056844577 39017000000 39018948192 362294336 364242528
+117054000000 117059844634 39018000000 39019948211 363294336 365242547
+117057000000 117062844830 39019000000 39020948276 364294336 366242612
+117060000000 117065845020 39020000000 39021948340 365294336 367242676
+117063000000 117068845165 39021000000 39022948388 366294336 368242724
+117066000000 117071845337 39022000000 39023948445 367294336 369242781
+117069000000 117074845470 39023000000 39024948490 368294336 370242826
+117072000000 117077845541 39024000000 39025948513 369294336 371242849
+117075000000 117080845767 39025000000 39026948589 370294336 372242925
+117078000000 117083845927 39026000000 39027948642 371294336 373242978
+117081000000 117086846059 39027000000 39028948686 372294336 374243022
+117084000000 117089846167 39028000000 39029948722 373294336 375243058
+117087000000 117092846378 39029000000 39030948792 374294336 376243128
+117090000000 117095846544 39030000000 39031948848 375294336 377243184
+117093000000 117098846655 39031000000 39032948885 376294336 378243221
+117096000000 117101846815 39032000000 39033948938 377294336 379243274
+117099000000 117104846927 39033000000 39034948975 378294336 380243311
+117102000000 117107847125 39034000000 39035949041 379294336 381243377
+117105000000 117110847215 39035000000 39036949071 380294336 382243407
+117108000000 117113847440 39036000000 39037949146 381294336 383243482
+117111000000 117116847572 39037000000 39038949190 382294336 384243526
+117114000000 117119847711 39038000000 39039949237 383294336 385243573
+117117000000 117122847762 39039000000 39040949254 384294336 386243590
+117120000000 117125847973 39040000000 39041949324 385294336 387243660
+117123000000 117128848182 39041000000 39042949394 386294336 388243730
+117126000000 117131848310 39042000000 39043949436 387294336 389243772
+117129000000 117134848453 39043000000 39044949484 388294336 390243820
+117132000000 117137848624 39044000000 39045949541 389294336 391243877
+117135000000 117140848721 39045000000 39046949573 390294336 392243909
+117138000000 117143848934 39046000000 39047949644 391294336 393243980
+117141000000 117146849064 39047000000 39048949688 392294336 394244024
+117144000000 117149849214 39048000000 39049949738 393294336 395244074
+117147000000 117152849374 39049000000 39050949791 394294336 396244127
+117150000000 117155849470 39050000000 39051949823 395294336 397244159
+117153000000 117158849658 39051000000 39052949886 396294336 398244222
+117156000000 117161849826 39052000000 39053949942 397294336 399244278
+117159000000 117164849962 39053000000 39054949987 398294336 400244323
+117162000000 117167850137 39054000000 39055950045 399294336 401244381
+117165000000 117170850259 39055000000 39056950086 400294336 402244422
+117168000000 117173850409 39056000000 39057950136 401294336 403244472
+117171000000 117176850557 39057000000 39058950185 402294336 404244521
+117174000000 117179850763 39058000000 39059950254 403294336 405244590
+117177000000 117182850877 39059000000 39060950292 404294336 406244628
+117180000000 117185851009 39060000000 39061950336 405294336 407244672
+117183000000 117188851183 39061000000 39062950394 406294336 408244730
+117186000000 117191851302 39062000000 39063950434 407294336 409244770
+117189000000 117194851426 39063000000 39064950475 408294336 410244811
+117192000000 117197851645 39064000000 39065950548 409294336 411244884
+117195000000 117200851781 39065000000 39066950593 410294336 412244929
+117198000000 117203851932 39066000000 39067950644 411294336 413244980
+117201000000 117206852092 39067000000 39068950697 412294336 414245033
+117204000000 117209852213 39068000000 39069950737 413294336 415245073
+117207000000 117212852294 39069000000 39070950764 414294336 416245100
+117210000000 117215852502 39070000000 39071950834 415294336 417245170
+117213000000 117218852657 39071000000 39072950885 416294336 418245221
+117216000000 117221852816 39072000000 39073950938 417294336 419245274
+117219000000 117224852968 39073000000 39074950989 418294336 420245325
+117222000000 117227853090 39074000000 39075951030 419294336 421245366
+117225000000 117230853268 39075000000 39076951089 420294336 422245425
+117228000000 117233853417 39076000000 39077951139 421294336 423245475
+117231000000 117236853545 39077000000 39078951181 422294336 424245517
+117234000000 117239853714 39078000000 39079951238 423294336 425245574
+117237000000 117242853834 39079000000 39080951278 424294336 426245614
+117240000000 117245853761 39080000000 39081951253 425294336 427245589
+117243000000 117248854084 39081000000 39082951361 426294336 428245697
+117246000000 117251854337 39082000000 39083951445 427294336 429245781
+117249000000 117254854447 39083000000 39084951482 428294336 430245818
+117252000000 117257854626 39084000000 39085951542 429294336 431245878
+117255000000 117260854674 39085000000 39086951558 430294336 432245894
+117258000000 117263854928 39086000000 39087951642 431294336 433245978
+117261000000 117266855047 39087000000 39088951682 432294336 434246018
+117264000000 117269855218 39088000000 39089951739 433294336 435246075
+117267000000 117272855365 39089000000 39090951788 434294336 436246124
+117270000000 117275855518 39090000000 39091951839 435294336 437246175
+117273000000 117278855664 39091000000 39092951888 436294336 438246224
+117276000000 117281855808 39092000000 39093951936 437294336 439246272
+117279000000 117284855971 39093000000 39094951990 438294336 440246326
+117282000000 117287856123 39094000000 39095952041 439294336 441246377
+117285000000 117290856277 39095000000 39096952092 440294336 442246428
+117288000000 117293856397 39096000000 39097952132 441294336 443246468
+117291000000 117296856606 39097000000 39098952202 442294336 444246538
+117294000000 117299856736 39098000000 39099952245 443294336 445246581
+117297000000 117302856850 39099000000 39100952283 444294336 446246619
+117300000000 117305857011 39100000000 39101952337 445294336 447246673
+117303000000 117308857146 39101000000 39102952382 446294336 448246718
+117306000000 117311857289 39102000000 39103952429 447294336 449246765
+117309000000 117314857389 39103000000 39104952463 448294336 450246799
+117312000000 117317857623 39104000000 39105952541 449294336 451246877
+117315000000 117320857696 39105000000 39106952565 450294336 452246901
+117318000000 117323857817 39106000000 39107952605 451294336 453246941
+117321000000 117326858006 39107000000 39108952668 452294336 454247004
+117324000000 117329858160 39108000000 39109952720 453294336 455247056
+117327000000 117332858339 39109000000 39110952779 454294336 456247115
+117330000000 117335858485 39110000000 39111952828 455294336 457247164
+117333000000 117338858612 39111000000 39112952870 456294336 458247206
+117336000000 117341858786 39112000000 39113952928 457294336 459247264
+117339000000 117344858850 39113000000 39114952950 458294336 460247286
+117342000000 117347859057 39114000000 39115953019 459294336 461247355
+117345000000 117350859238 39115000000 39116953079 460294336 462247415
+117348000000 117353859387 39116000000 39117953129 461294336 463247465
+117351000000 117356859444 39117000000 39118953148 462294336 464247484
+117354000000 117359859640 39118000000 39119953213 463294336 465247549
+117357000000 117362859830 39119000000 39120953276 464294336 466247612
+117360000000 117365859975 39120000000 39121953325 465294336 467247661
+117363000000 117368860147 39121000000 39122953382 466294336 468247718
+117366000000 117371860280 39122000000 39123953426 467294336 469247762
+117369000000 117374860351 39123000000 39124953450 468294336 470247786
+117372000000 117377860577 39124000000 39125953525 469294336 471247861
+117375000000 117380860737 39125000000 39126953579 470294336 472247915
+117378000000 117383860869 39126000000 39127953623 471294336 473247959
+117381000000 117386860977 39127000000 39128953659 472294336 474247995
+117384000000 117389861188 39128000000 39129953729 473294336 475248065
+117387000000 117392861354 39129000000 39130953784 474294336 476248120
+117390000000 117395861465 39130000000 39131953821 475294336 477248157
+117393000000 117398861625 39131000000 39132953875 476294336 478248211
+117396000000 117401861737 39132000000 39133953912 477294336 479248248
+117399000000 117404861935 39133000000 39134953978 478294336 480248314
+117402000000 117407862025 39134000000 39135954008 479294336 481248344
+117405000000 117410862250 39135000000 39136954083 480294336 482248419
+117408000000 117413862382 39136000000 39137954127 481294336 483248463
+117411000000 117416862521 39137000000 39138954173 482294336 484248509
+117414000000 117419862572 39138000000 39139954190 483294336 485248526
+117417000000 117422862783 39139000000 39140954261 484294336 486248597
+117420000000 117425862992 39140000000 39141954330 485294336 487248666
+117423000000 117428863120 39141000000 39142954373 486294336 488248709
+117426000000 117431863263 39142000000 39143954421 487294336 489248757
+117429000000 117434863434 39143000000 39144954478 488294336 490248814
+117432000000 117437863531 39144000000 39145954510 489294336 491248846
+117435000000 117440863744 39145000000 39146954581 490294336 492248917
+117438000000 117443863874 39146000000 39147954624 491294336 493248960
+117441000000 117446864024 39147000000 39148954674 492294336 494249010
+117444000000 117449864184 39148000000 39149954728 493294336 495249064
+117447000000 117452864280 39149000000 39150954760 494294336 496249096
+117450000000 117455864468 39150000000 39151954822 495294336 497249158
+117453000000 117458864636 39151000000 39152954878 496294336 498249214
+117456000000 117461864772 39152000000 39153954924 497294336 499249260
+117459000000 117464864947 39153000000 39154954982 498294336 500249318
+117462000000 117467865069 39154000000 39155955023 499294336 501249359
+117465000000 117470865219 39155000000 39156955073 500294336 502249409
+117468000000 117473865367 39156000000 39157955122 501294336 503249458
+117471000000 117476865573 39157000000 39158955191 502294336 504249527
+117474000000 117479865687 39158000000 39159955229 503294336 505249565
+117477000000 117482865819 39159000000 39160955273 504294336 506249609
+117480000000 117485865993 39160000000 39161955331 505294336 507249667
+117483000000 117488866112 39161000000 39162955370 506294336 508249706
+117486000000 117491866236 39162000000 39163955412 507294336 509249748
+117489000000 117494866455 39163000000 39164955485 508294336 510249821
+117492000000 117497866591 39164000000 39165955530 509294336 511249866
+117495000000 117500866742 39165000000 39166955580 510294336 512249916
+117498000000 117503866902 39166000000 39167955634 511294336 513249970
+117501000000 117506867023 39167000000 39168955674 512294336 514250010
+117504000000 117509867104 39168000000 39169955701 513294336 515250037
+117507000000 117512867312 39169000000 39170955770 514294336 516250106
+117510000000 117515867467 39170000000 39171955822 515294336 517250158
+117513000000 117518867626 39171000000 39172955875 516294336 518250211
+117516000000 117521867778 39172000000 39173955926 517294336 519250262
+117519000000 117524867900 39173000000 39174955966 518294336 520250302
+117522000000 117527868078 39174000000 39175956026 519294336 521250362
+117525000000 117530868227 39175000000 39176956075 520294336 522250411
+117528000000 117533868355 39176000000 39177956118 521294336 523250454
+117531000000 117536868524 39177000000 39178956174 522294336 524250510
+117534000000 117539868644 39178000000 39179956214 523294336 525250550
+117537000000 117542868571 39179000000 39180956190 524294336 526250526
+117540000000 117545868894 39180000000 39181956298 525294336 527250634
+117543000000 117548869147 39181000000 39182956382 526294336 528250718
+117546000000 117551869257 39182000000 39183956419 527294336 529250755
+117549000000 117554869436 39183000000 39184956478 528294336 530250814
+117552000000 117557869484 39184000000 39185956494 529294336 531250830
+117555000000 117560869738 39185000000 39186956579 530294336 532250915
+117558000000 117563869857 39186000000 39187956619 531294336 533250955
+117561000000 117566870028 39187000000 39188956676 532294336 534251012
+117564000000 117569870175 39188000000 39189956725 533294336 535251061
+117567000000 117572870328 39189000000 39190956776 534294336 536251112
+117570000000 117575870474 39190000000 39191956824 535294336 537251160
+117573000000 117578870618 39191000000 39192956872 536294336 538251208
+117576000000 117581870781 39192000000 39193956927 537294336 539251263
+117579000000 117584870933 39193000000 39194956977 538294336 540251313
+117582000000 117587871087 39194000000 39195957029 539294336 541251365
+117585000000 117590871207 39195000000 39196957069 540294336 542251405
+117588000000 117593871416 39196000000 39197957138 541294336 543251474
+117591000000 117596871546 39197000000 39198957182 542294336 544251518
+117594000000 117599871660 39198000000 39199957220 543294336 545251556
+117597000000 117602871821 39199000000 39200957273 544294336 546251609
+117600000000 117605871956 39200000000 39201957318 545294336 547251654
+117603000000 117608872099 39201000000 39202957366 546294336 548251702
+117606000000 117611872199 39202000000 39203957399 547294336 549251735
+117609000000 117614872433 39203000000 39204957477 548294336 550251813
+117612000000 117617872506 39204000000 39205957502 549294336 551251838
+117615000000 117620872627 39205000000 39206957542 550294336 552251878
+117618000000 117623872816 39206000000 39207957605 551294336 553251941
+117621000000 117626872970 39207000000 39208957656 552294336 554251992
+117624000000 117629873149 39208000000 39209957716 553294336 555252052
+117627000000 117632873295 39209000000 39210957765 554294336 556252101
+117630000000 117635873422 39210000000 39211957807 555294336 557252143
+117633000000 117638873596 39211000000 39212957865 556294336 558252201
+117636000000 117641873660 39212000000 39213957886 557294336 559252222
+117639000000 117644873867 39213000000 39214957955 558294336 560252291
+117642000000 117647874048 39214000000 39215958016 559294336 561252352
+117645000000 117650874197 39215000000 39216958065 560294336 562252401
+117648000000 117653874254 39216000000 39217958084 561294336 563252420
+117651000000 117656874450 39217000000 39218958150 562294336 564252486
+117654000000 117659874640 39218000000 39219958213 563294336 565252549
+117657000000 117662874785 39219000000 39220958261 564294336 566252597
+117660000000 117665874957 39220000000 39221958319 565294336 567252655
+117663000000 117668875090 39221000000 39222958363 566294336 568252699
+117666000000 117671875161 39222000000 39223958387 567294336 569252723
+117669000000 117674875387 39223000000 39224958462 568294336 570252798
+117672000000 117677875547 39224000000 39225958515 569294336 571252851
+117675000000 117680875679 39225000000 39226958559 570294336 572252895
+117678000000 117683875787 39226000000 39227958595 571294336 573252931
+117681000000 117686875998 39227000000 39228958666 572294336 574253002
+117684000000 117689876164 39228000000 39229958721 573294336 575253057
+117687000000 117692876275 39229000000 39230958758 574294336 576253094
+117690000000 117695876435 39230000000 39231958811 575294336 577253147
+117693000000 117698876547 39231000000 39232958849 576294336 578253185
+117696000000 117701876745 39232000000 39233958915 577294336 579253251
+117699000000 117704876835 39233000000 39234958945 578294336 580253281
+117702000000 117707877060 39234000000 39235959020 579294336 581253356
+117705000000 117710877192 39235000000 39236959064 580294336 582253400
+117708000000 117713877331 39236000000 39237959110 581294336 583253446
+117711000000 117716877382 39237000000 39238959127 582294336 584253463
+117714000000 117719877593 39238000000 39239959197 583294336 585253533
+117717000000 117722877802 39239000000 39240959267 584294336 586253603
+117720000000 117725877930 39240000000 39241959310 585294336 587253646
+117723000000 117728878073 39241000000 39242959357 586294336 588253693
+117726000000 117731878244 39242000000 39243959414 587294336 589253750
+117729000000 117734878341 39243000000 39244959447 588294336 590253783
+117732000000 117737878554 39244000000 39245959518 589294336 591253854
+117735000000 117740878684 39245000000 39246959561 590294336 592253897
+117738000000 117743878834 39246000000 39247959611 591294336 593253947
+117741000000 117746878994 39247000000 39248959664 592294336 594254000
+117744000000 117749879090 39248000000 39249959696 593294336 595254032
+117747000000 117752879278 39249000000 39250959759 594294336 596254095
+117750000000 117755879446 39250000000 39251959815 595294336 597254151
+117753000000 117758879582 39251000000 39252959860 596294336 598254196
+117756000000 117761879757 39252000000 39253959919 597294336 599254255
+117759000000 117764879879 39253000000 39254959959 598294336 600254295
+117762000000 117767880029 39254000000 39255960009 599294336 601254345
+117765000000 117770880177 39255000000 39256960059 600294336 602254395
+117768000000 117773880383 39256000000 39257960127 601294336 603254463
+117771000000 117776880497 39257000000 39258960165 602294336 604254501
+117774000000 117779880629 39258000000 39259960209 603294336 605254545
+117777000000 117782880803 39259000000 39260960267 604294336 606254603
+117780000000 117785880922 39260000000 39261960307 605294336 607254643
+117783000000 117788881046 39261000000 39262960348 606294336 608254684
+117786000000 117791881265 39262000000 39263960421 607294336 609254757
+117789000000 117794881401 39263000000 39264960467 608294336 610254803
+117792000000 117797881552 39264000000 39265960517 609294336 611254853
+117795000000 117800881712 39265000000 39266960570 610294336 612254906
+117798000000 117803881833 39266000000 39267960611 611294336 613254947
+117801000000 117806881914 39267000000 39268960638 612294336 614254974
+117804000000 117809882122 39268000000 39269960707 613294336 615255043
+117807000000 117812882277 39269000000 39270960759 614294336 616255095
+117810000000 117815882436 39270000000 39271960812 615294336 617255148
+117813000000 117818882588 39271000000 39272960862 616294336 618255198
+117816000000 117821882710 39272000000 39273960903 617294336 619255239
+117819000000 117824882888 39273000000 39274960962 618294336 620255298
+117822000000 117827883037 39274000000 39275961012 619294336 621255348
+117825000000 117830883165 39275000000 39276961055 620294336 622255391
+117828000000 117833883334 39276000000 39277961111 621294336 623255447
+117831000000 117836883454 39277000000 39278961151 622294336 624255487
+117834000000 117839883381 39278000000 39279961127 623294336 625255463
+117837000000 117842883704 39279000000 39280961234 624294336 626255570
+117840000000 117845883957 39280000000 39281961319 625294336 627255655
+117843000000 117848884067 39281000000 39282961355 626294336 628255691
+117846000000 117851884246 39282000000 39283961415 627294336 629255751
+117849000000 117854884294 39283000000 39284961431 628294336 630255767
+117852000000 117857884548 39284000000 39285961516 629294336 631255852
+117855000000 117860884667 39285000000 39286961555 630294336 632255891
+117858000000 117863884838 39286000000 39287961612 631294336 633255948
+117861000000 117866884985 39287000000 39288961661 632294336 634255997
+117864000000 117869885138 39288000000 39289961712 633294336 635256048
+117867000000 117872885284 39289000000 39290961761 634294336 636256097
+117870000000 117875885428 39290000000 39291961809 635294336 637256145
+117873000000 117878885591 39291000000 39292961863 636294336 638256199
+117876000000 117881885743 39292000000 39293961914 637294336 639256250
+117879000000 117884885897 39293000000 39294961965 638294336 640256301
+117882000000 117887886017 39294000000 39295962005 639294336 641256341
+117885000000 117890886226 39295000000 39296962075 640294336 642256411
+117888000000 117893886356 39296000000 39297962118 641294336 643256454
+117891000000 117896886470 39297000000 39298962156 642294336 644256492
+117894000000 117899886631 39298000000 39299962210 643294336 645256546
+117897000000 117902886766 39299000000 39300962255 644294336 646256591
+117900000000 117905886909 39300000000 39301962303 645294336 647256639
+117903000000 117908887009 39301000000 39302962336 646294336 648256672
+117906000000 117911887243 39302000000 39303962414 647294336 649256750
+117909000000 117914887316 39303000000 39304962438 648294336 650256774
+117912000000 117917887437 39304000000 39305962479 649294336 651256815
+117915000000 117920887626 39305000000 39306962542 650294336 652256878
+117918000000 117923887780 39306000000 39307962593 651294336 653256929
+117921000000 117926887959 39307000000 39308962653 652294336 654256989
+117924000000 117929888105 39308000000 39309962701 653294336 655257037
+117927000000 117932888232 39309000000 39310962744 654294336 656257080
+117930000000 117935888406 39310000000 39311962802 655294336 657257138
+117933000000 117938888470 39311000000 39312962823 656294336 658257159
+117936000000 117941888677 39312000000 39313962892 657294336 659257228
+117939000000 117944888858 39313000000 39314962952 658294336 660257288
+117942000000 117947889007 39314000000 39315963002 659294336 661257338
+117945000000 117950889064 39315000000 39316963021 660294336 662257357
+117948000000 117953889260 39316000000 39317963086 661294336 663257422
+117951000000 117956889450 39317000000 39318963150 662294336 664257486
+117954000000 117959889595 39318000000 39319963198 663294336 665257534
+117957000000 117962889767 39319000000 39320963255 664294336 666257591
+117960000000 117965889900 39320000000 39321963300 665294336 667257636
+117963000000 117968889971 39321000000 39322963323 666294336 668257659
+117966000000 117971890197 39322000000 39323963399 667294336 669257735
+117969000000 117974890357 39323000000 39324963452 668294336 670257788
+117972000000 117977890489 39324000000 39325963496 669294336 671257832
+117975000000 117980890597 39325000000 39326963532 670294336 672257868
+117978000000 117983890808 39326000000 39327963602 671294336 673257938
+117981000000 117986890974 39327000000 39328963658 672294336 674257994
+117984000000 117989891085 39328000000 39329963695 673294336 675258031
+117987000000 117992891245 39329000000 39330963748 674294336 676258084
+117990000000 117995891357 39330000000 39331963785 675294336 677258121
+117993000000 117998891555 39331000000 39332963851 676294336 678258187
+117996000000 118001891645 39332000000 39333963881 677294336 679258217
+117999000000 118004891870 39333000000 39334963956 678294336 680258292
+118002000000 118007892002 39334000000 39335964000 679294336 681258336
+118005000000 118010892141 39335000000 39336964047 680294336 682258383
+118008000000 118013892192 39336000000 39337964064 681294336 683258400
+118011000000 118016892403 39337000000 39338964134 682294336 684258470
+118014000000 118019892612 39338000000 39339964204 683294336 685258540
+118017000000 118022892740 39339000000 39340964246 684294336 686258582
+118020000000 118025892883 39340000000 39341964294 685294336 687258630
+118023000000 118028893054 39341000000 39342964351 686294336 688258687
+118026000000 118031893151 39342000000 39343964383 687294336 689258719
+118029000000 118034893364 39343000000 39344964454 688294336 690258790
+118032000000 118037893494 39344000000 39345964498 689294336 691258834
+118035000000 118040893644 39345000000 39346964548 690294336 692258884
+118038000000 118043893804 39346000000 39347964601 691294336 693258937
+118041000000 118046893900 39347000000 39348964633 692294336 694258969
+118044000000 118049894088 39348000000 39349964696 693294336 695259032
+118047000000 118052894256 39349000000 39350964752 694294336 696259088
+118050000000 118055894392 39350000000 39351964797 695294336 697259133
+118053000000 118058894567 39351000000 39352964855 696294336 698259191
+118056000000 118061894689 39352000000 39353964896 697294336 699259232
+118059000000 118064894839 39353000000 39354964946 698294336 700259282
+118062000000 118067894987 39354000000 39355964995 699294336 701259331
+118065000000 118070895193 39355000000 39356965064 700294336 702259400
+118068000000 118073895307 39356000000 39357965102 701294336 703259438
+118071000000 118076895439 39357000000 39358965146 702294336 704259482
+118074000000 118079895613 39358000000 39359965204 703294336 705259540
+118077000000 118082895732 39359000000 39360965244 704294336 706259580
+118080000000 118085895856 39360000000 39361965285 705294336 707259621
+118083000000 118088896075 39361000000 39362965358 706294336 708259694
+118086000000 118091896211 39362000000 39363965403 707294336 709259739
+118089000000 118094896362 39363000000 39364965454 708294336 710259790
+118092000000 118097896522 39364000000 39365965507 709294336 711259843
+118095000000 118100896643 39365000000 39366965547 710294336 712259883
+118098000000 118103896724 39366000000 39367965574 711294336 713259910
+118101000000 118106896932 39367000000 39368965644 712294336 714259980
+118104000000 118109897087 39368000000 39369965695 713294336 715260031
+118107000000 118112897246 39369000000 39370965748 714294336 716260084
+118110000000 118115897398 39370000000 39371965799 715294336 717260135
+118113000000 118118897520 39371000000 39372965840 716294336 718260176
+118116000000 118121897698 39372000000 39373965899 717294336 719260235
+118119000000 118124897847 39373000000 39374965949 718294336 720260285
+118122000000 118127897975 39374000000 39375965991 719294336 721260327
+118125000000 118130898144 39375000000 39376966048 720294336 722260384
+118128000000 118133898264 39376000000 39377966088 721294336 723260424
+118131000000 118136898191 39377000000 39378966063 722294336 724260399
+118134000000 118139898514 39378000000 39379966171 723294336 725260507
+118137000000 118142898767 39379000000 39380966255 724294336 726260591
+118140000000 118145898877 39380000000 39381966292 725294336 727260628
+118143000000 118148899056 39381000000 39382966352 726294336 728260688
+118146000000 118151899104 39382000000 39383966368 727294336 729260704
+118149000000 118154899358 39383000000 39384966452 728294336 730260788
+118152000000 118157899477 39384000000 39385966492 729294336 731260828
+118155000000 118160899648 39385000000 39386966549 730294336 732260885
+118158000000 118163899795 39386000000 39387966598 731294336 733260934
+118161000000 118166899948 39387000000 39388966649 732294336 734260985
+118164000000 118169900094 39388000000 39389966698 733294336 735261034
+118167000000 118172900238 39389000000 39390966746 734294336 736261082
+118170000000 118175900401 39390000000 39391966800 735294336 737261136
+118173000000 118178900553 39391000000 39392966851 736294336 738261187
+118176000000 118181900707 39392000000 39393966902 737294336 739261238
+118179000000 118184900827 39393000000 39394966942 738294336 740261278
+118182000000 118187901036 39394000000 39395967012 739294336 741261348
+118185000000 118190901166 39395000000 39396967055 740294336 742261391
+118188000000 118193901280 39396000000 39397967093 741294336 743261429
+118191000000 118196901441 39397000000 39398967147 742294336 744261483
+118194000000 118199901576 39398000000 39399967192 743294336 745261528
+118197000000 118202901719 39399000000 39400967239 744294336 746261575
+118200000000 118205901819 39400000000 39401967273 745294336 747261609
+118203000000 118208902053 39401000000 39402967351 746294336 748261687
+118206000000 118211902126 39402000000 39403967375 747294336 749261711
+118209000000 118214902247 39403000000 39404967415 748294336 750261751
+118212000000 118217902436 39404000000 39405967478 749294336 751261814
+118215000000 118220902590 39405000000 39406967530 750294336 752261866
+118218000000 118223902769 39406000000 39407967589 751294336 753261925
+118221000000 118226902915 39407000000 39408967638 752294336 754261974
+118224000000 118229903042 39408000000 39409967680 753294336 755262016
+118227000000 118232903216 39409000000 39410967738 754294336 756262074
+118230000000 118235903280 39410000000 39411967760 755294336 757262096
+118233000000 118238903487 39411000000 39412967829 756294336 758262165
+118236000000 118241903668 39412000000 39413967889 757294336 759262225
+118239000000 118244903817 39413000000 39414967939 758294336 760262275
+118242000000 118247903874 39414000000 39415967958 759294336 761262294
+118245000000 118250904070 39415000000 39416968023 760294336 762262359
+118248000000 118253904260 39416000000 39417968086 761294336 763262422
+118251000000 118256904405 39417000000 39418968135 762294336 764262471
+118254000000 118259904577 39418000000 39419968192 763294336 765262528
+118257000000 118262904710 39419000000 39420968236 764294336 766262572
+118260000000 118265904781 39420000000 39421968260 765294336 767262596
+118263000000 118268905007 39421000000 39422968335 766294336 768262671
+118266000000 118271905167 39422000000 39423968389 767294336 769262725
+118269000000 118274905299 39423000000 39424968433 768294336 770262769
+118272000000 118277905407 39424000000 39425968469 769294336 771262805
+118275000000 118280905618 39425000000 39426968539 770294336 772262875
+118278000000 118283905784 39426000000 39427968594 771294336 773262930
+118281000000 118286905895 39427000000 39428968631 772294336 774262967
+118284000000 118289906055 39428000000 39429968685 773294336 775263021
+118287000000 118292906167 39429000000 39430968722 774294336 776263058
+118290000000 118295906365 39430000000 39431968788 775294336 777263124
+118293000000 118298906455 39431000000 39432968818 776294336 778263154
+118296000000 118301906680 39432000000 39433968893 777294336 779263229
+118299000000 118304906812 39433000000 39434968937 778294336 780263273
+118302000000 118307906951 39434000000 39435968983 779294336 781263319
+118305000000 118310907002 39435000000 39436969000 780294336 782263336
+118308000000 118313907213 39436000000 39437969071 781294336 783263407
+118311000000 118316907422 39437000000 39438969140 782294336 784263476
+118314000000 118319907550 39438000000 39439969183 783294336 785263519
diff --git a/cesar/cp/beacon/test/sync/spo_m50_snr_m03.txt b/cesar/cp/beacon/test/sync/spo_m50_snr_m03.txt
new file mode 100644
index 0000000000..33e968c3c1
--- /dev/null
+++ b/cesar/cp/beacon/test/sync/spo_m50_snr_m03.txt
@@ -0,0 +1,39439 @@
+0 7746 0 2582 0 2582
+3000000 3007867 1000000 1002622 1000000 1002622
+6000000 6007975 2000000 2002658 2000000 2002658
+9000000 9008210 3000000 3002736 3000000 3002736
+12000000 12008389 4000000 4002796 4000000 4002796
+15000000 14922029 5000000 4974009 5000000 4974009
+18000000 18008658 6000000 6002886 6000000 6002886
+21000000 21008831 7000000 7002943 7000000 7002943
+24000000 24008947 8000000 8002982 8000000 8002982
+27000000 27009120 9000000 9003040 9000000 9003040
+30000000 30009292 10000000 10003097 10000000 10003097
+33000000 33009348 11000000 11003116 11000000 11003116
+36000000 36009494 12000000 12003164 12000000 12003164
+39000000 39009690 13000000 13003230 13000000 13003230
+42000000 42009719 14000000 14003239 14000000 14003239
+45000000 45010025 15000000 15003341 15000000 15003341
+48000000 48010197 16000000 16003399 16000000 16003399
+51000000 51010330 17000000 17003443 17000000 17003443
+54000000 54010447 18000000 18003482 18000000 18003482
+57000000 57010632 19000000 19003544 19000000 19003544
+60000000 60010738 20000000 20003579 20000000 20003579
+63000000 63010919 21000000 21003639 21000000 21003639
+66000000 66011131 22000000 22003710 22000000 22003710
+69000000 69011238 23000000 23003746 23000000 23003746
+72000000 72011404 24000000 24003801 24000000 24003801
+75000000 74610149 25000000 24870049 25000000 24870049
+78000000 78011675 26000000 26003891 26000000 26003891
+81000000 81011787 27000000 27003929 27000000 27003929
+84000000 84011996 28000000 28003998 28000000 28003998
+87000000 87012075 29000000 29004025 29000000 29004025
+90000000 90012300 30000000 30004100 30000000 30004100
+93000000 93012427 31000000 31004142 31000000 31004142
+96000000 96012516 32000000 32004172 32000000 32004172
+99000000 99012622 33000000 33004207 33000000 33004207
+102000000 102012833 34000000 34004277 34000000 34004277
+105000000 105013042 35000000 35004347 35000000 35004347
+108000000 108013187 36000000 36004395 36000000 36004395
+111000000 111013313 37000000 37004437 37000000 37004437
+114000000 114013479 38000000 38004493 38000000 38004493
+117000000 117013559 39000000 39004519 39000000 39004519
+120000000 120013794 40000000 40004598 40000000 40004598
+123000000 123013953 41000000 41004651 41000000 41004651
+126000000 126014074 42000000 42004691 42000000 42004691
+129000000 129014234 43000000 43004744 43000000 43004744
+132000000 132014317 44000000 44004772 44000000 44004772
+135000000 135014563 45000000 45004854 45000000 45004854
+138000000 138014686 46000000 46004895 46000000 46004895
+141000000 141014822 47000000 47004940 47000000 47004940
+144000000 144014997 48000000 48004999 48000000 48004999
+147000000 147015119 49000000 49005039 49000000 49005039
+150000000 150015269 50000000 50005089 50000000 50005089
+153000000 153015417 51000000 51005139 51000000 51005139
+156000000 155189111 52000000 51729703 52000000 51729703
+159000000 159015737 53000000 53005245 53000000 53005245
+162000000 162015869 54000000 54005289 54000000 54005289
+165000000 165016043 55000000 55005347 55000000 55005347
+168000000 168016162 56000000 56005387 56000000 56005387
+171000000 171016286 57000000 57005428 57000000 57005428
+174000000 174016505 58000000 58005501 58000000 58005501
+177000000 177016641 59000000 59005547 59000000 59005547
+180000000 180016792 60000000 60005597 60000000 60005597
+183000000 183016942 61000000 61005647 61000000 61005647
+186000000 186017057 62000000 62005685 62000000 62005685
+189000000 189017154 63000000 63005718 63000000 63005718
+192000000 192017362 64000000 64005787 64000000 64005787
+195000000 195017517 65000000 65005839 65000000 65005839
+198000000 198017676 66000000 66005892 66000000 66005892
+201000000 201017850 67000000 67005950 67000000 67005950
+204000000 204017950 68000000 68005983 68000000 68005983
+207000000 207018128 69000000 69006042 69000000 69006042
+210000000 210018277 70000000 70006092 70000000 70006092
+213000000 213018405 71000000 71006135 71000000 71006135
+216000000 216018574 72000000 72006191 72000000 72006191
+219000000 219018694 73000000 73006231 73000000 73006231
+222000000 220846044 74000000 73615348 74000000 73615348
+225000000 225018944 75000000 75006314 75000000 75006314
+228000000 228019202 76000000 76006400 76000000 76006400
+231000000 231019307 77000000 77006435 77000000 77006435
+234000000 234019387 78000000 78006462 78000000 78006462
+237000000 237019534 79000000 79006511 79000000 79006511
+240000000 240019788 80000000 80006596 80000000 80006596
+243000000 243019878 81000000 81006626 81000000 81006626
+246000000 246020123 82000000 82006707 82000000 82006707
+249000000 249020201 83000000 83006733 83000000 83006733
+252000000 252020378 84000000 84006792 84000000 84006792
+255000000 255020524 85000000 85006841 85000000 85006841
+258000000 258020668 86000000 86006889 86000000 86006889
+261000000 259643322 87000000 86547774 87000000 86547774
+264000000 264020983 88000000 88006994 88000000 88006994
+267000000 267021143 89000000 89007047 89000000 89007047
+270000000 270021280 90000000 90007093 90000000 90007093
+273000000 273021438 91000000 91007146 91000000 91007146
+276000000 276021596 92000000 92007198 92000000 92007198
+279000000 279021710 93000000 93007236 93000000 93007236
+282000000 282021871 94000000 94007290 94000000 94007290
+285000000 285021998 95000000 95007332 95000000 95007332
+288000000 288022107 96000000 96007369 96000000 96007369
+291000000 291022249 97000000 97007416 97000000 97007416
+294000000 294022483 98000000 98007494 98000000 98007494
+297000000 297022396 99000000 99007465 99000000 99007465
+300000000 300022517 100000000 100007505 100000000 100007505
+303000000 303022625 101000000 101007541 101000000 101007541
+306000000 306022860 102000000 102007620 102000000 102007620
+309000000 309023039 103000000 103007679 103000000 103007679
+312000000 311936679 104000000 103978893 104000000 103978893
+315000000 315023308 105000000 105007769 105000000 105007769
+318000000 318023481 106000000 106007827 106000000 106007827
+321000000 321023597 107000000 107007865 107000000 107007865
+324000000 324023770 108000000 108007923 108000000 108007923
+327000000 327023942 109000000 109007980 109000000 109007980
+330000000 330023998 110000000 110007999 110000000 110007999
+333000000 333024144 111000000 111008048 111000000 111008048
+336000000 336024340 112000000 112008113 112000000 112008113
+339000000 339024369 113000000 113008123 113000000 113008123
+342000000 342024675 114000000 114008225 114000000 114008225
+345000000 345024847 115000000 115008282 115000000 115008282
+348000000 348024980 116000000 116008326 116000000 116008326
+351000000 351025097 117000000 117008365 117000000 117008365
+354000000 354025282 118000000 118008427 118000000 118008427
+357000000 357025388 119000000 119008462 119000000 119008462
+360000000 360025569 120000000 120008523 120000000 120008523
+363000000 363025781 121000000 121008593 121000000 121008593
+366000000 366025888 122000000 122008629 122000000 122008629
+369000000 369026054 123000000 123008684 123000000 123008684
+372000000 371624799 124000000 123874933 124000000 123874933
+375000000 375026325 125000000 125008775 125000000 125008775
+378000000 378026437 126000000 126008812 126000000 126008812
+381000000 381026646 127000000 127008882 127000000 127008882
+384000000 384026725 128000000 128008908 128000000 128008908
+387000000 387026950 129000000 129008983 129000000 129008983
+390000000 390027077 130000000 130009025 130000000 130009025
+393000000 393027166 131000000 131009055 131000000 131009055
+396000000 396027272 132000000 132009090 132000000 132009090
+399000000 399027483 133000000 133009161 133000000 133009161
+402000000 402027692 134000000 134009230 134000000 134009230
+405000000 405027837 135000000 135009279 135000000 135009279
+408000000 408027963 136000000 136009321 136000000 136009321
+411000000 411028129 137000000 137009376 137000000 137009376
+414000000 414028209 138000000 138009403 138000000 138009403
+417000000 417028444 139000000 139009481 139000000 139009481
+420000000 420028603 140000000 140009534 140000000 140009534
+423000000 423028724 141000000 141009574 141000000 141009574
+426000000 426028884 142000000 142009628 142000000 142009628
+429000000 429028967 143000000 143009655 143000000 143009655
+432000000 432029213 144000000 144009737 144000000 144009737
+435000000 435029336 145000000 145009778 145000000 145009778
+438000000 438029472 146000000 146009824 146000000 146009824
+441000000 441029647 147000000 147009882 147000000 147009882
+444000000 444029769 148000000 148009923 148000000 148009923
+447000000 447029919 149000000 149009973 149000000 149009973
+450000000 450030067 150000000 150010022 150000000 150010022
+453000000 452203761 151000000 150734587 151000000 150734587
+456000000 456030387 152000000 152010129 152000000 152010129
+459000000 459030519 153000000 153010173 153000000 153010173
+462000000 462030693 154000000 154010231 154000000 154010231
+465000000 465030812 155000000 155010270 155000000 155010270
+468000000 468030936 156000000 156010312 156000000 156010312
+471000000 471031155 157000000 157010385 157000000 157010385
+474000000 474031291 158000000 158010430 158000000 158010430
+477000000 477031442 159000000 159010480 159000000 159010480
+480000000 480031592 160000000 160010530 160000000 160010530
+483000000 483031707 161000000 161010569 161000000 161010569
+486000000 486031804 162000000 162010601 162000000 162010601
+489000000 489032012 163000000 163010670 163000000 163010670
+492000000 492032167 164000000 164010722 164000000 164010722
+495000000 495032326 165000000 165010775 165000000 165010775
+498000000 498032500 166000000 166010833 166000000 166010833
+501000000 501032600 167000000 167010866 167000000 167010866
+504000000 504032778 168000000 168010926 168000000 168010926
+507000000 507032927 169000000 169010975 169000000 169010975
+510000000 510033055 170000000 170011018 170000000 170011018
+513000000 513033224 171000000 171011074 171000000 171011074
+516000000 516033344 172000000 172011114 172000000 172011114
+519000000 517860694 173000000 172620231 173000000 172620231
+522000000 522033594 174000000 174011198 174000000 174011198
+525000000 525033852 175000000 175011284 175000000 175011284
+528000000 528033957 176000000 176011319 176000000 176011319
+531000000 531034037 177000000 177011345 177000000 177011345
+534000000 534034184 178000000 178011394 178000000 178011394
+537000000 537034438 179000000 179011479 179000000 179011479
+540000000 540034528 180000000 180011509 180000000 180011509
+543000000 543034773 181000000 181011591 181000000 181011591
+546000000 546034851 182000000 182011617 182000000 182011617
+549000000 549035028 183000000 183011676 183000000 183011676
+552000000 552035174 184000000 184011724 184000000 184011724
+555000000 555035318 185000000 185011772 185000000 185011772
+558000000 556657972 186000000 185552657 186000000 185552657
+561000000 561035633 187000000 187011877 187000000 187011877
+564000000 564035793 188000000 188011931 188000000 188011931
+567000000 567035930 189000000 189011976 189000000 189011976
+570000000 570036088 190000000 190012029 190000000 190012029
+573000000 573036246 191000000 191012082 191000000 191012082
+576000000 576036360 192000000 192012120 192000000 192012120
+579000000 579036521 193000000 193012173 193000000 193012173
+582000000 582036648 194000000 194012216 194000000 194012216
+585000000 585036757 195000000 195012252 195000000 195012252
+588000000 588036899 196000000 196012299 196000000 196012299
+591000000 591037133 197000000 197012377 197000000 197012377
+594000000 594037046 198000000 198012348 198000000 198012348
+597000000 597037167 199000000 199012389 199000000 199012389
+600000000 600037275 200000000 200012425 200000000 200012425
+603000000 603037510 201000000 201012503 201000000 201012503
+606000000 606037689 202000000 202012563 202000000 202012563
+609000000 608951329 203000000 202983776 203000000 202983776
+612000000 612037958 204000000 204012652 204000000 204012652
+615000000 615038131 205000000 205012710 205000000 205012710
+618000000 618038247 206000000 206012749 206000000 206012749
+621000000 621038420 207000000 207012806 207000000 207012806
+624000000 624038592 208000000 208012864 208000000 208012864
+627000000 627038648 209000000 209012882 209000000 209012882
+630000000 630038794 210000000 210012931 210000000 210012931
+633000000 633038990 211000000 211012996 211000000 211012996
+636000000 636039019 212000000 212013006 212000000 212013006
+639000000 639039325 213000000 213013108 213000000 213013108
+642000000 642039497 214000000 214013165 214000000 214013165
+645000000 645039630 215000000 215013210 215000000 215013210
+648000000 648039747 216000000 216013249 216000000 216013249
+651000000 651039932 217000000 217013310 217000000 217013310
+654000000 654040038 218000000 218013346 218000000 218013346
+657000000 657040219 219000000 219013406 219000000 219013406
+660000000 660040431 220000000 220013477 220000000 220013477
+663000000 663040538 221000000 221013512 221000000 221013512
+666000000 666040704 222000000 222013568 222000000 222013568
+669000000 668639449 223000000 222879816 223000000 222879816
+672000000 672040975 224000000 224013658 224000000 224013658
+675000000 675041087 225000000 225013695 225000000 225013695
+678000000 678041296 226000000 226013765 226000000 226013765
+681000000 681041375 227000000 227013791 227000000 227013791
+684000000 684041600 228000000 228013866 228000000 228013866
+687000000 687041727 229000000 229013909 229000000 229013909
+690000000 690041816 230000000 230013938 230000000 230013938
+693000000 693041922 231000000 231013974 231000000 231013974
+696000000 696042133 232000000 232014044 232000000 232014044
+699000000 699042342 233000000 233014114 233000000 233014114
+702000000 702042487 234000000 234014162 234000000 234014162
+705000000 705042613 235000000 235014204 235000000 235014204
+708000000 708042779 236000000 236014259 236000000 236014259
+711000000 711042859 237000000 237014286 237000000 237014286
+714000000 714043094 238000000 238014364 238000000 238014364
+717000000 717043253 239000000 239014417 239000000 239014417
+720000000 720043374 240000000 240014458 240000000 240014458
+723000000 723043534 241000000 241014511 241000000 241014511
+726000000 726043617 242000000 242014539 242000000 242014539
+729000000 729043863 243000000 243014621 243000000 243014621
+732000000 732043986 244000000 244014662 244000000 244014662
+735000000 735044122 245000000 245014707 245000000 245014707
+738000000 738044297 246000000 246014765 246000000 246014765
+741000000 741044419 247000000 247014806 247000000 247014806
+744000000 744044569 248000000 248014856 248000000 248014856
+747000000 747044717 249000000 249014905 249000000 249014905
+750000000 749218411 250000000 249739470 250000000 249739470
+753000000 753045037 251000000 251015012 251000000 251015012
+756000000 756045169 252000000 252015056 252000000 252015056
+759000000 759045343 253000000 253015114 253000000 253015114
+762000000 762045462 254000000 254015154 254000000 254015154
+765000000 765045586 255000000 255015195 255000000 255015195
+768000000 768045805 256000000 256015268 256000000 256015268
+771000000 771045941 257000000 257015313 257000000 257015313
+774000000 774046092 258000000 258015364 258000000 258015364
+777000000 777046242 259000000 259015414 259000000 259015414
+780000000 780046357 260000000 260015452 260000000 260015452
+783000000 783046454 261000000 261015484 261000000 261015484
+786000000 786046662 262000000 262015554 262000000 262015554
+789000000 789046817 263000000 263015605 263000000 263015605
+792000000 792046976 264000000 264015658 264000000 264015658
+795000000 795047150 265000000 265015716 265000000 265015716
+798000000 798047250 266000000 266015750 266000000 266015750
+801000000 801047428 267000000 267015809 267000000 267015809
+804000000 804047577 268000000 268015859 268000000 268015859
+807000000 807047705 269000000 269015901 269000000 269015901
+810000000 810047874 270000000 270015958 270000000 270015958
+813000000 813047994 271000000 271015998 271000000 271015998
+816000000 814875344 272000000 271625114 272000000 271625114
+819000000 819048244 273000000 273016081 273000000 273016081
+822000000 822048502 274000000 274016167 274000000 274016167
+825000000 825048607 275000000 275016202 275000000 275016202
+828000000 828048687 276000000 276016229 276000000 276016229
+831000000 831048834 277000000 277016278 277000000 277016278
+834000000 834049088 278000000 278016362 278000000 278016362
+837000000 837049178 279000000 279016392 279000000 279016392
+840000000 840049423 280000000 280016474 280000000 280016474
+843000000 843049501 281000000 281016500 281000000 281016500
+846000000 846049678 282000000 282016559 282000000 282016559
+849000000 849049824 283000000 283016608 283000000 283016608
+852000000 852049968 284000000 284016656 284000000 284016656
+855000000 853672622 285000000 284557540 285000000 284557540
+858000000 858050283 286000000 286016761 286000000 286016761
+861000000 861050443 287000000 287016814 287000000 287016814
+864000000 864050580 288000000 288016860 288000000 288016860
+867000000 867050738 289000000 289016912 289000000 289016912
+870000000 870050896 290000000 290016965 290000000 290016965
+873000000 873051010 291000000 291017003 291000000 291017003
+876000000 876051171 292000000 292017057 292000000 292017057
+879000000 879051298 293000000 293017099 293000000 293017099
+882000000 882051407 294000000 294017135 294000000 294017135
+885000000 885051549 295000000 295017183 295000000 295017183
+888000000 888051783 296000000 296017261 296000000 296017261
+891000000 891051696 297000000 297017232 297000000 297017232
+894000000 894051817 298000000 298017272 298000000 298017272
+897000000 897051925 299000000 299017308 299000000 299017308
+900000000 900052160 300000000 300017386 300000000 300017386
+903000000 903052339 301000000 301017446 301000000 301017446
+906000000 905965979 302000000 301988659 302000000 301988659
+909000000 909052608 303000000 303017536 303000000 303017536
+912000000 912052781 304000000 304017593 304000000 304017593
+915000000 915052897 305000000 305017632 305000000 305017632
+918000000 918053070 306000000 306017690 306000000 306017690
+921000000 921053242 307000000 307017747 307000000 307017747
+924000000 924053298 308000000 308017766 308000000 308017766
+927000000 927053444 309000000 309017814 309000000 309017814
+930000000 930053640 310000000 310017880 310000000 310017880
+933000000 933053669 311000000 311017889 311000000 311017889
+936000000 936053975 312000000 312017991 312000000 312017991
+939000000 939054147 313000000 313018049 313000000 313018049
+942000000 942054280 314000000 314018093 314000000 314018093
+945000000 945054397 315000000 315018132 315000000 315018132
+948000000 948054582 316000000 316018194 316000000 316018194
+951000000 951054688 317000000 317018229 317000000 317018229
+954000000 954054869 318000000 318018289 318000000 318018289
+957000000 957055081 319000000 319018360 319000000 319018360
+960000000 960055188 320000000 320018396 320000000 320018396
+963000000 963055354 321000000 321018451 321000000 321018451
+966000000 965654099 322000000 321884699 322000000 321884699
+969000000 969055625 323000000 323018541 323000000 323018541
+972000000 972055737 324000000 324018579 324000000 324018579
+975000000 975055946 325000000 325018648 325000000 325018648
+978000000 978056025 326000000 326018675 326000000 326018675
+981000000 981056250 327000000 327018750 327000000 327018750
+984000000 984056377 328000000 328018792 328000000 328018792
+987000000 987056466 329000000 329018822 329000000 329018822
+990000000 990056572 330000000 330018857 330000000 330018857
+993000000 993056783 331000000 331018927 331000000 331018927
+996000000 996056992 332000000 332018997 332000000 332018997
+999000000 999057137 333000000 333019045 333000000 333019045
+1002000000 1002057263 334000000 334019087 334000000 334019087
+1005000000 1005057429 335000000 335019143 335000000 335019143
+1008000000 1008057509 336000000 336019169 336000000 336019169
+1011000000 1011057744 337000000 337019248 337000000 337019248
+1014000000 1014057903 338000000 338019301 338000000 338019301
+1017000000 1017058024 339000000 339019341 339000000 339019341
+1020000000 1020058184 340000000 340019394 340000000 340019394
+1023000000 1023058267 341000000 341019422 341000000 341019422
+1026000000 1026058513 342000000 342019504 342000000 342019504
+1029000000 1029058636 343000000 343019545 343000000 343019545
+1032000000 1032058772 344000000 344019590 344000000 344019590
+1035000000 1035058947 345000000 345019649 345000000 345019649
+1038000000 1038059069 346000000 346019689 346000000 346019689
+1041000000 1041059219 347000000 347019739 347000000 347019739
+1044000000 1044059367 348000000 348019789 348000000 348019789
+1047000000 1046233061 349000000 348744353 349000000 348744353
+1050000000 1050059687 350000000 350019895 350000000 350019895
+1053000000 1053059819 351000000 351019939 351000000 351019939
+1056000000 1056059993 352000000 352019997 352000000 352019997
+1059000000 1059060112 353000000 353020037 353000000 353020037
+1062000000 1062060236 354000000 354020078 354000000 354020078
+1065000000 1065060455 355000000 355020151 355000000 355020151
+1068000000 1068060591 356000000 356020197 356000000 356020197
+1071000000 1071060742 357000000 357020247 357000000 357020247
+1074000000 1074060892 358000000 358020297 358000000 358020297
+1077000000 1077061007 359000000 359020335 359000000 359020335
+1080000000 1080061104 360000000 360020368 360000000 360020368
+1083000000 1083061312 361000000 361020437 361000000 361020437
+1086000000 1086061467 362000000 362020489 362000000 362020489
+1089000000 1089061626 363000000 363020542 363000000 363020542
+1092000000 1092061800 364000000 364020600 364000000 364020600
+1095000000 1095061900 365000000 365020633 365000000 365020633
+1098000000 1098062078 366000000 366020692 366000000 366020692
+1101000000 1101062227 367000000 367020742 367000000 367020742
+1104000000 1104062355 368000000 368020785 368000000 368020785
+1107000000 1107062524 369000000 369020841 369000000 369020841
+1110000000 1110062644 370000000 370020881 370000000 370020881
+1113000000 1111889994 371000000 370629998 371000000 370629998
+1116000000 1116062894 372000000 372020964 372000000 372020964
+1119000000 1119063152 373000000 373021050 373000000 373021050
+1122000000 1122063257 374000000 374021085 374000000 374021085
+1125000000 1125063337 375000000 375021112 375000000 375021112
+1128000000 1128063484 376000000 376021161 376000000 376021161
+1131000000 1131063738 377000000 377021246 377000000 377021246
+1134000000 1134063828 378000000 378021276 378000000 378021276
+1137000000 1137064073 379000000 379021357 379000000 379021357
+1140000000 1140064151 380000000 380021383 380000000 380021383
+1143000000 1143064328 381000000 381021442 381000000 381021442
+1146000000 1146064474 382000000 382021491 382000000 382021491
+1149000000 1149064618 383000000 383021539 383000000 383021539
+1152000000 1150687272 384000000 383562424 384000000 383562424
+1155000000 1155064933 385000000 385021644 385000000 385021644
+1158000000 1158065093 386000000 386021697 386000000 386021697
+1161000000 1161065230 387000000 387021743 387000000 387021743
+1164000000 1164065388 388000000 388021796 388000000 388021796
+1167000000 1167065546 389000000 389021848 389000000 389021848
+1170000000 1170065660 390000000 390021886 390000000 390021886
+1173000000 1173065821 391000000 391021940 391000000 391021940
+1176000000 1176065948 392000000 392021982 392000000 392021982
+1179000000 1179066057 393000000 393022019 393000000 393022019
+1182000000 1182066199 394000000 394022066 394000000 394022066
+1185000000 1185066433 395000000 395022144 395000000 395022144
+1188000000 1188066346 396000000 396022115 396000000 396022115
+1191000000 1191066467 397000000 397022155 397000000 397022155
+1194000000 1194066575 398000000 398022191 398000000 398022191
+1197000000 1197066810 399000000 399022270 399000000 399022270
+1200000000 1200066989 400000000 400022329 400000000 400022329
+1203000000 1202980629 401000000 400993543 401000000 400993543
+1206000000 1206067258 402000000 402022419 402000000 402022419
+1209000000 1209067431 403000000 403022477 403000000 403022477
+1212000000 1212067547 404000000 404022515 404000000 404022515
+1215000000 1215067720 405000000 405022573 405000000 405022573
+1218000000 1218067892 406000000 406022630 406000000 406022630
+1221000000 1221067948 407000000 407022649 407000000 407022649
+1224000000 1224068094 408000000 408022698 408000000 408022698
+1227000000 1227068290 409000000 409022763 409000000 409022763
+1230000000 1230068319 410000000 410022773 410000000 410022773
+1233000000 1233068625 411000000 411022875 411000000 411022875
+1236000000 1236068797 412000000 412022932 412000000 412022932
+1239000000 1239068930 413000000 413022976 413000000 413022976
+1242000000 1242069047 414000000 414023015 414000000 414023015
+1245000000 1245069232 415000000 415023077 415000000 415023077
+1248000000 1248069338 416000000 416023112 416000000 416023112
+1251000000 1251069519 417000000 417023173 417000000 417023173
+1254000000 1254069731 418000000 418023243 418000000 418023243
+1257000000 1257069838 419000000 419023279 419000000 419023279
+1260000000 1260070004 420000000 420023334 420000000 420023334
+1263000000 1262668749 421000000 420889583 421000000 420889583
+1266000000 1266070275 422000000 422023425 422000000 422023425
+1269000000 1269070387 423000000 423023462 423000000 423023462
+1272000000 1272070596 424000000 424023532 424000000 424023532
+1275000000 1275070675 425000000 425023558 425000000 425023558
+1278000000 1278070900 426000000 426023633 426000000 426023633
+1281000000 1281071027 427000000 427023675 427000000 427023675
+1284000000 1284071116 428000000 428023705 428000000 428023705
+1287000000 1287071222 429000000 429023740 429000000 429023740
+1290000000 1290071433 430000000 430023811 430000000 430023811
+1293000000 1293071642 431000000 431023880 431000000 431023880
+1296000000 1296071787 432000000 432023929 432000000 432023929
+1299000000 1299071913 433000000 433023971 433000000 433023971
+1302000000 1302072079 434000000 434024026 434000000 434024026
+1305000000 1305072159 435000000 435024053 435000000 435024053
+1308000000 1308072394 436000000 436024131 436000000 436024131
+1311000000 1311072553 437000000 437024184 437000000 437024184
+1314000000 1314072674 438000000 438024224 438000000 438024224
+1317000000 1317072834 439000000 439024278 439000000 439024278
+1320000000 1320072917 440000000 440024305 440000000 440024305
+1323000000 1323073163 441000000 441024387 441000000 441024387
+1326000000 1326073286 442000000 442024428 442000000 442024428
+1329000000 1329073422 443000000 443024474 443000000 443024474
+1332000000 1332073597 444000000 444024532 444000000 444024532
+1335000000 1335073719 445000000 445024573 445000000 445024573
+1338000000 1338073869 446000000 446024623 446000000 446024623
+1341000000 1341074017 447000000 447024672 447000000 447024672
+1344000000 1343247711 448000000 447749237 448000000 447749237
+1347000000 1347074337 449000000 449024779 449000000 449024779
+1350000000 1350074469 450000000 450024823 450000000 450024823
+1353000000 1353074643 451000000 451024881 451000000 451024881
+1356000000 1356074762 452000000 452024920 452000000 452024920
+1359000000 1359074886 453000000 453024962 453000000 453024962
+1362000000 1362075105 454000000 454025035 454000000 454025035
+1365000000 1365075241 455000000 455025080 455000000 455025080
+1368000000 1368075392 456000000 456025130 456000000 456025130
+1371000000 1371075542 457000000 457025180 457000000 457025180
+1374000000 1374075657 458000000 458025219 458000000 458025219
+1377000000 1377075754 459000000 459025251 459000000 459025251
+1380000000 1380075962 460000000 460025320 460000000 460025320
+1383000000 1383076117 461000000 461025372 461000000 461025372
+1386000000 1386076276 462000000 462025425 462000000 462025425
+1389000000 1389076450 463000000 463025483 463000000 463025483
+1392000000 1392076550 464000000 464025516 464000000 464025516
+1395000000 1395076728 465000000 465025576 465000000 465025576
+1398000000 1398076877 466000000 466025625 466000000 466025625
+1401000000 1401077005 467000000 467025668 467000000 467025668
+1404000000 1404077174 468000000 468025724 468000000 468025724
+1407000000 1407077294 469000000 469025764 469000000 469025764
+1410000000 1408904644 470000000 469634881 470000000 469634881
+1413000000 1413077544 471000000 471025848 471000000 471025848
+1416000000 1416077802 472000000 472025934 472000000 472025934
+1419000000 1419077907 473000000 473025969 473000000 473025969
+1422000000 1422077987 474000000 474025995 474000000 474025995
+1425000000 1425078134 475000000 475026044 475000000 475026044
+1428000000 1428078388 476000000 476026129 476000000 476026129
+1431000000 1431078478 477000000 477026159 477000000 477026159
+1434000000 1434078723 478000000 478026241 478000000 478026241
+1437000000 1437078801 479000000 479026267 479000000 479026267
+1440000000 1440078978 480000000 480026326 480000000 480026326
+1443000000 1443079124 481000000 481026374 481000000 481026374
+1446000000 1446079268 482000000 482026422 482000000 482026422
+1449000000 1447701922 483000000 482567307 483000000 482567307
+1452000000 1452079583 484000000 484026527 484000000 484026527
+1455000000 1455079743 485000000 485026581 485000000 485026581
+1458000000 1458079880 486000000 486026626 486000000 486026626
+1461000000 1461080038 487000000 487026679 487000000 487026679
+1464000000 1464080196 488000000 488026732 488000000 488026732
+1467000000 1467080310 489000000 489026770 489000000 489026770
+1470000000 1470080471 490000000 490026823 490000000 490026823
+1473000000 1473080598 491000000 491026866 491000000 491026866
+1476000000 1476080707 492000000 492026902 492000000 492026902
+1479000000 1479080849 493000000 493026949 493000000 493026949
+1482000000 1482081083 494000000 494027027 494000000 494027027
+1485000000 1485080996 495000000 495026998 495000000 495026998
+1488000000 1488081117 496000000 496027039 496000000 496027039
+1491000000 1491081225 497000000 497027075 497000000 497027075
+1494000000 1494081460 498000000 498027153 498000000 498027153
+1497000000 1497081639 499000000 499027213 499000000 499027213
+1500000000 1499995279 500000000 499998426 500000000 499998426
+1503000000 1503081908 501000000 501027302 501000000 501027302
+1506000000 1506082081 502000000 502027360 502000000 502027360
+1509000000 1509082197 503000000 503027399 503000000 503027399
+1512000000 1512082370 504000000 504027456 504000000 504027456
+1515000000 1515082542 505000000 505027514 505000000 505027514
+1518000000 1518082598 506000000 506027532 506000000 506027532
+1521000000 1521082744 507000000 507027581 507000000 507027581
+1524000000 1524082940 508000000 508027646 508000000 508027646
+1527000000 1527082969 509000000 509027656 509000000 509027656
+1530000000 1530083275 510000000 510027758 510000000 510027758
+1533000000 1533083447 511000000 511027815 511000000 511027815
+1536000000 1536083580 512000000 512027860 512000000 512027860
+1539000000 1539083697 513000000 513027899 513000000 513027899
+1542000000 1542083882 514000000 514027960 514000000 514027960
+1545000000 1545083988 515000000 515027996 515000000 515027996
+1548000000 1548084169 516000000 516028056 516000000 516028056
+1551000000 1551084381 517000000 517028127 517000000 517028127
+1554000000 1554084488 518000000 518028162 518000000 518028162
+1557000000 1557084654 519000000 519028218 519000000 519028218
+1560000000 1559683399 520000000 519894466 520000000 519894466
+1563000000 1563084925 521000000 521028308 521000000 521028308
+1566000000 1566085037 522000000 522028345 522000000 522028345
+1569000000 1569085246 523000000 523028415 523000000 523028415
+1572000000 1572085325 524000000 524028441 524000000 524028441
+1575000000 1575085550 525000000 525028516 525000000 525028516
+1578000000 1578085677 526000000 526028559 526000000 526028559
+1581000000 1581085766 527000000 527028588 527000000 527028588
+1584000000 1584085872 528000000 528028624 528000000 528028624
+1587000000 1587086083 529000000 529028694 529000000 529028694
+1590000000 1590086292 530000000 530028764 530000000 530028764
+1593000000 1593086437 531000000 531028812 531000000 531028812
+1596000000 1596086563 532000000 532028854 532000000 532028854
+1599000000 1599086729 533000000 533028909 533000000 533028909
+1602000000 1602086809 534000000 534028936 534000000 534028936
+1605000000 1605087044 535000000 535029014 535000000 535029014
+1608000000 1608087203 536000000 536029067 536000000 536029067
+1611000000 1611087324 537000000 537029108 537000000 537029108
+1614000000 1614087484 538000000 538029161 538000000 538029161
+1617000000 1617087567 539000000 539029189 539000000 539029189
+1620000000 1620087813 540000000 540029271 540000000 540029271
+1623000000 1623087936 541000000 541029312 541000000 541029312
+1626000000 1626088072 542000000 542029357 542000000 542029357
+1629000000 1629088247 543000000 543029415 543000000 543029415
+1632000000 1632088369 544000000 544029456 544000000 544029456
+1635000000 1635088519 545000000 545029506 545000000 545029506
+1638000000 1638088667 546000000 546029555 546000000 546029555
+1641000000 1640262361 547000000 546754120 547000000 546754120
+1644000000 1644088987 548000000 548029662 548000000 548029662
+1647000000 1647089119 549000000 549029706 549000000 549029706
+1650000000 1650089293 550000000 550029764 550000000 550029764
+1653000000 1653089412 551000000 551029804 551000000 551029804
+1656000000 1656089536 552000000 552029845 552000000 552029845
+1659000000 1659089755 553000000 553029918 553000000 553029918
+1662000000 1662089891 554000000 554029963 554000000 554029963
+1665000000 1665090042 555000000 555030014 555000000 555030014
+1668000000 1668090192 556000000 556030064 556000000 556030064
+1671000000 1671090307 557000000 557030102 557000000 557030102
+1674000000 1674090404 558000000 558030134 558000000 558030134
+1677000000 1677090612 559000000 559030204 559000000 559030204
+1680000000 1680090767 560000000 560030255 560000000 560030255
+1683000000 1683090926 561000000 561030308 561000000 561030308
+1686000000 1686091100 562000000 562030366 562000000 562030366
+1689000000 1689091200 563000000 563030400 563000000 563030400
+1692000000 1692091378 564000000 564030459 564000000 564030459
+1695000000 1695091527 565000000 565030509 565000000 565030509
+1698000000 1698091655 566000000 566030551 566000000 566030551
+1701000000 1701091824 567000000 567030608 567000000 567030608
+1704000000 1704091944 568000000 568030648 568000000 568030648
+1707000000 1705919294 569000000 568639764 569000000 568639764
+1710000000 1710092194 570000000 570030731 570000000 570030731
+1713000000 1713092452 571000000 571030817 571000000 571030817
+1716000000 1716092557 572000000 572030852 572000000 572030852
+1719000000 1719092637 573000000 573030879 573000000 573030879
+1722000000 1722092784 574000000 574030928 574000000 574030928
+1725000000 1725093038 575000000 575031012 575000000 575031012
+1728000000 1728093128 576000000 576031042 576000000 576031042
+1731000000 1731093373 577000000 577031124 577000000 577031124
+1734000000 1734093451 578000000 578031150 578000000 578031150
+1737000000 1737093628 579000000 579031209 579000000 579031209
+1740000000 1740093774 580000000 580031258 580000000 580031258
+1743000000 1743093918 581000000 581031306 581000000 581031306
+1746000000 1744716572 582000000 581572190 582000000 581572190
+1749000000 1749094233 583000000 583031411 583000000 583031411
+1752000000 1752094393 584000000 584031464 584000000 584031464
+1755000000 1755094530 585000000 585031510 585000000 585031510
+1758000000 1758094688 586000000 586031562 586000000 586031562
+1761000000 1761094846 587000000 587031615 587000000 587031615
+1764000000 1764094960 588000000 588031653 588000000 588031653
+1767000000 1767095121 589000000 589031707 589000000 589031707
+1770000000 1770095248 590000000 590031749 590000000 590031749
+1773000000 1773095357 591000000 591031785 591000000 591031785
+1776000000 1776095499 592000000 592031833 592000000 592031833
+1779000000 1779095733 593000000 593031911 593000000 593031911
+1782000000 1782095646 594000000 594031882 594000000 594031882
+1785000000 1785095767 595000000 595031922 595000000 595031922
+1788000000 1788095875 596000000 596031958 596000000 596031958
+1791000000 1791096110 597000000 597032036 597000000 597032036
+1794000000 1794096289 598000000 598032096 598000000 598032096
+1797000000 1797009929 599000000 599003309 599000000 599003309
+1800000000 1800096558 600000000 600032186 600000000 600032186
+1803000000 1803096731 601000000 601032243 601000000 601032243
+1806000000 1806096847 602000000 602032282 602000000 602032282
+1809000000 1809097020 603000000 603032340 603000000 603032340
+1812000000 1812097192 604000000 604032397 604000000 604032397
+1815000000 1815097248 605000000 605032416 605000000 605032416
+1818000000 1818097394 606000000 606032464 606000000 606032464
+1821000000 1821097590 607000000 607032530 607000000 607032530
+1824000000 1824097619 608000000 608032539 608000000 608032539
+1827000000 1827097925 609000000 609032641 609000000 609032641
+1830000000 1830098097 610000000 610032699 610000000 610032699
+1833000000 1833098230 611000000 611032743 611000000 611032743
+1836000000 1836098347 612000000 612032782 612000000 612032782
+1839000000 1839098532 613000000 613032844 613000000 613032844
+1842000000 1842098638 614000000 614032879 614000000 614032879
+1845000000 1845098819 615000000 615032939 615000000 615032939
+1848000000 1848099031 616000000 616033010 616000000 616033010
+1851000000 1851099138 617000000 617033046 617000000 617033046
+1854000000 1854099304 618000000 618033101 618000000 618033101
+1857000000 1856698049 619000000 618899349 619000000 618899349
+1860000000 1860099575 620000000 620033191 620000000 620033191
+1863000000 1863099687 621000000 621033229 621000000 621033229
+1866000000 1866099896 622000000 622033298 622000000 622033298
+1869000000 1869099975 623000000 623033325 623000000 623033325
+1872000000 1872100200 624000000 624033400 624000000 624033400
+1875000000 1875100327 625000000 625033442 625000000 625033442
+1878000000 1878100416 626000000 626033472 626000000 626033472
+1881000000 1881100522 627000000 627033507 627000000 627033507
+1884000000 1884100733 628000000 628033577 628000000 628033577
+1887000000 1887100942 629000000 629033647 629000000 629033647
+1890000000 1890101087 630000000 630033695 630000000 630033695
+1893000000 1893101213 631000000 631033737 631000000 631033737
+1896000000 1896101379 632000000 632033793 632000000 632033793
+1899000000 1899101459 633000000 633033819 633000000 633033819
+1902000000 1902101694 634000000 634033898 634000000 634033898
+1905000000 1905101853 635000000 635033951 635000000 635033951
+1908000000 1908101974 636000000 636033991 636000000 636033991
+1911000000 1911102134 637000000 637034044 637000000 637034044
+1914000000 1914102217 638000000 638034072 638000000 638034072
+1917000000 1917102463 639000000 639034154 639000000 639034154
+1920000000 1920102586 640000000 640034195 640000000 640034195
+1923000000 1923102722 641000000 641034240 641000000 641034240
+1926000000 1926102897 642000000 642034299 642000000 642034299
+1929000000 1929103019 643000000 643034339 643000000 643034339
+1932000000 1932103169 644000000 644034389 644000000 644034389
+1935000000 1935103317 645000000 645034439 645000000 645034439
+1938000000 1937277011 646000000 645759003 646000000 645759003
+1941000000 1941103637 647000000 647034545 647000000 647034545
+1944000000 1944103769 648000000 648034589 648000000 648034589
+1947000000 1947103943 649000000 649034647 649000000 649034647
+1950000000 1950104062 650000000 650034687 650000000 650034687
+1953000000 1953104186 651000000 651034728 651000000 651034728
+1956000000 1956104405 652000000 652034801 652000000 652034801
+1959000000 1959104541 653000000 653034847 653000000 653034847
+1962000000 1962104692 654000000 654034897 654000000 654034897
+1965000000 1965104842 655000000 655034947 655000000 655034947
+1968000000 1968104957 656000000 656034985 656000000 656034985
+1971000000 1971105054 657000000 657035018 657000000 657035018
+1974000000 1974105262 658000000 658035087 658000000 658035087
+1977000000 1977105417 659000000 659035139 659000000 659035139
+1980000000 1980105576 660000000 660035192 660000000 660035192
+1983000000 1983105750 661000000 661035250 661000000 661035250
+1986000000 1986105850 662000000 662035283 662000000 662035283
+1989000000 1989106028 663000000 663035342 663000000 663035342
+1992000000 1992106177 664000000 664035392 664000000 664035392
+1995000000 1995106305 665000000 665035435 665000000 665035435
+1998000000 1998106474 666000000 666035491 666000000 666035491
+2001000000 2001106594 667000000 667035531 667000000 667035531
+2004000000 2002933944 668000000 667644648 668000000 667644648
+2007000000 2007106844 669000000 669035614 669000000 669035614
+2010000000 2010107102 670000000 670035700 670000000 670035700
+2013000000 2013107207 671000000 671035735 671000000 671035735
+2016000000 2016107287 672000000 672035762 672000000 672035762
+2019000000 2019107434 673000000 673035811 673000000 673035811
+2022000000 2022107688 674000000 674035896 674000000 674035896
+2025000000 2025107778 675000000 675035926 675000000 675035926
+2028000000 2028108023 676000000 676036007 676000000 676036007
+2031000000 2031108101 677000000 677036033 677000000 677036033
+2034000000 2034108278 678000000 678036092 678000000 678036092
+2037000000 2037108424 679000000 679036141 679000000 679036141
+2040000000 2040108568 680000000 680036189 680000000 680036189
+2043000000 2041731222 681000000 680577074 681000000 680577074
+2046000000 2046108883 682000000 682036294 682000000 682036294
+2049000000 2049109043 683000000 683036347 683000000 683036347
+2052000000 2052109180 684000000 684036393 684000000 684036393
+2055000000 2055109338 685000000 685036446 685000000 685036446
+2058000000 2058109496 686000000 686036498 686000000 686036498
+2061000000 2061109610 687000000 687036536 687000000 687036536
+2064000000 2064109771 688000000 688036590 688000000 688036590
+2067000000 2067109898 689000000 689036632 689000000 689036632
+2070000000 2070110007 690000000 690036669 690000000 690036669
+2073000000 2073110149 691000000 691036716 691000000 691036716
+2076000000 2076110383 692000000 692036794 692000000 692036794
+2079000000 2079110296 693000000 693036765 693000000 693036765
+2082000000 2082110417 694000000 694036805 694000000 694036805
+2085000000 2085110525 695000000 695036841 695000000 695036841
+2088000000 2088110760 696000000 696036920 696000000 696036920
+2091000000 2091110939 697000000 697036979 697000000 697036979
+2094000000 2094024579 698000000 698008193 698000000 698008193
+2097000000 2097111208 699000000 699037069 699000000 699037069
+2100000000 2100111381 700000000 700037127 700000000 700037127
+2103000000 2103111497 701000000 701037165 701000000 701037165
+2106000000 2106111670 702000000 702037223 702000000 702037223
+2109000000 2109111842 703000000 703037280 703000000 703037280
+2112000000 2112111898 704000000 704037299 704000000 704037299
+2115000000 2115112044 705000000 705037348 705000000 705037348
+2118000000 2118112240 706000000 706037413 706000000 706037413
+2121000000 2121112269 707000000 707037423 707000000 707037423
+2124000000 2124112575 708000000 708037525 708000000 708037525
+2127000000 2127112747 709000000 709037582 709000000 709037582
+2130000000 2130112880 710000000 710037626 710000000 710037626
+2133000000 2133112997 711000000 711037665 711000000 711037665
+2136000000 2136113182 712000000 712037727 712000000 712037727
+2139000000 2139113288 713000000 713037762 713000000 713037762
+2142000000 2142113469 714000000 714037823 714000000 714037823
+2145000000 2145113681 715000000 715037893 715000000 715037893
+2148000000 2148113788 716000000 716037929 716000000 716037929
+2151000000 2151113954 717000000 717037984 717000000 717037984
+2154000000 2153712699 718000000 717904233 718000000 717904233
+2157000000 2157114225 719000000 719038075 719000000 719038075
+2160000000 2160114337 720000000 720038112 720000000 720038112
+2163000000 2163114546 721000000 721038182 721000000 721038182
+2166000000 2166114625 722000000 722038208 722000000 722038208
+2169000000 2169114850 723000000 723038283 723000000 723038283
+2172000000 2172114977 724000000 724038325 724000000 724038325
+2175000000 2175115066 725000000 725038355 725000000 725038355
+2178000000 2178115172 726000000 726038390 726000000 726038390
+2181000000 2181115383 727000000 727038461 727000000 727038461
+2184000000 2184115592 728000000 728038530 728000000 728038530
+2187000000 2187115737 729000000 729038579 729000000 729038579
+2190000000 2190115863 730000000 730038621 730000000 730038621
+2193000000 2193116029 731000000 731038676 731000000 731038676
+2196000000 2196116109 732000000 732038703 732000000 732038703
+2199000000 2199116344 733000000 733038781 733000000 733038781
+2202000000 2202116503 734000000 734038834 734000000 734038834
+2205000000 2205116624 735000000 735038874 735000000 735038874
+2208000000 2208116784 736000000 736038928 736000000 736038928
+2211000000 2211116867 737000000 737038955 737000000 737038955
+2214000000 2214117113 738000000 738039037 738000000 738039037
+2217000000 2217117236 739000000 739039078 739000000 739039078
+2220000000 2220117372 740000000 740039124 740000000 740039124
+2223000000 2223117547 741000000 741039182 741000000 741039182
+2226000000 2226117669 742000000 742039223 742000000 742039223
+2229000000 2229117819 743000000 743039273 743000000 743039273
+2232000000 2232117967 744000000 744039322 744000000 744039322
+2235000000 2234291661 745000000 744763887 745000000 744763887
+2238000000 2238118287 746000000 746039429 746000000 746039429
+2241000000 2241118419 747000000 747039473 747000000 747039473
+2244000000 2244118593 748000000 748039531 748000000 748039531
+2247000000 2247118712 749000000 749039570 749000000 749039570
+2250000000 2250118836 750000000 750039612 750000000 750039612
+2253000000 2253119055 751000000 751039685 751000000 751039685
+2256000000 2256119191 752000000 752039730 752000000 752039730
+2259000000 2259119342 753000000 753039780 753000000 753039780
+2262000000 2262119492 754000000 754039830 754000000 754039830
+2265000000 2265119607 755000000 755039869 755000000 755039869
+2268000000 2268119704 756000000 756039901 756000000 756039901
+2271000000 2271119912 757000000 757039970 757000000 757039970
+2274000000 2274120067 758000000 758040022 758000000 758040022
+2277000000 2277120226 759000000 759040075 759000000 759040075
+2280000000 2280120400 760000000 760040133 760000000 760040133
+2283000000 2283120500 761000000 761040166 761000000 761040166
+2286000000 2286120678 762000000 762040226 762000000 762040226
+2289000000 2289120827 763000000 763040275 763000000 763040275
+2292000000 2292120955 764000000 764040318 764000000 764040318
+2295000000 2295121124 765000000 765040374 765000000 765040374
+2298000000 2298121244 766000000 766040414 766000000 766040414
+2301000000 2299948594 767000000 766649531 767000000 766649531
+2304000000 2304121494 768000000 768040498 768000000 768040498
+2307000000 2307121752 769000000 769040584 769000000 769040584
+2310000000 2310121857 770000000 770040619 770000000 770040619
+2313000000 2313121937 771000000 771040645 771000000 771040645
+2316000000 2316122084 772000000 772040694 772000000 772040694
+2319000000 2319122338 773000000 773040779 773000000 773040779
+2322000000 2322122428 774000000 774040809 774000000 774040809
+2325000000 2325122673 775000000 775040891 775000000 775040891
+2328000000 2328122751 776000000 776040917 776000000 776040917
+2331000000 2331122928 777000000 777040976 777000000 777040976
+2334000000 2334123074 778000000 778041024 778000000 778041024
+2337000000 2337123218 779000000 779041072 779000000 779041072
+2340000000 2338745872 780000000 779581957 780000000 779581957
+2343000000 2343123533 781000000 781041177 781000000 781041177
+2346000000 2346123693 782000000 782041231 782000000 782041231
+2349000000 2349123830 783000000 783041276 783000000 783041276
+2352000000 2352123988 784000000 784041329 784000000 784041329
+2355000000 2355124146 785000000 785041382 785000000 785041382
+2358000000 2358124260 786000000 786041420 786000000 786041420
+2361000000 2361124421 787000000 787041473 787000000 787041473
+2364000000 2364124548 788000000 788041516 788000000 788041516
+2367000000 2367124657 789000000 789041552 789000000 789041552
+2370000000 2370124799 790000000 790041599 790000000 790041599
+2373000000 2373125033 791000000 791041677 791000000 791041677
+2376000000 2376124946 792000000 792041648 792000000 792041648
+2379000000 2379125067 793000000 793041689 793000000 793041689
+2382000000 2382125175 794000000 794041725 794000000 794041725
+2385000000 2385125410 795000000 795041803 795000000 795041803
+2388000000 2388125589 796000000 796041863 796000000 796041863
+2391000000 2391039229 797000000 797013076 797000000 797013076
+2394000000 2394125858 798000000 798041952 798000000 798041952
+2397000000 2397126031 799000000 799042010 799000000 799042010
+2400000000 2400126147 800000000 800042049 800000000 800042049
+2403000000 2403126320 801000000 801042106 801000000 801042106
+2406000000 2406126492 802000000 802042164 802000000 802042164
+2409000000 2409126548 803000000 803042182 803000000 803042182
+2412000000 2412126694 804000000 804042231 804000000 804042231
+2415000000 2415126890 805000000 805042296 805000000 805042296
+2418000000 2418126919 806000000 806042306 806000000 806042306
+2421000000 2421127225 807000000 807042408 807000000 807042408
+2424000000 2424127397 808000000 808042465 808000000 808042465
+2427000000 2427127530 809000000 809042510 809000000 809042510
+2430000000 2430127647 810000000 810042549 810000000 810042549
+2433000000 2433127832 811000000 811042610 811000000 811042610
+2436000000 2436127938 812000000 812042646 812000000 812042646
+2439000000 2439128119 813000000 813042706 813000000 813042706
+2442000000 2442128331 814000000 814042777 814000000 814042777
+2445000000 2445128438 815000000 815042812 815000000 815042812
+2448000000 2448128604 816000000 816042868 816000000 816042868
+2451000000 2450727349 817000000 816909116 817000000 816909116
+2454000000 2454128875 818000000 818042958 818000000 818042958
+2457000000 2457128987 819000000 819042995 819000000 819042995
+2460000000 2460129196 820000000 820043065 820000000 820043065
+2463000000 2463129275 821000000 821043091 821000000 821043091
+2466000000 2466129500 822000000 822043166 822000000 822043166
+2469000000 2469129627 823000000 823043209 823000000 823043209
+2472000000 2472129716 824000000 824043238 824000000 824043238
+2475000000 2475129822 825000000 825043274 825000000 825043274
+2478000000 2478130033 826000000 826043344 826000000 826043344
+2481000000 2481130242 827000000 827043414 827000000 827043414
+2484000000 2484130387 828000000 828043462 828000000 828043462
+2487000000 2487130513 829000000 829043504 829000000 829043504
+2490000000 2490130679 830000000 830043559 830000000 830043559
+2493000000 2493130759 831000000 831043586 831000000 831043586
+2496000000 2496130994 832000000 832043664 832000000 832043664
+2499000000 2499131153 833000000 833043717 833000000 833043717
+2502000000 2502131274 834000000 834043758 834000000 834043758
+2505000000 2505131434 835000000 835043811 835000000 835043811
+2508000000 2508131517 836000000 836043839 836000000 836043839
+2511000000 2511131763 837000000 837043921 837000000 837043921
+2514000000 2514131886 838000000 838043962 838000000 838043962
+2517000000 2517132022 839000000 839044007 839000000 839044007
+2520000000 2520132197 840000000 840044065 840000000 840044065
+2523000000 2523132319 841000000 841044106 841000000 841044106
+2526000000 2526132469 842000000 842044156 842000000 842044156
+2529000000 2529132617 843000000 843044205 843000000 843044205
+2532000000 2531306311 844000000 843768770 844000000 843768770
+2535000000 2535132937 845000000 845044312 845000000 845044312
+2538000000 2538133069 846000000 846044356 846000000 846044356
+2541000000 2541133243 847000000 847044414 847000000 847044414
+2544000000 2544133362 848000000 848044454 848000000 848044454
+2547000000 2547133486 849000000 849044495 849000000 849044495
+2550000000 2550133705 850000000 850044568 850000000 850044568
+2553000000 2553133841 851000000 851044613 851000000 851044613
+2556000000 2556133992 852000000 852044664 852000000 852044664
+2559000000 2559134142 853000000 853044714 853000000 853044714
+2562000000 2562134257 854000000 854044752 854000000 854044752
+2565000000 2565134354 855000000 855044784 855000000 855044784
+2568000000 2568134562 856000000 856044854 856000000 856044854
+2571000000 2571134717 857000000 857044905 857000000 857044905
+2574000000 2574134876 858000000 858044958 858000000 858044958
+2577000000 2577135050 859000000 859045016 859000000 859045016
+2580000000 2580135150 860000000 860045050 860000000 860045050
+2583000000 2583135328 861000000 861045109 861000000 861045109
+2586000000 2586135477 862000000 862045159 862000000 862045159
+2589000000 2589135605 863000000 863045201 863000000 863045201
+2592000000 2592135774 864000000 864045258 864000000 864045258
+2595000000 2595135894 865000000 865045298 865000000 865045298
+2598000000 2596963244 866000000 865654414 866000000 865654414
+2601000000 2601136144 867000000 867045381 867000000 867045381
+2604000000 2604136402 868000000 868045467 868000000 868045467
+2607000000 2607136507 869000000 869045502 869000000 869045502
+2610000000 2610136587 870000000 870045529 870000000 870045529
+2613000000 2613136734 871000000 871045578 871000000 871045578
+2616000000 2616136988 872000000 872045662 872000000 872045662
+2619000000 2619137078 873000000 873045692 873000000 873045692
+2622000000 2622137323 874000000 874045774 874000000 874045774
+2625000000 2625137401 875000000 875045800 875000000 875045800
+2628000000 2628137578 876000000 876045859 876000000 876045859
+2631000000 2631137724 877000000 877045908 877000000 877045908
+2634000000 2634137868 878000000 878045956 878000000 878045956
+2637000000 2635760522 879000000 878586840 879000000 878586840
+2640000000 2640138183 880000000 880046061 880000000 880046061
+2643000000 2643138343 881000000 881046114 881000000 881046114
+2646000000 2646138480 882000000 882046160 882000000 882046160
+2649000000 2649138638 883000000 883046212 883000000 883046212
+2652000000 2652138796 884000000 884046265 884000000 884046265
+2655000000 2655138910 885000000 885046303 885000000 885046303
+2658000000 2658139071 886000000 886046357 886000000 886046357
+2661000000 2661139198 887000000 887046399 887000000 887046399
+2664000000 2664139307 888000000 888046435 888000000 888046435
+2667000000 2667139449 889000000 889046483 889000000 889046483
+2670000000 2670139683 890000000 890046561 890000000 890046561
+2673000000 2673139596 891000000 891046532 891000000 891046532
+2676000000 2676139717 892000000 892046572 892000000 892046572
+2679000000 2679139825 893000000 893046608 893000000 893046608
+2682000000 2682140060 894000000 894046686 894000000 894046686
+2685000000 2685140239 895000000 895046746 895000000 895046746
+2688000000 2688053879 896000000 896017959 896000000 896017959
+2691000000 2691140508 897000000 897046836 897000000 897046836
+2694000000 2694140681 898000000 898046893 898000000 898046893
+2697000000 2697140797 899000000 899046932 899000000 899046932
+2700000000 2700140970 900000000 900046990 900000000 900046990
+2703000000 2703141142 901000000 901047047 901000000 901047047
+2706000000 2706141198 902000000 902047066 902000000 902047066
+2709000000 2709141344 903000000 903047114 903000000 903047114
+2712000000 2712141540 904000000 904047180 904000000 904047180
+2715000000 2715141569 905000000 905047189 905000000 905047189
+2718000000 2718141875 906000000 906047291 906000000 906047291
+2721000000 2721142047 907000000 907047349 907000000 907047349
+2724000000 2724142180 908000000 908047393 908000000 908047393
+2727000000 2727142297 909000000 909047432 909000000 909047432
+2730000000 2730142482 910000000 910047494 910000000 910047494
+2733000000 2733142588 911000000 911047529 911000000 911047529
+2736000000 2736142769 912000000 912047589 912000000 912047589
+2739000000 2739142981 913000000 913047660 913000000 913047660
+2742000000 2742143088 914000000 914047696 914000000 914047696
+2745000000 2745143254 915000000 915047751 915000000 915047751
+2748000000 2747741999 916000000 915913999 916000000 915913999
+2751000000 2751143525 917000000 917047841 917000000 917047841
+2754000000 2754143637 918000000 918047879 918000000 918047879
+2757000000 2757143846 919000000 919047948 919000000 919047948
+2760000000 2760143925 920000000 920047975 920000000 920047975
+2763000000 2763144150 921000000 921048050 921000000 921048050
+2766000000 2766144277 922000000 922048092 922000000 922048092
+2769000000 2769144366 923000000 923048122 923000000 923048122
+2772000000 2772144472 924000000 924048157 924000000 924048157
+2775000000 2775144683 925000000 925048227 925000000 925048227
+2778000000 2778144892 926000000 926048297 926000000 926048297
+2781000000 2781145037 927000000 927048345 927000000 927048345
+2784000000 2784145163 928000000 928048387 928000000 928048387
+2787000000 2787145329 929000000 929048443 929000000 929048443
+2790000000 2790145409 930000000 930048469 930000000 930048469
+2793000000 2793145644 931000000 931048548 931000000 931048548
+2796000000 2796145803 932000000 932048601 932000000 932048601
+2799000000 2799145924 933000000 933048641 933000000 933048641
+2802000000 2802146084 934000000 934048694 934000000 934048694
+2805000000 2805146167 935000000 935048722 935000000 935048722
+2808000000 2808146413 936000000 936048804 936000000 936048804
+2811000000 2811146536 937000000 937048845 937000000 937048845
+2814000000 2814146672 938000000 938048890 938000000 938048890
+2817000000 2817146847 939000000 939048949 939000000 939048949
+2820000000 2820146969 940000000 940048989 940000000 940048989
+2823000000 2823147119 941000000 941049039 941000000 941049039
+2826000000 2826147267 942000000 942049089 942000000 942049089
+2829000000 2828320961 943000000 942773653 943000000 942773653
+2832000000 2832147587 944000000 944049195 944000000 944049195
+2835000000 2835147719 945000000 945049239 945000000 945049239
+2838000000 2838147893 946000000 946049297 946000000 946049297
+2841000000 2841148012 947000000 947049337 947000000 947049337
+2844000000 2844148136 948000000 948049378 948000000 948049378
+2847000000 2847148355 949000000 949049451 949000000 949049451
+2850000000 2850148491 950000000 950049497 950000000 950049497
+2853000000 2853148642 951000000 951049547 951000000 951049547
+2856000000 2856148792 952000000 952049597 952000000 952049597
+2859000000 2859148907 953000000 953049635 953000000 953049635
+2862000000 2862149004 954000000 954049668 954000000 954049668
+2865000000 2865149212 955000000 955049737 955000000 955049737
+2868000000 2868149367 956000000 956049789 956000000 956049789
+2871000000 2871149526 957000000 957049842 957000000 957049842
+2874000000 2874149700 958000000 958049900 958000000 958049900
+2877000000 2877149800 959000000 959049933 959000000 959049933
+2880000000 2880149978 960000000 960049992 960000000 960049992
+2883000000 2883150127 961000000 961050042 961000000 961050042
+2886000000 2886150255 962000000 962050085 962000000 962050085
+2889000000 2889150424 963000000 963050141 963000000 963050141
+2892000000 2892150544 964000000 964050181 964000000 964050181
+2895000000 2893977894 965000000 964659298 965000000 964659298
+2898000000 2898150794 966000000 966050264 966000000 966050264
+2901000000 2901151052 967000000 967050350 967000000 967050350
+2904000000 2904151157 968000000 968050385 968000000 968050385
+2907000000 2907151237 969000000 969050412 969000000 969050412
+2910000000 2910151384 970000000 970050461 970000000 970050461
+2913000000 2913151638 971000000 971050546 971000000 971050546
+2916000000 2916151728 972000000 972050576 972000000 972050576
+2919000000 2919151973 973000000 973050657 973000000 973050657
+2922000000 2922152051 974000000 974050683 974000000 974050683
+2925000000 2925152228 975000000 975050742 975000000 975050742
+2928000000 2928152374 976000000 976050791 976000000 976050791
+2931000000 2931152518 977000000 977050839 977000000 977050839
+2934000000 2932775172 978000000 977591724 978000000 977591724
+2937000000 2937152833 979000000 979050944 979000000 979050944
+2940000000 2940152993 980000000 980050997 980000000 980050997
+2943000000 2943153130 981000000 981051043 981000000 981051043
+2946000000 2946153288 982000000 982051096 982000000 982051096
+2949000000 2949153446 983000000 983051148 983000000 983051148
+2952000000 2952153560 984000000 984051186 984000000 984051186
+2955000000 2955153721 985000000 985051240 985000000 985051240
+2958000000 2958153848 986000000 986051282 986000000 986051282
+2961000000 2961153957 987000000 987051319 987000000 987051319
+2964000000 2964154099 988000000 988051366 988000000 988051366
+2967000000 2967154333 989000000 989051444 989000000 989051444
+2970000000 2970154246 990000000 990051415 990000000 990051415
+2973000000 2973154367 991000000 991051455 991000000 991051455
+2976000000 2976154475 992000000 992051491 992000000 992051491
+2979000000 2979154710 993000000 993051570 993000000 993051570
+2982000000 2982154889 994000000 994051629 994000000 994051629
+2985000000 2985068529 995000000 995022843 995000000 995022843
+2988000000 2988155158 996000000 996051719 996000000 996051719
+2991000000 2991155331 997000000 997051777 997000000 997051777
+2994000000 2994155447 998000000 998051815 998000000 998051815
+2997000000 2997155620 999000000 999051873 999000000 999051873
+3000000000 3000155792 1000000000 1000051930 1000000000 1000051930
+3003000000 3003155848 1001000000 1001051949 1001000000 1001051949
+3006000000 3006155994 1002000000 1002051998 1002000000 1002051998
+3009000000 3009156190 1003000000 1003052063 1003000000 1003052063
+3012000000 3012156219 1004000000 1004052073 1004000000 1004052073
+3015000000 3015156525 1005000000 1005052175 1005000000 1005052175
+3018000000 3018156697 1006000000 1006052232 1006000000 1006052232
+3021000000 3021156830 1007000000 1007052276 1007000000 1007052276
+3024000000 3024156947 1008000000 1008052315 1008000000 1008052315
+3027000000 3027157132 1009000000 1009052377 1009000000 1009052377
+3030000000 3030157238 1010000000 1010052412 1010000000 1010052412
+3033000000 3033157419 1011000000 1011052473 1011000000 1011052473
+3036000000 3036157631 1012000000 1012052543 1012000000 1012052543
+3039000000 3039157738 1013000000 1013052579 1013000000 1013052579
+3042000000 3042157904 1014000000 1014052634 1014000000 1014052634
+3045000000 3044756649 1015000000 1014918883 1015000000 1014918883
+3048000000 3048158175 1016000000 1016052725 1016000000 1016052725
+3051000000 3051158287 1017000000 1017052762 1017000000 1017052762
+3054000000 3054158496 1018000000 1018052832 1018000000 1018052832
+3057000000 3057158575 1019000000 1019052858 1019000000 1019052858
+3060000000 3060158800 1020000000 1020052933 1020000000 1020052933
+3063000000 3063158927 1021000000 1021052975 1021000000 1021052975
+3066000000 3066159016 1022000000 1022053005 1022000000 1022053005
+3069000000 3069159122 1023000000 1023053040 1023000000 1023053040
+3072000000 3072159333 1024000000 1024053111 1024000000 1024053111
+3075000000 3075159542 1025000000 1025053180 1025000000 1025053180
+3078000000 3078159687 1026000000 1026053229 1026000000 1026053229
+3081000000 3081159813 1027000000 1027053271 1027000000 1027053271
+3084000000 3084159979 1028000000 1028053326 1028000000 1028053326
+3087000000 3087160059 1029000000 1029053353 1029000000 1029053353
+3090000000 3090160294 1030000000 1030053431 1030000000 1030053431
+3093000000 3093160453 1031000000 1031053484 1031000000 1031053484
+3096000000 3096160574 1032000000 1032053524 1032000000 1032053524
+3099000000 3099160734 1033000000 1033053578 1033000000 1033053578
+3102000000 3102160817 1034000000 1034053605 1034000000 1034053605
+3105000000 3105161063 1035000000 1035053687 1035000000 1035053687
+3108000000 3108161186 1036000000 1036053728 1036000000 1036053728
+3111000000 3111161322 1037000000 1037053774 1037000000 1037053774
+3114000000 3114161497 1038000000 1038053832 1038000000 1038053832
+3117000000 3117161619 1039000000 1039053873 1039000000 1039053873
+3120000000 3120161769 1040000000 1040053923 1040000000 1040053923
+3123000000 3123161917 1041000000 1041053972 1041000000 1041053972
+3126000000 3125335611 1042000000 1041778537 1042000000 1041778537
+3129000000 3129162237 1043000000 1043054079 1043000000 1043054079
+3132000000 3132162369 1044000000 1044054123 1044000000 1044054123
+3135000000 3135162543 1045000000 1045054181 1045000000 1045054181
+3138000000 3138162662 1046000000 1046054220 1046000000 1046054220
+3141000000 3141162786 1047000000 1047054262 1047000000 1047054262
+3144000000 3144163005 1048000000 1048054335 1048000000 1048054335
+3147000000 3147163141 1049000000 1049054380 1049000000 1049054380
+3150000000 3150163292 1050000000 1050054430 1050000000 1050054430
+3153000000 3153163442 1051000000 1051054480 1051000000 1051054480
+3156000000 3156163557 1052000000 1052054519 1052000000 1052054519
+3159000000 3159163654 1053000000 1053054551 1053000000 1053054551
+3162000000 3162163862 1054000000 1054054620 1054000000 1054054620
+3165000000 3165164017 1055000000 1055054672 1055000000 1055054672
+3168000000 3168164176 1056000000 1056054725 1056000000 1056054725
+3171000000 3171164350 1057000000 1057054783 1057000000 1057054783
+3174000000 3174164450 1058000000 1058054816 1058000000 1058054816
+3177000000 3177164628 1059000000 1059054876 1059000000 1059054876
+3180000000 3180164777 1060000000 1060054925 1060000000 1060054925
+3183000000 3183164905 1061000000 1061054968 1061000000 1061054968
+3186000000 3186165074 1062000000 1062055024 1062000000 1062055024
+3189000000 3189165194 1063000000 1063055064 1063000000 1063055064
+3192000000 3190992544 1064000000 1063664181 1064000000 1063664181
+3195000000 3195165444 1065000000 1065055148 1065000000 1065055148
+3198000000 3198165702 1066000000 1066055234 1066000000 1066055234
+3201000000 3201165807 1067000000 1067055269 1067000000 1067055269
+3204000000 3204165887 1068000000 1068055295 1068000000 1068055295
+3207000000 3207166034 1069000000 1069055344 1069000000 1069055344
+3210000000 3210166288 1070000000 1070055429 1070000000 1070055429
+3213000000 3213166378 1071000000 1071055459 1071000000 1071055459
+3216000000 3216166623 1072000000 1072055541 1072000000 1072055541
+3219000000 3219166701 1073000000 1073055567 1073000000 1073055567
+3222000000 3222166878 1074000000 1074055626 1074000000 1074055626
+3225000000 3225167024 1075000000 1075055674 1075000000 1075055674
+3228000000 3228167168 1076000000 1076055722 1076000000 1076055722
+3231000000 3229789822 1077000000 1076596607 1077000000 1076596607
+3234000000 3234167483 1078000000 1078055827 1078000000 1078055827
+3237000000 3237167643 1079000000 1079055881 1079000000 1079055881
+3240000000 3240167780 1080000000 1080055926 1080000000 1080055926
+3243000000 3243167938 1081000000 1081055979 1081000000 1081055979
+3246000000 3246168096 1082000000 1082056032 1082000000 1082056032
+3249000000 3249168210 1083000000 1083056070 1083000000 1083056070
+3252000000 3252168371 1084000000 1084056123 1084000000 1084056123
+3255000000 3255168498 1085000000 1085056166 1085000000 1085056166
+3258000000 3258168607 1086000000 1086056202 1086000000 1086056202
+3261000000 3261168749 1087000000 1087056249 1087000000 1087056249
+3264000000 3264168983 1088000000 1088056327 1088000000 1088056327
+3267000000 3267168896 1089000000 1089056298 1089000000 1089056298
+3270000000 3270169017 1090000000 1090056339 1090000000 1090056339
+3273000000 3273169125 1091000000 1091056375 1091000000 1091056375
+3276000000 3276169360 1092000000 1092056453 1092000000 1092056453
+3279000000 3279169539 1093000000 1093056513 1093000000 1093056513
+3282000000 3282083179 1094000000 1094027726 1094000000 1094027726
+3285000000 3285169808 1095000000 1095056602 1095000000 1095056602
+3288000000 3288169981 1096000000 1096056660 1096000000 1096056660
+3291000000 3291170097 1097000000 1097056699 1097000000 1097056699
+3294000000 3294170270 1098000000 1098056756 1098000000 1098056756
+3297000000 3297170442 1099000000 1099056814 1099000000 1099056814
+3300000000 3300170498 1100000000 1100056832 1100000000 1100056832
+3303000000 3303170644 1101000000 1101056881 1101000000 1101056881
+3306000000 3306170840 1102000000 1102056946 1102000000 1102056946
+3309000000 3309170869 1103000000 1103056956 1103000000 1103056956
+3312000000 3312171175 1104000000 1104057058 1104000000 1104057058
+3315000000 3315171347 1105000000 1105057115 1105000000 1105057115
+3318000000 3318171480 1106000000 1106057160 1106000000 1106057160
+3321000000 3321171597 1107000000 1107057199 1107000000 1107057199
+3324000000 3324171782 1108000000 1108057260 1108000000 1108057260
+3327000000 3327171888 1109000000 1109057296 1109000000 1109057296
+3330000000 3330172069 1110000000 1110057356 1110000000 1110057356
+3333000000 3333172281 1111000000 1111057427 1111000000 1111057427
+3336000000 3336172388 1112000000 1112057462 1112000000 1112057462
+3339000000 3339172554 1113000000 1113057518 1113000000 1113057518
+3342000000 3341771299 1114000000 1113923766 1114000000 1113923766
+3345000000 3345172825 1115000000 1115057608 1115000000 1115057608
+3348000000 3348172937 1116000000 1116057645 1116000000 1116057645
+3351000000 3351173146 1117000000 1117057715 1117000000 1117057715
+3354000000 3354173225 1118000000 1118057741 1118000000 1118057741
+3357000000 3357173450 1119000000 1119057816 1119000000 1119057816
+3360000000 3360173577 1120000000 1120057859 1120000000 1120057859
+3363000000 3363173666 1121000000 1121057888 1121000000 1121057888
+3366000000 3366173772 1122000000 1122057924 1122000000 1122057924
+3369000000 3369173983 1123000000 1123057994 1123000000 1123057994
+3372000000 3372174192 1124000000 1124058064 1124000000 1124058064
+3375000000 3375174337 1125000000 1125058112 1125000000 1125058112
+3378000000 3378174463 1126000000 1126058154 1126000000 1126058154
+3381000000 3381174629 1127000000 1127058209 1127000000 1127058209
+3384000000 3384174709 1128000000 1128058236 1128000000 1128058236
+3387000000 3387174944 1129000000 1129058314 1129000000 1129058314
+3390000000 3390175103 1130000000 1130058367 1130000000 1130058367
+3393000000 3393175224 1131000000 1131058408 1131000000 1131058408
+3396000000 3396175384 1132000000 1132058461 1132000000 1132058461
+3399000000 3399175467 1133000000 1133058489 1133000000 1133058489
+3402000000 3402175713 1134000000 1134058571 1134000000 1134058571
+3405000000 3405175836 1135000000 1135058612 1135000000 1135058612
+3408000000 3408175972 1136000000 1136058657 1136000000 1136058657
+3411000000 3411176147 1137000000 1137058715 1137000000 1137058715
+3414000000 3414176269 1138000000 1138058756 1138000000 1138058756
+3417000000 3417176419 1139000000 1139058806 1139000000 1139058806
+3420000000 3420176567 1140000000 1140058855 1140000000 1140058855
+3423000000 3422350261 1141000000 1140783420 1141000000 1140783420
+3426000000 3426176887 1142000000 1142058962 1142000000 1142058962
+3429000000 3429177019 1143000000 1143059006 1143000000 1143059006
+3432000000 3432177193 1144000000 1144059064 1144000000 1144059064
+3435000000 3435177312 1145000000 1145059104 1145000000 1145059104
+3438000000 3438177436 1146000000 1146059145 1146000000 1146059145
+3441000000 3441177655 1147000000 1147059218 1147000000 1147059218
+3444000000 3444177791 1148000000 1148059263 1148000000 1148059263
+3447000000 3447177942 1149000000 1149059314 1149000000 1149059314
+3450000000 3450178092 1150000000 1150059364 1150000000 1150059364
+3453000000 3453178207 1151000000 1151059402 1151000000 1151059402
+3456000000 3456178304 1152000000 1152059434 1152000000 1152059434
+3459000000 3459178512 1153000000 1153059504 1153000000 1153059504
+3462000000 3462178667 1154000000 1154059555 1154000000 1154059555
+3465000000 3465178826 1155000000 1155059608 1155000000 1155059608
+3468000000 3468179000 1156000000 1156059666 1156000000 1156059666
+3471000000 3471179100 1157000000 1157059700 1157000000 1157059700
+3474000000 3474179278 1158000000 1158059759 1158000000 1158059759
+3477000000 3477179427 1159000000 1159059809 1159000000 1159059809
+3480000000 3480179555 1160000000 1160059851 1160000000 1160059851
+3483000000 3483179724 1161000000 1161059908 1161000000 1161059908
+3486000000 3486179844 1162000000 1162059948 1162000000 1162059948
+3489000000 3488007194 1163000000 1162669064 1163000000 1162669064
+3492000000 3492180094 1164000000 1164060031 1164000000 1164060031
+3495000000 3495180352 1165000000 1165060117 1165000000 1165060117
+3498000000 3498180457 1166000000 1166060152 1166000000 1166060152
+3501000000 3501180537 1167000000 1167060179 1167000000 1167060179
+3504000000 3504180684 1168000000 1168060228 1168000000 1168060228
+3507000000 3507180938 1169000000 1169060312 1169000000 1169060312
+3510000000 3510181028 1170000000 1170060342 1170000000 1170060342
+3513000000 3513181273 1171000000 1171060424 1171000000 1171060424
+3516000000 3516181351 1172000000 1172060450 1172000000 1172060450
+3519000000 3519181528 1173000000 1173060509 1173000000 1173060509
+3522000000 3522181674 1174000000 1174060558 1174000000 1174060558
+3525000000 3525181818 1175000000 1175060606 1175000000 1175060606
+3528000000 3526804472 1176000000 1175601490 1176000000 1175601490
+3531000000 3531182133 1177000000 1177060711 1177000000 1177060711
+3534000000 3534182293 1178000000 1178060764 1178000000 1178060764
+3537000000 3537182430 1179000000 1179060810 1179000000 1179060810
+3540000000 3540182588 1180000000 1180060862 1180000000 1180060862
+3543000000 3543182746 1181000000 1181060915 1181000000 1181060915
+3546000000 3546182860 1182000000 1182060953 1182000000 1182060953
+3549000000 3549183021 1183000000 1183061007 1183000000 1183061007
+3552000000 3552183148 1184000000 1184061049 1184000000 1184061049
+3555000000 3555183257 1185000000 1185061085 1185000000 1185061085
+3558000000 3558183399 1186000000 1186061133 1186000000 1186061133
+3561000000 3561183633 1187000000 1187061211 1187000000 1187061211
+3564000000 3564183546 1188000000 1188061182 1188000000 1188061182
+3567000000 3567183667 1189000000 1189061222 1189000000 1189061222
+3570000000 3570183775 1190000000 1190061258 1190000000 1190061258
+3573000000 3573184010 1191000000 1191061336 1191000000 1191061336
+3576000000 3576184189 1192000000 1192061396 1192000000 1192061396
+3579000000 3579097829 1193000000 1193032609 1193000000 1193032609
+3582000000 3582184458 1194000000 1194061486 1194000000 1194061486
+3585000000 3585184631 1195000000 1195061543 1195000000 1195061543
+3588000000 3588184747 1196000000 1196061582 1196000000 1196061582
+3591000000 3591184920 1197000000 1197061640 1197000000 1197061640
+3594000000 3594185092 1198000000 1198061697 1198000000 1198061697
+3597000000 3597185148 1199000000 1199061716 1199000000 1199061716
+3600000000 3600185294 1200000000 1200061764 1200000000 1200061764
+3603000000 3603185490 1201000000 1201061830 1201000000 1201061830
+3606000000 3606185519 1202000000 1202061839 1202000000 1202061839
+3609000000 3609185825 1203000000 1203061941 1203000000 1203061941
+3612000000 3612185997 1204000000 1204061999 1204000000 1204061999
+3615000000 3615186130 1205000000 1205062043 1205000000 1205062043
+3618000000 3618186247 1206000000 1206062082 1206000000 1206062082
+3621000000 3621186432 1207000000 1207062144 1207000000 1207062144
+3624000000 3624186538 1208000000 1208062179 1208000000 1208062179
+3627000000 3627186719 1209000000 1209062239 1209000000 1209062239
+3630000000 3630186931 1210000000 1210062310 1210000000 1210062310
+3633000000 3633187038 1211000000 1211062346 1211000000 1211062346
+3636000000 3636187204 1212000000 1212062401 1212000000 1212062401
+3639000000 3638785949 1213000000 1212928649 1213000000 1212928649
+3642000000 3642187475 1214000000 1214062491 1214000000 1214062491
+3645000000 3645187587 1215000000 1215062529 1215000000 1215062529
+3648000000 3648187796 1216000000 1216062598 1216000000 1216062598
+3651000000 3651187875 1217000000 1217062625 1217000000 1217062625
+3654000000 3654188100 1218000000 1218062700 1218000000 1218062700
+3657000000 3657188227 1219000000 1219062742 1219000000 1219062742
+3660000000 3660188316 1220000000 1220062772 1220000000 1220062772
+3663000000 3663188422 1221000000 1221062807 1221000000 1221062807
+3666000000 3666188633 1222000000 1222062877 1222000000 1222062877
+3669000000 3669188842 1223000000 1223062947 1223000000 1223062947
+3672000000 3672188987 1224000000 1224062995 1224000000 1224062995
+3675000000 3675189113 1225000000 1225063037 1225000000 1225063037
+3678000000 3678189279 1226000000 1226063093 1226000000 1226063093
+3681000000 3681189359 1227000000 1227063119 1227000000 1227063119
+3684000000 3684189594 1228000000 1228063198 1228000000 1228063198
+3687000000 3687189753 1229000000 1229063251 1229000000 1229063251
+3690000000 3690189874 1230000000 1230063291 1230000000 1230063291
+3693000000 3693190034 1231000000 1231063344 1231000000 1231063344
+3696000000 3696190117 1232000000 1232063372 1232000000 1232063372
+3699000000 3699190363 1233000000 1233063454 1233000000 1233063454
+3702000000 3702190486 1234000000 1234063495 1234000000 1234063495
+3705000000 3705190622 1235000000 1235063540 1235000000 1235063540
+3708000000 3708190797 1236000000 1236063599 1236000000 1236063599
+3711000000 3711190919 1237000000 1237063639 1237000000 1237063639
+3714000000 3714191069 1238000000 1238063689 1238000000 1238063689
+3717000000 3717191217 1239000000 1239063739 1239000000 1239063739
+3720000000 3719364911 1240000000 1239788303 1240000000 1239788303
+3723000000 3723191537 1241000000 1241063845 1241000000 1241063845
+3726000000 3726191669 1242000000 1242063889 1242000000 1242063889
+3729000000 3729191843 1243000000 1243063947 1243000000 1243063947
+3732000000 3732191962 1244000000 1244063987 1244000000 1244063987
+3735000000 3735192086 1245000000 1245064028 1245000000 1245064028
+3738000000 3738192305 1246000000 1246064101 1246000000 1246064101
+3741000000 3741192441 1247000000 1247064147 1247000000 1247064147
+3744000000 3744192592 1248000000 1248064197 1248000000 1248064197
+3747000000 3747192742 1249000000 1249064247 1249000000 1249064247
+3750000000 3750192857 1250000000 1250064285 1250000000 1250064285
+3753000000 3753192954 1251000000 1251064318 1251000000 1251064318
+3756000000 3756193162 1252000000 1252064387 1252000000 1252064387
+3759000000 3759193317 1253000000 1253064439 1253000000 1253064439
+3762000000 3762193476 1254000000 1254064492 1254000000 1254064492
+3765000000 3765193650 1255000000 1255064550 1255000000 1255064550
+3768000000 3768193750 1256000000 1256064583 1256000000 1256064583
+3771000000 3771193928 1257000000 1257064642 1257000000 1257064642
+3774000000 3774194077 1258000000 1258064692 1258000000 1258064692
+3777000000 3777194205 1259000000 1259064735 1259000000 1259064735
+3780000000 3780194374 1260000000 1260064791 1260000000 1260064791
+3783000000 3783194494 1261000000 1261064831 1261000000 1261064831
+3786000000 3785021844 1262000000 1261673948 1262000000 1261673948
+3789000000 3789194744 1263000000 1263064914 1263000000 1263064914
+3792000000 3792195002 1264000000 1264065000 1264000000 1264065000
+3795000000 3795195107 1265000000 1265065035 1265000000 1265065035
+3798000000 3798195187 1266000000 1266065062 1266000000 1266065062
+3801000000 3801195334 1267000000 1267065111 1267000000 1267065111
+3804000000 3804195588 1268000000 1268065196 1268000000 1268065196
+3807000000 3807195678 1269000000 1269065226 1269000000 1269065226
+3810000000 3810195923 1270000000 1270065307 1270000000 1270065307
+3813000000 3813196001 1271000000 1271065333 1271000000 1271065333
+3816000000 3816196178 1272000000 1272065392 1272000000 1272065392
+3819000000 3819196324 1273000000 1273065441 1273000000 1273065441
+3822000000 3822196468 1274000000 1274065489 1274000000 1274065489
+3825000000 3823819122 1275000000 1274606374 1275000000 1274606374
+3828000000 3828196783 1276000000 1276065594 1276000000 1276065594
+3831000000 3831196943 1277000000 1277065647 1277000000 1277065647
+3834000000 3834197080 1278000000 1278065693 1278000000 1278065693
+3837000000 3837197238 1279000000 1279065746 1279000000 1279065746
+3840000000 3840197396 1280000000 1280065798 1280000000 1280065798
+3843000000 3843197510 1281000000 1281065836 1281000000 1281065836
+3846000000 3846197671 1282000000 1282065890 1282000000 1282065890
+3849000000 3849197798 1283000000 1283065932 1283000000 1283065932
+3852000000 3852197907 1284000000 1284065969 1284000000 1284065969
+3855000000 3855198049 1285000000 1285066016 1285000000 1285066016
+3858000000 3858198283 1286000000 1286066094 1286000000 1286066094
+3861000000 3861198196 1287000000 1287066065 1287000000 1287066065
+3864000000 3864198317 1288000000 1288066105 1288000000 1288066105
+3867000000 3867198425 1289000000 1289066141 1289000000 1289066141
+3870000000 3870198660 1290000000 1290066220 1290000000 1290066220
+3873000000 3873198839 1291000000 1291066279 1291000000 1291066279
+3876000000 3876112479 1292000000 1292037493 1292000000 1292037493
+3879000000 3879199108 1293000000 1293066369 1293000000 1293066369
+3882000000 3882199281 1294000000 1294066427 1294000000 1294066427
+3885000000 3885199397 1295000000 1295066465 1295000000 1295066465
+3888000000 3888199570 1296000000 1296066523 1296000000 1296066523
+3891000000 3891199742 1297000000 1297066580 1297000000 1297066580
+3894000000 3894199798 1298000000 1298066599 1298000000 1298066599
+3897000000 3897199944 1299000000 1299066648 1299000000 1299066648
+3900000000 3900200140 1300000000 1300066713 1300000000 1300066713
+3903000000 3903200169 1301000000 1301066723 1301000000 1301066723
+3906000000 3906200475 1302000000 1302066825 1302000000 1302066825
+3909000000 3909200647 1303000000 1303066882 1303000000 1303066882
+3912000000 3912200780 1304000000 1304066926 1304000000 1304066926
+3915000000 3915200897 1305000000 1305066965 1305000000 1305066965
+3918000000 3918201082 1306000000 1306067027 1306000000 1306067027
+3921000000 3921201188 1307000000 1307067062 1307000000 1307067062
+3924000000 3924201369 1308000000 1308067123 1308000000 1308067123
+3927000000 3927201581 1309000000 1309067193 1309000000 1309067193
+3930000000 3930201688 1310000000 1310067229 1310000000 1310067229
+3933000000 3933201854 1311000000 1311067284 1311000000 1311067284
+3936000000 3935800599 1312000000 1311933533 1312000000 1311933533
+3939000000 3939202125 1313000000 1313067375 1313000000 1313067375
+3942000000 3942202237 1314000000 1314067412 1314000000 1314067412
+3945000000 3945202446 1315000000 1315067482 1315000000 1315067482
+3948000000 3948202525 1316000000 1316067508 1316000000 1316067508
+3951000000 3951202750 1317000000 1317067583 1317000000 1317067583
+3954000000 3954202877 1318000000 1318067625 1318000000 1318067625
+3957000000 3957202966 1319000000 1319067655 1319000000 1319067655
+3960000000 3960203072 1320000000 1320067690 1320000000 1320067690
+3963000000 3963203283 1321000000 1321067761 1321000000 1321067761
+3966000000 3966203492 1322000000 1322067830 1322000000 1322067830
+3969000000 3969203637 1323000000 1323067879 1323000000 1323067879
+3972000000 3972203763 1324000000 1324067921 1324000000 1324067921
+3975000000 3975203929 1325000000 1325067976 1325000000 1325067976
+3978000000 3978204009 1326000000 1326068003 1326000000 1326068003
+3981000000 3981204244 1327000000 1327068081 1327000000 1327068081
+3984000000 3984204403 1328000000 1328068134 1328000000 1328068134
+3987000000 3987204524 1329000000 1329068174 1329000000 1329068174
+3990000000 3990204684 1330000000 1330068228 1330000000 1330068228
+3993000000 3993204767 1331000000 1331068255 1331000000 1331068255
+3996000000 3996205013 1332000000 1332068337 1332000000 1332068337
+3999000000 3999205136 1333000000 1333068378 1333000000 1333068378
+4002000000 4002205272 1334000000 1334068424 1334000000 1334068424
+4005000000 4005205447 1335000000 1335068482 1335000000 1335068482
+4008000000 4008205569 1336000000 1336068523 1336000000 1336068523
+4011000000 4011205719 1337000000 1337068573 1337000000 1337068573
+4014000000 4014205867 1338000000 1338068622 1338000000 1338068622
+4017000000 4016379561 1339000000 1338793187 1339000000 1338793187
+4020000000 4020206187 1340000000 1340068729 1340000000 1340068729
+4023000000 4023206319 1341000000 1341068773 1341000000 1341068773
+4026000000 4026206493 1342000000 1342068831 1342000000 1342068831
+4029000000 4029206612 1343000000 1343068870 1343000000 1343068870
+4032000000 4032206736 1344000000 1344068912 1344000000 1344068912
+4035000000 4035206955 1345000000 1345068985 1345000000 1345068985
+4038000000 4038207091 1346000000 1346069030 1346000000 1346069030
+4041000000 4041207242 1347000000 1347069080 1347000000 1347069080
+4044000000 4044207392 1348000000 1348069130 1348000000 1348069130
+4047000000 4047207507 1349000000 1349069169 1349000000 1349069169
+4050000000 4050207604 1350000000 1350069201 1350000000 1350069201
+4053000000 4053207812 1351000000 1351069270 1351000000 1351069270
+4056000000 4056207967 1352000000 1352069322 1352000000 1352069322
+4059000000 4059208126 1353000000 1353069375 1353000000 1353069375
+4062000000 4062208300 1354000000 1354069433 1354000000 1354069433
+4065000000 4065208400 1355000000 1355069466 1355000000 1355069466
+4068000000 4068208578 1356000000 1356069526 1356000000 1356069526
+4071000000 4071208727 1357000000 1357069575 1357000000 1357069575
+4074000000 4074208855 1358000000 1358069618 1358000000 1358069618
+4077000000 4077209024 1359000000 1359069674 1359000000 1359069674
+4080000000 4080209144 1360000000 1360069714 1360000000 1360069714
+4083000000 4082036494 1361000000 1360678831 1361000000 1360678831
+4086000000 4086209394 1362000000 1362069798 1362000000 1362069798
+4089000000 4089209652 1363000000 1363069884 1363000000 1363069884
+4092000000 4092209757 1364000000 1364069919 1364000000 1364069919
+4095000000 4095209837 1365000000 1365069945 1365000000 1365069945
+4098000000 4098209984 1366000000 1366069994 1366000000 1366069994
+4101000000 4101210238 1367000000 1367070079 1367000000 1367070079
+4104000000 4104210328 1368000000 1368070109 1368000000 1368070109
+4107000000 4107210573 1369000000 1369070191 1369000000 1369070191
+4110000000 4110210651 1370000000 1370070217 1370000000 1370070217
+4113000000 4113210828 1371000000 1371070276 1371000000 1371070276
+4116000000 4116210974 1372000000 1372070324 1372000000 1372070324
+4119000000 4119211118 1373000000 1373070372 1373000000 1373070372
+4122000000 4120833772 1374000000 1373611257 1374000000 1373611257
+4125000000 4125211433 1375000000 1375070477 1375000000 1375070477
+4128000000 4128211593 1376000000 1376070531 1376000000 1376070531
+4131000000 4131211730 1377000000 1377070576 1377000000 1377070576
+4134000000 4134211888 1378000000 1378070629 1378000000 1378070629
+4137000000 4137212046 1379000000 1379070682 1379000000 1379070682
+4140000000 4140212160 1380000000 1380070720 1380000000 1380070720
+4143000000 4143212321 1381000000 1381070773 1381000000 1381070773
+4146000000 4146212448 1382000000 1382070816 1382000000 1382070816
+4149000000 4149212557 1383000000 1383070852 1383000000 1383070852
+4152000000 4152212699 1384000000 1384070899 1384000000 1384070899
+4155000000 4155212933 1385000000 1385070977 1385000000 1385070977
+4158000000 4158212846 1386000000 1386070948 1386000000 1386070948
+4161000000 4161212967 1387000000 1387070989 1387000000 1387070989
+4164000000 4164213075 1388000000 1388071025 1388000000 1388071025
+4167000000 4167213310 1389000000 1389071103 1389000000 1389071103
+4170000000 4170213489 1390000000 1390071163 1390000000 1390071163
+4173000000 4173127129 1391000000 1391042376 1391000000 1391042376
+4176000000 4176213758 1392000000 1392071252 1392000000 1392071252
+4179000000 4179213931 1393000000 1393071310 1393000000 1393071310
+4182000000 4182214047 1394000000 1394071349 1394000000 1394071349
+4185000000 4185214220 1395000000 1395071406 1395000000 1395071406
+4188000000 4188214392 1396000000 1396071464 1396000000 1396071464
+4191000000 4191214448 1397000000 1397071482 1397000000 1397071482
+4194000000 4194214594 1398000000 1398071531 1398000000 1398071531
+4197000000 4197214790 1399000000 1399071596 1399000000 1399071596
+4200000000 4200214819 1400000000 1400071606 1400000000 1400071606
+4203000000 4203215125 1401000000 1401071708 1401000000 1401071708
+4206000000 4206215297 1402000000 1402071765 1402000000 1402071765
+4209000000 4209215430 1403000000 1403071810 1403000000 1403071810
+4212000000 4212215547 1404000000 1404071849 1404000000 1404071849
+4215000000 4215215732 1405000000 1405071910 1405000000 1405071910
+4218000000 4218215838 1406000000 1406071946 1406000000 1406071946
+4221000000 4221216019 1407000000 1407072006 1407000000 1407072006
+4224000000 4224216231 1408000000 1408072077 1408000000 1408072077
+4227000000 4227216338 1409000000 1409072112 1409000000 1409072112
+4230000000 4230216504 1410000000 1410072168 1410000000 1410072168
+4233000000 4232815249 1411000000 1410938416 1411000000 1410938416
+4236000000 4236216775 1412000000 1412072258 1412000000 1412072258
+4239000000 4239216887 1413000000 1413072295 1413000000 1413072295
+4242000000 4242217096 1414000000 1414072365 1414000000 1414072365
+4245000000 4245217175 1415000000 1415072391 1415000000 1415072391
+4248000000 4248217400 1416000000 1416072466 1416000000 1416072466
+4251000000 4251217527 1417000000 1417072509 1417000000 1417072509
+4254000000 4254217616 1418000000 1418072538 1418000000 1418072538
+4257000000 4257217722 1419000000 1419072574 1419000000 1419072574
+4260000000 4260217933 1420000000 1420072644 1420000000 1420072644
+4263000000 4263218142 1421000000 1421072714 1421000000 1421072714
+4266000000 4266218287 1422000000 1422072762 1422000000 1422072762
+4269000000 4269218413 1423000000 1423072804 1423000000 1423072804
+4272000000 4272218579 1424000000 1424072859 1424000000 1424072859
+4275000000 4275218659 1425000000 1425072886 1425000000 1425072886
+4278000000 4278218894 1426000000 1426072964 1426000000 1426072964
+4281000000 4281219053 1427000000 1427073017 1427000000 1427073017
+4284000000 4284219174 1428000000 1428073058 1428000000 1428073058
+4287000000 4287219334 1429000000 1429073111 1429000000 1429073111
+4290000000 4290219417 1430000000 1430073139 1430000000 1430073139
+4293000000 4293219663 1431000000 1431073221 1431000000 1431073221
+4296000000 4296219786 1432000000 1432073262 1432000000 1432073262
+4299000000 4299219922 1433000000 1433073307 1433000000 1433073307
+4302000000 4302220097 1434000000 1434073365 1434000000 1434073365
+4305000000 4305220219 1435000000 1435073406 1435000000 1435073406
+4308000000 4308220369 1436000000 1436073456 1436000000 1436073456
+4311000000 4311220517 1437000000 1437073505 1437000000 1437073505
+4314000000 4313394211 1438000000 1437798070 1438000000 1437798070
+4317000000 4317220837 1439000000 1439073612 1439000000 1439073612
+4320000000 4320220969 1440000000 1440073656 1440000000 1440073656
+4323000000 4323221143 1441000000 1441073714 1441000000 1441073714
+4326000000 4326221262 1442000000 1442073754 1442000000 1442073754
+4329000000 4329221386 1443000000 1443073795 1443000000 1443073795
+4332000000 4332221605 1444000000 1444073868 1444000000 1444073868
+4335000000 4335221741 1445000000 1445073913 1445000000 1445073913
+4338000000 4338221892 1446000000 1446073964 1446000000 1446073964
+4341000000 4341222042 1447000000 1447074014 1447000000 1447074014
+4344000000 4344222157 1448000000 1448074052 1448000000 1448074052
+4347000000 4347222254 1449000000 1449074084 1449000000 1449074084
+4350000000 4350222462 1450000000 1450074154 1450000000 1450074154
+4353000000 4353222617 1451000000 1451074205 1451000000 1451074205
+4356000000 4356222776 1452000000 1452074258 1452000000 1452074258
+4359000000 4359222950 1453000000 1453074316 1453000000 1453074316
+4362000000 4362223050 1454000000 1454074350 1454000000 1454074350
+4365000000 4365223228 1455000000 1455074409 1455000000 1455074409
+4368000000 4368223377 1456000000 1456074459 1456000000 1456074459
+4371000000 4371223505 1457000000 1457074501 1457000000 1457074501
+4374000000 4374223674 1458000000 1458074558 1458000000 1458074558
+4377000000 4377223794 1459000000 1459074598 1459000000 1459074598
+4380000000 4379051144 1460000000 1459683714 1460000000 1459683714
+4383000000 4383224044 1461000000 1461074681 1461000000 1461074681
+4386000000 4386224302 1462000000 1462074767 1462000000 1462074767
+4389000000 4389224407 1463000000 1463074802 1463000000 1463074802
+4392000000 4392224487 1464000000 1464074829 1464000000 1464074829
+4395000000 4395224634 1465000000 1465074878 1465000000 1465074878
+4398000000 4398224888 1466000000 1466074962 1466000000 1466074962
+4401000000 4401224978 1467000000 1467074992 1467000000 1467074992
+4404000000 4404225223 1468000000 1468075074 1468000000 1468075074
+4407000000 4407225301 1469000000 1469075100 1469000000 1469075100
+4410000000 4410225478 1470000000 1470075159 1470000000 1470075159
+4413000000 4413225624 1471000000 1471075208 1471000000 1471075208
+4416000000 4416225768 1472000000 1472075256 1472000000 1472075256
+4419000000 4417848422 1473000000 1472616140 1473000000 1472616140
+4422000000 4422226083 1474000000 1474075361 1474000000 1474075361
+4425000000 4425226243 1475000000 1475075414 1475000000 1475075414
+4428000000 4428226380 1476000000 1476075460 1476000000 1476075460
+4431000000 4431226538 1477000000 1477075512 1477000000 1477075512
+4434000000 4434226696 1478000000 1478075565 1478000000 1478075565
+4437000000 4437226810 1479000000 1479075603 1479000000 1479075603
+4440000000 4440226971 1480000000 1480075657 1480000000 1480075657
+4443000000 4443227098 1481000000 1481075699 1481000000 1481075699
+4446000000 4446227207 1482000000 1482075735 1482000000 1482075735
+4449000000 4449227349 1483000000 1483075783 1483000000 1483075783
+4452000000 4452227583 1484000000 1484075861 1484000000 1484075861
+4455000000 4455227496 1485000000 1485075832 1485000000 1485075832
+4458000000 4458227617 1486000000 1486075872 1486000000 1486075872
+4461000000 4461227725 1487000000 1487075908 1487000000 1487075908
+4464000000 4464227960 1488000000 1488075986 1488000000 1488075986
+4467000000 4467228139 1489000000 1489076046 1489000000 1489076046
+4470000000 4470141779 1490000000 1490047259 1490000000 1490047259
+4473000000 4473228408 1491000000 1491076136 1491000000 1491076136
+4476000000 4476228581 1492000000 1492076193 1492000000 1492076193
+4479000000 4479228697 1493000000 1493076232 1493000000 1493076232
+4482000000 4482228870 1494000000 1494076290 1494000000 1494076290
+4485000000 4485229042 1495000000 1495076347 1495000000 1495076347
+4488000000 4488229098 1496000000 1496076366 1496000000 1496076366
+4491000000 4491229244 1497000000 1497076414 1497000000 1497076414
+4494000000 4494229440 1498000000 1498076480 1498000000 1498076480
+4497000000 4497229469 1499000000 1499076489 1499000000 1499076489
+4500000000 4500229775 1500000000 1500076591 1500000000 1500076591
+4503000000 4503229947 1501000000 1501076649 1501000000 1501076649
+4506000000 4506230080 1502000000 1502076693 1502000000 1502076693
+4509000000 4509230197 1503000000 1503076732 1503000000 1503076732
+4512000000 4512230382 1504000000 1504076794 1504000000 1504076794
+4515000000 4515230488 1505000000 1505076829 1505000000 1505076829
+4518000000 4518230669 1506000000 1506076889 1506000000 1506076889
+4521000000 4521230881 1507000000 1507076960 1507000000 1507076960
+4524000000 4524230988 1508000000 1508076996 1508000000 1508076996
+4527000000 4527231154 1509000000 1509077051 1509000000 1509077051
+4530000000 4529829899 1510000000 1509943299 1510000000 1509943299
+4533000000 4533231425 1511000000 1511077141 1511000000 1511077141
+4536000000 4536231537 1512000000 1512077179 1512000000 1512077179
+4539000000 4539231746 1513000000 1513077248 1513000000 1513077248
+4542000000 4542231825 1514000000 1514077275 1514000000 1514077275
+4545000000 4545232050 1515000000 1515077350 1515000000 1515077350
+4548000000 4548232177 1516000000 1516077392 1516000000 1516077392
+4551000000 4551232266 1517000000 1517077422 1517000000 1517077422
+4554000000 4554232372 1518000000 1518077457 1518000000 1518077457
+4557000000 4557232583 1519000000 1519077527 1519000000 1519077527
+4560000000 4560232792 1520000000 1520077597 1520000000 1520077597
+4563000000 4563232937 1521000000 1521077645 1521000000 1521077645
+4566000000 4566233063 1522000000 1522077687 1522000000 1522077687
+4569000000 4569233229 1523000000 1523077743 1523000000 1523077743
+4572000000 4572233309 1524000000 1524077769 1524000000 1524077769
+4575000000 4575233544 1525000000 1525077848 1525000000 1525077848
+4578000000 4578233703 1526000000 1526077901 1526000000 1526077901
+4581000000 4581233824 1527000000 1527077941 1527000000 1527077941
+4584000000 4584233984 1528000000 1528077994 1528000000 1528077994
+4587000000 4587234067 1529000000 1529078022 1529000000 1529078022
+4590000000 4590234313 1530000000 1530078104 1530000000 1530078104
+4593000000 4593234436 1531000000 1531078145 1531000000 1531078145
+4596000000 4596234572 1532000000 1532078190 1532000000 1532078190
+4599000000 4599234747 1533000000 1533078249 1533000000 1533078249
+4602000000 4602234869 1534000000 1534078289 1534000000 1534078289
+4605000000 4605235019 1535000000 1535078339 1535000000 1535078339
+4608000000 4608235167 1536000000 1536078389 1536000000 1536078389
+4611000000 4610408861 1537000000 1536802953 1537000000 1536802953
+4614000000 4614235487 1538000000 1538078495 1538000000 1538078495
+4617000000 4617235619 1539000000 1539078539 1539000000 1539078539
+4620000000 4620235793 1540000000 1540078597 1540000000 1540078597
+4623000000 4623235912 1541000000 1541078637 1541000000 1541078637
+4626000000 4626236036 1542000000 1542078678 1542000000 1542078678
+4629000000 4629236255 1543000000 1543078751 1543000000 1543078751
+4632000000 4632236391 1544000000 1544078797 1544000000 1544078797
+4635000000 4635236542 1545000000 1545078847 1545000000 1545078847
+4638000000 4638236692 1546000000 1546078897 1546000000 1546078897
+4641000000 4641236807 1547000000 1547078935 1547000000 1547078935
+4644000000 4644236904 1548000000 1548078968 1548000000 1548078968
+4647000000 4647237112 1549000000 1549079037 1549000000 1549079037
+4650000000 4650237267 1550000000 1550079089 1550000000 1550079089
+4653000000 4653237426 1551000000 1551079142 1551000000 1551079142
+4656000000 4656237600 1552000000 1552079200 1552000000 1552079200
+4659000000 4659237700 1553000000 1553079233 1553000000 1553079233
+4662000000 4662237878 1554000000 1554079292 1554000000 1554079292
+4665000000 4665238027 1555000000 1555079342 1555000000 1555079342
+4668000000 4668238155 1556000000 1556079385 1556000000 1556079385
+4671000000 4671238324 1557000000 1557079441 1557000000 1557079441
+4674000000 4674238444 1558000000 1558079481 1558000000 1558079481
+4677000000 4676065794 1559000000 1558688598 1559000000 1558688598
+4680000000 4680238694 1560000000 1560079564 1560000000 1560079564
+4683000000 4683238952 1561000000 1561079650 1561000000 1561079650
+4686000000 4686239057 1562000000 1562079685 1562000000 1562079685
+4689000000 4689239137 1563000000 1563079712 1563000000 1563079712
+4692000000 4692239284 1564000000 1564079761 1564000000 1564079761
+4695000000 4695239538 1565000000 1565079846 1565000000 1565079846
+4698000000 4698239628 1566000000 1566079876 1566000000 1566079876
+4701000000 4701239873 1567000000 1567079957 1567000000 1567079957
+4704000000 4704239951 1568000000 1568079983 1568000000 1568079983
+4707000000 4707240128 1569000000 1569080042 1569000000 1569080042
+4710000000 4710240274 1570000000 1570080091 1570000000 1570080091
+4713000000 4713240418 1571000000 1571080139 1571000000 1571080139
+4716000000 4714863072 1572000000 1571621024 1572000000 1571621024
+4719000000 4719240733 1573000000 1573080244 1573000000 1573080244
+4722000000 4722240893 1574000000 1574080297 1574000000 1574080297
+4725000000 4725241030 1575000000 1575080343 1575000000 1575080343
+4728000000 4728241188 1576000000 1576080396 1576000000 1576080396
+4731000000 4731241346 1577000000 1577080448 1577000000 1577080448
+4734000000 4734241460 1578000000 1578080486 1578000000 1578080486
+4737000000 4737241621 1579000000 1579080540 1579000000 1579080540
+4740000000 4740241748 1580000000 1580080582 1580000000 1580080582
+4743000000 4743241857 1581000000 1581080619 1581000000 1581080619
+4746000000 4746241999 1582000000 1582080666 1582000000 1582080666
+4749000000 4749242233 1583000000 1583080744 1583000000 1583080744
+4752000000 4752242146 1584000000 1584080715 1584000000 1584080715
+4755000000 4755242267 1585000000 1585080755 1585000000 1585080755
+4758000000 4758242375 1586000000 1586080791 1586000000 1586080791
+4761000000 4761242610 1587000000 1587080870 1587000000 1587080870
+4764000000 4764242789 1588000000 1588080929 1588000000 1588080929
+4767000000 4767156429 1589000000 1589052143 1589000000 1589052143
+4770000000 4770243058 1590000000 1590081019 1590000000 1590081019
+4773000000 4773243231 1591000000 1591081077 1591000000 1591081077
+4776000000 4776243347 1592000000 1592081115 1592000000 1592081115
+4779000000 4779243520 1593000000 1593081173 1593000000 1593081173
+4782000000 4782243692 1594000000 1594081230 1594000000 1594081230
+4785000000 4785243748 1595000000 1595081249 1595000000 1595081249
+4788000000 4788243894 1596000000 1596081298 1596000000 1596081298
+4791000000 4791244090 1597000000 1597081363 1597000000 1597081363
+4794000000 4794244119 1598000000 1598081373 1598000000 1598081373
+4797000000 4797244425 1599000000 1599081475 1599000000 1599081475
+4800000000 4800244597 1600000000 1600081532 1600000000 1600081532
+4803000000 4803244730 1601000000 1601081576 1601000000 1601081576
+4806000000 4806244847 1602000000 1602081615 1602000000 1602081615
+4809000000 4809245032 1603000000 1603081677 1603000000 1603081677
+4812000000 4812245138 1604000000 1604081712 1604000000 1604081712
+4815000000 4815245319 1605000000 1605081773 1605000000 1605081773
+4818000000 4818245531 1606000000 1606081843 1606000000 1606081843
+4821000000 4821245638 1607000000 1607081879 1607000000 1607081879
+4824000000 4824245804 1608000000 1608081934 1608000000 1608081934
+4827000000 4826844549 1609000000 1608948183 1609000000 1608948183
+4830000000 4830246075 1610000000 1610082025 1610000000 1610082025
+4833000000 4833246187 1611000000 1611082062 1611000000 1611082062
+4836000000 4836246396 1612000000 1612082132 1612000000 1612082132
+4839000000 4839246475 1613000000 1613082158 1613000000 1613082158
+4842000000 4842246700 1614000000 1614082233 1614000000 1614082233
+4845000000 4845246827 1615000000 1615082275 1615000000 1615082275
+4848000000 4848246916 1616000000 1616082305 1616000000 1616082305
+4851000000 4851247022 1617000000 1617082340 1617000000 1617082340
+4854000000 4854247233 1618000000 1618082411 1618000000 1618082411
+4857000000 4857247442 1619000000 1619082480 1619000000 1619082480
+4860000000 4860247587 1620000000 1620082529 1620000000 1620082529
+4863000000 4863247713 1621000000 1621082571 1621000000 1621082571
+4866000000 4866247879 1622000000 1622082626 1622000000 1622082626
+4869000000 4869247959 1623000000 1623082653 1623000000 1623082653
+4872000000 4872248194 1624000000 1624082731 1624000000 1624082731
+4875000000 4875248353 1625000000 1625082784 1625000000 1625082784
+4878000000 4878248474 1626000000 1626082824 1626000000 1626082824
+4881000000 4881248634 1627000000 1627082878 1627000000 1627082878
+4884000000 4884248717 1628000000 1628082905 1628000000 1628082905
+4887000000 4887248963 1629000000 1629082987 1629000000 1629082987
+4890000000 4890249086 1630000000 1630083028 1630000000 1630083028
+4893000000 4893249222 1631000000 1631083074 1631000000 1631083074
+4896000000 4896249397 1632000000 1632083132 1632000000 1632083132
+4899000000 4899249519 1633000000 1633083173 1633000000 1633083173
+4902000000 4902249669 1634000000 1634083223 1634000000 1634083223
+4905000000 4905249817 1635000000 1635083272 1635000000 1635083272
+4908000000 4907423511 1636000000 1635807837 1636000000 1635807837
+4911000000 4911250137 1637000000 1637083379 1637000000 1637083379
+4914000000 4914250269 1638000000 1638083423 1638000000 1638083423
+4917000000 4917250443 1639000000 1639083481 1639000000 1639083481
+4920000000 4920250562 1640000000 1640083520 1640000000 1640083520
+4923000000 4923250686 1641000000 1641083562 1641000000 1641083562
+4926000000 4926250905 1642000000 1642083635 1642000000 1642083635
+4929000000 4929251041 1643000000 1643083680 1643000000 1643083680
+4932000000 4932251192 1644000000 1644083730 1644000000 1644083730
+4935000000 4935251342 1645000000 1645083780 1645000000 1645083780
+4938000000 4938251457 1646000000 1646083819 1646000000 1646083819
+4941000000 4941251554 1647000000 1647083851 1647000000 1647083851
+4944000000 4944251762 1648000000 1648083920 1648000000 1648083920
+4947000000 4947251917 1649000000 1649083972 1649000000 1649083972
+4950000000 4950252076 1650000000 1650084025 1650000000 1650084025
+4953000000 4953252250 1651000000 1651084083 1651000000 1651084083
+4956000000 4956252350 1652000000 1652084116 1652000000 1652084116
+4959000000 4959252528 1653000000 1653084176 1653000000 1653084176
+4962000000 4962252677 1654000000 1654084225 1654000000 1654084225
+4965000000 4965252805 1655000000 1655084268 1655000000 1655084268
+4968000000 4968252974 1656000000 1656084324 1656000000 1656084324
+4971000000 4971253094 1657000000 1657084364 1657000000 1657084364
+4974000000 4973080444 1658000000 1657693481 1658000000 1657693481
+4977000000 4977253344 1659000000 1659084448 1659000000 1659084448
+4980000000 4980253602 1660000000 1660084534 1660000000 1660084534
+4983000000 4983253707 1661000000 1661084569 1661000000 1661084569
+4986000000 4986253787 1662000000 1662084595 1662000000 1662084595
+4989000000 4989253934 1663000000 1663084644 1663000000 1663084644
+4992000000 4992254188 1664000000 1664084729 1664000000 1664084729
+4995000000 4995254278 1665000000 1665084759 1665000000 1665084759
+4998000000 4998254523 1666000000 1666084841 1666000000 1666084841
+5001000000 5001254601 1667000000 1667084867 1667000000 1667084867
+5004000000 5004254778 1668000000 1668084926 1668000000 1668084926
+5007000000 5007254924 1669000000 1669084974 1669000000 1669084974
+5010000000 5010255068 1670000000 1670085022 1670000000 1670085022
+5013000000 5011877722 1671000000 1670625907 1671000000 1670625907
+5016000000 5016255383 1672000000 1672085127 1672000000 1672085127
+5019000000 5019255543 1673000000 1673085181 1673000000 1673085181
+5022000000 5022255680 1674000000 1674085226 1674000000 1674085226
+5025000000 5025255838 1675000000 1675085279 1675000000 1675085279
+5028000000 5028255996 1676000000 1676085332 1676000000 1676085332
+5031000000 5031256110 1677000000 1677085370 1677000000 1677085370
+5034000000 5034256271 1678000000 1678085423 1678000000 1678085423
+5037000000 5037256398 1679000000 1679085466 1679000000 1679085466
+5040000000 5040256507 1680000000 1680085502 1680000000 1680085502
+5043000000 5043256649 1681000000 1681085549 1681000000 1681085549
+5046000000 5046256883 1682000000 1682085627 1682000000 1682085627
+5049000000 5049256796 1683000000 1683085598 1683000000 1683085598
+5052000000 5052256917 1684000000 1684085639 1684000000 1684085639
+5055000000 5055257025 1685000000 1685085675 1685000000 1685085675
+5058000000 5058257260 1686000000 1686085753 1686000000 1686085753
+5061000000 5061257439 1687000000 1687085813 1687000000 1687085813
+5064000000 5064171079 1688000000 1688057026 1688000000 1688057026
+5067000000 5067257708 1689000000 1689085902 1689000000 1689085902
+5070000000 5070257881 1690000000 1690085960 1690000000 1690085960
+5073000000 5073257997 1691000000 1691085999 1691000000 1691085999
+5076000000 5076258170 1692000000 1692086056 1692000000 1692086056
+5079000000 5079258342 1693000000 1693086114 1693000000 1693086114
+5082000000 5082258398 1694000000 1694086132 1694000000 1694086132
+5085000000 5085258544 1695000000 1695086181 1695000000 1695086181
+5088000000 5088258740 1696000000 1696086246 1696000000 1696086246
+5091000000 5091258769 1697000000 1697086256 1697000000 1697086256
+5094000000 5094259075 1698000000 1698086358 1698000000 1698086358
+5097000000 5097259247 1699000000 1699086415 1699000000 1699086415
+5100000000 5100259380 1700000000 1700086460 1700000000 1700086460
+5103000000 5103259497 1701000000 1701086499 1701000000 1701086499
+5106000000 5106259682 1702000000 1702086560 1702000000 1702086560
+5109000000 5109259788 1703000000 1703086596 1703000000 1703086596
+5112000000 5112259969 1704000000 1704086656 1704000000 1704086656
+5115000000 5115260181 1705000000 1705086727 1705000000 1705086727
+5118000000 5118260288 1706000000 1706086762 1706000000 1706086762
+5121000000 5121260454 1707000000 1707086818 1707000000 1707086818
+5124000000 5123859199 1708000000 1707953066 1708000000 1707953066
+5127000000 5127260725 1709000000 1709086908 1709000000 1709086908
+5130000000 5130260837 1710000000 1710086945 1710000000 1710086945
+5133000000 5133261046 1711000000 1711087015 1711000000 1711087015
+5136000000 5136261125 1712000000 1712087041 1712000000 1712087041
+5139000000 5139261350 1713000000 1713087116 1713000000 1713087116
+5142000000 5142261477 1714000000 1714087159 1714000000 1714087159
+5145000000 5145261566 1715000000 1715087188 1715000000 1715087188
+5148000000 5148261672 1716000000 1716087224 1716000000 1716087224
+5151000000 5151261883 1717000000 1717087294 1717000000 1717087294
+5154000000 5154262092 1718000000 1718087364 1718000000 1718087364
+5157000000 5157262237 1719000000 1719087412 1719000000 1719087412
+5160000000 5160262363 1720000000 1720087454 1720000000 1720087454
+5163000000 5163262529 1721000000 1721087509 1721000000 1721087509
+5166000000 5166262609 1722000000 1722087536 1722000000 1722087536
+5169000000 5169262844 1723000000 1723087614 1723000000 1723087614
+5172000000 5172263003 1724000000 1724087667 1724000000 1724087667
+5175000000 5175263124 1725000000 1725087708 1725000000 1725087708
+5178000000 5178263284 1726000000 1726087761 1726000000 1726087761
+5181000000 5181263367 1727000000 1727087789 1727000000 1727087789
+5184000000 5184263613 1728000000 1728087871 1728000000 1728087871
+5187000000 5187263736 1729000000 1729087912 1729000000 1729087912
+5190000000 5190263872 1730000000 1730087957 1730000000 1730087957
+5193000000 5193264047 1731000000 1731088015 1731000000 1731088015
+5196000000 5196264169 1732000000 1732088056 1732000000 1732088056
+5199000000 5199264319 1733000000 1733088106 1733000000 1733088106
+5202000000 5202264467 1734000000 1734088155 1734000000 1734088155
+5205000000 5204438161 1735000000 1734812720 1735000000 1734812720
+5208000000 5208264787 1736000000 1736088262 1736000000 1736088262
+5211000000 5211264919 1737000000 1737088306 1737000000 1737088306
+5214000000 5214265093 1738000000 1738088364 1738000000 1738088364
+5217000000 5217265212 1739000000 1739088404 1739000000 1739088404
+5220000000 5220265336 1740000000 1740088445 1740000000 1740088445
+5223000000 5223265555 1741000000 1741088518 1741000000 1741088518
+5226000000 5226265691 1742000000 1742088563 1742000000 1742088563
+5229000000 5229265842 1743000000 1743088614 1743000000 1743088614
+5232000000 5232265992 1744000000 1744088664 1744000000 1744088664
+5235000000 5235266107 1745000000 1745088702 1745000000 1745088702
+5238000000 5238266204 1746000000 1746088734 1746000000 1746088734
+5241000000 5241266412 1747000000 1747088804 1747000000 1747088804
+5244000000 5244266567 1748000000 1748088855 1748000000 1748088855
+5247000000 5247266726 1749000000 1749088908 1749000000 1749088908
+5250000000 5250266900 1750000000 1750088966 1750000000 1750088966
+5253000000 5253267000 1751000000 1751089000 1751000000 1751089000
+5256000000 5256267178 1752000000 1752089059 1752000000 1752089059
+5259000000 5259267327 1753000000 1753089109 1753000000 1753089109
+5262000000 5262267455 1754000000 1754089151 1754000000 1754089151
+5265000000 5265267624 1755000000 1755089208 1755000000 1755089208
+5268000000 5268267744 1756000000 1756089248 1756000000 1756089248
+5271000000 5270095094 1757000000 1756698364 1757000000 1756698364
+5274000000 5274267994 1758000000 1758089331 1758000000 1758089331
+5277000000 5277268252 1759000000 1759089417 1759000000 1759089417
+5280000000 5280268357 1760000000 1760089452 1760000000 1760089452
+5283000000 5283268437 1761000000 1761089479 1761000000 1761089479
+5286000000 5286268584 1762000000 1762089528 1762000000 1762089528
+5289000000 5289268838 1763000000 1763089612 1763000000 1763089612
+5292000000 5292268928 1764000000 1764089642 1764000000 1764089642
+5295000000 5295269173 1765000000 1765089724 1765000000 1765089724
+5298000000 5298269251 1766000000 1766089750 1766000000 1766089750
+5301000000 5301269428 1767000000 1767089809 1767000000 1767089809
+5304000000 5304269574 1768000000 1768089858 1768000000 1768089858
+5307000000 5307269718 1769000000 1769089906 1769000000 1769089906
+5310000000 5308892372 1770000000 1769630790 1770000000 1769630790
+5313000000 5313270033 1771000000 1771090011 1771000000 1771090011
+5316000000 5316270193 1772000000 1772090064 1772000000 1772090064
+5319000000 5319270330 1773000000 1773090110 1773000000 1773090110
+5322000000 5322270488 1774000000 1774090162 1774000000 1774090162
+5325000000 5325270646 1775000000 1775090215 1775000000 1775090215
+5328000000 5328270760 1776000000 1776090253 1776000000 1776090253
+5331000000 5331270921 1777000000 1777090307 1777000000 1777090307
+5334000000 5334271048 1778000000 1778090349 1778000000 1778090349
+5337000000 5337271157 1779000000 1779090385 1779000000 1779090385
+5340000000 5340271299 1780000000 1780090433 1780000000 1780090433
+5343000000 5343271533 1781000000 1781090511 1781000000 1781090511
+5346000000 5346271446 1782000000 1782090482 1782000000 1782090482
+5349000000 5349271567 1783000000 1783090522 1783000000 1783090522
+5352000000 5352271675 1784000000 1784090558 1784000000 1784090558
+5355000000 5355271910 1785000000 1785090636 1785000000 1785090636
+5358000000 5358272089 1786000000 1786090696 1786000000 1786090696
+5361000000 5361185729 1787000000 1787061909 1787000000 1787061909
+5364000000 5364272358 1788000000 1788090786 1788000000 1788090786
+5367000000 5367272531 1789000000 1789090843 1789000000 1789090843
+5370000000 5370272647 1790000000 1790090882 1790000000 1790090882
+5373000000 5373272820 1791000000 1791090940 1791000000 1791090940
+5376000000 5376272992 1792000000 1792090997 1792000000 1792090997
+5379000000 5379273048 1793000000 1793091016 1793000000 1793091016
+5382000000 5382273194 1794000000 1794091064 1794000000 1794091064
+5385000000 5385273390 1795000000 1795091130 1795000000 1795091130
+5388000000 5388273419 1796000000 1796091139 1796000000 1796091139
+5391000000 5391273725 1797000000 1797091241 1797000000 1797091241
+5394000000 5394273897 1798000000 1798091299 1798000000 1798091299
+5397000000 5397274030 1799000000 1799091343 1799000000 1799091343
+5400000000 5400274147 1800000000 1800091382 1800000000 1800091382
+5403000000 5403274332 1801000000 1801091444 1801000000 1801091444
+5406000000 5406274438 1802000000 1802091479 1802000000 1802091479
+5409000000 5409274619 1803000000 1803091539 1803000000 1803091539
+5412000000 5412274831 1804000000 1804091610 1804000000 1804091610
+5415000000 5415274938 1805000000 1805091646 1805000000 1805091646
+5418000000 5418275104 1806000000 1806091701 1806000000 1806091701
+5421000000 5420873849 1807000000 1806957949 1807000000 1806957949
+5424000000 5424275375 1808000000 1808091791 1808000000 1808091791
+5427000000 5427275487 1809000000 1809091829 1809000000 1809091829
+5430000000 5430275696 1810000000 1810091898 1810000000 1810091898
+5433000000 5433275775 1811000000 1811091925 1811000000 1811091925
+5436000000 5436276000 1812000000 1812092000 1812000000 1812092000
+5439000000 5439276127 1813000000 1813092042 1813000000 1813092042
+5442000000 5442276216 1814000000 1814092072 1814000000 1814092072
+5445000000 5445276322 1815000000 1815092107 1815000000 1815092107
+5448000000 5448276533 1816000000 1816092177 1816000000 1816092177
+5451000000 5451276742 1817000000 1817092247 1817000000 1817092247
+5454000000 5454276887 1818000000 1818092295 1818000000 1818092295
+5457000000 5457277013 1819000000 1819092337 1819000000 1819092337
+5460000000 5460277179 1820000000 1820092393 1820000000 1820092393
+5463000000 5463277259 1821000000 1821092419 1821000000 1821092419
+5466000000 5466277494 1822000000 1822092498 1822000000 1822092498
+5469000000 5469277653 1823000000 1823092551 1823000000 1823092551
+5472000000 5472277774 1824000000 1824092591 1824000000 1824092591
+5475000000 5475277934 1825000000 1825092644 1825000000 1825092644
+5478000000 5478278017 1826000000 1826092672 1826000000 1826092672
+5481000000 5481278263 1827000000 1827092754 1827000000 1827092754
+5484000000 5484278386 1828000000 1828092795 1828000000 1828092795
+5487000000 5487278522 1829000000 1829092840 1829000000 1829092840
+5490000000 5490278697 1830000000 1830092899 1830000000 1830092899
+5493000000 5493278819 1831000000 1831092939 1831000000 1831092939
+5496000000 5496278969 1832000000 1832092989 1832000000 1832092989
+5499000000 5499279117 1833000000 1833093039 1833000000 1833093039
+5502000000 5501452811 1834000000 1833817603 1834000000 1833817603
+5505000000 5505279437 1835000000 1835093145 1835000000 1835093145
+5508000000 5508279569 1836000000 1836093189 1836000000 1836093189
+5511000000 5511279743 1837000000 1837093247 1837000000 1837093247
+5514000000 5514279862 1838000000 1838093287 1838000000 1838093287
+5517000000 5517279986 1839000000 1839093328 1839000000 1839093328
+5520000000 5520280205 1840000000 1840093401 1840000000 1840093401
+5523000000 5523280341 1841000000 1841093447 1841000000 1841093447
+5526000000 5526280492 1842000000 1842093497 1842000000 1842093497
+5529000000 5529280642 1843000000 1843093547 1843000000 1843093547
+5532000000 5532280757 1844000000 1844093585 1844000000 1844093585
+5535000000 5535280854 1845000000 1845093618 1845000000 1845093618
+5538000000 5538281062 1846000000 1846093687 1846000000 1846093687
+5541000000 5541281217 1847000000 1847093739 1847000000 1847093739
+5544000000 5544281376 1848000000 1848093792 1848000000 1848093792
+5547000000 5547281550 1849000000 1849093850 1849000000 1849093850
+5550000000 5550281650 1850000000 1850093883 1850000000 1850093883
+5553000000 5553281828 1851000000 1851093942 1851000000 1851093942
+5556000000 5556281977 1852000000 1852093992 1852000000 1852093992
+5559000000 5559282105 1853000000 1853094035 1853000000 1853094035
+5562000000 5562282274 1854000000 1854094091 1854000000 1854094091
+5565000000 5565282394 1855000000 1855094131 1855000000 1855094131
+5568000000 5567109744 1856000000 1855703248 1856000000 1855703248
+5571000000 5571282644 1857000000 1857094214 1857000000 1857094214
+5574000000 5574282902 1858000000 1858094300 1858000000 1858094300
+5577000000 5577283007 1859000000 1859094335 1859000000 1859094335
+5580000000 5580283087 1860000000 1860094362 1860000000 1860094362
+5583000000 5583283234 1861000000 1861094411 1861000000 1861094411
+5586000000 5586283488 1862000000 1862094496 1862000000 1862094496
+5589000000 5589283578 1863000000 1863094526 1863000000 1863094526
+5592000000 5592283823 1864000000 1864094607 1864000000 1864094607
+5595000000 5595283901 1865000000 1865094633 1865000000 1865094633
+5598000000 5598284078 1866000000 1866094692 1866000000 1866094692
+5601000000 5601284224 1867000000 1867094741 1867000000 1867094741
+5604000000 5604284368 1868000000 1868094789 1868000000 1868094789
+5607000000 5605907022 1869000000 1868635674 1869000000 1868635674
+5610000000 5610284683 1870000000 1870094894 1870000000 1870094894
+5613000000 5613284843 1871000000 1871094947 1871000000 1871094947
+5616000000 5616284980 1872000000 1872094993 1872000000 1872094993
+5619000000 5619285138 1873000000 1873095046 1873000000 1873095046
+5622000000 5622285296 1874000000 1874095098 1874000000 1874095098
+5625000000 5625285410 1875000000 1875095136 1875000000 1875095136
+5628000000 5628285571 1876000000 1876095190 1876000000 1876095190
+5631000000 5631285698 1877000000 1877095232 1877000000 1877095232
+5634000000 5634285807 1878000000 1878095269 1878000000 1878095269
+5637000000 5637285949 1879000000 1879095316 1879000000 1879095316
+5640000000 5640286183 1880000000 1880095394 1880000000 1880095394
+5643000000 5643286096 1881000000 1881095365 1881000000 1881095365
+5646000000 5646286217 1882000000 1882095405 1882000000 1882095405
+5649000000 5649286325 1883000000 1883095441 1883000000 1883095441
+5652000000 5652286560 1884000000 1884095520 1884000000 1884095520
+5655000000 5655286739 1885000000 1885095579 1885000000 1885095579
+5658000000 5658200379 1886000000 1886066793 1886000000 1886066793
+5661000000 5661287008 1887000000 1887095669 1887000000 1887095669
+5664000000 5664287181 1888000000 1888095727 1888000000 1888095727
+5667000000 5667287297 1889000000 1889095765 1889000000 1889095765
+5670000000 5670287470 1890000000 1890095823 1890000000 1890095823
+5673000000 5673287642 1891000000 1891095880 1891000000 1891095880
+5676000000 5676287698 1892000000 1892095899 1892000000 1892095899
+5679000000 5679287844 1893000000 1893095948 1893000000 1893095948
+5682000000 5682288040 1894000000 1894096013 1894000000 1894096013
+5685000000 5685288069 1895000000 1895096023 1895000000 1895096023
+5688000000 5688288375 1896000000 1896096125 1896000000 1896096125
+5691000000 5691288547 1897000000 1897096182 1897000000 1897096182
+5694000000 5694288680 1898000000 1898096226 1898000000 1898096226
+5697000000 5697288797 1899000000 1899096265 1899000000 1899096265
+5700000000 5700288982 1900000000 1900096327 1900000000 1900096327
+5703000000 5703289088 1901000000 1901096362 1901000000 1901096362
+5706000000 5706289269 1902000000 1902096423 1902000000 1902096423
+5709000000 5709289481 1903000000 1903096493 1903000000 1903096493
+5712000000 5712289588 1904000000 1904096529 1904000000 1904096529
+5715000000 5715289754 1905000000 1905096584 1905000000 1905096584
+5718000000 5717888499 1906000000 1905962833 1906000000 1905962833
+5721000000 5721290025 1907000000 1907096675 1907000000 1907096675
+5724000000 5724290137 1908000000 1908096712 1908000000 1908096712
+5727000000 5727290346 1909000000 1909096782 1909000000 1909096782
+5730000000 5730290425 1910000000 1910096808 1910000000 1910096808
+5733000000 5733290650 1911000000 1911096883 1911000000 1911096883
+5736000000 5736290777 1912000000 1912096925 1912000000 1912096925
+5739000000 5739290866 1913000000 1913096955 1913000000 1913096955
+5742000000 5742290972 1914000000 1914096990 1914000000 1914096990
+5745000000 5745291183 1915000000 1915097061 1915000000 1915097061
+5748000000 5748291392 1916000000 1916097130 1916000000 1916097130
+5751000000 5751291537 1917000000 1917097179 1917000000 1917097179
+5754000000 5754291663 1918000000 1918097221 1918000000 1918097221
+5757000000 5757291829 1919000000 1919097276 1919000000 1919097276
+5760000000 5760291909 1920000000 1920097303 1920000000 1920097303
+5763000000 5763292144 1921000000 1921097381 1921000000 1921097381
+5766000000 5766292303 1922000000 1922097434 1922000000 1922097434
+5769000000 5769292424 1923000000 1923097474 1923000000 1923097474
+5772000000 5772292584 1924000000 1924097528 1924000000 1924097528
+5775000000 5775292667 1925000000 1925097555 1925000000 1925097555
+5778000000 5778292913 1926000000 1926097637 1926000000 1926097637
+5781000000 5781293036 1927000000 1927097678 1927000000 1927097678
+5784000000 5784293172 1928000000 1928097724 1928000000 1928097724
+5787000000 5787293347 1929000000 1929097782 1929000000 1929097782
+5790000000 5790293469 1930000000 1930097823 1930000000 1930097823
+5793000000 5793293619 1931000000 1931097873 1931000000 1931097873
+5796000000 5796293767 1932000000 1932097922 1932000000 1932097922
+5799000000 5798467461 1933000000 1932822487 1933000000 1932822487
+5802000000 5802294087 1934000000 1934098029 1934000000 1934098029
+5805000000 5805294219 1935000000 1935098073 1935000000 1935098073
+5808000000 5808294393 1936000000 1936098131 1936000000 1936098131
+5811000000 5811294512 1937000000 1937098170 1937000000 1937098170
+5814000000 5814294636 1938000000 1938098212 1938000000 1938098212
+5817000000 5817294855 1939000000 1939098285 1939000000 1939098285
+5820000000 5820294991 1940000000 1940098330 1940000000 1940098330
+5823000000 5823295142 1941000000 1941098380 1941000000 1941098380
+5826000000 5826295292 1942000000 1942098430 1942000000 1942098430
+5829000000 5829295407 1943000000 1943098469 1943000000 1943098469
+5832000000 5832295504 1944000000 1944098501 1944000000 1944098501
+5835000000 5835295712 1945000000 1945098570 1945000000 1945098570
+5838000000 5838295867 1946000000 1946098622 1946000000 1946098622
+5841000000 5841296026 1947000000 1947098675 1947000000 1947098675
+5844000000 5844296200 1948000000 1948098733 1948000000 1948098733
+5847000000 5847296300 1949000000 1949098766 1949000000 1949098766
+5850000000 5850296478 1950000000 1950098826 1950000000 1950098826
+5853000000 5853296627 1951000000 1951098875 1951000000 1951098875
+5856000000 5856296755 1952000000 1952098918 1952000000 1952098918
+5859000000 5859296924 1953000000 1953098974 1953000000 1953098974
+5862000000 5862297044 1954000000 1954099014 1954000000 1954099014
+5865000000 5864124394 1955000000 1954708131 1955000000 1954708131
+5868000000 5868297294 1956000000 1956099098 1956000000 1956099098
+5871000000 5871297552 1957000000 1957099184 1957000000 1957099184
+5874000000 5874297657 1958000000 1958099219 1958000000 1958099219
+5877000000 5877297737 1959000000 1959099245 1959000000 1959099245
+5880000000 5880297884 1960000000 1960099294 1960000000 1960099294
+5883000000 5883298138 1961000000 1961099379 1961000000 1961099379
+5886000000 5886298228 1962000000 1962099409 1962000000 1962099409
+5889000000 5889298473 1963000000 1963099491 1963000000 1963099491
+5892000000 5892298551 1964000000 1964099517 1964000000 1964099517
+5895000000 5895298728 1965000000 1965099576 1965000000 1965099576
+5898000000 5898298874 1966000000 1966099624 1966000000 1966099624
+5901000000 5901299018 1967000000 1967099672 1967000000 1967099672
+5904000000 5902921672 1968000000 1967640557 1968000000 1967640557
+5907000000 5907299333 1969000000 1969099777 1969000000 1969099777
+5910000000 5910299493 1970000000 1970099831 1970000000 1970099831
+5913000000 5913299630 1971000000 1971099876 1971000000 1971099876
+5916000000 5916299788 1972000000 1972099929 1972000000 1972099929
+5919000000 5919299946 1973000000 1973099982 1973000000 1973099982
+5922000000 5922300060 1974000000 1974100020 1974000000 1974100020
+5925000000 5925300221 1975000000 1975100073 1975000000 1975100073
+5928000000 5928300348 1976000000 1976100116 1976000000 1976100116
+5931000000 5931300457 1977000000 1977100152 1977000000 1977100152
+5934000000 5934300599 1978000000 1978100199 1978000000 1978100199
+5937000000 5937300833 1979000000 1979100277 1979000000 1979100277
+5940000000 5940300746 1980000000 1980100248 1980000000 1980100248
+5943000000 5943300867 1981000000 1981100289 1981000000 1981100289
+5946000000 5946300975 1982000000 1982100325 1982000000 1982100325
+5949000000 5949301210 1983000000 1983100403 1983000000 1983100403
+5952000000 5952301389 1984000000 1984100463 1984000000 1984100463
+5955000000 5955215029 1985000000 1985071676 1985000000 1985071676
+5958000000 5958301658 1986000000 1986100552 1986000000 1986100552
+5961000000 5961301831 1987000000 1987100610 1987000000 1987100610
+5964000000 5964301947 1988000000 1988100649 1988000000 1988100649
+5967000000 5967302120 1989000000 1989100706 1989000000 1989100706
+5970000000 5970302292 1990000000 1990100764 1990000000 1990100764
+5973000000 5973302348 1991000000 1991100782 1991000000 1991100782
+5976000000 5976302494 1992000000 1992100831 1992000000 1992100831
+5979000000 5979302690 1993000000 1993100896 1993000000 1993100896
+5982000000 5982302719 1994000000 1994100906 1994000000 1994100906
+5985000000 5985303025 1995000000 1995101008 1995000000 1995101008
+5988000000 5988303197 1996000000 1996101065 1996000000 1996101065
+5991000000 5991303330 1997000000 1997101110 1997000000 1997101110
+5994000000 5994303447 1998000000 1998101149 1998000000 1998101149
+5997000000 5997303632 1999000000 1999101210 1999000000 1999101210
+6000000000 6000303738 2000000000 2000101246 2000000000 2000101246
+6003000000 6003303919 2001000000 2001101306 2001000000 2001101306
+6006000000 6006304131 2002000000 2002101377 2002000000 2002101377
+6009000000 6009304238 2003000000 2003101412 2003000000 2003101412
+6012000000 6012304404 2004000000 2004101468 2004000000 2004101468
+6015000000 6014903149 2005000000 2004967716 2005000000 2004967716
+6018000000 6018304675 2006000000 2006101558 2006000000 2006101558
+6021000000 6021304787 2007000000 2007101595 2007000000 2007101595
+6024000000 6024304996 2008000000 2008101665 2008000000 2008101665
+6027000000 6027305075 2009000000 2009101691 2009000000 2009101691
+6030000000 6030305300 2010000000 2010101766 2010000000 2010101766
+6033000000 6033305427 2011000000 2011101809 2011000000 2011101809
+6036000000 6036305516 2012000000 2012101838 2012000000 2012101838
+6039000000 6039305622 2013000000 2013101874 2013000000 2013101874
+6042000000 6042305833 2014000000 2014101944 2014000000 2014101944
+6045000000 6045306042 2015000000 2015102014 2015000000 2015102014
+6048000000 6048306187 2016000000 2016102062 2016000000 2016102062
+6051000000 6051306313 2017000000 2017102104 2017000000 2017102104
+6054000000 6054306479 2018000000 2018102159 2018000000 2018102159
+6057000000 6057306559 2019000000 2019102186 2019000000 2019102186
+6060000000 6060306794 2020000000 2020102264 2020000000 2020102264
+6063000000 6063306953 2021000000 2021102317 2021000000 2021102317
+6066000000 6066307074 2022000000 2022102358 2022000000 2022102358
+6069000000 6069307234 2023000000 2023102411 2023000000 2023102411
+6072000000 6072307317 2024000000 2024102439 2024000000 2024102439
+6075000000 6075307563 2025000000 2025102521 2025000000 2025102521
+6078000000 6078307686 2026000000 2026102562 2026000000 2026102562
+6081000000 6081307822 2027000000 2027102607 2027000000 2027102607
+6084000000 6084307997 2028000000 2028102665 2028000000 2028102665
+6087000000 6087308119 2029000000 2029102706 2029000000 2029102706
+6090000000 6090308269 2030000000 2030102756 2030000000 2030102756
+6093000000 6093308417 2031000000 2031102805 2031000000 2031102805
+6096000000 6095482111 2032000000 2031827370 2032000000 2031827370
+6099000000 6099308737 2033000000 2033102912 2033000000 2033102912
+6102000000 6102308869 2034000000 2034102956 2034000000 2034102956
+6105000000 6105309043 2035000000 2035103014 2035000000 2035103014
+6108000000 6108309162 2036000000 2036103054 2036000000 2036103054
+6111000000 6111309286 2037000000 2037103095 2037000000 2037103095
+6114000000 6114309505 2038000000 2038103168 2038000000 2038103168
+6117000000 6117309641 2039000000 2039103213 2039000000 2039103213
+6120000000 6120309792 2040000000 2040103264 2040000000 2040103264
+6123000000 6123309942 2041000000 2041103314 2041000000 2041103314
+6126000000 6126310057 2042000000 2042103352 2042000000 2042103352
+6129000000 6129310154 2043000000 2043103384 2043000000 2043103384
+6132000000 6132310362 2044000000 2044103454 2044000000 2044103454
+6135000000 6135310517 2045000000 2045103505 2045000000 2045103505
+6138000000 6138310676 2046000000 2046103558 2046000000 2046103558
+6141000000 6141310850 2047000000 2047103616 2047000000 2047103616
+6144000000 6144310950 2048000000 2048103650 2048000000 2048103650
+6147000000 6147311128 2049000000 2049103709 2049000000 2049103709
+6150000000 6150311277 2050000000 2050103759 2050000000 2050103759
+6153000000 6153311405 2051000000 2051103801 2051000000 2051103801
+6156000000 6156311574 2052000000 2052103858 2052000000 2052103858
+6159000000 6159311694 2053000000 2053103898 2053000000 2053103898
+6162000000 6161139044 2054000000 2053713014 2054000000 2053713014
+6165000000 6165311944 2055000000 2055103981 2055000000 2055103981
+6168000000 6168312202 2056000000 2056104067 2056000000 2056104067
+6171000000 6171312307 2057000000 2057104102 2057000000 2057104102
+6174000000 6174312387 2058000000 2058104129 2058000000 2058104129
+6177000000 6177312534 2059000000 2059104178 2059000000 2059104178
+6180000000 6180312788 2060000000 2060104262 2060000000 2060104262
+6183000000 6183312878 2061000000 2061104292 2061000000 2061104292
+6186000000 6186313123 2062000000 2062104374 2062000000 2062104374
+6189000000 6189313201 2063000000 2063104400 2063000000 2063104400
+6192000000 6192313378 2064000000 2064104459 2064000000 2064104459
+6195000000 6195313524 2065000000 2065104508 2065000000 2065104508
+6198000000 6198313668 2066000000 2066104556 2066000000 2066104556
+6201000000 6199936322 2067000000 2066645440 2067000000 2066645440
+6204000000 6204313983 2068000000 2068104661 2068000000 2068104661
+6207000000 6207314143 2069000000 2069104714 2069000000 2069104714
+6210000000 6210314280 2070000000 2070104760 2070000000 2070104760
+6213000000 6213314438 2071000000 2071104812 2071000000 2071104812
+6216000000 6216314596 2072000000 2072104865 2072000000 2072104865
+6219000000 6219314710 2073000000 2073104903 2073000000 2073104903
+6222000000 6222314871 2074000000 2074104957 2074000000 2074104957
+6225000000 6225314998 2075000000 2075104999 2075000000 2075104999
+6228000000 6228315107 2076000000 2076105035 2076000000 2076105035
+6231000000 6231315249 2077000000 2077105083 2077000000 2077105083
+6234000000 6234315483 2078000000 2078105161 2078000000 2078105161
+6237000000 6237315396 2079000000 2079105132 2079000000 2079105132
+6240000000 6240315517 2080000000 2080105172 2080000000 2080105172
+6243000000 6243315625 2081000000 2081105208 2081000000 2081105208
+6246000000 6246315860 2082000000 2082105286 2082000000 2082105286
+6249000000 6249316039 2083000000 2083105346 2083000000 2083105346
+6252000000 6252229679 2084000000 2084076559 2084000000 2084076559
+6255000000 6255316308 2085000000 2085105436 2085000000 2085105436
+6258000000 6258316481 2086000000 2086105493 2086000000 2086105493
+6261000000 6261316597 2087000000 2087105532 2087000000 2087105532
+6264000000 6264316770 2088000000 2088105590 2088000000 2088105590
+6267000000 6267316942 2089000000 2089105647 2089000000 2089105647
+6270000000 6270316998 2090000000 2090105666 2090000000 2090105666
+6273000000 6273317144 2091000000 2091105714 2091000000 2091105714
+6276000000 6276317340 2092000000 2092105780 2092000000 2092105780
+6279000000 6279317369 2093000000 2093105789 2093000000 2093105789
+6282000000 6282317675 2094000000 2094105891 2094000000 2094105891
+6285000000 6285317847 2095000000 2095105949 2095000000 2095105949
+6288000000 6288317980 2096000000 2096105993 2096000000 2096105993
+6291000000 6291318097 2097000000 2097106032 2097000000 2097106032
+6294000000 6294318282 2098000000 2098106094 2098000000 2098106094
+6297000000 6297318388 2099000000 2099106129 2099000000 2099106129
+6300000000 6300318569 2100000000 2100106189 2100000000 2100106189
+6303000000 6303318781 2101000000 2101106260 2101000000 2101106260
+6306000000 6306318888 2102000000 2102106296 2102000000 2102106296
+6309000000 6309319054 2103000000 2103106351 2103000000 2103106351
+6312000000 6311917799 2104000000 2103972599 2104000000 2103972599
+6315000000 6315319325 2105000000 2105106441 2105000000 2105106441
+6318000000 6318319437 2106000000 2106106479 2106000000 2106106479
+6321000000 6321319646 2107000000 2107106548 2107000000 2107106548
+6324000000 6324319725 2108000000 2108106575 2108000000 2108106575
+6327000000 6327319950 2109000000 2109106650 2109000000 2109106650
+6330000000 6330320077 2110000000 2110106692 2110000000 2110106692
+6333000000 6333320166 2111000000 2111106722 2111000000 2111106722
+6336000000 6336320272 2112000000 2112106757 2112000000 2112106757
+6339000000 6339320483 2113000000 2113106827 2113000000 2113106827
+6342000000 6342320692 2114000000 2114106897 2114000000 2114106897
+6345000000 6345320837 2115000000 2115106945 2115000000 2115106945
+6348000000 6348320963 2116000000 2116106987 2116000000 2116106987
+6351000000 6351321129 2117000000 2117107043 2117000000 2117107043
+6354000000 6354321209 2118000000 2118107069 2118000000 2118107069
+6357000000 6357321444 2119000000 2119107148 2119000000 2119107148
+6360000000 6360321603 2120000000 2120107201 2120000000 2120107201
+6363000000 6363321724 2121000000 2121107241 2121000000 2121107241
+6366000000 6366321884 2122000000 2122107294 2122000000 2122107294
+6369000000 6369321967 2123000000 2123107322 2123000000 2123107322
+6372000000 6372322213 2124000000 2124107404 2124000000 2124107404
+6375000000 6375322336 2125000000 2125107445 2125000000 2125107445
+6378000000 6378322472 2126000000 2126107490 2126000000 2126107490
+6381000000 6381322647 2127000000 2127107549 2127000000 2127107549
+6384000000 6384322769 2128000000 2128107589 2128000000 2128107589
+6387000000 6387322919 2129000000 2129107639 2129000000 2129107639
+6390000000 6390323067 2130000000 2130107689 2130000000 2130107689
+6393000000 6392496761 2131000000 2130832253 2131000000 2130832253
+6396000000 6396323387 2132000000 2132107795 2132000000 2132107795
+6399000000 6399323519 2133000000 2133107839 2133000000 2133107839
+6402000000 6402323693 2134000000 2134107897 2134000000 2134107897
+6405000000 6405323812 2135000000 2135107937 2135000000 2135107937
+6408000000 6408323936 2136000000 2136107978 2136000000 2136107978
+6411000000 6411324155 2137000000 2137108051 2137000000 2137108051
+6414000000 6414324291 2138000000 2138108097 2138000000 2138108097
+6417000000 6417324442 2139000000 2139108147 2139000000 2139108147
+6420000000 6420324592 2140000000 2140108197 2140000000 2140108197
+6423000000 6423324707 2141000000 2141108235 2141000000 2141108235
+6426000000 6426324804 2142000000 2142108268 2142000000 2142108268
+6429000000 6429325012 2143000000 2143108337 2143000000 2143108337
+6432000000 6432325167 2144000000 2144108389 2144000000 2144108389
+6435000000 6435325326 2145000000 2145108442 2145000000 2145108442
+6438000000 6438325500 2146000000 2146108500 2146000000 2146108500
+6441000000 6441325600 2147000000 2147108533 2147000000 2147108533
+6444000000 6444325778 2148000000 2148108592 2148000000 2148108592
+6447000000 6447325927 2149000000 2149108642 2149000000 2149108642
+6450000000 6450326055 2150000000 2150108685 2150000000 2150108685
+6453000000 6453326224 2151000000 2151108741 2151000000 2151108741
+6456000000 6456326344 2152000000 2152108781 2152000000 2152108781
+6459000000 6458153694 2153000000 2152717898 2153000000 2152717898
+6462000000 6462326594 2154000000 2154108864 2154000000 2154108864
+6465000000 6465326852 2155000000 2155108950 2155000000 2155108950
+6468000000 6468326957 2156000000 2156108985 2156000000 2156108985
+6471000000 6471327037 2157000000 2157109012 2157000000 2157109012
+6474000000 6474327184 2158000000 2158109061 2158000000 2158109061
+6477000000 6477327438 2159000000 2159109146 2159000000 2159109146
+6480000000 6480327528 2160000000 2160109176 2160000000 2160109176
+6483000000 6483327773 2161000000 2161109257 2161000000 2161109257
+6486000000 6486327851 2162000000 2162109283 2162000000 2162109283
+6489000000 6489328028 2163000000 2163109342 2163000000 2163109342
+6492000000 6492328174 2164000000 2164109391 2164000000 2164109391
+6495000000 6495328318 2165000000 2165109439 2165000000 2165109439
+6498000000 6496950972 2166000000 2165650324 2166000000 2165650324
+6501000000 6501328633 2167000000 2167109544 2167000000 2167109544
+6504000000 6504328793 2168000000 2168109597 2168000000 2168109597
+6507000000 6507328930 2169000000 2169109643 2169000000 2169109643
+6510000000 6510329088 2170000000 2170109696 2170000000 2170109696
+6513000000 6513329246 2171000000 2171109748 2171000000 2171109748
+6516000000 6516329360 2172000000 2172109786 2172000000 2172109786
+6519000000 6519329521 2173000000 2173109840 2173000000 2173109840
+6522000000 6522329648 2174000000 2174109882 2174000000 2174109882
+6525000000 6525329757 2175000000 2175109919 2175000000 2175109919
+6528000000 6528329899 2176000000 2176109966 2176000000 2176109966
+6531000000 6531330133 2177000000 2177110044 2177000000 2177110044
+6534000000 6534330046 2178000000 2178110015 2178000000 2178110015
+6537000000 6537330167 2179000000 2179110055 2179000000 2179110055
+6540000000 6540330275 2180000000 2180110091 2180000000 2180110091
+6543000000 6543330510 2181000000 2181110170 2181000000 2181110170
+6546000000 6546330689 2182000000 2182110229 2182000000 2182110229
+6549000000 6549244329 2183000000 2183081443 2183000000 2183081443
+6552000000 6552330958 2184000000 2184110319 2184000000 2184110319
+6555000000 6555331131 2185000000 2185110377 2185000000 2185110377
+6558000000 6558331247 2186000000 2186110415 2186000000 2186110415
+6561000000 6561331420 2187000000 2187110473 2187000000 2187110473
+6564000000 6564331592 2188000000 2188110530 2188000000 2188110530
+6567000000 6567331648 2189000000 2189110549 2189000000 2189110549
+6570000000 6570331794 2190000000 2190110598 2190000000 2190110598
+6573000000 6573331990 2191000000 2191110663 2191000000 2191110663
+6576000000 6576332019 2192000000 2192110673 2192000000 2192110673
+6579000000 6579332325 2193000000 2193110775 2193000000 2193110775
+6582000000 6582332497 2194000000 2194110832 2194000000 2194110832
+6585000000 6585332630 2195000000 2195110876 2195000000 2195110876
+6588000000 6588332747 2196000000 2196110915 2196000000 2196110915
+6591000000 6591332932 2197000000 2197110977 2197000000 2197110977
+6594000000 6594333038 2198000000 2198111012 2198000000 2198111012
+6597000000 6597333219 2199000000 2199111073 2199000000 2199111073
+6600000000 6600333431 2200000000 2200111143 2200000000 2200111143
+6603000000 6603333538 2201000000 2201111179 2201000000 2201111179
+6606000000 6606333704 2202000000 2202111234 2202000000 2202111234
+6609000000 6608932449 2203000000 2202977483 2203000000 2202977483
+6612000000 6612333975 2204000000 2204111325 2204000000 2204111325
+6615000000 6615334087 2205000000 2205111362 2205000000 2205111362
+6618000000 6618334296 2206000000 2206111432 2206000000 2206111432
+6621000000 6621334375 2207000000 2207111458 2207000000 2207111458
+6624000000 6624334600 2208000000 2208111533 2208000000 2208111533
+6627000000 6627334727 2209000000 2209111575 2209000000 2209111575
+6630000000 6630334816 2210000000 2210111605 2210000000 2210111605
+6633000000 6633334922 2211000000 2211111640 2211000000 2211111640
+6636000000 6636335133 2212000000 2212111711 2212000000 2212111711
+6639000000 6639335342 2213000000 2213111780 2213000000 2213111780
+6642000000 6642335487 2214000000 2214111829 2214000000 2214111829
+6645000000 6645335613 2215000000 2215111871 2215000000 2215111871
+6648000000 6648335779 2216000000 2216111926 2216000000 2216111926
+6651000000 6651335859 2217000000 2217111953 2217000000 2217111953
+6654000000 6654336094 2218000000 2218112031 2218000000 2218112031
+6657000000 6657336253 2219000000 2219112084 2219000000 2219112084
+6660000000 6660336374 2220000000 2220112124 2220000000 2220112124
+6663000000 6663336534 2221000000 2221112178 2221000000 2221112178
+6666000000 6666336617 2222000000 2222112205 2222000000 2222112205
+6669000000 6669336863 2223000000 2223112287 2223000000 2223112287
+6672000000 6672336986 2224000000 2224112328 2224000000 2224112328
+6675000000 6675337122 2225000000 2225112374 2225000000 2225112374
+6678000000 6678337297 2226000000 2226112432 2226000000 2226112432
+6681000000 6681337419 2227000000 2227112473 2227000000 2227112473
+6684000000 6684337569 2228000000 2228112523 2228000000 2228112523
+6687000000 6687337717 2229000000 2229112572 2229000000 2229112572
+6690000000 6689511411 2230000000 2229837137 2230000000 2229837137
+6693000000 6693338037 2231000000 2231112679 2231000000 2231112679
+6696000000 6696338169 2232000000 2232112723 2232000000 2232112723
+6699000000 6699338343 2233000000 2233112781 2233000000 2233112781
+6702000000 6702338462 2234000000 2234112820 2234000000 2234112820
+6705000000 6705338586 2235000000 2235112862 2235000000 2235112862
+6708000000 6708338805 2236000000 2236112935 2236000000 2236112935
+6711000000 6711338941 2237000000 2237112980 2237000000 2237112980
+6714000000 6714339092 2238000000 2238113030 2238000000 2238113030
+6717000000 6717339242 2239000000 2239113080 2239000000 2239113080
+6720000000 6720339357 2240000000 2240113119 2240000000 2240113119
+6723000000 6723339454 2241000000 2241113151 2241000000 2241113151
+6726000000 6726339662 2242000000 2242113220 2242000000 2242113220
+6729000000 6729339817 2243000000 2243113272 2243000000 2243113272
+6732000000 6732339976 2244000000 2244113325 2244000000 2244113325
+6735000000 6735340150 2245000000 2245113383 2245000000 2245113383
+6738000000 6738340250 2246000000 2246113416 2246000000 2246113416
+6741000000 6741340428 2247000000 2247113476 2247000000 2247113476
+6744000000 6744340577 2248000000 2248113525 2248000000 2248113525
+6747000000 6747340705 2249000000 2249113568 2249000000 2249113568
+6750000000 6750340874 2250000000 2250113624 2250000000 2250113624
+6753000000 6753340994 2251000000 2251113664 2251000000 2251113664
+6756000000 6755168344 2252000000 2251722781 2252000000 2251722781
+6759000000 6759341244 2253000000 2253113748 2253000000 2253113748
+6762000000 6762341502 2254000000 2254113834 2254000000 2254113834
+6765000000 6765341607 2255000000 2255113869 2255000000 2255113869
+6768000000 6768341687 2256000000 2256113895 2256000000 2256113895
+6771000000 6771341834 2257000000 2257113944 2257000000 2257113944
+6774000000 6774342088 2258000000 2258114029 2258000000 2258114029
+6777000000 6777342178 2259000000 2259114059 2259000000 2259114059
+6780000000 6780342423 2260000000 2260114141 2260000000 2260114141
+6783000000 6783342501 2261000000 2261114167 2261000000 2261114167
+6786000000 6786342678 2262000000 2262114226 2262000000 2262114226
+6789000000 6789342824 2263000000 2263114274 2263000000 2263114274
+6792000000 6792342968 2264000000 2264114322 2264000000 2264114322
+6795000000 6793965622 2265000000 2264655207 2265000000 2264655207
+6798000000 6798343283 2266000000 2266114427 2266000000 2266114427
+6801000000 6801343443 2267000000 2267114481 2267000000 2267114481
+6804000000 6804343580 2268000000 2268114526 2268000000 2268114526
+6807000000 6807343738 2269000000 2269114579 2269000000 2269114579
+6810000000 6810343896 2270000000 2270114632 2270000000 2270114632
+6813000000 6813344010 2271000000 2271114670 2271000000 2271114670
+6816000000 6816344171 2272000000 2272114723 2272000000 2272114723
+6819000000 6819344298 2273000000 2273114766 2273000000 2273114766
+6822000000 6822344407 2274000000 2274114802 2274000000 2274114802
+6825000000 6825344549 2275000000 2275114849 2275000000 2275114849
+6828000000 6828344783 2276000000 2276114927 2276000000 2276114927
+6831000000 6831344696 2277000000 2277114898 2277000000 2277114898
+6834000000 6834344817 2278000000 2278114939 2278000000 2278114939
+6837000000 6837344925 2279000000 2279114975 2279000000 2279114975
+6840000000 6840345160 2280000000 2280115053 2280000000 2280115053
+6843000000 6843345339 2281000000 2281115113 2281000000 2281115113
+6846000000 6846258979 2282000000 2282086326 2282000000 2282086326
+6849000000 6849345608 2283000000 2283115202 2283000000 2283115202
+6852000000 6852345781 2284000000 2284115260 2284000000 2284115260
+6855000000 6855345897 2285000000 2285115299 2285000000 2285115299
+6858000000 6858346070 2286000000 2286115356 2286000000 2286115356
+6861000000 6861346242 2287000000 2287115414 2287000000 2287115414
+6864000000 6864346298 2288000000 2288115432 2288000000 2288115432
+6867000000 6867346444 2289000000 2289115481 2289000000 2289115481
+6870000000 6870346640 2290000000 2290115546 2290000000 2290115546
+6873000000 6873346669 2291000000 2291115556 2291000000 2291115556
+6876000000 6876346975 2292000000 2292115658 2292000000 2292115658
+6879000000 6879347147 2293000000 2293115715 2293000000 2293115715
+6882000000 6882347280 2294000000 2294115760 2294000000 2294115760
+6885000000 6885347397 2295000000 2295115799 2295000000 2295115799
+6888000000 6888347582 2296000000 2296115860 2296000000 2296115860
+6891000000 6891347688 2297000000 2297115896 2297000000 2297115896
+6894000000 6894347869 2298000000 2298115956 2298000000 2298115956
+6897000000 6897348081 2299000000 2299116027 2299000000 2299116027
+6900000000 6900348188 2300000000 2300116062 2300000000 2300116062
+6903000000 6903348354 2301000000 2301116118 2301000000 2301116118
+6906000000 6905947099 2302000000 2301982366 2302000000 2301982366
+6909000000 6909348625 2303000000 2303116208 2303000000 2303116208
+6912000000 6912348737 2304000000 2304116245 2304000000 2304116245
+6915000000 6915348946 2305000000 2305116315 2305000000 2305116315
+6918000000 6918349025 2306000000 2306116341 2306000000 2306116341
+6921000000 6921349250 2307000000 2307116416 2307000000 2307116416
+6924000000 6924349377 2308000000 2308116459 2308000000 2308116459
+6927000000 6927349466 2309000000 2309116488 2309000000 2309116488
+6930000000 6930349572 2310000000 2310116524 2310000000 2310116524
+6933000000 6933349783 2311000000 2311116594 2311000000 2311116594
+6936000000 6936349992 2312000000 2312116664 2312000000 2312116664
+6939000000 6939350137 2313000000 2313116712 2313000000 2313116712
+6942000000 6942350263 2314000000 2314116754 2314000000 2314116754
+6945000000 6945350429 2315000000 2315116809 2315000000 2315116809
+6948000000 6948350509 2316000000 2316116836 2316000000 2316116836
+6951000000 6951350744 2317000000 2317116914 2317000000 2317116914
+6954000000 6954350903 2318000000 2318116967 2318000000 2318116967
+6957000000 6957351024 2319000000 2319117008 2319000000 2319117008
+6960000000 6960351184 2320000000 2320117061 2320000000 2320117061
+6963000000 6963351267 2321000000 2321117089 2321000000 2321117089
+6966000000 6966351513 2322000000 2322117171 2322000000 2322117171
+6969000000 6969351636 2323000000 2323117212 2323000000 2323117212
+6972000000 6972351772 2324000000 2324117257 2324000000 2324117257
+6975000000 6975351947 2325000000 2325117315 2325000000 2325117315
+6978000000 6978352069 2326000000 2326117356 2326000000 2326117356
+6981000000 6981352219 2327000000 2327117406 2327000000 2327117406
+6984000000 6984352367 2328000000 2328117455 2328000000 2328117455
+6987000000 6986526061 2329000000 2328842020 2329000000 2328842020
+6990000000 6990352687 2330000000 2330117562 2330000000 2330117562
+6993000000 6993352819 2331000000 2331117606 2331000000 2331117606
+6996000000 6996352993 2332000000 2332117664 2332000000 2332117664
+6999000000 6999353112 2333000000 2333117704 2333000000 2333117704
+7002000000 7002353236 2334000000 2334117745 2334000000 2334117745
+7005000000 7005353455 2335000000 2335117818 2335000000 2335117818
+7008000000 7008353591 2336000000 2336117863 2336000000 2336117863
+7011000000 7011353742 2337000000 2337117914 2337000000 2337117914
+7014000000 7014353892 2338000000 2338117964 2338000000 2338117964
+7017000000 7017354007 2339000000 2339118002 2339000000 2339118002
+7020000000 7020354104 2340000000 2340118034 2340000000 2340118034
+7023000000 7023354312 2341000000 2341118104 2341000000 2341118104
+7026000000 7026354467 2342000000 2342118155 2342000000 2342118155
+7029000000 7029354626 2343000000 2343118208 2343000000 2343118208
+7032000000 7032354800 2344000000 2344118266 2344000000 2344118266
+7035000000 7035354900 2345000000 2345118300 2345000000 2345118300
+7038000000 7038355078 2346000000 2346118359 2346000000 2346118359
+7041000000 7041355227 2347000000 2347118409 2347000000 2347118409
+7044000000 7044355355 2348000000 2348118451 2348000000 2348118451
+7047000000 7047355524 2349000000 2349118508 2349000000 2349118508
+7050000000 7050355644 2350000000 2350118548 2350000000 2350118548
+7053000000 7052182994 2351000000 2350727664 2351000000 2350727664
+7056000000 7056355894 2352000000 2352118631 2352000000 2352118631
+7059000000 7059356152 2353000000 2353118717 2353000000 2353118717
+7062000000 7062356257 2354000000 2354118752 2354000000 2354118752
+7065000000 7065356337 2355000000 2355118779 2355000000 2355118779
+7068000000 7068356484 2356000000 2356118828 2356000000 2356118828
+7071000000 7071356738 2357000000 2357118912 2357000000 2357118912
+7074000000 7074356828 2358000000 2358118942 2358000000 2358118942
+7077000000 7077357073 2359000000 2359119024 2359000000 2359119024
+7080000000 7080357151 2360000000 2360119050 2360000000 2360119050
+7083000000 7083357328 2361000000 2361119109 2361000000 2361119109
+7086000000 7086357474 2362000000 2362119158 2362000000 2362119158
+7089000000 7089357618 2363000000 2363119206 2363000000 2363119206
+7092000000 7090980272 2364000000 2363660090 2364000000 2363660090
+7095000000 7095357933 2365000000 2365119311 2365000000 2365119311
+7098000000 7098358093 2366000000 2366119364 2366000000 2366119364
+7101000000 7101358230 2367000000 2367119410 2367000000 2367119410
+7104000000 7104358388 2368000000 2368119462 2368000000 2368119462
+7107000000 7107358546 2369000000 2369119515 2369000000 2369119515
+7110000000 7110358660 2370000000 2370119553 2370000000 2370119553
+7113000000 7113358821 2371000000 2371119607 2371000000 2371119607
+7116000000 7116358948 2372000000 2372119649 2372000000 2372119649
+7119000000 7119359057 2373000000 2373119685 2373000000 2373119685
+7122000000 7122359199 2374000000 2374119733 2374000000 2374119733
+7125000000 7125359433 2375000000 2375119811 2375000000 2375119811
+7128000000 7128359346 2376000000 2376119782 2376000000 2376119782
+7131000000 7131359467 2377000000 2377119822 2377000000 2377119822
+7134000000 7134359575 2378000000 2378119858 2378000000 2378119858
+7137000000 7137359810 2379000000 2379119936 2379000000 2379119936
+7140000000 7140359989 2380000000 2380119996 2380000000 2380119996
+7143000000 7143273629 2381000000 2381091209 2381000000 2381091209
+7146000000 7146360258 2382000000 2382120086 2382000000 2382120086
+7149000000 7149360431 2383000000 2383120143 2383000000 2383120143
+7152000000 7152360547 2384000000 2384120182 2384000000 2384120182
+7155000000 7155360720 2385000000 2385120240 2385000000 2385120240
+7158000000 7158360892 2386000000 2386120297 2386000000 2386120297
+7161000000 7161360948 2387000000 2387120316 2387000000 2387120316
+7164000000 7164361094 2388000000 2388120364 2388000000 2388120364
+7167000000 7167361290 2389000000 2389120430 2389000000 2389120430
+7170000000 7170361319 2390000000 2390120439 2390000000 2390120439
+7173000000 7173361625 2391000000 2391120541 2391000000 2391120541
+7176000000 7176361797 2392000000 2392120599 2392000000 2392120599
+7179000000 7179361930 2393000000 2393120643 2393000000 2393120643
+7182000000 7182362047 2394000000 2394120682 2394000000 2394120682
+7185000000 7185362232 2395000000 2395120744 2395000000 2395120744
+7188000000 7188362338 2396000000 2396120779 2396000000 2396120779
+7191000000 7191362519 2397000000 2397120839 2397000000 2397120839
+7194000000 7194362731 2398000000 2398120910 2398000000 2398120910
+7197000000 7197362838 2399000000 2399120946 2399000000 2399120946
+7200000000 7200363004 2400000000 2400121001 2400000000 2400121001
+7203000000 7202961749 2401000000 2400987249 2401000000 2400987249
+7206000000 7206363275 2402000000 2402121091 2402000000 2402121091
+7209000000 7209363387 2403000000 2403121129 2403000000 2403121129
+7212000000 7212363596 2404000000 2404121198 2404000000 2404121198
+7215000000 7215363675 2405000000 2405121225 2405000000 2405121225
+7218000000 7218363900 2406000000 2406121300 2406000000 2406121300
+7221000000 7221364027 2407000000 2407121342 2407000000 2407121342
+7224000000 7224364116 2408000000 2408121372 2408000000 2408121372
+7227000000 7227364222 2409000000 2409121407 2409000000 2409121407
+7230000000 7230364433 2410000000 2410121477 2410000000 2410121477
+7233000000 7233364642 2411000000 2411121547 2411000000 2411121547
+7236000000 7236364787 2412000000 2412121595 2412000000 2412121595
+7239000000 7239364913 2413000000 2413121637 2413000000 2413121637
+7242000000 7242365079 2414000000 2414121693 2414000000 2414121693
+7245000000 7245365159 2415000000 2415121719 2415000000 2415121719
+7248000000 7248365394 2416000000 2416121798 2416000000 2416121798
+7251000000 7251365553 2417000000 2417121851 2417000000 2417121851
+7254000000 7254365674 2418000000 2418121891 2418000000 2418121891
+7257000000 7257365834 2419000000 2419121944 2419000000 2419121944
+7260000000 7260365917 2420000000 2420121972 2420000000 2420121972
+7263000000 7263366163 2421000000 2421122054 2421000000 2421122054
+7266000000 7266366286 2422000000 2422122095 2422000000 2422122095
+7269000000 7269366422 2423000000 2423122140 2423000000 2423122140
+7272000000 7272366597 2424000000 2424122199 2424000000 2424122199
+7275000000 7275366719 2425000000 2425122239 2425000000 2425122239
+7278000000 7278366869 2426000000 2426122289 2426000000 2426122289
+7281000000 7281367017 2427000000 2427122339 2427000000 2427122339
+7284000000 7283540711 2428000000 2427846903 2428000000 2427846903
+7287000000 7287367337 2429000000 2429122445 2429000000 2429122445
+7290000000 7290367469 2430000000 2430122489 2430000000 2430122489
+7293000000 7293367643 2431000000 2431122547 2431000000 2431122547
+7296000000 7296367762 2432000000 2432122587 2432000000 2432122587
+7299000000 7299367886 2433000000 2433122628 2433000000 2433122628
+7302000000 7302368105 2434000000 2434122701 2434000000 2434122701
+7305000000 7305368241 2435000000 2435122747 2435000000 2435122747
+7308000000 7308368392 2436000000 2436122797 2436000000 2436122797
+7311000000 7311368542 2437000000 2437122847 2437000000 2437122847
+7314000000 7314368657 2438000000 2438122885 2438000000 2438122885
+7317000000 7317368754 2439000000 2439122918 2439000000 2439122918
+7320000000 7320368962 2440000000 2440122987 2440000000 2440122987
+7323000000 7323369117 2441000000 2441123039 2441000000 2441123039
+7326000000 7326369276 2442000000 2442123092 2442000000 2442123092
+7329000000 7329369450 2443000000 2443123150 2443000000 2443123150
+7332000000 7332369550 2444000000 2444123183 2444000000 2444123183
+7335000000 7335369728 2445000000 2445123242 2445000000 2445123242
+7338000000 7338369877 2446000000 2446123292 2446000000 2446123292
+7341000000 7341370005 2447000000 2447123335 2447000000 2447123335
+7344000000 7344370174 2448000000 2448123391 2448000000 2448123391
+7347000000 7347370294 2449000000 2449123431 2449000000 2449123431
+7350000000 7349197644 2450000000 2449732548 2450000000 2449732548
+7353000000 7353370544 2451000000 2451123514 2451000000 2451123514
+7356000000 7356370802 2452000000 2452123600 2452000000 2452123600
+7359000000 7359370907 2453000000 2453123635 2453000000 2453123635
+7362000000 7362370987 2454000000 2454123662 2454000000 2454123662
+7365000000 7365371134 2455000000 2455123711 2455000000 2455123711
+7368000000 7368371388 2456000000 2456123796 2456000000 2456123796
+7371000000 7371371478 2457000000 2457123826 2457000000 2457123826
+7374000000 7374371723 2458000000 2458123907 2458000000 2458123907
+7377000000 7377371801 2459000000 2459123933 2459000000 2459123933
+7380000000 7380371978 2460000000 2460123992 2460000000 2460123992
+7383000000 7383372124 2461000000 2461124041 2461000000 2461124041
+7386000000 7386372268 2462000000 2462124089 2462000000 2462124089
+7389000000 7387994922 2463000000 2462664974 2463000000 2462664974
+7392000000 7392372583 2464000000 2464124194 2464000000 2464124194
+7395000000 7395372743 2465000000 2465124247 2465000000 2465124247
+7398000000 7398372880 2466000000 2466124293 2466000000 2466124293
+7401000000 7401373038 2467000000 2467124346 2467000000 2467124346
+7404000000 7404373196 2468000000 2468124398 2468000000 2468124398
+7407000000 7407373310 2469000000 2469124436 2469000000 2469124436
+7410000000 7410373471 2470000000 2470124490 2470000000 2470124490
+7413000000 7413373598 2471000000 2471124532 2471000000 2471124532
+7416000000 7416373707 2472000000 2472124569 2472000000 2472124569
+7419000000 7419373849 2473000000 2473124616 2473000000 2473124616
+7422000000 7422374083 2474000000 2474124694 2474000000 2474124694
+7425000000 7425373996 2475000000 2475124665 2475000000 2475124665
+7428000000 7428374117 2476000000 2476124705 2476000000 2476124705
+7431000000 7431374225 2477000000 2477124741 2477000000 2477124741
+7434000000 7434374460 2478000000 2478124820 2478000000 2478124820
+7437000000 7437374639 2479000000 2479124879 2479000000 2479124879
+7440000000 7440288279 2480000000 2480096093 2480000000 2480096093
+7443000000 7443374908 2481000000 2481124969 2481000000 2481124969
+7446000000 7446375081 2482000000 2482125027 2482000000 2482125027
+7449000000 7449375197 2483000000 2483125065 2483000000 2483125065
+7452000000 7452375370 2484000000 2484125123 2484000000 2484125123
+7455000000 7455375542 2485000000 2485125180 2485000000 2485125180
+7458000000 7458375598 2486000000 2486125199 2486000000 2486125199
+7461000000 7461375744 2487000000 2487125248 2487000000 2487125248
+7464000000 7464375940 2488000000 2488125313 2488000000 2488125313
+7467000000 7467375969 2489000000 2489125323 2489000000 2489125323
+7470000000 7470376275 2490000000 2490125425 2490000000 2490125425
+7473000000 7473376447 2491000000 2491125482 2491000000 2491125482
+7476000000 7476376580 2492000000 2492125526 2492000000 2492125526
+7479000000 7479376697 2493000000 2493125565 2493000000 2493125565
+7482000000 7482376882 2494000000 2494125627 2494000000 2494125627
+7485000000 7485376988 2495000000 2495125662 2495000000 2495125662
+7488000000 7488377169 2496000000 2496125723 2496000000 2496125723
+7491000000 7491377381 2497000000 2497125793 2497000000 2497125793
+7494000000 7494377488 2498000000 2498125829 2498000000 2498125829
+7497000000 7497377654 2499000000 2499125884 2499000000 2499125884
+7500000000 7499976399 2500000000 2499992133 2500000000 2499992133
+7503000000 7503377925 2501000000 2501125975 2501000000 2501125975
+7506000000 7506378037 2502000000 2502126012 2502000000 2502126012
+7509000000 7509378246 2503000000 2503126082 2503000000 2503126082
+7512000000 7512378325 2504000000 2504126108 2504000000 2504126108
+7515000000 7515378550 2505000000 2505126183 2505000000 2505126183
+7518000000 7518378677 2506000000 2506126225 2506000000 2506126225
+7521000000 7521378766 2507000000 2507126255 2507000000 2507126255
+7524000000 7524378872 2508000000 2508126290 2508000000 2508126290
+7527000000 7527379083 2509000000 2509126361 2509000000 2509126361
+7530000000 7530379292 2510000000 2510126430 2510000000 2510126430
+7533000000 7533379437 2511000000 2511126479 2511000000 2511126479
+7536000000 7536379563 2512000000 2512126521 2512000000 2512126521
+7539000000 7539379729 2513000000 2513126576 2513000000 2513126576
+7542000000 7542379809 2514000000 2514126603 2514000000 2514126603
+7545000000 7545380044 2515000000 2515126681 2515000000 2515126681
+7548000000 7548380203 2516000000 2516126734 2516000000 2516126734
+7551000000 7551380324 2517000000 2517126774 2517000000 2517126774
+7554000000 7554380484 2518000000 2518126828 2518000000 2518126828
+7557000000 7557380567 2519000000 2519126855 2519000000 2519126855
+7560000000 7560380813 2520000000 2520126937 2520000000 2520126937
+7563000000 7563380936 2521000000 2521126978 2521000000 2521126978
+7566000000 7566381072 2522000000 2522127024 2522000000 2522127024
+7569000000 7569381247 2523000000 2523127082 2523000000 2523127082
+7572000000 7572381369 2524000000 2524127123 2524000000 2524127123
+7575000000 7575381519 2525000000 2525127173 2525000000 2525127173
+7578000000 7578381667 2526000000 2526127222 2526000000 2526127222
+7581000000 7580555361 2527000000 2526851787 2527000000 2526851787
+7584000000 7584381987 2528000000 2528127329 2528000000 2528127329
+7587000000 7587382119 2529000000 2529127373 2529000000 2529127373
+7590000000 7590382293 2530000000 2530127431 2530000000 2530127431
+7593000000 7593382412 2531000000 2531127470 2531000000 2531127470
+7596000000 7596382536 2532000000 2532127512 2532000000 2532127512
+7599000000 7599382755 2533000000 2533127585 2533000000 2533127585
+7602000000 7602382891 2534000000 2534127630 2534000000 2534127630
+7605000000 7605383042 2535000000 2535127680 2535000000 2535127680
+7608000000 7608383192 2536000000 2536127730 2536000000 2536127730
+7611000000 7611383307 2537000000 2537127769 2537000000 2537127769
+7614000000 7614383404 2538000000 2538127801 2538000000 2538127801
+7617000000 7617383612 2539000000 2539127870 2539000000 2539127870
+7620000000 7620383767 2540000000 2540127922 2540000000 2540127922
+7623000000 7623383926 2541000000 2541127975 2541000000 2541127975
+7626000000 7626384100 2542000000 2542128033 2542000000 2542128033
+7629000000 7629384200 2543000000 2543128066 2543000000 2543128066
+7632000000 7632384378 2544000000 2544128126 2544000000 2544128126
+7635000000 7635384527 2545000000 2545128175 2545000000 2545128175
+7638000000 7638384655 2546000000 2546128218 2546000000 2546128218
+7641000000 7641384824 2547000000 2547128274 2547000000 2547128274
+7644000000 7644384944 2548000000 2548128314 2548000000 2548128314
+7647000000 7646212294 2549000000 2548737431 2549000000 2548737431
+7650000000 7650385194 2550000000 2550128398 2550000000 2550128398
+7653000000 7653385452 2551000000 2551128484 2551000000 2551128484
+7656000000 7656385557 2552000000 2552128519 2552000000 2552128519
+7659000000 7659385637 2553000000 2553128545 2553000000 2553128545
+7662000000 7662385784 2554000000 2554128594 2554000000 2554128594
+7665000000 7665386038 2555000000 2555128679 2555000000 2555128679
+7668000000 7668386128 2556000000 2556128709 2556000000 2556128709
+7671000000 7671386373 2557000000 2557128791 2557000000 2557128791
+7674000000 7674386451 2558000000 2558128817 2558000000 2558128817
+7677000000 7677386628 2559000000 2559128876 2559000000 2559128876
+7680000000 7680386774 2560000000 2560128924 2560000000 2560128924
+7683000000 7683386918 2561000000 2561128972 2561000000 2561128972
+7686000000 7685009572 2562000000 2561669857 2562000000 2561669857
+7689000000 7689387233 2563000000 2563129077 2563000000 2563129077
+7692000000 7692387393 2564000000 2564129131 2564000000 2564129131
+7695000000 7695387530 2565000000 2565129176 2565000000 2565129176
+7698000000 7698387688 2566000000 2566129229 2566000000 2566129229
+7701000000 7701387846 2567000000 2567129282 2567000000 2567129282
+7704000000 7704387960 2568000000 2568129320 2568000000 2568129320
+7707000000 7707388121 2569000000 2569129373 2569000000 2569129373
+7710000000 7710388248 2570000000 2570129416 2570000000 2570129416
+7713000000 7713388357 2571000000 2571129452 2571000000 2571129452
+7716000000 7716388499 2572000000 2572129499 2572000000 2572129499
+7719000000 7719388733 2573000000 2573129577 2573000000 2573129577
+7722000000 7722388646 2574000000 2574129548 2574000000 2574129548
+7725000000 7725388767 2575000000 2575129589 2575000000 2575129589
+7728000000 7728388875 2576000000 2576129625 2576000000 2576129625
+7731000000 7731389110 2577000000 2577129703 2577000000 2577129703
+7734000000 7734389289 2578000000 2578129763 2578000000 2578129763
+7737000000 7737302929 2579000000 2579100976 2579000000 2579100976
+7740000000 7740389558 2580000000 2580129852 2580000000 2580129852
+7743000000 7743389731 2581000000 2581129910 2581000000 2581129910
+7746000000 7746389847 2582000000 2582129949 2582000000 2582129949
+7749000000 7749390020 2583000000 2583130006 2583000000 2583130006
+7752000000 7752390192 2584000000 2584130064 2584000000 2584130064
+7755000000 7755390248 2585000000 2585130082 2585000000 2585130082
+7758000000 7758390394 2586000000 2586130131 2586000000 2586130131
+7761000000 7761390590 2587000000 2587130196 2587000000 2587130196
+7764000000 7764390619 2588000000 2588130206 2588000000 2588130206
+7767000000 7767390925 2589000000 2589130308 2589000000 2589130308
+7770000000 7770391097 2590000000 2590130365 2590000000 2590130365
+7773000000 7773391230 2591000000 2591130410 2591000000 2591130410
+7776000000 7776391347 2592000000 2592130449 2592000000 2592130449
+7779000000 7779391532 2593000000 2593130510 2593000000 2593130510
+7782000000 7782391638 2594000000 2594130546 2594000000 2594130546
+7785000000 7785391819 2595000000 2595130606 2595000000 2595130606
+7788000000 7788392031 2596000000 2596130677 2596000000 2596130677
+7791000000 7791392138 2597000000 2597130712 2597000000 2597130712
+7794000000 7794392304 2598000000 2598130768 2598000000 2598130768
+7797000000 7796991049 2599000000 2598997016 2599000000 2598997016
+7800000000 7800392575 2600000000 2600130858 2600000000 2600130858
+7803000000 7803392687 2601000000 2601130895 2601000000 2601130895
+7806000000 7806392896 2602000000 2602130965 2602000000 2602130965
+7809000000 7809392975 2603000000 2603130991 2603000000 2603130991
+7812000000 7812393200 2604000000 2604131066 2604000000 2604131066
+7815000000 7815393327 2605000000 2605131109 2605000000 2605131109
+7818000000 7818393416 2606000000 2606131138 2606000000 2606131138
+7821000000 7821393522 2607000000 2607131174 2607000000 2607131174
+7824000000 7824393733 2608000000 2608131244 2608000000 2608131244
+7827000000 7827393942 2609000000 2609131314 2609000000 2609131314
+7830000000 7830394087 2610000000 2610131362 2610000000 2610131362
+7833000000 7833394213 2611000000 2611131404 2611000000 2611131404
+7836000000 7836394379 2612000000 2612131459 2612000000 2612131459
+7839000000 7839394459 2613000000 2613131486 2613000000 2613131486
+7842000000 7842394694 2614000000 2614131564 2614000000 2614131564
+7845000000 7845394853 2615000000 2615131617 2615000000 2615131617
+7848000000 7848394974 2616000000 2616131658 2616000000 2616131658
+7851000000 7851395134 2617000000 2617131711 2617000000 2617131711
+7854000000 7854395217 2618000000 2618131739 2618000000 2618131739
+7857000000 7857395463 2619000000 2619131821 2619000000 2619131821
+7860000000 7860395586 2620000000 2620131862 2620000000 2620131862
+7863000000 7863395722 2621000000 2621131907 2621000000 2621131907
+7866000000 7866395897 2622000000 2622131965 2622000000 2622131965
+7869000000 7869396019 2623000000 2623132006 2623000000 2623132006
+7872000000 7872396169 2624000000 2624132056 2624000000 2624132056
+7875000000 7875396317 2625000000 2625132105 2625000000 2625132105
+7878000000 7877570011 2626000000 2625856670 2626000000 2625856670
+7881000000 7881396637 2627000000 2627132212 2627000000 2627132212
+7884000000 7884396769 2628000000 2628132256 2628000000 2628132256
+7887000000 7887396943 2629000000 2629132314 2629000000 2629132314
+7890000000 7890397062 2630000000 2630132354 2630000000 2630132354
+7893000000 7893397186 2631000000 2631132395 2631000000 2631132395
+7896000000 7896397405 2632000000 2632132468 2632000000 2632132468
+7899000000 7899397541 2633000000 2633132513 2633000000 2633132513
+7902000000 7902397692 2634000000 2634132564 2634000000 2634132564
+7905000000 7905397842 2635000000 2635132614 2635000000 2635132614
+7908000000 7908397957 2636000000 2636132652 2636000000 2636132652
+7911000000 7911398054 2637000000 2637132684 2637000000 2637132684
+7914000000 7914398262 2638000000 2638132754 2638000000 2638132754
+7917000000 7917398417 2639000000 2639132805 2639000000 2639132805
+7920000000 7920398576 2640000000 2640132858 2640000000 2640132858
+7923000000 7923398750 2641000000 2641132916 2641000000 2641132916
+7926000000 7926398850 2642000000 2642132950 2642000000 2642132950
+7929000000 7929399028 2643000000 2643133009 2643000000 2643133009
+7932000000 7932399177 2644000000 2644133059 2644000000 2644133059
+7935000000 7935399305 2645000000 2645133101 2645000000 2645133101
+7938000000 7938399474 2646000000 2646133158 2646000000 2646133158
+7941000000 7941399594 2647000000 2647133198 2647000000 2647133198
+7944000000 7943226944 2648000000 2647742314 2648000000 2647742314
+7947000000 7947399844 2649000000 2649133281 2649000000 2649133281
+7950000000 7950400102 2650000000 2650133367 2650000000 2650133367
+7953000000 7953400207 2651000000 2651133402 2651000000 2651133402
+7956000000 7956400287 2652000000 2652133429 2652000000 2652133429
+7959000000 7959400434 2653000000 2653133478 2653000000 2653133478
+7962000000 7962400688 2654000000 2654133562 2654000000 2654133562
+7965000000 7965400778 2655000000 2655133592 2655000000 2655133592
+7968000000 7968401023 2656000000 2656133674 2656000000 2656133674
+7971000000 7971401101 2657000000 2657133700 2657000000 2657133700
+7974000000 7974401278 2658000000 2658133759 2658000000 2658133759
+7977000000 7977401424 2659000000 2659133808 2659000000 2659133808
+7980000000 7980401568 2660000000 2660133856 2660000000 2660133856
+7983000000 7982024222 2661000000 2660674740 2661000000 2660674740
+7986000000 7986401883 2662000000 2662133961 2662000000 2662133961
+7989000000 7989402043 2663000000 2663134014 2663000000 2663134014
+7992000000 7992402180 2664000000 2664134060 2664000000 2664134060
+7995000000 7995402338 2665000000 2665134112 2665000000 2665134112
+7998000000 7998402496 2666000000 2666134165 2666000000 2666134165
+8001000000 8001402610 2667000000 2667134203 2667000000 2667134203
+8004000000 8004402771 2668000000 2668134257 2668000000 2668134257
+8007000000 8007402898 2669000000 2669134299 2669000000 2669134299
+8010000000 8010403007 2670000000 2670134335 2670000000 2670134335
+8013000000 8013403149 2671000000 2671134383 2671000000 2671134383
+8016000000 8016403383 2672000000 2672134461 2672000000 2672134461
+8019000000 8019403296 2673000000 2673134432 2673000000 2673134432
+8022000000 8022403417 2674000000 2674134472 2674000000 2674134472
+8025000000 8025403525 2675000000 2675134508 2675000000 2675134508
+8028000000 8028403760 2676000000 2676134586 2676000000 2676134586
+8031000000 8031403939 2677000000 2677134646 2677000000 2677134646
+8034000000 8034317579 2678000000 2678105859 2678000000 2678105859
+8037000000 8037404208 2679000000 2679134736 2679000000 2679134736
+8040000000 8040404381 2680000000 2680134793 2680000000 2680134793
+8043000000 8043404497 2681000000 2681134832 2681000000 2681134832
+8046000000 8046404670 2682000000 2682134890 2682000000 2682134890
+8049000000 8049404842 2683000000 2683134947 2683000000 2683134947
+8052000000 8052404898 2684000000 2684134966 2684000000 2684134966
+8055000000 8055405044 2685000000 2685135014 2685000000 2685135014
+8058000000 8058405240 2686000000 2686135080 2686000000 2686135080
+8061000000 8061405269 2687000000 2687135089 2687000000 2687135089
+8064000000 8064405575 2688000000 2688135191 2688000000 2688135191
+8067000000 8067405747 2689000000 2689135249 2689000000 2689135249
+8070000000 8070405880 2690000000 2690135293 2690000000 2690135293
+8073000000 8073405997 2691000000 2691135332 2691000000 2691135332
+8076000000 8076406182 2692000000 2692135394 2692000000 2692135394
+8079000000 8079406288 2693000000 2693135429 2693000000 2693135429
+8082000000 8082406469 2694000000 2694135489 2694000000 2694135489
+8085000000 8085406681 2695000000 2695135560 2695000000 2695135560
+8088000000 8088406788 2696000000 2696135596 2696000000 2696135596
+8091000000 8091406954 2697000000 2697135651 2697000000 2697135651
+8094000000 8094005699 2698000000 2698001899 2698000000 2698001899
+8097000000 8097407225 2699000000 2699135741 2699000000 2699135741
+8100000000 8100407337 2700000000 2700135779 2700000000 2700135779
+8103000000 8103407546 2701000000 2701135848 2701000000 2701135848
+8106000000 8106407625 2702000000 2702135875 2702000000 2702135875
+8109000000 8109407850 2703000000 2703135950 2703000000 2703135950
+8112000000 8112407977 2704000000 2704135992 2704000000 2704135992
+8115000000 8115408066 2705000000 2705136022 2705000000 2705136022
+8118000000 8118408172 2706000000 2706136057 2706000000 2706136057
+8121000000 8121408383 2707000000 2707136127 2707000000 2707136127
+8124000000 8124408592 2708000000 2708136197 2708000000 2708136197
+8127000000 8127408737 2709000000 2709136245 2709000000 2709136245
+8130000000 8130408863 2710000000 2710136287 2710000000 2710136287
+8133000000 8133409029 2711000000 2711136343 2711000000 2711136343
+8136000000 8136409109 2712000000 2712136369 2712000000 2712136369
+8139000000 8139409344 2713000000 2713136448 2713000000 2713136448
+8142000000 8142409503 2714000000 2714136501 2714000000 2714136501
+8145000000 8145409624 2715000000 2715136541 2715000000 2715136541
+8148000000 8148409784 2716000000 2716136594 2716000000 2716136594
+8151000000 8151409867 2717000000 2717136622 2717000000 2717136622
+8154000000 8154410113 2718000000 2718136704 2718000000 2718136704
+8157000000 8157410236 2719000000 2719136745 2719000000 2719136745
+8160000000 8160410372 2720000000 2720136790 2720000000 2720136790
+8163000000 8163410547 2721000000 2721136849 2721000000 2721136849
+8166000000 8166410669 2722000000 2722136889 2722000000 2722136889
+8169000000 8169410819 2723000000 2723136939 2723000000 2723136939
+8172000000 8172410967 2724000000 2724136989 2724000000 2724136989
+8175000000 8174584661 2725000000 2724861553 2725000000 2724861553
+8178000000 8178411287 2726000000 2726137095 2726000000 2726137095
+8181000000 8181411419 2727000000 2727137139 2727000000 2727137139
+8184000000 8184411593 2728000000 2728137197 2728000000 2728137197
+8187000000 8187411712 2729000000 2729137237 2729000000 2729137237
+8190000000 8190411836 2730000000 2730137278 2730000000 2730137278
+8193000000 8193412055 2731000000 2731137351 2731000000 2731137351
+8196000000 8196412191 2732000000 2732137397 2732000000 2732137397
+8199000000 8199412342 2733000000 2733137447 2733000000 2733137447
+8202000000 8202412492 2734000000 2734137497 2734000000 2734137497
+8205000000 8205412607 2735000000 2735137535 2735000000 2735137535
+8208000000 8208412704 2736000000 2736137568 2736000000 2736137568
+8211000000 8211412912 2737000000 2737137637 2737000000 2737137637
+8214000000 8214413067 2738000000 2738137689 2738000000 2738137689
+8217000000 8217413226 2739000000 2739137742 2739000000 2739137742
+8220000000 8220413400 2740000000 2740137800 2740000000 2740137800
+8223000000 8223413500 2741000000 2741137833 2741000000 2741137833
+8226000000 8226413678 2742000000 2742137892 2742000000 2742137892
+8229000000 8229413827 2743000000 2743137942 2743000000 2743137942
+8232000000 8232413955 2744000000 2744137985 2744000000 2744137985
+8235000000 8235414124 2745000000 2745138041 2745000000 2745138041
+8238000000 8238414244 2746000000 2746138081 2746000000 2746138081
+8241000000 8240241594 2747000000 2746747198 2747000000 2746747198
+8244000000 8244414494 2748000000 2748138164 2748000000 2748138164
+8247000000 8247414752 2749000000 2749138250 2749000000 2749138250
+8250000000 8250414857 2750000000 2750138285 2750000000 2750138285
+8253000000 8253414937 2751000000 2751138312 2751000000 2751138312
+8256000000 8256415084 2752000000 2752138361 2752000000 2752138361
+8259000000 8259415338 2753000000 2753138446 2753000000 2753138446
+8262000000 8262415428 2754000000 2754138476 2754000000 2754138476
+8265000000 8265415673 2755000000 2755138557 2755000000 2755138557
+8268000000 8268415751 2756000000 2756138583 2756000000 2756138583
+8271000000 8271415928 2757000000 2757138642 2757000000 2757138642
+8274000000 8274416074 2758000000 2758138691 2758000000 2758138691
+8277000000 8277416218 2759000000 2759138739 2759000000 2759138739
+8280000000 8279038872 2760000000 2759679624 2760000000 2759679624
+8283000000 8283416533 2761000000 2761138844 2761000000 2761138844
+8286000000 8286416693 2762000000 2762138897 2762000000 2762138897
+8289000000 8289416830 2763000000 2763138943 2763000000 2763138943
+8292000000 8292416988 2764000000 2764138996 2764000000 2764138996
+8295000000 8295417146 2765000000 2765139048 2765000000 2765139048
+8298000000 8298417260 2766000000 2766139086 2766000000 2766139086
+8301000000 8301417421 2767000000 2767139140 2767000000 2767139140
+8304000000 8304417548 2768000000 2768139182 2768000000 2768139182
+8307000000 8307417657 2769000000 2769139219 2769000000 2769139219
+8310000000 8310417799 2770000000 2770139266 2770000000 2770139266
+8313000000 8313418033 2771000000 2771139344 2771000000 2771139344
+8316000000 8316417946 2772000000 2772139315 2772000000 2772139315
+8319000000 8319418067 2773000000 2773139355 2773000000 2773139355
+8322000000 8322418175 2774000000 2774139391 2774000000 2774139391
+8325000000 8325418410 2775000000 2775139470 2775000000 2775139470
+8328000000 8328418589 2776000000 2776139529 2776000000 2776139529
+8331000000 8331332229 2777000000 2777110743 2777000000 2777110743
+8334000000 8334418858 2778000000 2778139619 2778000000 2778139619
+8337000000 8337419031 2779000000 2779139677 2779000000 2779139677
+8340000000 8340419147 2780000000 2780139715 2780000000 2780139715
+8343000000 8343419320 2781000000 2781139773 2781000000 2781139773
+8346000000 8346419492 2782000000 2782139830 2782000000 2782139830
+8349000000 8349419548 2783000000 2783139849 2783000000 2783139849
+8352000000 8352419694 2784000000 2784139898 2784000000 2784139898
+8355000000 8355419890 2785000000 2785139963 2785000000 2785139963
+8358000000 8358419919 2786000000 2786139973 2786000000 2786139973
+8361000000 8361420225 2787000000 2787140075 2787000000 2787140075
+8364000000 8364420397 2788000000 2788140132 2788000000 2788140132
+8367000000 8367420530 2789000000 2789140176 2789000000 2789140176
+8370000000 8370420647 2790000000 2790140215 2790000000 2790140215
+8373000000 8373420832 2791000000 2791140277 2791000000 2791140277
+8376000000 8376420938 2792000000 2792140312 2792000000 2792140312
+8379000000 8379421119 2793000000 2793140373 2793000000 2793140373
+8382000000 8382421331 2794000000 2794140443 2794000000 2794140443
+8385000000 8385421438 2795000000 2795140479 2795000000 2795140479
+8388000000 8388421604 2796000000 2796140534 2796000000 2796140534
+8391000000 8391020349 2797000000 2797006783 2797000000 2797006783
+8394000000 8394421875 2798000000 2798140625 2798000000 2798140625
+8397000000 8397421987 2799000000 2799140662 2799000000 2799140662
+8400000000 8400422196 2800000000 2800140732 2800000000 2800140732
+8403000000 8403422275 2801000000 2801140758 2801000000 2801140758
+8406000000 8406422500 2802000000 2802140833 2802000000 2802140833
+8409000000 8409422627 2803000000 2803140875 2803000000 2803140875
+8412000000 8412422716 2804000000 2804140905 2804000000 2804140905
+8415000000 8415422822 2805000000 2805140940 2805000000 2805140940
+8418000000 8418423033 2806000000 2806141011 2806000000 2806141011
+8421000000 8421423242 2807000000 2807141080 2807000000 2807141080
+8424000000 8424423387 2808000000 2808141129 2808000000 2808141129
+8427000000 8427423513 2809000000 2809141171 2809000000 2809141171
+8430000000 8430423679 2810000000 2810141226 2810000000 2810141226
+8433000000 8433423759 2811000000 2811141253 2811000000 2811141253
+8436000000 8436423994 2812000000 2812141331 2812000000 2812141331
+8439000000 8439424153 2813000000 2813141384 2813000000 2813141384
+8442000000 8442424274 2814000000 2814141424 2814000000 2814141424
+8445000000 8445424434 2815000000 2815141478 2815000000 2815141478
+8448000000 8448424517 2816000000 2816141505 2816000000 2816141505
+8451000000 8451424763 2817000000 2817141587 2817000000 2817141587
+8454000000 8454424886 2818000000 2818141628 2818000000 2818141628
+8457000000 8457425022 2819000000 2819141674 2819000000 2819141674
+8460000000 8460425197 2820000000 2820141732 2820000000 2820141732
+8463000000 8463425319 2821000000 2821141773 2821000000 2821141773
+8466000000 8466425469 2822000000 2822141823 2822000000 2822141823
+8469000000 8469425617 2823000000 2823141872 2823000000 2823141872
+8472000000 8471599311 2824000000 2823866437 2824000000 2823866437
+8475000000 8475425937 2825000000 2825141979 2825000000 2825141979
+8478000000 8478426069 2826000000 2826142023 2826000000 2826142023
+8481000000 8481426243 2827000000 2827142081 2827000000 2827142081
+8484000000 8484426362 2828000000 2828142120 2828000000 2828142120
+8487000000 8487426486 2829000000 2829142162 2829000000 2829142162
+8490000000 8490426705 2830000000 2830142235 2830000000 2830142235
+8493000000 8493426841 2831000000 2831142280 2831000000 2831142280
+8496000000 8496426992 2832000000 2832142330 2832000000 2832142330
+8499000000 8499427142 2833000000 2833142380 2833000000 2833142380
+8502000000 8502427257 2834000000 2834142419 2834000000 2834142419
+8505000000 8505427354 2835000000 2835142451 2835000000 2835142451
+8508000000 8508427562 2836000000 2836142520 2836000000 2836142520
+8511000000 8511427717 2837000000 2837142572 2837000000 2837142572
+8514000000 8514427876 2838000000 2838142625 2838000000 2838142625
+8517000000 8517428050 2839000000 2839142683 2839000000 2839142683
+8520000000 8520428150 2840000000 2840142716 2840000000 2840142716
+8523000000 8523428328 2841000000 2841142776 2841000000 2841142776
+8526000000 8526428477 2842000000 2842142825 2842000000 2842142825
+8529000000 8529428605 2843000000 2843142868 2843000000 2843142868
+8532000000 8532428774 2844000000 2844142924 2844000000 2844142924
+8535000000 8535428894 2845000000 2845142964 2845000000 2845142964
+8538000000 8537256244 2846000000 2845752081 2846000000 2845752081
+8541000000 8541429144 2847000000 2847143048 2847000000 2847143048
+8544000000 8544429402 2848000000 2848143134 2848000000 2848143134
+8547000000 8547429507 2849000000 2849143169 2849000000 2849143169
+8550000000 8550429587 2850000000 2850143195 2850000000 2850143195
+8553000000 8553429734 2851000000 2851143244 2851000000 2851143244
+8556000000 8556429988 2852000000 2852143329 2852000000 2852143329
+8559000000 8559430078 2853000000 2853143359 2853000000 2853143359
+8562000000 8562430323 2854000000 2854143441 2854000000 2854143441
+8565000000 8565430401 2855000000 2855143467 2855000000 2855143467
+8568000000 8568430578 2856000000 2856143526 2856000000 2856143526
+8571000000 8571430724 2857000000 2857143574 2857000000 2857143574
+8574000000 8574430868 2858000000 2858143622 2858000000 2858143622
+8577000000 8576053522 2859000000 2858684507 2859000000 2858684507
+8580000000 8580431183 2860000000 2860143727 2860000000 2860143727
+8583000000 8583431343 2861000000 2861143781 2861000000 2861143781
+8586000000 8586431480 2862000000 2862143826 2862000000 2862143826
+8589000000 8589431638 2863000000 2863143879 2863000000 2863143879
+8592000000 8592431796 2864000000 2864143932 2864000000 2864143932
+8595000000 8595431910 2865000000 2865143970 2865000000 2865143970
+8598000000 8598432071 2866000000 2866144023 2866000000 2866144023
+8601000000 8601432198 2867000000 2867144066 2867000000 2867144066
+8604000000 8604432307 2868000000 2868144102 2868000000 2868144102
+8607000000 8607432449 2869000000 2869144149 2869000000 2869144149
+8610000000 8610432683 2870000000 2870144227 2870000000 2870144227
+8613000000 8613432596 2871000000 2871144198 2871000000 2871144198
+8616000000 8616432717 2872000000 2872144239 2872000000 2872144239
+8619000000 8619432825 2873000000 2873144275 2873000000 2873144275
+8622000000 8622433060 2874000000 2874144353 2874000000 2874144353
+8625000000 8625433239 2875000000 2875144413 2875000000 2875144413
+8628000000 8628346879 2876000000 2876115626 2876000000 2876115626
+8631000000 8631433508 2877000000 2877144502 2877000000 2877144502
+8634000000 8634433681 2878000000 2878144560 2878000000 2878144560
+8637000000 8637433797 2879000000 2879144599 2879000000 2879144599
+8640000000 8640433970 2880000000 2880144656 2880000000 2880144656
+8643000000 8643434142 2881000000 2881144714 2881000000 2881144714
+8646000000 8646434198 2882000000 2882144732 2882000000 2882144732
+8649000000 8649434344 2883000000 2883144781 2883000000 2883144781
+8652000000 8652434540 2884000000 2884144846 2884000000 2884144846
+8655000000 8655434569 2885000000 2885144856 2885000000 2885144856
+8658000000 8658434875 2886000000 2886144958 2886000000 2886144958
+8661000000 8661435047 2887000000 2887145015 2887000000 2887145015
+8664000000 8664435180 2888000000 2888145060 2888000000 2888145060
+8667000000 8667435297 2889000000 2889145099 2889000000 2889145099
+8670000000 8670435482 2890000000 2890145160 2890000000 2890145160
+8673000000 8673435588 2891000000 2891145196 2891000000 2891145196
+8676000000 8676435769 2892000000 2892145256 2892000000 2892145256
+8679000000 8679435981 2893000000 2893145327 2893000000 2893145327
+8682000000 8682436088 2894000000 2894145362 2894000000 2894145362
+8685000000 8685436254 2895000000 2895145418 2895000000 2895145418
+8688000000 8688034999 2896000000 2896011666 2896000000 2896011666
+8691000000 8691436525 2897000000 2897145508 2897000000 2897145508
+8694000000 8694436637 2898000000 2898145545 2898000000 2898145545
+8697000000 8697436846 2899000000 2899145615 2899000000 2899145615
+8700000000 8700436925 2900000000 2900145641 2900000000 2900145641
+8703000000 8703437150 2901000000 2901145716 2901000000 2901145716
+8706000000 8706437277 2902000000 2902145759 2902000000 2902145759
+8709000000 8709437366 2903000000 2903145788 2903000000 2903145788
+8712000000 8712437472 2904000000 2904145824 2904000000 2904145824
+8715000000 8715437683 2905000000 2905145894 2905000000 2905145894
+8718000000 8718437892 2906000000 2906145964 2906000000 2906145964
+8721000000 8721438037 2907000000 2907146012 2907000000 2907146012
+8724000000 8724438163 2908000000 2908146054 2908000000 2908146054
+8727000000 8727438329 2909000000 2909146109 2909000000 2909146109
+8730000000 8730438409 2910000000 2910146136 2910000000 2910146136
+8733000000 8733438644 2911000000 2911146214 2911000000 2911146214
+8736000000 8736438803 2912000000 2912146267 2912000000 2912146267
+8739000000 8739438924 2913000000 2913146308 2913000000 2913146308
+8742000000 8742439084 2914000000 2914146361 2914000000 2914146361
+8745000000 8745439167 2915000000 2915146389 2915000000 2915146389
+8748000000 8748439413 2916000000 2916146471 2916000000 2916146471
+8751000000 8751439536 2917000000 2917146512 2917000000 2917146512
+8754000000 8754439672 2918000000 2918146557 2918000000 2918146557
+8757000000 8757439847 2919000000 2919146615 2919000000 2919146615
+8760000000 8760439969 2920000000 2920146656 2920000000 2920146656
+8763000000 8763440119 2921000000 2921146706 2921000000 2921146706
+8766000000 8766440267 2922000000 2922146755 2922000000 2922146755
+8769000000 8768613961 2923000000 2922871320 2923000000 2922871320
+8772000000 8772440587 2924000000 2924146862 2924000000 2924146862
+8775000000 8775440719 2925000000 2925146906 2925000000 2925146906
+8778000000 8778440893 2926000000 2926146964 2926000000 2926146964
+8781000000 8781441012 2927000000 2927147004 2927000000 2927147004
+8784000000 8784441136 2928000000 2928147045 2928000000 2928147045
+8787000000 8787441355 2929000000 2929147118 2929000000 2929147118
+8790000000 8790441491 2930000000 2930147163 2930000000 2930147163
+8793000000 8793441642 2931000000 2931147214 2931000000 2931147214
+8796000000 8796441792 2932000000 2932147264 2932000000 2932147264
+8799000000 8799441907 2933000000 2933147302 2933000000 2933147302
+8802000000 8802442004 2934000000 2934147334 2934000000 2934147334
+8805000000 8805442212 2935000000 2935147404 2935000000 2935147404
+8808000000 8808442367 2936000000 2936147455 2936000000 2936147455
+8811000000 8811442526 2937000000 2937147508 2937000000 2937147508
+8814000000 8814442700 2938000000 2938147566 2938000000 2938147566
+8817000000 8817442800 2939000000 2939147600 2939000000 2939147600
+8820000000 8820442978 2940000000 2940147659 2940000000 2940147659
+8823000000 8823443127 2941000000 2941147709 2941000000 2941147709
+8826000000 8826443255 2942000000 2942147751 2942000000 2942147751
+8829000000 8829443424 2943000000 2943147808 2943000000 2943147808
+8832000000 8832443544 2944000000 2944147848 2944000000 2944147848
+8835000000 8834270894 2945000000 2944756964 2945000000 2944756964
+8838000000 8838443794 2946000000 2946147931 2946000000 2946147931
+8841000000 8841444052 2947000000 2947148017 2947000000 2947148017
+8844000000 8844444157 2948000000 2948148052 2948000000 2948148052
+8847000000 8847444237 2949000000 2949148079 2949000000 2949148079
+8850000000 8850444384 2950000000 2950148128 2950000000 2950148128
+8853000000 8853444638 2951000000 2951148212 2951000000 2951148212
+8856000000 8856444728 2952000000 2952148242 2952000000 2952148242
+8859000000 8859444973 2953000000 2953148324 2953000000 2953148324
+8862000000 8862445051 2954000000 2954148350 2954000000 2954148350
+8865000000 8865445228 2955000000 2955148409 2955000000 2955148409
+8868000000 8868445374 2956000000 2956148458 2956000000 2956148458
+8871000000 8871445518 2957000000 2957148506 2957000000 2957148506
+8874000000 8873068172 2958000000 2957689390 2958000000 2957689390
+8877000000 8877445833 2959000000 2959148611 2959000000 2959148611
+8880000000 8880445993 2960000000 2960148664 2960000000 2960148664
+8883000000 8883446130 2961000000 2961148710 2961000000 2961148710
+8886000000 8886446288 2962000000 2962148762 2962000000 2962148762
+8889000000 8889446446 2963000000 2963148815 2963000000 2963148815
+8892000000 8892446560 2964000000 2964148853 2964000000 2964148853
+8895000000 8895446721 2965000000 2965148907 2965000000 2965148907
+8898000000 8898446848 2966000000 2966148949 2966000000 2966148949
+8901000000 8901446957 2967000000 2967148985 2967000000 2967148985
+8904000000 8904447099 2968000000 2968149033 2968000000 2968149033
+8907000000 8907447333 2969000000 2969149111 2969000000 2969149111
+8910000000 8910447246 2970000000 2970149082 2970000000 2970149082
+8913000000 8913447367 2971000000 2971149122 2971000000 2971149122
+8916000000 8916447475 2972000000 2972149158 2972000000 2972149158
+8919000000 8919447710 2973000000 2973149236 2973000000 2973149236
+8922000000 8922447889 2974000000 2974149296 2974000000 2974149296
+8925000000 8925361529 2975000000 2975120509 2975000000 2975120509
+8928000000 8928448158 2976000000 2976149386 2976000000 2976149386
+8931000000 8931448331 2977000000 2977149443 2977000000 2977149443
+8934000000 8934448447 2978000000 2978149482 2978000000 2978149482
+8937000000 8937448620 2979000000 2979149540 2979000000 2979149540
+8940000000 8940448792 2980000000 2980149597 2980000000 2980149597
+8943000000 8943448848 2981000000 2981149616 2981000000 2981149616
+8946000000 8946448994 2982000000 2982149664 2982000000 2982149664
+8949000000 8949449190 2983000000 2983149730 2983000000 2983149730
+8952000000 8952449219 2984000000 2984149739 2984000000 2984149739
+8955000000 8955449525 2985000000 2985149841 2985000000 2985149841
+8958000000 8958449697 2986000000 2986149899 2986000000 2986149899
+8961000000 8961449830 2987000000 2987149943 2987000000 2987149943
+8964000000 8964449947 2988000000 2988149982 2988000000 2988149982
+8967000000 8967450132 2989000000 2989150044 2989000000 2989150044
+8970000000 8970450238 2990000000 2990150079 2990000000 2990150079
+8973000000 8973450419 2991000000 2991150139 2991000000 2991150139
+8976000000 8976450631 2992000000 2992150210 2992000000 2992150210
+8979000000 8979450738 2993000000 2993150246 2993000000 2993150246
+8982000000 8982450904 2994000000 2994150301 2994000000 2994150301
+8985000000 8985049649 2995000000 2995016549 2995000000 2995016549
+8988000000 8988451175 2996000000 2996150391 2996000000 2996150391
+8991000000 8991451287 2997000000 2997150429 2997000000 2997150429
+8994000000 8994451496 2998000000 2998150498 2998000000 2998150498
+8997000000 8997451575 2999000000 2999150525 2999000000 2999150525
+9000000000 9000451800 3000000000 3000150600 3000000000 3000150600
+9003000000 9003451927 3001000000 3001150642 3001000000 3001150642
+9006000000 9006452016 3002000000 3002150672 3002000000 3002150672
+9009000000 9009452122 3003000000 3003150707 3003000000 3003150707
+9012000000 9012452333 3004000000 3004150777 3004000000 3004150777
+9015000000 9015452542 3005000000 3005150847 3005000000 3005150847
+9018000000 9018452687 3006000000 3006150895 3006000000 3006150895
+9021000000 9021452813 3007000000 3007150937 3007000000 3007150937
+9024000000 9024452979 3008000000 3008150993 3008000000 3008150993
+9027000000 9027453059 3009000000 3009151019 3009000000 3009151019
+9030000000 9030453294 3010000000 3010151098 3010000000 3010151098
+9033000000 9033453453 3011000000 3011151151 3011000000 3011151151
+9036000000 9036453574 3012000000 3012151191 3012000000 3012151191
+9039000000 9039453734 3013000000 3013151244 3013000000 3013151244
+9042000000 9042453817 3014000000 3014151272 3014000000 3014151272
+9045000000 9045454063 3015000000 3015151354 3015000000 3015151354
+9048000000 9048454186 3016000000 3016151395 3016000000 3016151395
+9051000000 9051454322 3017000000 3017151440 3017000000 3017151440
+9054000000 9054454497 3018000000 3018151499 3018000000 3018151499
+9057000000 9057454619 3019000000 3019151539 3019000000 3019151539
+9060000000 9060454769 3020000000 3020151589 3020000000 3020151589
+9063000000 9063454917 3021000000 3021151639 3021000000 3021151639
+9066000000 9065628611 3022000000 3021876203 3022000000 3021876203
+9069000000 9069455237 3023000000 3023151745 3023000000 3023151745
+9072000000 9072455369 3024000000 3024151789 3024000000 3024151789
+9075000000 9075455543 3025000000 3025151847 3025000000 3025151847
+9078000000 9078455662 3026000000 3026151887 3026000000 3026151887
+9081000000 9081455786 3027000000 3027151928 3027000000 3027151928
+9084000000 9084456005 3028000000 3028152001 3028000000 3028152001
+9087000000 9087456141 3029000000 3029152047 3029000000 3029152047
+9090000000 9090456292 3030000000 3030152097 3030000000 3030152097
+9093000000 9093456442 3031000000 3031152147 3031000000 3031152147
+9096000000 9096456557 3032000000 3032152185 3032000000 3032152185
+9099000000 9099456654 3033000000 3033152218 3033000000 3033152218
+9102000000 9102456862 3034000000 3034152287 3034000000 3034152287
+9105000000 9105457017 3035000000 3035152339 3035000000 3035152339
+9108000000 9108457176 3036000000 3036152392 3036000000 3036152392
+9111000000 9111457350 3037000000 3037152450 3037000000 3037152450
+9114000000 9114457450 3038000000 3038152483 3038000000 3038152483
+9117000000 9117457628 3039000000 3039152542 3039000000 3039152542
+9120000000 9120457777 3040000000 3040152592 3040000000 3040152592
+9123000000 9123457905 3041000000 3041152635 3041000000 3041152635
+9126000000 9126458074 3042000000 3042152691 3042000000 3042152691
+9129000000 9129458194 3043000000 3043152731 3043000000 3043152731
+9132000000 9131285544 3044000000 3043761848 3044000000 3043761848
+9135000000 9135458444 3045000000 3045152814 3045000000 3045152814
+9138000000 9138458702 3046000000 3046152900 3046000000 3046152900
+9141000000 9141458807 3047000000 3047152935 3047000000 3047152935
+9144000000 9144458887 3048000000 3048152962 3048000000 3048152962
+9147000000 9147459034 3049000000 3049153011 3049000000 3049153011
+9150000000 9150459288 3050000000 3050153096 3050000000 3050153096
+9153000000 9153459378 3051000000 3051153126 3051000000 3051153126
+9156000000 9156459623 3052000000 3052153207 3052000000 3052153207
+9159000000 9159459701 3053000000 3053153233 3053000000 3053153233
+9162000000 9162459878 3054000000 3054153292 3054000000 3054153292
+9165000000 9165460024 3055000000 3055153341 3055000000 3055153341
+9168000000 9168460168 3056000000 3056153389 3056000000 3056153389
+9171000000 9170082822 3057000000 3056694274 3057000000 3056694274
+9174000000 9174460483 3058000000 3058153494 3058000000 3058153494
+9177000000 9177460643 3059000000 3059153547 3059000000 3059153547
+9180000000 9180460780 3060000000 3060153593 3060000000 3060153593
+9183000000 9183460938 3061000000 3061153646 3061000000 3061153646
+9186000000 9186461096 3062000000 3062153698 3062000000 3062153698
+9189000000 9189461210 3063000000 3063153736 3063000000 3063153736
+9192000000 9192461371 3064000000 3064153790 3064000000 3064153790
+9195000000 9195461498 3065000000 3065153832 3065000000 3065153832
+9198000000 9198461607 3066000000 3066153869 3066000000 3066153869
+9201000000 9201461749 3067000000 3067153916 3067000000 3067153916
+9204000000 9204461983 3068000000 3068153994 3068000000 3068153994
+9207000000 9207461896 3069000000 3069153965 3069000000 3069153965
+9210000000 9210462017 3070000000 3070154005 3070000000 3070154005
+9213000000 9213462125 3071000000 3071154041 3071000000 3071154041
+9216000000 9216462360 3072000000 3072154120 3072000000 3072154120
+9219000000 9219462539 3073000000 3073154179 3073000000 3073154179
+9222000000 9222376179 3074000000 3074125393 3074000000 3074125393
+9225000000 9225462808 3075000000 3075154269 3075000000 3075154269
+9228000000 9228462981 3076000000 3076154327 3076000000 3076154327
+9231000000 9231463097 3077000000 3077154365 3077000000 3077154365
+9234000000 9234463270 3078000000 3078154423 3078000000 3078154423
+9237000000 9237463442 3079000000 3079154480 3079000000 3079154480
+9240000000 9240463498 3080000000 3080154499 3080000000 3080154499
+9243000000 9243463644 3081000000 3081154548 3081000000 3081154548
+9246000000 9246463840 3082000000 3082154613 3082000000 3082154613
+9249000000 9249463869 3083000000 3083154623 3083000000 3083154623
+9252000000 9252464175 3084000000 3084154725 3084000000 3084154725
+9255000000 9255464347 3085000000 3085154782 3085000000 3085154782
+9258000000 9258464480 3086000000 3086154826 3086000000 3086154826
+9261000000 9261464597 3087000000 3087154865 3087000000 3087154865
+9264000000 9264464782 3088000000 3088154927 3088000000 3088154927
+9267000000 9267464888 3089000000 3089154962 3089000000 3089154962
+9270000000 9270465069 3090000000 3090155023 3090000000 3090155023
+9273000000 9273465281 3091000000 3091155093 3091000000 3091155093
+9276000000 9276465388 3092000000 3092155129 3092000000 3092155129
+9279000000 9279465554 3093000000 3093155184 3093000000 3093155184
+9282000000 9282064299 3094000000 3094021433 3094000000 3094021433
+9285000000 9285465825 3095000000 3095155275 3095000000 3095155275
+9288000000 9288465937 3096000000 3096155312 3096000000 3096155312
+9291000000 9291466146 3097000000 3097155382 3097000000 3097155382
+9294000000 9294466225 3098000000 3098155408 3098000000 3098155408
+9297000000 9297466450 3099000000 3099155483 3099000000 3099155483
+9300000000 9300466577 3100000000 3100155525 3100000000 3100155525
+9303000000 9303466666 3101000000 3101155555 3101000000 3101155555
+9306000000 9306466772 3102000000 3102155590 3102000000 3102155590
+9309000000 9309466983 3103000000 3103155661 3103000000 3103155661
+9312000000 9312467192 3104000000 3104155730 3104000000 3104155730
+9315000000 9315467337 3105000000 3105155779 3105000000 3105155779
+9318000000 9318467463 3106000000 3106155821 3106000000 3106155821
+9321000000 9321467629 3107000000 3107155876 3107000000 3107155876
+9324000000 9324467709 3108000000 3108155903 3108000000 3108155903
+9327000000 9327467944 3109000000 3109155981 3109000000 3109155981
+9330000000 9330468103 3110000000 3110156034 3110000000 3110156034
+9333000000 9333468224 3111000000 3111156074 3111000000 3111156074
+9336000000 9336468384 3112000000 3112156128 3112000000 3112156128
+9339000000 9339468467 3113000000 3113156155 3113000000 3113156155
+9342000000 9342468713 3114000000 3114156237 3114000000 3114156237
+9345000000 9345468836 3115000000 3115156278 3115000000 3115156278
+9348000000 9348468972 3116000000 3116156324 3116000000 3116156324
+9351000000 9351469147 3117000000 3117156382 3117000000 3117156382
+9354000000 9354469269 3118000000 3118156423 3118000000 3118156423
+9357000000 9357469419 3119000000 3119156473 3119000000 3119156473
+9360000000 9360469567 3120000000 3120156522 3120000000 3120156522
+9363000000 9362643261 3121000000 3120881087 3121000000 3120881087
+9366000000 9366469887 3122000000 3122156629 3122000000 3122156629
+9369000000 9369470019 3123000000 3123156673 3123000000 3123156673
+9372000000 9372470193 3124000000 3124156731 3124000000 3124156731
+9375000000 9375470312 3125000000 3125156770 3125000000 3125156770
+9378000000 9378470436 3126000000 3126156812 3126000000 3126156812
+9381000000 9381470655 3127000000 3127156885 3127000000 3127156885
+9384000000 9384470791 3128000000 3128156930 3128000000 3128156930
+9387000000 9387470942 3129000000 3129156980 3129000000 3129156980
+9390000000 9390471092 3130000000 3130157030 3130000000 3130157030
+9393000000 9393471207 3131000000 3131157069 3131000000 3131157069
+9396000000 9396471304 3132000000 3132157101 3132000000 3132157101
+9399000000 9399471512 3133000000 3133157170 3133000000 3133157170
+9402000000 9402471667 3134000000 3134157222 3134000000 3134157222
+9405000000 9405471826 3135000000 3135157275 3135000000 3135157275
+9408000000 9408472000 3136000000 3136157333 3136000000 3136157333
+9411000000 9411472100 3137000000 3137157366 3137000000 3137157366
+9414000000 9414472278 3138000000 3138157426 3138000000 3138157426
+9417000000 9417472427 3139000000 3139157475 3139000000 3139157475
+9420000000 9420472555 3140000000 3140157518 3140000000 3140157518
+9423000000 9423472724 3141000000 3141157574 3141000000 3141157574
+9426000000 9426472844 3142000000 3142157614 3142000000 3142157614
+9429000000 9428300194 3143000000 3142766731 3143000000 3142766731
+9432000000 9432473094 3144000000 3144157698 3144000000 3144157698
+9435000000 9435473352 3145000000 3145157784 3145000000 3145157784
+9438000000 9438473457 3146000000 3146157819 3146000000 3146157819
+9441000000 9441473537 3147000000 3147157845 3147000000 3147157845
+9444000000 9444473684 3148000000 3148157894 3148000000 3148157894
+9447000000 9447473938 3149000000 3149157979 3149000000 3149157979
+9450000000 9450474028 3150000000 3150158009 3150000000 3150158009
+9453000000 9453474273 3151000000 3151158091 3151000000 3151158091
+9456000000 9456474351 3152000000 3152158117 3152000000 3152158117
+9459000000 9459474528 3153000000 3153158176 3153000000 3153158176
+9462000000 9462474674 3154000000 3154158224 3154000000 3154158224
+9465000000 9465474818 3155000000 3155158272 3155000000 3155158272
+9468000000 9467097472 3156000000 3155699157 3156000000 3155699157
+9471000000 9471475133 3157000000 3157158377 3157000000 3157158377
+9474000000 9474475293 3158000000 3158158431 3158000000 3158158431
+9477000000 9477475430 3159000000 3159158476 3159000000 3159158476
+9480000000 9480475588 3160000000 3160158529 3160000000 3160158529
+9483000000 9483475746 3161000000 3161158582 3161000000 3161158582
+9486000000 9486475860 3162000000 3162158620 3162000000 3162158620
+9489000000 9489476021 3163000000 3163158673 3163000000 3163158673
+9492000000 9492476148 3164000000 3164158716 3164000000 3164158716
+9495000000 9495476257 3165000000 3165158752 3165000000 3165158752
+9498000000 9498476399 3166000000 3166158799 3166000000 3166158799
+9501000000 9501476633 3167000000 3167158877 3167000000 3167158877
+9504000000 9504476546 3168000000 3168158848 3168000000 3168158848
+9507000000 9507476667 3169000000 3169158889 3169000000 3169158889
+9510000000 9510476775 3170000000 3170158925 3170000000 3170158925
+9513000000 9513477010 3171000000 3171159003 3171000000 3171159003
+9516000000 9516477189 3172000000 3172159063 3172000000 3172159063
+9519000000 9519390829 3173000000 3173130276 3173000000 3173130276
+9522000000 9522477458 3174000000 3174159152 3174000000 3174159152
+9525000000 9525477631 3175000000 3175159210 3175000000 3175159210
+9528000000 9528477747 3176000000 3176159249 3176000000 3176159249
+9531000000 9531477920 3177000000 3177159306 3177000000 3177159306
+9534000000 9534478092 3178000000 3178159364 3178000000 3178159364
+9537000000 9537478148 3179000000 3179159382 3179000000 3179159382
+9540000000 9540478294 3180000000 3180159431 3180000000 3180159431
+9543000000 9543478490 3181000000 3181159496 3181000000 3181159496
+9546000000 9546478519 3182000000 3182159506 3182000000 3182159506
+9549000000 9549478825 3183000000 3183159608 3183000000 3183159608
+9552000000 9552478997 3184000000 3184159665 3184000000 3184159665
+9555000000 9555479130 3185000000 3185159710 3185000000 3185159710
+9558000000 9558479247 3186000000 3186159749 3186000000 3186159749
+9561000000 9561479432 3187000000 3187159810 3187000000 3187159810
+9564000000 9564479538 3188000000 3188159846 3188000000 3188159846
+9567000000 9567479719 3189000000 3189159906 3189000000 3189159906
+9570000000 9570479931 3190000000 3190159977 3190000000 3190159977
+9573000000 9573480038 3191000000 3191160012 3191000000 3191160012
+9576000000 9576480204 3192000000 3192160068 3192000000 3192160068
+9579000000 9579078949 3193000000 3193026316 3193000000 3193026316
+9582000000 9582480475 3194000000 3194160158 3194000000 3194160158
+9585000000 9585480587 3195000000 3195160195 3195000000 3195160195
+9588000000 9588480796 3196000000 3196160265 3196000000 3196160265
+9591000000 9591480875 3197000000 3197160291 3197000000 3197160291
+9594000000 9594481100 3198000000 3198160366 3198000000 3198160366
+9597000000 9597481227 3199000000 3199160409 3199000000 3199160409
+9600000000 9600481316 3200000000 3200160438 3200000000 3200160438
+9603000000 9603481422 3201000000 3201160474 3201000000 3201160474
+9606000000 9606481633 3202000000 3202160544 3202000000 3202160544
+9609000000 9609481842 3203000000 3203160614 3203000000 3203160614
+9612000000 9612481987 3204000000 3204160662 3204000000 3204160662
+9615000000 9615482113 3205000000 3205160704 3205000000 3205160704
+9618000000 9618482279 3206000000 3206160759 3206000000 3206160759
+9621000000 9621482359 3207000000 3207160786 3207000000 3207160786
+9624000000 9624482594 3208000000 3208160864 3208000000 3208160864
+9627000000 9627482753 3209000000 3209160917 3209000000 3209160917
+9630000000 9630482874 3210000000 3210160958 3210000000 3210160958
+9633000000 9633483034 3211000000 3211161011 3211000000 3211161011
+9636000000 9636483117 3212000000 3212161039 3212000000 3212161039
+9639000000 9639483363 3213000000 3213161121 3213000000 3213161121
+9642000000 9642483486 3214000000 3214161162 3214000000 3214161162
+9645000000 9645483622 3215000000 3215161207 3215000000 3215161207
+9648000000 9648483797 3216000000 3216161265 3216000000 3216161265
+9651000000 9651483919 3217000000 3217161306 3217000000 3217161306
+9654000000 9654484069 3218000000 3218161356 3218000000 3218161356
+9657000000 9657484217 3219000000 3219161405 3219000000 3219161405
+9660000000 9659657911 3220000000 3219885970 3220000000 3219885970
+9663000000 9663484537 3221000000 3221161512 3221000000 3221161512
+9666000000 9666484669 3222000000 3222161556 3222000000 3222161556
+9669000000 9669484843 3223000000 3223161614 3223000000 3223161614
+9672000000 9672484962 3224000000 3224161654 3224000000 3224161654
+9675000000 9675485086 3225000000 3225161695 3225000000 3225161695
+9678000000 9678485305 3226000000 3226161768 3226000000 3226161768
+9681000000 9681485441 3227000000 3227161813 3227000000 3227161813
+9684000000 9684485592 3228000000 3228161864 3228000000 3228161864
+9687000000 9687485742 3229000000 3229161914 3229000000 3229161914
+9690000000 9690485857 3230000000 3230161952 3230000000 3230161952
+9693000000 9693485954 3231000000 3231161984 3231000000 3231161984
+9696000000 9696486162 3232000000 3232162054 3232000000 3232162054
+9699000000 9699486317 3233000000 3233162105 3233000000 3233162105
+9702000000 9702486476 3234000000 3234162158 3234000000 3234162158
+9705000000 9705486650 3235000000 3235162216 3235000000 3235162216
+9708000000 9708486750 3236000000 3236162250 3236000000 3236162250
+9711000000 9711486928 3237000000 3237162309 3237000000 3237162309
+9714000000 9714487077 3238000000 3238162359 3238000000 3238162359
+9717000000 9717487205 3239000000 3239162401 3239000000 3239162401
+9720000000 9720487374 3240000000 3240162458 3240000000 3240162458
+9723000000 9723487494 3241000000 3241162498 3241000000 3241162498
+9726000000 9725314844 3242000000 3241771614 3242000000 3241771614
+9729000000 9729487744 3243000000 3243162581 3243000000 3243162581
+9732000000 9732488002 3244000000 3244162667 3244000000 3244162667
+9735000000 9735488107 3245000000 3245162702 3245000000 3245162702
+9738000000 9738488187 3246000000 3246162729 3246000000 3246162729
+9741000000 9741488334 3247000000 3247162778 3247000000 3247162778
+9744000000 9744488588 3248000000 3248162862 3248000000 3248162862
+9747000000 9747488678 3249000000 3249162892 3249000000 3249162892
+9750000000 9750488923 3250000000 3250162974 3250000000 3250162974
+9753000000 9753489001 3251000000 3251163000 3251000000 3251163000
+9756000000 9756489178 3252000000 3252163059 3252000000 3252163059
+9759000000 9759489324 3253000000 3253163108 3253000000 3253163108
+9762000000 9762489468 3254000000 3254163156 3254000000 3254163156
+9765000000 9764112122 3255000000 3254704040 3255000000 3254704040
+9768000000 9768489783 3256000000 3256163261 3256000000 3256163261
+9771000000 9771489943 3257000000 3257163314 3257000000 3257163314
+9774000000 9774490080 3258000000 3258163360 3258000000 3258163360
+9777000000 9777490238 3259000000 3259163412 3259000000 3259163412
+9780000000 9780490396 3260000000 3260163465 3260000000 3260163465
+9783000000 9783490510 3261000000 3261163503 3261000000 3261163503
+9786000000 9786490671 3262000000 3262163557 3262000000 3262163557
+9789000000 9789490798 3263000000 3263163599 3263000000 3263163599
+9792000000 9792490907 3264000000 3264163635 3264000000 3264163635
+9795000000 9795491049 3265000000 3265163683 3265000000 3265163683
+9798000000 9798491283 3266000000 3266163761 3266000000 3266163761
+9801000000 9801491196 3267000000 3267163732 3267000000 3267163732
+9804000000 9804491317 3268000000 3268163772 3268000000 3268163772
+9807000000 9807491425 3269000000 3269163808 3269000000 3269163808
+9810000000 9810491660 3270000000 3270163886 3270000000 3270163886
+9813000000 9813491839 3271000000 3271163946 3271000000 3271163946
+9816000000 9816405479 3272000000 3272135159 3272000000 3272135159
+9819000000 9819492108 3273000000 3273164036 3273000000 3273164036
+9822000000 9822492281 3274000000 3274164093 3274000000 3274164093
+9825000000 9825492397 3275000000 3275164132 3275000000 3275164132
+9828000000 9828492570 3276000000 3276164190 3276000000 3276164190
+9831000000 9831492742 3277000000 3277164247 3277000000 3277164247
+9834000000 9834492798 3278000000 3278164266 3278000000 3278164266
+9837000000 9837492944 3279000000 3279164314 3279000000 3279164314
+9840000000 9840493140 3280000000 3280164380 3280000000 3280164380
+9843000000 9843493169 3281000000 3281164389 3281000000 3281164389
+9846000000 9846493475 3282000000 3282164491 3282000000 3282164491
+9849000000 9849493647 3283000000 3283164549 3283000000 3283164549
+9852000000 9852493780 3284000000 3284164593 3284000000 3284164593
+9855000000 9855493897 3285000000 3285164632 3285000000 3285164632
+9858000000 9858494082 3286000000 3286164694 3286000000 3286164694
+9861000000 9861494188 3287000000 3287164729 3287000000 3287164729
+9864000000 9864494369 3288000000 3288164789 3288000000 3288164789
+9867000000 9867494581 3289000000 3289164860 3289000000 3289164860
+9870000000 9870494688 3290000000 3290164896 3290000000 3290164896
+9873000000 9873494854 3291000000 3291164951 3291000000 3291164951
+9876000000 9876093599 3292000000 3292031199 3292000000 3292031199
+9879000000 9879495125 3293000000 3293165041 3293000000 3293165041
+9882000000 9882495237 3294000000 3294165079 3294000000 3294165079
+9885000000 9885495446 3295000000 3295165148 3295000000 3295165148
+9888000000 9888495525 3296000000 3296165175 3296000000 3296165175
+9891000000 9891495750 3297000000 3297165250 3297000000 3297165250
+9894000000 9894495877 3298000000 3298165292 3298000000 3298165292
+9897000000 9897495966 3299000000 3299165322 3299000000 3299165322
+9900000000 9900496072 3300000000 3300165357 3300000000 3300165357
+9903000000 9903496283 3301000000 3301165427 3301000000 3301165427
+9906000000 9906496492 3302000000 3302165497 3302000000 3302165497
+9909000000 9909496637 3303000000 3303165545 3303000000 3303165545
+9912000000 9912496763 3304000000 3304165587 3304000000 3304165587
+9915000000 9915496929 3305000000 3305165643 3305000000 3305165643
+9918000000 9918497009 3306000000 3306165669 3306000000 3306165669
+9921000000 9921497244 3307000000 3307165748 3307000000 3307165748
+9924000000 9924497403 3308000000 3308165801 3308000000 3308165801
+9927000000 9927497524 3309000000 3309165841 3309000000 3309165841
+9930000000 9930497684 3310000000 3310165894 3310000000 3310165894
+9933000000 9933497767 3311000000 3311165922 3311000000 3311165922
+9936000000 9936498013 3312000000 3312166004 3312000000 3312166004
+9939000000 9939498136 3313000000 3313166045 3313000000 3313166045
+9942000000 9942498272 3314000000 3314166090 3314000000 3314166090
+9945000000 9945498447 3315000000 3315166149 3315000000 3315166149
+9948000000 9948498569 3316000000 3316166189 3316000000 3316166189
+9951000000 9951498719 3317000000 3317166239 3317000000 3317166239
+9954000000 9954498867 3318000000 3318166289 3318000000 3318166289
+9957000000 9956672561 3319000000 3318890853 3319000000 3318890853
+9960000000 9960499187 3320000000 3320166395 3320000000 3320166395
+9963000000 9963499319 3321000000 3321166439 3321000000 3321166439
+9966000000 9966499493 3322000000 3322166497 3322000000 3322166497
+9969000000 9969499612 3323000000 3323166537 3323000000 3323166537
+9972000000 9972499736 3324000000 3324166578 3324000000 3324166578
+9975000000 9975499955 3325000000 3325166651 3325000000 3325166651
+9978000000 9978500091 3326000000 3326166697 3326000000 3326166697
+9981000000 9981500242 3327000000 3327166747 3327000000 3327166747
+9984000000 9984500392 3328000000 3328166797 3328000000 3328166797
+9987000000 9987500507 3329000000 3329166835 3329000000 3329166835
+9990000000 9990500604 3330000000 3330166868 3330000000 3330166868
+9993000000 9993500812 3331000000 3331166937 3331000000 3331166937
+9996000000 9996500967 3332000000 3332166989 3332000000 3332166989
+9999000000 9999501126 3333000000 3333167042 3333000000 3333167042
+10002000000 10002501300 3334000000 3334167100 3334000000 3334167100
+10005000000 10005501400 3335000000 3335167133 3335000000 3335167133
+10008000000 10008501578 3336000000 3336167192 3336000000 3336167192
+10011000000 10011501727 3337000000 3337167242 3337000000 3337167242
+10014000000 10014501855 3338000000 3338167285 3338000000 3338167285
+10017000000 10017502024 3339000000 3339167341 3339000000 3339167341
+10020000000 10020502144 3340000000 3340167381 3340000000 3340167381
+10023000000 10022329494 3341000000 3340776498 3341000000 3340776498
+10026000000 10026502394 3342000000 3342167464 3342000000 3342167464
+10029000000 10029502652 3343000000 3343167550 3343000000 3343167550
+10032000000 10032502757 3344000000 3344167585 3344000000 3344167585
+10035000000 10035502837 3345000000 3345167612 3345000000 3345167612
+10038000000 10038502984 3346000000 3346167661 3346000000 3346167661
+10041000000 10041503238 3347000000 3347167746 3347000000 3347167746
+10044000000 10044503328 3348000000 3348167776 3348000000 3348167776
+10047000000 10047503573 3349000000 3349167857 3349000000 3349167857
+10050000000 10050503651 3350000000 3350167883 3350000000 3350167883
+10053000000 10053503828 3351000000 3351167942 3351000000 3351167942
+10056000000 10056503974 3352000000 3352167991 3352000000 3352167991
+10059000000 10059504118 3353000000 3353168039 3353000000 3353168039
+10062000000 10061126772 3354000000 3353708924 3354000000 3353708924
+10065000000 10065504433 3355000000 3355168144 3355000000 3355168144
+10068000000 10068504593 3356000000 3356168197 3356000000 3356168197
+10071000000 10071504730 3357000000 3357168243 3357000000 3357168243
+10074000000 10074504888 3358000000 3358168296 3358000000 3358168296
+10077000000 10077505046 3359000000 3359168348 3359000000 3359168348
+10080000000 10080505160 3360000000 3360168386 3360000000 3360168386
+10083000000 10083505321 3361000000 3361168440 3361000000 3361168440
+10086000000 10086505448 3362000000 3362168482 3362000000 3362168482
+10089000000 10089505557 3363000000 3363168519 3363000000 3363168519
+10092000000 10092505699 3364000000 3364168566 3364000000 3364168566
+10095000000 10095505933 3365000000 3365168644 3365000000 3365168644
+10098000000 10098505846 3366000000 3366168615 3366000000 3366168615
+10101000000 10101505967 3367000000 3367168655 3367000000 3367168655
+10104000000 10104506075 3368000000 3368168691 3368000000 3368168691
+10107000000 10107506310 3369000000 3369168770 3369000000 3369168770
+10110000000 10110506489 3370000000 3370168829 3370000000 3370168829
+10113000000 10113420129 3371000000 3371140043 3371000000 3371140043
+10116000000 10116506758 3372000000 3372168919 3372000000 3372168919
+10119000000 10119506931 3373000000 3373168977 3373000000 3373168977
+10122000000 10122507047 3374000000 3374169015 3374000000 3374169015
+10125000000 10125507220 3375000000 3375169073 3375000000 3375169073
+10128000000 10128507392 3376000000 3376169130 3376000000 3376169130
+10131000000 10131507448 3377000000 3377169149 3377000000 3377169149
+10134000000 10134507594 3378000000 3378169198 3378000000 3378169198
+10137000000 10137507790 3379000000 3379169263 3379000000 3379169263
+10140000000 10140507819 3380000000 3380169273 3380000000 3380169273
+10143000000 10143508125 3381000000 3381169375 3381000000 3381169375
+10146000000 10146508297 3382000000 3382169432 3382000000 3382169432
+10149000000 10149508430 3383000000 3383169476 3383000000 3383169476
+10152000000 10152508547 3384000000 3384169515 3384000000 3384169515
+10155000000 10155508732 3385000000 3385169577 3385000000 3385169577
+10158000000 10158508838 3386000000 3386169612 3386000000 3386169612
+10161000000 10161509019 3387000000 3387169673 3387000000 3387169673
+10164000000 10164509231 3388000000 3388169743 3388000000 3388169743
+10167000000 10167509338 3389000000 3389169779 3389000000 3389169779
+10170000000 10170509504 3390000000 3390169834 3390000000 3390169834
+10173000000 10173108249 3391000000 3391036083 3391000000 3391036083
+10176000000 10176509775 3392000000 3392169925 3392000000 3392169925
+10179000000 10179509887 3393000000 3393169962 3393000000 3393169962
+10182000000 10182510096 3394000000 3394170032 3394000000 3394170032
+10185000000 10185510175 3395000000 3395170058 3395000000 3395170058
+10188000000 10188510400 3396000000 3396170133 3396000000 3396170133
+10191000000 10191510527 3397000000 3397170175 3397000000 3397170175
+10194000000 10194510616 3398000000 3398170205 3398000000 3398170205
+10197000000 10197510722 3399000000 3399170240 3399000000 3399170240
+10200000000 10200510933 3400000000 3400170311 3400000000 3400170311
+10203000000 10203511142 3401000000 3401170380 3401000000 3401170380
+10206000000 10206511287 3402000000 3402170429 3402000000 3402170429
+10209000000 10209511413 3403000000 3403170471 3403000000 3403170471
+10212000000 10212511579 3404000000 3404170526 3404000000 3404170526
+10215000000 10215511659 3405000000 3405170553 3405000000 3405170553
+10218000000 10218511894 3406000000 3406170631 3406000000 3406170631
+10221000000 10221512053 3407000000 3407170684 3407000000 3407170684
+10224000000 10224512174 3408000000 3408170724 3408000000 3408170724
+10227000000 10227512334 3409000000 3409170778 3409000000 3409170778
+10230000000 10230512417 3410000000 3410170805 3410000000 3410170805
+10233000000 10233512663 3411000000 3411170887 3411000000 3411170887
+10236000000 10236512786 3412000000 3412170928 3412000000 3412170928
+10239000000 10239512922 3413000000 3413170974 3413000000 3413170974
+10242000000 10242513097 3414000000 3414171032 3414000000 3414171032
+10245000000 10245513219 3415000000 3415171073 3415000000 3415171073
+10248000000 10248513369 3416000000 3416171123 3416000000 3416171123
+10251000000 10251513517 3417000000 3417171172 3417000000 3417171172
+10254000000 10253687211 3418000000 3417895737 3418000000 3417895737
+10257000000 10257513837 3419000000 3419171279 3419000000 3419171279
+10260000000 10260513969 3420000000 3420171323 3420000000 3420171323
+10263000000 10263514143 3421000000 3421171381 3421000000 3421171381
+10266000000 10266514262 3422000000 3422171420 3422000000 3422171420
+10269000000 10269514386 3423000000 3423171462 3423000000 3423171462
+10272000000 10272514605 3424000000 3424171535 3424000000 3424171535
+10275000000 10275514741 3425000000 3425171580 3425000000 3425171580
+10278000000 10278514892 3426000000 3426171630 3426000000 3426171630
+10281000000 10281515042 3427000000 3427171680 3427000000 3427171680
+10284000000 10284515157 3428000000 3428171719 3428000000 3428171719
+10287000000 10287515254 3429000000 3429171751 3429000000 3429171751
+10290000000 10290515462 3430000000 3430171820 3430000000 3430171820
+10293000000 10293515617 3431000000 3431171872 3431000000 3431171872
+10296000000 10296515776 3432000000 3432171925 3432000000 3432171925
+10299000000 10299515950 3433000000 3433171983 3433000000 3433171983
+10302000000 10302516050 3434000000 3434172016 3434000000 3434172016
+10305000000 10305516228 3435000000 3435172076 3435000000 3435172076
+10308000000 10308516377 3436000000 3436172125 3436000000 3436172125
+10311000000 10311516505 3437000000 3437172168 3437000000 3437172168
+10314000000 10314516674 3438000000 3438172224 3438000000 3438172224
+10317000000 10317516794 3439000000 3439172264 3439000000 3439172264
+10320000000 10319344144 3440000000 3439781381 3440000000 3439781381
+10323000000 10323517044 3441000000 3441172348 3441000000 3441172348
+10326000000 10326517302 3442000000 3442172434 3442000000 3442172434
+10329000000 10329517407 3443000000 3443172469 3443000000 3443172469
+10332000000 10332517487 3444000000 3444172495 3444000000 3444172495
+10335000000 10335517634 3445000000 3445172544 3445000000 3445172544
+10338000000 10338517888 3446000000 3446172629 3446000000 3446172629
+10341000000 10341517978 3447000000 3447172659 3447000000 3447172659
+10344000000 10344518223 3448000000 3448172741 3448000000 3448172741
+10347000000 10347518301 3449000000 3449172767 3449000000 3449172767
+10350000000 10350518478 3450000000 3450172826 3450000000 3450172826
+10353000000 10353518624 3451000000 3451172874 3451000000 3451172874
+10356000000 10356518768 3452000000 3452172922 3452000000 3452172922
+10359000000 10358141422 3453000000 3452713807 3453000000 3452713807
+10362000000 10362519083 3454000000 3454173027 3454000000 3454173027
+10365000000 10365519243 3455000000 3455173081 3455000000 3455173081
+10368000000 10368519380 3456000000 3456173126 3456000000 3456173126
+10371000000 10371519538 3457000000 3457173179 3457000000 3457173179
+10374000000 10374519696 3458000000 3458173232 3458000000 3458173232
+10377000000 10377519810 3459000000 3459173270 3459000000 3459173270
+10380000000 10380519971 3460000000 3460173323 3460000000 3460173323
+10383000000 10383520098 3461000000 3461173366 3461000000 3461173366
+10386000000 10386520207 3462000000 3462173402 3462000000 3462173402
+10389000000 10389520349 3463000000 3463173449 3463000000 3463173449
+10392000000 10392520583 3464000000 3464173527 3464000000 3464173527
+10395000000 10395520496 3465000000 3465173498 3465000000 3465173498
+10398000000 10398520617 3466000000 3466173539 3466000000 3466173539
+10401000000 10401520725 3467000000 3467173575 3467000000 3467173575
+10404000000 10404520960 3468000000 3468173653 3468000000 3468173653
+10407000000 10407521139 3469000000 3469173713 3469000000 3469173713
+10410000000 10410434779 3470000000 3470144926 3470000000 3470144926
+10413000000 10413521408 3471000000 3471173802 3471000000 3471173802
+10416000000 10416521581 3472000000 3472173860 3472000000 3472173860
+10419000000 10419521697 3473000000 3473173899 3473000000 3473173899
+10422000000 10422521870 3474000000 3474173956 3474000000 3474173956
+10425000000 10425522042 3475000000 3475174014 3475000000 3475174014
+10428000000 10428522098 3476000000 3476174032 3476000000 3476174032
+10431000000 10431522244 3477000000 3477174081 3477000000 3477174081
+10434000000 10434522440 3478000000 3478174146 3478000000 3478174146
+10437000000 10437522469 3479000000 3479174156 3479000000 3479174156
+10440000000 10440522775 3480000000 3480174258 3480000000 3480174258
+10443000000 10443522947 3481000000 3481174315 3481000000 3481174315
+10446000000 10446523080 3482000000 3482174360 3482000000 3482174360
+10449000000 10449523197 3483000000 3483174399 3483000000 3483174399
+10452000000 10452523382 3484000000 3484174460 3484000000 3484174460
+10455000000 10455523488 3485000000 3485174496 3485000000 3485174496
+10458000000 10458523669 3486000000 3486174556 3486000000 3486174556
+10461000000 10461523881 3487000000 3487174627 3487000000 3487174627
+10464000000 10464523988 3488000000 3488174662 3488000000 3488174662
+10467000000 10467524154 3489000000 3489174718 3489000000 3489174718
+10470000000 10470122899 3490000000 3490040966 3490000000 3490040966
+10473000000 10473524425 3491000000 3491174808 3491000000 3491174808
+10476000000 10476524537 3492000000 3492174845 3492000000 3492174845
+10479000000 10479524746 3493000000 3493174915 3493000000 3493174915
+10482000000 10482524825 3494000000 3494174941 3494000000 3494174941
+10485000000 10485525050 3495000000 3495175016 3495000000 3495175016
+10488000000 10488525177 3496000000 3496175059 3496000000 3496175059
+10491000000 10491525266 3497000000 3497175088 3497000000 3497175088
+10494000000 10494525372 3498000000 3498175124 3498000000 3498175124
+10497000000 10497525583 3499000000 3499175194 3499000000 3499175194
+10500000000 10500525792 3500000000 3500175264 3500000000 3500175264
+10503000000 10503525937 3501000000 3501175312 3501000000 3501175312
+10506000000 10506526063 3502000000 3502175354 3502000000 3502175354
+10509000000 10509526229 3503000000 3503175409 3503000000 3503175409
+10512000000 10512526309 3504000000 3504175436 3504000000 3504175436
+10515000000 10515526544 3505000000 3505175514 3505000000 3505175514
+10518000000 10518526703 3506000000 3506175567 3506000000 3506175567
+10521000000 10521526824 3507000000 3507175608 3507000000 3507175608
+10524000000 10524526984 3508000000 3508175661 3508000000 3508175661
+10527000000 10527527067 3509000000 3509175689 3509000000 3509175689
+10530000000 10530527313 3510000000 3510175771 3510000000 3510175771
+10533000000 10533527436 3511000000 3511175812 3511000000 3511175812
+10536000000 10536527572 3512000000 3512175857 3512000000 3512175857
+10539000000 10539527747 3513000000 3513175915 3513000000 3513175915
+10542000000 10542527869 3514000000 3514175956 3514000000 3514175956
+10545000000 10545528019 3515000000 3515176006 3515000000 3515176006
+10548000000 10548528167 3516000000 3516176055 3516000000 3516176055
+10551000000 10550701861 3517000000 3516900620 3517000000 3516900620
+10554000000 10554528487 3518000000 3518176162 3518000000 3518176162
+10557000000 10557528619 3519000000 3519176206 3519000000 3519176206
+10560000000 10560528793 3520000000 3520176264 3520000000 3520176264
+10563000000 10563528912 3521000000 3521176304 3521000000 3521176304
+10566000000 10566529036 3522000000 3522176345 3522000000 3522176345
+10569000000 10569529255 3523000000 3523176418 3523000000 3523176418
+10572000000 10572529391 3524000000 3524176463 3524000000 3524176463
+10575000000 10575529542 3525000000 3525176514 3525000000 3525176514
+10578000000 10578529692 3526000000 3526176564 3526000000 3526176564
+10581000000 10581529807 3527000000 3527176602 3527000000 3527176602
+10584000000 10584529904 3528000000 3528176634 3528000000 3528176634
+10587000000 10587530112 3529000000 3529176704 3529000000 3529176704
+10590000000 10590530267 3530000000 3530176755 3530000000 3530176755
+10593000000 10593530426 3531000000 3531176808 3531000000 3531176808
+10596000000 10596530600 3532000000 3532176866 3532000000 3532176866
+10599000000 10599530700 3533000000 3533176900 3533000000 3533176900
+10602000000 10602530878 3534000000 3534176959 3534000000 3534176959
+10605000000 10605531027 3535000000 3535177009 3535000000 3535177009
+10608000000 10608531155 3536000000 3536177051 3536000000 3536177051
+10611000000 10611531324 3537000000 3537177108 3537000000 3537177108
+10614000000 10614531444 3538000000 3538177148 3538000000 3538177148
+10617000000 10616358794 3539000000 3538786264 3539000000 3538786264
+10620000000 10620531694 3540000000 3540177231 3540000000 3540177231
+10623000000 10623531952 3541000000 3541177317 3541000000 3541177317
+10626000000 10626532057 3542000000 3542177352 3542000000 3542177352
+10629000000 10629532137 3543000000 3543177379 3543000000 3543177379
+10632000000 10632532284 3544000000 3544177428 3544000000 3544177428
+10635000000 10635532538 3545000000 3545177512 3545000000 3545177512
+10638000000 10638532628 3546000000 3546177542 3546000000 3546177542
+10641000000 10641532873 3547000000 3547177624 3547000000 3547177624
+10644000000 10644532951 3548000000 3548177650 3548000000 3548177650
+10647000000 10647533128 3549000000 3549177709 3549000000 3549177709
+10650000000 10650533274 3550000000 3550177758 3550000000 3550177758
+10653000000 10653533418 3551000000 3551177806 3551000000 3551177806
+10656000000 10655156072 3552000000 3551718690 3552000000 3551718690
+10659000000 10659533733 3553000000 3553177911 3553000000 3553177911
+10662000000 10662533893 3554000000 3554177964 3554000000 3554177964
+10665000000 10665534030 3555000000 3555178010 3555000000 3555178010
+10668000000 10668534188 3556000000 3556178062 3556000000 3556178062
+10671000000 10671534346 3557000000 3557178115 3557000000 3557178115
+10674000000 10674534460 3558000000 3558178153 3558000000 3558178153
+10677000000 10677534621 3559000000 3559178207 3559000000 3559178207
+10680000000 10680534748 3560000000 3560178249 3560000000 3560178249
+10683000000 10683534857 3561000000 3561178285 3561000000 3561178285
+10686000000 10686534999 3562000000 3562178333 3562000000 3562178333
+10689000000 10689535233 3563000000 3563178411 3563000000 3563178411
+10692000000 10692535146 3564000000 3564178382 3564000000 3564178382
+10695000000 10695535267 3565000000 3565178422 3565000000 3565178422
+10698000000 10698535375 3566000000 3566178458 3566000000 3566178458
+10701000000 10701535610 3567000000 3567178536 3567000000 3567178536
+10704000000 10704535789 3568000000 3568178596 3568000000 3568178596
+10707000000 10707449429 3569000000 3569149809 3569000000 3569149809
+10710000000 10710536058 3570000000 3570178686 3570000000 3570178686
+10713000000 10713536231 3571000000 3571178743 3571000000 3571178743
+10716000000 10716536347 3572000000 3572178782 3572000000 3572178782
+10719000000 10719536520 3573000000 3573178840 3573000000 3573178840
+10722000000 10722536692 3574000000 3574178897 3574000000 3574178897
+10725000000 10725536748 3575000000 3575178916 3575000000 3575178916
+10728000000 10728536894 3576000000 3576178964 3576000000 3576178964
+10731000000 10731537090 3577000000 3577179030 3577000000 3577179030
+10734000000 10734537119 3578000000 3578179039 3578000000 3578179039
+10737000000 10737537425 3579000000 3579179141 3579000000 3579179141
+10740000000 10740537597 3580000000 3580179199 3580000000 3580179199
+10743000000 10743537730 3581000000 3581179243 3581000000 3581179243
+10746000000 10746537847 3582000000 3582179282 3582000000 3582179282
+10749000000 10749538032 3583000000 3583179344 3583000000 3583179344
+10752000000 10752538138 3584000000 3584179379 3584000000 3584179379
+10755000000 10755538319 3585000000 3585179439 3585000000 3585179439
+10758000000 10758538531 3586000000 3586179510 3586000000 3586179510
+10761000000 10761538638 3587000000 3587179546 3587000000 3587179546
+10764000000 10764538804 3588000000 3588179601 3588000000 3588179601
+10767000000 10767137549 3589000000 3589045849 3589000000 3589045849
+10770000000 10770539075 3590000000 3590179691 3590000000 3590179691
+10773000000 10773539187 3591000000 3591179729 3591000000 3591179729
+10776000000 10776539396 3592000000 3592179798 3592000000 3592179798
+10779000000 10779539475 3593000000 3593179825 3593000000 3593179825
+10782000000 10782539700 3594000000 3594179900 3594000000 3594179900
+10785000000 10785539827 3595000000 3595179942 3595000000 3595179942
+10788000000 10788539916 3596000000 3596179972 3596000000 3596179972
+10791000000 10791540022 3597000000 3597180007 3597000000 3597180007
+10794000000 10794540233 3598000000 3598180077 3598000000 3598180077
+10797000000 10797540442 3599000000 3599180147 3599000000 3599180147
+10800000000 10800540587 3600000000 3600180195 3600000000 3600180195
+10803000000 10803540713 3601000000 3601180237 3601000000 3601180237
+10806000000 10806540879 3602000000 3602180293 3602000000 3602180293
+10809000000 10809540959 3603000000 3603180319 3603000000 3603180319
+10812000000 10812541194 3604000000 3604180398 3604000000 3604180398
+10815000000 10815541353 3605000000 3605180451 3605000000 3605180451
+10818000000 10818541474 3606000000 3606180491 3606000000 3606180491
+10821000000 10821541634 3607000000 3607180544 3607000000 3607180544
+10824000000 10824541717 3608000000 3608180572 3608000000 3608180572
+10827000000 10827541963 3609000000 3609180654 3609000000 3609180654
+10830000000 10830542086 3610000000 3610180695 3610000000 3610180695
+10833000000 10833542222 3611000000 3611180740 3611000000 3611180740
+10836000000 10836542397 3612000000 3612180799 3612000000 3612180799
+10839000000 10839542519 3613000000 3613180839 3613000000 3613180839
+10842000000 10842542669 3614000000 3614180889 3614000000 3614180889
+10845000000 10845542817 3615000000 3615180939 3615000000 3615180939
+10848000000 10847716511 3616000000 3615905503 3616000000 3615905503
+10851000000 10851543137 3617000000 3617181045 3617000000 3617181045
+10854000000 10854543269 3618000000 3618181089 3618000000 3618181089
+10857000000 10857543443 3619000000 3619181147 3619000000 3619181147
+10860000000 10860543562 3620000000 3620181187 3620000000 3620181187
+10863000000 10863543686 3621000000 3621181228 3621000000 3621181228
+10866000000 10866543905 3622000000 3622181301 3622000000 3622181301
+10869000000 10869544041 3623000000 3623181347 3623000000 3623181347
+10872000000 10872544192 3624000000 3624181397 3624000000 3624181397
+10875000000 10875544342 3625000000 3625181447 3625000000 3625181447
+10878000000 10878544457 3626000000 3626181485 3626000000 3626181485
+10881000000 10881544554 3627000000 3627181518 3627000000 3627181518
+10884000000 10884544762 3628000000 3628181587 3628000000 3628181587
+10887000000 10887544917 3629000000 3629181639 3629000000 3629181639
+10890000000 10890545076 3630000000 3630181692 3630000000 3630181692
+10893000000 10893545250 3631000000 3631181750 3631000000 3631181750
+10896000000 10896545350 3632000000 3632181783 3632000000 3632181783
+10899000000 10899545528 3633000000 3633181842 3633000000 3633181842
+10902000000 10902545677 3634000000 3634181892 3634000000 3634181892
+10905000000 10905545805 3635000000 3635181935 3635000000 3635181935
+10908000000 10908545974 3636000000 3636181991 3636000000 3636181991
+10911000000 10911546094 3637000000 3637182031 3637000000 3637182031
+10914000000 10913373444 3638000000 3637791148 3638000000 3637791148
+10917000000 10917546344 3639000000 3639182114 3639000000 3639182114
+10920000000 10920546602 3640000000 3640182200 3640000000 3640182200
+10923000000 10923546707 3641000000 3641182235 3641000000 3641182235
+10926000000 10926546787 3642000000 3642182262 3642000000 3642182262
+10929000000 10929546934 3643000000 3643182311 3643000000 3643182311
+10932000000 10932547188 3644000000 3644182396 3644000000 3644182396
+10935000000 10935547278 3645000000 3645182426 3645000000 3645182426
+10938000000 10938547523 3646000000 3646182507 3646000000 3646182507
+10941000000 10941547601 3647000000 3647182533 3647000000 3647182533
+10944000000 10944547778 3648000000 3648182592 3648000000 3648182592
+10947000000 10947547924 3649000000 3649182641 3649000000 3649182641
+10950000000 10950548068 3650000000 3650182689 3650000000 3650182689
+10953000000 10952170722 3651000000 3650723574 3651000000 3650723574
+10956000000 10956548383 3652000000 3652182794 3652000000 3652182794
+10959000000 10959548543 3653000000 3653182847 3653000000 3653182847
+10962000000 10962548680 3654000000 3654182893 3654000000 3654182893
+10965000000 10965548838 3655000000 3655182946 3655000000 3655182946
+10968000000 10968548996 3656000000 3656182998 3656000000 3656182998
+10971000000 10971549110 3657000000 3657183036 3657000000 3657183036
+10974000000 10974549271 3658000000 3658183090 3658000000 3658183090
+10977000000 10977549398 3659000000 3659183132 3659000000 3659183132
+10980000000 10980549507 3660000000 3660183169 3660000000 3660183169
+10983000000 10983549649 3661000000 3661183216 3661000000 3661183216
+10986000000 10986549883 3662000000 3662183294 3662000000 3662183294
+10989000000 10989549796 3663000000 3663183265 3663000000 3663183265
+10992000000 10992549917 3664000000 3664183305 3664000000 3664183305
+10995000000 10995550025 3665000000 3665183341 3665000000 3665183341
+10998000000 10998550260 3666000000 3666183420 3666000000 3666183420
+11001000000 11001550439 3667000000 3667183479 3667000000 3667183479
+11004000000 11004464079 3668000000 3668154693 3668000000 3668154693
+11007000000 11007550708 3669000000 3669183569 3669000000 3669183569
+11010000000 11010550881 3670000000 3670183627 3670000000 3670183627
+11013000000 11013550997 3671000000 3671183665 3671000000 3671183665
+11016000000 11016551170 3672000000 3672183723 3672000000 3672183723
+11019000000 11019551342 3673000000 3673183780 3673000000 3673183780
+11022000000 11022551398 3674000000 3674183799 3674000000 3674183799
+11025000000 11025551544 3675000000 3675183848 3675000000 3675183848
+11028000000 11028551740 3676000000 3676183913 3676000000 3676183913
+11031000000 11031551769 3677000000 3677183923 3677000000 3677183923
+11034000000 11034552075 3678000000 3678184025 3678000000 3678184025
+11037000000 11037552247 3679000000 3679184082 3679000000 3679184082
+11040000000 11040552380 3680000000 3680184126 3680000000 3680184126
+11043000000 11043552497 3681000000 3681184165 3681000000 3681184165
+11046000000 11046552682 3682000000 3682184227 3682000000 3682184227
+11049000000 11049552788 3683000000 3683184262 3683000000 3683184262
+11052000000 11052552969 3684000000 3684184323 3684000000 3684184323
+11055000000 11055553181 3685000000 3685184393 3685000000 3685184393
+11058000000 11058553288 3686000000 3686184429 3686000000 3686184429
+11061000000 11061553454 3687000000 3687184484 3687000000 3687184484
+11064000000 11064152199 3688000000 3688050733 3688000000 3688050733
+11067000000 11067553725 3689000000 3689184575 3689000000 3689184575
+11070000000 11070553837 3690000000 3690184612 3690000000 3690184612
+11073000000 11073554046 3691000000 3691184682 3691000000 3691184682
+11076000000 11076554125 3692000000 3692184708 3692000000 3692184708
+11079000000 11079554350 3693000000 3693184783 3693000000 3693184783
+11082000000 11082554477 3694000000 3694184825 3694000000 3694184825
+11085000000 11085554566 3695000000 3695184855 3695000000 3695184855
+11088000000 11088554672 3696000000 3696184890 3696000000 3696184890
+11091000000 11091554883 3697000000 3697184961 3697000000 3697184961
+11094000000 11094555092 3698000000 3698185030 3698000000 3698185030
+11097000000 11097555237 3699000000 3699185079 3699000000 3699185079
+11100000000 11100555363 3700000000 3700185121 3700000000 3700185121
+11103000000 11103555529 3701000000 3701185176 3701000000 3701185176
+11106000000 11106555609 3702000000 3702185203 3702000000 3702185203
+11109000000 11109555844 3703000000 3703185281 3703000000 3703185281
+11112000000 11112556003 3704000000 3704185334 3704000000 3704185334
+11115000000 11115556124 3705000000 3705185374 3705000000 3705185374
+11118000000 11118556284 3706000000 3706185428 3706000000 3706185428
+11121000000 11121556367 3707000000 3707185455 3707000000 3707185455
+11124000000 11124556613 3708000000 3708185537 3708000000 3708185537
+11127000000 11127556736 3709000000 3709185578 3709000000 3709185578
+11130000000 11130556872 3710000000 3710185624 3710000000 3710185624
+11133000000 11133557047 3711000000 3711185682 3711000000 3711185682
+11136000000 11136557169 3712000000 3712185723 3712000000 3712185723
+11139000000 11139557319 3713000000 3713185773 3713000000 3713185773
+11142000000 11142557467 3714000000 3714185822 3714000000 3714185822
+11145000000 11144731161 3715000000 3714910387 3715000000 3714910387
+11148000000 11148557787 3716000000 3716185929 3716000000 3716185929
+11151000000 11151557919 3717000000 3717185973 3717000000 3717185973
+11154000000 11154558093 3718000000 3718186031 3718000000 3718186031
+11157000000 11157558212 3719000000 3719186070 3719000000 3719186070
+11160000000 11160558336 3720000000 3720186112 3720000000 3720186112
+11163000000 11163558555 3721000000 3721186185 3721000000 3721186185
+11166000000 11166558691 3722000000 3722186230 3722000000 3722186230
+11169000000 11169558842 3723000000 3723186280 3723000000 3723186280
+11172000000 11172558992 3724000000 3724186330 3724000000 3724186330
+11175000000 11175559107 3725000000 3725186369 3725000000 3725186369
+11178000000 11178559204 3726000000 3726186401 3726000000 3726186401
+11181000000 11181559412 3727000000 3727186470 3727000000 3727186470
+11184000000 11184559567 3728000000 3728186522 3728000000 3728186522
+11187000000 11187559726 3729000000 3729186575 3729000000 3729186575
+11190000000 11190559900 3730000000 3730186633 3730000000 3730186633
+11193000000 11193560000 3731000000 3731186666 3731000000 3731186666
+11196000000 11196560178 3732000000 3732186726 3732000000 3732186726
+11199000000 11199560327 3733000000 3733186775 3733000000 3733186775
+11202000000 11202560455 3734000000 3734186818 3734000000 3734186818
+11205000000 11205560624 3735000000 3735186874 3735000000 3735186874
+11208000000 11208560744 3736000000 3736186914 3736000000 3736186914
+11211000000 11210388094 3737000000 3736796031 3737000000 3736796031
+11214000000 11214560994 3738000000 3738186998 3738000000 3738186998
+11217000000 11217561252 3739000000 3739187084 3739000000 3739187084
+11220000000 11220561357 3740000000 3740187119 3740000000 3740187119
+11223000000 11223561437 3741000000 3741187145 3741000000 3741187145
+11226000000 11226561584 3742000000 3742187194 3742000000 3742187194
+11229000000 11229561838 3743000000 3743187279 3743000000 3743187279
+11232000000 11232561928 3744000000 3744187309 3744000000 3744187309
+11235000000 11235562173 3745000000 3745187391 3745000000 3745187391
+11238000000 11238562251 3746000000 3746187417 3746000000 3746187417
+11241000000 11241562428 3747000000 3747187476 3747000000 3747187476
+11244000000 11244562574 3748000000 3748187524 3748000000 3748187524
+11247000000 11247562718 3749000000 3749187572 3749000000 3749187572
+11250000000 11249185372 3750000000 3749728457 3750000000 3749728457
+11253000000 11253563033 3751000000 3751187677 3751000000 3751187677
+11256000000 11256563193 3752000000 3752187731 3752000000 3752187731
+11259000000 11259563330 3753000000 3753187776 3753000000 3753187776
+11262000000 11262563488 3754000000 3754187829 3754000000 3754187829
+11265000000 11265563646 3755000000 3755187882 3755000000 3755187882
+11268000000 11268563760 3756000000 3756187920 3756000000 3756187920
+11271000000 11271563921 3757000000 3757187973 3757000000 3757187973
+11274000000 11274564048 3758000000 3758188016 3758000000 3758188016
+11277000000 11277564157 3759000000 3759188052 3759000000 3759188052
+11280000000 11280564299 3760000000 3760188099 3760000000 3760188099
+11283000000 11283564533 3761000000 3761188177 3761000000 3761188177
+11286000000 11286564446 3762000000 3762188148 3762000000 3762188148
+11289000000 11289564567 3763000000 3763188189 3763000000 3763188189
+11292000000 11292564675 3764000000 3764188225 3764000000 3764188225
+11295000000 11295564910 3765000000 3765188303 3765000000 3765188303
+11298000000 11298565089 3766000000 3766188363 3766000000 3766188363
+11301000000 11301478729 3767000000 3767159576 3767000000 3767159576
+11304000000 11304565358 3768000000 3768188452 3768000000 3768188452
+11307000000 11307565531 3769000000 3769188510 3769000000 3769188510
+11310000000 11310565647 3770000000 3770188549 3770000000 3770188549
+11313000000 11313565820 3771000000 3771188606 3771000000 3771188606
+11316000000 11316565992 3772000000 3772188664 3772000000 3772188664
+11319000000 11319566048 3773000000 3773188682 3773000000 3773188682
+11322000000 11322566194 3774000000 3774188731 3774000000 3774188731
+11325000000 11325566390 3775000000 3775188796 3775000000 3775188796
+11328000000 11328566419 3776000000 3776188806 3776000000 3776188806
+11331000000 11331566725 3777000000 3777188908 3777000000 3777188908
+11334000000 11334566897 3778000000 3778188965 3778000000 3778188965
+11337000000 11337567030 3779000000 3779189010 3779000000 3779189010
+11340000000 11340567147 3780000000 3780189049 3780000000 3780189049
+11343000000 11343567332 3781000000 3781189110 3781000000 3781189110
+11346000000 11346567438 3782000000 3782189146 3782000000 3782189146
+11349000000 11349567619 3783000000 3783189206 3783000000 3783189206
+11352000000 11352567831 3784000000 3784189277 3784000000 3784189277
+11355000000 11355567938 3785000000 3785189312 3785000000 3785189312
+11358000000 11358568104 3786000000 3786189368 3786000000 3786189368
+11361000000 11361166849 3787000000 3787055616 3787000000 3787055616
+11364000000 11364568375 3788000000 3788189458 3788000000 3788189458
+11367000000 11367568487 3789000000 3789189495 3789000000 3789189495
+11370000000 11370568696 3790000000 3790189565 3790000000 3790189565
+11373000000 11373568775 3791000000 3791189591 3791000000 3791189591
+11376000000 11376569000 3792000000 3792189666 3792000000 3792189666
+11379000000 11379569127 3793000000 3793189709 3793000000 3793189709
+11382000000 11382569216 3794000000 3794189738 3794000000 3794189738
+11385000000 11385569322 3795000000 3795189774 3795000000 3795189774
+11388000000 11388569533 3796000000 3796189844 3796000000 3796189844
+11391000000 11391569742 3797000000 3797189914 3797000000 3797189914
+11394000000 11394569887 3798000000 3798189962 3798000000 3798189962
+11397000000 11397570013 3799000000 3799190004 3799000000 3799190004
+11400000000 11400570179 3800000000 3800190059 3800000000 3800190059
+11403000000 11403570259 3801000000 3801190086 3801000000 3801190086
+11406000000 11406570494 3802000000 3802190164 3802000000 3802190164
+11409000000 11409570653 3803000000 3803190217 3803000000 3803190217
+11412000000 11412570774 3804000000 3804190258 3804000000 3804190258
+11415000000 11415570934 3805000000 3805190311 3805000000 3805190311
+11418000000 11418571017 3806000000 3806190339 3806000000 3806190339
+11421000000 11421571263 3807000000 3807190421 3807000000 3807190421
+11424000000 11424571386 3808000000 3808190462 3808000000 3808190462
+11427000000 11427571522 3809000000 3809190507 3809000000 3809190507
+11430000000 11430571697 3810000000 3810190565 3810000000 3810190565
+11433000000 11433571819 3811000000 3811190606 3811000000 3811190606
+11436000000 11436571969 3812000000 3812190656 3812000000 3812190656
+11439000000 11439572117 3813000000 3813190705 3813000000 3813190705
+11442000000 11441745811 3814000000 3813915270 3814000000 3813915270
+11445000000 11445572437 3815000000 3815190812 3815000000 3815190812
+11448000000 11448572569 3816000000 3816190856 3816000000 3816190856
+11451000000 11451572743 3817000000 3817190914 3817000000 3817190914
+11454000000 11454572862 3818000000 3818190954 3818000000 3818190954
+11457000000 11457572986 3819000000 3819190995 3819000000 3819190995
+11460000000 11460573205 3820000000 3820191068 3820000000 3820191068
+11463000000 11463573341 3821000000 3821191113 3821000000 3821191113
+11466000000 11466573492 3822000000 3822191164 3822000000 3822191164
+11469000000 11469573642 3823000000 3823191214 3823000000 3823191214
+11472000000 11472573757 3824000000 3824191252 3824000000 3824191252
+11475000000 11475573854 3825000000 3825191284 3825000000 3825191284
+11478000000 11478574062 3826000000 3826191354 3826000000 3826191354
+11481000000 11481574217 3827000000 3827191405 3827000000 3827191405
+11484000000 11484574376 3828000000 3828191458 3828000000 3828191458
+11487000000 11487574550 3829000000 3829191516 3829000000 3829191516
+11490000000 11490574650 3830000000 3830191550 3830000000 3830191550
+11493000000 11493574828 3831000000 3831191609 3831000000 3831191609
+11496000000 11496574977 3832000000 3832191659 3832000000 3832191659
+11499000000 11499575105 3833000000 3833191701 3833000000 3833191701
+11502000000 11502575274 3834000000 3834191758 3834000000 3834191758
+11505000000 11505575394 3835000000 3835191798 3835000000 3835191798
+11508000000 11507402744 3836000000 3835800914 3836000000 3835800914
+11511000000 11511575644 3837000000 3837191881 3837000000 3837191881
+11514000000 11514575902 3838000000 3838191967 3838000000 3838191967
+11517000000 11517576007 3839000000 3839192002 3839000000 3839192002
+11520000000 11520576087 3840000000 3840192029 3840000000 3840192029
+11523000000 11523576234 3841000000 3841192078 3841000000 3841192078
+11526000000 11526576488 3842000000 3842192162 3842000000 3842192162
+11529000000 11529576578 3843000000 3843192192 3843000000 3843192192
+11532000000 11532576823 3844000000 3844192274 3844000000 3844192274
+11535000000 11535576901 3845000000 3845192300 3845000000 3845192300
+11538000000 11538577078 3846000000 3846192359 3846000000 3846192359
+11541000000 11541577224 3847000000 3847192408 3847000000 3847192408
+11544000000 11544577368 3848000000 3848192456 3848000000 3848192456
+11547000000 11546200022 3849000000 3848733340 3849000000 3848733340
+11550000000 11550577683 3850000000 3850192561 3850000000 3850192561
+11553000000 11553577843 3851000000 3851192614 3851000000 3851192614
+11556000000 11556577980 3852000000 3852192660 3852000000 3852192660
+11559000000 11559578138 3853000000 3853192712 3853000000 3853192712
+11562000000 11562578296 3854000000 3854192765 3854000000 3854192765
+11565000000 11565578410 3855000000 3855192803 3855000000 3855192803
+11568000000 11568578571 3856000000 3856192857 3856000000 3856192857
+11571000000 11571578698 3857000000 3857192899 3857000000 3857192899
+11574000000 11574578807 3858000000 3858192935 3858000000 3858192935
+11577000000 11577578949 3859000000 3859192983 3859000000 3859192983
+11580000000 11580579183 3860000000 3860193061 3860000000 3860193061
+11583000000 11583579096 3861000000 3861193032 3861000000 3861193032
+11586000000 11586579217 3862000000 3862193072 3862000000 3862193072
+11589000000 11589579325 3863000000 3863193108 3863000000 3863193108
+11592000000 11592579560 3864000000 3864193186 3864000000 3864193186
+11595000000 11595579739 3865000000 3865193246 3865000000 3865193246
+11598000000 11598493379 3866000000 3866164459 3866000000 3866164459
+11601000000 11601580008 3867000000 3867193336 3867000000 3867193336
+11604000000 11604580181 3868000000 3868193393 3868000000 3868193393
+11607000000 11607580297 3869000000 3869193432 3869000000 3869193432
+11610000000 11610580470 3870000000 3870193490 3870000000 3870193490
+11613000000 11613580642 3871000000 3871193547 3871000000 3871193547
+11616000000 11616580698 3872000000 3872193566 3872000000 3872193566
+11619000000 11619580844 3873000000 3873193614 3873000000 3873193614
+11622000000 11622581040 3874000000 3874193680 3874000000 3874193680
+11625000000 11625581069 3875000000 3875193689 3875000000 3875193689
+11628000000 11628581375 3876000000 3876193791 3876000000 3876193791
+11631000000 11631581547 3877000000 3877193849 3877000000 3877193849
+11634000000 11634581680 3878000000 3878193893 3878000000 3878193893
+11637000000 11637581797 3879000000 3879193932 3879000000 3879193932
+11640000000 11640581982 3880000000 3880193994 3880000000 3880193994
+11643000000 11643582088 3881000000 3881194029 3881000000 3881194029
+11646000000 11646582269 3882000000 3882194089 3882000000 3882194089
+11649000000 11649582481 3883000000 3883194160 3883000000 3883194160
+11652000000 11652582588 3884000000 3884194196 3884000000 3884194196
+11655000000 11655582754 3885000000 3885194251 3885000000 3885194251
+11658000000 11658181499 3886000000 3886060499 3886000000 3886060499
+11661000000 11661583025 3887000000 3887194341 3887000000 3887194341
+11664000000 11664583137 3888000000 3888194379 3888000000 3888194379
+11667000000 11667583346 3889000000 3889194448 3889000000 3889194448
+11670000000 11670583425 3890000000 3890194475 3890000000 3890194475
+11673000000 11673583650 3891000000 3891194550 3891000000 3891194550
+11676000000 11676583777 3892000000 3892194592 3892000000 3892194592
+11679000000 11679583866 3893000000 3893194622 3893000000 3893194622
+11682000000 11682583972 3894000000 3894194657 3894000000 3894194657
+11685000000 11685584183 3895000000 3895194727 3895000000 3895194727
+11688000000 11688584392 3896000000 3896194797 3896000000 3896194797
+11691000000 11691584537 3897000000 3897194845 3897000000 3897194845
+11694000000 11694584663 3898000000 3898194887 3898000000 3898194887
+11697000000 11697584829 3899000000 3899194943 3899000000 3899194943
+11700000000 11700584909 3900000000 3900194969 3900000000 3900194969
+11703000000 11703585144 3901000000 3901195048 3901000000 3901195048
+11706000000 11706585303 3902000000 3902195101 3902000000 3902195101
+11709000000 11709585424 3903000000 3903195141 3903000000 3903195141
+11712000000 11712585584 3904000000 3904195194 3904000000 3904195194
+11715000000 11715585667 3905000000 3905195222 3905000000 3905195222
+11718000000 11718585913 3906000000 3906195304 3906000000 3906195304
+11721000000 11721586036 3907000000 3907195345 3907000000 3907195345
+11724000000 11724586172 3908000000 3908195390 3908000000 3908195390
+11727000000 11727586347 3909000000 3909195449 3909000000 3909195449
+11730000000 11730586469 3910000000 3910195489 3910000000 3910195489
+11733000000 11733586619 3911000000 3911195539 3911000000 3911195539
+11736000000 11736586767 3912000000 3912195589 3912000000 3912195589
+11739000000 11738760461 3913000000 3912920153 3913000000 3912920153
+11742000000 11742587087 3914000000 3914195695 3914000000 3914195695
+11745000000 11745587219 3915000000 3915195739 3915000000 3915195739
+11748000000 11748587393 3916000000 3916195797 3916000000 3916195797
+11751000000 11751587512 3917000000 3917195837 3917000000 3917195837
+11754000000 11754587636 3918000000 3918195878 3918000000 3918195878
+11757000000 11757587855 3919000000 3919195951 3919000000 3919195951
+11760000000 11760587991 3920000000 3920195997 3920000000 3920195997
+11763000000 11763588142 3921000000 3921196047 3921000000 3921196047
+11766000000 11766588292 3922000000 3922196097 3922000000 3922196097
+11769000000 11769588407 3923000000 3923196135 3923000000 3923196135
+11772000000 11772588504 3924000000 3924196168 3924000000 3924196168
+11775000000 11775588712 3925000000 3925196237 3925000000 3925196237
+11778000000 11778588867 3926000000 3926196289 3926000000 3926196289
+11781000000 11781589026 3927000000 3927196342 3927000000 3927196342
+11784000000 11784589200 3928000000 3928196400 3928000000 3928196400
+11787000000 11787589300 3929000000 3929196433 3929000000 3929196433
+11790000000 11790589478 3930000000 3930196492 3930000000 3930196492
+11793000000 11793589627 3931000000 3931196542 3931000000 3931196542
+11796000000 11796589755 3932000000 3932196585 3932000000 3932196585
+11799000000 11799589924 3933000000 3933196641 3933000000 3933196641
+11802000000 11802590044 3934000000 3934196681 3934000000 3934196681
+11805000000 11804417394 3935000000 3934805798 3935000000 3934805798
+11808000000 11808590294 3936000000 3936196764 3936000000 3936196764
+11811000000 11811590552 3937000000 3937196850 3937000000 3937196850
+11814000000 11814590657 3938000000 3938196885 3938000000 3938196885
+11817000000 11817590737 3939000000 3939196912 3939000000 3939196912
+11820000000 11820590884 3940000000 3940196961 3940000000 3940196961
+11823000000 11823591138 3941000000 3941197046 3941000000 3941197046
+11826000000 11826591228 3942000000 3942197076 3942000000 3942197076
+11829000000 11829591473 3943000000 3943197157 3943000000 3943197157
+11832000000 11832591551 3944000000 3944197183 3944000000 3944197183
+11835000000 11835591728 3945000000 3945197242 3945000000 3945197242
+11838000000 11838591874 3946000000 3946197291 3946000000 3946197291
+11841000000 11841592018 3947000000 3947197339 3947000000 3947197339
+11844000000 11843214672 3948000000 3947738224 3948000000 3947738224
+11847000000 11847592333 3949000000 3949197444 3949000000 3949197444
+11850000000 11850592493 3950000000 3950197497 3950000000 3950197497
+11853000000 11853592630 3951000000 3951197543 3951000000 3951197543
+11856000000 11856592788 3952000000 3952197596 3952000000 3952197596
+11859000000 11859592946 3953000000 3953197648 3953000000 3953197648
+11862000000 11862593060 3954000000 3954197686 3954000000 3954197686
+11865000000 11865593221 3955000000 3955197740 3955000000 3955197740
+11868000000 11868593348 3956000000 3956197782 3956000000 3956197782
+11871000000 11871593457 3957000000 3957197819 3957000000 3957197819
+11874000000 11874593599 3958000000 3958197866 3958000000 3958197866
+11877000000 11877593833 3959000000 3959197944 3959000000 3959197944
+11880000000 11880593746 3960000000 3960197915 3960000000 3960197915
+11883000000 11883593867 3961000000 3961197955 3961000000 3961197955
+11886000000 11886593975 3962000000 3962197991 3962000000 3962197991
+11889000000 11889594210 3963000000 3963198070 3963000000 3963198070
+11892000000 11892594389 3964000000 3964198129 3964000000 3964198129
+11895000000 11895508029 3965000000 3965169343 3965000000 3965169343
+11898000000 11898594658 3966000000 3966198219 3966000000 3966198219
+11901000000 11901594831 3967000000 3967198277 3967000000 3967198277
+11904000000 11904594947 3968000000 3968198315 3968000000 3968198315
+11907000000 11907595120 3969000000 3969198373 3969000000 3969198373
+11910000000 11910595292 3970000000 3970198430 3970000000 3970198430
+11913000000 11913595348 3971000000 3971198449 3971000000 3971198449
+11916000000 11916595494 3972000000 3972198498 3972000000 3972198498
+11919000000 11919595690 3973000000 3973198563 3973000000 3973198563
+11922000000 11922595719 3974000000 3974198573 3974000000 3974198573
+11925000000 11925596025 3975000000 3975198675 3975000000 3975198675
+11928000000 11928596197 3976000000 3976198732 3976000000 3976198732
+11931000000 11931596330 3977000000 3977198776 3977000000 3977198776
+11934000000 11934596447 3978000000 3978198815 3978000000 3978198815
+11937000000 11937596632 3979000000 3979198877 3979000000 3979198877
+11940000000 11940596738 3980000000 3980198912 3980000000 3980198912
+11943000000 11943596919 3981000000 3981198973 3981000000 3981198973
+11946000000 11946597131 3982000000 3982199043 3982000000 3982199043
+11949000000 11949597238 3983000000 3983199079 3983000000 3983199079
+11952000000 11952597404 3984000000 3984199134 3984000000 3984199134
+11955000000 11955196149 3985000000 3985065383 3985000000 3985065383
+11958000000 11958597675 3986000000 3986199225 3986000000 3986199225
+11961000000 11961597787 3987000000 3987199262 3987000000 3987199262
+11964000000 11964597996 3988000000 3988199332 3988000000 3988199332
+11967000000 11967598075 3989000000 3989199358 3989000000 3989199358
+11970000000 11970598300 3990000000 3990199433 3990000000 3990199433
+11973000000 11973598427 3991000000 3991199475 3991000000 3991199475
+11976000000 11976598516 3992000000 3992199505 3992000000 3992199505
+11979000000 11979598622 3993000000 3993199540 3993000000 3993199540
+11982000000 11982598833 3994000000 3994199611 3994000000 3994199611
+11985000000 11985599042 3995000000 3995199680 3995000000 3995199680
+11988000000 11988599187 3996000000 3996199729 3996000000 3996199729
+11991000000 11991599313 3997000000 3997199771 3997000000 3997199771
+11994000000 11994599479 3998000000 3998199826 3998000000 3998199826
+11997000000 11997599559 3999000000 3999199853 3999000000 3999199853
+12000000000 12000599794 4000000000 4000199931 4000000000 4000199931
+12003000000 12003599953 4001000000 4001199984 4001000000 4001199984
+12006000000 12006600074 4002000000 4002200024 4002000000 4002200024
+12009000000 12009600234 4003000000 4003200078 4003000000 4003200078
+12012000000 12012600317 4004000000 4004200105 4004000000 4004200105
+12015000000 12015600563 4005000000 4005200187 4005000000 4005200187
+12018000000 12018600686 4006000000 4006200228 4006000000 4006200228
+12021000000 12021600822 4007000000 4007200274 4007000000 4007200274
+12024000000 12024600997 4008000000 4008200332 4008000000 4008200332
+12027000000 12027601119 4009000000 4009200373 4009000000 4009200373
+12030000000 12030601269 4010000000 4010200423 4010000000 4010200423
+12033000000 12033601417 4011000000 4011200472 4011000000 4011200472
+12036000000 12035775111 4012000000 4011925037 4012000000 4011925037
+12039000000 12039601737 4013000000 4013200579 4013000000 4013200579
+12042000000 12042601869 4014000000 4014200623 4014000000 4014200623
+12045000000 12045602043 4015000000 4015200681 4015000000 4015200681
+12048000000 12048602162 4016000000 4016200720 4016000000 4016200720
+12051000000 12051602286 4017000000 4017200762 4017000000 4017200762
+12054000000 12054602505 4018000000 4018200835 4018000000 4018200835
+12057000000 12057602641 4019000000 4019200880 4019000000 4019200880
+12060000000 12060602792 4020000000 4020200930 4020000000 4020200930
+12063000000 12063602942 4021000000 4021200980 4021000000 4021200980
+12066000000 12066603057 4022000000 4022201019 4022000000 4022201019
+12069000000 12069603154 4023000000 4023201051 4023000000 4023201051
+12072000000 12072603362 4024000000 4024201120 4024000000 4024201120
+12075000000 12075603517 4025000000 4025201172 4025000000 4025201172
+12078000000 12078603676 4026000000 4026201225 4026000000 4026201225
+12081000000 12081603850 4027000000 4027201283 4027000000 4027201283
+12084000000 12084603950 4028000000 4028201316 4028000000 4028201316
+12087000000 12087604128 4029000000 4029201376 4029000000 4029201376
+12090000000 12090604277 4030000000 4030201425 4030000000 4030201425
+12093000000 12093604405 4031000000 4031201468 4031000000 4031201468
+12096000000 12096604574 4032000000 4032201524 4032000000 4032201524
+12099000000 12099604694 4033000000 4033201564 4033000000 4033201564
+12102000000 12101432044 4034000000 4033810681 4034000000 4033810681
+12105000000 12105604944 4035000000 4035201648 4035000000 4035201648
+12108000000 12108605202 4036000000 4036201734 4036000000 4036201734
+12111000000 12111605307 4037000000 4037201769 4037000000 4037201769
+12114000000 12114605387 4038000000 4038201795 4038000000 4038201795
+12117000000 12117605534 4039000000 4039201844 4039000000 4039201844
+12120000000 12120605788 4040000000 4040201929 4040000000 4040201929
+12123000000 12123605878 4041000000 4041201959 4041000000 4041201959
+12126000000 12126606123 4042000000 4042202041 4042000000 4042202041
+12129000000 12129606201 4043000000 4043202067 4043000000 4043202067
+12132000000 12132606378 4044000000 4044202126 4044000000 4044202126
+12135000000 12135606524 4045000000 4045202174 4045000000 4045202174
+12138000000 12138606668 4046000000 4046202222 4046000000 4046202222
+12141000000 12140229322 4047000000 4046743107 4047000000 4046743107
+12144000000 12144606983 4048000000 4048202327 4048000000 4048202327
+12147000000 12147607143 4049000000 4049202381 4049000000 4049202381
+12150000000 12150607280 4050000000 4050202426 4050000000 4050202426
+12153000000 12153607438 4051000000 4051202479 4051000000 4051202479
+12156000000 12156607596 4052000000 4052202532 4052000000 4052202532
+12159000000 12159607710 4053000000 4053202570 4053000000 4053202570
+12162000000 12162607871 4054000000 4054202623 4054000000 4054202623
+12165000000 12165607998 4055000000 4055202666 4055000000 4055202666
+12168000000 12168608107 4056000000 4056202702 4056000000 4056202702
+12171000000 12171608249 4057000000 4057202749 4057000000 4057202749
+12174000000 12174608483 4058000000 4058202827 4058000000 4058202827
+12177000000 12177608396 4059000000 4059202798 4059000000 4059202798
+12180000000 12180608517 4060000000 4060202839 4060000000 4060202839
+12183000000 12183608625 4061000000 4061202875 4061000000 4061202875
+12186000000 12186608860 4062000000 4062202953 4062000000 4062202953
+12189000000 12189609039 4063000000 4063203013 4063000000 4063203013
+12192000000 12192522679 4064000000 4064174226 4064000000 4064174226
+12195000000 12195609308 4065000000 4065203102 4065000000 4065203102
+12198000000 12198609481 4066000000 4066203160 4066000000 4066203160
+12201000000 12201609597 4067000000 4067203199 4067000000 4067203199
+12204000000 12204609770 4068000000 4068203256 4068000000 4068203256
+12207000000 12207609942 4069000000 4069203314 4069000000 4069203314
+12210000000 12210609998 4070000000 4070203332 4070000000 4070203332
+12213000000 12213610144 4071000000 4071203381 4071000000 4071203381
+12216000000 12216610340 4072000000 4072203446 4072000000 4072203446
+12219000000 12219610369 4073000000 4073203456 4073000000 4073203456
+12222000000 12222610675 4074000000 4074203558 4074000000 4074203558
+12225000000 12225610847 4075000000 4075203615 4075000000 4075203615
+12228000000 12228610980 4076000000 4076203660 4076000000 4076203660
+12231000000 12231611097 4077000000 4077203699 4077000000 4077203699
+12234000000 12234611282 4078000000 4078203760 4078000000 4078203760
+12237000000 12237611388 4079000000 4079203796 4079000000 4079203796
+12240000000 12240611569 4080000000 4080203856 4080000000 4080203856
+12243000000 12243611781 4081000000 4081203927 4081000000 4081203927
+12246000000 12246611888 4082000000 4082203962 4082000000 4082203962
+12249000000 12249612054 4083000000 4083204018 4083000000 4083204018
+12252000000 12252210799 4084000000 4084070266 4084000000 4084070266
+12255000000 12255612325 4085000000 4085204108 4085000000 4085204108
+12258000000 12258612437 4086000000 4086204145 4086000000 4086204145
+12261000000 12261612646 4087000000 4087204215 4087000000 4087204215
+12264000000 12264612725 4088000000 4088204241 4088000000 4088204241
+12267000000 12267612950 4089000000 4089204316 4089000000 4089204316
+12270000000 12270613077 4090000000 4090204359 4090000000 4090204359
+12273000000 12273613166 4091000000 4091204388 4091000000 4091204388
+12276000000 12276613272 4092000000 4092204424 4092000000 4092204424
+12279000000 12279613483 4093000000 4093204494 4093000000 4093204494
+12282000000 12282613692 4094000000 4094204564 4094000000 4094204564
+12285000000 12285613837 4095000000 4095204612 4095000000 4095204612
+12288000000 12288613963 4096000000 4096204654 4096000000 4096204654
+12291000000 12291614129 4097000000 4097204709 4097000000 4097204709
+12294000000 12294614209 4098000000 4098204736 4098000000 4098204736
+12297000000 12297614444 4099000000 4099204814 4099000000 4099204814
+12300000000 12300614603 4100000000 4100204867 4100000000 4100204867
+12303000000 12303614724 4101000000 4101204908 4101000000 4101204908
+12306000000 12306614884 4102000000 4102204961 4102000000 4102204961
+12309000000 12309614967 4103000000 4103204989 4103000000 4103204989
+12312000000 12312615213 4104000000 4104205071 4104000000 4104205071
+12315000000 12315615336 4105000000 4105205112 4105000000 4105205112
+12318000000 12318615472 4106000000 4106205157 4106000000 4106205157
+12321000000 12321615647 4107000000 4107205215 4107000000 4107205215
+12324000000 12324615769 4108000000 4108205256 4108000000 4108205256
+12327000000 12327615919 4109000000 4109205306 4109000000 4109205306
+12330000000 12330616067 4110000000 4110205355 4110000000 4110205355
+12333000000 12332789761 4111000000 4110929920 4111000000 4110929920
+12336000000 12336616387 4112000000 4112205462 4112000000 4112205462
+12339000000 12339616519 4113000000 4113205506 4113000000 4113205506
+12342000000 12342616693 4114000000 4114205564 4114000000 4114205564
+12345000000 12345616812 4115000000 4115205604 4115000000 4115205604
+12348000000 12348616936 4116000000 4116205645 4116000000 4116205645
+12351000000 12351617155 4117000000 4117205718 4117000000 4117205718
+12354000000 12354617291 4118000000 4118205763 4118000000 4118205763
+12357000000 12357617442 4119000000 4119205814 4119000000 4119205814
+12360000000 12360617592 4120000000 4120205864 4120000000 4120205864
+12363000000 12363617707 4121000000 4121205902 4121000000 4121205902
+12366000000 12366617804 4122000000 4122205934 4122000000 4122205934
+12369000000 12369618012 4123000000 4123206004 4123000000 4123206004
+12372000000 12372618167 4124000000 4124206055 4124000000 4124206055
+12375000000 12375618326 4125000000 4125206108 4125000000 4125206108
+12378000000 12378618500 4126000000 4126206166 4126000000 4126206166
+12381000000 12381618600 4127000000 4127206200 4127000000 4127206200
+12384000000 12384618778 4128000000 4128206259 4128000000 4128206259
+12387000000 12387618927 4129000000 4129206309 4129000000 4129206309
+12390000000 12390619055 4130000000 4130206351 4130000000 4130206351
+12393000000 12393619224 4131000000 4131206408 4131000000 4131206408
+12396000000 12396619344 4132000000 4132206448 4132000000 4132206448
+12399000000 12398446694 4133000000 4132815564 4133000000 4132815564
+12402000000 12402619594 4134000000 4134206531 4134000000 4134206531
+12405000000 12405619852 4135000000 4135206617 4135000000 4135206617
+12408000000 12408619957 4136000000 4136206652 4136000000 4136206652
+12411000000 12411620037 4137000000 4137206679 4137000000 4137206679
+12414000000 12414620184 4138000000 4138206728 4138000000 4138206728
+12417000000 12417620438 4139000000 4139206812 4139000000 4139206812
+12420000000 12420620528 4140000000 4140206842 4140000000 4140206842
+12423000000 12423620773 4141000000 4141206924 4141000000 4141206924
+12426000000 12426620851 4142000000 4142206950 4142000000 4142206950
+12429000000 12429621028 4143000000 4143207009 4143000000 4143207009
+12432000000 12432621174 4144000000 4144207058 4144000000 4144207058
+12435000000 12435621318 4145000000 4145207106 4145000000 4145207106
+12438000000 12437243972 4146000000 4145747990 4146000000 4145747990
+12441000000 12441621633 4147000000 4147207211 4147000000 4147207211
+12444000000 12444621793 4148000000 4148207264 4148000000 4148207264
+12447000000 12447621930 4149000000 4149207310 4149000000 4149207310
+12450000000 12450622088 4150000000 4150207362 4150000000 4150207362
+12453000000 12453622246 4151000000 4151207415 4151000000 4151207415
+12456000000 12456622360 4152000000 4152207453 4152000000 4152207453
+12459000000 12459622521 4153000000 4153207507 4153000000 4153207507
+12462000000 12462622648 4154000000 4154207549 4154000000 4154207549
+12465000000 12465622757 4155000000 4155207585 4155000000 4155207585
+12468000000 12468622899 4156000000 4156207633 4156000000 4156207633
+12471000000 12471623133 4157000000 4157207711 4157000000 4157207711
+12474000000 12474623046 4158000000 4158207682 4158000000 4158207682
+12477000000 12477623167 4159000000 4159207722 4159000000 4159207722
+12480000000 12480623275 4160000000 4160207758 4160000000 4160207758
+12483000000 12483623510 4161000000 4161207836 4161000000 4161207836
+12486000000 12486623689 4162000000 4162207896 4162000000 4162207896
+12489000000 12489537329 4163000000 4163179109 4163000000 4163179109
+12492000000 12492623958 4164000000 4164207986 4164000000 4164207986
+12495000000 12495624131 4165000000 4165208043 4165000000 4165208043
+12498000000 12498624247 4166000000 4166208082 4166000000 4166208082
+12501000000 12501624420 4167000000 4167208140 4167000000 4167208140
+12504000000 12504624592 4168000000 4168208197 4168000000 4168208197
+12507000000 12507624648 4169000000 4169208216 4169000000 4169208216
+12510000000 12510624794 4170000000 4170208264 4170000000 4170208264
+12513000000 12513624990 4171000000 4171208330 4171000000 4171208330
+12516000000 12516625019 4172000000 4172208339 4172000000 4172208339
+12519000000 12519625325 4173000000 4173208441 4173000000 4173208441
+12522000000 12522625497 4174000000 4174208499 4174000000 4174208499
+12525000000 12525625630 4175000000 4175208543 4175000000 4175208543
+12528000000 12528625747 4176000000 4176208582 4176000000 4176208582
+12531000000 12531625932 4177000000 4177208644 4177000000 4177208644
+12534000000 12534626038 4178000000 4178208679 4178000000 4178208679
+12537000000 12537626219 4179000000 4179208739 4179000000 4179208739
+12540000000 12540626431 4180000000 4180208810 4180000000 4180208810
+12543000000 12543626538 4181000000 4181208846 4181000000 4181208846
+12546000000 12546626704 4182000000 4182208901 4182000000 4182208901
+12549000000 12549225449 4183000000 4183075149 4183000000 4183075149
+12552000000 12552626975 4184000000 4184208991 4184000000 4184208991
+12555000000 12555627087 4185000000 4185209029 4185000000 4185209029
+12558000000 12558627296 4186000000 4186209098 4186000000 4186209098
+12561000000 12561627375 4187000000 4187209125 4187000000 4187209125
+12564000000 12564627600 4188000000 4188209200 4188000000 4188209200
+12567000000 12567627727 4189000000 4189209242 4189000000 4189209242
+12570000000 12570627816 4190000000 4190209272 4190000000 4190209272
+12573000000 12573627922 4191000000 4191209307 4191000000 4191209307
+12576000000 12576628133 4192000000 4192209377 4192000000 4192209377
+12579000000 12579628342 4193000000 4193209447 4193000000 4193209447
+12582000000 12582628487 4194000000 4194209495 4194000000 4194209495
+12585000000 12585628613 4195000000 4195209537 4195000000 4195209537
+12588000000 12588628779 4196000000 4196209593 4196000000 4196209593
+12591000000 12591628859 4197000000 4197209619 4197000000 4197209619
+12594000000 12594629094 4198000000 4198209698 4198000000 4198209698
+12597000000 12597629253 4199000000 4199209751 4199000000 4199209751
+12600000000 12600629374 4200000000 4200209791 4200000000 4200209791
+12603000000 12603629534 4201000000 4201209844 4201000000 4201209844
+12606000000 12606629617 4202000000 4202209872 4202000000 4202209872
+12609000000 12609629863 4203000000 4203209954 4203000000 4203209954
+12612000000 12612629986 4204000000 4204209995 4204000000 4204209995
+12615000000 12615630122 4205000000 4205210040 4205000000 4205210040
+12618000000 12618630297 4206000000 4206210099 4206000000 4206210099
+12621000000 12621630419 4207000000 4207210139 4207000000 4207210139
+12624000000 12624630569 4208000000 4208210189 4208000000 4208210189
+12627000000 12627630717 4209000000 4209210239 4209000000 4209210239
+12630000000 12629804411 4210000000 4209934803 4210000000 4209934803
+12633000000 12633631037 4211000000 4211210345 4211000000 4211210345
+12636000000 12636631169 4212000000 4212210389 4212000000 4212210389
+12639000000 12639631343 4213000000 4213210447 4213000000 4213210447
+12642000000 12642631462 4214000000 4214210487 4214000000 4214210487
+12645000000 12645631586 4215000000 4215210528 4215000000 4215210528
+12648000000 12648631805 4216000000 4216210601 4216000000 4216210601
+12651000000 12651631941 4217000000 4217210647 4217000000 4217210647
+12654000000 12654632092 4218000000 4218210697 4218000000 4218210697
+12657000000 12657632242 4219000000 4219210747 4219000000 4219210747
+12660000000 12660632357 4220000000 4220210785 4220000000 4220210785
+12663000000 12663632454 4221000000 4221210818 4221000000 4221210818
+12666000000 12666632662 4222000000 4222210887 4222000000 4222210887
+12669000000 12669632817 4223000000 4223210939 4223000000 4223210939
+12672000000 12672632976 4224000000 4224210992 4224000000 4224210992
+12675000000 12675633150 4225000000 4225211050 4225000000 4225211050
+12678000000 12678633250 4226000000 4226211083 4226000000 4226211083
+12681000000 12681633428 4227000000 4227211142 4227000000 4227211142
+12684000000 12684633577 4228000000 4228211192 4228000000 4228211192
+12687000000 12687633705 4229000000 4229211235 4229000000 4229211235
+12690000000 12690633874 4230000000 4230211291 4230000000 4230211291
+12693000000 12693633994 4231000000 4231211331 4231000000 4231211331
+12696000000 12695461344 4232000000 4231820448 4232000000 4231820448
+12699000000 12699634244 4233000000 4233211414 4233000000 4233211414
+12702000000 12702634502 4234000000 4234211500 4234000000 4234211500
+12705000000 12705634607 4235000000 4235211535 4235000000 4235211535
+12708000000 12708634687 4236000000 4236211562 4236000000 4236211562
+12711000000 12711634834 4237000000 4237211611 4237000000 4237211611
+12714000000 12714635088 4238000000 4238211696 4238000000 4238211696
+12717000000 12717635178 4239000000 4239211726 4239000000 4239211726
+12720000000 12720635423 4240000000 4240211807 4240000000 4240211807
+12723000000 12723635501 4241000000 4241211833 4241000000 4241211833
+12726000000 12726635678 4242000000 4242211892 4242000000 4242211892
+12729000000 12729635824 4243000000 4243211941 4243000000 4243211941
+12732000000 12732635968 4244000000 4244211989 4244000000 4244211989
+12735000000 12734258622 4245000000 4244752874 4245000000 4244752874
+12738000000 12738636283 4246000000 4246212094 4246000000 4246212094
+12741000000 12741636443 4247000000 4247212147 4247000000 4247212147
+12744000000 12744636580 4248000000 4248212193 4248000000 4248212193
+12747000000 12747636738 4249000000 4249212246 4249000000 4249212246
+12750000000 12750636896 4250000000 4250212298 4250000000 4250212298
+12753000000 12753637010 4251000000 4251212336 4251000000 4251212336
+12756000000 12756637171 4252000000 4252212390 4252000000 4252212390
+12759000000 12759637298 4253000000 4253212432 4253000000 4253212432
+12762000000 12762637407 4254000000 4254212469 4254000000 4254212469
+12765000000 12765637549 4255000000 4255212516 4255000000 4255212516
+12768000000 12768637783 4256000000 4256212594 4256000000 4256212594
+12771000000 12771637696 4257000000 4257212565 4257000000 4257212565
+12774000000 12774637817 4258000000 4258212605 4258000000 4258212605
+12777000000 12777637925 4259000000 4259212641 4259000000 4259212641
+12780000000 12780638160 4260000000 4260212720 4260000000 4260212720
+12783000000 12783638339 4261000000 4261212779 4261000000 4261212779
+12786000000 12786551979 4262000000 4262183993 4262000000 4262183993
+12789000000 12789638608 4263000000 4263212869 4263000000 4263212869
+12792000000 12792638781 4264000000 4264212927 4264000000 4264212927
+12795000000 12795638897 4265000000 4265212965 4265000000 4265212965
+12798000000 12798639070 4266000000 4266213023 4266000000 4266213023
+12801000000 12801639242 4267000000 4267213080 4267000000 4267213080
+12804000000 12804639298 4268000000 4268213099 4268000000 4268213099
+12807000000 12807639444 4269000000 4269213148 4269000000 4269213148
+12810000000 12810639640 4270000000 4270213213 4270000000 4270213213
+12813000000 12813639669 4271000000 4271213223 4271000000 4271213223
+12816000000 12816639975 4272000000 4272213325 4272000000 4272213325
+12819000000 12819640147 4273000000 4273213382 4273000000 4273213382
+12822000000 12822640280 4274000000 4274213426 4274000000 4274213426
+12825000000 12825640397 4275000000 4275213465 4275000000 4275213465
+12828000000 12828640582 4276000000 4276213527 4276000000 4276213527
+12831000000 12831640688 4277000000 4277213562 4277000000 4277213562
+12834000000 12834640869 4278000000 4278213623 4278000000 4278213623
+12837000000 12837641081 4279000000 4279213693 4279000000 4279213693
+12840000000 12840641188 4280000000 4280213729 4280000000 4280213729
+12843000000 12843641354 4281000000 4281213784 4281000000 4281213784
+12846000000 12846240099 4282000000 4282080033 4282000000 4282080033
+12849000000 12849641625 4283000000 4283213875 4283000000 4283213875
+12852000000 12852641737 4284000000 4284213912 4284000000 4284213912
+12855000000 12855641946 4285000000 4285213982 4285000000 4285213982
+12858000000 12858642025 4286000000 4286214008 4286000000 4286214008
+12861000000 12861642250 4287000000 4287214083 4287000000 4287214083
+12864000000 12864642377 4288000000 4288214125 4288000000 4288214125
+12867000000 12867642466 4289000000 4289214155 4289000000 4289214155
+12870000000 12870642572 4290000000 4290214190 4290000000 4290214190
+12873000000 12873642783 4291000000 4291214261 4291000000 4291214261
+12876000000 12876642992 4292000000 4292214330 4292000000 4292214330
+12879000000 12879643137 4293000000 4293214379 4293000000 4293214379
+12882000000 12882643263 4294000000 4294214421 4294000000 4294214421
+12885000000 12885643429 4295000000 4295214476 32704 247180
+12888000000 12888643509 4296000000 4296214503 1032704 1247207
+12891000000 12891643744 4297000000 4297214581 2032704 2247285
+12894000000 12894643903 4298000000 4298214634 3032704 3247338
+12897000000 12897644024 4299000000 4299214674 4032704 4247378
+12900000000 12900644184 4300000000 4300214728 5032704 5247432
+12903000000 12903644267 4301000000 4301214755 6032704 6247459
+12906000000 12906644513 4302000000 4302214837 7032704 7247541
+12909000000 12909644636 4303000000 4303214878 8032704 8247582
+12912000000 12912644772 4304000000 4304214924 9032704 9247628
+12915000000 12915644947 4305000000 4305214982 10032704 10247686
+12918000000 12918645069 4306000000 4306215023 11032704 11247727
+12921000000 12921645219 4307000000 4307215073 12032704 12247777
+12924000000 12924645367 4308000000 4308215122 13032704 13247826
+12927000000 12926819061 4309000000 4308939687 14032704 13972391
+12930000000 12930645687 4310000000 4310215229 15032704 15247933
+12933000000 12933645819 4311000000 4311215273 16032704 16247977
+12936000000 12936645993 4312000000 4312215331 17032704 17248035
+12939000000 12939646112 4313000000 4313215370 18032704 18248074
+12942000000 12942646236 4314000000 4314215412 19032704 19248116
+12945000000 12945646455 4315000000 4315215485 20032704 20248189
+12948000000 12948646591 4316000000 4316215530 21032704 21248234
+12951000000 12951646742 4317000000 4317215580 22032704 22248284
+12954000000 12954646892 4318000000 4318215630 23032704 23248334
+12957000000 12957647007 4319000000 4319215669 24032704 24248373
+12960000000 12960647104 4320000000 4320215701 25032704 25248405
+12963000000 12963647312 4321000000 4321215770 26032704 26248474
+12966000000 12966647467 4322000000 4322215822 27032704 27248526
+12969000000 12969647626 4323000000 4323215875 28032704 28248579
+12972000000 12972647800 4324000000 4324215933 29032704 29248637
+12975000000 12975647900 4325000000 4325215966 30032704 30248670
+12978000000 12978648078 4326000000 4326216026 31032704 31248730
+12981000000 12981648227 4327000000 4327216075 32032704 32248779
+12984000000 12984648355 4328000000 4328216118 33032704 33248822
+12987000000 12987648524 4329000000 4329216174 34032704 34248878
+12990000000 12990648644 4330000000 4330216214 35032704 35248918
+12993000000 12992475994 4331000000 4330825331 36032704 35858035
+12996000000 12996648894 4332000000 4332216298 37032704 37249002
+12999000000 12999649152 4333000000 4333216384 38032704 38249088
+13002000000 13002649257 4334000000 4334216419 39032704 39249123
+13005000000 13005649337 4335000000 4335216445 40032704 40249149
+13008000000 13008649484 4336000000 4336216494 41032704 41249198
+13011000000 13011649738 4337000000 4337216579 42032704 42249283
+13014000000 13014649828 4338000000 4338216609 43032704 43249313
+13017000000 13017650073 4339000000 4339216691 44032704 44249395
+13020000000 13020650151 4340000000 4340216717 45032704 45249421
+13023000000 13023650328 4341000000 4341216776 46032704 46249480
+13026000000 13026650474 4342000000 4342216824 47032704 47249528
+13029000000 13029650618 4343000000 4343216872 48032704 48249576
+13032000000 13031273272 4344000000 4343757757 49032704 48790461
+13035000000 13035650933 4345000000 4345216977 50032704 50249681
+13038000000 13038651093 4346000000 4346217031 51032704 51249735
+13041000000 13041651230 4347000000 4347217076 52032704 52249780
+13044000000 13044651388 4348000000 4348217129 53032704 53249833
+13047000000 13047651546 4349000000 4349217182 54032704 54249886
+13050000000 13050651660 4350000000 4350217220 55032704 55249924
+13053000000 13053651821 4351000000 4351217273 56032704 56249977
+13056000000 13056651948 4352000000 4352217316 57032704 57250020
+13059000000 13059652057 4353000000 4353217352 58032704 58250056
+13062000000 13062652199 4354000000 4354217399 59032704 59250103
+13065000000 13065652433 4355000000 4355217477 60032704 60250181
+13068000000 13068652346 4356000000 4356217448 61032704 61250152
+13071000000 13071652467 4357000000 4357217489 62032704 62250193
+13074000000 13074652575 4358000000 4358217525 63032704 63250229
+13077000000 13077652810 4359000000 4359217603 64032704 64250307
+13080000000 13080652989 4360000000 4360217663 65032704 65250367
+13083000000 13083566629 4361000000 4361188876 66032704 66221580
+13086000000 13086653258 4362000000 4362217752 67032704 67250456
+13089000000 13089653431 4363000000 4363217810 68032704 68250514
+13092000000 13092653547 4364000000 4364217849 69032704 69250553
+13095000000 13095653720 4365000000 4365217906 70032704 70250610
+13098000000 13098653892 4366000000 4366217964 71032704 71250668
+13101000000 13101653948 4367000000 4367217982 72032704 72250686
+13104000000 13104654094 4368000000 4368218031 73032704 73250735
+13107000000 13107654290 4369000000 4369218096 74032704 74250800
+13110000000 13110654319 4370000000 4370218106 75032704 75250810
+13113000000 13113654625 4371000000 4371218208 76032704 76250912
+13116000000 13116654797 4372000000 4372218265 77032704 77250969
+13119000000 13119654930 4373000000 4373218310 78032704 78251014
+13122000000 13122655047 4374000000 4374218349 79032704 79251053
+13125000000 13125655232 4375000000 4375218410 80032704 80251114
+13128000000 13128655338 4376000000 4376218446 81032704 81251150
+13131000000 13131655519 4377000000 4377218506 82032704 82251210
+13134000000 13134655731 4378000000 4378218577 83032704 83251281
+13137000000 13137655838 4379000000 4379218612 84032704 84251316
+13140000000 13140656004 4380000000 4380218668 85032704 85251372
+13143000000 13143254749 4381000000 4381084916 86032704 86117620
+13146000000 13146656275 4382000000 4382218758 87032704 87251462
+13149000000 13149656387 4383000000 4383218795 88032704 88251499
+13152000000 13152656596 4384000000 4384218865 89032704 89251569
+13155000000 13155656675 4385000000 4385218891 90032704 90251595
+13158000000 13158656900 4386000000 4386218966 91032704 91251670
+13161000000 13161657027 4387000000 4387219009 92032704 92251713
+13164000000 13164657116 4388000000 4388219038 93032704 93251742
+13167000000 13167657222 4389000000 4389219074 94032704 94251778
+13170000000 13170657433 4390000000 4390219144 95032704 95251848
+13173000000 13173657642 4391000000 4391219214 96032704 96251918
+13176000000 13176657787 4392000000 4392219262 97032704 97251966
+13179000000 13179657913 4393000000 4393219304 98032704 98252008
+13182000000 13182658079 4394000000 4394219359 99032704 99252063
+13185000000 13185658159 4395000000 4395219386 100032704 100252090
+13188000000 13188658394 4396000000 4396219464 101032704 101252168
+13191000000 13191658553 4397000000 4397219517 102032704 102252221
+13194000000 13194658674 4398000000 4398219558 103032704 103252262
+13197000000 13197658834 4399000000 4399219611 104032704 104252315
+13200000000 13200658917 4400000000 4400219639 105032704 105252343
+13203000000 13203659163 4401000000 4401219721 106032704 106252425
+13206000000 13206659286 4402000000 4402219762 107032704 107252466
+13209000000 13209659422 4403000000 4403219807 108032704 108252511
+13212000000 13212659597 4404000000 4404219865 109032704 109252569
+13215000000 13215659719 4405000000 4405219906 110032704 110252610
+13218000000 13218659869 4406000000 4406219956 111032704 111252660
+13221000000 13221660017 4407000000 4407220005 112032704 112252709
+13224000000 13223833711 4408000000 4407944570 113032704 112977274
+13227000000 13227660337 4409000000 4409220112 114032704 114252816
+13230000000 13230660469 4410000000 4410220156 115032704 115252860
+13233000000 13233660643 4411000000 4411220214 116032704 116252918
+13236000000 13236660762 4412000000 4412220254 117032704 117252958
+13239000000 13239660886 4413000000 4413220295 118032704 118252999
+13242000000 13242661105 4414000000 4414220368 119032704 119253072
+13245000000 13245661241 4415000000 4415220413 120032704 120253117
+13248000000 13248661392 4416000000 4416220464 121032704 121253168
+13251000000 13251661542 4417000000 4417220514 122032704 122253218
+13254000000 13254661657 4418000000 4418220552 123032704 123253256
+13257000000 13257661754 4419000000 4419220584 124032704 124253288
+13260000000 13260661962 4420000000 4420220654 125032704 125253358
+13263000000 13263662117 4421000000 4421220705 126032704 126253409
+13266000000 13266662276 4422000000 4422220758 127032704 127253462
+13269000000 13269662450 4423000000 4423220816 128032704 128253520
+13272000000 13272662550 4424000000 4424220850 129032704 129253554
+13275000000 13275662728 4425000000 4425220909 130032704 130253613
+13278000000 13278662877 4426000000 4426220959 131032704 131253663
+13281000000 13281663005 4427000000 4427221001 132032704 132253705
+13284000000 13284663174 4428000000 4428221058 133032704 133253762
+13287000000 13287663294 4429000000 4429221098 134032704 134253802
+13290000000 13289490644 4430000000 4429830214 135032704 134862918
+13293000000 13293663544 4431000000 4431221181 136032704 136253885
+13296000000 13296663802 4432000000 4432221267 137032704 137253971
+13299000000 13299663907 4433000000 4433221302 138032704 138254006
+13302000000 13302663987 4434000000 4434221329 139032704 139254033
+13305000000 13305664134 4435000000 4435221378 140032704 140254082
+13308000000 13308664388 4436000000 4436221462 141032704 141254166
+13311000000 13311664478 4437000000 4437221492 142032704 142254196
+13314000000 13314664723 4438000000 4438221574 143032704 143254278
+13317000000 13317664801 4439000000 4439221600 144032704 144254304
+13320000000 13320664978 4440000000 4440221659 145032704 145254363
+13323000000 13323665124 4441000000 4441221708 146032704 146254412
+13326000000 13326665268 4442000000 4442221756 147032704 147254460
+13329000000 13328287922 4443000000 4442762640 148032704 147795344
+13332000000 13332665583 4444000000 4444221861 149032704 149254565
+13335000000 13335665743 4445000000 4445221914 150032704 150254618
+13338000000 13338665880 4446000000 4446221960 151032704 151254664
+13341000000 13341666038 4447000000 4447222012 152032704 152254716
+13344000000 13344666196 4448000000 4448222065 153032704 153254769
+13347000000 13347666310 4449000000 4449222103 154032704 154254807
+13350000000 13350666471 4450000000 4450222157 155032704 155254861
+13353000000 13353666598 4451000000 4451222199 156032704 156254903
+13356000000 13356666707 4452000000 4452222235 157032704 157254939
+13359000000 13359666849 4453000000 4453222283 158032704 158254987
+13362000000 13362667083 4454000000 4454222361 159032704 159255065
+13365000000 13365666996 4455000000 4455222332 160032704 160255036
+13368000000 13368667117 4456000000 4456222372 161032704 161255076
+13371000000 13371667225 4457000000 4457222408 162032704 162255112
+13374000000 13374667460 4458000000 4458222486 163032704 163255190
+13377000000 13377667639 4459000000 4459222546 164032704 164255250
+13380000000 13380581279 4460000000 4460193759 165032704 165226463
+13383000000 13383667908 4461000000 4461222636 166032704 166255340
+13386000000 13386668081 4462000000 4462222693 167032704 167255397
+13389000000 13389668197 4463000000 4463222732 168032704 168255436
+13392000000 13392668370 4464000000 4464222790 169032704 169255494
+13395000000 13395668542 4465000000 4465222847 170032704 170255551
+13398000000 13398668598 4466000000 4466222866 171032704 171255570
+13401000000 13401668744 4467000000 4467222914 172032704 172255618
+13404000000 13404668940 4468000000 4468222980 173032704 173255684
+13407000000 13407668969 4469000000 4469222989 174032704 174255693
+13410000000 13410669275 4470000000 4470223091 175032704 175255795
+13413000000 13413669447 4471000000 4471223149 176032704 176255853
+13416000000 13416669580 4472000000 4472223193 177032704 177255897
+13419000000 13419669697 4473000000 4473223232 178032704 178255936
+13422000000 13422669882 4474000000 4474223294 179032704 179255998
+13425000000 13425669988 4475000000 4475223329 180032704 180256033
+13428000000 13428670169 4476000000 4476223389 181032704 181256093
+13431000000 13431670381 4477000000 4477223460 182032704 182256164
+13434000000 13434670488 4478000000 4478223496 183032704 183256200
+13437000000 13437670654 4479000000 4479223551 184032704 184256255
+13440000000 13440269399 4480000000 4480089799 185032704 185122503
+13443000000 13443670925 4481000000 4481223641 186032704 186256345
+13446000000 13446671037 4482000000 4482223679 187032704 187256383
+13449000000 13449671246 4483000000 4483223748 188032704 188256452
+13452000000 13452671325 4484000000 4484223775 189032704 189256479
+13455000000 13455671550 4485000000 4485223850 190032704 190256554
+13458000000 13458671677 4486000000 4486223892 191032704 191256596
+13461000000 13461671766 4487000000 4487223922 192032704 192256626
+13464000000 13464671872 4488000000 4488223957 193032704 193256661
+13467000000 13467672083 4489000000 4489224027 194032704 194256731
+13470000000 13470672292 4490000000 4490224097 195032704 195256801
+13473000000 13473672437 4491000000 4491224145 196032704 196256849
+13476000000 13476672563 4492000000 4492224187 197032704 197256891
+13479000000 13479672729 4493000000 4493224243 198032704 198256947
+13482000000 13482672809 4494000000 4494224269 199032704 199256973
+13485000000 13485673044 4495000000 4495224348 200032704 200257052
+13488000000 13488673203 4496000000 4496224401 201032704 201257105
+13491000000 13491673324 4497000000 4497224441 202032704 202257145
+13494000000 13494673484 4498000000 4498224494 203032704 203257198
+13497000000 13497673567 4499000000 4499224522 204032704 204257226
+13500000000 13500673813 4500000000 4500224604 205032704 205257308
+13503000000 13503673936 4501000000 4501224645 206032704 206257349
+13506000000 13506674072 4502000000 4502224690 207032704 207257394
+13509000000 13509674247 4503000000 4503224749 208032704 208257453
+13512000000 13512674369 4504000000 4504224789 209032704 209257493
+13515000000 13515674519 4505000000 4505224839 210032704 210257543
+13518000000 13518674667 4506000000 4506224889 211032704 211257593
+13521000000 13520848361 4507000000 4506949453 212032704 211982157
+13524000000 13524674987 4508000000 4508224995 213032704 213257699
+13527000000 13527675119 4509000000 4509225039 214032704 214257743
+13530000000 13530675293 4510000000 4510225097 215032704 215257801
+13533000000 13533675412 4511000000 4511225137 216032704 216257841
+13536000000 13536675536 4512000000 4512225178 217032704 217257882
+13539000000 13539675755 4513000000 4513225251 218032704 218257955
+13542000000 13542675891 4514000000 4514225297 219032704 219258001
+13545000000 13545676042 4515000000 4515225347 220032704 220258051
+13548000000 13548676192 4516000000 4516225397 221032704 221258101
+13551000000 13551676307 4517000000 4517225435 222032704 222258139
+13554000000 13554676404 4518000000 4518225468 223032704 223258172
+13557000000 13557676612 4519000000 4519225537 224032704 224258241
+13560000000 13560676767 4520000000 4520225589 225032704 225258293
+13563000000 13563676926 4521000000 4521225642 226032704 226258346
+13566000000 13566677100 4522000000 4522225700 227032704 227258404
+13569000000 13569677200 4523000000 4523225733 228032704 228258437
+13572000000 13572677378 4524000000 4524225792 229032704 229258496
+13575000000 13575677527 4525000000 4525225842 230032704 230258546
+13578000000 13578677655 4526000000 4526225885 231032704 231258589
+13581000000 13581677824 4527000000 4527225941 232032704 232258645
+13584000000 13584677944 4528000000 4528225981 233032704 233258685
+13587000000 13586505294 4529000000 4528835098 234032704 233867802
+13590000000 13590678194 4530000000 4530226064 235032704 235258768
+13593000000 13593678452 4531000000 4531226150 236032704 236258854
+13596000000 13596678557 4532000000 4532226185 237032704 237258889
+13599000000 13599678637 4533000000 4533226212 238032704 238258916
+13602000000 13602678784 4534000000 4534226261 239032704 239258965
+13605000000 13605679038 4535000000 4535226346 240032704 240259050
+13608000000 13608679128 4536000000 4536226376 241032704 241259080
+13611000000 13611679373 4537000000 4537226457 242032704 242259161
+13614000000 13614679451 4538000000 4538226483 243032704 243259187
+13617000000 13617679628 4539000000 4539226542 244032704 244259246
+13620000000 13620679774 4540000000 4540226591 245032704 245259295
+13623000000 13623679918 4541000000 4541226639 246032704 246259343
+13626000000 13625302572 4542000000 4541767524 247032704 246800228
+13629000000 13629680233 4543000000 4543226744 248032704 248259448
+13632000000 13632680393 4544000000 4544226797 249032704 249259501
+13635000000 13635680530 4545000000 4545226843 250032704 250259547
+13638000000 13638680688 4546000000 4546226896 251032704 251259600
+13641000000 13641680846 4547000000 4547226948 252032704 252259652
+13644000000 13644680960 4548000000 4548226986 253032704 253259690
+13647000000 13647681121 4549000000 4549227040 254032704 254259744
+13650000000 13650681248 4550000000 4550227082 255032704 255259786
+13653000000 13653681357 4551000000 4551227119 256032704 256259823
+13656000000 13656681499 4552000000 4552227166 257032704 257259870
+13659000000 13659681733 4553000000 4553227244 258032704 258259948
+13662000000 13662681646 4554000000 4554227215 259032704 259259919
+13665000000 13665681767 4555000000 4555227255 260032704 260259959
+13668000000 13668681875 4556000000 4556227291 261032704 261259995
+13671000000 13671682110 4557000000 4557227370 262032704 262260074
+13674000000 13674682289 4558000000 4558227429 263032704 263260133
+13677000000 13677595929 4559000000 4559198643 264032704 264231347
+13680000000 13680682558 4560000000 4560227519 265032704 265260223
+13683000000 13683682731 4561000000 4561227577 266032704 266260281
+13686000000 13686682847 4562000000 4562227615 267032704 267260319
+13689000000 13689683020 4563000000 4563227673 268032704 268260377
+13692000000 13692683192 4564000000 4564227730 269032704 269260434
+13695000000 13695683248 4565000000 4565227749 270032704 270260453
+13698000000 13698683394 4566000000 4566227798 271032704 271260502
+13701000000 13701683590 4567000000 4567227863 272032704 272260567
+13704000000 13704683619 4568000000 4568227873 273032704 273260577
+13707000000 13707683925 4569000000 4569227975 274032704 274260679
+13710000000 13710684097 4570000000 4570228032 275032704 275260736
+13713000000 13713684230 4571000000 4571228076 276032704 276260780
+13716000000 13716684347 4572000000 4572228115 277032704 277260819
+13719000000 13719684532 4573000000 4573228177 278032704 278260881
+13722000000 13722684638 4574000000 4574228212 279032704 279260916
+13725000000 13725684819 4575000000 4575228273 280032704 280260977
+13728000000 13728685031 4576000000 4576228343 281032704 281261047
+13731000000 13731685138 4577000000 4577228379 282032704 282261083
+13734000000 13734685304 4578000000 4578228434 283032704 283261138
+13737000000 13737284049 4579000000 4579094683 284032704 284127387
+13740000000 13740685575 4580000000 4580228525 285032704 285261229
+13743000000 13743685687 4581000000 4581228562 286032704 286261266
+13746000000 13746685896 4582000000 4582228632 287032704 287261336
+13749000000 13749685975 4583000000 4583228658 288032704 288261362
+13752000000 13752686200 4584000000 4584228733 289032704 289261437
+13755000000 13755686327 4585000000 4585228775 290032704 290261479
+13758000000 13758686416 4586000000 4586228805 291032704 291261509
+13761000000 13761686522 4587000000 4587228840 292032704 292261544
+13764000000 13764686733 4588000000 4588228911 293032704 293261615
+13767000000 13767686942 4589000000 4589228980 294032704 294261684
+13770000000 13770687087 4590000000 4590229029 295032704 295261733
+13773000000 13773687213 4591000000 4591229071 296032704 296261775
+13776000000 13776687379 4592000000 4592229126 297032704 297261830
+13779000000 13779687459 4593000000 4593229153 298032704 298261857
+13782000000 13782687694 4594000000 4594229231 299032704 299261935
+13785000000 13785687853 4595000000 4595229284 300032704 300261988
+13788000000 13788687974 4596000000 4596229324 301032704 301262028
+13791000000 13791688134 4597000000 4597229378 302032704 302262082
+13794000000 13794688217 4598000000 4598229405 303032704 303262109
+13797000000 13797688463 4599000000 4599229487 304032704 304262191
+13800000000 13800688586 4600000000 4600229528 305032704 305262232
+13803000000 13803688722 4601000000 4601229574 306032704 306262278
+13806000000 13806688897 4602000000 4602229632 307032704 307262336
+13809000000 13809689019 4603000000 4603229673 308032704 308262377
+13812000000 13812689169 4604000000 4604229723 309032704 309262427
+13815000000 13815689317 4605000000 4605229772 310032704 310262476
+13818000000 13817863011 4606000000 4605954337 311032704 310987041
+13821000000 13821689637 4607000000 4607229879 312032704 312262583
+13824000000 13824689769 4608000000 4608229923 313032704 313262627
+13827000000 13827689943 4609000000 4609229981 314032704 314262685
+13830000000 13830690062 4610000000 4610230020 315032704 315262724
+13833000000 13833690186 4611000000 4611230062 316032704 316262766
+13836000000 13836690405 4612000000 4612230135 317032704 317262839
+13839000000 13839690541 4613000000 4613230180 318032704 318262884
+13842000000 13842690692 4614000000 4614230230 319032704 319262934
+13845000000 13845690842 4615000000 4615230280 320032704 320262984
+13848000000 13848690957 4616000000 4616230319 321032704 321263023
+13851000000 13851691054 4617000000 4617230351 322032704 322263055
+13854000000 13854691262 4618000000 4618230420 323032704 323263124
+13857000000 13857691417 4619000000 4619230472 324032704 324263176
+13860000000 13860691576 4620000000 4620230525 325032704 325263229
+13863000000 13863691750 4621000000 4621230583 326032704 326263287
+13866000000 13866691850 4622000000 4622230616 327032704 327263320
+13869000000 13869692028 4623000000 4623230676 328032704 328263380
+13872000000 13872692177 4624000000 4624230725 329032704 329263429
+13875000000 13875692305 4625000000 4625230768 330032704 330263472
+13878000000 13878692474 4626000000 4626230824 331032704 331263528
+13881000000 13881692594 4627000000 4627230864 332032704 332263568
+13884000000 13883519944 4628000000 4627839981 333032704 332872685
+13887000000 13887692844 4629000000 4629230948 334032704 334263652
+13890000000 13890693102 4630000000 4630231034 335032704 335263738
+13893000000 13893693207 4631000000 4631231069 336032704 336263773
+13896000000 13896693287 4632000000 4632231095 337032704 337263799
+13899000000 13899693434 4633000000 4633231144 338032704 338263848
+13902000000 13902693688 4634000000 4634231229 339032704 339263933
+13905000000 13905693778 4635000000 4635231259 340032704 340263963
+13908000000 13908694023 4636000000 4636231341 341032704 341264045
+13911000000 13911694101 4637000000 4637231367 342032704 342264071
+13914000000 13914694278 4638000000 4638231426 343032704 343264130
+13917000000 13917694424 4639000000 4639231474 344032704 344264178
+13920000000 13920694568 4640000000 4640231522 345032704 345264226
+13923000000 13922317222 4641000000 4640772407 346032704 345805111
+13926000000 13926694883 4642000000 4642231627 347032704 347264331
+13929000000 13929695043 4643000000 4643231681 348032704 348264385
+13932000000 13932695180 4644000000 4644231726 349032704 349264430
+13935000000 13935695338 4645000000 4645231779 350032704 350264483
+13938000000 13938695496 4646000000 4646231832 351032704 351264536
+13941000000 13941695610 4647000000 4647231870 352032704 352264574
+13944000000 13944695771 4648000000 4648231923 353032704 353264627
+13947000000 13947695898 4649000000 4649231966 354032704 354264670
+13950000000 13950696007 4650000000 4650232002 355032704 355264706
+13953000000 13953696149 4651000000 4651232049 356032704 356264753
+13956000000 13956696383 4652000000 4652232127 357032704 357264831
+13959000000 13959696296 4653000000 4653232098 358032704 358264802
+13962000000 13962696417 4654000000 4654232139 359032704 359264843
+13965000000 13965696525 4655000000 4655232175 360032704 360264879
+13968000000 13968696760 4656000000 4656232253 361032704 361264957
+13971000000 13971696939 4657000000 4657232313 362032704 362265017
+13974000000 13974610579 4658000000 4658203526 363032704 363236230
+13977000000 13977697208 4659000000 4659232402 364032704 364265106
+13980000000 13980697381 4660000000 4660232460 365032704 365265164
+13983000000 13983697497 4661000000 4661232499 366032704 366265203
+13986000000 13986697670 4662000000 4662232556 367032704 367265260
+13989000000 13989697842 4663000000 4663232614 368032704 368265318
+13992000000 13992697898 4664000000 4664232632 369032704 369265336
+13995000000 13995698044 4665000000 4665232681 370032704 370265385
+13998000000 13998698240 4666000000 4666232746 371032704 371265450
+14001000000 14001698269 4667000000 4667232756 372032704 372265460
+14004000000 14004698575 4668000000 4668232858 373032704 373265562
+14007000000 14007698747 4669000000 4669232915 374032704 374265619
+14010000000 14010698880 4670000000 4670232960 375032704 375265664
+14013000000 14013698997 4671000000 4671232999 376032704 376265703
+14016000000 14016699182 4672000000 4672233060 377032704 377265764
+14019000000 14019699288 4673000000 4673233096 378032704 378265800
+14022000000 14022699469 4674000000 4674233156 379032704 379265860
+14025000000 14025699681 4675000000 4675233227 380032704 380265931
+14028000000 14028699788 4676000000 4676233262 381032704 381265966
+14031000000 14031699954 4677000000 4677233318 382032704 382266022
+14034000000 14034298699 4678000000 4678099566 383032704 383132270
+14037000000 14037700225 4679000000 4679233408 384032704 384266112
+14040000000 14040700337 4680000000 4680233445 385032704 385266149
+14043000000 14043700546 4681000000 4681233515 386032704 386266219
+14046000000 14046700625 4682000000 4682233541 387032704 387266245
+14049000000 14049700850 4683000000 4683233616 388032704 388266320
+14052000000 14052700977 4684000000 4684233659 389032704 389266363
+14055000000 14055701066 4685000000 4685233688 390032704 390266392
+14058000000 14058701172 4686000000 4686233724 391032704 391266428
+14061000000 14061701383 4687000000 4687233794 392032704 392266498
+14064000000 14064701592 4688000000 4688233864 393032704 393266568
+14067000000 14067701737 4689000000 4689233912 394032704 394266616
+14070000000 14070701863 4690000000 4690233954 395032704 395266658
+14073000000 14073702029 4691000000 4691234009 396032704 396266713
+14076000000 14076702109 4692000000 4692234036 397032704 397266740
+14079000000 14079702344 4693000000 4693234114 398032704 398266818
+14082000000 14082702503 4694000000 4694234167 399032704 399266871
+14085000000 14085702624 4695000000 4695234208 400032704 400266912
+14088000000 14088702784 4696000000 4696234261 401032704 401266965
+14091000000 14091702867 4697000000 4697234289 402032704 402266993
+14094000000 14094703113 4698000000 4698234371 403032704 403267075
+14097000000 14097703236 4699000000 4699234412 404032704 404267116
+14100000000 14100703372 4700000000 4700234457 405032704 405267161
+14103000000 14103703547 4701000000 4701234515 406032704 406267219
+14106000000 14106703669 4702000000 4702234556 407032704 407267260
+14109000000 14109703819 4703000000 4703234606 408032704 408267310
+14112000000 14112703967 4704000000 4704234655 409032704 409267359
+14115000000 14114877661 4705000000 4704959220 410032704 409991924
+14118000000 14118704287 4706000000 4706234762 411032704 411267466
+14121000000 14121704419 4707000000 4707234806 412032704 412267510
+14124000000 14124704593 4708000000 4708234864 413032704 413267568
+14127000000 14127704712 4709000000 4709234904 414032704 414267608
+14130000000 14130704836 4710000000 4710234945 415032704 415267649
+14133000000 14133705055 4711000000 4711235018 416032704 416267722
+14136000000 14136705191 4712000000 4712235063 417032704 417267767
+14139000000 14139705342 4713000000 4713235114 418032704 418267818
+14142000000 14142705492 4714000000 4714235164 419032704 419267868
+14145000000 14145705607 4715000000 4715235202 420032704 420267906
+14148000000 14148705704 4716000000 4716235234 421032704 421267938
+14151000000 14151705912 4717000000 4717235304 422032704 422268008
+14154000000 14154706067 4718000000 4718235355 423032704 423268059
+14157000000 14157706226 4719000000 4719235408 424032704 424268112
+14160000000 14160706400 4720000000 4720235466 425032704 425268170
+14163000000 14163706500 4721000000 4721235500 426032704 426268204
+14166000000 14166706678 4722000000 4722235559 427032704 427268263
+14169000000 14169706827 4723000000 4723235609 428032704 428268313
+14172000000 14172706955 4724000000 4724235651 429032704 429268355
+14175000000 14175707124 4725000000 4725235708 430032704 430268412
+14178000000 14178707244 4726000000 4726235748 431032704 431268452
+14181000000 14180534594 4727000000 4726844864 432032704 431877568
+14184000000 14184707494 4728000000 4728235831 433032704 433268535
+14187000000 14187707752 4729000000 4729235917 434032704 434268621
+14190000000 14190707857 4730000000 4730235952 435032704 435268656
+14193000000 14193707937 4731000000 4731235979 436032704 436268683
+14196000000 14196708084 4732000000 4732236028 437032704 437268732
+14199000000 14199708338 4733000000 4733236112 438032704 438268816
+14202000000 14202708428 4734000000 4734236142 439032704 439268846
+14205000000 14205708673 4735000000 4735236224 440032704 440268928
+14208000000 14208708751 4736000000 4736236250 441032704 441268954
+14211000000 14211708928 4737000000 4737236309 442032704 442269013
+14214000000 14214709074 4738000000 4738236358 443032704 443269062
+14217000000 14217709218 4739000000 4739236406 444032704 444269110
+14220000000 14219331872 4740000000 4739777290 445032704 444809994
+14223000000 14223709533 4741000000 4741236511 446032704 446269215
+14226000000 14226709693 4742000000 4742236564 447032704 447269268
+14229000000 14229709830 4743000000 4743236610 448032704 448269314
+14232000000 14232709988 4744000000 4744236662 449032704 449269366
+14235000000 14235710146 4745000000 4745236715 450032704 450269419
+14238000000 14238710260 4746000000 4746236753 451032704 451269457
+14241000000 14241710421 4747000000 4747236807 452032704 452269511
+14244000000 14244710548 4748000000 4748236849 453032704 453269553
+14247000000 14247710657 4749000000 4749236885 454032704 454269589
+14250000000 14250710799 4750000000 4750236933 455032704 455269637
+14253000000 14253711033 4751000000 4751237011 456032704 456269715
+14256000000 14256710946 4752000000 4752236982 457032704 457269686
+14259000000 14259711067 4753000000 4753237022 458032704 458269726
+14262000000 14262711175 4754000000 4754237058 459032704 459269762
+14265000000 14265711410 4755000000 4755237136 460032704 460269840
+14268000000 14268711589 4756000000 4756237196 461032704 461269900
+14271000000 14271625229 4757000000 4757208409 462032704 462241113
+14274000000 14274711858 4758000000 4758237286 463032704 463269990
+14277000000 14277712031 4759000000 4759237343 464032704 464270047
+14280000000 14280712147 4760000000 4760237382 465032704 465270086
+14283000000 14283712320 4761000000 4761237440 466032704 466270144
+14286000000 14286712492 4762000000 4762237497 467032704 467270201
+14289000000 14289712548 4763000000 4763237516 468032704 468270220
+14292000000 14292712694 4764000000 4764237564 469032704 469270268
+14295000000 14295712890 4765000000 4765237630 470032704 470270334
+14298000000 14298712919 4766000000 4766237639 471032704 471270343
+14301000000 14301713225 4767000000 4767237741 472032704 472270445
+14304000000 14304713397 4768000000 4768237799 473032704 473270503
+14307000000 14307713530 4769000000 4769237843 474032704 474270547
+14310000000 14310713647 4770000000 4770237882 475032704 475270586
+14313000000 14313713832 4771000000 4771237944 476032704 476270648
+14316000000 14316713938 4772000000 4772237979 477032704 477270683
+14319000000 14319714119 4773000000 4773238039 478032704 478270743
+14322000000 14322714331 4774000000 4774238110 479032704 479270814
+14325000000 14325714438 4775000000 4775238146 480032704 480270850
+14328000000 14328714604 4776000000 4776238201 481032704 481270905
+14331000000 14331313349 4777000000 4777104449 482032704 482137153
+14334000000 14334714875 4778000000 4778238291 483032704 483270995
+14337000000 14337714987 4779000000 4779238329 484032704 484271033
+14340000000 14340715196 4780000000 4780238398 485032704 485271102
+14343000000 14343715275 4781000000 4781238425 486032704 486271129
+14346000000 14346715500 4782000000 4782238500 487032704 487271204
+14349000000 14349715627 4783000000 4783238542 488032704 488271246
+14352000000 14352715716 4784000000 4784238572 489032704 489271276
+14355000000 14355715822 4785000000 4785238607 490032704 490271311
+14358000000 14358716033 4786000000 4786238677 491032704 491271381
+14361000000 14361716242 4787000000 4787238747 492032704 492271451
+14364000000 14364716387 4788000000 4788238795 493032704 493271499
+14367000000 14367716513 4789000000 4789238837 494032704 494271541
+14370000000 14370716679 4790000000 4790238893 495032704 495271597
+14373000000 14373716759 4791000000 4791238919 496032704 496271623
+14376000000 14376716994 4792000000 4792238998 497032704 497271702
+14379000000 14379717153 4793000000 4793239051 498032704 498271755
+14382000000 14382717274 4794000000 4794239091 499032704 499271795
+14385000000 14385717434 4795000000 4795239144 500032704 500271848
+14388000000 14388717517 4796000000 4796239172 501032704 501271876
+14391000000 14391717763 4797000000 4797239254 502032704 502271958
+14394000000 14394717886 4798000000 4798239295 503032704 503271999
+14397000000 14397718022 4799000000 4799239340 504032704 504272044
+14400000000 14400718197 4800000000 4800239399 505032704 505272103
+14403000000 14403718319 4801000000 4801239439 506032704 506272143
+14406000000 14406718469 4802000000 4802239489 507032704 507272193
+14409000000 14409718617 4803000000 4803239539 508032704 508272243
+14412000000 14411892311 4804000000 4803964103 509032704 508996807
+14415000000 14415718937 4805000000 4805239645 510032704 510272349
+14418000000 14418719069 4806000000 4806239689 511032704 511272393
+14421000000 14421719243 4807000000 4807239747 512032704 512272451
+14424000000 14424719362 4808000000 4808239787 513032704 513272491
+14427000000 14427719486 4809000000 4809239828 514032704 514272532
+14430000000 14430719705 4810000000 4810239901 515032704 515272605
+14433000000 14433719841 4811000000 4811239947 516032704 516272651
+14436000000 14436719992 4812000000 4812239997 517032704 517272701
+14439000000 14439720142 4813000000 4813240047 518032704 518272751
+14442000000 14442720257 4814000000 4814240085 519032704 519272789
+14445000000 14445720354 4815000000 4815240118 520032704 520272822
+14448000000 14448720562 4816000000 4816240187 521032704 521272891
+14451000000 14451720717 4817000000 4817240239 522032704 522272943
+14454000000 14454720876 4818000000 4818240292 523032704 523272996
+14457000000 14457721050 4819000000 4819240350 524032704 524273054
+14460000000 14460721150 4820000000 4820240383 525032704 525273087
+14463000000 14463721328 4821000000 4821240442 526032704 526273146
+14466000000 14466721477 4822000000 4822240492 527032704 527273196
+14469000000 14469721605 4823000000 4823240535 528032704 528273239
+14472000000 14472721774 4824000000 4824240591 529032704 529273295
+14475000000 14475721894 4825000000 4825240631 530032704 530273335
+14478000000 14477549244 4826000000 4825849748 531032704 530882452
+14481000000 14481722144 4827000000 4827240714 532032704 532273418
+14484000000 14484722402 4828000000 4828240800 533032704 533273504
+14487000000 14487722507 4829000000 4829240835 534032704 534273539
+14490000000 14490722587 4830000000 4830240862 535032704 535273566
+14493000000 14493722734 4831000000 4831240911 536032704 536273615
+14496000000 14496722988 4832000000 4832240996 537032704 537273700
+14499000000 14499723078 4833000000 4833241026 538032704 538273730
+14502000000 14502723323 4834000000 4834241107 539032704 539273811
+14505000000 14505723401 4835000000 4835241133 540032704 540273837
+14508000000 14508723578 4836000000 4836241192 541032704 541273896
+14511000000 14511723724 4837000000 4837241241 542032704 542273945
+14514000000 14514723868 4838000000 4838241289 543032704 543273993
+14517000000 14516346522 4839000000 4838782174 544032704 543814878
+14520000000 14520724183 4840000000 4840241394 545032704 545274098
+14523000000 14523724343 4841000000 4841241447 546032704 546274151
+14526000000 14526724480 4842000000 4842241493 547032704 547274197
+14529000000 14529724638 4843000000 4843241546 548032704 548274250
+14532000000 14532724796 4844000000 4844241598 549032704 549274302
+14535000000 14535724910 4845000000 4845241636 550032704 550274340
+14538000000 14538725071 4846000000 4846241690 551032704 551274394
+14541000000 14541725198 4847000000 4847241732 552032704 552274436
+14544000000 14544725307 4848000000 4848241769 553032704 553274473
+14547000000 14547725449 4849000000 4849241816 554032704 554274520
+14550000000 14550725683 4850000000 4850241894 555032704 555274598
+14553000000 14553725596 4851000000 4851241865 556032704 556274569
+14556000000 14556725717 4852000000 4852241905 557032704 557274609
+14559000000 14559725825 4853000000 4853241941 558032704 558274645
+14562000000 14562726060 4854000000 4854242020 559032704 559274724
+14565000000 14565726239 4855000000 4855242079 560032704 560274783
+14568000000 14568639879 4856000000 4856213293 561032704 561245997
+14571000000 14571726508 4857000000 4857242169 562032704 562274873
+14574000000 14574726681 4858000000 4858242227 563032704 563274931
+14577000000 14577726797 4859000000 4859242265 564032704 564274969
+14580000000 14580726970 4860000000 4860242323 565032704 565275027
+14583000000 14583727142 4861000000 4861242380 566032704 566275084
+14586000000 14586727198 4862000000 4862242399 567032704 567275103
+14589000000 14589727344 4863000000 4863242448 568032704 568275152
+14592000000 14592727540 4864000000 4864242513 569032704 569275217
+14595000000 14595727569 4865000000 4865242523 570032704 570275227
+14598000000 14598727875 4866000000 4866242625 571032704 571275329
+14601000000 14601728047 4867000000 4867242682 572032704 572275386
+14604000000 14604728180 4868000000 4868242726 573032704 573275430
+14607000000 14607728297 4869000000 4869242765 574032704 574275469
+14610000000 14610728482 4870000000 4870242827 575032704 575275531
+14613000000 14613728588 4871000000 4871242862 576032704 576275566
+14616000000 14616728769 4872000000 4872242923 577032704 577275627
+14619000000 14619728981 4873000000 4873242993 578032704 578275697
+14622000000 14622729088 4874000000 4874243029 579032704 579275733
+14625000000 14625729254 4875000000 4875243084 580032704 580275788
+14628000000 14628327999 4876000000 4876109333 581032704 581142037
+14631000000 14631729525 4877000000 4877243175 582032704 582275879
+14634000000 14634729637 4878000000 4878243212 583032704 583275916
+14637000000 14637729846 4879000000 4879243282 584032704 584275986
+14640000000 14640729925 4880000000 4880243308 585032704 585276012
+14643000000 14643730150 4881000000 4881243383 586032704 586276087
+14646000000 14646730277 4882000000 4882243425 587032704 587276129
+14649000000 14649730366 4883000000 4883243455 588032704 588276159
+14652000000 14652730472 4884000000 4884243490 589032704 589276194
+14655000000 14655730683 4885000000 4885243561 590032704 590276265
+14658000000 14658730892 4886000000 4886243630 591032704 591276334
+14661000000 14661731037 4887000000 4887243679 592032704 592276383
+14664000000 14664731163 4888000000 4888243721 593032704 593276425
+14667000000 14667731329 4889000000 4889243776 594032704 594276480
+14670000000 14670731409 4890000000 4890243803 595032704 595276507
+14673000000 14673731644 4891000000 4891243881 596032704 596276585
+14676000000 14676731803 4892000000 4892243934 597032704 597276638
+14679000000 14679731924 4893000000 4893243974 598032704 598276678
+14682000000 14682732084 4894000000 4894244028 599032704 599276732
+14685000000 14685732167 4895000000 4895244055 600032704 600276759
+14688000000 14688732413 4896000000 4896244137 601032704 601276841
+14691000000 14691732536 4897000000 4897244178 602032704 602276882
+14694000000 14694732672 4898000000 4898244224 603032704 603276928
+14697000000 14697732847 4899000000 4899244282 604032704 604276986
+14700000000 14700732969 4900000000 4900244323 605032704 605277027
+14703000000 14703733119 4901000000 4901244373 606032704 606277077
+14706000000 14706733267 4902000000 4902244422 607032704 607277126
+14709000000 14708906961 4903000000 4902968987 608032704 608001691
+14712000000 14712733587 4904000000 4904244529 609032704 609277233
+14715000000 14715733719 4905000000 4905244573 610032704 610277277
+14718000000 14718733893 4906000000 4906244631 611032704 611277335
+14721000000 14721734012 4907000000 4907244670 612032704 612277374
+14724000000 14724734136 4908000000 4908244712 613032704 613277416
+14727000000 14727734355 4909000000 4909244785 614032704 614277489
+14730000000 14730734491 4910000000 4910244830 615032704 615277534
+14733000000 14733734642 4911000000 4911244880 616032704 616277584
+14736000000 14736734792 4912000000 4912244930 617032704 617277634
+14739000000 14739734907 4913000000 4913244969 618032704 618277673
+14742000000 14742735004 4914000000 4914245001 619032704 619277705
+14745000000 14745735212 4915000000 4915245070 620032704 620277774
+14748000000 14748735367 4916000000 4916245122 621032704 621277826
+14751000000 14751735526 4917000000 4917245175 622032704 622277879
+14754000000 14754735700 4918000000 4918245233 623032704 623277937
+14757000000 14757735800 4919000000 4919245266 624032704 624277970
+14760000000 14760735978 4920000000 4920245326 625032704 625278030
+14763000000 14763736127 4921000000 4921245375 626032704 626278079
+14766000000 14766736255 4922000000 4922245418 627032704 627278122
+14769000000 14769736424 4923000000 4923245474 628032704 628278178
+14772000000 14772736544 4924000000 4924245514 629032704 629278218
+14775000000 14774563894 4925000000 4924854631 630032704 629887335
+14778000000 14778736794 4926000000 4926245598 631032704 631278302
+14781000000 14781737052 4927000000 4927245684 632032704 632278388
+14784000000 14784737157 4928000000 4928245719 633032704 633278423
+14787000000 14787737237 4929000000 4929245745 634032704 634278449
+14790000000 14790737384 4930000000 4930245794 635032704 635278498
+14793000000 14793737638 4931000000 4931245879 636032704 636278583
+14796000000 14796737728 4932000000 4932245909 637032704 637278613
+14799000000 14799737973 4933000000 4933245991 638032704 638278695
+14802000000 14802738051 4934000000 4934246017 639032704 639278721
+14805000000 14805738228 4935000000 4935246076 640032704 640278780
+14808000000 14808738374 4936000000 4936246124 641032704 641278828
+14811000000 14811738518 4937000000 4937246172 642032704 642278876
+14814000000 14813361172 4938000000 4937787057 643032704 642819761
+14817000000 14817738833 4939000000 4939246277 644032704 644278981
+14820000000 14820738993 4940000000 4940246331 645032704 645279035
+14823000000 14823739130 4941000000 4941246376 646032704 646279080
+14826000000 14826739288 4942000000 4942246429 647032704 647279133
+14829000000 14829739446 4943000000 4943246482 648032704 648279186
+14832000000 14832739560 4944000000 4944246520 649032704 649279224
+14835000000 14835739721 4945000000 4945246573 650032704 650279277
+14838000000 14838739848 4946000000 4946246616 651032704 651279320
+14841000000 14841739957 4947000000 4947246652 652032704 652279356
+14844000000 14844740099 4948000000 4948246699 653032704 653279403
+14847000000 14847740333 4949000000 4949246777 654032704 654279481
+14850000000 14850740246 4950000000 4950246748 655032704 655279452
+14853000000 14853740367 4951000000 4951246789 656032704 656279493
+14856000000 14856740475 4952000000 4952246825 657032704 657279529
+14859000000 14859740710 4953000000 4953246903 658032704 658279607
+14862000000 14862740889 4954000000 4954246963 659032704 659279667
+14865000000 14865654529 4955000000 4955218176 660032704 660250880
+14868000000 14868741158 4956000000 4956247052 661032704 661279756
+14871000000 14871741331 4957000000 4957247110 662032704 662279814
+14874000000 14874741447 4958000000 4958247149 663032704 663279853
+14877000000 14877741620 4959000000 4959247206 664032704 664279910
+14880000000 14880741792 4960000000 4960247264 665032704 665279968
+14883000000 14883741848 4961000000 4961247282 666032704 666279986
+14886000000 14886741994 4962000000 4962247331 667032704 667280035
+14889000000 14889742190 4963000000 4963247396 668032704 668280100
+14892000000 14892742219 4964000000 4964247406 669032704 669280110
+14895000000 14895742525 4965000000 4965247508 670032704 670280212
+14898000000 14898742697 4966000000 4966247565 671032704 671280269
+14901000000 14901742830 4967000000 4967247610 672032704 672280314
+14904000000 14904742947 4968000000 4968247649 673032704 673280353
+14907000000 14907743132 4969000000 4969247710 674032704 674280414
+14910000000 14910743238 4970000000 4970247746 675032704 675280450
+14913000000 14913743419 4971000000 4971247806 676032704 676280510
+14916000000 14916743631 4972000000 4972247877 677032704 677280581
+14919000000 14919743738 4973000000 4973247912 678032704 678280616
+14922000000 14922743904 4974000000 4974247968 679032704 679280672
+14925000000 14925342649 4975000000 4975114216 680032704 680146920
+14928000000 14928744175 4976000000 4976248058 681032704 681280762
+14931000000 14931744287 4977000000 4977248095 682032704 682280799
+14934000000 14934744496 4978000000 4978248165 683032704 683280869
+14937000000 14937744575 4979000000 4979248191 684032704 684280895
+14940000000 14940744800 4980000000 4980248266 685032704 685280970
+14943000000 14943744927 4981000000 4981248309 686032704 686281013
+14946000000 14946745016 4982000000 4982248338 687032704 687281042
+14949000000 14949745122 4983000000 4983248374 688032704 688281078
+14952000000 14952745333 4984000000 4984248444 689032704 689281148
+14955000000 14955745542 4985000000 4985248514 690032704 690281218
+14958000000 14958745687 4986000000 4986248562 691032704 691281266
+14961000000 14961745813 4987000000 4987248604 692032704 692281308
+14964000000 14964745979 4988000000 4988248659 693032704 693281363
+14967000000 14967746059 4989000000 4989248686 694032704 694281390
+14970000000 14970746294 4990000000 4990248764 695032704 695281468
+14973000000 14973746453 4991000000 4991248817 696032704 696281521
+14976000000 14976746574 4992000000 4992248858 697032704 697281562
+14979000000 14979746734 4993000000 4993248911 698032704 698281615
+14982000000 14982746817 4994000000 4994248939 699032704 699281643
+14985000000 14985747063 4995000000 4995249021 700032704 700281725
+14988000000 14988747186 4996000000 4996249062 701032704 701281766
+14991000000 14991747322 4997000000 4997249107 702032704 702281811
+14994000000 14994747497 4998000000 4998249165 703032704 703281869
+14997000000 14997747619 4999000000 4999249206 704032704 704281910
+15000000000 15000747769 5000000000 5000249256 705032704 705281960
+15003000000 15003747917 5001000000 5001249305 706032704 706282009
+15006000000 15005921611 5002000000 5001973870 707032704 707006574
+15009000000 15009748237 5003000000 5003249412 708032704 708282116
+15012000000 15012748369 5004000000 5004249456 709032704 709282160
+15015000000 15015748543 5005000000 5005249514 710032704 710282218
+15018000000 15018748662 5006000000 5006249554 711032704 711282258
+15021000000 15021748786 5007000000 5007249595 712032704 712282299
+15024000000 15024749005 5008000000 5008249668 713032704 713282372
+15027000000 15027749141 5009000000 5009249713 714032704 714282417
+15030000000 15030749292 5010000000 5010249764 715032704 715282468
+15033000000 15033749442 5011000000 5011249814 716032704 716282518
+15036000000 15036749557 5012000000 5012249852 717032704 717282556
+15039000000 15039749654 5013000000 5013249884 718032704 718282588
+15042000000 15042749862 5014000000 5014249954 719032704 719282658
+15045000000 15045750017 5015000000 5015250005 720032704 720282709
+15048000000 15048750176 5016000000 5016250058 721032704 721282762
+15051000000 15051750350 5017000000 5017250116 722032704 722282820
+15054000000 15054750450 5018000000 5018250150 723032704 723282854
+15057000000 15057750628 5019000000 5019250209 724032704 724282913
+15060000000 15060750777 5020000000 5020250259 725032704 725282963
+15063000000 15063750905 5021000000 5021250301 726032704 726283005
+15066000000 15066751074 5022000000 5022250358 727032704 727283062
+15069000000 15069751194 5023000000 5023250398 728032704 728283102
+15072000000 15071578544 5024000000 5023859514 729032704 728892218
+15075000000 15075751444 5025000000 5025250481 730032704 730283185
+15078000000 15078751702 5026000000 5026250567 731032704 731283271
+15081000000 15081751807 5027000000 5027250602 732032704 732283306
+15084000000 15084751887 5028000000 5028250629 733032704 733283333
+15087000000 15087752034 5029000000 5029250678 734032704 734283382
+15090000000 15090752288 5030000000 5030250762 735032704 735283466
+15093000000 15093752378 5031000000 5031250792 736032704 736283496
+15096000000 15096752623 5032000000 5032250874 737032704 737283578
+15099000000 15099752701 5033000000 5033250900 738032704 738283604
+15102000000 15102752878 5034000000 5034250959 739032704 739283663
+15105000000 15105753024 5035000000 5035251008 740032704 740283712
+15108000000 15108753168 5036000000 5036251056 741032704 741283760
+15111000000 15110375822 5037000000 5036791940 742032704 741824644
+15114000000 15114753483 5038000000 5038251161 743032704 743283865
+15117000000 15117753643 5039000000 5039251214 744032704 744283918
+15120000000 15120753780 5040000000 5040251260 745032704 745283964
+15123000000 15123753938 5041000000 5041251312 746032704 746284016
+15126000000 15126754096 5042000000 5042251365 747032704 747284069
+15129000000 15129754210 5043000000 5043251403 748032704 748284107
+15132000000 15132754371 5044000000 5044251457 749032704 749284161
+15135000000 15135754498 5045000000 5045251499 750032704 750284203
+15138000000 15138754607 5046000000 5046251535 751032704 751284239
+15141000000 15141754749 5047000000 5047251583 752032704 752284287
+15144000000 15144754983 5048000000 5048251661 753032704 753284365
+15147000000 15147754896 5049000000 5049251632 754032704 754284336
+15150000000 15150755017 5050000000 5050251672 755032704 755284376
+15153000000 15153755125 5051000000 5051251708 756032704 756284412
+15156000000 15156755360 5052000000 5052251786 757032704 757284490
+15159000000 15159755539 5053000000 5053251846 758032704 758284550
+15162000000 15162669179 5054000000 5054223059 759032704 759255763
+15165000000 15165755808 5055000000 5055251936 760032704 760284640
+15168000000 15168755981 5056000000 5056251993 761032704 761284697
+15171000000 15171756097 5057000000 5057252032 762032704 762284736
+15174000000 15174756270 5058000000 5058252090 763032704 763284794
+15177000000 15177756442 5059000000 5059252147 764032704 764284851
+15180000000 15180756498 5060000000 5060252166 765032704 765284870
+15183000000 15183756644 5061000000 5061252214 766032704 766284918
+15186000000 15186756840 5062000000 5062252280 767032704 767284984
+15189000000 15189756869 5063000000 5063252289 768032704 768284993
+15192000000 15192757175 5064000000 5064252391 769032704 769285095
+15195000000 15195757347 5065000000 5065252449 770032704 770285153
+15198000000 15198757480 5066000000 5066252493 771032704 771285197
+15201000000 15201757597 5067000000 5067252532 772032704 772285236
+15204000000 15204757782 5068000000 5068252594 773032704 773285298
+15207000000 15207757888 5069000000 5069252629 774032704 774285333
+15210000000 15210758069 5070000000 5070252689 775032704 775285393
+15213000000 15213758281 5071000000 5071252760 776032704 776285464
+15216000000 15216758388 5072000000 5072252796 777032704 777285500
+15219000000 15219758554 5073000000 5073252851 778032704 778285555
+15222000000 15222357299 5074000000 5074119099 779032704 779151803
+15225000000 15225758825 5075000000 5075252941 780032704 780285645
+15228000000 15228758937 5076000000 5076252979 781032704 781285683
+15231000000 15231759146 5077000000 5077253048 782032704 782285752
+15234000000 15234759225 5078000000 5078253075 783032704 783285779
+15237000000 15237759450 5079000000 5079253150 784032704 784285854
+15240000000 15240759577 5080000000 5080253192 785032704 785285896
+15243000000 15243759666 5081000000 5081253222 786032704 786285926
+15246000000 15246759772 5082000000 5082253257 787032704 787285961
+15249000000 15249759983 5083000000 5083253327 788032704 788286031
+15252000000 15252760192 5084000000 5084253397 789032704 789286101
+15255000000 15255760337 5085000000 5085253445 790032704 790286149
+15258000000 15258760463 5086000000 5086253487 791032704 791286191
+15261000000 15261760629 5087000000 5087253543 792032704 792286247
+15264000000 15264760709 5088000000 5088253569 793032704 793286273
+15267000000 15267760944 5089000000 5089253648 794032704 794286352
+15270000000 15270761103 5090000000 5090253701 795032704 795286405
+15273000000 15273761224 5091000000 5091253741 796032704 796286445
+15276000000 15276761384 5092000000 5092253794 797032704 797286498
+15279000000 15279761467 5093000000 5093253822 798032704 798286526
+15282000000 15282761713 5094000000 5094253904 799032704 799286608
+15285000000 15285761836 5095000000 5095253945 800032704 800286649
+15288000000 15288761972 5096000000 5096253990 801032704 801286694
+15291000000 15291762147 5097000000 5097254049 802032704 802286753
+15294000000 15294762269 5098000000 5098254089 803032704 803286793
+15297000000 15297762419 5099000000 5099254139 804032704 804286843
+15300000000 15300762567 5100000000 5100254189 805032704 805286893
+15303000000 15302936261 5101000000 5100978753 806032704 806011457
+15306000000 15306762887 5102000000 5102254295 807032704 807286999
+15309000000 15309763019 5103000000 5103254339 808032704 808287043
+15312000000 15312763193 5104000000 5104254397 809032704 809287101
+15315000000 15315763312 5105000000 5105254437 810032704 810287141
+15318000000 15318763436 5106000000 5106254478 811032704 811287182
+15321000000 15321763655 5107000000 5107254551 812032704 812287255
+15324000000 15324763791 5108000000 5108254597 813032704 813287301
+15327000000 15327763942 5109000000 5109254647 814032704 814287351
+15330000000 15330764092 5110000000 5110254697 815032704 815287401
+15333000000 15333764207 5111000000 5111254735 816032704 816287439
+15336000000 15336764304 5112000000 5112254768 817032704 817287472
+15339000000 15339764512 5113000000 5113254837 818032704 818287541
+15342000000 15342764667 5114000000 5114254889 819032704 819287593
+15345000000 15345764826 5115000000 5115254942 820032704 820287646
+15348000000 15348765000 5116000000 5116255000 821032704 821287704
+15351000000 15351765100 5117000000 5117255033 822032704 822287737
+15354000000 15354765278 5118000000 5118255092 823032704 823287796
+15357000000 15357765427 5119000000 5119255142 824032704 824287846
+15360000000 15360765555 5120000000 5120255185 825032704 825287889
+15363000000 15363765724 5121000000 5121255241 826032704 826287945
+15366000000 15366765844 5122000000 5122255281 827032704 827287985
+15369000000 15368593194 5123000000 5122864398 828032704 827897102
+15372000000 15372766094 5124000000 5124255364 829032704 829288068
+15375000000 15375766352 5125000000 5125255450 830032704 830288154
+15378000000 15378766457 5126000000 5126255485 831032704 831288189
+15381000000 15381766537 5127000000 5127255512 832032704 832288216
+15384000000 15384766684 5128000000 5128255561 833032704 833288265
+15387000000 15387766938 5129000000 5129255646 834032704 834288350
+15390000000 15390767028 5130000000 5130255676 835032704 835288380
+15393000000 15393767273 5131000000 5131255757 836032704 836288461
+15396000000 15396767351 5132000000 5132255783 837032704 837288487
+15399000000 15399767528 5133000000 5133255842 838032704 838288546
+15402000000 15402767674 5134000000 5134255891 839032704 839288595
+15405000000 15405767818 5135000000 5135255939 840032704 840288643
+15408000000 15407390472 5136000000 5135796824 841032704 840829528
+15411000000 15411768133 5137000000 5137256044 842032704 842288748
+15414000000 15414768293 5138000000 5138256097 843032704 843288801
+15417000000 15417768430 5139000000 5139256143 844032704 844288847
+15420000000 15420768588 5140000000 5140256196 845032704 845288900
+15423000000 15423768746 5141000000 5141256248 846032704 846288952
+15426000000 15426768860 5142000000 5142256286 847032704 847288990
+15429000000 15429769021 5143000000 5143256340 848032704 848289044
+15432000000 15432769148 5144000000 5144256382 849032704 849289086
+15435000000 15435769257 5145000000 5145256419 850032704 850289123
+15438000000 15438769399 5146000000 5146256466 851032704 851289170
+15441000000 15441769633 5147000000 5147256544 852032704 852289248
+15444000000 15444769546 5148000000 5148256515 853032704 853289219
+15447000000 15447769667 5149000000 5149256555 854032704 854289259
+15450000000 15450769775 5150000000 5150256591 855032704 855289295
+15453000000 15453770010 5151000000 5151256670 856032704 856289374
+15456000000 15456770189 5152000000 5152256729 857032704 857289433
+15459000000 15459683829 5153000000 5153227943 858032704 858260647
+15462000000 15462770458 5154000000 5154256819 859032704 859289523
+15465000000 15465770631 5155000000 5155256877 860032704 860289581
+15468000000 15468770747 5156000000 5156256915 861032704 861289619
+15471000000 15471770920 5157000000 5157256973 862032704 862289677
+15474000000 15474771092 5158000000 5158257030 863032704 863289734
+15477000000 15477771148 5159000000 5159257049 864032704 864289753
+15480000000 15480771294 5160000000 5160257098 865032704 865289802
+15483000000 15483771490 5161000000 5161257163 866032704 866289867
+15486000000 15486771519 5162000000 5162257173 867032704 867289877
+15489000000 15489771825 5163000000 5163257275 868032704 868289979
+15492000000 15492771997 5164000000 5164257332 869032704 869290036
+15495000000 15495772130 5165000000 5165257376 870032704 870290080
+15498000000 15498772247 5166000000 5166257415 871032704 871290119
+15501000000 15501772432 5167000000 5167257477 872032704 872290181
+15504000000 15504772538 5168000000 5168257512 873032704 873290216
+15507000000 15507772719 5169000000 5169257573 874032704 874290277
+15510000000 15510772931 5170000000 5170257643 875032704 875290347
+15513000000 15513773038 5171000000 5171257679 876032704 876290383
+15516000000 15516773204 5172000000 5172257734 877032704 877290438
+15519000000 15519371949 5173000000 5173123983 878032704 878156687
+15522000000 15522773475 5174000000 5174257825 879032704 879290529
+15525000000 15525773587 5175000000 5175257862 880032704 880290566
+15528000000 15528773796 5176000000 5176257932 881032704 881290636
+15531000000 15531773875 5177000000 5177257958 882032704 882290662
+15534000000 15534774100 5178000000 5178258033 883032704 883290737
+15537000000 15537774227 5179000000 5179258075 884032704 884290779
+15540000000 15540774316 5180000000 5180258105 885032704 885290809
+15543000000 15543774422 5181000000 5181258140 886032704 886290844
+15546000000 15546774633 5182000000 5182258211 887032704 887290915
+15549000000 15549774842 5183000000 5183258280 888032704 888290984
+15552000000 15552774987 5184000000 5184258329 889032704 889291033
+15555000000 15555775113 5185000000 5185258371 890032704 890291075
+15558000000 15558775279 5186000000 5186258426 891032704 891291130
+15561000000 15561775359 5187000000 5187258453 892032704 892291157
+15564000000 15564775594 5188000000 5188258531 893032704 893291235
+15567000000 15567775753 5189000000 5189258584 894032704 894291288
+15570000000 15570775874 5190000000 5190258624 895032704 895291328
+15573000000 15573776034 5191000000 5191258678 896032704 896291382
+15576000000 15576776117 5192000000 5192258705 897032704 897291409
+15579000000 15579776363 5193000000 5193258787 898032704 898291491
+15582000000 15582776486 5194000000 5194258828 899032704 899291532
+15585000000 15585776622 5195000000 5195258874 900032704 900291578
+15588000000 15588776797 5196000000 5196258932 901032704 901291636
+15591000000 15591776919 5197000000 5197258973 902032704 902291677
+15594000000 15594777069 5198000000 5198259023 903032704 903291727
+15597000000 15597777217 5199000000 5199259072 904032704 904291776
+15600000000 15599950911 5200000000 5199983637 905032704 905016341
+15603000000 15603777537 5201000000 5201259179 906032704 906291883
+15606000000 15606777669 5202000000 5202259223 907032704 907291927
+15609000000 15609777843 5203000000 5203259281 908032704 908291985
+15612000000 15612777962 5204000000 5204259320 909032704 909292024
+15615000000 15615778086 5205000000 5205259362 910032704 910292066
+15618000000 15618778305 5206000000 5206259435 911032704 911292139
+15621000000 15621778441 5207000000 5207259480 912032704 912292184
+15624000000 15624778592 5208000000 5208259530 913032704 913292234
+15627000000 15627778742 5209000000 5209259580 914032704 914292284
+15630000000 15630778857 5210000000 5210259619 915032704 915292323
+15633000000 15633778954 5211000000 5211259651 916032704 916292355
+15636000000 15636779162 5212000000 5212259720 917032704 917292424
+15639000000 15639779317 5213000000 5213259772 918032704 918292476
+15642000000 15642779476 5214000000 5214259825 919032704 919292529
+15645000000 15645779650 5215000000 5215259883 920032704 920292587
+15648000000 15648779750 5216000000 5216259916 921032704 921292620
+15651000000 15651779928 5217000000 5217259976 922032704 922292680
+15654000000 15654780077 5218000000 5218260025 923032704 923292729
+15657000000 15657780205 5219000000 5219260068 924032704 924292772
+15660000000 15660780374 5220000000 5220260124 925032704 925292828
+15663000000 15663780494 5221000000 5221260164 926032704 926292868
+15666000000 15665607844 5222000000 5221869281 927032704 926901985
+15669000000 15669780744 5223000000 5223260248 928032704 928292952
+15672000000 15672781002 5224000000 5224260334 929032704 929293038
+15675000000 15675781107 5225000000 5225260369 930032704 930293073
+15678000000 15678781187 5226000000 5226260395 931032704 931293099
+15681000000 15681781334 5227000000 5227260444 932032704 932293148
+15684000000 15684781588 5228000000 5228260529 933032704 933293233
+15687000000 15687781678 5229000000 5229260559 934032704 934293263
+15690000000 15690781923 5230000000 5230260641 935032704 935293345
+15693000000 15693782001 5231000000 5231260667 936032704 936293371
+15696000000 15696782178 5232000000 5232260726 937032704 937293430
+15699000000 15699782324 5233000000 5233260774 938032704 938293478
+15702000000 15702782468 5234000000 5234260822 939032704 939293526
+15705000000 15704405122 5235000000 5234801707 940032704 939834411
+15708000000 15708782783 5236000000 5236260927 941032704 941293631
+15711000000 15711782943 5237000000 5237260981 942032704 942293685
+15714000000 15714783080 5238000000 5238261026 943032704 943293730
+15717000000 15717783238 5239000000 5239261079 944032704 944293783
+15720000000 15720783396 5240000000 5240261132 945032704 945293836
+15723000000 15723783510 5241000000 5241261170 946032704 946293874
+15726000000 15726783671 5242000000 5242261223 947032704 947293927
+15729000000 15729783798 5243000000 5243261266 948032704 948293970
+15732000000 15732783907 5244000000 5244261302 949032704 949294006
+15735000000 15735784049 5245000000 5245261349 950032704 950294053
+15738000000 15738784283 5246000000 5246261427 951032704 951294131
+15741000000 15741784196 5247000000 5247261398 952032704 952294102
+15744000000 15744784317 5248000000 5248261439 953032704 953294143
+15747000000 15747784425 5249000000 5249261475 954032704 954294179
+15750000000 15750784660 5250000000 5250261553 955032704 955294257
+15753000000 15753784839 5251000000 5251261613 956032704 956294317
+15756000000 15756698479 5252000000 5252232826 957032704 957265530
+15759000000 15759785108 5253000000 5253261702 958032704 958294406
+15762000000 15762785281 5254000000 5254261760 959032704 959294464
+15765000000 15765785397 5255000000 5255261799 960032704 960294503
+15768000000 15768785570 5256000000 5256261856 961032704 961294560
+15771000000 15771785742 5257000000 5257261914 962032704 962294618
+15774000000 15774785798 5258000000 5258261932 963032704 963294636
+15777000000 15777785944 5259000000 5259261981 964032704 964294685
+15780000000 15780786140 5260000000 5260262046 965032704 965294750
+15783000000 15783786169 5261000000 5261262056 966032704 966294760
+15786000000 15786786475 5262000000 5262262158 967032704 967294862
+15789000000 15789786647 5263000000 5263262215 968032704 968294919
+15792000000 15792786780 5264000000 5264262260 969032704 969294964
+15795000000 15795786897 5265000000 5265262299 970032704 970295003
+15798000000 15798787082 5266000000 5266262360 971032704 971295064
+15801000000 15801787188 5267000000 5267262396 972032704 972295100
+15804000000 15804787369 5268000000 5268262456 973032704 973295160
+15807000000 15807787581 5269000000 5269262527 974032704 974295231
+15810000000 15810787688 5270000000 5270262562 975032704 975295266
+15813000000 15813787854 5271000000 5271262618 976032704 976295322
+15816000000 15816386599 5272000000 5272128866 977032704 977161570
+15819000000 15819788125 5273000000 5273262708 978032704 978295412
+15822000000 15822788237 5274000000 5274262745 979032704 979295449
+15825000000 15825788446 5275000000 5275262815 980032704 980295519
+15828000000 15828788525 5276000000 5276262841 981032704 981295545
+15831000000 15831788750 5277000000 5277262916 982032704 982295620
+15834000000 15834788877 5278000000 5278262959 983032704 983295663
+15837000000 15837788966 5279000000 5279262988 984032704 984295692
+15840000000 15840789072 5280000000 5280263024 985032704 985295728
+15843000000 15843789283 5281000000 5281263094 986032704 986295798
+15846000000 15846789492 5282000000 5282263164 987032704 987295868
+15849000000 15849789637 5283000000 5283263212 988032704 988295916
+15852000000 15852789763 5284000000 5284263254 989032704 989295958
+15855000000 15855789929 5285000000 5285263309 990032704 990296013
+15858000000 15858790009 5286000000 5286263336 991032704 991296040
+15861000000 15861790244 5287000000 5287263414 992032704 992296118
+15864000000 15864790403 5288000000 5288263467 993032704 993296171
+15867000000 15867790524 5289000000 5289263508 994032704 994296212
+15870000000 15870790684 5290000000 5290263561 995032704 995296265
+15873000000 15873790767 5291000000 5291263589 996032704 996296293
+15876000000 15876791013 5292000000 5292263671 997032704 997296375
+15879000000 15879791136 5293000000 5293263712 998032704 998296416
+15882000000 15882791272 5294000000 5294263757 999032704 999296461
+15885000000 15885791447 5295000000 5295263815 1000032704 1000296519
+15888000000 15888791569 5296000000 5296263856 1001032704 1001296560
+15891000000 15891791719 5297000000 5297263906 1002032704 1002296610
+15894000000 15894791867 5298000000 5298263955 1003032704 1003296659
+15897000000 15896965561 5299000000 5298988520 1004032704 1004021224
+15900000000 15900792187 5300000000 5300264062 1005032704 1005296766
+15903000000 15903792319 5301000000 5301264106 1006032704 1006296810
+15906000000 15906792493 5302000000 5302264164 1007032704 1007296868
+15909000000 15909792612 5303000000 5303264204 1008032704 1008296908
+15912000000 15912792736 5304000000 5304264245 1009032704 1009296949
+15915000000 15915792955 5305000000 5305264318 1010032704 1010297022
+15918000000 15918793091 5306000000 5306264363 1011032704 1011297067
+15921000000 15921793242 5307000000 5307264414 1012032704 1012297118
+15924000000 15924793392 5308000000 5308264464 1013032704 1013297168
+15927000000 15927793507 5309000000 5309264502 1014032704 1014297206
+15930000000 15930793604 5310000000 5310264534 1015032704 1015297238
+15933000000 15933793812 5311000000 5311264604 1016032704 1016297308
+15936000000 15936793967 5312000000 5312264655 1017032704 1017297359
+15939000000 15939794126 5313000000 5313264708 1018032704 1018297412
+15942000000 15942794300 5314000000 5314264766 1019032704 1019297470
+15945000000 15945794400 5315000000 5315264800 1020032704 1020297504
+15948000000 15948794578 5316000000 5316264859 1021032704 1021297563
+15951000000 15951794727 5317000000 5317264909 1022032704 1022297613
+15954000000 15954794855 5318000000 5318264951 1023032704 1023297655
+15957000000 15957795024 5319000000 5319265008 1024032704 1024297712
+15960000000 15960795144 5320000000 5320265048 1025032704 1025297752
+15963000000 15962622494 5321000000 5320874164 1026032704 1025906868
+15966000000 15966795394 5322000000 5322265131 1027032704 1027297835
+15969000000 15969795652 5323000000 5323265217 1028032704 1028297921
+15972000000 15972795757 5324000000 5324265252 1029032704 1029297956
+15975000000 15975795837 5325000000 5325265279 1030032704 1030297983
+15978000000 15978795984 5326000000 5326265328 1031032704 1031298032
+15981000000 15981796238 5327000000 5327265412 1032032704 1032298116
+15984000000 15984796328 5328000000 5328265442 1033032704 1033298146
+15987000000 15987796573 5329000000 5329265524 1034032704 1034298228
+15990000000 15990796651 5330000000 5330265550 1035032704 1035298254
+15993000000 15993796828 5331000000 5331265609 1036032704 1036298313
+15996000000 15996796974 5332000000 5332265658 1037032704 1037298362
+15999000000 15999797118 5333000000 5333265706 1038032704 1038298410
+16002000000 16001419772 5334000000 5333806590 1039032704 1038839294
+16005000000 16005797433 5335000000 5335265811 1040032704 1040298515
+16008000000 16008797593 5336000000 5336265864 1041032704 1041298568
+16011000000 16011797730 5337000000 5337265910 1042032704 1042298614
+16014000000 16014797888 5338000000 5338265962 1043032704 1043298666
+16017000000 16017798046 5339000000 5339266015 1044032704 1044298719
+16020000000 16020798160 5340000000 5340266053 1045032704 1045298757
+16023000000 16023798321 5341000000 5341266107 1046032704 1046298811
+16026000000 16026798448 5342000000 5342266149 1047032704 1047298853
+16029000000 16029798557 5343000000 5343266185 1048032704 1048298889
+16032000000 16032798699 5344000000 5344266233 1049032704 1049298937
+16035000000 16035798933 5345000000 5345266311 1050032704 1050299015
+16038000000 16038798846 5346000000 5346266282 1051032704 1051298986
+16041000000 16041798967 5347000000 5347266322 1052032704 1052299026
+16044000000 16044799075 5348000000 5348266358 1053032704 1053299062
+16047000000 16047799310 5349000000 5349266436 1054032704 1054299140
+16050000000 16050799489 5350000000 5350266496 1055032704 1055299200
+16053000000 16053713129 5351000000 5351237709 1056032704 1056270413
+16056000000 16056799758 5352000000 5352266586 1057032704 1057299290
+16059000000 16059799931 5353000000 5353266643 1058032704 1058299347
+16062000000 16062800047 5354000000 5354266682 1059032704 1059299386
+16065000000 16065800220 5355000000 5355266740 1060032704 1060299444
+16068000000 16068800392 5356000000 5356266797 1061032704 1061299501
+16071000000 16071800448 5357000000 5357266816 1062032704 1062299520
+16074000000 16074800594 5358000000 5358266864 1063032704 1063299568
+16077000000 16077800790 5359000000 5359266930 1064032704 1064299634
+16080000000 16080800819 5360000000 5360266939 1065032704 1065299643
+16083000000 16083801125 5361000000 5361267041 1066032704 1066299745
+16086000000 16086801297 5362000000 5362267099 1067032704 1067299803
+16089000000 16089801430 5363000000 5363267143 1068032704 1068299847
+16092000000 16092801547 5364000000 5364267182 1069032704 1069299886
+16095000000 16095801732 5365000000 5365267244 1070032704 1070299948
+16098000000 16098801838 5366000000 5366267279 1071032704 1071299983
+16101000000 16101802019 5367000000 5367267339 1072032704 1072300043
+16104000000 16104802231 5368000000 5368267410 1073032704 1073300114
+16107000000 16107802338 5369000000 5369267446 1074032704 1074300150
+16110000000 16110802504 5370000000 5370267501 1075032704 1075300205
+16113000000 16113401249 5371000000 5371133749 1076032704 1076166453
+16116000000 16116802775 5372000000 5372267591 1077032704 1077300295
+16119000000 16119802887 5373000000 5373267629 1078032704 1078300333
+16122000000 16122803096 5374000000 5374267698 1079032704 1079300402
+16125000000 16125803175 5375000000 5375267725 1080032704 1080300429
+16128000000 16128803400 5376000000 5376267800 1081032704 1081300504
+16131000000 16131803527 5377000000 5377267842 1082032704 1082300546
+16134000000 16134803616 5378000000 5378267872 1083032704 1083300576
+16137000000 16137803722 5379000000 5379267907 1084032704 1084300611
+16140000000 16140803933 5380000000 5380267977 1085032704 1085300681
+16143000000 16143804142 5381000000 5381268047 1086032704 1086300751
+16146000000 16146804287 5382000000 5382268095 1087032704 1087300799
+16149000000 16149804413 5383000000 5383268137 1088032704 1088300841
+16152000000 16152804579 5384000000 5384268193 1089032704 1089300897
+16155000000 16155804659 5385000000 5385268219 1090032704 1090300923
+16158000000 16158804894 5386000000 5386268298 1091032704 1091301002
+16161000000 16161805053 5387000000 5387268351 1092032704 1092301055
+16164000000 16164805174 5388000000 5388268391 1093032704 1093301095
+16167000000 16167805334 5389000000 5389268444 1094032704 1094301148
+16170000000 16170805417 5390000000 5390268472 1095032704 1095301176
+16173000000 16173805663 5391000000 5391268554 1096032704 1096301258
+16176000000 16176805786 5392000000 5392268595 1097032704 1097301299
+16179000000 16179805922 5393000000 5393268640 1098032704 1098301344
+16182000000 16182806097 5394000000 5394268699 1099032704 1099301403
+16185000000 16185806219 5395000000 5395268739 1100032704 1100301443
+16188000000 16188806369 5396000000 5396268789 1101032704 1101301493
+16191000000 16191806517 5397000000 5397268839 1102032704 1102301543
+16194000000 16193980211 5398000000 5397993403 1103032704 1103026107
+16197000000 16197806837 5399000000 5399268945 1104032704 1104301649
+16200000000 16200806969 5400000000 5400268989 1105032704 1105301693
+16203000000 16203807143 5401000000 5401269047 1106032704 1106301751
+16206000000 16206807262 5402000000 5402269087 1107032704 1107301791
+16209000000 16209807386 5403000000 5403269128 1108032704 1108301832
+16212000000 16212807605 5404000000 5404269201 1109032704 1109301905
+16215000000 16215807741 5405000000 5405269247 1110032704 1110301951
+16218000000 16218807892 5406000000 5406269297 1111032704 1111302001
+16221000000 16221808042 5407000000 5407269347 1112032704 1112302051
+16224000000 16224808157 5408000000 5408269385 1113032704 1113302089
+16227000000 16227808254 5409000000 5409269418 1114032704 1114302122
+16230000000 16230808462 5410000000 5410269487 1115032704 1115302191
+16233000000 16233808617 5411000000 5411269539 1116032704 1116302243
+16236000000 16236808776 5412000000 5412269592 1117032704 1117302296
+16239000000 16239808950 5413000000 5413269650 1118032704 1118302354
+16242000000 16242809050 5414000000 5414269683 1119032704 1119302387
+16245000000 16245809228 5415000000 5415269742 1120032704 1120302446
+16248000000 16248809377 5416000000 5416269792 1121032704 1121302496
+16251000000 16251809505 5417000000 5417269835 1122032704 1122302539
+16254000000 16254809674 5418000000 5418269891 1123032704 1123302595
+16257000000 16257809794 5419000000 5419269931 1124032704 1124302635
+16260000000 16259637144 5420000000 5419879048 1125032704 1124911752
+16263000000 16263810044 5421000000 5421270014 1126032704 1126302718
+16266000000 16266810302 5422000000 5422270100 1127032704 1127302804
+16269000000 16269810407 5423000000 5423270135 1128032704 1128302839
+16272000000 16272810487 5424000000 5424270162 1129032704 1129302866
+16275000000 16275810634 5425000000 5425270211 1130032704 1130302915
+16278000000 16278810888 5426000000 5426270296 1131032704 1131303000
+16281000000 16281810978 5427000000 5427270326 1132032704 1132303030
+16284000000 16284811223 5428000000 5428270407 1133032704 1133303111
+16287000000 16287811301 5429000000 5429270433 1134032704 1134303137
+16290000000 16290811478 5430000000 5430270492 1135032704 1135303196
+16293000000 16293811624 5431000000 5431270541 1136032704 1136303245
+16296000000 16296811768 5432000000 5432270589 1137032704 1137303293
+16299000000 16298434422 5433000000 5432811474 1138032704 1137844178
+16302000000 16302812083 5434000000 5434270694 1139032704 1139303398
+16305000000 16305812243 5435000000 5435270747 1140032704 1140303451
+16308000000 16308812380 5436000000 5436270793 1141032704 1141303497
+16311000000 16311812538 5437000000 5437270846 1142032704 1142303550
+16314000000 16314812696 5438000000 5438270898 1143032704 1143303602
+16317000000 16317812810 5439000000 5439270936 1144032704 1144303640
+16320000000 16320812971 5440000000 5440270990 1145032704 1145303694
+16323000000 16323813098 5441000000 5441271032 1146032704 1146303736
+16326000000 16326813207 5442000000 5442271069 1147032704 1147303773
+16329000000 16329813349 5443000000 5443271116 1148032704 1148303820
+16332000000 16332813583 5444000000 5444271194 1149032704 1149303898
+16335000000 16335813496 5445000000 5445271165 1150032704 1150303869
+16338000000 16338813617 5446000000 5446271205 1151032704 1151303909
+16341000000 16341813725 5447000000 5447271241 1152032704 1152303945
+16344000000 16344813960 5448000000 5448271320 1153032704 1153304024
+16347000000 16347814139 5449000000 5449271379 1154032704 1154304083
+16350000000 16350727779 5450000000 5450242593 1155032704 1155275297
+16353000000 16353814408 5451000000 5451271469 1156032704 1156304173
+16356000000 16356814581 5452000000 5452271527 1157032704 1157304231
+16359000000 16359814697 5453000000 5453271565 1158032704 1158304269
+16362000000 16362814870 5454000000 5454271623 1159032704 1159304327
+16365000000 16365815042 5455000000 5455271680 1160032704 1160304384
+16368000000 16368815098 5456000000 5456271699 1161032704 1161304403
+16371000000 16371815244 5457000000 5457271748 1162032704 1162304452
+16374000000 16374815440 5458000000 5458271813 1163032704 1163304517
+16377000000 16377815469 5459000000 5459271823 1164032704 1164304527
+16380000000 16380815775 5460000000 5460271925 1165032704 1165304629
+16383000000 16383815947 5461000000 5461271982 1166032704 1166304686
+16386000000 16386816080 5462000000 5462272026 1167032704 1167304730
+16389000000 16389816197 5463000000 5463272065 1168032704 1168304769
+16392000000 16392816382 5464000000 5464272127 1169032704 1169304831
+16395000000 16395816488 5465000000 5465272162 1170032704 1170304866
+16398000000 16398816669 5466000000 5466272223 1171032704 1171304927
+16401000000 16401816881 5467000000 5467272293 1172032704 1172304997
+16404000000 16404816988 5468000000 5468272329 1173032704 1173305033
+16407000000 16407817154 5469000000 5469272384 1174032704 1174305088
+16410000000 16410415899 5470000000 5470138633 1175032704 1175171337
+16413000000 16413817425 5471000000 5471272475 1176032704 1176305179
+16416000000 16416817537 5472000000 5472272512 1177032704 1177305216
+16419000000 16419817746 5473000000 5473272582 1178032704 1178305286
+16422000000 16422817825 5474000000 5474272608 1179032704 1179305312
+16425000000 16425818050 5475000000 5475272683 1180032704 1180305387
+16428000000 16428818177 5476000000 5476272725 1181032704 1181305429
+16431000000 16431818266 5477000000 5477272755 1182032704 1182305459
+16434000000 16434818372 5478000000 5478272790 1183032704 1183305494
+16437000000 16437818583 5479000000 5479272861 1184032704 1184305565
+16440000000 16440818792 5480000000 5480272930 1185032704 1185305634
+16443000000 16443818937 5481000000 5481272979 1186032704 1186305683
+16446000000 16446819063 5482000000 5482273021 1187032704 1187305725
+16449000000 16449819229 5483000000 5483273076 1188032704 1188305780
+16452000000 16452819309 5484000000 5484273103 1189032704 1189305807
+16455000000 16455819544 5485000000 5485273181 1190032704 1190305885
+16458000000 16458819703 5486000000 5486273234 1191032704 1191305938
+16461000000 16461819824 5487000000 5487273274 1192032704 1192305978
+16464000000 16464819984 5488000000 5488273328 1193032704 1193306032
+16467000000 16467820067 5489000000 5489273355 1194032704 1194306059
+16470000000 16470820313 5490000000 5490273437 1195032704 1195306141
+16473000000 16473820436 5491000000 5491273478 1196032704 1196306182
+16476000000 16476820572 5492000000 5492273524 1197032704 1197306228
+16479000000 16479820747 5493000000 5493273582 1198032704 1198306286
+16482000000 16482820869 5494000000 5494273623 1199032704 1199306327
+16485000000 16485821019 5495000000 5495273673 1200032704 1200306377
+16488000000 16488821167 5496000000 5496273722 1201032704 1201306426
+16491000000 16490994861 5497000000 5496998287 1202032704 1202030991
+16494000000 16494821487 5498000000 5498273829 1203032704 1203306533
+16497000000 16497821619 5499000000 5499273873 1204032704 1204306577
+16500000000 16500821793 5500000000 5500273931 1205032704 1205306635
+16503000000 16503821912 5501000000 5501273970 1206032704 1206306674
+16506000000 16506822036 5502000000 5502274012 1207032704 1207306716
+16509000000 16509822255 5503000000 5503274085 1208032704 1208306789
+16512000000 16512822391 5504000000 5504274130 1209032704 1209306834
+16515000000 16515822542 5505000000 5505274180 1210032704 1210306884
+16518000000 16518822692 5506000000 5506274230 1211032704 1211306934
+16521000000 16521822807 5507000000 5507274269 1212032704 1212306973
+16524000000 16524822904 5508000000 5508274301 1213032704 1213307005
+16527000000 16527823112 5509000000 5509274370 1214032704 1214307074
+16530000000 16530823267 5510000000 5510274422 1215032704 1215307126
+16533000000 16533823426 5511000000 5511274475 1216032704 1216307179
+16536000000 16536823600 5512000000 5512274533 1217032704 1217307237
+16539000000 16539823700 5513000000 5513274566 1218032704 1218307270
+16542000000 16542823878 5514000000 5514274626 1219032704 1219307330
+16545000000 16545824027 5515000000 5515274675 1220032704 1220307379
+16548000000 16548824155 5516000000 5516274718 1221032704 1221307422
+16551000000 16551824324 5517000000 5517274774 1222032704 1222307478
+16554000000 16554824444 5518000000 5518274814 1223032704 1223307518
+16557000000 16556651794 5519000000 5518883931 1224032704 1223916635
+16560000000 16560824694 5520000000 5520274898 1225032704 1225307602
+16563000000 16563824952 5521000000 5521274984 1226032704 1226307688
+16566000000 16566825057 5522000000 5522275019 1227032704 1227307723
+16569000000 16569825137 5523000000 5523275045 1228032704 1228307749
+16572000000 16572825284 5524000000 5524275094 1229032704 1229307798
+16575000000 16575825538 5525000000 5525275179 1230032704 1230307883
+16578000000 16578825628 5526000000 5526275209 1231032704 1231307913
+16581000000 16581825873 5527000000 5527275291 1232032704 1232307995
+16584000000 16584825951 5528000000 5528275317 1233032704 1233308021
+16587000000 16587826128 5529000000 5529275376 1234032704 1234308080
+16590000000 16590826274 5530000000 5530275424 1235032704 1235308128
+16593000000 16593826418 5531000000 5531275472 1236032704 1236308176
+16596000000 16595449072 5532000000 5531816357 1237032704 1236849061
+16599000000 16599826733 5533000000 5533275577 1238032704 1238308281
+16602000000 16602826893 5534000000 5534275631 1239032704 1239308335
+16605000000 16605827030 5535000000 5535275676 1240032704 1240308380
+16608000000 16608827188 5536000000 5536275729 1241032704 1241308433
+16611000000 16611827346 5537000000 5537275782 1242032704 1242308486
+16614000000 16614827460 5538000000 5538275820 1243032704 1243308524
+16617000000 16617827621 5539000000 5539275873 1244032704 1244308577
+16620000000 16620827748 5540000000 5540275916 1245032704 1245308620
+16623000000 16623827857 5541000000 5541275952 1246032704 1246308656
+16626000000 16626827999 5542000000 5542275999 1247032704 1247308703
+16629000000 16629828233 5543000000 5543276077 1248032704 1248308781
+16632000000 16632828146 5544000000 5544276048 1249032704 1249308752
+16635000000 16635828267 5545000000 5545276089 1250032704 1250308793
+16638000000 16638828375 5546000000 5546276125 1251032704 1251308829
+16641000000 16641828610 5547000000 5547276203 1252032704 1252308907
+16644000000 16644828789 5548000000 5548276263 1253032704 1253308967
+16647000000 16647742429 5549000000 5549247476 1254032704 1254280180
+16650000000 16650829058 5550000000 5550276352 1255032704 1255309056
+16653000000 16653829231 5551000000 5551276410 1256032704 1256309114
+16656000000 16656829347 5552000000 5552276449 1257032704 1257309153
+16659000000 16659829520 5553000000 5553276506 1258032704 1258309210
+16662000000 16662829692 5554000000 5554276564 1259032704 1259309268
+16665000000 16665829748 5555000000 5555276582 1260032704 1260309286
+16668000000 16668829894 5556000000 5556276631 1261032704 1261309335
+16671000000 16671830090 5557000000 5557276696 1262032704 1262309400
+16674000000 16674830119 5558000000 5558276706 1263032704 1263309410
+16677000000 16677830425 5559000000 5559276808 1264032704 1264309512
+16680000000 16680830597 5560000000 5560276865 1265032704 1265309569
+16683000000 16683830730 5561000000 5561276910 1266032704 1266309614
+16686000000 16686830847 5562000000 5562276949 1267032704 1267309653
+16689000000 16689831032 5563000000 5563277010 1268032704 1268309714
+16692000000 16692831138 5564000000 5564277046 1269032704 1269309750
+16695000000 16695831319 5565000000 5565277106 1270032704 1270309810
+16698000000 16698831531 5566000000 5566277177 1271032704 1271309881
+16701000000 16701831638 5567000000 5567277212 1272032704 1272309916
+16704000000 16704831804 5568000000 5568277268 1273032704 1273309972
+16707000000 16707430549 5569000000 5569143516 1274032704 1274176220
+16710000000 16710832075 5570000000 5570277358 1275032704 1275310062
+16713000000 16713832187 5571000000 5571277395 1276032704 1276310099
+16716000000 16716832396 5572000000 5572277465 1277032704 1277310169
+16719000000 16719832475 5573000000 5573277491 1278032704 1278310195
+16722000000 16722832700 5574000000 5574277566 1279032704 1279310270
+16725000000 16725832827 5575000000 5575277609 1280032704 1280310313
+16728000000 16728832916 5576000000 5576277638 1281032704 1281310342
+16731000000 16731833022 5577000000 5577277674 1282032704 1282310378
+16734000000 16734833233 5578000000 5578277744 1283032704 1283310448
+16737000000 16737833442 5579000000 5579277814 1284032704 1284310518
+16740000000 16740833587 5580000000 5580277862 1285032704 1285310566
+16743000000 16743833713 5581000000 5581277904 1286032704 1286310608
+16746000000 16746833879 5582000000 5582277959 1287032704 1287310663
+16749000000 16749833959 5583000000 5583277986 1288032704 1288310690
+16752000000 16752834194 5584000000 5584278064 1289032704 1289310768
+16755000000 16755834353 5585000000 5585278117 1290032704 1290310821
+16758000000 16758834474 5586000000 5586278158 1291032704 1291310862
+16761000000 16761834634 5587000000 5587278211 1292032704 1292310915
+16764000000 16764834717 5588000000 5588278239 1293032704 1293310943
+16767000000 16767834963 5589000000 5589278321 1294032704 1294311025
+16770000000 16770835086 5590000000 5590278362 1295032704 1295311066
+16773000000 16773835222 5591000000 5591278407 1296032704 1296311111
+16776000000 16776835397 5592000000 5592278465 1297032704 1297311169
+16779000000 16779835519 5593000000 5593278506 1298032704 1298311210
+16782000000 16782835669 5594000000 5594278556 1299032704 1299311260
+16785000000 16785835817 5595000000 5595278605 1300032704 1300311309
+16788000000 16788009511 5596000000 5596003170 1301032704 1301035874
+16791000000 16791836137 5597000000 5597278712 1302032704 1302311416
+16794000000 16794836269 5598000000 5598278756 1303032704 1303311460
+16797000000 16797836443 5599000000 5599278814 1304032704 1304311518
+16800000000 16800836562 5600000000 5600278854 1305032704 1305311558
+16803000000 16803836686 5601000000 5601278895 1306032704 1306311599
+16806000000 16806836905 5602000000 5602278968 1307032704 1307311672
+16809000000 16809837041 5603000000 5603279013 1308032704 1308311717
+16812000000 16812837192 5604000000 5604279064 1309032704 1309311768
+16815000000 16815837342 5605000000 5605279114 1310032704 1310311818
+16818000000 16818837457 5606000000 5606279152 1311032704 1311311856
+16821000000 16821837554 5607000000 5607279184 1312032704 1312311888
+16824000000 16824837762 5608000000 5608279254 1313032704 1313311958
+16827000000 16827837917 5609000000 5609279305 1314032704 1314312009
+16830000000 16830838076 5610000000 5610279358 1315032704 1315312062
+16833000000 16833838250 5611000000 5611279416 1316032704 1316312120
+16836000000 16836838350 5612000000 5612279450 1317032704 1317312154
+16839000000 16839838528 5613000000 5613279509 1318032704 1318312213
+16842000000 16842838677 5614000000 5614279559 1319032704 1319312263
+16845000000 16845838805 5615000000 5615279601 1320032704 1320312305
+16848000000 16848838974 5616000000 5616279658 1321032704 1321312362
+16851000000 16851839094 5617000000 5617279698 1322032704 1322312402
+16854000000 16853666444 5618000000 5617888814 1323032704 1322921518
+16857000000 16857839344 5619000000 5619279781 1324032704 1324312485
+16860000000 16860839602 5620000000 5620279867 1325032704 1325312571
+16863000000 16863839707 5621000000 5621279902 1326032704 1326312606
+16866000000 16866839787 5622000000 5622279929 1327032704 1327312633
+16869000000 16869839934 5623000000 5623279978 1328032704 1328312682
+16872000000 16872840188 5624000000 5624280062 1329032704 1329312766
+16875000000 16875840278 5625000000 5625280092 1330032704 1330312796
+16878000000 16878840523 5626000000 5626280174 1331032704 1331312878
+16881000000 16881840601 5627000000 5627280200 1332032704 1332312904
+16884000000 16884840778 5628000000 5628280259 1333032704 1333312963
+16887000000 16887840924 5629000000 5629280308 1334032704 1334313012
+16890000000 16890841068 5630000000 5630280356 1335032704 1335313060
+16893000000 16892463722 5631000000 5630821240 1336032704 1335853944
+16896000000 16896841383 5632000000 5632280461 1337032704 1337313165
+16899000000 16899841543 5633000000 5633280514 1338032704 1338313218
+16902000000 16902841680 5634000000 5634280560 1339032704 1339313264
+16905000000 16905841838 5635000000 5635280612 1340032704 1340313316
+16908000000 16908841996 5636000000 5636280665 1341032704 1341313369
+16911000000 16911842110 5637000000 5637280703 1342032704 1342313407
+16914000000 16914842271 5638000000 5638280757 1343032704 1343313461
+16917000000 16917842398 5639000000 5639280799 1344032704 1344313503
+16920000000 16920842507 5640000000 5640280835 1345032704 1345313539
+16923000000 16923842649 5641000000 5641280883 1346032704 1346313587
+16926000000 16926842883 5642000000 5642280961 1347032704 1347313665
+16929000000 16929842796 5643000000 5643280932 1348032704 1348313636
+16932000000 16932842917 5644000000 5644280972 1349032704 1349313676
+16935000000 16935843025 5645000000 5645281008 1350032704 1350313712
+16938000000 16938843260 5646000000 5646281086 1351032704 1351313790
+16941000000 16941843439 5647000000 5647281146 1352032704 1352313850
+16944000000 16944757079 5648000000 5648252359 1353032704 1353285063
+16947000000 16947843708 5649000000 5649281236 1354032704 1354313940
+16950000000 16950843881 5650000000 5650281293 1355032704 1355313997
+16953000000 16953843997 5651000000 5651281332 1356032704 1356314036
+16956000000 16956844170 5652000000 5652281390 1357032704 1357314094
+16959000000 16959844342 5653000000 5653281447 1358032704 1358314151
+16962000000 16962844398 5654000000 5654281466 1359032704 1359314170
+16965000000 16965844544 5655000000 5655281514 1360032704 1360314218
+16968000000 16968844740 5656000000 5656281580 1361032704 1361314284
+16971000000 16971844769 5657000000 5657281589 1362032704 1362314293
+16974000000 16974845075 5658000000 5658281691 1363032704 1363314395
+16977000000 16977845247 5659000000 5659281749 1364032704 1364314453
+16980000000 16980845380 5660000000 5660281793 1365032704 1365314497
+16983000000 16983845497 5661000000 5661281832 1366032704 1366314536
+16986000000 16986845682 5662000000 5662281894 1367032704 1367314598
+16989000000 16989845788 5663000000 5663281929 1368032704 1368314633
+16992000000 16992845969 5664000000 5664281989 1369032704 1369314693
+16995000000 16995846181 5665000000 5665282060 1370032704 1370314764
+16998000000 16998846288 5666000000 5666282096 1371032704 1371314800
+17001000000 17001846454 5667000000 5667282151 1372032704 1372314855
+17004000000 17004445199 5668000000 5668148399 1373032704 1373181103
+17007000000 17007846725 5669000000 5669282241 1374032704 1374314945
+17010000000 17010846837 5670000000 5670282279 1375032704 1375314983
+17013000000 17013847046 5671000000 5671282348 1376032704 1376315052
+17016000000 17016847125 5672000000 5672282375 1377032704 1377315079
+17019000000 17019847350 5673000000 5673282450 1378032704 1378315154
+17022000000 17022847477 5674000000 5674282492 1379032704 1379315196
+17025000000 17025847566 5675000000 5675282522 1380032704 1380315226
+17028000000 17028847672 5676000000 5676282557 1381032704 1381315261
+17031000000 17031847883 5677000000 5677282627 1382032704 1382315331
+17034000000 17034848092 5678000000 5678282697 1383032704 1383315401
+17037000000 17037848237 5679000000 5679282745 1384032704 1384315449
+17040000000 17040848363 5680000000 5680282787 1385032704 1385315491
+17043000000 17043848529 5681000000 5681282843 1386032704 1386315547
+17046000000 17046848609 5682000000 5682282869 1387032704 1387315573
+17049000000 17049848844 5683000000 5683282948 1388032704 1388315652
+17052000000 17052849003 5684000000 5684283001 1389032704 1389315705
+17055000000 17055849124 5685000000 5685283041 1390032704 1390315745
+17058000000 17058849284 5686000000 5686283094 1391032704 1391315798
+17061000000 17061849367 5687000000 5687283122 1392032704 1392315826
+17064000000 17064849613 5688000000 5688283204 1393032704 1393315908
+17067000000 17067849736 5689000000 5689283245 1394032704 1394315949
+17070000000 17070849872 5690000000 5690283290 1395032704 1395315994
+17073000000 17073850047 5691000000 5691283349 1396032704 1396316053
+17076000000 17076850169 5692000000 5692283389 1397032704 1397316093
+17079000000 17079850319 5693000000 5693283439 1398032704 1398316143
+17082000000 17082850467 5694000000 5694283489 1399032704 1399316193
+17085000000 17085024161 5695000000 5695008053 1400032704 1400040757
+17088000000 17088850787 5696000000 5696283595 1401032704 1401316299
+17091000000 17091850919 5697000000 5697283639 1402032704 1402316343
+17094000000 17094851093 5698000000 5698283697 1403032704 1403316401
+17097000000 17097851212 5699000000 5699283737 1404032704 1404316441
+17100000000 17100851336 5700000000 5700283778 1405032704 1405316482
+17103000000 17103851555 5701000000 5701283851 1406032704 1406316555
+17106000000 17106851691 5702000000 5702283897 1407032704 1407316601
+17109000000 17109851842 5703000000 5703283947 1408032704 1408316651
+17112000000 17112851992 5704000000 5704283997 1409032704 1409316701
+17115000000 17115852107 5705000000 5705284035 1410032704 1410316739
+17118000000 17118852204 5706000000 5706284068 1411032704 1411316772
+17121000000 17121852412 5707000000 5707284137 1412032704 1412316841
+17124000000 17124852567 5708000000 5708284189 1413032704 1413316893
+17127000000 17127852726 5709000000 5709284242 1414032704 1414316946
+17130000000 17130852900 5710000000 5710284300 1415032704 1415317004
+17133000000 17133853000 5711000000 5711284333 1416032704 1416317037
+17136000000 17136853178 5712000000 5712284392 1417032704 1417317096
+17139000000 17139853327 5713000000 5713284442 1418032704 1418317146
+17142000000 17142853455 5714000000 5714284485 1419032704 1419317189
+17145000000 17145853624 5715000000 5715284541 1420032704 1420317245
+17148000000 17148853744 5716000000 5716284581 1421032704 1421317285
+17151000000 17150681094 5717000000 5716893698 1422032704 1421926402
+17154000000 17154853994 5718000000 5718284664 1423032704 1423317368
+17157000000 17157854252 5719000000 5719284750 1424032704 1424317454
+17160000000 17160854357 5720000000 5720284785 1425032704 1425317489
+17163000000 17163854437 5721000000 5721284812 1426032704 1426317516
+17166000000 17166854584 5722000000 5722284861 1427032704 1427317565
+17169000000 17169854838 5723000000 5723284946 1428032704 1428317650
+17172000000 17172854928 5724000000 5724284976 1429032704 1429317680
+17175000000 17175855173 5725000000 5725285057 1430032704 1430317761
+17178000000 17178855251 5726000000 5726285083 1431032704 1431317787
+17181000000 17181855428 5727000000 5727285142 1432032704 1432317846
+17184000000 17184855574 5728000000 5728285191 1433032704 1433317895
+17187000000 17187855718 5729000000 5729285239 1434032704 1434317943
+17190000000 17189478372 5730000000 5729826124 1435032704 1434858828
+17193000000 17193856033 5731000000 5731285344 1436032704 1436318048
+17196000000 17196856193 5732000000 5732285397 1437032704 1437318101
+17199000000 17199856330 5733000000 5733285443 1438032704 1438318147
+17202000000 17202856488 5734000000 5734285496 1439032704 1439318200
+17205000000 17205856646 5735000000 5735285548 1440032704 1440318252
+17208000000 17208856760 5736000000 5736285586 1441032704 1441318290
+17211000000 17211856921 5737000000 5737285640 1442032704 1442318344
+17214000000 17214857048 5738000000 5738285682 1443032704 1443318386
+17217000000 17217857157 5739000000 5739285719 1444032704 1444318423
+17220000000 17220857299 5740000000 5740285766 1445032704 1445318470
+17223000000 17223857533 5741000000 5741285844 1446032704 1446318548
+17226000000 17226857446 5742000000 5742285815 1447032704 1447318519
+17229000000 17229857567 5743000000 5743285855 1448032704 1448318559
+17232000000 17232857675 5744000000 5744285891 1449032704 1449318595
+17235000000 17235857910 5745000000 5745285970 1450032704 1450318674
+17238000000 17238858089 5746000000 5746286029 1451032704 1451318733
+17241000000 17241771729 5747000000 5747257243 1452032704 1452289947
+17244000000 17244858358 5748000000 5748286119 1453032704 1453318823
+17247000000 17247858531 5749000000 5749286177 1454032704 1454318881
+17250000000 17250858647 5750000000 5750286215 1455032704 1455318919
+17253000000 17253858820 5751000000 5751286273 1456032704 1456318977
+17256000000 17256858992 5752000000 5752286330 1457032704 1457319034
+17259000000 17259859048 5753000000 5753286349 1458032704 1458319053
+17262000000 17262859194 5754000000 5754286398 1459032704 1459319102
+17265000000 17265859390 5755000000 5755286463 1460032704 1460319167
+17268000000 17268859419 5756000000 5756286473 1461032704 1461319177
+17271000000 17271859725 5757000000 5757286575 1462032704 1462319279
+17274000000 17274859897 5758000000 5758286632 1463032704 1463319336
+17277000000 17277860030 5759000000 5759286676 1464032704 1464319380
+17280000000 17280860147 5760000000 5760286715 1465032704 1465319419
+17283000000 17283860332 5761000000 5761286777 1466032704 1466319481
+17286000000 17286860438 5762000000 5762286812 1467032704 1467319516
+17289000000 17289860619 5763000000 5763286873 1468032704 1468319577
+17292000000 17292860831 5764000000 5764286943 1469032704 1469319647
+17295000000 17295860938 5765000000 5765286979 1470032704 1470319683
+17298000000 17298861104 5766000000 5766287034 1471032704 1471319738
+17301000000 17301459849 5767000000 5767153283 1472032704 1472185987
+17304000000 17304861375 5768000000 5768287125 1473032704 1473319829
+17307000000 17307861487 5769000000 5769287162 1474032704 1474319866
+17310000000 17310861696 5770000000 5770287232 1475032704 1475319936
+17313000000 17313861775 5771000000 5771287258 1476032704 1476319962
+17316000000 17316862000 5772000000 5772287333 1477032704 1477320037
+17319000000 17319862127 5773000000 5773287375 1478032704 1478320079
+17322000000 17322862216 5774000000 5774287405 1479032704 1479320109
+17325000000 17325862322 5775000000 5775287440 1480032704 1480320144
+17328000000 17328862533 5776000000 5776287511 1481032704 1481320215
+17331000000 17331862742 5777000000 5777287580 1482032704 1482320284
+17334000000 17334862887 5778000000 5778287629 1483032704 1483320333
+17337000000 17337863013 5779000000 5779287671 1484032704 1484320375
+17340000000 17340863179 5780000000 5780287726 1485032704 1485320430
+17343000000 17343863259 5781000000 5781287753 1486032704 1486320457
+17346000000 17346863494 5782000000 5782287831 1487032704 1487320535
+17349000000 17349863653 5783000000 5783287884 1488032704 1488320588
+17352000000 17352863774 5784000000 5784287924 1489032704 1489320628
+17355000000 17355863934 5785000000 5785287978 1490032704 1490320682
+17358000000 17358864017 5786000000 5786288005 1491032704 1491320709
+17361000000 17361864263 5787000000 5787288087 1492032704 1492320791
+17364000000 17364864386 5788000000 5788288128 1493032704 1493320832
+17367000000 17367864522 5789000000 5789288174 1494032704 1494320878
+17370000000 17370864697 5790000000 5790288232 1495032704 1495320936
+17373000000 17373864819 5791000000 5791288273 1496032704 1496320977
+17376000000 17376864969 5792000000 5792288323 1497032704 1497321027
+17379000000 17379865117 5793000000 5793288372 1498032704 1498321076
+17382000000 17382038811 5794000000 5794012937 1499032704 1499045641
+17385000000 17385865437 5795000000 5795288479 1500032704 1500321183
+17388000000 17388865569 5796000000 5796288523 1501032704 1501321227
+17391000000 17391865743 5797000000 5797288581 1502032704 1502321285
+17394000000 17394865862 5798000000 5798288620 1503032704 1503321324
+17397000000 17397865986 5799000000 5799288662 1504032704 1504321366
+17400000000 17400866205 5800000000 5800288735 1505032704 1505321439
+17403000000 17403866341 5801000000 5801288780 1506032704 1506321484
+17406000000 17406866492 5802000000 5802288830 1507032704 1507321534
+17409000000 17409866642 5803000000 5803288880 1508032704 1508321584
+17412000000 17412866757 5804000000 5804288919 1509032704 1509321623
+17415000000 17415866854 5805000000 5805288951 1510032704 1510321655
+17418000000 17418867062 5806000000 5806289020 1511032704 1511321724
+17421000000 17421867217 5807000000 5807289072 1512032704 1512321776
+17424000000 17424867376 5808000000 5808289125 1513032704 1513321829
+17427000000 17427867550 5809000000 5809289183 1514032704 1514321887
+17430000000 17430867650 5810000000 5810289216 1515032704 1515321920
+17433000000 17433867828 5811000000 5811289276 1516032704 1516321980
+17436000000 17436867977 5812000000 5812289325 1517032704 1517322029
+17439000000 17439868105 5813000000 5813289368 1518032704 1518322072
+17442000000 17442868274 5814000000 5814289424 1519032704 1519322128
+17445000000 17445868394 5815000000 5815289464 1520032704 1520322168
+17448000000 17447695744 5816000000 5815898581 1521032704 1520931285
+17451000000 17451868644 5817000000 5817289548 1522032704 1522322252
+17454000000 17454868902 5818000000 5818289634 1523032704 1523322338
+17457000000 17457869007 5819000000 5819289669 1524032704 1524322373
+17460000000 17460869087 5820000000 5820289695 1525032704 1525322399
+17463000000 17463869234 5821000000 5821289744 1526032704 1526322448
+17466000000 17466869488 5822000000 5822289829 1527032704 1527322533
+17469000000 17469869578 5823000000 5823289859 1528032704 1528322563
+17472000000 17472869823 5824000000 5824289941 1529032704 1529322645
+17475000000 17475869901 5825000000 5825289967 1530032704 1530322671
+17478000000 17478870078 5826000000 5826290026 1531032704 1531322730
+17481000000 17481870224 5827000000 5827290074 1532032704 1532322778
+17484000000 17484870368 5828000000 5828290122 1533032704 1533322826
+17487000000 17486493022 5829000000 5828831007 1534032704 1533863711
+17490000000 17490870683 5830000000 5830290227 1535032704 1535322931
+17493000000 17493870843 5831000000 5831290281 1536032704 1536322985
+17496000000 17496870980 5832000000 5832290326 1537032704 1537323030
+17499000000 17499871138 5833000000 5833290379 1538032704 1538323083
+17502000000 17502871296 5834000000 5834290432 1539032704 1539323136
+17505000000 17505871410 5835000000 5835290470 1540032704 1540323174
+17508000000 17508871571 5836000000 5836290523 1541032704 1541323227
+17511000000 17511871698 5837000000 5837290566 1542032704 1542323270
+17514000000 17514871807 5838000000 5838290602 1543032704 1543323306
+17517000000 17517871949 5839000000 5839290649 1544032704 1544323353
+17520000000 17520872183 5840000000 5840290727 1545032704 1545323431
+17523000000 17523872096 5841000000 5841290698 1546032704 1546323402
+17526000000 17526872217 5842000000 5842290739 1547032704 1547323443
+17529000000 17529872325 5843000000 5843290775 1548032704 1548323479
+17532000000 17532872560 5844000000 5844290853 1549032704 1549323557
+17535000000 17535872739 5845000000 5845290913 1550032704 1550323617
+17538000000 17538786379 5846000000 5846262126 1551032704 1551294830
+17541000000 17541873008 5847000000 5847291002 1552032704 1552323706
+17544000000 17544873181 5848000000 5848291060 1553032704 1553323764
+17547000000 17547873297 5849000000 5849291099 1554032704 1554323803
+17550000000 17550873470 5850000000 5850291156 1555032704 1555323860
+17553000000 17553873642 5851000000 5851291214 1556032704 1556323918
+17556000000 17556873698 5852000000 5852291232 1557032704 1557323936
+17559000000 17559873844 5853000000 5853291281 1558032704 1558323985
+17562000000 17562874040 5854000000 5854291346 1559032704 1559324050
+17565000000 17565874069 5855000000 5855291356 1560032704 1560324060
+17568000000 17568874375 5856000000 5856291458 1561032704 1561324162
+17571000000 17571874547 5857000000 5857291515 1562032704 1562324219
+17574000000 17574874680 5858000000 5858291560 1563032704 1563324264
+17577000000 17577874797 5859000000 5859291599 1564032704 1564324303
+17580000000 17580874982 5860000000 5860291660 1565032704 1565324364
+17583000000 17583875088 5861000000 5861291696 1566032704 1566324400
+17586000000 17586875269 5862000000 5862291756 1567032704 1567324460
+17589000000 17589875481 5863000000 5863291827 1568032704 1568324531
+17592000000 17592875588 5864000000 5864291862 1569032704 1569324566
+17595000000 17595875754 5865000000 5865291918 1570032704 1570324622
+17598000000 17598474499 5866000000 5866158166 1571032704 1571190870
+17601000000 17601876025 5867000000 5867292008 1572032704 1572324712
+17604000000 17604876137 5868000000 5868292045 1573032704 1573324749
+17607000000 17607876346 5869000000 5869292115 1574032704 1574324819
+17610000000 17610876425 5870000000 5870292141 1575032704 1575324845
+17613000000 17613876650 5871000000 5871292216 1576032704 1576324920
+17616000000 17616876777 5872000000 5872292259 1577032704 1577324963
+17619000000 17619876866 5873000000 5873292288 1578032704 1578324992
+17622000000 17622876972 5874000000 5874292324 1579032704 1579325028
+17625000000 17625877183 5875000000 5875292394 1580032704 1580325098
+17628000000 17628877392 5876000000 5876292464 1581032704 1581325168
+17631000000 17631877537 5877000000 5877292512 1582032704 1582325216
+17634000000 17634877663 5878000000 5878292554 1583032704 1583325258
+17637000000 17637877829 5879000000 5879292609 1584032704 1584325313
+17640000000 17640877909 5880000000 5880292636 1585032704 1585325340
+17643000000 17643878144 5881000000 5881292714 1586032704 1586325418
+17646000000 17646878303 5882000000 5882292767 1587032704 1587325471
+17649000000 17649878424 5883000000 5883292808 1588032704 1588325512
+17652000000 17652878584 5884000000 5884292861 1589032704 1589325565
+17655000000 17655878667 5885000000 5885292889 1590032704 1590325593
+17658000000 17658878913 5886000000 5886292971 1591032704 1591325675
+17661000000 17661879036 5887000000 5887293012 1592032704 1592325716
+17664000000 17664879172 5888000000 5888293057 1593032704 1593325761
+17667000000 17667879347 5889000000 5889293115 1594032704 1594325819
+17670000000 17670879469 5890000000 5890293156 1595032704 1595325860
+17673000000 17673879619 5891000000 5891293206 1596032704 1596325910
+17676000000 17676879767 5892000000 5892293255 1597032704 1597325959
+17679000000 17679053461 5893000000 5893017820 1598032704 1598050524
+17682000000 17682880087 5894000000 5894293362 1599032704 1599326066
+17685000000 17685880219 5895000000 5895293406 1600032704 1600326110
+17688000000 17688880393 5896000000 5896293464 1601032704 1601326168
+17691000000 17691880512 5897000000 5897293504 1602032704 1602326208
+17694000000 17694880636 5898000000 5898293545 1603032704 1603326249
+17697000000 17697880855 5899000000 5899293618 1604032704 1604326322
+17700000000 17700880991 5900000000 5900293663 1605032704 1605326367
+17703000000 17703881142 5901000000 5901293714 1606032704 1606326418
+17706000000 17706881292 5902000000 5902293764 1607032704 1607326468
+17709000000 17709881407 5903000000 5903293802 1608032704 1608326506
+17712000000 17712881504 5904000000 5904293834 1609032704 1609326538
+17715000000 17715881712 5905000000 5905293904 1610032704 1610326608
+17718000000 17718881867 5906000000 5906293955 1611032704 1611326659
+17721000000 17721882026 5907000000 5907294008 1612032704 1612326712
+17724000000 17724882200 5908000000 5908294066 1613032704 1613326770
+17727000000 17727882300 5909000000 5909294100 1614032704 1614326804
+17730000000 17730882478 5910000000 5910294159 1615032704 1615326863
+17733000000 17733882627 5911000000 5911294209 1616032704 1616326913
+17736000000 17736882755 5912000000 5912294251 1617032704 1617326955
+17739000000 17739882924 5913000000 5913294308 1618032704 1618327012
+17742000000 17742883044 5914000000 5914294348 1619032704 1619327052
+17745000000 17744710394 5915000000 5914903464 1620032704 1619936168
+17748000000 17748883294 5916000000 5916294431 1621032704 1621327135
+17751000000 17751883552 5917000000 5917294517 1622032704 1622327221
+17754000000 17754883657 5918000000 5918294552 1623032704 1623327256
+17757000000 17757883737 5919000000 5919294579 1624032704 1624327283
+17760000000 17760883884 5920000000 5920294628 1625032704 1625327332
+17763000000 17763884138 5921000000 5921294712 1626032704 1626327416
+17766000000 17766884228 5922000000 5922294742 1627032704 1627327446
+17769000000 17769884473 5923000000 5923294824 1628032704 1628327528
+17772000000 17772884551 5924000000 5924294850 1629032704 1629327554
+17775000000 17775884728 5925000000 5925294909 1630032704 1630327613
+17778000000 17778884874 5926000000 5926294958 1631032704 1631327662
+17781000000 17781885018 5927000000 5927295006 1632032704 1632327710
+17784000000 17783507672 5928000000 5927835890 1633032704 1632868594
+17787000000 17787885333 5929000000 5929295111 1634032704 1634327815
+17790000000 17790885493 5930000000 5930295164 1635032704 1635327868
+17793000000 17793885630 5931000000 5931295210 1636032704 1636327914
+17796000000 17796885788 5932000000 5932295262 1637032704 1637327966
+17799000000 17799885946 5933000000 5933295315 1638032704 1638328019
+17802000000 17802886060 5934000000 5934295353 1639032704 1639328057
+17805000000 17805886221 5935000000 5935295407 1640032704 1640328111
+17808000000 17808886348 5936000000 5936295449 1641032704 1641328153
+17811000000 17811886457 5937000000 5937295485 1642032704 1642328189
+17814000000 17814886599 5938000000 5938295533 1643032704 1643328237
+17817000000 17817886833 5939000000 5939295611 1644032704 1644328315
+17820000000 17820886746 5940000000 5940295582 1645032704 1645328286
+17823000000 17823886867 5941000000 5941295622 1646032704 1646328326
+17826000000 17826886975 5942000000 5942295658 1647032704 1647328362
+17829000000 17829887210 5943000000 5943295736 1648032704 1648328440
+17832000000 17832887389 5944000000 5944295796 1649032704 1649328500
+17835000000 17835801029 5945000000 5945267009 1650032704 1650299713
+17838000000 17838887658 5946000000 5946295886 1651032704 1651328590
+17841000000 17841887831 5947000000 5947295943 1652032704 1652328647
+17844000000 17844887947 5948000000 5948295982 1653032704 1653328686
+17847000000 17847888120 5949000000 5949296040 1654032704 1654328744
+17850000000 17850888292 5950000000 5950296097 1655032704 1655328801
+17853000000 17853888348 5951000000 5951296116 1656032704 1656328820
+17856000000 17856888494 5952000000 5952296164 1657032704 1657328868
+17859000000 17859888690 5953000000 5953296230 1658032704 1658328934
+17862000000 17862888719 5954000000 5954296239 1659032704 1659328943
+17865000000 17865889025 5955000000 5955296341 1660032704 1660329045
+17868000000 17868889197 5956000000 5956296399 1661032704 1661329103
+17871000000 17871889330 5957000000 5957296443 1662032704 1662329147
+17874000000 17874889447 5958000000 5958296482 1663032704 1663329186
+17877000000 17877889632 5959000000 5959296544 1664032704 1664329248
+17880000000 17880889738 5960000000 5960296579 1665032704 1665329283
+17883000000 17883889919 5961000000 5961296639 1666032704 1666329343
+17886000000 17886890131 5962000000 5962296710 1667032704 1667329414
+17889000000 17889890238 5963000000 5963296746 1668032704 1668329450
+17892000000 17892890404 5964000000 5964296801 1669032704 1669329505
+17895000000 17895489149 5965000000 5965163049 1670032704 1670195753
+17898000000 17898890675 5966000000 5966296891 1671032704 1671329595
+17901000000 17901890787 5967000000 5967296929 1672032704 1672329633
+17904000000 17904890996 5968000000 5968296998 1673032704 1673329702
+17907000000 17907891075 5969000000 5969297025 1674032704 1674329729
+17910000000 17910891300 5970000000 5970297100 1675032704 1675329804
+17913000000 17913891427 5971000000 5971297142 1676032704 1676329846
+17916000000 17916891516 5972000000 5972297172 1677032704 1677329876
+17919000000 17919891622 5973000000 5973297207 1678032704 1678329911
+17922000000 17922891833 5974000000 5974297277 1679032704 1679329981
+17925000000 17925892042 5975000000 5975297347 1680032704 1680330051
+17928000000 17928892187 5976000000 5976297395 1681032704 1681330099
+17931000000 17931892313 5977000000 5977297437 1682032704 1682330141
+17934000000 17934892479 5978000000 5978297493 1683032704 1683330197
+17937000000 17937892559 5979000000 5979297519 1684032704 1684330223
+17940000000 17940892794 5980000000 5980297598 1685032704 1685330302
+17943000000 17943892953 5981000000 5981297651 1686032704 1686330355
+17946000000 17946893074 5982000000 5982297691 1687032704 1687330395
+17949000000 17949893234 5983000000 5983297744 1688032704 1688330448
+17952000000 17952893317 5984000000 5984297772 1689032704 1689330476
+17955000000 17955893563 5985000000 5985297854 1690032704 1690330558
+17958000000 17958893686 5986000000 5986297895 1691032704 1691330599
+17961000000 17961893822 5987000000 5987297940 1692032704 1692330644
+17964000000 17964893997 5988000000 5988297999 1693032704 1693330703
+17967000000 17967894119 5989000000 5989298039 1694032704 1694330743
+17970000000 17970894269 5990000000 5990298089 1695032704 1695330793
+17973000000 17973894417 5991000000 5991298139 1696032704 1696330843
+17976000000 17976068111 5992000000 5992022703 1697032704 1697055407
+17979000000 17979894737 5993000000 5993298245 1698032704 1698330949
+17982000000 17982894869 5994000000 5994298289 1699032704 1699330993
+17985000000 17985895043 5995000000 5995298347 1700032704 1700331051
+17988000000 17988895162 5996000000 5996298387 1701032704 1701331091
+17991000000 17991895286 5997000000 5997298428 1702032704 1702331132
+17994000000 17994895505 5998000000 5998298501 1703032704 1703331205
+17997000000 17997895641 5999000000 5999298547 1704032704 1704331251
+18000000000 18000895792 6000000000 6000298597 1705032704 1705331301
+18003000000 18003895942 6001000000 6001298647 1706032704 1706331351
+18006000000 18006896057 6002000000 6002298685 1707032704 1707331389
+18009000000 18009896154 6003000000 6003298718 1708032704 1708331422
+18012000000 18012896362 6004000000 6004298787 1709032704 1709331491
+18015000000 18015896517 6005000000 6005298839 1710032704 1710331543
+18018000000 18018896676 6006000000 6006298892 1711032704 1711331596
+18021000000 18021896850 6007000000 6007298950 1712032704 1712331654
+18024000000 18024896950 6008000000 6008298983 1713032704 1713331687
+18027000000 18027897128 6009000000 6009299042 1714032704 1714331746
+18030000000 18030897277 6010000000 6010299092 1715032704 1715331796
+18033000000 18033897405 6011000000 6011299135 1716032704 1716331839
+18036000000 18036897574 6012000000 6012299191 1717032704 1717331895
+18039000000 18039897694 6013000000 6013299231 1718032704 1718331935
+18042000000 18041725044 6014000000 6013908348 1719032704 1718941052
+18045000000 18045897944 6015000000 6015299314 1720032704 1720332018
+18048000000 18048898202 6016000000 6016299400 1721032704 1721332104
+18051000000 18051898307 6017000000 6017299435 1722032704 1722332139
+18054000000 18054898387 6018000000 6018299462 1723032704 1723332166
+18057000000 18057898534 6019000000 6019299511 1724032704 1724332215
+18060000000 18060898788 6020000000 6020299596 1725032704 1725332300
+18063000000 18063898878 6021000000 6021299626 1726032704 1726332330
+18066000000 18066899123 6022000000 6022299707 1727032704 1727332411
+18069000000 18069899201 6023000000 6023299733 1728032704 1728332437
+18072000000 18072899378 6024000000 6024299792 1729032704 1729332496
+18075000000 18075899524 6025000000 6025299841 1730032704 1730332545
+18078000000 18078899668 6026000000 6026299889 1731032704 1731332593
+18081000000 18080522322 6027000000 6026840774 1732032704 1731873478
+18084000000 18084899983 6028000000 6028299994 1733032704 1733332698
+18087000000 18087900143 6029000000 6029300047 1734032704 1734332751
+18090000000 18090900280 6030000000 6030300093 1735032704 1735332797
+18093000000 18093900438 6031000000 6031300146 1736032704 1736332850
+18096000000 18096900596 6032000000 6032300198 1737032704 1737332902
+18099000000 18099900710 6033000000 6033300236 1738032704 1738332940
+18102000000 18102900871 6034000000 6034300290 1739032704 1739332994
+18105000000 18105900998 6035000000 6035300332 1740032704 1740333036
+18108000000 18108901107 6036000000 6036300369 1741032704 1741333073
+18111000000 18111901249 6037000000 6037300416 1742032704 1742333120
+18114000000 18114901483 6038000000 6038300494 1743032704 1743333198
+18117000000 18117901396 6039000000 6039300465 1744032704 1744333169
+18120000000 18120901517 6040000000 6040300505 1745032704 1745333209
+18123000000 18123901625 6041000000 6041300541 1746032704 1746333245
+18126000000 18126901860 6042000000 6042300620 1747032704 1747333324
+18129000000 18129902039 6043000000 6043300679 1748032704 1748333383
+18132000000 18132815679 6044000000 6044271893 1749032704 1749304597
+18135000000 18135902308 6045000000 6045300769 1750032704 1750333473
+18138000000 18138902481 6046000000 6046300827 1751032704 1751333531
+18141000000 18141902597 6047000000 6047300865 1752032704 1752333569
+18144000000 18144902770 6048000000 6048300923 1753032704 1753333627
+18147000000 18147902942 6049000000 6049300980 1754032704 1754333684
+18150000000 18150902998 6050000000 6050300999 1755032704 1755333703
+18153000000 18153903144 6051000000 6051301048 1756032704 1756333752
+18156000000 18156903340 6052000000 6052301113 1757032704 1757333817
+18159000000 18159903369 6053000000 6053301123 1758032704 1758333827
+18162000000 18162903675 6054000000 6054301225 1759032704 1759333929
+18165000000 18165903847 6055000000 6055301282 1760032704 1760333986
+18168000000 18168903980 6056000000 6056301326 1761032704 1761334030
+18171000000 18171904097 6057000000 6057301365 1762032704 1762334069
+18174000000 18174904282 6058000000 6058301427 1763032704 1763334131
+18177000000 18177904388 6059000000 6059301462 1764032704 1764334166
+18180000000 18180904569 6060000000 6060301523 1765032704 1765334227
+18183000000 18183904781 6061000000 6061301593 1766032704 1766334297
+18186000000 18186904888 6062000000 6062301629 1767032704 1767334333
+18189000000 18189905054 6063000000 6063301684 1768032704 1768334388
+18192000000 18192503799 6064000000 6064167933 1769032704 1769200637
+18195000000 18195905325 6065000000 6065301775 1770032704 1770334479
+18198000000 18198905437 6066000000 6066301812 1771032704 1771334516
+18201000000 18201905646 6067000000 6067301882 1772032704 1772334586
+18204000000 18204905725 6068000000 6068301908 1773032704 1773334612
+18207000000 18207905950 6069000000 6069301983 1774032704 1774334687
+18210000000 18210906077 6070000000 6070302025 1775032704 1775334729
+18213000000 18213906166 6071000000 6071302055 1776032704 1776334759
+18216000000 18216906272 6072000000 6072302090 1777032704 1777334794
+18219000000 18219906483 6073000000 6073302161 1778032704 1778334865
+18222000000 18222906692 6074000000 6074302230 1779032704 1779334934
+18225000000 18225906837 6075000000 6075302279 1780032704 1780334983
+18228000000 18228906963 6076000000 6076302321 1781032704 1781335025
+18231000000 18231907129 6077000000 6077302376 1782032704 1782335080
+18234000000 18234907209 6078000000 6078302403 1783032704 1783335107
+18237000000 18237907444 6079000000 6079302481 1784032704 1784335185
+18240000000 18240907603 6080000000 6080302534 1785032704 1785335238
+18243000000 18243907724 6081000000 6081302574 1786032704 1786335278
+18246000000 18246907884 6082000000 6082302628 1787032704 1787335332
+18249000000 18249907967 6083000000 6083302655 1788032704 1788335359
+18252000000 18252908213 6084000000 6084302737 1789032704 1789335441
+18255000000 18255908336 6085000000 6085302778 1790032704 1790335482
+18258000000 18258908472 6086000000 6086302824 1791032704 1791335528
+18261000000 18261908647 6087000000 6087302882 1792032704 1792335586
+18264000000 18264908769 6088000000 6088302923 1793032704 1793335627
+18267000000 18267908919 6089000000 6089302973 1794032704 1794335677
+18270000000 18270909067 6090000000 6090303022 1795032704 1795335726
+18273000000 18273082761 6091000000 6091027587 1796032704 1796060291
+18276000000 18276909387 6092000000 6092303129 1797032704 1797335833
+18279000000 18279909519 6093000000 6093303173 1798032704 1798335877
+18282000000 18282909693 6094000000 6094303231 1799032704 1799335935
+18285000000 18285909812 6095000000 6095303270 1800032704 1800335974
+18288000000 18288909936 6096000000 6096303312 1801032704 1801336016
+18291000000 18291910155 6097000000 6097303385 1802032704 1802336089
+18294000000 18294910291 6098000000 6098303430 1803032704 1803336134
+18297000000 18297910442 6099000000 6099303480 1804032704 1804336184
+18300000000 18300910592 6100000000 6100303530 1805032704 1805336234
+18303000000 18303910707 6101000000 6101303569 1806032704 1806336273
+18306000000 18306910804 6102000000 6102303601 1807032704 1807336305
+18309000000 18309911012 6103000000 6103303670 1808032704 1808336374
+18312000000 18312911167 6104000000 6104303722 1809032704 1809336426
+18315000000 18315911326 6105000000 6105303775 1810032704 1810336479
+18318000000 18318911500 6106000000 6106303833 1811032704 1811336537
+18321000000 18321911600 6107000000 6107303866 1812032704 1812336570
+18324000000 18324911778 6108000000 6108303926 1813032704 1813336630
+18327000000 18327911927 6109000000 6109303975 1814032704 1814336679
+18330000000 18330912055 6110000000 6110304018 1815032704 1815336722
+18333000000 18333912224 6111000000 6111304074 1816032704 1816336778
+18336000000 18336912344 6112000000 6112304114 1817032704 1817336818
+18339000000 18338739694 6113000000 6112913231 1818032704 1817945935
+18342000000 18342912594 6114000000 6114304198 1819032704 1819336902
+18345000000 18345912852 6115000000 6115304284 1820032704 1820336988
+18348000000 18348912957 6116000000 6116304319 1821032704 1821337023
+18351000000 18351913037 6117000000 6117304345 1822032704 1822337049
+18354000000 18354913184 6118000000 6118304394 1823032704 1823337098
+18357000000 18357913438 6119000000 6119304479 1824032704 1824337183
+18360000000 18360913528 6120000000 6120304509 1825032704 1825337213
+18363000000 18363913773 6121000000 6121304591 1826032704 1826337295
+18366000000 18366913851 6122000000 6122304617 1827032704 1827337321
+18369000000 18369914028 6123000000 6123304676 1828032704 1828337380
+18372000000 18372914174 6124000000 6124304724 1829032704 1829337428
+18375000000 18375914318 6125000000 6125304772 1830032704 1830337476
+18378000000 18377536972 6126000000 6125845657 1831032704 1830878361
+18381000000 18381914633 6127000000 6127304877 1832032704 1832337581
+18384000000 18384914793 6128000000 6128304931 1833032704 1833337635
+18387000000 18387914930 6129000000 6129304976 1834032704 1834337680
+18390000000 18390915088 6130000000 6130305029 1835032704 1835337733
+18393000000 18393915246 6131000000 6131305082 1836032704 1836337786
+18396000000 18396915360 6132000000 6132305120 1837032704 1837337824
+18399000000 18399915521 6133000000 6133305173 1838032704 1838337877
+18402000000 18402915648 6134000000 6134305216 1839032704 1839337920
+18405000000 18405915757 6135000000 6135305252 1840032704 1840337956
+18408000000 18408915899 6136000000 6136305299 1841032704 1841338003
+18411000000 18411916133 6137000000 6137305377 1842032704 1842338081
+18414000000 18414916046 6138000000 6138305348 1843032704 1843338052
+18417000000 18417916167 6139000000 6139305389 1844032704 1844338093
+18420000000 18420916275 6140000000 6140305425 1845032704 1845338129
+18423000000 18423916510 6141000000 6141305503 1846032704 1846338207
+18426000000 18426916689 6142000000 6142305563 1847032704 1847338267
+18429000000 18429830329 6143000000 6143276776 1848032704 1848309480
+18432000000 18432916958 6144000000 6144305652 1849032704 1849338356
+18435000000 18435917131 6145000000 6145305710 1850032704 1850338414
+18438000000 18438917247 6146000000 6146305749 1851032704 1851338453
+18441000000 18441917420 6147000000 6147305806 1852032704 1852338510
+18444000000 18444917592 6148000000 6148305864 1853032704 1853338568
+18447000000 18447917648 6149000000 6149305882 1854032704 1854338586
+18450000000 18450917794 6150000000 6150305931 1855032704 1855338635
+18453000000 18453917990 6151000000 6151305996 1856032704 1856338700
+18456000000 18456918019 6152000000 6152306006 1857032704 1857338710
+18459000000 18459918325 6153000000 6153306108 1858032704 1858338812
+18462000000 18462918497 6154000000 6154306165 1859032704 1859338869
+18465000000 18465918630 6155000000 6155306210 1860032704 1860338914
+18468000000 18468918747 6156000000 6156306249 1861032704 1861338953
+18471000000 18471918932 6157000000 6157306310 1862032704 1862339014
+18474000000 18474919038 6158000000 6158306346 1863032704 1863339050
+18477000000 18477919219 6159000000 6159306406 1864032704 1864339110
+18480000000 18480919431 6160000000 6160306477 1865032704 1865339181
+18483000000 18483919538 6161000000 6161306512 1866032704 1866339216
+18486000000 18486919704 6162000000 6162306568 1867032704 1867339272
+18489000000 18489518449 6163000000 6163172816 1868032704 1868205520
+18492000000 18492919975 6164000000 6164306658 1869032704 1869339362
+18495000000 18495920087 6165000000 6165306695 1870032704 1870339399
+18498000000 18498920296 6166000000 6166306765 1871032704 1871339469
+18501000000 18501920375 6167000000 6167306791 1872032704 1872339495
+18504000000 18504920600 6168000000 6168306866 1873032704 1873339570
+18507000000 18507920727 6169000000 6169306909 1874032704 1874339613
+18510000000 18510920816 6170000000 6170306938 1875032704 1875339642
+18513000000 18513920922 6171000000 6171306974 1876032704 1876339678
+18516000000 18516921133 6172000000 6172307044 1877032704 1877339748
+18519000000 18519921342 6173000000 6173307114 1878032704 1878339818
+18522000000 18522921487 6174000000 6174307162 1879032704 1879339866
+18525000000 18525921613 6175000000 6175307204 1880032704 1880339908
+18528000000 18528921779 6176000000 6176307259 1881032704 1881339963
+18531000000 18531921859 6177000000 6177307286 1882032704 1882339990
+18534000000 18534922094 6178000000 6178307364 1883032704 1883340068
+18537000000 18537922253 6179000000 6179307417 1884032704 1884340121
+18540000000 18540922374 6180000000 6180307458 1885032704 1885340162
+18543000000 18543922534 6181000000 6181307511 1886032704 1886340215
+18546000000 18546922617 6182000000 6182307539 1887032704 1887340243
+18549000000 18549922863 6183000000 6183307621 1888032704 1888340325
+18552000000 18552922986 6184000000 6184307662 1889032704 1889340366
+18555000000 18555923122 6185000000 6185307707 1890032704 1890340411
+18558000000 18558923297 6186000000 6186307765 1891032704 1891340469
+18561000000 18561923419 6187000000 6187307806 1892032704 1892340510
+18564000000 18564923569 6188000000 6188307856 1893032704 1893340560
+18567000000 18567923717 6189000000 6189307905 1894032704 1894340609
+18570000000 18570097411 6190000000 6190032470 1895032704 1895065174
+18573000000 18573924037 6191000000 6191308012 1896032704 1896340716
+18576000000 18576924169 6192000000 6192308056 1897032704 1897340760
+18579000000 18579924343 6193000000 6193308114 1898032704 1898340818
+18582000000 18582924462 6194000000 6194308154 1899032704 1899340858
+18585000000 18585924586 6195000000 6195308195 1900032704 1900340899
+18588000000 18588924805 6196000000 6196308268 1901032704 1901340972
+18591000000 18591924941 6197000000 6197308313 1902032704 1902341017
+18594000000 18594925092 6198000000 6198308364 1903032704 1903341068
+18597000000 18597925242 6199000000 6199308414 1904032704 1904341118
+18600000000 18600925357 6200000000 6200308452 1905032704 1905341156
+18603000000 18603925454 6201000000 6201308484 1906032704 1906341188
+18606000000 18606925662 6202000000 6202308554 1907032704 1907341258
+18609000000 18609925817 6203000000 6203308605 1908032704 1908341309
+18612000000 18612925976 6204000000 6204308658 1909032704 1909341362
+18615000000 18615926150 6205000000 6205308716 1910032704 1910341420
+18618000000 18618926250 6206000000 6206308750 1911032704 1911341454
+18621000000 18621926428 6207000000 6207308809 1912032704 1912341513
+18624000000 18624926577 6208000000 6208308859 1913032704 1913341563
+18627000000 18627926705 6209000000 6209308901 1914032704 1914341605
+18630000000 18630926874 6210000000 6210308958 1915032704 1915341662
+18633000000 18633926994 6211000000 6211308998 1916032704 1916341702
+18636000000 18635754344 6212000000 6211918114 1917032704 1916950818
+18639000000 18639927244 6213000000 6213309081 1918032704 1918341785
+18642000000 18642927502 6214000000 6214309167 1919032704 1919341871
+18645000000 18645927607 6215000000 6215309202 1920032704 1920341906
+18648000000 18648927687 6216000000 6216309229 1921032704 1921341933
+18651000000 18651927834 6217000000 6217309278 1922032704 1922341982
+18654000000 18654928088 6218000000 6218309362 1923032704 1923342066
+18657000000 18657928178 6219000000 6219309392 1924032704 1924342096
+18660000000 18660928423 6220000000 6220309474 1925032704 1925342178
+18663000000 18663928501 6221000000 6221309500 1926032704 1926342204
+18666000000 18666928678 6222000000 6222309559 1927032704 1927342263
+18669000000 18669928824 6223000000 6223309608 1928032704 1928342312
+18672000000 18672928968 6224000000 6224309656 1929032704 1929342360
+18675000000 18674551622 6225000000 6224850540 1930032704 1929883244
+18678000000 18678929283 6226000000 6226309761 1931032704 1931342465
+18681000000 18681929443 6227000000 6227309814 1932032704 1932342518
+18684000000 18684929580 6228000000 6228309860 1933032704 1933342564
+18687000000 18687929738 6229000000 6229309912 1934032704 1934342616
+18690000000 18690929896 6230000000 6230309965 1935032704 1935342669
+18693000000 18693930010 6231000000 6231310003 1936032704 1936342707
+18696000000 18696930171 6232000000 6232310057 1937032704 1937342761
+18699000000 18699930298 6233000000 6233310099 1938032704 1938342803
+18702000000 18702930407 6234000000 6234310135 1939032704 1939342839
+18705000000 18705930549 6235000000 6235310183 1940032704 1940342887
+18708000000 18708930783 6236000000 6236310261 1941032704 1941342965
+18711000000 18711930696 6237000000 6237310232 1942032704 1942342936
+18714000000 18714930817 6238000000 6238310272 1943032704 1943342976
+18717000000 18717930925 6239000000 6239310308 1944032704 1944343012
+18720000000 18720931160 6240000000 6240310386 1945032704 1945343090
+18723000000 18723931339 6241000000 6241310446 1946032704 1946343150
+18726000000 18726844979 6242000000 6242281659 1947032704 1947314363
+18729000000 18729931608 6243000000 6243310536 1948032704 1948343240
+18732000000 18732931781 6244000000 6244310593 1949032704 1949343297
+18735000000 18735931897 6245000000 6245310632 1950032704 1950343336
+18738000000 18738932070 6246000000 6246310690 1951032704 1951343394
+18741000000 18741932242 6247000000 6247310747 1952032704 1952343451
+18744000000 18744932298 6248000000 6248310766 1953032704 1953343470
+18747000000 18747932444 6249000000 6249310814 1954032704 1954343518
+18750000000 18750932640 6250000000 6250310880 1955032704 1955343584
+18753000000 18753932669 6251000000 6251310889 1956032704 1956343593
+18756000000 18756932975 6252000000 6252310991 1957032704 1957343695
+18759000000 18759933147 6253000000 6253311049 1958032704 1958343753
+18762000000 18762933280 6254000000 6254311093 1959032704 1959343797
+18765000000 18765933397 6255000000 6255311132 1960032704 1960343836
+18768000000 18768933582 6256000000 6256311194 1961032704 1961343898
+18771000000 18771933688 6257000000 6257311229 1962032704 1962343933
+18774000000 18774933869 6258000000 6258311289 1963032704 1963343993
+18777000000 18777934081 6259000000 6259311360 1964032704 1964344064
+18780000000 18780934188 6260000000 6260311396 1965032704 1965344100
+18783000000 18783934354 6261000000 6261311451 1966032704 1966344155
+18786000000 18786533099 6262000000 6262177699 1967032704 1967210403
+18789000000 18789934625 6263000000 6263311541 1968032704 1968344245
+18792000000 18792934737 6264000000 6264311579 1969032704 1969344283
+18795000000 18795934946 6265000000 6265311648 1970032704 1970344352
+18798000000 18798935025 6266000000 6266311675 1971032704 1971344379
+18801000000 18801935250 6267000000 6267311750 1972032704 1972344454
+18804000000 18804935377 6268000000 6268311792 1973032704 1973344496
+18807000000 18807935466 6269000000 6269311822 1974032704 1974344526
+18810000000 18810935572 6270000000 6270311857 1975032704 1975344561
+18813000000 18813935783 6271000000 6271311927 1976032704 1976344631
+18816000000 18816935992 6272000000 6272311997 1977032704 1977344701
+18819000000 18819936137 6273000000 6273312045 1978032704 1978344749
+18822000000 18822936263 6274000000 6274312087 1979032704 1979344791
+18825000000 18825936429 6275000000 6275312143 1980032704 1980344847
+18828000000 18828936509 6276000000 6276312169 1981032704 1981344873
+18831000000 18831936744 6277000000 6277312248 1982032704 1982344952
+18834000000 18834936903 6278000000 6278312301 1983032704 1983345005
+18837000000 18837937024 6279000000 6279312341 1984032704 1984345045
+18840000000 18840937184 6280000000 6280312394 1985032704 1985345098
+18843000000 18843937267 6281000000 6281312422 1986032704 1986345126
+18846000000 18846937513 6282000000 6282312504 1987032704 1987345208
+18849000000 18849937636 6283000000 6283312545 1988032704 1988345249
+18852000000 18852937772 6284000000 6284312590 1989032704 1989345294
+18855000000 18855937947 6285000000 6285312649 1990032704 1990345353
+18858000000 18858938069 6286000000 6286312689 1991032704 1991345393
+18861000000 18861938219 6287000000 6287312739 1992032704 1992345443
+18864000000 18864938367 6288000000 6288312789 1993032704 1993345493
+18867000000 18867112061 6289000000 6289037353 1994032704 1994070057
+18870000000 18870938687 6290000000 6290312895 1995032704 1995345599
+18873000000 18873938819 6291000000 6291312939 1996032704 1996345643
+18876000000 18876938993 6292000000 6292312997 1997032704 1997345701
+18879000000 18879939112 6293000000 6293313037 1998032704 1998345741
+18882000000 18882939236 6294000000 6294313078 1999032704 1999345782
+18885000000 18885939455 6295000000 6295313151 2000032704 2000345855
+18888000000 18888939591 6296000000 6296313197 2001032704 2001345901
+18891000000 18891939742 6297000000 6297313247 2002032704 2002345951
+18894000000 18894939892 6298000000 6298313297 2003032704 2003346001
+18897000000 18897940007 6299000000 6299313335 2004032704 2004346039
+18900000000 18900940104 6300000000 6300313368 2005032704 2005346072
+18903000000 18903940312 6301000000 6301313437 2006032704 2006346141
+18906000000 18906940467 6302000000 6302313489 2007032704 2007346193
+18909000000 18909940626 6303000000 6303313542 2008032704 2008346246
+18912000000 18912940800 6304000000 6304313600 2009032704 2009346304
+18915000000 18915940900 6305000000 6305313633 2010032704 2010346337
+18918000000 18918941078 6306000000 6306313692 2011032704 2011346396
+18921000000 18921941227 6307000000 6307313742 2012032704 2012346446
+18924000000 18924941355 6308000000 6308313785 2013032704 2013346489
+18927000000 18927941524 6309000000 6309313841 2014032704 2014346545
+18930000000 18930941644 6310000000 6310313881 2015032704 2015346585
+18933000000 18932768994 6311000000 6310922998 2016032704 2015955702
+18936000000 18936941894 6312000000 6312313964 2017032704 2017346668
+18939000000 18939942152 6313000000 6313314050 2018032704 2018346754
+18942000000 18942942257 6314000000 6314314085 2019032704 2019346789
+18945000000 18945942337 6315000000 6315314112 2020032704 2020346816
+18948000000 18948942484 6316000000 6316314161 2021032704 2021346865
+18951000000 18951942738 6317000000 6317314246 2022032704 2022346950
+18954000000 18954942828 6318000000 6318314276 2023032704 2023346980
+18957000000 18957943073 6319000000 6319314357 2024032704 2024347061
+18960000000 18960943151 6320000000 6320314383 2025032704 2025347087
+18963000000 18963943328 6321000000 6321314442 2026032704 2026347146
+18966000000 18966943474 6322000000 6322314491 2027032704 2027347195
+18969000000 18969943618 6323000000 6323314539 2028032704 2028347243
+18972000000 18971566272 6324000000 6323855424 2029032704 2028888128
+18975000000 18975943933 6325000000 6325314644 2030032704 2030347348
+18978000000 18978944093 6326000000 6326314697 2031032704 2031347401
+18981000000 18981944230 6327000000 6327314743 2032032704 2032347447
+18984000000 18984944388 6328000000 6328314796 2033032704 2033347500
+18987000000 18987944546 6329000000 6329314848 2034032704 2034347552
+18990000000 18990944660 6330000000 6330314886 2035032704 2035347590
+18993000000 18993944821 6331000000 6331314940 2036032704 2036347644
+18996000000 18996944948 6332000000 6332314982 2037032704 2037347686
+18999000000 18999945057 6333000000 6333315019 2038032704 2038347723
+19002000000 19002945199 6334000000 6334315066 2039032704 2039347770
+19005000000 19005945433 6335000000 6335315144 2040032704 2040347848
+19008000000 19008945346 6336000000 6336315115 2041032704 2041347819
+19011000000 19011945467 6337000000 6337315155 2042032704 2042347859
+19014000000 19014945575 6338000000 6338315191 2043032704 2043347895
+19017000000 19017945810 6339000000 6339315270 2044032704 2044347974
+19020000000 19020945989 6340000000 6340315329 2045032704 2045348033
+19023000000 19023859629 6341000000 6341286543 2046032704 2046319247
+19026000000 19026946258 6342000000 6342315419 2047032704 2047348123
+19029000000 19029946431 6343000000 6343315477 2048032704 2048348181
+19032000000 19032946547 6344000000 6344315515 2049032704 2049348219
+19035000000 19035946720 6345000000 6345315573 2050032704 2050348277
+19038000000 19038946892 6346000000 6346315630 2051032704 2051348334
+19041000000 19041946948 6347000000 6347315649 2052032704 2052348353
+19044000000 19044947094 6348000000 6348315698 2053032704 2053348402
+19047000000 19047947290 6349000000 6349315763 2054032704 2054348467
+19050000000 19050947319 6350000000 6350315773 2055032704 2055348477
+19053000000 19053947625 6351000000 6351315875 2056032704 2056348579
+19056000000 19056947797 6352000000 6352315932 2057032704 2057348636
+19059000000 19059947930 6353000000 6353315976 2058032704 2058348680
+19062000000 19062948047 6354000000 6354316015 2059032704 2059348719
+19065000000 19065948232 6355000000 6355316077 2060032704 2060348781
+19068000000 19068948338 6356000000 6356316112 2061032704 2061348816
+19071000000 19071948519 6357000000 6357316173 2062032704 2062348877
+19074000000 19074948731 6358000000 6358316243 2063032704 2063348947
+19077000000 19077948838 6359000000 6359316279 2064032704 2064348983
+19080000000 19080949004 6360000000 6360316334 2065032704 2065349038
+19083000000 19083547749 6361000000 6361182583 2066032704 2066215287
+19086000000 19086949275 6362000000 6362316425 2067032704 2067349129
+19089000000 19089949387 6363000000 6363316462 2068032704 2068349166
+19092000000 19092949596 6364000000 6364316532 2069032704 2069349236
+19095000000 19095949675 6365000000 6365316558 2070032704 2070349262
+19098000000 19098949900 6366000000 6366316633 2071032704 2071349337
+19101000000 19101950027 6367000000 6367316675 2072032704 2072349379
+19104000000 19104950116 6368000000 6368316705 2073032704 2073349409
+19107000000 19107950222 6369000000 6369316740 2074032704 2074349444
+19110000000 19110950433 6370000000 6370316811 2075032704 2075349515
+19113000000 19113950642 6371000000 6371316880 2076032704 2076349584
+19116000000 19116950787 6372000000 6372316929 2077032704 2077349633
+19119000000 19119950913 6373000000 6373316971 2078032704 2078349675
+19122000000 19122951079 6374000000 6374317026 2079032704 2079349730
+19125000000 19125951159 6375000000 6375317053 2080032704 2080349757
+19128000000 19128951394 6376000000 6376317131 2081032704 2081349835
+19131000000 19131951553 6377000000 6377317184 2082032704 2082349888
+19134000000 19134951674 6378000000 6378317224 2083032704 2083349928
+19137000000 19137951834 6379000000 6379317278 2084032704 2084349982
+19140000000 19140951917 6380000000 6380317305 2085032704 2085350009
+19143000000 19143952163 6381000000 6381317387 2086032704 2086350091
+19146000000 19146952286 6382000000 6382317428 2087032704 2087350132
+19149000000 19149952422 6383000000 6383317474 2088032704 2088350178
+19152000000 19152952597 6384000000 6384317532 2089032704 2089350236
+19155000000 19155952719 6385000000 6385317573 2090032704 2090350277
+19158000000 19158952869 6386000000 6386317623 2091032704 2091350327
+19161000000 19161953017 6387000000 6387317672 2092032704 2092350376
+19164000000 19164126711 6388000000 6388042237 2093032704 2093074941
+19167000000 19167953337 6389000000 6389317779 2094032704 2094350483
+19170000000 19170953469 6390000000 6390317823 2095032704 2095350527
+19173000000 19173953643 6391000000 6391317881 2096032704 2096350585
+19176000000 19176953762 6392000000 6392317920 2097032704 2097350624
+19179000000 19179953886 6393000000 6393317962 2098032704 2098350666
+19182000000 19182954105 6394000000 6394318035 2099032704 2099350739
+19185000000 19185954241 6395000000 6395318080 2100032704 2100350784
+19188000000 19188954392 6396000000 6396318130 2101032704 2101350834
+19191000000 19191954542 6397000000 6397318180 2102032704 2102350884
+19194000000 19194954657 6398000000 6398318219 2103032704 2103350923
+19197000000 19197954754 6399000000 6399318251 2104032704 2104350955
+19200000000 19200954962 6400000000 6400318320 2105032704 2105351024
+19203000000 19203955117 6401000000 6401318372 2106032704 2106351076
+19206000000 19206955276 6402000000 6402318425 2107032704 2107351129
+19209000000 19209955450 6403000000 6403318483 2108032704 2108351187
+19212000000 19212955550 6404000000 6404318516 2109032704 2109351220
+19215000000 19215955728 6405000000 6405318576 2110032704 2110351280
+19218000000 19218955877 6406000000 6406318625 2111032704 2111351329
+19221000000 19221956005 6407000000 6407318668 2112032704 2112351372
+19224000000 19224956174 6408000000 6408318724 2113032704 2113351428
+19227000000 19227956294 6409000000 6409318764 2114032704 2114351468
+19230000000 19229783644 6410000000 6409927881 2115032704 2114960585
+19233000000 19233956544 6411000000 6411318848 2116032704 2116351552
+19236000000 19236956802 6412000000 6412318934 2117032704 2117351638
+19239000000 19239956907 6413000000 6413318969 2118032704 2118351673
+19242000000 19242956987 6414000000 6414318995 2119032704 2119351699
+19245000000 19245957134 6415000000 6415319044 2120032704 2120351748
+19248000000 19248957388 6416000000 6416319129 2121032704 2121351833
+19251000000 19251957478 6417000000 6417319159 2122032704 2122351863
+19254000000 19254957723 6418000000 6418319241 2123032704 2123351945
+19257000000 19257957801 6419000000 6419319267 2124032704 2124351971
+19260000000 19260957978 6420000000 6420319326 2125032704 2125352030
+19263000000 19263958124 6421000000 6421319374 2126032704 2126352078
+19266000000 19266958268 6422000000 6422319422 2127032704 2127352126
+19269000000 19268580922 6423000000 6422860307 2128032704 2127893011
+19272000000 19272958583 6424000000 6424319527 2129032704 2129352231
+19275000000 19275958743 6425000000 6425319581 2130032704 2130352285
+19278000000 19278958880 6426000000 6426319626 2131032704 2131352330
+19281000000 19281959038 6427000000 6427319679 2132032704 2132352383
+19284000000 19284959196 6428000000 6428319732 2133032704 2133352436
+19287000000 19287959310 6429000000 6429319770 2134032704 2134352474
+19290000000 19290959471 6430000000 6430319823 2135032704 2135352527
+19293000000 19293959598 6431000000 6431319866 2136032704 2136352570
+19296000000 19296959707 6432000000 6432319902 2137032704 2137352606
+19299000000 19299959849 6433000000 6433319949 2138032704 2138352653
+19302000000 19302960083 6434000000 6434320027 2139032704 2139352731
+19305000000 19305959996 6435000000 6435319998 2140032704 2140352702
+19308000000 19308960117 6436000000 6436320039 2141032704 2141352743
+19311000000 19311960225 6437000000 6437320075 2142032704 2142352779
+19314000000 19314960460 6438000000 6438320153 2143032704 2143352857
+19317000000 19317960639 6439000000 6439320213 2144032704 2144352917
+19320000000 19320874279 6440000000 6440291426 2145032704 2145324130
+19323000000 19323960908 6441000000 6441320302 2146032704 2146353006
+19326000000 19326961081 6442000000 6442320360 2147032704 2147353064
+19329000000 19329961197 6443000000 6443320399 2148032704 2148353103
+19332000000 19332961370 6444000000 6444320456 2149032704 2149353160
+19335000000 19335961542 6445000000 6445320514 2150032704 2150353218
+19338000000 19338961598 6446000000 6446320532 2151032704 2151353236
+19341000000 19341961744 6447000000 6447320581 2152032704 2152353285
+19344000000 19344961940 6448000000 6448320646 2153032704 2153353350
+19347000000 19347961969 6449000000 6449320656 2154032704 2154353360
+19350000000 19350962275 6450000000 6450320758 2155032704 2155353462
+19353000000 19353962447 6451000000 6451320815 2156032704 2156353519
+19356000000 19356962580 6452000000 6452320860 2157032704 2157353564
+19359000000 19359962697 6453000000 6453320899 2158032704 2158353603
+19362000000 19362962882 6454000000 6454320960 2159032704 2159353664
+19365000000 19365962988 6455000000 6455320996 2160032704 2160353700
+19368000000 19368963169 6456000000 6456321056 2161032704 2161353760
+19371000000 19371963381 6457000000 6457321127 2162032704 2162353831
+19374000000 19374963488 6458000000 6458321162 2163032704 2163353866
+19377000000 19377963654 6459000000 6459321218 2164032704 2164353922
+19380000000 19380562399 6460000000 6460187466 2165032704 2165220170
+19383000000 19383963925 6461000000 6461321308 2166032704 2166354012
+19386000000 19386964037 6462000000 6462321345 2167032704 2167354049
+19389000000 19389964246 6463000000 6463321415 2168032704 2168354119
+19392000000 19392964325 6464000000 6464321441 2169032704 2169354145
+19395000000 19395964550 6465000000 6465321516 2170032704 2170354220
+19398000000 19398964677 6466000000 6466321559 2171032704 2171354263
+19401000000 19401964766 6467000000 6467321588 2172032704 2172354292
+19404000000 19404964872 6468000000 6468321624 2173032704 2173354328
+19407000000 19407965083 6469000000 6469321694 2174032704 2174354398
+19410000000 19410965292 6470000000 6470321764 2175032704 2175354468
+19413000000 19413965437 6471000000 6471321812 2176032704 2176354516
+19416000000 19416965563 6472000000 6472321854 2177032704 2177354558
+19419000000 19419965729 6473000000 6473321909 2178032704 2178354613
+19422000000 19422965809 6474000000 6474321936 2179032704 2179354640
+19425000000 19425966044 6475000000 6475322014 2180032704 2180354718
+19428000000 19428966203 6476000000 6476322067 2181032704 2181354771
+19431000000 19431966324 6477000000 6477322108 2182032704 2182354812
+19434000000 19434966484 6478000000 6478322161 2183032704 2183354865
+19437000000 19437966567 6479000000 6479322189 2184032704 2184354893
+19440000000 19440966813 6480000000 6480322271 2185032704 2185354975
+19443000000 19443966936 6481000000 6481322312 2186032704 2186355016
+19446000000 19446967072 6482000000 6482322357 2187032704 2187355061
+19449000000 19449967247 6483000000 6483322415 2188032704 2188355119
+19452000000 19452967369 6484000000 6484322456 2189032704 2189355160
+19455000000 19455967519 6485000000 6485322506 2190032704 2190355210
+19458000000 19458967667 6486000000 6486322555 2191032704 2191355259
+19461000000 19461141361 6487000000 6487047120 2192032704 2192079824
+19464000000 19464967987 6488000000 6488322662 2193032704 2193355366
+19467000000 19467968119 6489000000 6489322706 2194032704 2194355410
+19470000000 19470968293 6490000000 6490322764 2195032704 2195355468
+19473000000 19473968412 6491000000 6491322804 2196032704 2196355508
+19476000000 19476968536 6492000000 6492322845 2197032704 2197355549
+19479000000 19479968755 6493000000 6493322918 2198032704 2198355622
+19482000000 19482968891 6494000000 6494322963 2199032704 2199355667
+19485000000 19485969042 6495000000 6495323014 2200032704 2200355718
+19488000000 19488969192 6496000000 6496323064 2201032704 2201355768
+19491000000 19491969307 6497000000 6497323102 2202032704 2202355806
+19494000000 19494969404 6498000000 6498323134 2203032704 2203355838
+19497000000 19497969612 6499000000 6499323204 2204032704 2204355908
+19500000000 19500969767 6500000000 6500323255 2205032704 2205355959
+19503000000 19503969926 6501000000 6501323308 2206032704 2206356012
+19506000000 19506970100 6502000000 6502323366 2207032704 2207356070
+19509000000 19509970200 6503000000 6503323400 2208032704 2208356104
+19512000000 19512970378 6504000000 6504323459 2209032704 2209356163
+19515000000 19515970527 6505000000 6505323509 2210032704 2210356213
+19518000000 19518970655 6506000000 6506323551 2211032704 2211356255
+19521000000 19521970824 6507000000 6507323608 2212032704 2212356312
+19524000000 19524970944 6508000000 6508323648 2213032704 2213356352
+19527000000 19526798294 6509000000 6508932764 2214032704 2213965468
+19530000000 19530971194 6510000000 6510323731 2215032704 2215356435
+19533000000 19533971452 6511000000 6511323817 2216032704 2216356521
+19536000000 19536971557 6512000000 6512323852 2217032704 2217356556
+19539000000 19539971637 6513000000 6513323879 2218032704 2218356583
+19542000000 19542971784 6514000000 6514323928 2219032704 2219356632
+19545000000 19545972038 6515000000 6515324012 2220032704 2220356716
+19548000000 19548972128 6516000000 6516324042 2221032704 2221356746
+19551000000 19551972373 6517000000 6517324124 2222032704 2222356828
+19554000000 19554972451 6518000000 6518324150 2223032704 2223356854
+19557000000 19557972628 6519000000 6519324209 2224032704 2224356913
+19560000000 19560972774 6520000000 6520324258 2225032704 2225356962
+19563000000 19563972918 6521000000 6521324306 2226032704 2226357010
+19566000000 19565595572 6522000000 6521865190 2227032704 2226897894
+19569000000 19569973233 6523000000 6523324411 2228032704 2228357115
+19572000000 19572973393 6524000000 6524324464 2229032704 2229357168
+19575000000 19575973530 6525000000 6525324510 2230032704 2230357214
+19578000000 19578973688 6526000000 6526324562 2231032704 2231357266
+19581000000 19581973846 6527000000 6527324615 2232032704 2232357319
+19584000000 19584973960 6528000000 6528324653 2233032704 2233357357
+19587000000 19587974121 6529000000 6529324707 2234032704 2234357411
+19590000000 19590974248 6530000000 6530324749 2235032704 2235357453
+19593000000 19593974357 6531000000 6531324785 2236032704 2236357489
+19596000000 19596974499 6532000000 6532324833 2237032704 2237357537
+19599000000 19599974733 6533000000 6533324911 2238032704 2238357615
+19602000000 19602974646 6534000000 6534324882 2239032704 2239357586
+19605000000 19605974767 6535000000 6535324922 2240032704 2240357626
+19608000000 19608974875 6536000000 6536324958 2241032704 2241357662
+19611000000 19611975110 6537000000 6537325036 2242032704 2242357740
+19614000000 19614975289 6538000000 6538325096 2243032704 2243357800
+19617000000 19617888929 6539000000 6539296309 2244032704 2244329013
+19620000000 19620975558 6540000000 6540325186 2245032704 2245357890
+19623000000 19623975731 6541000000 6541325243 2246032704 2246357947
+19626000000 19626975847 6542000000 6542325282 2247032704 2247357986
+19629000000 19629976020 6543000000 6543325340 2248032704 2248358044
+19632000000 19632976192 6544000000 6544325397 2249032704 2249358101
+19635000000 19635976248 6545000000 6545325416 2250032704 2250358120
+19638000000 19638976394 6546000000 6546325464 2251032704 2251358168
+19641000000 19641976590 6547000000 6547325530 2252032704 2252358234
+19644000000 19644976619 6548000000 6548325539 2253032704 2253358243
+19647000000 19647976925 6549000000 6549325641 2254032704 2254358345
+19650000000 19650977097 6550000000 6550325699 2255032704 2255358403
+19653000000 19653977230 6551000000 6551325743 2256032704 2256358447
+19656000000 19656977347 6552000000 6552325782 2257032704 2257358486
+19659000000 19659977532 6553000000 6553325844 2258032704 2258358548
+19662000000 19662977638 6554000000 6554325879 2259032704 2259358583
+19665000000 19665977819 6555000000 6555325939 2260032704 2260358643
+19668000000 19668978031 6556000000 6556326010 2261032704 2261358714
+19671000000 19671978138 6557000000 6557326046 2262032704 2262358750
+19674000000 19674978304 6558000000 6558326101 2263032704 2263358805
+19677000000 19677577049 6559000000 6559192349 2264032704 2264225053
+19680000000 19680978575 6560000000 6560326191 2265032704 2265358895
+19683000000 19683978687 6561000000 6561326229 2266032704 2266358933
+19686000000 19686978896 6562000000 6562326298 2267032704 2267359002
+19689000000 19689978975 6563000000 6563326325 2268032704 2268359029
+19692000000 19692979200 6564000000 6564326400 2269032704 2269359104
+19695000000 19695979327 6565000000 6565326442 2270032704 2270359146
+19698000000 19698979416 6566000000 6566326472 2271032704 2271359176
+19701000000 19701979522 6567000000 6567326507 2272032704 2272359211
+19704000000 19704979733 6568000000 6568326577 2273032704 2273359281
+19707000000 19707979942 6569000000 6569326647 2274032704 2274359351
+19710000000 19710980087 6570000000 6570326695 2275032704 2275359399
+19713000000 19713980213 6571000000 6571326737 2276032704 2276359441
+19716000000 19716980379 6572000000 6572326793 2277032704 2277359497
+19719000000 19719980459 6573000000 6573326819 2278032704 2278359523
+19722000000 19722980694 6574000000 6574326898 2279032704 2279359602
+19725000000 19725980853 6575000000 6575326951 2280032704 2280359655
+19728000000 19728980974 6576000000 6576326991 2281032704 2281359695
+19731000000 19731981134 6577000000 6577327044 2282032704 2282359748
+19734000000 19734981217 6578000000 6578327072 2283032704 2283359776
+19737000000 19737981463 6579000000 6579327154 2284032704 2284359858
+19740000000 19740981586 6580000000 6580327195 2285032704 2285359899
+19743000000 19743981722 6581000000 6581327240 2286032704 2286359944
+19746000000 19746981897 6582000000 6582327299 2287032704 2287360003
+19749000000 19749982019 6583000000 6583327339 2288032704 2288360043
+19752000000 19752982169 6584000000 6584327389 2289032704 2289360093
+19755000000 19755982317 6585000000 6585327439 2290032704 2290360143
+19758000000 19758156011 6586000000 6586052003 2291032704 2291084707
+19761000000 19761982637 6587000000 6587327545 2292032704 2292360249
+19764000000 19764982769 6588000000 6588327589 2293032704 2293360293
+19767000000 19767982943 6589000000 6589327647 2294032704 2294360351
+19770000000 19770983062 6590000000 6590327687 2295032704 2295360391
+19773000000 19773983186 6591000000 6591327728 2296032704 2296360432
+19776000000 19776983405 6592000000 6592327801 2297032704 2297360505
+19779000000 19779983541 6593000000 6593327847 2298032704 2298360551
+19782000000 19782983692 6594000000 6594327897 2299032704 2299360601
+19785000000 19785983842 6595000000 6595327947 2300032704 2300360651
+19788000000 19788983957 6596000000 6596327985 2301032704 2301360689
+19791000000 19791984054 6597000000 6597328018 2302032704 2302360722
+19794000000 19794984262 6598000000 6598328087 2303032704 2303360791
+19797000000 19797984417 6599000000 6599328139 2304032704 2304360843
+19800000000 19800984576 6600000000 6600328192 2305032704 2305360896
+19803000000 19803984750 6601000000 6601328250 2306032704 2306360954
+19806000000 19806984850 6602000000 6602328283 2307032704 2307360987
+19809000000 19809985028 6603000000 6603328342 2308032704 2308361046
+19812000000 19812985177 6604000000 6604328392 2309032704 2309361096
+19815000000 19815985305 6605000000 6605328435 2310032704 2310361139
+19818000000 19818985474 6606000000 6606328491 2311032704 2311361195
+19821000000 19821985594 6607000000 6607328531 2312032704 2312361235
+19824000000 19823812944 6608000000 6607937648 2313032704 2312970352
+19827000000 19827985844 6609000000 6609328614 2314032704 2314361318
+19830000000 19830986102 6610000000 6610328700 2315032704 2315361404
+19833000000 19833986207 6611000000 6611328735 2316032704 2316361439
+19836000000 19836986287 6612000000 6612328762 2317032704 2317361466
+19839000000 19839986434 6613000000 6613328811 2318032704 2318361515
+19842000000 19842986688 6614000000 6614328896 2319032704 2319361600
+19845000000 19845986778 6615000000 6615328926 2320032704 2320361630
+19848000000 19848987023 6616000000 6616329007 2321032704 2321361711
+19851000000 19851987101 6617000000 6617329033 2322032704 2322361737
+19854000000 19854987278 6618000000 6618329092 2323032704 2323361796
+19857000000 19857987424 6619000000 6619329141 2324032704 2324361845
+19860000000 19860987568 6620000000 6620329189 2325032704 2325361893
+19863000000 19862610222 6621000000 6620870074 2326032704 2325902778
+19866000000 19866987883 6622000000 6622329294 2327032704 2327361998
+19869000000 19869988043 6623000000 6623329347 2328032704 2328362051
+19872000000 19872988180 6624000000 6624329393 2329032704 2329362097
+19875000000 19875988338 6625000000 6625329446 2330032704 2330362150
+19878000000 19878988496 6626000000 6626329498 2331032704 2331362202
+19881000000 19881988610 6627000000 6627329536 2332032704 2332362240
+19884000000 19884988771 6628000000 6628329590 2333032704 2333362294
+19887000000 19887988898 6629000000 6629329632 2334032704 2334362336
+19890000000 19890989007 6630000000 6630329669 2335032704 2335362373
+19893000000 19893989149 6631000000 6631329716 2336032704 2336362420
+19896000000 19896989383 6632000000 6632329794 2337032704 2337362498
+19899000000 19899989296 6633000000 6633329765 2338032704 2338362469
+19902000000 19902989417 6634000000 6634329805 2339032704 2339362509
+19905000000 19905989525 6635000000 6635329841 2340032704 2340362545
+19908000000 19908989760 6636000000 6636329920 2341032704 2341362624
+19911000000 19911989939 6637000000 6637329979 2342032704 2342362683
+19914000000 19914903579 6638000000 6638301193 2343032704 2343333897
+19917000000 19917990208 6639000000 6639330069 2344032704 2344362773
+19920000000 19920990381 6640000000 6640330127 2345032704 2345362831
+19923000000 19923990497 6641000000 6641330165 2346032704 2346362869
+19926000000 19926990670 6642000000 6642330223 2347032704 2347362927
+19929000000 19929990842 6643000000 6643330280 2348032704 2348362984
+19932000000 19932990898 6644000000 6644330299 2349032704 2349363003
+19935000000 19935991044 6645000000 6645330348 2350032704 2350363052
+19938000000 19938991240 6646000000 6646330413 2351032704 2351363117
+19941000000 19941991269 6647000000 6647330423 2352032704 2352363127
+19944000000 19944991575 6648000000 6648330525 2353032704 2353363229
+19947000000 19947991747 6649000000 6649330582 2354032704 2354363286
+19950000000 19950991880 6650000000 6650330626 2355032704 2355363330
+19953000000 19953991997 6651000000 6651330665 2356032704 2356363369
+19956000000 19956992182 6652000000 6652330727 2357032704 2357363431
+19959000000 19959992288 6653000000 6653330762 2358032704 2358363466
+19962000000 19962992469 6654000000 6654330823 2359032704 2359363527
+19965000000 19965992681 6655000000 6655330893 2360032704 2360363597
+19968000000 19968992788 6656000000 6656330929 2361032704 2361363633
+19971000000 19971992954 6657000000 6657330984 2362032704 2362363688
+19974000000 19974591699 6658000000 6658197233 2363032704 2363229937
+19977000000 19977993225 6659000000 6659331075 2364032704 2364363779
+19980000000 19980993337 6660000000 6660331112 2365032704 2365363816
+19983000000 19983993546 6661000000 6661331182 2366032704 2366363886
+19986000000 19986993625 6662000000 6662331208 2367032704 2367363912
+19989000000 19989993850 6663000000 6663331283 2368032704 2368363987
+19992000000 19992993977 6664000000 6664331325 2369032704 2369364029
+19995000000 19995994066 6665000000 6665331355 2370032704 2370364059
+19998000000 19998994172 6666000000 6666331390 2371032704 2371364094
+20001000000 20001994383 6667000000 6667331461 2372032704 2372364165
+20004000000 20004994592 6668000000 6668331530 2373032704 2373364234
+20007000000 20007994737 6669000000 6669331579 2374032704 2374364283
+20010000000 20010994863 6670000000 6670331621 2375032704 2375364325
+20013000000 20013995029 6671000000 6671331676 2376032704 2376364380
+20016000000 20016995109 6672000000 6672331703 2377032704 2377364407
+20019000000 20019995344 6673000000 6673331781 2378032704 2378364485
+20022000000 20022995503 6674000000 6674331834 2379032704 2379364538
+20025000000 20025995624 6675000000 6675331874 2380032704 2380364578
+20028000000 20028995784 6676000000 6676331928 2381032704 2381364632
+20031000000 20031995867 6677000000 6677331955 2382032704 2382364659
+20034000000 20034996113 6678000000 6678332037 2383032704 2383364741
+20037000000 20037996236 6679000000 6679332078 2384032704 2384364782
+20040000000 20040996372 6680000000 6680332124 2385032704 2385364828
+20043000000 20043996547 6681000000 6681332182 2386032704 2386364886
+20046000000 20046996669 6682000000 6682332223 2387032704 2387364927
+20049000000 20049996819 6683000000 6683332273 2388032704 2388364977
+20052000000 20052996967 6684000000 6684332322 2389032704 2389365026
+20055000000 20055170661 6685000000 6685056887 2390032704 2390089591
+20058000000 20058997287 6686000000 6686332429 2391032704 2391365133
+20061000000 20061997419 6687000000 6687332473 2392032704 2392365177
+20064000000 20064997593 6688000000 6688332531 2393032704 2393365235
+20067000000 20067997712 6689000000 6689332570 2394032704 2394365274
+20070000000 20070997836 6690000000 6690332612 2395032704 2395365316
+20073000000 20073998055 6691000000 6691332685 2396032704 2396365389
+20076000000 20076998191 6692000000 6692332730 2397032704 2397365434
+20079000000 20079998342 6693000000 6693332780 2398032704 2398365484
+20082000000 20082998492 6694000000 6694332830 2399032704 2399365534
+20085000000 20085998607 6695000000 6695332869 2400032704 2400365573
+20088000000 20088998704 6696000000 6696332901 2401032704 2401365605
+20091000000 20091998912 6697000000 6697332970 2402032704 2402365674
+20094000000 20094999067 6698000000 6698333022 2403032704 2403365726
+20097000000 20097999226 6699000000 6699333075 2404032704 2404365779
+20100000000 20100999400 6700000000 6700333133 2405032704 2405365837
+20103000000 20103999500 6701000000 6701333166 2406032704 2406365870
+20106000000 20106999678 6702000000 6702333226 2407032704 2407365930
+20109000000 20109999827 6703000000 6703333275 2408032704 2408365979
+20112000000 20112999955 6704000000 6704333318 2409032704 2409366022
+20115000000 20116000124 6705000000 6705333374 2410032704 2410366078
+20118000000 20119000244 6706000000 6706333414 2411032704 2411366118
+20121000000 20120827594 6707000000 6706942531 2412032704 2411975235
+20124000000 20125000494 6708000000 6708333498 2413032704 2413366202
+20127000000 20128000752 6709000000 6709333584 2414032704 2414366288
+20130000000 20131000857 6710000000 6710333619 2415032704 2415366323
+20133000000 20134000937 6711000000 6711333645 2416032704 2416366349
+20136000000 20137001084 6712000000 6712333694 2417032704 2417366398
+20139000000 20140001338 6713000000 6713333779 2418032704 2418366483
+20142000000 20143001428 6714000000 6714333809 2419032704 2419366513
+20145000000 20146001673 6715000000 6715333891 2420032704 2420366595
+20148000000 20149001751 6716000000 6716333917 2421032704 2421366621
+20151000000 20152001928 6717000000 6717333976 2422032704 2422366680
+20154000000 20155002074 6718000000 6718334024 2423032704 2423366728
+20157000000 20158002218 6719000000 6719334072 2424032704 2424366776
+20160000000 20159624872 6720000000 6719874957 2425032704 2424907661
+20163000000 20164002533 6721000000 6721334177 2426032704 2426366881
+20166000000 20167002693 6722000000 6722334231 2427032704 2427366935
+20169000000 20170002830 6723000000 6723334276 2428032704 2428366980
+20172000000 20173002988 6724000000 6724334329 2429032704 2429367033
+20175000000 20176003146 6725000000 6725334382 2430032704 2430367086
+20178000000 20179003260 6726000000 6726334420 2431032704 2431367124
+20181000000 20182003421 6727000000 6727334473 2432032704 2432367177
+20184000000 20185003548 6728000000 6728334516 2433032704 2433367220
+20187000000 20188003657 6729000000 6729334552 2434032704 2434367256
+20190000000 20191003799 6730000000 6730334599 2435032704 2435367303
+20193000000 20194004033 6731000000 6731334677 2436032704 2436367381
+20196000000 20197003946 6732000000 6732334648 2437032704 2437367352
+20199000000 20200004067 6733000000 6733334689 2438032704 2438367393
+20202000000 20203004175 6734000000 6734334725 2439032704 2439367429
+20205000000 20206004410 6735000000 6735334803 2440032704 2440367507
+20208000000 20209004589 6736000000 6736334863 2441032704 2441367567
+20211000000 20211918229 6737000000 6737306076 2442032704 2442338780
+20214000000 20215004858 6738000000 6738334952 2443032704 2443367656
+20217000000 20218005031 6739000000 6739335010 2444032704 2444367714
+20220000000 20221005147 6740000000 6740335049 2445032704 2445367753
+20223000000 20224005320 6741000000 6741335106 2446032704 2446367810
+20226000000 20227005492 6742000000 6742335164 2447032704 2447367868
+20229000000 20230005548 6743000000 6743335182 2448032704 2448367886
+20232000000 20233005694 6744000000 6744335231 2449032704 2449367935
+20235000000 20236005890 6745000000 6745335296 2450032704 2450368000
+20238000000 20239005919 6746000000 6746335306 2451032704 2451368010
+20241000000 20242006225 6747000000 6747335408 2452032704 2452368112
+20244000000 20245006397 6748000000 6748335465 2453032704 2453368169
+20247000000 20248006530 6749000000 6749335510 2454032704 2454368214
+20250000000 20251006647 6750000000 6750335549 2455032704 2455368253
+20253000000 20254006832 6751000000 6751335610 2456032704 2456368314
+20256000000 20257006938 6752000000 6752335646 2457032704 2457368350
+20259000000 20260007119 6753000000 6753335706 2458032704 2458368410
+20262000000 20263007331 6754000000 6754335777 2459032704 2459368481
+20265000000 20266007438 6755000000 6755335812 2460032704 2460368516
+20268000000 20269007604 6756000000 6756335868 2461032704 2461368572
+20271000000 20271606349 6757000000 6757202116 2462032704 2462234820
+20274000000 20275007875 6758000000 6758335958 2463032704 2463368662
+20277000000 20278007987 6759000000 6759335995 2464032704 2464368699
+20280000000 20281008196 6760000000 6760336065 2465032704 2465368769
+20283000000 20284008275 6761000000 6761336091 2466032704 2466368795
+20286000000 20287008500 6762000000 6762336166 2467032704 2467368870
+20289000000 20290008627 6763000000 6763336209 2468032704 2468368913
+20292000000 20293008716 6764000000 6764336238 2469032704 2469368942
+20295000000 20296008822 6765000000 6765336274 2470032704 2470368978
+20298000000 20299009033 6766000000 6766336344 2471032704 2471369048
+20301000000 20302009242 6767000000 6767336414 2472032704 2472369118
+20304000000 20305009387 6768000000 6768336462 2473032704 2473369166
+20307000000 20308009513 6769000000 6769336504 2474032704 2474369208
+20310000000 20311009679 6770000000 6770336559 2475032704 2475369263
+20313000000 20314009759 6771000000 6771336586 2476032704 2476369290
+20316000000 20317009994 6772000000 6772336664 2477032704 2477369368
+20319000000 20320010153 6773000000 6773336717 2478032704 2478369421
+20322000000 20323010274 6774000000 6774336758 2479032704 2479369462
+20325000000 20326010434 6775000000 6775336811 2480032704 2480369515
+20328000000 20329010517 6776000000 6776336839 2481032704 2481369543
+20331000000 20332010763 6777000000 6777336921 2482032704 2482369625
+20334000000 20335010886 6778000000 6778336962 2483032704 2483369666
+20337000000 20338011022 6779000000 6779337007 2484032704 2484369711
+20340000000 20341011197 6780000000 6780337065 2485032704 2485369769
+20343000000 20344011319 6781000000 6781337106 2486032704 2486369810
+20346000000 20347011469 6782000000 6782337156 2487032704 2487369860
+20349000000 20350011617 6783000000 6783337205 2488032704 2488369909
+20352000000 20352185311 6784000000 6784061770 2489032704 2489094474
+20355000000 20356011937 6785000000 6785337312 2490032704 2490370016
+20358000000 20359012069 6786000000 6786337356 2491032704 2491370060
+20361000000 20362012243 6787000000 6787337414 2492032704 2492370118
+20364000000 20365012362 6788000000 6788337454 2493032704 2493370158
+20367000000 20368012486 6789000000 6789337495 2494032704 2494370199
+20370000000 20371012705 6790000000 6790337568 2495032704 2495370272
+20373000000 20374012841 6791000000 6791337613 2496032704 2496370317
+20376000000 20377012992 6792000000 6792337664 2497032704 2497370368
+20379000000 20380013142 6793000000 6793337714 2498032704 2498370418
+20382000000 20383013257 6794000000 6794337752 2499032704 2499370456
+20385000000 20386013354 6795000000 6795337784 2500032704 2500370488
+20388000000 20389013562 6796000000 6796337854 2501032704 2501370558
+20391000000 20392013717 6797000000 6797337905 2502032704 2502370609
+20394000000 20395013876 6798000000 6798337958 2503032704 2503370662
+20397000000 20398014050 6799000000 6799338016 2504032704 2504370720
+20400000000 20401014150 6800000000 6800338050 2505032704 2505370754
+20403000000 20404014328 6801000000 6801338109 2506032704 2506370813
+20406000000 20407014477 6802000000 6802338159 2507032704 2507370863
+20409000000 20410014605 6803000000 6803338201 2508032704 2508370905
+20412000000 20413014774 6804000000 6804338258 2509032704 2509370962
+20415000000 20416014894 6805000000 6805338298 2510032704 2510371002
+20418000000 20417842244 6806000000 6805947414 2511032704 2510980118
+20421000000 20422015144 6807000000 6807338381 2512032704 2512371085
+20424000000 20425015402 6808000000 6808338467 2513032704 2513371171
+20427000000 20428015507 6809000000 6809338502 2514032704 2514371206
+20430000000 20431015587 6810000000 6810338529 2515032704 2515371233
+20433000000 20434015734 6811000000 6811338578 2516032704 2516371282
+20436000000 20437015988 6812000000 6812338662 2517032704 2517371366
+20439000000 20440016078 6813000000 6813338692 2518032704 2518371396
+20442000000 20443016323 6814000000 6814338774 2519032704 2519371478
+20445000000 20446016401 6815000000 6815338800 2520032704 2520371504
+20448000000 20449016578 6816000000 6816338859 2521032704 2521371563
+20451000000 20452016724 6817000000 6817338908 2522032704 2522371612
+20454000000 20455016868 6818000000 6818338956 2523032704 2523371660
+20457000000 20456639522 6819000000 6818879840 2524032704 2523912544
+20460000000 20461017183 6820000000 6820339061 2525032704 2525371765
+20463000000 20464017343 6821000000 6821339114 2526032704 2526371818
+20466000000 20467017480 6822000000 6822339160 2527032704 2527371864
+20469000000 20470017638 6823000000 6823339212 2528032704 2528371916
+20472000000 20473017796 6824000000 6824339265 2529032704 2529371969
+20475000000 20476017910 6825000000 6825339303 2530032704 2530372007
+20478000000 20479018071 6826000000 6826339357 2531032704 2531372061
+20481000000 20482018198 6827000000 6827339399 2532032704 2532372103
+20484000000 20485018307 6828000000 6828339435 2533032704 2533372139
+20487000000 20488018449 6829000000 6829339483 2534032704 2534372187
+20490000000 20491018683 6830000000 6830339561 2535032704 2535372265
+20493000000 20494018596 6831000000 6831339532 2536032704 2536372236
+20496000000 20497018717 6832000000 6832339572 2537032704 2537372276
+20499000000 20500018825 6833000000 6833339608 2538032704 2538372312
+20502000000 20503019060 6834000000 6834339686 2539032704 2539372390
+20505000000 20506019239 6835000000 6835339746 2540032704 2540372450
+20508000000 20508932879 6836000000 6836310959 2541032704 2541343663
+20511000000 20512019508 6837000000 6837339836 2542032704 2542372540
+20514000000 20515019681 6838000000 6838339893 2543032704 2543372597
+20517000000 20518019797 6839000000 6839339932 2544032704 2544372636
+20520000000 20521019970 6840000000 6840339990 2545032704 2545372694
+20523000000 20524020142 6841000000 6841340047 2546032704 2546372751
+20526000000 20527020198 6842000000 6842340066 2547032704 2547372770
+20529000000 20530020344 6843000000 6843340114 2548032704 2548372818
+20532000000 20533020540 6844000000 6844340180 2549032704 2549372884
+20535000000 20536020569 6845000000 6845340189 2550032704 2550372893
+20538000000 20539020875 6846000000 6846340291 2551032704 2551372995
+20541000000 20542021047 6847000000 6847340349 2552032704 2552373053
+20544000000 20545021180 6848000000 6848340393 2553032704 2553373097
+20547000000 20548021297 6849000000 6849340432 2554032704 2554373136
+20550000000 20551021482 6850000000 6850340494 2555032704 2555373198
+20553000000 20554021588 6851000000 6851340529 2556032704 2556373233
+20556000000 20557021769 6852000000 6852340589 2557032704 2557373293
+20559000000 20560021981 6853000000 6853340660 2558032704 2558373364
+20562000000 20563022088 6854000000 6854340696 2559032704 2559373400
+20565000000 20566022254 6855000000 6855340751 2560032704 2560373455
+20568000000 20568620999 6856000000 6856206999 2561032704 2561239703
+20571000000 20572022525 6857000000 6857340841 2562032704 2562373545
+20574000000 20575022637 6858000000 6858340879 2563032704 2563373583
+20577000000 20578022846 6859000000 6859340948 2564032704 2564373652
+20580000000 20581022925 6860000000 6860340975 2565032704 2565373679
+20583000000 20584023150 6861000000 6861341050 2566032704 2566373754
+20586000000 20587023277 6862000000 6862341092 2567032704 2567373796
+20589000000 20590023366 6863000000 6863341122 2568032704 2568373826
+20592000000 20593023472 6864000000 6864341157 2569032704 2569373861
+20595000000 20596023683 6865000000 6865341227 2570032704 2570373931
+20598000000 20599023892 6866000000 6866341297 2571032704 2571374001
+20601000000 20602024037 6867000000 6867341345 2572032704 2572374049
+20604000000 20605024163 6868000000 6868341387 2573032704 2573374091
+20607000000 20608024329 6869000000 6869341443 2574032704 2574374147
+20610000000 20611024409 6870000000 6870341469 2575032704 2575374173
+20613000000 20614024644 6871000000 6871341548 2576032704 2576374252
+20616000000 20617024803 6872000000 6872341601 2577032704 2577374305
+20619000000 20620024924 6873000000 6873341641 2578032704 2578374345
+20622000000 20623025084 6874000000 6874341694 2579032704 2579374398
+20625000000 20626025167 6875000000 6875341722 2580032704 2580374426
+20628000000 20629025413 6876000000 6876341804 2581032704 2581374508
+20631000000 20632025536 6877000000 6877341845 2582032704 2582374549
+20634000000 20635025672 6878000000 6878341890 2583032704 2583374594
+20637000000 20638025847 6879000000 6879341949 2584032704 2584374653
+20640000000 20641025969 6880000000 6880341989 2585032704 2585374693
+20643000000 20644026119 6881000000 6881342039 2586032704 2586374743
+20646000000 20647026267 6882000000 6882342089 2587032704 2587374793
+20649000000 20649199961 6883000000 6883066653 2588032704 2588099357
+20652000000 20653026587 6884000000 6884342195 2589032704 2589374899
+20655000000 20656026719 6885000000 6885342239 2590032704 2590374943
+20658000000 20659026893 6886000000 6886342297 2591032704 2591375001
+20661000000 20662027012 6887000000 6887342337 2592032704 2592375041
+20664000000 20665027136 6888000000 6888342378 2593032704 2593375082
+20667000000 20668027355 6889000000 6889342451 2594032704 2594375155
+20670000000 20671027491 6890000000 6890342497 2595032704 2595375201
+20673000000 20674027642 6891000000 6891342547 2596032704 2596375251
+20676000000 20677027792 6892000000 6892342597 2597032704 2597375301
+20679000000 20680027907 6893000000 6893342635 2598032704 2598375339
+20682000000 20683028004 6894000000 6894342668 2599032704 2599375372
+20685000000 20686028212 6895000000 6895342737 2600032704 2600375441
+20688000000 20689028367 6896000000 6896342789 2601032704 2601375493
+20691000000 20692028526 6897000000 6897342842 2602032704 2602375546
+20694000000 20695028700 6898000000 6898342900 2603032704 2603375604
+20697000000 20698028800 6899000000 6899342933 2604032704 2604375637
+20700000000 20701028978 6900000000 6900342992 2605032704 2605375696
+20703000000 20704029127 6901000000 6901343042 2606032704 2606375746
+20706000000 20707029255 6902000000 6902343085 2607032704 2607375789
+20709000000 20710029424 6903000000 6903343141 2608032704 2608375845
+20712000000 20713029544 6904000000 6904343181 2609032704 2609375885
+20715000000 20714856894 6905000000 6904952298 2610032704 2609985002
+20718000000 20719029794 6906000000 6906343264 2611032704 2611375968
+20721000000 20722030052 6907000000 6907343350 2612032704 2612376054
+20724000000 20725030157 6908000000 6908343385 2613032704 2613376089
+20727000000 20728030237 6909000000 6909343412 2614032704 2614376116
+20730000000 20731030384 6910000000 6910343461 2615032704 2615376165
+20733000000 20734030638 6911000000 6911343546 2616032704 2616376250
+20736000000 20737030728 6912000000 6912343576 2617032704 2617376280
+20739000000 20740030973 6913000000 6913343657 2618032704 2618376361
+20742000000 20743031051 6914000000 6914343683 2619032704 2619376387
+20745000000 20746031228 6915000000 6915343742 2620032704 2620376446
+20748000000 20749031374 6916000000 6916343791 2621032704 2621376495
+20751000000 20752031518 6917000000 6917343839 2622032704 2622376543
+20754000000 20753654172 6918000000 6917884724 2623032704 2622917428
+20757000000 20758031833 6919000000 6919343944 2624032704 2624376648
+20760000000 20761031993 6920000000 6920343997 2625032704 2625376701
+20763000000 20764032130 6921000000 6921344043 2626032704 2626376747
+20766000000 20767032288 6922000000 6922344096 2627032704 2627376800
+20769000000 20770032446 6923000000 6923344148 2628032704 2628376852
+20772000000 20773032560 6924000000 6924344186 2629032704 2629376890
+20775000000 20776032721 6925000000 6925344240 2630032704 2630376944
+20778000000 20779032848 6926000000 6926344282 2631032704 2631376986
+20781000000 20782032957 6927000000 6927344319 2632032704 2632377023
+20784000000 20785033099 6928000000 6928344366 2633032704 2633377070
+20787000000 20788033333 6929000000 6929344444 2634032704 2634377148
+20790000000 20791033246 6930000000 6930344415 2635032704 2635377119
+20793000000 20794033367 6931000000 6931344455 2636032704 2636377159
+20796000000 20797033475 6932000000 6932344491 2637032704 2637377195
+20799000000 20800033710 6933000000 6933344570 2638032704 2638377274
+20802000000 20803033889 6934000000 6934344629 2639032704 2639377333
+20805000000 20805947529 6935000000 6935315843 2640032704 2640348547
+20808000000 20809034158 6936000000 6936344719 2641032704 2641377423
+20811000000 20812034331 6937000000 6937344777 2642032704 2642377481
+20814000000 20815034447 6938000000 6938344815 2643032704 2643377519
+20817000000 20818034620 6939000000 6939344873 2644032704 2644377577
+20820000000 20821034792 6940000000 6940344930 2645032704 2645377634
+20823000000 20824034848 6941000000 6941344949 2646032704 2646377653
+20826000000 20827034994 6942000000 6942344998 2647032704 2647377702
+20829000000 20830035190 6943000000 6943345063 2648032704 2648377767
+20832000000 20833035219 6944000000 6944345073 2649032704 2649377777
+20835000000 20836035525 6945000000 6945345175 2650032704 2650377879
+20838000000 20839035697 6946000000 6946345232 2651032704 2651377936
+20841000000 20842035830 6947000000 6947345276 2652032704 2652377980
+20844000000 20845035947 6948000000 6948345315 2653032704 2653378019
+20847000000 20848036132 6949000000 6949345377 2654032704 2654378081
+20850000000 20851036238 6950000000 6950345412 2655032704 2655378116
+20853000000 20854036419 6951000000 6951345473 2656032704 2656378177
+20856000000 20857036631 6952000000 6952345543 2657032704 2657378247
+20859000000 20860036738 6953000000 6953345579 2658032704 2658378283
+20862000000 20863036904 6954000000 6954345634 2659032704 2659378338
+20865000000 20865635649 6955000000 6955211883 2660032704 2660244587
+20868000000 20869037175 6956000000 6956345725 2661032704 2661378429
+20871000000 20872037287 6957000000 6957345762 2662032704 2662378466
+20874000000 20875037496 6958000000 6958345832 2663032704 2663378536
+20877000000 20878037575 6959000000 6959345858 2664032704 2664378562
+20880000000 20881037800 6960000000 6960345933 2665032704 2665378637
+20883000000 20884037927 6961000000 6961345975 2666032704 2666378679
+20886000000 20887038016 6962000000 6962346005 2667032704 2667378709
+20889000000 20890038122 6963000000 6963346040 2668032704 2668378744
+20892000000 20893038333 6964000000 6964346111 2669032704 2669378815
+20895000000 20896038542 6965000000 6965346180 2670032704 2670378884
+20898000000 20899038687 6966000000 6966346229 2671032704 2671378933
+20901000000 20902038813 6967000000 6967346271 2672032704 2672378975
+20904000000 20905038979 6968000000 6968346326 2673032704 2673379030
+20907000000 20908039059 6969000000 6969346353 2674032704 2674379057
+20910000000 20911039294 6970000000 6970346431 2675032704 2675379135
+20913000000 20914039453 6971000000 6971346484 2676032704 2676379188
+20916000000 20917039574 6972000000 6972346524 2677032704 2677379228
+20919000000 20920039734 6973000000 6973346578 2678032704 2678379282
+20922000000 20923039817 6974000000 6974346605 2679032704 2679379309
+20925000000 20926040063 6975000000 6975346687 2680032704 2680379391
+20928000000 20929040186 6976000000 6976346728 2681032704 2681379432
+20931000000 20932040322 6977000000 6977346774 2682032704 2682379478
+20934000000 20935040497 6978000000 6978346832 2683032704 2683379536
+20937000000 20938040619 6979000000 6979346873 2684032704 2684379577
+20940000000 20941040769 6980000000 6980346923 2685032704 2685379627
+20943000000 20944040917 6981000000 6981346972 2686032704 2686379676
+20946000000 20946214611 6982000000 6982071537 2687032704 2687104241
+20949000000 20950041237 6983000000 6983347079 2688032704 2688379783
+20952000000 20953041369 6984000000 6984347123 2689032704 2689379827
+20955000000 20956041543 6985000000 6985347181 2690032704 2690379885
+20958000000 20959041662 6986000000 6986347220 2691032704 2691379924
+20961000000 20962041786 6987000000 6987347262 2692032704 2692379966
+20964000000 20965042005 6988000000 6988347335 2693032704 2693380039
+20967000000 20968042141 6989000000 6989347380 2694032704 2694380084
+20970000000 20971042292 6990000000 6990347430 2695032704 2695380134
+20973000000 20974042442 6991000000 6991347480 2696032704 2696380184
+20976000000 20977042557 6992000000 6992347519 2697032704 2697380223
+20979000000 20980042654 6993000000 6993347551 2698032704 2698380255
+20982000000 20983042862 6994000000 6994347620 2699032704 2699380324
+20985000000 20986043017 6995000000 6995347672 2700032704 2700380376
+20988000000 20989043176 6996000000 6996347725 2701032704 2701380429
+20991000000 20992043350 6997000000 6997347783 2702032704 2702380487
+20994000000 20995043450 6998000000 6998347816 2703032704 2703380520
+20997000000 20998043628 6999000000 6999347876 2704032704 2704380580
+21000000000 21001043777 7000000000 7000347925 2705032704 2705380629
+21003000000 21004043905 7001000000 7001347968 2706032704 2706380672
+21006000000 21007044074 7002000000 7002348024 2707032704 2707380728
+21009000000 21010044194 7003000000 7003348064 2708032704 2708380768
+21012000000 21011871544 7004000000 7003957181 2709032704 2708989885
+21015000000 21016044444 7005000000 7005348148 2710032704 2710380852
+21018000000 21019044702 7006000000 7006348234 2711032704 2711380938
+21021000000 21022044807 7007000000 7007348269 2712032704 2712380973
+21024000000 21025044887 7008000000 7008348295 2713032704 2713380999
+21027000000 21028045034 7009000000 7009348344 2714032704 2714381048
+21030000000 21031045288 7010000000 7010348429 2715032704 2715381133
+21033000000 21034045378 7011000000 7011348459 2716032704 2716381163
+21036000000 21037045623 7012000000 7012348541 2717032704 2717381245
+21039000000 21040045701 7013000000 7013348567 2718032704 2718381271
+21042000000 21043045878 7014000000 7014348626 2719032704 2719381330
+21045000000 21046046024 7015000000 7015348674 2720032704 2720381378
+21048000000 21049046168 7016000000 7016348722 2721032704 2721381426
+21051000000 21050668822 7017000000 7016889607 2722032704 2721922311
+21054000000 21055046483 7018000000 7018348827 2723032704 2723381531
+21057000000 21058046643 7019000000 7019348881 2724032704 2724381585
+21060000000 21061046780 7020000000 7020348926 2725032704 2725381630
+21063000000 21064046938 7021000000 7021348979 2726032704 2726381683
+21066000000 21067047096 7022000000 7022349032 2727032704 2727381736
+21069000000 21070047210 7023000000 7023349070 2728032704 2728381774
+21072000000 21073047371 7024000000 7024349123 2729032704 2729381827
+21075000000 21076047498 7025000000 7025349166 2730032704 2730381870
+21078000000 21079047607 7026000000 7026349202 2731032704 2731381906
+21081000000 21082047749 7027000000 7027349249 2732032704 2732381953
+21084000000 21085047983 7028000000 7028349327 2733032704 2733382031
+21087000000 21088047896 7029000000 7029349298 2734032704 2734382002
+21090000000 21091048017 7030000000 7030349339 2735032704 2735382043
+21093000000 21094048125 7031000000 7031349375 2736032704 2736382079
+21096000000 21097048360 7032000000 7032349453 2737032704 2737382157
+21099000000 21100048539 7033000000 7033349513 2738032704 2738382217
+21102000000 21102962179 7034000000 7034320726 2739032704 2739353430
+21105000000 21106048808 7035000000 7035349602 2740032704 2740382306
+21108000000 21109048981 7036000000 7036349660 2741032704 2741382364
+21111000000 21112049097 7037000000 7037349699 2742032704 2742382403
+21114000000 21115049270 7038000000 7038349756 2743032704 2743382460
+21117000000 21118049442 7039000000 7039349814 2744032704 2744382518
+21120000000 21121049498 7040000000 7040349832 2745032704 2745382536
+21123000000 21124049644 7041000000 7041349881 2746032704 2746382585
+21126000000 21127049840 7042000000 7042349946 2747032704 2747382650
+21129000000 21130049869 7043000000 7043349956 2748032704 2748382660
+21132000000 21133050175 7044000000 7044350058 2749032704 2749382762
+21135000000 21136050347 7045000000 7045350115 2750032704 2750382819
+21138000000 21139050480 7046000000 7046350160 2751032704 2751382864
+21141000000 21142050597 7047000000 7047350199 2752032704 2752382903
+21144000000 21145050782 7048000000 7048350260 2753032704 2753382964
+21147000000 21148050888 7049000000 7049350296 2754032704 2754383000
+21150000000 21151051069 7050000000 7050350356 2755032704 2755383060
+21153000000 21154051281 7051000000 7051350427 2756032704 2756383131
+21156000000 21157051388 7052000000 7052350462 2757032704 2757383166
+21159000000 21160051554 7053000000 7053350518 2758032704 2758383222
+21162000000 21162650299 7054000000 7054216766 2759032704 2759249470
+21165000000 21166051825 7055000000 7055350608 2760032704 2760383312
+21168000000 21169051937 7056000000 7056350645 2761032704 2761383349
+21171000000 21172052146 7057000000 7057350715 2762032704 2762383419
+21174000000 21175052225 7058000000 7058350741 2763032704 2763383445
+21177000000 21178052450 7059000000 7059350816 2764032704 2764383520
+21180000000 21181052577 7060000000 7060350859 2765032704 2765383563
+21183000000 21184052666 7061000000 7061350888 2766032704 2766383592
+21186000000 21187052772 7062000000 7062350924 2767032704 2767383628
+21189000000 21190052983 7063000000 7063350994 2768032704 2768383698
+21192000000 21193053192 7064000000 7064351064 2769032704 2769383768
+21195000000 21196053337 7065000000 7065351112 2770032704 2770383816
+21198000000 21199053463 7066000000 7066351154 2771032704 2771383858
+21201000000 21202053629 7067000000 7067351209 2772032704 2772383913
+21204000000 21205053709 7068000000 7068351236 2773032704 2773383940
+21207000000 21208053944 7069000000 7069351314 2774032704 2774384018
+21210000000 21211054103 7070000000 7070351367 2775032704 2775384071
+21213000000 21214054224 7071000000 7071351408 2776032704 2776384112
+21216000000 21217054384 7072000000 7072351461 2777032704 2777384165
+21219000000 21220054467 7073000000 7073351489 2778032704 2778384193
+21222000000 21223054713 7074000000 7074351571 2779032704 2779384275
+21225000000 21226054836 7075000000 7075351612 2780032704 2780384316
+21228000000 21229054972 7076000000 7076351657 2781032704 2781384361
+21231000000 21232055147 7077000000 7077351715 2782032704 2782384419
+21234000000 21235055269 7078000000 7078351756 2783032704 2783384460
+21237000000 21238055419 7079000000 7079351806 2784032704 2784384510
+21240000000 21241055567 7080000000 7080351855 2785032704 2785384559
+21243000000 21243229261 7081000000 7081076420 2786032704 2786109124
+21246000000 21247055887 7082000000 7082351962 2787032704 2787384666
+21249000000 21250056019 7083000000 7083352006 2788032704 2788384710
+21252000000 21253056193 7084000000 7084352064 2789032704 2789384768
+21255000000 21256056312 7085000000 7085352104 2790032704 2790384808
+21258000000 21259056436 7086000000 7086352145 2791032704 2791384849
+21261000000 21262056655 7087000000 7087352218 2792032704 2792384922
+21264000000 21265056791 7088000000 7088352263 2793032704 2793384967
+21267000000 21268056942 7089000000 7089352314 2794032704 2794385018
+21270000000 21271057092 7090000000 7090352364 2795032704 2795385068
+21273000000 21274057207 7091000000 7091352402 2796032704 2796385106
+21276000000 21277057304 7092000000 7092352434 2797032704 2797385138
+21279000000 21280057512 7093000000 7093352504 2798032704 2798385208
+21282000000 21283057667 7094000000 7094352555 2799032704 2799385259
+21285000000 21286057826 7095000000 7095352608 2800032704 2800385312
+21288000000 21289058000 7096000000 7096352666 2801032704 2801385370
+21291000000 21292058100 7097000000 7097352700 2802032704 2802385404
+21294000000 21295058278 7098000000 7098352759 2803032704 2803385463
+21297000000 21298058427 7099000000 7099352809 2804032704 2804385513
+21300000000 21301058555 7100000000 7100352851 2805032704 2805385555
+21303000000 21304058724 7101000000 7101352908 2806032704 2806385612
+21306000000 21307058844 7102000000 7102352948 2807032704 2807385652
+21309000000 21308886194 7103000000 7102962064 2808032704 2807994768
+21312000000 21313059094 7104000000 7104353031 2809032704 2809385735
+21315000000 21316059352 7105000000 7105353117 2810032704 2810385821
+21318000000 21319059457 7106000000 7106353152 2811032704 2811385856
+21321000000 21322059537 7107000000 7107353179 2812032704 2812385883
+21324000000 21325059684 7108000000 7108353228 2813032704 2813385932
+21327000000 21328059938 7109000000 7109353312 2814032704 2814386016
+21330000000 21331060028 7110000000 7110353342 2815032704 2815386046
+21333000000 21334060273 7111000000 7111353424 2816032704 2816386128
+21336000000 21337060351 7112000000 7112353450 2817032704 2817386154
+21339000000 21340060528 7113000000 7113353509 2818032704 2818386213
+21342000000 21343060674 7114000000 7114353558 2819032704 2819386262
+21345000000 21346060818 7115000000 7115353606 2820032704 2820386310
+21348000000 21347683472 7116000000 7115894490 2821032704 2820927194
+21351000000 21352061133 7117000000 7117353711 2822032704 2822386415
+21354000000 21355061293 7118000000 7118353764 2823032704 2823386468
+21357000000 21358061430 7119000000 7119353810 2824032704 2824386514
+21360000000 21361061588 7120000000 7120353862 2825032704 2825386566
+21363000000 21364061746 7121000000 7121353915 2826032704 2826386619
+21366000000 21367061860 7122000000 7122353953 2827032704 2827386657
+21369000000 21370062021 7123000000 7123354007 2828032704 2828386711
+21372000000 21373062148 7124000000 7124354049 2829032704 2829386753
+21375000000 21376062257 7125000000 7125354085 2830032704 2830386789
+21378000000 21379062399 7126000000 7126354133 2831032704 2831386837
+21381000000 21382062633 7127000000 7127354211 2832032704 2832386915
+21384000000 21385062546 7128000000 7128354182 2833032704 2833386886
+21387000000 21388062667 7129000000 7129354222 2834032704 2834386926
+21390000000 21391062775 7130000000 7130354258 2835032704 2835386962
+21393000000 21394063010 7131000000 7131354336 2836032704 2836387040
+21396000000 21397063189 7132000000 7132354396 2837032704 2837387100
+21399000000 21399976829 7133000000 7133325609 2838032704 2838358313
+21402000000 21403063458 7134000000 7134354486 2839032704 2839387190
+21405000000 21406063631 7135000000 7135354543 2840032704 2840387247
+21408000000 21409063747 7136000000 7136354582 2841032704 2841387286
+21411000000 21412063920 7137000000 7137354640 2842032704 2842387344
+21414000000 21415064092 7138000000 7138354697 2843032704 2843387401
+21417000000 21418064148 7139000000 7139354716 2844032704 2844387420
+21420000000 21421064294 7140000000 7140354764 2845032704 2845387468
+21423000000 21424064490 7141000000 7141354830 2846032704 2846387534
+21426000000 21427064519 7142000000 7142354839 2847032704 2847387543
+21429000000 21430064825 7143000000 7143354941 2848032704 2848387645
+21432000000 21433064997 7144000000 7144354999 2849032704 2849387703
+21435000000 21436065130 7145000000 7145355043 2850032704 2850387747
+21438000000 21439065247 7146000000 7146355082 2851032704 2851387786
+21441000000 21442065432 7147000000 7147355144 2852032704 2852387848
+21444000000 21445065538 7148000000 7148355179 2853032704 2853387883
+21447000000 21448065719 7149000000 7149355239 2854032704 2854387943
+21450000000 21451065931 7150000000 7150355310 2855032704 2855388014
+21453000000 21454066038 7151000000 7151355346 2856032704 2856388050
+21456000000 21457066204 7152000000 7152355401 2857032704 2857388105
+21459000000 21459664949 7153000000 7153221649 2858032704 2858254353
+21462000000 21463066475 7154000000 7154355491 2859032704 2859388195
+21465000000 21466066587 7155000000 7155355529 2860032704 2860388233
+21468000000 21469066796 7156000000 7156355598 2861032704 2861388302
+21471000000 21472066875 7157000000 7157355625 2862032704 2862388329
+21474000000 21475067100 7158000000 7158355700 2863032704 2863388404
+21477000000 21478067227 7159000000 7159355742 2864032704 2864388446
+21480000000 21481067316 7160000000 7160355772 2865032704 2865388476
+21483000000 21484067422 7161000000 7161355807 2866032704 2866388511
+21486000000 21487067633 7162000000 7162355877 2867032704 2867388581
+21489000000 21490067842 7163000000 7163355947 2868032704 2868388651
+21492000000 21493067987 7164000000 7164355995 2869032704 2869388699
+21495000000 21496068113 7165000000 7165356037 2870032704 2870388741
+21498000000 21499068279 7166000000 7166356093 2871032704 2871388797
+21501000000 21502068359 7167000000 7167356119 2872032704 2872388823
+21504000000 21505068594 7168000000 7168356198 2873032704 2873388902
+21507000000 21508068753 7169000000 7169356251 2874032704 2874388955
+21510000000 21511068874 7170000000 7170356291 2875032704 2875388995
+21513000000 21514069034 7171000000 7171356344 2876032704 2876389048
+21516000000 21517069117 7172000000 7172356372 2877032704 2877389076
+21519000000 21520069363 7173000000 7173356454 2878032704 2878389158
+21522000000 21523069486 7174000000 7174356495 2879032704 2879389199
+21525000000 21526069622 7175000000 7175356540 2880032704 2880389244
+21528000000 21529069797 7176000000 7176356599 2881032704 2881389303
+21531000000 21532069919 7177000000 7177356639 2882032704 2882389343
+21534000000 21535070069 7178000000 7178356689 2883032704 2883389393
+21537000000 21538070217 7179000000 7179356739 2884032704 2884389443
+21540000000 21540243911 7180000000 7180081303 2885032704 2885114007
+21543000000 21544070537 7181000000 7181356845 2886032704 2886389549
+21546000000 21547070669 7182000000 7182356889 2887032704 2887389593
+21549000000 21550070843 7183000000 7183356947 2888032704 2888389651
+21552000000 21553070962 7184000000 7184356987 2889032704 2889389691
+21555000000 21556071086 7185000000 7185357028 2890032704 2890389732
+21558000000 21559071305 7186000000 7186357101 2891032704 2891389805
+21561000000 21562071441 7187000000 7187357147 2892032704 2892389851
+21564000000 21565071592 7188000000 7188357197 2893032704 2893389901
+21567000000 21568071742 7189000000 7189357247 2894032704 2894389951
+21570000000 21571071857 7190000000 7190357285 2895032704 2895389989
+21573000000 21574071954 7191000000 7191357318 2896032704 2896390022
+21576000000 21577072162 7192000000 7192357387 2897032704 2897390091
+21579000000 21580072317 7193000000 7193357439 2898032704 2898390143
+21582000000 21583072476 7194000000 7194357492 2899032704 2899390196
+21585000000 21586072650 7195000000 7195357550 2900032704 2900390254
+21588000000 21589072750 7196000000 7196357583 2901032704 2901390287
+21591000000 21592072928 7197000000 7197357642 2902032704 2902390346
+21594000000 21595073077 7198000000 7198357692 2903032704 2903390396
+21597000000 21598073205 7199000000 7199357735 2904032704 2904390439
+21600000000 21601073374 7200000000 7200357791 2905032704 2905390495
+21603000000 21604073494 7201000000 7201357831 2906032704 2906390535
+21606000000 21605900844 7202000000 7201966948 2907032704 2906999652
+21609000000 21610073744 7203000000 7203357914 2908032704 2908390618
+21612000000 21613074002 7204000000 7204358000 2909032704 2909390704
+21615000000 21616074107 7205000000 7205358035 2910032704 2910390739
+21618000000 21619074187 7206000000 7206358062 2911032704 2911390766
+21621000000 21622074334 7207000000 7207358111 2912032704 2912390815
+21624000000 21625074588 7208000000 7208358196 2913032704 2913390900
+21627000000 21628074678 7209000000 7209358226 2914032704 2914390930
+21630000000 21631074923 7210000000 7210358307 2915032704 2915391011
+21633000000 21634075001 7211000000 7211358333 2916032704 2916391037
+21636000000 21637075178 7212000000 7212358392 2917032704 2917391096
+21639000000 21640075324 7213000000 7213358441 2918032704 2918391145
+21642000000 21643075468 7214000000 7214358489 2919032704 2919391193
+21645000000 21644698122 7215000000 7214899374 2920032704 2919932078
+21648000000 21649075783 7216000000 7216358594 2921032704 2921391298
+21651000000 21652075943 7217000000 7217358647 2922032704 2922391351
+21654000000 21655076080 7218000000 7218358693 2923032704 2923391397
+21657000000 21658076238 7219000000 7219358746 2924032704 2924391450
+21660000000 21661076396 7220000000 7220358798 2925032704 2925391502
+21663000000 21664076510 7221000000 7221358836 2926032704 2926391540
+21666000000 21667076671 7222000000 7222358890 2927032704 2927391594
+21669000000 21670076798 7223000000 7223358932 2928032704 2928391636
+21672000000 21673076907 7224000000 7224358969 2929032704 2929391673
+21675000000 21676077049 7225000000 7225359016 2930032704 2930391720
+21678000000 21679077283 7226000000 7226359094 2931032704 2931391798
+21681000000 21682077196 7227000000 7227359065 2932032704 2932391769
+21684000000 21685077317 7228000000 7228359105 2933032704 2933391809
+21687000000 21688077425 7229000000 7229359141 2934032704 2934391845
+21690000000 21691077660 7230000000 7230359220 2935032704 2935391924
+21693000000 21694077839 7231000000 7231359279 2936032704 2936391983
+21696000000 21696991479 7232000000 7232330493 2937032704 2937363197
+21699000000 21700078108 7233000000 7233359369 2938032704 2938392073
+21702000000 21703078281 7234000000 7234359427 2939032704 2939392131
+21705000000 21706078397 7235000000 7235359465 2940032704 2940392169
+21708000000 21709078570 7236000000 7236359523 2941032704 2941392227
+21711000000 21712078742 7237000000 7237359580 2942032704 2942392284
+21714000000 21715078798 7238000000 7238359599 2943032704 2943392303
+21717000000 21718078944 7239000000 7239359648 2944032704 2944392352
+21720000000 21721079140 7240000000 7240359713 2945032704 2945392417
+21723000000 21724079169 7241000000 7241359723 2946032704 2946392427
+21726000000 21727079475 7242000000 7242359825 2947032704 2947392529
+21729000000 21730079647 7243000000 7243359882 2948032704 2948392586
+21732000000 21733079780 7244000000 7244359926 2949032704 2949392630
+21735000000 21736079897 7245000000 7245359965 2950032704 2950392669
+21738000000 21739080082 7246000000 7246360027 2951032704 2951392731
+21741000000 21742080188 7247000000 7247360062 2952032704 2952392766
+21744000000 21745080369 7248000000 7248360123 2953032704 2953392827
+21747000000 21748080581 7249000000 7249360193 2954032704 2954392897
+21750000000 21751080688 7250000000 7250360229 2955032704 2955392933
+21753000000 21754080854 7251000000 7251360284 2956032704 2956392988
+21756000000 21756679599 7252000000 7252226533 2957032704 2957259237
+21759000000 21760081125 7253000000 7253360375 2958032704 2958393079
+21762000000 21763081237 7254000000 7254360412 2959032704 2959393116
+21765000000 21766081446 7255000000 7255360482 2960032704 2960393186
+21768000000 21769081525 7256000000 7256360508 2961032704 2961393212
+21771000000 21772081750 7257000000 7257360583 2962032704 2962393287
+21774000000 21775081877 7258000000 7258360625 2963032704 2963393329
+21777000000 21778081966 7259000000 7259360655 2964032704 2964393359
+21780000000 21781082072 7260000000 7260360690 2965032704 2965393394
+21783000000 21784082283 7261000000 7261360761 2966032704 2966393465
+21786000000 21787082492 7262000000 7262360830 2967032704 2967393534
+21789000000 21790082637 7263000000 7263360879 2968032704 2968393583
+21792000000 21793082763 7264000000 7264360921 2969032704 2969393625
+21795000000 21796082929 7265000000 7265360976 2970032704 2970393680
+21798000000 21799083009 7266000000 7266361003 2971032704 2971393707
+21801000000 21802083244 7267000000 7267361081 2972032704 2972393785
+21804000000 21805083403 7268000000 7268361134 2973032704 2973393838
+21807000000 21808083524 7269000000 7269361174 2974032704 2974393878
+21810000000 21811083684 7270000000 7270361228 2975032704 2975393932
+21813000000 21814083767 7271000000 7271361255 2976032704 2976393959
+21816000000 21817084013 7272000000 7272361337 2977032704 2977394041
+21819000000 21820084136 7273000000 7273361378 2978032704 2978394082
+21822000000 21823084272 7274000000 7274361424 2979032704 2979394128
+21825000000 21826084447 7275000000 7275361482 2980032704 2980394186
+21828000000 21829084569 7276000000 7276361523 2981032704 2981394227
+21831000000 21832084719 7277000000 7277361573 2982032704 2982394277
+21834000000 21835084867 7278000000 7278361622 2983032704 2983394326
+21837000000 21837258561 7279000000 7279086187 2984032704 2984118891
+21840000000 21841085187 7280000000 7280361729 2985032704 2985394433
+21843000000 21844085319 7281000000 7281361773 2986032704 2986394477
+21846000000 21847085493 7282000000 7282361831 2987032704 2987394535
+21849000000 21850085612 7283000000 7283361870 2988032704 2988394574
+21852000000 21853085736 7284000000 7284361912 2989032704 2989394616
+21855000000 21856085955 7285000000 7285361985 2990032704 2990394689
+21858000000 21859086091 7286000000 7286362030 2991032704 2991394734
+21861000000 21862086242 7287000000 7287362080 2992032704 2992394784
+21864000000 21865086392 7288000000 7288362130 2993032704 2993394834
+21867000000 21868086507 7289000000 7289362169 2994032704 2994394873
+21870000000 21871086604 7290000000 7290362201 2995032704 2995394905
+21873000000 21874086812 7291000000 7291362270 2996032704 2996394974
+21876000000 21877086967 7292000000 7292362322 2997032704 2997395026
+21879000000 21880087126 7293000000 7293362375 2998032704 2998395079
+21882000000 21883087300 7294000000 7294362433 2999032704 2999395137
+21885000000 21886087400 7295000000 7295362466 3000032704 3000395170
+21888000000 21889087578 7296000000 7296362526 3001032704 3001395230
+21891000000 21892087727 7297000000 7297362575 3002032704 3002395279
+21894000000 21895087855 7298000000 7298362618 3003032704 3003395322
+21897000000 21898088024 7299000000 7299362674 3004032704 3004395378
+21900000000 21901088144 7300000000 7300362714 3005032704 3005395418
+21903000000 21902915494 7301000000 7300971831 3006032704 3006004535
+21906000000 21907088394 7302000000 7302362798 3007032704 3007395502
+21909000000 21910088652 7303000000 7303362884 3008032704 3008395588
+21912000000 21913088757 7304000000 7304362919 3009032704 3009395623
+21915000000 21916088837 7305000000 7305362945 3010032704 3010395649
+21918000000 21919088984 7306000000 7306362994 3011032704 3011395698
+21921000000 21922089238 7307000000 7307363079 3012032704 3012395783
+21924000000 21925089328 7308000000 7308363109 3013032704 3013395813
+21927000000 21928089573 7309000000 7309363191 3014032704 3014395895
+21930000000 21931089651 7310000000 7310363217 3015032704 3015395921
+21933000000 21934089828 7311000000 7311363276 3016032704 3016395980
+21936000000 21937089974 7312000000 7312363324 3017032704 3017396028
+21939000000 21940090118 7313000000 7313363372 3018032704 3018396076
+21942000000 21941712772 7314000000 7313904257 3019032704 3018936961
+21945000000 21946090433 7315000000 7315363477 3020032704 3020396181
+21948000000 21949090593 7316000000 7316363531 3021032704 3021396235
+21951000000 21952090730 7317000000 7317363576 3022032704 3022396280
+21954000000 21955090888 7318000000 7318363629 3023032704 3023396333
+21957000000 21958091046 7319000000 7319363682 3024032704 3024396386
+21960000000 21961091160 7320000000 7320363720 3025032704 3025396424
+21963000000 21964091321 7321000000 7321363773 3026032704 3026396477
+21966000000 21967091448 7322000000 7322363816 3027032704 3027396520
+21969000000 21970091557 7323000000 7323363852 3028032704 3028396556
+21972000000 21973091699 7324000000 7324363899 3029032704 3029396603
+21975000000 21976091933 7325000000 7325363977 3030032704 3030396681
+21978000000 21979091846 7326000000 7326363948 3031032704 3031396652
+21981000000 21982091967 7327000000 7327363989 3032032704 3032396693
+21984000000 21985092075 7328000000 7328364025 3033032704 3033396729
+21987000000 21988092310 7329000000 7329364103 3034032704 3034396807
+21990000000 21991092489 7330000000 7330364163 3035032704 3035396867
+21993000000 21994006129 7331000000 7331335376 3036032704 3036368080
+21996000000 21997092758 7332000000 7332364252 3037032704 3037396956
+21999000000 22000092931 7333000000 7333364310 3038032704 3038397014
+22002000000 22003093047 7334000000 7334364349 3039032704 3039397053
+22005000000 22006093220 7335000000 7335364406 3040032704 3040397110
+22008000000 22009093392 7336000000 7336364464 3041032704 3041397168
+22011000000 22012093448 7337000000 7337364482 3042032704 3042397186
+22014000000 22015093594 7338000000 7338364531 3043032704 3043397235
+22017000000 22018093790 7339000000 7339364596 3044032704 3044397300
+22020000000 22021093819 7340000000 7340364606 3045032704 3045397310
+22023000000 22024094125 7341000000 7341364708 3046032704 3046397412
+22026000000 22027094297 7342000000 7342364765 3047032704 3047397469
+22029000000 22030094430 7343000000 7343364810 3048032704 3048397514
+22032000000 22033094547 7344000000 7344364849 3049032704 3049397553
+22035000000 22036094732 7345000000 7345364910 3050032704 3050397614
+22038000000 22039094838 7346000000 7346364946 3051032704 3051397650
+22041000000 22042095019 7347000000 7347365006 3052032704 3052397710
+22044000000 22045095231 7348000000 7348365077 3053032704 3053397781
+22047000000 22048095338 7349000000 7349365112 3054032704 3054397816
+22050000000 22051095504 7350000000 7350365168 3055032704 3055397872
+22053000000 22053694249 7351000000 7351231416 3056032704 3056264120
+22056000000 22057095775 7352000000 7352365258 3057032704 3057397962
+22059000000 22060095887 7353000000 7353365295 3058032704 3058397999
+22062000000 22063096096 7354000000 7354365365 3059032704 3059398069
+22065000000 22066096175 7355000000 7355365391 3060032704 3060398095
+22068000000 22069096400 7356000000 7356365466 3061032704 3061398170
+22071000000 22072096527 7357000000 7357365509 3062032704 3062398213
+22074000000 22075096616 7358000000 7358365538 3063032704 3063398242
+22077000000 22078096722 7359000000 7359365574 3064032704 3064398278
+22080000000 22081096933 7360000000 7360365644 3065032704 3065398348
+22083000000 22084097142 7361000000 7361365714 3066032704 3066398418
+22086000000 22087097287 7362000000 7362365762 3067032704 3067398466
+22089000000 22090097413 7363000000 7363365804 3068032704 3068398508
+22092000000 22093097579 7364000000 7364365859 3069032704 3069398563
+22095000000 22096097659 7365000000 7365365886 3070032704 3070398590
+22098000000 22099097894 7366000000 7366365964 3071032704 3071398668
+22101000000 22102098053 7367000000 7367366017 3072032704 3072398721
+22104000000 22105098174 7368000000 7368366058 3073032704 3073398762
+22107000000 22108098334 7369000000 7369366111 3074032704 3074398815
+22110000000 22111098417 7370000000 7370366139 3075032704 3075398843
+22113000000 22114098663 7371000000 7371366221 3076032704 3076398925
+22116000000 22117098786 7372000000 7372366262 3077032704 3077398966
+22119000000 22120098922 7373000000 7373366307 3078032704 3078399011
+22122000000 22123099097 7374000000 7374366365 3079032704 3079399069
+22125000000 22126099219 7375000000 7375366406 3080032704 3080399110
+22128000000 22129099369 7376000000 7376366456 3081032704 3081399160
+22131000000 22132099517 7377000000 7377366505 3082032704 3082399209
+22134000000 22134273211 7378000000 7378091070 3083032704 3083123774
+22137000000 22138099837 7379000000 7379366612 3084032704 3084399316
+22140000000 22141099969 7380000000 7380366656 3085032704 3085399360
+22143000000 22144100143 7381000000 7381366714 3086032704 3086399418
+22146000000 22147100262 7382000000 7382366754 3087032704 3087399458
+22149000000 22150100386 7383000000 7383366795 3088032704 3088399499
+22152000000 22153100605 7384000000 7384366868 3089032704 3089399572
+22155000000 22156100741 7385000000 7385366913 3090032704 3090399617
+22158000000 22159100892 7386000000 7386366964 3091032704 3091399668
+22161000000 22162101042 7387000000 7387367014 3092032704 3092399718
+22164000000 22165101157 7388000000 7388367052 3093032704 3093399756
+22167000000 22168101254 7389000000 7389367084 3094032704 3094399788
+22170000000 22171101462 7390000000 7390367154 3095032704 3095399858
+22173000000 22174101617 7391000000 7391367205 3096032704 3096399909
+22176000000 22177101776 7392000000 7392367258 3097032704 3097399962
+22179000000 22180101950 7393000000 7393367316 3098032704 3098400020
+22182000000 22183102050 7394000000 7394367350 3099032704 3099400054
+22185000000 22186102228 7395000000 7395367409 3100032704 3100400113
+22188000000 22189102377 7396000000 7396367459 3101032704 3101400163
+22191000000 22192102505 7397000000 7397367501 3102032704 3102400205
+22194000000 22195102674 7398000000 7398367558 3103032704 3103400262
+22197000000 22198102794 7399000000 7399367598 3104032704 3104400302
+22200000000 22199930144 7400000000 7399976714 3105032704 3105009418
+22203000000 22204103044 7401000000 7401367681 3106032704 3106400385
+22206000000 22207103302 7402000000 7402367767 3107032704 3107400471
+22209000000 22210103407 7403000000 7403367802 3108032704 3108400506
+22212000000 22213103487 7404000000 7404367829 3109032704 3109400533
+22215000000 22216103634 7405000000 7405367878 3110032704 3110400582
+22218000000 22219103888 7406000000 7406367962 3111032704 3111400666
+22221000000 22222103978 7407000000 7407367992 3112032704 3112400696
+22224000000 22225104223 7408000000 7408368074 3113032704 3113400778
+22227000000 22228104301 7409000000 7409368100 3114032704 3114400804
+22230000000 22231104478 7410000000 7410368159 3115032704 3115400863
+22233000000 22234104624 7411000000 7411368208 3116032704 3116400912
+22236000000 22237104768 7412000000 7412368256 3117032704 3117400960
+22239000000 22238727422 7413000000 7412909140 3118032704 3117941844
+22242000000 22243105083 7414000000 7414368361 3119032704 3119401065
+22245000000 22246105243 7415000000 7415368414 3120032704 3120401118
+22248000000 22249105380 7416000000 7416368460 3121032704 3121401164
+22251000000 22252105538 7417000000 7417368512 3122032704 3122401216
+22254000000 22255105696 7418000000 7418368565 3123032704 3123401269
+22257000000 22258105810 7419000000 7419368603 3124032704 3124401307
+22260000000 22261105971 7420000000 7420368657 3125032704 3125401361
+22263000000 22264106098 7421000000 7421368699 3126032704 3126401403
+22266000000 22267106207 7422000000 7422368735 3127032704 3127401439
+22269000000 22270106349 7423000000 7423368783 3128032704 3128401487
+22272000000 22273106583 7424000000 7424368861 3129032704 3129401565
+22275000000 22276106496 7425000000 7425368832 3130032704 3130401536
+22278000000 22279106617 7426000000 7426368872 3131032704 3131401576
+22281000000 22282106725 7427000000 7427368908 3132032704 3132401612
+22284000000 22285106960 7428000000 7428368986 3133032704 3133401690
+22287000000 22288107139 7429000000 7429369046 3134032704 3134401750
+22290000000 22291020779 7430000000 7430340259 3135032704 3135372963
+22293000000 22294107408 7431000000 7431369136 3136032704 3136401840
+22296000000 22297107581 7432000000 7432369193 3137032704 3137401897
+22299000000 22300107697 7433000000 7433369232 3138032704 3138401936
+22302000000 22303107870 7434000000 7434369290 3139032704 3139401994
+22305000000 22306108042 7435000000 7435369347 3140032704 3140402051
+22308000000 22309108098 7436000000 7436369366 3141032704 3141402070
+22311000000 22312108244 7437000000 7437369414 3142032704 3142402118
+22314000000 22315108440 7438000000 7438369480 3143032704 3143402184
+22317000000 22318108469 7439000000 7439369489 3144032704 3144402193
+22320000000 22321108775 7440000000 7440369591 3145032704 3145402295
+22323000000 22324108947 7441000000 7441369649 3146032704 3146402353
+22326000000 22327109080 7442000000 7442369693 3147032704 3147402397
+22329000000 22330109197 7443000000 7443369732 3148032704 3148402436
+22332000000 22333109382 7444000000 7444369794 3149032704 3149402498
+22335000000 22336109488 7445000000 7445369829 3150032704 3150402533
+22338000000 22339109669 7446000000 7446369889 3151032704 3151402593
+22341000000 22342109881 7447000000 7447369960 3152032704 3152402664
+22344000000 22345109988 7448000000 7448369996 3153032704 3153402700
+22347000000 22348110154 7449000000 7449370051 3154032704 3154402755
+22350000000 22350708899 7450000000 7450236299 3155032704 3155269003
+22353000000 22354110425 7451000000 7451370141 3156032704 3156402845
+22356000000 22357110537 7452000000 7452370179 3157032704 3157402883
+22359000000 22360110746 7453000000 7453370248 3158032704 3158402952
+22362000000 22363110825 7454000000 7454370275 3159032704 3159402979
+22365000000 22366111050 7455000000 7455370350 3160032704 3160403054
+22368000000 22369111177 7456000000 7456370392 3161032704 3161403096
+22371000000 22372111266 7457000000 7457370422 3162032704 3162403126
+22374000000 22375111372 7458000000 7458370457 3163032704 3163403161
+22377000000 22378111583 7459000000 7459370527 3164032704 3164403231
+22380000000 22381111792 7460000000 7460370597 3165032704 3165403301
+22383000000 22384111937 7461000000 7461370645 3166032704 3166403349
+22386000000 22387112063 7462000000 7462370687 3167032704 3167403391
+22389000000 22390112229 7463000000 7463370743 3168032704 3168403447
+22392000000 22393112309 7464000000 7464370769 3169032704 3169403473
+22395000000 22396112544 7465000000 7465370848 3170032704 3170403552
+22398000000 22399112703 7466000000 7466370901 3171032704 3171403605
+22401000000 22402112824 7467000000 7467370941 3172032704 3172403645
+22404000000 22405112984 7468000000 7468370994 3173032704 3173403698
+22407000000 22408113067 7469000000 7469371022 3174032704 3174403726
+22410000000 22411113313 7470000000 7470371104 3175032704 3175403808
+22413000000 22414113436 7471000000 7471371145 3176032704 3176403849
+22416000000 22417113572 7472000000 7472371190 3177032704 3177403894
+22419000000 22420113747 7473000000 7473371249 3178032704 3178403953
+22422000000 22423113869 7474000000 7474371289 3179032704 3179403993
+22425000000 22426114019 7475000000 7475371339 3180032704 3180404043
+22428000000 22429114167 7476000000 7476371389 3181032704 3181404093
+22431000000 22431287861 7477000000 7477095953 3182032704 3182128657
+22434000000 22435114487 7478000000 7478371495 3183032704 3183404199
+22437000000 22438114619 7479000000 7479371539 3184032704 3184404243
+22440000000 22441114793 7480000000 7480371597 3185032704 3185404301
+22443000000 22444114912 7481000000 7481371637 3186032704 3186404341
+22446000000 22447115036 7482000000 7482371678 3187032704 3187404382
+22449000000 22450115255 7483000000 7483371751 3188032704 3188404455
+22452000000 22453115391 7484000000 7484371797 3189032704 3189404501
+22455000000 22456115542 7485000000 7485371847 3190032704 3190404551
+22458000000 22459115692 7486000000 7486371897 3191032704 3191404601
+22461000000 22462115807 7487000000 7487371935 3192032704 3192404639
+22464000000 22465115904 7488000000 7488371968 3193032704 3193404672
+22467000000 22468116112 7489000000 7489372037 3194032704 3194404741
+22470000000 22471116267 7490000000 7490372089 3195032704 3195404793
+22473000000 22474116426 7491000000 7491372142 3196032704 3196404846
+22476000000 22477116600 7492000000 7492372200 3197032704 3197404904
+22479000000 22480116700 7493000000 7493372233 3198032704 3198404937
+22482000000 22483116878 7494000000 7494372292 3199032704 3199404996
+22485000000 22486117027 7495000000 7495372342 3200032704 3200405046
+22488000000 22489117155 7496000000 7496372385 3201032704 3201405089
+22491000000 22492117324 7497000000 7497372441 3202032704 3202405145
+22494000000 22495117444 7498000000 7498372481 3203032704 3203405185
+22497000000 22496944794 7499000000 7498981598 3204032704 3204014302
+22500000000 22501117694 7500000000 7500372564 3205032704 3205405268
+22503000000 22504117952 7501000000 7501372650 3206032704 3206405354
+22506000000 22507118057 7502000000 7502372685 3207032704 3207405389
+22509000000 22510118137 7503000000 7503372712 3208032704 3208405416
+22512000000 22513118284 7504000000 7504372761 3209032704 3209405465
+22515000000 22516118538 7505000000 7505372846 3210032704 3210405550
+22518000000 22519118628 7506000000 7506372876 3211032704 3211405580
+22521000000 22522118873 7507000000 7507372957 3212032704 3212405661
+22524000000 22525118951 7508000000 7508372983 3213032704 3213405687
+22527000000 22528119128 7509000000 7509373042 3214032704 3214405746
+22530000000 22531119274 7510000000 7510373091 3215032704 3215405795
+22533000000 22534119418 7511000000 7511373139 3216032704 3216405843
+22536000000 22535742072 7512000000 7511914024 3217032704 3216946728
+22539000000 22540119733 7513000000 7513373244 3218032704 3218405948
+22542000000 22543119893 7514000000 7514373297 3219032704 3219406001
+22545000000 22546120030 7515000000 7515373343 3220032704 3220406047
+22548000000 22549120188 7516000000 7516373396 3221032704 3221406100
+22551000000 22552120346 7517000000 7517373448 3222032704 3222406152
+22554000000 22555120460 7518000000 7518373486 3223032704 3223406190
+22557000000 22558120621 7519000000 7519373540 3224032704 3224406244
+22560000000 22561120748 7520000000 7520373582 3225032704 3225406286
+22563000000 22564120857 7521000000 7521373619 3226032704 3226406323
+22566000000 22567120999 7522000000 7522373666 3227032704 3227406370
+22569000000 22570121233 7523000000 7523373744 3228032704 3228406448
+22572000000 22573121146 7524000000 7524373715 3229032704 3229406419
+22575000000 22576121267 7525000000 7525373755 3230032704 3230406459
+22578000000 22579121375 7526000000 7526373791 3231032704 3231406495
+22581000000 22582121610 7527000000 7527373870 3232032704 3232406574
+22584000000 22585121789 7528000000 7528373929 3233032704 3233406633
+22587000000 22588035429 7529000000 7529345143 3234032704 3234377847
+22590000000 22591122058 7530000000 7530374019 3235032704 3235406723
+22593000000 22594122231 7531000000 7531374077 3236032704 3236406781
+22596000000 22597122347 7532000000 7532374115 3237032704 3237406819
+22599000000 22600122520 7533000000 7533374173 3238032704 3238406877
+22602000000 22603122692 7534000000 7534374230 3239032704 3239406934
+22605000000 22606122748 7535000000 7535374249 3240032704 3240406953
+22608000000 22609122894 7536000000 7536374298 3241032704 3241407002
+22611000000 22612123090 7537000000 7537374363 3242032704 3242407067
+22614000000 22615123119 7538000000 7538374373 3243032704 3243407077
+22617000000 22618123425 7539000000 7539374475 3244032704 3244407179
+22620000000 22621123597 7540000000 7540374532 3245032704 3245407236
+22623000000 22624123730 7541000000 7541374576 3246032704 3246407280
+22626000000 22627123847 7542000000 7542374615 3247032704 3247407319
+22629000000 22630124032 7543000000 7543374677 3248032704 3248407381
+22632000000 22633124138 7544000000 7544374712 3249032704 3249407416
+22635000000 22636124319 7545000000 7545374773 3250032704 3250407477
+22638000000 22639124531 7546000000 7546374843 3251032704 3251407547
+22641000000 22642124638 7547000000 7547374879 3252032704 3252407583
+22644000000 22645124804 7548000000 7548374934 3253032704 3253407638
+22647000000 22647723549 7549000000 7549241183 3254032704 3254273887
+22650000000 22651125075 7550000000 7550375025 3255032704 3255407729
+22653000000 22654125187 7551000000 7551375062 3256032704 3256407766
+22656000000 22657125396 7552000000 7552375132 3257032704 3257407836
+22659000000 22660125475 7553000000 7553375158 3258032704 3258407862
+22662000000 22663125700 7554000000 7554375233 3259032704 3259407937
+22665000000 22666125827 7555000000 7555375275 3260032704 3260407979
+22668000000 22669125916 7556000000 7556375305 3261032704 3261408009
+22671000000 22672126022 7557000000 7557375340 3262032704 3262408044
+22674000000 22675126233 7558000000 7558375411 3263032704 3263408115
+22677000000 22678126442 7559000000 7559375480 3264032704 3264408184
+22680000000 22681126587 7560000000 7560375529 3265032704 3265408233
+22683000000 22684126713 7561000000 7561375571 3266032704 3266408275
+22686000000 22687126879 7562000000 7562375626 3267032704 3267408330
+22689000000 22690126959 7563000000 7563375653 3268032704 3268408357
+22692000000 22693127194 7564000000 7564375731 3269032704 3269408435
+22695000000 22696127353 7565000000 7565375784 3270032704 3270408488
+22698000000 22699127474 7566000000 7566375824 3271032704 3271408528
+22701000000 22702127634 7567000000 7567375878 3272032704 3272408582
+22704000000 22705127717 7568000000 7568375905 3273032704 3273408609
+22707000000 22708127963 7569000000 7569375987 3274032704 3274408691
+22710000000 22711128086 7570000000 7570376028 3275032704 3275408732
+22713000000 22714128222 7571000000 7571376074 3276032704 3276408778
+22716000000 22717128397 7572000000 7572376132 3277032704 3277408836
+22719000000 22720128519 7573000000 7573376173 3278032704 3278408877
+22722000000 22723128669 7574000000 7574376223 3279032704 3279408927
+22725000000 22726128817 7575000000 7575376272 3280032704 3280408976
+22728000000 22728302511 7576000000 7576100837 3281032704 3281133541
+22731000000 22732129137 7577000000 7577376379 3282032704 3282409083
+22734000000 22735129269 7578000000 7578376423 3283032704 3283409127
+22737000000 22738129443 7579000000 7579376481 3284032704 3284409185
+22740000000 22741129562 7580000000 7580376520 3285032704 3285409224
+22743000000 22744129686 7581000000 7581376562 3286032704 3286409266
+22746000000 22747129905 7582000000 7582376635 3287032704 3287409339
+22749000000 22750130041 7583000000 7583376680 3288032704 3288409384
+22752000000 22753130192 7584000000 7584376730 3289032704 3289409434
+22755000000 22756130342 7585000000 7585376780 3290032704 3290409484
+22758000000 22759130457 7586000000 7586376819 3291032704 3291409523
+22761000000 22762130554 7587000000 7587376851 3292032704 3292409555
+22764000000 22765130762 7588000000 7588376920 3293032704 3293409624
+22767000000 22768130917 7589000000 7589376972 3294032704 3294409676
+22770000000 22771131076 7590000000 7590377025 3295032704 3295409729
+22773000000 22774131250 7591000000 7591377083 3296032704 3296409787
+22776000000 22777131350 7592000000 7592377116 3297032704 3297409820
+22779000000 22780131528 7593000000 7593377176 3298032704 3298409880
+22782000000 22783131677 7594000000 7594377225 3299032704 3299409929
+22785000000 22786131805 7595000000 7595377268 3300032704 3300409972
+22788000000 22789131974 7596000000 7596377324 3301032704 3301410028
+22791000000 22792132094 7597000000 7597377364 3302032704 3302410068
+22794000000 22793959444 7598000000 7597986481 3303032704 3303019185
+22797000000 22798132344 7599000000 7599377448 3304032704 3304410152
+22800000000 22801132602 7600000000 7600377534 3305032704 3305410238
+22803000000 22804132707 7601000000 7601377569 3306032704 3306410273
+22806000000 22807132787 7602000000 7602377595 3307032704 3307410299
+22809000000 22810132934 7603000000 7603377644 3308032704 3308410348
+22812000000 22813133188 7604000000 7604377729 3309032704 3309410433
+22815000000 22816133278 7605000000 7605377759 3310032704 3310410463
+22818000000 22819133523 7606000000 7606377841 3311032704 3311410545
+22821000000 22822133601 7607000000 7607377867 3312032704 3312410571
+22824000000 22825133778 7608000000 7608377926 3313032704 3313410630
+22827000000 22828133924 7609000000 7609377974 3314032704 3314410678
+22830000000 22831134068 7610000000 7610378022 3315032704 3315410726
+22833000000 22832756722 7611000000 7610918907 3316032704 3315951611
+22836000000 22837134383 7612000000 7612378127 3317032704 3317410831
+22839000000 22840134543 7613000000 7613378181 3318032704 3318410885
+22842000000 22843134680 7614000000 7614378226 3319032704 3319410930
+22845000000 22846134838 7615000000 7615378279 3320032704 3320410983
+22848000000 22849134996 7616000000 7616378332 3321032704 3321411036
+22851000000 22852135110 7617000000 7617378370 3322032704 3322411074
+22854000000 22855135271 7618000000 7618378423 3323032704 3323411127
+22857000000 22858135398 7619000000 7619378466 3324032704 3324411170
+22860000000 22861135507 7620000000 7620378502 3325032704 3325411206
+22863000000 22864135649 7621000000 7621378549 3326032704 3326411253
+22866000000 22867135883 7622000000 7622378627 3327032704 3327411331
+22869000000 22870135796 7623000000 7623378598 3328032704 3328411302
+22872000000 22873135917 7624000000 7624378639 3329032704 3329411343
+22875000000 22876136025 7625000000 7625378675 3330032704 3330411379
+22878000000 22879136260 7626000000 7626378753 3331032704 3331411457
+22881000000 22882136439 7627000000 7627378813 3332032704 3332411517
+22884000000 22885050079 7628000000 7628350026 3333032704 3333382730
+22887000000 22888136708 7629000000 7629378902 3334032704 3334411606
+22890000000 22891136881 7630000000 7630378960 3335032704 3335411664
+22893000000 22894136997 7631000000 7631378999 3336032704 3336411703
+22896000000 22897137170 7632000000 7632379056 3337032704 3337411760
+22899000000 22900137342 7633000000 7633379114 3338032704 3338411818
+22902000000 22903137398 7634000000 7634379132 3339032704 3339411836
+22905000000 22906137544 7635000000 7635379181 3340032704 3340411885
+22908000000 22909137740 7636000000 7636379246 3341032704 3341411950
+22911000000 22912137769 7637000000 7637379256 3342032704 3342411960
+22914000000 22915138075 7638000000 7638379358 3343032704 3343412062
+22917000000 22918138247 7639000000 7639379415 3344032704 3344412119
+22920000000 22921138380 7640000000 7640379460 3345032704 3345412164
+22923000000 22924138497 7641000000 7641379499 3346032704 3346412203
+22926000000 22927138682 7642000000 7642379560 3347032704 3347412264
+22929000000 22930138788 7643000000 7643379596 3348032704 3348412300
+22932000000 22933138969 7644000000 7644379656 3349032704 3349412360
+22935000000 22936139181 7645000000 7645379727 3350032704 3350412431
+22938000000 22939139288 7646000000 7646379762 3351032704 3351412466
+22941000000 22942139454 7647000000 7647379818 3352032704 3352412522
+22944000000 22944738199 7648000000 7648246066 3353032704 3353278770
+22947000000 22948139725 7649000000 7649379908 3354032704 3354412612
+22950000000 22951139837 7650000000 7650379945 3355032704 3355412649
+22953000000 22954140046 7651000000 7651380015 3356032704 3356412719
+22956000000 22957140125 7652000000 7652380041 3357032704 3357412745
+22959000000 22960140350 7653000000 7653380116 3358032704 3358412820
+22962000000 22963140477 7654000000 7654380159 3359032704 3359412863
+22965000000 22966140566 7655000000 7655380188 3360032704 3360412892
+22968000000 22969140672 7656000000 7656380224 3361032704 3361412928
+22971000000 22972140883 7657000000 7657380294 3362032704 3362412998
+22974000000 22975141092 7658000000 7658380364 3363032704 3363413068
+22977000000 22978141237 7659000000 7659380412 3364032704 3364413116
+22980000000 22981141363 7660000000 7660380454 3365032704 3365413158
+22983000000 22984141529 7661000000 7661380509 3366032704 3366413213
+22986000000 22987141609 7662000000 7662380536 3367032704 3367413240
+22989000000 22990141844 7663000000 7663380614 3368032704 3368413318
+22992000000 22993142003 7664000000 7664380667 3369032704 3369413371
+22995000000 22996142124 7665000000 7665380708 3370032704 3370413412
+22998000000 22999142284 7666000000 7666380761 3371032704 3371413465
+23001000000 23002142367 7667000000 7667380789 3372032704 3372413493
+23004000000 23005142613 7668000000 7668380871 3373032704 3373413575
+23007000000 23008142736 7669000000 7669380912 3374032704 3374413616
+23010000000 23011142872 7670000000 7670380957 3375032704 3375413661
+23013000000 23014143047 7671000000 7671381015 3376032704 3376413719
+23016000000 23017143169 7672000000 7672381056 3377032704 3377413760
+23019000000 23020143319 7673000000 7673381106 3378032704 3378413810
+23022000000 23023143467 7674000000 7674381155 3379032704 3379413859
+23025000000 23025317161 7675000000 7675105720 3380032704 3380138424
+23028000000 23029143787 7676000000 7676381262 3381032704 3381413966
+23031000000 23032143919 7677000000 7677381306 3382032704 3382414010
+23034000000 23035144093 7678000000 7678381364 3383032704 3383414068
+23037000000 23038144212 7679000000 7679381404 3384032704 3384414108
+23040000000 23041144336 7680000000 7680381445 3385032704 3385414149
+23043000000 23044144555 7681000000 7681381518 3386032704 3386414222
+23046000000 23047144691 7682000000 7682381563 3387032704 3387414267
+23049000000 23050144842 7683000000 7683381614 3388032704 3388414318
+23052000000 23053144992 7684000000 7684381664 3389032704 3389414368
+23055000000 23056145107 7685000000 7685381702 3390032704 3390414406
+23058000000 23059145204 7686000000 7686381734 3391032704 3391414438
+23061000000 23062145412 7687000000 7687381804 3392032704 3392414508
+23064000000 23065145567 7688000000 7688381855 3393032704 3393414559
+23067000000 23068145726 7689000000 7689381908 3394032704 3394414612
+23070000000 23071145900 7690000000 7690381966 3395032704 3395414670
+23073000000 23074146000 7691000000 7691382000 3396032704 3396414704
+23076000000 23077146178 7692000000 7692382059 3397032704 3397414763
+23079000000 23080146327 7693000000 7693382109 3398032704 3398414813
+23082000000 23083146455 7694000000 7694382151 3399032704 3399414855
+23085000000 23086146624 7695000000 7695382208 3400032704 3400414912
+23088000000 23089146744 7696000000 7696382248 3401032704 3401414952
+23091000000 23090974094 7697000000 7696991364 3402032704 3402024068
+23094000000 23095146994 7698000000 7698382331 3403032704 3403415035
+23097000000 23098147252 7699000000 7699382417 3404032704 3404415121
+23100000000 23101147357 7700000000 7700382452 3405032704 3405415156
+23103000000 23104147437 7701000000 7701382479 3406032704 3406415183
+23106000000 23107147584 7702000000 7702382528 3407032704 3407415232
+23109000000 23110147838 7703000000 7703382612 3408032704 3408415316
+23112000000 23113147928 7704000000 7704382642 3409032704 3409415346
+23115000000 23116148173 7705000000 7705382724 3410032704 3410415428
+23118000000 23119148251 7706000000 7706382750 3411032704 3411415454
+23121000000 23122148428 7707000000 7707382809 3412032704 3412415513
+23124000000 23125148574 7708000000 7708382858 3413032704 3413415562
+23127000000 23128148718 7709000000 7709382906 3414032704 3414415610
+23130000000 23129771372 7710000000 7709923790 3415032704 3414956494
+23133000000 23134149033 7711000000 7711383011 3416032704 3416415715
+23136000000 23137149193 7712000000 7712383064 3417032704 3417415768
+23139000000 23140149330 7713000000 7713383110 3418032704 3418415814
+23142000000 23143149488 7714000000 7714383162 3419032704 3419415866
+23145000000 23146149646 7715000000 7715383215 3420032704 3420415919
+23148000000 23149149760 7716000000 7716383253 3421032704 3421415957
+23151000000 23152149921 7717000000 7717383307 3422032704 3422416011
+23154000000 23155150048 7718000000 7718383349 3423032704 3423416053
+23157000000 23158150157 7719000000 7719383385 3424032704 3424416089
+23160000000 23161150299 7720000000 7720383433 3425032704 3425416137
+23163000000 23164150533 7721000000 7721383511 3426032704 3426416215
+23166000000 23167150446 7722000000 7722383482 3427032704 3427416186
+23169000000 23170150567 7723000000 7723383522 3428032704 3428416226
+23172000000 23173150675 7724000000 7724383558 3429032704 3429416262
+23175000000 23176150910 7725000000 7725383636 3430032704 3430416340
+23178000000 23179151089 7726000000 7726383696 3431032704 3431416400
+23181000000 23182064729 7727000000 7727354909 3432032704 3432387613
+23184000000 23185151358 7728000000 7728383786 3433032704 3433416490
+23187000000 23188151531 7729000000 7729383843 3434032704 3434416547
+23190000000 23191151647 7730000000 7730383882 3435032704 3435416586
+23193000000 23194151820 7731000000 7731383940 3436032704 3436416644
+23196000000 23197151992 7732000000 7732383997 3437032704 3437416701
+23199000000 23200152048 7733000000 7733384016 3438032704 3438416720
+23202000000 23203152194 7734000000 7734384064 3439032704 3439416768
+23205000000 23206152390 7735000000 7735384130 3440032704 3440416834
+23208000000 23209152419 7736000000 7736384139 3441032704 3441416843
+23211000000 23212152725 7737000000 7737384241 3442032704 3442416945
+23214000000 23215152897 7738000000 7738384299 3443032704 3443417003
+23217000000 23218153030 7739000000 7739384343 3444032704 3444417047
+23220000000 23221153147 7740000000 7740384382 3445032704 3445417086
+23223000000 23224153332 7741000000 7741384444 3446032704 3446417148
+23226000000 23227153438 7742000000 7742384479 3447032704 3447417183
+23229000000 23230153619 7743000000 7743384539 3448032704 3448417243
+23232000000 23233153831 7744000000 7744384610 3449032704 3449417314
+23235000000 23236153938 7745000000 7745384646 3450032704 3450417350
+23238000000 23239154104 7746000000 7746384701 3451032704 3451417405
+23241000000 23241752849 7747000000 7747250949 3452032704 3452283653
+23244000000 23245154375 7748000000 7748384791 3453032704 3453417495
+23247000000 23248154487 7749000000 7749384829 3454032704 3454417533
+23250000000 23251154696 7750000000 7750384898 3455032704 3455417602
+23253000000 23254154775 7751000000 7751384925 3456032704 3456417629
+23256000000 23257155000 7752000000 7752385000 3457032704 3457417704
+23259000000 23260155127 7753000000 7753385042 3458032704 3458417746
+23262000000 23263155216 7754000000 7754385072 3459032704 3459417776
+23265000000 23266155322 7755000000 7755385107 3460032704 3460417811
+23268000000 23269155533 7756000000 7756385177 3461032704 3461417881
+23271000000 23272155742 7757000000 7757385247 3462032704 3462417951
+23274000000 23275155887 7758000000 7758385295 3463032704 3463417999
+23277000000 23278156013 7759000000 7759385337 3464032704 3464418041
+23280000000 23281156179 7760000000 7760385393 3465032704 3465418097
+23283000000 23284156259 7761000000 7761385419 3466032704 3466418123
+23286000000 23287156494 7762000000 7762385498 3467032704 3467418202
+23289000000 23290156653 7763000000 7763385551 3468032704 3468418255
+23292000000 23293156774 7764000000 7764385591 3469032704 3469418295
+23295000000 23296156934 7765000000 7765385644 3470032704 3470418348
+23298000000 23299157017 7766000000 7766385672 3471032704 3471418376
+23301000000 23302157263 7767000000 7767385754 3472032704 3472418458
+23304000000 23305157386 7768000000 7768385795 3473032704 3473418499
+23307000000 23308157522 7769000000 7769385840 3474032704 3474418544
+23310000000 23311157697 7770000000 7770385899 3475032704 3475418603
+23313000000 23314157819 7771000000 7771385939 3476032704 3476418643
+23316000000 23317157969 7772000000 7772385989 3477032704 3477418693
+23319000000 23320158117 7773000000 7773386039 3478032704 3478418743
+23322000000 23322331811 7774000000 7774110603 3479032704 3479143307
+23325000000 23326158437 7775000000 7775386145 3480032704 3480418849
+23328000000 23329158569 7776000000 7776386189 3481032704 3481418893
+23331000000 23332158743 7777000000 7777386247 3482032704 3482418951
+23334000000 23335158862 7778000000 7778386287 3483032704 3483418991
+23337000000 23338158986 7779000000 7779386328 3484032704 3484419032
+23340000000 23341159205 7780000000 7780386401 3485032704 3485419105
+23343000000 23344159341 7781000000 7781386447 3486032704 3486419151
+23346000000 23347159492 7782000000 7782386497 3487032704 3487419201
+23349000000 23350159642 7783000000 7783386547 3488032704 3488419251
+23352000000 23353159757 7784000000 7784386585 3489032704 3489419289
+23355000000 23356159854 7785000000 7785386618 3490032704 3490419322
+23358000000 23359160062 7786000000 7786386687 3491032704 3491419391
+23361000000 23362160217 7787000000 7787386739 3492032704 3492419443
+23364000000 23365160376 7788000000 7788386792 3493032704 3493419496
+23367000000 23368160550 7789000000 7789386850 3494032704 3494419554
+23370000000 23371160650 7790000000 7790386883 3495032704 3495419587
+23373000000 23374160828 7791000000 7791386942 3496032704 3496419646
+23376000000 23377160977 7792000000 7792386992 3497032704 3497419696
+23379000000 23380161105 7793000000 7793387035 3498032704 3498419739
+23382000000 23383161274 7794000000 7794387091 3499032704 3499419795
+23385000000 23386161394 7795000000 7795387131 3500032704 3500419835
+23388000000 23387988744 7796000000 7795996248 3501032704 3501028952
+23391000000 23392161644 7797000000 7797387214 3502032704 3502419918
+23394000000 23395161902 7798000000 7798387300 3503032704 3503420004
+23397000000 23398162007 7799000000 7799387335 3504032704 3504420039
+23400000000 23401162087 7800000000 7800387362 3505032704 3505420066
+23403000000 23404162234 7801000000 7801387411 3506032704 3506420115
+23406000000 23407162488 7802000000 7802387496 3507032704 3507420200
+23409000000 23410162578 7803000000 7803387526 3508032704 3508420230
+23412000000 23413162823 7804000000 7804387607 3509032704 3509420311
+23415000000 23416162901 7805000000 7805387633 3510032704 3510420337
+23418000000 23419163078 7806000000 7806387692 3511032704 3511420396
+23421000000 23422163224 7807000000 7807387741 3512032704 3512420445
+23424000000 23425163368 7808000000 7808387789 3513032704 3513420493
+23427000000 23426786022 7809000000 7808928674 3514032704 3513961378
+23430000000 23431163683 7810000000 7810387894 3515032704 3515420598
+23433000000 23434163843 7811000000 7811387947 3516032704 3516420651
+23436000000 23437163980 7812000000 7812387993 3517032704 3517420697
+23439000000 23440164138 7813000000 7813388046 3518032704 3518420750
+23442000000 23443164296 7814000000 7814388098 3519032704 3519420802
+23445000000 23446164410 7815000000 7815388136 3520032704 3520420840
+23448000000 23449164571 7816000000 7816388190 3521032704 3521420894
+23451000000 23452164698 7817000000 7817388232 3522032704 3522420936
+23454000000 23455164807 7818000000 7818388269 3523032704 3523420973
+23457000000 23458164949 7819000000 7819388316 3524032704 3524421020
+23460000000 23461165183 7820000000 7820388394 3525032704 3525421098
+23463000000 23464165096 7821000000 7821388365 3526032704 3526421069
+23466000000 23467165217 7822000000 7822388405 3527032704 3527421109
+23469000000 23470165325 7823000000 7823388441 3528032704 3528421145
+23472000000 23473165560 7824000000 7824388520 3529032704 3529421224
+23475000000 23476165739 7825000000 7825388579 3530032704 3530421283
+23478000000 23479079379 7826000000 7826359793 3531032704 3531392497
+23481000000 23482166008 7827000000 7827388669 3532032704 3532421373
+23484000000 23485166181 7828000000 7828388727 3533032704 3533421431
+23487000000 23488166297 7829000000 7829388765 3534032704 3534421469
+23490000000 23491166470 7830000000 7830388823 3535032704 3535421527
+23493000000 23494166642 7831000000 7831388880 3536032704 3536421584
+23496000000 23497166698 7832000000 7832388899 3537032704 3537421603
+23499000000 23500166844 7833000000 7833388948 3538032704 3538421652
+23502000000 23503167040 7834000000 7834389013 3539032704 3539421717
+23505000000 23506167069 7835000000 7835389023 3540032704 3540421727
+23508000000 23509167375 7836000000 7836389125 3541032704 3541421829
+23511000000 23512167547 7837000000 7837389182 3542032704 3542421886
+23514000000 23515167680 7838000000 7838389226 3543032704 3543421930
+23517000000 23518167797 7839000000 7839389265 3544032704 3544421969
+23520000000 23521167982 7840000000 7840389327 3545032704 3545422031
+23523000000 23524168088 7841000000 7841389362 3546032704 3546422066
+23526000000 23527168269 7842000000 7842389423 3547032704 3547422127
+23529000000 23530168481 7843000000 7843389493 3548032704 3548422197
+23532000000 23533168588 7844000000 7844389529 3549032704 3549422233
+23535000000 23536168754 7845000000 7845389584 3550032704 3550422288
+23538000000 23538767499 7846000000 7846255833 3551032704 3551288537
+23541000000 23542169025 7847000000 7847389675 3552032704 3552422379
+23544000000 23545169137 7848000000 7848389712 3553032704 3553422416
+23547000000 23548169346 7849000000 7849389782 3554032704 3554422486
+23550000000 23551169425 7850000000 7850389808 3555032704 3555422512
+23553000000 23554169650 7851000000 7851389883 3556032704 3556422587
+23556000000 23557169777 7852000000 7852389925 3557032704 3557422629
+23559000000 23560169866 7853000000 7853389955 3558032704 3558422659
+23562000000 23563169972 7854000000 7854389990 3559032704 3559422694
+23565000000 23566170183 7855000000 7855390061 3560032704 3560422765
+23568000000 23569170392 7856000000 7856390130 3561032704 3561422834
+23571000000 23572170537 7857000000 7857390179 3562032704 3562422883
+23574000000 23575170663 7858000000 7858390221 3563032704 3563422925
+23577000000 23578170829 7859000000 7859390276 3564032704 3564422980
+23580000000 23581170909 7860000000 7860390303 3565032704 3565423007
+23583000000 23584171144 7861000000 7861390381 3566032704 3566423085
+23586000000 23587171303 7862000000 7862390434 3567032704 3567423138
+23589000000 23590171424 7863000000 7863390474 3568032704 3568423178
+23592000000 23593171584 7864000000 7864390528 3569032704 3569423232
+23595000000 23596171667 7865000000 7865390555 3570032704 3570423259
+23598000000 23599171913 7866000000 7866390637 3571032704 3571423341
+23601000000 23602172036 7867000000 7867390678 3572032704 3572423382
+23604000000 23605172172 7868000000 7868390724 3573032704 3573423428
+23607000000 23608172347 7869000000 7869390782 3574032704 3574423486
+23610000000 23611172469 7870000000 7870390823 3575032704 3575423527
+23613000000 23614172619 7871000000 7871390873 3576032704 3576423577
+23616000000 23617172767 7872000000 7872390922 3577032704 3577423626
+23619000000 23619346461 7873000000 7873115487 3578032704 3578148191
+23622000000 23623173087 7874000000 7874391029 3579032704 3579423733
+23625000000 23626173219 7875000000 7875391073 3580032704 3580423777
+23628000000 23629173393 7876000000 7876391131 3581032704 3581423835
+23631000000 23632173512 7877000000 7877391170 3582032704 3582423874
+23634000000 23635173636 7878000000 7878391212 3583032704 3583423916
+23637000000 23638173855 7879000000 7879391285 3584032704 3584423989
+23640000000 23641173991 7880000000 7880391330 3585032704 3585424034
+23643000000 23644174142 7881000000 7881391380 3586032704 3586424084
+23646000000 23647174292 7882000000 7882391430 3587032704 3587424134
+23649000000 23650174407 7883000000 7883391469 3588032704 3588424173
+23652000000 23653174504 7884000000 7884391501 3589032704 3589424205
+23655000000 23656174712 7885000000 7885391570 3590032704 3590424274
+23658000000 23659174867 7886000000 7886391622 3591032704 3591424326
+23661000000 23662175026 7887000000 7887391675 3592032704 3592424379
+23664000000 23665175200 7888000000 7888391733 3593032704 3593424437
+23667000000 23668175300 7889000000 7889391766 3594032704 3594424470
+23670000000 23671175478 7890000000 7890391826 3595032704 3595424530
+23673000000 23674175627 7891000000 7891391875 3596032704 3596424579
+23676000000 23677175755 7892000000 7892391918 3597032704 3597424622
+23679000000 23680175924 7893000000 7893391974 3598032704 3598424678
+23682000000 23683176044 7894000000 7894392014 3599032704 3599424718
+23685000000 23685003394 7895000000 7895001131 3600032704 3600033835
+23688000000 23689176294 7896000000 7896392098 3601032704 3601424802
+23691000000 23692176552 7897000000 7897392184 3602032704 3602424888
+23694000000 23695176657 7898000000 7898392219 3603032704 3603424923
+23697000000 23698176737 7899000000 7899392245 3604032704 3604424949
+23700000000 23701176884 7900000000 7900392294 3605032704 3605424998
+23703000000 23704177138 7901000000 7901392379 3606032704 3606425083
+23706000000 23707177228 7902000000 7902392409 3607032704 3607425113
+23709000000 23710177473 7903000000 7903392491 3608032704 3608425195
+23712000000 23713177551 7904000000 7904392517 3609032704 3609425221
+23715000000 23716177728 7905000000 7905392576 3610032704 3610425280
+23718000000 23719177874 7906000000 7906392624 3611032704 3611425328
+23721000000 23722178018 7907000000 7907392672 3612032704 3612425376
+23724000000 23723800672 7908000000 7907933557 3613032704 3612966261
+23727000000 23728178333 7909000000 7909392777 3614032704 3614425481
+23730000000 23731178493 7910000000 7910392831 3615032704 3615425535
+23733000000 23734178630 7911000000 7911392876 3616032704 3616425580
+23736000000 23737178788 7912000000 7912392929 3617032704 3617425633
+23739000000 23740178946 7913000000 7913392982 3618032704 3618425686
+23742000000 23743179060 7914000000 7914393020 3619032704 3619425724
+23745000000 23746179221 7915000000 7915393073 3620032704 3620425777
+23748000000 23749179348 7916000000 7916393116 3621032704 3621425820
+23751000000 23752179457 7917000000 7917393152 3622032704 3622425856
+23754000000 23755179599 7918000000 7918393199 3623032704 3623425903
+23757000000 23758179833 7919000000 7919393277 3624032704 3624425981
+23760000000 23761179746 7920000000 7920393248 3625032704 3625425952
+23763000000 23764179867 7921000000 7921393289 3626032704 3626425993
+23766000000 23767179975 7922000000 7922393325 3627032704 3627426029
+23769000000 23770180210 7923000000 7923393403 3628032704 3628426107
+23772000000 23773180389 7924000000 7924393463 3629032704 3629426167
+23775000000 23776094029 7925000000 7925364676 3630032704 3630397380
+23778000000 23779180658 7926000000 7926393552 3631032704 3631426256
+23781000000 23782180831 7927000000 7927393610 3632032704 3632426314
+23784000000 23785180947 7928000000 7928393649 3633032704 3633426353
+23787000000 23788181120 7929000000 7929393706 3634032704 3634426410
+23790000000 23791181292 7930000000 7930393764 3635032704 3635426468
+23793000000 23794181348 7931000000 7931393782 3636032704 3636426486
+23796000000 23797181494 7932000000 7932393831 3637032704 3637426535
+23799000000 23800181690 7933000000 7933393896 3638032704 3638426600
+23802000000 23803181719 7934000000 7934393906 3639032704 3639426610
+23805000000 23806182025 7935000000 7935394008 3640032704 3640426712
+23808000000 23809182197 7936000000 7936394065 3641032704 3641426769
+23811000000 23812182330 7937000000 7937394110 3642032704 3642426814
+23814000000 23815182447 7938000000 7938394149 3643032704 3643426853
+23817000000 23818182632 7939000000 7939394210 3644032704 3644426914
+23820000000 23821182738 7940000000 7940394246 3645032704 3645426950
+23823000000 23824182919 7941000000 7941394306 3646032704 3646427010
+23826000000 23827183131 7942000000 7942394377 3647032704 3647427081
+23829000000 23830183238 7943000000 7943394412 3648032704 3648427116
+23832000000 23833183404 7944000000 7944394468 3649032704 3649427172
+23835000000 23835782149 7945000000 7945260716 3650032704 3650293420
+23838000000 23839183675 7946000000 7946394558 3651032704 3651427262
+23841000000 23842183787 7947000000 7947394595 3652032704 3652427299
+23844000000 23845183996 7948000000 7948394665 3653032704 3653427369
+23847000000 23848184075 7949000000 7949394691 3654032704 3654427395
+23850000000 23851184300 7950000000 7950394766 3655032704 3655427470
+23853000000 23854184427 7951000000 7951394809 3656032704 3656427513
+23856000000 23857184516 7952000000 7952394838 3657032704 3657427542
+23859000000 23860184622 7953000000 7953394874 3658032704 3658427578
+23862000000 23863184833 7954000000 7954394944 3659032704 3659427648
+23865000000 23866185042 7955000000 7955395014 3660032704 3660427718
+23868000000 23869185187 7956000000 7956395062 3661032704 3661427766
+23871000000 23872185313 7957000000 7957395104 3662032704 3662427808
+23874000000 23875185479 7958000000 7958395159 3663032704 3663427863
+23877000000 23878185559 7959000000 7959395186 3664032704 3664427890
+23880000000 23881185794 7960000000 7960395264 3665032704 3665427968
+23883000000 23884185953 7961000000 7961395317 3666032704 3666428021
+23886000000 23887186074 7962000000 7962395358 3667032704 3667428062
+23889000000 23890186234 7963000000 7963395411 3668032704 3668428115
+23892000000 23893186317 7964000000 7964395439 3669032704 3669428143
+23895000000 23896186563 7965000000 7965395521 3670032704 3670428225
+23898000000 23899186686 7966000000 7966395562 3671032704 3671428266
+23901000000 23902186822 7967000000 7967395607 3672032704 3672428311
+23904000000 23905186997 7968000000 7968395665 3673032704 3673428369
+23907000000 23908187119 7969000000 7969395706 3674032704 3674428410
+23910000000 23911187269 7970000000 7970395756 3675032704 3675428460
+23913000000 23914187417 7971000000 7971395805 3676032704 3676428509
+23916000000 23916361111 7972000000 7972120370 3677032704 3677153074
+23919000000 23920187737 7973000000 7973395912 3678032704 3678428616
+23922000000 23923187869 7974000000 7974395956 3679032704 3679428660
+23925000000 23926188043 7975000000 7975396014 3680032704 3680428718
+23928000000 23929188162 7976000000 7976396054 3681032704 3681428758
+23931000000 23932188286 7977000000 7977396095 3682032704 3682428799
+23934000000 23935188505 7978000000 7978396168 3683032704 3683428872
+23937000000 23938188641 7979000000 7979396213 3684032704 3684428917
+23940000000 23941188792 7980000000 7980396264 3685032704 3685428968
+23943000000 23944188942 7981000000 7981396314 3686032704 3686429018
+23946000000 23947189057 7982000000 7982396352 3687032704 3687429056
+23949000000 23950189154 7983000000 7983396384 3688032704 3688429088
+23952000000 23953189362 7984000000 7984396454 3689032704 3689429158
+23955000000 23956189517 7985000000 7985396505 3690032704 3690429209
+23958000000 23959189676 7986000000 7986396558 3691032704 3691429262
+23961000000 23962189850 7987000000 7987396616 3692032704 3692429320
+23964000000 23965189950 7988000000 7988396650 3693032704 3693429354
+23967000000 23968190128 7989000000 7989396709 3694032704 3694429413
+23970000000 23971190277 7990000000 7990396759 3695032704 3695429463
+23973000000 23974190405 7991000000 7991396801 3696032704 3696429505
+23976000000 23977190574 7992000000 7992396858 3697032704 3697429562
+23979000000 23980190694 7993000000 7993396898 3698032704 3698429602
+23982000000 23982018044 7994000000 7994006014 3699032704 3699038718
+23985000000 23986190944 7995000000 7995396981 3700032704 3700429685
+23988000000 23989191202 7996000000 7996397067 3701032704 3701429771
+23991000000 23992191307 7997000000 7997397102 3702032704 3702429806
+23994000000 23995191387 7998000000 7998397129 3703032704 3703429833
+23997000000 23998191534 7999000000 7999397178 3704032704 3704429882
+24000000000 24001191788 8000000000 8000397262 3705032704 3705429966
+24003000000 24004191878 8001000000 8001397292 3706032704 3706429996
+24006000000 24007192123 8002000000 8002397374 3707032704 3707430078
+24009000000 24010192201 8003000000 8003397400 3708032704 3708430104
+24012000000 24013192378 8004000000 8004397459 3709032704 3709430163
+24015000000 24016192524 8005000000 8005397508 3710032704 3710430212
+24018000000 24019192668 8006000000 8006397556 3711032704 3711430260
+24021000000 24020815322 8007000000 8006938440 3712032704 3711971144
+24024000000 24025192983 8008000000 8008397661 3713032704 3713430365
+24027000000 24028193143 8009000000 8009397714 3714032704 3714430418
+24030000000 24031193280 8010000000 8010397760 3715032704 3715430464
+24033000000 24034193438 8011000000 8011397812 3716032704 3716430516
+24036000000 24037193596 8012000000 8012397865 3717032704 3717430569
+24039000000 24040193710 8013000000 8013397903 3718032704 3718430607
+24042000000 24043193871 8014000000 8014397957 3719032704 3719430661
+24045000000 24046193998 8015000000 8015397999 3720032704 3720430703
+24048000000 24049194107 8016000000 8016398035 3721032704 3721430739
+24051000000 24052194249 8017000000 8017398083 3722032704 3722430787
+24054000000 24055194483 8018000000 8018398161 3723032704 3723430865
+24057000000 24058194396 8019000000 8019398132 3724032704 3724430836
+24060000000 24061194517 8020000000 8020398172 3725032704 3725430876
+24063000000 24064194625 8021000000 8021398208 3726032704 3726430912
+24066000000 24067194860 8022000000 8022398286 3727032704 3727430990
+24069000000 24070195039 8023000000 8023398346 3728032704 3728431050
+24072000000 24073108679 8024000000 8024369559 3729032704 3729402263
+24075000000 24076195308 8025000000 8025398436 3730032704 3730431140
+24078000000 24079195481 8026000000 8026398493 3731032704 3731431197
+24081000000 24082195597 8027000000 8027398532 3732032704 3732431236
+24084000000 24085195770 8028000000 8028398590 3733032704 3733431294
+24087000000 24088195942 8029000000 8029398647 3734032704 3734431351
+24090000000 24091195998 8030000000 8030398666 3735032704 3735431370
+24093000000 24094196144 8031000000 8031398714 3736032704 3736431418
+24096000000 24097196340 8032000000 8032398780 3737032704 3737431484
+24099000000 24100196369 8033000000 8033398789 3738032704 3738431493
+24102000000 24103196675 8034000000 8034398891 3739032704 3739431595
+24105000000 24106196847 8035000000 8035398949 3740032704 3740431653
+24108000000 24109196980 8036000000 8036398993 3741032704 3741431697
+24111000000 24112197097 8037000000 8037399032 3742032704 3742431736
+24114000000 24115197282 8038000000 8038399094 3743032704 3743431798
+24117000000 24118197388 8039000000 8039399129 3744032704 3744431833
+24120000000 24121197569 8040000000 8040399189 3745032704 3745431893
+24123000000 24124197781 8041000000 8041399260 3746032704 3746431964
+24126000000 24127197888 8042000000 8042399296 3747032704 3747432000
+24129000000 24130198054 8043000000 8043399351 3748032704 3748432055
+24132000000 24132796799 8044000000 8044265599 3749032704 3749298303
+24135000000 24136198325 8045000000 8045399441 3750032704 3750432145
+24138000000 24139198437 8046000000 8046399479 3751032704 3751432183
+24141000000 24142198646 8047000000 8047399548 3752032704 3752432252
+24144000000 24145198725 8048000000 8048399575 3753032704 3753432279
+24147000000 24148198950 8049000000 8049399650 3754032704 3754432354
+24150000000 24151199077 8050000000 8050399692 3755032704 3755432396
+24153000000 24154199166 8051000000 8051399722 3756032704 3756432426
+24156000000 24157199272 8052000000 8052399757 3757032704 3757432461
+24159000000 24160199483 8053000000 8053399827 3758032704 3758432531
+24162000000 24163199692 8054000000 8054399897 3759032704 3759432601
+24165000000 24166199837 8055000000 8055399945 3760032704 3760432649
+24168000000 24169199963 8056000000 8056399987 3761032704 3761432691
+24171000000 24172200129 8057000000 8057400043 3762032704 3762432747
+24174000000 24175200209 8058000000 8058400069 3763032704 3763432773
+24177000000 24178200444 8059000000 8059400148 3764032704 3764432852
+24180000000 24181200603 8060000000 8060400201 3765032704 3765432905
+24183000000 24184200724 8061000000 8061400241 3766032704 3766432945
+24186000000 24187200884 8062000000 8062400294 3767032704 3767432998
+24189000000 24190200967 8063000000 8063400322 3768032704 3768433026
+24192000000 24193201213 8064000000 8064400404 3769032704 3769433108
+24195000000 24196201336 8065000000 8065400445 3770032704 3770433149
+24198000000 24199201472 8066000000 8066400490 3771032704 3771433194
+24201000000 24202201647 8067000000 8067400549 3772032704 3772433253
+24204000000 24205201769 8068000000 8068400589 3773032704 3773433293
+24207000000 24208201919 8069000000 8069400639 3774032704 3774433343
+24210000000 24211202067 8070000000 8070400689 3775032704 3775433393
+24213000000 24213375761 8071000000 8071125253 3776032704 3776157957
+24216000000 24217202387 8072000000 8072400795 3777032704 3777433499
+24219000000 24220202519 8073000000 8073400839 3778032704 3778433543
+24222000000 24223202693 8074000000 8074400897 3779032704 3779433601
+24225000000 24226202812 8075000000 8075400937 3780032704 3780433641
+24228000000 24229202936 8076000000 8076400978 3781032704 3781433682
+24231000000 24232203155 8077000000 8077401051 3782032704 3782433755
+24234000000 24235203291 8078000000 8078401097 3783032704 3783433801
+24237000000 24238203442 8079000000 8079401147 3784032704 3784433851
+24240000000 24241203592 8080000000 8080401197 3785032704 3785433901
+24243000000 24244203707 8081000000 8081401235 3786032704 3786433939
+24246000000 24247203804 8082000000 8082401268 3787032704 3787433972
+24249000000 24250204012 8083000000 8083401337 3788032704 3788434041
+24252000000 24253204167 8084000000 8084401389 3789032704 3789434093
+24255000000 24256204326 8085000000 8085401442 3790032704 3790434146
+24258000000 24259204500 8086000000 8086401500 3791032704 3791434204
+24261000000 24262204600 8087000000 8087401533 3792032704 3792434237
+24264000000 24265204778 8088000000 8088401592 3793032704 3793434296
+24267000000 24268204927 8089000000 8089401642 3794032704 3794434346
+24270000000 24271205055 8090000000 8090401685 3795032704 3795434389
+24273000000 24274205224 8091000000 8091401741 3796032704 3796434445
+24276000000 24277205344 8092000000 8092401781 3797032704 3797434485
+24279000000 24279032694 8093000000 8093010898 3798032704 3798043602
+24282000000 24283205594 8094000000 8094401864 3799032704 3799434568
+24285000000 24286205852 8095000000 8095401950 3800032704 3800434654
+24288000000 24289205957 8096000000 8096401985 3801032704 3801434689
+24291000000 24292206037 8097000000 8097402012 3802032704 3802434716
+24294000000 24295206184 8098000000 8098402061 3803032704 3803434765
+24297000000 24298206438 8099000000 8099402146 3804032704 3804434850
+24300000000 24301206528 8100000000 8100402176 3805032704 3805434880
+24303000000 24304206773 8101000000 8101402257 3806032704 3806434961
+24306000000 24307206851 8102000000 8102402283 3807032704 3807434987
+24309000000 24310207028 8103000000 8103402342 3808032704 3808435046
+24312000000 24313207174 8104000000 8104402391 3809032704 3809435095
+24315000000 24316207318 8105000000 8105402439 3810032704 3810435143
+24318000000 24317829972 8106000000 8105943324 3811032704 3810976028
+24321000000 24322207633 8107000000 8107402544 3812032704 3812435248
+24324000000 24325207793 8108000000 8108402597 3813032704 3813435301
+24327000000 24328207930 8109000000 8109402643 3814032704 3814435347
+24330000000 24331208088 8110000000 8110402696 3815032704 3815435400
+24333000000 24334208246 8111000000 8111402748 3816032704 3816435452
+24336000000 24337208360 8112000000 8112402786 3817032704 3817435490
+24339000000 24340208521 8113000000 8113402840 3818032704 3818435544
+24342000000 24343208648 8114000000 8114402882 3819032704 3819435586
+24345000000 24346208757 8115000000 8115402919 3820032704 3820435623
+24348000000 24349208899 8116000000 8116402966 3821032704 3821435670
+24351000000 24352209133 8117000000 8117403044 3822032704 3822435748
+24354000000 24355209046 8118000000 8118403015 3823032704 3823435719
+24357000000 24358209167 8119000000 8119403055 3824032704 3824435759
+24360000000 24361209275 8120000000 8120403091 3825032704 3825435795
+24363000000 24364209510 8121000000 8121403170 3826032704 3826435874
+24366000000 24367209689 8122000000 8122403229 3827032704 3827435933
+24369000000 24370123329 8123000000 8123374443 3828032704 3828407147
+24372000000 24373209958 8124000000 8124403319 3829032704 3829436023
+24375000000 24376210131 8125000000 8125403377 3830032704 3830436081
+24378000000 24379210247 8126000000 8126403415 3831032704 3831436119
+24381000000 24382210420 8127000000 8127403473 3832032704 3832436177
+24384000000 24385210592 8128000000 8128403530 3833032704 3833436234
+24387000000 24388210648 8129000000 8129403549 3834032704 3834436253
+24390000000 24391210794 8130000000 8130403598 3835032704 3835436302
+24393000000 24394210990 8131000000 8131403663 3836032704 3836436367
+24396000000 24397211019 8132000000 8132403673 3837032704 3837436377
+24399000000 24400211325 8133000000 8133403775 3838032704 3838436479
+24402000000 24403211497 8134000000 8134403832 3839032704 3839436536
+24405000000 24406211630 8135000000 8135403876 3840032704 3840436580
+24408000000 24409211747 8136000000 8136403915 3841032704 3841436619
+24411000000 24412211932 8137000000 8137403977 3842032704 3842436681
+24414000000 24415212038 8138000000 8138404012 3843032704 3843436716
+24417000000 24418212219 8139000000 8139404073 3844032704 3844436777
+24420000000 24421212431 8140000000 8140404143 3845032704 3845436847
+24423000000 24424212538 8141000000 8141404179 3846032704 3846436883
+24426000000 24427212704 8142000000 8142404234 3847032704 3847436938
+24429000000 24429811449 8143000000 8143270483 3848032704 3848303187
+24432000000 24433212975 8144000000 8144404325 3849032704 3849437029
+24435000000 24436213087 8145000000 8145404362 3850032704 3850437066
+24438000000 24439213296 8146000000 8146404432 3851032704 3851437136
+24441000000 24442213375 8147000000 8147404458 3852032704 3852437162
+24444000000 24445213600 8148000000 8148404533 3853032704 3853437237
+24447000000 24448213727 8149000000 8149404575 3854032704 3854437279
+24450000000 24451213816 8150000000 8150404605 3855032704 3855437309
+24453000000 24454213922 8151000000 8151404640 3856032704 3856437344
+24456000000 24457214133 8152000000 8152404711 3857032704 3857437415
+24459000000 24460214342 8153000000 8153404780 3858032704 3858437484
+24462000000 24463214487 8154000000 8154404829 3859032704 3859437533
+24465000000 24466214613 8155000000 8155404871 3860032704 3860437575
+24468000000 24469214779 8156000000 8156404926 3861032704 3861437630
+24471000000 24472214859 8157000000 8157404953 3862032704 3862437657
+24474000000 24475215094 8158000000 8158405031 3863032704 3863437735
+24477000000 24478215253 8159000000 8159405084 3864032704 3864437788
+24480000000 24481215374 8160000000 8160405124 3865032704 3865437828
+24483000000 24484215534 8161000000 8161405178 3866032704 3866437882
+24486000000 24487215617 8162000000 8162405205 3867032704 3867437909
+24489000000 24490215863 8163000000 8163405287 3868032704 3868437991
+24492000000 24493215986 8164000000 8164405328 3869032704 3869438032
+24495000000 24496216122 8165000000 8165405374 3870032704 3870438078
+24498000000 24499216297 8166000000 8166405432 3871032704 3871438136
+24501000000 24502216419 8167000000 8167405473 3872032704 3872438177
+24504000000 24505216569 8168000000 8168405523 3873032704 3873438227
+24507000000 24508216717 8169000000 8169405572 3874032704 3874438276
+24510000000 24510390411 8170000000 8170130137 3875032704 3875162841
+24513000000 24514217037 8171000000 8171405679 3876032704 3876438383
+24516000000 24517217169 8172000000 8172405723 3877032704 3877438427
+24519000000 24520217343 8173000000 8173405781 3878032704 3878438485
+24522000000 24523217462 8174000000 8174405820 3879032704 3879438524
+24525000000 24526217586 8175000000 8175405862 3880032704 3880438566
+24528000000 24529217805 8176000000 8176405935 3881032704 3881438639
+24531000000 24532217941 8177000000 8177405980 3882032704 3882438684
+24534000000 24535218092 8178000000 8178406030 3883032704 3883438734
+24537000000 24538218242 8179000000 8179406080 3884032704 3884438784
+24540000000 24541218357 8180000000 8180406119 3885032704 3885438823
+24543000000 24544218454 8181000000 8181406151 3886032704 3886438855
+24546000000 24547218662 8182000000 8182406220 3887032704 3887438924
+24549000000 24550218817 8183000000 8183406272 3888032704 3888438976
+24552000000 24553218976 8184000000 8184406325 3889032704 3889439029
+24555000000 24556219150 8185000000 8185406383 3890032704 3890439087
+24558000000 24559219250 8186000000 8186406416 3891032704 3891439120
+24561000000 24562219428 8187000000 8187406476 3892032704 3892439180
+24564000000 24565219577 8188000000 8188406525 3893032704 3893439229
+24567000000 24568219705 8189000000 8189406568 3894032704 3894439272
+24570000000 24571219874 8190000000 8190406624 3895032704 3895439328
+24573000000 24574219994 8191000000 8191406664 3896032704 3896439368
+24576000000 24576047344 8192000000 8192015781 3897032704 3897048485
+24579000000 24580220244 8193000000 8193406748 3898032704 3898439452
+24582000000 24583220502 8194000000 8194406834 3899032704 3899439538
+24585000000 24586220607 8195000000 8195406869 3900032704 3900439573
+24588000000 24589220687 8196000000 8196406895 3901032704 3901439599
+24591000000 24592220834 8197000000 8197406944 3902032704 3902439648
+24594000000 24595221088 8198000000 8198407029 3903032704 3903439733
+24597000000 24598221178 8199000000 8199407059 3904032704 3904439763
+24600000000 24601221423 8200000000 8200407141 3905032704 3905439845
+24603000000 24604221501 8201000000 8201407167 3906032704 3906439871
+24606000000 24607221678 8202000000 8202407226 3907032704 3907439930
+24609000000 24610221824 8203000000 8203407274 3908032704 3908439978
+24612000000 24613221968 8204000000 8204407322 3909032704 3909440026
+24615000000 24614844622 8205000000 8204948207 3910032704 3909980911
+24618000000 24619222283 8206000000 8206407427 3911032704 3911440131
+24621000000 24622222443 8207000000 8207407481 3912032704 3912440185
+24624000000 24625222580 8208000000 8208407526 3913032704 3913440230
+24627000000 24628222738 8209000000 8209407579 3914032704 3914440283
+24630000000 24631222896 8210000000 8210407632 3915032704 3915440336
+24633000000 24634223010 8211000000 8211407670 3916032704 3916440374
+24636000000 24637223171 8212000000 8212407723 3917032704 3917440427
+24639000000 24640223298 8213000000 8213407766 3918032704 3918440470
+24642000000 24643223407 8214000000 8214407802 3919032704 3919440506
+24645000000 24646223549 8215000000 8215407849 3920032704 3920440553
+24648000000 24649223783 8216000000 8216407927 3921032704 3921440631
+24651000000 24652223696 8217000000 8217407898 3922032704 3922440602
+24654000000 24655223817 8218000000 8218407939 3923032704 3923440643
+24657000000 24658223925 8219000000 8219407975 3924032704 3924440679
+24660000000 24661224160 8220000000 8220408053 3925032704 3925440757
+24663000000 24664224339 8221000000 8221408113 3926032704 3926440817
+24666000000 24667137979 8222000000 8222379326 3927032704 3927412030
+24669000000 24670224608 8223000000 8223408202 3928032704 3928440906
+24672000000 24673224781 8224000000 8224408260 3929032704 3929440964
+24675000000 24676224897 8225000000 8225408299 3930032704 3930441003
+24678000000 24679225070 8226000000 8226408356 3931032704 3931441060
+24681000000 24682225242 8227000000 8227408414 3932032704 3932441118
+24684000000 24685225298 8228000000 8228408432 3933032704 3933441136
+24687000000 24688225444 8229000000 8229408481 3934032704 3934441185
+24690000000 24691225640 8230000000 8230408546 3935032704 3935441250
+24693000000 24694225669 8231000000 8231408556 3936032704 3936441260
+24696000000 24697225975 8232000000 8232408658 3937032704 3937441362
+24699000000 24700226147 8233000000 8233408715 3938032704 3938441419
+24702000000 24703226280 8234000000 8234408760 3939032704 3939441464
+24705000000 24706226397 8235000000 8235408799 3940032704 3940441503
+24708000000 24709226582 8236000000 8236408860 3941032704 3941441564
+24711000000 24712226688 8237000000 8237408896 3942032704 3942441600
+24714000000 24715226869 8238000000 8238408956 3943032704 3943441660
+24717000000 24718227081 8239000000 8239409027 3944032704 3944441731
+24720000000 24721227188 8240000000 8240409062 3945032704 3945441766
+24723000000 24724227354 8241000000 8241409118 3946032704 3946441822
+24726000000 24726826099 8242000000 8242275366 3947032704 3947308070
+24729000000 24730227625 8243000000 8243409208 3948032704 3948441912
+24732000000 24733227737 8244000000 8244409245 3949032704 3949441949
+24735000000 24736227946 8245000000 8245409315 3950032704 3950442019
+24738000000 24739228025 8246000000 8246409341 3951032704 3951442045
+24741000000 24742228250 8247000000 8247409416 3952032704 3952442120
+24744000000 24745228377 8248000000 8248409459 3953032704 3953442163
+24747000000 24748228466 8249000000 8249409488 3954032704 3954442192
+24750000000 24751228572 8250000000 8250409524 3955032704 3955442228
+24753000000 24754228783 8251000000 8251409594 3956032704 3956442298
+24756000000 24757228992 8252000000 8252409664 3957032704 3957442368
+24759000000 24760229137 8253000000 8253409712 3958032704 3958442416
+24762000000 24763229263 8254000000 8254409754 3959032704 3959442458
+24765000000 24766229429 8255000000 8255409809 3960032704 3960442513
+24768000000 24769229509 8256000000 8256409836 3961032704 3961442540
+24771000000 24772229744 8257000000 8257409914 3962032704 3962442618
+24774000000 24775229903 8258000000 8258409967 3963032704 3963442671
+24777000000 24778230024 8259000000 8259410008 3964032704 3964442712
+24780000000 24781230184 8260000000 8260410061 3965032704 3965442765
+24783000000 24784230267 8261000000 8261410089 3966032704 3966442793
+24786000000 24787230513 8262000000 8262410171 3967032704 3967442875
+24789000000 24790230636 8263000000 8263410212 3968032704 3968442916
+24792000000 24793230772 8264000000 8264410257 3969032704 3969442961
+24795000000 24796230947 8265000000 8265410315 3970032704 3970443019
+24798000000 24799231069 8266000000 8266410356 3971032704 3971443060
+24801000000 24802231219 8267000000 8267410406 3972032704 3972443110
+24804000000 24805231367 8268000000 8268410455 3973032704 3973443159
+24807000000 24807405061 8269000000 8269135020 3974032704 3974167724
+24810000000 24811231687 8270000000 8270410562 3975032704 3975443266
+24813000000 24814231819 8271000000 8271410606 3976032704 3976443310
+24816000000 24817231993 8272000000 8272410664 3977032704 3977443368
+24819000000 24820232112 8273000000 8273410704 3978032704 3978443408
+24822000000 24823232236 8274000000 8274410745 3979032704 3979443449
+24825000000 24826232455 8275000000 8275410818 3980032704 3980443522
+24828000000 24829232591 8276000000 8276410863 3981032704 3981443567
+24831000000 24832232742 8277000000 8277410914 3982032704 3982443618
+24834000000 24835232892 8278000000 8278410964 3983032704 3983443668
+24837000000 24838233007 8279000000 8279411002 3984032704 3984443706
+24840000000 24841233104 8280000000 8280411034 3985032704 3985443738
+24843000000 24844233312 8281000000 8281411104 3986032704 3986443808
+24846000000 24847233467 8282000000 8282411155 3987032704 3987443859
+24849000000 24850233626 8283000000 8283411208 3988032704 3988443912
+24852000000 24853233800 8284000000 8284411266 3989032704 3989443970
+24855000000 24856233900 8285000000 8285411300 3990032704 3990444004
+24858000000 24859234078 8286000000 8286411359 3991032704 3991444063
+24861000000 24862234227 8287000000 8287411409 3992032704 3992444113
+24864000000 24865234355 8288000000 8288411451 3993032704 3993444155
+24867000000 24868234524 8289000000 8289411508 3994032704 3994444212
+24870000000 24871234644 8290000000 8290411548 3995032704 3995444252
+24873000000 24873061994 8291000000 8291020664 3996032704 3996053368
+24876000000 24877234894 8292000000 8292411631 3997032704 3997444335
+24879000000 24880235152 8293000000 8293411717 3998032704 3998444421
+24882000000 24883235257 8294000000 8294411752 3999032704 3999444456
+24885000000 24886235337 8295000000 8295411779 4000032704 4000444483
+24888000000 24889235484 8296000000 8296411828 4001032704 4001444532
+24891000000 24892235738 8297000000 8297411912 4002032704 4002444616
+24894000000 24895235828 8298000000 8298411942 4003032704 4003444646
+24897000000 24898236073 8299000000 8299412024 4004032704 4004444728
+24900000000 24901236151 8300000000 8300412050 4005032704 4005444754
+24903000000 24904236328 8301000000 8301412109 4006032704 4006444813
+24906000000 24907236474 8302000000 8302412158 4007032704 4007444862
+24909000000 24910236618 8303000000 8303412206 4008032704 4008444910
+24912000000 24911859272 8304000000 8303953090 4009032704 4008985794
+24915000000 24916236933 8305000000 8305412311 4010032704 4010445015
+24918000000 24919237093 8306000000 8306412364 4011032704 4011445068
+24921000000 24922237230 8307000000 8307412410 4012032704 4012445114
+24924000000 24925237388 8308000000 8308412462 4013032704 4013445166
+24927000000 24928237546 8309000000 8309412515 4014032704 4014445219
+24930000000 24931237660 8310000000 8310412553 4015032704 4015445257
+24933000000 24934237821 8311000000 8311412607 4016032704 4016445311
+24936000000 24937237948 8312000000 8312412649 4017032704 4017445353
+24939000000 24940238057 8313000000 8313412685 4018032704 4018445389
+24942000000 24943238199 8314000000 8314412733 4019032704 4019445437
+24945000000 24946238433 8315000000 8315412811 4020032704 4020445515
+24948000000 24949238346 8316000000 8316412782 4021032704 4021445486
+24951000000 24952238467 8317000000 8317412822 4022032704 4022445526
+24954000000 24955238575 8318000000 8318412858 4023032704 4023445562
+24957000000 24958238810 8319000000 8319412936 4024032704 4024445640
+24960000000 24961238989 8320000000 8320412996 4025032704 4025445700
+24963000000 24964152629 8321000000 8321384209 4026032704 4026416913
+24966000000 24967239258 8322000000 8322413086 4027032704 4027445790
+24969000000 24970239431 8323000000 8323413143 4028032704 4028445847
+24972000000 24973239547 8324000000 8324413182 4029032704 4029445886
+24975000000 24976239720 8325000000 8325413240 4030032704 4030445944
+24978000000 24979239892 8326000000 8326413297 4031032704 4031446001
+24981000000 24982239948 8327000000 8327413316 4032032704 4032446020
+24984000000 24985240094 8328000000 8328413364 4033032704 4033446068
+24987000000 24988240290 8329000000 8329413430 4034032704 4034446134
+24990000000 24991240319 8330000000 8330413439 4035032704 4035446143
+24993000000 24994240625 8331000000 8331413541 4036032704 4036446245
+24996000000 24997240797 8332000000 8332413599 4037032704 4037446303
+24999000000 25000240930 8333000000 8333413643 4038032704 4038446347
+25002000000 25003241047 8334000000 8334413682 4039032704 4039446386
+25005000000 25006241232 8335000000 8335413744 4040032704 4040446448
+25008000000 25009241338 8336000000 8336413779 4041032704 4041446483
+25011000000 25012241519 8337000000 8337413839 4042032704 4042446543
+25014000000 25015241731 8338000000 8338413910 4043032704 4043446614
+25017000000 25018241838 8339000000 8339413946 4044032704 4044446650
+25020000000 25021242004 8340000000 8340414001 4045032704 4045446705
+25023000000 25023840749 8341000000 8341280249 4046032704 4046312953
+25026000000 25027242275 8342000000 8342414091 4047032704 4047446795
+25029000000 25030242387 8343000000 8343414129 4048032704 4048446833
+25032000000 25033242596 8344000000 8344414198 4049032704 4049446902
+25035000000 25036242675 8345000000 8345414225 4050032704 4050446929
+25038000000 25039242900 8346000000 8346414300 4051032704 4051447004
+25041000000 25042243027 8347000000 8347414342 4052032704 4052447046
+25044000000 25045243116 8348000000 8348414372 4053032704 4053447076
+25047000000 25048243222 8349000000 8349414407 4054032704 4054447111
+25050000000 25051243433 8350000000 8350414477 4055032704 4055447181
+25053000000 25054243642 8351000000 8351414547 4056032704 4056447251
+25056000000 25057243787 8352000000 8352414595 4057032704 4057447299
+25059000000 25060243913 8353000000 8353414637 4058032704 4058447341
+25062000000 25063244079 8354000000 8354414693 4059032704 4059447397
+25065000000 25066244159 8355000000 8355414719 4060032704 4060447423
+25068000000 25069244394 8356000000 8356414798 4061032704 4061447502
+25071000000 25072244553 8357000000 8357414851 4062032704 4062447555
+25074000000 25075244674 8358000000 8358414891 4063032704 4063447595
+25077000000 25078244834 8359000000 8359414944 4064032704 4064447648
+25080000000 25081244917 8360000000 8360414972 4065032704 4065447676
+25083000000 25084245163 8361000000 8361415054 4066032704 4066447758
+25086000000 25087245286 8362000000 8362415095 4067032704 4067447799
+25089000000 25090245422 8363000000 8363415140 4068032704 4068447844
+25092000000 25093245597 8364000000 8364415199 4069032704 4069447903
+25095000000 25096245719 8365000000 8365415239 4070032704 4070447943
+25098000000 25099245869 8366000000 8366415289 4071032704 4071447993
+25101000000 25102246017 8367000000 8367415339 4072032704 4072448043
+25104000000 25104419711 8368000000 8368139903 4073032704 4073172607
+25107000000 25108246337 8369000000 8369415445 4074032704 4074448149
+25110000000 25111246469 8370000000 8370415489 4075032704 4075448193
+25113000000 25114246643 8371000000 8371415547 4076032704 4076448251
+25116000000 25117246762 8372000000 8372415587 4077032704 4077448291
+25119000000 25120246886 8373000000 8373415628 4078032704 4078448332
+25122000000 25123247105 8374000000 8374415701 4079032704 4079448405
+25125000000 25126247241 8375000000 8375415747 4080032704 4080448451
+25128000000 25129247392 8376000000 8376415797 4081032704 4081448501
+25131000000 25132247542 8377000000 8377415847 4082032704 4082448551
+25134000000 25135247657 8378000000 8378415885 4083032704 4083448589
+25137000000 25138247754 8379000000 8379415918 4084032704 4084448622
+25140000000 25141247962 8380000000 8380415987 4085032704 4085448691
+25143000000 25144248117 8381000000 8381416039 4086032704 4086448743
+25146000000 25147248276 8382000000 8382416092 4087032704 4087448796
+25149000000 25150248450 8383000000 8383416150 4088032704 4088448854
+25152000000 25153248550 8384000000 8384416183 4089032704 4089448887
+25155000000 25156248728 8385000000 8385416242 4090032704 4090448946
+25158000000 25159248877 8386000000 8386416292 4091032704 4091448996
+25161000000 25162249005 8387000000 8387416335 4092032704 4092449039
+25164000000 25165249174 8388000000 8388416391 4093032704 4093449095
+25167000000 25168249294 8389000000 8389416431 4094032704 4094449135
+25170000000 25170076644 8390000000 8390025548 4095032704 4095058252
+25173000000 25174249544 8391000000 8391416514 4096032704 4096449218
+25176000000 25177249802 8392000000 8392416600 4097032704 4097449304
+25179000000 25180249907 8393000000 8393416635 4098032704 4098449339
+25182000000 25183249987 8394000000 8394416662 4099032704 4099449366
+25185000000 25186250134 8395000000 8395416711 4100032704 4100449415
+25188000000 25189250388 8396000000 8396416796 4101032704 4101449500
+25191000000 25192250478 8397000000 8397416826 4102032704 4102449530
+25194000000 25195250723 8398000000 8398416907 4103032704 4103449611
+25197000000 25198250801 8399000000 8399416933 4104032704 4104449637
+25200000000 25201250978 8400000000 8400416992 4105032704 4105449696
+25203000000 25204251124 8401000000 8401417041 4106032704 4106449745
+25206000000 25207251268 8402000000 8402417089 4107032704 4107449793
+25209000000 25208873922 8403000000 8402957974 4108032704 4107990678
+25212000000 25213251583 8404000000 8404417194 4109032704 4109449898
+25215000000 25216251743 8405000000 8405417247 4110032704 4110449951
+25218000000 25219251880 8406000000 8406417293 4111032704 4111449997
+25221000000 25222252038 8407000000 8407417346 4112032704 4112450050
+25224000000 25225252196 8408000000 8408417398 4113032704 4113450102
+25227000000 25228252310 8409000000 8409417436 4114032704 4114450140
+25230000000 25231252471 8410000000 8410417490 4115032704 4115450194
+25233000000 25234252598 8411000000 8411417532 4116032704 4116450236
+25236000000 25237252707 8412000000 8412417569 4117032704 4117450273
+25239000000 25240252849 8413000000 8413417616 4118032704 4118450320
+25242000000 25243253083 8414000000 8414417694 4119032704 4119450398
+25245000000 25246252996 8415000000 8415417665 4120032704 4120450369
+25248000000 25249253117 8416000000 8416417705 4121032704 4121450409
+25251000000 25252253225 8417000000 8417417741 4122032704 4122450445
+25254000000 25255253460 8418000000 8418417820 4123032704 4123450524
+25257000000 25258253639 8419000000 8419417879 4124032704 4124450583
+25260000000 25261167279 8420000000 8420389093 4125032704 4125421797
+25263000000 25264253908 8421000000 8421417969 4126032704 4126450673
+25266000000 25267254081 8422000000 8422418027 4127032704 4127450731
+25269000000 25270254197 8423000000 8423418065 4128032704 4128450769
+25272000000 25273254370 8424000000 8424418123 4129032704 4129450827
+25275000000 25276254542 8425000000 8425418180 4130032704 4130450884
+25278000000 25279254598 8426000000 8426418199 4131032704 4131450903
+25281000000 25282254744 8427000000 8427418248 4132032704 4132450952
+25284000000 25285254940 8428000000 8428418313 4133032704 4133451017
+25287000000 25288254969 8429000000 8429418323 4134032704 4134451027
+25290000000 25291255275 8430000000 8430418425 4135032704 4135451129
+25293000000 25294255447 8431000000 8431418482 4136032704 4136451186
+25296000000 25297255580 8432000000 8432418526 4137032704 4137451230
+25299000000 25300255697 8433000000 8433418565 4138032704 4138451269
+25302000000 25303255882 8434000000 8434418627 4139032704 4139451331
+25305000000 25306255988 8435000000 8435418662 4140032704 4140451366
+25308000000 25309256169 8436000000 8436418723 4141032704 4141451427
+25311000000 25312256381 8437000000 8437418793 4142032704 4142451497
+25314000000 25315256488 8438000000 8438418829 4143032704 4143451533
+25317000000 25318256654 8439000000 8439418884 4144032704 4144451588
+25320000000 25320855399 8440000000 8440285133 4145032704 4145317837
+25323000000 25324256925 8441000000 8441418975 4146032704 4146451679
+25326000000 25327257037 8442000000 8442419012 4147032704 4147451716
+25329000000 25330257246 8443000000 8443419082 4148032704 4148451786
+25332000000 25333257325 8444000000 8444419108 4149032704 4149451812
+25335000000 25336257550 8445000000 8445419183 4150032704 4150451887
+25338000000 25339257677 8446000000 8446419225 4151032704 4151451929
+25341000000 25342257766 8447000000 8447419255 4152032704 4152451959
+25344000000 25345257872 8448000000 8448419290 4153032704 4153451994
+25347000000 25348258083 8449000000 8449419361 4154032704 4154452065
+25350000000 25351258292 8450000000 8450419430 4155032704 4155452134
+25353000000 25354258437 8451000000 8451419479 4156032704 4156452183
+25356000000 25357258563 8452000000 8452419521 4157032704 4157452225
+25359000000 25360258729 8453000000 8453419576 4158032704 4158452280
+25362000000 25363258809 8454000000 8454419603 4159032704 4159452307
+25365000000 25366259044 8455000000 8455419681 4160032704 4160452385
+25368000000 25369259203 8456000000 8456419734 4161032704 4161452438
+25371000000 25372259324 8457000000 8457419774 4162032704 4162452478
+25374000000 25375259484 8458000000 8458419828 4163032704 4163452532
+25377000000 25378259567 8459000000 8459419855 4164032704 4164452559
+25380000000 25381259813 8460000000 8460419937 4165032704 4165452641
+25383000000 25384259936 8461000000 8461419978 4166032704 4166452682
+25386000000 25387260072 8462000000 8462420024 4167032704 4167452728
+25389000000 25390260247 8463000000 8463420082 4168032704 4168452786
+25392000000 25393260369 8464000000 8464420123 4169032704 4169452827
+25395000000 25396260519 8465000000 8465420173 4170032704 4170452877
+25398000000 25399260667 8466000000 8466420222 4171032704 4171452926
+25401000000 25401434361 8467000000 8467144787 4172032704 4172177491
+25404000000 25405260987 8468000000 8468420329 4173032704 4173453033
+25407000000 25408261119 8469000000 8469420373 4174032704 4174453077
+25410000000 25411261293 8470000000 8470420431 4175032704 4175453135
+25413000000 25414261412 8471000000 8471420470 4176032704 4176453174
+25416000000 25417261536 8472000000 8472420512 4177032704 4177453216
+25419000000 25420261755 8473000000 8473420585 4178032704 4178453289
+25422000000 25423261891 8474000000 8474420630 4179032704 4179453334
+25425000000 25426262042 8475000000 8475420680 4180032704 4180453384
+25428000000 25429262192 8476000000 8476420730 4181032704 4181453434
+25431000000 25432262307 8477000000 8477420769 4182032704 4182453473
+25434000000 25435262404 8478000000 8478420801 4183032704 4183453505
+25437000000 25438262612 8479000000 8479420870 4184032704 4184453574
+25440000000 25441262767 8480000000 8480420922 4185032704 4185453626
+25443000000 25444262926 8481000000 8481420975 4186032704 4186453679
+25446000000 25447263100 8482000000 8482421033 4187032704 4187453737
+25449000000 25450263200 8483000000 8483421066 4188032704 4188453770
+25452000000 25453263378 8484000000 8484421126 4189032704 4189453830
+25455000000 25456263527 8485000000 8485421175 4190032704 4190453879
+25458000000 25459263655 8486000000 8486421218 4191032704 4191453922
+25461000000 25462263824 8487000000 8487421274 4192032704 4192453978
+25464000000 25465263944 8488000000 8488421314 4193032704 4193454018
+25467000000 25467091294 8489000000 8489030431 4194032704 4194063135
+25470000000 25471264194 8490000000 8490421398 4195032704 4195454102
+25473000000 25474264452 8491000000 8491421484 4196032704 4196454188
+25476000000 25477264557 8492000000 8492421519 4197032704 4197454223
+25479000000 25480264637 8493000000 8493421545 4198032704 4198454249
+25482000000 25483264784 8494000000 8494421594 4199032704 4199454298
+25485000000 25486265038 8495000000 8495421679 4200032704 4200454383
+25488000000 25489265128 8496000000 8496421709 4201032704 4201454413
+25491000000 25492265373 8497000000 8497421791 4202032704 4202454495
+25494000000 25495265451 8498000000 8498421817 4203032704 4203454521
+25497000000 25498265628 8499000000 8499421876 4204032704 4204454580
+25500000000 25501265774 8500000000 8500421924 4205032704 4205454628
+25503000000 25504265918 8501000000 8501421972 4206032704 4206454676
+25506000000 25505888572 8502000000 8501962857 4207032704 4206995561
+25509000000 25510266233 8503000000 8503422077 4208032704 4208454781
+25512000000 25513266393 8504000000 8504422131 4209032704 4209454835
+25515000000 25516266530 8505000000 8505422176 4210032704 4210454880
+25518000000 25519266688 8506000000 8506422229 4211032704 4211454933
+25521000000 25522266846 8507000000 8507422282 4212032704 4212454986
+25524000000 25525266960 8508000000 8508422320 4213032704 4213455024
+25527000000 25528267121 8509000000 8509422373 4214032704 4214455077
+25530000000 25531267248 8510000000 8510422416 4215032704 4215455120
+25533000000 25534267357 8511000000 8511422452 4216032704 4216455156
+25536000000 25537267499 8512000000 8512422499 4217032704 4217455203
+25539000000 25540267733 8513000000 8513422577 4218032704 4218455281
+25542000000 25543267646 8514000000 8514422548 4219032704 4219455252
+25545000000 25546267767 8515000000 8515422589 4220032704 4220455293
+25548000000 25549267875 8516000000 8516422625 4221032704 4221455329
+25551000000 25552268110 8517000000 8517422703 4222032704 4222455407
+25554000000 25555268289 8518000000 8518422763 4223032704 4223455467
+25557000000 25558181929 8519000000 8519393976 4224032704 4224426680
+25560000000 25561268558 8520000000 8520422852 4225032704 4225455556
+25563000000 25564268731 8521000000 8521422910 4226032704 4226455614
+25566000000 25567268847 8522000000 8522422949 4227032704 4227455653
+25569000000 25570269020 8523000000 8523423006 4228032704 4228455710
+25572000000 25573269192 8524000000 8524423064 4229032704 4229455768
+25575000000 25576269248 8525000000 8525423082 4230032704 4230455786
+25578000000 25579269394 8526000000 8526423131 4231032704 4231455835
+25581000000 25582269590 8527000000 8527423196 4232032704 4232455900
+25584000000 25585269619 8528000000 8528423206 4233032704 4233455910
+25587000000 25588269925 8529000000 8529423308 4234032704 4234456012
+25590000000 25591270097 8530000000 8530423365 4235032704 4235456069
+25593000000 25594270230 8531000000 8531423410 4236032704 4236456114
+25596000000 25597270347 8532000000 8532423449 4237032704 4237456153
+25599000000 25600270532 8533000000 8533423510 4238032704 4238456214
+25602000000 25603270638 8534000000 8534423546 4239032704 4239456250
+25605000000 25606270819 8535000000 8535423606 4240032704 4240456310
+25608000000 25609271031 8536000000 8536423677 4241032704 4241456381
+25611000000 25612271138 8537000000 8537423712 4242032704 4242456416
+25614000000 25615271304 8538000000 8538423768 4243032704 4243456472
+25617000000 25617870049 8539000000 8539290016 4244032704 4244322720
+25620000000 25621271575 8540000000 8540423858 4245032704 4245456562
+25623000000 25624271687 8541000000 8541423895 4246032704 4246456599
+25626000000 25627271896 8542000000 8542423965 4247032704 4247456669
+25629000000 25630271975 8543000000 8543423991 4248032704 4248456695
+25632000000 25633272200 8544000000 8544424066 4249032704 4249456770
+25635000000 25636272327 8545000000 8545424109 4250032704 4250456813
+25638000000 25639272416 8546000000 8546424138 4251032704 4251456842
+25641000000 25642272522 8547000000 8547424174 4252032704 4252456878
+25644000000 25645272733 8548000000 8548424244 4253032704 4253456948
+25647000000 25648272942 8549000000 8549424314 4254032704 4254457018
+25650000000 25651273087 8550000000 8550424362 4255032704 4255457066
+25653000000 25654273213 8551000000 8551424404 4256032704 4256457108
+25656000000 25657273379 8552000000 8552424459 4257032704 4257457163
+25659000000 25660273459 8553000000 8553424486 4258032704 4258457190
+25662000000 25663273694 8554000000 8554424564 4259032704 4259457268
+25665000000 25666273853 8555000000 8555424617 4260032704 4260457321
+25668000000 25669273974 8556000000 8556424658 4261032704 4261457362
+25671000000 25672274134 8557000000 8557424711 4262032704 4262457415
+25674000000 25675274217 8558000000 8558424739 4263032704 4263457443
+25677000000 25678274463 8559000000 8559424821 4264032704 4264457525
+25680000000 25681274586 8560000000 8560424862 4265032704 4265457566
+25683000000 25684274722 8561000000 8561424907 4266032704 4266457611
+25686000000 25687274897 8562000000 8562424965 4267032704 4267457669
+25689000000 25690275019 8563000000 8563425006 4268032704 4268457710
+25692000000 25693275169 8564000000 8564425056 4269032704 4269457760
+25695000000 25696275317 8565000000 8565425105 4270032704 4270457809
+25698000000 25698449011 8566000000 8566149670 4271032704 4271182374
+25701000000 25702275637 8567000000 8567425212 4272032704 4272457916
+25704000000 25705275769 8568000000 8568425256 4273032704 4273457960
+25707000000 25708275943 8569000000 8569425314 4274032704 4274458018
+25710000000 25711276062 8570000000 8570425354 4275032704 4275458058
+25713000000 25714276186 8571000000 8571425395 4276032704 4276458099
+25716000000 25717276405 8572000000 8572425468 4277032704 4277458172
+25719000000 25720276541 8573000000 8573425513 4278032704 4278458217
+25722000000 25723276692 8574000000 8574425564 4279032704 4279458268
+25725000000 25726276842 8575000000 8575425614 4280032704 4280458318
+25728000000 25729276957 8576000000 8576425652 4281032704 4281458356
+25731000000 25732277054 8577000000 8577425684 4282032704 4282458388
+25734000000 25735277262 8578000000 8578425754 4283032704 4283458458
+25737000000 25738277417 8579000000 8579425805 4284032704 4284458509
+25740000000 25741277576 8580000000 8580425858 4285032704 4285458562
+25743000000 25744277750 8581000000 8581425916 4286032704 4286458620
+25746000000 25747277850 8582000000 8582425950 4287032704 4287458654
+25749000000 25750278028 8583000000 8583426009 4288032704 4288458713
+25752000000 25753278177 8584000000 8584426059 4289032704 4289458763
+25755000000 25756278305 8585000000 8585426101 4290032704 4290458805
+25758000000 25759278474 8586000000 8586426158 4291032704 4291458862
+25761000000 25762278594 8587000000 8587426198 4292032704 4292458902
+25764000000 25764105944 8588000000 8588035314 4293032704 4293068018
+25767000000 25768278844 8589000000 8589426281 4294032704 4294458985
+25770000000 25771279102 8590000000 8590426367 65408 491775
+25773000000 25774279207 8591000000 8591426402 1065408 1491810
+25776000000 25777279287 8592000000 8592426429 2065408 2491837
+25779000000 25780279434 8593000000 8593426478 3065408 3491886
+25782000000 25783279688 8594000000 8594426562 4065408 4491970
+25785000000 25786279778 8595000000 8595426592 5065408 5492000
+25788000000 25789280023 8596000000 8596426674 6065408 6492082
+25791000000 25792280101 8597000000 8597426700 7065408 7492108
+25794000000 25795280278 8598000000 8598426759 8065408 8492167
+25797000000 25798280424 8599000000 8599426808 9065408 9492216
+25800000000 25801280568 8600000000 8600426856 10065408 10492264
+25803000000 25802903222 8601000000 8600967740 11065408 11033148
+25806000000 25807280883 8602000000 8602426961 12065408 12492369
+25809000000 25810281043 8603000000 8603427014 13065408 13492422
+25812000000 25813281180 8604000000 8604427060 14065408 14492468
+25815000000 25816281338 8605000000 8605427112 15065408 15492520
+25818000000 25819281496 8606000000 8606427165 16065408 16492573
+25821000000 25822281610 8607000000 8607427203 17065408 17492611
+25824000000 25825281771 8608000000 8608427257 18065408 18492665
+25827000000 25828281898 8609000000 8609427299 19065408 19492707
+25830000000 25831282007 8610000000 8610427335 20065408 20492743
+25833000000 25834282149 8611000000 8611427383 21065408 21492791
+25836000000 25837282383 8612000000 8612427461 22065408 22492869
+25839000000 25840282296 8613000000 8613427432 23065408 23492840
+25842000000 25843282417 8614000000 8614427472 24065408 24492880
+25845000000 25846282525 8615000000 8615427508 25065408 25492916
+25848000000 25849282760 8616000000 8616427586 26065408 26492994
+25851000000 25852282939 8617000000 8617427646 27065408 27493054
+25854000000 25855196579 8618000000 8618398859 28065408 28464267
+25857000000 25858283208 8619000000 8619427736 29065408 29493144
+25860000000 25861283381 8620000000 8620427793 30065408 30493201
+25863000000 25864283497 8621000000 8621427832 31065408 31493240
+25866000000 25867283670 8622000000 8622427890 32065408 32493298
+25869000000 25870283842 8623000000 8623427947 33065408 33493355
+25872000000 25873283898 8624000000 8624427966 34065408 34493374
+25875000000 25876284044 8625000000 8625428014 35065408 35493422
+25878000000 25879284240 8626000000 8626428080 36065408 36493488
+25881000000 25882284269 8627000000 8627428089 37065408 37493497
+25884000000 25885284575 8628000000 8628428191 38065408 38493599
+25887000000 25888284747 8629000000 8629428249 39065408 39493657
+25890000000 25891284880 8630000000 8630428293 40065408 40493701
+25893000000 25894284997 8631000000 8631428332 41065408 41493740
+25896000000 25897285182 8632000000 8632428394 42065408 42493802
+25899000000 25900285288 8633000000 8633428429 43065408 43493837
+25902000000 25903285469 8634000000 8634428489 44065408 44493897
+25905000000 25906285681 8635000000 8635428560 45065408 45493968
+25908000000 25909285788 8636000000 8636428596 46065408 46494004
+25911000000 25912285954 8637000000 8637428651 47065408 47494059
+25914000000 25914884699 8638000000 8638294899 48065408 48360307
+25917000000 25918286225 8639000000 8639428741 49065408 49494149
+25920000000 25921286337 8640000000 8640428779 50065408 50494187
+25923000000 25924286546 8641000000 8641428848 51065408 51494256
+25926000000 25927286625 8642000000 8642428875 52065408 52494283
+25929000000 25930286850 8643000000 8643428950 53065408 53494358
+25932000000 25933286977 8644000000 8644428992 54065408 54494400
+25935000000 25936287066 8645000000 8645429022 55065408 55494430
+25938000000 25939287172 8646000000 8646429057 56065408 56494465
+25941000000 25942287383 8647000000 8647429127 57065408 57494535
+25944000000 25945287592 8648000000 8648429197 58065408 58494605
+25947000000 25948287737 8649000000 8649429245 59065408 59494653
+25950000000 25951287863 8650000000 8650429287 60065408 60494695
+25953000000 25954288029 8651000000 8651429343 61065408 61494751
+25956000000 25957288109 8652000000 8652429369 62065408 62494777
+25959000000 25960288344 8653000000 8653429448 63065408 63494856
+25962000000 25963288503 8654000000 8654429501 64065408 64494909
+25965000000 25966288624 8655000000 8655429541 65065408 65494949
+25968000000 25969288784 8656000000 8656429594 66065408 66495002
+25971000000 25972288867 8657000000 8657429622 67065408 67495030
+25974000000 25975289113 8658000000 8658429704 68065408 68495112
+25977000000 25978289236 8659000000 8659429745 69065408 69495153
+25980000000 25981289372 8660000000 8660429790 70065408 70495198
+25983000000 25984289547 8661000000 8661429849 71065408 71495257
+25986000000 25987289669 8662000000 8662429889 72065408 72495297
+25989000000 25990289819 8663000000 8663429939 73065408 73495347
+25992000000 25993289967 8664000000 8664429989 74065408 74495397
+25995000000 25995463661 8665000000 8665154553 75065408 75219961
+25998000000 25999290287 8666000000 8666430095 76065408 76495503
+26001000000 26002290419 8667000000 8667430139 77065408 77495547
+26004000000 26005290593 8668000000 8668430197 78065408 78495605
+26007000000 26008290712 8669000000 8669430237 79065408 79495645
+26010000000 26011290836 8670000000 8670430278 80065408 80495686
+26013000000 26014291055 8671000000 8671430351 81065408 81495759
+26016000000 26017291191 8672000000 8672430397 82065408 82495805
+26019000000 26020291342 8673000000 8673430447 83065408 83495855
+26022000000 26023291492 8674000000 8674430497 84065408 84495905
+26025000000 26026291607 8675000000 8675430535 85065408 85495943
+26028000000 26029291704 8676000000 8676430568 86065408 86495976
+26031000000 26032291912 8677000000 8677430637 87065408 87496045
+26034000000 26035292067 8678000000 8678430689 88065408 88496097
+26037000000 26038292226 8679000000 8679430742 89065408 89496150
+26040000000 26041292400 8680000000 8680430800 90065408 90496208
+26043000000 26044292500 8681000000 8681430833 91065408 91496241
+26046000000 26047292678 8682000000 8682430892 92065408 92496300
+26049000000 26050292827 8683000000 8683430942 93065408 93496350
+26052000000 26053292955 8684000000 8684430985 94065408 94496393
+26055000000 26056293124 8685000000 8685431041 95065408 95496449
+26058000000 26059293244 8686000000 8686431081 96065408 96496489
+26061000000 26061120594 8687000000 8687040198 97065408 97105606
+26064000000 26065293494 8688000000 8688431164 98065408 98496572
+26067000000 26068293752 8689000000 8689431250 99065408 99496658
+26070000000 26071293857 8690000000 8690431285 100065408 100496693
+26073000000 26074293937 8691000000 8691431312 101065408 101496720
+26076000000 26077294084 8692000000 8692431361 102065408 102496769
+26079000000 26080294338 8693000000 8693431446 103065408 103496854
+26082000000 26083294428 8694000000 8694431476 104065408 104496884
+26085000000 26086294673 8695000000 8695431557 105065408 105496965
+26088000000 26089294751 8696000000 8696431583 106065408 106496991
+26091000000 26092294928 8697000000 8697431642 107065408 107497050
+26094000000 26095295074 8698000000 8698431691 108065408 108497099
+26097000000 26098295218 8699000000 8699431739 109065408 109497147
+26100000000 26099917872 8700000000 8699972624 110065408 110038032
+26103000000 26104295533 8701000000 8701431844 111065408 111497252
+26106000000 26107295693 8702000000 8702431897 112065408 112497305
+26109000000 26110295830 8703000000 8703431943 113065408 113497351
+26112000000 26113295988 8704000000 8704431996 114065408 114497404
+26115000000 26116296146 8705000000 8705432048 115065408 115497456
+26118000000 26119296260 8706000000 8706432086 116065408 116497494
+26121000000 26122296421 8707000000 8707432140 117065408 117497548
+26124000000 26125296548 8708000000 8708432182 118065408 118497590
+26127000000 26128296657 8709000000 8709432219 119065408 119497627
+26130000000 26131296799 8710000000 8710432266 120065408 120497674
+26133000000 26134297033 8711000000 8711432344 121065408 121497752
+26136000000 26137296946 8712000000 8712432315 122065408 122497723
+26139000000 26140297067 8713000000 8713432355 123065408 123497763
+26142000000 26143297175 8714000000 8714432391 124065408 124497799
+26145000000 26146297410 8715000000 8715432470 125065408 125497878
+26148000000 26149297589 8716000000 8716432529 126065408 126497937
+26151000000 26152211229 8717000000 8717403743 127065408 127469151
+26154000000 26155297858 8718000000 8718432619 128065408 128498027
+26157000000 26158298031 8719000000 8719432677 129065408 129498085
+26160000000 26161298147 8720000000 8720432715 130065408 130498123
+26163000000 26164298320 8721000000 8721432773 131065408 131498181
+26166000000 26167298492 8722000000 8722432830 132065408 132498238
+26169000000 26170298548 8723000000 8723432849 133065408 133498257
+26172000000 26173298694 8724000000 8724432898 134065408 134498306
+26175000000 26176298890 8725000000 8725432963 135065408 135498371
+26178000000 26179298919 8726000000 8726432973 136065408 136498381
+26181000000 26182299225 8727000000 8727433075 137065408 137498483
+26184000000 26185299397 8728000000 8728433132 138065408 138498540
+26187000000 26188299530 8729000000 8729433176 139065408 139498584
+26190000000 26191299647 8730000000 8730433215 140065408 140498623
+26193000000 26194299832 8731000000 8731433277 141065408 141498685
+26196000000 26197299938 8732000000 8732433312 142065408 142498720
+26199000000 26200300119 8733000000 8733433373 143065408 143498781
+26202000000 26203300331 8734000000 8734433443 144065408 144498851
+26205000000 26206300438 8735000000 8735433479 145065408 145498887
+26208000000 26209300604 8736000000 8736433534 146065408 146498942
+26211000000 26211899349 8737000000 8737299783 147065408 147365191
+26214000000 26215300875 8738000000 8738433625 148065408 148499033
+26217000000 26218300987 8739000000 8739433662 149065408 149499070
+26220000000 26221301196 8740000000 8740433732 150065408 150499140
+26223000000 26224301275 8741000000 8741433758 151065408 151499166
+26226000000 26227301500 8742000000 8742433833 152065408 152499241
+26229000000 26230301627 8743000000 8743433875 153065408 153499283
+26232000000 26233301716 8744000000 8744433905 154065408 154499313
+26235000000 26236301822 8745000000 8745433940 155065408 155499348
+26238000000 26239302033 8746000000 8746434011 156065408 156499419
+26241000000 26242302242 8747000000 8747434080 157065408 157499488
+26244000000 26245302387 8748000000 8748434129 158065408 158499537
+26247000000 26248302513 8749000000 8749434171 159065408 159499579
+26250000000 26251302679 8750000000 8750434226 160065408 160499634
+26253000000 26254302759 8751000000 8751434253 161065408 161499661
+26256000000 26257302994 8752000000 8752434331 162065408 162499739
+26259000000 26260303153 8753000000 8753434384 163065408 163499792
+26262000000 26263303274 8754000000 8754434424 164065408 164499832
+26265000000 26266303434 8755000000 8755434478 165065408 165499886
+26268000000 26269303517 8756000000 8756434505 166065408 166499913
+26271000000 26272303763 8757000000 8757434587 167065408 167499995
+26274000000 26275303886 8758000000 8758434628 168065408 168500036
+26277000000 26278304022 8759000000 8759434674 169065408 169500082
+26280000000 26281304197 8760000000 8760434732 170065408 170500140
+26283000000 26284304319 8761000000 8761434773 171065408 171500181
+26286000000 26287304469 8762000000 8762434823 172065408 172500231
+26289000000 26290304617 8763000000 8763434872 173065408 173500280
+26292000000 26292478311 8764000000 8764159437 174065408 174224845
+26295000000 26296304937 8765000000 8765434979 175065408 175500387
+26298000000 26299305069 8766000000 8766435023 176065408 176500431
+26301000000 26302305243 8767000000 8767435081 177065408 177500489
+26304000000 26305305362 8768000000 8768435120 178065408 178500528
+26307000000 26308305486 8769000000 8769435162 179065408 179500570
+26310000000 26311305705 8770000000 8770435235 180065408 180500643
+26313000000 26314305841 8771000000 8771435280 181065408 181500688
+26316000000 26317305992 8772000000 8772435330 182065408 182500738
+26319000000 26320306142 8773000000 8773435380 183065408 183500788
+26322000000 26323306257 8774000000 8774435419 184065408 184500827
+26325000000 26326306354 8775000000 8775435451 185065408 185500859
+26328000000 26329306562 8776000000 8776435520 186065408 186500928
+26331000000 26332306717 8777000000 8777435572 187065408 187500980
+26334000000 26335306876 8778000000 8778435625 188065408 188501033
+26337000000 26338307050 8779000000 8779435683 189065408 189501091
+26340000000 26341307150 8780000000 8780435716 190065408 190501124
+26343000000 26344307328 8781000000 8781435776 191065408 191501184
+26346000000 26347307477 8782000000 8782435825 192065408 192501233
+26349000000 26350307605 8783000000 8783435868 193065408 193501276
+26352000000 26353307774 8784000000 8784435924 194065408 194501332
+26355000000 26356307894 8785000000 8785435964 195065408 195501372
+26358000000 26358135244 8786000000 8786045081 196065408 196110489
+26361000000 26362308144 8787000000 8787436048 197065408 197501456
+26364000000 26365308402 8788000000 8788436134 198065408 198501542
+26367000000 26368308507 8789000000 8789436169 199065408 199501577
+26370000000 26371308587 8790000000 8790436195 200065408 200501603
+26373000000 26374308734 8791000000 8791436244 201065408 201501652
+26376000000 26377308988 8792000000 8792436329 202065408 202501737
+26379000000 26380309078 8793000000 8793436359 203065408 203501767
+26382000000 26383309323 8794000000 8794436441 204065408 204501849
+26385000000 26386309401 8795000000 8795436467 205065408 205501875
+26388000000 26389309578 8796000000 8796436526 206065408 206501934
+26391000000 26392309724 8797000000 8797436574 207065408 207501982
+26394000000 26395309868 8798000000 8798436622 208065408 208502030
+26397000000 26396932522 8799000000 8798977507 209065408 209042915
+26400000000 26401310183 8800000000 8800436727 210065408 210502135
+26403000000 26404310343 8801000000 8801436781 211065408 211502189
+26406000000 26407310480 8802000000 8802436826 212065408 212502234
+26409000000 26410310638 8803000000 8803436879 213065408 213502287
+26412000000 26413310796 8804000000 8804436932 214065408 214502340
+26415000000 26416310910 8805000000 8805436970 215065408 215502378
+26418000000 26419311071 8806000000 8806437023 216065408 216502431
+26421000000 26422311198 8807000000 8807437066 217065408 217502474
+26424000000 26425311307 8808000000 8808437102 218065408 218502510
+26427000000 26428311449 8809000000 8809437149 219065408 219502557
+26430000000 26431311683 8810000000 8810437227 220065408 220502635
+26433000000 26434311596 8811000000 8811437198 221065408 221502606
+26436000000 26437311717 8812000000 8812437239 222065408 222502647
+26439000000 26440311825 8813000000 8813437275 223065408 223502683
+26442000000 26443312060 8814000000 8814437353 224065408 224502761
+26445000000 26446312239 8815000000 8815437413 225065408 225502821
+26448000000 26449225879 8816000000 8816408626 226065408 226474034
+26451000000 26452312508 8817000000 8817437502 227065408 227502910
+26454000000 26455312681 8818000000 8818437560 228065408 228502968
+26457000000 26458312797 8819000000 8819437599 229065408 229503007
+26460000000 26461312970 8820000000 8820437656 230065408 230503064
+26463000000 26464313142 8821000000 8821437714 231065408 231503122
+26466000000 26467313198 8822000000 8822437732 232065408 232503140
+26469000000 26470313344 8823000000 8823437781 233065408 233503189
+26472000000 26473313540 8824000000 8824437846 234065408 234503254
+26475000000 26476313569 8825000000 8825437856 235065408 235503264
+26478000000 26479313875 8826000000 8826437958 236065408 236503366
+26481000000 26482314047 8827000000 8827438015 237065408 237503423
+26484000000 26485314180 8828000000 8828438060 238065408 238503468
+26487000000 26488314297 8829000000 8829438099 239065408 239503507
+26490000000 26491314482 8830000000 8830438160 240065408 240503568
+26493000000 26494314588 8831000000 8831438196 241065408 241503604
+26496000000 26497314769 8832000000 8832438256 242065408 242503664
+26499000000 26500314981 8833000000 8833438327 243065408 243503735
+26502000000 26503315088 8834000000 8834438362 244065408 244503770
+26505000000 26506315254 8835000000 8835438418 245065408 245503826
+26508000000 26508913999 8836000000 8836304666 246065408 246370074
+26511000000 26512315525 8837000000 8837438508 247065408 247503916
+26514000000 26515315637 8838000000 8838438545 248065408 248503953
+26517000000 26518315846 8839000000 8839438615 249065408 249504023
+26520000000 26521315925 8840000000 8840438641 250065408 250504049
+26523000000 26524316150 8841000000 8841438716 251065408 251504124
+26526000000 26527316277 8842000000 8842438759 252065408 252504167
+26529000000 26530316366 8843000000 8843438788 253065408 253504196
+26532000000 26533316472 8844000000 8844438824 254065408 254504232
+26535000000 26536316683 8845000000 8845438894 255065408 255504302
+26538000000 26539316892 8846000000 8846438964 256065408 256504372
+26541000000 26542317037 8847000000 8847439012 257065408 257504420
+26544000000 26545317163 8848000000 8848439054 258065408 258504462
+26547000000 26548317329 8849000000 8849439109 259065408 259504517
+26550000000 26551317409 8850000000 8850439136 260065408 260504544
+26553000000 26554317644 8851000000 8851439214 261065408 261504622
+26556000000 26557317803 8852000000 8852439267 262065408 262504675
+26559000000 26560317924 8853000000 8853439308 263065408 263504716
+26562000000 26563318084 8854000000 8854439361 264065408 264504769
+26565000000 26566318167 8855000000 8855439389 265065408 265504797
+26568000000 26569318413 8856000000 8856439471 266065408 266504879
+26571000000 26572318536 8857000000 8857439512 267065408 267504920
+26574000000 26575318672 8858000000 8858439557 268065408 268504965
+26577000000 26578318847 8859000000 8859439615 269065408 269505023
+26580000000 26581318969 8860000000 8860439656 270065408 270505064
+26583000000 26584319119 8861000000 8861439706 271065408 271505114
+26586000000 26587319267 8862000000 8862439755 272065408 272505163
+26589000000 26589492961 8863000000 8863164320 273065408 273229728
+26592000000 26593319587 8864000000 8864439862 274065408 274505270
+26595000000 26596319719 8865000000 8865439906 275065408 275505314
+26598000000 26599319893 8866000000 8866439964 276065408 276505372
+26601000000 26602320012 8867000000 8867440004 277065408 277505412
+26604000000 26605320136 8868000000 8868440045 278065408 278505453
+26607000000 26608320355 8869000000 8869440118 279065408 279505526
+26610000000 26611320491 8870000000 8870440163 280065408 280505571
+26613000000 26614320642 8871000000 8871440214 281065408 281505622
+26616000000 26617320792 8872000000 8872440264 282065408 282505672
+26619000000 26620320907 8873000000 8873440302 283065408 283505710
+26622000000 26623321004 8874000000 8874440334 284065408 284505742
+26625000000 26626321212 8875000000 8875440404 285065408 285505812
+26628000000 26629321367 8876000000 8876440455 286065408 286505863
+26631000000 26632321526 8877000000 8877440508 287065408 287505916
+26634000000 26635321700 8878000000 8878440566 288065408 288505974
+26637000000 26638321800 8879000000 8879440600 289065408 289506008
+26640000000 26641321978 8880000000 8880440659 290065408 290506067
+26643000000 26644322127 8881000000 8881440709 291065408 291506117
+26646000000 26647322255 8882000000 8882440751 292065408 292506159
+26649000000 26650322424 8883000000 8883440808 293065408 293506216
+26652000000 26653322544 8884000000 8884440848 294065408 294506256
+26655000000 26655149894 8885000000 8885049964 295065408 295115372
+26658000000 26659322794 8886000000 8886440931 296065408 296506339
+26661000000 26662323052 8887000000 8887441017 297065408 297506425
+26664000000 26665323157 8888000000 8888441052 298065408 298506460
+26667000000 26668323237 8889000000 8889441079 299065408 299506487
+26670000000 26671323384 8890000000 8890441128 300065408 300506536
+26673000000 26674323638 8891000000 8891441212 301065408 301506620
+26676000000 26677323728 8892000000 8892441242 302065408 302506650
+26679000000 26680323973 8893000000 8893441324 303065408 303506732
+26682000000 26683324051 8894000000 8894441350 304065408 304506758
+26685000000 26686324228 8895000000 8895441409 305065408 305506817
+26688000000 26689324374 8896000000 8896441458 306065408 306506866
+26691000000 26692324518 8897000000 8897441506 307065408 307506914
+26694000000 26693947172 8898000000 8897982390 308065408 308047798
+26697000000 26698324833 8899000000 8899441611 309065408 309507019
+26700000000 26701324993 8900000000 8900441664 310065408 310507072
+26703000000 26704325130 8901000000 8901441710 311065408 311507118
+26706000000 26707325288 8902000000 8902441762 312065408 312507170
+26709000000 26710325446 8903000000 8903441815 313065408 313507223
+26712000000 26713325560 8904000000 8904441853 314065408 314507261
+26715000000 26716325721 8905000000 8905441907 315065408 315507315
+26718000000 26719325848 8906000000 8906441949 316065408 316507357
+26721000000 26722325957 8907000000 8907441985 317065408 317507393
+26724000000 26725326099 8908000000 8908442033 318065408 318507441
+26727000000 26728326333 8909000000 8909442111 319065408 319507519
+26730000000 26731326246 8910000000 8910442082 320065408 320507490
+26733000000 26734326367 8911000000 8911442122 321065408 321507530
+26736000000 26737326475 8912000000 8912442158 322065408 322507566
+26739000000 26740326710 8913000000 8913442236 323065408 323507644
+26742000000 26743326889 8914000000 8914442296 324065408 324507704
+26745000000 26746240529 8915000000 8915413509 325065408 325478917
+26748000000 26749327158 8916000000 8916442386 326065408 326507794
+26751000000 26752327331 8917000000 8917442443 327065408 327507851
+26754000000 26755327447 8918000000 8918442482 328065408 328507890
+26757000000 26758327620 8919000000 8919442540 329065408 329507948
+26760000000 26761327792 8920000000 8920442597 330065408 330508005
+26763000000 26764327848 8921000000 8921442616 331065408 331508024
+26766000000 26767327994 8922000000 8922442664 332065408 332508072
+26769000000 26770328190 8923000000 8923442730 333065408 333508138
+26772000000 26773328219 8924000000 8924442739 334065408 334508147
+26775000000 26776328525 8925000000 8925442841 335065408 335508249
+26778000000 26779328697 8926000000 8926442899 336065408 336508307
+26781000000 26782328830 8927000000 8927442943 337065408 337508351
+26784000000 26785328947 8928000000 8928442982 338065408 338508390
+26787000000 26788329132 8929000000 8929443044 339065408 339508452
+26790000000 26791329238 8930000000 8930443079 340065408 340508487
+26793000000 26794329419 8931000000 8931443139 341065408 341508547
+26796000000 26797329631 8932000000 8932443210 342065408 342508618
+26799000000 26800329738 8933000000 8933443246 343065408 343508654
+26802000000 26803329904 8934000000 8934443301 344065408 344508709
+26805000000 26805928649 8935000000 8935309549 345065408 345374957
+26808000000 26809330175 8936000000 8936443391 346065408 346508799
+26811000000 26812330287 8937000000 8937443429 347065408 347508837
+26814000000 26815330496 8938000000 8938443498 348065408 348508906
+26817000000 26818330575 8939000000 8939443525 349065408 349508933
+26820000000 26821330800 8940000000 8940443600 350065408 350509008
+26823000000 26824330927 8941000000 8941443642 351065408 351509050
+26826000000 26827331016 8942000000 8942443672 352065408 352509080
+26829000000 26830331122 8943000000 8943443707 353065408 353509115
+26832000000 26833331333 8944000000 8944443777 354065408 354509185
+26835000000 26836331542 8945000000 8945443847 355065408 355509255
+26838000000 26839331687 8946000000 8946443895 356065408 356509303
+26841000000 26842331813 8947000000 8947443937 357065408 357509345
+26844000000 26845331979 8948000000 8948443993 358065408 358509401
+26847000000 26848332059 8949000000 8949444019 359065408 359509427
+26850000000 26851332294 8950000000 8950444098 360065408 360509506
+26853000000 26854332453 8951000000 8951444151 361065408 361509559
+26856000000 26857332574 8952000000 8952444191 362065408 362509599
+26859000000 26860332734 8953000000 8953444244 363065408 363509652
+26862000000 26863332817 8954000000 8954444272 364065408 364509680
+26865000000 26866333063 8955000000 8955444354 365065408 365509762
+26868000000 26869333186 8956000000 8956444395 366065408 366509803
+26871000000 26872333322 8957000000 8957444440 367065408 367509848
+26874000000 26875333497 8958000000 8958444499 368065408 368509907
+26877000000 26878333619 8959000000 8959444539 369065408 369509947
+26880000000 26881333769 8960000000 8960444589 370065408 370509997
+26883000000 26884333917 8961000000 8961444639 371065408 371510047
+26886000000 26886507611 8962000000 8962169203 372065408 372234611
+26889000000 26890334237 8963000000 8963444745 373065408 373510153
+26892000000 26893334369 8964000000 8964444789 374065408 374510197
+26895000000 26896334543 8965000000 8965444847 375065408 375510255
+26898000000 26899334662 8966000000 8966444887 376065408 376510295
+26901000000 26902334786 8967000000 8967444928 377065408 377510336
+26904000000 26905335005 8968000000 8968445001 378065408 378510409
+26907000000 26908335141 8969000000 8969445047 379065408 379510455
+26910000000 26911335292 8970000000 8970445097 380065408 380510505
+26913000000 26914335442 8971000000 8971445147 381065408 381510555
+26916000000 26917335557 8972000000 8972445185 382065408 382510593
+26919000000 26920335654 8973000000 8973445218 383065408 383510626
+26922000000 26923335862 8974000000 8974445287 384065408 384510695
+26925000000 26926336017 8975000000 8975445339 385065408 385510747
+26928000000 26929336176 8976000000 8976445392 386065408 386510800
+26931000000 26932336350 8977000000 8977445450 387065408 387510858
+26934000000 26935336450 8978000000 8978445483 388065408 388510891
+26937000000 26938336628 8979000000 8979445542 389065408 389510950
+26940000000 26941336777 8980000000 8980445592 390065408 390511000
+26943000000 26944336905 8981000000 8981445635 391065408 391511043
+26946000000 26947337074 8982000000 8982445691 392065408 392511099
+26949000000 26950337194 8983000000 8983445731 393065408 393511139
+26952000000 26952164544 8984000000 8984054848 394065408 394120256
+26955000000 26956337444 8985000000 8985445814 395065408 395511222
+26958000000 26959337702 8986000000 8986445900 396065408 396511308
+26961000000 26962337807 8987000000 8987445935 397065408 397511343
+26964000000 26965337887 8988000000 8988445962 398065408 398511370
+26967000000 26968338034 8989000000 8989446011 399065408 399511419
+26970000000 26971338288 8990000000 8990446096 400065408 400511504
+26973000000 26974338378 8991000000 8991446126 401065408 401511534
+26976000000 26977338623 8992000000 8992446207 402065408 402511615
+26979000000 26980338701 8993000000 8993446233 403065408 403511641
+26982000000 26983338878 8994000000 8994446292 404065408 404511700
+26985000000 26986339024 8995000000 8995446341 405065408 405511749
+26988000000 26989339168 8996000000 8996446389 406065408 406511797
+26991000000 26990961822 8997000000 8996987274 407065408 407052682
+26994000000 26995339483 8998000000 8998446494 408065408 408511902
+26997000000 26998339643 8999000000 8999446547 409065408 409511955
+27000000000 27001339780 9000000000 9000446593 410065408 410512001
+27003000000 27004339938 9001000000 9001446646 411065408 411512054
+27006000000 27007340096 9002000000 9002446698 412065408 412512106
+27009000000 27010340210 9003000000 9003446736 413065408 413512144
+27012000000 27013340371 9004000000 9004446790 414065408 414512198
+27015000000 27016340498 9005000000 9005446832 415065408 415512240
+27018000000 27019340607 9006000000 9006446869 416065408 416512277
+27021000000 27022340749 9007000000 9007446916 417065408 417512324
+27024000000 27025340983 9008000000 9008446994 418065408 418512402
+27027000000 27028340896 9009000000 9009446965 419065408 419512373
+27030000000 27031341017 9010000000 9010447005 420065408 420512413
+27033000000 27034341125 9011000000 9011447041 421065408 421512449
+27036000000 27037341360 9012000000 9012447120 422065408 422512528
+27039000000 27040341539 9013000000 9013447179 423065408 423512587
+27042000000 27043255179 9014000000 9014418393 424065408 424483801
+27045000000 27046341808 9015000000 9015447269 425065408 425512677
+27048000000 27049341981 9016000000 9016447327 426065408 426512735
+27051000000 27052342097 9017000000 9017447365 427065408 427512773
+27054000000 27055342270 9018000000 9018447423 428065408 428512831
+27057000000 27058342442 9019000000 9019447480 429065408 429512888
+27060000000 27061342498 9020000000 9020447499 430065408 430512907
+27063000000 27064342644 9021000000 9021447548 431065408 431512956
+27066000000 27067342840 9022000000 9022447613 432065408 432513021
+27069000000 27070342869 9023000000 9023447623 433065408 433513031
+27072000000 27073343175 9024000000 9024447725 434065408 434513133
+27075000000 27076343347 9025000000 9025447782 435065408 435513190
+27078000000 27079343480 9026000000 9026447826 436065408 436513234
+27081000000 27082343597 9027000000 9027447865 437065408 437513273
+27084000000 27085343782 9028000000 9028447927 438065408 438513335
+27087000000 27088343888 9029000000 9029447962 439065408 439513370
+27090000000 27091344069 9030000000 9030448023 440065408 440513431
+27093000000 27094344281 9031000000 9031448093 441065408 441513501
+27096000000 27097344388 9032000000 9032448129 442065408 442513537
+27099000000 27100344554 9033000000 9033448184 443065408 443513592
+27102000000 27102943299 9034000000 9034314433 444065408 444379841
+27105000000 27106344825 9035000000 9035448275 445065408 445513683
+27108000000 27109344937 9036000000 9036448312 446065408 446513720
+27111000000 27112345146 9037000000 9037448382 447065408 447513790
+27114000000 27115345225 9038000000 9038448408 448065408 448513816
+27117000000 27118345450 9039000000 9039448483 449065408 449513891
+27120000000 27121345577 9040000000 9040448525 450065408 450513933
+27123000000 27124345666 9041000000 9041448555 451065408 451513963
+27126000000 27127345772 9042000000 9042448590 452065408 452513998
+27129000000 27130345983 9043000000 9043448661 453065408 453514069
+27132000000 27133346192 9044000000 9044448730 454065408 454514138
+27135000000 27136346337 9045000000 9045448779 455065408 455514187
+27138000000 27139346463 9046000000 9046448821 456065408 456514229
+27141000000 27142346629 9047000000 9047448876 457065408 457514284
+27144000000 27145346709 9048000000 9048448903 458065408 458514311
+27147000000 27148346944 9049000000 9049448981 459065408 459514389
+27150000000 27151347103 9050000000 9050449034 460065408 460514442
+27153000000 27154347224 9051000000 9051449074 461065408 461514482
+27156000000 27157347384 9052000000 9052449128 462065408 462514536
+27159000000 27160347467 9053000000 9053449155 463065408 463514563
+27162000000 27163347713 9054000000 9054449237 464065408 464514645
+27165000000 27166347836 9055000000 9055449278 465065408 465514686
+27168000000 27169347972 9056000000 9056449324 466065408 466514732
+27171000000 27172348147 9057000000 9057449382 467065408 467514790
+27174000000 27175348269 9058000000 9058449423 468065408 468514831
+27177000000 27178348419 9059000000 9059449473 469065408 469514881
+27180000000 27181348567 9060000000 9060449522 470065408 470514930
+27183000000 27183522261 9061000000 9061174087 471065408 471239495
+27186000000 27187348887 9062000000 9062449629 472065408 472515037
+27189000000 27190349019 9063000000 9063449673 473065408 473515081
+27192000000 27193349193 9064000000 9064449731 474065408 474515139
+27195000000 27196349312 9065000000 9065449770 475065408 475515178
+27198000000 27199349436 9066000000 9066449812 476065408 476515220
+27201000000 27202349655 9067000000 9067449885 477065408 477515293
+27204000000 27205349791 9068000000 9068449930 478065408 478515338
+27207000000 27208349942 9069000000 9069449980 479065408 479515388
+27210000000 27211350092 9070000000 9070450030 480065408 480515438
+27213000000 27214350207 9071000000 9071450069 481065408 481515477
+27216000000 27217350304 9072000000 9072450101 482065408 482515509
+27219000000 27220350512 9073000000 9073450170 483065408 483515578
+27222000000 27223350667 9074000000 9074450222 484065408 484515630
+27225000000 27226350826 9075000000 9075450275 485065408 485515683
+27228000000 27229351000 9076000000 9076450333 486065408 486515741
+27231000000 27232351100 9077000000 9077450366 487065408 487515774
+27234000000 27235351278 9078000000 9078450426 488065408 488515834
+27237000000 27238351427 9079000000 9079450475 489065408 489515883
+27240000000 27241351555 9080000000 9080450518 490065408 490515926
+27243000000 27244351724 9081000000 9081450574 491065408 491515982
+27246000000 27247351844 9082000000 9082450614 492065408 492516022
+27249000000 27249179194 9083000000 9083059731 493065408 493125139
+27252000000 27253352094 9084000000 9084450698 494065408 494516106
+27255000000 27256352352 9085000000 9085450784 495065408 495516192
+27258000000 27259352457 9086000000 9086450819 496065408 496516227
+27261000000 27262352537 9087000000 9087450845 497065408 497516253
+27264000000 27265352684 9088000000 9088450894 498065408 498516302
+27267000000 27268352938 9089000000 9089450979 499065408 499516387
+27270000000 27271353028 9090000000 9090451009 500065408 500516417
+27273000000 27274353273 9091000000 9091451091 501065408 501516499
+27276000000 27277353351 9092000000 9092451117 502065408 502516525
+27279000000 27280353528 9093000000 9093451176 503065408 503516584
+27282000000 27283353674 9094000000 9094451224 504065408 504516632
+27285000000 27286353818 9095000000 9095451272 505065408 505516680
+27288000000 27287976472 9096000000 9095992157 506065408 506057565
+27291000000 27292354133 9097000000 9097451377 507065408 507516785
+27294000000 27295354293 9098000000 9098451431 508065408 508516839
+27297000000 27298354430 9099000000 9099451476 509065408 509516884
+27300000000 27301354588 9100000000 9100451529 510065408 510516937
+27303000000 27304354746 9101000000 9101451582 511065408 511516990
+27306000000 27307354860 9102000000 9102451620 512065408 512517028
+27309000000 27310355021 9103000000 9103451673 513065408 513517081
+27312000000 27313355148 9104000000 9104451716 514065408 514517124
+27315000000 27316355257 9105000000 9105451752 515065408 515517160
+27318000000 27319355399 9106000000 9106451799 516065408 516517207
+27321000000 27322355633 9107000000 9107451877 517065408 517517285
+27324000000 27325355546 9108000000 9108451848 518065408 518517256
+27327000000 27328355667 9109000000 9109451889 519065408 519517297
+27330000000 27331355775 9110000000 9110451925 520065408 520517333
+27333000000 27334356010 9111000000 9111452003 521065408 521517411
+27336000000 27337356189 9112000000 9112452063 522065408 522517471
+27339000000 27340269829 9113000000 9113423276 523065408 523488684
+27342000000 27343356458 9114000000 9114452152 524065408 524517560
+27345000000 27346356631 9115000000 9115452210 525065408 525517618
+27348000000 27349356747 9116000000 9116452249 526065408 526517657
+27351000000 27352356920 9117000000 9117452306 527065408 527517714
+27354000000 27355357092 9118000000 9118452364 528065408 528517772
+27357000000 27358357148 9119000000 9119452382 529065408 529517790
+27360000000 27361357294 9120000000 9120452431 530065408 530517839
+27363000000 27364357490 9121000000 9121452496 531065408 531517904
+27366000000 27367357519 9122000000 9122452506 532065408 532517914
+27369000000 27370357825 9123000000 9123452608 533065408 533518016
+27372000000 27373357997 9124000000 9124452665 534065408 534518073
+27375000000 27376358130 9125000000 9125452710 535065408 535518118
+27378000000 27379358247 9126000000 9126452749 536065408 536518157
+27381000000 27382358432 9127000000 9127452810 537065408 537518218
+27384000000 27385358538 9128000000 9128452846 538065408 538518254
+27387000000 27388358719 9129000000 9129452906 539065408 539518314
+27390000000 27391358931 9130000000 9130452977 540065408 540518385
+27393000000 27394359038 9131000000 9131453012 541065408 541518420
+27396000000 27397359204 9132000000 9132453068 542065408 542518476
+27399000000 27399957949 9133000000 9133319316 543065408 543384724
+27402000000 27403359475 9134000000 9134453158 544065408 544518566
+27405000000 27406359587 9135000000 9135453195 545065408 545518603
+27408000000 27409359796 9136000000 9136453265 546065408 546518673
+27411000000 27412359875 9137000000 9137453291 547065408 547518699
+27414000000 27415360100 9138000000 9138453366 548065408 548518774
+27417000000 27418360227 9139000000 9139453409 549065408 549518817
+27420000000 27421360316 9140000000 9140453438 550065408 550518846
+27423000000 27424360422 9141000000 9141453474 551065408 551518882
+27426000000 27427360633 9142000000 9142453544 552065408 552518952
+27429000000 27430360842 9143000000 9143453614 553065408 553519022
+27432000000 27433360987 9144000000 9144453662 554065408 554519070
+27435000000 27436361113 9145000000 9145453704 555065408 555519112
+27438000000 27439361279 9146000000 9146453759 556065408 556519167
+27441000000 27442361359 9147000000 9147453786 557065408 557519194
+27444000000 27445361594 9148000000 9148453864 558065408 558519272
+27447000000 27448361753 9149000000 9149453917 559065408 559519325
+27450000000 27451361874 9150000000 9150453958 560065408 560519366
+27453000000 27454362034 9151000000 9151454011 561065408 561519419
+27456000000 27457362117 9152000000 9152454039 562065408 562519447
+27459000000 27460362363 9153000000 9153454121 563065408 563519529
+27462000000 27463362486 9154000000 9154454162 564065408 564519570
+27465000000 27466362622 9155000000 9155454207 565065408 565519615
+27468000000 27469362797 9156000000 9156454265 566065408 566519673
+27471000000 27472362919 9157000000 9157454306 567065408 567519714
+27474000000 27475363069 9158000000 9158454356 568065408 568519764
+27477000000 27478363217 9159000000 9159454405 569065408 569519813
+27480000000 27480536911 9160000000 9160178970 570065408 570244378
+27483000000 27484363537 9161000000 9161454512 571065408 571519920
+27486000000 27487363669 9162000000 9162454556 572065408 572519964
+27489000000 27490363843 9163000000 9163454614 573065408 573520022
+27492000000 27493363962 9164000000 9164454654 574065408 574520062
+27495000000 27496364086 9165000000 9165454695 575065408 575520103
+27498000000 27499364305 9166000000 9166454768 576065408 576520176
+27501000000 27502364441 9167000000 9167454813 577065408 577520221
+27504000000 27505364592 9168000000 9168454864 578065408 578520272
+27507000000 27508364742 9169000000 9169454914 579065408 579520322
+27510000000 27511364857 9170000000 9170454952 580065408 580520360
+27513000000 27514364954 9171000000 9171454984 581065408 581520392
+27516000000 27517365162 9172000000 9172455054 582065408 582520462
+27519000000 27520365317 9173000000 9173455105 583065408 583520513
+27522000000 27523365476 9174000000 9174455158 584065408 584520566
+27525000000 27526365650 9175000000 9175455216 585065408 585520624
+27528000000 27529365750 9176000000 9176455250 586065408 586520658
+27531000000 27532365928 9177000000 9177455309 587065408 587520717
+27534000000 27535366077 9178000000 9178455359 588065408 588520767
+27537000000 27538366205 9179000000 9179455401 589065408 589520809
+27540000000 27541366374 9180000000 9180455458 590065408 590520866
+27543000000 27544366494 9181000000 9181455498 591065408 591520906
+27546000000 27546193844 9182000000 9182064614 592065408 592130022
+27549000000 27550366744 9183000000 9183455581 593065408 593520989
+27552000000 27553367002 9184000000 9184455667 594065408 594521075
+27555000000 27556367107 9185000000 9185455702 595065408 595521110
+27558000000 27559367187 9186000000 9186455729 596065408 596521137
+27561000000 27562367334 9187000000 9187455778 597065408 597521186
+27564000000 27565367588 9188000000 9188455862 598065408 598521270
+27567000000 27568367678 9189000000 9189455892 599065408 599521300
+27570000000 27571367923 9190000000 9190455974 600065408 600521382
+27573000000 27574368001 9191000000 9191456000 601065408 601521408
+27576000000 27577368178 9192000000 9192456059 602065408 602521467
+27579000000 27580368324 9193000000 9193456108 603065408 603521516
+27582000000 27583368468 9194000000 9194456156 604065408 604521564
+27585000000 27584991122 9195000000 9194997040 605065408 605062448
+27588000000 27589368783 9196000000 9196456261 606065408 606521669
+27591000000 27592368943 9197000000 9197456314 607065408 607521722
+27594000000 27595369080 9198000000 9198456360 608065408 608521768
+27597000000 27598369238 9199000000 9199456412 609065408 609521820
+27600000000 27601369396 9200000000 9200456465 610065408 610521873
+27603000000 27604369510 9201000000 9201456503 611065408 611521911
+27606000000 27607369671 9202000000 9202456557 612065408 612521965
+27609000000 27610369798 9203000000 9203456599 613065408 613522007
+27612000000 27613369907 9204000000 9204456635 614065408 614522043
+27615000000 27616370049 9205000000 9205456683 615065408 615522091
+27618000000 27619370283 9206000000 9206456761 616065408 616522169
+27621000000 27622370196 9207000000 9207456732 617065408 617522140
+27624000000 27625370317 9208000000 9208456772 618065408 618522180
+27627000000 27628370425 9209000000 9209456808 619065408 619522216
+27630000000 27631370660 9210000000 9210456886 620065408 620522294
+27633000000 27634370839 9211000000 9211456946 621065408 621522354
+27636000000 27637284479 9212000000 9212428159 622065408 622493567
+27639000000 27640371108 9213000000 9213457036 623065408 623522444
+27642000000 27643371281 9214000000 9214457093 624065408 624522501
+27645000000 27646371397 9215000000 9215457132 625065408 625522540
+27648000000 27649371570 9216000000 9216457190 626065408 626522598
+27651000000 27652371742 9217000000 9217457247 627065408 627522655
+27654000000 27655371798 9218000000 9218457266 628065408 628522674
+27657000000 27658371944 9219000000 9219457314 629065408 629522722
+27660000000 27661372140 9220000000 9220457380 630065408 630522788
+27663000000 27664372169 9221000000 9221457389 631065408 631522797
+27666000000 27667372475 9222000000 9222457491 632065408 632522899
+27669000000 27670372647 9223000000 9223457549 633065408 633522957
+27672000000 27673372780 9224000000 9224457593 634065408 634523001
+27675000000 27676372897 9225000000 9225457632 635065408 635523040
+27678000000 27679373082 9226000000 9226457694 636065408 636523102
+27681000000 27682373188 9227000000 9227457729 637065408 637523137
+27684000000 27685373369 9228000000 9228457789 638065408 638523197
+27687000000 27688373581 9229000000 9229457860 639065408 639523268
+27690000000 27691373688 9230000000 9230457896 640065408 640523304
+27693000000 27694373854 9231000000 9231457951 641065408 641523359
+27696000000 27696972599 9232000000 9232324199 642065408 642389607
+27699000000 27700374125 9233000000 9233458041 643065408 643523449
+27702000000 27703374237 9234000000 9234458079 644065408 644523487
+27705000000 27706374446 9235000000 9235458148 645065408 645523556
+27708000000 27709374525 9236000000 9236458175 646065408 646523583
+27711000000 27712374750 9237000000 9237458250 647065408 647523658
+27714000000 27715374877 9238000000 9238458292 648065408 648523700
+27717000000 27718374966 9239000000 9239458322 649065408 649523730
+27720000000 27721375072 9240000000 9240458357 650065408 650523765
+27723000000 27724375283 9241000000 9241458427 651065408 651523835
+27726000000 27727375492 9242000000 9242458497 652065408 652523905
+27729000000 27730375637 9243000000 9243458545 653065408 653523953
+27732000000 27733375763 9244000000 9244458587 654065408 654523995
+27735000000 27736375929 9245000000 9245458643 655065408 655524051
+27738000000 27739376009 9246000000 9246458669 656065408 656524077
+27741000000 27742376244 9247000000 9247458748 657065408 657524156
+27744000000 27745376403 9248000000 9248458801 658065408 658524209
+27747000000 27748376524 9249000000 9249458841 659065408 659524249
+27750000000 27751376684 9250000000 9250458894 660065408 660524302
+27753000000 27754376767 9251000000 9251458922 661065408 661524330
+27756000000 27757377013 9252000000 9252459004 662065408 662524412
+27759000000 27760377136 9253000000 9253459045 663065408 663524453
+27762000000 27763377272 9254000000 9254459090 664065408 664524498
+27765000000 27766377447 9255000000 9255459149 665065408 665524557
+27768000000 27769377569 9256000000 9256459189 666065408 666524597
+27771000000 27772377719 9257000000 9257459239 667065408 667524647
+27774000000 27775377867 9258000000 9258459289 668065408 668524697
+27777000000 27777551561 9259000000 9259183853 669065408 669249261
+27780000000 27781378187 9260000000 9260459395 670065408 670524803
+27783000000 27784378319 9261000000 9261459439 671065408 671524847
+27786000000 27787378493 9262000000 9262459497 672065408 672524905
+27789000000 27790378612 9263000000 9263459537 673065408 673524945
+27792000000 27793378736 9264000000 9264459578 674065408 674524986
+27795000000 27796378955 9265000000 9265459651 675065408 675525059
+27798000000 27799379091 9266000000 9266459697 676065408 676525105
+27801000000 27802379242 9267000000 9267459747 677065408 677525155
+27804000000 27805379392 9268000000 9268459797 678065408 678525205
+27807000000 27808379507 9269000000 9269459835 679065408 679525243
+27810000000 27811379604 9270000000 9270459868 680065408 680525276
+27813000000 27814379812 9271000000 9271459937 681065408 681525345
+27816000000 27817379967 9272000000 9272459989 682065408 682525397
+27819000000 27820380126 9273000000 9273460042 683065408 683525450
+27822000000 27823380300 9274000000 9274460100 684065408 684525508
+27825000000 27826380400 9275000000 9275460133 685065408 685525541
+27828000000 27829380578 9276000000 9276460192 686065408 686525600
+27831000000 27832380727 9277000000 9277460242 687065408 687525650
+27834000000 27835380855 9278000000 9278460285 688065408 688525693
+27837000000 27838381024 9279000000 9279460341 689065408 689525749
+27840000000 27841381144 9280000000 9280460381 690065408 690525789
+27843000000 27843208494 9281000000 9281069498 691065408 691134906
+27846000000 27847381394 9282000000 9282460464 692065408 692525872
+27849000000 27850381652 9283000000 9283460550 693065408 693525958
+27852000000 27853381757 9284000000 9284460585 694065408 694525993
+27855000000 27856381837 9285000000 9285460612 695065408 695526020
+27858000000 27859381984 9286000000 9286460661 696065408 696526069
+27861000000 27862382238 9287000000 9287460746 697065408 697526154
+27864000000 27865382328 9288000000 9288460776 698065408 698526184
+27867000000 27868382573 9289000000 9289460857 699065408 699526265
+27870000000 27871382651 9290000000 9290460883 700065408 700526291
+27873000000 27874382828 9291000000 9291460942 701065408 701526350
+27876000000 27877382974 9292000000 9292460991 702065408 702526399
+27879000000 27880383118 9293000000 9293461039 703065408 703526447
+27882000000 27882005772 9294000000 9294001924 704065408 704067332
+27885000000 27886383433 9295000000 9295461144 705065408 705526552
+27888000000 27889383593 9296000000 9296461197 706065408 706526605
+27891000000 27892383730 9297000000 9297461243 707065408 707526651
+27894000000 27895383888 9298000000 9298461296 708065408 708526704
+27897000000 27898384046 9299000000 9299461348 709065408 709526756
+27900000000 27901384160 9300000000 9300461386 710065408 710526794
+27903000000 27904384321 9301000000 9301461440 711065408 711526848
+27906000000 27907384448 9302000000 9302461482 712065408 712526890
+27909000000 27910384557 9303000000 9303461519 713065408 713526927
+27912000000 27913384699 9304000000 9304461566 714065408 714526974
+27915000000 27916384933 9305000000 9305461644 715065408 715527052
+27918000000 27919384846 9306000000 9306461615 716065408 716527023
+27921000000 27922384967 9307000000 9307461655 717065408 717527063
+27924000000 27925385075 9308000000 9308461691 718065408 718527099
+27927000000 27928385310 9309000000 9309461770 719065408 719527178
+27930000000 27931385489 9310000000 9310461829 720065408 720527237
+27933000000 27934299129 9311000000 9311433043 721065408 721498451
+27936000000 27937385758 9312000000 9312461919 722065408 722527327
+27939000000 27940385931 9313000000 9313461977 723065408 723527385
+27942000000 27943386047 9314000000 9314462015 724065408 724527423
+27945000000 27946386220 9315000000 9315462073 725065408 725527481
+27948000000 27949386392 9316000000 9316462130 726065408 726527538
+27951000000 27952386448 9317000000 9317462149 727065408 727527557
+27954000000 27955386594 9318000000 9318462198 728065408 728527606
+27957000000 27958386790 9319000000 9319462263 729065408 729527671
+27960000000 27961386819 9320000000 9320462273 730065408 730527681
+27963000000 27964387125 9321000000 9321462375 731065408 731527783
+27966000000 27967387297 9322000000 9322462432 732065408 732527840
+27969000000 27970387430 9323000000 9323462476 733065408 733527884
+27972000000 27973387547 9324000000 9324462515 734065408 734527923
+27975000000 27976387732 9325000000 9325462577 735065408 735527985
+27978000000 27979387838 9326000000 9326462612 736065408 736528020
+27981000000 27982388019 9327000000 9327462673 737065408 737528081
+27984000000 27985388231 9328000000 9328462743 738065408 738528151
+27987000000 27988388338 9329000000 9329462779 739065408 739528187
+27990000000 27991388504 9330000000 9330462834 740065408 740528242
+27993000000 27993987249 9331000000 9331329083 741065408 741394491
+27996000000 27997388775 9332000000 9332462925 742065408 742528333
+27999000000 28000388887 9333000000 9333462962 743065408 743528370
+28002000000 28003389096 9334000000 9334463032 744065408 744528440
+28005000000 28006389175 9335000000 9335463058 745065408 745528466
+28008000000 28009389400 9336000000 9336463133 746065408 746528541
+28011000000 28012389527 9337000000 9337463175 747065408 747528583
+28014000000 28015389616 9338000000 9338463205 748065408 748528613
+28017000000 28018389722 9339000000 9339463240 749065408 749528648
+28020000000 28021389933 9340000000 9340463311 750065408 750528719
+28023000000 28024390142 9341000000 9341463380 751065408 751528788
+28026000000 28027390287 9342000000 9342463429 752065408 752528837
+28029000000 28030390413 9343000000 9343463471 753065408 753528879
+28032000000 28033390579 9344000000 9344463526 754065408 754528934
+28035000000 28036390659 9345000000 9345463553 755065408 755528961
+28038000000 28039390894 9346000000 9346463631 756065408 756529039
+28041000000 28042391053 9347000000 9347463684 757065408 757529092
+28044000000 28045391174 9348000000 9348463724 758065408 758529132
+28047000000 28048391334 9349000000 9349463778 759065408 759529186
+28050000000 28051391417 9350000000 9350463805 760065408 760529213
+28053000000 28054391663 9351000000 9351463887 761065408 761529295
+28056000000 28057391786 9352000000 9352463928 762065408 762529336
+28059000000 28060391922 9353000000 9353463974 763065408 763529382
+28062000000 28063392097 9354000000 9354464032 764065408 764529440
+28065000000 28066392219 9355000000 9355464073 765065408 765529481
+28068000000 28069392369 9356000000 9356464123 766065408 766529531
+28071000000 28072392517 9357000000 9357464172 767065408 767529580
+28074000000 28074566211 9358000000 9358188737 768065408 768254145
+28077000000 28078392837 9359000000 9359464279 769065408 769529687
+28080000000 28081392969 9360000000 9360464323 770065408 770529731
+28083000000 28084393143 9361000000 9361464381 771065408 771529789
+28086000000 28087393262 9362000000 9362464420 772065408 772529828
+28089000000 28090393386 9363000000 9363464462 773065408 773529870
+28092000000 28093393605 9364000000 9364464535 774065408 774529943
+28095000000 28096393741 9365000000 9365464580 775065408 775529988
+28098000000 28099393892 9366000000 9366464630 776065408 776530038
+28101000000 28102394042 9367000000 9367464680 777065408 777530088
+28104000000 28105394157 9368000000 9368464719 778065408 778530127
+28107000000 28108394254 9369000000 9369464751 779065408 779530159
+28110000000 28111394462 9370000000 9370464820 780065408 780530228
+28113000000 28114394617 9371000000 9371464872 781065408 781530280
+28116000000 28117394776 9372000000 9372464925 782065408 782530333
+28119000000 28120394950 9373000000 9373464983 783065408 783530391
+28122000000 28123395050 9374000000 9374465016 784065408 784530424
+28125000000 28126395228 9375000000 9375465076 785065408 785530484
+28128000000 28129395377 9376000000 9376465125 786065408 786530533
+28131000000 28132395505 9377000000 9377465168 787065408 787530576
+28134000000 28135395674 9378000000 9378465224 788065408 788530632
+28137000000 28138395794 9379000000 9379465264 789065408 789530672
+28140000000 28140223144 9380000000 9380074381 790065408 790139789
+28143000000 28144396044 9381000000 9381465348 791065408 791530756
+28146000000 28147396302 9382000000 9382465434 792065408 792530842
+28149000000 28150396407 9383000000 9383465469 793065408 793530877
+28152000000 28153396487 9384000000 9384465495 794065408 794530903
+28155000000 28156396634 9385000000 9385465544 795065408 795530952
+28158000000 28159396888 9386000000 9386465629 796065408 796531037
+28161000000 28162396978 9387000000 9387465659 797065408 797531067
+28164000000 28165397223 9388000000 9388465741 798065408 798531149
+28167000000 28168397301 9389000000 9389465767 799065408 799531175
+28170000000 28171397478 9390000000 9390465826 800065408 800531234
+28173000000 28174397624 9391000000 9391465874 801065408 801531282
+28176000000 28177397768 9392000000 9392465922 802065408 802531330
+28179000000 28179020422 9393000000 9393006807 803065408 803072215
+28182000000 28183398083 9394000000 9394466027 804065408 804531435
+28185000000 28186398243 9395000000 9395466081 805065408 805531489
+28188000000 28189398380 9396000000 9396466126 806065408 806531534
+28191000000 28192398538 9397000000 9397466179 807065408 807531587
+28194000000 28195398696 9398000000 9398466232 808065408 808531640
+28197000000 28198398810 9399000000 9399466270 809065408 809531678
+28200000000 28201398971 9400000000 9400466323 810065408 810531731
+28203000000 28204399098 9401000000 9401466366 811065408 811531774
+28206000000 28207399207 9402000000 9402466402 812065408 812531810
+28209000000 28210399349 9403000000 9403466449 813065408 813531857
+28212000000 28213399583 9404000000 9404466527 814065408 814531935
+28215000000 28216399496 9405000000 9405466498 815065408 815531906
+28218000000 28219399617 9406000000 9406466539 816065408 816531947
+28221000000 28222399725 9407000000 9407466575 817065408 817531983
+28224000000 28225399960 9408000000 9408466653 818065408 818532061
+28227000000 28228400139 9409000000 9409466713 819065408 819532121
+28230000000 28231313779 9410000000 9410437926 820065408 820503334
+28233000000 28234400408 9411000000 9411466802 821065408 821532210
+28236000000 28237400581 9412000000 9412466860 822065408 822532268
+28239000000 28240400697 9413000000 9413466899 823065408 823532307
+28242000000 28243400870 9414000000 9414466956 824065408 824532364
+28245000000 28246401042 9415000000 9415467014 825065408 825532422
+28248000000 28249401098 9416000000 9416467032 826065408 826532440
+28251000000 28252401244 9417000000 9417467081 827065408 827532489
+28254000000 28255401440 9418000000 9418467146 828065408 828532554
+28257000000 28258401469 9419000000 9419467156 829065408 829532564
+28260000000 28261401775 9420000000 9420467258 830065408 830532666
+28263000000 28264401947 9421000000 9421467315 831065408 831532723
+28266000000 28267402080 9422000000 9422467360 832065408 832532768
+28269000000 28270402197 9423000000 9423467399 833065408 833532807
+28272000000 28273402382 9424000000 9424467460 834065408 834532868
+28275000000 28276402488 9425000000 9425467496 835065408 835532904
+28278000000 28279402669 9426000000 9426467556 836065408 836532964
+28281000000 28282402881 9427000000 9427467627 837065408 837533035
+28284000000 28285402988 9428000000 9428467662 838065408 838533070
+28287000000 28288403154 9429000000 9429467718 839065408 839533126
+28290000000 28291001899 9430000000 9430333966 840065408 840399374
+28293000000 28294403425 9431000000 9431467808 841065408 841533216
+28296000000 28297403537 9432000000 9432467845 842065408 842533253
+28299000000 28300403746 9433000000 9433467915 843065408 843533323
+28302000000 28303403825 9434000000 9434467941 844065408 844533349
+28305000000 28306404050 9435000000 9435468016 845065408 845533424
+28308000000 28309404177 9436000000 9436468059 846065408 846533467
+28311000000 28312404266 9437000000 9437468088 847065408 847533496
+28314000000 28315404372 9438000000 9438468124 848065408 848533532
+28317000000 28318404583 9439000000 9439468194 849065408 849533602
+28320000000 28321404792 9440000000 9440468264 850065408 850533672
+28323000000 28324404937 9441000000 9441468312 851065408 851533720
+28326000000 28327405063 9442000000 9442468354 852065408 852533762
+28329000000 28330405229 9443000000 9443468409 853065408 853533817
+28332000000 28333405309 9444000000 9444468436 854065408 854533844
+28335000000 28336405544 9445000000 9445468514 855065408 855533922
+28338000000 28339405703 9446000000 9446468567 856065408 856533975
+28341000000 28342405824 9447000000 9447468608 857065408 857534016
+28344000000 28345405984 9448000000 9448468661 858065408 858534069
+28347000000 28348406067 9449000000 9449468689 859065408 859534097
+28350000000 28351406313 9450000000 9450468771 860065408 860534179
+28353000000 28354406436 9451000000 9451468812 861065408 861534220
+28356000000 28357406572 9452000000 9452468857 862065408 862534265
+28359000000 28360406747 9453000000 9453468915 863065408 863534323
+28362000000 28363406869 9454000000 9454468956 864065408 864534364
+28365000000 28366407019 9455000000 9455469006 865065408 865534414
+28368000000 28369407167 9456000000 9456469055 866065408 866534463
+28371000000 28371580861 9457000000 9457193620 867065408 867259028
+28374000000 28375407487 9458000000 9458469162 868065408 868534570
+28377000000 28378407619 9459000000 9459469206 869065408 869534614
+28380000000 28381407793 9460000000 9460469264 870065408 870534672
+28383000000 28384407912 9461000000 9461469304 871065408 871534712
+28386000000 28387408036 9462000000 9462469345 872065408 872534753
+28389000000 28390408255 9463000000 9463469418 873065408 873534826
+28392000000 28393408391 9464000000 9464469463 874065408 874534871
+28395000000 28396408542 9465000000 9465469514 875065408 875534922
+28398000000 28399408692 9466000000 9466469564 876065408 876534972
+28401000000 28402408807 9467000000 9467469602 877065408 877535010
+28404000000 28405408904 9468000000 9468469634 878065408 878535042
+28407000000 28408409112 9469000000 9469469704 879065408 879535112
+28410000000 28411409267 9470000000 9470469755 880065408 880535163
+28413000000 28414409426 9471000000 9471469808 881065408 881535216
+28416000000 28417409600 9472000000 9472469866 882065408 882535274
+28419000000 28420409700 9473000000 9473469900 883065408 883535308
+28422000000 28423409878 9474000000 9474469959 884065408 884535367
+28425000000 28426410027 9475000000 9475470009 885065408 885535417
+28428000000 28429410155 9476000000 9476470051 886065408 886535459
+28431000000 28432410324 9477000000 9477470108 887065408 887535516
+28434000000 28435410444 9478000000 9478470148 888065408 888535556
+28437000000 28437237794 9479000000 9479079264 889065408 889144672
+28440000000 28441410694 9480000000 9480470231 890065408 890535639
+28443000000 28444410952 9481000000 9481470317 891065408 891535725
+28446000000 28447411057 9482000000 9482470352 892065408 892535760
+28449000000 28450411137 9483000000 9483470379 893065408 893535787
+28452000000 28453411284 9484000000 9484470428 894065408 894535836
+28455000000 28456411538 9485000000 9485470512 895065408 895535920
+28458000000 28459411628 9486000000 9486470542 896065408 896535950
+28461000000 28462411873 9487000000 9487470624 897065408 897536032
+28464000000 28465411951 9488000000 9488470650 898065408 898536058
+28467000000 28468412128 9489000000 9489470709 899065408 899536117
+28470000000 28471412274 9490000000 9490470758 900065408 900536166
+28473000000 28474412418 9491000000 9491470806 901065408 901536214
+28476000000 28476035072 9492000000 9492011690 902065408 902077098
+28479000000 28480412733 9493000000 9493470911 903065408 903536319
+28482000000 28483412893 9494000000 9494470964 904065408 904536372
+28485000000 28486413030 9495000000 9495471010 905065408 905536418
+28488000000 28489413188 9496000000 9496471062 906065408 906536470
+28491000000 28492413346 9497000000 9497471115 907065408 907536523
+28494000000 28495413460 9498000000 9498471153 908065408 908536561
+28497000000 28498413621 9499000000 9499471207 909065408 909536615
+28500000000 28501413748 9500000000 9500471249 910065408 910536657
+28503000000 28504413857 9501000000 9501471285 911065408 911536693
+28506000000 28507413999 9502000000 9502471333 912065408 912536741
+28509000000 28510414233 9503000000 9503471411 913065408 913536819
+28512000000 28513414146 9504000000 9504471382 914065408 914536790
+28515000000 28516414267 9505000000 9505471422 915065408 915536830
+28518000000 28519414375 9506000000 9506471458 916065408 916536866
+28521000000 28522414610 9507000000 9507471536 917065408 917536944
+28524000000 28525414789 9508000000 9508471596 918065408 918537004
+28527000000 28528328429 9509000000 9509442809 919065408 919508217
+28530000000 28531415058 9510000000 9510471686 920065408 920537094
+28533000000 28534415231 9511000000 9511471743 921065408 921537151
+28536000000 28537415347 9512000000 9512471782 922065408 922537190
+28539000000 28540415520 9513000000 9513471840 923065408 923537248
+28542000000 28543415692 9514000000 9514471897 924065408 924537305
+28545000000 28546415748 9515000000 9515471916 925065408 925537324
+28548000000 28549415894 9516000000 9516471964 926065408 926537372
+28551000000 28552416090 9517000000 9517472030 927065408 927537438
+28554000000 28555416119 9518000000 9518472039 928065408 928537447
+28557000000 28558416425 9519000000 9519472141 929065408 929537549
+28560000000 28561416597 9520000000 9520472199 930065408 930537607
+28563000000 28564416730 9521000000 9521472243 931065408 931537651
+28566000000 28567416847 9522000000 9522472282 932065408 932537690
+28569000000 28570417032 9523000000 9523472344 933065408 933537752
+28572000000 28573417138 9524000000 9524472379 934065408 934537787
+28575000000 28576417319 9525000000 9525472439 935065408 935537847
+28578000000 28579417531 9526000000 9526472510 936065408 936537918
+28581000000 28582417638 9527000000 9527472546 937065408 937537954
+28584000000 28585417804 9528000000 9528472601 938065408 938538009
+28587000000 28588016549 9529000000 9529338849 939065408 939404257
+28590000000 28591418075 9530000000 9530472691 940065408 940538099
+28593000000 28594418187 9531000000 9531472729 941065408 941538137
+28596000000 28597418396 9532000000 9532472798 942065408 942538206
+28599000000 28600418475 9533000000 9533472825 943065408 943538233
+28602000000 28603418700 9534000000 9534472900 944065408 944538308
+28605000000 28606418827 9535000000 9535472942 945065408 945538350
+28608000000 28609418916 9536000000 9536472972 946065408 946538380
+28611000000 28612419022 9537000000 9537473007 947065408 947538415
+28614000000 28615419233 9538000000 9538473077 948065408 948538485
+28617000000 28618419442 9539000000 9539473147 949065408 949538555
+28620000000 28621419587 9540000000 9540473195 950065408 950538603
+28623000000 28624419713 9541000000 9541473237 951065408 951538645
+28626000000 28627419879 9542000000 9542473293 952065408 952538701
+28629000000 28630419959 9543000000 9543473319 953065408 953538727
+28632000000 28633420194 9544000000 9544473398 954065408 954538806
+28635000000 28636420353 9545000000 9545473451 955065408 955538859
+28638000000 28639420474 9546000000 9546473491 956065408 956538899
+28641000000 28642420634 9547000000 9547473544 957065408 957538952
+28644000000 28645420717 9548000000 9548473572 958065408 958538980
+28647000000 28648420963 9549000000 9549473654 959065408 959539062
+28650000000 28651421086 9550000000 9550473695 960065408 960539103
+28653000000 28654421222 9551000000 9551473740 961065408 961539148
+28656000000 28657421397 9552000000 9552473799 962065408 962539207
+28659000000 28660421519 9553000000 9553473839 963065408 963539247
+28662000000 28663421669 9554000000 9554473889 964065408 964539297
+28665000000 28666421817 9555000000 9555473939 965065408 965539347
+28668000000 28668595511 9556000000 9556198503 966065408 966263911
+28671000000 28672422137 9557000000 9557474045 967065408 967539453
+28674000000 28675422269 9558000000 9558474089 968065408 968539497
+28677000000 28678422443 9559000000 9559474147 969065408 969539555
+28680000000 28681422562 9560000000 9560474187 970065408 970539595
+28683000000 28684422686 9561000000 9561474228 971065408 971539636
+28686000000 28687422905 9562000000 9562474301 972065408 972539709
+28689000000 28690423041 9563000000 9563474347 973065408 973539755
+28692000000 28693423192 9564000000 9564474397 974065408 974539805
+28695000000 28696423342 9565000000 9565474447 975065408 975539855
+28698000000 28699423457 9566000000 9566474485 976065408 976539893
+28701000000 28702423554 9567000000 9567474518 977065408 977539926
+28704000000 28705423762 9568000000 9568474587 978065408 978539995
+28707000000 28708423917 9569000000 9569474639 979065408 979540047
+28710000000 28711424076 9570000000 9570474692 980065408 980540100
+28713000000 28714424250 9571000000 9571474750 981065408 981540158
+28716000000 28717424350 9572000000 9572474783 982065408 982540191
+28719000000 28720424528 9573000000 9573474842 983065408 983540250
+28722000000 28723424677 9574000000 9574474892 984065408 984540300
+28725000000 28726424805 9575000000 9575474935 985065408 985540343
+28728000000 28729424974 9576000000 9576474991 986065408 986540399
+28731000000 28732425094 9577000000 9577475031 987065408 987540439
+28734000000 28734252444 9578000000 9578084148 988065408 988149556
+28737000000 28738425344 9579000000 9579475114 989065408 989540522
+28740000000 28741425602 9580000000 9580475200 990065408 990540608
+28743000000 28744425707 9581000000 9581475235 991065408 991540643
+28746000000 28747425787 9582000000 9582475262 992065408 992540670
+28749000000 28750425934 9583000000 9583475311 993065408 993540719
+28752000000 28753426188 9584000000 9584475396 994065408 994540804
+28755000000 28756426278 9585000000 9585475426 995065408 995540834
+28758000000 28759426523 9586000000 9586475507 996065408 996540915
+28761000000 28762426601 9587000000 9587475533 997065408 997540941
+28764000000 28765426778 9588000000 9588475592 998065408 998541000
+28767000000 28768426924 9589000000 9589475641 999065408 999541049
+28770000000 28771427068 9590000000 9590475689 1000065408 1000541097
+28773000000 28773049722 9591000000 9591016574 1001065408 1001081982
+28776000000 28777427383 9592000000 9592475794 1002065408 1002541202
+28779000000 28780427543 9593000000 9593475847 1003065408 1003541255
+28782000000 28783427680 9594000000 9594475893 1004065408 1004541301
+28785000000 28786427838 9595000000 9595475946 1005065408 1005541354
+28788000000 28789427996 9596000000 9596475998 1006065408 1006541406
+28791000000 28792428110 9597000000 9597476036 1007065408 1007541444
+28794000000 28795428271 9598000000 9598476090 1008065408 1008541498
+28797000000 28798428398 9599000000 9599476132 1009065408 1009541540
+28800000000 28801428507 9600000000 9600476169 1010065408 1010541577
+28803000000 28804428649 9601000000 9601476216 1011065408 1011541624
+28806000000 28807428883 9602000000 9602476294 1012065408 1012541702
+28809000000 28810428796 9603000000 9603476265 1013065408 1013541673
+28812000000 28813428917 9604000000 9604476305 1014065408 1014541713
+28815000000 28816429025 9605000000 9605476341 1015065408 1015541749
+28818000000 28819429260 9606000000 9606476420 1016065408 1016541828
+28821000000 28822429439 9607000000 9607476479 1017065408 1017541887
+28824000000 28825343079 9608000000 9608447693 1018065408 1018513101
+28827000000 28828429708 9609000000 9609476569 1019065408 1019541977
+28830000000 28831429881 9610000000 9610476627 1020065408 1020542035
+28833000000 28834429997 9611000000 9611476665 1021065408 1021542073
+28836000000 28837430170 9612000000 9612476723 1022065408 1022542131
+28839000000 28840430342 9613000000 9613476780 1023065408 1023542188
+28842000000 28843430398 9614000000 9614476799 1024065408 1024542207
+28845000000 28846430544 9615000000 9615476848 1025065408 1025542256
+28848000000 28849430740 9616000000 9616476913 1026065408 1026542321
+28851000000 28852430769 9617000000 9617476923 1027065408 1027542331
+28854000000 28855431075 9618000000 9618477025 1028065408 1028542433
+28857000000 28858431247 9619000000 9619477082 1029065408 1029542490
+28860000000 28861431380 9620000000 9620477126 1030065408 1030542534
+28863000000 28864431497 9621000000 9621477165 1031065408 1031542573
+28866000000 28867431682 9622000000 9622477227 1032065408 1032542635
+28869000000 28870431788 9623000000 9623477262 1033065408 1033542670
+28872000000 28873431969 9624000000 9624477323 1034065408 1034542731
+28875000000 28876432181 9625000000 9625477393 1035065408 1035542801
+28878000000 28879432288 9626000000 9626477429 1036065408 1036542837
+28881000000 28882432454 9627000000 9627477484 1037065408 1037542892
+28884000000 28885031199 9628000000 9628343733 1038065408 1038409141
+28887000000 28888432725 9629000000 9629477575 1039065408 1039542983
+28890000000 28891432837 9630000000 9630477612 1040065408 1040543020
+28893000000 28894433046 9631000000 9631477682 1041065408 1041543090
+28896000000 28897433125 9632000000 9632477708 1042065408 1042543116
+28899000000 28900433350 9633000000 9633477783 1043065408 1043543191
+28902000000 28903433477 9634000000 9634477825 1044065408 1044543233
+28905000000 28906433566 9635000000 9635477855 1045065408 1045543263
+28908000000 28909433672 9636000000 9636477890 1046065408 1046543298
+28911000000 28912433883 9637000000 9637477961 1047065408 1047543369
+28914000000 28915434092 9638000000 9638478030 1048065408 1048543438
+28917000000 28918434237 9639000000 9639478079 1049065408 1049543487
+28920000000 28921434363 9640000000 9640478121 1050065408 1050543529
+28923000000 28924434529 9641000000 9641478176 1051065408 1051543584
+28926000000 28927434609 9642000000 9642478203 1052065408 1052543611
+28929000000 28930434844 9643000000 9643478281 1053065408 1053543689
+28932000000 28933435003 9644000000 9644478334 1054065408 1054543742
+28935000000 28936435124 9645000000 9645478374 1055065408 1055543782
+28938000000 28939435284 9646000000 9646478428 1056065408 1056543836
+28941000000 28942435367 9647000000 9647478455 1057065408 1057543863
+28944000000 28945435613 9648000000 9648478537 1058065408 1058543945
+28947000000 28948435736 9649000000 9649478578 1059065408 1059543986
+28950000000 28951435872 9650000000 9650478624 1060065408 1060544032
+28953000000 28954436047 9651000000 9651478682 1061065408 1061544090
+28956000000 28957436169 9652000000 9652478723 1062065408 1062544131
+28959000000 28960436319 9653000000 9653478773 1063065408 1063544181
+28962000000 28963436467 9654000000 9654478822 1064065408 1064544230
+28965000000 28965610161 9655000000 9655203387 1065065408 1065268795
+28968000000 28969436787 9656000000 9656478929 1066065408 1066544337
+28971000000 28972436919 9657000000 9657478973 1067065408 1067544381
+28974000000 28975437093 9658000000 9658479031 1068065408 1068544439
+28977000000 28978437212 9659000000 9659479070 1069065408 1069544478
+28980000000 28981437336 9660000000 9660479112 1070065408 1070544520
+28983000000 28984437555 9661000000 9661479185 1071065408 1071544593
+28986000000 28987437691 9662000000 9662479230 1072065408 1072544638
+28989000000 28990437842 9663000000 9663479280 1073065408 1073544688
+28992000000 28993437992 9664000000 9664479330 1074065408 1074544738
+28995000000 28996438107 9665000000 9665479369 1075065408 1075544777
+28998000000 28999438204 9666000000 9666479401 1076065408 1076544809
+29001000000 29002438412 9667000000 9667479470 1077065408 1077544878
+29004000000 29005438567 9668000000 9668479522 1078065408 1078544930
+29007000000 29008438726 9669000000 9669479575 1079065408 1079544983
+29010000000 29011438900 9670000000 9670479633 1080065408 1080545041
+29013000000 29014439000 9671000000 9671479666 1081065408 1081545074
+29016000000 29017439178 9672000000 9672479726 1082065408 1082545134
+29019000000 29020439327 9673000000 9673479775 1083065408 1083545183
+29022000000 29023439455 9674000000 9674479818 1084065408 1084545226
+29025000000 29026439624 9675000000 9675479874 1085065408 1085545282
+29028000000 29029439744 9676000000 9676479914 1086065408 1086545322
+29031000000 29031267094 9677000000 9677089031 1087065408 1087154439
+29034000000 29035439994 9678000000 9678479998 1088065408 1088545406
+29037000000 29038440252 9679000000 9679480084 1089065408 1089545492
+29040000000 29041440357 9680000000 9680480119 1090065408 1090545527
+29043000000 29044440437 9681000000 9681480145 1091065408 1091545553
+29046000000 29047440584 9682000000 9682480194 1092065408 1092545602
+29049000000 29050440838 9683000000 9683480279 1093065408 1093545687
+29052000000 29053440928 9684000000 9684480309 1094065408 1094545717
+29055000000 29056441173 9685000000 9685480391 1095065408 1095545799
+29058000000 29059441251 9686000000 9686480417 1096065408 1096545825
+29061000000 29062441428 9687000000 9687480476 1097065408 1097545884
+29064000000 29065441574 9688000000 9688480524 1098065408 1098545932
+29067000000 29068441718 9689000000 9689480572 1099065408 1099545980
+29070000000 29070064372 9690000000 9690021457 1100065408 1100086865
+29073000000 29074442033 9691000000 9691480677 1101065408 1101546085
+29076000000 29077442193 9692000000 9692480731 1102065408 1102546139
+29079000000 29080442330 9693000000 9693480776 1103065408 1103546184
+29082000000 29083442488 9694000000 9694480829 1104065408 1104546237
+29085000000 29086442646 9695000000 9695480882 1105065408 1105546290
+29088000000 29089442760 9696000000 9696480920 1106065408 1106546328
+29091000000 29092442921 9697000000 9697480973 1107065408 1107546381
+29094000000 29095443048 9698000000 9698481016 1108065408 1108546424
+29097000000 29098443157 9699000000 9699481052 1109065408 1109546460
+29100000000 29101443299 9700000000 9700481099 1110065408 1110546507
+29103000000 29104443533 9701000000 9701481177 1111065408 1111546585
+29106000000 29107443446 9702000000 9702481148 1112065408 1112546556
+29109000000 29110443567 9703000000 9703481189 1113065408 1113546597
+29112000000 29113443675 9704000000 9704481225 1114065408 1114546633
+29115000000 29116443910 9705000000 9705481303 1115065408 1115546711
+29118000000 29119444089 9706000000 9706481363 1116065408 1116546771
+29121000000 29122357729 9707000000 9707452576 1117065408 1117517984
+29124000000 29125444358 9708000000 9708481452 1118065408 1118546860
+29127000000 29128444531 9709000000 9709481510 1119065408 1119546918
+29130000000 29131444647 9710000000 9710481549 1120065408 1120546957
+29133000000 29134444820 9711000000 9711481606 1121065408 1121547014
+29136000000 29137444992 9712000000 9712481664 1122065408 1122547072
+29139000000 29140445048 9713000000 9713481682 1123065408 1123547090
+29142000000 29143445194 9714000000 9714481731 1124065408 1124547139
+29145000000 29146445390 9715000000 9715481796 1125065408 1125547204
+29148000000 29149445419 9716000000 9716481806 1126065408 1126547214
+29151000000 29152445725 9717000000 9717481908 1127065408 1127547316
+29154000000 29155445897 9718000000 9718481965 1128065408 1128547373
+29157000000 29158446030 9719000000 9719482010 1129065408 1129547418
+29160000000 29161446147 9720000000 9720482049 1130065408 1130547457
+29163000000 29164446332 9721000000 9721482110 1131065408 1131547518
+29166000000 29167446438 9722000000 9722482146 1132065408 1132547554
+29169000000 29170446619 9723000000 9723482206 1133065408 1133547614
+29172000000 29173446831 9724000000 9724482277 1134065408 1134547685
+29175000000 29176446938 9725000000 9725482312 1135065408 1135547720
+29178000000 29179447104 9726000000 9726482368 1136065408 1136547776
+29181000000 29182045849 9727000000 9727348616 1137065408 1137414024
+29184000000 29185447375 9728000000 9728482458 1138065408 1138547866
+29187000000 29188447487 9729000000 9729482495 1139065408 1139547903
+29190000000 29191447696 9730000000 9730482565 1140065408 1140547973
+29193000000 29194447775 9731000000 9731482591 1141065408 1141547999
+29196000000 29197448000 9732000000 9732482666 1142065408 1142548074
+29199000000 29200448127 9733000000 9733482709 1143065408 1143548117
+29202000000 29203448216 9734000000 9734482738 1144065408 1144548146
+29205000000 29206448322 9735000000 9735482774 1145065408 1145548182
+29208000000 29209448533 9736000000 9736482844 1146065408 1146548252
+29211000000 29212448742 9737000000 9737482914 1147065408 1147548322
+29214000000 29215448887 9738000000 9738482962 1148065408 1148548370
+29217000000 29218449013 9739000000 9739483004 1149065408 1149548412
+29220000000 29221449179 9740000000 9740483059 1150065408 1150548467
+29223000000 29224449259 9741000000 9741483086 1151065408 1151548494
+29226000000 29227449494 9742000000 9742483164 1152065408 1152548572
+29229000000 29230449653 9743000000 9743483217 1153065408 1153548625
+29232000000 29233449774 9744000000 9744483258 1154065408 1154548666
+29235000000 29236449934 9745000000 9745483311 1155065408 1155548719
+29238000000 29239450017 9746000000 9746483339 1156065408 1156548747
+29241000000 29242450263 9747000000 9747483421 1157065408 1157548829
+29244000000 29245450386 9748000000 9748483462 1158065408 1158548870
+29247000000 29248450522 9749000000 9749483507 1159065408 1159548915
+29250000000 29251450697 9750000000 9750483565 1160065408 1160548973
+29253000000 29254450819 9751000000 9751483606 1161065408 1161549014
+29256000000 29257450969 9752000000 9752483656 1162065408 1162549064
+29259000000 29260451117 9753000000 9753483705 1163065408 1163549113
+29262000000 29262624811 9754000000 9754208270 1164065408 1164273678
+29265000000 29266451437 9755000000 9755483812 1165065408 1165549220
+29268000000 29269451569 9756000000 9756483856 1166065408 1166549264
+29271000000 29272451743 9757000000 9757483914 1167065408 1167549322
+29274000000 29275451862 9758000000 9758483954 1168065408 1168549362
+29277000000 29278451986 9759000000 9759483995 1169065408 1169549403
+29280000000 29281452205 9760000000 9760484068 1170065408 1170549476
+29283000000 29284452341 9761000000 9761484113 1171065408 1171549521
+29286000000 29287452492 9762000000 9762484164 1172065408 1172549572
+29289000000 29290452642 9763000000 9763484214 1173065408 1173549622
+29292000000 29293452757 9764000000 9764484252 1174065408 1174549660
+29295000000 29296452854 9765000000 9765484284 1175065408 1175549692
+29298000000 29299453062 9766000000 9766484354 1176065408 1176549762
+29301000000 29302453217 9767000000 9767484405 1177065408 1177549813
+29304000000 29305453376 9768000000 9768484458 1178065408 1178549866
+29307000000 29308453550 9769000000 9769484516 1179065408 1179549924
+29310000000 29311453650 9770000000 9770484550 1180065408 1180549958
+29313000000 29314453828 9771000000 9771484609 1181065408 1181550017
+29316000000 29317453977 9772000000 9772484659 1182065408 1182550067
+29319000000 29320454105 9773000000 9773484701 1183065408 1183550109
+29322000000 29323454274 9774000000 9774484758 1184065408 1184550166
+29325000000 29326454394 9775000000 9775484798 1185065408 1185550206
+29328000000 29328281744 9776000000 9776093914 1186065408 1186159322
+29331000000 29332454644 9777000000 9777484881 1187065408 1187550289
+29334000000 29335454902 9778000000 9778484967 1188065408 1188550375
+29337000000 29338455007 9779000000 9779485002 1189065408 1189550410
+29340000000 29341455087 9780000000 9780485029 1190065408 1190550437
+29343000000 29344455234 9781000000 9781485078 1191065408 1191550486
+29346000000 29347455488 9782000000 9782485162 1192065408 1192550570
+29349000000 29350455578 9783000000 9783485192 1193065408 1193550600
+29352000000 29353455823 9784000000 9784485274 1194065408 1194550682
+29355000000 29356455901 9785000000 9785485300 1195065408 1195550708
+29358000000 29359456078 9786000000 9786485359 1196065408 1196550767
+29361000000 29362456224 9787000000 9787485408 1197065408 1197550816
+29364000000 29365456368 9788000000 9788485456 1198065408 1198550864
+29367000000 29367079022 9789000000 9789026340 1199065408 1199091748
+29370000000 29371456683 9790000000 9790485561 1200065408 1200550969
+29373000000 29374456843 9791000000 9791485614 1201065408 1201551022
+29376000000 29377456980 9792000000 9792485660 1202065408 1202551068
+29379000000 29380457138 9793000000 9793485712 1203065408 1203551120
+29382000000 29383457296 9794000000 9794485765 1204065408 1204551173
+29385000000 29386457410 9795000000 9795485803 1205065408 1205551211
+29388000000 29389457571 9796000000 9796485857 1206065408 1206551265
+29391000000 29392457698 9797000000 9797485899 1207065408 1207551307
+29394000000 29395457807 9798000000 9798485935 1208065408 1208551343
+29397000000 29398457949 9799000000 9799485983 1209065408 1209551391
+29400000000 29401458183 9800000000 9800486061 1210065408 1210551469
+29403000000 29404458096 9801000000 9801486032 1211065408 1211551440
+29406000000 29407458217 9802000000 9802486072 1212065408 1212551480
+29409000000 29410458325 9803000000 9803486108 1213065408 1213551516
+29412000000 29413458560 9804000000 9804486186 1214065408 1214551594
+29415000000 29416458739 9805000000 9805486246 1215065408 1215551654
+29418000000 29419372379 9806000000 9806457459 1216065408 1216522867
+29421000000 29422459008 9807000000 9807486336 1217065408 1217551744
+29424000000 29425459181 9808000000 9808486393 1218065408 1218551801
+29427000000 29428459297 9809000000 9809486432 1219065408 1219551840
+29430000000 29431459470 9810000000 9810486490 1220065408 1220551898
+29433000000 29434459642 9811000000 9811486547 1221065408 1221551955
+29436000000 29437459698 9812000000 9812486566 1222065408 1222551974
+29439000000 29440459844 9813000000 9813486614 1223065408 1223552022
+29442000000 29443460040 9814000000 9814486680 1224065408 1224552088
+29445000000 29446460069 9815000000 9815486689 1225065408 1225552097
+29448000000 29449460375 9816000000 9816486791 1226065408 1226552199
+29451000000 29452460547 9817000000 9817486849 1227065408 1227552257
+29454000000 29455460680 9818000000 9818486893 1228065408 1228552301
+29457000000 29458460797 9819000000 9819486932 1229065408 1229552340
+29460000000 29461460982 9820000000 9820486994 1230065408 1230552402
+29463000000 29464461088 9821000000 9821487029 1231065408 1231552437
+29466000000 29467461269 9822000000 9822487089 1232065408 1232552497
+29469000000 29470461481 9823000000 9823487160 1233065408 1233552568
+29472000000 29473461588 9824000000 9824487196 1234065408 1234552604
+29475000000 29476461754 9825000000 9825487251 1235065408 1235552659
+29478000000 29479060499 9826000000 9826353499 1236065408 1236418907
+29481000000 29482462025 9827000000 9827487341 1237065408 1237552749
+29484000000 29485462137 9828000000 9828487379 1238065408 1238552787
+29487000000 29488462346 9829000000 9829487448 1239065408 1239552856
+29490000000 29491462425 9830000000 9830487475 1240065408 1240552883
+29493000000 29494462650 9831000000 9831487550 1241065408 1241552958
+29496000000 29497462777 9832000000 9832487592 1242065408 1242553000
+29499000000 29500462866 9833000000 9833487622 1243065408 1243553030
+29502000000 29503462972 9834000000 9834487657 1244065408 1244553065
+29505000000 29506463183 9835000000 9835487727 1245065408 1245553135
+29508000000 29509463392 9836000000 9836487797 1246065408 1246553205
+29511000000 29512463537 9837000000 9837487845 1247065408 1247553253
+29514000000 29515463663 9838000000 9838487887 1248065408 1248553295
+29517000000 29518463829 9839000000 9839487943 1249065408 1249553351
+29520000000 29521463909 9840000000 9840487969 1250065408 1250553377
+29523000000 29524464144 9841000000 9841488048 1251065408 1251553456
+29526000000 29527464303 9842000000 9842488101 1252065408 1252553509
+29529000000 29530464424 9843000000 9843488141 1253065408 1253553549
+29532000000 29533464584 9844000000 9844488194 1254065408 1254553602
+29535000000 29536464667 9845000000 9845488222 1255065408 1255553630
+29538000000 29539464913 9846000000 9846488304 1256065408 1256553712
+29541000000 29542465036 9847000000 9847488345 1257065408 1257553753
+29544000000 29545465172 9848000000 9848488390 1258065408 1258553798
+29547000000 29548465347 9849000000 9849488449 1259065408 1259553857
+29550000000 29551465469 9850000000 9850488489 1260065408 1260553897
+29553000000 29554465619 9851000000 9851488539 1261065408 1261553947
+29556000000 29557465767 9852000000 9852488589 1262065408 1262553997
+29559000000 29559639461 9853000000 9853213153 1263065408 1263278561
+29562000000 29563466087 9854000000 9854488695 1264065408 1264554103
+29565000000 29566466219 9855000000 9855488739 1265065408 1265554147
+29568000000 29569466393 9856000000 9856488797 1266065408 1266554205
+29571000000 29572466512 9857000000 9857488837 1267065408 1267554245
+29574000000 29575466636 9858000000 9858488878 1268065408 1268554286
+29577000000 29578466855 9859000000 9859488951 1269065408 1269554359
+29580000000 29581466991 9860000000 9860488997 1270065408 1270554405
+29583000000 29584467142 9861000000 9861489047 1271065408 1271554455
+29586000000 29587467292 9862000000 9862489097 1272065408 1272554505
+29589000000 29590467407 9863000000 9863489135 1273065408 1273554543
+29592000000 29593467504 9864000000 9864489168 1274065408 1274554576
+29595000000 29596467712 9865000000 9865489237 1275065408 1275554645
+29598000000 29599467867 9866000000 9866489289 1276065408 1276554697
+29601000000 29602468026 9867000000 9867489342 1277065408 1277554750
+29604000000 29605468200 9868000000 9868489400 1278065408 1278554808
+29607000000 29608468300 9869000000 9869489433 1279065408 1279554841
+29610000000 29611468478 9870000000 9870489492 1280065408 1280554900
+29613000000 29614468627 9871000000 9871489542 1281065408 1281554950
+29616000000 29617468755 9872000000 9872489585 1282065408 1282554993
+29619000000 29620468924 9873000000 9873489641 1283065408 1283555049
+29622000000 29623469044 9874000000 9874489681 1284065408 1284555089
+29625000000 29625296394 9875000000 9875098798 1285065408 1285164206
+29628000000 29629469294 9876000000 9876489764 1286065408 1286555172
+29631000000 29632469552 9877000000 9877489850 1287065408 1287555258
+29634000000 29635469657 9878000000 9878489885 1288065408 1288555293
+29637000000 29638469737 9879000000 9879489912 1289065408 1289555320
+29640000000 29641469884 9880000000 9880489961 1290065408 1290555369
+29643000000 29644470138 9881000000 9881490046 1291065408 1291555454
+29646000000 29647470228 9882000000 9882490076 1292065408 1292555484
+29649000000 29650470473 9883000000 9883490157 1293065408 1293555565
+29652000000 29653470551 9884000000 9884490183 1294065408 1294555591
+29655000000 29656470728 9885000000 9885490242 1295065408 1295555650
+29658000000 29659470874 9886000000 9886490291 1296065408 1296555699
+29661000000 29662471018 9887000000 9887490339 1297065408 1297555747
+29664000000 29664093672 9888000000 9888031224 1298065408 1298096632
+29667000000 29668471333 9889000000 9889490444 1299065408 1299555852
+29670000000 29671471493 9890000000 9890490497 1300065408 1300555905
+29673000000 29674471630 9891000000 9891490543 1301065408 1301555951
+29676000000 29677471788 9892000000 9892490596 1302065408 1302556004
+29679000000 29680471946 9893000000 9893490648 1303065408 1303556056
+29682000000 29683472060 9894000000 9894490686 1304065408 1304556094
+29685000000 29686472221 9895000000 9895490740 1305065408 1305556148
+29688000000 29689472348 9896000000 9896490782 1306065408 1306556190
+29691000000 29692472457 9897000000 9897490819 1307065408 1307556227
+29694000000 29695472599 9898000000 9898490866 1308065408 1308556274
+29697000000 29698472833 9899000000 9899490944 1309065408 1309556352
+29700000000 29701472746 9900000000 9900490915 1310065408 1310556323
+29703000000 29704472867 9901000000 9901490955 1311065408 1311556363
+29706000000 29707472975 9902000000 9902490991 1312065408 1312556399
+29709000000 29710473210 9903000000 9903491070 1313065408 1313556478
+29712000000 29713473389 9904000000 9904491129 1314065408 1314556537
+29715000000 29716387029 9905000000 9905462343 1315065408 1315527751
+29718000000 29719473658 9906000000 9906491219 1316065408 1316556627
+29721000000 29722473831 9907000000 9907491277 1317065408 1317556685
+29724000000 29725473947 9908000000 9908491315 1318065408 1318556723
+29727000000 29728474120 9909000000 9909491373 1319065408 1319556781
+29730000000 29731474292 9910000000 9910491430 1320065408 1320556838
+29733000000 29734474348 9911000000 9911491449 1321065408 1321556857
+29736000000 29737474494 9912000000 9912491498 1322065408 1322556906
+29739000000 29740474690 9913000000 9913491563 1323065408 1323556971
+29742000000 29743474719 9914000000 9914491573 1324065408 1324556981
+29745000000 29746475025 9915000000 9915491675 1325065408 1325557083
+29748000000 29749475197 9916000000 9916491732 1326065408 1326557140
+29751000000 29752475330 9917000000 9917491776 1327065408 1327557184
+29754000000 29755475447 9918000000 9918491815 1328065408 1328557223
+29757000000 29758475632 9919000000 9919491877 1329065408 1329557285
+29760000000 29761475738 9920000000 9920491912 1330065408 1330557320
+29763000000 29764475919 9921000000 9921491973 1331065408 1331557381
+29766000000 29767476131 9922000000 9922492043 1332065408 1332557451
+29769000000 29770476238 9923000000 9923492079 1333065408 1333557487
+29772000000 29773476404 9924000000 9924492134 1334065408 1334557542
+29775000000 29776075149 9925000000 9925358383 1335065408 1335423791
+29778000000 29779476675 9926000000 9926492225 1336065408 1336557633
+29781000000 29782476787 9927000000 9927492262 1337065408 1337557670
+29784000000 29785476996 9928000000 9928492332 1338065408 1338557740
+29787000000 29788477075 9929000000 9929492358 1339065408 1339557766
+29790000000 29791477300 9930000000 9930492433 1340065408 1340557841
+29793000000 29794477427 9931000000 9931492475 1341065408 1341557883
+29796000000 29797477516 9932000000 9932492505 1342065408 1342557913
+29799000000 29800477622 9933000000 9933492540 1343065408 1343557948
+29802000000 29803477833 9934000000 9934492611 1344065408 1344558019
+29805000000 29806478042 9935000000 9935492680 1345065408 1345558088
+29808000000 29809478187 9936000000 9936492729 1346065408 1346558137
+29811000000 29812478313 9937000000 9937492771 1347065408 1347558179
+29814000000 29815478479 9938000000 9938492826 1348065408 1348558234
+29817000000 29818478559 9939000000 9939492853 1349065408 1349558261
+29820000000 29821478794 9940000000 9940492931 1350065408 1350558339
+29823000000 29824478953 9941000000 9941492984 1351065408 1351558392
+29826000000 29827479074 9942000000 9942493024 1352065408 1352558432
+29829000000 29830479234 9943000000 9943493078 1353065408 1353558486
+29832000000 29833479317 9944000000 9944493105 1354065408 1354558513
+29835000000 29836479563 9945000000 9945493187 1355065408 1355558595
+29838000000 29839479686 9946000000 9946493228 1356065408 1356558636
+29841000000 29842479822 9947000000 9947493274 1357065408 1357558682
+29844000000 29845479997 9948000000 9948493332 1358065408 1358558740
+29847000000 29848480119 9949000000 9949493373 1359065408 1359558781
+29850000000 29851480269 9950000000 9950493423 1360065408 1360558831
+29853000000 29854480417 9951000000 9951493472 1361065408 1361558880
+29856000000 29856654111 9952000000 9952218037 1362065408 1362283445
+29859000000 29860480737 9953000000 9953493579 1363065408 1363558987
+29862000000 29863480869 9954000000 9954493623 1364065408 1364559031
+29865000000 29866481043 9955000000 9955493681 1365065408 1365559089
+29868000000 29869481162 9956000000 9956493720 1366065408 1366559128
+29871000000 29872481286 9957000000 9957493762 1367065408 1367559170
+29874000000 29875481505 9958000000 9958493835 1368065408 1368559243
+29877000000 29878481641 9959000000 9959493880 1369065408 1369559288
+29880000000 29881481792 9960000000 9960493930 1370065408 1370559338
+29883000000 29884481942 9961000000 9961493980 1371065408 1371559388
+29886000000 29887482057 9962000000 9962494019 1372065408 1372559427
+29889000000 29890482154 9963000000 9963494051 1373065408 1373559459
+29892000000 29893482362 9964000000 9964494120 1374065408 1374559528
+29895000000 29896482517 9965000000 9965494172 1375065408 1375559580
+29898000000 29899482676 9966000000 9966494225 1376065408 1376559633
+29901000000 29902482850 9967000000 9967494283 1377065408 1377559691
+29904000000 29905482950 9968000000 9968494316 1378065408 1378559724
+29907000000 29908483128 9969000000 9969494376 1379065408 1379559784
+29910000000 29911483277 9970000000 9970494425 1380065408 1380559833
+29913000000 29914483405 9971000000 9971494468 1381065408 1381559876
+29916000000 29917483574 9972000000 9972494524 1382065408 1382559932
+29919000000 29920483694 9973000000 9973494564 1383065408 1383559972
+29922000000 29922311044 9974000000 9974103681 1384065408 1384169089
+29925000000 29926483944 9975000000 9975494648 1385065408 1385560056
+29928000000 29929484202 9976000000 9976494734 1386065408 1386560142
+29931000000 29932484307 9977000000 9977494769 1387065408 1387560177
+29934000000 29935484387 9978000000 9978494795 1388065408 1388560203
+29937000000 29938484534 9979000000 9979494844 1389065408 1389560252
+29940000000 29941484788 9980000000 9980494929 1390065408 1390560337
+29943000000 29944484878 9981000000 9981494959 1391065408 1391560367
+29946000000 29947485123 9982000000 9982495041 1392065408 1392560449
+29949000000 29950485201 9983000000 9983495067 1393065408 1393560475
+29952000000 29953485378 9984000000 9984495126 1394065408 1394560534
+29955000000 29956485524 9985000000 9985495174 1395065408 1395560582
+29958000000 29959485668 9986000000 9986495222 1396065408 1396560630
+29961000000 29961108322 9987000000 9987036107 1397065408 1397101515
+29964000000 29965485983 9988000000 9988495327 1398065408 1398560735
+29967000000 29968486143 9989000000 9989495381 1399065408 1399560789
+29970000000 29971486280 9990000000 9990495426 1400065408 1400560834
+29973000000 29974486438 9991000000 9991495479 1401065408 1401560887
+29976000000 29977486596 9992000000 9992495532 1402065408 1402560940
+29979000000 29980486710 9993000000 9993495570 1403065408 1403560978
+29982000000 29983486871 9994000000 9994495623 1404065408 1404561031
+29985000000 29986486998 9995000000 9995495666 1405065408 1405561074
+29988000000 29989487107 9996000000 9996495702 1406065408 1406561110
+29991000000 29992487249 9997000000 9997495749 1407065408 1407561157
+29994000000 29995487483 9998000000 9998495827 1408065408 1408561235
+29997000000 29998487396 9999000000 9999495798 1409065408 1409561206
+30000000000 30001487517 10000000000 10000495839 1410065408 1410561247
+30003000000 30004487625 10001000000 10001495875 1411065408 1411561283
+30006000000 30007487860 10002000000 10002495953 1412065408 1412561361
+30009000000 30010488039 10003000000 10003496013 1413065408 1413561421
+30012000000 30013401679 10004000000 10004467226 1414065408 1414532634
+30015000000 30016488308 10005000000 10005496102 1415065408 1415561510
+30018000000 30019488481 10006000000 10006496160 1416065408 1416561568
+30021000000 30022488597 10007000000 10007496199 1417065408 1417561607
+30024000000 30025488770 10008000000 10008496256 1418065408 1418561664
+30027000000 30028488942 10009000000 10009496314 1419065408 1419561722
+30030000000 30031488998 10010000000 10010496332 1420065408 1420561740
+30033000000 30034489144 10011000000 10011496381 1421065408 1421561789
+30036000000 30037489340 10012000000 10012496446 1422065408 1422561854
+30039000000 30040489369 10013000000 10013496456 1423065408 1423561864
+30042000000 30043489675 10014000000 10014496558 1424065408 1424561966
+30045000000 30046489847 10015000000 10015496615 1425065408 1425562023
+30048000000 30049489980 10016000000 10016496660 1426065408 1426562068
+30051000000 30052490097 10017000000 10017496699 1427065408 1427562107
+30054000000 30055490282 10018000000 10018496760 1428065408 1428562168
+30057000000 30058490388 10019000000 10019496796 1429065408 1429562204
+30060000000 30061490569 10020000000 10020496856 1430065408 1430562264
+30063000000 30064490781 10021000000 10021496927 1431065408 1431562335
+30066000000 30067490888 10022000000 10022496962 1432065408 1432562370
+30069000000 30070491054 10023000000 10023497018 1433065408 1433562426
+30072000000 30073089799 10024000000 10024363266 1434065408 1434428674
+30075000000 30076491325 10025000000 10025497108 1435065408 1435562516
+30078000000 30079491437 10026000000 10026497145 1436065408 1436562553
+30081000000 30082491646 10027000000 10027497215 1437065408 1437562623
+30084000000 30085491725 10028000000 10028497241 1438065408 1438562649
+30087000000 30088491950 10029000000 10029497316 1439065408 1439562724
+30090000000 30091492077 10030000000 10030497359 1440065408 1440562767
+30093000000 30094492166 10031000000 10031497388 1441065408 1441562796
+30096000000 30097492272 10032000000 10032497424 1442065408 1442562832
+30099000000 30100492483 10033000000 10033497494 1443065408 1443562902
+30102000000 30103492692 10034000000 10034497564 1444065408 1444562972
+30105000000 30106492837 10035000000 10035497612 1445065408 1445563020
+30108000000 30109492963 10036000000 10036497654 1446065408 1446563062
+30111000000 30112493129 10037000000 10037497709 1447065408 1447563117
+30114000000 30115493209 10038000000 10038497736 1448065408 1448563144
+30117000000 30118493444 10039000000 10039497814 1449065408 1449563222
+30120000000 30121493603 10040000000 10040497867 1450065408 1450563275
+30123000000 30124493724 10041000000 10041497908 1451065408 1451563316
+30126000000 30127493884 10042000000 10042497961 1452065408 1452563369
+30129000000 30130493967 10043000000 10043497989 1453065408 1453563397
+30132000000 30133494213 10044000000 10044498071 1454065408 1454563479
+30135000000 30136494336 10045000000 10045498112 1455065408 1455563520
+30138000000 30139494472 10046000000 10046498157 1456065408 1456563565
+30141000000 30142494647 10047000000 10047498215 1457065408 1457563623
+30144000000 30145494769 10048000000 10048498256 1458065408 1458563664
+30147000000 30148494919 10049000000 10049498306 1459065408 1459563714
+30150000000 30151495067 10050000000 10050498355 1460065408 1460563763
+30153000000 30153668761 10051000000 10051222920 1461065408 1461288328
+30156000000 30157495387 10052000000 10052498462 1462065408 1462563870
+30159000000 30160495519 10053000000 10053498506 1463065408 1463563914
+30162000000 30163495693 10054000000 10054498564 1464065408 1464563972
+30165000000 30166495812 10055000000 10055498604 1465065408 1465564012
+30168000000 30169495936 10056000000 10056498645 1466065408 1466564053
+30171000000 30172496155 10057000000 10057498718 1467065408 1467564126
+30174000000 30175496291 10058000000 10058498763 1468065408 1468564171
+30177000000 30178496442 10059000000 10059498814 1469065408 1469564222
+30180000000 30181496592 10060000000 10060498864 1470065408 1470564272
+30183000000 30184496707 10061000000 10061498902 1471065408 1471564310
+30186000000 30187496804 10062000000 10062498934 1472065408 1472564342
+30189000000 30190497012 10063000000 10063499004 1473065408 1473564412
+30192000000 30193497167 10064000000 10064499055 1474065408 1474564463
+30195000000 30196497326 10065000000 10065499108 1475065408 1475564516
+30198000000 30199497500 10066000000 10066499166 1476065408 1476564574
+30201000000 30202497600 10067000000 10067499200 1477065408 1477564608
+30204000000 30205497778 10068000000 10068499259 1478065408 1478564667
+30207000000 30208497927 10069000000 10069499309 1479065408 1479564717
+30210000000 30211498055 10070000000 10070499351 1480065408 1480564759
+30213000000 30214498224 10071000000 10071499408 1481065408 1481564816
+30216000000 30217498344 10072000000 10072499448 1482065408 1482564856
+30219000000 30219325694 10073000000 10073108564 1483065408 1483173972
+30222000000 30223498594 10074000000 10074499531 1484065408 1484564939
+30225000000 30226498852 10075000000 10075499617 1485065408 1485565025
+30228000000 30229498957 10076000000 10076499652 1486065408 1486565060
+30231000000 30232499037 10077000000 10077499679 1487065408 1487565087
+30234000000 30235499184 10078000000 10078499728 1488065408 1488565136
+30237000000 30238499438 10079000000 10079499812 1489065408 1489565220
+30240000000 30241499528 10080000000 10080499842 1490065408 1490565250
+30243000000 30244499773 10081000000 10081499924 1491065408 1491565332
+30246000000 30247499851 10082000000 10082499950 1492065408 1492565358
+30249000000 30250500028 10083000000 10083500009 1493065408 1493565417
+30252000000 30253500174 10084000000 10084500058 1494065408 1494565466
+30255000000 30256500318 10085000000 10085500106 1495065408 1495565514
+30258000000 30258122972 10086000000 10086040990 1496065408 1496106398
+30261000000 30262500633 10087000000 10087500211 1497065408 1497565619
+30264000000 30265500793 10088000000 10088500264 1498065408 1498565672
+30267000000 30268500930 10089000000 10089500310 1499065408 1499565718
+30270000000 30271501088 10090000000 10090500362 1500065408 1500565770
+30273000000 30274501246 10091000000 10091500415 1501065408 1501565823
+30276000000 30277501360 10092000000 10092500453 1502065408 1502565861
+30279000000 30280501521 10093000000 10093500507 1503065408 1503565915
+30282000000 30283501648 10094000000 10094500549 1504065408 1504565957
+30285000000 30286501757 10095000000 10095500585 1505065408 1505565993
+30288000000 30289501899 10096000000 10096500633 1506065408 1506566041
+30291000000 30292502133 10097000000 10097500711 1507065408 1507566119
+30294000000 30295502046 10098000000 10098500682 1508065408 1508566090
+30297000000 30298502167 10099000000 10099500722 1509065408 1509566130
+30300000000 30301502275 10100000000 10100500758 1510065408 1510566166
+30303000000 30304502510 10101000000 10101500836 1511065408 1511566244
+30306000000 30307502689 10102000000 10102500896 1512065408 1512566304
+30309000000 30310416329 10103000000 10103472109 1513065408 1513537517
+30312000000 30313502958 10104000000 10104500986 1514065408 1514566394
+30315000000 30316503131 10105000000 10105501043 1515065408 1515566451
+30318000000 30319503247 10106000000 10106501082 1516065408 1516566490
+30321000000 30322503420 10107000000 10107501140 1517065408 1517566548
+30324000000 30325503592 10108000000 10108501197 1518065408 1518566605
+30327000000 30328503648 10109000000 10109501216 1519065408 1519566624
+30330000000 30331503794 10110000000 10110501264 1520065408 1520566672
+30333000000 30334503990 10111000000 10111501330 1521065408 1521566738
+30336000000 30337504019 10112000000 10112501339 1522065408 1522566747
+30339000000 30340504325 10113000000 10113501441 1523065408 1523566849
+30342000000 30343504497 10114000000 10114501499 1524065408 1524566907
+30345000000 30346504630 10115000000 10115501543 1525065408 1525566951
+30348000000 30349504747 10116000000 10116501582 1526065408 1526566990
+30351000000 30352504932 10117000000 10117501644 1527065408 1527567052
+30354000000 30355505038 10118000000 10118501679 1528065408 1528567087
+30357000000 30358505219 10119000000 10119501739 1529065408 1529567147
+30360000000 30361505431 10120000000 10120501810 1530065408 1530567218
+30363000000 30364505538 10121000000 10121501846 1531065408 1531567254
+30366000000 30367505704 10122000000 10122501901 1532065408 1532567309
+30369000000 30370104449 10123000000 10123368149 1533065408 1533433557
+30372000000 30373505975 10124000000 10124501991 1534065408 1534567399
+30375000000 30376506087 10125000000 10125502029 1535065408 1535567437
+30378000000 30379506296 10126000000 10126502098 1536065408 1536567506
+30381000000 30382506375 10127000000 10127502125 1537065408 1537567533
+30384000000 30385506600 10128000000 10128502200 1538065408 1538567608
+30387000000 30388506727 10129000000 10129502242 1539065408 1539567650
+30390000000 30391506816 10130000000 10130502272 1540065408 1540567680
+30393000000 30394506922 10131000000 10131502307 1541065408 1541567715
+30396000000 30397507133 10132000000 10132502377 1542065408 1542567785
+30399000000 30400507342 10133000000 10133502447 1543065408 1543567855
+30402000000 30403507487 10134000000 10134502495 1544065408 1544567903
+30405000000 30406507613 10135000000 10135502537 1545065408 1545567945
+30408000000 30409507779 10136000000 10136502593 1546065408 1546568001
+30411000000 30412507859 10137000000 10137502619 1547065408 1547568027
+30414000000 30415508094 10138000000 10138502698 1548065408 1548568106
+30417000000 30418508253 10139000000 10139502751 1549065408 1549568159
+30420000000 30421508374 10140000000 10140502791 1550065408 1550568199
+30423000000 30424508534 10141000000 10141502844 1551065408 1551568252
+30426000000 30427508617 10142000000 10142502872 1552065408 1552568280
+30429000000 30430508863 10143000000 10143502954 1553065408 1553568362
+30432000000 30433508986 10144000000 10144502995 1554065408 1554568403
+30435000000 30436509122 10145000000 10145503040 1555065408 1555568448
+30438000000 30439509297 10146000000 10146503099 1556065408 1556568507
+30441000000 30442509419 10147000000 10147503139 1557065408 1557568547
+30444000000 30445509569 10148000000 10148503189 1558065408 1558568597
+30447000000 30448509717 10149000000 10149503239 1559065408 1559568647
+30450000000 30450683411 10150000000 10150227803 1560065408 1560293211
+30453000000 30454510037 10151000000 10151503345 1561065408 1561568753
+30456000000 30457510169 10152000000 10152503389 1562065408 1562568797
+30459000000 30460510343 10153000000 10153503447 1563065408 1563568855
+30462000000 30463510462 10154000000 10154503487 1564065408 1564568895
+30465000000 30466510586 10155000000 10155503528 1565065408 1565568936
+30468000000 30469510805 10156000000 10156503601 1566065408 1566569009
+30471000000 30472510941 10157000000 10157503647 1567065408 1567569055
+30474000000 30475511092 10158000000 10158503697 1568065408 1568569105
+30477000000 30478511242 10159000000 10159503747 1569065408 1569569155
+30480000000 30481511357 10160000000 10160503785 1570065408 1570569193
+30483000000 30484511454 10161000000 10161503818 1571065408 1571569226
+30486000000 30487511662 10162000000 10162503887 1572065408 1572569295
+30489000000 30490511817 10163000000 10163503939 1573065408 1573569347
+30492000000 30493511976 10164000000 10164503992 1574065408 1574569400
+30495000000 30496512150 10165000000 10165504050 1575065408 1575569458
+30498000000 30499512250 10166000000 10166504083 1576065408 1576569491
+30501000000 30502512428 10167000000 10167504142 1577065408 1577569550
+30504000000 30505512577 10168000000 10168504192 1578065408 1578569600
+30507000000 30508512705 10169000000 10169504235 1579065408 1579569643
+30510000000 30511512874 10170000000 10170504291 1580065408 1580569699
+30513000000 30514512994 10171000000 10171504331 1581065408 1581569739
+30516000000 30516340344 10172000000 10172113448 1582065408 1582178856
+30519000000 30520513244 10173000000 10173504414 1583065408 1583569822
+30522000000 30523513502 10174000000 10174504500 1584065408 1584569908
+30525000000 30526513607 10175000000 10175504535 1585065408 1585569943
+30528000000 30529513687 10176000000 10176504562 1586065408 1586569970
+30531000000 30532513834 10177000000 10177504611 1587065408 1587570019
+30534000000 30535514088 10178000000 10178504696 1588065408 1588570104
+30537000000 30538514178 10179000000 10179504726 1589065408 1589570134
+30540000000 30541514423 10180000000 10180504807 1590065408 1590570215
+30543000000 30544514501 10181000000 10181504833 1591065408 1591570241
+30546000000 30547514678 10182000000 10182504892 1592065408 1592570300
+30549000000 30550514824 10183000000 10183504941 1593065408 1593570349
+30552000000 30553514968 10184000000 10184504989 1594065408 1594570397
+30555000000 30555137622 10185000000 10185045874 1595065408 1595111282
+30558000000 30559515283 10186000000 10186505094 1596065408 1596570502
+30561000000 30562515443 10187000000 10187505147 1597065408 1597570555
+30564000000 30565515580 10188000000 10188505193 1598065408 1598570601
+30567000000 30568515738 10189000000 10189505246 1599065408 1599570654
+30570000000 30571515896 10190000000 10190505298 1600065408 1600570706
+30573000000 30574516010 10191000000 10191505336 1601065408 1601570744
+30576000000 30577516171 10192000000 10192505390 1602065408 1602570798
+30579000000 30580516298 10193000000 10193505432 1603065408 1603570840
+30582000000 30583516407 10194000000 10194505469 1604065408 1604570877
+30585000000 30586516549 10195000000 10195505516 1605065408 1605570924
+30588000000 30589516783 10196000000 10196505594 1606065408 1606571002
+30591000000 30592516696 10197000000 10197505565 1607065408 1607570973
+30594000000 30595516817 10198000000 10198505605 1608065408 1608571013
+30597000000 30598516925 10199000000 10199505641 1609065408 1609571049
+30600000000 30601517160 10200000000 10200505720 1610065408 1610571128
+30603000000 30604517339 10201000000 10201505779 1611065408 1611571187
+30606000000 30607430979 10202000000 10202476993 1612065408 1612542401
+30609000000 30610517608 10203000000 10203505869 1613065408 1613571277
+30612000000 30613517781 10204000000 10204505927 1614065408 1614571335
+30615000000 30616517897 10205000000 10205505965 1615065408 1615571373
+30618000000 30619518070 10206000000 10206506023 1616065408 1616571431
+30621000000 30622518242 10207000000 10207506080 1617065408 1617571488
+30624000000 30625518298 10208000000 10208506099 1618065408 1618571507
+30627000000 30628518444 10209000000 10209506148 1619065408 1619571556
+30630000000 30631518640 10210000000 10210506213 1620065408 1620571621
+30633000000 30634518669 10211000000 10211506223 1621065408 1621571631
+30636000000 30637518975 10212000000 10212506325 1622065408 1622571733
+30639000000 30640519147 10213000000 10213506382 1623065408 1623571790
+30642000000 30643519280 10214000000 10214506426 1624065408 1624571834
+30645000000 30646519397 10215000000 10215506465 1625065408 1625571873
+30648000000 30649519582 10216000000 10216506527 1626065408 1626571935
+30651000000 30652519688 10217000000 10217506562 1627065408 1627571970
+30654000000 30655519869 10218000000 10218506623 1628065408 1628572031
+30657000000 30658520081 10219000000 10219506693 1629065408 1629572101
+30660000000 30661520188 10220000000 10220506729 1630065408 1630572137
+30663000000 30664520354 10221000000 10221506784 1631065408 1631572192
+30666000000 30667119099 10222000000 10222373033 1632065408 1632438441
+30669000000 30670520625 10223000000 10223506875 1633065408 1633572283
+30672000000 30673520737 10224000000 10224506912 1634065408 1634572320
+30675000000 30676520946 10225000000 10225506982 1635065408 1635572390
+30678000000 30679521025 10226000000 10226507008 1636065408 1636572416
+30681000000 30682521250 10227000000 10227507083 1637065408 1637572491
+30684000000 30685521377 10228000000 10228507125 1638065408 1638572533
+30687000000 30688521466 10229000000 10229507155 1639065408 1639572563
+30690000000 30691521572 10230000000 10230507190 1640065408 1640572598
+30693000000 30694521783 10231000000 10231507261 1641065408 1641572669
+30696000000 30697521992 10232000000 10232507330 1642065408 1642572738
+30699000000 30700522137 10233000000 10233507379 1643065408 1643572787
+30702000000 30703522263 10234000000 10234507421 1644065408 1644572829
+30705000000 30706522429 10235000000 10235507476 1645065408 1645572884
+30708000000 30709522509 10236000000 10236507503 1646065408 1646572911
+30711000000 30712522744 10237000000 10237507581 1647065408 1647572989
+30714000000 30715522903 10238000000 10238507634 1648065408 1648573042
+30717000000 30718523024 10239000000 10239507674 1649065408 1649573082
+30720000000 30721523184 10240000000 10240507728 1650065408 1650573136
+30723000000 30724523267 10241000000 10241507755 1651065408 1651573163
+30726000000 30727523513 10242000000 10242507837 1652065408 1652573245
+30729000000 30730523636 10243000000 10243507878 1653065408 1653573286
+30732000000 30733523772 10244000000 10244507924 1654065408 1654573332
+30735000000 30736523947 10245000000 10245507982 1655065408 1655573390
+30738000000 30739524069 10246000000 10246508023 1656065408 1656573431
+30741000000 30742524219 10247000000 10247508073 1657065408 1657573481
+30744000000 30745524367 10248000000 10248508122 1658065408 1658573530
+30747000000 30747698061 10249000000 10249232687 1659065408 1659298095
+30750000000 30751524687 10250000000 10250508229 1660065408 1660573637
+30753000000 30754524819 10251000000 10251508273 1661065408 1661573681
+30756000000 30757524993 10252000000 10252508331 1662065408 1662573739
+30759000000 30760525112 10253000000 10253508370 1663065408 1663573778
+30762000000 30763525236 10254000000 10254508412 1664065408 1664573820
+30765000000 30766525455 10255000000 10255508485 1665065408 1665573893
+30768000000 30769525591 10256000000 10256508530 1666065408 1666573938
+30771000000 30772525742 10257000000 10257508580 1667065408 1667573988
+30774000000 30775525892 10258000000 10258508630 1668065408 1668574038
+30777000000 30778526007 10259000000 10259508669 1669065408 1669574077
+30780000000 30781526104 10260000000 10260508701 1670065408 1670574109
+30783000000 30784526312 10261000000 10261508770 1671065408 1671574178
+30786000000 30787526467 10262000000 10262508822 1672065408 1672574230
+30789000000 30790526626 10263000000 10263508875 1673065408 1673574283
+30792000000 30793526800 10264000000 10264508933 1674065408 1674574341
+30795000000 30796526900 10265000000 10265508966 1675065408 1675574374
+30798000000 30799527078 10266000000 10266509026 1676065408 1676574434
+30801000000 30802527227 10267000000 10267509075 1677065408 1677574483
+30804000000 30805527355 10268000000 10268509118 1678065408 1678574526
+30807000000 30808527524 10269000000 10269509174 1679065408 1679574582
+30810000000 30811527644 10270000000 10270509214 1680065408 1680574622
+30813000000 30813354994 10271000000 10271118331 1681065408 1681183739
+30816000000 30817527894 10272000000 10272509298 1682065408 1682574706
+30819000000 30820528152 10273000000 10273509384 1683065408 1683574792
+30822000000 30823528257 10274000000 10274509419 1684065408 1684574827
+30825000000 30826528337 10275000000 10275509445 1685065408 1685574853
+30828000000 30829528484 10276000000 10276509494 1686065408 1686574902
+30831000000 30832528738 10277000000 10277509579 1687065408 1687574987
+30834000000 30835528828 10278000000 10278509609 1688065408 1688575017
+30837000000 30838529073 10279000000 10279509691 1689065408 1689575099
+30840000000 30841529151 10280000000 10280509717 1690065408 1690575125
+30843000000 30844529328 10281000000 10281509776 1691065408 1691575184
+30846000000 30847529474 10282000000 10282509824 1692065408 1692575232
+30849000000 30850529618 10283000000 10283509872 1693065408 1693575280
+30852000000 30852152272 10284000000 10284050757 1694065408 1694116165
+30855000000 30856529933 10285000000 10285509977 1695065408 1695575385
+30858000000 30859530093 10286000000 10286510031 1696065408 1696575439
+30861000000 30862530230 10287000000 10287510076 1697065408 1697575484
+30864000000 30865530388 10288000000 10288510129 1698065408 1698575537
+30867000000 30868530546 10289000000 10289510182 1699065408 1699575590
+30870000000 30871530660 10290000000 10290510220 1700065408 1700575628
+30873000000 30874530821 10291000000 10291510273 1701065408 1701575681
+30876000000 30877530948 10292000000 10292510316 1702065408 1702575724
+30879000000 30880531057 10293000000 10293510352 1703065408 1703575760
+30882000000 30883531199 10294000000 10294510399 1704065408 1704575807
+30885000000 30886531433 10295000000 10295510477 1705065408 1705575885
+30888000000 30889531346 10296000000 10296510448 1706065408 1706575856
+30891000000 30892531467 10297000000 10297510489 1707065408 1707575897
+30894000000 30895531575 10298000000 10298510525 1708065408 1708575933
+30897000000 30898531810 10299000000 10299510603 1709065408 1709576011
+30900000000 30901531989 10300000000 10300510663 1710065408 1710576071
+30903000000 30904445629 10301000000 10301481876 1711065408 1711547284
+30906000000 30907532258 10302000000 10302510752 1712065408 1712576160
+30909000000 30910532431 10303000000 10303510810 1713065408 1713576218
+30912000000 30913532547 10304000000 10304510849 1714065408 1714576257
+30915000000 30916532720 10305000000 10305510906 1715065408 1715576314
+30918000000 30919532892 10306000000 10306510964 1716065408 1716576372
+30921000000 30922532948 10307000000 10307510982 1717065408 1717576390
+30924000000 30925533094 10308000000 10308511031 1718065408 1718576439
+30927000000 30928533290 10309000000 10309511096 1719065408 1719576504
+30930000000 30931533319 10310000000 10310511106 1720065408 1720576514
+30933000000 30934533625 10311000000 10311511208 1721065408 1721576616
+30936000000 30937533797 10312000000 10312511265 1722065408 1722576673
+30939000000 30940533930 10313000000 10313511310 1723065408 1723576718
+30942000000 30943534047 10314000000 10314511349 1724065408 1724576757
+30945000000 30946534232 10315000000 10315511410 1725065408 1725576818
+30948000000 30949534338 10316000000 10316511446 1726065408 1726576854
+30951000000 30952534519 10317000000 10317511506 1727065408 1727576914
+30954000000 30955534731 10318000000 10318511577 1728065408 1728576985
+30957000000 30958534838 10319000000 10319511612 1729065408 1729577020
+30960000000 30961535004 10320000000 10320511668 1730065408 1730577076
+30963000000 30964133749 10321000000 10321377916 1731065408 1731443324
+30966000000 30967535275 10322000000 10322511758 1732065408 1732577166
+30969000000 30970535387 10323000000 10323511795 1733065408 1733577203
+30972000000 30973535596 10324000000 10324511865 1734065408 1734577273
+30975000000 30976535675 10325000000 10325511891 1735065408 1735577299
+30978000000 30979535900 10326000000 10326511966 1736065408 1736577374
+30981000000 30982536027 10327000000 10327512009 1737065408 1737577417
+30984000000 30985536116 10328000000 10328512038 1738065408 1738577446
+30987000000 30988536222 10329000000 10329512074 1739065408 1739577482
+30990000000 30991536433 10330000000 10330512144 1740065408 1740577552
+30993000000 30994536642 10331000000 10331512214 1741065408 1741577622
+30996000000 30997536787 10332000000 10332512262 1742065408 1742577670
+30999000000 31000536913 10333000000 10333512304 1743065408 1743577712
+31002000000 31003537079 10334000000 10334512359 1744065408 1744577767
+31005000000 31006537159 10335000000 10335512386 1745065408 1745577794
+31008000000 31009537394 10336000000 10336512464 1746065408 1746577872
+31011000000 31012537553 10337000000 10337512517 1747065408 1747577925
+31014000000 31015537674 10338000000 10338512558 1748065408 1748577966
+31017000000 31018537834 10339000000 10339512611 1749065408 1749578019
+31020000000 31021537917 10340000000 10340512639 1750065408 1750578047
+31023000000 31024538163 10341000000 10341512721 1751065408 1751578129
+31026000000 31027538286 10342000000 10342512762 1752065408 1752578170
+31029000000 31030538422 10343000000 10343512807 1753065408 1753578215
+31032000000 31033538597 10344000000 10344512865 1754065408 1754578273
+31035000000 31036538719 10345000000 10345512906 1755065408 1755578314
+31038000000 31039538869 10346000000 10346512956 1756065408 1756578364
+31041000000 31042539017 10347000000 10347513005 1757065408 1757578413
+31044000000 31044712711 10348000000 10348237570 1758065408 1758302978
+31047000000 31048539337 10349000000 10349513112 1759065408 1759578520
+31050000000 31051539469 10350000000 10350513156 1760065408 1760578564
+31053000000 31054539643 10351000000 10351513214 1761065408 1761578622
+31056000000 31057539762 10352000000 10352513254 1762065408 1762578662
+31059000000 31060539886 10353000000 10353513295 1763065408 1763578703
+31062000000 31063540105 10354000000 10354513368 1764065408 1764578776
+31065000000 31066540241 10355000000 10355513413 1765065408 1765578821
+31068000000 31069540392 10356000000 10356513464 1766065408 1766578872
+31071000000 31072540542 10357000000 10357513514 1767065408 1767578922
+31074000000 31075540657 10358000000 10358513552 1768065408 1768578960
+31077000000 31078540754 10359000000 10359513584 1769065408 1769578992
+31080000000 31081540962 10360000000 10360513654 1770065408 1770579062
+31083000000 31084541117 10361000000 10361513705 1771065408 1771579113
+31086000000 31087541276 10362000000 10362513758 1772065408 1772579166
+31089000000 31090541450 10363000000 10363513816 1773065408 1773579224
+31092000000 31093541550 10364000000 10364513850 1774065408 1774579258
+31095000000 31096541728 10365000000 10365513909 1775065408 1775579317
+31098000000 31099541877 10366000000 10366513959 1776065408 1776579367
+31101000000 31102542005 10367000000 10367514001 1777065408 1777579409
+31104000000 31105542174 10368000000 10368514058 1778065408 1778579466
+31107000000 31108542294 10369000000 10369514098 1779065408 1779579506
+31110000000 31110369644 10370000000 10370123214 1780065408 1780188622
+31113000000 31114542544 10371000000 10371514181 1781065408 1781579589
+31116000000 31117542802 10372000000 10372514267 1782065408 1782579675
+31119000000 31120542907 10373000000 10373514302 1783065408 1783579710
+31122000000 31123542987 10374000000 10374514329 1784065408 1784579737
+31125000000 31126543134 10375000000 10375514378 1785065408 1785579786
+31128000000 31129543388 10376000000 10376514462 1786065408 1786579870
+31131000000 31132543478 10377000000 10377514492 1787065408 1787579900
+31134000000 31135543723 10378000000 10378514574 1788065408 1788579982
+31137000000 31138543801 10379000000 10379514600 1789065408 1789580008
+31140000000 31141543978 10380000000 10380514659 1790065408 1790580067
+31143000000 31144544124 10381000000 10381514708 1791065408 1791580116
+31146000000 31147544268 10382000000 10382514756 1792065408 1792580164
+31149000000 31149166922 10383000000 10383055640 1793065408 1793121048
+31152000000 31153544583 10384000000 10384514861 1794065408 1794580269
+31155000000 31156544743 10385000000 10385514914 1795065408 1795580322
+31158000000 31159544880 10386000000 10386514960 1796065408 1796580368
+31161000000 31162545038 10387000000 10387515012 1797065408 1797580420
+31164000000 31165545196 10388000000 10388515065 1798065408 1798580473
+31167000000 31168545310 10389000000 10389515103 1799065408 1799580511
+31170000000 31171545471 10390000000 10390515157 1800065408 1800580565
+31173000000 31174545598 10391000000 10391515199 1801065408 1801580607
+31176000000 31177545707 10392000000 10392515235 1802065408 1802580643
+31179000000 31180545849 10393000000 10393515283 1803065408 1803580691
+31182000000 31183546083 10394000000 10394515361 1804065408 1804580769
+31185000000 31186545996 10395000000 10395515332 1805065408 1805580740
+31188000000 31189546117 10396000000 10396515372 1806065408 1806580780
+31191000000 31192546225 10397000000 10397515408 1807065408 1807580816
+31194000000 31195546460 10398000000 10398515486 1808065408 1808580894
+31197000000 31198546639 10399000000 10399515546 1809065408 1809580954
+31200000000 31201460279 10400000000 10400486759 1810065408 1810552167
+31203000000 31204546908 10401000000 10401515636 1811065408 1811581044
+31206000000 31207547081 10402000000 10402515693 1812065408 1812581101
+31209000000 31210547197 10403000000 10403515732 1813065408 1813581140
+31212000000 31213547370 10404000000 10404515790 1814065408 1814581198
+31215000000 31216547542 10405000000 10405515847 1815065408 1815581255
+31218000000 31219547598 10406000000 10406515866 1816065408 1816581274
+31221000000 31222547744 10407000000 10407515914 1817065408 1817581322
+31224000000 31225547940 10408000000 10408515980 1818065408 1818581388
+31227000000 31228547969 10409000000 10409515989 1819065408 1819581397
+31230000000 31231548275 10410000000 10410516091 1820065408 1820581499
+31233000000 31234548447 10411000000 10411516149 1821065408 1821581557
+31236000000 31237548580 10412000000 10412516193 1822065408 1822581601
+31239000000 31240548697 10413000000 10413516232 1823065408 1823581640
+31242000000 31243548882 10414000000 10414516294 1824065408 1824581702
+31245000000 31246548988 10415000000 10415516329 1825065408 1825581737
+31248000000 31249549169 10416000000 10416516389 1826065408 1826581797
+31251000000 31252549381 10417000000 10417516460 1827065408 1827581868
+31254000000 31255549488 10418000000 10418516496 1828065408 1828581904
+31257000000 31258549654 10419000000 10419516551 1829065408 1829581959
+31260000000 31261148399 10420000000 10420382799 1830065408 1830448207
+31263000000 31264549925 10421000000 10421516641 1831065408 1831582049
+31266000000 31267550037 10422000000 10422516679 1832065408 1832582087
+31269000000 31270550246 10423000000 10423516748 1833065408 1833582156
+31272000000 31273550325 10424000000 10424516775 1834065408 1834582183
+31275000000 31276550550 10425000000 10425516850 1835065408 1835582258
+31278000000 31279550677 10426000000 10426516892 1836065408 1836582300
+31281000000 31282550766 10427000000 10427516922 1837065408 1837582330
+31284000000 31285550872 10428000000 10428516957 1838065408 1838582365
+31287000000 31288551083 10429000000 10429517027 1839065408 1839582435
+31290000000 31291551292 10430000000 10430517097 1840065408 1840582505
+31293000000 31294551437 10431000000 10431517145 1841065408 1841582553
+31296000000 31297551563 10432000000 10432517187 1842065408 1842582595
+31299000000 31300551729 10433000000 10433517243 1843065408 1843582651
+31302000000 31303551809 10434000000 10434517269 1844065408 1844582677
+31305000000 31306552044 10435000000 10435517348 1845065408 1845582756
+31308000000 31309552203 10436000000 10436517401 1846065408 1846582809
+31311000000 31312552324 10437000000 10437517441 1847065408 1847582849
+31314000000 31315552484 10438000000 10438517494 1848065408 1848582902
+31317000000 31318552567 10439000000 10439517522 1849065408 1849582930
+31320000000 31321552813 10440000000 10440517604 1850065408 1850583012
+31323000000 31324552936 10441000000 10441517645 1851065408 1851583053
+31326000000 31327553072 10442000000 10442517690 1852065408 1852583098
+31329000000 31330553247 10443000000 10443517749 1853065408 1853583157
+31332000000 31333553369 10444000000 10444517789 1854065408 1854583197
+31335000000 31336553519 10445000000 10445517839 1855065408 1855583247
+31338000000 31339553667 10446000000 10446517889 1856065408 1856583297
+31341000000 31341727361 10447000000 10447242453 1857065408 1857307861
+31344000000 31345553987 10448000000 10448517995 1858065408 1858583403
+31347000000 31348554119 10449000000 10449518039 1859065408 1859583447
+31350000000 31351554293 10450000000 10450518097 1860065408 1860583505
+31353000000 31354554412 10451000000 10451518137 1861065408 1861583545
+31356000000 31357554536 10452000000 10452518178 1862065408 1862583586
+31359000000 31360554755 10453000000 10453518251 1863065408 1863583659
+31362000000 31363554891 10454000000 10454518297 1864065408 1864583705
+31365000000 31366555042 10455000000 10455518347 1865065408 1865583755
+31368000000 31369555192 10456000000 10456518397 1866065408 1866583805
+31371000000 31372555307 10457000000 10457518435 1867065408 1867583843
+31374000000 31375555404 10458000000 10458518468 1868065408 1868583876
+31377000000 31378555612 10459000000 10459518537 1869065408 1869583945
+31380000000 31381555767 10460000000 10460518589 1870065408 1870583997
+31383000000 31384555926 10461000000 10461518642 1871065408 1871584050
+31386000000 31387556100 10462000000 10462518700 1872065408 1872584108
+31389000000 31390556200 10463000000 10463518733 1873065408 1873584141
+31392000000 31393556378 10464000000 10464518792 1874065408 1874584200
+31395000000 31396556527 10465000000 10465518842 1875065408 1875584250
+31398000000 31399556655 10466000000 10466518885 1876065408 1876584293
+31401000000 31402556824 10467000000 10467518941 1877065408 1877584349
+31404000000 31405556944 10468000000 10468518981 1878065408 1878584389
+31407000000 31407384294 10469000000 10469128098 1879065408 1879193506
+31410000000 31411557194 10470000000 10470519064 1880065408 1880584472
+31413000000 31414557452 10471000000 10471519150 1881065408 1881584558
+31416000000 31417557557 10472000000 10472519185 1882065408 1882584593
+31419000000 31420557637 10473000000 10473519212 1883065408 1883584620
+31422000000 31423557784 10474000000 10474519261 1884065408 1884584669
+31425000000 31426558038 10475000000 10475519346 1885065408 1885584754
+31428000000 31429558128 10476000000 10476519376 1886065408 1886584784
+31431000000 31432558373 10477000000 10477519457 1887065408 1887584865
+31434000000 31435558451 10478000000 10478519483 1888065408 1888584891
+31437000000 31438558628 10479000000 10479519542 1889065408 1889584950
+31440000000 31441558774 10480000000 10480519591 1890065408 1890584999
+31443000000 31444558918 10481000000 10481519639 1891065408 1891585047
+31446000000 31446181572 10482000000 10482060524 1892065408 1892125932
+31449000000 31450559233 10483000000 10483519744 1893065408 1893585152
+31452000000 31453559393 10484000000 10484519797 1894065408 1894585205
+31455000000 31456559530 10485000000 10485519843 1895065408 1895585251
+31458000000 31459559688 10486000000 10486519896 1896065408 1896585304
+31461000000 31462559846 10487000000 10487519948 1897065408 1897585356
+31464000000 31465559960 10488000000 10488519986 1898065408 1898585394
+31467000000 31468560121 10489000000 10489520040 1899065408 1899585448
+31470000000 31471560248 10490000000 10490520082 1900065408 1900585490
+31473000000 31474560357 10491000000 10491520119 1901065408 1901585527
+31476000000 31477560499 10492000000 10492520166 1902065408 1902585574
+31479000000 31480560733 10493000000 10493520244 1903065408 1903585652
+31482000000 31483560646 10494000000 10494520215 1904065408 1904585623
+31485000000 31486560767 10495000000 10495520255 1905065408 1905585663
+31488000000 31489560875 10496000000 10496520291 1906065408 1906585699
+31491000000 31492561110 10497000000 10497520370 1907065408 1907585778
+31494000000 31495561289 10498000000 10498520429 1908065408 1908585837
+31497000000 31498474929 10499000000 10499491643 1909065408 1909557051
+31500000000 31501561558 10500000000 10500520519 1910065408 1910585927
+31503000000 31504561731 10501000000 10501520577 1911065408 1911585985
+31506000000 31507561847 10502000000 10502520615 1912065408 1912586023
+31509000000 31510562020 10503000000 10503520673 1913065408 1913586081
+31512000000 31513562192 10504000000 10504520730 1914065408 1914586138
+31515000000 31516562248 10505000000 10505520749 1915065408 1915586157
+31518000000 31519562394 10506000000 10506520798 1916065408 1916586206
+31521000000 31522562590 10507000000 10507520863 1917065408 1917586271
+31524000000 31525562619 10508000000 10508520873 1918065408 1918586281
+31527000000 31528562925 10509000000 10509520975 1919065408 1919586383
+31530000000 31531563097 10510000000 10510521032 1920065408 1920586440
+31533000000 31534563230 10511000000 10511521076 1921065408 1921586484
+31536000000 31537563347 10512000000 10512521115 1922065408 1922586523
+31539000000 31540563532 10513000000 10513521177 1923065408 1923586585
+31542000000 31543563638 10514000000 10514521212 1924065408 1924586620
+31545000000 31546563819 10515000000 10515521273 1925065408 1925586681
+31548000000 31549564031 10516000000 10516521343 1926065408 1926586751
+31551000000 31552564138 10517000000 10517521379 1927065408 1927586787
+31554000000 31555564304 10518000000 10518521434 1928065408 1928586842
+31557000000 31558163049 10519000000 10519387683 1929065408 1929453091
+31560000000 31561564575 10520000000 10520521525 1930065408 1930586933
+31563000000 31564564687 10521000000 10521521562 1931065408 1931586970
+31566000000 31567564896 10522000000 10522521632 1932065408 1932587040
+31569000000 31570564975 10523000000 10523521658 1933065408 1933587066
+31572000000 31573565200 10524000000 10524521733 1934065408 1934587141
+31575000000 31576565327 10525000000 10525521775 1935065408 1935587183
+31578000000 31579565416 10526000000 10526521805 1936065408 1936587213
+31581000000 31582565522 10527000000 10527521840 1937065408 1937587248
+31584000000 31585565733 10528000000 10528521911 1938065408 1938587319
+31587000000 31588565942 10529000000 10529521980 1939065408 1939587388
+31590000000 31591566087 10530000000 10530522029 1940065408 1940587437
+31593000000 31594566213 10531000000 10531522071 1941065408 1941587479
+31596000000 31597566379 10532000000 10532522126 1942065408 1942587534
+31599000000 31600566459 10533000000 10533522153 1943065408 1943587561
+31602000000 31603566694 10534000000 10534522231 1944065408 1944587639
+31605000000 31606566853 10535000000 10535522284 1945065408 1945587692
+31608000000 31609566974 10536000000 10536522324 1946065408 1946587732
+31611000000 31612567134 10537000000 10537522378 1947065408 1947587786
+31614000000 31615567217 10538000000 10538522405 1948065408 1948587813
+31617000000 31618567463 10539000000 10539522487 1949065408 1949587895
+31620000000 31621567586 10540000000 10540522528 1950065408 1950587936
+31623000000 31624567722 10541000000 10541522574 1951065408 1951587982
+31626000000 31627567897 10542000000 10542522632 1952065408 1952588040
+31629000000 31630568019 10543000000 10543522673 1953065408 1953588081
+31632000000 31633568169 10544000000 10544522723 1954065408 1954588131
+31635000000 31636568317 10545000000 10545522772 1955065408 1955588180
+31638000000 31638742011 10546000000 10546247337 1956065408 1956312745
+31641000000 31642568637 10547000000 10547522879 1957065408 1957588287
+31644000000 31645568769 10548000000 10548522923 1958065408 1958588331
+31647000000 31648568943 10549000000 10549522981 1959065408 1959588389
+31650000000 31651569062 10550000000 10550523020 1960065408 1960588428
+31653000000 31654569186 10551000000 10551523062 1961065408 1961588470
+31656000000 31657569405 10552000000 10552523135 1962065408 1962588543
+31659000000 31660569541 10553000000 10553523180 1963065408 1963588588
+31662000000 31663569692 10554000000 10554523230 1964065408 1964588638
+31665000000 31666569842 10555000000 10555523280 1965065408 1965588688
+31668000000 31669569957 10556000000 10556523319 1966065408 1966588727
+31671000000 31672570054 10557000000 10557523351 1967065408 1967588759
+31674000000 31675570262 10558000000 10558523420 1968065408 1968588828
+31677000000 31678570417 10559000000 10559523472 1969065408 1969588880
+31680000000 31681570576 10560000000 10560523525 1970065408 1970588933
+31683000000 31684570750 10561000000 10561523583 1971065408 1971588991
+31686000000 31687570850 10562000000 10562523616 1972065408 1972589024
+31689000000 31690571028 10563000000 10563523676 1973065408 1973589084
+31692000000 31693571177 10564000000 10564523725 1974065408 1974589133
+31695000000 31696571305 10565000000 10565523768 1975065408 1975589176
+31698000000 31699571474 10566000000 10566523824 1976065408 1976589232
+31701000000 31702571594 10567000000 10567523864 1977065408 1977589272
+31704000000 31704398944 10568000000 10568132981 1978065408 1978198389
+31707000000 31708571844 10569000000 10569523948 1979065408 1979589356
+31710000000 31711572102 10570000000 10570524034 1980065408 1980589442
+31713000000 31714572207 10571000000 10571524069 1981065408 1981589477
+31716000000 31717572287 10572000000 10572524095 1982065408 1982589503
+31719000000 31720572434 10573000000 10573524144 1983065408 1983589552
+31722000000 31723572688 10574000000 10574524229 1984065408 1984589637
+31725000000 31726572778 10575000000 10575524259 1985065408 1985589667
+31728000000 31729573023 10576000000 10576524341 1986065408 1986589749
+31731000000 31732573101 10577000000 10577524367 1987065408 1987589775
+31734000000 31735573278 10578000000 10578524426 1988065408 1988589834
+31737000000 31738573424 10579000000 10579524474 1989065408 1989589882
+31740000000 31741573568 10580000000 10580524522 1990065408 1990589930
+31743000000 31743196222 10581000000 10581065407 1991065408 1991130815
+31746000000 31747573883 10582000000 10582524627 1992065408 1992590035
+31749000000 31750574043 10583000000 10583524681 1993065408 1993590089
+31752000000 31753574180 10584000000 10584524726 1994065408 1994590134
+31755000000 31756574338 10585000000 10585524779 1995065408 1995590187
+31758000000 31759574496 10586000000 10586524832 1996065408 1996590240
+31761000000 31762574610 10587000000 10587524870 1997065408 1997590278
+31764000000 31765574771 10588000000 10588524923 1998065408 1998590331
+31767000000 31768574898 10589000000 10589524966 1999065408 1999590374
+31770000000 31771575007 10590000000 10590525002 2000065408 2000590410
+31773000000 31774575149 10591000000 10591525049 2001065408 2001590457
+31776000000 31777575383 10592000000 10592525127 2002065408 2002590535
+31779000000 31780575296 10593000000 10593525098 2003065408 2003590506
+31782000000 31783575417 10594000000 10594525139 2004065408 2004590547
+31785000000 31786575525 10595000000 10595525175 2005065408 2005590583
+31788000000 31789575760 10596000000 10596525253 2006065408 2006590661
+31791000000 31792575939 10597000000 10597525313 2007065408 2007590721
+31794000000 31795489579 10598000000 10598496526 2008065408 2008561934
+31797000000 31798576208 10599000000 10599525402 2009065408 2009590810
+31800000000 31801576381 10600000000 10600525460 2010065408 2010590868
+31803000000 31804576497 10601000000 10601525499 2011065408 2011590907
+31806000000 31807576670 10602000000 10602525556 2012065408 2012590964
+31809000000 31810576842 10603000000 10603525614 2013065408 2013591022
+31812000000 31813576898 10604000000 10604525632 2014065408 2014591040
+31815000000 31816577044 10605000000 10605525681 2015065408 2015591089
+31818000000 31819577240 10606000000 10606525746 2016065408 2016591154
+31821000000 31822577269 10607000000 10607525756 2017065408 2017591164
+31824000000 31825577575 10608000000 10608525858 2018065408 2018591266
+31827000000 31828577747 10609000000 10609525915 2019065408 2019591323
+31830000000 31831577880 10610000000 10610525960 2020065408 2020591368
+31833000000 31834577997 10611000000 10611525999 2021065408 2021591407
+31836000000 31837578182 10612000000 10612526060 2022065408 2022591468
+31839000000 31840578288 10613000000 10613526096 2023065408 2023591504
+31842000000 31843578469 10614000000 10614526156 2024065408 2024591564
+31845000000 31846578681 10615000000 10615526227 2025065408 2025591635
+31848000000 31849578788 10616000000 10616526262 2026065408 2026591670
+31851000000 31852578954 10617000000 10617526318 2027065408 2027591726
+31854000000 31855177699 10618000000 10618392566 2028065408 2028457974
+31857000000 31858579225 10619000000 10619526408 2029065408 2029591816
+31860000000 31861579337 10620000000 10620526445 2030065408 2030591853
+31863000000 31864579546 10621000000 10621526515 2031065408 2031591923
+31866000000 31867579625 10622000000 10622526541 2032065408 2032591949
+31869000000 31870579850 10623000000 10623526616 2033065408 2033592024
+31872000000 31873579977 10624000000 10624526659 2034065408 2034592067
+31875000000 31876580066 10625000000 10625526688 2035065408 2035592096
+31878000000 31879580172 10626000000 10626526724 2036065408 2036592132
+31881000000 31882580383 10627000000 10627526794 2037065408 2037592202
+31884000000 31885580592 10628000000 10628526864 2038065408 2038592272
+31887000000 31888580737 10629000000 10629526912 2039065408 2039592320
+31890000000 31891580863 10630000000 10630526954 2040065408 2040592362
+31893000000 31894581029 10631000000 10631527009 2041065408 2041592417
+31896000000 31897581109 10632000000 10632527036 2042065408 2042592444
+31899000000 31900581344 10633000000 10633527114 2043065408 2043592522
+31902000000 31903581503 10634000000 10634527167 2044065408 2044592575
+31905000000 31906581624 10635000000 10635527208 2045065408 2045592616
+31908000000 31909581784 10636000000 10636527261 2046065408 2046592669
+31911000000 31912581867 10637000000 10637527289 2047065408 2047592697
+31914000000 31915582113 10638000000 10638527371 2048065408 2048592779
+31917000000 31918582236 10639000000 10639527412 2049065408 2049592820
+31920000000 31921582372 10640000000 10640527457 2050065408 2050592865
+31923000000 31924582547 10641000000 10641527515 2051065408 2051592923
+31926000000 31927582669 10642000000 10642527556 2052065408 2052592964
+31929000000 31930582819 10643000000 10643527606 2053065408 2053593014
+31932000000 31933582967 10644000000 10644527655 2054065408 2054593063
+31935000000 31935756661 10645000000 10645252220 2055065408 2055317628
+31938000000 31939583287 10646000000 10646527762 2056065408 2056593170
+31941000000 31942583419 10647000000 10647527806 2057065408 2057593214
+31944000000 31945583593 10648000000 10648527864 2058065408 2058593272
+31947000000 31948583712 10649000000 10649527904 2059065408 2059593312
+31950000000 31951583836 10650000000 10650527945 2060065408 2060593353
+31953000000 31954584055 10651000000 10651528018 2061065408 2061593426
+31956000000 31957584191 10652000000 10652528063 2062065408 2062593471
+31959000000 31960584342 10653000000 10653528114 2063065408 2063593522
+31962000000 31963584492 10654000000 10654528164 2064065408 2064593572
+31965000000 31966584607 10655000000 10655528202 2065065408 2065593610
+31968000000 31969584704 10656000000 10656528234 2066065408 2066593642
+31971000000 31972584912 10657000000 10657528304 2067065408 2067593712
+31974000000 31975585067 10658000000 10658528355 2068065408 2068593763
+31977000000 31978585226 10659000000 10659528408 2069065408 2069593816
+31980000000 31981585400 10660000000 10660528466 2070065408 2070593874
+31983000000 31984585500 10661000000 10661528500 2071065408 2071593908
+31986000000 31987585678 10662000000 10662528559 2072065408 2072593967
+31989000000 31990585827 10663000000 10663528609 2073065408 2073594017
+31992000000 31993585955 10664000000 10664528651 2074065408 2074594059
+31995000000 31996586124 10665000000 10665528708 2075065408 2075594116
+31998000000 31999586244 10666000000 10666528748 2076065408 2076594156
+32001000000 32001413594 10667000000 10667137864 2077065408 2077203272
+32004000000 32005586494 10668000000 10668528831 2078065408 2078594239
+32007000000 32008586752 10669000000 10669528917 2079065408 2079594325
+32010000000 32011586857 10670000000 10670528952 2080065408 2080594360
+32013000000 32014586937 10671000000 10671528979 2081065408 2081594387
+32016000000 32017587084 10672000000 10672529028 2082065408 2082594436
+32019000000 32020587338 10673000000 10673529112 2083065408 2083594520
+32022000000 32023587428 10674000000 10674529142 2084065408 2084594550
+32025000000 32026587673 10675000000 10675529224 2085065408 2085594632
+32028000000 32029587751 10676000000 10676529250 2086065408 2086594658
+32031000000 32032587928 10677000000 10677529309 2087065408 2087594717
+32034000000 32035588074 10678000000 10678529358 2088065408 2088594766
+32037000000 32038588218 10679000000 10679529406 2089065408 2089594814
+32040000000 32040210872 10680000000 10680070290 2090065408 2090135698
+32043000000 32044588533 10681000000 10681529511 2091065408 2091594919
+32046000000 32047588693 10682000000 10682529564 2092065408 2092594972
+32049000000 32050588830 10683000000 10683529610 2093065408 2093595018
+32052000000 32053588988 10684000000 10684529662 2094065408 2094595070
+32055000000 32056589146 10685000000 10685529715 2095065408 2095595123
+32058000000 32059589260 10686000000 10686529753 2096065408 2096595161
+32061000000 32062589421 10687000000 10687529807 2097065408 2097595215
+32064000000 32065589548 10688000000 10688529849 2098065408 2098595257
+32067000000 32068589657 10689000000 10689529885 2099065408 2099595293
+32070000000 32071589799 10690000000 10690529933 2100065408 2100595341
+32073000000 32074590033 10691000000 10691530011 2101065408 2101595419
+32076000000 32077589946 10692000000 10692529982 2102065408 2102595390
+32079000000 32080590067 10693000000 10693530022 2103065408 2103595430
+32082000000 32083590175 10694000000 10694530058 2104065408 2104595466
+32085000000 32086590410 10695000000 10695530136 2105065408 2105595544
+32088000000 32089590589 10696000000 10696530196 2106065408 2106595604
+32091000000 32092504229 10697000000 10697501409 2107065408 2107566817
+32094000000 32095590858 10698000000 10698530286 2108065408 2108595694
+32097000000 32098591031 10699000000 10699530343 2109065408 2109595751
+32100000000 32101591147 10700000000 10700530382 2110065408 2110595790
+32103000000 32104591320 10701000000 10701530440 2111065408 2111595848
+32106000000 32107591492 10702000000 10702530497 2112065408 2112595905
+32109000000 32110591548 10703000000 10703530516 2113065408 2113595924
+32112000000 32113591694 10704000000 10704530564 2114065408 2114595972
+32115000000 32116591890 10705000000 10705530630 2115065408 2115596038
+32118000000 32119591919 10706000000 10706530639 2116065408 2116596047
+32121000000 32122592225 10707000000 10707530741 2117065408 2117596149
+32124000000 32125592397 10708000000 10708530799 2118065408 2118596207
+32127000000 32128592530 10709000000 10709530843 2119065408 2119596251
+32130000000 32131592647 10710000000 10710530882 2120065408 2120596290
+32133000000 32134592832 10711000000 10711530944 2121065408 2121596352
+32136000000 32137592938 10712000000 10712530979 2122065408 2122596387
+32139000000 32140593119 10713000000 10713531039 2123065408 2123596447
+32142000000 32143593331 10714000000 10714531110 2124065408 2124596518
+32145000000 32146593438 10715000000 10715531146 2125065408 2125596554
+32148000000 32149593604 10716000000 10716531201 2126065408 2126596609
+32151000000 32152192349 10717000000 10717397449 2127065408 2127462857
+32154000000 32155593875 10718000000 10718531291 2128065408 2128596699
+32157000000 32158593987 10719000000 10719531329 2129065408 2129596737
+32160000000 32161594196 10720000000 10720531398 2130065408 2130596806
+32163000000 32164594275 10721000000 10721531425 2131065408 2131596833
+32166000000 32167594500 10722000000 10722531500 2132065408 2132596908
+32169000000 32170594627 10723000000 10723531542 2133065408 2133596950
+32172000000 32173594716 10724000000 10724531572 2134065408 2134596980
+32175000000 32176594822 10725000000 10725531607 2135065408 2135597015
+32178000000 32179595033 10726000000 10726531677 2136065408 2136597085
+32181000000 32182595242 10727000000 10727531747 2137065408 2137597155
+32184000000 32185595387 10728000000 10728531795 2138065408 2138597203
+32187000000 32188595513 10729000000 10729531837 2139065408 2139597245
+32190000000 32191595679 10730000000 10730531893 2140065408 2140597301
+32193000000 32194595759 10731000000 10731531919 2141065408 2141597327
+32196000000 32197595994 10732000000 10732531998 2142065408 2142597406
+32199000000 32200596153 10733000000 10733532051 2143065408 2143597459
+32202000000 32203596274 10734000000 10734532091 2144065408 2144597499
+32205000000 32206596434 10735000000 10735532144 2145065408 2145597552
+32208000000 32209596517 10736000000 10736532172 2146065408 2146597580
+32211000000 32212596763 10737000000 10737532254 2147065408 2147597662
+32214000000 32215596886 10738000000 10738532295 2148065408 2148597703
+32217000000 32218597022 10739000000 10739532340 2149065408 2149597748
+32220000000 32221597197 10740000000 10740532399 2150065408 2150597807
+32223000000 32224597319 10741000000 10741532439 2151065408 2151597847
+32226000000 32227597469 10742000000 10742532489 2152065408 2152597897
+32229000000 32230597617 10743000000 10743532539 2153065408 2153597947
+32232000000 32232771311 10744000000 10744257103 2154065408 2154322511
+32235000000 32236597937 10745000000 10745532645 2155065408 2155598053
+32238000000 32239598069 10746000000 10746532689 2156065408 2156598097
+32241000000 32242598243 10747000000 10747532747 2157065408 2157598155
+32244000000 32245598362 10748000000 10748532787 2158065408 2158598195
+32247000000 32248598486 10749000000 10749532828 2159065408 2159598236
+32250000000 32251598705 10750000000 10750532901 2160065408 2160598309
+32253000000 32254598841 10751000000 10751532947 2161065408 2161598355
+32256000000 32257598992 10752000000 10752532997 2162065408 2162598405
+32259000000 32260599142 10753000000 10753533047 2163065408 2163598455
+32262000000 32263599257 10754000000 10754533085 2164065408 2164598493
+32265000000 32266599354 10755000000 10755533118 2165065408 2165598526
+32268000000 32269599562 10756000000 10756533187 2166065408 2166598595
+32271000000 32272599717 10757000000 10757533239 2167065408 2167598647
+32274000000 32275599876 10758000000 10758533292 2168065408 2168598700
+32277000000 32278600050 10759000000 10759533350 2169065408 2169598758
+32280000000 32281600150 10760000000 10760533383 2170065408 2170598791
+32283000000 32284600328 10761000000 10761533442 2171065408 2171598850
+32286000000 32287600477 10762000000 10762533492 2172065408 2172598900
+32289000000 32290600605 10763000000 10763533535 2173065408 2173598943
+32292000000 32293600774 10764000000 10764533591 2174065408 2174598999
+32295000000 32296600894 10765000000 10765533631 2175065408 2175599039
+32298000000 32298428244 10766000000 10766142748 2176065408 2176208156
+32301000000 32302601144 10767000000 10767533714 2177065408 2177599122
+32304000000 32305601402 10768000000 10768533800 2178065408 2178599208
+32307000000 32308601507 10769000000 10769533835 2179065408 2179599243
+32310000000 32311601587 10770000000 10770533862 2180065408 2180599270
+32313000000 32314601734 10771000000 10771533911 2181065408 2181599319
+32316000000 32317601988 10772000000 10772533996 2182065408 2182599404
+32319000000 32320602078 10773000000 10773534026 2183065408 2183599434
+32322000000 32323602323 10774000000 10774534107 2184065408 2184599515
+32325000000 32326602401 10775000000 10775534133 2185065408 2185599541
+32328000000 32329602578 10776000000 10776534192 2186065408 2186599600
+32331000000 32332602724 10777000000 10777534241 2187065408 2187599649
+32334000000 32335602868 10778000000 10778534289 2188065408 2188599697
+32337000000 32337225522 10779000000 10779075174 2189065408 2189140582
+32340000000 32341603183 10780000000 10780534394 2190065408 2190599802
+32343000000 32344603343 10781000000 10781534447 2191065408 2191599855
+32346000000 32347603480 10782000000 10782534493 2192065408 2192599901
+32349000000 32350603638 10783000000 10783534546 2193065408 2193599954
+32352000000 32353603796 10784000000 10784534598 2194065408 2194600006
+32355000000 32356603910 10785000000 10785534636 2195065408 2195600044
+32358000000 32359604071 10786000000 10786534690 2196065408 2196600098
+32361000000 32362604198 10787000000 10787534732 2197065408 2197600140
+32364000000 32365604307 10788000000 10788534769 2198065408 2198600177
+32367000000 32368604449 10789000000 10789534816 2199065408 2199600224
+32370000000 32371604683 10790000000 10790534894 2200065408 2200600302
+32373000000 32374604596 10791000000 10791534865 2201065408 2201600273
+32376000000 32377604717 10792000000 10792534905 2202065408 2202600313
+32379000000 32380604825 10793000000 10793534941 2203065408 2203600349
+32382000000 32383605060 10794000000 10794535020 2204065408 2204600428
+32385000000 32386605239 10795000000 10795535079 2205065408 2205600487
+32388000000 32389518879 10796000000 10796506293 2206065408 2206571701
+32391000000 32392605508 10797000000 10797535169 2207065408 2207600577
+32394000000 32395605681 10798000000 10798535227 2208065408 2208600635
+32397000000 32398605797 10799000000 10799535265 2209065408 2209600673
+32400000000 32401605970 10800000000 10800535323 2210065408 2210600731
+32403000000 32404606142 10801000000 10801535380 2211065408 2211600788
+32406000000 32407606198 10802000000 10802535399 2212065408 2212600807
+32409000000 32410606344 10803000000 10803535448 2213065408 2213600856
+32412000000 32413606540 10804000000 10804535513 2214065408 2214600921
+32415000000 32416606569 10805000000 10805535523 2215065408 2215600931
+32418000000 32419606875 10806000000 10806535625 2216065408 2216601033
+32421000000 32422607047 10807000000 10807535682 2217065408 2217601090
+32424000000 32425607180 10808000000 10808535726 2218065408 2218601134
+32427000000 32428607297 10809000000 10809535765 2219065408 2219601173
+32430000000 32431607482 10810000000 10810535827 2220065408 2220601235
+32433000000 32434607588 10811000000 10811535862 2221065408 2221601270
+32436000000 32437607769 10812000000 10812535923 2222065408 2222601331
+32439000000 32440607981 10813000000 10813535993 2223065408 2223601401
+32442000000 32443608088 10814000000 10814536029 2224065408 2224601437
+32445000000 32446608254 10815000000 10815536084 2225065408 2225601492
+32448000000 32449206999 10816000000 10816402333 2226065408 2226467741
+32451000000 32452608525 10817000000 10817536175 2227065408 2227601583
+32454000000 32455608637 10818000000 10818536212 2228065408 2228601620
+32457000000 32458608846 10819000000 10819536282 2229065408 2229601690
+32460000000 32461608925 10820000000 10820536308 2230065408 2230601716
+32463000000 32464609150 10821000000 10821536383 2231065408 2231601791
+32466000000 32467609277 10822000000 10822536425 2232065408 2232601833
+32469000000 32470609366 10823000000 10823536455 2233065408 2233601863
+32472000000 32473609472 10824000000 10824536490 2234065408 2234601898
+32475000000 32476609683 10825000000 10825536561 2235065408 2235601969
+32478000000 32479609892 10826000000 10826536630 2236065408 2236602038
+32481000000 32482610037 10827000000 10827536679 2237065408 2237602087
+32484000000 32485610163 10828000000 10828536721 2238065408 2238602129
+32487000000 32488610329 10829000000 10829536776 2239065408 2239602184
+32490000000 32491610409 10830000000 10830536803 2240065408 2240602211
+32493000000 32494610644 10831000000 10831536881 2241065408 2241602289
+32496000000 32497610803 10832000000 10832536934 2242065408 2242602342
+32499000000 32500610924 10833000000 10833536974 2243065408 2243602382
+32502000000 32503611084 10834000000 10834537028 2244065408 2244602436
+32505000000 32506611167 10835000000 10835537055 2245065408 2245602463
+32508000000 32509611413 10836000000 10836537137 2246065408 2246602545
+32511000000 32512611536 10837000000 10837537178 2247065408 2247602586
+32514000000 32515611672 10838000000 10838537224 2248065408 2248602632
+32517000000 32518611847 10839000000 10839537282 2249065408 2249602690
+32520000000 32521611969 10840000000 10840537323 2250065408 2250602731
+32523000000 32524612119 10841000000 10841537373 2251065408 2251602781
+32526000000 32527612267 10842000000 10842537422 2252065408 2252602830
+32529000000 32529785961 10843000000 10843261987 2253065408 2253327395
+32532000000 32533612587 10844000000 10844537529 2254065408 2254602937
+32535000000 32536612719 10845000000 10845537573 2255065408 2255602981
+32538000000 32539612893 10846000000 10846537631 2256065408 2256603039
+32541000000 32542613012 10847000000 10847537670 2257065408 2257603078
+32544000000 32545613136 10848000000 10848537712 2258065408 2258603120
+32547000000 32548613355 10849000000 10849537785 2259065408 2259603193
+32550000000 32551613491 10850000000 10850537830 2260065408 2260603238
+32553000000 32554613642 10851000000 10851537880 2261065408 2261603288
+32556000000 32557613792 10852000000 10852537930 2262065408 2262603338
+32559000000 32560613907 10853000000 10853537969 2263065408 2263603377
+32562000000 32563614004 10854000000 10854538001 2264065408 2264603409
+32565000000 32566614212 10855000000 10855538070 2265065408 2265603478
+32568000000 32569614367 10856000000 10856538122 2266065408 2266603530
+32571000000 32572614526 10857000000 10857538175 2267065408 2267603583
+32574000000 32575614700 10858000000 10858538233 2268065408 2268603641
+32577000000 32578614800 10859000000 10859538266 2269065408 2269603674
+32580000000 32581614978 10860000000 10860538326 2270065408 2270603734
+32583000000 32584615127 10861000000 10861538375 2271065408 2271603783
+32586000000 32587615255 10862000000 10862538418 2272065408 2272603826
+32589000000 32590615424 10863000000 10863538474 2273065408 2273603882
+32592000000 32593615544 10864000000 10864538514 2274065408 2274603922
+32595000000 32595442894 10865000000 10865147631 2275065408 2275213039
+32598000000 32599615794 10866000000 10866538598 2276065408 2276604006
+32601000000 32602616052 10867000000 10867538684 2277065408 2277604092
+32604000000 32605616157 10868000000 10868538719 2278065408 2278604127
+32607000000 32608616237 10869000000 10869538745 2279065408 2279604153
+32610000000 32611616384 10870000000 10870538794 2280065408 2280604202
+32613000000 32614616638 10871000000 10871538879 2281065408 2281604287
+32616000000 32617616728 10872000000 10872538909 2282065408 2282604317
+32619000000 32620616973 10873000000 10873538991 2283065408 2283604399
+32622000000 32623617051 10874000000 10874539017 2284065408 2284604425
+32625000000 32626617228 10875000000 10875539076 2285065408 2285604484
+32628000000 32629617374 10876000000 10876539124 2286065408 2286604532
+32631000000 32632617518 10877000000 10877539172 2287065408 2287604580
+32634000000 32634240172 10878000000 10878080057 2288065408 2288145465
+32637000000 32638617833 10879000000 10879539277 2289065408 2289604685
+32640000000 32641617993 10880000000 10880539331 2290065408 2290604739
+32643000000 32644618130 10881000000 10881539376 2291065408 2291604784
+32646000000 32647618288 10882000000 10882539429 2292065408 2292604837
+32649000000 32650618446 10883000000 10883539482 2293065408 2293604890
+32652000000 32653618560 10884000000 10884539520 2294065408 2294604928
+32655000000 32656618721 10885000000 10885539573 2295065408 2295604981
+32658000000 32659618848 10886000000 10886539616 2296065408 2296605024
+32661000000 32662618957 10887000000 10887539652 2297065408 2297605060
+32664000000 32665619099 10888000000 10888539699 2298065408 2298605107
+32667000000 32668619333 10889000000 10889539777 2299065408 2299605185
+32670000000 32671619246 10890000000 10890539748 2300065408 2300605156
+32673000000 32674619367 10891000000 10891539789 2301065408 2301605197
+32676000000 32677619475 10892000000 10892539825 2302065408 2302605233
+32679000000 32680619710 10893000000 10893539903 2303065408 2303605311
+32682000000 32683619889 10894000000 10894539963 2304065408 2304605371
+32685000000 32686533529 10895000000 10895511176 2305065408 2305576584
+32688000000 32689620158 10896000000 10896540052 2306065408 2306605460
+32691000000 32692620331 10897000000 10897540110 2307065408 2307605518
+32694000000 32695620447 10898000000 10898540149 2308065408 2308605557
+32697000000 32698620620 10899000000 10899540206 2309065408 2309605614
+32700000000 32701620792 10900000000 10900540264 2310065408 2310605672
+32703000000 32704620848 10901000000 10901540282 2311065408 2311605690
+32706000000 32707620994 10902000000 10902540331 2312065408 2312605739
+32709000000 32710621190 10903000000 10903540396 2313065408 2313605804
+32712000000 32713621219 10904000000 10904540406 2314065408 2314605814
+32715000000 32716621525 10905000000 10905540508 2315065408 2315605916
+32718000000 32719621697 10906000000 10906540565 2316065408 2316605973
+32721000000 32722621830 10907000000 10907540610 2317065408 2317606018
+32724000000 32725621947 10908000000 10908540649 2318065408 2318606057
+32727000000 32728622132 10909000000 10909540710 2319065408 2319606118
+32730000000 32731622238 10910000000 10910540746 2320065408 2320606154
+32733000000 32734622419 10911000000 10911540806 2321065408 2321606214
+32736000000 32737622631 10912000000 10912540877 2322065408 2322606285
+32739000000 32740622738 10913000000 10913540912 2323065408 2323606320
+32742000000 32743622904 10914000000 10914540968 2324065408 2324606376
+32745000000 32746221649 10915000000 10915407216 2325065408 2325472624
+32748000000 32749623175 10916000000 10916541058 2326065408 2326606466
+32751000000 32752623287 10917000000 10917541095 2327065408 2327606503
+32754000000 32755623496 10918000000 10918541165 2328065408 2328606573
+32757000000 32758623575 10919000000 10919541191 2329065408 2329606599
+32760000000 32761623800 10920000000 10920541266 2330065408 2330606674
+32763000000 32764623927 10921000000 10921541309 2331065408 2331606717
+32766000000 32767624016 10922000000 10922541338 2332065408 2332606746
+32769000000 32770624122 10923000000 10923541374 2333065408 2333606782
+32772000000 32773624333 10924000000 10924541444 2334065408 2334606852
+32775000000 32776624542 10925000000 10925541514 2335065408 2335606922
+32778000000 32779624687 10926000000 10926541562 2336065408 2336606970
+32781000000 32782624813 10927000000 10927541604 2337065408 2337607012
+32784000000 32785624979 10928000000 10928541659 2338065408 2338607067
+32787000000 32788625059 10929000000 10929541686 2339065408 2339607094
+32790000000 32791625294 10930000000 10930541764 2340065408 2340607172
+32793000000 32794625453 10931000000 10931541817 2341065408 2341607225
+32796000000 32797625574 10932000000 10932541858 2342065408 2342607266
+32799000000 32800625734 10933000000 10933541911 2343065408 2343607319
+32802000000 32803625817 10934000000 10934541939 2344065408 2344607347
+32805000000 32806626063 10935000000 10935542021 2345065408 2345607429
+32808000000 32809626186 10936000000 10936542062 2346065408 2346607470
+32811000000 32812626322 10937000000 10937542107 2347065408 2347607515
+32814000000 32815626497 10938000000 10938542165 2348065408 2348607573
+32817000000 32818626619 10939000000 10939542206 2349065408 2349607614
+32820000000 32821626769 10940000000 10940542256 2350065408 2350607664
+32823000000 32824626917 10941000000 10941542305 2351065408 2351607713
+32826000000 32826800611 10942000000 10942266870 2352065408 2352332278
+32829000000 32830627237 10943000000 10943542412 2353065408 2353607820
+32832000000 32833627369 10944000000 10944542456 2354065408 2354607864
+32835000000 32836627543 10945000000 10945542514 2355065408 2355607922
+32838000000 32839627662 10946000000 10946542554 2356065408 2356607962
+32841000000 32842627786 10947000000 10947542595 2357065408 2357608003
+32844000000 32845628005 10948000000 10948542668 2358065408 2358608076
+32847000000 32848628141 10949000000 10949542713 2359065408 2359608121
+32850000000 32851628292 10950000000 10950542764 2360065408 2360608172
+32853000000 32854628442 10951000000 10951542814 2361065408 2361608222
+32856000000 32857628557 10952000000 10952542852 2362065408 2362608260
+32859000000 32860628654 10953000000 10953542884 2363065408 2363608292
+32862000000 32863628862 10954000000 10954542954 2364065408 2364608362
+32865000000 32866629017 10955000000 10955543005 2365065408 2365608413
+32868000000 32869629176 10956000000 10956543058 2366065408 2366608466
+32871000000 32872629350 10957000000 10957543116 2367065408 2367608524
+32874000000 32875629450 10958000000 10958543150 2368065408 2368608558
+32877000000 32878629628 10959000000 10959543209 2369065408 2369608617
+32880000000 32881629777 10960000000 10960543259 2370065408 2370608667
+32883000000 32884629905 10961000000 10961543301 2371065408 2371608709
+32886000000 32887630074 10962000000 10962543358 2372065408 2372608766
+32889000000 32890630194 10963000000 10963543398 2373065408 2373608806
+32892000000 32892457544 10964000000 10964152514 2374065408 2374217922
+32895000000 32896630444 10965000000 10965543481 2375065408 2375608889
+32898000000 32899630702 10966000000 10966543567 2376065408 2376608975
+32901000000 32902630807 10967000000 10967543602 2377065408 2377609010
+32904000000 32905630887 10968000000 10968543629 2378065408 2378609037
+32907000000 32908631034 10969000000 10969543678 2379065408 2379609086
+32910000000 32911631288 10970000000 10970543762 2380065408 2380609170
+32913000000 32914631378 10971000000 10971543792 2381065408 2381609200
+32916000000 32917631623 10972000000 10972543874 2382065408 2382609282
+32919000000 32920631701 10973000000 10973543900 2383065408 2383609308
+32922000000 32923631878 10974000000 10974543959 2384065408 2384609367
+32925000000 32926632024 10975000000 10975544008 2385065408 2385609416
+32928000000 32929632168 10976000000 10976544056 2386065408 2386609464
+32931000000 32931254822 10977000000 10977084940 2387065408 2387150348
+32934000000 32935632483 10978000000 10978544161 2388065408 2388609569
+32937000000 32938632643 10979000000 10979544214 2389065408 2389609622
+32940000000 32941632780 10980000000 10980544260 2390065408 2390609668
+32943000000 32944632938 10981000000 10981544312 2391065408 2391609720
+32946000000 32947633096 10982000000 10982544365 2392065408 2392609773
+32949000000 32950633210 10983000000 10983544403 2393065408 2393609811
+32952000000 32953633371 10984000000 10984544457 2394065408 2394609865
+32955000000 32956633498 10985000000 10985544499 2395065408 2395609907
+32958000000 32959633607 10986000000 10986544535 2396065408 2396609943
+32961000000 32962633749 10987000000 10987544583 2397065408 2397609991
+32964000000 32965633983 10988000000 10988544661 2398065408 2398610069
+32967000000 32968633896 10989000000 10989544632 2399065408 2399610040
+32970000000 32971634017 10990000000 10990544672 2400065408 2400610080
+32973000000 32974634125 10991000000 10991544708 2401065408 2401610116
+32976000000 32977634360 10992000000 10992544786 2402065408 2402610194
+32979000000 32980634539 10993000000 10993544846 2403065408 2403610254
+32982000000 32983548179 10994000000 10994516059 2404065408 2404581467
+32985000000 32986634808 10995000000 10995544936 2405065408 2405610344
+32988000000 32989634981 10996000000 10996544993 2406065408 2406610401
+32991000000 32992635097 10997000000 10997545032 2407065408 2407610440
+32994000000 32995635270 10998000000 10998545090 2408065408 2408610498
+32997000000 32998635442 10999000000 10999545147 2409065408 2409610555
+33000000000 33001635498 11000000000 11000545166 2410065408 2410610574
+33003000000 33004635644 11001000000 11001545214 2411065408 2411610622
+33006000000 33007635840 11002000000 11002545280 2412065408 2412610688
+33009000000 33010635869 11003000000 11003545289 2413065408 2413610697
+33012000000 33013636175 11004000000 11004545391 2414065408 2414610799
+33015000000 33016636347 11005000000 11005545449 2415065408 2415610857
+33018000000 33019636480 11006000000 11006545493 2416065408 2416610901
+33021000000 33022636597 11007000000 11007545532 2417065408 2417610940
+33024000000 33025636782 11008000000 11008545594 2418065408 2418611002
+33027000000 33028636888 11009000000 11009545629 2419065408 2419611037
+33030000000 33031637069 11010000000 11010545689 2420065408 2420611097
+33033000000 33034637281 11011000000 11011545760 2421065408 2421611168
+33036000000 33037637388 11012000000 11012545796 2422065408 2422611204
+33039000000 33040637554 11013000000 11013545851 2423065408 2423611259
+33042000000 33043236299 11014000000 11014412099 2424065408 2424477507
+33045000000 33046637825 11015000000 11015545941 2425065408 2425611349
+33048000000 33049637937 11016000000 11016545979 2426065408 2426611387
+33051000000 33052638146 11017000000 11017546048 2427065408 2427611456
+33054000000 33055638225 11018000000 11018546075 2428065408 2428611483
+33057000000 33058638450 11019000000 11019546150 2429065408 2429611558
+33060000000 33061638577 11020000000 11020546192 2430065408 2430611600
+33063000000 33064638666 11021000000 11021546222 2431065408 2431611630
+33066000000 33067638772 11022000000 11022546257 2432065408 2432611665
+33069000000 33070638983 11023000000 11023546327 2433065408 2433611735
+33072000000 33073639192 11024000000 11024546397 2434065408 2434611805
+33075000000 33076639337 11025000000 11025546445 2435065408 2435611853
+33078000000 33079639463 11026000000 11026546487 2436065408 2436611895
+33081000000 33082639629 11027000000 11027546543 2437065408 2437611951
+33084000000 33085639709 11028000000 11028546569 2438065408 2438611977
+33087000000 33088639944 11029000000 11029546648 2439065408 2439612056
+33090000000 33091640103 11030000000 11030546701 2440065408 2440612109
+33093000000 33094640224 11031000000 11031546741 2441065408 2441612149
+33096000000 33097640384 11032000000 11032546794 2442065408 2442612202
+33099000000 33100640467 11033000000 11033546822 2443065408 2443612230
+33102000000 33103640713 11034000000 11034546904 2444065408 2444612312
+33105000000 33106640836 11035000000 11035546945 2445065408 2445612353
+33108000000 33109640972 11036000000 11036546990 2446065408 2446612398
+33111000000 33112641147 11037000000 11037547049 2447065408 2447612457
+33114000000 33115641269 11038000000 11038547089 2448065408 2448612497
+33117000000 33118641419 11039000000 11039547139 2449065408 2449612547
+33120000000 33121641567 11040000000 11040547189 2450065408 2450612597
+33123000000 33123815261 11041000000 11041271753 2451065408 2451337161
+33126000000 33127641887 11042000000 11042547295 2452065408 2452612703
+33129000000 33130642019 11043000000 11043547339 2453065408 2453612747
+33132000000 33133642193 11044000000 11044547397 2454065408 2454612805
+33135000000 33136642312 11045000000 11045547437 2455065408 2455612845
+33138000000 33139642436 11046000000 11046547478 2456065408 2456612886
+33141000000 33142642655 11047000000 11047547551 2457065408 2457612959
+33144000000 33145642791 11048000000 11048547597 2458065408 2458613005
+33147000000 33148642942 11049000000 11049547647 2459065408 2459613055
+33150000000 33151643092 11050000000 11050547697 2460065408 2460613105
+33153000000 33154643207 11051000000 11051547735 2461065408 2461613143
+33156000000 33157643304 11052000000 11052547768 2462065408 2462613176
+33159000000 33160643512 11053000000 11053547837 2463065408 2463613245
+33162000000 33163643667 11054000000 11054547889 2464065408 2464613297
+33165000000 33166643826 11055000000 11055547942 2465065408 2465613350
+33168000000 33169644000 11056000000 11056548000 2466065408 2466613408
+33171000000 33172644100 11057000000 11057548033 2467065408 2467613441
+33174000000 33175644278 11058000000 11058548092 2468065408 2468613500
+33177000000 33178644427 11059000000 11059548142 2469065408 2469613550
+33180000000 33181644555 11060000000 11060548185 2470065408 2470613593
+33183000000 33184644724 11061000000 11061548241 2471065408 2471613649
+33186000000 33187644844 11062000000 11062548281 2472065408 2472613689
+33189000000 33189472194 11063000000 11063157398 2473065408 2473222806
+33192000000 33193645094 11064000000 11064548364 2474065408 2474613772
+33195000000 33196645352 11065000000 11065548450 2475065408 2475613858
+33198000000 33199645457 11066000000 11066548485 2476065408 2476613893
+33201000000 33202645537 11067000000 11067548512 2477065408 2477613920
+33204000000 33205645684 11068000000 11068548561 2478065408 2478613969
+33207000000 33208645938 11069000000 11069548646 2479065408 2479614054
+33210000000 33211646028 11070000000 11070548676 2480065408 2480614084
+33213000000 33214646273 11071000000 11071548757 2481065408 2481614165
+33216000000 33217646351 11072000000 11072548783 2482065408 2482614191
+33219000000 33220646528 11073000000 11073548842 2483065408 2483614250
+33222000000 33223646674 11074000000 11074548891 2484065408 2484614299
+33225000000 33226646818 11075000000 11075548939 2485065408 2485614347
+33228000000 33228269472 11076000000 11076089824 2486065408 2486155232
+33231000000 33232647133 11077000000 11077549044 2487065408 2487614452
+33234000000 33235647293 11078000000 11078549097 2488065408 2488614505
+33237000000 33238647430 11079000000 11079549143 2489065408 2489614551
+33240000000 33241647588 11080000000 11080549196 2490065408 2490614604
+33243000000 33244647746 11081000000 11081549248 2491065408 2491614656
+33246000000 33247647860 11082000000 11082549286 2492065408 2492614694
+33249000000 33250648021 11083000000 11083549340 2493065408 2493614748
+33252000000 33253648148 11084000000 11084549382 2494065408 2494614790
+33255000000 33256648257 11085000000 11085549419 2495065408 2495614827
+33258000000 33259648399 11086000000 11086549466 2496065408 2496614874
+33261000000 33262648633 11087000000 11087549544 2497065408 2497614952
+33264000000 33265648546 11088000000 11088549515 2498065408 2498614923
+33267000000 33268648667 11089000000 11089549555 2499065408 2499614963
+33270000000 33271648775 11090000000 11090549591 2500065408 2500614999
+33273000000 33274649010 11091000000 11091549670 2501065408 2501615078
+33276000000 33277649189 11092000000 11092549729 2502065408 2502615137
+33279000000 33280562829 11093000000 11093520943 2503065408 2503586351
+33282000000 33283649458 11094000000 11094549819 2504065408 2504615227
+33285000000 33286649631 11095000000 11095549877 2505065408 2505615285
+33288000000 33289649747 11096000000 11096549915 2506065408 2506615323
+33291000000 33292649920 11097000000 11097549973 2507065408 2507615381
+33294000000 33295650092 11098000000 11098550030 2508065408 2508615438
+33297000000 33298650148 11099000000 11099550049 2509065408 2509615457
+33300000000 33301650294 11100000000 11100550098 2510065408 2510615506
+33303000000 33304650490 11101000000 11101550163 2511065408 2511615571
+33306000000 33307650519 11102000000 11102550173 2512065408 2512615581
+33309000000 33310650825 11103000000 11103550275 2513065408 2513615683
+33312000000 33313650997 11104000000 11104550332 2514065408 2514615740
+33315000000 33316651130 11105000000 11105550376 2515065408 2515615784
+33318000000 33319651247 11106000000 11106550415 2516065408 2516615823
+33321000000 33322651432 11107000000 11107550477 2517065408 2517615885
+33324000000 33325651538 11108000000 11108550512 2518065408 2518615920
+33327000000 33328651719 11109000000 11109550573 2519065408 2519615981
+33330000000 33331651931 11110000000 11110550643 2520065408 2520616051
+33333000000 33334652038 11111000000 11111550679 2521065408 2521616087
+33336000000 33337652204 11112000000 11112550734 2522065408 2522616142
+33339000000 33340250949 11113000000 11113416983 2523065408 2523482391
+33342000000 33343652475 11114000000 11114550825 2524065408 2524616233
+33345000000 33346652587 11115000000 11115550862 2525065408 2525616270
+33348000000 33349652796 11116000000 11116550932 2526065408 2526616340
+33351000000 33352652875 11117000000 11117550958 2527065408 2527616366
+33354000000 33355653100 11118000000 11118551033 2528065408 2528616441
+33357000000 33358653227 11119000000 11119551075 2529065408 2529616483
+33360000000 33361653316 11120000000 11120551105 2530065408 2530616513
+33363000000 33364653422 11121000000 11121551140 2531065408 2531616548
+33366000000 33367653633 11122000000 11122551211 2532065408 2532616619
+33369000000 33370653842 11123000000 11123551280 2533065408 2533616688
+33372000000 33373653987 11124000000 11124551329 2534065408 2534616737
+33375000000 33376654113 11125000000 11125551371 2535065408 2535616779
+33378000000 33379654279 11126000000 11126551426 2536065408 2536616834
+33381000000 33382654359 11127000000 11127551453 2537065408 2537616861
+33384000000 33385654594 11128000000 11128551531 2538065408 2538616939
+33387000000 33388654753 11129000000 11129551584 2539065408 2539616992
+33390000000 33391654874 11130000000 11130551624 2540065408 2540617032
+33393000000 33394655034 11131000000 11131551678 2541065408 2541617086
+33396000000 33397655117 11132000000 11132551705 2542065408 2542617113
+33399000000 33400655363 11133000000 11133551787 2543065408 2543617195
+33402000000 33403655486 11134000000 11134551828 2544065408 2544617236
+33405000000 33406655622 11135000000 11135551874 2545065408 2545617282
+33408000000 33409655797 11136000000 11136551932 2546065408 2546617340
+33411000000 33412655919 11137000000 11137551973 2547065408 2547617381
+33414000000 33415656069 11138000000 11138552023 2548065408 2548617431
+33417000000 33418656217 11139000000 11139552072 2549065408 2549617480
+33420000000 33420829911 11140000000 11140276637 2550065408 2550342045
+33423000000 33424656537 11141000000 11141552179 2551065408 2551617587
+33426000000 33427656669 11142000000 11142552223 2552065408 2552617631
+33429000000 33430656843 11143000000 11143552281 2553065408 2553617689
+33432000000 33433656962 11144000000 11144552320 2554065408 2554617728
+33435000000 33436657086 11145000000 11145552362 2555065408 2555617770
+33438000000 33439657305 11146000000 11146552435 2556065408 2556617843
+33441000000 33442657441 11147000000 11147552480 2557065408 2557617888
+33444000000 33445657592 11148000000 11148552530 2558065408 2558617938
+33447000000 33448657742 11149000000 11149552580 2559065408 2559617988
+33450000000 33451657857 11150000000 11150552619 2560065408 2560618027
+33453000000 33454657954 11151000000 11151552651 2561065408 2561618059
+33456000000 33457658162 11152000000 11152552720 2562065408 2562618128
+33459000000 33460658317 11153000000 11153552772 2563065408 2563618180
+33462000000 33463658476 11154000000 11154552825 2564065408 2564618233
+33465000000 33466658650 11155000000 11155552883 2565065408 2565618291
+33468000000 33469658750 11156000000 11156552916 2566065408 2566618324
+33471000000 33472658928 11157000000 11157552976 2567065408 2567618384
+33474000000 33475659077 11158000000 11158553025 2568065408 2568618433
+33477000000 33478659205 11159000000 11159553068 2569065408 2569618476
+33480000000 33481659374 11160000000 11160553124 2570065408 2570618532
+33483000000 33484659494 11161000000 11161553164 2571065408 2571618572
+33486000000 33486486844 11162000000 11162162281 2572065408 2572227689
+33489000000 33490659744 11163000000 11163553248 2573065408 2573618656
+33492000000 33493660002 11164000000 11164553334 2574065408 2574618742
+33495000000 33496660107 11165000000 11165553369 2575065408 2575618777
+33498000000 33499660187 11166000000 11166553395 2576065408 2576618803
+33501000000 33502660334 11167000000 11167553444 2577065408 2577618852
+33504000000 33505660588 11168000000 11168553529 2578065408 2578618937
+33507000000 33508660678 11169000000 11169553559 2579065408 2579618967
+33510000000 33511660923 11170000000 11170553641 2580065408 2580619049
+33513000000 33514661001 11171000000 11171553667 2581065408 2581619075
+33516000000 33517661178 11172000000 11172553726 2582065408 2582619134
+33519000000 33520661324 11173000000 11173553774 2583065408 2583619182
+33522000000 33523661468 11174000000 11174553822 2584065408 2584619230
+33525000000 33525284122 11175000000 11175094707 2585065408 2585160115
+33528000000 33529661783 11176000000 11176553927 2586065408 2586619335
+33531000000 33532661943 11177000000 11177553981 2587065408 2587619389
+33534000000 33535662080 11178000000 11178554026 2588065408 2588619434
+33537000000 33538662238 11179000000 11179554079 2589065408 2589619487
+33540000000 33541662396 11180000000 11180554132 2590065408 2590619540
+33543000000 33544662510 11181000000 11181554170 2591065408 2591619578
+33546000000 33547662671 11182000000 11182554223 2592065408 2592619631
+33549000000 33550662798 11183000000 11183554266 2593065408 2593619674
+33552000000 33553662907 11184000000 11184554302 2594065408 2594619710
+33555000000 33556663049 11185000000 11185554349 2595065408 2595619757
+33558000000 33559663283 11186000000 11186554427 2596065408 2596619835
+33561000000 33562663196 11187000000 11187554398 2597065408 2597619806
+33564000000 33565663317 11188000000 11188554439 2598065408 2598619847
+33567000000 33568663425 11189000000 11189554475 2599065408 2599619883
+33570000000 33571663660 11190000000 11190554553 2600065408 2600619961
+33573000000 33574663839 11191000000 11191554613 2601065408 2601620021
+33576000000 33577577479 11192000000 11192525826 2602065408 2602591234
+33579000000 33580664108 11193000000 11193554702 2603065408 2603620110
+33582000000 33583664281 11194000000 11194554760 2604065408 2604620168
+33585000000 33586664397 11195000000 11195554799 2605065408 2605620207
+33588000000 33589664570 11196000000 11196554856 2606065408 2606620264
+33591000000 33592664742 11197000000 11197554914 2607065408 2607620322
+33594000000 33595664798 11198000000 11198554932 2608065408 2608620340
+33597000000 33598664944 11199000000 11199554981 2609065408 2609620389
+33600000000 33601665140 11200000000 11200555046 2610065408 2610620454
+33603000000 33604665169 11201000000 11201555056 2611065408 2611620464
+33606000000 33607665475 11202000000 11202555158 2612065408 2612620566
+33609000000 33610665647 11203000000 11203555215 2613065408 2613620623
+33612000000 33613665780 11204000000 11204555260 2614065408 2614620668
+33615000000 33616665897 11205000000 11205555299 2615065408 2615620707
+33618000000 33619666082 11206000000 11206555360 2616065408 2616620768
+33621000000 33622666188 11207000000 11207555396 2617065408 2617620804
+33624000000 33625666369 11208000000 11208555456 2618065408 2618620864
+33627000000 33628666581 11209000000 11209555527 2619065408 2619620935
+33630000000 33631666688 11210000000 11210555562 2620065408 2620620970
+33633000000 33634666854 11211000000 11211555618 2621065408 2621621026
+33636000000 33637265599 11212000000 11212421866 2622065408 2622487274
+33639000000 33640667125 11213000000 11213555708 2623065408 2623621116
+33642000000 33643667237 11214000000 11214555745 2624065408 2624621153
+33645000000 33646667446 11215000000 11215555815 2625065408 2625621223
+33648000000 33649667525 11216000000 11216555841 2626065408 2626621249
+33651000000 33652667750 11217000000 11217555916 2627065408 2627621324
+33654000000 33655667877 11218000000 11218555959 2628065408 2628621367
+33657000000 33658667966 11219000000 11219555988 2629065408 2629621396
+33660000000 33661668072 11220000000 11220556024 2630065408 2630621432
+33663000000 33664668283 11221000000 11221556094 2631065408 2631621502
+33666000000 33667668492 11222000000 11222556164 2632065408 2632621572
+33669000000 33670668637 11223000000 11223556212 2633065408 2633621620
+33672000000 33673668763 11224000000 11224556254 2634065408 2634621662
+33675000000 33676668929 11225000000 11225556309 2635065408 2635621717
+33678000000 33679669009 11226000000 11226556336 2636065408 2636621744
+33681000000 33682669244 11227000000 11227556414 2637065408 2637621822
+33684000000 33685669403 11228000000 11228556467 2638065408 2638621875
+33687000000 33688669524 11229000000 11229556508 2639065408 2639621916
+33690000000 33691669684 11230000000 11230556561 2640065408 2640621969
+33693000000 33694669767 11231000000 11231556589 2641065408 2641621997
+33696000000 33697670013 11232000000 11232556671 2642065408 2642622079
+33699000000 33700670136 11233000000 11233556712 2643065408 2643622120
+33702000000 33703670272 11234000000 11234556757 2644065408 2644622165
+33705000000 33706670447 11235000000 11235556815 2645065408 2645622223
+33708000000 33709670569 11236000000 11236556856 2646065408 2646622264
+33711000000 33712670719 11237000000 11237556906 2647065408 2647622314
+33714000000 33715670867 11238000000 11238556955 2648065408 2648622363
+33717000000 33717844561 11239000000 11239281520 2649065408 2649346928
+33720000000 33721671187 11240000000 11240557062 2650065408 2650622470
+33723000000 33724671319 11241000000 11241557106 2651065408 2651622514
+33726000000 33727671493 11242000000 11242557164 2652065408 2652622572
+33729000000 33730671612 11243000000 11243557204 2653065408 2653622612
+33732000000 33733671736 11244000000 11244557245 2654065408 2654622653
+33735000000 33736671955 11245000000 11245557318 2655065408 2655622726
+33738000000 33739672091 11246000000 11246557363 2656065408 2656622771
+33741000000 33742672242 11247000000 11247557414 2657065408 2657622822
+33744000000 33745672392 11248000000 11248557464 2658065408 2658622872
+33747000000 33748672507 11249000000 11249557502 2659065408 2659622910
+33750000000 33751672604 11250000000 11250557534 2660065408 2660622942
+33753000000 33754672812 11251000000 11251557604 2661065408 2661623012
+33756000000 33757672967 11252000000 11252557655 2662065408 2662623063
+33759000000 33760673126 11253000000 11253557708 2663065408 2663623116
+33762000000 33763673300 11254000000 11254557766 2664065408 2664623174
+33765000000 33766673400 11255000000 11255557800 2665065408 2665623208
+33768000000 33769673578 11256000000 11256557859 2666065408 2666623267
+33771000000 33772673727 11257000000 11257557909 2667065408 2667623317
+33774000000 33775673855 11258000000 11258557951 2668065408 2668623359
+33777000000 33778674024 11259000000 11259558008 2669065408 2669623416
+33780000000 33781674144 11260000000 11260558048 2670065408 2670623456
+33783000000 33783501494 11261000000 11261167164 2671065408 2671232572
+33786000000 33787674394 11262000000 11262558131 2672065408 2672623539
+33789000000 33790674652 11263000000 11263558217 2673065408 2673623625
+33792000000 33793674757 11264000000 11264558252 2674065408 2674623660
+33795000000 33796674837 11265000000 11265558279 2675065408 2675623687
+33798000000 33799674984 11266000000 11266558328 2676065408 2676623736
+33801000000 33802675238 11267000000 11267558412 2677065408 2677623820
+33804000000 33805675328 11268000000 11268558442 2678065408 2678623850
+33807000000 33808675573 11269000000 11269558524 2679065408 2679623932
+33810000000 33811675651 11270000000 11270558550 2680065408 2680623958
+33813000000 33814675828 11271000000 11271558609 2681065408 2681624017
+33816000000 33817675974 11272000000 11272558658 2682065408 2682624066
+33819000000 33820676118 11273000000 11273558706 2683065408 2683624114
+33822000000 33822298772 11274000000 11274099590 2684065408 2684164998
+33825000000 33826676433 11275000000 11275558811 2685065408 2685624219
+33828000000 33829676593 11276000000 11276558864 2686065408 2686624272
+33831000000 33832676730 11277000000 11277558910 2687065408 2687624318
+33834000000 33835676888 11278000000 11278558962 2688065408 2688624370
+33837000000 33838677046 11279000000 11279559015 2689065408 2689624423
+33840000000 33841677160 11280000000 11280559053 2690065408 2690624461
+33843000000 33844677321 11281000000 11281559107 2691065408 2691624515
+33846000000 33847677448 11282000000 11282559149 2692065408 2692624557
+33849000000 33850677557 11283000000 11283559185 2693065408 2693624593
+33852000000 33853677699 11284000000 11284559233 2694065408 2694624641
+33855000000 33856677933 11285000000 11285559311 2695065408 2695624719
+33858000000 33859677846 11286000000 11286559282 2696065408 2696624690
+33861000000 33862677967 11287000000 11287559322 2697065408 2697624730
+33864000000 33865678075 11288000000 11288559358 2698065408 2698624766
+33867000000 33868678310 11289000000 11289559436 2699065408 2699624844
+33870000000 33871678489 11290000000 11290559496 2700065408 2700624904
+33873000000 33874592129 11291000000 11291530709 2701065408 2701596117
+33876000000 33877678758 11292000000 11292559586 2702065408 2702624994
+33879000000 33880678931 11293000000 11293559643 2703065408 2703625051
+33882000000 33883679047 11294000000 11294559682 2704065408 2704625090
+33885000000 33886679220 11295000000 11295559740 2705065408 2705625148
+33888000000 33889679392 11296000000 11296559797 2706065408 2706625205
+33891000000 33892679448 11297000000 11297559816 2707065408 2707625224
+33894000000 33895679594 11298000000 11298559864 2708065408 2708625272
+33897000000 33898679790 11299000000 11299559930 2709065408 2709625338
+33900000000 33901679819 11300000000 11300559939 2710065408 2710625347
+33903000000 33904680125 11301000000 11301560041 2711065408 2711625449
+33906000000 33907680297 11302000000 11302560099 2712065408 2712625507
+33909000000 33910680430 11303000000 11303560143 2713065408 2713625551
+33912000000 33913680547 11304000000 11304560182 2714065408 2714625590
+33915000000 33916680732 11305000000 11305560244 2715065408 2715625652
+33918000000 33919680838 11306000000 11306560279 2716065408 2716625687
+33921000000 33922681019 11307000000 11307560339 2717065408 2717625747
+33924000000 33925681231 11308000000 11308560410 2718065408 2718625818
+33927000000 33928681338 11309000000 11309560446 2719065408 2719625854
+33930000000 33931681504 11310000000 11310560501 2720065408 2720625909
+33933000000 33934280249 11311000000 11311426749 2721065408 2721492157
+33936000000 33937681775 11312000000 11312560591 2722065408 2722625999
+33939000000 33940681887 11313000000 11313560629 2723065408 2723626037
+33942000000 33943682096 11314000000 11314560698 2724065408 2724626106
+33945000000 33946682175 11315000000 11315560725 2725065408 2725626133
+33948000000 33949682400 11316000000 11316560800 2726065408 2726626208
+33951000000 33952682527 11317000000 11317560842 2727065408 2727626250
+33954000000 33955682616 11318000000 11318560872 2728065408 2728626280
+33957000000 33958682722 11319000000 11319560907 2729065408 2729626315
+33960000000 33961682933 11320000000 11320560977 2730065408 2730626385
+33963000000 33964683142 11321000000 11321561047 2731065408 2731626455
+33966000000 33967683287 11322000000 11322561095 2732065408 2732626503
+33969000000 33970683413 11323000000 11323561137 2733065408 2733626545
+33972000000 33973683579 11324000000 11324561193 2734065408 2734626601
+33975000000 33976683659 11325000000 11325561219 2735065408 2735626627
+33978000000 33979683894 11326000000 11326561298 2736065408 2736626706
+33981000000 33982684053 11327000000 11327561351 2737065408 2737626759
+33984000000 33985684174 11328000000 11328561391 2738065408 2738626799
+33987000000 33988684334 11329000000 11329561444 2739065408 2739626852
+33990000000 33991684417 11330000000 11330561472 2740065408 2740626880
+33993000000 33994684663 11331000000 11331561554 2741065408 2741626962
+33996000000 33997684786 11332000000 11332561595 2742065408 2742627003
+33999000000 34000684922 11333000000 11333561640 2743065408 2743627048
+34002000000 34003685097 11334000000 11334561699 2744065408 2744627107
+34005000000 34006685219 11335000000 11335561739 2745065408 2745627147
+34008000000 34009685369 11336000000 11336561789 2746065408 2746627197
+34011000000 34012685517 11337000000 11337561839 2747065408 2747627247
+34014000000 34014859211 11338000000 11338286403 2748065408 2748351811
+34017000000 34018685837 11339000000 11339561945 2749065408 2749627353
+34020000000 34021685969 11340000000 11340561989 2750065408 2750627397
+34023000000 34024686143 11341000000 11341562047 2751065408 2751627455
+34026000000 34027686262 11342000000 11342562087 2752065408 2752627495
+34029000000 34030686386 11343000000 11343562128 2753065408 2753627536
+34032000000 34033686605 11344000000 11344562201 2754065408 2754627609
+34035000000 34036686741 11345000000 11345562247 2755065408 2755627655
+34038000000 34039686892 11346000000 11346562297 2756065408 2756627705
+34041000000 34042687042 11347000000 11347562347 2757065408 2757627755
+34044000000 34045687157 11348000000 11348562385 2758065408 2758627793
+34047000000 34048687254 11349000000 11349562418 2759065408 2759627826
+34050000000 34051687462 11350000000 11350562487 2760065408 2760627895
+34053000000 34054687617 11351000000 11351562539 2761065408 2761627947
+34056000000 34057687776 11352000000 11352562592 2762065408 2762628000
+34059000000 34060687950 11353000000 11353562650 2763065408 2763628058
+34062000000 34063688050 11354000000 11354562683 2764065408 2764628091
+34065000000 34066688228 11355000000 11355562742 2765065408 2765628150
+34068000000 34069688377 11356000000 11356562792 2766065408 2766628200
+34071000000 34072688505 11357000000 11357562835 2767065408 2767628243
+34074000000 34075688674 11358000000 11358562891 2768065408 2768628299
+34077000000 34078688794 11359000000 11359562931 2769065408 2769628339
+34080000000 34080516144 11360000000 11360172048 2770065408 2770237456
+34083000000 34084689044 11361000000 11361563014 2771065408 2771628422
+34086000000 34087689302 11362000000 11362563100 2772065408 2772628508
+34089000000 34090689407 11363000000 11363563135 2773065408 2773628543
+34092000000 34093689487 11364000000 11364563162 2774065408 2774628570
+34095000000 34096689634 11365000000 11365563211 2775065408 2775628619
+34098000000 34099689888 11366000000 11366563296 2776065408 2776628704
+34101000000 34102689978 11367000000 11367563326 2777065408 2777628734
+34104000000 34105690223 11368000000 11368563407 2778065408 2778628815
+34107000000 34108690301 11369000000 11369563433 2779065408 2779628841
+34110000000 34111690478 11370000000 11370563492 2780065408 2780628900
+34113000000 34114690624 11371000000 11371563541 2781065408 2781628949
+34116000000 34117690768 11372000000 11372563589 2782065408 2782628997
+34119000000 34119313422 11373000000 11373104474 2783065408 2783169882
+34122000000 34123691083 11374000000 11374563694 2784065408 2784629102
+34125000000 34126691243 11375000000 11375563747 2785065408 2785629155
+34128000000 34129691380 11376000000 11376563793 2786065408 2786629201
+34131000000 34132691538 11377000000 11377563846 2787065408 2787629254
+34134000000 34135691696 11378000000 11378563898 2788065408 2788629306
+34137000000 34138691810 11379000000 11379563936 2789065408 2789629344
+34140000000 34141691971 11380000000 11380563990 2790065408 2790629398
+34143000000 34144692098 11381000000 11381564032 2791065408 2791629440
+34146000000 34147692207 11382000000 11382564069 2792065408 2792629477
+34149000000 34150692349 11383000000 11383564116 2793065408 2793629524
+34152000000 34153692583 11384000000 11384564194 2794065408 2794629602
+34155000000 34156692496 11385000000 11385564165 2795065408 2795629573
+34158000000 34159692617 11386000000 11386564205 2796065408 2796629613
+34161000000 34162692725 11387000000 11387564241 2797065408 2797629649
+34164000000 34165692960 11388000000 11388564320 2798065408 2798629728
+34167000000 34168693139 11389000000 11389564379 2799065408 2799629787
+34170000000 34171606779 11390000000 11390535593 2800065408 2800601001
+34173000000 34174693408 11391000000 11391564469 2801065408 2801629877
+34176000000 34177693581 11392000000 11392564527 2802065408 2802629935
+34179000000 34180693697 11393000000 11393564565 2803065408 2803629973
+34182000000 34183693870 11394000000 11394564623 2804065408 2804630031
+34185000000 34186694042 11395000000 11395564680 2805065408 2805630088
+34188000000 34189694098 11396000000 11396564699 2806065408 2806630107
+34191000000 34192694244 11397000000 11397564748 2807065408 2807630156
+34194000000 34195694440 11398000000 11398564813 2808065408 2808630221
+34197000000 34198694469 11399000000 11399564823 2809065408 2809630231
+34200000000 34201694775 11400000000 11400564925 2810065408 2810630333
+34203000000 34204694947 11401000000 11401564982 2811065408 2811630390
+34206000000 34207695080 11402000000 11402565026 2812065408 2812630434
+34209000000 34210695197 11403000000 11403565065 2813065408 2813630473
+34212000000 34213695382 11404000000 11404565127 2814065408 2814630535
+34215000000 34216695488 11405000000 11405565162 2815065408 2815630570
+34218000000 34219695669 11406000000 11406565223 2816065408 2816630631
+34221000000 34222695881 11407000000 11407565293 2817065408 2817630701
+34224000000 34225695988 11408000000 11408565329 2818065408 2818630737
+34227000000 34228696154 11409000000 11409565384 2819065408 2819630792
+34230000000 34231294899 11410000000 11410431633 2820065408 2820497041
+34233000000 34234696425 11411000000 11411565475 2821065408 2821630883
+34236000000 34237696537 11412000000 11412565512 2822065408 2822630920
+34239000000 34240696746 11413000000 11413565582 2823065408 2823630990
+34242000000 34243696825 11414000000 11414565608 2824065408 2824631016
+34245000000 34246697050 11415000000 11415565683 2825065408 2825631091
+34248000000 34249697177 11416000000 11416565725 2826065408 2826631133
+34251000000 34252697266 11417000000 11417565755 2827065408 2827631163
+34254000000 34255697372 11418000000 11418565790 2828065408 2828631198
+34257000000 34258697583 11419000000 11419565861 2829065408 2829631269
+34260000000 34261697792 11420000000 11420565930 2830065408 2830631338
+34263000000 34264697937 11421000000 11421565979 2831065408 2831631387
+34266000000 34267698063 11422000000 11422566021 2832065408 2832631429
+34269000000 34270698229 11423000000 11423566076 2833065408 2833631484
+34272000000 34273698309 11424000000 11424566103 2834065408 2834631511
+34275000000 34276698544 11425000000 11425566181 2835065408 2835631589
+34278000000 34279698703 11426000000 11426566234 2836065408 2836631642
+34281000000 34282698824 11427000000 11427566274 2837065408 2837631682
+34284000000 34285698984 11428000000 11428566328 2838065408 2838631736
+34287000000 34288699067 11429000000 11429566355 2839065408 2839631763
+34290000000 34291699313 11430000000 11430566437 2840065408 2840631845
+34293000000 34294699436 11431000000 11431566478 2841065408 2841631886
+34296000000 34297699572 11432000000 11432566524 2842065408 2842631932
+34299000000 34300699747 11433000000 11433566582 2843065408 2843631990
+34302000000 34303699869 11434000000 11434566623 2844065408 2844632031
+34305000000 34306700019 11435000000 11435566673 2845065408 2845632081
+34308000000 34309700167 11436000000 11436566722 2846065408 2846632130
+34311000000 34311873861 11437000000 11437291287 2847065408 2847356695
+34314000000 34315700487 11438000000 11438566829 2848065408 2848632237
+34317000000 34318700619 11439000000 11439566873 2849065408 2849632281
+34320000000 34321700793 11440000000 11440566931 2850065408 2850632339
+34323000000 34324700912 11441000000 11441566970 2851065408 2851632378
+34326000000 34327701036 11442000000 11442567012 2852065408 2852632420
+34329000000 34330701255 11443000000 11443567085 2853065408 2853632493
+34332000000 34333701391 11444000000 11444567130 2854065408 2854632538
+34335000000 34336701542 11445000000 11445567180 2855065408 2855632588
+34338000000 34339701692 11446000000 11446567230 2856065408 2856632638
+34341000000 34342701807 11447000000 11447567269 2857065408 2857632677
+34344000000 34345701904 11448000000 11448567301 2858065408 2858632709
+34347000000 34348702112 11449000000 11449567370 2859065408 2859632778
+34350000000 34351702267 11450000000 11450567422 2860065408 2860632830
+34353000000 34354702426 11451000000 11451567475 2861065408 2861632883
+34356000000 34357702600 11452000000 11452567533 2862065408 2862632941
+34359000000 34360702700 11453000000 11453567566 2863065408 2863632974
+34362000000 34363702878 11454000000 11454567626 2864065408 2864633034
+34365000000 34366703027 11455000000 11455567675 2865065408 2865633083
+34368000000 34369703155 11456000000 11456567718 2866065408 2866633126
+34371000000 34372703324 11457000000 11457567774 2867065408 2867633182
+34374000000 34375703444 11458000000 11458567814 2868065408 2868633222
+34377000000 34377530794 11459000000 11459176931 2869065408 2869242339
+34380000000 34381703694 11460000000 11460567898 2870065408 2870633306
+34383000000 34384703952 11461000000 11461567984 2871065408 2871633392
+34386000000 34387704057 11462000000 11462568019 2872065408 2872633427
+34389000000 34390704137 11463000000 11463568045 2873065408 2873633453
+34392000000 34393704284 11464000000 11464568094 2874065408 2874633502
+34395000000 34396704538 11465000000 11465568179 2875065408 2875633587
+34398000000 34399704628 11466000000 11466568209 2876065408 2876633617
+34401000000 34402704873 11467000000 11467568291 2877065408 2877633699
+34404000000 34405704951 11468000000 11468568317 2878065408 2878633725
+34407000000 34408705128 11469000000 11469568376 2879065408 2879633784
+34410000000 34411705274 11470000000 11470568424 2880065408 2880633832
+34413000000 34414705418 11471000000 11471568472 2881065408 2881633880
+34416000000 34416328072 11472000000 11472109357 2882065408 2882174765
+34419000000 34420705733 11473000000 11473568577 2883065408 2883633985
+34422000000 34423705893 11474000000 11474568631 2884065408 2884634039
+34425000000 34426706030 11475000000 11475568676 2885065408 2885634084
+34428000000 34429706188 11476000000 11476568729 2886065408 2886634137
+34431000000 34432706346 11477000000 11477568782 2887065408 2887634190
+34434000000 34435706460 11478000000 11478568820 2888065408 2888634228
+34437000000 34438706621 11479000000 11479568873 2889065408 2889634281
+34440000000 34441706748 11480000000 11480568916 2890065408 2890634324
+34443000000 34444706857 11481000000 11481568952 2891065408 2891634360
+34446000000 34447706999 11482000000 11482568999 2892065408 2892634407
+34449000000 34450707233 11483000000 11483569077 2893065408 2893634485
+34452000000 34453707146 11484000000 11484569048 2894065408 2894634456
+34455000000 34456707267 11485000000 11485569089 2895065408 2895634497
+34458000000 34459707375 11486000000 11486569125 2896065408 2896634533
+34461000000 34462707610 11487000000 11487569203 2897065408 2897634611
+34464000000 34465707789 11488000000 11488569263 2898065408 2898634671
+34467000000 34468621429 11489000000 11489540476 2899065408 2899605884
+34470000000 34471708058 11490000000 11490569352 2900065408 2900634760
+34473000000 34474708231 11491000000 11491569410 2901065408 2901634818
+34476000000 34477708347 11492000000 11492569449 2902065408 2902634857
+34479000000 34480708520 11493000000 11493569506 2903065408 2903634914
+34482000000 34483708692 11494000000 11494569564 2904065408 2904634972
+34485000000 34486708748 11495000000 11495569582 2905065408 2905634990
+34488000000 34489708894 11496000000 11496569631 2906065408 2906635039
+34491000000 34492709090 11497000000 11497569696 2907065408 2907635104
+34494000000 34495709119 11498000000 11498569706 2908065408 2908635114
+34497000000 34498709425 11499000000 11499569808 2909065408 2909635216
+34500000000 34501709597 11500000000 11500569865 2910065408 2910635273
+34503000000 34504709730 11501000000 11501569910 2911065408 2911635318
+34506000000 34507709847 11502000000 11502569949 2912065408 2912635357
+34509000000 34510710032 11503000000 11503570010 2913065408 2913635418
+34512000000 34513710138 11504000000 11504570046 2914065408 2914635454
+34515000000 34516710319 11505000000 11505570106 2915065408 2915635514
+34518000000 34519710531 11506000000 11506570177 2916065408 2916635585
+34521000000 34522710638 11507000000 11507570212 2917065408 2917635620
+34524000000 34525710804 11508000000 11508570268 2918065408 2918635676
+34527000000 34528309549 11509000000 11509436516 2919065408 2919501924
+34530000000 34531711075 11510000000 11510570358 2920065408 2920635766
+34533000000 34534711187 11511000000 11511570395 2921065408 2921635803
+34536000000 34537711396 11512000000 11512570465 2922065408 2922635873
+34539000000 34540711475 11513000000 11513570491 2923065408 2923635899
+34542000000 34543711700 11514000000 11514570566 2924065408 2924635974
+34545000000 34546711827 11515000000 11515570609 2925065408 2925636017
+34548000000 34549711916 11516000000 11516570638 2926065408 2926636046
+34551000000 34552712022 11517000000 11517570674 2927065408 2927636082
+34554000000 34555712233 11518000000 11518570744 2928065408 2928636152
+34557000000 34558712442 11519000000 11519570814 2929065408 2929636222
+34560000000 34561712587 11520000000 11520570862 2930065408 2930636270
+34563000000 34564712713 11521000000 11521570904 2931065408 2931636312
+34566000000 34567712879 11522000000 11522570959 2932065408 2932636367
+34569000000 34570712959 11523000000 11523570986 2933065408 2933636394
+34572000000 34573713194 11524000000 11524571064 2934065408 2934636472
+34575000000 34576713353 11525000000 11525571117 2935065408 2935636525
+34578000000 34579713474 11526000000 11526571158 2936065408 2936636566
+34581000000 34582713634 11527000000 11527571211 2937065408 2937636619
+34584000000 34585713717 11528000000 11528571239 2938065408 2938636647
+34587000000 34588713963 11529000000 11529571321 2939065408 2939636729
+34590000000 34591714086 11530000000 11530571362 2940065408 2940636770
+34593000000 34594714222 11531000000 11531571407 2941065408 2941636815
+34596000000 34597714397 11532000000 11532571465 2942065408 2942636873
+34599000000 34600714519 11533000000 11533571506 2943065408 2943636914
+34602000000 34603714669 11534000000 11534571556 2944065408 2944636964
+34605000000 34606714817 11535000000 11535571605 2945065408 2945637013
+34608000000 34608888511 11536000000 11536296170 2946065408 2946361578
+34611000000 34612715137 11537000000 11537571712 2947065408 2947637120
+34614000000 34615715269 11538000000 11538571756 2948065408 2948637164
+34617000000 34618715443 11539000000 11539571814 2949065408 2949637222
+34620000000 34621715562 11540000000 11540571854 2950065408 2950637262
+34623000000 34624715686 11541000000 11541571895 2951065408 2951637303
+34626000000 34627715905 11542000000 11542571968 2952065408 2952637376
+34629000000 34630716041 11543000000 11543572013 2953065408 2953637421
+34632000000 34633716192 11544000000 11544572064 2954065408 2954637472
+34635000000 34636716342 11545000000 11545572114 2955065408 2955637522
+34638000000 34639716457 11546000000 11546572152 2956065408 2956637560
+34641000000 34642716554 11547000000 11547572184 2957065408 2957637592
+34644000000 34645716762 11548000000 11548572254 2958065408 2958637662
+34647000000 34648716917 11549000000 11549572305 2959065408 2959637713
+34650000000 34651717076 11550000000 11550572358 2960065408 2960637766
+34653000000 34654717250 11551000000 11551572416 2961065408 2961637824
+34656000000 34657717350 11552000000 11552572450 2962065408 2962637858
+34659000000 34660717528 11553000000 11553572509 2963065408 2963637917
+34662000000 34663717677 11554000000 11554572559 2964065408 2964637967
+34665000000 34666717805 11555000000 11555572601 2965065408 2965638009
+34668000000 34669717974 11556000000 11556572658 2966065408 2966638066
+34671000000 34672718094 11557000000 11557572698 2967065408 2967638106
+34674000000 34674545444 11558000000 11558181814 2968065408 2968247222
+34677000000 34678718344 11559000000 11559572781 2969065408 2969638189
+34680000000 34681718602 11560000000 11560572867 2970065408 2970638275
+34683000000 34684718707 11561000000 11561572902 2971065408 2971638310
+34686000000 34687718787 11562000000 11562572929 2972065408 2972638337
+34689000000 34690718934 11563000000 11563572978 2973065408 2973638386
+34692000000 34693719188 11564000000 11564573062 2974065408 2974638470
+34695000000 34696719278 11565000000 11565573092 2975065408 2975638500
+34698000000 34699719523 11566000000 11566573174 2976065408 2976638582
+34701000000 34702719601 11567000000 11567573200 2977065408 2977638608
+34704000000 34705719778 11568000000 11568573259 2978065408 2978638667
+34707000000 34708719924 11569000000 11569573308 2979065408 2979638716
+34710000000 34711720068 11570000000 11570573356 2980065408 2980638764
+34713000000 34713342722 11571000000 11571114240 2981065408 2981179648
+34716000000 34717720383 11572000000 11572573461 2982065408 2982638869
+34719000000 34720720543 11573000000 11573573514 2983065408 2983638922
+34722000000 34723720680 11574000000 11574573560 2984065408 2984638968
+34725000000 34726720838 11575000000 11575573612 2985065408 2985639020
+34728000000 34729720996 11576000000 11576573665 2986065408 2986639073
+34731000000 34732721110 11577000000 11577573703 2987065408 2987639111
+34734000000 34735721271 11578000000 11578573757 2988065408 2988639165
+34737000000 34738721398 11579000000 11579573799 2989065408 2989639207
+34740000000 34741721507 11580000000 11580573835 2990065408 2990639243
+34743000000 34744721649 11581000000 11581573883 2991065408 2991639291
+34746000000 34747721883 11582000000 11582573961 2992065408 2992639369
+34749000000 34750721796 11583000000 11583573932 2993065408 2993639340
+34752000000 34753721917 11584000000 11584573972 2994065408 2994639380
+34755000000 34756722025 11585000000 11585574008 2995065408 2995639416
+34758000000 34759722260 11586000000 11586574086 2996065408 2996639494
+34761000000 34762722439 11587000000 11587574146 2997065408 2997639554
+34764000000 34765636079 11588000000 11588545359 2998065408 2998610767
+34767000000 34768722708 11589000000 11589574236 2999065408 2999639644
+34770000000 34771722881 11590000000 11590574293 3000065408 3000639701
+34773000000 34774722997 11591000000 11591574332 3001065408 3001639740
+34776000000 34777723170 11592000000 11592574390 3002065408 3002639798
+34779000000 34780723342 11593000000 11593574447 3003065408 3003639855
+34782000000 34783723398 11594000000 11594574466 3004065408 3004639874
+34785000000 34786723544 11595000000 11595574514 3005065408 3005639922
+34788000000 34789723740 11596000000 11596574580 3006065408 3006639988
+34791000000 34792723769 11597000000 11597574589 3007065408 3007639997
+34794000000 34795724075 11598000000 11598574691 3008065408 3008640099
+34797000000 34798724247 11599000000 11599574749 3009065408 3009640157
+34800000000 34801724380 11600000000 11600574793 3010065408 3010640201
+34803000000 34804724497 11601000000 11601574832 3011065408 3011640240
+34806000000 34807724682 11602000000 11602574894 3012065408 3012640302
+34809000000 34810724788 11603000000 11603574929 3013065408 3013640337
+34812000000 34813724969 11604000000 11604574989 3014065408 3014640397
+34815000000 34816725181 11605000000 11605575060 3015065408 3015640468
+34818000000 34819725288 11606000000 11606575096 3016065408 3016640504
+34821000000 34822725454 11607000000 11607575151 3017065408 3017640559
+34824000000 34825324199 11608000000 11608441399 3018065408 3018506807
+34827000000 34828725725 11609000000 11609575241 3019065408 3019640649
+34830000000 34831725837 11610000000 11610575279 3020065408 3020640687
+34833000000 34834726046 11611000000 11611575348 3021065408 3021640756
+34836000000 34837726125 11612000000 11612575375 3022065408 3022640783
+34839000000 34840726350 11613000000 11613575450 3023065408 3023640858
+34842000000 34843726477 11614000000 11614575492 3024065408 3024640900
+34845000000 34846726566 11615000000 11615575522 3025065408 3025640930
+34848000000 34849726672 11616000000 11616575557 3026065408 3026640965
+34851000000 34852726883 11617000000 11617575627 3027065408 3027641035
+34854000000 34855727092 11618000000 11618575697 3028065408 3028641105
+34857000000 34858727237 11619000000 11619575745 3029065408 3029641153
+34860000000 34861727363 11620000000 11620575787 3030065408 3030641195
+34863000000 34864727529 11621000000 11621575843 3031065408 3031641251
+34866000000 34867727609 11622000000 11622575869 3032065408 3032641277
+34869000000 34870727844 11623000000 11623575948 3033065408 3033641356
+34872000000 34873728003 11624000000 11624576001 3034065408 3034641409
+34875000000 34876728124 11625000000 11625576041 3035065408 3035641449
+34878000000 34879728284 11626000000 11626576094 3036065408 3036641502
+34881000000 34882728367 11627000000 11627576122 3037065408 3037641530
+34884000000 34885728613 11628000000 11628576204 3038065408 3038641612
+34887000000 34888728736 11629000000 11629576245 3039065408 3039641653
+34890000000 34891728872 11630000000 11630576290 3040065408 3040641698
+34893000000 34894729047 11631000000 11631576349 3041065408 3041641757
+34896000000 34897729169 11632000000 11632576389 3042065408 3042641797
+34899000000 34900729319 11633000000 11633576439 3043065408 3043641847
+34902000000 34903729467 11634000000 11634576489 3044065408 3044641897
+34905000000 34905903161 11635000000 11635301053 3045065408 3045366461
+34908000000 34909729787 11636000000 11636576595 3046065408 3046642003
+34911000000 34912729919 11637000000 11637576639 3047065408 3047642047
+34914000000 34915730093 11638000000 11638576697 3048065408 3048642105
+34917000000 34918730212 11639000000 11639576737 3049065408 3049642145
+34920000000 34921730336 11640000000 11640576778 3050065408 3050642186
+34923000000 34924730555 11641000000 11641576851 3051065408 3051642259
+34926000000 34927730691 11642000000 11642576897 3052065408 3052642305
+34929000000 34930730842 11643000000 11643576947 3053065408 3053642355
+34932000000 34933730992 11644000000 11644576997 3054065408 3054642405
+34935000000 34936731107 11645000000 11645577035 3055065408 3055642443
+34938000000 34939731204 11646000000 11646577068 3056065408 3056642476
+34941000000 34942731412 11647000000 11647577137 3057065408 3057642545
+34944000000 34945731567 11648000000 11648577189 3058065408 3058642597
+34947000000 34948731726 11649000000 11649577242 3059065408 3059642650
+34950000000 34951731900 11650000000 11650577300 3060065408 3060642708
+34953000000 34954732000 11651000000 11651577333 3061065408 3061642741
+34956000000 34957732178 11652000000 11652577392 3062065408 3062642800
+34959000000 34960732327 11653000000 11653577442 3063065408 3063642850
+34962000000 34963732455 11654000000 11654577485 3064065408 3064642893
+34965000000 34966732624 11655000000 11655577541 3065065408 3065642949
+34968000000 34969732744 11656000000 11656577581 3066065408 3066642989
+34971000000 34971560094 11657000000 11657186698 3067065408 3067252106
+34974000000 34975732994 11658000000 11658577664 3068065408 3068643072
+34977000000 34978733252 11659000000 11659577750 3069065408 3069643158
+34980000000 34981733357 11660000000 11660577785 3070065408 3070643193
+34983000000 34984733437 11661000000 11661577812 3071065408 3071643220
+34986000000 34987733584 11662000000 11662577861 3072065408 3072643269
+34989000000 34990733838 11663000000 11663577946 3073065408 3073643354
+34992000000 34993733928 11664000000 11664577976 3074065408 3074643384
+34995000000 34996734173 11665000000 11665578057 3075065408 3075643465
+34998000000 34999734251 11666000000 11666578083 3076065408 3076643491
+35001000000 35002734428 11667000000 11667578142 3077065408 3077643550
+35004000000 35005734574 11668000000 11668578191 3078065408 3078643599
+35007000000 35008734718 11669000000 11669578239 3079065408 3079643647
+35010000000 35010357372 11670000000 11670119124 3080065408 3080184532
+35013000000 35014735033 11671000000 11671578344 3081065408 3081643752
+35016000000 35017735193 11672000000 11672578397 3082065408 3082643805
+35019000000 35020735330 11673000000 11673578443 3083065408 3083643851
+35022000000 35023735488 11674000000 11674578496 3084065408 3084643904
+35025000000 35026735646 11675000000 11675578548 3085065408 3085643956
+35028000000 35029735760 11676000000 11676578586 3086065408 3086643994
+35031000000 35032735921 11677000000 11677578640 3087065408 3087644048
+35034000000 35035736048 11678000000 11678578682 3088065408 3088644090
+35037000000 35038736157 11679000000 11679578719 3089065408 3089644127
+35040000000 35041736299 11680000000 11680578766 3090065408 3090644174
+35043000000 35044736533 11681000000 11681578844 3091065408 3091644252
+35046000000 35047736446 11682000000 11682578815 3092065408 3092644223
+35049000000 35050736567 11683000000 11683578855 3093065408 3093644263
+35052000000 35053736675 11684000000 11684578891 3094065408 3094644299
+35055000000 35056736910 11685000000 11685578970 3095065408 3095644378
+35058000000 35059737089 11686000000 11686579029 3096065408 3096644437
+35061000000 35062650729 11687000000 11687550243 3097065408 3097615651
+35064000000 35065737358 11688000000 11688579119 3098065408 3098644527
+35067000000 35068737531 11689000000 11689579177 3099065408 3099644585
+35070000000 35071737647 11690000000 11690579215 3100065408 3100644623
+35073000000 35074737820 11691000000 11691579273 3101065408 3101644681
+35076000000 35077737992 11692000000 11692579330 3102065408 3102644738
+35079000000 35080738048 11693000000 11693579349 3103065408 3103644757
+35082000000 35083738194 11694000000 11694579398 3104065408 3104644806
+35085000000 35086738390 11695000000 11695579463 3105065408 3105644871
+35088000000 35089738419 11696000000 11696579473 3106065408 3106644881
+35091000000 35092738725 11697000000 11697579575 3107065408 3107644983
+35094000000 35095738897 11698000000 11698579632 3108065408 3108645040
+35097000000 35098739030 11699000000 11699579676 3109065408 3109645084
+35100000000 35101739147 11700000000 11700579715 3110065408 3110645123
+35103000000 35104739332 11701000000 11701579777 3111065408 3111645185
+35106000000 35107739438 11702000000 11702579812 3112065408 3112645220
+35109000000 35110739619 11703000000 11703579873 3113065408 3113645281
+35112000000 35113739831 11704000000 11704579943 3114065408 3114645351
+35115000000 35116739938 11705000000 11705579979 3115065408 3115645387
+35118000000 35119740104 11706000000 11706580034 3116065408 3116645442
+35121000000 35122338849 11707000000 11707446283 3117065408 3117511691
+35124000000 35125740375 11708000000 11708580125 3118065408 3118645533
+35127000000 35128740487 11709000000 11709580162 3119065408 3119645570
+35130000000 35131740696 11710000000 11710580232 3120065408 3120645640
+35133000000 35134740775 11711000000 11711580258 3121065408 3121645666
+35136000000 35137741000 11712000000 11712580333 3122065408 3122645741
+35139000000 35140741127 11713000000 11713580375 3123065408 3123645783
+35142000000 35143741216 11714000000 11714580405 3124065408 3124645813
+35145000000 35146741322 11715000000 11715580440 3125065408 3125645848
+35148000000 35149741533 11716000000 11716580511 3126065408 3126645919
+35151000000 35152741742 11717000000 11717580580 3127065408 3127645988
+35154000000 35155741887 11718000000 11718580629 3128065408 3128646037
+35157000000 35158742013 11719000000 11719580671 3129065408 3129646079
+35160000000 35161742179 11720000000 11720580726 3130065408 3130646134
+35163000000 35164742259 11721000000 11721580753 3131065408 3131646161
+35166000000 35167742494 11722000000 11722580831 3132065408 3132646239
+35169000000 35170742653 11723000000 11723580884 3133065408 3133646292
+35172000000 35173742774 11724000000 11724580924 3134065408 3134646332
+35175000000 35176742934 11725000000 11725580978 3135065408 3135646386
+35178000000 35179743017 11726000000 11726581005 3136065408 3136646413
+35181000000 35182743263 11727000000 11727581087 3137065408 3137646495
+35184000000 35185743386 11728000000 11728581128 3138065408 3138646536
+35187000000 35188743522 11729000000 11729581174 3139065408 3139646582
+35190000000 35191743697 11730000000 11730581232 3140065408 3140646640
+35193000000 35194743819 11731000000 11731581273 3141065408 3141646681
+35196000000 35197743969 11732000000 11732581323 3142065408 3142646731
+35199000000 35200744117 11733000000 11733581372 3143065408 3143646780
+35202000000 35202917811 11734000000 11734305937 3144065408 3144371345
+35205000000 35206744437 11735000000 11735581479 3145065408 3145646887
+35208000000 35209744569 11736000000 11736581523 3146065408 3146646931
+35211000000 35212744743 11737000000 11737581581 3147065408 3147646989
+35214000000 35215744862 11738000000 11738581620 3148065408 3148647028
+35217000000 35218744986 11739000000 11739581662 3149065408 3149647070
+35220000000 35221745205 11740000000 11740581735 3150065408 3150647143
+35223000000 35224745341 11741000000 11741581780 3151065408 3151647188
+35226000000 35227745492 11742000000 11742581830 3152065408 3152647238
+35229000000 35230745642 11743000000 11743581880 3153065408 3153647288
+35232000000 35233745757 11744000000 11744581919 3154065408 3154647327
+35235000000 35236745854 11745000000 11745581951 3155065408 3155647359
+35238000000 35239746062 11746000000 11746582020 3156065408 3156647428
+35241000000 35242746217 11747000000 11747582072 3157065408 3157647480
+35244000000 35245746376 11748000000 11748582125 3158065408 3158647533
+35247000000 35248746550 11749000000 11749582183 3159065408 3159647591
+35250000000 35251746650 11750000000 11750582216 3160065408 3160647624
+35253000000 35254746828 11751000000 11751582276 3161065408 3161647684
+35256000000 35257746977 11752000000 11752582325 3162065408 3162647733
+35259000000 35260747105 11753000000 11753582368 3163065408 3163647776
+35262000000 35263747274 11754000000 11754582424 3164065408 3164647832
+35265000000 35266747394 11755000000 11755582464 3165065408 3165647872
+35268000000 35268574744 11756000000 11756191581 3166065408 3166256989
+35271000000 35272747644 11757000000 11757582548 3167065408 3167647956
+35274000000 35275747902 11758000000 11758582634 3168065408 3168648042
+35277000000 35278748007 11759000000 11759582669 3169065408 3169648077
+35280000000 35281748087 11760000000 11760582695 3170065408 3170648103
+35283000000 35284748234 11761000000 11761582744 3171065408 3171648152
+35286000000 35287748488 11762000000 11762582829 3172065408 3172648237
+35289000000 35290748578 11763000000 11763582859 3173065408 3173648267
+35292000000 35293748823 11764000000 11764582941 3174065408 3174648349
+35295000000 35296748901 11765000000 11765582967 3175065408 3175648375
+35298000000 35299749078 11766000000 11766583026 3176065408 3176648434
+35301000000 35302749224 11767000000 11767583074 3177065408 3177648482
+35304000000 35305749368 11768000000 11768583122 3178065408 3178648530
+35307000000 35307372022 11769000000 11769124007 3179065408 3179189415
+35310000000 35311749683 11770000000 11770583227 3180065408 3180648635
+35313000000 35314749843 11771000000 11771583281 3181065408 3181648689
+35316000000 35317749980 11772000000 11772583326 3182065408 3182648734
+35319000000 35320750138 11773000000 11773583379 3183065408 3183648787
+35322000000 35323750296 11774000000 11774583432 3184065408 3184648840
+35325000000 35326750410 11775000000 11775583470 3185065408 3185648878
+35328000000 35329750571 11776000000 11776583523 3186065408 3186648931
+35331000000 35332750698 11777000000 11777583566 3187065408 3187648974
+35334000000 35335750807 11778000000 11778583602 3188065408 3188649010
+35337000000 35338750949 11779000000 11779583649 3189065408 3189649057
+35340000000 35341751183 11780000000 11780583727 3190065408 3190649135
+35343000000 35344751096 11781000000 11781583698 3191065408 3191649106
+35346000000 35347751217 11782000000 11782583739 3192065408 3192649147
+35349000000 35350751325 11783000000 11783583775 3193065408 3193649183
+35352000000 35353751560 11784000000 11784583853 3194065408 3194649261
+35355000000 35356751739 11785000000 11785583913 3195065408 3195649321
+35358000000 35359665379 11786000000 11786555126 3196065408 3196620534
+35361000000 35362752008 11787000000 11787584002 3197065408 3197649410
+35364000000 35365752181 11788000000 11788584060 3198065408 3198649468
+35367000000 35368752297 11789000000 11789584099 3199065408 3199649507
+35370000000 35371752470 11790000000 11790584156 3200065408 3200649564
+35373000000 35374752642 11791000000 11791584214 3201065408 3201649622
+35376000000 35377752698 11792000000 11792584232 3202065408 3202649640
+35379000000 35380752844 11793000000 11793584281 3203065408 3203649689
+35382000000 35383753040 11794000000 11794584346 3204065408 3204649754
+35385000000 35386753069 11795000000 11795584356 3205065408 3205649764
+35388000000 35389753375 11796000000 11796584458 3206065408 3206649866
+35391000000 35392753547 11797000000 11797584515 3207065408 3207649923
+35394000000 35395753680 11798000000 11798584560 3208065408 3208649968
+35397000000 35398753797 11799000000 11799584599 3209065408 3209650007
+35400000000 35401753982 11800000000 11800584660 3210065408 3210650068
+35403000000 35404754088 11801000000 11801584696 3211065408 3211650104
+35406000000 35407754269 11802000000 11802584756 3212065408 3212650164
+35409000000 35410754481 11803000000 11803584827 3213065408 3213650235
+35412000000 35413754588 11804000000 11804584862 3214065408 3214650270
+35415000000 35416754754 11805000000 11805584918 3215065408 3215650326
+35418000000 35419353499 11806000000 11806451166 3216065408 3216516574
+35421000000 35422755025 11807000000 11807585008 3217065408 3217650416
+35424000000 35425755137 11808000000 11808585045 3218065408 3218650453
+35427000000 35428755346 11809000000 11809585115 3219065408 3219650523
+35430000000 35431755425 11810000000 11810585141 3220065408 3220650549
+35433000000 35434755650 11811000000 11811585216 3221065408 3221650624
+35436000000 35437755777 11812000000 11812585259 3222065408 3222650667
+35439000000 35440755866 11813000000 11813585288 3223065408 3223650696
+35442000000 35443755972 11814000000 11814585324 3224065408 3224650732
+35445000000 35446756183 11815000000 11815585394 3225065408 3225650802
+35448000000 35449756392 11816000000 11816585464 3226065408 3226650872
+35451000000 35452756537 11817000000 11817585512 3227065408 3227650920
+35454000000 35455756663 11818000000 11818585554 3228065408 3228650962
+35457000000 35458756829 11819000000 11819585609 3229065408 3229651017
+35460000000 35461756909 11820000000 11820585636 3230065408 3230651044
+35463000000 35464757144 11821000000 11821585714 3231065408 3231651122
+35466000000 35467757303 11822000000 11822585767 3232065408 3232651175
+35469000000 35470757424 11823000000 11823585808 3233065408 3233651216
+35472000000 35473757584 11824000000 11824585861 3234065408 3234651269
+35475000000 35476757667 11825000000 11825585889 3235065408 3235651297
+35478000000 35479757913 11826000000 11826585971 3236065408 3236651379
+35481000000 35482758036 11827000000 11827586012 3237065408 3237651420
+35484000000 35485758172 11828000000 11828586057 3238065408 3238651465
+35487000000 35488758347 11829000000 11829586115 3239065408 3239651523
+35490000000 35491758469 11830000000 11830586156 3240065408 3240651564
+35493000000 35494758619 11831000000 11831586206 3241065408 3241651614
+35496000000 35497758767 11832000000 11832586255 3242065408 3242651663
+35499000000 35499932461 11833000000 11833310820 3243065408 3243376228
+35502000000 35503759087 11834000000 11834586362 3244065408 3244651770
+35505000000 35506759219 11835000000 11835586406 3245065408 3245651814
+35508000000 35509759393 11836000000 11836586464 3246065408 3246651872
+35511000000 35512759512 11837000000 11837586504 3247065408 3247651912
+35514000000 35515759636 11838000000 11838586545 3248065408 3248651953
+35517000000 35518759855 11839000000 11839586618 3249065408 3249652026
+35520000000 35521759991 11840000000 11840586663 3250065408 3250652071
+35523000000 35524760142 11841000000 11841586714 3251065408 3251652122
+35526000000 35527760292 11842000000 11842586764 3252065408 3252652172
+35529000000 35530760407 11843000000 11843586802 3253065408 3253652210
+35532000000 35533760504 11844000000 11844586834 3254065408 3254652242
+35535000000 35536760712 11845000000 11845586904 3255065408 3255652312
+35538000000 35539760867 11846000000 11846586955 3256065408 3256652363
+35541000000 35542761026 11847000000 11847587008 3257065408 3257652416
+35544000000 35545761200 11848000000 11848587066 3258065408 3258652474
+35547000000 35548761300 11849000000 11849587100 3259065408 3259652508
+35550000000 35551761478 11850000000 11850587159 3260065408 3260652567
+35553000000 35554761627 11851000000 11851587209 3261065408 3261652617
+35556000000 35557761755 11852000000 11852587251 3262065408 3262652659
+35559000000 35560761924 11853000000 11853587308 3263065408 3263652716
+35562000000 35563762044 11854000000 11854587348 3264065408 3264652756
+35565000000 35565589394 11855000000 11855196464 3265065408 3265261872
+35568000000 35569762294 11856000000 11856587431 3266065408 3266652839
+35571000000 35572762552 11857000000 11857587517 3267065408 3267652925
+35574000000 35575762657 11858000000 11858587552 3268065408 3268652960
+35577000000 35578762737 11859000000 11859587579 3269065408 3269652987
+35580000000 35581762884 11860000000 11860587628 3270065408 3270653036
+35583000000 35584763138 11861000000 11861587712 3271065408 3271653120
+35586000000 35587763228 11862000000 11862587742 3272065408 3272653150
+35589000000 35590763473 11863000000 11863587824 3273065408 3273653232
+35592000000 35593763551 11864000000 11864587850 3274065408 3274653258
+35595000000 35596763728 11865000000 11865587909 3275065408 3275653317
+35598000000 35599763874 11866000000 11866587958 3276065408 3276653366
+35601000000 35602764018 11867000000 11867588006 3277065408 3277653414
+35604000000 35604386672 11868000000 11868128890 3278065408 3278194298
+35607000000 35608764333 11869000000 11869588111 3279065408 3279653519
+35610000000 35611764493 11870000000 11870588164 3280065408 3280653572
+35613000000 35614764630 11871000000 11871588210 3281065408 3281653618
+35616000000 35617764788 11872000000 11872588262 3282065408 3282653670
+35619000000 35620764946 11873000000 11873588315 3283065408 3283653723
+35622000000 35623765060 11874000000 11874588353 3284065408 3284653761
+35625000000 35626765221 11875000000 11875588407 3285065408 3285653815
+35628000000 35629765348 11876000000 11876588449 3286065408 3286653857
+35631000000 35632765457 11877000000 11877588485 3287065408 3287653893
+35634000000 35635765599 11878000000 11878588533 3288065408 3288653941
+35637000000 35638765833 11879000000 11879588611 3289065408 3289654019
+35640000000 35641765746 11880000000 11880588582 3290065408 3290653990
+35643000000 35644765867 11881000000 11881588622 3291065408 3291654030
+35646000000 35647765975 11882000000 11882588658 3292065408 3292654066
+35649000000 35650766210 11883000000 11883588736 3293065408 3293654144
+35652000000 35653766389 11884000000 11884588796 3294065408 3294654204
+35655000000 35656680029 11885000000 11885560009 3295065408 3295625417
+35658000000 35659766658 11886000000 11886588886 3296065408 3296654294
+35661000000 35662766831 11887000000 11887588943 3297065408 3297654351
+35664000000 35665766947 11888000000 11888588982 3298065408 3298654390
+35667000000 35668767120 11889000000 11889589040 3299065408 3299654448
+35670000000 35671767292 11890000000 11890589097 3300065408 3300654505
+35673000000 35674767348 11891000000 11891589116 3301065408 3301654524
+35676000000 35677767494 11892000000 11892589164 3302065408 3302654572
+35679000000 35680767690 11893000000 11893589230 3303065408 3303654638
+35682000000 35683767719 11894000000 11894589239 3304065408 3304654647
+35685000000 35686768025 11895000000 11895589341 3305065408 3305654749
+35688000000 35689768197 11896000000 11896589399 3306065408 3306654807
+35691000000 35692768330 11897000000 11897589443 3307065408 3307654851
+35694000000 35695768447 11898000000 11898589482 3308065408 3308654890
+35697000000 35698768632 11899000000 11899589544 3309065408 3309654952
+35700000000 35701768738 11900000000 11900589579 3310065408 3310654987
+35703000000 35704768919 11901000000 11901589639 3311065408 3311655047
+35706000000 35707769131 11902000000 11902589710 3312065408 3312655118
+35709000000 35710769238 11903000000 11903589746 3313065408 3313655154
+35712000000 35713769404 11904000000 11904589801 3314065408 3314655209
+35715000000 35716368149 11905000000 11905456049 3315065408 3315521457
+35718000000 35719769675 11906000000 11906589891 3316065408 3316655299
+35721000000 35722769787 11907000000 11907589929 3317065408 3317655337
+35724000000 35725769996 11908000000 11908589998 3318065408 3318655406
+35727000000 35728770075 11909000000 11909590025 3319065408 3319655433
+35730000000 35731770300 11910000000 11910590100 3320065408 3320655508
+35733000000 35734770427 11911000000 11911590142 3321065408 3321655550
+35736000000 35737770516 11912000000 11912590172 3322065408 3322655580
+35739000000 35740770622 11913000000 11913590207 3323065408 3323655615
+35742000000 35743770833 11914000000 11914590277 3324065408 3324655685
+35745000000 35746771042 11915000000 11915590347 3325065408 3325655755
+35748000000 35749771187 11916000000 11916590395 3326065408 3326655803
+35751000000 35752771313 11917000000 11917590437 3327065408 3327655845
+35754000000 35755771479 11918000000 11918590493 3328065408 3328655901
+35757000000 35758771559 11919000000 11919590519 3329065408 3329655927
+35760000000 35761771794 11920000000 11920590598 3330065408 3330656006
+35763000000 35764771953 11921000000 11921590651 3331065408 3331656059
+35766000000 35767772074 11922000000 11922590691 3332065408 3332656099
+35769000000 35770772234 11923000000 11923590744 3333065408 3333656152
+35772000000 35773772317 11924000000 11924590772 3334065408 3334656180
+35775000000 35776772563 11925000000 11925590854 3335065408 3335656262
+35778000000 35779772686 11926000000 11926590895 3336065408 3336656303
+35781000000 35782772822 11927000000 11927590940 3337065408 3337656348
+35784000000 35785772997 11928000000 11928590999 3338065408 3338656407
+35787000000 35788773119 11929000000 11929591039 3339065408 3339656447
+35790000000 35791773269 11930000000 11930591089 3340065408 3340656497
+35793000000 35794773417 11931000000 11931591139 3341065408 3341656547
+35796000000 35796947111 11932000000 11932315703 3342065408 3342381111
+35799000000 35800773737 11933000000 11933591245 3343065408 3343656653
+35802000000 35803773869 11934000000 11934591289 3344065408 3344656697
+35805000000 35806774043 11935000000 11935591347 3345065408 3345656755
+35808000000 35809774162 11936000000 11936591387 3346065408 3346656795
+35811000000 35812774286 11937000000 11937591428 3347065408 3347656836
+35814000000 35815774505 11938000000 11938591501 3348065408 3348656909
+35817000000 35818774641 11939000000 11939591547 3349065408 3349656955
+35820000000 35821774792 11940000000 11940591597 3350065408 3350657005
+35823000000 35824774942 11941000000 11941591647 3351065408 3351657055
+35826000000 35827775057 11942000000 11942591685 3352065408 3352657093
+35829000000 35830775154 11943000000 11943591718 3353065408 3353657126
+35832000000 35833775362 11944000000 11944591787 3354065408 3354657195
+35835000000 35836775517 11945000000 11945591839 3355065408 3355657247
+35838000000 35839775676 11946000000 11946591892 3356065408 3356657300
+35841000000 35842775850 11947000000 11947591950 3357065408 3357657358
+35844000000 35845775950 11948000000 11948591983 3358065408 3358657391
+35847000000 35848776128 11949000000 11949592042 3359065408 3359657450
+35850000000 35851776277 11950000000 11950592092 3360065408 3360657500
+35853000000 35854776405 11951000000 11951592135 3361065408 3361657543
+35856000000 35857776574 11952000000 11952592191 3362065408 3362657599
+35859000000 35860776694 11953000000 11953592231 3363065408 3363657639
+35862000000 35862604044 11954000000 11954201348 3364065408 3364266756
+35865000000 35866776944 11955000000 11955592314 3365065408 3365657722
+35868000000 35869777202 11956000000 11956592400 3366065408 3366657808
+35871000000 35872777307 11957000000 11957592435 3367065408 3367657843
+35874000000 35875777387 11958000000 11958592462 3368065408 3368657870
+35877000000 35878777534 11959000000 11959592511 3369065408 3369657919
+35880000000 35881777788 11960000000 11960592596 3370065408 3370658004
+35883000000 35884777878 11961000000 11961592626 3371065408 3371658034
+35886000000 35887778123 11962000000 11962592707 3372065408 3372658115
+35889000000 35890778201 11963000000 11963592733 3373065408 3373658141
+35892000000 35893778378 11964000000 11964592792 3374065408 3374658200
+35895000000 35896778524 11965000000 11965592841 3375065408 3375658249
+35898000000 35899778668 11966000000 11966592889 3376065408 3376658297
+35901000000 35901401322 11967000000 11967133774 3377065408 3377199182
+35904000000 35905778983 11968000000 11968592994 3378065408 3378658402
+35907000000 35908779143 11969000000 11969593047 3379065408 3379658455
+35910000000 35911779280 11970000000 11970593093 3380065408 3380658501
+35913000000 35914779438 11971000000 11971593146 3381065408 3381658554
+35916000000 35917779596 11972000000 11972593198 3382065408 3382658606
+35919000000 35920779710 11973000000 11973593236 3383065408 3383658644
+35922000000 35923779871 11974000000 11974593290 3384065408 3384658698
+35925000000 35926779998 11975000000 11975593332 3385065408 3385658740
+35928000000 35929780107 11976000000 11976593369 3386065408 3386658777
+35931000000 35932780249 11977000000 11977593416 3387065408 3387658824
+35934000000 35935780483 11978000000 11978593494 3388065408 3388658902
+35937000000 35938780396 11979000000 11979593465 3389065408 3389658873
+35940000000 35941780517 11980000000 11980593505 3390065408 3390658913
+35943000000 35944780625 11981000000 11981593541 3391065408 3391658949
+35946000000 35947780860 11982000000 11982593620 3392065408 3392659028
+35949000000 35950781039 11983000000 11983593679 3393065408 3393659087
+35952000000 35953694679 11984000000 11984564893 3394065408 3394630301
+35955000000 35956781308 11985000000 11985593769 3395065408 3395659177
+35958000000 35959781481 11986000000 11986593827 3396065408 3396659235
+35961000000 35962781597 11987000000 11987593865 3397065408 3397659273
+35964000000 35965781770 11988000000 11988593923 3398065408 3398659331
+35967000000 35968781942 11989000000 11989593980 3399065408 3399659388
+35970000000 35971781998 11990000000 11990593999 3400065408 3400659407
+35973000000 35974782144 11991000000 11991594048 3401065408 3401659456
+35976000000 35977782340 11992000000 11992594113 3402065408 3402659521
+35979000000 35980782369 11993000000 11993594123 3403065408 3403659531
+35982000000 35983782675 11994000000 11994594225 3404065408 3404659633
+35985000000 35986782847 11995000000 11995594282 3405065408 3405659690
+35988000000 35989782980 11996000000 11996594326 3406065408 3406659734
+35991000000 35992783097 11997000000 11997594365 3407065408 3407659773
+35994000000 35995783282 11998000000 11998594427 3408065408 3408659835
+35997000000 35998783388 11999000000 11999594462 3409065408 3409659870
+36000000000 36001783569 12000000000 12000594523 3410065408 3410659931
+36003000000 36004783781 12001000000 12001594593 3411065408 3411660001
+36006000000 36007783888 12002000000 12002594629 3412065408 3412660037
+36009000000 36010784054 12003000000 12003594684 3413065408 3413660092
+36012000000 36013382799 12004000000 12004460933 3414065408 3414526341
+36015000000 36016784325 12005000000 12005594775 3415065408 3415660183
+36018000000 36019784437 12006000000 12006594812 3416065408 3416660220
+36021000000 36022784646 12007000000 12007594882 3417065408 3417660290
+36024000000 36025784725 12008000000 12008594908 3418065408 3418660316
+36027000000 36028784950 12009000000 12009594983 3419065408 3419660391
+36030000000 36031785077 12010000000 12010595025 3420065408 3420660433
+36033000000 36034785166 12011000000 12011595055 3421065408 3421660463
+36036000000 36037785272 12012000000 12012595090 3422065408 3422660498
+36039000000 36040785483 12013000000 12013595161 3423065408 3423660569
+36042000000 36043785692 12014000000 12014595230 3424065408 3424660638
+36045000000 36046785837 12015000000 12015595279 3425065408 3425660687
+36048000000 36049785963 12016000000 12016595321 3426065408 3426660729
+36051000000 36052786129 12017000000 12017595376 3427065408 3427660784
+36054000000 36055786209 12018000000 12018595403 3428065408 3428660811
+36057000000 36058786444 12019000000 12019595481 3429065408 3429660889
+36060000000 36061786603 12020000000 12020595534 3430065408 3430660942
+36063000000 36064786724 12021000000 12021595574 3431065408 3431660982
+36066000000 36067786884 12022000000 12022595628 3432065408 3432661036
+36069000000 36070786967 12023000000 12023595655 3433065408 3433661063
+36072000000 36073787213 12024000000 12024595737 3434065408 3434661145
+36075000000 36076787336 12025000000 12025595778 3435065408 3435661186
+36078000000 36079787472 12026000000 12026595824 3436065408 3436661232
+36081000000 36082787647 12027000000 12027595882 3437065408 3437661290
+36084000000 36085787769 12028000000 12028595923 3438065408 3438661331
+36087000000 36088787919 12029000000 12029595973 3439065408 3439661381
+36090000000 36091788067 12030000000 12030596022 3440065408 3440661430
+36093000000 36093961761 12031000000 12031320587 3441065408 3441385995
+36096000000 36097788387 12032000000 12032596129 3442065408 3442661537
+36099000000 36100788519 12033000000 12033596173 3443065408 3443661581
+36102000000 36103788693 12034000000 12034596231 3444065408 3444661639
+36105000000 36106788812 12035000000 12035596270 3445065408 3445661678
+36108000000 36109788936 12036000000 12036596312 3446065408 3446661720
+36111000000 36112789155 12037000000 12037596385 3447065408 3447661793
+36114000000 36115789291 12038000000 12038596430 3448065408 3448661838
+36117000000 36118789442 12039000000 12039596480 3449065408 3449661888
+36120000000 36121789592 12040000000 12040596530 3450065408 3450661938
+36123000000 36124789707 12041000000 12041596569 3451065408 3451661977
+36126000000 36127789804 12042000000 12042596601 3452065408 3452662009
+36129000000 36130790012 12043000000 12043596670 3453065408 3453662078
+36132000000 36133790167 12044000000 12044596722 3454065408 3454662130
+36135000000 36136790326 12045000000 12045596775 3455065408 3455662183
+36138000000 36139790500 12046000000 12046596833 3456065408 3456662241
+36141000000 36142790600 12047000000 12047596866 3457065408 3457662274
+36144000000 36145790778 12048000000 12048596926 3458065408 3458662334
+36147000000 36148790927 12049000000 12049596975 3459065408 3459662383
+36150000000 36151791055 12050000000 12050597018 3460065408 3460662426
+36153000000 36154791224 12051000000 12051597074 3461065408 3461662482
+36156000000 36157791344 12052000000 12052597114 3462065408 3462662522
+36159000000 36159618694 12053000000 12053206231 3463065408 3463271639
+36162000000 36163791594 12054000000 12054597198 3464065408 3464662606
+36165000000 36166791852 12055000000 12055597284 3465065408 3465662692
+36168000000 36169791957 12056000000 12056597319 3466065408 3466662727
+36171000000 36172792037 12057000000 12057597345 3467065408 3467662753
+36174000000 36175792184 12058000000 12058597394 3468065408 3468662802
+36177000000 36178792438 12059000000 12059597479 3469065408 3469662887
+36180000000 36181792528 12060000000 12060597509 3470065408 3470662917
+36183000000 36184792773 12061000000 12061597591 3471065408 3471662999
+36186000000 36187792851 12062000000 12062597617 3472065408 3472663025
+36189000000 36190793028 12063000000 12063597676 3473065408 3473663084
+36192000000 36193793174 12064000000 12064597724 3474065408 3474663132
+36195000000 36196793318 12065000000 12065597772 3475065408 3475663180
+36198000000 36198415972 12066000000 12066138657 3476065408 3476204065
+36201000000 36202793633 12067000000 12067597877 3477065408 3477663285
+36204000000 36205793793 12068000000 12068597931 3478065408 3478663339
+36207000000 36208793930 12069000000 12069597976 3479065408 3479663384
+36210000000 36211794088 12070000000 12070598029 3480065408 3480663437
+36213000000 36214794246 12071000000 12071598082 3481065408 3481663490
+36216000000 36217794360 12072000000 12072598120 3482065408 3482663528
+36219000000 36220794521 12073000000 12073598173 3483065408 3483663581
+36222000000 36223794648 12074000000 12074598216 3484065408 3484663624
+36225000000 36226794757 12075000000 12075598252 3485065408 3485663660
+36228000000 36229794899 12076000000 12076598299 3486065408 3486663707
+36231000000 36232795133 12077000000 12077598377 3487065408 3487663785
+36234000000 36235795046 12078000000 12078598348 3488065408 3488663756
+36237000000 36238795167 12079000000 12079598389 3489065408 3489663797
+36240000000 36241795275 12080000000 12080598425 3490065408 3490663833
+36243000000 36244795510 12081000000 12081598503 3491065408 3491663911
+36246000000 36247795689 12082000000 12082598563 3492065408 3492663971
+36249000000 36250709329 12083000000 12083569776 3493065408 3493635184
+36252000000 36253795958 12084000000 12084598652 3494065408 3494664060
+36255000000 36256796131 12085000000 12085598710 3495065408 3495664118
+36258000000 36259796247 12086000000 12086598749 3496065408 3496664157
+36261000000 36262796420 12087000000 12087598806 3497065408 3497664214
+36264000000 36265796592 12088000000 12088598864 3498065408 3498664272
+36267000000 36268796648 12089000000 12089598882 3499065408 3499664290
+36270000000 36271796794 12090000000 12090598931 3500065408 3500664339
+36273000000 36274796990 12091000000 12091598996 3501065408 3501664404
+36276000000 36277797019 12092000000 12092599006 3502065408 3502664414
+36279000000 36280797325 12093000000 12093599108 3503065408 3503664516
+36282000000 36283797497 12094000000 12094599165 3504065408 3504664573
+36285000000 36286797630 12095000000 12095599210 3505065408 3505664618
+36288000000 36289797747 12096000000 12096599249 3506065408 3506664657
+36291000000 36292797932 12097000000 12097599310 3507065408 3507664718
+36294000000 36295798038 12098000000 12098599346 3508065408 3508664754
+36297000000 36298798219 12099000000 12099599406 3509065408 3509664814
+36300000000 36301798431 12100000000 12100599477 3510065408 3510664885
+36303000000 36304798538 12101000000 12101599512 3511065408 3511664920
+36306000000 36307798704 12102000000 12102599568 3512065408 3512664976
+36309000000 36310397449 12103000000 12103465816 3513065408 3513531224
+36312000000 36313798975 12104000000 12104599658 3514065408 3514665066
+36315000000 36316799087 12105000000 12105599695 3515065408 3515665103
+36318000000 36319799296 12106000000 12106599765 3516065408 3516665173
+36321000000 36322799375 12107000000 12107599791 3517065408 3517665199
+36324000000 36325799600 12108000000 12108599866 3518065408 3518665274
+36327000000 36328799727 12109000000 12109599909 3519065408 3519665317
+36330000000 36331799816 12110000000 12110599938 3520065408 3520665346
+36333000000 36334799922 12111000000 12111599974 3521065408 3521665382
+36336000000 36337800133 12112000000 12112600044 3522065408 3522665452
+36339000000 36340800342 12113000000 12113600114 3523065408 3523665522
+36342000000 36343800487 12114000000 12114600162 3524065408 3524665570
+36345000000 36346800613 12115000000 12115600204 3525065408 3525665612
+36348000000 36349800779 12116000000 12116600259 3526065408 3526665667
+36351000000 36352800859 12117000000 12117600286 3527065408 3527665694
+36354000000 36355801094 12118000000 12118600364 3528065408 3528665772
+36357000000 36358801253 12119000000 12119600417 3529065408 3529665825
+36360000000 36361801374 12120000000 12120600458 3530065408 3530665866
+36363000000 36364801534 12121000000 12121600511 3531065408 3531665919
+36366000000 36367801617 12122000000 12122600539 3532065408 3532665947
+36369000000 36370801863 12123000000 12123600621 3533065408 3533666029
+36372000000 36373801986 12124000000 12124600662 3534065408 3534666070
+36375000000 36376802122 12125000000 12125600707 3535065408 3535666115
+36378000000 36379802297 12126000000 12126600765 3536065408 3536666173
+36381000000 36382802419 12127000000 12127600806 3537065408 3537666214
+36384000000 36385802569 12128000000 12128600856 3538065408 3538666264
+36387000000 36388802717 12129000000 12129600905 3539065408 3539666313
+36390000000 36390976411 12130000000 12130325470 3540065408 3540390878
+36393000000 36394803037 12131000000 12131601012 3541065408 3541666420
+36396000000 36397803169 12132000000 12132601056 3542065408 3542666464
+36399000000 36400803343 12133000000 12133601114 3543065408 3543666522
+36402000000 36403803462 12134000000 12134601154 3544065408 3544666562
+36405000000 36406803586 12135000000 12135601195 3545065408 3545666603
+36408000000 36409803805 12136000000 12136601268 3546065408 3546666676
+36411000000 36412803941 12137000000 12137601313 3547065408 3547666721
+36414000000 36415804092 12138000000 12138601364 3548065408 3548666772
+36417000000 36418804242 12139000000 12139601414 3549065408 3549666822
+36420000000 36421804357 12140000000 12140601452 3550065408 3550666860
+36423000000 36424804454 12141000000 12141601484 3551065408 3551666892
+36426000000 36427804662 12142000000 12142601554 3552065408 3552666962
+36429000000 36430804817 12143000000 12143601605 3553065408 3553667013
+36432000000 36433804976 12144000000 12144601658 3554065408 3554667066
+36435000000 36436805150 12145000000 12145601716 3555065408 3555667124
+36438000000 36439805250 12146000000 12146601750 3556065408 3556667158
+36441000000 36442805428 12147000000 12147601809 3557065408 3557667217
+36444000000 36445805577 12148000000 12148601859 3558065408 3558667267
+36447000000 36448805705 12149000000 12149601901 3559065408 3559667309
+36450000000 36451805874 12150000000 12150601958 3560065408 3560667366
+36453000000 36454805994 12151000000 12151601998 3561065408 3561667406
+36456000000 36456633344 12152000000 12152211114 3562065408 3562276522
+36459000000 36460806244 12153000000 12153602081 3563065408 3563667489
+36462000000 36463806502 12154000000 12154602167 3564065408 3564667575
+36465000000 36466806607 12155000000 12155602202 3565065408 3565667610
+36468000000 36469806687 12156000000 12156602229 3566065408 3566667637
+36471000000 36472806834 12157000000 12157602278 3567065408 3567667686
+36474000000 36475807088 12158000000 12158602362 3568065408 3568667770
+36477000000 36478807178 12159000000 12159602392 3569065408 3569667800
+36480000000 36481807423 12160000000 12160602474 3570065408 3570667882
+36483000000 36484807501 12161000000 12161602500 3571065408 3571667908
+36486000000 36487807678 12162000000 12162602559 3572065408 3572667967
+36489000000 36490807824 12163000000 12163602608 3573065408 3573668016
+36492000000 36493807968 12164000000 12164602656 3574065408 3574668064
+36495000000 36495430622 12165000000 12165143540 3575065408 3575208948
+36498000000 36499808283 12166000000 12166602761 3576065408 3576668169
+36501000000 36502808443 12167000000 12167602814 3577065408 3577668222
+36504000000 36505808580 12168000000 12168602860 3578065408 3578668268
+36507000000 36508808738 12169000000 12169602912 3579065408 3579668320
+36510000000 36511808896 12170000000 12170602965 3580065408 3580668373
+36513000000 36514809010 12171000000 12171603003 3581065408 3581668411
+36516000000 36517809171 12172000000 12172603057 3582065408 3582668465
+36519000000 36520809298 12173000000 12173603099 3583065408 3583668507
+36522000000 36523809407 12174000000 12174603135 3584065408 3584668543
+36525000000 36526809549 12175000000 12175603183 3585065408 3585668591
+36528000000 36529809783 12176000000 12176603261 3586065408 3586668669
+36531000000 36532809696 12177000000 12177603232 3587065408 3587668640
+36534000000 36535809817 12178000000 12178603272 3588065408 3588668680
+36537000000 36538809925 12179000000 12179603308 3589065408 3589668716
+36540000000 36541810160 12180000000 12180603386 3590065408 3590668794
+36543000000 36544810339 12181000000 12181603446 3591065408 3591668854
+36546000000 36547723979 12182000000 12182574659 3592065408 3592640067
+36549000000 36550810608 12183000000 12183603536 3593065408 3593668944
+36552000000 36553810781 12184000000 12184603593 3594065408 3594669001
+36555000000 36556810897 12185000000 12185603632 3595065408 3595669040
+36558000000 36559811070 12186000000 12186603690 3596065408 3596669098
+36561000000 36562811242 12187000000 12187603747 3597065408 3597669155
+36564000000 36565811298 12188000000 12188603766 3598065408 3598669174
+36567000000 36568811444 12189000000 12189603814 3599065408 3599669222
+36570000000 36571811640 12190000000 12190603880 3600065408 3600669288
+36573000000 36574811669 12191000000 12191603889 3601065408 3601669297
+36576000000 36577811975 12192000000 12192603991 3602065408 3602669399
+36579000000 36580812147 12193000000 12193604049 3603065408 3603669457
+36582000000 36583812280 12194000000 12194604093 3604065408 3604669501
+36585000000 36586812397 12195000000 12195604132 3605065408 3605669540
+36588000000 36589812582 12196000000 12196604194 3606065408 3606669602
+36591000000 36592812688 12197000000 12197604229 3607065408 3607669637
+36594000000 36595812869 12198000000 12198604289 3608065408 3608669697
+36597000000 36598813081 12199000000 12199604360 3609065408 3609669768
+36600000000 36601813188 12200000000 12200604396 3610065408 3610669804
+36603000000 36604813354 12201000000 12201604451 3611065408 3611669859
+36606000000 36607412099 12202000000 12202470699 3612065408 3612536107
+36609000000 36610813625 12203000000 12203604541 3613065408 3613669949
+36612000000 36613813737 12204000000 12204604579 3614065408 3614669987
+36615000000 36616813946 12205000000 12205604648 3615065408 3615670056
+36618000000 36619814025 12206000000 12206604675 3616065408 3616670083
+36621000000 36622814250 12207000000 12207604750 3617065408 3617670158
+36624000000 36625814377 12208000000 12208604792 3618065408 3618670200
+36627000000 36628814466 12209000000 12209604822 3619065408 3619670230
+36630000000 36631814572 12210000000 12210604857 3620065408 3620670265
+36633000000 36634814783 12211000000 12211604927 3621065408 3621670335
+36636000000 36637814992 12212000000 12212604997 3622065408 3622670405
+36639000000 36640815137 12213000000 12213605045 3623065408 3623670453
+36642000000 36643815263 12214000000 12214605087 3624065408 3624670495
+36645000000 36646815429 12215000000 12215605143 3625065408 3625670551
+36648000000 36649815509 12216000000 12216605169 3626065408 3626670577
+36651000000 36652815744 12217000000 12217605248 3627065408 3627670656
+36654000000 36655815903 12218000000 12218605301 3628065408 3628670709
+36657000000 36658816024 12219000000 12219605341 3629065408 3629670749
+36660000000 36661816184 12220000000 12220605394 3630065408 3630670802
+36663000000 36664816267 12221000000 12221605422 3631065408 3631670830
+36666000000 36667816513 12222000000 12222605504 3632065408 3632670912
+36669000000 36670816636 12223000000 12223605545 3633065408 3633670953
+36672000000 36673816772 12224000000 12224605590 3634065408 3634670998
+36675000000 36676816947 12225000000 12225605649 3635065408 3635671057
+36678000000 36679817069 12226000000 12226605689 3636065408 3636671097
+36681000000 36682817219 12227000000 12227605739 3637065408 3637671147
+36684000000 36685817367 12228000000 12228605789 3638065408 3638671197
+36687000000 36687991061 12229000000 12229330353 3639065408 3639395761
+36690000000 36691817687 12230000000 12230605895 3640065408 3640671303
+36693000000 36694817819 12231000000 12231605939 3641065408 3641671347
+36696000000 36697817993 12232000000 12232605997 3642065408 3642671405
+36699000000 36700818112 12233000000 12233606037 3643065408 3643671445
+36702000000 36703818236 12234000000 12234606078 3644065408 3644671486
+36705000000 36706818455 12235000000 12235606151 3645065408 3645671559
+36708000000 36709818591 12236000000 12236606197 3646065408 3646671605
+36711000000 36712818742 12237000000 12237606247 3647065408 3647671655
+36714000000 36715818892 12238000000 12238606297 3648065408 3648671705
+36717000000 36718819007 12239000000 12239606335 3649065408 3649671743
+36720000000 36721819104 12240000000 12240606368 3650065408 3650671776
+36723000000 36724819312 12241000000 12241606437 3651065408 3651671845
+36726000000 36727819467 12242000000 12242606489 3652065408 3652671897
+36729000000 36730819626 12243000000 12243606542 3653065408 3653671950
+36732000000 36733819800 12244000000 12244606600 3654065408 3654672008
+36735000000 36736819900 12245000000 12245606633 3655065408 3655672041
+36738000000 36739820078 12246000000 12246606692 3656065408 3656672100
+36741000000 36742820227 12247000000 12247606742 3657065408 3657672150
+36744000000 36745820355 12248000000 12248606785 3658065408 3658672193
+36747000000 36748820524 12249000000 12249606841 3659065408 3659672249
+36750000000 36751820644 12250000000 12250606881 3660065408 3660672289
+36753000000 36753647994 12251000000 12251215998 3661065408 3661281406
+36756000000 36757820894 12252000000 12252606964 3662065408 3662672372
+36759000000 36760821152 12253000000 12253607050 3663065408 3663672458
+36762000000 36763821257 12254000000 12254607085 3664065408 3664672493
+36765000000 36766821337 12255000000 12255607112 3665065408 3665672520
+36768000000 36769821484 12256000000 12256607161 3666065408 3666672569
+36771000000 36772821738 12257000000 12257607246 3667065408 3667672654
+36774000000 36775821828 12258000000 12258607276 3668065408 3668672684
+36777000000 36778822073 12259000000 12259607357 3669065408 3669672765
+36780000000 36781822151 12260000000 12260607383 3670065408 3670672791
+36783000000 36784822328 12261000000 12261607442 3671065408 3671672850
+36786000000 36787822474 12262000000 12262607491 3672065408 3672672899
+36789000000 36790822618 12263000000 12263607539 3673065408 3673672947
+36792000000 36792445272 12264000000 12264148424 3674065408 3674213832
+36795000000 36796822933 12265000000 12265607644 3675065408 3675673052
+36798000000 36799823093 12266000000 12266607697 3676065408 3676673105
+36801000000 36802823230 12267000000 12267607743 3677065408 3677673151
+36804000000 36805823388 12268000000 12268607796 3678065408 3678673204
+36807000000 36808823546 12269000000 12269607848 3679065408 3679673256
+36810000000 36811823660 12270000000 12270607886 3680065408 3680673294
+36813000000 36814823821 12271000000 12271607940 3681065408 3681673348
+36816000000 36817823948 12272000000 12272607982 3682065408 3682673390
+36819000000 36820824057 12273000000 12273608019 3683065408 3683673427
+36822000000 36823824199 12274000000 12274608066 3684065408 3684673474
+36825000000 36826824433 12275000000 12275608144 3685065408 3685673552
+36828000000 36829824346 12276000000 12276608115 3686065408 3686673523
+36831000000 36832824467 12277000000 12277608155 3687065408 3687673563
+36834000000 36835824575 12278000000 12278608191 3688065408 3688673599
+36837000000 36838824810 12279000000 12279608270 3689065408 3689673678
+36840000000 36841824989 12280000000 12280608329 3690065408 3690673737
+36843000000 36844738629 12281000000 12281579543 3691065408 3691644951
+36846000000 36847825258 12282000000 12282608419 3692065408 3692673827
+36849000000 36850825431 12283000000 12283608477 3693065408 3693673885
+36852000000 36853825547 12284000000 12284608515 3694065408 3694673923
+36855000000 36856825720 12285000000 12285608573 3695065408 3695673981
+36858000000 36859825892 12286000000 12286608630 3696065408 3696674038
+36861000000 36862825948 12287000000 12287608649 3697065408 3697674057
+36864000000 36865826094 12288000000 12288608698 3698065408 3698674106
+36867000000 36868826290 12289000000 12289608763 3699065408 3699674171
+36870000000 36871826319 12290000000 12290608773 3700065408 3700674181
+36873000000 36874826625 12291000000 12291608875 3701065408 3701674283
+36876000000 36877826797 12292000000 12292608932 3702065408 3702674340
+36879000000 36880826930 12293000000 12293608976 3703065408 3703674384
+36882000000 36883827047 12294000000 12294609015 3704065408 3704674423
+36885000000 36886827232 12295000000 12295609077 3705065408 3705674485
+36888000000 36889827338 12296000000 12296609112 3706065408 3706674520
+36891000000 36892827519 12297000000 12297609173 3707065408 3707674581
+36894000000 36895827731 12298000000 12298609243 3708065408 3708674651
+36897000000 36898827838 12299000000 12299609279 3709065408 3709674687
+36900000000 36901828004 12300000000 12300609334 3710065408 3710674742
+36903000000 36904426749 12301000000 12301475583 3711065408 3711540991
+36906000000 36907828275 12302000000 12302609425 3712065408 3712674833
+36909000000 36910828387 12303000000 12303609462 3713065408 3713674870
+36912000000 36913828596 12304000000 12304609532 3714065408 3714674940
+36915000000 36916828675 12305000000 12305609558 3715065408 3715674966
+36918000000 36919828900 12306000000 12306609633 3716065408 3716675041
+36921000000 36922829027 12307000000 12307609675 3717065408 3717675083
+36924000000 36925829116 12308000000 12308609705 3718065408 3718675113
+36927000000 36928829222 12309000000 12309609740 3719065408 3719675148
+36930000000 36931829433 12310000000 12310609811 3720065408 3720675219
+36933000000 36934829642 12311000000 12311609880 3721065408 3721675288
+36936000000 36937829787 12312000000 12312609929 3722065408 3722675337
+36939000000 36940829913 12313000000 12313609971 3723065408 3723675379
+36942000000 36943830079 12314000000 12314610026 3724065408 3724675434
+36945000000 36946830159 12315000000 12315610053 3725065408 3725675461
+36948000000 36949830394 12316000000 12316610131 3726065408 3726675539
+36951000000 36952830553 12317000000 12317610184 3727065408 3727675592
+36954000000 36955830674 12318000000 12318610224 3728065408 3728675632
+36957000000 36958830834 12319000000 12319610278 3729065408 3729675686
+36960000000 36961830917 12320000000 12320610305 3730065408 3730675713
+36963000000 36964831163 12321000000 12321610387 3731065408 3731675795
+36966000000 36967831286 12322000000 12322610428 3732065408 3732675836
+36969000000 36970831422 12323000000 12323610474 3733065408 3733675882
+36972000000 36973831597 12324000000 12324610532 3734065408 3734675940
+36975000000 36976831719 12325000000 12325610573 3735065408 3735675981
+36978000000 36979831869 12326000000 12326610623 3736065408 3736676031
+36981000000 36982832017 12327000000 12327610672 3737065408 3737676080
+36984000000 36985005711 12328000000 12328335237 3738065408 3738400645
+36987000000 36988832337 12329000000 12329610779 3739065408 3739676187
+36990000000 36991832469 12330000000 12330610823 3740065408 3740676231
+36993000000 36994832643 12331000000 12331610881 3741065408 3741676289
+36996000000 36997832762 12332000000 12332610920 3742065408 3742676328
+36999000000 37000832886 12333000000 12333610962 3743065408 3743676370
+37002000000 37003833105 12334000000 12334611035 3744065408 3744676443
+37005000000 37006833241 12335000000 12335611080 3745065408 3745676488
+37008000000 37009833392 12336000000 12336611130 3746065408 3746676538
+37011000000 37012833542 12337000000 12337611180 3747065408 3747676588
+37014000000 37015833657 12338000000 12338611219 3748065408 3748676627
+37017000000 37018833754 12339000000 12339611251 3749065408 3749676659
+37020000000 37021833962 12340000000 12340611320 3750065408 3750676728
+37023000000 37024834117 12341000000 12341611372 3751065408 3751676780
+37026000000 37027834276 12342000000 12342611425 3752065408 3752676833
+37029000000 37030834450 12343000000 12343611483 3753065408 3753676891
+37032000000 37033834550 12344000000 12344611516 3754065408 3754676924
+37035000000 37036834728 12345000000 12345611576 3755065408 3755676984
+37038000000 37039834877 12346000000 12346611625 3756065408 3756677033
+37041000000 37042835005 12347000000 12347611668 3757065408 3757677076
+37044000000 37045835174 12348000000 12348611724 3758065408 3758677132
+37047000000 37048835294 12349000000 12349611764 3759065408 3759677172
+37050000000 37050662644 12350000000 12350220881 3760065408 3760286289
+37053000000 37054835544 12351000000 12351611848 3761065408 3761677256
+37056000000 37057835802 12352000000 12352611934 3762065408 3762677342
+37059000000 37060835907 12353000000 12353611969 3763065408 3763677377
+37062000000 37063835987 12354000000 12354611995 3764065408 3764677403
+37065000000 37066836134 12355000000 12355612044 3765065408 3765677452
+37068000000 37069836388 12356000000 12356612129 3766065408 3766677537
+37071000000 37072836478 12357000000 12357612159 3767065408 3767677567
+37074000000 37075836723 12358000000 12358612241 3768065408 3768677649
+37077000000 37078836801 12359000000 12359612267 3769065408 3769677675
+37080000000 37081836978 12360000000 12360612326 3770065408 3770677734
+37083000000 37084837124 12361000000 12361612374 3771065408 3771677782
+37086000000 37087837268 12362000000 12362612422 3772065408 3772677830
+37089000000 37089459922 12363000000 12363153307 3773065408 3773218715
+37092000000 37093837583 12364000000 12364612527 3774065408 3774677935
+37095000000 37096837743 12365000000 12365612581 3775065408 3775677989
+37098000000 37099837880 12366000000 12366612626 3776065408 3776678034
+37101000000 37102838038 12367000000 12367612679 3777065408 3777678087
+37104000000 37105838196 12368000000 12368612732 3778065408 3778678140
+37107000000 37108838310 12369000000 12369612770 3779065408 3779678178
+37110000000 37111838471 12370000000 12370612823 3780065408 3780678231
+37113000000 37114838598 12371000000 12371612866 3781065408 3781678274
+37116000000 37117838707 12372000000 12372612902 3782065408 3782678310
+37119000000 37120838849 12373000000 12373612949 3783065408 3783678357
+37122000000 37123839083 12374000000 12374613027 3784065408 3784678435
+37125000000 37126838996 12375000000 12375612998 3785065408 3785678406
+37128000000 37129839117 12376000000 12376613039 3786065408 3786678447
+37131000000 37132839225 12377000000 12377613075 3787065408 3787678483
+37134000000 37135839460 12378000000 12378613153 3788065408 3788678561
+37137000000 37138839639 12379000000 12379613213 3789065408 3789678621
+37140000000 37141753279 12380000000 12380584426 3790065408 3790649834
+37143000000 37144839908 12381000000 12381613302 3791065408 3791678710
+37146000000 37147840081 12382000000 12382613360 3792065408 3792678768
+37149000000 37150840197 12383000000 12383613399 3793065408 3793678807
+37152000000 37153840370 12384000000 12384613456 3794065408 3794678864
+37155000000 37156840542 12385000000 12385613514 3795065408 3795678922
+37158000000 37159840598 12386000000 12386613532 3796065408 3796678940
+37161000000 37162840744 12387000000 12387613581 3797065408 3797678989
+37164000000 37165840940 12388000000 12388613646 3798065408 3798679054
+37167000000 37168840969 12389000000 12389613656 3799065408 3799679064
+37170000000 37171841275 12390000000 12390613758 3800065408 3800679166
+37173000000 37174841447 12391000000 12391613815 3801065408 3801679223
+37176000000 37177841580 12392000000 12392613860 3802065408 3802679268
+37179000000 37180841697 12393000000 12393613899 3803065408 3803679307
+37182000000 37183841882 12394000000 12394613960 3804065408 3804679368
+37185000000 37186841988 12395000000 12395613996 3805065408 3805679404
+37188000000 37189842169 12396000000 12396614056 3806065408 3806679464
+37191000000 37192842381 12397000000 12397614127 3807065408 3807679535
+37194000000 37195842488 12398000000 12398614162 3808065408 3808679570
+37197000000 37198842654 12399000000 12399614218 3809065408 3809679626
+37200000000 37201441399 12400000000 12400480466 3810065408 3810545874
+37203000000 37204842925 12401000000 12401614308 3811065408 3811679716
+37206000000 37207843037 12402000000 12402614345 3812065408 3812679753
+37209000000 37210843246 12403000000 12403614415 3813065408 3813679823
+37212000000 37213843325 12404000000 12404614441 3814065408 3814679849
+37215000000 37216843550 12405000000 12405614516 3815065408 3815679924
+37218000000 37219843677 12406000000 12406614559 3816065408 3816679967
+37221000000 37222843766 12407000000 12407614588 3817065408 3817679996
+37224000000 37225843872 12408000000 12408614624 3818065408 3818680032
+37227000000 37228844083 12409000000 12409614694 3819065408 3819680102
+37230000000 37231844292 12410000000 12410614764 3820065408 3820680172
+37233000000 37234844437 12411000000 12411614812 3821065408 3821680220
+37236000000 37237844563 12412000000 12412614854 3822065408 3822680262
+37239000000 37240844729 12413000000 12413614909 3823065408 3823680317
+37242000000 37243844809 12414000000 12414614936 3824065408 3824680344
+37245000000 37246845044 12415000000 12415615014 3825065408 3825680422
+37248000000 37249845203 12416000000 12416615067 3826065408 3826680475
+37251000000 37252845324 12417000000 12417615108 3827065408 3827680516
+37254000000 37255845484 12418000000 12418615161 3828065408 3828680569
+37257000000 37258845567 12419000000 12419615189 3829065408 3829680597
+37260000000 37261845813 12420000000 12420615271 3830065408 3830680679
+37263000000 37264845936 12421000000 12421615312 3831065408 3831680720
+37266000000 37267846072 12422000000 12422615357 3832065408 3832680765
+37269000000 37270846247 12423000000 12423615415 3833065408 3833680823
+37272000000 37273846369 12424000000 12424615456 3834065408 3834680864
+37275000000 37276846519 12425000000 12425615506 3835065408 3835680914
+37278000000 37279846667 12426000000 12426615555 3836065408 3836680963
+37281000000 37282020361 12427000000 12427340120 3837065408 3837405528
+37284000000 37285846987 12428000000 12428615662 3838065408 3838681070
+37287000000 37288847119 12429000000 12429615706 3839065408 3839681114
+37290000000 37291847293 12430000000 12430615764 3840065408 3840681172
+37293000000 37294847412 12431000000 12431615804 3841065408 3841681212
+37296000000 37297847536 12432000000 12432615845 3842065408 3842681253
+37299000000 37300847755 12433000000 12433615918 3843065408 3843681326
+37302000000 37303847891 12434000000 12434615963 3844065408 3844681371
+37305000000 37306848042 12435000000 12435616014 3845065408 3845681422
+37308000000 37309848192 12436000000 12436616064 3846065408 3846681472
+37311000000 37312848307 12437000000 12437616102 3847065408 3847681510
+37314000000 37315848404 12438000000 12438616134 3848065408 3848681542
+37317000000 37318848612 12439000000 12439616204 3849065408 3849681612
+37320000000 37321848767 12440000000 12440616255 3850065408 3850681663
+37323000000 37324848926 12441000000 12441616308 3851065408 3851681716
+37326000000 37327849100 12442000000 12442616366 3852065408 3852681774
+37329000000 37330849200 12443000000 12443616400 3853065408 3853681808
+37332000000 37333849378 12444000000 12444616459 3854065408 3854681867
+37335000000 37336849527 12445000000 12445616509 3855065408 3855681917
+37338000000 37339849655 12446000000 12446616551 3856065408 3856681959
+37341000000 37342849824 12447000000 12447616608 3857065408 3857682016
+37344000000 37345849944 12448000000 12448616648 3858065408 3858682056
+37347000000 37347677294 12449000000 12449225764 3859065408 3859291172
+37350000000 37351850194 12450000000 12450616731 3860065408 3860682139
+37353000000 37354850452 12451000000 12451616817 3861065408 3861682225
+37356000000 37357850557 12452000000 12452616852 3862065408 3862682260
+37359000000 37360850637 12453000000 12453616879 3863065408 3863682287
+37362000000 37363850784 12454000000 12454616928 3864065408 3864682336
+37365000000 37366851038 12455000000 12455617012 3865065408 3865682420
+37368000000 37369851128 12456000000 12456617042 3866065408 3866682450
+37371000000 37372851373 12457000000 12457617124 3867065408 3867682532
+37374000000 37375851451 12458000000 12458617150 3868065408 3868682558
+37377000000 37378851628 12459000000 12459617209 3869065408 3869682617
+37380000000 37381851774 12460000000 12460617258 3870065408 3870682666
+37383000000 37384851918 12461000000 12461617306 3871065408 3871682714
+37386000000 37386474572 12462000000 12462158190 3872065408 3872223598
+37389000000 37390852233 12463000000 12463617411 3873065408 3873682819
+37392000000 37393852393 12464000000 12464617464 3874065408 3874682872
+37395000000 37396852530 12465000000 12465617510 3875065408 3875682918
+37398000000 37399852688 12466000000 12466617562 3876065408 3876682970
+37401000000 37402852846 12467000000 12467617615 3877065408 3877683023
+37404000000 37405852960 12468000000 12468617653 3878065408 3878683061
+37407000000 37408853121 12469000000 12469617707 3879065408 3879683115
+37410000000 37411853248 12470000000 12470617749 3880065408 3880683157
+37413000000 37414853357 12471000000 12471617785 3881065408 3881683193
+37416000000 37417853499 12472000000 12472617833 3882065408 3882683241
+37419000000 37420853733 12473000000 12473617911 3883065408 3883683319
+37422000000 37423853646 12474000000 12474617882 3884065408 3884683290
+37425000000 37426853767 12475000000 12475617922 3885065408 3885683330
+37428000000 37429853875 12476000000 12476617958 3886065408 3886683366
+37431000000 37432854110 12477000000 12477618036 3887065408 3887683444
+37434000000 37435854289 12478000000 12478618096 3888065408 3888683504
+37437000000 37438767929 12479000000 12479589309 3889065408 3889654717
+37440000000 37441854558 12480000000 12480618186 3890065408 3890683594
+37443000000 37444854731 12481000000 12481618243 3891065408 3891683651
+37446000000 37447854847 12482000000 12482618282 3892065408 3892683690
+37449000000 37450855020 12483000000 12483618340 3893065408 3893683748
+37452000000 37453855192 12484000000 12484618397 3894065408 3894683805
+37455000000 37456855248 12485000000 12485618416 3895065408 3895683824
+37458000000 37459855394 12486000000 12486618464 3896065408 3896683872
+37461000000 37462855590 12487000000 12487618530 3897065408 3897683938
+37464000000 37465855619 12488000000 12488618539 3898065408 3898683947
+37467000000 37468855925 12489000000 12489618641 3899065408 3899684049
+37470000000 37471856097 12490000000 12490618699 3900065408 3900684107
+37473000000 37474856230 12491000000 12491618743 3901065408 3901684151
+37476000000 37477856347 12492000000 12492618782 3902065408 3902684190
+37479000000 37480856532 12493000000 12493618844 3903065408 3903684252
+37482000000 37483856638 12494000000 12494618879 3904065408 3904684287
+37485000000 37486856819 12495000000 12495618939 3905065408 3905684347
+37488000000 37489857031 12496000000 12496619010 3906065408 3906684418
+37491000000 37492857138 12497000000 12497619046 3907065408 3907684454
+37494000000 37495857304 12498000000 12498619101 3908065408 3908684509
+37497000000 37498456049 12499000000 12499485349 3909065408 3909550757
+37500000000 37501857575 12500000000 12500619191 3910065408 3910684599
+37503000000 37504857687 12501000000 12501619229 3911065408 3911684637
+37506000000 37507857896 12502000000 12502619298 3912065408 3912684706
+37509000000 37510857975 12503000000 12503619325 3913065408 3913684733
+37512000000 37513858200 12504000000 12504619400 3914065408 3914684808
+37515000000 37516858327 12505000000 12505619442 3915065408 3915684850
+37518000000 37519858416 12506000000 12506619472 3916065408 3916684880
+37521000000 37522858522 12507000000 12507619507 3917065408 3917684915
+37524000000 37525858733 12508000000 12508619577 3918065408 3918684985
+37527000000 37528858942 12509000000 12509619647 3919065408 3919685055
+37530000000 37531859087 12510000000 12510619695 3920065408 3920685103
+37533000000 37534859213 12511000000 12511619737 3921065408 3921685145
+37536000000 37537859379 12512000000 12512619793 3922065408 3922685201
+37539000000 37540859459 12513000000 12513619819 3923065408 3923685227
+37542000000 37543859694 12514000000 12514619898 3924065408 3924685306
+37545000000 37546859853 12515000000 12515619951 3925065408 3925685359
+37548000000 37549859974 12516000000 12516619991 3926065408 3926685399
+37551000000 37552860134 12517000000 12517620044 3927065408 3927685452
+37554000000 37555860217 12518000000 12518620072 3928065408 3928685480
+37557000000 37558860463 12519000000 12519620154 3929065408 3929685562
+37560000000 37561860586 12520000000 12520620195 3930065408 3930685603
+37563000000 37564860722 12521000000 12521620240 3931065408 3931685648
+37566000000 37567860897 12522000000 12522620299 3932065408 3932685707
+37569000000 37570861019 12523000000 12523620339 3933065408 3933685747
+37572000000 37573861169 12524000000 12524620389 3934065408 3934685797
+37575000000 37576861317 12525000000 12525620439 3935065408 3935685847
+37578000000 37579035011 12526000000 12526345003 3936065408 3936410411
+37581000000 37582861637 12527000000 12527620545 3937065408 3937685953
+37584000000 37585861769 12528000000 12528620589 3938065408 3938685997
+37587000000 37588861943 12529000000 12529620647 3939065408 3939686055
+37590000000 37591862062 12530000000 12530620687 3940065408 3940686095
+37593000000 37594862186 12531000000 12531620728 3941065408 3941686136
+37596000000 37597862405 12532000000 12532620801 3942065408 3942686209
+37599000000 37600862541 12533000000 12533620847 3943065408 3943686255
+37602000000 37603862692 12534000000 12534620897 3944065408 3944686305
+37605000000 37606862842 12535000000 12535620947 3945065408 3945686355
+37608000000 37609862957 12536000000 12536620985 3946065408 3946686393
+37611000000 37612863054 12537000000 12537621018 3947065408 3947686426
+37614000000 37615863262 12538000000 12538621087 3948065408 3948686495
+37617000000 37618863417 12539000000 12539621139 3949065408 3949686547
+37620000000 37621863576 12540000000 12540621192 3950065408 3950686600
+37623000000 37624863750 12541000000 12541621250 3951065408 3951686658
+37626000000 37627863850 12542000000 12542621283 3952065408 3952686691
+37629000000 37630864028 12543000000 12543621342 3953065408 3953686750
+37632000000 37633864177 12544000000 12544621392 3954065408 3954686800
+37635000000 37636864305 12545000000 12545621435 3955065408 3955686843
+37638000000 37639864474 12546000000 12546621491 3956065408 3956686899
+37641000000 37642864594 12547000000 12547621531 3957065408 3957686939
+37644000000 37644691944 12548000000 12548230648 3958065408 3958296056
+37647000000 37648864844 12549000000 12549621614 3959065408 3959687022
+37650000000 37651865102 12550000000 12550621700 3960065408 3960687108
+37653000000 37654865207 12551000000 12551621735 3961065408 3961687143
+37656000000 37657865287 12552000000 12552621762 3962065408 3962687170
+37659000000 37660865434 12553000000 12553621811 3963065408 3963687219
+37662000000 37663865688 12554000000 12554621896 3964065408 3964687304
+37665000000 37666865778 12555000000 12555621926 3965065408 3965687334
+37668000000 37669866023 12556000000 12556622007 3966065408 3966687415
+37671000000 37672866101 12557000000 12557622033 3967065408 3967687441
+37674000000 37675866278 12558000000 12558622092 3968065408 3968687500
+37677000000 37678866424 12559000000 12559622141 3969065408 3969687549
+37680000000 37681866568 12560000000 12560622189 3970065408 3970687597
+37683000000 37683489222 12561000000 12561163074 3971065408 3971228482
+37686000000 37687866883 12562000000 12562622294 3972065408 3972687702
+37689000000 37690867043 12563000000 12563622347 3973065408 3973687755
+37692000000 37693867180 12564000000 12564622393 3974065408 3974687801
+37695000000 37696867338 12565000000 12565622446 3975065408 3975687854
+37698000000 37699867496 12566000000 12566622498 3976065408 3976687906
+37701000000 37702867610 12567000000 12567622536 3977065408 3977687944
+37704000000 37705867771 12568000000 12568622590 3978065408 3978687998
+37707000000 37708867898 12569000000 12569622632 3979065408 3979688040
+37710000000 37711868007 12570000000 12570622669 3980065408 3980688077
+37713000000 37714868149 12571000000 12571622716 3981065408 3981688124
+37716000000 37717868383 12572000000 12572622794 3982065408 3982688202
+37719000000 37720868296 12573000000 12573622765 3983065408 3983688173
+37722000000 37723868417 12574000000 12574622805 3984065408 3984688213
+37725000000 37726868525 12575000000 12575622841 3985065408 3985688249
+37728000000 37729868760 12576000000 12576622920 3986065408 3986688328
+37731000000 37732868939 12577000000 12577622979 3987065408 3987688387
+37734000000 37735782579 12578000000 12578594193 3988065408 3988659601
+37737000000 37738869208 12579000000 12579623069 3989065408 3989688477
+37740000000 37741869381 12580000000 12580623127 3990065408 3990688535
+37743000000 37744869497 12581000000 12581623165 3991065408 3991688573
+37746000000 37747869670 12582000000 12582623223 3992065408 3992688631
+37749000000 37750869842 12583000000 12583623280 3993065408 3993688688
+37752000000 37753869898 12584000000 12584623299 3994065408 3994688707
+37755000000 37756870044 12585000000 12585623348 3995065408 3995688756
+37758000000 37759870240 12586000000 12586623413 3996065408 3996688821
+37761000000 37762870269 12587000000 12587623423 3997065408 3997688831
+37764000000 37765870575 12588000000 12588623525 3998065408 3998688933
+37767000000 37768870747 12589000000 12589623582 3999065408 3999688990
+37770000000 37771870880 12590000000 12590623626 4000065408 4000689034
+37773000000 37774870997 12591000000 12591623665 4001065408 4001689073
+37776000000 37777871182 12592000000 12592623727 4002065408 4002689135
+37779000000 37780871288 12593000000 12593623762 4003065408 4003689170
+37782000000 37783871469 12594000000 12594623823 4004065408 4004689231
+37785000000 37786871681 12595000000 12595623893 4005065408 4005689301
+37788000000 37789871788 12596000000 12596623929 4006065408 4006689337
+37791000000 37792871954 12597000000 12597623984 4007065408 4007689392
+37794000000 37795470699 12598000000 12598490233 4008065408 4008555641
+37797000000 37798872225 12599000000 12599624075 4009065408 4009689483
+37800000000 37801872337 12600000000 12600624112 4010065408 4010689520
+37803000000 37804872546 12601000000 12601624182 4011065408 4011689590
+37806000000 37807872625 12602000000 12602624208 4012065408 4012689616
+37809000000 37810872850 12603000000 12603624283 4013065408 4013689691
+37812000000 37813872977 12604000000 12604624325 4014065408 4014689733
+37815000000 37816873066 12605000000 12605624355 4015065408 4015689763
+37818000000 37819873172 12606000000 12606624390 4016065408 4016689798
+37821000000 37822873383 12607000000 12607624461 4017065408 4017689869
+37824000000 37825873592 12608000000 12608624530 4018065408 4018689938
+37827000000 37828873737 12609000000 12609624579 4019065408 4019689987
+37830000000 37831873863 12610000000 12610624621 4020065408 4020690029
+37833000000 37834874029 12611000000 12611624676 4021065408 4021690084
+37836000000 37837874109 12612000000 12612624703 4022065408 4022690111
+37839000000 37840874344 12613000000 12613624781 4023065408 4023690189
+37842000000 37843874503 12614000000 12614624834 4024065408 4024690242
+37845000000 37846874624 12615000000 12615624874 4025065408 4025690282
+37848000000 37849874784 12616000000 12616624928 4026065408 4026690336
+37851000000 37852874867 12617000000 12617624955 4027065408 4027690363
+37854000000 37855875113 12618000000 12618625037 4028065408 4028690445
+37857000000 37858875236 12619000000 12619625078 4029065408 4029690486
+37860000000 37861875372 12620000000 12620625124 4030065408 4030690532
+37863000000 37864875547 12621000000 12621625182 4031065408 4031690590
+37866000000 37867875669 12622000000 12622625223 4032065408 4032690631
+37869000000 37870875819 12623000000 12623625273 4033065408 4033690681
+37872000000 37873875967 12624000000 12624625322 4034065408 4034690730
+37875000000 37876049661 12625000000 12625349887 4035065408 4035415295
+37878000000 37879876287 12626000000 12626625429 4036065408 4036690837
+37881000000 37882876419 12627000000 12627625473 4037065408 4037690881
+37884000000 37885876593 12628000000 12628625531 4038065408 4038690939
+37887000000 37888876712 12629000000 12629625570 4039065408 4039690978
+37890000000 37891876836 12630000000 12630625612 4040065408 4040691020
+37893000000 37894877055 12631000000 12631625685 4041065408 4041691093
+37896000000 37897877191 12632000000 12632625730 4042065408 4042691138
+37899000000 37900877342 12633000000 12633625780 4043065408 4043691188
+37902000000 37903877492 12634000000 12634625830 4044065408 4044691238
+37905000000 37906877607 12635000000 12635625869 4045065408 4045691277
+37908000000 37909877704 12636000000 12636625901 4046065408 4046691309
+37911000000 37912877912 12637000000 12637625970 4047065408 4047691378
+37914000000 37915878067 12638000000 12638626022 4048065408 4048691430
+37917000000 37918878226 12639000000 12639626075 4049065408 4049691483
+37920000000 37921878400 12640000000 12640626133 4050065408 4050691541
+37923000000 37924878500 12641000000 12641626166 4051065408 4051691574
+37926000000 37927878678 12642000000 12642626226 4052065408 4052691634
+37929000000 37930878827 12643000000 12643626275 4053065408 4053691683
+37932000000 37933878955 12644000000 12644626318 4054065408 4054691726
+37935000000 37936879124 12645000000 12645626374 4055065408 4055691782
+37938000000 37939879244 12646000000 12646626414 4056065408 4056691822
+37941000000 37941706594 12647000000 12647235531 4057065408 4057300939
+37944000000 37945879494 12648000000 12648626498 4058065408 4058691906
+37947000000 37948879752 12649000000 12649626584 4059065408 4059691992
+37950000000 37951879857 12650000000 12650626619 4060065408 4060692027
+37953000000 37954879937 12651000000 12651626645 4061065408 4061692053
+37956000000 37957880084 12652000000 12652626694 4062065408 4062692102
+37959000000 37960880338 12653000000 12653626779 4063065408 4063692187
+37962000000 37963880428 12654000000 12654626809 4064065408 4064692217
+37965000000 37966880673 12655000000 12655626891 4065065408 4065692299
+37968000000 37969880751 12656000000 12656626917 4066065408 4066692325
+37971000000 37972880928 12657000000 12657626976 4067065408 4067692384
+37974000000 37975881074 12658000000 12658627024 4068065408 4068692432
+37977000000 37978881218 12659000000 12659627072 4069065408 4069692480
+37980000000 37980503872 12660000000 12660167957 4070065408 4070233365
+37983000000 37984881533 12661000000 12661627177 4071065408 4071692585
+37986000000 37987881693 12662000000 12662627231 4072065408 4072692639
+37989000000 37990881830 12663000000 12663627276 4073065408 4073692684
+37992000000 37993881988 12664000000 12664627329 4074065408 4074692737
+37995000000 37996882146 12665000000 12665627382 4075065408 4075692790
+37998000000 37999882260 12666000000 12666627420 4076065408 4076692828
+38001000000 38002882421 12667000000 12667627473 4077065408 4077692881
+38004000000 38005882548 12668000000 12668627516 4078065408 4078692924
+38007000000 38008882657 12669000000 12669627552 4079065408 4079692960
+38010000000 38011882799 12670000000 12670627599 4080065408 4080693007
+38013000000 38014883033 12671000000 12671627677 4081065408 4081693085
+38016000000 38017882946 12672000000 12672627648 4082065408 4082693056
+38019000000 38020883067 12673000000 12673627689 4083065408 4083693097
+38022000000 38023883175 12674000000 12674627725 4084065408 4084693133
+38025000000 38026883410 12675000000 12675627803 4085065408 4085693211
+38028000000 38029883589 12676000000 12676627863 4086065408 4086693271
+38031000000 38032797229 12677000000 12677599076 4087065408 4087664484
+38034000000 38035883858 12678000000 12678627952 4088065408 4088693360
+38037000000 38038884031 12679000000 12679628010 4089065408 4089693418
+38040000000 38041884147 12680000000 12680628049 4090065408 4090693457
+38043000000 38044884320 12681000000 12681628106 4091065408 4091693514
+38046000000 38047884492 12682000000 12682628164 4092065408 4092693572
+38049000000 38050884548 12683000000 12683628182 4093065408 4093693590
+38052000000 38053884694 12684000000 12684628231 4094065408 4094693639
+38055000000 38056884890 12685000000 12685628296 4095065408 4095693704
+38058000000 38059884919 12686000000 12686628306 4096065408 4096693714
+38061000000 38062885225 12687000000 12687628408 4097065408 4097693816
+38064000000 38065885397 12688000000 12688628465 4098065408 4098693873
+38067000000 38068885530 12689000000 12689628510 4099065408 4099693918
+38070000000 38071885647 12690000000 12690628549 4100065408 4100693957
+38073000000 38074885832 12691000000 12691628610 4101065408 4101694018
+38076000000 38077885938 12692000000 12692628646 4102065408 4102694054
+38079000000 38080886119 12693000000 12693628706 4103065408 4103694114
+38082000000 38083886331 12694000000 12694628777 4104065408 4104694185
+38085000000 38086886438 12695000000 12695628812 4105065408 4105694220
+38088000000 38089886604 12696000000 12696628868 4106065408 4106694276
+38091000000 38092485349 12697000000 12697495116 4107065408 4107560524
+38094000000 38095886875 12698000000 12698628958 4108065408 4108694366
+38097000000 38098886987 12699000000 12699628995 4109065408 4109694403
+38100000000 38101887196 12700000000 12700629065 4110065408 4110694473
+38103000000 38104887275 12701000000 12701629091 4111065408 4111694499
+38106000000 38107887500 12702000000 12702629166 4112065408 4112694574
+38109000000 38110887627 12703000000 12703629209 4113065408 4113694617
+38112000000 38113887716 12704000000 12704629238 4114065408 4114694646
+38115000000 38116887822 12705000000 12705629274 4115065408 4115694682
+38118000000 38119888033 12706000000 12706629344 4116065408 4116694752
+38121000000 38122888242 12707000000 12707629414 4117065408 4117694822
+38124000000 38125888387 12708000000 12708629462 4118065408 4118694870
+38127000000 38128888513 12709000000 12709629504 4119065408 4119694912
+38130000000 38131888679 12710000000 12710629559 4120065408 4120694967
+38133000000 38134888759 12711000000 12711629586 4121065408 4121694994
+38136000000 38137888994 12712000000 12712629664 4122065408 4122695072
+38139000000 38140889153 12713000000 12713629717 4123065408 4123695125
+38142000000 38143889274 12714000000 12714629758 4124065408 4124695166
+38145000000 38146889434 12715000000 12715629811 4125065408 4125695219
+38148000000 38149889517 12716000000 12716629839 4126065408 4126695247
+38151000000 38152889763 12717000000 12717629921 4127065408 4127695329
+38154000000 38155889886 12718000000 12718629962 4128065408 4128695370
+38157000000 38158890022 12719000000 12719630007 4129065408 4129695415
+38160000000 38161890197 12720000000 12720630065 4130065408 4130695473
+38163000000 38164890319 12721000000 12721630106 4131065408 4131695514
+38166000000 38167890469 12722000000 12722630156 4132065408 4132695564
+38169000000 38170890617 12723000000 12723630205 4133065408 4133695613
+38172000000 38173064311 12724000000 12724354770 4134065408 4134420178
+38175000000 38176890937 12725000000 12725630312 4135065408 4135695720
+38178000000 38179891069 12726000000 12726630356 4136065408 4136695764
+38181000000 38182891243 12727000000 12727630414 4137065408 4137695822
+38184000000 38185891362 12728000000 12728630454 4138065408 4138695862
+38187000000 38188891486 12729000000 12729630495 4139065408 4139695903
+38190000000 38191891705 12730000000 12730630568 4140065408 4140695976
+38193000000 38194891841 12731000000 12731630613 4141065408 4141696021
+38196000000 38197891992 12732000000 12732630664 4142065408 4142696072
+38199000000 38200892142 12733000000 12733630714 4143065408 4143696122
+38202000000 38203892257 12734000000 12734630752 4144065408 4144696160
+38205000000 38206892354 12735000000 12735630784 4145065408 4145696192
+38208000000 38209892562 12736000000 12736630854 4146065408 4146696262
+38211000000 38212892717 12737000000 12737630905 4147065408 4147696313
+38214000000 38215892876 12738000000 12738630958 4148065408 4148696366
+38217000000 38218893050 12739000000 12739631016 4149065408 4149696424
+38220000000 38221893150 12740000000 12740631050 4150065408 4150696458
+38223000000 38224893328 12741000000 12741631109 4151065408 4151696517
+38226000000 38227893477 12742000000 12742631159 4152065408 4152696567
+38229000000 38230893605 12743000000 12743631201 4153065408 4153696609
+38232000000 38233893774 12744000000 12744631258 4154065408 4154696666
+38235000000 38236893894 12745000000 12745631298 4155065408 4155696706
+38238000000 38238721244 12746000000 12746240414 4156065408 4156305822
+38241000000 38242894144 12747000000 12747631381 4157065408 4157696789
+38244000000 38245894402 12748000000 12748631467 4158065408 4158696875
+38247000000 38248894507 12749000000 12749631502 4159065408 4159696910
+38250000000 38251894587 12750000000 12750631529 4160065408 4160696937
+38253000000 38254894734 12751000000 12751631578 4161065408 4161696986
+38256000000 38257894988 12752000000 12752631662 4162065408 4162697070
+38259000000 38260895078 12753000000 12753631692 4163065408 4163697100
+38262000000 38263895323 12754000000 12754631774 4164065408 4164697182
+38265000000 38266895401 12755000000 12755631800 4165065408 4165697208
+38268000000 38269895578 12756000000 12756631859 4166065408 4166697267
+38271000000 38272895724 12757000000 12757631908 4167065408 4167697316
+38274000000 38275895868 12758000000 12758631956 4168065408 4168697364
+38277000000 38277518522 12759000000 12759172840 4169065408 4169238248
+38280000000 38281896183 12760000000 12760632061 4170065408 4170697469
+38283000000 38284896343 12761000000 12761632114 4171065408 4171697522
+38286000000 38287896480 12762000000 12762632160 4172065408 4172697568
+38289000000 38290896638 12763000000 12763632212 4173065408 4173697620
+38292000000 38293896796 12764000000 12764632265 4174065408 4174697673
+38295000000 38296896910 12765000000 12765632303 4175065408 4175697711
+38298000000 38299897071 12766000000 12766632357 4176065408 4176697765
+38301000000 38302897198 12767000000 12767632399 4177065408 4177697807
+38304000000 38305897307 12768000000 12768632435 4178065408 4178697843
+38307000000 38308897449 12769000000 12769632483 4179065408 4179697891
+38310000000 38311897683 12770000000 12770632561 4180065408 4180697969
+38313000000 38314897596 12771000000 12771632532 4181065408 4181697940
+38316000000 38317897717 12772000000 12772632572 4182065408 4182697980
+38319000000 38320897825 12773000000 12773632608 4183065408 4183698016
+38322000000 38323898060 12774000000 12774632686 4184065408 4184698094
+38325000000 38326898239 12775000000 12775632746 4185065408 4185698154
+38328000000 38329811879 12776000000 12776603959 4186065408 4186669367
+38331000000 38332898508 12777000000 12777632836 4187065408 4187698244
+38334000000 38335898681 12778000000 12778632893 4188065408 4188698301
+38337000000 38338898797 12779000000 12779632932 4189065408 4189698340
+38340000000 38341898970 12780000000 12780632990 4190065408 4190698398
+38343000000 38344899142 12781000000 12781633047 4191065408 4191698455
+38346000000 38347899198 12782000000 12782633066 4192065408 4192698474
+38349000000 38350899344 12783000000 12783633114 4193065408 4193698522
+38352000000 38353899540 12784000000 12784633180 4194065408 4194698588
+38355000000 38356899569 12785000000 12785633189 4195065408 4195698597
+38358000000 38359899875 12786000000 12786633291 4196065408 4196698699
+38361000000 38362900047 12787000000 12787633349 4197065408 4197698757
+38364000000 38365900180 12788000000 12788633393 4198065408 4198698801
+38367000000 38368900297 12789000000 12789633432 4199065408 4199698840
+38370000000 38371900482 12790000000 12790633494 4200065408 4200698902
+38373000000 38374900588 12791000000 12791633529 4201065408 4201698937
+38376000000 38377900769 12792000000 12792633589 4202065408 4202698997
+38379000000 38380900981 12793000000 12793633660 4203065408 4203699068
+38382000000 38383901088 12794000000 12794633696 4204065408 4204699104
+38385000000 38386901254 12795000000 12795633751 4205065408 4205699159
+38388000000 38389499999 12796000000 12796499999 4206065408 4206565407
+38391000000 38392901525 12797000000 12797633841 4207065408 4207699249
+38394000000 38395901637 12798000000 12798633879 4208065408 4208699287
+38397000000 38398901846 12799000000 12799633948 4209065408 4209699356
+38400000000 38401901925 12800000000 12800633975 4210065408 4210699383
+38403000000 38404902150 12801000000 12801634050 4211065408 4211699458
+38406000000 38407902277 12802000000 12802634092 4212065408 4212699500
+38409000000 38410902366 12803000000 12803634122 4213065408 4213699530
+38412000000 38413902472 12804000000 12804634157 4214065408 4214699565
+38415000000 38416902683 12805000000 12805634227 4215065408 4215699635
+38418000000 38419902892 12806000000 12806634297 4216065408 4216699705
+38421000000 38422903037 12807000000 12807634345 4217065408 4217699753
+38424000000 38425903163 12808000000 12808634387 4218065408 4218699795
+38427000000 38428903329 12809000000 12809634443 4219065408 4219699851
+38430000000 38431903409 12810000000 12810634469 4220065408 4220699877
+38433000000 38434903644 12811000000 12811634548 4221065408 4221699956
+38436000000 38437903803 12812000000 12812634601 4222065408 4222700009
+38439000000 38440903924 12813000000 12813634641 4223065408 4223700049
+38442000000 38443904084 12814000000 12814634694 4224065408 4224700102
+38445000000 38446904167 12815000000 12815634722 4225065408 4225700130
+38448000000 38449904413 12816000000 12816634804 4226065408 4226700212
+38451000000 38452904536 12817000000 12817634845 4227065408 4227700253
+38454000000 38455904672 12818000000 12818634890 4228065408 4228700298
+38457000000 38458904847 12819000000 12819634949 4229065408 4229700357
+38460000000 38461904969 12820000000 12820634989 4230065408 4230700397
+38463000000 38464905119 12821000000 12821635039 4231065408 4231700447
+38466000000 38467905267 12822000000 12822635089 4232065408 4232700497
+38469000000 38470078961 12823000000 12823359653 4233065408 4233425061
+38472000000 38473905587 12824000000 12824635195 4234065408 4234700603
+38475000000 38476905719 12825000000 12825635239 4235065408 4235700647
+38478000000 38479905893 12826000000 12826635297 4236065408 4236700705
+38481000000 38482906012 12827000000 12827635337 4237065408 4237700745
+38484000000 38485906136 12828000000 12828635378 4238065408 4238700786
+38487000000 38488906355 12829000000 12829635451 4239065408 4239700859
+38490000000 38491906491 12830000000 12830635497 4240065408 4240700905
+38493000000 38494906642 12831000000 12831635547 4241065408 4241700955
+38496000000 38497906792 12832000000 12832635597 4242065408 4242701005
+38499000000 38500906907 12833000000 12833635635 4243065408 4243701043
+38502000000 38503907004 12834000000 12834635668 4244065408 4244701076
+38505000000 38506907212 12835000000 12835635737 4245065408 4245701145
+38508000000 38509907367 12836000000 12836635789 4246065408 4246701197
+38511000000 38512907526 12837000000 12837635842 4247065408 4247701250
+38514000000 38515907700 12838000000 12838635900 4248065408 4248701308
+38517000000 38518907800 12839000000 12839635933 4249065408 4249701341
+38520000000 38521907978 12840000000 12840635992 4250065408 4250701400
+38523000000 38524908127 12841000000 12841636042 4251065408 4251701450
+38526000000 38527908255 12842000000 12842636085 4252065408 4252701493
+38529000000 38530908424 12843000000 12843636141 4253065408 4253701549
+38532000000 38533908544 12844000000 12844636181 4254065408 4254701589
+38535000000 38535735894 12845000000 12845245298 4255065408 4255310706
+38538000000 38539908794 12846000000 12846636264 4256065408 4256701672
+38541000000 38542909052 12847000000 12847636350 4257065408 4257701758
+38544000000 38545909157 12848000000 12848636385 4258065408 4258701793
+38547000000 38548909237 12849000000 12849636412 4259065408 4259701820
+38550000000 38551909384 12850000000 12850636461 4260065408 4260701869
+38553000000 38554909638 12851000000 12851636546 4261065408 4261701954
+38556000000 38557909728 12852000000 12852636576 4262065408 4262701984
+38559000000 38560909973 12853000000 12853636657 4263065408 4263702065
+38562000000 38563910051 12854000000 12854636683 4264065408 4264702091
+38565000000 38566910228 12855000000 12855636742 4265065408 4265702150
+38568000000 38569910374 12856000000 12856636791 4266065408 4266702199
+38571000000 38572910518 12857000000 12857636839 4267065408 4267702247
+38574000000 38574533172 12858000000 12858177724 4268065408 4268243132
+38577000000 38578910833 12859000000 12859636944 4269065408 4269702352
+38580000000 38581910993 12860000000 12860636997 4270065408 4270702405
+38583000000 38584911130 12861000000 12861637043 4271065408 4271702451
+38586000000 38587911288 12862000000 12862637096 4272065408 4272702504
+38589000000 38590911446 12863000000 12863637148 4273065408 4273702556
+38592000000 38593911560 12864000000 12864637186 4274065408 4274702594
+38595000000 38596911721 12865000000 12865637240 4275065408 4275702648
+38598000000 38599911848 12866000000 12866637282 4276065408 4276702690
+38601000000 38602911957 12867000000 12867637319 4277065408 4277702727
+38604000000 38605912099 12868000000 12868637366 4278065408 4278702774
+38607000000 38608912333 12869000000 12869637444 4279065408 4279702852
+38610000000 38611912246 12870000000 12870637415 4280065408 4280702823
+38613000000 38614912367 12871000000 12871637455 4281065408 4281702863
+38616000000 38617912475 12872000000 12872637491 4282065408 4282702899
+38619000000 38620912710 12873000000 12873637570 4283065408 4283702978
+38622000000 38623912889 12874000000 12874637629 4284065408 4284703037
+38625000000 38626826529 12875000000 12875608843 4285065408 4285674251
+38628000000 38629913158 12876000000 12876637719 4286065408 4286703127
+38631000000 38632913331 12877000000 12877637777 4287065408 4287703185
+38634000000 38635913447 12878000000 12878637815 4288065408 4288703223
+38637000000 38638913620 12879000000 12879637873 4289065408 4289703281
+38640000000 38641913792 12880000000 12880637930 4290065408 4290703338
+38643000000 38644913848 12881000000 12881637949 4291065408 4291703357
+38646000000 38647913994 12882000000 12882637998 4292065408 4292703406
+38649000000 38650914190 12883000000 12883638063 4293065408 4293703471
+38652000000 38653914219 12884000000 12884638073 4294065408 4294703481
+38655000000 38656914525 12885000000 12885638175 98112 736287
+38658000000 38659914697 12886000000 12886638232 1098112 1736344
+38661000000 38662914830 12887000000 12887638276 2098112 2736388
+38664000000 38665914947 12888000000 12888638315 3098112 3736427
+38667000000 38668915132 12889000000 12889638377 4098112 4736489
+38670000000 38671915238 12890000000 12890638412 5098112 5736524
+38673000000 38674915419 12891000000 12891638473 6098112 6736585
+38676000000 38677915631 12892000000 12892638543 7098112 7736655
+38679000000 38680915738 12893000000 12893638579 8098112 8736691
+38682000000 38683915904 12894000000 12894638634 9098112 9736746
+38685000000 38686514649 12895000000 12895504883 10098112 10602995
+38688000000 38689916175 12896000000 12896638725 11098112 11736837
+38691000000 38692916287 12897000000 12897638762 12098112 12736874
+38694000000 38695916496 12898000000 12898638832 13098112 13736944
+38697000000 38698916575 12899000000 12899638858 14098112 14736970
+38700000000 38701916800 12900000000 12900638933 15098112 15737045
+38703000000 38704916927 12901000000 12901638975 16098112 16737087
+38706000000 38707917016 12902000000 12902639005 17098112 17737117
+38709000000 38710917122 12903000000 12903639040 18098112 18737152
+38712000000 38713917333 12904000000 12904639111 19098112 19737223
+38715000000 38716917542 12905000000 12905639180 20098112 20737292
+38718000000 38719917687 12906000000 12906639229 21098112 21737341
+38721000000 38722917813 12907000000 12907639271 22098112 22737383
+38724000000 38725917979 12908000000 12908639326 23098112 23737438
+38727000000 38728918059 12909000000 12909639353 24098112 24737465
+38730000000 38731918294 12910000000 12910639431 25098112 25737543
+38733000000 38734918453 12911000000 12911639484 26098112 26737596
+38736000000 38737918574 12912000000 12912639524 27098112 27737636
+38739000000 38740918734 12913000000 12913639578 28098112 28737690
+38742000000 38743918817 12914000000 12914639605 29098112 29737717
+38745000000 38746919063 12915000000 12915639687 30098112 30737799
+38748000000 38749919186 12916000000 12916639728 31098112 31737840
+38751000000 38752919322 12917000000 12917639774 32098112 32737886
+38754000000 38755919497 12918000000 12918639832 33098112 33737944
+38757000000 38758919619 12919000000 12919639873 34098112 34737985
+38760000000 38761919769 12920000000 12920639923 35098112 35738035
+38763000000 38764919917 12921000000 12921639972 36098112 36738084
+38766000000 38767093611 12922000000 12922364537 37098112 37462649
+38769000000 38770920237 12923000000 12923640079 38098112 38738191
+38772000000 38773920369 12924000000 12924640123 39098112 39738235
+38775000000 38776920543 12925000000 12925640181 40098112 40738293
+38778000000 38779920662 12926000000 12926640220 41098112 41738332
+38781000000 38782920786 12927000000 12927640262 42098112 42738374
+38784000000 38785921005 12928000000 12928640335 43098112 43738447
+38787000000 38788921141 12929000000 12929640380 44098112 44738492
+38790000000 38791921292 12930000000 12930640430 45098112 45738542
+38793000000 38794921442 12931000000 12931640480 46098112 46738592
+38796000000 38797921557 12932000000 12932640519 47098112 47738631
+38799000000 38800921654 12933000000 12933640551 48098112 48738663
+38802000000 38803921862 12934000000 12934640620 49098112 49738732
+38805000000 38806922017 12935000000 12935640672 50098112 50738784
+38808000000 38809922176 12936000000 12936640725 51098112 51738837
+38811000000 38812922350 12937000000 12937640783 52098112 52738895
+38814000000 38815922450 12938000000 12938640816 53098112 53738928
+38817000000 38818922628 12939000000 12939640876 54098112 54738988
+38820000000 38821922777 12940000000 12940640925 55098112 55739037
+38823000000 38824922905 12941000000 12941640968 56098112 56739080
+38826000000 38827923074 12942000000 12942641024 57098112 57739136
+38829000000 38830923194 12943000000 12943641064 58098112 58739176
+38832000000 38832750544 12944000000 12944250181 59098112 59348293
+38835000000 38836923444 12945000000 12945641148 60098112 60739260
+38838000000 38839923702 12946000000 12946641234 61098112 61739346
+38841000000 38842923807 12947000000 12947641269 62098112 62739381
+38844000000 38845923887 12948000000 12948641295 63098112 63739407
+38847000000 38848924034 12949000000 12949641344 64098112 64739456
+38850000000 38851924288 12950000000 12950641429 65098112 65739541
+38853000000 38854924378 12951000000 12951641459 66098112 66739571
+38856000000 38857924623 12952000000 12952641541 67098112 67739653
+38859000000 38860924701 12953000000 12953641567 68098112 68739679
+38862000000 38863924878 12954000000 12954641626 69098112 69739738
+38865000000 38866925024 12955000000 12955641674 70098112 70739786
+38868000000 38869925168 12956000000 12956641722 71098112 71739834
+38871000000 38871547822 12957000000 12957182607 72098112 72280719
+38874000000 38875925483 12958000000 12958641827 73098112 73739939
+38877000000 38878925643 12959000000 12959641881 74098112 74739993
+38880000000 38881925780 12960000000 12960641926 75098112 75740038
+38883000000 38884925938 12961000000 12961641979 76098112 76740091
+38886000000 38887926096 12962000000 12962642032 77098112 77740144
+38889000000 38890926210 12963000000 12963642070 78098112 78740182
+38892000000 38893926371 12964000000 12964642123 79098112 79740235
+38895000000 38896926498 12965000000 12965642166 80098112 80740278
+38898000000 38899926607 12966000000 12966642202 81098112 81740314
+38901000000 38902926749 12967000000 12967642249 82098112 82740361
+38904000000 38905926983 12968000000 12968642327 83098112 83740439
+38907000000 38908926896 12969000000 12969642298 84098112 84740410
+38910000000 38911927017 12970000000 12970642339 85098112 85740451
+38913000000 38914927125 12971000000 12971642375 86098112 86740487
+38916000000 38917927360 12972000000 12972642453 87098112 87740565
+38919000000 38920927539 12973000000 12973642513 88098112 88740625
+38922000000 38923841179 12974000000 12974613726 89098112 89711838
+38925000000 38926927808 12975000000 12975642602 90098112 90740714
+38928000000 38929927981 12976000000 12976642660 91098112 91740772
+38931000000 38932928097 12977000000 12977642699 92098112 92740811
+38934000000 38935928270 12978000000 12978642756 93098112 93740868
+38937000000 38938928442 12979000000 12979642814 94098112 94740926
+38940000000 38941928498 12980000000 12980642832 95098112 95740944
+38943000000 38944928644 12981000000 12981642881 96098112 96740993
+38946000000 38947928840 12982000000 12982642946 97098112 97741058
+38949000000 38950928869 12983000000 12983642956 98098112 98741068
+38952000000 38953929175 12984000000 12984643058 99098112 99741170
+38955000000 38956929347 12985000000 12985643115 100098112 100741227
+38958000000 38959929480 12986000000 12986643160 101098112 101741272
+38961000000 38962929597 12987000000 12987643199 102098112 102741311
+38964000000 38965929782 12988000000 12988643260 103098112 103741372
+38967000000 38968929888 12989000000 12989643296 104098112 104741408
+38970000000 38971930069 12990000000 12990643356 105098112 105741468
+38973000000 38974930281 12991000000 12991643427 106098112 106741539
+38976000000 38977930388 12992000000 12992643462 107098112 107741574
+38979000000 38980930554 12993000000 12993643518 108098112 108741630
+38982000000 38983529299 12994000000 12994509766 109098112 109607878
+38985000000 38986930825 12995000000 12995643608 110098112 110741720
+38988000000 38989930937 12996000000 12996643645 111098112 111741757
+38991000000 38992931146 12997000000 12997643715 112098112 112741827
+38994000000 38995931225 12998000000 12998643741 113098112 113741853
+38997000000 38998931450 12999000000 12999643816 114098112 114741928
+39000000000 39001931577 13000000000 13000643859 115098112 115741971
+39003000000 39004931666 13001000000 13001643888 116098112 116742000
+39006000000 39007931772 13002000000 13002643924 117098112 117742036
+39009000000 39010931983 13003000000 13003643994 118098112 118742106
+39012000000 39013932192 13004000000 13004644064 119098112 119742176
+39015000000 39016932337 13005000000 13005644112 120098112 120742224
+39018000000 39019932463 13006000000 13006644154 121098112 121742266
+39021000000 39022932629 13007000000 13007644209 122098112 122742321
+39024000000 39025932709 13008000000 13008644236 123098112 123742348
+39027000000 39028932944 13009000000 13009644314 124098112 124742426
+39030000000 39031933103 13010000000 13010644367 125098112 125742479
+39033000000 39034933224 13011000000 13011644408 126098112 126742520
+39036000000 39037933384 13012000000 13012644461 127098112 127742573
+39039000000 39040933467 13013000000 13013644489 128098112 128742601
+39042000000 39043933713 13014000000 13014644571 129098112 129742683
+39045000000 39046933836 13015000000 13015644612 130098112 130742724
+39048000000 39049933972 13016000000 13016644657 131098112 131742769
+39051000000 39052934147 13017000000 13017644715 132098112 132742827
+39054000000 39055934269 13018000000 13018644756 133098112 133742868
+39057000000 39058934419 13019000000 13019644806 134098112 134742918
+39060000000 39061934567 13020000000 13020644855 135098112 135742967
+39063000000 39064108261 13021000000 13021369420 136098112 136467532
+39066000000 39067934887 13022000000 13022644962 137098112 137743074
+39069000000 39070935019 13023000000 13023645006 138098112 138743118
+39072000000 39073935193 13024000000 13024645064 139098112 139743176
+39075000000 39076935312 13025000000 13025645104 140098112 140743216
+39078000000 39079935436 13026000000 13026645145 141098112 141743257
+39081000000 39082935655 13027000000 13027645218 142098112 142743330
+39084000000 39085935791 13028000000 13028645263 143098112 143743375
+39087000000 39088935942 13029000000 13029645314 144098112 144743426
+39090000000 39091936092 13030000000 13030645364 145098112 145743476
+39093000000 39094936207 13031000000 13031645402 146098112 146743514
+39096000000 39097936304 13032000000 13032645434 147098112 147743546
+39099000000 39100936512 13033000000 13033645504 148098112 148743616
+39102000000 39103936667 13034000000 13034645555 149098112 149743667
+39105000000 39106936826 13035000000 13035645608 150098112 150743720
+39108000000 39109937000 13036000000 13036645666 151098112 151743778
+39111000000 39112937100 13037000000 13037645700 152098112 152743812
+39114000000 39115937278 13038000000 13038645759 153098112 153743871
+39117000000 39118937427 13039000000 13039645809 154098112 154743921
+39120000000 39121937555 13040000000 13040645851 155098112 155743963
+39123000000 39124937724 13041000000 13041645908 156098112 156744020
+39126000000 39127937844 13042000000 13042645948 157098112 157744060
+39129000000 39129765194 13043000000 13043255064 158098112 158353176
+39132000000 39133938094 13044000000 13044646031 159098112 159744143
+39135000000 39136938352 13045000000 13045646117 160098112 160744229
+39138000000 39139938457 13046000000 13046646152 161098112 161744264
+39141000000 39142938537 13047000000 13047646179 162098112 162744291
+39144000000 39145938684 13048000000 13048646228 163098112 163744340
+39147000000 39148938938 13049000000 13049646312 164098112 164744424
+39150000000 39151939028 13050000000 13050646342 165098112 165744454
+39153000000 39154939273 13051000000 13051646424 166098112 166744536
+39156000000 39157939351 13052000000 13052646450 167098112 167744562
+39159000000 39160939528 13053000000 13053646509 168098112 168744621
+39162000000 39163939674 13054000000 13054646558 169098112 169744670
+39165000000 39166939818 13055000000 13055646606 170098112 170744718
+39168000000 39168562472 13056000000 13056187490 171098112 171285602
+39171000000 39172940133 13057000000 13057646711 172098112 172744823
+39174000000 39175940293 13058000000 13058646764 173098112 173744876
+39177000000 39178940430 13059000000 13059646810 174098112 174744922
+39180000000 39181940588 13060000000 13060646862 175098112 175744974
+39183000000 39184940746 13061000000 13061646915 176098112 176745027
+39186000000 39187940860 13062000000 13062646953 177098112 177745065
+39189000000 39190941021 13063000000 13063647007 178098112 178745119
+39192000000 39193941148 13064000000 13064647049 179098112 179745161
+39195000000 39196941257 13065000000 13065647085 180098112 180745197
+39198000000 39199941399 13066000000 13066647133 181098112 181745245
+39201000000 39202941633 13067000000 13067647211 182098112 182745323
+39204000000 39205941546 13068000000 13068647182 183098112 183745294
+39207000000 39208941667 13069000000 13069647222 184098112 184745334
+39210000000 39211941775 13070000000 13070647258 185098112 185745370
+39213000000 39214942010 13071000000 13071647336 186098112 186745448
+39216000000 39217942189 13072000000 13072647396 187098112 187745508
+39219000000 39220855829 13073000000 13073618609 188098112 188716721
+39222000000 39223942458 13074000000 13074647486 189098112 189745598
+39225000000 39226942631 13075000000 13075647543 190098112 190745655
+39228000000 39229942747 13076000000 13076647582 191098112 191745694
+39231000000 39232942920 13077000000 13077647640 192098112 192745752
+39234000000 39235943092 13078000000 13078647697 193098112 193745809
+39237000000 39238943148 13079000000 13079647716 194098112 194745828
+39240000000 39241943294 13080000000 13080647764 195098112 195745876
+39243000000 39244943490 13081000000 13081647830 196098112 196745942
+39246000000 39247943519 13082000000 13082647839 197098112 197745951
+39249000000 39250943825 13083000000 13083647941 198098112 198746053
+39252000000 39253943997 13084000000 13084647999 199098112 199746111
+39255000000 39256944130 13085000000 13085648043 200098112 200746155
+39258000000 39259944247 13086000000 13086648082 201098112 201746194
+39261000000 39262944432 13087000000 13087648144 202098112 202746256
+39264000000 39265944538 13088000000 13088648179 203098112 203746291
+39267000000 39268944719 13089000000 13089648239 204098112 204746351
+39270000000 39271944931 13090000000 13090648310 205098112 205746422
+39273000000 39274945038 13091000000 13091648346 206098112 206746458
+39276000000 39277945204 13092000000 13092648401 207098112 207746513
+39279000000 39280543949 13093000000 13093514649 208098112 208612761
+39282000000 39283945475 13094000000 13094648491 209098112 209746603
+39285000000 39286945587 13095000000 13095648529 210098112 210746641
+39288000000 39289945796 13096000000 13096648598 211098112 211746710
+39291000000 39292945875 13097000000 13097648625 212098112 212746737
+39294000000 39295946100 13098000000 13098648700 213098112 213746812
+39297000000 39298946227 13099000000 13099648742 214098112 214746854
+39300000000 39301946316 13100000000 13100648772 215098112 215746884
+39303000000 39304946422 13101000000 13101648807 216098112 216746919
+39306000000 39307946633 13102000000 13102648877 217098112 217746989
+39309000000 39310946842 13103000000 13103648947 218098112 218747059
+39312000000 39313946987 13104000000 13104648995 219098112 219747107
+39315000000 39316947113 13105000000 13105649037 220098112 220747149
+39318000000 39319947279 13106000000 13106649093 221098112 221747205
+39321000000 39322947359 13107000000 13107649119 222098112 222747231
+39324000000 39325947594 13108000000 13108649198 223098112 223747310
+39327000000 39328947753 13109000000 13109649251 224098112 224747363
+39330000000 39331947874 13110000000 13110649291 225098112 225747403
+39333000000 39334948034 13111000000 13111649344 226098112 226747456
+39336000000 39337948117 13112000000 13112649372 227098112 227747484
+39339000000 39340948363 13113000000 13113649454 228098112 228747566
+39342000000 39343948486 13114000000 13114649495 229098112 229747607
+39345000000 39346948622 13115000000 13115649540 230098112 230747652
+39348000000 39349948797 13116000000 13116649599 231098112 231747711
+39351000000 39352948919 13117000000 13117649639 232098112 232747751
+39354000000 39355949069 13118000000 13118649689 233098112 233747801
+39357000000 39358949217 13119000000 13119649739 234098112 234747851
+39360000000 39361122911 13120000000 13120374303 235098112 235472415
+39363000000 39364949537 13121000000 13121649845 236098112 236747957
+39366000000 39367949669 13122000000 13122649889 237098112 237748001
+39369000000 39370949843 13123000000 13123649947 238098112 238748059
+39372000000 39373949962 13124000000 13124649987 239098112 239748099
+39375000000 39376950086 13125000000 13125650028 240098112 240748140
+39378000000 39379950305 13126000000 13126650101 241098112 241748213
+39381000000 39382950441 13127000000 13127650147 242098112 242748259
+39384000000 39385950592 13128000000 13128650197 243098112 243748309
+39387000000 39388950742 13129000000 13129650247 244098112 244748359
+39390000000 39391950857 13130000000 13130650285 245098112 245748397
+39393000000 39394950954 13131000000 13131650318 246098112 246748430
+39396000000 39397951162 13132000000 13132650387 247098112 247748499
+39399000000 39400951317 13133000000 13133650439 248098112 248748551
+39402000000 39403951476 13134000000 13134650492 249098112 249748604
+39405000000 39406951650 13135000000 13135650550 250098112 250748662
+39408000000 39409951750 13136000000 13136650583 251098112 251748695
+39411000000 39412951928 13137000000 13137650642 252098112 252748754
+39414000000 39415952077 13138000000 13138650692 253098112 253748804
+39417000000 39418952205 13139000000 13139650735 254098112 254748847
+39420000000 39421952374 13140000000 13140650791 255098112 255748903
+39423000000 39424952494 13141000000 13141650831 256098112 256748943
+39426000000 39426779844 13142000000 13142259948 257098112 257358060
+39429000000 39430952744 13143000000 13143650914 258098112 258749026
+39432000000 39433953002 13144000000 13144651000 259098112 259749112
+39435000000 39436953107 13145000000 13145651035 260098112 260749147
+39438000000 39439953187 13146000000 13146651062 261098112 261749174
+39441000000 39442953334 13147000000 13147651111 262098112 262749223
+39444000000 39445953588 13148000000 13148651196 263098112 263749308
+39447000000 39448953678 13149000000 13149651226 264098112 264749338
+39450000000 39451953923 13150000000 13150651307 265098112 265749419
+39453000000 39454954001 13151000000 13151651333 266098112 266749445
+39456000000 39457954178 13152000000 13152651392 267098112 267749504
+39459000000 39460954324 13153000000 13153651441 268098112 268749553
+39462000000 39463954468 13154000000 13154651489 269098112 269749601
+39465000000 39465577122 13155000000 13155192374 270098112 270290486
+39468000000 39469954783 13156000000 13156651594 271098112 271749706
+39471000000 39472954943 13157000000 13157651647 272098112 272749759
+39474000000 39475955080 13158000000 13158651693 273098112 273749805
+39477000000 39478955238 13159000000 13159651746 274098112 274749858
+39480000000 39481955396 13160000000 13160651798 275098112 275749910
+39483000000 39484955510 13161000000 13161651836 276098112 276749948
+39486000000 39487955671 13162000000 13162651890 277098112 277750002
+39489000000 39490955798 13163000000 13163651932 278098112 278750044
+39492000000 39493955907 13164000000 13164651969 279098112 279750081
+39495000000 39496956049 13165000000 13165652016 280098112 280750128
+39498000000 39499956283 13166000000 13166652094 281098112 281750206
+39501000000 39502956196 13167000000 13167652065 282098112 282750177
+39504000000 39505956317 13168000000 13168652105 283098112 283750217
+39507000000 39508956425 13169000000 13169652141 284098112 284750253
+39510000000 39511956660 13170000000 13170652220 285098112 285750332
+39513000000 39514956839 13171000000 13171652279 286098112 286750391
+39516000000 39517870479 13172000000 13172623493 287098112 287721605
+39519000000 39520957108 13173000000 13173652369 288098112 288750481
+39522000000 39523957281 13174000000 13174652427 289098112 289750539
+39525000000 39526957397 13175000000 13175652465 290098112 290750577
+39528000000 39529957570 13176000000 13176652523 291098112 291750635
+39531000000 39532957742 13177000000 13177652580 292098112 292750692
+39534000000 39535957798 13178000000 13178652599 293098112 293750711
+39537000000 39538957944 13179000000 13179652648 294098112 294750760
+39540000000 39541958140 13180000000 13180652713 295098112 295750825
+39543000000 39544958169 13181000000 13181652723 296098112 296750835
+39546000000 39547958475 13182000000 13182652825 297098112 297750937
+39549000000 39550958647 13183000000 13183652882 298098112 298750994
+39552000000 39553958780 13184000000 13184652926 299098112 299751038
+39555000000 39556958897 13185000000 13185652965 300098112 300751077
+39558000000 39559959082 13186000000 13186653027 301098112 301751139
+39561000000 39562959188 13187000000 13187653062 302098112 302751174
+39564000000 39565959369 13188000000 13188653123 303098112 303751235
+39567000000 39568959581 13189000000 13189653193 304098112 304751305
+39570000000 39571959688 13190000000 13190653229 305098112 305751341
+39573000000 39574959854 13191000000 13191653284 306098112 306751396
+39576000000 39577558599 13192000000 13192519533 307098112 307617645
+39579000000 39580960125 13193000000 13193653375 308098112 308751487
+39582000000 39583960237 13194000000 13194653412 309098112 309751524
+39585000000 39586960446 13195000000 13195653482 310098112 310751594
+39588000000 39589960525 13196000000 13196653508 311098112 311751620
+39591000000 39592960750 13197000000 13197653583 312098112 312751695
+39594000000 39595960877 13198000000 13198653625 313098112 313751737
+39597000000 39598960966 13199000000 13199653655 314098112 314751767
+39600000000 39601961072 13200000000 13200653690 315098112 315751802
+39603000000 39604961283 13201000000 13201653761 316098112 316751873
+39606000000 39607961492 13202000000 13202653830 317098112 317751942
+39609000000 39610961637 13203000000 13203653879 318098112 318751991
+39612000000 39613961763 13204000000 13204653921 319098112 319752033
+39615000000 39616961929 13205000000 13205653976 320098112 320752088
+39618000000 39619962009 13206000000 13206654003 321098112 321752115
+39621000000 39622962244 13207000000 13207654081 322098112 322752193
+39624000000 39625962403 13208000000 13208654134 323098112 323752246
+39627000000 39628962524 13209000000 13209654174 324098112 324752286
+39630000000 39631962684 13210000000 13210654228 325098112 325752340
+39633000000 39634962767 13211000000 13211654255 326098112 326752367
+39636000000 39637963013 13212000000 13212654337 327098112 327752449
+39639000000 39640963136 13213000000 13213654378 328098112 328752490
+39642000000 39643963272 13214000000 13214654424 329098112 329752536
+39645000000 39646963447 13215000000 13215654482 330098112 330752594
+39648000000 39649963569 13216000000 13216654523 331098112 331752635
+39651000000 39652963719 13217000000 13217654573 332098112 332752685
+39654000000 39655963867 13218000000 13218654622 333098112 333752734
+39657000000 39658137561 13219000000 13219379187 334098112 334477299
+39660000000 39661964187 13220000000 13220654729 335098112 335752841
+39663000000 39664964319 13221000000 13221654773 336098112 336752885
+39666000000 39667964493 13222000000 13222654831 337098112 337752943
+39669000000 39670964612 13223000000 13223654870 338098112 338752982
+39672000000 39673964736 13224000000 13224654912 339098112 339753024
+39675000000 39676964955 13225000000 13225654985 340098112 340753097
+39678000000 39679965091 13226000000 13226655030 341098112 341753142
+39681000000 39682965242 13227000000 13227655080 342098112 342753192
+39684000000 39685965392 13228000000 13228655130 343098112 343753242
+39687000000 39688965507 13229000000 13229655169 344098112 344753281
+39690000000 39691965604 13230000000 13230655201 345098112 345753313
+39693000000 39694965812 13231000000 13231655270 346098112 346753382
+39696000000 39697965967 13232000000 13232655322 347098112 347753434
+39699000000 39700966126 13233000000 13233655375 348098112 348753487
+39702000000 39703966300 13234000000 13234655433 349098112 349753545
+39705000000 39706966400 13235000000 13235655466 350098112 350753578
+39708000000 39709966578 13236000000 13236655526 351098112 351753638
+39711000000 39712966727 13237000000 13237655575 352098112 352753687
+39714000000 39715966855 13238000000 13238655618 353098112 353753730
+39717000000 39718967024 13239000000 13239655674 354098112 354753786
+39720000000 39721967144 13240000000 13240655714 355098112 355753826
+39723000000 39723794494 13241000000 13241264831 356098112 356362943
+39726000000 39727967394 13242000000 13242655798 357098112 357753910
+39729000000 39730967652 13243000000 13243655884 358098112 358753996
+39732000000 39733967757 13244000000 13244655919 359098112 359754031
+39735000000 39736967837 13245000000 13245655945 360098112 360754057
+39738000000 39739967984 13246000000 13246655994 361098112 361754106
+39741000000 39742968238 13247000000 13247656079 362098112 362754191
+39744000000 39745968328 13248000000 13248656109 363098112 363754221
+39747000000 39748968573 13249000000 13249656191 364098112 364754303
+39750000000 39751968651 13250000000 13250656217 365098112 365754329
+39753000000 39754968828 13251000000 13251656276 366098112 366754388
+39756000000 39757968974 13252000000 13252656324 367098112 367754436
+39759000000 39760969118 13253000000 13253656372 368098112 368754484
+39762000000 39762591772 13254000000 13254197257 369098112 369295369
+39765000000 39766969433 13255000000 13255656477 370098112 370754589
+39768000000 39769969593 13256000000 13256656531 371098112 371754643
+39771000000 39772969730 13257000000 13257656576 372098112 372754688
+39774000000 39775969888 13258000000 13258656629 373098112 373754741
+39777000000 39778970046 13259000000 13259656682 374098112 374754794
+39780000000 39781970160 13260000000 13260656720 375098112 375754832
+39783000000 39784970321 13261000000 13261656773 376098112 376754885
+39786000000 39787970448 13262000000 13262656816 377098112 377754928
+39789000000 39790970557 13263000000 13263656852 378098112 378754964
+39792000000 39793970699 13264000000 13264656899 379098112 379755011
+39795000000 39796970933 13265000000 13265656977 380098112 380755089
+39798000000 39799970846 13266000000 13266656948 381098112 381755060
+39801000000 39802970967 13267000000 13267656989 382098112 382755101
+39804000000 39805971075 13268000000 13268657025 383098112 383755137
+39807000000 39808971310 13269000000 13269657103 384098112 384755215
+39810000000 39811971489 13270000000 13270657163 385098112 385755275
+39813000000 39814885129 13271000000 13271628376 386098112 386726488
+39816000000 39817971758 13272000000 13272657252 387098112 387755364
+39819000000 39820971931 13273000000 13273657310 388098112 388755422
+39822000000 39823972047 13274000000 13274657349 389098112 389755461
+39825000000 39826972220 13275000000 13275657406 390098112 390755518
+39828000000 39829972392 13276000000 13276657464 391098112 391755576
+39831000000 39832972448 13277000000 13277657482 392098112 392755594
+39834000000 39835972594 13278000000 13278657531 393098112 393755643
+39837000000 39838972790 13279000000 13279657596 394098112 394755708
+39840000000 39841972819 13280000000 13280657606 395098112 395755718
+39843000000 39844973125 13281000000 13281657708 396098112 396755820
+39846000000 39847973297 13282000000 13282657765 397098112 397755877
+39849000000 39850973430 13283000000 13283657810 398098112 398755922
+39852000000 39853973547 13284000000 13284657849 399098112 399755961
+39855000000 39856973732 13285000000 13285657910 400098112 400756022
+39858000000 39859973838 13286000000 13286657946 401098112 401756058
+39861000000 39862974019 13287000000 13287658006 402098112 402756118
+39864000000 39865974231 13288000000 13288658077 403098112 403756189
+39867000000 39868974338 13289000000 13289658112 404098112 404756224
+39870000000 39871974504 13290000000 13290658168 405098112 405756280
+39873000000 39874573249 13291000000 13291524416 406098112 406622528
+39876000000 39877974775 13292000000 13292658258 407098112 407756370
+39879000000 39880974887 13293000000 13293658295 408098112 408756407
+39882000000 39883975096 13294000000 13294658365 409098112 409756477
+39885000000 39886975175 13295000000 13295658391 410098112 410756503
+39888000000 39889975400 13296000000 13296658466 411098112 411756578
+39891000000 39892975527 13297000000 13297658509 412098112 412756621
+39894000000 39895975616 13298000000 13298658538 413098112 413756650
+39897000000 39898975722 13299000000 13299658574 414098112 414756686
+39900000000 39901975933 13300000000 13300658644 415098112 415756756
+39903000000 39904976142 13301000000 13301658714 416098112 416756826
+39906000000 39907976287 13302000000 13302658762 417098112 417756874
+39909000000 39910976413 13303000000 13303658804 418098112 418756916
+39912000000 39913976579 13304000000 13304658859 419098112 419756971
+39915000000 39916976659 13305000000 13305658886 420098112 420756998
+39918000000 39919976894 13306000000 13306658964 421098112 421757076
+39921000000 39922977053 13307000000 13307659017 422098112 422757129
+39924000000 39925977174 13308000000 13308659058 423098112 423757170
+39927000000 39928977334 13309000000 13309659111 424098112 424757223
+39930000000 39931977417 13310000000 13310659139 425098112 425757251
+39933000000 39934977663 13311000000 13311659221 426098112 426757333
+39936000000 39937977786 13312000000 13312659262 427098112 427757374
+39939000000 39940977922 13313000000 13313659307 428098112 428757419
+39942000000 39943978097 13314000000 13314659365 429098112 429757477
+39945000000 39946978219 13315000000 13315659406 430098112 430757518
+39948000000 39949978369 13316000000 13316659456 431098112 431757568
+39951000000 39952978517 13317000000 13317659505 432098112 432757617
+39954000000 39955152211 13318000000 13318384070 433098112 433482182
+39957000000 39958978837 13319000000 13319659612 434098112 434757724
+39960000000 39961978969 13320000000 13320659656 435098112 435757768
+39963000000 39964979143 13321000000 13321659714 436098112 436757826
+39966000000 39967979262 13322000000 13322659754 437098112 437757866
+39969000000 39970979386 13323000000 13323659795 438098112 438757907
+39972000000 39973979605 13324000000 13324659868 439098112 439757980
+39975000000 39976979741 13325000000 13325659913 440098112 440758025
+39978000000 39979979892 13326000000 13326659964 441098112 441758076
+39981000000 39982980042 13327000000 13327660014 442098112 442758126
+39984000000 39985980157 13328000000 13328660052 443098112 443758164
+39987000000 39988980254 13329000000 13329660084 444098112 444758196
+39990000000 39991980462 13330000000 13330660154 445098112 445758266
+39993000000 39994980617 13331000000 13331660205 446098112 446758317
+39996000000 39997980776 13332000000 13332660258 447098112 447758370
+39999000000 40000980950 13333000000 13333660316 448098112 448758428
+40002000000 40003981050 13334000000 13334660350 449098112 449758462
+40005000000 40006981228 13335000000 13335660409 450098112 450758521
+40008000000 40009981377 13336000000 13336660459 451098112 451758571
+40011000000 40012981505 13337000000 13337660501 452098112 452758613
+40014000000 40015981674 13338000000 13338660558 453098112 453758670
+40017000000 40018981794 13339000000 13339660598 454098112 454758710
+40020000000 40020809144 13340000000 13340269714 455098112 455367826
+40023000000 40024982044 13341000000 13341660681 456098112 456758793
+40026000000 40027982302 13342000000 13342660767 457098112 457758879
+40029000000 40030982407 13343000000 13343660802 458098112 458758914
+40032000000 40033982487 13344000000 13344660829 459098112 459758941
+40035000000 40036982634 13345000000 13345660878 460098112 460758990
+40038000000 40039982888 13346000000 13346660962 461098112 461759074
+40041000000 40042982978 13347000000 13347660992 462098112 462759104
+40044000000 40045983223 13348000000 13348661074 463098112 463759186
+40047000000 40048983301 13349000000 13349661100 464098112 464759212
+40050000000 40051983478 13350000000 13350661159 465098112 465759271
+40053000000 40054983624 13351000000 13351661208 466098112 466759320
+40056000000 40057983768 13352000000 13352661256 467098112 467759368
+40059000000 40059606422 13353000000 13353202140 468098112 468300252
+40062000000 40063984083 13354000000 13354661361 469098112 469759473
+40065000000 40066984243 13355000000 13355661414 470098112 470759526
+40068000000 40069984380 13356000000 13356661460 471098112 471759572
+40071000000 40072984538 13357000000 13357661512 472098112 472759624
+40074000000 40075984696 13358000000 13358661565 473098112 473759677
+40077000000 40078984810 13359000000 13359661603 474098112 474759715
+40080000000 40081984971 13360000000 13360661657 475098112 475759769
+40083000000 40084985098 13361000000 13361661699 476098112 476759811
+40086000000 40087985207 13362000000 13362661735 477098112 477759847
+40089000000 40090985349 13363000000 13363661783 478098112 478759895
+40092000000 40093985583 13364000000 13364661861 479098112 479759973
+40095000000 40096985496 13365000000 13365661832 480098112 480759944
+40098000000 40099985617 13366000000 13366661872 481098112 481759984
+40101000000 40102985725 13367000000 13367661908 482098112 482760020
+40104000000 40105985960 13368000000 13368661986 483098112 483760098
+40107000000 40108986139 13369000000 13369662046 484098112 484760158
+40110000000 40111899779 13370000000 13370633259 485098112 485731371
+40113000000 40114986408 13371000000 13371662136 486098112 486760248
+40116000000 40117986581 13372000000 13372662193 487098112 487760305
+40119000000 40120986697 13373000000 13373662232 488098112 488760344
+40122000000 40123986870 13374000000 13374662290 489098112 489760402
+40125000000 40126987042 13375000000 13375662347 490098112 490760459
+40128000000 40129987098 13376000000 13376662366 491098112 491760478
+40131000000 40132987244 13377000000 13377662414 492098112 492760526
+40134000000 40135987440 13378000000 13378662480 493098112 493760592
+40137000000 40138987469 13379000000 13379662489 494098112 494760601
+40140000000 40141987775 13380000000 13380662591 495098112 495760703
+40143000000 40144987947 13381000000 13381662649 496098112 496760761
+40146000000 40147988080 13382000000 13382662693 497098112 497760805
+40149000000 40150988197 13383000000 13383662732 498098112 498760844
+40152000000 40153988382 13384000000 13384662794 499098112 499760906
+40155000000 40156988488 13385000000 13385662829 500098112 500760941
+40158000000 40159988669 13386000000 13386662889 501098112 501761001
+40161000000 40162988881 13387000000 13387662960 502098112 502761072
+40164000000 40165988988 13388000000 13388662996 503098112 503761108
+40167000000 40168989154 13389000000 13389663051 504098112 504761163
+40170000000 40171587899 13390000000 13390529299 505098112 505627411
+40173000000 40174989425 13391000000 13391663141 506098112 506761253
+40176000000 40177989537 13392000000 13392663179 507098112 507761291
+40179000000 40180989746 13393000000 13393663248 508098112 508761360
+40182000000 40183989825 13394000000 13394663275 509098112 509761387
+40185000000 40186990050 13395000000 13395663350 510098112 510761462
+40188000000 40189990177 13396000000 13396663392 511098112 511761504
+40191000000 40192990266 13397000000 13397663422 512098112 512761534
+40194000000 40195990372 13398000000 13398663457 513098112 513761569
+40197000000 40198990583 13399000000 13399663527 514098112 514761639
+40200000000 40201990792 13400000000 13400663597 515098112 515761709
+40203000000 40204990937 13401000000 13401663645 516098112 516761757
+40206000000 40207991063 13402000000 13402663687 517098112 517761799
+40209000000 40210991229 13403000000 13403663743 518098112 518761855
+40212000000 40213991309 13404000000 13404663769 519098112 519761881
+40215000000 40216991544 13405000000 13405663848 520098112 520761960
+40218000000 40219991703 13406000000 13406663901 521098112 521762013
+40221000000 40222991824 13407000000 13407663941 522098112 522762053
+40224000000 40225991984 13408000000 13408663994 523098112 523762106
+40227000000 40228992067 13409000000 13409664022 524098112 524762134
+40230000000 40231992313 13410000000 13410664104 525098112 525762216
+40233000000 40234992436 13411000000 13411664145 526098112 526762257
+40236000000 40237992572 13412000000 13412664190 527098112 527762302
+40239000000 40240992747 13413000000 13413664249 528098112 528762361
+40242000000 40243992869 13414000000 13414664289 529098112 529762401
+40245000000 40246993019 13415000000 13415664339 530098112 530762451
+40248000000 40249993167 13416000000 13416664389 531098112 531762501
+40251000000 40252166861 13417000000 13417388953 532098112 532487065
+40254000000 40255993487 13418000000 13418664495 533098112 533762607
+40257000000 40258993619 13419000000 13419664539 534098112 534762651
+40260000000 40261993793 13420000000 13420664597 535098112 535762709
+40263000000 40264993912 13421000000 13421664637 536098112 536762749
+40266000000 40267994036 13422000000 13422664678 537098112 537762790
+40269000000 40270994255 13423000000 13423664751 538098112 538762863
+40272000000 40273994391 13424000000 13424664797 539098112 539762909
+40275000000 40276994542 13425000000 13425664847 540098112 540762959
+40278000000 40279994692 13426000000 13426664897 541098112 541763009
+40281000000 40282994807 13427000000 13427664935 542098112 542763047
+40284000000 40285994904 13428000000 13428664968 543098112 543763080
+40287000000 40288995112 13429000000 13429665037 544098112 544763149
+40290000000 40291995267 13430000000 13430665089 545098112 545763201
+40293000000 40294995426 13431000000 13431665142 546098112 546763254
+40296000000 40297995600 13432000000 13432665200 547098112 547763312
+40299000000 40300995700 13433000000 13433665233 548098112 548763345
+40302000000 40303995878 13434000000 13434665292 549098112 549763404
+40305000000 40306996027 13435000000 13435665342 550098112 550763454
+40308000000 40309996155 13436000000 13436665385 551098112 551763497
+40311000000 40312996324 13437000000 13437665441 552098112 552763553
+40314000000 40315996444 13438000000 13438665481 553098112 553763593
+40317000000 40317823794 13439000000 13439274598 554098112 554372710
+40320000000 40321996694 13440000000 13440665564 555098112 555763676
+40323000000 40324996952 13441000000 13441665650 556098112 556763762
+40326000000 40327997057 13442000000 13442665685 557098112 557763797
+40329000000 40330997137 13443000000 13443665712 558098112 558763824
+40332000000 40333997284 13444000000 13444665761 559098112 559763873
+40335000000 40336997538 13445000000 13445665846 560098112 560763958
+40338000000 40339997628 13446000000 13446665876 561098112 561763988
+40341000000 40342997873 13447000000 13447665957 562098112 562764069
+40344000000 40345997951 13448000000 13448665983 563098112 563764095
+40347000000 40348998128 13449000000 13449666042 564098112 564764154
+40350000000 40351998274 13450000000 13450666091 565098112 565764203
+40353000000 40354998418 13451000000 13451666139 566098112 566764251
+40356000000 40356621072 13452000000 13452207024 567098112 567305136
+40359000000 40360998733 13453000000 13453666244 568098112 568764356
+40362000000 40363998893 13454000000 13454666297 569098112 569764409
+40365000000 40366999030 13455000000 13455666343 570098112 570764455
+40368000000 40369999188 13456000000 13456666396 571098112 571764508
+40371000000 40372999346 13457000000 13457666448 572098112 572764560
+40374000000 40375999460 13458000000 13458666486 573098112 573764598
+40377000000 40378999621 13459000000 13459666540 574098112 574764652
+40380000000 40381999748 13460000000 13460666582 575098112 575764694
+40383000000 40384999857 13461000000 13461666619 576098112 576764731
+40386000000 40387999999 13462000000 13462666666 577098112 577764778
+40389000000 40391000233 13463000000 13463666744 578098112 578764856
+40392000000 40394000146 13464000000 13464666715 579098112 579764827
+40395000000 40397000267 13465000000 13465666755 580098112 580764867
+40398000000 40400000375 13466000000 13466666791 581098112 581764903
+40401000000 40403000610 13467000000 13467666870 582098112 582764982
+40404000000 40406000789 13468000000 13468666929 583098112 583765041
+40407000000 40408914429 13469000000 13469638143 584098112 584736255
+40410000000 40412001058 13470000000 13470667019 585098112 585765131
+40413000000 40415001231 13471000000 13471667077 586098112 586765189
+40416000000 40418001347 13472000000 13472667115 587098112 587765227
+40419000000 40421001520 13473000000 13473667173 588098112 588765285
+40422000000 40424001692 13474000000 13474667230 589098112 589765342
+40425000000 40427001748 13475000000 13475667249 590098112 590765361
+40428000000 40430001894 13476000000 13476667298 591098112 591765410
+40431000000 40433002090 13477000000 13477667363 592098112 592765475
+40434000000 40436002119 13478000000 13478667373 593098112 593765485
+40437000000 40439002425 13479000000 13479667475 594098112 594765587
+40440000000 40442002597 13480000000 13480667532 595098112 595765644
+40443000000 40445002730 13481000000 13481667576 596098112 596765688
+40446000000 40448002847 13482000000 13482667615 597098112 597765727
+40449000000 40451003032 13483000000 13483667677 598098112 598765789
+40452000000 40454003138 13484000000 13484667712 599098112 599765824
+40455000000 40457003319 13485000000 13485667773 600098112 600765885
+40458000000 40460003531 13486000000 13486667843 601098112 601765955
+40461000000 40463003638 13487000000 13487667879 602098112 602765991
+40464000000 40466003804 13488000000 13488667934 603098112 603766046
+40467000000 40468602549 13489000000 13489534183 604098112 604632295
+40470000000 40472004075 13490000000 13490668025 605098112 605766137
+40473000000 40475004187 13491000000 13491668062 606098112 606766174
+40476000000 40478004396 13492000000 13492668132 607098112 607766244
+40479000000 40481004475 13493000000 13493668158 608098112 608766270
+40482000000 40484004700 13494000000 13494668233 609098112 609766345
+40485000000 40487004827 13495000000 13495668275 610098112 610766387
+40488000000 40490004916 13496000000 13496668305 611098112 611766417
+40491000000 40493005022 13497000000 13497668340 612098112 612766452
+40494000000 40496005233 13498000000 13498668411 613098112 613766523
+40497000000 40499005442 13499000000 13499668480 614098112 614766592
+40500000000 40502005587 13500000000 13500668529 615098112 615766641
+40503000000 40505005713 13501000000 13501668571 616098112 616766683
+40506000000 40508005879 13502000000 13502668626 617098112 617766738
+40509000000 40511005959 13503000000 13503668653 618098112 618766765
+40512000000 40514006194 13504000000 13504668731 619098112 619766843
+40515000000 40517006353 13505000000 13505668784 620098112 620766896
+40518000000 40520006474 13506000000 13506668824 621098112 621766936
+40521000000 40523006634 13507000000 13507668878 622098112 622766990
+40524000000 40526006717 13508000000 13508668905 623098112 623767017
+40527000000 40529006963 13509000000 13509668987 624098112 624767099
+40530000000 40532007086 13510000000 13510669028 625098112 625767140
+40533000000 40535007222 13511000000 13511669074 626098112 626767186
+40536000000 40538007397 13512000000 13512669132 627098112 627767244
+40539000000 40541007519 13513000000 13513669173 628098112 628767285
+40542000000 40544007669 13514000000 13514669223 629098112 629767335
+40545000000 40547007817 13515000000 13515669272 630098112 630767384
+40548000000 40549181511 13516000000 13516393837 631098112 631491949
+40551000000 40553008137 13517000000 13517669379 632098112 632767491
+40554000000 40556008269 13518000000 13518669423 633098112 633767535
+40557000000 40559008443 13519000000 13519669481 634098112 634767593
+40560000000 40562008562 13520000000 13520669520 635098112 635767632
+40563000000 40565008686 13521000000 13521669562 636098112 636767674
+40566000000 40568008905 13522000000 13522669635 637098112 637767747
+40569000000 40571009041 13523000000 13523669680 638098112 638767792
+40572000000 40574009192 13524000000 13524669730 639098112 639767842
+40575000000 40577009342 13525000000 13525669780 640098112 640767892
+40578000000 40580009457 13526000000 13526669819 641098112 641767931
+40581000000 40583009554 13527000000 13527669851 642098112 642767963
+40584000000 40586009762 13528000000 13528669920 643098112 643768032
+40587000000 40589009917 13529000000 13529669972 644098112 644768084
+40590000000 40592010076 13530000000 13530670025 645098112 645768137
+40593000000 40595010250 13531000000 13531670083 646098112 646768195
+40596000000 40598010350 13532000000 13532670116 647098112 647768228
+40599000000 40601010528 13533000000 13533670176 648098112 648768288
+40602000000 40604010677 13534000000 13534670225 649098112 649768337
+40605000000 40607010805 13535000000 13535670268 650098112 650768380
+40608000000 40610010974 13536000000 13536670324 651098112 651768436
+40611000000 40613011094 13537000000 13537670364 652098112 652768476
+40614000000 40614838444 13538000000 13538279481 653098112 653377593
+40617000000 40619011344 13539000000 13539670448 654098112 654768560
+40620000000 40622011602 13540000000 13540670534 655098112 655768646
+40623000000 40625011707 13541000000 13541670569 656098112 656768681
+40626000000 40628011787 13542000000 13542670595 657098112 657768707
+40629000000 40631011934 13543000000 13543670644 658098112 658768756
+40632000000 40634012188 13544000000 13544670729 659098112 659768841
+40635000000 40637012278 13545000000 13545670759 660098112 660768871
+40638000000 40640012523 13546000000 13546670841 661098112 661768953
+40641000000 40643012601 13547000000 13547670867 662098112 662768979
+40644000000 40646012778 13548000000 13548670926 663098112 663769038
+40647000000 40649012924 13549000000 13549670974 664098112 664769086
+40650000000 40652013068 13550000000 13550671022 665098112 665769134
+40653000000 40653635722 13551000000 13551211907 666098112 666310019
+40656000000 40658013383 13552000000 13552671127 667098112 667769239
+40659000000 40661013543 13553000000 13553671181 668098112 668769293
+40662000000 40664013680 13554000000 13554671226 669098112 669769338
+40665000000 40667013838 13555000000 13555671279 670098112 670769391
+40668000000 40670013996 13556000000 13556671332 671098112 671769444
+40671000000 40673014110 13557000000 13557671370 672098112 672769482
+40674000000 40676014271 13558000000 13558671423 673098112 673769535
+40677000000 40679014398 13559000000 13559671466 674098112 674769578
+40680000000 40682014507 13560000000 13560671502 675098112 675769614
+40683000000 40685014649 13561000000 13561671549 676098112 676769661
+40686000000 40688014883 13562000000 13562671627 677098112 677769739
+40689000000 40691014796 13563000000 13563671598 678098112 678769710
+40692000000 40694014917 13564000000 13564671639 679098112 679769751
+40695000000 40697015025 13565000000 13565671675 680098112 680769787
+40698000000 40700015260 13566000000 13566671753 681098112 681769865
+40701000000 40703015439 13567000000 13567671813 682098112 682769925
+40704000000 40705929079 13568000000 13568643026 683098112 683741138
+40707000000 40709015708 13569000000 13569671902 684098112 684770014
+40710000000 40712015881 13570000000 13570671960 685098112 685770072
+40713000000 40715015997 13571000000 13571671999 686098112 686770111
+40716000000 40718016170 13572000000 13572672056 687098112 687770168
+40719000000 40721016342 13573000000 13573672114 688098112 688770226
+40722000000 40724016398 13574000000 13574672132 689098112 689770244
+40725000000 40727016544 13575000000 13575672181 690098112 690770293
+40728000000 40730016740 13576000000 13576672246 691098112 691770358
+40731000000 40733016769 13577000000 13577672256 692098112 692770368
+40734000000 40736017075 13578000000 13578672358 693098112 693770470
+40737000000 40739017247 13579000000 13579672415 694098112 694770527
+40740000000 40742017380 13580000000 13580672460 695098112 695770572
+40743000000 40745017497 13581000000 13581672499 696098112 696770611
+40746000000 40748017682 13582000000 13582672560 697098112 697770672
+40749000000 40751017788 13583000000 13583672596 698098112 698770708
+40752000000 40754017969 13584000000 13584672656 699098112 699770768
+40755000000 40757018181 13585000000 13585672727 700098112 700770839
+40758000000 40760018288 13586000000 13586672762 701098112 701770874
+40761000000 40763018454 13587000000 13587672818 702098112 702770930
+40764000000 40765617199 13588000000 13588539066 703098112 703637178
+40767000000 40769018725 13589000000 13589672908 704098112 704771020
+40770000000 40772018837 13590000000 13590672945 705098112 705771057
+40773000000 40775019046 13591000000 13591673015 706098112 706771127
+40776000000 40778019125 13592000000 13592673041 707098112 707771153
+40779000000 40781019350 13593000000 13593673116 708098112 708771228
+40782000000 40784019477 13594000000 13594673159 709098112 709771271
+40785000000 40787019566 13595000000 13595673188 710098112 710771300
+40788000000 40790019672 13596000000 13596673224 711098112 711771336
+40791000000 40793019883 13597000000 13597673294 712098112 712771406
+40794000000 40796020092 13598000000 13598673364 713098112 713771476
+40797000000 40799020237 13599000000 13599673412 714098112 714771524
+40800000000 40802020363 13600000000 13600673454 715098112 715771566
+40803000000 40805020529 13601000000 13601673509 716098112 716771621
+40806000000 40808020609 13602000000 13602673536 717098112 717771648
+40809000000 40811020844 13603000000 13603673614 718098112 718771726
+40812000000 40814021003 13604000000 13604673667 719098112 719771779
+40815000000 40817021124 13605000000 13605673708 720098112 720771820
+40818000000 40820021284 13606000000 13606673761 721098112 721771873
+40821000000 40823021367 13607000000 13607673789 722098112 722771901
+40824000000 40826021613 13608000000 13608673871 723098112 723771983
+40827000000 40829021736 13609000000 13609673912 724098112 724772024
+40830000000 40832021872 13610000000 13610673957 725098112 725772069
+40833000000 40835022047 13611000000 13611674015 726098112 726772127
+40836000000 40838022169 13612000000 13612674056 727098112 727772168
+40839000000 40841022319 13613000000 13613674106 728098112 728772218
+40842000000 40844022467 13614000000 13614674155 729098112 729772267
+40845000000 40846196161 13615000000 13615398720 730098112 730496832
+40848000000 40850022787 13616000000 13616674262 731098112 731772374
+40851000000 40853022919 13617000000 13617674306 732098112 732772418
+40854000000 40856023093 13618000000 13618674364 733098112 733772476
+40857000000 40859023212 13619000000 13619674404 734098112 734772516
+40860000000 40862023336 13620000000 13620674445 735098112 735772557
+40863000000 40865023555 13621000000 13621674518 736098112 736772630
+40866000000 40868023691 13622000000 13622674563 737098112 737772675
+40869000000 40871023842 13623000000 13623674614 738098112 738772726
+40872000000 40874023992 13624000000 13624674664 739098112 739772776
+40875000000 40877024107 13625000000 13625674702 740098112 740772814
+40878000000 40880024204 13626000000 13626674734 741098112 741772846
+40881000000 40883024412 13627000000 13627674804 742098112 742772916
+40884000000 40886024567 13628000000 13628674855 743098112 743772967
+40887000000 40889024726 13629000000 13629674908 744098112 744773020
+40890000000 40892024900 13630000000 13630674966 745098112 745773078
+40893000000 40895025000 13631000000 13631675000 746098112 746773112
+40896000000 40898025178 13632000000 13632675059 747098112 747773171
+40899000000 40901025327 13633000000 13633675109 748098112 748773221
+40902000000 40904025455 13634000000 13634675151 749098112 749773263
+40905000000 40907025624 13635000000 13635675208 750098112 750773320
+40908000000 40910025744 13636000000 13636675248 751098112 751773360
+40911000000 40911853094 13637000000 13637284364 752098112 752382476
+40914000000 40916025994 13638000000 13638675331 753098112 753773443
+40917000000 40919026252 13639000000 13639675417 754098112 754773529
+40920000000 40922026357 13640000000 13640675452 755098112 755773564
+40923000000 40925026437 13641000000 13641675479 756098112 756773591
+40926000000 40928026584 13642000000 13642675528 757098112 757773640
+40929000000 40931026838 13643000000 13643675612 758098112 758773724
+40932000000 40934026928 13644000000 13644675642 759098112 759773754
+40935000000 40937027173 13645000000 13645675724 760098112 760773836
+40938000000 40940027251 13646000000 13646675750 761098112 761773862
+40941000000 40943027428 13647000000 13647675809 762098112 762773921
+40944000000 40946027574 13648000000 13648675858 763098112 763773970
+40947000000 40949027718 13649000000 13649675906 764098112 764774018
+40950000000 40950650372 13650000000 13650216790 765098112 765314902
+40953000000 40955028033 13651000000 13651676011 766098112 766774123
+40956000000 40958028193 13652000000 13652676064 767098112 767774176
+40959000000 40961028330 13653000000 13653676110 768098112 768774222
+40962000000 40964028488 13654000000 13654676162 769098112 769774274
+40965000000 40967028646 13655000000 13655676215 770098112 770774327
+40968000000 40970028760 13656000000 13656676253 771098112 771774365
+40971000000 40973028921 13657000000 13657676307 772098112 772774419
+40974000000 40976029048 13658000000 13658676349 773098112 773774461
+40977000000 40979029157 13659000000 13659676385 774098112 774774497
+40980000000 40982029299 13660000000 13660676433 775098112 775774545
+40983000000 40985029533 13661000000 13661676511 776098112 776774623
+40986000000 40988029446 13662000000 13662676482 777098112 777774594
+40989000000 40991029567 13663000000 13663676522 778098112 778774634
+40992000000 40994029675 13664000000 13664676558 779098112 779774670
+40995000000 40997029910 13665000000 13665676636 780098112 780774748
+40998000000 41000030089 13666000000 13666676696 781098112 781774808
+41001000000 41002943729 13667000000 13667647909 782098112 782746021
+41004000000 41006030358 13668000000 13668676786 783098112 783774898
+41007000000 41009030531 13669000000 13669676843 784098112 784774955
+41010000000 41012030647 13670000000 13670676882 785098112 785774994
+41013000000 41015030820 13671000000 13671676940 786098112 786775052
+41016000000 41018030992 13672000000 13672676997 787098112 787775109
+41019000000 41021031048 13673000000 13673677016 788098112 788775128
+41022000000 41024031194 13674000000 13674677064 789098112 789775176
+41025000000 41027031390 13675000000 13675677130 790098112 790775242
+41028000000 41030031419 13676000000 13676677139 791098112 791775251
+41031000000 41033031725 13677000000 13677677241 792098112 792775353
+41034000000 41036031897 13678000000 13678677299 793098112 793775411
+41037000000 41039032030 13679000000 13679677343 794098112 794775455
+41040000000 41042032147 13680000000 13680677382 795098112 795775494
+41043000000 41045032332 13681000000 13681677444 796098112 796775556
+41046000000 41048032438 13682000000 13682677479 797098112 797775591
+41049000000 41051032619 13683000000 13683677539 798098112 798775651
+41052000000 41054032831 13684000000 13684677610 799098112 799775722
+41055000000 41057032938 13685000000 13685677646 800098112 800775758
+41058000000 41060033104 13686000000 13686677701 801098112 801775813
+41061000000 41062631849 13687000000 13687543949 802098112 802642061
+41064000000 41066033375 13688000000 13688677791 803098112 803775903
+41067000000 41069033487 13689000000 13689677829 804098112 804775941
+41070000000 41072033696 13690000000 13690677898 805098112 805776010
+41073000000 41075033775 13691000000 13691677925 806098112 806776037
+41076000000 41078034000 13692000000 13692678000 807098112 807776112
+41079000000 41081034127 13693000000 13693678042 808098112 808776154
+41082000000 41084034216 13694000000 13694678072 809098112 809776184
+41085000000 41087034322 13695000000 13695678107 810098112 810776219
+41088000000 41090034533 13696000000 13696678177 811098112 811776289
+41091000000 41093034742 13697000000 13697678247 812098112 812776359
+41094000000 41096034887 13698000000 13698678295 813098112 813776407
+41097000000 41099035013 13699000000 13699678337 814098112 814776449
+41100000000 41102035179 13700000000 13700678393 815098112 815776505
+41103000000 41105035259 13701000000 13701678419 816098112 816776531
+41106000000 41108035494 13702000000 13702678498 817098112 817776610
+41109000000 41111035653 13703000000 13703678551 818098112 818776663
+41112000000 41114035774 13704000000 13704678591 819098112 819776703
+41115000000 41117035934 13705000000 13705678644 820098112 820776756
+41118000000 41120036017 13706000000 13706678672 821098112 821776784
+41121000000 41123036263 13707000000 13707678754 822098112 822776866
+41124000000 41126036386 13708000000 13708678795 823098112 823776907
+41127000000 41129036522 13709000000 13709678840 824098112 824776952
+41130000000 41132036697 13710000000 13710678899 825098112 825777011
+41133000000 41135036819 13711000000 13711678939 826098112 826777051
+41136000000 41138036969 13712000000 13712678989 827098112 827777101
+41139000000 41141037117 13713000000 13713679039 828098112 828777151
+41142000000 41143210811 13714000000 13714403603 829098112 829501715
+41145000000 41147037437 13715000000 13715679145 830098112 830777257
+41148000000 41150037569 13716000000 13716679189 831098112 831777301
+41151000000 41153037743 13717000000 13717679247 832098112 832777359
+41154000000 41156037862 13718000000 13718679287 833098112 833777399
+41157000000 41159037986 13719000000 13719679328 834098112 834777440
+41160000000 41162038205 13720000000 13720679401 835098112 835777513
+41163000000 41165038341 13721000000 13721679447 836098112 836777559
+41166000000 41168038492 13722000000 13722679497 837098112 837777609
+41169000000 41171038642 13723000000 13723679547 838098112 838777659
+41172000000 41174038757 13724000000 13724679585 839098112 839777697
+41175000000 41177038854 13725000000 13725679618 840098112 840777730
+41178000000 41180039062 13726000000 13726679687 841098112 841777799
+41181000000 41183039217 13727000000 13727679739 842098112 842777851
+41184000000 41186039376 13728000000 13728679792 843098112 843777904
+41187000000 41189039550 13729000000 13729679850 844098112 844777962
+41190000000 41192039650 13730000000 13730679883 845098112 845777995
+41193000000 41195039828 13731000000 13731679942 846098112 846778054
+41196000000 41198039977 13732000000 13732679992 847098112 847778104
+41199000000 41201040105 13733000000 13733680035 848098112 848778147
+41202000000 41204040274 13734000000 13734680091 849098112 849778203
+41205000000 41207040394 13735000000 13735680131 850098112 850778243
+41208000000 41208867744 13736000000 13736289248 851098112 851387360
+41211000000 41213040644 13737000000 13737680214 852098112 852778326
+41214000000 41216040902 13738000000 13738680300 853098112 853778412
+41217000000 41219041007 13739000000 13739680335 854098112 854778447
+41220000000 41222041087 13740000000 13740680362 855098112 855778474
+41223000000 41225041234 13741000000 13741680411 856098112 856778523
+41226000000 41228041488 13742000000 13742680496 857098112 857778608
+41229000000 41231041578 13743000000 13743680526 858098112 858778638
+41232000000 41234041823 13744000000 13744680607 859098112 859778719
+41235000000 41237041901 13745000000 13745680633 860098112 860778745
+41238000000 41240042078 13746000000 13746680692 861098112 861778804
+41241000000 41243042224 13747000000 13747680741 862098112 862778853
+41244000000 41246042368 13748000000 13748680789 863098112 863778901
+41247000000 41247665022 13749000000 13749221674 864098112 864319786
+41250000000 41252042683 13750000000 13750680894 865098112 865779006
+41253000000 41255042843 13751000000 13751680947 866098112 866779059
+41256000000 41258042980 13752000000 13752680993 867098112 867779105
+41259000000 41261043138 13753000000 13753681046 868098112 868779158
+41262000000 41264043296 13754000000 13754681098 869098112 869779210
+41265000000 41267043410 13755000000 13755681136 870098112 870779248
+41268000000 41270043571 13756000000 13756681190 871098112 871779302
+41271000000 41273043698 13757000000 13757681232 872098112 872779344
+41274000000 41276043807 13758000000 13758681269 873098112 873779381
+41277000000 41279043949 13759000000 13759681316 874098112 874779428
+41280000000 41282044183 13760000000 13760681394 875098112 875779506
+41283000000 41285044096 13761000000 13761681365 876098112 876779477
+41286000000 41288044217 13762000000 13762681405 877098112 877779517
+41289000000 41291044325 13763000000 13763681441 878098112 878779553
+41292000000 41294044560 13764000000 13764681520 879098112 879779632
+41295000000 41297044739 13765000000 13765681579 880098112 880779691
+41298000000 41299958379 13766000000 13766652793 881098112 881750905
+41301000000 41303045008 13767000000 13767681669 882098112 882779781
+41304000000 41306045181 13768000000 13768681727 883098112 883779839
+41307000000 41309045297 13769000000 13769681765 884098112 884779877
+41310000000 41312045470 13770000000 13770681823 885098112 885779935
+41313000000 41315045642 13771000000 13771681880 886098112 886779992
+41316000000 41318045698 13772000000 13772681899 887098112 887780011
+41319000000 41321045844 13773000000 13773681948 888098112 888780060
+41322000000 41324046040 13774000000 13774682013 889098112 889780125
+41325000000 41327046069 13775000000 13775682023 890098112 890780135
+41328000000 41330046375 13776000000 13776682125 891098112 891780237
+41331000000 41333046547 13777000000 13777682182 892098112 892780294
+41334000000 41336046680 13778000000 13778682226 893098112 893780338
+41337000000 41339046797 13779000000 13779682265 894098112 894780377
+41340000000 41342046982 13780000000 13780682327 895098112 895780439
+41343000000 41345047088 13781000000 13781682362 896098112 896780474
+41346000000 41348047269 13782000000 13782682423 897098112 897780535
+41349000000 41351047481 13783000000 13783682493 898098112 898780605
+41352000000 41354047588 13784000000 13784682529 899098112 899780641
+41355000000 41357047754 13785000000 13785682584 900098112 900780696
+41358000000 41359646499 13786000000 13786548833 901098112 901646945
+41361000000 41363048025 13787000000 13787682675 902098112 902780787
+41364000000 41366048137 13788000000 13788682712 903098112 903780824
+41367000000 41369048346 13789000000 13789682782 904098112 904780894
+41370000000 41372048425 13790000000 13790682808 905098112 905780920
+41373000000 41375048650 13791000000 13791682883 906098112 906780995
+41376000000 41378048777 13792000000 13792682925 907098112 907781037
+41379000000 41381048866 13793000000 13793682955 908098112 908781067
+41382000000 41384048972 13794000000 13794682990 909098112 909781102
+41385000000 41387049183 13795000000 13795683061 910098112 910781173
+41388000000 41390049392 13796000000 13796683130 911098112 911781242
+41391000000 41393049537 13797000000 13797683179 912098112 912781291
+41394000000 41396049663 13798000000 13798683221 913098112 913781333
+41397000000 41399049829 13799000000 13799683276 914098112 914781388
+41400000000 41402049909 13800000000 13800683303 915098112 915781415
+41403000000 41405050144 13801000000 13801683381 916098112 916781493
+41406000000 41408050303 13802000000 13802683434 917098112 917781546
+41409000000 41411050424 13803000000 13803683474 918098112 918781586
+41412000000 41414050584 13804000000 13804683528 919098112 919781640
+41415000000 41417050667 13805000000 13805683555 920098112 920781667
+41418000000 41420050913 13806000000 13806683637 921098112 921781749
+41421000000 41423051036 13807000000 13807683678 922098112 922781790
+41424000000 41426051172 13808000000 13808683724 923098112 923781836
+41427000000 41429051347 13809000000 13809683782 924098112 924781894
+41430000000 41432051469 13810000000 13810683823 925098112 925781935
+41433000000 41435051619 13811000000 13811683873 926098112 926781985
+41436000000 41438051767 13812000000 13812683922 927098112 927782034
+41439000000 41440225461 13813000000 13813408487 928098112 928506599
+41442000000 41444052087 13814000000 13814684029 929098112 929782141
+41445000000 41447052219 13815000000 13815684073 930098112 930782185
+41448000000 41450052393 13816000000 13816684131 931098112 931782243
+41451000000 41453052512 13817000000 13817684170 932098112 932782282
+41454000000 41456052636 13818000000 13818684212 933098112 933782324
+41457000000 41459052855 13819000000 13819684285 934098112 934782397
+41460000000 41462052991 13820000000 13820684330 935098112 935782442
+41463000000 41465053142 13821000000 13821684380 936098112 936782492
+41466000000 41468053292 13822000000 13822684430 937098112 937782542
+41469000000 41471053407 13823000000 13823684469 938098112 938782581
+41472000000 41474053504 13824000000 13824684501 939098112 939782613
+41475000000 41477053712 13825000000 13825684570 940098112 940782682
+41478000000 41480053867 13826000000 13826684622 941098112 941782734
+41481000000 41483054026 13827000000 13827684675 942098112 942782787
+41484000000 41486054200 13828000000 13828684733 943098112 943782845
+41487000000 41489054300 13829000000 13829684766 944098112 944782878
+41490000000 41492054478 13830000000 13830684826 945098112 945782938
+41493000000 41495054627 13831000000 13831684875 946098112 946782987
+41496000000 41498054755 13832000000 13832684918 947098112 947783030
+41499000000 41501054924 13833000000 13833684974 948098112 948783086
+41502000000 41504055044 13834000000 13834685014 949098112 949783126
+41505000000 41505882394 13835000000 13835294131 950098112 950392243
+41508000000 41510055294 13836000000 13836685098 951098112 951783210
+41511000000 41513055552 13837000000 13837685184 952098112 952783296
+41514000000 41516055657 13838000000 13838685219 953098112 953783331
+41517000000 41519055737 13839000000 13839685245 954098112 954783357
+41520000000 41522055884 13840000000 13840685294 955098112 955783406
+41523000000 41525056138 13841000000 13841685379 956098112 956783491
+41526000000 41528056228 13842000000 13842685409 957098112 957783521
+41529000000 41531056473 13843000000 13843685491 958098112 958783603
+41532000000 41534056551 13844000000 13844685517 959098112 959783629
+41535000000 41537056728 13845000000 13845685576 960098112 960783688
+41538000000 41540056874 13846000000 13846685624 961098112 961783736
+41541000000 41543057018 13847000000 13847685672 962098112 962783784
+41544000000 41544679672 13848000000 13848226557 963098112 963324669
+41547000000 41549057333 13849000000 13849685777 964098112 964783889
+41550000000 41552057493 13850000000 13850685831 965098112 965783943
+41553000000 41555057630 13851000000 13851685876 966098112 966783988
+41556000000 41558057788 13852000000 13852685929 967098112 967784041
+41559000000 41561057946 13853000000 13853685982 968098112 968784094
+41562000000 41564058060 13854000000 13854686020 969098112 969784132
+41565000000 41567058221 13855000000 13855686073 970098112 970784185
+41568000000 41570058348 13856000000 13856686116 971098112 971784228
+41571000000 41573058457 13857000000 13857686152 972098112 972784264
+41574000000 41576058599 13858000000 13858686199 973098112 973784311
+41577000000 41579058833 13859000000 13859686277 974098112 974784389
+41580000000 41582058746 13860000000 13860686248 975098112 975784360
+41583000000 41585058867 13861000000 13861686289 976098112 976784401
+41586000000 41588058975 13862000000 13862686325 977098112 977784437
+41589000000 41591059210 13863000000 13863686403 978098112 978784515
+41592000000 41594059389 13864000000 13864686463 979098112 979784575
+41595000000 41596973029 13865000000 13865657676 980098112 980755788
+41598000000 41600059658 13866000000 13866686552 981098112 981784664
+41601000000 41603059831 13867000000 13867686610 982098112 982784722
+41604000000 41606059947 13868000000 13868686649 983098112 983784761
+41607000000 41609060120 13869000000 13869686706 984098112 984784818
+41610000000 41612060292 13870000000 13870686764 985098112 985784876
+41613000000 41615060348 13871000000 13871686782 986098112 986784894
+41616000000 41618060494 13872000000 13872686831 987098112 987784943
+41619000000 41621060690 13873000000 13873686896 988098112 988785008
+41622000000 41624060719 13874000000 13874686906 989098112 989785018
+41625000000 41627061025 13875000000 13875687008 990098112 990785120
+41628000000 41630061197 13876000000 13876687065 991098112 991785177
+41631000000 41633061330 13877000000 13877687110 992098112 992785222
+41634000000 41636061447 13878000000 13878687149 993098112 993785261
+41637000000 41639061632 13879000000 13879687210 994098112 994785322
+41640000000 41642061738 13880000000 13880687246 995098112 995785358
+41643000000 41645061919 13881000000 13881687306 996098112 996785418
+41646000000 41648062131 13882000000 13882687377 997098112 997785489
+41649000000 41651062238 13883000000 13883687412 998098112 998785524
+41652000000 41654062404 13884000000 13884687468 999098112 999785580
+41655000000 41656661149 13885000000 13885553716 1000098112 1000651828
+41658000000 41660062675 13886000000 13886687558 1001098112 1001785670
+41661000000 41663062787 13887000000 13887687595 1002098112 1002785707
+41664000000 41666062996 13888000000 13888687665 1003098112 1003785777
+41667000000 41669063075 13889000000 13889687691 1004098112 1004785803
+41670000000 41672063300 13890000000 13890687766 1005098112 1005785878
+41673000000 41675063427 13891000000 13891687809 1006098112 1006785921
+41676000000 41678063516 13892000000 13892687838 1007098112 1007785950
+41679000000 41681063622 13893000000 13893687874 1008098112 1008785986
+41682000000 41684063833 13894000000 13894687944 1009098112 1009786056
+41685000000 41687064042 13895000000 13895688014 1010098112 1010786126
+41688000000 41690064187 13896000000 13896688062 1011098112 1011786174
+41691000000 41693064313 13897000000 13897688104 1012098112 1012786216
+41694000000 41696064479 13898000000 13898688159 1013098112 1013786271
+41697000000 41699064559 13899000000 13899688186 1014098112 1014786298
+41700000000 41702064794 13900000000 13900688264 1015098112 1015786376
+41703000000 41705064953 13901000000 13901688317 1016098112 1016786429
+41706000000 41708065074 13902000000 13902688358 1017098112 1017786470
+41709000000 41711065234 13903000000 13903688411 1018098112 1018786523
+41712000000 41714065317 13904000000 13904688439 1019098112 1019786551
+41715000000 41717065563 13905000000 13905688521 1020098112 1020786633
+41718000000 41720065686 13906000000 13906688562 1021098112 1021786674
+41721000000 41723065822 13907000000 13907688607 1022098112 1022786719
+41724000000 41726065997 13908000000 13908688665 1023098112 1023786777
+41727000000 41729066119 13909000000 13909688706 1024098112 1024786818
+41730000000 41732066269 13910000000 13910688756 1025098112 1025786868
+41733000000 41735066417 13911000000 13911688805 1026098112 1026786917
+41736000000 41737240111 13912000000 13912413370 1027098112 1027511482
+41739000000 41741066737 13913000000 13913688912 1028098112 1028787024
+41742000000 41744066869 13914000000 13914688956 1029098112 1029787068
+41745000000 41747067043 13915000000 13915689014 1030098112 1030787126
+41748000000 41750067162 13916000000 13916689054 1031098112 1031787166
+41751000000 41753067286 13917000000 13917689095 1032098112 1032787207
+41754000000 41756067505 13918000000 13918689168 1033098112 1033787280
+41757000000 41759067641 13919000000 13919689213 1034098112 1034787325
+41760000000 41762067792 13920000000 13920689264 1035098112 1035787376
+41763000000 41765067942 13921000000 13921689314 1036098112 1036787426
+41766000000 41768068057 13922000000 13922689352 1037098112 1037787464
+41769000000 41771068154 13923000000 13923689384 1038098112 1038787496
+41772000000 41774068362 13924000000 13924689454 1039098112 1039787566
+41775000000 41777068517 13925000000 13925689505 1040098112 1040787617
+41778000000 41780068676 13926000000 13926689558 1041098112 1041787670
+41781000000 41783068850 13927000000 13927689616 1042098112 1042787728
+41784000000 41786068950 13928000000 13928689650 1043098112 1043787762
+41787000000 41789069128 13929000000 13929689709 1044098112 1044787821
+41790000000 41792069277 13930000000 13930689759 1045098112 1045787871
+41793000000 41795069405 13931000000 13931689801 1046098112 1046787913
+41796000000 41798069574 13932000000 13932689858 1047098112 1047787970
+41799000000 41801069694 13933000000 13933689898 1048098112 1048788010
+41802000000 41802897044 13934000000 13934299014 1049098112 1049397126
+41805000000 41807069944 13935000000 13935689981 1050098112 1050788093
+41808000000 41810070202 13936000000 13936690067 1051098112 1051788179
+41811000000 41813070307 13937000000 13937690102 1052098112 1052788214
+41814000000 41816070387 13938000000 13938690129 1053098112 1053788241
+41817000000 41819070534 13939000000 13939690178 1054098112 1054788290
+41820000000 41822070788 13940000000 13940690262 1055098112 1055788374
+41823000000 41825070878 13941000000 13941690292 1056098112 1056788404
+41826000000 41828071123 13942000000 13942690374 1057098112 1057788486
+41829000000 41831071201 13943000000 13943690400 1058098112 1058788512
+41832000000 41834071378 13944000000 13944690459 1059098112 1059788571
+41835000000 41837071524 13945000000 13945690508 1060098112 1060788620
+41838000000 41840071668 13946000000 13946690556 1061098112 1061788668
+41841000000 41841694322 13947000000 13947231440 1062098112 1062329552
+41844000000 41846071983 13948000000 13948690661 1063098112 1063788773
+41847000000 41849072143 13949000000 13949690714 1064098112 1064788826
+41850000000 41852072280 13950000000 13950690760 1065098112 1065788872
+41853000000 41855072438 13951000000 13951690812 1066098112 1066788924
+41856000000 41858072596 13952000000 13952690865 1067098112 1067788977
+41859000000 41861072710 13953000000 13953690903 1068098112 1068789015
+41862000000 41864072871 13954000000 13954690957 1069098112 1069789069
+41865000000 41867072998 13955000000 13955690999 1070098112 1070789111
+41868000000 41870073107 13956000000 13956691035 1071098112 1071789147
+41871000000 41873073249 13957000000 13957691083 1072098112 1072789195
+41874000000 41876073483 13958000000 13958691161 1073098112 1073789273
+41877000000 41879073396 13959000000 13959691132 1074098112 1074789244
+41880000000 41882073517 13960000000 13960691172 1075098112 1075789284
+41883000000 41885073625 13961000000 13961691208 1076098112 1076789320
+41886000000 41888073860 13962000000 13962691286 1077098112 1077789398
+41889000000 41891074039 13963000000 13963691346 1078098112 1078789458
+41892000000 41893987679 13964000000 13964662559 1079098112 1079760671
+41895000000 41897074308 13965000000 13965691436 1080098112 1080789548
+41898000000 41900074481 13966000000 13966691493 1081098112 1081789605
+41901000000 41903074597 13967000000 13967691532 1082098112 1082789644
+41904000000 41906074770 13968000000 13968691590 1083098112 1083789702
+41907000000 41909074942 13969000000 13969691647 1084098112 1084789759
+41910000000 41912074998 13970000000 13970691666 1085098112 1085789778
+41913000000 41915075144 13971000000 13971691714 1086098112 1086789826
+41916000000 41918075340 13972000000 13972691780 1087098112 1087789892
+41919000000 41921075369 13973000000 13973691789 1088098112 1088789901
+41922000000 41924075675 13974000000 13974691891 1089098112 1089790003
+41925000000 41927075847 13975000000 13975691949 1090098112 1090790061
+41928000000 41930075980 13976000000 13976691993 1091098112 1091790105
+41931000000 41933076097 13977000000 13977692032 1092098112 1092790144
+41934000000 41936076282 13978000000 13978692094 1093098112 1093790206
+41937000000 41939076388 13979000000 13979692129 1094098112 1094790241
+41940000000 41942076569 13980000000 13980692189 1095098112 1095790301
+41943000000 41945076781 13981000000 13981692260 1096098112 1096790372
+41946000000 41948076888 13982000000 13982692296 1097098112 1097790408
+41949000000 41951077054 13983000000 13983692351 1098098112 1098790463
+41952000000 41953675799 13984000000 13984558599 1099098112 1099656711
+41955000000 41957077325 13985000000 13985692441 1100098112 1100790553
+41958000000 41960077437 13986000000 13986692479 1101098112 1101790591
+41961000000 41963077646 13987000000 13987692548 1102098112 1102790660
+41964000000 41966077725 13988000000 13988692575 1103098112 1103790687
+41967000000 41969077950 13989000000 13989692650 1104098112 1104790762
+41970000000 41972078077 13990000000 13990692692 1105098112 1105790804
+41973000000 41975078166 13991000000 13991692722 1106098112 1106790834
+41976000000 41978078272 13992000000 13992692757 1107098112 1107790869
+41979000000 41981078483 13993000000 13993692827 1108098112 1108790939
+41982000000 41984078692 13994000000 13994692897 1109098112 1109791009
+41985000000 41987078837 13995000000 13995692945 1110098112 1110791057
+41988000000 41990078963 13996000000 13996692987 1111098112 1111791099
+41991000000 41993079129 13997000000 13997693043 1112098112 1112791155
+41994000000 41996079209 13998000000 13998693069 1113098112 1113791181
+41997000000 41999079444 13999000000 13999693148 1114098112 1114791260
+42000000000 42002079603 14000000000 14000693201 1115098112 1115791313
+42003000000 42005079724 14001000000 14001693241 1116098112 1116791353
+42006000000 42008079884 14002000000 14002693294 1117098112 1117791406
+42009000000 42011079967 14003000000 14003693322 1118098112 1118791434
+42012000000 42014080213 14004000000 14004693404 1119098112 1119791516
+42015000000 42017080336 14005000000 14005693445 1120098112 1120791557
+42018000000 42020080472 14006000000 14006693490 1121098112 1121791602
+42021000000 42023080647 14007000000 14007693549 1122098112 1122791661
+42024000000 42026080769 14008000000 14008693589 1123098112 1123791701
+42027000000 42029080919 14009000000 14009693639 1124098112 1124791751
+42030000000 42032081067 14010000000 14010693689 1125098112 1125791801
+42033000000 42034254761 14011000000 14011418253 1126098112 1126516365
+42036000000 42038081387 14012000000 14012693795 1127098112 1127791907
+42039000000 42041081519 14013000000 14013693839 1128098112 1128791951
+42042000000 42044081693 14014000000 14014693897 1129098112 1129792009
+42045000000 42047081812 14015000000 14015693937 1130098112 1130792049
+42048000000 42050081936 14016000000 14016693978 1131098112 1131792090
+42051000000 42053082155 14017000000 14017694051 1132098112 1132792163
+42054000000 42056082291 14018000000 14018694097 1133098112 1133792209
+42057000000 42059082442 14019000000 14019694147 1134098112 1134792259
+42060000000 42062082592 14020000000 14020694197 1135098112 1135792309
+42063000000 42065082707 14021000000 14021694235 1136098112 1136792347
+42066000000 42068082804 14022000000 14022694268 1137098112 1137792380
+42069000000 42071083012 14023000000 14023694337 1138098112 1138792449
+42072000000 42074083167 14024000000 14024694389 1139098112 1139792501
+42075000000 42077083326 14025000000 14025694442 1140098112 1140792554
+42078000000 42080083500 14026000000 14026694500 1141098112 1141792612
+42081000000 42083083600 14027000000 14027694533 1142098112 1142792645
+42084000000 42086083778 14028000000 14028694592 1143098112 1143792704
+42087000000 42089083927 14029000000 14029694642 1144098112 1144792754
+42090000000 42092084055 14030000000 14030694685 1145098112 1145792797
+42093000000 42095084224 14031000000 14031694741 1146098112 1146792853
+42096000000 42098084344 14032000000 14032694781 1147098112 1147792893
+42099000000 42099911694 14033000000 14033303898 1148098112 1148402010
+42102000000 42104084594 14034000000 14034694864 1149098112 1149792976
+42105000000 42107084852 14035000000 14035694950 1150098112 1150793062
+42108000000 42110084957 14036000000 14036694985 1151098112 1151793097
+42111000000 42113085037 14037000000 14037695012 1152098112 1152793124
+42114000000 42116085184 14038000000 14038695061 1153098112 1153793173
+42117000000 42119085438 14039000000 14039695146 1154098112 1154793258
+42120000000 42122085528 14040000000 14040695176 1155098112 1155793288
+42123000000 42125085773 14041000000 14041695257 1156098112 1156793369
+42126000000 42128085851 14042000000 14042695283 1157098112 1157793395
+42129000000 42131086028 14043000000 14043695342 1158098112 1158793454
+42132000000 42134086174 14044000000 14044695391 1159098112 1159793503
+42135000000 42137086318 14045000000 14045695439 1160098112 1160793551
+42138000000 42138708972 14046000000 14046236324 1161098112 1161334436
+42141000000 42143086633 14047000000 14047695544 1162098112 1162793656
+42144000000 42146086793 14048000000 14048695597 1163098112 1163793709
+42147000000 42149086930 14049000000 14049695643 1164098112 1164793755
+42150000000 42152087088 14050000000 14050695696 1165098112 1165793808
+42153000000 42155087246 14051000000 14051695748 1166098112 1166793860
+42156000000 42158087360 14052000000 14052695786 1167098112 1167793898
+42159000000 42161087521 14053000000 14053695840 1168098112 1168793952
+42162000000 42164087648 14054000000 14054695882 1169098112 1169793994
+42165000000 42167087757 14055000000 14055695919 1170098112 1170794031
+42168000000 42170087899 14056000000 14056695966 1171098112 1171794078
+42171000000 42173088133 14057000000 14057696044 1172098112 1172794156
+42174000000 42176088046 14058000000 14058696015 1173098112 1173794127
+42177000000 42179088167 14059000000 14059696055 1174098112 1174794167
+42180000000 42182088275 14060000000 14060696091 1175098112 1175794203
+42183000000 42185088510 14061000000 14061696170 1176098112 1176794282
+42186000000 42188088689 14062000000 14062696229 1177098112 1177794341
+42189000000 42191002329 14063000000 14063667443 1178098112 1178765555
+42192000000 42194088958 14064000000 14064696319 1179098112 1179794431
+42195000000 42197089131 14065000000 14065696377 1180098112 1180794489
+42198000000 42200089247 14066000000 14066696415 1181098112 1181794527
+42201000000 42203089420 14067000000 14067696473 1182098112 1182794585
+42204000000 42206089592 14068000000 14068696530 1183098112 1183794642
+42207000000 42209089648 14069000000 14069696549 1184098112 1184794661
+42210000000 42212089794 14070000000 14070696598 1185098112 1185794710
+42213000000 42215089990 14071000000 14071696663 1186098112 1186794775
+42216000000 42218090019 14072000000 14072696673 1187098112 1187794785
+42219000000 42221090325 14073000000 14073696775 1188098112 1188794887
+42222000000 42224090497 14074000000 14074696832 1189098112 1189794944
+42225000000 42227090630 14075000000 14075696876 1190098112 1190794988
+42228000000 42230090747 14076000000 14076696915 1191098112 1191795027
+42231000000 42233090932 14077000000 14077696977 1192098112 1192795089
+42234000000 42236091038 14078000000 14078697012 1193098112 1193795124
+42237000000 42239091219 14079000000 14079697073 1194098112 1194795185
+42240000000 42242091431 14080000000 14080697143 1195098112 1195795255
+42243000000 42245091538 14081000000 14081697179 1196098112 1196795291
+42246000000 42248091704 14082000000 14082697234 1197098112 1197795346
+42249000000 42250690449 14083000000 14083563483 1198098112 1198661595
+42252000000 42254091975 14084000000 14084697325 1199098112 1199795437
+42255000000 42257092087 14085000000 14085697362 1200098112 1200795474
+42258000000 42260092296 14086000000 14086697432 1201098112 1201795544
+42261000000 42263092375 14087000000 14087697458 1202098112 1202795570
+42264000000 42266092600 14088000000 14088697533 1203098112 1203795645
+42267000000 42269092727 14089000000 14089697575 1204098112 1204795687
+42270000000 42272092816 14090000000 14090697605 1205098112 1205795717
+42273000000 42275092922 14091000000 14091697640 1206098112 1206795752
+42276000000 42278093133 14092000000 14092697711 1207098112 1207795823
+42279000000 42281093342 14093000000 14093697780 1208098112 1208795892
+42282000000 42284093487 14094000000 14094697829 1209098112 1209795941
+42285000000 42287093613 14095000000 14095697871 1210098112 1210795983
+42288000000 42290093779 14096000000 14096697926 1211098112 1211796038
+42291000000 42293093859 14097000000 14097697953 1212098112 1212796065
+42294000000 42296094094 14098000000 14098698031 1213098112 1213796143
+42297000000 42299094253 14099000000 14099698084 1214098112 1214796196
+42300000000 42302094374 14100000000 14100698124 1215098112 1215796236
+42303000000 42305094534 14101000000 14101698178 1216098112 1216796290
+42306000000 42308094617 14102000000 14102698205 1217098112 1217796317
+42309000000 42311094863 14103000000 14103698287 1218098112 1218796399
+42312000000 42314094986 14104000000 14104698328 1219098112 1219796440
+42315000000 42317095122 14105000000 14105698374 1220098112 1220796486
+42318000000 42320095297 14106000000 14106698432 1221098112 1221796544
+42321000000 42323095419 14107000000 14107698473 1222098112 1222796585
+42324000000 42326095569 14108000000 14108698523 1223098112 1223796635
+42327000000 42329095717 14109000000 14109698572 1224098112 1224796684
+42330000000 42331269411 14110000000 14110423137 1225098112 1225521249
+42333000000 42335096037 14111000000 14111698679 1226098112 1226796791
+42336000000 42338096169 14112000000 14112698723 1227098112 1227796835
+42339000000 42341096343 14113000000 14113698781 1228098112 1228796893
+42342000000 42344096462 14114000000 14114698820 1229098112 1229796932
+42345000000 42347096586 14115000000 14115698862 1230098112 1230796974
+42348000000 42350096805 14116000000 14116698935 1231098112 1231797047
+42351000000 42353096941 14117000000 14117698980 1232098112 1232797092
+42354000000 42356097092 14118000000 14118699030 1233098112 1233797142
+42357000000 42359097242 14119000000 14119699080 1234098112 1234797192
+42360000000 42362097357 14120000000 14120699119 1235098112 1235797231
+42363000000 42365097454 14121000000 14121699151 1236098112 1236797263
+42366000000 42368097662 14122000000 14122699220 1237098112 1237797332
+42369000000 42371097817 14123000000 14123699272 1238098112 1238797384
+42372000000 42374097976 14124000000 14124699325 1239098112 1239797437
+42375000000 42377098150 14125000000 14125699383 1240098112 1240797495
+42378000000 42380098250 14126000000 14126699416 1241098112 1241797528
+42381000000 42383098428 14127000000 14127699476 1242098112 1242797588
+42384000000 42386098577 14128000000 14128699525 1243098112 1243797637
+42387000000 42389098705 14129000000 14129699568 1244098112 1244797680
+42390000000 42392098874 14130000000 14130699624 1245098112 1245797736
+42393000000 42395098994 14131000000 14131699664 1246098112 1246797776
+42396000000 42396926344 14132000000 14132308781 1247098112 1247406893
+42399000000 42401099244 14133000000 14133699748 1248098112 1248797860
+42402000000 42404099502 14134000000 14134699834 1249098112 1249797946
+42405000000 42407099607 14135000000 14135699869 1250098112 1250797981
+42408000000 42410099687 14136000000 14136699895 1251098112 1251798007
+42411000000 42413099834 14137000000 14137699944 1252098112 1252798056
+42414000000 42416100088 14138000000 14138700029 1253098112 1253798141
+42417000000 42419100178 14139000000 14139700059 1254098112 1254798171
+42420000000 42422100423 14140000000 14140700141 1255098112 1255798253
+42423000000 42425100501 14141000000 14141700167 1256098112 1256798279
+42426000000 42428100678 14142000000 14142700226 1257098112 1257798338
+42429000000 42431100824 14143000000 14143700274 1258098112 1258798386
+42432000000 42434100968 14144000000 14144700322 1259098112 1259798434
+42435000000 42435723622 14145000000 14145241207 1260098112 1260339319
+42438000000 42440101283 14146000000 14146700427 1261098112 1261798539
+42441000000 42443101443 14147000000 14147700481 1262098112 1262798593
+42444000000 42446101580 14148000000 14148700526 1263098112 1263798638
+42447000000 42449101738 14149000000 14149700579 1264098112 1264798691
+42450000000 42452101896 14150000000 14150700632 1265098112 1265798744
+42453000000 42455102010 14151000000 14151700670 1266098112 1266798782
+42456000000 42458102171 14152000000 14152700723 1267098112 1267798835
+42459000000 42461102298 14153000000 14153700766 1268098112 1268798878
+42462000000 42464102407 14154000000 14154700802 1269098112 1269798914
+42465000000 42467102549 14155000000 14155700849 1270098112 1270798961
+42468000000 42470102783 14156000000 14156700927 1271098112 1271799039
+42471000000 42473102696 14157000000 14157700898 1272098112 1272799010
+42474000000 42476102817 14158000000 14158700939 1273098112 1273799051
+42477000000 42479102925 14159000000 14159700975 1274098112 1274799087
+42480000000 42482103160 14160000000 14160701053 1275098112 1275799165
+42483000000 42485103339 14161000000 14161701113 1276098112 1276799225
+42486000000 42488016979 14162000000 14162672326 1277098112 1277770438
+42489000000 42491103608 14163000000 14163701202 1278098112 1278799314
+42492000000 42494103781 14164000000 14164701260 1279098112 1279799372
+42495000000 42497103897 14165000000 14165701299 1280098112 1280799411
+42498000000 42500104070 14166000000 14166701356 1281098112 1281799468
+42501000000 42503104242 14167000000 14167701414 1282098112 1282799526
+42504000000 42506104298 14168000000 14168701432 1283098112 1283799544
+42507000000 42509104444 14169000000 14169701481 1284098112 1284799593
+42510000000 42512104640 14170000000 14170701546 1285098112 1285799658
+42513000000 42515104669 14171000000 14171701556 1286098112 1286799668
+42516000000 42518104975 14172000000 14172701658 1287098112 1287799770
+42519000000 42521105147 14173000000 14173701715 1288098112 1288799827
+42522000000 42524105280 14174000000 14174701760 1289098112 1289799872
+42525000000 42527105397 14175000000 14175701799 1290098112 1290799911
+42528000000 42530105582 14176000000 14176701860 1291098112 1291799972
+42531000000 42533105688 14177000000 14177701896 1292098112 1292800008
+42534000000 42536105869 14178000000 14178701956 1293098112 1293800068
+42537000000 42539106081 14179000000 14179702027 1294098112 1294800139
+42540000000 42542106188 14180000000 14180702062 1295098112 1295800174
+42543000000 42545106354 14181000000 14181702118 1296098112 1296800230
+42546000000 42547705099 14182000000 14182568366 1297098112 1297666478
+42549000000 42551106625 14183000000 14183702208 1298098112 1298800320
+42552000000 42554106737 14184000000 14184702245 1299098112 1299800357
+42555000000 42557106946 14185000000 14185702315 1300098112 1300800427
+42558000000 42560107025 14186000000 14186702341 1301098112 1301800453
+42561000000 42563107250 14187000000 14187702416 1302098112 1302800528
+42564000000 42566107377 14188000000 14188702459 1303098112 1303800571
+42567000000 42569107466 14189000000 14189702488 1304098112 1304800600
+42570000000 42572107572 14190000000 14190702524 1305098112 1305800636
+42573000000 42575107783 14191000000 14191702594 1306098112 1306800706
+42576000000 42578107992 14192000000 14192702664 1307098112 1307800776
+42579000000 42581108137 14193000000 14193702712 1308098112 1308800824
+42582000000 42584108263 14194000000 14194702754 1309098112 1309800866
+42585000000 42587108429 14195000000 14195702809 1310098112 1310800921
+42588000000 42590108509 14196000000 14196702836 1311098112 1311800948
+42591000000 42593108744 14197000000 14197702914 1312098112 1312801026
+42594000000 42596108903 14198000000 14198702967 1313098112 1313801079
+42597000000 42599109024 14199000000 14199703008 1314098112 1314801120
+42600000000 42602109184 14200000000 14200703061 1315098112 1315801173
+42603000000 42605109267 14201000000 14201703089 1316098112 1316801201
+42606000000 42608109513 14202000000 14202703171 1317098112 1317801283
+42609000000 42611109636 14203000000 14203703212 1318098112 1318801324
+42612000000 42614109772 14204000000 14204703257 1319098112 1319801369
+42615000000 42617109947 14205000000 14205703315 1320098112 1320801427
+42618000000 42620110069 14206000000 14206703356 1321098112 1321801468
+42621000000 42623110219 14207000000 14207703406 1322098112 1322801518
+42624000000 42626110367 14208000000 14208703455 1323098112 1323801567
+42627000000 42628284061 14209000000 14209428020 1324098112 1324526132
+42630000000 42632110687 14210000000 14210703562 1325098112 1325801674
+42633000000 42635110819 14211000000 14211703606 1326098112 1326801718
+42636000000 42638110993 14212000000 14212703664 1327098112 1327801776
+42639000000 42641111112 14213000000 14213703704 1328098112 1328801816
+42642000000 42644111236 14214000000 14214703745 1329098112 1329801857
+42645000000 42647111455 14215000000 14215703818 1330098112 1330801930
+42648000000 42650111591 14216000000 14216703863 1331098112 1331801975
+42651000000 42653111742 14217000000 14217703914 1332098112 1332802026
+42654000000 42656111892 14218000000 14218703964 1333098112 1333802076
+42657000000 42659112007 14219000000 14219704002 1334098112 1334802114
+42660000000 42662112104 14220000000 14220704034 1335098112 1335802146
+42663000000 42665112312 14221000000 14221704104 1336098112 1336802216
+42666000000 42668112467 14222000000 14222704155 1337098112 1337802267
+42669000000 42671112626 14223000000 14223704208 1338098112 1338802320
+42672000000 42674112800 14224000000 14224704266 1339098112 1339802378
+42675000000 42677112900 14225000000 14225704300 1340098112 1340802412
+42678000000 42680113078 14226000000 14226704359 1341098112 1341802471
+42681000000 42683113227 14227000000 14227704409 1342098112 1342802521
+42684000000 42686113355 14228000000 14228704451 1343098112 1343802563
+42687000000 42689113524 14229000000 14229704508 1344098112 1344802620
+42690000000 42692113644 14230000000 14230704548 1345098112 1345802660
+42693000000 42693940994 14231000000 14231313664 1346098112 1346411776
+42696000000 42698113894 14232000000 14232704631 1347098112 1347802743
+42699000000 42701114152 14233000000 14233704717 1348098112 1348802829
+42702000000 42704114257 14234000000 14234704752 1349098112 1349802864
+42705000000 42707114337 14235000000 14235704779 1350098112 1350802891
+42708000000 42710114484 14236000000 14236704828 1351098112 1351802940
+42711000000 42713114738 14237000000 14237704912 1352098112 1352803024
+42714000000 42716114828 14238000000 14238704942 1353098112 1353803054
+42717000000 42719115073 14239000000 14239705024 1354098112 1354803136
+42720000000 42722115151 14240000000 14240705050 1355098112 1355803162
+42723000000 42725115328 14241000000 14241705109 1356098112 1356803221
+42726000000 42728115474 14242000000 14242705158 1357098112 1357803270
+42729000000 42731115618 14243000000 14243705206 1358098112 1358803318
+42732000000 42732738272 14244000000 14244246090 1359098112 1359344202
+42735000000 42737115933 14245000000 14245705311 1360098112 1360803423
+42738000000 42740116093 14246000000 14246705364 1361098112 1361803476
+42741000000 42743116230 14247000000 14247705410 1362098112 1362803522
+42744000000 42746116388 14248000000 14248705462 1363098112 1363803574
+42747000000 42749116546 14249000000 14249705515 1364098112 1364803627
+42750000000 42752116660 14250000000 14250705553 1365098112 1365803665
+42753000000 42755116821 14251000000 14251705607 1366098112 1366803719
+42756000000 42758116948 14252000000 14252705649 1367098112 1367803761
+42759000000 42761117057 14253000000 14253705685 1368098112 1368803797
+42762000000 42764117199 14254000000 14254705733 1369098112 1369803845
+42765000000 42767117433 14255000000 14255705811 1370098112 1370803923
+42768000000 42770117346 14256000000 14256705782 1371098112 1371803894
+42771000000 42773117467 14257000000 14257705822 1372098112 1372803934
+42774000000 42776117575 14258000000 14258705858 1373098112 1373803970
+42777000000 42779117810 14259000000 14259705936 1374098112 1374804048
+42780000000 42782117989 14260000000 14260705996 1375098112 1375804108
+42783000000 42785031629 14261000000 14261677209 1376098112 1376775321
+42786000000 42788118258 14262000000 14262706086 1377098112 1377804198
+42789000000 42791118431 14263000000 14263706143 1378098112 1378804255
+42792000000 42794118547 14264000000 14264706182 1379098112 1379804294
+42795000000 42797118720 14265000000 14265706240 1380098112 1380804352
+42798000000 42800118892 14266000000 14266706297 1381098112 1381804409
+42801000000 42803118948 14267000000 14267706316 1382098112 1382804428
+42804000000 42806119094 14268000000 14268706364 1383098112 1383804476
+42807000000 42809119290 14269000000 14269706430 1384098112 1384804542
+42810000000 42812119319 14270000000 14270706439 1385098112 1385804551
+42813000000 42815119625 14271000000 14271706541 1386098112 1386804653
+42816000000 42818119797 14272000000 14272706599 1387098112 1387804711
+42819000000 42821119930 14273000000 14273706643 1388098112 1388804755
+42822000000 42824120047 14274000000 14274706682 1389098112 1389804794
+42825000000 42827120232 14275000000 14275706744 1390098112 1390804856
+42828000000 42830120338 14276000000 14276706779 1391098112 1391804891
+42831000000 42833120519 14277000000 14277706839 1392098112 1392804951
+42834000000 42836120731 14278000000 14278706910 1393098112 1393805022
+42837000000 42839120838 14279000000 14279706946 1394098112 1394805058
+42840000000 42842121004 14280000000 14280707001 1395098112 1395805113
+42843000000 42844719749 14281000000 14281573249 1396098112 1396671361
+42846000000 42848121275 14282000000 14282707091 1397098112 1397805203
+42849000000 42851121387 14283000000 14283707129 1398098112 1398805241
+42852000000 42854121596 14284000000 14284707198 1399098112 1399805310
+42855000000 42857121675 14285000000 14285707225 1400098112 1400805337
+42858000000 42860121900 14286000000 14286707300 1401098112 1401805412
+42861000000 42863122027 14287000000 14287707342 1402098112 1402805454
+42864000000 42866122116 14288000000 14288707372 1403098112 1403805484
+42867000000 42869122222 14289000000 14289707407 1404098112 1404805519
+42870000000 42872122433 14290000000 14290707477 1405098112 1405805589
+42873000000 42875122642 14291000000 14291707547 1406098112 1406805659
+42876000000 42878122787 14292000000 14292707595 1407098112 1407805707
+42879000000 42881122913 14293000000 14293707637 1408098112 1408805749
+42882000000 42884123079 14294000000 14294707693 1409098112 1409805805
+42885000000 42887123159 14295000000 14295707719 1410098112 1410805831
+42888000000 42890123394 14296000000 14296707798 1411098112 1411805910
+42891000000 42893123553 14297000000 14297707851 1412098112 1412805963
+42894000000 42896123674 14298000000 14298707891 1413098112 1413806003
+42897000000 42899123834 14299000000 14299707944 1414098112 1414806056
+42900000000 42902123917 14300000000 14300707972 1415098112 1415806084
+42903000000 42905124163 14301000000 14301708054 1416098112 1416806166
+42906000000 42908124286 14302000000 14302708095 1417098112 1417806207
+42909000000 42911124422 14303000000 14303708140 1418098112 1418806252
+42912000000 42914124597 14304000000 14304708199 1419098112 1419806311
+42915000000 42917124719 14305000000 14305708239 1420098112 1420806351
+42918000000 42920124869 14306000000 14306708289 1421098112 1421806401
+42921000000 42923125017 14307000000 14307708339 1422098112 1422806451
+42924000000 42925298711 14308000000 14308432903 1423098112 1423531015
+42927000000 42929125337 14309000000 14309708445 1424098112 1424806557
+42930000000 42932125469 14310000000 14310708489 1425098112 1425806601
+42933000000 42935125643 14311000000 14311708547 1426098112 1426806659
+42936000000 42938125762 14312000000 14312708587 1427098112 1427806699
+42939000000 42941125886 14313000000 14313708628 1428098112 1428806740
+42942000000 42944126105 14314000000 14314708701 1429098112 1429806813
+42945000000 42947126241 14315000000 14315708747 1430098112 1430806859
+42948000000 42950126392 14316000000 14316708797 1431098112 1431806909
+42951000000 42953126542 14317000000 14317708847 1432098112 1432806959
+42954000000 42956126657 14318000000 14318708885 1433098112 1433806997
+42957000000 42959126754 14319000000 14319708918 1434098112 1434807030
+42960000000 42962126962 14320000000 14320708987 1435098112 1435807099
+42963000000 42965127117 14321000000 14321709039 1436098112 1436807151
+42966000000 42968127276 14322000000 14322709092 1437098112 1437807204
+42969000000 42971127450 14323000000 14323709150 1438098112 1438807262
+42972000000 42974127550 14324000000 14324709183 1439098112 1439807295
+42975000000 42977127728 14325000000 14325709242 1440098112 1440807354
+42978000000 42980127877 14326000000 14326709292 1441098112 1441807404
+42981000000 42983128005 14327000000 14327709335 1442098112 1442807447
+42984000000 42986128174 14328000000 14328709391 1443098112 1443807503
+42987000000 42989128294 14329000000 14329709431 1444098112 1444807543
+42990000000 42990955644 14330000000 14330318548 1445098112 1445416660
+42993000000 42995128544 14331000000 14331709514 1446098112 1446807626
+42996000000 42998128802 14332000000 14332709600 1447098112 1447807712
+42999000000 43001128907 14333000000 14333709635 1448098112 1448807747
+43002000000 43004128987 14334000000 14334709662 1449098112 1449807774
+43005000000 43007129134 14335000000 14335709711 1450098112 1450807823
+43008000000 43010129388 14336000000 14336709796 1451098112 1451807908
+43011000000 43013129478 14337000000 14337709826 1452098112 1452807938
+43014000000 43016129723 14338000000 14338709907 1453098112 1453808019
+43017000000 43019129801 14339000000 14339709933 1454098112 1454808045
+43020000000 43022129978 14340000000 14340709992 1455098112 1455808104
+43023000000 43025130124 14341000000 14341710041 1456098112 1456808153
+43026000000 43028130268 14342000000 14342710089 1457098112 1457808201
+43029000000 43029752922 14343000000 14343250974 1458098112 1458349086
+43032000000 43034130583 14344000000 14344710194 1459098112 1459808306
+43035000000 43037130743 14345000000 14345710247 1460098112 1460808359
+43038000000 43040130880 14346000000 14346710293 1461098112 1461808405
+43041000000 43043131038 14347000000 14347710346 1462098112 1462808458
+43044000000 43046131196 14348000000 14348710398 1463098112 1463808510
+43047000000 43049131310 14349000000 14349710436 1464098112 1464808548
+43050000000 43052131471 14350000000 14350710490 1465098112 1465808602
+43053000000 43055131598 14351000000 14351710532 1466098112 1466808644
+43056000000 43058131707 14352000000 14352710569 1467098112 1467808681
+43059000000 43061131849 14353000000 14353710616 1468098112 1468808728
+43062000000 43064132083 14354000000 14354710694 1469098112 1469808806
+43065000000 43067131996 14355000000 14355710665 1470098112 1470808777
+43068000000 43070132117 14356000000 14356710705 1471098112 1471808817
+43071000000 43073132225 14357000000 14357710741 1472098112 1472808853
+43074000000 43076132460 14358000000 14358710820 1473098112 1473808932
+43077000000 43079132639 14359000000 14359710879 1474098112 1474808991
+43080000000 43082046279 14360000000 14360682093 1475098112 1475780205
+43083000000 43085132908 14361000000 14361710969 1476098112 1476809081
+43086000000 43088133081 14362000000 14362711027 1477098112 1477809139
+43089000000 43091133197 14363000000 14363711065 1478098112 1478809177
+43092000000 43094133370 14364000000 14364711123 1479098112 1479809235
+43095000000 43097133542 14365000000 14365711180 1480098112 1480809292
+43098000000 43100133598 14366000000 14366711199 1481098112 1481809311
+43101000000 43103133744 14367000000 14367711248 1482098112 1482809360
+43104000000 43106133940 14368000000 14368711313 1483098112 1483809425
+43107000000 43109133969 14369000000 14369711323 1484098112 1484809435
+43110000000 43112134275 14370000000 14370711425 1485098112 1485809537
+43113000000 43115134447 14371000000 14371711482 1486098112 1486809594
+43116000000 43118134580 14372000000 14372711526 1487098112 1487809638
+43119000000 43121134697 14373000000 14373711565 1488098112 1488809677
+43122000000 43124134882 14374000000 14374711627 1489098112 1489809739
+43125000000 43127134988 14375000000 14375711662 1490098112 1490809774
+43128000000 43130135169 14376000000 14376711723 1491098112 1491809835
+43131000000 43133135381 14377000000 14377711793 1492098112 1492809905
+43134000000 43136135488 14378000000 14378711829 1493098112 1493809941
+43137000000 43139135654 14379000000 14379711884 1494098112 1494809996
+43140000000 43141734399 14380000000 14380578133 1495098112 1495676245
+43143000000 43145135925 14381000000 14381711975 1496098112 1496810087
+43146000000 43148136037 14382000000 14382712012 1497098112 1497810124
+43149000000 43151136246 14383000000 14383712082 1498098112 1498810194
+43152000000 43154136325 14384000000 14384712108 1499098112 1499810220
+43155000000 43157136550 14385000000 14385712183 1500098112 1500810295
+43158000000 43160136677 14386000000 14386712225 1501098112 1501810337
+43161000000 43163136766 14387000000 14387712255 1502098112 1502810367
+43164000000 43166136872 14388000000 14388712290 1503098112 1503810402
+43167000000 43169137083 14389000000 14389712361 1504098112 1504810473
+43170000000 43172137292 14390000000 14390712430 1505098112 1505810542
+43173000000 43175137437 14391000000 14391712479 1506098112 1506810591
+43176000000 43178137563 14392000000 14392712521 1507098112 1507810633
+43179000000 43181137729 14393000000 14393712576 1508098112 1508810688
+43182000000 43184137809 14394000000 14394712603 1509098112 1509810715
+43185000000 43187138044 14395000000 14395712681 1510098112 1510810793
+43188000000 43190138203 14396000000 14396712734 1511098112 1511810846
+43191000000 43193138324 14397000000 14397712774 1512098112 1512810886
+43194000000 43196138484 14398000000 14398712828 1513098112 1513810940
+43197000000 43199138567 14399000000 14399712855 1514098112 1514810967
+43200000000 43202138813 14400000000 14400712937 1515098112 1515811049
+43203000000 43205138936 14401000000 14401712978 1516098112 1516811090
+43206000000 43208139072 14402000000 14402713024 1517098112 1517811136
+43209000000 43211139247 14403000000 14403713082 1518098112 1518811194
+43212000000 43214139369 14404000000 14404713123 1519098112 1519811235
+43215000000 43217139519 14405000000 14405713173 1520098112 1520811285
+43218000000 43220139667 14406000000 14406713222 1521098112 1521811334
+43221000000 43222313361 14407000000 14407437787 1522098112 1522535899
+43224000000 43226139987 14408000000 14408713329 1523098112 1523811441
+43227000000 43229140119 14409000000 14409713373 1524098112 1524811485
+43230000000 43232140293 14410000000 14410713431 1525098112 1525811543
+43233000000 43235140412 14411000000 14411713470 1526098112 1526811582
+43236000000 43238140536 14412000000 14412713512 1527098112 1527811624
+43239000000 43241140755 14413000000 14413713585 1528098112 1528811697
+43242000000 43244140891 14414000000 14414713630 1529098112 1529811742
+43245000000 43247141042 14415000000 14415713680 1530098112 1530811792
+43248000000 43250141192 14416000000 14416713730 1531098112 1531811842
+43251000000 43253141307 14417000000 14417713769 1532098112 1532811881
+43254000000 43256141404 14418000000 14418713801 1533098112 1533811913
+43257000000 43259141612 14419000000 14419713870 1534098112 1534811982
+43260000000 43262141767 14420000000 14420713922 1535098112 1535812034
+43263000000 43265141926 14421000000 14421713975 1536098112 1536812087
+43266000000 43268142100 14422000000 14422714033 1537098112 1537812145
+43269000000 43271142200 14423000000 14423714066 1538098112 1538812178
+43272000000 43274142378 14424000000 14424714126 1539098112 1539812238
+43275000000 43277142527 14425000000 14425714175 1540098112 1540812287
+43278000000 43280142655 14426000000 14426714218 1541098112 1541812330
+43281000000 43283142824 14427000000 14427714274 1542098112 1542812386
+43284000000 43286142944 14428000000 14428714314 1543098112 1543812426
+43287000000 43287970294 14429000000 14429323431 1544098112 1544421543
+43290000000 43292143194 14430000000 14430714398 1545098112 1545812510
+43293000000 43295143452 14431000000 14431714484 1546098112 1546812596
+43296000000 43298143557 14432000000 14432714519 1547098112 1547812631
+43299000000 43301143637 14433000000 14433714545 1548098112 1548812657
+43302000000 43304143784 14434000000 14434714594 1549098112 1549812706
+43305000000 43307144038 14435000000 14435714679 1550098112 1550812791
+43308000000 43310144128 14436000000 14436714709 1551098112 1551812821
+43311000000 43313144373 14437000000 14437714791 1552098112 1552812903
+43314000000 43316144451 14438000000 14438714817 1553098112 1553812929
+43317000000 43319144628 14439000000 14439714876 1554098112 1554812988
+43320000000 43322144774 14440000000 14440714924 1555098112 1555813036
+43323000000 43325144918 14441000000 14441714972 1556098112 1556813084
+43326000000 43326767572 14442000000 14442255857 1557098112 1557353969
+43329000000 43331145233 14443000000 14443715077 1558098112 1558813189
+43332000000 43334145393 14444000000 14444715131 1559098112 1559813243
+43335000000 43337145530 14445000000 14445715176 1560098112 1560813288
+43338000000 43340145688 14446000000 14446715229 1561098112 1561813341
+43341000000 43343145846 14447000000 14447715282 1562098112 1562813394
+43344000000 43346145960 14448000000 14448715320 1563098112 1563813432
+43347000000 43349146121 14449000000 14449715373 1564098112 1564813485
+43350000000 43352146248 14450000000 14450715416 1565098112 1565813528
+43353000000 43355146357 14451000000 14451715452 1566098112 1566813564
+43356000000 43358146499 14452000000 14452715499 1567098112 1567813611
+43359000000 43361146733 14453000000 14453715577 1568098112 1568813689
+43362000000 43364146646 14454000000 14454715548 1569098112 1569813660
+43365000000 43367146767 14455000000 14455715589 1570098112 1570813701
+43368000000 43370146875 14456000000 14456715625 1571098112 1571813737
+43371000000 43373147110 14457000000 14457715703 1572098112 1572813815
+43374000000 43376147289 14458000000 14458715763 1573098112 1573813875
+43377000000 43379060929 14459000000 14459686976 1574098112 1574785088
+43380000000 43382147558 14460000000 14460715852 1575098112 1575813964
+43383000000 43385147731 14461000000 14461715910 1576098112 1576814022
+43386000000 43388147847 14462000000 14462715949 1577098112 1577814061
+43389000000 43391148020 14463000000 14463716006 1578098112 1578814118
+43392000000 43394148192 14464000000 14464716064 1579098112 1579814176
+43395000000 43397148248 14465000000 14465716082 1580098112 1580814194
+43398000000 43400148394 14466000000 14466716131 1581098112 1581814243
+43401000000 43403148590 14467000000 14467716196 1582098112 1582814308
+43404000000 43406148619 14468000000 14468716206 1583098112 1583814318
+43407000000 43409148925 14469000000 14469716308 1584098112 1584814420
+43410000000 43412149097 14470000000 14470716365 1585098112 1585814477
+43413000000 43415149230 14471000000 14471716410 1586098112 1586814522
+43416000000 43418149347 14472000000 14472716449 1587098112 1587814561
+43419000000 43421149532 14473000000 14473716510 1588098112 1588814622
+43422000000 43424149638 14474000000 14474716546 1589098112 1589814658
+43425000000 43427149819 14475000000 14475716606 1590098112 1590814718
+43428000000 43430150031 14476000000 14476716677 1591098112 1591814789
+43431000000 43433150138 14477000000 14477716712 1592098112 1592814824
+43434000000 43436150304 14478000000 14478716768 1593098112 1593814880
+43437000000 43438749049 14479000000 14479583016 1594098112 1594681128
+43440000000 43442150575 14480000000 14480716858 1595098112 1595814970
+43443000000 43445150687 14481000000 14481716895 1596098112 1596815007
+43446000000 43448150896 14482000000 14482716965 1597098112 1597815077
+43449000000 43451150975 14483000000 14483716991 1598098112 1598815103
+43452000000 43454151200 14484000000 14484717066 1599098112 1599815178
+43455000000 43457151327 14485000000 14485717109 1600098112 1600815221
+43458000000 43460151416 14486000000 14486717138 1601098112 1601815250
+43461000000 43463151522 14487000000 14487717174 1602098112 1602815286
+43464000000 43466151733 14488000000 14488717244 1603098112 1603815356
+43467000000 43469151942 14489000000 14489717314 1604098112 1604815426
+43470000000 43472152087 14490000000 14490717362 1605098112 1605815474
+43473000000 43475152213 14491000000 14491717404 1606098112 1606815516
+43476000000 43478152379 14492000000 14492717459 1607098112 1607815571
+43479000000 43481152459 14493000000 14493717486 1608098112 1608815598
+43482000000 43484152694 14494000000 14494717564 1609098112 1609815676
+43485000000 43487152853 14495000000 14495717617 1610098112 1610815729
+43488000000 43490152974 14496000000 14496717658 1611098112 1611815770
+43491000000 43493153134 14497000000 14497717711 1612098112 1612815823
+43494000000 43496153217 14498000000 14498717739 1613098112 1613815851
+43497000000 43499153463 14499000000 14499717821 1614098112 1614815933
+43500000000 43502153586 14500000000 14500717862 1615098112 1615815974
+43503000000 43505153722 14501000000 14501717907 1616098112 1616816019
+43506000000 43508153897 14502000000 14502717965 1617098112 1617816077
+43509000000 43511154019 14503000000 14503718006 1618098112 1618816118
+43512000000 43514154169 14504000000 14504718056 1619098112 1619816168
+43515000000 43517154317 14505000000 14505718105 1620098112 1620816217
+43518000000 43519328011 14506000000 14506442670 1621098112 1621540782
+43521000000 43523154637 14507000000 14507718212 1622098112 1622816324
+43524000000 43526154769 14508000000 14508718256 1623098112 1623816368
+43527000000 43529154943 14509000000 14509718314 1624098112 1624816426
+43530000000 43532155062 14510000000 14510718354 1625098112 1625816466
+43533000000 43535155186 14511000000 14511718395 1626098112 1626816507
+43536000000 43538155405 14512000000 14512718468 1627098112 1627816580
+43539000000 43541155541 14513000000 14513718513 1628098112 1628816625
+43542000000 43544155692 14514000000 14514718564 1629098112 1629816676
+43545000000 43547155842 14515000000 14515718614 1630098112 1630816726
+43548000000 43550155957 14516000000 14516718652 1631098112 1631816764
+43551000000 43553156054 14517000000 14517718684 1632098112 1632816796
+43554000000 43556156262 14518000000 14518718754 1633098112 1633816866
+43557000000 43559156417 14519000000 14519718805 1634098112 1634816917
+43560000000 43562156576 14520000000 14520718858 1635098112 1635816970
+43563000000 43565156750 14521000000 14521718916 1636098112 1636817028
+43566000000 43568156850 14522000000 14522718950 1637098112 1637817062
+43569000000 43571157028 14523000000 14523719009 1638098112 1638817121
+43572000000 43574157177 14524000000 14524719059 1639098112 1639817171
+43575000000 43577157305 14525000000 14525719101 1640098112 1640817213
+43578000000 43580157474 14526000000 14526719158 1641098112 1641817270
+43581000000 43583157594 14527000000 14527719198 1642098112 1642817310
+43584000000 43584984944 14528000000 14528328314 1643098112 1643426426
+43587000000 43589157844 14529000000 14529719281 1644098112 1644817393
+43590000000 43592158102 14530000000 14530719367 1645098112 1645817479
+43593000000 43595158207 14531000000 14531719402 1646098112 1646817514
+43596000000 43598158287 14532000000 14532719429 1647098112 1647817541
+43599000000 43601158434 14533000000 14533719478 1648098112 1648817590
+43602000000 43604158688 14534000000 14534719562 1649098112 1649817674
+43605000000 43607158778 14535000000 14535719592 1650098112 1650817704
+43608000000 43610159023 14536000000 14536719674 1651098112 1651817786
+43611000000 43613159101 14537000000 14537719700 1652098112 1652817812
+43614000000 43616159278 14538000000 14538719759 1653098112 1653817871
+43617000000 43619159424 14539000000 14539719808 1654098112 1654817920
+43620000000 43622159568 14540000000 14540719856 1655098112 1655817968
+43623000000 43623782222 14541000000 14541260740 1656098112 1656358852
+43626000000 43628159883 14542000000 14542719961 1657098112 1657818073
+43629000000 43631160043 14543000000 14543720014 1658098112 1658818126
+43632000000 43634160180 14544000000 14544720060 1659098112 1659818172
+43635000000 43637160338 14545000000 14545720112 1660098112 1660818224
+43638000000 43640160496 14546000000 14546720165 1661098112 1661818277
+43641000000 43643160610 14547000000 14547720203 1662098112 1662818315
+43644000000 43646160771 14548000000 14548720257 1663098112 1663818369
+43647000000 43649160898 14549000000 14549720299 1664098112 1664818411
+43650000000 43652161007 14550000000 14550720335 1665098112 1665818447
+43653000000 43655161149 14551000000 14551720383 1666098112 1666818495
+43656000000 43658161383 14552000000 14552720461 1667098112 1667818573
+43659000000 43661161296 14553000000 14553720432 1668098112 1668818544
+43662000000 43664161417 14554000000 14554720472 1669098112 1669818584
+43665000000 43667161525 14555000000 14555720508 1670098112 1670818620
+43668000000 43670161760 14556000000 14556720586 1671098112 1671818698
+43671000000 43673161939 14557000000 14557720646 1672098112 1672818758
+43674000000 43676075579 14558000000 14558691859 1673098112 1673789971
+43677000000 43679162208 14559000000 14559720736 1674098112 1674818848
+43680000000 43682162381 14560000000 14560720793 1675098112 1675818905
+43683000000 43685162497 14561000000 14561720832 1676098112 1676818944
+43686000000 43688162670 14562000000 14562720890 1677098112 1677819002
+43689000000 43691162842 14563000000 14563720947 1678098112 1678819059
+43692000000 43694162898 14564000000 14564720966 1679098112 1679819078
+43695000000 43697163044 14565000000 14565721014 1680098112 1680819126
+43698000000 43700163240 14566000000 14566721080 1681098112 1681819192
+43701000000 43703163269 14567000000 14567721089 1682098112 1682819201
+43704000000 43706163575 14568000000 14568721191 1683098112 1683819303
+43707000000 43709163747 14569000000 14569721249 1684098112 1684819361
+43710000000 43712163880 14570000000 14570721293 1685098112 1685819405
+43713000000 43715163997 14571000000 14571721332 1686098112 1686819444
+43716000000 43718164182 14572000000 14572721394 1687098112 1687819506
+43719000000 43721164288 14573000000 14573721429 1688098112 1688819541
+43722000000 43724164469 14574000000 14574721489 1689098112 1689819601
+43725000000 43727164681 14575000000 14575721560 1690098112 1690819672
+43728000000 43730164788 14576000000 14576721596 1691098112 1691819708
+43731000000 43733164954 14577000000 14577721651 1692098112 1692819763
+43734000000 43735763699 14578000000 14578587899 1693098112 1693686011
+43737000000 43739165225 14579000000 14579721741 1694098112 1694819853
+43740000000 43742165337 14580000000 14580721779 1695098112 1695819891
+43743000000 43745165546 14581000000 14581721848 1696098112 1696819960
+43746000000 43748165625 14582000000 14582721875 1697098112 1697819987
+43749000000 43751165850 14583000000 14583721950 1698098112 1698820062
+43752000000 43754165977 14584000000 14584721992 1699098112 1699820104
+43755000000 43757166066 14585000000 14585722022 1700098112 1700820134
+43758000000 43760166172 14586000000 14586722057 1701098112 1701820169
+43761000000 43763166383 14587000000 14587722127 1702098112 1702820239
+43764000000 43766166592 14588000000 14588722197 1703098112 1703820309
+43767000000 43769166737 14589000000 14589722245 1704098112 1704820357
+43770000000 43772166863 14590000000 14590722287 1705098112 1705820399
+43773000000 43775167029 14591000000 14591722343 1706098112 1706820455
+43776000000 43778167109 14592000000 14592722369 1707098112 1707820481
+43779000000 43781167344 14593000000 14593722448 1708098112 1708820560
+43782000000 43784167503 14594000000 14594722501 1709098112 1709820613
+43785000000 43787167624 14595000000 14595722541 1710098112 1710820653
+43788000000 43790167784 14596000000 14596722594 1711098112 1711820706
+43791000000 43793167867 14597000000 14597722622 1712098112 1712820734
+43794000000 43796168113 14598000000 14598722704 1713098112 1713820816
+43797000000 43799168236 14599000000 14599722745 1714098112 1714820857
+43800000000 43802168372 14600000000 14600722790 1715098112 1715820902
+43803000000 43805168547 14601000000 14601722849 1716098112 1716820961
+43806000000 43808168669 14602000000 14602722889 1717098112 1717821001
+43809000000 43811168819 14603000000 14603722939 1718098112 1718821051
+43812000000 43814168967 14604000000 14604722989 1719098112 1719821101
+43815000000 43816342661 14605000000 14605447553 1720098112 1720545665
+43818000000 43820169287 14606000000 14606723095 1721098112 1721821207
+43821000000 43823169419 14607000000 14607723139 1722098112 1722821251
+43824000000 43826169593 14608000000 14608723197 1723098112 1723821309
+43827000000 43829169712 14609000000 14609723237 1724098112 1724821349
+43830000000 43832169836 14610000000 14610723278 1725098112 1725821390
+43833000000 43835170055 14611000000 14611723351 1726098112 1726821463
+43836000000 43838170191 14612000000 14612723397 1727098112 1727821509
+43839000000 43841170342 14613000000 14613723447 1728098112 1728821559
+43842000000 43844170492 14614000000 14614723497 1729098112 1729821609
+43845000000 43847170607 14615000000 14615723535 1730098112 1730821647
+43848000000 43850170704 14616000000 14616723568 1731098112 1731821680
+43851000000 43853170912 14617000000 14617723637 1732098112 1732821749
+43854000000 43856171067 14618000000 14618723689 1733098112 1733821801
+43857000000 43859171226 14619000000 14619723742 1734098112 1734821854
+43860000000 43862171400 14620000000 14620723800 1735098112 1735821912
+43863000000 43865171500 14621000000 14621723833 1736098112 1736821945
+43866000000 43868171678 14622000000 14622723892 1737098112 1737822004
+43869000000 43871171827 14623000000 14623723942 1738098112 1738822054
+43872000000 43874171955 14624000000 14624723985 1739098112 1739822097
+43875000000 43877172124 14625000000 14625724041 1740098112 1740822153
+43878000000 43880172244 14626000000 14626724081 1741098112 1741822193
+43881000000 43881999594 14627000000 14627333198 1742098112 1742431310
+43884000000 43886172494 14628000000 14628724164 1743098112 1743822276
+43887000000 43889172752 14629000000 14629724250 1744098112 1744822362
+43890000000 43892172857 14630000000 14630724285 1745098112 1745822397
+43893000000 43895172937 14631000000 14631724312 1746098112 1746822424
+43896000000 43898173084 14632000000 14632724361 1747098112 1747822473
+43899000000 43901173338 14633000000 14633724446 1748098112 1748822558
+43902000000 43904173428 14634000000 14634724476 1749098112 1749822588
+43905000000 43907173673 14635000000 14635724557 1750098112 1750822669
+43908000000 43910173751 14636000000 14636724583 1751098112 1751822695
+43911000000 43913173928 14637000000 14637724642 1752098112 1752822754
+43914000000 43916174074 14638000000 14638724691 1753098112 1753822803
+43917000000 43919174218 14639000000 14639724739 1754098112 1754822851
+43920000000 43920796872 14640000000 14640265624 1755098112 1755363736
+43923000000 43925174533 14641000000 14641724844 1756098112 1756822956
+43926000000 43928174693 14642000000 14642724897 1757098112 1757823009
+43929000000 43931174830 14643000000 14643724943 1758098112 1758823055
+43932000000 43934174988 14644000000 14644724996 1759098112 1759823108
+43935000000 43937175146 14645000000 14645725048 1760098112 1760823160
+43938000000 43940175260 14646000000 14646725086 1761098112 1761823198
+43941000000 43943175421 14647000000 14647725140 1762098112 1762823252
+43944000000 43946175548 14648000000 14648725182 1763098112 1763823294
+43947000000 43949175657 14649000000 14649725219 1764098112 1764823331
+43950000000 43952175799 14650000000 14650725266 1765098112 1765823378
+43953000000 43955176033 14651000000 14651725344 1766098112 1766823456
+43956000000 43958175946 14652000000 14652725315 1767098112 1767823427
+43959000000 43961176067 14653000000 14653725355 1768098112 1768823467
+43962000000 43964176175 14654000000 14654725391 1769098112 1769823503
+43965000000 43967176410 14655000000 14655725470 1770098112 1770823582
+43968000000 43970176589 14656000000 14656725529 1771098112 1771823641
+43971000000 43973090229 14657000000 14657696743 1772098112 1772794855
+43974000000 43976176858 14658000000 14658725619 1773098112 1773823731
+43977000000 43979177031 14659000000 14659725677 1774098112 1774823789
+43980000000 43982177147 14660000000 14660725715 1775098112 1775823827
+43983000000 43985177320 14661000000 14661725773 1776098112 1776823885
+43986000000 43988177492 14662000000 14662725830 1777098112 1777823942
+43989000000 43991177548 14663000000 14663725849 1778098112 1778823961
+43992000000 43994177694 14664000000 14664725898 1779098112 1779824010
+43995000000 43997177890 14665000000 14665725963 1780098112 1780824075
+43998000000 44000177919 14666000000 14666725973 1781098112 1781824085
+44001000000 44003178225 14667000000 14667726075 1782098112 1782824187
+44004000000 44006178397 14668000000 14668726132 1783098112 1783824244
+44007000000 44009178530 14669000000 14669726176 1784098112 1784824288
+44010000000 44012178647 14670000000 14670726215 1785098112 1785824327
+44013000000 44015178832 14671000000 14671726277 1786098112 1786824389
+44016000000 44018178938 14672000000 14672726312 1787098112 1787824424
+44019000000 44021179119 14673000000 14673726373 1788098112 1788824485
+44022000000 44024179331 14674000000 14674726443 1789098112 1789824555
+44025000000 44027179438 14675000000 14675726479 1790098112 1790824591
+44028000000 44030179604 14676000000 14676726534 1791098112 1791824646
+44031000000 44032778349 14677000000 14677592783 1792098112 1792690895
+44034000000 44036179875 14678000000 14678726625 1793098112 1793824737
+44037000000 44039179987 14679000000 14679726662 1794098112 1794824774
+44040000000 44042180196 14680000000 14680726732 1795098112 1795824844
+44043000000 44045180275 14681000000 14681726758 1796098112 1796824870
+44046000000 44048180500 14682000000 14682726833 1797098112 1797824945
+44049000000 44051180627 14683000000 14683726875 1798098112 1798824987
+44052000000 44054180716 14684000000 14684726905 1799098112 1799825017
+44055000000 44057180822 14685000000 14685726940 1800098112 1800825052
+44058000000 44060181033 14686000000 14686727011 1801098112 1801825123
+44061000000 44063181242 14687000000 14687727080 1802098112 1802825192
+44064000000 44066181387 14688000000 14688727129 1803098112 1803825241
+44067000000 44069181513 14689000000 14689727171 1804098112 1804825283
+44070000000 44072181679 14690000000 14690727226 1805098112 1805825338
+44073000000 44075181759 14691000000 14691727253 1806098112 1806825365
+44076000000 44078181994 14692000000 14692727331 1807098112 1807825443
+44079000000 44081182153 14693000000 14693727384 1808098112 1808825496
+44082000000 44084182274 14694000000 14694727424 1809098112 1809825536
+44085000000 44087182434 14695000000 14695727478 1810098112 1810825590
+44088000000 44090182517 14696000000 14696727505 1811098112 1811825617
+44091000000 44093182763 14697000000 14697727587 1812098112 1812825699
+44094000000 44096182886 14698000000 14698727628 1813098112 1813825740
+44097000000 44099183022 14699000000 14699727674 1814098112 1814825786
+44100000000 44102183197 14700000000 14700727732 1815098112 1815825844
+44103000000 44105183319 14701000000 14701727773 1816098112 1816825885
+44106000000 44108183469 14702000000 14702727823 1817098112 1817825935
+44109000000 44111183617 14703000000 14703727872 1818098112 1818825984
+44112000000 44113357311 14704000000 14704452437 1819098112 1819550549
+44115000000 44117183937 14705000000 14705727979 1820098112 1820826091
+44118000000 44120184069 14706000000 14706728023 1821098112 1821826135
+44121000000 44123184243 14707000000 14707728081 1822098112 1822826193
+44124000000 44126184362 14708000000 14708728120 1823098112 1823826232
+44127000000 44129184486 14709000000 14709728162 1824098112 1824826274
+44130000000 44132184705 14710000000 14710728235 1825098112 1825826347
+44133000000 44135184841 14711000000 14711728280 1826098112 1826826392
+44136000000 44138184992 14712000000 14712728330 1827098112 1827826442
+44139000000 44141185142 14713000000 14713728380 1828098112 1828826492
+44142000000 44144185257 14714000000 14714728419 1829098112 1829826531
+44145000000 44147185354 14715000000 14715728451 1830098112 1830826563
+44148000000 44150185562 14716000000 14716728520 1831098112 1831826632
+44151000000 44153185717 14717000000 14717728572 1832098112 1832826684
+44154000000 44156185876 14718000000 14718728625 1833098112 1833826737
+44157000000 44159186050 14719000000 14719728683 1834098112 1834826795
+44160000000 44162186150 14720000000 14720728716 1835098112 1835826828
+44163000000 44165186328 14721000000 14721728776 1836098112 1836826888
+44166000000 44168186477 14722000000 14722728825 1837098112 1837826937
+44169000000 44171186605 14723000000 14723728868 1838098112 1838826980
+44172000000 44174186774 14724000000 14724728924 1839098112 1839827036
+44175000000 44177186894 14725000000 14725728964 1840098112 1840827076
+44178000000 44179014244 14726000000 14726338081 1841098112 1841436193
+44181000000 44183187144 14727000000 14727729048 1842098112 1842827160
+44184000000 44186187402 14728000000 14728729134 1843098112 1843827246
+44187000000 44189187507 14729000000 14729729169 1844098112 1844827281
+44190000000 44192187587 14730000000 14730729195 1845098112 1845827307
+44193000000 44195187734 14731000000 14731729244 1846098112 1846827356
+44196000000 44198187988 14732000000 14732729329 1847098112 1847827441
+44199000000 44201188078 14733000000 14733729359 1848098112 1848827471
+44202000000 44204188323 14734000000 14734729441 1849098112 1849827553
+44205000000 44207188401 14735000000 14735729467 1850098112 1850827579
+44208000000 44210188578 14736000000 14736729526 1851098112 1851827638
+44211000000 44213188724 14737000000 14737729574 1852098112 1852827686
+44214000000 44216188868 14738000000 14738729622 1853098112 1853827734
+44217000000 44217811522 14739000000 14739270507 1854098112 1854368619
+44220000000 44222189183 14740000000 14740729727 1855098112 1855827839
+44223000000 44225189343 14741000000 14741729781 1856098112 1856827893
+44226000000 44228189480 14742000000 14742729826 1857098112 1857827938
+44229000000 44231189638 14743000000 14743729879 1858098112 1858827991
+44232000000 44234189796 14744000000 14744729932 1859098112 1859828044
+44235000000 44237189910 14745000000 14745729970 1860098112 1860828082
+44238000000 44240190071 14746000000 14746730023 1861098112 1861828135
+44241000000 44243190198 14747000000 14747730066 1862098112 1862828178
+44244000000 44246190307 14748000000 14748730102 1863098112 1863828214
+44247000000 44249190449 14749000000 14749730149 1864098112 1864828261
+44250000000 44252190683 14750000000 14750730227 1865098112 1865828339
+44253000000 44255190596 14751000000 14751730198 1866098112 1866828310
+44256000000 44258190717 14752000000 14752730239 1867098112 1867828351
+44259000000 44261190825 14753000000 14753730275 1868098112 1868828387
+44262000000 44264191060 14754000000 14754730353 1869098112 1869828465
+44265000000 44267191239 14755000000 14755730413 1870098112 1870828525
+44268000000 44270104879 14756000000 14756701626 1871098112 1871799738
+44271000000 44273191508 14757000000 14757730502 1872098112 1872828614
+44274000000 44276191681 14758000000 14758730560 1873098112 1873828672
+44277000000 44279191797 14759000000 14759730599 1874098112 1874828711
+44280000000 44282191970 14760000000 14760730656 1875098112 1875828768
+44283000000 44285192142 14761000000 14761730714 1876098112 1876828826
+44286000000 44288192198 14762000000 14762730732 1877098112 1877828844
+44289000000 44291192344 14763000000 14763730781 1878098112 1878828893
+44292000000 44294192540 14764000000 14764730846 1879098112 1879828958
+44295000000 44297192569 14765000000 14765730856 1880098112 1880828968
+44298000000 44300192875 14766000000 14766730958 1881098112 1881829070
+44301000000 44303193047 14767000000 14767731015 1882098112 1882829127
+44304000000 44306193180 14768000000 14768731060 1883098112 1883829172
+44307000000 44309193297 14769000000 14769731099 1884098112 1884829211
+44310000000 44312193482 14770000000 14770731160 1885098112 1885829272
+44313000000 44315193588 14771000000 14771731196 1886098112 1886829308
+44316000000 44318193769 14772000000 14772731256 1887098112 1887829368
+44319000000 44321193981 14773000000 14773731327 1888098112 1888829439
+44322000000 44324194088 14774000000 14774731362 1889098112 1889829474
+44325000000 44327194254 14775000000 14775731418 1890098112 1890829530
+44328000000 44329792999 14776000000 14776597666 1891098112 1891695778
+44331000000 44333194525 14777000000 14777731508 1892098112 1892829620
+44334000000 44336194637 14778000000 14778731545 1893098112 1893829657
+44337000000 44339194846 14779000000 14779731615 1894098112 1894829727
+44340000000 44342194925 14780000000 14780731641 1895098112 1895829753
+44343000000 44345195150 14781000000 14781731716 1896098112 1896829828
+44346000000 44348195277 14782000000 14782731759 1897098112 1897829871
+44349000000 44351195366 14783000000 14783731788 1898098112 1898829900
+44352000000 44354195472 14784000000 14784731824 1899098112 1899829936
+44355000000 44357195683 14785000000 14785731894 1900098112 1900830006
+44358000000 44360195892 14786000000 14786731964 1901098112 1901830076
+44361000000 44363196037 14787000000 14787732012 1902098112 1902830124
+44364000000 44366196163 14788000000 14788732054 1903098112 1903830166
+44367000000 44369196329 14789000000 14789732109 1904098112 1904830221
+44370000000 44372196409 14790000000 14790732136 1905098112 1905830248
+44373000000 44375196644 14791000000 14791732214 1906098112 1906830326
+44376000000 44378196803 14792000000 14792732267 1907098112 1907830379
+44379000000 44381196924 14793000000 14793732308 1908098112 1908830420
+44382000000 44384197084 14794000000 14794732361 1909098112 1909830473
+44385000000 44387197167 14795000000 14795732389 1910098112 1910830501
+44388000000 44390197413 14796000000 14796732471 1911098112 1911830583
+44391000000 44393197536 14797000000 14797732512 1912098112 1912830624
+44394000000 44396197672 14798000000 14798732557 1913098112 1913830669
+44397000000 44399197847 14799000000 14799732615 1914098112 1914830727
+44400000000 44402197969 14800000000 14800732656 1915098112 1915830768
+44403000000 44405198119 14801000000 14801732706 1916098112 1916830818
+44406000000 44408198267 14802000000 14802732755 1917098112 1917830867
+44409000000 44410371961 14803000000 14803457320 1918098112 1918555432
+44412000000 44414198587 14804000000 14804732862 1919098112 1919830974
+44415000000 44417198719 14805000000 14805732906 1920098112 1920831018
+44418000000 44420198893 14806000000 14806732964 1921098112 1921831076
+44421000000 44423199012 14807000000 14807733004 1922098112 1922831116
+44424000000 44426199136 14808000000 14808733045 1923098112 1923831157
+44427000000 44429199355 14809000000 14809733118 1924098112 1924831230
+44430000000 44432199491 14810000000 14810733163 1925098112 1925831275
+44433000000 44435199642 14811000000 14811733214 1926098112 1926831326
+44436000000 44438199792 14812000000 14812733264 1927098112 1927831376
+44439000000 44441199907 14813000000 14813733302 1928098112 1928831414
+44442000000 44444200004 14814000000 14814733334 1929098112 1929831446
+44445000000 44447200212 14815000000 14815733404 1930098112 1930831516
+44448000000 44450200367 14816000000 14816733455 1931098112 1931831567
+44451000000 44453200526 14817000000 14817733508 1932098112 1932831620
+44454000000 44456200700 14818000000 14818733566 1933098112 1933831678
+44457000000 44459200800 14819000000 14819733600 1934098112 1934831712
+44460000000 44462200978 14820000000 14820733659 1935098112 1935831771
+44463000000 44465201127 14821000000 14821733709 1936098112 1936831821
+44466000000 44468201255 14822000000 14822733751 1937098112 1937831863
+44469000000 44471201424 14823000000 14823733808 1938098112 1938831920
+44472000000 44474201544 14824000000 14824733848 1939098112 1939831960
+44475000000 44476028894 14825000000 14825342964 1940098112 1940441076
+44478000000 44480201794 14826000000 14826733931 1941098112 1941832043
+44481000000 44483202052 14827000000 14827734017 1942098112 1942832129
+44484000000 44486202157 14828000000 14828734052 1943098112 1943832164
+44487000000 44489202237 14829000000 14829734079 1944098112 1944832191
+44490000000 44492202384 14830000000 14830734128 1945098112 1945832240
+44493000000 44495202638 14831000000 14831734212 1946098112 1946832324
+44496000000 44498202728 14832000000 14832734242 1947098112 1947832354
+44499000000 44501202973 14833000000 14833734324 1948098112 1948832436
+44502000000 44504203051 14834000000 14834734350 1949098112 1949832462
+44505000000 44507203228 14835000000 14835734409 1950098112 1950832521
+44508000000 44510203374 14836000000 14836734458 1951098112 1951832570
+44511000000 44513203518 14837000000 14837734506 1952098112 1952832618
+44514000000 44514826172 14838000000 14838275390 1953098112 1953373502
+44517000000 44519203833 14839000000 14839734611 1954098112 1954832723
+44520000000 44522203993 14840000000 14840734664 1955098112 1955832776
+44523000000 44525204130 14841000000 14841734710 1956098112 1956832822
+44526000000 44528204288 14842000000 14842734762 1957098112 1957832874
+44529000000 44531204446 14843000000 14843734815 1958098112 1958832927
+44532000000 44534204560 14844000000 14844734853 1959098112 1959832965
+44535000000 44537204721 14845000000 14845734907 1960098112 1960833019
+44538000000 44540204848 14846000000 14846734949 1961098112 1961833061
+44541000000 44543204957 14847000000 14847734985 1962098112 1962833097
+44544000000 44546205099 14848000000 14848735033 1963098112 1963833145
+44547000000 44549205333 14849000000 14849735111 1964098112 1964833223
+44550000000 44552205246 14850000000 14850735082 1965098112 1965833194
+44553000000 44555205367 14851000000 14851735122 1966098112 1966833234
+44556000000 44558205475 14852000000 14852735158 1967098112 1967833270
+44559000000 44561205710 14853000000 14853735236 1968098112 1968833348
+44562000000 44564205889 14854000000 14854735296 1969098112 1969833408
+44565000000 44567119529 14855000000 14855706509 1970098112 1970804621
+44568000000 44570206158 14856000000 14856735386 1971098112 1971833498
+44571000000 44573206331 14857000000 14857735443 1972098112 1972833555
+44574000000 44576206447 14858000000 14858735482 1973098112 1973833594
+44577000000 44579206620 14859000000 14859735540 1974098112 1974833652
+44580000000 44582206792 14860000000 14860735597 1975098112 1975833709
+44583000000 44585206848 14861000000 14861735616 1976098112 1976833728
+44586000000 44588206994 14862000000 14862735664 1977098112 1977833776
+44589000000 44591207190 14863000000 14863735730 1978098112 1978833842
+44592000000 44594207219 14864000000 14864735739 1979098112 1979833851
+44595000000 44597207525 14865000000 14865735841 1980098112 1980833953
+44598000000 44600207697 14866000000 14866735899 1981098112 1981834011
+44601000000 44603207830 14867000000 14867735943 1982098112 1982834055
+44604000000 44606207947 14868000000 14868735982 1983098112 1983834094
+44607000000 44609208132 14869000000 14869736044 1984098112 1984834156
+44610000000 44612208238 14870000000 14870736079 1985098112 1985834191
+44613000000 44615208419 14871000000 14871736139 1986098112 1986834251
+44616000000 44618208631 14872000000 14872736210 1987098112 1987834322
+44619000000 44621208738 14873000000 14873736246 1988098112 1988834358
+44622000000 44624208904 14874000000 14874736301 1989098112 1989834413
+44625000000 44626807649 14875000000 14875602549 1990098112 1990700661
+44628000000 44630209175 14876000000 14876736391 1991098112 1991834503
+44631000000 44633209287 14877000000 14877736429 1992098112 1992834541
+44634000000 44636209496 14878000000 14878736498 1993098112 1993834610
+44637000000 44639209575 14879000000 14879736525 1994098112 1994834637
+44640000000 44642209800 14880000000 14880736600 1995098112 1995834712
+44643000000 44645209927 14881000000 14881736642 1996098112 1996834754
+44646000000 44648210016 14882000000 14882736672 1997098112 1997834784
+44649000000 44651210122 14883000000 14883736707 1998098112 1998834819
+44652000000 44654210333 14884000000 14884736777 1999098112 1999834889
+44655000000 44657210542 14885000000 14885736847 2000098112 2000834959
+44658000000 44660210687 14886000000 14886736895 2001098112 2001835007
+44661000000 44663210813 14887000000 14887736937 2002098112 2002835049
+44664000000 44666210979 14888000000 14888736993 2003098112 2003835105
+44667000000 44669211059 14889000000 14889737019 2004098112 2004835131
+44670000000 44672211294 14890000000 14890737098 2005098112 2005835210
+44673000000 44675211453 14891000000 14891737151 2006098112 2006835263
+44676000000 44678211574 14892000000 14892737191 2007098112 2007835303
+44679000000 44681211734 14893000000 14893737244 2008098112 2008835356
+44682000000 44684211817 14894000000 14894737272 2009098112 2009835384
+44685000000 44687212063 14895000000 14895737354 2010098112 2010835466
+44688000000 44690212186 14896000000 14896737395 2011098112 2011835507
+44691000000 44693212322 14897000000 14897737440 2012098112 2012835552
+44694000000 44696212497 14898000000 14898737499 2013098112 2013835611
+44697000000 44699212619 14899000000 14899737539 2014098112 2014835651
+44700000000 44702212769 14900000000 14900737589 2015098112 2015835701
+44703000000 44705212917 14901000000 14901737639 2016098112 2016835751
+44706000000 44707386611 14902000000 14902462203 2017098112 2017560315
+44709000000 44711213237 14903000000 14903737745 2018098112 2018835857
+44712000000 44714213369 14904000000 14904737789 2019098112 2019835901
+44715000000 44717213543 14905000000 14905737847 2020098112 2020835959
+44718000000 44720213662 14906000000 14906737887 2021098112 2021835999
+44721000000 44723213786 14907000000 14907737928 2022098112 2022836040
+44724000000 44726214005 14908000000 14908738001 2023098112 2023836113
+44727000000 44729214141 14909000000 14909738047 2024098112 2024836159
+44730000000 44732214292 14910000000 14910738097 2025098112 2025836209
+44733000000 44735214442 14911000000 14911738147 2026098112 2026836259
+44736000000 44738214557 14912000000 14912738185 2027098112 2027836297
+44739000000 44741214654 14913000000 14913738218 2028098112 2028836330
+44742000000 44744214862 14914000000 14914738287 2029098112 2029836399
+44745000000 44747215017 14915000000 14915738339 2030098112 2030836451
+44748000000 44750215176 14916000000 14916738392 2031098112 2031836504
+44751000000 44753215350 14917000000 14917738450 2032098112 2032836562
+44754000000 44756215450 14918000000 14918738483 2033098112 2033836595
+44757000000 44759215628 14919000000 14919738542 2034098112 2034836654
+44760000000 44762215777 14920000000 14920738592 2035098112 2035836704
+44763000000 44765215905 14921000000 14921738635 2036098112 2036836747
+44766000000 44768216074 14922000000 14922738691 2037098112 2037836803
+44769000000 44771216194 14923000000 14923738731 2038098112 2038836843
+44772000000 44773043544 14924000000 14924347848 2039098112 2039445960
+44775000000 44777216444 14925000000 14925738814 2040098112 2040836926
+44778000000 44780216702 14926000000 14926738900 2041098112 2041837012
+44781000000 44783216807 14927000000 14927738935 2042098112 2042837047
+44784000000 44786216887 14928000000 14928738962 2043098112 2043837074
+44787000000 44789217034 14929000000 14929739011 2044098112 2044837123
+44790000000 44792217288 14930000000 14930739096 2045098112 2045837208
+44793000000 44795217378 14931000000 14931739126 2046098112 2046837238
+44796000000 44798217623 14932000000 14932739207 2047098112 2047837319
+44799000000 44801217701 14933000000 14933739233 2048098112 2048837345
+44802000000 44804217878 14934000000 14934739292 2049098112 2049837404
+44805000000 44807218024 14935000000 14935739341 2050098112 2050837453
+44808000000 44810218168 14936000000 14936739389 2051098112 2051837501
+44811000000 44811840822 14937000000 14937280274 2052098112 2052378386
+44814000000 44816218483 14938000000 14938739494 2053098112 2053837606
+44817000000 44819218643 14939000000 14939739547 2054098112 2054837659
+44820000000 44822218780 14940000000 14940739593 2055098112 2055837705
+44823000000 44825218938 14941000000 14941739646 2056098112 2056837758
+44826000000 44828219096 14942000000 14942739698 2057098112 2057837810
+44829000000 44831219210 14943000000 14943739736 2058098112 2058837848
+44832000000 44834219371 14944000000 14944739790 2059098112 2059837902
+44835000000 44837219498 14945000000 14945739832 2060098112 2060837944
+44838000000 44840219607 14946000000 14946739869 2061098112 2061837981
+44841000000 44843219749 14947000000 14947739916 2062098112 2062838028
+44844000000 44846219983 14948000000 14948739994 2063098112 2063838106
+44847000000 44849219896 14949000000 14949739965 2064098112 2064838077
+44850000000 44852220017 14950000000 14950740005 2065098112 2065838117
+44853000000 44855220125 14951000000 14951740041 2066098112 2066838153
+44856000000 44858220360 14952000000 14952740120 2067098112 2067838232
+44859000000 44861220539 14953000000 14953740179 2068098112 2068838291
+44862000000 44864134179 14954000000 14954711393 2069098112 2069809505
+44865000000 44867220808 14955000000 14955740269 2070098112 2070838381
+44868000000 44870220981 14956000000 14956740327 2071098112 2071838439
+44871000000 44873221097 14957000000 14957740365 2072098112 2072838477
+44874000000 44876221270 14958000000 14958740423 2073098112 2073838535
+44877000000 44879221442 14959000000 14959740480 2074098112 2074838592
+44880000000 44882221498 14960000000 14960740499 2075098112 2075838611
+44883000000 44885221644 14961000000 14961740548 2076098112 2076838660
+44886000000 44888221840 14962000000 14962740613 2077098112 2077838725
+44889000000 44891221869 14963000000 14963740623 2078098112 2078838735
+44892000000 44894222175 14964000000 14964740725 2079098112 2079838837
+44895000000 44897222347 14965000000 14965740782 2080098112 2080838894
+44898000000 44900222480 14966000000 14966740826 2081098112 2081838938
+44901000000 44903222597 14967000000 14967740865 2082098112 2082838977
+44904000000 44906222782 14968000000 14968740927 2083098112 2083839039
+44907000000 44909222888 14969000000 14969740962 2084098112 2084839074
+44910000000 44912223069 14970000000 14970741023 2085098112 2085839135
+44913000000 44915223281 14971000000 14971741093 2086098112 2086839205
+44916000000 44918223388 14972000000 14972741129 2087098112 2087839241
+44919000000 44921223554 14973000000 14973741184 2088098112 2088839296
+44922000000 44923822299 14974000000 14974607433 2089098112 2089705545
+44925000000 44927223825 14975000000 14975741275 2090098112 2090839387
+44928000000 44930223937 14976000000 14976741312 2091098112 2091839424
+44931000000 44933224146 14977000000 14977741382 2092098112 2092839494
+44934000000 44936224225 14978000000 14978741408 2093098112 2093839520
+44937000000 44939224450 14979000000 14979741483 2094098112 2094839595
+44940000000 44942224577 14980000000 14980741525 2095098112 2095839637
+44943000000 44945224666 14981000000 14981741555 2096098112 2096839667
+44946000000 44948224772 14982000000 14982741590 2097098112 2097839702
+44949000000 44951224983 14983000000 14983741661 2098098112 2098839773
+44952000000 44954225192 14984000000 14984741730 2099098112 2099839842
+44955000000 44957225337 14985000000 14985741779 2100098112 2100839891
+44958000000 44960225463 14986000000 14986741821 2101098112 2101839933
+44961000000 44963225629 14987000000 14987741876 2102098112 2102839988
+44964000000 44966225709 14988000000 14988741903 2103098112 2103840015
+44967000000 44969225944 14989000000 14989741981 2104098112 2104840093
+44970000000 44972226103 14990000000 14990742034 2105098112 2105840146
+44973000000 44975226224 14991000000 14991742074 2106098112 2106840186
+44976000000 44978226384 14992000000 14992742128 2107098112 2107840240
+44979000000 44981226467 14993000000 14993742155 2108098112 2108840267
+44982000000 44984226713 14994000000 14994742237 2109098112 2109840349
+44985000000 44987226836 14995000000 14995742278 2110098112 2110840390
+44988000000 44990226972 14996000000 14996742324 2111098112 2111840436
+44991000000 44993227147 14997000000 14997742382 2112098112 2112840494
+44994000000 44996227269 14998000000 14998742423 2113098112 2113840535
+44997000000 44999227419 14999000000 14999742473 2114098112 2114840585
+45000000000 45002227567 15000000000 15000742522 2115098112 2115840634
+45003000000 45004401261 15001000000 15001467087 2116098112 2116565199
+45006000000 45008227887 15002000000 15002742629 2117098112 2117840741
+45009000000 45011228019 15003000000 15003742673 2118098112 2118840785
+45012000000 45014228193 15004000000 15004742731 2119098112 2119840843
+45015000000 45017228312 15005000000 15005742770 2120098112 2120840882
+45018000000 45020228436 15006000000 15006742812 2121098112 2121840924
+45021000000 45023228655 15007000000 15007742885 2122098112 2122840997
+45024000000 45026228791 15008000000 15008742930 2123098112 2123841042
+45027000000 45029228942 15009000000 15009742980 2124098112 2124841092
+45030000000 45032229092 15010000000 15010743030 2125098112 2125841142
+45033000000 45035229207 15011000000 15011743069 2126098112 2126841181
+45036000000 45038229304 15012000000 15012743101 2127098112 2127841213
+45039000000 45041229512 15013000000 15013743170 2128098112 2128841282
+45042000000 45044229667 15014000000 15014743222 2129098112 2129841334
+45045000000 45047229826 15015000000 15015743275 2130098112 2130841387
+45048000000 45050230000 15016000000 15016743333 2131098112 2131841445
+45051000000 45053230100 15017000000 15017743366 2132098112 2132841478
+45054000000 45056230278 15018000000 15018743426 2133098112 2133841538
+45057000000 45059230427 15019000000 15019743475 2134098112 2134841587
+45060000000 45062230555 15020000000 15020743518 2135098112 2135841630
+45063000000 45065230724 15021000000 15021743574 2136098112 2136841686
+45066000000 45068230844 15022000000 15022743614 2137098112 2137841726
+45069000000 45070058194 15023000000 15023352731 2138098112 2138450843
+45072000000 45074231094 15024000000 15024743698 2139098112 2139841810
+45075000000 45077231352 15025000000 15025743784 2140098112 2140841896
+45078000000 45080231457 15026000000 15026743819 2141098112 2141841931
+45081000000 45083231537 15027000000 15027743845 2142098112 2142841957
+45084000000 45086231684 15028000000 15028743894 2143098112 2143842006
+45087000000 45089231938 15029000000 15029743979 2144098112 2144842091
+45090000000 45092232028 15030000000 15030744009 2145098112 2145842121
+45093000000 45095232273 15031000000 15031744091 2146098112 2146842203
+45096000000 45098232351 15032000000 15032744117 2147098112 2147842229
+45099000000 45101232528 15033000000 15033744176 2148098112 2148842288
+45102000000 45104232674 15034000000 15034744224 2149098112 2149842336
+45105000000 45107232818 15035000000 15035744272 2150098112 2150842384
+45108000000 45108855472 15036000000 15036285157 2151098112 2151383269
+45111000000 45113233133 15037000000 15037744377 2152098112 2152842489
+45114000000 45116233293 15038000000 15038744431 2153098112 2153842543
+45117000000 45119233430 15039000000 15039744476 2154098112 2154842588
+45120000000 45122233588 15040000000 15040744529 2155098112 2155842641
+45123000000 45125233746 15041000000 15041744582 2156098112 2156842694
+45126000000 45128233860 15042000000 15042744620 2157098112 2157842732
+45129000000 45131234021 15043000000 15043744673 2158098112 2158842785
+45132000000 45134234148 15044000000 15044744716 2159098112 2159842828
+45135000000 45137234257 15045000000 15045744752 2160098112 2160842864
+45138000000 45140234399 15046000000 15046744799 2161098112 2161842911
+45141000000 45143234633 15047000000 15047744877 2162098112 2162842989
+45144000000 45146234546 15048000000 15048744848 2163098112 2163842960
+45147000000 45149234667 15049000000 15049744889 2164098112 2164843001
+45150000000 45152234775 15050000000 15050744925 2165098112 2165843037
+45153000000 45155235010 15051000000 15051745003 2166098112 2166843115
+45156000000 45158235189 15052000000 15052745063 2167098112 2167843175
+45159000000 45161148829 15053000000 15053716276 2168098112 2168814388
+45162000000 45164235458 15054000000 15054745152 2169098112 2169843264
+45165000000 45167235631 15055000000 15055745210 2170098112 2170843322
+45168000000 45170235747 15056000000 15056745249 2171098112 2171843361
+45171000000 45173235920 15057000000 15057745306 2172098112 2172843418
+45174000000 45176236092 15058000000 15058745364 2173098112 2173843476
+45177000000 45179236148 15059000000 15059745382 2174098112 2174843494
+45180000000 45182236294 15060000000 15060745431 2175098112 2175843543
+45183000000 45185236490 15061000000 15061745496 2176098112 2176843608
+45186000000 45188236519 15062000000 15062745506 2177098112 2177843618
+45189000000 45191236825 15063000000 15063745608 2178098112 2178843720
+45192000000 45194236997 15064000000 15064745665 2179098112 2179843777
+45195000000 45197237130 15065000000 15065745710 2180098112 2180843822
+45198000000 45200237247 15066000000 15066745749 2181098112 2181843861
+45201000000 45203237432 15067000000 15067745810 2182098112 2182843922
+45204000000 45206237538 15068000000 15068745846 2183098112 2183843958
+45207000000 45209237719 15069000000 15069745906 2184098112 2184844018
+45210000000 45212237931 15070000000 15070745977 2185098112 2185844089
+45213000000 45215238038 15071000000 15071746012 2186098112 2186844124
+45216000000 45218238204 15072000000 15072746068 2187098112 2187844180
+45219000000 45220836949 15073000000 15073612316 2188098112 2188710428
+45222000000 45224238475 15074000000 15074746158 2189098112 2189844270
+45225000000 45227238587 15075000000 15075746195 2190098112 2190844307
+45228000000 45230238796 15076000000 15076746265 2191098112 2191844377
+45231000000 45233238875 15077000000 15077746291 2192098112 2192844403
+45234000000 45236239100 15078000000 15078746366 2193098112 2193844478
+45237000000 45239239227 15079000000 15079746409 2194098112 2194844521
+45240000000 45242239316 15080000000 15080746438 2195098112 2195844550
+45243000000 45245239422 15081000000 15081746474 2196098112 2196844586
+45246000000 45248239633 15082000000 15082746544 2197098112 2197844656
+45249000000 45251239842 15083000000 15083746614 2198098112 2198844726
+45252000000 45254239987 15084000000 15084746662 2199098112 2199844774
+45255000000 45257240113 15085000000 15085746704 2200098112 2200844816
+45258000000 45260240279 15086000000 15086746759 2201098112 2201844871
+45261000000 45263240359 15087000000 15087746786 2202098112 2202844898
+45264000000 45266240594 15088000000 15088746864 2203098112 2203844976
+45267000000 45269240753 15089000000 15089746917 2204098112 2204845029
+45270000000 45272240874 15090000000 15090746958 2205098112 2205845070
+45273000000 45275241034 15091000000 15091747011 2206098112 2206845123
+45276000000 45278241117 15092000000 15092747039 2207098112 2207845151
+45279000000 45281241363 15093000000 15093747121 2208098112 2208845233
+45282000000 45284241486 15094000000 15094747162 2209098112 2209845274
+45285000000 45287241622 15095000000 15095747207 2210098112 2210845319
+45288000000 45290241797 15096000000 15096747265 2211098112 2211845377
+45291000000 45293241919 15097000000 15097747306 2212098112 2212845418
+45294000000 45296242069 15098000000 15098747356 2213098112 2213845468
+45297000000 45299242217 15099000000 15099747405 2214098112 2214845517
+45300000000 45301415911 15100000000 15100471970 2215098112 2215570082
+45303000000 45305242537 15101000000 15101747512 2216098112 2216845624
+45306000000 45308242669 15102000000 15102747556 2217098112 2217845668
+45309000000 45311242843 15103000000 15103747614 2218098112 2218845726
+45312000000 45314242962 15104000000 15104747654 2219098112 2219845766
+45315000000 45317243086 15105000000 15105747695 2220098112 2220845807
+45318000000 45320243305 15106000000 15106747768 2221098112 2221845880
+45321000000 45323243441 15107000000 15107747813 2222098112 2222845925
+45324000000 45326243592 15108000000 15108747864 2223098112 2223845976
+45327000000 45329243742 15109000000 15109747914 2224098112 2224846026
+45330000000 45332243857 15110000000 15110747952 2225098112 2225846064
+45333000000 45335243954 15111000000 15111747984 2226098112 2226846096
+45336000000 45338244162 15112000000 15112748054 2227098112 2227846166
+45339000000 45341244317 15113000000 15113748105 2228098112 2228846217
+45342000000 45344244476 15114000000 15114748158 2229098112 2229846270
+45345000000 45347244650 15115000000 15115748216 2230098112 2230846328
+45348000000 45350244750 15116000000 15116748250 2231098112 2231846362
+45351000000 45353244928 15117000000 15117748309 2232098112 2232846421
+45354000000 45356245077 15118000000 15118748359 2233098112 2233846471
+45357000000 45359245205 15119000000 15119748401 2234098112 2234846513
+45360000000 45362245374 15120000000 15120748458 2235098112 2235846570
+45363000000 45365245494 15121000000 15121748498 2236098112 2236846610
+45366000000 45367072844 15122000000 15122357614 2237098112 2237455726
+45369000000 45371245744 15123000000 15123748581 2238098112 2238846693
+45372000000 45374246002 15124000000 15124748667 2239098112 2239846779
+45375000000 45377246107 15125000000 15125748702 2240098112 2240846814
+45378000000 45380246187 15126000000 15126748729 2241098112 2241846841
+45381000000 45383246334 15127000000 15127748778 2242098112 2242846890
+45384000000 45386246588 15128000000 15128748862 2243098112 2243846974
+45387000000 45389246678 15129000000 15129748892 2244098112 2244847004
+45390000000 45392246923 15130000000 15130748974 2245098112 2245847086
+45393000000 45395247001 15131000000 15131749000 2246098112 2246847112
+45396000000 45398247178 15132000000 15132749059 2247098112 2247847171
+45399000000 45401247324 15133000000 15133749108 2248098112 2248847220
+45402000000 45404247468 15134000000 15134749156 2249098112 2249847268
+45405000000 45405870122 15135000000 15135290040 2250098112 2250388152
+45408000000 45410247783 15136000000 15136749261 2251098112 2251847373
+45411000000 45413247943 15137000000 15137749314 2252098112 2252847426
+45414000000 45416248080 15138000000 15138749360 2253098112 2253847472
+45417000000 45419248238 15139000000 15139749412 2254098112 2254847524
+45420000000 45422248396 15140000000 15140749465 2255098112 2255847577
+45423000000 45425248510 15141000000 15141749503 2256098112 2256847615
+45426000000 45428248671 15142000000 15142749557 2257098112 2257847669
+45429000000 45431248798 15143000000 15143749599 2258098112 2258847711
+45432000000 45434248907 15144000000 15144749635 2259098112 2259847747
+45435000000 45437249049 15145000000 15145749683 2260098112 2260847795
+45438000000 45440249283 15146000000 15146749761 2261098112 2261847873
+45441000000 45443249196 15147000000 15147749732 2262098112 2262847844
+45444000000 45446249317 15148000000 15148749772 2263098112 2263847884
+45447000000 45449249425 15149000000 15149749808 2264098112 2264847920
+45450000000 45452249660 15150000000 15150749886 2265098112 2265847998
+45453000000 45455249839 15151000000 15151749946 2266098112 2266848058
+45456000000 45458163479 15152000000 15152721159 2267098112 2267819271
+45459000000 45461250108 15153000000 15153750036 2268098112 2268848148
+45462000000 45464250281 15154000000 15154750093 2269098112 2269848205
+45465000000 45467250397 15155000000 15155750132 2270098112 2270848244
+45468000000 45470250570 15156000000 15156750190 2271098112 2271848302
+45471000000 45473250742 15157000000 15157750247 2272098112 2272848359
+45474000000 45476250798 15158000000 15158750266 2273098112 2273848378
+45477000000 45479250944 15159000000 15159750314 2274098112 2274848426
+45480000000 45482251140 15160000000 15160750380 2275098112 2275848492
+45483000000 45485251169 15161000000 15161750389 2276098112 2276848501
+45486000000 45488251475 15162000000 15162750491 2277098112 2277848603
+45489000000 45491251647 15163000000 15163750549 2278098112 2278848661
+45492000000 45494251780 15164000000 15164750593 2279098112 2279848705
+45495000000 45497251897 15165000000 15165750632 2280098112 2280848744
+45498000000 45500252082 15166000000 15166750694 2281098112 2281848806
+45501000000 45503252188 15167000000 15167750729 2282098112 2282848841
+45504000000 45506252369 15168000000 15168750789 2283098112 2283848901
+45507000000 45509252581 15169000000 15169750860 2284098112 2284848972
+45510000000 45512252688 15170000000 15170750896 2285098112 2285849008
+45513000000 45515252854 15171000000 15171750951 2286098112 2286849063
+45516000000 45517851599 15172000000 15172617199 2287098112 2287715311
+45519000000 45521253125 15173000000 15173751041 2288098112 2288849153
+45522000000 45524253237 15174000000 15174751079 2289098112 2289849191
+45525000000 45527253446 15175000000 15175751148 2290098112 2290849260
+45528000000 45530253525 15176000000 15176751175 2291098112 2291849287
+45531000000 45533253750 15177000000 15177751250 2292098112 2292849362
+45534000000 45536253877 15178000000 15178751292 2293098112 2293849404
+45537000000 45539253966 15179000000 15179751322 2294098112 2294849434
+45540000000 45542254072 15180000000 15180751357 2295098112 2295849469
+45543000000 45545254283 15181000000 15181751427 2296098112 2296849539
+45546000000 45548254492 15182000000 15182751497 2297098112 2297849609
+45549000000 45551254637 15183000000 15183751545 2298098112 2298849657
+45552000000 45554254763 15184000000 15184751587 2299098112 2299849699
+45555000000 45557254929 15185000000 15185751643 2300098112 2300849755
+45558000000 45560255009 15186000000 15186751669 2301098112 2301849781
+45561000000 45563255244 15187000000 15187751748 2302098112 2302849860
+45564000000 45566255403 15188000000 15188751801 2303098112 2303849913
+45567000000 45569255524 15189000000 15189751841 2304098112 2304849953
+45570000000 45572255684 15190000000 15190751894 2305098112 2305850006
+45573000000 45575255767 15191000000 15191751922 2306098112 2306850034
+45576000000 45578256013 15192000000 15192752004 2307098112 2307850116
+45579000000 45581256136 15193000000 15193752045 2308098112 2308850157
+45582000000 45584256272 15194000000 15194752090 2309098112 2309850202
+45585000000 45587256447 15195000000 15195752149 2310098112 2310850261
+45588000000 45590256569 15196000000 15196752189 2311098112 2311850301
+45591000000 45593256719 15197000000 15197752239 2312098112 2312850351
+45594000000 45596256867 15198000000 15198752289 2313098112 2313850401
+45597000000 45598430561 15199000000 15199476853 2314098112 2314574965
+45600000000 45602257187 15200000000 15200752395 2315098112 2315850507
+45603000000 45605257319 15201000000 15201752439 2316098112 2316850551
+45606000000 45608257493 15202000000 15202752497 2317098112 2317850609
+45609000000 45611257612 15203000000 15203752537 2318098112 2318850649
+45612000000 45614257736 15204000000 15204752578 2319098112 2319850690
+45615000000 45617257955 15205000000 15205752651 2320098112 2320850763
+45618000000 45620258091 15206000000 15206752697 2321098112 2321850809
+45621000000 45623258242 15207000000 15207752747 2322098112 2322850859
+45624000000 45626258392 15208000000 15208752797 2323098112 2323850909
+45627000000 45629258507 15209000000 15209752835 2324098112 2324850947
+45630000000 45632258604 15210000000 15210752868 2325098112 2325850980
+45633000000 45635258812 15211000000 15211752937 2326098112 2326851049
+45636000000 45638258967 15212000000 15212752989 2327098112 2327851101
+45639000000 45641259126 15213000000 15213753042 2328098112 2328851154
+45642000000 45644259300 15214000000 15214753100 2329098112 2329851212
+45645000000 45647259400 15215000000 15215753133 2330098112 2330851245
+45648000000 45650259578 15216000000 15216753192 2331098112 2331851304
+45651000000 45653259727 15217000000 15217753242 2332098112 2332851354
+45654000000 45656259855 15218000000 15218753285 2333098112 2333851397
+45657000000 45659260024 15219000000 15219753341 2334098112 2334851453
+45660000000 45662260144 15220000000 15220753381 2335098112 2335851493
+45663000000 45664087494 15221000000 15221362498 2336098112 2336460610
+45666000000 45668260394 15222000000 15222753464 2337098112 2337851576
+45669000000 45671260652 15223000000 15223753550 2338098112 2338851662
+45672000000 45674260757 15224000000 15224753585 2339098112 2339851697
+45675000000 45677260837 15225000000 15225753612 2340098112 2340851724
+45678000000 45680260984 15226000000 15226753661 2341098112 2341851773
+45681000000 45683261238 15227000000 15227753746 2342098112 2342851858
+45684000000 45686261328 15228000000 15228753776 2343098112 2343851888
+45687000000 45689261573 15229000000 15229753857 2344098112 2344851969
+45690000000 45692261651 15230000000 15230753883 2345098112 2345851995
+45693000000 45695261828 15231000000 15231753942 2346098112 2346852054
+45696000000 45698261974 15232000000 15232753991 2347098112 2347852103
+45699000000 45701262118 15233000000 15233754039 2348098112 2348852151
+45702000000 45702884772 15234000000 15234294924 2349098112 2349393036
+45705000000 45707262433 15235000000 15235754144 2350098112 2350852256
+45708000000 45710262593 15236000000 15236754197 2351098112 2351852309
+45711000000 45713262730 15237000000 15237754243 2352098112 2352852355
+45714000000 45716262888 15238000000 15238754296 2353098112 2353852408
+45717000000 45719263046 15239000000 15239754348 2354098112 2354852460
+45720000000 45722263160 15240000000 15240754386 2355098112 2355852498
+45723000000 45725263321 15241000000 15241754440 2356098112 2356852552
+45726000000 45728263448 15242000000 15242754482 2357098112 2357852594
+45729000000 45731263557 15243000000 15243754519 2358098112 2358852631
+45732000000 45734263699 15244000000 15244754566 2359098112 2359852678
+45735000000 45737263933 15245000000 15245754644 2360098112 2360852756
+45738000000 45740263846 15246000000 15246754615 2361098112 2361852727
+45741000000 45743263967 15247000000 15247754655 2362098112 2362852767
+45744000000 45746264075 15248000000 15248754691 2363098112 2363852803
+45747000000 45749264310 15249000000 15249754770 2364098112 2364852882
+45750000000 45752264489 15250000000 15250754829 2365098112 2365852941
+45753000000 45755178129 15251000000 15251726043 2366098112 2366824155
+45756000000 45758264758 15252000000 15252754919 2367098112 2367853031
+45759000000 45761264931 15253000000 15253754977 2368098112 2368853089
+45762000000 45764265047 15254000000 15254755015 2369098112 2369853127
+45765000000 45767265220 15255000000 15255755073 2370098112 2370853185
+45768000000 45770265392 15256000000 15256755130 2371098112 2371853242
+45771000000 45773265448 15257000000 15257755149 2372098112 2372853261
+45774000000 45776265594 15258000000 15258755198 2373098112 2373853310
+45777000000 45779265790 15259000000 15259755263 2374098112 2374853375
+45780000000 45782265819 15260000000 15260755273 2375098112 2375853385
+45783000000 45785266125 15261000000 15261755375 2376098112 2376853487
+45786000000 45788266297 15262000000 15262755432 2377098112 2377853544
+45789000000 45791266430 15263000000 15263755476 2378098112 2378853588
+45792000000 45794266547 15264000000 15264755515 2379098112 2379853627
+45795000000 45797266732 15265000000 15265755577 2380098112 2380853689
+45798000000 45800266838 15266000000 15266755612 2381098112 2381853724
+45801000000 45803267019 15267000000 15267755673 2382098112 2382853785
+45804000000 45806267231 15268000000 15268755743 2383098112 2383853855
+45807000000 45809267338 15269000000 15269755779 2384098112 2384853891
+45810000000 45812267504 15270000000 15270755834 2385098112 2385853946
+45813000000 45814866249 15271000000 15271622083 2386098112 2386720195
+45816000000 45818267775 15272000000 15272755925 2387098112 2387854037
+45819000000 45821267887 15273000000 15273755962 2388098112 2388854074
+45822000000 45824268096 15274000000 15274756032 2389098112 2389854144
+45825000000 45827268175 15275000000 15275756058 2390098112 2390854170
+45828000000 45830268400 15276000000 15276756133 2391098112 2391854245
+45831000000 45833268527 15277000000 15277756175 2392098112 2392854287
+45834000000 45836268616 15278000000 15278756205 2393098112 2393854317
+45837000000 45839268722 15279000000 15279756240 2394098112 2394854352
+45840000000 45842268933 15280000000 15280756311 2395098112 2395854423
+45843000000 45845269142 15281000000 15281756380 2396098112 2396854492
+45846000000 45848269287 15282000000 15282756429 2397098112 2397854541
+45849000000 45851269413 15283000000 15283756471 2398098112 2398854583
+45852000000 45854269579 15284000000 15284756526 2399098112 2399854638
+45855000000 45857269659 15285000000 15285756553 2400098112 2400854665
+45858000000 45860269894 15286000000 15286756631 2401098112 2401854743
+45861000000 45863270053 15287000000 15287756684 2402098112 2402854796
+45864000000 45866270174 15288000000 15288756724 2403098112 2403854836
+45867000000 45869270334 15289000000 15289756778 2404098112 2404854890
+45870000000 45872270417 15290000000 15290756805 2405098112 2405854917
+45873000000 45875270663 15291000000 15291756887 2406098112 2406854999
+45876000000 45878270786 15292000000 15292756928 2407098112 2407855040
+45879000000 45881270922 15293000000 15293756974 2408098112 2408855086
+45882000000 45884271097 15294000000 15294757032 2409098112 2409855144
+45885000000 45887271219 15295000000 15295757073 2410098112 2410855185
+45888000000 45890271369 15296000000 15296757123 2411098112 2411855235
+45891000000 45893271517 15297000000 15297757172 2412098112 2412855284
+45894000000 45895445211 15298000000 15298481737 2413098112 2413579849
+45897000000 45899271837 15299000000 15299757279 2414098112 2414855391
+45900000000 45902271969 15300000000 15300757323 2415098112 2415855435
+45903000000 45905272143 15301000000 15301757381 2416098112 2416855493
+45906000000 45908272262 15302000000 15302757420 2417098112 2417855532
+45909000000 45911272386 15303000000 15303757462 2418098112 2418855574
+45912000000 45914272605 15304000000 15304757535 2419098112 2419855647
+45915000000 45917272741 15305000000 15305757580 2420098112 2420855692
+45918000000 45920272892 15306000000 15306757630 2421098112 2421855742
+45921000000 45923273042 15307000000 15307757680 2422098112 2422855792
+45924000000 45926273157 15308000000 15308757719 2423098112 2423855831
+45927000000 45929273254 15309000000 15309757751 2424098112 2424855863
+45930000000 45932273462 15310000000 15310757820 2425098112 2425855932
+45933000000 45935273617 15311000000 15311757872 2426098112 2426855984
+45936000000 45938273776 15312000000 15312757925 2427098112 2427856037
+45939000000 45941273950 15313000000 15313757983 2428098112 2428856095
+45942000000 45944274050 15314000000 15314758016 2429098112 2429856128
+45945000000 45947274228 15315000000 15315758076 2430098112 2430856188
+45948000000 45950274377 15316000000 15316758125 2431098112 2431856237
+45951000000 45953274505 15317000000 15317758168 2432098112 2432856280
+45954000000 45956274674 15318000000 15318758224 2433098112 2433856336
+45957000000 45959274794 15319000000 15319758264 2434098112 2434856376
+45960000000 45961102144 15320000000 15320367381 2435098112 2435465493
+45963000000 45965275044 15321000000 15321758348 2436098112 2436856460
+45966000000 45968275302 15322000000 15322758434 2437098112 2437856546
+45969000000 45971275407 15323000000 15323758469 2438098112 2438856581
+45972000000 45974275487 15324000000 15324758495 2439098112 2439856607
+45975000000 45977275634 15325000000 15325758544 2440098112 2440856656
+45978000000 45980275888 15326000000 15326758629 2441098112 2441856741
+45981000000 45983275978 15327000000 15327758659 2442098112 2442856771
+45984000000 45986276223 15328000000 15328758741 2443098112 2443856853
+45987000000 45989276301 15329000000 15329758767 2444098112 2444856879
+45990000000 45992276478 15330000000 15330758826 2445098112 2445856938
+45993000000 45995276624 15331000000 15331758874 2446098112 2446856986
+45996000000 45998276768 15332000000 15332758922 2447098112 2447857034
+45999000000 45999899422 15333000000 15333299807 2448098112 2448397919
+46002000000 46004277083 15334000000 15334759027 2449098112 2449857139
+46005000000 46007277243 15335000000 15335759081 2450098112 2450857193
+46008000000 46010277380 15336000000 15336759126 2451098112 2451857238
+46011000000 46013277538 15337000000 15337759179 2452098112 2452857291
+46014000000 46016277696 15338000000 15338759232 2453098112 2453857344
+46017000000 46019277810 15339000000 15339759270 2454098112 2454857382
+46020000000 46022277971 15340000000 15340759323 2455098112 2455857435
+46023000000 46025278098 15341000000 15341759366 2456098112 2456857478
+46026000000 46028278207 15342000000 15342759402 2457098112 2457857514
+46029000000 46031278349 15343000000 15343759449 2458098112 2458857561
+46032000000 46034278583 15344000000 15344759527 2459098112 2459857639
+46035000000 46037278496 15345000000 15345759498 2460098112 2460857610
+46038000000 46040278617 15346000000 15346759539 2461098112 2461857651
+46041000000 46043278725 15347000000 15347759575 2462098112 2462857687
+46044000000 46046278960 15348000000 15348759653 2463098112 2463857765
+46047000000 46049279139 15349000000 15349759713 2464098112 2464857825
+46050000000 46052192779 15350000000 15350730926 2465098112 2465829038
+46053000000 46055279408 15351000000 15351759802 2466098112 2466857914
+46056000000 46058279581 15352000000 15352759860 2467098112 2467857972
+46059000000 46061279697 15353000000 15353759899 2468098112 2468858011
+46062000000 46064279870 15354000000 15354759956 2469098112 2469858068
+46065000000 46067280042 15355000000 15355760014 2470098112 2470858126
+46068000000 46070280098 15356000000 15356760032 2471098112 2471858144
+46071000000 46073280244 15357000000 15357760081 2472098112 2472858193
+46074000000 46076280440 15358000000 15358760146 2473098112 2473858258
+46077000000 46079280469 15359000000 15359760156 2474098112 2474858268
+46080000000 46082280775 15360000000 15360760258 2475098112 2475858370
+46083000000 46085280947 15361000000 15361760315 2476098112 2476858427
+46086000000 46088281080 15362000000 15362760360 2477098112 2477858472
+46089000000 46091281197 15363000000 15363760399 2478098112 2478858511
+46092000000 46094281382 15364000000 15364760460 2479098112 2479858572
+46095000000 46097281488 15365000000 15365760496 2480098112 2480858608
+46098000000 46100281669 15366000000 15366760556 2481098112 2481858668
+46101000000 46103281881 15367000000 15367760627 2482098112 2482858739
+46104000000 46106281988 15368000000 15368760662 2483098112 2483858774
+46107000000 46109282154 15369000000 15369760718 2484098112 2484858830
+46110000000 46111880899 15370000000 15370626966 2485098112 2485725078
+46113000000 46115282425 15371000000 15371760808 2486098112 2486858920
+46116000000 46118282537 15372000000 15372760845 2487098112 2487858957
+46119000000 46121282746 15373000000 15373760915 2488098112 2488859027
+46122000000 46124282825 15374000000 15374760941 2489098112 2489859053
+46125000000 46127283050 15375000000 15375761016 2490098112 2490859128
+46128000000 46130283177 15376000000 15376761059 2491098112 2491859171
+46131000000 46133283266 15377000000 15377761088 2492098112 2492859200
+46134000000 46136283372 15378000000 15378761124 2493098112 2493859236
+46137000000 46139283583 15379000000 15379761194 2494098112 2494859306
+46140000000 46142283792 15380000000 15380761264 2495098112 2495859376
+46143000000 46145283937 15381000000 15381761312 2496098112 2496859424
+46146000000 46148284063 15382000000 15382761354 2497098112 2497859466
+46149000000 46151284229 15383000000 15383761409 2498098112 2498859521
+46152000000 46154284309 15384000000 15384761436 2499098112 2499859548
+46155000000 46157284544 15385000000 15385761514 2500098112 2500859626
+46158000000 46160284703 15386000000 15386761567 2501098112 2501859679
+46161000000 46163284824 15387000000 15387761608 2502098112 2502859720
+46164000000 46166284984 15388000000 15388761661 2503098112 2503859773
+46167000000 46169285067 15389000000 15389761689 2504098112 2504859801
+46170000000 46172285313 15390000000 15390761771 2505098112 2505859883
+46173000000 46175285436 15391000000 15391761812 2506098112 2506859924
+46176000000 46178285572 15392000000 15392761857 2507098112 2507859969
+46179000000 46181285747 15393000000 15393761915 2508098112 2508860027
+46182000000 46184285869 15394000000 15394761956 2509098112 2509860068
+46185000000 46187286019 15395000000 15395762006 2510098112 2510860118
+46188000000 46190286167 15396000000 15396762055 2511098112 2511860167
+46191000000 46192459861 15397000000 15397486620 2512098112 2512584732
+46194000000 46196286487 15398000000 15398762162 2513098112 2513860274
+46197000000 46199286619 15399000000 15399762206 2514098112 2514860318
+46200000000 46202286793 15400000000 15400762264 2515098112 2515860376
+46203000000 46205286912 15401000000 15401762304 2516098112 2516860416
+46206000000 46208287036 15402000000 15402762345 2517098112 2517860457
+46209000000 46211287255 15403000000 15403762418 2518098112 2518860530
+46212000000 46214287391 15404000000 15404762463 2519098112 2519860575
+46215000000 46217287542 15405000000 15405762514 2520098112 2520860626
+46218000000 46220287692 15406000000 15406762564 2521098112 2521860676
+46221000000 46223287807 15407000000 15407762602 2522098112 2522860714
+46224000000 46226287904 15408000000 15408762634 2523098112 2523860746
+46227000000 46229288112 15409000000 15409762704 2524098112 2524860816
+46230000000 46232288267 15410000000 15410762755 2525098112 2525860867
+46233000000 46235288426 15411000000 15411762808 2526098112 2526860920
+46236000000 46238288600 15412000000 15412762866 2527098112 2527860978
+46239000000 46241288700 15413000000 15413762900 2528098112 2528861012
+46242000000 46244288878 15414000000 15414762959 2529098112 2529861071
+46245000000 46247289027 15415000000 15415763009 2530098112 2530861121
+46248000000 46250289155 15416000000 15416763051 2531098112 2531861163
+46251000000 46253289324 15417000000 15417763108 2532098112 2532861220
+46254000000 46256289444 15418000000 15418763148 2533098112 2533861260
+46257000000 46258116794 15419000000 15419372264 2534098112 2534470376
+46260000000 46262289694 15420000000 15420763231 2535098112 2535861343
+46263000000 46265289952 15421000000 15421763317 2536098112 2536861429
+46266000000 46268290057 15422000000 15422763352 2537098112 2537861464
+46269000000 46271290137 15423000000 15423763379 2538098112 2538861491
+46272000000 46274290284 15424000000 15424763428 2539098112 2539861540
+46275000000 46277290538 15425000000 15425763512 2540098112 2540861624
+46278000000 46280290628 15426000000 15426763542 2541098112 2541861654
+46281000000 46283290873 15427000000 15427763624 2542098112 2542861736
+46284000000 46286290951 15428000000 15428763650 2543098112 2543861762
+46287000000 46289291128 15429000000 15429763709 2544098112 2544861821
+46290000000 46292291274 15430000000 15430763758 2545098112 2545861870
+46293000000 46295291418 15431000000 15431763806 2546098112 2546861918
+46296000000 46296914072 15432000000 15432304690 2547098112 2547402802
+46299000000 46301291733 15433000000 15433763911 2548098112 2548862023
+46302000000 46304291893 15434000000 15434763964 2549098112 2549862076
+46305000000 46307292030 15435000000 15435764010 2550098112 2550862122
+46308000000 46310292188 15436000000 15436764062 2551098112 2551862174
+46311000000 46313292346 15437000000 15437764115 2552098112 2552862227
+46314000000 46316292460 15438000000 15438764153 2553098112 2553862265
+46317000000 46319292621 15439000000 15439764207 2554098112 2554862319
+46320000000 46322292748 15440000000 15440764249 2555098112 2555862361
+46323000000 46325292857 15441000000 15441764285 2556098112 2556862397
+46326000000 46328292999 15442000000 15442764333 2557098112 2557862445
+46329000000 46331293233 15443000000 15443764411 2558098112 2558862523
+46332000000 46334293146 15444000000 15444764382 2559098112 2559862494
+46335000000 46337293267 15445000000 15445764422 2560098112 2560862534
+46338000000 46340293375 15446000000 15446764458 2561098112 2561862570
+46341000000 46343293610 15447000000 15447764536 2562098112 2562862648
+46344000000 46346293789 15448000000 15448764596 2563098112 2563862708
+46347000000 46349207429 15449000000 15449735809 2564098112 2564833921
+46350000000 46352294058 15450000000 15450764686 2565098112 2565862798
+46353000000 46355294231 15451000000 15451764743 2566098112 2566862855
+46356000000 46358294347 15452000000 15452764782 2567098112 2567862894
+46359000000 46361294520 15453000000 15453764840 2568098112 2568862952
+46362000000 46364294692 15454000000 15454764897 2569098112 2569863009
+46365000000 46367294748 15455000000 15455764916 2570098112 2570863028
+46368000000 46370294894 15456000000 15456764964 2571098112 2571863076
+46371000000 46373295090 15457000000 15457765030 2572098112 2572863142
+46374000000 46376295119 15458000000 15458765039 2573098112 2573863151
+46377000000 46379295425 15459000000 15459765141 2574098112 2574863253
+46380000000 46382295597 15460000000 15460765199 2575098112 2575863311
+46383000000 46385295730 15461000000 15461765243 2576098112 2576863355
+46386000000 46388295847 15462000000 15462765282 2577098112 2577863394
+46389000000 46391296032 15463000000 15463765344 2578098112 2578863456
+46392000000 46394296138 15464000000 15464765379 2579098112 2579863491
+46395000000 46397296319 15465000000 15465765439 2580098112 2580863551
+46398000000 46400296531 15466000000 15466765510 2581098112 2581863622
+46401000000 46403296638 15467000000 15467765546 2582098112 2582863658
+46404000000 46406296804 15468000000 15468765601 2583098112 2583863713
+46407000000 46408895549 15469000000 15469631849 2584098112 2584729961
+46410000000 46412297075 15470000000 15470765691 2585098112 2585863803
+46413000000 46415297187 15471000000 15471765729 2586098112 2586863841
+46416000000 46418297396 15472000000 15472765798 2587098112 2587863910
+46419000000 46421297475 15473000000 15473765825 2588098112 2588863937
+46422000000 46424297700 15474000000 15474765900 2589098112 2589864012
+46425000000 46427297827 15475000000 15475765942 2590098112 2590864054
+46428000000 46430297916 15476000000 15476765972 2591098112 2591864084
+46431000000 46433298022 15477000000 15477766007 2592098112 2592864119
+46434000000 46436298233 15478000000 15478766077 2593098112 2593864189
+46437000000 46439298442 15479000000 15479766147 2594098112 2594864259
+46440000000 46442298587 15480000000 15480766195 2595098112 2595864307
+46443000000 46445298713 15481000000 15481766237 2596098112 2596864349
+46446000000 46448298879 15482000000 15482766293 2597098112 2597864405
+46449000000 46451298959 15483000000 15483766319 2598098112 2598864431
+46452000000 46454299194 15484000000 15484766398 2599098112 2599864510
+46455000000 46457299353 15485000000 15485766451 2600098112 2600864563
+46458000000 46460299474 15486000000 15486766491 2601098112 2601864603
+46461000000 46463299634 15487000000 15487766544 2602098112 2602864656
+46464000000 46466299717 15488000000 15488766572 2603098112 2603864684
+46467000000 46469299963 15489000000 15489766654 2604098112 2604864766
+46470000000 46472300086 15490000000 15490766695 2605098112 2605864807
+46473000000 46475300222 15491000000 15491766740 2606098112 2606864852
+46476000000 46478300397 15492000000 15492766799 2607098112 2607864911
+46479000000 46481300519 15493000000 15493766839 2608098112 2608864951
+46482000000 46484300669 15494000000 15494766889 2609098112 2609865001
+46485000000 46487300817 15495000000 15495766939 2610098112 2610865051
+46488000000 46489474511 15496000000 15496491503 2611098112 2611589615
+46491000000 46493301137 15497000000 15497767045 2612098112 2612865157
+46494000000 46496301269 15498000000 15498767089 2613098112 2613865201
+46497000000 46499301443 15499000000 15499767147 2614098112 2614865259
+46500000000 46502301562 15500000000 15500767187 2615098112 2615865299
+46503000000 46505301686 15501000000 15501767228 2616098112 2616865340
+46506000000 46508301905 15502000000 15502767301 2617098112 2617865413
+46509000000 46511302041 15503000000 15503767347 2618098112 2618865459
+46512000000 46514302192 15504000000 15504767397 2619098112 2619865509
+46515000000 46517302342 15505000000 15505767447 2620098112 2620865559
+46518000000 46520302457 15506000000 15506767485 2621098112 2621865597
+46521000000 46523302554 15507000000 15507767518 2622098112 2622865630
+46524000000 46526302762 15508000000 15508767587 2623098112 2623865699
+46527000000 46529302917 15509000000 15509767639 2624098112 2624865751
+46530000000 46532303076 15510000000 15510767692 2625098112 2625865804
+46533000000 46535303250 15511000000 15511767750 2626098112 2626865862
+46536000000 46538303350 15512000000 15512767783 2627098112 2627865895
+46539000000 46541303528 15513000000 15513767842 2628098112 2628865954
+46542000000 46544303677 15514000000 15514767892 2629098112 2629866004
+46545000000 46547303805 15515000000 15515767935 2630098112 2630866047
+46548000000 46550303974 15516000000 15516767991 2631098112 2631866103
+46551000000 46553304094 15517000000 15517768031 2632098112 2632866143
+46554000000 46555131444 15518000000 15518377148 2633098112 2633475260
+46557000000 46559304344 15519000000 15519768114 2634098112 2634866226
+46560000000 46562304602 15520000000 15520768200 2635098112 2635866312
+46563000000 46565304707 15521000000 15521768235 2636098112 2636866347
+46566000000 46568304787 15522000000 15522768262 2637098112 2637866374
+46569000000 46571304934 15523000000 15523768311 2638098112 2638866423
+46572000000 46574305188 15524000000 15524768396 2639098112 2639866508
+46575000000 46577305278 15525000000 15525768426 2640098112 2640866538
+46578000000 46580305523 15526000000 15526768507 2641098112 2641866619
+46581000000 46583305601 15527000000 15527768533 2642098112 2642866645
+46584000000 46586305778 15528000000 15528768592 2643098112 2643866704
+46587000000 46589305924 15529000000 15529768641 2644098112 2644866753
+46590000000 46592306068 15530000000 15530768689 2645098112 2645866801
+46593000000 46593928722 15531000000 15531309574 2646098112 2646407686
+46596000000 46598306383 15532000000 15532768794 2647098112 2647866906
+46599000000 46601306543 15533000000 15533768847 2648098112 2648866959
+46602000000 46604306680 15534000000 15534768893 2649098112 2649867005
+46605000000 46607306838 15535000000 15535768946 2650098112 2650867058
+46608000000 46610306996 15536000000 15536768998 2651098112 2651867110
+46611000000 46613307110 15537000000 15537769036 2652098112 2652867148
+46614000000 46616307271 15538000000 15538769090 2653098112 2653867202
+46617000000 46619307398 15539000000 15539769132 2654098112 2654867244
+46620000000 46622307507 15540000000 15540769169 2655098112 2655867281
+46623000000 46625307649 15541000000 15541769216 2656098112 2656867328
+46626000000 46628307883 15542000000 15542769294 2657098112 2657867406
+46629000000 46631307796 15543000000 15543769265 2658098112 2658867377
+46632000000 46634307917 15544000000 15544769305 2659098112 2659867417
+46635000000 46637308025 15545000000 15545769341 2660098112 2660867453
+46638000000 46640308260 15546000000 15546769420 2661098112 2661867532
+46641000000 46643308439 15547000000 15547769479 2662098112 2662867591
+46644000000 46646222079 15548000000 15548740693 2663098112 2663838805
+46647000000 46649308708 15549000000 15549769569 2664098112 2664867681
+46650000000 46652308881 15550000000 15550769627 2665098112 2665867739
+46653000000 46655308997 15551000000 15551769665 2666098112 2666867777
+46656000000 46658309170 15552000000 15552769723 2667098112 2667867835
+46659000000 46661309342 15553000000 15553769780 2668098112 2668867892
+46662000000 46664309398 15554000000 15554769799 2669098112 2669867911
+46665000000 46667309544 15555000000 15555769848 2670098112 2670867960
+46668000000 46670309740 15556000000 15556769913 2671098112 2671868025
+46671000000 46673309769 15557000000 15557769923 2672098112 2672868035
+46674000000 46676310075 15558000000 15558770025 2673098112 2673868137
+46677000000 46679310247 15559000000 15559770082 2674098112 2674868194
+46680000000 46682310380 15560000000 15560770126 2675098112 2675868238
+46683000000 46685310497 15561000000 15561770165 2676098112 2676868277
+46686000000 46688310682 15562000000 15562770227 2677098112 2677868339
+46689000000 46691310788 15563000000 15563770262 2678098112 2678868374
+46692000000 46694310969 15564000000 15564770323 2679098112 2679868435
+46695000000 46697311181 15565000000 15565770393 2680098112 2680868505
+46698000000 46700311288 15566000000 15566770429 2681098112 2681868541
+46701000000 46703311454 15567000000 15567770484 2682098112 2682868596
+46704000000 46705910199 15568000000 15568636733 2683098112 2683734845
+46707000000 46709311725 15569000000 15569770575 2684098112 2684868687
+46710000000 46712311837 15570000000 15570770612 2685098112 2685868724
+46713000000 46715312046 15571000000 15571770682 2686098112 2686868794
+46716000000 46718312125 15572000000 15572770708 2687098112 2687868820
+46719000000 46721312350 15573000000 15573770783 2688098112 2688868895
+46722000000 46724312477 15574000000 15574770825 2689098112 2689868937
+46725000000 46727312566 15575000000 15575770855 2690098112 2690868967
+46728000000 46730312672 15576000000 15576770890 2691098112 2691869002
+46731000000 46733312883 15577000000 15577770961 2692098112 2692869073
+46734000000 46736313092 15578000000 15578771030 2693098112 2693869142
+46737000000 46739313237 15579000000 15579771079 2694098112 2694869191
+46740000000 46742313363 15580000000 15580771121 2695098112 2695869233
+46743000000 46745313529 15581000000 15581771176 2696098112 2696869288
+46746000000 46748313609 15582000000 15582771203 2697098112 2697869315
+46749000000 46751313844 15583000000 15583771281 2698098112 2698869393
+46752000000 46754314003 15584000000 15584771334 2699098112 2699869446
+46755000000 46757314124 15585000000 15585771374 2700098112 2700869486
+46758000000 46760314284 15586000000 15586771428 2701098112 2701869540
+46761000000 46763314367 15587000000 15587771455 2702098112 2702869567
+46764000000 46766314613 15588000000 15588771537 2703098112 2703869649
+46767000000 46769314736 15589000000 15589771578 2704098112 2704869690
+46770000000 46772314872 15590000000 15590771624 2705098112 2705869736
+46773000000 46775315047 15591000000 15591771682 2706098112 2706869794
+46776000000 46778315169 15592000000 15592771723 2707098112 2707869835
+46779000000 46781315319 15593000000 15593771773 2708098112 2708869885
+46782000000 46784315467 15594000000 15594771822 2709098112 2709869934
+46785000000 46786489161 15595000000 15595496387 2710098112 2710594499
+46788000000 46790315787 15596000000 15596771929 2711098112 2711870041
+46791000000 46793315919 15597000000 15597771973 2712098112 2712870085
+46794000000 46796316093 15598000000 15598772031 2713098112 2713870143
+46797000000 46799316212 15599000000 15599772070 2714098112 2714870182
+46800000000 46802316336 15600000000 15600772112 2715098112 2715870224
+46803000000 46805316555 15601000000 15601772185 2716098112 2716870297
+46806000000 46808316691 15602000000 15602772230 2717098112 2717870342
+46809000000 46811316842 15603000000 15603772280 2718098112 2718870392
+46812000000 46814316992 15604000000 15604772330 2719098112 2719870442
+46815000000 46817317107 15605000000 15605772369 2720098112 2720870481
+46818000000 46820317204 15606000000 15606772401 2721098112 2721870513
+46821000000 46823317412 15607000000 15607772470 2722098112 2722870582
+46824000000 46826317567 15608000000 15608772522 2723098112 2723870634
+46827000000 46829317726 15609000000 15609772575 2724098112 2724870687
+46830000000 46832317900 15610000000 15610772633 2725098112 2725870745
+46833000000 46835318000 15611000000 15611772666 2726098112 2726870778
+46836000000 46838318178 15612000000 15612772726 2727098112 2727870838
+46839000000 46841318327 15613000000 15613772775 2728098112 2728870887
+46842000000 46844318455 15614000000 15614772818 2729098112 2729870930
+46845000000 46847318624 15615000000 15615772874 2730098112 2730870986
+46848000000 46850318744 15616000000 15616772914 2731098112 2731871026
+46851000000 46852146094 15617000000 15617382031 2732098112 2732480143
+46854000000 46856318994 15618000000 15618772998 2733098112 2733871110
+46857000000 46859319252 15619000000 15619773084 2734098112 2734871196
+46860000000 46862319357 15620000000 15620773119 2735098112 2735871231
+46863000000 46865319437 15621000000 15621773145 2736098112 2736871257
+46866000000 46868319584 15622000000 15622773194 2737098112 2737871306
+46869000000 46871319838 15623000000 15623773279 2738098112 2738871391
+46872000000 46874319928 15624000000 15624773309 2739098112 2739871421
+46875000000 46877320173 15625000000 15625773391 2740098112 2740871503
+46878000000 46880320251 15626000000 15626773417 2741098112 2741871529
+46881000000 46883320428 15627000000 15627773476 2742098112 2742871588
+46884000000 46886320574 15628000000 15628773524 2743098112 2743871636
+46887000000 46889320718 15629000000 15629773572 2744098112 2744871684
+46890000000 46890943372 15630000000 15630314457 2745098112 2745412569
+46893000000 46895321033 15631000000 15631773677 2746098112 2746871789
+46896000000 46898321193 15632000000 15632773731 2747098112 2747871843
+46899000000 46901321330 15633000000 15633773776 2748098112 2748871888
+46902000000 46904321488 15634000000 15634773829 2749098112 2749871941
+46905000000 46907321646 15635000000 15635773882 2750098112 2750871994
+46908000000 46910321760 15636000000 15636773920 2751098112 2751872032
+46911000000 46913321921 15637000000 15637773973 2752098112 2752872085
+46914000000 46916322048 15638000000 15638774016 2753098112 2753872128
+46917000000 46919322157 15639000000 15639774052 2754098112 2754872164
+46920000000 46922322299 15640000000 15640774099 2755098112 2755872211
+46923000000 46925322533 15641000000 15641774177 2756098112 2756872289
+46926000000 46928322446 15642000000 15642774148 2757098112 2757872260
+46929000000 46931322567 15643000000 15643774189 2758098112 2758872301
+46932000000 46934322675 15644000000 15644774225 2759098112 2759872337
+46935000000 46937322910 15645000000 15645774303 2760098112 2760872415
+46938000000 46940323089 15646000000 15646774363 2761098112 2761872475
+46941000000 46943236729 15647000000 15647745576 2762098112 2762843688
+46944000000 46946323358 15648000000 15648774452 2763098112 2763872564
+46947000000 46949323531 15649000000 15649774510 2764098112 2764872622
+46950000000 46952323647 15650000000 15650774549 2765098112 2765872661
+46953000000 46955323820 15651000000 15651774606 2766098112 2766872718
+46956000000 46958323992 15652000000 15652774664 2767098112 2767872776
+46959000000 46961324048 15653000000 15653774682 2768098112 2768872794
+46962000000 46964324194 15654000000 15654774731 2769098112 2769872843
+46965000000 46967324390 15655000000 15655774796 2770098112 2770872908
+46968000000 46970324419 15656000000 15656774806 2771098112 2771872918
+46971000000 46973324725 15657000000 15657774908 2772098112 2772873020
+46974000000 46976324897 15658000000 15658774965 2773098112 2773873077
+46977000000 46979325030 15659000000 15659775010 2774098112 2774873122
+46980000000 46982325147 15660000000 15660775049 2775098112 2775873161
+46983000000 46985325332 15661000000 15661775110 2776098112 2776873222
+46986000000 46988325438 15662000000 15662775146 2777098112 2777873258
+46989000000 46991325619 15663000000 15663775206 2778098112 2778873318
+46992000000 46994325831 15664000000 15664775277 2779098112 2779873389
+46995000000 46997325938 15665000000 15665775312 2780098112 2780873424
+46998000000 47000326104 15666000000 15666775368 2781098112 2781873480
+47001000000 47002924849 15667000000 15667641616 2782098112 2782739728
+47004000000 47006326375 15668000000 15668775458 2783098112 2783873570
+47007000000 47009326487 15669000000 15669775495 2784098112 2784873607
+47010000000 47012326696 15670000000 15670775565 2785098112 2785873677
+47013000000 47015326775 15671000000 15671775591 2786098112 2786873703
+47016000000 47018327000 15672000000 15672775666 2787098112 2787873778
+47019000000 47021327127 15673000000 15673775709 2788098112 2788873821
+47022000000 47024327216 15674000000 15674775738 2789098112 2789873850
+47025000000 47027327322 15675000000 15675775774 2790098112 2790873886
+47028000000 47030327533 15676000000 15676775844 2791098112 2791873956
+47031000000 47033327742 15677000000 15677775914 2792098112 2792874026
+47034000000 47036327887 15678000000 15678775962 2793098112 2793874074
+47037000000 47039328013 15679000000 15679776004 2794098112 2794874116
+47040000000 47042328179 15680000000 15680776059 2795098112 2795874171
+47043000000 47045328259 15681000000 15681776086 2796098112 2796874198
+47046000000 47048328494 15682000000 15682776164 2797098112 2797874276
+47049000000 47051328653 15683000000 15683776217 2798098112 2798874329
+47052000000 47054328774 15684000000 15684776258 2799098112 2799874370
+47055000000 47057328934 15685000000 15685776311 2800098112 2800874423
+47058000000 47060329017 15686000000 15686776339 2801098112 2801874451
+47061000000 47063329263 15687000000 15687776421 2802098112 2802874533
+47064000000 47066329386 15688000000 15688776462 2803098112 2803874574
+47067000000 47069329522 15689000000 15689776507 2804098112 2804874619
+47070000000 47072329697 15690000000 15690776565 2805098112 2805874677
+47073000000 47075329819 15691000000 15691776606 2806098112 2806874718
+47076000000 47078329969 15692000000 15692776656 2807098112 2807874768
+47079000000 47081330117 15693000000 15693776705 2808098112 2808874817
+47082000000 47083503811 15694000000 15694501270 2809098112 2809599382
+47085000000 47087330437 15695000000 15695776812 2810098112 2810874924
+47088000000 47090330569 15696000000 15696776856 2811098112 2811874968
+47091000000 47093330743 15697000000 15697776914 2812098112 2812875026
+47094000000 47096330862 15698000000 15698776954 2813098112 2813875066
+47097000000 47099330986 15699000000 15699776995 2814098112 2814875107
+47100000000 47102331205 15700000000 15700777068 2815098112 2815875180
+47103000000 47105331341 15701000000 15701777113 2816098112 2816875225
+47106000000 47108331492 15702000000 15702777164 2817098112 2817875276
+47109000000 47111331642 15703000000 15703777214 2818098112 2818875326
+47112000000 47114331757 15704000000 15704777252 2819098112 2819875364
+47115000000 47117331854 15705000000 15705777284 2820098112 2820875396
+47118000000 47120332062 15706000000 15706777354 2821098112 2821875466
+47121000000 47123332217 15707000000 15707777405 2822098112 2822875517
+47124000000 47126332376 15708000000 15708777458 2823098112 2823875570
+47127000000 47129332550 15709000000 15709777516 2824098112 2824875628
+47130000000 47132332650 15710000000 15710777550 2825098112 2825875662
+47133000000 47135332828 15711000000 15711777609 2826098112 2826875721
+47136000000 47138332977 15712000000 15712777659 2827098112 2827875771
+47139000000 47141333105 15713000000 15713777701 2828098112 2828875813
+47142000000 47144333274 15714000000 15714777758 2829098112 2829875870
+47145000000 47147333394 15715000000 15715777798 2830098112 2830875910
+47148000000 47149160744 15716000000 15716386914 2831098112 2831485026
+47151000000 47153333644 15717000000 15717777881 2832098112 2832875993
+47154000000 47156333902 15718000000 15718777967 2833098112 2833876079
+47157000000 47159334007 15719000000 15719778002 2834098112 2834876114
+47160000000 47162334087 15720000000 15720778029 2835098112 2835876141
+47163000000 47165334234 15721000000 15721778078 2836098112 2836876190
+47166000000 47168334488 15722000000 15722778162 2837098112 2837876274
+47169000000 47171334578 15723000000 15723778192 2838098112 2838876304
+47172000000 47174334823 15724000000 15724778274 2839098112 2839876386
+47175000000 47177334901 15725000000 15725778300 2840098112 2840876412
+47178000000 47180335078 15726000000 15726778359 2841098112 2841876471
+47181000000 47183335224 15727000000 15727778408 2842098112 2842876520
+47184000000 47186335368 15728000000 15728778456 2843098112 2843876568
+47187000000 47187958022 15729000000 15729319340 2844098112 2844417452
+47190000000 47192335683 15730000000 15730778561 2845098112 2845876673
+47193000000 47195335843 15731000000 15731778614 2846098112 2846876726
+47196000000 47198335980 15732000000 15732778660 2847098112 2847876772
+47199000000 47201336138 15733000000 15733778712 2848098112 2848876824
+47202000000 47204336296 15734000000 15734778765 2849098112 2849876877
+47205000000 47207336410 15735000000 15735778803 2850098112 2850876915
+47208000000 47210336571 15736000000 15736778857 2851098112 2851876969
+47211000000 47213336698 15737000000 15737778899 2852098112 2852877011
+47214000000 47216336807 15738000000 15738778935 2853098112 2853877047
+47217000000 47219336949 15739000000 15739778983 2854098112 2854877095
+47220000000 47222337183 15740000000 15740779061 2855098112 2855877173
+47223000000 47225337096 15741000000 15741779032 2856098112 2856877144
+47226000000 47228337217 15742000000 15742779072 2857098112 2857877184
+47229000000 47231337325 15743000000 15743779108 2858098112 2858877220
+47232000000 47234337560 15744000000 15744779186 2859098112 2859877298
+47235000000 47237337739 15745000000 15745779246 2860098112 2860877358
+47238000000 47240251379 15746000000 15746750459 2861098112 2861848571
+47241000000 47243338008 15747000000 15747779336 2862098112 2862877448
+47244000000 47246338181 15748000000 15748779393 2863098112 2863877505
+47247000000 47249338297 15749000000 15749779432 2864098112 2864877544
+47250000000 47252338470 15750000000 15750779490 2865098112 2865877602
+47253000000 47255338642 15751000000 15751779547 2866098112 2866877659
+47256000000 47258338698 15752000000 15752779566 2867098112 2867877678
+47259000000 47261338844 15753000000 15753779614 2868098112 2868877726
+47262000000 47264339040 15754000000 15754779680 2869098112 2869877792
+47265000000 47267339069 15755000000 15755779689 2870098112 2870877801
+47268000000 47270339375 15756000000 15756779791 2871098112 2871877903
+47271000000 47273339547 15757000000 15757779849 2872098112 2872877961
+47274000000 47276339680 15758000000 15758779893 2873098112 2873878005
+47277000000 47279339797 15759000000 15759779932 2874098112 2874878044
+47280000000 47282339982 15760000000 15760779994 2875098112 2875878106
+47283000000 47285340088 15761000000 15761780029 2876098112 2876878141
+47286000000 47288340269 15762000000 15762780089 2877098112 2877878201
+47289000000 47291340481 15763000000 15763780160 2878098112 2878878272
+47292000000 47294340588 15764000000 15764780196 2879098112 2879878308
+47295000000 47297340754 15765000000 15765780251 2880098112 2880878363
+47298000000 47299939499 15766000000 15766646499 2881098112 2881744611
+47301000000 47303341025 15767000000 15767780341 2882098112 2882878453
+47304000000 47306341137 15768000000 15768780379 2883098112 2883878491
+47307000000 47309341346 15769000000 15769780448 2884098112 2884878560
+47310000000 47312341425 15770000000 15770780475 2885098112 2885878587
+47313000000 47315341650 15771000000 15771780550 2886098112 2886878662
+47316000000 47318341777 15772000000 15772780592 2887098112 2887878704
+47319000000 47321341866 15773000000 15773780622 2888098112 2888878734
+47322000000 47324341972 15774000000 15774780657 2889098112 2889878769
+47325000000 47327342183 15775000000 15775780727 2890098112 2890878839
+47328000000 47330342392 15776000000 15776780797 2891098112 2891878909
+47331000000 47333342537 15777000000 15777780845 2892098112 2892878957
+47334000000 47336342663 15778000000 15778780887 2893098112 2893878999
+47337000000 47339342829 15779000000 15779780943 2894098112 2894879055
+47340000000 47342342909 15780000000 15780780969 2895098112 2895879081
+47343000000 47345343144 15781000000 15781781048 2896098112 2896879160
+47346000000 47348343303 15782000000 15782781101 2897098112 2897879213
+47349000000 47351343424 15783000000 15783781141 2898098112 2898879253
+47352000000 47354343584 15784000000 15784781194 2899098112 2899879306
+47355000000 47357343667 15785000000 15785781222 2900098112 2900879334
+47358000000 47360343913 15786000000 15786781304 2901098112 2901879416
+47361000000 47363344036 15787000000 15787781345 2902098112 2902879457
+47364000000 47366344172 15788000000 15788781390 2903098112 2903879502
+47367000000 47369344347 15789000000 15789781449 2904098112 2904879561
+47370000000 47372344469 15790000000 15790781489 2905098112 2905879601
+47373000000 47375344619 15791000000 15791781539 2906098112 2906879651
+47376000000 47378344767 15792000000 15792781589 2907098112 2907879701
+47379000000 47380518461 15793000000 15793506153 2908098112 2908604265
+47382000000 47384345087 15794000000 15794781695 2909098112 2909879807
+47385000000 47387345219 15795000000 15795781739 2910098112 2910879851
+47388000000 47390345393 15796000000 15796781797 2911098112 2911879909
+47391000000 47393345512 15797000000 15797781837 2912098112 2912879949
+47394000000 47396345636 15798000000 15798781878 2913098112 2913879990
+47397000000 47399345855 15799000000 15799781951 2914098112 2914880063
+47400000000 47402345991 15800000000 15800781997 2915098112 2915880109
+47403000000 47405346142 15801000000 15801782047 2916098112 2916880159
+47406000000 47408346292 15802000000 15802782097 2917098112 2917880209
+47409000000 47411346407 15803000000 15803782135 2918098112 2918880247
+47412000000 47414346504 15804000000 15804782168 2919098112 2919880280
+47415000000 47417346712 15805000000 15805782237 2920098112 2920880349
+47418000000 47420346867 15806000000 15806782289 2921098112 2921880401
+47421000000 47423347026 15807000000 15807782342 2922098112 2922880454
+47424000000 47426347200 15808000000 15808782400 2923098112 2923880512
+47427000000 47429347300 15809000000 15809782433 2924098112 2924880545
+47430000000 47432347478 15810000000 15810782492 2925098112 2925880604
+47433000000 47435347627 15811000000 15811782542 2926098112 2926880654
+47436000000 47438347755 15812000000 15812782585 2927098112 2927880697
+47439000000 47441347924 15813000000 15813782641 2928098112 2928880753
+47442000000 47444348044 15814000000 15814782681 2929098112 2929880793
+47445000000 47446175394 15815000000 15815391798 2930098112 2930489910
+47448000000 47450348294 15816000000 15816782764 2931098112 2931880876
+47451000000 47453348552 15817000000 15817782850 2932098112 2932880962
+47454000000 47456348657 15818000000 15818782885 2933098112 2933880997
+47457000000 47459348737 15819000000 15819782912 2934098112 2934881024
+47460000000 47462348884 15820000000 15820782961 2935098112 2935881073
+47463000000 47465349138 15821000000 15821783046 2936098112 2936881158
+47466000000 47468349228 15822000000 15822783076 2937098112 2937881188
+47469000000 47471349473 15823000000 15823783157 2938098112 2938881269
+47472000000 47474349551 15824000000 15824783183 2939098112 2939881295
+47475000000 47477349728 15825000000 15825783242 2940098112 2940881354
+47478000000 47480349874 15826000000 15826783291 2941098112 2941881403
+47481000000 47483350018 15827000000 15827783339 2942098112 2942881451
+47484000000 47484972672 15828000000 15828324224 2943098112 2943422336
+47487000000 47489350333 15829000000 15829783444 2944098112 2944881556
+47490000000 47492350493 15830000000 15830783497 2945098112 2945881609
+47493000000 47495350630 15831000000 15831783543 2946098112 2946881655
+47496000000 47498350788 15832000000 15832783596 2947098112 2947881708
+47499000000 47501350946 15833000000 15833783648 2948098112 2948881760
+47502000000 47504351060 15834000000 15834783686 2949098112 2949881798
+47505000000 47507351221 15835000000 15835783740 2950098112 2950881852
+47508000000 47510351348 15836000000 15836783782 2951098112 2951881894
+47511000000 47513351457 15837000000 15837783819 2952098112 2952881931
+47514000000 47516351599 15838000000 15838783866 2953098112 2953881978
+47517000000 47519351833 15839000000 15839783944 2954098112 2954882056
+47520000000 47522351746 15840000000 15840783915 2955098112 2955882027
+47523000000 47525351867 15841000000 15841783955 2956098112 2956882067
+47526000000 47528351975 15842000000 15842783991 2957098112 2957882103
+47529000000 47531352210 15843000000 15843784070 2958098112 2958882182
+47532000000 47534352389 15844000000 15844784129 2959098112 2959882241
+47535000000 47537266029 15845000000 15845755343 2960098112 2960853455
+47538000000 47540352658 15846000000 15846784219 2961098112 2961882331
+47541000000 47543352831 15847000000 15847784277 2962098112 2962882389
+47544000000 47546352947 15848000000 15848784315 2963098112 2963882427
+47547000000 47549353120 15849000000 15849784373 2964098112 2964882485
+47550000000 47552353292 15850000000 15850784430 2965098112 2965882542
+47553000000 47555353348 15851000000 15851784449 2966098112 2966882561
+47556000000 47558353494 15852000000 15852784498 2967098112 2967882610
+47559000000 47561353690 15853000000 15853784563 2968098112 2968882675
+47562000000 47564353719 15854000000 15854784573 2969098112 2969882685
+47565000000 47567354025 15855000000 15855784675 2970098112 2970882787
+47568000000 47570354197 15856000000 15856784732 2971098112 2971882844
+47571000000 47573354330 15857000000 15857784776 2972098112 2972882888
+47574000000 47576354447 15858000000 15858784815 2973098112 2973882927
+47577000000 47579354632 15859000000 15859784877 2974098112 2974882989
+47580000000 47582354738 15860000000 15860784912 2975098112 2975883024
+47583000000 47585354919 15861000000 15861784973 2976098112 2976883085
+47586000000 47588355131 15862000000 15862785043 2977098112 2977883155
+47589000000 47591355238 15863000000 15863785079 2978098112 2978883191
+47592000000 47594355404 15864000000 15864785134 2979098112 2979883246
+47595000000 47596954149 15865000000 15865651383 2980098112 2980749495
+47598000000 47600355675 15866000000 15866785225 2981098112 2981883337
+47601000000 47603355787 15867000000 15867785262 2982098112 2982883374
+47604000000 47606355996 15868000000 15868785332 2983098112 2983883444
+47607000000 47609356075 15869000000 15869785358 2984098112 2984883470
+47610000000 47612356300 15870000000 15870785433 2985098112 2985883545
+47613000000 47615356427 15871000000 15871785475 2986098112 2986883587
+47616000000 47618356516 15872000000 15872785505 2987098112 2987883617
+47619000000 47621356622 15873000000 15873785540 2988098112 2988883652
+47622000000 47624356833 15874000000 15874785611 2989098112 2989883723
+47625000000 47627357042 15875000000 15875785680 2990098112 2990883792
+47628000000 47630357187 15876000000 15876785729 2991098112 2991883841
+47631000000 47633357313 15877000000 15877785771 2992098112 2992883883
+47634000000 47636357479 15878000000 15878785826 2993098112 2993883938
+47637000000 47639357559 15879000000 15879785853 2994098112 2994883965
+47640000000 47642357794 15880000000 15880785931 2995098112 2995884043
+47643000000 47645357953 15881000000 15881785984 2996098112 2996884096
+47646000000 47648358074 15882000000 15882786024 2997098112 2997884136
+47649000000 47651358234 15883000000 15883786078 2998098112 2998884190
+47652000000 47654358317 15884000000 15884786105 2999098112 2999884217
+47655000000 47657358563 15885000000 15885786187 3000098112 3000884299
+47658000000 47660358686 15886000000 15886786228 3001098112 3001884340
+47661000000 47663358822 15887000000 15887786274 3002098112 3002884386
+47664000000 47666358997 15888000000 15888786332 3003098112 3003884444
+47667000000 47669359119 15889000000 15889786373 3004098112 3004884485
+47670000000 47672359269 15890000000 15890786423 3005098112 3005884535
+47673000000 47675359417 15891000000 15891786472 3006098112 3006884584
+47676000000 47677533111 15892000000 15892511037 3007098112 3007609149
+47679000000 47681359737 15893000000 15893786579 3008098112 3008884691
+47682000000 47684359869 15894000000 15894786623 3009098112 3009884735
+47685000000 47687360043 15895000000 15895786681 3010098112 3010884793
+47688000000 47690360162 15896000000 15896786720 3011098112 3011884832
+47691000000 47693360286 15897000000 15897786762 3012098112 3012884874
+47694000000 47696360505 15898000000 15898786835 3013098112 3013884947
+47697000000 47699360641 15899000000 15899786880 3014098112 3014884992
+47700000000 47702360792 15900000000 15900786930 3015098112 3015885042
+47703000000 47705360942 15901000000 15901786980 3016098112 3016885092
+47706000000 47708361057 15902000000 15902787019 3017098112 3017885131
+47709000000 47711361154 15903000000 15903787051 3018098112 3018885163
+47712000000 47714361362 15904000000 15904787120 3019098112 3019885232
+47715000000 47717361517 15905000000 15905787172 3020098112 3020885284
+47718000000 47720361676 15906000000 15906787225 3021098112 3021885337
+47721000000 47723361850 15907000000 15907787283 3022098112 3022885395
+47724000000 47726361950 15908000000 15908787316 3023098112 3023885428
+47727000000 47729362128 15909000000 15909787376 3024098112 3024885488
+47730000000 47732362277 15910000000 15910787425 3025098112 3025885537
+47733000000 47735362405 15911000000 15911787468 3026098112 3026885580
+47736000000 47738362574 15912000000 15912787524 3027098112 3027885636
+47739000000 47741362694 15913000000 15913787564 3028098112 3028885676
+47742000000 47743190044 15914000000 15914396681 3029098112 3029494793
+47745000000 47747362944 15915000000 15915787648 3030098112 3030885760
+47748000000 47750363202 15916000000 15916787734 3031098112 3031885846
+47751000000 47753363307 15917000000 15917787769 3032098112 3032885881
+47754000000 47756363387 15918000000 15918787795 3033098112 3033885907
+47757000000 47759363534 15919000000 15919787844 3034098112 3034885956
+47760000000 47762363788 15920000000 15920787929 3035098112 3035886041
+47763000000 47765363878 15921000000 15921787959 3036098112 3036886071
+47766000000 47768364123 15922000000 15922788041 3037098112 3037886153
+47769000000 47771364201 15923000000 15923788067 3038098112 3038886179
+47772000000 47774364378 15924000000 15924788126 3039098112 3039886238
+47775000000 47777364524 15925000000 15925788174 3040098112 3040886286
+47778000000 47780364668 15926000000 15926788222 3041098112 3041886334
+47781000000 47781987322 15927000000 15927329107 3042098112 3042427219
+47784000000 47786364983 15928000000 15928788327 3043098112 3043886439
+47787000000 47789365143 15929000000 15929788381 3044098112 3044886493
+47790000000 47792365280 15930000000 15930788426 3045098112 3045886538
+47793000000 47795365438 15931000000 15931788479 3046098112 3046886591
+47796000000 47798365596 15932000000 15932788532 3047098112 3047886644
+47799000000 47801365710 15933000000 15933788570 3048098112 3048886682
+47802000000 47804365871 15934000000 15934788623 3049098112 3049886735
+47805000000 47807365998 15935000000 15935788666 3050098112 3050886778
+47808000000 47810366107 15936000000 15936788702 3051098112 3051886814
+47811000000 47813366249 15937000000 15937788749 3052098112 3052886861
+47814000000 47816366483 15938000000 15938788827 3053098112 3053886939
+47817000000 47819366396 15939000000 15939788798 3054098112 3054886910
+47820000000 47822366517 15940000000 15940788839 3055098112 3055886951
+47823000000 47825366625 15941000000 15941788875 3056098112 3056886987
+47826000000 47828366860 15942000000 15942788953 3057098112 3057887065
+47829000000 47831367039 15943000000 15943789013 3058098112 3058887125
+47832000000 47834280679 15944000000 15944760226 3059098112 3059858338
+47835000000 47837367308 15945000000 15945789102 3060098112 3060887214
+47838000000 47840367481 15946000000 15946789160 3061098112 3061887272
+47841000000 47843367597 15947000000 15947789199 3062098112 3062887311
+47844000000 47846367770 15948000000 15948789256 3063098112 3063887368
+47847000000 47849367942 15949000000 15949789314 3064098112 3064887426
+47850000000 47852367998 15950000000 15950789332 3065098112 3065887444
+47853000000 47855368144 15951000000 15951789381 3066098112 3066887493
+47856000000 47858368340 15952000000 15952789446 3067098112 3067887558
+47859000000 47861368369 15953000000 15953789456 3068098112 3068887568
+47862000000 47864368675 15954000000 15954789558 3069098112 3069887670
+47865000000 47867368847 15955000000 15955789615 3070098112 3070887727
+47868000000 47870368980 15956000000 15956789660 3071098112 3071887772
+47871000000 47873369097 15957000000 15957789699 3072098112 3072887811
+47874000000 47876369282 15958000000 15958789760 3073098112 3073887872
+47877000000 47879369388 15959000000 15959789796 3074098112 3074887908
+47880000000 47882369569 15960000000 15960789856 3075098112 3075887968
+47883000000 47885369781 15961000000 15961789927 3076098112 3076888039
+47886000000 47888369888 15962000000 15962789962 3077098112 3077888074
+47889000000 47891370054 15963000000 15963790018 3078098112 3078888130
+47892000000 47893968799 15964000000 15964656266 3079098112 3079754378
+47895000000 47897370325 15965000000 15965790108 3080098112 3080888220
+47898000000 47900370437 15966000000 15966790145 3081098112 3081888257
+47901000000 47903370646 15967000000 15967790215 3082098112 3082888327
+47904000000 47906370725 15968000000 15968790241 3083098112 3083888353
+47907000000 47909370950 15969000000 15969790316 3084098112 3084888428
+47910000000 47912371077 15970000000 15970790359 3085098112 3085888471
+47913000000 47915371166 15971000000 15971790388 3086098112 3086888500
+47916000000 47918371272 15972000000 15972790424 3087098112 3087888536
+47919000000 47921371483 15973000000 15973790494 3088098112 3088888606
+47922000000 47924371692 15974000000 15974790564 3089098112 3089888676
+47925000000 47927371837 15975000000 15975790612 3090098112 3090888724
+47928000000 47930371963 15976000000 15976790654 3091098112 3091888766
+47931000000 47933372129 15977000000 15977790709 3092098112 3092888821
+47934000000 47936372209 15978000000 15978790736 3093098112 3093888848
+47937000000 47939372444 15979000000 15979790814 3094098112 3094888926
+47940000000 47942372603 15980000000 15980790867 3095098112 3095888979
+47943000000 47945372724 15981000000 15981790908 3096098112 3096889020
+47946000000 47948372884 15982000000 15982790961 3097098112 3097889073
+47949000000 47951372967 15983000000 15983790989 3098098112 3098889101
+47952000000 47954373213 15984000000 15984791071 3099098112 3099889183
+47955000000 47957373336 15985000000 15985791112 3100098112 3100889224
+47958000000 47960373472 15986000000 15986791157 3101098112 3101889269
+47961000000 47963373647 15987000000 15987791215 3102098112 3102889327
+47964000000 47966373769 15988000000 15988791256 3103098112 3103889368
+47967000000 47969373919 15989000000 15989791306 3104098112 3104889418
+47970000000 47972374067 15990000000 15990791355 3105098112 3105889467
+47973000000 47974547761 15991000000 15991515920 3106098112 3106614032
+47976000000 47978374387 15992000000 15992791462 3107098112 3107889574
+47979000000 47981374519 15993000000 15993791506 3108098112 3108889618
+47982000000 47984374693 15994000000 15994791564 3109098112 3109889676
+47985000000 47987374812 15995000000 15995791604 3110098112 3110889716
+47988000000 47990374936 15996000000 15996791645 3111098112 3111889757
+47991000000 47993375155 15997000000 15997791718 3112098112 3112889830
+47994000000 47996375291 15998000000 15998791763 3113098112 3113889875
+47997000000 47999375442 15999000000 15999791814 3114098112 3114889926
+48000000000 48002375592 16000000000 16000791864 3115098112 3115889976
+48003000000 48005375707 16001000000 16001791902 3116098112 3116890014
+48006000000 48008375804 16002000000 16002791934 3117098112 3117890046
+48009000000 48011376012 16003000000 16003792004 3118098112 3118890116
+48012000000 48014376167 16004000000 16004792055 3119098112 3119890167
+48015000000 48017376326 16005000000 16005792108 3120098112 3120890220
+48018000000 48020376500 16006000000 16006792166 3121098112 3121890278
+48021000000 48023376600 16007000000 16007792200 3122098112 3122890312
+48024000000 48026376778 16008000000 16008792259 3123098112 3123890371
+48027000000 48029376927 16009000000 16009792309 3124098112 3124890421
+48030000000 48032377055 16010000000 16010792351 3125098112 3125890463
+48033000000 48035377224 16011000000 16011792408 3126098112 3126890520
+48036000000 48038377344 16012000000 16012792448 3127098112 3127890560
+48039000000 48040204694 16013000000 16013401564 3128098112 3128499676
+48042000000 48044377594 16014000000 16014792531 3129098112 3129890643
+48045000000 48047377852 16015000000 16015792617 3130098112 3130890729
+48048000000 48050377957 16016000000 16016792652 3131098112 3131890764
+48051000000 48053378037 16017000000 16017792679 3132098112 3132890791
+48054000000 48056378184 16018000000 16018792728 3133098112 3133890840
+48057000000 48059378438 16019000000 16019792812 3134098112 3134890924
+48060000000 48062378528 16020000000 16020792842 3135098112 3135890954
+48063000000 48065378773 16021000000 16021792924 3136098112 3136891036
+48066000000 48068378851 16022000000 16022792950 3137098112 3137891062
+48069000000 48071379028 16023000000 16023793009 3138098112 3138891121
+48072000000 48074379174 16024000000 16024793058 3139098112 3139891170
+48075000000 48077379318 16025000000 16025793106 3140098112 3140891218
+48078000000 48079001972 16026000000 16026333990 3141098112 3141432102
+48081000000 48083379633 16027000000 16027793211 3142098112 3142891323
+48084000000 48086379793 16028000000 16028793264 3143098112 3143891376
+48087000000 48089379930 16029000000 16029793310 3144098112 3144891422
+48090000000 48092380088 16030000000 16030793362 3145098112 3145891474
+48093000000 48095380246 16031000000 16031793415 3146098112 3146891527
+48096000000 48098380360 16032000000 16032793453 3147098112 3147891565
+48099000000 48101380521 16033000000 16033793507 3148098112 3148891619
+48102000000 48104380648 16034000000 16034793549 3149098112 3149891661
+48105000000 48107380757 16035000000 16035793585 3150098112 3150891697
+48108000000 48110380899 16036000000 16036793633 3151098112 3151891745
+48111000000 48113381133 16037000000 16037793711 3152098112 3152891823
+48114000000 48116381046 16038000000 16038793682 3153098112 3153891794
+48117000000 48119381167 16039000000 16039793722 3154098112 3154891834
+48120000000 48122381275 16040000000 16040793758 3155098112 3155891870
+48123000000 48125381510 16041000000 16041793836 3156098112 3156891948
+48126000000 48128381689 16042000000 16042793896 3157098112 3157892008
+48129000000 48131295329 16043000000 16043765109 3158098112 3158863221
+48132000000 48134381958 16044000000 16044793986 3159098112 3159892098
+48135000000 48137382131 16045000000 16045794043 3160098112 3160892155
+48138000000 48140382247 16046000000 16046794082 3161098112 3161892194
+48141000000 48143382420 16047000000 16047794140 3162098112 3162892252
+48144000000 48146382592 16048000000 16048794197 3163098112 3163892309
+48147000000 48149382648 16049000000 16049794216 3164098112 3164892328
+48150000000 48152382794 16050000000 16050794264 3165098112 3165892376
+48153000000 48155382990 16051000000 16051794330 3166098112 3166892442
+48156000000 48158383019 16052000000 16052794339 3167098112 3167892451
+48159000000 48161383325 16053000000 16053794441 3168098112 3168892553
+48162000000 48164383497 16054000000 16054794499 3169098112 3169892611
+48165000000 48167383630 16055000000 16055794543 3170098112 3170892655
+48168000000 48170383747 16056000000 16056794582 3171098112 3171892694
+48171000000 48173383932 16057000000 16057794644 3172098112 3172892756
+48174000000 48176384038 16058000000 16058794679 3173098112 3173892791
+48177000000 48179384219 16059000000 16059794739 3174098112 3174892851
+48180000000 48182384431 16060000000 16060794810 3175098112 3175892922
+48183000000 48185384538 16061000000 16061794846 3176098112 3176892958
+48186000000 48188384704 16062000000 16062794901 3177098112 3177893013
+48189000000 48190983449 16063000000 16063661149 3178098112 3178759261
+48192000000 48194384975 16064000000 16064794991 3179098112 3179893103
+48195000000 48197385087 16065000000 16065795029 3180098112 3180893141
+48198000000 48200385296 16066000000 16066795098 3181098112 3181893210
+48201000000 48203385375 16067000000 16067795125 3182098112 3182893237
+48204000000 48206385600 16068000000 16068795200 3183098112 3183893312
+48207000000 48209385727 16069000000 16069795242 3184098112 3184893354
+48210000000 48212385816 16070000000 16070795272 3185098112 3185893384
+48213000000 48215385922 16071000000 16071795307 3186098112 3186893419
+48216000000 48218386133 16072000000 16072795377 3187098112 3187893489
+48219000000 48221386342 16073000000 16073795447 3188098112 3188893559
+48222000000 48224386487 16074000000 16074795495 3189098112 3189893607
+48225000000 48227386613 16075000000 16075795537 3190098112 3190893649
+48228000000 48230386779 16076000000 16076795593 3191098112 3191893705
+48231000000 48233386859 16077000000 16077795619 3192098112 3192893731
+48234000000 48236387094 16078000000 16078795698 3193098112 3193893810
+48237000000 48239387253 16079000000 16079795751 3194098112 3194893863
+48240000000 48242387374 16080000000 16080795791 3195098112 3195893903
+48243000000 48245387534 16081000000 16081795844 3196098112 3196893956
+48246000000 48248387617 16082000000 16082795872 3197098112 3197893984
+48249000000 48251387863 16083000000 16083795954 3198098112 3198894066
+48252000000 48254387986 16084000000 16084795995 3199098112 3199894107
+48255000000 48257388122 16085000000 16085796040 3200098112 3200894152
+48258000000 48260388297 16086000000 16086796099 3201098112 3201894211
+48261000000 48263388419 16087000000 16087796139 3202098112 3202894251
+48264000000 48266388569 16088000000 16088796189 3203098112 3203894301
+48267000000 48269388717 16089000000 16089796239 3204098112 3204894351
+48270000000 48271562411 16090000000 16090520803 3205098112 3205618915
+48273000000 48275389037 16091000000 16091796345 3206098112 3206894457
+48276000000 48278389169 16092000000 16092796389 3207098112 3207894501
+48279000000 48281389343 16093000000 16093796447 3208098112 3208894559
+48282000000 48284389462 16094000000 16094796487 3209098112 3209894599
+48285000000 48287389586 16095000000 16095796528 3210098112 3210894640
+48288000000 48290389805 16096000000 16096796601 3211098112 3211894713
+48291000000 48293389941 16097000000 16097796647 3212098112 3212894759
+48294000000 48296390092 16098000000 16098796697 3213098112 3213894809
+48297000000 48299390242 16099000000 16099796747 3214098112 3214894859
+48300000000 48302390357 16100000000 16100796785 3215098112 3215894897
+48303000000 48305390454 16101000000 16101796818 3216098112 3216894930
+48306000000 48308390662 16102000000 16102796887 3217098112 3217894999
+48309000000 48311390817 16103000000 16103796939 3218098112 3218895051
+48312000000 48314390976 16104000000 16104796992 3219098112 3219895104
+48315000000 48317391150 16105000000 16105797050 3220098112 3220895162
+48318000000 48320391250 16106000000 16106797083 3221098112 3221895195
+48321000000 48323391428 16107000000 16107797142 3222098112 3222895254
+48324000000 48326391577 16108000000 16108797192 3223098112 3223895304
+48327000000 48329391705 16109000000 16109797235 3224098112 3224895347
+48330000000 48332391874 16110000000 16110797291 3225098112 3225895403
+48333000000 48335391994 16111000000 16111797331 3226098112 3226895443
+48336000000 48337219344 16112000000 16112406448 3227098112 3227504560
+48339000000 48341392244 16113000000 16113797414 3228098112 3228895526
+48342000000 48344392502 16114000000 16114797500 3229098112 3229895612
+48345000000 48347392607 16115000000 16115797535 3230098112 3230895647
+48348000000 48350392687 16116000000 16116797562 3231098112 3231895674
+48351000000 48353392834 16117000000 16117797611 3232098112 3232895723
+48354000000 48356393088 16118000000 16118797696 3233098112 3233895808
+48357000000 48359393178 16119000000 16119797726 3234098112 3234895838
+48360000000 48362393423 16120000000 16120797807 3235098112 3235895919
+48363000000 48365393501 16121000000 16121797833 3236098112 3236895945
+48366000000 48368393678 16122000000 16122797892 3237098112 3237896004
+48369000000 48371393824 16123000000 16123797941 3238098112 3238896053
+48372000000 48374393968 16124000000 16124797989 3239098112 3239896101
+48375000000 48376016622 16125000000 16125338874 3240098112 3240436986
+48378000000 48380394283 16126000000 16126798094 3241098112 3241896206
+48381000000 48383394443 16127000000 16127798147 3242098112 3242896259
+48384000000 48386394580 16128000000 16128798193 3243098112 3243896305
+48387000000 48389394738 16129000000 16129798246 3244098112 3244896358
+48390000000 48392394896 16130000000 16130798298 3245098112 3245896410
+48393000000 48395395010 16131000000 16131798336 3246098112 3246896448
+48396000000 48398395171 16132000000 16132798390 3247098112 3247896502
+48399000000 48401395298 16133000000 16133798432 3248098112 3248896544
+48402000000 48404395407 16134000000 16134798469 3249098112 3249896581
+48405000000 48407395549 16135000000 16135798516 3250098112 3250896628
+48408000000 48410395783 16136000000 16136798594 3251098112 3251896706
+48411000000 48413395696 16137000000 16137798565 3252098112 3252896677
+48414000000 48416395817 16138000000 16138798605 3253098112 3253896717
+48417000000 48419395925 16139000000 16139798641 3254098112 3254896753
+48420000000 48422396160 16140000000 16140798720 3255098112 3255896832
+48423000000 48425396339 16141000000 16141798779 3256098112 3256896891
+48426000000 48428309979 16142000000 16142769993 3257098112 3257868105
+48429000000 48431396608 16143000000 16143798869 3258098112 3258896981
+48432000000 48434396781 16144000000 16144798927 3259098112 3259897039
+48435000000 48437396897 16145000000 16145798965 3260098112 3260897077
+48438000000 48440397070 16146000000 16146799023 3261098112 3261897135
+48441000000 48443397242 16147000000 16147799080 3262098112 3262897192
+48444000000 48446397298 16148000000 16148799099 3263098112 3263897211
+48447000000 48449397444 16149000000 16149799148 3264098112 3264897260
+48450000000 48452397640 16150000000 16150799213 3265098112 3265897325
+48453000000 48455397669 16151000000 16151799223 3266098112 3266897335
+48456000000 48458397975 16152000000 16152799325 3267098112 3267897437
+48459000000 48461398147 16153000000 16153799382 3268098112 3268897494
+48462000000 48464398280 16154000000 16154799426 3269098112 3269897538
+48465000000 48467398397 16155000000 16155799465 3270098112 3270897577
+48468000000 48470398582 16156000000 16156799527 3271098112 3271897639
+48471000000 48473398688 16157000000 16157799562 3272098112 3272897674
+48474000000 48476398869 16158000000 16158799623 3273098112 3273897735
+48477000000 48479399081 16159000000 16159799693 3274098112 3274897805
+48480000000 48482399188 16160000000 16160799729 3275098112 3275897841
+48483000000 48485399354 16161000000 16161799784 3276098112 3276897896
+48486000000 48487998099 16162000000 16162666033 3277098112 3277764145
+48489000000 48491399625 16163000000 16163799875 3278098112 3278897987
+48492000000 48494399737 16164000000 16164799912 3279098112 3279898024
+48495000000 48497399946 16165000000 16165799982 3280098112 3280898094
+48498000000 48500400025 16166000000 16166800008 3281098112 3281898120
+48501000000 48503400250 16167000000 16167800083 3282098112 3282898195
+48504000000 48506400377 16168000000 16168800125 3283098112 3283898237
+48507000000 48509400466 16169000000 16169800155 3284098112 3284898267
+48510000000 48512400572 16170000000 16170800190 3285098112 3285898302
+48513000000 48515400783 16171000000 16171800261 3286098112 3286898373
+48516000000 48518400992 16172000000 16172800330 3287098112 3287898442
+48519000000 48521401137 16173000000 16173800379 3288098112 3288898491
+48522000000 48524401263 16174000000 16174800421 3289098112 3289898533
+48525000000 48527401429 16175000000 16175800476 3290098112 3290898588
+48528000000 48530401509 16176000000 16176800503 3291098112 3291898615
+48531000000 48533401744 16177000000 16177800581 3292098112 3292898693
+48534000000 48536401903 16178000000 16178800634 3293098112 3293898746
+48537000000 48539402024 16179000000 16179800674 3294098112 3294898786
+48540000000 48542402184 16180000000 16180800728 3295098112 3295898840
+48543000000 48545402267 16181000000 16181800755 3296098112 3296898867
+48546000000 48548402513 16182000000 16182800837 3297098112 3297898949
+48549000000 48551402636 16183000000 16183800878 3298098112 3298898990
+48552000000 48554402772 16184000000 16184800924 3299098112 3299899036
+48555000000 48557402947 16185000000 16185800982 3300098112 3300899094
+48558000000 48560403069 16186000000 16186801023 3301098112 3301899135
+48561000000 48563403219 16187000000 16187801073 3302098112 3302899185
+48564000000 48566403367 16188000000 16188801122 3303098112 3303899234
+48567000000 48568577061 16189000000 16189525687 3304098112 3304623799
+48570000000 48572403687 16190000000 16190801229 3305098112 3305899341
+48573000000 48575403819 16191000000 16191801273 3306098112 3306899385
+48576000000 48578403993 16192000000 16192801331 3307098112 3307899443
+48579000000 48581404112 16193000000 16193801370 3308098112 3308899482
+48582000000 48584404236 16194000000 16194801412 3309098112 3309899524
+48585000000 48587404455 16195000000 16195801485 3310098112 3310899597
+48588000000 48590404591 16196000000 16196801530 3311098112 3311899642
+48591000000 48593404742 16197000000 16197801580 3312098112 3312899692
+48594000000 48596404892 16198000000 16198801630 3313098112 3313899742
+48597000000 48599405007 16199000000 16199801669 3314098112 3314899781
+48600000000 48602405104 16200000000 16200801701 3315098112 3315899813
+48603000000 48605405312 16201000000 16201801770 3316098112 3316899882
+48606000000 48608405467 16202000000 16202801822 3317098112 3317899934
+48609000000 48611405626 16203000000 16203801875 3318098112 3318899987
+48612000000 48614405800 16204000000 16204801933 3319098112 3319900045
+48615000000 48617405900 16205000000 16205801966 3320098112 3320900078
+48618000000 48620406078 16206000000 16206802026 3321098112 3321900138
+48621000000 48623406227 16207000000 16207802075 3322098112 3322900187
+48624000000 48626406355 16208000000 16208802118 3323098112 3323900230
+48627000000 48629406524 16209000000 16209802174 3324098112 3324900286
+48630000000 48632406644 16210000000 16210802214 3325098112 3325900326
+48633000000 48634233994 16211000000 16211411331 3326098112 3326509443
+48636000000 48638406894 16212000000 16212802298 3327098112 3327900410
+48639000000 48641407152 16213000000 16213802384 3328098112 3328900496
+48642000000 48644407257 16214000000 16214802419 3329098112 3329900531
+48645000000 48647407337 16215000000 16215802445 3330098112 3330900557
+48648000000 48650407484 16216000000 16216802494 3331098112 3331900606
+48651000000 48653407738 16217000000 16217802579 3332098112 3332900691
+48654000000 48656407828 16218000000 16218802609 3333098112 3333900721
+48657000000 48659408073 16219000000 16219802691 3334098112 3334900803
+48660000000 48662408151 16220000000 16220802717 3335098112 3335900829
+48663000000 48665408328 16221000000 16221802776 3336098112 3336900888
+48666000000 48668408474 16222000000 16222802824 3337098112 3337900936
+48669000000 48671408618 16223000000 16223802872 3338098112 3338900984
+48672000000 48673031272 16224000000 16224343757 3339098112 3339441869
+48675000000 48677408933 16225000000 16225802977 3340098112 3340901089
+48678000000 48680409093 16226000000 16226803031 3341098112 3341901143
+48681000000 48683409230 16227000000 16227803076 3342098112 3342901188
+48684000000 48686409388 16228000000 16228803129 3343098112 3343901241
+48687000000 48689409546 16229000000 16229803182 3344098112 3344901294
+48690000000 48692409660 16230000000 16230803220 3345098112 3345901332
+48693000000 48695409821 16231000000 16231803273 3346098112 3346901385
+48696000000 48698409948 16232000000 16232803316 3347098112 3347901428
+48699000000 48701410057 16233000000 16233803352 3348098112 3348901464
+48702000000 48704410199 16234000000 16234803399 3349098112 3349901511
+48705000000 48707410433 16235000000 16235803477 3350098112 3350901589
+48708000000 48710410346 16236000000 16236803448 3351098112 3351901560
+48711000000 48713410467 16237000000 16237803489 3352098112 3352901601
+48714000000 48716410575 16238000000 16238803525 3353098112 3353901637
+48717000000 48719410810 16239000000 16239803603 3354098112 3354901715
+48720000000 48722410989 16240000000 16240803663 3355098112 3355901775
+48723000000 48725324629 16241000000 16241774876 3356098112 3356872988
+48726000000 48728411258 16242000000 16242803752 3357098112 3357901864
+48729000000 48731411431 16243000000 16243803810 3358098112 3358901922
+48732000000 48734411547 16244000000 16244803849 3359098112 3359901961
+48735000000 48737411720 16245000000 16245803906 3360098112 3360902018
+48738000000 48740411892 16246000000 16246803964 3361098112 3361902076
+48741000000 48743411948 16247000000 16247803982 3362098112 3362902094
+48744000000 48746412094 16248000000 16248804031 3363098112 3363902143
+48747000000 48749412290 16249000000 16249804096 3364098112 3364902208
+48750000000 48752412319 16250000000 16250804106 3365098112 3365902218
+48753000000 48755412625 16251000000 16251804208 3366098112 3366902320
+48756000000 48758412797 16252000000 16252804265 3367098112 3367902377
+48759000000 48761412930 16253000000 16253804310 3368098112 3368902422
+48762000000 48764413047 16254000000 16254804349 3369098112 3369902461
+48765000000 48767413232 16255000000 16255804410 3370098112 3370902522
+48768000000 48770413338 16256000000 16256804446 3371098112 3371902558
+48771000000 48773413519 16257000000 16257804506 3372098112 3372902618
+48774000000 48776413731 16258000000 16258804577 3373098112 3373902689
+48777000000 48779413838 16259000000 16259804612 3374098112 3374902724
+48780000000 48782414004 16260000000 16260804668 3375098112 3375902780
+48783000000 48785012749 16261000000 16261670916 3376098112 3376769028
+48786000000 48788414275 16262000000 16262804758 3377098112 3377902870
+48789000000 48791414387 16263000000 16263804795 3378098112 3378902907
+48792000000 48794414596 16264000000 16264804865 3379098112 3379902977
+48795000000 48797414675 16265000000 16265804891 3380098112 3380903003
+48798000000 48800414900 16266000000 16266804966 3381098112 3381903078
+48801000000 48803415027 16267000000 16267805009 3382098112 3382903121
+48804000000 48806415116 16268000000 16268805038 3383098112 3383903150
+48807000000 48809415222 16269000000 16269805074 3384098112 3384903186
+48810000000 48812415433 16270000000 16270805144 3385098112 3385903256
+48813000000 48815415642 16271000000 16271805214 3386098112 3386903326
+48816000000 48818415787 16272000000 16272805262 3387098112 3387903374
+48819000000 48821415913 16273000000 16273805304 3388098112 3388903416
+48822000000 48824416079 16274000000 16274805359 3389098112 3389903471
+48825000000 48827416159 16275000000 16275805386 3390098112 3390903498
+48828000000 48830416394 16276000000 16276805464 3391098112 3391903576
+48831000000 48833416553 16277000000 16277805517 3392098112 3392903629
+48834000000 48836416674 16278000000 16278805558 3393098112 3393903670
+48837000000 48839416834 16279000000 16279805611 3394098112 3394903723
+48840000000 48842416917 16280000000 16280805639 3395098112 3395903751
+48843000000 48845417163 16281000000 16281805721 3396098112 3396903833
+48846000000 48848417286 16282000000 16282805762 3397098112 3397903874
+48849000000 48851417422 16283000000 16283805807 3398098112 3398903919
+48852000000 48854417597 16284000000 16284805865 3399098112 3399903977
+48855000000 48857417719 16285000000 16285805906 3400098112 3400904018
+48858000000 48860417869 16286000000 16286805956 3401098112 3401904068
+48861000000 48863418017 16287000000 16287806005 3402098112 3402904117
+48864000000 48865591711 16288000000 16288530570 3403098112 3403628682
+48867000000 48869418337 16289000000 16289806112 3404098112 3404904224
+48870000000 48872418469 16290000000 16290806156 3405098112 3405904268
+48873000000 48875418643 16291000000 16291806214 3406098112 3406904326
+48876000000 48878418762 16292000000 16292806254 3407098112 3407904366
+48879000000 48881418886 16293000000 16293806295 3408098112 3408904407
+48882000000 48884419105 16294000000 16294806368 3409098112 3409904480
+48885000000 48887419241 16295000000 16295806413 3410098112 3410904525
+48888000000 48890419392 16296000000 16296806464 3411098112 3411904576
+48891000000 48893419542 16297000000 16297806514 3412098112 3412904626
+48894000000 48896419657 16298000000 16298806552 3413098112 3413904664
+48897000000 48899419754 16299000000 16299806584 3414098112 3414904696
+48900000000 48902419962 16300000000 16300806654 3415098112 3415904766
+48903000000 48905420117 16301000000 16301806705 3416098112 3416904817
+48906000000 48908420276 16302000000 16302806758 3417098112 3417904870
+48909000000 48911420450 16303000000 16303806816 3418098112 3418904928
+48912000000 48914420550 16304000000 16304806850 3419098112 3419904962
+48915000000 48917420728 16305000000 16305806909 3420098112 3420905021
+48918000000 48920420877 16306000000 16306806959 3421098112 3421905071
+48921000000 48923421005 16307000000 16307807001 3422098112 3422905113
+48924000000 48926421174 16308000000 16308807058 3423098112 3423905170
+48927000000 48929421294 16309000000 16309807098 3424098112 3424905210
+48930000000 48931248644 16310000000 16310416214 3425098112 3425514326
+48933000000 48935421544 16311000000 16311807181 3426098112 3426905293
+48936000000 48938421802 16312000000 16312807267 3427098112 3427905379
+48939000000 48941421907 16313000000 16313807302 3428098112 3428905414
+48942000000 48944421987 16314000000 16314807329 3429098112 3429905441
+48945000000 48947422134 16315000000 16315807378 3430098112 3430905490
+48948000000 48950422388 16316000000 16316807462 3431098112 3431905574
+48951000000 48953422478 16317000000 16317807492 3432098112 3432905604
+48954000000 48956422723 16318000000 16318807574 3433098112 3433905686
+48957000000 48959422801 16319000000 16319807600 3434098112 3434905712
+48960000000 48962422978 16320000000 16320807659 3435098112 3435905771
+48963000000 48965423124 16321000000 16321807708 3436098112 3436905820
+48966000000 48968423268 16322000000 16322807756 3437098112 3437905868
+48969000000 48970045922 16323000000 16323348640 3438098112 3438446752
+48972000000 48974423583 16324000000 16324807861 3439098112 3439905973
+48975000000 48977423743 16325000000 16325807914 3440098112 3440906026
+48978000000 48980423880 16326000000 16326807960 3441098112 3441906072
+48981000000 48983424038 16327000000 16327808012 3442098112 3442906124
+48984000000 48986424196 16328000000 16328808065 3443098112 3443906177
+48987000000 48989424310 16329000000 16329808103 3444098112 3444906215
+48990000000 48992424471 16330000000 16330808157 3445098112 3445906269
+48993000000 48995424598 16331000000 16331808199 3446098112 3446906311
+48996000000 48998424707 16332000000 16332808235 3447098112 3447906347
+48999000000 49001424849 16333000000 16333808283 3448098112 3448906395
+49002000000 49004425083 16334000000 16334808361 3449098112 3449906473
+49005000000 49007424996 16335000000 16335808332 3450098112 3450906444
+49008000000 49010425117 16336000000 16336808372 3451098112 3451906484
+49011000000 49013425225 16337000000 16337808408 3452098112 3452906520
+49014000000 49016425460 16338000000 16338808486 3453098112 3453906598
+49017000000 49019425639 16339000000 16339808546 3454098112 3454906658
+49020000000 49022339279 16340000000 16340779759 3455098112 3455877871
+49023000000 49025425908 16341000000 16341808636 3456098112 3456906748
+49026000000 49028426081 16342000000 16342808693 3457098112 3457906805
+49029000000 49031426197 16343000000 16343808732 3458098112 3458906844
+49032000000 49034426370 16344000000 16344808790 3459098112 3459906902
+49035000000 49037426542 16345000000 16345808847 3460098112 3460906959
+49038000000 49040426598 16346000000 16346808866 3461098112 3461906978
+49041000000 49043426744 16347000000 16347808914 3462098112 3462907026
+49044000000 49046426940 16348000000 16348808980 3463098112 3463907092
+49047000000 49049426969 16349000000 16349808989 3464098112 3464907101
+49050000000 49052427275 16350000000 16350809091 3465098112 3465907203
+49053000000 49055427447 16351000000 16351809149 3466098112 3466907261
+49056000000 49058427580 16352000000 16352809193 3467098112 3467907305
+49059000000 49061427697 16353000000 16353809232 3468098112 3468907344
+49062000000 49064427882 16354000000 16354809294 3469098112 3469907406
+49065000000 49067427988 16355000000 16355809329 3470098112 3470907441
+49068000000 49070428169 16356000000 16356809389 3471098112 3471907501
+49071000000 49073428381 16357000000 16357809460 3472098112 3472907572
+49074000000 49076428488 16358000000 16358809496 3473098112 3473907608
+49077000000 49079428654 16359000000 16359809551 3474098112 3474907663
+49080000000 49082027399 16360000000 16360675799 3475098112 3475773911
+49083000000 49085428925 16361000000 16361809641 3476098112 3476907753
+49086000000 49088429037 16362000000 16362809679 3477098112 3477907791
+49089000000 49091429246 16363000000 16363809748 3478098112 3478907860
+49092000000 49094429325 16364000000 16364809775 3479098112 3479907887
+49095000000 49097429550 16365000000 16365809850 3480098112 3480907962
+49098000000 49100429677 16366000000 16366809892 3481098112 3481908004
+49101000000 49103429766 16367000000 16367809922 3482098112 3482908034
+49104000000 49106429872 16368000000 16368809957 3483098112 3483908069
+49107000000 49109430083 16369000000 16369810027 3484098112 3484908139
+49110000000 49112430292 16370000000 16370810097 3485098112 3485908209
+49113000000 49115430437 16371000000 16371810145 3486098112 3486908257
+49116000000 49118430563 16372000000 16372810187 3487098112 3487908299
+49119000000 49121430729 16373000000 16373810243 3488098112 3488908355
+49122000000 49124430809 16374000000 16374810269 3489098112 3489908381
+49125000000 49127431044 16375000000 16375810348 3490098112 3490908460
+49128000000 49130431203 16376000000 16376810401 3491098112 3491908513
+49131000000 49133431324 16377000000 16377810441 3492098112 3492908553
+49134000000 49136431484 16378000000 16378810494 3493098112 3493908606
+49137000000 49139431567 16379000000 16379810522 3494098112 3494908634
+49140000000 49142431813 16380000000 16380810604 3495098112 3495908716
+49143000000 49145431936 16381000000 16381810645 3496098112 3496908757
+49146000000 49148432072 16382000000 16382810690 3497098112 3497908802
+49149000000 49151432247 16383000000 16383810749 3498098112 3498908861
+49152000000 49154432369 16384000000 16384810789 3499098112 3499908901
+49155000000 49157432519 16385000000 16385810839 3500098112 3500908951
+49158000000 49160432667 16386000000 16386810889 3501098112 3501909001
+49161000000 49162606361 16387000000 16387535453 3502098112 3502633565
+49164000000 49166432987 16388000000 16388810995 3503098112 3503909107
+49167000000 49169433119 16389000000 16389811039 3504098112 3504909151
+49170000000 49172433293 16390000000 16390811097 3505098112 3505909209
+49173000000 49175433412 16391000000 16391811137 3506098112 3506909249
+49176000000 49178433536 16392000000 16392811178 3507098112 3507909290
+49179000000 49181433755 16393000000 16393811251 3508098112 3508909363
+49182000000 49184433891 16394000000 16394811297 3509098112 3509909409
+49185000000 49187434042 16395000000 16395811347 3510098112 3510909459
+49188000000 49190434192 16396000000 16396811397 3511098112 3511909509
+49191000000 49193434307 16397000000 16397811435 3512098112 3512909547
+49194000000 49196434404 16398000000 16398811468 3513098112 3513909580
+49197000000 49199434612 16399000000 16399811537 3514098112 3514909649
+49200000000 49202434767 16400000000 16400811589 3515098112 3515909701
+49203000000 49205434926 16401000000 16401811642 3516098112 3516909754
+49206000000 49208435100 16402000000 16402811700 3517098112 3517909812
+49209000000 49211435200 16403000000 16403811733 3518098112 3518909845
+49212000000 49214435378 16404000000 16404811792 3519098112 3519909904
+49215000000 49217435527 16405000000 16405811842 3520098112 3520909954
+49218000000 49220435655 16406000000 16406811885 3521098112 3521909997
+49221000000 49223435824 16407000000 16407811941 3522098112 3522910053
+49224000000 49226435944 16408000000 16408811981 3523098112 3523910093
+49227000000 49228263294 16409000000 16409421098 3524098112 3524519210
+49230000000 49232436194 16410000000 16410812064 3525098112 3525910176
+49233000000 49235436452 16411000000 16411812150 3526098112 3526910262
+49236000000 49238436557 16412000000 16412812185 3527098112 3527910297
+49239000000 49241436637 16413000000 16413812212 3528098112 3528910324
+49242000000 49244436784 16414000000 16414812261 3529098112 3529910373
+49245000000 49247437038 16415000000 16415812346 3530098112 3530910458
+49248000000 49250437128 16416000000 16416812376 3531098112 3531910488
+49251000000 49253437373 16417000000 16417812457 3532098112 3532910569
+49254000000 49256437451 16418000000 16418812483 3533098112 3533910595
+49257000000 49259437628 16419000000 16419812542 3534098112 3534910654
+49260000000 49262437774 16420000000 16420812591 3535098112 3535910703
+49263000000 49265437918 16421000000 16421812639 3536098112 3536910751
+49266000000 49267060572 16422000000 16422353524 3537098112 3537451636
+49269000000 49271438233 16423000000 16423812744 3538098112 3538910856
+49272000000 49274438393 16424000000 16424812797 3539098112 3539910909
+49275000000 49277438530 16425000000 16425812843 3540098112 3540910955
+49278000000 49280438688 16426000000 16426812896 3541098112 3541911008
+49281000000 49283438846 16427000000 16427812948 3542098112 3542911060
+49284000000 49286438960 16428000000 16428812986 3543098112 3543911098
+49287000000 49289439121 16429000000 16429813040 3544098112 3544911152
+49290000000 49292439248 16430000000 16430813082 3545098112 3545911194
+49293000000 49295439357 16431000000 16431813119 3546098112 3546911231
+49296000000 49298439499 16432000000 16432813166 3547098112 3547911278
+49299000000 49301439733 16433000000 16433813244 3548098112 3548911356
+49302000000 49304439646 16434000000 16434813215 3549098112 3549911327
+49305000000 49307439767 16435000000 16435813255 3550098112 3550911367
+49308000000 49310439875 16436000000 16436813291 3551098112 3551911403
+49311000000 49313440110 16437000000 16437813370 3552098112 3552911482
+49314000000 49316440289 16438000000 16438813429 3553098112 3553911541
+49317000000 49319353929 16439000000 16439784643 3554098112 3554882755
+49320000000 49322440558 16440000000 16440813519 3555098112 3555911631
+49323000000 49325440731 16441000000 16441813577 3556098112 3556911689
+49326000000 49328440847 16442000000 16442813615 3557098112 3557911727
+49329000000 49331441020 16443000000 16443813673 3558098112 3558911785
+49332000000 49334441192 16444000000 16444813730 3559098112 3559911842
+49335000000 49337441248 16445000000 16445813749 3560098112 3560911861
+49338000000 49340441394 16446000000 16446813798 3561098112 3561911910
+49341000000 49343441590 16447000000 16447813863 3562098112 3562911975
+49344000000 49346441619 16448000000 16448813873 3563098112 3563911985
+49347000000 49349441925 16449000000 16449813975 3564098112 3564912087
+49350000000 49352442097 16450000000 16450814032 3565098112 3565912144
+49353000000 49355442230 16451000000 16451814076 3566098112 3566912188
+49356000000 49358442347 16452000000 16452814115 3567098112 3567912227
+49359000000 49361442532 16453000000 16453814177 3568098112 3568912289
+49362000000 49364442638 16454000000 16454814212 3569098112 3569912324
+49365000000 49367442819 16455000000 16455814273 3570098112 3570912385
+49368000000 49370443031 16456000000 16456814343 3571098112 3571912455
+49371000000 49373443138 16457000000 16457814379 3572098112 3572912491
+49374000000 49376443304 16458000000 16458814434 3573098112 3573912546
+49377000000 49379042049 16459000000 16459680683 3574098112 3574778795
+49380000000 49382443575 16460000000 16460814525 3575098112 3575912637
+49383000000 49385443687 16461000000 16461814562 3576098112 3576912674
+49386000000 49388443896 16462000000 16462814632 3577098112 3577912744
+49389000000 49391443975 16463000000 16463814658 3578098112 3578912770
+49392000000 49394444200 16464000000 16464814733 3579098112 3579912845
+49395000000 49397444327 16465000000 16465814775 3580098112 3580912887
+49398000000 49400444416 16466000000 16466814805 3581098112 3581912917
+49401000000 49403444522 16467000000 16467814840 3582098112 3582912952
+49404000000 49406444733 16468000000 16468814911 3583098112 3583913023
+49407000000 49409444942 16469000000 16469814980 3584098112 3584913092
+49410000000 49412445087 16470000000 16470815029 3585098112 3585913141
+49413000000 49415445213 16471000000 16471815071 3586098112 3586913183
+49416000000 49418445379 16472000000 16472815126 3587098112 3587913238
+49419000000 49421445459 16473000000 16473815153 3588098112 3588913265
+49422000000 49424445694 16474000000 16474815231 3589098112 3589913343
+49425000000 49427445853 16475000000 16475815284 3590098112 3590913396
+49428000000 49430445974 16476000000 16476815324 3591098112 3591913436
+49431000000 49433446134 16477000000 16477815378 3592098112 3592913490
+49434000000 49436446217 16478000000 16478815405 3593098112 3593913517
+49437000000 49439446463 16479000000 16479815487 3594098112 3594913599
+49440000000 49442446586 16480000000 16480815528 3595098112 3595913640
+49443000000 49445446722 16481000000 16481815574 3596098112 3596913686
+49446000000 49448446897 16482000000 16482815632 3597098112 3597913744
+49449000000 49451447019 16483000000 16483815673 3598098112 3598913785
+49452000000 49454447169 16484000000 16484815723 3599098112 3599913835
+49455000000 49457447317 16485000000 16485815772 3600098112 3600913884
+49458000000 49459621011 16486000000 16486540337 3601098112 3601638449
+49461000000 49463447637 16487000000 16487815879 3602098112 3602913991
+49464000000 49466447769 16488000000 16488815923 3603098112 3603914035
+49467000000 49469447943 16489000000 16489815981 3604098112 3604914093
+49470000000 49472448062 16490000000 16490816020 3605098112 3605914132
+49473000000 49475448186 16491000000 16491816062 3606098112 3606914174
+49476000000 49478448405 16492000000 16492816135 3607098112 3607914247
+49479000000 49481448541 16493000000 16493816180 3608098112 3608914292
+49482000000 49484448692 16494000000 16494816230 3609098112 3609914342
+49485000000 49487448842 16495000000 16495816280 3610098112 3610914392
+49488000000 49490448957 16496000000 16496816319 3611098112 3611914431
+49491000000 49493449054 16497000000 16497816351 3612098112 3612914463
+49494000000 49496449262 16498000000 16498816420 3613098112 3613914532
+49497000000 49499449417 16499000000 16499816472 3614098112 3614914584
+49500000000 49502449576 16500000000 16500816525 3615098112 3615914637
+49503000000 49505449750 16501000000 16501816583 3616098112 3616914695
+49506000000 49508449850 16502000000 16502816616 3617098112 3617914728
+49509000000 49511450028 16503000000 16503816676 3618098112 3618914788
+49512000000 49514450177 16504000000 16504816725 3619098112 3619914837
+49515000000 49517450305 16505000000 16505816768 3620098112 3620914880
+49518000000 49520450474 16506000000 16506816824 3621098112 3621914936
+49521000000 49523450594 16507000000 16507816864 3622098112 3622914976
+49524000000 49525277944 16508000000 16508425981 3623098112 3623524093
+49527000000 49529450844 16509000000 16509816948 3624098112 3624915060
+49530000000 49532451102 16510000000 16510817034 3625098112 3625915146
+49533000000 49535451207 16511000000 16511817069 3626098112 3626915181
+49536000000 49538451287 16512000000 16512817095 3627098112 3627915207
+49539000000 49541451434 16513000000 16513817144 3628098112 3628915256
+49542000000 49544451688 16514000000 16514817229 3629098112 3629915341
+49545000000 49547451778 16515000000 16515817259 3630098112 3630915371
+49548000000 49550452023 16516000000 16516817341 3631098112 3631915453
+49551000000 49553452101 16517000000 16517817367 3632098112 3632915479
+49554000000 49556452278 16518000000 16518817426 3633098112 3633915538
+49557000000 49559452424 16519000000 16519817474 3634098112 3634915586
+49560000000 49562452568 16520000000 16520817522 3635098112 3635915634
+49563000000 49564075222 16521000000 16521358407 3636098112 3636456519
+49566000000 49568452883 16522000000 16522817627 3637098112 3637915739
+49569000000 49571453043 16523000000 16523817681 3638098112 3638915793
+49572000000 49574453180 16524000000 16524817726 3639098112 3639915838
+49575000000 49577453338 16525000000 16525817779 3640098112 3640915891
+49578000000 49580453496 16526000000 16526817832 3641098112 3641915944
+49581000000 49583453610 16527000000 16527817870 3642098112 3642915982
+49584000000 49586453771 16528000000 16528817923 3643098112 3643916035
+49587000000 49589453898 16529000000 16529817966 3644098112 3644916078
+49590000000 49592454007 16530000000 16530818002 3645098112 3645916114
+49593000000 49595454149 16531000000 16531818049 3646098112 3646916161
+49596000000 49598454383 16532000000 16532818127 3647098112 3647916239
+49599000000 49601454296 16533000000 16533818098 3648098112 3648916210
+49602000000 49604454417 16534000000 16534818139 3649098112 3649916251
+49605000000 49607454525 16535000000 16535818175 3650098112 3650916287
+49608000000 49610454760 16536000000 16536818253 3651098112 3651916365
+49611000000 49613454939 16537000000 16537818313 3652098112 3652916425
+49614000000 49616368579 16538000000 16538789526 3653098112 3653887638
+49617000000 49619455208 16539000000 16539818402 3654098112 3654916514
+49620000000 49622455381 16540000000 16540818460 3655098112 3655916572
+49623000000 49625455497 16541000000 16541818499 3656098112 3656916611
+49626000000 49628455670 16542000000 16542818556 3657098112 3657916668
+49629000000 49631455842 16543000000 16543818614 3658098112 3658916726
+49632000000 49634455898 16544000000 16544818632 3659098112 3659916744
+49635000000 49637456044 16545000000 16545818681 3660098112 3660916793
+49638000000 49640456240 16546000000 16546818746 3661098112 3661916858
+49641000000 49643456269 16547000000 16547818756 3662098112 3662916868
+49644000000 49646456575 16548000000 16548818858 3663098112 3663916970
+49647000000 49649456747 16549000000 16549818915 3664098112 3664917027
+49650000000 49652456880 16550000000 16550818960 3665098112 3665917072
+49653000000 49655456997 16551000000 16551818999 3666098112 3666917111
+49656000000 49658457182 16552000000 16552819060 3667098112 3667917172
+49659000000 49661457288 16553000000 16553819096 3668098112 3668917208
+49662000000 49664457469 16554000000 16554819156 3669098112 3669917268
+49665000000 49667457681 16555000000 16555819227 3670098112 3670917339
+49668000000 49670457788 16556000000 16556819262 3671098112 3671917374
+49671000000 49673457954 16557000000 16557819318 3672098112 3672917430
+49674000000 49676056699 16558000000 16558685566 3673098112 3673783678
+49677000000 49679458225 16559000000 16559819408 3674098112 3674917520
+49680000000 49682458337 16560000000 16560819445 3675098112 3675917557
+49683000000 49685458546 16561000000 16561819515 3676098112 3676917627
+49686000000 49688458625 16562000000 16562819541 3677098112 3677917653
+49689000000 49691458850 16563000000 16563819616 3678098112 3678917728
+49692000000 49694458977 16564000000 16564819659 3679098112 3679917771
+49695000000 49697459066 16565000000 16565819688 3680098112 3680917800
+49698000000 49700459172 16566000000 16566819724 3681098112 3681917836
+49701000000 49703459383 16567000000 16567819794 3682098112 3682917906
+49704000000 49706459592 16568000000 16568819864 3683098112 3683917976
+49707000000 49709459737 16569000000 16569819912 3684098112 3684918024
+49710000000 49712459863 16570000000 16570819954 3685098112 3685918066
+49713000000 49715460029 16571000000 16571820009 3686098112 3686918121
+49716000000 49718460109 16572000000 16572820036 3687098112 3687918148
+49719000000 49721460344 16573000000 16573820114 3688098112 3688918226
+49722000000 49724460503 16574000000 16574820167 3689098112 3689918279
+49725000000 49727460624 16575000000 16575820208 3690098112 3690918320
+49728000000 49730460784 16576000000 16576820261 3691098112 3691918373
+49731000000 49733460867 16577000000 16577820289 3692098112 3692918401
+49734000000 49736461113 16578000000 16578820371 3693098112 3693918483
+49737000000 49739461236 16579000000 16579820412 3694098112 3694918524
+49740000000 49742461372 16580000000 16580820457 3695098112 3695918569
+49743000000 49745461547 16581000000 16581820515 3696098112 3696918627
+49746000000 49748461669 16582000000 16582820556 3697098112 3697918668
+49749000000 49751461819 16583000000 16583820606 3698098112 3698918718
+49752000000 49754461967 16584000000 16584820655 3699098112 3699918767
+49755000000 49756635661 16585000000 16585545220 3700098112 3700643332
+49758000000 49760462287 16586000000 16586820762 3701098112 3701918874
+49761000000 49763462419 16587000000 16587820806 3702098112 3702918918
+49764000000 49766462593 16588000000 16588820864 3703098112 3703918976
+49767000000 49769462712 16589000000 16589820904 3704098112 3704919016
+49770000000 49772462836 16590000000 16590820945 3705098112 3705919057
+49773000000 49775463055 16591000000 16591821018 3706098112 3706919130
+49776000000 49778463191 16592000000 16592821063 3707098112 3707919175
+49779000000 49781463342 16593000000 16593821114 3708098112 3708919226
+49782000000 49784463492 16594000000 16594821164 3709098112 3709919276
+49785000000 49787463607 16595000000 16595821202 3710098112 3710919314
+49788000000 49790463704 16596000000 16596821234 3711098112 3711919346
+49791000000 49793463912 16597000000 16597821304 3712098112 3712919416
+49794000000 49796464067 16598000000 16598821355 3713098112 3713919467
+49797000000 49799464226 16599000000 16599821408 3714098112 3714919520
+49800000000 49802464400 16600000000 16600821466 3715098112 3715919578
+49803000000 49805464500 16601000000 16601821500 3716098112 3716919612
+49806000000 49808464678 16602000000 16602821559 3717098112 3717919671
+49809000000 49811464827 16603000000 16603821609 3718098112 3718919721
+49812000000 49814464955 16604000000 16604821651 3719098112 3719919763
+49815000000 49817465124 16605000000 16605821708 3720098112 3720919820
+49818000000 49820465244 16606000000 16606821748 3721098112 3721919860
+49821000000 49822292594 16607000000 16607430864 3722098112 3722528976
+49824000000 49826465494 16608000000 16608821831 3723098112 3723919943
+49827000000 49829465752 16609000000 16609821917 3724098112 3724920029
+49830000000 49832465857 16610000000 16610821952 3725098112 3725920064
+49833000000 49835465937 16611000000 16611821979 3726098112 3726920091
+49836000000 49838466084 16612000000 16612822028 3727098112 3727920140
+49839000000 49841466338 16613000000 16613822112 3728098112 3728920224
+49842000000 49844466428 16614000000 16614822142 3729098112 3729920254
+49845000000 49847466673 16615000000 16615822224 3730098112 3730920336
+49848000000 49850466751 16616000000 16616822250 3731098112 3731920362
+49851000000 49853466928 16617000000 16617822309 3732098112 3732920421
+49854000000 49856467074 16618000000 16618822358 3733098112 3733920470
+49857000000 49859467218 16619000000 16619822406 3734098112 3734920518
+49860000000 49861089872 16620000000 16620363290 3735098112 3735461402
+49863000000 49865467533 16621000000 16621822511 3736098112 3736920623
+49866000000 49868467693 16622000000 16622822564 3737098112 3737920676
+49869000000 49871467830 16623000000 16623822610 3738098112 3738920722
+49872000000 49874467988 16624000000 16624822662 3739098112 3739920774
+49875000000 49877468146 16625000000 16625822715 3740098112 3740920827
+49878000000 49880468260 16626000000 16626822753 3741098112 3741920865
+49881000000 49883468421 16627000000 16627822807 3742098112 3742920919
+49884000000 49886468548 16628000000 16628822849 3743098112 3743920961
+49887000000 49889468657 16629000000 16629822885 3744098112 3744920997
+49890000000 49892468799 16630000000 16630822933 3745098112 3745921045
+49893000000 49895469033 16631000000 16631823011 3746098112 3746921123
+49896000000 49898468946 16632000000 16632822982 3747098112 3747921094
+49899000000 49901469067 16633000000 16633823022 3748098112 3748921134
+49902000000 49904469175 16634000000 16634823058 3749098112 3749921170
+49905000000 49907469410 16635000000 16635823136 3750098112 3750921248
+49908000000 49910469589 16636000000 16636823196 3751098112 3751921308
+49911000000 49913383229 16637000000 16637794409 3752098112 3752892521
+49914000000 49916469858 16638000000 16638823286 3753098112 3753921398
+49917000000 49919470031 16639000000 16639823343 3754098112 3754921455
+49920000000 49922470147 16640000000 16640823382 3755098112 3755921494
+49923000000 49925470320 16641000000 16641823440 3756098112 3756921552
+49926000000 49928470492 16642000000 16642823497 3757098112 3757921609
+49929000000 49931470548 16643000000 16643823516 3758098112 3758921628
+49932000000 49934470694 16644000000 16644823564 3759098112 3759921676
+49935000000 49937470890 16645000000 16645823630 3760098112 3760921742
+49938000000 49940470919 16646000000 16646823639 3761098112 3761921751
+49941000000 49943471225 16647000000 16647823741 3762098112 3762921853
+49944000000 49946471397 16648000000 16648823799 3763098112 3763921911
+49947000000 49949471530 16649000000 16649823843 3764098112 3764921955
+49950000000 49952471647 16650000000 16650823882 3765098112 3765921994
+49953000000 49955471832 16651000000 16651823944 3766098112 3766922056
+49956000000 49958471938 16652000000 16652823979 3767098112 3767922091
+49959000000 49961472119 16653000000 16653824039 3768098112 3768922151
+49962000000 49964472331 16654000000 16654824110 3769098112 3769922222
+49965000000 49967472438 16655000000 16655824146 3770098112 3770922258
+49968000000 49970472604 16656000000 16656824201 3771098112 3771922313
+49971000000 49973071349 16657000000 16657690449 3772098112 3772788561
+49974000000 49976472875 16658000000 16658824291 3773098112 3773922403
+49977000000 49979472987 16659000000 16659824329 3774098112 3774922441
+49980000000 49982473196 16660000000 16660824398 3775098112 3775922510
+49983000000 49985473275 16661000000 16661824425 3776098112 3776922537
+49986000000 49988473500 16662000000 16662824500 3777098112 3777922612
+49989000000 49991473627 16663000000 16663824542 3778098112 3778922654
+49992000000 49994473716 16664000000 16664824572 3779098112 3779922684
+49995000000 49997473822 16665000000 16665824607 3780098112 3780922719
+49998000000 50000474033 16666000000 16666824677 3781098112 3781922789
+50001000000 50003474242 16667000000 16667824747 3782098112 3782922859
+50004000000 50006474387 16668000000 16668824795 3783098112 3783922907
+50007000000 50009474513 16669000000 16669824837 3784098112 3784922949
+50010000000 50012474679 16670000000 16670824893 3785098112 3785923005
+50013000000 50015474759 16671000000 16671824919 3786098112 3786923031
+50016000000 50018474994 16672000000 16672824998 3787098112 3787923110
+50019000000 50021475153 16673000000 16673825051 3788098112 3788923163
+50022000000 50024475274 16674000000 16674825091 3789098112 3789923203
+50025000000 50027475434 16675000000 16675825144 3790098112 3790923256
+50028000000 50030475517 16676000000 16676825172 3791098112 3791923284
+50031000000 50033475763 16677000000 16677825254 3792098112 3792923366
+50034000000 50036475886 16678000000 16678825295 3793098112 3793923407
+50037000000 50039476022 16679000000 16679825340 3794098112 3794923452
+50040000000 50042476197 16680000000 16680825399 3795098112 3795923511
+50043000000 50045476319 16681000000 16681825439 3796098112 3796923551
+50046000000 50048476469 16682000000 16682825489 3797098112 3797923601
+50049000000 50051476617 16683000000 16683825539 3798098112 3798923651
+50052000000 50053650311 16684000000 16684550103 3799098112 3799648215
+50055000000 50057476937 16685000000 16685825645 3800098112 3800923757
+50058000000 50060477069 16686000000 16686825689 3801098112 3801923801
+50061000000 50063477243 16687000000 16687825747 3802098112 3802923859
+50064000000 50066477362 16688000000 16688825787 3803098112 3803923899
+50067000000 50069477486 16689000000 16689825828 3804098112 3804923940
+50070000000 50072477705 16690000000 16690825901 3805098112 3805924013
+50073000000 50075477841 16691000000 16691825947 3806098112 3806924059
+50076000000 50078477992 16692000000 16692825997 3807098112 3807924109
+50079000000 50081478142 16693000000 16693826047 3808098112 3808924159
+50082000000 50084478257 16694000000 16694826085 3809098112 3809924197
+50085000000 50087478354 16695000000 16695826118 3810098112 3810924230
+50088000000 50090478562 16696000000 16696826187 3811098112 3811924299
+50091000000 50093478717 16697000000 16697826239 3812098112 3812924351
+50094000000 50096478876 16698000000 16698826292 3813098112 3813924404
+50097000000 50099479050 16699000000 16699826350 3814098112 3814924462
+50100000000 50102479150 16700000000 16700826383 3815098112 3815924495
+50103000000 50105479328 16701000000 16701826442 3816098112 3816924554
+50106000000 50108479477 16702000000 16702826492 3817098112 3817924604
+50109000000 50111479605 16703000000 16703826535 3818098112 3818924647
+50112000000 50114479774 16704000000 16704826591 3819098112 3819924703
+50115000000 50117479894 16705000000 16705826631 3820098112 3820924743
+50118000000 50119307244 16706000000 16706435748 3821098112 3821533860
+50121000000 50123480144 16707000000 16707826714 3822098112 3822924826
+50124000000 50126480402 16708000000 16708826800 3823098112 3823924912
+50127000000 50129480507 16709000000 16709826835 3824098112 3824924947
+50130000000 50132480587 16710000000 16710826862 3825098112 3825924974
+50133000000 50135480734 16711000000 16711826911 3826098112 3826925023
+50136000000 50138480988 16712000000 16712826996 3827098112 3827925108
+50139000000 50141481078 16713000000 16713827026 3828098112 3828925138
+50142000000 50144481323 16714000000 16714827107 3829098112 3829925219
+50145000000 50147481401 16715000000 16715827133 3830098112 3830925245
+50148000000 50150481578 16716000000 16716827192 3831098112 3831925304
+50151000000 50153481724 16717000000 16717827241 3832098112 3832925353
+50154000000 50156481868 16718000000 16718827289 3833098112 3833925401
+50157000000 50158104522 16719000000 16719368174 3834098112 3834466286
+50160000000 50162482183 16720000000 16720827394 3835098112 3835925506
+50163000000 50165482343 16721000000 16721827447 3836098112 3836925559
+50166000000 50168482480 16722000000 16722827493 3837098112 3837925605
+50169000000 50171482638 16723000000 16723827546 3838098112 3838925658
+50172000000 50174482796 16724000000 16724827598 3839098112 3839925710
+50175000000 50177482910 16725000000 16725827636 3840098112 3840925748
+50178000000 50180483071 16726000000 16726827690 3841098112 3841925802
+50181000000 50183483198 16727000000 16727827732 3842098112 3842925844
+50184000000 50186483307 16728000000 16728827769 3843098112 3843925881
+50187000000 50189483449 16729000000 16729827816 3844098112 3844925928
+50190000000 50192483683 16730000000 16730827894 3845098112 3845926006
+50193000000 50195483596 16731000000 16731827865 3846098112 3846925977
+50196000000 50198483717 16732000000 16732827905 3847098112 3847926017
+50199000000 50201483825 16733000000 16733827941 3848098112 3848926053
+50202000000 50204484060 16734000000 16734828020 3849098112 3849926132
+50205000000 50207484239 16735000000 16735828079 3850098112 3850926191
+50208000000 50210397879 16736000000 16736799293 3851098112 3851897405
+50211000000 50213484508 16737000000 16737828169 3852098112 3852926281
+50214000000 50216484681 16738000000 16738828227 3853098112 3853926339
+50217000000 50219484797 16739000000 16739828265 3854098112 3854926377
+50220000000 50222484970 16740000000 16740828323 3855098112 3855926435
+50223000000 50225485142 16741000000 16741828380 3856098112 3856926492
+50226000000 50228485198 16742000000 16742828399 3857098112 3857926511
+50229000000 50231485344 16743000000 16743828448 3858098112 3858926560
+50232000000 50234485540 16744000000 16744828513 3859098112 3859926625
+50235000000 50237485569 16745000000 16745828523 3860098112 3860926635
+50238000000 50240485875 16746000000 16746828625 3861098112 3861926737
+50241000000 50243486047 16747000000 16747828682 3862098112 3862926794
+50244000000 50246486180 16748000000 16748828726 3863098112 3863926838
+50247000000 50249486297 16749000000 16749828765 3864098112 3864926877
+50250000000 50252486482 16750000000 16750828827 3865098112 3865926939
+50253000000 50255486588 16751000000 16751828862 3866098112 3866926974
+50256000000 50258486769 16752000000 16752828923 3867098112 3867927035
+50259000000 50261486981 16753000000 16753828993 3868098112 3868927105
+50262000000 50264487088 16754000000 16754829029 3869098112 3869927141
+50265000000 50267487254 16755000000 16755829084 3870098112 3870927196
+50268000000 50270085999 16756000000 16756695333 3871098112 3871793445
+50271000000 50273487525 16757000000 16757829175 3872098112 3872927287
+50274000000 50276487637 16758000000 16758829212 3873098112 3873927324
+50277000000 50279487846 16759000000 16759829282 3874098112 3874927394
+50280000000 50282487925 16760000000 16760829308 3875098112 3875927420
+50283000000 50285488150 16761000000 16761829383 3876098112 3876927495
+50286000000 50288488277 16762000000 16762829425 3877098112 3877927537
+50289000000 50291488366 16763000000 16763829455 3878098112 3878927567
+50292000000 50294488472 16764000000 16764829490 3879098112 3879927602
+50295000000 50297488683 16765000000 16765829561 3880098112 3880927673
+50298000000 50300488892 16766000000 16766829630 3881098112 3881927742
+50301000000 50303489037 16767000000 16767829679 3882098112 3882927791
+50304000000 50306489163 16768000000 16768829721 3883098112 3883927833
+50307000000 50309489329 16769000000 16769829776 3884098112 3884927888
+50310000000 50312489409 16770000000 16770829803 3885098112 3885927915
+50313000000 50315489644 16771000000 16771829881 3886098112 3886927993
+50316000000 50318489803 16772000000 16772829934 3887098112 3887928046
+50319000000 50321489924 16773000000 16773829974 3888098112 3888928086
+50322000000 50324490084 16774000000 16774830028 3889098112 3889928140
+50325000000 50327490167 16775000000 16775830055 3890098112 3890928167
+50328000000 50330490413 16776000000 16776830137 3891098112 3891928249
+50331000000 50333490536 16777000000 16777830178 3892098112 3892928290
+50334000000 50336490672 16778000000 16778830224 3893098112 3893928336
+50337000000 50339490847 16779000000 16779830282 3894098112 3894928394
+50340000000 50342490969 16780000000 16780830323 3895098112 3895928435
+50343000000 50345491119 16781000000 16781830373 3896098112 3896928485
+50346000000 50348491267 16782000000 16782830422 3897098112 3897928534
+50349000000 50350664961 16783000000 16783554987 3898098112 3898653099
+50352000000 50354491587 16784000000 16784830529 3899098112 3899928641
+50355000000 50357491719 16785000000 16785830573 3900098112 3900928685
+50358000000 50360491893 16786000000 16786830631 3901098112 3901928743
+50361000000 50363492012 16787000000 16787830670 3902098112 3902928782
+50364000000 50366492136 16788000000 16788830712 3903098112 3903928824
+50367000000 50369492355 16789000000 16789830785 3904098112 3904928897
+50370000000 50372492491 16790000000 16790830830 3905098112 3905928942
+50373000000 50375492642 16791000000 16791830880 3906098112 3906928992
+50376000000 50378492792 16792000000 16792830930 3907098112 3907929042
+50379000000 50381492907 16793000000 16793830969 3908098112 3908929081
+50382000000 50384493004 16794000000 16794831001 3909098112 3909929113
+50385000000 50387493212 16795000000 16795831070 3910098112 3910929182
+50388000000 50390493367 16796000000 16796831122 3911098112 3911929234
+50391000000 50393493526 16797000000 16797831175 3912098112 3912929287
+50394000000 50396493700 16798000000 16798831233 3913098112 3913929345
+50397000000 50399493800 16799000000 16799831266 3914098112 3914929378
+50400000000 50402493978 16800000000 16800831326 3915098112 3915929438
+50403000000 50405494127 16801000000 16801831375 3916098112 3916929487
+50406000000 50408494255 16802000000 16802831418 3917098112 3917929530
+50409000000 50411494424 16803000000 16803831474 3918098112 3918929586
+50412000000 50414494544 16804000000 16804831514 3919098112 3919929626
+50415000000 50416321894 16805000000 16805440631 3920098112 3920538743
+50418000000 50420494794 16806000000 16806831598 3921098112 3921929710
+50421000000 50423495052 16807000000 16807831684 3922098112 3922929796
+50424000000 50426495157 16808000000 16808831719 3923098112 3923929831
+50427000000 50429495237 16809000000 16809831745 3924098112 3924929857
+50430000000 50432495384 16810000000 16810831794 3925098112 3925929906
+50433000000 50435495638 16811000000 16811831879 3926098112 3926929991
+50436000000 50438495728 16812000000 16812831909 3927098112 3927930021
+50439000000 50441495973 16813000000 16813831991 3928098112 3928930103
+50442000000 50444496051 16814000000 16814832017 3929098112 3929930129
+50445000000 50447496228 16815000000 16815832076 3930098112 3930930188
+50448000000 50450496374 16816000000 16816832124 3931098112 3931930236
+50451000000 50453496518 16817000000 16817832172 3932098112 3932930284
+50454000000 50455119172 16818000000 16818373057 3933098112 3933471169
+50457000000 50459496833 16819000000 16819832277 3934098112 3934930389
+50460000000 50462496993 16820000000 16820832331 3935098112 3935930443
+50463000000 50465497130 16821000000 16821832376 3936098112 3936930488
+50466000000 50468497288 16822000000 16822832429 3937098112 3937930541
+50469000000 50471497446 16823000000 16823832482 3938098112 3938930594
+50472000000 50474497560 16824000000 16824832520 3939098112 3939930632
+50475000000 50477497721 16825000000 16825832573 3940098112 3940930685
+50478000000 50480497848 16826000000 16826832616 3941098112 3941930728
+50481000000 50483497957 16827000000 16827832652 3942098112 3942930764
+50484000000 50486498099 16828000000 16828832699 3943098112 3943930811
+50487000000 50489498333 16829000000 16829832777 3944098112 3944930889
+50490000000 50492498246 16830000000 16830832748 3945098112 3945930860
+50493000000 50495498367 16831000000 16831832789 3946098112 3946930901
+50496000000 50498498475 16832000000 16832832825 3947098112 3947930937
+50499000000 50501498710 16833000000 16833832903 3948098112 3948931015
+50502000000 50504498889 16834000000 16834832963 3949098112 3949931075
+50505000000 50507412529 16835000000 16835804176 3950098112 3950902288
+50508000000 50510499158 16836000000 16836833052 3951098112 3951931164
+50511000000 50513499331 16837000000 16837833110 3952098112 3952931222
+50514000000 50516499447 16838000000 16838833149 3953098112 3953931261
+50517000000 50519499620 16839000000 16839833206 3954098112 3954931318
+50520000000 50522499792 16840000000 16840833264 3955098112 3955931376
+50523000000 50525499848 16841000000 16841833282 3956098112 3956931394
+50526000000 50528499994 16842000000 16842833331 3957098112 3957931443
+50529000000 50531500190 16843000000 16843833396 3958098112 3958931508
+50532000000 50534500219 16844000000 16844833406 3959098112 3959931518
+50535000000 50537500525 16845000000 16845833508 3960098112 3960931620
+50538000000 50540500697 16846000000 16846833565 3961098112 3961931677
+50541000000 50543500830 16847000000 16847833610 3962098112 3962931722
+50544000000 50546500947 16848000000 16848833649 3963098112 3963931761
+50547000000 50549501132 16849000000 16849833710 3964098112 3964931822
+50550000000 50552501238 16850000000 16850833746 3965098112 3965931858
+50553000000 50555501419 16851000000 16851833806 3966098112 3966931918
+50556000000 50558501631 16852000000 16852833877 3967098112 3967931989
+50559000000 50561501738 16853000000 16853833912 3968098112 3968932024
+50562000000 50564501904 16854000000 16854833968 3969098112 3969932080
+50565000000 50567100649 16855000000 16855700216 3970098112 3970798328
+50568000000 50570502175 16856000000 16856834058 3971098112 3971932170
+50571000000 50573502287 16857000000 16857834095 3972098112 3972932207
+50574000000 50576502496 16858000000 16858834165 3973098112 3973932277
+50577000000 50579502575 16859000000 16859834191 3974098112 3974932303
+50580000000 50582502800 16860000000 16860834266 3975098112 3975932378
+50583000000 50585502927 16861000000 16861834309 3976098112 3976932421
+50586000000 50588503016 16862000000 16862834338 3977098112 3977932450
+50589000000 50591503122 16863000000 16863834374 3978098112 3978932486
+50592000000 50594503333 16864000000 16864834444 3979098112 3979932556
+50595000000 50597503542 16865000000 16865834514 3980098112 3980932626
+50598000000 50600503687 16866000000 16866834562 3981098112 3981932674
+50601000000 50603503813 16867000000 16867834604 3982098112 3982932716
+50604000000 50606503979 16868000000 16868834659 3983098112 3983932771
+50607000000 50609504059 16869000000 16869834686 3984098112 3984932798
+50610000000 50612504294 16870000000 16870834764 3985098112 3985932876
+50613000000 50615504453 16871000000 16871834817 3986098112 3986932929
+50616000000 50618504574 16872000000 16872834858 3987098112 3987932970
+50619000000 50621504734 16873000000 16873834911 3988098112 3988933023
+50622000000 50624504817 16874000000 16874834939 3989098112 3989933051
+50625000000 50627505063 16875000000 16875835021 3990098112 3990933133
+50628000000 50630505186 16876000000 16876835062 3991098112 3991933174
+50631000000 50633505322 16877000000 16877835107 3992098112 3992933219
+50634000000 50636505497 16878000000 16878835165 3993098112 3993933277
+50637000000 50639505619 16879000000 16879835206 3994098112 3994933318
+50640000000 50642505769 16880000000 16880835256 3995098112 3995933368
+50643000000 50645505917 16881000000 16881835305 3996098112 3996933417
+50646000000 50647679611 16882000000 16882559870 3997098112 3997657982
+50649000000 50651506237 16883000000 16883835412 3998098112 3998933524
+50652000000 50654506369 16884000000 16884835456 3999098112 3999933568
+50655000000 50657506543 16885000000 16885835514 4000098112 4000933626
+50658000000 50660506662 16886000000 16886835554 4001098112 4001933666
+50661000000 50663506786 16887000000 16887835595 4002098112 4002933707
+50664000000 50666507005 16888000000 16888835668 4003098112 4003933780
+50667000000 50669507141 16889000000 16889835713 4004098112 4004933825
+50670000000 50672507292 16890000000 16890835764 4005098112 4005933876
+50673000000 50675507442 16891000000 16891835814 4006098112 4006933926
+50676000000 50678507557 16892000000 16892835852 4007098112 4007933964
+50679000000 50681507654 16893000000 16893835884 4008098112 4008933996
+50682000000 50684507862 16894000000 16894835954 4009098112 4009934066
+50685000000 50687508017 16895000000 16895836005 4010098112 4010934117
+50688000000 50690508176 16896000000 16896836058 4011098112 4011934170
+50691000000 50693508350 16897000000 16897836116 4012098112 4012934228
+50694000000 50696508450 16898000000 16898836150 4013098112 4013934262
+50697000000 50699508628 16899000000 16899836209 4014098112 4014934321
+50700000000 50702508777 16900000000 16900836259 4015098112 4015934371
+50703000000 50705508905 16901000000 16901836301 4016098112 4016934413
+50706000000 50708509074 16902000000 16902836358 4017098112 4017934470
+50709000000 50711509194 16903000000 16903836398 4018098112 4018934510
+50712000000 50713336544 16904000000 16904445514 4019098112 4019543626
+50715000000 50717509444 16905000000 16905836481 4020098112 4020934593
+50718000000 50720509702 16906000000 16906836567 4021098112 4021934679
+50721000000 50723509807 16907000000 16907836602 4022098112 4022934714
+50724000000 50726509887 16908000000 16908836629 4023098112 4023934741
+50727000000 50729510034 16909000000 16909836678 4024098112 4024934790
+50730000000 50732510288 16910000000 16910836762 4025098112 4025934874
+50733000000 50735510378 16911000000 16911836792 4026098112 4026934904
+50736000000 50738510623 16912000000 16912836874 4027098112 4027934986
+50739000000 50741510701 16913000000 16913836900 4028098112 4028935012
+50742000000 50744510878 16914000000 16914836959 4029098112 4029935071
+50745000000 50747511024 16915000000 16915837008 4030098112 4030935120
+50748000000 50750511168 16916000000 16916837056 4031098112 4031935168
+50751000000 50752133822 16917000000 16917377940 4032098112 4032476052
+50754000000 50756511483 16918000000 16918837161 4033098112 4033935273
+50757000000 50759511643 16919000000 16919837214 4034098112 4034935326
+50760000000 50762511780 16920000000 16920837260 4035098112 4035935372
+50763000000 50765511938 16921000000 16921837312 4036098112 4036935424
+50766000000 50768512096 16922000000 16922837365 4037098112 4037935477
+50769000000 50771512210 16923000000 16923837403 4038098112 4038935515
+50772000000 50774512371 16924000000 16924837457 4039098112 4039935569
+50775000000 50777512498 16925000000 16925837499 4040098112 4040935611
+50778000000 50780512607 16926000000 16926837535 4041098112 4041935647
+50781000000 50783512749 16927000000 16927837583 4042098112 4042935695
+50784000000 50786512983 16928000000 16928837661 4043098112 4043935773
+50787000000 50789512896 16929000000 16929837632 4044098112 4044935744
+50790000000 50792513017 16930000000 16930837672 4045098112 4045935784
+50793000000 50795513125 16931000000 16931837708 4046098112 4046935820
+50796000000 50798513360 16932000000 16932837786 4047098112 4047935898
+50799000000 50801513539 16933000000 16933837846 4048098112 4048935958
+50802000000 50804427179 16934000000 16934809059 4049098112 4049907171
+50805000000 50807513808 16935000000 16935837936 4050098112 4050936048
+50808000000 50810513981 16936000000 16936837993 4051098112 4051936105
+50811000000 50813514097 16937000000 16937838032 4052098112 4052936144
+50814000000 50816514270 16938000000 16938838090 4053098112 4053936202
+50817000000 50819514442 16939000000 16939838147 4054098112 4054936259
+50820000000 50822514498 16940000000 16940838166 4055098112 4055936278
+50823000000 50825514644 16941000000 16941838214 4056098112 4056936326
+50826000000 50828514840 16942000000 16942838280 4057098112 4057936392
+50829000000 50831514869 16943000000 16943838289 4058098112 4058936401
+50832000000 50834515175 16944000000 16944838391 4059098112 4059936503
+50835000000 50837515347 16945000000 16945838449 4060098112 4060936561
+50838000000 50840515480 16946000000 16946838493 4061098112 4061936605
+50841000000 50843515597 16947000000 16947838532 4062098112 4062936644
+50844000000 50846515782 16948000000 16948838594 4063098112 4063936706
+50847000000 50849515888 16949000000 16949838629 4064098112 4064936741
+50850000000 50852516069 16950000000 16950838689 4065098112 4065936801
+50853000000 50855516281 16951000000 16951838760 4066098112 4066936872
+50856000000 50858516388 16952000000 16952838796 4067098112 4067936908
+50859000000 50861516554 16953000000 16953838851 4068098112 4068936963
+50862000000 50864115299 16954000000 16954705099 4069098112 4069803211
+50865000000 50867516825 16955000000 16955838941 4070098112 4070937053
+50868000000 50870516937 16956000000 16956838979 4071098112 4071937091
+50871000000 50873517146 16957000000 16957839048 4072098112 4072937160
+50874000000 50876517225 16958000000 16958839075 4073098112 4073937187
+50877000000 50879517450 16959000000 16959839150 4074098112 4074937262
+50880000000 50882517577 16960000000 16960839192 4075098112 4075937304
+50883000000 50885517666 16961000000 16961839222 4076098112 4076937334
+50886000000 50888517772 16962000000 16962839257 4077098112 4077937369
+50889000000 50891517983 16963000000 16963839327 4078098112 4078937439
+50892000000 50894518192 16964000000 16964839397 4079098112 4079937509
+50895000000 50897518337 16965000000 16965839445 4080098112 4080937557
+50898000000 50900518463 16966000000 16966839487 4081098112 4081937599
+50901000000 50903518629 16967000000 16967839543 4082098112 4082937655
+50904000000 50906518709 16968000000 16968839569 4083098112 4083937681
+50907000000 50909518944 16969000000 16969839648 4084098112 4084937760
+50910000000 50912519103 16970000000 16970839701 4085098112 4085937813
+50913000000 50915519224 16971000000 16971839741 4086098112 4086937853
+50916000000 50918519384 16972000000 16972839794 4087098112 4087937906
+50919000000 50921519467 16973000000 16973839822 4088098112 4088937934
+50922000000 50924519713 16974000000 16974839904 4089098112 4089938016
+50925000000 50927519836 16975000000 16975839945 4090098112 4090938057
+50928000000 50930519972 16976000000 16976839990 4091098112 4091938102
+50931000000 50933520147 16977000000 16977840049 4092098112 4092938161
+50934000000 50936520269 16978000000 16978840089 4093098112 4093938201
+50937000000 50939520419 16979000000 16979840139 4094098112 4094938251
+50940000000 50942520567 16980000000 16980840189 4095098112 4095938301
+50943000000 50944694261 16981000000 16981564753 4096098112 4096662865
+50946000000 50948520887 16982000000 16982840295 4097098112 4097938407
+50949000000 50951521019 16983000000 16983840339 4098098112 4098938451
+50952000000 50954521193 16984000000 16984840397 4099098112 4099938509
+50955000000 50957521312 16985000000 16985840437 4100098112 4100938549
+50958000000 50960521436 16986000000 16986840478 4101098112 4101938590
+50961000000 50963521655 16987000000 16987840551 4102098112 4102938663
+50964000000 50966521791 16988000000 16988840597 4103098112 4103938709
+50967000000 50969521942 16989000000 16989840647 4104098112 4104938759
+50970000000 50972522092 16990000000 16990840697 4105098112 4105938809
+50973000000 50975522207 16991000000 16991840735 4106098112 4106938847
+50976000000 50978522304 16992000000 16992840768 4107098112 4107938880
+50979000000 50981522512 16993000000 16993840837 4108098112 4108938949
+50982000000 50984522667 16994000000 16994840889 4109098112 4109939001
+50985000000 50987522826 16995000000 16995840942 4110098112 4110939054
+50988000000 50990523000 16996000000 16996841000 4111098112 4111939112
+50991000000 50993523100 16997000000 16997841033 4112098112 4112939145
+50994000000 50996523278 16998000000 16998841092 4113098112 4113939204
+50997000000 50999523427 16999000000 16999841142 4114098112 4114939254
+51000000000 51002523555 17000000000 17000841185 4115098112 4115939297
+51003000000 51005523724 17001000000 17001841241 4116098112 4116939353
+51006000000 51008523844 17002000000 17002841281 4117098112 4117939393
+51009000000 51010351194 17003000000 17003450398 4118098112 4118548510
+51012000000 51014524094 17004000000 17004841364 4119098112 4119939476
+51015000000 51017524352 17005000000 17005841450 4120098112 4120939562
+51018000000 51020524457 17006000000 17006841485 4121098112 4121939597
+51021000000 51023524537 17007000000 17007841512 4122098112 4122939624
+51024000000 51026524684 17008000000 17008841561 4123098112 4123939673
+51027000000 51029524938 17009000000 17009841646 4124098112 4124939758
+51030000000 51032525028 17010000000 17010841676 4125098112 4125939788
+51033000000 51035525273 17011000000 17011841757 4126098112 4126939869
+51036000000 51038525351 17012000000 17012841783 4127098112 4127939895
+51039000000 51041525528 17013000000 17013841842 4128098112 4128939954
+51042000000 51044525674 17014000000 17014841891 4129098112 4129940003
+51045000000 51047525818 17015000000 17015841939 4130098112 4130940051
+51048000000 51049148472 17016000000 17016382824 4131098112 4131480936
+51051000000 51053526133 17017000000 17017842044 4132098112 4132940156
+51054000000 51056526293 17018000000 17018842097 4133098112 4133940209
+51057000000 51059526430 17019000000 17019842143 4134098112 4134940255
+51060000000 51062526588 17020000000 17020842196 4135098112 4135940308
+51063000000 51065526746 17021000000 17021842248 4136098112 4136940360
+51066000000 51068526860 17022000000 17022842286 4137098112 4137940398
+51069000000 51071527021 17023000000 17023842340 4138098112 4138940452
+51072000000 51074527148 17024000000 17024842382 4139098112 4139940494
+51075000000 51077527257 17025000000 17025842419 4140098112 4140940531
+51078000000 51080527399 17026000000 17026842466 4141098112 4141940578
+51081000000 51083527633 17027000000 17027842544 4142098112 4142940656
+51084000000 51086527546 17028000000 17028842515 4143098112 4143940627
+51087000000 51089527667 17029000000 17029842555 4144098112 4144940667
+51090000000 51092527775 17030000000 17030842591 4145098112 4145940703
+51093000000 51095528010 17031000000 17031842670 4146098112 4146940782
+51096000000 51098528189 17032000000 17032842729 4147098112 4147940841
+51099000000 51101441829 17033000000 17033813943 4148098112 4148912055
+51102000000 51104528458 17034000000 17034842819 4149098112 4149940931
+51105000000 51107528631 17035000000 17035842877 4150098112 4150940989
+51108000000 51110528747 17036000000 17036842915 4151098112 4151941027
+51111000000 51113528920 17037000000 17037842973 4152098112 4152941085
+51114000000 51116529092 17038000000 17038843030 4153098112 4153941142
+51117000000 51119529148 17039000000 17039843049 4154098112 4154941161
+51120000000 51122529294 17040000000 17040843098 4155098112 4155941210
+51123000000 51125529490 17041000000 17041843163 4156098112 4156941275
+51126000000 51128529519 17042000000 17042843173 4157098112 4157941285
+51129000000 51131529825 17043000000 17043843275 4158098112 4158941387
+51132000000 51134529997 17044000000 17044843332 4159098112 4159941444
+51135000000 51137530130 17045000000 17045843376 4160098112 4160941488
+51138000000 51140530247 17046000000 17046843415 4161098112 4161941527
+51141000000 51143530432 17047000000 17047843477 4162098112 4162941589
+51144000000 51146530538 17048000000 17048843512 4163098112 4163941624
+51147000000 51149530719 17049000000 17049843573 4164098112 4164941685
+51150000000 51152530931 17050000000 17050843643 4165098112 4165941755
+51153000000 51155531038 17051000000 17051843679 4166098112 4166941791
+51156000000 51158531204 17052000000 17052843734 4167098112 4167941846
+51159000000 51161129949 17053000000 17053709983 4168098112 4168808095
+51162000000 51164531475 17054000000 17054843825 4169098112 4169941937
+51165000000 51167531587 17055000000 17055843862 4170098112 4170941974
+51168000000 51170531796 17056000000 17056843932 4171098112 4171942044
+51171000000 51173531875 17057000000 17057843958 4172098112 4172942070
+51174000000 51176532100 17058000000 17058844033 4173098112 4173942145
+51177000000 51179532227 17059000000 17059844075 4174098112 4174942187
+51180000000 51182532316 17060000000 17060844105 4175098112 4175942217
+51183000000 51185532422 17061000000 17061844140 4176098112 4176942252
+51186000000 51188532633 17062000000 17062844211 4177098112 4177942323
+51189000000 51191532842 17063000000 17063844280 4178098112 4178942392
+51192000000 51194532987 17064000000 17064844329 4179098112 4179942441
+51195000000 51197533113 17065000000 17065844371 4180098112 4180942483
+51198000000 51200533279 17066000000 17066844426 4181098112 4181942538
+51201000000 51203533359 17067000000 17067844453 4182098112 4182942565
+51204000000 51206533594 17068000000 17068844531 4183098112 4183942643
+51207000000 51209533753 17069000000 17069844584 4184098112 4184942696
+51210000000 51212533874 17070000000 17070844624 4185098112 4185942736
+51213000000 51215534034 17071000000 17071844678 4186098112 4186942790
+51216000000 51218534117 17072000000 17072844705 4187098112 4187942817
+51219000000 51221534363 17073000000 17073844787 4188098112 4188942899
+51222000000 51224534486 17074000000 17074844828 4189098112 4189942940
+51225000000 51227534622 17075000000 17075844874 4190098112 4190942986
+51228000000 51230534797 17076000000 17076844932 4191098112 4191943044
+51231000000 51233534919 17077000000 17077844973 4192098112 4192943085
+51234000000 51236535069 17078000000 17078845023 4193098112 4193943135
+51237000000 51239535217 17079000000 17079845072 4194098112 4194943184
+51240000000 51241708911 17080000000 17080569637 4195098112 4195667749
+51243000000 51245535537 17081000000 17081845179 4196098112 4196943291
+51246000000 51248535669 17082000000 17082845223 4197098112 4197943335
+51249000000 51251535843 17083000000 17083845281 4198098112 4198943393
+51252000000 51254535962 17084000000 17084845320 4199098112 4199943432
+51255000000 51257536086 17085000000 17085845362 4200098112 4200943474
+51258000000 51260536305 17086000000 17086845435 4201098112 4201943547
+51261000000 51263536441 17087000000 17087845480 4202098112 4202943592
+51264000000 51266536592 17088000000 17088845530 4203098112 4203943642
+51267000000 51269536742 17089000000 17089845580 4204098112 4204943692
+51270000000 51272536857 17090000000 17090845619 4205098112 4205943731
+51273000000 51275536954 17091000000 17091845651 4206098112 4206943763
+51276000000 51278537162 17092000000 17092845720 4207098112 4207943832
+51279000000 51281537317 17093000000 17093845772 4208098112 4208943884
+51282000000 51284537476 17094000000 17094845825 4209098112 4209943937
+51285000000 51287537650 17095000000 17095845883 4210098112 4210943995
+51288000000 51290537750 17096000000 17096845916 4211098112 4211944028
+51291000000 51293537928 17097000000 17097845976 4212098112 4212944088
+51294000000 51296538077 17098000000 17098846025 4213098112 4213944137
+51297000000 51299538205 17099000000 17099846068 4214098112 4214944180
+51300000000 51302538374 17100000000 17100846124 4215098112 4215944236
+51303000000 51305538494 17101000000 17101846164 4216098112 4216944276
+51306000000 51307365844 17102000000 17102455281 4217098112 4217553393
+51309000000 51311538744 17103000000 17103846248 4218098112 4218944360
+51312000000 51314539002 17104000000 17104846334 4219098112 4219944446
+51315000000 51317539107 17105000000 17105846369 4220098112 4220944481
+51318000000 51320539187 17106000000 17106846395 4221098112 4221944507
+51321000000 51323539334 17107000000 17107846444 4222098112 4222944556
+51324000000 51326539588 17108000000 17108846529 4223098112 4223944641
+51327000000 51329539678 17109000000 17109846559 4224098112 4224944671
+51330000000 51332539923 17110000000 17110846641 4225098112 4225944753
+51333000000 51335540001 17111000000 17111846667 4226098112 4226944779
+51336000000 51338540178 17112000000 17112846726 4227098112 4227944838
+51339000000 51341540324 17113000000 17113846774 4228098112 4228944886
+51342000000 51344540468 17114000000 17114846822 4229098112 4229944934
+51345000000 51346163122 17115000000 17115387707 4230098112 4230485819
+51348000000 51350540783 17116000000 17116846927 4231098112 4231945039
+51351000000 51353540943 17117000000 17117846981 4232098112 4232945093
+51354000000 51356541080 17118000000 17118847026 4233098112 4233945138
+51357000000 51359541238 17119000000 17119847079 4234098112 4234945191
+51360000000 51362541396 17120000000 17120847132 4235098112 4235945244
+51363000000 51365541510 17121000000 17121847170 4236098112 4236945282
+51366000000 51368541671 17122000000 17122847223 4237098112 4237945335
+51369000000 51371541798 17123000000 17123847266 4238098112 4238945378
+51372000000 51374541907 17124000000 17124847302 4239098112 4239945414
+51375000000 51377542049 17125000000 17125847349 4240098112 4240945461
+51378000000 51380542283 17126000000 17126847427 4241098112 4241945539
+51381000000 51383542196 17127000000 17127847398 4242098112 4242945510
+51384000000 51386542317 17128000000 17128847439 4243098112 4243945551
+51387000000 51389542425 17129000000 17129847475 4244098112 4244945587
+51390000000 51392542660 17130000000 17130847553 4245098112 4245945665
+51393000000 51395542839 17131000000 17131847613 4246098112 4246945725
+51396000000 51398456479 17132000000 17132818826 4247098112 4247916938
+51399000000 51401543108 17133000000 17133847702 4248098112 4248945814
+51402000000 51404543281 17134000000 17134847760 4249098112 4249945872
+51405000000 51407543397 17135000000 17135847799 4250098112 4250945911
+51408000000 51410543570 17136000000 17136847856 4251098112 4251945968
+51411000000 51413543742 17137000000 17137847914 4252098112 4252946026
+51414000000 51416543798 17138000000 17138847932 4253098112 4253946044
+51417000000 51419543944 17139000000 17139847981 4254098112 4254946093
+51420000000 51422544140 17140000000 17140848046 4255098112 4255946158
+51423000000 51425544169 17141000000 17141848056 4256098112 4256946168
+51426000000 51428544475 17142000000 17142848158 4257098112 4257946270
+51429000000 51431544647 17143000000 17143848215 4258098112 4258946327
+51432000000 51434544780 17144000000 17144848260 4259098112 4259946372
+51435000000 51437544897 17145000000 17145848299 4260098112 4260946411
+51438000000 51440545082 17146000000 17146848360 4261098112 4261946472
+51441000000 51443545188 17147000000 17147848396 4262098112 4262946508
+51444000000 51446545369 17148000000 17148848456 4263098112 4263946568
+51447000000 51449545581 17149000000 17149848527 4264098112 4264946639
+51450000000 51452545688 17150000000 17150848562 4265098112 4265946674
+51453000000 51455545854 17151000000 17151848618 4266098112 4266946730
+51456000000 51458144599 17152000000 17152714866 4267098112 4267812978
+51459000000 51461546125 17153000000 17153848708 4268098112 4268946820
+51462000000 51464546237 17154000000 17154848745 4269098112 4269946857
+51465000000 51467546446 17155000000 17155848815 4270098112 4270946927
+51468000000 51470546525 17156000000 17156848841 4271098112 4271946953
+51471000000 51473546750 17157000000 17157848916 4272098112 4272947028
+51474000000 51476546877 17158000000 17158848959 4273098112 4273947071
+51477000000 51479546966 17159000000 17159848988 4274098112 4274947100
+51480000000 51482547072 17160000000 17160849024 4275098112 4275947136
+51483000000 51485547283 17161000000 17161849094 4276098112 4276947206
+51486000000 51488547492 17162000000 17162849164 4277098112 4277947276
+51489000000 51491547637 17163000000 17163849212 4278098112 4278947324
+51492000000 51494547763 17164000000 17164849254 4279098112 4279947366
+51495000000 51497547929 17165000000 17165849309 4280098112 4280947421
+51498000000 51500548009 17166000000 17166849336 4281098112 4281947448
+51501000000 51503548244 17167000000 17167849414 4282098112 4282947526
+51504000000 51506548403 17168000000 17168849467 4283098112 4283947579
+51507000000 51509548524 17169000000 17169849508 4284098112 4284947620
+51510000000 51512548684 17170000000 17170849561 4285098112 4285947673
+51513000000 51515548767 17171000000 17171849589 4286098112 4286947701
+51516000000 51518549013 17172000000 17172849671 4287098112 4287947783
+51519000000 51521549136 17173000000 17173849712 4288098112 4288947824
+51522000000 51524549272 17174000000 17174849757 4289098112 4289947869
+51525000000 51527549447 17175000000 17175849815 4290098112 4290947927
+51528000000 51530549569 17176000000 17176849856 4291098112 4291947968
+51531000000 51533549719 17177000000 17177849906 4292098112 4292948018
+51534000000 51536549867 17178000000 17178849955 4293098112 4293948067
+51537000000 51538723561 17179000000 17179574520 4294098112 4294672632
+51540000000 51542550187 17180000000 17180850062 130816 980878
+51543000000 51545550319 17181000000 17181850106 1130816 1980922
+51546000000 51548550493 17182000000 17182850164 2130816 2980980
+51549000000 51551550612 17183000000 17183850204 3130816 3981020
+51552000000 51554550736 17184000000 17184850245 4130816 4981061
+51555000000 51557550955 17185000000 17185850318 5130816 5981134
+51558000000 51560551091 17186000000 17186850363 6130816 6981179
+51561000000 51563551242 17187000000 17187850414 7130816 7981230
+51564000000 51566551392 17188000000 17188850464 8130816 8981280
+51567000000 51569551507 17189000000 17189850502 9130816 9981318
+51570000000 51572551604 17190000000 17190850534 10130816 10981350
+51573000000 51575551812 17191000000 17191850604 11130816 11981420
+51576000000 51578551967 17192000000 17192850655 12130816 12981471
+51579000000 51581552126 17193000000 17193850708 13130816 13981524
+51582000000 51584552300 17194000000 17194850766 14130816 14981582
+51585000000 51587552400 17195000000 17195850800 15130816 15981616
+51588000000 51590552578 17196000000 17196850859 16130816 16981675
+51591000000 51593552727 17197000000 17197850909 17130816 17981725
+51594000000 51596552855 17198000000 17198850951 18130816 18981767
+51597000000 51599553024 17199000000 17199851008 19130816 19981824
+51600000000 51602553144 17200000000 17200851048 20130816 20981864
+51603000000 51604380494 17201000000 17201460164 21130816 21590980
+51606000000 51608553394 17202000000 17202851131 22130816 22981947
+51609000000 51611553652 17203000000 17203851217 23130816 23982033
+51612000000 51614553757 17204000000 17204851252 24130816 24982068
+51615000000 51617553837 17205000000 17205851279 25130816 25982095
+51618000000 51620553984 17206000000 17206851328 26130816 26982144
+51621000000 51623554238 17207000000 17207851412 27130816 27982228
+51624000000 51626554328 17208000000 17208851442 28130816 28982258
+51627000000 51629554573 17209000000 17209851524 29130816 29982340
+51630000000 51632554651 17210000000 17210851550 30130816 30982366
+51633000000 51635554828 17211000000 17211851609 31130816 31982425
+51636000000 51638554974 17212000000 17212851658 32130816 32982474
+51639000000 51641555118 17213000000 17213851706 33130816 33982522
+51642000000 51643177772 17214000000 17214392590 34130816 34523406
+51645000000 51647555433 17215000000 17215851811 35130816 35982627
+51648000000 51650555593 17216000000 17216851864 36130816 36982680
+51651000000 51653555730 17217000000 17217851910 37130816 37982726
+51654000000 51656555888 17218000000 17218851962 38130816 38982778
+51657000000 51659556046 17219000000 17219852015 39130816 39982831
+51660000000 51662556160 17220000000 17220852053 40130816 40982869
+51663000000 51665556321 17221000000 17221852107 41130816 41982923
+51666000000 51668556448 17222000000 17222852149 42130816 42982965
+51669000000 51671556557 17223000000 17223852185 43130816 43983001
+51672000000 51674556699 17224000000 17224852233 44130816 44983049
+51675000000 51677556933 17225000000 17225852311 45130816 45983127
+51678000000 51680556846 17226000000 17226852282 46130816 46983098
+51681000000 51683556967 17227000000 17227852322 47130816 47983138
+51684000000 51686557075 17228000000 17228852358 48130816 48983174
+51687000000 51689557310 17229000000 17229852436 49130816 49983252
+51690000000 51692557489 17230000000 17230852496 50130816 50983312
+51693000000 51695471129 17231000000 17231823709 51130816 51954525
+51696000000 51698557758 17232000000 17232852586 52130816 52983402
+51699000000 51701557931 17233000000 17233852643 53130816 53983459
+51702000000 51704558047 17234000000 17234852682 54130816 54983498
+51705000000 51707558220 17235000000 17235852740 55130816 55983556
+51708000000 51710558392 17236000000 17236852797 56130816 56983613
+51711000000 51713558448 17237000000 17237852816 57130816 57983632
+51714000000 51716558594 17238000000 17238852864 58130816 58983680
+51717000000 51719558790 17239000000 17239852930 59130816 59983746
+51720000000 51722558819 17240000000 17240852939 60130816 60983755
+51723000000 51725559125 17241000000 17241853041 61130816 61983857
+51726000000 51728559297 17242000000 17242853099 62130816 62983915
+51729000000 51731559430 17243000000 17243853143 63130816 63983959
+51732000000 51734559547 17244000000 17244853182 64130816 64983998
+51735000000 51737559732 17245000000 17245853244 65130816 65984060
+51738000000 51740559838 17246000000 17246853279 66130816 66984095
+51741000000 51743560019 17247000000 17247853339 67130816 67984155
+51744000000 51746560231 17248000000 17248853410 68130816 68984226
+51747000000 51749560338 17249000000 17249853446 69130816 69984262
+51750000000 51752560504 17250000000 17250853501 70130816 70984317
+51753000000 51755159249 17251000000 17251719749 71130816 71850565
+51756000000 51758560775 17252000000 17252853591 72130816 72984407
+51759000000 51761560887 17253000000 17253853629 73130816 73984445
+51762000000 51764561096 17254000000 17254853698 74130816 74984514
+51765000000 51767561175 17255000000 17255853725 75130816 75984541
+51768000000 51770561400 17256000000 17256853800 76130816 76984616
+51771000000 51773561527 17257000000 17257853842 77130816 77984658
+51774000000 51776561616 17258000000 17258853872 78130816 78984688
+51777000000 51779561722 17259000000 17259853907 79130816 79984723
+51780000000 51782561933 17260000000 17260853977 80130816 80984793
+51783000000 51785562142 17261000000 17261854047 81130816 81984863
+51786000000 51788562287 17262000000 17262854095 82130816 82984911
+51789000000 51791562413 17263000000 17263854137 83130816 83984953
+51792000000 51794562579 17264000000 17264854193 84130816 84985009
+51795000000 51797562659 17265000000 17265854219 85130816 85985035
+51798000000 51800562894 17266000000 17266854298 86130816 86985114
+51801000000 51803563053 17267000000 17267854351 87130816 87985167
+51804000000 51806563174 17268000000 17268854391 88130816 88985207
+51807000000 51809563334 17269000000 17269854444 89130816 89985260
+51810000000 51812563417 17270000000 17270854472 90130816 90985288
+51813000000 51815563663 17271000000 17271854554 91130816 91985370
+51816000000 51818563786 17272000000 17272854595 92130816 92985411
+51819000000 51821563922 17273000000 17273854640 93130816 93985456
+51822000000 51824564097 17274000000 17274854699 94130816 94985515
+51825000000 51827564219 17275000000 17275854739 95130816 95985555
+51828000000 51830564369 17276000000 17276854789 96130816 96985605
+51831000000 51833564517 17277000000 17277854839 97130816 97985655
+51834000000 51835738211 17278000000 17278579403 98130816 98710219
+51837000000 51839564837 17279000000 17279854945 99130816 99985761
+51840000000 51842564969 17280000000 17280854989 100130816 100985805
+51843000000 51845565143 17281000000 17281855047 101130816 101985863
+51846000000 51848565262 17282000000 17282855087 102130816 102985903
+51849000000 51851565386 17283000000 17283855128 103130816 103985944
+51852000000 51854565605 17284000000 17284855201 104130816 104986017
+51855000000 51857565741 17285000000 17285855247 105130816 105986063
+51858000000 51860565892 17286000000 17286855297 106130816 106986113
+51861000000 51863566042 17287000000 17287855347 107130816 107986163
+51864000000 51866566157 17288000000 17288855385 108130816 108986201
+51867000000 51869566254 17289000000 17289855418 109130816 109986234
+51870000000 51872566462 17290000000 17290855487 110130816 110986303
+51873000000 51875566617 17291000000 17291855539 111130816 111986355
+51876000000 51878566776 17292000000 17292855592 112130816 112986408
+51879000000 51881566950 17293000000 17293855650 113130816 113986466
+51882000000 51884567050 17294000000 17294855683 114130816 114986499
+51885000000 51887567228 17295000000 17295855742 115130816 115986558
+51888000000 51890567377 17296000000 17296855792 116130816 116986608
+51891000000 51893567505 17297000000 17297855835 117130816 117986651
+51894000000 51896567674 17298000000 17298855891 118130816 118986707
+51897000000 51899567794 17299000000 17299855931 119130816 119986747
+51900000000 51901395144 17300000000 17300465048 120130816 120595864
+51903000000 51905568044 17301000000 17301856014 121130816 121986830
+51906000000 51908568302 17302000000 17302856100 122130816 122986916
+51909000000 51911568407 17303000000 17303856135 123130816 123986951
+51912000000 51914568487 17304000000 17304856162 124130816 124986978
+51915000000 51917568634 17305000000 17305856211 125130816 125987027
+51918000000 51920568888 17306000000 17306856296 126130816 126987112
+51921000000 51923568978 17307000000 17307856326 127130816 127987142
+51924000000 51926569223 17308000000 17308856407 128130816 128987223
+51927000000 51929569301 17309000000 17309856433 129130816 129987249
+51930000000 51932569478 17310000000 17310856492 130130816 130987308
+51933000000 51935569624 17311000000 17311856541 131130816 131987357
+51936000000 51938569768 17312000000 17312856589 132130816 132987405
+51939000000 51940192422 17313000000 17313397474 133130816 133528290
+51942000000 51944570083 17314000000 17314856694 134130816 134987510
+51945000000 51947570243 17315000000 17315856747 135130816 135987563
+51948000000 51950570380 17316000000 17316856793 136130816 136987609
+51951000000 51953570538 17317000000 17317856846 137130816 137987662
+51954000000 51956570696 17318000000 17318856898 138130816 138987714
+51957000000 51959570810 17319000000 17319856936 139130816 139987752
+51960000000 51962570971 17320000000 17320856990 140130816 140987806
+51963000000 51965571098 17321000000 17321857032 141130816 141987848
+51966000000 51968571207 17322000000 17322857069 142130816 142987885
+51969000000 51971571349 17323000000 17323857116 143130816 143987932
+51972000000 51974571583 17324000000 17324857194 144130816 144988010
+51975000000 51977571496 17325000000 17325857165 145130816 145987981
+51978000000 51980571617 17326000000 17326857205 146130816 146988021
+51981000000 51983571725 17327000000 17327857241 147130816 147988057
+51984000000 51986571960 17328000000 17328857320 148130816 148988136
+51987000000 51989572139 17329000000 17329857379 149130816 149988195
+51990000000 51992485779 17330000000 17330828593 150130816 150959409
+51993000000 51995572408 17331000000 17331857469 151130816 151988285
+51996000000 51998572581 17332000000 17332857527 152130816 152988343
+51999000000 52001572697 17333000000 17333857565 153130816 153988381
+52002000000 52004572870 17334000000 17334857623 154130816 154988439
+52005000000 52007573042 17335000000 17335857680 155130816 155988496
+52008000000 52010573098 17336000000 17336857699 156130816 156988515
+52011000000 52013573244 17337000000 17337857748 157130816 157988564
+52014000000 52016573440 17338000000 17338857813 158130816 158988629
+52017000000 52019573469 17339000000 17339857823 159130816 159988639
+52020000000 52022573775 17340000000 17340857925 160130816 160988741
+52023000000 52025573947 17341000000 17341857982 161130816 161988798
+52026000000 52028574080 17342000000 17342858026 162130816 162988842
+52029000000 52031574197 17343000000 17343858065 163130816 163988881
+52032000000 52034574382 17344000000 17344858127 164130816 164988943
+52035000000 52037574488 17345000000 17345858162 165130816 165988978
+52038000000 52040574669 17346000000 17346858223 166130816 166989039
+52041000000 52043574881 17347000000 17347858293 167130816 167989109
+52044000000 52046574988 17348000000 17348858329 168130816 168989145
+52047000000 52049575154 17349000000 17349858384 169130816 169989200
+52050000000 52052173899 17350000000 17350724633 170130816 170855449
+52053000000 52055575425 17351000000 17351858475 171130816 171989291
+52056000000 52058575537 17352000000 17352858512 172130816 172989328
+52059000000 52061575746 17353000000 17353858582 173130816 173989398
+52062000000 52064575825 17354000000 17354858608 174130816 174989424
+52065000000 52067576050 17355000000 17355858683 175130816 175989499
+52068000000 52070576177 17356000000 17356858725 176130816 176989541
+52071000000 52073576266 17357000000 17357858755 177130816 177989571
+52074000000 52076576372 17358000000 17358858790 178130816 178989606
+52077000000 52079576583 17359000000 17359858861 179130816 179989677
+52080000000 52082576792 17360000000 17360858930 180130816 180989746
+52083000000 52085576937 17361000000 17361858979 181130816 181989795
+52086000000 52088577063 17362000000 17362859021 182130816 182989837
+52089000000 52091577229 17363000000 17363859076 183130816 183989892
+52092000000 52094577309 17364000000 17364859103 184130816 184989919
+52095000000 52097577544 17365000000 17365859181 185130816 185989997
+52098000000 52100577703 17366000000 17366859234 186130816 186990050
+52101000000 52103577824 17367000000 17367859274 187130816 187990090
+52104000000 52106577984 17368000000 17368859328 188130816 188990144
+52107000000 52109578067 17369000000 17369859355 189130816 189990171
+52110000000 52112578313 17370000000 17370859437 190130816 190990253
+52113000000 52115578436 17371000000 17371859478 191130816 191990294
+52116000000 52118578572 17372000000 17372859524 192130816 192990340
+52119000000 52121578747 17373000000 17373859582 193130816 193990398
+52122000000 52124578869 17374000000 17374859623 194130816 194990439
+52125000000 52127579019 17375000000 17375859673 195130816 195990489
+52128000000 52130579167 17376000000 17376859722 196130816 196990538
+52131000000 52132752861 17377000000 17377584287 197130816 197715103
+52134000000 52136579487 17378000000 17378859829 198130816 198990645
+52137000000 52139579619 17379000000 17379859873 199130816 199990689
+52140000000 52142579793 17380000000 17380859931 200130816 200990747
+52143000000 52145579912 17381000000 17381859970 201130816 201990786
+52146000000 52148580036 17382000000 17382860012 202130816 202990828
+52149000000 52151580255 17383000000 17383860085 203130816 203990901
+52152000000 52154580391 17384000000 17384860130 204130816 204990946
+52155000000 52157580542 17385000000 17385860180 205130816 205990996
+52158000000 52160580692 17386000000 17386860230 206130816 206991046
+52161000000 52163580807 17387000000 17387860269 207130816 207991085
+52164000000 52166580904 17388000000 17388860301 208130816 208991117
+52167000000 52169581112 17389000000 17389860370 209130816 209991186
+52170000000 52172581267 17390000000 17390860422 210130816 210991238
+52173000000 52175581426 17391000000 17391860475 211130816 211991291
+52176000000 52178581600 17392000000 17392860533 212130816 212991349
+52179000000 52181581700 17393000000 17393860566 213130816 213991382
+52182000000 52184581878 17394000000 17394860626 214130816 214991442
+52185000000 52187582027 17395000000 17395860675 215130816 215991491
+52188000000 52190582155 17396000000 17396860718 216130816 216991534
+52191000000 52193582324 17397000000 17397860774 217130816 217991590
+52194000000 52196582444 17398000000 17398860814 218130816 218991630
+52197000000 52198409794 17399000000 17399469931 219130816 219600747
+52200000000 52202582694 17400000000 17400860898 220130816 220991714
+52203000000 52205582952 17401000000 17401860984 221130816 221991800
+52206000000 52208583057 17402000000 17402861019 222130816 222991835
+52209000000 52211583137 17403000000 17403861045 223130816 223991861
+52212000000 52214583284 17404000000 17404861094 224130816 224991910
+52215000000 52217583538 17405000000 17405861179 225130816 225991995
+52218000000 52220583628 17406000000 17406861209 226130816 226992025
+52221000000 52223583873 17407000000 17407861291 227130816 227992107
+52224000000 52226583951 17408000000 17408861317 228130816 228992133
+52227000000 52229584128 17409000000 17409861376 229130816 229992192
+52230000000 52232584274 17410000000 17410861424 230130816 230992240
+52233000000 52235584418 17411000000 17411861472 231130816 231992288
+52236000000 52237207072 17412000000 17412402357 232130816 232533173
+52239000000 52241584733 17413000000 17413861577 233130816 233992393
+52242000000 52244584893 17414000000 17414861631 234130816 234992447
+52245000000 52247585030 17415000000 17415861676 235130816 235992492
+52248000000 52250585188 17416000000 17416861729 236130816 236992545
+52251000000 52253585346 17417000000 17417861782 237130816 237992598
+52254000000 52256585460 17418000000 17418861820 238130816 238992636
+52257000000 52259585621 17419000000 17419861873 239130816 239992689
+52260000000 52262585748 17420000000 17420861916 240130816 240992732
+52263000000 52265585857 17421000000 17421861952 241130816 241992768
+52266000000 52268585999 17422000000 17422861999 242130816 242992815
+52269000000 52271586233 17423000000 17423862077 243130816 243992893
+52272000000 52274586146 17424000000 17424862048 244130816 244992864
+52275000000 52277586267 17425000000 17425862089 245130816 245992905
+52278000000 52280586375 17426000000 17426862125 246130816 246992941
+52281000000 52283586610 17427000000 17427862203 247130816 247993019
+52284000000 52286586789 17428000000 17428862263 248130816 248993079
+52287000000 52289500429 17429000000 17429833476 249130816 249964292
+52290000000 52292587058 17430000000 17430862352 250130816 250993168
+52293000000 52295587231 17431000000 17431862410 251130816 251993226
+52296000000 52298587347 17432000000 17432862449 252130816 252993265
+52299000000 52301587520 17433000000 17433862506 253130816 253993322
+52302000000 52304587692 17434000000 17434862564 254130816 254993380
+52305000000 52307587748 17435000000 17435862582 255130816 255993398
+52308000000 52310587894 17436000000 17436862631 256130816 256993447
+52311000000 52313588090 17437000000 17437862696 257130816 257993512
+52314000000 52316588119 17438000000 17438862706 258130816 258993522
+52317000000 52319588425 17439000000 17439862808 259130816 259993624
+52320000000 52322588597 17440000000 17440862865 260130816 260993681
+52323000000 52325588730 17441000000 17441862910 261130816 261993726
+52326000000 52328588847 17442000000 17442862949 262130816 262993765
+52329000000 52331589032 17443000000 17443863010 263130816 263993826
+52332000000 52334589138 17444000000 17444863046 264130816 264993862
+52335000000 52337589319 17445000000 17445863106 265130816 265993922
+52338000000 52340589531 17446000000 17446863177 266130816 266993993
+52341000000 52343589638 17447000000 17447863212 267130816 267994028
+52344000000 52346589804 17448000000 17448863268 268130816 268994084
+52347000000 52349188549 17449000000 17449729516 269130816 269860332
+52350000000 52352590075 17450000000 17450863358 270130816 270994174
+52353000000 52355590187 17451000000 17451863395 271130816 271994211
+52356000000 52358590396 17452000000 17452863465 272130816 272994281
+52359000000 52361590475 17453000000 17453863491 273130816 273994307
+52362000000 52364590700 17454000000 17454863566 274130816 274994382
+52365000000 52367590827 17455000000 17455863609 275130816 275994425
+52368000000 52370590916 17456000000 17456863638 276130816 276994454
+52371000000 52373591022 17457000000 17457863674 277130816 277994490
+52374000000 52376591233 17458000000 17458863744 278130816 278994560
+52377000000 52379591442 17459000000 17459863814 279130816 279994630
+52380000000 52382591587 17460000000 17460863862 280130816 280994678
+52383000000 52385591713 17461000000 17461863904 281130816 281994720
+52386000000 52388591879 17462000000 17462863959 282130816 282994775
+52389000000 52391591959 17463000000 17463863986 283130816 283994802
+52392000000 52394592194 17464000000 17464864064 284130816 284994880
+52395000000 52397592353 17465000000 17465864117 285130816 285994933
+52398000000 52400592474 17466000000 17466864158 286130816 286994974
+52401000000 52403592634 17467000000 17467864211 287130816 287995027
+52404000000 52406592717 17468000000 17468864239 288130816 288995055
+52407000000 52409592963 17469000000 17469864321 289130816 289995137
+52410000000 52412593086 17470000000 17470864362 290130816 290995178
+52413000000 52415593222 17471000000 17471864407 291130816 291995223
+52416000000 52418593397 17472000000 17472864465 292130816 292995281
+52419000000 52421593519 17473000000 17473864506 293130816 293995322
+52422000000 52424593669 17474000000 17474864556 294130816 294995372
+52425000000 52427593817 17475000000 17475864605 295130816 295995421
+52428000000 52429767511 17476000000 17476589170 296130816 296719986
+52431000000 52433594137 17477000000 17477864712 297130816 297995528
+52434000000 52436594269 17478000000 17478864756 298130816 298995572
+52437000000 52439594443 17479000000 17479864814 299130816 299995630
+52440000000 52442594562 17480000000 17480864854 300130816 300995670
+52443000000 52445594686 17481000000 17481864895 301130816 301995711
+52446000000 52448594905 17482000000 17482864968 302130816 302995784
+52449000000 52451595041 17483000000 17483865013 303130816 303995829
+52452000000 52454595192 17484000000 17484865064 304130816 304995880
+52455000000 52457595342 17485000000 17485865114 305130816 305995930
+52458000000 52460595457 17486000000 17486865152 306130816 306995968
+52461000000 52463595554 17487000000 17487865184 307130816 307996000
+52464000000 52466595762 17488000000 17488865254 308130816 308996070
+52467000000 52469595917 17489000000 17489865305 309130816 309996121
+52470000000 52472596076 17490000000 17490865358 310130816 310996174
+52473000000 52475596250 17491000000 17491865416 311130816 311996232
+52476000000 52478596350 17492000000 17492865450 312130816 312996266
+52479000000 52481596528 17493000000 17493865509 313130816 313996325
+52482000000 52484596677 17494000000 17494865559 314130816 314996375
+52485000000 52487596805 17495000000 17495865601 315130816 315996417
+52488000000 52490596974 17496000000 17496865658 316130816 316996474
+52491000000 52493597094 17497000000 17497865698 317130816 317996514
+52494000000 52495424444 17498000000 17498474814 318130816 318605630
+52497000000 52499597344 17499000000 17499865781 319130816 319996597
+52500000000 52502597602 17500000000 17500865867 320130816 320996683
+52503000000 52505597707 17501000000 17501865902 321130816 321996718
+52506000000 52508597787 17502000000 17502865929 322130816 322996745
+52509000000 52511597934 17503000000 17503865978 323130816 323996794
+52512000000 52514598188 17504000000 17504866062 324130816 324996878
+52515000000 52517598278 17505000000 17505866092 325130816 325996908
+52518000000 52520598523 17506000000 17506866174 326130816 326996990
+52521000000 52523598601 17507000000 17507866200 327130816 327997016
+52524000000 52526598778 17508000000 17508866259 328130816 328997075
+52527000000 52529598924 17509000000 17509866308 329130816 329997124
+52530000000 52532599068 17510000000 17510866356 330130816 330997172
+52533000000 52534221722 17511000000 17511407240 331130816 331538056
+52536000000 52538599383 17512000000 17512866461 332130816 332997277
+52539000000 52541599543 17513000000 17513866514 333130816 333997330
+52542000000 52544599680 17514000000 17514866560 334130816 334997376
+52545000000 52547599838 17515000000 17515866612 335130816 335997428
+52548000000 52550599996 17516000000 17516866665 336130816 336997481
+52551000000 52553600110 17517000000 17517866703 337130816 337997519
+52554000000 52556600271 17518000000 17518866757 338130816 338997573
+52557000000 52559600398 17519000000 17519866799 339130816 339997615
+52560000000 52562600507 17520000000 17520866835 340130816 340997651
+52563000000 52565600649 17521000000 17521866883 341130816 341997699
+52566000000 52568600883 17522000000 17522866961 342130816 342997777
+52569000000 52571600796 17523000000 17523866932 343130816 343997748
+52572000000 52574600917 17524000000 17524866972 344130816 344997788
+52575000000 52577601025 17525000000 17525867008 345130816 345997824
+52578000000 52580601260 17526000000 17526867086 346130816 346997902
+52581000000 52583601439 17527000000 17527867146 347130816 347997962
+52584000000 52586515079 17528000000 17528838359 348130816 348969175
+52587000000 52589601708 17529000000 17529867236 349130816 349998052
+52590000000 52592601881 17530000000 17530867293 350130816 350998109
+52593000000 52595601997 17531000000 17531867332 351130816 351998148
+52596000000 52598602170 17532000000 17532867390 352130816 352998206
+52599000000 52601602342 17533000000 17533867447 353130816 353998263
+52602000000 52604602398 17534000000 17534867466 354130816 354998282
+52605000000 52607602544 17535000000 17535867514 355130816 355998330
+52608000000 52610602740 17536000000 17536867580 356130816 356998396
+52611000000 52613602769 17537000000 17537867589 357130816 357998405
+52614000000 52616603075 17538000000 17538867691 358130816 358998507
+52617000000 52619603247 17539000000 17539867749 359130816 359998565
+52620000000 52622603380 17540000000 17540867793 360130816 360998609
+52623000000 52625603497 17541000000 17541867832 361130816 361998648
+52626000000 52628603682 17542000000 17542867894 362130816 362998710
+52629000000 52631603788 17543000000 17543867929 363130816 363998745
+52632000000 52634603969 17544000000 17544867989 364130816 364998805
+52635000000 52637604181 17545000000 17545868060 365130816 365998876
+52638000000 52640604288 17546000000 17546868096 366130816 366998912
+52641000000 52643604454 17547000000 17547868151 367130816 367998967
+52644000000 52646203199 17548000000 17548734399 368130816 368865215
+52647000000 52649604725 17549000000 17549868241 369130816 369999057
+52650000000 52652604837 17550000000 17550868279 370130816 370999095
+52653000000 52655605046 17551000000 17551868348 371130816 371999164
+52656000000 52658605125 17552000000 17552868375 372130816 372999191
+52659000000 52661605350 17553000000 17553868450 373130816 373999266
+52662000000 52664605477 17554000000 17554868492 374130816 374999308
+52665000000 52667605566 17555000000 17555868522 375130816 375999338
+52668000000 52670605672 17556000000 17556868557 376130816 376999373
+52671000000 52673605883 17557000000 17557868627 377130816 377999443
+52674000000 52676606092 17558000000 17558868697 378130816 378999513
+52677000000 52679606237 17559000000 17559868745 379130816 379999561
+52680000000 52682606363 17560000000 17560868787 380130816 380999603
+52683000000 52685606529 17561000000 17561868843 381130816 381999659
+52686000000 52688606609 17562000000 17562868869 382130816 382999685
+52689000000 52691606844 17563000000 17563868948 383130816 383999764
+52692000000 52694607003 17564000000 17564869001 384130816 384999817
+52695000000 52697607124 17565000000 17565869041 385130816 385999857
+52698000000 52700607284 17566000000 17566869094 386130816 386999910
+52701000000 52703607367 17567000000 17567869122 387130816 387999938
+52704000000 52706607613 17568000000 17568869204 388130816 389000020
+52707000000 52709607736 17569000000 17569869245 389130816 390000061
+52710000000 52712607872 17570000000 17570869290 390130816 391000106
+52713000000 52715608047 17571000000 17571869349 391130816 392000165
+52716000000 52718608169 17572000000 17572869389 392130816 393000205
+52719000000 52721608319 17573000000 17573869439 393130816 394000255
+52722000000 52724608467 17574000000 17574869489 394130816 395000305
+52725000000 52726782161 17575000000 17575594053 395130816 395724869
+52728000000 52730608787 17576000000 17576869595 396130816 397000411
+52731000000 52733608919 17577000000 17577869639 397130816 398000455
+52734000000 52736609093 17578000000 17578869697 398130816 399000513
+52737000000 52739609212 17579000000 17579869737 399130816 400000553
+52740000000 52742609336 17580000000 17580869778 400130816 401000594
+52743000000 52745609555 17581000000 17581869851 401130816 402000667
+52746000000 52748609691 17582000000 17582869897 402130816 403000713
+52749000000 52751609842 17583000000 17583869947 403130816 404000763
+52752000000 52754609992 17584000000 17584869997 404130816 405000813
+52755000000 52757610107 17585000000 17585870035 405130816 406000851
+52758000000 52760610204 17586000000 17586870068 406130816 407000884
+52761000000 52763610412 17587000000 17587870137 407130816 408000953
+52764000000 52766610567 17588000000 17588870189 408130816 409001005
+52767000000 52769610726 17589000000 17589870242 409130816 410001058
+52770000000 52772610900 17590000000 17590870300 410130816 411001116
+52773000000 52775611000 17591000000 17591870333 411130816 412001149
+52776000000 52778611178 17592000000 17592870392 412130816 413001208
+52779000000 52781611327 17593000000 17593870442 413130816 414001258
+52782000000 52784611455 17594000000 17594870485 414130816 415001301
+52785000000 52787611624 17595000000 17595870541 415130816 416001357
+52788000000 52790611744 17596000000 17596870581 416130816 417001397
+52791000000 52792439094 17597000000 17597479698 417130816 417610514
+52794000000 52796611994 17598000000 17598870664 418130816 419001480
+52797000000 52799612252 17599000000 17599870750 419130816 420001566
+52800000000 52802612357 17600000000 17600870785 420130816 421001601
+52803000000 52805612437 17601000000 17601870812 421130816 422001628
+52806000000 52808612584 17602000000 17602870861 422130816 423001677
+52809000000 52811612838 17603000000 17603870946 423130816 424001762
+52812000000 52814612928 17604000000 17604870976 424130816 425001792
+52815000000 52817613173 17605000000 17605871057 425130816 426001873
+52818000000 52820613251 17606000000 17606871083 426130816 427001899
+52821000000 52823613428 17607000000 17607871142 427130816 428001958
+52824000000 52826613574 17608000000 17608871191 428130816 429002007
+52827000000 52829613718 17609000000 17609871239 429130816 430002055
+52830000000 52831236372 17610000000 17610412124 430130816 430542940
+52833000000 52835614033 17611000000 17611871344 431130816 432002160
+52836000000 52838614193 17612000000 17612871397 432130816 433002213
+52839000000 52841614330 17613000000 17613871443 433130816 434002259
+52842000000 52844614488 17614000000 17614871496 434130816 435002312
+52845000000 52847614646 17615000000 17615871548 435130816 436002364
+52848000000 52850614760 17616000000 17616871586 436130816 437002402
+52851000000 52853614921 17617000000 17617871640 437130816 438002456
+52854000000 52856615048 17618000000 17618871682 438130816 439002498
+52857000000 52859615157 17619000000 17619871719 439130816 440002535
+52860000000 52862615299 17620000000 17620871766 440130816 441002582
+52863000000 52865615533 17621000000 17621871844 441130816 442002660
+52866000000 52868615446 17622000000 17622871815 442130816 443002631
+52869000000 52871615567 17623000000 17623871855 443130816 444002671
+52872000000 52874615675 17624000000 17624871891 444130816 445002707
+52875000000 52877615910 17625000000 17625871970 445130816 446002786
+52878000000 52880616089 17626000000 17626872029 446130816 447002845
+52881000000 52883529729 17627000000 17627843243 447130816 447974059
+52884000000 52886616358 17628000000 17628872119 448130816 449002935
+52887000000 52889616531 17629000000 17629872177 449130816 450002993
+52890000000 52892616647 17630000000 17630872215 450130816 451003031
+52893000000 52895616820 17631000000 17631872273 451130816 452003089
+52896000000 52898616992 17632000000 17632872330 452130816 453003146
+52899000000 52901617048 17633000000 17633872349 453130816 454003165
+52902000000 52904617194 17634000000 17634872398 454130816 455003214
+52905000000 52907617390 17635000000 17635872463 455130816 456003279
+52908000000 52910617419 17636000000 17636872473 456130816 457003289
+52911000000 52913617725 17637000000 17637872575 457130816 458003391
+52914000000 52916617897 17638000000 17638872632 458130816 459003448
+52917000000 52919618030 17639000000 17639872676 459130816 460003492
+52920000000 52922618147 17640000000 17640872715 460130816 461003531
+52923000000 52925618332 17641000000 17641872777 461130816 462003593
+52926000000 52928618438 17642000000 17642872812 462130816 463003628
+52929000000 52931618619 17643000000 17643872873 463130816 464003689
+52932000000 52934618831 17644000000 17644872943 464130816 465003759
+52935000000 52937618938 17645000000 17645872979 465130816 466003795
+52938000000 52940619104 17646000000 17646873034 466130816 467003850
+52941000000 52943217849 17647000000 17647739283 467130816 467870099
+52944000000 52946619375 17648000000 17648873125 468130816 469003941
+52947000000 52949619487 17649000000 17649873162 469130816 470003978
+52950000000 52952619696 17650000000 17650873232 470130816 471004048
+52953000000 52955619775 17651000000 17651873258 471130816 472004074
+52956000000 52958620000 17652000000 17652873333 472130816 473004149
+52959000000 52961620127 17653000000 17653873375 473130816 474004191
+52962000000 52964620216 17654000000 17654873405 474130816 475004221
+52965000000 52967620322 17655000000 17655873440 475130816 476004256
+52968000000 52970620533 17656000000 17656873511 476130816 477004327
+52971000000 52973620742 17657000000 17657873580 477130816 478004396
+52974000000 52976620887 17658000000 17658873629 478130816 479004445
+52977000000 52979621013 17659000000 17659873671 479130816 480004487
+52980000000 52982621179 17660000000 17660873726 480130816 481004542
+52983000000 52985621259 17661000000 17661873753 481130816 482004569
+52986000000 52988621494 17662000000 17662873831 482130816 483004647
+52989000000 52991621653 17663000000 17663873884 483130816 484004700
+52992000000 52994621774 17664000000 17664873924 484130816 485004740
+52995000000 52997621934 17665000000 17665873978 485130816 486004794
+52998000000 53000622017 17666000000 17666874005 486130816 487004821
+53001000000 53003622263 17667000000 17667874087 487130816 488004903
+53004000000 53006622386 17668000000 17668874128 488130816 489004944
+53007000000 53009622522 17669000000 17669874174 489130816 490004990
+53010000000 53012622697 17670000000 17670874232 490130816 491005048
+53013000000 53015622819 17671000000 17671874273 491130816 492005089
+53016000000 53018622969 17672000000 17672874323 492130816 493005139
+53019000000 53021623117 17673000000 17673874372 493130816 494005188
+53022000000 53023796811 17674000000 17674598937 494130816 494729753
+53025000000 53027623437 17675000000 17675874479 495130816 496005295
+53028000000 53030623569 17676000000 17676874523 496130816 497005339
+53031000000 53033623743 17677000000 17677874581 497130816 498005397
+53034000000 53036623862 17678000000 17678874620 498130816 499005436
+53037000000 53039623986 17679000000 17679874662 499130816 500005478
+53040000000 53042624205 17680000000 17680874735 500130816 501005551
+53043000000 53045624341 17681000000 17681874780 501130816 502005596
+53046000000 53048624492 17682000000 17682874830 502130816 503005646
+53049000000 53051624642 17683000000 17683874880 503130816 504005696
+53052000000 53054624757 17684000000 17684874919 504130816 505005735
+53055000000 53057624854 17685000000 17685874951 505130816 506005767
+53058000000 53060625062 17686000000 17686875020 506130816 507005836
+53061000000 53063625217 17687000000 17687875072 507130816 508005888
+53064000000 53066625376 17688000000 17688875125 508130816 509005941
+53067000000 53069625550 17689000000 17689875183 509130816 510005999
+53070000000 53072625650 17690000000 17690875216 510130816 511006032
+53073000000 53075625828 17691000000 17691875276 511130816 512006092
+53076000000 53078625977 17692000000 17692875325 512130816 513006141
+53079000000 53081626105 17693000000 17693875368 513130816 514006184
+53082000000 53084626274 17694000000 17694875424 514130816 515006240
+53085000000 53087626394 17695000000 17695875464 515130816 516006280
+53088000000 53089453744 17696000000 17696484581 516130816 516615397
+53091000000 53093626644 17697000000 17697875548 517130816 518006364
+53094000000 53096626902 17698000000 17698875634 518130816 519006450
+53097000000 53099627007 17699000000 17699875669 519130816 520006485
+53100000000 53102627087 17700000000 17700875695 520130816 521006511
+53103000000 53105627234 17701000000 17701875744 521130816 522006560
+53106000000 53108627488 17702000000 17702875829 522130816 523006645
+53109000000 53111627578 17703000000 17703875859 523130816 524006675
+53112000000 53114627823 17704000000 17704875941 524130816 525006757
+53115000000 53117627901 17705000000 17705875967 525130816 526006783
+53118000000 53120628078 17706000000 17706876026 526130816 527006842
+53121000000 53123628224 17707000000 17707876074 527130816 528006890
+53124000000 53126628368 17708000000 17708876122 528130816 529006938
+53127000000 53128251022 17709000000 17709417007 529130816 529547823
+53130000000 53132628683 17710000000 17710876227 530130816 531007043
+53133000000 53135628843 17711000000 17711876281 531130816 532007097
+53136000000 53138628980 17712000000 17712876326 532130816 533007142
+53139000000 53141629138 17713000000 17713876379 533130816 534007195
+53142000000 53144629296 17714000000 17714876432 534130816 535007248
+53145000000 53147629410 17715000000 17715876470 535130816 536007286
+53148000000 53150629571 17716000000 17716876523 536130816 537007339
+53151000000 53153629698 17717000000 17717876566 537130816 538007382
+53154000000 53156629807 17718000000 17718876602 538130816 539007418
+53157000000 53159629949 17719000000 17719876649 539130816 540007465
+53160000000 53162630183 17720000000 17720876727 540130816 541007543
+53163000000 53165630096 17721000000 17721876698 541130816 542007514
+53166000000 53168630217 17722000000 17722876739 542130816 543007555
+53169000000 53171630325 17723000000 17723876775 543130816 544007591
+53172000000 53174630560 17724000000 17724876853 544130816 545007669
+53175000000 53177630739 17725000000 17725876913 545130816 546007729
+53178000000 53180544379 17726000000 17726848126 546130816 546978942
+53181000000 53183631008 17727000000 17727877002 547130816 548007818
+53184000000 53186631181 17728000000 17728877060 548130816 549007876
+53187000000 53189631297 17729000000 17729877099 549130816 550007915
+53190000000 53192631470 17730000000 17730877156 550130816 551007972
+53193000000 53195631642 17731000000 17731877214 551130816 552008030
+53196000000 53198631698 17732000000 17732877232 552130816 553008048
+53199000000 53201631844 17733000000 17733877281 553130816 554008097
+53202000000 53204632040 17734000000 17734877346 554130816 555008162
+53205000000 53207632069 17735000000 17735877356 555130816 556008172
+53208000000 53210632375 17736000000 17736877458 556130816 557008274
+53211000000 53213632547 17737000000 17737877515 557130816 558008331
+53214000000 53216632680 17738000000 17738877560 558130816 559008376
+53217000000 53219632797 17739000000 17739877599 559130816 560008415
+53220000000 53222632982 17740000000 17740877660 560130816 561008476
+53223000000 53225633088 17741000000 17741877696 561130816 562008512
+53226000000 53228633269 17742000000 17742877756 562130816 563008572
+53229000000 53231633481 17743000000 17743877827 563130816 564008643
+53232000000 53234633588 17744000000 17744877862 564130816 565008678
+53235000000 53237633754 17745000000 17745877918 565130816 566008734
+53238000000 53240232499 17746000000 17746744166 566130816 566874982
+53241000000 53243634025 17747000000 17747878008 567130816 568008824
+53244000000 53246634137 17748000000 17748878045 568130816 569008861
+53247000000 53249634346 17749000000 17749878115 569130816 570008931
+53250000000 53252634425 17750000000 17750878141 570130816 571008957
+53253000000 53255634650 17751000000 17751878216 571130816 572009032
+53256000000 53258634777 17752000000 17752878259 572130816 573009075
+53259000000 53261634866 17753000000 17753878288 573130816 574009104
+53262000000 53264634972 17754000000 17754878324 574130816 575009140
+53265000000 53267635183 17755000000 17755878394 575130816 576009210
+53268000000 53270635392 17756000000 17756878464 576130816 577009280
+53271000000 53273635537 17757000000 17757878512 577130816 578009328
+53274000000 53276635663 17758000000 17758878554 578130816 579009370
+53277000000 53279635829 17759000000 17759878609 579130816 580009425
+53280000000 53282635909 17760000000 17760878636 580130816 581009452
+53283000000 53285636144 17761000000 17761878714 581130816 582009530
+53286000000 53288636303 17762000000 17762878767 582130816 583009583
+53289000000 53291636424 17763000000 17763878808 583130816 584009624
+53292000000 53294636584 17764000000 17764878861 584130816 585009677
+53295000000 53297636667 17765000000 17765878889 585130816 586009705
+53298000000 53300636913 17766000000 17766878971 586130816 587009787
+53301000000 53303637036 17767000000 17767879012 587130816 588009828
+53304000000 53306637172 17768000000 17768879057 588130816 589009873
+53307000000 53309637347 17769000000 17769879115 589130816 590009931
+53310000000 53312637469 17770000000 17770879156 590130816 591009972
+53313000000 53315637619 17771000000 17771879206 591130816 592010022
+53316000000 53318637767 17772000000 17772879255 592130816 593010071
+53319000000 53320811461 17773000000 17773603820 593130816 593734636
+53322000000 53324638087 17774000000 17774879362 594130816 595010178
+53325000000 53327638219 17775000000 17775879406 595130816 596010222
+53328000000 53330638393 17776000000 17776879464 596130816 597010280
+53331000000 53333638512 17777000000 17777879504 597130816 598010320
+53334000000 53336638636 17778000000 17778879545 598130816 599010361
+53337000000 53339638855 17779000000 17779879618 599130816 600010434
+53340000000 53342638991 17780000000 17780879663 600130816 601010479
+53343000000 53345639142 17781000000 17781879714 601130816 602010530
+53346000000 53348639292 17782000000 17782879764 602130816 603010580
+53349000000 53351639407 17783000000 17783879802 603130816 604010618
+53352000000 53354639504 17784000000 17784879834 604130816 605010650
+53355000000 53357639712 17785000000 17785879904 605130816 606010720
+53358000000 53360639867 17786000000 17786879955 606130816 607010771
+53361000000 53363640026 17787000000 17787880008 607130816 608010824
+53364000000 53366640200 17788000000 17788880066 608130816 609010882
+53367000000 53369640300 17789000000 17789880100 609130816 610010916
+53370000000 53372640478 17790000000 17790880159 610130816 611010975
+53373000000 53375640627 17791000000 17791880209 611130816 612011025
+53376000000 53378640755 17792000000 17792880251 612130816 613011067
+53379000000 53381640924 17793000000 17793880308 613130816 614011124
+53382000000 53384641044 17794000000 17794880348 614130816 615011164
+53385000000 53386468394 17795000000 17795489464 615130816 615620280
+53388000000 53390641294 17796000000 17796880431 616130816 617011247
+53391000000 53393641552 17797000000 17797880517 617130816 618011333
+53394000000 53396641657 17798000000 17798880552 618130816 619011368
+53397000000 53399641737 17799000000 17799880579 619130816 620011395
+53400000000 53402641884 17800000000 17800880628 620130816 621011444
+53403000000 53405642138 17801000000 17801880712 621130816 622011528
+53406000000 53408642228 17802000000 17802880742 622130816 623011558
+53409000000 53411642473 17803000000 17803880824 623130816 624011640
+53412000000 53414642551 17804000000 17804880850 624130816 625011666
+53415000000 53417642728 17805000000 17805880909 625130816 626011725
+53418000000 53420642874 17806000000 17806880958 626130816 627011774
+53421000000 53423643018 17807000000 17807881006 627130816 628011822
+53424000000 53425265672 17808000000 17808421890 628130816 628552706
+53427000000 53429643333 17809000000 17809881111 629130816 630011927
+53430000000 53432643493 17810000000 17810881164 630130816 631011980
+53433000000 53435643630 17811000000 17811881210 631130816 632012026
+53436000000 53438643788 17812000000 17812881262 632130816 633012078
+53439000000 53441643946 17813000000 17813881315 633130816 634012131
+53442000000 53444644060 17814000000 17814881353 634130816 635012169
+53445000000 53447644221 17815000000 17815881407 635130816 636012223
+53448000000 53450644348 17816000000 17816881449 636130816 637012265
+53451000000 53453644457 17817000000 17817881485 637130816 638012301
+53454000000 53456644599 17818000000 17818881533 638130816 639012349
+53457000000 53459644833 17819000000 17819881611 639130816 640012427
+53460000000 53462644746 17820000000 17820881582 640130816 641012398
+53463000000 53465644867 17821000000 17821881622 641130816 642012438
+53466000000 53468644975 17822000000 17822881658 642130816 643012474
+53469000000 53471645210 17823000000 17823881736 643130816 644012552
+53472000000 53474645389 17824000000 17824881796 644130816 645012612
+53475000000 53477559029 17825000000 17825853009 645130816 645983825
+53478000000 53480645658 17826000000 17826881886 646130816 647012702
+53481000000 53483645831 17827000000 17827881943 647130816 648012759
+53484000000 53486645947 17828000000 17828881982 648130816 649012798
+53487000000 53489646120 17829000000 17829882040 649130816 650012856
+53490000000 53492646292 17830000000 17830882097 650130816 651012913
+53493000000 53495646348 17831000000 17831882116 651130816 652012932
+53496000000 53498646494 17832000000 17832882164 652130816 653012980
+53499000000 53501646690 17833000000 17833882230 653130816 654013046
+53502000000 53504646719 17834000000 17834882239 654130816 655013055
+53505000000 53507647025 17835000000 17835882341 655130816 656013157
+53508000000 53510647197 17836000000 17836882399 656130816 657013215
+53511000000 53513647330 17837000000 17837882443 657130816 658013259
+53514000000 53516647447 17838000000 17838882482 658130816 659013298
+53517000000 53519647632 17839000000 17839882544 659130816 660013360
+53520000000 53522647738 17840000000 17840882579 660130816 661013395
+53523000000 53525647919 17841000000 17841882639 661130816 662013455
+53526000000 53528648131 17842000000 17842882710 662130816 663013526
+53529000000 53531648238 17843000000 17843882746 663130816 664013562
+53532000000 53534648404 17844000000 17844882801 664130816 665013617
+53535000000 53537247149 17845000000 17845749049 665130816 665879865
+53538000000 53540648675 17846000000 17846882891 666130816 667013707
+53541000000 53543648787 17847000000 17847882929 667130816 668013745
+53544000000 53546648996 17848000000 17848882998 668130816 669013814
+53547000000 53549649075 17849000000 17849883025 669130816 670013841
+53550000000 53552649300 17850000000 17850883100 670130816 671013916
+53553000000 53555649427 17851000000 17851883142 671130816 672013958
+53556000000 53558649516 17852000000 17852883172 672130816 673013988
+53559000000 53561649622 17853000000 17853883207 673130816 674014023
+53562000000 53564649833 17854000000 17854883277 674130816 675014093
+53565000000 53567650042 17855000000 17855883347 675130816 676014163
+53568000000 53570650187 17856000000 17856883395 676130816 677014211
+53571000000 53573650313 17857000000 17857883437 677130816 678014253
+53574000000 53576650479 17858000000 17858883493 678130816 679014309
+53577000000 53579650559 17859000000 17859883519 679130816 680014335
+53580000000 53582650794 17860000000 17860883598 680130816 681014414
+53583000000 53585650953 17861000000 17861883651 681130816 682014467
+53586000000 53588651074 17862000000 17862883691 682130816 683014507
+53589000000 53591651234 17863000000 17863883744 683130816 684014560
+53592000000 53594651317 17864000000 17864883772 684130816 685014588
+53595000000 53597651563 17865000000 17865883854 685130816 686014670
+53598000000 53600651686 17866000000 17866883895 686130816 687014711
+53601000000 53603651822 17867000000 17867883940 687130816 688014756
+53604000000 53606651997 17868000000 17868883999 688130816 689014815
+53607000000 53609652119 17869000000 17869884039 689130816 690014855
+53610000000 53612652269 17870000000 17870884089 690130816 691014905
+53613000000 53615652417 17871000000 17871884139 691130816 692014955
+53616000000 53617826111 17872000000 17872608703 692130816 692739519
+53619000000 53621652737 17873000000 17873884245 693130816 694015061
+53622000000 53624652869 17874000000 17874884289 694130816 695015105
+53625000000 53627653043 17875000000 17875884347 695130816 696015163
+53628000000 53630653162 17876000000 17876884387 696130816 697015203
+53631000000 53633653286 17877000000 17877884428 697130816 698015244
+53634000000 53636653505 17878000000 17878884501 698130816 699015317
+53637000000 53639653641 17879000000 17879884547 699130816 700015363
+53640000000 53642653792 17880000000 17880884597 700130816 701015413
+53643000000 53645653942 17881000000 17881884647 701130816 702015463
+53646000000 53648654057 17882000000 17882884685 702130816 703015501
+53649000000 53651654154 17883000000 17883884718 703130816 704015534
+53652000000 53654654362 17884000000 17884884787 704130816 705015603
+53655000000 53657654517 17885000000 17885884839 705130816 706015655
+53658000000 53660654676 17886000000 17886884892 706130816 707015708
+53661000000 53663654850 17887000000 17887884950 707130816 708015766
+53664000000 53666654950 17888000000 17888884983 708130816 709015799
+53667000000 53669655128 17889000000 17889885042 709130816 710015858
+53670000000 53672655277 17890000000 17890885092 710130816 711015908
+53673000000 53675655405 17891000000 17891885135 711130816 712015951
+53676000000 53678655574 17892000000 17892885191 712130816 713016007
+53679000000 53681655694 17893000000 17893885231 713130816 714016047
+53682000000 53683483044 17894000000 17894494348 714130816 714625164
+53685000000 53687655944 17895000000 17895885314 715130816 716016130
+53688000000 53690656202 17896000000 17896885400 716130816 717016216
+53691000000 53693656307 17897000000 17897885435 717130816 718016251
+53694000000 53696656387 17898000000 17898885462 718130816 719016278
+53697000000 53699656534 17899000000 17899885511 719130816 720016327
+53700000000 53702656788 17900000000 17900885596 720130816 721016412
+53703000000 53705656878 17901000000 17901885626 721130816 722016442
+53706000000 53708657123 17902000000 17902885707 722130816 723016523
+53709000000 53711657201 17903000000 17903885733 723130816 724016549
+53712000000 53714657378 17904000000 17904885792 724130816 725016608
+53715000000 53717657524 17905000000 17905885841 725130816 726016657
+53718000000 53720657668 17906000000 17906885889 726130816 727016705
+53721000000 53722280322 17907000000 17907426774 727130816 727557590
+53724000000 53726657983 17908000000 17908885994 728130816 729016810
+53727000000 53729658143 17909000000 17909886047 729130816 730016863
+53730000000 53732658280 17910000000 17910886093 730130816 731016909
+53733000000 53735658438 17911000000 17911886146 731130816 732016962
+53736000000 53738658596 17912000000 17912886198 732130816 733017014
+53739000000 53741658710 17913000000 17913886236 733130816 734017052
+53742000000 53744658871 17914000000 17914886290 734130816 735017106
+53745000000 53747658998 17915000000 17915886332 735130816 736017148
+53748000000 53750659107 17916000000 17916886369 736130816 737017185
+53751000000 53753659249 17917000000 17917886416 737130816 738017232
+53754000000 53756659483 17918000000 17918886494 738130816 739017310
+53757000000 53759659396 17919000000 17919886465 739130816 740017281
+53760000000 53762659517 17920000000 17920886505 740130816 741017321
+53763000000 53765659625 17921000000 17921886541 741130816 742017357
+53766000000 53768659860 17922000000 17922886620 742130816 743017436
+53769000000 53771660039 17923000000 17923886679 743130816 744017495
+53772000000 53774573679 17924000000 17924857893 744130816 744988709
+53775000000 53777660308 17925000000 17925886769 745130816 746017585
+53778000000 53780660481 17926000000 17926886827 746130816 747017643
+53781000000 53783660597 17927000000 17927886865 747130816 748017681
+53784000000 53786660770 17928000000 17928886923 748130816 749017739
+53787000000 53789660942 17929000000 17929886980 749130816 750017796
+53790000000 53792660998 17930000000 17930886999 750130816 751017815
+53793000000 53795661144 17931000000 17931887048 751130816 752017864
+53796000000 53798661340 17932000000 17932887113 752130816 753017929
+53799000000 53801661369 17933000000 17933887123 753130816 754017939
+53802000000 53804661675 17934000000 17934887225 754130816 755018041
+53805000000 53807661847 17935000000 17935887282 755130816 756018098
+53808000000 53810661980 17936000000 17936887326 756130816 757018142
+53811000000 53813662097 17937000000 17937887365 757130816 758018181
+53814000000 53816662282 17938000000 17938887427 758130816 759018243
+53817000000 53819662388 17939000000 17939887462 759130816 760018278
+53820000000 53822662569 17940000000 17940887523 760130816 761018339
+53823000000 53825662781 17941000000 17941887593 761130816 762018409
+53826000000 53828662888 17942000000 17942887629 762130816 763018445
+53829000000 53831663054 17943000000 17943887684 763130816 764018500
+53832000000 53834261799 17944000000 17944753933 764130816 764884749
+53835000000 53837663325 17945000000 17945887775 765130816 766018591
+53838000000 53840663437 17946000000 17946887812 766130816 767018628
+53841000000 53843663646 17947000000 17947887882 767130816 768018698
+53844000000 53846663725 17948000000 17948887908 768130816 769018724
+53847000000 53849663950 17949000000 17949887983 769130816 770018799
+53850000000 53852664077 17950000000 17950888025 770130816 771018841
+53853000000 53855664166 17951000000 17951888055 771130816 772018871
+53856000000 53858664272 17952000000 17952888090 772130816 773018906
+53859000000 53861664483 17953000000 17953888161 773130816 774018977
+53862000000 53864664692 17954000000 17954888230 774130816 775019046
+53865000000 53867664837 17955000000 17955888279 775130816 776019095
+53868000000 53870664963 17956000000 17956888321 776130816 777019137
+53871000000 53873665129 17957000000 17957888376 777130816 778019192
+53874000000 53876665209 17958000000 17958888403 778130816 779019219
+53877000000 53879665444 17959000000 17959888481 779130816 780019297
+53880000000 53882665603 17960000000 17960888534 780130816 781019350
+53883000000 53885665724 17961000000 17961888574 781130816 782019390
+53886000000 53888665884 17962000000 17962888628 782130816 783019444
+53889000000 53891665967 17963000000 17963888655 783130816 784019471
+53892000000 53894666213 17964000000 17964888737 784130816 785019553
+53895000000 53897666336 17965000000 17965888778 785130816 786019594
+53898000000 53900666472 17966000000 17966888824 786130816 787019640
+53901000000 53903666647 17967000000 17967888882 787130816 788019698
+53904000000 53906666769 17968000000 17968888923 788130816 789019739
+53907000000 53909666919 17969000000 17969888973 789130816 790019789
+53910000000 53912667067 17970000000 17970889022 790130816 791019838
+53913000000 53914840761 17971000000 17971613587 791130816 791744403
+53916000000 53918667387 17972000000 17972889129 792130816 793019945
+53919000000 53921667519 17973000000 17973889173 793130816 794019989
+53922000000 53924667693 17974000000 17974889231 794130816 795020047
+53925000000 53927667812 17975000000 17975889270 795130816 796020086
+53928000000 53930667936 17976000000 17976889312 796130816 797020128
+53931000000 53933668155 17977000000 17977889385 797130816 798020201
+53934000000 53936668291 17978000000 17978889430 798130816 799020246
+53937000000 53939668442 17979000000 17979889480 799130816 800020296
+53940000000 53942668592 17980000000 17980889530 800130816 801020346
+53943000000 53945668707 17981000000 17981889569 801130816 802020385
+53946000000 53948668804 17982000000 17982889601 802130816 803020417
+53949000000 53951669012 17983000000 17983889670 803130816 804020486
+53952000000 53954669167 17984000000 17984889722 804130816 805020538
+53955000000 53957669326 17985000000 17985889775 805130816 806020591
+53958000000 53960669500 17986000000 17986889833 806130816 807020649
+53961000000 53963669600 17987000000 17987889866 807130816 808020682
+53964000000 53966669778 17988000000 17988889926 808130816 809020742
+53967000000 53969669927 17989000000 17989889975 809130816 810020791
+53970000000 53972670055 17990000000 17990890018 810130816 811020834
+53973000000 53975670224 17991000000 17991890074 811130816 812020890
+53976000000 53978670344 17992000000 17992890114 812130816 813020930
+53979000000 53980497694 17993000000 17993499231 813130816 813630047
+53982000000 53984670594 17994000000 17994890198 814130816 815021014
+53985000000 53987670852 17995000000 17995890284 815130816 816021100
+53988000000 53990670957 17996000000 17996890319 816130816 817021135
+53991000000 53993671037 17997000000 17997890345 817130816 818021161
+53994000000 53996671184 17998000000 17998890394 818130816 819021210
+53997000000 53999671438 17999000000 17999890479 819130816 820021295
+54000000000 54002671528 18000000000 18000890509 820130816 821021325
+54003000000 54005671773 18001000000 18001890591 821130816 822021407
+54006000000 54008671851 18002000000 18002890617 822130816 823021433
+54009000000 54011672028 18003000000 18003890676 823130816 824021492
+54012000000 54014672174 18004000000 18004890724 824130816 825021540
+54015000000 54017672318 18005000000 18005890772 825130816 826021588
+54018000000 54019294972 18006000000 18006431657 826130816 826562473
+54021000000 54023672633 18007000000 18007890877 827130816 828021693
+54024000000 54026672793 18008000000 18008890931 828130816 829021747
+54027000000 54029672930 18009000000 18009890976 829130816 830021792
+54030000000 54032673088 18010000000 18010891029 830130816 831021845
+54033000000 54035673246 18011000000 18011891082 831130816 832021898
+54036000000 54038673360 18012000000 18012891120 832130816 833021936
+54039000000 54041673521 18013000000 18013891173 833130816 834021989
+54042000000 54044673648 18014000000 18014891216 834130816 835022032
+54045000000 54047673757 18015000000 18015891252 835130816 836022068
+54048000000 54050673899 18016000000 18016891299 836130816 837022115
+54051000000 54053674133 18017000000 18017891377 837130816 838022193
+54054000000 54056674046 18018000000 18018891348 838130816 839022164
+54057000000 54059674167 18019000000 18019891389 839130816 840022205
+54060000000 54062674275 18020000000 18020891425 840130816 841022241
+54063000000 54065674510 18021000000 18021891503 841130816 842022319
+54066000000 54068674689 18022000000 18022891563 842130816 843022379
+54069000000 54071588329 18023000000 18023862776 843130816 843993592
+54072000000 54074674958 18024000000 18024891652 844130816 845022468
+54075000000 54077675131 18025000000 18025891710 845130816 846022526
+54078000000 54080675247 18026000000 18026891749 846130816 847022565
+54081000000 54083675420 18027000000 18027891806 847130816 848022622
+54084000000 54086675592 18028000000 18028891864 848130816 849022680
+54087000000 54089675648 18029000000 18029891882 849130816 850022698
+54090000000 54092675794 18030000000 18030891931 850130816 851022747
+54093000000 54095675990 18031000000 18031891996 851130816 852022812
+54096000000 54098676019 18032000000 18032892006 852130816 853022822
+54099000000 54101676325 18033000000 18033892108 853130816 854022924
+54102000000 54104676497 18034000000 18034892165 854130816 855022981
+54105000000 54107676630 18035000000 18035892210 855130816 856023026
+54108000000 54110676747 18036000000 18036892249 856130816 857023065
+54111000000 54113676932 18037000000 18037892310 857130816 858023126
+54114000000 54116677038 18038000000 18038892346 858130816 859023162
+54117000000 54119677219 18039000000 18039892406 859130816 860023222
+54120000000 54122677431 18040000000 18040892477 860130816 861023293
+54123000000 54125677538 18041000000 18041892512 861130816 862023328
+54126000000 54128677704 18042000000 18042892568 862130816 863023384
+54129000000 54131276449 18043000000 18043758816 863130816 863889632
+54132000000 54134677975 18044000000 18044892658 864130816 865023474
+54135000000 54137678087 18045000000 18045892695 865130816 866023511
+54138000000 54140678296 18046000000 18046892765 866130816 867023581
+54141000000 54143678375 18047000000 18047892791 867130816 868023607
+54144000000 54146678600 18048000000 18048892866 868130816 869023682
+54147000000 54149678727 18049000000 18049892909 869130816 870023725
+54150000000 54152678816 18050000000 18050892938 870130816 871023754
+54153000000 54155678922 18051000000 18051892974 871130816 872023790
+54156000000 54158679133 18052000000 18052893044 872130816 873023860
+54159000000 54161679342 18053000000 18053893114 873130816 874023930
+54162000000 54164679487 18054000000 18054893162 874130816 875023978
+54165000000 54167679613 18055000000 18055893204 875130816 876024020
+54168000000 54170679779 18056000000 18056893259 876130816 877024075
+54171000000 54173679859 18057000000 18057893286 877130816 878024102
+54174000000 54176680094 18058000000 18058893364 878130816 879024180
+54177000000 54179680253 18059000000 18059893417 879130816 880024233
+54180000000 54182680374 18060000000 18060893458 880130816 881024274
+54183000000 54185680534 18061000000 18061893511 881130816 882024327
+54186000000 54188680617 18062000000 18062893539 882130816 883024355
+54189000000 54191680863 18063000000 18063893621 883130816 884024437
+54192000000 54194680986 18064000000 18064893662 884130816 885024478
+54195000000 54197681122 18065000000 18065893707 885130816 886024523
+54198000000 54200681297 18066000000 18066893765 886130816 887024581
+54201000000 54203681419 18067000000 18067893806 887130816 888024622
+54204000000 54206681569 18068000000 18068893856 888130816 889024672
+54207000000 54209681717 18069000000 18069893905 889130816 890024721
+54210000000 54211855411 18070000000 18070618470 890130816 890749286
+54213000000 54215682037 18071000000 18071894012 891130816 892024828
+54216000000 54218682169 18072000000 18072894056 892130816 893024872
+54219000000 54221682343 18073000000 18073894114 893130816 894024930
+54222000000 54224682462 18074000000 18074894154 894130816 895024970
+54225000000 54227682586 18075000000 18075894195 895130816 896025011
+54228000000 54230682805 18076000000 18076894268 896130816 897025084
+54231000000 54233682941 18077000000 18077894313 897130816 898025129
+54234000000 54236683092 18078000000 18078894364 898130816 899025180
+54237000000 54239683242 18079000000 18079894414 899130816 900025230
+54240000000 54242683357 18080000000 18080894452 900130816 901025268
+54243000000 54245683454 18081000000 18081894484 901130816 902025300
+54246000000 54248683662 18082000000 18082894554 902130816 903025370
+54249000000 54251683817 18083000000 18083894605 903130816 904025421
+54252000000 54254683976 18084000000 18084894658 904130816 905025474
+54255000000 54257684150 18085000000 18085894716 905130816 906025532
+54258000000 54260684250 18086000000 18086894750 906130816 907025566
+54261000000 54263684428 18087000000 18087894809 907130816 908025625
+54264000000 54266684577 18088000000 18088894859 908130816 909025675
+54267000000 54269684705 18089000000 18089894901 909130816 910025717
+54270000000 54272684874 18090000000 18090894958 910130816 911025774
+54273000000 54275684994 18091000000 18091894998 911130816 912025814
+54276000000 54277512344 18092000000 18092504114 912130816 912634930
+54279000000 54281685244 18093000000 18093895081 913130816 914025897
+54282000000 54284685502 18094000000 18094895167 914130816 915025983
+54285000000 54287685607 18095000000 18095895202 915130816 916026018
+54288000000 54290685687 18096000000 18096895229 916130816 917026045
+54291000000 54293685834 18097000000 18097895278 917130816 918026094
+54294000000 54296686088 18098000000 18098895362 918130816 919026178
+54297000000 54299686178 18099000000 18099895392 919130816 920026208
+54300000000 54302686423 18100000000 18100895474 920130816 921026290
+54303000000 54305686501 18101000000 18101895500 921130816 922026316
+54306000000 54308686678 18102000000 18102895559 922130816 923026375
+54309000000 54311686824 18103000000 18103895608 923130816 924026424
+54312000000 54314686968 18104000000 18104895656 924130816 925026472
+54315000000 54316309622 18105000000 18105436540 925130816 925567356
+54318000000 54320687283 18106000000 18106895761 926130816 927026577
+54321000000 54323687443 18107000000 18107895814 927130816 928026630
+54324000000 54326687580 18108000000 18108895860 928130816 929026676
+54327000000 54329687738 18109000000 18109895912 929130816 930026728
+54330000000 54332687896 18110000000 18110895965 930130816 931026781
+54333000000 54335688010 18111000000 18111896003 931130816 932026819
+54336000000 54338688171 18112000000 18112896057 932130816 933026873
+54339000000 54341688298 18113000000 18113896099 933130816 934026915
+54342000000 54344688407 18114000000 18114896135 934130816 935026951
+54345000000 54347688549 18115000000 18115896183 935130816 936026999
+54348000000 54350688783 18116000000 18116896261 936130816 937027077
+54351000000 54353688696 18117000000 18117896232 937130816 938027048
+54354000000 54356688817 18118000000 18118896272 938130816 939027088
+54357000000 54359688925 18119000000 18119896308 939130816 940027124
+54360000000 54362689160 18120000000 18120896386 940130816 941027202
+54363000000 54365689339 18121000000 18121896446 941130816 942027262
+54366000000 54368602979 18122000000 18122867659 942130816 942998475
+54369000000 54371689608 18123000000 18123896536 943130816 944027352
+54372000000 54374689781 18124000000 18124896593 944130816 945027409
+54375000000 54377689897 18125000000 18125896632 945130816 946027448
+54378000000 54380690070 18126000000 18126896690 946130816 947027506
+54381000000 54383690242 18127000000 18127896747 947130816 948027563
+54384000000 54386690298 18128000000 18128896766 948130816 949027582
+54387000000 54389690444 18129000000 18129896814 949130816 950027630
+54390000000 54392690640 18130000000 18130896880 950130816 951027696
+54393000000 54395690669 18131000000 18131896889 951130816 952027705
+54396000000 54398690975 18132000000 18132896991 952130816 953027807
+54399000000 54401691147 18133000000 18133897049 953130816 954027865
+54402000000 54404691280 18134000000 18134897093 954130816 955027909
+54405000000 54407691397 18135000000 18135897132 955130816 956027948
+54408000000 54410691582 18136000000 18136897194 956130816 957028010
+54411000000 54413691688 18137000000 18137897229 957130816 958028045
+54414000000 54416691869 18138000000 18138897289 958130816 959028105
+54417000000 54419692081 18139000000 18139897360 959130816 960028176
+54420000000 54422692188 18140000000 18140897396 960130816 961028212
+54423000000 54425692354 18141000000 18141897451 961130816 962028267
+54426000000 54428291099 18142000000 18142763699 962130816 962894515
+54429000000 54431692625 18143000000 18143897541 963130816 964028357
+54432000000 54434692737 18144000000 18144897579 964130816 965028395
+54435000000 54437692946 18145000000 18145897648 965130816 966028464
+54438000000 54440693025 18146000000 18146897675 966130816 967028491
+54441000000 54443693250 18147000000 18147897750 967130816 968028566
+54444000000 54446693377 18148000000 18148897792 968130816 969028608
+54447000000 54449693466 18149000000 18149897822 969130816 970028638
+54450000000 54452693572 18150000000 18150897857 970130816 971028673
+54453000000 54455693783 18151000000 18151897927 971130816 972028743
+54456000000 54458693992 18152000000 18152897997 972130816 973028813
+54459000000 54461694137 18153000000 18153898045 973130816 974028861
+54462000000 54464694263 18154000000 18154898087 974130816 975028903
+54465000000 54467694429 18155000000 18155898143 975130816 976028959
+54468000000 54470694509 18156000000 18156898169 976130816 977028985
+54471000000 54473694744 18157000000 18157898248 977130816 978029064
+54474000000 54476694903 18158000000 18158898301 978130816 979029117
+54477000000 54479695024 18159000000 18159898341 979130816 980029157
+54480000000 54482695184 18160000000 18160898394 980130816 981029210
+54483000000 54485695267 18161000000 18161898422 981130816 982029238
+54486000000 54488695513 18162000000 18162898504 982130816 983029320
+54489000000 54491695636 18163000000 18163898545 983130816 984029361
+54492000000 54494695772 18164000000 18164898590 984130816 985029406
+54495000000 54497695947 18165000000 18165898649 985130816 986029465
+54498000000 54500696069 18166000000 18166898689 986130816 987029505
+54501000000 54503696219 18167000000 18167898739 987130816 988029555
+54504000000 54506696367 18168000000 18168898789 988130816 989029605
+54507000000 54508870061 18169000000 18169623353 989130816 989754169
+54510000000 54512696687 18170000000 18170898895 990130816 991029711
+54513000000 54515696819 18171000000 18171898939 991130816 992029755
+54516000000 54518696993 18172000000 18172898997 992130816 993029813
+54519000000 54521697112 18173000000 18173899037 993130816 994029853
+54522000000 54524697236 18174000000 18174899078 994130816 995029894
+54525000000 54527697455 18175000000 18175899151 995130816 996029967
+54528000000 54530697591 18176000000 18176899197 996130816 997030013
+54531000000 54533697742 18177000000 18177899247 997130816 998030063
+54534000000 54536697892 18178000000 18178899297 998130816 999030113
+54537000000 54539698007 18179000000 18179899335 999130816 1000030151
+54540000000 54542698104 18180000000 18180899368 1000130816 1001030184
+54543000000 54545698312 18181000000 18181899437 1001130816 1002030253
+54546000000 54548698467 18182000000 18182899489 1002130816 1003030305
+54549000000 54551698626 18183000000 18183899542 1003130816 1004030358
+54552000000 54554698800 18184000000 18184899600 1004130816 1005030416
+54555000000 54557698900 18185000000 18185899633 1005130816 1006030449
+54558000000 54560699078 18186000000 18186899692 1006130816 1007030508
+54561000000 54563699227 18187000000 18187899742 1007130816 1008030558
+54564000000 54566699355 18188000000 18188899785 1008130816 1009030601
+54567000000 54569699524 18189000000 18189899841 1009130816 1010030657
+54570000000 54572699644 18190000000 18190899881 1010130816 1011030697
+54573000000 54574526994 18191000000 18191508998 1011130816 1011639814
+54576000000 54578699894 18192000000 18192899964 1012130816 1013030780
+54579000000 54581700152 18193000000 18193900050 1013130816 1014030866
+54582000000 54584700257 18194000000 18194900085 1014130816 1015030901
+54585000000 54587700337 18195000000 18195900112 1015130816 1016030928
+54588000000 54590700484 18196000000 18196900161 1016130816 1017030977
+54591000000 54593700738 18197000000 18197900246 1017130816 1018031062
+54594000000 54596700828 18198000000 18198900276 1018130816 1019031092
+54597000000 54599701073 18199000000 18199900357 1019130816 1020031173
+54600000000 54602701151 18200000000 18200900383 1020130816 1021031199
+54603000000 54605701328 18201000000 18201900442 1021130816 1022031258
+54606000000 54608701474 18202000000 18202900491 1022130816 1023031307
+54609000000 54611701618 18203000000 18203900539 1023130816 1024031355
+54612000000 54613324272 18204000000 18204441424 1024130816 1024572240
+54615000000 54617701933 18205000000 18205900644 1025130816 1026031460
+54618000000 54620702093 18206000000 18206900697 1026130816 1027031513
+54621000000 54623702230 18207000000 18207900743 1027130816 1028031559
+54624000000 54626702388 18208000000 18208900796 1028130816 1029031612
+54627000000 54629702546 18209000000 18209900848 1029130816 1030031664
+54630000000 54632702660 18210000000 18210900886 1030130816 1031031702
+54633000000 54635702821 18211000000 18211900940 1031130816 1032031756
+54636000000 54638702948 18212000000 18212900982 1032130816 1033031798
+54639000000 54641703057 18213000000 18213901019 1033130816 1034031835
+54642000000 54644703199 18214000000 18214901066 1034130816 1035031882
+54645000000 54647703433 18215000000 18215901144 1035130816 1036031960
+54648000000 54650703346 18216000000 18216901115 1036130816 1037031931
+54651000000 54653703467 18217000000 18217901155 1037130816 1038031971
+54654000000 54656703575 18218000000 18218901191 1038130816 1039032007
+54657000000 54659703810 18219000000 18219901270 1039130816 1040032086
+54660000000 54662703989 18220000000 18220901329 1040130816 1041032145
+54663000000 54665617629 18221000000 18221872543 1041130816 1042003359
+54666000000 54668704258 18222000000 18222901419 1042130816 1043032235
+54669000000 54671704431 18223000000 18223901477 1043130816 1044032293
+54672000000 54674704547 18224000000 18224901515 1044130816 1045032331
+54675000000 54677704720 18225000000 18225901573 1045130816 1046032389
+54678000000 54680704892 18226000000 18226901630 1046130816 1047032446
+54681000000 54683704948 18227000000 18227901649 1047130816 1048032465
+54684000000 54686705094 18228000000 18228901698 1048130816 1049032514
+54687000000 54689705290 18229000000 18229901763 1049130816 1050032579
+54690000000 54692705319 18230000000 18230901773 1050130816 1051032589
+54693000000 54695705625 18231000000 18231901875 1051130816 1052032691
+54696000000 54698705797 18232000000 18232901932 1052130816 1053032748
+54699000000 54701705930 18233000000 18233901976 1053130816 1054032792
+54702000000 54704706047 18234000000 18234902015 1054130816 1055032831
+54705000000 54707706232 18235000000 18235902077 1055130816 1056032893
+54708000000 54710706338 18236000000 18236902112 1056130816 1057032928
+54711000000 54713706519 18237000000 18237902173 1057130816 1058032989
+54714000000 54716706731 18238000000 18238902243 1058130816 1059033059
+54717000000 54719706838 18239000000 18239902279 1059130816 1060033095
+54720000000 54722707004 18240000000 18240902334 1060130816 1061033150
+54723000000 54725305749 18241000000 18241768583 1061130816 1061899399
+54726000000 54728707275 18242000000 18242902425 1062130816 1063033241
+54729000000 54731707387 18243000000 18243902462 1063130816 1064033278
+54732000000 54734707596 18244000000 18244902532 1064130816 1065033348
+54735000000 54737707675 18245000000 18245902558 1065130816 1066033374
+54738000000 54740707900 18246000000 18246902633 1066130816 1067033449
+54741000000 54743708027 18247000000 18247902675 1067130816 1068033491
+54744000000 54746708116 18248000000 18248902705 1068130816 1069033521
+54747000000 54749708222 18249000000 18249902740 1069130816 1070033556
+54750000000 54752708433 18250000000 18250902811 1070130816 1071033627
+54753000000 54755708642 18251000000 18251902880 1071130816 1072033696
+54756000000 54758708787 18252000000 18252902929 1072130816 1073033745
+54759000000 54761708913 18253000000 18253902971 1073130816 1074033787
+54762000000 54764709079 18254000000 18254903026 1074130816 1075033842
+54765000000 54767709159 18255000000 18255903053 1075130816 1076033869
+54768000000 54770709394 18256000000 18256903131 1076130816 1077033947
+54771000000 54773709553 18257000000 18257903184 1077130816 1078034000
+54774000000 54776709674 18258000000 18258903224 1078130816 1079034040
+54777000000 54779709834 18259000000 18259903278 1079130816 1080034094
+54780000000 54782709917 18260000000 18260903305 1080130816 1081034121
+54783000000 54785710163 18261000000 18261903387 1081130816 1082034203
+54786000000 54788710286 18262000000 18262903428 1082130816 1083034244
+54789000000 54791710422 18263000000 18263903474 1083130816 1084034290
+54792000000 54794710597 18264000000 18264903532 1084130816 1085034348
+54795000000 54797710719 18265000000 18265903573 1085130816 1086034389
+54798000000 54800710869 18266000000 18266903623 1086130816 1087034439
+54801000000 54803711017 18267000000 18267903672 1087130816 1088034488
+54804000000 54805884711 18268000000 18268628237 1088130816 1088759053
+54807000000 54809711337 18269000000 18269903779 1089130816 1090034595
+54810000000 54812711469 18270000000 18270903823 1090130816 1091034639
+54813000000 54815711643 18271000000 18271903881 1091130816 1092034697
+54816000000 54818711762 18272000000 18272903920 1092130816 1093034736
+54819000000 54821711886 18273000000 18273903962 1093130816 1094034778
+54822000000 54824712105 18274000000 18274904035 1094130816 1095034851
+54825000000 54827712241 18275000000 18275904080 1095130816 1096034896
+54828000000 54830712392 18276000000 18276904130 1096130816 1097034946
+54831000000 54833712542 18277000000 18277904180 1097130816 1098034996
+54834000000 54836712657 18278000000 18278904219 1098130816 1099035035
+54837000000 54839712754 18279000000 18279904251 1099130816 1100035067
+54840000000 54842712962 18280000000 18280904320 1100130816 1101035136
+54843000000 54845713117 18281000000 18281904372 1101130816 1102035188
+54846000000 54848713276 18282000000 18282904425 1102130816 1103035241
+54849000000 54851713450 18283000000 18283904483 1103130816 1104035299
+54852000000 54854713550 18284000000 18284904516 1104130816 1105035332
+54855000000 54857713728 18285000000 18285904576 1105130816 1106035392
+54858000000 54860713877 18286000000 18286904625 1106130816 1107035441
+54861000000 54863714005 18287000000 18287904668 1107130816 1108035484
+54864000000 54866714174 18288000000 18288904724 1108130816 1109035540
+54867000000 54869714294 18289000000 18289904764 1109130816 1110035580
+54870000000 54871541644 18290000000 18290513881 1110130816 1110644697
+54873000000 54875714544 18291000000 18291904848 1111130816 1112035664
+54876000000 54878714802 18292000000 18292904934 1112130816 1113035750
+54879000000 54881714907 18293000000 18293904969 1113130816 1114035785
+54882000000 54884714987 18294000000 18294904995 1114130816 1115035811
+54885000000 54887715134 18295000000 18295905044 1115130816 1116035860
+54888000000 54890715388 18296000000 18296905129 1116130816 1117035945
+54891000000 54893715478 18297000000 18297905159 1117130816 1118035975
+54894000000 54896715723 18298000000 18298905241 1118130816 1119036057
+54897000000 54899715801 18299000000 18299905267 1119130816 1120036083
+54900000000 54902715978 18300000000 18300905326 1120130816 1121036142
+54903000000 54905716124 18301000000 18301905374 1121130816 1122036190
+54906000000 54908716268 18302000000 18302905422 1122130816 1123036238
+54909000000 54910338922 18303000000 18303446307 1123130816 1123577123
+54912000000 54914716583 18304000000 18304905527 1124130816 1125036343
+54915000000 54917716743 18305000000 18305905581 1125130816 1126036397
+54918000000 54920716880 18306000000 18306905626 1126130816 1127036442
+54921000000 54923717038 18307000000 18307905679 1127130816 1128036495
+54924000000 54926717196 18308000000 18308905732 1128130816 1129036548
+54927000000 54929717310 18309000000 18309905770 1129130816 1130036586
+54930000000 54932717471 18310000000 18310905823 1130130816 1131036639
+54933000000 54935717598 18311000000 18311905866 1131130816 1132036682
+54936000000 54938717707 18312000000 18312905902 1132130816 1133036718
+54939000000 54941717849 18313000000 18313905949 1133130816 1134036765
+54942000000 54944718083 18314000000 18314906027 1134130816 1135036843
+54945000000 54947717996 18315000000 18315905998 1135130816 1136036814
+54948000000 54950718117 18316000000 18316906039 1136130816 1137036855
+54951000000 54953718225 18317000000 18317906075 1137130816 1138036891
+54954000000 54956718460 18318000000 18318906153 1138130816 1139036969
+54957000000 54959718639 18319000000 18319906213 1139130816 1140037029
+54960000000 54962632279 18320000000 18320877426 1140130816 1141008242
+54963000000 54965718908 18321000000 18321906302 1141130816 1142037118
+54966000000 54968719081 18322000000 18322906360 1142130816 1143037176
+54969000000 54971719197 18323000000 18323906399 1143130816 1144037215
+54972000000 54974719370 18324000000 18324906456 1144130816 1145037272
+54975000000 54977719542 18325000000 18325906514 1145130816 1146037330
+54978000000 54980719598 18326000000 18326906532 1146130816 1147037348
+54981000000 54983719744 18327000000 18327906581 1147130816 1148037397
+54984000000 54986719940 18328000000 18328906646 1148130816 1149037462
+54987000000 54989719969 18329000000 18329906656 1149130816 1150037472
+54990000000 54992720275 18330000000 18330906758 1150130816 1151037574
+54993000000 54995720447 18331000000 18331906815 1151130816 1152037631
+54996000000 54998720580 18332000000 18332906860 1152130816 1153037676
+54999000000 55001720697 18333000000 18333906899 1153130816 1154037715
+55002000000 55004720882 18334000000 18334906960 1154130816 1155037776
+55005000000 55007720988 18335000000 18335906996 1155130816 1156037812
+55008000000 55010721169 18336000000 18336907056 1156130816 1157037872
+55011000000 55013721381 18337000000 18337907127 1157130816 1158037943
+55014000000 55016721488 18338000000 18338907162 1158130816 1159037978
+55017000000 55019721654 18339000000 18339907218 1159130816 1160038034
+55020000000 55022320399 18340000000 18340773466 1160130816 1160904282
+55023000000 55025721925 18341000000 18341907308 1161130816 1162038124
+55026000000 55028722037 18342000000 18342907345 1162130816 1163038161
+55029000000 55031722246 18343000000 18343907415 1163130816 1164038231
+55032000000 55034722325 18344000000 18344907441 1164130816 1165038257
+55035000000 55037722550 18345000000 18345907516 1165130816 1166038332
+55038000000 55040722677 18346000000 18346907559 1166130816 1167038375
+55041000000 55043722766 18347000000 18347907588 1167130816 1168038404
+55044000000 55046722872 18348000000 18348907624 1168130816 1169038440
+55047000000 55049723083 18349000000 18349907694 1169130816 1170038510
+55050000000 55052723292 18350000000 18350907764 1170130816 1171038580
+55053000000 55055723437 18351000000 18351907812 1171130816 1172038628
+55056000000 55058723563 18352000000 18352907854 1172130816 1173038670
+55059000000 55061723729 18353000000 18353907909 1173130816 1174038725
+55062000000 55064723809 18354000000 18354907936 1174130816 1175038752
+55065000000 55067724044 18355000000 18355908014 1175130816 1176038830
+55068000000 55070724203 18356000000 18356908067 1176130816 1177038883
+55071000000 55073724324 18357000000 18357908108 1177130816 1178038924
+55074000000 55076724484 18358000000 18358908161 1178130816 1179038977
+55077000000 55079724567 18359000000 18359908189 1179130816 1180039005
+55080000000 55082724813 18360000000 18360908271 1180130816 1181039087
+55083000000 55085724936 18361000000 18361908312 1181130816 1182039128
+55086000000 55088725072 18362000000 18362908357 1182130816 1183039173
+55089000000 55091725247 18363000000 18363908415 1183130816 1184039231
+55092000000 55094725369 18364000000 18364908456 1184130816 1185039272
+55095000000 55097725519 18365000000 18365908506 1185130816 1186039322
+55098000000 55100725667 18366000000 18366908555 1186130816 1187039371
+55101000000 55102899361 18367000000 18367633120 1187130816 1187763936
+55104000000 55106725987 18368000000 18368908662 1188130816 1189039478
+55107000000 55109726119 18369000000 18369908706 1189130816 1190039522
+55110000000 55112726293 18370000000 18370908764 1190130816 1191039580
+55113000000 55115726412 18371000000 18371908804 1191130816 1192039620
+55116000000 55118726536 18372000000 18372908845 1192130816 1193039661
+55119000000 55121726755 18373000000 18373908918 1193130816 1194039734
+55122000000 55124726891 18374000000 18374908963 1194130816 1195039779
+55125000000 55127727042 18375000000 18375909014 1195130816 1196039830
+55128000000 55130727192 18376000000 18376909064 1196130816 1197039880
+55131000000 55133727307 18377000000 18377909102 1197130816 1198039918
+55134000000 55136727404 18378000000 18378909134 1198130816 1199039950
+55137000000 55139727612 18379000000 18379909204 1199130816 1200040020
+55140000000 55142727767 18380000000 18380909255 1200130816 1201040071
+55143000000 55145727926 18381000000 18381909308 1201130816 1202040124
+55146000000 55148728100 18382000000 18382909366 1202130816 1203040182
+55149000000 55151728200 18383000000 18383909400 1203130816 1204040216
+55152000000 55154728378 18384000000 18384909459 1204130816 1205040275
+55155000000 55157728527 18385000000 18385909509 1205130816 1206040325
+55158000000 55160728655 18386000000 18386909551 1206130816 1207040367
+55161000000 55163728824 18387000000 18387909608 1207130816 1208040424
+55164000000 55166728944 18388000000 18388909648 1208130816 1209040464
+55167000000 55168556294 18389000000 18389518764 1209130816 1209649580
+55170000000 55172729194 18390000000 18390909731 1210130816 1211040547
+55173000000 55175729452 18391000000 18391909817 1211130816 1212040633
+55176000000 55178729557 18392000000 18392909852 1212130816 1213040668
+55179000000 55181729637 18393000000 18393909879 1213130816 1214040695
+55182000000 55184729784 18394000000 18394909928 1214130816 1215040744
+55185000000 55187730038 18395000000 18395910012 1215130816 1216040828
+55188000000 55190730128 18396000000 18396910042 1216130816 1217040858
+55191000000 55193730373 18397000000 18397910124 1217130816 1218040940
+55194000000 55196730451 18398000000 18398910150 1218130816 1219040966
+55197000000 55199730628 18399000000 18399910209 1219130816 1220041025
+55200000000 55202730774 18400000000 18400910258 1220130816 1221041074
+55203000000 55205730918 18401000000 18401910306 1221130816 1222041122
+55206000000 55207353572 18402000000 18402451190 1222130816 1222582006
+55209000000 55211731233 18403000000 18403910411 1223130816 1224041227
+55212000000 55214731393 18404000000 18404910464 1224130816 1225041280
+55215000000 55217731530 18405000000 18405910510 1225130816 1226041326
+55218000000 55220731688 18406000000 18406910562 1226130816 1227041378
+55221000000 55223731846 18407000000 18407910615 1227130816 1228041431
+55224000000 55226731960 18408000000 18408910653 1228130816 1229041469
+55227000000 55229732121 18409000000 18409910707 1229130816 1230041523
+55230000000 55232732248 18410000000 18410910749 1230130816 1231041565
+55233000000 55235732357 18411000000 18411910785 1231130816 1232041601
+55236000000 55238732499 18412000000 18412910833 1232130816 1233041649
+55239000000 55241732733 18413000000 18413910911 1233130816 1234041727
+55242000000 55244732646 18414000000 18414910882 1234130816 1235041698
+55245000000 55247732767 18415000000 18415910922 1235130816 1236041738
+55248000000 55250732875 18416000000 18416910958 1236130816 1237041774
+55251000000 55253733110 18417000000 18417911036 1237130816 1238041852
+55254000000 55256733289 18418000000 18418911096 1238130816 1239041912
+55257000000 55259646929 18419000000 18419882309 1239130816 1240013125
+55260000000 55262733558 18420000000 18420911186 1240130816 1241042002
+55263000000 55265733731 18421000000 18421911243 1241130816 1242042059
+55266000000 55268733847 18422000000 18422911282 1242130816 1243042098
+55269000000 55271734020 18423000000 18423911340 1243130816 1244042156
+55272000000 55274734192 18424000000 18424911397 1244130816 1245042213
+55275000000 55277734248 18425000000 18425911416 1245130816 1246042232
+55278000000 55280734394 18426000000 18426911464 1246130816 1247042280
+55281000000 55283734590 18427000000 18427911530 1247130816 1248042346
+55284000000 55286734619 18428000000 18428911539 1248130816 1249042355
+55287000000 55289734925 18429000000 18429911641 1249130816 1250042457
+55290000000 55292735097 18430000000 18430911699 1250130816 1251042515
+55293000000 55295735230 18431000000 18431911743 1251130816 1252042559
+55296000000 55298735347 18432000000 18432911782 1252130816 1253042598
+55299000000 55301735532 18433000000 18433911844 1253130816 1254042660
+55302000000 55304735638 18434000000 18434911879 1254130816 1255042695
+55305000000 55307735819 18435000000 18435911939 1255130816 1256042755
+55308000000 55310736031 18436000000 18436912010 1256130816 1257042826
+55311000000 55313736138 18437000000 18437912046 1257130816 1258042862
+55314000000 55316736304 18438000000 18438912101 1258130816 1259042917
+55317000000 55319335049 18439000000 18439778349 1259130816 1259909165
+55320000000 55322736575 18440000000 18440912191 1260130816 1261043007
+55323000000 55325736687 18441000000 18441912229 1261130816 1262043045
+55326000000 55328736896 18442000000 18442912298 1262130816 1263043114
+55329000000 55331736975 18443000000 18443912325 1263130816 1264043141
+55332000000 55334737200 18444000000 18444912400 1264130816 1265043216
+55335000000 55337737327 18445000000 18445912442 1265130816 1266043258
+55338000000 55340737416 18446000000 18446912472 1266130816 1267043288
+55341000000 55343737522 18447000000 18447912507 1267130816 1268043323
+55344000000 55346737733 18448000000 18448912577 1268130816 1269043393
+55347000000 55349737942 18449000000 18449912647 1269130816 1270043463
+55350000000 55352738087 18450000000 18450912695 1270130816 1271043511
+55353000000 55355738213 18451000000 18451912737 1271130816 1272043553
+55356000000 55358738379 18452000000 18452912793 1272130816 1273043609
+55359000000 55361738459 18453000000 18453912819 1273130816 1274043635
+55362000000 55364738694 18454000000 18454912898 1274130816 1275043714
+55365000000 55367738853 18455000000 18455912951 1275130816 1276043767
+55368000000 55370738974 18456000000 18456912991 1276130816 1277043807
+55371000000 55373739134 18457000000 18457913044 1277130816 1278043860
+55374000000 55376739217 18458000000 18458913072 1278130816 1279043888
+55377000000 55379739463 18459000000 18459913154 1279130816 1280043970
+55380000000 55382739586 18460000000 18460913195 1280130816 1281044011
+55383000000 55385739722 18461000000 18461913240 1281130816 1282044056
+55386000000 55388739897 18462000000 18462913299 1282130816 1283044115
+55389000000 55391740019 18463000000 18463913339 1283130816 1284044155
+55392000000 55394740169 18464000000 18464913389 1284130816 1285044205
+55395000000 55397740317 18465000000 18465913439 1285130816 1286044255
+55398000000 55399914011 18466000000 18466638003 1286130816 1286768819
+55401000000 55403740637 18467000000 18467913545 1287130816 1288044361
+55404000000 55406740769 18468000000 18468913589 1288130816 1289044405
+55407000000 55409740943 18469000000 18469913647 1289130816 1290044463
+55410000000 55412741062 18470000000 18470913687 1290130816 1291044503
+55413000000 55415741186 18471000000 18471913728 1291130816 1292044544
+55416000000 55418741405 18472000000 18472913801 1292130816 1293044617
+55419000000 55421741541 18473000000 18473913847 1293130816 1294044663
+55422000000 55424741692 18474000000 18474913897 1294130816 1295044713
+55425000000 55427741842 18475000000 18475913947 1295130816 1296044763
+55428000000 55430741957 18476000000 18476913985 1296130816 1297044801
+55431000000 55433742054 18477000000 18477914018 1297130816 1298044834
+55434000000 55436742262 18478000000 18478914087 1298130816 1299044903
+55437000000 55439742417 18479000000 18479914139 1299130816 1300044955
+55440000000 55442742576 18480000000 18480914192 1300130816 1301045008
+55443000000 55445742750 18481000000 18481914250 1301130816 1302045066
+55446000000 55448742850 18482000000 18482914283 1302130816 1303045099
+55449000000 55451743028 18483000000 18483914342 1303130816 1304045158
+55452000000 55454743177 18484000000 18484914392 1304130816 1305045208
+55455000000 55457743305 18485000000 18485914435 1305130816 1306045251
+55458000000 55460743474 18486000000 18486914491 1306130816 1307045307
+55461000000 55463743594 18487000000 18487914531 1307130816 1308045347
+55464000000 55465570944 18488000000 18488523648 1308130816 1308654464
+55467000000 55469743844 18489000000 18489914614 1309130816 1310045430
+55470000000 55472744102 18490000000 18490914700 1310130816 1311045516
+55473000000 55475744207 18491000000 18491914735 1311130816 1312045551
+55476000000 55478744287 18492000000 18492914762 1312130816 1313045578
+55479000000 55481744434 18493000000 18493914811 1313130816 1314045627
+55482000000 55484744688 18494000000 18494914896 1314130816 1315045712
+55485000000 55487744778 18495000000 18495914926 1315130816 1316045742
+55488000000 55490745023 18496000000 18496915007 1316130816 1317045823
+55491000000 55493745101 18497000000 18497915033 1317130816 1318045849
+55494000000 55496745278 18498000000 18498915092 1318130816 1319045908
+55497000000 55499745424 18499000000 18499915141 1319130816 1320045957
+55500000000 55502745568 18500000000 18500915189 1320130816 1321046005
+55503000000 55504368222 18501000000 18501456074 1321130816 1321586890
+55506000000 55508745883 18502000000 18502915294 1322130816 1323046110
+55509000000 55511746043 18503000000 18503915347 1323130816 1324046163
+55512000000 55514746180 18504000000 18504915393 1324130816 1325046209
+55515000000 55517746338 18505000000 18505915446 1325130816 1326046262
+55518000000 55520746496 18506000000 18506915498 1326130816 1327046314
+55521000000 55523746610 18507000000 18507915536 1327130816 1328046352
+55524000000 55526746771 18508000000 18508915590 1328130816 1329046406
+55527000000 55529746898 18509000000 18509915632 1329130816 1330046448
+55530000000 55532747007 18510000000 18510915669 1330130816 1331046485
+55533000000 55535747149 18511000000 18511915716 1331130816 1332046532
+55536000000 55538747383 18512000000 18512915794 1332130816 1333046610
+55539000000 55541747296 18513000000 18513915765 1333130816 1334046581
+55542000000 55544747417 18514000000 18514915805 1334130816 1335046621
+55545000000 55547747525 18515000000 18515915841 1335130816 1336046657
+55548000000 55550747760 18516000000 18516915920 1336130816 1337046736
+55551000000 55553747939 18517000000 18517915979 1337130816 1338046795
+55554000000 55556661579 18518000000 18518887193 1338130816 1339018009
+55557000000 55559748208 18519000000 18519916069 1339130816 1340046885
+55560000000 55562748381 18520000000 18520916127 1340130816 1341046943
+55563000000 55565748497 18521000000 18521916165 1341130816 1342046981
+55566000000 55568748670 18522000000 18522916223 1342130816 1343047039
+55569000000 55571748842 18523000000 18523916280 1343130816 1344047096
+55572000000 55574748898 18524000000 18524916299 1344130816 1345047115
+55575000000 55577749044 18525000000 18525916348 1345130816 1346047164
+55578000000 55580749240 18526000000 18526916413 1346130816 1347047229
+55581000000 55583749269 18527000000 18527916423 1347130816 1348047239
+55584000000 55586749575 18528000000 18528916525 1348130816 1349047341
+55587000000 55589749747 18529000000 18529916582 1349130816 1350047398
+55590000000 55592749880 18530000000 18530916626 1350130816 1351047442
+55593000000 55595749997 18531000000 18531916665 1351130816 1352047481
+55596000000 55598750182 18532000000 18532916727 1352130816 1353047543
+55599000000 55601750288 18533000000 18533916762 1353130816 1354047578
+55602000000 55604750469 18534000000 18534916823 1354130816 1355047639
+55605000000 55607750681 18535000000 18535916893 1355130816 1356047709
+55608000000 55610750788 18536000000 18536916929 1356130816 1357047745
+55611000000 55613750954 18537000000 18537916984 1357130816 1358047800
+55614000000 55616349699 18538000000 18538783233 1358130816 1358914049
+55617000000 55619751225 18539000000 18539917075 1359130816 1360047891
+55620000000 55622751337 18540000000 18540917112 1360130816 1361047928
+55623000000 55625751546 18541000000 18541917182 1361130816 1362047998
+55626000000 55628751625 18542000000 18542917208 1362130816 1363048024
+55629000000 55631751850 18543000000 18543917283 1363130816 1364048099
+55632000000 55634751977 18544000000 18544917325 1364130816 1365048141
+55635000000 55637752066 18545000000 18545917355 1365130816 1366048171
+55638000000 55640752172 18546000000 18546917390 1366130816 1367048206
+55641000000 55643752383 18547000000 18547917461 1367130816 1368048277
+55644000000 55646752592 18548000000 18548917530 1368130816 1369048346
+55647000000 55649752737 18549000000 18549917579 1369130816 1370048395
+55650000000 55652752863 18550000000 18550917621 1370130816 1371048437
+55653000000 55655753029 18551000000 18551917676 1371130816 1372048492
+55656000000 55658753109 18552000000 18552917703 1372130816 1373048519
+55659000000 55661753344 18553000000 18553917781 1373130816 1374048597
+55662000000 55664753503 18554000000 18554917834 1374130816 1375048650
+55665000000 55667753624 18555000000 18555917874 1375130816 1376048690
+55668000000 55670753784 18556000000 18556917928 1376130816 1377048744
+55671000000 55673753867 18557000000 18557917955 1377130816 1378048771
+55674000000 55676754113 18558000000 18558918037 1378130816 1379048853
+55677000000 55679754236 18559000000 18559918078 1379130816 1380048894
+55680000000 55682754372 18560000000 18560918124 1380130816 1381048940
+55683000000 55685754547 18561000000 18561918182 1381130816 1382048998
+55686000000 55688754669 18562000000 18562918223 1382130816 1383049039
+55689000000 55691754819 18563000000 18563918273 1383130816 1384049089
+55692000000 55694754967 18564000000 18564918322 1384130816 1385049138
+55695000000 55696928661 18565000000 18565642887 1385130816 1385773703
+55698000000 55700755287 18566000000 18566918429 1386130816 1387049245
+55701000000 55703755419 18567000000 18567918473 1387130816 1388049289
+55704000000 55706755593 18568000000 18568918531 1388130816 1389049347
+55707000000 55709755712 18569000000 18569918570 1389130816 1390049386
+55710000000 55712755836 18570000000 18570918612 1390130816 1391049428
+55713000000 55715756055 18571000000 18571918685 1391130816 1392049501
+55716000000 55718756191 18572000000 18572918730 1392130816 1393049546
+55719000000 55721756342 18573000000 18573918780 1393130816 1394049596
+55722000000 55724756492 18574000000 18574918830 1394130816 1395049646
+55725000000 55727756607 18575000000 18575918869 1395130816 1396049685
+55728000000 55730756704 18576000000 18576918901 1396130816 1397049717
+55731000000 55733756912 18577000000 18577918970 1397130816 1398049786
+55734000000 55736757067 18578000000 18578919022 1398130816 1399049838
+55737000000 55739757226 18579000000 18579919075 1399130816 1400049891
+55740000000 55742757400 18580000000 18580919133 1400130816 1401049949
+55743000000 55745757500 18581000000 18581919166 1401130816 1402049982
+55746000000 55748757678 18582000000 18582919226 1402130816 1403050042
+55749000000 55751757827 18583000000 18583919275 1403130816 1404050091
+55752000000 55754757955 18584000000 18584919318 1404130816 1405050134
+55755000000 55757758124 18585000000 18585919374 1405130816 1406050190
+55758000000 55760758244 18586000000 18586919414 1406130816 1407050230
+55761000000 55762585594 18587000000 18587528531 1407130816 1407659347
+55764000000 55766758494 18588000000 18588919498 1408130816 1409050314
+55767000000 55769758752 18589000000 18589919584 1409130816 1410050400
+55770000000 55772758857 18590000000 18590919619 1410130816 1411050435
+55773000000 55775758937 18591000000 18591919645 1411130816 1412050461
+55776000000 55778759084 18592000000 18592919694 1412130816 1413050510
+55779000000 55781759338 18593000000 18593919779 1413130816 1414050595
+55782000000 55784759428 18594000000 18594919809 1414130816 1415050625
+55785000000 55787759673 18595000000 18595919891 1415130816 1416050707
+55788000000 55790759751 18596000000 18596919917 1416130816 1417050733
+55791000000 55793759928 18597000000 18597919976 1417130816 1418050792
+55794000000 55796760074 18598000000 18598920024 1418130816 1419050840
+55797000000 55799760218 18599000000 18599920072 1419130816 1420050888
+55800000000 55801382872 18600000000 18600460957 1420130816 1420591773
+55803000000 55805760533 18601000000 18601920177 1421130816 1422050993
+55806000000 55808760693 18602000000 18602920231 1422130816 1423051047
+55809000000 55811760830 18603000000 18603920276 1423130816 1424051092
+55812000000 55814760988 18604000000 18604920329 1424130816 1425051145
+55815000000 55817761146 18605000000 18605920382 1425130816 1426051198
+55818000000 55820761260 18606000000 18606920420 1426130816 1427051236
+55821000000 55823761421 18607000000 18607920473 1427130816 1428051289
+55824000000 55826761548 18608000000 18608920516 1428130816 1429051332
+55827000000 55829761657 18609000000 18609920552 1429130816 1430051368
+55830000000 55832761799 18610000000 18610920599 1430130816 1431051415
+55833000000 55835762033 18611000000 18611920677 1431130816 1432051493
+55836000000 55838761946 18612000000 18612920648 1432130816 1433051464
+55839000000 55841762067 18613000000 18613920689 1433130816 1434051505
+55842000000 55844762175 18614000000 18614920725 1434130816 1435051541
+55845000000 55847762410 18615000000 18615920803 1435130816 1436051619
+55848000000 55850762589 18616000000 18616920863 1436130816 1437051679
+55851000000 55853676229 18617000000 18617892076 1437130816 1438022892
+55854000000 55856762858 18618000000 18618920952 1438130816 1439051768
+55857000000 55859763031 18619000000 18619921010 1439130816 1440051826
+55860000000 55862763147 18620000000 18620921049 1440130816 1441051865
+55863000000 55865763320 18621000000 18621921106 1441130816 1442051922
+55866000000 55868763492 18622000000 18622921164 1442130816 1443051980
+55869000000 55871763548 18623000000 18623921182 1443130816 1444051998
+55872000000 55874763694 18624000000 18624921231 1444130816 1445052047
+55875000000 55877763890 18625000000 18625921296 1445130816 1446052112
+55878000000 55880763919 18626000000 18626921306 1446130816 1447052122
+55881000000 55883764225 18627000000 18627921408 1447130816 1448052224
+55884000000 55886764397 18628000000 18628921465 1448130816 1449052281
+55887000000 55889764530 18629000000 18629921510 1449130816 1450052326
+55890000000 55892764647 18630000000 18630921549 1450130816 1451052365
+55893000000 55895764832 18631000000 18631921610 1451130816 1452052426
+55896000000 55898764938 18632000000 18632921646 1452130816 1453052462
+55899000000 55901765119 18633000000 18633921706 1453130816 1454052522
+55902000000 55904765331 18634000000 18634921777 1454130816 1455052593
+55905000000 55907765438 18635000000 18635921812 1455130816 1456052628
+55908000000 55910765604 18636000000 18636921868 1456130816 1457052684
+55911000000 55913364349 18637000000 18637788116 1457130816 1457918932
+55914000000 55916765875 18638000000 18638921958 1458130816 1459052774
+55917000000 55919765987 18639000000 18639921995 1459130816 1460052811
+55920000000 55922766196 18640000000 18640922065 1460130816 1461052881
+55923000000 55925766275 18641000000 18641922091 1461130816 1462052907
+55926000000 55928766500 18642000000 18642922166 1462130816 1463052982
+55929000000 55931766627 18643000000 18643922209 1463130816 1464053025
+55932000000 55934766716 18644000000 18644922238 1464130816 1465053054
+55935000000 55937766822 18645000000 18645922274 1465130816 1466053090
+55938000000 55940767033 18646000000 18646922344 1466130816 1467053160
+55941000000 55943767242 18647000000 18647922414 1467130816 1468053230
+55944000000 55946767387 18648000000 18648922462 1468130816 1469053278
+55947000000 55949767513 18649000000 18649922504 1469130816 1470053320
+55950000000 55952767679 18650000000 18650922559 1470130816 1471053375
+55953000000 55955767759 18651000000 18651922586 1471130816 1472053402
+55956000000 55958767994 18652000000 18652922664 1472130816 1473053480
+55959000000 55961768153 18653000000 18653922717 1473130816 1474053533
+55962000000 55964768274 18654000000 18654922758 1474130816 1475053574
+55965000000 55967768434 18655000000 18655922811 1475130816 1476053627
+55968000000 55970768517 18656000000 18656922839 1476130816 1477053655
+55971000000 55973768763 18657000000 18657922921 1477130816 1478053737
+55974000000 55976768886 18658000000 18658922962 1478130816 1479053778
+55977000000 55979769022 18659000000 18659923007 1479130816 1480053823
+55980000000 55982769197 18660000000 18660923065 1480130816 1481053881
+55983000000 55985769319 18661000000 18661923106 1481130816 1482053922
+55986000000 55988769469 18662000000 18662923156 1482130816 1483053972
+55989000000 55991769617 18663000000 18663923205 1483130816 1484054021
+55992000000 55993943311 18664000000 18664647770 1484130816 1484778586
+55995000000 55997769937 18665000000 18665923312 1485130816 1486054128
+55998000000 56000770069 18666000000 18666923356 1486130816 1487054172
+56001000000 56003770243 18667000000 18667923414 1487130816 1488054230
+56004000000 56006770362 18668000000 18668923454 1488130816 1489054270
+56007000000 56009770486 18669000000 18669923495 1489130816 1490054311
+56010000000 56012770705 18670000000 18670923568 1490130816 1491054384
+56013000000 56015770841 18671000000 18671923613 1491130816 1492054429
+56016000000 56018770992 18672000000 18672923664 1492130816 1493054480
+56019000000 56021771142 18673000000 18673923714 1493130816 1494054530
+56022000000 56024771257 18674000000 18674923752 1494130816 1495054568
+56025000000 56027771354 18675000000 18675923784 1495130816 1496054600
+56028000000 56030771562 18676000000 18676923854 1496130816 1497054670
+56031000000 56033771717 18677000000 18677923905 1497130816 1498054721
+56034000000 56036771876 18678000000 18678923958 1498130816 1499054774
+56037000000 56039772050 18679000000 18679924016 1499130816 1500054832
+56040000000 56042772150 18680000000 18680924050 1500130816 1501054866
+56043000000 56045772328 18681000000 18681924109 1501130816 1502054925
+56046000000 56048772477 18682000000 18682924159 1502130816 1503054975
+56049000000 56051772605 18683000000 18683924201 1503130816 1504055017
+56052000000 56054772774 18684000000 18684924258 1504130816 1505055074
+56055000000 56057772894 18685000000 18685924298 1505130816 1506055114
+56058000000 56059600244 18686000000 18686533414 1506130816 1506664230
+56061000000 56063773144 18687000000 18687924381 1507130816 1508055197
+56064000000 56066773402 18688000000 18688924467 1508130816 1509055283
+56067000000 56069773507 18689000000 18689924502 1509130816 1510055318
+56070000000 56072773587 18690000000 18690924529 1510130816 1511055345
+56073000000 56075773734 18691000000 18691924578 1511130816 1512055394
+56076000000 56078773988 18692000000 18692924662 1512130816 1513055478
+56079000000 56081774078 18693000000 18693924692 1513130816 1514055508
+56082000000 56084774323 18694000000 18694924774 1514130816 1515055590
+56085000000 56087774401 18695000000 18695924800 1515130816 1516055616
+56088000000 56090774578 18696000000 18696924859 1516130816 1517055675
+56091000000 56093774724 18697000000 18697924908 1517130816 1518055724
+56094000000 56096774868 18698000000 18698924956 1518130816 1519055772
+56097000000 56098397522 18699000000 18699465840 1519130816 1519596656
+56100000000 56102775183 18700000000 18700925061 1520130816 1521055877
+56103000000 56105775343 18701000000 18701925114 1521130816 1522055930
+56106000000 56108775480 18702000000 18702925160 1522130816 1523055976
+56109000000 56111775638 18703000000 18703925212 1523130816 1524056028
+56112000000 56114775796 18704000000 18704925265 1524130816 1525056081
+56115000000 56117775910 18705000000 18705925303 1525130816 1526056119
+56118000000 56120776071 18706000000 18706925357 1526130816 1527056173
+56121000000 56123776198 18707000000 18707925399 1527130816 1528056215
+56124000000 56126776307 18708000000 18708925435 1528130816 1529056251
+56127000000 56129776449 18709000000 18709925483 1529130816 1530056299
+56130000000 56132776683 18710000000 18710925561 1530130816 1531056377
+56133000000 56135776596 18711000000 18711925532 1531130816 1532056348
+56136000000 56138776717 18712000000 18712925572 1532130816 1533056388
+56139000000 56141776825 18713000000 18713925608 1533130816 1534056424
+56142000000 56144777060 18714000000 18714925686 1534130816 1535056502
+56145000000 56147777239 18715000000 18715925746 1535130816 1536056562
+56148000000 56150690879 18716000000 18716896959 1536130816 1537027775
+56151000000 56153777508 18717000000 18717925836 1537130816 1538056652
+56154000000 56156777681 18718000000 18718925893 1538130816 1539056709
+56157000000 56159777797 18719000000 18719925932 1539130816 1540056748
+56160000000 56162777970 18720000000 18720925990 1540130816 1541056806
+56163000000 56165778142 18721000000 18721926047 1541130816 1542056863
+56166000000 56168778198 18722000000 18722926066 1542130816 1543056882
+56169000000 56171778344 18723000000 18723926114 1543130816 1544056930
+56172000000 56174778540 18724000000 18724926180 1544130816 1545056996
+56175000000 56177778569 18725000000 18725926189 1545130816 1546057005
+56178000000 56180778875 18726000000 18726926291 1546130816 1547057107
+56181000000 56183779047 18727000000 18727926349 1547130816 1548057165
+56184000000 56186779180 18728000000 18728926393 1548130816 1549057209
+56187000000 56189779297 18729000000 18729926432 1549130816 1550057248
+56190000000 56192779482 18730000000 18730926494 1550130816 1551057310
+56193000000 56195779588 18731000000 18731926529 1551130816 1552057345
+56196000000 56198779769 18732000000 18732926589 1552130816 1553057405
+56199000000 56201779981 18733000000 18733926660 1553130816 1554057476
+56202000000 56204780088 18734000000 18734926696 1554130816 1555057512
+56205000000 56207780254 18735000000 18735926751 1555130816 1556057567
+56208000000 56210378999 18736000000 18736792999 1556130816 1556923815
+56211000000 56213780525 18737000000 18737926841 1557130816 1558057657
+56214000000 56216780637 18738000000 18738926879 1558130816 1559057695
+56217000000 56219780846 18739000000 18739926948 1559130816 1560057764
+56220000000 56222780925 18740000000 18740926975 1560130816 1561057791
+56223000000 56225781150 18741000000 18741927050 1561130816 1562057866
+56226000000 56228781277 18742000000 18742927092 1562130816 1563057908
+56229000000 56231781366 18743000000 18743927122 1563130816 1564057938
+56232000000 56234781472 18744000000 18744927157 1564130816 1565057973
+56235000000 56237781683 18745000000 18745927227 1565130816 1566058043
+56238000000 56240781892 18746000000 18746927297 1566130816 1567058113
+56241000000 56243782037 18747000000 18747927345 1567130816 1568058161
+56244000000 56246782163 18748000000 18748927387 1568130816 1569058203
+56247000000 56249782329 18749000000 18749927443 1569130816 1570058259
+56250000000 56252782409 18750000000 18750927469 1570130816 1571058285
+56253000000 56255782644 18751000000 18751927548 1571130816 1572058364
+56256000000 56258782803 18752000000 18752927601 1572130816 1573058417
+56259000000 56261782924 18753000000 18753927641 1573130816 1574058457
+56262000000 56264783084 18754000000 18754927694 1574130816 1575058510
+56265000000 56267783167 18755000000 18755927722 1575130816 1576058538
+56268000000 56270783413 18756000000 18756927804 1576130816 1577058620
+56271000000 56273783536 18757000000 18757927845 1577130816 1578058661
+56274000000 56276783672 18758000000 18758927890 1578130816 1579058706
+56277000000 56279783847 18759000000 18759927949 1579130816 1580058765
+56280000000 56282783969 18760000000 18760927989 1580130816 1581058805
+56283000000 56285784119 18761000000 18761928039 1581130816 1582058855
+56286000000 56288784267 18762000000 18762928089 1582130816 1583058905
+56289000000 56290957961 18763000000 18763652653 1583130816 1583783469
+56292000000 56294784587 18764000000 18764928195 1584130816 1585059011
+56295000000 56297784719 18765000000 18765928239 1585130816 1586059055
+56298000000 56300784893 18766000000 18766928297 1586130816 1587059113
+56301000000 56303785012 18767000000 18767928337 1587130816 1588059153
+56304000000 56306785136 18768000000 18768928378 1588130816 1589059194
+56307000000 56309785355 18769000000 18769928451 1589130816 1590059267
+56310000000 56312785491 18770000000 18770928497 1590130816 1591059313
+56313000000 56315785642 18771000000 18771928547 1591130816 1592059363
+56316000000 56318785792 18772000000 18772928597 1592130816 1593059413
+56319000000 56321785907 18773000000 18773928635 1593130816 1594059451
+56322000000 56324786004 18774000000 18774928668 1594130816 1595059484
+56325000000 56327786212 18775000000 18775928737 1595130816 1596059553
+56328000000 56330786367 18776000000 18776928789 1596130816 1597059605
+56331000000 56333786526 18777000000 18777928842 1597130816 1598059658
+56334000000 56336786700 18778000000 18778928900 1598130816 1599059716
+56337000000 56339786800 18779000000 18779928933 1599130816 1600059749
+56340000000 56342786978 18780000000 18780928992 1600130816 1601059808
+56343000000 56345787127 18781000000 18781929042 1601130816 1602059858
+56346000000 56348787255 18782000000 18782929085 1602130816 1603059901
+56349000000 56351787424 18783000000 18783929141 1603130816 1604059957
+56352000000 56354787544 18784000000 18784929181 1604130816 1605059997
+56355000000 56356614894 18785000000 18785538298 1605130816 1605669114
+56358000000 56360787794 18786000000 18786929264 1606130816 1607060080
+56361000000 56363788052 18787000000 18787929350 1607130816 1608060166
+56364000000 56366788157 18788000000 18788929385 1608130816 1609060201
+56367000000 56369788237 18789000000 18789929412 1609130816 1610060228
+56370000000 56372788384 18790000000 18790929461 1610130816 1611060277
+56373000000 56375788638 18791000000 18791929546 1611130816 1612060362
+56376000000 56378788728 18792000000 18792929576 1612130816 1613060392
+56379000000 56381788973 18793000000 18793929657 1613130816 1614060473
+56382000000 56384789051 18794000000 18794929683 1614130816 1615060499
+56385000000 56387789228 18795000000 18795929742 1615130816 1616060558
+56388000000 56390789374 18796000000 18796929791 1616130816 1617060607
+56391000000 56393789518 18797000000 18797929839 1617130816 1618060655
+56394000000 56395412172 18798000000 18798470724 1618130816 1618601540
+56397000000 56399789833 18799000000 18799929944 1619130816 1620060760
+56400000000 56402789993 18800000000 18800929997 1620130816 1621060813
+56403000000 56405790130 18801000000 18801930043 1621130816 1622060859
+56406000000 56408790288 18802000000 18802930096 1622130816 1623060912
+56409000000 56411790446 18803000000 18803930148 1623130816 1624060964
+56412000000 56414790560 18804000000 18804930186 1624130816 1625061002
+56415000000 56417790721 18805000000 18805930240 1625130816 1626061056
+56418000000 56420790848 18806000000 18806930282 1626130816 1627061098
+56421000000 56423790957 18807000000 18807930319 1627130816 1628061135
+56424000000 56426791099 18808000000 18808930366 1628130816 1629061182
+56427000000 56429791333 18809000000 18809930444 1629130816 1630061260
+56430000000 56432791246 18810000000 18810930415 1630130816 1631061231
+56433000000 56435791367 18811000000 18811930455 1631130816 1632061271
+56436000000 56438791475 18812000000 18812930491 1632130816 1633061307
+56439000000 56441791710 18813000000 18813930570 1633130816 1634061386
+56442000000 56444791889 18814000000 18814930629 1634130816 1635061445
+56445000000 56447705529 18815000000 18815901843 1635130816 1636032659
+56448000000 56450792158 18816000000 18816930719 1636130816 1637061535
+56451000000 56453792331 18817000000 18817930777 1637130816 1638061593
+56454000000 56456792447 18818000000 18818930815 1638130816 1639061631
+56457000000 56459792620 18819000000 18819930873 1639130816 1640061689
+56460000000 56462792792 18820000000 18820930930 1640130816 1641061746
+56463000000 56465792848 18821000000 18821930949 1641130816 1642061765
+56466000000 56468792994 18822000000 18822930998 1642130816 1643061814
+56469000000 56471793190 18823000000 18823931063 1643130816 1644061879
+56472000000 56474793219 18824000000 18824931073 1644130816 1645061889
+56475000000 56477793525 18825000000 18825931175 1645130816 1646061991
+56478000000 56480793697 18826000000 18826931232 1646130816 1647062048
+56481000000 56483793830 18827000000 18827931276 1647130816 1648062092
+56484000000 56486793947 18828000000 18828931315 1648130816 1649062131
+56487000000 56489794132 18829000000 18829931377 1649130816 1650062193
+56490000000 56492794238 18830000000 18830931412 1650130816 1651062228
+56493000000 56495794419 18831000000 18831931473 1651130816 1652062289
+56496000000 56498794631 18832000000 18832931543 1652130816 1653062359
+56499000000 56501794738 18833000000 18833931579 1653130816 1654062395
+56502000000 56504794904 18834000000 18834931634 1654130816 1655062450
+56505000000 56507393649 18835000000 18835797883 1655130816 1655928699
+56508000000 56510795175 18836000000 18836931725 1656130816 1657062541
+56511000000 56513795287 18837000000 18837931762 1657130816 1658062578
+56514000000 56516795496 18838000000 18838931832 1658130816 1659062648
+56517000000 56519795575 18839000000 18839931858 1659130816 1660062674
+56520000000 56522795800 18840000000 18840931933 1660130816 1661062749
+56523000000 56525795927 18841000000 18841931975 1661130816 1662062791
+56526000000 56528796016 18842000000 18842932005 1662130816 1663062821
+56529000000 56531796122 18843000000 18843932040 1663130816 1664062856
+56532000000 56534796333 18844000000 18844932111 1664130816 1665062927
+56535000000 56537796542 18845000000 18845932180 1665130816 1666062996
+56538000000 56540796687 18846000000 18846932229 1666130816 1667063045
+56541000000 56543796813 18847000000 18847932271 1667130816 1668063087
+56544000000 56546796979 18848000000 18848932326 1668130816 1669063142
+56547000000 56549797059 18849000000 18849932353 1669130816 1670063169
+56550000000 56552797294 18850000000 18850932431 1670130816 1671063247
+56553000000 56555797453 18851000000 18851932484 1671130816 1672063300
+56556000000 56558797574 18852000000 18852932524 1672130816 1673063340
+56559000000 56561797734 18853000000 18853932578 1673130816 1674063394
+56562000000 56564797817 18854000000 18854932605 1674130816 1675063421
+56565000000 56567798063 18855000000 18855932687 1675130816 1676063503
+56568000000 56570798186 18856000000 18856932728 1676130816 1677063544
+56571000000 56573798322 18857000000 18857932774 1677130816 1678063590
+56574000000 56576798497 18858000000 18858932832 1678130816 1679063648
+56577000000 56579798619 18859000000 18859932873 1679130816 1680063689
+56580000000 56582798769 18860000000 18860932923 1680130816 1681063739
+56583000000 56585798917 18861000000 18861932972 1681130816 1682063788
+56586000000 56587972611 18862000000 18862657537 1682130816 1682788353
+56589000000 56591799237 18863000000 18863933079 1683130816 1684063895
+56592000000 56594799369 18864000000 18864933123 1684130816 1685063939
+56595000000 56597799543 18865000000 18865933181 1685130816 1686063997
+56598000000 56600799662 18866000000 18866933220 1686130816 1687064036
+56601000000 56603799786 18867000000 18867933262 1687130816 1688064078
+56604000000 56606800005 18868000000 18868933335 1688130816 1689064151
+56607000000 56609800141 18869000000 18869933380 1689130816 1690064196
+56610000000 56612800292 18870000000 18870933430 1690130816 1691064246
+56613000000 56615800442 18871000000 18871933480 1691130816 1692064296
+56616000000 56618800557 18872000000 18872933519 1692130816 1693064335
+56619000000 56621800654 18873000000 18873933551 1693130816 1694064367
+56622000000 56624800862 18874000000 18874933620 1694130816 1695064436
+56625000000 56627801017 18875000000 18875933672 1695130816 1696064488
+56628000000 56630801176 18876000000 18876933725 1696130816 1697064541
+56631000000 56633801350 18877000000 18877933783 1697130816 1698064599
+56634000000 56636801450 18878000000 18878933816 1698130816 1699064632
+56637000000 56639801628 18879000000 18879933876 1699130816 1700064692
+56640000000 56642801777 18880000000 18880933925 1700130816 1701064741
+56643000000 56645801905 18881000000 18881933968 1701130816 1702064784
+56646000000 56648802074 18882000000 18882934024 1702130816 1703064840
+56649000000 56651802194 18883000000 18883934064 1703130816 1704064880
+56652000000 56653629544 18884000000 18884543181 1704130816 1704673997
+56655000000 56657802444 18885000000 18885934148 1705130816 1706064964
+56658000000 56660802702 18886000000 18886934234 1706130816 1707065050
+56661000000 56663802807 18887000000 18887934269 1707130816 1708065085
+56664000000 56666802887 18888000000 18888934295 1708130816 1709065111
+56667000000 56669803034 18889000000 18889934344 1709130816 1710065160
+56670000000 56672803288 18890000000 18890934429 1710130816 1711065245
+56673000000 56675803378 18891000000 18891934459 1711130816 1712065275
+56676000000 56678803623 18892000000 18892934541 1712130816 1713065357
+56679000000 56681803701 18893000000 18893934567 1713130816 1714065383
+56682000000 56684803878 18894000000 18894934626 1714130816 1715065442
+56685000000 56687804024 18895000000 18895934674 1715130816 1716065490
+56688000000 56690804168 18896000000 18896934722 1716130816 1717065538
+56691000000 56692426822 18897000000 18897475607 1717130816 1717606423
+56694000000 56696804483 18898000000 18898934827 1718130816 1719065643
+56697000000 56699804643 18899000000 18899934881 1719130816 1720065697
+56700000000 56702804780 18900000000 18900934926 1720130816 1721065742
+56703000000 56705804938 18901000000 18901934979 1721130816 1722065795
+56706000000 56708805096 18902000000 18902935032 1722130816 1723065848
+56709000000 56711805210 18903000000 18903935070 1723130816 1724065886
+56712000000 56714805371 18904000000 18904935123 1724130816 1725065939
+56715000000 56717805498 18905000000 18905935166 1725130816 1726065982
+56718000000 56720805607 18906000000 18906935202 1726130816 1727066018
+56721000000 56723805749 18907000000 18907935249 1727130816 1728066065
+56724000000 56726805983 18908000000 18908935327 1728130816 1729066143
+56727000000 56729805896 18909000000 18909935298 1729130816 1730066114
+56730000000 56732806017 18910000000 18910935339 1730130816 1731066155
+56733000000 56735806125 18911000000 18911935375 1731130816 1732066191
+56736000000 56738806360 18912000000 18912935453 1732130816 1733066269
+56739000000 56741806539 18913000000 18913935513 1733130816 1734066329
+56742000000 56744720179 18914000000 18914906726 1734130816 1735037542
+56745000000 56747806808 18915000000 18915935602 1735130816 1736066418
+56748000000 56750806981 18916000000 18916935660 1736130816 1737066476
+56751000000 56753807097 18917000000 18917935699 1737130816 1738066515
+56754000000 56756807270 18918000000 18918935756 1738130816 1739066572
+56757000000 56759807442 18919000000 18919935814 1739130816 1740066630
+56760000000 56762807498 18920000000 18920935832 1740130816 1741066648
+56763000000 56765807644 18921000000 18921935881 1741130816 1742066697
+56766000000 56768807840 18922000000 18922935946 1742130816 1743066762
+56769000000 56771807869 18923000000 18923935956 1743130816 1744066772
+56772000000 56774808175 18924000000 18924936058 1744130816 1745066874
+56775000000 56777808347 18925000000 18925936115 1745130816 1746066931
+56778000000 56780808480 18926000000 18926936160 1746130816 1747066976
+56781000000 56783808597 18927000000 18927936199 1747130816 1748067015
+56784000000 56786808782 18928000000 18928936260 1748130816 1749067076
+56787000000 56789808888 18929000000 18929936296 1749130816 1750067112
+56790000000 56792809069 18930000000 18930936356 1750130816 1751067172
+56793000000 56795809281 18931000000 18931936427 1751130816 1752067243
+56796000000 56798809388 18932000000 18932936462 1752130816 1753067278
+56799000000 56801809554 18933000000 18933936518 1753130816 1754067334
+56802000000 56804408299 18934000000 18934802766 1754130816 1754933582
+56805000000 56807809825 18935000000 18935936608 1755130816 1756067424
+56808000000 56810809937 18936000000 18936936645 1756130816 1757067461
+56811000000 56813810146 18937000000 18937936715 1757130816 1758067531
+56814000000 56816810225 18938000000 18938936741 1758130816 1759067557
+56817000000 56819810450 18939000000 18939936816 1759130816 1760067632
+56820000000 56822810577 18940000000 18940936859 1760130816 1761067675
+56823000000 56825810666 18941000000 18941936888 1761130816 1762067704
+56826000000 56828810772 18942000000 18942936924 1762130816 1763067740
+56829000000 56831810983 18943000000 18943936994 1763130816 1764067810
+56832000000 56834811192 18944000000 18944937064 1764130816 1765067880
+56835000000 56837811337 18945000000 18945937112 1765130816 1766067928
+56838000000 56840811463 18946000000 18946937154 1766130816 1767067970
+56841000000 56843811629 18947000000 18947937209 1767130816 1768068025
+56844000000 56846811709 18948000000 18948937236 1768130816 1769068052
+56847000000 56849811944 18949000000 18949937314 1769130816 1770068130
+56850000000 56852812103 18950000000 18950937367 1770130816 1771068183
+56853000000 56855812224 18951000000 18951937408 1771130816 1772068224
+56856000000 56858812384 18952000000 18952937461 1772130816 1773068277
+56859000000 56861812467 18953000000 18953937489 1773130816 1774068305
+56862000000 56864812713 18954000000 18954937571 1774130816 1775068387
+56865000000 56867812836 18955000000 18955937612 1775130816 1776068428
+56868000000 56870812972 18956000000 18956937657 1776130816 1777068473
+56871000000 56873813147 18957000000 18957937715 1777130816 1778068531
+56874000000 56876813269 18958000000 18958937756 1778130816 1779068572
+56877000000 56879813419 18959000000 18959937806 1779130816 1780068622
+56880000000 56882813567 18960000000 18960937855 1780130816 1781068671
+56883000000 56884987261 18961000000 18961662420 1781130816 1781793236
+56886000000 56888813887 18962000000 18962937962 1782130816 1783068778
+56889000000 56891814019 18963000000 18963938006 1783130816 1784068822
+56892000000 56894814193 18964000000 18964938064 1784130816 1785068880
+56895000000 56897814312 18965000000 18965938104 1785130816 1786068920
+56898000000 56900814436 18966000000 18966938145 1786130816 1787068961
+56901000000 56903814655 18967000000 18967938218 1787130816 1788069034
+56904000000 56906814791 18968000000 18968938263 1788130816 1789069079
+56907000000 56909814942 18969000000 18969938314 1789130816 1790069130
+56910000000 56912815092 18970000000 18970938364 1790130816 1791069180
+56913000000 56915815207 18971000000 18971938402 1791130816 1792069218
+56916000000 56918815304 18972000000 18972938434 1792130816 1793069250
+56919000000 56921815512 18973000000 18973938504 1793130816 1794069320
+56922000000 56924815667 18974000000 18974938555 1794130816 1795069371
+56925000000 56927815826 18975000000 18975938608 1795130816 1796069424
+56928000000 56930816000 18976000000 18976938666 1796130816 1797069482
+56931000000 56933816100 18977000000 18977938700 1797130816 1798069516
+56934000000 56936816278 18978000000 18978938759 1798130816 1799069575
+56937000000 56939816427 18979000000 18979938809 1799130816 1800069625
+56940000000 56942816555 18980000000 18980938851 1800130816 1801069667
+56943000000 56945816724 18981000000 18981938908 1801130816 1802069724
+56946000000 56948816844 18982000000 18982938948 1802130816 1803069764
+56949000000 56950644194 18983000000 18983548064 1803130816 1803678880
+56952000000 56954817094 18984000000 18984939031 1804130816 1805069847
+56955000000 56957817352 18985000000 18985939117 1805130816 1806069933
+56958000000 56960817457 18986000000 18986939152 1806130816 1807069968
+56961000000 56963817537 18987000000 18987939179 1807130816 1808069995
+56964000000 56966817684 18988000000 18988939228 1808130816 1809070044
+56967000000 56969817938 18989000000 18989939312 1809130816 1810070128
+56970000000 56972818028 18990000000 18990939342 1810130816 1811070158
+56973000000 56975818273 18991000000 18991939424 1811130816 1812070240
+56976000000 56978818351 18992000000 18992939450 1812130816 1813070266
+56979000000 56981818528 18993000000 18993939509 1813130816 1814070325
+56982000000 56984818674 18994000000 18994939558 1814130816 1815070374
+56985000000 56987818818 18995000000 18995939606 1815130816 1816070422
+56988000000 56989441472 18996000000 18996480490 1816130816 1816611306
+56991000000 56993819133 18997000000 18997939711 1817130816 1818070527
+56994000000 56996819293 18998000000 18998939764 1818130816 1819070580
+56997000000 56999819430 18999000000 18999939810 1819130816 1820070626
+57000000000 57002819588 19000000000 19000939862 1820130816 1821070678
+57003000000 57005819746 19001000000 19001939915 1821130816 1822070731
+57006000000 57008819860 19002000000 19002939953 1822130816 1823070769
+57009000000 57011820021 19003000000 19003940007 1823130816 1824070823
+57012000000 57014820148 19004000000 19004940049 1824130816 1825070865
+57015000000 57017820257 19005000000 19005940085 1825130816 1826070901
+57018000000 57020820399 19006000000 19006940133 1826130816 1827070949
+57021000000 57023820633 19007000000 19007940211 1827130816 1828071027
+57024000000 57026820546 19008000000 19008940182 1828130816 1829070998
+57027000000 57029820667 19009000000 19009940222 1829130816 1830071038
+57030000000 57032820775 19010000000 19010940258 1830130816 1831071074
+57033000000 57035821010 19011000000 19011940336 1831130816 1832071152
+57036000000 57038821189 19012000000 19012940396 1832130816 1833071212
+57039000000 57041734829 19013000000 19013911609 1833130816 1834042425
+57042000000 57044821458 19014000000 19014940486 1834130816 1835071302
+57045000000 57047821631 19015000000 19015940543 1835130816 1836071359
+57048000000 57050821747 19016000000 19016940582 1836130816 1837071398
+57051000000 57053821920 19017000000 19017940640 1837130816 1838071456
+57054000000 57056822092 19018000000 19018940697 1838130816 1839071513
+57057000000 57059822148 19019000000 19019940716 1839130816 1840071532
+57060000000 57062822294 19020000000 19020940764 1840130816 1841071580
+57063000000 57065822490 19021000000 19021940830 1841130816 1842071646
+57066000000 57068822519 19022000000 19022940839 1842130816 1843071655
+57069000000 57071822825 19023000000 19023940941 1843130816 1844071757
+57072000000 57074822997 19024000000 19024940999 1844130816 1845071815
+57075000000 57077823130 19025000000 19025941043 1845130816 1846071859
+57078000000 57080823247 19026000000 19026941082 1846130816 1847071898
+57081000000 57083823432 19027000000 19027941144 1847130816 1848071960
+57084000000 57086823538 19028000000 19028941179 1848130816 1849071995
+57087000000 57089823719 19029000000 19029941239 1849130816 1850072055
+57090000000 57092823931 19030000000 19030941310 1850130816 1851072126
+57093000000 57095824038 19031000000 19031941346 1851130816 1852072162
+57096000000 57098824204 19032000000 19032941401 1852130816 1853072217
+57099000000 57101422949 19033000000 19033807649 1853130816 1853938465
+57102000000 57104824475 19034000000 19034941491 1854130816 1855072307
+57105000000 57107824587 19035000000 19035941529 1855130816 1856072345
+57108000000 57110824796 19036000000 19036941598 1856130816 1857072414
+57111000000 57113824875 19037000000 19037941625 1857130816 1858072441
+57114000000 57116825100 19038000000 19038941700 1858130816 1859072516
+57117000000 57119825227 19039000000 19039941742 1859130816 1860072558
+57120000000 57122825316 19040000000 19040941772 1860130816 1861072588
+57123000000 57125825422 19041000000 19041941807 1861130816 1862072623
+57126000000 57128825633 19042000000 19042941877 1862130816 1863072693
+57129000000 57131825842 19043000000 19043941947 1863130816 1864072763
+57132000000 57134825987 19044000000 19044941995 1864130816 1865072811
+57135000000 57137826113 19045000000 19045942037 1865130816 1866072853
+57138000000 57140826279 19046000000 19046942093 1866130816 1867072909
+57141000000 57143826359 19047000000 19047942119 1867130816 1868072935
+57144000000 57146826594 19048000000 19048942198 1868130816 1869073014
+57147000000 57149826753 19049000000 19049942251 1869130816 1870073067
+57150000000 57152826874 19050000000 19050942291 1870130816 1871073107
+57153000000 57155827034 19051000000 19051942344 1871130816 1872073160
+57156000000 57158827117 19052000000 19052942372 1872130816 1873073188
+57159000000 57161827363 19053000000 19053942454 1873130816 1874073270
+57162000000 57164827486 19054000000 19054942495 1874130816 1875073311
+57165000000 57167827622 19055000000 19055942540 1875130816 1876073356
+57168000000 57170827797 19056000000 19056942599 1876130816 1877073415
+57171000000 57173827919 19057000000 19057942639 1877130816 1878073455
+57174000000 57176828069 19058000000 19058942689 1878130816 1879073505
+57177000000 57179828217 19059000000 19059942739 1879130816 1880073555
+57180000000 57182001911 19060000000 19060667303 1880130816 1880798119
+57183000000 57185828537 19061000000 19061942845 1881130816 1882073661
+57186000000 57188828669 19062000000 19062942889 1882130816 1883073705
+57189000000 57191828843 19063000000 19063942947 1883130816 1884073763
+57192000000 57194828962 19064000000 19064942987 1884130816 1885073803
+57195000000 57197829086 19065000000 19065943028 1885130816 1886073844
+57198000000 57200829305 19066000000 19066943101 1886130816 1887073917
+57201000000 57203829441 19067000000 19067943147 1887130816 1888073963
+57204000000 57206829592 19068000000 19068943197 1888130816 1889074013
+57207000000 57209829742 19069000000 19069943247 1889130816 1890074063
+57210000000 57212829857 19070000000 19070943285 1890130816 1891074101
+57213000000 57215829954 19071000000 19071943318 1891130816 1892074134
+57216000000 57218830162 19072000000 19072943387 1892130816 1893074203
+57219000000 57221830317 19073000000 19073943439 1893130816 1894074255
+57222000000 57224830476 19074000000 19074943492 1894130816 1895074308
+57225000000 57227830650 19075000000 19075943550 1895130816 1896074366
+57228000000 57230830750 19076000000 19076943583 1896130816 1897074399
+57231000000 57233830928 19077000000 19077943642 1897130816 1898074458
+57234000000 57236831077 19078000000 19078943692 1898130816 1899074508
+57237000000 57239831205 19079000000 19079943735 1899130816 1900074551
+57240000000 57242831374 19080000000 19080943791 1900130816 1901074607
+57243000000 57245831494 19081000000 19081943831 1901130816 1902074647
+57246000000 57247658844 19082000000 19082552948 1902130816 1902683764
+57249000000 57251831744 19083000000 19083943914 1903130816 1904074730
+57252000000 57254832002 19084000000 19084944000 1904130816 1905074816
+57255000000 57257832107 19085000000 19085944035 1905130816 1906074851
+57258000000 57260832187 19086000000 19086944062 1906130816 1907074878
+57261000000 57263832334 19087000000 19087944111 1907130816 1908074927
+57264000000 57266832588 19088000000 19088944196 1908130816 1909075012
+57267000000 57269832678 19089000000 19089944226 1909130816 1910075042
+57270000000 57272832923 19090000000 19090944307 1910130816 1911075123
+57273000000 57275833001 19091000000 19091944333 1911130816 1912075149
+57276000000 57278833178 19092000000 19092944392 1912130816 1913075208
+57279000000 57281833324 19093000000 19093944441 1913130816 1914075257
+57282000000 57284833468 19094000000 19094944489 1914130816 1915075305
+57285000000 57286456122 19095000000 19095485374 1915130816 1915616190
+57288000000 57290833783 19096000000 19096944594 1916130816 1917075410
+57291000000 57293833943 19097000000 19097944647 1917130816 1918075463
+57294000000 57296834080 19098000000 19098944693 1918130816 1919075509
+57297000000 57299834238 19099000000 19099944746 1919130816 1920075562
+57300000000 57302834396 19100000000 19100944798 1920130816 1921075614
+57303000000 57305834510 19101000000 19101944836 1921130816 1922075652
+57306000000 57308834671 19102000000 19102944890 1922130816 1923075706
+57309000000 57311834798 19103000000 19103944932 1923130816 1924075748
+57312000000 57314834907 19104000000 19104944969 1924130816 1925075785
+57315000000 57317835049 19105000000 19105945016 1925130816 1926075832
+57318000000 57320835283 19106000000 19106945094 1926130816 1927075910
+57321000000 57323835196 19107000000 19107945065 1927130816 1928075881
+57324000000 57326835317 19108000000 19108945105 1928130816 1929075921
+57327000000 57329835425 19109000000 19109945141 1929130816 1930075957
+57330000000 57332835660 19110000000 19110945220 1930130816 1931076036
+57333000000 57335835839 19111000000 19111945279 1931130816 1932076095
+57336000000 57338749479 19112000000 19112916493 1932130816 1933047309
+57339000000 57341836108 19113000000 19113945369 1933130816 1934076185
+57342000000 57344836281 19114000000 19114945427 1934130816 1935076243
+57345000000 57347836397 19115000000 19115945465 1935130816 1936076281
+57348000000 57350836570 19116000000 19116945523 1936130816 1937076339
+57351000000 57353836742 19117000000 19117945580 1937130816 1938076396
+57354000000 57356836798 19118000000 19118945599 1938130816 1939076415
+57357000000 57359836944 19119000000 19119945648 1939130816 1940076464
+57360000000 57362837140 19120000000 19120945713 1940130816 1941076529
+57363000000 57365837169 19121000000 19121945723 1941130816 1942076539
+57366000000 57368837475 19122000000 19122945825 1942130816 1943076641
+57369000000 57371837647 19123000000 19123945882 1943130816 1944076698
+57372000000 57374837780 19124000000 19124945926 1944130816 1945076742
+57375000000 57377837897 19125000000 19125945965 1945130816 1946076781
+57378000000 57380838082 19126000000 19126946027 1946130816 1947076843
+57381000000 57383838188 19127000000 19127946062 1947130816 1948076878
+57384000000 57386838369 19128000000 19128946123 1948130816 1949076939
+57387000000 57389838581 19129000000 19129946193 1949130816 1950077009
+57390000000 57392838688 19130000000 19130946229 1950130816 1951077045
+57393000000 57395838854 19131000000 19131946284 1951130816 1952077100
+57396000000 57398437599 19132000000 19132812533 1952130816 1952943349
+57399000000 57401839125 19133000000 19133946375 1953130816 1954077191
+57402000000 57404839237 19134000000 19134946412 1954130816 1955077228
+57405000000 57407839446 19135000000 19135946482 1955130816 1956077298
+57408000000 57410839525 19136000000 19136946508 1956130816 1957077324
+57411000000 57413839750 19137000000 19137946583 1957130816 1958077399
+57414000000 57416839877 19138000000 19138946625 1958130816 1959077441
+57417000000 57419839966 19139000000 19139946655 1959130816 1960077471
+57420000000 57422840072 19140000000 19140946690 1960130816 1961077506
+57423000000 57425840283 19141000000 19141946761 1961130816 1962077577
+57426000000 57428840492 19142000000 19142946830 1962130816 1963077646
+57429000000 57431840637 19143000000 19143946879 1963130816 1964077695
+57432000000 57434840763 19144000000 19144946921 1964130816 1965077737
+57435000000 57437840929 19145000000 19145946976 1965130816 1966077792
+57438000000 57440841009 19146000000 19146947003 1966130816 1967077819
+57441000000 57443841244 19147000000 19147947081 1967130816 1968077897
+57444000000 57446841403 19148000000 19148947134 1968130816 1969077950
+57447000000 57449841524 19149000000 19149947174 1969130816 1970077990
+57450000000 57452841684 19150000000 19150947228 1970130816 1971078044
+57453000000 57455841767 19151000000 19151947255 1971130816 1972078071
+57456000000 57458842013 19152000000 19152947337 1972130816 1973078153
+57459000000 57461842136 19153000000 19153947378 1973130816 1974078194
+57462000000 57464842272 19154000000 19154947424 1974130816 1975078240
+57465000000 57467842447 19155000000 19155947482 1975130816 1976078298
+57468000000 57470842569 19156000000 19156947523 1976130816 1977078339
+57471000000 57473842719 19157000000 19157947573 1977130816 1978078389
+57474000000 57476842867 19158000000 19158947622 1978130816 1979078438
+57477000000 57479016561 19159000000 19159672187 1979130816 1979803003
+57480000000 57482843187 19160000000 19160947729 1980130816 1981078545
+57483000000 57485843319 19161000000 19161947773 1981130816 1982078589
+57486000000 57488843493 19162000000 19162947831 1982130816 1983078647
+57489000000 57491843612 19163000000 19163947870 1983130816 1984078686
+57492000000 57494843736 19164000000 19164947912 1984130816 1985078728
+57495000000 57497843955 19165000000 19165947985 1985130816 1986078801
+57498000000 57500844091 19166000000 19166948030 1986130816 1987078846
+57501000000 57503844242 19167000000 19167948080 1987130816 1988078896
+57504000000 57506844392 19168000000 19168948130 1988130816 1989078946
+57507000000 57509844507 19169000000 19169948169 1989130816 1990078985
+57510000000 57512844604 19170000000 19170948201 1990130816 1991079017
+57513000000 57515844812 19171000000 19171948270 1991130816 1992079086
+57516000000 57518844967 19172000000 19172948322 1992130816 1993079138
+57519000000 57521845126 19173000000 19173948375 1993130816 1994079191
+57522000000 57524845300 19174000000 19174948433 1994130816 1995079249
+57525000000 57527845400 19175000000 19175948466 1995130816 1996079282
+57528000000 57530845578 19176000000 19176948526 1996130816 1997079342
+57531000000 57533845727 19177000000 19177948575 1997130816 1998079391
+57534000000 57536845855 19178000000 19178948618 1998130816 1999079434
+57537000000 57539846024 19179000000 19179948674 1999130816 2000079490
+57540000000 57542846144 19180000000 19180948714 2000130816 2001079530
+57543000000 57544673494 19181000000 19181557831 2001130816 2001688647
+57546000000 57548846394 19182000000 19182948798 2002130816 2003079614
+57549000000 57551846652 19183000000 19183948884 2003130816 2004079700
+57552000000 57554846757 19184000000 19184948919 2004130816 2005079735
+57555000000 57557846837 19185000000 19185948945 2005130816 2006079761
+57558000000 57560846984 19186000000 19186948994 2006130816 2007079810
+57561000000 57563847238 19187000000 19187949079 2007130816 2008079895
+57564000000 57566847328 19188000000 19188949109 2008130816 2009079925
+57567000000 57569847573 19189000000 19189949191 2009130816 2010080007
+57570000000 57572847651 19190000000 19190949217 2010130816 2011080033
+57573000000 57575847828 19191000000 19191949276 2011130816 2012080092
+57576000000 57578847974 19192000000 19192949324 2012130816 2013080140
+57579000000 57581848118 19193000000 19193949372 2013130816 2014080188
+57582000000 57583470772 19194000000 19194490257 2014130816 2014621073
+57585000000 57587848433 19195000000 19195949477 2015130816 2016080293
+57588000000 57590848593 19196000000 19196949531 2016130816 2017080347
+57591000000 57593848730 19197000000 19197949576 2017130816 2018080392
+57594000000 57596848888 19198000000 19198949629 2018130816 2019080445
+57597000000 57599849046 19199000000 19199949682 2019130816 2020080498
+57600000000 57602849160 19200000000 19200949720 2020130816 2021080536
+57603000000 57605849321 19201000000 19201949773 2021130816 2022080589
+57606000000 57608849448 19202000000 19202949816 2022130816 2023080632
+57609000000 57611849557 19203000000 19203949852 2023130816 2024080668
+57612000000 57614849699 19204000000 19204949899 2024130816 2025080715
+57615000000 57617849933 19205000000 19205949977 2025130816 2026080793
+57618000000 57620849846 19206000000 19206949948 2026130816 2027080764
+57621000000 57623849967 19207000000 19207949989 2027130816 2028080805
+57624000000 57626850075 19208000000 19208950025 2028130816 2029080841
+57627000000 57629850310 19209000000 19209950103 2029130816 2030080919
+57630000000 57632850489 19210000000 19210950163 2030130816 2031080979
+57633000000 57635764129 19211000000 19211921376 2031130816 2032052192
+57636000000 57638850758 19212000000 19212950252 2032130816 2033081068
+57639000000 57641850931 19213000000 19213950310 2033130816 2034081126
+57642000000 57644851047 19214000000 19214950349 2034130816 2035081165
+57645000000 57647851220 19215000000 19215950406 2035130816 2036081222
+57648000000 57650851392 19216000000 19216950464 2036130816 2037081280
+57651000000 57653851448 19217000000 19217950482 2037130816 2038081298
+57654000000 57656851594 19218000000 19218950531 2038130816 2039081347
+57657000000 57659851790 19219000000 19219950596 2039130816 2040081412
+57660000000 57662851819 19220000000 19220950606 2040130816 2041081422
+57663000000 57665852125 19221000000 19221950708 2041130816 2042081524
+57666000000 57668852297 19222000000 19222950765 2042130816 2043081581
+57669000000 57671852430 19223000000 19223950810 2043130816 2044081626
+57672000000 57674852547 19224000000 19224950849 2044130816 2045081665
+57675000000 57677852732 19225000000 19225950910 2045130816 2046081726
+57678000000 57680852838 19226000000 19226950946 2046130816 2047081762
+57681000000 57683853019 19227000000 19227951006 2047130816 2048081822
+57684000000 57686853231 19228000000 19228951077 2048130816 2049081893
+57687000000 57689853338 19229000000 19229951112 2049130816 2050081928
+57690000000 57692853504 19230000000 19230951168 2050130816 2051081984
+57693000000 57695452249 19231000000 19231817416 2051130816 2051948232
+57696000000 57698853775 19232000000 19232951258 2052130816 2053082074
+57699000000 57701853887 19233000000 19233951295 2053130816 2054082111
+57702000000 57704854096 19234000000 19234951365 2054130816 2055082181
+57705000000 57707854175 19235000000 19235951391 2055130816 2056082207
+57708000000 57710854400 19236000000 19236951466 2056130816 2057082282
+57711000000 57713854527 19237000000 19237951509 2057130816 2058082325
+57714000000 57716854616 19238000000 19238951538 2058130816 2059082354
+57717000000 57719854722 19239000000 19239951574 2059130816 2060082390
+57720000000 57722854933 19240000000 19240951644 2060130816 2061082460
+57723000000 57725855142 19241000000 19241951714 2061130816 2062082530
+57726000000 57728855287 19242000000 19242951762 2062130816 2063082578
+57729000000 57731855413 19243000000 19243951804 2063130816 2064082620
+57732000000 57734855579 19244000000 19244951859 2064130816 2065082675
+57735000000 57737855659 19245000000 19245951886 2065130816 2066082702
+57738000000 57740855894 19246000000 19246951964 2066130816 2067082780
+57741000000 57743856053 19247000000 19247952017 2067130816 2068082833
+57744000000 57746856174 19248000000 19248952058 2068130816 2069082874
+57747000000 57749856334 19249000000 19249952111 2069130816 2070082927
+57750000000 57752856417 19250000000 19250952139 2070130816 2071082955
+57753000000 57755856663 19251000000 19251952221 2071130816 2072083037
+57756000000 57758856786 19252000000 19252952262 2072130816 2073083078
+57759000000 57761856922 19253000000 19253952307 2073130816 2074083123
+57762000000 57764857097 19254000000 19254952365 2074130816 2075083181
+57765000000 57767857219 19255000000 19255952406 2075130816 2076083222
+57768000000 57770857369 19256000000 19256952456 2076130816 2077083272
+57771000000 57773857517 19257000000 19257952505 2077130816 2078083321
+57774000000 57776031211 19258000000 19258677070 2078130816 2078807886
+57777000000 57779857837 19259000000 19259952612 2079130816 2080083428
+57780000000 57782857969 19260000000 19260952656 2080130816 2081083472
+57783000000 57785858143 19261000000 19261952714 2081130816 2082083530
+57786000000 57788858262 19262000000 19262952754 2082130816 2083083570
+57789000000 57791858386 19263000000 19263952795 2083130816 2084083611
+57792000000 57794858605 19264000000 19264952868 2084130816 2085083684
+57795000000 57797858741 19265000000 19265952913 2085130816 2086083729
+57798000000 57800858892 19266000000 19266952964 2086130816 2087083780
+57801000000 57803859042 19267000000 19267953014 2087130816 2088083830
+57804000000 57806859157 19268000000 19268953052 2088130816 2089083868
+57807000000 57809859254 19269000000 19269953084 2089130816 2090083900
+57810000000 57812859462 19270000000 19270953154 2090130816 2091083970
+57813000000 57815859617 19271000000 19271953205 2091130816 2092084021
+57816000000 57818859776 19272000000 19272953258 2092130816 2093084074
+57819000000 57821859950 19273000000 19273953316 2093130816 2094084132
+57822000000 57824860050 19274000000 19274953350 2094130816 2095084166
+57825000000 57827860228 19275000000 19275953409 2095130816 2096084225
+57828000000 57830860377 19276000000 19276953459 2096130816 2097084275
+57831000000 57833860505 19277000000 19277953501 2097130816 2098084317
+57834000000 57836860674 19278000000 19278953558 2098130816 2099084374
+57837000000 57839860794 19279000000 19279953598 2099130816 2100084414
+57840000000 57841688144 19280000000 19280562714 2100130816 2100693530
+57843000000 57845861044 19281000000 19281953681 2101130816 2102084497
+57846000000 57848861302 19282000000 19282953767 2102130816 2103084583
+57849000000 57851861407 19283000000 19283953802 2103130816 2104084618
+57852000000 57854861487 19284000000 19284953829 2104130816 2105084645
+57855000000 57857861634 19285000000 19285953878 2105130816 2106084694
+57858000000 57860861888 19286000000 19286953962 2106130816 2107084778
+57861000000 57863861978 19287000000 19287953992 2107130816 2108084808
+57864000000 57866862223 19288000000 19288954074 2108130816 2109084890
+57867000000 57869862301 19289000000 19289954100 2109130816 2110084916
+57870000000 57872862478 19290000000 19290954159 2110130816 2111084975
+57873000000 57875862624 19291000000 19291954208 2111130816 2112085024
+57876000000 57878862768 19292000000 19292954256 2112130816 2113085072
+57879000000 57880485422 19293000000 19293495140 2113130816 2113625956
+57882000000 57884863083 19294000000 19294954361 2114130816 2115085177
+57885000000 57887863243 19295000000 19295954414 2115130816 2116085230
+57888000000 57890863380 19296000000 19296954460 2116130816 2117085276
+57891000000 57893863538 19297000000 19297954512 2117130816 2118085328
+57894000000 57896863696 19298000000 19298954565 2118130816 2119085381
+57897000000 57899863810 19299000000 19299954603 2119130816 2120085419
+57900000000 57902863971 19300000000 19300954657 2120130816 2121085473
+57903000000 57905864098 19301000000 19301954699 2121130816 2122085515
+57906000000 57908864207 19302000000 19302954735 2122130816 2123085551
+57909000000 57911864349 19303000000 19303954783 2123130816 2124085599
+57912000000 57914864583 19304000000 19304954861 2124130816 2125085677
+57915000000 57917864496 19305000000 19305954832 2125130816 2126085648
+57918000000 57920864617 19306000000 19306954872 2126130816 2127085688
+57921000000 57923864725 19307000000 19307954908 2127130816 2128085724
+57924000000 57926864960 19308000000 19308954986 2128130816 2129085802
+57927000000 57929865139 19309000000 19309955046 2129130816 2130085862
+57930000000 57932778779 19310000000 19310926259 2130130816 2131057075
+57933000000 57935865408 19311000000 19311955136 2131130816 2132085952
+57936000000 57938865581 19312000000 19312955193 2132130816 2133086009
+57939000000 57941865697 19313000000 19313955232 2133130816 2134086048
+57942000000 57944865870 19314000000 19314955290 2134130816 2135086106
+57945000000 57947866042 19315000000 19315955347 2135130816 2136086163
+57948000000 57950866098 19316000000 19316955366 2136130816 2137086182
+57951000000 57953866244 19317000000 19317955414 2137130816 2138086230
+57954000000 57956866440 19318000000 19318955480 2138130816 2139086296
+57957000000 57959866469 19319000000 19319955489 2139130816 2140086305
+57960000000 57962866775 19320000000 19320955591 2140130816 2141086407
+57963000000 57965866947 19321000000 19321955649 2141130816 2142086465
+57966000000 57968867080 19322000000 19322955693 2142130816 2143086509
+57969000000 57971867197 19323000000 19323955732 2143130816 2144086548
+57972000000 57974867382 19324000000 19324955794 2144130816 2145086610
+57975000000 57977867488 19325000000 19325955829 2145130816 2146086645
+57978000000 57980867669 19326000000 19326955889 2146130816 2147086705
+57981000000 57983867881 19327000000 19327955960 2147130816 2148086776
+57984000000 57986867988 19328000000 19328955996 2148130816 2149086812
+57987000000 57989868154 19329000000 19329956051 2149130816 2150086867
+57990000000 57992466899 19330000000 19330822299 2150130816 2150953115
+57993000000 57995868425 19331000000 19331956141 2151130816 2152086957
+57996000000 57998868537 19332000000 19332956179 2152130816 2153086995
+57999000000 58001868746 19333000000 19333956248 2153130816 2154087064
+58002000000 58004868825 19334000000 19334956275 2154130816 2155087091
+58005000000 58007869050 19335000000 19335956350 2155130816 2156087166
+58008000000 58010869177 19336000000 19336956392 2156130816 2157087208
+58011000000 58013869266 19337000000 19337956422 2157130816 2158087238
+58014000000 58016869372 19338000000 19338956457 2158130816 2159087273
+58017000000 58019869583 19339000000 19339956527 2159130816 2160087343
+58020000000 58022869792 19340000000 19340956597 2160130816 2161087413
+58023000000 58025869937 19341000000 19341956645 2161130816 2162087461
+58026000000 58028870063 19342000000 19342956687 2162130816 2163087503
+58029000000 58031870229 19343000000 19343956743 2163130816 2164087559
+58032000000 58034870309 19344000000 19344956769 2164130816 2165087585
+58035000000 58037870544 19345000000 19345956848 2165130816 2166087664
+58038000000 58040870703 19346000000 19346956901 2166130816 2167087717
+58041000000 58043870824 19347000000 19347956941 2167130816 2168087757
+58044000000 58046870984 19348000000 19348956994 2168130816 2169087810
+58047000000 58049871067 19349000000 19349957022 2169130816 2170087838
+58050000000 58052871313 19350000000 19350957104 2170130816 2171087920
+58053000000 58055871436 19351000000 19351957145 2171130816 2172087961
+58056000000 58058871572 19352000000 19352957190 2172130816 2173088006
+58059000000 58061871747 19353000000 19353957249 2173130816 2174088065
+58062000000 58064871869 19354000000 19354957289 2174130816 2175088105
+58065000000 58067872019 19355000000 19355957339 2175130816 2176088155
+58068000000 58070872167 19356000000 19356957389 2176130816 2177088205
+58071000000 58073045861 19357000000 19357681953 2177130816 2177812769
+58074000000 58076872487 19358000000 19358957495 2178130816 2179088311
+58077000000 58079872619 19359000000 19359957539 2179130816 2180088355
+58080000000 58082872793 19360000000 19360957597 2180130816 2181088413
+58083000000 58085872912 19361000000 19361957637 2181130816 2182088453
+58086000000 58088873036 19362000000 19362957678 2182130816 2183088494
+58089000000 58091873255 19363000000 19363957751 2183130816 2184088567
+58092000000 58094873391 19364000000 19364957797 2184130816 2185088613
+58095000000 58097873542 19365000000 19365957847 2185130816 2186088663
+58098000000 58100873692 19366000000 19366957897 2186130816 2187088713
+58101000000 58103873807 19367000000 19367957935 2187130816 2188088751
+58104000000 58106873904 19368000000 19368957968 2188130816 2189088784
+58107000000 58109874112 19369000000 19369958037 2189130816 2190088853
+58110000000 58112874267 19370000000 19370958089 2190130816 2191088905
+58113000000 58115874426 19371000000 19371958142 2191130816 2192088958
+58116000000 58118874600 19372000000 19372958200 2192130816 2193089016
+58119000000 58121874700 19373000000 19373958233 2193130816 2194089049
+58122000000 58124874878 19374000000 19374958292 2194130816 2195089108
+58125000000 58127875027 19375000000 19375958342 2195130816 2196089158
+58128000000 58130875155 19376000000 19376958385 2196130816 2197089201
+58131000000 58133875324 19377000000 19377958441 2197130816 2198089257
+58134000000 58136875444 19378000000 19378958481 2198130816 2199089297
+58137000000 58138702794 19379000000 19379567598 2199130816 2199698414
+58140000000 58142875694 19380000000 19380958564 2200130816 2201089380
+58143000000 58145875952 19381000000 19381958650 2201130816 2202089466
+58146000000 58148876057 19382000000 19382958685 2202130816 2203089501
+58149000000 58151876137 19383000000 19383958712 2203130816 2204089528
+58152000000 58154876284 19384000000 19384958761 2204130816 2205089577
+58155000000 58157876538 19385000000 19385958846 2205130816 2206089662
+58158000000 58160876628 19386000000 19386958876 2206130816 2207089692
+58161000000 58163876873 19387000000 19387958957 2207130816 2208089773
+58164000000 58166876951 19388000000 19388958983 2208130816 2209089799
+58167000000 58169877128 19389000000 19389959042 2209130816 2210089858
+58170000000 58172877274 19390000000 19390959091 2210130816 2211089907
+58173000000 58175877418 19391000000 19391959139 2211130816 2212089955
+58176000000 58177500072 19392000000 19392500024 2212130816 2212630840
+58179000000 58181877733 19393000000 19393959244 2213130816 2214090060
+58182000000 58184877893 19394000000 19394959297 2214130816 2215090113
+58185000000 58187878030 19395000000 19395959343 2215130816 2216090159
+58188000000 58190878188 19396000000 19396959396 2216130816 2217090212
+58191000000 58193878346 19397000000 19397959448 2217130816 2218090264
+58194000000 58196878460 19398000000 19398959486 2218130816 2219090302
+58197000000 58199878621 19399000000 19399959540 2219130816 2220090356
+58200000000 58202878748 19400000000 19400959582 2220130816 2221090398
+58203000000 58205878857 19401000000 19401959619 2221130816 2222090435
+58206000000 58208878999 19402000000 19402959666 2222130816 2223090482
+58209000000 58211879233 19403000000 19403959744 2223130816 2224090560
+58212000000 58214879146 19404000000 19404959715 2224130816 2225090531
+58215000000 58217879267 19405000000 19405959755 2225130816 2226090571
+58218000000 58220879375 19406000000 19406959791 2226130816 2227090607
+58221000000 58223879610 19407000000 19407959870 2227130816 2228090686
+58224000000 58226879789 19408000000 19408959929 2228130816 2229090745
+58227000000 58229793429 19409000000 19409931143 2229130816 2230061959
+58230000000 58232880058 19410000000 19410960019 2230130816 2231090835
+58233000000 58235880231 19411000000 19411960077 2231130816 2232090893
+58236000000 58238880347 19412000000 19412960115 2232130816 2233090931
+58239000000 58241880520 19413000000 19413960173 2233130816 2234090989
+58242000000 58244880692 19414000000 19414960230 2234130816 2235091046
+58245000000 58247880748 19415000000 19415960249 2235130816 2236091065
+58248000000 58250880894 19416000000 19416960298 2236130816 2237091114
+58251000000 58253881090 19417000000 19417960363 2237130816 2238091179
+58254000000 58256881119 19418000000 19418960373 2238130816 2239091189
+58257000000 58259881425 19419000000 19419960475 2239130816 2240091291
+58260000000 58262881597 19420000000 19420960532 2240130816 2241091348
+58263000000 58265881730 19421000000 19421960576 2241130816 2242091392
+58266000000 58268881847 19422000000 19422960615 2242130816 2243091431
+58269000000 58271882032 19423000000 19423960677 2243130816 2244091493
+58272000000 58274882138 19424000000 19424960712 2244130816 2245091528
+58275000000 58277882319 19425000000 19425960773 2245130816 2246091589
+58278000000 58280882531 19426000000 19426960843 2246130816 2247091659
+58281000000 58283882638 19427000000 19427960879 2247130816 2248091695
+58284000000 58286882804 19428000000 19428960934 2248130816 2249091750
+58287000000 58289481549 19429000000 19429827183 2249130816 2249957999
+58290000000 58292883075 19430000000 19430961025 2250130816 2251091841
+58293000000 58295883187 19431000000 19431961062 2251130816 2252091878
+58296000000 58298883396 19432000000 19432961132 2252130816 2253091948
+58299000000 58301883475 19433000000 19433961158 2253130816 2254091974
+58302000000 58304883700 19434000000 19434961233 2254130816 2255092049
+58305000000 58307883827 19435000000 19435961275 2255130816 2256092091
+58308000000 58310883916 19436000000 19436961305 2256130816 2257092121
+58311000000 58313884022 19437000000 19437961340 2257130816 2258092156
+58314000000 58316884233 19438000000 19438961411 2258130816 2259092227
+58317000000 58319884442 19439000000 19439961480 2259130816 2260092296
+58320000000 58322884587 19440000000 19440961529 2260130816 2261092345
+58323000000 58325884713 19441000000 19441961571 2261130816 2262092387
+58326000000 58328884879 19442000000 19442961626 2262130816 2263092442
+58329000000 58331884959 19443000000 19443961653 2263130816 2264092469
+58332000000 58334885194 19444000000 19444961731 2264130816 2265092547
+58335000000 58337885353 19445000000 19445961784 2265130816 2266092600
+58338000000 58340885474 19446000000 19446961824 2266130816 2267092640
+58341000000 58343885634 19447000000 19447961878 2267130816 2268092694
+58344000000 58346885717 19448000000 19448961905 2268130816 2269092721
+58347000000 58349885963 19449000000 19449961987 2269130816 2270092803
+58350000000 58352886086 19450000000 19450962028 2270130816 2271092844
+58353000000 58355886222 19451000000 19451962074 2271130816 2272092890
+58356000000 58358886397 19452000000 19452962132 2272130816 2273092948
+58359000000 58361886519 19453000000 19453962173 2273130816 2274092989
+58362000000 58364886669 19454000000 19454962223 2274130816 2275093039
+58365000000 58367886817 19455000000 19455962272 2275130816 2276093088
+58368000000 58370060511 19456000000 19456686837 2276130816 2276817653
+58371000000 58373887137 19457000000 19457962379 2277130816 2278093195
+58374000000 58376887269 19458000000 19458962423 2278130816 2279093239
+58377000000 58379887443 19459000000 19459962481 2279130816 2280093297
+58380000000 58382887562 19460000000 19460962520 2280130816 2281093336
+58383000000 58385887686 19461000000 19461962562 2281130816 2282093378
+58386000000 58388887905 19462000000 19462962635 2282130816 2283093451
+58389000000 58391888041 19463000000 19463962680 2283130816 2284093496
+58392000000 58394888192 19464000000 19464962730 2284130816 2285093546
+58395000000 58397888342 19465000000 19465962780 2285130816 2286093596
+58398000000 58400888457 19466000000 19466962819 2286130816 2287093635
+58401000000 58403888554 19467000000 19467962851 2287130816 2288093667
+58404000000 58406888762 19468000000 19468962920 2288130816 2289093736
+58407000000 58409888917 19469000000 19469962972 2289130816 2290093788
+58410000000 58412889076 19470000000 19470963025 2290130816 2291093841
+58413000000 58415889250 19471000000 19471963083 2291130816 2292093899
+58416000000 58418889350 19472000000 19472963116 2292130816 2293093932
+58419000000 58421889528 19473000000 19473963176 2293130816 2294093992
+58422000000 58424889677 19474000000 19474963225 2294130816 2295094041
+58425000000 58427889805 19475000000 19475963268 2295130816 2296094084
+58428000000 58430889974 19476000000 19476963324 2296130816 2297094140
+58431000000 58433890094 19477000000 19477963364 2297130816 2298094180
+58434000000 58435717444 19478000000 19478572481 2298130816 2298703297
+58437000000 58439890344 19479000000 19479963448 2299130816 2300094264
+58440000000 58442890602 19480000000 19480963534 2300130816 2301094350
+58443000000 58445890707 19481000000 19481963569 2301130816 2302094385
+58446000000 58448890787 19482000000 19482963595 2302130816 2303094411
+58449000000 58451890934 19483000000 19483963644 2303130816 2304094460
+58452000000 58454891188 19484000000 19484963729 2304130816 2305094545
+58455000000 58457891278 19485000000 19485963759 2305130816 2306094575
+58458000000 58460891523 19486000000 19486963841 2306130816 2307094657
+58461000000 58463891601 19487000000 19487963867 2307130816 2308094683
+58464000000 58466891778 19488000000 19488963926 2308130816 2309094742
+58467000000 58469891924 19489000000 19489963974 2309130816 2310094790
+58470000000 58472892068 19490000000 19490964022 2310130816 2311094838
+58473000000 58474514722 19491000000 19491504907 2311130816 2311635723
+58476000000 58478892383 19492000000 19492964127 2312130816 2313094943
+58479000000 58481892543 19493000000 19493964181 2313130816 2314094997
+58482000000 58484892680 19494000000 19494964226 2314130816 2315095042
+58485000000 58487892838 19495000000 19495964279 2315130816 2316095095
+58488000000 58490892996 19496000000 19496964332 2316130816 2317095148
+58491000000 58493893110 19497000000 19497964370 2317130816 2318095186
+58494000000 58496893271 19498000000 19498964423 2318130816 2319095239
+58497000000 58499893398 19499000000 19499964466 2319130816 2320095282
+58500000000 58502893507 19500000000 19500964502 2320130816 2321095318
+58503000000 58505893649 19501000000 19501964549 2321130816 2322095365
+58506000000 58508893883 19502000000 19502964627 2322130816 2323095443
+58509000000 58511893796 19503000000 19503964598 2323130816 2324095414
+58512000000 58514893917 19504000000 19504964639 2324130816 2325095455
+58515000000 58517894025 19505000000 19505964675 2325130816 2326095491
+58518000000 58520894260 19506000000 19506964753 2326130816 2327095569
+58521000000 58523894439 19507000000 19507964813 2327130816 2328095629
+58524000000 58526808079 19508000000 19508936026 2328130816 2329066842
+58527000000 58529894708 19509000000 19509964902 2329130816 2330095718
+58530000000 58532894881 19510000000 19510964960 2330130816 2331095776
+58533000000 58535894997 19511000000 19511964999 2331130816 2332095815
+58536000000 58538895170 19512000000 19512965056 2332130816 2333095872
+58539000000 58541895342 19513000000 19513965114 2333130816 2334095930
+58542000000 58544895398 19514000000 19514965132 2334130816 2335095948
+58545000000 58547895544 19515000000 19515965181 2335130816 2336095997
+58548000000 58550895740 19516000000 19516965246 2336130816 2337096062
+58551000000 58553895769 19517000000 19517965256 2337130816 2338096072
+58554000000 58556896075 19518000000 19518965358 2338130816 2339096174
+58557000000 58559896247 19519000000 19519965415 2339130816 2340096231
+58560000000 58562896380 19520000000 19520965460 2340130816 2341096276
+58563000000 58565896497 19521000000 19521965499 2341130816 2342096315
+58566000000 58568896682 19522000000 19522965560 2342130816 2343096376
+58569000000 58571896788 19523000000 19523965596 2343130816 2344096412
+58572000000 58574896969 19524000000 19524965656 2344130816 2345096472
+58575000000 58577897181 19525000000 19525965727 2345130816 2346096543
+58578000000 58580897288 19526000000 19526965762 2346130816 2347096578
+58581000000 58583897454 19527000000 19527965818 2347130816 2348096634
+58584000000 58586496199 19528000000 19528832066 2348130816 2348962882
+58587000000 58589897725 19529000000 19529965908 2349130816 2350096724
+58590000000 58592897837 19530000000 19530965945 2350130816 2351096761
+58593000000 58595898046 19531000000 19531966015 2351130816 2352096831
+58596000000 58598898125 19532000000 19532966041 2352130816 2353096857
+58599000000 58601898350 19533000000 19533966116 2353130816 2354096932
+58602000000 58604898477 19534000000 19534966159 2354130816 2355096975
+58605000000 58607898566 19535000000 19535966188 2355130816 2356097004
+58608000000 58610898672 19536000000 19536966224 2356130816 2357097040
+58611000000 58613898883 19537000000 19537966294 2357130816 2358097110
+58614000000 58616899092 19538000000 19538966364 2358130816 2359097180
+58617000000 58619899237 19539000000 19539966412 2359130816 2360097228
+58620000000 58622899363 19540000000 19540966454 2360130816 2361097270
+58623000000 58625899529 19541000000 19541966509 2361130816 2362097325
+58626000000 58628899609 19542000000 19542966536 2362130816 2363097352
+58629000000 58631899844 19543000000 19543966614 2363130816 2364097430
+58632000000 58634900003 19544000000 19544966667 2364130816 2365097483
+58635000000 58637900124 19545000000 19545966708 2365130816 2366097524
+58638000000 58640900284 19546000000 19546966761 2366130816 2367097577
+58641000000 58643900367 19547000000 19547966789 2367130816 2368097605
+58644000000 58646900613 19548000000 19548966871 2368130816 2369097687
+58647000000 58649900736 19549000000 19549966912 2369130816 2370097728
+58650000000 58652900872 19550000000 19550966957 2370130816 2371097773
+58653000000 58655901047 19551000000 19551967015 2371130816 2372097831
+58656000000 58658901169 19552000000 19552967056 2372130816 2373097872
+58659000000 58661901319 19553000000 19553967106 2373130816 2374097922
+58662000000 58664901467 19554000000 19554967155 2374130816 2375097971
+58665000000 58667075161 19555000000 19555691720 2375130816 2375822536
+58668000000 58670901787 19556000000 19556967262 2376130816 2377098078
+58671000000 58673901919 19557000000 19557967306 2377130816 2378098122
+58674000000 58676902093 19558000000 19558967364 2378130816 2379098180
+58677000000 58679902212 19559000000 19559967404 2379130816 2380098220
+58680000000 58682902336 19560000000 19560967445 2380130816 2381098261
+58683000000 58685902555 19561000000 19561967518 2381130816 2382098334
+58686000000 58688902691 19562000000 19562967563 2382130816 2383098379
+58689000000 58691902842 19563000000 19563967614 2383130816 2384098430
+58692000000 58694902992 19564000000 19564967664 2384130816 2385098480
+58695000000 58697903107 19565000000 19565967702 2385130816 2386098518
+58698000000 58700903204 19566000000 19566967734 2386130816 2387098550
+58701000000 58703903412 19567000000 19567967804 2387130816 2388098620
+58704000000 58706903567 19568000000 19568967855 2388130816 2389098671
+58707000000 58709903726 19569000000 19569967908 2389130816 2390098724
+58710000000 58712903900 19570000000 19570967966 2390130816 2391098782
+58713000000 58715904000 19571000000 19571968000 2391130816 2392098816
+58716000000 58718904178 19572000000 19572968059 2392130816 2393098875
+58719000000 58721904327 19573000000 19573968109 2393130816 2394098925
+58722000000 58724904455 19574000000 19574968151 2394130816 2395098967
+58725000000 58727904624 19575000000 19575968208 2395130816 2396099024
+58728000000 58730904744 19576000000 19576968248 2396130816 2397099064
+58731000000 58732732094 19577000000 19577577364 2397130816 2397708180
+58734000000 58736904994 19578000000 19578968331 2398130816 2399099147
+58737000000 58739905252 19579000000 19579968417 2399130816 2400099233
+58740000000 58742905357 19580000000 19580968452 2400130816 2401099268
+58743000000 58745905437 19581000000 19581968479 2401130816 2402099295
+58746000000 58748905584 19582000000 19582968528 2402130816 2403099344
+58749000000 58751905838 19583000000 19583968612 2403130816 2404099428
+58752000000 58754905928 19584000000 19584968642 2404130816 2405099458
+58755000000 58757906173 19585000000 19585968724 2405130816 2406099540
+58758000000 58760906251 19586000000 19586968750 2406130816 2407099566
+58761000000 58763906428 19587000000 19587968809 2407130816 2408099625
+58764000000 58766906574 19588000000 19588968858 2408130816 2409099674
+58767000000 58769906718 19589000000 19589968906 2409130816 2410099722
+58770000000 58771529372 19590000000 19590509790 2410130816 2410640606
+58773000000 58775907033 19591000000 19591969011 2411130816 2412099827
+58776000000 58778907193 19592000000 19592969064 2412130816 2413099880
+58779000000 58781907330 19593000000 19593969110 2413130816 2414099926
+58782000000 58784907488 19594000000 19594969162 2414130816 2415099978
+58785000000 58787907646 19595000000 19595969215 2415130816 2416100031
+58788000000 58790907760 19596000000 19596969253 2416130816 2417100069
+58791000000 58793907921 19597000000 19597969307 2417130816 2418100123
+58794000000 58796908048 19598000000 19598969349 2418130816 2419100165
+58797000000 58799908157 19599000000 19599969385 2419130816 2420100201
+58800000000 58802908299 19600000000 19600969433 2420130816 2421100249
+58803000000 58805908533 19601000000 19601969511 2421130816 2422100327
+58806000000 58808908446 19602000000 19602969482 2422130816 2423100298
+58809000000 58811908567 19603000000 19603969522 2423130816 2424100338
+58812000000 58814908675 19604000000 19604969558 2424130816 2425100374
+58815000000 58817908910 19605000000 19605969636 2425130816 2426100452
+58818000000 58820909089 19606000000 19606969696 2426130816 2427100512
+58821000000 58823822729 19607000000 19607940909 2427130816 2428071725
+58824000000 58826909358 19608000000 19608969786 2428130816 2429100602
+58827000000 58829909531 19609000000 19609969843 2429130816 2430100659
+58830000000 58832909647 19610000000 19610969882 2430130816 2431100698
+58833000000 58835909820 19611000000 19611969940 2431130816 2432100756
+58836000000 58838909992 19612000000 19612969997 2432130816 2433100813
+58839000000 58841910048 19613000000 19613970016 2433130816 2434100832
+58842000000 58844910194 19614000000 19614970064 2434130816 2435100880
+58845000000 58847910390 19615000000 19615970130 2435130816 2436100946
+58848000000 58850910419 19616000000 19616970139 2436130816 2437100955
+58851000000 58853910725 19617000000 19617970241 2437130816 2438101057
+58854000000 58856910897 19618000000 19618970299 2438130816 2439101115
+58857000000 58859911030 19619000000 19619970343 2439130816 2440101159
+58860000000 58862911147 19620000000 19620970382 2440130816 2441101198
+58863000000 58865911332 19621000000 19621970444 2441130816 2442101260
+58866000000 58868911438 19622000000 19622970479 2442130816 2443101295
+58869000000 58871911619 19623000000 19623970539 2443130816 2444101355
+58872000000 58874911831 19624000000 19624970610 2444130816 2445101426
+58875000000 58877911938 19625000000 19625970646 2445130816 2446101462
+58878000000 58880912104 19626000000 19626970701 2446130816 2447101517
+58881000000 58883510849 19627000000 19627836949 2447130816 2447967765
+58884000000 58886912375 19628000000 19628970791 2448130816 2449101607
+58887000000 58889912487 19629000000 19629970829 2449130816 2450101645
+58890000000 58892912696 19630000000 19630970898 2450130816 2451101714
+58893000000 58895912775 19631000000 19631970925 2451130816 2452101741
+58896000000 58898913000 19632000000 19632971000 2452130816 2453101816
+58899000000 58901913127 19633000000 19633971042 2453130816 2454101858
+58902000000 58904913216 19634000000 19634971072 2454130816 2455101888
+58905000000 58907913322 19635000000 19635971107 2455130816 2456101923
+58908000000 58910913533 19636000000 19636971177 2456130816 2457101993
+58911000000 58913913742 19637000000 19637971247 2457130816 2458102063
+58914000000 58916913887 19638000000 19638971295 2458130816 2459102111
+58917000000 58919914013 19639000000 19639971337 2459130816 2460102153
+58920000000 58922914179 19640000000 19640971393 2460130816 2461102209
+58923000000 58925914259 19641000000 19641971419 2461130816 2462102235
+58926000000 58928914494 19642000000 19642971498 2462130816 2463102314
+58929000000 58931914653 19643000000 19643971551 2463130816 2464102367
+58932000000 58934914774 19644000000 19644971591 2464130816 2465102407
+58935000000 58937914934 19645000000 19645971644 2465130816 2466102460
+58938000000 58940915017 19646000000 19646971672 2466130816 2467102488
+58941000000 58943915263 19647000000 19647971754 2467130816 2468102570
+58944000000 58946915386 19648000000 19648971795 2468130816 2469102611
+58947000000 58949915522 19649000000 19649971840 2469130816 2470102656
+58950000000 58952915697 19650000000 19650971899 2470130816 2471102715
+58953000000 58955915819 19651000000 19651971939 2471130816 2472102755
+58956000000 58958915969 19652000000 19652971989 2472130816 2473102805
+58959000000 58961916117 19653000000 19653972039 2473130816 2474102855
+58962000000 58964089811 19654000000 19654696603 2474130816 2474827419
+58965000000 58967916437 19655000000 19655972145 2475130816 2476102961
+58968000000 58970916569 19656000000 19656972189 2476130816 2477103005
+58971000000 58973916743 19657000000 19657972247 2477130816 2478103063
+58974000000 58976916862 19658000000 19658972287 2478130816 2479103103
+58977000000 58979916986 19659000000 19659972328 2479130816 2480103144
+58980000000 58982917205 19660000000 19660972401 2480130816 2481103217
+58983000000 58985917341 19661000000 19661972447 2481130816 2482103263
+58986000000 58988917492 19662000000 19662972497 2482130816 2483103313
+58989000000 58991917642 19663000000 19663972547 2483130816 2484103363
+58992000000 58994917757 19664000000 19664972585 2484130816 2485103401
+58995000000 58997917854 19665000000 19665972618 2485130816 2486103434
+58998000000 59000918062 19666000000 19666972687 2486130816 2487103503
+59001000000 59003918217 19667000000 19667972739 2487130816 2488103555
+59004000000 59006918376 19668000000 19668972792 2488130816 2489103608
+59007000000 59009918550 19669000000 19669972850 2489130816 2490103666
+59010000000 59012918650 19670000000 19670972883 2490130816 2491103699
+59013000000 59015918828 19671000000 19671972942 2491130816 2492103758
+59016000000 59018918977 19672000000 19672972992 2492130816 2493103808
+59019000000 59021919105 19673000000 19673973035 2493130816 2494103851
+59022000000 59024919274 19674000000 19674973091 2494130816 2495103907
+59025000000 59027919394 19675000000 19675973131 2495130816 2496103947
+59028000000 59029746744 19676000000 19676582248 2496130816 2496713064
+59031000000 59033919644 19677000000 19677973214 2497130816 2498104030
+59034000000 59036919902 19678000000 19678973300 2498130816 2499104116
+59037000000 59039920007 19679000000 19679973335 2499130816 2500104151
+59040000000 59042920087 19680000000 19680973362 2500130816 2501104178
+59043000000 59045920234 19681000000 19681973411 2501130816 2502104227
+59046000000 59048920488 19682000000 19682973496 2502130816 2503104312
+59049000000 59051920578 19683000000 19683973526 2503130816 2504104342
+59052000000 59054920823 19684000000 19684973607 2504130816 2505104423
+59055000000 59057920901 19685000000 19685973633 2505130816 2506104449
+59058000000 59060921078 19686000000 19686973692 2506130816 2507104508
+59061000000 59063921224 19687000000 19687973741 2507130816 2508104557
+59064000000 59066921368 19688000000 19688973789 2508130816 2509104605
+59067000000 59068544022 19689000000 19689514674 2509130816 2509645490
+59070000000 59072921683 19690000000 19690973894 2510130816 2511104710
+59073000000 59075921843 19691000000 19691973947 2511130816 2512104763
+59076000000 59078921980 19692000000 19692973993 2512130816 2513104809
+59079000000 59081922138 19693000000 19693974046 2513130816 2514104862
+59082000000 59084922296 19694000000 19694974098 2514130816 2515104914
+59085000000 59087922410 19695000000 19695974136 2515130816 2516104952
+59088000000 59090922571 19696000000 19696974190 2516130816 2517105006
+59091000000 59093922698 19697000000 19697974232 2517130816 2518105048
+59094000000 59096922807 19698000000 19698974269 2518130816 2519105085
+59097000000 59099922949 19699000000 19699974316 2519130816 2520105132
+59100000000 59102923183 19700000000 19700974394 2520130816 2521105210
+59103000000 59105923096 19701000000 19701974365 2521130816 2522105181
+59106000000 59108923217 19702000000 19702974405 2522130816 2523105221
+59109000000 59111923325 19703000000 19703974441 2523130816 2524105257
+59112000000 59114923560 19704000000 19704974520 2524130816 2525105336
+59115000000 59117923739 19705000000 19705974579 2525130816 2526105395
+59118000000 59120837379 19706000000 19706945793 2526130816 2527076609
+59121000000 59123924008 19707000000 19707974669 2527130816 2528105485
+59124000000 59126924181 19708000000 19708974727 2528130816 2529105543
+59127000000 59129924297 19709000000 19709974765 2529130816 2530105581
+59130000000 59132924470 19710000000 19710974823 2530130816 2531105639
+59133000000 59135924642 19711000000 19711974880 2531130816 2532105696
+59136000000 59138924698 19712000000 19712974899 2532130816 2533105715
+59139000000 59141924844 19713000000 19713974948 2533130816 2534105764
+59142000000 59144925040 19714000000 19714975013 2534130816 2535105829
+59145000000 59147925069 19715000000 19715975023 2535130816 2536105839
+59148000000 59150925375 19716000000 19716975125 2536130816 2537105941
+59151000000 59153925547 19717000000 19717975182 2537130816 2538105998
+59154000000 59156925680 19718000000 19718975226 2538130816 2539106042
+59157000000 59159925797 19719000000 19719975265 2539130816 2540106081
+59160000000 59162925982 19720000000 19720975327 2540130816 2541106143
+59163000000 59165926088 19721000000 19721975362 2541130816 2542106178
+59166000000 59168926269 19722000000 19722975423 2542130816 2543106239
+59169000000 59171926481 19723000000 19723975493 2543130816 2544106309
+59172000000 59174926588 19724000000 19724975529 2544130816 2545106345
+59175000000 59177926754 19725000000 19725975584 2545130816 2546106400
+59178000000 59180525499 19726000000 19726841833 2546130816 2546972649
+59181000000 59183927025 19727000000 19727975675 2547130816 2548106491
+59184000000 59186927137 19728000000 19728975712 2548130816 2549106528
+59187000000 59189927346 19729000000 19729975782 2549130816 2550106598
+59190000000 59192927425 19730000000 19730975808 2550130816 2551106624
+59193000000 59195927650 19731000000 19731975883 2551130816 2552106699
+59196000000 59198927777 19732000000 19732975925 2552130816 2553106741
+59199000000 59201927866 19733000000 19733975955 2553130816 2554106771
+59202000000 59204927972 19734000000 19734975990 2554130816 2555106806
+59205000000 59207928183 19735000000 19735976061 2555130816 2556106877
+59208000000 59210928392 19736000000 19736976130 2556130816 2557106946
+59211000000 59213928537 19737000000 19737976179 2557130816 2558106995
+59214000000 59216928663 19738000000 19738976221 2558130816 2559107037
+59217000000 59219928829 19739000000 19739976276 2559130816 2560107092
+59220000000 59222928909 19740000000 19740976303 2560130816 2561107119
+59223000000 59225929144 19741000000 19741976381 2561130816 2562107197
+59226000000 59228929303 19742000000 19742976434 2562130816 2563107250
+59229000000 59231929424 19743000000 19743976474 2563130816 2564107290
+59232000000 59234929584 19744000000 19744976528 2564130816 2565107344
+59235000000 59237929667 19745000000 19745976555 2565130816 2566107371
+59238000000 59240929913 19746000000 19746976637 2566130816 2567107453
+59241000000 59243930036 19747000000 19747976678 2567130816 2568107494
+59244000000 59246930172 19748000000 19748976724 2568130816 2569107540
+59247000000 59249930347 19749000000 19749976782 2569130816 2570107598
+59250000000 59252930469 19750000000 19750976823 2570130816 2571107639
+59253000000 59255930619 19751000000 19751976873 2571130816 2572107689
+59256000000 59258930767 19752000000 19752976922 2572130816 2573107738
+59259000000 59261104461 19753000000 19753701487 2573130816 2573832303
+59262000000 59264931087 19754000000 19754977029 2574130816 2575107845
+59265000000 59267931219 19755000000 19755977073 2575130816 2576107889
+59268000000 59270931393 19756000000 19756977131 2576130816 2577107947
+59271000000 59273931512 19757000000 19757977170 2577130816 2578107986
+59274000000 59276931636 19758000000 19758977212 2578130816 2579108028
+59277000000 59279931855 19759000000 19759977285 2579130816 2580108101
+59280000000 59282931991 19760000000 19760977330 2580130816 2581108146
+59283000000 59285932142 19761000000 19761977380 2581130816 2582108196
+59286000000 59288932292 19762000000 19762977430 2582130816 2583108246
+59289000000 59291932407 19763000000 19763977469 2583130816 2584108285
+59292000000 59294932504 19764000000 19764977501 2584130816 2585108317
+59295000000 59297932712 19765000000 19765977570 2585130816 2586108386
+59298000000 59300932867 19766000000 19766977622 2586130816 2587108438
+59301000000 59303933026 19767000000 19767977675 2587130816 2588108491
+59304000000 59306933200 19768000000 19768977733 2588130816 2589108549
+59307000000 59309933300 19769000000 19769977766 2589130816 2590108582
+59310000000 59312933478 19770000000 19770977826 2590130816 2591108642
+59313000000 59315933627 19771000000 19771977875 2591130816 2592108691
+59316000000 59318933755 19772000000 19772977918 2592130816 2593108734
+59319000000 59321933924 19773000000 19773977974 2593130816 2594108790
+59322000000 59324934044 19774000000 19774978014 2594130816 2595108830
+59325000000 59326761394 19775000000 19775587131 2595130816 2595717947
+59328000000 59330934294 19776000000 19776978098 2596130816 2597108914
+59331000000 59333934552 19777000000 19777978184 2597130816 2598109000
+59334000000 59336934657 19778000000 19778978219 2598130816 2599109035
+59337000000 59339934737 19779000000 19779978245 2599130816 2600109061
+59340000000 59342934884 19780000000 19780978294 2600130816 2601109110
+59343000000 59345935138 19781000000 19781978379 2601130816 2602109195
+59346000000 59348935228 19782000000 19782978409 2602130816 2603109225
+59349000000 59351935473 19783000000 19783978491 2603130816 2604109307
+59352000000 59354935551 19784000000 19784978517 2604130816 2605109333
+59355000000 59357935728 19785000000 19785978576 2605130816 2606109392
+59358000000 59360935874 19786000000 19786978624 2606130816 2607109440
+59361000000 59363936018 19787000000 19787978672 2607130816 2608109488
+59364000000 59365558672 19788000000 19788519557 2608130816 2608650373
+59367000000 59369936333 19789000000 19789978777 2609130816 2610109593
+59370000000 59372936493 19790000000 19790978831 2610130816 2611109647
+59373000000 59375936630 19791000000 19791978876 2611130816 2612109692
+59376000000 59378936788 19792000000 19792978929 2612130816 2613109745
+59379000000 59381936946 19793000000 19793978982 2613130816 2614109798
+59382000000 59384937060 19794000000 19794979020 2614130816 2615109836
+59385000000 59387937221 19795000000 19795979073 2615130816 2616109889
+59388000000 59390937348 19796000000 19796979116 2616130816 2617109932
+59391000000 59393937457 19797000000 19797979152 2617130816 2618109968
+59394000000 59396937599 19798000000 19798979199 2618130816 2619110015
+59397000000 59399937833 19799000000 19799979277 2619130816 2620110093
+59400000000 59402937746 19800000000 19800979248 2620130816 2621110064
+59403000000 59405937867 19801000000 19801979289 2621130816 2622110105
+59406000000 59408937975 19802000000 19802979325 2622130816 2623110141
+59409000000 59411938210 19803000000 19803979403 2623130816 2624110219
+59412000000 59414938389 19804000000 19804979463 2624130816 2625110279
+59415000000 59417852029 19805000000 19805950676 2625130816 2626081492
+59418000000 59420938658 19806000000 19806979552 2626130816 2627110368
+59421000000 59423938831 19807000000 19807979610 2627130816 2628110426
+59424000000 59426938947 19808000000 19808979649 2628130816 2629110465
+59427000000 59429939120 19809000000 19809979706 2629130816 2630110522
+59430000000 59432939292 19810000000 19810979764 2630130816 2631110580
+59433000000 59435939348 19811000000 19811979782 2631130816 2632110598
+59436000000 59438939494 19812000000 19812979831 2632130816 2633110647
+59439000000 59441939690 19813000000 19813979896 2633130816 2634110712
+59442000000 59444939719 19814000000 19814979906 2634130816 2635110722
+59445000000 59447940025 19815000000 19815980008 2635130816 2636110824
+59448000000 59450940197 19816000000 19816980065 2636130816 2637110881
+59451000000 59453940330 19817000000 19817980110 2637130816 2638110926
+59454000000 59456940447 19818000000 19818980149 2638130816 2639110965
+59457000000 59459940632 19819000000 19819980210 2639130816 2640111026
+59460000000 59462940738 19820000000 19820980246 2640130816 2641111062
+59463000000 59465940919 19821000000 19821980306 2641130816 2642111122
+59466000000 59468941131 19822000000 19822980377 2642130816 2643111193
+59469000000 59471941238 19823000000 19823980412 2643130816 2644111228
+59472000000 59474941404 19824000000 19824980468 2644130816 2645111284
+59475000000 59477540149 19825000000 19825846716 2645130816 2645977532
+59478000000 59480941675 19826000000 19826980558 2646130816 2647111374
+59481000000 59483941787 19827000000 19827980595 2647130816 2648111411
+59484000000 59486941996 19828000000 19828980665 2648130816 2649111481
+59487000000 59489942075 19829000000 19829980691 2649130816 2650111507
+59490000000 59492942300 19830000000 19830980766 2650130816 2651111582
+59493000000 59495942427 19831000000 19831980809 2651130816 2652111625
+59496000000 59498942516 19832000000 19832980838 2652130816 2653111654
+59499000000 59501942622 19833000000 19833980874 2653130816 2654111690
+59502000000 59504942833 19834000000 19834980944 2654130816 2655111760
+59505000000 59507943042 19835000000 19835981014 2655130816 2656111830
+59508000000 59510943187 19836000000 19836981062 2656130816 2657111878
+59511000000 59513943313 19837000000 19837981104 2657130816 2658111920
+59514000000 59516943479 19838000000 19838981159 2658130816 2659111975
+59517000000 59519943559 19839000000 19839981186 2659130816 2660112002
+59520000000 59522943794 19840000000 19840981264 2660130816 2661112080
+59523000000 59525943953 19841000000 19841981317 2661130816 2662112133
+59526000000 59528944074 19842000000 19842981358 2662130816 2663112174
+59529000000 59531944234 19843000000 19843981411 2663130816 2664112227
+59532000000 59534944317 19844000000 19844981439 2664130816 2665112255
+59535000000 59537944563 19845000000 19845981521 2665130816 2666112337
+59538000000 59540944686 19846000000 19846981562 2666130816 2667112378
+59541000000 59543944822 19847000000 19847981607 2667130816 2668112423
+59544000000 59546944997 19848000000 19848981665 2668130816 2669112481
+59547000000 59549945119 19849000000 19849981706 2669130816 2670112522
+59550000000 59552945269 19850000000 19850981756 2670130816 2671112572
+59553000000 59555945417 19851000000 19851981805 2671130816 2672112621
+59556000000 59558119111 19852000000 19852706370 2672130816 2672837186
+59559000000 59561945737 19853000000 19853981912 2673130816 2674112728
+59562000000 59564945869 19854000000 19854981956 2674130816 2675112772
+59565000000 59567946043 19855000000 19855982014 2675130816 2676112830
+59568000000 59570946162 19856000000 19856982054 2676130816 2677112870
+59571000000 59573946286 19857000000 19857982095 2677130816 2678112911
+59574000000 59576946505 19858000000 19858982168 2678130816 2679112984
+59577000000 59579946641 19859000000 19859982213 2679130816 2680113029
+59580000000 59582946792 19860000000 19860982264 2680130816 2681113080
+59583000000 59585946942 19861000000 19861982314 2681130816 2682113130
+59586000000 59588947057 19862000000 19862982352 2682130816 2683113168
+59589000000 59591947154 19863000000 19863982384 2683130816 2684113200
+59592000000 59594947362 19864000000 19864982454 2684130816 2685113270
+59595000000 59597947517 19865000000 19865982505 2685130816 2686113321
+59598000000 59600947676 19866000000 19866982558 2686130816 2687113374
+59601000000 59603947850 19867000000 19867982616 2687130816 2688113432
+59604000000 59606947950 19868000000 19868982650 2688130816 2689113466
+59607000000 59609948128 19869000000 19869982709 2689130816 2690113525
+59610000000 59612948277 19870000000 19870982759 2690130816 2691113575
+59613000000 59615948405 19871000000 19871982801 2691130816 2692113617
+59616000000 59618948574 19872000000 19872982858 2692130816 2693113674
+59619000000 59621948694 19873000000 19873982898 2693130816 2694113714
+59622000000 59623776044 19874000000 19874592014 2694130816 2694722830
+59625000000 59627948944 19875000000 19875982981 2695130816 2696113797
+59628000000 59630949202 19876000000 19876983067 2696130816 2697113883
+59631000000 59633949307 19877000000 19877983102 2697130816 2698113918
+59634000000 59636949387 19878000000 19878983129 2698130816 2699113945
+59637000000 59639949534 19879000000 19879983178 2699130816 2700113994
+59640000000 59642949788 19880000000 19880983262 2700130816 2701114078
+59643000000 59645949878 19881000000 19881983292 2701130816 2702114108
+59646000000 59648950123 19882000000 19882983374 2702130816 2703114190
+59649000000 59651950201 19883000000 19883983400 2703130816 2704114216
+59652000000 59654950378 19884000000 19884983459 2704130816 2705114275
+59655000000 59657950524 19885000000 19885983508 2705130816 2706114324
+59658000000 59660950668 19886000000 19886983556 2706130816 2707114372
+59661000000 59662573322 19887000000 19887524440 2707130816 2707655256
+59664000000 59666950983 19888000000 19888983661 2708130816 2709114477
+59667000000 59669951143 19889000000 19889983714 2709130816 2710114530
+59670000000 59672951280 19890000000 19890983760 2710130816 2711114576
+59673000000 59675951438 19891000000 19891983812 2711130816 2712114628
+59676000000 59678951596 19892000000 19892983865 2712130816 2713114681
+59679000000 59681951710 19893000000 19893983903 2713130816 2714114719
+59682000000 59684951871 19894000000 19894983957 2714130816 2715114773
+59685000000 59687951998 19895000000 19895983999 2715130816 2716114815
+59688000000 59690952107 19896000000 19896984035 2716130816 2717114851
+59691000000 59693952249 19897000000 19897984083 2717130816 2718114899
+59694000000 59696952483 19898000000 19898984161 2718130816 2719114977
+59697000000 59699952396 19899000000 19899984132 2719130816 2720114948
+59700000000 59702952517 19900000000 19900984172 2720130816 2721114988
+59703000000 59705952625 19901000000 19901984208 2721130816 2722115024
+59706000000 59708952860 19902000000 19902984286 2722130816 2723115102
+59709000000 59711953039 19903000000 19903984346 2723130816 2724115162
+59712000000 59714866679 19904000000 19904955559 2724130816 2725086375
+59715000000 59717953308 19905000000 19905984436 2725130816 2726115252
+59718000000 59720953481 19906000000 19906984493 2726130816 2727115309
+59721000000 59723953597 19907000000 19907984532 2727130816 2728115348
+59724000000 59726953770 19908000000 19908984590 2728130816 2729115406
+59727000000 59729953942 19909000000 19909984647 2729130816 2730115463
+59730000000 59732953998 19910000000 19910984666 2730130816 2731115482
+59733000000 59735954144 19911000000 19911984714 2731130816 2732115530
+59736000000 59738954340 19912000000 19912984780 2732130816 2733115596
+59739000000 59741954369 19913000000 19913984789 2733130816 2734115605
+59742000000 59744954675 19914000000 19914984891 2734130816 2735115707
+59745000000 59747954847 19915000000 19915984949 2735130816 2736115765
+59748000000 59750954980 19916000000 19916984993 2736130816 2737115809
+59751000000 59753955097 19917000000 19917985032 2737130816 2738115848
+59754000000 59756955282 19918000000 19918985094 2738130816 2739115910
+59757000000 59759955388 19919000000 19919985129 2739130816 2740115945
+59760000000 59762955569 19920000000 19920985189 2740130816 2741116005
+59763000000 59765955781 19921000000 19921985260 2741130816 2742116076
+59766000000 59768955888 19922000000 19922985296 2742130816 2743116112
+59769000000 59771956054 19923000000 19923985351 2743130816 2744116167
+59772000000 59774554799 19924000000 19924851599 2744130816 2744982415
+59775000000 59777956325 19925000000 19925985441 2745130816 2746116257
+59778000000 59780956437 19926000000 19926985479 2746130816 2747116295
+59781000000 59783956646 19927000000 19927985548 2747130816 2748116364
+59784000000 59786956725 19928000000 19928985575 2748130816 2749116391
+59787000000 59789956950 19929000000 19929985650 2749130816 2750116466
+59790000000 59792957077 19930000000 19930985692 2750130816 2751116508
+59793000000 59795957166 19931000000 19931985722 2751130816 2752116538
+59796000000 59798957272 19932000000 19932985757 2752130816 2753116573
+59799000000 59801957483 19933000000 19933985827 2753130816 2754116643
+59802000000 59804957692 19934000000 19934985897 2754130816 2755116713
+59805000000 59807957837 19935000000 19935985945 2755130816 2756116761
+59808000000 59810957963 19936000000 19936985987 2756130816 2757116803
+59811000000 59813958129 19937000000 19937986043 2757130816 2758116859
+59814000000 59816958209 19938000000 19938986069 2758130816 2759116885
+59817000000 59819958444 19939000000 19939986148 2759130816 2760116964
+59820000000 59822958603 19940000000 19940986201 2760130816 2761117017
+59823000000 59825958724 19941000000 19941986241 2761130816 2762117057
+59826000000 59828958884 19942000000 19942986294 2762130816 2763117110
+59829000000 59831958967 19943000000 19943986322 2763130816 2764117138
+59832000000 59834959213 19944000000 19944986404 2764130816 2765117220
+59835000000 59837959336 19945000000 19945986445 2765130816 2766117261
+59838000000 59840959472 19946000000 19946986490 2766130816 2767117306
+59841000000 59843959647 19947000000 19947986549 2767130816 2768117365
+59844000000 59846959769 19948000000 19948986589 2768130816 2769117405
+59847000000 59849959919 19949000000 19949986639 2769130816 2770117455
+59850000000 59852960067 19950000000 19950986689 2770130816 2771117505
+59853000000 59855133761 19951000000 19951711253 2771130816 2771842069
+59856000000 59858960387 19952000000 19952986795 2772130816 2773117611
+59859000000 59861960519 19953000000 19953986839 2773130816 2774117655
+59862000000 59864960693 19954000000 19954986897 2774130816 2775117713
+59865000000 59867960812 19955000000 19955986937 2775130816 2776117753
+59868000000 59870960936 19956000000 19956986978 2776130816 2777117794
+59871000000 59873961155 19957000000 19957987051 2777130816 2778117867
+59874000000 59876961291 19958000000 19958987097 2778130816 2779117913
+59877000000 59879961442 19959000000 19959987147 2779130816 2780117963
+59880000000 59882961592 19960000000 19960987197 2780130816 2781118013
+59883000000 59885961707 19961000000 19961987235 2781130816 2782118051
+59886000000 59888961804 19962000000 19962987268 2782130816 2783118084
+59889000000 59891962012 19963000000 19963987337 2783130816 2784118153
+59892000000 59894962167 19964000000 19964987389 2784130816 2785118205
+59895000000 59897962326 19965000000 19965987442 2785130816 2786118258
+59898000000 59900962500 19966000000 19966987500 2786130816 2787118316
+59901000000 59903962600 19967000000 19967987533 2787130816 2788118349
+59904000000 59906962778 19968000000 19968987592 2788130816 2789118408
+59907000000 59909962927 19969000000 19969987642 2789130816 2790118458
+59910000000 59912963055 19970000000 19970987685 2790130816 2791118501
+59913000000 59915963224 19971000000 19971987741 2791130816 2792118557
+59916000000 59918963344 19972000000 19972987781 2792130816 2793118597
+59919000000 59920790694 19973000000 19973596898 2793130816 2793727714
+59922000000 59924963594 19974000000 19974987864 2794130816 2795118680
+59925000000 59927963852 19975000000 19975987950 2795130816 2796118766
+59928000000 59930963957 19976000000 19976987985 2796130816 2797118801
+59931000000 59933964037 19977000000 19977988012 2797130816 2798118828
+59934000000 59936964184 19978000000 19978988061 2798130816 2799118877
+59937000000 59939964438 19979000000 19979988146 2799130816 2800118962
+59940000000 59942964528 19980000000 19980988176 2800130816 2801118992
+59943000000 59945964773 19981000000 19981988257 2801130816 2802119073
+59946000000 59948964851 19982000000 19982988283 2802130816 2803119099
+59949000000 59951965028 19983000000 19983988342 2803130816 2804119158
+59952000000 59954965174 19984000000 19984988391 2804130816 2805119207
+59955000000 59957965318 19985000000 19985988439 2805130816 2806119255
+59958000000 59959587972 19986000000 19986529324 2806130816 2806660140
+59961000000 59963965633 19987000000 19987988544 2807130816 2808119360
+59964000000 59966965793 19988000000 19988988597 2808130816 2809119413
+59967000000 59969965930 19989000000 19989988643 2809130816 2810119459
+59970000000 59972966088 19990000000 19990988696 2810130816 2811119512
+59973000000 59975966246 19991000000 19991988748 2811130816 2812119564
+59976000000 59978966360 19992000000 19992988786 2812130816 2813119602
+59979000000 59981966521 19993000000 19993988840 2813130816 2814119656
+59982000000 59984966648 19994000000 19994988882 2814130816 2815119698
+59985000000 59987966757 19995000000 19995988919 2815130816 2816119735
+59988000000 59990966899 19996000000 19996988966 2816130816 2817119782
+59991000000 59993967133 19997000000 19997989044 2817130816 2818119860
+59994000000 59996967046 19998000000 19998989015 2818130816 2819119831
+59997000000 59999967167 19999000000 19999989055 2819130816 2820119871
+60000000000 60002967275 20000000000 20000989091 2820130816 2821119907
+60003000000 60005967510 20001000000 20001989170 2821130816 2822119986
+60006000000 60008967689 20002000000 20002989229 2822130816 2823120045
+60009000000 60011881329 20003000000 20003960443 2823130816 2824091259
+60012000000 60014967958 20004000000 20004989319 2824130816 2825120135
+60015000000 60017968131 20005000000 20005989377 2825130816 2826120193
+60018000000 60020968247 20006000000 20006989415 2826130816 2827120231
+60021000000 60023968420 20007000000 20007989473 2827130816 2828120289
+60024000000 60026968592 20008000000 20008989530 2828130816 2829120346
+60027000000 60029968648 20009000000 20009989549 2829130816 2830120365
+60030000000 60032968794 20010000000 20010989598 2830130816 2831120414
+60033000000 60035968990 20011000000 20011989663 2831130816 2832120479
+60036000000 60038969019 20012000000 20012989673 2832130816 2833120489
+60039000000 60041969325 20013000000 20013989775 2833130816 2834120591
+60042000000 60044969497 20014000000 20014989832 2834130816 2835120648
+60045000000 60047969630 20015000000 20015989876 2835130816 2836120692
+60048000000 60050969747 20016000000 20016989915 2836130816 2837120731
+60051000000 60053969932 20017000000 20017989977 2837130816 2838120793
+60054000000 60056970038 20018000000 20018990012 2838130816 2839120828
+60057000000 60059970219 20019000000 20019990073 2839130816 2840120889
+60060000000 60062970431 20020000000 20020990143 2840130816 2841120959
+60063000000 60065970538 20021000000 20021990179 2841130816 2842120995
+60066000000 60068970704 20022000000 20022990234 2842130816 2843121050
+60069000000 60071569449 20023000000 20023856483 2843130816 2843987299
+60072000000 60074970975 20024000000 20024990325 2844130816 2845121141
+60075000000 60077971087 20025000000 20025990362 2845130816 2846121178
+60078000000 60080971296 20026000000 20026990432 2846130816 2847121248
+60081000000 60083971375 20027000000 20027990458 2847130816 2848121274
+60084000000 60086971600 20028000000 20028990533 2848130816 2849121349
+60087000000 60089971727 20029000000 20029990575 2849130816 2850121391
+60090000000 60092971816 20030000000 20030990605 2850130816 2851121421
+60093000000 60095971922 20031000000 20031990640 2851130816 2852121456
+60096000000 60098972133 20032000000 20032990711 2852130816 2853121527
+60099000000 60101972342 20033000000 20033990780 2853130816 2854121596
+60102000000 60104972487 20034000000 20034990829 2854130816 2855121645
+60105000000 60107972613 20035000000 20035990871 2855130816 2856121687
+60108000000 60110972779 20036000000 20036990926 2856130816 2857121742
+60111000000 60113972859 20037000000 20037990953 2857130816 2858121769
+60114000000 60116973094 20038000000 20038991031 2858130816 2859121847
+60117000000 60119973253 20039000000 20039991084 2859130816 2860121900
+60120000000 60122973374 20040000000 20040991124 2860130816 2861121940
+60123000000 60125973534 20041000000 20041991178 2861130816 2862121994
+60126000000 60128973617 20042000000 20042991205 2862130816 2863122021
+60129000000 60131973863 20043000000 20043991287 2863130816 2864122103
+60132000000 60134973986 20044000000 20044991328 2864130816 2865122144
+60135000000 60137974122 20045000000 20045991374 2865130816 2866122190
+60138000000 60140974297 20046000000 20046991432 2866130816 2867122248
+60141000000 60143974419 20047000000 20047991473 2867130816 2868122289
+60144000000 60146974569 20048000000 20048991523 2868130816 2869122339
+60147000000 60149974717 20049000000 20049991572 2869130816 2870122388
+60150000000 60152148411 20050000000 20050716137 2870130816 2870846953
+60153000000 60155975037 20051000000 20051991679 2871130816 2872122495
+60156000000 60158975169 20052000000 20052991723 2872130816 2873122539
+60159000000 60161975343 20053000000 20053991781 2873130816 2874122597
+60162000000 60164975462 20054000000 20054991820 2874130816 2875122636
+60165000000 60167975586 20055000000 20055991862 2875130816 2876122678
+60168000000 60170975805 20056000000 20056991935 2876130816 2877122751
+60171000000 60173975941 20057000000 20057991980 2877130816 2878122796
+60174000000 60176976092 20058000000 20058992030 2878130816 2879122846
+60177000000 60179976242 20059000000 20059992080 2879130816 2880122896
+60180000000 60182976357 20060000000 20060992119 2880130816 2881122935
+60183000000 60185976454 20061000000 20061992151 2881130816 2882122967
+60186000000 60188976662 20062000000 20062992220 2882130816 2883123036
+60189000000 60191976817 20063000000 20063992272 2883130816 2884123088
+60192000000 60194976976 20064000000 20064992325 2884130816 2885123141
+60195000000 60197977150 20065000000 20065992383 2885130816 2886123199
+60198000000 60200977250 20066000000 20066992416 2886130816 2887123232
+60201000000 60203977428 20067000000 20067992476 2887130816 2888123292
+60204000000 60206977577 20068000000 20068992525 2888130816 2889123341
+60207000000 60209977705 20069000000 20069992568 2889130816 2890123384
+60210000000 60212977874 20070000000 20070992624 2890130816 2891123440
+60213000000 60215977994 20071000000 20071992664 2891130816 2892123480
+60216000000 60217805344 20072000000 20072601781 2892130816 2892732597
+60219000000 60221978244 20073000000 20073992748 2893130816 2894123564
+60222000000 60224978502 20074000000 20074992834 2894130816 2895123650
+60225000000 60227978607 20075000000 20075992869 2895130816 2896123685
+60228000000 60230978687 20076000000 20076992895 2896130816 2897123711
+60231000000 60233978834 20077000000 20077992944 2897130816 2898123760
+60234000000 60236979088 20078000000 20078993029 2898130816 2899123845
+60237000000 60239979178 20079000000 20079993059 2899130816 2900123875
+60240000000 60242979423 20080000000 20080993141 2900130816 2901123957
+60243000000 60245979501 20081000000 20081993167 2901130816 2902123983
+60246000000 60248979678 20082000000 20082993226 2902130816 2903124042
+60249000000 60251979824 20083000000 20083993274 2903130816 2904124090
+60252000000 60254979968 20084000000 20084993322 2904130816 2905124138
+60255000000 60256602622 20085000000 20085534207 2905130816 2905665023
+60258000000 60260980283 20086000000 20086993427 2906130816 2907124243
+60261000000 60263980443 20087000000 20087993481 2907130816 2908124297
+60264000000 60266980580 20088000000 20088993526 2908130816 2909124342
+60267000000 60269980738 20089000000 20089993579 2909130816 2910124395
+60270000000 60272980896 20090000000 20090993632 2910130816 2911124448
+60273000000 60275981010 20091000000 20091993670 2911130816 2912124486
+60276000000 60278981171 20092000000 20092993723 2912130816 2913124539
+60279000000 60281981298 20093000000 20093993766 2913130816 2914124582
+60282000000 60284981407 20094000000 20094993802 2914130816 2915124618
+60285000000 60287981549 20095000000 20095993849 2915130816 2916124665
+60288000000 60290981783 20096000000 20096993927 2916130816 2917124743
+60291000000 60293981696 20097000000 20097993898 2917130816 2918124714
+60294000000 60296981817 20098000000 20098993939 2918130816 2919124755
+60297000000 60299981925 20099000000 20099993975 2919130816 2920124791
+60300000000 60302982160 20100000000 20100994053 2920130816 2921124869
+60303000000 60305982339 20101000000 20101994113 2921130816 2922124929
+60306000000 60308895979 20102000000 20102965326 2922130816 2923096142
+60309000000 60311982608 20103000000 20103994202 2923130816 2924125018
+60312000000 60314982781 20104000000 20104994260 2924130816 2925125076
+60315000000 60317982897 20105000000 20105994299 2925130816 2926125115
+60318000000 60320983070 20106000000 20106994356 2926130816 2927125172
+60321000000 60323983242 20107000000 20107994414 2927130816 2928125230
+60324000000 60326983298 20108000000 20108994432 2928130816 2929125248
+60327000000 60329983444 20109000000 20109994481 2929130816 2930125297
+60330000000 60332983640 20110000000 20110994546 2930130816 2931125362
+60333000000 60335983669 20111000000 20111994556 2931130816 2932125372
+60336000000 60338983975 20112000000 20112994658 2932130816 2933125474
+60339000000 60341984147 20113000000 20113994715 2933130816 2934125531
+60342000000 60344984280 20114000000 20114994760 2934130816 2935125576
+60345000000 60347984397 20115000000 20115994799 2935130816 2936125615
+60348000000 60350984582 20116000000 20116994860 2936130816 2937125676
+60351000000 60353984688 20117000000 20117994896 2937130816 2938125712
+60354000000 60356984869 20118000000 20118994956 2938130816 2939125772
+60357000000 60359985081 20119000000 20119995027 2939130816 2940125843
+60360000000 60362985188 20120000000 20120995062 2940130816 2941125878
+60363000000 60365985354 20121000000 20121995118 2941130816 2942125934
+60366000000 60368584099 20122000000 20122861366 2942130816 2942992182
+60369000000 60371985625 20123000000 20123995208 2943130816 2944126024
+60372000000 60374985737 20124000000 20124995245 2944130816 2945126061
+60375000000 60377985946 20125000000 20125995315 2945130816 2946126131
+60378000000 60380986025 20126000000 20126995341 2946130816 2947126157
+60381000000 60383986250 20127000000 20127995416 2947130816 2948126232
+60384000000 60386986377 20128000000 20128995459 2948130816 2949126275
+60387000000 60389986466 20129000000 20129995488 2949130816 2950126304
+60390000000 60392986572 20130000000 20130995524 2950130816 2951126340
+60393000000 60395986783 20131000000 20131995594 2951130816 2952126410
+60396000000 60398986992 20132000000 20132995664 2952130816 2953126480
+60399000000 60401987137 20133000000 20133995712 2953130816 2954126528
+60402000000 60404987263 20134000000 20134995754 2954130816 2955126570
+60405000000 60407987429 20135000000 20135995809 2955130816 2956126625
+60408000000 60410987509 20136000000 20136995836 2956130816 2957126652
+60411000000 60413987744 20137000000 20137995914 2957130816 2958126730
+60414000000 60416987903 20138000000 20138995967 2958130816 2959126783
+60417000000 60419988024 20139000000 20139996008 2959130816 2960126824
+60420000000 60422988184 20140000000 20140996061 2960130816 2961126877
+60423000000 60425988267 20141000000 20141996089 2961130816 2962126905
+60426000000 60428988513 20142000000 20142996171 2962130816 2963126987
+60429000000 60431988636 20143000000 20143996212 2963130816 2964127028
+60432000000 60434988772 20144000000 20144996257 2964130816 2965127073
+60435000000 60437988947 20145000000 20145996315 2965130816 2966127131
+60438000000 60440989069 20146000000 20146996356 2966130816 2967127172
+60441000000 60443989219 20147000000 20147996406 2967130816 2968127222
+60444000000 60446989367 20148000000 20148996455 2968130816 2969127271
+60447000000 60449163061 20149000000 20149721020 2969130816 2969851836
+60450000000 60452989687 20150000000 20150996562 2970130816 2971127378
+60453000000 60455989819 20151000000 20151996606 2971130816 2972127422
+60456000000 60458989993 20152000000 20152996664 2972130816 2973127480
+60459000000 60461990112 20153000000 20153996704 2973130816 2974127520
+60462000000 60464990236 20154000000 20154996745 2974130816 2975127561
+60465000000 60467990455 20155000000 20155996818 2975130816 2976127634
+60468000000 60470990591 20156000000 20156996863 2976130816 2977127679
+60471000000 60473990742 20157000000 20157996914 2977130816 2978127730
+60474000000 60476990892 20158000000 20158996964 2978130816 2979127780
+60477000000 60479991007 20159000000 20159997002 2979130816 2980127818
+60480000000 60482991104 20160000000 20160997034 2980130816 2981127850
+60483000000 60485991312 20161000000 20161997104 2981130816 2982127920
+60486000000 60488991467 20162000000 20162997155 2982130816 2983127971
+60489000000 60491991626 20163000000 20163997208 2983130816 2984128024
+60492000000 60494991800 20164000000 20164997266 2984130816 2985128082
+60495000000 60497991900 20165000000 20165997300 2985130816 2986128116
+60498000000 60500992078 20166000000 20166997359 2986130816 2987128175
+60501000000 60503992227 20167000000 20167997409 2987130816 2988128225
+60504000000 60506992355 20168000000 20168997451 2988130816 2989128267
+60507000000 60509992524 20169000000 20169997508 2989130816 2990128324
+60510000000 60512992644 20170000000 20170997548 2990130816 2991128364
+60513000000 60514819994 20171000000 20171606664 2991130816 2991737480
+60516000000 60518992894 20172000000 20172997631 2992130816 2993128447
+60519000000 60521993152 20173000000 20173997717 2993130816 2994128533
+60522000000 60524993257 20174000000 20174997752 2994130816 2995128568
+60525000000 60527993337 20175000000 20175997779 2995130816 2996128595
+60528000000 60530993484 20176000000 20176997828 2996130816 2997128644
+60531000000 60533993738 20177000000 20177997912 2997130816 2998128728
+60534000000 60536993828 20178000000 20178997942 2998130816 2999128758
+60537000000 60539994073 20179000000 20179998024 2999130816 3000128840
+60540000000 60542994151 20180000000 20180998050 3000130816 3001128866
+60543000000 60545994328 20181000000 20181998109 3001130816 3002128925
+60546000000 60548994474 20182000000 20182998158 3002130816 3003128974
+60549000000 60551994618 20183000000 20183998206 3003130816 3004129022
+60552000000 60553617272 20184000000 20184539090 3004130816 3004669906
+60555000000 60557994933 20185000000 20185998311 3005130816 3006129127
+60558000000 60560995093 20186000000 20186998364 3006130816 3007129180
+60561000000 60563995230 20187000000 20187998410 3007130816 3008129226
+60564000000 60566995388 20188000000 20188998462 3008130816 3009129278
+60567000000 60569995546 20189000000 20189998515 3009130816 3010129331
+60570000000 60572995660 20190000000 20190998553 3010130816 3011129369
+60573000000 60575995821 20191000000 20191998607 3011130816 3012129423
+60576000000 60578995948 20192000000 20192998649 3012130816 3013129465
+60579000000 60581996057 20193000000 20193998685 3013130816 3014129501
+60582000000 60584996199 20194000000 20194998733 3014130816 3015129549
+60585000000 60587996433 20195000000 20195998811 3015130816 3016129627
+60588000000 60590996346 20196000000 20196998782 3016130816 3017129598
+60591000000 60593996467 20197000000 20197998822 3017130816 3018129638
+60594000000 60596996575 20198000000 20198998858 3018130816 3019129674
+60597000000 60599996810 20199000000 20199998936 3019130816 3020129752
+60600000000 60602996989 20200000000 20200998996 3020130816 3021129812
+60603000000 60605910629 20201000000 20201970209 3021130816 3022101025
+60606000000 60608997258 20202000000 20202999086 3022130816 3023129902
+60609000000 60611997431 20203000000 20203999143 3023130816 3024129959
+60612000000 60614997547 20204000000 20204999182 3024130816 3025129998
+60615000000 60617997720 20205000000 20205999240 3025130816 3026130056
+60618000000 60620997892 20206000000 20206999297 3026130816 3027130113
+60621000000 60623997948 20207000000 20207999316 3027130816 3028130132
+60624000000 60626998094 20208000000 20208999364 3028130816 3029130180
+60627000000 60629998290 20209000000 20209999430 3029130816 3030130246
+60630000000 60632998319 20210000000 20210999439 3030130816 3031130255
+60633000000 60635998625 20211000000 20211999541 3031130816 3032130357
+60636000000 60638998797 20212000000 20212999599 3032130816 3033130415
+60639000000 60641998930 20213000000 20213999643 3033130816 3034130459
+60642000000 60644999047 20214000000 20214999682 3034130816 3035130498
+60645000000 60647999232 20215000000 20215999744 3035130816 3036130560
+60648000000 60650999338 20216000000 20216999779 3036130816 3037130595
+60651000000 60653999519 20217000000 20217999839 3037130816 3038130655
+60654000000 60656999731 20218000000 20218999910 3038130816 3039130726
+60657000000 60659999838 20219000000 20219999946 3039130816 3040130762
+60660000000 60663000004 20220000000 20221000001 3040130816 3041130817
+60663000000 60665598749 20221000000 20221866249 3041130816 3041997065
+60666000000 60669000275 20222000000 20223000091 3042130816 3043130907
+60669000000 60672000387 20223000000 20224000129 3043130816 3044130945
+60672000000 60675000596 20224000000 20225000198 3044130816 3045131014
+60675000000 60678000675 20225000000 20226000225 3045130816 3046131041
+60678000000 60681000900 20226000000 20227000300 3046130816 3047131116
+60681000000 60684001027 20227000000 20228000342 3047130816 3048131158
+60684000000 60687001116 20228000000 20229000372 3048130816 3049131188
+60687000000 60690001222 20229000000 20230000407 3049130816 3050131223
+60690000000 60693001433 20230000000 20231000477 3050130816 3051131293
+60693000000 60696001642 20231000000 20232000547 3051130816 3052131363
+60696000000 60699001787 20232000000 20233000595 3052130816 3053131411
+60699000000 60702001913 20233000000 20234000637 3053130816 3054131453
+60702000000 60705002079 20234000000 20235000693 3054130816 3055131509
+60705000000 60708002159 20235000000 20236000719 3055130816 3056131535
+60708000000 60711002394 20236000000 20237000798 3056130816 3057131614
+60711000000 60714002553 20237000000 20238000851 3057130816 3058131667
+60714000000 60717002674 20238000000 20239000891 3058130816 3059131707
+60717000000 60720002834 20239000000 20240000944 3059130816 3060131760
+60720000000 60723002917 20240000000 20241000972 3060130816 3061131788
+60723000000 60726003163 20241000000 20242001054 3061130816 3062131870
+60726000000 60729003286 20242000000 20243001095 3062130816 3063131911
+60729000000 60732003422 20243000000 20244001140 3063130816 3064131956
+60732000000 60735003597 20244000000 20245001199 3064130816 3065132015
+60735000000 60738003719 20245000000 20246001239 3065130816 3066132055
+60738000000 60741003869 20246000000 20247001289 3066130816 3067132105
+60741000000 60744004017 20247000000 20248001339 3067130816 3068132155
+60744000000 60746177711 20248000000 20248725903 3068130816 3068856719
+60747000000 60750004337 20249000000 20250001445 3069130816 3070132261
+60750000000 60753004469 20250000000 20251001489 3070130816 3071132305
+60753000000 60756004643 20251000000 20252001547 3071130816 3072132363
+60756000000 60759004762 20252000000 20253001587 3072130816 3073132403
+60759000000 60762004886 20253000000 20254001628 3073130816 3074132444
+60762000000 60765005105 20254000000 20255001701 3074130816 3075132517
+60765000000 60768005241 20255000000 20256001747 3075130816 3076132563
+60768000000 60771005392 20256000000 20257001797 3076130816 3077132613
+60771000000 60774005542 20257000000 20258001847 3077130816 3078132663
+60774000000 60777005657 20258000000 20259001885 3078130816 3079132701
+60777000000 60780005754 20259000000 20260001918 3079130816 3080132734
+60780000000 60783005962 20260000000 20261001987 3080130816 3081132803
+60783000000 60786006117 20261000000 20262002039 3081130816 3082132855
+60786000000 60789006276 20262000000 20263002092 3082130816 3083132908
+60789000000 60792006450 20263000000 20264002150 3083130816 3084132966
+60792000000 60795006550 20264000000 20265002183 3084130816 3085132999
+60795000000 60798006728 20265000000 20266002242 3085130816 3086133058
+60798000000 60801006877 20266000000 20267002292 3086130816 3087133108
+60801000000 60804007005 20267000000 20268002335 3087130816 3088133151
+60804000000 60807007174 20268000000 20269002391 3088130816 3089133207
+60807000000 60810007294 20269000000 20270002431 3089130816 3090133247
+60810000000 60811834644 20270000000 20270611548 3090130816 3090742364
+60813000000 60816007544 20271000000 20272002514 3091130816 3092133330
+60816000000 60819007802 20272000000 20273002600 3092130816 3093133416
+60819000000 60822007907 20273000000 20274002635 3093130816 3094133451
+60822000000 60825007987 20274000000 20275002662 3094130816 3095133478
+60825000000 60828008134 20275000000 20276002711 3095130816 3096133527
+60828000000 60831008388 20276000000 20277002796 3096130816 3097133612
+60831000000 60834008478 20277000000 20278002826 3097130816 3098133642
+60834000000 60837008723 20278000000 20279002907 3098130816 3099133723
+60837000000 60840008801 20279000000 20280002933 3099130816 3100133749
+60840000000 60843008978 20280000000 20281002992 3100130816 3101133808
+60843000000 60846009124 20281000000 20282003041 3101130816 3102133857
+60846000000 60849009268 20282000000 20283003089 3102130816 3103133905
+60849000000 60850631922 20283000000 20283543974 3103130816 3103674790
+60852000000 60855009583 20284000000 20285003194 3104130816 3105134010
+60855000000 60858009743 20285000000 20286003247 3105130816 3106134063
+60858000000 60861009880 20286000000 20287003293 3106130816 3107134109
+60861000000 60864010038 20287000000 20288003346 3107130816 3108134162
+60864000000 60867010196 20288000000 20289003398 3108130816 3109134214
+60867000000 60870010310 20289000000 20290003436 3109130816 3110134252
+60870000000 60873010471 20290000000 20291003490 3110130816 3111134306
+60873000000 60876010598 20291000000 20292003532 3111130816 3112134348
+60876000000 60879010707 20292000000 20293003569 3112130816 3113134385
+60879000000 60882010849 20293000000 20294003616 3113130816 3114134432
+60882000000 60885011083 20294000000 20295003694 3114130816 3115134510
+60885000000 60888010996 20295000000 20296003665 3115130816 3116134481
+60888000000 60891011117 20296000000 20297003705 3116130816 3117134521
+60891000000 60894011225 20297000000 20298003741 3117130816 3118134557
+60894000000 60897011460 20298000000 20299003820 3118130816 3119134636
+60897000000 60900011639 20299000000 20300003879 3119130816 3120134695
+60900000000 60902925279 20300000000 20300975093 3120130816 3121105909
+60903000000 60906011908 20301000000 20302003969 3121130816 3122134785
+60906000000 60909012081 20302000000 20303004027 3122130816 3123134843
+60909000000 60912012197 20303000000 20304004065 3123130816 3124134881
+60912000000 60915012370 20304000000 20305004123 3124130816 3125134939
+60915000000 60918012542 20305000000 20306004180 3125130816 3126134996
+60918000000 60921012598 20306000000 20307004199 3126130816 3127135015
+60921000000 60924012744 20307000000 20308004248 3127130816 3128135064
+60924000000 60927012940 20308000000 20309004313 3128130816 3129135129
+60927000000 60930012969 20309000000 20310004323 3129130816 3130135139
+60930000000 60933013275 20310000000 20311004425 3130130816 3131135241
+60933000000 60936013447 20311000000 20312004482 3131130816 3132135298
+60936000000 60939013580 20312000000 20313004526 3132130816 3133135342
+60939000000 60942013697 20313000000 20314004565 3133130816 3134135381
+60942000000 60945013882 20314000000 20315004627 3134130816 3135135443
+60945000000 60948013988 20315000000 20316004662 3135130816 3136135478
+60948000000 60951014169 20316000000 20317004723 3136130816 3137135539
+60951000000 60954014381 20317000000 20318004793 3137130816 3138135609
+60954000000 60957014488 20318000000 20319004829 3138130816 3139135645
+60957000000 60960014654 20319000000 20320004884 3139130816 3140135700
+60960000000 60962613399 20320000000 20320871133 3140130816 3141001949
+60963000000 60966014925 20321000000 20322004975 3141130816 3142135791
+60966000000 60969015037 20322000000 20323005012 3142130816 3143135828
+60969000000 60972015246 20323000000 20324005082 3143130816 3144135898
+60972000000 60975015325 20324000000 20325005108 3144130816 3145135924
+60975000000 60978015550 20325000000 20326005183 3145130816 3146135999
+60978000000 60981015677 20326000000 20327005225 3146130816 3147136041
+60981000000 60984015766 20327000000 20328005255 3147130816 3148136071
+60984000000 60987015872 20328000000 20329005290 3148130816 3149136106
+60987000000 60990016083 20329000000 20330005361 3149130816 3150136177
+60990000000 60993016292 20330000000 20331005430 3150130816 3151136246
+60993000000 60996016437 20331000000 20332005479 3151130816 3152136295
+60996000000 60999016563 20332000000 20333005521 3152130816 3153136337
+60999000000 61002016729 20333000000 20334005576 3153130816 3154136392
+61002000000 61005016809 20334000000 20335005603 3154130816 3155136419
+61005000000 61008017044 20335000000 20336005681 3155130816 3156136497
+61008000000 61011017203 20336000000 20337005734 3156130816 3157136550
+61011000000 61014017324 20337000000 20338005774 3157130816 3158136590
+61014000000 61017017484 20338000000 20339005828 3158130816 3159136644
+61017000000 61020017567 20339000000 20340005855 3159130816 3160136671
+61020000000 61023017813 20340000000 20341005937 3160130816 3161136753
+61023000000 61026017936 20341000000 20342005978 3161130816 3162136794
+61026000000 61029018072 20342000000 20343006024 3162130816 3163136840
+61029000000 61032018247 20343000000 20344006082 3163130816 3164136898
+61032000000 61035018369 20344000000 20345006123 3164130816 3165136939
+61035000000 61038018519 20345000000 20346006173 3165130816 3166136989
+61038000000 61041018667 20346000000 20347006222 3166130816 3167137038
+61041000000 61043192361 20347000000 20347730787 3167130816 3167861603
+61044000000 61047018987 20348000000 20349006329 3168130816 3169137145
+61047000000 61050019119 20349000000 20350006373 3169130816 3170137189
+61050000000 61053019293 20350000000 20351006431 3170130816 3171137247
+61053000000 61056019412 20351000000 20352006470 3171130816 3172137286
+61056000000 61059019536 20352000000 20353006512 3172130816 3173137328
+61059000000 61062019755 20353000000 20354006585 3173130816 3174137401
+61062000000 61065019891 20354000000 20355006630 3174130816 3175137446
+61065000000 61068020042 20355000000 20356006680 3175130816 3176137496
+61068000000 61071020192 20356000000 20357006730 3176130816 3177137546
+61071000000 61074020307 20357000000 20358006769 3177130816 3178137585
+61074000000 61077020404 20358000000 20359006801 3178130816 3179137617
+61077000000 61080020612 20359000000 20360006870 3179130816 3180137686
+61080000000 61083020767 20360000000 20361006922 3180130816 3181137738
+61083000000 61086020926 20361000000 20362006975 3181130816 3182137791
+61086000000 61089021100 20362000000 20363007033 3182130816 3183137849
+61089000000 61092021200 20363000000 20364007066 3183130816 3184137882
+61092000000 61095021378 20364000000 20365007126 3184130816 3185137942
+61095000000 61098021527 20365000000 20366007175 3185130816 3186137991
+61098000000 61101021655 20366000000 20367007218 3186130816 3187138034
+61101000000 61104021824 20367000000 20368007274 3187130816 3188138090
+61104000000 61107021944 20368000000 20369007314 3188130816 3189138130
+61107000000 61108849294 20369000000 20369616431 3189130816 3189747247
+61110000000 61113022194 20370000000 20371007398 3190130816 3191138214
+61113000000 61116022452 20371000000 20372007484 3191130816 3192138300
+61116000000 61119022557 20372000000 20373007519 3192130816 3193138335
+61119000000 61122022637 20373000000 20374007545 3193130816 3194138361
+61122000000 61125022784 20374000000 20375007594 3194130816 3195138410
+61125000000 61128023038 20375000000 20376007679 3195130816 3196138495
+61128000000 61131023128 20376000000 20377007709 3196130816 3197138525
+61131000000 61134023373 20377000000 20378007791 3197130816 3198138607
+61134000000 61137023451 20378000000 20379007817 3198130816 3199138633
+61137000000 61140023628 20379000000 20380007876 3199130816 3200138692
+61140000000 61143023774 20380000000 20381007924 3200130816 3201138740
+61143000000 61146023918 20381000000 20382007972 3201130816 3202138788
+61146000000 61147646572 20382000000 20382548857 3202130816 3202679673
+61149000000 61152024233 20383000000 20384008077 3203130816 3204138893
+61152000000 61155024393 20384000000 20385008131 3204130816 3205138947
+61155000000 61158024530 20385000000 20386008176 3205130816 3206138992
+61158000000 61161024688 20386000000 20387008229 3206130816 3207139045
+61161000000 61164024846 20387000000 20388008282 3207130816 3208139098
+61164000000 61167024960 20388000000 20389008320 3208130816 3209139136
+61167000000 61170025121 20389000000 20390008373 3209130816 3210139189
+61170000000 61173025248 20390000000 20391008416 3210130816 3211139232
+61173000000 61176025357 20391000000 20392008452 3211130816 3212139268
+61176000000 61179025499 20392000000 20393008499 3212130816 3213139315
+61179000000 61182025733 20393000000 20394008577 3213130816 3214139393
+61182000000 61185025646 20394000000 20395008548 3214130816 3215139364
+61185000000 61188025767 20395000000 20396008589 3215130816 3216139405
+61188000000 61191025875 20396000000 20397008625 3216130816 3217139441
+61191000000 61194026110 20397000000 20398008703 3217130816 3218139519
+61194000000 61197026289 20398000000 20399008763 3218130816 3219139579
+61197000000 61199939929 20399000000 20399979976 3219130816 3220110792
+61200000000 61203026558 20400000000 20401008852 3220130816 3221139668
+61203000000 61206026731 20401000000 20402008910 3221130816 3222139726
+61206000000 61209026847 20402000000 20403008949 3222130816 3223139765
+61209000000 61212027020 20403000000 20404009006 3223130816 3224139822
+61212000000 61215027192 20404000000 20405009064 3224130816 3225139880
+61215000000 61218027248 20405000000 20406009082 3225130816 3226139898
+61218000000 61221027394 20406000000 20407009131 3226130816 3227139947
+61221000000 61224027590 20407000000 20408009196 3227130816 3228140012
+61224000000 61227027619 20408000000 20409009206 3228130816 3229140022
+61227000000 61230027925 20409000000 20410009308 3229130816 3230140124
+61230000000 61233028097 20410000000 20411009365 3230130816 3231140181
+61233000000 61236028230 20411000000 20412009410 3231130816 3232140226
+61236000000 61239028347 20412000000 20413009449 3232130816 3233140265
+61239000000 61242028532 20413000000 20414009510 3233130816 3234140326
+61242000000 61245028638 20414000000 20415009546 3234130816 3235140362
+61245000000 61248028819 20415000000 20416009606 3235130816 3236140422
+61248000000 61251029031 20416000000 20417009677 3236130816 3237140493
+61251000000 61254029138 20417000000 20418009712 3237130816 3238140528
+61254000000 61257029304 20418000000 20419009768 3238130816 3239140584
+61257000000 61259628049 20419000000 20419876016 3239130816 3240006832
+61260000000 61263029575 20420000000 20421009858 3240130816 3241140674
+61263000000 61266029687 20421000000 20422009895 3241130816 3242140711
+61266000000 61269029896 20422000000 20423009965 3242130816 3243140781
+61269000000 61272029975 20423000000 20424009991 3243130816 3244140807
+61272000000 61275030200 20424000000 20425010066 3244130816 3245140882
+61275000000 61278030327 20425000000 20426010109 3245130816 3246140925
+61278000000 61281030416 20426000000 20427010138 3246130816 3247140954
+61281000000 61284030522 20427000000 20428010174 3247130816 3248140990
+61284000000 61287030733 20428000000 20429010244 3248130816 3249141060
+61287000000 61290030942 20429000000 20430010314 3249130816 3250141130
+61290000000 61293031087 20430000000 20431010362 3250130816 3251141178
+61293000000 61296031213 20431000000 20432010404 3251130816 3252141220
+61296000000 61299031379 20432000000 20433010459 3252130816 3253141275
+61299000000 61302031459 20433000000 20434010486 3253130816 3254141302
+61302000000 61305031694 20434000000 20435010564 3254130816 3255141380
+61305000000 61308031853 20435000000 20436010617 3255130816 3256141433
+61308000000 61311031974 20436000000 20437010658 3256130816 3257141474
+61311000000 61314032134 20437000000 20438010711 3257130816 3258141527
+61314000000 61317032217 20438000000 20439010739 3258130816 3259141555
+61317000000 61320032463 20439000000 20440010821 3259130816 3260141637
+61320000000 61323032586 20440000000 20441010862 3260130816 3261141678
+61323000000 61326032722 20441000000 20442010907 3261130816 3262141723
+61326000000 61329032897 20442000000 20443010965 3262130816 3263141781
+61329000000 61332033019 20443000000 20444011006 3263130816 3264141822
+61332000000 61335033169 20444000000 20445011056 3264130816 3265141872
+61335000000 61338033317 20445000000 20446011105 3265130816 3266141921
+61338000000 61340207011 20446000000 20446735670 3266130816 3266866486
+61341000000 61344033637 20447000000 20448011212 3267130816 3268142028
+61344000000 61347033769 20448000000 20449011256 3268130816 3269142072
+61347000000 61350033943 20449000000 20450011314 3269130816 3270142130
+61350000000 61353034062 20450000000 20451011354 3270130816 3271142170
+61353000000 61356034186 20451000000 20452011395 3271130816 3272142211
+61356000000 61359034405 20452000000 20453011468 3272130816 3273142284
+61359000000 61362034541 20453000000 20454011513 3273130816 3274142329
+61362000000 61365034692 20454000000 20455011564 3274130816 3275142380
+61365000000 61368034842 20455000000 20456011614 3275130816 3276142430
+61368000000 61371034957 20456000000 20457011652 3276130816 3277142468
+61371000000 61374035054 20457000000 20458011684 3277130816 3278142500
+61374000000 61377035262 20458000000 20459011754 3278130816 3279142570
+61377000000 61380035417 20459000000 20460011805 3279130816 3280142621
+61380000000 61383035576 20460000000 20461011858 3280130816 3281142674
+61383000000 61386035750 20461000000 20462011916 3281130816 3282142732
+61386000000 61389035850 20462000000 20463011950 3282130816 3283142766
+61389000000 61392036028 20463000000 20464012009 3283130816 3284142825
+61392000000 61395036177 20464000000 20465012059 3284130816 3285142875
+61395000000 61398036305 20465000000 20466012101 3285130816 3286142917
+61398000000 61401036474 20466000000 20467012158 3286130816 3287142974
+61401000000 61404036594 20467000000 20468012198 3287130816 3288143014
+61404000000 61405863944 20468000000 20468621314 3288130816 3288752130
+61407000000 61410036844 20469000000 20470012281 3289130816 3290143097
+61410000000 61413037102 20470000000 20471012367 3290130816 3291143183
+61413000000 61416037207 20471000000 20472012402 3291130816 3292143218
+61416000000 61419037287 20472000000 20473012429 3292130816 3293143245
+61419000000 61422037434 20473000000 20474012478 3293130816 3294143294
+61422000000 61425037688 20474000000 20475012562 3294130816 3295143378
+61425000000 61428037778 20475000000 20476012592 3295130816 3296143408
+61428000000 61431038023 20476000000 20477012674 3296130816 3297143490
+61431000000 61434038101 20477000000 20478012700 3297130816 3298143516
+61434000000 61437038278 20478000000 20479012759 3298130816 3299143575
+61437000000 61440038424 20479000000 20480012808 3299130816 3300143624
+61440000000 61443038568 20480000000 20481012856 3300130816 3301143672
+61443000000 61444661222 20481000000 20481553740 3301130816 3301684556
+61446000000 61449038883 20482000000 20483012961 3302130816 3303143777
+61449000000 61452039043 20483000000 20484013014 3303130816 3304143830
+61452000000 61455039180 20484000000 20485013060 3304130816 3305143876
+61455000000 61458039338 20485000000 20486013112 3305130816 3306143928
+61458000000 61461039496 20486000000 20487013165 3306130816 3307143981
+61461000000 61464039610 20487000000 20488013203 3307130816 3308144019
+61464000000 61467039771 20488000000 20489013257 3308130816 3309144073
+61467000000 61470039898 20489000000 20490013299 3309130816 3310144115
+61470000000 61473040007 20490000000 20491013335 3310130816 3311144151
+61473000000 61476040149 20491000000 20492013383 3311130816 3312144199
+61476000000 61479040383 20492000000 20493013461 3312130816 3313144277
+61479000000 61482040296 20493000000 20494013432 3313130816 3314144248
+61482000000 61485040417 20494000000 20495013472 3314130816 3315144288
+61485000000 61488040525 20495000000 20496013508 3315130816 3316144324
+61488000000 61491040760 20496000000 20497013586 3316130816 3317144402
+61491000000 61494040939 20497000000 20498013646 3317130816 3318144462
+61494000000 61496954579 20498000000 20498984859 3318130816 3319115675
+61497000000 61500041208 20499000000 20500013736 3319130816 3320144552
+61500000000 61503041381 20500000000 20501013793 3320130816 3321144609
+61503000000 61506041497 20501000000 20502013832 3321130816 3322144648
+61506000000 61509041670 20502000000 20503013890 3322130816 3323144706
+61509000000 61512041842 20503000000 20504013947 3323130816 3324144763
+61512000000 61515041898 20504000000 20505013966 3324130816 3325144782
+61515000000 61518042044 20505000000 20506014014 3325130816 3326144830
+61518000000 61521042240 20506000000 20507014080 3326130816 3327144896
+61521000000 61524042269 20507000000 20508014089 3327130816 3328144905
+61524000000 61527042575 20508000000 20509014191 3328130816 3329145007
+61527000000 61530042747 20509000000 20510014249 3329130816 3330145065
+61530000000 61533042880 20510000000 20511014293 3330130816 3331145109
+61533000000 61536042997 20511000000 20512014332 3331130816 3332145148
+61536000000 61539043182 20512000000 20513014394 3332130816 3333145210
+61539000000 61542043288 20513000000 20514014429 3333130816 3334145245
+61542000000 61545043469 20514000000 20515014489 3334130816 3335145305
+61545000000 61548043681 20515000000 20516014560 3335130816 3336145376
+61548000000 61551043788 20516000000 20517014596 3336130816 3337145412
+61551000000 61554043954 20517000000 20518014651 3337130816 3338145467
+61554000000 61556642699 20518000000 20518880899 3338130816 3339011715
+61557000000 61560044225 20519000000 20520014741 3339130816 3340145557
+61560000000 61563044337 20520000000 20521014779 3340130816 3341145595
+61563000000 61566044546 20521000000 20522014848 3341130816 3342145664
+61566000000 61569044625 20522000000 20523014875 3342130816 3343145691
+61569000000 61572044850 20523000000 20524014950 3343130816 3344145766
+61572000000 61575044977 20524000000 20525014992 3344130816 3345145808
+61575000000 61578045066 20525000000 20526015022 3345130816 3346145838
+61578000000 61581045172 20526000000 20527015057 3346130816 3347145873
+61581000000 61584045383 20527000000 20528015127 3347130816 3348145943
+61584000000 61587045592 20528000000 20529015197 3348130816 3349146013
+61587000000 61590045737 20529000000 20530015245 3349130816 3350146061
+61590000000 61593045863 20530000000 20531015287 3350130816 3351146103
+61593000000 61596046029 20531000000 20532015343 3351130816 3352146159
+61596000000 61599046109 20532000000 20533015369 3352130816 3353146185
+61599000000 61602046344 20533000000 20534015448 3353130816 3354146264
+61602000000 61605046503 20534000000 20535015501 3354130816 3355146317
+61605000000 61608046624 20535000000 20536015541 3355130816 3356146357
+61608000000 61611046784 20536000000 20537015594 3356130816 3357146410
+61611000000 61614046867 20537000000 20538015622 3357130816 3358146438
+61614000000 61617047113 20538000000 20539015704 3358130816 3359146520
+61617000000 61620047236 20539000000 20540015745 3359130816 3360146561
+61620000000 61623047372 20540000000 20541015790 3360130816 3361146606
+61623000000 61626047547 20541000000 20542015849 3361130816 3362146665
+61626000000 61629047669 20542000000 20543015889 3362130816 3363146705
+61629000000 61632047819 20543000000 20544015939 3363130816 3364146755
+61632000000 61635047967 20544000000 20545015989 3364130816 3365146805
+61635000000 61637221661 20545000000 20545740553 3365130816 3365871369
+61638000000 61641048287 20546000000 20547016095 3366130816 3367146911
+61641000000 61644048419 20547000000 20548016139 3367130816 3368146955
+61644000000 61647048593 20548000000 20549016197 3368130816 3369147013
+61647000000 61650048712 20549000000 20550016237 3369130816 3370147053
+61650000000 61653048836 20550000000 20551016278 3370130816 3371147094
+61653000000 61656049055 20551000000 20552016351 3371130816 3372147167
+61656000000 61659049191 20552000000 20553016397 3372130816 3373147213
+61659000000 61662049342 20553000000 20554016447 3373130816 3374147263
+61662000000 61665049492 20554000000 20555016497 3374130816 3375147313
+61665000000 61668049607 20555000000 20556016535 3375130816 3376147351
+61668000000 61671049704 20556000000 20557016568 3376130816 3377147384
+61671000000 61674049912 20557000000 20558016637 3377130816 3378147453
+61674000000 61677050067 20558000000 20559016689 3378130816 3379147505
+61677000000 61680050226 20559000000 20560016742 3379130816 3380147558
+61680000000 61683050400 20560000000 20561016800 3380130816 3381147616
+61683000000 61686050500 20561000000 20562016833 3381130816 3382147649
+61686000000 61689050678 20562000000 20563016892 3382130816 3383147708
+61689000000 61692050827 20563000000 20564016942 3383130816 3384147758
+61692000000 61695050955 20564000000 20565016985 3384130816 3385147801
+61695000000 61698051124 20565000000 20566017041 3385130816 3386147857
+61698000000 61701051244 20566000000 20567017081 3386130816 3387147897
+61701000000 61702878594 20567000000 20567626198 3387130816 3387757014
+61704000000 61707051494 20568000000 20569017164 3388130816 3389147980
+61707000000 61710051752 20569000000 20570017250 3389130816 3390148066
+61710000000 61713051857 20570000000 20571017285 3390130816 3391148101
+61713000000 61716051937 20571000000 20572017312 3391130816 3392148128
+61716000000 61719052084 20572000000 20573017361 3392130816 3393148177
+61719000000 61722052338 20573000000 20574017446 3393130816 3394148262
+61722000000 61725052428 20574000000 20575017476 3394130816 3395148292
+61725000000 61728052673 20575000000 20576017557 3395130816 3396148373
+61728000000 61731052751 20576000000 20577017583 3396130816 3397148399
+61731000000 61734052928 20577000000 20578017642 3397130816 3398148458
+61734000000 61737053074 20578000000 20579017691 3398130816 3399148507
+61737000000 61740053218 20579000000 20580017739 3399130816 3400148555
+61740000000 61741675872 20580000000 20580558624 3400130816 3400689440
+61743000000 61746053533 20581000000 20582017844 3401130816 3402148660
+61746000000 61749053693 20582000000 20583017897 3402130816 3403148713
+61749000000 61752053830 20583000000 20584017943 3403130816 3404148759
+61752000000 61755053988 20584000000 20585017996 3404130816 3405148812
+61755000000 61758054146 20585000000 20586018048 3405130816 3406148864
+61758000000 61761054260 20586000000 20587018086 3406130816 3407148902
+61761000000 61764054421 20587000000 20588018140 3407130816 3408148956
+61764000000 61767054548 20588000000 20589018182 3408130816 3409148998
+61767000000 61770054657 20589000000 20590018219 3409130816 3410149035
+61770000000 61773054799 20590000000 20591018266 3410130816 3411149082
+61773000000 61776055033 20591000000 20592018344 3411130816 3412149160
+61776000000 61779054946 20592000000 20593018315 3412130816 3413149131
+61779000000 61782055067 20593000000 20594018355 3413130816 3414149171
+61782000000 61785055175 20594000000 20595018391 3414130816 3415149207
+61785000000 61788055410 20595000000 20596018470 3415130816 3416149286
+61788000000 61791055589 20596000000 20597018529 3416130816 3417149345
+61791000000 61793969229 20597000000 20597989743 3417130816 3418120559
+61794000000 61797055858 20598000000 20599018619 3418130816 3419149435
+61797000000 61800056031 20599000000 20600018677 3419130816 3420149493
+61800000000 61803056147 20600000000 20601018715 3420130816 3421149531
+61803000000 61806056320 20601000000 20602018773 3421130816 3422149589
+61806000000 61809056492 20602000000 20603018830 3422130816 3423149646
+61809000000 61812056548 20603000000 20604018849 3423130816 3424149665
+61812000000 61815056694 20604000000 20605018898 3424130816 3425149714
+61815000000 61818056890 20605000000 20606018963 3425130816 3426149779
+61818000000 61821056919 20606000000 20607018973 3426130816 3427149789
+61821000000 61824057225 20607000000 20608019075 3427130816 3428149891
+61824000000 61827057397 20608000000 20609019132 3428130816 3429149948
+61827000000 61830057530 20609000000 20610019176 3429130816 3430149992
+61830000000 61833057647 20610000000 20611019215 3430130816 3431150031
+61833000000 61836057832 20611000000 20612019277 3431130816 3432150093
+61836000000 61839057938 20612000000 20613019312 3432130816 3433150128
+61839000000 61842058119 20613000000 20614019373 3433130816 3434150189
+61842000000 61845058331 20614000000 20615019443 3434130816 3435150259
+61845000000 61848058438 20615000000 20616019479 3435130816 3436150295
+61848000000 61851058604 20616000000 20617019534 3436130816 3437150350
+61851000000 61853657349 20617000000 20617885783 3437130816 3438016599
+61854000000 61857058875 20618000000 20619019625 3438130816 3439150441
+61857000000 61860058987 20619000000 20620019662 3439130816 3440150478
+61860000000 61863059196 20620000000 20621019732 3440130816 3441150548
+61863000000 61866059275 20621000000 20622019758 3441130816 3442150574
+61866000000 61869059500 20622000000 20623019833 3442130816 3443150649
+61869000000 61872059627 20623000000 20624019875 3443130816 3444150691
+61872000000 61875059716 20624000000 20625019905 3444130816 3445150721
+61875000000 61878059822 20625000000 20626019940 3445130816 3446150756
+61878000000 61881060033 20626000000 20627020011 3446130816 3447150827
+61881000000 61884060242 20627000000 20628020080 3447130816 3448150896
+61884000000 61887060387 20628000000 20629020129 3448130816 3449150945
+61887000000 61890060513 20629000000 20630020171 3449130816 3450150987
+61890000000 61893060679 20630000000 20631020226 3450130816 3451151042
+61893000000 61896060759 20631000000 20632020253 3451130816 3452151069
+61896000000 61899060994 20632000000 20633020331 3452130816 3453151147
+61899000000 61902061153 20633000000 20634020384 3453130816 3454151200
+61902000000 61905061274 20634000000 20635020424 3454130816 3455151240
+61905000000 61908061434 20635000000 20636020478 3455130816 3456151294
+61908000000 61911061517 20636000000 20637020505 3456130816 3457151321
+61911000000 61914061763 20637000000 20638020587 3457130816 3458151403
+61914000000 61917061886 20638000000 20639020628 3458130816 3459151444
+61917000000 61920062022 20639000000 20640020674 3459130816 3460151490
+61920000000 61923062197 20640000000 20641020732 3460130816 3461151548
+61923000000 61926062319 20641000000 20642020773 3461130816 3462151589
+61926000000 61929062469 20642000000 20643020823 3462130816 3463151639
+61929000000 61932062617 20643000000 20644020872 3463130816 3464151688
+61932000000 61934236311 20644000000 20644745437 3464130816 3464876253
+61935000000 61938062937 20645000000 20646020979 3465130816 3466151795
+61938000000 61941063069 20646000000 20647021023 3466130816 3467151839
+61941000000 61944063243 20647000000 20648021081 3467130816 3468151897
+61944000000 61947063362 20648000000 20649021120 3468130816 3469151936
+61947000000 61950063486 20649000000 20650021162 3469130816 3470151978
+61950000000 61953063705 20650000000 20651021235 3470130816 3471152051
+61953000000 61956063841 20651000000 20652021280 3471130816 3472152096
+61956000000 61959063992 20652000000 20653021330 3472130816 3473152146
+61959000000 61962064142 20653000000 20654021380 3473130816 3474152196
+61962000000 61965064257 20654000000 20655021419 3474130816 3475152235
+61965000000 61968064354 20655000000 20656021451 3475130816 3476152267
+61968000000 61971064562 20656000000 20657021520 3476130816 3477152336
+61971000000 61974064717 20657000000 20658021572 3477130816 3478152388
+61974000000 61977064876 20658000000 20659021625 3478130816 3479152441
+61977000000 61980065050 20659000000 20660021683 3479130816 3480152499
+61980000000 61983065150 20660000000 20661021716 3480130816 3481152532
+61983000000 61986065328 20661000000 20662021776 3481130816 3482152592
+61986000000 61989065477 20662000000 20663021825 3482130816 3483152641
+61989000000 61992065605 20663000000 20664021868 3483130816 3484152684
+61992000000 61995065774 20664000000 20665021924 3484130816 3485152740
+61995000000 61998065894 20665000000 20666021964 3485130816 3486152780
+61998000000 61999893244 20666000000 20666631081 3486130816 3486761897
+62001000000 62004066144 20667000000 20668022048 3487130816 3488152864
+62004000000 62007066402 20668000000 20669022134 3488130816 3489152950
+62007000000 62010066507 20669000000 20670022169 3489130816 3490152985
+62010000000 62013066587 20670000000 20671022195 3490130816 3491153011
+62013000000 62016066734 20671000000 20672022244 3491130816 3492153060
+62016000000 62019066988 20672000000 20673022329 3492130816 3493153145
+62019000000 62022067078 20673000000 20674022359 3493130816 3494153175
+62022000000 62025067323 20674000000 20675022441 3494130816 3495153257
+62025000000 62028067401 20675000000 20676022467 3495130816 3496153283
+62028000000 62031067578 20676000000 20677022526 3496130816 3497153342
+62031000000 62034067724 20677000000 20678022574 3497130816 3498153390
+62034000000 62037067868 20678000000 20679022622 3498130816 3499153438
+62037000000 62038690522 20679000000 20679563507 3499130816 3499694323
+62040000000 62043068183 20680000000 20681022727 3500130816 3501153543
+62043000000 62046068343 20681000000 20682022781 3501130816 3502153597
+62046000000 62049068480 20682000000 20683022826 3502130816 3503153642
+62049000000 62052068638 20683000000 20684022879 3503130816 3504153695
+62052000000 62055068796 20684000000 20685022932 3504130816 3505153748
+62055000000 62058068910 20685000000 20686022970 3505130816 3506153786
+62058000000 62061069071 20686000000 20687023023 3506130816 3507153839
+62061000000 62064069198 20687000000 20688023066 3507130816 3508153882
+62064000000 62067069307 20688000000 20689023102 3508130816 3509153918
+62067000000 62070069449 20689000000 20690023149 3509130816 3510153965
+62070000000 62073069683 20690000000 20691023227 3510130816 3511154043
+62073000000 62076069596 20691000000 20692023198 3511130816 3512154014
+62076000000 62079069717 20692000000 20693023239 3512130816 3513154055
+62079000000 62082069825 20693000000 20694023275 3513130816 3514154091
+62082000000 62085070060 20694000000 20695023353 3514130816 3515154169
+62085000000 62088070239 20695000000 20696023413 3515130816 3516154229
+62088000000 62090983879 20696000000 20696994626 3516130816 3517125442
+62091000000 62094070508 20697000000 20698023502 3517130816 3518154318
+62094000000 62097070681 20698000000 20699023560 3518130816 3519154376
+62097000000 62100070797 20699000000 20700023599 3519130816 3520154415
+62100000000 62103070970 20700000000 20701023656 3520130816 3521154472
+62103000000 62106071142 20701000000 20702023714 3521130816 3522154530
+62106000000 62109071198 20702000000 20703023732 3522130816 3523154548
+62109000000 62112071344 20703000000 20704023781 3523130816 3524154597
+62112000000 62115071540 20704000000 20705023846 3524130816 3525154662
+62115000000 62118071569 20705000000 20706023856 3525130816 3526154672
+62118000000 62121071875 20706000000 20707023958 3526130816 3527154774
+62121000000 62124072047 20707000000 20708024015 3527130816 3528154831
+62124000000 62127072180 20708000000 20709024060 3528130816 3529154876
+62127000000 62130072297 20709000000 20710024099 3529130816 3530154915
+62130000000 62133072482 20710000000 20711024160 3530130816 3531154976
+62133000000 62136072588 20711000000 20712024196 3531130816 3532155012
+62136000000 62139072769 20712000000 20713024256 3532130816 3533155072
+62139000000 62142072981 20713000000 20714024327 3533130816 3534155143
+62142000000 62145073088 20714000000 20715024362 3534130816 3535155178
+62145000000 62148073254 20715000000 20716024418 3535130816 3536155234
+62148000000 62150671999 20716000000 20716890666 3536130816 3537021482
+62151000000 62154073525 20717000000 20718024508 3537130816 3538155324
+62154000000 62157073637 20718000000 20719024545 3538130816 3539155361
+62157000000 62160073846 20719000000 20720024615 3539130816 3540155431
+62160000000 62163073925 20720000000 20721024641 3540130816 3541155457
+62163000000 62166074150 20721000000 20722024716 3541130816 3542155532
+62166000000 62169074277 20722000000 20723024759 3542130816 3543155575
+62169000000 62172074366 20723000000 20724024788 3543130816 3544155604
+62172000000 62175074472 20724000000 20725024824 3544130816 3545155640
+62175000000 62178074683 20725000000 20726024894 3545130816 3546155710
+62178000000 62181074892 20726000000 20727024964 3546130816 3547155780
+62181000000 62184075037 20727000000 20728025012 3547130816 3548155828
+62184000000 62187075163 20728000000 20729025054 3548130816 3549155870
+62187000000 62190075329 20729000000 20730025109 3549130816 3550155925
+62190000000 62193075409 20730000000 20731025136 3550130816 3551155952
+62193000000 62196075644 20731000000 20732025214 3551130816 3552156030
+62196000000 62199075803 20732000000 20733025267 3552130816 3553156083
+62199000000 62202075924 20733000000 20734025308 3553130816 3554156124
+62202000000 62205076084 20734000000 20735025361 3554130816 3555156177
+62205000000 62208076167 20735000000 20736025389 3555130816 3556156205
+62208000000 62211076413 20736000000 20737025471 3556130816 3557156287
+62211000000 62214076536 20737000000 20738025512 3557130816 3558156328
+62214000000 62217076672 20738000000 20739025557 3558130816 3559156373
+62217000000 62220076847 20739000000 20740025615 3559130816 3560156431
+62220000000 62223076969 20740000000 20741025656 3560130816 3561156472
+62223000000 62226077119 20741000000 20742025706 3561130816 3562156522
+62226000000 62229077267 20742000000 20743025755 3562130816 3563156571
+62229000000 62231250961 20743000000 20743750320 3563130816 3563881136
+62232000000 62235077587 20744000000 20745025862 3564130816 3565156678
+62235000000 62238077719 20745000000 20746025906 3565130816 3566156722
+62238000000 62241077893 20746000000 20747025964 3566130816 3567156780
+62241000000 62244078012 20747000000 20748026004 3567130816 3568156820
+62244000000 62247078136 20748000000 20749026045 3568130816 3569156861
+62247000000 62250078355 20749000000 20750026118 3569130816 3570156934
+62250000000 62253078491 20750000000 20751026163 3570130816 3571156979
+62253000000 62256078642 20751000000 20752026214 3571130816 3572157030
+62256000000 62259078792 20752000000 20753026264 3572130816 3573157080
+62259000000 62262078907 20753000000 20754026302 3573130816 3574157118
+62262000000 62265079004 20754000000 20755026334 3574130816 3575157150
+62265000000 62268079212 20755000000 20756026404 3575130816 3576157220
+62268000000 62271079367 20756000000 20757026455 3576130816 3577157271
+62271000000 62274079526 20757000000 20758026508 3577130816 3578157324
+62274000000 62277079700 20758000000 20759026566 3578130816 3579157382
+62277000000 62280079800 20759000000 20760026600 3579130816 3580157416
+62280000000 62283079978 20760000000 20761026659 3580130816 3581157475
+62283000000 62286080127 20761000000 20762026709 3581130816 3582157525
+62286000000 62289080255 20762000000 20763026751 3582130816 3583157567
+62289000000 62292080424 20763000000 20764026808 3583130816 3584157624
+62292000000 62295080544 20764000000 20765026848 3584130816 3585157664
+62295000000 62296907894 20765000000 20765635964 3585130816 3585766780
+62298000000 62301080794 20766000000 20767026931 3586130816 3587157747
+62301000000 62304081052 20767000000 20768027017 3587130816 3588157833
+62304000000 62307081157 20768000000 20769027052 3588130816 3589157868
+62307000000 62310081237 20769000000 20770027079 3589130816 3590157895
+62310000000 62313081384 20770000000 20771027128 3590130816 3591157944
+62313000000 62316081638 20771000000 20772027212 3591130816 3592158028
+62316000000 62319081728 20772000000 20773027242 3592130816 3593158058
+62319000000 62322081973 20773000000 20774027324 3593130816 3594158140
+62322000000 62325082051 20774000000 20775027350 3594130816 3595158166
+62325000000 62328082228 20775000000 20776027409 3595130816 3596158225
+62328000000 62331082374 20776000000 20777027458 3596130816 3597158274
+62331000000 62334082518 20777000000 20778027506 3597130816 3598158322
+62334000000 62335705172 20778000000 20778568390 3598130816 3598699206
+62337000000 62340082833 20779000000 20780027611 3599130816 3600158427
+62340000000 62343082993 20780000000 20781027664 3600130816 3601158480
+62343000000 62346083130 20781000000 20782027710 3601130816 3602158526
+62346000000 62349083288 20782000000 20783027762 3602130816 3603158578
+62349000000 62352083446 20783000000 20784027815 3603130816 3604158631
+62352000000 62355083560 20784000000 20785027853 3604130816 3605158669
+62355000000 62358083721 20785000000 20786027907 3605130816 3606158723
+62358000000 62361083848 20786000000 20787027949 3606130816 3607158765
+62361000000 62364083957 20787000000 20788027985 3607130816 3608158801
+62364000000 62367084099 20788000000 20789028033 3608130816 3609158849
+62367000000 62370084333 20789000000 20790028111 3609130816 3610158927
+62370000000 62373084246 20790000000 20791028082 3610130816 3611158898
+62373000000 62376084367 20791000000 20792028122 3611130816 3612158938
+62376000000 62379084475 20792000000 20793028158 3612130816 3613158974
+62379000000 62382084710 20793000000 20794028236 3613130816 3614159052
+62382000000 62385084889 20794000000 20795028296 3614130816 3615159112
+62385000000 62387998529 20795000000 20795999509 3615130816 3616130325
+62388000000 62391085158 20796000000 20797028386 3616130816 3617159202
+62391000000 62394085331 20797000000 20798028443 3617130816 3618159259
+62394000000 62397085447 20798000000 20799028482 3618130816 3619159298
+62397000000 62400085620 20799000000 20800028540 3619130816 3620159356
+62400000000 62403085792 20800000000 20801028597 3620130816 3621159413
+62403000000 62406085848 20801000000 20802028616 3621130816 3622159432
+62406000000 62409085994 20802000000 20803028664 3622130816 3623159480
+62409000000 62412086190 20803000000 20804028730 3623130816 3624159546
+62412000000 62415086219 20804000000 20805028739 3624130816 3625159555
+62415000000 62418086525 20805000000 20806028841 3625130816 3626159657
+62418000000 62421086697 20806000000 20807028899 3626130816 3627159715
+62421000000 62424086830 20807000000 20808028943 3627130816 3628159759
+62424000000 62427086947 20808000000 20809028982 3628130816 3629159798
+62427000000 62430087132 20809000000 20810029044 3629130816 3630159860
+62430000000 62433087238 20810000000 20811029079 3630130816 3631159895
+62433000000 62436087419 20811000000 20812029139 3631130816 3632159955
+62436000000 62439087631 20812000000 20813029210 3632130816 3633160026
+62439000000 62442087738 20813000000 20814029246 3633130816 3634160062
+62442000000 62445087904 20814000000 20815029301 3634130816 3635160117
+62445000000 62447686649 20815000000 20815895549 3635130816 3636026365
+62448000000 62451088175 20816000000 20817029391 3636130816 3637160207
+62451000000 62454088287 20817000000 20818029429 3637130816 3638160245
+62454000000 62457088496 20818000000 20819029498 3638130816 3639160314
+62457000000 62460088575 20819000000 20820029525 3639130816 3640160341
+62460000000 62463088800 20820000000 20821029600 3640130816 3641160416
+62463000000 62466088927 20821000000 20822029642 3641130816 3642160458
+62466000000 62469089016 20822000000 20823029672 3642130816 3643160488
+62469000000 62472089122 20823000000 20824029707 3643130816 3644160523
+62472000000 62475089333 20824000000 20825029777 3644130816 3645160593
+62475000000 62478089542 20825000000 20826029847 3645130816 3646160663
+62478000000 62481089687 20826000000 20827029895 3646130816 3647160711
+62481000000 62484089813 20827000000 20828029937 3647130816 3648160753
+62484000000 62487089979 20828000000 20829029993 3648130816 3649160809
+62487000000 62490090059 20829000000 20830030019 3649130816 3650160835
+62490000000 62493090294 20830000000 20831030098 3650130816 3651160914
+62493000000 62496090453 20831000000 20832030151 3651130816 3652160967
+62496000000 62499090574 20832000000 20833030191 3652130816 3653161007
+62499000000 62502090734 20833000000 20834030244 3653130816 3654161060
+62502000000 62505090817 20834000000 20835030272 3654130816 3655161088
+62505000000 62508091063 20835000000 20836030354 3655130816 3656161170
+62508000000 62511091186 20836000000 20837030395 3656130816 3657161211
+62511000000 62514091322 20837000000 20838030440 3657130816 3658161256
+62514000000 62517091497 20838000000 20839030499 3658130816 3659161315
+62517000000 62520091619 20839000000 20840030539 3659130816 3660161355
+62520000000 62523091769 20840000000 20841030589 3660130816 3661161405
+62523000000 62526091917 20841000000 20842030639 3661130816 3662161455
+62526000000 62528265611 20842000000 20842755203 3662130816 3662886019
+62529000000 62532092237 20843000000 20844030745 3663130816 3664161561
+62532000000 62535092369 20844000000 20845030789 3664130816 3665161605
+62535000000 62538092543 20845000000 20846030847 3665130816 3666161663
+62538000000 62541092662 20846000000 20847030887 3666130816 3667161703
+62541000000 62544092786 20847000000 20848030928 3667130816 3668161744
+62544000000 62547093005 20848000000 20849031001 3668130816 3669161817
+62547000000 62550093141 20849000000 20850031047 3669130816 3670161863
+62550000000 62553093292 20850000000 20851031097 3670130816 3671161913
+62553000000 62556093442 20851000000 20852031147 3671130816 3672161963
+62556000000 62559093557 20852000000 20853031185 3672130816 3673162001
+62559000000 62562093654 20853000000 20854031218 3673130816 3674162034
+62562000000 62565093862 20854000000 20855031287 3674130816 3675162103
+62565000000 62568094017 20855000000 20856031339 3675130816 3676162155
+62568000000 62571094176 20856000000 20857031392 3676130816 3677162208
+62571000000 62574094350 20857000000 20858031450 3677130816 3678162266
+62574000000 62577094450 20858000000 20859031483 3678130816 3679162299
+62577000000 62580094628 20859000000 20860031542 3679130816 3680162358
+62580000000 62583094777 20860000000 20861031592 3680130816 3681162408
+62583000000 62586094905 20861000000 20862031635 3681130816 3682162451
+62586000000 62589095074 20862000000 20863031691 3682130816 3683162507
+62589000000 62592095194 20863000000 20864031731 3683130816 3684162547
+62592000000 62593922544 20864000000 20864640848 3684130816 3684771664
+62595000000 62598095444 20865000000 20866031814 3685130816 3686162630
+62598000000 62601095702 20866000000 20867031900 3686130816 3687162716
+62601000000 62604095807 20867000000 20868031935 3687130816 3688162751
+62604000000 62607095887 20868000000 20869031962 3688130816 3689162778
+62607000000 62610096034 20869000000 20870032011 3689130816 3690162827
+62610000000 62613096288 20870000000 20871032096 3690130816 3691162912
+62613000000 62616096378 20871000000 20872032126 3691130816 3692162942
+62616000000 62619096623 20872000000 20873032207 3692130816 3693163023
+62619000000 62622096701 20873000000 20874032233 3693130816 3694163049
+62622000000 62625096878 20874000000 20875032292 3694130816 3695163108
+62625000000 62628097024 20875000000 20876032341 3695130816 3696163157
+62628000000 62631097168 20876000000 20877032389 3696130816 3697163205
+62631000000 62632719822 20877000000 20877573274 3697130816 3697704090
+62634000000 62637097483 20878000000 20879032494 3698130816 3699163310
+62637000000 62640097643 20879000000 20880032547 3699130816 3700163363
+62640000000 62643097780 20880000000 20881032593 3700130816 3701163409
+62643000000 62646097938 20881000000 20882032646 3701130816 3702163462
+62646000000 62649098096 20882000000 20883032698 3702130816 3703163514
+62649000000 62652098210 20883000000 20884032736 3703130816 3704163552
+62652000000 62655098371 20884000000 20885032790 3704130816 3705163606
+62655000000 62658098498 20885000000 20886032832 3705130816 3706163648
+62658000000 62661098607 20886000000 20887032869 3706130816 3707163685
+62661000000 62664098749 20887000000 20888032916 3707130816 3708163732
+62664000000 62667098983 20888000000 20889032994 3708130816 3709163810
+62667000000 62670098896 20889000000 20890032965 3709130816 3710163781
+62670000000 62673099017 20890000000 20891033005 3710130816 3711163821
+62673000000 62676099125 20891000000 20892033041 3711130816 3712163857
+62676000000 62679099360 20892000000 20893033120 3712130816 3713163936
+62679000000 62682099539 20893000000 20894033179 3713130816 3714163995
+62682000000 62685013179 20894000000 20895004393 3714130816 3715135209
+62685000000 62688099808 20895000000 20896033269 3715130816 3716164085
+62688000000 62691099981 20896000000 20897033327 3716130816 3717164143
+62691000000 62694100097 20897000000 20898033365 3717130816 3718164181
+62694000000 62697100270 20898000000 20899033423 3718130816 3719164239
+62697000000 62700100442 20899000000 20900033480 3719130816 3720164296
+62700000000 62703100498 20900000000 20901033499 3720130816 3721164315
+62703000000 62706100644 20901000000 20902033548 3721130816 3722164364
+62706000000 62709100840 20902000000 20903033613 3722130816 3723164429
+62709000000 62712100869 20903000000 20904033623 3723130816 3724164439
+62712000000 62715101175 20904000000 20905033725 3724130816 3725164541
+62715000000 62718101347 20905000000 20906033782 3725130816 3726164598
+62718000000 62721101480 20906000000 20907033826 3726130816 3727164642
+62721000000 62724101597 20907000000 20908033865 3727130816 3728164681
+62724000000 62727101782 20908000000 20909033927 3728130816 3729164743
+62727000000 62730101888 20909000000 20910033962 3729130816 3730164778
+62730000000 62733102069 20910000000 20911034023 3730130816 3731164839
+62733000000 62736102281 20911000000 20912034093 3731130816 3732164909
+62736000000 62739102388 20912000000 20913034129 3732130816 3733164945
+62739000000 62742102554 20913000000 20914034184 3733130816 3734165000
+62742000000 62744701299 20914000000 20914900433 3734130816 3735031249
+62745000000 62748102825 20915000000 20916034275 3735130816 3736165091
+62748000000 62751102937 20916000000 20917034312 3736130816 3737165128
+62751000000 62754103146 20917000000 20918034382 3737130816 3738165198
+62754000000 62757103225 20918000000 20919034408 3738130816 3739165224
+62757000000 62760103450 20919000000 20920034483 3739130816 3740165299
+62760000000 62763103577 20920000000 20921034525 3740130816 3741165341
+62763000000 62766103666 20921000000 20922034555 3741130816 3742165371
+62766000000 62769103772 20922000000 20923034590 3742130816 3743165406
+62769000000 62772103983 20923000000 20924034661 3743130816 3744165477
+62772000000 62775104192 20924000000 20925034730 3744130816 3745165546
+62775000000 62778104337 20925000000 20926034779 3745130816 3746165595
+62778000000 62781104463 20926000000 20927034821 3746130816 3747165637
+62781000000 62784104629 20927000000 20928034876 3747130816 3748165692
+62784000000 62787104709 20928000000 20929034903 3748130816 3749165719
+62787000000 62790104944 20929000000 20930034981 3749130816 3750165797
+62790000000 62793105103 20930000000 20931035034 3750130816 3751165850
+62793000000 62796105224 20931000000 20932035074 3751130816 3752165890
+62796000000 62799105384 20932000000 20933035128 3752130816 3753165944
+62799000000 62802105467 20933000000 20934035155 3753130816 3754165971
+62802000000 62805105713 20934000000 20935035237 3754130816 3755166053
+62805000000 62808105836 20935000000 20936035278 3755130816 3756166094
+62808000000 62811105972 20936000000 20937035324 3756130816 3757166140
+62811000000 62814106147 20937000000 20938035382 3757130816 3758166198
+62814000000 62817106269 20938000000 20939035423 3758130816 3759166239
+62817000000 62820106419 20939000000 20940035473 3759130816 3760166289
+62820000000 62823106567 20940000000 20941035522 3760130816 3761166338
+62823000000 62825280261 20941000000 20941760087 3761130816 3761890903
+62826000000 62829106887 20942000000 20943035629 3762130816 3763166445
+62829000000 62832107019 20943000000 20944035673 3763130816 3764166489
+62832000000 62835107193 20944000000 20945035731 3764130816 3765166547
+62835000000 62838107312 20945000000 20946035770 3765130816 3766166586
+62838000000 62841107436 20946000000 20947035812 3766130816 3767166628
+62841000000 62844107655 20947000000 20948035885 3767130816 3768166701
+62844000000 62847107791 20948000000 20949035930 3768130816 3769166746
+62847000000 62850107942 20949000000 20950035980 3769130816 3770166796
+62850000000 62853108092 20950000000 20951036030 3770130816 3771166846
+62853000000 62856108207 20951000000 20952036069 3771130816 3772166885
+62856000000 62859108304 20952000000 20953036101 3772130816 3773166917
+62859000000 62862108512 20953000000 20954036170 3773130816 3774166986
+62862000000 62865108667 20954000000 20955036222 3774130816 3775167038
+62865000000 62868108826 20955000000 20956036275 3775130816 3776167091
+62868000000 62871109000 20956000000 20957036333 3776130816 3777167149
+62871000000 62874109100 20957000000 20958036366 3777130816 3778167182
+62874000000 62877109278 20958000000 20959036426 3778130816 3779167242
+62877000000 62880109427 20959000000 20960036475 3779130816 3780167291
+62880000000 62883109555 20960000000 20961036518 3780130816 3781167334
+62883000000 62886109724 20961000000 20962036574 3781130816 3782167390
+62886000000 62889109844 20962000000 20963036614 3782130816 3783167430
+62889000000 62890937194 20963000000 20963645731 3783130816 3783776547
+62892000000 62895110094 20964000000 20965036698 3784130816 3785167514
+62895000000 62898110352 20965000000 20966036784 3785130816 3786167600
+62898000000 62901110457 20966000000 20967036819 3786130816 3787167635
+62901000000 62904110537 20967000000 20968036845 3787130816 3788167661
+62904000000 62907110684 20968000000 20969036894 3788130816 3789167710
+62907000000 62910110938 20969000000 20970036979 3789130816 3790167795
+62910000000 62913111028 20970000000 20971037009 3790130816 3791167825
+62913000000 62916111273 20971000000 20972037091 3791130816 3792167907
+62916000000 62919111351 20972000000 20973037117 3792130816 3793167933
+62919000000 62922111528 20973000000 20974037176 3793130816 3794167992
+62922000000 62925111674 20974000000 20975037224 3794130816 3795168040
+62925000000 62928111818 20975000000 20976037272 3795130816 3796168088
+62928000000 62929734472 20976000000 20976578157 3796130816 3796708973
+62931000000 62934112133 20977000000 20978037377 3797130816 3798168193
+62934000000 62937112293 20978000000 20979037431 3798130816 3799168247
+62937000000 62940112430 20979000000 20980037476 3799130816 3800168292
+62940000000 62943112588 20980000000 20981037529 3800130816 3801168345
+62943000000 62946112746 20981000000 20982037582 3801130816 3802168398
+62946000000 62949112860 20982000000 20983037620 3802130816 3803168436
+62949000000 62952113021 20983000000 20984037673 3803130816 3804168489
+62952000000 62955113148 20984000000 20985037716 3804130816 3805168532
+62955000000 62958113257 20985000000 20986037752 3805130816 3806168568
+62958000000 62961113399 20986000000 20987037799 3806130816 3807168615
+62961000000 62964113633 20987000000 20988037877 3807130816 3808168693
+62964000000 62967113546 20988000000 20989037848 3808130816 3809168664
+62967000000 62970113667 20989000000 20990037889 3809130816 3810168705
+62970000000 62973113775 20990000000 20991037925 3810130816 3811168741
+62973000000 62976114010 20991000000 20992038003 3811130816 3812168819
+62976000000 62979114189 20992000000 20993038063 3812130816 3813168879
+62979000000 62982027829 20993000000 20994009276 3813130816 3814140092
+62982000000 62985114458 20994000000 20995038152 3814130816 3815168968
+62985000000 62988114631 20995000000 20996038210 3815130816 3816169026
+62988000000 62991114747 20996000000 20997038249 3816130816 3817169065
+62991000000 62994114920 20997000000 20998038306 3817130816 3818169122
+62994000000 62997115092 20998000000 20999038364 3818130816 3819169180
+62997000000 63000115148 20999000000 21000038382 3819130816 3820169198
+63000000000 63003115294 21000000000 21001038431 3820130816 3821169247
+63003000000 63006115490 21001000000 21002038496 3821130816 3822169312
+63006000000 63009115519 21002000000 21003038506 3822130816 3823169322
+63009000000 63012115825 21003000000 21004038608 3823130816 3824169424
+63012000000 63015115997 21004000000 21005038665 3824130816 3825169481
+63015000000 63018116130 21005000000 21006038710 3825130816 3826169526
+63018000000 63021116247 21006000000 21007038749 3826130816 3827169565
+63021000000 63024116432 21007000000 21008038810 3827130816 3828169626
+63024000000 63027116538 21008000000 21009038846 3828130816 3829169662
+63027000000 63030116719 21009000000 21010038906 3829130816 3830169722
+63030000000 63033116931 21010000000 21011038977 3830130816 3831169793
+63033000000 63036117038 21011000000 21012039012 3831130816 3832169828
+63036000000 63039117204 21012000000 21013039068 3832130816 3833169884
+63039000000 63041715949 21013000000 21013905316 3833130816 3834036132
+63042000000 63045117475 21014000000 21015039158 3834130816 3835169974
+63045000000 63048117587 21015000000 21016039195 3835130816 3836170011
+63048000000 63051117796 21016000000 21017039265 3836130816 3837170081
+63051000000 63054117875 21017000000 21018039291 3837130816 3838170107
+63054000000 63057118100 21018000000 21019039366 3838130816 3839170182
+63057000000 63060118227 21019000000 21020039409 3839130816 3840170225
+63060000000 63063118316 21020000000 21021039438 3840130816 3841170254
+63063000000 63066118422 21021000000 21022039474 3841130816 3842170290
+63066000000 63069118633 21022000000 21023039544 3842130816 3843170360
+63069000000 63072118842 21023000000 21024039614 3843130816 3844170430
+63072000000 63075118987 21024000000 21025039662 3844130816 3845170478
+63075000000 63078119113 21025000000 21026039704 3845130816 3846170520
+63078000000 63081119279 21026000000 21027039759 3846130816 3847170575
+63081000000 63084119359 21027000000 21028039786 3847130816 3848170602
+63084000000 63087119594 21028000000 21029039864 3848130816 3849170680
+63087000000 63090119753 21029000000 21030039917 3849130816 3850170733
+63090000000 63093119874 21030000000 21031039958 3850130816 3851170774
+63093000000 63096120034 21031000000 21032040011 3851130816 3852170827
+63096000000 63099120117 21032000000 21033040039 3852130816 3853170855
+63099000000 63102120363 21033000000 21034040121 3853130816 3854170937
+63102000000 63105120486 21034000000 21035040162 3854130816 3855170978
+63105000000 63108120622 21035000000 21036040207 3855130816 3856171023
+63108000000 63111120797 21036000000 21037040265 3856130816 3857171081
+63111000000 63114120919 21037000000 21038040306 3857130816 3858171122
+63114000000 63117121069 21038000000 21039040356 3858130816 3859171172
+63117000000 63120121217 21039000000 21040040405 3859130816 3860171221
+63120000000 63122294911 21040000000 21040764970 3860130816 3860895786
+63123000000 63126121537 21041000000 21042040512 3861130816 3862171328
+63126000000 63129121669 21042000000 21043040556 3862130816 3863171372
+63129000000 63132121843 21043000000 21044040614 3863130816 3864171430
+63132000000 63135121962 21044000000 21045040654 3864130816 3865171470
+63135000000 63138122086 21045000000 21046040695 3865130816 3866171511
+63138000000 63141122305 21046000000 21047040768 3866130816 3867171584
+63141000000 63144122441 21047000000 21048040813 3867130816 3868171629
+63144000000 63147122592 21048000000 21049040864 3868130816 3869171680
+63147000000 63150122742 21049000000 21050040914 3869130816 3870171730
+63150000000 63153122857 21050000000 21051040952 3870130816 3871171768
+63153000000 63156122954 21051000000 21052040984 3871130816 3872171800
+63156000000 63159123162 21052000000 21053041054 3872130816 3873171870
+63159000000 63162123317 21053000000 21054041105 3873130816 3874171921
+63162000000 63165123476 21054000000 21055041158 3874130816 3875171974
+63165000000 63168123650 21055000000 21056041216 3875130816 3876172032
+63168000000 63171123750 21056000000 21057041250 3876130816 3877172066
+63171000000 63174123928 21057000000 21058041309 3877130816 3878172125
+63174000000 63177124077 21058000000 21059041359 3878130816 3879172175
+63177000000 63180124205 21059000000 21060041401 3879130816 3880172217
+63180000000 63183124374 21060000000 21061041458 3880130816 3881172274
+63183000000 63186124494 21061000000 21062041498 3881130816 3882172314
+63186000000 63187951844 21062000000 21062650614 3882130816 3882781430
+63189000000 63192124744 21063000000 21064041581 3883130816 3884172397
+63192000000 63195125002 21064000000 21065041667 3884130816 3885172483
+63195000000 63198125107 21065000000 21066041702 3885130816 3886172518
+63198000000 63201125187 21066000000 21067041729 3886130816 3887172545
+63201000000 63204125334 21067000000 21068041778 3887130816 3888172594
+63204000000 63207125588 21068000000 21069041862 3888130816 3889172678
+63207000000 63210125678 21069000000 21070041892 3889130816 3890172708
+63210000000 63213125923 21070000000 21071041974 3890130816 3891172790
+63213000000 63216126001 21071000000 21072042000 3891130816 3892172816
+63216000000 63219126178 21072000000 21073042059 3892130816 3893172875
+63219000000 63222126324 21073000000 21074042108 3893130816 3894172924
+63222000000 63225126468 21074000000 21075042156 3894130816 3895172972
+63225000000 63226749122 21075000000 21075583040 3895130816 3895713856
+63228000000 63231126783 21076000000 21077042261 3896130816 3897173077
+63231000000 63234126943 21077000000 21078042314 3897130816 3898173130
+63234000000 63237127080 21078000000 21079042360 3898130816 3899173176
+63237000000 63240127238 21079000000 21080042412 3899130816 3900173228
+63240000000 63243127396 21080000000 21081042465 3900130816 3901173281
+63243000000 63246127510 21081000000 21082042503 3901130816 3902173319
+63246000000 63249127671 21082000000 21083042557 3902130816 3903173373
+63249000000 63252127798 21083000000 21084042599 3903130816 3904173415
+63252000000 63255127907 21084000000 21085042635 3904130816 3905173451
+63255000000 63258128049 21085000000 21086042683 3905130816 3906173499
+63258000000 63261128283 21086000000 21087042761 3906130816 3907173577
+63261000000 63264128196 21087000000 21088042732 3907130816 3908173548
+63264000000 63267128317 21088000000 21089042772 3908130816 3909173588
+63267000000 63270128425 21089000000 21090042808 3909130816 3910173624
+63270000000 63273128660 21090000000 21091042886 3910130816 3911173702
+63273000000 63276128839 21091000000 21092042946 3911130816 3912173762
+63276000000 63279042479 21092000000 21093014159 3912130816 3913144975
+63279000000 63282129108 21093000000 21094043036 3913130816 3914173852
+63282000000 63285129281 21094000000 21095043093 3914130816 3915173909
+63285000000 63288129397 21095000000 21096043132 3915130816 3916173948
+63288000000 63291129570 21096000000 21097043190 3916130816 3917174006
+63291000000 63294129742 21097000000 21098043247 3917130816 3918174063
+63294000000 63297129798 21098000000 21099043266 3918130816 3919174082
+63297000000 63300129944 21099000000 21100043314 3919130816 3920174130
+63300000000 63303130140 21100000000 21101043380 3920130816 3921174196
+63303000000 63306130169 21101000000 21102043389 3921130816 3922174205
+63306000000 63309130475 21102000000 21103043491 3922130816 3923174307
+63309000000 63312130647 21103000000 21104043549 3923130816 3924174365
+63312000000 63315130780 21104000000 21105043593 3924130816 3925174409
+63315000000 63318130897 21105000000 21106043632 3925130816 3926174448
+63318000000 63321131082 21106000000 21107043694 3926130816 3927174510
+63321000000 63324131188 21107000000 21108043729 3927130816 3928174545
+63324000000 63327131369 21108000000 21109043789 3928130816 3929174605
+63327000000 63330131581 21109000000 21110043860 3929130816 3930174676
+63330000000 63333131688 21110000000 21111043896 3930130816 3931174712
+63333000000 63336131854 21111000000 21112043951 3931130816 3932174767
+63336000000 63338730599 21112000000 21112910199 3932130816 3933041015
+63339000000 63342132125 21113000000 21114044041 3933130816 3934174857
+63342000000 63345132237 21114000000 21115044079 3934130816 3935174895
+63345000000 63348132446 21115000000 21116044148 3935130816 3936174964
+63348000000 63351132525 21116000000 21117044175 3936130816 3937174991
+63351000000 63354132750 21117000000 21118044250 3937130816 3938175066
+63354000000 63357132877 21118000000 21119044292 3938130816 3939175108
+63357000000 63360132966 21119000000 21120044322 3939130816 3940175138
+63360000000 63363133072 21120000000 21121044357 3940130816 3941175173
+63363000000 63366133283 21121000000 21122044427 3941130816 3942175243
+63366000000 63369133492 21122000000 21123044497 3942130816 3943175313
+63369000000 63372133637 21123000000 21124044545 3943130816 3944175361
+63372000000 63375133763 21124000000 21125044587 3944130816 3945175403
+63375000000 63378133929 21125000000 21126044643 3945130816 3946175459
+63378000000 63381134009 21126000000 21127044669 3946130816 3947175485
+63381000000 63384134244 21127000000 21128044748 3947130816 3948175564
+63384000000 63387134403 21128000000 21129044801 3948130816 3949175617
+63387000000 63390134524 21129000000 21130044841 3949130816 3950175657
+63390000000 63393134684 21130000000 21131044894 3950130816 3951175710
+63393000000 63396134767 21131000000 21132044922 3951130816 3952175738
+63396000000 63399135013 21132000000 21133045004 3952130816 3953175820
+63399000000 63402135136 21133000000 21134045045 3953130816 3954175861
+63402000000 63405135272 21134000000 21135045090 3954130816 3955175906
+63405000000 63408135447 21135000000 21136045149 3955130816 3956175965
+63408000000 63411135569 21136000000 21137045189 3956130816 3957176005
+63411000000 63414135719 21137000000 21138045239 3957130816 3958176055
+63414000000 63417135867 21138000000 21139045289 3958130816 3959176105
+63417000000 63419309561 21139000000 21139769853 3959130816 3959900669
+63420000000 63423136187 21140000000 21141045395 3960130816 3961176211
+63423000000 63426136319 21141000000 21142045439 3961130816 3962176255
+63426000000 63429136493 21142000000 21143045497 3962130816 3963176313
+63429000000 63432136612 21143000000 21144045537 3963130816 3964176353
+63432000000 63435136736 21144000000 21145045578 3964130816 3965176394
+63435000000 63438136955 21145000000 21146045651 3965130816 3966176467
+63438000000 63441137091 21146000000 21147045697 3966130816 3967176513
+63441000000 63444137242 21147000000 21148045747 3967130816 3968176563
+63444000000 63447137392 21148000000 21149045797 3968130816 3969176613
+63447000000 63450137507 21149000000 21150045835 3969130816 3970176651
+63450000000 63453137604 21150000000 21151045868 3970130816 3971176684
+63453000000 63456137812 21151000000 21152045937 3971130816 3972176753
+63456000000 63459137967 21152000000 21153045989 3972130816 3973176805
+63459000000 63462138126 21153000000 21154046042 3973130816 3974176858
+63462000000 63465138300 21154000000 21155046100 3974130816 3975176916
+63465000000 63468138400 21155000000 21156046133 3975130816 3976176949
+63468000000 63471138578 21156000000 21157046192 3976130816 3977177008
+63471000000 63474138727 21157000000 21158046242 3977130816 3978177058
+63474000000 63477138855 21158000000 21159046285 3978130816 3979177101
+63477000000 63480139024 21159000000 21160046341 3979130816 3980177157
+63480000000 63483139144 21160000000 21161046381 3980130816 3981177197
+63483000000 63484966494 21161000000 21161655498 3981130816 3981786314
+63486000000 63489139394 21162000000 21163046464 3982130816 3983177280
+63489000000 63492139652 21163000000 21164046550 3983130816 3984177366
+63492000000 63495139757 21164000000 21165046585 3984130816 3985177401
+63495000000 63498139837 21165000000 21166046612 3985130816 3986177428
+63498000000 63501139984 21166000000 21167046661 3986130816 3987177477
+63501000000 63504140238 21167000000 21168046746 3987130816 3988177562
+63504000000 63507140328 21168000000 21169046776 3988130816 3989177592
+63507000000 63510140573 21169000000 21170046857 3989130816 3990177673
+63510000000 63513140651 21170000000 21171046883 3990130816 3991177699
+63513000000 63516140828 21171000000 21172046942 3991130816 3992177758
+63516000000 63519140974 21172000000 21173046991 3992130816 3993177807
+63519000000 63522141118 21173000000 21174047039 3993130816 3994177855
+63522000000 63523763772 21174000000 21174587924 3994130816 3994718740
+63525000000 63528141433 21175000000 21176047144 3995130816 3996177960
+63528000000 63531141593 21176000000 21177047197 3996130816 3997178013
+63531000000 63534141730 21177000000 21178047243 3997130816 3998178059
+63534000000 63537141888 21178000000 21179047296 3998130816 3999178112
+63537000000 63540142046 21179000000 21180047348 3999130816 4000178164
+63540000000 63543142160 21180000000 21181047386 4000130816 4001178202
+63543000000 63546142321 21181000000 21182047440 4001130816 4002178256
+63546000000 63549142448 21182000000 21183047482 4002130816 4003178298
+63549000000 63552142557 21183000000 21184047519 4003130816 4004178335
+63552000000 63555142699 21184000000 21185047566 4004130816 4005178382
+63555000000 63558142933 21185000000 21186047644 4005130816 4006178460
+63558000000 63561142846 21186000000 21187047615 4006130816 4007178431
+63561000000 63564142967 21187000000 21188047655 4007130816 4008178471
+63564000000 63567143075 21188000000 21189047691 4008130816 4009178507
+63567000000 63570143310 21189000000 21190047770 4009130816 4010178586
+63570000000 63573143489 21190000000 21191047829 4010130816 4011178645
+63573000000 63576057129 21191000000 21192019043 4011130816 4012149859
+63576000000 63579143758 21192000000 21193047919 4012130816 4013178735
+63579000000 63582143931 21193000000 21194047977 4013130816 4014178793
+63582000000 63585144047 21194000000 21195048015 4014130816 4015178831
+63585000000 63588144220 21195000000 21196048073 4015130816 4016178889
+63588000000 63591144392 21196000000 21197048130 4016130816 4017178946
+63591000000 63594144448 21197000000 21198048149 4017130816 4018178965
+63594000000 63597144594 21198000000 21199048198 4018130816 4019179014
+63597000000 63600144790 21199000000 21200048263 4019130816 4020179079
+63600000000 63603144819 21200000000 21201048273 4020130816 4021179089
+63603000000 63606145125 21201000000 21202048375 4021130816 4022179191
+63606000000 63609145297 21202000000 21203048432 4022130816 4023179248
+63609000000 63612145430 21203000000 21204048476 4023130816 4024179292
+63612000000 63615145547 21204000000 21205048515 4024130816 4025179331
+63615000000 63618145732 21205000000 21206048577 4025130816 4026179393
+63618000000 63621145838 21206000000 21207048612 4026130816 4027179428
+63621000000 63624146019 21207000000 21208048673 4027130816 4028179489
+63624000000 63627146231 21208000000 21209048743 4028130816 4029179559
+63627000000 63630146338 21209000000 21210048779 4029130816 4030179595
+63630000000 63633146504 21210000000 21211048834 4030130816 4031179650
+63633000000 63635745249 21211000000 21211915083 4031130816 4032045899
+63636000000 63639146775 21212000000 21213048925 4032130816 4033179741
+63639000000 63642146887 21213000000 21214048962 4033130816 4034179778
+63642000000 63645147096 21214000000 21215049032 4034130816 4035179848
+63645000000 63648147175 21215000000 21216049058 4035130816 4036179874
+63648000000 63651147400 21216000000 21217049133 4036130816 4037179949
+63651000000 63654147527 21217000000 21218049175 4037130816 4038179991
+63654000000 63657147616 21218000000 21219049205 4038130816 4039180021
+63657000000 63660147722 21219000000 21220049240 4039130816 4040180056
+63660000000 63663147933 21220000000 21221049311 4040130816 4041180127
+63663000000 63666148142 21221000000 21222049380 4041130816 4042180196
+63666000000 63669148287 21222000000 21223049429 4042130816 4043180245
+63669000000 63672148413 21223000000 21224049471 4043130816 4044180287
+63672000000 63675148579 21224000000 21225049526 4044130816 4045180342
+63675000000 63678148659 21225000000 21226049553 4045130816 4046180369
+63678000000 63681148894 21226000000 21227049631 4046130816 4047180447
+63681000000 63684149053 21227000000 21228049684 4047130816 4048180500
+63684000000 63687149174 21228000000 21229049724 4048130816 4049180540
+63687000000 63690149334 21229000000 21230049778 4049130816 4050180594
+63690000000 63693149417 21230000000 21231049805 4050130816 4051180621
+63693000000 63696149663 21231000000 21232049887 4051130816 4052180703
+63696000000 63699149786 21232000000 21233049928 4052130816 4053180744
+63699000000 63702149922 21233000000 21234049974 4053130816 4054180790
+63702000000 63705150097 21234000000 21235050032 4054130816 4055180848
+63705000000 63708150219 21235000000 21236050073 4055130816 4056180889
+63708000000 63711150369 21236000000 21237050123 4056130816 4057180939
+63711000000 63714150517 21237000000 21238050172 4057130816 4058180988
+63714000000 63716324211 21238000000 21238774737 4058130816 4058905553
+63717000000 63720150837 21239000000 21240050279 4059130816 4060181095
+63720000000 63723150969 21240000000 21241050323 4060130816 4061181139
+63723000000 63726151143 21241000000 21242050381 4061130816 4062181197
+63726000000 63729151262 21242000000 21243050420 4062130816 4063181236
+63729000000 63732151386 21243000000 21244050462 4063130816 4064181278
+63732000000 63735151605 21244000000 21245050535 4064130816 4065181351
+63735000000 63738151741 21245000000 21246050580 4065130816 4066181396
+63738000000 63741151892 21246000000 21247050630 4066130816 4067181446
+63741000000 63744152042 21247000000 21248050680 4067130816 4068181496
+63744000000 63747152157 21248000000 21249050719 4068130816 4069181535
+63747000000 63750152254 21249000000 21250050751 4069130816 4070181567
+63750000000 63753152462 21250000000 21251050820 4070130816 4071181636
+63753000000 63756152617 21251000000 21252050872 4071130816 4072181688
+63756000000 63759152776 21252000000 21253050925 4072130816 4073181741
+63759000000 63762152950 21253000000 21254050983 4073130816 4074181799
+63762000000 63765153050 21254000000 21255051016 4074130816 4075181832
+63765000000 63768153228 21255000000 21256051076 4075130816 4076181892
+63768000000 63771153377 21256000000 21257051125 4076130816 4077181941
+63771000000 63774153505 21257000000 21258051168 4077130816 4078181984
+63774000000 63777153674 21258000000 21259051224 4078130816 4079182040
+63777000000 63780153794 21259000000 21260051264 4079130816 4080182080
+63780000000 63781981144 21260000000 21260660381 4080130816 4080791197
+63783000000 63786154044 21261000000 21262051348 4081130816 4082182164
+63786000000 63789154302 21262000000 21263051434 4082130816 4083182250
+63789000000 63792154407 21263000000 21264051469 4083130816 4084182285
+63792000000 63795154487 21264000000 21265051495 4084130816 4085182311
+63795000000 63798154634 21265000000 21266051544 4085130816 4086182360
+63798000000 63801154888 21266000000 21267051629 4086130816 4087182445
+63801000000 63804154978 21267000000 21268051659 4087130816 4088182475
+63804000000 63807155223 21268000000 21269051741 4088130816 4089182557
+63807000000 63810155301 21269000000 21270051767 4089130816 4090182583
+63810000000 63813155478 21270000000 21271051826 4090130816 4091182642
+63813000000 63816155624 21271000000 21272051874 4091130816 4092182690
+63816000000 63819155768 21272000000 21273051922 4092130816 4093182738
+63819000000 63820778422 21273000000 21273592807 4093130816 4093723623
+63822000000 63825156083 21274000000 21275052027 4094130816 4095182843
+63825000000 63828156243 21275000000 21276052081 4095130816 4096182897
+63828000000 63831156380 21276000000 21277052126 4096130816 4097182942
+63831000000 63834156538 21277000000 21278052179 4097130816 4098182995
+63834000000 63837156696 21278000000 21279052232 4098130816 4099183048
+63837000000 63840156810 21279000000 21280052270 4099130816 4100183086
+63840000000 63843156971 21280000000 21281052323 4100130816 4101183139
+63843000000 63846157098 21281000000 21282052366 4101130816 4102183182
+63846000000 63849157207 21282000000 21283052402 4102130816 4103183218
+63849000000 63852157349 21283000000 21284052449 4103130816 4104183265
+63852000000 63855157583 21284000000 21285052527 4104130816 4105183343
+63855000000 63858157496 21285000000 21286052498 4105130816 4106183314
+63858000000 63861157617 21286000000 21287052539 4106130816 4107183355
+63861000000 63864157725 21287000000 21288052575 4107130816 4108183391
+63864000000 63867157960 21288000000 21289052653 4108130816 4109183469
+63867000000 63870158139 21289000000 21290052713 4109130816 4110183529
+63870000000 63873071779 21290000000 21291023926 4110130816 4111154742
+63873000000 63876158408 21291000000 21292052802 4111130816 4112183618
+63876000000 63879158581 21292000000 21293052860 4112130816 4113183676
+63879000000 63882158697 21293000000 21294052899 4113130816 4114183715
+63882000000 63885158870 21294000000 21295052956 4114130816 4115183772
+63885000000 63888159042 21295000000 21296053014 4115130816 4116183830
+63888000000 63891159098 21296000000 21297053032 4116130816 4117183848
+63891000000 63894159244 21297000000 21298053081 4117130816 4118183897
+63894000000 63897159440 21298000000 21299053146 4118130816 4119183962
+63897000000 63900159469 21299000000 21300053156 4119130816 4120183972
+63900000000 63903159775 21300000000 21301053258 4120130816 4121184074
+63903000000 63906159947 21301000000 21302053315 4121130816 4122184131
+63906000000 63909160080 21302000000 21303053360 4122130816 4123184176
+63909000000 63912160197 21303000000 21304053399 4123130816 4124184215
+63912000000 63915160382 21304000000 21305053460 4124130816 4125184276
+63915000000 63918160488 21305000000 21306053496 4125130816 4126184312
+63918000000 63921160669 21306000000 21307053556 4126130816 4127184372
+63921000000 63924160881 21307000000 21308053627 4127130816 4128184443
+63924000000 63927160988 21308000000 21309053662 4128130816 4129184478
+63927000000 63930161154 21309000000 21310053718 4129130816 4130184534
+63930000000 63932759899 21310000000 21310919966 4130130816 4131050782
+63933000000 63936161425 21311000000 21312053808 4131130816 4132184624
+63936000000 63939161537 21312000000 21313053845 4132130816 4133184661
+63939000000 63942161746 21313000000 21314053915 4133130816 4134184731
+63942000000 63945161825 21314000000 21315053941 4134130816 4135184757
+63945000000 63948162050 21315000000 21316054016 4135130816 4136184832
+63948000000 63951162177 21316000000 21317054059 4136130816 4137184875
+63951000000 63954162266 21317000000 21318054088 4137130816 4138184904
+63954000000 63957162372 21318000000 21319054124 4138130816 4139184940
+63957000000 63960162583 21319000000 21320054194 4139130816 4140185010
+63960000000 63963162792 21320000000 21321054264 4140130816 4141185080
+63963000000 63966162937 21321000000 21322054312 4141130816 4142185128
+63966000000 63969163063 21322000000 21323054354 4142130816 4143185170
+63969000000 63972163229 21323000000 21324054409 4143130816 4144185225
+63972000000 63975163309 21324000000 21325054436 4144130816 4145185252
+63975000000 63978163544 21325000000 21326054514 4145130816 4146185330
+63978000000 63981163703 21326000000 21327054567 4146130816 4147185383
+63981000000 63984163824 21327000000 21328054608 4147130816 4148185424
+63984000000 63987163984 21328000000 21329054661 4148130816 4149185477
+63987000000 63990164067 21329000000 21330054689 4149130816 4150185505
+63990000000 63993164313 21330000000 21331054771 4150130816 4151185587
+63993000000 63996164436 21331000000 21332054812 4151130816 4152185628
+63996000000 63999164572 21332000000 21333054857 4152130816 4153185673
+63999000000 64002164747 21333000000 21334054915 4153130816 4154185731
+64002000000 64005164869 21334000000 21335054956 4154130816 4155185772
+64005000000 64008165019 21335000000 21336055006 4155130816 4156185822
+64008000000 64011165167 21336000000 21337055055 4156130816 4157185871
+64011000000 64013338861 21337000000 21337779620 4157130816 4157910436
+64014000000 64017165487 21338000000 21339055162 4158130816 4159185978
+64017000000 64020165619 21339000000 21340055206 4159130816 4160186022
+64020000000 64023165793 21340000000 21341055264 4160130816 4161186080
+64023000000 64026165912 21341000000 21342055304 4161130816 4162186120
+64026000000 64029166036 21342000000 21343055345 4162130816 4163186161
+64029000000 64032166255 21343000000 21344055418 4163130816 4164186234
+64032000000 64035166391 21344000000 21345055463 4164130816 4165186279
+64035000000 64038166542 21345000000 21346055514 4165130816 4166186330
+64038000000 64041166692 21346000000 21347055564 4166130816 4167186380
+64041000000 64044166807 21347000000 21348055602 4167130816 4168186418
+64044000000 64047166904 21348000000 21349055634 4168130816 4169186450
+64047000000 64050167112 21349000000 21350055704 4169130816 4170186520
+64050000000 64053167267 21350000000 21351055755 4170130816 4171186571
+64053000000 64056167426 21351000000 21352055808 4171130816 4172186624
+64056000000 64059167600 21352000000 21353055866 4172130816 4173186682
+64059000000 64062167700 21353000000 21354055900 4173130816 4174186716
+64062000000 64065167878 21354000000 21355055959 4174130816 4175186775
+64065000000 64068168027 21355000000 21356056009 4175130816 4176186825
+64068000000 64071168155 21356000000 21357056051 4176130816 4177186867
+64071000000 64074168324 21357000000 21358056108 4177130816 4178186924
+64074000000 64077168444 21358000000 21359056148 4178130816 4179186964
+64077000000 64078995794 21359000000 21359665264 4179130816 4179796080
+64080000000 64083168694 21360000000 21361056231 4180130816 4181187047
+64083000000 64086168952 21361000000 21362056317 4181130816 4182187133
+64086000000 64089169057 21362000000 21363056352 4182130816 4183187168
+64089000000 64092169137 21363000000 21364056379 4183130816 4184187195
+64092000000 64095169284 21364000000 21365056428 4184130816 4185187244
+64095000000 64098169538 21365000000 21366056512 4185130816 4186187328
+64098000000 64101169628 21366000000 21367056542 4186130816 4187187358
+64101000000 64104169873 21367000000 21368056624 4187130816 4188187440
+64104000000 64107169951 21368000000 21369056650 4188130816 4189187466
+64107000000 64110170128 21369000000 21370056709 4189130816 4190187525
+64110000000 64113170274 21370000000 21371056758 4190130816 4191187574
+64113000000 64116170418 21371000000 21372056806 4191130816 4192187622
+64116000000 64117793072 21372000000 21372597690 4192130816 4192728506
+64119000000 64122170733 21373000000 21374056911 4193130816 4194187727
+64122000000 64125170893 21374000000 21375056964 4194130816 4195187780
+64125000000 64128171030 21375000000 21376057010 4195130816 4196187826
+64128000000 64131171188 21376000000 21377057062 4196130816 4197187878
+64131000000 64134171346 21377000000 21378057115 4197130816 4198187931
+64134000000 64137171460 21378000000 21379057153 4198130816 4199187969
+64137000000 64140171621 21379000000 21380057207 4199130816 4200188023
+64140000000 64143171748 21380000000 21381057249 4200130816 4201188065
+64143000000 64146171857 21381000000 21382057285 4201130816 4202188101
+64146000000 64149171999 21382000000 21383057333 4202130816 4203188149
+64149000000 64152172233 21383000000 21384057411 4203130816 4204188227
+64152000000 64155172146 21384000000 21385057382 4204130816 4205188198
+64155000000 64158172267 21385000000 21386057422 4205130816 4206188238
+64158000000 64161172375 21386000000 21387057458 4206130816 4207188274
+64161000000 64164172610 21387000000 21388057536 4207130816 4208188352
+64164000000 64167172789 21388000000 21389057596 4208130816 4209188412
+64167000000 64170086429 21389000000 21390028809 4209130816 4210159625
+64170000000 64173173058 21390000000 21391057686 4210130816 4211188502
+64173000000 64176173231 21391000000 21392057743 4211130816 4212188559
+64176000000 64179173347 21392000000 21393057782 4212130816 4213188598
+64179000000 64182173520 21393000000 21394057840 4213130816 4214188656
+64182000000 64185173692 21394000000 21395057897 4214130816 4215188713
+64185000000 64188173748 21395000000 21396057916 4215130816 4216188732
+64188000000 64191173894 21396000000 21397057964 4216130816 4217188780
+64191000000 64194174090 21397000000 21398058030 4217130816 4218188846
+64194000000 64197174119 21398000000 21399058039 4218130816 4219188855
+64197000000 64200174425 21399000000 21400058141 4219130816 4220188957
+64200000000 64203174597 21400000000 21401058199 4220130816 4221189015
+64203000000 64206174730 21401000000 21402058243 4221130816 4222189059
+64206000000 64209174847 21402000000 21403058282 4222130816 4223189098
+64209000000 64212175032 21403000000 21404058344 4223130816 4224189160
+64212000000 64215175138 21404000000 21405058379 4224130816 4225189195
+64215000000 64218175319 21405000000 21406058439 4225130816 4226189255
+64218000000 64221175531 21406000000 21407058510 4226130816 4227189326
+64221000000 64224175638 21407000000 21408058546 4227130816 4228189362
+64224000000 64227175804 21408000000 21409058601 4228130816 4229189417
+64227000000 64229774549 21409000000 21409924849 4229130816 4230055665
+64230000000 64233176075 21410000000 21411058691 4230130816 4231189507
+64233000000 64236176187 21411000000 21412058729 4231130816 4232189545
+64236000000 64239176396 21412000000 21413058798 4232130816 4233189614
+64239000000 64242176475 21413000000 21414058825 4233130816 4234189641
+64242000000 64245176700 21414000000 21415058900 4234130816 4235189716
+64245000000 64248176827 21415000000 21416058942 4235130816 4236189758
+64248000000 64251176916 21416000000 21417058972 4236130816 4237189788
+64251000000 64254177022 21417000000 21418059007 4237130816 4238189823
+64254000000 64257177233 21418000000 21419059077 4238130816 4239189893
+64257000000 64260177442 21419000000 21420059147 4239130816 4240189963
+64260000000 64263177587 21420000000 21421059195 4240130816 4241190011
+64263000000 64266177713 21421000000 21422059237 4241130816 4242190053
+64266000000 64269177879 21422000000 21423059293 4242130816 4243190109
+64269000000 64272177959 21423000000 21424059319 4243130816 4244190135
+64272000000 64275178194 21424000000 21425059398 4244130816 4245190214
+64275000000 64278178353 21425000000 21426059451 4245130816 4246190267
+64278000000 64281178474 21426000000 21427059491 4246130816 4247190307
+64281000000 64284178634 21427000000 21428059544 4247130816 4248190360
+64284000000 64287178717 21428000000 21429059572 4248130816 4249190388
+64287000000 64290178963 21429000000 21430059654 4249130816 4250190470
+64290000000 64293179086 21430000000 21431059695 4250130816 4251190511
+64293000000 64296179222 21431000000 21432059740 4251130816 4252190556
+64296000000 64299179397 21432000000 21433059799 4252130816 4253190615
+64299000000 64302179519 21433000000 21434059839 4253130816 4254190655
+64302000000 64305179669 21434000000 21435059889 4254130816 4255190705
+64305000000 64308179817 21435000000 21436059939 4255130816 4256190755
+64308000000 64310353511 21436000000 21436784503 4256130816 4256915319
+64311000000 64314180137 21437000000 21438060045 4257130816 4258190861
+64314000000 64317180269 21438000000 21439060089 4258130816 4259190905
+64317000000 64320180443 21439000000 21440060147 4259130816 4260190963
+64320000000 64323180562 21440000000 21441060187 4260130816 4261191003
+64323000000 64326180686 21441000000 21442060228 4261130816 4262191044
+64326000000 64329180905 21442000000 21443060301 4262130816 4263191117
+64329000000 64332181041 21443000000 21444060347 4263130816 4264191163
+64332000000 64335181192 21444000000 21445060397 4264130816 4265191213
+64335000000 64338181342 21445000000 21446060447 4265130816 4266191263
+64338000000 64341181457 21446000000 21447060485 4266130816 4267191301
+64341000000 64344181554 21447000000 21448060518 4267130816 4268191334
+64344000000 64347181762 21448000000 21449060587 4268130816 4269191403
+64347000000 64350181917 21449000000 21450060639 4269130816 4270191455
+64350000000 64353182076 21450000000 21451060692 4270130816 4271191508
+64353000000 64356182250 21451000000 21452060750 4271130816 4272191566
+64356000000 64359182350 21452000000 21453060783 4272130816 4273191599
+64359000000 64362182528 21453000000 21454060842 4273130816 4274191658
+64362000000 64365182677 21454000000 21455060892 4274130816 4275191708
+64365000000 64368182805 21455000000 21456060935 4275130816 4276191751
+64368000000 64371182974 21456000000 21457060991 4276130816 4277191807
+64371000000 64374183094 21457000000 21458061031 4277130816 4278191847
+64374000000 64376010444 21458000000 21458670148 4278130816 4278800964
+64377000000 64380183344 21459000000 21460061114 4279130816 4280191930
+64380000000 64383183602 21460000000 21461061200 4280130816 4281192016
+64383000000 64386183707 21461000000 21462061235 4281130816 4282192051
+64386000000 64389183787 21462000000 21463061262 4282130816 4283192078
+64389000000 64392183934 21463000000 21464061311 4283130816 4284192127
+64392000000 64395184188 21464000000 21465061396 4284130816 4285192212
+64395000000 64398184278 21465000000 21466061426 4285130816 4286192242
+64398000000 64401184523 21466000000 21467061507 4286130816 4287192323
+64401000000 64404184601 21467000000 21468061533 4287130816 4288192349
+64404000000 64407184778 21468000000 21469061592 4288130816 4289192408
+64407000000 64410184924 21469000000 21470061641 4289130816 4290192457
+64410000000 64413185068 21470000000 21471061689 4290130816 4291192505
+64413000000 64414807722 21471000000 21471602574 4291130816 4291733390
+64416000000 64419185383 21472000000 21473061794 4292130816 4293192610
+64419000000 64422185543 21473000000 21474061847 4293130816 4294192663
+64422000000 64425185680 21474000000 21475061893 4294130816 225413
+64425000000 64428185838 21475000000 21476061946 163520 1225466
+64428000000 64431185996 21476000000 21477061998 1163520 2225518
+64431000000 64434186110 21477000000 21478062036 2163520 3225556
+64434000000 64437186271 21478000000 21479062090 3163520 4225610
+64437000000 64440186398 21479000000 21480062132 4163520 5225652
+64440000000 64443186507 21480000000 21481062169 5163520 6225689
+64443000000 64446186649 21481000000 21482062216 6163520 7225736
+64446000000 64449186883 21482000000 21483062294 7163520 8225814
+64449000000 64452186796 21483000000 21484062265 8163520 9225785
+64452000000 64455186917 21484000000 21485062305 9163520 10225825
+64455000000 64458187025 21485000000 21486062341 10163520 11225861
+64458000000 64461187260 21486000000 21487062420 11163520 12225940
+64461000000 64464187439 21487000000 21488062479 12163520 13225999
+64464000000 64467101079 21488000000 21489033693 13163520 14197213
+64467000000 64470187708 21489000000 21490062569 14163520 15226089
+64470000000 64473187881 21490000000 21491062627 15163520 16226147
+64473000000 64476187997 21491000000 21492062665 16163520 17226185
+64476000000 64479188170 21492000000 21493062723 17163520 18226243
+64479000000 64482188342 21493000000 21494062780 18163520 19226300
+64482000000 64485188398 21494000000 21495062799 19163520 20226319
+64485000000 64488188544 21495000000 21496062848 20163520 21226368
+64488000000 64491188740 21496000000 21497062913 21163520 22226433
+64491000000 64494188769 21497000000 21498062923 22163520 23226443
+64494000000 64497189075 21498000000 21499063025 23163520 24226545
+64497000000 64500189247 21499000000 21500063082 24163520 25226602
+64500000000 64503189380 21500000000 21501063126 25163520 26226646
+64503000000 64506189497 21501000000 21502063165 26163520 27226685
+64506000000 64509189682 21502000000 21503063227 27163520 28226747
+64509000000 64512189788 21503000000 21504063262 28163520 29226782
+64512000000 64515189969 21504000000 21505063323 29163520 30226843
+64515000000 64518190181 21505000000 21506063393 30163520 31226913
+64518000000 64521190288 21506000000 21507063429 31163520 32226949
+64521000000 64524190454 21507000000 21508063484 32163520 33227004
+64524000000 64526789199 21508000000 21508929733 33163520 34093253
+64527000000 64530190725 21509000000 21510063575 34163520 35227095
+64530000000 64533190837 21510000000 21511063612 35163520 36227132
+64533000000 64536191046 21511000000 21512063682 36163520 37227202
+64536000000 64539191125 21512000000 21513063708 37163520 38227228
+64539000000 64542191350 21513000000 21514063783 38163520 39227303
+64542000000 64545191477 21514000000 21515063825 39163520 40227345
+64545000000 64548191566 21515000000 21516063855 40163520 41227375
+64548000000 64551191672 21516000000 21517063890 41163520 42227410
+64551000000 64554191883 21517000000 21518063961 42163520 43227481
+64554000000 64557192092 21518000000 21519064030 43163520 44227550
+64557000000 64560192237 21519000000 21520064079 44163520 45227599
+64560000000 64563192363 21520000000 21521064121 45163520 46227641
+64563000000 64566192529 21521000000 21522064176 46163520 47227696
+64566000000 64569192609 21522000000 21523064203 47163520 48227723
+64569000000 64572192844 21523000000 21524064281 48163520 49227801
+64572000000 64575193003 21524000000 21525064334 49163520 50227854
+64575000000 64578193124 21525000000 21526064374 50163520 51227894
+64578000000 64581193284 21526000000 21527064428 51163520 52227948
+64581000000 64584193367 21527000000 21528064455 52163520 53227975
+64584000000 64587193613 21528000000 21529064537 53163520 54228057
+64587000000 64590193736 21529000000 21530064578 54163520 55228098
+64590000000 64593193872 21530000000 21531064624 55163520 56228144
+64593000000 64596194047 21531000000 21532064682 56163520 57228202
+64596000000 64599194169 21532000000 21533064723 57163520 58228243
+64599000000 64602194319 21533000000 21534064773 58163520 59228293
+64602000000 64605194467 21534000000 21535064822 59163520 60228342
+64605000000 64607368161 21535000000 21535789387 60163520 60952907
+64608000000 64611194787 21536000000 21537064929 61163520 62228449
+64611000000 64614194919 21537000000 21538064973 62163520 63228493
+64614000000 64617195093 21538000000 21539065031 63163520 64228551
+64617000000 64620195212 21539000000 21540065070 64163520 65228590
+64620000000 64623195336 21540000000 21541065112 65163520 66228632
+64623000000 64626195555 21541000000 21542065185 66163520 67228705
+64626000000 64629195691 21542000000 21543065230 67163520 68228750
+64629000000 64632195842 21543000000 21544065280 68163520 69228800
+64632000000 64635195992 21544000000 21545065330 69163520 70228850
+64635000000 64638196107 21545000000 21546065369 70163520 71228889
+64638000000 64641196204 21546000000 21547065401 71163520 72228921
+64641000000 64644196412 21547000000 21548065470 72163520 73228990
+64644000000 64647196567 21548000000 21549065522 73163520 74229042
+64647000000 64650196726 21549000000 21550065575 74163520 75229095
+64650000000 64653196900 21550000000 21551065633 75163520 76229153
+64653000000 64656197000 21551000000 21552065666 76163520 77229186
+64656000000 64659197178 21552000000 21553065726 77163520 78229246
+64659000000 64662197327 21553000000 21554065775 78163520 79229295
+64662000000 64665197455 21554000000 21555065818 79163520 80229338
+64665000000 64668197624 21555000000 21556065874 80163520 81229394
+64668000000 64671197744 21556000000 21557065914 81163520 82229434
+64671000000 64673025094 21557000000 21557675031 82163520 82838551
+64674000000 64677197994 21558000000 21559065998 83163520 84229518
+64677000000 64680198252 21559000000 21560066084 84163520 85229604
+64680000000 64683198357 21560000000 21561066119 85163520 86229639
+64683000000 64686198437 21561000000 21562066145 86163520 87229665
+64686000000 64689198584 21562000000 21563066194 87163520 88229714
+64689000000 64692198838 21563000000 21564066279 88163520 89229799
+64692000000 64695198928 21564000000 21565066309 89163520 90229829
+64695000000 64698199173 21565000000 21566066391 90163520 91229911
+64698000000 64701199251 21566000000 21567066417 91163520 92229937
+64701000000 64704199428 21567000000 21568066476 92163520 93229996
+64704000000 64707199574 21568000000 21569066524 93163520 94230044
+64707000000 64710199718 21569000000 21570066572 94163520 95230092
+64710000000 64711822372 21570000000 21570607457 95163520 95770977
+64713000000 64716200033 21571000000 21572066677 96163520 97230197
+64716000000 64719200193 21572000000 21573066731 97163520 98230251
+64719000000 64722200330 21573000000 21574066776 98163520 99230296
+64722000000 64725200488 21574000000 21575066829 99163520 100230349
+64725000000 64728200646 21575000000 21576066882 100163520 101230402
+64728000000 64731200760 21576000000 21577066920 101163520 102230440
+64731000000 64734200921 21577000000 21578066973 102163520 103230493
+64734000000 64737201048 21578000000 21579067016 103163520 104230536
+64737000000 64740201157 21579000000 21580067052 104163520 105230572
+64740000000 64743201299 21580000000 21581067099 105163520 106230619
+64743000000 64746201533 21581000000 21582067177 106163520 107230697
+64746000000 64749201446 21582000000 21583067148 107163520 108230668
+64749000000 64752201567 21583000000 21584067189 108163520 109230709
+64752000000 64755201675 21584000000 21585067225 109163520 110230745
+64755000000 64758201910 21585000000 21586067303 110163520 111230823
+64758000000 64761202089 21586000000 21587067363 111163520 112230883
+64761000000 64764115729 21587000000 21588038576 112163520 113202096
+64764000000 64767202358 21588000000 21589067452 113163520 114230972
+64767000000 64770202531 21589000000 21590067510 114163520 115231030
+64770000000 64773202647 21590000000 21591067549 115163520 116231069
+64773000000 64776202820 21591000000 21592067606 116163520 117231126
+64776000000 64779202992 21592000000 21593067664 117163520 118231184
+64779000000 64782203048 21593000000 21594067682 118163520 119231202
+64782000000 64785203194 21594000000 21595067731 119163520 120231251
+64785000000 64788203390 21595000000 21596067796 120163520 121231316
+64788000000 64791203419 21596000000 21597067806 121163520 122231326
+64791000000 64794203725 21597000000 21598067908 122163520 123231428
+64794000000 64797203897 21598000000 21599067965 123163520 124231485
+64797000000 64800204030 21599000000 21600068010 124163520 125231530
+64800000000 64803204147 21600000000 21601068049 125163520 126231569
+64803000000 64806204332 21601000000 21602068110 126163520 127231630
+64806000000 64809204438 21602000000 21603068146 127163520 128231666
+64809000000 64812204619 21603000000 21604068206 128163520 129231726
+64812000000 64815204831 21604000000 21605068277 129163520 130231797
+64815000000 64818204938 21605000000 21606068312 130163520 131231832
+64818000000 64821205104 21606000000 21607068368 131163520 132231888
+64821000000 64823803849 21607000000 21607934616 132163520 133098136
+64824000000 64827205375 21608000000 21609068458 133163520 134231978
+64827000000 64830205487 21609000000 21610068495 134163520 135232015
+64830000000 64833205696 21610000000 21611068565 135163520 136232085
+64833000000 64836205775 21611000000 21612068591 136163520 137232111
+64836000000 64839206000 21612000000 21613068666 137163520 138232186
+64839000000 64842206127 21613000000 21614068709 138163520 139232229
+64842000000 64845206216 21614000000 21615068738 139163520 140232258
+64845000000 64848206322 21615000000 21616068774 140163520 141232294
+64848000000 64851206533 21616000000 21617068844 141163520 142232364
+64851000000 64854206742 21617000000 21618068914 142163520 143232434
+64854000000 64857206887 21618000000 21619068962 143163520 144232482
+64857000000 64860207013 21619000000 21620069004 144163520 145232524
+64860000000 64863207179 21620000000 21621069059 145163520 146232579
+64863000000 64866207259 21621000000 21622069086 146163520 147232606
+64866000000 64869207494 21622000000 21623069164 147163520 148232684
+64869000000 64872207653 21623000000 21624069217 148163520 149232737
+64872000000 64875207774 21624000000 21625069258 149163520 150232778
+64875000000 64878207934 21625000000 21626069311 150163520 151232831
+64878000000 64881208017 21626000000 21627069339 151163520 152232859
+64881000000 64884208263 21627000000 21628069421 152163520 153232941
+64884000000 64887208386 21628000000 21629069462 153163520 154232982
+64887000000 64890208522 21629000000 21630069507 154163520 155233027
+64890000000 64893208697 21630000000 21631069565 155163520 156233085
+64893000000 64896208819 21631000000 21632069606 156163520 157233126
+64896000000 64899208969 21632000000 21633069656 157163520 158233176
+64899000000 64902209117 21633000000 21634069705 158163520 159233225
+64902000000 64904382811 21634000000 21634794270 159163520 159957790
+64905000000 64908209437 21635000000 21636069812 160163520 161233332
+64908000000 64911209569 21636000000 21637069856 161163520 162233376
+64911000000 64914209743 21637000000 21638069914 162163520 163233434
+64914000000 64917209862 21638000000 21639069954 163163520 164233474
+64917000000 64920209986 21639000000 21640069995 164163520 165233515
+64920000000 64923210205 21640000000 21641070068 165163520 166233588
+64923000000 64926210341 21641000000 21642070113 166163520 167233633
+64926000000 64929210492 21642000000 21643070164 167163520 168233684
+64929000000 64932210642 21643000000 21644070214 168163520 169233734
+64932000000 64935210757 21644000000 21645070252 169163520 170233772
+64935000000 64938210854 21645000000 21646070284 170163520 171233804
+64938000000 64941211062 21646000000 21647070354 171163520 172233874
+64941000000 64944211217 21647000000 21648070405 172163520 173233925
+64944000000 64947211376 21648000000 21649070458 173163520 174233978
+64947000000 64950211550 21649000000 21650070516 174163520 175234036
+64950000000 64953211650 21650000000 21651070550 175163520 176234070
+64953000000 64956211828 21651000000 21652070609 176163520 177234129
+64956000000 64959211977 21652000000 21653070659 177163520 178234179
+64959000000 64962212105 21653000000 21654070701 178163520 179234221
+64962000000 64965212274 21654000000 21655070758 179163520 180234278
+64965000000 64968212394 21655000000 21656070798 180163520 181234318
+64968000000 64970039744 21656000000 21656679914 181163520 181843434
+64971000000 64974212644 21657000000 21658070881 182163520 183234401
+64974000000 64977212902 21658000000 21659070967 183163520 184234487
+64977000000 64980213007 21659000000 21660071002 184163520 185234522
+64980000000 64983213087 21660000000 21661071029 185163520 186234549
+64983000000 64986213234 21661000000 21662071078 186163520 187234598
+64986000000 64989213488 21662000000 21663071162 187163520 188234682
+64989000000 64992213578 21663000000 21664071192 188163520 189234712
+64992000000 64995213823 21664000000 21665071274 189163520 190234794
+64995000000 64998213901 21665000000 21666071300 190163520 191234820
+64998000000 65001214078 21666000000 21667071359 191163520 192234879
+65001000000 65004214224 21667000000 21668071408 192163520 193234928
+65004000000 65007214368 21668000000 21669071456 193163520 194234976
+65007000000 65008837022 21669000000 21669612340 194163520 194775860
+65010000000 65013214683 21670000000 21671071561 195163520 196235081
+65013000000 65016214843 21671000000 21672071614 196163520 197235134
+65016000000 65019214980 21672000000 21673071660 197163520 198235180
+65019000000 65022215138 21673000000 21674071712 198163520 199235232
+65022000000 65025215296 21674000000 21675071765 199163520 200235285
+65025000000 65028215410 21675000000 21676071803 200163520 201235323
+65028000000 65031215571 21676000000 21677071857 201163520 202235377
+65031000000 65034215698 21677000000 21678071899 202163520 203235419
+65034000000 65037215807 21678000000 21679071935 203163520 204235455
+65037000000 65040215949 21679000000 21680071983 204163520 205235503
+65040000000 65043216183 21680000000 21681072061 205163520 206235581
+65043000000 65046216096 21681000000 21682072032 206163520 207235552
+65046000000 65049216217 21682000000 21683072072 207163520 208235592
+65049000000 65052216325 21683000000 21684072108 208163520 209235628
+65052000000 65055216560 21684000000 21685072186 209163520 210235706
+65055000000 65058216739 21685000000 21686072246 210163520 211235766
+65058000000 65061130379 21686000000 21687043459 211163520 212206979
+65061000000 65064217008 21687000000 21688072336 212163520 213235856
+65064000000 65067217181 21688000000 21689072393 213163520 214235913
+65067000000 65070217297 21689000000 21690072432 214163520 215235952
+65070000000 65073217470 21690000000 21691072490 215163520 216236010
+65073000000 65076217642 21691000000 21692072547 216163520 217236067
+65076000000 65079217698 21692000000 21693072566 217163520 218236086
+65079000000 65082217844 21693000000 21694072614 218163520 219236134
+65082000000 65085218040 21694000000 21695072680 219163520 220236200
+65085000000 65088218069 21695000000 21696072689 220163520 221236209
+65088000000 65091218375 21696000000 21697072791 221163520 222236311
+65091000000 65094218547 21697000000 21698072849 222163520 223236369
+65094000000 65097218680 21698000000 21699072893 223163520 224236413
+65097000000 65100218797 21699000000 21700072932 224163520 225236452
+65100000000 65103218982 21700000000 21701072994 225163520 226236514
+65103000000 65106219088 21701000000 21702073029 226163520 227236549
+65106000000 65109219269 21702000000 21703073089 227163520 228236609
+65109000000 65112219481 21703000000 21704073160 228163520 229236680
+65112000000 65115219588 21704000000 21705073196 229163520 230236716
+65115000000 65118219754 21705000000 21706073251 230163520 231236771
+65118000000 65120818499 21706000000 21706939499 231163520 232103019
+65121000000 65124220025 21707000000 21708073341 232163520 233236861
+65124000000 65127220137 21708000000 21709073379 233163520 234236899
+65127000000 65130220346 21709000000 21710073448 234163520 235236968
+65130000000 65133220425 21710000000 21711073475 235163520 236236995
+65133000000 65136220650 21711000000 21712073550 236163520 237237070
+65136000000 65139220777 21712000000 21713073592 237163520 238237112
+65139000000 65142220866 21713000000 21714073622 238163520 239237142
+65142000000 65145220972 21714000000 21715073657 239163520 240237177
+65145000000 65148221183 21715000000 21716073727 240163520 241237247
+65148000000 65151221392 21716000000 21717073797 241163520 242237317
+65151000000 65154221537 21717000000 21718073845 242163520 243237365
+65154000000 65157221663 21718000000 21719073887 243163520 244237407
+65157000000 65160221829 21719000000 21720073943 244163520 245237463
+65160000000 65163221909 21720000000 21721073969 245163520 246237489
+65163000000 65166222144 21721000000 21722074048 246163520 247237568
+65166000000 65169222303 21722000000 21723074101 247163520 248237621
+65169000000 65172222424 21723000000 21724074141 248163520 249237661
+65172000000 65175222584 21724000000 21725074194 249163520 250237714
+65175000000 65178222667 21725000000 21726074222 250163520 251237742
+65178000000 65181222913 21726000000 21727074304 251163520 252237824
+65181000000 65184223036 21727000000 21728074345 252163520 253237865
+65184000000 65187223172 21728000000 21729074390 253163520 254237910
+65187000000 65190223347 21729000000 21730074449 254163520 255237969
+65190000000 65193223469 21730000000 21731074489 255163520 256238009
+65193000000 65196223619 21731000000 21732074539 256163520 257238059
+65196000000 65199223767 21732000000 21733074589 257163520 258238109
+65199000000 65201397461 21733000000 21733799153 258163520 258962673
+65202000000 65205224087 21734000000 21735074695 259163520 260238215
+65205000000 65208224219 21735000000 21736074739 260163520 261238259
+65208000000 65211224393 21736000000 21737074797 261163520 262238317
+65211000000 65214224512 21737000000 21738074837 262163520 263238357
+65214000000 65217224636 21738000000 21739074878 263163520 264238398
+65217000000 65220224855 21739000000 21740074951 264163520 265238471
+65220000000 65223224991 21740000000 21741074997 265163520 266238517
+65223000000 65226225142 21741000000 21742075047 266163520 267238567
+65226000000 65229225292 21742000000 21743075097 267163520 268238617
+65229000000 65232225407 21743000000 21744075135 268163520 269238655
+65232000000 65235225504 21744000000 21745075168 269163520 270238688
+65235000000 65238225712 21745000000 21746075237 270163520 271238757
+65238000000 65241225867 21746000000 21747075289 271163520 272238809
+65241000000 65244226026 21747000000 21748075342 272163520 273238862
+65244000000 65247226200 21748000000 21749075400 273163520 274238920
+65247000000 65250226300 21749000000 21750075433 274163520 275238953
+65250000000 65253226478 21750000000 21751075492 275163520 276239012
+65253000000 65256226627 21751000000 21752075542 276163520 277239062
+65256000000 65259226755 21752000000 21753075585 277163520 278239105
+65259000000 65262226924 21753000000 21754075641 278163520 279239161
+65262000000 65265227044 21754000000 21755075681 279163520 280239201
+65265000000 65267054394 21755000000 21755684798 280163520 280848318
+65268000000 65271227294 21756000000 21757075764 281163520 282239284
+65271000000 65274227552 21757000000 21758075850 282163520 283239370
+65274000000 65277227657 21758000000 21759075885 283163520 284239405
+65277000000 65280227737 21759000000 21760075912 284163520 285239432
+65280000000 65283227884 21760000000 21761075961 285163520 286239481
+65283000000 65286228138 21761000000 21762076046 286163520 287239566
+65286000000 65289228228 21762000000 21763076076 287163520 288239596
+65289000000 65292228473 21763000000 21764076157 288163520 289239677
+65292000000 65295228551 21764000000 21765076183 289163520 290239703
+65295000000 65298228728 21765000000 21766076242 290163520 291239762
+65298000000 65301228874 21766000000 21767076291 291163520 292239811
+65301000000 65304229018 21767000000 21768076339 292163520 293239859
+65304000000 65305851672 21768000000 21768617224 293163520 293780744
+65307000000 65310229333 21769000000 21770076444 294163520 295239964
+65310000000 65313229493 21770000000 21771076497 295163520 296240017
+65313000000 65316229630 21771000000 21772076543 296163520 297240063
+65316000000 65319229788 21772000000 21773076596 297163520 298240116
+65319000000 65322229946 21773000000 21774076648 298163520 299240168
+65322000000 65325230060 21774000000 21775076686 299163520 300240206
+65325000000 65328230221 21775000000 21776076740 300163520 301240260
+65328000000 65331230348 21776000000 21777076782 301163520 302240302
+65331000000 65334230457 21777000000 21778076819 302163520 303240339
+65334000000 65337230599 21778000000 21779076866 303163520 304240386
+65337000000 65340230833 21779000000 21780076944 304163520 305240464
+65340000000 65343230746 21780000000 21781076915 305163520 306240435
+65343000000 65346230867 21781000000 21782076955 306163520 307240475
+65346000000 65349230975 21782000000 21783076991 307163520 308240511
+65349000000 65352231210 21783000000 21784077070 308163520 309240590
+65352000000 65355231389 21784000000 21785077129 309163520 310240649
+65355000000 65358145029 21785000000 21786048343 310163520 311211863
+65358000000 65361231658 21786000000 21787077219 311163520 312240739
+65361000000 65364231831 21787000000 21788077277 312163520 313240797
+65364000000 65367231947 21788000000 21789077315 313163520 314240835
+65367000000 65370232120 21789000000 21790077373 314163520 315240893
+65370000000 65373232292 21790000000 21791077430 315163520 316240950
+65373000000 65376232348 21791000000 21792077449 316163520 317240969
+65376000000 65379232494 21792000000 21793077498 317163520 318241018
+65379000000 65382232690 21793000000 21794077563 318163520 319241083
+65382000000 65385232719 21794000000 21795077573 319163520 320241093
+65385000000 65388233025 21795000000 21796077675 320163520 321241195
+65388000000 65391233197 21796000000 21797077732 321163520 322241252
+65391000000 65394233330 21797000000 21798077776 322163520 323241296
+65394000000 65397233447 21798000000 21799077815 323163520 324241335
+65397000000 65400233632 21799000000 21800077877 324163520 325241397
+65400000000 65403233738 21800000000 21801077912 325163520 326241432
+65403000000 65406233919 21801000000 21802077973 326163520 327241493
+65406000000 65409234131 21802000000 21803078043 327163520 328241563
+65409000000 65412234238 21803000000 21804078079 328163520 329241599
+65412000000 65415234404 21804000000 21805078134 329163520 330241654
+65415000000 65417833149 21805000000 21805944383 330163520 331107903
+65418000000 65421234675 21806000000 21807078225 331163520 332241745
+65421000000 65424234787 21807000000 21808078262 332163520 333241782
+65424000000 65427234996 21808000000 21809078332 333163520 334241852
+65427000000 65430235075 21809000000 21810078358 334163520 335241878
+65430000000 65433235300 21810000000 21811078433 335163520 336241953
+65433000000 65436235427 21811000000 21812078475 336163520 337241995
+65436000000 65439235516 21812000000 21813078505 337163520 338242025
+65439000000 65442235622 21813000000 21814078540 338163520 339242060
+65442000000 65445235833 21814000000 21815078611 339163520 340242131
+65445000000 65448236042 21815000000 21816078680 340163520 341242200
+65448000000 65451236187 21816000000 21817078729 341163520 342242249
+65451000000 65454236313 21817000000 21818078771 342163520 343242291
+65454000000 65457236479 21818000000 21819078826 343163520 344242346
+65457000000 65460236559 21819000000 21820078853 344163520 345242373
+65460000000 65463236794 21820000000 21821078931 345163520 346242451
+65463000000 65466236953 21821000000 21822078984 346163520 347242504
+65466000000 65469237074 21822000000 21823079024 347163520 348242544
+65469000000 65472237234 21823000000 21824079078 348163520 349242598
+65472000000 65475237317 21824000000 21825079105 349163520 350242625
+65475000000 65478237563 21825000000 21826079187 350163520 351242707
+65478000000 65481237686 21826000000 21827079228 351163520 352242748
+65481000000 65484237822 21827000000 21828079274 352163520 353242794
+65484000000 65487237997 21828000000 21829079332 353163520 354242852
+65487000000 65490238119 21829000000 21830079373 354163520 355242893
+65490000000 65493238269 21830000000 21831079423 355163520 356242943
+65493000000 65496238417 21831000000 21832079472 356163520 357242992
+65496000000 65498412111 21832000000 21832804037 357163520 357967557
+65499000000 65502238737 21833000000 21834079579 358163520 359243099
+65502000000 65505238869 21834000000 21835079623 359163520 360243143
+65505000000 65508239043 21835000000 21836079681 360163520 361243201
+65508000000 65511239162 21836000000 21837079720 361163520 362243240
+65511000000 65514239286 21837000000 21838079762 362163520 363243282
+65514000000 65517239505 21838000000 21839079835 363163520 364243355
+65517000000 65520239641 21839000000 21840079880 364163520 365243400
+65520000000 65523239792 21840000000 21841079930 365163520 366243450
+65523000000 65526239942 21841000000 21842079980 366163520 367243500
+65526000000 65529240057 21842000000 21843080019 367163520 368243539
+65529000000 65532240154 21843000000 21844080051 368163520 369243571
+65532000000 65535240362 21844000000 21845080120 369163520 370243640
+65535000000 65538240517 21845000000 21846080172 370163520 371243692
+65538000000 65541240676 21846000000 21847080225 371163520 372243745
+65541000000 65544240850 21847000000 21848080283 372163520 373243803
+65544000000 65547240950 21848000000 21849080316 373163520 374243836
+65547000000 65550241128 21849000000 21850080376 374163520 375243896
+65550000000 65553241277 21850000000 21851080425 375163520 376243945
+65553000000 65556241405 21851000000 21852080468 376163520 377243988
+65556000000 65559241574 21852000000 21853080524 377163520 378244044
+65559000000 65562241694 21853000000 21854080564 378163520 379244084
+65562000000 65564069044 21854000000 21854689681 379163520 379853201
+65565000000 65568241944 21855000000 21856080648 380163520 381244168
+65568000000 65571242202 21856000000 21857080734 381163520 382244254
+65571000000 65574242307 21857000000 21858080769 382163520 383244289
+65574000000 65577242387 21858000000 21859080795 383163520 384244315
+65577000000 65580242534 21859000000 21860080844 384163520 385244364
+65580000000 65583242788 21860000000 21861080929 385163520 386244449
+65583000000 65586242878 21861000000 21862080959 386163520 387244479
+65586000000 65589243123 21862000000 21863081041 387163520 388244561
+65589000000 65592243201 21863000000 21864081067 388163520 389244587
+65592000000 65595243378 21864000000 21865081126 389163520 390244646
+65595000000 65598243524 21865000000 21866081174 390163520 391244694
+65598000000 65601243668 21866000000 21867081222 391163520 392244742
+65601000000 65602866322 21867000000 21867622107 392163520 392785627
+65604000000 65607243983 21868000000 21869081327 393163520 394244847
+65607000000 65610244143 21869000000 21870081381 394163520 395244901
+65610000000 65613244280 21870000000 21871081426 395163520 396244946
+65613000000 65616244438 21871000000 21872081479 396163520 397244999
+65616000000 65619244596 21872000000 21873081532 397163520 398245052
+65619000000 65622244710 21873000000 21874081570 398163520 399245090
+65622000000 65625244871 21874000000 21875081623 399163520 400245143
+65625000000 65628244998 21875000000 21876081666 400163520 401245186
+65628000000 65631245107 21876000000 21877081702 401163520 402245222
+65631000000 65634245249 21877000000 21878081749 402163520 403245269
+65634000000 65637245483 21878000000 21879081827 403163520 404245347
+65637000000 65640245396 21879000000 21880081798 404163520 405245318
+65640000000 65643245517 21880000000 21881081839 405163520 406245359
+65643000000 65646245625 21881000000 21882081875 406163520 407245395
+65646000000 65649245860 21882000000 21883081953 407163520 408245473
+65649000000 65652246039 21883000000 21884082013 408163520 409245533
+65652000000 65655159679 21884000000 21885053226 409163520 410216746
+65655000000 65658246308 21885000000 21886082102 410163520 411245622
+65658000000 65661246481 21886000000 21887082160 411163520 412245680
+65661000000 65664246597 21887000000 21888082199 412163520 413245719
+65664000000 65667246770 21888000000 21889082256 413163520 414245776
+65667000000 65670246942 21889000000 21890082314 414163520 415245834
+65670000000 65673246998 21890000000 21891082332 415163520 416245852
+65673000000 65676247144 21891000000 21892082381 416163520 417245901
+65676000000 65679247340 21892000000 21893082446 417163520 418245966
+65679000000 65682247369 21893000000 21894082456 418163520 419245976
+65682000000 65685247675 21894000000 21895082558 419163520 420246078
+65685000000 65688247847 21895000000 21896082615 420163520 421246135
+65688000000 65691247980 21896000000 21897082660 421163520 422246180
+65691000000 65694248097 21897000000 21898082699 422163520 423246219
+65694000000 65697248282 21898000000 21899082760 423163520 424246280
+65697000000 65700248388 21899000000 21900082796 424163520 425246316
+65700000000 65703248569 21900000000 21901082856 425163520 426246376
+65703000000 65706248781 21901000000 21902082927 426163520 427246447
+65706000000 65709248888 21902000000 21903082962 427163520 428246482
+65709000000 65712249054 21903000000 21904083018 428163520 429246538
+65712000000 65714847799 21904000000 21904949266 429163520 430112786
+65715000000 65718249325 21905000000 21906083108 430163520 431246628
+65718000000 65721249437 21906000000 21907083145 431163520 432246665
+65721000000 65724249646 21907000000 21908083215 432163520 433246735
+65724000000 65727249725 21908000000 21909083241 433163520 434246761
+65727000000 65730249950 21909000000 21910083316 434163520 435246836
+65730000000 65733250077 21910000000 21911083359 435163520 436246879
+65733000000 65736250166 21911000000 21912083388 436163520 437246908
+65736000000 65739250272 21912000000 21913083424 437163520 438246944
+65739000000 65742250483 21913000000 21914083494 438163520 439247014
+65742000000 65745250692 21914000000 21915083564 439163520 440247084
+65745000000 65748250837 21915000000 21916083612 440163520 441247132
+65748000000 65751250963 21916000000 21917083654 441163520 442247174
+65751000000 65754251129 21917000000 21918083709 442163520 443247229
+65754000000 65757251209 21918000000 21919083736 443163520 444247256
+65757000000 65760251444 21919000000 21920083814 444163520 445247334
+65760000000 65763251603 21920000000 21921083867 445163520 446247387
+65763000000 65766251724 21921000000 21922083908 446163520 447247428
+65766000000 65769251884 21922000000 21923083961 447163520 448247481
+65769000000 65772251967 21923000000 21924083989 448163520 449247509
+65772000000 65775252213 21924000000 21925084071 449163520 450247591
+65775000000 65778252336 21925000000 21926084112 450163520 451247632
+65778000000 65781252472 21926000000 21927084157 451163520 452247677
+65781000000 65784252647 21927000000 21928084215 452163520 453247735
+65784000000 65787252769 21928000000 21929084256 453163520 454247776
+65787000000 65790252919 21929000000 21930084306 454163520 455247826
+65790000000 65793253067 21930000000 21931084355 455163520 456247875
+65793000000 65795426761 21931000000 21931808920 456163520 456972440
+65796000000 65799253387 21932000000 21933084462 457163520 458247982
+65799000000 65802253519 21933000000 21934084506 458163520 459248026
+65802000000 65805253693 21934000000 21935084564 459163520 460248084
+65805000000 65808253812 21935000000 21936084604 460163520 461248124
+65808000000 65811253936 21936000000 21937084645 461163520 462248165
+65811000000 65814254155 21937000000 21938084718 462163520 463248238
+65814000000 65817254291 21938000000 21939084763 463163520 464248283
+65817000000 65820254442 21939000000 21940084814 464163520 465248334
+65820000000 65823254592 21940000000 21941084864 465163520 466248384
+65823000000 65826254707 21941000000 21942084902 466163520 467248422
+65826000000 65829254804 21942000000 21943084934 467163520 468248454
+65829000000 65832255012 21943000000 21944085004 468163520 469248524
+65832000000 65835255167 21944000000 21945085055 469163520 470248575
+65835000000 65838255326 21945000000 21946085108 470163520 471248628
+65838000000 65841255500 21946000000 21947085166 471163520 472248686
+65841000000 65844255600 21947000000 21948085200 472163520 473248720
+65844000000 65847255778 21948000000 21949085259 473163520 474248779
+65847000000 65850255927 21949000000 21950085309 474163520 475248829
+65850000000 65853256055 21950000000 21951085351 475163520 476248871
+65853000000 65856256224 21951000000 21952085408 476163520 477248928
+65856000000 65859256344 21952000000 21953085448 477163520 478248968
+65859000000 65861083694 21953000000 21953694564 478163520 478858084
+65862000000 65865256594 21954000000 21955085531 479163520 480249051
+65865000000 65868256852 21955000000 21956085617 480163520 481249137
+65868000000 65871256957 21956000000 21957085652 481163520 482249172
+65871000000 65874257037 21957000000 21958085679 482163520 483249199
+65874000000 65877257184 21958000000 21959085728 483163520 484249248
+65877000000 65880257438 21959000000 21960085812 484163520 485249332
+65880000000 65883257528 21960000000 21961085842 485163520 486249362
+65883000000 65886257773 21961000000 21962085924 486163520 487249444
+65886000000 65889257851 21962000000 21963085950 487163520 488249470
+65889000000 65892258028 21963000000 21964086009 488163520 489249529
+65892000000 65895258174 21964000000 21965086058 489163520 490249578
+65895000000 65898258318 21965000000 21966086106 490163520 491249626
+65898000000 65899880972 21966000000 21966626990 491163520 491790510
+65901000000 65904258633 21967000000 21968086211 492163520 493249731
+65904000000 65907258793 21968000000 21969086264 493163520 494249784
+65907000000 65910258930 21969000000 21970086310 494163520 495249830
+65910000000 65913259088 21970000000 21971086362 495163520 496249882
+65913000000 65916259246 21971000000 21972086415 496163520 497249935
+65916000000 65919259360 21972000000 21973086453 497163520 498249973
+65919000000 65922259521 21973000000 21974086507 498163520 499250027
+65922000000 65925259648 21974000000 21975086549 499163520 500250069
+65925000000 65928259757 21975000000 21976086585 500163520 501250105
+65928000000 65931259899 21976000000 21977086633 501163520 502250153
+65931000000 65934260133 21977000000 21978086711 502163520 503250231
+65934000000 65937260046 21978000000 21979086682 503163520 504250202
+65937000000 65940260167 21979000000 21980086722 504163520 505250242
+65940000000 65943260275 21980000000 21981086758 505163520 506250278
+65943000000 65946260510 21981000000 21982086836 506163520 507250356
+65946000000 65949260689 21982000000 21983086896 507163520 508250416
+65949000000 65952174329 21983000000 21984058109 508163520 509221629
+65952000000 65955260958 21984000000 21985086986 509163520 510250506
+65955000000 65958261131 21985000000 21986087043 510163520 511250563
+65958000000 65961261247 21986000000 21987087082 511163520 512250602
+65961000000 65964261420 21987000000 21988087140 512163520 513250660
+65964000000 65967261592 21988000000 21989087197 513163520 514250717
+65967000000 65970261648 21989000000 21990087216 514163520 515250736
+65970000000 65973261794 21990000000 21991087264 515163520 516250784
+65973000000 65976261990 21991000000 21992087330 516163520 517250850
+65976000000 65979262019 21992000000 21993087339 517163520 518250859
+65979000000 65982262325 21993000000 21994087441 518163520 519250961
+65982000000 65985262497 21994000000 21995087499 519163520 520251019
+65985000000 65988262630 21995000000 21996087543 520163520 521251063
+65988000000 65991262747 21996000000 21997087582 521163520 522251102
+65991000000 65994262932 21997000000 21998087644 522163520 523251164
+65994000000 65997263038 21998000000 21999087679 523163520 524251199
+65997000000 66000263219 21999000000 22000087739 524163520 525251259
+66000000000 66003263431 22000000000 22001087810 525163520 526251330
+66003000000 66006263538 22001000000 22002087846 526163520 527251366
+66006000000 66009263704 22002000000 22003087901 527163520 528251421
+66009000000 66011862449 22003000000 22003954149 528163520 529117669
+66012000000 66015263975 22004000000 22005087991 529163520 530251511
+66015000000 66018264087 22005000000 22006088029 530163520 531251549
+66018000000 66021264296 22006000000 22007088098 531163520 532251618
+66021000000 66024264375 22007000000 22008088125 532163520 533251645
+66024000000 66027264600 22008000000 22009088200 533163520 534251720
+66027000000 66030264727 22009000000 22010088242 534163520 535251762
+66030000000 66033264816 22010000000 22011088272 535163520 536251792
+66033000000 66036264922 22011000000 22012088307 536163520 537251827
+66036000000 66039265133 22012000000 22013088377 537163520 538251897
+66039000000 66042265342 22013000000 22014088447 538163520 539251967
+66042000000 66045265487 22014000000 22015088495 539163520 540252015
+66045000000 66048265613 22015000000 22016088537 540163520 541252057
+66048000000 66051265779 22016000000 22017088593 541163520 542252113
+66051000000 66054265859 22017000000 22018088619 542163520 543252139
+66054000000 66057266094 22018000000 22019088698 543163520 544252218
+66057000000 66060266253 22019000000 22020088751 544163520 545252271
+66060000000 66063266374 22020000000 22021088791 545163520 546252311
+66063000000 66066266534 22021000000 22022088844 546163520 547252364
+66066000000 66069266617 22022000000 22023088872 547163520 548252392
+66069000000 66072266863 22023000000 22024088954 548163520 549252474
+66072000000 66075266986 22024000000 22025088995 549163520 550252515
+66075000000 66078267122 22025000000 22026089040 550163520 551252560
+66078000000 66081267297 22026000000 22027089099 551163520 552252619
+66081000000 66084267419 22027000000 22028089139 552163520 553252659
+66084000000 66087267569 22028000000 22029089189 553163520 554252709
+66087000000 66090267717 22029000000 22030089239 554163520 555252759
+66090000000 66092441411 22030000000 22030813803 555163520 555977323
+66093000000 66096268037 22031000000 22032089345 556163520 557252865
+66096000000 66099268169 22032000000 22033089389 557163520 558252909
+66099000000 66102268343 22033000000 22034089447 558163520 559252967
+66102000000 66105268462 22034000000 22035089487 559163520 560253007
+66105000000 66108268586 22035000000 22036089528 560163520 561253048
+66108000000 66111268805 22036000000 22037089601 561163520 562253121
+66111000000 66114268941 22037000000 22038089647 562163520 563253167
+66114000000 66117269092 22038000000 22039089697 563163520 564253217
+66117000000 66120269242 22039000000 22040089747 564163520 565253267
+66120000000 66123269357 22040000000 22041089785 565163520 566253305
+66123000000 66126269454 22041000000 22042089818 566163520 567253338
+66126000000 66129269662 22042000000 22043089887 567163520 568253407
+66129000000 66132269817 22043000000 22044089939 568163520 569253459
+66132000000 66135269976 22044000000 22045089992 569163520 570253512
+66135000000 66138270150 22045000000 22046090050 570163520 571253570
+66138000000 66141270250 22046000000 22047090083 571163520 572253603
+66141000000 66144270428 22047000000 22048090142 572163520 573253662
+66144000000 66147270577 22048000000 22049090192 573163520 574253712
+66147000000 66150270705 22049000000 22050090235 574163520 575253755
+66150000000 66153270874 22050000000 22051090291 575163520 576253811
+66153000000 66156270994 22051000000 22052090331 576163520 577253851
+66156000000 66158098344 22052000000 22052699448 577163520 577862968
+66159000000 66162271244 22053000000 22054090414 578163520 579253934
+66162000000 66165271502 22054000000 22055090500 579163520 580254020
+66165000000 66168271607 22055000000 22056090535 580163520 581254055
+66168000000 66171271687 22056000000 22057090562 581163520 582254082
+66171000000 66174271834 22057000000 22058090611 582163520 583254131
+66174000000 66177272088 22058000000 22059090696 583163520 584254216
+66177000000 66180272178 22059000000 22060090726 584163520 585254246
+66180000000 66183272423 22060000000 22061090807 585163520 586254327
+66183000000 66186272501 22061000000 22062090833 586163520 587254353
+66186000000 66189272678 22062000000 22063090892 587163520 588254412
+66189000000 66192272824 22063000000 22064090941 588163520 589254461
+66192000000 66195272968 22064000000 22065090989 589163520 590254509
+66195000000 66196895622 22065000000 22065631874 590163520 590795394
+66198000000 66201273283 22066000000 22067091094 591163520 592254614
+66201000000 66204273443 22067000000 22068091147 592163520 593254667
+66204000000 66207273580 22068000000 22069091193 593163520 594254713
+66207000000 66210273738 22069000000 22070091246 594163520 595254766
+66210000000 66213273896 22070000000 22071091298 595163520 596254818
+66213000000 66216274010 22071000000 22072091336 596163520 597254856
+66216000000 66219274171 22072000000 22073091390 597163520 598254910
+66219000000 66222274298 22073000000 22074091432 598163520 599254952
+66222000000 66225274407 22074000000 22075091469 599163520 600254989
+66225000000 66228274549 22075000000 22076091516 600163520 601255036
+66228000000 66231274783 22076000000 22077091594 601163520 602255114
+66231000000 66234274696 22077000000 22078091565 602163520 603255085
+66234000000 66237274817 22078000000 22079091605 603163520 604255125
+66237000000 66240274925 22079000000 22080091641 604163520 605255161
+66240000000 66243275160 22080000000 22081091720 605163520 606255240
+66243000000 66246275339 22081000000 22082091779 606163520 607255299
+66246000000 66249188979 22082000000 22083062993 607163520 608226513
+66249000000 66252275608 22083000000 22084091869 608163520 609255389
+66252000000 66255275781 22084000000 22085091927 609163520 610255447
+66255000000 66258275897 22085000000 22086091965 610163520 611255485
+66258000000 66261276070 22086000000 22087092023 611163520 612255543
+66261000000 66264276242 22087000000 22088092080 612163520 613255600
+66264000000 66267276298 22088000000 22089092099 613163520 614255619
+66267000000 66270276444 22089000000 22090092148 614163520 615255668
+66270000000 66273276640 22090000000 22091092213 615163520 616255733
+66273000000 66276276669 22091000000 22092092223 616163520 617255743
+66276000000 66279276975 22092000000 22093092325 617163520 618255845
+66279000000 66282277147 22093000000 22094092382 618163520 619255902
+66282000000 66285277280 22094000000 22095092426 619163520 620255946
+66285000000 66288277397 22095000000 22096092465 620163520 621255985
+66288000000 66291277582 22096000000 22097092527 621163520 622256047
+66291000000 66294277688 22097000000 22098092562 622163520 623256082
+66294000000 66297277869 22098000000 22099092623 623163520 624256143
+66297000000 66300278081 22099000000 22100092693 624163520 625256213
+66300000000 66303278188 22100000000 22101092729 625163520 626256249
+66303000000 66306278354 22101000000 22102092784 626163520 627256304
+66306000000 66308877099 22102000000 22102959033 627163520 628122553
+66309000000 66312278625 22103000000 22104092875 628163520 629256395
+66312000000 66315278737 22104000000 22105092912 629163520 630256432
+66315000000 66318278946 22105000000 22106092982 630163520 631256502
+66318000000 66321279025 22106000000 22107093008 631163520 632256528
+66321000000 66324279250 22107000000 22108093083 632163520 633256603
+66324000000 66327279377 22108000000 22109093125 633163520 634256645
+66327000000 66330279466 22109000000 22110093155 634163520 635256675
+66330000000 66333279572 22110000000 22111093190 635163520 636256710
+66333000000 66336279783 22111000000 22112093261 636163520 637256781
+66336000000 66339279992 22112000000 22113093330 637163520 638256850
+66339000000 66342280137 22113000000 22114093379 638163520 639256899
+66342000000 66345280263 22114000000 22115093421 639163520 640256941
+66345000000 66348280429 22115000000 22116093476 640163520 641256996
+66348000000 66351280509 22116000000 22117093503 641163520 642257023
+66351000000 66354280744 22117000000 22118093581 642163520 643257101
+66354000000 66357280903 22118000000 22119093634 643163520 644257154
+66357000000 66360281024 22119000000 22120093674 644163520 645257194
+66360000000 66363281184 22120000000 22121093728 645163520 646257248
+66363000000 66366281267 22121000000 22122093755 646163520 647257275
+66366000000 66369281513 22122000000 22123093837 647163520 648257357
+66369000000 66372281636 22123000000 22124093878 648163520 649257398
+66372000000 66375281772 22124000000 22125093924 649163520 650257444
+66375000000 66378281947 22125000000 22126093982 650163520 651257502
+66378000000 66381282069 22126000000 22127094023 651163520 652257543
+66381000000 66384282219 22127000000 22128094073 652163520 653257593
+66384000000 66387282367 22128000000 22129094122 653163520 654257642
+66387000000 66389456061 22129000000 22129818687 654163520 654982207
+66390000000 66393282687 22130000000 22131094229 655163520 656257749
+66393000000 66396282819 22131000000 22132094273 656163520 657257793
+66396000000 66399282993 22132000000 22133094331 657163520 658257851
+66399000000 66402283112 22133000000 22134094370 658163520 659257890
+66402000000 66405283236 22134000000 22135094412 659163520 660257932
+66405000000 66408283455 22135000000 22136094485 660163520 661258005
+66408000000 66411283591 22136000000 22137094530 661163520 662258050
+66411000000 66414283742 22137000000 22138094580 662163520 663258100
+66414000000 66417283892 22138000000 22139094630 663163520 664258150
+66417000000 66420284007 22139000000 22140094669 664163520 665258189
+66420000000 66423284104 22140000000 22141094701 665163520 666258221
+66423000000 66426284312 22141000000 22142094770 666163520 667258290
+66426000000 66429284467 22142000000 22143094822 667163520 668258342
+66429000000 66432284626 22143000000 22144094875 668163520 669258395
+66432000000 66435284800 22144000000 22145094933 669163520 670258453
+66435000000 66438284900 22145000000 22146094966 670163520 671258486
+66438000000 66441285078 22146000000 22147095026 671163520 672258546
+66441000000 66444285227 22147000000 22148095075 672163520 673258595
+66444000000 66447285355 22148000000 22149095118 673163520 674258638
+66447000000 66450285524 22149000000 22150095174 674163520 675258694
+66450000000 66453285644 22150000000 22151095214 675163520 676258734
+66453000000 66455112994 22151000000 22151704331 676163520 676867851
+66456000000 66459285894 22152000000 22153095298 677163520 678258818
+66459000000 66462286152 22153000000 22154095384 678163520 679258904
+66462000000 66465286257 22154000000 22155095419 679163520 680258939
+66465000000 66468286337 22155000000 22156095445 680163520 681258965
+66468000000 66471286484 22156000000 22157095494 681163520 682259014
+66471000000 66474286738 22157000000 22158095579 682163520 683259099
+66474000000 66477286828 22158000000 22159095609 683163520 684259129
+66477000000 66480287073 22159000000 22160095691 684163520 685259211
+66480000000 66483287151 22160000000 22161095717 685163520 686259237
+66483000000 66486287328 22161000000 22162095776 686163520 687259296
+66486000000 66489287474 22162000000 22163095824 687163520 688259344
+66489000000 66492287618 22163000000 22164095872 688163520 689259392
+66492000000 66493910272 22164000000 22164636757 689163520 689800277
+66495000000 66498287933 22165000000 22166095977 690163520 691259497
+66498000000 66501288093 22166000000 22167096031 691163520 692259551
+66501000000 66504288230 22167000000 22168096076 692163520 693259596
+66504000000 66507288388 22168000000 22169096129 693163520 694259649
+66507000000 66510288546 22169000000 22170096182 694163520 695259702
+66510000000 66513288660 22170000000 22171096220 695163520 696259740
+66513000000 66516288821 22171000000 22172096273 696163520 697259793
+66516000000 66519288948 22172000000 22173096316 697163520 698259836
+66519000000 66522289057 22173000000 22174096352 698163520 699259872
+66522000000 66525289199 22174000000 22175096399 699163520 700259919
+66525000000 66528289433 22175000000 22176096477 700163520 701259997
+66528000000 66531289346 22176000000 22177096448 701163520 702259968
+66531000000 66534289467 22177000000 22178096489 702163520 703260009
+66534000000 66537289575 22178000000 22179096525 703163520 704260045
+66537000000 66540289810 22179000000 22180096603 704163520 705260123
+66540000000 66543289989 22180000000 22181096663 705163520 706260183
+66543000000 66546203629 22181000000 22182067876 706163520 707231396
+66546000000 66549290258 22182000000 22183096752 707163520 708260272
+66549000000 66552290431 22183000000 22184096810 708163520 709260330
+66552000000 66555290547 22184000000 22185096849 709163520 710260369
+66555000000 66558290720 22185000000 22186096906 710163520 711260426
+66558000000 66561290892 22186000000 22187096964 711163520 712260484
+66561000000 66564290948 22187000000 22188096982 712163520 713260502
+66564000000 66567291094 22188000000 22189097031 713163520 714260551
+66567000000 66570291290 22189000000 22190097096 714163520 715260616
+66570000000 66573291319 22190000000 22191097106 715163520 716260626
+66573000000 66576291625 22191000000 22192097208 716163520 717260728
+66576000000 66579291797 22192000000 22193097265 717163520 718260785
+66579000000 66582291930 22193000000 22194097310 718163520 719260830
+66582000000 66585292047 22194000000 22195097349 719163520 720260869
+66585000000 66588292232 22195000000 22196097410 720163520 721260930
+66588000000 66591292338 22196000000 22197097446 721163520 722260966
+66591000000 66594292519 22197000000 22198097506 722163520 723261026
+66594000000 66597292731 22198000000 22199097577 723163520 724261097
+66597000000 66600292838 22199000000 22200097612 724163520 725261132
+66600000000 66603293004 22200000000 22201097668 725163520 726261188
+66603000000 66605891749 22201000000 22201963916 726163520 727127436
+66606000000 66609293275 22202000000 22203097758 727163520 728261278
+66609000000 66612293387 22203000000 22204097795 728163520 729261315
+66612000000 66615293596 22204000000 22205097865 729163520 730261385
+66615000000 66618293675 22205000000 22206097891 730163520 731261411
+66618000000 66621293900 22206000000 22207097966 731163520 732261486
+66621000000 66624294027 22207000000 22208098009 732163520 733261529
+66624000000 66627294116 22208000000 22209098038 733163520 734261558
+66627000000 66630294222 22209000000 22210098074 734163520 735261594
+66630000000 66633294433 22210000000 22211098144 735163520 736261664
+66633000000 66636294642 22211000000 22212098214 736163520 737261734
+66636000000 66639294787 22212000000 22213098262 737163520 738261782
+66639000000 66642294913 22213000000 22214098304 738163520 739261824
+66642000000 66645295079 22214000000 22215098359 739163520 740261879
+66645000000 66648295159 22215000000 22216098386 740163520 741261906
+66648000000 66651295394 22216000000 22217098464 741163520 742261984
+66651000000 66654295553 22217000000 22218098517 742163520 743262037
+66654000000 66657295674 22218000000 22219098558 743163520 744262078
+66657000000 66660295834 22219000000 22220098611 744163520 745262131
+66660000000 66663295917 22220000000 22221098639 745163520 746262159
+66663000000 66666296163 22221000000 22222098721 746163520 747262241
+66666000000 66669296286 22222000000 22223098762 747163520 748262282
+66669000000 66672296422 22223000000 22224098807 748163520 749262327
+66672000000 66675296597 22224000000 22225098865 749163520 750262385
+66675000000 66678296719 22225000000 22226098906 750163520 751262426
+66678000000 66681296869 22226000000 22227098956 751163520 752262476
+66681000000 66684297017 22227000000 22228099005 752163520 753262525
+66684000000 66686470711 22228000000 22228823570 753163520 753987090
+66687000000 66690297337 22229000000 22230099112 754163520 755262632
+66690000000 66693297469 22230000000 22231099156 755163520 756262676
+66693000000 66696297643 22231000000 22232099214 756163520 757262734
+66696000000 66699297762 22232000000 22233099254 757163520 758262774
+66699000000 66702297886 22233000000 22234099295 758163520 759262815
+66702000000 66705298105 22234000000 22235099368 759163520 760262888
+66705000000 66708298241 22235000000 22236099413 760163520 761262933
+66708000000 66711298392 22236000000 22237099464 761163520 762262984
+66711000000 66714298542 22237000000 22238099514 762163520 763263034
+66714000000 66717298657 22238000000 22239099552 763163520 764263072
+66717000000 66720298754 22239000000 22240099584 764163520 765263104
+66720000000 66723298962 22240000000 22241099654 765163520 766263174
+66723000000 66726299117 22241000000 22242099705 766163520 767263225
+66726000000 66729299276 22242000000 22243099758 767163520 768263278
+66729000000 66732299450 22243000000 22244099816 768163520 769263336
+66732000000 66735299550 22244000000 22245099850 769163520 770263370
+66735000000 66738299728 22245000000 22246099909 770163520 771263429
+66738000000 66741299877 22246000000 22247099959 771163520 772263479
+66741000000 66744300005 22247000000 22248100001 772163520 773263521
+66744000000 66747300174 22248000000 22249100058 773163520 774263578
+66747000000 66750300294 22249000000 22250100098 774163520 775263618
+66750000000 66752127644 22250000000 22250709214 775163520 775872734
+66753000000 66756300544 22251000000 22252100181 776163520 777263701
+66756000000 66759300802 22252000000 22253100267 777163520 778263787
+66759000000 66762300907 22253000000 22254100302 778163520 779263822
+66762000000 66765300987 22254000000 22255100329 779163520 780263849
+66765000000 66768301134 22255000000 22256100378 780163520 781263898
+66768000000 66771301388 22256000000 22257100462 781163520 782263982
+66771000000 66774301478 22257000000 22258100492 782163520 783264012
+66774000000 66777301723 22258000000 22259100574 783163520 784264094
+66777000000 66780301801 22259000000 22260100600 784163520 785264120
+66780000000 66783301978 22260000000 22261100659 785163520 786264179
+66783000000 66786302124 22261000000 22262100708 786163520 787264228
+66786000000 66789302268 22262000000 22263100756 787163520 788264276
+66789000000 66790924922 22263000000 22263641640 788163520 788805160
+66792000000 66795302583 22264000000 22265100861 789163520 790264381
+66795000000 66798302743 22265000000 22266100914 790163520 791264434
+66798000000 66801302880 22266000000 22267100960 791163520 792264480
+66801000000 66804303038 22267000000 22268101012 792163520 793264532
+66804000000 66807303196 22268000000 22269101065 793163520 794264585
+66807000000 66810303310 22269000000 22270101103 794163520 795264623
+66810000000 66813303471 22270000000 22271101157 795163520 796264677
+66813000000 66816303598 22271000000 22272101199 796163520 797264719
+66816000000 66819303707 22272000000 22273101235 797163520 798264755
+66819000000 66822303849 22273000000 22274101283 798163520 799264803
+66822000000 66825304083 22274000000 22275101361 799163520 800264881
+66825000000 66828303996 22275000000 22276101332 800163520 801264852
+66828000000 66831304117 22276000000 22277101372 801163520 802264892
+66831000000 66834304225 22277000000 22278101408 802163520 803264928
+66834000000 66837304460 22278000000 22279101486 803163520 804265006
+66837000000 66840304639 22279000000 22280101546 804163520 805265066
+66840000000 66843218279 22280000000 22281072759 805163520 806236279
+66843000000 66846304908 22281000000 22282101636 806163520 807265156
+66846000000 66849305081 22282000000 22283101693 807163520 808265213
+66849000000 66852305197 22283000000 22284101732 808163520 809265252
+66852000000 66855305370 22284000000 22285101790 809163520 810265310
+66855000000 66858305542 22285000000 22286101847 810163520 811265367
+66858000000 66861305598 22286000000 22287101866 811163520 812265386
+66861000000 66864305744 22287000000 22288101914 812163520 813265434
+66864000000 66867305940 22288000000 22289101980 813163520 814265500
+66867000000 66870305969 22289000000 22290101989 814163520 815265509
+66870000000 66873306275 22290000000 22291102091 815163520 816265611
+66873000000 66876306447 22291000000 22292102149 816163520 817265669
+66876000000 66879306580 22292000000 22293102193 817163520 818265713
+66879000000 66882306697 22293000000 22294102232 818163520 819265752
+66882000000 66885306882 22294000000 22295102294 819163520 820265814
+66885000000 66888306988 22295000000 22296102329 820163520 821265849
+66888000000 66891307169 22296000000 22297102389 821163520 822265909
+66891000000 66894307381 22297000000 22298102460 822163520 823265980
+66894000000 66897307488 22298000000 22299102496 823163520 824266016
+66897000000 66900307654 22299000000 22300102551 824163520 825266071
+66900000000 66902906399 22300000000 22300968799 825163520 826132319
+66903000000 66906307925 22301000000 22302102641 826163520 827266161
+66906000000 66909308037 22302000000 22303102679 827163520 828266199
+66909000000 66912308246 22303000000 22304102748 828163520 829266268
+66912000000 66915308325 22304000000 22305102775 829163520 830266295
+66915000000 66918308550 22305000000 22306102850 830163520 831266370
+66918000000 66921308677 22306000000 22307102892 831163520 832266412
+66921000000 66924308766 22307000000 22308102922 832163520 833266442
+66924000000 66927308872 22308000000 22309102957 833163520 834266477
+66927000000 66930309083 22309000000 22310103027 834163520 835266547
+66930000000 66933309292 22310000000 22311103097 835163520 836266617
+66933000000 66936309437 22311000000 22312103145 836163520 837266665
+66936000000 66939309563 22312000000 22313103187 837163520 838266707
+66939000000 66942309729 22313000000 22314103243 838163520 839266763
+66942000000 66945309809 22314000000 22315103269 839163520 840266789
+66945000000 66948310044 22315000000 22316103348 840163520 841266868
+66948000000 66951310203 22316000000 22317103401 841163520 842266921
+66951000000 66954310324 22317000000 22318103441 842163520 843266961
+66954000000 66957310484 22318000000 22319103494 843163520 844267014
+66957000000 66960310567 22319000000 22320103522 844163520 845267042
+66960000000 66963310813 22320000000 22321103604 845163520 846267124
+66963000000 66966310936 22321000000 22322103645 846163520 847267165
+66966000000 66969311072 22322000000 22323103690 847163520 848267210
+66969000000 66972311247 22323000000 22324103749 848163520 849267269
+66972000000 66975311369 22324000000 22325103789 849163520 850267309
+66975000000 66978311519 22325000000 22326103839 850163520 851267359
+66978000000 66981311667 22326000000 22327103889 851163520 852267409
+66981000000 66983485361 22327000000 22327828453 852163520 852991973
+66984000000 66987311987 22328000000 22329103995 853163520 854267515
+66987000000 66990312119 22329000000 22330104039 854163520 855267559
+66990000000 66993312293 22330000000 22331104097 855163520 856267617
+66993000000 66996312412 22331000000 22332104137 856163520 857267657
+66996000000 66999312536 22332000000 22333104178 857163520 858267698
+66999000000 67002312755 22333000000 22334104251 858163520 859267771
+67002000000 67005312891 22334000000 22335104297 859163520 860267817
+67005000000 67008313042 22335000000 22336104347 860163520 861267867
+67008000000 67011313192 22336000000 22337104397 861163520 862267917
+67011000000 67014313307 22337000000 22338104435 862163520 863267955
+67014000000 67017313404 22338000000 22339104468 863163520 864267988
+67017000000 67020313612 22339000000 22340104537 864163520 865268057
+67020000000 67023313767 22340000000 22341104589 865163520 866268109
+67023000000 67026313926 22341000000 22342104642 866163520 867268162
+67026000000 67029314100 22342000000 22343104700 867163520 868268220
+67029000000 67032314200 22343000000 22344104733 868163520 869268253
+67032000000 67035314378 22344000000 22345104792 869163520 870268312
+67035000000 67038314527 22345000000 22346104842 870163520 871268362
+67038000000 67041314655 22346000000 22347104885 871163520 872268405
+67041000000 67044314824 22347000000 22348104941 872163520 873268461
+67044000000 67047314944 22348000000 22349104981 873163520 874268501
+67047000000 67049142294 22349000000 22349714098 874163520 874877618
+67050000000 67053315194 22350000000 22351105064 875163520 876268584
+67053000000 67056315452 22351000000 22352105150 876163520 877268670
+67056000000 67059315557 22352000000 22353105185 877163520 878268705
+67059000000 67062315637 22353000000 22354105212 878163520 879268732
+67062000000 67065315784 22354000000 22355105261 879163520 880268781
+67065000000 67068316038 22355000000 22356105346 880163520 881268866
+67068000000 67071316128 22356000000 22357105376 881163520 882268896
+67071000000 67074316373 22357000000 22358105457 882163520 883268977
+67074000000 67077316451 22358000000 22359105483 883163520 884269003
+67077000000 67080316628 22359000000 22360105542 884163520 885269062
+67080000000 67083316774 22360000000 22361105591 885163520 886269111
+67083000000 67086316918 22361000000 22362105639 886163520 887269159
+67086000000 67087939572 22362000000 22362646524 887163520 887810044
+67089000000 67092317233 22363000000 22364105744 888163520 889269264
+67092000000 67095317393 22364000000 22365105797 889163520 890269317
+67095000000 67098317530 22365000000 22366105843 890163520 891269363
+67098000000 67101317688 22366000000 22367105896 891163520 892269416
+67101000000 67104317846 22367000000 22368105948 892163520 893269468
+67104000000 67107317960 22368000000 22369105986 893163520 894269506
+67107000000 67110318121 22369000000 22370106040 894163520 895269560
+67110000000 67113318248 22370000000 22371106082 895163520 896269602
+67113000000 67116318357 22371000000 22372106119 896163520 897269639
+67116000000 67119318499 22372000000 22373106166 897163520 898269686
+67119000000 67122318733 22373000000 22374106244 898163520 899269764
+67122000000 67125318646 22374000000 22375106215 899163520 900269735
+67125000000 67128318767 22375000000 22376106255 900163520 901269775
+67128000000 67131318875 22376000000 22377106291 901163520 902269811
+67131000000 67134319110 22377000000 22378106370 902163520 903269890
+67134000000 67137319289 22378000000 22379106429 903163520 904269949
+67137000000 67140232929 22379000000 22380077643 904163520 905241163
+67140000000 67143319558 22380000000 22381106519 905163520 906270039
+67143000000 67146319731 22381000000 22382106577 906163520 907270097
+67146000000 67149319847 22382000000 22383106615 907163520 908270135
+67149000000 67152320020 22383000000 22384106673 908163520 909270193
+67152000000 67155320192 22384000000 22385106730 909163520 910270250
+67155000000 67158320248 22385000000 22386106749 910163520 911270269
+67158000000 67161320394 22386000000 22387106798 911163520 912270318
+67161000000 67164320590 22387000000 22388106863 912163520 913270383
+67164000000 67167320619 22388000000 22389106873 913163520 914270393
+67167000000 67170320925 22389000000 22390106975 914163520 915270495
+67170000000 67173321097 22390000000 22391107032 915163520 916270552
+67173000000 67176321230 22391000000 22392107076 916163520 917270596
+67176000000 67179321347 22392000000 22393107115 917163520 918270635
+67179000000 67182321532 22393000000 22394107177 918163520 919270697
+67182000000 67185321638 22394000000 22395107212 919163520 920270732
+67185000000 67188321819 22395000000 22396107273 920163520 921270793
+67188000000 67191322031 22396000000 22397107343 921163520 922270863
+67191000000 67194322138 22397000000 22398107379 922163520 923270899
+67194000000 67197322304 22398000000 22399107434 923163520 924270954
+67197000000 67199921049 22399000000 22399973683 924163520 925137203
+67200000000 67203322575 22400000000 22401107525 925163520 926271045
+67203000000 67206322687 22401000000 22402107562 926163520 927271082
+67206000000 67209322896 22402000000 22403107632 927163520 928271152
+67209000000 67212322975 22403000000 22404107658 928163520 929271178
+67212000000 67215323200 22404000000 22405107733 929163520 930271253
+67215000000 67218323327 22405000000 22406107775 930163520 931271295
+67218000000 67221323416 22406000000 22407107805 931163520 932271325
+67221000000 67224323522 22407000000 22408107840 932163520 933271360
+67224000000 67227323733 22408000000 22409107911 933163520 934271431
+67227000000 67230323942 22409000000 22410107980 934163520 935271500
+67230000000 67233324087 22410000000 22411108029 935163520 936271549
+67233000000 67236324213 22411000000 22412108071 936163520 937271591
+67236000000 67239324379 22412000000 22413108126 937163520 938271646
+67239000000 67242324459 22413000000 22414108153 938163520 939271673
+67242000000 67245324694 22414000000 22415108231 939163520 940271751
+67245000000 67248324853 22415000000 22416108284 940163520 941271804
+67248000000 67251324974 22416000000 22417108324 941163520 942271844
+67251000000 67254325134 22417000000 22418108378 942163520 943271898
+67254000000 67257325217 22418000000 22419108405 943163520 944271925
+67257000000 67260325463 22419000000 22420108487 944163520 945272007
+67260000000 67263325586 22420000000 22421108528 945163520 946272048
+67263000000 67266325722 22421000000 22422108574 946163520 947272094
+67266000000 67269325897 22422000000 22423108632 947163520 948272152
+67269000000 67272326019 22423000000 22424108673 948163520 949272193
+67272000000 67275326169 22424000000 22425108723 949163520 950272243
+67275000000 67278326317 22425000000 22426108772 950163520 951272292
+67278000000 67280500011 22426000000 22426833337 951163520 951996857
+67281000000 67284326637 22427000000 22428108879 952163520 953272399
+67284000000 67287326769 22428000000 22429108923 953163520 954272443
+67287000000 67290326943 22429000000 22430108981 954163520 955272501
+67290000000 67293327062 22430000000 22431109020 955163520 956272540
+67293000000 67296327186 22431000000 22432109062 956163520 957272582
+67296000000 67299327405 22432000000 22433109135 957163520 958272655
+67299000000 67302327541 22433000000 22434109180 958163520 959272700
+67302000000 67305327692 22434000000 22435109230 959163520 960272750
+67305000000 67308327842 22435000000 22436109280 960163520 961272800
+67308000000 67311327957 22436000000 22437109319 961163520 962272839
+67311000000 67314328054 22437000000 22438109351 962163520 963272871
+67314000000 67317328262 22438000000 22439109420 963163520 964272940
+67317000000 67320328417 22439000000 22440109472 964163520 965272992
+67320000000 67323328576 22440000000 22441109525 965163520 966273045
+67323000000 67326328750 22441000000 22442109583 966163520 967273103
+67326000000 67329328850 22442000000 22443109616 967163520 968273136
+67329000000 67332329028 22443000000 22444109676 968163520 969273196
+67332000000 67335329177 22444000000 22445109725 969163520 970273245
+67335000000 67338329305 22445000000 22446109768 970163520 971273288
+67338000000 67341329474 22446000000 22447109824 971163520 972273344
+67341000000 67344329594 22447000000 22448109864 972163520 973273384
+67344000000 67346156944 22448000000 22448718981 973163520 973882501
+67347000000 67350329844 22449000000 22450109948 974163520 975273468
+67350000000 67353330102 22450000000 22451110034 975163520 976273554
+67353000000 67356330207 22451000000 22452110069 976163520 977273589
+67356000000 67359330287 22452000000 22453110095 977163520 978273615
+67359000000 67362330434 22453000000 22454110144 978163520 979273664
+67362000000 67365330688 22454000000 22455110229 979163520 980273749
+67365000000 67368330778 22455000000 22456110259 980163520 981273779
+67368000000 67371331023 22456000000 22457110341 981163520 982273861
+67371000000 67374331101 22457000000 22458110367 982163520 983273887
+67374000000 67377331278 22458000000 22459110426 983163520 984273946
+67377000000 67380331424 22459000000 22460110474 984163520 985273994
+67380000000 67383331568 22460000000 22461110522 985163520 986274042
+67383000000 67384954222 22461000000 22461651407 986163520 986814927
+67386000000 67389331883 22462000000 22463110627 987163520 988274147
+67389000000 67392332043 22463000000 22464110681 988163520 989274201
+67392000000 67395332180 22464000000 22465110726 989163520 990274246
+67395000000 67398332338 22465000000 22466110779 990163520 991274299
+67398000000 67401332496 22466000000 22467110832 991163520 992274352
+67401000000 67404332610 22467000000 22468110870 992163520 993274390
+67404000000 67407332771 22468000000 22469110923 993163520 994274443
+67407000000 67410332898 22469000000 22470110966 994163520 995274486
+67410000000 67413333007 22470000000 22471111002 995163520 996274522
+67413000000 67416333149 22471000000 22472111049 996163520 997274569
+67416000000 67419333383 22472000000 22473111127 997163520 998274647
+67419000000 67422333296 22473000000 22474111098 998163520 999274618
+67422000000 67425333417 22474000000 22475111139 999163520 1000274659
+67425000000 67428333525 22475000000 22476111175 1000163520 1001274695
+67428000000 67431333760 22476000000 22477111253 1001163520 1002274773
+67431000000 67434333939 22477000000 22478111313 1002163520 1003274833
+67434000000 67437247579 22478000000 22479082526 1003163520 1004246046
+67437000000 67440334208 22479000000 22480111402 1004163520 1005274922
+67440000000 67443334381 22480000000 22481111460 1005163520 1006274980
+67443000000 67446334497 22481000000 22482111499 1006163520 1007275019
+67446000000 67449334670 22482000000 22483111556 1007163520 1008275076
+67449000000 67452334842 22483000000 22484111614 1008163520 1009275134
+67452000000 67455334898 22484000000 22485111632 1009163520 1010275152
+67455000000 67458335044 22485000000 22486111681 1010163520 1011275201
+67458000000 67461335240 22486000000 22487111746 1011163520 1012275266
+67461000000 67464335269 22487000000 22488111756 1012163520 1013275276
+67464000000 67467335575 22488000000 22489111858 1013163520 1014275378
+67467000000 67470335747 22489000000 22490111915 1014163520 1015275435
+67470000000 67473335880 22490000000 22491111960 1015163520 1016275480
+67473000000 67476335997 22491000000 22492111999 1016163520 1017275519
+67476000000 67479336182 22492000000 22493112060 1017163520 1018275580
+67479000000 67482336288 22493000000 22494112096 1018163520 1019275616
+67482000000 67485336469 22494000000 22495112156 1019163520 1020275676
+67485000000 67488336681 22495000000 22496112227 1020163520 1021275747
+67488000000 67491336788 22496000000 22497112262 1021163520 1022275782
+67491000000 67494336954 22497000000 22498112318 1022163520 1023275838
+67494000000 67496935699 22498000000 22498978566 1023163520 1024142086
+67497000000 67500337225 22499000000 22500112408 1024163520 1025275928
+67500000000 67503337337 22500000000 22501112445 1025163520 1026275965
+67503000000 67506337546 22501000000 22502112515 1026163520 1027276035
+67506000000 67509337625 22502000000 22503112541 1027163520 1028276061
+67509000000 67512337850 22503000000 22504112616 1028163520 1029276136
+67512000000 67515337977 22504000000 22505112659 1029163520 1030276179
+67515000000 67518338066 22505000000 22506112688 1030163520 1031276208
+67518000000 67521338172 22506000000 22507112724 1031163520 1032276244
+67521000000 67524338383 22507000000 22508112794 1032163520 1033276314
+67524000000 67527338592 22508000000 22509112864 1033163520 1034276384
+67527000000 67530338737 22509000000 22510112912 1034163520 1035276432
+67530000000 67533338863 22510000000 22511112954 1035163520 1036276474
+67533000000 67536339029 22511000000 22512113009 1036163520 1037276529
+67536000000 67539339109 22512000000 22513113036 1037163520 1038276556
+67539000000 67542339344 22513000000 22514113114 1038163520 1039276634
+67542000000 67545339503 22514000000 22515113167 1039163520 1040276687
+67545000000 67548339624 22515000000 22516113208 1040163520 1041276728
+67548000000 67551339784 22516000000 22517113261 1041163520 1042276781
+67551000000 67554339867 22517000000 22518113289 1042163520 1043276809
+67554000000 67557340113 22518000000 22519113371 1043163520 1044276891
+67557000000 67560340236 22519000000 22520113412 1044163520 1045276932
+67560000000 67563340372 22520000000 22521113457 1045163520 1046276977
+67563000000 67566340547 22521000000 22522113515 1046163520 1047277035
+67566000000 67569340669 22522000000 22523113556 1047163520 1048277076
+67569000000 67572340819 22523000000 22524113606 1048163520 1049277126
+67572000000 67575340967 22524000000 22525113655 1049163520 1050277175
+67575000000 67577514661 22525000000 22525838220 1050163520 1051001740
+67578000000 67581341287 22526000000 22527113762 1051163520 1052277282
+67581000000 67584341419 22527000000 22528113806 1052163520 1053277326
+67584000000 67587341593 22528000000 22529113864 1053163520 1054277384
+67587000000 67590341712 22529000000 22530113904 1054163520 1055277424
+67590000000 67593341836 22530000000 22531113945 1055163520 1056277465
+67593000000 67596342055 22531000000 22532114018 1056163520 1057277538
+67596000000 67599342191 22532000000 22533114063 1057163520 1058277583
+67599000000 67602342342 22533000000 22534114114 1058163520 1059277634
+67602000000 67605342492 22534000000 22535114164 1059163520 1060277684
+67605000000 67608342607 22535000000 22536114202 1060163520 1061277722
+67608000000 67611342704 22536000000 22537114234 1061163520 1062277754
+67611000000 67614342912 22537000000 22538114304 1062163520 1063277824
+67614000000 67617343067 22538000000 22539114355 1063163520 1064277875
+67617000000 67620343226 22539000000 22540114408 1064163520 1065277928
+67620000000 67623343400 22540000000 22541114466 1065163520 1066277986
+67623000000 67626343500 22541000000 22542114500 1066163520 1067278020
+67626000000 67629343678 22542000000 22543114559 1067163520 1068278079
+67629000000 67632343827 22543000000 22544114609 1068163520 1069278129
+67632000000 67635343955 22544000000 22545114651 1069163520 1070278171
+67635000000 67638344124 22545000000 22546114708 1070163520 1071278228
+67638000000 67641344244 22546000000 22547114748 1071163520 1072278268
+67641000000 67643171594 22547000000 22547723864 1072163520 1072887384
+67644000000 67647344494 22548000000 22549114831 1073163520 1074278351
+67647000000 67650344752 22549000000 22550114917 1074163520 1075278437
+67650000000 67653344857 22550000000 22551114952 1075163520 1076278472
+67653000000 67656344937 22551000000 22552114979 1076163520 1077278499
+67656000000 67659345084 22552000000 22553115028 1077163520 1078278548
+67659000000 67662345338 22553000000 22554115112 1078163520 1079278632
+67662000000 67665345428 22554000000 22555115142 1079163520 1080278662
+67665000000 67668345673 22555000000 22556115224 1080163520 1081278744
+67668000000 67671345751 22556000000 22557115250 1081163520 1082278770
+67671000000 67674345928 22557000000 22558115309 1082163520 1083278829
+67674000000 67677346074 22558000000 22559115358 1083163520 1084278878
+67677000000 67680346218 22559000000 22560115406 1084163520 1085278926
+67680000000 67681968872 22560000000 22560656290 1085163520 1085819810
+67683000000 67686346533 22561000000 22562115511 1086163520 1087279031
+67686000000 67689346693 22562000000 22563115564 1087163520 1088279084
+67689000000 67692346830 22563000000 22564115610 1088163520 1089279130
+67692000000 67695346988 22564000000 22565115662 1089163520 1090279182
+67695000000 67698347146 22565000000 22566115715 1090163520 1091279235
+67698000000 67701347260 22566000000 22567115753 1091163520 1092279273
+67701000000 67704347421 22567000000 22568115807 1092163520 1093279327
+67704000000 67707347548 22568000000 22569115849 1093163520 1094279369
+67707000000 67710347657 22569000000 22570115885 1094163520 1095279405
+67710000000 67713347799 22570000000 22571115933 1095163520 1096279453
+67713000000 67716348033 22571000000 22572116011 1096163520 1097279531
+67716000000 67719347946 22572000000 22573115982 1097163520 1098279502
+67719000000 67722348067 22573000000 22574116022 1098163520 1099279542
+67722000000 67725348175 22574000000 22575116058 1099163520 1100279578
+67725000000 67728348410 22575000000 22576116136 1100163520 1101279656
+67728000000 67731348589 22576000000 22577116196 1101163520 1102279716
+67731000000 67734262229 22577000000 22578087409 1102163520 1103250929
+67734000000 67737348858 22578000000 22579116286 1103163520 1104279806
+67737000000 67740349031 22579000000 22580116343 1104163520 1105279863
+67740000000 67743349147 22580000000 22581116382 1105163520 1106279902
+67743000000 67746349320 22581000000 22582116440 1106163520 1107279960
+67746000000 67749349492 22582000000 22583116497 1107163520 1108280017
+67749000000 67752349548 22583000000 22584116516 1108163520 1109280036
+67752000000 67755349694 22584000000 22585116564 1109163520 1110280084
+67755000000 67758349890 22585000000 22586116630 1110163520 1111280150
+67758000000 67761349919 22586000000 22587116639 1111163520 1112280159
+67761000000 67764350225 22587000000 22588116741 1112163520 1113280261
+67764000000 67767350397 22588000000 22589116799 1113163520 1114280319
+67767000000 67770350530 22589000000 22590116843 1114163520 1115280363
+67770000000 67773350647 22590000000 22591116882 1115163520 1116280402
+67773000000 67776350832 22591000000 22592116944 1116163520 1117280464
+67776000000 67779350938 22592000000 22593116979 1117163520 1118280499
+67779000000 67782351119 22593000000 22594117039 1118163520 1119280559
+67782000000 67785351331 22594000000 22595117110 1119163520 1120280630
+67785000000 67788351438 22595000000 22596117146 1120163520 1121280666
+67788000000 67791351604 22596000000 22597117201 1121163520 1122280721
+67791000000 67793950349 22597000000 22597983449 1122163520 1123146969
+67794000000 67797351875 22598000000 22599117291 1123163520 1124280811
+67797000000 67800351987 22599000000 22600117329 1124163520 1125280849
+67800000000 67803352196 22600000000 22601117398 1125163520 1126280918
+67803000000 67806352275 22601000000 22602117425 1126163520 1127280945
+67806000000 67809352500 22602000000 22603117500 1127163520 1128281020
+67809000000 67812352627 22603000000 22604117542 1128163520 1129281062
+67812000000 67815352716 22604000000 22605117572 1129163520 1130281092
+67815000000 67818352822 22605000000 22606117607 1130163520 1131281127
+67818000000 67821353033 22606000000 22607117677 1131163520 1132281197
+67821000000 67824353242 22607000000 22608117747 1132163520 1133281267
+67824000000 67827353387 22608000000 22609117795 1133163520 1134281315
+67827000000 67830353513 22609000000 22610117837 1134163520 1135281357
+67830000000 67833353679 22610000000 22611117893 1135163520 1136281413
+67833000000 67836353759 22611000000 22612117919 1136163520 1137281439
+67836000000 67839353994 22612000000 22613117998 1137163520 1138281518
+67839000000 67842354153 22613000000 22614118051 1138163520 1139281571
+67842000000 67845354274 22614000000 22615118091 1139163520 1140281611
+67845000000 67848354434 22615000000 22616118144 1140163520 1141281664
+67848000000 67851354517 22616000000 22617118172 1141163520 1142281692
+67851000000 67854354763 22617000000 22618118254 1142163520 1143281774
+67854000000 67857354886 22618000000 22619118295 1143163520 1144281815
+67857000000 67860355022 22619000000 22620118340 1144163520 1145281860
+67860000000 67863355197 22620000000 22621118399 1145163520 1146281919
+67863000000 67866355319 22621000000 22622118439 1146163520 1147281959
+67866000000 67869355469 22622000000 22623118489 1147163520 1148282009
+67869000000 67872355617 22623000000 22624118539 1148163520 1149282059
+67872000000 67874529311 22624000000 22624843103 1149163520 1150006623
+67875000000 67878355937 22625000000 22626118645 1150163520 1151282165
+67878000000 67881356069 22626000000 22627118689 1151163520 1152282209
+67881000000 67884356243 22627000000 22628118747 1152163520 1153282267
+67884000000 67887356362 22628000000 22629118787 1153163520 1154282307
+67887000000 67890356486 22629000000 22630118828 1154163520 1155282348
+67890000000 67893356705 22630000000 22631118901 1155163520 1156282421
+67893000000 67896356841 22631000000 22632118947 1156163520 1157282467
+67896000000 67899356992 22632000000 22633118997 1157163520 1158282517
+67899000000 67902357142 22633000000 22634119047 1158163520 1159282567
+67902000000 67905357257 22634000000 22635119085 1159163520 1160282605
+67905000000 67908357354 22635000000 22636119118 1160163520 1161282638
+67908000000 67911357562 22636000000 22637119187 1161163520 1162282707
+67911000000 67914357717 22637000000 22638119239 1162163520 1163282759
+67914000000 67917357876 22638000000 22639119292 1163163520 1164282812
+67917000000 67920358050 22639000000 22640119350 1164163520 1165282870
+67920000000 67923358150 22640000000 22641119383 1165163520 1166282903
+67923000000 67926358328 22641000000 22642119442 1166163520 1167282962
+67926000000 67929358477 22642000000 22643119492 1167163520 1168283012
+67929000000 67932358605 22643000000 22644119535 1168163520 1169283055
+67932000000 67935358774 22644000000 22645119591 1169163520 1170283111
+67935000000 67938358894 22645000000 22646119631 1170163520 1171283151
+67938000000 67940186244 22646000000 22646728748 1171163520 1171892268
+67941000000 67944359144 22647000000 22648119714 1172163520 1173283234
+67944000000 67947359402 22648000000 22649119800 1173163520 1174283320
+67947000000 67950359507 22649000000 22650119835 1174163520 1175283355
+67950000000 67953359587 22650000000 22651119862 1175163520 1176283382
+67953000000 67956359734 22651000000 22652119911 1176163520 1177283431
+67956000000 67959359988 22652000000 22653119996 1177163520 1178283516
+67959000000 67962360078 22653000000 22654120026 1178163520 1179283546
+67962000000 67965360323 22654000000 22655120107 1179163520 1180283627
+67965000000 67968360401 22655000000 22656120133 1180163520 1181283653
+67968000000 67971360578 22656000000 22657120192 1181163520 1182283712
+67971000000 67974360724 22657000000 22658120241 1182163520 1183283761
+67974000000 67977360868 22658000000 22659120289 1183163520 1184283809
+67977000000 67978983522 22659000000 22659661174 1184163520 1184824694
+67980000000 67983361183 22660000000 22661120394 1185163520 1186283914
+67983000000 67986361343 22661000000 22662120447 1186163520 1187283967
+67986000000 67989361480 22662000000 22663120493 1187163520 1188284013
+67989000000 67992361638 22663000000 22664120546 1188163520 1189284066
+67992000000 67995361796 22664000000 22665120598 1189163520 1190284118
+67995000000 67998361910 22665000000 22666120636 1190163520 1191284156
+67998000000 68001362071 22666000000 22667120690 1191163520 1192284210
+68001000000 68004362198 22667000000 22668120732 1192163520 1193284252
+68004000000 68007362307 22668000000 22669120769 1193163520 1194284289
+68007000000 68010362449 22669000000 22670120816 1194163520 1195284336
+68010000000 68013362683 22670000000 22671120894 1195163520 1196284414
+68013000000 68016362596 22671000000 22672120865 1196163520 1197284385
+68016000000 68019362717 22672000000 22673120905 1197163520 1198284425
+68019000000 68022362825 22673000000 22674120941 1198163520 1199284461
+68022000000 68025363060 22674000000 22675121020 1199163520 1200284540
+68025000000 68028363239 22675000000 22676121079 1200163520 1201284599
+68028000000 68031276879 22676000000 22677092293 1201163520 1202255813
+68031000000 68034363508 22677000000 22678121169 1202163520 1203284689
+68034000000 68037363681 22678000000 22679121227 1203163520 1204284747
+68037000000 68040363797 22679000000 22680121265 1204163520 1205284785
+68040000000 68043363970 22680000000 22681121323 1205163520 1206284843
+68043000000 68046364142 22681000000 22682121380 1206163520 1207284900
+68046000000 68049364198 22682000000 22683121399 1207163520 1208284919
+68049000000 68052364344 22683000000 22684121448 1208163520 1209284968
+68052000000 68055364540 22684000000 22685121513 1209163520 1210285033
+68055000000 68058364569 22685000000 22686121523 1210163520 1211285043
+68058000000 68061364875 22686000000 22687121625 1211163520 1212285145
+68061000000 68064365047 22687000000 22688121682 1212163520 1213285202
+68064000000 68067365180 22688000000 22689121726 1213163520 1214285246
+68067000000 68070365297 22689000000 22690121765 1214163520 1215285285
+68070000000 68073365482 22690000000 22691121827 1215163520 1216285347
+68073000000 68076365588 22691000000 22692121862 1216163520 1217285382
+68076000000 68079365769 22692000000 22693121923 1217163520 1218285443
+68079000000 68082365981 22693000000 22694121993 1218163520 1219285513
+68082000000 68085366088 22694000000 22695122029 1219163520 1220285549
+68085000000 68088366254 22695000000 22696122084 1220163520 1221285604
+68088000000 68090964999 22696000000 22696988333 1221163520 1222151853
+68091000000 68094366525 22697000000 22698122175 1222163520 1223285695
+68094000000 68097366637 22698000000 22699122212 1223163520 1224285732
+68097000000 68100366846 22699000000 22700122282 1224163520 1225285802
+68100000000 68103366925 22700000000 22701122308 1225163520 1226285828
+68103000000 68106367150 22701000000 22702122383 1226163520 1227285903
+68106000000 68109367277 22702000000 22703122425 1227163520 1228285945
+68109000000 68112367366 22703000000 22704122455 1228163520 1229285975
+68112000000 68115367472 22704000000 22705122490 1229163520 1230286010
+68115000000 68118367683 22705000000 22706122561 1230163520 1231286081
+68118000000 68121367892 22706000000 22707122630 1231163520 1232286150
+68121000000 68124368037 22707000000 22708122679 1232163520 1233286199
+68124000000 68127368163 22708000000 22709122721 1233163520 1234286241
+68127000000 68130368329 22709000000 22710122776 1234163520 1235286296
+68130000000 68133368409 22710000000 22711122803 1235163520 1236286323
+68133000000 68136368644 22711000000 22712122881 1236163520 1237286401
+68136000000 68139368803 22712000000 22713122934 1237163520 1238286454
+68139000000 68142368924 22713000000 22714122974 1238163520 1239286494
+68142000000 68145369084 22714000000 22715123028 1239163520 1240286548
+68145000000 68148369167 22715000000 22716123055 1240163520 1241286575
+68148000000 68151369413 22716000000 22717123137 1241163520 1242286657
+68151000000 68154369536 22717000000 22718123178 1242163520 1243286698
+68154000000 68157369672 22718000000 22719123224 1243163520 1244286744
+68157000000 68160369847 22719000000 22720123282 1244163520 1245286802
+68160000000 68163369969 22720000000 22721123323 1245163520 1246286843
+68163000000 68166370119 22721000000 22722123373 1246163520 1247286893
+68166000000 68169370267 22722000000 22723123422 1247163520 1248286942
+68169000000 68171543961 22723000000 22723847987 1248163520 1249011507
+68172000000 68175370587 22724000000 22725123529 1249163520 1250287049
+68175000000 68178370719 22725000000 22726123573 1250163520 1251287093
+68178000000 68181370893 22726000000 22727123631 1251163520 1252287151
+68181000000 68184371012 22727000000 22728123670 1252163520 1253287190
+68184000000 68187371136 22728000000 22729123712 1253163520 1254287232
+68187000000 68190371355 22729000000 22730123785 1254163520 1255287305
+68190000000 68193371491 22730000000 22731123830 1255163520 1256287350
+68193000000 68196371642 22731000000 22732123880 1256163520 1257287400
+68196000000 68199371792 22732000000 22733123930 1257163520 1258287450
+68199000000 68202371907 22733000000 22734123969 1258163520 1259287489
+68202000000 68205372004 22734000000 22735124001 1259163520 1260287521
+68205000000 68208372212 22735000000 22736124070 1260163520 1261287590
+68208000000 68211372367 22736000000 22737124122 1261163520 1262287642
+68211000000 68214372526 22737000000 22738124175 1262163520 1263287695
+68214000000 68217372700 22738000000 22739124233 1263163520 1264287753
+68217000000 68220372800 22739000000 22740124266 1264163520 1265287786
+68220000000 68223372978 22740000000 22741124326 1265163520 1266287846
+68223000000 68226373127 22741000000 22742124375 1266163520 1267287895
+68226000000 68229373255 22742000000 22743124418 1267163520 1268287938
+68229000000 68232373424 22743000000 22744124474 1268163520 1269287994
+68232000000 68235373544 22744000000 22745124514 1269163520 1270288034
+68235000000 68237200894 22745000000 22745733631 1270163520 1270897151
+68238000000 68241373794 22746000000 22747124598 1271163520 1272288118
+68241000000 68244374052 22747000000 22748124684 1272163520 1273288204
+68244000000 68247374157 22748000000 22749124719 1273163520 1274288239
+68247000000 68250374237 22749000000 22750124745 1274163520 1275288265
+68250000000 68253374384 22750000000 22751124794 1275163520 1276288314
+68253000000 68256374638 22751000000 22752124879 1276163520 1277288399
+68256000000 68259374728 22752000000 22753124909 1277163520 1278288429
+68259000000 68262374973 22753000000 22754124991 1278163520 1279288511
+68262000000 68265375051 22754000000 22755125017 1279163520 1280288537
+68265000000 68268375228 22755000000 22756125076 1280163520 1281288596
+68268000000 68271375374 22756000000 22757125124 1281163520 1282288644
+68271000000 68274375518 22757000000 22758125172 1282163520 1283288692
+68274000000 68275998172 22758000000 22758666057 1283163520 1283829577
+68277000000 68280375833 22759000000 22760125277 1284163520 1285288797
+68280000000 68283375993 22760000000 22761125331 1285163520 1286288851
+68283000000 68286376130 22761000000 22762125376 1286163520 1287288896
+68286000000 68289376288 22762000000 22763125429 1287163520 1288288949
+68289000000 68292376446 22763000000 22764125482 1288163520 1289289002
+68292000000 68295376560 22764000000 22765125520 1289163520 1290289040
+68295000000 68298376721 22765000000 22766125573 1290163520 1291289093
+68298000000 68301376848 22766000000 22767125616 1291163520 1292289136
+68301000000 68304376957 22767000000 22768125652 1292163520 1293289172
+68304000000 68307377099 22768000000 22769125699 1293163520 1294289219
+68307000000 68310377333 22769000000 22770125777 1294163520 1295289297
+68310000000 68313377246 22770000000 22771125748 1295163520 1296289268
+68313000000 68316377367 22771000000 22772125789 1296163520 1297289309
+68316000000 68319377475 22772000000 22773125825 1297163520 1298289345
+68319000000 68322377710 22773000000 22774125903 1298163520 1299289423
+68322000000 68325377889 22774000000 22775125963 1299163520 1300289483
+68325000000 68328291529 22775000000 22776097176 1300163520 1301260696
+68328000000 68331378158 22776000000 22777126052 1301163520 1302289572
+68331000000 68334378331 22777000000 22778126110 1302163520 1303289630
+68334000000 68337378447 22778000000 22779126149 1303163520 1304289669
+68337000000 68340378620 22779000000 22780126206 1304163520 1305289726
+68340000000 68343378792 22780000000 22781126264 1305163520 1306289784
+68343000000 68346378848 22781000000 22782126282 1306163520 1307289802
+68346000000 68349378994 22782000000 22783126331 1307163520 1308289851
+68349000000 68352379190 22783000000 22784126396 1308163520 1309289916
+68352000000 68355379219 22784000000 22785126406 1309163520 1310289926
+68355000000 68358379525 22785000000 22786126508 1310163520 1311290028
+68358000000 68361379697 22786000000 22787126565 1311163520 1312290085
+68361000000 68364379830 22787000000 22788126610 1312163520 1313290130
+68364000000 68367379947 22788000000 22789126649 1313163520 1314290169
+68367000000 68370380132 22789000000 22790126710 1314163520 1315290230
+68370000000 68373380238 22790000000 22791126746 1315163520 1316290266
+68373000000 68376380419 22791000000 22792126806 1316163520 1317290326
+68376000000 68379380631 22792000000 22793126877 1317163520 1318290397
+68379000000 68382380738 22793000000 22794126912 1318163520 1319290432
+68382000000 68385380904 22794000000 22795126968 1319163520 1320290488
+68385000000 68387979649 22795000000 22795993216 1320163520 1321156736
+68388000000 68391381175 22796000000 22797127058 1321163520 1322290578
+68391000000 68394381287 22797000000 22798127095 1322163520 1323290615
+68394000000 68397381496 22798000000 22799127165 1323163520 1324290685
+68397000000 68400381575 22799000000 22800127191 1324163520 1325290711
+68400000000 68403381800 22800000000 22801127266 1325163520 1326290786
+68403000000 68406381927 22801000000 22802127309 1326163520 1327290829
+68406000000 68409382016 22802000000 22803127338 1327163520 1328290858
+68409000000 68412382122 22803000000 22804127374 1328163520 1329290894
+68412000000 68415382333 22804000000 22805127444 1329163520 1330290964
+68415000000 68418382542 22805000000 22806127514 1330163520 1331291034
+68418000000 68421382687 22806000000 22807127562 1331163520 1332291082
+68421000000 68424382813 22807000000 22808127604 1332163520 1333291124
+68424000000 68427382979 22808000000 22809127659 1333163520 1334291179
+68427000000 68430383059 22809000000 22810127686 1334163520 1335291206
+68430000000 68433383294 22810000000 22811127764 1335163520 1336291284
+68433000000 68436383453 22811000000 22812127817 1336163520 1337291337
+68436000000 68439383574 22812000000 22813127858 1337163520 1338291378
+68439000000 68442383734 22813000000 22814127911 1338163520 1339291431
+68442000000 68445383817 22814000000 22815127939 1339163520 1340291459
+68445000000 68448384063 22815000000 22816128021 1340163520 1341291541
+68448000000 68451384186 22816000000 22817128062 1341163520 1342291582
+68451000000 68454384322 22817000000 22818128107 1342163520 1343291627
+68454000000 68457384497 22818000000 22819128165 1343163520 1344291685
+68457000000 68460384619 22819000000 22820128206 1344163520 1345291726
+68460000000 68463384769 22820000000 22821128256 1345163520 1346291776
+68463000000 68466384917 22821000000 22822128305 1346163520 1347291825
+68466000000 68468558611 22822000000 22822852870 1347163520 1348016390
+68469000000 68472385237 22823000000 22824128412 1348163520 1349291932
+68472000000 68475385369 22824000000 22825128456 1349163520 1350291976
+68475000000 68478385543 22825000000 22826128514 1350163520 1351292034
+68478000000 68481385662 22826000000 22827128554 1351163520 1352292074
+68481000000 68484385786 22827000000 22828128595 1352163520 1353292115
+68484000000 68487386005 22828000000 22829128668 1353163520 1354292188
+68487000000 68490386141 22829000000 22830128713 1354163520 1355292233
+68490000000 68493386292 22830000000 22831128764 1355163520 1356292284
+68493000000 68496386442 22831000000 22832128814 1356163520 1357292334
+68496000000 68499386557 22832000000 22833128852 1357163520 1358292372
+68499000000 68502386654 22833000000 22834128884 1358163520 1359292404
+68502000000 68505386862 22834000000 22835128954 1359163520 1360292474
+68505000000 68508387017 22835000000 22836129005 1360163520 1361292525
+68508000000 68511387176 22836000000 22837129058 1361163520 1362292578
+68511000000 68514387350 22837000000 22838129116 1362163520 1363292636
+68514000000 68517387450 22838000000 22839129150 1363163520 1364292670
+68517000000 68520387628 22839000000 22840129209 1364163520 1365292729
+68520000000 68523387777 22840000000 22841129259 1365163520 1366292779
+68523000000 68526387905 22841000000 22842129301 1366163520 1367292821
+68526000000 68529388074 22842000000 22843129358 1367163520 1368292878
+68529000000 68532388194 22843000000 22844129398 1368163520 1369292918
+68532000000 68534215544 22844000000 22844738514 1369163520 1369902034
+68535000000 68538388444 22845000000 22846129481 1370163520 1371293001
+68538000000 68541388702 22846000000 22847129567 1371163520 1372293087
+68541000000 68544388807 22847000000 22848129602 1372163520 1373293122
+68544000000 68547388887 22848000000 22849129629 1373163520 1374293149
+68547000000 68550389034 22849000000 22850129678 1374163520 1375293198
+68550000000 68553389288 22850000000 22851129762 1375163520 1376293282
+68553000000 68556389378 22851000000 22852129792 1376163520 1377293312
+68556000000 68559389623 22852000000 22853129874 1377163520 1378293394
+68559000000 68562389701 22853000000 22854129900 1378163520 1379293420
+68562000000 68565389878 22854000000 22855129959 1379163520 1380293479
+68565000000 68568390024 22855000000 22856130008 1380163520 1381293528
+68568000000 68571390168 22856000000 22857130056 1381163520 1382293576
+68571000000 68573012822 22857000000 22857670940 1382163520 1382834460
+68574000000 68577390483 22858000000 22859130161 1383163520 1384293681
+68577000000 68580390643 22859000000 22860130214 1384163520 1385293734
+68580000000 68583390780 22860000000 22861130260 1385163520 1386293780
+68583000000 68586390938 22861000000 22862130312 1386163520 1387293832
+68586000000 68589391096 22862000000 22863130365 1387163520 1388293885
+68589000000 68592391210 22863000000 22864130403 1388163520 1389293923
+68592000000 68595391371 22864000000 22865130457 1389163520 1390293977
+68595000000 68598391498 22865000000 22866130499 1390163520 1391294019
+68598000000 68601391607 22866000000 22867130535 1391163520 1392294055
+68601000000 68604391749 22867000000 22868130583 1392163520 1393294103
+68604000000 68607391983 22868000000 22869130661 1393163520 1394294181
+68607000000 68610391896 22869000000 22870130632 1394163520 1395294152
+68610000000 68613392017 22870000000 22871130672 1395163520 1396294192
+68613000000 68616392125 22871000000 22872130708 1396163520 1397294228
+68616000000 68619392360 22872000000 22873130786 1397163520 1398294306
+68619000000 68622392539 22873000000 22874130846 1398163520 1399294366
+68622000000 68625306179 22874000000 22875102059 1399163520 1400265579
+68625000000 68628392808 22875000000 22876130936 1400163520 1401294456
+68628000000 68631392981 22876000000 22877130993 1401163520 1402294513
+68631000000 68634393097 22877000000 22878131032 1402163520 1403294552
+68634000000 68637393270 22878000000 22879131090 1403163520 1404294610
+68637000000 68640393442 22879000000 22880131147 1404163520 1405294667
+68640000000 68643393498 22880000000 22881131166 1405163520 1406294686
+68643000000 68646393644 22881000000 22882131214 1406163520 1407294734
+68646000000 68649393840 22882000000 22883131280 1407163520 1408294800
+68649000000 68652393869 22883000000 22884131289 1408163520 1409294809
+68652000000 68655394175 22884000000 22885131391 1409163520 1410294911
+68655000000 68658394347 22885000000 22886131449 1410163520 1411294969
+68658000000 68661394480 22886000000 22887131493 1411163520 1412295013
+68661000000 68664394597 22887000000 22888131532 1412163520 1413295052
+68664000000 68667394782 22888000000 22889131594 1413163520 1414295114
+68667000000 68670394888 22889000000 22890131629 1414163520 1415295149
+68670000000 68673395069 22890000000 22891131689 1415163520 1416295209
+68673000000 68676395281 22891000000 22892131760 1416163520 1417295280
+68676000000 68679395388 22892000000 22893131796 1417163520 1418295316
+68679000000 68682395554 22893000000 22894131851 1418163520 1419295371
+68682000000 68684994299 22894000000 22894998099 1419163520 1420161619
+68685000000 68688395825 22895000000 22896131941 1420163520 1421295461
+68688000000 68691395937 22896000000 22897131979 1421163520 1422295499
+68691000000 68694396146 22897000000 22898132048 1422163520 1423295568
+68694000000 68697396225 22898000000 22899132075 1423163520 1424295595
+68697000000 68700396450 22899000000 22900132150 1424163520 1425295670
+68700000000 68703396577 22900000000 22901132192 1425163520 1426295712
+68703000000 68706396666 22901000000 22902132222 1426163520 1427295742
+68706000000 68709396772 22902000000 22903132257 1427163520 1428295777
+68709000000 68712396983 22903000000 22904132327 1428163520 1429295847
+68712000000 68715397192 22904000000 22905132397 1429163520 1430295917
+68715000000 68718397337 22905000000 22906132445 1430163520 1431295965
+68718000000 68721397463 22906000000 22907132487 1431163520 1432296007
+68721000000 68724397629 22907000000 22908132543 1432163520 1433296063
+68724000000 68727397709 22908000000 22909132569 1433163520 1434296089
+68727000000 68730397944 22909000000 22910132648 1434163520 1435296168
+68730000000 68733398103 22910000000 22911132701 1435163520 1436296221
+68733000000 68736398224 22911000000 22912132741 1436163520 1437296261
+68736000000 68739398384 22912000000 22913132794 1437163520 1438296314
+68739000000 68742398467 22913000000 22914132822 1438163520 1439296342
+68742000000 68745398713 22914000000 22915132904 1439163520 1440296424
+68745000000 68748398836 22915000000 22916132945 1440163520 1441296465
+68748000000 68751398972 22916000000 22917132990 1441163520 1442296510
+68751000000 68754399147 22917000000 22918133049 1442163520 1443296569
+68754000000 68757399269 22918000000 22919133089 1443163520 1444296609
+68757000000 68760399419 22919000000 22920133139 1444163520 1445296659
+68760000000 68763399567 22920000000 22921133189 1445163520 1446296709
+68763000000 68765573261 22921000000 22921857753 1446163520 1447021273
+68766000000 68769399887 22922000000 22923133295 1447163520 1448296815
+68769000000 68772400019 22923000000 22924133339 1448163520 1449296859
+68772000000 68775400193 22924000000 22925133397 1449163520 1450296917
+68775000000 68778400312 22925000000 22926133437 1450163520 1451296957
+68778000000 68781400436 22926000000 22927133478 1451163520 1452296998
+68781000000 68784400655 22927000000 22928133551 1452163520 1453297071
+68784000000 68787400791 22928000000 22929133597 1453163520 1454297117
+68787000000 68790400942 22929000000 22930133647 1454163520 1455297167
+68790000000 68793401092 22930000000 22931133697 1455163520 1456297217
+68793000000 68796401207 22931000000 22932133735 1456163520 1457297255
+68796000000 68799401304 22932000000 22933133768 1457163520 1458297288
+68799000000 68802401512 22933000000 22934133837 1458163520 1459297357
+68802000000 68805401667 22934000000 22935133889 1459163520 1460297409
+68805000000 68808401826 22935000000 22936133942 1460163520 1461297462
+68808000000 68811402000 22936000000 22937134000 1461163520 1462297520
+68811000000 68814402100 22937000000 22938134033 1462163520 1463297553
+68814000000 68817402278 22938000000 22939134092 1463163520 1464297612
+68817000000 68820402427 22939000000 22940134142 1464163520 1465297662
+68820000000 68823402555 22940000000 22941134185 1465163520 1466297705
+68823000000 68826402724 22941000000 22942134241 1466163520 1467297761
+68826000000 68829402844 22942000000 22943134281 1467163520 1468297801
+68829000000 68831230194 22943000000 22943743398 1468163520 1468906918
+68832000000 68835403094 22944000000 22945134364 1469163520 1470297884
+68835000000 68838403352 22945000000 22946134450 1470163520 1471297970
+68838000000 68841403457 22946000000 22947134485 1471163520 1472298005
+68841000000 68844403537 22947000000 22948134512 1472163520 1473298032
+68844000000 68847403684 22948000000 22949134561 1473163520 1474298081
+68847000000 68850403938 22949000000 22950134646 1474163520 1475298166
+68850000000 68853404028 22950000000 22951134676 1475163520 1476298196
+68853000000 68856404273 22951000000 22952134757 1476163520 1477298277
+68856000000 68859404351 22952000000 22953134783 1477163520 1478298303
+68859000000 68862404528 22953000000 22954134842 1478163520 1479298362
+68862000000 68865404674 22954000000 22955134891 1479163520 1480298411
+68865000000 68868404818 22955000000 22956134939 1480163520 1481298459
+68868000000 68870027472 22956000000 22956675824 1481163520 1481839344
+68871000000 68874405133 22957000000 22958135044 1482163520 1483298564
+68874000000 68877405293 22958000000 22959135097 1483163520 1484298617
+68877000000 68880405430 22959000000 22960135143 1484163520 1485298663
+68880000000 68883405588 22960000000 22961135196 1485163520 1486298716
+68883000000 68886405746 22961000000 22962135248 1486163520 1487298768
+68886000000 68889405860 22962000000 22963135286 1487163520 1488298806
+68889000000 68892406021 22963000000 22964135340 1488163520 1489298860
+68892000000 68895406148 22964000000 22965135382 1489163520 1490298902
+68895000000 68898406257 22965000000 22966135419 1490163520 1491298939
+68898000000 68901406399 22966000000 22967135466 1491163520 1492298986
+68901000000 68904406633 22967000000 22968135544 1492163520 1493299064
+68904000000 68907406546 22968000000 22969135515 1493163520 1494299035
+68907000000 68910406667 22969000000 22970135555 1494163520 1495299075
+68910000000 68913406775 22970000000 22971135591 1495163520 1496299111
+68913000000 68916407010 22971000000 22972135670 1496163520 1497299190
+68916000000 68919407189 22972000000 22973135729 1497163520 1498299249
+68919000000 68922320829 22973000000 22974106943 1498163520 1499270463
+68922000000 68925407458 22974000000 22975135819 1499163520 1500299339
+68925000000 68928407631 22975000000 22976135877 1500163520 1501299397
+68928000000 68931407747 22976000000 22977135915 1501163520 1502299435
+68931000000 68934407920 22977000000 22978135973 1502163520 1503299493
+68934000000 68937408092 22978000000 22979136030 1503163520 1504299550
+68937000000 68940408148 22979000000 22980136049 1504163520 1505299569
+68940000000 68943408294 22980000000 22981136098 1505163520 1506299618
+68943000000 68946408490 22981000000 22982136163 1506163520 1507299683
+68946000000 68949408519 22982000000 22983136173 1507163520 1508299693
+68949000000 68952408825 22983000000 22984136275 1508163520 1509299795
+68952000000 68955408997 22984000000 22985136332 1509163520 1510299852
+68955000000 68958409130 22985000000 22986136376 1510163520 1511299896
+68958000000 68961409247 22986000000 22987136415 1511163520 1512299935
+68961000000 68964409432 22987000000 22988136477 1512163520 1513299997
+68964000000 68967409538 22988000000 22989136512 1513163520 1514300032
+68967000000 68970409719 22989000000 22990136573 1514163520 1515300093
+68970000000 68973409931 22990000000 22991136643 1515163520 1516300163
+68973000000 68976410038 22991000000 22992136679 1516163520 1517300199
+68976000000 68979410204 22992000000 22993136734 1517163520 1518300254
+68979000000 68982008949 22993000000 22994002983 1518163520 1519166503
+68982000000 68985410475 22994000000 22995136825 1519163520 1520300345
+68985000000 68988410587 22995000000 22996136862 1520163520 1521300382
+68988000000 68991410796 22996000000 22997136932 1521163520 1522300452
+68991000000 68994410875 22997000000 22998136958 1522163520 1523300478
+68994000000 68997411100 22998000000 22999137033 1523163520 1524300553
+68997000000 69000411227 22999000000 23000137075 1524163520 1525300595
+69000000000 69003411316 23000000000 23001137105 1525163520 1526300625
+69003000000 69006411422 23001000000 23002137140 1526163520 1527300660
+69006000000 69009411633 23002000000 23003137211 1527163520 1528300731
+69009000000 69012411842 23003000000 23004137280 1528163520 1529300800
+69012000000 69015411987 23004000000 23005137329 1529163520 1530300849
+69015000000 69018412113 23005000000 23006137371 1530163520 1531300891
+69018000000 69021412279 23006000000 23007137426 1531163520 1532300946
+69021000000 69024412359 23007000000 23008137453 1532163520 1533300973
+69024000000 69027412594 23008000000 23009137531 1533163520 1534301051
+69027000000 69030412753 23009000000 23010137584 1534163520 1535301104
+69030000000 69033412874 23010000000 23011137624 1535163520 1536301144
+69033000000 69036413034 23011000000 23012137678 1536163520 1537301198
+69036000000 69039413117 23012000000 23013137705 1537163520 1538301225
+69039000000 69042413363 23013000000 23014137787 1538163520 1539301307
+69042000000 69045413486 23014000000 23015137828 1539163520 1540301348
+69045000000 69048413622 23015000000 23016137874 1540163520 1541301394
+69048000000 69051413797 23016000000 23017137932 1541163520 1542301452
+69051000000 69054413919 23017000000 23018137973 1542163520 1543301493
+69054000000 69057414069 23018000000 23019138023 1543163520 1544301543
+69057000000 69060414217 23019000000 23020138072 1544163520 1545301592
+69060000000 69062587911 23020000000 23020862637 1545163520 1546026157
+69063000000 69066414537 23021000000 23022138179 1546163520 1547301699
+69066000000 69069414669 23022000000 23023138223 1547163520 1548301743
+69069000000 69072414843 23023000000 23024138281 1548163520 1549301801
+69072000000 69075414962 23024000000 23025138320 1549163520 1550301840
+69075000000 69078415086 23025000000 23026138362 1550163520 1551301882
+69078000000 69081415305 23026000000 23027138435 1551163520 1552301955
+69081000000 69084415441 23027000000 23028138480 1552163520 1553302000
+69084000000 69087415592 23028000000 23029138530 1553163520 1554302050
+69087000000 69090415742 23029000000 23030138580 1554163520 1555302100
+69090000000 69093415857 23030000000 23031138619 1555163520 1556302139
+69093000000 69096415954 23031000000 23032138651 1556163520 1557302171
+69096000000 69099416162 23032000000 23033138720 1557163520 1558302240
+69099000000 69102416317 23033000000 23034138772 1558163520 1559302292
+69102000000 69105416476 23034000000 23035138825 1559163520 1560302345
+69105000000 69108416650 23035000000 23036138883 1560163520 1561302403
+69108000000 69111416750 23036000000 23037138916 1561163520 1562302436
+69111000000 69114416928 23037000000 23038138976 1562163520 1563302496
+69114000000 69117417077 23038000000 23039139025 1563163520 1564302545
+69117000000 69120417205 23039000000 23040139068 1564163520 1565302588
+69120000000 69123417374 23040000000 23041139124 1565163520 1566302644
+69123000000 69126417494 23041000000 23042139164 1566163520 1567302684
+69126000000 69128244844 23042000000 23042748281 1567163520 1567911801
+69129000000 69132417744 23043000000 23044139248 1568163520 1569302768
+69132000000 69135418002 23044000000 23045139334 1569163520 1570302854
+69135000000 69138418107 23045000000 23046139369 1570163520 1571302889
+69138000000 69141418187 23046000000 23047139395 1571163520 1572302915
+69141000000 69144418334 23047000000 23048139444 1572163520 1573302964
+69144000000 69147418588 23048000000 23049139529 1573163520 1574303049
+69147000000 69150418678 23049000000 23050139559 1574163520 1575303079
+69150000000 69153418923 23050000000 23051139641 1575163520 1576303161
+69153000000 69156419001 23051000000 23052139667 1576163520 1577303187
+69156000000 69159419178 23052000000 23053139726 1577163520 1578303246
+69159000000 69162419324 23053000000 23054139774 1578163520 1579303294
+69162000000 69165419468 23054000000 23055139822 1579163520 1580303342
+69165000000 69167042122 23055000000 23055680707 1580163520 1580844227
+69168000000 69171419783 23056000000 23057139927 1581163520 1582303447
+69171000000 69174419943 23057000000 23058139981 1582163520 1583303501
+69174000000 69177420080 23058000000 23059140026 1583163520 1584303546
+69177000000 69180420238 23059000000 23060140079 1584163520 1585303599
+69180000000 69183420396 23060000000 23061140132 1585163520 1586303652
+69183000000 69186420510 23061000000 23062140170 1586163520 1587303690
+69186000000 69189420671 23062000000 23063140223 1587163520 1588303743
+69189000000 69192420798 23063000000 23064140266 1588163520 1589303786
+69192000000 69195420907 23064000000 23065140302 1589163520 1590303822
+69195000000 69198421049 23065000000 23066140349 1590163520 1591303869
+69198000000 69201421283 23066000000 23067140427 1591163520 1592303947
+69201000000 69204421196 23067000000 23068140398 1592163520 1593303918
+69204000000 69207421317 23068000000 23069140439 1593163520 1594303959
+69207000000 69210421425 23069000000 23070140475 1594163520 1595303995
+69210000000 69213421660 23070000000 23071140553 1595163520 1596304073
+69213000000 69216421839 23071000000 23072140613 1596163520 1597304133
+69216000000 69219335479 23072000000 23073111826 1597163520 1598275346
+69219000000 69222422108 23073000000 23074140702 1598163520 1599304222
+69222000000 69225422281 23074000000 23075140760 1599163520 1600304280
+69225000000 69228422397 23075000000 23076140799 1600163520 1601304319
+69228000000 69231422570 23076000000 23077140856 1601163520 1602304376
+69231000000 69234422742 23077000000 23078140914 1602163520 1603304434
+69234000000 69237422798 23078000000 23079140932 1603163520 1604304452
+69237000000 69240422944 23079000000 23080140981 1604163520 1605304501
+69240000000 69243423140 23080000000 23081141046 1605163520 1606304566
+69243000000 69246423169 23081000000 23082141056 1606163520 1607304576
+69246000000 69249423475 23082000000 23083141158 1607163520 1608304678
+69249000000 69252423647 23083000000 23084141215 1608163520 1609304735
+69252000000 69255423780 23084000000 23085141260 1609163520 1610304780
+69255000000 69258423897 23085000000 23086141299 1610163520 1611304819
+69258000000 69261424082 23086000000 23087141360 1611163520 1612304880
+69261000000 69264424188 23087000000 23088141396 1612163520 1613304916
+69264000000 69267424369 23088000000 23089141456 1613163520 1614304976
+69267000000 69270424581 23089000000 23090141527 1614163520 1615305047
+69270000000 69273424688 23090000000 23091141562 1615163520 1616305082
+69273000000 69276424854 23091000000 23092141618 1616163520 1617305138
+69276000000 69279023599 23092000000 23093007866 1617163520 1618171386
+69279000000 69282425125 23093000000 23094141708 1618163520 1619305228
+69282000000 69285425237 23094000000 23095141745 1619163520 1620305265
+69285000000 69288425446 23095000000 23096141815 1620163520 1621305335
+69288000000 69291425525 23096000000 23097141841 1621163520 1622305361
+69291000000 69294425750 23097000000 23098141916 1622163520 1623305436
+69294000000 69297425877 23098000000 23099141959 1623163520 1624305479
+69297000000 69300425966 23099000000 23100141988 1624163520 1625305508
+69300000000 69303426072 23100000000 23101142024 1625163520 1626305544
+69303000000 69306426283 23101000000 23102142094 1626163520 1627305614
+69306000000 69309426492 23102000000 23103142164 1627163520 1628305684
+69309000000 69312426637 23103000000 23104142212 1628163520 1629305732
+69312000000 69315426763 23104000000 23105142254 1629163520 1630305774
+69315000000 69318426929 23105000000 23106142309 1630163520 1631305829
+69318000000 69321427009 23106000000 23107142336 1631163520 1632305856
+69321000000 69324427244 23107000000 23108142414 1632163520 1633305934
+69324000000 69327427403 23108000000 23109142467 1633163520 1634305987
+69327000000 69330427524 23109000000 23110142508 1634163520 1635306028
+69330000000 69333427684 23110000000 23111142561 1635163520 1636306081
+69333000000 69336427767 23111000000 23112142589 1636163520 1637306109
+69336000000 69339428013 23112000000 23113142671 1637163520 1638306191
+69339000000 69342428136 23113000000 23114142712 1638163520 1639306232
+69342000000 69345428272 23114000000 23115142757 1639163520 1640306277
+69345000000 69348428447 23115000000 23116142815 1640163520 1641306335
+69348000000 69351428569 23116000000 23117142856 1641163520 1642306376
+69351000000 69354428719 23117000000 23118142906 1642163520 1643306426
+69354000000 69357428867 23118000000 23119142955 1643163520 1644306475
+69357000000 69359602561 23119000000 23119867520 1644163520 1645031040
+69360000000 69363429187 23120000000 23121143062 1645163520 1646306582
+69363000000 69366429319 23121000000 23122143106 1646163520 1647306626
+69366000000 69369429493 23122000000 23123143164 1647163520 1648306684
+69369000000 69372429612 23123000000 23124143204 1648163520 1649306724
+69372000000 69375429736 23124000000 23125143245 1649163520 1650306765
+69375000000 69378429955 23125000000 23126143318 1650163520 1651306838
+69378000000 69381430091 23126000000 23127143363 1651163520 1652306883
+69381000000 69384430242 23127000000 23128143414 1652163520 1653306934
+69384000000 69387430392 23128000000 23129143464 1653163520 1654306984
+69387000000 69390430507 23129000000 23130143502 1654163520 1655307022
+69390000000 69393430604 23130000000 23131143534 1655163520 1656307054
+69393000000 69396430812 23131000000 23132143604 1656163520 1657307124
+69396000000 69399430967 23132000000 23133143655 1657163520 1658307175
+69399000000 69402431126 23133000000 23134143708 1658163520 1659307228
+69402000000 69405431300 23134000000 23135143766 1659163520 1660307286
+69405000000 69408431400 23135000000 23136143800 1660163520 1661307320
+69408000000 69411431578 23136000000 23137143859 1661163520 1662307379
+69411000000 69414431727 23137000000 23138143909 1662163520 1663307429
+69414000000 69417431855 23138000000 23139143951 1663163520 1664307471
+69417000000 69420432024 23139000000 23140144008 1664163520 1665307528
+69420000000 69423432144 23140000000 23141144048 1665163520 1666307568
+69423000000 69425259494 23141000000 23141753164 1666163520 1666916684
+69426000000 69429432394 23142000000 23143144131 1667163520 1668307651
+69429000000 69432432652 23143000000 23144144217 1668163520 1669307737
+69432000000 69435432757 23144000000 23145144252 1669163520 1670307772
+69435000000 69438432837 23145000000 23146144279 1670163520 1671307799
+69438000000 69441432984 23146000000 23147144328 1671163520 1672307848
+69441000000 69444433238 23147000000 23148144412 1672163520 1673307932
+69444000000 69447433328 23148000000 23149144442 1673163520 1674307962
+69447000000 69450433573 23149000000 23150144524 1674163520 1675308044
+69450000000 69453433651 23150000000 23151144550 1675163520 1676308070
+69453000000 69456433828 23151000000 23152144609 1676163520 1677308129
+69456000000 69459433974 23152000000 23153144658 1677163520 1678308178
+69459000000 69462434118 23153000000 23154144706 1678163520 1679308226
+69462000000 69464056772 23154000000 23154685590 1679163520 1679849110
+69465000000 69468434433 23155000000 23156144811 1680163520 1681308331
+69468000000 69471434593 23156000000 23157144864 1681163520 1682308384
+69471000000 69474434730 23157000000 23158144910 1682163520 1683308430
+69474000000 69477434888 23158000000 23159144962 1683163520 1684308482
+69477000000 69480435046 23159000000 23160145015 1684163520 1685308535
+69480000000 69483435160 23160000000 23161145053 1685163520 1686308573
+69483000000 69486435321 23161000000 23162145107 1686163520 1687308627
+69486000000 69489435448 23162000000 23163145149 1687163520 1688308669
+69489000000 69492435557 23163000000 23164145185 1688163520 1689308705
+69492000000 69495435699 23164000000 23165145233 1689163520 1690308753
+69495000000 69498435933 23165000000 23166145311 1690163520 1691308831
+69498000000 69501435846 23166000000 23167145282 1691163520 1692308802
+69501000000 69504435967 23167000000 23168145322 1692163520 1693308842
+69504000000 69507436075 23168000000 23169145358 1693163520 1694308878
+69507000000 69510436310 23169000000 23170145436 1694163520 1695308956
+69510000000 69513436489 23170000000 23171145496 1695163520 1696309016
+69513000000 69516350129 23171000000 23172116709 1696163520 1697280229
+69516000000 69519436758 23172000000 23173145586 1697163520 1698309106
+69519000000 69522436931 23173000000 23174145643 1698163520 1699309163
+69522000000 69525437047 23174000000 23175145682 1699163520 1700309202
+69525000000 69528437220 23175000000 23176145740 1700163520 1701309260
+69528000000 69531437392 23176000000 23177145797 1701163520 1702309317
+69531000000 69534437448 23177000000 23178145816 1702163520 1703309336
+69534000000 69537437594 23178000000 23179145864 1703163520 1704309384
+69537000000 69540437790 23179000000 23180145930 1704163520 1705309450
+69540000000 69543437819 23180000000 23181145939 1705163520 1706309459
+69543000000 69546438125 23181000000 23182146041 1706163520 1707309561
+69546000000 69549438297 23182000000 23183146099 1707163520 1708309619
+69549000000 69552438430 23183000000 23184146143 1708163520 1709309663
+69552000000 69555438547 23184000000 23185146182 1709163520 1710309702
+69555000000 69558438732 23185000000 23186146244 1710163520 1711309764
+69558000000 69561438838 23186000000 23187146279 1711163520 1712309799
+69561000000 69564439019 23187000000 23188146339 1712163520 1713309859
+69564000000 69567439231 23188000000 23189146410 1713163520 1714309930
+69567000000 69570439338 23189000000 23190146446 1714163520 1715309966
+69570000000 69573439504 23190000000 23191146501 1715163520 1716310021
+69573000000 69576038249 23191000000 23192012749 1716163520 1717176269
+69576000000 69579439775 23192000000 23193146591 1717163520 1718310111
+69579000000 69582439887 23193000000 23194146629 1718163520 1719310149
+69582000000 69585440096 23194000000 23195146698 1719163520 1720310218
+69585000000 69588440175 23195000000 23196146725 1720163520 1721310245
+69588000000 69591440400 23196000000 23197146800 1721163520 1722310320
+69591000000 69594440527 23197000000 23198146842 1722163520 1723310362
+69594000000 69597440616 23198000000 23199146872 1723163520 1724310392
+69597000000 69600440722 23199000000 23200146907 1724163520 1725310427
+69600000000 69603440933 23200000000 23201146977 1725163520 1726310497
+69603000000 69606441142 23201000000 23202147047 1726163520 1727310567
+69606000000 69609441287 23202000000 23203147095 1727163520 1728310615
+69609000000 69612441413 23203000000 23204147137 1728163520 1729310657
+69612000000 69615441579 23204000000 23205147193 1729163520 1730310713
+69615000000 69618441659 23205000000 23206147219 1730163520 1731310739
+69618000000 69621441894 23206000000 23207147298 1731163520 1732310818
+69621000000 69624442053 23207000000 23208147351 1732163520 1733310871
+69624000000 69627442174 23208000000 23209147391 1733163520 1734310911
+69627000000 69630442334 23209000000 23210147444 1734163520 1735310964
+69630000000 69633442417 23210000000 23211147472 1735163520 1736310992
+69633000000 69636442663 23211000000 23212147554 1736163520 1737311074
+69636000000 69639442786 23212000000 23213147595 1737163520 1738311115
+69639000000 69642442922 23213000000 23214147640 1738163520 1739311160
+69642000000 69645443097 23214000000 23215147699 1739163520 1740311219
+69645000000 69648443219 23215000000 23216147739 1740163520 1741311259
+69648000000 69651443369 23216000000 23217147789 1741163520 1742311309
+69651000000 69654443517 23217000000 23218147839 1742163520 1743311359
+69654000000 69656617211 23218000000 23218872403 1743163520 1744035923
+69657000000 69660443837 23219000000 23220147945 1744163520 1745311465
+69660000000 69663443969 23220000000 23221147989 1745163520 1746311509
+69663000000 69666444143 23221000000 23222148047 1746163520 1747311567
+69666000000 69669444262 23222000000 23223148087 1747163520 1748311607
+69669000000 69672444386 23223000000 23224148128 1748163520 1749311648
+69672000000 69675444605 23224000000 23225148201 1749163520 1750311721
+69675000000 69678444741 23225000000 23226148247 1750163520 1751311767
+69678000000 69681444892 23226000000 23227148297 1751163520 1752311817
+69681000000 69684445042 23227000000 23228148347 1752163520 1753311867
+69684000000 69687445157 23228000000 23229148385 1753163520 1754311905
+69687000000 69690445254 23229000000 23230148418 1754163520 1755311938
+69690000000 69693445462 23230000000 23231148487 1755163520 1756312007
+69693000000 69696445617 23231000000 23232148539 1756163520 1757312059
+69696000000 69699445776 23232000000 23233148592 1757163520 1758312112
+69699000000 69702445950 23233000000 23234148650 1758163520 1759312170
+69702000000 69705446050 23234000000 23235148683 1759163520 1760312203
+69705000000 69708446228 23235000000 23236148742 1760163520 1761312262
+69708000000 69711446377 23236000000 23237148792 1761163520 1762312312
+69711000000 69714446505 23237000000 23238148835 1762163520 1763312355
+69714000000 69717446674 23238000000 23239148891 1763163520 1764312411
+69717000000 69720446794 23239000000 23240148931 1764163520 1765312451
+69720000000 69722274144 23240000000 23240758048 1765163520 1765921568
+69723000000 69726447044 23241000000 23242149014 1766163520 1767312534
+69726000000 69729447302 23242000000 23243149100 1767163520 1768312620
+69729000000 69732447407 23243000000 23244149135 1768163520 1769312655
+69732000000 69735447487 23244000000 23245149162 1769163520 1770312682
+69735000000 69738447634 23245000000 23246149211 1770163520 1771312731
+69738000000 69741447888 23246000000 23247149296 1771163520 1772312816
+69741000000 69744447978 23247000000 23248149326 1772163520 1773312846
+69744000000 69747448223 23248000000 23249149407 1773163520 1774312927
+69747000000 69750448301 23249000000 23250149433 1774163520 1775312953
+69750000000 69753448478 23250000000 23251149492 1775163520 1776313012
+69753000000 69756448624 23251000000 23252149541 1776163520 1777313061
+69756000000 69759448768 23252000000 23253149589 1777163520 1778313109
+69759000000 69761071422 23253000000 23253690474 1778163520 1778853994
+69762000000 69765449083 23254000000 23255149694 1779163520 1780313214
+69765000000 69768449243 23255000000 23256149747 1780163520 1781313267
+69768000000 69771449380 23256000000 23257149793 1781163520 1782313313
+69771000000 69774449538 23257000000 23258149846 1782163520 1783313366
+69774000000 69777449696 23258000000 23259149898 1783163520 1784313418
+69777000000 69780449810 23259000000 23260149936 1784163520 1785313456
+69780000000 69783449971 23260000000 23261149990 1785163520 1786313510
+69783000000 69786450098 23261000000 23262150032 1786163520 1787313552
+69786000000 69789450207 23262000000 23263150069 1787163520 1788313589
+69789000000 69792450349 23263000000 23264150116 1788163520 1789313636
+69792000000 69795450583 23264000000 23265150194 1789163520 1790313714
+69795000000 69798450496 23265000000 23266150165 1790163520 1791313685
+69798000000 69801450617 23266000000 23267150205 1791163520 1792313725
+69801000000 69804450725 23267000000 23268150241 1792163520 1793313761
+69804000000 69807450960 23268000000 23269150320 1793163520 1794313840
+69807000000 69810451139 23269000000 23270150379 1794163520 1795313899
+69810000000 69813364779 23270000000 23271121593 1795163520 1796285113
+69813000000 69816451408 23271000000 23272150469 1796163520 1797313989
+69816000000 69819451581 23272000000 23273150527 1797163520 1798314047
+69819000000 69822451697 23273000000 23274150565 1798163520 1799314085
+69822000000 69825451870 23274000000 23275150623 1799163520 1800314143
+69825000000 69828452042 23275000000 23276150680 1800163520 1801314200
+69828000000 69831452098 23276000000 23277150699 1801163520 1802314219
+69831000000 69834452244 23277000000 23278150748 1802163520 1803314268
+69834000000 69837452440 23278000000 23279150813 1803163520 1804314333
+69837000000 69840452469 23279000000 23280150823 1804163520 1805314343
+69840000000 69843452775 23280000000 23281150925 1805163520 1806314445
+69843000000 69846452947 23281000000 23282150982 1806163520 1807314502
+69846000000 69849453080 23282000000 23283151026 1807163520 1808314546
+69849000000 69852453197 23283000000 23284151065 1808163520 1809314585
+69852000000 69855453382 23284000000 23285151127 1809163520 1810314647
+69855000000 69858453488 23285000000 23286151162 1810163520 1811314682
+69858000000 69861453669 23286000000 23287151223 1811163520 1812314743
+69861000000 69864453881 23287000000 23288151293 1812163520 1813314813
+69864000000 69867453988 23288000000 23289151329 1813163520 1814314849
+69867000000 69870454154 23289000000 23290151384 1814163520 1815314904
+69870000000 69873052899 23290000000 23291017633 1815163520 1816181153
+69873000000 69876454425 23291000000 23292151475 1816163520 1817314995
+69876000000 69879454537 23292000000 23293151512 1817163520 1818315032
+69879000000 69882454746 23293000000 23294151582 1818163520 1819315102
+69882000000 69885454825 23294000000 23295151608 1819163520 1820315128
+69885000000 69888455050 23295000000 23296151683 1820163520 1821315203
+69888000000 69891455177 23296000000 23297151725 1821163520 1822315245
+69891000000 69894455266 23297000000 23298151755 1822163520 1823315275
+69894000000 69897455372 23298000000 23299151790 1823163520 1824315310
+69897000000 69900455583 23299000000 23300151861 1824163520 1825315381
+69900000000 69903455792 23300000000 23301151930 1825163520 1826315450
+69903000000 69906455937 23301000000 23302151979 1826163520 1827315499
+69906000000 69909456063 23302000000 23303152021 1827163520 1828315541
+69909000000 69912456229 23303000000 23304152076 1828163520 1829315596
+69912000000 69915456309 23304000000 23305152103 1829163520 1830315623
+69915000000 69918456544 23305000000 23306152181 1830163520 1831315701
+69918000000 69921456703 23306000000 23307152234 1831163520 1832315754
+69921000000 69924456824 23307000000 23308152274 1832163520 1833315794
+69924000000 69927456984 23308000000 23309152328 1833163520 1834315848
+69927000000 69930457067 23309000000 23310152355 1834163520 1835315875
+69930000000 69933457313 23310000000 23311152437 1835163520 1836315957
+69933000000 69936457436 23311000000 23312152478 1836163520 1837315998
+69936000000 69939457572 23312000000 23313152524 1837163520 1838316044
+69939000000 69942457747 23313000000 23314152582 1838163520 1839316102
+69942000000 69945457869 23314000000 23315152623 1839163520 1840316143
+69945000000 69948458019 23315000000 23316152673 1840163520 1841316193
+69948000000 69951458167 23316000000 23317152722 1841163520 1842316242
+69951000000 69953631861 23317000000 23317877287 1842163520 1843040807
+69954000000 69957458487 23318000000 23319152829 1843163520 1844316349
+69957000000 69960458619 23319000000 23320152873 1844163520 1845316393
+69960000000 69963458793 23320000000 23321152931 1845163520 1846316451
+69963000000 69966458912 23321000000 23322152970 1846163520 1847316490
+69966000000 69969459036 23322000000 23323153012 1847163520 1848316532
+69969000000 69972459255 23323000000 23324153085 1848163520 1849316605
+69972000000 69975459391 23324000000 23325153130 1849163520 1850316650
+69975000000 69978459542 23325000000 23326153180 1850163520 1851316700
+69978000000 69981459692 23326000000 23327153230 1851163520 1852316750
+69981000000 69984459807 23327000000 23328153269 1852163520 1853316789
+69984000000 69987459904 23328000000 23329153301 1853163520 1854316821
+69987000000 69990460112 23329000000 23330153370 1854163520 1855316890
+69990000000 69993460267 23330000000 23331153422 1855163520 1856316942
+69993000000 69996460426 23331000000 23332153475 1856163520 1857316995
+69996000000 69999460600 23332000000 23333153533 1857163520 1858317053
+69999000000 70002460700 23333000000 23334153566 1858163520 1859317086
+70002000000 70005460878 23334000000 23335153626 1859163520 1860317146
+70005000000 70008461027 23335000000 23336153675 1860163520 1861317195
+70008000000 70011461155 23336000000 23337153718 1861163520 1862317238
+70011000000 70014461324 23337000000 23338153774 1862163520 1863317294
+70014000000 70017461444 23338000000 23339153814 1863163520 1864317334
+70017000000 70019288794 23339000000 23339762931 1864163520 1864926451
+70020000000 70023461694 23340000000 23341153898 1865163520 1866317418
+70023000000 70026461952 23341000000 23342153984 1866163520 1867317504
+70026000000 70029462057 23342000000 23343154019 1867163520 1868317539
+70029000000 70032462137 23343000000 23344154045 1868163520 1869317565
+70032000000 70035462284 23344000000 23345154094 1869163520 1870317614
+70035000000 70038462538 23345000000 23346154179 1870163520 1871317699
+70038000000 70041462628 23346000000 23347154209 1871163520 1872317729
+70041000000 70044462873 23347000000 23348154291 1872163520 1873317811
+70044000000 70047462951 23348000000 23349154317 1873163520 1874317837
+70047000000 70050463128 23349000000 23350154376 1874163520 1875317896
+70050000000 70053463274 23350000000 23351154424 1875163520 1876317944
+70053000000 70056463418 23351000000 23352154472 1876163520 1877317992
+70056000000 70058086072 23352000000 23352695357 1877163520 1877858877
+70059000000 70062463733 23353000000 23354154577 1878163520 1879318097
+70062000000 70065463893 23354000000 23355154631 1879163520 1880318151
+70065000000 70068464030 23355000000 23356154676 1880163520 1881318196
+70068000000 70071464188 23356000000 23357154729 1881163520 1882318249
+70071000000 70074464346 23357000000 23358154782 1882163520 1883318302
+70074000000 70077464460 23358000000 23359154820 1883163520 1884318340
+70077000000 70080464621 23359000000 23360154873 1884163520 1885318393
+70080000000 70083464748 23360000000 23361154916 1885163520 1886318436
+70083000000 70086464857 23361000000 23362154952 1886163520 1887318472
+70086000000 70089464999 23362000000 23363154999 1887163520 1888318519
+70089000000 70092465233 23363000000 23364155077 1888163520 1889318597
+70092000000 70095465146 23364000000 23365155048 1889163520 1890318568
+70095000000 70098465267 23365000000 23366155089 1890163520 1891318609
+70098000000 70101465375 23366000000 23367155125 1891163520 1892318645
+70101000000 70104465610 23367000000 23368155203 1892163520 1893318723
+70104000000 70107465789 23368000000 23369155263 1893163520 1894318783
+70107000000 70110379429 23369000000 23370126476 1894163520 1895289996
+70110000000 70113466058 23370000000 23371155352 1895163520 1896318872
+70113000000 70116466231 23371000000 23372155410 1896163520 1897318930
+70116000000 70119466347 23372000000 23373155449 1897163520 1898318969
+70119000000 70122466520 23373000000 23374155506 1898163520 1899319026
+70122000000 70125466692 23374000000 23375155564 1899163520 1900319084
+70125000000 70128466748 23375000000 23376155582 1900163520 1901319102
+70128000000 70131466894 23376000000 23377155631 1901163520 1902319151
+70131000000 70134467090 23377000000 23378155696 1902163520 1903319216
+70134000000 70137467119 23378000000 23379155706 1903163520 1904319226
+70137000000 70140467425 23379000000 23380155808 1904163520 1905319328
+70140000000 70143467597 23380000000 23381155865 1905163520 1906319385
+70143000000 70146467730 23381000000 23382155910 1906163520 1907319430
+70146000000 70149467847 23382000000 23383155949 1907163520 1908319469
+70149000000 70152468032 23383000000 23384156010 1908163520 1909319530
+70152000000 70155468138 23384000000 23385156046 1909163520 1910319566
+70155000000 70158468319 23385000000 23386156106 1910163520 1911319626
+70158000000 70161468531 23386000000 23387156177 1911163520 1912319697
+70161000000 70164468638 23387000000 23388156212 1912163520 1913319732
+70164000000 70167468804 23388000000 23389156268 1913163520 1914319788
+70167000000 70170067549 23389000000 23390022516 1914163520 1915186036
+70170000000 70173469075 23390000000 23391156358 1915163520 1916319878
+70173000000 70176469187 23391000000 23392156395 1916163520 1917319915
+70176000000 70179469396 23392000000 23393156465 1917163520 1918319985
+70179000000 70182469475 23393000000 23394156491 1918163520 1919320011
+70182000000 70185469700 23394000000 23395156566 1919163520 1920320086
+70185000000 70188469827 23395000000 23396156609 1920163520 1921320129
+70188000000 70191469916 23396000000 23397156638 1921163520 1922320158
+70191000000 70194470022 23397000000 23398156674 1922163520 1923320194
+70194000000 70197470233 23398000000 23399156744 1923163520 1924320264
+70197000000 70200470442 23399000000 23400156814 1924163520 1925320334
+70200000000 70203470587 23400000000 23401156862 1925163520 1926320382
+70203000000 70206470713 23401000000 23402156904 1926163520 1927320424
+70206000000 70209470879 23402000000 23403156959 1927163520 1928320479
+70209000000 70212470959 23403000000 23404156986 1928163520 1929320506
+70212000000 70215471194 23404000000 23405157064 1929163520 1930320584
+70215000000 70218471353 23405000000 23406157117 1930163520 1931320637
+70218000000 70221471474 23406000000 23407157158 1931163520 1932320678
+70221000000 70224471634 23407000000 23408157211 1932163520 1933320731
+70224000000 70227471717 23408000000 23409157239 1933163520 1934320759
+70227000000 70230471963 23409000000 23410157321 1934163520 1935320841
+70230000000 70233472086 23410000000 23411157362 1935163520 1936320882
+70233000000 70236472222 23411000000 23412157407 1936163520 1937320927
+70236000000 70239472397 23412000000 23413157465 1937163520 1938320985
+70239000000 70242472519 23413000000 23414157506 1938163520 1939321026
+70242000000 70245472669 23414000000 23415157556 1939163520 1940321076
+70245000000 70248472817 23415000000 23416157605 1940163520 1941321125
+70248000000 70250646511 23416000000 23416882170 1941163520 1942045690
+70251000000 70254473137 23417000000 23418157712 1942163520 1943321232
+70254000000 70257473269 23418000000 23419157756 1943163520 1944321276
+70257000000 70260473443 23419000000 23420157814 1944163520 1945321334
+70260000000 70263473562 23420000000 23421157854 1945163520 1946321374
+70263000000 70266473686 23421000000 23422157895 1946163520 1947321415
+70266000000 70269473905 23422000000 23423157968 1947163520 1948321488
+70269000000 70272474041 23423000000 23424158013 1948163520 1949321533
+70272000000 70275474192 23424000000 23425158064 1949163520 1950321584
+70275000000 70278474342 23425000000 23426158114 1950163520 1951321634
+70278000000 70281474457 23426000000 23427158152 1951163520 1952321672
+70281000000 70284474554 23427000000 23428158184 1952163520 1953321704
+70284000000 70287474762 23428000000 23429158254 1953163520 1954321774
+70287000000 70290474917 23429000000 23430158305 1954163520 1955321825
+70290000000 70293475076 23430000000 23431158358 1955163520 1956321878
+70293000000 70296475250 23431000000 23432158416 1956163520 1957321936
+70296000000 70299475350 23432000000 23433158450 1957163520 1958321970
+70299000000 70302475528 23433000000 23434158509 1958163520 1959322029
+70302000000 70305475677 23434000000 23435158559 1959163520 1960322079
+70305000000 70308475805 23435000000 23436158601 1960163520 1961322121
+70308000000 70311475974 23436000000 23437158658 1961163520 1962322178
+70311000000 70314476094 23437000000 23438158698 1962163520 1963322218
+70314000000 70316303444 23438000000 23438767814 1963163520 1963931334
+70317000000 70320476344 23439000000 23440158781 1964163520 1965322301
+70320000000 70323476602 23440000000 23441158867 1965163520 1966322387
+70323000000 70326476707 23441000000 23442158902 1966163520 1967322422
+70326000000 70329476787 23442000000 23443158929 1967163520 1968322449
+70329000000 70332476934 23443000000 23444158978 1968163520 1969322498
+70332000000 70335477188 23444000000 23445159062 1969163520 1970322582
+70335000000 70338477278 23445000000 23446159092 1970163520 1971322612
+70338000000 70341477523 23446000000 23447159174 1971163520 1972322694
+70341000000 70344477601 23447000000 23448159200 1972163520 1973322720
+70344000000 70347477778 23448000000 23449159259 1973163520 1974322779
+70347000000 70350477924 23449000000 23450159308 1974163520 1975322828
+70350000000 70353478068 23450000000 23451159356 1975163520 1976322876
+70353000000 70355100722 23451000000 23451700240 1976163520 1976863760
+70356000000 70359478383 23452000000 23453159461 1977163520 1978322981
+70359000000 70362478543 23453000000 23454159514 1978163520 1979323034
+70362000000 70365478680 23454000000 23455159560 1979163520 1980323080
+70365000000 70368478838 23455000000 23456159612 1980163520 1981323132
+70368000000 70371478996 23456000000 23457159665 1981163520 1982323185
+70371000000 70374479110 23457000000 23458159703 1982163520 1983323223
+70374000000 70377479271 23458000000 23459159757 1983163520 1984323277
+70377000000 70380479398 23459000000 23460159799 1984163520 1985323319
+70380000000 70383479507 23460000000 23461159835 1985163520 1986323355
+70383000000 70386479649 23461000000 23462159883 1986163520 1987323403
+70386000000 70389479883 23462000000 23463159961 1987163520 1988323481
+70389000000 70392479796 23463000000 23464159932 1988163520 1989323452
+70392000000 70395479917 23464000000 23465159972 1989163520 1990323492
+70395000000 70398480025 23465000000 23466160008 1990163520 1991323528
+70398000000 70401480260 23466000000 23467160086 1991163520 1992323606
+70401000000 70404480439 23467000000 23468160146 1992163520 1993323666
+70404000000 70407394079 23468000000 23469131359 1993163520 1994294879
+70407000000 70410480708 23469000000 23470160236 1994163520 1995323756
+70410000000 70413480881 23470000000 23471160293 1995163520 1996323813
+70413000000 70416480997 23471000000 23472160332 1996163520 1997323852
+70416000000 70419481170 23472000000 23473160390 1997163520 1998323910
+70419000000 70422481342 23473000000 23474160447 1998163520 1999323967
+70422000000 70425481398 23474000000 23475160466 1999163520 2000323986
+70425000000 70428481544 23475000000 23476160514 2000163520 2001324034
+70428000000 70431481740 23476000000 23477160580 2001163520 2002324100
+70431000000 70434481769 23477000000 23478160589 2002163520 2003324109
+70434000000 70437482075 23478000000 23479160691 2003163520 2004324211
+70437000000 70440482247 23479000000 23480160749 2004163520 2005324269
+70440000000 70443482380 23480000000 23481160793 2005163520 2006324313
+70443000000 70446482497 23481000000 23482160832 2006163520 2007324352
+70446000000 70449482682 23482000000 23483160894 2007163520 2008324414
+70449000000 70452482788 23483000000 23484160929 2008163520 2009324449
+70452000000 70455482969 23484000000 23485160989 2009163520 2010324509
+70455000000 70458483181 23485000000 23486161060 2010163520 2011324580
+70458000000 70461483288 23486000000 23487161096 2011163520 2012324616
+70461000000 70464483454 23487000000 23488161151 2012163520 2013324671
+70464000000 70467082199 23488000000 23489027399 2013163520 2014190919
+70467000000 70470483725 23489000000 23490161241 2014163520 2015324761
+70470000000 70473483837 23490000000 23491161279 2015163520 2016324799
+70473000000 70476484046 23491000000 23492161348 2016163520 2017324868
+70476000000 70479484125 23492000000 23493161375 2017163520 2018324895
+70479000000 70482484350 23493000000 23494161450 2018163520 2019324970
+70482000000 70485484477 23494000000 23495161492 2019163520 2020325012
+70485000000 70488484566 23495000000 23496161522 2020163520 2021325042
+70488000000 70491484672 23496000000 23497161557 2021163520 2022325077
+70491000000 70494484883 23497000000 23498161627 2022163520 2023325147
+70494000000 70497485092 23498000000 23499161697 2023163520 2024325217
+70497000000 70500485237 23499000000 23500161745 2024163520 2025325265
+70500000000 70503485363 23500000000 23501161787 2025163520 2026325307
+70503000000 70506485529 23501000000 23502161843 2026163520 2027325363
+70506000000 70509485609 23502000000 23503161869 2027163520 2028325389
+70509000000 70512485844 23503000000 23504161948 2028163520 2029325468
+70512000000 70515486003 23504000000 23505162001 2029163520 2030325521
+70515000000 70518486124 23505000000 23506162041 2030163520 2031325561
+70518000000 70521486284 23506000000 23507162094 2031163520 2032325614
+70521000000 70524486367 23507000000 23508162122 2032163520 2033325642
+70524000000 70527486613 23508000000 23509162204 2033163520 2034325724
+70527000000 70530486736 23509000000 23510162245 2034163520 2035325765
+70530000000 70533486872 23510000000 23511162290 2035163520 2036325810
+70533000000 70536487047 23511000000 23512162349 2036163520 2037325869
+70536000000 70539487169 23512000000 23513162389 2037163520 2038325909
+70539000000 70542487319 23513000000 23514162439 2038163520 2039325959
+70542000000 70545487467 23514000000 23515162489 2039163520 2040326009
+70545000000 70547661161 23515000000 23515887053 2040163520 2041050573
+70548000000 70551487787 23516000000 23517162595 2041163520 2042326115
+70551000000 70554487919 23517000000 23518162639 2042163520 2043326159
+70554000000 70557488093 23518000000 23519162697 2043163520 2044326217
+70557000000 70560488212 23519000000 23520162737 2044163520 2045326257
+70560000000 70563488336 23520000000 23521162778 2045163520 2046326298
+70563000000 70566488555 23521000000 23522162851 2046163520 2047326371
+70566000000 70569488691 23522000000 23523162897 2047163520 2048326417
+70569000000 70572488842 23523000000 23524162947 2048163520 2049326467
+70572000000 70575488992 23524000000 23525162997 2049163520 2050326517
+70575000000 70578489107 23525000000 23526163035 2050163520 2051326555
+70578000000 70581489204 23526000000 23527163068 2051163520 2052326588
+70581000000 70584489412 23527000000 23528163137 2052163520 2053326657
+70584000000 70587489567 23528000000 23529163189 2053163520 2054326709
+70587000000 70590489726 23529000000 23530163242 2054163520 2055326762
+70590000000 70593489900 23530000000 23531163300 2055163520 2056326820
+70593000000 70596490000 23531000000 23532163333 2056163520 2057326853
+70596000000 70599490178 23532000000 23533163392 2057163520 2058326912
+70599000000 70602490327 23533000000 23534163442 2058163520 2059326962
+70602000000 70605490455 23534000000 23535163485 2059163520 2060327005
+70605000000 70608490624 23535000000 23536163541 2060163520 2061327061
+70608000000 70611490744 23536000000 23537163581 2061163520 2062327101
+70611000000 70613318094 23537000000 23537772698 2062163520 2062936218
+70614000000 70617490994 23538000000 23539163664 2063163520 2064327184
+70617000000 70620491252 23539000000 23540163750 2064163520 2065327270
+70620000000 70623491357 23540000000 23541163785 2065163520 2066327305
+70623000000 70626491437 23541000000 23542163812 2066163520 2067327332
+70626000000 70629491584 23542000000 23543163861 2067163520 2068327381
+70629000000 70632491838 23543000000 23544163946 2068163520 2069327466
+70632000000 70635491928 23544000000 23545163976 2069163520 2070327496
+70635000000 70638492173 23545000000 23546164057 2070163520 2071327577
+70638000000 70641492251 23546000000 23547164083 2071163520 2072327603
+70641000000 70644492428 23547000000 23548164142 2072163520 2073327662
+70644000000 70647492574 23548000000 23549164191 2073163520 2074327711
+70647000000 70650492718 23549000000 23550164239 2074163520 2075327759
+70650000000 70652115372 23550000000 23550705124 2075163520 2075868644
+70653000000 70656493033 23551000000 23552164344 2076163520 2077327864
+70656000000 70659493193 23552000000 23553164397 2077163520 2078327917
+70659000000 70662493330 23553000000 23554164443 2078163520 2079327963
+70662000000 70665493488 23554000000 23555164496 2079163520 2080328016
+70665000000 70668493646 23555000000 23556164548 2080163520 2081328068
+70668000000 70671493760 23556000000 23557164586 2081163520 2082328106
+70671000000 70674493921 23557000000 23558164640 2082163520 2083328160
+70674000000 70677494048 23558000000 23559164682 2083163520 2084328202
+70677000000 70680494157 23559000000 23560164719 2084163520 2085328239
+70680000000 70683494299 23560000000 23561164766 2085163520 2086328286
+70683000000 70686494533 23561000000 23562164844 2086163520 2087328364
+70686000000 70689494446 23562000000 23563164815 2087163520 2088328335
+70689000000 70692494567 23563000000 23564164855 2088163520 2089328375
+70692000000 70695494675 23564000000 23565164891 2089163520 2090328411
+70695000000 70698494910 23565000000 23566164970 2090163520 2091328490
+70698000000 70701495089 23566000000 23567165029 2091163520 2092328549
+70701000000 70704408729 23567000000 23568136243 2092163520 2093299763
+70704000000 70707495358 23568000000 23569165119 2093163520 2094328639
+70707000000 70710495531 23569000000 23570165177 2094163520 2095328697
+70710000000 70713495647 23570000000 23571165215 2095163520 2096328735
+70713000000 70716495820 23571000000 23572165273 2096163520 2097328793
+70716000000 70719495992 23572000000 23573165330 2097163520 2098328850
+70719000000 70722496048 23573000000 23574165349 2098163520 2099328869
+70722000000 70725496194 23574000000 23575165398 2099163520 2100328918
+70725000000 70728496390 23575000000 23576165463 2100163520 2101328983
+70728000000 70731496419 23576000000 23577165473 2101163520 2102328993
+70731000000 70734496725 23577000000 23578165575 2102163520 2103329095
+70734000000 70737496897 23578000000 23579165632 2103163520 2104329152
+70737000000 70740497030 23579000000 23580165676 2104163520 2105329196
+70740000000 70743497147 23580000000 23581165715 2105163520 2106329235
+70743000000 70746497332 23581000000 23582165777 2106163520 2107329297
+70746000000 70749497438 23582000000 23583165812 2107163520 2108329332
+70749000000 70752497619 23583000000 23584165873 2108163520 2109329393
+70752000000 70755497831 23584000000 23585165943 2109163520 2110329463
+70755000000 70758497938 23585000000 23586165979 2110163520 2111329499
+70758000000 70761498104 23586000000 23587166034 2111163520 2112329554
+70761000000 70764096849 23587000000 23588032283 2112163520 2113195803
+70764000000 70767498375 23588000000 23589166125 2113163520 2114329645
+70767000000 70770498487 23589000000 23590166162 2114163520 2115329682
+70770000000 70773498696 23590000000 23591166232 2115163520 2116329752
+70773000000 70776498775 23591000000 23592166258 2116163520 2117329778
+70776000000 70779499000 23592000000 23593166333 2117163520 2118329853
+70779000000 70782499127 23593000000 23594166375 2118163520 2119329895
+70782000000 70785499216 23594000000 23595166405 2119163520 2120329925
+70785000000 70788499322 23595000000 23596166440 2120163520 2121329960
+70788000000 70791499533 23596000000 23597166511 2121163520 2122330031
+70791000000 70794499742 23597000000 23598166580 2122163520 2123330100
+70794000000 70797499887 23598000000 23599166629 2123163520 2124330149
+70797000000 70800500013 23599000000 23600166671 2124163520 2125330191
+70800000000 70803500179 23600000000 23601166726 2125163520 2126330246
+70803000000 70806500259 23601000000 23602166753 2126163520 2127330273
+70806000000 70809500494 23602000000 23603166831 2127163520 2128330351
+70809000000 70812500653 23603000000 23604166884 2128163520 2129330404
+70812000000 70815500774 23604000000 23605166924 2129163520 2130330444
+70815000000 70818500934 23605000000 23606166978 2130163520 2131330498
+70818000000 70821501017 23606000000 23607167005 2131163520 2132330525
+70821000000 70824501263 23607000000 23608167087 2132163520 2133330607
+70824000000 70827501386 23608000000 23609167128 2133163520 2134330648
+70827000000 70830501522 23609000000 23610167174 2134163520 2135330694
+70830000000 70833501697 23610000000 23611167232 2135163520 2136330752
+70833000000 70836501819 23611000000 23612167273 2136163520 2137330793
+70836000000 70839501969 23612000000 23613167323 2137163520 2138330843
+70839000000 70842502117 23613000000 23614167372 2138163520 2139330892
+70842000000 70844675811 23614000000 23614891937 2139163520 2140055457
+70845000000 70848502437 23615000000 23616167479 2140163520 2141330999
+70848000000 70851502569 23616000000 23617167523 2141163520 2142331043
+70851000000 70854502743 23617000000 23618167581 2142163520 2143331101
+70854000000 70857502862 23618000000 23619167620 2143163520 2144331140
+70857000000 70860502986 23619000000 23620167662 2144163520 2145331182
+70860000000 70863503205 23620000000 23621167735 2145163520 2146331255
+70863000000 70866503341 23621000000 23622167780 2146163520 2147331300
+70866000000 70869503492 23622000000 23623167830 2147163520 2148331350
+70869000000 70872503642 23623000000 23624167880 2148163520 2149331400
+70872000000 70875503757 23624000000 23625167919 2149163520 2150331439
+70875000000 70878503854 23625000000 23626167951 2150163520 2151331471
+70878000000 70881504062 23626000000 23627168020 2151163520 2152331540
+70881000000 70884504217 23627000000 23628168072 2152163520 2153331592
+70884000000 70887504376 23628000000 23629168125 2153163520 2154331645
+70887000000 70890504550 23629000000 23630168183 2154163520 2155331703
+70890000000 70893504650 23630000000 23631168216 2155163520 2156331736
+70893000000 70896504828 23631000000 23632168276 2156163520 2157331796
+70896000000 70899504977 23632000000 23633168325 2157163520 2158331845
+70899000000 70902505105 23633000000 23634168368 2158163520 2159331888
+70902000000 70905505274 23634000000 23635168424 2159163520 2160331944
+70905000000 70908505394 23635000000 23636168464 2160163520 2161331984
+70908000000 70910332744 23636000000 23636777581 2161163520 2161941101
+70911000000 70914505644 23637000000 23638168548 2162163520 2163332068
+70914000000 70917505902 23638000000 23639168634 2163163520 2164332154
+70917000000 70920506007 23639000000 23640168669 2164163520 2165332189
+70920000000 70923506087 23640000000 23641168695 2165163520 2166332215
+70923000000 70926506234 23641000000 23642168744 2166163520 2167332264
+70926000000 70929506488 23642000000 23643168829 2167163520 2168332349
+70929000000 70932506578 23643000000 23644168859 2168163520 2169332379
+70932000000 70935506823 23644000000 23645168941 2169163520 2170332461
+70935000000 70938506901 23645000000 23646168967 2170163520 2171332487
+70938000000 70941507078 23646000000 23647169026 2171163520 2172332546
+70941000000 70944507224 23647000000 23648169074 2172163520 2173332594
+70944000000 70947507368 23648000000 23649169122 2173163520 2174332642
+70947000000 70949130022 23649000000 23649710007 2174163520 2174873527
+70950000000 70953507683 23650000000 23651169227 2175163520 2176332747
+70953000000 70956507843 23651000000 23652169281 2176163520 2177332801
+70956000000 70959507980 23652000000 23653169326 2177163520 2178332846
+70959000000 70962508138 23653000000 23654169379 2178163520 2179332899
+70962000000 70965508296 23654000000 23655169432 2179163520 2180332952
+70965000000 70968508410 23655000000 23656169470 2180163520 2181332990
+70968000000 70971508571 23656000000 23657169523 2181163520 2182333043
+70971000000 70974508698 23657000000 23658169566 2182163520 2183333086
+70974000000 70977508807 23658000000 23659169602 2183163520 2184333122
+70977000000 70980508949 23659000000 23660169649 2184163520 2185333169
+70980000000 70983509183 23660000000 23661169727 2185163520 2186333247
+70983000000 70986509096 23661000000 23662169698 2186163520 2187333218
+70986000000 70989509217 23662000000 23663169739 2187163520 2188333259
+70989000000 70992509325 23663000000 23664169775 2188163520 2189333295
+70992000000 70995509560 23664000000 23665169853 2189163520 2190333373
+70995000000 70998509739 23665000000 23666169913 2190163520 2191333433
+70998000000 71001423379 23666000000 23667141126 2191163520 2192304646
+71001000000 71004510008 23667000000 23668170002 2192163520 2193333522
+71004000000 71007510181 23668000000 23669170060 2193163520 2194333580
+71007000000 71010510297 23669000000 23670170099 2194163520 2195333619
+71010000000 71013510470 23670000000 23671170156 2195163520 2196333676
+71013000000 71016510642 23671000000 23672170214 2196163520 2197333734
+71016000000 71019510698 23672000000 23673170232 2197163520 2198333752
+71019000000 71022510844 23673000000 23674170281 2198163520 2199333801
+71022000000 71025511040 23674000000 23675170346 2199163520 2200333866
+71025000000 71028511069 23675000000 23676170356 2200163520 2201333876
+71028000000 71031511375 23676000000 23677170458 2201163520 2202333978
+71031000000 71034511547 23677000000 23678170515 2202163520 2203334035
+71034000000 71037511680 23678000000 23679170560 2203163520 2204334080
+71037000000 71040511797 23679000000 23680170599 2204163520 2205334119
+71040000000 71043511982 23680000000 23681170660 2205163520 2206334180
+71043000000 71046512088 23681000000 23682170696 2206163520 2207334216
+71046000000 71049512269 23682000000 23683170756 2207163520 2208334276
+71049000000 71052512481 23683000000 23684170827 2208163520 2209334347
+71052000000 71055512588 23684000000 23685170862 2209163520 2210334382
+71055000000 71058512754 23685000000 23686170918 2210163520 2211334438
+71058000000 71061111499 23686000000 23687037166 2211163520 2212200686
+71061000000 71064513025 23687000000 23688171008 2212163520 2213334528
+71064000000 71067513137 23688000000 23689171045 2213163520 2214334565
+71067000000 71070513346 23689000000 23690171115 2214163520 2215334635
+71070000000 71073513425 23690000000 23691171141 2215163520 2216334661
+71073000000 71076513650 23691000000 23692171216 2216163520 2217334736
+71076000000 71079513777 23692000000 23693171259 2217163520 2218334779
+71079000000 71082513866 23693000000 23694171288 2218163520 2219334808
+71082000000 71085513972 23694000000 23695171324 2219163520 2220334844
+71085000000 71088514183 23695000000 23696171394 2220163520 2221334914
+71088000000 71091514392 23696000000 23697171464 2221163520 2222334984
+71091000000 71094514537 23697000000 23698171512 2222163520 2223335032
+71094000000 71097514663 23698000000 23699171554 2223163520 2224335074
+71097000000 71100514829 23699000000 23700171609 2224163520 2225335129
+71100000000 71103514909 23700000000 23701171636 2225163520 2226335156
+71103000000 71106515144 23701000000 23702171714 2226163520 2227335234
+71106000000 71109515303 23702000000 23703171767 2227163520 2228335287
+71109000000 71112515424 23703000000 23704171808 2228163520 2229335328
+71112000000 71115515584 23704000000 23705171861 2229163520 2230335381
+71115000000 71118515667 23705000000 23706171889 2230163520 2231335409
+71118000000 71121515913 23706000000 23707171971 2231163520 2232335491
+71121000000 71124516036 23707000000 23708172012 2232163520 2233335532
+71124000000 71127516172 23708000000 23709172057 2233163520 2234335577
+71127000000 71130516347 23709000000 23710172115 2234163520 2235335635
+71130000000 71133516469 23710000000 23711172156 2235163520 2236335676
+71133000000 71136516619 23711000000 23712172206 2236163520 2237335726
+71136000000 71139516767 23712000000 23713172255 2237163520 2238335775
+71139000000 71141690461 23713000000 23713896820 2238163520 2239060340
+71142000000 71145517087 23714000000 23715172362 2239163520 2240335882
+71145000000 71148517219 23715000000 23716172406 2240163520 2241335926
+71148000000 71151517393 23716000000 23717172464 2241163520 2242335984
+71151000000 71154517512 23717000000 23718172504 2242163520 2243336024
+71154000000 71157517636 23718000000 23719172545 2243163520 2244336065
+71157000000 71160517855 23719000000 23720172618 2244163520 2245336138
+71160000000 71163517991 23720000000 23721172663 2245163520 2246336183
+71163000000 71166518142 23721000000 23722172714 2246163520 2247336234
+71166000000 71169518292 23722000000 23723172764 2247163520 2248336284
+71169000000 71172518407 23723000000 23724172802 2248163520 2249336322
+71172000000 71175518504 23724000000 23725172834 2249163520 2250336354
+71175000000 71178518712 23725000000 23726172904 2250163520 2251336424
+71178000000 71181518867 23726000000 23727172955 2251163520 2252336475
+71181000000 71184519026 23727000000 23728173008 2252163520 2253336528
+71184000000 71187519200 23728000000 23729173066 2253163520 2254336586
+71187000000 71190519300 23729000000 23730173100 2254163520 2255336620
+71190000000 71193519478 23730000000 23731173159 2255163520 2256336679
+71193000000 71196519627 23731000000 23732173209 2256163520 2257336729
+71196000000 71199519755 23732000000 23733173251 2257163520 2258336771
+71199000000 71202519924 23733000000 23734173308 2258163520 2259336828
+71202000000 71205520044 23734000000 23735173348 2259163520 2260336868
+71205000000 71207347394 23735000000 23735782464 2260163520 2260945984
+71208000000 71211520294 23736000000 23737173431 2261163520 2262336951
+71211000000 71214520552 23737000000 23738173517 2262163520 2263337037
+71214000000 71217520657 23738000000 23739173552 2263163520 2264337072
+71217000000 71220520737 23739000000 23740173579 2264163520 2265337099
+71220000000 71223520884 23740000000 23741173628 2265163520 2266337148
+71223000000 71226521138 23741000000 23742173712 2266163520 2267337232
+71226000000 71229521228 23742000000 23743173742 2267163520 2268337262
+71229000000 71232521473 23743000000 23744173824 2268163520 2269337344
+71232000000 71235521551 23744000000 23745173850 2269163520 2270337370
+71235000000 71238521728 23745000000 23746173909 2270163520 2271337429
+71238000000 71241521874 23746000000 23747173958 2271163520 2272337478
+71241000000 71244522018 23747000000 23748174006 2272163520 2273337526
+71244000000 71246144672 23748000000 23748714890 2273163520 2273878410
+71247000000 71250522333 23749000000 23750174111 2274163520 2275337631
+71250000000 71253522493 23750000000 23751174164 2275163520 2276337684
+71253000000 71256522630 23751000000 23752174210 2276163520 2277337730
+71256000000 71259522788 23752000000 23753174262 2277163520 2278337782
+71259000000 71262522946 23753000000 23754174315 2278163520 2279337835
+71262000000 71265523060 23754000000 23755174353 2279163520 2280337873
+71265000000 71268523221 23755000000 23756174407 2280163520 2281337927
+71268000000 71271523348 23756000000 23757174449 2281163520 2282337969
+71271000000 71274523457 23757000000 23758174485 2282163520 2283338005
+71274000000 71277523599 23758000000 23759174533 2283163520 2284338053
+71277000000 71280523833 23759000000 23760174611 2284163520 2285338131
+71280000000 71283523746 23760000000 23761174582 2285163520 2286338102
+71283000000 71286523867 23761000000 23762174622 2286163520 2287338142
+71286000000 71289523975 23762000000 23763174658 2287163520 2288338178
+71289000000 71292524210 23763000000 23764174736 2288163520 2289338256
+71292000000 71295524389 23764000000 23765174796 2289163520 2290338316
+71295000000 71298438029 23765000000 23766146009 2290163520 2291309529
+71298000000 71301524658 23766000000 23767174886 2291163520 2292338406
+71301000000 71304524831 23767000000 23768174943 2292163520 2293338463
+71304000000 71307524947 23768000000 23769174982 2293163520 2294338502
+71307000000 71310525120 23769000000 23770175040 2294163520 2295338560
+71310000000 71313525292 23770000000 23771175097 2295163520 2296338617
+71313000000 71316525348 23771000000 23772175116 2296163520 2297338636
+71316000000 71319525494 23772000000 23773175164 2297163520 2298338684
+71319000000 71322525690 23773000000 23774175230 2298163520 2299338750
+71322000000 71325525719 23774000000 23775175239 2299163520 2300338759
+71325000000 71328526025 23775000000 23776175341 2300163520 2301338861
+71328000000 71331526197 23776000000 23777175399 2301163520 2302338919
+71331000000 71334526330 23777000000 23778175443 2302163520 2303338963
+71334000000 71337526447 23778000000 23779175482 2303163520 2304339002
+71337000000 71340526632 23779000000 23780175544 2304163520 2305339064
+71340000000 71343526738 23780000000 23781175579 2305163520 2306339099
+71343000000 71346526919 23781000000 23782175639 2306163520 2307339159
+71346000000 71349527131 23782000000 23783175710 2307163520 2308339230
+71349000000 71352527238 23783000000 23784175746 2308163520 2309339266
+71352000000 71355527404 23784000000 23785175801 2309163520 2310339321
+71355000000 71358126149 23785000000 23786042049 2310163520 2311205569
+71358000000 71361527675 23786000000 23787175891 2311163520 2312339411
+71361000000 71364527787 23787000000 23788175929 2312163520 2313339449
+71364000000 71367527996 23788000000 23789175998 2313163520 2314339518
+71367000000 71370528075 23789000000 23790176025 2314163520 2315339545
+71370000000 71373528300 23790000000 23791176100 2315163520 2316339620
+71373000000 71376528427 23791000000 23792176142 2316163520 2317339662
+71376000000 71379528516 23792000000 23793176172 2317163520 2318339692
+71379000000 71382528622 23793000000 23794176207 2318163520 2319339727
+71382000000 71385528833 23794000000 23795176277 2319163520 2320339797
+71385000000 71388529042 23795000000 23796176347 2320163520 2321339867
+71388000000 71391529187 23796000000 23797176395 2321163520 2322339915
+71391000000 71394529313 23797000000 23798176437 2322163520 2323339957
+71394000000 71397529479 23798000000 23799176493 2323163520 2324340013
+71397000000 71400529559 23799000000 23800176519 2324163520 2325340039
+71400000000 71403529794 23800000000 23801176598 2325163520 2326340118
+71403000000 71406529953 23801000000 23802176651 2326163520 2327340171
+71406000000 71409530074 23802000000 23803176691 2327163520 2328340211
+71409000000 71412530234 23803000000 23804176744 2328163520 2329340264
+71412000000 71415530317 23804000000 23805176772 2329163520 2330340292
+71415000000 71418530563 23805000000 23806176854 2330163520 2331340374
+71418000000 71421530686 23806000000 23807176895 2331163520 2332340415
+71421000000 71424530822 23807000000 23808176940 2332163520 2333340460
+71424000000 71427530997 23808000000 23809176999 2333163520 2334340519
+71427000000 71430531119 23809000000 23810177039 2334163520 2335340559
+71430000000 71433531269 23810000000 23811177089 2335163520 2336340609
+71433000000 71436531417 23811000000 23812177139 2336163520 2337340659
+71436000000 71438705111 23812000000 23812901703 2337163520 2338065223
+71439000000 71442531737 23813000000 23814177245 2338163520 2339340765
+71442000000 71445531869 23814000000 23815177289 2339163520 2340340809
+71445000000 71448532043 23815000000 23816177347 2340163520 2341340867
+71448000000 71451532162 23816000000 23817177387 2341163520 2342340907
+71451000000 71454532286 23817000000 23818177428 2342163520 2343340948
+71454000000 71457532505 23818000000 23819177501 2343163520 2344341021
+71457000000 71460532641 23819000000 23820177547 2344163520 2345341067
+71460000000 71463532792 23820000000 23821177597 2345163520 2346341117
+71463000000 71466532942 23821000000 23822177647 2346163520 2347341167
+71466000000 71469533057 23822000000 23823177685 2347163520 2348341205
+71469000000 71472533154 23823000000 23824177718 2348163520 2349341238
+71472000000 71475533362 23824000000 23825177787 2349163520 2350341307
+71475000000 71478533517 23825000000 23826177839 2350163520 2351341359
+71478000000 71481533676 23826000000 23827177892 2351163520 2352341412
+71481000000 71484533850 23827000000 23828177950 2352163520 2353341470
+71484000000 71487533950 23828000000 23829177983 2353163520 2354341503
+71487000000 71490534128 23829000000 23830178042 2354163520 2355341562
+71490000000 71493534277 23830000000 23831178092 2355163520 2356341612
+71493000000 71496534405 23831000000 23832178135 2356163520 2357341655
+71496000000 71499534574 23832000000 23833178191 2357163520 2358341711
+71499000000 71502534694 23833000000 23834178231 2358163520 2359341751
+71502000000 71504362044 23834000000 23834787348 2359163520 2359950868
+71505000000 71508534944 23835000000 23836178314 2360163520 2361341834
+71508000000 71511535202 23836000000 23837178400 2361163520 2362341920
+71511000000 71514535307 23837000000 23838178435 2362163520 2363341955
+71514000000 71517535387 23838000000 23839178462 2363163520 2364341982
+71517000000 71520535534 23839000000 23840178511 2364163520 2365342031
+71520000000 71523535788 23840000000 23841178596 2365163520 2366342116
+71523000000 71526535878 23841000000 23842178626 2366163520 2367342146
+71526000000 71529536123 23842000000 23843178707 2367163520 2368342227
+71529000000 71532536201 23843000000 23844178733 2368163520 2369342253
+71532000000 71535536378 23844000000 23845178792 2369163520 2370342312
+71535000000 71538536524 23845000000 23846178841 2370163520 2371342361
+71538000000 71541536668 23846000000 23847178889 2371163520 2372342409
+71541000000 71543159322 23847000000 23847719774 2372163520 2372883294
+71544000000 71547536983 23848000000 23849178994 2373163520 2374342514
+71547000000 71550537143 23849000000 23850179047 2374163520 2375342567
+71550000000 71553537280 23850000000 23851179093 2375163520 2376342613
+71553000000 71556537438 23851000000 23852179146 2376163520 2377342666
+71556000000 71559537596 23852000000 23853179198 2377163520 2378342718
+71559000000 71562537710 23853000000 23854179236 2378163520 2379342756
+71562000000 71565537871 23854000000 23855179290 2379163520 2380342810
+71565000000 71568537998 23855000000 23856179332 2380163520 2381342852
+71568000000 71571538107 23856000000 23857179369 2381163520 2382342889
+71571000000 71574538249 23857000000 23858179416 2382163520 2383342936
+71574000000 71577538483 23858000000 23859179494 2383163520 2384343014
+71577000000 71580538396 23859000000 23860179465 2384163520 2385342985
+71580000000 71583538517 23860000000 23861179505 2385163520 2386343025
+71583000000 71586538625 23861000000 23862179541 2386163520 2387343061
+71586000000 71589538860 23862000000 23863179620 2387163520 2388343140
+71589000000 71592539039 23863000000 23864179679 2388163520 2389343199
+71592000000 71595452679 23864000000 23865150893 2389163520 2390314413
+71595000000 71598539308 23865000000 23866179769 2390163520 2391343289
+71598000000 71601539481 23866000000 23867179827 2391163520 2392343347
+71601000000 71604539597 23867000000 23868179865 2392163520 2393343385
+71604000000 71607539770 23868000000 23869179923 2393163520 2394343443
+71607000000 71610539942 23869000000 23870179980 2394163520 2395343500
+71610000000 71613539998 23870000000 23871179999 2395163520 2396343519
+71613000000 71616540144 23871000000 23872180048 2396163520 2397343568
+71616000000 71619540340 23872000000 23873180113 2397163520 2398343633
+71619000000 71622540369 23873000000 23874180123 2398163520 2399343643
+71622000000 71625540675 23874000000 23875180225 2399163520 2400343745
+71625000000 71628540847 23875000000 23876180282 2400163520 2401343802
+71628000000 71631540980 23876000000 23877180326 2401163520 2402343846
+71631000000 71634541097 23877000000 23878180365 2402163520 2403343885
+71634000000 71637541282 23878000000 23879180427 2403163520 2404343947
+71637000000 71640541388 23879000000 23880180462 2404163520 2405343982
+71640000000 71643541569 23880000000 23881180523 2405163520 2406344043
+71643000000 71646541781 23881000000 23882180593 2406163520 2407344113
+71646000000 71649541888 23882000000 23883180629 2407163520 2408344149
+71649000000 71652542054 23883000000 23884180684 2408163520 2409344204
+71652000000 71655140799 23884000000 23885046933 2409163520 2410210453
+71655000000 71658542325 23885000000 23886180775 2410163520 2411344295
+71658000000 71661542437 23886000000 23887180812 2411163520 2412344332
+71661000000 71664542646 23887000000 23888180882 2412163520 2413344402
+71664000000 71667542725 23888000000 23889180908 2413163520 2414344428
+71667000000 71670542950 23889000000 23890180983 2414163520 2415344503
+71670000000 71673543077 23890000000 23891181025 2415163520 2416344545
+71673000000 71676543166 23891000000 23892181055 2416163520 2417344575
+71676000000 71679543272 23892000000 23893181090 2417163520 2418344610
+71679000000 71682543483 23893000000 23894181161 2418163520 2419344681
+71682000000 71685543692 23894000000 23895181230 2419163520 2420344750
+71685000000 71688543837 23895000000 23896181279 2420163520 2421344799
+71688000000 71691543963 23896000000 23897181321 2421163520 2422344841
+71691000000 71694544129 23897000000 23898181376 2422163520 2423344896
+71694000000 71697544209 23898000000 23899181403 2423163520 2424344923
+71697000000 71700544444 23899000000 23900181481 2424163520 2425345001
+71700000000 71703544603 23900000000 23901181534 2425163520 2426345054
+71703000000 71706544724 23901000000 23902181574 2426163520 2427345094
+71706000000 71709544884 23902000000 23903181628 2427163520 2428345148
+71709000000 71712544967 23903000000 23904181655 2428163520 2429345175
+71712000000 71715545213 23904000000 23905181737 2429163520 2430345257
+71715000000 71718545336 23905000000 23906181778 2430163520 2431345298
+71718000000 71721545472 23906000000 23907181824 2431163520 2432345344
+71721000000 71724545647 23907000000 23908181882 2432163520 2433345402
+71724000000 71727545769 23908000000 23909181923 2433163520 2434345443
+71727000000 71730545919 23909000000 23910181973 2434163520 2435345493
+71730000000 71733546067 23910000000 23911182022 2435163520 2436345542
+71733000000 71735719761 23911000000 23911906587 2436163520 2437070107
+71736000000 71739546387 23912000000 23913182129 2437163520 2438345649
+71739000000 71742546519 23913000000 23914182173 2438163520 2439345693
+71742000000 71745546693 23914000000 23915182231 2439163520 2440345751
+71745000000 71748546812 23915000000 23916182270 2440163520 2441345790
+71748000000 71751546936 23916000000 23917182312 2441163520 2442345832
+71751000000 71754547155 23917000000 23918182385 2442163520 2443345905
+71754000000 71757547291 23918000000 23919182430 2443163520 2444345950
+71757000000 71760547442 23919000000 23920182480 2444163520 2445346000
+71760000000 71763547592 23920000000 23921182530 2445163520 2446346050
+71763000000 71766547707 23921000000 23922182569 2446163520 2447346089
+71766000000 71769547804 23922000000 23923182601 2447163520 2448346121
+71769000000 71772548012 23923000000 23924182670 2448163520 2449346190
+71772000000 71775548167 23924000000 23925182722 2449163520 2450346242
+71775000000 71778548326 23925000000 23926182775 2450163520 2451346295
+71778000000 71781548500 23926000000 23927182833 2451163520 2452346353
+71781000000 71784548600 23927000000 23928182866 2452163520 2453346386
+71784000000 71787548778 23928000000 23929182926 2453163520 2454346446
+71787000000 71790548927 23929000000 23930182975 2454163520 2455346495
+71790000000 71793549055 23930000000 23931183018 2455163520 2456346538
+71793000000 71796549224 23931000000 23932183074 2456163520 2457346594
+71796000000 71799549344 23932000000 23933183114 2457163520 2458346634
+71799000000 71801376694 23933000000 23933792231 2458163520 2458955751
+71802000000 71805549594 23934000000 23935183198 2459163520 2460346718
+71805000000 71808549852 23935000000 23936183284 2460163520 2461346804
+71808000000 71811549957 23936000000 23937183319 2461163520 2462346839
+71811000000 71814550037 23937000000 23938183345 2462163520 2463346865
+71814000000 71817550184 23938000000 23939183394 2463163520 2464346914
+71817000000 71820550438 23939000000 23940183479 2464163520 2465346999
+71820000000 71823550528 23940000000 23941183509 2465163520 2466347029
+71823000000 71826550773 23941000000 23942183591 2466163520 2467347111
+71826000000 71829550851 23942000000 23943183617 2467163520 2468347137
+71829000000 71832551028 23943000000 23944183676 2468163520 2469347196
+71832000000 71835551174 23944000000 23945183724 2469163520 2470347244
+71835000000 71838551318 23945000000 23946183772 2470163520 2471347292
+71838000000 71840173972 23946000000 23946724657 2471163520 2471888177
+71841000000 71844551633 23947000000 23948183877 2472163520 2473347397
+71844000000 71847551793 23948000000 23949183931 2473163520 2474347451
+71847000000 71850551930 23949000000 23950183976 2474163520 2475347496
+71850000000 71853552088 23950000000 23951184029 2475163520 2476347549
+71853000000 71856552246 23951000000 23952184082 2476163520 2477347602
+71856000000 71859552360 23952000000 23953184120 2477163520 2478347640
+71859000000 71862552521 23953000000 23954184173 2478163520 2479347693
+71862000000 71865552648 23954000000 23955184216 2479163520 2480347736
+71865000000 71868552757 23955000000 23956184252 2480163520 2481347772
+71868000000 71871552899 23956000000 23957184299 2481163520 2482347819
+71871000000 71874553133 23957000000 23958184377 2482163520 2483347897
+71874000000 71877553046 23958000000 23959184348 2483163520 2484347868
+71877000000 71880553167 23959000000 23960184389 2484163520 2485347909
+71880000000 71883553275 23960000000 23961184425 2485163520 2486347945
+71883000000 71886553510 23961000000 23962184503 2486163520 2487348023
+71886000000 71889553689 23962000000 23963184563 2487163520 2488348083
+71889000000 71892467329 23963000000 23964155776 2488163520 2489319296
+71892000000 71895553958 23964000000 23965184652 2489163520 2490348172
+71895000000 71898554131 23965000000 23966184710 2490163520 2491348230
+71898000000 71901554247 23966000000 23967184749 2491163520 2492348269
+71901000000 71904554420 23967000000 23968184806 2492163520 2493348326
+71904000000 71907554592 23968000000 23969184864 2493163520 2494348384
+71907000000 71910554648 23969000000 23970184882 2494163520 2495348402
+71910000000 71913554794 23970000000 23971184931 2495163520 2496348451
+71913000000 71916554990 23971000000 23972184996 2496163520 2497348516
+71916000000 71919555019 23972000000 23973185006 2497163520 2498348526
+71919000000 71922555325 23973000000 23974185108 2498163520 2499348628
+71922000000 71925555497 23974000000 23975185165 2499163520 2500348685
+71925000000 71928555630 23975000000 23976185210 2500163520 2501348730
+71928000000 71931555747 23976000000 23977185249 2501163520 2502348769
+71931000000 71934555932 23977000000 23978185310 2502163520 2503348830
+71934000000 71937556038 23978000000 23979185346 2503163520 2504348866
+71937000000 71940556219 23979000000 23980185406 2504163520 2505348926
+71940000000 71943556431 23980000000 23981185477 2505163520 2506348997
+71943000000 71946556538 23981000000 23982185512 2506163520 2507349032
+71946000000 71949556704 23982000000 23983185568 2507163520 2508349088
+71949000000 71952155449 23983000000 23984051816 2508163520 2509215336
+71952000000 71955556975 23984000000 23985185658 2509163520 2510349178
+71955000000 71958557087 23985000000 23986185695 2510163520 2511349215
+71958000000 71961557296 23986000000 23987185765 2511163520 2512349285
+71961000000 71964557375 23987000000 23988185791 2512163520 2513349311
+71964000000 71967557600 23988000000 23989185866 2513163520 2514349386
+71967000000 71970557727 23989000000 23990185909 2514163520 2515349429
+71970000000 71973557816 23990000000 23991185938 2515163520 2516349458
+71973000000 71976557922 23991000000 23992185974 2516163520 2517349494
+71976000000 71979558133 23992000000 23993186044 2517163520 2518349564
+71979000000 71982558342 23993000000 23994186114 2518163520 2519349634
+71982000000 71985558487 23994000000 23995186162 2519163520 2520349682
+71985000000 71988558613 23995000000 23996186204 2520163520 2521349724
+71988000000 71991558779 23996000000 23997186259 2521163520 2522349779
+71991000000 71994558859 23997000000 23998186286 2522163520 2523349806
+71994000000 71997559094 23998000000 23999186364 2523163520 2524349884
+71997000000 72000559253 23999000000 24000186417 2524163520 2525349937
+72000000000 72003559374 24000000000 24001186458 2525163520 2526349978
+72003000000 72006559534 24001000000 24002186511 2526163520 2527350031
+72006000000 72009559617 24002000000 24003186539 2527163520 2528350059
+72009000000 72012559863 24003000000 24004186621 2528163520 2529350141
+72012000000 72015559986 24004000000 24005186662 2529163520 2530350182
+72015000000 72018560122 24005000000 24006186707 2530163520 2531350227
+72018000000 72021560297 24006000000 24007186765 2531163520 2532350285
+72021000000 72024560419 24007000000 24008186806 2532163520 2533350326
+72024000000 72027560569 24008000000 24009186856 2533163520 2534350376
+72027000000 72030560717 24009000000 24010186905 2534163520 2535350425
+72030000000 72032734411 24010000000 24010911470 2535163520 2536074990
+72033000000 72036561037 24011000000 24012187012 2536163520 2537350532
+72036000000 72039561169 24012000000 24013187056 2537163520 2538350576
+72039000000 72042561343 24013000000 24014187114 2538163520 2539350634
+72042000000 72045561462 24014000000 24015187154 2539163520 2540350674
+72045000000 72048561586 24015000000 24016187195 2540163520 2541350715
+72048000000 72051561805 24016000000 24017187268 2541163520 2542350788
+72051000000 72054561941 24017000000 24018187313 2542163520 2543350833
+72054000000 72057562092 24018000000 24019187364 2543163520 2544350884
+72057000000 72060562242 24019000000 24020187414 2544163520 2545350934
+72060000000 72063562357 24020000000 24021187452 2545163520 2546350972
+72063000000 72066562454 24021000000 24022187484 2546163520 2547351004
+72066000000 72069562662 24022000000 24023187554 2547163520 2548351074
+72069000000 72072562817 24023000000 24024187605 2548163520 2549351125
+72072000000 72075562976 24024000000 24025187658 2549163520 2550351178
+72075000000 72078563150 24025000000 24026187716 2550163520 2551351236
+72078000000 72081563250 24026000000 24027187750 2551163520 2552351270
+72081000000 72084563428 24027000000 24028187809 2552163520 2553351329
+72084000000 72087563577 24028000000 24029187859 2553163520 2554351379
+72087000000 72090563705 24029000000 24030187901 2554163520 2555351421
+72090000000 72093563874 24030000000 24031187958 2555163520 2556351478
+72093000000 72096563994 24031000000 24032187998 2556163520 2557351518
+72096000000 72098391344 24032000000 24032797114 2557163520 2557960634
+72099000000 72102564244 24033000000 24034188081 2558163520 2559351601
+72102000000 72105564502 24034000000 24035188167 2559163520 2560351687
+72105000000 72108564607 24035000000 24036188202 2560163520 2561351722
+72108000000 72111564687 24036000000 24037188229 2561163520 2562351749
+72111000000 72114564834 24037000000 24038188278 2562163520 2563351798
+72114000000 72117565088 24038000000 24039188362 2563163520 2564351882
+72117000000 72120565178 24039000000 24040188392 2564163520 2565351912
+72120000000 72123565423 24040000000 24041188474 2565163520 2566351994
+72123000000 72126565501 24041000000 24042188500 2566163520 2567352020
+72126000000 72129565678 24042000000 24043188559 2567163520 2568352079
+72129000000 72132565824 24043000000 24044188608 2568163520 2569352128
+72132000000 72135565968 24044000000 24045188656 2569163520 2570352176
+72135000000 72137188622 24045000000 24045729540 2570163520 2570893060
+72138000000 72141566283 24046000000 24047188761 2571163520 2572352281
+72141000000 72144566443 24047000000 24048188814 2572163520 2573352334
+72144000000 72147566580 24048000000 24049188860 2573163520 2574352380
+72147000000 72150566738 24049000000 24050188912 2574163520 2575352432
+72150000000 72153566896 24050000000 24051188965 2575163520 2576352485
+72153000000 72156567010 24051000000 24052189003 2576163520 2577352523
+72156000000 72159567171 24052000000 24053189057 2577163520 2578352577
+72159000000 72162567298 24053000000 24054189099 2578163520 2579352619
+72162000000 72165567407 24054000000 24055189135 2579163520 2580352655
+72165000000 72168567549 24055000000 24056189183 2580163520 2581352703
+72168000000 72171567783 24056000000 24057189261 2581163520 2582352781
+72171000000 72174567696 24057000000 24058189232 2582163520 2583352752
+72174000000 72177567817 24058000000 24059189272 2583163520 2584352792
+72177000000 72180567925 24059000000 24060189308 2584163520 2585352828
+72180000000 72183568160 24060000000 24061189386 2585163520 2586352906
+72183000000 72186568339 24061000000 24062189446 2586163520 2587352966
+72186000000 72189481979 24062000000 24063160659 2587163520 2588324179
+72189000000 72192568608 24063000000 24064189536 2588163520 2589353056
+72192000000 72195568781 24064000000 24065189593 2589163520 2590353113
+72195000000 72198568897 24065000000 24066189632 2590163520 2591353152
+72198000000 72201569070 24066000000 24067189690 2591163520 2592353210
+72201000000 72204569242 24067000000 24068189747 2592163520 2593353267
+72204000000 72207569298 24068000000 24069189766 2593163520 2594353286
+72207000000 72210569444 24069000000 24070189814 2594163520 2595353334
+72210000000 72213569640 24070000000 24071189880 2595163520 2596353400
+72213000000 72216569669 24071000000 24072189889 2596163520 2597353409
+72216000000 72219569975 24072000000 24073189991 2597163520 2598353511
+72219000000 72222570147 24073000000 24074190049 2598163520 2599353569
+72222000000 72225570280 24074000000 24075190093 2599163520 2600353613
+72225000000 72228570397 24075000000 24076190132 2600163520 2601353652
+72228000000 72231570582 24076000000 24077190194 2601163520 2602353714
+72231000000 72234570688 24077000000 24078190229 2602163520 2603353749
+72234000000 72237570869 24078000000 24079190289 2603163520 2604353809
+72237000000 72240571081 24079000000 24080190360 2604163520 2605353880
+72240000000 72243571188 24080000000 24081190396 2605163520 2606353916
+72243000000 72246571354 24081000000 24082190451 2606163520 2607353971
+72246000000 72249170099 24082000000 24083056699 2607163520 2608220219
+72249000000 72252571625 24083000000 24084190541 2608163520 2609354061
+72252000000 72255571737 24084000000 24085190579 2609163520 2610354099
+72255000000 72258571946 24085000000 24086190648 2610163520 2611354168
+72258000000 72261572025 24086000000 24087190675 2611163520 2612354195
+72261000000 72264572250 24087000000 24088190750 2612163520 2613354270
+72264000000 72267572377 24088000000 24089190792 2613163520 2614354312
+72267000000 72270572466 24089000000 24090190822 2614163520 2615354342
+72270000000 72273572572 24090000000 24091190857 2615163520 2616354377
+72273000000 72276572783 24091000000 24092190927 2616163520 2617354447
+72276000000 72279572992 24092000000 24093190997 2617163520 2618354517
+72279000000 72282573137 24093000000 24094191045 2618163520 2619354565
+72282000000 72285573263 24094000000 24095191087 2619163520 2620354607
+72285000000 72288573429 24095000000 24096191143 2620163520 2621354663
+72288000000 72291573509 24096000000 24097191169 2621163520 2622354689
+72291000000 72294573744 24097000000 24098191248 2622163520 2623354768
+72294000000 72297573903 24098000000 24099191301 2623163520 2624354821
+72297000000 72300574024 24099000000 24100191341 2624163520 2625354861
+72300000000 72303574184 24100000000 24101191394 2625163520 2626354914
+72303000000 72306574267 24101000000 24102191422 2626163520 2627354942
+72306000000 72309574513 24102000000 24103191504 2627163520 2628355024
+72309000000 72312574636 24103000000 24104191545 2628163520 2629355065
+72312000000 72315574772 24104000000 24105191590 2629163520 2630355110
+72315000000 72318574947 24105000000 24106191649 2630163520 2631355169
+72318000000 72321575069 24106000000 24107191689 2631163520 2632355209
+72321000000 72324575219 24107000000 24108191739 2632163520 2633355259
+72324000000 72327575367 24108000000 24109191789 2633163520 2634355309
+72327000000 72329749061 24109000000 24109916353 2634163520 2635079873
+72330000000 72333575687 24110000000 24111191895 2635163520 2636355415
+72333000000 72336575819 24111000000 24112191939 2636163520 2637355459
+72336000000 72339575993 24112000000 24113191997 2637163520 2638355517
+72339000000 72342576112 24113000000 24114192037 2638163520 2639355557
+72342000000 72345576236 24114000000 24115192078 2639163520 2640355598
+72345000000 72348576455 24115000000 24116192151 2640163520 2641355671
+72348000000 72351576591 24116000000 24117192197 2641163520 2642355717
+72351000000 72354576742 24117000000 24118192247 2642163520 2643355767
+72354000000 72357576892 24118000000 24119192297 2643163520 2644355817
+72357000000 72360577007 24119000000 24120192335 2644163520 2645355855
+72360000000 72363577104 24120000000 24121192368 2645163520 2646355888
+72363000000 72366577312 24121000000 24122192437 2646163520 2647355957
+72366000000 72369577467 24122000000 24123192489 2647163520 2648356009
+72369000000 72372577626 24123000000 24124192542 2648163520 2649356062
+72372000000 72375577800 24124000000 24125192600 2649163520 2650356120
+72375000000 72378577900 24125000000 24126192633 2650163520 2651356153
+72378000000 72381578078 24126000000 24127192692 2651163520 2652356212
+72381000000 72384578227 24127000000 24128192742 2652163520 2653356262
+72384000000 72387578355 24128000000 24129192785 2653163520 2654356305
+72387000000 72390578524 24129000000 24130192841 2654163520 2655356361
+72390000000 72393578644 24130000000 24131192881 2655163520 2656356401
+72393000000 72395405994 24131000000 24131801998 2656163520 2656965518
+72396000000 72399578894 24132000000 24133192964 2657163520 2658356484
+72399000000 72402579152 24133000000 24134193050 2658163520 2659356570
+72402000000 72405579257 24134000000 24135193085 2659163520 2660356605
+72405000000 72408579337 24135000000 24136193112 2660163520 2661356632
+72408000000 72411579484 24136000000 24137193161 2661163520 2662356681
+72411000000 72414579738 24137000000 24138193246 2662163520 2663356766
+72414000000 72417579828 24138000000 24139193276 2663163520 2664356796
+72417000000 72420580073 24139000000 24140193357 2664163520 2665356877
+72420000000 72423580151 24140000000 24141193383 2665163520 2666356903
+72423000000 72426580328 24141000000 24142193442 2666163520 2667356962
+72426000000 72429580474 24142000000 24143193491 2667163520 2668357011
+72429000000 72432580618 24143000000 24144193539 2668163520 2669357059
+72432000000 72434203272 24144000000 24144734424 2669163520 2669897944
+72435000000 72438580933 24145000000 24146193644 2670163520 2671357164
+72438000000 72441581093 24146000000 24147193697 2671163520 2672357217
+72441000000 72444581230 24147000000 24148193743 2672163520 2673357263
+72444000000 72447581388 24148000000 24149193796 2673163520 2674357316
+72447000000 72450581546 24149000000 24150193848 2674163520 2675357368
+72450000000 72453581660 24150000000 24151193886 2675163520 2676357406
+72453000000 72456581821 24151000000 24152193940 2676163520 2677357460
+72456000000 72459581948 24152000000 24153193982 2677163520 2678357502
+72459000000 72462582057 24153000000 24154194019 2678163520 2679357539
+72462000000 72465582199 24154000000 24155194066 2679163520 2680357586
+72465000000 72468582433 24155000000 24156194144 2680163520 2681357664
+72468000000 72471582346 24156000000 24157194115 2681163520 2682357635
+72471000000 72474582467 24157000000 24158194155 2682163520 2683357675
+72474000000 72477582575 24158000000 24159194191 2683163520 2684357711
+72477000000 72480582810 24159000000 24160194270 2684163520 2685357790
+72480000000 72483582989 24160000000 24161194329 2685163520 2686357849
+72483000000 72486496629 24161000000 24162165543 2686163520 2687329063
+72486000000 72489583258 24162000000 24163194419 2687163520 2688357939
+72489000000 72492583431 24163000000 24164194477 2688163520 2689357997
+72492000000 72495583547 24164000000 24165194515 2689163520 2690358035
+72495000000 72498583720 24165000000 24166194573 2690163520 2691358093
+72498000000 72501583892 24166000000 24167194630 2691163520 2692358150
+72501000000 72504583948 24167000000 24168194649 2692163520 2693358169
+72504000000 72507584094 24168000000 24169194698 2693163520 2694358218
+72507000000 72510584290 24169000000 24170194763 2694163520 2695358283
+72510000000 72513584319 24170000000 24171194773 2695163520 2696358293
+72513000000 72516584625 24171000000 24172194875 2696163520 2697358395
+72516000000 72519584797 24172000000 24173194932 2697163520 2698358452
+72519000000 72522584930 24173000000 24174194976 2698163520 2699358496
+72522000000 72525585047 24174000000 24175195015 2699163520 2700358535
+72525000000 72528585232 24175000000 24176195077 2700163520 2701358597
+72528000000 72531585338 24176000000 24177195112 2701163520 2702358632
+72531000000 72534585519 24177000000 24178195173 2702163520 2703358693
+72534000000 72537585731 24178000000 24179195243 2703163520 2704358763
+72537000000 72540585838 24179000000 24180195279 2704163520 2705358799
+72540000000 72543586004 24180000000 24181195334 2705163520 2706358854
+72543000000 72546184749 24181000000 24182061583 2706163520 2707225103
+72546000000 72549586275 24182000000 24183195425 2707163520 2708358945
+72549000000 72552586387 24183000000 24184195462 2708163520 2709358982
+72552000000 72555586596 24184000000 24185195532 2709163520 2710359052
+72555000000 72558586675 24185000000 24186195558 2710163520 2711359078
+72558000000 72561586900 24186000000 24187195633 2711163520 2712359153
+72561000000 72564587027 24187000000 24188195675 2712163520 2713359195
+72564000000 72567587116 24188000000 24189195705 2713163520 2714359225
+72567000000 72570587222 24189000000 24190195740 2714163520 2715359260
+72570000000 72573587433 24190000000 24191195811 2715163520 2716359331
+72573000000 72576587642 24191000000 24192195880 2716163520 2717359400
+72576000000 72579587787 24192000000 24193195929 2717163520 2718359449
+72579000000 72582587913 24193000000 24194195971 2718163520 2719359491
+72582000000 72585588079 24194000000 24195196026 2719163520 2720359546
+72585000000 72588588159 24195000000 24196196053 2720163520 2721359573
+72588000000 72591588394 24196000000 24197196131 2721163520 2722359651
+72591000000 72594588553 24197000000 24198196184 2722163520 2723359704
+72594000000 72597588674 24198000000 24199196224 2723163520 2724359744
+72597000000 72600588834 24199000000 24200196278 2724163520 2725359798
+72600000000 72603588917 24200000000 24201196305 2725163520 2726359825
+72603000000 72606589163 24201000000 24202196387 2726163520 2727359907
+72606000000 72609589286 24202000000 24203196428 2727163520 2728359948
+72609000000 72612589422 24203000000 24204196474 2728163520 2729359994
+72612000000 72615589597 24204000000 24205196532 2729163520 2730360052
+72615000000 72618589719 24205000000 24206196573 2730163520 2731360093
+72618000000 72621589869 24206000000 24207196623 2731163520 2732360143
+72621000000 72624590017 24207000000 24208196672 2732163520 2733360192
+72624000000 72626763711 24208000000 24208921237 2733163520 2734084757
+72627000000 72630590337 24209000000 24210196779 2734163520 2735360299
+72630000000 72633590469 24210000000 24211196823 2735163520 2736360343
+72633000000 72636590643 24211000000 24212196881 2736163520 2737360401
+72636000000 72639590762 24212000000 24213196920 2737163520 2738360440
+72639000000 72642590886 24213000000 24214196962 2738163520 2739360482
+72642000000 72645591105 24214000000 24215197035 2739163520 2740360555
+72645000000 72648591241 24215000000 24216197080 2740163520 2741360600
+72648000000 72651591392 24216000000 24217197130 2741163520 2742360650
+72651000000 72654591542 24217000000 24218197180 2742163520 2743360700
+72654000000 72657591657 24218000000 24219197219 2743163520 2744360739
+72657000000 72660591754 24219000000 24220197251 2744163520 2745360771
+72660000000 72663591962 24220000000 24221197320 2745163520 2746360840
+72663000000 72666592117 24221000000 24222197372 2746163520 2747360892
+72666000000 72669592276 24222000000 24223197425 2747163520 2748360945
+72669000000 72672592450 24223000000 24224197483 2748163520 2749361003
+72672000000 72675592550 24224000000 24225197516 2749163520 2750361036
+72675000000 72678592728 24225000000 24226197576 2750163520 2751361096
+72678000000 72681592877 24226000000 24227197625 2751163520 2752361145
+72681000000 72684593005 24227000000 24228197668 2752163520 2753361188
+72684000000 72687593174 24228000000 24229197724 2753163520 2754361244
+72687000000 72690593294 24229000000 24230197764 2754163520 2755361284
+72690000000 72692420644 24230000000 24230806881 2755163520 2755970401
+72693000000 72696593544 24231000000 24232197848 2756163520 2757361368
+72696000000 72699593802 24232000000 24233197934 2757163520 2758361454
+72699000000 72702593907 24233000000 24234197969 2758163520 2759361489
+72702000000 72705593987 24234000000 24235197995 2759163520 2760361515
+72705000000 72708594134 24235000000 24236198044 2760163520 2761361564
+72708000000 72711594388 24236000000 24237198129 2761163520 2762361649
+72711000000 72714594478 24237000000 24238198159 2762163520 2763361679
+72714000000 72717594723 24238000000 24239198241 2763163520 2764361761
+72717000000 72720594801 24239000000 24240198267 2764163520 2765361787
+72720000000 72723594978 24240000000 24241198326 2765163520 2766361846
+72723000000 72726595124 24241000000 24242198374 2766163520 2767361894
+72726000000 72729595268 24242000000 24243198422 2767163520 2768361942
+72729000000 72731217922 24243000000 24243739307 2768163520 2768902827
+72732000000 72735595583 24244000000 24245198527 2769163520 2770362047
+72735000000 72738595743 24245000000 24246198581 2770163520 2771362101
+72738000000 72741595880 24246000000 24247198626 2771163520 2772362146
+72741000000 72744596038 24247000000 24248198679 2772163520 2773362199
+72744000000 72747596196 24248000000 24249198732 2773163520 2774362252
+72747000000 72750596310 24249000000 24250198770 2774163520 2775362290
+72750000000 72753596471 24250000000 24251198823 2775163520 2776362343
+72753000000 72756596598 24251000000 24252198866 2776163520 2777362386
+72756000000 72759596707 24252000000 24253198902 2777163520 2778362422
+72759000000 72762596849 24253000000 24254198949 2778163520 2779362469
+72762000000 72765597083 24254000000 24255199027 2779163520 2780362547
+72765000000 72768596996 24255000000 24256198998 2780163520 2781362518
+72768000000 72771597117 24256000000 24257199039 2781163520 2782362559
+72771000000 72774597225 24257000000 24258199075 2782163520 2783362595
+72774000000 72777597460 24258000000 24259199153 2783163520 2784362673
+72777000000 72780597639 24259000000 24260199213 2784163520 2785362733
+72780000000 72783511279 24260000000 24261170426 2785163520 2786333946
+72783000000 72786597908 24261000000 24262199302 2786163520 2787362822
+72786000000 72789598081 24262000000 24263199360 2787163520 2788362880
+72789000000 72792598197 24263000000 24264199399 2788163520 2789362919
+72792000000 72795598370 24264000000 24265199456 2789163520 2790362976
+72795000000 72798598542 24265000000 24266199514 2790163520 2791363034
+72798000000 72801598598 24266000000 24267199532 2791163520 2792363052
+72801000000 72804598744 24267000000 24268199581 2792163520 2793363101
+72804000000 72807598940 24268000000 24269199646 2793163520 2794363166
+72807000000 72810598969 24269000000 24270199656 2794163520 2795363176
+72810000000 72813599275 24270000000 24271199758 2795163520 2796363278
+72813000000 72816599447 24271000000 24272199815 2796163520 2797363335
+72816000000 72819599580 24272000000 24273199860 2797163520 2798363380
+72819000000 72822599697 24273000000 24274199899 2798163520 2799363419
+72822000000 72825599882 24274000000 24275199960 2799163520 2800363480
+72825000000 72828599988 24275000000 24276199996 2800163520 2801363516
+72828000000 72831600169 24276000000 24277200056 2801163520 2802363576
+72831000000 72834600381 24277000000 24278200127 2802163520 2803363647
+72834000000 72837600488 24278000000 24279200162 2803163520 2804363682
+72837000000 72840600654 24279000000 24280200218 2804163520 2805363738
+72840000000 72843199399 24280000000 24281066466 2805163520 2806229986
+72843000000 72846600925 24281000000 24282200308 2806163520 2807363828
+72846000000 72849601037 24282000000 24283200345 2807163520 2808363865
+72849000000 72852601246 24283000000 24284200415 2808163520 2809363935
+72852000000 72855601325 24284000000 24285200441 2809163520 2810363961
+72855000000 72858601550 24285000000 24286200516 2810163520 2811364036
+72858000000 72861601677 24286000000 24287200559 2811163520 2812364079
+72861000000 72864601766 24287000000 24288200588 2812163520 2813364108
+72864000000 72867601872 24288000000 24289200624 2813163520 2814364144
+72867000000 72870602083 24289000000 24290200694 2814163520 2815364214
+72870000000 72873602292 24290000000 24291200764 2815163520 2816364284
+72873000000 72876602437 24291000000 24292200812 2816163520 2817364332
+72876000000 72879602563 24292000000 24293200854 2817163520 2818364374
+72879000000 72882602729 24293000000 24294200909 2818163520 2819364429
+72882000000 72885602809 24294000000 24295200936 2819163520 2820364456
+72885000000 72888603044 24295000000 24296201014 2820163520 2821364534
+72888000000 72891603203 24296000000 24297201067 2821163520 2822364587
+72891000000 72894603324 24297000000 24298201108 2822163520 2823364628
+72894000000 72897603484 24298000000 24299201161 2823163520 2824364681
+72897000000 72900603567 24299000000 24300201189 2824163520 2825364709
+72900000000 72903603813 24300000000 24301201271 2825163520 2826364791
+72903000000 72906603936 24301000000 24302201312 2826163520 2827364832
+72906000000 72909604072 24302000000 24303201357 2827163520 2828364877
+72909000000 72912604247 24303000000 24304201415 2828163520 2829364935
+72912000000 72915604369 24304000000 24305201456 2829163520 2830364976
+72915000000 72918604519 24305000000 24306201506 2830163520 2831365026
+72918000000 72921604667 24306000000 24307201555 2831163520 2832365075
+72921000000 72923778361 24307000000 24307926120 2832163520 2833089640
+72924000000 72927604987 24308000000 24309201662 2833163520 2834365182
+72927000000 72930605119 24309000000 24310201706 2834163520 2835365226
+72930000000 72933605293 24310000000 24311201764 2835163520 2836365284
+72933000000 72936605412 24311000000 24312201804 2836163520 2837365324
+72936000000 72939605536 24312000000 24313201845 2837163520 2838365365
+72939000000 72942605755 24313000000 24314201918 2838163520 2839365438
+72942000000 72945605891 24314000000 24315201963 2839163520 2840365483
+72945000000 72948606042 24315000000 24316202014 2840163520 2841365534
+72948000000 72951606192 24316000000 24317202064 2841163520 2842365584
+72951000000 72954606307 24317000000 24318202102 2842163520 2843365622
+72954000000 72957606404 24318000000 24319202134 2843163520 2844365654
+72957000000 72960606612 24319000000 24320202204 2844163520 2845365724
+72960000000 72963606767 24320000000 24321202255 2845163520 2846365775
+72963000000 72966606926 24321000000 24322202308 2846163520 2847365828
+72966000000 72969607100 24322000000 24323202366 2847163520 2848365886
+72969000000 72972607200 24323000000 24324202400 2848163520 2849365920
+72972000000 72975607378 24324000000 24325202459 2849163520 2850365979
+72975000000 72978607527 24325000000 24326202509 2850163520 2851366029
+72978000000 72981607655 24326000000 24327202551 2851163520 2852366071
+72981000000 72984607824 24327000000 24328202608 2852163520 2853366128
+72984000000 72987607944 24328000000 24329202648 2853163520 2854366168
+72987000000 72989435294 24329000000 24329811764 2854163520 2854975284
+72990000000 72993608194 24330000000 24331202731 2855163520 2856366251
+72993000000 72996608452 24331000000 24332202817 2856163520 2857366337
+72996000000 72999608557 24332000000 24333202852 2857163520 2858366372
+72999000000 73002608637 24333000000 24334202879 2858163520 2859366399
+73002000000 73005608784 24334000000 24335202928 2859163520 2860366448
+73005000000 73008609038 24335000000 24336203012 2860163520 2861366532
+73008000000 73011609128 24336000000 24337203042 2861163520 2862366562
+73011000000 73014609373 24337000000 24338203124 2862163520 2863366644
+73014000000 73017609451 24338000000 24339203150 2863163520 2864366670
+73017000000 73020609628 24339000000 24340203209 2864163520 2865366729
+73020000000 73023609774 24340000000 24341203258 2865163520 2866366778
+73023000000 73026609918 24341000000 24342203306 2866163520 2867366826
+73026000000 73028232572 24342000000 24342744190 2867163520 2867907710
+73029000000 73032610233 24343000000 24344203411 2868163520 2869366931
+73032000000 73035610393 24344000000 24345203464 2869163520 2870366984
+73035000000 73038610530 24345000000 24346203510 2870163520 2871367030
+73038000000 73041610688 24346000000 24347203562 2871163520 2872367082
+73041000000 73044610846 24347000000 24348203615 2872163520 2873367135
+73044000000 73047610960 24348000000 24349203653 2873163520 2874367173
+73047000000 73050611121 24349000000 24350203707 2874163520 2875367227
+73050000000 73053611248 24350000000 24351203749 2875163520 2876367269
+73053000000 73056611357 24351000000 24352203785 2876163520 2877367305
+73056000000 73059611499 24352000000 24353203833 2877163520 2878367353
+73059000000 73062611733 24353000000 24354203911 2878163520 2879367431
+73062000000 73065611646 24354000000 24355203882 2879163520 2880367402
+73065000000 73068611767 24355000000 24356203922 2880163520 2881367442
+73068000000 73071611875 24356000000 24357203958 2881163520 2882367478
+73071000000 73074612110 24357000000 24358204036 2882163520 2883367556
+73074000000 73077612289 24358000000 24359204096 2883163520 2884367616
+73077000000 73080525929 24359000000 24360175309 2884163520 2885338829
+73080000000 73083612558 24360000000 24361204186 2885163520 2886367706
+73083000000 73086612731 24361000000 24362204243 2886163520 2887367763
+73086000000 73089612847 24362000000 24363204282 2887163520 2888367802
+73089000000 73092613020 24363000000 24364204340 2888163520 2889367860
+73092000000 73095613192 24364000000 24365204397 2889163520 2890367917
+73095000000 73098613248 24365000000 24366204416 2890163520 2891367936
+73098000000 73101613394 24366000000 24367204464 2891163520 2892367984
+73101000000 73104613590 24367000000 24368204530 2892163520 2893368050
+73104000000 73107613619 24368000000 24369204539 2893163520 2894368059
+73107000000 73110613925 24369000000 24370204641 2894163520 2895368161
+73110000000 73113614097 24370000000 24371204699 2895163520 2896368219
+73113000000 73116614230 24371000000 24372204743 2896163520 2897368263
+73116000000 73119614347 24372000000 24373204782 2897163520 2898368302
+73119000000 73122614532 24373000000 24374204844 2898163520 2899368364
+73122000000 73125614638 24374000000 24375204879 2899163520 2900368399
+73125000000 73128614819 24375000000 24376204939 2900163520 2901368459
+73128000000 73131615031 24376000000 24377205010 2901163520 2902368530
+73131000000 73134615138 24377000000 24378205046 2902163520 2903368566
+73134000000 73137615304 24378000000 24379205101 2903163520 2904368621
+73137000000 73140214049 24379000000 24380071349 2904163520 2905234869
+73140000000 73143615575 24380000000 24381205191 2905163520 2906368711
+73143000000 73146615687 24381000000 24382205229 2906163520 2907368749
+73146000000 73149615896 24382000000 24383205298 2907163520 2908368818
+73149000000 73152615975 24383000000 24384205325 2908163520 2909368845
+73152000000 73155616200 24384000000 24385205400 2909163520 2910368920
+73155000000 73158616327 24385000000 24386205442 2910163520 2911368962
+73158000000 73161616416 24386000000 24387205472 2911163520 2912368992
+73161000000 73164616522 24387000000 24388205507 2912163520 2913369027
+73164000000 73167616733 24388000000 24389205577 2913163520 2914369097
+73167000000 73170616942 24389000000 24390205647 2914163520 2915369167
+73170000000 73173617087 24390000000 24391205695 2915163520 2916369215
+73173000000 73176617213 24391000000 24392205737 2916163520 2917369257
+73176000000 73179617379 24392000000 24393205793 2917163520 2918369313
+73179000000 73182617459 24393000000 24394205819 2918163520 2919369339
+73182000000 73185617694 24394000000 24395205898 2919163520 2920369418
+73185000000 73188617853 24395000000 24396205951 2920163520 2921369471
+73188000000 73191617974 24396000000 24397205991 2921163520 2922369511
+73191000000 73194618134 24397000000 24398206044 2922163520 2923369564
+73194000000 73197618217 24398000000 24399206072 2923163520 2924369592
+73197000000 73200618463 24399000000 24400206154 2924163520 2925369674
+73200000000 73203618586 24400000000 24401206195 2925163520 2926369715
+73203000000 73206618722 24401000000 24402206240 2926163520 2927369760
+73206000000 73209618897 24402000000 24403206299 2927163520 2928369819
+73209000000 73212619019 24403000000 24404206339 2928163520 2929369859
+73212000000 73215619169 24404000000 24405206389 2929163520 2930369909
+73215000000 73218619317 24405000000 24406206439 2930163520 2931369959
+73218000000 73220793011 24406000000 24406931003 2931163520 2932094523
+73221000000 73224619637 24407000000 24408206545 2932163520 2933370065
+73224000000 73227619769 24408000000 24409206589 2933163520 2934370109
+73227000000 73230619943 24409000000 24410206647 2934163520 2935370167
+73230000000 73233620062 24410000000 24411206687 2935163520 2936370207
+73233000000 73236620186 24411000000 24412206728 2936163520 2937370248
+73236000000 73239620405 24412000000 24413206801 2937163520 2938370321
+73239000000 73242620541 24413000000 24414206847 2938163520 2939370367
+73242000000 73245620692 24414000000 24415206897 2939163520 2940370417
+73245000000 73248620842 24415000000 24416206947 2940163520 2941370467
+73248000000 73251620957 24416000000 24417206985 2941163520 2942370505
+73251000000 73254621054 24417000000 24418207018 2942163520 2943370538
+73254000000 73257621262 24418000000 24419207087 2943163520 2944370607
+73257000000 73260621417 24419000000 24420207139 2944163520 2945370659
+73260000000 73263621576 24420000000 24421207192 2945163520 2946370712
+73263000000 73266621750 24421000000 24422207250 2946163520 2947370770
+73266000000 73269621850 24422000000 24423207283 2947163520 2948370803
+73269000000 73272622028 24423000000 24424207342 2948163520 2949370862
+73272000000 73275622177 24424000000 24425207392 2949163520 2950370912
+73275000000 73278622305 24425000000 24426207435 2950163520 2951370955
+73278000000 73281622474 24426000000 24427207491 2951163520 2952371011
+73281000000 73284622594 24427000000 24428207531 2952163520 2953371051
+73284000000 73286449944 24428000000 24428816648 2953163520 2953980168
+73287000000 73290622844 24429000000 24430207614 2954163520 2955371134
+73290000000 73293623102 24430000000 24431207700 2955163520 2956371220
+73293000000 73296623207 24431000000 24432207735 2956163520 2957371255
+73296000000 73299623287 24432000000 24433207762 2957163520 2958371282
+73299000000 73302623434 24433000000 24434207811 2958163520 2959371331
+73302000000 73305623688 24434000000 24435207896 2959163520 2960371416
+73305000000 73308623778 24435000000 24436207926 2960163520 2961371446
+73308000000 73311624023 24436000000 24437208007 2961163520 2962371527
+73311000000 73314624101 24437000000 24438208033 2962163520 2963371553
+73314000000 73317624278 24438000000 24439208092 2963163520 2964371612
+73317000000 73320624424 24439000000 24440208141 2964163520 2965371661
+73320000000 73323624568 24440000000 24441208189 2965163520 2966371709
+73323000000 73325247222 24441000000 24441749074 2966163520 2966912594
+73326000000 73329624883 24442000000 24443208294 2967163520 2968371814
+73329000000 73332625043 24443000000 24444208347 2968163520 2969371867
+73332000000 73335625180 24444000000 24445208393 2969163520 2970371913
+73335000000 73338625338 24445000000 24446208446 2970163520 2971371966
+73338000000 73341625496 24446000000 24447208498 2971163520 2972372018
+73341000000 73344625610 24447000000 24448208536 2972163520 2973372056
+73344000000 73347625771 24448000000 24449208590 2973163520 2974372110
+73347000000 73350625898 24449000000 24450208632 2974163520 2975372152
+73350000000 73353626007 24450000000 24451208669 2975163520 2976372189
+73353000000 73356626149 24451000000 24452208716 2976163520 2977372236
+73356000000 73359626383 24452000000 24453208794 2977163520 2978372314
+73359000000 73362626296 24453000000 24454208765 2978163520 2979372285
+73362000000 73365626417 24454000000 24455208805 2979163520 2980372325
+73365000000 73368626525 24455000000 24456208841 2980163520 2981372361
+73368000000 73371626760 24456000000 24457208920 2981163520 2982372440
+73371000000 73374626939 24457000000 24458208979 2982163520 2983372499
+73374000000 73377540579 24458000000 24459180193 2983163520 2984343713
+73377000000 73380627208 24459000000 24460209069 2984163520 2985372589
+73380000000 73383627381 24460000000 24461209127 2985163520 2986372647
+73383000000 73386627497 24461000000 24462209165 2986163520 2987372685
+73386000000 73389627670 24462000000 24463209223 2987163520 2988372743
+73389000000 73392627842 24463000000 24464209280 2988163520 2989372800
+73392000000 73395627898 24464000000 24465209299 2989163520 2990372819
+73395000000 73398628044 24465000000 24466209348 2990163520 2991372868
+73398000000 73401628240 24466000000 24467209413 2991163520 2992372933
+73401000000 73404628269 24467000000 24468209423 2992163520 2993372943
+73404000000 73407628575 24468000000 24469209525 2993163520 2994373045
+73407000000 73410628747 24469000000 24470209582 2994163520 2995373102
+73410000000 73413628880 24470000000 24471209626 2995163520 2996373146
+73413000000 73416628997 24471000000 24472209665 2996163520 2997373185
+73416000000 73419629182 24472000000 24473209727 2997163520 2998373247
+73419000000 73422629288 24473000000 24474209762 2998163520 2999373282
+73422000000 73425629469 24474000000 24475209823 2999163520 3000373343
+73425000000 73428629681 24475000000 24476209893 3000163520 3001373413
+73428000000 73431629788 24476000000 24477209929 3001163520 3002373449
+73431000000 73434629954 24477000000 24478209984 3002163520 3003373504
+73434000000 73437228699 24478000000 24479076233 3003163520 3004239753
+73437000000 73440630225 24479000000 24480210075 3004163520 3005373595
+73440000000 73443630337 24480000000 24481210112 3005163520 3006373632
+73443000000 73446630546 24481000000 24482210182 3006163520 3007373702
+73446000000 73449630625 24482000000 24483210208 3007163520 3008373728
+73449000000 73452630850 24483000000 24484210283 3008163520 3009373803
+73452000000 73455630977 24484000000 24485210325 3009163520 3010373845
+73455000000 73458631066 24485000000 24486210355 3010163520 3011373875
+73458000000 73461631172 24486000000 24487210390 3011163520 3012373910
+73461000000 73464631383 24487000000 24488210461 3012163520 3013373981
+73464000000 73467631592 24488000000 24489210530 3013163520 3014374050
+73467000000 73470631737 24489000000 24490210579 3014163520 3015374099
+73470000000 73473631863 24490000000 24491210621 3015163520 3016374141
+73473000000 73476632029 24491000000 24492210676 3016163520 3017374196
+73476000000 73479632109 24492000000 24493210703 3017163520 3018374223
+73479000000 73482632344 24493000000 24494210781 3018163520 3019374301
+73482000000 73485632503 24494000000 24495210834 3019163520 3020374354
+73485000000 73488632624 24495000000 24496210874 3020163520 3021374394
+73488000000 73491632784 24496000000 24497210928 3021163520 3022374448
+73491000000 73494632867 24497000000 24498210955 3022163520 3023374475
+73494000000 73497633113 24498000000 24499211037 3023163520 3024374557
+73497000000 73500633236 24499000000 24500211078 3024163520 3025374598
+73500000000 73503633372 24500000000 24501211124 3025163520 3026374644
+73503000000 73506633547 24501000000 24502211182 3026163520 3027374702
+73506000000 73509633669 24502000000 24503211223 3027163520 3028374743
+73509000000 73512633819 24503000000 24504211273 3028163520 3029374793
+73512000000 73515633967 24504000000 24505211322 3029163520 3030374842
+73515000000 73517807661 24505000000 24505935887 3030163520 3031099407
+73518000000 73521634287 24506000000 24507211429 3031163520 3032374949
+73521000000 73524634419 24507000000 24508211473 3032163520 3033374993
+73524000000 73527634593 24508000000 24509211531 3033163520 3034375051
+73527000000 73530634712 24509000000 24510211570 3034163520 3035375090
+73530000000 73533634836 24510000000 24511211612 3035163520 3036375132
+73533000000 73536635055 24511000000 24512211685 3036163520 3037375205
+73536000000 73539635191 24512000000 24513211730 3037163520 3038375250
+73539000000 73542635342 24513000000 24514211780 3038163520 3039375300
+73542000000 73545635492 24514000000 24515211830 3039163520 3040375350
+73545000000 73548635607 24515000000 24516211869 3040163520 3041375389
+73548000000 73551635704 24516000000 24517211901 3041163520 3042375421
+73551000000 73554635912 24517000000 24518211970 3042163520 3043375490
+73554000000 73557636067 24518000000 24519212022 3043163520 3044375542
+73557000000 73560636226 24519000000 24520212075 3044163520 3045375595
+73560000000 73563636400 24520000000 24521212133 3045163520 3046375653
+73563000000 73566636500 24521000000 24522212166 3046163520 3047375686
+73566000000 73569636678 24522000000 24523212226 3047163520 3048375746
+73569000000 73572636827 24523000000 24524212275 3048163520 3049375795
+73572000000 73575636955 24524000000 24525212318 3049163520 3050375838
+73575000000 73578637124 24525000000 24526212374 3050163520 3051375894
+73578000000 73581637244 24526000000 24527212414 3051163520 3052375934
+73581000000 73583464594 24527000000 24527821531 3052163520 3052985051
+73584000000 73587637494 24528000000 24529212498 3053163520 3054376018
+73587000000 73590637752 24529000000 24530212584 3054163520 3055376104
+73590000000 73593637857 24530000000 24531212619 3055163520 3056376139
+73593000000 73596637937 24531000000 24532212645 3056163520 3057376165
+73596000000 73599638084 24532000000 24533212694 3057163520 3058376214
+73599000000 73602638338 24533000000 24534212779 3058163520 3059376299
+73602000000 73605638428 24534000000 24535212809 3059163520 3060376329
+73605000000 73608638673 24535000000 24536212891 3060163520 3061376411
+73608000000 73611638751 24536000000 24537212917 3061163520 3062376437
+73611000000 73614638928 24537000000 24538212976 3062163520 3063376496
+73614000000 73617639074 24538000000 24539213024 3063163520 3064376544
+73617000000 73620639218 24539000000 24540213072 3064163520 3065376592
+73620000000 73622261872 24540000000 24540753957 3065163520 3065917477
+73623000000 73626639533 24541000000 24542213177 3066163520 3067376697
+73626000000 73629639693 24542000000 24543213231 3067163520 3068376751
+73629000000 73632639830 24543000000 24544213276 3068163520 3069376796
+73632000000 73635639988 24544000000 24545213329 3069163520 3070376849
+73635000000 73638640146 24545000000 24546213382 3070163520 3071376902
+73638000000 73641640260 24546000000 24547213420 3071163520 3072376940
+73641000000 73644640421 24547000000 24548213473 3072163520 3073376993
+73644000000 73647640548 24548000000 24549213516 3073163520 3074377036
+73647000000 73650640657 24549000000 24550213552 3074163520 3075377072
+73650000000 73653640799 24550000000 24551213599 3075163520 3076377119
+73653000000 73656641033 24551000000 24552213677 3076163520 3077377197
+73656000000 73659640946 24552000000 24553213648 3077163520 3078377168
+73659000000 73662641067 24553000000 24554213689 3078163520 3079377209
+73662000000 73665641175 24554000000 24555213725 3079163520 3080377245
+73665000000 73668641410 24555000000 24556213803 3080163520 3081377323
+73668000000 73671641589 24556000000 24557213863 3081163520 3082377383
+73671000000 73674555229 24557000000 24558185076 3082163520 3083348596
+73674000000 73677641858 24558000000 24559213952 3083163520 3084377472
+73677000000 73680642031 24559000000 24560214010 3084163520 3085377530
+73680000000 73683642147 24560000000 24561214049 3085163520 3086377569
+73683000000 73686642320 24561000000 24562214106 3086163520 3087377626
+73686000000 73689642492 24562000000 24563214164 3087163520 3088377684
+73689000000 73692642548 24563000000 24564214182 3088163520 3089377702
+73692000000 73695642694 24564000000 24565214231 3089163520 3090377751
+73695000000 73698642890 24565000000 24566214296 3090163520 3091377816
+73698000000 73701642919 24566000000 24567214306 3091163520 3092377826
+73701000000 73704643225 24567000000 24568214408 3092163520 3093377928
+73704000000 73707643397 24568000000 24569214465 3093163520 3094377985
+73707000000 73710643530 24569000000 24570214510 3094163520 3095378030
+73710000000 73713643647 24570000000 24571214549 3095163520 3096378069
+73713000000 73716643832 24571000000 24572214610 3096163520 3097378130
+73716000000 73719643938 24572000000 24573214646 3097163520 3098378166
+73719000000 73722644119 24573000000 24574214706 3098163520 3099378226
+73722000000 73725644331 24574000000 24575214777 3099163520 3100378297
+73725000000 73728644438 24575000000 24576214812 3100163520 3101378332
+73728000000 73731644604 24576000000 24577214868 3101163520 3102378388
+73731000000 73734243349 24577000000 24578081116 3102163520 3103244636
+73734000000 73737644875 24578000000 24579214958 3103163520 3104378478
+73737000000 73740644987 24579000000 24580214995 3104163520 3105378515
+73740000000 73743645196 24580000000 24581215065 3105163520 3106378585
+73743000000 73746645275 24581000000 24582215091 3106163520 3107378611
+73746000000 73749645500 24582000000 24583215166 3107163520 3108378686
+73749000000 73752645627 24583000000 24584215209 3108163520 3109378729
+73752000000 73755645716 24584000000 24585215238 3109163520 3110378758
+73755000000 73758645822 24585000000 24586215274 3110163520 3111378794
+73758000000 73761646033 24586000000 24587215344 3111163520 3112378864
+73761000000 73764646242 24587000000 24588215414 3112163520 3113378934
+73764000000 73767646387 24588000000 24589215462 3113163520 3114378982
+73767000000 73770646513 24589000000 24590215504 3114163520 3115379024
+73770000000 73773646679 24590000000 24591215559 3115163520 3116379079
+73773000000 73776646759 24591000000 24592215586 3116163520 3117379106
+73776000000 73779646994 24592000000 24593215664 3117163520 3118379184
+73779000000 73782647153 24593000000 24594215717 3118163520 3119379237
+73782000000 73785647274 24594000000 24595215758 3119163520 3120379278
+73785000000 73788647434 24595000000 24596215811 3120163520 3121379331
+73788000000 73791647517 24596000000 24597215839 3121163520 3122379359
+73791000000 73794647763 24597000000 24598215921 3122163520 3123379441
+73794000000 73797647886 24598000000 24599215962 3123163520 3124379482
+73797000000 73800648022 24599000000 24600216007 3124163520 3125379527
+73800000000 73803648197 24600000000 24601216065 3125163520 3126379585
+73803000000 73806648319 24601000000 24602216106 3126163520 3127379626
+73806000000 73809648469 24602000000 24603216156 3127163520 3128379676
+73809000000 73812648617 24603000000 24604216205 3128163520 3129379725
+73812000000 73814822311 24604000000 24604940770 3129163520 3130104290
+73815000000 73818648937 24605000000 24606216312 3130163520 3131379832
+73818000000 73821649069 24606000000 24607216356 3131163520 3132379876
+73821000000 73824649243 24607000000 24608216414 3132163520 3133379934
+73824000000 73827649362 24608000000 24609216454 3133163520 3134379974
+73827000000 73830649486 24609000000 24610216495 3134163520 3135380015
+73830000000 73833649705 24610000000 24611216568 3135163520 3136380088
+73833000000 73836649841 24611000000 24612216613 3136163520 3137380133
+73836000000 73839649992 24612000000 24613216664 3137163520 3138380184
+73839000000 73842650142 24613000000 24614216714 3138163520 3139380234
+73842000000 73845650257 24614000000 24615216752 3139163520 3140380272
+73845000000 73848650354 24615000000 24616216784 3140163520 3141380304
+73848000000 73851650562 24616000000 24617216854 3141163520 3142380374
+73851000000 73854650717 24617000000 24618216905 3142163520 3143380425
+73854000000 73857650876 24618000000 24619216958 3143163520 3144380478
+73857000000 73860651050 24619000000 24620217016 3144163520 3145380536
+73860000000 73863651150 24620000000 24621217050 3145163520 3146380570
+73863000000 73866651328 24621000000 24622217109 3146163520 3147380629
+73866000000 73869651477 24622000000 24623217159 3147163520 3148380679
+73869000000 73872651605 24623000000 24624217201 3148163520 3149380721
+73872000000 73875651774 24624000000 24625217258 3149163520 3150380778
+73875000000 73878651894 24625000000 24626217298 3150163520 3151380818
+73878000000 73880479244 24626000000 24626826414 3151163520 3151989934
+73881000000 73884652144 24627000000 24628217381 3152163520 3153380901
+73884000000 73887652402 24628000000 24629217467 3153163520 3154380987
+73887000000 73890652507 24629000000 24630217502 3154163520 3155381022
+73890000000 73893652587 24630000000 24631217529 3155163520 3156381049
+73893000000 73896652734 24631000000 24632217578 3156163520 3157381098
+73896000000 73899652988 24632000000 24633217662 3157163520 3158381182
+73899000000 73902653078 24633000000 24634217692 3158163520 3159381212
+73902000000 73905653323 24634000000 24635217774 3159163520 3160381294
+73905000000 73908653401 24635000000 24636217800 3160163520 3161381320
+73908000000 73911653578 24636000000 24637217859 3161163520 3162381379
+73911000000 73914653724 24637000000 24638217908 3162163520 3163381428
+73914000000 73917653868 24638000000 24639217956 3163163520 3164381476
+73917000000 73919276522 24639000000 24639758840 3164163520 3164922360
+73920000000 73923654183 24640000000 24641218061 3165163520 3166381581
+73923000000 73926654343 24641000000 24642218114 3166163520 3167381634
+73926000000 73929654480 24642000000 24643218160 3167163520 3168381680
+73929000000 73932654638 24643000000 24644218212 3168163520 3169381732
+73932000000 73935654796 24644000000 24645218265 3169163520 3170381785
+73935000000 73938654910 24645000000 24646218303 3170163520 3171381823
+73938000000 73941655071 24646000000 24647218357 3171163520 3172381877
+73941000000 73944655198 24647000000 24648218399 3172163520 3173381919
+73944000000 73947655307 24648000000 24649218435 3173163520 3174381955
+73947000000 73950655449 24649000000 24650218483 3174163520 3175382003
+73950000000 73953655683 24650000000 24651218561 3175163520 3176382081
+73953000000 73956655596 24651000000 24652218532 3176163520 3177382052
+73956000000 73959655717 24652000000 24653218572 3177163520 3178382092
+73959000000 73962655825 24653000000 24654218608 3178163520 3179382128
+73962000000 73965656060 24654000000 24655218686 3179163520 3180382206
+73965000000 73968656239 24655000000 24656218746 3180163520 3181382266
+73968000000 73971569879 24656000000 24657189959 3181163520 3182353479
+73971000000 73974656508 24657000000 24658218836 3182163520 3183382356
+73974000000 73977656681 24658000000 24659218893 3183163520 3184382413
+73977000000 73980656797 24659000000 24660218932 3184163520 3185382452
+73980000000 73983656970 24660000000 24661218990 3185163520 3186382510
+73983000000 73986657142 24661000000 24662219047 3186163520 3187382567
+73986000000 73989657198 24662000000 24663219066 3187163520 3188382586
+73989000000 73992657344 24663000000 24664219114 3188163520 3189382634
+73992000000 73995657540 24664000000 24665219180 3189163520 3190382700
+73995000000 73998657569 24665000000 24666219189 3190163520 3191382709
+73998000000 74001657875 24666000000 24667219291 3191163520 3192382811
+74001000000 74004658047 24667000000 24668219349 3192163520 3193382869
+74004000000 74007658180 24668000000 24669219393 3193163520 3194382913
+74007000000 74010658297 24669000000 24670219432 3194163520 3195382952
+74010000000 74013658482 24670000000 24671219494 3195163520 3196383014
+74013000000 74016658588 24671000000 24672219529 3196163520 3197383049
+74016000000 74019658769 24672000000 24673219589 3197163520 3198383109
+74019000000 74022658981 24673000000 24674219660 3198163520 3199383180
+74022000000 74025659088 24674000000 24675219696 3199163520 3200383216
+74025000000 74028659254 24675000000 24676219751 3200163520 3201383271
+74028000000 74031257999 24676000000 24677085999 3201163520 3202249519
+74031000000 74034659525 24677000000 24678219841 3202163520 3203383361
+74034000000 74037659637 24678000000 24679219879 3203163520 3204383399
+74037000000 74040659846 24679000000 24680219948 3204163520 3205383468
+74040000000 74043659925 24680000000 24681219975 3205163520 3206383495
+74043000000 74046660150 24681000000 24682220050 3206163520 3207383570
+74046000000 74049660277 24682000000 24683220092 3207163520 3208383612
+74049000000 74052660366 24683000000 24684220122 3208163520 3209383642
+74052000000 74055660472 24684000000 24685220157 3209163520 3210383677
+74055000000 74058660683 24685000000 24686220227 3210163520 3211383747
+74058000000 74061660892 24686000000 24687220297 3211163520 3212383817
+74061000000 74064661037 24687000000 24688220345 3212163520 3213383865
+74064000000 74067661163 24688000000 24689220387 3213163520 3214383907
+74067000000 74070661329 24689000000 24690220443 3214163520 3215383963
+74070000000 74073661409 24690000000 24691220469 3215163520 3216383989
+74073000000 74076661644 24691000000 24692220548 3216163520 3217384068
+74076000000 74079661803 24692000000 24693220601 3217163520 3218384121
+74079000000 74082661924 24693000000 24694220641 3218163520 3219384161
+74082000000 74085662084 24694000000 24695220694 3219163520 3220384214
+74085000000 74088662167 24695000000 24696220722 3220163520 3221384242
+74088000000 74091662413 24696000000 24697220804 3221163520 3222384324
+74091000000 74094662536 24697000000 24698220845 3222163520 3223384365
+74094000000 74097662672 24698000000 24699220890 3223163520 3224384410
+74097000000 74100662847 24699000000 24700220949 3224163520 3225384469
+74100000000 74103662969 24700000000 24701220989 3225163520 3226384509
+74103000000 74106663119 24701000000 24702221039 3226163520 3227384559
+74106000000 74109663267 24702000000 24703221089 3227163520 3228384609
+74109000000 74111836961 24703000000 24703945653 3228163520 3229109173
+74112000000 74115663587 24704000000 24705221195 3229163520 3230384715
+74115000000 74118663719 24705000000 24706221239 3230163520 3231384759
+74118000000 74121663893 24706000000 24707221297 3231163520 3232384817
+74121000000 74124664012 24707000000 24708221337 3232163520 3233384857
+74124000000 74127664136 24708000000 24709221378 3233163520 3234384898
+74127000000 74130664355 24709000000 24710221451 3234163520 3235384971
+74130000000 74133664491 24710000000 24711221497 3235163520 3236385017
+74133000000 74136664642 24711000000 24712221547 3236163520 3237385067
+74136000000 74139664792 24712000000 24713221597 3237163520 3238385117
+74139000000 74142664907 24713000000 24714221635 3238163520 3239385155
+74142000000 74145665004 24714000000 24715221668 3239163520 3240385188
+74145000000 74148665212 24715000000 24716221737 3240163520 3241385257
+74148000000 74151665367 24716000000 24717221789 3241163520 3242385309
+74151000000 74154665526 24717000000 24718221842 3242163520 3243385362
+74154000000 74157665700 24718000000 24719221900 3243163520 3244385420
+74157000000 74160665800 24719000000 24720221933 3244163520 3245385453
+74160000000 74163665978 24720000000 24721221992 3245163520 3246385512
+74163000000 74166666127 24721000000 24722222042 3246163520 3247385562
+74166000000 74169666255 24722000000 24723222085 3247163520 3248385605
+74169000000 74172666424 24723000000 24724222141 3248163520 3249385661
+74172000000 74175666544 24724000000 24725222181 3249163520 3250385701
+74175000000 74177493894 24725000000 24725831298 3250163520 3250994818
+74178000000 74181666794 24726000000 24727222264 3251163520 3252385784
+74181000000 74184667052 24727000000 24728222350 3252163520 3253385870
+74184000000 74187667157 24728000000 24729222385 3253163520 3254385905
+74187000000 74190667237 24729000000 24730222412 3254163520 3255385932
+74190000000 74193667384 24730000000 24731222461 3255163520 3256385981
+74193000000 74196667638 24731000000 24732222546 3256163520 3257386066
+74196000000 74199667728 24732000000 24733222576 3257163520 3258386096
+74199000000 74202667973 24733000000 24734222657 3258163520 3259386177
+74202000000 74205668051 24734000000 24735222683 3259163520 3260386203
+74205000000 74208668228 24735000000 24736222742 3260163520 3261386262
+74208000000 74211668374 24736000000 24737222791 3261163520 3262386311
+74211000000 74214668518 24737000000 24738222839 3262163520 3263386359
+74214000000 74216291172 24738000000 24738763724 3263163520 3263927244
+74217000000 74220668833 24739000000 24740222944 3264163520 3265386464
+74220000000 74223668993 24740000000 24741222997 3265163520 3266386517
+74223000000 74226669130 24741000000 24742223043 3266163520 3267386563
+74226000000 74229669288 24742000000 24743223096 3267163520 3268386616
+74229000000 74232669446 24743000000 24744223148 3268163520 3269386668
+74232000000 74235669560 24744000000 24745223186 3269163520 3270386706
+74235000000 74238669721 24745000000 24746223240 3270163520 3271386760
+74238000000 74241669848 24746000000 24747223282 3271163520 3272386802
+74241000000 74244669957 24747000000 24748223319 3272163520 3273386839
+74244000000 74247670099 24748000000 24749223366 3273163520 3274386886
+74247000000 74250670333 24749000000 24750223444 3274163520 3275386964
+74250000000 74253670246 24750000000 24751223415 3275163520 3276386935
+74253000000 74256670367 24751000000 24752223455 3276163520 3277386975
+74256000000 74259670475 24752000000 24753223491 3277163520 3278387011
+74259000000 74262670710 24753000000 24754223570 3278163520 3279387090
+74262000000 74265670889 24754000000 24755223629 3279163520 3280387149
+74265000000 74268584529 24755000000 24756194843 3280163520 3281358363
+74268000000 74271671158 24756000000 24757223719 3281163520 3282387239
+74271000000 74274671331 24757000000 24758223777 3282163520 3283387297
+74274000000 74277671447 24758000000 24759223815 3283163520 3284387335
+74277000000 74280671620 24759000000 24760223873 3284163520 3285387393
+74280000000 74283671792 24760000000 24761223930 3285163520 3286387450
+74283000000 74286671848 24761000000 24762223949 3286163520 3287387469
+74286000000 74289671994 24762000000 24763223998 3287163520 3288387518
+74289000000 74292672190 24763000000 24764224063 3288163520 3289387583
+74292000000 74295672219 24764000000 24765224073 3289163520 3290387593
+74295000000 74298672525 24765000000 24766224175 3290163520 3291387695
+74298000000 74301672697 24766000000 24767224232 3291163520 3292387752
+74301000000 74304672830 24767000000 24768224276 3292163520 3293387796
+74304000000 74307672947 24768000000 24769224315 3293163520 3294387835
+74307000000 74310673132 24769000000 24770224377 3294163520 3295387897
+74310000000 74313673238 24770000000 24771224412 3295163520 3296387932
+74313000000 74316673419 24771000000 24772224473 3296163520 3297387993
+74316000000 74319673631 24772000000 24773224543 3297163520 3298388063
+74319000000 74322673738 24773000000 24774224579 3298163520 3299388099
+74322000000 74325673904 24774000000 24775224634 3299163520 3300388154
+74325000000 74328272649 24775000000 24776090883 3300163520 3301254403
+74328000000 74331674175 24776000000 24777224725 3301163520 3302388245
+74331000000 74334674287 24777000000 24778224762 3302163520 3303388282
+74334000000 74337674496 24778000000 24779224832 3303163520 3304388352
+74337000000 74340674575 24779000000 24780224858 3304163520 3305388378
+74340000000 74343674800 24780000000 24781224933 3305163520 3306388453
+74343000000 74346674927 24781000000 24782224975 3306163520 3307388495
+74346000000 74349675016 24782000000 24783225005 3307163520 3308388525
+74349000000 74352675122 24783000000 24784225040 3308163520 3309388560
+74352000000 74355675333 24784000000 24785225111 3309163520 3310388631
+74355000000 74358675542 24785000000 24786225180 3310163520 3311388700
+74358000000 74361675687 24786000000 24787225229 3311163520 3312388749
+74361000000 74364675813 24787000000 24788225271 3312163520 3313388791
+74364000000 74367675979 24788000000 24789225326 3313163520 3314388846
+74367000000 74370676059 24789000000 24790225353 3314163520 3315388873
+74370000000 74373676294 24790000000 24791225431 3315163520 3316388951
+74373000000 74376676453 24791000000 24792225484 3316163520 3317389004
+74376000000 74379676574 24792000000 24793225524 3317163520 3318389044
+74379000000 74382676734 24793000000 24794225578 3318163520 3319389098
+74382000000 74385676817 24794000000 24795225605 3319163520 3320389125
+74385000000 74388677063 24795000000 24796225687 3320163520 3321389207
+74388000000 74391677186 24796000000 24797225728 3321163520 3322389248
+74391000000 74394677322 24797000000 24798225774 3322163520 3323389294
+74394000000 74397677497 24798000000 24799225832 3323163520 3324389352
+74397000000 74400677619 24799000000 24800225873 3324163520 3325389393
+74400000000 74403677769 24800000000 24801225923 3325163520 3326389443
+74403000000 74406677917 24801000000 24802225972 3326163520 3327389492
+74406000000 74408851611 24802000000 24802950537 3327163520 3328114057
+74409000000 74412678237 24803000000 24804226079 3328163520 3329389599
+74412000000 74415678369 24804000000 24805226123 3329163520 3330389643
+74415000000 74418678543 24805000000 24806226181 3330163520 3331389701
+74418000000 74421678662 24806000000 24807226220 3331163520 3332389740
+74421000000 74424678786 24807000000 24808226262 3332163520 3333389782
+74424000000 74427679005 24808000000 24809226335 3333163520 3334389855
+74427000000 74430679141 24809000000 24810226380 3334163520 3335389900
+74430000000 74433679292 24810000000 24811226430 3335163520 3336389950
+74433000000 74436679442 24811000000 24812226480 3336163520 3337390000
+74436000000 74439679557 24812000000 24813226519 3337163520 3338390039
+74439000000 74442679654 24813000000 24814226551 3338163520 3339390071
+74442000000 74445679862 24814000000 24815226620 3339163520 3340390140
+74445000000 74448680017 24815000000 24816226672 3340163520 3341390192
+74448000000 74451680176 24816000000 24817226725 3341163520 3342390245
+74451000000 74454680350 24817000000 24818226783 3342163520 3343390303
+74454000000 74457680450 24818000000 24819226816 3343163520 3344390336
+74457000000 74460680628 24819000000 24820226876 3344163520 3345390396
+74460000000 74463680777 24820000000 24821226925 3345163520 3346390445
+74463000000 74466680905 24821000000 24822226968 3346163520 3347390488
+74466000000 74469681074 24822000000 24823227024 3347163520 3348390544
+74469000000 74472681194 24823000000 24824227064 3348163520 3349390584
+74472000000 74474508544 24824000000 24824836181 3349163520 3349999701
+74475000000 74478681444 24825000000 24826227148 3350163520 3351390668
+74478000000 74481681702 24826000000 24827227234 3351163520 3352390754
+74481000000 74484681807 24827000000 24828227269 3352163520 3353390789
+74484000000 74487681887 24828000000 24829227295 3353163520 3354390815
+74487000000 74490682034 24829000000 24830227344 3354163520 3355390864
+74490000000 74493682288 24830000000 24831227429 3355163520 3356390949
+74493000000 74496682378 24831000000 24832227459 3356163520 3357390979
+74496000000 74499682623 24832000000 24833227541 3357163520 3358391061
+74499000000 74502682701 24833000000 24834227567 3358163520 3359391087
+74502000000 74505682878 24834000000 24835227626 3359163520 3360391146
+74505000000 74508683024 24835000000 24836227674 3360163520 3361391194
+74508000000 74511683168 24836000000 24837227722 3361163520 3362391242
+74511000000 74513305822 24837000000 24837768607 3362163520 3362932127
+74514000000 74517683483 24838000000 24839227827 3363163520 3364391347
+74517000000 74520683643 24839000000 24840227881 3364163520 3365391401
+74520000000 74523683780 24840000000 24841227926 3365163520 3366391446
+74523000000 74526683938 24841000000 24842227979 3366163520 3367391499
+74526000000 74529684096 24842000000 24843228032 3367163520 3368391552
+74529000000 74532684210 24843000000 24844228070 3368163520 3369391590
+74532000000 74535684371 24844000000 24845228123 3369163520 3370391643
+74535000000 74538684498 24845000000 24846228166 3370163520 3371391686
+74538000000 74541684607 24846000000 24847228202 3371163520 3372391722
+74541000000 74544684749 24847000000 24848228249 3372163520 3373391769
+74544000000 74547684983 24848000000 24849228327 3373163520 3374391847
+74547000000 74550684896 24849000000 24850228298 3374163520 3375391818
+74550000000 74553685017 24850000000 24851228339 3375163520 3376391859
+74553000000 74556685125 24851000000 24852228375 3376163520 3377391895
+74556000000 74559685360 24852000000 24853228453 3377163520 3378391973
+74559000000 74562685539 24853000000 24854228513 3378163520 3379392033
+74562000000 74565599179 24854000000 24855199726 3379163520 3380363246
+74565000000 74568685808 24855000000 24856228602 3380163520 3381392122
+74568000000 74571685981 24856000000 24857228660 3381163520 3382392180
+74571000000 74574686097 24857000000 24858228699 3382163520 3383392219
+74574000000 74577686270 24858000000 24859228756 3383163520 3384392276
+74577000000 74580686442 24859000000 24860228814 3384163520 3385392334
+74580000000 74583686498 24860000000 24861228832 3385163520 3386392352
+74583000000 74586686644 24861000000 24862228881 3386163520 3387392401
+74586000000 74589686840 24862000000 24863228946 3387163520 3388392466
+74589000000 74592686869 24863000000 24864228956 3388163520 3389392476
+74592000000 74595687175 24864000000 24865229058 3389163520 3390392578
+74595000000 74598687347 24865000000 24866229115 3390163520 3391392635
+74598000000 74601687480 24866000000 24867229160 3391163520 3392392680
+74601000000 74604687597 24867000000 24868229199 3392163520 3393392719
+74604000000 74607687782 24868000000 24869229260 3393163520 3394392780
+74607000000 74610687888 24869000000 24870229296 3394163520 3395392816
+74610000000 74613688069 24870000000 24871229356 3395163520 3396392876
+74613000000 74616688281 24871000000 24872229427 3396163520 3397392947
+74616000000 74619688388 24872000000 24873229462 3397163520 3398392982
+74619000000 74622688554 24873000000 24874229518 3398163520 3399393038
+74622000000 74625287299 24874000000 24875095766 3399163520 3400259286
+74625000000 74628688825 24875000000 24876229608 3400163520 3401393128
+74628000000 74631688937 24876000000 24877229645 3401163520 3402393165
+74631000000 74634689146 24877000000 24878229715 3402163520 3403393235
+74634000000 74637689225 24878000000 24879229741 3403163520 3404393261
+74637000000 74640689450 24879000000 24880229816 3404163520 3405393336
+74640000000 74643689577 24880000000 24881229859 3405163520 3406393379
+74643000000 74646689666 24881000000 24882229888 3406163520 3407393408
+74646000000 74649689772 24882000000 24883229924 3407163520 3408393444
+74649000000 74652689983 24883000000 24884229994 3408163520 3409393514
+74652000000 74655690192 24884000000 24885230064 3409163520 3410393584
+74655000000 74658690337 24885000000 24886230112 3410163520 3411393632
+74658000000 74661690463 24886000000 24887230154 3411163520 3412393674
+74661000000 74664690629 24887000000 24888230209 3412163520 3413393729
+74664000000 74667690709 24888000000 24889230236 3413163520 3414393756
+74667000000 74670690944 24889000000 24890230314 3414163520 3415393834
+74670000000 74673691103 24890000000 24891230367 3415163520 3416393887
+74673000000 74676691224 24891000000 24892230408 3416163520 3417393928
+74676000000 74679691384 24892000000 24893230461 3417163520 3418393981
+74679000000 74682691467 24893000000 24894230489 3418163520 3419394009
+74682000000 74685691713 24894000000 24895230571 3419163520 3420394091
+74685000000 74688691836 24895000000 24896230612 3420163520 3421394132
+74688000000 74691691972 24896000000 24897230657 3421163520 3422394177
+74691000000 74694692147 24897000000 24898230715 3422163520 3423394235
+74694000000 74697692269 24898000000 24899230756 3423163520 3424394276
+74697000000 74700692419 24899000000 24900230806 3424163520 3425394326
+74700000000 74703692567 24900000000 24901230855 3425163520 3426394375
+74703000000 74705866261 24901000000 24901955420 3426163520 3427118940
+74706000000 74709692887 24902000000 24903230962 3427163520 3428394482
+74709000000 74712693019 24903000000 24904231006 3428163520 3429394526
+74712000000 74715693193 24904000000 24905231064 3429163520 3430394584
+74715000000 74718693312 24905000000 24906231104 3430163520 3431394624
+74718000000 74721693436 24906000000 24907231145 3431163520 3432394665
+74721000000 74724693655 24907000000 24908231218 3432163520 3433394738
+74724000000 74727693791 24908000000 24909231263 3433163520 3434394783
+74727000000 74730693942 24909000000 24910231314 3434163520 3435394834
+74730000000 74733694092 24910000000 24911231364 3435163520 3436394884
+74733000000 74736694207 24911000000 24912231402 3436163520 3437394922
+74736000000 74739694304 24912000000 24913231434 3437163520 3438394954
+74739000000 74742694512 24913000000 24914231504 3438163520 3439395024
+74742000000 74745694667 24914000000 24915231555 3439163520 3440395075
+74745000000 74748694826 24915000000 24916231608 3440163520 3441395128
+74748000000 74751695000 24916000000 24917231666 3441163520 3442395186
+74751000000 74754695100 24917000000 24918231700 3442163520 3443395220
+74754000000 74757695278 24918000000 24919231759 3443163520 3444395279
+74757000000 74760695427 24919000000 24920231809 3444163520 3445395329
+74760000000 74763695555 24920000000 24921231851 3445163520 3446395371
+74763000000 74766695724 24921000000 24922231908 3446163520 3447395428
+74766000000 74769695844 24922000000 24923231948 3447163520 3448395468
+74769000000 74771523194 24923000000 24923841064 3448163520 3449004584
+74772000000 74775696094 24924000000 24925232031 3449163520 3450395551
+74775000000 74778696352 24925000000 24926232117 3450163520 3451395637
+74778000000 74781696457 24926000000 24927232152 3451163520 3452395672
+74781000000 74784696537 24927000000 24928232179 3452163520 3453395699
+74784000000 74787696684 24928000000 24929232228 3453163520 3454395748
+74787000000 74790696938 24929000000 24930232312 3454163520 3455395832
+74790000000 74793697028 24930000000 24931232342 3455163520 3456395862
+74793000000 74796697273 24931000000 24932232424 3456163520 3457395944
+74796000000 74799697351 24932000000 24933232450 3457163520 3458395970
+74799000000 74802697528 24933000000 24934232509 3458163520 3459396029
+74802000000 74805697674 24934000000 24935232558 3459163520 3460396078
+74805000000 74808697818 24935000000 24936232606 3460163520 3461396126
+74808000000 74810320472 24936000000 24936773490 3461163520 3461937010
+74811000000 74814698133 24937000000 24938232711 3462163520 3463396231
+74814000000 74817698293 24938000000 24939232764 3463163520 3464396284
+74817000000 74820698430 24939000000 24940232810 3464163520 3465396330
+74820000000 74823698588 24940000000 24941232862 3465163520 3466396382
+74823000000 74826698746 24941000000 24942232915 3466163520 3467396435
+74826000000 74829698860 24942000000 24943232953 3467163520 3468396473
+74829000000 74832699021 24943000000 24944233007 3468163520 3469396527
+74832000000 74835699148 24944000000 24945233049 3469163520 3470396569
+74835000000 74838699257 24945000000 24946233085 3470163520 3471396605
+74838000000 74841699399 24946000000 24947233133 3471163520 3472396653
+74841000000 74844699633 24947000000 24948233211 3472163520 3473396731
+74844000000 74847699546 24948000000 24949233182 3473163520 3474396702
+74847000000 74850699667 24949000000 24950233222 3474163520 3475396742
+74850000000 74853699775 24950000000 24951233258 3475163520 3476396778
+74853000000 74856700010 24951000000 24952233336 3476163520 3477396856
+74856000000 74859700189 24952000000 24953233396 3477163520 3478396916
+74859000000 74862613829 24953000000 24954204609 3478163520 3479368129
+74862000000 74865700458 24954000000 24955233486 3479163520 3480397006
+74865000000 74868700631 24955000000 24956233543 3480163520 3481397063
+74868000000 74871700747 24956000000 24957233582 3481163520 3482397102
+74871000000 74874700920 24957000000 24958233640 3482163520 3483397160
+74874000000 74877701092 24958000000 24959233697 3483163520 3484397217
+74877000000 74880701148 24959000000 24960233716 3484163520 3485397236
+74880000000 74883701294 24960000000 24961233764 3485163520 3486397284
+74883000000 74886701490 24961000000 24962233830 3486163520 3487397350
+74886000000 74889701519 24962000000 24963233839 3487163520 3488397359
+74889000000 74892701825 24963000000 24964233941 3488163520 3489397461
+74892000000 74895701997 24964000000 24965233999 3489163520 3490397519
+74895000000 74898702130 24965000000 24966234043 3490163520 3491397563
+74898000000 74901702247 24966000000 24967234082 3491163520 3492397602
+74901000000 74904702432 24967000000 24968234144 3492163520 3493397664
+74904000000 74907702538 24968000000 24969234179 3493163520 3494397699
+74907000000 74910702719 24969000000 24970234239 3494163520 3495397759
+74910000000 74913702931 24970000000 24971234310 3495163520 3496397830
+74913000000 74916703038 24971000000 24972234346 3496163520 3497397866
+74916000000 74919703204 24972000000 24973234401 3497163520 3498397921
+74919000000 74922301949 24973000000 24974100649 3498163520 3499264169
+74922000000 74925703475 24974000000 24975234491 3499163520 3500398011
+74925000000 74928703587 24975000000 24976234529 3500163520 3501398049
+74928000000 74931703796 24976000000 24977234598 3501163520 3502398118
+74931000000 74934703875 24977000000 24978234625 3502163520 3503398145
+74934000000 74937704100 24978000000 24979234700 3503163520 3504398220
+74937000000 74940704227 24979000000 24980234742 3504163520 3505398262
+74940000000 74943704316 24980000000 24981234772 3505163520 3506398292
+74943000000 74946704422 24981000000 24982234807 3506163520 3507398327
+74946000000 74949704633 24982000000 24983234877 3507163520 3508398397
+74949000000 74952704842 24983000000 24984234947 3508163520 3509398467
+74952000000 74955704987 24984000000 24985234995 3509163520 3510398515
+74955000000 74958705113 24985000000 24986235037 3510163520 3511398557
+74958000000 74961705279 24986000000 24987235093 3511163520 3512398613
+74961000000 74964705359 24987000000 24988235119 3512163520 3513398639
+74964000000 74967705594 24988000000 24989235198 3513163520 3514398718
+74967000000 74970705753 24989000000 24990235251 3514163520 3515398771
+74970000000 74973705874 24990000000 24991235291 3515163520 3516398811
+74973000000 74976706034 24991000000 24992235344 3516163520 3517398864
+74976000000 74979706117 24992000000 24993235372 3517163520 3518398892
+74979000000 74982706363 24993000000 24994235454 3518163520 3519398974
+74982000000 74985706486 24994000000 24995235495 3519163520 3520399015
+74985000000 74988706622 24995000000 24996235540 3520163520 3521399060
+74988000000 74991706797 24996000000 24997235599 3521163520 3522399119
+74991000000 74994706919 24997000000 24998235639 3522163520 3523399159
+74994000000 74997707069 24998000000 24999235689 3523163520 3524399209
+74997000000 75000707217 24999000000 25000235739 3524163520 3525399259
+75000000000 75002880911 25000000000 25000960303 3525163520 3526123823
+75003000000 75006707537 25001000000 25002235845 3526163520 3527399365
+75006000000 75009707669 25002000000 25003235889 3527163520 3528399409
+75009000000 75012707843 25003000000 25004235947 3528163520 3529399467
+75012000000 75015707962 25004000000 25005235987 3529163520 3530399507
+75015000000 75018708086 25005000000 25006236028 3530163520 3531399548
+75018000000 75021708305 25006000000 25007236101 3531163520 3532399621
+75021000000 75024708441 25007000000 25008236147 3532163520 3533399667
+75024000000 75027708592 25008000000 25009236197 3533163520 3534399717
+75027000000 75030708742 25009000000 25010236247 3534163520 3535399767
+75030000000 75033708857 25010000000 25011236285 3535163520 3536399805
+75033000000 75036708954 25011000000 25012236318 3536163520 3537399838
+75036000000 75039709162 25012000000 25013236387 3537163520 3538399907
+75039000000 75042709317 25013000000 25014236439 3538163520 3539399959
+75042000000 75045709476 25014000000 25015236492 3539163520 3540400012
+75045000000 75048709650 25015000000 25016236550 3540163520 3541400070
+75048000000 75051709750 25016000000 25017236583 3541163520 3542400103
+75051000000 75054709928 25017000000 25018236642 3542163520 3543400162
+75054000000 75057710077 25018000000 25019236692 3543163520 3544400212
+75057000000 75060710205 25019000000 25020236735 3544163520 3545400255
+75060000000 75063710374 25020000000 25021236791 3545163520 3546400311
+75063000000 75066710494 25021000000 25022236831 3546163520 3547400351
+75066000000 75068537844 25022000000 25022845948 3547163520 3548009468
+75069000000 75072710744 25023000000 25024236914 3548163520 3549400434
+75072000000 75075711002 25024000000 25025237000 3549163520 3550400520
+75075000000 75078711107 25025000000 25026237035 3550163520 3551400555
+75078000000 75081711187 25026000000 25027237062 3551163520 3552400582
+75081000000 75084711334 25027000000 25028237111 3552163520 3553400631
+75084000000 75087711588 25028000000 25029237196 3553163520 3554400716
+75087000000 75090711678 25029000000 25030237226 3554163520 3555400746
+75090000000 75093711923 25030000000 25031237307 3555163520 3556400827
+75093000000 75096712001 25031000000 25032237333 3556163520 3557400853
+75096000000 75099712178 25032000000 25033237392 3557163520 3558400912
+75099000000 75102712324 25033000000 25034237441 3558163520 3559400961
+75102000000 75105712468 25034000000 25035237489 3559163520 3560401009
+75105000000 75107335122 25035000000 25035778374 3560163520 3560941894
+75108000000 75111712783 25036000000 25037237594 3561163520 3562401114
+75111000000 75114712943 25037000000 25038237647 3562163520 3563401167
+75114000000 75117713080 25038000000 25039237693 3563163520 3564401213
+75117000000 75120713238 25039000000 25040237746 3564163520 3565401266
+75120000000 75123713396 25040000000 25041237798 3565163520 3566401318
+75123000000 75126713510 25041000000 25042237836 3566163520 3567401356
+75126000000 75129713671 25042000000 25043237890 3567163520 3568401410
+75129000000 75132713798 25043000000 25044237932 3568163520 3569401452
+75132000000 75135713907 25044000000 25045237969 3569163520 3570401489
+75135000000 75138714049 25045000000 25046238016 3570163520 3571401536
+75138000000 75141714283 25046000000 25047238094 3571163520 3572401614
+75141000000 75144714196 25047000000 25048238065 3572163520 3573401585
+75144000000 75147714317 25048000000 25049238105 3573163520 3574401625
+75147000000 75150714425 25049000000 25050238141 3574163520 3575401661
+75150000000 75153714660 25050000000 25051238220 3575163520 3576401740
+75153000000 75156714839 25051000000 25052238279 3576163520 3577401799
+75156000000 75159628479 25052000000 25053209493 3577163520 3578373013
+75159000000 75162715108 25053000000 25054238369 3578163520 3579401889
+75162000000 75165715281 25054000000 25055238427 3579163520 3580401947
+75165000000 75168715397 25055000000 25056238465 3580163520 3581401985
+75168000000 75171715570 25056000000 25057238523 3581163520 3582402043
+75171000000 75174715742 25057000000 25058238580 3582163520 3583402100
+75174000000 75177715798 25058000000 25059238599 3583163520 3584402119
+75177000000 75180715944 25059000000 25060238648 3584163520 3585402168
+75180000000 75183716140 25060000000 25061238713 3585163520 3586402233
+75183000000 75186716169 25061000000 25062238723 3586163520 3587402243
+75186000000 75189716475 25062000000 25063238825 3587163520 3588402345
+75189000000 75192716647 25063000000 25064238882 3588163520 3589402402
+75192000000 75195716780 25064000000 25065238926 3589163520 3590402446
+75195000000 75198716897 25065000000 25066238965 3590163520 3591402485
+75198000000 75201717082 25066000000 25067239027 3591163520 3592402547
+75201000000 75204717188 25067000000 25068239062 3592163520 3593402582
+75204000000 75207717369 25068000000 25069239123 3593163520 3594402643
+75207000000 75210717581 25069000000 25070239193 3594163520 3595402713
+75210000000 75213717688 25070000000 25071239229 3595163520 3596402749
+75213000000 75216717854 25071000000 25072239284 3596163520 3597402804
+75216000000 75219316599 25072000000 25073105533 3597163520 3598269053
+75219000000 75222718125 25073000000 25074239375 3598163520 3599402895
+75222000000 75225718237 25074000000 25075239412 3599163520 3600402932
+75225000000 75228718446 25075000000 25076239482 3600163520 3601403002
+75228000000 75231718525 25076000000 25077239508 3601163520 3602403028
+75231000000 75234718750 25077000000 25078239583 3602163520 3603403103
+75234000000 75237718877 25078000000 25079239625 3603163520 3604403145
+75237000000 75240718966 25079000000 25080239655 3604163520 3605403175
+75240000000 75243719072 25080000000 25081239690 3605163520 3606403210
+75243000000 75246719283 25081000000 25082239761 3606163520 3607403281
+75246000000 75249719492 25082000000 25083239830 3607163520 3608403350
+75249000000 75252719637 25083000000 25084239879 3608163520 3609403399
+75252000000 75255719763 25084000000 25085239921 3609163520 3610403441
+75255000000 75258719929 25085000000 25086239976 3610163520 3611403496
+75258000000 75261720009 25086000000 25087240003 3611163520 3612403523
+75261000000 75264720244 25087000000 25088240081 3612163520 3613403601
+75264000000 75267720403 25088000000 25089240134 3613163520 3614403654
+75267000000 75270720524 25089000000 25090240174 3614163520 3615403694
+75270000000 75273720684 25090000000 25091240228 3615163520 3616403748
+75273000000 75276720767 25091000000 25092240255 3616163520 3617403775
+75276000000 75279721013 25092000000 25093240337 3617163520 3618403857
+75279000000 75282721136 25093000000 25094240378 3618163520 3619403898
+75282000000 75285721272 25094000000 25095240424 3619163520 3620403944
+75285000000 75288721447 25095000000 25096240482 3620163520 3621404002
+75288000000 75291721569 25096000000 25097240523 3621163520 3622404043
+75291000000 75294721719 25097000000 25098240573 3622163520 3623404093
+75294000000 75297721867 25098000000 25099240622 3623163520 3624404142
+75297000000 75299895561 25099000000 25099965187 3624163520 3625128707
+75300000000 75303722187 25100000000 25101240729 3625163520 3626404249
+75303000000 75306722319 25101000000 25102240773 3626163520 3627404293
+75306000000 75309722493 25102000000 25103240831 3627163520 3628404351
+75309000000 75312722612 25103000000 25104240870 3628163520 3629404390
+75312000000 75315722736 25104000000 25105240912 3629163520 3630404432
+75315000000 75318722955 25105000000 25106240985 3630163520 3631404505
+75318000000 75321723091 25106000000 25107241030 3631163520 3632404550
+75321000000 75324723242 25107000000 25108241080 3632163520 3633404600
+75324000000 75327723392 25108000000 25109241130 3633163520 3634404650
+75327000000 75330723507 25109000000 25110241169 3634163520 3635404689
+75330000000 75333723604 25110000000 25111241201 3635163520 3636404721
+75333000000 75336723812 25111000000 25112241270 3636163520 3637404790
+75336000000 75339723967 25112000000 25113241322 3637163520 3638404842
+75339000000 75342724126 25113000000 25114241375 3638163520 3639404895
+75342000000 75345724300 25114000000 25115241433 3639163520 3640404953
+75345000000 75348724400 25115000000 25116241466 3640163520 3641404986
+75348000000 75351724578 25116000000 25117241526 3641163520 3642405046
+75351000000 75354724727 25117000000 25118241575 3642163520 3643405095
+75354000000 75357724855 25118000000 25119241618 3643163520 3644405138
+75357000000 75360725024 25119000000 25120241674 3644163520 3645405194
+75360000000 75363725144 25120000000 25121241714 3645163520 3646405234
+75363000000 75365552494 25121000000 25121850831 3646163520 3647014351
+75366000000 75369725394 25122000000 25123241798 3647163520 3648405318
+75369000000 75372725652 25123000000 25124241884 3648163520 3649405404
+75372000000 75375725757 25124000000 25125241919 3649163520 3650405439
+75375000000 75378725837 25125000000 25126241945 3650163520 3651405465
+75378000000 75381725984 25126000000 25127241994 3651163520 3652405514
+75381000000 75384726238 25127000000 25128242079 3652163520 3653405599
+75384000000 75387726328 25128000000 25129242109 3653163520 3654405629
+75387000000 75390726573 25129000000 25130242191 3654163520 3655405711
+75390000000 75393726651 25130000000 25131242217 3655163520 3656405737
+75393000000 75396726828 25131000000 25132242276 3656163520 3657405796
+75396000000 75399726974 25132000000 25133242324 3657163520 3658405844
+75399000000 75402727118 25133000000 25134242372 3658163520 3659405892
+75402000000 75404349772 25134000000 25134783257 3659163520 3659946777
+75405000000 75408727433 25135000000 25136242477 3660163520 3661405997
+75408000000 75411727593 25136000000 25137242531 3661163520 3662406051
+75411000000 75414727730 25137000000 25138242576 3662163520 3663406096
+75414000000 75417727888 25138000000 25139242629 3663163520 3664406149
+75417000000 75420728046 25139000000 25140242682 3664163520 3665406202
+75420000000 75423728160 25140000000 25141242720 3665163520 3666406240
+75423000000 75426728321 25141000000 25142242773 3666163520 3667406293
+75426000000 75429728448 25142000000 25143242816 3667163520 3668406336
+75429000000 75432728557 25143000000 25144242852 3668163520 3669406372
+75432000000 75435728699 25144000000 25145242899 3669163520 3670406419
+75435000000 75438728933 25145000000 25146242977 3670163520 3671406497
+75438000000 75441728846 25146000000 25147242948 3671163520 3672406468
+75441000000 75444728967 25147000000 25148242989 3672163520 3673406509
+75444000000 75447729075 25148000000 25149243025 3673163520 3674406545
+75447000000 75450729310 25149000000 25150243103 3674163520 3675406623
+75450000000 75453729489 25150000000 25151243163 3675163520 3676406683
+75453000000 75456643129 25151000000 25152214376 3676163520 3677377896
+75456000000 75459729758 25152000000 25153243252 3677163520 3678406772
+75459000000 75462729931 25153000000 25154243310 3678163520 3679406830
+75462000000 75465730047 25154000000 25155243349 3679163520 3680406869
+75465000000 75468730220 25155000000 25156243406 3680163520 3681406926
+75468000000 75471730392 25156000000 25157243464 3681163520 3682406984
+75471000000 75474730448 25157000000 25158243482 3682163520 3683407002
+75474000000 75477730594 25158000000 25159243531 3683163520 3684407051
+75477000000 75480730790 25159000000 25160243596 3684163520 3685407116
+75480000000 75483730819 25160000000 25161243606 3685163520 3686407126
+75483000000 75486731125 25161000000 25162243708 3686163520 3687407228
+75486000000 75489731297 25162000000 25163243765 3687163520 3688407285
+75489000000 75492731430 25163000000 25164243810 3688163520 3689407330
+75492000000 75495731547 25164000000 25165243849 3689163520 3690407369
+75495000000 75498731732 25165000000 25166243910 3690163520 3691407430
+75498000000 75501731838 25166000000 25167243946 3691163520 3692407466
+75501000000 75504732019 25167000000 25168244006 3692163520 3693407526
+75504000000 75507732231 25168000000 25169244077 3693163520 3694407597
+75507000000 75510732338 25169000000 25170244112 3694163520 3695407632
+75510000000 75513732504 25170000000 25171244168 3695163520 3696407688
+75513000000 75516331249 25171000000 25172110416 3696163520 3697273936
+75516000000 75519732775 25172000000 25173244258 3697163520 3698407778
+75519000000 75522732887 25173000000 25174244295 3698163520 3699407815
+75522000000 75525733096 25174000000 25175244365 3699163520 3700407885
+75525000000 75528733175 25175000000 25176244391 3700163520 3701407911
+75528000000 75531733400 25176000000 25177244466 3701163520 3702407986
+75531000000 75534733527 25177000000 25178244509 3702163520 3703408029
+75534000000 75537733616 25178000000 25179244538 3703163520 3704408058
+75537000000 75540733722 25179000000 25180244574 3704163520 3705408094
+75540000000 75543733933 25180000000 25181244644 3705163520 3706408164
+75543000000 75546734142 25181000000 25182244714 3706163520 3707408234
+75546000000 75549734287 25182000000 25183244762 3707163520 3708408282
+75549000000 75552734413 25183000000 25184244804 3708163520 3709408324
+75552000000 75555734579 25184000000 25185244859 3709163520 3710408379
+75555000000 75558734659 25185000000 25186244886 3710163520 3711408406
+75558000000 75561734894 25186000000 25187244964 3711163520 3712408484
+75561000000 75564735053 25187000000 25188245017 3712163520 3713408537
+75564000000 75567735174 25188000000 25189245058 3713163520 3714408578
+75567000000 75570735334 25189000000 25190245111 3714163520 3715408631
+75570000000 75573735417 25190000000 25191245139 3715163520 3716408659
+75573000000 75576735663 25191000000 25192245221 3716163520 3717408741
+75576000000 75579735786 25192000000 25193245262 3717163520 3718408782
+75579000000 75582735922 25193000000 25194245307 3718163520 3719408827
+75582000000 75585736097 25194000000 25195245365 3719163520 3720408885
+75585000000 75588736219 25195000000 25196245406 3720163520 3721408926
+75588000000 75591736369 25196000000 25197245456 3721163520 3722408976
+75591000000 75594736517 25197000000 25198245505 3722163520 3723409025
+75594000000 75596910211 25198000000 25198970070 3723163520 3724133590
+75597000000 75600736837 25199000000 25200245612 3724163520 3725409132
+75600000000 75603736969 25200000000 25201245656 3725163520 3726409176
+75603000000 75606737143 25201000000 25202245714 3726163520 3727409234
+75606000000 75609737262 25202000000 25203245754 3727163520 3728409274
+75609000000 75612737386 25203000000 25204245795 3728163520 3729409315
+75612000000 75615737605 25204000000 25205245868 3729163520 3730409388
+75615000000 75618737741 25205000000 25206245913 3730163520 3731409433
+75618000000 75621737892 25206000000 25207245964 3731163520 3732409484
+75621000000 75624738042 25207000000 25208246014 3732163520 3733409534
+75624000000 75627738157 25208000000 25209246052 3733163520 3734409572
+75627000000 75630738254 25209000000 25210246084 3734163520 3735409604
+75630000000 75633738462 25210000000 25211246154 3735163520 3736409674
+75633000000 75636738617 25211000000 25212246205 3736163520 3737409725
+75636000000 75639738776 25212000000 25213246258 3737163520 3738409778
+75639000000 75642738950 25213000000 25214246316 3738163520 3739409836
+75642000000 75645739050 25214000000 25215246350 3739163520 3740409870
+75645000000 75648739228 25215000000 25216246409 3740163520 3741409929
+75648000000 75651739377 25216000000 25217246459 3741163520 3742409979
+75651000000 75654739505 25217000000 25218246501 3742163520 3743410021
+75654000000 75657739674 25218000000 25219246558 3743163520 3744410078
+75657000000 75660739794 25219000000 25220246598 3744163520 3745410118
+75660000000 75662567144 25220000000 25220855714 3745163520 3746019234
+75663000000 75666740044 25221000000 25222246681 3746163520 3747410201
+75666000000 75669740302 25222000000 25223246767 3747163520 3748410287
+75669000000 75672740407 25223000000 25224246802 3748163520 3749410322
+75672000000 75675740487 25224000000 25225246829 3749163520 3750410349
+75675000000 75678740634 25225000000 25226246878 3750163520 3751410398
+75678000000 75681740888 25226000000 25227246962 3751163520 3752410482
+75681000000 75684740978 25227000000 25228246992 3752163520 3753410512
+75684000000 75687741223 25228000000 25229247074 3753163520 3754410594
+75687000000 75690741301 25229000000 25230247100 3754163520 3755410620
+75690000000 75693741478 25230000000 25231247159 3755163520 3756410679
+75693000000 75696741624 25231000000 25232247208 3756163520 3757410728
+75696000000 75699741768 25232000000 25233247256 3757163520 3758410776
+75699000000 75701364422 25233000000 25233788140 3758163520 3758951660
+75702000000 75705742083 25234000000 25235247361 3759163520 3760410881
+75705000000 75708742243 25235000000 25236247414 3760163520 3761410934
+75708000000 75711742380 25236000000 25237247460 3761163520 3762410980
+75711000000 75714742538 25237000000 25238247512 3762163520 3763411032
+75714000000 75717742696 25238000000 25239247565 3763163520 3764411085
+75717000000 75720742810 25239000000 25240247603 3764163520 3765411123
+75720000000 75723742971 25240000000 25241247657 3765163520 3766411177
+75723000000 75726743098 25241000000 25242247699 3766163520 3767411219
+75726000000 75729743207 25242000000 25243247735 3767163520 3768411255
+75729000000 75732743349 25243000000 25244247783 3768163520 3769411303
+75732000000 75735743583 25244000000 25245247861 3769163520 3770411381
+75735000000 75738743496 25245000000 25246247832 3770163520 3771411352
+75738000000 75741743617 25246000000 25247247872 3771163520 3772411392
+75741000000 75744743725 25247000000 25248247908 3772163520 3773411428
+75744000000 75747743960 25248000000 25249247986 3773163520 3774411506
+75747000000 75750744139 25249000000 25250248046 3774163520 3775411566
+75750000000 75753657779 25250000000 25251219259 3775163520 3776382779
+75753000000 75756744408 25251000000 25252248136 3776163520 3777411656
+75756000000 75759744581 25252000000 25253248193 3777163520 3778411713
+75759000000 75762744697 25253000000 25254248232 3778163520 3779411752
+75762000000 75765744870 25254000000 25255248290 3779163520 3780411810
+75765000000 75768745042 25255000000 25256248347 3780163520 3781411867
+75768000000 75771745098 25256000000 25257248366 3781163520 3782411886
+75771000000 75774745244 25257000000 25258248414 3782163520 3783411934
+75774000000 75777745440 25258000000 25259248480 3783163520 3784412000
+75777000000 75780745469 25259000000 25260248489 3784163520 3785412009
+75780000000 75783745775 25260000000 25261248591 3785163520 3786412111
+75783000000 75786745947 25261000000 25262248649 3786163520 3787412169
+75786000000 75789746080 25262000000 25263248693 3787163520 3788412213
+75789000000 75792746197 25263000000 25264248732 3788163520 3789412252
+75792000000 75795746382 25264000000 25265248794 3789163520 3790412314
+75795000000 75798746488 25265000000 25266248829 3790163520 3791412349
+75798000000 75801746669 25266000000 25267248889 3791163520 3792412409
+75801000000 75804746881 25267000000 25268248960 3792163520 3793412480
+75804000000 75807746988 25268000000 25269248996 3793163520 3794412516
+75807000000 75810747154 25269000000 25270249051 3794163520 3795412571
+75810000000 75813345899 25270000000 25271115299 3795163520 3796278819
+75813000000 75816747425 25271000000 25272249141 3796163520 3797412661
+75816000000 75819747537 25272000000 25273249179 3797163520 3798412699
+75819000000 75822747746 25273000000 25274249248 3798163520 3799412768
+75822000000 75825747825 25274000000 25275249275 3799163520 3800412795
+75825000000 75828748050 25275000000 25276249350 3800163520 3801412870
+75828000000 75831748177 25276000000 25277249392 3801163520 3802412912
+75831000000 75834748266 25277000000 25278249422 3802163520 3803412942
+75834000000 75837748372 25278000000 25279249457 3803163520 3804412977
+75837000000 75840748583 25279000000 25280249527 3804163520 3805413047
+75840000000 75843748792 25280000000 25281249597 3805163520 3806413117
+75843000000 75846748937 25281000000 25282249645 3806163520 3807413165
+75846000000 75849749063 25282000000 25283249687 3807163520 3808413207
+75849000000 75852749229 25283000000 25284249743 3808163520 3809413263
+75852000000 75855749309 25284000000 25285249769 3809163520 3810413289
+75855000000 75858749544 25285000000 25286249848 3810163520 3811413368
+75858000000 75861749703 25286000000 25287249901 3811163520 3812413421
+75861000000 75864749824 25287000000 25288249941 3812163520 3813413461
+75864000000 75867749984 25288000000 25289249994 3813163520 3814413514
+75867000000 75870750067 25289000000 25290250022 3814163520 3815413542
+75870000000 75873750313 25290000000 25291250104 3815163520 3816413624
+75873000000 75876750436 25291000000 25292250145 3816163520 3817413665
+75876000000 75879750572 25292000000 25293250190 3817163520 3818413710
+75879000000 75882750747 25293000000 25294250249 3818163520 3819413769
+75882000000 75885750869 25294000000 25295250289 3819163520 3820413809
+75885000000 75888751019 25295000000 25296250339 3820163520 3821413859
+75888000000 75891751167 25296000000 25297250389 3821163520 3822413909
+75891000000 75893924861 25297000000 25297974953 3822163520 3823138473
+75894000000 75897751487 25298000000 25299250495 3823163520 3824414015
+75897000000 75900751619 25299000000 25300250539 3824163520 3825414059
+75900000000 75903751793 25300000000 25301250597 3825163520 3826414117
+75903000000 75906751912 25301000000 25302250637 3826163520 3827414157
+75906000000 75909752036 25302000000 25303250678 3827163520 3828414198
+75909000000 75912752255 25303000000 25304250751 3828163520 3829414271
+75912000000 75915752391 25304000000 25305250797 3829163520 3830414317
+75915000000 75918752542 25305000000 25306250847 3830163520 3831414367
+75918000000 75921752692 25306000000 25307250897 3831163520 3832414417
+75921000000 75924752807 25307000000 25308250935 3832163520 3833414455
+75924000000 75927752904 25308000000 25309250968 3833163520 3834414488
+75927000000 75930753112 25309000000 25310251037 3834163520 3835414557
+75930000000 75933753267 25310000000 25311251089 3835163520 3836414609
+75933000000 75936753426 25311000000 25312251142 3836163520 3837414662
+75936000000 75939753600 25312000000 25313251200 3837163520 3838414720
+75939000000 75942753700 25313000000 25314251233 3838163520 3839414753
+75942000000 75945753878 25314000000 25315251292 3839163520 3840414812
+75945000000 75948754027 25315000000 25316251342 3840163520 3841414862
+75948000000 75951754155 25316000000 25317251385 3841163520 3842414905
+75951000000 75954754324 25317000000 25318251441 3842163520 3843414961
+75954000000 75957754444 25318000000 25319251481 3843163520 3844415001
+75957000000 75959581794 25319000000 25319860598 3844163520 3845024118
+75960000000 75963754694 25320000000 25321251564 3845163520 3846415084
+75963000000 75966754952 25321000000 25322251650 3846163520 3847415170
+75966000000 75969755057 25322000000 25323251685 3847163520 3848415205
+75969000000 75972755137 25323000000 25324251712 3848163520 3849415232
+75972000000 75975755284 25324000000 25325251761 3849163520 3850415281
+75975000000 75978755538 25325000000 25326251846 3850163520 3851415366
+75978000000 75981755628 25326000000 25327251876 3851163520 3852415396
+75981000000 75984755873 25327000000 25328251957 3852163520 3853415477
+75984000000 75987755951 25328000000 25329251983 3853163520 3854415503
+75987000000 75990756128 25329000000 25330252042 3854163520 3855415562
+75990000000 75993756274 25330000000 25331252091 3855163520 3856415611
+75993000000 75996756418 25331000000 25332252139 3856163520 3857415659
+75996000000 75998379072 25332000000 25332793024 3857163520 3857956544
+75999000000 76002756733 25333000000 25334252244 3858163520 3859415764
+76002000000 76005756893 25334000000 25335252297 3859163520 3860415817
+76005000000 76008757030 25335000000 25336252343 3860163520 3861415863
+76008000000 76011757188 25336000000 25337252396 3861163520 3862415916
+76011000000 76014757346 25337000000 25338252448 3862163520 3863415968
+76014000000 76017757460 25338000000 25339252486 3863163520 3864416006
+76017000000 76020757621 25339000000 25340252540 3864163520 3865416060
+76020000000 76023757748 25340000000 25341252582 3865163520 3866416102
+76023000000 76026757857 25341000000 25342252619 3866163520 3867416139
+76026000000 76029757999 25342000000 25343252666 3867163520 3868416186
+76029000000 76032758233 25343000000 25344252744 3868163520 3869416264
+76032000000 76035758146 25344000000 25345252715 3869163520 3870416235
+76035000000 76038758267 25345000000 25346252755 3870163520 3871416275
+76038000000 76041758375 25346000000 25347252791 3871163520 3872416311
+76041000000 76044758610 25347000000 25348252870 3872163520 3873416390
+76044000000 76047758789 25348000000 25349252929 3873163520 3874416449
+76047000000 76050672429 25349000000 25350224143 3874163520 3875387663
+76050000000 76053759058 25350000000 25351253019 3875163520 3876416539
+76053000000 76056759231 25351000000 25352253077 3876163520 3877416597
+76056000000 76059759347 25352000000 25353253115 3877163520 3878416635
+76059000000 76062759520 25353000000 25354253173 3878163520 3879416693
+76062000000 76065759692 25354000000 25355253230 3879163520 3880416750
+76065000000 76068759748 25355000000 25356253249 3880163520 3881416769
+76068000000 76071759894 25356000000 25357253298 3881163520 3882416818
+76071000000 76074760090 25357000000 25358253363 3882163520 3883416883
+76074000000 76077760119 25358000000 25359253373 3883163520 3884416893
+76077000000 76080760425 25359000000 25360253475 3884163520 3885416995
+76080000000 76083760597 25360000000 25361253532 3885163520 3886417052
+76083000000 76086760730 25361000000 25362253576 3886163520 3887417096
+76086000000 76089760847 25362000000 25363253615 3887163520 3888417135
+76089000000 76092761032 25363000000 25364253677 3888163520 3889417197
+76092000000 76095761138 25364000000 25365253712 3889163520 3890417232
+76095000000 76098761319 25365000000 25366253773 3890163520 3891417293
+76098000000 76101761531 25366000000 25367253843 3891163520 3892417363
+76101000000 76104761638 25367000000 25368253879 3892163520 3893417399
+76104000000 76107761804 25368000000 25369253934 3893163520 3894417454
+76107000000 76110360549 25369000000 25370120183 3894163520 3895283703
+76110000000 76113762075 25370000000 25371254025 3895163520 3896417545
+76113000000 76116762187 25371000000 25372254062 3896163520 3897417582
+76116000000 76119762396 25372000000 25373254132 3897163520 3898417652
+76119000000 76122762475 25373000000 25374254158 3898163520 3899417678
+76122000000 76125762700 25374000000 25375254233 3899163520 3900417753
+76125000000 76128762827 25375000000 25376254275 3900163520 3901417795
+76128000000 76131762916 25376000000 25377254305 3901163520 3902417825
+76131000000 76134763022 25377000000 25378254340 3902163520 3903417860
+76134000000 76137763233 25378000000 25379254411 3903163520 3904417931
+76137000000 76140763442 25379000000 25380254480 3904163520 3905418000
+76140000000 76143763587 25380000000 25381254529 3905163520 3906418049
+76143000000 76146763713 25381000000 25382254571 3906163520 3907418091
+76146000000 76149763879 25382000000 25383254626 3907163520 3908418146
+76149000000 76152763959 25383000000 25384254653 3908163520 3909418173
+76152000000 76155764194 25384000000 25385254731 3909163520 3910418251
+76155000000 76158764353 25385000000 25386254784 3910163520 3911418304
+76158000000 76161764474 25386000000 25387254824 3911163520 3912418344
+76161000000 76164764634 25387000000 25388254878 3912163520 3913418398
+76164000000 76167764717 25388000000 25389254905 3913163520 3914418425
+76167000000 76170764963 25389000000 25390254987 3914163520 3915418507
+76170000000 76173765086 25390000000 25391255028 3915163520 3916418548
+76173000000 76176765222 25391000000 25392255074 3916163520 3917418594
+76176000000 76179765397 25392000000 25393255132 3917163520 3918418652
+76179000000 76182765519 25393000000 25394255173 3918163520 3919418693
+76182000000 76185765669 25394000000 25395255223 3919163520 3920418743
+76185000000 76188765817 25395000000 25396255272 3920163520 3921418792
+76188000000 76190939511 25396000000 25396979837 3921163520 3922143357
+76191000000 76194766137 25397000000 25398255379 3922163520 3923418899
+76194000000 76197766269 25398000000 25399255423 3923163520 3924418943
+76197000000 76200766443 25399000000 25400255481 3924163520 3925419001
+76200000000 76203766562 25400000000 25401255520 3925163520 3926419040
+76203000000 76206766686 25401000000 25402255562 3926163520 3927419082
+76206000000 76209766905 25402000000 25403255635 3927163520 3928419155
+76209000000 76212767041 25403000000 25404255680 3928163520 3929419200
+76212000000 76215767192 25404000000 25405255730 3929163520 3930419250
+76215000000 76218767342 25405000000 25406255780 3930163520 3931419300
+76218000000 76221767457 25406000000 25407255819 3931163520 3932419339
+76221000000 76224767554 25407000000 25408255851 3932163520 3933419371
+76224000000 76227767762 25408000000 25409255920 3933163520 3934419440
+76227000000 76230767917 25409000000 25410255972 3934163520 3935419492
+76230000000 76233768076 25410000000 25411256025 3935163520 3936419545
+76233000000 76236768250 25411000000 25412256083 3936163520 3937419603
+76236000000 76239768350 25412000000 25413256116 3937163520 3938419636
+76239000000 76242768528 25413000000 25414256176 3938163520 3939419696
+76242000000 76245768677 25414000000 25415256225 3939163520 3940419745
+76245000000 76248768805 25415000000 25416256268 3940163520 3941419788
+76248000000 76251768974 25416000000 25417256324 3941163520 3942419844
+76251000000 76254769094 25417000000 25418256364 3942163520 3943419884
+76254000000 76256596444 25418000000 25418865481 3943163520 3944029001
+76257000000 76260769344 25419000000 25420256448 3944163520 3945419968
+76260000000 76263769602 25420000000 25421256534 3945163520 3946420054
+76263000000 76266769707 25421000000 25422256569 3946163520 3947420089
+76266000000 76269769787 25422000000 25423256595 3947163520 3948420115
+76269000000 76272769934 25423000000 25424256644 3948163520 3949420164
+76272000000 76275770188 25424000000 25425256729 3949163520 3950420249
+76275000000 76278770278 25425000000 25426256759 3950163520 3951420279
+76278000000 76281770523 25426000000 25427256841 3951163520 3952420361
+76281000000 76284770601 25427000000 25428256867 3952163520 3953420387
+76284000000 76287770778 25428000000 25429256926 3953163520 3954420446
+76287000000 76290770924 25429000000 25430256974 3954163520 3955420494
+76290000000 76293771068 25430000000 25431257022 3955163520 3956420542
+76293000000 76295393722 25431000000 25431797907 3956163520 3956961427
+76296000000 76299771383 25432000000 25433257127 3957163520 3958420647
+76299000000 76302771543 25433000000 25434257181 3958163520 3959420701
+76302000000 76305771680 25434000000 25435257226 3959163520 3960420746
+76305000000 76308771838 25435000000 25436257279 3960163520 3961420799
+76308000000 76311771996 25436000000 25437257332 3961163520 3962420852
+76311000000 76314772110 25437000000 25438257370 3962163520 3963420890
+76314000000 76317772271 25438000000 25439257423 3963163520 3964420943
+76317000000 76320772398 25439000000 25440257466 3964163520 3965420986
+76320000000 76323772507 25440000000 25441257502 3965163520 3966421022
+76323000000 76326772649 25441000000 25442257549 3966163520 3967421069
+76326000000 76329772883 25442000000 25443257627 3967163520 3968421147
+76329000000 76332772796 25443000000 25444257598 3968163520 3969421118
+76332000000 76335772917 25444000000 25445257639 3969163520 3970421159
+76335000000 76338773025 25445000000 25446257675 3970163520 3971421195
+76338000000 76341773260 25446000000 25447257753 3971163520 3972421273
+76341000000 76344773439 25447000000 25448257813 3972163520 3973421333
+76344000000 76347687079 25448000000 25449229026 3973163520 3974392546
+76347000000 76350773708 25449000000 25450257902 3974163520 3975421422
+76350000000 76353773881 25450000000 25451257960 3975163520 3976421480
+76353000000 76356773997 25451000000 25452257999 3976163520 3977421519
+76356000000 76359774170 25452000000 25453258056 3977163520 3978421576
+76359000000 76362774342 25453000000 25454258114 3978163520 3979421634
+76362000000 76365774398 25454000000 25455258132 3979163520 3980421652
+76365000000 76368774544 25455000000 25456258181 3980163520 3981421701
+76368000000 76371774740 25456000000 25457258246 3981163520 3982421766
+76371000000 76374774769 25457000000 25458258256 3982163520 3983421776
+76374000000 76377775075 25458000000 25459258358 3983163520 3984421878
+76377000000 76380775247 25459000000 25460258415 3984163520 3985421935
+76380000000 76383775380 25460000000 25461258460 3985163520 3986421980
+76383000000 76386775497 25461000000 25462258499 3986163520 3987422019
+76386000000 76389775682 25462000000 25463258560 3987163520 3988422080
+76389000000 76392775788 25463000000 25464258596 3988163520 3989422116
+76392000000 76395775969 25464000000 25465258656 3989163520 3990422176
+76395000000 76398776181 25465000000 25466258727 3990163520 3991422247
+76398000000 76401776288 25466000000 25467258762 3991163520 3992422282
+76401000000 76404776454 25467000000 25468258818 3992163520 3993422338
+76404000000 76407375199 25468000000 25469125066 3993163520 3994288586
+76407000000 76410776725 25469000000 25470258908 3994163520 3995422428
+76410000000 76413776837 25470000000 25471258945 3995163520 3996422465
+76413000000 76416777046 25471000000 25472259015 3996163520 3997422535
+76416000000 76419777125 25472000000 25473259041 3997163520 3998422561
+76419000000 76422777350 25473000000 25474259116 3998163520 3999422636
+76422000000 76425777477 25474000000 25475259159 3999163520 4000422679
+76425000000 76428777566 25475000000 25476259188 4000163520 4001422708
+76428000000 76431777672 25476000000 25477259224 4001163520 4002422744
+76431000000 76434777883 25477000000 25478259294 4002163520 4003422814
+76434000000 76437778092 25478000000 25479259364 4003163520 4004422884
+76437000000 76440778237 25479000000 25480259412 4004163520 4005422932
+76440000000 76443778363 25480000000 25481259454 4005163520 4006422974
+76443000000 76446778529 25481000000 25482259509 4006163520 4007423029
+76446000000 76449778609 25482000000 25483259536 4007163520 4008423056
+76449000000 76452778844 25483000000 25484259614 4008163520 4009423134
+76452000000 76455779003 25484000000 25485259667 4009163520 4010423187
+76455000000 76458779124 25485000000 25486259708 4010163520 4011423228
+76458000000 76461779284 25486000000 25487259761 4011163520 4012423281
+76461000000 76464779367 25487000000 25488259789 4012163520 4013423309
+76464000000 76467779613 25488000000 25489259871 4013163520 4014423391
+76467000000 76470779736 25489000000 25490259912 4014163520 4015423432
+76470000000 76473779872 25490000000 25491259957 4015163520 4016423477
+76473000000 76476780047 25491000000 25492260015 4016163520 4017423535
+76476000000 76479780169 25492000000 25493260056 4017163520 4018423576
+76479000000 76482780319 25493000000 25494260106 4018163520 4019423626
+76482000000 76485780467 25494000000 25495260155 4019163520 4020423675
+76485000000 76487954161 25495000000 25495984720 4020163520 4021148240
+76488000000 76491780787 25496000000 25497260262 4021163520 4022423782
+76491000000 76494780919 25497000000 25498260306 4022163520 4023423826
+76494000000 76497781093 25498000000 25499260364 4023163520 4024423884
+76497000000 76500781212 25499000000 25500260404 4024163520 4025423924
+76500000000 76503781336 25500000000 25501260445 4025163520 4026423965
+76503000000 76506781555 25501000000 25502260518 4026163520 4027424038
+76506000000 76509781691 25502000000 25503260563 4027163520 4028424083
+76509000000 76512781842 25503000000 25504260614 4028163520 4029424134
+76512000000 76515781992 25504000000 25505260664 4029163520 4030424184
+76515000000 76518782107 25505000000 25506260702 4030163520 4031424222
+76518000000 76521782204 25506000000 25507260734 4031163520 4032424254
+76521000000 76524782412 25507000000 25508260804 4032163520 4033424324
+76524000000 76527782567 25508000000 25509260855 4033163520 4034424375
+76527000000 76530782726 25509000000 25510260908 4034163520 4035424428
+76530000000 76533782900 25510000000 25511260966 4035163520 4036424486
+76533000000 76536783000 25511000000 25512261000 4036163520 4037424520
+76536000000 76539783178 25512000000 25513261059 4037163520 4038424579
+76539000000 76542783327 25513000000 25514261109 4038163520 4039424629
+76542000000 76545783455 25514000000 25515261151 4039163520 4040424671
+76545000000 76548783624 25515000000 25516261208 4040163520 4041424728
+76548000000 76551783744 25516000000 25517261248 4041163520 4042424768
+76551000000 76553611094 25517000000 25517870364 4042163520 4043033884
+76554000000 76557783994 25518000000 25519261331 4043163520 4044424851
+76557000000 76560784252 25519000000 25520261417 4044163520 4045424937
+76560000000 76563784357 25520000000 25521261452 4045163520 4046424972
+76563000000 76566784437 25521000000 25522261479 4046163520 4047424999
+76566000000 76569784584 25522000000 25523261528 4047163520 4048425048
+76569000000 76572784838 25523000000 25524261612 4048163520 4049425132
+76572000000 76575784928 25524000000 25525261642 4049163520 4050425162
+76575000000 76578785173 25525000000 25526261724 4050163520 4051425244
+76578000000 76581785251 25526000000 25527261750 4051163520 4052425270
+76581000000 76584785428 25527000000 25528261809 4052163520 4053425329
+76584000000 76587785574 25528000000 25529261858 4053163520 4054425378
+76587000000 76590785718 25529000000 25530261906 4054163520 4055425426
+76590000000 76592408372 25530000000 25530802790 4055163520 4055966310
+76593000000 76596786033 25531000000 25532262011 4056163520 4057425531
+76596000000 76599786193 25532000000 25533262064 4057163520 4058425584
+76599000000 76602786330 25533000000 25534262110 4058163520 4059425630
+76602000000 76605786488 25534000000 25535262162 4059163520 4060425682
+76605000000 76608786646 25535000000 25536262215 4060163520 4061425735
+76608000000 76611786760 25536000000 25537262253 4061163520 4062425773
+76611000000 76614786921 25537000000 25538262307 4062163520 4063425827
+76614000000 76617787048 25538000000 25539262349 4063163520 4064425869
+76617000000 76620787157 25539000000 25540262385 4064163520 4065425905
+76620000000 76623787299 25540000000 25541262433 4065163520 4066425953
+76623000000 76626787533 25541000000 25542262511 4066163520 4067426031
+76626000000 76629787446 25542000000 25543262482 4067163520 4068426002
+76629000000 76632787567 25543000000 25544262522 4068163520 4069426042
+76632000000 76635787675 25544000000 25545262558 4069163520 4070426078
+76635000000 76638787910 25545000000 25546262636 4070163520 4071426156
+76638000000 76641788089 25546000000 25547262696 4071163520 4072426216
+76641000000 76644701729 25547000000 25548233909 4072163520 4073397429
+76644000000 76647788358 25548000000 25549262786 4073163520 4074426306
+76647000000 76650788531 25549000000 25550262843 4074163520 4075426363
+76650000000 76653788647 25550000000 25551262882 4075163520 4076426402
+76653000000 76656788820 25551000000 25552262940 4076163520 4077426460
+76656000000 76659788992 25552000000 25553262997 4077163520 4078426517
+76659000000 76662789048 25553000000 25554263016 4078163520 4079426536
+76662000000 76665789194 25554000000 25555263064 4079163520 4080426584
+76665000000 76668789390 25555000000 25556263130 4080163520 4081426650
+76668000000 76671789419 25556000000 25557263139 4081163520 4082426659
+76671000000 76674789725 25557000000 25558263241 4082163520 4083426761
+76674000000 76677789897 25558000000 25559263299 4083163520 4084426819
+76677000000 76680790030 25559000000 25560263343 4084163520 4085426863
+76680000000 76683790147 25560000000 25561263382 4085163520 4086426902
+76683000000 76686790332 25561000000 25562263444 4086163520 4087426964
+76686000000 76689790438 25562000000 25563263479 4087163520 4088426999
+76689000000 76692790619 25563000000 25564263539 4088163520 4089427059
+76692000000 76695790831 25564000000 25565263610 4089163520 4090427130
+76695000000 76698790938 25565000000 25566263646 4090163520 4091427166
+76698000000 76701791104 25566000000 25567263701 4091163520 4092427221
+76701000000 76704389849 25567000000 25568129949 4092163520 4093293469
+76704000000 76707791375 25568000000 25569263791 4093163520 4094427311
+76707000000 76710791487 25569000000 25570263829 4094163520 4095427349
+76710000000 76713791696 25570000000 25571263898 4095163520 4096427418
+76713000000 76716791775 25571000000 25572263925 4096163520 4097427445
+76716000000 76719792000 25572000000 25573264000 4097163520 4098427520
+76719000000 76722792127 25573000000 25574264042 4098163520 4099427562
+76722000000 76725792216 25574000000 25575264072 4099163520 4100427592
+76725000000 76728792322 25575000000 25576264107 4100163520 4101427627
+76728000000 76731792533 25576000000 25577264177 4101163520 4102427697
+76731000000 76734792742 25577000000 25578264247 4102163520 4103427767
+76734000000 76737792887 25578000000 25579264295 4103163520 4104427815
+76737000000 76740793013 25579000000 25580264337 4104163520 4105427857
+76740000000 76743793179 25580000000 25581264393 4105163520 4106427913
+76743000000 76746793259 25581000000 25582264419 4106163520 4107427939
+76746000000 76749793494 25582000000 25583264498 4107163520 4108428018
+76749000000 76752793653 25583000000 25584264551 4108163520 4109428071
+76752000000 76755793774 25584000000 25585264591 4109163520 4110428111
+76755000000 76758793934 25585000000 25586264644 4110163520 4111428164
+76758000000 76761794017 25586000000 25587264672 4111163520 4112428192
+76761000000 76764794263 25587000000 25588264754 4112163520 4113428274
+76764000000 76767794386 25588000000 25589264795 4113163520 4114428315
+76767000000 76770794522 25589000000 25590264840 4114163520 4115428360
+76770000000 76773794697 25590000000 25591264899 4115163520 4116428419
+76773000000 76776794819 25591000000 25592264939 4116163520 4117428459
+76776000000 76779794969 25592000000 25593264989 4117163520 4118428509
+76779000000 76782795117 25593000000 25594265039 4118163520 4119428559
+76782000000 76784968811 25594000000 25594989603 4119163520 4120153123
+76785000000 76788795437 25595000000 25596265145 4120163520 4121428665
+76788000000 76791795569 25596000000 25597265189 4121163520 4122428709
+76791000000 76794795743 25597000000 25598265247 4122163520 4123428767
+76794000000 76797795862 25598000000 25599265287 4123163520 4124428807
+76797000000 76800795986 25599000000 25600265328 4124163520 4125428848
+76800000000 76803796205 25600000000 25601265401 4125163520 4126428921
+76803000000 76806796341 25601000000 25602265447 4126163520 4127428967
+76806000000 76809796492 25602000000 25603265497 4127163520 4128429017
+76809000000 76812796642 25603000000 25604265547 4128163520 4129429067
+76812000000 76815796757 25604000000 25605265585 4129163520 4130429105
+76815000000 76818796854 25605000000 25606265618 4130163520 4131429138
+76818000000 76821797062 25606000000 25607265687 4131163520 4132429207
+76821000000 76824797217 25607000000 25608265739 4132163520 4133429259
+76824000000 76827797376 25608000000 25609265792 4133163520 4134429312
+76827000000 76830797550 25609000000 25610265850 4134163520 4135429370
+76830000000 76833797650 25610000000 25611265883 4135163520 4136429403
+76833000000 76836797828 25611000000 25612265942 4136163520 4137429462
+76836000000 76839797977 25612000000 25613265992 4137163520 4138429512
+76839000000 76842798105 25613000000 25614266035 4138163520 4139429555
+76842000000 76845798274 25614000000 25615266091 4139163520 4140429611
+76845000000 76848798394 25615000000 25616266131 4140163520 4141429651
+76848000000 76850625744 25616000000 25616875248 4141163520 4142038768
+76851000000 76854798644 25617000000 25618266214 4142163520 4143429734
+76854000000 76857798902 25618000000 25619266300 4143163520 4144429820
+76857000000 76860799007 25619000000 25620266335 4144163520 4145429855
+76860000000 76863799087 25620000000 25621266362 4145163520 4146429882
+76863000000 76866799234 25621000000 25622266411 4146163520 4147429931
+76866000000 76869799488 25622000000 25623266496 4147163520 4148430016
+76869000000 76872799578 25623000000 25624266526 4148163520 4149430046
+76872000000 76875799823 25624000000 25625266607 4149163520 4150430127
+76875000000 76878799901 25625000000 25626266633 4150163520 4151430153
+76878000000 76881800078 25626000000 25627266692 4151163520 4152430212
+76881000000 76884800224 25627000000 25628266741 4152163520 4153430261
+76884000000 76887800368 25628000000 25629266789 4153163520 4154430309
+76887000000 76889423022 25629000000 25629807674 4154163520 4154971194
+76890000000 76893800683 25630000000 25631266894 4155163520 4156430414
+76893000000 76896800843 25631000000 25632266947 4156163520 4157430467
+76896000000 76899800980 25632000000 25633266993 4157163520 4158430513
+76899000000 76902801138 25633000000 25634267046 4158163520 4159430566
+76902000000 76905801296 25634000000 25635267098 4159163520 4160430618
+76905000000 76908801410 25635000000 25636267136 4160163520 4161430656
+76908000000 76911801571 25636000000 25637267190 4161163520 4162430710
+76911000000 76914801698 25637000000 25638267232 4162163520 4163430752
+76914000000 76917801807 25638000000 25639267269 4163163520 4164430789
+76917000000 76920801949 25639000000 25640267316 4164163520 4165430836
+76920000000 76923802183 25640000000 25641267394 4165163520 4166430914
+76923000000 76926802096 25641000000 25642267365 4166163520 4167430885
+76926000000 76929802217 25642000000 25643267405 4167163520 4168430925
+76929000000 76932802325 25643000000 25644267441 4168163520 4169430961
+76932000000 76935802560 25644000000 25645267520 4169163520 4170431040
+76935000000 76938802739 25645000000 25646267579 4170163520 4171431099
+76938000000 76941716379 25646000000 25647238793 4171163520 4172402313
+76941000000 76944803008 25647000000 25648267669 4172163520 4173431189
+76944000000 76947803181 25648000000 25649267727 4173163520 4174431247
+76947000000 76950803297 25649000000 25650267765 4174163520 4175431285
+76950000000 76953803470 25650000000 25651267823 4175163520 4176431343
+76953000000 76956803642 25651000000 25652267880 4176163520 4177431400
+76956000000 76959803698 25652000000 25653267899 4177163520 4178431419
+76959000000 76962803844 25653000000 25654267948 4178163520 4179431468
+76962000000 76965804040 25654000000 25655268013 4179163520 4180431533
+76965000000 76968804069 25655000000 25656268023 4180163520 4181431543
+76968000000 76971804375 25656000000 25657268125 4181163520 4182431645
+76971000000 76974804547 25657000000 25658268182 4182163520 4183431702
+76974000000 76977804680 25658000000 25659268226 4183163520 4184431746
+76977000000 76980804797 25659000000 25660268265 4184163520 4185431785
+76980000000 76983804982 25660000000 25661268327 4185163520 4186431847
+76983000000 76986805088 25661000000 25662268362 4186163520 4187431882
+76986000000 76989805269 25662000000 25663268423 4187163520 4188431943
+76989000000 76992805481 25663000000 25664268493 4188163520 4189432013
+76992000000 76995805588 25664000000 25665268529 4189163520 4190432049
+76995000000 76998805754 25665000000 25666268584 4190163520 4191432104
+76998000000 77001404499 25666000000 25667134833 4191163520 4192298353
+77001000000 77004806025 25667000000 25668268675 4192163520 4193432195
+77004000000 77007806137 25668000000 25669268712 4193163520 4194432232
+77007000000 77010806346 25669000000 25670268782 4194163520 4195432302
+77010000000 77013806425 25670000000 25671268808 4195163520 4196432328
+77013000000 77016806650 25671000000 25672268883 4196163520 4197432403
+77016000000 77019806777 25672000000 25673268925 4197163520 4198432445
+77019000000 77022806866 25673000000 25674268955 4198163520 4199432475
+77022000000 77025806972 25674000000 25675268990 4199163520 4200432510
+77025000000 77028807183 25675000000 25676269061 4200163520 4201432581
+77028000000 77031807392 25676000000 25677269130 4201163520 4202432650
+77031000000 77034807537 25677000000 25678269179 4202163520 4203432699
+77034000000 77037807663 25678000000 25679269221 4203163520 4204432741
+77037000000 77040807829 25679000000 25680269276 4204163520 4205432796
+77040000000 77043807909 25680000000 25681269303 4205163520 4206432823
+77043000000 77046808144 25681000000 25682269381 4206163520 4207432901
+77046000000 77049808303 25682000000 25683269434 4207163520 4208432954
+77049000000 77052808424 25683000000 25684269474 4208163520 4209432994
+77052000000 77055808584 25684000000 25685269528 4209163520 4210433048
+77055000000 77058808667 25685000000 25686269555 4210163520 4211433075
+77058000000 77061808913 25686000000 25687269637 4211163520 4212433157
+77061000000 77064809036 25687000000 25688269678 4212163520 4213433198
+77064000000 77067809172 25688000000 25689269724 4213163520 4214433244
+77067000000 77070809347 25689000000 25690269782 4214163520 4215433302
+77070000000 77073809469 25690000000 25691269823 4215163520 4216433343
+77073000000 77076809619 25691000000 25692269873 4216163520 4217433393
+77076000000 77079809767 25692000000 25693269922 4217163520 4218433442
+77079000000 77081983461 25693000000 25693994487 4218163520 4219158007
+77082000000 77085810087 25694000000 25695270029 4219163520 4220433549
+77085000000 77088810219 25695000000 25696270073 4220163520 4221433593
+77088000000 77091810393 25696000000 25697270131 4221163520 4222433651
+77091000000 77094810512 25697000000 25698270170 4222163520 4223433690
+77094000000 77097810636 25698000000 25699270212 4223163520 4224433732
+77097000000 77100810855 25699000000 25700270285 4224163520 4225433805
+77100000000 77103810991 25700000000 25701270330 4225163520 4226433850
+77103000000 77106811142 25701000000 25702270380 4226163520 4227433900
+77106000000 77109811292 25702000000 25703270430 4227163520 4228433950
+77109000000 77112811407 25703000000 25704270469 4228163520 4229433989
+77112000000 77115811504 25704000000 25705270501 4229163520 4230434021
+77115000000 77118811712 25705000000 25706270570 4230163520 4231434090
+77118000000 77121811867 25706000000 25707270622 4231163520 4232434142
+77121000000 77124812026 25707000000 25708270675 4232163520 4233434195
+77124000000 77127812200 25708000000 25709270733 4233163520 4234434253
+77127000000 77130812300 25709000000 25710270766 4234163520 4235434286
+77130000000 77133812478 25710000000 25711270826 4235163520 4236434346
+77133000000 77136812627 25711000000 25712270875 4236163520 4237434395
+77136000000 77139812755 25712000000 25713270918 4237163520 4238434438
+77139000000 77142812924 25713000000 25714270974 4238163520 4239434494
+77142000000 77145813044 25714000000 25715271014 4239163520 4240434534
+77145000000 77147640394 25715000000 25715880131 4240163520 4241043651
+77148000000 77151813294 25716000000 25717271098 4241163520 4242434618
+77151000000 77154813552 25717000000 25718271184 4242163520 4243434704
+77154000000 77157813657 25718000000 25719271219 4243163520 4244434739
+77157000000 77160813737 25719000000 25720271245 4244163520 4245434765
+77160000000 77163813884 25720000000 25721271294 4245163520 4246434814
+77163000000 77166814138 25721000000 25722271379 4246163520 4247434899
+77166000000 77169814228 25722000000 25723271409 4247163520 4248434929
+77169000000 77172814473 25723000000 25724271491 4248163520 4249435011
+77172000000 77175814551 25724000000 25725271517 4249163520 4250435037
+77175000000 77178814728 25725000000 25726271576 4250163520 4251435096
+77178000000 77181814874 25726000000 25727271624 4251163520 4252435144
+77181000000 77184815018 25727000000 25728271672 4252163520 4253435192
+77184000000 77186437672 25728000000 25728812557 4253163520 4253976077
+77187000000 77190815333 25729000000 25730271777 4254163520 4255435297
+77190000000 77193815493 25730000000 25731271831 4255163520 4256435351
+77193000000 77196815630 25731000000 25732271876 4256163520 4257435396
+77196000000 77199815788 25732000000 25733271929 4257163520 4258435449
+77199000000 77202815946 25733000000 25734271982 4258163520 4259435502
+77202000000 77205816060 25734000000 25735272020 4259163520 4260435540
+77205000000 77208816221 25735000000 25736272073 4260163520 4261435593
+77208000000 77211816348 25736000000 25737272116 4261163520 4262435636
+77211000000 77214816457 25737000000 25738272152 4262163520 4263435672
+77214000000 77217816599 25738000000 25739272199 4263163520 4264435719
+77217000000 77220816833 25739000000 25740272277 4264163520 4265435797
+77220000000 77223816746 25740000000 25741272248 4265163520 4266435768
+77223000000 77226816867 25741000000 25742272289 4266163520 4267435809
+77226000000 77229816975 25742000000 25743272325 4267163520 4268435845
+77229000000 77232817210 25743000000 25744272403 4268163520 4269435923
+77232000000 77235817389 25744000000 25745272463 4269163520 4270435983
+77235000000 77238731029 25745000000 25746243676 4270163520 4271407196
+77238000000 77241817658 25746000000 25747272552 4271163520 4272436072
+77241000000 77244817831 25747000000 25748272610 4272163520 4273436130
+77244000000 77247817947 25748000000 25749272649 4273163520 4274436169
+77247000000 77250818120 25749000000 25750272706 4274163520 4275436226
+77250000000 77253818292 25750000000 25751272764 4275163520 4276436284
+77253000000 77256818348 25751000000 25752272782 4276163520 4277436302
+77256000000 77259818494 25752000000 25753272831 4277163520 4278436351
+77259000000 77262818690 25753000000 25754272896 4278163520 4279436416
+77262000000 77265818719 25754000000 25755272906 4279163520 4280436426
+77265000000 77268819025 25755000000 25756273008 4280163520 4281436528
+77268000000 77271819197 25756000000 25757273065 4281163520 4282436585
+77271000000 77274819330 25757000000 25758273110 4282163520 4283436630
+77274000000 77277819447 25758000000 25759273149 4283163520 4284436669
+77277000000 77280819632 25759000000 25760273210 4284163520 4285436730
+77280000000 77283819738 25760000000 25761273246 4285163520 4286436766
+77283000000 77286819919 25761000000 25762273306 4286163520 4287436826
+77286000000 77289820131 25762000000 25763273377 4287163520 4288436897
+77289000000 77292820238 25763000000 25764273412 4288163520 4289436932
+77292000000 77295820404 25764000000 25765273468 4289163520 4290436988
+77295000000 77298419149 25765000000 25766139716 4290163520 4291303236
+77298000000 77301820675 25766000000 25767273558 4291163520 4292437078
+77301000000 77304820787 25767000000 25768273595 4292163520 4293437115
+77304000000 77307820996 25768000000 25769273665 4293163520 4294437185
+77307000000 77310821075 25769000000 25770273691 4294163520 469915
+77310000000 77313821300 25770000000 25771273766 196224 1469990
+77313000000 77316821427 25771000000 25772273809 1196224 2470033
+77316000000 77319821516 25772000000 25773273838 2196224 3470062
+77319000000 77322821622 25773000000 25774273874 3196224 4470098
+77322000000 77325821833 25774000000 25775273944 4196224 5470168
+77325000000 77328822042 25775000000 25776274014 5196224 6470238
+77328000000 77331822187 25776000000 25777274062 6196224 7470286
+77331000000 77334822313 25777000000 25778274104 7196224 8470328
+77334000000 77337822479 25778000000 25779274159 8196224 9470383
+77337000000 77340822559 25779000000 25780274186 9196224 10470410
+77340000000 77343822794 25780000000 25781274264 10196224 11470488
+77343000000 77346822953 25781000000 25782274317 11196224 12470541
+77346000000 77349823074 25782000000 25783274358 12196224 13470582
+77349000000 77352823234 25783000000 25784274411 13196224 14470635
+77352000000 77355823317 25784000000 25785274439 14196224 15470663
+77355000000 77358823563 25785000000 25786274521 15196224 16470745
+77358000000 77361823686 25786000000 25787274562 16196224 17470786
+77361000000 77364823822 25787000000 25788274607 17196224 18470831
+77364000000 77367823997 25788000000 25789274665 18196224 19470889
+77367000000 77370824119 25789000000 25790274706 19196224 20470930
+77370000000 77373824269 25790000000 25791274756 20196224 21470980
+77373000000 77376824417 25791000000 25792274805 21196224 22471029
+77376000000 77378998111 25792000000 25792999370 22196224 23195594
+77379000000 77382824737 25793000000 25794274912 23196224 24471136
+77382000000 77385824869 25794000000 25795274956 24196224 25471180
+77385000000 77388825043 25795000000 25796275014 25196224 26471238
+77388000000 77391825162 25796000000 25797275054 26196224 27471278
+77391000000 77394825286 25797000000 25798275095 27196224 28471319
+77394000000 77397825505 25798000000 25799275168 28196224 29471392
+77397000000 77400825641 25799000000 25800275213 29196224 30471437
+77400000000 77403825792 25800000000 25801275264 30196224 31471488
+77403000000 77406825942 25801000000 25802275314 31196224 32471538
+77406000000 77409826057 25802000000 25803275352 32196224 33471576
+77409000000 77412826154 25803000000 25804275384 33196224 34471608
+77412000000 77415826362 25804000000 25805275454 34196224 35471678
+77415000000 77418826517 25805000000 25806275505 35196224 36471729
+77418000000 77421826676 25806000000 25807275558 36196224 37471782
+77421000000 77424826850 25807000000 25808275616 37196224 38471840
+77424000000 77427826950 25808000000 25809275650 38196224 39471874
+77427000000 77430827128 25809000000 25810275709 39196224 40471933
+77430000000 77433827277 25810000000 25811275759 40196224 41471983
+77433000000 77436827405 25811000000 25812275801 41196224 42472025
+77436000000 77439827574 25812000000 25813275858 42196224 43472082
+77439000000 77442827694 25813000000 25814275898 43196224 44472122
+77442000000 77444655044 25814000000 25814885014 44196224 45081238
+77445000000 77448827944 25815000000 25816275981 45196224 46472205
+77448000000 77451828202 25816000000 25817276067 46196224 47472291
+77451000000 77454828307 25817000000 25818276102 47196224 48472326
+77454000000 77457828387 25818000000 25819276129 48196224 49472353
+77457000000 77460828534 25819000000 25820276178 49196224 50472402
+77460000000 77463828788 25820000000 25821276262 50196224 51472486
+77463000000 77466828878 25821000000 25822276292 51196224 52472516
+77466000000 77469829123 25822000000 25823276374 52196224 53472598
+77469000000 77472829201 25823000000 25824276400 53196224 54472624
+77472000000 77475829378 25824000000 25825276459 54196224 55472683
+77475000000 77478829524 25825000000 25826276508 55196224 56472732
+77478000000 77481829668 25826000000 25827276556 56196224 57472780
+77481000000 77483452322 25827000000 25827817440 57196224 58013664
+77484000000 77487829983 25828000000 25829276661 58196224 59472885
+77487000000 77490830143 25829000000 25830276714 59196224 60472938
+77490000000 77493830280 25830000000 25831276760 60196224 61472984
+77493000000 77496830438 25831000000 25832276812 61196224 62473036
+77496000000 77499830596 25832000000 25833276865 62196224 63473089
+77499000000 77502830710 25833000000 25834276903 63196224 64473127
+77502000000 77505830871 25834000000 25835276957 64196224 65473181
+77505000000 77508830998 25835000000 25836276999 65196224 66473223
+77508000000 77511831107 25836000000 25837277035 66196224 67473259
+77511000000 77514831249 25837000000 25838277083 67196224 68473307
+77514000000 77517831483 25838000000 25839277161 68196224 69473385
+77517000000 77520831396 25839000000 25840277132 69196224 70473356
+77520000000 77523831517 25840000000 25841277172 70196224 71473396
+77523000000 77526831625 25841000000 25842277208 71196224 72473432
+77526000000 77529831860 25842000000 25843277286 72196224 73473510
+77529000000 77532832039 25843000000 25844277346 73196224 74473570
+77532000000 77535745679 25844000000 25845248559 74196224 75444783
+77535000000 77538832308 25845000000 25846277436 75196224 76473660
+77538000000 77541832481 25846000000 25847277493 76196224 77473717
+77541000000 77544832597 25847000000 25848277532 77196224 78473756
+77544000000 77547832770 25848000000 25849277590 78196224 79473814
+77547000000 77550832942 25849000000 25850277647 79196224 80473871
+77550000000 77553832998 25850000000 25851277666 80196224 81473890
+77553000000 77556833144 25851000000 25852277714 81196224 82473938
+77556000000 77559833340 25852000000 25853277780 82196224 83474004
+77559000000 77562833369 25853000000 25854277789 83196224 84474013
+77562000000 77565833675 25854000000 25855277891 84196224 85474115
+77565000000 77568833847 25855000000 25856277949 85196224 86474173
+77568000000 77571833980 25856000000 25857277993 86196224 87474217
+77571000000 77574834097 25857000000 25858278032 87196224 88474256
+77574000000 77577834282 25858000000 25859278094 88196224 89474318
+77577000000 77580834388 25859000000 25860278129 89196224 90474353
+77580000000 77583834569 25860000000 25861278189 90196224 91474413
+77583000000 77586834781 25861000000 25862278260 91196224 92474484
+77586000000 77589834888 25862000000 25863278296 92196224 93474520
+77589000000 77592835054 25863000000 25864278351 93196224 94474575
+77592000000 77595433799 25864000000 25865144599 94196224 95340823
+77595000000 77598835325 25865000000 25866278441 95196224 96474665
+77598000000 77601835437 25866000000 25867278479 96196224 97474703
+77601000000 77604835646 25867000000 25868278548 97196224 98474772
+77604000000 77607835725 25868000000 25869278575 98196224 99474799
+77607000000 77610835950 25869000000 25870278650 99196224 100474874
+77610000000 77613836077 25870000000 25871278692 100196224 101474916
+77613000000 77616836166 25871000000 25872278722 101196224 102474946
+77616000000 77619836272 25872000000 25873278757 102196224 103474981
+77619000000 77622836483 25873000000 25874278827 103196224 104475051
+77622000000 77625836692 25874000000 25875278897 104196224 105475121
+77625000000 77628836837 25875000000 25876278945 105196224 106475169
+77628000000 77631836963 25876000000 25877278987 106196224 107475211
+77631000000 77634837129 25877000000 25878279043 107196224 108475267
+77634000000 77637837209 25878000000 25879279069 108196224 109475293
+77637000000 77640837444 25879000000 25880279148 109196224 110475372
+77640000000 77643837603 25880000000 25881279201 110196224 111475425
+77643000000 77646837724 25881000000 25882279241 111196224 112475465
+77646000000 77649837884 25882000000 25883279294 112196224 113475518
+77649000000 77652837967 25883000000 25884279322 113196224 114475546
+77652000000 77655838213 25884000000 25885279404 114196224 115475628
+77655000000 77658838336 25885000000 25886279445 115196224 116475669
+77658000000 77661838472 25886000000 25887279490 116196224 117475714
+77661000000 77664838647 25887000000 25888279549 117196224 118475773
+77664000000 77667838769 25888000000 25889279589 118196224 119475813
+77667000000 77670838919 25889000000 25890279639 119196224 120475863
+77670000000 77673839067 25890000000 25891279689 120196224 121475913
+77673000000 77676012761 25891000000 25892004253 121196224 122200477
+77676000000 77679839387 25892000000 25893279795 122196224 123476019
+77679000000 77682839519 25893000000 25894279839 123196224 124476063
+77682000000 77685839693 25894000000 25895279897 124196224 125476121
+77685000000 77688839812 25895000000 25896279937 125196224 126476161
+77688000000 77691839936 25896000000 25897279978 126196224 127476202
+77691000000 77694840155 25897000000 25898280051 127196224 128476275
+77694000000 77697840291 25898000000 25899280097 128196224 129476321
+77697000000 77700840442 25899000000 25900280147 129196224 130476371
+77700000000 77703840592 25900000000 25901280197 130196224 131476421
+77703000000 77706840707 25901000000 25902280235 131196224 132476459
+77706000000 77709840804 25902000000 25903280268 132196224 133476492
+77709000000 77712841012 25903000000 25904280337 133196224 134476561
+77712000000 77715841167 25904000000 25905280389 134196224 135476613
+77715000000 77718841326 25905000000 25906280442 135196224 136476666
+77718000000 77721841500 25906000000 25907280500 136196224 137476724
+77721000000 77724841600 25907000000 25908280533 137196224 138476757
+77724000000 77727841778 25908000000 25909280592 138196224 139476816
+77727000000 77730841927 25909000000 25910280642 139196224 140476866
+77730000000 77733842055 25910000000 25911280685 140196224 141476909
+77733000000 77736842224 25911000000 25912280741 141196224 142476965
+77736000000 77739842344 25912000000 25913280781 142196224 143477005
+77739000000 77741669694 25913000000 25913889898 143196224 144086122
+77742000000 77745842594 25914000000 25915280864 144196224 145477088
+77745000000 77748842852 25915000000 25916280950 145196224 146477174
+77748000000 77751842957 25916000000 25917280985 146196224 147477209
+77751000000 77754843037 25917000000 25918281012 147196224 148477236
+77754000000 77757843184 25918000000 25919281061 148196224 149477285
+77757000000 77760843438 25919000000 25920281146 149196224 150477370
+77760000000 77763843528 25920000000 25921281176 150196224 151477400
+77763000000 77766843773 25921000000 25922281257 151196224 152477481
+77766000000 77769843851 25922000000 25923281283 152196224 153477507
+77769000000 77772844028 25923000000 25924281342 153196224 154477566
+77772000000 77775844174 25924000000 25925281391 154196224 155477615
+77775000000 77778844318 25925000000 25926281439 155196224 156477663
+77778000000 77780466972 25926000000 25926822324 156196224 157018548
+77781000000 77784844633 25927000000 25928281544 157196224 158477768
+77784000000 77787844793 25928000000 25929281597 158196224 159477821
+77787000000 77790844930 25929000000 25930281643 159196224 160477867
+77790000000 77793845088 25930000000 25931281696 160196224 161477920
+77793000000 77796845246 25931000000 25932281748 161196224 162477972
+77796000000 77799845360 25932000000 25933281786 162196224 163478010
+77799000000 77802845521 25933000000 25934281840 163196224 164478064
+77802000000 77805845648 25934000000 25935281882 164196224 165478106
+77805000000 77808845757 25935000000 25936281919 165196224 166478143
+77808000000 77811845899 25936000000 25937281966 166196224 167478190
+77811000000 77814846133 25937000000 25938282044 167196224 168478268
+77814000000 77817846046 25938000000 25939282015 168196224 169478239
+77817000000 77820846167 25939000000 25940282055 169196224 170478279
+77820000000 77823846275 25940000000 25941282091 170196224 171478315
+77823000000 77826846510 25941000000 25942282170 171196224 172478394
+77826000000 77829846689 25942000000 25943282229 172196224 173478453
+77829000000 77832760329 25943000000 25944253443 173196224 174449667
+77832000000 77835846958 25944000000 25945282319 174196224 175478543
+77835000000 77838847131 25945000000 25946282377 175196224 176478601
+77838000000 77841847247 25946000000 25947282415 176196224 177478639
+77841000000 77844847420 25947000000 25948282473 177196224 178478697
+77844000000 77847847592 25948000000 25949282530 178196224 179478754
+77847000000 77850847648 25949000000 25950282549 179196224 180478773
+77850000000 77853847794 25950000000 25951282598 180196224 181478822
+77853000000 77856847990 25951000000 25952282663 181196224 182478887
+77856000000 77859848019 25952000000 25953282673 182196224 183478897
+77859000000 77862848325 25953000000 25954282775 183196224 184478999
+77862000000 77865848497 25954000000 25955282832 184196224 185479056
+77865000000 77868848630 25955000000 25956282876 185196224 186479100
+77868000000 77871848747 25956000000 25957282915 186196224 187479139
+77871000000 77874848932 25957000000 25958282977 187196224 188479201
+77874000000 77877849038 25958000000 25959283012 188196224 189479236
+77877000000 77880849219 25959000000 25960283073 189196224 190479297
+77880000000 77883849431 25960000000 25961283143 190196224 191479367
+77883000000 77886849538 25961000000 25962283179 191196224 192479403
+77886000000 77889849704 25962000000 25963283234 192196224 193479458
+77889000000 77892448449 25963000000 25964149483 193196224 194345707
+77892000000 77895849975 25964000000 25965283325 194196224 195479549
+77895000000 77898850087 25965000000 25966283362 195196224 196479586
+77898000000 77901850296 25966000000 25967283432 196196224 197479656
+77901000000 77904850375 25967000000 25968283458 197196224 198479682
+77904000000 77907850600 25968000000 25969283533 198196224 199479757
+77907000000 77910850727 25969000000 25970283575 199196224 200479799
+77910000000 77913850816 25970000000 25971283605 200196224 201479829
+77913000000 77916850922 25971000000 25972283640 201196224 202479864
+77916000000 77919851133 25972000000 25973283711 202196224 203479935
+77919000000 77922851342 25973000000 25974283780 203196224 204480004
+77922000000 77925851487 25974000000 25975283829 204196224 205480053
+77925000000 77928851613 25975000000 25976283871 205196224 206480095
+77928000000 77931851779 25976000000 25977283926 206196224 207480150
+77931000000 77934851859 25977000000 25978283953 207196224 208480177
+77934000000 77937852094 25978000000 25979284031 208196224 209480255
+77937000000 77940852253 25979000000 25980284084 209196224 210480308
+77940000000 77943852374 25980000000 25981284124 210196224 211480348
+77943000000 77946852534 25981000000 25982284178 211196224 212480402
+77946000000 77949852617 25982000000 25983284205 212196224 213480429
+77949000000 77952852863 25983000000 25984284287 213196224 214480511
+77952000000 77955852986 25984000000 25985284328 214196224 215480552
+77955000000 77958853122 25985000000 25986284374 215196224 216480598
+77958000000 77961853297 25986000000 25987284432 216196224 217480656
+77961000000 77964853419 25987000000 25988284473 217196224 218480697
+77964000000 77967853569 25988000000 25989284523 218196224 219480747
+77967000000 77970853717 25989000000 25990284572 219196224 220480796
+77970000000 77973027411 25990000000 25991009137 220196224 221205361
+77973000000 77976854037 25991000000 25992284679 221196224 222480903
+77976000000 77979854169 25992000000 25993284723 222196224 223480947
+77979000000 77982854343 25993000000 25994284781 223196224 224481005
+77982000000 77985854462 25994000000 25995284820 224196224 225481044
+77985000000 77988854586 25995000000 25996284862 225196224 226481086
+77988000000 77991854805 25996000000 25997284935 226196224 227481159
+77991000000 77994854941 25997000000 25998284980 227196224 228481204
+77994000000 77997855092 25998000000 25999285030 228196224 229481254
+77997000000 78000855242 25999000000 26000285080 229196224 230481304
+78000000000 78003855357 26000000000 26001285119 230196224 231481343
+78003000000 78006855454 26001000000 26002285151 231196224 232481375
+78006000000 78009855662 26002000000 26003285220 232196224 233481444
+78009000000 78012855817 26003000000 26004285272 233196224 234481496
+78012000000 78015855976 26004000000 26005285325 234196224 235481549
+78015000000 78018856150 26005000000 26006285383 235196224 236481607
+78018000000 78021856250 26006000000 26007285416 236196224 237481640
+78021000000 78024856428 26007000000 26008285476 237196224 238481700
+78024000000 78027856577 26008000000 26009285525 238196224 239481749
+78027000000 78030856705 26009000000 26010285568 239196224 240481792
+78030000000 78033856874 26010000000 26011285624 240196224 241481848
+78033000000 78036856994 26011000000 26012285664 241196224 242481888
+78036000000 78038684344 26012000000 26012894781 242196224 243091005
+78039000000 78042857244 26013000000 26014285748 243196224 244481972
+78042000000 78045857502 26014000000 26015285834 244196224 245482058
+78045000000 78048857607 26015000000 26016285869 245196224 246482093
+78048000000 78051857687 26016000000 26017285895 246196224 247482119
+78051000000 78054857834 26017000000 26018285944 247196224 248482168
+78054000000 78057858088 26018000000 26019286029 248196224 249482253
+78057000000 78060858178 26019000000 26020286059 249196224 250482283
+78060000000 78063858423 26020000000 26021286141 250196224 251482365
+78063000000 78066858501 26021000000 26022286167 251196224 252482391
+78066000000 78069858678 26022000000 26023286226 252196224 253482450
+78069000000 78072858824 26023000000 26024286274 253196224 254482498
+78072000000 78075858968 26024000000 26025286322 254196224 255482546
+78075000000 78077481622 26025000000 26025827207 255196224 256023431
+78078000000 78081859283 26026000000 26027286427 256196224 257482651
+78081000000 78084859443 26027000000 26028286481 257196224 258482705
+78084000000 78087859580 26028000000 26029286526 258196224 259482750
+78087000000 78090859738 26029000000 26030286579 259196224 260482803
+78090000000 78093859896 26030000000 26031286632 260196224 261482856
+78093000000 78096860010 26031000000 26032286670 261196224 262482894
+78096000000 78099860171 26032000000 26033286723 262196224 263482947
+78099000000 78102860298 26033000000 26034286766 263196224 264482990
+78102000000 78105860407 26034000000 26035286802 264196224 265483026
+78105000000 78108860549 26035000000 26036286849 265196224 266483073
+78108000000 78111860783 26036000000 26037286927 266196224 267483151
+78111000000 78114860696 26037000000 26038286898 267196224 268483122
+78114000000 78117860817 26038000000 26039286939 268196224 269483163
+78117000000 78120860925 26039000000 26040286975 269196224 270483199
+78120000000 78123861160 26040000000 26041287053 270196224 271483277
+78123000000 78126861339 26041000000 26042287113 271196224 272483337
+78126000000 78129774979 26042000000 26043258326 272196224 273454550
+78129000000 78132861608 26043000000 26044287202 273196224 274483426
+78132000000 78135861781 26044000000 26045287260 274196224 275483484
+78135000000 78138861897 26045000000 26046287299 275196224 276483523
+78138000000 78141862070 26046000000 26047287356 276196224 277483580
+78141000000 78144862242 26047000000 26048287414 277196224 278483638
+78144000000 78147862298 26048000000 26049287432 278196224 279483656
+78147000000 78150862444 26049000000 26050287481 279196224 280483705
+78150000000 78153862640 26050000000 26051287546 280196224 281483770
+78153000000 78156862669 26051000000 26052287556 281196224 282483780
+78156000000 78159862975 26052000000 26053287658 282196224 283483882
+78159000000 78162863147 26053000000 26054287715 283196224 284483939
+78162000000 78165863280 26054000000 26055287760 284196224 285483984
+78165000000 78168863397 26055000000 26056287799 285196224 286484023
+78168000000 78171863582 26056000000 26057287860 286196224 287484084
+78171000000 78174863688 26057000000 26058287896 287196224 288484120
+78174000000 78177863869 26058000000 26059287956 288196224 289484180
+78177000000 78180864081 26059000000 26060288027 289196224 290484251
+78180000000 78183864188 26060000000 26061288062 290196224 291484286
+78183000000 78186864354 26061000000 26062288118 291196224 292484342
+78186000000 78189463099 26062000000 26063154366 292196224 293350590
+78189000000 78192864625 26063000000 26064288208 293196224 294484432
+78192000000 78195864737 26064000000 26065288245 294196224 295484469
+78195000000 78198864946 26065000000 26066288315 295196224 296484539
+78198000000 78201865025 26066000000 26067288341 296196224 297484565
+78201000000 78204865250 26067000000 26068288416 297196224 298484640
+78204000000 78207865377 26068000000 26069288459 298196224 299484683
+78207000000 78210865466 26069000000 26070288488 299196224 300484712
+78210000000 78213865572 26070000000 26071288524 300196224 301484748
+78213000000 78216865783 26071000000 26072288594 301196224 302484818
+78216000000 78219865992 26072000000 26073288664 302196224 303484888
+78219000000 78222866137 26073000000 26074288712 303196224 304484936
+78222000000 78225866263 26074000000 26075288754 304196224 305484978
+78225000000 78228866429 26075000000 26076288809 305196224 306485033
+78228000000 78231866509 26076000000 26077288836 306196224 307485060
+78231000000 78234866744 26077000000 26078288914 307196224 308485138
+78234000000 78237866903 26078000000 26079288967 308196224 309485191
+78237000000 78240867024 26079000000 26080289008 309196224 310485232
+78240000000 78243867184 26080000000 26081289061 310196224 311485285
+78243000000 78246867267 26081000000 26082289089 311196224 312485313
+78246000000 78249867513 26082000000 26083289171 312196224 313485395
+78249000000 78252867636 26083000000 26084289212 313196224 314485436
+78252000000 78255867772 26084000000 26085289257 314196224 315485481
+78255000000 78258867947 26085000000 26086289315 315196224 316485539
+78258000000 78261868069 26086000000 26087289356 316196224 317485580
+78261000000 78264868219 26087000000 26088289406 317196224 318485630
+78264000000 78267868367 26088000000 26089289455 318196224 319485679
+78267000000 78270042061 26089000000 26090014020 319196224 320210244
+78270000000 78273868687 26090000000 26091289562 320196224 321485786
+78273000000 78276868819 26091000000 26092289606 321196224 322485830
+78276000000 78279868993 26092000000 26093289664 322196224 323485888
+78279000000 78282869112 26093000000 26094289704 323196224 324485928
+78282000000 78285869236 26094000000 26095289745 324196224 325485969
+78285000000 78288869455 26095000000 26096289818 325196224 326486042
+78288000000 78291869591 26096000000 26097289863 326196224 327486087
+78291000000 78294869742 26097000000 26098289914 327196224 328486138
+78294000000 78297869892 26098000000 26099289964 328196224 329486188
+78297000000 78300870007 26099000000 26100290002 329196224 330486226
+78300000000 78303870104 26100000000 26101290034 330196224 331486258
+78303000000 78306870312 26101000000 26102290104 331196224 332486328
+78306000000 78309870467 26102000000 26103290155 332196224 333486379
+78309000000 78312870626 26103000000 26104290208 333196224 334486432
+78312000000 78315870800 26104000000 26105290266 334196224 335486490
+78315000000 78318870900 26105000000 26106290300 335196224 336486524
+78318000000 78321871078 26106000000 26107290359 336196224 337486583
+78321000000 78324871227 26107000000 26108290409 337196224 338486633
+78324000000 78327871355 26108000000 26109290451 338196224 339486675
+78327000000 78330871524 26109000000 26110290508 339196224 340486732
+78330000000 78333871644 26110000000 26111290548 340196224 341486772
+78333000000 78335698994 26111000000 26111899664 341196224 342095888
+78336000000 78339871894 26112000000 26113290631 342196224 343486855
+78339000000 78342872152 26113000000 26114290717 343196224 344486941
+78342000000 78345872257 26114000000 26115290752 344196224 345486976
+78345000000 78348872337 26115000000 26116290779 345196224 346487003
+78348000000 78351872484 26116000000 26117290828 346196224 347487052
+78351000000 78354872738 26117000000 26118290912 347196224 348487136
+78354000000 78357872828 26118000000 26119290942 348196224 349487166
+78357000000 78360873073 26119000000 26120291024 349196224 350487248
+78360000000 78363873151 26120000000 26121291050 350196224 351487274
+78363000000 78366873328 26121000000 26122291109 351196224 352487333
+78366000000 78369873474 26122000000 26123291158 352196224 353487382
+78369000000 78372873618 26123000000 26124291206 353196224 354487430
+78372000000 78374496272 26124000000 26124832090 354196224 355028314
+78375000000 78378873933 26125000000 26126291311 355196224 356487535
+78378000000 78381874093 26126000000 26127291364 356196224 357487588
+78381000000 78384874230 26127000000 26128291410 357196224 358487634
+78384000000 78387874388 26128000000 26129291462 358196224 359487686
+78387000000 78390874546 26129000000 26130291515 359196224 360487739
+78390000000 78393874660 26130000000 26131291553 360196224 361487777
+78393000000 78396874821 26131000000 26132291607 361196224 362487831
+78396000000 78399874948 26132000000 26133291649 362196224 363487873
+78399000000 78402875057 26133000000 26134291685 363196224 364487909
+78402000000 78405875199 26134000000 26135291733 364196224 365487957
+78405000000 78408875433 26135000000 26136291811 365196224 366488035
+78408000000 78411875346 26136000000 26137291782 366196224 367488006
+78411000000 78414875467 26137000000 26138291822 367196224 368488046
+78414000000 78417875575 26138000000 26139291858 368196224 369488082
+78417000000 78420875810 26139000000 26140291936 369196224 370488160
+78420000000 78423875989 26140000000 26141291996 370196224 371488220
+78423000000 78426789629 26141000000 26142263209 371196224 372459433
+78426000000 78429876258 26142000000 26143292086 372196224 373488310
+78429000000 78432876431 26143000000 26144292143 373196224 374488367
+78432000000 78435876547 26144000000 26145292182 374196224 375488406
+78435000000 78438876720 26145000000 26146292240 375196224 376488464
+78438000000 78441876892 26146000000 26147292297 376196224 377488521
+78441000000 78444876948 26147000000 26148292316 377196224 378488540
+78444000000 78447877094 26148000000 26149292364 378196224 379488588
+78447000000 78450877290 26149000000 26150292430 379196224 380488654
+78450000000 78453877319 26150000000 26151292439 380196224 381488663
+78453000000 78456877625 26151000000 26152292541 381196224 382488765
+78456000000 78459877797 26152000000 26153292599 382196224 383488823
+78459000000 78462877930 26153000000 26154292643 383196224 384488867
+78462000000 78465878047 26154000000 26155292682 384196224 385488906
+78465000000 78468878232 26155000000 26156292744 385196224 386488968
+78468000000 78471878338 26156000000 26157292779 386196224 387489003
+78471000000 78474878519 26157000000 26158292839 387196224 388489063
+78474000000 78477878731 26158000000 26159292910 388196224 389489134
+78477000000 78480878838 26159000000 26160292946 389196224 390489170
+78480000000 78483879004 26160000000 26161293001 390196224 391489225
+78483000000 78486477749 26161000000 26162159249 391196224 392355473
+78486000000 78489879275 26162000000 26163293091 392196224 393489315
+78489000000 78492879387 26163000000 26164293129 393196224 394489353
+78492000000 78495879596 26164000000 26165293198 394196224 395489422
+78495000000 78498879675 26165000000 26166293225 395196224 396489449
+78498000000 78501879900 26166000000 26167293300 396196224 397489524
+78501000000 78504880027 26167000000 26168293342 397196224 398489566
+78504000000 78507880116 26168000000 26169293372 398196224 399489596
+78507000000 78510880222 26169000000 26170293407 399196224 400489631
+78510000000 78513880433 26170000000 26171293477 400196224 401489701
+78513000000 78516880642 26171000000 26172293547 401196224 402489771
+78516000000 78519880787 26172000000 26173293595 402196224 403489819
+78519000000 78522880913 26173000000 26174293637 403196224 404489861
+78522000000 78525881079 26174000000 26175293693 404196224 405489917
+78525000000 78528881159 26175000000 26176293719 405196224 406489943
+78528000000 78531881394 26176000000 26177293798 406196224 407490022
+78531000000 78534881553 26177000000 26178293851 407196224 408490075
+78534000000 78537881674 26178000000 26179293891 408196224 409490115
+78537000000 78540881834 26179000000 26180293944 409196224 410490168
+78540000000 78543881917 26180000000 26181293972 410196224 411490196
+78543000000 78546882163 26181000000 26182294054 411196224 412490278
+78546000000 78549882286 26182000000 26183294095 412196224 413490319
+78549000000 78552882422 26183000000 26184294140 413196224 414490364
+78552000000 78555882597 26184000000 26185294199 414196224 415490423
+78555000000 78558882719 26185000000 26186294239 415196224 416490463
+78558000000 78561882869 26186000000 26187294289 416196224 417490513
+78561000000 78564883017 26187000000 26188294339 417196224 418490563
+78564000000 78567056711 26188000000 26189018903 418196224 419215127
+78567000000 78570883337 26189000000 26190294445 419196224 420490669
+78570000000 78573883469 26190000000 26191294489 420196224 421490713
+78573000000 78576883643 26191000000 26192294547 421196224 422490771
+78576000000 78579883762 26192000000 26193294587 422196224 423490811
+78579000000 78582883886 26193000000 26194294628 423196224 424490852
+78582000000 78585884105 26194000000 26195294701 424196224 425490925
+78585000000 78588884241 26195000000 26196294747 425196224 426490971
+78588000000 78591884392 26196000000 26197294797 426196224 427491021
+78591000000 78594884542 26197000000 26198294847 427196224 428491071
+78594000000 78597884657 26198000000 26199294885 428196224 429491109
+78597000000 78600884754 26199000000 26200294918 429196224 430491142
+78600000000 78603884962 26200000000 26201294987 430196224 431491211
+78603000000 78606885117 26201000000 26202295039 431196224 432491263
+78606000000 78609885276 26202000000 26203295092 432196224 433491316
+78609000000 78612885450 26203000000 26204295150 433196224 434491374
+78612000000 78615885550 26204000000 26205295183 434196224 435491407
+78615000000 78618885728 26205000000 26206295242 435196224 436491466
+78618000000 78621885877 26206000000 26207295292 436196224 437491516
+78621000000 78624886005 26207000000 26208295335 437196224 438491559
+78624000000 78627886174 26208000000 26209295391 438196224 439491615
+78627000000 78630886294 26209000000 26210295431 439196224 440491655
+78630000000 78632713644 26210000000 26210904548 440196224 441100772
+78633000000 78636886544 26211000000 26212295514 441196224 442491738
+78636000000 78639886802 26212000000 26213295600 442196224 443491824
+78639000000 78642886907 26213000000 26214295635 443196224 444491859
+78642000000 78645886987 26214000000 26215295662 444196224 445491886
+78645000000 78648887134 26215000000 26216295711 445196224 446491935
+78648000000 78651887388 26216000000 26217295796 446196224 447492020
+78651000000 78654887478 26217000000 26218295826 447196224 448492050
+78654000000 78657887723 26218000000 26219295907 448196224 449492131
+78657000000 78660887801 26219000000 26220295933 449196224 450492157
+78660000000 78663887978 26220000000 26221295992 450196224 451492216
+78663000000 78666888124 26221000000 26222296041 451196224 452492265
+78666000000 78669888268 26222000000 26223296089 452196224 453492313
+78669000000 78671510922 26223000000 26223836974 453196224 454033198
+78672000000 78675888583 26224000000 26225296194 454196224 455492418
+78675000000 78678888743 26225000000 26226296247 455196224 456492471
+78678000000 78681888880 26226000000 26227296293 456196224 457492517
+78681000000 78684889038 26227000000 26228296346 457196224 458492570
+78684000000 78687889196 26228000000 26229296398 458196224 459492622
+78687000000 78690889310 26229000000 26230296436 459196224 460492660
+78690000000 78693889471 26230000000 26231296490 460196224 461492714
+78693000000 78696889598 26231000000 26232296532 461196224 462492756
+78696000000 78699889707 26232000000 26233296569 462196224 463492793
+78699000000 78702889849 26233000000 26234296616 463196224 464492840
+78702000000 78705890083 26234000000 26235296694 464196224 465492918
+78705000000 78708889996 26235000000 26236296665 465196224 466492889
+78708000000 78711890117 26236000000 26237296705 466196224 467492929
+78711000000 78714890225 26237000000 26238296741 467196224 468492965
+78714000000 78717890460 26238000000 26239296820 468196224 469493044
+78717000000 78720890639 26239000000 26240296879 469196224 470493103
+78720000000 78723804279 26240000000 26241268093 470196224 471464317
+78723000000 78726890908 26241000000 26242296969 471196224 472493193
+78726000000 78729891081 26242000000 26243297027 472196224 473493251
+78729000000 78732891197 26243000000 26244297065 473196224 474493289
+78732000000 78735891370 26244000000 26245297123 474196224 475493347
+78735000000 78738891542 26245000000 26246297180 475196224 476493404
+78738000000 78741891598 26246000000 26247297199 476196224 477493423
+78741000000 78744891744 26247000000 26248297248 477196224 478493472
+78744000000 78747891940 26248000000 26249297313 478196224 479493537
+78747000000 78750891969 26249000000 26250297323 479196224 480493547
+78750000000 78753892275 26250000000 26251297425 480196224 481493649
+78753000000 78756892447 26251000000 26252297482 481196224 482493706
+78756000000 78759892580 26252000000 26253297526 482196224 483493750
+78759000000 78762892697 26253000000 26254297565 483196224 484493789
+78762000000 78765892882 26254000000 26255297627 484196224 485493851
+78765000000 78768892988 26255000000 26256297662 485196224 486493886
+78768000000 78771893169 26256000000 26257297723 486196224 487493947
+78771000000 78774893381 26257000000 26258297793 487196224 488494017
+78774000000 78777893488 26258000000 26259297829 488196224 489494053
+78777000000 78780893654 26259000000 26260297884 489196224 490494108
+78780000000 78783492399 26260000000 26261164133 490196224 491360357
+78783000000 78786893925 26261000000 26262297975 491196224 492494199
+78786000000 78789894037 26262000000 26263298012 492196224 493494236
+78789000000 78792894246 26263000000 26264298082 493196224 494494306
+78792000000 78795894325 26264000000 26265298108 494196224 495494332
+78795000000 78798894550 26265000000 26266298183 495196224 496494407
+78798000000 78801894677 26266000000 26267298225 496196224 497494449
+78801000000 78804894766 26267000000 26268298255 497196224 498494479
+78804000000 78807894872 26268000000 26269298290 498196224 499494514
+78807000000 78810895083 26269000000 26270298361 499196224 500494585
+78810000000 78813895292 26270000000 26271298430 500196224 501494654
+78813000000 78816895437 26271000000 26272298479 501196224 502494703
+78816000000 78819895563 26272000000 26273298521 502196224 503494745
+78819000000 78822895729 26273000000 26274298576 503196224 504494800
+78822000000 78825895809 26274000000 26275298603 504196224 505494827
+78825000000 78828896044 26275000000 26276298681 505196224 506494905
+78828000000 78831896203 26276000000 26277298734 506196224 507494958
+78831000000 78834896324 26277000000 26278298774 507196224 508494998
+78834000000 78837896484 26278000000 26279298828 508196224 509495052
+78837000000 78840896567 26279000000 26280298855 509196224 510495079
+78840000000 78843896813 26280000000 26281298937 510196224 511495161
+78843000000 78846896936 26281000000 26282298978 511196224 512495202
+78846000000 78849897072 26282000000 26283299024 512196224 513495248
+78849000000 78852897247 26283000000 26284299082 513196224 514495306
+78852000000 78855897369 26284000000 26285299123 514196224 515495347
+78855000000 78858897519 26285000000 26286299173 515196224 516495397
+78858000000 78861897667 26286000000 26287299222 516196224 517495446
+78861000000 78864071361 26287000000 26288023787 517196224 518220011
+78864000000 78867897987 26288000000 26289299329 518196224 519495553
+78867000000 78870898119 26289000000 26290299373 519196224 520495597
+78870000000 78873898293 26290000000 26291299431 520196224 521495655
+78873000000 78876898412 26291000000 26292299470 521196224 522495694
+78876000000 78879898536 26292000000 26293299512 522196224 523495736
+78879000000 78882898755 26293000000 26294299585 523196224 524495809
+78882000000 78885898891 26294000000 26295299630 524196224 525495854
+78885000000 78888899042 26295000000 26296299680 525196224 526495904
+78888000000 78891899192 26296000000 26297299730 526196224 527495954
+78891000000 78894899307 26297000000 26298299769 527196224 528495993
+78894000000 78897899404 26298000000 26299299801 528196224 529496025
+78897000000 78900899612 26299000000 26300299870 529196224 530496094
+78900000000 78903899767 26300000000 26301299922 530196224 531496146
+78903000000 78906899926 26301000000 26302299975 531196224 532496199
+78906000000 78909900100 26302000000 26303300033 532196224 533496257
+78909000000 78912900200 26303000000 26304300066 533196224 534496290
+78912000000 78915900378 26304000000 26305300126 534196224 535496350
+78915000000 78918900527 26305000000 26306300175 535196224 536496399
+78918000000 78921900655 26306000000 26307300218 536196224 537496442
+78921000000 78924900824 26307000000 26308300274 537196224 538496498
+78924000000 78927900944 26308000000 26309300314 538196224 539496538
+78927000000 78929728294 26309000000 26309909431 539196224 540105655
+78930000000 78933901194 26310000000 26311300398 540196224 541496622
+78933000000 78936901452 26311000000 26312300484 541196224 542496708
+78936000000 78939901557 26312000000 26313300519 542196224 543496743
+78939000000 78942901637 26313000000 26314300545 543196224 544496769
+78942000000 78945901784 26314000000 26315300594 544196224 545496818
+78945000000 78948902038 26315000000 26316300679 545196224 546496903
+78948000000 78951902128 26316000000 26317300709 546196224 547496933
+78951000000 78954902373 26317000000 26318300791 547196224 548497015
+78954000000 78957902451 26318000000 26319300817 548196224 549497041
+78957000000 78960902628 26319000000 26320300876 549196224 550497100
+78960000000 78963902774 26320000000 26321300924 550196224 551497148
+78963000000 78966902918 26321000000 26322300972 551196224 552497196
+78966000000 78968525572 26322000000 26322841857 552196224 553038081
+78969000000 78972903233 26323000000 26324301077 553196224 554497301
+78972000000 78975903393 26324000000 26325301131 554196224 555497355
+78975000000 78978903530 26325000000 26326301176 555196224 556497400
+78978000000 78981903688 26326000000 26327301229 556196224 557497453
+78981000000 78984903846 26327000000 26328301282 557196224 558497506
+78984000000 78987903960 26328000000 26329301320 558196224 559497544
+78987000000 78990904121 26329000000 26330301373 559196224 560497597
+78990000000 78993904248 26330000000 26331301416 560196224 561497640
+78993000000 78996904357 26331000000 26332301452 561196224 562497676
+78996000000 78999904499 26332000000 26333301499 562196224 563497723
+78999000000 79002904733 26333000000 26334301577 563196224 564497801
+79002000000 79005904646 26334000000 26335301548 564196224 565497772
+79005000000 79008904767 26335000000 26336301589 565196224 566497813
+79008000000 79011904875 26336000000 26337301625 566196224 567497849
+79011000000 79014905110 26337000000 26338301703 567196224 568497927
+79014000000 79017905289 26338000000 26339301763 568196224 569497987
+79017000000 79020818929 26339000000 26340272976 569196224 570469200
+79020000000 79023905558 26340000000 26341301852 570196224 571498076
+79023000000 79026905731 26341000000 26342301910 571196224 572498134
+79026000000 79029905847 26342000000 26343301949 572196224 573498173
+79029000000 79032906020 26343000000 26344302006 573196224 574498230
+79032000000 79035906192 26344000000 26345302064 574196224 575498288
+79035000000 79038906248 26345000000 26346302082 575196224 576498306
+79038000000 79041906394 26346000000 26347302131 576196224 577498355
+79041000000 79044906590 26347000000 26348302196 577196224 578498420
+79044000000 79047906619 26348000000 26349302206 578196224 579498430
+79047000000 79050906925 26349000000 26350302308 579196224 580498532
+79050000000 79053907097 26350000000 26351302365 580196224 581498589
+79053000000 79056907230 26351000000 26352302410 581196224 582498634
+79056000000 79059907347 26352000000 26353302449 582196224 583498673
+79059000000 79062907532 26353000000 26354302510 583196224 584498734
+79062000000 79065907638 26354000000 26355302546 584196224 585498770
+79065000000 79068907819 26355000000 26356302606 585196224 586498830
+79068000000 79071908031 26356000000 26357302677 586196224 587498901
+79071000000 79074908138 26357000000 26358302712 587196224 588498936
+79074000000 79077908304 26358000000 26359302768 588196224 589498992
+79077000000 79080507049 26359000000 26360169016 589196224 590365240
+79080000000 79083908575 26360000000 26361302858 590196224 591499082
+79083000000 79086908687 26361000000 26362302895 591196224 592499119
+79086000000 79089908896 26362000000 26363302965 592196224 593499189
+79089000000 79092908975 26363000000 26364302991 593196224 594499215
+79092000000 79095909200 26364000000 26365303066 594196224 595499290
+79095000000 79098909327 26365000000 26366303109 595196224 596499333
+79098000000 79101909416 26366000000 26367303138 596196224 597499362
+79101000000 79104909522 26367000000 26368303174 597196224 598499398
+79104000000 79107909733 26368000000 26369303244 598196224 599499468
+79107000000 79110909942 26369000000 26370303314 599196224 600499538
+79110000000 79113910087 26370000000 26371303362 600196224 601499586
+79113000000 79116910213 26371000000 26372303404 601196224 602499628
+79116000000 79119910379 26372000000 26373303459 602196224 603499683
+79119000000 79122910459 26373000000 26374303486 603196224 604499710
+79122000000 79125910694 26374000000 26375303564 604196224 605499788
+79125000000 79128910853 26375000000 26376303617 605196224 606499841
+79128000000 79131910974 26376000000 26377303658 606196224 607499882
+79131000000 79134911134 26377000000 26378303711 607196224 608499935
+79134000000 79137911217 26378000000 26379303739 608196224 609499963
+79137000000 79140911463 26379000000 26380303821 609196224 610500045
+79140000000 79143911586 26380000000 26381303862 610196224 611500086
+79143000000 79146911722 26381000000 26382303907 611196224 612500131
+79146000000 79149911897 26382000000 26383303965 612196224 613500189
+79149000000 79152912019 26383000000 26384304006 613196224 614500230
+79152000000 79155912169 26384000000 26385304056 614196224 615500280
+79155000000 79158912317 26385000000 26386304105 615196224 616500329
+79158000000 79161086011 26386000000 26387028670 616196224 617224894
+79161000000 79164912637 26387000000 26388304212 617196224 618500436
+79164000000 79167912769 26388000000 26389304256 618196224 619500480
+79167000000 79170912943 26389000000 26390304314 619196224 620500538
+79170000000 79173913062 26390000000 26391304354 620196224 621500578
+79173000000 79176913186 26391000000 26392304395 621196224 622500619
+79176000000 79179913405 26392000000 26393304468 622196224 623500692
+79179000000 79182913541 26393000000 26394304513 623196224 624500737
+79182000000 79185913692 26394000000 26395304564 624196224 625500788
+79185000000 79188913842 26395000000 26396304614 625196224 626500838
+79188000000 79191913957 26396000000 26397304652 626196224 627500876
+79191000000 79194914054 26397000000 26398304684 627196224 628500908
+79194000000 79197914262 26398000000 26399304754 628196224 629500978
+79197000000 79200914417 26399000000 26400304805 629196224 630501029
+79200000000 79203914576 26400000000 26401304858 630196224 631501082
+79203000000 79206914750 26401000000 26402304916 631196224 632501140
+79206000000 79209914850 26402000000 26403304950 632196224 633501174
+79209000000 79212915028 26403000000 26404305009 633196224 634501233
+79212000000 79215915177 26404000000 26405305059 634196224 635501283
+79215000000 79218915305 26405000000 26406305101 635196224 636501325
+79218000000 79221915474 26406000000 26407305158 636196224 637501382
+79221000000 79224915594 26407000000 26408305198 637196224 638501422
+79224000000 79226742944 26408000000 26408914314 638196224 639110538
+79227000000 79230915844 26409000000 26410305281 639196224 640501505
+79230000000 79233916102 26410000000 26411305367 640196224 641501591
+79233000000 79236916207 26411000000 26412305402 641196224 642501626
+79236000000 79239916287 26412000000 26413305429 642196224 643501653
+79239000000 79242916434 26413000000 26414305478 643196224 644501702
+79242000000 79245916688 26414000000 26415305562 644196224 645501786
+79245000000 79248916778 26415000000 26416305592 645196224 646501816
+79248000000 79251917023 26416000000 26417305674 646196224 647501898
+79251000000 79254917101 26417000000 26418305700 647196224 648501924
+79254000000 79257917278 26418000000 26419305759 648196224 649501983
+79257000000 79260917424 26419000000 26420305808 649196224 650502032
+79260000000 79263917568 26420000000 26421305856 650196224 651502080
+79263000000 79265540222 26421000000 26421846740 651196224 652042964
+79266000000 79269917883 26422000000 26423305961 652196224 653502185
+79269000000 79272918043 26423000000 26424306014 653196224 654502238
+79272000000 79275918180 26424000000 26425306060 654196224 655502284
+79275000000 79278918338 26425000000 26426306112 655196224 656502336
+79278000000 79281918496 26426000000 26427306165 656196224 657502389
+79281000000 79284918610 26427000000 26428306203 657196224 658502427
+79284000000 79287918771 26428000000 26429306257 658196224 659502481
+79287000000 79290918898 26429000000 26430306299 659196224 660502523
+79290000000 79293919007 26430000000 26431306335 660196224 661502559
+79293000000 79296919149 26431000000 26432306383 661196224 662502607
+79296000000 79299919383 26432000000 26433306461 662196224 663502685
+79299000000 79302919296 26433000000 26434306432 663196224 664502656
+79302000000 79305919417 26434000000 26435306472 664196224 665502696
+79305000000 79308919525 26435000000 26436306508 665196224 666502732
+79308000000 79311919760 26436000000 26437306586 666196224 667502810
+79311000000 79314919939 26437000000 26438306646 667196224 668502870
+79314000000 79317833579 26438000000 26439277859 668196224 669474083
+79317000000 79320920208 26439000000 26440306736 669196224 670502960
+79320000000 79323920381 26440000000 26441306793 670196224 671503017
+79323000000 79326920497 26441000000 26442306832 671196224 672503056
+79326000000 79329920670 26442000000 26443306890 672196224 673503114
+79329000000 79332920842 26443000000 26444306947 673196224 674503171
+79332000000 79335920898 26444000000 26445306966 674196224 675503190
+79335000000 79338921044 26445000000 26446307014 675196224 676503238
+79338000000 79341921240 26446000000 26447307080 676196224 677503304
+79341000000 79344921269 26447000000 26448307089 677196224 678503313
+79344000000 79347921575 26448000000 26449307191 678196224 679503415
+79347000000 79350921747 26449000000 26450307249 679196224 680503473
+79350000000 79353921880 26450000000 26451307293 680196224 681503517
+79353000000 79356921997 26451000000 26452307332 681196224 682503556
+79356000000 79359922182 26452000000 26453307394 682196224 683503618
+79359000000 79362922288 26453000000 26454307429 683196224 684503653
+79362000000 79365922469 26454000000 26455307489 684196224 685503713
+79365000000 79368922681 26455000000 26456307560 685196224 686503784
+79368000000 79371922788 26456000000 26457307596 686196224 687503820
+79371000000 79374922954 26457000000 26458307651 687196224 688503875
+79374000000 79377521699 26458000000 26459173899 688196224 689370123
+79377000000 79380923225 26459000000 26460307741 689196224 690503965
+79380000000 79383923337 26460000000 26461307779 690196224 691504003
+79383000000 79386923546 26461000000 26462307848 691196224 692504072
+79386000000 79389923625 26462000000 26463307875 692196224 693504099
+79389000000 79392923850 26463000000 26464307950 693196224 694504174
+79392000000 79395923977 26464000000 26465307992 694196224 695504216
+79395000000 79398924066 26465000000 26466308022 695196224 696504246
+79398000000 79401924172 26466000000 26467308057 696196224 697504281
+79401000000 79404924383 26467000000 26468308127 697196224 698504351
+79404000000 79407924592 26468000000 26469308197 698196224 699504421
+79407000000 79410924737 26469000000 26470308245 699196224 700504469
+79410000000 79413924863 26470000000 26471308287 700196224 701504511
+79413000000 79416925029 26471000000 26472308343 701196224 702504567
+79416000000 79419925109 26472000000 26473308369 702196224 703504593
+79419000000 79422925344 26473000000 26474308448 703196224 704504672
+79422000000 79425925503 26474000000 26475308501 704196224 705504725
+79425000000 79428925624 26475000000 26476308541 705196224 706504765
+79428000000 79431925784 26476000000 26477308594 706196224 707504818
+79431000000 79434925867 26477000000 26478308622 707196224 708504846
+79434000000 79437926113 26478000000 26479308704 708196224 709504928
+79437000000 79440926236 26479000000 26480308745 709196224 710504969
+79440000000 79443926372 26480000000 26481308790 710196224 711505014
+79443000000 79446926547 26481000000 26482308849 711196224 712505073
+79446000000 79449926669 26482000000 26483308889 712196224 713505113
+79449000000 79452926819 26483000000 26484308939 713196224 714505163
+79452000000 79455926967 26484000000 26485308989 714196224 715505213
+79455000000 79458100661 26485000000 26486033553 715196224 716229777
+79458000000 79461927287 26486000000 26487309095 716196224 717505319
+79461000000 79464927419 26487000000 26488309139 717196224 718505363
+79464000000 79467927593 26488000000 26489309197 718196224 719505421
+79467000000 79470927712 26489000000 26490309237 719196224 720505461
+79470000000 79473927836 26490000000 26491309278 720196224 721505502
+79473000000 79476928055 26491000000 26492309351 721196224 722505575
+79476000000 79479928191 26492000000 26493309397 722196224 723505621
+79479000000 79482928342 26493000000 26494309447 723196224 724505671
+79482000000 79485928492 26494000000 26495309497 724196224 725505721
+79485000000 79488928607 26495000000 26496309535 725196224 726505759
+79488000000 79491928704 26496000000 26497309568 726196224 727505792
+79491000000 79494928912 26497000000 26498309637 727196224 728505861
+79494000000 79497929067 26498000000 26499309689 728196224 729505913
+79497000000 79500929226 26499000000 26500309742 729196224 730505966
+79500000000 79503929400 26500000000 26501309800 730196224 731506024
+79503000000 79506929500 26501000000 26502309833 731196224 732506057
+79506000000 79509929678 26502000000 26503309892 732196224 733506116
+79509000000 79512929827 26503000000 26504309942 733196224 734506166
+79512000000 79515929955 26504000000 26505309985 734196224 735506209
+79515000000 79518930124 26505000000 26506310041 735196224 736506265
+79518000000 79521930244 26506000000 26507310081 736196224 737506305
+79521000000 79523757594 26507000000 26507919198 737196224 738115422
+79524000000 79527930494 26508000000 26509310164 738196224 739506388
+79527000000 79530930752 26509000000 26510310250 739196224 740506474
+79530000000 79533930857 26510000000 26511310285 740196224 741506509
+79533000000 79536930937 26511000000 26512310312 741196224 742506536
+79536000000 79539931084 26512000000 26513310361 742196224 743506585
+79539000000 79542931338 26513000000 26514310446 743196224 744506670
+79542000000 79545931428 26514000000 26515310476 744196224 745506700
+79545000000 79548931673 26515000000 26516310557 745196224 746506781
+79548000000 79551931751 26516000000 26517310583 746196224 747506807
+79551000000 79554931928 26517000000 26518310642 747196224 748506866
+79554000000 79557932074 26518000000 26519310691 748196224 749506915
+79557000000 79560932218 26519000000 26520310739 749196224 750506963
+79560000000 79562554872 26520000000 26520851624 750196224 751047848
+79563000000 79566932533 26521000000 26522310844 751196224 752507068
+79566000000 79569932693 26522000000 26523310897 752196224 753507121
+79569000000 79572932830 26523000000 26524310943 753196224 754507167
+79572000000 79575932988 26524000000 26525310996 754196224 755507220
+79575000000 79578933146 26525000000 26526311048 755196224 756507272
+79578000000 79581933260 26526000000 26527311086 756196224 757507310
+79581000000 79584933421 26527000000 26528311140 757196224 758507364
+79584000000 79587933548 26528000000 26529311182 758196224 759507406
+79587000000 79590933657 26529000000 26530311219 759196224 760507443
+79590000000 79593933799 26530000000 26531311266 760196224 761507490
+79593000000 79596934033 26531000000 26532311344 761196224 762507568
+79596000000 79599933946 26532000000 26533311315 762196224 763507539
+79599000000 79602934067 26533000000 26534311355 763196224 764507579
+79602000000 79605934175 26534000000 26535311391 764196224 765507615
+79605000000 79608934410 26535000000 26536311470 765196224 766507694
+79608000000 79611934589 26536000000 26537311529 766196224 767507753
+79611000000 79614848229 26537000000 26538282743 767196224 768478967
+79614000000 79617934858 26538000000 26539311619 768196224 769507843
+79617000000 79620935031 26539000000 26540311677 769196224 770507901
+79620000000 79623935147 26540000000 26541311715 770196224 771507939
+79623000000 79626935320 26541000000 26542311773 771196224 772507997
+79626000000 79629935492 26542000000 26543311830 772196224 773508054
+79629000000 79632935548 26543000000 26544311849 773196224 774508073
+79632000000 79635935694 26544000000 26545311898 774196224 775508122
+79635000000 79638935890 26545000000 26546311963 775196224 776508187
+79638000000 79641935919 26546000000 26547311973 776196224 777508197
+79641000000 79644936225 26547000000 26548312075 777196224 778508299
+79644000000 79647936397 26548000000 26549312132 778196224 779508356
+79647000000 79650936530 26549000000 26550312176 779196224 780508400
+79650000000 79653936647 26550000000 26551312215 780196224 781508439
+79653000000 79656936832 26551000000 26552312277 781196224 782508501
+79656000000 79659936938 26552000000 26553312312 782196224 783508536
+79659000000 79662937119 26553000000 26554312373 783196224 784508597
+79662000000 79665937331 26554000000 26555312443 784196224 785508667
+79665000000 79668937438 26555000000 26556312479 785196224 786508703
+79668000000 79671937604 26556000000 26557312534 786196224 787508758
+79671000000 79674536349 26557000000 26558178783 787196224 788375007
+79674000000 79677937875 26558000000 26559312625 788196224 789508849
+79677000000 79680937987 26559000000 26560312662 789196224 790508886
+79680000000 79683938196 26560000000 26561312732 790196224 791508956
+79683000000 79686938275 26561000000 26562312758 791196224 792508982
+79686000000 79689938500 26562000000 26563312833 792196224 793509057
+79689000000 79692938627 26563000000 26564312875 793196224 794509099
+79692000000 79695938716 26564000000 26565312905 794196224 795509129
+79695000000 79698938822 26565000000 26566312940 795196224 796509164
+79698000000 79701939033 26566000000 26567313011 796196224 797509235
+79701000000 79704939242 26567000000 26568313080 797196224 798509304
+79704000000 79707939387 26568000000 26569313129 798196224 799509353
+79707000000 79710939513 26569000000 26570313171 799196224 800509395
+79710000000 79713939679 26570000000 26571313226 800196224 801509450
+79713000000 79716939759 26571000000 26572313253 801196224 802509477
+79716000000 79719939994 26572000000 26573313331 802196224 803509555
+79719000000 79722940153 26573000000 26574313384 803196224 804509608
+79722000000 79725940274 26574000000 26575313424 804196224 805509648
+79725000000 79728940434 26575000000 26576313478 805196224 806509702
+79728000000 79731940517 26576000000 26577313505 806196224 807509729
+79731000000 79734940763 26577000000 26578313587 807196224 808509811
+79734000000 79737940886 26578000000 26579313628 808196224 809509852
+79737000000 79740941022 26579000000 26580313674 809196224 810509898
+79740000000 79743941197 26580000000 26581313732 810196224 811509956
+79743000000 79746941319 26581000000 26582313773 811196224 812509997
+79746000000 79749941469 26582000000 26583313823 812196224 813510047
+79749000000 79752941617 26583000000 26584313872 813196224 814510096
+79752000000 79755115311 26584000000 26585038437 814196224 815234661
+79755000000 79758941937 26585000000 26586313979 815196224 816510203
+79758000000 79761942069 26586000000 26587314023 816196224 817510247
+79761000000 79764942243 26587000000 26588314081 817196224 818510305
+79764000000 79767942362 26588000000 26589314120 818196224 819510344
+79767000000 79770942486 26589000000 26590314162 819196224 820510386
+79770000000 79773942705 26590000000 26591314235 820196224 821510459
+79773000000 79776942841 26591000000 26592314280 821196224 822510504
+79776000000 79779942992 26592000000 26593314330 822196224 823510554
+79779000000 79782943142 26593000000 26594314380 823196224 824510604
+79782000000 79785943257 26594000000 26595314419 824196224 825510643
+79785000000 79788943354 26595000000 26596314451 825196224 826510675
+79788000000 79791943562 26596000000 26597314520 826196224 827510744
+79791000000 79794943717 26597000000 26598314572 827196224 828510796
+79794000000 79797943876 26598000000 26599314625 828196224 829510849
+79797000000 79800944050 26599000000 26600314683 829196224 830510907
+79800000000 79803944150 26600000000 26601314716 830196224 831510940
+79803000000 79806944328 26601000000 26602314776 831196224 832511000
+79806000000 79809944477 26602000000 26603314825 832196224 833511049
+79809000000 79812944605 26603000000 26604314868 833196224 834511092
+79812000000 79815944774 26604000000 26605314924 834196224 835511148
+79815000000 79818944894 26605000000 26606314964 835196224 836511188
+79818000000 79820772244 26606000000 26606924081 836196224 837120305
+79821000000 79824945144 26607000000 26608315048 837196224 838511272
+79824000000 79827945402 26608000000 26609315134 838196224 839511358
+79827000000 79830945507 26609000000 26610315169 839196224 840511393
+79830000000 79833945587 26610000000 26611315195 840196224 841511419
+79833000000 79836945734 26611000000 26612315244 841196224 842511468
+79836000000 79839945988 26612000000 26613315329 842196224 843511553
+79839000000 79842946078 26613000000 26614315359 843196224 844511583
+79842000000 79845946323 26614000000 26615315441 844196224 845511665
+79845000000 79848946401 26615000000 26616315467 845196224 846511691
+79848000000 79851946578 26616000000 26617315526 846196224 847511750
+79851000000 79854946724 26617000000 26618315574 847196224 848511798
+79854000000 79857946868 26618000000 26619315622 848196224 849511846
+79857000000 79859569522 26619000000 26619856507 849196224 850052731
+79860000000 79863947183 26620000000 26621315727 850196224 851511951
+79863000000 79866947343 26621000000 26622315781 851196224 852512005
+79866000000 79869947480 26622000000 26623315826 852196224 853512050
+79869000000 79872947638 26623000000 26624315879 853196224 854512103
+79872000000 79875947796 26624000000 26625315932 854196224 855512156
+79875000000 79878947910 26625000000 26626315970 855196224 856512194
+79878000000 79881948071 26626000000 26627316023 856196224 857512247
+79881000000 79884948198 26627000000 26628316066 857196224 858512290
+79884000000 79887948307 26628000000 26629316102 858196224 859512326
+79887000000 79890948449 26629000000 26630316149 859196224 860512373
+79890000000 79893948683 26630000000 26631316227 860196224 861512451
+79893000000 79896948596 26631000000 26632316198 861196224 862512422
+79896000000 79899948717 26632000000 26633316239 862196224 863512463
+79899000000 79902948825 26633000000 26634316275 863196224 864512499
+79902000000 79905949060 26634000000 26635316353 864196224 865512577
+79905000000 79908949239 26635000000 26636316413 865196224 866512637
+79908000000 79911862879 26636000000 26637287626 866196224 867483850
+79911000000 79914949508 26637000000 26638316502 867196224 868512726
+79914000000 79917949681 26638000000 26639316560 868196224 869512784
+79917000000 79920949797 26639000000 26640316599 869196224 870512823
+79920000000 79923949970 26640000000 26641316656 870196224 871512880
+79923000000 79926950142 26641000000 26642316714 871196224 872512938
+79926000000 79929950198 26642000000 26643316732 872196224 873512956
+79929000000 79932950344 26643000000 26644316781 873196224 874513005
+79932000000 79935950540 26644000000 26645316846 874196224 875513070
+79935000000 79938950569 26645000000 26646316856 875196224 876513080
+79938000000 79941950875 26646000000 26647316958 876196224 877513182
+79941000000 79944951047 26647000000 26648317015 877196224 878513239
+79944000000 79947951180 26648000000 26649317060 878196224 879513284
+79947000000 79950951297 26649000000 26650317099 879196224 880513323
+79950000000 79953951482 26650000000 26651317160 880196224 881513384
+79953000000 79956951588 26651000000 26652317196 881196224 882513420
+79956000000 79959951769 26652000000 26653317256 882196224 883513480
+79959000000 79962951981 26653000000 26654317327 883196224 884513551
+79962000000 79965952088 26654000000 26655317362 884196224 885513586
+79965000000 79968952254 26655000000 26656317418 885196224 886513642
+79968000000 79971550999 26656000000 26657183666 886196224 887379890
+79971000000 79974952525 26657000000 26658317508 887196224 888513732
+79974000000 79977952637 26658000000 26659317545 888196224 889513769
+79977000000 79980952846 26659000000 26660317615 889196224 890513839
+79980000000 79983952925 26660000000 26661317641 890196224 891513865
+79983000000 79986953150 26661000000 26662317716 891196224 892513940
+79986000000 79989953277 26662000000 26663317759 892196224 893513983
+79989000000 79992953366 26663000000 26664317788 893196224 894514012
+79992000000 79995953472 26664000000 26665317824 894196224 895514048
+79995000000 79998953683 26665000000 26666317894 895196224 896514118
+79998000000 80001953892 26666000000 26667317964 896196224 897514188
+80001000000 80004954037 26667000000 26668318012 897196224 898514236
+80004000000 80007954163 26668000000 26669318054 898196224 899514278
+80007000000 80010954329 26669000000 26670318109 899196224 900514333
+80010000000 80013954409 26670000000 26671318136 900196224 901514360
+80013000000 80016954644 26671000000 26672318214 901196224 902514438
+80016000000 80019954803 26672000000 26673318267 902196224 903514491
+80019000000 80022954924 26673000000 26674318308 903196224 904514532
+80022000000 80025955084 26674000000 26675318361 904196224 905514585
+80025000000 80028955167 26675000000 26676318389 905196224 906514613
+80028000000 80031955413 26676000000 26677318471 906196224 907514695
+80031000000 80034955536 26677000000 26678318512 907196224 908514736
+80034000000 80037955672 26678000000 26679318557 908196224 909514781
+80037000000 80040955847 26679000000 26680318615 909196224 910514839
+80040000000 80043955969 26680000000 26681318656 910196224 911514880
+80043000000 80046956119 26681000000 26682318706 911196224 912514930
+80046000000 80049956267 26682000000 26683318755 912196224 913514979
+80049000000 80052129961 26683000000 26684043320 913196224 914239544
+80052000000 80055956587 26684000000 26685318862 914196224 915515086
+80055000000 80058956719 26685000000 26686318906 915196224 916515130
+80058000000 80061956893 26686000000 26687318964 916196224 917515188
+80061000000 80064957012 26687000000 26688319004 917196224 918515228
+80064000000 80067957136 26688000000 26689319045 918196224 919515269
+80067000000 80070957355 26689000000 26690319118 919196224 920515342
+80070000000 80073957491 26690000000 26691319163 920196224 921515387
+80073000000 80076957642 26691000000 26692319214 921196224 922515438
+80076000000 80079957792 26692000000 26693319264 922196224 923515488
+80079000000 80082957907 26693000000 26694319302 923196224 924515526
+80082000000 80085958004 26694000000 26695319334 924196224 925515558
+80085000000 80088958212 26695000000 26696319404 925196224 926515628
+80088000000 80091958367 26696000000 26697319455 926196224 927515679
+80091000000 80094958526 26697000000 26698319508 927196224 928515732
+80094000000 80097958700 26698000000 26699319566 928196224 929515790
+80097000000 80100958800 26699000000 26700319600 929196224 930515824
+80100000000 80103958978 26700000000 26701319659 930196224 931515883
+80103000000 80106959127 26701000000 26702319709 931196224 932515933
+80106000000 80109959255 26702000000 26703319751 932196224 933515975
+80109000000 80112959424 26703000000 26704319808 933196224 934516032
+80112000000 80115959544 26704000000 26705319848 934196224 935516072
+80115000000 80117786894 26705000000 26705928964 935196224 936125188
+80118000000 80121959794 26706000000 26707319931 936196224 937516155
+80121000000 80124960052 26707000000 26708320017 937196224 938516241
+80124000000 80127960157 26708000000 26709320052 938196224 939516276
+80127000000 80130960237 26709000000 26710320079 939196224 940516303
+80130000000 80133960384 26710000000 26711320128 940196224 941516352
+80133000000 80136960638 26711000000 26712320212 941196224 942516436
+80136000000 80139960728 26712000000 26713320242 942196224 943516466
+80139000000 80142960973 26713000000 26714320324 943196224 944516548
+80142000000 80145961051 26714000000 26715320350 944196224 945516574
+80145000000 80148961228 26715000000 26716320409 945196224 946516633
+80148000000 80151961374 26716000000 26717320458 946196224 947516682
+80151000000 80154961518 26717000000 26718320506 947196224 948516730
+80154000000 80156584172 26718000000 26718861390 948196224 949057614
+80157000000 80160961833 26719000000 26720320611 949196224 950516835
+80160000000 80163961993 26720000000 26721320664 950196224 951516888
+80163000000 80166962130 26721000000 26722320710 951196224 952516934
+80166000000 80169962288 26722000000 26723320762 952196224 953516986
+80169000000 80172962446 26723000000 26724320815 953196224 954517039
+80172000000 80175962560 26724000000 26725320853 954196224 955517077
+80175000000 80178962721 26725000000 26726320907 955196224 956517131
+80178000000 80181962848 26726000000 26727320949 956196224 957517173
+80181000000 80184962957 26727000000 26728320985 957196224 958517209
+80184000000 80187963099 26728000000 26729321033 958196224 959517257
+80187000000 80190963333 26729000000 26730321111 959196224 960517335
+80190000000 80193963246 26730000000 26731321082 960196224 961517306
+80193000000 80196963367 26731000000 26732321122 961196224 962517346
+80196000000 80199963475 26732000000 26733321158 962196224 963517382
+80199000000 80202963710 26733000000 26734321236 963196224 964517460
+80202000000 80205963889 26734000000 26735321296 964196224 965517520
+80205000000 80208877529 26735000000 26736292509 965196224 966488733
+80208000000 80211964158 26736000000 26737321386 966196224 967517610
+80211000000 80214964331 26737000000 26738321443 967196224 968517667
+80214000000 80217964447 26738000000 26739321482 968196224 969517706
+80217000000 80220964620 26739000000 26740321540 969196224 970517764
+80220000000 80223964792 26740000000 26741321597 970196224 971517821
+80223000000 80226964848 26741000000 26742321616 971196224 972517840
+80226000000 80229964994 26742000000 26743321664 972196224 973517888
+80229000000 80232965190 26743000000 26744321730 973196224 974517954
+80232000000 80235965219 26744000000 26745321739 974196224 975517963
+80235000000 80238965525 26745000000 26746321841 975196224 976518065
+80238000000 80241965697 26746000000 26747321899 976196224 977518123
+80241000000 80244965830 26747000000 26748321943 977196224 978518167
+80244000000 80247965947 26748000000 26749321982 978196224 979518206
+80247000000 80250966132 26749000000 26750322044 979196224 980518268
+80250000000 80253966238 26750000000 26751322079 980196224 981518303
+80253000000 80256966419 26751000000 26752322139 981196224 982518363
+80256000000 80259966631 26752000000 26753322210 982196224 983518434
+80259000000 80262966738 26753000000 26754322246 983196224 984518470
+80262000000 80265966904 26754000000 26755322301 984196224 985518525
+80265000000 80268565649 26755000000 26756188549 985196224 986384773
+80268000000 80271967175 26756000000 26757322391 986196224 987518615
+80271000000 80274967287 26757000000 26758322429 987196224 988518653
+80274000000 80277967496 26758000000 26759322498 988196224 989518722
+80277000000 80280967575 26759000000 26760322525 989196224 990518749
+80280000000 80283967800 26760000000 26761322600 990196224 991518824
+80283000000 80286967927 26761000000 26762322642 991196224 992518866
+80286000000 80289968016 26762000000 26763322672 992196224 993518896
+80289000000 80292968122 26763000000 26764322707 993196224 994518931
+80292000000 80295968333 26764000000 26765322777 994196224 995519001
+80295000000 80298968542 26765000000 26766322847 995196224 996519071
+80298000000 80301968687 26766000000 26767322895 996196224 997519119
+80301000000 80304968813 26767000000 26768322937 997196224 998519161
+80304000000 80307968979 26768000000 26769322993 998196224 999519217
+80307000000 80310969059 26769000000 26770323019 999196224 1000519243
+80310000000 80313969294 26770000000 26771323098 1000196224 1001519322
+80313000000 80316969453 26771000000 26772323151 1001196224 1002519375
+80316000000 80319969574 26772000000 26773323191 1002196224 1003519415
+80319000000 80322969734 26773000000 26774323244 1003196224 1004519468
+80322000000 80325969817 26774000000 26775323272 1004196224 1005519496
+80325000000 80328970063 26775000000 26776323354 1005196224 1006519578
+80328000000 80331970186 26776000000 26777323395 1006196224 1007519619
+80331000000 80334970322 26777000000 26778323440 1007196224 1008519664
+80334000000 80337970497 26778000000 26779323499 1008196224 1009519723
+80337000000 80340970619 26779000000 26780323539 1009196224 1010519763
+80340000000 80343970769 26780000000 26781323589 1010196224 1011519813
+80343000000 80346970917 26781000000 26782323639 1011196224 1012519863
+80346000000 80349144611 26782000000 26783048203 1012196224 1013244427
+80349000000 80352971237 26783000000 26784323745 1013196224 1014519969
+80352000000 80355971369 26784000000 26785323789 1014196224 1015520013
+80355000000 80358971543 26785000000 26786323847 1015196224 1016520071
+80358000000 80361971662 26786000000 26787323887 1016196224 1017520111
+80361000000 80364971786 26787000000 26788323928 1017196224 1018520152
+80364000000 80367972005 26788000000 26789324001 1018196224 1019520225
+80367000000 80370972141 26789000000 26790324047 1019196224 1020520271
+80370000000 80373972292 26790000000 26791324097 1020196224 1021520321
+80373000000 80376972442 26791000000 26792324147 1021196224 1022520371
+80376000000 80379972557 26792000000 26793324185 1022196224 1023520409
+80379000000 80382972654 26793000000 26794324218 1023196224 1024520442
+80382000000 80385972862 26794000000 26795324287 1024196224 1025520511
+80385000000 80388973017 26795000000 26796324339 1025196224 1026520563
+80388000000 80391973176 26796000000 26797324392 1026196224 1027520616
+80391000000 80394973350 26797000000 26798324450 1027196224 1028520674
+80394000000 80397973450 26798000000 26799324483 1028196224 1029520707
+80397000000 80400973628 26799000000 26800324542 1029196224 1030520766
+80400000000 80403973777 26800000000 26801324592 1030196224 1031520816
+80403000000 80406973905 26801000000 26802324635 1031196224 1032520859
+80406000000 80409974074 26802000000 26803324691 1032196224 1033520915
+80409000000 80412974194 26803000000 26804324731 1033196224 1034520955
+80412000000 80414801544 26804000000 26804933848 1034196224 1035130072
+80415000000 80418974444 26805000000 26806324814 1035196224 1036521038
+80418000000 80421974702 26806000000 26807324900 1036196224 1037521124
+80421000000 80424974807 26807000000 26808324935 1037196224 1038521159
+80424000000 80427974887 26808000000 26809324962 1038196224 1039521186
+80427000000 80430975034 26809000000 26810325011 1039196224 1040521235
+80430000000 80433975288 26810000000 26811325096 1040196224 1041521320
+80433000000 80436975378 26811000000 26812325126 1041196224 1042521350
+80436000000 80439975623 26812000000 26813325207 1042196224 1043521431
+80439000000 80442975701 26813000000 26814325233 1043196224 1044521457
+80442000000 80445975878 26814000000 26815325292 1044196224 1045521516
+80445000000 80448976024 26815000000 26816325341 1045196224 1046521565
+80448000000 80451976168 26816000000 26817325389 1046196224 1047521613
+80451000000 80453598822 26817000000 26817866274 1047196224 1048062498
+80454000000 80457976483 26818000000 26819325494 1048196224 1049521718
+80457000000 80460976643 26819000000 26820325547 1049196224 1050521771
+80460000000 80463976780 26820000000 26821325593 1050196224 1051521817
+80463000000 80466976938 26821000000 26822325646 1051196224 1052521870
+80466000000 80469977096 26822000000 26823325698 1052196224 1053521922
+80469000000 80472977210 26823000000 26824325736 1053196224 1054521960
+80472000000 80475977371 26824000000 26825325790 1054196224 1055522014
+80475000000 80478977498 26825000000 26826325832 1055196224 1056522056
+80478000000 80481977607 26826000000 26827325869 1056196224 1057522093
+80481000000 80484977749 26827000000 26828325916 1057196224 1058522140
+80484000000 80487977983 26828000000 26829325994 1058196224 1059522218
+80487000000 80490977896 26829000000 26830325965 1059196224 1060522189
+80490000000 80493978017 26830000000 26831326005 1060196224 1061522229
+80493000000 80496978125 26831000000 26832326041 1061196224 1062522265
+80496000000 80499978360 26832000000 26833326120 1062196224 1063522344
+80499000000 80502978539 26833000000 26834326179 1063196224 1064522403
+80502000000 80505892179 26834000000 26835297393 1064196224 1065493617
+80505000000 80508978808 26835000000 26836326269 1065196224 1066522493
+80508000000 80511978981 26836000000 26837326327 1066196224 1067522551
+80511000000 80514979097 26837000000 26838326365 1067196224 1068522589
+80514000000 80517979270 26838000000 26839326423 1068196224 1069522647
+80517000000 80520979442 26839000000 26840326480 1069196224 1070522704
+80520000000 80523979498 26840000000 26841326499 1070196224 1071522723
+80523000000 80526979644 26841000000 26842326548 1071196224 1072522772
+80526000000 80529979840 26842000000 26843326613 1072196224 1073522837
+80529000000 80532979869 26843000000 26844326623 1073196224 1074522847
+80532000000 80535980175 26844000000 26845326725 1074196224 1075522949
+80535000000 80538980347 26845000000 26846326782 1075196224 1076523006
+80538000000 80541980480 26846000000 26847326826 1076196224 1077523050
+80541000000 80544980597 26847000000 26848326865 1077196224 1078523089
+80544000000 80547980782 26848000000 26849326927 1078196224 1079523151
+80547000000 80550980888 26849000000 26850326962 1079196224 1080523186
+80550000000 80553981069 26850000000 26851327023 1080196224 1081523247
+80553000000 80556981281 26851000000 26852327093 1081196224 1082523317
+80556000000 80559981388 26852000000 26853327129 1082196224 1083523353
+80559000000 80562981554 26853000000 26854327184 1083196224 1084523408
+80562000000 80565580299 26854000000 26855193433 1084196224 1085389657
+80565000000 80568981825 26855000000 26856327275 1085196224 1086523499
+80568000000 80571981937 26856000000 26857327312 1086196224 1087523536
+80571000000 80574982146 26857000000 26858327382 1087196224 1088523606
+80574000000 80577982225 26858000000 26859327408 1088196224 1089523632
+80577000000 80580982450 26859000000 26860327483 1089196224 1090523707
+80580000000 80583982577 26860000000 26861327525 1090196224 1091523749
+80583000000 80586982666 26861000000 26862327555 1091196224 1092523779
+80586000000 80589982772 26862000000 26863327590 1092196224 1093523814
+80589000000 80592982983 26863000000 26864327661 1093196224 1094523885
+80592000000 80595983192 26864000000 26865327730 1094196224 1095523954
+80595000000 80598983337 26865000000 26866327779 1095196224 1096524003
+80598000000 80601983463 26866000000 26867327821 1096196224 1097524045
+80601000000 80604983629 26867000000 26868327876 1097196224 1098524100
+80604000000 80607983709 26868000000 26869327903 1098196224 1099524127
+80607000000 80610983944 26869000000 26870327981 1099196224 1100524205
+80610000000 80613984103 26870000000 26871328034 1100196224 1101524258
+80613000000 80616984224 26871000000 26872328074 1101196224 1102524298
+80616000000 80619984384 26872000000 26873328128 1102196224 1103524352
+80619000000 80622984467 26873000000 26874328155 1103196224 1104524379
+80622000000 80625984713 26874000000 26875328237 1104196224 1105524461
+80625000000 80628984836 26875000000 26876328278 1105196224 1106524502
+80628000000 80631984972 26876000000 26877328324 1106196224 1107524548
+80631000000 80634985147 26877000000 26878328382 1107196224 1108524606
+80634000000 80637985269 26878000000 26879328423 1108196224 1109524647
+80637000000 80640985419 26879000000 26880328473 1109196224 1110524697
+80640000000 80643985567 26880000000 26881328522 1110196224 1111524746
+80643000000 80646159261 26881000000 26882053087 1111196224 1112249311
+80646000000 80649985887 26882000000 26883328629 1112196224 1113524853
+80649000000 80652986019 26883000000 26884328673 1113196224 1114524897
+80652000000 80655986193 26884000000 26885328731 1114196224 1115524955
+80655000000 80658986312 26885000000 26886328770 1115196224 1116524994
+80658000000 80661986436 26886000000 26887328812 1116196224 1117525036
+80661000000 80664986655 26887000000 26888328885 1117196224 1118525109
+80664000000 80667986791 26888000000 26889328930 1118196224 1119525154
+80667000000 80670986942 26889000000 26890328980 1119196224 1120525204
+80670000000 80673987092 26890000000 26891329030 1120196224 1121525254
+80673000000 80676987207 26891000000 26892329069 1121196224 1122525293
+80676000000 80679987304 26892000000 26893329101 1122196224 1123525325
+80679000000 80682987512 26893000000 26894329170 1123196224 1124525394
+80682000000 80685987667 26894000000 26895329222 1124196224 1125525446
+80685000000 80688987826 26895000000 26896329275 1125196224 1126525499
+80688000000 80691988000 26896000000 26897329333 1126196224 1127525557
+80691000000 80694988100 26897000000 26898329366 1127196224 1128525590
+80694000000 80697988278 26898000000 26899329426 1128196224 1129525650
+80697000000 80700988427 26899000000 26900329475 1129196224 1130525699
+80700000000 80703988555 26900000000 26901329518 1130196224 1131525742
+80703000000 80706988724 26901000000 26902329574 1131196224 1132525798
+80706000000 80709988844 26902000000 26903329614 1132196224 1133525838
+80709000000 80711816194 26903000000 26903938731 1133196224 1134134955
+80712000000 80715989094 26904000000 26905329698 1134196224 1135525922
+80715000000 80718989352 26905000000 26906329784 1135196224 1136526008
+80718000000 80721989457 26906000000 26907329819 1136196224 1137526043
+80721000000 80724989537 26907000000 26908329845 1137196224 1138526069
+80724000000 80727989684 26908000000 26909329894 1138196224 1139526118
+80727000000 80730989938 26909000000 26910329979 1139196224 1140526203
+80730000000 80733990028 26910000000 26911330009 1140196224 1141526233
+80733000000 80736990273 26911000000 26912330091 1141196224 1142526315
+80736000000 80739990351 26912000000 26913330117 1142196224 1143526341
+80739000000 80742990528 26913000000 26914330176 1143196224 1144526400
+80742000000 80745990674 26914000000 26915330224 1144196224 1145526448
+80745000000 80748990818 26915000000 26916330272 1145196224 1146526496
+80748000000 80750613472 26916000000 26916871157 1146196224 1147067381
+80751000000 80754991133 26917000000 26918330377 1147196224 1148526601
+80754000000 80757991293 26918000000 26919330431 1148196224 1149526655
+80757000000 80760991430 26919000000 26920330476 1149196224 1150526700
+80760000000 80763991588 26920000000 26921330529 1150196224 1151526753
+80763000000 80766991746 26921000000 26922330582 1151196224 1152526806
+80766000000 80769991860 26922000000 26923330620 1152196224 1153526844
+80769000000 80772992021 26923000000 26924330673 1153196224 1154526897
+80772000000 80775992148 26924000000 26925330716 1154196224 1155526940
+80775000000 80778992257 26925000000 26926330752 1155196224 1156526976
+80778000000 80781992399 26926000000 26927330799 1156196224 1157527023
+80781000000 80784992633 26927000000 26928330877 1157196224 1158527101
+80784000000 80787992546 26928000000 26929330848 1158196224 1159527072
+80787000000 80790992667 26929000000 26930330889 1159196224 1160527113
+80790000000 80793992775 26930000000 26931330925 1160196224 1161527149
+80793000000 80796993010 26931000000 26932331003 1161196224 1162527227
+80796000000 80799993189 26932000000 26933331063 1162196224 1163527287
+80799000000 80802906829 26933000000 26934302276 1163196224 1164498500
+80802000000 80805993458 26934000000 26935331152 1164196224 1165527376
+80805000000 80808993631 26935000000 26936331210 1165196224 1166527434
+80808000000 80811993747 26936000000 26937331249 1166196224 1167527473
+80811000000 80814993920 26937000000 26938331306 1167196224 1168527530
+80814000000 80817994092 26938000000 26939331364 1168196224 1169527588
+80817000000 80820994148 26939000000 26940331382 1169196224 1170527606
+80820000000 80823994294 26940000000 26941331431 1170196224 1171527655
+80823000000 80826994490 26941000000 26942331496 1171196224 1172527720
+80826000000 80829994519 26942000000 26943331506 1172196224 1173527730
+80829000000 80832994825 26943000000 26944331608 1173196224 1174527832
+80832000000 80835994997 26944000000 26945331665 1174196224 1175527889
+80835000000 80838995130 26945000000 26946331710 1175196224 1176527934
+80838000000 80841995247 26946000000 26947331749 1176196224 1177527973
+80841000000 80844995432 26947000000 26948331810 1177196224 1178528034
+80844000000 80847995538 26948000000 26949331846 1178196224 1179528070
+80847000000 80850995719 26949000000 26950331906 1179196224 1180528130
+80850000000 80853995931 26950000000 26951331977 1180196224 1181528201
+80853000000 80856996038 26951000000 26952332012 1181196224 1182528236
+80856000000 80859996204 26952000000 26953332068 1182196224 1183528292
+80859000000 80862594949 26953000000 26954198316 1183196224 1184394540
+80862000000 80865996475 26954000000 26955332158 1184196224 1185528382
+80865000000 80868996587 26955000000 26956332195 1185196224 1186528419
+80868000000 80871996796 26956000000 26957332265 1186196224 1187528489
+80871000000 80874996875 26957000000 26958332291 1187196224 1188528515
+80874000000 80877997100 26958000000 26959332366 1188196224 1189528590
+80877000000 80880997227 26959000000 26960332409 1189196224 1190528633
+80880000000 80883997316 26960000000 26961332438 1190196224 1191528662
+80883000000 80886997422 26961000000 26962332474 1191196224 1192528698
+80886000000 80889997633 26962000000 26963332544 1192196224 1193528768
+80889000000 80892997842 26963000000 26964332614 1193196224 1194528838
+80892000000 80895997987 26964000000 26965332662 1194196224 1195528886
+80895000000 80898998113 26965000000 26966332704 1195196224 1196528928
+80898000000 80901998279 26966000000 26967332759 1196196224 1197528983
+80901000000 80904998359 26967000000 26968332786 1197196224 1198529010
+80904000000 80907998594 26968000000 26969332864 1198196224 1199529088
+80907000000 80910998753 26969000000 26970332917 1199196224 1200529141
+80910000000 80913998874 26970000000 26971332958 1200196224 1201529182
+80913000000 80916999034 26971000000 26972333011 1201196224 1202529235
+80916000000 80919999117 26972000000 26973333039 1202196224 1203529263
+80919000000 80922999363 26973000000 26974333121 1203196224 1204529345
+80922000000 80925999486 26974000000 26975333162 1204196224 1205529386
+80925000000 80928999622 26975000000 26976333207 1205196224 1206529431
+80928000000 80931999797 26976000000 26977333265 1206196224 1207529489
+80931000000 80934999919 26977000000 26978333306 1207196224 1208529530
+80934000000 80938000069 26978000000 26979333356 1208196224 1209529580
+80937000000 80941000217 26979000000 26980333405 1209196224 1210529629
+80940000000 80943173911 26980000000 26981057970 1210196224 1211254194
+80943000000 80947000537 26981000000 26982333512 1211196224 1212529736
+80946000000 80950000669 26982000000 26983333556 1212196224 1213529780
+80949000000 80953000843 26983000000 26984333614 1213196224 1214529838
+80952000000 80956000962 26984000000 26985333654 1214196224 1215529878
+80955000000 80959001086 26985000000 26986333695 1215196224 1216529919
+80958000000 80962001305 26986000000 26987333768 1216196224 1217529992
+80961000000 80965001441 26987000000 26988333813 1217196224 1218530037
+80964000000 80968001592 26988000000 26989333864 1218196224 1219530088
+80967000000 80971001742 26989000000 26990333914 1219196224 1220530138
+80970000000 80974001857 26990000000 26991333952 1220196224 1221530176
+80973000000 80977001954 26991000000 26992333984 1221196224 1222530208
+80976000000 80980002162 26992000000 26993334054 1222196224 1223530278
+80979000000 80983002317 26993000000 26994334105 1223196224 1224530329
+80982000000 80986002476 26994000000 26995334158 1224196224 1225530382
+80985000000 80989002650 26995000000 26996334216 1225196224 1226530440
+80988000000 80992002750 26996000000 26997334250 1226196224 1227530474
+80991000000 80995002928 26997000000 26998334309 1227196224 1228530533
+80994000000 80998003077 26998000000 26999334359 1228196224 1229530583
+80997000000 81001003205 26999000000 27000334401 1229196224 1230530625
+81000000000 81004003374 27000000000 27001334458 1230196224 1231530682
+81003000000 81007003494 27001000000 27002334498 1231196224 1232530722
+81006000000 81008830844 27002000000 27002943614 1232196224 1233139838
+81009000000 81013003744 27003000000 27004334581 1233196224 1234530805
+81012000000 81016004002 27004000000 27005334667 1234196224 1235530891
+81015000000 81019004107 27005000000 27006334702 1235196224 1236530926
+81018000000 81022004187 27006000000 27007334729 1236196224 1237530953
+81021000000 81025004334 27007000000 27008334778 1237196224 1238531002
+81024000000 81028004588 27008000000 27009334862 1238196224 1239531086
+81027000000 81031004678 27009000000 27010334892 1239196224 1240531116
+81030000000 81034004923 27010000000 27011334974 1240196224 1241531198
+81033000000 81037005001 27011000000 27012335000 1241196224 1242531224
+81036000000 81040005178 27012000000 27013335059 1242196224 1243531283
+81039000000 81043005324 27013000000 27014335108 1243196224 1244531332
+81042000000 81046005468 27014000000 27015335156 1244196224 1245531380
+81045000000 81047628122 27015000000 27015876040 1245196224 1246072264
+81048000000 81052005783 27016000000 27017335261 1246196224 1247531485
+81051000000 81055005943 27017000000 27018335314 1247196224 1248531538
+81054000000 81058006080 27018000000 27019335360 1248196224 1249531584
+81057000000 81061006238 27019000000 27020335412 1249196224 1250531636
+81060000000 81064006396 27020000000 27021335465 1250196224 1251531689
+81063000000 81067006510 27021000000 27022335503 1251196224 1252531727
+81066000000 81070006671 27022000000 27023335557 1252196224 1253531781
+81069000000 81073006798 27023000000 27024335599 1253196224 1254531823
+81072000000 81076006907 27024000000 27025335635 1254196224 1255531859
+81075000000 81079007049 27025000000 27026335683 1255196224 1256531907
+81078000000 81082007283 27026000000 27027335761 1256196224 1257531985
+81081000000 81085007196 27027000000 27028335732 1257196224 1258531956
+81084000000 81088007317 27028000000 27029335772 1258196224 1259531996
+81087000000 81091007425 27029000000 27030335808 1259196224 1260532032
+81090000000 81094007660 27030000000 27031335886 1260196224 1261532110
+81093000000 81097007839 27031000000 27032335946 1261196224 1262532170
+81096000000 81099921479 27032000000 27033307159 1262196224 1263503383
+81099000000 81103008108 27033000000 27034336036 1263196224 1264532260
+81102000000 81106008281 27034000000 27035336093 1264196224 1265532317
+81105000000 81109008397 27035000000 27036336132 1265196224 1266532356
+81108000000 81112008570 27036000000 27037336190 1266196224 1267532414
+81111000000 81115008742 27037000000 27038336247 1267196224 1268532471
+81114000000 81118008798 27038000000 27039336266 1268196224 1269532490
+81117000000 81121008944 27039000000 27040336314 1269196224 1270532538
+81120000000 81124009140 27040000000 27041336380 1270196224 1271532604
+81123000000 81127009169 27041000000 27042336389 1271196224 1272532613
+81126000000 81130009475 27042000000 27043336491 1272196224 1273532715
+81129000000 81133009647 27043000000 27044336549 1273196224 1274532773
+81132000000 81136009780 27044000000 27045336593 1274196224 1275532817
+81135000000 81139009897 27045000000 27046336632 1275196224 1276532856
+81138000000 81142010082 27046000000 27047336694 1276196224 1277532918
+81141000000 81145010188 27047000000 27048336729 1277196224 1278532953
+81144000000 81148010369 27048000000 27049336789 1278196224 1279533013
+81147000000 81151010581 27049000000 27050336860 1279196224 1280533084
+81150000000 81154010688 27050000000 27051336896 1280196224 1281533120
+81153000000 81157010854 27051000000 27052336951 1281196224 1282533175
+81156000000 81159609599 27052000000 27053203199 1282196224 1283399423
+81159000000 81163011125 27053000000 27054337041 1283196224 1284533265
+81162000000 81166011237 27054000000 27055337079 1284196224 1285533303
+81165000000 81169011446 27055000000 27056337148 1285196224 1286533372
+81168000000 81172011525 27056000000 27057337175 1286196224 1287533399
+81171000000 81175011750 27057000000 27058337250 1287196224 1288533474
+81174000000 81178011877 27058000000 27059337292 1288196224 1289533516
+81177000000 81181011966 27059000000 27060337322 1289196224 1290533546
+81180000000 81184012072 27060000000 27061337357 1290196224 1291533581
+81183000000 81187012283 27061000000 27062337427 1291196224 1292533651
+81186000000 81190012492 27062000000 27063337497 1292196224 1293533721
+81189000000 81193012637 27063000000 27064337545 1293196224 1294533769
+81192000000 81196012763 27064000000 27065337587 1294196224 1295533811
+81195000000 81199012929 27065000000 27066337643 1295196224 1296533867
+81198000000 81202013009 27066000000 27067337669 1296196224 1297533893
+81201000000 81205013244 27067000000 27068337748 1297196224 1298533972
+81204000000 81208013403 27068000000 27069337801 1298196224 1299534025
+81207000000 81211013524 27069000000 27070337841 1299196224 1300534065
+81210000000 81214013684 27070000000 27071337894 1300196224 1301534118
+81213000000 81217013767 27071000000 27072337922 1301196224 1302534146
+81216000000 81220014013 27072000000 27073338004 1302196224 1303534228
+81219000000 81223014136 27073000000 27074338045 1303196224 1304534269
+81222000000 81226014272 27074000000 27075338090 1304196224 1305534314
+81225000000 81229014447 27075000000 27076338149 1305196224 1306534373
+81228000000 81232014569 27076000000 27077338189 1306196224 1307534413
+81231000000 81235014719 27077000000 27078338239 1307196224 1308534463
+81234000000 81238014867 27078000000 27079338289 1308196224 1309534513
+81237000000 81240188561 27079000000 27080062853 1309196224 1310259077
+81240000000 81244015187 27080000000 27081338395 1310196224 1311534619
+81243000000 81247015319 27081000000 27082338439 1311196224 1312534663
+81246000000 81250015493 27082000000 27083338497 1312196224 1313534721
+81249000000 81253015612 27083000000 27084338537 1313196224 1314534761
+81252000000 81256015736 27084000000 27085338578 1314196224 1315534802
+81255000000 81259015955 27085000000 27086338651 1315196224 1316534875
+81258000000 81262016091 27086000000 27087338697 1316196224 1317534921
+81261000000 81265016242 27087000000 27088338747 1317196224 1318534971
+81264000000 81268016392 27088000000 27089338797 1318196224 1319535021
+81267000000 81271016507 27089000000 27090338835 1319196224 1320535059
+81270000000 81274016604 27090000000 27091338868 1320196224 1321535092
+81273000000 81277016812 27091000000 27092338937 1321196224 1322535161
+81276000000 81280016967 27092000000 27093338989 1322196224 1323535213
+81279000000 81283017126 27093000000 27094339042 1323196224 1324535266
+81282000000 81286017300 27094000000 27095339100 1324196224 1325535324
+81285000000 81289017400 27095000000 27096339133 1325196224 1326535357
+81288000000 81292017578 27096000000 27097339192 1326196224 1327535416
+81291000000 81295017727 27097000000 27098339242 1327196224 1328535466
+81294000000 81298017855 27098000000 27099339285 1328196224 1329535509
+81297000000 81301018024 27099000000 27100339341 1329196224 1330535565
+81300000000 81304018144 27100000000 27101339381 1330196224 1331535605
+81303000000 81305845494 27101000000 27101948498 1331196224 1332144722
+81306000000 81310018394 27102000000 27103339464 1332196224 1333535688
+81309000000 81313018652 27103000000 27104339550 1333196224 1334535774
+81312000000 81316018757 27104000000 27105339585 1334196224 1335535809
+81315000000 81319018837 27105000000 27106339612 1335196224 1336535836
+81318000000 81322018984 27106000000 27107339661 1336196224 1337535885
+81321000000 81325019238 27107000000 27108339746 1337196224 1338535970
+81324000000 81328019328 27108000000 27109339776 1338196224 1339536000
+81327000000 81331019573 27109000000 27110339857 1339196224 1340536081
+81330000000 81334019651 27110000000 27111339883 1340196224 1341536107
+81333000000 81337019828 27111000000 27112339942 1341196224 1342536166
+81336000000 81340019974 27112000000 27113339991 1342196224 1343536215
+81339000000 81343020118 27113000000 27114340039 1343196224 1344536263
+81342000000 81344642772 27114000000 27114880924 1344196224 1345077148
+81345000000 81349020433 27115000000 27116340144 1345196224 1346536368
+81348000000 81352020593 27116000000 27117340197 1346196224 1347536421
+81351000000 81355020730 27117000000 27118340243 1347196224 1348536467
+81354000000 81358020888 27118000000 27119340296 1348196224 1349536520
+81357000000 81361021046 27119000000 27120340348 1349196224 1350536572
+81360000000 81364021160 27120000000 27121340386 1350196224 1351536610
+81363000000 81367021321 27121000000 27122340440 1351196224 1352536664
+81366000000 81370021448 27122000000 27123340482 1352196224 1353536706
+81369000000 81373021557 27123000000 27124340519 1353196224 1354536743
+81372000000 81376021699 27124000000 27125340566 1354196224 1355536790
+81375000000 81379021933 27125000000 27126340644 1355196224 1356536868
+81378000000 81382021846 27126000000 27127340615 1356196224 1357536839
+81381000000 81385021967 27127000000 27128340655 1357196224 1358536879
+81384000000 81388022075 27128000000 27129340691 1358196224 1359536915
+81387000000 81391022310 27129000000 27130340770 1359196224 1360536994
+81390000000 81394022489 27130000000 27131340829 1360196224 1361537053
+81393000000 81396936129 27131000000 27132312043 1361196224 1362508267
+81396000000 81400022758 27132000000 27133340919 1362196224 1363537143
+81399000000 81403022931 27133000000 27134340977 1363196224 1364537201
+81402000000 81406023047 27134000000 27135341015 1364196224 1365537239
+81405000000 81409023220 27135000000 27136341073 1365196224 1366537297
+81408000000 81412023392 27136000000 27137341130 1366196224 1367537354
+81411000000 81415023448 27137000000 27138341149 1367196224 1368537373
+81414000000 81418023594 27138000000 27139341198 1368196224 1369537422
+81417000000 81421023790 27139000000 27140341263 1369196224 1370537487
+81420000000 81424023819 27140000000 27141341273 1370196224 1371537497
+81423000000 81427024125 27141000000 27142341375 1371196224 1372537599
+81426000000 81430024297 27142000000 27143341432 1372196224 1373537656
+81429000000 81433024430 27143000000 27144341476 1373196224 1374537700
+81432000000 81436024547 27144000000 27145341515 1374196224 1375537739
+81435000000 81439024732 27145000000 27146341577 1375196224 1376537801
+81438000000 81442024838 27146000000 27147341612 1376196224 1377537836
+81441000000 81445025019 27147000000 27148341673 1377196224 1378537897
+81444000000 81448025231 27148000000 27149341743 1378196224 1379537967
+81447000000 81451025338 27149000000 27150341779 1379196224 1380538003
+81450000000 81454025504 27150000000 27151341834 1380196224 1381538058
+81453000000 81456624249 27151000000 27152208083 1381196224 1382404307
+81456000000 81460025775 27152000000 27153341925 1382196224 1383538149
+81459000000 81463025887 27153000000 27154341962 1383196224 1384538186
+81462000000 81466026096 27154000000 27155342032 1384196224 1385538256
+81465000000 81469026175 27155000000 27156342058 1385196224 1386538282
+81468000000 81472026400 27156000000 27157342133 1386196224 1387538357
+81471000000 81475026527 27157000000 27158342175 1387196224 1388538399
+81474000000 81478026616 27158000000 27159342205 1388196224 1389538429
+81477000000 81481026722 27159000000 27160342240 1389196224 1390538464
+81480000000 81484026933 27160000000 27161342311 1390196224 1391538535
+81483000000 81487027142 27161000000 27162342380 1391196224 1392538604
+81486000000 81490027287 27162000000 27163342429 1392196224 1393538653
+81489000000 81493027413 27163000000 27164342471 1393196224 1394538695
+81492000000 81496027579 27164000000 27165342526 1394196224 1395538750
+81495000000 81499027659 27165000000 27166342553 1395196224 1396538777
+81498000000 81502027894 27166000000 27167342631 1396196224 1397538855
+81501000000 81505028053 27167000000 27168342684 1397196224 1398538908
+81504000000 81508028174 27168000000 27169342724 1398196224 1399538948
+81507000000 81511028334 27169000000 27170342778 1399196224 1400539002
+81510000000 81514028417 27170000000 27171342805 1400196224 1401539029
+81513000000 81517028663 27171000000 27172342887 1401196224 1402539111
+81516000000 81520028786 27172000000 27173342928 1402196224 1403539152
+81519000000 81523028922 27173000000 27174342974 1403196224 1404539198
+81522000000 81526029097 27174000000 27175343032 1404196224 1405539256
+81525000000 81529029219 27175000000 27176343073 1405196224 1406539297
+81528000000 81532029369 27176000000 27177343123 1406196224 1407539347
+81531000000 81535029517 27177000000 27178343172 1407196224 1408539396
+81534000000 81537203211 27178000000 27179067737 1408196224 1409263961
+81537000000 81541029837 27179000000 27180343279 1409196224 1410539503
+81540000000 81544029969 27180000000 27181343323 1410196224 1411539547
+81543000000 81547030143 27181000000 27182343381 1411196224 1412539605
+81546000000 81550030262 27182000000 27183343420 1412196224 1413539644
+81549000000 81553030386 27183000000 27184343462 1413196224 1414539686
+81552000000 81556030605 27184000000 27185343535 1414196224 1415539759
+81555000000 81559030741 27185000000 27186343580 1415196224 1416539804
+81558000000 81562030892 27186000000 27187343630 1416196224 1417539854
+81561000000 81565031042 27187000000 27188343680 1417196224 1418539904
+81564000000 81568031157 27188000000 27189343719 1418196224 1419539943
+81567000000 81571031254 27189000000 27190343751 1419196224 1420539975
+81570000000 81574031462 27190000000 27191343820 1420196224 1421540044
+81573000000 81577031617 27191000000 27192343872 1421196224 1422540096
+81576000000 81580031776 27192000000 27193343925 1422196224 1423540149
+81579000000 81583031950 27193000000 27194343983 1423196224 1424540207
+81582000000 81586032050 27194000000 27195344016 1424196224 1425540240
+81585000000 81589032228 27195000000 27196344076 1425196224 1426540300
+81588000000 81592032377 27196000000 27197344125 1426196224 1427540349
+81591000000 81595032505 27197000000 27198344168 1427196224 1428540392
+81594000000 81598032674 27198000000 27199344224 1428196224 1429540448
+81597000000 81601032794 27199000000 27200344264 1429196224 1430540488
+81600000000 81602860144 27200000000 27200953381 1430196224 1431149605
+81603000000 81607033044 27201000000 27202344348 1431196224 1432540572
+81606000000 81610033302 27202000000 27203344434 1432196224 1433540658
+81609000000 81613033407 27203000000 27204344469 1433196224 1434540693
+81612000000 81616033487 27204000000 27205344495 1434196224 1435540719
+81615000000 81619033634 27205000000 27206344544 1435196224 1436540768
+81618000000 81622033888 27206000000 27207344629 1436196224 1437540853
+81621000000 81625033978 27207000000 27208344659 1437196224 1438540883
+81624000000 81628034223 27208000000 27209344741 1438196224 1439540965
+81627000000 81631034301 27209000000 27210344767 1439196224 1440540991
+81630000000 81634034478 27210000000 27211344826 1440196224 1441541050
+81633000000 81637034624 27211000000 27212344874 1441196224 1442541098
+81636000000 81640034768 27212000000 27213344922 1442196224 1443541146
+81639000000 81641657422 27213000000 27213885807 1443196224 1444082031
+81642000000 81646035083 27214000000 27215345027 1444196224 1445541251
+81645000000 81649035243 27215000000 27216345081 1445196224 1446541305
+81648000000 81652035380 27216000000 27217345126 1446196224 1447541350
+81651000000 81655035538 27217000000 27218345179 1447196224 1448541403
+81654000000 81658035696 27218000000 27219345232 1448196224 1449541456
+81657000000 81661035810 27219000000 27220345270 1449196224 1450541494
+81660000000 81664035971 27220000000 27221345323 1450196224 1451541547
+81663000000 81667036098 27221000000 27222345366 1451196224 1452541590
+81666000000 81670036207 27222000000 27223345402 1452196224 1453541626
+81669000000 81673036349 27223000000 27224345449 1453196224 1454541673
+81672000000 81676036583 27224000000 27225345527 1454196224 1455541751
+81675000000 81679036496 27225000000 27226345498 1455196224 1456541722
+81678000000 81682036617 27226000000 27227345539 1456196224 1457541763
+81681000000 81685036725 27227000000 27228345575 1457196224 1458541799
+81684000000 81688036960 27228000000 27229345653 1458196224 1459541877
+81687000000 81691037139 27229000000 27230345713 1459196224 1460541937
+81690000000 81693950779 27230000000 27231316926 1460196224 1461513150
+81693000000 81697037408 27231000000 27232345802 1461196224 1462542026
+81696000000 81700037581 27232000000 27233345860 1462196224 1463542084
+81699000000 81703037697 27233000000 27234345899 1463196224 1464542123
+81702000000 81706037870 27234000000 27235345956 1464196224 1465542180
+81705000000 81709038042 27235000000 27236346014 1465196224 1466542238
+81708000000 81712038098 27236000000 27237346032 1466196224 1467542256
+81711000000 81715038244 27237000000 27238346081 1467196224 1468542305
+81714000000 81718038440 27238000000 27239346146 1468196224 1469542370
+81717000000 81721038469 27239000000 27240346156 1469196224 1470542380
+81720000000 81724038775 27240000000 27241346258 1470196224 1471542482
+81723000000 81727038947 27241000000 27242346315 1471196224 1472542539
+81726000000 81730039080 27242000000 27243346360 1472196224 1473542584
+81729000000 81733039197 27243000000 27244346399 1473196224 1474542623
+81732000000 81736039382 27244000000 27245346460 1474196224 1475542684
+81735000000 81739039488 27245000000 27246346496 1475196224 1476542720
+81738000000 81742039669 27246000000 27247346556 1476196224 1477542780
+81741000000 81745039881 27247000000 27248346627 1477196224 1478542851
+81744000000 81748039988 27248000000 27249346662 1478196224 1479542886
+81747000000 81751040154 27249000000 27250346718 1479196224 1480542942
+81750000000 81753638899 27250000000 27251212966 1480196224 1481409190
+81753000000 81757040425 27251000000 27252346808 1481196224 1482543032
+81756000000 81760040537 27252000000 27253346845 1482196224 1483543069
+81759000000 81763040746 27253000000 27254346915 1483196224 1484543139
+81762000000 81766040825 27254000000 27255346941 1484196224 1485543165
+81765000000 81769041050 27255000000 27256347016 1485196224 1486543240
+81768000000 81772041177 27256000000 27257347059 1486196224 1487543283
+81771000000 81775041266 27257000000 27258347088 1487196224 1488543312
+81774000000 81778041372 27258000000 27259347124 1488196224 1489543348
+81777000000 81781041583 27259000000 27260347194 1489196224 1490543418
+81780000000 81784041792 27260000000 27261347264 1490196224 1491543488
+81783000000 81787041937 27261000000 27262347312 1491196224 1492543536
+81786000000 81790042063 27262000000 27263347354 1492196224 1493543578
+81789000000 81793042229 27263000000 27264347409 1493196224 1494543633
+81792000000 81796042309 27264000000 27265347436 1494196224 1495543660
+81795000000 81799042544 27265000000 27266347514 1495196224 1496543738
+81798000000 81802042703 27266000000 27267347567 1496196224 1497543791
+81801000000 81805042824 27267000000 27268347608 1497196224 1498543832
+81804000000 81808042984 27268000000 27269347661 1498196224 1499543885
+81807000000 81811043067 27269000000 27270347689 1499196224 1500543913
+81810000000 81814043313 27270000000 27271347771 1500196224 1501543995
+81813000000 81817043436 27271000000 27272347812 1501196224 1502544036
+81816000000 81820043572 27272000000 27273347857 1502196224 1503544081
+81819000000 81823043747 27273000000 27274347915 1503196224 1504544139
+81822000000 81826043869 27274000000 27275347956 1504196224 1505544180
+81825000000 81829044019 27275000000 27276348006 1505196224 1506544230
+81828000000 81832044167 27276000000 27277348055 1506196224 1507544279
+81831000000 81834217861 27277000000 27278072620 1507196224 1508268844
+81834000000 81838044487 27278000000 27279348162 1508196224 1509544386
+81837000000 81841044619 27279000000 27280348206 1509196224 1510544430
+81840000000 81844044793 27280000000 27281348264 1510196224 1511544488
+81843000000 81847044912 27281000000 27282348304 1511196224 1512544528
+81846000000 81850045036 27282000000 27283348345 1512196224 1513544569
+81849000000 81853045255 27283000000 27284348418 1513196224 1514544642
+81852000000 81856045391 27284000000 27285348463 1514196224 1515544687
+81855000000 81859045542 27285000000 27286348514 1515196224 1516544738
+81858000000 81862045692 27286000000 27287348564 1516196224 1517544788
+81861000000 81865045807 27287000000 27288348602 1517196224 1518544826
+81864000000 81868045904 27288000000 27289348634 1518196224 1519544858
+81867000000 81871046112 27289000000 27290348704 1519196224 1520544928
+81870000000 81874046267 27290000000 27291348755 1520196224 1521544979
+81873000000 81877046426 27291000000 27292348808 1521196224 1522545032
+81876000000 81880046600 27292000000 27293348866 1522196224 1523545090
+81879000000 81883046700 27293000000 27294348900 1523196224 1524545124
+81882000000 81886046878 27294000000 27295348959 1524196224 1525545183
+81885000000 81889047027 27295000000 27296349009 1525196224 1526545233
+81888000000 81892047155 27296000000 27297349051 1526196224 1527545275
+81891000000 81895047324 27297000000 27298349108 1527196224 1528545332
+81894000000 81898047444 27298000000 27299349148 1528196224 1529545372
+81897000000 81899874794 27299000000 27299958264 1529196224 1530154488
+81900000000 81904047694 27300000000 27301349231 1530196224 1531545455
+81903000000 81907047952 27301000000 27302349317 1531196224 1532545541
+81906000000 81910048057 27302000000 27303349352 1532196224 1533545576
+81909000000 81913048137 27303000000 27304349379 1533196224 1534545603
+81912000000 81916048284 27304000000 27305349428 1534196224 1535545652
+81915000000 81919048538 27305000000 27306349512 1535196224 1536545736
+81918000000 81922048628 27306000000 27307349542 1536196224 1537545766
+81921000000 81925048873 27307000000 27308349624 1537196224 1538545848
+81924000000 81928048951 27308000000 27309349650 1538196224 1539545874
+81927000000 81931049128 27309000000 27310349709 1539196224 1540545933
+81930000000 81934049274 27310000000 27311349758 1540196224 1541545982
+81933000000 81937049418 27311000000 27312349806 1541196224 1542546030
+81936000000 81938672072 27312000000 27312890690 1542196224 1543086914
+81939000000 81943049733 27313000000 27314349911 1543196224 1544546135
+81942000000 81946049893 27314000000 27315349964 1544196224 1545546188
+81945000000 81949050030 27315000000 27316350010 1545196224 1546546234
+81948000000 81952050188 27316000000 27317350062 1546196224 1547546286
+81951000000 81955050346 27317000000 27318350115 1547196224 1548546339
+81954000000 81958050460 27318000000 27319350153 1548196224 1549546377
+81957000000 81961050621 27319000000 27320350207 1549196224 1550546431
+81960000000 81964050748 27320000000 27321350249 1550196224 1551546473
+81963000000 81967050857 27321000000 27322350285 1551196224 1552546509
+81966000000 81970050999 27322000000 27323350333 1552196224 1553546557
+81969000000 81973051233 27323000000 27324350411 1553196224 1554546635
+81972000000 81976051146 27324000000 27325350382 1554196224 1555546606
+81975000000 81979051267 27325000000 27326350422 1555196224 1556546646
+81978000000 81982051375 27326000000 27327350458 1556196224 1557546682
+81981000000 81985051610 27327000000 27328350536 1557196224 1558546760
+81984000000 81988051789 27328000000 27329350596 1558196224 1559546820
+81987000000 81990965429 27329000000 27330321809 1559196224 1560518033
+81990000000 81994052058 27330000000 27331350686 1560196224 1561546910
+81993000000 81997052231 27331000000 27332350743 1561196224 1562546967
+81996000000 82000052347 27332000000 27333350782 1562196224 1563547006
+81999000000 82003052520 27333000000 27334350840 1563196224 1564547064
+82002000000 82006052692 27334000000 27335350897 1564196224 1565547121
+82005000000 82009052748 27335000000 27336350916 1565196224 1566547140
+82008000000 82012052894 27336000000 27337350964 1566196224 1567547188
+82011000000 82015053090 27337000000 27338351030 1567196224 1568547254
+82014000000 82018053119 27338000000 27339351039 1568196224 1569547263
+82017000000 82021053425 27339000000 27340351141 1569196224 1570547365
+82020000000 82024053597 27340000000 27341351199 1570196224 1571547423
+82023000000 82027053730 27341000000 27342351243 1571196224 1572547467
+82026000000 82030053847 27342000000 27343351282 1572196224 1573547506
+82029000000 82033054032 27343000000 27344351344 1573196224 1574547568
+82032000000 82036054138 27344000000 27345351379 1574196224 1575547603
+82035000000 82039054319 27345000000 27346351439 1575196224 1576547663
+82038000000 82042054531 27346000000 27347351510 1576196224 1577547734
+82041000000 82045054638 27347000000 27348351546 1577196224 1578547770
+82044000000 82048054804 27348000000 27349351601 1578196224 1579547825
+82047000000 82050653549 27349000000 27350217849 1579196224 1580414073
+82050000000 82054055075 27350000000 27351351691 1580196224 1581547915
+82053000000 82057055187 27351000000 27352351729 1581196224 1582547953
+82056000000 82060055396 27352000000 27353351798 1582196224 1583548022
+82059000000 82063055475 27353000000 27354351825 1583196224 1584548049
+82062000000 82066055700 27354000000 27355351900 1584196224 1585548124
+82065000000 82069055827 27355000000 27356351942 1585196224 1586548166
+82068000000 82072055916 27356000000 27357351972 1586196224 1587548196
+82071000000 82075056022 27357000000 27358352007 1587196224 1588548231
+82074000000 82078056233 27358000000 27359352077 1588196224 1589548301
+82077000000 82081056442 27359000000 27360352147 1589196224 1590548371
+82080000000 82084056587 27360000000 27361352195 1590196224 1591548419
+82083000000 82087056713 27361000000 27362352237 1591196224 1592548461
+82086000000 82090056879 27362000000 27363352293 1592196224 1593548517
+82089000000 82093056959 27363000000 27364352319 1593196224 1594548543
+82092000000 82096057194 27364000000 27365352398 1594196224 1595548622
+82095000000 82099057353 27365000000 27366352451 1595196224 1596548675
+82098000000 82102057474 27366000000 27367352491 1596196224 1597548715
+82101000000 82105057634 27367000000 27368352544 1597196224 1598548768
+82104000000 82108057717 27368000000 27369352572 1598196224 1599548796
+82107000000 82111057963 27369000000 27370352654 1599196224 1600548878
+82110000000 82114058086 27370000000 27371352695 1600196224 1601548919
+82113000000 82117058222 27371000000 27372352740 1601196224 1602548964
+82116000000 82120058397 27372000000 27373352799 1602196224 1603549023
+82119000000 82123058519 27373000000 27374352839 1603196224 1604549063
+82122000000 82126058669 27374000000 27375352889 1604196224 1605549113
+82125000000 82129058817 27375000000 27376352939 1605196224 1606549163
+82128000000 82131232511 27376000000 27377077503 1606196224 1607273727
+82131000000 82135059137 27377000000 27378353045 1607196224 1608549269
+82134000000 82138059269 27378000000 27379353089 1608196224 1609549313
+82137000000 82141059443 27379000000 27380353147 1609196224 1610549371
+82140000000 82144059562 27380000000 27381353187 1610196224 1611549411
+82143000000 82147059686 27381000000 27382353228 1611196224 1612549452
+82146000000 82150059905 27382000000 27383353301 1612196224 1613549525
+82149000000 82153060041 27383000000 27384353347 1613196224 1614549571
+82152000000 82156060192 27384000000 27385353397 1614196224 1615549621
+82155000000 82159060342 27385000000 27386353447 1615196224 1616549671
+82158000000 82162060457 27386000000 27387353485 1616196224 1617549709
+82161000000 82165060554 27387000000 27388353518 1617196224 1618549742
+82164000000 82168060762 27388000000 27389353587 1618196224 1619549811
+82167000000 82171060917 27389000000 27390353639 1619196224 1620549863
+82170000000 82174061076 27390000000 27391353692 1620196224 1621549916
+82173000000 82177061250 27391000000 27392353750 1621196224 1622549974
+82176000000 82180061350 27392000000 27393353783 1622196224 1623550007
+82179000000 82183061528 27393000000 27394353842 1623196224 1624550066
+82182000000 82186061677 27394000000 27395353892 1624196224 1625550116
+82185000000 82189061805 27395000000 27396353935 1625196224 1626550159
+82188000000 82192061974 27396000000 27397353991 1626196224 1627550215
+82191000000 82195062094 27397000000 27398354031 1627196224 1628550255
+82194000000 82196889444 27398000000 27398963148 1628196224 1629159372
+82197000000 82201062344 27399000000 27400354114 1629196224 1630550338
+82200000000 82204062602 27400000000 27401354200 1630196224 1631550424
+82203000000 82207062707 27401000000 27402354235 1631196224 1632550459
+82206000000 82210062787 27402000000 27403354262 1632196224 1633550486
+82209000000 82213062934 27403000000 27404354311 1633196224 1634550535
+82212000000 82216063188 27404000000 27405354396 1634196224 1635550620
+82215000000 82219063278 27405000000 27406354426 1635196224 1636550650
+82218000000 82222063523 27406000000 27407354507 1636196224 1637550731
+82221000000 82225063601 27407000000 27408354533 1637196224 1638550757
+82224000000 82228063778 27408000000 27409354592 1638196224 1639550816
+82227000000 82231063924 27409000000 27410354641 1639196224 1640550865
+82230000000 82234064068 27410000000 27411354689 1640196224 1641550913
+82233000000 82235686722 27411000000 27411895574 1641196224 1642091798
+82236000000 82240064383 27412000000 27413354794 1642196224 1643551018
+82239000000 82243064543 27413000000 27414354847 1643196224 1644551071
+82242000000 82246064680 27414000000 27415354893 1644196224 1645551117
+82245000000 82249064838 27415000000 27416354946 1645196224 1646551170
+82248000000 82252064996 27416000000 27417354998 1646196224 1647551222
+82251000000 82255065110 27417000000 27418355036 1647196224 1648551260
+82254000000 82258065271 27418000000 27419355090 1648196224 1649551314
+82257000000 82261065398 27419000000 27420355132 1649196224 1650551356
+82260000000 82264065507 27420000000 27421355169 1650196224 1651551393
+82263000000 82267065649 27421000000 27422355216 1651196224 1652551440
+82266000000 82270065883 27422000000 27423355294 1652196224 1653551518
+82269000000 82273065796 27423000000 27424355265 1653196224 1654551489
+82272000000 82276065917 27424000000 27425355305 1654196224 1655551529
+82275000000 82279066025 27425000000 27426355341 1655196224 1656551565
+82278000000 82282066260 27426000000 27427355420 1656196224 1657551644
+82281000000 82285066439 27427000000 27428355479 1657196224 1658551703
+82284000000 82287980079 27428000000 27429326693 1658196224 1659522917
+82287000000 82291066708 27429000000 27430355569 1659196224 1660551793
+82290000000 82294066881 27430000000 27431355627 1660196224 1661551851
+82293000000 82297066997 27431000000 27432355665 1661196224 1662551889
+82296000000 82300067170 27432000000 27433355723 1662196224 1663551947
+82299000000 82303067342 27433000000 27434355780 1663196224 1664552004
+82302000000 82306067398 27434000000 27435355799 1664196224 1665552023
+82305000000 82309067544 27435000000 27436355848 1665196224 1666552072
+82308000000 82312067740 27436000000 27437355913 1666196224 1667552137
+82311000000 82315067769 27437000000 27438355923 1667196224 1668552147
+82314000000 82318068075 27438000000 27439356025 1668196224 1669552249
+82317000000 82321068247 27439000000 27440356082 1669196224 1670552306
+82320000000 82324068380 27440000000 27441356126 1670196224 1671552350
+82323000000 82327068497 27441000000 27442356165 1671196224 1672552389
+82326000000 82330068682 27442000000 27443356227 1672196224 1673552451
+82329000000 82333068788 27443000000 27444356262 1673196224 1674552486
+82332000000 82336068969 27444000000 27445356323 1674196224 1675552547
+82335000000 82339069181 27445000000 27446356393 1675196224 1676552617
+82338000000 82342069288 27446000000 27447356429 1676196224 1677552653
+82341000000 82345069454 27447000000 27448356484 1677196224 1678552708
+82344000000 82347668199 27448000000 27449222733 1678196224 1679418957
+82347000000 82351069725 27449000000 27450356575 1679196224 1680552799
+82350000000 82354069837 27450000000 27451356612 1680196224 1681552836
+82353000000 82357070046 27451000000 27452356682 1681196224 1682552906
+82356000000 82360070125 27452000000 27453356708 1682196224 1683552932
+82359000000 82363070350 27453000000 27454356783 1683196224 1684553007
+82362000000 82366070477 27454000000 27455356825 1684196224 1685553049
+82365000000 82369070566 27455000000 27456356855 1685196224 1686553079
+82368000000 82372070672 27456000000 27457356890 1686196224 1687553114
+82371000000 82375070883 27457000000 27458356961 1687196224 1688553185
+82374000000 82378071092 27458000000 27459357030 1688196224 1689553254
+82377000000 82381071237 27459000000 27460357079 1689196224 1690553303
+82380000000 82384071363 27460000000 27461357121 1690196224 1691553345
+82383000000 82387071529 27461000000 27462357176 1691196224 1692553400
+82386000000 82390071609 27462000000 27463357203 1692196224 1693553427
+82389000000 82393071844 27463000000 27464357281 1693196224 1694553505
+82392000000 82396072003 27464000000 27465357334 1694196224 1695553558
+82395000000 82399072124 27465000000 27466357374 1695196224 1696553598
+82398000000 82402072284 27466000000 27467357428 1696196224 1697553652
+82401000000 82405072367 27467000000 27468357455 1697196224 1698553679
+82404000000 82408072613 27468000000 27469357537 1698196224 1699553761
+82407000000 82411072736 27469000000 27470357578 1699196224 1700553802
+82410000000 82414072872 27470000000 27471357624 1700196224 1701553848
+82413000000 82417073047 27471000000 27472357682 1701196224 1702553906
+82416000000 82420073169 27472000000 27473357723 1702196224 1703553947
+82419000000 82423073319 27473000000 27474357773 1703196224 1704553997
+82422000000 82426073467 27474000000 27475357822 1704196224 1705554046
+82425000000 82428247161 27475000000 27476082387 1705196224 1706278611
+82428000000 82432073787 27476000000 27477357929 1706196224 1707554153
+82431000000 82435073919 27477000000 27478357973 1707196224 1708554197
+82434000000 82438074093 27478000000 27479358031 1708196224 1709554255
+82437000000 82441074212 27479000000 27480358070 1709196224 1710554294
+82440000000 82444074336 27480000000 27481358112 1710196224 1711554336
+82443000000 82447074555 27481000000 27482358185 1711196224 1712554409
+82446000000 82450074691 27482000000 27483358230 1712196224 1713554454
+82449000000 82453074842 27483000000 27484358280 1713196224 1714554504
+82452000000 82456074992 27484000000 27485358330 1714196224 1715554554
+82455000000 82459075107 27485000000 27486358369 1715196224 1716554593
+82458000000 82462075204 27486000000 27487358401 1716196224 1717554625
+82461000000 82465075412 27487000000 27488358470 1717196224 1718554694
+82464000000 82468075567 27488000000 27489358522 1718196224 1719554746
+82467000000 82471075726 27489000000 27490358575 1719196224 1720554799
+82470000000 82474075900 27490000000 27491358633 1720196224 1721554857
+82473000000 82477076000 27491000000 27492358666 1721196224 1722554890
+82476000000 82480076178 27492000000 27493358726 1722196224 1723554950
+82479000000 82483076327 27493000000 27494358775 1723196224 1724554999
+82482000000 82486076455 27494000000 27495358818 1724196224 1725555042
+82485000000 82489076624 27495000000 27496358874 1725196224 1726555098
+82488000000 82492076744 27496000000 27497358914 1726196224 1727555138
+82491000000 82493904094 27497000000 27497968031 1727196224 1728164255
+82494000000 82498076994 27498000000 27499358998 1728196224 1729555222
+82497000000 82501077252 27499000000 27500359084 1729196224 1730555308
+82500000000 82504077357 27500000000 27501359119 1730196224 1731555343
+82503000000 82507077437 27501000000 27502359145 1731196224 1732555369
+82506000000 82510077584 27502000000 27503359194 1732196224 1733555418
+82509000000 82513077838 27503000000 27504359279 1733196224 1734555503
+82512000000 82516077928 27504000000 27505359309 1734196224 1735555533
+82515000000 82519078173 27505000000 27506359391 1735196224 1736555615
+82518000000 82522078251 27506000000 27507359417 1736196224 1737555641
+82521000000 82525078428 27507000000 27508359476 1737196224 1738555700
+82524000000 82528078574 27508000000 27509359524 1738196224 1739555748
+82527000000 82531078718 27509000000 27510359572 1739196224 1740555796
+82530000000 82532701372 27510000000 27510900457 1740196224 1741096681
+82533000000 82537079033 27511000000 27512359677 1741196224 1742555901
+82536000000 82540079193 27512000000 27513359731 1742196224 1743555955
+82539000000 82543079330 27513000000 27514359776 1743196224 1744556000
+82542000000 82546079488 27514000000 27515359829 1744196224 1745556053
+82545000000 82549079646 27515000000 27516359882 1745196224 1746556106
+82548000000 82552079760 27516000000 27517359920 1746196224 1747556144
+82551000000 82555079921 27517000000 27518359973 1747196224 1748556197
+82554000000 82558080048 27518000000 27519360016 1748196224 1749556240
+82557000000 82561080157 27519000000 27520360052 1749196224 1750556276
+82560000000 82564080299 27520000000 27521360099 1750196224 1751556323
+82563000000 82567080533 27521000000 27522360177 1751196224 1752556401
+82566000000 82570080446 27522000000 27523360148 1752196224 1753556372
+82569000000 82573080567 27523000000 27524360189 1753196224 1754556413
+82572000000 82576080675 27524000000 27525360225 1754196224 1755556449
+82575000000 82579080910 27525000000 27526360303 1755196224 1756556527
+82578000000 82582081089 27526000000 27527360363 1756196224 1757556587
+82581000000 82584994729 27527000000 27528331576 1757196224 1758527800
+82584000000 82588081358 27528000000 27529360452 1758196224 1759556676
+82587000000 82591081531 27529000000 27530360510 1759196224 1760556734
+82590000000 82594081647 27530000000 27531360549 1760196224 1761556773
+82593000000 82597081820 27531000000 27532360606 1761196224 1762556830
+82596000000 82600081992 27532000000 27533360664 1762196224 1763556888
+82599000000 82603082048 27533000000 27534360682 1763196224 1764556906
+82602000000 82606082194 27534000000 27535360731 1764196224 1765556955
+82605000000 82609082390 27535000000 27536360796 1765196224 1766557020
+82608000000 82612082419 27536000000 27537360806 1766196224 1767557030
+82611000000 82615082725 27537000000 27538360908 1767196224 1768557132
+82614000000 82618082897 27538000000 27539360965 1768196224 1769557189
+82617000000 82621083030 27539000000 27540361010 1769196224 1770557234
+82620000000 82624083147 27540000000 27541361049 1770196224 1771557273
+82623000000 82627083332 27541000000 27542361110 1771196224 1772557334
+82626000000 82630083438 27542000000 27543361146 1772196224 1773557370
+82629000000 82633083619 27543000000 27544361206 1773196224 1774557430
+82632000000 82636083831 27544000000 27545361277 1774196224 1775557501
+82635000000 82639083938 27545000000 27546361312 1775196224 1776557536
+82638000000 82642084104 27546000000 27547361368 1776196224 1777557592
+82641000000 82644682849 27547000000 27548227616 1777196224 1778423840
+82644000000 82648084375 27548000000 27549361458 1778196224 1779557682
+82647000000 82651084487 27549000000 27550361495 1779196224 1780557719
+82650000000 82654084696 27550000000 27551361565 1780196224 1781557789
+82653000000 82657084775 27551000000 27552361591 1781196224 1782557815
+82656000000 82660085000 27552000000 27553361666 1782196224 1783557890
+82659000000 82663085127 27553000000 27554361709 1783196224 1784557933
+82662000000 82666085216 27554000000 27555361738 1784196224 1785557962
+82665000000 82669085322 27555000000 27556361774 1785196224 1786557998
+82668000000 82672085533 27556000000 27557361844 1786196224 1787558068
+82671000000 82675085742 27557000000 27558361914 1787196224 1788558138
+82674000000 82678085887 27558000000 27559361962 1788196224 1789558186
+82677000000 82681086013 27559000000 27560362004 1789196224 1790558228
+82680000000 82684086179 27560000000 27561362059 1790196224 1791558283
+82683000000 82687086259 27561000000 27562362086 1791196224 1792558310
+82686000000 82690086494 27562000000 27563362164 1792196224 1793558388
+82689000000 82693086653 27563000000 27564362217 1793196224 1794558441
+82692000000 82696086774 27564000000 27565362258 1794196224 1795558482
+82695000000 82699086934 27565000000 27566362311 1795196224 1796558535
+82698000000 82702087017 27566000000 27567362339 1796196224 1797558563
+82701000000 82705087263 27567000000 27568362421 1797196224 1798558645
+82704000000 82708087386 27568000000 27569362462 1798196224 1799558686
+82707000000 82711087522 27569000000 27570362507 1799196224 1800558731
+82710000000 82714087697 27570000000 27571362565 1800196224 1801558789
+82713000000 82717087819 27571000000 27572362606 1801196224 1802558830
+82716000000 82720087969 27572000000 27573362656 1802196224 1803558880
+82719000000 82723088117 27573000000 27574362705 1803196224 1804558929
+82722000000 82725261811 27574000000 27575087270 1804196224 1805283494
+82725000000 82729088437 27575000000 27576362812 1805196224 1806559036
+82728000000 82732088569 27576000000 27577362856 1806196224 1807559080
+82731000000 82735088743 27577000000 27578362914 1807196224 1808559138
+82734000000 82738088862 27578000000 27579362954 1808196224 1809559178
+82737000000 82741088986 27579000000 27580362995 1809196224 1810559219
+82740000000 82744089205 27580000000 27581363068 1810196224 1811559292
+82743000000 82747089341 27581000000 27582363113 1811196224 1812559337
+82746000000 82750089492 27582000000 27583363164 1812196224 1813559388
+82749000000 82753089642 27583000000 27584363214 1813196224 1814559438
+82752000000 82756089757 27584000000 27585363252 1814196224 1815559476
+82755000000 82759089854 27585000000 27586363284 1815196224 1816559508
+82758000000 82762090062 27586000000 27587363354 1816196224 1817559578
+82761000000 82765090217 27587000000 27588363405 1817196224 1818559629
+82764000000 82768090376 27588000000 27589363458 1818196224 1819559682
+82767000000 82771090550 27589000000 27590363516 1819196224 1820559740
+82770000000 82774090650 27590000000 27591363550 1820196224 1821559774
+82773000000 82777090828 27591000000 27592363609 1821196224 1822559833
+82776000000 82780090977 27592000000 27593363659 1822196224 1823559883
+82779000000 82783091105 27593000000 27594363701 1823196224 1824559925
+82782000000 82786091274 27594000000 27595363758 1824196224 1825559982
+82785000000 82789091394 27595000000 27596363798 1825196224 1826560022
+82788000000 82790918744 27596000000 27596972914 1826196224 1827169138
+82791000000 82795091644 27597000000 27598363881 1827196224 1828560105
+82794000000 82798091902 27598000000 27599363967 1828196224 1829560191
+82797000000 82801092007 27599000000 27600364002 1829196224 1830560226
+82800000000 82804092087 27600000000 27601364029 1830196224 1831560253
+82803000000 82807092234 27601000000 27602364078 1831196224 1832560302
+82806000000 82810092488 27602000000 27603364162 1832196224 1833560386
+82809000000 82813092578 27603000000 27604364192 1833196224 1834560416
+82812000000 82816092823 27604000000 27605364274 1834196224 1835560498
+82815000000 82819092901 27605000000 27606364300 1835196224 1836560524
+82818000000 82822093078 27606000000 27607364359 1836196224 1837560583
+82821000000 82825093224 27607000000 27608364408 1837196224 1838560632
+82824000000 82828093368 27608000000 27609364456 1838196224 1839560680
+82827000000 82829716022 27609000000 27609905340 1839196224 1840101564
+82830000000 82834093683 27610000000 27611364561 1840196224 1841560785
+82833000000 82837093843 27611000000 27612364614 1841196224 1842560838
+82836000000 82840093980 27612000000 27613364660 1842196224 1843560884
+82839000000 82843094138 27613000000 27614364712 1843196224 1844560936
+82842000000 82846094296 27614000000 27615364765 1844196224 1845560989
+82845000000 82849094410 27615000000 27616364803 1845196224 1846561027
+82848000000 82852094571 27616000000 27617364857 1846196224 1847561081
+82851000000 82855094698 27617000000 27618364899 1847196224 1848561123
+82854000000 82858094807 27618000000 27619364935 1848196224 1849561159
+82857000000 82861094949 27619000000 27620364983 1849196224 1850561207
+82860000000 82864095183 27620000000 27621365061 1850196224 1851561285
+82863000000 82867095096 27621000000 27622365032 1851196224 1852561256
+82866000000 82870095217 27622000000 27623365072 1852196224 1853561296
+82869000000 82873095325 27623000000 27624365108 1853196224 1854561332
+82872000000 82876095560 27624000000 27625365186 1854196224 1855561410
+82875000000 82879095739 27625000000 27626365246 1855196224 1856561470
+82878000000 82882009379 27626000000 27627336459 1856196224 1857532683
+82881000000 82885096008 27627000000 27628365336 1857196224 1858561560
+82884000000 82888096181 27628000000 27629365393 1858196224 1859561617
+82887000000 82891096297 27629000000 27630365432 1859196224 1860561656
+82890000000 82894096470 27630000000 27631365490 1860196224 1861561714
+82893000000 82897096642 27631000000 27632365547 1861196224 1862561771
+82896000000 82900096698 27632000000 27633365566 1862196224 1863561790
+82899000000 82903096844 27633000000 27634365614 1863196224 1864561838
+82902000000 82906097040 27634000000 27635365680 1864196224 1865561904
+82905000000 82909097069 27635000000 27636365689 1865196224 1866561913
+82908000000 82912097375 27636000000 27637365791 1866196224 1867562015
+82911000000 82915097547 27637000000 27638365849 1867196224 1868562073
+82914000000 82918097680 27638000000 27639365893 1868196224 1869562117
+82917000000 82921097797 27639000000 27640365932 1869196224 1870562156
+82920000000 82924097982 27640000000 27641365994 1870196224 1871562218
+82923000000 82927098088 27641000000 27642366029 1871196224 1872562253
+82926000000 82930098269 27642000000 27643366089 1872196224 1873562313
+82929000000 82933098481 27643000000 27644366160 1873196224 1874562384
+82932000000 82936098588 27644000000 27645366196 1874196224 1875562420
+82935000000 82939098754 27645000000 27646366251 1875196224 1876562475
+82938000000 82941697499 27646000000 27647232499 1876196224 1877428723
+82941000000 82945099025 27647000000 27648366341 1877196224 1878562565
+82944000000 82948099137 27648000000 27649366379 1878196224 1879562603
+82947000000 82951099346 27649000000 27650366448 1879196224 1880562672
+82950000000 82954099425 27650000000 27651366475 1880196224 1881562699
+82953000000 82957099650 27651000000 27652366550 1881196224 1882562774
+82956000000 82960099777 27652000000 27653366592 1882196224 1883562816
+82959000000 82963099866 27653000000 27654366622 1883196224 1884562846
+82962000000 82966099972 27654000000 27655366657 1884196224 1885562881
+82965000000 82969100183 27655000000 27656366727 1885196224 1886562951
+82968000000 82972100392 27656000000 27657366797 1886196224 1887563021
+82971000000 82975100537 27657000000 27658366845 1887196224 1888563069
+82974000000 82978100663 27658000000 27659366887 1888196224 1889563111
+82977000000 82981100829 27659000000 27660366943 1889196224 1890563167
+82980000000 82984100909 27660000000 27661366969 1890196224 1891563193
+82983000000 82987101144 27661000000 27662367048 1891196224 1892563272
+82986000000 82990101303 27662000000 27663367101 1892196224 1893563325
+82989000000 82993101424 27663000000 27664367141 1893196224 1894563365
+82992000000 82996101584 27664000000 27665367194 1894196224 1895563418
+82995000000 82999101667 27665000000 27666367222 1895196224 1896563446
+82998000000 83002101913 27666000000 27667367304 1896196224 1897563528
+83001000000 83005102036 27667000000 27668367345 1897196224 1898563569
+83004000000 83008102172 27668000000 27669367390 1898196224 1899563614
+83007000000 83011102347 27669000000 27670367449 1899196224 1900563673
+83010000000 83014102469 27670000000 27671367489 1900196224 1901563713
+83013000000 83017102619 27671000000 27672367539 1901196224 1902563763
+83016000000 83020102767 27672000000 27673367589 1902196224 1903563813
+83019000000 83022276461 27673000000 27674092153 1903196224 1904288377
+83022000000 83026103087 27674000000 27675367695 1904196224 1905563919
+83025000000 83029103219 27675000000 27676367739 1905196224 1906563963
+83028000000 83032103393 27676000000 27677367797 1906196224 1907564021
+83031000000 83035103512 27677000000 27678367837 1907196224 1908564061
+83034000000 83038103636 27678000000 27679367878 1908196224 1909564102
+83037000000 83041103855 27679000000 27680367951 1909196224 1910564175
+83040000000 83044103991 27680000000 27681367997 1910196224 1911564221
+83043000000 83047104142 27681000000 27682368047 1911196224 1912564271
+83046000000 83050104292 27682000000 27683368097 1912196224 1913564321
+83049000000 83053104407 27683000000 27684368135 1913196224 1914564359
+83052000000 83056104504 27684000000 27685368168 1914196224 1915564392
+83055000000 83059104712 27685000000 27686368237 1915196224 1916564461
+83058000000 83062104867 27686000000 27687368289 1916196224 1917564513
+83061000000 83065105026 27687000000 27688368342 1917196224 1918564566
+83064000000 83068105200 27688000000 27689368400 1918196224 1919564624
+83067000000 83071105300 27689000000 27690368433 1919196224 1920564657
+83070000000 83074105478 27690000000 27691368492 1920196224 1921564716
+83073000000 83077105627 27691000000 27692368542 1921196224 1922564766
+83076000000 83080105755 27692000000 27693368585 1922196224 1923564809
+83079000000 83083105924 27693000000 27694368641 1923196224 1924564865
+83082000000 83086106044 27694000000 27695368681 1924196224 1925564905
+83085000000 83087933394 27695000000 27695977798 1925196224 1926174022
+83088000000 83092106294 27696000000 27697368764 1926196224 1927564988
+83091000000 83095106552 27697000000 27698368850 1927196224 1928565074
+83094000000 83098106657 27698000000 27699368885 1928196224 1929565109
+83097000000 83101106737 27699000000 27700368912 1929196224 1930565136
+83100000000 83104106884 27700000000 27701368961 1930196224 1931565185
+83103000000 83107107138 27701000000 27702369046 1931196224 1932565270
+83106000000 83110107228 27702000000 27703369076 1932196224 1933565300
+83109000000 83113107473 27703000000 27704369157 1933196224 1934565381
+83112000000 83116107551 27704000000 27705369183 1934196224 1935565407
+83115000000 83119107728 27705000000 27706369242 1935196224 1936565466
+83118000000 83122107874 27706000000 27707369291 1936196224 1937565515
+83121000000 83125108018 27707000000 27708369339 1937196224 1938565563
+83124000000 83126730672 27708000000 27708910224 1938196224 1939106448
+83127000000 83131108333 27709000000 27710369444 1939196224 1940565668
+83130000000 83134108493 27710000000 27711369497 1940196224 1941565721
+83133000000 83137108630 27711000000 27712369543 1941196224 1942565767
+83136000000 83140108788 27712000000 27713369596 1942196224 1943565820
+83139000000 83143108946 27713000000 27714369648 1943196224 1944565872
+83142000000 83146109060 27714000000 27715369686 1944196224 1945565910
+83145000000 83149109221 27715000000 27716369740 1945196224 1946565964
+83148000000 83152109348 27716000000 27717369782 1946196224 1947566006
+83151000000 83155109457 27717000000 27718369819 1947196224 1948566043
+83154000000 83158109599 27718000000 27719369866 1948196224 1949566090
+83157000000 83161109833 27719000000 27720369944 1949196224 1950566168
+83160000000 83164109746 27720000000 27721369915 1950196224 1951566139
+83163000000 83167109867 27721000000 27722369955 1951196224 1952566179
+83166000000 83170109975 27722000000 27723369991 1952196224 1953566215
+83169000000 83173110210 27723000000 27724370070 1953196224 1954566294
+83172000000 83176110389 27724000000 27725370129 1954196224 1955566353
+83175000000 83179024029 27725000000 27726341343 1955196224 1956537567
+83178000000 83182110658 27726000000 27727370219 1956196224 1957566443
+83181000000 83185110831 27727000000 27728370277 1957196224 1958566501
+83184000000 83188110947 27728000000 27729370315 1958196224 1959566539
+83187000000 83191111120 27729000000 27730370373 1959196224 1960566597
+83190000000 83194111292 27730000000 27731370430 1960196224 1961566654
+83193000000 83197111348 27731000000 27732370449 1961196224 1962566673
+83196000000 83200111494 27732000000 27733370498 1962196224 1963566722
+83199000000 83203111690 27733000000 27734370563 1963196224 1964566787
+83202000000 83206111719 27734000000 27735370573 1964196224 1965566797
+83205000000 83209112025 27735000000 27736370675 1965196224 1966566899
+83208000000 83212112197 27736000000 27737370732 1966196224 1967566956
+83211000000 83215112330 27737000000 27738370776 1967196224 1968567000
+83214000000 83218112447 27738000000 27739370815 1968196224 1969567039
+83217000000 83221112632 27739000000 27740370877 1969196224 1970567101
+83220000000 83224112738 27740000000 27741370912 1970196224 1971567136
+83223000000 83227112919 27741000000 27742370973 1971196224 1972567197
+83226000000 83230113131 27742000000 27743371043 1972196224 1973567267
+83229000000 83233113238 27743000000 27744371079 1973196224 1974567303
+83232000000 83236113404 27744000000 27745371134 1974196224 1975567358
+83235000000 83238712149 27745000000 27746237383 1975196224 1976433607
+83238000000 83242113675 27746000000 27747371225 1976196224 1977567449
+83241000000 83245113787 27747000000 27748371262 1977196224 1978567486
+83244000000 83248113996 27748000000 27749371332 1978196224 1979567556
+83247000000 83251114075 27749000000 27750371358 1979196224 1980567582
+83250000000 83254114300 27750000000 27751371433 1980196224 1981567657
+83253000000 83257114427 27751000000 27752371475 1981196224 1982567699
+83256000000 83260114516 27752000000 27753371505 1982196224 1983567729
+83259000000 83263114622 27753000000 27754371540 1983196224 1984567764
+83262000000 83266114833 27754000000 27755371611 1984196224 1985567835
+83265000000 83269115042 27755000000 27756371680 1985196224 1986567904
+83268000000 83272115187 27756000000 27757371729 1986196224 1987567953
+83271000000 83275115313 27757000000 27758371771 1987196224 1988567995
+83274000000 83278115479 27758000000 27759371826 1988196224 1989568050
+83277000000 83281115559 27759000000 27760371853 1989196224 1990568077
+83280000000 83284115794 27760000000 27761371931 1990196224 1991568155
+83283000000 83287115953 27761000000 27762371984 1991196224 1992568208
+83286000000 83290116074 27762000000 27763372024 1992196224 1993568248
+83289000000 83293116234 27763000000 27764372078 1993196224 1994568302
+83292000000 83296116317 27764000000 27765372105 1994196224 1995568329
+83295000000 83299116563 27765000000 27766372187 1995196224 1996568411
+83298000000 83302116686 27766000000 27767372228 1996196224 1997568452
+83301000000 83305116822 27767000000 27768372274 1997196224 1998568498
+83304000000 83308116997 27768000000 27769372332 1998196224 1999568556
+83307000000 83311117119 27769000000 27770372373 1999196224 2000568597
+83310000000 83314117269 27770000000 27771372423 2000196224 2001568647
+83313000000 83317117417 27771000000 27772372472 2001196224 2002568696
+83316000000 83319291111 27772000000 27773097037 2002196224 2003293261
+83319000000 83323117737 27773000000 27774372579 2003196224 2004568803
+83322000000 83326117869 27774000000 27775372623 2004196224 2005568847
+83325000000 83329118043 27775000000 27776372681 2005196224 2006568905
+83328000000 83332118162 27776000000 27777372720 2006196224 2007568944
+83331000000 83335118286 27777000000 27778372762 2007196224 2008568986
+83334000000 83338118505 27778000000 27779372835 2008196224 2009569059
+83337000000 83341118641 27779000000 27780372880 2009196224 2010569104
+83340000000 83344118792 27780000000 27781372930 2010196224 2011569154
+83343000000 83347118942 27781000000 27782372980 2011196224 2012569204
+83346000000 83350119057 27782000000 27783373019 2012196224 2013569243
+83349000000 83353119154 27783000000 27784373051 2013196224 2014569275
+83352000000 83356119362 27784000000 27785373120 2014196224 2015569344
+83355000000 83359119517 27785000000 27786373172 2015196224 2016569396
+83358000000 83362119676 27786000000 27787373225 2016196224 2017569449
+83361000000 83365119850 27787000000 27788373283 2017196224 2018569507
+83364000000 83368119950 27788000000 27789373316 2018196224 2019569540
+83367000000 83371120128 27789000000 27790373376 2019196224 2020569600
+83370000000 83374120277 27790000000 27791373425 2020196224 2021569649
+83373000000 83377120405 27791000000 27792373468 2021196224 2022569692
+83376000000 83380120574 27792000000 27793373524 2022196224 2023569748
+83379000000 83383120694 27793000000 27794373564 2023196224 2024569788
+83382000000 83384948044 27794000000 27794982681 2024196224 2025178905
+83385000000 83389120944 27795000000 27796373648 2025196224 2026569872
+83388000000 83392121202 27796000000 27797373734 2026196224 2027569958
+83391000000 83395121307 27797000000 27798373769 2027196224 2028569993
+83394000000 83398121387 27798000000 27799373795 2028196224 2029570019
+83397000000 83401121534 27799000000 27800373844 2029196224 2030570068
+83400000000 83404121788 27800000000 27801373929 2030196224 2031570153
+83403000000 83407121878 27801000000 27802373959 2031196224 2032570183
+83406000000 83410122123 27802000000 27803374041 2032196224 2033570265
+83409000000 83413122201 27803000000 27804374067 2033196224 2034570291
+83412000000 83416122378 27804000000 27805374126 2034196224 2035570350
+83415000000 83419122524 27805000000 27806374174 2035196224 2036570398
+83418000000 83422122668 27806000000 27807374222 2036196224 2037570446
+83421000000 83423745322 27807000000 27807915107 2037196224 2038111331
+83424000000 83428122983 27808000000 27809374327 2038196224 2039570551
+83427000000 83431123143 27809000000 27810374381 2039196224 2040570605
+83430000000 83434123280 27810000000 27811374426 2040196224 2041570650
+83433000000 83437123438 27811000000 27812374479 2041196224 2042570703
+83436000000 83440123596 27812000000 27813374532 2042196224 2043570756
+83439000000 83443123710 27813000000 27814374570 2043196224 2044570794
+83442000000 83446123871 27814000000 27815374623 2044196224 2045570847
+83445000000 83449123998 27815000000 27816374666 2045196224 2046570890
+83448000000 83452124107 27816000000 27817374702 2046196224 2047570926
+83451000000 83455124249 27817000000 27818374749 2047196224 2048570973
+83454000000 83458124483 27818000000 27819374827 2048196224 2049571051
+83457000000 83461124396 27819000000 27820374798 2049196224 2050571022
+83460000000 83464124517 27820000000 27821374839 2050196224 2051571063
+83463000000 83467124625 27821000000 27822374875 2051196224 2052571099
+83466000000 83470124860 27822000000 27823374953 2052196224 2053571177
+83469000000 83473125039 27823000000 27824375013 2053196224 2054571237
+83472000000 83476038679 27824000000 27825346226 2054196224 2055542450
+83475000000 83479125308 27825000000 27826375102 2055196224 2056571326
+83478000000 83482125481 27826000000 27827375160 2056196224 2057571384
+83481000000 83485125597 27827000000 27828375199 2057196224 2058571423
+83484000000 83488125770 27828000000 27829375256 2058196224 2059571480
+83487000000 83491125942 27829000000 27830375314 2059196224 2060571538
+83490000000 83494125998 27830000000 27831375332 2060196224 2061571556
+83493000000 83497126144 27831000000 27832375381 2061196224 2062571605
+83496000000 83500126340 27832000000 27833375446 2062196224 2063571670
+83499000000 83503126369 27833000000 27834375456 2063196224 2064571680
+83502000000 83506126675 27834000000 27835375558 2064196224 2065571782
+83505000000 83509126847 27835000000 27836375615 2065196224 2066571839
+83508000000 83512126980 27836000000 27837375660 2066196224 2067571884
+83511000000 83515127097 27837000000 27838375699 2067196224 2068571923
+83514000000 83518127282 27838000000 27839375760 2068196224 2069571984
+83517000000 83521127388 27839000000 27840375796 2069196224 2070572020
+83520000000 83524127569 27840000000 27841375856 2070196224 2071572080
+83523000000 83527127781 27841000000 27842375927 2071196224 2072572151
+83526000000 83530127888 27842000000 27843375962 2072196224 2073572186
+83529000000 83533128054 27843000000 27844376018 2073196224 2074572242
+83532000000 83535726799 27844000000 27845242266 2074196224 2075438490
+83535000000 83539128325 27845000000 27846376108 2075196224 2076572332
+83538000000 83542128437 27846000000 27847376145 2076196224 2077572369
+83541000000 83545128646 27847000000 27848376215 2077196224 2078572439
+83544000000 83548128725 27848000000 27849376241 2078196224 2079572465
+83547000000 83551128950 27849000000 27850376316 2079196224 2080572540
+83550000000 83554129077 27850000000 27851376359 2080196224 2081572583
+83553000000 83557129166 27851000000 27852376388 2081196224 2082572612
+83556000000 83560129272 27852000000 27853376424 2082196224 2083572648
+83559000000 83563129483 27853000000 27854376494 2083196224 2084572718
+83562000000 83566129692 27854000000 27855376564 2084196224 2085572788
+83565000000 83569129837 27855000000 27856376612 2085196224 2086572836
+83568000000 83572129963 27856000000 27857376654 2086196224 2087572878
+83571000000 83575130129 27857000000 27858376709 2087196224 2088572933
+83574000000 83578130209 27858000000 27859376736 2088196224 2089572960
+83577000000 83581130444 27859000000 27860376814 2089196224 2090573038
+83580000000 83584130603 27860000000 27861376867 2090196224 2091573091
+83583000000 83587130724 27861000000 27862376908 2091196224 2092573132
+83586000000 83590130884 27862000000 27863376961 2092196224 2093573185
+83589000000 83593130967 27863000000 27864376989 2093196224 2094573213
+83592000000 83596131213 27864000000 27865377071 2094196224 2095573295
+83595000000 83599131336 27865000000 27866377112 2095196224 2096573336
+83598000000 83602131472 27866000000 27867377157 2096196224 2097573381
+83601000000 83605131647 27867000000 27868377215 2097196224 2098573439
+83604000000 83608131769 27868000000 27869377256 2098196224 2099573480
+83607000000 83611131919 27869000000 27870377306 2099196224 2100573530
+83610000000 83614132067 27870000000 27871377355 2100196224 2101573579
+83613000000 83616305761 27871000000 27872101920 2101196224 2102298144
+83616000000 83620132387 27872000000 27873377462 2102196224 2103573686
+83619000000 83623132519 27873000000 27874377506 2103196224 2104573730
+83622000000 83626132693 27874000000 27875377564 2104196224 2105573788
+83625000000 83629132812 27875000000 27876377604 2105196224 2106573828
+83628000000 83632132936 27876000000 27877377645 2106196224 2107573869
+83631000000 83635133155 27877000000 27878377718 2107196224 2108573942
+83634000000 83638133291 27878000000 27879377763 2108196224 2109573987
+83637000000 83641133442 27879000000 27880377814 2109196224 2110574038
+83640000000 83644133592 27880000000 27881377864 2110196224 2111574088
+83643000000 83647133707 27881000000 27882377902 2111196224 2112574126
+83646000000 83650133804 27882000000 27883377934 2112196224 2113574158
+83649000000 83653134012 27883000000 27884378004 2113196224 2114574228
+83652000000 83656134167 27884000000 27885378055 2114196224 2115574279
+83655000000 83659134326 27885000000 27886378108 2115196224 2116574332
+83658000000 83662134500 27886000000 27887378166 2116196224 2117574390
+83661000000 83665134600 27887000000 27888378200 2117196224 2118574424
+83664000000 83668134778 27888000000 27889378259 2118196224 2119574483
+83667000000 83671134927 27889000000 27890378309 2119196224 2120574533
+83670000000 83674135055 27890000000 27891378351 2120196224 2121574575
+83673000000 83677135224 27891000000 27892378408 2121196224 2122574632
+83676000000 83680135344 27892000000 27893378448 2122196224 2123574672
+83679000000 83681962694 27893000000 27893987564 2123196224 2124183788
+83682000000 83686135594 27894000000 27895378531 2124196224 2125574755
+83685000000 83689135852 27895000000 27896378617 2125196224 2126574841
+83688000000 83692135957 27896000000 27897378652 2126196224 2127574876
+83691000000 83695136037 27897000000 27898378679 2127196224 2128574903
+83694000000 83698136184 27898000000 27899378728 2128196224 2129574952
+83697000000 83701136438 27899000000 27900378812 2129196224 2130575036
+83700000000 83704136528 27900000000 27901378842 2130196224 2131575066
+83703000000 83707136773 27901000000 27902378924 2131196224 2132575148
+83706000000 83710136851 27902000000 27903378950 2132196224 2133575174
+83709000000 83713137028 27903000000 27904379009 2133196224 2134575233
+83712000000 83716137174 27904000000 27905379058 2134196224 2135575282
+83715000000 83719137318 27905000000 27906379106 2135196224 2136575330
+83718000000 83720759972 27906000000 27906919990 2136196224 2137116214
+83721000000 83725137633 27907000000 27908379211 2137196224 2138575435
+83724000000 83728137793 27908000000 27909379264 2138196224 2139575488
+83727000000 83731137930 27909000000 27910379310 2139196224 2140575534
+83730000000 83734138088 27910000000 27911379362 2140196224 2141575586
+83733000000 83737138246 27911000000 27912379415 2141196224 2142575639
+83736000000 83740138360 27912000000 27913379453 2142196224 2143575677
+83739000000 83743138521 27913000000 27914379507 2143196224 2144575731
+83742000000 83746138648 27914000000 27915379549 2144196224 2145575773
+83745000000 83749138757 27915000000 27916379585 2145196224 2146575809
+83748000000 83752138899 27916000000 27917379633 2146196224 2147575857
+83751000000 83755139133 27917000000 27918379711 2147196224 2148575935
+83754000000 83758139046 27918000000 27919379682 2148196224 2149575906
+83757000000 83761139167 27919000000 27920379722 2149196224 2150575946
+83760000000 83764139275 27920000000 27921379758 2150196224 2151575982
+83763000000 83767139510 27921000000 27922379836 2151196224 2152576060
+83766000000 83770139689 27922000000 27923379896 2152196224 2153576120
+83769000000 83773053329 27923000000 27924351109 2153196224 2154547333
+83772000000 83776139958 27924000000 27925379986 2154196224 2155576210
+83775000000 83779140131 27925000000 27926380043 2155196224 2156576267
+83778000000 83782140247 27926000000 27927380082 2156196224 2157576306
+83781000000 83785140420 27927000000 27928380140 2157196224 2158576364
+83784000000 83788140592 27928000000 27929380197 2158196224 2159576421
+83787000000 83791140648 27929000000 27930380216 2159196224 2160576440
+83790000000 83794140794 27930000000 27931380264 2160196224 2161576488
+83793000000 83797140990 27931000000 27932380330 2161196224 2162576554
+83796000000 83800141019 27932000000 27933380339 2162196224 2163576563
+83799000000 83803141325 27933000000 27934380441 2163196224 2164576665
+83802000000 83806141497 27934000000 27935380499 2164196224 2165576723
+83805000000 83809141630 27935000000 27936380543 2165196224 2166576767
+83808000000 83812141747 27936000000 27937380582 2166196224 2167576806
+83811000000 83815141932 27937000000 27938380644 2167196224 2168576868
+83814000000 83818142038 27938000000 27939380679 2168196224 2169576903
+83817000000 83821142219 27939000000 27940380739 2169196224 2170576963
+83820000000 83824142431 27940000000 27941380810 2170196224 2171577034
+83823000000 83827142538 27941000000 27942380846 2171196224 2172577070
+83826000000 83830142704 27942000000 27943380901 2172196224 2173577125
+83829000000 83832741449 27943000000 27944247149 2173196224 2174443373
+83832000000 83836142975 27944000000 27945380991 2174196224 2175577215
+83835000000 83839143087 27945000000 27946381029 2175196224 2176577253
+83838000000 83842143296 27946000000 27947381098 2176196224 2177577322
+83841000000 83845143375 27947000000 27948381125 2177196224 2178577349
+83844000000 83848143600 27948000000 27949381200 2178196224 2179577424
+83847000000 83851143727 27949000000 27950381242 2179196224 2180577466
+83850000000 83854143816 27950000000 27951381272 2180196224 2181577496
+83853000000 83857143922 27951000000 27952381307 2181196224 2182577531
+83856000000 83860144133 27952000000 27953381377 2182196224 2183577601
+83859000000 83863144342 27953000000 27954381447 2183196224 2184577671
+83862000000 83866144487 27954000000 27955381495 2184196224 2185577719
+83865000000 83869144613 27955000000 27956381537 2185196224 2186577761
+83868000000 83872144779 27956000000 27957381593 2186196224 2187577817
+83871000000 83875144859 27957000000 27958381619 2187196224 2188577843
+83874000000 83878145094 27958000000 27959381698 2188196224 2189577922
+83877000000 83881145253 27959000000 27960381751 2189196224 2190577975
+83880000000 83884145374 27960000000 27961381791 2190196224 2191578015
+83883000000 83887145534 27961000000 27962381844 2191196224 2192578068
+83886000000 83890145617 27962000000 27963381872 2192196224 2193578096
+83889000000 83893145863 27963000000 27964381954 2193196224 2194578178
+83892000000 83896145986 27964000000 27965381995 2194196224 2195578219
+83895000000 83899146122 27965000000 27966382040 2195196224 2196578264
+83898000000 83902146297 27966000000 27967382099 2196196224 2197578323
+83901000000 83905146419 27967000000 27968382139 2197196224 2198578363
+83904000000 83908146569 27968000000 27969382189 2198196224 2199578413
+83907000000 83911146717 27969000000 27970382239 2199196224 2200578463
+83910000000 83913320411 27970000000 27971106803 2200196224 2201303027
+83913000000 83917147037 27971000000 27972382345 2201196224 2202578569
+83916000000 83920147169 27972000000 27973382389 2202196224 2203578613
+83919000000 83923147343 27973000000 27974382447 2203196224 2204578671
+83922000000 83926147462 27974000000 27975382487 2204196224 2205578711
+83925000000 83929147586 27975000000 27976382528 2205196224 2206578752
+83928000000 83932147805 27976000000 27977382601 2206196224 2207578825
+83931000000 83935147941 27977000000 27978382647 2207196224 2208578871
+83934000000 83938148092 27978000000 27979382697 2208196224 2209578921
+83937000000 83941148242 27979000000 27980382747 2209196224 2210578971
+83940000000 83944148357 27980000000 27981382785 2210196224 2211579009
+83943000000 83947148454 27981000000 27982382818 2211196224 2212579042
+83946000000 83950148662 27982000000 27983382887 2212196224 2213579111
+83949000000 83953148817 27983000000 27984382939 2213196224 2214579163
+83952000000 83956148976 27984000000 27985382992 2214196224 2215579216
+83955000000 83959149150 27985000000 27986383050 2215196224 2216579274
+83958000000 83962149250 27986000000 27987383083 2216196224 2217579307
+83961000000 83965149428 27987000000 27988383142 2217196224 2218579366
+83964000000 83968149577 27988000000 27989383192 2218196224 2219579416
+83967000000 83971149705 27989000000 27990383235 2219196224 2220579459
+83970000000 83974149874 27990000000 27991383291 2220196224 2221579515
+83973000000 83977149994 27991000000 27992383331 2221196224 2222579555
+83976000000 83978977344 27992000000 27992992448 2222196224 2223188672
+83979000000 83983150244 27993000000 27994383414 2223196224 2224579638
+83982000000 83986150502 27994000000 27995383500 2224196224 2225579724
+83985000000 83989150607 27995000000 27996383535 2225196224 2226579759
+83988000000 83992150687 27996000000 27997383562 2226196224 2227579786
+83991000000 83995150834 27997000000 27998383611 2227196224 2228579835
+83994000000 83998151088 27998000000 27999383696 2228196224 2229579920
+83997000000 84001151178 27999000000 28000383726 2229196224 2230579950
+84000000000 84004151423 28000000000 28001383807 2230196224 2231580031
+84003000000 84007151501 28001000000 28002383833 2231196224 2232580057
+84006000000 84010151678 28002000000 28003383892 2232196224 2233580116
+84009000000 84013151824 28003000000 28004383941 2233196224 2234580165
+84012000000 84016151968 28004000000 28005383989 2234196224 2235580213
+84015000000 84017774622 28005000000 28005924874 2235196224 2236121098
+84018000000 84022152283 28006000000 28007384094 2236196224 2237580318
+84021000000 84025152443 28007000000 28008384147 2237196224 2238580371
+84024000000 84028152580 28008000000 28009384193 2238196224 2239580417
+84027000000 84031152738 28009000000 28010384246 2239196224 2240580470
+84030000000 84034152896 28010000000 28011384298 2240196224 2241580522
+84033000000 84037153010 28011000000 28012384336 2241196224 2242580560
+84036000000 84040153171 28012000000 28013384390 2242196224 2243580614
+84039000000 84043153298 28013000000 28014384432 2243196224 2244580656
+84042000000 84046153407 28014000000 28015384469 2244196224 2245580693
+84045000000 84049153549 28015000000 28016384516 2245196224 2246580740
+84048000000 84052153783 28016000000 28017384594 2246196224 2247580818
+84051000000 84055153696 28017000000 28018384565 2247196224 2248580789
+84054000000 84058153817 28018000000 28019384605 2248196224 2249580829
+84057000000 84061153925 28019000000 28020384641 2249196224 2250580865
+84060000000 84064154160 28020000000 28021384720 2250196224 2251580944
+84063000000 84067154339 28021000000 28022384779 2251196224 2252581003
+84066000000 84070067979 28022000000 28023355993 2252196224 2253552217
+84069000000 84073154608 28023000000 28024384869 2253196224 2254581093
+84072000000 84076154781 28024000000 28025384927 2254196224 2255581151
+84075000000 84079154897 28025000000 28026384965 2255196224 2256581189
+84078000000 84082155070 28026000000 28027385023 2256196224 2257581247
+84081000000 84085155242 28027000000 28028385080 2257196224 2258581304
+84084000000 84088155298 28028000000 28029385099 2258196224 2259581323
+84087000000 84091155444 28029000000 28030385148 2259196224 2260581372
+84090000000 84094155640 28030000000 28031385213 2260196224 2261581437
+84093000000 84097155669 28031000000 28032385223 2261196224 2262581447
+84096000000 84100155975 28032000000 28033385325 2262196224 2263581549
+84099000000 84103156147 28033000000 28034385382 2263196224 2264581606
+84102000000 84106156280 28034000000 28035385426 2264196224 2265581650
+84105000000 84109156397 28035000000 28036385465 2265196224 2266581689
+84108000000 84112156582 28036000000 28037385527 2266196224 2267581751
+84111000000 84115156688 28037000000 28038385562 2267196224 2268581786
+84114000000 84118156869 28038000000 28039385623 2268196224 2269581847
+84117000000 84121157081 28039000000 28040385693 2269196224 2270581917
+84120000000 84124157188 28040000000 28041385729 2270196224 2271581953
+84123000000 84127157354 28041000000 28042385784 2271196224 2272582008
+84126000000 84129756099 28042000000 28043252033 2272196224 2273448257
+84129000000 84133157625 28043000000 28044385875 2273196224 2274582099
+84132000000 84136157737 28044000000 28045385912 2274196224 2275582136
+84135000000 84139157946 28045000000 28046385982 2275196224 2276582206
+84138000000 84142158025 28046000000 28047386008 2276196224 2277582232
+84141000000 84145158250 28047000000 28048386083 2277196224 2278582307
+84144000000 84148158377 28048000000 28049386125 2278196224 2279582349
+84147000000 84151158466 28049000000 28050386155 2279196224 2280582379
+84150000000 84154158572 28050000000 28051386190 2280196224 2281582414
+84153000000 84157158783 28051000000 28052386261 2281196224 2282582485
+84156000000 84160158992 28052000000 28053386330 2282196224 2283582554
+84159000000 84163159137 28053000000 28054386379 2283196224 2284582603
+84162000000 84166159263 28054000000 28055386421 2284196224 2285582645
+84165000000 84169159429 28055000000 28056386476 2285196224 2286582700
+84168000000 84172159509 28056000000 28057386503 2286196224 2287582727
+84171000000 84175159744 28057000000 28058386581 2287196224 2288582805
+84174000000 84178159903 28058000000 28059386634 2288196224 2289582858
+84177000000 84181160024 28059000000 28060386674 2289196224 2290582898
+84180000000 84184160184 28060000000 28061386728 2290196224 2291582952
+84183000000 84187160267 28061000000 28062386755 2291196224 2292582979
+84186000000 84190160513 28062000000 28063386837 2292196224 2293583061
+84189000000 84193160636 28063000000 28064386878 2293196224 2294583102
+84192000000 84196160772 28064000000 28065386924 2294196224 2295583148
+84195000000 84199160947 28065000000 28066386982 2295196224 2296583206
+84198000000 84202161069 28066000000 28067387023 2296196224 2297583247
+84201000000 84205161219 28067000000 28068387073 2297196224 2298583297
+84204000000 84208161367 28068000000 28069387122 2298196224 2299583346
+84207000000 84210335061 28069000000 28070111687 2299196224 2300307911
+84210000000 84214161687 28070000000 28071387229 2300196224 2301583453
+84213000000 84217161819 28071000000 28072387273 2301196224 2302583497
+84216000000 84220161993 28072000000 28073387331 2302196224 2303583555
+84219000000 84223162112 28073000000 28074387370 2303196224 2304583594
+84222000000 84226162236 28074000000 28075387412 2304196224 2305583636
+84225000000 84229162455 28075000000 28076387485 2305196224 2306583709
+84228000000 84232162591 28076000000 28077387530 2306196224 2307583754
+84231000000 84235162742 28077000000 28078387580 2307196224 2308583804
+84234000000 84238162892 28078000000 28079387630 2308196224 2309583854
+84237000000 84241163007 28079000000 28080387669 2309196224 2310583893
+84240000000 84244163104 28080000000 28081387701 2310196224 2311583925
+84243000000 84247163312 28081000000 28082387770 2311196224 2312583994
+84246000000 84250163467 28082000000 28083387822 2312196224 2313584046
+84249000000 84253163626 28083000000 28084387875 2313196224 2314584099
+84252000000 84256163800 28084000000 28085387933 2314196224 2315584157
+84255000000 84259163900 28085000000 28086387966 2315196224 2316584190
+84258000000 84262164078 28086000000 28087388026 2316196224 2317584250
+84261000000 84265164227 28087000000 28088388075 2317196224 2318584299
+84264000000 84268164355 28088000000 28089388118 2318196224 2319584342
+84267000000 84271164524 28089000000 28090388174 2319196224 2320584398
+84270000000 84274164644 28090000000 28091388214 2320196224 2321584438
+84273000000 84275991994 28091000000 28091997331 2321196224 2322193555
+84276000000 84280164894 28092000000 28093388298 2322196224 2323584522
+84279000000 84283165152 28093000000 28094388384 2323196224 2324584608
+84282000000 84286165257 28094000000 28095388419 2324196224 2325584643
+84285000000 84289165337 28095000000 28096388445 2325196224 2326584669
+84288000000 84292165484 28096000000 28097388494 2326196224 2327584718
+84291000000 84295165738 28097000000 28098388579 2327196224 2328584803
+84294000000 84298165828 28098000000 28099388609 2328196224 2329584833
+84297000000 84301166073 28099000000 28100388691 2329196224 2330584915
+84300000000 84304166151 28100000000 28101388717 2330196224 2331584941
+84303000000 84307166328 28101000000 28102388776 2331196224 2332585000
+84306000000 84310166474 28102000000 28103388824 2332196224 2333585048
+84309000000 84313166618 28103000000 28104388872 2333196224 2334585096
+84312000000 84314789272 28104000000 28104929757 2334196224 2335125981
+84315000000 84319166933 28105000000 28106388977 2335196224 2336585201
+84318000000 84322167093 28106000000 28107389031 2336196224 2337585255
+84321000000 84325167230 28107000000 28108389076 2337196224 2338585300
+84324000000 84328167388 28108000000 28109389129 2338196224 2339585353
+84327000000 84331167546 28109000000 28110389182 2339196224 2340585406
+84330000000 84334167660 28110000000 28111389220 2340196224 2341585444
+84333000000 84337167821 28111000000 28112389273 2341196224 2342585497
+84336000000 84340167948 28112000000 28113389316 2342196224 2343585540
+84339000000 84343168057 28113000000 28114389352 2343196224 2344585576
+84342000000 84346168199 28114000000 28115389399 2344196224 2345585623
+84345000000 84349168433 28115000000 28116389477 2345196224 2346585701
+84348000000 84352168346 28116000000 28117389448 2346196224 2347585672
+84351000000 84355168467 28117000000 28118389489 2347196224 2348585713
+84354000000 84358168575 28118000000 28119389525 2348196224 2349585749
+84357000000 84361168810 28119000000 28120389603 2349196224 2350585827
+84360000000 84364168989 28120000000 28121389663 2350196224 2351585887
+84363000000 84367082629 28121000000 28122360876 2351196224 2352557100
+84366000000 84370169258 28122000000 28123389752 2352196224 2353585976
+84369000000 84373169431 28123000000 28124389810 2353196224 2354586034
+84372000000 84376169547 28124000000 28125389849 2354196224 2355586073
+84375000000 84379169720 28125000000 28126389906 2355196224 2356586130
+84378000000 84382169892 28126000000 28127389964 2356196224 2357586188
+84381000000 84385169948 28127000000 28128389982 2357196224 2358586206
+84384000000 84388170094 28128000000 28129390031 2358196224 2359586255
+84387000000 84391170290 28129000000 28130390096 2359196224 2360586320
+84390000000 84394170319 28130000000 28131390106 2360196224 2361586330
+84393000000 84397170625 28131000000 28132390208 2361196224 2362586432
+84396000000 84400170797 28132000000 28133390265 2362196224 2363586489
+84399000000 84403170930 28133000000 28134390310 2363196224 2364586534
+84402000000 84406171047 28134000000 28135390349 2364196224 2365586573
+84405000000 84409171232 28135000000 28136390410 2365196224 2366586634
+84408000000 84412171338 28136000000 28137390446 2366196224 2367586670
+84411000000 84415171519 28137000000 28138390506 2367196224 2368586730
+84414000000 84418171731 28138000000 28139390577 2368196224 2369586801
+84417000000 84421171838 28139000000 28140390612 2369196224 2370586836
+84420000000 84424172004 28140000000 28141390668 2370196224 2371586892
+84423000000 84426770749 28141000000 28142256916 2371196224 2372453140
+84426000000 84430172275 28142000000 28143390758 2372196224 2373586982
+84429000000 84433172387 28143000000 28144390795 2373196224 2374587019
+84432000000 84436172596 28144000000 28145390865 2374196224 2375587089
+84435000000 84439172675 28145000000 28146390891 2375196224 2376587115
+84438000000 84442172900 28146000000 28147390966 2376196224 2377587190
+84441000000 84445173027 28147000000 28148391009 2377196224 2378587233
+84444000000 84448173116 28148000000 28149391038 2378196224 2379587262
+84447000000 84451173222 28149000000 28150391074 2379196224 2380587298
+84450000000 84454173433 28150000000 28151391144 2380196224 2381587368
+84453000000 84457173642 28151000000 28152391214 2381196224 2382587438
+84456000000 84460173787 28152000000 28153391262 2382196224 2383587486
+84459000000 84463173913 28153000000 28154391304 2383196224 2384587528
+84462000000 84466174079 28154000000 28155391359 2384196224 2385587583
+84465000000 84469174159 28155000000 28156391386 2385196224 2386587610
+84468000000 84472174394 28156000000 28157391464 2386196224 2387587688
+84471000000 84475174553 28157000000 28158391517 2387196224 2388587741
+84474000000 84478174674 28158000000 28159391558 2388196224 2389587782
+84477000000 84481174834 28159000000 28160391611 2389196224 2390587835
+84480000000 84484174917 28160000000 28161391639 2390196224 2391587863
+84483000000 84487175163 28161000000 28162391721 2391196224 2392587945
+84486000000 84490175286 28162000000 28163391762 2392196224 2393587986
+84489000000 84493175422 28163000000 28164391807 2393196224 2394588031
+84492000000 84496175597 28164000000 28165391865 2394196224 2395588089
+84495000000 84499175719 28165000000 28166391906 2395196224 2396588130
+84498000000 84502175869 28166000000 28167391956 2396196224 2397588180
+84501000000 84505176017 28167000000 28168392005 2397196224 2398588229
+84504000000 84507349711 28168000000 28169116570 2398196224 2399312794
+84507000000 84511176337 28169000000 28170392112 2399196224 2400588336
+84510000000 84514176469 28170000000 28171392156 2400196224 2401588380
+84513000000 84517176643 28171000000 28172392214 2401196224 2402588438
+84516000000 84520176762 28172000000 28173392254 2402196224 2403588478
+84519000000 84523176886 28173000000 28174392295 2403196224 2404588519
+84522000000 84526177105 28174000000 28175392368 2404196224 2405588592
+84525000000 84529177241 28175000000 28176392413 2405196224 2406588637
+84528000000 84532177392 28176000000 28177392464 2406196224 2407588688
+84531000000 84535177542 28177000000 28178392514 2407196224 2408588738
+84534000000 84538177657 28178000000 28179392552 2408196224 2409588776
+84537000000 84541177754 28179000000 28180392584 2409196224 2410588808
+84540000000 84544177962 28180000000 28181392654 2410196224 2411588878
+84543000000 84547178117 28181000000 28182392705 2411196224 2412588929
+84546000000 84550178276 28182000000 28183392758 2412196224 2413588982
+84549000000 84553178450 28183000000 28184392816 2413196224 2414589040
+84552000000 84556178550 28184000000 28185392850 2414196224 2415589074
+84555000000 84559178728 28185000000 28186392909 2415196224 2416589133
+84558000000 84562178877 28186000000 28187392959 2416196224 2417589183
+84561000000 84565179005 28187000000 28188393001 2417196224 2418589225
+84564000000 84568179174 28188000000 28189393058 2418196224 2419589282
+84567000000 84571179294 28189000000 28190393098 2419196224 2420589322
+84570000000 84573006644 28190000000 28191002214 2420196224 2421198438
+84573000000 84577179544 28191000000 28192393181 2421196224 2422589405
+84576000000 84580179802 28192000000 28193393267 2422196224 2423589491
+84579000000 84583179907 28193000000 28194393302 2423196224 2424589526
+84582000000 84586179987 28194000000 28195393329 2424196224 2425589553
+84585000000 84589180134 28195000000 28196393378 2425196224 2426589602
+84588000000 84592180388 28196000000 28197393462 2426196224 2427589686
+84591000000 84595180478 28197000000 28198393492 2427196224 2428589716
+84594000000 84598180723 28198000000 28199393574 2428196224 2429589798
+84597000000 84601180801 28199000000 28200393600 2429196224 2430589824
+84600000000 84604180978 28200000000 28201393659 2430196224 2431589883
+84603000000 84607181124 28201000000 28202393708 2431196224 2432589932
+84606000000 84610181268 28202000000 28203393756 2432196224 2433589980
+84609000000 84611803922 28203000000 28203934640 2433196224 2434130864
+84612000000 84616181583 28204000000 28205393861 2434196224 2435590085
+84615000000 84619181743 28205000000 28206393914 2435196224 2436590138
+84618000000 84622181880 28206000000 28207393960 2436196224 2437590184
+84621000000 84625182038 28207000000 28208394012 2437196224 2438590236
+84624000000 84628182196 28208000000 28209394065 2438196224 2439590289
+84627000000 84631182310 28209000000 28210394103 2439196224 2440590327
+84630000000 84634182471 28210000000 28211394157 2440196224 2441590381
+84633000000 84637182598 28211000000 28212394199 2441196224 2442590423
+84636000000 84640182707 28212000000 28213394235 2442196224 2443590459
+84639000000 84643182849 28213000000 28214394283 2443196224 2444590507
+84642000000 84646183083 28214000000 28215394361 2444196224 2445590585
+84645000000 84649182996 28215000000 28216394332 2445196224 2446590556
+84648000000 84652183117 28216000000 28217394372 2446196224 2447590596
+84651000000 84655183225 28217000000 28218394408 2447196224 2448590632
+84654000000 84658183460 28218000000 28219394486 2448196224 2449590710
+84657000000 84661183639 28219000000 28220394546 2449196224 2450590770
+84660000000 84664097279 28220000000 28221365759 2450196224 2451561983
+84663000000 84667183908 28221000000 28222394636 2451196224 2452590860
+84666000000 84670184081 28222000000 28223394693 2452196224 2453590917
+84669000000 84673184197 28223000000 28224394732 2453196224 2454590956
+84672000000 84676184370 28224000000 28225394790 2454196224 2455591014
+84675000000 84679184542 28225000000 28226394847 2455196224 2456591071
+84678000000 84682184598 28226000000 28227394866 2456196224 2457591090
+84681000000 84685184744 28227000000 28228394914 2457196224 2458591138
+84684000000 84688184940 28228000000 28229394980 2458196224 2459591204
+84687000000 84691184969 28229000000 28230394989 2459196224 2460591213
+84690000000 84694185275 28230000000 28231395091 2460196224 2461591315
+84693000000 84697185447 28231000000 28232395149 2461196224 2462591373
+84696000000 84700185580 28232000000 28233395193 2462196224 2463591417
+84699000000 84703185697 28233000000 28234395232 2463196224 2464591456
+84702000000 84706185882 28234000000 28235395294 2464196224 2465591518
+84705000000 84709185988 28235000000 28236395329 2465196224 2466591553
+84708000000 84712186169 28236000000 28237395389 2466196224 2467591613
+84711000000 84715186381 28237000000 28238395460 2467196224 2468591684
+84714000000 84718186488 28238000000 28239395496 2468196224 2469591720
+84717000000 84721186654 28239000000 28240395551 2469196224 2470591775
+84720000000 84723785399 28240000000 28241261799 2470196224 2471458023
+84723000000 84727186925 28241000000 28242395641 2471196224 2472591865
+84726000000 84730187037 28242000000 28243395679 2472196224 2473591903
+84729000000 84733187246 28243000000 28244395748 2473196224 2474591972
+84732000000 84736187325 28244000000 28245395775 2474196224 2475591999
+84735000000 84739187550 28245000000 28246395850 2475196224 2476592074
+84738000000 84742187677 28246000000 28247395892 2476196224 2477592116
+84741000000 84745187766 28247000000 28248395922 2477196224 2478592146
+84744000000 84748187872 28248000000 28249395957 2478196224 2479592181
+84747000000 84751188083 28249000000 28250396027 2479196224 2480592251
+84750000000 84754188292 28250000000 28251396097 2480196224 2481592321
+84753000000 84757188437 28251000000 28252396145 2481196224 2482592369
+84756000000 84760188563 28252000000 28253396187 2482196224 2483592411
+84759000000 84763188729 28253000000 28254396243 2483196224 2484592467
+84762000000 84766188809 28254000000 28255396269 2484196224 2485592493
+84765000000 84769189044 28255000000 28256396348 2485196224 2486592572
+84768000000 84772189203 28256000000 28257396401 2486196224 2487592625
+84771000000 84775189324 28257000000 28258396441 2487196224 2488592665
+84774000000 84778189484 28258000000 28259396494 2488196224 2489592718
+84777000000 84781189567 28259000000 28260396522 2489196224 2490592746
+84780000000 84784189813 28260000000 28261396604 2490196224 2491592828
+84783000000 84787189936 28261000000 28262396645 2491196224 2492592869
+84786000000 84790190072 28262000000 28263396690 2492196224 2493592914
+84789000000 84793190247 28263000000 28264396749 2493196224 2494592973
+84792000000 84796190369 28264000000 28265396789 2494196224 2495593013
+84795000000 84799190519 28265000000 28266396839 2495196224 2496593063
+84798000000 84802190667 28266000000 28267396889 2496196224 2497593113
+84801000000 84804364361 28267000000 28268121453 2497196224 2498317677
+84804000000 84808190987 28268000000 28269396995 2498196224 2499593219
+84807000000 84811191119 28269000000 28270397039 2499196224 2500593263
+84810000000 84814191293 28270000000 28271397097 2500196224 2501593321
+84813000000 84817191412 28271000000 28272397137 2501196224 2502593361
+84816000000 84820191536 28272000000 28273397178 2502196224 2503593402
+84819000000 84823191755 28273000000 28274397251 2503196224 2504593475
+84822000000 84826191891 28274000000 28275397297 2504196224 2505593521
+84825000000 84829192042 28275000000 28276397347 2505196224 2506593571
+84828000000 84832192192 28276000000 28277397397 2506196224 2507593621
+84831000000 84835192307 28277000000 28278397435 2507196224 2508593659
+84834000000 84838192404 28278000000 28279397468 2508196224 2509593692
+84837000000 84841192612 28279000000 28280397537 2509196224 2510593761
+84840000000 84844192767 28280000000 28281397589 2510196224 2511593813
+84843000000 84847192926 28281000000 28282397642 2511196224 2512593866
+84846000000 84850193100 28282000000 28283397700 2512196224 2513593924
+84849000000 84853193200 28283000000 28284397733 2513196224 2514593957
+84852000000 84856193378 28284000000 28285397792 2514196224 2515594016
+84855000000 84859193527 28285000000 28286397842 2515196224 2516594066
+84858000000 84862193655 28286000000 28287397885 2516196224 2517594109
+84861000000 84865193824 28287000000 28288397941 2517196224 2518594165
+84864000000 84868193944 28288000000 28289397981 2518196224 2519594205
+84867000000 84870021294 28289000000 28290007098 2519196224 2520203322
+84870000000 84874194194 28290000000 28291398064 2520196224 2521594288
+84873000000 84877194452 28291000000 28292398150 2521196224 2522594374
+84876000000 84880194557 28292000000 28293398185 2522196224 2523594409
+84879000000 84883194637 28293000000 28294398212 2523196224 2524594436
+84882000000 84886194784 28294000000 28295398261 2524196224 2525594485
+84885000000 84889195038 28295000000 28296398346 2525196224 2526594570
+84888000000 84892195128 28296000000 28297398376 2526196224 2527594600
+84891000000 84895195373 28297000000 28298398457 2527196224 2528594681
+84894000000 84898195451 28298000000 28299398483 2528196224 2529594707
+84897000000 84901195628 28299000000 28300398542 2529196224 2530594766
+84900000000 84904195774 28300000000 28301398591 2530196224 2531594815
+84903000000 84907195918 28301000000 28302398639 2531196224 2532594863
+84906000000 84908818572 28302000000 28302939524 2532196224 2533135748
+84909000000 84913196233 28303000000 28304398744 2533196224 2534594968
+84912000000 84916196393 28304000000 28305398797 2534196224 2535595021
+84915000000 84919196530 28305000000 28306398843 2535196224 2536595067
+84918000000 84922196688 28306000000 28307398896 2536196224 2537595120
+84921000000 84925196846 28307000000 28308398948 2537196224 2538595172
+84924000000 84928196960 28308000000 28309398986 2538196224 2539595210
+84927000000 84931197121 28309000000 28310399040 2539196224 2540595264
+84930000000 84934197248 28310000000 28311399082 2540196224 2541595306
+84933000000 84937197357 28311000000 28312399119 2541196224 2542595343
+84936000000 84940197499 28312000000 28313399166 2542196224 2543595390
+84939000000 84943197733 28313000000 28314399244 2543196224 2544595468
+84942000000 84946197646 28314000000 28315399215 2544196224 2545595439
+84945000000 84949197767 28315000000 28316399255 2545196224 2546595479
+84948000000 84952197875 28316000000 28317399291 2546196224 2547595515
+84951000000 84955198110 28317000000 28318399370 2547196224 2548595594
+84954000000 84958198289 28318000000 28319399429 2548196224 2549595653
+84957000000 84961111929 28319000000 28320370643 2549196224 2550566867
+84960000000 84964198558 28320000000 28321399519 2550196224 2551595743
+84963000000 84967198731 28321000000 28322399577 2551196224 2552595801
+84966000000 84970198847 28322000000 28323399615 2552196224 2553595839
+84969000000 84973199020 28323000000 28324399673 2553196224 2554595897
+84972000000 84976199192 28324000000 28325399730 2554196224 2555595954
+84975000000 84979199248 28325000000 28326399749 2555196224 2556595973
+84978000000 84982199394 28326000000 28327399798 2556196224 2557596022
+84981000000 84985199590 28327000000 28328399863 2557196224 2558596087
+84984000000 84988199619 28328000000 28329399873 2558196224 2559596097
+84987000000 84991199925 28329000000 28330399975 2559196224 2560596199
+84990000000 84994200097 28330000000 28331400032 2560196224 2561596256
+84993000000 84997200230 28331000000 28332400076 2561196224 2562596300
+84996000000 85000200347 28332000000 28333400115 2562196224 2563596339
+84999000000 85003200532 28333000000 28334400177 2563196224 2564596401
+85002000000 85006200638 28334000000 28335400212 2564196224 2565596436
+85005000000 85009200819 28335000000 28336400273 2565196224 2566596497
+85008000000 85012201031 28336000000 28337400343 2566196224 2567596567
+85011000000 85015201138 28337000000 28338400379 2567196224 2568596603
+85014000000 85018201304 28338000000 28339400434 2568196224 2569596658
+85017000000 85020800049 28339000000 28340266683 2569196224 2570462907
+85020000000 85024201575 28340000000 28341400525 2570196224 2571596749
+85023000000 85027201687 28341000000 28342400562 2571196224 2572596786
+85026000000 85030201896 28342000000 28343400632 2572196224 2573596856
+85029000000 85033201975 28343000000 28344400658 2573196224 2574596882
+85032000000 85036202200 28344000000 28345400733 2574196224 2575596957
+85035000000 85039202327 28345000000 28346400775 2575196224 2576596999
+85038000000 85042202416 28346000000 28347400805 2576196224 2577597029
+85041000000 85045202522 28347000000 28348400840 2577196224 2578597064
+85044000000 85048202733 28348000000 28349400911 2578196224 2579597135
+85047000000 85051202942 28349000000 28350400980 2579196224 2580597204
+85050000000 85054203087 28350000000 28351401029 2580196224 2581597253
+85053000000 85057203213 28351000000 28352401071 2581196224 2582597295
+85056000000 85060203379 28352000000 28353401126 2582196224 2583597350
+85059000000 85063203459 28353000000 28354401153 2583196224 2584597377
+85062000000 85066203694 28354000000 28355401231 2584196224 2585597455
+85065000000 85069203853 28355000000 28356401284 2585196224 2586597508
+85068000000 85072203974 28356000000 28357401324 2586196224 2587597548
+85071000000 85075204134 28357000000 28358401378 2587196224 2588597602
+85074000000 85078204217 28358000000 28359401405 2588196224 2589597629
+85077000000 85081204463 28359000000 28360401487 2589196224 2590597711
+85080000000 85084204586 28360000000 28361401528 2590196224 2591597752
+85083000000 85087204722 28361000000 28362401574 2591196224 2592597798
+85086000000 85090204897 28362000000 28363401632 2592196224 2593597856
+85089000000 85093205019 28363000000 28364401673 2593196224 2594597897
+85092000000 85096205169 28364000000 28365401723 2594196224 2595597947
+85095000000 85099205317 28365000000 28366401772 2595196224 2596597996
+85098000000 85101379011 28366000000 28367126337 2596196224 2597322561
+85101000000 85105205637 28367000000 28368401879 2597196224 2598598103
+85104000000 85108205769 28368000000 28369401923 2598196224 2599598147
+85107000000 85111205943 28369000000 28370401981 2599196224 2600598205
+85110000000 85114206062 28370000000 28371402020 2600196224 2601598244
+85113000000 85117206186 28371000000 28372402062 2601196224 2602598286
+85116000000 85120206405 28372000000 28373402135 2602196224 2603598359
+85119000000 85123206541 28373000000 28374402180 2603196224 2604598404
+85122000000 85126206692 28374000000 28375402230 2604196224 2605598454
+85125000000 85129206842 28375000000 28376402280 2605196224 2606598504
+85128000000 85132206957 28376000000 28377402319 2606196224 2607598543
+85131000000 85135207054 28377000000 28378402351 2607196224 2608598575
+85134000000 85138207262 28378000000 28379402420 2608196224 2609598644
+85137000000 85141207417 28379000000 28380402472 2609196224 2610598696
+85140000000 85144207576 28380000000 28381402525 2610196224 2611598749
+85143000000 85147207750 28381000000 28382402583 2611196224 2612598807
+85146000000 85150207850 28382000000 28383402616 2612196224 2613598840
+85149000000 85153208028 28383000000 28384402676 2613196224 2614598900
+85152000000 85156208177 28384000000 28385402725 2614196224 2615598949
+85155000000 85159208305 28385000000 28386402768 2615196224 2616598992
+85158000000 85162208474 28386000000 28387402824 2616196224 2617599048
+85161000000 85165208594 28387000000 28388402864 2617196224 2618599088
+85164000000 85167035944 28388000000 28389011981 2618196224 2619208205
+85167000000 85171208844 28389000000 28390402948 2619196224 2620599172
+85170000000 85174209102 28390000000 28391403034 2620196224 2621599258
+85173000000 85177209207 28391000000 28392403069 2621196224 2622599293
+85176000000 85180209287 28392000000 28393403095 2622196224 2623599319
+85179000000 85183209434 28393000000 28394403144 2623196224 2624599368
+85182000000 85186209688 28394000000 28395403229 2624196224 2625599453
+85185000000 85189209778 28395000000 28396403259 2625196224 2626599483
+85188000000 85192210023 28396000000 28397403341 2626196224 2627599565
+85191000000 85195210101 28397000000 28398403367 2627196224 2628599591
+85194000000 85198210278 28398000000 28399403426 2628196224 2629599650
+85197000000 85201210424 28399000000 28400403474 2629196224 2630599698
+85200000000 85204210568 28400000000 28401403522 2630196224 2631599746
+85203000000 85205833222 28401000000 28401944407 2631196224 2632140631
+85206000000 85210210883 28402000000 28403403627 2632196224 2633599851
+85209000000 85213211043 28403000000 28404403681 2633196224 2634599905
+85212000000 85216211180 28404000000 28405403726 2634196224 2635599950
+85215000000 85219211338 28405000000 28406403779 2635196224 2636600003
+85218000000 85222211496 28406000000 28407403832 2636196224 2637600056
+85221000000 85225211610 28407000000 28408403870 2637196224 2638600094
+85224000000 85228211771 28408000000 28409403923 2638196224 2639600147
+85227000000 85231211898 28409000000 28410403966 2639196224 2640600190
+85230000000 85234212007 28410000000 28411404002 2640196224 2641600226
+85233000000 85237212149 28411000000 28412404049 2641196224 2642600273
+85236000000 85240212383 28412000000 28413404127 2642196224 2643600351
+85239000000 85243212296 28413000000 28414404098 2643196224 2644600322
+85242000000 85246212417 28414000000 28415404139 2644196224 2645600363
+85245000000 85249212525 28415000000 28416404175 2645196224 2646600399
+85248000000 85252212760 28416000000 28417404253 2646196224 2647600477
+85251000000 85255212939 28417000000 28418404313 2647196224 2648600537
+85254000000 85258126579 28418000000 28419375526 2648196224 2649571750
+85257000000 85261213208 28419000000 28420404402 2649196224 2650600626
+85260000000 85264213381 28420000000 28421404460 2650196224 2651600684
+85263000000 85267213497 28421000000 28422404499 2651196224 2652600723
+85266000000 85270213670 28422000000 28423404556 2652196224 2653600780
+85269000000 85273213842 28423000000 28424404614 2653196224 2654600838
+85272000000 85276213898 28424000000 28425404632 2654196224 2655600856
+85275000000 85279214044 28425000000 28426404681 2655196224 2656600905
+85278000000 85282214240 28426000000 28427404746 2656196224 2657600970
+85281000000 85285214269 28427000000 28428404756 2657196224 2658600980
+85284000000 85288214575 28428000000 28429404858 2658196224 2659601082
+85287000000 85291214747 28429000000 28430404915 2659196224 2660601139
+85290000000 85294214880 28430000000 28431404960 2660196224 2661601184
+85293000000 85297214997 28431000000 28432404999 2661196224 2662601223
+85296000000 85300215182 28432000000 28433405060 2662196224 2663601284
+85299000000 85303215288 28433000000 28434405096 2663196224 2664601320
+85302000000 85306215469 28434000000 28435405156 2664196224 2665601380
+85305000000 85309215681 28435000000 28436405227 2665196224 2666601451
+85308000000 85312215788 28436000000 28437405262 2666196224 2667601486
+85311000000 85315215954 28437000000 28438405318 2667196224 2668601542
+85314000000 85317814699 28438000000 28439271566 2668196224 2669467790
+85317000000 85321216225 28439000000 28440405408 2669196224 2670601632
+85320000000 85324216337 28440000000 28441405445 2670196224 2671601669
+85323000000 85327216546 28441000000 28442405515 2671196224 2672601739
+85326000000 85330216625 28442000000 28443405541 2672196224 2673601765
+85329000000 85333216850 28443000000 28444405616 2673196224 2674601840
+85332000000 85336216977 28444000000 28445405659 2674196224 2675601883
+85335000000 85339217066 28445000000 28446405688 2675196224 2676601912
+85338000000 85342217172 28446000000 28447405724 2676196224 2677601948
+85341000000 85345217383 28447000000 28448405794 2677196224 2678602018
+85344000000 85348217592 28448000000 28449405864 2678196224 2679602088
+85347000000 85351217737 28449000000 28450405912 2679196224 2680602136
+85350000000 85354217863 28450000000 28451405954 2680196224 2681602178
+85353000000 85357218029 28451000000 28452406009 2681196224 2682602233
+85356000000 85360218109 28452000000 28453406036 2682196224 2683602260
+85359000000 85363218344 28453000000 28454406114 2683196224 2684602338
+85362000000 85366218503 28454000000 28455406167 2684196224 2685602391
+85365000000 85369218624 28455000000 28456406208 2685196224 2686602432
+85368000000 85372218784 28456000000 28457406261 2686196224 2687602485
+85371000000 85375218867 28457000000 28458406289 2687196224 2688602513
+85374000000 85378219113 28458000000 28459406371 2688196224 2689602595
+85377000000 85381219236 28459000000 28460406412 2689196224 2690602636
+85380000000 85384219372 28460000000 28461406457 2690196224 2691602681
+85383000000 85387219547 28461000000 28462406515 2691196224 2692602739
+85386000000 85390219669 28462000000 28463406556 2692196224 2693602780
+85389000000 85393219819 28463000000 28464406606 2693196224 2694602830
+85392000000 85396219967 28464000000 28465406655 2694196224 2695602879
+85395000000 85398393661 28465000000 28466131220 2695196224 2696327444
+85398000000 85402220287 28466000000 28467406762 2696196224 2697602986
+85401000000 85405220419 28467000000 28468406806 2697196224 2698603030
+85404000000 85408220593 28468000000 28469406864 2698196224 2699603088
+85407000000 85411220712 28469000000 28470406904 2699196224 2700603128
+85410000000 85414220836 28470000000 28471406945 2700196224 2701603169
+85413000000 85417221055 28471000000 28472407018 2701196224 2702603242
+85416000000 85420221191 28472000000 28473407063 2702196224 2703603287
+85419000000 85423221342 28473000000 28474407114 2703196224 2704603338
+85422000000 85426221492 28474000000 28475407164 2704196224 2705603388
+85425000000 85429221607 28475000000 28476407202 2705196224 2706603426
+85428000000 85432221704 28476000000 28477407234 2706196224 2707603458
+85431000000 85435221912 28477000000 28478407304 2707196224 2708603528
+85434000000 85438222067 28478000000 28479407355 2708196224 2709603579
+85437000000 85441222226 28479000000 28480407408 2709196224 2710603632
+85440000000 85444222400 28480000000 28481407466 2710196224 2711603690
+85443000000 85447222500 28481000000 28482407500 2711196224 2712603724
+85446000000 85450222678 28482000000 28483407559 2712196224 2713603783
+85449000000 85453222827 28483000000 28484407609 2713196224 2714603833
+85452000000 85456222955 28484000000 28485407651 2714196224 2715603875
+85455000000 85459223124 28485000000 28486407708 2715196224 2716603932
+85458000000 85462223244 28486000000 28487407748 2716196224 2717603972
+85461000000 85464050594 28487000000 28488016864 2717196224 2718213088
+85464000000 85468223494 28488000000 28489407831 2718196224 2719604055
+85467000000 85471223752 28489000000 28490407917 2719196224 2720604141
+85470000000 85474223857 28490000000 28491407952 2720196224 2721604176
+85473000000 85477223937 28491000000 28492407979 2721196224 2722604203
+85476000000 85480224084 28492000000 28493408028 2722196224 2723604252
+85479000000 85483224338 28493000000 28494408112 2723196224 2724604336
+85482000000 85486224428 28494000000 28495408142 2724196224 2725604366
+85485000000 85489224673 28495000000 28496408224 2725196224 2726604448
+85488000000 85492224751 28496000000 28497408250 2726196224 2727604474
+85491000000 85495224928 28497000000 28498408309 2727196224 2728604533
+85494000000 85498225074 28498000000 28499408358 2728196224 2729604582
+85497000000 85501225218 28499000000 28500408406 2729196224 2730604630
+85500000000 85502847872 28500000000 28500949290 2730196224 2731145514
+85503000000 85507225533 28501000000 28502408511 2731196224 2732604735
+85506000000 85510225693 28502000000 28503408564 2732196224 2733604788
+85509000000 85513225830 28503000000 28504408610 2733196224 2734604834
+85512000000 85516225988 28504000000 28505408662 2734196224 2735604886
+85515000000 85519226146 28505000000 28506408715 2735196224 2736604939
+85518000000 85522226260 28506000000 28507408753 2736196224 2737604977
+85521000000 85525226421 28507000000 28508408807 2737196224 2738605031
+85524000000 85528226548 28508000000 28509408849 2738196224 2739605073
+85527000000 85531226657 28509000000 28510408885 2739196224 2740605109
+85530000000 85534226799 28510000000 28511408933 2740196224 2741605157
+85533000000 85537227033 28511000000 28512409011 2741196224 2742605235
+85536000000 85540226946 28512000000 28513408982 2742196224 2743605206
+85539000000 85543227067 28513000000 28514409022 2743196224 2744605246
+85542000000 85546227175 28514000000 28515409058 2744196224 2745605282
+85545000000 85549227410 28515000000 28516409136 2745196224 2746605360
+85548000000 85552227589 28516000000 28517409196 2746196224 2747605420
+85551000000 85555141229 28517000000 28518380409 2747196224 2748576633
+85554000000 85558227858 28518000000 28519409286 2748196224 2749605510
+85557000000 85561228031 28519000000 28520409343 2749196224 2750605567
+85560000000 85564228147 28520000000 28521409382 2750196224 2751605606
+85563000000 85567228320 28521000000 28522409440 2751196224 2752605664
+85566000000 85570228492 28522000000 28523409497 2752196224 2753605721
+85569000000 85573228548 28523000000 28524409516 2753196224 2754605740
+85572000000 85576228694 28524000000 28525409564 2754196224 2755605788
+85575000000 85579228890 28525000000 28526409630 2755196224 2756605854
+85578000000 85582228919 28526000000 28527409639 2756196224 2757605863
+85581000000 85585229225 28527000000 28528409741 2757196224 2758605965
+85584000000 85588229397 28528000000 28529409799 2758196224 2759606023
+85587000000 85591229530 28529000000 28530409843 2759196224 2760606067
+85590000000 85594229647 28530000000 28531409882 2760196224 2761606106
+85593000000 85597229832 28531000000 28532409944 2761196224 2762606168
+85596000000 85600229938 28532000000 28533409979 2762196224 2763606203
+85599000000 85603230119 28533000000 28534410039 2763196224 2764606263
+85602000000 85606230331 28534000000 28535410110 2764196224 2765606334
+85605000000 85609230438 28535000000 28536410146 2765196224 2766606370
+85608000000 85612230604 28536000000 28537410201 2766196224 2767606425
+85611000000 85614829349 28537000000 28538276449 2767196224 2768472673
+85614000000 85618230875 28538000000 28539410291 2768196224 2769606515
+85617000000 85621230987 28539000000 28540410329 2769196224 2770606553
+85620000000 85624231196 28540000000 28541410398 2770196224 2771606622
+85623000000 85627231275 28541000000 28542410425 2771196224 2772606649
+85626000000 85630231500 28542000000 28543410500 2772196224 2773606724
+85629000000 85633231627 28543000000 28544410542 2773196224 2774606766
+85632000000 85636231716 28544000000 28545410572 2774196224 2775606796
+85635000000 85639231822 28545000000 28546410607 2775196224 2776606831
+85638000000 85642232033 28546000000 28547410677 2776196224 2777606901
+85641000000 85645232242 28547000000 28548410747 2777196224 2778606971
+85644000000 85648232387 28548000000 28549410795 2778196224 2779607019
+85647000000 85651232513 28549000000 28550410837 2779196224 2780607061
+85650000000 85654232679 28550000000 28551410893 2780196224 2781607117
+85653000000 85657232759 28551000000 28552410919 2781196224 2782607143
+85656000000 85660232994 28552000000 28553410998 2782196224 2783607222
+85659000000 85663233153 28553000000 28554411051 2783196224 2784607275
+85662000000 85666233274 28554000000 28555411091 2784196224 2785607315
+85665000000 85669233434 28555000000 28556411144 2785196224 2786607368
+85668000000 85672233517 28556000000 28557411172 2786196224 2787607396
+85671000000 85675233763 28557000000 28558411254 2787196224 2788607478
+85674000000 85678233886 28558000000 28559411295 2788196224 2789607519
+85677000000 85681234022 28559000000 28560411340 2789196224 2790607564
+85680000000 85684234197 28560000000 28561411399 2790196224 2791607623
+85683000000 85687234319 28561000000 28562411439 2791196224 2792607663
+85686000000 85690234469 28562000000 28563411489 2792196224 2793607713
+85689000000 85693234617 28563000000 28564411539 2793196224 2794607763
+85692000000 85695408311 28564000000 28565136103 2794196224 2795332327
+85695000000 85699234937 28565000000 28566411645 2795196224 2796607869
+85698000000 85702235069 28566000000 28567411689 2796196224 2797607913
+85701000000 85705235243 28567000000 28568411747 2797196224 2798607971
+85704000000 85708235362 28568000000 28569411787 2798196224 2799608011
+85707000000 85711235486 28569000000 28570411828 2799196224 2800608052
+85710000000 85714235705 28570000000 28571411901 2800196224 2801608125
+85713000000 85717235841 28571000000 28572411947 2801196224 2802608171
+85716000000 85720235992 28572000000 28573411997 2802196224 2803608221
+85719000000 85723236142 28573000000 28574412047 2803196224 2804608271
+85722000000 85726236257 28574000000 28575412085 2804196224 2805608309
+85725000000 85729236354 28575000000 28576412118 2805196224 2806608342
+85728000000 85732236562 28576000000 28577412187 2806196224 2807608411
+85731000000 85735236717 28577000000 28578412239 2807196224 2808608463
+85734000000 85738236876 28578000000 28579412292 2808196224 2809608516
+85737000000 85741237050 28579000000 28580412350 2809196224 2810608574
+85740000000 85744237150 28580000000 28581412383 2810196224 2811608607
+85743000000 85747237328 28581000000 28582412442 2811196224 2812608666
+85746000000 85750237477 28582000000 28583412492 2812196224 2813608716
+85749000000 85753237605 28583000000 28584412535 2813196224 2814608759
+85752000000 85756237774 28584000000 28585412591 2814196224 2815608815
+85755000000 85759237894 28585000000 28586412631 2815196224 2816608855
+85758000000 85761065244 28586000000 28587021748 2816196224 2817217972
+85761000000 85765238144 28587000000 28588412714 2817196224 2818608938
+85764000000 85768238402 28588000000 28589412800 2818196224 2819609024
+85767000000 85771238507 28589000000 28590412835 2819196224 2820609059
+85770000000 85774238587 28590000000 28591412862 2820196224 2821609086
+85773000000 85777238734 28591000000 28592412911 2821196224 2822609135
+85776000000 85780238988 28592000000 28593412996 2822196224 2823609220
+85779000000 85783239078 28593000000 28594413026 2823196224 2824609250
+85782000000 85786239323 28594000000 28595413107 2824196224 2825609331
+85785000000 85789239401 28595000000 28596413133 2825196224 2826609357
+85788000000 85792239578 28596000000 28597413192 2826196224 2827609416
+85791000000 85795239724 28597000000 28598413241 2827196224 2828609465
+85794000000 85798239868 28598000000 28599413289 2828196224 2829609513
+85797000000 85799862522 28599000000 28599954174 2829196224 2830150398
+85800000000 85804240183 28600000000 28601413394 2830196224 2831609618
+85803000000 85807240343 28601000000 28602413447 2831196224 2832609671
+85806000000 85810240480 28602000000 28603413493 2832196224 2833609717
+85809000000 85813240638 28603000000 28604413546 2833196224 2834609770
+85812000000 85816240796 28604000000 28605413598 2834196224 2835609822
+85815000000 85819240910 28605000000 28606413636 2835196224 2836609860
+85818000000 85822241071 28606000000 28607413690 2836196224 2837609914
+85821000000 85825241198 28607000000 28608413732 2837196224 2838609956
+85824000000 85828241307 28608000000 28609413769 2838196224 2839609993
+85827000000 85831241449 28609000000 28610413816 2839196224 2840610040
+85830000000 85834241683 28610000000 28611413894 2840196224 2841610118
+85833000000 85837241596 28611000000 28612413865 2841196224 2842610089
+85836000000 85840241717 28612000000 28613413905 2842196224 2843610129
+85839000000 85843241825 28613000000 28614413941 2843196224 2844610165
+85842000000 85846242060 28614000000 28615414020 2844196224 2845610244
+85845000000 85849242239 28615000000 28616414079 2845196224 2846610303
+85848000000 85852155879 28616000000 28617385293 2846196224 2847581517
+85851000000 85855242508 28617000000 28618414169 2847196224 2848610393
+85854000000 85858242681 28618000000 28619414227 2848196224 2849610451
+85857000000 85861242797 28619000000 28620414265 2849196224 2850610489
+85860000000 85864242970 28620000000 28621414323 2850196224 2851610547
+85863000000 85867243142 28621000000 28622414380 2851196224 2852610604
+85866000000 85870243198 28622000000 28623414399 2852196224 2853610623
+85869000000 85873243344 28623000000 28624414448 2853196224 2854610672
+85872000000 85876243540 28624000000 28625414513 2854196224 2855610737
+85875000000 85879243569 28625000000 28626414523 2855196224 2856610747
+85878000000 85882243875 28626000000 28627414625 2856196224 2857610849
+85881000000 85885244047 28627000000 28628414682 2857196224 2858610906
+85884000000 85888244180 28628000000 28629414726 2858196224 2859610950
+85887000000 85891244297 28629000000 28630414765 2859196224 2860610989
+85890000000 85894244482 28630000000 28631414827 2860196224 2861611051
+85893000000 85897244588 28631000000 28632414862 2861196224 2862611086
+85896000000 85900244769 28632000000 28633414923 2862196224 2863611147
+85899000000 85903244981 28633000000 28634414993 2863196224 2864611217
+85902000000 85906245088 28634000000 28635415029 2864196224 2865611253
+85905000000 85909245254 28635000000 28636415084 2865196224 2866611308
+85908000000 85911843999 28636000000 28637281333 2866196224 2867477557
+85911000000 85915245525 28637000000 28638415175 2867196224 2868611399
+85914000000 85918245637 28638000000 28639415212 2868196224 2869611436
+85917000000 85921245846 28639000000 28640415282 2869196224 2870611506
+85920000000 85924245925 28640000000 28641415308 2870196224 2871611532
+85923000000 85927246150 28641000000 28642415383 2871196224 2872611607
+85926000000 85930246277 28642000000 28643415425 2872196224 2873611649
+85929000000 85933246366 28643000000 28644415455 2873196224 2874611679
+85932000000 85936246472 28644000000 28645415490 2874196224 2875611714
+85935000000 85939246683 28645000000 28646415561 2875196224 2876611785
+85938000000 85942246892 28646000000 28647415630 2876196224 2877611854
+85941000000 85945247037 28647000000 28648415679 2877196224 2878611903
+85944000000 85948247163 28648000000 28649415721 2878196224 2879611945
+85947000000 85951247329 28649000000 28650415776 2879196224 2880612000
+85950000000 85954247409 28650000000 28651415803 2880196224 2881612027
+85953000000 85957247644 28651000000 28652415881 2881196224 2882612105
+85956000000 85960247803 28652000000 28653415934 2882196224 2883612158
+85959000000 85963247924 28653000000 28654415974 2883196224 2884612198
+85962000000 85966248084 28654000000 28655416028 2884196224 2885612252
+85965000000 85969248167 28655000000 28656416055 2885196224 2886612279
+85968000000 85972248413 28656000000 28657416137 2886196224 2887612361
+85971000000 85975248536 28657000000 28658416178 2887196224 2888612402
+85974000000 85978248672 28658000000 28659416224 2888196224 2889612448
+85977000000 85981248847 28659000000 28660416282 2889196224 2890612506
+85980000000 85984248969 28660000000 28661416323 2890196224 2891612547
+85983000000 85987249119 28661000000 28662416373 2891196224 2892612597
+85986000000 85990249267 28662000000 28663416422 2892196224 2893612646
+85989000000 85992422961 28663000000 28664140987 2893196224 2894337211
+85992000000 85996249587 28664000000 28665416529 2894196224 2895612753
+85995000000 85999249719 28665000000 28666416573 2895196224 2896612797
+85998000000 86002249893 28666000000 28667416631 2896196224 2897612855
+86001000000 86005250012 28667000000 28668416670 2897196224 2898612894
+86004000000 86008250136 28668000000 28669416712 2898196224 2899612936
+86007000000 86011250355 28669000000 28670416785 2899196224 2900613009
+86010000000 86014250491 28670000000 28671416830 2900196224 2901613054
+86013000000 86017250642 28671000000 28672416880 2901196224 2902613104
+86016000000 86020250792 28672000000 28673416930 2902196224 2903613154
+86019000000 86023250907 28673000000 28674416969 2903196224 2904613193
+86022000000 86026251004 28674000000 28675417001 2904196224 2905613225
+86025000000 86029251212 28675000000 28676417070 2905196224 2906613294
+86028000000 86032251367 28676000000 28677417122 2906196224 2907613346
+86031000000 86035251526 28677000000 28678417175 2907196224 2908613399
+86034000000 86038251700 28678000000 28679417233 2908196224 2909613457
+86037000000 86041251800 28679000000 28680417266 2909196224 2910613490
+86040000000 86044251978 28680000000 28681417326 2910196224 2911613550
+86043000000 86047252127 28681000000 28682417375 2911196224 2912613599
+86046000000 86050252255 28682000000 28683417418 2912196224 2913613642
+86049000000 86053252424 28683000000 28684417474 2913196224 2914613698
+86052000000 86056252544 28684000000 28685417514 2914196224 2915613738
+86055000000 86058079894 28685000000 28686026631 2915196224 2916222855
+86058000000 86062252794 28686000000 28687417598 2916196224 2917613822
+86061000000 86065253052 28687000000 28688417684 2917196224 2918613908
+86064000000 86068253157 28688000000 28689417719 2918196224 2919613943
+86067000000 86071253237 28689000000 28690417745 2919196224 2920613969
+86070000000 86074253384 28690000000 28691417794 2920196224 2921614018
+86073000000 86077253638 28691000000 28692417879 2921196224 2922614103
+86076000000 86080253728 28692000000 28693417909 2922196224 2923614133
+86079000000 86083253973 28693000000 28694417991 2923196224 2924614215
+86082000000 86086254051 28694000000 28695418017 2924196224 2925614241
+86085000000 86089254228 28695000000 28696418076 2925196224 2926614300
+86088000000 86092254374 28696000000 28697418124 2926196224 2927614348
+86091000000 86095254518 28697000000 28698418172 2927196224 2928614396
+86094000000 86096877172 28698000000 28698959057 2928196224 2929155281
+86097000000 86101254833 28699000000 28700418277 2929196224 2930614501
+86100000000 86104254993 28700000000 28701418331 2930196224 2931614555
+86103000000 86107255130 28701000000 28702418376 2931196224 2932614600
+86106000000 86110255288 28702000000 28703418429 2932196224 2933614653
+86109000000 86113255446 28703000000 28704418482 2933196224 2934614706
+86112000000 86116255560 28704000000 28705418520 2934196224 2935614744
+86115000000 86119255721 28705000000 28706418573 2935196224 2936614797
+86118000000 86122255848 28706000000 28707418616 2936196224 2937614840
+86121000000 86125255957 28707000000 28708418652 2937196224 2938614876
+86124000000 86128256099 28708000000 28709418699 2938196224 2939614923
+86127000000 86131256333 28709000000 28710418777 2939196224 2940615001
+86130000000 86134256246 28710000000 28711418748 2940196224 2941614972
+86133000000 86137256367 28711000000 28712418789 2941196224 2942615013
+86136000000 86140256475 28712000000 28713418825 2942196224 2943615049
+86139000000 86143256710 28713000000 28714418903 2943196224 2944615127
+86142000000 86146256889 28714000000 28715418963 2944196224 2945615187
+86145000000 86149170529 28715000000 28716390176 2945196224 2946586400
+86148000000 86152257158 28716000000 28717419052 2946196224 2947615276
+86151000000 86155257331 28717000000 28718419110 2947196224 2948615334
+86154000000 86158257447 28718000000 28719419149 2948196224 2949615373
+86157000000 86161257620 28719000000 28720419206 2949196224 2950615430
+86160000000 86164257792 28720000000 28721419264 2950196224 2951615488
+86163000000 86167257848 28721000000 28722419282 2951196224 2952615506
+86166000000 86170257994 28722000000 28723419331 2952196224 2953615555
+86169000000 86173258190 28723000000 28724419396 2953196224 2954615620
+86172000000 86176258219 28724000000 28725419406 2954196224 2955615630
+86175000000 86179258525 28725000000 28726419508 2955196224 2956615732
+86178000000 86182258697 28726000000 28727419565 2956196224 2957615789
+86181000000 86185258830 28727000000 28728419610 2957196224 2958615834
+86184000000 86188258947 28728000000 28729419649 2958196224 2959615873
+86187000000 86191259132 28729000000 28730419710 2959196224 2960615934
+86190000000 86194259238 28730000000 28731419746 2960196224 2961615970
+86193000000 86197259419 28731000000 28732419806 2961196224 2962616030
+86196000000 86200259631 28732000000 28733419877 2962196224 2963616101
+86199000000 86203259738 28733000000 28734419912 2963196224 2964616136
+86202000000 86206259904 28734000000 28735419968 2964196224 2965616192
+86205000000 86208858649 28735000000 28736286216 2965196224 2966482440
+86208000000 86212260175 28736000000 28737420058 2966196224 2967616282
+86211000000 86215260287 28737000000 28738420095 2967196224 2968616319
+86214000000 86218260496 28738000000 28739420165 2968196224 2969616389
+86217000000 86221260575 28739000000 28740420191 2969196224 2970616415
+86220000000 86224260800 28740000000 28741420266 2970196224 2971616490
+86223000000 86227260927 28741000000 28742420309 2971196224 2972616533
+86226000000 86230261016 28742000000 28743420338 2972196224 2973616562
+86229000000 86233261122 28743000000 28744420374 2973196224 2974616598
+86232000000 86236261333 28744000000 28745420444 2974196224 2975616668
+86235000000 86239261542 28745000000 28746420514 2975196224 2976616738
+86238000000 86242261687 28746000000 28747420562 2976196224 2977616786
+86241000000 86245261813 28747000000 28748420604 2977196224 2978616828
+86244000000 86248261979 28748000000 28749420659 2978196224 2979616883
+86247000000 86251262059 28749000000 28750420686 2979196224 2980616910
+86250000000 86254262294 28750000000 28751420764 2980196224 2981616988
+86253000000 86257262453 28751000000 28752420817 2981196224 2982617041
+86256000000 86260262574 28752000000 28753420858 2982196224 2983617082
+86259000000 86263262734 28753000000 28754420911 2983196224 2984617135
+86262000000 86266262817 28754000000 28755420939 2984196224 2985617163
+86265000000 86269263063 28755000000 28756421021 2985196224 2986617245
+86268000000 86272263186 28756000000 28757421062 2986196224 2987617286
+86271000000 86275263322 28757000000 28758421107 2987196224 2988617331
+86274000000 86278263497 28758000000 28759421165 2988196224 2989617389
+86277000000 86281263619 28759000000 28760421206 2989196224 2990617430
+86280000000 86284263769 28760000000 28761421256 2990196224 2991617480
+86283000000 86287263917 28761000000 28762421305 2991196224 2992617529
+86286000000 86289437611 28762000000 28763145870 2992196224 2993342094
+86289000000 86293264237 28763000000 28764421412 2993196224 2994617636
+86292000000 86296264369 28764000000 28765421456 2994196224 2995617680
+86295000000 86299264543 28765000000 28766421514 2995196224 2996617738
+86298000000 86302264662 28766000000 28767421554 2996196224 2997617778
+86301000000 86305264786 28767000000 28768421595 2997196224 2998617819
+86304000000 86308265005 28768000000 28769421668 2998196224 2999617892
+86307000000 86311265141 28769000000 28770421713 2999196224 3000617937
+86310000000 86314265292 28770000000 28771421764 3000196224 3001617988
+86313000000 86317265442 28771000000 28772421814 3001196224 3002618038
+86316000000 86320265557 28772000000 28773421852 3002196224 3003618076
+86319000000 86323265654 28773000000 28774421884 3003196224 3004618108
+86322000000 86326265862 28774000000 28775421954 3004196224 3005618178
+86325000000 86329266017 28775000000 28776422005 3005196224 3006618229
+86328000000 86332266176 28776000000 28777422058 3006196224 3007618282
+86331000000 86335266350 28777000000 28778422116 3007196224 3008618340
+86334000000 86338266450 28778000000 28779422150 3008196224 3009618374
+86337000000 86341266628 28779000000 28780422209 3009196224 3010618433
+86340000000 86344266777 28780000000 28781422259 3010196224 3011618483
+86343000000 86347266905 28781000000 28782422301 3011196224 3012618525
+86346000000 86350267074 28782000000 28783422358 3012196224 3013618582
+86349000000 86353267194 28783000000 28784422398 3013196224 3014618622
+86352000000 86355094544 28784000000 28785031514 3014196224 3015227738
+86355000000 86359267444 28785000000 28786422481 3015196224 3016618705
+86358000000 86362267702 28786000000 28787422567 3016196224 3017618791
+86361000000 86365267807 28787000000 28788422602 3017196224 3018618826
+86364000000 86368267887 28788000000 28789422629 3018196224 3019618853
+86367000000 86371268034 28789000000 28790422678 3019196224 3020618902
+86370000000 86374268288 28790000000 28791422762 3020196224 3021618986
+86373000000 86377268378 28791000000 28792422792 3021196224 3022619016
+86376000000 86380268623 28792000000 28793422874 3022196224 3023619098
+86379000000 86383268701 28793000000 28794422900 3023196224 3024619124
+86382000000 86386268878 28794000000 28795422959 3024196224 3025619183
+86385000000 86389269024 28795000000 28796423008 3025196224 3026619232
+86388000000 86392269168 28796000000 28797423056 3026196224 3027619280
+86391000000 86393891822 28797000000 28797963940 3027196224 3028160164
+86394000000 86398269483 28798000000 28799423161 3028196224 3029619385
+86397000000 86401269643 28799000000 28800423214 3029196224 3030619438
+86400000000 86404269780 28800000000 28801423260 3030196224 3031619484
+86403000000 86407269938 28801000000 28802423312 3031196224 3032619536
+86406000000 86410270096 28802000000 28803423365 3032196224 3033619589
+86409000000 86413270210 28803000000 28804423403 3033196224 3034619627
+86412000000 86416270371 28804000000 28805423457 3034196224 3035619681
+86415000000 86419270498 28805000000 28806423499 3035196224 3036619723
+86418000000 86422270607 28806000000 28807423535 3036196224 3037619759
+86421000000 86425270749 28807000000 28808423583 3037196224 3038619807
+86424000000 86428270983 28808000000 28809423661 3038196224 3039619885
+86427000000 86431270896 28809000000 28810423632 3039196224 3040619856
+86430000000 86434271017 28810000000 28811423672 3040196224 3041619896
+86433000000 86437271125 28811000000 28812423708 3041196224 3042619932
+86436000000 86440271360 28812000000 28813423786 3042196224 3043620010
+86439000000 86443271539 28813000000 28814423846 3043196224 3044620070
+86442000000 86446185179 28814000000 28815395059 3044196224 3045591283
+86445000000 86449271808 28815000000 28816423936 3045196224 3046620160
+86448000000 86452271981 28816000000 28817423993 3046196224 3047620217
+86451000000 86455272097 28817000000 28818424032 3047196224 3048620256
+86454000000 86458272270 28818000000 28819424090 3048196224 3049620314
+86457000000 86461272442 28819000000 28820424147 3049196224 3050620371
+86460000000 86464272498 28820000000 28821424166 3050196224 3051620390
+86463000000 86467272644 28821000000 28822424214 3051196224 3052620438
+86466000000 86470272840 28822000000 28823424280 3052196224 3053620504
+86469000000 86473272869 28823000000 28824424289 3053196224 3054620513
+86472000000 86476273175 28824000000 28825424391 3054196224 3055620615
+86475000000 86479273347 28825000000 28826424449 3055196224 3056620673
+86478000000 86482273480 28826000000 28827424493 3056196224 3057620717
+86481000000 86485273597 28827000000 28828424532 3057196224 3058620756
+86484000000 86488273782 28828000000 28829424594 3058196224 3059620818
+86487000000 86491273888 28829000000 28830424629 3059196224 3060620853
+86490000000 86494274069 28830000000 28831424689 3060196224 3061620913
+86493000000 86497274281 28831000000 28832424760 3061196224 3062620984
+86496000000 86500274388 28832000000 28833424796 3062196224 3063621020
+86499000000 86503274554 28833000000 28834424851 3063196224 3064621075
+86502000000 86505873299 28834000000 28835291099 3064196224 3065487323
+86505000000 86509274825 28835000000 28836424941 3065196224 3066621165
+86508000000 86512274937 28836000000 28837424979 3066196224 3067621203
+86511000000 86515275146 28837000000 28838425048 3067196224 3068621272
+86514000000 86518275225 28838000000 28839425075 3068196224 3069621299
+86517000000 86521275450 28839000000 28840425150 3069196224 3070621374
+86520000000 86524275577 28840000000 28841425192 3070196224 3071621416
+86523000000 86527275666 28841000000 28842425222 3071196224 3072621446
+86526000000 86530275772 28842000000 28843425257 3072196224 3073621481
+86529000000 86533275983 28843000000 28844425327 3073196224 3074621551
+86532000000 86536276192 28844000000 28845425397 3074196224 3075621621
+86535000000 86539276337 28845000000 28846425445 3075196224 3076621669
+86538000000 86542276463 28846000000 28847425487 3076196224 3077621711
+86541000000 86545276629 28847000000 28848425543 3077196224 3078621767
+86544000000 86548276709 28848000000 28849425569 3078196224 3079621793
+86547000000 86551276944 28849000000 28850425648 3079196224 3080621872
+86550000000 86554277103 28850000000 28851425701 3080196224 3081621925
+86553000000 86557277224 28851000000 28852425741 3081196224 3082621965
+86556000000 86560277384 28852000000 28853425794 3082196224 3083622018
+86559000000 86563277467 28853000000 28854425822 3083196224 3084622046
+86562000000 86566277713 28854000000 28855425904 3084196224 3085622128
+86565000000 86569277836 28855000000 28856425945 3085196224 3086622169
+86568000000 86572277972 28856000000 28857425990 3086196224 3087622214
+86571000000 86575278147 28857000000 28858426049 3087196224 3088622273
+86574000000 86578278269 28858000000 28859426089 3088196224 3089622313
+86577000000 86581278419 28859000000 28860426139 3089196224 3090622363
+86580000000 86584278567 28860000000 28861426189 3090196224 3091622413
+86583000000 86586452261 28861000000 28862150753 3091196224 3092346977
+86586000000 86590278887 28862000000 28863426295 3092196224 3093622519
+86589000000 86593279019 28863000000 28864426339 3093196224 3094622563
+86592000000 86596279193 28864000000 28865426397 3094196224 3095622621
+86595000000 86599279312 28865000000 28866426437 3095196224 3096622661
+86598000000 86602279436 28866000000 28867426478 3096196224 3097622702
+86601000000 86605279655 28867000000 28868426551 3097196224 3098622775
+86604000000 86608279791 28868000000 28869426597 3098196224 3099622821
+86607000000 86611279942 28869000000 28870426647 3099196224 3100622871
+86610000000 86614280092 28870000000 28871426697 3100196224 3101622921
+86613000000 86617280207 28871000000 28872426735 3101196224 3102622959
+86616000000 86620280304 28872000000 28873426768 3102196224 3103622992
+86619000000 86623280512 28873000000 28874426837 3103196224 3104623061
+86622000000 86626280667 28874000000 28875426889 3104196224 3105623113
+86625000000 86629280826 28875000000 28876426942 3105196224 3106623166
+86628000000 86632281000 28876000000 28877427000 3106196224 3107623224
+86631000000 86635281100 28877000000 28878427033 3107196224 3108623257
+86634000000 86638281278 28878000000 28879427092 3108196224 3109623316
+86637000000 86641281427 28879000000 28880427142 3109196224 3110623366
+86640000000 86644281555 28880000000 28881427185 3110196224 3111623409
+86643000000 86647281724 28881000000 28882427241 3111196224 3112623465
+86646000000 86650281844 28882000000 28883427281 3112196224 3113623505
+86649000000 86652109194 28883000000 28884036398 3113196224 3114232622
+86652000000 86656282094 28884000000 28885427364 3114196224 3115623588
+86655000000 86659282352 28885000000 28886427450 3115196224 3116623674
+86658000000 86662282457 28886000000 28887427485 3116196224 3117623709
+86661000000 86665282537 28887000000 28888427512 3117196224 3118623736
+86664000000 86668282684 28888000000 28889427561 3118196224 3119623785
+86667000000 86671282938 28889000000 28890427646 3119196224 3120623870
+86670000000 86674283028 28890000000 28891427676 3120196224 3121623900
+86673000000 86677283273 28891000000 28892427757 3121196224 3122623981
+86676000000 86680283351 28892000000 28893427783 3122196224 3123624007
+86679000000 86683283528 28893000000 28894427842 3123196224 3124624066
+86682000000 86686283674 28894000000 28895427891 3124196224 3125624115
+86685000000 86689283818 28895000000 28896427939 3125196224 3126624163
+86688000000 86690906472 28896000000 28896968824 3126196224 3127165048
+86691000000 86695284133 28897000000 28898428044 3127196224 3128624268
+86694000000 86698284293 28898000000 28899428097 3128196224 3129624321
+86697000000 86701284430 28899000000 28900428143 3129196224 3130624367
+86700000000 86704284588 28900000000 28901428196 3130196224 3131624420
+86703000000 86707284746 28901000000 28902428248 3131196224 3132624472
+86706000000 86710284860 28902000000 28903428286 3132196224 3133624510
+86709000000 86713285021 28903000000 28904428340 3133196224 3134624564
+86712000000 86716285148 28904000000 28905428382 3134196224 3135624606
+86715000000 86719285257 28905000000 28906428419 3135196224 3136624643
+86718000000 86722285399 28906000000 28907428466 3136196224 3137624690
+86721000000 86725285633 28907000000 28908428544 3137196224 3138624768
+86724000000 86728285546 28908000000 28909428515 3138196224 3139624739
+86727000000 86731285667 28909000000 28910428555 3139196224 3140624779
+86730000000 86734285775 28910000000 28911428591 3140196224 3141624815
+86733000000 86737286010 28911000000 28912428670 3141196224 3142624894
+86736000000 86740286189 28912000000 28913428729 3142196224 3143624953
+86739000000 86743199829 28913000000 28914399943 3143196224 3144596167
+86742000000 86746286458 28914000000 28915428819 3144196224 3145625043
+86745000000 86749286631 28915000000 28916428877 3145196224 3146625101
+86748000000 86752286747 28916000000 28917428915 3146196224 3147625139
+86751000000 86755286920 28917000000 28918428973 3147196224 3148625197
+86754000000 86758287092 28918000000 28919429030 3148196224 3149625254
+86757000000 86761287148 28919000000 28920429049 3149196224 3150625273
+86760000000 86764287294 28920000000 28921429098 3150196224 3151625322
+86763000000 86767287490 28921000000 28922429163 3151196224 3152625387
+86766000000 86770287519 28922000000 28923429173 3152196224 3153625397
+86769000000 86773287825 28923000000 28924429275 3153196224 3154625499
+86772000000 86776287997 28924000000 28925429332 3154196224 3155625556
+86775000000 86779288130 28925000000 28926429376 3155196224 3156625600
+86778000000 86782288247 28926000000 28927429415 3156196224 3157625639
+86781000000 86785288432 28927000000 28928429477 3157196224 3158625701
+86784000000 86788288538 28928000000 28929429512 3158196224 3159625736
+86787000000 86791288719 28929000000 28930429573 3159196224 3160625797
+86790000000 86794288931 28930000000 28931429643 3160196224 3161625867
+86793000000 86797289038 28931000000 28932429679 3161196224 3162625903
+86796000000 86800289204 28932000000 28933429734 3162196224 3163625958
+86799000000 86802887949 28933000000 28934295983 3163196224 3164492207
+86802000000 86806289475 28934000000 28935429825 3164196224 3165626049
+86805000000 86809289587 28935000000 28936429862 3165196224 3166626086
+86808000000 86812289796 28936000000 28937429932 3166196224 3167626156
+86811000000 86815289875 28937000000 28938429958 3167196224 3168626182
+86814000000 86818290100 28938000000 28939430033 3168196224 3169626257
+86817000000 86821290227 28939000000 28940430075 3169196224 3170626299
+86820000000 86824290316 28940000000 28941430105 3170196224 3171626329
+86823000000 86827290422 28941000000 28942430140 3171196224 3172626364
+86826000000 86830290633 28942000000 28943430211 3172196224 3173626435
+86829000000 86833290842 28943000000 28944430280 3173196224 3174626504
+86832000000 86836290987 28944000000 28945430329 3174196224 3175626553
+86835000000 86839291113 28945000000 28946430371 3175196224 3176626595
+86838000000 86842291279 28946000000 28947430426 3176196224 3177626650
+86841000000 86845291359 28947000000 28948430453 3177196224 3178626677
+86844000000 86848291594 28948000000 28949430531 3178196224 3179626755
+86847000000 86851291753 28949000000 28950430584 3179196224 3180626808
+86850000000 86854291874 28950000000 28951430624 3180196224 3181626848
+86853000000 86857292034 28951000000 28952430678 3181196224 3182626902
+86856000000 86860292117 28952000000 28953430705 3182196224 3183626929
+86859000000 86863292363 28953000000 28954430787 3183196224 3184627011
+86862000000 86866292486 28954000000 28955430828 3184196224 3185627052
+86865000000 86869292622 28955000000 28956430874 3185196224 3186627098
+86868000000 86872292797 28956000000 28957430932 3186196224 3187627156
+86871000000 86875292919 28957000000 28958430973 3187196224 3188627197
+86874000000 86878293069 28958000000 28959431023 3188196224 3189627247
+86877000000 86881293217 28959000000 28960431072 3189196224 3190627296
+86880000000 86883466911 28960000000 28961155637 3190196224 3191351861
+86883000000 86887293537 28961000000 28962431179 3191196224 3192627403
+86886000000 86890293669 28962000000 28963431223 3192196224 3193627447
+86889000000 86893293843 28963000000 28964431281 3193196224 3194627505
+86892000000 86896293962 28964000000 28965431320 3194196224 3195627544
+86895000000 86899294086 28965000000 28966431362 3195196224 3196627586
+86898000000 86902294305 28966000000 28967431435 3196196224 3197627659
+86901000000 86905294441 28967000000 28968431480 3197196224 3198627704
+86904000000 86908294592 28968000000 28969431530 3198196224 3199627754
+86907000000 86911294742 28969000000 28970431580 3199196224 3200627804
+86910000000 86914294857 28970000000 28971431619 3200196224 3201627843
+86913000000 86917294954 28971000000 28972431651 3201196224 3202627875
+86916000000 86920295162 28972000000 28973431720 3202196224 3203627944
+86919000000 86923295317 28973000000 28974431772 3203196224 3204627996
+86922000000 86926295476 28974000000 28975431825 3204196224 3205628049
+86925000000 86929295650 28975000000 28976431883 3205196224 3206628107
+86928000000 86932295750 28976000000 28977431916 3206196224 3207628140
+86931000000 86935295928 28977000000 28978431976 3207196224 3208628200
+86934000000 86938296077 28978000000 28979432025 3208196224 3209628249
+86937000000 86941296205 28979000000 28980432068 3209196224 3210628292
+86940000000 86944296374 28980000000 28981432124 3210196224 3211628348
+86943000000 86947296494 28981000000 28982432164 3211196224 3212628388
+86946000000 86949123844 28982000000 28983041281 3212196224 3213237505
+86949000000 86953296744 28983000000 28984432248 3213196224 3214628472
+86952000000 86956297002 28984000000 28985432334 3214196224 3215628558
+86955000000 86959297107 28985000000 28986432369 3215196224 3216628593
+86958000000 86962297187 28986000000 28987432395 3216196224 3217628619
+86961000000 86965297334 28987000000 28988432444 3217196224 3218628668
+86964000000 86968297588 28988000000 28989432529 3218196224 3219628753
+86967000000 86971297678 28989000000 28990432559 3219196224 3220628783
+86970000000 86974297923 28990000000 28991432641 3220196224 3221628865
+86973000000 86977298001 28991000000 28992432667 3221196224 3222628891
+86976000000 86980298178 28992000000 28993432726 3222196224 3223628950
+86979000000 86983298324 28993000000 28994432774 3223196224 3224628998
+86982000000 86986298468 28994000000 28995432822 3224196224 3225629046
+86985000000 86987921122 28995000000 28995973707 3225196224 3226169931
+86988000000 86992298783 28996000000 28997432927 3226196224 3227629151
+86991000000 86995298943 28997000000 28998432981 3227196224 3228629205
+86994000000 86998299080 28998000000 28999433026 3228196224 3229629250
+86997000000 87001299238 28999000000 29000433079 3229196224 3230629303
+87000000000 87004299396 29000000000 29001433132 3230196224 3231629356
+87003000000 87007299510 29001000000 29002433170 3231196224 3232629394
+87006000000 87010299671 29002000000 29003433223 3232196224 3233629447
+87009000000 87013299798 29003000000 29004433266 3233196224 3234629490
+87012000000 87016299907 29004000000 29005433302 3234196224 3235629526
+87015000000 87019300049 29005000000 29006433349 3235196224 3236629573
+87018000000 87022300283 29006000000 29007433427 3236196224 3237629651
+87021000000 87025300196 29007000000 29008433398 3237196224 3238629622
+87024000000 87028300317 29008000000 29009433439 3238196224 3239629663
+87027000000 87031300425 29009000000 29010433475 3239196224 3240629699
+87030000000 87034300660 29010000000 29011433553 3240196224 3241629777
+87033000000 87037300839 29011000000 29012433613 3241196224 3242629837
+87036000000 87040214479 29012000000 29013404826 3242196224 3243601050
+87039000000 87043301108 29013000000 29014433702 3243196224 3244629926
+87042000000 87046301281 29014000000 29015433760 3244196224 3245629984
+87045000000 87049301397 29015000000 29016433799 3245196224 3246630023
+87048000000 87052301570 29016000000 29017433856 3246196224 3247630080
+87051000000 87055301742 29017000000 29018433914 3247196224 3248630138
+87054000000 87058301798 29018000000 29019433932 3248196224 3249630156
+87057000000 87061301944 29019000000 29020433981 3249196224 3250630205
+87060000000 87064302140 29020000000 29021434046 3250196224 3251630270
+87063000000 87067302169 29021000000 29022434056 3251196224 3252630280
+87066000000 87070302475 29022000000 29023434158 3252196224 3253630382
+87069000000 87073302647 29023000000 29024434215 3253196224 3254630439
+87072000000 87076302780 29024000000 29025434260 3254196224 3255630484
+87075000000 87079302897 29025000000 29026434299 3255196224 3256630523
+87078000000 87082303082 29026000000 29027434360 3256196224 3257630584
+87081000000 87085303188 29027000000 29028434396 3257196224 3258630620
+87084000000 87088303369 29028000000 29029434456 3258196224 3259630680
+87087000000 87091303581 29029000000 29030434527 3259196224 3260630751
+87090000000 87094303688 29030000000 29031434562 3260196224 3261630786
+87093000000 87097303854 29031000000 29032434618 3261196224 3262630842
+87096000000 87099902599 29032000000 29033300866 3262196224 3263497090
+87099000000 87103304125 29033000000 29034434708 3263196224 3264630932
+87102000000 87106304237 29034000000 29035434745 3264196224 3265630969
+87105000000 87109304446 29035000000 29036434815 3265196224 3266631039
+87108000000 87112304525 29036000000 29037434841 3266196224 3267631065
+87111000000 87115304750 29037000000 29038434916 3267196224 3268631140
+87114000000 87118304877 29038000000 29039434959 3268196224 3269631183
+87117000000 87121304966 29039000000 29040434988 3269196224 3270631212
+87120000000 87124305072 29040000000 29041435024 3270196224 3271631248
+87123000000 87127305283 29041000000 29042435094 3271196224 3272631318
+87126000000 87130305492 29042000000 29043435164 3272196224 3273631388
+87129000000 87133305637 29043000000 29044435212 3273196224 3274631436
+87132000000 87136305763 29044000000 29045435254 3274196224 3275631478
+87135000000 87139305929 29045000000 29046435309 3275196224 3276631533
+87138000000 87142306009 29046000000 29047435336 3276196224 3277631560
+87141000000 87145306244 29047000000 29048435414 3277196224 3278631638
+87144000000 87148306403 29048000000 29049435467 3278196224 3279631691
+87147000000 87151306524 29049000000 29050435508 3279196224 3280631732
+87150000000 87154306684 29050000000 29051435561 3280196224 3281631785
+87153000000 87157306767 29051000000 29052435589 3281196224 3282631813
+87156000000 87160307013 29052000000 29053435671 3282196224 3283631895
+87159000000 87163307136 29053000000 29054435712 3283196224 3284631936
+87162000000 87166307272 29054000000 29055435757 3284196224 3285631981
+87165000000 87169307447 29055000000 29056435815 3285196224 3286632039
+87168000000 87172307569 29056000000 29057435856 3286196224 3287632080
+87171000000 87175307719 29057000000 29058435906 3287196224 3288632130
+87174000000 87178307867 29058000000 29059435955 3288196224 3289632179
+87177000000 87180481561 29059000000 29060160520 3289196224 3290356744
+87180000000 87184308187 29060000000 29061436062 3290196224 3291632286
+87183000000 87187308319 29061000000 29062436106 3291196224 3292632330
+87186000000 87190308493 29062000000 29063436164 3292196224 3293632388
+87189000000 87193308612 29063000000 29064436204 3293196224 3294632428
+87192000000 87196308736 29064000000 29065436245 3294196224 3295632469
+87195000000 87199308955 29065000000 29066436318 3295196224 3296632542
+87198000000 87202309091 29066000000 29067436363 3296196224 3297632587
+87201000000 87205309242 29067000000 29068436414 3297196224 3298632638
+87204000000 87208309392 29068000000 29069436464 3298196224 3299632688
+87207000000 87211309507 29069000000 29070436502 3299196224 3300632726
+87210000000 87214309604 29070000000 29071436534 3300196224 3301632758
+87213000000 87217309812 29071000000 29072436604 3301196224 3302632828
+87216000000 87220309967 29072000000 29073436655 3302196224 3303632879
+87219000000 87223310126 29073000000 29074436708 3303196224 3304632932
+87222000000 87226310300 29074000000 29075436766 3304196224 3305632990
+87225000000 87229310400 29075000000 29076436800 3305196224 3306633024
+87228000000 87232310578 29076000000 29077436859 3306196224 3307633083
+87231000000 87235310727 29077000000 29078436909 3307196224 3308633133
+87234000000 87238310855 29078000000 29079436951 3308196224 3309633175
+87237000000 87241311024 29079000000 29080437008 3309196224 3310633232
+87240000000 87244311144 29080000000 29081437048 3310196224 3311633272
+87243000000 87246138494 29081000000 29082046164 3311196224 3312242388
+87246000000 87250311394 29082000000 29083437131 3312196224 3313633355
+87249000000 87253311652 29083000000 29084437217 3313196224 3314633441
+87252000000 87256311757 29084000000 29085437252 3314196224 3315633476
+87255000000 87259311837 29085000000 29086437279 3315196224 3316633503
+87258000000 87262311984 29086000000 29087437328 3316196224 3317633552
+87261000000 87265312238 29087000000 29088437412 3317196224 3318633636
+87264000000 87268312328 29088000000 29089437442 3318196224 3319633666
+87267000000 87271312573 29089000000 29090437524 3319196224 3320633748
+87270000000 87274312651 29090000000 29091437550 3320196224 3321633774
+87273000000 87277312828 29091000000 29092437609 3321196224 3322633833
+87276000000 87280312974 29092000000 29093437658 3322196224 3323633882
+87279000000 87283313118 29093000000 29094437706 3323196224 3324633930
+87282000000 87284935772 29094000000 29094978590 3324196224 3325174814
+87285000000 87289313433 29095000000 29096437811 3325196224 3326634035
+87288000000 87292313593 29096000000 29097437864 3326196224 3327634088
+87291000000 87295313730 29097000000 29098437910 3327196224 3328634134
+87294000000 87298313888 29098000000 29099437962 3328196224 3329634186
+87297000000 87301314046 29099000000 29100438015 3329196224 3330634239
+87300000000 87304314160 29100000000 29101438053 3330196224 3331634277
+87303000000 87307314321 29101000000 29102438107 3331196224 3332634331
+87306000000 87310314448 29102000000 29103438149 3332196224 3333634373
+87309000000 87313314557 29103000000 29104438185 3333196224 3334634409
+87312000000 87316314699 29104000000 29105438233 3334196224 3335634457
+87315000000 87319314933 29105000000 29106438311 3335196224 3336634535
+87318000000 87322314846 29106000000 29107438282 3336196224 3337634506
+87321000000 87325314967 29107000000 29108438322 3337196224 3338634546
+87324000000 87328315075 29108000000 29109438358 3338196224 3339634582
+87327000000 87331315310 29109000000 29110438436 3339196224 3340634660
+87330000000 87334315489 29110000000 29111438496 3340196224 3341634720
+87333000000 87337229129 29111000000 29112409709 3341196224 3342605933
+87336000000 87340315758 29112000000 29113438586 3342196224 3343634810
+87339000000 87343315931 29113000000 29114438643 3343196224 3344634867
+87342000000 87346316047 29114000000 29115438682 3344196224 3345634906
+87345000000 87349316220 29115000000 29116438740 3345196224 3346634964
+87348000000 87352316392 29116000000 29117438797 3346196224 3347635021
+87351000000 87355316448 29117000000 29118438816 3347196224 3348635040
+87354000000 87358316594 29118000000 29119438864 3348196224 3349635088
+87357000000 87361316790 29119000000 29120438930 3349196224 3350635154
+87360000000 87364316819 29120000000 29121438939 3350196224 3351635163
+87363000000 87367317125 29121000000 29122439041 3351196224 3352635265
+87366000000 87370317297 29122000000 29123439099 3352196224 3353635323
+87369000000 87373317430 29123000000 29124439143 3353196224 3354635367
+87372000000 87376317547 29124000000 29125439182 3354196224 3355635406
+87375000000 87379317732 29125000000 29126439244 3355196224 3356635468
+87378000000 87382317838 29126000000 29127439279 3356196224 3357635503
+87381000000 87385318019 29127000000 29128439339 3357196224 3358635563
+87384000000 87388318231 29128000000 29129439410 3358196224 3359635634
+87387000000 87391318338 29129000000 29130439446 3359196224 3360635670
+87390000000 87394318504 29130000000 29131439501 3360196224 3361635725
+87393000000 87396917249 29131000000 29132305749 3361196224 3362501973
+87396000000 87400318775 29132000000 29133439591 3362196224 3363635815
+87399000000 87403318887 29133000000 29134439629 3363196224 3364635853
+87402000000 87406319096 29134000000 29135439698 3364196224 3365635922
+87405000000 87409319175 29135000000 29136439725 3365196224 3366635949
+87408000000 87412319400 29136000000 29137439800 3366196224 3367636024
+87411000000 87415319527 29137000000 29138439842 3367196224 3368636066
+87414000000 87418319616 29138000000 29139439872 3368196224 3369636096
+87417000000 87421319722 29139000000 29140439907 3369196224 3370636131
+87420000000 87424319933 29140000000 29141439977 3370196224 3371636201
+87423000000 87427320142 29141000000 29142440047 3371196224 3372636271
+87426000000 87430320287 29142000000 29143440095 3372196224 3373636319
+87429000000 87433320413 29143000000 29144440137 3373196224 3374636361
+87432000000 87436320579 29144000000 29145440193 3374196224 3375636417
+87435000000 87439320659 29145000000 29146440219 3375196224 3376636443
+87438000000 87442320894 29146000000 29147440298 3376196224 3377636522
+87441000000 87445321053 29147000000 29148440351 3377196224 3378636575
+87444000000 87448321174 29148000000 29149440391 3378196224 3379636615
+87447000000 87451321334 29149000000 29150440444 3379196224 3380636668
+87450000000 87454321417 29150000000 29151440472 3380196224 3381636696
+87453000000 87457321663 29151000000 29152440554 3381196224 3382636778
+87456000000 87460321786 29152000000 29153440595 3382196224 3383636819
+87459000000 87463321922 29153000000 29154440640 3383196224 3384636864
+87462000000 87466322097 29154000000 29155440699 3384196224 3385636923
+87465000000 87469322219 29155000000 29156440739 3385196224 3386636963
+87468000000 87472322369 29156000000 29157440789 3386196224 3387637013
+87471000000 87475322517 29157000000 29158440839 3387196224 3388637063
+87474000000 87477496211 29158000000 29159165403 3388196224 3389361627
+87477000000 87481322837 29159000000 29160440945 3389196224 3390637169
+87480000000 87484322969 29160000000 29161440989 3390196224 3391637213
+87483000000 87487323143 29161000000 29162441047 3391196224 3392637271
+87486000000 87490323262 29162000000 29163441087 3392196224 3393637311
+87489000000 87493323386 29163000000 29164441128 3393196224 3394637352
+87492000000 87496323605 29164000000 29165441201 3394196224 3395637425
+87495000000 87499323741 29165000000 29166441247 3395196224 3396637471
+87498000000 87502323892 29166000000 29167441297 3396196224 3397637521
+87501000000 87505324042 29167000000 29168441347 3397196224 3398637571
+87504000000 87508324157 29168000000 29169441385 3398196224 3399637609
+87507000000 87511324254 29169000000 29170441418 3399196224 3400637642
+87510000000 87514324462 29170000000 29171441487 3400196224 3401637711
+87513000000 87517324617 29171000000 29172441539 3401196224 3402637763
+87516000000 87520324776 29172000000 29173441592 3402196224 3403637816
+87519000000 87523324950 29173000000 29174441650 3403196224 3404637874
+87522000000 87526325050 29174000000 29175441683 3404196224 3405637907
+87525000000 87529325228 29175000000 29176441742 3405196224 3406637966
+87528000000 87532325377 29176000000 29177441792 3406196224 3407638016
+87531000000 87535325505 29177000000 29178441835 3407196224 3408638059
+87534000000 87538325674 29178000000 29179441891 3408196224 3409638115
+87537000000 87541325794 29179000000 29180441931 3409196224 3410638155
+87540000000 87543153144 29180000000 29181051048 3410196224 3411247272
+87543000000 87547326044 29181000000 29182442014 3411196224 3412638238
+87546000000 87550326302 29182000000 29183442100 3412196224 3413638324
+87549000000 87553326407 29183000000 29184442135 3413196224 3414638359
+87552000000 87556326487 29184000000 29185442162 3414196224 3415638386
+87555000000 87559326634 29185000000 29186442211 3415196224 3416638435
+87558000000 87562326888 29186000000 29187442296 3416196224 3417638520
+87561000000 87565326978 29187000000 29188442326 3417196224 3418638550
+87564000000 87568327223 29188000000 29189442407 3418196224 3419638631
+87567000000 87571327301 29189000000 29190442433 3419196224 3420638657
+87570000000 87574327478 29190000000 29191442492 3420196224 3421638716
+87573000000 87577327624 29191000000 29192442541 3421196224 3422638765
+87576000000 87580327768 29192000000 29193442589 3422196224 3423638813
+87579000000 87581950422 29193000000 29193983474 3423196224 3424179698
+87582000000 87586328083 29194000000 29195442694 3424196224 3425638918
+87585000000 87589328243 29195000000 29196442747 3425196224 3426638971
+87588000000 87592328380 29196000000 29197442793 3426196224 3427639017
+87591000000 87595328538 29197000000 29198442846 3427196224 3428639070
+87594000000 87598328696 29198000000 29199442898 3428196224 3429639122
+87597000000 87601328810 29199000000 29200442936 3429196224 3430639160
+87600000000 87604328971 29200000000 29201442990 3430196224 3431639214
+87603000000 87607329098 29201000000 29202443032 3431196224 3432639256
+87606000000 87610329207 29202000000 29203443069 3432196224 3433639293
+87609000000 87613329349 29203000000 29204443116 3433196224 3434639340
+87612000000 87616329583 29204000000 29205443194 3434196224 3435639418
+87615000000 87619329496 29205000000 29206443165 3435196224 3436639389
+87618000000 87622329617 29206000000 29207443205 3436196224 3437639429
+87621000000 87625329725 29207000000 29208443241 3437196224 3438639465
+87624000000 87628329960 29208000000 29209443320 3438196224 3439639544
+87627000000 87631330139 29209000000 29210443379 3439196224 3440639603
+87630000000 87634243779 29210000000 29211414593 3440196224 3441610817
+87633000000 87637330408 29211000000 29212443469 3441196224 3442639693
+87636000000 87640330581 29212000000 29213443527 3442196224 3443639751
+87639000000 87643330697 29213000000 29214443565 3443196224 3444639789
+87642000000 87646330870 29214000000 29215443623 3444196224 3445639847
+87645000000 87649331042 29215000000 29216443680 3445196224 3446639904
+87648000000 87652331098 29216000000 29217443699 3446196224 3447639923
+87651000000 87655331244 29217000000 29218443748 3447196224 3448639972
+87654000000 87658331440 29218000000 29219443813 3448196224 3449640037
+87657000000 87661331469 29219000000 29220443823 3449196224 3450640047
+87660000000 87664331775 29220000000 29221443925 3450196224 3451640149
+87663000000 87667331947 29221000000 29222443982 3451196224 3452640206
+87666000000 87670332080 29222000000 29223444026 3452196224 3453640250
+87669000000 87673332197 29223000000 29224444065 3453196224 3454640289
+87672000000 87676332382 29224000000 29225444127 3454196224 3455640351
+87675000000 87679332488 29225000000 29226444162 3455196224 3456640386
+87678000000 87682332669 29226000000 29227444223 3456196224 3457640447
+87681000000 87685332881 29227000000 29228444293 3457196224 3458640517
+87684000000 87688332988 29228000000 29229444329 3458196224 3459640553
+87687000000 87691333154 29229000000 29230444384 3459196224 3460640608
+87690000000 87693931899 29230000000 29231310633 3460196224 3461506857
+87693000000 87697333425 29231000000 29232444475 3461196224 3462640699
+87696000000 87700333537 29232000000 29233444512 3462196224 3463640736
+87699000000 87703333746 29233000000 29234444582 3463196224 3464640806
+87702000000 87706333825 29234000000 29235444608 3464196224 3465640832
+87705000000 87709334050 29235000000 29236444683 3465196224 3466640907
+87708000000 87712334177 29236000000 29237444725 3466196224 3467640949
+87711000000 87715334266 29237000000 29238444755 3467196224 3468640979
+87714000000 87718334372 29238000000 29239444790 3468196224 3469641014
+87717000000 87721334583 29239000000 29240444861 3469196224 3470641085
+87720000000 87724334792 29240000000 29241444930 3470196224 3471641154
+87723000000 87727334937 29241000000 29242444979 3471196224 3472641203
+87726000000 87730335063 29242000000 29243445021 3472196224 3473641245
+87729000000 87733335229 29243000000 29244445076 3473196224 3474641300
+87732000000 87736335309 29244000000 29245445103 3474196224 3475641327
+87735000000 87739335544 29245000000 29246445181 3475196224 3476641405
+87738000000 87742335703 29246000000 29247445234 3476196224 3477641458
+87741000000 87745335824 29247000000 29248445274 3477196224 3478641498
+87744000000 87748335984 29248000000 29249445328 3478196224 3479641552
+87747000000 87751336067 29249000000 29250445355 3479196224 3480641579
+87750000000 87754336313 29250000000 29251445437 3480196224 3481641661
+87753000000 87757336436 29251000000 29252445478 3481196224 3482641702
+87756000000 87760336572 29252000000 29253445524 3482196224 3483641748
+87759000000 87763336747 29253000000 29254445582 3483196224 3484641806
+87762000000 87766336869 29254000000 29255445623 3484196224 3485641847
+87765000000 87769337019 29255000000 29256445673 3485196224 3486641897
+87768000000 87772337167 29256000000 29257445722 3486196224 3487641946
+87771000000 87774510861 29257000000 29258170287 3487196224 3488366511
+87774000000 87778337487 29258000000 29259445829 3488196224 3489642053
+87777000000 87781337619 29259000000 29260445873 3489196224 3490642097
+87780000000 87784337793 29260000000 29261445931 3490196224 3491642155
+87783000000 87787337912 29261000000 29262445970 3491196224 3492642194
+87786000000 87790338036 29262000000 29263446012 3492196224 3493642236
+87789000000 87793338255 29263000000 29264446085 3493196224 3494642309
+87792000000 87796338391 29264000000 29265446130 3494196224 3495642354
+87795000000 87799338542 29265000000 29266446180 3495196224 3496642404
+87798000000 87802338692 29266000000 29267446230 3496196224 3497642454
+87801000000 87805338807 29267000000 29268446269 3497196224 3498642493
+87804000000 87808338904 29268000000 29269446301 3498196224 3499642525
+87807000000 87811339112 29269000000 29270446370 3499196224 3500642594
+87810000000 87814339267 29270000000 29271446422 3500196224 3501642646
+87813000000 87817339426 29271000000 29272446475 3501196224 3502642699
+87816000000 87820339600 29272000000 29273446533 3502196224 3503642757
+87819000000 87823339700 29273000000 29274446566 3503196224 3504642790
+87822000000 87826339878 29274000000 29275446626 3504196224 3505642850
+87825000000 87829340027 29275000000 29276446675 3505196224 3506642899
+87828000000 87832340155 29276000000 29277446718 3506196224 3507642942
+87831000000 87835340324 29277000000 29278446774 3507196224 3508642998
+87834000000 87838340444 29278000000 29279446814 3508196224 3509643038
+87837000000 87840167794 29279000000 29280055931 3509196224 3510252155
+87840000000 87844340694 29280000000 29281446898 3510196224 3511643122
+87843000000 87847340952 29281000000 29282446984 3511196224 3512643208
+87846000000 87850341057 29282000000 29283447019 3512196224 3513643243
+87849000000 87853341137 29283000000 29284447045 3513196224 3514643269
+87852000000 87856341284 29284000000 29285447094 3514196224 3515643318
+87855000000 87859341538 29285000000 29286447179 3515196224 3516643403
+87858000000 87862341628 29286000000 29287447209 3516196224 3517643433
+87861000000 87865341873 29287000000 29288447291 3517196224 3518643515
+87864000000 87868341951 29288000000 29289447317 3518196224 3519643541
+87867000000 87871342128 29289000000 29290447376 3519196224 3520643600
+87870000000 87874342274 29290000000 29291447424 3520196224 3521643648
+87873000000 87877342418 29291000000 29292447472 3521196224 3522643696
+87876000000 87878965072 29292000000 29292988357 3522196224 3523184581
+87879000000 87883342733 29293000000 29294447577 3523196224 3524643801
+87882000000 87886342893 29294000000 29295447631 3524196224 3525643855
+87885000000 87889343030 29295000000 29296447676 3525196224 3526643900
+87888000000 87892343188 29296000000 29297447729 3526196224 3527643953
+87891000000 87895343346 29297000000 29298447782 3527196224 3528644006
+87894000000 87898343460 29298000000 29299447820 3528196224 3529644044
+87897000000 87901343621 29299000000 29300447873 3529196224 3530644097
+87900000000 87904343748 29300000000 29301447916 3530196224 3531644140
+87903000000 87907343857 29301000000 29302447952 3531196224 3532644176
+87906000000 87910343999 29302000000 29303447999 3532196224 3533644223
+87909000000 87913344233 29303000000 29304448077 3533196224 3534644301
+87912000000 87916344146 29304000000 29305448048 3534196224 3535644272
+87915000000 87919344267 29305000000 29306448089 3535196224 3536644313
+87918000000 87922344375 29306000000 29307448125 3536196224 3537644349
+87921000000 87925344610 29307000000 29308448203 3537196224 3538644427
+87924000000 87928344789 29308000000 29309448263 3538196224 3539644487
+87927000000 87931258429 29309000000 29310419476 3539196224 3540615700
+87930000000 87934345058 29310000000 29311448352 3540196224 3541644576
+87933000000 87937345231 29311000000 29312448410 3541196224 3542644634
+87936000000 87940345347 29312000000 29313448449 3542196224 3543644673
+87939000000 87943345520 29313000000 29314448506 3543196224 3544644730
+87942000000 87946345692 29314000000 29315448564 3544196224 3545644788
+87945000000 87949345748 29315000000 29316448582 3545196224 3546644806
+87948000000 87952345894 29316000000 29317448631 3546196224 3547644855
+87951000000 87955346090 29317000000 29318448696 3547196224 3548644920
+87954000000 87958346119 29318000000 29319448706 3548196224 3549644930
+87957000000 87961346425 29319000000 29320448808 3549196224 3550645032
+87960000000 87964346597 29320000000 29321448865 3550196224 3551645089
+87963000000 87967346730 29321000000 29322448910 3551196224 3552645134
+87966000000 87970346847 29322000000 29323448949 3552196224 3553645173
+87969000000 87973347032 29323000000 29324449010 3553196224 3554645234
+87972000000 87976347138 29324000000 29325449046 3554196224 3555645270
+87975000000 87979347319 29325000000 29326449106 3555196224 3556645330
+87978000000 87982347531 29326000000 29327449177 3556196224 3557645401
+87981000000 87985347638 29327000000 29328449212 3557196224 3558645436
+87984000000 87988347804 29328000000 29329449268 3558196224 3559645492
+87987000000 87990946549 29329000000 29330315516 3559196224 3560511740
+87990000000 87994348075 29330000000 29331449358 3560196224 3561645582
+87993000000 87997348187 29331000000 29332449395 3561196224 3562645619
+87996000000 88000348396 29332000000 29333449465 3562196224 3563645689
+87999000000 88003348475 29333000000 29334449491 3563196224 3564645715
+88002000000 88006348700 29334000000 29335449566 3564196224 3565645790
+88005000000 88009348827 29335000000 29336449609 3565196224 3566645833
+88008000000 88012348916 29336000000 29337449638 3566196224 3567645862
+88011000000 88015349022 29337000000 29338449674 3567196224 3568645898
+88014000000 88018349233 29338000000 29339449744 3568196224 3569645968
+88017000000 88021349442 29339000000 29340449814 3569196224 3570646038
+88020000000 88024349587 29340000000 29341449862 3570196224 3571646086
+88023000000 88027349713 29341000000 29342449904 3571196224 3572646128
+88026000000 88030349879 29342000000 29343449959 3572196224 3573646183
+88029000000 88033349959 29343000000 29344449986 3573196224 3574646210
+88032000000 88036350194 29344000000 29345450064 3574196224 3575646288
+88035000000 88039350353 29345000000 29346450117 3575196224 3576646341
+88038000000 88042350474 29346000000 29347450158 3576196224 3577646382
+88041000000 88045350634 29347000000 29348450211 3577196224 3578646435
+88044000000 88048350717 29348000000 29349450239 3578196224 3579646463
+88047000000 88051350963 29349000000 29350450321 3579196224 3580646545
+88050000000 88054351086 29350000000 29351450362 3580196224 3581646586
+88053000000 88057351222 29351000000 29352450407 3581196224 3582646631
+88056000000 88060351397 29352000000 29353450465 3582196224 3583646689
+88059000000 88063351519 29353000000 29354450506 3583196224 3584646730
+88062000000 88066351669 29354000000 29355450556 3584196224 3585646780
+88065000000 88069351817 29355000000 29356450605 3585196224 3586646829
+88068000000 88071525511 29356000000 29357175170 3586196224 3587371394
+88071000000 88075352137 29357000000 29358450712 3587196224 3588646936
+88074000000 88078352269 29358000000 29359450756 3588196224 3589646980
+88077000000 88081352443 29359000000 29360450814 3589196224 3590647038
+88080000000 88084352562 29360000000 29361450854 3590196224 3591647078
+88083000000 88087352686 29361000000 29362450895 3591196224 3592647119
+88086000000 88090352905 29362000000 29363450968 3592196224 3593647192
+88089000000 88093353041 29363000000 29364451013 3593196224 3594647237
+88092000000 88096353192 29364000000 29365451064 3594196224 3595647288
+88095000000 88099353342 29365000000 29366451114 3595196224 3596647338
+88098000000 88102353457 29366000000 29367451152 3596196224 3597647376
+88101000000 88105353554 29367000000 29368451184 3597196224 3598647408
+88104000000 88108353762 29368000000 29369451254 3598196224 3599647478
+88107000000 88111353917 29369000000 29370451305 3599196224 3600647529
+88110000000 88114354076 29370000000 29371451358 3600196224 3601647582
+88113000000 88117354250 29371000000 29372451416 3601196224 3602647640
+88116000000 88120354350 29372000000 29373451450 3602196224 3603647674
+88119000000 88123354528 29373000000 29374451509 3603196224 3604647733
+88122000000 88126354677 29374000000 29375451559 3604196224 3605647783
+88125000000 88129354805 29375000000 29376451601 3605196224 3606647825
+88128000000 88132354974 29376000000 29377451658 3606196224 3607647882
+88131000000 88135355094 29377000000 29378451698 3607196224 3608647922
+88134000000 88137182444 29378000000 29379060814 3608196224 3609257038
+88137000000 88141355344 29379000000 29380451781 3609196224 3610648005
+88140000000 88144355602 29380000000 29381451867 3610196224 3611648091
+88143000000 88147355707 29381000000 29382451902 3611196224 3612648126
+88146000000 88150355787 29382000000 29383451929 3612196224 3613648153
+88149000000 88153355934 29383000000 29384451978 3613196224 3614648202
+88152000000 88156356188 29384000000 29385452062 3614196224 3615648286
+88155000000 88159356278 29385000000 29386452092 3615196224 3616648316
+88158000000 88162356523 29386000000 29387452174 3616196224 3617648398
+88161000000 88165356601 29387000000 29388452200 3617196224 3618648424
+88164000000 88168356778 29388000000 29389452259 3618196224 3619648483
+88167000000 88171356924 29389000000 29390452308 3619196224 3620648532
+88170000000 88174357068 29390000000 29391452356 3620196224 3621648580
+88173000000 88175979722 29391000000 29391993240 3621196224 3622189464
+88176000000 88180357383 29392000000 29393452461 3622196224 3623648685
+88179000000 88183357543 29393000000 29394452514 3623196224 3624648738
+88182000000 88186357680 29394000000 29395452560 3624196224 3625648784
+88185000000 88189357838 29395000000 29396452612 3625196224 3626648836
+88188000000 88192357996 29396000000 29397452665 3626196224 3627648889
+88191000000 88195358110 29397000000 29398452703 3627196224 3628648927
+88194000000 88198358271 29398000000 29399452757 3628196224 3629648981
+88197000000 88201358398 29399000000 29400452799 3629196224 3630649023
+88200000000 88204358507 29400000000 29401452835 3630196224 3631649059
+88203000000 88207358649 29401000000 29402452883 3631196224 3632649107
+88206000000 88210358883 29402000000 29403452961 3632196224 3633649185
+88209000000 88213358796 29403000000 29404452932 3633196224 3634649156
+88212000000 88216358917 29404000000 29405452972 3634196224 3635649196
+88215000000 88219359025 29405000000 29406453008 3635196224 3636649232
+88218000000 88222359260 29406000000 29407453086 3636196224 3637649310
+88221000000 88225359439 29407000000 29408453146 3637196224 3638649370
+88224000000 88228273079 29408000000 29409424359 3638196224 3639620583
+88227000000 88231359708 29409000000 29410453236 3639196224 3640649460
+88230000000 88234359881 29410000000 29411453293 3640196224 3641649517
+88233000000 88237359997 29411000000 29412453332 3641196224 3642649556
+88236000000 88240360170 29412000000 29413453390 3642196224 3643649614
+88239000000 88243360342 29413000000 29414453447 3643196224 3644649671
+88242000000 88246360398 29414000000 29415453466 3644196224 3645649690
+88245000000 88249360544 29415000000 29416453514 3645196224 3646649738
+88248000000 88252360740 29416000000 29417453580 3646196224 3647649804
+88251000000 88255360769 29417000000 29418453589 3647196224 3648649813
+88254000000 88258361075 29418000000 29419453691 3648196224 3649649915
+88257000000 88261361247 29419000000 29420453749 3649196224 3650649973
+88260000000 88264361380 29420000000 29421453793 3650196224 3651650017
+88263000000 88267361497 29421000000 29422453832 3651196224 3652650056
+88266000000 88270361682 29422000000 29423453894 3652196224 3653650118
+88269000000 88273361788 29423000000 29424453929 3653196224 3654650153
+88272000000 88276361969 29424000000 29425453989 3654196224 3655650213
+88275000000 88279362181 29425000000 29426454060 3655196224 3656650284
+88278000000 88282362288 29426000000 29427454096 3656196224 3657650320
+88281000000 88285362454 29427000000 29428454151 3657196224 3658650375
+88284000000 88287961199 29428000000 29429320399 3658196224 3659516623
+88287000000 88291362725 29429000000 29430454241 3659196224 3660650465
+88290000000 88294362837 29430000000 29431454279 3660196224 3661650503
+88293000000 88297363046 29431000000 29432454348 3661196224 3662650572
+88296000000 88300363125 29432000000 29433454375 3662196224 3663650599
+88299000000 88303363350 29433000000 29434454450 3663196224 3664650674
+88302000000 88306363477 29434000000 29435454492 3664196224 3665650716
+88305000000 88309363566 29435000000 29436454522 3665196224 3666650746
+88308000000 88312363672 29436000000 29437454557 3666196224 3667650781
+88311000000 88315363883 29437000000 29438454627 3667196224 3668650851
+88314000000 88318364092 29438000000 29439454697 3668196224 3669650921
+88317000000 88321364237 29439000000 29440454745 3669196224 3670650969
+88320000000 88324364363 29440000000 29441454787 3670196224 3671651011
+88323000000 88327364529 29441000000 29442454843 3671196224 3672651067
+88326000000 88330364609 29442000000 29443454869 3672196224 3673651093
+88329000000 88333364844 29443000000 29444454948 3673196224 3674651172
+88332000000 88336365003 29444000000 29445455001 3674196224 3675651225
+88335000000 88339365124 29445000000 29446455041 3675196224 3676651265
+88338000000 88342365284 29446000000 29447455094 3676196224 3677651318
+88341000000 88345365367 29447000000 29448455122 3677196224 3678651346
+88344000000 88348365613 29448000000 29449455204 3678196224 3679651428
+88347000000 88351365736 29449000000 29450455245 3679196224 3680651469
+88350000000 88354365872 29450000000 29451455290 3680196224 3681651514
+88353000000 88357366047 29451000000 29452455349 3681196224 3682651573
+88356000000 88360366169 29452000000 29453455389 3682196224 3683651613
+88359000000 88363366319 29453000000 29454455439 3683196224 3684651663
+88362000000 88366366467 29454000000 29455455489 3684196224 3685651713
+88365000000 88368540161 29455000000 29456180053 3685196224 3686376277
+88368000000 88372366787 29456000000 29457455595 3686196224 3687651819
+88371000000 88375366919 29457000000 29458455639 3687196224 3688651863
+88374000000 88378367093 29458000000 29459455697 3688196224 3689651921
+88377000000 88381367212 29459000000 29460455737 3689196224 3690651961
+88380000000 88384367336 29460000000 29461455778 3690196224 3691652002
+88383000000 88387367555 29461000000 29462455851 3691196224 3692652075
+88386000000 88390367691 29462000000 29463455897 3692196224 3693652121
+88389000000 88393367842 29463000000 29464455947 3693196224 3694652171
+88392000000 88396367992 29464000000 29465455997 3694196224 3695652221
+88395000000 88399368107 29465000000 29466456035 3695196224 3696652259
+88398000000 88402368204 29466000000 29467456068 3696196224 3697652292
+88401000000 88405368412 29467000000 29468456137 3697196224 3698652361
+88404000000 88408368567 29468000000 29469456189 3698196224 3699652413
+88407000000 88411368726 29469000000 29470456242 3699196224 3700652466
+88410000000 88414368900 29470000000 29471456300 3700196224 3701652524
+88413000000 88417369000 29471000000 29472456333 3701196224 3702652557
+88416000000 88420369178 29472000000 29473456392 3702196224 3703652616
+88419000000 88423369327 29473000000 29474456442 3703196224 3704652666
+88422000000 88426369455 29474000000 29475456485 3704196224 3705652709
+88425000000 88429369624 29475000000 29476456541 3705196224 3706652765
+88428000000 88432369744 29476000000 29477456581 3706196224 3707652805
+88431000000 88434197094 29477000000 29478065698 3707196224 3708261922
+88434000000 88438369994 29478000000 29479456664 3708196224 3709652888
+88437000000 88441370252 29479000000 29480456750 3709196224 3710652974
+88440000000 88444370357 29480000000 29481456785 3710196224 3711653009
+88443000000 88447370437 29481000000 29482456812 3711196224 3712653036
+88446000000 88450370584 29482000000 29483456861 3712196224 3713653085
+88449000000 88453370838 29483000000 29484456946 3713196224 3714653170
+88452000000 88456370928 29484000000 29485456976 3714196224 3715653200
+88455000000 88459371173 29485000000 29486457057 3715196224 3716653281
+88458000000 88462371251 29486000000 29487457083 3716196224 3717653307
+88461000000 88465371428 29487000000 29488457142 3717196224 3718653366
+88464000000 88468371574 29488000000 29489457191 3718196224 3719653415
+88467000000 88471371718 29489000000 29490457239 3719196224 3720653463
+88470000000 88472994372 29490000000 29490998124 3720196224 3721194348
+88473000000 88477372033 29491000000 29492457344 3721196224 3722653568
+88476000000 88480372193 29492000000 29493457397 3722196224 3723653621
+88479000000 88483372330 29493000000 29494457443 3723196224 3724653667
+88482000000 88486372488 29494000000 29495457496 3724196224 3725653720
+88485000000 88489372646 29495000000 29496457548 3725196224 3726653772
+88488000000 88492372760 29496000000 29497457586 3726196224 3727653810
+88491000000 88495372921 29497000000 29498457640 3727196224 3728653864
+88494000000 88498373048 29498000000 29499457682 3728196224 3729653906
+88497000000 88501373157 29499000000 29500457719 3729196224 3730653943
+88500000000 88504373299 29500000000 29501457766 3730196224 3731653990
+88503000000 88507373533 29501000000 29502457844 3731196224 3732654068
+88506000000 88510373446 29502000000 29503457815 3732196224 3733654039
+88509000000 88513373567 29503000000 29504457855 3733196224 3734654079
+88512000000 88516373675 29504000000 29505457891 3734196224 3735654115
+88515000000 88519373910 29505000000 29506457970 3735196224 3736654194
+88518000000 88522374089 29506000000 29507458029 3736196224 3737654253
+88521000000 88525287729 29507000000 29508429243 3737196224 3738625467
+88524000000 88528374358 29508000000 29509458119 3738196224 3739654343
+88527000000 88531374531 29509000000 29510458177 3739196224 3740654401
+88530000000 88534374647 29510000000 29511458215 3740196224 3741654439
+88533000000 88537374820 29511000000 29512458273 3741196224 3742654497
+88536000000 88540374992 29512000000 29513458330 3742196224 3743654554
+88539000000 88543375048 29513000000 29514458349 3743196224 3744654573
+88542000000 88546375194 29514000000 29515458398 3744196224 3745654622
+88545000000 88549375390 29515000000 29516458463 3745196224 3746654687
+88548000000 88552375419 29516000000 29517458473 3746196224 3747654697
+88551000000 88555375725 29517000000 29518458575 3747196224 3748654799
+88554000000 88558375897 29518000000 29519458632 3748196224 3749654856
+88557000000 88561376030 29519000000 29520458676 3749196224 3750654900
+88560000000 88564376147 29520000000 29521458715 3750196224 3751654939
+88563000000 88567376332 29521000000 29522458777 3751196224 3752655001
+88566000000 88570376438 29522000000 29523458812 3752196224 3753655036
+88569000000 88573376619 29523000000 29524458873 3753196224 3754655097
+88572000000 88576376831 29524000000 29525458943 3754196224 3755655167
+88575000000 88579376938 29525000000 29526458979 3755196224 3756655203
+88578000000 88582377104 29526000000 29527459034 3756196224 3757655258
+88581000000 88584975849 29527000000 29528325283 3757196224 3758521507
+88584000000 88588377375 29528000000 29529459125 3758196224 3759655349
+88587000000 88591377487 29529000000 29530459162 3759196224 3760655386
+88590000000 88594377696 29530000000 29531459232 3760196224 3761655456
+88593000000 88597377775 29531000000 29532459258 3761196224 3762655482
+88596000000 88600378000 29532000000 29533459333 3762196224 3763655557
+88599000000 88603378127 29533000000 29534459375 3763196224 3764655599
+88602000000 88606378216 29534000000 29535459405 3764196224 3765655629
+88605000000 88609378322 29535000000 29536459440 3765196224 3766655664
+88608000000 88612378533 29536000000 29537459511 3766196224 3767655735
+88611000000 88615378742 29537000000 29538459580 3767196224 3768655804
+88614000000 88618378887 29538000000 29539459629 3768196224 3769655853
+88617000000 88621379013 29539000000 29540459671 3769196224 3770655895
+88620000000 88624379179 29540000000 29541459726 3770196224 3771655950
+88623000000 88627379259 29541000000 29542459753 3771196224 3772655977
+88626000000 88630379494 29542000000 29543459831 3772196224 3773656055
+88629000000 88633379653 29543000000 29544459884 3773196224 3774656108
+88632000000 88636379774 29544000000 29545459924 3774196224 3775656148
+88635000000 88639379934 29545000000 29546459978 3775196224 3776656202
+88638000000 88642380017 29546000000 29547460005 3776196224 3777656229
+88641000000 88645380263 29547000000 29548460087 3777196224 3778656311
+88644000000 88648380386 29548000000 29549460128 3778196224 3779656352
+88647000000 88651380522 29549000000 29550460174 3779196224 3780656398
+88650000000 88654380697 29550000000 29551460232 3780196224 3781656456
+88653000000 88657380819 29551000000 29552460273 3781196224 3782656497
+88656000000 88660380969 29552000000 29553460323 3782196224 3783656547
+88659000000 88663381117 29553000000 29554460372 3783196224 3784656596
+88662000000 88665554811 29554000000 29555184937 3784196224 3785381161
+88665000000 88669381437 29555000000 29556460479 3785196224 3786656703
+88668000000 88672381569 29556000000 29557460523 3786196224 3787656747
+88671000000 88675381743 29557000000 29558460581 3787196224 3788656805
+88674000000 88678381862 29558000000 29559460620 3788196224 3789656844
+88677000000 88681381986 29559000000 29560460662 3789196224 3790656886
+88680000000 88684382205 29560000000 29561460735 3790196224 3791656959
+88683000000 88687382341 29561000000 29562460780 3791196224 3792657004
+88686000000 88690382492 29562000000 29563460830 3792196224 3793657054
+88689000000 88693382642 29563000000 29564460880 3793196224 3794657104
+88692000000 88696382757 29564000000 29565460919 3794196224 3795657143
+88695000000 88699382854 29565000000 29566460951 3795196224 3796657175
+88698000000 88702383062 29566000000 29567461020 3796196224 3797657244
+88701000000 88705383217 29567000000 29568461072 3797196224 3798657296
+88704000000 88708383376 29568000000 29569461125 3798196224 3799657349
+88707000000 88711383550 29569000000 29570461183 3799196224 3800657407
+88710000000 88714383650 29570000000 29571461216 3800196224 3801657440
+88713000000 88717383828 29571000000 29572461276 3801196224 3802657500
+88716000000 88720383977 29572000000 29573461325 3802196224 3803657549
+88719000000 88723384105 29573000000 29574461368 3803196224 3804657592
+88722000000 88726384274 29574000000 29575461424 3804196224 3805657648
+88725000000 88729384394 29575000000 29576461464 3805196224 3806657688
+88728000000 88731211744 29576000000 29577070581 3806196224 3807266805
+88731000000 88735384644 29577000000 29578461548 3807196224 3808657772
+88734000000 88738384902 29578000000 29579461634 3808196224 3809657858
+88737000000 88741385007 29579000000 29580461669 3809196224 3810657893
+88740000000 88744385087 29580000000 29581461695 3810196224 3811657919
+88743000000 88747385234 29581000000 29582461744 3811196224 3812657968
+88746000000 88750385488 29582000000 29583461829 3812196224 3813658053
+88749000000 88753385578 29583000000 29584461859 3813196224 3814658083
+88752000000 88756385823 29584000000 29585461941 3814196224 3815658165
+88755000000 88759385901 29585000000 29586461967 3815196224 3816658191
+88758000000 88762386078 29586000000 29587462026 3816196224 3817658250
+88761000000 88765386224 29587000000 29588462074 3817196224 3818658298
+88764000000 88768386368 29588000000 29589462122 3818196224 3819658346
+88767000000 88770009022 29589000000 29590003007 3819196224 3820199231
+88770000000 88774386683 29590000000 29591462227 3820196224 3821658451
+88773000000 88777386843 29591000000 29592462281 3821196224 3822658505
+88776000000 88780386980 29592000000 29593462326 3822196224 3823658550
+88779000000 88783387138 29593000000 29594462379 3823196224 3824658603
+88782000000 88786387296 29594000000 29595462432 3824196224 3825658656
+88785000000 88789387410 29595000000 29596462470 3825196224 3826658694
+88788000000 88792387571 29596000000 29597462523 3826196224 3827658747
+88791000000 88795387698 29597000000 29598462566 3827196224 3828658790
+88794000000 88798387807 29598000000 29599462602 3828196224 3829658826
+88797000000 88801387949 29599000000 29600462649 3829196224 3830658873
+88800000000 88804388183 29600000000 29601462727 3830196224 3831658951
+88803000000 88807388096 29601000000 29602462698 3831196224 3832658922
+88806000000 88810388217 29602000000 29603462739 3832196224 3833658963
+88809000000 88813388325 29603000000 29604462775 3833196224 3834658999
+88812000000 88816388560 29604000000 29605462853 3834196224 3835659077
+88815000000 88819388739 29605000000 29606462913 3835196224 3836659137
+88818000000 88822302379 29606000000 29607434126 3836196224 3837630350
+88821000000 88825389008 29607000000 29608463002 3837196224 3838659226
+88824000000 88828389181 29608000000 29609463060 3838196224 3839659284
+88827000000 88831389297 29609000000 29610463099 3839196224 3840659323
+88830000000 88834389470 29610000000 29611463156 3840196224 3841659380
+88833000000 88837389642 29611000000 29612463214 3841196224 3842659438
+88836000000 88840389698 29612000000 29613463232 3842196224 3843659456
+88839000000 88843389844 29613000000 29614463281 3843196224 3844659505
+88842000000 88846390040 29614000000 29615463346 3844196224 3845659570
+88845000000 88849390069 29615000000 29616463356 3845196224 3846659580
+88848000000 88852390375 29616000000 29617463458 3846196224 3847659682
+88851000000 88855390547 29617000000 29618463515 3847196224 3848659739
+88854000000 88858390680 29618000000 29619463560 3848196224 3849659784
+88857000000 88861390797 29619000000 29620463599 3849196224 3850659823
+88860000000 88864390982 29620000000 29621463660 3850196224 3851659884
+88863000000 88867391088 29621000000 29622463696 3851196224 3852659920
+88866000000 88870391269 29622000000 29623463756 3852196224 3853659980
+88869000000 88873391481 29623000000 29624463827 3853196224 3854660051
+88872000000 88876391588 29624000000 29625463862 3854196224 3855660086
+88875000000 88879391754 29625000000 29626463918 3855196224 3856660142
+88878000000 88881990499 29626000000 29627330166 3856196224 3857526390
+88881000000 88885392025 29627000000 29628464008 3857196224 3858660232
+88884000000 88888392137 29628000000 29629464045 3858196224 3859660269
+88887000000 88891392346 29629000000 29630464115 3859196224 3860660339
+88890000000 88894392425 29630000000 29631464141 3860196224 3861660365
+88893000000 88897392650 29631000000 29632464216 3861196224 3862660440
+88896000000 88900392777 29632000000 29633464259 3862196224 3863660483
+88899000000 88903392866 29633000000 29634464288 3863196224 3864660512
+88902000000 88906392972 29634000000 29635464324 3864196224 3865660548
+88905000000 88909393183 29635000000 29636464394 3865196224 3866660618
+88908000000 88912393392 29636000000 29637464464 3866196224 3867660688
+88911000000 88915393537 29637000000 29638464512 3867196224 3868660736
+88914000000 88918393663 29638000000 29639464554 3868196224 3869660778
+88917000000 88921393829 29639000000 29640464609 3869196224 3870660833
+88920000000 88924393909 29640000000 29641464636 3870196224 3871660860
+88923000000 88927394144 29641000000 29642464714 3871196224 3872660938
+88926000000 88930394303 29642000000 29643464767 3872196224 3873660991
+88929000000 88933394424 29643000000 29644464808 3873196224 3874661032
+88932000000 88936394584 29644000000 29645464861 3874196224 3875661085
+88935000000 88939394667 29645000000 29646464889 3875196224 3876661113
+88938000000 88942394913 29646000000 29647464971 3876196224 3877661195
+88941000000 88945395036 29647000000 29648465012 3877196224 3878661236
+88944000000 88948395172 29648000000 29649465057 3878196224 3879661281
+88947000000 88951395347 29649000000 29650465115 3879196224 3880661339
+88950000000 88954395469 29650000000 29651465156 3880196224 3881661380
+88953000000 88957395619 29651000000 29652465206 3881196224 3882661430
+88956000000 88960395767 29652000000 29653465255 3882196224 3883661479
+88959000000 88962569461 29653000000 29654189820 3883196224 3884386044
+88962000000 88966396087 29654000000 29655465362 3884196224 3885661586
+88965000000 88969396219 29655000000 29656465406 3885196224 3886661630
+88968000000 88972396393 29656000000 29657465464 3886196224 3887661688
+88971000000 88975396512 29657000000 29658465504 3887196224 3888661728
+88974000000 88978396636 29658000000 29659465545 3888196224 3889661769
+88977000000 88981396855 29659000000 29660465618 3889196224 3890661842
+88980000000 88984396991 29660000000 29661465663 3890196224 3891661887
+88983000000 88987397142 29661000000 29662465714 3891196224 3892661938
+88986000000 88990397292 29662000000 29663465764 3892196224 3893661988
+88989000000 88993397407 29663000000 29664465802 3893196224 3894662026
+88992000000 88996397504 29664000000 29665465834 3894196224 3895662058
+88995000000 88999397712 29665000000 29666465904 3895196224 3896662128
+88998000000 89002397867 29666000000 29667465955 3896196224 3897662179
+89001000000 89005398026 29667000000 29668466008 3897196224 3898662232
+89004000000 89008398200 29668000000 29669466066 3898196224 3899662290
+89007000000 89011398300 29669000000 29670466100 3899196224 3900662324
+89010000000 89014398478 29670000000 29671466159 3900196224 3901662383
+89013000000 89017398627 29671000000 29672466209 3901196224 3902662433
+89016000000 89020398755 29672000000 29673466251 3902196224 3903662475
+89019000000 89023398924 29673000000 29674466308 3903196224 3904662532
+89022000000 89026399044 29674000000 29675466348 3904196224 3905662572
+89025000000 89028226394 29675000000 29676075464 3905196224 3906271688
+89028000000 89032399294 29676000000 29677466431 3906196224 3907662655
+89031000000 89035399552 29677000000 29678466517 3907196224 3908662741
+89034000000 89038399657 29678000000 29679466552 3908196224 3909662776
+89037000000 89041399737 29679000000 29680466579 3909196224 3910662803
+89040000000 89044399884 29680000000 29681466628 3910196224 3911662852
+89043000000 89047400138 29681000000 29682466712 3911196224 3912662936
+89046000000 89050400228 29682000000 29683466742 3912196224 3913662966
+89049000000 89053400473 29683000000 29684466824 3913196224 3914663048
+89052000000 89056400551 29684000000 29685466850 3914196224 3915663074
+89055000000 89059400728 29685000000 29686466909 3915196224 3916663133
+89058000000 89062400874 29686000000 29687466958 3916196224 3917663182
+89061000000 89065401018 29687000000 29688467006 3917196224 3918663230
+89064000000 89067023672 29688000000 29689007890 3918196224 3919204114
+89067000000 89071401333 29689000000 29690467111 3919196224 3920663335
+89070000000 89074401493 29690000000 29691467164 3920196224 3921663388
+89073000000 89077401630 29691000000 29692467210 3921196224 3922663434
+89076000000 89080401788 29692000000 29693467262 3922196224 3923663486
+89079000000 89083401946 29693000000 29694467315 3923196224 3924663539
+89082000000 89086402060 29694000000 29695467353 3924196224 3925663577
+89085000000 89089402221 29695000000 29696467407 3925196224 3926663631
+89088000000 89092402348 29696000000 29697467449 3926196224 3927663673
+89091000000 89095402457 29697000000 29698467485 3927196224 3928663709
+89094000000 89098402599 29698000000 29699467533 3928196224 3929663757
+89097000000 89101402833 29699000000 29700467611 3929196224 3930663835
+89100000000 89104402746 29700000000 29701467582 3930196224 3931663806
+89103000000 89107402867 29701000000 29702467622 3931196224 3932663846
+89106000000 89110402975 29702000000 29703467658 3932196224 3933663882
+89109000000 89113403210 29703000000 29704467736 3933196224 3934663960
+89112000000 89116403389 29704000000 29705467796 3934196224 3935664020
+89115000000 89119317029 29705000000 29706439009 3935196224 3936635233
+89118000000 89122403658 29706000000 29707467886 3936196224 3937664110
+89121000000 89125403831 29707000000 29708467943 3937196224 3938664167
+89124000000 89128403947 29708000000 29709467982 3938196224 3939664206
+89127000000 89131404120 29709000000 29710468040 3939196224 3940664264
+89130000000 89134404292 29710000000 29711468097 3940196224 3941664321
+89133000000 89137404348 29711000000 29712468116 3941196224 3942664340
+89136000000 89140404494 29712000000 29713468164 3942196224 3943664388
+89139000000 89143404690 29713000000 29714468230 3943196224 3944664454
+89142000000 89146404719 29714000000 29715468239 3944196224 3945664463
+89145000000 89149405025 29715000000 29716468341 3945196224 3946664565
+89148000000 89152405197 29716000000 29717468399 3946196224 3947664623
+89151000000 89155405330 29717000000 29718468443 3947196224 3948664667
+89154000000 89158405447 29718000000 29719468482 3948196224 3949664706
+89157000000 89161405632 29719000000 29720468544 3949196224 3950664768
+89160000000 89164405738 29720000000 29721468579 3950196224 3951664803
+89163000000 89167405919 29721000000 29722468639 3951196224 3952664863
+89166000000 89170406131 29722000000 29723468710 3952196224 3953664934
+89169000000 89173406238 29723000000 29724468746 3953196224 3954664970
+89172000000 89176406404 29724000000 29725468801 3954196224 3955665025
+89175000000 89179005149 29725000000 29726335049 3955196224 3956531273
+89178000000 89182406675 29726000000 29727468891 3956196224 3957665115
+89181000000 89185406787 29727000000 29728468929 3957196224 3958665153
+89184000000 89188406996 29728000000 29729468998 3958196224 3959665222
+89187000000 89191407075 29729000000 29730469025 3959196224 3960665249
+89190000000 89194407300 29730000000 29731469100 3960196224 3961665324
+89193000000 89197407427 29731000000 29732469142 3961196224 3962665366
+89196000000 89200407516 29732000000 29733469172 3962196224 3963665396
+89199000000 89203407622 29733000000 29734469207 3963196224 3964665431
+89202000000 89206407833 29734000000 29735469277 3964196224 3965665501
+89205000000 89209408042 29735000000 29736469347 3965196224 3966665571
+89208000000 89212408187 29736000000 29737469395 3966196224 3967665619
+89211000000 89215408313 29737000000 29738469437 3967196224 3968665661
+89214000000 89218408479 29738000000 29739469493 3968196224 3969665717
+89217000000 89221408559 29739000000 29740469519 3969196224 3970665743
+89220000000 89224408794 29740000000 29741469598 3970196224 3971665822
+89223000000 89227408953 29741000000 29742469651 3971196224 3972665875
+89226000000 89230409074 29742000000 29743469691 3972196224 3973665915
+89229000000 89233409234 29743000000 29744469744 3973196224 3974665968
+89232000000 89236409317 29744000000 29745469772 3974196224 3975665996
+89235000000 89239409563 29745000000 29746469854 3975196224 3976666078
+89238000000 89242409686 29746000000 29747469895 3976196224 3977666119
+89241000000 89245409822 29747000000 29748469940 3977196224 3978666164
+89244000000 89248409997 29748000000 29749469999 3978196224 3979666223
+89247000000 89251410119 29749000000 29750470039 3979196224 3980666263
+89250000000 89254410269 29750000000 29751470089 3980196224 3981666313
+89253000000 89257410417 29751000000 29752470139 3981196224 3982666363
+89256000000 89259584111 29752000000 29753194703 3982196224 3983390927
+89259000000 89263410737 29753000000 29754470245 3983196224 3984666469
+89262000000 89266410869 29754000000 29755470289 3984196224 3985666513
+89265000000 89269411043 29755000000 29756470347 3985196224 3986666571
+89268000000 89272411162 29756000000 29757470387 3986196224 3987666611
+89271000000 89275411286 29757000000 29758470428 3987196224 3988666652
+89274000000 89278411505 29758000000 29759470501 3988196224 3989666725
+89277000000 89281411641 29759000000 29760470547 3989196224 3990666771
+89280000000 89284411792 29760000000 29761470597 3990196224 3991666821
+89283000000 89287411942 29761000000 29762470647 3991196224 3992666871
+89286000000 89290412057 29762000000 29763470685 3992196224 3993666909
+89289000000 89293412154 29763000000 29764470718 3993196224 3994666942
+89292000000 89296412362 29764000000 29765470787 3994196224 3995667011
+89295000000 89299412517 29765000000 29766470839 3995196224 3996667063
+89298000000 89302412676 29766000000 29767470892 3996196224 3997667116
+89301000000 89305412850 29767000000 29768470950 3997196224 3998667174
+89304000000 89308412950 29768000000 29769470983 3998196224 3999667207
+89307000000 89311413128 29769000000 29770471042 3999196224 4000667266
+89310000000 89314413277 29770000000 29771471092 4000196224 4001667316
+89313000000 89317413405 29771000000 29772471135 4001196224 4002667359
+89316000000 89320413574 29772000000 29773471191 4002196224 4003667415
+89319000000 89323413694 29773000000 29774471231 4003196224 4004667455
+89322000000 89325241044 29774000000 29775080348 4004196224 4005276572
+89325000000 89329413944 29775000000 29776471314 4005196224 4006667538
+89328000000 89332414202 29776000000 29777471400 4006196224 4007667624
+89331000000 89335414307 29777000000 29778471435 4007196224 4008667659
+89334000000 89338414387 29778000000 29779471462 4008196224 4009667686
+89337000000 89341414534 29779000000 29780471511 4009196224 4010667735
+89340000000 89344414788 29780000000 29781471596 4010196224 4011667820
+89343000000 89347414878 29781000000 29782471626 4011196224 4012667850
+89346000000 89350415123 29782000000 29783471707 4012196224 4013667931
+89349000000 89353415201 29783000000 29784471733 4013196224 4014667957
+89352000000 89356415378 29784000000 29785471792 4014196224 4015668016
+89355000000 89359415524 29785000000 29786471841 4015196224 4016668065
+89358000000 89362415668 29786000000 29787471889 4016196224 4017668113
+89361000000 89364038322 29787000000 29788012774 4017196224 4018208998
+89364000000 89368415983 29788000000 29789471994 4018196224 4019668218
+89367000000 89371416143 29789000000 29790472047 4019196224 4020668271
+89370000000 89374416280 29790000000 29791472093 4020196224 4021668317
+89373000000 89377416438 29791000000 29792472146 4021196224 4022668370
+89376000000 89380416596 29792000000 29793472198 4022196224 4023668422
+89379000000 89383416710 29793000000 29794472236 4023196224 4024668460
+89382000000 89386416871 29794000000 29795472290 4024196224 4025668514
+89385000000 89389416998 29795000000 29796472332 4025196224 4026668556
+89388000000 89392417107 29796000000 29797472369 4026196224 4027668593
+89391000000 89395417249 29797000000 29798472416 4027196224 4028668640
+89394000000 89398417483 29798000000 29799472494 4028196224 4029668718
+89397000000 89401417396 29799000000 29800472465 4029196224 4030668689
+89400000000 89404417517 29800000000 29801472505 4030196224 4031668729
+89403000000 89407417625 29801000000 29802472541 4031196224 4032668765
+89406000000 89410417860 29802000000 29803472620 4032196224 4033668844
+89409000000 89413418039 29803000000 29804472679 4033196224 4034668903
+89412000000 89416331679 29804000000 29805443893 4034196224 4035640117
+89415000000 89419418308 29805000000 29806472769 4035196224 4036668993
+89418000000 89422418481 29806000000 29807472827 4036196224 4037669051
+89421000000 89425418597 29807000000 29808472865 4037196224 4038669089
+89424000000 89428418770 29808000000 29809472923 4038196224 4039669147
+89427000000 89431418942 29809000000 29810472980 4039196224 4040669204
+89430000000 89434418998 29810000000 29811472999 4040196224 4041669223
+89433000000 89437419144 29811000000 29812473048 4041196224 4042669272
+89436000000 89440419340 29812000000 29813473113 4042196224 4043669337
+89439000000 89443419369 29813000000 29814473123 4043196224 4044669347
+89442000000 89446419675 29814000000 29815473225 4044196224 4045669449
+89445000000 89449419847 29815000000 29816473282 4045196224 4046669506
+89448000000 89452419980 29816000000 29817473326 4046196224 4047669550
+89451000000 89455420097 29817000000 29818473365 4047196224 4048669589
+89454000000 89458420282 29818000000 29819473427 4048196224 4049669651
+89457000000 89461420388 29819000000 29820473462 4049196224 4050669686
+89460000000 89464420569 29820000000 29821473523 4050196224 4051669747
+89463000000 89467420781 29821000000 29822473593 4051196224 4052669817
+89466000000 89470420888 29822000000 29823473629 4052196224 4053669853
+89469000000 89473421054 29823000000 29824473684 4053196224 4054669908
+89472000000 89476019799 29824000000 29825339933 4054196224 4055536157
+89475000000 89479421325 29825000000 29826473775 4055196224 4056669999
+89478000000 89482421437 29826000000 29827473812 4056196224 4057670036
+89481000000 89485421646 29827000000 29828473882 4057196224 4058670106
+89484000000 89488421725 29828000000 29829473908 4058196224 4059670132
+89487000000 89491421950 29829000000 29830473983 4059196224 4060670207
+89490000000 89494422077 29830000000 29831474025 4060196224 4061670249
+89493000000 89497422166 29831000000 29832474055 4061196224 4062670279
+89496000000 89500422272 29832000000 29833474090 4062196224 4063670314
+89499000000 89503422483 29833000000 29834474161 4063196224 4064670385
+89502000000 89506422692 29834000000 29835474230 4064196224 4065670454
+89505000000 89509422837 29835000000 29836474279 4065196224 4066670503
+89508000000 89512422963 29836000000 29837474321 4066196224 4067670545
+89511000000 89515423129 29837000000 29838474376 4067196224 4068670600
+89514000000 89518423209 29838000000 29839474403 4068196224 4069670627
+89517000000 89521423444 29839000000 29840474481 4069196224 4070670705
+89520000000 89524423603 29840000000 29841474534 4070196224 4071670758
+89523000000 89527423724 29841000000 29842474574 4071196224 4072670798
+89526000000 89530423884 29842000000 29843474628 4072196224 4073670852
+89529000000 89533423967 29843000000 29844474655 4073196224 4074670879
+89532000000 89536424213 29844000000 29845474737 4074196224 4075670961
+89535000000 89539424336 29845000000 29846474778 4075196224 4076671002
+89538000000 89542424472 29846000000 29847474824 4076196224 4077671048
+89541000000 89545424647 29847000000 29848474882 4077196224 4078671106
+89544000000 89548424769 29848000000 29849474923 4078196224 4079671147
+89547000000 89551424919 29849000000 29850474973 4079196224 4080671197
+89550000000 89554425067 29850000000 29851475022 4080196224 4081671246
+89553000000 89556598761 29851000000 29852199587 4081196224 4082395811
+89556000000 89560425387 29852000000 29853475129 4082196224 4083671353
+89559000000 89563425519 29853000000 29854475173 4083196224 4084671397
+89562000000 89566425693 29854000000 29855475231 4084196224 4085671455
+89565000000 89569425812 29855000000 29856475270 4085196224 4086671494
+89568000000 89572425936 29856000000 29857475312 4086196224 4087671536
+89571000000 89575426155 29857000000 29858475385 4087196224 4088671609
+89574000000 89578426291 29858000000 29859475430 4088196224 4089671654
+89577000000 89581426442 29859000000 29860475480 4089196224 4090671704
+89580000000 89584426592 29860000000 29861475530 4090196224 4091671754
+89583000000 89587426707 29861000000 29862475569 4091196224 4092671793
+89586000000 89590426804 29862000000 29863475601 4092196224 4093671825
+89589000000 89593427012 29863000000 29864475670 4093196224 4094671894
+89592000000 89596427167 29864000000 29865475722 4094196224 4095671946
+89595000000 89599427326 29865000000 29866475775 4095196224 4096671999
+89598000000 89602427500 29866000000 29867475833 4096196224 4097672057
+89601000000 89605427600 29867000000 29868475866 4097196224 4098672090
+89604000000 89608427778 29868000000 29869475926 4098196224 4099672150
+89607000000 89611427927 29869000000 29870475975 4099196224 4100672199
+89610000000 89614428055 29870000000 29871476018 4100196224 4101672242
+89613000000 89617428224 29871000000 29872476074 4101196224 4102672298
+89616000000 89620428344 29872000000 29873476114 4102196224 4103672338
+89619000000 89622255694 29873000000 29874085231 4103196224 4104281455
+89622000000 89626428594 29874000000 29875476198 4104196224 4105672422
+89625000000 89629428852 29875000000 29876476284 4105196224 4106672508
+89628000000 89632428957 29876000000 29877476319 4106196224 4107672543
+89631000000 89635429037 29877000000 29878476345 4107196224 4108672569
+89634000000 89638429184 29878000000 29879476394 4108196224 4109672618
+89637000000 89641429438 29879000000 29880476479 4109196224 4110672703
+89640000000 89644429528 29880000000 29881476509 4110196224 4111672733
+89643000000 89647429773 29881000000 29882476591 4111196224 4112672815
+89646000000 89650429851 29882000000 29883476617 4112196224 4113672841
+89649000000 89653430028 29883000000 29884476676 4113196224 4114672900
+89652000000 89656430174 29884000000 29885476724 4114196224 4115672948
+89655000000 89659430318 29885000000 29886476772 4115196224 4116672996
+89658000000 89661052972 29886000000 29887017657 4116196224 4117213881
+89661000000 89665430633 29887000000 29888476877 4117196224 4118673101
+89664000000 89668430793 29888000000 29889476931 4118196224 4119673155
+89667000000 89671430930 29889000000 29890476976 4119196224 4120673200
+89670000000 89674431088 29890000000 29891477029 4120196224 4121673253
+89673000000 89677431246 29891000000 29892477082 4121196224 4122673306
+89676000000 89680431360 29892000000 29893477120 4122196224 4123673344
+89679000000 89683431521 29893000000 29894477173 4123196224 4124673397
+89682000000 89686431648 29894000000 29895477216 4124196224 4125673440
+89685000000 89689431757 29895000000 29896477252 4125196224 4126673476
+89688000000 89692431899 29896000000 29897477299 4126196224 4127673523
+89691000000 89695432133 29897000000 29898477377 4127196224 4128673601
+89694000000 89698432046 29898000000 29899477348 4128196224 4129673572
+89697000000 89701432167 29899000000 29900477389 4129196224 4130673613
+89700000000 89704432275 29900000000 29901477425 4130196224 4131673649
+89703000000 89707432510 29901000000 29902477503 4131196224 4132673727
+89706000000 89710432689 29902000000 29903477563 4132196224 4133673787
+89709000000 89713346329 29903000000 29904448776 4133196224 4134645000
+89712000000 89716432958 29904000000 29905477652 4134196224 4135673876
+89715000000 89719433131 29905000000 29906477710 4135196224 4136673934
+89718000000 89722433247 29906000000 29907477749 4136196224 4137673973
+89721000000 89725433420 29907000000 29908477806 4137196224 4138674030
+89724000000 89728433592 29908000000 29909477864 4138196224 4139674088
+89727000000 89731433648 29909000000 29910477882 4139196224 4140674106
+89730000000 89734433794 29910000000 29911477931 4140196224 4141674155
+89733000000 89737433990 29911000000 29912477996 4141196224 4142674220
+89736000000 89740434019 29912000000 29913478006 4142196224 4143674230
+89739000000 89743434325 29913000000 29914478108 4143196224 4144674332
+89742000000 89746434497 29914000000 29915478165 4144196224 4145674389
+89745000000 89749434630 29915000000 29916478210 4145196224 4146674434
+89748000000 89752434747 29916000000 29917478249 4146196224 4147674473
+89751000000 89755434932 29917000000 29918478310 4147196224 4148674534
+89754000000 89758435038 29918000000 29919478346 4148196224 4149674570
+89757000000 89761435219 29919000000 29920478406 4149196224 4150674630
+89760000000 89764435431 29920000000 29921478477 4150196224 4151674701
+89763000000 89767435538 29921000000 29922478512 4151196224 4152674736
+89766000000 89770435704 29922000000 29923478568 4152196224 4153674792
+89769000000 89773034449 29923000000 29924344816 4153196224 4154541040
+89772000000 89776435975 29924000000 29925478658 4154196224 4155674882
+89775000000 89779436087 29925000000 29926478695 4155196224 4156674919
+89778000000 89782436296 29926000000 29927478765 4156196224 4157674989
+89781000000 89785436375 29927000000 29928478791 4157196224 4158675015
+89784000000 89788436600 29928000000 29929478866 4158196224 4159675090
+89787000000 89791436727 29929000000 29930478909 4159196224 4160675133
+89790000000 89794436816 29930000000 29931478938 4160196224 4161675162
+89793000000 89797436922 29931000000 29932478974 4161196224 4162675198
+89796000000 89800437133 29932000000 29933479044 4162196224 4163675268
+89799000000 89803437342 29933000000 29934479114 4163196224 4164675338
+89802000000 89806437487 29934000000 29935479162 4164196224 4165675386
+89805000000 89809437613 29935000000 29936479204 4165196224 4166675428
+89808000000 89812437779 29936000000 29937479259 4166196224 4167675483
+89811000000 89815437859 29937000000 29938479286 4167196224 4168675510
+89814000000 89818438094 29938000000 29939479364 4168196224 4169675588
+89817000000 89821438253 29939000000 29940479417 4169196224 4170675641
+89820000000 89824438374 29940000000 29941479458 4170196224 4171675682
+89823000000 89827438534 29941000000 29942479511 4171196224 4172675735
+89826000000 89830438617 29942000000 29943479539 4172196224 4173675763
+89829000000 89833438863 29943000000 29944479621 4173196224 4174675845
+89832000000 89836438986 29944000000 29945479662 4174196224 4175675886
+89835000000 89839439122 29945000000 29946479707 4175196224 4176675931
+89838000000 89842439297 29946000000 29947479765 4176196224 4177675989
+89841000000 89845439419 29947000000 29948479806 4177196224 4178676030
+89844000000 89848439569 29948000000 29949479856 4178196224 4179676080
+89847000000 89851439717 29949000000 29950479905 4179196224 4180676129
+89850000000 89853613411 29950000000 29951204470 4180196224 4181400694
+89853000000 89857440037 29951000000 29952480012 4181196224 4182676236
+89856000000 89860440169 29952000000 29953480056 4182196224 4183676280
+89859000000 89863440343 29953000000 29954480114 4183196224 4184676338
+89862000000 89866440462 29954000000 29955480154 4184196224 4185676378
+89865000000 89869440586 29955000000 29956480195 4185196224 4186676419
+89868000000 89872440805 29956000000 29957480268 4186196224 4187676492
+89871000000 89875440941 29957000000 29958480313 4187196224 4188676537
+89874000000 89878441092 29958000000 29959480364 4188196224 4189676588
+89877000000 89881441242 29959000000 29960480414 4189196224 4190676638
+89880000000 89884441357 29960000000 29961480452 4190196224 4191676676
+89883000000 89887441454 29961000000 29962480484 4191196224 4192676708
+89886000000 89890441662 29962000000 29963480554 4192196224 4193676778
+89889000000 89893441817 29963000000 29964480605 4193196224 4194676829
+89892000000 89896441976 29964000000 29965480658 4194196224 4195676882
+89895000000 89899442150 29965000000 29966480716 4195196224 4196676940
+89898000000 89902442250 29966000000 29967480750 4196196224 4197676974
+89901000000 89905442428 29967000000 29968480809 4197196224 4198677033
+89904000000 89908442577 29968000000 29969480859 4198196224 4199677083
+89907000000 89911442705 29969000000 29970480901 4199196224 4200677125
+89910000000 89914442874 29970000000 29971480958 4200196224 4201677182
+89913000000 89917442994 29971000000 29972480998 4201196224 4202677222
+89916000000 89919270344 29972000000 29973090114 4202196224 4203286338
+89919000000 89923443244 29973000000 29974481081 4203196224 4204677305
+89922000000 89926443502 29974000000 29975481167 4204196224 4205677391
+89925000000 89929443607 29975000000 29976481202 4205196224 4206677426
+89928000000 89932443687 29976000000 29977481229 4206196224 4207677453
+89931000000 89935443834 29977000000 29978481278 4207196224 4208677502
+89934000000 89938444088 29978000000 29979481362 4208196224 4209677586
+89937000000 89941444178 29979000000 29980481392 4209196224 4210677616
+89940000000 89944444423 29980000000 29981481474 4210196224 4211677698
+89943000000 89947444501 29981000000 29982481500 4211196224 4212677724
+89946000000 89950444678 29982000000 29983481559 4212196224 4213677783
+89949000000 89953444824 29983000000 29984481608 4213196224 4214677832
+89952000000 89956444968 29984000000 29985481656 4214196224 4215677880
+89955000000 89958067622 29985000000 29986022540 4215196224 4216218764
+89958000000 89962445283 29986000000 29987481761 4216196224 4217677985
+89961000000 89965445443 29987000000 29988481814 4217196224 4218678038
+89964000000 89968445580 29988000000 29989481860 4218196224 4219678084
+89967000000 89971445738 29989000000 29990481912 4219196224 4220678136
+89970000000 89974445896 29990000000 29991481965 4220196224 4221678189
+89973000000 89977446010 29991000000 29992482003 4221196224 4222678227
+89976000000 89980446171 29992000000 29993482057 4222196224 4223678281
+89979000000 89983446298 29993000000 29994482099 4223196224 4224678323
+89982000000 89986446407 29994000000 29995482135 4224196224 4225678359
+89985000000 89989446549 29995000000 29996482183 4225196224 4226678407
+89988000000 89992446783 29996000000 29997482261 4226196224 4227678485
+89991000000 89995446696 29997000000 29998482232 4227196224 4228678456
+89994000000 89998446817 29998000000 29999482272 4228196224 4229678496
+89997000000 90001446925 29999000000 30000482308 4229196224 4230678532
+90000000000 90004447160 30000000000 30001482386 4230196224 4231678610
+90003000000 90007447339 30001000000 30002482446 4231196224 4232678670
+90006000000 90010360979 30002000000 30003453659 4232196224 4233649883
+90009000000 90013447608 30003000000 30004482536 4233196224 4234678760
+90012000000 90016447781 30004000000 30005482593 4234196224 4235678817
+90015000000 90019447897 30005000000 30006482632 4235196224 4236678856
+90018000000 90022448070 30006000000 30007482690 4236196224 4237678914
+90021000000 90025448242 30007000000 30008482747 4237196224 4238678971
+90024000000 90028448298 30008000000 30009482766 4238196224 4239678990
+90027000000 90031448444 30009000000 30010482814 4239196224 4240679038
+90030000000 90034448640 30010000000 30011482880 4240196224 4241679104
+90033000000 90037448669 30011000000 30012482889 4241196224 4242679113
+90036000000 90040448975 30012000000 30013482991 4242196224 4243679215
+90039000000 90043449147 30013000000 30014483049 4243196224 4244679273
+90042000000 90046449280 30014000000 30015483093 4244196224 4245679317
+90045000000 90049449397 30015000000 30016483132 4245196224 4246679356
+90048000000 90052449582 30016000000 30017483194 4246196224 4247679418
+90051000000 90055449688 30017000000 30018483229 4247196224 4248679453
+90054000000 90058449869 30018000000 30019483289 4248196224 4249679513
+90057000000 90061450081 30019000000 30020483360 4249196224 4250679584
+90060000000 90064450188 30020000000 30021483396 4250196224 4251679620
+90063000000 90067450354 30021000000 30022483451 4251196224 4252679675
+90066000000 90070049099 30022000000 30023349699 4252196224 4253545923
+90069000000 90073450625 30023000000 30024483541 4253196224 4254679765
+90072000000 90076450737 30024000000 30025483579 4254196224 4255679803
+90075000000 90079450946 30025000000 30026483648 4255196224 4256679872
+90078000000 90082451025 30026000000 30027483675 4256196224 4257679899
+90081000000 90085451250 30027000000 30028483750 4257196224 4258679974
+90084000000 90088451377 30028000000 30029483792 4258196224 4259680016
+90087000000 90091451466 30029000000 30030483822 4259196224 4260680046
+90090000000 90094451572 30030000000 30031483857 4260196224 4261680081
+90093000000 90097451783 30031000000 30032483927 4261196224 4262680151
+90096000000 90100451992 30032000000 30033483997 4262196224 4263680221
+90099000000 90103452137 30033000000 30034484045 4263196224 4264680269
+90102000000 90106452263 30034000000 30035484087 4264196224 4265680311
+90105000000 90109452429 30035000000 30036484143 4265196224 4266680367
+90108000000 90112452509 30036000000 30037484169 4266196224 4267680393
+90111000000 90115452744 30037000000 30038484248 4267196224 4268680472
+90114000000 90118452903 30038000000 30039484301 4268196224 4269680525
+90117000000 90121453024 30039000000 30040484341 4269196224 4270680565
+90120000000 90124453184 30040000000 30041484394 4270196224 4271680618
+90123000000 90127453267 30041000000 30042484422 4271196224 4272680646
+90126000000 90130453513 30042000000 30043484504 4272196224 4273680728
+90129000000 90133453636 30043000000 30044484545 4273196224 4274680769
+90132000000 90136453772 30044000000 30045484590 4274196224 4275680814
+90135000000 90139453947 30045000000 30046484649 4275196224 4276680873
+90138000000 90142454069 30046000000 30047484689 4276196224 4277680913
+90141000000 90145454219 30047000000 30048484739 4277196224 4278680963
+90144000000 90148454367 30048000000 30049484789 4278196224 4279681013
+90147000000 90150628061 30049000000 30050209353 4279196224 4280405577
+90150000000 90154454687 30050000000 30051484895 4280196224 4281681119
+90153000000 90157454819 30051000000 30052484939 4281196224 4282681163
+90156000000 90160454993 30052000000 30053484997 4282196224 4283681221
+90159000000 90163455112 30053000000 30054485037 4283196224 4284681261
+90162000000 90166455236 30054000000 30055485078 4284196224 4285681302
+90165000000 90169455455 30055000000 30056485151 4285196224 4286681375
+90168000000 90172455591 30056000000 30057485197 4286196224 4287681421
+90171000000 90175455742 30057000000 30058485247 4287196224 4288681471
+90174000000 90178455892 30058000000 30059485297 4288196224 4289681521
+90177000000 90181456007 30059000000 30060485335 4289196224 4290681559
+90180000000 90184456104 30060000000 30061485368 4290196224 4291681592
+90183000000 90187456312 30061000000 30062485437 4291196224 4292681661
+90186000000 90190456467 30062000000 30063485489 4292196224 4293681713
+90189000000 90193456626 30063000000 30064485542 4293196224 4294681766
+90192000000 90196456800 30064000000 30065485600 4294196224 714528
+90195000000 90199456900 30065000000 30066485633 228928 1714561
+90198000000 90202457078 30066000000 30067485692 1228928 2714620
+90201000000 90205457227 30067000000 30068485742 2228928 3714670
+90204000000 90208457355 30068000000 30069485785 3228928 4714713
+90207000000 90211457524 30069000000 30070485841 4228928 5714769
+90210000000 90214457644 30070000000 30071485881 5228928 6714809
+90213000000 90216284994 30071000000 30072094998 6228928 7323926
+90216000000 90220457894 30072000000 30073485964 7228928 8714892
+90219000000 90223458152 30073000000 30074486050 8228928 9714978
+90222000000 90226458257 30074000000 30075486085 9228928 10715013
+90225000000 90229458337 30075000000 30076486112 10228928 11715040
+90228000000 90232458484 30076000000 30077486161 11228928 12715089
+90231000000 90235458738 30077000000 30078486246 12228928 13715174
+90234000000 90238458828 30078000000 30079486276 13228928 14715204
+90237000000 90241459073 30079000000 30080486357 14228928 15715285
+90240000000 90244459151 30080000000 30081486383 15228928 16715311
+90243000000 90247459328 30081000000 30082486442 16228928 17715370
+90246000000 90250459474 30082000000 30083486491 17228928 18715419
+90249000000 90253459618 30083000000 30084486539 18228928 19715467
+90252000000 90255082272 30084000000 30085027424 19228928 20256352
+90255000000 90259459933 30085000000 30086486644 20228928 21715572
+90258000000 90262460093 30086000000 30087486697 21228928 22715625
+90261000000 90265460230 30087000000 30088486743 22228928 23715671
+90264000000 90268460388 30088000000 30089486796 23228928 24715724
+90267000000 90271460546 30089000000 30090486848 24228928 25715776
+90270000000 90274460660 30090000000 30091486886 25228928 26715814
+90273000000 90277460821 30091000000 30092486940 26228928 27715868
+90276000000 90280460948 30092000000 30093486982 27228928 28715910
+90279000000 90283461057 30093000000 30094487019 28228928 29715947
+90282000000 90286461199 30094000000 30095487066 29228928 30715994
+90285000000 90289461433 30095000000 30096487144 30228928 31716072
+90288000000 90292461346 30096000000 30097487115 31228928 32716043
+90291000000 90295461467 30097000000 30098487155 32228928 33716083
+90294000000 90298461575 30098000000 30099487191 33228928 34716119
+90297000000 90301461810 30099000000 30100487270 34228928 35716198
+90300000000 90304461989 30100000000 30101487329 35228928 36716257
+90303000000 90307375629 30101000000 30102458543 36228928 37687471
+90306000000 90310462258 30102000000 30103487419 37228928 38716347
+90309000000 90313462431 30103000000 30104487477 38228928 39716405
+90312000000 90316462547 30104000000 30105487515 39228928 40716443
+90315000000 90319462720 30105000000 30106487573 40228928 41716501
+90318000000 90322462892 30106000000 30107487630 41228928 42716558
+90321000000 90325462948 30107000000 30108487649 42228928 43716577
+90324000000 90328463094 30108000000 30109487698 43228928 44716626
+90327000000 90331463290 30109000000 30110487763 44228928 45716691
+90330000000 90334463319 30110000000 30111487773 45228928 46716701
+90333000000 90337463625 30111000000 30112487875 46228928 47716803
+90336000000 90340463797 30112000000 30113487932 47228928 48716860
+90339000000 90343463930 30113000000 30114487976 48228928 49716904
+90342000000 90346464047 30114000000 30115488015 49228928 50716943
+90345000000 90349464232 30115000000 30116488077 50228928 51717005
+90348000000 90352464338 30116000000 30117488112 51228928 52717040
+90351000000 90355464519 30117000000 30118488173 52228928 53717101
+90354000000 90358464731 30118000000 30119488243 53228928 54717171
+90357000000 90361464838 30119000000 30120488279 54228928 55717207
+90360000000 90364465004 30120000000 30121488334 55228928 56717262
+90363000000 90367063749 30121000000 30122354583 56228928 57583511
+90366000000 90370465275 30122000000 30123488425 57228928 58717353
+90369000000 90373465387 30123000000 30124488462 58228928 59717390
+90372000000 90376465596 30124000000 30125488532 59228928 60717460
+90375000000 90379465675 30125000000 30126488558 60228928 61717486
+90378000000 90382465900 30126000000 30127488633 61228928 62717561
+90381000000 90385466027 30127000000 30128488675 62228928 63717603
+90384000000 90388466116 30128000000 30129488705 63228928 64717633
+90387000000 90391466222 30129000000 30130488740 64228928 65717668
+90390000000 90394466433 30130000000 30131488811 65228928 66717739
+90393000000 90397466642 30131000000 30132488880 66228928 67717808
+90396000000 90400466787 30132000000 30133488929 67228928 68717857
+90399000000 90403466913 30133000000 30134488971 68228928 69717899
+90402000000 90406467079 30134000000 30135489026 69228928 70717954
+90405000000 90409467159 30135000000 30136489053 70228928 71717981
+90408000000 90412467394 30136000000 30137489131 71228928 72718059
+90411000000 90415467553 30137000000 30138489184 72228928 73718112
+90414000000 90418467674 30138000000 30139489224 73228928 74718152
+90417000000 90421467834 30139000000 30140489278 74228928 75718206
+90420000000 90424467917 30140000000 30141489305 75228928 76718233
+90423000000 90427468163 30141000000 30142489387 76228928 77718315
+90426000000 90430468286 30142000000 30143489428 77228928 78718356
+90429000000 90433468422 30143000000 30144489474 78228928 79718402
+90432000000 90436468597 30144000000 30145489532 79228928 80718460
+90435000000 90439468719 30145000000 30146489573 80228928 81718501
+90438000000 90442468869 30146000000 30147489623 81228928 82718551
+90441000000 90445469017 30147000000 30148489672 82228928 83718600
+90444000000 90447642711 30148000000 30149214237 83228928 84443165
+90447000000 90451469337 30149000000 30150489779 84228928 85718707
+90450000000 90454469469 30150000000 30151489823 85228928 86718751
+90453000000 90457469643 30151000000 30152489881 86228928 87718809
+90456000000 90460469762 30152000000 30153489920 87228928 88718848
+90459000000 90463469886 30153000000 30154489962 88228928 89718890
+90462000000 90466470105 30154000000 30155490035 89228928 90718963
+90465000000 90469470241 30155000000 30156490080 90228928 91719008
+90468000000 90472470392 30156000000 30157490130 91228928 92719058
+90471000000 90475470542 30157000000 30158490180 92228928 93719108
+90474000000 90478470657 30158000000 30159490219 93228928 94719147
+90477000000 90481470754 30159000000 30160490251 94228928 95719179
+90480000000 90484470962 30160000000 30161490320 95228928 96719248
+90483000000 90487471117 30161000000 30162490372 96228928 97719300
+90486000000 90490471276 30162000000 30163490425 97228928 98719353
+90489000000 90493471450 30163000000 30164490483 98228928 99719411
+90492000000 90496471550 30164000000 30165490516 99228928 100719444
+90495000000 90499471728 30165000000 30166490576 100228928 101719504
+90498000000 90502471877 30166000000 30167490625 101228928 102719553
+90501000000 90505472005 30167000000 30168490668 102228928 103719596
+90504000000 90508472174 30168000000 30169490724 103228928 104719652
+90507000000 90511472294 30169000000 30170490764 104228928 105719692
+90510000000 90513299644 30170000000 30171099881 105228928 106328809
+90513000000 90517472544 30171000000 30172490848 106228928 107719776
+90516000000 90520472802 30172000000 30173490934 107228928 108719862
+90519000000 90523472907 30173000000 30174490969 108228928 109719897
+90522000000 90526472987 30174000000 30175490995 109228928 110719923
+90525000000 90529473134 30175000000 30176491044 110228928 111719972
+90528000000 90532473388 30176000000 30177491129 111228928 112720057
+90531000000 90535473478 30177000000 30178491159 112228928 113720087
+90534000000 90538473723 30178000000 30179491241 113228928 114720169
+90537000000 90541473801 30179000000 30180491267 114228928 115720195
+90540000000 90544473978 30180000000 30181491326 115228928 116720254
+90543000000 90547474124 30181000000 30182491374 116228928 117720302
+90546000000 90550474268 30182000000 30183491422 117228928 118720350
+90549000000 90552096922 30183000000 30184032307 118228928 119261235
+90552000000 90556474583 30184000000 30185491527 119228928 120720455
+90555000000 90559474743 30185000000 30186491581 120228928 121720509
+90558000000 90562474880 30186000000 30187491626 121228928 122720554
+90561000000 90565475038 30187000000 30188491679 122228928 123720607
+90564000000 90568475196 30188000000 30189491732 123228928 124720660
+90567000000 90571475310 30189000000 30190491770 124228928 125720698
+90570000000 90574475471 30190000000 30191491823 125228928 126720751
+90573000000 90577475598 30191000000 30192491866 126228928 127720794
+90576000000 90580475707 30192000000 30193491902 127228928 128720830
+90579000000 90583475849 30193000000 30194491949 128228928 129720877
+90582000000 90586476083 30194000000 30195492027 129228928 130720955
+90585000000 90589475996 30195000000 30196491998 130228928 131720926
+90588000000 90592476117 30196000000 30197492039 131228928 132720967
+90591000000 90595476225 30197000000 30198492075 132228928 133721003
+90594000000 90598476460 30198000000 30199492153 133228928 134721081
+90597000000 90601476639 30199000000 30200492213 134228928 135721141
+90600000000 90604390279 30200000000 30201463426 135228928 136692354
+90603000000 90607476908 30201000000 30202492302 136228928 137721230
+90606000000 90610477081 30202000000 30203492360 137228928 138721288
+90609000000 90613477197 30203000000 30204492399 138228928 139721327
+90612000000 90616477370 30204000000 30205492456 139228928 140721384
+90615000000 90619477542 30205000000 30206492514 140228928 141721442
+90618000000 90622477598 30206000000 30207492532 141228928 142721460
+90621000000 90625477744 30207000000 30208492581 142228928 143721509
+90624000000 90628477940 30208000000 30209492646 143228928 144721574
+90627000000 90631477969 30209000000 30210492656 144228928 145721584
+90630000000 90634478275 30210000000 30211492758 145228928 146721686
+90633000000 90637478447 30211000000 30212492815 146228928 147721743
+90636000000 90640478580 30212000000 30213492860 147228928 148721788
+90639000000 90643478697 30213000000 30214492899 148228928 149721827
+90642000000 90646478882 30214000000 30215492960 149228928 150721888
+90645000000 90649478988 30215000000 30216492996 150228928 151721924
+90648000000 90652479169 30216000000 30217493056 151228928 152721984
+90651000000 90655479381 30217000000 30218493127 152228928 153722055
+90654000000 90658479488 30218000000 30219493162 153228928 154722090
+90657000000 90661479654 30219000000 30220493218 154228928 155722146
+90660000000 90664078399 30220000000 30221359466 155228928 156588394
+90663000000 90667479925 30221000000 30222493308 156228928 157722236
+90666000000 90670480037 30222000000 30223493345 157228928 158722273
+90669000000 90673480246 30223000000 30224493415 158228928 159722343
+90672000000 90676480325 30224000000 30225493441 159228928 160722369
+90675000000 90679480550 30225000000 30226493516 160228928 161722444
+90678000000 90682480677 30226000000 30227493559 161228928 162722487
+90681000000 90685480766 30227000000 30228493588 162228928 163722516
+90684000000 90688480872 30228000000 30229493624 163228928 164722552
+90687000000 90691481083 30229000000 30230493694 164228928 165722622
+90690000000 90694481292 30230000000 30231493764 165228928 166722692
+90693000000 90697481437 30231000000 30232493812 166228928 167722740
+90696000000 90700481563 30232000000 30233493854 167228928 168722782
+90699000000 90703481729 30233000000 30234493909 168228928 169722837
+90702000000 90706481809 30234000000 30235493936 169228928 170722864
+90705000000 90709482044 30235000000 30236494014 170228928 171722942
+90708000000 90712482203 30236000000 30237494067 171228928 172722995
+90711000000 90715482324 30237000000 30238494108 172228928 173723036
+90714000000 90718482484 30238000000 30239494161 173228928 174723089
+90717000000 90721482567 30239000000 30240494189 174228928 175723117
+90720000000 90724482813 30240000000 30241494271 175228928 176723199
+90723000000 90727482936 30241000000 30242494312 176228928 177723240
+90726000000 90730483072 30242000000 30243494357 177228928 178723285
+90729000000 90733483247 30243000000 30244494415 178228928 179723343
+90732000000 90736483369 30244000000 30245494456 179228928 180723384
+90735000000 90739483519 30245000000 30246494506 180228928 181723434
+90738000000 90742483667 30246000000 30247494555 181228928 182723483
+90741000000 90744657361 30247000000 30248219120 182228928 183448048
+90744000000 90748483987 30248000000 30249494662 183228928 184723590
+90747000000 90751484119 30249000000 30250494706 184228928 185723634
+90750000000 90754484293 30250000000 30251494764 185228928 186723692
+90753000000 90757484412 30251000000 30252494804 186228928 187723732
+90756000000 90760484536 30252000000 30253494845 187228928 188723773
+90759000000 90763484755 30253000000 30254494918 188228928 189723846
+90762000000 90766484891 30254000000 30255494963 189228928 190723891
+90765000000 90769485042 30255000000 30256495014 190228928 191723942
+90768000000 90772485192 30256000000 30257495064 191228928 192723992
+90771000000 90775485307 30257000000 30258495102 192228928 193724030
+90774000000 90778485404 30258000000 30259495134 193228928 194724062
+90777000000 90781485612 30259000000 30260495204 194228928 195724132
+90780000000 90784485767 30260000000 30261495255 195228928 196724183
+90783000000 90787485926 30261000000 30262495308 196228928 197724236
+90786000000 90790486100 30262000000 30263495366 197228928 198724294
+90789000000 90793486200 30263000000 30264495400 198228928 199724328
+90792000000 90796486378 30264000000 30265495459 199228928 200724387
+90795000000 90799486527 30265000000 30266495509 200228928 201724437
+90798000000 90802486655 30266000000 30267495551 201228928 202724479
+90801000000 90805486824 30267000000 30268495608 202228928 203724536
+90804000000 90808486944 30268000000 30269495648 203228928 204724576
+90807000000 90810314294 30269000000 30270104764 204228928 205333692
+90810000000 90814487194 30270000000 30271495731 205228928 206724659
+90813000000 90817487452 30271000000 30272495817 206228928 207724745
+90816000000 90820487557 30272000000 30273495852 207228928 208724780
+90819000000 90823487637 30273000000 30274495879 208228928 209724807
+90822000000 90826487784 30274000000 30275495928 209228928 210724856
+90825000000 90829488038 30275000000 30276496012 210228928 211724940
+90828000000 90832488128 30276000000 30277496042 211228928 212724970
+90831000000 90835488373 30277000000 30278496124 212228928 213725052
+90834000000 90838488451 30278000000 30279496150 213228928 214725078
+90837000000 90841488628 30279000000 30280496209 214228928 215725137
+90840000000 90844488774 30280000000 30281496258 215228928 216725186
+90843000000 90847488918 30281000000 30282496306 216228928 217725234
+90846000000 90849111572 30282000000 30283037190 217228928 218266118
+90849000000 90853489233 30283000000 30284496411 218228928 219725339
+90852000000 90856489393 30284000000 30285496464 219228928 220725392
+90855000000 90859489530 30285000000 30286496510 220228928 221725438
+90858000000 90862489688 30286000000 30287496562 221228928 222725490
+90861000000 90865489846 30287000000 30288496615 222228928 223725543
+90864000000 90868489960 30288000000 30289496653 223228928 224725581
+90867000000 90871490121 30289000000 30290496707 224228928 225725635
+90870000000 90874490248 30290000000 30291496749 225228928 226725677
+90873000000 90877490357 30291000000 30292496785 226228928 227725713
+90876000000 90880490499 30292000000 30293496833 227228928 228725761
+90879000000 90883490733 30293000000 30294496911 228228928 229725839
+90882000000 90886490646 30294000000 30295496882 229228928 230725810
+90885000000 90889490767 30295000000 30296496922 230228928 231725850
+90888000000 90892490875 30296000000 30297496958 231228928 232725886
+90891000000 90895491110 30297000000 30298497036 232228928 233725964
+90894000000 90898491289 30298000000 30299497096 233228928 234726024
+90897000000 90901404929 30299000000 30300468309 234228928 235697237
+90900000000 90904491558 30300000000 30301497186 235228928 236726114
+90903000000 90907491731 30301000000 30302497243 236228928 237726171
+90906000000 90910491847 30302000000 30303497282 237228928 238726210
+90909000000 90913492020 30303000000 30304497340 238228928 239726268
+90912000000 90916492192 30304000000 30305497397 239228928 240726325
+90915000000 90919492248 30305000000 30306497416 240228928 241726344
+90918000000 90922492394 30306000000 30307497464 241228928 242726392
+90921000000 90925492590 30307000000 30308497530 242228928 243726458
+90924000000 90928492619 30308000000 30309497539 243228928 244726467
+90927000000 90931492925 30309000000 30310497641 244228928 245726569
+90930000000 90934493097 30310000000 30311497699 245228928 246726627
+90933000000 90937493230 30311000000 30312497743 246228928 247726671
+90936000000 90940493347 30312000000 30313497782 247228928 248726710
+90939000000 90943493532 30313000000 30314497844 248228928 249726772
+90942000000 90946493638 30314000000 30315497879 249228928 250726807
+90945000000 90949493819 30315000000 30316497939 250228928 251726867
+90948000000 90952494031 30316000000 30317498010 251228928 252726938
+90951000000 90955494138 30317000000 30318498046 252228928 253726974
+90954000000 90958494304 30318000000 30319498101 253228928 254727029
+90957000000 90961093049 30319000000 30320364349 254228928 255593277
+90960000000 90964494575 30320000000 30321498191 255228928 256727119
+90963000000 90967494687 30321000000 30322498229 256228928 257727157
+90966000000 90970494896 30322000000 30323498298 257228928 258727226
+90969000000 90973494975 30323000000 30324498325 258228928 259727253
+90972000000 90976495200 30324000000 30325498400 259228928 260727328
+90975000000 90979495327 30325000000 30326498442 260228928 261727370
+90978000000 90982495416 30326000000 30327498472 261228928 262727400
+90981000000 90985495522 30327000000 30328498507 262228928 263727435
+90984000000 90988495733 30328000000 30329498577 263228928 264727505
+90987000000 90991495942 30329000000 30330498647 264228928 265727575
+90990000000 90994496087 30330000000 30331498695 265228928 266727623
+90993000000 90997496213 30331000000 30332498737 266228928 267727665
+90996000000 91000496379 30332000000 30333498793 267228928 268727721
+90999000000 91003496459 30333000000 30334498819 268228928 269727747
+91002000000 91006496694 30334000000 30335498898 269228928 270727826
+91005000000 91009496853 30335000000 30336498951 270228928 271727879
+91008000000 91012496974 30336000000 30337498991 271228928 272727919
+91011000000 91015497134 30337000000 30338499044 272228928 273727972
+91014000000 91018497217 30338000000 30339499072 273228928 274728000
+91017000000 91021497463 30339000000 30340499154 274228928 275728082
+91020000000 91024497586 30340000000 30341499195 275228928 276728123
+91023000000 91027497722 30341000000 30342499240 276228928 277728168
+91026000000 91030497897 30342000000 30343499299 277228928 278728227
+91029000000 91033498019 30343000000 30344499339 278228928 279728267
+91032000000 91036498169 30344000000 30345499389 279228928 280728317
+91035000000 91039498317 30345000000 30346499439 280228928 281728367
+91038000000 91041672011 30346000000 30347224003 281228928 282452931
+91041000000 91045498637 30347000000 30348499545 282228928 283728473
+91044000000 91048498769 30348000000 30349499589 283228928 284728517
+91047000000 91051498943 30349000000 30350499647 284228928 285728575
+91050000000 91054499062 30350000000 30351499687 285228928 286728615
+91053000000 91057499186 30351000000 30352499728 286228928 287728656
+91056000000 91060499405 30352000000 30353499801 287228928 288728729
+91059000000 91063499541 30353000000 30354499847 288228928 289728775
+91062000000 91066499692 30354000000 30355499897 289228928 290728825
+91065000000 91069499842 30355000000 30356499947 290228928 291728875
+91068000000 91072499957 30356000000 30357499985 291228928 292728913
+91071000000 91075500054 30357000000 30358500018 292228928 293728946
+91074000000 91078500262 30358000000 30359500087 293228928 294729015
+91077000000 91081500417 30359000000 30360500139 294228928 295729067
+91080000000 91084500576 30360000000 30361500192 295228928 296729120
+91083000000 91087500750 30361000000 30362500250 296228928 297729178
+91086000000 91090500850 30362000000 30363500283 297228928 298729211
+91089000000 91093501028 30363000000 30364500342 298228928 299729270
+91092000000 91096501177 30364000000 30365500392 299228928 300729320
+91095000000 91099501305 30365000000 30366500435 300228928 301729363
+91098000000 91102501474 30366000000 30367500491 301228928 302729419
+91101000000 91105501594 30367000000 30368500531 302228928 303729459
+91104000000 91107328944 30368000000 30369109648 303228928 304338576
+91107000000 91111501844 30369000000 30370500614 304228928 305729542
+91110000000 91114502102 30370000000 30371500700 305228928 306729628
+91113000000 91117502207 30371000000 30372500735 306228928 307729663
+91116000000 91120502287 30372000000 30373500762 307228928 308729690
+91119000000 91123502434 30373000000 30374500811 308228928 309729739
+91122000000 91126502688 30374000000 30375500896 309228928 310729824
+91125000000 91129502778 30375000000 30376500926 310228928 311729854
+91128000000 91132503023 30376000000 30377501007 311228928 312729935
+91131000000 91135503101 30377000000 30378501033 312228928 313729961
+91134000000 91138503278 30378000000 30379501092 313228928 314730020
+91137000000 91141503424 30379000000 30380501141 314228928 315730069
+91140000000 91144503568 30380000000 30381501189 315228928 316730117
+91143000000 91146126222 30381000000 30382042074 316228928 317271002
+91146000000 91150503883 30382000000 30383501294 317228928 318730222
+91149000000 91153504043 30383000000 30384501347 318228928 319730275
+91152000000 91156504180 30384000000 30385501393 319228928 320730321
+91155000000 91159504338 30385000000 30386501446 320228928 321730374
+91158000000 91162504496 30386000000 30387501498 321228928 322730426
+91161000000 91165504610 30387000000 30388501536 322228928 323730464
+91164000000 91168504771 30388000000 30389501590 323228928 324730518
+91167000000 91171504898 30389000000 30390501632 324228928 325730560
+91170000000 91174505007 30390000000 30391501669 325228928 326730597
+91173000000 91177505149 30391000000 30392501716 326228928 327730644
+91176000000 91180505383 30392000000 30393501794 327228928 328730722
+91179000000 91183505296 30393000000 30394501765 328228928 329730693
+91182000000 91186505417 30394000000 30395501805 329228928 330730733
+91185000000 91189505525 30395000000 30396501841 330228928 331730769
+91188000000 91192505760 30396000000 30397501920 331228928 332730848
+91191000000 91195505939 30397000000 30398501979 332228928 333730907
+91194000000 91198419579 30398000000 30399473193 333228928 334702121
+91197000000 91201506208 30399000000 30400502069 334228928 335730997
+91200000000 91204506381 30400000000 30401502127 335228928 336731055
+91203000000 91207506497 30401000000 30402502165 336228928 337731093
+91206000000 91210506670 30402000000 30403502223 337228928 338731151
+91209000000 91213506842 30403000000 30404502280 338228928 339731208
+91212000000 91216506898 30404000000 30405502299 339228928 340731227
+91215000000 91219507044 30405000000 30406502348 340228928 341731276
+91218000000 91222507240 30406000000 30407502413 341228928 342731341
+91221000000 91225507269 30407000000 30408502423 342228928 343731351
+91224000000 91228507575 30408000000 30409502525 343228928 344731453
+91227000000 91231507747 30409000000 30410502582 344228928 345731510
+91230000000 91234507880 30410000000 30411502626 345228928 346731554
+91233000000 91237507997 30411000000 30412502665 346228928 347731593
+91236000000 91240508182 30412000000 30413502727 347228928 348731655
+91239000000 91243508288 30413000000 30414502762 348228928 349731690
+91242000000 91246508469 30414000000 30415502823 349228928 350731751
+91245000000 91249508681 30415000000 30416502893 350228928 351731821
+91248000000 91252508788 30416000000 30417502929 351228928 352731857
+91251000000 91255508954 30417000000 30418502984 352228928 353731912
+91254000000 91258107699 30418000000 30419369233 353228928 354598161
+91257000000 91261509225 30419000000 30420503075 354228928 355732003
+91260000000 91264509337 30420000000 30421503112 355228928 356732040
+91263000000 91267509546 30421000000 30422503182 356228928 357732110
+91266000000 91270509625 30422000000 30423503208 357228928 358732136
+91269000000 91273509850 30423000000 30424503283 358228928 359732211
+91272000000 91276509977 30424000000 30425503325 359228928 360732253
+91275000000 91279510066 30425000000 30426503355 360228928 361732283
+91278000000 91282510172 30426000000 30427503390 361228928 362732318
+91281000000 91285510383 30427000000 30428503461 362228928 363732389
+91284000000 91288510592 30428000000 30429503530 363228928 364732458
+91287000000 91291510737 30429000000 30430503579 364228928 365732507
+91290000000 91294510863 30430000000 30431503621 365228928 366732549
+91293000000 91297511029 30431000000 30432503676 366228928 367732604
+91296000000 91300511109 30432000000 30433503703 367228928 368732631
+91299000000 91303511344 30433000000 30434503781 368228928 369732709
+91302000000 91306511503 30434000000 30435503834 369228928 370732762
+91305000000 91309511624 30435000000 30436503874 370228928 371732802
+91308000000 91312511784 30436000000 30437503928 371228928 372732856
+91311000000 91315511867 30437000000 30438503955 372228928 373732883
+91314000000 91318512113 30438000000 30439504037 373228928 374732965
+91317000000 91321512236 30439000000 30440504078 374228928 375733006
+91320000000 91324512372 30440000000 30441504124 375228928 376733052
+91323000000 91327512547 30441000000 30442504182 376228928 377733110
+91326000000 91330512669 30442000000 30443504223 377228928 378733151
+91329000000 91333512819 30443000000 30444504273 378228928 379733201
+91332000000 91336512967 30444000000 30445504322 379228928 380733250
+91335000000 91338686661 30445000000 30446228887 380228928 381457815
+91338000000 91342513287 30446000000 30447504429 381228928 382733357
+91341000000 91345513419 30447000000 30448504473 382228928 383733401
+91344000000 91348513593 30448000000 30449504531 383228928 384733459
+91347000000 91351513712 30449000000 30450504570 384228928 385733498
+91350000000 91354513836 30450000000 30451504612 385228928 386733540
+91353000000 91357514055 30451000000 30452504685 386228928 387733613
+91356000000 91360514191 30452000000 30453504730 387228928 388733658
+91359000000 91363514342 30453000000 30454504780 388228928 389733708
+91362000000 91366514492 30454000000 30455504830 389228928 390733758
+91365000000 91369514607 30455000000 30456504869 390228928 391733797
+91368000000 91372514704 30456000000 30457504901 391228928 392733829
+91371000000 91375514912 30457000000 30458504970 392228928 393733898
+91374000000 91378515067 30458000000 30459505022 393228928 394733950
+91377000000 91381515226 30459000000 30460505075 394228928 395734003
+91380000000 91384515400 30460000000 30461505133 395228928 396734061
+91383000000 91387515500 30461000000 30462505166 396228928 397734094
+91386000000 91390515678 30462000000 30463505226 397228928 398734154
+91389000000 91393515827 30463000000 30464505275 398228928 399734203
+91392000000 91396515955 30464000000 30465505318 399228928 400734246
+91395000000 91399516124 30465000000 30466505374 400228928 401734302
+91398000000 91402516244 30466000000 30467505414 401228928 402734342
+91401000000 91404343594 30467000000 30468114531 402228928 403343459
+91404000000 91408516494 30468000000 30469505498 403228928 404734426
+91407000000 91411516752 30469000000 30470505584 404228928 405734512
+91410000000 91414516857 30470000000 30471505619 405228928 406734547
+91413000000 91417516937 30471000000 30472505645 406228928 407734573
+91416000000 91420517084 30472000000 30473505694 407228928 408734622
+91419000000 91423517338 30473000000 30474505779 408228928 409734707
+91422000000 91426517428 30474000000 30475505809 409228928 410734737
+91425000000 91429517673 30475000000 30476505891 410228928 411734819
+91428000000 91432517751 30476000000 30477505917 411228928 412734845
+91431000000 91435517928 30477000000 30478505976 412228928 413734904
+91434000000 91438518074 30478000000 30479506024 413228928 414734952
+91437000000 91441518218 30479000000 30480506072 414228928 415735000
+91440000000 91443140872 30480000000 30481046957 415228928 416275885
+91443000000 91447518533 30481000000 30482506177 416228928 417735105
+91446000000 91450518693 30482000000 30483506231 417228928 418735159
+91449000000 91453518830 30483000000 30484506276 418228928 419735204
+91452000000 91456518988 30484000000 30485506329 419228928 420735257
+91455000000 91459519146 30485000000 30486506382 420228928 421735310
+91458000000 91462519260 30486000000 30487506420 421228928 422735348
+91461000000 91465519421 30487000000 30488506473 422228928 423735401
+91464000000 91468519548 30488000000 30489506516 423228928 424735444
+91467000000 91471519657 30489000000 30490506552 424228928 425735480
+91470000000 91474519799 30490000000 30491506599 425228928 426735527
+91473000000 91477520033 30491000000 30492506677 426228928 427735605
+91476000000 91480519946 30492000000 30493506648 427228928 428735576
+91479000000 91483520067 30493000000 30494506689 428228928 429735617
+91482000000 91486520175 30494000000 30495506725 429228928 430735653
+91485000000 91489520410 30495000000 30496506803 430228928 431735731
+91488000000 91492520589 30496000000 30497506863 431228928 432735791
+91491000000 91495434229 30497000000 30498478076 432228928 433707004
+91494000000 91498520858 30498000000 30499506952 433228928 434735880
+91497000000 91501521031 30499000000 30500507010 434228928 435735938
+91500000000 91504521147 30500000000 30501507049 435228928 436735977
+91503000000 91507521320 30501000000 30502507106 436228928 437736034
+91506000000 91510521492 30502000000 30503507164 437228928 438736092
+91509000000 91513521548 30503000000 30504507182 438228928 439736110
+91512000000 91516521694 30504000000 30505507231 439228928 440736159
+91515000000 91519521890 30505000000 30506507296 440228928 441736224
+91518000000 91522521919 30506000000 30507507306 441228928 442736234
+91521000000 91525522225 30507000000 30508507408 442228928 443736336
+91524000000 91528522397 30508000000 30509507465 443228928 444736393
+91527000000 91531522530 30509000000 30510507510 444228928 445736438
+91530000000 91534522647 30510000000 30511507549 445228928 446736477
+91533000000 91537522832 30511000000 30512507610 446228928 447736538
+91536000000 91540522938 30512000000 30513507646 447228928 448736574
+91539000000 91543523119 30513000000 30514507706 448228928 449736634
+91542000000 91546523331 30514000000 30515507777 449228928 450736705
+91545000000 91549523438 30515000000 30516507812 450228928 451736740
+91548000000 91552523604 30516000000 30517507868 451228928 452736796
+91551000000 91555122349 30517000000 30518374116 452228928 453603044
+91554000000 91558523875 30518000000 30519507958 453228928 454736886
+91557000000 91561523987 30519000000 30520507995 454228928 455736923
+91560000000 91564524196 30520000000 30521508065 455228928 456736993
+91563000000 91567524275 30521000000 30522508091 456228928 457737019
+91566000000 91570524500 30522000000 30523508166 457228928 458737094
+91569000000 91573524627 30523000000 30524508209 458228928 459737137
+91572000000 91576524716 30524000000 30525508238 459228928 460737166
+91575000000 91579524822 30525000000 30526508274 460228928 461737202
+91578000000 91582525033 30526000000 30527508344 461228928 462737272
+91581000000 91585525242 30527000000 30528508414 462228928 463737342
+91584000000 91588525387 30528000000 30529508462 463228928 464737390
+91587000000 91591525513 30529000000 30530508504 464228928 465737432
+91590000000 91594525679 30530000000 30531508559 465228928 466737487
+91593000000 91597525759 30531000000 30532508586 466228928 467737514
+91596000000 91600525994 30532000000 30533508664 467228928 468737592
+91599000000 91603526153 30533000000 30534508717 468228928 469737645
+91602000000 91606526274 30534000000 30535508758 469228928 470737686
+91605000000 91609526434 30535000000 30536508811 470228928 471737739
+91608000000 91612526517 30536000000 30537508839 471228928 472737767
+91611000000 91615526763 30537000000 30538508921 472228928 473737849
+91614000000 91618526886 30538000000 30539508962 473228928 474737890
+91617000000 91621527022 30539000000 30540509007 474228928 475737935
+91620000000 91624527197 30540000000 30541509065 475228928 476737993
+91623000000 91627527319 30541000000 30542509106 476228928 477738034
+91626000000 91630527469 30542000000 30543509156 477228928 478738084
+91629000000 91633527617 30543000000 30544509205 478228928 479738133
+91632000000 91635701311 30544000000 30545233770 479228928 480462698
+91635000000 91639527937 30545000000 30546509312 480228928 481738240
+91638000000 91642528069 30546000000 30547509356 481228928 482738284
+91641000000 91645528243 30547000000 30548509414 482228928 483738342
+91644000000 91648528362 30548000000 30549509454 483228928 484738382
+91647000000 91651528486 30549000000 30550509495 484228928 485738423
+91650000000 91654528705 30550000000 30551509568 485228928 486738496
+91653000000 91657528841 30551000000 30552509613 486228928 487738541
+91656000000 91660528992 30552000000 30553509664 487228928 488738592
+91659000000 91663529142 30553000000 30554509714 488228928 489738642
+91662000000 91666529257 30554000000 30555509752 489228928 490738680
+91665000000 91669529354 30555000000 30556509784 490228928 491738712
+91668000000 91672529562 30556000000 30557509854 491228928 492738782
+91671000000 91675529717 30557000000 30558509905 492228928 493738833
+91674000000 91678529876 30558000000 30559509958 493228928 494738886
+91677000000 91681530050 30559000000 30560510016 494228928 495738944
+91680000000 91684530150 30560000000 30561510050 495228928 496738978
+91683000000 91687530328 30561000000 30562510109 496228928 497739037
+91686000000 91690530477 30562000000 30563510159 497228928 498739087
+91689000000 91693530605 30563000000 30564510201 498228928 499739129
+91692000000 91696530774 30564000000 30565510258 499228928 500739186
+91695000000 91699530894 30565000000 30566510298 500228928 501739226
+91698000000 91701358244 30566000000 30567119414 501228928 502348342
+91701000000 91705531144 30567000000 30568510381 502228928 503739309
+91704000000 91708531402 30568000000 30569510467 503228928 504739395
+91707000000 91711531507 30569000000 30570510502 504228928 505739430
+91710000000 91714531587 30570000000 30571510529 505228928 506739457
+91713000000 91717531734 30571000000 30572510578 506228928 507739506
+91716000000 91720531988 30572000000 30573510662 507228928 508739590
+91719000000 91723532078 30573000000 30574510692 508228928 509739620
+91722000000 91726532323 30574000000 30575510774 509228928 510739702
+91725000000 91729532401 30575000000 30576510800 510228928 511739728
+91728000000 91732532578 30576000000 30577510859 511228928 512739787
+91731000000 91735532724 30577000000 30578510908 512228928 513739836
+91734000000 91738532868 30578000000 30579510956 513228928 514739884
+91737000000 91740155522 30579000000 30580051840 514228928 515280768
+91740000000 91744533183 30580000000 30581511061 515228928 516739989
+91743000000 91747533343 30581000000 30582511114 516228928 517740042
+91746000000 91750533480 30582000000 30583511160 517228928 518740088
+91749000000 91753533638 30583000000 30584511212 518228928 519740140
+91752000000 91756533796 30584000000 30585511265 519228928 520740193
+91755000000 91759533910 30585000000 30586511303 520228928 521740231
+91758000000 91762534071 30586000000 30587511357 521228928 522740285
+91761000000 91765534198 30587000000 30588511399 522228928 523740327
+91764000000 91768534307 30588000000 30589511435 523228928 524740363
+91767000000 91771534449 30589000000 30590511483 524228928 525740411
+91770000000 91774534683 30590000000 30591511561 525228928 526740489
+91773000000 91777534596 30591000000 30592511532 526228928 527740460
+91776000000 91780534717 30592000000 30593511572 527228928 528740500
+91779000000 91783534825 30593000000 30594511608 528228928 529740536
+91782000000 91786535060 30594000000 30595511686 529228928 530740614
+91785000000 91789535239 30595000000 30596511746 530228928 531740674
+91788000000 91792448879 30596000000 30597482959 531228928 532711887
+91791000000 91795535508 30597000000 30598511836 532228928 533740764
+91794000000 91798535681 30598000000 30599511893 533228928 534740821
+91797000000 91801535797 30599000000 30600511932 534228928 535740860
+91800000000 91804535970 30600000000 30601511990 535228928 536740918
+91803000000 91807536142 30601000000 30602512047 536228928 537740975
+91806000000 91810536198 30602000000 30603512066 537228928 538740994
+91809000000 91813536344 30603000000 30604512114 538228928 539741042
+91812000000 91816536540 30604000000 30605512180 539228928 540741108
+91815000000 91819536569 30605000000 30606512189 540228928 541741117
+91818000000 91822536875 30606000000 30607512291 541228928 542741219
+91821000000 91825537047 30607000000 30608512349 542228928 543741277
+91824000000 91828537180 30608000000 30609512393 543228928 544741321
+91827000000 91831537297 30609000000 30610512432 544228928 545741360
+91830000000 91834537482 30610000000 30611512494 545228928 546741422
+91833000000 91837537588 30611000000 30612512529 546228928 547741457
+91836000000 91840537769 30612000000 30613512589 547228928 548741517
+91839000000 91843537981 30613000000 30614512660 548228928 549741588
+91842000000 91846538088 30614000000 30615512696 549228928 550741624
+91845000000 91849538254 30615000000 30616512751 550228928 551741679
+91848000000 91852136999 30616000000 30617378999 551228928 552607927
+91851000000 91855538525 30617000000 30618512841 552228928 553741769
+91854000000 91858538637 30618000000 30619512879 553228928 554741807
+91857000000 91861538846 30619000000 30620512948 554228928 555741876
+91860000000 91864538925 30620000000 30621512975 555228928 556741903
+91863000000 91867539150 30621000000 30622513050 556228928 557741978
+91866000000 91870539277 30622000000 30623513092 557228928 558742020
+91869000000 91873539366 30623000000 30624513122 558228928 559742050
+91872000000 91876539472 30624000000 30625513157 559228928 560742085
+91875000000 91879539683 30625000000 30626513227 560228928 561742155
+91878000000 91882539892 30626000000 30627513297 561228928 562742225
+91881000000 91885540037 30627000000 30628513345 562228928 563742273
+91884000000 91888540163 30628000000 30629513387 563228928 564742315
+91887000000 91891540329 30629000000 30630513443 564228928 565742371
+91890000000 91894540409 30630000000 30631513469 565228928 566742397
+91893000000 91897540644 30631000000 30632513548 566228928 567742476
+91896000000 91900540803 30632000000 30633513601 567228928 568742529
+91899000000 91903540924 30633000000 30634513641 568228928 569742569
+91902000000 91906541084 30634000000 30635513694 569228928 570742622
+91905000000 91909541167 30635000000 30636513722 570228928 571742650
+91908000000 91912541413 30636000000 30637513804 571228928 572742732
+91911000000 91915541536 30637000000 30638513845 572228928 573742773
+91914000000 91918541672 30638000000 30639513890 573228928 574742818
+91917000000 91921541847 30639000000 30640513949 574228928 575742877
+91920000000 91924541969 30640000000 30641513989 575228928 576742917
+91923000000 91927542119 30641000000 30642514039 576228928 577742967
+91926000000 91930542267 30642000000 30643514089 577228928 578743017
+91929000000 91932715961 30643000000 30644238653 578228928 579467581
+91932000000 91936542587 30644000000 30645514195 579228928 580743123
+91935000000 91939542719 30645000000 30646514239 580228928 581743167
+91938000000 91942542893 30646000000 30647514297 581228928 582743225
+91941000000 91945543012 30647000000 30648514337 582228928 583743265
+91944000000 91948543136 30648000000 30649514378 583228928 584743306
+91947000000 91951543355 30649000000 30650514451 584228928 585743379
+91950000000 91954543491 30650000000 30651514497 585228928 586743425
+91953000000 91957543642 30651000000 30652514547 586228928 587743475
+91956000000 91960543792 30652000000 30653514597 587228928 588743525
+91959000000 91963543907 30653000000 30654514635 588228928 589743563
+91962000000 91966544004 30654000000 30655514668 589228928 590743596
+91965000000 91969544212 30655000000 30656514737 590228928 591743665
+91968000000 91972544367 30656000000 30657514789 591228928 592743717
+91971000000 91975544526 30657000000 30658514842 592228928 593743770
+91974000000 91978544700 30658000000 30659514900 593228928 594743828
+91977000000 91981544800 30659000000 30660514933 594228928 595743861
+91980000000 91984544978 30660000000 30661514992 595228928 596743920
+91983000000 91987545127 30661000000 30662515042 596228928 597743970
+91986000000 91990545255 30662000000 30663515085 597228928 598744013
+91989000000 91993545424 30663000000 30664515141 598228928 599744069
+91992000000 91996545544 30664000000 30665515181 599228928 600744109
+91995000000 91998372894 30665000000 30666124298 600228928 601353226
+91998000000 92002545794 30666000000 30667515264 601228928 602744192
+92001000000 92005546052 30667000000 30668515350 602228928 603744278
+92004000000 92008546157 30668000000 30669515385 603228928 604744313
+92007000000 92011546237 30669000000 30670515412 604228928 605744340
+92010000000 92014546384 30670000000 30671515461 605228928 606744389
+92013000000 92017546638 30671000000 30672515546 606228928 607744474
+92016000000 92020546728 30672000000 30673515576 607228928 608744504
+92019000000 92023546973 30673000000 30674515657 608228928 609744585
+92022000000 92026547051 30674000000 30675515683 609228928 610744611
+92025000000 92029547228 30675000000 30676515742 610228928 611744670
+92028000000 92032547374 30676000000 30677515791 611228928 612744719
+92031000000 92035547518 30677000000 30678515839 612228928 613744767
+92034000000 92037170172 30678000000 30679056724 613228928 614285652
+92037000000 92041547833 30679000000 30680515944 614228928 615744872
+92040000000 92044547993 30680000000 30681515997 615228928 616744925
+92043000000 92047548130 30681000000 30682516043 616228928 617744971
+92046000000 92050548288 30682000000 30683516096 617228928 618745024
+92049000000 92053548446 30683000000 30684516148 618228928 619745076
+92052000000 92056548560 30684000000 30685516186 619228928 620745114
+92055000000 92059548721 30685000000 30686516240 620228928 621745168
+92058000000 92062548848 30686000000 30687516282 621228928 622745210
+92061000000 92065548957 30687000000 30688516319 622228928 623745247
+92064000000 92068549099 30688000000 30689516366 623228928 624745294
+92067000000 92071549333 30689000000 30690516444 624228928 625745372
+92070000000 92074549246 30690000000 30691516415 625228928 626745343
+92073000000 92077549367 30691000000 30692516455 626228928 627745383
+92076000000 92080549475 30692000000 30693516491 627228928 628745419
+92079000000 92083549710 30693000000 30694516570 628228928 629745498
+92082000000 92086549889 30694000000 30695516629 629228928 630745557
+92085000000 92089463529 30695000000 30696487843 630228928 631716771
+92088000000 92092550158 30696000000 30697516719 631228928 632745647
+92091000000 92095550331 30697000000 30698516777 632228928 633745705
+92094000000 92098550447 30698000000 30699516815 633228928 634745743
+92097000000 92101550620 30699000000 30700516873 634228928 635745801
+92100000000 92104550792 30700000000 30701516930 635228928 636745858
+92103000000 92107550848 30701000000 30702516949 636228928 637745877
+92106000000 92110550994 30702000000 30703516998 637228928 638745926
+92109000000 92113551190 30703000000 30704517063 638228928 639745991
+92112000000 92116551219 30704000000 30705517073 639228928 640746001
+92115000000 92119551525 30705000000 30706517175 640228928 641746103
+92118000000 92122551697 30706000000 30707517232 641228928 642746160
+92121000000 92125551830 30707000000 30708517276 642228928 643746204
+92124000000 92128551947 30708000000 30709517315 643228928 644746243
+92127000000 92131552132 30709000000 30710517377 644228928 645746305
+92130000000 92134552238 30710000000 30711517412 645228928 646746340
+92133000000 92137552419 30711000000 30712517473 646228928 647746401
+92136000000 92140552631 30712000000 30713517543 647228928 648746471
+92139000000 92143552738 30713000000 30714517579 648228928 649746507
+92142000000 92146552904 30714000000 30715517634 649228928 650746562
+92145000000 92149151649 30715000000 30716383883 650228928 651612811
+92148000000 92152553175 30716000000 30717517725 651228928 652746653
+92151000000 92155553287 30717000000 30718517762 652228928 653746690
+92154000000 92158553496 30718000000 30719517832 653228928 654746760
+92157000000 92161553575 30719000000 30720517858 654228928 655746786
+92160000000 92164553800 30720000000 30721517933 655228928 656746861
+92163000000 92167553927 30721000000 30722517975 656228928 657746903
+92166000000 92170554016 30722000000 30723518005 657228928 658746933
+92169000000 92173554122 30723000000 30724518040 658228928 659746968
+92172000000 92176554333 30724000000 30725518111 659228928 660747039
+92175000000 92179554542 30725000000 30726518180 660228928 661747108
+92178000000 92182554687 30726000000 30727518229 661228928 662747157
+92181000000 92185554813 30727000000 30728518271 662228928 663747199
+92184000000 92188554979 30728000000 30729518326 663228928 664747254
+92187000000 92191555059 30729000000 30730518353 664228928 665747281
+92190000000 92194555294 30730000000 30731518431 665228928 666747359
+92193000000 92197555453 30731000000 30732518484 666228928 667747412
+92196000000 92200555574 30732000000 30733518524 667228928 668747452
+92199000000 92203555734 30733000000 30734518578 668228928 669747506
+92202000000 92206555817 30734000000 30735518605 669228928 670747533
+92205000000 92209556063 30735000000 30736518687 670228928 671747615
+92208000000 92212556186 30736000000 30737518728 671228928 672747656
+92211000000 92215556322 30737000000 30738518774 672228928 673747702
+92214000000 92218556497 30738000000 30739518832 673228928 674747760
+92217000000 92221556619 30739000000 30740518873 674228928 675747801
+92220000000 92224556769 30740000000 30741518923 675228928 676747851
+92223000000 92227556917 30741000000 30742518972 676228928 677747900
+92226000000 92229730611 30742000000 30743243537 677228928 678472465
+92229000000 92233557237 30743000000 30744519079 678228928 679748007
+92232000000 92236557369 30744000000 30745519123 679228928 680748051
+92235000000 92239557543 30745000000 30746519181 680228928 681748109
+92238000000 92242557662 30746000000 30747519220 681228928 682748148
+92241000000 92245557786 30747000000 30748519262 682228928 683748190
+92244000000 92248558005 30748000000 30749519335 683228928 684748263
+92247000000 92251558141 30749000000 30750519380 684228928 685748308
+92250000000 92254558292 30750000000 30751519430 685228928 686748358
+92253000000 92257558442 30751000000 30752519480 686228928 687748408
+92256000000 92260558557 30752000000 30753519519 687228928 688748447
+92259000000 92263558654 30753000000 30754519551 688228928 689748479
+92262000000 92266558862 30754000000 30755519620 689228928 690748548
+92265000000 92269559017 30755000000 30756519672 690228928 691748600
+92268000000 92272559176 30756000000 30757519725 691228928 692748653
+92271000000 92275559350 30757000000 30758519783 692228928 693748711
+92274000000 92278559450 30758000000 30759519816 693228928 694748744
+92277000000 92281559628 30759000000 30760519876 694228928 695748804
+92280000000 92284559777 30760000000 30761519925 695228928 696748853
+92283000000 92287559905 30761000000 30762519968 696228928 697748896
+92286000000 92290560074 30762000000 30763520024 697228928 698748952
+92289000000 92293560194 30763000000 30764520064 698228928 699748992
+92292000000 92295387544 30764000000 30765129181 699228928 700358109
+92295000000 92299560444 30765000000 30766520148 700228928 701749076
+92298000000 92302560702 30766000000 30767520234 701228928 702749162
+92301000000 92305560807 30767000000 30768520269 702228928 703749197
+92304000000 92308560887 30768000000 30769520295 703228928 704749223
+92307000000 92311561034 30769000000 30770520344 704228928 705749272
+92310000000 92314561288 30770000000 30771520429 705228928 706749357
+92313000000 92317561378 30771000000 30772520459 706228928 707749387
+92316000000 92320561623 30772000000 30773520541 707228928 708749469
+92319000000 92323561701 30773000000 30774520567 708228928 709749495
+92322000000 92326561878 30774000000 30775520626 709228928 710749554
+92325000000 92329562024 30775000000 30776520674 710228928 711749602
+92328000000 92332562168 30776000000 30777520722 711228928 712749650
+92331000000 92334184822 30777000000 30778061607 712228928 713290535
+92334000000 92338562483 30778000000 30779520827 713228928 714749755
+92337000000 92341562643 30779000000 30780520881 714228928 715749809
+92340000000 92344562780 30780000000 30781520926 715228928 716749854
+92343000000 92347562938 30781000000 30782520979 716228928 717749907
+92346000000 92350563096 30782000000 30783521032 717228928 718749960
+92349000000 92353563210 30783000000 30784521070 718228928 719749998
+92352000000 92356563371 30784000000 30785521123 719228928 720750051
+92355000000 92359563498 30785000000 30786521166 720228928 721750094
+92358000000 92362563607 30786000000 30787521202 721228928 722750130
+92361000000 92365563749 30787000000 30788521249 722228928 723750177
+92364000000 92368563983 30788000000 30789521327 723228928 724750255
+92367000000 92371563896 30789000000 30790521298 724228928 725750226
+92370000000 92374564017 30790000000 30791521339 725228928 726750267
+92373000000 92377564125 30791000000 30792521375 726228928 727750303
+92376000000 92380564360 30792000000 30793521453 727228928 728750381
+92379000000 92383564539 30793000000 30794521513 728228928 729750441
+92382000000 92386478179 30794000000 30795492726 729228928 730721654
+92385000000 92389564808 30795000000 30796521602 730228928 731750530
+92388000000 92392564981 30796000000 30797521660 731228928 732750588
+92391000000 92395565097 30797000000 30798521699 732228928 733750627
+92394000000 92398565270 30798000000 30799521756 733228928 734750684
+92397000000 92401565442 30799000000 30800521814 734228928 735750742
+92400000000 92404565498 30800000000 30801521832 735228928 736750760
+92403000000 92407565644 30801000000 30802521881 736228928 737750809
+92406000000 92410565840 30802000000 30803521946 737228928 738750874
+92409000000 92413565869 30803000000 30804521956 738228928 739750884
+92412000000 92416566175 30804000000 30805522058 739228928 740750986
+92415000000 92419566347 30805000000 30806522115 740228928 741751043
+92418000000 92422566480 30806000000 30807522160 741228928 742751088
+92421000000 92425566597 30807000000 30808522199 742228928 743751127
+92424000000 92428566782 30808000000 30809522260 743228928 744751188
+92427000000 92431566888 30809000000 30810522296 744228928 745751224
+92430000000 92434567069 30810000000 30811522356 745228928 746751284
+92433000000 92437567281 30811000000 30812522427 746228928 747751355
+92436000000 92440567388 30812000000 30813522462 747228928 748751390
+92439000000 92443567554 30813000000 30814522518 748228928 749751446
+92442000000 92446166299 30814000000 30815388766 749228928 750617694
+92445000000 92449567825 30815000000 30816522608 750228928 751751536
+92448000000 92452567937 30816000000 30817522645 751228928 752751573
+92451000000 92455568146 30817000000 30818522715 752228928 753751643
+92454000000 92458568225 30818000000 30819522741 753228928 754751669
+92457000000 92461568450 30819000000 30820522816 754228928 755751744
+92460000000 92464568577 30820000000 30821522859 755228928 756751787
+92463000000 92467568666 30821000000 30822522888 756228928 757751816
+92466000000 92470568772 30822000000 30823522924 757228928 758751852
+92469000000 92473568983 30823000000 30824522994 758228928 759751922
+92472000000 92476569192 30824000000 30825523064 759228928 760751992
+92475000000 92479569337 30825000000 30826523112 760228928 761752040
+92478000000 92482569463 30826000000 30827523154 761228928 762752082
+92481000000 92485569629 30827000000 30828523209 762228928 763752137
+92484000000 92488569709 30828000000 30829523236 763228928 764752164
+92487000000 92491569944 30829000000 30830523314 764228928 765752242
+92490000000 92494570103 30830000000 30831523367 765228928 766752295
+92493000000 92497570224 30831000000 30832523408 766228928 767752336
+92496000000 92500570384 30832000000 30833523461 767228928 768752389
+92499000000 92503570467 30833000000 30834523489 768228928 769752417
+92502000000 92506570713 30834000000 30835523571 769228928 770752499
+92505000000 92509570836 30835000000 30836523612 770228928 771752540
+92508000000 92512570972 30836000000 30837523657 771228928 772752585
+92511000000 92515571147 30837000000 30838523715 772228928 773752643
+92514000000 92518571269 30838000000 30839523756 773228928 774752684
+92517000000 92521571419 30839000000 30840523806 774228928 775752734
+92520000000 92524571567 30840000000 30841523855 775228928 776752783
+92523000000 92526745261 30841000000 30842248420 776228928 777477348
+92526000000 92530571887 30842000000 30843523962 777228928 778752890
+92529000000 92533572019 30843000000 30844524006 778228928 779752934
+92532000000 92536572193 30844000000 30845524064 779228928 780752992
+92535000000 92539572312 30845000000 30846524104 780228928 781753032
+92538000000 92542572436 30846000000 30847524145 781228928 782753073
+92541000000 92545572655 30847000000 30848524218 782228928 783753146
+92544000000 92548572791 30848000000 30849524263 783228928 784753191
+92547000000 92551572942 30849000000 30850524314 784228928 785753242
+92550000000 92554573092 30850000000 30851524364 785228928 786753292
+92553000000 92557573207 30851000000 30852524402 786228928 787753330
+92556000000 92560573304 30852000000 30853524434 787228928 788753362
+92559000000 92563573512 30853000000 30854524504 788228928 789753432
+92562000000 92566573667 30854000000 30855524555 789228928 790753483
+92565000000 92569573826 30855000000 30856524608 790228928 791753536
+92568000000 92572574000 30856000000 30857524666 791228928 792753594
+92571000000 92575574100 30857000000 30858524700 792228928 793753628
+92574000000 92578574278 30858000000 30859524759 793228928 794753687
+92577000000 92581574427 30859000000 30860524809 794228928 795753737
+92580000000 92584574555 30860000000 30861524851 795228928 796753779
+92583000000 92587574724 30861000000 30862524908 796228928 797753836
+92586000000 92590574844 30862000000 30863524948 797228928 798753876
+92589000000 92592402194 30863000000 30864134064 798228928 799362992
+92592000000 92596575094 30864000000 30865525031 799228928 800753959
+92595000000 92599575352 30865000000 30866525117 800228928 801754045
+92598000000 92602575457 30866000000 30867525152 801228928 802754080
+92601000000 92605575537 30867000000 30868525179 802228928 803754107
+92604000000 92608575684 30868000000 30869525228 803228928 804754156
+92607000000 92611575938 30869000000 30870525312 804228928 805754240
+92610000000 92614576028 30870000000 30871525342 805228928 806754270
+92613000000 92617576273 30871000000 30872525424 806228928 807754352
+92616000000 92620576351 30872000000 30873525450 807228928 808754378
+92619000000 92623576528 30873000000 30874525509 808228928 809754437
+92622000000 92626576674 30874000000 30875525558 809228928 810754486
+92625000000 92629576818 30875000000 30876525606 810228928 811754534
+92628000000 92631199472 30876000000 30877066490 811228928 812295418
+92631000000 92635577133 30877000000 30878525711 812228928 813754639
+92634000000 92638577293 30878000000 30879525764 813228928 814754692
+92637000000 92641577430 30879000000 30880525810 814228928 815754738
+92640000000 92644577588 30880000000 30881525862 815228928 816754790
+92643000000 92647577746 30881000000 30882525915 816228928 817754843
+92646000000 92650577860 30882000000 30883525953 817228928 818754881
+92649000000 92653578021 30883000000 30884526007 818228928 819754935
+92652000000 92656578148 30884000000 30885526049 819228928 820754977
+92655000000 92659578257 30885000000 30886526085 820228928 821755013
+92658000000 92662578399 30886000000 30887526133 821228928 822755061
+92661000000 92665578633 30887000000 30888526211 822228928 823755139
+92664000000 92668578546 30888000000 30889526182 823228928 824755110
+92667000000 92671578667 30889000000 30890526222 824228928 825755150
+92670000000 92674578775 30890000000 30891526258 825228928 826755186
+92673000000 92677579010 30891000000 30892526336 826228928 827755264
+92676000000 92680579189 30892000000 30893526396 827228928 828755324
+92679000000 92683492829 30893000000 30894497609 828228928 829726537
+92682000000 92686579458 30894000000 30895526486 829228928 830755414
+92685000000 92689579631 30895000000 30896526543 830228928 831755471
+92688000000 92692579747 30896000000 30897526582 831228928 832755510
+92691000000 92695579920 30897000000 30898526640 832228928 833755568
+92694000000 92698580092 30898000000 30899526697 833228928 834755625
+92697000000 92701580148 30899000000 30900526716 834228928 835755644
+92700000000 92704580294 30900000000 30901526764 835228928 836755692
+92703000000 92707580490 30901000000 30902526830 836228928 837755758
+92706000000 92710580519 30902000000 30903526839 837228928 838755767
+92709000000 92713580825 30903000000 30904526941 838228928 839755869
+92712000000 92716580997 30904000000 30905526999 839228928 840755927
+92715000000 92719581130 30905000000 30906527043 840228928 841755971
+92718000000 92722581247 30906000000 30907527082 841228928 842756010
+92721000000 92725581432 30907000000 30908527144 842228928 843756072
+92724000000 92728581538 30908000000 30909527179 843228928 844756107
+92727000000 92731581719 30909000000 30910527239 844228928 845756167
+92730000000 92734581931 30910000000 30911527310 845228928 846756238
+92733000000 92737582038 30911000000 30912527346 846228928 847756274
+92736000000 92740582204 30912000000 30913527401 847228928 848756329
+92739000000 92743180949 30913000000 30914393649 848228928 849622577
+92742000000 92746582475 30914000000 30915527491 849228928 850756419
+92745000000 92749582587 30915000000 30916527529 850228928 851756457
+92748000000 92752582796 30916000000 30917527598 851228928 852756526
+92751000000 92755582875 30917000000 30918527625 852228928 853756553
+92754000000 92758583100 30918000000 30919527700 853228928 854756628
+92757000000 92761583227 30919000000 30920527742 854228928 855756670
+92760000000 92764583316 30920000000 30921527772 855228928 856756700
+92763000000 92767583422 30921000000 30922527807 856228928 857756735
+92766000000 92770583633 30922000000 30923527877 857228928 858756805
+92769000000 92773583842 30923000000 30924527947 858228928 859756875
+92772000000 92776583987 30924000000 30925527995 859228928 860756923
+92775000000 92779584113 30925000000 30926528037 860228928 861756965
+92778000000 92782584279 30926000000 30927528093 861228928 862757021
+92781000000 92785584359 30927000000 30928528119 862228928 863757047
+92784000000 92788584594 30928000000 30929528198 863228928 864757126
+92787000000 92791584753 30929000000 30930528251 864228928 865757179
+92790000000 92794584874 30930000000 30931528291 865228928 866757219
+92793000000 92797585034 30931000000 30932528344 866228928 867757272
+92796000000 92800585117 30932000000 30933528372 867228928 868757300
+92799000000 92803585363 30933000000 30934528454 868228928 869757382
+92802000000 92806585486 30934000000 30935528495 869228928 870757423
+92805000000 92809585622 30935000000 30936528540 870228928 871757468
+92808000000 92812585797 30936000000 30937528599 871228928 872757527
+92811000000 92815585919 30937000000 30938528639 872228928 873757567
+92814000000 92818586069 30938000000 30939528689 873228928 874757617
+92817000000 92821586217 30939000000 30940528739 874228928 875757667
+92820000000 92823759911 30940000000 30941253303 875228928 876482231
+92823000000 92827586537 30941000000 30942528845 876228928 877757773
+92826000000 92830586669 30942000000 30943528889 877228928 878757817
+92829000000 92833586843 30943000000 30944528947 878228928 879757875
+92832000000 92836586962 30944000000 30945528987 879228928 880757915
+92835000000 92839587086 30945000000 30946529028 880228928 881757956
+92838000000 92842587305 30946000000 30947529101 881228928 882758029
+92841000000 92845587441 30947000000 30948529147 882228928 883758075
+92844000000 92848587592 30948000000 30949529197 883228928 884758125
+92847000000 92851587742 30949000000 30950529247 884228928 885758175
+92850000000 92854587857 30950000000 30951529285 885228928 886758213
+92853000000 92857587954 30951000000 30952529318 886228928 887758246
+92856000000 92860588162 30952000000 30953529387 887228928 888758315
+92859000000 92863588317 30953000000 30954529439 888228928 889758367
+92862000000 92866588476 30954000000 30955529492 889228928 890758420
+92865000000 92869588650 30955000000 30956529550 890228928 891758478
+92868000000 92872588750 30956000000 30957529583 891228928 892758511
+92871000000 92875588928 30957000000 30958529642 892228928 893758570
+92874000000 92878589077 30958000000 30959529692 893228928 894758620
+92877000000 92881589205 30959000000 30960529735 894228928 895758663
+92880000000 92884589374 30960000000 30961529791 895228928 896758719
+92883000000 92887589494 30961000000 30962529831 896228928 897758759
+92886000000 92889416844 30962000000 30963138948 897228928 898367876
+92889000000 92893589744 30963000000 30964529914 898228928 899758842
+92892000000 92896590002 30964000000 30965530000 899228928 900758928
+92895000000 92899590107 30965000000 30966530035 900228928 901758963
+92898000000 92902590187 30966000000 30967530062 901228928 902758990
+92901000000 92905590334 30967000000 30968530111 902228928 903759039
+92904000000 92908590588 30968000000 30969530196 903228928 904759124
+92907000000 92911590678 30969000000 30970530226 904228928 905759154
+92910000000 92914590923 30970000000 30971530307 905228928 906759235
+92913000000 92917591001 30971000000 30972530333 906228928 907759261
+92916000000 92920591178 30972000000 30973530392 907228928 908759320
+92919000000 92923591324 30973000000 30974530441 908228928 909759369
+92922000000 92926591468 30974000000 30975530489 909228928 910759417
+92925000000 92928214122 30975000000 30976071374 910228928 911300302
+92928000000 92932591783 30976000000 30977530594 911228928 912759522
+92931000000 92935591943 30977000000 30978530647 912228928 913759575
+92934000000 92938592080 30978000000 30979530693 913228928 914759621
+92937000000 92941592238 30979000000 30980530746 914228928 915759674
+92940000000 92944592396 30980000000 30981530798 915228928 916759726
+92943000000 92947592510 30981000000 30982530836 916228928 917759764
+92946000000 92950592671 30982000000 30983530890 917228928 918759818
+92949000000 92953592798 30983000000 30984530932 918228928 919759860
+92952000000 92956592907 30984000000 30985530969 919228928 920759897
+92955000000 92959593049 30985000000 30986531016 920228928 921759944
+92958000000 92962593283 30986000000 30987531094 921228928 922760022
+92961000000 92965593196 30987000000 30988531065 922228928 923759993
+92964000000 92968593317 30988000000 30989531105 923228928 924760033
+92967000000 92971593425 30989000000 30990531141 924228928 925760069
+92970000000 92974593660 30990000000 30991531220 925228928 926760148
+92973000000 92977593839 30991000000 30992531279 926228928 927760207
+92976000000 92980507479 30992000000 30993502493 927228928 928731421
+92979000000 92983594108 30993000000 30994531369 928228928 929760297
+92982000000 92986594281 30994000000 30995531427 929228928 930760355
+92985000000 92989594397 30995000000 30996531465 930228928 931760393
+92988000000 92992594570 30996000000 30997531523 931228928 932760451
+92991000000 92995594742 30997000000 30998531580 932228928 933760508
+92994000000 92998594798 30998000000 30999531599 933228928 934760527
+92997000000 93001594944 30999000000 31000531648 934228928 935760576
+93000000000 93004595140 31000000000 31001531713 935228928 936760641
+93003000000 93007595169 31001000000 31002531723 936228928 937760651
+93006000000 93010595475 31002000000 31003531825 937228928 938760753
+93009000000 93013595647 31003000000 31004531882 938228928 939760810
+93012000000 93016595780 31004000000 31005531926 939228928 940760854
+93015000000 93019595897 31005000000 31006531965 940228928 941760893
+93018000000 93022596082 31006000000 31007532027 941228928 942760955
+93021000000 93025596188 31007000000 31008532062 942228928 943760990
+93024000000 93028596369 31008000000 31009532123 943228928 944761051
+93027000000 93031596581 31009000000 31010532193 944228928 945761121
+93030000000 93034596688 31010000000 31011532229 945228928 946761157
+93033000000 93037596854 31011000000 31012532284 946228928 947761212
+93036000000 93040195599 31012000000 31013398533 947228928 948627461
+93039000000 93043597125 31013000000 31014532375 948228928 949761303
+93042000000 93046597237 31014000000 31015532412 949228928 950761340
+93045000000 93049597446 31015000000 31016532482 950228928 951761410
+93048000000 93052597525 31016000000 31017532508 951228928 952761436
+93051000000 93055597750 31017000000 31018532583 952228928 953761511
+93054000000 93058597877 31018000000 31019532625 953228928 954761553
+93057000000 93061597966 31019000000 31020532655 954228928 955761583
+93060000000 93064598072 31020000000 31021532690 955228928 956761618
+93063000000 93067598283 31021000000 31022532761 956228928 957761689
+93066000000 93070598492 31022000000 31023532830 957228928 958761758
+93069000000 93073598637 31023000000 31024532879 958228928 959761807
+93072000000 93076598763 31024000000 31025532921 959228928 960761849
+93075000000 93079598929 31025000000 31026532976 960228928 961761904
+93078000000 93082599009 31026000000 31027533003 961228928 962761931
+93081000000 93085599244 31027000000 31028533081 962228928 963762009
+93084000000 93088599403 31028000000 31029533134 963228928 964762062
+93087000000 93091599524 31029000000 31030533174 964228928 965762102
+93090000000 93094599684 31030000000 31031533228 965228928 966762156
+93093000000 93097599767 31031000000 31032533255 966228928 967762183
+93096000000 93100600013 31032000000 31033533337 967228928 968762265
+93099000000 93103600136 31033000000 31034533378 968228928 969762306
+93102000000 93106600272 31034000000 31035533424 969228928 970762352
+93105000000 93109600447 31035000000 31036533482 970228928 971762410
+93108000000 93112600569 31036000000 31037533523 971228928 972762451
+93111000000 93115600719 31037000000 31038533573 972228928 973762501
+93114000000 93118600867 31038000000 31039533622 973228928 974762550
+93117000000 93120774561 31039000000 31040258187 974228928 975487115
+93120000000 93124601187 31040000000 31041533729 975228928 976762657
+93123000000 93127601319 31041000000 31042533773 976228928 977762701
+93126000000 93130601493 31042000000 31043533831 977228928 978762759
+93129000000 93133601612 31043000000 31044533870 978228928 979762798
+93132000000 93136601736 31044000000 31045533912 979228928 980762840
+93135000000 93139601955 31045000000 31046533985 980228928 981762913
+93138000000 93142602091 31046000000 31047534030 981228928 982762958
+93141000000 93145602242 31047000000 31048534080 982228928 983763008
+93144000000 93148602392 31048000000 31049534130 983228928 984763058
+93147000000 93151602507 31049000000 31050534169 984228928 985763097
+93150000000 93154602604 31050000000 31051534201 985228928 986763129
+93153000000 93157602812 31051000000 31052534270 986228928 987763198
+93156000000 93160602967 31052000000 31053534322 987228928 988763250
+93159000000 93163603126 31053000000 31054534375 988228928 989763303
+93162000000 93166603300 31054000000 31055534433 989228928 990763361
+93165000000 93169603400 31055000000 31056534466 990228928 991763394
+93168000000 93172603578 31056000000 31057534526 991228928 992763454
+93171000000 93175603727 31057000000 31058534575 992228928 993763503
+93174000000 93178603855 31058000000 31059534618 993228928 994763546
+93177000000 93181604024 31059000000 31060534674 994228928 995763602
+93180000000 93184604144 31060000000 31061534714 995228928 996763642
+93183000000 93186431494 31061000000 31062143831 996228928 997372759
+93186000000 93190604394 31062000000 31063534798 997228928 998763726
+93189000000 93193604652 31063000000 31064534884 998228928 999763812
+93192000000 93196604757 31064000000 31065534919 999228928 1000763847
+93195000000 93199604837 31065000000 31066534945 1000228928 1001763873
+93198000000 93202604984 31066000000 31067534994 1001228928 1002763922
+93201000000 93205605238 31067000000 31068535079 1002228928 1003764007
+93204000000 93208605328 31068000000 31069535109 1003228928 1004764037
+93207000000 93211605573 31069000000 31070535191 1004228928 1005764119
+93210000000 93214605651 31070000000 31071535217 1005228928 1006764145
+93213000000 93217605828 31071000000 31072535276 1006228928 1007764204
+93216000000 93220605974 31072000000 31073535324 1007228928 1008764252
+93219000000 93223606118 31073000000 31074535372 1008228928 1009764300
+93222000000 93225228772 31074000000 31075076257 1009228928 1010305185
+93225000000 93229606433 31075000000 31076535477 1010228928 1011764405
+93228000000 93232606593 31076000000 31077535531 1011228928 1012764459
+93231000000 93235606730 31077000000 31078535576 1012228928 1013764504
+93234000000 93238606888 31078000000 31079535629 1013228928 1014764557
+93237000000 93241607046 31079000000 31080535682 1014228928 1015764610
+93240000000 93244607160 31080000000 31081535720 1015228928 1016764648
+93243000000 93247607321 31081000000 31082535773 1016228928 1017764701
+93246000000 93250607448 31082000000 31083535816 1017228928 1018764744
+93249000000 93253607557 31083000000 31084535852 1018228928 1019764780
+93252000000 93256607699 31084000000 31085535899 1019228928 1020764827
+93255000000 93259607933 31085000000 31086535977 1020228928 1021764905
+93258000000 93262607846 31086000000 31087535948 1021228928 1022764876
+93261000000 93265607967 31087000000 31088535989 1022228928 1023764917
+93264000000 93268608075 31088000000 31089536025 1023228928 1024764953
+93267000000 93271608310 31089000000 31090536103 1024228928 1025765031
+93270000000 93274608489 31090000000 31091536163 1025228928 1026765091
+93273000000 93277522129 31091000000 31092507376 1026228928 1027736304
+93276000000 93280608758 31092000000 31093536252 1027228928 1028765180
+93279000000 93283608931 31093000000 31094536310 1028228928 1029765238
+93282000000 93286609047 31094000000 31095536349 1029228928 1030765277
+93285000000 93289609220 31095000000 31096536406 1030228928 1031765334
+93288000000 93292609392 31096000000 31097536464 1031228928 1032765392
+93291000000 93295609448 31097000000 31098536482 1032228928 1033765410
+93294000000 93298609594 31098000000 31099536531 1033228928 1034765459
+93297000000 93301609790 31099000000 31100536596 1034228928 1035765524
+93300000000 93304609819 31100000000 31101536606 1035228928 1036765534
+93303000000 93307610125 31101000000 31102536708 1036228928 1037765636
+93306000000 93310610297 31102000000 31103536765 1037228928 1038765693
+93309000000 93313610430 31103000000 31104536810 1038228928 1039765738
+93312000000 93316610547 31104000000 31105536849 1039228928 1040765777
+93315000000 93319610732 31105000000 31106536910 1040228928 1041765838
+93318000000 93322610838 31106000000 31107536946 1041228928 1042765874
+93321000000 93325611019 31107000000 31108537006 1042228928 1043765934
+93324000000 93328611231 31108000000 31109537077 1043228928 1044766005
+93327000000 93331611338 31109000000 31110537112 1044228928 1045766040
+93330000000 93334611504 31110000000 31111537168 1045228928 1046766096
+93333000000 93337210249 31111000000 31112403416 1046228928 1047632344
+93336000000 93340611775 31112000000 31113537258 1047228928 1048766186
+93339000000 93343611887 31113000000 31114537295 1048228928 1049766223
+93342000000 93346612096 31114000000 31115537365 1049228928 1050766293
+93345000000 93349612175 31115000000 31116537391 1050228928 1051766319
+93348000000 93352612400 31116000000 31117537466 1051228928 1052766394
+93351000000 93355612527 31117000000 31118537509 1052228928 1053766437
+93354000000 93358612616 31118000000 31119537538 1053228928 1054766466
+93357000000 93361612722 31119000000 31120537574 1054228928 1055766502
+93360000000 93364612933 31120000000 31121537644 1055228928 1056766572
+93363000000 93367613142 31121000000 31122537714 1056228928 1057766642
+93366000000 93370613287 31122000000 31123537762 1057228928 1058766690
+93369000000 93373613413 31123000000 31124537804 1058228928 1059766732
+93372000000 93376613579 31124000000 31125537859 1059228928 1060766787
+93375000000 93379613659 31125000000 31126537886 1060228928 1061766814
+93378000000 93382613894 31126000000 31127537964 1061228928 1062766892
+93381000000 93385614053 31127000000 31128538017 1062228928 1063766945
+93384000000 93388614174 31128000000 31129538058 1063228928 1064766986
+93387000000 93391614334 31129000000 31130538111 1064228928 1065767039
+93390000000 93394614417 31130000000 31131538139 1065228928 1066767067
+93393000000 93397614663 31131000000 31132538221 1066228928 1067767149
+93396000000 93400614786 31132000000 31133538262 1067228928 1068767190
+93399000000 93403614922 31133000000 31134538307 1068228928 1069767235
+93402000000 93406615097 31134000000 31135538365 1069228928 1070767293
+93405000000 93409615219 31135000000 31136538406 1070228928 1071767334
+93408000000 93412615369 31136000000 31137538456 1071228928 1072767384
+93411000000 93415615517 31137000000 31138538505 1072228928 1073767433
+93414000000 93417789211 31138000000 31139263070 1073228928 1074491998
+93417000000 93421615837 31139000000 31140538612 1074228928 1075767540
+93420000000 93424615969 31140000000 31141538656 1075228928 1076767584
+93423000000 93427616143 31141000000 31142538714 1076228928 1077767642
+93426000000 93430616262 31142000000 31143538754 1077228928 1078767682
+93429000000 93433616386 31143000000 31144538795 1078228928 1079767723
+93432000000 93436616605 31144000000 31145538868 1079228928 1080767796
+93435000000 93439616741 31145000000 31146538913 1080228928 1081767841
+93438000000 93442616892 31146000000 31147538964 1081228928 1082767892
+93441000000 93445617042 31147000000 31148539014 1082228928 1083767942
+93444000000 93448617157 31148000000 31149539052 1083228928 1084767980
+93447000000 93451617254 31149000000 31150539084 1084228928 1085768012
+93450000000 93454617462 31150000000 31151539154 1085228928 1086768082
+93453000000 93457617617 31151000000 31152539205 1086228928 1087768133
+93456000000 93460617776 31152000000 31153539258 1087228928 1088768186
+93459000000 93463617950 31153000000 31154539316 1088228928 1089768244
+93462000000 93466618050 31154000000 31155539350 1089228928 1090768278
+93465000000 93469618228 31155000000 31156539409 1090228928 1091768337
+93468000000 93472618377 31156000000 31157539459 1091228928 1092768387
+93471000000 93475618505 31157000000 31158539501 1092228928 1093768429
+93474000000 93478618674 31158000000 31159539558 1093228928 1094768486
+93477000000 93481618794 31159000000 31160539598 1094228928 1095768526
+93480000000 93483446144 31160000000 31161148714 1095228928 1096377642
+93483000000 93487619044 31161000000 31162539681 1096228928 1097768609
+93486000000 93490619302 31162000000 31163539767 1097228928 1098768695
+93489000000 93493619407 31163000000 31164539802 1098228928 1099768730
+93492000000 93496619487 31164000000 31165539829 1099228928 1100768757
+93495000000 93499619634 31165000000 31166539878 1100228928 1101768806
+93498000000 93502619888 31166000000 31167539962 1101228928 1102768890
+93501000000 93505619978 31167000000 31168539992 1102228928 1103768920
+93504000000 93508620223 31168000000 31169540074 1103228928 1104769002
+93507000000 93511620301 31169000000 31170540100 1104228928 1105769028
+93510000000 93514620478 31170000000 31171540159 1105228928 1106769087
+93513000000 93517620624 31171000000 31172540208 1106228928 1107769136
+93516000000 93520620768 31172000000 31173540256 1107228928 1108769184
+93519000000 93522243422 31173000000 31174081140 1108228928 1109310068
+93522000000 93526621083 31174000000 31175540361 1109228928 1110769289
+93525000000 93529621243 31175000000 31176540414 1110228928 1111769342
+93528000000 93532621380 31176000000 31177540460 1111228928 1112769388
+93531000000 93535621538 31177000000 31178540512 1112228928 1113769440
+93534000000 93538621696 31178000000 31179540565 1113228928 1114769493
+93537000000 93541621810 31179000000 31180540603 1114228928 1115769531
+93540000000 93544621971 31180000000 31181540657 1115228928 1116769585
+93543000000 93547622098 31181000000 31182540699 1116228928 1117769627
+93546000000 93550622207 31182000000 31183540735 1117228928 1118769663
+93549000000 93553622349 31183000000 31184540783 1118228928 1119769711
+93552000000 93556622583 31184000000 31185540861 1119228928 1120769789
+93555000000 93559622496 31185000000 31186540832 1120228928 1121769760
+93558000000 93562622617 31186000000 31187540872 1121228928 1122769800
+93561000000 93565622725 31187000000 31188540908 1122228928 1123769836
+93564000000 93568622960 31188000000 31189540986 1123228928 1124769914
+93567000000 93571623139 31189000000 31190541046 1124228928 1125769974
+93570000000 93574536779 31190000000 31191512259 1125228928 1126741187
+93573000000 93577623408 31191000000 31192541136 1126228928 1127770064
+93576000000 93580623581 31192000000 31193541193 1127228928 1128770121
+93579000000 93583623697 31193000000 31194541232 1128228928 1129770160
+93582000000 93586623870 31194000000 31195541290 1129228928 1130770218
+93585000000 93589624042 31195000000 31196541347 1130228928 1131770275
+93588000000 93592624098 31196000000 31197541366 1131228928 1132770294
+93591000000 93595624244 31197000000 31198541414 1132228928 1133770342
+93594000000 93598624440 31198000000 31199541480 1133228928 1134770408
+93597000000 93601624469 31199000000 31200541489 1134228928 1135770417
+93600000000 93604624775 31200000000 31201541591 1135228928 1136770519
+93603000000 93607624947 31201000000 31202541649 1136228928 1137770577
+93606000000 93610625080 31202000000 31203541693 1137228928 1138770621
+93609000000 93613625197 31203000000 31204541732 1138228928 1139770660
+93612000000 93616625382 31204000000 31205541794 1139228928 1140770722
+93615000000 93619625488 31205000000 31206541829 1140228928 1141770757
+93618000000 93622625669 31206000000 31207541889 1141228928 1142770817
+93621000000 93625625881 31207000000 31208541960 1142228928 1143770888
+93624000000 93628625988 31208000000 31209541996 1143228928 1144770924
+93627000000 93631626154 31209000000 31210542051 1144228928 1145770979
+93630000000 93634224899 31210000000 31211408299 1145228928 1146637227
+93633000000 93637626425 31211000000 31212542141 1146228928 1147771069
+93636000000 93640626537 31212000000 31213542179 1147228928 1148771107
+93639000000 93643626746 31213000000 31214542248 1148228928 1149771176
+93642000000 93646626825 31214000000 31215542275 1149228928 1150771203
+93645000000 93649627050 31215000000 31216542350 1150228928 1151771278
+93648000000 93652627177 31216000000 31217542392 1151228928 1152771320
+93651000000 93655627266 31217000000 31218542422 1152228928 1153771350
+93654000000 93658627372 31218000000 31219542457 1153228928 1154771385
+93657000000 93661627583 31219000000 31220542527 1154228928 1155771455
+93660000000 93664627792 31220000000 31221542597 1155228928 1156771525
+93663000000 93667627937 31221000000 31222542645 1156228928 1157771573
+93666000000 93670628063 31222000000 31223542687 1157228928 1158771615
+93669000000 93673628229 31223000000 31224542743 1158228928 1159771671
+93672000000 93676628309 31224000000 31225542769 1159228928 1160771697
+93675000000 93679628544 31225000000 31226542848 1160228928 1161771776
+93678000000 93682628703 31226000000 31227542901 1161228928 1162771829
+93681000000 93685628824 31227000000 31228542941 1162228928 1163771869
+93684000000 93688628984 31228000000 31229542994 1163228928 1164771922
+93687000000 93691629067 31229000000 31230543022 1164228928 1165771950
+93690000000 93694629313 31230000000 31231543104 1165228928 1166772032
+93693000000 93697629436 31231000000 31232543145 1166228928 1167772073
+93696000000 93700629572 31232000000 31233543190 1167228928 1168772118
+93699000000 93703629747 31233000000 31234543249 1168228928 1169772177
+93702000000 93706629869 31234000000 31235543289 1169228928 1170772217
+93705000000 93709630019 31235000000 31236543339 1170228928 1171772267
+93708000000 93712630167 31236000000 31237543389 1171228928 1172772317
+93711000000 93714803861 31237000000 31238267953 1172228928 1173496881
+93714000000 93718630487 31238000000 31239543495 1173228928 1174772423
+93717000000 93721630619 31239000000 31240543539 1174228928 1175772467
+93720000000 93724630793 31240000000 31241543597 1175228928 1176772525
+93723000000 93727630912 31241000000 31242543637 1176228928 1177772565
+93726000000 93730631036 31242000000 31243543678 1177228928 1178772606
+93729000000 93733631255 31243000000 31244543751 1178228928 1179772679
+93732000000 93736631391 31244000000 31245543797 1179228928 1180772725
+93735000000 93739631542 31245000000 31246543847 1180228928 1181772775
+93738000000 93742631692 31246000000 31247543897 1181228928 1182772825
+93741000000 93745631807 31247000000 31248543935 1182228928 1183772863
+93744000000 93748631904 31248000000 31249543968 1183228928 1184772896
+93747000000 93751632112 31249000000 31250544037 1184228928 1185772965
+93750000000 93754632267 31250000000 31251544089 1185228928 1186773017
+93753000000 93757632426 31251000000 31252544142 1186228928 1187773070
+93756000000 93760632600 31252000000 31253544200 1187228928 1188773128
+93759000000 93763632700 31253000000 31254544233 1188228928 1189773161
+93762000000 93766632878 31254000000 31255544292 1189228928 1190773220
+93765000000 93769633027 31255000000 31256544342 1190228928 1191773270
+93768000000 93772633155 31256000000 31257544385 1191228928 1192773313
+93771000000 93775633324 31257000000 31258544441 1192228928 1193773369
+93774000000 93778633444 31258000000 31259544481 1193228928 1194773409
+93777000000 93780460794 31259000000 31260153598 1194228928 1195382526
+93780000000 93784633694 31260000000 31261544564 1195228928 1196773492
+93783000000 93787633952 31261000000 31262544650 1196228928 1197773578
+93786000000 93790634057 31262000000 31263544685 1197228928 1198773613
+93789000000 93793634137 31263000000 31264544712 1198228928 1199773640
+93792000000 93796634284 31264000000 31265544761 1199228928 1200773689
+93795000000 93799634538 31265000000 31266544846 1200228928 1201773774
+93798000000 93802634628 31266000000 31267544876 1201228928 1202773804
+93801000000 93805634873 31267000000 31268544957 1202228928 1203773885
+93804000000 93808634951 31268000000 31269544983 1203228928 1204773911
+93807000000 93811635128 31269000000 31270545042 1204228928 1205773970
+93810000000 93814635274 31270000000 31271545091 1205228928 1206774019
+93813000000 93817635418 31271000000 31272545139 1206228928 1207774067
+93816000000 93819258072 31272000000 31273086024 1207228928 1208314952
+93819000000 93823635733 31273000000 31274545244 1208228928 1209774172
+93822000000 93826635893 31274000000 31275545297 1209228928 1210774225
+93825000000 93829636030 31275000000 31276545343 1210228928 1211774271
+93828000000 93832636188 31276000000 31277545396 1211228928 1212774324
+93831000000 93835636346 31277000000 31278545448 1212228928 1213774376
+93834000000 93838636460 31278000000 31279545486 1213228928 1214774414
+93837000000 93841636621 31279000000 31280545540 1214228928 1215774468
+93840000000 93844636748 31280000000 31281545582 1215228928 1216774510
+93843000000 93847636857 31281000000 31282545619 1216228928 1217774547
+93846000000 93850636999 31282000000 31283545666 1217228928 1218774594
+93849000000 93853637233 31283000000 31284545744 1218228928 1219774672
+93852000000 93856637146 31284000000 31285545715 1219228928 1220774643
+93855000000 93859637267 31285000000 31286545755 1220228928 1221774683
+93858000000 93862637375 31286000000 31287545791 1221228928 1222774719
+93861000000 93865637610 31287000000 31288545870 1222228928 1223774798
+93864000000 93868637789 31288000000 31289545929 1223228928 1224774857
+93867000000 93871551429 31289000000 31290517143 1224228928 1225746071
+93870000000 93874638058 31290000000 31291546019 1225228928 1226774947
+93873000000 93877638231 31291000000 31292546077 1226228928 1227775005
+93876000000 93880638347 31292000000 31293546115 1227228928 1228775043
+93879000000 93883638520 31293000000 31294546173 1228228928 1229775101
+93882000000 93886638692 31294000000 31295546230 1229228928 1230775158
+93885000000 93889638748 31295000000 31296546249 1230228928 1231775177
+93888000000 93892638894 31296000000 31297546298 1231228928 1232775226
+93891000000 93895639090 31297000000 31298546363 1232228928 1233775291
+93894000000 93898639119 31298000000 31299546373 1233228928 1234775301
+93897000000 93901639425 31299000000 31300546475 1234228928 1235775403
+93900000000 93904639597 31300000000 31301546532 1235228928 1236775460
+93903000000 93907639730 31301000000 31302546576 1236228928 1237775504
+93906000000 93910639847 31302000000 31303546615 1237228928 1238775543
+93909000000 93913640032 31303000000 31304546677 1238228928 1239775605
+93912000000 93916640138 31304000000 31305546712 1239228928 1240775640
+93915000000 93919640319 31305000000 31306546773 1240228928 1241775701
+93918000000 93922640531 31306000000 31307546843 1241228928 1242775771
+93921000000 93925640638 31307000000 31308546879 1242228928 1243775807
+93924000000 93928640804 31308000000 31309546934 1243228928 1244775862
+93927000000 93931239549 31309000000 31310413183 1244228928 1245642111
+93930000000 93934641075 31310000000 31311547025 1245228928 1246775953
+93933000000 93937641187 31311000000 31312547062 1246228928 1247775990
+93936000000 93940641396 31312000000 31313547132 1247228928 1248776060
+93939000000 93943641475 31313000000 31314547158 1248228928 1249776086
+93942000000 93946641700 31314000000 31315547233 1249228928 1250776161
+93945000000 93949641827 31315000000 31316547275 1250228928 1251776203
+93948000000 93952641916 31316000000 31317547305 1251228928 1252776233
+93951000000 93955642022 31317000000 31318547340 1252228928 1253776268
+93954000000 93958642233 31318000000 31319547411 1253228928 1254776339
+93957000000 93961642442 31319000000 31320547480 1254228928 1255776408
+93960000000 93964642587 31320000000 31321547529 1255228928 1256776457
+93963000000 93967642713 31321000000 31322547571 1256228928 1257776499
+93966000000 93970642879 31322000000 31323547626 1257228928 1258776554
+93969000000 93973642959 31323000000 31324547653 1258228928 1259776581
+93972000000 93976643194 31324000000 31325547731 1259228928 1260776659
+93975000000 93979643353 31325000000 31326547784 1260228928 1261776712
+93978000000 93982643474 31326000000 31327547824 1261228928 1262776752
+93981000000 93985643634 31327000000 31328547878 1262228928 1263776806
+93984000000 93988643717 31328000000 31329547905 1263228928 1264776833
+93987000000 93991643963 31329000000 31330547987 1264228928 1265776915
+93990000000 93994644086 31330000000 31331548028 1265228928 1266776956
+93993000000 93997644222 31331000000 31332548074 1266228928 1267777002
+93996000000 94000644397 31332000000 31333548132 1267228928 1268777060
+93999000000 94003644519 31333000000 31334548173 1268228928 1269777101
+94002000000 94006644669 31334000000 31335548223 1269228928 1270777151
+94005000000 94009644817 31335000000 31336548272 1270228928 1271777200
+94008000000 94011818511 31336000000 31337272837 1271228928 1272501765
+94011000000 94015645137 31337000000 31338548379 1272228928 1273777307
+94014000000 94018645269 31338000000 31339548423 1273228928 1274777351
+94017000000 94021645443 31339000000 31340548481 1274228928 1275777409
+94020000000 94024645562 31340000000 31341548520 1275228928 1276777448
+94023000000 94027645686 31341000000 31342548562 1276228928 1277777490
+94026000000 94030645905 31342000000 31343548635 1277228928 1278777563
+94029000000 94033646041 31343000000 31344548680 1278228928 1279777608
+94032000000 94036646192 31344000000 31345548730 1279228928 1280777658
+94035000000 94039646342 31345000000 31346548780 1280228928 1281777708
+94038000000 94042646457 31346000000 31347548819 1281228928 1282777747
+94041000000 94045646554 31347000000 31348548851 1282228928 1283777779
+94044000000 94048646762 31348000000 31349548920 1283228928 1284777848
+94047000000 94051646917 31349000000 31350548972 1284228928 1285777900
+94050000000 94054647076 31350000000 31351549025 1285228928 1286777953
+94053000000 94057647250 31351000000 31352549083 1286228928 1287778011
+94056000000 94060647350 31352000000 31353549116 1287228928 1288778044
+94059000000 94063647528 31353000000 31354549176 1288228928 1289778104
+94062000000 94066647677 31354000000 31355549225 1289228928 1290778153
+94065000000 94069647805 31355000000 31356549268 1290228928 1291778196
+94068000000 94072647974 31356000000 31357549324 1291228928 1292778252
+94071000000 94075648094 31357000000 31358549364 1292228928 1293778292
+94074000000 94077475444 31358000000 31359158481 1293228928 1294387409
+94077000000 94081648344 31359000000 31360549448 1294228928 1295778376
+94080000000 94084648602 31360000000 31361549534 1295228928 1296778462
+94083000000 94087648707 31361000000 31362549569 1296228928 1297778497
+94086000000 94090648787 31362000000 31363549595 1297228928 1298778523
+94089000000 94093648934 31363000000 31364549644 1298228928 1299778572
+94092000000 94096649188 31364000000 31365549729 1299228928 1300778657
+94095000000 94099649278 31365000000 31366549759 1300228928 1301778687
+94098000000 94102649523 31366000000 31367549841 1301228928 1302778769
+94101000000 94105649601 31367000000 31368549867 1302228928 1303778795
+94104000000 94108649778 31368000000 31369549926 1303228928 1304778854
+94107000000 94111649924 31369000000 31370549974 1304228928 1305778902
+94110000000 94114650068 31370000000 31371550022 1305228928 1306778950
+94113000000 94116272722 31371000000 31372090907 1306228928 1307319835
+94116000000 94120650383 31372000000 31373550127 1307228928 1308779055
+94119000000 94123650543 31373000000 31374550181 1308228928 1309779109
+94122000000 94126650680 31374000000 31375550226 1309228928 1310779154
+94125000000 94129650838 31375000000 31376550279 1310228928 1311779207
+94128000000 94132650996 31376000000 31377550332 1311228928 1312779260
+94131000000 94135651110 31377000000 31378550370 1312228928 1313779298
+94134000000 94138651271 31378000000 31379550423 1313228928 1314779351
+94137000000 94141651398 31379000000 31380550466 1314228928 1315779394
+94140000000 94144651507 31380000000 31381550502 1315228928 1316779430
+94143000000 94147651649 31381000000 31382550549 1316228928 1317779477
+94146000000 94150651883 31382000000 31383550627 1317228928 1318779555
+94149000000 94153651796 31383000000 31384550598 1318228928 1319779526
+94152000000 94156651917 31384000000 31385550639 1319228928 1320779567
+94155000000 94159652025 31385000000 31386550675 1320228928 1321779603
+94158000000 94162652260 31386000000 31387550753 1321228928 1322779681
+94161000000 94165652439 31387000000 31388550813 1322228928 1323779741
+94164000000 94168566079 31388000000 31389522026 1323228928 1324750954
+94167000000 94171652708 31389000000 31390550902 1324228928 1325779830
+94170000000 94174652881 31390000000 31391550960 1325228928 1326779888
+94173000000 94177652997 31391000000 31392550999 1326228928 1327779927
+94176000000 94180653170 31392000000 31393551056 1327228928 1328779984
+94179000000 94183653342 31393000000 31394551114 1328228928 1329780042
+94182000000 94186653398 31394000000 31395551132 1329228928 1330780060
+94185000000 94189653544 31395000000 31396551181 1330228928 1331780109
+94188000000 94192653740 31396000000 31397551246 1331228928 1332780174
+94191000000 94195653769 31397000000 31398551256 1332228928 1333780184
+94194000000 94198654075 31398000000 31399551358 1333228928 1334780286
+94197000000 94201654247 31399000000 31400551415 1334228928 1335780343
+94200000000 94204654380 31400000000 31401551460 1335228928 1336780388
+94203000000 94207654497 31401000000 31402551499 1336228928 1337780427
+94206000000 94210654682 31402000000 31403551560 1337228928 1338780488
+94209000000 94213654788 31403000000 31404551596 1338228928 1339780524
+94212000000 94216654969 31404000000 31405551656 1339228928 1340780584
+94215000000 94219655181 31405000000 31406551727 1340228928 1341780655
+94218000000 94222655288 31406000000 31407551762 1341228928 1342780690
+94221000000 94225655454 31407000000 31408551818 1342228928 1343780746
+94224000000 94228254199 31408000000 31409418066 1343228928 1344646994
+94227000000 94231655725 31409000000 31410551908 1344228928 1345780836
+94230000000 94234655837 31410000000 31411551945 1345228928 1346780873
+94233000000 94237656046 31411000000 31412552015 1346228928 1347780943
+94236000000 94240656125 31412000000 31413552041 1347228928 1348780969
+94239000000 94243656350 31413000000 31414552116 1348228928 1349781044
+94242000000 94246656477 31414000000 31415552159 1349228928 1350781087
+94245000000 94249656566 31415000000 31416552188 1350228928 1351781116
+94248000000 94252656672 31416000000 31417552224 1351228928 1352781152
+94251000000 94255656883 31417000000 31418552294 1352228928 1353781222
+94254000000 94258657092 31418000000 31419552364 1353228928 1354781292
+94257000000 94261657237 31419000000 31420552412 1354228928 1355781340
+94260000000 94264657363 31420000000 31421552454 1355228928 1356781382
+94263000000 94267657529 31421000000 31422552509 1356228928 1357781437
+94266000000 94270657609 31422000000 31423552536 1357228928 1358781464
+94269000000 94273657844 31423000000 31424552614 1358228928 1359781542
+94272000000 94276658003 31424000000 31425552667 1359228928 1360781595
+94275000000 94279658124 31425000000 31426552708 1360228928 1361781636
+94278000000 94282658284 31426000000 31427552761 1361228928 1362781689
+94281000000 94285658367 31427000000 31428552789 1362228928 1363781717
+94284000000 94288658613 31428000000 31429552871 1363228928 1364781799
+94287000000 94291658736 31429000000 31430552912 1364228928 1365781840
+94290000000 94294658872 31430000000 31431552957 1365228928 1366781885
+94293000000 94297659047 31431000000 31432553015 1366228928 1367781943
+94296000000 94300659169 31432000000 31433553056 1367228928 1368781984
+94299000000 94303659319 31433000000 31434553106 1368228928 1369782034
+94302000000 94306659467 31434000000 31435553155 1369228928 1370782083
+94305000000 94308833161 31435000000 31436277720 1370228928 1371506648
+94308000000 94312659787 31436000000 31437553262 1371228928 1372782190
+94311000000 94315659919 31437000000 31438553306 1372228928 1373782234
+94314000000 94318660093 31438000000 31439553364 1373228928 1374782292
+94317000000 94321660212 31439000000 31440553404 1374228928 1375782332
+94320000000 94324660336 31440000000 31441553445 1375228928 1376782373
+94323000000 94327660555 31441000000 31442553518 1376228928 1377782446
+94326000000 94330660691 31442000000 31443553563 1377228928 1378782491
+94329000000 94333660842 31443000000 31444553614 1378228928 1379782542
+94332000000 94336660992 31444000000 31445553664 1379228928 1380782592
+94335000000 94339661107 31445000000 31446553702 1380228928 1381782630
+94338000000 94342661204 31446000000 31447553734 1381228928 1382782662
+94341000000 94345661412 31447000000 31448553804 1382228928 1383782732
+94344000000 94348661567 31448000000 31449553855 1383228928 1384782783
+94347000000 94351661726 31449000000 31450553908 1384228928 1385782836
+94350000000 94354661900 31450000000 31451553966 1385228928 1386782894
+94353000000 94357662000 31451000000 31452554000 1386228928 1387782928
+94356000000 94360662178 31452000000 31453554059 1387228928 1388782987
+94359000000 94363662327 31453000000 31454554109 1388228928 1389783037
+94362000000 94366662455 31454000000 31455554151 1389228928 1390783079
+94365000000 94369662624 31455000000 31456554208 1390228928 1391783136
+94368000000 94372662744 31456000000 31457554248 1391228928 1392783176
+94371000000 94374490094 31457000000 31458163364 1392228928 1393392292
+94374000000 94378662994 31458000000 31459554331 1393228928 1394783259
+94377000000 94381663252 31459000000 31460554417 1394228928 1395783345
+94380000000 94384663357 31460000000 31461554452 1395228928 1396783380
+94383000000 94387663437 31461000000 31462554479 1396228928 1397783407
+94386000000 94390663584 31462000000 31463554528 1397228928 1398783456
+94389000000 94393663838 31463000000 31464554612 1398228928 1399783540
+94392000000 94396663928 31464000000 31465554642 1399228928 1400783570
+94395000000 94399664173 31465000000 31466554724 1400228928 1401783652
+94398000000 94402664251 31466000000 31467554750 1401228928 1402783678
+94401000000 94405664428 31467000000 31468554809 1402228928 1403783737
+94404000000 94408664574 31468000000 31469554858 1403228928 1404783786
+94407000000 94411664718 31469000000 31470554906 1404228928 1405783834
+94410000000 94413287372 31470000000 31471095790 1405228928 1406324718
+94413000000 94417665033 31471000000 31472555011 1406228928 1407783939
+94416000000 94420665193 31472000000 31473555064 1407228928 1408783992
+94419000000 94423665330 31473000000 31474555110 1408228928 1409784038
+94422000000 94426665488 31474000000 31475555162 1409228928 1410784090
+94425000000 94429665646 31475000000 31476555215 1410228928 1411784143
+94428000000 94432665760 31476000000 31477555253 1411228928 1412784181
+94431000000 94435665921 31477000000 31478555307 1412228928 1413784235
+94434000000 94438666048 31478000000 31479555349 1413228928 1414784277
+94437000000 94441666157 31479000000 31480555385 1414228928 1415784313
+94440000000 94444666299 31480000000 31481555433 1415228928 1416784361
+94443000000 94447666533 31481000000 31482555511 1416228928 1417784439
+94446000000 94450666446 31482000000 31483555482 1417228928 1418784410
+94449000000 94453666567 31483000000 31484555522 1418228928 1419784450
+94452000000 94456666675 31484000000 31485555558 1419228928 1420784486
+94455000000 94459666910 31485000000 31486555636 1420228928 1421784564
+94458000000 94462667089 31486000000 31487555696 1421228928 1422784624
+94461000000 94465580729 31487000000 31488526909 1422228928 1423755837
+94464000000 94468667358 31488000000 31489555786 1423228928 1424784714
+94467000000 94471667531 31489000000 31490555843 1424228928 1425784771
+94470000000 94474667647 31490000000 31491555882 1425228928 1426784810
+94473000000 94477667820 31491000000 31492555940 1426228928 1427784868
+94476000000 94480667992 31492000000 31493555997 1427228928 1428784925
+94479000000 94483668048 31493000000 31494556016 1428228928 1429784944
+94482000000 94486668194 31494000000 31495556064 1429228928 1430784992
+94485000000 94489668390 31495000000 31496556130 1430228928 1431785058
+94488000000 94492668419 31496000000 31497556139 1431228928 1432785067
+94491000000 94495668725 31497000000 31498556241 1432228928 1433785169
+94494000000 94498668897 31498000000 31499556299 1433228928 1434785227
+94497000000 94501669030 31499000000 31500556343 1434228928 1435785271
+94500000000 94504669147 31500000000 31501556382 1435228928 1436785310
+94503000000 94507669332 31501000000 31502556444 1436228928 1437785372
+94506000000 94510669438 31502000000 31503556479 1437228928 1438785407
+94509000000 94513669619 31503000000 31504556539 1438228928 1439785467
+94512000000 94516669831 31504000000 31505556610 1439228928 1440785538
+94515000000 94519669938 31505000000 31506556646 1440228928 1441785574
+94518000000 94522670104 31506000000 31507556701 1441228928 1442785629
+94521000000 94525268849 31507000000 31508422949 1442228928 1443651877
+94524000000 94528670375 31508000000 31509556791 1443228928 1444785719
+94527000000 94531670487 31509000000 31510556829 1444228928 1445785757
+94530000000 94534670696 31510000000 31511556898 1445228928 1446785826
+94533000000 94537670775 31511000000 31512556925 1446228928 1447785853
+94536000000 94540671000 31512000000 31513557000 1447228928 1448785928
+94539000000 94543671127 31513000000 31514557042 1448228928 1449785970
+94542000000 94546671216 31514000000 31515557072 1449228928 1450786000
+94545000000 94549671322 31515000000 31516557107 1450228928 1451786035
+94548000000 94552671533 31516000000 31517557177 1451228928 1452786105
+94551000000 94555671742 31517000000 31518557247 1452228928 1453786175
+94554000000 94558671887 31518000000 31519557295 1453228928 1454786223
+94557000000 94561672013 31519000000 31520557337 1454228928 1455786265
+94560000000 94564672179 31520000000 31521557393 1455228928 1456786321
+94563000000 94567672259 31521000000 31522557419 1456228928 1457786347
+94566000000 94570672494 31522000000 31523557498 1457228928 1458786426
+94569000000 94573672653 31523000000 31524557551 1458228928 1459786479
+94572000000 94576672774 31524000000 31525557591 1459228928 1460786519
+94575000000 94579672934 31525000000 31526557644 1460228928 1461786572
+94578000000 94582673017 31526000000 31527557672 1461228928 1462786600
+94581000000 94585673263 31527000000 31528557754 1462228928 1463786682
+94584000000 94588673386 31528000000 31529557795 1463228928 1464786723
+94587000000 94591673522 31529000000 31530557840 1464228928 1465786768
+94590000000 94594673697 31530000000 31531557899 1465228928 1466786827
+94593000000 94597673819 31531000000 31532557939 1466228928 1467786867
+94596000000 94600673969 31532000000 31533557989 1467228928 1468786917
+94599000000 94603674117 31533000000 31534558039 1468228928 1469786967
+94602000000 94605847811 31534000000 31535282603 1469228928 1470511531
+94605000000 94609674437 31535000000 31536558145 1470228928 1471787073
+94608000000 94612674569 31536000000 31537558189 1471228928 1472787117
+94611000000 94615674743 31537000000 31538558247 1472228928 1473787175
+94614000000 94618674862 31538000000 31539558287 1473228928 1474787215
+94617000000 94621674986 31539000000 31540558328 1474228928 1475787256
+94620000000 94624675205 31540000000 31541558401 1475228928 1476787329
+94623000000 94627675341 31541000000 31542558447 1476228928 1477787375
+94626000000 94630675492 31542000000 31543558497 1477228928 1478787425
+94629000000 94633675642 31543000000 31544558547 1478228928 1479787475
+94632000000 94636675757 31544000000 31545558585 1479228928 1480787513
+94635000000 94639675854 31545000000 31546558618 1480228928 1481787546
+94638000000 94642676062 31546000000 31547558687 1481228928 1482787615
+94641000000 94645676217 31547000000 31548558739 1482228928 1483787667
+94644000000 94648676376 31548000000 31549558792 1483228928 1484787720
+94647000000 94651676550 31549000000 31550558850 1484228928 1485787778
+94650000000 94654676650 31550000000 31551558883 1485228928 1486787811
+94653000000 94657676828 31551000000 31552558942 1486228928 1487787870
+94656000000 94660676977 31552000000 31553558992 1487228928 1488787920
+94659000000 94663677105 31553000000 31554559035 1488228928 1489787963
+94662000000 94666677274 31554000000 31555559091 1489228928 1490788019
+94665000000 94669677394 31555000000 31556559131 1490228928 1491788059
+94668000000 94671504744 31556000000 31557168248 1491228928 1492397176
+94671000000 94675677644 31557000000 31558559214 1492228928 1493788142
+94674000000 94678677902 31558000000 31559559300 1493228928 1494788228
+94677000000 94681678007 31559000000 31560559335 1494228928 1495788263
+94680000000 94684678087 31560000000 31561559362 1495228928 1496788290
+94683000000 94687678234 31561000000 31562559411 1496228928 1497788339
+94686000000 94690678488 31562000000 31563559496 1497228928 1498788424
+94689000000 94693678578 31563000000 31564559526 1498228928 1499788454
+94692000000 94696678823 31564000000 31565559607 1499228928 1500788535
+94695000000 94699678901 31565000000 31566559633 1500228928 1501788561
+94698000000 94702679078 31566000000 31567559692 1501228928 1502788620
+94701000000 94705679224 31567000000 31568559741 1502228928 1503788669
+94704000000 94708679368 31568000000 31569559789 1503228928 1504788717
+94707000000 94710302022 31569000000 31570100674 1504228928 1505329602
+94710000000 94714679683 31570000000 31571559894 1505228928 1506788822
+94713000000 94717679843 31571000000 31572559947 1506228928 1507788875
+94716000000 94720679980 31572000000 31573559993 1507228928 1508788921
+94719000000 94723680138 31573000000 31574560046 1508228928 1509788974
+94722000000 94726680296 31574000000 31575560098 1509228928 1510789026
+94725000000 94729680410 31575000000 31576560136 1510228928 1511789064
+94728000000 94732680571 31576000000 31577560190 1511228928 1512789118
+94731000000 94735680698 31577000000 31578560232 1512228928 1513789160
+94734000000 94738680807 31578000000 31579560269 1513228928 1514789197
+94737000000 94741680949 31579000000 31580560316 1514228928 1515789244
+94740000000 94744681183 31580000000 31581560394 1515228928 1516789322
+94743000000 94747681096 31581000000 31582560365 1516228928 1517789293
+94746000000 94750681217 31582000000 31583560405 1517228928 1518789333
+94749000000 94753681325 31583000000 31584560441 1518228928 1519789369
+94752000000 94756681560 31584000000 31585560520 1519228928 1520789448
+94755000000 94759681739 31585000000 31586560579 1520228928 1521789507
+94758000000 94762595379 31586000000 31587531793 1521228928 1522760721
+94761000000 94765682008 31587000000 31588560669 1522228928 1523789597
+94764000000 94768682181 31588000000 31589560727 1523228928 1524789655
+94767000000 94771682297 31589000000 31590560765 1524228928 1525789693
+94770000000 94774682470 31590000000 31591560823 1525228928 1526789751
+94773000000 94777682642 31591000000 31592560880 1526228928 1527789808
+94776000000 94780682698 31592000000 31593560899 1527228928 1528789827
+94779000000 94783682844 31593000000 31594560948 1528228928 1529789876
+94782000000 94786683040 31594000000 31595561013 1529228928 1530789941
+94785000000 94789683069 31595000000 31596561023 1530228928 1531789951
+94788000000 94792683375 31596000000 31597561125 1531228928 1532790053
+94791000000 94795683547 31597000000 31598561182 1532228928 1533790110
+94794000000 94798683680 31598000000 31599561226 1533228928 1534790154
+94797000000 94801683797 31599000000 31600561265 1534228928 1535790193
+94800000000 94804683982 31600000000 31601561327 1535228928 1536790255
+94803000000 94807684088 31601000000 31602561362 1536228928 1537790290
+94806000000 94810684269 31602000000 31603561423 1537228928 1538790351
+94809000000 94813684481 31603000000 31604561493 1538228928 1539790421
+94812000000 94816684588 31604000000 31605561529 1539228928 1540790457
+94815000000 94819684754 31605000000 31606561584 1540228928 1541790512
+94818000000 94822283499 31606000000 31607427833 1541228928 1542656761
+94821000000 94825685025 31607000000 31608561675 1542228928 1543790603
+94824000000 94828685137 31608000000 31609561712 1543228928 1544790640
+94827000000 94831685346 31609000000 31610561782 1544228928 1545790710
+94830000000 94834685425 31610000000 31611561808 1545228928 1546790736
+94833000000 94837685650 31611000000 31612561883 1546228928 1547790811
+94836000000 94840685777 31612000000 31613561925 1547228928 1548790853
+94839000000 94843685866 31613000000 31614561955 1548228928 1549790883
+94842000000 94846685972 31614000000 31615561990 1549228928 1550790918
+94845000000 94849686183 31615000000 31616562061 1550228928 1551790989
+94848000000 94852686392 31616000000 31617562130 1551228928 1552791058
+94851000000 94855686537 31617000000 31618562179 1552228928 1553791107
+94854000000 94858686663 31618000000 31619562221 1553228928 1554791149
+94857000000 94861686829 31619000000 31620562276 1554228928 1555791204
+94860000000 94864686909 31620000000 31621562303 1555228928 1556791231
+94863000000 94867687144 31621000000 31622562381 1556228928 1557791309
+94866000000 94870687303 31622000000 31623562434 1557228928 1558791362
+94869000000 94873687424 31623000000 31624562474 1558228928 1559791402
+94872000000 94876687584 31624000000 31625562528 1559228928 1560791456
+94875000000 94879687667 31625000000 31626562555 1560228928 1561791483
+94878000000 94882687913 31626000000 31627562637 1561228928 1562791565
+94881000000 94885688036 31627000000 31628562678 1562228928 1563791606
+94884000000 94888688172 31628000000 31629562724 1563228928 1564791652
+94887000000 94891688347 31629000000 31630562782 1564228928 1565791710
+94890000000 94894688469 31630000000 31631562823 1565228928 1566791751
+94893000000 94897688619 31631000000 31632562873 1566228928 1567791801
+94896000000 94900688767 31632000000 31633562922 1567228928 1568791850
+94899000000 94902862461 31633000000 31634287487 1568228928 1569516415
+94902000000 94906689087 31634000000 31635563029 1569228928 1570791957
+94905000000 94909689219 31635000000 31636563073 1570228928 1571792001
+94908000000 94912689393 31636000000 31637563131 1571228928 1572792059
+94911000000 94915689512 31637000000 31638563170 1572228928 1573792098
+94914000000 94918689636 31638000000 31639563212 1573228928 1574792140
+94917000000 94921689855 31639000000 31640563285 1574228928 1575792213
+94920000000 94924689991 31640000000 31641563330 1575228928 1576792258
+94923000000 94927690142 31641000000 31642563380 1576228928 1577792308
+94926000000 94930690292 31642000000 31643563430 1577228928 1578792358
+94929000000 94933690407 31643000000 31644563469 1578228928 1579792397
+94932000000 94936690504 31644000000 31645563501 1579228928 1580792429
+94935000000 94939690712 31645000000 31646563570 1580228928 1581792498
+94938000000 94942690867 31646000000 31647563622 1581228928 1582792550
+94941000000 94945691026 31647000000 31648563675 1582228928 1583792603
+94944000000 94948691200 31648000000 31649563733 1583228928 1584792661
+94947000000 94951691300 31649000000 31650563766 1584228928 1585792694
+94950000000 94954691478 31650000000 31651563826 1585228928 1586792754
+94953000000 94957691627 31651000000 31652563875 1586228928 1587792803
+94956000000 94960691755 31652000000 31653563918 1587228928 1588792846
+94959000000 94963691924 31653000000 31654563974 1588228928 1589792902
+94962000000 94966692044 31654000000 31655564014 1589228928 1590792942
+94965000000 94968519394 31655000000 31656173131 1590228928 1591402059
+94968000000 94972692294 31656000000 31657564098 1591228928 1592793026
+94971000000 94975692552 31657000000 31658564184 1592228928 1593793112
+94974000000 94978692657 31658000000 31659564219 1593228928 1594793147
+94977000000 94981692737 31659000000 31660564245 1594228928 1595793173
+94980000000 94984692884 31660000000 31661564294 1595228928 1596793222
+94983000000 94987693138 31661000000 31662564379 1596228928 1597793307
+94986000000 94990693228 31662000000 31663564409 1597228928 1598793337
+94989000000 94993693473 31663000000 31664564491 1598228928 1599793419
+94992000000 94996693551 31664000000 31665564517 1599228928 1600793445
+94995000000 94999693728 31665000000 31666564576 1600228928 1601793504
+94998000000 95002693874 31666000000 31667564624 1601228928 1602793552
+95001000000 95005694018 31667000000 31668564672 1602228928 1603793600
+95004000000 95007316672 31668000000 31669105557 1603228928 1604334485
+95007000000 95011694333 31669000000 31670564777 1604228928 1605793705
+95010000000 95014694493 31670000000 31671564831 1605228928 1606793759
+95013000000 95017694630 31671000000 31672564876 1606228928 1607793804
+95016000000 95020694788 31672000000 31673564929 1607228928 1608793857
+95019000000 95023694946 31673000000 31674564982 1608228928 1609793910
+95022000000 95026695060 31674000000 31675565020 1609228928 1610793948
+95025000000 95029695221 31675000000 31676565073 1610228928 1611794001
+95028000000 95032695348 31676000000 31677565116 1611228928 1612794044
+95031000000 95035695457 31677000000 31678565152 1612228928 1613794080
+95034000000 95038695599 31678000000 31679565199 1613228928 1614794127
+95037000000 95041695833 31679000000 31680565277 1614228928 1615794205
+95040000000 95044695746 31680000000 31681565248 1615228928 1616794176
+95043000000 95047695867 31681000000 31682565289 1616228928 1617794217
+95046000000 95050695975 31682000000 31683565325 1617228928 1618794253
+95049000000 95053696210 31683000000 31684565403 1618228928 1619794331
+95052000000 95056696389 31684000000 31685565463 1619228928 1620794391
+95055000000 95059610029 31685000000 31686536676 1620228928 1621765604
+95058000000 95062696658 31686000000 31687565552 1621228928 1622794480
+95061000000 95065696831 31687000000 31688565610 1622228928 1623794538
+95064000000 95068696947 31688000000 31689565649 1623228928 1624794577
+95067000000 95071697120 31689000000 31690565706 1624228928 1625794634
+95070000000 95074697292 31690000000 31691565764 1625228928 1626794692
+95073000000 95077697348 31691000000 31692565782 1626228928 1627794710
+95076000000 95080697494 31692000000 31693565831 1627228928 1628794759
+95079000000 95083697690 31693000000 31694565896 1628228928 1629794824
+95082000000 95086697719 31694000000 31695565906 1629228928 1630794834
+95085000000 95089698025 31695000000 31696566008 1630228928 1631794936
+95088000000 95092698197 31696000000 31697566065 1631228928 1632794993
+95091000000 95095698330 31697000000 31698566110 1632228928 1633795038
+95094000000 95098698447 31698000000 31699566149 1633228928 1634795077
+95097000000 95101698632 31699000000 31700566210 1634228928 1635795138
+95100000000 95104698738 31700000000 31701566246 1635228928 1636795174
+95103000000 95107698919 31701000000 31702566306 1636228928 1637795234
+95106000000 95110699131 31702000000 31703566377 1637228928 1638795305
+95109000000 95113699238 31703000000 31704566412 1638228928 1639795340
+95112000000 95116699404 31704000000 31705566468 1639228928 1640795396
+95115000000 95119298149 31705000000 31706432716 1640228928 1641661644
+95118000000 95122699675 31706000000 31707566558 1641228928 1642795486
+95121000000 95125699787 31707000000 31708566595 1642228928 1643795523
+95124000000 95128699996 31708000000 31709566665 1643228928 1644795593
+95127000000 95131700075 31709000000 31710566691 1644228928 1645795619
+95130000000 95134700300 31710000000 31711566766 1645228928 1646795694
+95133000000 95137700427 31711000000 31712566809 1646228928 1647795737
+95136000000 95140700516 31712000000 31713566838 1647228928 1648795766
+95139000000 95143700622 31713000000 31714566874 1648228928 1649795802
+95142000000 95146700833 31714000000 31715566944 1649228928 1650795872
+95145000000 95149701042 31715000000 31716567014 1650228928 1651795942
+95148000000 95152701187 31716000000 31717567062 1651228928 1652795990
+95151000000 95155701313 31717000000 31718567104 1652228928 1653796032
+95154000000 95158701479 31718000000 31719567159 1653228928 1654796087
+95157000000 95161701559 31719000000 31720567186 1654228928 1655796114
+95160000000 95164701794 31720000000 31721567264 1655228928 1656796192
+95163000000 95167701953 31721000000 31722567317 1656228928 1657796245
+95166000000 95170702074 31722000000 31723567358 1657228928 1658796286
+95169000000 95173702234 31723000000 31724567411 1658228928 1659796339
+95172000000 95176702317 31724000000 31725567439 1659228928 1660796367
+95175000000 95179702563 31725000000 31726567521 1660228928 1661796449
+95178000000 95182702686 31726000000 31727567562 1661228928 1662796490
+95181000000 95185702822 31727000000 31728567607 1662228928 1663796535
+95184000000 95188702997 31728000000 31729567665 1663228928 1664796593
+95187000000 95191703119 31729000000 31730567706 1664228928 1665796634
+95190000000 95194703269 31730000000 31731567756 1665228928 1666796684
+95193000000 95197703417 31731000000 31732567805 1666228928 1667796733
+95196000000 95199877111 31732000000 31733292370 1667228928 1668521298
+95199000000 95203703737 31733000000 31734567912 1668228928 1669796840
+95202000000 95206703869 31734000000 31735567956 1669228928 1670796884
+95205000000 95209704043 31735000000 31736568014 1670228928 1671796942
+95208000000 95212704162 31736000000 31737568054 1671228928 1672796982
+95211000000 95215704286 31737000000 31738568095 1672228928 1673797023
+95214000000 95218704505 31738000000 31739568168 1673228928 1674797096
+95217000000 95221704641 31739000000 31740568213 1674228928 1675797141
+95220000000 95224704792 31740000000 31741568264 1675228928 1676797192
+95223000000 95227704942 31741000000 31742568314 1676228928 1677797242
+95226000000 95230705057 31742000000 31743568352 1677228928 1678797280
+95229000000 95233705154 31743000000 31744568384 1678228928 1679797312
+95232000000 95236705362 31744000000 31745568454 1679228928 1680797382
+95235000000 95239705517 31745000000 31746568505 1680228928 1681797433
+95238000000 95242705676 31746000000 31747568558 1681228928 1682797486
+95241000000 95245705850 31747000000 31748568616 1682228928 1683797544
+95244000000 95248705950 31748000000 31749568650 1683228928 1684797578
+95247000000 95251706128 31749000000 31750568709 1684228928 1685797637
+95250000000 95254706277 31750000000 31751568759 1685228928 1686797687
+95253000000 95257706405 31751000000 31752568801 1686228928 1687797729
+95256000000 95260706574 31752000000 31753568858 1687228928 1688797786
+95259000000 95263706694 31753000000 31754568898 1688228928 1689797826
+95262000000 95265534044 31754000000 31755178014 1689228928 1690406942
+95265000000 95269706944 31755000000 31756568981 1690228928 1691797909
+95268000000 95272707202 31756000000 31757569067 1691228928 1692797995
+95271000000 95275707307 31757000000 31758569102 1692228928 1693798030
+95274000000 95278707387 31758000000 31759569129 1693228928 1694798057
+95277000000 95281707534 31759000000 31760569178 1694228928 1695798106
+95280000000 95284707788 31760000000 31761569262 1695228928 1696798190
+95283000000 95287707878 31761000000 31762569292 1696228928 1697798220
+95286000000 95290708123 31762000000 31763569374 1697228928 1698798302
+95289000000 95293708201 31763000000 31764569400 1698228928 1699798328
+95292000000 95296708378 31764000000 31765569459 1699228928 1700798387
+95295000000 95299708524 31765000000 31766569508 1700228928 1701798436
+95298000000 95302708668 31766000000 31767569556 1701228928 1702798484
+95301000000 95304331322 31767000000 31768110440 1702228928 1703339368
+95304000000 95308708983 31768000000 31769569661 1703228928 1704798589
+95307000000 95311709143 31769000000 31770569714 1704228928 1705798642
+95310000000 95314709280 31770000000 31771569760 1705228928 1706798688
+95313000000 95317709438 31771000000 31772569812 1706228928 1707798740
+95316000000 95320709596 31772000000 31773569865 1707228928 1708798793
+95319000000 95323709710 31773000000 31774569903 1708228928 1709798831
+95322000000 95326709871 31774000000 31775569957 1709228928 1710798885
+95325000000 95329709998 31775000000 31776569999 1710228928 1711798927
+95328000000 95332710107 31776000000 31777570035 1711228928 1712798963
+95331000000 95335710249 31777000000 31778570083 1712228928 1713799011
+95334000000 95338710483 31778000000 31779570161 1713228928 1714799089
+95337000000 95341710396 31779000000 31780570132 1714228928 1715799060
+95340000000 95344710517 31780000000 31781570172 1715228928 1716799100
+95343000000 95347710625 31781000000 31782570208 1716228928 1717799136
+95346000000 95350710860 31782000000 31783570286 1717228928 1718799214
+95349000000 95353711039 31783000000 31784570346 1718228928 1719799274
+95352000000 95356624679 31784000000 31785541559 1719228928 1720770487
+95355000000 95359711308 31785000000 31786570436 1720228928 1721799364
+95358000000 95362711481 31786000000 31787570493 1721228928 1722799421
+95361000000 95365711597 31787000000 31788570532 1722228928 1723799460
+95364000000 95368711770 31788000000 31789570590 1723228928 1724799518
+95367000000 95371711942 31789000000 31790570647 1724228928 1725799575
+95370000000 95374711998 31790000000 31791570666 1725228928 1726799594
+95373000000 95377712144 31791000000 31792570714 1726228928 1727799642
+95376000000 95380712340 31792000000 31793570780 1727228928 1728799708
+95379000000 95383712369 31793000000 31794570789 1728228928 1729799717
+95382000000 95386712675 31794000000 31795570891 1729228928 1730799819
+95385000000 95389712847 31795000000 31796570949 1730228928 1731799877
+95388000000 95392712980 31796000000 31797570993 1731228928 1732799921
+95391000000 95395713097 31797000000 31798571032 1732228928 1733799960
+95394000000 95398713282 31798000000 31799571094 1733228928 1734800022
+95397000000 95401713388 31799000000 31800571129 1734228928 1735800057
+95400000000 95404713569 31800000000 31801571189 1735228928 1736800117
+95403000000 95407713781 31801000000 31802571260 1736228928 1737800188
+95406000000 95410713888 31802000000 31803571296 1737228928 1738800224
+95409000000 95413714054 31803000000 31804571351 1738228928 1739800279
+95412000000 95416312799 31804000000 31805437599 1739228928 1740666527
+95415000000 95419714325 31805000000 31806571441 1740228928 1741800369
+95418000000 95422714437 31806000000 31807571479 1741228928 1742800407
+95421000000 95425714646 31807000000 31808571548 1742228928 1743800476
+95424000000 95428714725 31808000000 31809571575 1743228928 1744800503
+95427000000 95431714950 31809000000 31810571650 1744228928 1745800578
+95430000000 95434715077 31810000000 31811571692 1745228928 1746800620
+95433000000 95437715166 31811000000 31812571722 1746228928 1747800650
+95436000000 95440715272 31812000000 31813571757 1747228928 1748800685
+95439000000 95443715483 31813000000 31814571827 1748228928 1749800755
+95442000000 95446715692 31814000000 31815571897 1749228928 1750800825
+95445000000 95449715837 31815000000 31816571945 1750228928 1751800873
+95448000000 95452715963 31816000000 31817571987 1751228928 1752800915
+95451000000 95455716129 31817000000 31818572043 1752228928 1753800971
+95454000000 95458716209 31818000000 31819572069 1753228928 1754800997
+95457000000 95461716444 31819000000 31820572148 1754228928 1755801076
+95460000000 95464716603 31820000000 31821572201 1755228928 1756801129
+95463000000 95467716724 31821000000 31822572241 1756228928 1757801169
+95466000000 95470716884 31822000000 31823572294 1757228928 1758801222
+95469000000 95473716967 31823000000 31824572322 1758228928 1759801250
+95472000000 95476717213 31824000000 31825572404 1759228928 1760801332
+95475000000 95479717336 31825000000 31826572445 1760228928 1761801373
+95478000000 95482717472 31826000000 31827572490 1761228928 1762801418
+95481000000 95485717647 31827000000 31828572549 1762228928 1763801477
+95484000000 95488717769 31828000000 31829572589 1763228928 1764801517
+95487000000 95491717919 31829000000 31830572639 1764228928 1765801567
+95490000000 95494718067 31830000000 31831572689 1765228928 1766801617
+95493000000 95496891761 31831000000 31832297253 1766228928 1767526181
+95496000000 95500718387 31832000000 31833572795 1767228928 1768801723
+95499000000 95503718519 31833000000 31834572839 1768228928 1769801767
+95502000000 95506718693 31834000000 31835572897 1769228928 1770801825
+95505000000 95509718812 31835000000 31836572937 1770228928 1771801865
+95508000000 95512718936 31836000000 31837572978 1771228928 1772801906
+95511000000 95515719155 31837000000 31838573051 1772228928 1773801979
+95514000000 95518719291 31838000000 31839573097 1773228928 1774802025
+95517000000 95521719442 31839000000 31840573147 1774228928 1775802075
+95520000000 95524719592 31840000000 31841573197 1775228928 1776802125
+95523000000 95527719707 31841000000 31842573235 1776228928 1777802163
+95526000000 95530719804 31842000000 31843573268 1777228928 1778802196
+95529000000 95533720012 31843000000 31844573337 1778228928 1779802265
+95532000000 95536720167 31844000000 31845573389 1779228928 1780802317
+95535000000 95539720326 31845000000 31846573442 1780228928 1781802370
+95538000000 95542720500 31846000000 31847573500 1781228928 1782802428
+95541000000 95545720600 31847000000 31848573533 1782228928 1783802461
+95544000000 95548720778 31848000000 31849573592 1783228928 1784802520
+95547000000 95551720927 31849000000 31850573642 1784228928 1785802570
+95550000000 95554721055 31850000000 31851573685 1785228928 1786802613
+95553000000 95557721224 31851000000 31852573741 1786228928 1787802669
+95556000000 95560721344 31852000000 31853573781 1787228928 1788802709
+95559000000 95562548694 31853000000 31854182898 1788228928 1789411826
+95562000000 95566721594 31854000000 31855573864 1789228928 1790802792
+95565000000 95569721852 31855000000 31856573950 1790228928 1791802878
+95568000000 95572721957 31856000000 31857573985 1791228928 1792802913
+95571000000 95575722037 31857000000 31858574012 1792228928 1793802940
+95574000000 95578722184 31858000000 31859574061 1793228928 1794802989
+95577000000 95581722438 31859000000 31860574146 1794228928 1795803074
+95580000000 95584722528 31860000000 31861574176 1795228928 1796803104
+95583000000 95587722773 31861000000 31862574257 1796228928 1797803185
+95586000000 95590722851 31862000000 31863574283 1797228928 1798803211
+95589000000 95593723028 31863000000 31864574342 1798228928 1799803270
+95592000000 95596723174 31864000000 31865574391 1799228928 1800803319
+95595000000 95599723318 31865000000 31866574439 1800228928 1801803367
+95598000000 95601345972 31866000000 31867115324 1801228928 1802344252
+95601000000 95605723633 31867000000 31868574544 1802228928 1803803472
+95604000000 95608723793 31868000000 31869574597 1803228928 1804803525
+95607000000 95611723930 31869000000 31870574643 1804228928 1805803571
+95610000000 95614724088 31870000000 31871574696 1805228928 1806803624
+95613000000 95617724246 31871000000 31872574748 1806228928 1807803676
+95616000000 95620724360 31872000000 31873574786 1807228928 1808803714
+95619000000 95623724521 31873000000 31874574840 1808228928 1809803768
+95622000000 95626724648 31874000000 31875574882 1809228928 1810803810
+95625000000 95629724757 31875000000 31876574919 1810228928 1811803847
+95628000000 95632724899 31876000000 31877574966 1811228928 1812803894
+95631000000 95635725133 31877000000 31878575044 1812228928 1813803972
+95634000000 95638725046 31878000000 31879575015 1813228928 1814803943
+95637000000 95641725167 31879000000 31880575055 1814228928 1815803983
+95640000000 95644725275 31880000000 31881575091 1815228928 1816804019
+95643000000 95647725510 31881000000 31882575170 1816228928 1817804098
+95646000000 95650725689 31882000000 31883575229 1817228928 1818804157
+95649000000 95653639329 31883000000 31884546443 1818228928 1819775371
+95652000000 95656725958 31884000000 31885575319 1819228928 1820804247
+95655000000 95659726131 31885000000 31886575377 1820228928 1821804305
+95658000000 95662726247 31886000000 31887575415 1821228928 1822804343
+95661000000 95665726420 31887000000 31888575473 1822228928 1823804401
+95664000000 95668726592 31888000000 31889575530 1823228928 1824804458
+95667000000 95671726648 31889000000 31890575549 1824228928 1825804477
+95670000000 95674726794 31890000000 31891575598 1825228928 1826804526
+95673000000 95677726990 31891000000 31892575663 1826228928 1827804591
+95676000000 95680727019 31892000000 31893575673 1827228928 1828804601
+95679000000 95683727325 31893000000 31894575775 1828228928 1829804703
+95682000000 95686727497 31894000000 31895575832 1829228928 1830804760
+95685000000 95689727630 31895000000 31896575876 1830228928 1831804804
+95688000000 95692727747 31896000000 31897575915 1831228928 1832804843
+95691000000 95695727932 31897000000 31898575977 1832228928 1833804905
+95694000000 95698728038 31898000000 31899576012 1833228928 1834804940
+95697000000 95701728219 31899000000 31900576073 1834228928 1835805001
+95700000000 95704728431 31900000000 31901576143 1835228928 1836805071
+95703000000 95707728538 31901000000 31902576179 1836228928 1837805107
+95706000000 95710728704 31902000000 31903576234 1837228928 1838805162
+95709000000 95713327449 31903000000 31904442483 1838228928 1839671411
+95712000000 95716728975 31904000000 31905576325 1839228928 1840805253
+95715000000 95719729087 31905000000 31906576362 1840228928 1841805290
+95718000000 95722729296 31906000000 31907576432 1841228928 1842805360
+95721000000 95725729375 31907000000 31908576458 1842228928 1843805386
+95724000000 95728729600 31908000000 31909576533 1843228928 1844805461
+95727000000 95731729727 31909000000 31910576575 1844228928 1845805503
+95730000000 95734729816 31910000000 31911576605 1845228928 1846805533
+95733000000 95737729922 31911000000 31912576640 1846228928 1847805568
+95736000000 95740730133 31912000000 31913576711 1847228928 1848805639
+95739000000 95743730342 31913000000 31914576780 1848228928 1849805708
+95742000000 95746730487 31914000000 31915576829 1849228928 1850805757
+95745000000 95749730613 31915000000 31916576871 1850228928 1851805799
+95748000000 95752730779 31916000000 31917576926 1851228928 1852805854
+95751000000 95755730859 31917000000 31918576953 1852228928 1853805881
+95754000000 95758731094 31918000000 31919577031 1853228928 1854805959
+95757000000 95761731253 31919000000 31920577084 1854228928 1855806012
+95760000000 95764731374 31920000000 31921577124 1855228928 1856806052
+95763000000 95767731534 31921000000 31922577178 1856228928 1857806106
+95766000000 95770731617 31922000000 31923577205 1857228928 1858806133
+95769000000 95773731863 31923000000 31924577287 1858228928 1859806215
+95772000000 95776731986 31924000000 31925577328 1859228928 1860806256
+95775000000 95779732122 31925000000 31926577374 1860228928 1861806302
+95778000000 95782732297 31926000000 31927577432 1861228928 1862806360
+95781000000 95785732419 31927000000 31928577473 1862228928 1863806401
+95784000000 95788732569 31928000000 31929577523 1863228928 1864806451
+95787000000 95791732717 31929000000 31930577572 1864228928 1865806500
+95790000000 95793906411 31930000000 31931302137 1865228928 1866531065
+95793000000 95797733037 31931000000 31932577679 1866228928 1867806607
+95796000000 95800733169 31932000000 31933577723 1867228928 1868806651
+95799000000 95803733343 31933000000 31934577781 1868228928 1869806709
+95802000000 95806733462 31934000000 31935577820 1869228928 1870806748
+95805000000 95809733586 31935000000 31936577862 1870228928 1871806790
+95808000000 95812733805 31936000000 31937577935 1871228928 1872806863
+95811000000 95815733941 31937000000 31938577980 1872228928 1873806908
+95814000000 95818734092 31938000000 31939578030 1873228928 1874806958
+95817000000 95821734242 31939000000 31940578080 1874228928 1875807008
+95820000000 95824734357 31940000000 31941578119 1875228928 1876807047
+95823000000 95827734454 31941000000 31942578151 1876228928 1877807079
+95826000000 95830734662 31942000000 31943578220 1877228928 1878807148
+95829000000 95833734817 31943000000 31944578272 1878228928 1879807200
+95832000000 95836734976 31944000000 31945578325 1879228928 1880807253
+95835000000 95839735150 31945000000 31946578383 1880228928 1881807311
+95838000000 95842735250 31946000000 31947578416 1881228928 1882807344
+95841000000 95845735428 31947000000 31948578476 1882228928 1883807404
+95844000000 95848735577 31948000000 31949578525 1883228928 1884807453
+95847000000 95851735705 31949000000 31950578568 1884228928 1885807496
+95850000000 95854735874 31950000000 31951578624 1885228928 1886807552
+95853000000 95857735994 31951000000 31952578664 1886228928 1887807592
+95856000000 95859563344 31952000000 31953187781 1887228928 1888416709
+95859000000 95863736244 31953000000 31954578748 1888228928 1889807676
+95862000000 95866736502 31954000000 31955578834 1889228928 1890807762
+95865000000 95869736607 31955000000 31956578869 1890228928 1891807797
+95868000000 95872736687 31956000000 31957578895 1891228928 1892807823
+95871000000 95875736834 31957000000 31958578944 1892228928 1893807872
+95874000000 95878737088 31958000000 31959579029 1893228928 1894807957
+95877000000 95881737178 31959000000 31960579059 1894228928 1895807987
+95880000000 95884737423 31960000000 31961579141 1895228928 1896808069
+95883000000 95887737501 31961000000 31962579167 1896228928 1897808095
+95886000000 95890737678 31962000000 31963579226 1897228928 1898808154
+95889000000 95893737824 31963000000 31964579274 1898228928 1899808202
+95892000000 95896737968 31964000000 31965579322 1899228928 1900808250
+95895000000 95898360622 31965000000 31966120207 1900228928 1901349135
+95898000000 95902738283 31966000000 31967579427 1901228928 1902808355
+95901000000 95905738443 31967000000 31968579481 1902228928 1903808409
+95904000000 95908738580 31968000000 31969579526 1903228928 1904808454
+95907000000 95911738738 31969000000 31970579579 1904228928 1905808507
+95910000000 95914738896 31970000000 31971579632 1905228928 1906808560
+95913000000 95917739010 31971000000 31972579670 1906228928 1907808598
+95916000000 95920739171 31972000000 31973579723 1907228928 1908808651
+95919000000 95923739298 31973000000 31974579766 1908228928 1909808694
+95922000000 95926739407 31974000000 31975579802 1909228928 1910808730
+95925000000 95929739549 31975000000 31976579849 1910228928 1911808777
+95928000000 95932739783 31976000000 31977579927 1911228928 1912808855
+95931000000 95935739696 31977000000 31978579898 1912228928 1913808826
+95934000000 95938739817 31978000000 31979579939 1913228928 1914808867
+95937000000 95941739925 31979000000 31980579975 1914228928 1915808903
+95940000000 95944740160 31980000000 31981580053 1915228928 1916808981
+95943000000 95947740339 31981000000 31982580113 1916228928 1917809041
+95946000000 95950653979 31982000000 31983551326 1917228928 1918780254
+95949000000 95953740608 31983000000 31984580202 1918228928 1919809130
+95952000000 95956740781 31984000000 31985580260 1919228928 1920809188
+95955000000 95959740897 31985000000 31986580299 1920228928 1921809227
+95958000000 95962741070 31986000000 31987580356 1921228928 1922809284
+95961000000 95965741242 31987000000 31988580414 1922228928 1923809342
+95964000000 95968741298 31988000000 31989580432 1923228928 1924809360
+95967000000 95971741444 31989000000 31990580481 1924228928 1925809409
+95970000000 95974741640 31990000000 31991580546 1925228928 1926809474
+95973000000 95977741669 31991000000 31992580556 1926228928 1927809484
+95976000000 95980741975 31992000000 31993580658 1927228928 1928809586
+95979000000 95983742147 31993000000 31994580715 1928228928 1929809643
+95982000000 95986742280 31994000000 31995580760 1929228928 1930809688
+95985000000 95989742397 31995000000 31996580799 1930228928 1931809727
+95988000000 95992742582 31996000000 31997580860 1931228928 1932809788
+95991000000 95995742688 31997000000 31998580896 1932228928 1933809824
+95994000000 95998742869 31998000000 31999580956 1933228928 1934809884
+95997000000 96001743081 31999000000 32000581027 1934228928 1935809955
+96000000000 96004743188 32000000000 32001581062 1935228928 1936809990
+96003000000 96007743354 32001000000 32002581118 1936228928 1937810046
+96006000000 96010342099 32002000000 32003447366 1937228928 1938676294
+96009000000 96013743625 32003000000 32004581208 1938228928 1939810136
+96012000000 96016743737 32004000000 32005581245 1939228928 1940810173
+96015000000 96019743946 32005000000 32006581315 1940228928 1941810243
+96018000000 96022744025 32006000000 32007581341 1941228928 1942810269
+96021000000 96025744250 32007000000 32008581416 1942228928 1943810344
+96024000000 96028744377 32008000000 32009581459 1943228928 1944810387
+96027000000 96031744466 32009000000 32010581488 1944228928 1945810416
+96030000000 96034744572 32010000000 32011581524 1945228928 1946810452
+96033000000 96037744783 32011000000 32012581594 1946228928 1947810522
+96036000000 96040744992 32012000000 32013581664 1947228928 1948810592
+96039000000 96043745137 32013000000 32014581712 1948228928 1949810640
+96042000000 96046745263 32014000000 32015581754 1949228928 1950810682
+96045000000 96049745429 32015000000 32016581809 1950228928 1951810737
+96048000000 96052745509 32016000000 32017581836 1951228928 1952810764
+96051000000 96055745744 32017000000 32018581914 1952228928 1953810842
+96054000000 96058745903 32018000000 32019581967 1953228928 1954810895
+96057000000 96061746024 32019000000 32020582008 1954228928 1955810936
+96060000000 96064746184 32020000000 32021582061 1955228928 1956810989
+96063000000 96067746267 32021000000 32022582089 1956228928 1957811017
+96066000000 96070746513 32022000000 32023582171 1957228928 1958811099
+96069000000 96073746636 32023000000 32024582212 1958228928 1959811140
+96072000000 96076746772 32024000000 32025582257 1959228928 1960811185
+96075000000 96079746947 32025000000 32026582315 1960228928 1961811243
+96078000000 96082747069 32026000000 32027582356 1961228928 1962811284
+96081000000 96085747219 32027000000 32028582406 1962228928 1963811334
+96084000000 96088747367 32028000000 32029582455 1963228928 1964811383
+96087000000 96090921061 32029000000 32030307020 1964228928 1965535948
+96090000000 96094747687 32030000000 32031582562 1965228928 1966811490
+96093000000 96097747819 32031000000 32032582606 1966228928 1967811534
+96096000000 96100747993 32032000000 32033582664 1967228928 1968811592
+96099000000 96103748112 32033000000 32034582704 1968228928 1969811632
+96102000000 96106748236 32034000000 32035582745 1969228928 1970811673
+96105000000 96109748455 32035000000 32036582818 1970228928 1971811746
+96108000000 96112748591 32036000000 32037582863 1971228928 1972811791
+96111000000 96115748742 32037000000 32038582914 1972228928 1973811842
+96114000000 96118748892 32038000000 32039582964 1973228928 1974811892
+96117000000 96121749007 32039000000 32040583002 1974228928 1975811930
+96120000000 96124749104 32040000000 32041583034 1975228928 1976811962
+96123000000 96127749312 32041000000 32042583104 1976228928 1977812032
+96126000000 96130749467 32042000000 32043583155 1977228928 1978812083
+96129000000 96133749626 32043000000 32044583208 1978228928 1979812136
+96132000000 96136749800 32044000000 32045583266 1979228928 1980812194
+96135000000 96139749900 32045000000 32046583300 1980228928 1981812228
+96138000000 96142750078 32046000000 32047583359 1981228928 1982812287
+96141000000 96145750227 32047000000 32048583409 1982228928 1983812337
+96144000000 96148750355 32048000000 32049583451 1983228928 1984812379
+96147000000 96151750524 32049000000 32050583508 1984228928 1985812436
+96150000000 96154750644 32050000000 32051583548 1985228928 1986812476
+96153000000 96156577994 32051000000 32052192664 1986228928 1987421592
+96156000000 96160750894 32052000000 32053583631 1987228928 1988812559
+96159000000 96163751152 32053000000 32054583717 1988228928 1989812645
+96162000000 96166751257 32054000000 32055583752 1989228928 1990812680
+96165000000 96169751337 32055000000 32056583779 1990228928 1991812707
+96168000000 96172751484 32056000000 32057583828 1991228928 1992812756
+96171000000 96175751738 32057000000 32058583912 1992228928 1993812840
+96174000000 96178751828 32058000000 32059583942 1993228928 1994812870
+96177000000 96181752073 32059000000 32060584024 1994228928 1995812952
+96180000000 96184752151 32060000000 32061584050 1995228928 1996812978
+96183000000 96187752328 32061000000 32062584109 1996228928 1997813037
+96186000000 96190752474 32062000000 32063584158 1997228928 1998813086
+96189000000 96193752618 32063000000 32064584206 1998228928 1999813134
+96192000000 96195375272 32064000000 32065125090 1999228928 2000354018
+96195000000 96199752933 32065000000 32066584311 2000228928 2001813239
+96198000000 96202753093 32066000000 32067584364 2001228928 2002813292
+96201000000 96205753230 32067000000 32068584410 2002228928 2003813338
+96204000000 96208753388 32068000000 32069584462 2003228928 2004813390
+96207000000 96211753546 32069000000 32070584515 2004228928 2005813443
+96210000000 96214753660 32070000000 32071584553 2005228928 2006813481
+96213000000 96217753821 32071000000 32072584607 2006228928 2007813535
+96216000000 96220753948 32072000000 32073584649 2007228928 2008813577
+96219000000 96223754057 32073000000 32074584685 2008228928 2009813613
+96222000000 96226754199 32074000000 32075584733 2009228928 2010813661
+96225000000 96229754433 32075000000 32076584811 2010228928 2011813739
+96228000000 96232754346 32076000000 32077584782 2011228928 2012813710
+96231000000 96235754467 32077000000 32078584822 2012228928 2013813750
+96234000000 96238754575 32078000000 32079584858 2013228928 2014813786
+96237000000 96241754810 32079000000 32080584936 2014228928 2015813864
+96240000000 96244754989 32080000000 32081584996 2015228928 2016813924
+96243000000 96247668629 32081000000 32082556209 2016228928 2017785137
+96246000000 96250755258 32082000000 32083585086 2017228928 2018814014
+96249000000 96253755431 32083000000 32084585143 2018228928 2019814071
+96252000000 96256755547 32084000000 32085585182 2019228928 2020814110
+96255000000 96259755720 32085000000 32086585240 2020228928 2021814168
+96258000000 96262755892 32086000000 32087585297 2021228928 2022814225
+96261000000 96265755948 32087000000 32088585316 2022228928 2023814244
+96264000000 96268756094 32088000000 32089585364 2023228928 2024814292
+96267000000 96271756290 32089000000 32090585430 2024228928 2025814358
+96270000000 96274756319 32090000000 32091585439 2025228928 2026814367
+96273000000 96277756625 32091000000 32092585541 2026228928 2027814469
+96276000000 96280756797 32092000000 32093585599 2027228928 2028814527
+96279000000 96283756930 32093000000 32094585643 2028228928 2029814571
+96282000000 96286757047 32094000000 32095585682 2029228928 2030814610
+96285000000 96289757232 32095000000 32096585744 2030228928 2031814672
+96288000000 96292757338 32096000000 32097585779 2031228928 2032814707
+96291000000 96295757519 32097000000 32098585839 2032228928 2033814767
+96294000000 96298757731 32098000000 32099585910 2033228928 2034814838
+96297000000 96301757838 32099000000 32100585946 2034228928 2035814874
+96300000000 96304758004 32100000000 32101586001 2035228928 2036814929
+96303000000 96307356749 32101000000 32102452249 2036228928 2037681177
+96306000000 96310758275 32102000000 32103586091 2037228928 2038815019
+96309000000 96313758387 32103000000 32104586129 2038228928 2039815057
+96312000000 96316758596 32104000000 32105586198 2039228928 2040815126
+96315000000 96319758675 32105000000 32106586225 2040228928 2041815153
+96318000000 96322758900 32106000000 32107586300 2041228928 2042815228
+96321000000 96325759027 32107000000 32108586342 2042228928 2043815270
+96324000000 96328759116 32108000000 32109586372 2043228928 2044815300
+96327000000 96331759222 32109000000 32110586407 2044228928 2045815335
+96330000000 96334759433 32110000000 32111586477 2045228928 2046815405
+96333000000 96337759642 32111000000 32112586547 2046228928 2047815475
+96336000000 96340759787 32112000000 32113586595 2047228928 2048815523
+96339000000 96343759913 32113000000 32114586637 2048228928 2049815565
+96342000000 96346760079 32114000000 32115586693 2049228928 2050815621
+96345000000 96349760159 32115000000 32116586719 2050228928 2051815647
+96348000000 96352760394 32116000000 32117586798 2051228928 2052815726
+96351000000 96355760553 32117000000 32118586851 2052228928 2053815779
+96354000000 96358760674 32118000000 32119586891 2053228928 2054815819
+96357000000 96361760834 32119000000 32120586944 2054228928 2055815872
+96360000000 96364760917 32120000000 32121586972 2055228928 2056815900
+96363000000 96367761163 32121000000 32122587054 2056228928 2057815982
+96366000000 96370761286 32122000000 32123587095 2057228928 2058816023
+96369000000 96373761422 32123000000 32124587140 2058228928 2059816068
+96372000000 96376761597 32124000000 32125587199 2059228928 2060816127
+96375000000 96379761719 32125000000 32126587239 2060228928 2061816167
+96378000000 96382761869 32126000000 32127587289 2061228928 2062816217
+96381000000 96385762017 32127000000 32128587339 2062228928 2063816267
+96384000000 96387935711 32128000000 32129311903 2063228928 2064540831
+96387000000 96391762337 32129000000 32130587445 2064228928 2065816373
+96390000000 96394762469 32130000000 32131587489 2065228928 2066816417
+96393000000 96397762643 32131000000 32132587547 2066228928 2067816475
+96396000000 96400762762 32132000000 32133587587 2067228928 2068816515
+96399000000 96403762886 32133000000 32134587628 2068228928 2069816556
+96402000000 96406763105 32134000000 32135587701 2069228928 2070816629
+96405000000 96409763241 32135000000 32136587747 2070228928 2071816675
+96408000000 96412763392 32136000000 32137587797 2071228928 2072816725
+96411000000 96415763542 32137000000 32138587847 2072228928 2073816775
+96414000000 96418763657 32138000000 32139587885 2073228928 2074816813
+96417000000 96421763754 32139000000 32140587918 2074228928 2075816846
+96420000000 96424763962 32140000000 32141587987 2075228928 2076816915
+96423000000 96427764117 32141000000 32142588039 2076228928 2077816967
+96426000000 96430764276 32142000000 32143588092 2077228928 2078817020
+96429000000 96433764450 32143000000 32144588150 2078228928 2079817078
+96432000000 96436764550 32144000000 32145588183 2079228928 2080817111
+96435000000 96439764728 32145000000 32146588242 2080228928 2081817170
+96438000000 96442764877 32146000000 32147588292 2081228928 2082817220
+96441000000 96445765005 32147000000 32148588335 2082228928 2083817263
+96444000000 96448765174 32148000000 32149588391 2083228928 2084817319
+96447000000 96451765294 32149000000 32150588431 2084228928 2085817359
+96450000000 96453592644 32150000000 32151197548 2085228928 2086426476
+96453000000 96457765544 32151000000 32152588514 2086228928 2087817442
+96456000000 96460765802 32152000000 32153588600 2087228928 2088817528
+96459000000 96463765907 32153000000 32154588635 2088228928 2089817563
+96462000000 96466765987 32154000000 32155588662 2089228928 2090817590
+96465000000 96469766134 32155000000 32156588711 2090228928 2091817639
+96468000000 96472766388 32156000000 32157588796 2091228928 2092817724
+96471000000 96475766478 32157000000 32158588826 2092228928 2093817754
+96474000000 96478766723 32158000000 32159588907 2093228928 2094817835
+96477000000 96481766801 32159000000 32160588933 2094228928 2095817861
+96480000000 96484766978 32160000000 32161588992 2095228928 2096817920
+96483000000 96487767124 32161000000 32162589041 2096228928 2097817969
+96486000000 96490767268 32162000000 32163589089 2097228928 2098818017
+96489000000 96492389922 32163000000 32164129974 2098228928 2099358902
+96492000000 96496767583 32164000000 32165589194 2099228928 2100818122
+96495000000 96499767743 32165000000 32166589247 2100228928 2101818175
+96498000000 96502767880 32166000000 32167589293 2101228928 2102818221
+96501000000 96505768038 32167000000 32168589346 2102228928 2103818274
+96504000000 96508768196 32168000000 32169589398 2103228928 2104818326
+96507000000 96511768310 32169000000 32170589436 2104228928 2105818364
+96510000000 96514768471 32170000000 32171589490 2105228928 2106818418
+96513000000 96517768598 32171000000 32172589532 2106228928 2107818460
+96516000000 96520768707 32172000000 32173589569 2107228928 2108818497
+96519000000 96523768849 32173000000 32174589616 2108228928 2109818544
+96522000000 96526769083 32174000000 32175589694 2109228928 2110818622
+96525000000 96529768996 32175000000 32176589665 2110228928 2111818593
+96528000000 96532769117 32176000000 32177589705 2111228928 2112818633
+96531000000 96535769225 32177000000 32178589741 2112228928 2113818669
+96534000000 96538769460 32178000000 32179589820 2113228928 2114818748
+96537000000 96541769639 32179000000 32180589879 2114228928 2115818807
+96540000000 96544683279 32180000000 32181561093 2115228928 2116790021
+96543000000 96547769908 32181000000 32182589969 2116228928 2117818897
+96546000000 96550770081 32182000000 32183590027 2117228928 2118818955
+96549000000 96553770197 32183000000 32184590065 2118228928 2119818993
+96552000000 96556770370 32184000000 32185590123 2119228928 2120819051
+96555000000 96559770542 32185000000 32186590180 2120228928 2121819108
+96558000000 96562770598 32186000000 32187590199 2121228928 2122819127
+96561000000 96565770744 32187000000 32188590248 2122228928 2123819176
+96564000000 96568770940 32188000000 32189590313 2123228928 2124819241
+96567000000 96571770969 32189000000 32190590323 2124228928 2125819251
+96570000000 96574771275 32190000000 32191590425 2125228928 2126819353
+96573000000 96577771447 32191000000 32192590482 2126228928 2127819410
+96576000000 96580771580 32192000000 32193590526 2127228928 2128819454
+96579000000 96583771697 32193000000 32194590565 2128228928 2129819493
+96582000000 96586771882 32194000000 32195590627 2129228928 2130819555
+96585000000 96589771988 32195000000 32196590662 2130228928 2131819590
+96588000000 96592772169 32196000000 32197590723 2131228928 2132819651
+96591000000 96595772381 32197000000 32198590793 2132228928 2133819721
+96594000000 96598772488 32198000000 32199590829 2133228928 2134819757
+96597000000 96601772654 32199000000 32200590884 2134228928 2135819812
+96600000000 96604371399 32200000000 32201457133 2135228928 2136686061
+96603000000 96607772925 32201000000 32202590975 2136228928 2137819903
+96606000000 96610773037 32202000000 32203591012 2137228928 2138819940
+96609000000 96613773246 32203000000 32204591082 2138228928 2139820010
+96612000000 96616773325 32204000000 32205591108 2139228928 2140820036
+96615000000 96619773550 32205000000 32206591183 2140228928 2141820111
+96618000000 96622773677 32206000000 32207591225 2141228928 2142820153
+96621000000 96625773766 32207000000 32208591255 2142228928 2143820183
+96624000000 96628773872 32208000000 32209591290 2143228928 2144820218
+96627000000 96631774083 32209000000 32210591361 2144228928 2145820289
+96630000000 96634774292 32210000000 32211591430 2145228928 2146820358
+96633000000 96637774437 32211000000 32212591479 2146228928 2147820407
+96636000000 96640774563 32212000000 32213591521 2147228928 2148820449
+96639000000 96643774729 32213000000 32214591576 2148228928 2149820504
+96642000000 96646774809 32214000000 32215591603 2149228928 2150820531
+96645000000 96649775044 32215000000 32216591681 2150228928 2151820609
+96648000000 96652775203 32216000000 32217591734 2151228928 2152820662
+96651000000 96655775324 32217000000 32218591774 2152228928 2153820702
+96654000000 96658775484 32218000000 32219591828 2153228928 2154820756
+96657000000 96661775567 32219000000 32220591855 2154228928 2155820783
+96660000000 96664775813 32220000000 32221591937 2155228928 2156820865
+96663000000 96667775936 32221000000 32222591978 2156228928 2157820906
+96666000000 96670776072 32222000000 32223592024 2157228928 2158820952
+96669000000 96673776247 32223000000 32224592082 2158228928 2159821010
+96672000000 96676776369 32224000000 32225592123 2159228928 2160821051
+96675000000 96679776519 32225000000 32226592173 2160228928 2161821101
+96678000000 96682776667 32226000000 32227592222 2161228928 2162821150
+96681000000 96684950361 32227000000 32228316787 2162228928 2163545715
+96684000000 96688776987 32228000000 32229592329 2163228928 2164821257
+96687000000 96691777119 32229000000 32230592373 2164228928 2165821301
+96690000000 96694777293 32230000000 32231592431 2165228928 2166821359
+96693000000 96697777412 32231000000 32232592470 2166228928 2167821398
+96696000000 96700777536 32232000000 32233592512 2167228928 2168821440
+96699000000 96703777755 32233000000 32234592585 2168228928 2169821513
+96702000000 96706777891 32234000000 32235592630 2169228928 2170821558
+96705000000 96709778042 32235000000 32236592680 2170228928 2171821608
+96708000000 96712778192 32236000000 32237592730 2171228928 2172821658
+96711000000 96715778307 32237000000 32238592769 2172228928 2173821697
+96714000000 96718778404 32238000000 32239592801 2173228928 2174821729
+96717000000 96721778612 32239000000 32240592870 2174228928 2175821798
+96720000000 96724778767 32240000000 32241592922 2175228928 2176821850
+96723000000 96727778926 32241000000 32242592975 2176228928 2177821903
+96726000000 96730779100 32242000000 32243593033 2177228928 2178821961
+96729000000 96733779200 32243000000 32244593066 2178228928 2179821994
+96732000000 96736779378 32244000000 32245593126 2179228928 2180822054
+96735000000 96739779527 32245000000 32246593175 2180228928 2181822103
+96738000000 96742779655 32246000000 32247593218 2181228928 2182822146
+96741000000 96745779824 32247000000 32248593274 2182228928 2183822202
+96744000000 96748779944 32248000000 32249593314 2183228928 2184822242
+96747000000 96750607294 32249000000 32250202431 2184228928 2185431359
+96750000000 96754780194 32250000000 32251593398 2185228928 2186822326
+96753000000 96757780452 32251000000 32252593484 2186228928 2187822412
+96756000000 96760780557 32252000000 32253593519 2187228928 2188822447
+96759000000 96763780637 32253000000 32254593545 2188228928 2189822473
+96762000000 96766780784 32254000000 32255593594 2189228928 2190822522
+96765000000 96769781038 32255000000 32256593679 2190228928 2191822607
+96768000000 96772781128 32256000000 32257593709 2191228928 2192822637
+96771000000 96775781373 32257000000 32258593791 2192228928 2193822719
+96774000000 96778781451 32258000000 32259593817 2193228928 2194822745
+96777000000 96781781628 32259000000 32260593876 2194228928 2195822804
+96780000000 96784781774 32260000000 32261593924 2195228928 2196822852
+96783000000 96787781918 32261000000 32262593972 2196228928 2197822900
+96786000000 96789404572 32262000000 32263134857 2197228928 2198363785
+96789000000 96793782233 32263000000 32264594077 2198228928 2199823005
+96792000000 96796782393 32264000000 32265594131 2199228928 2200823059
+96795000000 96799782530 32265000000 32266594176 2200228928 2201823104
+96798000000 96802782688 32266000000 32267594229 2201228928 2202823157
+96801000000 96805782846 32267000000 32268594282 2202228928 2203823210
+96804000000 96808782960 32268000000 32269594320 2203228928 2204823248
+96807000000 96811783121 32269000000 32270594373 2204228928 2205823301
+96810000000 96814783248 32270000000 32271594416 2205228928 2206823344
+96813000000 96817783357 32271000000 32272594452 2206228928 2207823380
+96816000000 96820783499 32272000000 32273594499 2207228928 2208823427
+96819000000 96823783733 32273000000 32274594577 2208228928 2209823505
+96822000000 96826783646 32274000000 32275594548 2209228928 2210823476
+96825000000 96829783767 32275000000 32276594589 2210228928 2211823517
+96828000000 96832783875 32276000000 32277594625 2211228928 2212823553
+96831000000 96835784110 32277000000 32278594703 2212228928 2213823631
+96834000000 96838784289 32278000000 32279594763 2213228928 2214823691
+96837000000 96841697929 32279000000 32280565976 2214228928 2215794904
+96840000000 96844784558 32280000000 32281594852 2215228928 2216823780
+96843000000 96847784731 32281000000 32282594910 2216228928 2217823838
+96846000000 96850784847 32282000000 32283594949 2217228928 2218823877
+96849000000 96853785020 32283000000 32284595006 2218228928 2219823934
+96852000000 96856785192 32284000000 32285595064 2219228928 2220823992
+96855000000 96859785248 32285000000 32286595082 2220228928 2221824010
+96858000000 96862785394 32286000000 32287595131 2221228928 2222824059
+96861000000 96865785590 32287000000 32288595196 2222228928 2223824124
+96864000000 96868785619 32288000000 32289595206 2223228928 2224824134
+96867000000 96871785925 32289000000 32290595308 2224228928 2225824236
+96870000000 96874786097 32290000000 32291595365 2225228928 2226824293
+96873000000 96877786230 32291000000 32292595410 2226228928 2227824338
+96876000000 96880786347 32292000000 32293595449 2227228928 2228824377
+96879000000 96883786532 32293000000 32294595510 2228228928 2229824438
+96882000000 96886786638 32294000000 32295595546 2229228928 2230824474
+96885000000 96889786819 32295000000 32296595606 2230228928 2231824534
+96888000000 96892787031 32296000000 32297595677 2231228928 2232824605
+96891000000 96895787138 32297000000 32298595712 2232228928 2233824640
+96894000000 96898787304 32298000000 32299595768 2233228928 2234824696
+96897000000 96901386049 32299000000 32300462016 2234228928 2235690944
+96900000000 96904787575 32300000000 32301595858 2235228928 2236824786
+96903000000 96907787687 32301000000 32302595895 2236228928 2237824823
+96906000000 96910787896 32302000000 32303595965 2237228928 2238824893
+96909000000 96913787975 32303000000 32304595991 2238228928 2239824919
+96912000000 96916788200 32304000000 32305596066 2239228928 2240824994
+96915000000 96919788327 32305000000 32306596109 2240228928 2241825037
+96918000000 96922788416 32306000000 32307596138 2241228928 2242825066
+96921000000 96925788522 32307000000 32308596174 2242228928 2243825102
+96924000000 96928788733 32308000000 32309596244 2243228928 2244825172
+96927000000 96931788942 32309000000 32310596314 2244228928 2245825242
+96930000000 96934789087 32310000000 32311596362 2245228928 2246825290
+96933000000 96937789213 32311000000 32312596404 2246228928 2247825332
+96936000000 96940789379 32312000000 32313596459 2247228928 2248825387
+96939000000 96943789459 32313000000 32314596486 2248228928 2249825414
+96942000000 96946789694 32314000000 32315596564 2249228928 2250825492
+96945000000 96949789853 32315000000 32316596617 2250228928 2251825545
+96948000000 96952789974 32316000000 32317596658 2251228928 2252825586
+96951000000 96955790134 32317000000 32318596711 2252228928 2253825639
+96954000000 96958790217 32318000000 32319596739 2253228928 2254825667
+96957000000 96961790463 32319000000 32320596821 2254228928 2255825749
+96960000000 96964790586 32320000000 32321596862 2255228928 2256825790
+96963000000 96967790722 32321000000 32322596907 2256228928 2257825835
+96966000000 96970790897 32322000000 32323596965 2257228928 2258825893
+96969000000 96973791019 32323000000 32324597006 2258228928 2259825934
+96972000000 96976791169 32324000000 32325597056 2259228928 2260825984
+96975000000 96979791317 32325000000 32326597105 2260228928 2261826033
+96978000000 96981965011 32326000000 32327321670 2261228928 2262550598
+96981000000 96985791637 32327000000 32328597212 2262228928 2263826140
+96984000000 96988791769 32328000000 32329597256 2263228928 2264826184
+96987000000 96991791943 32329000000 32330597314 2264228928 2265826242
+96990000000 96994792062 32330000000 32331597354 2265228928 2266826282
+96993000000 96997792186 32331000000 32332597395 2266228928 2267826323
+96996000000 97000792405 32332000000 32333597468 2267228928 2268826396
+96999000000 97003792541 32333000000 32334597513 2268228928 2269826441
+97002000000 97006792692 32334000000 32335597564 2269228928 2270826492
+97005000000 97009792842 32335000000 32336597614 2270228928 2271826542
+97008000000 97012792957 32336000000 32337597652 2271228928 2272826580
+97011000000 97015793054 32337000000 32338597684 2272228928 2273826612
+97014000000 97018793262 32338000000 32339597754 2273228928 2274826682
+97017000000 97021793417 32339000000 32340597805 2274228928 2275826733
+97020000000 97024793576 32340000000 32341597858 2275228928 2276826786
+97023000000 97027793750 32341000000 32342597916 2276228928 2277826844
+97026000000 97030793850 32342000000 32343597950 2277228928 2278826878
+97029000000 97033794028 32343000000 32344598009 2278228928 2279826937
+97032000000 97036794177 32344000000 32345598059 2279228928 2280826987
+97035000000 97039794305 32345000000 32346598101 2280228928 2281827029
+97038000000 97042794474 32346000000 32347598158 2281228928 2282827086
+97041000000 97045794594 32347000000 32348598198 2282228928 2283827126
+97044000000 97047621944 32348000000 32349207314 2283228928 2284436242
+97047000000 97051794844 32349000000 32350598281 2284228928 2285827209
+97050000000 97054795102 32350000000 32351598367 2285228928 2286827295
+97053000000 97057795207 32351000000 32352598402 2286228928 2287827330
+97056000000 97060795287 32352000000 32353598429 2287228928 2288827357
+97059000000 97063795434 32353000000 32354598478 2288228928 2289827406
+97062000000 97066795688 32354000000 32355598562 2289228928 2290827490
+97065000000 97069795778 32355000000 32356598592 2290228928 2291827520
+97068000000 97072796023 32356000000 32357598674 2291228928 2292827602
+97071000000 97075796101 32357000000 32358598700 2292228928 2293827628
+97074000000 97078796278 32358000000 32359598759 2293228928 2294827687
+97077000000 97081796424 32359000000 32360598808 2294228928 2295827736
+97080000000 97084796568 32360000000 32361598856 2295228928 2296827784
+97083000000 97086419222 32361000000 32362139740 2296228928 2297368668
+97086000000 97090796883 32362000000 32363598961 2297228928 2298827889
+97089000000 97093797043 32363000000 32364599014 2298228928 2299827942
+97092000000 97096797180 32364000000 32365599060 2299228928 2300827988
+97095000000 97099797338 32365000000 32366599112 2300228928 2301828040
+97098000000 97102797496 32366000000 32367599165 2301228928 2302828093
+97101000000 97105797610 32367000000 32368599203 2302228928 2303828131
+97104000000 97108797771 32368000000 32369599257 2303228928 2304828185
+97107000000 97111797898 32369000000 32370599299 2304228928 2305828227
+97110000000 97114798007 32370000000 32371599335 2305228928 2306828263
+97113000000 97117798149 32371000000 32372599383 2306228928 2307828311
+97116000000 97120798383 32372000000 32373599461 2307228928 2308828389
+97119000000 97123798296 32373000000 32374599432 2308228928 2309828360
+97122000000 97126798417 32374000000 32375599472 2309228928 2310828400
+97125000000 97129798525 32375000000 32376599508 2310228928 2311828436
+97128000000 97132798760 32376000000 32377599586 2311228928 2312828514
+97131000000 97135798939 32377000000 32378599646 2312228928 2313828574
+97134000000 97138712579 32378000000 32379570859 2313228928 2314799787
+97137000000 97141799208 32379000000 32380599736 2314228928 2315828664
+97140000000 97144799381 32380000000 32381599793 2315228928 2316828721
+97143000000 97147799497 32381000000 32382599832 2316228928 2317828760
+97146000000 97150799670 32382000000 32383599890 2317228928 2318828818
+97149000000 97153799842 32383000000 32384599947 2318228928 2319828875
+97152000000 97156799898 32384000000 32385599966 2319228928 2320828894
+97155000000 97159800044 32385000000 32386600014 2320228928 2321828942
+97158000000 97162800240 32386000000 32387600080 2321228928 2322829008
+97161000000 97165800269 32387000000 32388600089 2322228928 2323829017
+97164000000 97168800575 32388000000 32389600191 2323228928 2324829119
+97167000000 97171800747 32389000000 32390600249 2324228928 2325829177
+97170000000 97174800880 32390000000 32391600293 2325228928 2326829221
+97173000000 97177800997 32391000000 32392600332 2326228928 2327829260
+97176000000 97180801182 32392000000 32393600394 2327228928 2328829322
+97179000000 97183801288 32393000000 32394600429 2328228928 2329829357
+97182000000 97186801469 32394000000 32395600489 2329228928 2330829417
+97185000000 97189801681 32395000000 32396600560 2330228928 2331829488
+97188000000 97192801788 32396000000 32397600596 2331228928 2332829524
+97191000000 97195801954 32397000000 32398600651 2332228928 2333829579
+97194000000 97198400699 32398000000 32399466899 2333228928 2334695827
+97197000000 97201802225 32399000000 32400600741 2334228928 2335829669
+97200000000 97204802337 32400000000 32401600779 2335228928 2336829707
+97203000000 97207802546 32401000000 32402600848 2336228928 2337829776
+97206000000 97210802625 32402000000 32403600875 2337228928 2338829803
+97209000000 97213802850 32403000000 32404600950 2338228928 2339829878
+97212000000 97216802977 32404000000 32405600992 2339228928 2340829920
+97215000000 97219803066 32405000000 32406601022 2340228928 2341829950
+97218000000 97222803172 32406000000 32407601057 2341228928 2342829985
+97221000000 97225803383 32407000000 32408601127 2342228928 2343830055
+97224000000 97228803592 32408000000 32409601197 2343228928 2344830125
+97227000000 97231803737 32409000000 32410601245 2344228928 2345830173
+97230000000 97234803863 32410000000 32411601287 2345228928 2346830215
+97233000000 97237804029 32411000000 32412601343 2346228928 2347830271
+97236000000 97240804109 32412000000 32413601369 2347228928 2348830297
+97239000000 97243804344 32413000000 32414601448 2348228928 2349830376
+97242000000 97246804503 32414000000 32415601501 2349228928 2350830429
+97245000000 97249804624 32415000000 32416601541 2350228928 2351830469
+97248000000 97252804784 32416000000 32417601594 2351228928 2352830522
+97251000000 97255804867 32417000000 32418601622 2352228928 2353830550
+97254000000 97258805113 32418000000 32419601704 2353228928 2354830632
+97257000000 97261805236 32419000000 32420601745 2354228928 2355830673
+97260000000 97264805372 32420000000 32421601790 2355228928 2356830718
+97263000000 97267805547 32421000000 32422601849 2356228928 2357830777
+97266000000 97270805669 32422000000 32423601889 2357228928 2358830817
+97269000000 97273805819 32423000000 32424601939 2358228928 2359830867
+97272000000 97276805967 32424000000 32425601989 2359228928 2360830917
+97275000000 97278979661 32425000000 32426326553 2360228928 2361555481
+97278000000 97282806287 32426000000 32427602095 2361228928 2362831023
+97281000000 97285806419 32427000000 32428602139 2362228928 2363831067
+97284000000 97288806593 32428000000 32429602197 2363228928 2364831125
+97287000000 97291806712 32429000000 32430602237 2364228928 2365831165
+97290000000 97294806836 32430000000 32431602278 2365228928 2366831206
+97293000000 97297807055 32431000000 32432602351 2366228928 2367831279
+97296000000 97300807191 32432000000 32433602397 2367228928 2368831325
+97299000000 97303807342 32433000000 32434602447 2368228928 2369831375
+97302000000 97306807492 32434000000 32435602497 2369228928 2370831425
+97305000000 97309807607 32435000000 32436602535 2370228928 2371831463
+97308000000 97312807704 32436000000 32437602568 2371228928 2372831496
+97311000000 97315807912 32437000000 32438602637 2372228928 2373831565
+97314000000 97318808067 32438000000 32439602689 2373228928 2374831617
+97317000000 97321808226 32439000000 32440602742 2374228928 2375831670
+97320000000 97324808400 32440000000 32441602800 2375228928 2376831728
+97323000000 97327808500 32441000000 32442602833 2376228928 2377831761
+97326000000 97330808678 32442000000 32443602892 2377228928 2378831820
+97329000000 97333808827 32443000000 32444602942 2378228928 2379831870
+97332000000 97336808955 32444000000 32445602985 2379228928 2380831913
+97335000000 97339809124 32445000000 32446603041 2380228928 2381831969
+97338000000 97342809244 32446000000 32447603081 2381228928 2382832009
+97341000000 97344636594 32447000000 32448212198 2382228928 2383441126
+97344000000 97348809494 32448000000 32449603164 2383228928 2384832092
+97347000000 97351809752 32449000000 32450603250 2384228928 2385832178
+97350000000 97354809857 32450000000 32451603285 2385228928 2386832213
+97353000000 97357809937 32451000000 32452603312 2386228928 2387832240
+97356000000 97360810084 32452000000 32453603361 2387228928 2388832289
+97359000000 97363810338 32453000000 32454603446 2388228928 2389832374
+97362000000 97366810428 32454000000 32455603476 2389228928 2390832404
+97365000000 97369810673 32455000000 32456603557 2390228928 2391832485
+97368000000 97372810751 32456000000 32457603583 2391228928 2392832511
+97371000000 97375810928 32457000000 32458603642 2392228928 2393832570
+97374000000 97378811074 32458000000 32459603691 2393228928 2394832619
+97377000000 97381811218 32459000000 32460603739 2394228928 2395832667
+97380000000 97383433872 32460000000 32461144624 2395228928 2396373552
+97383000000 97387811533 32461000000 32462603844 2396228928 2397832772
+97386000000 97390811693 32462000000 32463603897 2397228928 2398832825
+97389000000 97393811830 32463000000 32464603943 2398228928 2399832871
+97392000000 97396811988 32464000000 32465603996 2399228928 2400832924
+97395000000 97399812146 32465000000 32466604048 2400228928 2401832976
+97398000000 97402812260 32466000000 32467604086 2401228928 2402833014
+97401000000 97405812421 32467000000 32468604140 2402228928 2403833068
+97404000000 97408812548 32468000000 32469604182 2403228928 2404833110
+97407000000 97411812657 32469000000 32470604219 2404228928 2405833147
+97410000000 97414812799 32470000000 32471604266 2405228928 2406833194
+97413000000 97417813033 32471000000 32472604344 2406228928 2407833272
+97416000000 97420812946 32472000000 32473604315 2407228928 2408833243
+97419000000 97423813067 32473000000 32474604355 2408228928 2409833283
+97422000000 97426813175 32474000000 32475604391 2409228928 2410833319
+97425000000 97429813410 32475000000 32476604470 2410228928 2411833398
+97428000000 97432813589 32476000000 32477604529 2411228928 2412833457
+97431000000 97435727229 32477000000 32478575743 2412228928 2413804671
+97434000000 97438813858 32478000000 32479604619 2413228928 2414833547
+97437000000 97441814031 32479000000 32480604677 2414228928 2415833605
+97440000000 97444814147 32480000000 32481604715 2415228928 2416833643
+97443000000 97447814320 32481000000 32482604773 2416228928 2417833701
+97446000000 97450814492 32482000000 32483604830 2417228928 2418833758
+97449000000 97453814548 32483000000 32484604849 2418228928 2419833777
+97452000000 97456814694 32484000000 32485604898 2419228928 2420833826
+97455000000 97459814890 32485000000 32486604963 2420228928 2421833891
+97458000000 97462814919 32486000000 32487604973 2421228928 2422833901
+97461000000 97465815225 32487000000 32488605075 2422228928 2423834003
+97464000000 97468815397 32488000000 32489605132 2423228928 2424834060
+97467000000 97471815530 32489000000 32490605176 2424228928 2425834104
+97470000000 97474815647 32490000000 32491605215 2425228928 2426834143
+97473000000 97477815832 32491000000 32492605277 2426228928 2427834205
+97476000000 97480815938 32492000000 32493605312 2427228928 2428834240
+97479000000 97483816119 32493000000 32494605373 2428228928 2429834301
+97482000000 97486816331 32494000000 32495605443 2429228928 2430834371
+97485000000 97489816438 32495000000 32496605479 2430228928 2431834407
+97488000000 97492816604 32496000000 32497605534 2431228928 2432834462
+97491000000 97495415349 32497000000 32498471783 2432228928 2433700711
+97494000000 97498816875 32498000000 32499605625 2433228928 2434834553
+97497000000 97501816987 32499000000 32500605662 2434228928 2435834590
+97500000000 97504817196 32500000000 32501605732 2435228928 2436834660
+97503000000 97507817275 32501000000 32502605758 2436228928 2437834686
+97506000000 97510817500 32502000000 32503605833 2437228928 2438834761
+97509000000 97513817627 32503000000 32504605875 2438228928 2439834803
+97512000000 97516817716 32504000000 32505605905 2439228928 2440834833
+97515000000 97519817822 32505000000 32506605940 2440228928 2441834868
+97518000000 97522818033 32506000000 32507606011 2441228928 2442834939
+97521000000 97525818242 32507000000 32508606080 2442228928 2443835008
+97524000000 97528818387 32508000000 32509606129 2443228928 2444835057
+97527000000 97531818513 32509000000 32510606171 2444228928 2445835099
+97530000000 97534818679 32510000000 32511606226 2445228928 2446835154
+97533000000 97537818759 32511000000 32512606253 2446228928 2447835181
+97536000000 97540818994 32512000000 32513606331 2447228928 2448835259
+97539000000 97543819153 32513000000 32514606384 2448228928 2449835312
+97542000000 97546819274 32514000000 32515606424 2449228928 2450835352
+97545000000 97549819434 32515000000 32516606478 2450228928 2451835406
+97548000000 97552819517 32516000000 32517606505 2451228928 2452835433
+97551000000 97555819763 32517000000 32518606587 2452228928 2453835515
+97554000000 97558819886 32518000000 32519606628 2453228928 2454835556
+97557000000 97561820022 32519000000 32520606674 2454228928 2455835602
+97560000000 97564820197 32520000000 32521606732 2455228928 2456835660
+97563000000 97567820319 32521000000 32522606773 2456228928 2457835701
+97566000000 97570820469 32522000000 32523606823 2457228928 2458835751
+97569000000 97573820617 32523000000 32524606872 2458228928 2459835800
+97572000000 97575994311 32524000000 32525331437 2459228928 2460560365
+97575000000 97579820937 32525000000 32526606979 2460228928 2461835907
+97578000000 97582821069 32526000000 32527607023 2461228928 2462835951
+97581000000 97585821243 32527000000 32528607081 2462228928 2463836009
+97584000000 97588821362 32528000000 32529607120 2463228928 2464836048
+97587000000 97591821486 32529000000 32530607162 2464228928 2465836090
+97590000000 97594821705 32530000000 32531607235 2465228928 2466836163
+97593000000 97597821841 32531000000 32532607280 2466228928 2467836208
+97596000000 97600821992 32532000000 32533607330 2467228928 2468836258
+97599000000 97603822142 32533000000 32534607380 2468228928 2469836308
+97602000000 97606822257 32534000000 32535607419 2469228928 2470836347
+97605000000 97609822354 32535000000 32536607451 2470228928 2471836379
+97608000000 97612822562 32536000000 32537607520 2471228928 2472836448
+97611000000 97615822717 32537000000 32538607572 2472228928 2473836500
+97614000000 97618822876 32538000000 32539607625 2473228928 2474836553
+97617000000 97621823050 32539000000 32540607683 2474228928 2475836611
+97620000000 97624823150 32540000000 32541607716 2475228928 2476836644
+97623000000 97627823328 32541000000 32542607776 2476228928 2477836704
+97626000000 97630823477 32542000000 32543607825 2477228928 2478836753
+97629000000 97633823605 32543000000 32544607868 2478228928 2479836796
+97632000000 97636823774 32544000000 32545607924 2479228928 2480836852
+97635000000 97639823894 32545000000 32546607964 2480228928 2481836892
+97638000000 97641651244 32546000000 32547217081 2481228928 2482446009
+97641000000 97645824144 32547000000 32548608048 2482228928 2483836976
+97644000000 97648824402 32548000000 32549608134 2483228928 2484837062
+97647000000 97651824507 32549000000 32550608169 2484228928 2485837097
+97650000000 97654824587 32550000000 32551608195 2485228928 2486837123
+97653000000 97657824734 32551000000 32552608244 2486228928 2487837172
+97656000000 97660824988 32552000000 32553608329 2487228928 2488837257
+97659000000 97663825078 32553000000 32554608359 2488228928 2489837287
+97662000000 97666825323 32554000000 32555608441 2489228928 2490837369
+97665000000 97669825401 32555000000 32556608467 2490228928 2491837395
+97668000000 97672825578 32556000000 32557608526 2491228928 2492837454
+97671000000 97675825724 32557000000 32558608574 2492228928 2493837502
+97674000000 97678825868 32558000000 32559608622 2493228928 2494837550
+97677000000 97680448522 32559000000 32560149507 2494228928 2495378435
+97680000000 97684826183 32560000000 32561608727 2495228928 2496837655
+97683000000 97687826343 32561000000 32562608781 2496228928 2497837709
+97686000000 97690826480 32562000000 32563608826 2497228928 2498837754
+97689000000 97693826638 32563000000 32564608879 2498228928 2499837807
+97692000000 97696826796 32564000000 32565608932 2499228928 2500837860
+97695000000 97699826910 32565000000 32566608970 2500228928 2501837898
+97698000000 97702827071 32566000000 32567609023 2501228928 2502837951
+97701000000 97705827198 32567000000 32568609066 2502228928 2503837994
+97704000000 97708827307 32568000000 32569609102 2503228928 2504838030
+97707000000 97711827449 32569000000 32570609149 2504228928 2505838077
+97710000000 97714827683 32570000000 32571609227 2505228928 2506838155
+97713000000 97717827596 32571000000 32572609198 2506228928 2507838126
+97716000000 97720827717 32572000000 32573609239 2507228928 2508838167
+97719000000 97723827825 32573000000 32574609275 2508228928 2509838203
+97722000000 97726828060 32574000000 32575609353 2509228928 2510838281
+97725000000 97729828239 32575000000 32576609413 2510228928 2511838341
+97728000000 97732741879 32576000000 32577580626 2511228928 2512809554
+97731000000 97735828508 32577000000 32578609502 2512228928 2513838430
+97734000000 97738828681 32578000000 32579609560 2513228928 2514838488
+97737000000 97741828797 32579000000 32580609599 2514228928 2515838527
+97740000000 97744828970 32580000000 32581609656 2515228928 2516838584
+97743000000 97747829142 32581000000 32582609714 2516228928 2517838642
+97746000000 97750829198 32582000000 32583609732 2517228928 2518838660
+97749000000 97753829344 32583000000 32584609781 2518228928 2519838709
+97752000000 97756829540 32584000000 32585609846 2519228928 2520838774
+97755000000 97759829569 32585000000 32586609856 2520228928 2521838784
+97758000000 97762829875 32586000000 32587609958 2521228928 2522838886
+97761000000 97765830047 32587000000 32588610015 2522228928 2523838943
+97764000000 97768830180 32588000000 32589610060 2523228928 2524838988
+97767000000 97771830297 32589000000 32590610099 2524228928 2525839027
+97770000000 97774830482 32590000000 32591610160 2525228928 2526839088
+97773000000 97777830588 32591000000 32592610196 2526228928 2527839124
+97776000000 97780830769 32592000000 32593610256 2527228928 2528839184
+97779000000 97783830981 32593000000 32594610327 2528228928 2529839255
+97782000000 97786831088 32594000000 32595610362 2529228928 2530839290
+97785000000 97789831254 32595000000 32596610418 2530228928 2531839346
+97788000000 97792429999 32596000000 32597476666 2531228928 2532705594
+97791000000 97795831525 32597000000 32598610508 2532228928 2533839436
+97794000000 97798831637 32598000000 32599610545 2533228928 2534839473
+97797000000 97801831846 32599000000 32600610615 2534228928 2535839543
+97800000000 97804831925 32600000000 32601610641 2535228928 2536839569
+97803000000 97807832150 32601000000 32602610716 2536228928 2537839644
+97806000000 97810832277 32602000000 32603610759 2537228928 2538839687
+97809000000 97813832366 32603000000 32604610788 2538228928 2539839716
+97812000000 97816832472 32604000000 32605610824 2539228928 2540839752
+97815000000 97819832683 32605000000 32606610894 2540228928 2541839822
+97818000000 97822832892 32606000000 32607610964 2541228928 2542839892
+97821000000 97825833037 32607000000 32608611012 2542228928 2543839940
+97824000000 97828833163 32608000000 32609611054 2543228928 2544839982
+97827000000 97831833329 32609000000 32610611109 2544228928 2545840037
+97830000000 97834833409 32610000000 32611611136 2545228928 2546840064
+97833000000 97837833644 32611000000 32612611214 2546228928 2547840142
+97836000000 97840833803 32612000000 32613611267 2547228928 2548840195
+97839000000 97843833924 32613000000 32614611308 2548228928 2549840236
+97842000000 97846834084 32614000000 32615611361 2549228928 2550840289
+97845000000 97849834167 32615000000 32616611389 2550228928 2551840317
+97848000000 97852834413 32616000000 32617611471 2551228928 2552840399
+97851000000 97855834536 32617000000 32618611512 2552228928 2553840440
+97854000000 97858834672 32618000000 32619611557 2553228928 2554840485
+97857000000 97861834847 32619000000 32620611615 2554228928 2555840543
+97860000000 97864834969 32620000000 32621611656 2555228928 2556840584
+97863000000 97867835119 32621000000 32622611706 2556228928 2557840634
+97866000000 97870835267 32622000000 32623611755 2557228928 2558840683
+97869000000 97873008961 32623000000 32624336320 2558228928 2559565248
+97872000000 97876835587 32624000000 32625611862 2559228928 2560840790
+97875000000 97879835719 32625000000 32626611906 2560228928 2561840834
+97878000000 97882835893 32626000000 32627611964 2561228928 2562840892
+97881000000 97885836012 32627000000 32628612004 2562228928 2563840932
+97884000000 97888836136 32628000000 32629612045 2563228928 2564840973
+97887000000 97891836355 32629000000 32630612118 2564228928 2565841046
+97890000000 97894836491 32630000000 32631612163 2565228928 2566841091
+97893000000 97897836642 32631000000 32632612214 2566228928 2567841142
+97896000000 97900836792 32632000000 32633612264 2567228928 2568841192
+97899000000 97903836907 32633000000 32634612302 2568228928 2569841230
+97902000000 97906837004 32634000000 32635612334 2569228928 2570841262
+97905000000 97909837212 32635000000 32636612404 2570228928 2571841332
+97908000000 97912837367 32636000000 32637612455 2571228928 2572841383
+97911000000 97915837526 32637000000 32638612508 2572228928 2573841436
+97914000000 97918837700 32638000000 32639612566 2573228928 2574841494
+97917000000 97921837800 32639000000 32640612600 2574228928 2575841528
+97920000000 97924837978 32640000000 32641612659 2575228928 2576841587
+97923000000 97927838127 32641000000 32642612709 2576228928 2577841637
+97926000000 97930838255 32642000000 32643612751 2577228928 2578841679
+97929000000 97933838424 32643000000 32644612808 2578228928 2579841736
+97932000000 97936838544 32644000000 32645612848 2579228928 2580841776
+97935000000 97938665894 32645000000 32646221964 2580228928 2581450892
+97938000000 97942838794 32646000000 32647612931 2581228928 2582841859
+97941000000 97945839052 32647000000 32648613017 2582228928 2583841945
+97944000000 97948839157 32648000000 32649613052 2583228928 2584841980
+97947000000 97951839237 32649000000 32650613079 2584228928 2585842007
+97950000000 97954839384 32650000000 32651613128 2585228928 2586842056
+97953000000 97957839638 32651000000 32652613212 2586228928 2587842140
+97956000000 97960839728 32652000000 32653613242 2587228928 2588842170
+97959000000 97963839973 32653000000 32654613324 2588228928 2589842252
+97962000000 97966840051 32654000000 32655613350 2589228928 2590842278
+97965000000 97969840228 32655000000 32656613409 2590228928 2591842337
+97968000000 97972840374 32656000000 32657613458 2591228928 2592842386
+97971000000 97975840518 32657000000 32658613506 2592228928 2593842434
+97974000000 97977463172 32658000000 32659154390 2593228928 2594383318
+97977000000 97981840833 32659000000 32660613611 2594228928 2595842539
+97980000000 97984840993 32660000000 32661613664 2595228928 2596842592
+97983000000 97987841130 32661000000 32662613710 2596228928 2597842638
+97986000000 97990841288 32662000000 32663613762 2597228928 2598842690
+97989000000 97993841446 32663000000 32664613815 2598228928 2599842743
+97992000000 97996841560 32664000000 32665613853 2599228928 2600842781
+97995000000 97999841721 32665000000 32666613907 2600228928 2601842835
+97998000000 98002841848 32666000000 32667613949 2601228928 2602842877
+98001000000 98005841957 32667000000 32668613985 2602228928 2603842913
+98004000000 98008842099 32668000000 32669614033 2603228928 2604842961
+98007000000 98011842333 32669000000 32670614111 2604228928 2605843039
+98010000000 98014842246 32670000000 32671614082 2605228928 2606843010
+98013000000 98017842367 32671000000 32672614122 2606228928 2607843050
+98016000000 98020842475 32672000000 32673614158 2607228928 2608843086
+98019000000 98023842710 32673000000 32674614236 2608228928 2609843164
+98022000000 98026842889 32674000000 32675614296 2609228928 2610843224
+98025000000 98029756529 32675000000 32676585509 2610228928 2611814437
+98028000000 98032843158 32676000000 32677614386 2611228928 2612843314
+98031000000 98035843331 32677000000 32678614443 2612228928 2613843371
+98034000000 98038843447 32678000000 32679614482 2613228928 2614843410
+98037000000 98041843620 32679000000 32680614540 2614228928 2615843468
+98040000000 98044843792 32680000000 32681614597 2615228928 2616843525
+98043000000 98047843848 32681000000 32682614616 2616228928 2617843544
+98046000000 98050843994 32682000000 32683614664 2617228928 2618843592
+98049000000 98053844190 32683000000 32684614730 2618228928 2619843658
+98052000000 98056844219 32684000000 32685614739 2619228928 2620843667
+98055000000 98059844525 32685000000 32686614841 2620228928 2621843769
+98058000000 98062844697 32686000000 32687614899 2621228928 2622843827
+98061000000 98065844830 32687000000 32688614943 2622228928 2623843871
+98064000000 98068844947 32688000000 32689614982 2623228928 2624843910
+98067000000 98071845132 32689000000 32690615044 2624228928 2625843972
+98070000000 98074845238 32690000000 32691615079 2625228928 2626844007
+98073000000 98077845419 32691000000 32692615139 2626228928 2627844067
+98076000000 98080845631 32692000000 32693615210 2627228928 2628844138
+98079000000 98083845738 32693000000 32694615246 2628228928 2629844174
+98082000000 98086845904 32694000000 32695615301 2629228928 2630844229
+98085000000 98089444649 32695000000 32696481549 2630228928 2631710477
+98088000000 98092846175 32696000000 32697615391 2631228928 2632844319
+98091000000 98095846287 32697000000 32698615429 2632228928 2633844357
+98094000000 98098846496 32698000000 32699615498 2633228928 2634844426
+98097000000 98101846575 32699000000 32700615525 2634228928 2635844453
+98100000000 98104846800 32700000000 32701615600 2635228928 2636844528
+98103000000 98107846927 32701000000 32702615642 2636228928 2637844570
+98106000000 98110847016 32702000000 32703615672 2637228928 2638844600
+98109000000 98113847122 32703000000 32704615707 2638228928 2639844635
+98112000000 98116847333 32704000000 32705615777 2639228928 2640844705
+98115000000 98119847542 32705000000 32706615847 2640228928 2641844775
+98118000000 98122847687 32706000000 32707615895 2641228928 2642844823
+98121000000 98125847813 32707000000 32708615937 2642228928 2643844865
+98124000000 98128847979 32708000000 32709615993 2643228928 2644844921
+98127000000 98131848059 32709000000 32710616019 2644228928 2645844947
+98130000000 98134848294 32710000000 32711616098 2645228928 2646845026
+98133000000 98137848453 32711000000 32712616151 2646228928 2647845079
+98136000000 98140848574 32712000000 32713616191 2647228928 2648845119
+98139000000 98143848734 32713000000 32714616244 2648228928 2649845172
+98142000000 98146848817 32714000000 32715616272 2649228928 2650845200
+98145000000 98149849063 32715000000 32716616354 2650228928 2651845282
+98148000000 98152849186 32716000000 32717616395 2651228928 2652845323
+98151000000 98155849322 32717000000 32718616440 2652228928 2653845368
+98154000000 98158849497 32718000000 32719616499 2653228928 2654845427
+98157000000 98161849619 32719000000 32720616539 2654228928 2655845467
+98160000000 98164849769 32720000000 32721616589 2655228928 2656845517
+98163000000 98167849917 32721000000 32722616639 2656228928 2657845567
+98166000000 98170023611 32722000000 32723341203 2657228928 2658570131
+98169000000 98173850237 32723000000 32724616745 2658228928 2659845673
+98172000000 98176850369 32724000000 32725616789 2659228928 2660845717
+98175000000 98179850543 32725000000 32726616847 2660228928 2661845775
+98178000000 98182850662 32726000000 32727616887 2661228928 2662845815
+98181000000 98185850786 32727000000 32728616928 2662228928 2663845856
+98184000000 98188851005 32728000000 32729617001 2663228928 2664845929
+98187000000 98191851141 32729000000 32730617047 2664228928 2665845975
+98190000000 98194851292 32730000000 32731617097 2665228928 2666846025
+98193000000 98197851442 32731000000 32732617147 2666228928 2667846075
+98196000000 98200851557 32732000000 32733617185 2667228928 2668846113
+98199000000 98203851654 32733000000 32734617218 2668228928 2669846146
+98202000000 98206851862 32734000000 32735617287 2669228928 2670846215
+98205000000 98209852017 32735000000 32736617339 2670228928 2671846267
+98208000000 98212852176 32736000000 32737617392 2671228928 2672846320
+98211000000 98215852350 32737000000 32738617450 2672228928 2673846378
+98214000000 98218852450 32738000000 32739617483 2673228928 2674846411
+98217000000 98221852628 32739000000 32740617542 2674228928 2675846470
+98220000000 98224852777 32740000000 32741617592 2675228928 2676846520
+98223000000 98227852905 32741000000 32742617635 2676228928 2677846563
+98226000000 98230853074 32742000000 32743617691 2677228928 2678846619
+98229000000 98233853194 32743000000 32744617731 2678228928 2679846659
+98232000000 98235680544 32744000000 32745226848 2679228928 2680455776
+98235000000 98239853444 32745000000 32746617814 2680228928 2681846742
+98238000000 98242853702 32746000000 32747617900 2681228928 2682846828
+98241000000 98245853807 32747000000 32748617935 2682228928 2683846863
+98244000000 98248853887 32748000000 32749617962 2683228928 2684846890
+98247000000 98251854034 32749000000 32750618011 2684228928 2685846939
+98250000000 98254854288 32750000000 32751618096 2685228928 2686847024
+98253000000 98257854378 32751000000 32752618126 2686228928 2687847054
+98256000000 98260854623 32752000000 32753618207 2687228928 2688847135
+98259000000 98263854701 32753000000 32754618233 2688228928 2689847161
+98262000000 98266854878 32754000000 32755618292 2689228928 2690847220
+98265000000 98269855024 32755000000 32756618341 2690228928 2691847269
+98268000000 98272855168 32756000000 32757618389 2691228928 2692847317
+98271000000 98274477822 32757000000 32758159274 2692228928 2693388202
+98274000000 98278855483 32758000000 32759618494 2693228928 2694847422
+98277000000 98281855643 32759000000 32760618547 2694228928 2695847475
+98280000000 98284855780 32760000000 32761618593 2695228928 2696847521
+98283000000 98287855938 32761000000 32762618646 2696228928 2697847574
+98286000000 98290856096 32762000000 32763618698 2697228928 2698847626
+98289000000 98293856210 32763000000 32764618736 2698228928 2699847664
+98292000000 98296856371 32764000000 32765618790 2699228928 2700847718
+98295000000 98299856498 32765000000 32766618832 2700228928 2701847760
+98298000000 98302856607 32766000000 32767618869 2701228928 2702847797
+98301000000 98305856749 32767000000 32768618916 2702228928 2703847844
+98304000000 98308856983 32768000000 32769618994 2703228928 2704847922
+98307000000 98311856896 32769000000 32770618965 2704228928 2705847893
+98310000000 98314857017 32770000000 32771619005 2705228928 2706847933
+98313000000 98317857125 32771000000 32772619041 2706228928 2707847969
+98316000000 98320857360 32772000000 32773619120 2707228928 2708848048
+98319000000 98323857539 32773000000 32774619179 2708228928 2709848107
+98322000000 98326771179 32774000000 32775590393 2709228928 2710819321
+98325000000 98329857808 32775000000 32776619269 2710228928 2711848197
+98328000000 98332857981 32776000000 32777619327 2711228928 2712848255
+98331000000 98335858097 32777000000 32778619365 2712228928 2713848293
+98334000000 98338858270 32778000000 32779619423 2713228928 2714848351
+98337000000 98341858442 32779000000 32780619480 2714228928 2715848408
+98340000000 98344858498 32780000000 32781619499 2715228928 2716848427
+98343000000 98347858644 32781000000 32782619548 2716228928 2717848476
+98346000000 98350858840 32782000000 32783619613 2717228928 2718848541
+98349000000 98353858869 32783000000 32784619623 2718228928 2719848551
+98352000000 98356859175 32784000000 32785619725 2719228928 2720848653
+98355000000 98359859347 32785000000 32786619782 2720228928 2721848710
+98358000000 98362859480 32786000000 32787619826 2721228928 2722848754
+98361000000 98365859597 32787000000 32788619865 2722228928 2723848793
+98364000000 98368859782 32788000000 32789619927 2723228928 2724848855
+98367000000 98371859888 32789000000 32790619962 2724228928 2725848890
+98370000000 98374860069 32790000000 32791620023 2725228928 2726848951
+98373000000 98377860281 32791000000 32792620093 2726228928 2727849021
+98376000000 98380860388 32792000000 32793620129 2727228928 2728849057
+98379000000 98383860554 32793000000 32794620184 2728228928 2729849112
+98382000000 98386459299 32794000000 32795486433 2729228928 2730715361
+98385000000 98389860825 32795000000 32796620275 2730228928 2731849203
+98388000000 98392860937 32796000000 32797620312 2731228928 2732849240
+98391000000 98395861146 32797000000 32798620382 2732228928 2733849310
+98394000000 98398861225 32798000000 32799620408 2733228928 2734849336
+98397000000 98401861450 32799000000 32800620483 2734228928 2735849411
+98400000000 98404861577 32800000000 32801620525 2735228928 2736849453
+98403000000 98407861666 32801000000 32802620555 2736228928 2737849483
+98406000000 98410861772 32802000000 32803620590 2737228928 2738849518
+98409000000 98413861983 32803000000 32804620661 2738228928 2739849589
+98412000000 98416862192 32804000000 32805620730 2739228928 2740849658
+98415000000 98419862337 32805000000 32806620779 2740228928 2741849707
+98418000000 98422862463 32806000000 32807620821 2741228928 2742849749
+98421000000 98425862629 32807000000 32808620876 2742228928 2743849804
+98424000000 98428862709 32808000000 32809620903 2743228928 2744849831
+98427000000 98431862944 32809000000 32810620981 2744228928 2745849909
+98430000000 98434863103 32810000000 32811621034 2745228928 2746849962
+98433000000 98437863224 32811000000 32812621074 2746228928 2747850002
+98436000000 98440863384 32812000000 32813621128 2747228928 2748850056
+98439000000 98443863467 32813000000 32814621155 2748228928 2749850083
+98442000000 98446863713 32814000000 32815621237 2749228928 2750850165
+98445000000 98449863836 32815000000 32816621278 2750228928 2751850206
+98448000000 98452863972 32816000000 32817621324 2751228928 2752850252
+98451000000 98455864147 32817000000 32818621382 2752228928 2753850310
+98454000000 98458864269 32818000000 32819621423 2753228928 2754850351
+98457000000 98461864419 32819000000 32820621473 2754228928 2755850401
+98460000000 98464864567 32820000000 32821621522 2755228928 2756850450
+98463000000 98467038261 32821000000 32822346087 2756228928 2757575015
+98466000000 98470864887 32822000000 32823621629 2757228928 2758850557
+98469000000 98473865019 32823000000 32824621673 2758228928 2759850601
+98472000000 98476865193 32824000000 32825621731 2759228928 2760850659
+98475000000 98479865312 32825000000 32826621770 2760228928 2761850698
+98478000000 98482865436 32826000000 32827621812 2761228928 2762850740
+98481000000 98485865655 32827000000 32828621885 2762228928 2763850813
+98484000000 98488865791 32828000000 32829621930 2763228928 2764850858
+98487000000 98491865942 32829000000 32830621980 2764228928 2765850908
+98490000000 98494866092 32830000000 32831622030 2765228928 2766850958
+98493000000 98497866207 32831000000 32832622069 2766228928 2767850997
+98496000000 98500866304 32832000000 32833622101 2767228928 2768851029
+98499000000 98503866512 32833000000 32834622170 2768228928 2769851098
+98502000000 98506866667 32834000000 32835622222 2769228928 2770851150
+98505000000 98509866826 32835000000 32836622275 2770228928 2771851203
+98508000000 98512867000 32836000000 32837622333 2771228928 2772851261
+98511000000 98515867100 32837000000 32838622366 2772228928 2773851294
+98514000000 98518867278 32838000000 32839622426 2773228928 2774851354
+98517000000 98521867427 32839000000 32840622475 2774228928 2775851403
+98520000000 98524867555 32840000000 32841622518 2775228928 2776851446
+98523000000 98527867724 32841000000 32842622574 2776228928 2777851502
+98526000000 98530867844 32842000000 32843622614 2777228928 2778851542
+98529000000 98532695194 32843000000 32844231731 2778228928 2779460659
+98532000000 98536868094 32844000000 32845622698 2779228928 2780851626
+98535000000 98539868352 32845000000 32846622784 2780228928 2781851712
+98538000000 98542868457 32846000000 32847622819 2781228928 2782851747
+98541000000 98545868537 32847000000 32848622845 2782228928 2783851773
+98544000000 98548868684 32848000000 32849622894 2783228928 2784851822
+98547000000 98551868938 32849000000 32850622979 2784228928 2785851907
+98550000000 98554869028 32850000000 32851623009 2785228928 2786851937
+98553000000 98557869273 32851000000 32852623091 2786228928 2787852019
+98556000000 98560869351 32852000000 32853623117 2787228928 2788852045
+98559000000 98563869528 32853000000 32854623176 2788228928 2789852104
+98562000000 98566869674 32854000000 32855623224 2789228928 2790852152
+98565000000 98569869818 32855000000 32856623272 2790228928 2791852200
+98568000000 98571492472 32856000000 32857164157 2791228928 2792393085
+98571000000 98575870133 32857000000 32858623377 2792228928 2793852305
+98574000000 98578870293 32858000000 32859623431 2793228928 2794852359
+98577000000 98581870430 32859000000 32860623476 2794228928 2795852404
+98580000000 98584870588 32860000000 32861623529 2795228928 2796852457
+98583000000 98587870746 32861000000 32862623582 2796228928 2797852510
+98586000000 98590870860 32862000000 32863623620 2797228928 2798852548
+98589000000 98593871021 32863000000 32864623673 2798228928 2799852601
+98592000000 98596871148 32864000000 32865623716 2799228928 2800852644
+98595000000 98599871257 32865000000 32866623752 2800228928 2801852680
+98598000000 98602871399 32866000000 32867623799 2801228928 2802852727
+98601000000 98605871633 32867000000 32868623877 2802228928 2803852805
+98604000000 98608871546 32868000000 32869623848 2803228928 2804852776
+98607000000 98611871667 32869000000 32870623889 2804228928 2805852817
+98610000000 98614871775 32870000000 32871623925 2805228928 2806852853
+98613000000 98617872010 32871000000 32872624003 2806228928 2807852931
+98616000000 98620872189 32872000000 32873624063 2807228928 2808852991
+98619000000 98623785829 32873000000 32874595276 2808228928 2809824204
+98622000000 98626872458 32874000000 32875624152 2809228928 2810853080
+98625000000 98629872631 32875000000 32876624210 2810228928 2811853138
+98628000000 98632872747 32876000000 32877624249 2811228928 2812853177
+98631000000 98635872920 32877000000 32878624306 2812228928 2813853234
+98634000000 98638873092 32878000000 32879624364 2813228928 2814853292
+98637000000 98641873148 32879000000 32880624382 2814228928 2815853310
+98640000000 98644873294 32880000000 32881624431 2815228928 2816853359
+98643000000 98647873490 32881000000 32882624496 2816228928 2817853424
+98646000000 98650873519 32882000000 32883624506 2817228928 2818853434
+98649000000 98653873825 32883000000 32884624608 2818228928 2819853536
+98652000000 98656873997 32884000000 32885624665 2819228928 2820853593
+98655000000 98659874130 32885000000 32886624710 2820228928 2821853638
+98658000000 98662874247 32886000000 32887624749 2821228928 2822853677
+98661000000 98665874432 32887000000 32888624810 2822228928 2823853738
+98664000000 98668874538 32888000000 32889624846 2823228928 2824853774
+98667000000 98671874719 32889000000 32890624906 2824228928 2825853834
+98670000000 98674874931 32890000000 32891624977 2825228928 2826853905
+98673000000 98677875038 32891000000 32892625012 2826228928 2827853940
+98676000000 98680875204 32892000000 32893625068 2827228928 2828853996
+98679000000 98683473949 32893000000 32894491316 2828228928 2829720244
+98682000000 98686875475 32894000000 32895625158 2829228928 2830854086
+98685000000 98689875587 32895000000 32896625195 2830228928 2831854123
+98688000000 98692875796 32896000000 32897625265 2831228928 2832854193
+98691000000 98695875875 32897000000 32898625291 2832228928 2833854219
+98694000000 98698876100 32898000000 32899625366 2833228928 2834854294
+98697000000 98701876227 32899000000 32900625409 2834228928 2835854337
+98700000000 98704876316 32900000000 32901625438 2835228928 2836854366
+98703000000 98707876422 32901000000 32902625474 2836228928 2837854402
+98706000000 98710876633 32902000000 32903625544 2837228928 2838854472
+98709000000 98713876842 32903000000 32904625614 2838228928 2839854542
+98712000000 98716876987 32904000000 32905625662 2839228928 2840854590
+98715000000 98719877113 32905000000 32906625704 2840228928 2841854632
+98718000000 98722877279 32906000000 32907625759 2841228928 2842854687
+98721000000 98725877359 32907000000 32908625786 2842228928 2843854714
+98724000000 98728877594 32908000000 32909625864 2843228928 2844854792
+98727000000 98731877753 32909000000 32910625917 2844228928 2845854845
+98730000000 98734877874 32910000000 32911625958 2845228928 2846854886
+98733000000 98737878034 32911000000 32912626011 2846228928 2847854939
+98736000000 98740878117 32912000000 32913626039 2847228928 2848854967
+98739000000 98743878363 32913000000 32914626121 2848228928 2849855049
+98742000000 98746878486 32914000000 32915626162 2849228928 2850855090
+98745000000 98749878622 32915000000 32916626207 2850228928 2851855135
+98748000000 98752878797 32916000000 32917626265 2851228928 2852855193
+98751000000 98755878919 32917000000 32918626306 2852228928 2853855234
+98754000000 98758879069 32918000000 32919626356 2853228928 2854855284
+98757000000 98761879217 32919000000 32920626405 2854228928 2855855333
+98760000000 98764052911 32920000000 32921350970 2855228928 2856579898
+98763000000 98767879537 32921000000 32922626512 2856228928 2857855440
+98766000000 98770879669 32922000000 32923626556 2857228928 2858855484
+98769000000 98773879843 32923000000 32924626614 2858228928 2859855542
+98772000000 98776879962 32924000000 32925626654 2859228928 2860855582
+98775000000 98779880086 32925000000 32926626695 2860228928 2861855623
+98778000000 98782880305 32926000000 32927626768 2861228928 2862855696
+98781000000 98785880441 32927000000 32928626813 2862228928 2863855741
+98784000000 98788880592 32928000000 32929626864 2863228928 2864855792
+98787000000 98791880742 32929000000 32930626914 2864228928 2865855842
+98790000000 98794880857 32930000000 32931626952 2865228928 2866855880
+98793000000 98797880954 32931000000 32932626984 2866228928 2867855912
+98796000000 98800881162 32932000000 32933627054 2867228928 2868855982
+98799000000 98803881317 32933000000 32934627105 2868228928 2869856033
+98802000000 98806881476 32934000000 32935627158 2869228928 2870856086
+98805000000 98809881650 32935000000 32936627216 2870228928 2871856144
+98808000000 98812881750 32936000000 32937627250 2871228928 2872856178
+98811000000 98815881928 32937000000 32938627309 2872228928 2873856237
+98814000000 98818882077 32938000000 32939627359 2873228928 2874856287
+98817000000 98821882205 32939000000 32940627401 2874228928 2875856329
+98820000000 98824882374 32940000000 32941627458 2875228928 2876856386
+98823000000 98827882494 32941000000 32942627498 2876228928 2877856426
+98826000000 98829709844 32942000000 32943236614 2877228928 2878465542
+98829000000 98833882744 32943000000 32944627581 2878228928 2879856509
+98832000000 98836883002 32944000000 32945627667 2879228928 2880856595
+98835000000 98839883107 32945000000 32946627702 2880228928 2881856630
+98838000000 98842883187 32946000000 32947627729 2881228928 2882856657
+98841000000 98845883334 32947000000 32948627778 2882228928 2883856706
+98844000000 98848883588 32948000000 32949627862 2883228928 2884856790
+98847000000 98851883678 32949000000 32950627892 2884228928 2885856820
+98850000000 98854883923 32950000000 32951627974 2885228928 2886856902
+98853000000 98857884001 32951000000 32952628000 2886228928 2887856928
+98856000000 98860884178 32952000000 32953628059 2887228928 2888856987
+98859000000 98863884324 32953000000 32954628108 2888228928 2889857036
+98862000000 98866884468 32954000000 32955628156 2889228928 2890857084
+98865000000 98868507122 32955000000 32956169040 2890228928 2891397968
+98868000000 98872884783 32956000000 32957628261 2891228928 2892857189
+98871000000 98875884943 32957000000 32958628314 2892228928 2893857242
+98874000000 98878885080 32958000000 32959628360 2893228928 2894857288
+98877000000 98881885238 32959000000 32960628412 2894228928 2895857340
+98880000000 98884885396 32960000000 32961628465 2895228928 2896857393
+98883000000 98887885510 32961000000 32962628503 2896228928 2897857431
+98886000000 98890885671 32962000000 32963628557 2897228928 2898857485
+98889000000 98893885798 32963000000 32964628599 2898228928 2899857527
+98892000000 98896885907 32964000000 32965628635 2899228928 2900857563
+98895000000 98899886049 32965000000 32966628683 2900228928 2901857611
+98898000000 98902886283 32966000000 32967628761 2901228928 2902857689
+98901000000 98905886196 32967000000 32968628732 2902228928 2903857660
+98904000000 98908886317 32968000000 32969628772 2903228928 2904857700
+98907000000 98911886425 32969000000 32970628808 2904228928 2905857736
+98910000000 98914886660 32970000000 32971628886 2905228928 2906857814
+98913000000 98917886839 32971000000 32972628946 2906228928 2907857874
+98916000000 98920800479 32972000000 32973600159 2907228928 2908829087
+98919000000 98923887108 32973000000 32974629036 2908228928 2909857964
+98922000000 98926887281 32974000000 32975629093 2909228928 2910858021
+98925000000 98929887397 32975000000 32976629132 2910228928 2911858060
+98928000000 98932887570 32976000000 32977629190 2911228928 2912858118
+98931000000 98935887742 32977000000 32978629247 2912228928 2913858175
+98934000000 98938887798 32978000000 32979629266 2913228928 2914858194
+98937000000 98941887944 32979000000 32980629314 2914228928 2915858242
+98940000000 98944888140 32980000000 32981629380 2915228928 2916858308
+98943000000 98947888169 32981000000 32982629389 2916228928 2917858317
+98946000000 98950888475 32982000000 32983629491 2917228928 2918858419
+98949000000 98953888647 32983000000 32984629549 2918228928 2919858477
+98952000000 98956888780 32984000000 32985629593 2919228928 2920858521
+98955000000 98959888897 32985000000 32986629632 2920228928 2921858560
+98958000000 98962889082 32986000000 32987629694 2921228928 2922858622
+98961000000 98965889188 32987000000 32988629729 2922228928 2923858657
+98964000000 98968889369 32988000000 32989629789 2923228928 2924858717
+98967000000 98971889581 32989000000 32990629860 2924228928 2925858788
+98970000000 98974889688 32990000000 32991629896 2925228928 2926858824
+98973000000 98977889854 32991000000 32992629951 2926228928 2927858879
+98976000000 98980488599 32992000000 32993496199 2927228928 2928725127
+98979000000 98983890125 32993000000 32994630041 2928228928 2929858969
+98982000000 98986890237 32994000000 32995630079 2929228928 2930859007
+98985000000 98989890446 32995000000 32996630148 2930228928 2931859076
+98988000000 98992890525 32996000000 32997630175 2931228928 2932859103
+98991000000 98995890750 32997000000 32998630250 2932228928 2933859178
+98994000000 98998890877 32998000000 32999630292 2933228928 2934859220
+98997000000 99001890966 32999000000 33000630322 2934228928 2935859250
+99000000000 99004891072 33000000000 33001630357 2935228928 2936859285
+99003000000 99007891283 33001000000 33002630427 2936228928 2937859355
+99006000000 99010891492 33002000000 33003630497 2937228928 2938859425
+99009000000 99013891637 33003000000 33004630545 2938228928 2939859473
+99012000000 99016891763 33004000000 33005630587 2939228928 2940859515
+99015000000 99019891929 33005000000 33006630643 2940228928 2941859571
+99018000000 99022892009 33006000000 33007630669 2941228928 2942859597
+99021000000 99025892244 33007000000 33008630748 2942228928 2943859676
+99024000000 99028892403 33008000000 33009630801 2943228928 2944859729
+99027000000 99031892524 33009000000 33010630841 2944228928 2945859769
+99030000000 99034892684 33010000000 33011630894 2945228928 2946859822
+99033000000 99037892767 33011000000 33012630922 2946228928 2947859850
+99036000000 99040893013 33012000000 33013631004 2947228928 2948859932
+99039000000 99043893136 33013000000 33014631045 2948228928 2949859973
+99042000000 99046893272 33014000000 33015631090 2949228928 2950860018
+99045000000 99049893447 33015000000 33016631149 2950228928 2951860077
+99048000000 99052893569 33016000000 33017631189 2951228928 2952860117
+99051000000 99055893719 33017000000 33018631239 2952228928 2953860167
+99054000000 99058893867 33018000000 33019631289 2953228928 2954860217
+99057000000 99061067561 33019000000 33020355853 2954228928 2955584781
+99060000000 99064894187 33020000000 33021631395 2955228928 2956860323
+99063000000 99067894319 33021000000 33022631439 2956228928 2957860367
+99066000000 99070894493 33022000000 33023631497 2957228928 2958860425
+99069000000 99073894612 33023000000 33024631537 2958228928 2959860465
+99072000000 99076894736 33024000000 33025631578 2959228928 2960860506
+99075000000 99079894955 33025000000 33026631651 2960228928 2961860579
+99078000000 99082895091 33026000000 33027631697 2961228928 2962860625
+99081000000 99085895242 33027000000 33028631747 2962228928 2963860675
+99084000000 99088895392 33028000000 33029631797 2963228928 2964860725
+99087000000 99091895507 33029000000 33030631835 2964228928 2965860763
+99090000000 99094895604 33030000000 33031631868 2965228928 2966860796
+99093000000 99097895812 33031000000 33032631937 2966228928 2967860865
+99096000000 99100895967 33032000000 33033631989 2967228928 2968860917
+99099000000 99103896126 33033000000 33034632042 2968228928 2969860970
+99102000000 99106896300 33034000000 33035632100 2969228928 2970861028
+99105000000 99109896400 33035000000 33036632133 2970228928 2971861061
+99108000000 99112896578 33036000000 33037632192 2971228928 2972861120
+99111000000 99115896727 33037000000 33038632242 2972228928 2973861170
+99114000000 99118896855 33038000000 33039632285 2973228928 2974861213
+99117000000 99121897024 33039000000 33040632341 2974228928 2975861269
+99120000000 99124897144 33040000000 33041632381 2975228928 2976861309
+99123000000 99126724494 33041000000 33042241498 2976228928 2977470426
+99126000000 99130897394 33042000000 33043632464 2977228928 2978861392
+99129000000 99133897652 33043000000 33044632550 2978228928 2979861478
+99132000000 99136897757 33044000000 33045632585 2979228928 2980861513
+99135000000 99139897837 33045000000 33046632612 2980228928 2981861540
+99138000000 99142897984 33046000000 33047632661 2981228928 2982861589
+99141000000 99145898238 33047000000 33048632746 2982228928 2983861674
+99144000000 99148898328 33048000000 33049632776 2983228928 2984861704
+99147000000 99151898573 33049000000 33050632857 2984228928 2985861785
+99150000000 99154898651 33050000000 33051632883 2985228928 2986861811
+99153000000 99157898828 33051000000 33052632942 2986228928 2987861870
+99156000000 99160898974 33052000000 33053632991 2987228928 2988861919
+99159000000 99163899118 33053000000 33054633039 2988228928 2989861967
+99162000000 99165521772 33054000000 33055173924 2989228928 2990402852
+99165000000 99169899433 33055000000 33056633144 2990228928 2991862072
+99168000000 99172899593 33056000000 33057633197 2991228928 2992862125
+99171000000 99175899730 33057000000 33058633243 2992228928 2993862171
+99174000000 99178899888 33058000000 33059633296 2993228928 2994862224
+99177000000 99181900046 33059000000 33060633348 2994228928 2995862276
+99180000000 99184900160 33060000000 33061633386 2995228928 2996862314
+99183000000 99187900321 33061000000 33062633440 2996228928 2997862368
+99186000000 99190900448 33062000000 33063633482 2997228928 2998862410
+99189000000 99193900557 33063000000 33064633519 2998228928 2999862447
+99192000000 99196900699 33064000000 33065633566 2999228928 3000862494
+99195000000 99199900933 33065000000 33066633644 3000228928 3001862572
+99198000000 99202900846 33066000000 33067633615 3001228928 3002862543
+99201000000 99205900967 33067000000 33068633655 3002228928 3003862583
+99204000000 99208901075 33068000000 33069633691 3003228928 3004862619
+99207000000 99211901310 33069000000 33070633770 3004228928 3005862698
+99210000000 99214901489 33070000000 33071633829 3005228928 3006862757
+99213000000 99217815129 33071000000 33072605043 3006228928 3007833971
+99216000000 99220901758 33072000000 33073633919 3007228928 3008862847
+99219000000 99223901931 33073000000 33074633977 3008228928 3009862905
+99222000000 99226902047 33074000000 33075634015 3009228928 3010862943
+99225000000 99229902220 33075000000 33076634073 3010228928 3011863001
+99228000000 99232902392 33076000000 33077634130 3011228928 3012863058
+99231000000 99235902448 33077000000 33078634149 3012228928 3013863077
+99234000000 99238902594 33078000000 33079634198 3013228928 3014863126
+99237000000 99241902790 33079000000 33080634263 3014228928 3015863191
+99240000000 99244902819 33080000000 33081634273 3015228928 3016863201
+99243000000 99247903125 33081000000 33082634375 3016228928 3017863303
+99246000000 99250903297 33082000000 33083634432 3017228928 3018863360
+99249000000 99253903430 33083000000 33084634476 3018228928 3019863404
+99252000000 99256903547 33084000000 33085634515 3019228928 3020863443
+99255000000 99259903732 33085000000 33086634577 3020228928 3021863505
+99258000000 99262903838 33086000000 33087634612 3021228928 3022863540
+99261000000 99265904019 33087000000 33088634673 3022228928 3023863601
+99264000000 99268904231 33088000000 33089634743 3023228928 3024863671
+99267000000 99271904338 33089000000 33090634779 3024228928 3025863707
+99270000000 99274904504 33090000000 33091634834 3025228928 3026863762
+99273000000 99277503249 33091000000 33092501083 3026228928 3027730011
+99276000000 99280904775 33092000000 33093634925 3027228928 3028863853
+99279000000 99283904887 33093000000 33094634962 3028228928 3029863890
+99282000000 99286905096 33094000000 33095635032 3029228928 3030863960
+99285000000 99289905175 33095000000 33096635058 3030228928 3031863986
+99288000000 99292905400 33096000000 33097635133 3031228928 3032864061
+99291000000 99295905527 33097000000 33098635175 3032228928 3033864103
+99294000000 99298905616 33098000000 33099635205 3033228928 3034864133
+99297000000 99301905722 33099000000 33100635240 3034228928 3035864168
+99300000000 99304905933 33100000000 33101635311 3035228928 3036864239
+99303000000 99307906142 33101000000 33102635380 3036228928 3037864308
+99306000000 99310906287 33102000000 33103635429 3037228928 3038864357
+99309000000 99313906413 33103000000 33104635471 3038228928 3039864399
+99312000000 99316906579 33104000000 33105635526 3039228928 3040864454
+99315000000 99319906659 33105000000 33106635553 3040228928 3041864481
+99318000000 99322906894 33106000000 33107635631 3041228928 3042864559
+99321000000 99325907053 33107000000 33108635684 3042228928 3043864612
+99324000000 99328907174 33108000000 33109635724 3043228928 3044864652
+99327000000 99331907334 33109000000 33110635778 3044228928 3045864706
+99330000000 99334907417 33110000000 33111635805 3045228928 3046864733
+99333000000 99337907663 33111000000 33112635887 3046228928 3047864815
+99336000000 99340907786 33112000000 33113635928 3047228928 3048864856
+99339000000 99343907922 33113000000 33114635974 3048228928 3049864902
+99342000000 99346908097 33114000000 33115636032 3049228928 3050864960
+99345000000 99349908219 33115000000 33116636073 3050228928 3051865001
+99348000000 99352908369 33116000000 33117636123 3051228928 3052865051
+99351000000 99355908517 33117000000 33118636172 3052228928 3053865100
+99354000000 99358082211 33118000000 33119360737 3053228928 3054589665
+99357000000 99361908837 33119000000 33120636279 3054228928 3055865207
+99360000000 99364908969 33120000000 33121636323 3055228928 3056865251
+99363000000 99367909143 33121000000 33122636381 3056228928 3057865309
+99366000000 99370909262 33122000000 33123636420 3057228928 3058865348
+99369000000 99373909386 33123000000 33124636462 3058228928 3059865390
+99372000000 99376909605 33124000000 33125636535 3059228928 3060865463
+99375000000 99379909741 33125000000 33126636580 3060228928 3061865508
+99378000000 99382909892 33126000000 33127636630 3061228928 3062865558
+99381000000 99385910042 33127000000 33128636680 3062228928 3063865608
+99384000000 99388910157 33128000000 33129636719 3063228928 3064865647
+99387000000 99391910254 33129000000 33130636751 3064228928 3065865679
+99390000000 99394910462 33130000000 33131636820 3065228928 3066865748
+99393000000 99397910617 33131000000 33132636872 3066228928 3067865800
+99396000000 99400910776 33132000000 33133636925 3067228928 3068865853
+99399000000 99403910950 33133000000 33134636983 3068228928 3069865911
+99402000000 99406911050 33134000000 33135637016 3069228928 3070865944
+99405000000 99409911228 33135000000 33136637076 3070228928 3071866004
+99408000000 99412911377 33136000000 33137637125 3071228928 3072866053
+99411000000 99415911505 33137000000 33138637168 3072228928 3073866096
+99414000000 99418911674 33138000000 33139637224 3073228928 3074866152
+99417000000 99421911794 33139000000 33140637264 3074228928 3075866192
+99420000000 99423739144 33140000000 33141246381 3075228928 3076475309
+99423000000 99427912044 33141000000 33142637348 3076228928 3077866276
+99426000000 99430912302 33142000000 33143637434 3077228928 3078866362
+99429000000 99433912407 33143000000 33144637469 3078228928 3079866397
+99432000000 99436912487 33144000000 33145637495 3079228928 3080866423
+99435000000 99439912634 33145000000 33146637544 3080228928 3081866472
+99438000000 99442912888 33146000000 33147637629 3081228928 3082866557
+99441000000 99445912978 33147000000 33148637659 3082228928 3083866587
+99444000000 99448913223 33148000000 33149637741 3083228928 3084866669
+99447000000 99451913301 33149000000 33150637767 3084228928 3085866695
+99450000000 99454913478 33150000000 33151637826 3085228928 3086866754
+99453000000 99457913624 33151000000 33152637874 3086228928 3087866802
+99456000000 99460913768 33152000000 33153637922 3087228928 3088866850
+99459000000 99462536422 33153000000 33154178807 3088228928 3089407735
+99462000000 99466914083 33154000000 33155638027 3089228928 3090866955
+99465000000 99469914243 33155000000 33156638081 3090228928 3091867009
+99468000000 99472914380 33156000000 33157638126 3091228928 3092867054
+99471000000 99475914538 33157000000 33158638179 3092228928 3093867107
+99474000000 99478914696 33158000000 33159638232 3093228928 3094867160
+99477000000 99481914810 33159000000 33160638270 3094228928 3095867198
+99480000000 99484914971 33160000000 33161638323 3095228928 3096867251
+99483000000 99487915098 33161000000 33162638366 3096228928 3097867294
+99486000000 99490915207 33162000000 33163638402 3097228928 3098867330
+99489000000 99493915349 33163000000 33164638449 3098228928 3099867377
+99492000000 99496915583 33164000000 33165638527 3099228928 3100867455
+99495000000 99499915496 33165000000 33166638498 3100228928 3101867426
+99498000000 99502915617 33166000000 33167638539 3101228928 3102867467
+99501000000 99505915725 33167000000 33168638575 3102228928 3103867503
+99504000000 99508915960 33168000000 33169638653 3103228928 3104867581
+99507000000 99511916139 33169000000 33170638713 3104228928 3105867641
+99510000000 99514829779 33170000000 33171609926 3105228928 3106838854
+99513000000 99517916408 33171000000 33172638802 3106228928 3107867730
+99516000000 99520916581 33172000000 33173638860 3107228928 3108867788
+99519000000 99523916697 33173000000 33174638899 3108228928 3109867827
+99522000000 99526916870 33174000000 33175638956 3109228928 3110867884
+99525000000 99529917042 33175000000 33176639014 3110228928 3111867942
+99528000000 99532917098 33176000000 33177639032 3111228928 3112867960
+99531000000 99535917244 33177000000 33178639081 3112228928 3113868009
+99534000000 99538917440 33178000000 33179639146 3113228928 3114868074
+99537000000 99541917469 33179000000 33180639156 3114228928 3115868084
+99540000000 99544917775 33180000000 33181639258 3115228928 3116868186
+99543000000 99547917947 33181000000 33182639315 3116228928 3117868243
+99546000000 99550918080 33182000000 33183639360 3117228928 3118868288
+99549000000 99553918197 33183000000 33184639399 3118228928 3119868327
+99552000000 99556918382 33184000000 33185639460 3119228928 3120868388
+99555000000 99559918488 33185000000 33186639496 3120228928 3121868424
+99558000000 99562918669 33186000000 33187639556 3121228928 3122868484
+99561000000 99565918881 33187000000 33188639627 3122228928 3123868555
+99564000000 99568918988 33188000000 33189639662 3123228928 3124868590
+99567000000 99571919154 33189000000 33190639718 3124228928 3125868646
+99570000000 99574517899 33190000000 33191505966 3125228928 3126734894
+99573000000 99577919425 33191000000 33192639808 3126228928 3127868736
+99576000000 99580919537 33192000000 33193639845 3127228928 3128868773
+99579000000 99583919746 33193000000 33194639915 3128228928 3129868843
+99582000000 99586919825 33194000000 33195639941 3129228928 3130868869
+99585000000 99589920050 33195000000 33196640016 3130228928 3131868944
+99588000000 99592920177 33196000000 33197640059 3131228928 3132868987
+99591000000 99595920266 33197000000 33198640088 3132228928 3133869016
+99594000000 99598920372 33198000000 33199640124 3133228928 3134869052
+99597000000 99601920583 33199000000 33200640194 3134228928 3135869122
+99600000000 99604920792 33200000000 33201640264 3135228928 3136869192
+99603000000 99607920937 33201000000 33202640312 3136228928 3137869240
+99606000000 99610921063 33202000000 33203640354 3137228928 3138869282
+99609000000 99613921229 33203000000 33204640409 3138228928 3139869337
+99612000000 99616921309 33204000000 33205640436 3139228928 3140869364
+99615000000 99619921544 33205000000 33206640514 3140228928 3141869442
+99618000000 99622921703 33206000000 33207640567 3141228928 3142869495
+99621000000 99625921824 33207000000 33208640608 3142228928 3143869536
+99624000000 99628921984 33208000000 33209640661 3143228928 3144869589
+99627000000 99631922067 33209000000 33210640689 3144228928 3145869617
+99630000000 99634922313 33210000000 33211640771 3145228928 3146869699
+99633000000 99637922436 33211000000 33212640812 3146228928 3147869740
+99636000000 99640922572 33212000000 33213640857 3147228928 3148869785
+99639000000 99643922747 33213000000 33214640915 3148228928 3149869843
+99642000000 99646922869 33214000000 33215640956 3149228928 3150869884
+99645000000 99649923019 33215000000 33216641006 3150228928 3151869934
+99648000000 99652923167 33216000000 33217641055 3151228928 3152869983
+99651000000 99655096861 33217000000 33218365620 3152228928 3153594548
+99654000000 99658923487 33218000000 33219641162 3153228928 3154870090
+99657000000 99661923619 33219000000 33220641206 3154228928 3155870134
+99660000000 99664923793 33220000000 33221641264 3155228928 3156870192
+99663000000 99667923912 33221000000 33222641304 3156228928 3157870232
+99666000000 99670924036 33222000000 33223641345 3157228928 3158870273
+99669000000 99673924255 33223000000 33224641418 3158228928 3159870346
+99672000000 99676924391 33224000000 33225641463 3159228928 3160870391
+99675000000 99679924542 33225000000 33226641514 3160228928 3161870442
+99678000000 99682924692 33226000000 33227641564 3161228928 3162870492
+99681000000 99685924807 33227000000 33228641602 3162228928 3163870530
+99684000000 99688924904 33228000000 33229641634 3163228928 3164870562
+99687000000 99691925112 33229000000 33230641704 3164228928 3165870632
+99690000000 99694925267 33230000000 33231641755 3165228928 3166870683
+99693000000 99697925426 33231000000 33232641808 3166228928 3167870736
+99696000000 99700925600 33232000000 33233641866 3167228928 3168870794
+99699000000 99703925700 33233000000 33234641900 3168228928 3169870828
+99702000000 99706925878 33234000000 33235641959 3169228928 3170870887
+99705000000 99709926027 33235000000 33236642009 3170228928 3171870937
+99708000000 99712926155 33236000000 33237642051 3171228928 3172870979
+99711000000 99715926324 33237000000 33238642108 3172228928 3173871036
+99714000000 99718926444 33238000000 33239642148 3173228928 3174871076
+99717000000 99720753794 33239000000 33240251264 3174228928 3175480192
+99720000000 99724926694 33240000000 33241642231 3175228928 3176871159
+99723000000 99727926952 33241000000 33242642317 3176228928 3177871245
+99726000000 99730927057 33242000000 33243642352 3177228928 3178871280
+99729000000 99733927137 33243000000 33244642379 3178228928 3179871307
+99732000000 99736927284 33244000000 33245642428 3179228928 3180871356
+99735000000 99739927538 33245000000 33246642512 3180228928 3181871440
+99738000000 99742927628 33246000000 33247642542 3181228928 3182871470
+99741000000 99745927873 33247000000 33248642624 3182228928 3183871552
+99744000000 99748927951 33248000000 33249642650 3183228928 3184871578
+99747000000 99751928128 33249000000 33250642709 3184228928 3185871637
+99750000000 99754928274 33250000000 33251642758 3185228928 3186871686
+99753000000 99757928418 33251000000 33252642806 3186228928 3187871734
+99756000000 99759551072 33252000000 33253183690 3187228928 3188412618
+99759000000 99763928733 33253000000 33254642911 3188228928 3189871839
+99762000000 99766928893 33254000000 33255642964 3189228928 3190871892
+99765000000 99769929030 33255000000 33256643010 3190228928 3191871938
+99768000000 99772929188 33256000000 33257643062 3191228928 3192871990
+99771000000 99775929346 33257000000 33258643115 3192228928 3193872043
+99774000000 99778929460 33258000000 33259643153 3193228928 3194872081
+99777000000 99781929621 33259000000 33260643207 3194228928 3195872135
+99780000000 99784929748 33260000000 33261643249 3195228928 3196872177
+99783000000 99787929857 33261000000 33262643285 3196228928 3197872213
+99786000000 99790929999 33262000000 33263643333 3197228928 3198872261
+99789000000 99793930233 33263000000 33264643411 3198228928 3199872339
+99792000000 99796930146 33264000000 33265643382 3199228928 3200872310
+99795000000 99799930267 33265000000 33266643422 3200228928 3201872350
+99798000000 99802930375 33266000000 33267643458 3201228928 3202872386
+99801000000 99805930610 33267000000 33268643536 3202228928 3203872464
+99804000000 99808930789 33268000000 33269643596 3203228928 3204872524
+99807000000 99811844429 33269000000 33270614809 3204228928 3205843737
+99810000000 99814931058 33270000000 33271643686 3205228928 3206872614
+99813000000 99817931231 33271000000 33272643743 3206228928 3207872671
+99816000000 99820931347 33272000000 33273643782 3207228928 3208872710
+99819000000 99823931520 33273000000 33274643840 3208228928 3209872768
+99822000000 99826931692 33274000000 33275643897 3209228928 3210872825
+99825000000 99829931748 33275000000 33276643916 3210228928 3211872844
+99828000000 99832931894 33276000000 33277643964 3211228928 3212872892
+99831000000 99835932090 33277000000 33278644030 3212228928 3213872958
+99834000000 99838932119 33278000000 33279644039 3213228928 3214872967
+99837000000 99841932425 33279000000 33280644141 3214228928 3215873069
+99840000000 99844932597 33280000000 33281644199 3215228928 3216873127
+99843000000 99847932730 33281000000 33282644243 3216228928 3217873171
+99846000000 99850932847 33282000000 33283644282 3217228928 3218873210
+99849000000 99853933032 33283000000 33284644344 3218228928 3219873272
+99852000000 99856933138 33284000000 33285644379 3219228928 3220873307
+99855000000 99859933319 33285000000 33286644439 3220228928 3221873367
+99858000000 99862933531 33286000000 33287644510 3221228928 3222873438
+99861000000 99865933638 33287000000 33288644546 3222228928 3223873474
+99864000000 99868933804 33288000000 33289644601 3223228928 3224873529
+99867000000 99871532549 33289000000 33290510849 3224228928 3225739777
+99870000000 99874934075 33290000000 33291644691 3225228928 3226873619
+99873000000 99877934187 33291000000 33292644729 3226228928 3227873657
+99876000000 99880934396 33292000000 33293644798 3227228928 3228873726
+99879000000 99883934475 33293000000 33294644825 3228228928 3229873753
+99882000000 99886934700 33294000000 33295644900 3229228928 3230873828
+99885000000 99889934827 33295000000 33296644942 3230228928 3231873870
+99888000000 99892934916 33296000000 33297644972 3231228928 3232873900
+99891000000 99895935022 33297000000 33298645007 3232228928 3233873935
+99894000000 99898935233 33298000000 33299645077 3233228928 3234874005
+99897000000 99901935442 33299000000 33300645147 3234228928 3235874075
+99900000000 99904935587 33300000000 33301645195 3235228928 3236874123
+99903000000 99907935713 33301000000 33302645237 3236228928 3237874165
+99906000000 99910935879 33302000000 33303645293 3237228928 3238874221
+99909000000 99913935959 33303000000 33304645319 3238228928 3239874247
+99912000000 99916936194 33304000000 33305645398 3239228928 3240874326
+99915000000 99919936353 33305000000 33306645451 3240228928 3241874379
+99918000000 99922936474 33306000000 33307645491 3241228928 3242874419
+99921000000 99925936634 33307000000 33308645544 3242228928 3243874472
+99924000000 99928936717 33308000000 33309645572 3243228928 3244874500
+99927000000 99931936963 33309000000 33310645654 3244228928 3245874582
+99930000000 99934937086 33310000000 33311645695 3245228928 3246874623
+99933000000 99937937222 33311000000 33312645740 3246228928 3247874668
+99936000000 99940937397 33312000000 33313645799 3247228928 3248874727
+99939000000 99943937519 33313000000 33314645839 3248228928 3249874767
+99942000000 99946937669 33314000000 33315645889 3249228928 3250874817
+99945000000 99949937817 33315000000 33316645939 3250228928 3251874867
+99948000000 99952111511 33316000000 33317370503 3251228928 3252599431
+99951000000 99955938137 33317000000 33318646045 3252228928 3253874973
+99954000000 99958938269 33318000000 33319646089 3253228928 3254875017
+99957000000 99961938443 33319000000 33320646147 3254228928 3255875075
+99960000000 99964938562 33320000000 33321646187 3255228928 3256875115
+99963000000 99967938686 33321000000 33322646228 3256228928 3257875156
+99966000000 99970938905 33322000000 33323646301 3257228928 3258875229
+99969000000 99973939041 33323000000 33324646347 3258228928 3259875275
+99972000000 99976939192 33324000000 33325646397 3259228928 3260875325
+99975000000 99979939342 33325000000 33326646447 3260228928 3261875375
+99978000000 99982939457 33326000000 33327646485 3261228928 3262875413
+99981000000 99985939554 33327000000 33328646518 3262228928 3263875446
+99984000000 99988939762 33328000000 33329646587 3263228928 3264875515
+99987000000 99991939917 33329000000 33330646639 3264228928 3265875567
+99990000000 99994940076 33330000000 33331646692 3265228928 3266875620
+99993000000 99997940250 33331000000 33332646750 3266228928 3267875678
+99996000000 100000940350 33332000000 33333646783 3267228928 3268875711
+99999000000 100003940528 33333000000 33334646842 3268228928 3269875770
+100002000000 100006940677 33334000000 33335646892 3269228928 3270875820
+100005000000 100009940805 33335000000 33336646935 3270228928 3271875863
+100008000000 100012940974 33336000000 33337646991 3271228928 3272875919
+100011000000 100015941094 33337000000 33338647031 3272228928 3273875959
+100014000000 100017768444 33338000000 33339256148 3273228928 3274485076
+100017000000 100021941344 33339000000 33340647114 3274228928 3275876042
+100020000000 100024941602 33340000000 33341647200 3275228928 3276876128
+100023000000 100027941707 33341000000 33342647235 3276228928 3277876163
+100026000000 100030941787 33342000000 33343647262 3277228928 3278876190
+100029000000 100033941934 33343000000 33344647311 3278228928 3279876239
+100032000000 100036942188 33344000000 33345647396 3279228928 3280876324
+100035000000 100039942278 33345000000 33346647426 3280228928 3281876354
+100038000000 100042942523 33346000000 33347647507 3281228928 3282876435
+100041000000 100045942601 33347000000 33348647533 3282228928 3283876461
+100044000000 100048942778 33348000000 33349647592 3283228928 3284876520
+100047000000 100051942924 33349000000 33350647641 3284228928 3285876569
+100050000000 100054943068 33350000000 33351647689 3285228928 3286876617
+100053000000 100056565722 33351000000 33352188574 3286228928 3287417502
+100056000000 100060943383 33352000000 33353647794 3287228928 3288876722
+100059000000 100063943543 33353000000 33354647847 3288228928 3289876775
+100062000000 100066943680 33354000000 33355647893 3289228928 3290876821
+100065000000 100069943838 33355000000 33356647946 3290228928 3291876874
+100068000000 100072943996 33356000000 33357647998 3291228928 3292876926
+100071000000 100075944110 33357000000 33358648036 3292228928 3293876964
+100074000000 100078944271 33358000000 33359648090 3293228928 3294877018
+100077000000 100081944398 33359000000 33360648132 3294228928 3295877060
+100080000000 100084944507 33360000000 33361648169 3295228928 3296877097
+100083000000 100087944649 33361000000 33362648216 3296228928 3297877144
+100086000000 100090944883 33362000000 33363648294 3297228928 3298877222
+100089000000 100093944796 33363000000 33364648265 3298228928 3299877193
+100092000000 100096944917 33364000000 33365648305 3299228928 3300877233
+100095000000 100099945025 33365000000 33366648341 3300228928 3301877269
+100098000000 100102945260 33366000000 33367648420 3301228928 3302877348
+100101000000 100105945439 33367000000 33368648479 3302228928 3303877407
+100104000000 100108859079 33368000000 33369619693 3303228928 3304848621
+100107000000 100111945708 33369000000 33370648569 3304228928 3305877497
+100110000000 100114945881 33370000000 33371648627 3305228928 3306877555
+100113000000 100117945997 33371000000 33372648665 3306228928 3307877593
+100116000000 100120946170 33372000000 33373648723 3307228928 3308877651
+100119000000 100123946342 33373000000 33374648780 3308228928 3309877708
+100122000000 100126946398 33374000000 33375648799 3309228928 3310877727
+100125000000 100129946544 33375000000 33376648848 3310228928 3311877776
+100128000000 100132946740 33376000000 33377648913 3311228928 3312877841
+100131000000 100135946769 33377000000 33378648923 3312228928 3313877851
+100134000000 100138947075 33378000000 33379649025 3313228928 3314877953
+100137000000 100141947247 33379000000 33380649082 3314228928 3315878010
+100140000000 100144947380 33380000000 33381649126 3315228928 3316878054
+100143000000 100147947497 33381000000 33382649165 3316228928 3317878093
+100146000000 100150947682 33382000000 33383649227 3317228928 3318878155
+100149000000 100153947788 33383000000 33384649262 3318228928 3319878190
+100152000000 100156947969 33384000000 33385649323 3319228928 3320878251
+100155000000 100159948181 33385000000 33386649393 3320228928 3321878321
+100158000000 100162948288 33386000000 33387649429 3321228928 3322878357
+100161000000 100165948454 33387000000 33388649484 3322228928 3323878412
+100164000000 100168547199 33388000000 33389515733 3323228928 3324744661
+100167000000 100171948725 33389000000 33390649575 3324228928 3325878503
+100170000000 100174948837 33390000000 33391649612 3325228928 3326878540
+100173000000 100177949046 33391000000 33392649682 3326228928 3327878610
+100176000000 100180949125 33392000000 33393649708 3327228928 3328878636
+100179000000 100183949350 33393000000 33394649783 3328228928 3329878711
+100182000000 100186949477 33394000000 33395649825 3329228928 3330878753
+100185000000 100189949566 33395000000 33396649855 3330228928 3331878783
+100188000000 100192949672 33396000000 33397649890 3331228928 3332878818
+100191000000 100195949883 33397000000 33398649961 3332228928 3333878889
+100194000000 100198950092 33398000000 33399650030 3333228928 3334878958
+100197000000 100201950237 33399000000 33400650079 3334228928 3335879007
+100200000000 100204950363 33400000000 33401650121 3335228928 3336879049
+100203000000 100207950529 33401000000 33402650176 3336228928 3337879104
+100206000000 100210950609 33402000000 33403650203 3337228928 3338879131
+100209000000 100213950844 33403000000 33404650281 3338228928 3339879209
+100212000000 100216951003 33404000000 33405650334 3339228928 3340879262
+100215000000 100219951124 33405000000 33406650374 3340228928 3341879302
+100218000000 100222951284 33406000000 33407650428 3341228928 3342879356
+100221000000 100225951367 33407000000 33408650455 3342228928 3343879383
+100224000000 100228951613 33408000000 33409650537 3343228928 3344879465
+100227000000 100231951736 33409000000 33410650578 3344228928 3345879506
+100230000000 100234951872 33410000000 33411650624 3345228928 3346879552
+100233000000 100237952047 33411000000 33412650682 3346228928 3347879610
+100236000000 100240952169 33412000000 33413650723 3347228928 3348879651
+100239000000 100243952319 33413000000 33414650773 3348228928 3349879701
+100242000000 100246952467 33414000000 33415650822 3349228928 3350879750
+100245000000 100249126161 33415000000 33416375387 3350228928 3351604315
+100248000000 100252952787 33416000000 33417650929 3351228928 3352879857
+100251000000 100255952919 33417000000 33418650973 3352228928 3353879901
+100254000000 100258953093 33418000000 33419651031 3353228928 3354879959
+100257000000 100261953212 33419000000 33420651070 3354228928 3355879998
+100260000000 100264953336 33420000000 33421651112 3355228928 3356880040
+100263000000 100267953555 33421000000 33422651185 3356228928 3357880113
+100266000000 100270953691 33422000000 33423651230 3357228928 3358880158
+100269000000 100273953842 33423000000 33424651280 3358228928 3359880208
+100272000000 100276953992 33424000000 33425651330 3359228928 3360880258
+100275000000 100279954107 33425000000 33426651369 3360228928 3361880297
+100278000000 100282954204 33426000000 33427651401 3361228928 3362880329
+100281000000 100285954412 33427000000 33428651470 3362228928 3363880398
+100284000000 100288954567 33428000000 33429651522 3363228928 3364880450
+100287000000 100291954726 33429000000 33430651575 3364228928 3365880503
+100290000000 100294954900 33430000000 33431651633 3365228928 3366880561
+100293000000 100297955000 33431000000 33432651666 3366228928 3367880594
+100296000000 100300955178 33432000000 33433651726 3367228928 3368880654
+100299000000 100303955327 33433000000 33434651775 3368228928 3369880703
+100302000000 100306955455 33434000000 33435651818 3369228928 3370880746
+100305000000 100309955624 33435000000 33436651874 3370228928 3371880802
+100308000000 100312955744 33436000000 33437651914 3371228928 3372880842
+100311000000 100314783094 33437000000 33438261031 3372228928 3373489959
+100314000000 100318955994 33438000000 33439651998 3373228928 3374880926
+100317000000 100321956252 33439000000 33440652084 3374228928 3375881012
+100320000000 100324956357 33440000000 33441652119 3375228928 3376881047
+100323000000 100327956437 33441000000 33442652145 3376228928 3377881073
+100326000000 100330956584 33442000000 33443652194 3377228928 3378881122
+100329000000 100333956838 33443000000 33444652279 3378228928 3379881207
+100332000000 100336956928 33444000000 33445652309 3379228928 3380881237
+100335000000 100339957173 33445000000 33446652391 3380228928 3381881319
+100338000000 100342957251 33446000000 33447652417 3381228928 3382881345
+100341000000 100345957428 33447000000 33448652476 3382228928 3383881404
+100344000000 100348957574 33448000000 33449652524 3383228928 3384881452
+100347000000 100351957718 33449000000 33450652572 3384228928 3385881500
+100350000000 100353580372 33450000000 33451193457 3385228928 3386422385
+100353000000 100357958033 33451000000 33452652677 3386228928 3387881605
+100356000000 100360958193 33452000000 33453652731 3387228928 3388881659
+100359000000 100363958330 33453000000 33454652776 3388228928 3389881704
+100362000000 100366958488 33454000000 33455652829 3389228928 3390881757
+100365000000 100369958646 33455000000 33456652882 3390228928 3391881810
+100368000000 100372958760 33456000000 33457652920 3391228928 3392881848
+100371000000 100375958921 33457000000 33458652973 3392228928 3393881901
+100374000000 100378959048 33458000000 33459653016 3393228928 3394881944
+100377000000 100381959157 33459000000 33460653052 3394228928 3395881980
+100380000000 100384959299 33460000000 33461653099 3395228928 3396882027
+100383000000 100387959533 33461000000 33462653177 3396228928 3397882105
+100386000000 100390959446 33462000000 33463653148 3397228928 3398882076
+100389000000 100393959567 33463000000 33464653189 3398228928 3399882117
+100392000000 100396959675 33464000000 33465653225 3399228928 3400882153
+100395000000 100399959910 33465000000 33466653303 3400228928 3401882231
+100398000000 100402960089 33466000000 33467653363 3401228928 3402882291
+100401000000 100405873729 33467000000 33468624576 3402228928 3403853504
+100404000000 100408960358 33468000000 33469653452 3403228928 3404882380
+100407000000 100411960531 33469000000 33470653510 3404228928 3405882438
+100410000000 100414960647 33470000000 33471653549 3405228928 3406882477
+100413000000 100417960820 33471000000 33472653606 3406228928 3407882534
+100416000000 100420960992 33472000000 33473653664 3407228928 3408882592
+100419000000 100423961048 33473000000 33474653682 3408228928 3409882610
+100422000000 100426961194 33474000000 33475653731 3409228928 3410882659
+100425000000 100429961390 33475000000 33476653796 3410228928 3411882724
+100428000000 100432961419 33476000000 33477653806 3411228928 3412882734
+100431000000 100435961725 33477000000 33478653908 3412228928 3413882836
+100434000000 100438961897 33478000000 33479653965 3413228928 3414882893
+100437000000 100441962030 33479000000 33480654010 3414228928 3415882938
+100440000000 100444962147 33480000000 33481654049 3415228928 3416882977
+100443000000 100447962332 33481000000 33482654110 3416228928 3417883038
+100446000000 100450962438 33482000000 33483654146 3417228928 3418883074
+100449000000 100453962619 33483000000 33484654206 3418228928 3419883134
+100452000000 100456962831 33484000000 33485654277 3419228928 3420883205
+100455000000 100459962938 33485000000 33486654312 3420228928 3421883240
+100458000000 100462963104 33486000000 33487654368 3421228928 3422883296
+100461000000 100465561849 33487000000 33488520616 3422228928 3423749544
+100464000000 100468963375 33488000000 33489654458 3423228928 3424883386
+100467000000 100471963487 33489000000 33490654495 3424228928 3425883423
+100470000000 100474963696 33490000000 33491654565 3425228928 3426883493
+100473000000 100477963775 33491000000 33492654591 3426228928 3427883519
+100476000000 100480964000 33492000000 33493654666 3427228928 3428883594
+100479000000 100483964127 33493000000 33494654709 3428228928 3429883637
+100482000000 100486964216 33494000000 33495654738 3429228928 3430883666
+100485000000 100489964322 33495000000 33496654774 3430228928 3431883702
+100488000000 100492964533 33496000000 33497654844 3431228928 3432883772
+100491000000 100495964742 33497000000 33498654914 3432228928 3433883842
+100494000000 100498964887 33498000000 33499654962 3433228928 3434883890
+100497000000 100501965013 33499000000 33500655004 3434228928 3435883932
+100500000000 100504965179 33500000000 33501655059 3435228928 3436883987
+100503000000 100507965259 33501000000 33502655086 3436228928 3437884014
+100506000000 100510965494 33502000000 33503655164 3437228928 3438884092
+100509000000 100513965653 33503000000 33504655217 3438228928 3439884145
+100512000000 100516965774 33504000000 33505655258 3439228928 3440884186
+100515000000 100519965934 33505000000 33506655311 3440228928 3441884239
+100518000000 100522966017 33506000000 33507655339 3441228928 3442884267
+100521000000 100525966263 33507000000 33508655421 3442228928 3443884349
+100524000000 100528966386 33508000000 33509655462 3443228928 3444884390
+100527000000 100531966522 33509000000 33510655507 3444228928 3445884435
+100530000000 100534966697 33510000000 33511655565 3445228928 3446884493
+100533000000 100537966819 33511000000 33512655606 3446228928 3447884534
+100536000000 100540966969 33512000000 33513655656 3447228928 3448884584
+100539000000 100543967117 33513000000 33514655705 3448228928 3449884633
+100542000000 100546140811 33514000000 33515380270 3449228928 3450609198
+100545000000 100549967437 33515000000 33516655812 3450228928 3451884740
+100548000000 100552967569 33516000000 33517655856 3451228928 3452884784
+100551000000 100555967743 33517000000 33518655914 3452228928 3453884842
+100554000000 100558967862 33518000000 33519655954 3453228928 3454884882
+100557000000 100561967986 33519000000 33520655995 3454228928 3455884923
+100560000000 100564968205 33520000000 33521656068 3455228928 3456884996
+100563000000 100567968341 33521000000 33522656113 3456228928 3457885041
+100566000000 100570968492 33522000000 33523656164 3457228928 3458885092
+100569000000 100573968642 33523000000 33524656214 3458228928 3459885142
+100572000000 100576968757 33524000000 33525656252 3459228928 3460885180
+100575000000 100579968854 33525000000 33526656284 3460228928 3461885212
+100578000000 100582969062 33526000000 33527656354 3461228928 3462885282
+100581000000 100585969217 33527000000 33528656405 3462228928 3463885333
+100584000000 100588969376 33528000000 33529656458 3463228928 3464885386
+100587000000 100591969550 33529000000 33530656516 3464228928 3465885444
+100590000000 100594969650 33530000000 33531656550 3465228928 3466885478
+100593000000 100597969828 33531000000 33532656609 3466228928 3467885537
+100596000000 100600969977 33532000000 33533656659 3467228928 3468885587
+100599000000 100603970105 33533000000 33534656701 3468228928 3469885629
+100602000000 100606970274 33534000000 33535656758 3469228928 3470885686
+100605000000 100609970394 33535000000 33536656798 3470228928 3471885726
+100608000000 100611797744 33536000000 33537265914 3471228928 3472494842
+100611000000 100615970644 33537000000 33538656881 3472228928 3473885809
+100614000000 100618970902 33538000000 33539656967 3473228928 3474885895
+100617000000 100621971007 33539000000 33540657002 3474228928 3475885930
+100620000000 100624971087 33540000000 33541657029 3475228928 3476885957
+100623000000 100627971234 33541000000 33542657078 3476228928 3477886006
+100626000000 100630971488 33542000000 33543657162 3477228928 3478886090
+100629000000 100633971578 33543000000 33544657192 3478228928 3479886120
+100632000000 100636971823 33544000000 33545657274 3479228928 3480886202
+100635000000 100639971901 33545000000 33546657300 3480228928 3481886228
+100638000000 100642972078 33546000000 33547657359 3481228928 3482886287
+100641000000 100645972224 33547000000 33548657408 3482228928 3483886336
+100644000000 100648972368 33548000000 33549657456 3483228928 3484886384
+100647000000 100650595022 33549000000 33550198340 3484228928 3485427268
+100650000000 100654972683 33550000000 33551657561 3485228928 3486886489
+100653000000 100657972843 33551000000 33552657614 3486228928 3487886542
+100656000000 100660972980 33552000000 33553657660 3487228928 3488886588
+100659000000 100663973138 33553000000 33554657712 3488228928 3489886640
+100662000000 100666973296 33554000000 33555657765 3489228928 3490886693
+100665000000 100669973410 33555000000 33556657803 3490228928 3491886731
+100668000000 100672973571 33556000000 33557657857 3491228928 3492886785
+100671000000 100675973698 33557000000 33558657899 3492228928 3493886827
+100674000000 100678973807 33558000000 33559657935 3493228928 3494886863
+100677000000 100681973949 33559000000 33560657983 3494228928 3495886911
+100680000000 100684974183 33560000000 33561658061 3495228928 3496886989
+100683000000 100687974096 33561000000 33562658032 3496228928 3497886960
+100686000000 100690974217 33562000000 33563658072 3497228928 3498887000
+100689000000 100693974325 33563000000 33564658108 3498228928 3499887036
+100692000000 100696974560 33564000000 33565658186 3499228928 3500887114
+100695000000 100699974739 33565000000 33566658246 3500228928 3501887174
+100698000000 100702888379 33566000000 33567629459 3501228928 3502858387
+100701000000 100705975008 33567000000 33568658336 3502228928 3503887264
+100704000000 100708975181 33568000000 33569658393 3503228928 3504887321
+100707000000 100711975297 33569000000 33570658432 3504228928 3505887360
+100710000000 100714975470 33570000000 33571658490 3505228928 3506887418
+100713000000 100717975642 33571000000 33572658547 3506228928 3507887475
+100716000000 100720975698 33572000000 33573658566 3507228928 3508887494
+100719000000 100723975844 33573000000 33574658614 3508228928 3509887542
+100722000000 100726976040 33574000000 33575658680 3509228928 3510887608
+100725000000 100729976069 33575000000 33576658689 3510228928 3511887617
+100728000000 100732976375 33576000000 33577658791 3511228928 3512887719
+100731000000 100735976547 33577000000 33578658849 3512228928 3513887777
+100734000000 100738976680 33578000000 33579658893 3513228928 3514887821
+100737000000 100741976797 33579000000 33580658932 3514228928 3515887860
+100740000000 100744976982 33580000000 33581658994 3515228928 3516887922
+100743000000 100747977088 33581000000 33582659029 3516228928 3517887957
+100746000000 100750977269 33582000000 33583659089 3517228928 3518888017
+100749000000 100753977481 33583000000 33584659160 3518228928 3519888088
+100752000000 100756977588 33584000000 33585659196 3519228928 3520888124
+100755000000 100759977754 33585000000 33586659251 3520228928 3521888179
+100758000000 100762576499 33586000000 33587525499 3521228928 3522754427
+100761000000 100765978025 33587000000 33588659341 3522228928 3523888269
+100764000000 100768978137 33588000000 33589659379 3523228928 3524888307
+100767000000 100771978346 33589000000 33590659448 3524228928 3525888376
+100770000000 100774978425 33590000000 33591659475 3525228928 3526888403
+100773000000 100777978650 33591000000 33592659550 3526228928 3527888478
+100776000000 100780978777 33592000000 33593659592 3527228928 3528888520
+100779000000 100783978866 33593000000 33594659622 3528228928 3529888550
+100782000000 100786978972 33594000000 33595659657 3529228928 3530888585
+100785000000 100789979183 33595000000 33596659727 3530228928 3531888655
+100788000000 100792979392 33596000000 33597659797 3531228928 3532888725
+100791000000 100795979537 33597000000 33598659845 3532228928 3533888773
+100794000000 100798979663 33598000000 33599659887 3533228928 3534888815
+100797000000 100801979829 33599000000 33600659943 3534228928 3535888871
+100800000000 100804979909 33600000000 33601659969 3535228928 3536888897
+100803000000 100807980144 33601000000 33602660048 3536228928 3537888976
+100806000000 100810980303 33602000000 33603660101 3537228928 3538889029
+100809000000 100813980424 33603000000 33604660141 3538228928 3539889069
+100812000000 100816980584 33604000000 33605660194 3539228928 3540889122
+100815000000 100819980667 33605000000 33606660222 3540228928 3541889150
+100818000000 100822980913 33606000000 33607660304 3541228928 3542889232
+100821000000 100825981036 33607000000 33608660345 3542228928 3543889273
+100824000000 100828981172 33608000000 33609660390 3543228928 3544889318
+100827000000 100831981347 33609000000 33610660449 3544228928 3545889377
+100830000000 100834981469 33610000000 33611660489 3545228928 3546889417
+100833000000 100837981619 33611000000 33612660539 3546228928 3547889467
+100836000000 100840981767 33612000000 33613660589 3547228928 3548889517
+100839000000 100843155461 33613000000 33614385153 3548228928 3549614081
+100842000000 100846982087 33614000000 33615660695 3549228928 3550889623
+100845000000 100849982219 33615000000 33616660739 3550228928 3551889667
+100848000000 100852982393 33616000000 33617660797 3551228928 3552889725
+100851000000 100855982512 33617000000 33618660837 3552228928 3553889765
+100854000000 100858982636 33618000000 33619660878 3553228928 3554889806
+100857000000 100861982855 33619000000 33620660951 3554228928 3555889879
+100860000000 100864982991 33620000000 33621660997 3555228928 3556889925
+100863000000 100867983142 33621000000 33622661047 3556228928 3557889975
+100866000000 100870983292 33622000000 33623661097 3557228928 3558890025
+100869000000 100873983407 33623000000 33624661135 3558228928 3559890063
+100872000000 100876983504 33624000000 33625661168 3559228928 3560890096
+100875000000 100879983712 33625000000 33626661237 3560228928 3561890165
+100878000000 100882983867 33626000000 33627661289 3561228928 3562890217
+100881000000 100885984026 33627000000 33628661342 3562228928 3563890270
+100884000000 100888984200 33628000000 33629661400 3563228928 3564890328
+100887000000 100891984300 33629000000 33630661433 3564228928 3565890361
+100890000000 100894984478 33630000000 33631661492 3565228928 3566890420
+100893000000 100897984627 33631000000 33632661542 3566228928 3567890470
+100896000000 100900984755 33632000000 33633661585 3567228928 3568890513
+100899000000 100903984924 33633000000 33634661641 3568228928 3569890569
+100902000000 100906985044 33634000000 33635661681 3569228928 3570890609
+100905000000 100908812394 33635000000 33636270798 3570228928 3571499726
+100908000000 100912985294 33636000000 33637661764 3571228928 3572890692
+100911000000 100915985552 33637000000 33638661850 3572228928 3573890778
+100914000000 100918985657 33638000000 33639661885 3573228928 3574890813
+100917000000 100921985737 33639000000 33640661912 3574228928 3575890840
+100920000000 100924985884 33640000000 33641661961 3575228928 3576890889
+100923000000 100927986138 33641000000 33642662046 3576228928 3577890974
+100926000000 100930986228 33642000000 33643662076 3577228928 3578891004
+100929000000 100933986473 33643000000 33644662157 3578228928 3579891085
+100932000000 100936986551 33644000000 33645662183 3579228928 3580891111
+100935000000 100939986728 33645000000 33646662242 3580228928 3581891170
+100938000000 100942986874 33646000000 33647662291 3581228928 3582891219
+100941000000 100945987018 33647000000 33648662339 3582228928 3583891267
+100944000000 100947609672 33648000000 33649203224 3583228928 3584432152
+100947000000 100951987333 33649000000 33650662444 3584228928 3585891372
+100950000000 100954987493 33650000000 33651662497 3585228928 3586891425
+100953000000 100957987630 33651000000 33652662543 3586228928 3587891471
+100956000000 100960987788 33652000000 33653662596 3587228928 3588891524
+100959000000 100963987946 33653000000 33654662648 3588228928 3589891576
+100962000000 100966988060 33654000000 33655662686 3589228928 3590891614
+100965000000 100969988221 33655000000 33656662740 3590228928 3591891668
+100968000000 100972988348 33656000000 33657662782 3591228928 3592891710
+100971000000 100975988457 33657000000 33658662819 3592228928 3593891747
+100974000000 100978988599 33658000000 33659662866 3593228928 3594891794
+100977000000 100981988833 33659000000 33660662944 3594228928 3595891872
+100980000000 100984988746 33660000000 33661662915 3595228928 3596891843
+100983000000 100987988867 33661000000 33662662955 3596228928 3597891883
+100986000000 100990988975 33662000000 33663662991 3597228928 3598891919
+100989000000 100993989210 33663000000 33664663070 3598228928 3599891998
+100992000000 100996989389 33664000000 33665663129 3599228928 3600892057
+100995000000 100999903029 33665000000 33666634343 3600228928 3601863271
+100998000000 101002989658 33666000000 33667663219 3601228928 3602892147
+101001000000 101005989831 33667000000 33668663277 3602228928 3603892205
+101004000000 101008989947 33668000000 33669663315 3603228928 3604892243
+101007000000 101011990120 33669000000 33670663373 3604228928 3605892301
+101010000000 101014990292 33670000000 33671663430 3605228928 3606892358
+101013000000 101017990348 33671000000 33672663449 3606228928 3607892377
+101016000000 101020990494 33672000000 33673663498 3607228928 3608892426
+101019000000 101023990690 33673000000 33674663563 3608228928 3609892491
+101022000000 101026990719 33674000000 33675663573 3609228928 3610892501
+101025000000 101029991025 33675000000 33676663675 3610228928 3611892603
+101028000000 101032991197 33676000000 33677663732 3611228928 3612892660
+101031000000 101035991330 33677000000 33678663776 3612228928 3613892704
+101034000000 101038991447 33678000000 33679663815 3613228928 3614892743
+101037000000 101041991632 33679000000 33680663877 3614228928 3615892805
+101040000000 101044991738 33680000000 33681663912 3615228928 3616892840
+101043000000 101047991919 33681000000 33682663973 3616228928 3617892901
+101046000000 101050992131 33682000000 33683664043 3617228928 3618892971
+101049000000 101053992238 33683000000 33684664079 3618228928 3619893007
+101052000000 101056992404 33684000000 33685664134 3619228928 3620893062
+101055000000 101059591149 33685000000 33686530383 3620228928 3621759311
+101058000000 101062992675 33686000000 33687664225 3621228928 3622893153
+101061000000 101065992787 33687000000 33688664262 3622228928 3623893190
+101064000000 101068992996 33688000000 33689664332 3623228928 3624893260
+101067000000 101071993075 33689000000 33690664358 3624228928 3625893286
+101070000000 101074993300 33690000000 33691664433 3625228928 3626893361
+101073000000 101077993427 33691000000 33692664475 3626228928 3627893403
+101076000000 101080993516 33692000000 33693664505 3627228928 3628893433
+101079000000 101083993622 33693000000 33694664540 3628228928 3629893468
+101082000000 101086993833 33694000000 33695664611 3629228928 3630893539
+101085000000 101089994042 33695000000 33696664680 3630228928 3631893608
+101088000000 101092994187 33696000000 33697664729 3631228928 3632893657
+101091000000 101095994313 33697000000 33698664771 3632228928 3633893699
+101094000000 101098994479 33698000000 33699664826 3633228928 3634893754
+101097000000 101101994559 33699000000 33700664853 3634228928 3635893781
+101100000000 101104994794 33700000000 33701664931 3635228928 3636893859
+101103000000 101107994953 33701000000 33702664984 3636228928 3637893912
+101106000000 101110995074 33702000000 33703665024 3637228928 3638893952
+101109000000 101113995234 33703000000 33704665078 3638228928 3639894006
+101112000000 101116995317 33704000000 33705665105 3639228928 3640894033
+101115000000 101119995563 33705000000 33706665187 3640228928 3641894115
+101118000000 101122995686 33706000000 33707665228 3641228928 3642894156
+101121000000 101125995822 33707000000 33708665274 3642228928 3643894202
+101124000000 101128995997 33708000000 33709665332 3643228928 3644894260
+101127000000 101131996119 33709000000 33710665373 3644228928 3645894301
+101130000000 101134996269 33710000000 33711665423 3645228928 3646894351
+101133000000 101137996417 33711000000 33712665472 3646228928 3647894400
+101136000000 101140170111 33712000000 33713390037 3647228928 3648618965
+101139000000 101143996737 33713000000 33714665579 3648228928 3649894507
+101142000000 101146996869 33714000000 33715665623 3649228928 3650894551
+101145000000 101149997043 33715000000 33716665681 3650228928 3651894609
+101148000000 101152997162 33716000000 33717665720 3651228928 3652894648
+101151000000 101155997286 33717000000 33718665762 3652228928 3653894690
+101154000000 101158997505 33718000000 33719665835 3653228928 3654894763
+101157000000 101161997641 33719000000 33720665880 3654228928 3655894808
+101160000000 101164997792 33720000000 33721665930 3655228928 3656894858
+101163000000 101167997942 33721000000 33722665980 3656228928 3657894908
+101166000000 101170998057 33722000000 33723666019 3657228928 3658894947
+101169000000 101173998154 33723000000 33724666051 3658228928 3659894979
+101172000000 101176998362 33724000000 33725666120 3659228928 3660895048
+101175000000 101179998517 33725000000 33726666172 3660228928 3661895100
+101178000000 101182998676 33726000000 33727666225 3661228928 3662895153
+101181000000 101185998850 33727000000 33728666283 3662228928 3663895211
+101184000000 101188998950 33728000000 33729666316 3663228928 3664895244
+101187000000 101191999128 33729000000 33730666376 3664228928 3665895304
+101190000000 101194999277 33730000000 33731666425 3665228928 3666895353
+101193000000 101197999405 33731000000 33732666468 3666228928 3667895396
+101196000000 101200999574 33732000000 33733666524 3667228928 3668895452
+101199000000 101203999694 33733000000 33734666564 3668228928 3669895492
+101202000000 101205827044 33734000000 33735275681 3669228928 3670504609
+101205000000 101209999944 33735000000 33736666648 3670228928 3671895576
+101208000000 101213000202 33736000000 33737666734 3671228928 3672895662
+101211000000 101216000307 33737000000 33738666769 3672228928 3673895697
+101214000000 101219000387 33738000000 33739666795 3673228928 3674895723
+101217000000 101222000534 33739000000 33740666844 3674228928 3675895772
+101220000000 101225000788 33740000000 33741666929 3675228928 3676895857
+101223000000 101228000878 33741000000 33742666959 3676228928 3677895887
+101226000000 101231001123 33742000000 33743667041 3677228928 3678895969
+101229000000 101234001201 33743000000 33744667067 3678228928 3679895995
+101232000000 101237001378 33744000000 33745667126 3679228928 3680896054
+101235000000 101240001524 33745000000 33746667174 3680228928 3681896102
+101238000000 101243001668 33746000000 33747667222 3681228928 3682896150
+101241000000 101244624322 33747000000 33748208107 3682228928 3683437035
+101244000000 101249001983 33748000000 33749667327 3683228928 3684896255
+101247000000 101252002143 33749000000 33750667381 3684228928 3685896309
+101250000000 101255002280 33750000000 33751667426 3685228928 3686896354
+101253000000 101258002438 33751000000 33752667479 3686228928 3687896407
+101256000000 101261002596 33752000000 33753667532 3687228928 3688896460
+101259000000 101264002710 33753000000 33754667570 3688228928 3689896498
+101262000000 101267002871 33754000000 33755667623 3689228928 3690896551
+101265000000 101270002998 33755000000 33756667666 3690228928 3691896594
+101268000000 101273003107 33756000000 33757667702 3691228928 3692896630
+101271000000 101276003249 33757000000 33758667749 3692228928 3693896677
+101274000000 101279003483 33758000000 33759667827 3693228928 3694896755
+101277000000 101282003396 33759000000 33760667798 3694228928 3695896726
+101280000000 101285003517 33760000000 33761667839 3695228928 3696896767
+101283000000 101288003625 33761000000 33762667875 3696228928 3697896803
+101286000000 101291003860 33762000000 33763667953 3697228928 3698896881
+101289000000 101294004039 33763000000 33764668013 3698228928 3699896941
+101292000000 101296917679 33764000000 33765639226 3699228928 3700868154
+101295000000 101300004308 33765000000 33766668102 3700228928 3701897030
+101298000000 101303004481 33766000000 33767668160 3701228928 3702897088
+101301000000 101306004597 33767000000 33768668199 3702228928 3703897127
+101304000000 101309004770 33768000000 33769668256 3703228928 3704897184
+101307000000 101312004942 33769000000 33770668314 3704228928 3705897242
+101310000000 101315004998 33770000000 33771668332 3705228928 3706897260
+101313000000 101318005144 33771000000 33772668381 3706228928 3707897309
+101316000000 101321005340 33772000000 33773668446 3707228928 3708897374
+101319000000 101324005369 33773000000 33774668456 3708228928 3709897384
+101322000000 101327005675 33774000000 33775668558 3709228928 3710897486
+101325000000 101330005847 33775000000 33776668615 3710228928 3711897543
+101328000000 101333005980 33776000000 33777668660 3711228928 3712897588
+101331000000 101336006097 33777000000 33778668699 3712228928 3713897627
+101334000000 101339006282 33778000000 33779668760 3713228928 3714897688
+101337000000 101342006388 33779000000 33780668796 3714228928 3715897724
+101340000000 101345006569 33780000000 33781668856 3715228928 3716897784
+101343000000 101348006781 33781000000 33782668927 3716228928 3717897855
+101346000000 101351006888 33782000000 33783668962 3717228928 3718897890
+101349000000 101354007054 33783000000 33784669018 3718228928 3719897946
+101352000000 101356605799 33784000000 33785535266 3719228928 3720764194
+101355000000 101360007325 33785000000 33786669108 3720228928 3721898036
+101358000000 101363007437 33786000000 33787669145 3721228928 3722898073
+101361000000 101366007646 33787000000 33788669215 3722228928 3723898143
+101364000000 101369007725 33788000000 33789669241 3723228928 3724898169
+101367000000 101372007950 33789000000 33790669316 3724228928 3725898244
+101370000000 101375008077 33790000000 33791669359 3725228928 3726898287
+101373000000 101378008166 33791000000 33792669388 3726228928 3727898316
+101376000000 101381008272 33792000000 33793669424 3727228928 3728898352
+101379000000 101384008483 33793000000 33794669494 3728228928 3729898422
+101382000000 101387008692 33794000000 33795669564 3729228928 3730898492
+101385000000 101390008837 33795000000 33796669612 3730228928 3731898540
+101388000000 101393008963 33796000000 33797669654 3731228928 3732898582
+101391000000 101396009129 33797000000 33798669709 3732228928 3733898637
+101394000000 101399009209 33798000000 33799669736 3733228928 3734898664
+101397000000 101402009444 33799000000 33800669814 3734228928 3735898742
+101400000000 101405009603 33800000000 33801669867 3735228928 3736898795
+101403000000 101408009724 33801000000 33802669908 3736228928 3737898836
+101406000000 101411009884 33802000000 33803669961 3737228928 3738898889
+101409000000 101414009967 33803000000 33804669989 3738228928 3739898917
+101412000000 101417010213 33804000000 33805670071 3739228928 3740898999
+101415000000 101420010336 33805000000 33806670112 3740228928 3741899040
+101418000000 101423010472 33806000000 33807670157 3741228928 3742899085
+101421000000 101426010647 33807000000 33808670215 3742228928 3743899143
+101424000000 101429010769 33808000000 33809670256 3743228928 3744899184
+101427000000 101432010919 33809000000 33810670306 3744228928 3745899234
+101430000000 101435011067 33810000000 33811670355 3745228928 3746899283
+101433000000 101437184761 33811000000 33812394920 3746228928 3747623848
+101436000000 101441011387 33812000000 33813670462 3747228928 3748899390
+101439000000 101444011519 33813000000 33814670506 3748228928 3749899434
+101442000000 101447011693 33814000000 33815670564 3749228928 3750899492
+101445000000 101450011812 33815000000 33816670604 3750228928 3751899532
+101448000000 101453011936 33816000000 33817670645 3751228928 3752899573
+101451000000 101456012155 33817000000 33818670718 3752228928 3753899646
+101454000000 101459012291 33818000000 33819670763 3753228928 3754899691
+101457000000 101462012442 33819000000 33820670814 3754228928 3755899742
+101460000000 101465012592 33820000000 33821670864 3755228928 3756899792
+101463000000 101468012707 33821000000 33822670902 3756228928 3757899830
+101466000000 101471012804 33822000000 33823670934 3757228928 3758899862
+101469000000 101474013012 33823000000 33824671004 3758228928 3759899932
+101472000000 101477013167 33824000000 33825671055 3759228928 3760899983
+101475000000 101480013326 33825000000 33826671108 3760228928 3761900036
+101478000000 101483013500 33826000000 33827671166 3761228928 3762900094
+101481000000 101486013600 33827000000 33828671200 3762228928 3763900128
+101484000000 101489013778 33828000000 33829671259 3763228928 3764900187
+101487000000 101492013927 33829000000 33830671309 3764228928 3765900237
+101490000000 101495014055 33830000000 33831671351 3765228928 3766900279
+101493000000 101498014224 33831000000 33832671408 3766228928 3767900336
+101496000000 101501014344 33832000000 33833671448 3767228928 3768900376
+101499000000 101502841694 33833000000 33834280564 3768228928 3769509492
+101502000000 101507014594 33834000000 33835671531 3769228928 3770900459
+101505000000 101510014852 33835000000 33836671617 3770228928 3771900545
+101508000000 101513014957 33836000000 33837671652 3771228928 3772900580
+101511000000 101516015037 33837000000 33838671679 3772228928 3773900607
+101514000000 101519015184 33838000000 33839671728 3773228928 3774900656
+101517000000 101522015438 33839000000 33840671812 3774228928 3775900740
+101520000000 101525015528 33840000000 33841671842 3775228928 3776900770
+101523000000 101528015773 33841000000 33842671924 3776228928 3777900852
+101526000000 101531015851 33842000000 33843671950 3777228928 3778900878
+101529000000 101534016028 33843000000 33844672009 3778228928 3779900937
+101532000000 101537016174 33844000000 33845672058 3779228928 3780900986
+101535000000 101540016318 33845000000 33846672106 3780228928 3781901034
+101538000000 101541638972 33846000000 33847212990 3781228928 3782441918
+101541000000 101546016633 33847000000 33848672211 3782228928 3783901139
+101544000000 101549016793 33848000000 33849672264 3783228928 3784901192
+101547000000 101552016930 33849000000 33850672310 3784228928 3785901238
+101550000000 101555017088 33850000000 33851672362 3785228928 3786901290
+101553000000 101558017246 33851000000 33852672415 3786228928 3787901343
+101556000000 101561017360 33852000000 33853672453 3787228928 3788901381
+101559000000 101564017521 33853000000 33854672507 3788228928 3789901435
+101562000000 101567017648 33854000000 33855672549 3789228928 3790901477
+101565000000 101570017757 33855000000 33856672585 3790228928 3791901513
+101568000000 101573017899 33856000000 33857672633 3791228928 3792901561
+101571000000 101576018133 33857000000 33858672711 3792228928 3793901639
+101574000000 101579018046 33858000000 33859672682 3793228928 3794901610
+101577000000 101582018167 33859000000 33860672722 3794228928 3795901650
+101580000000 101585018275 33860000000 33861672758 3795228928 3796901686
+101583000000 101588018510 33861000000 33862672836 3796228928 3797901764
+101586000000 101591018689 33862000000 33863672896 3797228928 3798901824
+101589000000 101593932329 33863000000 33864644109 3798228928 3799873037
+101592000000 101597018958 33864000000 33865672986 3799228928 3800901914
+101595000000 101600019131 33865000000 33866673043 3800228928 3801901971
+101598000000 101603019247 33866000000 33867673082 3801228928 3802902010
+101601000000 101606019420 33867000000 33868673140 3802228928 3803902068
+101604000000 101609019592 33868000000 33869673197 3803228928 3804902125
+101607000000 101612019648 33869000000 33870673216 3804228928 3805902144
+101610000000 101615019794 33870000000 33871673264 3805228928 3806902192
+101613000000 101618019990 33871000000 33872673330 3806228928 3807902258
+101616000000 101621020019 33872000000 33873673339 3807228928 3808902267
+101619000000 101624020325 33873000000 33874673441 3808228928 3809902369
+101622000000 101627020497 33874000000 33875673499 3809228928 3810902427
+101625000000 101630020630 33875000000 33876673543 3810228928 3811902471
+101628000000 101633020747 33876000000 33877673582 3811228928 3812902510
+101631000000 101636020932 33877000000 33878673644 3812228928 3813902572
+101634000000 101639021038 33878000000 33879673679 3813228928 3814902607
+101637000000 101642021219 33879000000 33880673739 3814228928 3815902667
+101640000000 101645021431 33880000000 33881673810 3815228928 3816902738
+101643000000 101648021538 33881000000 33882673846 3816228928 3817902774
+101646000000 101651021704 33882000000 33883673901 3817228928 3818902829
+101649000000 101653620449 33883000000 33884540149 3818228928 3819769077
+101652000000 101657021975 33884000000 33885673991 3819228928 3820902919
+101655000000 101660022087 33885000000 33886674029 3820228928 3821902957
+101658000000 101663022296 33886000000 33887674098 3821228928 3822903026
+101661000000 101666022375 33887000000 33888674125 3822228928 3823903053
+101664000000 101669022600 33888000000 33889674200 3823228928 3824903128
+101667000000 101672022727 33889000000 33890674242 3824228928 3825903170
+101670000000 101675022816 33890000000 33891674272 3825228928 3826903200
+101673000000 101678022922 33891000000 33892674307 3826228928 3827903235
+101676000000 101681023133 33892000000 33893674377 3827228928 3828903305
+101679000000 101684023342 33893000000 33894674447 3828228928 3829903375
+101682000000 101687023487 33894000000 33895674495 3829228928 3830903423
+101685000000 101690023613 33895000000 33896674537 3830228928 3831903465
+101688000000 101693023779 33896000000 33897674593 3831228928 3832903521
+101691000000 101696023859 33897000000 33898674619 3832228928 3833903547
+101694000000 101699024094 33898000000 33899674698 3833228928 3834903626
+101697000000 101702024253 33899000000 33900674751 3834228928 3835903679
+101700000000 101705024374 33900000000 33901674791 3835228928 3836903719
+101703000000 101708024534 33901000000 33902674844 3836228928 3837903772
+101706000000 101711024617 33902000000 33903674872 3837228928 3838903800
+101709000000 101714024863 33903000000 33904674954 3838228928 3839903882
+101712000000 101717024986 33904000000 33905674995 3839228928 3840903923
+101715000000 101720025122 33905000000 33906675040 3840228928 3841903968
+101718000000 101723025297 33906000000 33907675099 3841228928 3842904027
+101721000000 101726025419 33907000000 33908675139 3842228928 3843904067
+101724000000 101729025569 33908000000 33909675189 3843228928 3844904117
+101727000000 101732025717 33909000000 33910675239 3844228928 3845904167
+101730000000 101734199411 33910000000 33911399803 3845228928 3846628731
+101733000000 101738026037 33911000000 33912675345 3846228928 3847904273
+101736000000 101741026169 33912000000 33913675389 3847228928 3848904317
+101739000000 101744026343 33913000000 33914675447 3848228928 3849904375
+101742000000 101747026462 33914000000 33915675487 3849228928 3850904415
+101745000000 101750026586 33915000000 33916675528 3850228928 3851904456
+101748000000 101753026805 33916000000 33917675601 3851228928 3852904529
+101751000000 101756026941 33917000000 33918675647 3852228928 3853904575
+101754000000 101759027092 33918000000 33919675697 3853228928 3854904625
+101757000000 101762027242 33919000000 33920675747 3854228928 3855904675
+101760000000 101765027357 33920000000 33921675785 3855228928 3856904713
+101763000000 101768027454 33921000000 33922675818 3856228928 3857904746
+101766000000 101771027662 33922000000 33923675887 3857228928 3858904815
+101769000000 101774027817 33923000000 33924675939 3858228928 3859904867
+101772000000 101777027976 33924000000 33925675992 3859228928 3860904920
+101775000000 101780028150 33925000000 33926676050 3860228928 3861904978
+101778000000 101783028250 33926000000 33927676083 3861228928 3862905011
+101781000000 101786028428 33927000000 33928676142 3862228928 3863905070
+101784000000 101789028577 33928000000 33929676192 3863228928 3864905120
+101787000000 101792028705 33929000000 33930676235 3864228928 3865905163
+101790000000 101795028874 33930000000 33931676291 3865228928 3866905219
+101793000000 101798028994 33931000000 33932676331 3866228928 3867905259
+101796000000 101799856344 33932000000 33933285448 3867228928 3868514376
+101799000000 101804029244 33933000000 33934676414 3868228928 3869905342
+101802000000 101807029502 33934000000 33935676500 3869228928 3870905428
+101805000000 101810029607 33935000000 33936676535 3870228928 3871905463
+101808000000 101813029687 33936000000 33937676562 3871228928 3872905490
+101811000000 101816029834 33937000000 33938676611 3872228928 3873905539
+101814000000 101819030088 33938000000 33939676696 3873228928 3874905624
+101817000000 101822030178 33939000000 33940676726 3874228928 3875905654
+101820000000 101825030423 33940000000 33941676807 3875228928 3876905735
+101823000000 101828030501 33941000000 33942676833 3876228928 3877905761
+101826000000 101831030678 33942000000 33943676892 3877228928 3878905820
+101829000000 101834030824 33943000000 33944676941 3878228928 3879905869
+101832000000 101837030968 33944000000 33945676989 3879228928 3880905917
+101835000000 101838653622 33945000000 33946217874 3880228928 3881446802
+101838000000 101843031283 33946000000 33947677094 3881228928 3882906022
+101841000000 101846031443 33947000000 33948677147 3882228928 3883906075
+101844000000 101849031580 33948000000 33949677193 3883228928 3884906121
+101847000000 101852031738 33949000000 33950677246 3884228928 3885906174
+101850000000 101855031896 33950000000 33951677298 3885228928 3886906226
+101853000000 101858032010 33951000000 33952677336 3886228928 3887906264
+101856000000 101861032171 33952000000 33953677390 3887228928 3888906318
+101859000000 101864032298 33953000000 33954677432 3888228928 3889906360
+101862000000 101867032407 33954000000 33955677469 3889228928 3890906397
+101865000000 101870032549 33955000000 33956677516 3890228928 3891906444
+101868000000 101873032783 33956000000 33957677594 3891228928 3892906522
+101871000000 101876032696 33957000000 33958677565 3892228928 3893906493
+101874000000 101879032817 33958000000 33959677605 3893228928 3894906533
+101877000000 101882032925 33959000000 33960677641 3894228928 3895906569
+101880000000 101885033160 33960000000 33961677720 3895228928 3896906648
+101883000000 101888033339 33961000000 33962677779 3896228928 3897906707
+101886000000 101890946979 33962000000 33963648993 3897228928 3898877921
+101889000000 101894033608 33963000000 33964677869 3898228928 3899906797
+101892000000 101897033781 33964000000 33965677927 3899228928 3900906855
+101895000000 101900033897 33965000000 33966677965 3900228928 3901906893
+101898000000 101903034070 33966000000 33967678023 3901228928 3902906951
+101901000000 101906034242 33967000000 33968678080 3902228928 3903907008
+101904000000 101909034298 33968000000 33969678099 3903228928 3904907027
+101907000000 101912034444 33969000000 33970678148 3904228928 3905907076
+101910000000 101915034640 33970000000 33971678213 3905228928 3906907141
+101913000000 101918034669 33971000000 33972678223 3906228928 3907907151
+101916000000 101921034975 33972000000 33973678325 3907228928 3908907253
+101919000000 101924035147 33973000000 33974678382 3908228928 3909907310
+101922000000 101927035280 33974000000 33975678426 3909228928 3910907354
+101925000000 101930035397 33975000000 33976678465 3910228928 3911907393
+101928000000 101933035582 33976000000 33977678527 3911228928 3912907455
+101931000000 101936035688 33977000000 33978678562 3912228928 3913907490
+101934000000 101939035869 33978000000 33979678623 3913228928 3914907551
+101937000000 101942036081 33979000000 33980678693 3914228928 3915907621
+101940000000 101945036188 33980000000 33981678729 3915228928 3916907657
+101943000000 101948036354 33981000000 33982678784 3916228928 3917907712
+101946000000 101950635099 33982000000 33983545033 3917228928 3918773961
+101949000000 101954036625 33983000000 33984678875 3918228928 3919907803
+101952000000 101957036737 33984000000 33985678912 3919228928 3920907840
+101955000000 101960036946 33985000000 33986678982 3920228928 3921907910
+101958000000 101963037025 33986000000 33987679008 3921228928 3922907936
+101961000000 101966037250 33987000000 33988679083 3922228928 3923908011
+101964000000 101969037377 33988000000 33989679125 3923228928 3924908053
+101967000000 101972037466 33989000000 33990679155 3924228928 3925908083
+101970000000 101975037572 33990000000 33991679190 3925228928 3926908118
+101973000000 101978037783 33991000000 33992679261 3926228928 3927908189
+101976000000 101981037992 33992000000 33993679330 3927228928 3928908258
+101979000000 101984038137 33993000000 33994679379 3928228928 3929908307
+101982000000 101987038263 33994000000 33995679421 3929228928 3930908349
+101985000000 101990038429 33995000000 33996679476 3930228928 3931908404
+101988000000 101993038509 33996000000 33997679503 3931228928 3932908431
+101991000000 101996038744 33997000000 33998679581 3932228928 3933908509
+101994000000 101999038903 33998000000 33999679634 3933228928 3934908562
+101997000000 102002039024 33999000000 34000679674 3934228928 3935908602
+102000000000 102005039184 34000000000 34001679728 3935228928 3936908656
+102003000000 102008039267 34001000000 34002679755 3936228928 3937908683
+102006000000 102011039513 34002000000 34003679837 3937228928 3938908765
+102009000000 102014039636 34003000000 34004679878 3938228928 3939908806
+102012000000 102017039772 34004000000 34005679924 3939228928 3940908852
+102015000000 102020039947 34005000000 34006679982 3940228928 3941908910
+102018000000 102023040069 34006000000 34007680023 3941228928 3942908951
+102021000000 102026040219 34007000000 34008680073 3942228928 3943909001
+102024000000 102029040367 34008000000 34009680122 3943228928 3944909050
+102027000000 102031214061 34009000000 34010404687 3944228928 3945633615
+102030000000 102035040687 34010000000 34011680229 3945228928 3946909157
+102033000000 102038040819 34011000000 34012680273 3946228928 3947909201
+102036000000 102041040993 34012000000 34013680331 3947228928 3948909259
+102039000000 102044041112 34013000000 34014680370 3948228928 3949909298
+102042000000 102047041236 34014000000 34015680412 3949228928 3950909340
+102045000000 102050041455 34015000000 34016680485 3950228928 3951909413
+102048000000 102053041591 34016000000 34017680530 3951228928 3952909458
+102051000000 102056041742 34017000000 34018680580 3952228928 3953909508
+102054000000 102059041892 34018000000 34019680630 3953228928 3954909558
+102057000000 102062042007 34019000000 34020680669 3954228928 3955909597
+102060000000 102065042104 34020000000 34021680701 3955228928 3956909629
+102063000000 102068042312 34021000000 34022680770 3956228928 3957909698
+102066000000 102071042467 34022000000 34023680822 3957228928 3958909750
+102069000000 102074042626 34023000000 34024680875 3958228928 3959909803
+102072000000 102077042800 34024000000 34025680933 3959228928 3960909861
+102075000000 102080042900 34025000000 34026680966 3960228928 3961909894
+102078000000 102083043078 34026000000 34027681026 3961228928 3962909954
+102081000000 102086043227 34027000000 34028681075 3962228928 3963910003
+102084000000 102089043355 34028000000 34029681118 3963228928 3964910046
+102087000000 102092043524 34029000000 34030681174 3964228928 3965910102
+102090000000 102095043644 34030000000 34031681214 3965228928 3966910142
+102093000000 102096870994 34031000000 34032290331 3966228928 3967519259
+102096000000 102101043894 34032000000 34033681298 3967228928 3968910226
+102099000000 102104044152 34033000000 34034681384 3968228928 3969910312
+102102000000 102107044257 34034000000 34035681419 3969228928 3970910347
+102105000000 102110044337 34035000000 34036681445 3970228928 3971910373
+102108000000 102113044484 34036000000 34037681494 3971228928 3972910422
+102111000000 102116044738 34037000000 34038681579 3972228928 3973910507
+102114000000 102119044828 34038000000 34039681609 3973228928 3974910537
+102117000000 102122045073 34039000000 34040681691 3974228928 3975910619
+102120000000 102125045151 34040000000 34041681717 3975228928 3976910645
+102123000000 102128045328 34041000000 34042681776 3976228928 3977910704
+102126000000 102131045474 34042000000 34043681824 3977228928 3978910752
+102129000000 102134045618 34043000000 34044681872 3978228928 3979910800
+102132000000 102135668272 34044000000 34045222757 3979228928 3980451685
+102135000000 102140045933 34045000000 34046681977 3980228928 3981910905
+102138000000 102143046093 34046000000 34047682031 3981228928 3982910959
+102141000000 102146046230 34047000000 34048682076 3982228928 3983911004
+102144000000 102149046388 34048000000 34049682129 3983228928 3984911057
+102147000000 102152046546 34049000000 34050682182 3984228928 3985911110
+102150000000 102155046660 34050000000 34051682220 3985228928 3986911148
+102153000000 102158046821 34051000000 34052682273 3986228928 3987911201
+102156000000 102161046948 34052000000 34053682316 3987228928 3988911244
+102159000000 102164047057 34053000000 34054682352 3988228928 3989911280
+102162000000 102167047199 34054000000 34055682399 3989228928 3990911327
+102165000000 102170047433 34055000000 34056682477 3990228928 3991911405
+102168000000 102173047346 34056000000 34057682448 3991228928 3992911376
+102171000000 102176047467 34057000000 34058682489 3992228928 3993911417
+102174000000 102179047575 34058000000 34059682525 3993228928 3994911453
+102177000000 102182047810 34059000000 34060682603 3994228928 3995911531
+102180000000 102185047989 34060000000 34061682663 3995228928 3996911591
+102183000000 102187961629 34061000000 34062653876 3996228928 3997882804
+102186000000 102191048258 34062000000 34063682752 3997228928 3998911680
+102189000000 102194048431 34063000000 34064682810 3998228928 3999911738
+102192000000 102197048547 34064000000 34065682849 3999228928 4000911777
+102195000000 102200048720 34065000000 34066682906 4000228928 4001911834
+102198000000 102203048892 34066000000 34067682964 4001228928 4002911892
+102201000000 102206048948 34067000000 34068682982 4002228928 4003911910
+102204000000 102209049094 34068000000 34069683031 4003228928 4004911959
+102207000000 102212049290 34069000000 34070683096 4004228928 4005912024
+102210000000 102215049319 34070000000 34071683106 4005228928 4006912034
+102213000000 102218049625 34071000000 34072683208 4006228928 4007912136
+102216000000 102221049797 34072000000 34073683265 4007228928 4008912193
+102219000000 102224049930 34073000000 34074683310 4008228928 4009912238
+102222000000 102227050047 34074000000 34075683349 4009228928 4010912277
+102225000000 102230050232 34075000000 34076683410 4010228928 4011912338
+102228000000 102233050338 34076000000 34077683446 4011228928 4012912374
+102231000000 102236050519 34077000000 34078683506 4012228928 4013912434
+102234000000 102239050731 34078000000 34079683577 4013228928 4014912505
+102237000000 102242050838 34079000000 34080683612 4014228928 4015912540
+102240000000 102245051004 34080000000 34081683668 4015228928 4016912596
+102243000000 102247649749 34081000000 34082549916 4016228928 4017778844
+102246000000 102251051275 34082000000 34083683758 4017228928 4018912686
+102249000000 102254051387 34083000000 34084683795 4018228928 4019912723
+102252000000 102257051596 34084000000 34085683865 4019228928 4020912793
+102255000000 102260051675 34085000000 34086683891 4020228928 4021912819
+102258000000 102263051900 34086000000 34087683966 4021228928 4022912894
+102261000000 102266052027 34087000000 34088684009 4022228928 4023912937
+102264000000 102269052116 34088000000 34089684038 4023228928 4024912966
+102267000000 102272052222 34089000000 34090684074 4024228928 4025913002
+102270000000 102275052433 34090000000 34091684144 4025228928 4026913072
+102273000000 102278052642 34091000000 34092684214 4026228928 4027913142
+102276000000 102281052787 34092000000 34093684262 4027228928 4028913190
+102279000000 102284052913 34093000000 34094684304 4028228928 4029913232
+102282000000 102287053079 34094000000 34095684359 4029228928 4030913287
+102285000000 102290053159 34095000000 34096684386 4030228928 4031913314
+102288000000 102293053394 34096000000 34097684464 4031228928 4032913392
+102291000000 102296053553 34097000000 34098684517 4032228928 4033913445
+102294000000 102299053674 34098000000 34099684558 4033228928 4034913486
+102297000000 102302053834 34099000000 34100684611 4034228928 4035913539
+102300000000 102305053917 34100000000 34101684639 4035228928 4036913567
+102303000000 102308054163 34101000000 34102684721 4036228928 4037913649
+102306000000 102311054286 34102000000 34103684762 4037228928 4038913690
+102309000000 102314054422 34103000000 34104684807 4038228928 4039913735
+102312000000 102317054597 34104000000 34105684865 4039228928 4040913793
+102315000000 102320054719 34105000000 34106684906 4040228928 4041913834
+102318000000 102323054869 34106000000 34107684956 4041228928 4042913884
+102321000000 102326055017 34107000000 34108685005 4042228928 4043913933
+102324000000 102328228711 34108000000 34109409570 4043228928 4044638498
+102327000000 102332055337 34109000000 34110685112 4044228928 4045914040
+102330000000 102335055469 34110000000 34111685156 4045228928 4046914084
+102333000000 102338055643 34111000000 34112685214 4046228928 4047914142
+102336000000 102341055762 34112000000 34113685254 4047228928 4048914182
+102339000000 102344055886 34113000000 34114685295 4048228928 4049914223
+102342000000 102347056105 34114000000 34115685368 4049228928 4050914296
+102345000000 102350056241 34115000000 34116685413 4050228928 4051914341
+102348000000 102353056392 34116000000 34117685464 4051228928 4052914392
+102351000000 102356056542 34117000000 34118685514 4052228928 4053914442
+102354000000 102359056657 34118000000 34119685552 4053228928 4054914480
+102357000000 102362056754 34119000000 34120685584 4054228928 4055914512
+102360000000 102365056962 34120000000 34121685654 4055228928 4056914582
+102363000000 102368057117 34121000000 34122685705 4056228928 4057914633
+102366000000 102371057276 34122000000 34123685758 4057228928 4058914686
+102369000000 102374057450 34123000000 34124685816 4058228928 4059914744
+102372000000 102377057550 34124000000 34125685850 4059228928 4060914778
+102375000000 102380057728 34125000000 34126685909 4060228928 4061914837
+102378000000 102383057877 34126000000 34127685959 4061228928 4062914887
+102381000000 102386058005 34127000000 34128686001 4062228928 4063914929
+102384000000 102389058174 34128000000 34129686058 4063228928 4064914986
+102387000000 102392058294 34129000000 34130686098 4064228928 4065915026
+102390000000 102393885644 34130000000 34131295214 4065228928 4066524142
+102393000000 102398058544 34131000000 34132686181 4066228928 4067915109
+102396000000 102401058802 34132000000 34133686267 4067228928 4068915195
+102399000000 102404058907 34133000000 34134686302 4068228928 4069915230
+102402000000 102407058987 34134000000 34135686329 4069228928 4070915257
+102405000000 102410059134 34135000000 34136686378 4070228928 4071915306
+102408000000 102413059388 34136000000 34137686462 4071228928 4072915390
+102411000000 102416059478 34137000000 34138686492 4072228928 4073915420
+102414000000 102419059723 34138000000 34139686574 4073228928 4074915502
+102417000000 102422059801 34139000000 34140686600 4074228928 4075915528
+102420000000 102425059978 34140000000 34141686659 4075228928 4076915587
+102423000000 102428060124 34141000000 34142686708 4076228928 4077915636
+102426000000 102431060268 34142000000 34143686756 4077228928 4078915684
+102429000000 102432682922 34143000000 34144227640 4078228928 4079456568
+102432000000 102437060583 34144000000 34145686861 4079228928 4080915789
+102435000000 102440060743 34145000000 34146686914 4080228928 4081915842
+102438000000 102443060880 34146000000 34147686960 4081228928 4082915888
+102441000000 102446061038 34147000000 34148687012 4082228928 4083915940
+102444000000 102449061196 34148000000 34149687065 4083228928 4084915993
+102447000000 102452061310 34149000000 34150687103 4084228928 4085916031
+102450000000 102455061471 34150000000 34151687157 4085228928 4086916085
+102453000000 102458061598 34151000000 34152687199 4086228928 4087916127
+102456000000 102461061707 34152000000 34153687235 4087228928 4088916163
+102459000000 102464061849 34153000000 34154687283 4088228928 4089916211
+102462000000 102467062083 34154000000 34155687361 4089228928 4090916289
+102465000000 102470061996 34155000000 34156687332 4090228928 4091916260
+102468000000 102473062117 34156000000 34157687372 4091228928 4092916300
+102471000000 102476062225 34157000000 34158687408 4092228928 4093916336
+102474000000 102479062460 34158000000 34159687486 4093228928 4094916414
+102477000000 102482062639 34159000000 34160687546 4094228928 4095916474
+102480000000 102484976279 34160000000 34161658759 4095228928 4096887687
+102483000000 102488062908 34161000000 34162687636 4096228928 4097916564
+102486000000 102491063081 34162000000 34163687693 4097228928 4098916621
+102489000000 102494063197 34163000000 34164687732 4098228928 4099916660
+102492000000 102497063370 34164000000 34165687790 4099228928 4100916718
+102495000000 102500063542 34165000000 34166687847 4100228928 4101916775
+102498000000 102503063598 34166000000 34167687866 4101228928 4102916794
+102501000000 102506063744 34167000000 34168687914 4102228928 4103916842
+102504000000 102509063940 34168000000 34169687980 4103228928 4104916908
+102507000000 102512063969 34169000000 34170687989 4104228928 4105916917
+102510000000 102515064275 34170000000 34171688091 4105228928 4106917019
+102513000000 102518064447 34171000000 34172688149 4106228928 4107917077
+102516000000 102521064580 34172000000 34173688193 4107228928 4108917121
+102519000000 102524064697 34173000000 34174688232 4108228928 4109917160
+102522000000 102527064882 34174000000 34175688294 4109228928 4110917222
+102525000000 102530064988 34175000000 34176688329 4110228928 4111917257
+102528000000 102533065169 34176000000 34177688389 4111228928 4112917317
+102531000000 102536065381 34177000000 34178688460 4112228928 4113917388
+102534000000 102539065488 34178000000 34179688496 4113228928 4114917424
+102537000000 102542065654 34179000000 34180688551 4114228928 4115917479
+102540000000 102544664399 34180000000 34181554799 4115228928 4116783727
+102543000000 102548065925 34181000000 34182688641 4116228928 4117917569
+102546000000 102551066037 34182000000 34183688679 4117228928 4118917607
+102549000000 102554066246 34183000000 34184688748 4118228928 4119917676
+102552000000 102557066325 34184000000 34185688775 4119228928 4120917703
+102555000000 102560066550 34185000000 34186688850 4120228928 4121917778
+102558000000 102563066677 34186000000 34187688892 4121228928 4122917820
+102561000000 102566066766 34187000000 34188688922 4122228928 4123917850
+102564000000 102569066872 34188000000 34189688957 4123228928 4124917885
+102567000000 102572067083 34189000000 34190689027 4124228928 4125917955
+102570000000 102575067292 34190000000 34191689097 4125228928 4126918025
+102573000000 102578067437 34191000000 34192689145 4126228928 4127918073
+102576000000 102581067563 34192000000 34193689187 4127228928 4128918115
+102579000000 102584067729 34193000000 34194689243 4128228928 4129918171
+102582000000 102587067809 34194000000 34195689269 4129228928 4130918197
+102585000000 102590068044 34195000000 34196689348 4130228928 4131918276
+102588000000 102593068203 34196000000 34197689401 4131228928 4132918329
+102591000000 102596068324 34197000000 34198689441 4132228928 4133918369
+102594000000 102599068484 34198000000 34199689494 4133228928 4134918422
+102597000000 102602068567 34199000000 34200689522 4134228928 4135918450
+102600000000 102605068813 34200000000 34201689604 4135228928 4136918532
+102603000000 102608068936 34201000000 34202689645 4136228928 4137918573
+102606000000 102611069072 34202000000 34203689690 4137228928 4138918618
+102609000000 102614069247 34203000000 34204689749 4138228928 4139918677
+102612000000 102617069369 34204000000 34205689789 4139228928 4140918717
+102615000000 102620069519 34205000000 34206689839 4140228928 4141918767
+102618000000 102623069667 34206000000 34207689889 4141228928 4142918817
+102621000000 102625243361 34207000000 34208414453 4142228928 4143643381
+102624000000 102629069987 34208000000 34209689995 4143228928 4144918923
+102627000000 102632070119 34209000000 34210690039 4144228928 4145918967
+102630000000 102635070293 34210000000 34211690097 4145228928 4146919025
+102633000000 102638070412 34211000000 34212690137 4146228928 4147919065
+102636000000 102641070536 34212000000 34213690178 4147228928 4148919106
+102639000000 102644070755 34213000000 34214690251 4148228928 4149919179
+102642000000 102647070891 34214000000 34215690297 4149228928 4150919225
+102645000000 102650071042 34215000000 34216690347 4150228928 4151919275
+102648000000 102653071192 34216000000 34217690397 4151228928 4152919325
+102651000000 102656071307 34217000000 34218690435 4152228928 4153919363
+102654000000 102659071404 34218000000 34219690468 4153228928 4154919396
+102657000000 102662071612 34219000000 34220690537 4154228928 4155919465
+102660000000 102665071767 34220000000 34221690589 4155228928 4156919517
+102663000000 102668071926 34221000000 34222690642 4156228928 4157919570
+102666000000 102671072100 34222000000 34223690700 4157228928 4158919628
+102669000000 102674072200 34223000000 34224690733 4158228928 4159919661
+102672000000 102677072378 34224000000 34225690792 4159228928 4160919720
+102675000000 102680072527 34225000000 34226690842 4160228928 4161919770
+102678000000 102683072655 34226000000 34227690885 4161228928 4162919813
+102681000000 102686072824 34227000000 34228690941 4162228928 4163919869
+102684000000 102689072944 34228000000 34229690981 4163228928 4164919909
+102687000000 102690900294 34229000000 34230300098 4164228928 4165529026
+102690000000 102695073194 34230000000 34231691064 4165228928 4166919992
+102693000000 102698073452 34231000000 34232691150 4166228928 4167920078
+102696000000 102701073557 34232000000 34233691185 4167228928 4168920113
+102699000000 102704073637 34233000000 34234691212 4168228928 4169920140
+102702000000 102707073784 34234000000 34235691261 4169228928 4170920189
+102705000000 102710074038 34235000000 34236691346 4170228928 4171920274
+102708000000 102713074128 34236000000 34237691376 4171228928 4172920304
+102711000000 102716074373 34237000000 34238691457 4172228928 4173920385
+102714000000 102719074451 34238000000 34239691483 4173228928 4174920411
+102717000000 102722074628 34239000000 34240691542 4174228928 4175920470
+102720000000 102725074774 34240000000 34241691591 4175228928 4176920519
+102723000000 102728074918 34241000000 34242691639 4176228928 4177920567
+102726000000 102729697572 34242000000 34243232524 4177228928 4178461452
+102729000000 102734075233 34243000000 34244691744 4178228928 4179920672
+102732000000 102737075393 34244000000 34245691797 4179228928 4180920725
+102735000000 102740075530 34245000000 34246691843 4180228928 4181920771
+102738000000 102743075688 34246000000 34247691896 4181228928 4182920824
+102741000000 102746075846 34247000000 34248691948 4182228928 4183920876
+102744000000 102749075960 34248000000 34249691986 4183228928 4184920914
+102747000000 102752076121 34249000000 34250692040 4184228928 4185920968
+102750000000 102755076248 34250000000 34251692082 4185228928 4186921010
+102753000000 102758076357 34251000000 34252692119 4186228928 4187921047
+102756000000 102761076499 34252000000 34253692166 4187228928 4188921094
+102759000000 102764076733 34253000000 34254692244 4188228928 4189921172
+102762000000 102767076646 34254000000 34255692215 4189228928 4190921143
+102765000000 102770076767 34255000000 34256692255 4190228928 4191921183
+102768000000 102773076875 34256000000 34257692291 4191228928 4192921219
+102771000000 102776077110 34257000000 34258692370 4192228928 4193921298
+102774000000 102779077289 34258000000 34259692429 4193228928 4194921357
+102777000000 102781990929 34259000000 34260663643 4194228928 4195892571
+102780000000 102785077558 34260000000 34261692519 4195228928 4196921447
+102783000000 102788077731 34261000000 34262692577 4196228928 4197921505
+102786000000 102791077847 34262000000 34263692615 4197228928 4198921543
+102789000000 102794078020 34263000000 34264692673 4198228928 4199921601
+102792000000 102797078192 34264000000 34265692730 4199228928 4200921658
+102795000000 102800078248 34265000000 34266692749 4200228928 4201921677
+102798000000 102803078394 34266000000 34267692798 4201228928 4202921726
+102801000000 102806078590 34267000000 34268692863 4202228928 4203921791
+102804000000 102809078619 34268000000 34269692873 4203228928 4204921801
+102807000000 102812078925 34269000000 34270692975 4204228928 4205921903
+102810000000 102815079097 34270000000 34271693032 4205228928 4206921960
+102813000000 102818079230 34271000000 34272693076 4206228928 4207922004
+102816000000 102821079347 34272000000 34273693115 4207228928 4208922043
+102819000000 102824079532 34273000000 34274693177 4208228928 4209922105
+102822000000 102827079638 34274000000 34275693212 4209228928 4210922140
+102825000000 102830079819 34275000000 34276693273 4210228928 4211922201
+102828000000 102833080031 34276000000 34277693343 4211228928 4212922271
+102831000000 102836080138 34277000000 34278693379 4212228928 4213922307
+102834000000 102839080304 34278000000 34279693434 4213228928 4214922362
+102837000000 102841679049 34279000000 34280559683 4214228928 4215788611
+102840000000 102845080575 34280000000 34281693525 4215228928 4216922453
+102843000000 102848080687 34281000000 34282693562 4216228928 4217922490
+102846000000 102851080896 34282000000 34283693632 4217228928 4218922560
+102849000000 102854080975 34283000000 34284693658 4218228928 4219922586
+102852000000 102857081200 34284000000 34285693733 4219228928 4220922661
+102855000000 102860081327 34285000000 34286693775 4220228928 4221922703
+102858000000 102863081416 34286000000 34287693805 4221228928 4222922733
+102861000000 102866081522 34287000000 34288693840 4222228928 4223922768
+102864000000 102869081733 34288000000 34289693911 4223228928 4224922839
+102867000000 102872081942 34289000000 34290693980 4224228928 4225922908
+102870000000 102875082087 34290000000 34291694029 4225228928 4226922957
+102873000000 102878082213 34291000000 34292694071 4226228928 4227922999
+102876000000 102881082379 34292000000 34293694126 4227228928 4228923054
+102879000000 102884082459 34293000000 34294694153 4228228928 4229923081
+102882000000 102887082694 34294000000 34295694231 4229228928 4230923159
+102885000000 102890082853 34295000000 34296694284 4230228928 4231923212
+102888000000 102893082974 34296000000 34297694324 4231228928 4232923252
+102891000000 102896083134 34297000000 34298694378 4232228928 4233923306
+102894000000 102899083217 34298000000 34299694405 4233228928 4234923333
+102897000000 102902083463 34299000000 34300694487 4234228928 4235923415
+102900000000 102905083586 34300000000 34301694528 4235228928 4236923456
+102903000000 102908083722 34301000000 34302694574 4236228928 4237923502
+102906000000 102911083897 34302000000 34303694632 4237228928 4238923560
+102909000000 102914084019 34303000000 34304694673 4238228928 4239923601
+102912000000 102917084169 34304000000 34305694723 4239228928 4240923651
+102915000000 102920084317 34305000000 34306694772 4240228928 4241923700
+102918000000 102922258011 34306000000 34307419337 4241228928 4242648265
+102921000000 102926084637 34307000000 34308694879 4242228928 4243923807
+102924000000 102929084769 34308000000 34309694923 4243228928 4244923851
+102927000000 102932084943 34309000000 34310694981 4244228928 4245923909
+102930000000 102935085062 34310000000 34311695020 4245228928 4246923948
+102933000000 102938085186 34311000000 34312695062 4246228928 4247923990
+102936000000 102941085405 34312000000 34313695135 4247228928 4248924063
+102939000000 102944085541 34313000000 34314695180 4248228928 4249924108
+102942000000 102947085692 34314000000 34315695230 4249228928 4250924158
+102945000000 102950085842 34315000000 34316695280 4250228928 4251924208
+102948000000 102953085957 34316000000 34317695319 4251228928 4252924247
+102951000000 102956086054 34317000000 34318695351 4252228928 4253924279
+102954000000 102959086262 34318000000 34319695420 4253228928 4254924348
+102957000000 102962086417 34319000000 34320695472 4254228928 4255924400
+102960000000 102965086576 34320000000 34321695525 4255228928 4256924453
+102963000000 102968086750 34321000000 34322695583 4256228928 4257924511
+102966000000 102971086850 34322000000 34323695616 4257228928 4258924544
+102969000000 102974087028 34323000000 34324695676 4258228928 4259924604
+102972000000 102977087177 34324000000 34325695725 4259228928 4260924653
+102975000000 102980087305 34325000000 34326695768 4260228928 4261924696
+102978000000 102983087474 34326000000 34327695824 4261228928 4262924752
+102981000000 102986087594 34327000000 34328695864 4262228928 4263924792
+102984000000 102987914944 34328000000 34329304981 4263228928 4264533909
+102987000000 102992087844 34329000000 34330695948 4264228928 4265924876
+102990000000 102995088102 34330000000 34331696034 4265228928 4266924962
+102993000000 102998088207 34331000000 34332696069 4266228928 4267924997
+102996000000 103001088287 34332000000 34333696095 4267228928 4268925023
+102999000000 103004088434 34333000000 34334696144 4268228928 4269925072
+103002000000 103007088688 34334000000 34335696229 4269228928 4270925157
+103005000000 103010088778 34335000000 34336696259 4270228928 4271925187
+103008000000 103013089023 34336000000 34337696341 4271228928 4272925269
+103011000000 103016089101 34337000000 34338696367 4272228928 4273925295
+103014000000 103019089278 34338000000 34339696426 4273228928 4274925354
+103017000000 103022089424 34339000000 34340696474 4274228928 4275925402
+103020000000 103025089568 34340000000 34341696522 4275228928 4276925450
+103023000000 103026712222 34341000000 34342237407 4276228928 4277466335
+103026000000 103031089883 34342000000 34343696627 4277228928 4278925555
+103029000000 103034090043 34343000000 34344696681 4278228928 4279925609
+103032000000 103037090180 34344000000 34345696726 4279228928 4280925654
+103035000000 103040090338 34345000000 34346696779 4280228928 4281925707
+103038000000 103043090496 34346000000 34347696832 4281228928 4282925760
+103041000000 103046090610 34347000000 34348696870 4282228928 4283925798
+103044000000 103049090771 34348000000 34349696923 4283228928 4284925851
+103047000000 103052090898 34349000000 34350696966 4284228928 4285925894
+103050000000 103055091007 34350000000 34351697002 4285228928 4286925930
+103053000000 103058091149 34351000000 34352697049 4286228928 4287925977
+103056000000 103061091383 34352000000 34353697127 4287228928 4288926055
+103059000000 103064091296 34353000000 34354697098 4288228928 4289926026
+103062000000 103067091417 34354000000 34355697139 4289228928 4290926067
+103065000000 103070091525 34355000000 34356697175 4290228928 4291926103
+103068000000 103073091760 34356000000 34357697253 4291228928 4292926181
+103071000000 103076091939 34357000000 34358697313 4292228928 4293926241
+103074000000 103079005579 34358000000 34359668526 4293228928 4294897454
+103077000000 103082092208 34359000000 34360697402 4294228928 959034
+103080000000 103085092381 34360000000 34361697460 261632 1959092
+103083000000 103088092497 34361000000 34362697499 1261632 2959131
+103086000000 103091092670 34362000000 34363697556 2261632 3959188
+103089000000 103094092842 34363000000 34364697614 3261632 4959246
+103092000000 103097092898 34364000000 34365697632 4261632 5959264
+103095000000 103100093044 34365000000 34366697681 5261632 6959313
+103098000000 103103093240 34366000000 34367697746 6261632 7959378
+103101000000 103106093269 34367000000 34368697756 7261632 8959388
+103104000000 103109093575 34368000000 34369697858 8261632 9959490
+103107000000 103112093747 34369000000 34370697915 9261632 10959547
+103110000000 103115093880 34370000000 34371697960 10261632 11959592
+103113000000 103118093997 34371000000 34372697999 11261632 12959631
+103116000000 103121094182 34372000000 34373698060 12261632 13959692
+103119000000 103124094288 34373000000 34374698096 13261632 14959728
+103122000000 103127094469 34374000000 34375698156 14261632 15959788
+103125000000 103130094681 34375000000 34376698227 15261632 16959859
+103128000000 103133094788 34376000000 34377698262 16261632 17959894
+103131000000 103136094954 34377000000 34378698318 17261632 18959950
+103134000000 103138693699 34378000000 34379564566 18261632 19826198
+103137000000 103142095225 34379000000 34380698408 19261632 20960040
+103140000000 103145095337 34380000000 34381698445 20261632 21960077
+103143000000 103148095546 34381000000 34382698515 21261632 22960147
+103146000000 103151095625 34382000000 34383698541 22261632 23960173
+103149000000 103154095850 34383000000 34384698616 23261632 24960248
+103152000000 103157095977 34384000000 34385698659 24261632 25960291
+103155000000 103160096066 34385000000 34386698688 25261632 26960320
+103158000000 103163096172 34386000000 34387698724 26261632 27960356
+103161000000 103166096383 34387000000 34388698794 27261632 28960426
+103164000000 103169096592 34388000000 34389698864 28261632 29960496
+103167000000 103172096737 34389000000 34390698912 29261632 30960544
+103170000000 103175096863 34390000000 34391698954 30261632 31960586
+103173000000 103178097029 34391000000 34392699009 31261632 32960641
+103176000000 103181097109 34392000000 34393699036 32261632 33960668
+103179000000 103184097344 34393000000 34394699114 33261632 34960746
+103182000000 103187097503 34394000000 34395699167 34261632 35960799
+103185000000 103190097624 34395000000 34396699208 35261632 36960840
+103188000000 103193097784 34396000000 34397699261 36261632 37960893
+103191000000 103196097867 34397000000 34398699289 37261632 38960921
+103194000000 103199098113 34398000000 34399699371 38261632 39961003
+103197000000 103202098236 34399000000 34400699412 39261632 40961044
+103200000000 103205098372 34400000000 34401699457 40261632 41961089
+103203000000 103208098547 34401000000 34402699515 41261632 42961147
+103206000000 103211098669 34402000000 34403699556 42261632 43961188
+103209000000 103214098819 34403000000 34404699606 43261632 44961238
+103212000000 103217098967 34404000000 34405699655 44261632 45961287
+103215000000 103219272661 34405000000 34406424220 45261632 46685852
+103218000000 103223099287 34406000000 34407699762 46261632 47961394
+103221000000 103226099419 34407000000 34408699806 47261632 48961438
+103224000000 103229099593 34408000000 34409699864 48261632 49961496
+103227000000 103232099712 34409000000 34410699904 49261632 50961536
+103230000000 103235099836 34410000000 34411699945 50261632 51961577
+103233000000 103238100055 34411000000 34412700018 51261632 52961650
+103236000000 103241100191 34412000000 34413700063 52261632 53961695
+103239000000 103244100342 34413000000 34414700114 53261632 54961746
+103242000000 103247100492 34414000000 34415700164 54261632 55961796
+103245000000 103250100607 34415000000 34416700202 55261632 56961834
+103248000000 103253100704 34416000000 34417700234 56261632 57961866
+103251000000 103256100912 34417000000 34418700304 57261632 58961936
+103254000000 103259101067 34418000000 34419700355 58261632 59961987
+103257000000 103262101226 34419000000 34420700408 59261632 60962040
+103260000000 103265101400 34420000000 34421700466 60261632 61962098
+103263000000 103268101500 34421000000 34422700500 61261632 62962132
+103266000000 103271101678 34422000000 34423700559 62261632 63962191
+103269000000 103274101827 34423000000 34424700609 63261632 64962241
+103272000000 103277101955 34424000000 34425700651 64261632 65962283
+103275000000 103280102124 34425000000 34426700708 65261632 66962340
+103278000000 103283102244 34426000000 34427700748 66261632 67962380
+103281000000 103284929594 34427000000 34428309864 67261632 68571496
+103284000000 103289102494 34428000000 34429700831 68261632 69962463
+103287000000 103292102752 34429000000 34430700917 69261632 70962549
+103290000000 103295102857 34430000000 34431700952 70261632 71962584
+103293000000 103298102937 34431000000 34432700979 71261632 72962611
+103296000000 103301103084 34432000000 34433701028 72261632 73962660
+103299000000 103304103338 34433000000 34434701112 73261632 74962744
+103302000000 103307103428 34434000000 34435701142 74261632 75962774
+103305000000 103310103673 34435000000 34436701224 75261632 76962856
+103308000000 103313103751 34436000000 34437701250 76261632 77962882
+103311000000 103316103928 34437000000 34438701309 77261632 78962941
+103314000000 103319104074 34438000000 34439701358 78261632 79962990
+103317000000 103322104218 34439000000 34440701406 79261632 80963038
+103320000000 103323726872 34440000000 34441242290 80261632 81503922
+103323000000 103328104533 34441000000 34442701511 81261632 82963143
+103326000000 103331104693 34442000000 34443701564 82261632 83963196
+103329000000 103334104830 34443000000 34444701610 83261632 84963242
+103332000000 103337104988 34444000000 34445701662 84261632 85963294
+103335000000 103340105146 34445000000 34446701715 85261632 86963347
+103338000000 103343105260 34446000000 34447701753 86261632 87963385
+103341000000 103346105421 34447000000 34448701807 87261632 88963439
+103344000000 103349105548 34448000000 34449701849 88261632 89963481
+103347000000 103352105657 34449000000 34450701885 89261632 90963517
+103350000000 103355105799 34450000000 34451701933 90261632 91963565
+103353000000 103358106033 34451000000 34452702011 91261632 92963643
+103356000000 103361105946 34452000000 34453701982 92261632 93963614
+103359000000 103364106067 34453000000 34454702022 93261632 94963654
+103362000000 103367106175 34454000000 34455702058 94261632 95963690
+103365000000 103370106410 34455000000 34456702136 95261632 96963768
+103368000000 103373106589 34456000000 34457702196 96261632 97963828
+103371000000 103376020229 34457000000 34458673409 97261632 98935041
+103374000000 103379106858 34458000000 34459702286 98261632 99963918
+103377000000 103382107031 34459000000 34460702343 99261632 100963975
+103380000000 103385107147 34460000000 34461702382 100261632 101964014
+103383000000 103388107320 34461000000 34462702440 101261632 102964072
+103386000000 103391107492 34462000000 34463702497 102261632 103964129
+103389000000 103394107548 34463000000 34464702516 103261632 104964148
+103392000000 103397107694 34464000000 34465702564 104261632 105964196
+103395000000 103400107890 34465000000 34466702630 105261632 106964262
+103398000000 103403107919 34466000000 34467702639 106261632 107964271
+103401000000 103406108225 34467000000 34468702741 107261632 108964373
+103404000000 103409108397 34468000000 34469702799 108261632 109964431
+103407000000 103412108530 34469000000 34470702843 109261632 110964475
+103410000000 103415108647 34470000000 34471702882 110261632 111964514
+103413000000 103418108832 34471000000 34472702944 111261632 112964576
+103416000000 103421108938 34472000000 34473702979 112261632 113964611
+103419000000 103424109119 34473000000 34474703039 113261632 114964671
+103422000000 103427109331 34474000000 34475703110 114261632 115964742
+103425000000 103430109438 34475000000 34476703146 115261632 116964778
+103428000000 103433109604 34476000000 34477703201 116261632 117964833
+103431000000 103435708349 34477000000 34478569449 117261632 118831081
+103434000000 103439109875 34478000000 34479703291 118261632 119964923
+103437000000 103442109987 34479000000 34480703329 119261632 120964961
+103440000000 103445110196 34480000000 34481703398 120261632 121965030
+103443000000 103448110275 34481000000 34482703425 121261632 122965057
+103446000000 103451110500 34482000000 34483703500 122261632 123965132
+103449000000 103454110627 34483000000 34484703542 123261632 124965174
+103452000000 103457110716 34484000000 34485703572 124261632 125965204
+103455000000 103460110822 34485000000 34486703607 125261632 126965239
+103458000000 103463111033 34486000000 34487703677 126261632 127965309
+103461000000 103466111242 34487000000 34488703747 127261632 128965379
+103464000000 103469111387 34488000000 34489703795 128261632 129965427
+103467000000 103472111513 34489000000 34490703837 129261632 130965469
+103470000000 103475111679 34490000000 34491703893 130261632 131965525
+103473000000 103478111759 34491000000 34492703919 131261632 132965551
+103476000000 103481111994 34492000000 34493703998 132261632 133965630
+103479000000 103484112153 34493000000 34494704051 133261632 134965683
+103482000000 103487112274 34494000000 34495704091 134261632 135965723
+103485000000 103490112434 34495000000 34496704144 135261632 136965776
+103488000000 103493112517 34496000000 34497704172 136261632 137965804
+103491000000 103496112763 34497000000 34498704254 137261632 138965886
+103494000000 103499112886 34498000000 34499704295 138261632 139965927
+103497000000 103502113022 34499000000 34500704340 139261632 140965972
+103500000000 103505113197 34500000000 34501704399 140261632 141966031
+103503000000 103508113319 34501000000 34502704439 141261632 142966071
+103506000000 103511113469 34502000000 34503704489 142261632 143966121
+103509000000 103514113617 34503000000 34504704539 143261632 144966171
+103512000000 103516287311 34504000000 34505429103 144261632 145690735
+103515000000 103520113937 34505000000 34506704645 145261632 146966277
+103518000000 103523114069 34506000000 34507704689 146261632 147966321
+103521000000 103526114243 34507000000 34508704747 147261632 148966379
+103524000000 103529114362 34508000000 34509704787 148261632 149966419
+103527000000 103532114486 34509000000 34510704828 149261632 150966460
+103530000000 103535114705 34510000000 34511704901 150261632 151966533
+103533000000 103538114841 34511000000 34512704947 151261632 152966579
+103536000000 103541114992 34512000000 34513704997 152261632 153966629
+103539000000 103544115142 34513000000 34514705047 153261632 154966679
+103542000000 103547115257 34514000000 34515705085 154261632 155966717
+103545000000 103550115354 34515000000 34516705118 155261632 156966750
+103548000000 103553115562 34516000000 34517705187 156261632 157966819
+103551000000 103556115717 34517000000 34518705239 157261632 158966871
+103554000000 103559115876 34518000000 34519705292 158261632 159966924
+103557000000 103562116050 34519000000 34520705350 159261632 160966982
+103560000000 103565116150 34520000000 34521705383 160261632 161967015
+103563000000 103568116328 34521000000 34522705442 161261632 162967074
+103566000000 103571116477 34522000000 34523705492 162261632 163967124
+103569000000 103574116605 34523000000 34524705535 163261632 164967167
+103572000000 103577116774 34524000000 34525705591 164261632 165967223
+103575000000 103580116894 34525000000 34526705631 165261632 166967263
+103578000000 103581944244 34526000000 34527314748 166261632 167576380
+103581000000 103586117144 34527000000 34528705714 167261632 168967346
+103584000000 103589117402 34528000000 34529705800 168261632 169967432
+103587000000 103592117507 34529000000 34530705835 169261632 170967467
+103590000000 103595117587 34530000000 34531705862 170261632 171967494
+103593000000 103598117734 34531000000 34532705911 171261632 172967543
+103596000000 103601117988 34532000000 34533705996 172261632 173967628
+103599000000 103604118078 34533000000 34534706026 173261632 174967658
+103602000000 103607118323 34534000000 34535706107 174261632 175967739
+103605000000 103610118401 34535000000 34536706133 175261632 176967765
+103608000000 103613118578 34536000000 34537706192 176261632 177967824
+103611000000 103616118724 34537000000 34538706241 177261632 178967873
+103614000000 103619118868 34538000000 34539706289 178261632 179967921
+103617000000 103620741522 34539000000 34540247174 179261632 180508806
+103620000000 103625119183 34540000000 34541706394 180261632 181968026
+103623000000 103628119343 34541000000 34542706447 181261632 182968079
+103626000000 103631119480 34542000000 34543706493 182261632 183968125
+103629000000 103634119638 34543000000 34544706546 183261632 184968178
+103632000000 103637119796 34544000000 34545706598 184261632 185968230
+103635000000 103640119910 34545000000 34546706636 185261632 186968268
+103638000000 103643120071 34546000000 34547706690 186261632 187968322
+103641000000 103646120198 34547000000 34548706732 187261632 188968364
+103644000000 103649120307 34548000000 34549706769 188261632 189968401
+103647000000 103652120449 34549000000 34550706816 189261632 190968448
+103650000000 103655120683 34550000000 34551706894 190261632 191968526
+103653000000 103658120596 34551000000 34552706865 191261632 192968497
+103656000000 103661120717 34552000000 34553706905 192261632 193968537
+103659000000 103664120825 34553000000 34554706941 193261632 194968573
+103662000000 103667121060 34554000000 34555707020 194261632 195968652
+103665000000 103670121239 34555000000 34556707079 195261632 196968711
+103668000000 103673034879 34556000000 34557678293 196261632 197939925
+103671000000 103676121508 34557000000 34558707169 197261632 198968801
+103674000000 103679121681 34558000000 34559707227 198261632 199968859
+103677000000 103682121797 34559000000 34560707265 199261632 200968897
+103680000000 103685121970 34560000000 34561707323 200261632 201968955
+103683000000 103688122142 34561000000 34562707380 201261632 202969012
+103686000000 103691122198 34562000000 34563707399 202261632 203969031
+103689000000 103694122344 34563000000 34564707448 203261632 204969080
+103692000000 103697122540 34564000000 34565707513 204261632 205969145
+103695000000 103700122569 34565000000 34566707523 205261632 206969155
+103698000000 103703122875 34566000000 34567707625 206261632 207969257
+103701000000 103706123047 34567000000 34568707682 207261632 208969314
+103704000000 103709123180 34568000000 34569707726 208261632 209969358
+103707000000 103712123297 34569000000 34570707765 209261632 210969397
+103710000000 103715123482 34570000000 34571707827 210261632 211969459
+103713000000 103718123588 34571000000 34572707862 211261632 212969494
+103716000000 103721123769 34572000000 34573707923 212261632 213969555
+103719000000 103724123981 34573000000 34574707993 213261632 214969625
+103722000000 103727124088 34574000000 34575708029 214261632 215969661
+103725000000 103730124254 34575000000 34576708084 215261632 216969716
+103728000000 103732722999 34576000000 34577574333 216261632 217835965
+103731000000 103736124525 34577000000 34578708175 217261632 218969807
+103734000000 103739124637 34578000000 34579708212 218261632 219969844
+103737000000 103742124846 34579000000 34580708282 219261632 220969914
+103740000000 103745124925 34580000000 34581708308 220261632 221969940
+103743000000 103748125150 34581000000 34582708383 221261632 222970015
+103746000000 103751125277 34582000000 34583708425 222261632 223970057
+103749000000 103754125366 34583000000 34584708455 223261632 224970087
+103752000000 103757125472 34584000000 34585708490 224261632 225970122
+103755000000 103760125683 34585000000 34586708561 225261632 226970193
+103758000000 103763125892 34586000000 34587708630 226261632 227970262
+103761000000 103766126037 34587000000 34588708679 227261632 228970311
+103764000000 103769126163 34588000000 34589708721 228261632 229970353
+103767000000 103772126329 34589000000 34590708776 229261632 230970408
+103770000000 103775126409 34590000000 34591708803 230261632 231970435
+103773000000 103778126644 34591000000 34592708881 231261632 232970513
+103776000000 103781126803 34592000000 34593708934 232261632 233970566
+103779000000 103784126924 34593000000 34594708974 233261632 234970606
+103782000000 103787127084 34594000000 34595709028 234261632 235970660
+103785000000 103790127167 34595000000 34596709055 235261632 236970687
+103788000000 103793127413 34596000000 34597709137 236261632 237970769
+103791000000 103796127536 34597000000 34598709178 237261632 238970810
+103794000000 103799127672 34598000000 34599709224 238261632 239970856
+103797000000 103802127847 34599000000 34600709282 239261632 240970914
+103800000000 103805127969 34600000000 34601709323 240261632 241970955
+103803000000 103808128119 34601000000 34602709373 241261632 242971005
+103806000000 103811128267 34602000000 34603709422 242261632 243971054
+103809000000 103813301961 34603000000 34604433987 243261632 244695619
+103812000000 103817128587 34604000000 34605709529 244261632 245971161
+103815000000 103820128719 34605000000 34606709573 245261632 246971205
+103818000000 103823128893 34606000000 34607709631 246261632 247971263
+103821000000 103826129012 34607000000 34608709670 247261632 248971302
+103824000000 103829129136 34608000000 34609709712 248261632 249971344
+103827000000 103832129355 34609000000 34610709785 249261632 250971417
+103830000000 103835129491 34610000000 34611709830 250261632 251971462
+103833000000 103838129642 34611000000 34612709880 251261632 252971512
+103836000000 103841129792 34612000000 34613709930 252261632 253971562
+103839000000 103844129907 34613000000 34614709969 253261632 254971601
+103842000000 103847130004 34614000000 34615710001 254261632 255971633
+103845000000 103850130212 34615000000 34616710070 255261632 256971702
+103848000000 103853130367 34616000000 34617710122 256261632 257971754
+103851000000 103856130526 34617000000 34618710175 257261632 258971807
+103854000000 103859130700 34618000000 34619710233 258261632 259971865
+103857000000 103862130800 34619000000 34620710266 259261632 260971898
+103860000000 103865130978 34620000000 34621710326 260261632 261971958
+103863000000 103868131127 34621000000 34622710375 261261632 262972007
+103866000000 103871131255 34622000000 34623710418 262261632 263972050
+103869000000 103874131424 34623000000 34624710474 263261632 264972106
+103872000000 103877131544 34624000000 34625710514 264261632 265972146
+103875000000 103878958894 34625000000 34626319631 265261632 266581263
+103878000000 103883131794 34626000000 34627710598 266261632 267972230
+103881000000 103886132052 34627000000 34628710684 267261632 268972316
+103884000000 103889132157 34628000000 34629710719 268261632 269972351
+103887000000 103892132237 34629000000 34630710745 269261632 270972377
+103890000000 103895132384 34630000000 34631710794 270261632 271972426
+103893000000 103898132638 34631000000 34632710879 271261632 272972511
+103896000000 103901132728 34632000000 34633710909 272261632 273972541
+103899000000 103904132973 34633000000 34634710991 273261632 274972623
+103902000000 103907133051 34634000000 34635711017 274261632 275972649
+103905000000 103910133228 34635000000 34636711076 275261632 276972708
+103908000000 103913133374 34636000000 34637711124 276261632 277972756
+103911000000 103916133518 34637000000 34638711172 277261632 278972804
+103914000000 103917756172 34638000000 34639252057 278261632 279513689
+103917000000 103922133833 34639000000 34640711277 279261632 280972909
+103920000000 103925133993 34640000000 34641711331 280261632 281972963
+103923000000 103928134130 34641000000 34642711376 281261632 282973008
+103926000000 103931134288 34642000000 34643711429 282261632 283973061
+103929000000 103934134446 34643000000 34644711482 283261632 284973114
+103932000000 103937134560 34644000000 34645711520 284261632 285973152
+103935000000 103940134721 34645000000 34646711573 285261632 286973205
+103938000000 103943134848 34646000000 34647711616 286261632 287973248
+103941000000 103946134957 34647000000 34648711652 287261632 288973284
+103944000000 103949135099 34648000000 34649711699 288261632 289973331
+103947000000 103952135333 34649000000 34650711777 289261632 290973409
+103950000000 103955135246 34650000000 34651711748 290261632 291973380
+103953000000 103958135367 34651000000 34652711789 291261632 292973421
+103956000000 103961135475 34652000000 34653711825 292261632 293973457
+103959000000 103964135710 34653000000 34654711903 293261632 294973535
+103962000000 103967135889 34654000000 34655711963 294261632 295973595
+103965000000 103970049529 34655000000 34656683176 295261632 296944808
+103968000000 103973136158 34656000000 34657712052 296261632 297973684
+103971000000 103976136331 34657000000 34658712110 297261632 298973742
+103974000000 103979136447 34658000000 34659712149 298261632 299973781
+103977000000 103982136620 34659000000 34660712206 299261632 300973838
+103980000000 103985136792 34660000000 34661712264 300261632 301973896
+103983000000 103988136848 34661000000 34662712282 301261632 302973914
+103986000000 103991136994 34662000000 34663712331 302261632 303973963
+103989000000 103994137190 34663000000 34664712396 303261632 304974028
+103992000000 103997137219 34664000000 34665712406 304261632 305974038
+103995000000 104000137525 34665000000 34666712508 305261632 306974140
+103998000000 104003137697 34666000000 34667712565 306261632 307974197
+104001000000 104006137830 34667000000 34668712610 307261632 308974242
+104004000000 104009137947 34668000000 34669712649 308261632 309974281
+104007000000 104012138132 34669000000 34670712710 309261632 310974342
+104010000000 104015138238 34670000000 34671712746 310261632 311974378
+104013000000 104018138419 34671000000 34672712806 311261632 312974438
+104016000000 104021138631 34672000000 34673712877 312261632 313974509
+104019000000 104024138738 34673000000 34674712912 313261632 314974544
+104022000000 104027138904 34674000000 34675712968 314261632 315974600
+104025000000 104029737649 34675000000 34676579216 315261632 316840848
+104028000000 104033139175 34676000000 34677713058 316261632 317974690
+104031000000 104036139287 34677000000 34678713095 317261632 318974727
+104034000000 104039139496 34678000000 34679713165 318261632 319974797
+104037000000 104042139575 34679000000 34680713191 319261632 320974823
+104040000000 104045139800 34680000000 34681713266 320261632 321974898
+104043000000 104048139927 34681000000 34682713309 321261632 322974941
+104046000000 104051140016 34682000000 34683713338 322261632 323974970
+104049000000 104054140122 34683000000 34684713374 323261632 324975006
+104052000000 104057140333 34684000000 34685713444 324261632 325975076
+104055000000 104060140542 34685000000 34686713514 325261632 326975146
+104058000000 104063140687 34686000000 34687713562 326261632 327975194
+104061000000 104066140813 34687000000 34688713604 327261632 328975236
+104064000000 104069140979 34688000000 34689713659 328261632 329975291
+104067000000 104072141059 34689000000 34690713686 329261632 330975318
+104070000000 104075141294 34690000000 34691713764 330261632 331975396
+104073000000 104078141453 34691000000 34692713817 331261632 332975449
+104076000000 104081141574 34692000000 34693713858 332261632 333975490
+104079000000 104084141734 34693000000 34694713911 333261632 334975543
+104082000000 104087141817 34694000000 34695713939 334261632 335975571
+104085000000 104090142063 34695000000 34696714021 335261632 336975653
+104088000000 104093142186 34696000000 34697714062 336261632 337975694
+104091000000 104096142322 34697000000 34698714107 337261632 338975739
+104094000000 104099142497 34698000000 34699714165 338261632 339975797
+104097000000 104102142619 34699000000 34700714206 339261632 340975838
+104100000000 104105142769 34700000000 34701714256 340261632 341975888
+104103000000 104108142917 34701000000 34702714305 341261632 342975937
+104106000000 104110316611 34702000000 34703438870 342261632 343700502
+104109000000 104114143237 34703000000 34704714412 343261632 344976044
+104112000000 104117143369 34704000000 34705714456 344261632 345976088
+104115000000 104120143543 34705000000 34706714514 345261632 346976146
+104118000000 104123143662 34706000000 34707714554 346261632 347976186
+104121000000 104126143786 34707000000 34708714595 347261632 348976227
+104124000000 104129144005 34708000000 34709714668 348261632 349976300
+104127000000 104132144141 34709000000 34710714713 349261632 350976345
+104130000000 104135144292 34710000000 34711714764 350261632 351976396
+104133000000 104138144442 34711000000 34712714814 351261632 352976446
+104136000000 104141144557 34712000000 34713714852 352261632 353976484
+104139000000 104144144654 34713000000 34714714884 353261632 354976516
+104142000000 104147144862 34714000000 34715714954 354261632 355976586
+104145000000 104150145017 34715000000 34716715005 355261632 356976637
+104148000000 104153145176 34716000000 34717715058 356261632 357976690
+104151000000 104156145350 34717000000 34718715116 357261632 358976748
+104154000000 104159145450 34718000000 34719715150 358261632 359976782
+104157000000 104162145628 34719000000 34720715209 359261632 360976841
+104160000000 104165145777 34720000000 34721715259 360261632 361976891
+104163000000 104168145905 34721000000 34722715301 361261632 362976933
+104166000000 104171146074 34722000000 34723715358 362261632 363976990
+104169000000 104174146194 34723000000 34724715398 363261632 364977030
+104172000000 104175973544 34724000000 34725324514 364261632 365586146
+104175000000 104180146444 34725000000 34726715481 365261632 366977113
+104178000000 104183146702 34726000000 34727715567 366261632 367977199
+104181000000 104186146807 34727000000 34728715602 367261632 368977234
+104184000000 104189146887 34728000000 34729715629 368261632 369977261
+104187000000 104192147034 34729000000 34730715678 369261632 370977310
+104190000000 104195147288 34730000000 34731715762 370261632 371977394
+104193000000 104198147378 34731000000 34732715792 371261632 372977424
+104196000000 104201147623 34732000000 34733715874 372261632 373977506
+104199000000 104204147701 34733000000 34734715900 373261632 374977532
+104202000000 104207147878 34734000000 34735715959 374261632 375977591
+104205000000 104210148024 34735000000 34736716008 375261632 376977640
+104208000000 104213148168 34736000000 34737716056 376261632 377977688
+104211000000 104214770822 34737000000 34738256940 377261632 378518572
+104214000000 104219148483 34738000000 34739716161 378261632 379977793
+104217000000 104222148643 34739000000 34740716214 379261632 380977846
+104220000000 104225148780 34740000000 34741716260 380261632 381977892
+104223000000 104228148938 34741000000 34742716312 381261632 382977944
+104226000000 104231149096 34742000000 34743716365 382261632 383977997
+104229000000 104234149210 34743000000 34744716403 383261632 384978035
+104232000000 104237149371 34744000000 34745716457 384261632 385978089
+104235000000 104240149498 34745000000 34746716499 385261632 386978131
+104238000000 104243149607 34746000000 34747716535 386261632 387978167
+104241000000 104246149749 34747000000 34748716583 387261632 388978215
+104244000000 104249149983 34748000000 34749716661 388261632 389978293
+104247000000 104252149896 34749000000 34750716632 389261632 390978264
+104250000000 104255150017 34750000000 34751716672 390261632 391978304
+104253000000 104258150125 34751000000 34752716708 391261632 392978340
+104256000000 104261150360 34752000000 34753716786 392261632 393978418
+104259000000 104264150539 34753000000 34754716846 393261632 394978478
+104262000000 104267064179 34754000000 34755688059 394261632 395949691
+104265000000 104270150808 34755000000 34756716936 395261632 396978568
+104268000000 104273150981 34756000000 34757716993 396261632 397978625
+104271000000 104276151097 34757000000 34758717032 397261632 398978664
+104274000000 104279151270 34758000000 34759717090 398261632 399978722
+104277000000 104282151442 34759000000 34760717147 399261632 400978779
+104280000000 104285151498 34760000000 34761717166 400261632 401978798
+104283000000 104288151644 34761000000 34762717214 401261632 402978846
+104286000000 104291151840 34762000000 34763717280 402261632 403978912
+104289000000 104294151869 34763000000 34764717289 403261632 404978921
+104292000000 104297152175 34764000000 34765717391 404261632 405979023
+104295000000 104300152347 34765000000 34766717449 405261632 406979081
+104298000000 104303152480 34766000000 34767717493 406261632 407979125
+104301000000 104306152597 34767000000 34768717532 407261632 408979164
+104304000000 104309152782 34768000000 34769717594 408261632 409979226
+104307000000 104312152888 34769000000 34770717629 409261632 410979261
+104310000000 104315153069 34770000000 34771717689 410261632 411979321
+104313000000 104318153281 34771000000 34772717760 411261632 412979392
+104316000000 104321153388 34772000000 34773717796 412261632 413979428
+104319000000 104324153554 34773000000 34774717851 413261632 414979483
+104322000000 104326752299 34774000000 34775584099 414261632 415845731
+104325000000 104330153825 34775000000 34776717941 415261632 416979573
+104328000000 104333153937 34776000000 34777717979 416261632 417979611
+104331000000 104336154146 34777000000 34778718048 417261632 418979680
+104334000000 104339154225 34778000000 34779718075 418261632 419979707
+104337000000 104342154450 34779000000 34780718150 419261632 420979782
+104340000000 104345154577 34780000000 34781718192 420261632 421979824
+104343000000 104348154666 34781000000 34782718222 421261632 422979854
+104346000000 104351154772 34782000000 34783718257 422261632 423979889
+104349000000 104354154983 34783000000 34784718327 423261632 424979959
+104352000000 104357155192 34784000000 34785718397 424261632 425980029
+104355000000 104360155337 34785000000 34786718445 425261632 426980077
+104358000000 104363155463 34786000000 34787718487 426261632 427980119
+104361000000 104366155629 34787000000 34788718543 427261632 428980175
+104364000000 104369155709 34788000000 34789718569 428261632 429980201
+104367000000 104372155944 34789000000 34790718648 429261632 430980280
+104370000000 104375156103 34790000000 34791718701 430261632 431980333
+104373000000 104378156224 34791000000 34792718741 431261632 432980373
+104376000000 104381156384 34792000000 34793718794 432261632 433980426
+104379000000 104384156467 34793000000 34794718822 433261632 434980454
+104382000000 104387156713 34794000000 34795718904 434261632 435980536
+104385000000 104390156836 34795000000 34796718945 435261632 436980577
+104388000000 104393156972 34796000000 34797718990 436261632 437980622
+104391000000 104396157147 34797000000 34798719049 437261632 438980681
+104394000000 104399157269 34798000000 34799719089 438261632 439980721
+104397000000 104402157419 34799000000 34800719139 439261632 440980771
+104400000000 104405157567 34800000000 34801719189 440261632 441980821
+104403000000 104407331261 34801000000 34802443753 441261632 442705385
+104406000000 104411157887 34802000000 34803719295 442261632 443980927
+104409000000 104414158019 34803000000 34804719339 443261632 444980971
+104412000000 104417158193 34804000000 34805719397 444261632 445981029
+104415000000 104420158312 34805000000 34806719437 445261632 446981069
+104418000000 104423158436 34806000000 34807719478 446261632 447981110
+104421000000 104426158655 34807000000 34808719551 447261632 448981183
+104424000000 104429158791 34808000000 34809719597 448261632 449981229
+104427000000 104432158942 34809000000 34810719647 449261632 450981279
+104430000000 104435159092 34810000000 34811719697 450261632 451981329
+104433000000 104438159207 34811000000 34812719735 451261632 452981367
+104436000000 104441159304 34812000000 34813719768 452261632 453981400
+104439000000 104444159512 34813000000 34814719837 453261632 454981469
+104442000000 104447159667 34814000000 34815719889 454261632 455981521
+104445000000 104450159826 34815000000 34816719942 455261632 456981574
+104448000000 104453160000 34816000000 34817720000 456261632 457981632
+104451000000 104456160100 34817000000 34818720033 457261632 458981665
+104454000000 104459160278 34818000000 34819720092 458261632 459981724
+104457000000 104462160427 34819000000 34820720142 459261632 460981774
+104460000000 104465160555 34820000000 34821720185 460261632 461981817
+104463000000 104468160724 34821000000 34822720241 461261632 462981873
+104466000000 104471160844 34822000000 34823720281 462261632 463981913
+104469000000 104472988194 34823000000 34824329398 463261632 464591030
+104472000000 104477161094 34824000000 34825720364 464261632 465981996
+104475000000 104480161352 34825000000 34826720450 465261632 466982082
+104478000000 104483161457 34826000000 34827720485 466261632 467982117
+104481000000 104486161537 34827000000 34828720512 467261632 468982144
+104484000000 104489161684 34828000000 34829720561 468261632 469982193
+104487000000 104492161938 34829000000 34830720646 469261632 470982278
+104490000000 104495162028 34830000000 34831720676 470261632 471982308
+104493000000 104498162273 34831000000 34832720757 471261632 472982389
+104496000000 104501162351 34832000000 34833720783 472261632 473982415
+104499000000 104504162528 34833000000 34834720842 473261632 474982474
+104502000000 104507162674 34834000000 34835720891 474261632 475982523
+104505000000 104510162818 34835000000 34836720939 475261632 476982571
+104508000000 104511785472 34836000000 34837261824 476261632 477523456
+104511000000 104516163133 34837000000 34838721044 477261632 478982676
+104514000000 104519163293 34838000000 34839721097 478261632 479982729
+104517000000 104522163430 34839000000 34840721143 479261632 480982775
+104520000000 104525163588 34840000000 34841721196 480261632 481982828
+104523000000 104528163746 34841000000 34842721248 481261632 482982880
+104526000000 104531163860 34842000000 34843721286 482261632 483982918
+104529000000 104534164021 34843000000 34844721340 483261632 484982972
+104532000000 104537164148 34844000000 34845721382 484261632 485983014
+104535000000 104540164257 34845000000 34846721419 485261632 486983051
+104538000000 104543164399 34846000000 34847721466 486261632 487983098
+104541000000 104546164633 34847000000 34848721544 487261632 488983176
+104544000000 104549164546 34848000000 34849721515 488261632 489983147
+104547000000 104552164667 34849000000 34850721555 489261632 490983187
+104550000000 104555164775 34850000000 34851721591 490261632 491983223
+104553000000 104558165010 34851000000 34852721670 491261632 492983302
+104556000000 104561165189 34852000000 34853721729 492261632 493983361
+104559000000 104564078829 34853000000 34854692943 493261632 494954575
+104562000000 104567165458 34854000000 34855721819 494261632 495983451
+104565000000 104570165631 34855000000 34856721877 495261632 496983509
+104568000000 104573165747 34856000000 34857721915 496261632 497983547
+104571000000 104576165920 34857000000 34858721973 497261632 498983605
+104574000000 104579166092 34858000000 34859722030 498261632 499983662
+104577000000 104582166148 34859000000 34860722049 499261632 500983681
+104580000000 104585166294 34860000000 34861722098 500261632 501983730
+104583000000 104588166490 34861000000 34862722163 501261632 502983795
+104586000000 104591166519 34862000000 34863722173 502261632 503983805
+104589000000 104594166825 34863000000 34864722275 503261632 504983907
+104592000000 104597166997 34864000000 34865722332 504261632 505983964
+104595000000 104600167130 34865000000 34866722376 505261632 506984008
+104598000000 104603167247 34866000000 34867722415 506261632 507984047
+104601000000 104606167432 34867000000 34868722477 507261632 508984109
+104604000000 104609167538 34868000000 34869722512 508261632 509984144
+104607000000 104612167719 34869000000 34870722573 509261632 510984205
+104610000000 104615167931 34870000000 34871722643 510261632 511984275
+104613000000 104618168038 34871000000 34872722679 511261632 512984311
+104616000000 104621168204 34872000000 34873722734 512261632 513984366
+104619000000 104623766949 34873000000 34874588983 513261632 514850615
+104622000000 104627168475 34874000000 34875722825 514261632 515984457
+104625000000 104630168587 34875000000 34876722862 515261632 516984494
+104628000000 104633168796 34876000000 34877722932 516261632 517984564
+104631000000 104636168875 34877000000 34878722958 517261632 518984590
+104634000000 104639169100 34878000000 34879723033 518261632 519984665
+104637000000 104642169227 34879000000 34880723075 519261632 520984707
+104640000000 104645169316 34880000000 34881723105 520261632 521984737
+104643000000 104648169422 34881000000 34882723140 521261632 522984772
+104646000000 104651169633 34882000000 34883723211 522261632 523984843
+104649000000 104654169842 34883000000 34884723280 523261632 524984912
+104652000000 104657169987 34884000000 34885723329 524261632 525984961
+104655000000 104660170113 34885000000 34886723371 525261632 526985003
+104658000000 104663170279 34886000000 34887723426 526261632 527985058
+104661000000 104666170359 34887000000 34888723453 527261632 528985085
+104664000000 104669170594 34888000000 34889723531 528261632 529985163
+104667000000 104672170753 34889000000 34890723584 529261632 530985216
+104670000000 104675170874 34890000000 34891723624 530261632 531985256
+104673000000 104678171034 34891000000 34892723678 531261632 532985310
+104676000000 104681171117 34892000000 34893723705 532261632 533985337
+104679000000 104684171363 34893000000 34894723787 533261632 534985419
+104682000000 104687171486 34894000000 34895723828 534261632 535985460
+104685000000 104690171622 34895000000 34896723874 535261632 536985506
+104688000000 104693171797 34896000000 34897723932 536261632 537985564
+104691000000 104696171919 34897000000 34898723973 537261632 538985605
+104694000000 104699172069 34898000000 34899724023 538261632 539985655
+104697000000 104702172217 34899000000 34900724072 539261632 540985704
+104700000000 104704345911 34900000000 34901448637 540261632 541710269
+104703000000 104708172537 34901000000 34902724179 541261632 542985811
+104706000000 104711172669 34902000000 34903724223 542261632 543985855
+104709000000 104714172843 34903000000 34904724281 543261632 544985913
+104712000000 104717172962 34904000000 34905724320 544261632 545985952
+104715000000 104720173086 34905000000 34906724362 545261632 546985994
+104718000000 104723173305 34906000000 34907724435 546261632 547986067
+104721000000 104726173441 34907000000 34908724480 547261632 548986112
+104724000000 104729173592 34908000000 34909724530 548261632 549986162
+104727000000 104732173742 34909000000 34910724580 549261632 550986212
+104730000000 104735173857 34910000000 34911724619 550261632 551986251
+104733000000 104738173954 34911000000 34912724651 551261632 552986283
+104736000000 104741174162 34912000000 34913724720 552261632 553986352
+104739000000 104744174317 34913000000 34914724772 553261632 554986404
+104742000000 104747174476 34914000000 34915724825 554261632 555986457
+104745000000 104750174650 34915000000 34916724883 555261632 556986515
+104748000000 104753174750 34916000000 34917724916 556261632 557986548
+104751000000 104756174928 34917000000 34918724976 557261632 558986608
+104754000000 104759175077 34918000000 34919725025 558261632 559986657
+104757000000 104762175205 34919000000 34920725068 559261632 560986700
+104760000000 104765175374 34920000000 34921725124 560261632 561986756
+104763000000 104768175494 34921000000 34922725164 561261632 562986796
+104766000000 104770002844 34922000000 34923334281 562261632 563595913
+104769000000 104774175744 34923000000 34924725248 563261632 564986880
+104772000000 104777176002 34924000000 34925725334 564261632 565986966
+104775000000 104780176107 34925000000 34926725369 565261632 566987001
+104778000000 104783176187 34926000000 34927725395 566261632 567987027
+104781000000 104786176334 34927000000 34928725444 567261632 568987076
+104784000000 104789176588 34928000000 34929725529 568261632 569987161
+104787000000 104792176678 34929000000 34930725559 569261632 570987191
+104790000000 104795176923 34930000000 34931725641 570261632 571987273
+104793000000 104798177001 34931000000 34932725667 571261632 572987299
+104796000000 104801177178 34932000000 34933725726 572261632 573987358
+104799000000 104804177324 34933000000 34934725774 573261632 574987406
+104802000000 104807177468 34934000000 34935725822 574261632 575987454
+104805000000 104808800122 34935000000 34936266707 575261632 576528339
+104808000000 104813177783 34936000000 34937725927 576261632 577987559
+104811000000 104816177943 34937000000 34938725981 577261632 578987613
+104814000000 104819178080 34938000000 34939726026 578261632 579987658
+104817000000 104822178238 34939000000 34940726079 579261632 580987711
+104820000000 104825178396 34940000000 34941726132 580261632 581987764
+104823000000 104828178510 34941000000 34942726170 581261632 582987802
+104826000000 104831178671 34942000000 34943726223 582261632 583987855
+104829000000 104834178798 34943000000 34944726266 583261632 584987898
+104832000000 104837178907 34944000000 34945726302 584261632 585987934
+104835000000 104840179049 34945000000 34946726349 585261632 586987981
+104838000000 104843179283 34946000000 34947726427 586261632 587988059
+104841000000 104846179196 34947000000 34948726398 587261632 588988030
+104844000000 104849179317 34948000000 34949726439 588261632 589988071
+104847000000 104852179425 34949000000 34950726475 589261632 590988107
+104850000000 104855179660 34950000000 34951726553 590261632 591988185
+104853000000 104858179839 34951000000 34952726613 591261632 592988245
+104856000000 104861093479 34952000000 34953697826 592261632 593959458
+104859000000 104864180108 34953000000 34954726702 593261632 594988334
+104862000000 104867180281 34954000000 34955726760 594261632 595988392
+104865000000 104870180397 34955000000 34956726799 595261632 596988431
+104868000000 104873180570 34956000000 34957726856 596261632 597988488
+104871000000 104876180742 34957000000 34958726914 597261632 598988546
+104874000000 104879180798 34958000000 34959726932 598261632 599988564
+104877000000 104882180944 34959000000 34960726981 599261632 600988613
+104880000000 104885181140 34960000000 34961727046 600261632 601988678
+104883000000 104888181169 34961000000 34962727056 601261632 602988688
+104886000000 104891181475 34962000000 34963727158 602261632 603988790
+104889000000 104894181647 34963000000 34964727215 603261632 604988847
+104892000000 104897181780 34964000000 34965727260 604261632 605988892
+104895000000 104900181897 34965000000 34966727299 605261632 606988931
+104898000000 104903182082 34966000000 34967727360 606261632 607988992
+104901000000 104906182188 34967000000 34968727396 607261632 608989028
+104904000000 104909182369 34968000000 34969727456 608261632 609989088
+104907000000 104912182581 34969000000 34970727527 609261632 610989159
+104910000000 104915182688 34970000000 34971727562 610261632 611989194
+104913000000 104918182854 34971000000 34972727618 611261632 612989250
+104916000000 104920781599 34972000000 34973593866 612261632 613855498
+104919000000 104924183125 34973000000 34974727708 613261632 614989340
+104922000000 104927183237 34974000000 34975727745 614261632 615989377
+104925000000 104930183446 34975000000 34976727815 615261632 616989447
+104928000000 104933183525 34976000000 34977727841 616261632 617989473
+104931000000 104936183750 34977000000 34978727916 617261632 618989548
+104934000000 104939183877 34978000000 34979727959 618261632 619989591
+104937000000 104942183966 34979000000 34980727988 619261632 620989620
+104940000000 104945184072 34980000000 34981728024 620261632 621989656
+104943000000 104948184283 34981000000 34982728094 621261632 622989726
+104946000000 104951184492 34982000000 34983728164 622261632 623989796
+104949000000 104954184637 34983000000 34984728212 623261632 624989844
+104952000000 104957184763 34984000000 34985728254 624261632 625989886
+104955000000 104960184929 34985000000 34986728309 625261632 626989941
+104958000000 104963185009 34986000000 34987728336 626261632 627989968
+104961000000 104966185244 34987000000 34988728414 627261632 628990046
+104964000000 104969185403 34988000000 34989728467 628261632 629990099
+104967000000 104972185524 34989000000 34990728508 629261632 630990140
+104970000000 104975185684 34990000000 34991728561 630261632 631990193
+104973000000 104978185767 34991000000 34992728589 631261632 632990221
+104976000000 104981186013 34992000000 34993728671 632261632 633990303
+104979000000 104984186136 34993000000 34994728712 633261632 634990344
+104982000000 104987186272 34994000000 34995728757 634261632 635990389
+104985000000 104990186447 34995000000 34996728815 635261632 636990447
+104988000000 104993186569 34996000000 34997728856 636261632 637990488
+104991000000 104996186719 34997000000 34998728906 637261632 638990538
+104994000000 104999186867 34998000000 34999728955 638261632 639990587
+104997000000 105001360561 34999000000 35000453520 639261632 640715152
+105000000000 105005187187 35000000000 35001729062 640261632 641990694
+105003000000 105008187319 35001000000 35002729106 641261632 642990738
+105006000000 105011187493 35002000000 35003729164 642261632 643990796
+105009000000 105014187612 35003000000 35004729204 643261632 644990836
+105012000000 105017187736 35004000000 35005729245 644261632 645990877
+105015000000 105020187955 35005000000 35006729318 645261632 646990950
+105018000000 105023188091 35006000000 35007729363 646261632 647990995
+105021000000 105026188242 35007000000 35008729414 647261632 648991046
+105024000000 105029188392 35008000000 35009729464 648261632 649991096
+105027000000 105032188507 35009000000 35010729502 649261632 650991134
+105030000000 105035188604 35010000000 35011729534 650261632 651991166
+105033000000 105038188812 35011000000 35012729604 651261632 652991236
+105036000000 105041188967 35012000000 35013729655 652261632 653991287
+105039000000 105044189126 35013000000 35014729708 653261632 654991340
+105042000000 105047189300 35014000000 35015729766 654261632 655991398
+105045000000 105050189400 35015000000 35016729800 655261632 656991432
+105048000000 105053189578 35016000000 35017729859 656261632 657991491
+105051000000 105056189727 35017000000 35018729909 657261632 658991541
+105054000000 105059189855 35018000000 35019729951 658261632 659991583
+105057000000 105062190024 35019000000 35020730008 659261632 660991640
+105060000000 105065190144 35020000000 35021730048 660261632 661991680
+105063000000 105067017494 35021000000 35022339164 661261632 662600796
+105066000000 105071190394 35022000000 35023730131 662261632 663991763
+105069000000 105074190652 35023000000 35024730217 663261632 664991849
+105072000000 105077190757 35024000000 35025730252 664261632 665991884
+105075000000 105080190837 35025000000 35026730279 665261632 666991911
+105078000000 105083190984 35026000000 35027730328 666261632 667991960
+105081000000 105086191238 35027000000 35028730412 667261632 668992044
+105084000000 105089191328 35028000000 35029730442 668261632 669992074
+105087000000 105092191573 35029000000 35030730524 669261632 670992156
+105090000000 105095191651 35030000000 35031730550 670261632 671992182
+105093000000 105098191828 35031000000 35032730609 671261632 672992241
+105096000000 105101191974 35032000000 35033730658 672261632 673992290
+105099000000 105104192118 35033000000 35034730706 673261632 674992338
+105102000000 105105814772 35034000000 35035271590 674261632 675533222
+105105000000 105110192433 35035000000 35036730811 675261632 676992443
+105108000000 105113192593 35036000000 35037730864 676261632 677992496
+105111000000 105116192730 35037000000 35038730910 677261632 678992542
+105114000000 105119192888 35038000000 35039730962 678261632 679992594
+105117000000 105122193046 35039000000 35040731015 679261632 680992647
+105120000000 105125193160 35040000000 35041731053 680261632 681992685
+105123000000 105128193321 35041000000 35042731107 681261632 682992739
+105126000000 105131193448 35042000000 35043731149 682261632 683992781
+105129000000 105134193557 35043000000 35044731185 683261632 684992817
+105132000000 105137193699 35044000000 35045731233 684261632 685992865
+105135000000 105140193933 35045000000 35046731311 685261632 686992943
+105138000000 105143193846 35046000000 35047731282 686261632 687992914
+105141000000 105146193967 35047000000 35048731322 687261632 688992954
+105144000000 105149194075 35048000000 35049731358 688261632 689992990
+105147000000 105152194310 35049000000 35050731436 689261632 690993068
+105150000000 105155194489 35050000000 35051731496 690261632 691993128
+105153000000 105158108129 35051000000 35052702709 691261632 692964341
+105156000000 105161194758 35052000000 35053731586 692261632 693993218
+105159000000 105164194931 35053000000 35054731643 693261632 694993275
+105162000000 105167195047 35054000000 35055731682 694261632 695993314
+105165000000 105170195220 35055000000 35056731740 695261632 696993372
+105168000000 105173195392 35056000000 35057731797 696261632 697993429
+105171000000 105176195448 35057000000 35058731816 697261632 698993448
+105174000000 105179195594 35058000000 35059731864 698261632 699993496
+105177000000 105182195790 35059000000 35060731930 699261632 700993562
+105180000000 105185195819 35060000000 35061731939 700261632 701993571
+105183000000 105188196125 35061000000 35062732041 701261632 702993673
+105186000000 105191196297 35062000000 35063732099 702261632 703993731
+105189000000 105194196430 35063000000 35064732143 703261632 704993775
+105192000000 105197196547 35064000000 35065732182 704261632 705993814
+105195000000 105200196732 35065000000 35066732244 705261632 706993876
+105198000000 105203196838 35066000000 35067732279 706261632 707993911
+105201000000 105206197019 35067000000 35068732339 707261632 708993971
+105204000000 105209197231 35068000000 35069732410 708261632 709994042
+105207000000 105212197338 35069000000 35070732446 709261632 710994078
+105210000000 105215197504 35070000000 35071732501 710261632 711994133
+105213000000 105217796249 35071000000 35072598749 711261632 712860381
+105216000000 105221197775 35072000000 35073732591 712261632 713994223
+105219000000 105224197887 35073000000 35074732629 713261632 714994261
+105222000000 105227198096 35074000000 35075732698 714261632 715994330
+105225000000 105230198175 35075000000 35076732725 715261632 716994357
+105228000000 105233198400 35076000000 35077732800 716261632 717994432
+105231000000 105236198527 35077000000 35078732842 717261632 718994474
+105234000000 105239198616 35078000000 35079732872 718261632 719994504
+105237000000 105242198722 35079000000 35080732907 719261632 720994539
+105240000000 105245198933 35080000000 35081732977 720261632 721994609
+105243000000 105248199142 35081000000 35082733047 721261632 722994679
+105246000000 105251199287 35082000000 35083733095 722261632 723994727
+105249000000 105254199413 35083000000 35084733137 723261632 724994769
+105252000000 105257199579 35084000000 35085733193 724261632 725994825
+105255000000 105260199659 35085000000 35086733219 725261632 726994851
+105258000000 105263199894 35086000000 35087733298 726261632 727994930
+105261000000 105266200053 35087000000 35088733351 727261632 728994983
+105264000000 105269200174 35088000000 35089733391 728261632 729995023
+105267000000 105272200334 35089000000 35090733444 729261632 730995076
+105270000000 105275200417 35090000000 35091733472 730261632 731995104
+105273000000 105278200663 35091000000 35092733554 731261632 732995186
+105276000000 105281200786 35092000000 35093733595 732261632 733995227
+105279000000 105284200922 35093000000 35094733640 733261632 734995272
+105282000000 105287201097 35094000000 35095733699 734261632 735995331
+105285000000 105290201219 35095000000 35096733739 735261632 736995371
+105288000000 105293201369 35096000000 35097733789 736261632 737995421
+105291000000 105296201517 35097000000 35098733839 737261632 738995471
+105294000000 105298375211 35098000000 35099458403 738261632 739720035
+105297000000 105302201837 35099000000 35100733945 739261632 740995577
+105300000000 105305201969 35100000000 35101733989 740261632 741995621
+105303000000 105308202143 35101000000 35102734047 741261632 742995679
+105306000000 105311202262 35102000000 35103734087 742261632 743995719
+105309000000 105314202386 35103000000 35104734128 743261632 744995760
+105312000000 105317202605 35104000000 35105734201 744261632 745995833
+105315000000 105320202741 35105000000 35106734247 745261632 746995879
+105318000000 105323202892 35106000000 35107734297 746261632 747995929
+105321000000 105326203042 35107000000 35108734347 747261632 748995979
+105324000000 105329203157 35108000000 35109734385 748261632 749996017
+105327000000 105332203254 35109000000 35110734418 749261632 750996050
+105330000000 105335203462 35110000000 35111734487 750261632 751996119
+105333000000 105338203617 35111000000 35112734539 751261632 752996171
+105336000000 105341203776 35112000000 35113734592 752261632 753996224
+105339000000 105344203950 35113000000 35114734650 753261632 754996282
+105342000000 105347204050 35114000000 35115734683 754261632 755996315
+105345000000 105350204228 35115000000 35116734742 755261632 756996374
+105348000000 105353204377 35116000000 35117734792 756261632 757996424
+105351000000 105356204505 35117000000 35118734835 757261632 758996467
+105354000000 105359204674 35118000000 35119734891 758261632 759996523
+105357000000 105362204794 35119000000 35120734931 759261632 760996563
+105360000000 105364032144 35120000000 35121344048 760261632 761605680
+105363000000 105368205044 35121000000 35122735014 761261632 762996646
+105366000000 105371205302 35122000000 35123735100 762261632 763996732
+105369000000 105374205407 35123000000 35124735135 763261632 764996767
+105372000000 105377205487 35124000000 35125735162 764261632 765996794
+105375000000 105380205634 35125000000 35126735211 765261632 766996843
+105378000000 105383205888 35126000000 35127735296 766261632 767996928
+105381000000 105386205978 35127000000 35128735326 767261632 768996958
+105384000000 105389206223 35128000000 35129735407 768261632 769997039
+105387000000 105392206301 35129000000 35130735433 769261632 770997065
+105390000000 105395206478 35130000000 35131735492 770261632 771997124
+105393000000 105398206624 35131000000 35132735541 771261632 772997173
+105396000000 105401206768 35132000000 35133735589 772261632 773997221
+105399000000 105402829422 35133000000 35134276474 773261632 774538106
+105402000000 105407207083 35134000000 35135735694 774261632 775997326
+105405000000 105410207243 35135000000 35136735747 775261632 776997379
+105408000000 105413207380 35136000000 35137735793 776261632 777997425
+105411000000 105416207538 35137000000 35138735846 777261632 778997478
+105414000000 105419207696 35138000000 35139735898 778261632 779997530
+105417000000 105422207810 35139000000 35140735936 779261632 780997568
+105420000000 105425207971 35140000000 35141735990 780261632 781997622
+105423000000 105428208098 35141000000 35142736032 781261632 782997664
+105426000000 105431208207 35142000000 35143736069 782261632 783997701
+105429000000 105434208349 35143000000 35144736116 783261632 784997748
+105432000000 105437208583 35144000000 35145736194 784261632 785997826
+105435000000 105440208496 35145000000 35146736165 785261632 786997797
+105438000000 105443208617 35146000000 35147736205 786261632 787997837
+105441000000 105446208725 35147000000 35148736241 787261632 788997873
+105444000000 105449208960 35148000000 35149736320 788261632 789997952
+105447000000 105452209139 35149000000 35150736379 789261632 790998011
+105450000000 105455122779 35150000000 35151707593 790261632 791969225
+105453000000 105458209408 35151000000 35152736469 791261632 792998101
+105456000000 105461209581 35152000000 35153736527 792261632 793998159
+105459000000 105464209697 35153000000 35154736565 793261632 794998197
+105462000000 105467209870 35154000000 35155736623 794261632 795998255
+105465000000 105470210042 35155000000 35156736680 795261632 796998312
+105468000000 105473210098 35156000000 35157736699 796261632 797998331
+105471000000 105476210244 35157000000 35158736748 797261632 798998380
+105474000000 105479210440 35158000000 35159736813 798261632 799998445
+105477000000 105482210469 35159000000 35160736823 799261632 800998455
+105480000000 105485210775 35160000000 35161736925 800261632 801998557
+105483000000 105488210947 35161000000 35162736982 801261632 802998614
+105486000000 105491211080 35162000000 35163737026 802261632 803998658
+105489000000 105494211197 35163000000 35164737065 803261632 804998697
+105492000000 105497211382 35164000000 35165737127 804261632 805998759
+105495000000 105500211488 35165000000 35166737162 805261632 806998794
+105498000000 105503211669 35166000000 35167737223 806261632 807998855
+105501000000 105506211881 35167000000 35168737293 807261632 808998925
+105504000000 105509211988 35168000000 35169737329 808261632 809998961
+105507000000 105512212154 35169000000 35170737384 809261632 810999016
+105510000000 105514810899 35170000000 35171603633 810261632 811865265
+105513000000 105518212425 35171000000 35172737475 811261632 812999107
+105516000000 105521212537 35172000000 35173737512 812261632 813999144
+105519000000 105524212746 35173000000 35174737582 813261632 814999214
+105522000000 105527212825 35174000000 35175737608 814261632 815999240
+105525000000 105530213050 35175000000 35176737683 815261632 816999315
+105528000000 105533213177 35176000000 35177737725 816261632 817999357
+105531000000 105536213266 35177000000 35178737755 817261632 818999387
+105534000000 105539213372 35178000000 35179737790 818261632 819999422
+105537000000 105542213583 35179000000 35180737861 819261632 820999493
+105540000000 105545213792 35180000000 35181737930 820261632 821999562
+105543000000 105548213937 35181000000 35182737979 821261632 822999611
+105546000000 105551214063 35182000000 35183738021 822261632 823999653
+105549000000 105554214229 35183000000 35184738076 823261632 824999708
+105552000000 105557214309 35184000000 35185738103 824261632 825999735
+105555000000 105560214544 35185000000 35186738181 825261632 826999813
+105558000000 105563214703 35186000000 35187738234 826261632 827999866
+105561000000 105566214824 35187000000 35188738274 827261632 828999906
+105564000000 105569214984 35188000000 35189738328 828261632 829999960
+105567000000 105572215067 35189000000 35190738355 829261632 830999987
+105570000000 105575215313 35190000000 35191738437 830261632 832000069
+105573000000 105578215436 35191000000 35192738478 831261632 833000110
+105576000000 105581215572 35192000000 35193738524 832261632 834000156
+105579000000 105584215747 35193000000 35194738582 833261632 835000214
+105582000000 105587215869 35194000000 35195738623 834261632 836000255
+105585000000 105590216019 35195000000 35196738673 835261632 837000305
+105588000000 105593216167 35196000000 35197738722 836261632 838000354
+105591000000 105595389861 35197000000 35198463287 837261632 838724919
+105594000000 105599216487 35198000000 35199738829 838261632 840000461
+105597000000 105602216619 35199000000 35200738873 839261632 841000505
+105600000000 105605216793 35200000000 35201738931 840261632 842000563
+105603000000 105608216912 35201000000 35202738970 841261632 843000602
+105606000000 105611217036 35202000000 35203739012 842261632 844000644
+105609000000 105614217255 35203000000 35204739085 843261632 845000717
+105612000000 105617217391 35204000000 35205739130 844261632 846000762
+105615000000 105620217542 35205000000 35206739180 845261632 847000812
+105618000000 105623217692 35206000000 35207739230 846261632 848000862
+105621000000 105626217807 35207000000 35208739269 847261632 849000901
+105624000000 105629217904 35208000000 35209739301 848261632 850000933
+105627000000 105632218112 35209000000 35210739370 849261632 851001002
+105630000000 105635218267 35210000000 35211739422 850261632 852001054
+105633000000 105638218426 35211000000 35212739475 851261632 853001107
+105636000000 105641218600 35212000000 35213739533 852261632 854001165
+105639000000 105644218700 35213000000 35214739566 853261632 855001198
+105642000000 105647218878 35214000000 35215739626 854261632 856001258
+105645000000 105650219027 35215000000 35216739675 855261632 857001307
+105648000000 105653219155 35216000000 35217739718 856261632 858001350
+105651000000 105656219324 35217000000 35218739774 857261632 859001406
+105654000000 105659219444 35218000000 35219739814 858261632 860001446
+105657000000 105661046794 35219000000 35220348931 859261632 860610563
+105660000000 105665219694 35220000000 35221739898 860261632 862001530
+105663000000 105668219952 35221000000 35222739984 861261632 863001616
+105666000000 105671220057 35222000000 35223740019 862261632 864001651
+105669000000 105674220137 35223000000 35224740045 863261632 865001677
+105672000000 105677220284 35224000000 35225740094 864261632 866001726
+105675000000 105680220538 35225000000 35226740179 865261632 867001811
+105678000000 105683220628 35226000000 35227740209 866261632 868001841
+105681000000 105686220873 35227000000 35228740291 867261632 869001923
+105684000000 105689220951 35228000000 35229740317 868261632 870001949
+105687000000 105692221128 35229000000 35230740376 869261632 871002008
+105690000000 105695221274 35230000000 35231740424 870261632 872002056
+105693000000 105698221418 35231000000 35232740472 871261632 873002104
+105696000000 105699844072 35232000000 35233281357 872261632 873542989
+105699000000 105704221733 35233000000 35234740577 873261632 875002209
+105702000000 105707221893 35234000000 35235740631 874261632 876002263
+105705000000 105710222030 35235000000 35236740676 875261632 877002308
+105708000000 105713222188 35236000000 35237740729 876261632 878002361
+105711000000 105716222346 35237000000 35238740782 877261632 879002414
+105714000000 105719222460 35238000000 35239740820 878261632 880002452
+105717000000 105722222621 35239000000 35240740873 879261632 881002505
+105720000000 105725222748 35240000000 35241740916 880261632 882002548
+105723000000 105728222857 35241000000 35242740952 881261632 883002584
+105726000000 105731222999 35242000000 35243740999 882261632 884002631
+105729000000 105734223233 35243000000 35244741077 883261632 885002709
+105732000000 105737223146 35244000000 35245741048 884261632 886002680
+105735000000 105740223267 35245000000 35246741089 885261632 887002721
+105738000000 105743223375 35246000000 35247741125 886261632 888002757
+105741000000 105746223610 35247000000 35248741203 887261632 889002835
+105744000000 105749223789 35248000000 35249741263 888261632 890002895
+105747000000 105752137429 35249000000 35250712476 889261632 890974108
+105750000000 105755224058 35250000000 35251741352 890261632 892002984
+105753000000 105758224231 35251000000 35252741410 891261632 893003042
+105756000000 105761224347 35252000000 35253741449 892261632 894003081
+105759000000 105764224520 35253000000 35254741506 893261632 895003138
+105762000000 105767224692 35254000000 35255741564 894261632 896003196
+105765000000 105770224748 35255000000 35256741582 895261632 897003214
+105768000000 105773224894 35256000000 35257741631 896261632 898003263
+105771000000 105776225090 35257000000 35258741696 897261632 899003328
+105774000000 105779225119 35258000000 35259741706 898261632 900003338
+105777000000 105782225425 35259000000 35260741808 899261632 901003440
+105780000000 105785225597 35260000000 35261741865 900261632 902003497
+105783000000 105788225730 35261000000 35262741910 901261632 903003542
+105786000000 105791225847 35262000000 35263741949 902261632 904003581
+105789000000 105794226032 35263000000 35264742010 903261632 905003642
+105792000000 105797226138 35264000000 35265742046 904261632 906003678
+105795000000 105800226319 35265000000 35266742106 905261632 907003738
+105798000000 105803226531 35266000000 35267742177 906261632 908003809
+105801000000 105806226638 35267000000 35268742212 907261632 909003844
+105804000000 105809226804 35268000000 35269742268 908261632 910003900
+105807000000 105811825549 35269000000 35270608516 909261632 910870148
+105810000000 105815227075 35270000000 35271742358 910261632 912003990
+105813000000 105818227187 35271000000 35272742395 911261632 913004027
+105816000000 105821227396 35272000000 35273742465 912261632 914004097
+105819000000 105824227475 35273000000 35274742491 913261632 915004123
+105822000000 105827227700 35274000000 35275742566 914261632 916004198
+105825000000 105830227827 35275000000 35276742609 915261632 917004241
+105828000000 105833227916 35276000000 35277742638 916261632 918004270
+105831000000 105836228022 35277000000 35278742674 917261632 919004306
+105834000000 105839228233 35278000000 35279742744 918261632 920004376
+105837000000 105842228442 35279000000 35280742814 919261632 921004446
+105840000000 105845228587 35280000000 35281742862 920261632 922004494
+105843000000 105848228713 35281000000 35282742904 921261632 923004536
+105846000000 105851228879 35282000000 35283742959 922261632 924004591
+105849000000 105854228959 35283000000 35284742986 923261632 925004618
+105852000000 105857229194 35284000000 35285743064 924261632 926004696
+105855000000 105860229353 35285000000 35286743117 925261632 927004749
+105858000000 105863229474 35286000000 35287743158 926261632 928004790
+105861000000 105866229634 35287000000 35288743211 927261632 929004843
+105864000000 105869229717 35288000000 35289743239 928261632 930004871
+105867000000 105872229963 35289000000 35290743321 929261632 931004953
+105870000000 105875230086 35290000000 35291743362 930261632 932004994
+105873000000 105878230222 35291000000 35292743407 931261632 933005039
+105876000000 105881230397 35292000000 35293743465 932261632 934005097
+105879000000 105884230519 35293000000 35294743506 933261632 935005138
+105882000000 105887230669 35294000000 35295743556 934261632 936005188
+105885000000 105890230817 35295000000 35296743605 935261632 937005237
+105888000000 105892404511 35296000000 35297468170 936261632 937729802
+105891000000 105896231137 35297000000 35298743712 937261632 939005344
+105894000000 105899231269 35298000000 35299743756 938261632 940005388
+105897000000 105902231443 35299000000 35300743814 939261632 941005446
+105900000000 105905231562 35300000000 35301743854 940261632 942005486
+105903000000 105908231686 35301000000 35302743895 941261632 943005527
+105906000000 105911231905 35302000000 35303743968 942261632 944005600
+105909000000 105914232041 35303000000 35304744013 943261632 945005645
+105912000000 105917232192 35304000000 35305744064 944261632 946005696
+105915000000 105920232342 35305000000 35306744114 945261632 947005746
+105918000000 105923232457 35306000000 35307744152 946261632 948005784
+105921000000 105926232554 35307000000 35308744184 947261632 949005816
+105924000000 105929232762 35308000000 35309744254 948261632 950005886
+105927000000 105932232917 35309000000 35310744305 949261632 951005937
+105930000000 105935233076 35310000000 35311744358 950261632 952005990
+105933000000 105938233250 35311000000 35312744416 951261632 953006048
+105936000000 105941233350 35312000000 35313744450 952261632 954006082
+105939000000 105944233528 35313000000 35314744509 953261632 955006141
+105942000000 105947233677 35314000000 35315744559 954261632 956006191
+105945000000 105950233805 35315000000 35316744601 955261632 957006233
+105948000000 105953233974 35316000000 35317744658 956261632 958006290
+105951000000 105956234094 35317000000 35318744698 957261632 959006330
+105954000000 105958061444 35318000000 35319353814 958261632 959615446
+105957000000 105962234344 35319000000 35320744781 959261632 961006413
+105960000000 105965234602 35320000000 35321744867 960261632 962006499
+105963000000 105968234707 35321000000 35322744902 961261632 963006534
+105966000000 105971234787 35322000000 35323744929 962261632 964006561
+105969000000 105974234934 35323000000 35324744978 963261632 965006610
+105972000000 105977235188 35324000000 35325745062 964261632 966006694
+105975000000 105980235278 35325000000 35326745092 965261632 967006724
+105978000000 105983235523 35326000000 35327745174 966261632 968006806
+105981000000 105986235601 35327000000 35328745200 967261632 969006832
+105984000000 105989235778 35328000000 35329745259 968261632 970006891
+105987000000 105992235924 35329000000 35330745308 969261632 971006940
+105990000000 105995236068 35330000000 35331745356 970261632 972006988
+105993000000 105996858722 35331000000 35332286240 971261632 972547872
+105996000000 106001236383 35332000000 35333745461 972261632 974007093
+105999000000 106004236543 35333000000 35334745514 973261632 975007146
+106002000000 106007236680 35334000000 35335745560 974261632 976007192
+106005000000 106010236838 35335000000 35336745612 975261632 977007244
+106008000000 106013236996 35336000000 35337745665 976261632 978007297
+106011000000 106016237110 35337000000 35338745703 977261632 979007335
+106014000000 106019237271 35338000000 35339745757 978261632 980007389
+106017000000 106022237398 35339000000 35340745799 979261632 981007431
+106020000000 106025237507 35340000000 35341745835 980261632 982007467
+106023000000 106028237649 35341000000 35342745883 981261632 983007515
+106026000000 106031237883 35342000000 35343745961 982261632 984007593
+106029000000 106034237796 35343000000 35344745932 983261632 985007564
+106032000000 106037237917 35344000000 35345745972 984261632 986007604
+106035000000 106040238025 35345000000 35346746008 985261632 987007640
+106038000000 106043238260 35346000000 35347746086 986261632 988007718
+106041000000 106046238439 35347000000 35348746146 987261632 989007778
+106044000000 106049152079 35348000000 35349717359 988261632 989978991
+106047000000 106052238708 35349000000 35350746236 989261632 991007868
+106050000000 106055238881 35350000000 35351746293 990261632 992007925
+106053000000 106058238997 35351000000 35352746332 991261632 993007964
+106056000000 106061239170 35352000000 35353746390 992261632 994008022
+106059000000 106064239342 35353000000 35354746447 993261632 995008079
+106062000000 106067239398 35354000000 35355746466 994261632 996008098
+106065000000 106070239544 35355000000 35356746514 995261632 997008146
+106068000000 106073239740 35356000000 35357746580 996261632 998008212
+106071000000 106076239769 35357000000 35358746589 997261632 999008221
+106074000000 106079240075 35358000000 35359746691 998261632 1000008323
+106077000000 106082240247 35359000000 35360746749 999261632 1001008381
+106080000000 106085240380 35360000000 35361746793 1000261632 1002008425
+106083000000 106088240497 35361000000 35362746832 1001261632 1003008464
+106086000000 106091240682 35362000000 35363746894 1002261632 1004008526
+106089000000 106094240788 35363000000 35364746929 1003261632 1005008561
+106092000000 106097240969 35364000000 35365746989 1004261632 1006008621
+106095000000 106100241181 35365000000 35366747060 1005261632 1007008692
+106098000000 106103241288 35366000000 35367747096 1006261632 1008008728
+106101000000 106106241454 35367000000 35368747151 1007261632 1009008783
+106104000000 106108840199 35368000000 35369613399 1008261632 1009875031
+106107000000 106112241725 35369000000 35370747241 1009261632 1011008873
+106110000000 106115241837 35370000000 35371747279 1010261632 1012008911
+106113000000 106118242046 35371000000 35372747348 1011261632 1013008980
+106116000000 106121242125 35372000000 35373747375 1012261632 1014009007
+106119000000 106124242350 35373000000 35374747450 1013261632 1015009082
+106122000000 106127242477 35374000000 35375747492 1014261632 1016009124
+106125000000 106130242566 35375000000 35376747522 1015261632 1017009154
+106128000000 106133242672 35376000000 35377747557 1016261632 1018009189
+106131000000 106136242883 35377000000 35378747627 1017261632 1019009259
+106134000000 106139243092 35378000000 35379747697 1018261632 1020009329
+106137000000 106142243237 35379000000 35380747745 1019261632 1021009377
+106140000000 106145243363 35380000000 35381747787 1020261632 1022009419
+106143000000 106148243529 35381000000 35382747843 1021261632 1023009475
+106146000000 106151243609 35382000000 35383747869 1022261632 1024009501
+106149000000 106154243844 35383000000 35384747948 1023261632 1025009580
+106152000000 106157244003 35384000000 35385748001 1024261632 1026009633
+106155000000 106160244124 35385000000 35386748041 1025261632 1027009673
+106158000000 106163244284 35386000000 35387748094 1026261632 1028009726
+106161000000 106166244367 35387000000 35388748122 1027261632 1029009754
+106164000000 106169244613 35388000000 35389748204 1028261632 1030009836
+106167000000 106172244736 35389000000 35390748245 1029261632 1031009877
+106170000000 106175244872 35390000000 35391748290 1030261632 1032009922
+106173000000 106178245047 35391000000 35392748349 1031261632 1033009981
+106176000000 106181245169 35392000000 35393748389 1032261632 1034010021
+106179000000 106184245319 35393000000 35394748439 1033261632 1035010071
+106182000000 106187245467 35394000000 35395748489 1034261632 1036010121
+106185000000 106189419161 35395000000 35396473053 1035261632 1036734685
+106188000000 106193245787 35396000000 35397748595 1036261632 1038010227
+106191000000 106196245919 35397000000 35398748639 1037261632 1039010271
+106194000000 106199246093 35398000000 35399748697 1038261632 1040010329
+106197000000 106202246212 35399000000 35400748737 1039261632 1041010369
+106200000000 106205246336 35400000000 35401748778 1040261632 1042010410
+106203000000 106208246555 35401000000 35402748851 1041261632 1043010483
+106206000000 106211246691 35402000000 35403748897 1042261632 1044010529
+106209000000 106214246842 35403000000 35404748947 1043261632 1045010579
+106212000000 106217246992 35404000000 35405748997 1044261632 1046010629
+106215000000 106220247107 35405000000 35406749035 1045261632 1047010667
+106218000000 106223247204 35406000000 35407749068 1046261632 1048010700
+106221000000 106226247412 35407000000 35408749137 1047261632 1049010769
+106224000000 106229247567 35408000000 35409749189 1048261632 1050010821
+106227000000 106232247726 35409000000 35410749242 1049261632 1051010874
+106230000000 106235247900 35410000000 35411749300 1050261632 1052010932
+106233000000 106238248000 35411000000 35412749333 1051261632 1053010965
+106236000000 106241248178 35412000000 35413749392 1052261632 1054011024
+106239000000 106244248327 35413000000 35414749442 1053261632 1055011074
+106242000000 106247248455 35414000000 35415749485 1054261632 1056011117
+106245000000 106250248624 35415000000 35416749541 1055261632 1057011173
+106248000000 106253248744 35416000000 35417749581 1056261632 1058011213
+106251000000 106255076094 35417000000 35418358698 1057261632 1058620330
+106254000000 106259248994 35418000000 35419749664 1058261632 1060011296
+106257000000 106262249252 35419000000 35420749750 1059261632 1061011382
+106260000000 106265249357 35420000000 35421749785 1060261632 1062011417
+106263000000 106268249437 35421000000 35422749812 1061261632 1063011444
+106266000000 106271249584 35422000000 35423749861 1062261632 1064011493
+106269000000 106274249838 35423000000 35424749946 1063261632 1065011578
+106272000000 106277249928 35424000000 35425749976 1064261632 1066011608
+106275000000 106280250173 35425000000 35426750057 1065261632 1067011689
+106278000000 106283250251 35426000000 35427750083 1066261632 1068011715
+106281000000 106286250428 35427000000 35428750142 1067261632 1069011774
+106284000000 106289250574 35428000000 35429750191 1068261632 1070011823
+106287000000 106292250718 35429000000 35430750239 1069261632 1071011871
+106290000000 106293873372 35430000000 35431291124 1070261632 1071552756
+106293000000 106298251033 35431000000 35432750344 1071261632 1073011976
+106296000000 106301251193 35432000000 35433750397 1072261632 1074012029
+106299000000 106304251330 35433000000 35434750443 1073261632 1075012075
+106302000000 106307251488 35434000000 35435750496 1074261632 1076012128
+106305000000 106310251646 35435000000 35436750548 1075261632 1077012180
+106308000000 106313251760 35436000000 35437750586 1076261632 1078012218
+106311000000 106316251921 35437000000 35438750640 1077261632 1079012272
+106314000000 106319252048 35438000000 35439750682 1078261632 1080012314
+106317000000 106322252157 35439000000 35440750719 1079261632 1081012351
+106320000000 106325252299 35440000000 35441750766 1080261632 1082012398
+106323000000 106328252533 35441000000 35442750844 1081261632 1083012476
+106326000000 106331252446 35442000000 35443750815 1082261632 1084012447
+106329000000 106334252567 35443000000 35444750855 1083261632 1085012487
+106332000000 106337252675 35444000000 35445750891 1084261632 1086012523
+106335000000 106340252910 35445000000 35446750970 1085261632 1087012602
+106338000000 106343253089 35446000000 35447751029 1086261632 1088012661
+106341000000 106346166729 35447000000 35448722243 1087261632 1088983875
+106344000000 106349253358 35448000000 35449751119 1088261632 1090012751
+106347000000 106352253531 35449000000 35450751177 1089261632 1091012809
+106350000000 106355253647 35450000000 35451751215 1090261632 1092012847
+106353000000 106358253820 35451000000 35452751273 1091261632 1093012905
+106356000000 106361253992 35452000000 35453751330 1092261632 1094012962
+106359000000 106364254048 35453000000 35454751349 1093261632 1095012981
+106362000000 106367254194 35454000000 35455751398 1094261632 1096013030
+106365000000 106370254390 35455000000 35456751463 1095261632 1097013095
+106368000000 106373254419 35456000000 35457751473 1096261632 1098013105
+106371000000 106376254725 35457000000 35458751575 1097261632 1099013207
+106374000000 106379254897 35458000000 35459751632 1098261632 1100013264
+106377000000 106382255030 35459000000 35460751676 1099261632 1101013308
+106380000000 106385255147 35460000000 35461751715 1100261632 1102013347
+106383000000 106388255332 35461000000 35462751777 1101261632 1103013409
+106386000000 106391255438 35462000000 35463751812 1102261632 1104013444
+106389000000 106394255619 35463000000 35464751873 1103261632 1105013505
+106392000000 106397255831 35464000000 35465751943 1104261632 1106013575
+106395000000 106400255938 35465000000 35466751979 1105261632 1107013611
+106398000000 106403256104 35466000000 35467752034 1106261632 1108013666
+106401000000 106405854849 35467000000 35468618283 1107261632 1108879915
+106404000000 106409256375 35468000000 35469752125 1108261632 1110013757
+106407000000 106412256487 35469000000 35470752162 1109261632 1111013794
+106410000000 106415256696 35470000000 35471752232 1110261632 1112013864
+106413000000 106418256775 35471000000 35472752258 1111261632 1113013890
+106416000000 106421257000 35472000000 35473752333 1112261632 1114013965
+106419000000 106424257127 35473000000 35474752375 1113261632 1115014007
+106422000000 106427257216 35474000000 35475752405 1114261632 1116014037
+106425000000 106430257322 35475000000 35476752440 1115261632 1117014072
+106428000000 106433257533 35476000000 35477752511 1116261632 1118014143
+106431000000 106436257742 35477000000 35478752580 1117261632 1119014212
+106434000000 106439257887 35478000000 35479752629 1118261632 1120014261
+106437000000 106442258013 35479000000 35480752671 1119261632 1121014303
+106440000000 106445258179 35480000000 35481752726 1120261632 1122014358
+106443000000 106448258259 35481000000 35482752753 1121261632 1123014385
+106446000000 106451258494 35482000000 35483752831 1122261632 1124014463
+106449000000 106454258653 35483000000 35484752884 1123261632 1125014516
+106452000000 106457258774 35484000000 35485752924 1124261632 1126014556
+106455000000 106460258934 35485000000 35486752978 1125261632 1127014610
+106458000000 106463259017 35486000000 35487753005 1126261632 1128014637
+106461000000 106466259263 35487000000 35488753087 1127261632 1129014719
+106464000000 106469259386 35488000000 35489753128 1128261632 1130014760
+106467000000 106472259522 35489000000 35490753174 1129261632 1131014806
+106470000000 106475259697 35490000000 35491753232 1130261632 1132014864
+106473000000 106478259819 35491000000 35492753273 1131261632 1133014905
+106476000000 106481259969 35492000000 35493753323 1132261632 1134014955
+106479000000 106484260117 35493000000 35494753372 1133261632 1135015004
+106482000000 106486433811 35494000000 35495477937 1134261632 1135739569
+106485000000 106490260437 35495000000 35496753479 1135261632 1137015111
+106488000000 106493260569 35496000000 35497753523 1136261632 1138015155
+106491000000 106496260743 35497000000 35498753581 1137261632 1139015213
+106494000000 106499260862 35498000000 35499753620 1138261632 1140015252
+106497000000 106502260986 35499000000 35500753662 1139261632 1141015294
+106500000000 106505261205 35500000000 35501753735 1140261632 1142015367
+106503000000 106508261341 35501000000 35502753780 1141261632 1143015412
+106506000000 106511261492 35502000000 35503753830 1142261632 1144015462
+106509000000 106514261642 35503000000 35504753880 1143261632 1145015512
+106512000000 106517261757 35504000000 35505753919 1144261632 1146015551
+106515000000 106520261854 35505000000 35506753951 1145261632 1147015583
+106518000000 106523262062 35506000000 35507754020 1146261632 1148015652
+106521000000 106526262217 35507000000 35508754072 1147261632 1149015704
+106524000000 106529262376 35508000000 35509754125 1148261632 1150015757
+106527000000 106532262550 35509000000 35510754183 1149261632 1151015815
+106530000000 106535262650 35510000000 35511754216 1150261632 1152015848
+106533000000 106538262828 35511000000 35512754276 1151261632 1153015908
+106536000000 106541262977 35512000000 35513754325 1152261632 1154015957
+106539000000 106544263105 35513000000 35514754368 1153261632 1155016000
+106542000000 106547263274 35514000000 35515754424 1154261632 1156016056
+106545000000 106550263394 35515000000 35516754464 1155261632 1157016096
+106548000000 106552090744 35516000000 35517363581 1156261632 1157625213
+106551000000 106556263644 35517000000 35518754548 1157261632 1159016180
+106554000000 106559263902 35518000000 35519754634 1158261632 1160016266
+106557000000 106562264007 35519000000 35520754669 1159261632 1161016301
+106560000000 106565264087 35520000000 35521754695 1160261632 1162016327
+106563000000 106568264234 35521000000 35522754744 1161261632 1163016376
+106566000000 106571264488 35522000000 35523754829 1162261632 1164016461
+106569000000 106574264578 35523000000 35524754859 1163261632 1165016491
+106572000000 106577264823 35524000000 35525754941 1164261632 1166016573
+106575000000 106580264901 35525000000 35526754967 1165261632 1167016599
+106578000000 106583265078 35526000000 35527755026 1166261632 1168016658
+106581000000 106586265224 35527000000 35528755074 1167261632 1169016706
+106584000000 106589265368 35528000000 35529755122 1168261632 1170016754
+106587000000 106590888022 35529000000 35530296007 1169261632 1170557639
+106590000000 106595265683 35530000000 35531755227 1170261632 1172016859
+106593000000 106598265843 35531000000 35532755281 1171261632 1173016913
+106596000000 106601265980 35532000000 35533755326 1172261632 1174016958
+106599000000 106604266138 35533000000 35534755379 1173261632 1175017011
+106602000000 106607266296 35534000000 35535755432 1174261632 1176017064
+106605000000 106610266410 35535000000 35536755470 1175261632 1177017102
+106608000000 106613266571 35536000000 35537755523 1176261632 1178017155
+106611000000 106616266698 35537000000 35538755566 1177261632 1179017198
+106614000000 106619266807 35538000000 35539755602 1178261632 1180017234
+106617000000 106622266949 35539000000 35540755649 1179261632 1181017281
+106620000000 106625267183 35540000000 35541755727 1180261632 1182017359
+106623000000 106628267096 35541000000 35542755698 1181261632 1183017330
+106626000000 106631267217 35542000000 35543755739 1182261632 1184017371
+106629000000 106634267325 35543000000 35544755775 1183261632 1185017407
+106632000000 106637267560 35544000000 35545755853 1184261632 1186017485
+106635000000 106640267739 35545000000 35546755913 1185261632 1187017545
+106638000000 106643181379 35546000000 35547727126 1186261632 1187988758
+106641000000 106646268008 35547000000 35548756002 1187261632 1189017634
+106644000000 106649268181 35548000000 35549756060 1188261632 1190017692
+106647000000 106652268297 35549000000 35550756099 1189261632 1191017731
+106650000000 106655268470 35550000000 35551756156 1190261632 1192017788
+106653000000 106658268642 35551000000 35552756214 1191261632 1193017846
+106656000000 106661268698 35552000000 35553756232 1192261632 1194017864
+106659000000 106664268844 35553000000 35554756281 1193261632 1195017913
+106662000000 106667269040 35554000000 35555756346 1194261632 1196017978
+106665000000 106670269069 35555000000 35556756356 1195261632 1197017988
+106668000000 106673269375 35556000000 35557756458 1196261632 1198018090
+106671000000 106676269547 35557000000 35558756515 1197261632 1199018147
+106674000000 106679269680 35558000000 35559756560 1198261632 1200018192
+106677000000 106682269797 35559000000 35560756599 1199261632 1201018231
+106680000000 106685269982 35560000000 35561756660 1200261632 1202018292
+106683000000 106688270088 35561000000 35562756696 1201261632 1203018328
+106686000000 106691270269 35562000000 35563756756 1202261632 1204018388
+106689000000 106694270481 35563000000 35564756827 1203261632 1205018459
+106692000000 106697270588 35564000000 35565756862 1204261632 1206018494
+106695000000 106700270754 35565000000 35566756918 1205261632 1207018550
+106698000000 106702869499 35566000000 35567623166 1206261632 1207884798
+106701000000 106706271025 35567000000 35568757008 1207261632 1209018640
+106704000000 106709271137 35568000000 35569757045 1208261632 1210018677
+106707000000 106712271346 35569000000 35570757115 1209261632 1211018747
+106710000000 106715271425 35570000000 35571757141 1210261632 1212018773
+106713000000 106718271650 35571000000 35572757216 1211261632 1213018848
+106716000000 106721271777 35572000000 35573757259 1212261632 1214018891
+106719000000 106724271866 35573000000 35574757288 1213261632 1215018920
+106722000000 106727271972 35574000000 35575757324 1214261632 1216018956
+106725000000 106730272183 35575000000 35576757394 1215261632 1217019026
+106728000000 106733272392 35576000000 35577757464 1216261632 1218019096
+106731000000 106736272537 35577000000 35578757512 1217261632 1219019144
+106734000000 106739272663 35578000000 35579757554 1218261632 1220019186
+106737000000 106742272829 35579000000 35580757609 1219261632 1221019241
+106740000000 106745272909 35580000000 35581757636 1220261632 1222019268
+106743000000 106748273144 35581000000 35582757714 1221261632 1223019346
+106746000000 106751273303 35582000000 35583757767 1222261632 1224019399
+106749000000 106754273424 35583000000 35584757808 1223261632 1225019440
+106752000000 106757273584 35584000000 35585757861 1224261632 1226019493
+106755000000 106760273667 35585000000 35586757889 1225261632 1227019521
+106758000000 106763273913 35586000000 35587757971 1226261632 1228019603
+106761000000 106766274036 35587000000 35588758012 1227261632 1229019644
+106764000000 106769274172 35588000000 35589758057 1228261632 1230019689
+106767000000 106772274347 35589000000 35590758115 1229261632 1231019747
+106770000000 106775274469 35590000000 35591758156 1230261632 1232019788
+106773000000 106778274619 35591000000 35592758206 1231261632 1233019838
+106776000000 106781274767 35592000000 35593758255 1232261632 1234019887
+106779000000 106783448461 35593000000 35594482820 1233261632 1234744452
+106782000000 106787275087 35594000000 35595758362 1234261632 1236019994
+106785000000 106790275219 35595000000 35596758406 1235261632 1237020038
+106788000000 106793275393 35596000000 35597758464 1236261632 1238020096
+106791000000 106796275512 35597000000 35598758504 1237261632 1239020136
+106794000000 106799275636 35598000000 35599758545 1238261632 1240020177
+106797000000 106802275855 35599000000 35600758618 1239261632 1241020250
+106800000000 106805275991 35600000000 35601758663 1240261632 1242020295
+106803000000 106808276142 35601000000 35602758714 1241261632 1243020346
+106806000000 106811276292 35602000000 35603758764 1242261632 1244020396
+106809000000 106814276407 35603000000 35604758802 1243261632 1245020434
+106812000000 106817276504 35604000000 35605758834 1244261632 1246020466
+106815000000 106820276712 35605000000 35606758904 1245261632 1247020536
+106818000000 106823276867 35606000000 35607758955 1246261632 1248020587
+106821000000 106826277026 35607000000 35608759008 1247261632 1249020640
+106824000000 106829277200 35608000000 35609759066 1248261632 1250020698
+106827000000 106832277300 35609000000 35610759100 1249261632 1251020732
+106830000000 106835277478 35610000000 35611759159 1250261632 1252020791
+106833000000 106838277627 35611000000 35612759209 1251261632 1253020841
+106836000000 106841277755 35612000000 35613759251 1252261632 1254020883
+106839000000 106844277924 35613000000 35614759308 1253261632 1255020940
+106842000000 106847278044 35614000000 35615759348 1254261632 1256020980
+106845000000 106849105394 35615000000 35616368464 1255261632 1256630096
+106848000000 106853278294 35616000000 35617759431 1256261632 1258021063
+106851000000 106856278552 35617000000 35618759517 1257261632 1259021149
+106854000000 106859278657 35618000000 35619759552 1258261632 1260021184
+106857000000 106862278737 35619000000 35620759579 1259261632 1261021211
+106860000000 106865278884 35620000000 35621759628 1260261632 1262021260
+106863000000 106868279138 35621000000 35622759712 1261261632 1263021344
+106866000000 106871279228 35622000000 35623759742 1262261632 1264021374
+106869000000 106874279473 35623000000 35624759824 1263261632 1265021456
+106872000000 106877279551 35624000000 35625759850 1264261632 1266021482
+106875000000 106880279728 35625000000 35626759909 1265261632 1267021541
+106878000000 106883279874 35626000000 35627759958 1266261632 1268021590
+106881000000 106886280018 35627000000 35628760006 1267261632 1269021638
+106884000000 106887902672 35628000000 35629300890 1268261632 1269562522
+106887000000 106892280333 35629000000 35630760111 1269261632 1271021743
+106890000000 106895280493 35630000000 35631760164 1270261632 1272021796
+106893000000 106898280630 35631000000 35632760210 1271261632 1273021842
+106896000000 106901280788 35632000000 35633760262 1272261632 1274021894
+106899000000 106904280946 35633000000 35634760315 1273261632 1275021947
+106902000000 106907281060 35634000000 35635760353 1274261632 1276021985
+106905000000 106910281221 35635000000 35636760407 1275261632 1277022039
+106908000000 106913281348 35636000000 35637760449 1276261632 1278022081
+106911000000 106916281457 35637000000 35638760485 1277261632 1279022117
+106914000000 106919281599 35638000000 35639760533 1278261632 1280022165
+106917000000 106922281833 35639000000 35640760611 1279261632 1281022243
+106920000000 106925281746 35640000000 35641760582 1280261632 1282022214
+106923000000 106928281867 35641000000 35642760622 1281261632 1283022254
+106926000000 106931281975 35642000000 35643760658 1282261632 1284022290
+106929000000 106934282210 35643000000 35644760736 1283261632 1285022368
+106932000000 106937282389 35644000000 35645760796 1284261632 1286022428
+106935000000 106940196029 35645000000 35646732009 1285261632 1286993641
+106938000000 106943282658 35646000000 35647760886 1286261632 1288022518
+106941000000 106946282831 35647000000 35648760943 1287261632 1289022575
+106944000000 106949282947 35648000000 35649760982 1288261632 1290022614
+106947000000 106952283120 35649000000 35650761040 1289261632 1291022672
+106950000000 106955283292 35650000000 35651761097 1290261632 1292022729
+106953000000 106958283348 35651000000 35652761116 1291261632 1293022748
+106956000000 106961283494 35652000000 35653761164 1292261632 1294022796
+106959000000 106964283690 35653000000 35654761230 1293261632 1295022862
+106962000000 106967283719 35654000000 35655761239 1294261632 1296022871
+106965000000 106970284025 35655000000 35656761341 1295261632 1297022973
+106968000000 106973284197 35656000000 35657761399 1296261632 1298023031
+106971000000 106976284330 35657000000 35658761443 1297261632 1299023075
+106974000000 106979284447 35658000000 35659761482 1298261632 1300023114
+106977000000 106982284632 35659000000 35660761544 1299261632 1301023176
+106980000000 106985284738 35660000000 35661761579 1300261632 1302023211
+106983000000 106988284919 35661000000 35662761639 1301261632 1303023271
+106986000000 106991285131 35662000000 35663761710 1302261632 1304023342
+106989000000 106994285238 35663000000 35664761746 1303261632 1305023378
+106992000000 106997285404 35664000000 35665761801 1304261632 1306023433
+106995000000 106999884149 35665000000 35666628049 1305261632 1306889681
+106998000000 107003285675 35666000000 35667761891 1306261632 1308023523
+107001000000 107006285787 35667000000 35668761929 1307261632 1309023561
+107004000000 107009285996 35668000000 35669761998 1308261632 1310023630
+107007000000 107012286075 35669000000 35670762025 1309261632 1311023657
+107010000000 107015286300 35670000000 35671762100 1310261632 1312023732
+107013000000 107018286427 35671000000 35672762142 1311261632 1313023774
+107016000000 107021286516 35672000000 35673762172 1312261632 1314023804
+107019000000 107024286622 35673000000 35674762207 1313261632 1315023839
+107022000000 107027286833 35674000000 35675762277 1314261632 1316023909
+107025000000 107030287042 35675000000 35676762347 1315261632 1317023979
+107028000000 107033287187 35676000000 35677762395 1316261632 1318024027
+107031000000 107036287313 35677000000 35678762437 1317261632 1319024069
+107034000000 107039287479 35678000000 35679762493 1318261632 1320024125
+107037000000 107042287559 35679000000 35680762519 1319261632 1321024151
+107040000000 107045287794 35680000000 35681762598 1320261632 1322024230
+107043000000 107048287953 35681000000 35682762651 1321261632 1323024283
+107046000000 107051288074 35682000000 35683762691 1322261632 1324024323
+107049000000 107054288234 35683000000 35684762744 1323261632 1325024376
+107052000000 107057288317 35684000000 35685762772 1324261632 1326024404
+107055000000 107060288563 35685000000 35686762854 1325261632 1327024486
+107058000000 107063288686 35686000000 35687762895 1326261632 1328024527
+107061000000 107066288822 35687000000 35688762940 1327261632 1329024572
+107064000000 107069288997 35688000000 35689762999 1328261632 1330024631
+107067000000 107072289119 35689000000 35690763039 1329261632 1331024671
+107070000000 107075289269 35690000000 35691763089 1330261632 1332024721
+107073000000 107078289417 35691000000 35692763139 1331261632 1333024771
+107076000000 107080463111 35692000000 35693487703 1332261632 1333749335
+107079000000 107084289737 35693000000 35694763245 1333261632 1335024877
+107082000000 107087289869 35694000000 35695763289 1334261632 1336024921
+107085000000 107090290043 35695000000 35696763347 1335261632 1337024979
+107088000000 107093290162 35696000000 35697763387 1336261632 1338025019
+107091000000 107096290286 35697000000 35698763428 1337261632 1339025060
+107094000000 107099290505 35698000000 35699763501 1338261632 1340025133
+107097000000 107102290641 35699000000 35700763547 1339261632 1341025179
+107100000000 107105290792 35700000000 35701763597 1340261632 1342025229
+107103000000 107108290942 35701000000 35702763647 1341261632 1343025279
+107106000000 107111291057 35702000000 35703763685 1342261632 1344025317
+107109000000 107114291154 35703000000 35704763718 1343261632 1345025350
+107112000000 107117291362 35704000000 35705763787 1344261632 1346025419
+107115000000 107120291517 35705000000 35706763839 1345261632 1347025471
+107118000000 107123291676 35706000000 35707763892 1346261632 1348025524
+107121000000 107126291850 35707000000 35708763950 1347261632 1349025582
+107124000000 107129291950 35708000000 35709763983 1348261632 1350025615
+107127000000 107132292128 35709000000 35710764042 1349261632 1351025674
+107130000000 107135292277 35710000000 35711764092 1350261632 1352025724
+107133000000 107138292405 35711000000 35712764135 1351261632 1353025767
+107136000000 107141292574 35712000000 35713764191 1352261632 1354025823
+107139000000 107144292694 35713000000 35714764231 1353261632 1355025863
+107142000000 107146120044 35714000000 35715373348 1354261632 1355634980
+107145000000 107150292944 35715000000 35716764314 1355261632 1357025946
+107148000000 107153293202 35716000000 35717764400 1356261632 1358026032
+107151000000 107156293307 35717000000 35718764435 1357261632 1359026067
+107154000000 107159293387 35718000000 35719764462 1358261632 1360026094
+107157000000 107162293534 35719000000 35720764511 1359261632 1361026143
+107160000000 107165293788 35720000000 35721764596 1360261632 1362026228
+107163000000 107168293878 35721000000 35722764626 1361261632 1363026258
+107166000000 107171294123 35722000000 35723764707 1362261632 1364026339
+107169000000 107174294201 35723000000 35724764733 1363261632 1365026365
+107172000000 107177294378 35724000000 35725764792 1364261632 1366026424
+107175000000 107180294524 35725000000 35726764841 1365261632 1367026473
+107178000000 107183294668 35726000000 35727764889 1366261632 1368026521
+107181000000 107184917322 35727000000 35728305774 1367261632 1368567406
+107184000000 107189294983 35728000000 35729764994 1368261632 1370026626
+107187000000 107192295143 35729000000 35730765047 1369261632 1371026679
+107190000000 107195295280 35730000000 35731765093 1370261632 1372026725
+107193000000 107198295438 35731000000 35732765146 1371261632 1373026778
+107196000000 107201295596 35732000000 35733765198 1372261632 1374026830
+107199000000 107204295710 35733000000 35734765236 1373261632 1375026868
+107202000000 107207295871 35734000000 35735765290 1374261632 1376026922
+107205000000 107210295998 35735000000 35736765332 1375261632 1377026964
+107208000000 107213296107 35736000000 35737765369 1376261632 1378027001
+107211000000 107216296249 35737000000 35738765416 1377261632 1379027048
+107214000000 107219296483 35738000000 35739765494 1378261632 1380027126
+107217000000 107222296396 35739000000 35740765465 1379261632 1381027097
+107220000000 107225296517 35740000000 35741765505 1380261632 1382027137
+107223000000 107228296625 35741000000 35742765541 1381261632 1383027173
+107226000000 107231296860 35742000000 35743765620 1382261632 1384027252
+107229000000 107234297039 35743000000 35744765679 1383261632 1385027311
+107232000000 107237210679 35744000000 35745736893 1384261632 1385998525
+107235000000 107240297308 35745000000 35746765769 1385261632 1387027401
+107238000000 107243297481 35746000000 35747765827 1386261632 1388027459
+107241000000 107246297597 35747000000 35748765865 1387261632 1389027497
+107244000000 107249297770 35748000000 35749765923 1388261632 1390027555
+107247000000 107252297942 35749000000 35750765980 1389261632 1391027612
+107250000000 107255297998 35750000000 35751765999 1390261632 1392027631
+107253000000 107258298144 35751000000 35752766048 1391261632 1393027680
+107256000000 107261298340 35752000000 35753766113 1392261632 1394027745
+107259000000 107264298369 35753000000 35754766123 1393261632 1395027755
+107262000000 107267298675 35754000000 35755766225 1394261632 1396027857
+107265000000 107270298847 35755000000 35756766282 1395261632 1397027914
+107268000000 107273298980 35756000000 35757766326 1396261632 1398027958
+107271000000 107276299097 35757000000 35758766365 1397261632 1399027997
+107274000000 107279299282 35758000000 35759766427 1398261632 1400028059
+107277000000 107282299388 35759000000 35760766462 1399261632 1401028094
+107280000000 107285299569 35760000000 35761766523 1400261632 1402028155
+107283000000 107288299781 35761000000 35762766593 1401261632 1403028225
+107286000000 107291299888 35762000000 35763766629 1402261632 1404028261
+107289000000 107294300054 35763000000 35764766684 1403261632 1405028316
+107292000000 107296898799 35764000000 35765632933 1404261632 1405894565
+107295000000 107300300325 35765000000 35766766775 1405261632 1407028407
+107298000000 107303300437 35766000000 35767766812 1406261632 1408028444
+107301000000 107306300646 35767000000 35768766882 1407261632 1409028514
+107304000000 107309300725 35768000000 35769766908 1408261632 1410028540
+107307000000 107312300950 35769000000 35770766983 1409261632 1411028615
+107310000000 107315301077 35770000000 35771767025 1410261632 1412028657
+107313000000 107318301166 35771000000 35772767055 1411261632 1413028687
+107316000000 107321301272 35772000000 35773767090 1412261632 1414028722
+107319000000 107324301483 35773000000 35774767161 1413261632 1415028793
+107322000000 107327301692 35774000000 35775767230 1414261632 1416028862
+107325000000 107330301837 35775000000 35776767279 1415261632 1417028911
+107328000000 107333301963 35776000000 35777767321 1416261632 1418028953
+107331000000 107336302129 35777000000 35778767376 1417261632 1419029008
+107334000000 107339302209 35778000000 35779767403 1418261632 1420029035
+107337000000 107342302444 35779000000 35780767481 1419261632 1421029113
+107340000000 107345302603 35780000000 35781767534 1420261632 1422029166
+107343000000 107348302724 35781000000 35782767574 1421261632 1423029206
+107346000000 107351302884 35782000000 35783767628 1422261632 1424029260
+107349000000 107354302967 35783000000 35784767655 1423261632 1425029287
+107352000000 107357303213 35784000000 35785767737 1424261632 1426029369
+107355000000 107360303336 35785000000 35786767778 1425261632 1427029410
+107358000000 107363303472 35786000000 35787767824 1426261632 1428029456
+107361000000 107366303647 35787000000 35788767882 1427261632 1429029514
+107364000000 107369303769 35788000000 35789767923 1428261632 1430029555
+107367000000 107372303919 35789000000 35790767973 1429261632 1431029605
+107370000000 107375304067 35790000000 35791768022 1430261632 1432029654
+107373000000 107377477761 35791000000 35792492587 1431261632 1432754219
+107376000000 107381304387 35792000000 35793768129 1432261632 1434029761
+107379000000 107384304519 35793000000 35794768173 1433261632 1435029805
+107382000000 107387304693 35794000000 35795768231 1434261632 1436029863
+107385000000 107390304812 35795000000 35796768270 1435261632 1437029902
+107388000000 107393304936 35796000000 35797768312 1436261632 1438029944
+107391000000 107396305155 35797000000 35798768385 1437261632 1439030017
+107394000000 107399305291 35798000000 35799768430 1438261632 1440030062
+107397000000 107402305442 35799000000 35800768480 1439261632 1441030112
+107400000000 107405305592 35800000000 35801768530 1440261632 1442030162
+107403000000 107408305707 35801000000 35802768569 1441261632 1443030201
+107406000000 107411305804 35802000000 35803768601 1442261632 1444030233
+107409000000 107414306012 35803000000 35804768670 1443261632 1445030302
+107412000000 107417306167 35804000000 35805768722 1444261632 1446030354
+107415000000 107420306326 35805000000 35806768775 1445261632 1447030407
+107418000000 107423306500 35806000000 35807768833 1446261632 1448030465
+107421000000 107426306600 35807000000 35808768866 1447261632 1449030498
+107424000000 107429306778 35808000000 35809768926 1448261632 1450030558
+107427000000 107432306927 35809000000 35810768975 1449261632 1451030607
+107430000000 107435307055 35810000000 35811769018 1450261632 1452030650
+107433000000 107438307224 35811000000 35812769074 1451261632 1453030706
+107436000000 107441307344 35812000000 35813769114 1452261632 1454030746
+107439000000 107443134694 35813000000 35814378231 1453261632 1454639863
+107442000000 107447307594 35814000000 35815769198 1454261632 1456030830
+107445000000 107450307852 35815000000 35816769284 1455261632 1457030916
+107448000000 107453307957 35816000000 35817769319 1456261632 1458030951
+107451000000 107456308037 35817000000 35818769345 1457261632 1459030977
+107454000000 107459308184 35818000000 35819769394 1458261632 1460031026
+107457000000 107462308438 35819000000 35820769479 1459261632 1461031111
+107460000000 107465308528 35820000000 35821769509 1460261632 1462031141
+107463000000 107468308773 35821000000 35822769591 1461261632 1463031223
+107466000000 107471308851 35822000000 35823769617 1462261632 1464031249
+107469000000 107474309028 35823000000 35824769676 1463261632 1465031308
+107472000000 107477309174 35824000000 35825769724 1464261632 1466031356
+107475000000 107480309318 35825000000 35826769772 1465261632 1467031404
+107478000000 107481931972 35826000000 35827310657 1466261632 1467572289
+107481000000 107486309633 35827000000 35828769877 1467261632 1469031509
+107484000000 107489309793 35828000000 35829769931 1468261632 1470031563
+107487000000 107492309930 35829000000 35830769976 1469261632 1471031608
+107490000000 107495310088 35830000000 35831770029 1470261632 1472031661
+107493000000 107498310246 35831000000 35832770082 1471261632 1473031714
+107496000000 107501310360 35832000000 35833770120 1472261632 1474031752
+107499000000 107504310521 35833000000 35834770173 1473261632 1475031805
+107502000000 107507310648 35834000000 35835770216 1474261632 1476031848
+107505000000 107510310757 35835000000 35836770252 1475261632 1477031884
+107508000000 107513310899 35836000000 35837770299 1476261632 1478031931
+107511000000 107516311133 35837000000 35838770377 1477261632 1479032009
+107514000000 107519311046 35838000000 35839770348 1478261632 1480031980
+107517000000 107522311167 35839000000 35840770389 1479261632 1481032021
+107520000000 107525311275 35840000000 35841770425 1480261632 1482032057
+107523000000 107528311510 35841000000 35842770503 1481261632 1483032135
+107526000000 107531311689 35842000000 35843770563 1482261632 1484032195
+107529000000 107534225329 35843000000 35844741776 1483261632 1485003408
+107532000000 107537311958 35844000000 35845770652 1484261632 1486032284
+107535000000 107540312131 35845000000 35846770710 1485261632 1487032342
+107538000000 107543312247 35846000000 35847770749 1486261632 1488032381
+107541000000 107546312420 35847000000 35848770806 1487261632 1489032438
+107544000000 107549312592 35848000000 35849770864 1488261632 1490032496
+107547000000 107552312648 35849000000 35850770882 1489261632 1491032514
+107550000000 107555312794 35850000000 35851770931 1490261632 1492032563
+107553000000 107558312990 35851000000 35852770996 1491261632 1493032628
+107556000000 107561313019 35852000000 35853771006 1492261632 1494032638
+107559000000 107564313325 35853000000 35854771108 1493261632 1495032740
+107562000000 107567313497 35854000000 35855771165 1494261632 1496032797
+107565000000 107570313630 35855000000 35856771210 1495261632 1497032842
+107568000000 107573313747 35856000000 35857771249 1496261632 1498032881
+107571000000 107576313932 35857000000 35858771310 1497261632 1499032942
+107574000000 107579314038 35858000000 35859771346 1498261632 1500032978
+107577000000 107582314219 35859000000 35860771406 1499261632 1501033038
+107580000000 107585314431 35860000000 35861771477 1500261632 1502033109
+107583000000 107588314538 35861000000 35862771512 1501261632 1503033144
+107586000000 107591314704 35862000000 35863771568 1502261632 1504033200
+107589000000 107593913449 35863000000 35864637816 1503261632 1504899448
+107592000000 107597314975 35864000000 35865771658 1504261632 1506033290
+107595000000 107600315087 35865000000 35866771695 1505261632 1507033327
+107598000000 107603315296 35866000000 35867771765 1506261632 1508033397
+107601000000 107606315375 35867000000 35868771791 1507261632 1509033423
+107604000000 107609315600 35868000000 35869771866 1508261632 1510033498
+107607000000 107612315727 35869000000 35870771909 1509261632 1511033541
+107610000000 107615315816 35870000000 35871771938 1510261632 1512033570
+107613000000 107618315922 35871000000 35872771974 1511261632 1513033606
+107616000000 107621316133 35872000000 35873772044 1512261632 1514033676
+107619000000 107624316342 35873000000 35874772114 1513261632 1515033746
+107622000000 107627316487 35874000000 35875772162 1514261632 1516033794
+107625000000 107630316613 35875000000 35876772204 1515261632 1517033836
+107628000000 107633316779 35876000000 35877772259 1516261632 1518033891
+107631000000 107636316859 35877000000 35878772286 1517261632 1519033918
+107634000000 107639317094 35878000000 35879772364 1518261632 1520033996
+107637000000 107642317253 35879000000 35880772417 1519261632 1521034049
+107640000000 107645317374 35880000000 35881772458 1520261632 1522034090
+107643000000 107648317534 35881000000 35882772511 1521261632 1523034143
+107646000000 107651317617 35882000000 35883772539 1522261632 1524034171
+107649000000 107654317863 35883000000 35884772621 1523261632 1525034253
+107652000000 107657317986 35884000000 35885772662 1524261632 1526034294
+107655000000 107660318122 35885000000 35886772707 1525261632 1527034339
+107658000000 107663318297 35886000000 35887772765 1526261632 1528034397
+107661000000 107666318419 35887000000 35888772806 1527261632 1529034438
+107664000000 107669318569 35888000000 35889772856 1528261632 1530034488
+107667000000 107672318717 35889000000 35890772905 1529261632 1531034537
+107670000000 107674492411 35890000000 35891497470 1530261632 1531759102
+107673000000 107678319037 35891000000 35892773012 1531261632 1533034644
+107676000000 107681319169 35892000000 35893773056 1532261632 1534034688
+107679000000 107684319343 35893000000 35894773114 1533261632 1535034746
+107682000000 107687319462 35894000000 35895773154 1534261632 1536034786
+107685000000 107690319586 35895000000 35896773195 1535261632 1537034827
+107688000000 107693319805 35896000000 35897773268 1536261632 1538034900
+107691000000 107696319941 35897000000 35898773313 1537261632 1539034945
+107694000000 107699320092 35898000000 35899773364 1538261632 1540034996
+107697000000 107702320242 35899000000 35900773414 1539261632 1541035046
+107700000000 107705320357 35900000000 35901773452 1540261632 1542035084
+107703000000 107708320454 35901000000 35902773484 1541261632 1543035116
+107706000000 107711320662 35902000000 35903773554 1542261632 1544035186
+107709000000 107714320817 35903000000 35904773605 1543261632 1545035237
+107712000000 107717320976 35904000000 35905773658 1544261632 1546035290
+107715000000 107720321150 35905000000 35906773716 1545261632 1547035348
+107718000000 107723321250 35906000000 35907773750 1546261632 1548035382
+107721000000 107726321428 35907000000 35908773809 1547261632 1549035441
+107724000000 107729321577 35908000000 35909773859 1548261632 1550035491
+107727000000 107732321705 35909000000 35910773901 1549261632 1551035533
+107730000000 107735321874 35910000000 35911773958 1550261632 1552035590
+107733000000 107738321994 35911000000 35912773998 1551261632 1553035630
+107736000000 107740149344 35912000000 35913383114 1552261632 1553644746
+107739000000 107744322244 35913000000 35914774081 1553261632 1555035713
+107742000000 107747322502 35914000000 35915774167 1554261632 1556035799
+107745000000 107750322607 35915000000 35916774202 1555261632 1557035834
+107748000000 107753322687 35916000000 35917774229 1556261632 1558035861
+107751000000 107756322834 35917000000 35918774278 1557261632 1559035910
+107754000000 107759323088 35918000000 35919774362 1558261632 1560035994
+107757000000 107762323178 35919000000 35920774392 1559261632 1561036024
+107760000000 107765323423 35920000000 35921774474 1560261632 1562036106
+107763000000 107768323501 35921000000 35922774500 1561261632 1563036132
+107766000000 107771323678 35922000000 35923774559 1562261632 1564036191
+107769000000 107774323824 35923000000 35924774608 1563261632 1565036240
+107772000000 107777323968 35924000000 35925774656 1564261632 1566036288
+107775000000 107778946622 35925000000 35926315540 1565261632 1566577172
+107778000000 107783324283 35926000000 35927774761 1566261632 1568036393
+107781000000 107786324443 35927000000 35928774814 1567261632 1569036446
+107784000000 107789324580 35928000000 35929774860 1568261632 1570036492
+107787000000 107792324738 35929000000 35930774912 1569261632 1571036544
+107790000000 107795324896 35930000000 35931774965 1570261632 1572036597
+107793000000 107798325010 35931000000 35932775003 1571261632 1573036635
+107796000000 107801325171 35932000000 35933775057 1572261632 1574036689
+107799000000 107804325298 35933000000 35934775099 1573261632 1575036731
+107802000000 107807325407 35934000000 35935775135 1574261632 1576036767
+107805000000 107810325549 35935000000 35936775183 1575261632 1577036815
+107808000000 107813325783 35936000000 35937775261 1576261632 1578036893
+107811000000 107816325696 35937000000 35938775232 1577261632 1579036864
+107814000000 107819325817 35938000000 35939775272 1578261632 1580036904
+107817000000 107822325925 35939000000 35940775308 1579261632 1581036940
+107820000000 107825326160 35940000000 35941775386 1580261632 1582037018
+107823000000 107828326339 35941000000 35942775446 1581261632 1583037078
+107826000000 107831239979 35942000000 35943746659 1582261632 1584008291
+107829000000 107834326608 35943000000 35944775536 1583261632 1585037168
+107832000000 107837326781 35944000000 35945775593 1584261632 1586037225
+107835000000 107840326897 35945000000 35946775632 1585261632 1587037264
+107838000000 107843327070 35946000000 35947775690 1586261632 1588037322
+107841000000 107846327242 35947000000 35948775747 1587261632 1589037379
+107844000000 107849327298 35948000000 35949775766 1588261632 1590037398
+107847000000 107852327444 35949000000 35950775814 1589261632 1591037446
+107850000000 107855327640 35950000000 35951775880 1590261632 1592037512
+107853000000 107858327669 35951000000 35952775889 1591261632 1593037521
+107856000000 107861327975 35952000000 35953775991 1592261632 1594037623
+107859000000 107864328147 35953000000 35954776049 1593261632 1595037681
+107862000000 107867328280 35954000000 35955776093 1594261632 1596037725
+107865000000 107870328397 35955000000 35956776132 1595261632 1597037764
+107868000000 107873328582 35956000000 35957776194 1596261632 1598037826
+107871000000 107876328688 35957000000 35958776229 1597261632 1599037861
+107874000000 107879328869 35958000000 35959776289 1598261632 1600037921
+107877000000 107882329081 35959000000 35960776360 1599261632 1601037992
+107880000000 107885329188 35960000000 35961776396 1600261632 1602038028
+107883000000 107888329354 35961000000 35962776451 1601261632 1603038083
+107886000000 107890928099 35962000000 35963642699 1602261632 1603904331
+107889000000 107894329625 35963000000 35964776541 1603261632 1605038173
+107892000000 107897329737 35964000000 35965776579 1604261632 1606038211
+107895000000 107900329946 35965000000 35966776648 1605261632 1607038280
+107898000000 107903330025 35966000000 35967776675 1606261632 1608038307
+107901000000 107906330250 35967000000 35968776750 1607261632 1609038382
+107904000000 107909330377 35968000000 35969776792 1608261632 1610038424
+107907000000 107912330466 35969000000 35970776822 1609261632 1611038454
+107910000000 107915330572 35970000000 35971776857 1610261632 1612038489
+107913000000 107918330783 35971000000 35972776927 1611261632 1613038559
+107916000000 107921330992 35972000000 35973776997 1612261632 1614038629
+107919000000 107924331137 35973000000 35974777045 1613261632 1615038677
+107922000000 107927331263 35974000000 35975777087 1614261632 1616038719
+107925000000 107930331429 35975000000 35976777143 1615261632 1617038775
+107928000000 107933331509 35976000000 35977777169 1616261632 1618038801
+107931000000 107936331744 35977000000 35978777248 1617261632 1619038880
+107934000000 107939331903 35978000000 35979777301 1618261632 1620038933
+107937000000 107942332024 35979000000 35980777341 1619261632 1621038973
+107940000000 107945332184 35980000000 35981777394 1620261632 1622039026
+107943000000 107948332267 35981000000 35982777422 1621261632 1623039054
+107946000000 107951332513 35982000000 35983777504 1622261632 1624039136
+107949000000 107954332636 35983000000 35984777545 1623261632 1625039177
+107952000000 107957332772 35984000000 35985777590 1624261632 1626039222
+107955000000 107960332947 35985000000 35986777649 1625261632 1627039281
+107958000000 107963333069 35986000000 35987777689 1626261632 1628039321
+107961000000 107966333219 35987000000 35988777739 1627261632 1629039371
+107964000000 107969333367 35988000000 35989777789 1628261632 1630039421
+107967000000 107971507061 35989000000 35990502353 1629261632 1630763985
+107970000000 107975333687 35990000000 35991777895 1630261632 1632039527
+107973000000 107978333819 35991000000 35992777939 1631261632 1633039571
+107976000000 107981333993 35992000000 35993777997 1632261632 1634039629
+107979000000 107984334112 35993000000 35994778037 1633261632 1635039669
+107982000000 107987334236 35994000000 35995778078 1634261632 1636039710
+107985000000 107990334455 35995000000 35996778151 1635261632 1637039783
+107988000000 107993334591 35996000000 35997778197 1636261632 1638039829
+107991000000 107996334742 35997000000 35998778247 1637261632 1639039879
+107994000000 107999334892 35998000000 35999778297 1638261632 1640039929
+107997000000 108002335007 35999000000 36000778335 1639261632 1641039967
+108000000000 108005335104 36000000000 36001778368 1640261632 1642040000
+108003000000 108008335312 36001000000 36002778437 1641261632 1643040069
+108006000000 108011335467 36002000000 36003778489 1642261632 1644040121
+108009000000 108014335626 36003000000 36004778542 1643261632 1645040174
+108012000000 108017335800 36004000000 36005778600 1644261632 1646040232
+108015000000 108020335900 36005000000 36006778633 1645261632 1647040265
+108018000000 108023336078 36006000000 36007778692 1646261632 1648040324
+108021000000 108026336227 36007000000 36008778742 1647261632 1649040374
+108024000000 108029336355 36008000000 36009778785 1648261632 1650040417
+108027000000 108032336524 36009000000 36010778841 1649261632 1651040473
+108030000000 108035336644 36010000000 36011778881 1650261632 1652040513
+108033000000 108037163994 36011000000 36012387998 1651261632 1652649630
+108036000000 108041336894 36012000000 36013778964 1652261632 1654040596
+108039000000 108044337152 36013000000 36014779050 1653261632 1655040682
+108042000000 108047337257 36014000000 36015779085 1654261632 1656040717
+108045000000 108050337337 36015000000 36016779112 1655261632 1657040744
+108048000000 108053337484 36016000000 36017779161 1656261632 1658040793
+108051000000 108056337738 36017000000 36018779246 1657261632 1659040878
+108054000000 108059337828 36018000000 36019779276 1658261632 1660040908
+108057000000 108062338073 36019000000 36020779357 1659261632 1661040989
+108060000000 108065338151 36020000000 36021779383 1660261632 1662041015
+108063000000 108068338328 36021000000 36022779442 1661261632 1663041074
+108066000000 108071338474 36022000000 36023779491 1662261632 1664041123
+108069000000 108074338618 36023000000 36024779539 1663261632 1665041171
+108072000000 108075961272 36024000000 36025320424 1664261632 1665582056
+108075000000 108080338933 36025000000 36026779644 1665261632 1667041276
+108078000000 108083339093 36026000000 36027779697 1666261632 1668041329
+108081000000 108086339230 36027000000 36028779743 1667261632 1669041375
+108084000000 108089339388 36028000000 36029779796 1668261632 1670041428
+108087000000 108092339546 36029000000 36030779848 1669261632 1671041480
+108090000000 108095339660 36030000000 36031779886 1670261632 1672041518
+108093000000 108098339821 36031000000 36032779940 1671261632 1673041572
+108096000000 108101339948 36032000000 36033779982 1672261632 1674041614
+108099000000 108104340057 36033000000 36034780019 1673261632 1675041651
+108102000000 108107340199 36034000000 36035780066 1674261632 1676041698
+108105000000 108110340433 36035000000 36036780144 1675261632 1677041776
+108108000000 108113340346 36036000000 36037780115 1676261632 1678041747
+108111000000 108116340467 36037000000 36038780155 1677261632 1679041787
+108114000000 108119340575 36038000000 36039780191 1678261632 1680041823
+108117000000 108122340810 36039000000 36040780270 1679261632 1681041902
+108120000000 108125340989 36040000000 36041780329 1680261632 1682041961
+108123000000 108128254629 36041000000 36042751543 1681261632 1683013175
+108126000000 108131341258 36042000000 36043780419 1682261632 1684042051
+108129000000 108134341431 36043000000 36044780477 1683261632 1685042109
+108132000000 108137341547 36044000000 36045780515 1684261632 1686042147
+108135000000 108140341720 36045000000 36046780573 1685261632 1687042205
+108138000000 108143341892 36046000000 36047780630 1686261632 1688042262
+108141000000 108146341948 36047000000 36048780649 1687261632 1689042281
+108144000000 108149342094 36048000000 36049780698 1688261632 1690042330
+108147000000 108152342290 36049000000 36050780763 1689261632 1691042395
+108150000000 108155342319 36050000000 36051780773 1690261632 1692042405
+108153000000 108158342625 36051000000 36052780875 1691261632 1693042507
+108156000000 108161342797 36052000000 36053780932 1692261632 1694042564
+108159000000 108164342930 36053000000 36054780976 1693261632 1695042608
+108162000000 108167343047 36054000000 36055781015 1694261632 1696042647
+108165000000 108170343232 36055000000 36056781077 1695261632 1697042709
+108168000000 108173343338 36056000000 36057781112 1696261632 1698042744
+108171000000 108176343519 36057000000 36058781173 1697261632 1699042805
+108174000000 108179343731 36058000000 36059781243 1698261632 1700042875
+108177000000 108182343838 36059000000 36060781279 1699261632 1701042911
+108180000000 108185344004 36060000000 36061781334 1700261632 1702042966
+108183000000 108187942749 36061000000 36062647583 1701261632 1702909215
+108186000000 108191344275 36062000000 36063781425 1702261632 1704043057
+108189000000 108194344387 36063000000 36064781462 1703261632 1705043094
+108192000000 108197344596 36064000000 36065781532 1704261632 1706043164
+108195000000 108200344675 36065000000 36066781558 1705261632 1707043190
+108198000000 108203344900 36066000000 36067781633 1706261632 1708043265
+108201000000 108206345027 36067000000 36068781675 1707261632 1709043307
+108204000000 108209345116 36068000000 36069781705 1708261632 1710043337
+108207000000 108212345222 36069000000 36070781740 1709261632 1711043372
+108210000000 108215345433 36070000000 36071781811 1710261632 1712043443
+108213000000 108218345642 36071000000 36072781880 1711261632 1713043512
+108216000000 108221345787 36072000000 36073781929 1712261632 1714043561
+108219000000 108224345913 36073000000 36074781971 1713261632 1715043603
+108222000000 108227346079 36074000000 36075782026 1714261632 1716043658
+108225000000 108230346159 36075000000 36076782053 1715261632 1717043685
+108228000000 108233346394 36076000000 36077782131 1716261632 1718043763
+108231000000 108236346553 36077000000 36078782184 1717261632 1719043816
+108234000000 108239346674 36078000000 36079782224 1718261632 1720043856
+108237000000 108242346834 36079000000 36080782278 1719261632 1721043910
+108240000000 108245346917 36080000000 36081782305 1720261632 1722043937
+108243000000 108248347163 36081000000 36082782387 1721261632 1723044019
+108246000000 108251347286 36082000000 36083782428 1722261632 1724044060
+108249000000 108254347422 36083000000 36084782474 1723261632 1725044106
+108252000000 108257347597 36084000000 36085782532 1724261632 1726044164
+108255000000 108260347719 36085000000 36086782573 1725261632 1727044205
+108258000000 108263347869 36086000000 36087782623 1726261632 1728044255
+108261000000 108266348017 36087000000 36088782672 1727261632 1729044304
+108264000000 108268521711 36088000000 36089507237 1728261632 1729768869
+108267000000 108272348337 36089000000 36090782779 1729261632 1731044411
+108270000000 108275348469 36090000000 36091782823 1730261632 1732044455
+108273000000 108278348643 36091000000 36092782881 1731261632 1733044513
+108276000000 108281348762 36092000000 36093782920 1732261632 1734044552
+108279000000 108284348886 36093000000 36094782962 1733261632 1735044594
+108282000000 108287349105 36094000000 36095783035 1734261632 1736044667
+108285000000 108290349241 36095000000 36096783080 1735261632 1737044712
+108288000000 108293349392 36096000000 36097783130 1736261632 1738044762
+108291000000 108296349542 36097000000 36098783180 1737261632 1739044812
+108294000000 108299349657 36098000000 36099783219 1738261632 1740044851
+108297000000 108302349754 36099000000 36100783251 1739261632 1741044883
+108300000000 108305349962 36100000000 36101783320 1740261632 1742044952
+108303000000 108308350117 36101000000 36102783372 1741261632 1743045004
+108306000000 108311350276 36102000000 36103783425 1742261632 1744045057
+108309000000 108314350450 36103000000 36104783483 1743261632 1745045115
+108312000000 108317350550 36104000000 36105783516 1744261632 1746045148
+108315000000 108320350728 36105000000 36106783576 1745261632 1747045208
+108318000000 108323350877 36106000000 36107783625 1746261632 1748045257
+108321000000 108326351005 36107000000 36108783668 1747261632 1749045300
+108324000000 108329351174 36108000000 36109783724 1748261632 1750045356
+108327000000 108332351294 36109000000 36110783764 1749261632 1751045396
+108330000000 108334178644 36110000000 36111392881 1750261632 1751654513
+108333000000 108338351544 36111000000 36112783848 1751261632 1753045480
+108336000000 108341351802 36112000000 36113783934 1752261632 1754045566
+108339000000 108344351907 36113000000 36114783969 1753261632 1755045601
+108342000000 108347351987 36114000000 36115783995 1754261632 1756045627
+108345000000 108350352134 36115000000 36116784044 1755261632 1757045676
+108348000000 108353352388 36116000000 36117784129 1756261632 1758045761
+108351000000 108356352478 36117000000 36118784159 1757261632 1759045791
+108354000000 108359352723 36118000000 36119784241 1758261632 1760045873
+108357000000 108362352801 36119000000 36120784267 1759261632 1761045899
+108360000000 108365352978 36120000000 36121784326 1760261632 1762045958
+108363000000 108368353124 36121000000 36122784374 1761261632 1763046006
+108366000000 108371353268 36122000000 36123784422 1762261632 1764046054
+108369000000 108372975922 36123000000 36124325307 1763261632 1764586939
+108372000000 108377353583 36124000000 36125784527 1764261632 1766046159
+108375000000 108380353743 36125000000 36126784581 1765261632 1767046213
+108378000000 108383353880 36126000000 36127784626 1766261632 1768046258
+108381000000 108386354038 36127000000 36128784679 1767261632 1769046311
+108384000000 108389354196 36128000000 36129784732 1768261632 1770046364
+108387000000 108392354310 36129000000 36130784770 1769261632 1771046402
+108390000000 108395354471 36130000000 36131784823 1770261632 1772046455
+108393000000 108398354598 36131000000 36132784866 1771261632 1773046498
+108396000000 108401354707 36132000000 36133784902 1772261632 1774046534
+108399000000 108404354849 36133000000 36134784949 1773261632 1775046581
+108402000000 108407355083 36134000000 36135785027 1774261632 1776046659
+108405000000 108410354996 36135000000 36136784998 1775261632 1777046630
+108408000000 108413355117 36136000000 36137785039 1776261632 1778046671
+108411000000 108416355225 36137000000 36138785075 1777261632 1779046707
+108414000000 108419355460 36138000000 36139785153 1778261632 1780046785
+108417000000 108422355639 36139000000 36140785213 1779261632 1781046845
+108420000000 108425269279 36140000000 36141756426 1780261632 1782018058
+108423000000 108428355908 36141000000 36142785302 1781261632 1783046934
+108426000000 108431356081 36142000000 36143785360 1782261632 1784046992
+108429000000 108434356197 36143000000 36144785399 1783261632 1785047031
+108432000000 108437356370 36144000000 36145785456 1784261632 1786047088
+108435000000 108440356542 36145000000 36146785514 1785261632 1787047146
+108438000000 108443356598 36146000000 36147785532 1786261632 1788047164
+108441000000 108446356744 36147000000 36148785581 1787261632 1789047213
+108444000000 108449356940 36148000000 36149785646 1788261632 1790047278
+108447000000 108452356969 36149000000 36150785656 1789261632 1791047288
+108450000000 108455357275 36150000000 36151785758 1790261632 1792047390
+108453000000 108458357447 36151000000 36152785815 1791261632 1793047447
+108456000000 108461357580 36152000000 36153785860 1792261632 1794047492
+108459000000 108464357697 36153000000 36154785899 1793261632 1795047531
+108462000000 108467357882 36154000000 36155785960 1794261632 1796047592
+108465000000 108470357988 36155000000 36156785996 1795261632 1797047628
+108468000000 108473358169 36156000000 36157786056 1796261632 1798047688
+108471000000 108476358381 36157000000 36158786127 1797261632 1799047759
+108474000000 108479358488 36158000000 36159786162 1798261632 1800047794
+108477000000 108482358654 36159000000 36160786218 1799261632 1801047850
+108480000000 108484957399 36160000000 36161652466 1800261632 1801914098
+108483000000 108488358925 36161000000 36162786308 1801261632 1803047940
+108486000000 108491359037 36162000000 36163786345 1802261632 1804047977
+108489000000 108494359246 36163000000 36164786415 1803261632 1805048047
+108492000000 108497359325 36164000000 36165786441 1804261632 1806048073
+108495000000 108500359550 36165000000 36166786516 1805261632 1807048148
+108498000000 108503359677 36166000000 36167786559 1806261632 1808048191
+108501000000 108506359766 36167000000 36168786588 1807261632 1809048220
+108504000000 108509359872 36168000000 36169786624 1808261632 1810048256
+108507000000 108512360083 36169000000 36170786694 1809261632 1811048326
+108510000000 108515360292 36170000000 36171786764 1810261632 1812048396
+108513000000 108518360437 36171000000 36172786812 1811261632 1813048444
+108516000000 108521360563 36172000000 36173786854 1812261632 1814048486
+108519000000 108524360729 36173000000 36174786909 1813261632 1815048541
+108522000000 108527360809 36174000000 36175786936 1814261632 1816048568
+108525000000 108530361044 36175000000 36176787014 1815261632 1817048646
+108528000000 108533361203 36176000000 36177787067 1816261632 1818048699
+108531000000 108536361324 36177000000 36178787108 1817261632 1819048740
+108534000000 108539361484 36178000000 36179787161 1818261632 1820048793
+108537000000 108542361567 36179000000 36180787189 1819261632 1821048821
+108540000000 108545361813 36180000000 36181787271 1820261632 1822048903
+108543000000 108548361936 36181000000 36182787312 1821261632 1823048944
+108546000000 108551362072 36182000000 36183787357 1822261632 1824048989
+108549000000 108554362247 36183000000 36184787415 1823261632 1825049047
+108552000000 108557362369 36184000000 36185787456 1824261632 1826049088
+108555000000 108560362519 36185000000 36186787506 1825261632 1827049138
+108558000000 108563362667 36186000000 36187787555 1826261632 1828049187
+108561000000 108565536361 36187000000 36188512120 1827261632 1828773752
+108564000000 108569362987 36188000000 36189787662 1828261632 1830049294
+108567000000 108572363119 36189000000 36190787706 1829261632 1831049338
+108570000000 108575363293 36190000000 36191787764 1830261632 1832049396
+108573000000 108578363412 36191000000 36192787804 1831261632 1833049436
+108576000000 108581363536 36192000000 36193787845 1832261632 1834049477
+108579000000 108584363755 36193000000 36194787918 1833261632 1835049550
+108582000000 108587363891 36194000000 36195787963 1834261632 1836049595
+108585000000 108590364042 36195000000 36196788014 1835261632 1837049646
+108588000000 108593364192 36196000000 36197788064 1836261632 1838049696
+108591000000 108596364307 36197000000 36198788102 1837261632 1839049734
+108594000000 108599364404 36198000000 36199788134 1838261632 1840049766
+108597000000 108602364612 36199000000 36200788204 1839261632 1841049836
+108600000000 108605364767 36200000000 36201788255 1840261632 1842049887
+108603000000 108608364926 36201000000 36202788308 1841261632 1843049940
+108606000000 108611365100 36202000000 36203788366 1842261632 1844049998
+108609000000 108614365200 36203000000 36204788400 1843261632 1845050032
+108612000000 108617365378 36204000000 36205788459 1844261632 1846050091
+108615000000 108620365527 36205000000 36206788509 1845261632 1847050141
+108618000000 108623365655 36206000000 36207788551 1846261632 1848050183
+108621000000 108626365824 36207000000 36208788608 1847261632 1849050240
+108624000000 108629365944 36208000000 36209788648 1848261632 1850050280
+108627000000 108631193294 36209000000 36210397764 1849261632 1850659396
+108630000000 108635366194 36210000000 36211788731 1850261632 1852050363
+108633000000 108638366452 36211000000 36212788817 1851261632 1853050449
+108636000000 108641366557 36212000000 36213788852 1852261632 1854050484
+108639000000 108644366637 36213000000 36214788879 1853261632 1855050511
+108642000000 108647366784 36214000000 36215788928 1854261632 1856050560
+108645000000 108650367038 36215000000 36216789012 1855261632 1857050644
+108648000000 108653367128 36216000000 36217789042 1856261632 1858050674
+108651000000 108656367373 36217000000 36218789124 1857261632 1859050756
+108654000000 108659367451 36218000000 36219789150 1858261632 1860050782
+108657000000 108662367628 36219000000 36220789209 1859261632 1861050841
+108660000000 108665367774 36220000000 36221789258 1860261632 1862050890
+108663000000 108668367918 36221000000 36222789306 1861261632 1863050938
+108666000000 108669990572 36222000000 36223330190 1862261632 1863591822
+108669000000 108674368233 36223000000 36224789411 1863261632 1865051043
+108672000000 108677368393 36224000000 36225789464 1864261632 1866051096
+108675000000 108680368530 36225000000 36226789510 1865261632 1867051142
+108678000000 108683368688 36226000000 36227789562 1866261632 1868051194
+108681000000 108686368846 36227000000 36228789615 1867261632 1869051247
+108684000000 108689368960 36228000000 36229789653 1868261632 1870051285
+108687000000 108692369121 36229000000 36230789707 1869261632 1871051339
+108690000000 108695369248 36230000000 36231789749 1870261632 1872051381
+108693000000 108698369357 36231000000 36232789785 1871261632 1873051417
+108696000000 108701369499 36232000000 36233789833 1872261632 1874051465
+108699000000 108704369733 36233000000 36234789911 1873261632 1875051543
+108702000000 108707369646 36234000000 36235789882 1874261632 1876051514
+108705000000 108710369767 36235000000 36236789922 1875261632 1877051554
+108708000000 108713369875 36236000000 36237789958 1876261632 1878051590
+108711000000 108716370110 36237000000 36238790036 1877261632 1879051668
+108714000000 108719370289 36238000000 36239790096 1878261632 1880051728
+108717000000 108722283929 36239000000 36240761309 1879261632 1881022941
+108720000000 108725370558 36240000000 36241790186 1880261632 1882051818
+108723000000 108728370731 36241000000 36242790243 1881261632 1883051875
+108726000000 108731370847 36242000000 36243790282 1882261632 1884051914
+108729000000 108734371020 36243000000 36244790340 1883261632 1885051972
+108732000000 108737371192 36244000000 36245790397 1884261632 1886052029
+108735000000 108740371248 36245000000 36246790416 1885261632 1887052048
+108738000000 108743371394 36246000000 36247790464 1886261632 1888052096
+108741000000 108746371590 36247000000 36248790530 1887261632 1889052162
+108744000000 108749371619 36248000000 36249790539 1888261632 1890052171
+108747000000 108752371925 36249000000 36250790641 1889261632 1891052273
+108750000000 108755372097 36250000000 36251790699 1890261632 1892052331
+108753000000 108758372230 36251000000 36252790743 1891261632 1893052375
+108756000000 108761372347 36252000000 36253790782 1892261632 1894052414
+108759000000 108764372532 36253000000 36254790844 1893261632 1895052476
+108762000000 108767372638 36254000000 36255790879 1894261632 1896052511
+108765000000 108770372819 36255000000 36256790939 1895261632 1897052571
+108768000000 108773373031 36256000000 36257791010 1896261632 1898052642
+108771000000 108776373138 36257000000 36258791046 1897261632 1899052678
+108774000000 108779373304 36258000000 36259791101 1898261632 1900052733
+108777000000 108781972049 36259000000 36260657349 1899261632 1900918981
+108780000000 108785373575 36260000000 36261791191 1900261632 1902052823
+108783000000 108788373687 36261000000 36262791229 1901261632 1903052861
+108786000000 108791373896 36262000000 36263791298 1902261632 1904052930
+108789000000 108794373975 36263000000 36264791325 1903261632 1905052957
+108792000000 108797374200 36264000000 36265791400 1904261632 1906053032
+108795000000 108800374327 36265000000 36266791442 1905261632 1907053074
+108798000000 108803374416 36266000000 36267791472 1906261632 1908053104
+108801000000 108806374522 36267000000 36268791507 1907261632 1909053139
+108804000000 108809374733 36268000000 36269791577 1908261632 1910053209
+108807000000 108812374942 36269000000 36270791647 1909261632 1911053279
+108810000000 108815375087 36270000000 36271791695 1910261632 1912053327
+108813000000 108818375213 36271000000 36272791737 1911261632 1913053369
+108816000000 108821375379 36272000000 36273791793 1912261632 1914053425
+108819000000 108824375459 36273000000 36274791819 1913261632 1915053451
+108822000000 108827375694 36274000000 36275791898 1914261632 1916053530
+108825000000 108830375853 36275000000 36276791951 1915261632 1917053583
+108828000000 108833375974 36276000000 36277791991 1916261632 1918053623
+108831000000 108836376134 36277000000 36278792044 1917261632 1919053676
+108834000000 108839376217 36278000000 36279792072 1918261632 1920053704
+108837000000 108842376463 36279000000 36280792154 1919261632 1921053786
+108840000000 108845376586 36280000000 36281792195 1920261632 1922053827
+108843000000 108848376722 36281000000 36282792240 1921261632 1923053872
+108846000000 108851376897 36282000000 36283792299 1922261632 1924053931
+108849000000 108854377019 36283000000 36284792339 1923261632 1925053971
+108852000000 108857377169 36284000000 36285792389 1924261632 1926054021
+108855000000 108860377317 36285000000 36286792439 1925261632 1927054071
+108858000000 108862551011 36286000000 36287517003 1926261632 1927778635
+108861000000 108866377637 36287000000 36288792545 1927261632 1929054177
+108864000000 108869377769 36288000000 36289792589 1928261632 1930054221
+108867000000 108872377943 36289000000 36290792647 1929261632 1931054279
+108870000000 108875378062 36290000000 36291792687 1930261632 1932054319
+108873000000 108878378186 36291000000 36292792728 1931261632 1933054360
+108876000000 108881378405 36292000000 36293792801 1932261632 1934054433
+108879000000 108884378541 36293000000 36294792847 1933261632 1935054479
+108882000000 108887378692 36294000000 36295792897 1934261632 1936054529
+108885000000 108890378842 36295000000 36296792947 1935261632 1937054579
+108888000000 108893378957 36296000000 36297792985 1936261632 1938054617
+108891000000 108896379054 36297000000 36298793018 1937261632 1939054650
+108894000000 108899379262 36298000000 36299793087 1938261632 1940054719
+108897000000 108902379417 36299000000 36300793139 1939261632 1941054771
+108900000000 108905379576 36300000000 36301793192 1940261632 1942054824
+108903000000 108908379750 36301000000 36302793250 1941261632 1943054882
+108906000000 108911379850 36302000000 36303793283 1942261632 1944054915
+108909000000 108914380028 36303000000 36304793342 1943261632 1945054974
+108912000000 108917380177 36304000000 36305793392 1944261632 1946055024
+108915000000 108920380305 36305000000 36306793435 1945261632 1947055067
+108918000000 108923380474 36306000000 36307793491 1946261632 1948055123
+108921000000 108926380594 36307000000 36308793531 1947261632 1949055163
+108924000000 108928207944 36308000000 36309402648 1948261632 1949664280
+108927000000 108932380844 36309000000 36310793614 1949261632 1951055246
+108930000000 108935381102 36310000000 36311793700 1950261632 1952055332
+108933000000 108938381207 36311000000 36312793735 1951261632 1953055367
+108936000000 108941381287 36312000000 36313793762 1952261632 1954055394
+108939000000 108944381434 36313000000 36314793811 1953261632 1955055443
+108942000000 108947381688 36314000000 36315793896 1954261632 1956055528
+108945000000 108950381778 36315000000 36316793926 1955261632 1957055558
+108948000000 108953382023 36316000000 36317794007 1956261632 1958055639
+108951000000 108956382101 36317000000 36318794033 1957261632 1959055665
+108954000000 108959382278 36318000000 36319794092 1958261632 1960055724
+108957000000 108962382424 36319000000 36320794141 1959261632 1961055773
+108960000000 108965382568 36320000000 36321794189 1960261632 1962055821
+108963000000 108967005222 36321000000 36322335074 1961261632 1962596706
+108966000000 108971382883 36322000000 36323794294 1962261632 1964055926
+108969000000 108974383043 36323000000 36324794347 1963261632 1965055979
+108972000000 108977383180 36324000000 36325794393 1964261632 1966056025
+108975000000 108980383338 36325000000 36326794446 1965261632 1967056078
+108978000000 108983383496 36326000000 36327794498 1966261632 1968056130
+108981000000 108986383610 36327000000 36328794536 1967261632 1969056168
+108984000000 108989383771 36328000000 36329794590 1968261632 1970056222
+108987000000 108992383898 36329000000 36330794632 1969261632 1971056264
+108990000000 108995384007 36330000000 36331794669 1970261632 1972056301
+108993000000 108998384149 36331000000 36332794716 1971261632 1973056348
+108996000000 109001384383 36332000000 36333794794 1972261632 1974056426
+108999000000 109004384296 36333000000 36334794765 1973261632 1975056397
+109002000000 109007384417 36334000000 36335794805 1974261632 1976056437
+109005000000 109010384525 36335000000 36336794841 1975261632 1977056473
+109008000000 109013384760 36336000000 36337794920 1976261632 1978056552
+109011000000 109016384939 36337000000 36338794979 1977261632 1979056611
+109014000000 109019298579 36338000000 36339766193 1978261632 1980027825
+109017000000 109022385208 36339000000 36340795069 1979261632 1981056701
+109020000000 109025385381 36340000000 36341795127 1980261632 1982056759
+109023000000 109028385497 36341000000 36342795165 1981261632 1983056797
+109026000000 109031385670 36342000000 36343795223 1982261632 1984056855
+109029000000 109034385842 36343000000 36344795280 1983261632 1985056912
+109032000000 109037385898 36344000000 36345795299 1984261632 1986056931
+109035000000 109040386044 36345000000 36346795348 1985261632 1987056980
+109038000000 109043386240 36346000000 36347795413 1986261632 1988057045
+109041000000 109046386269 36347000000 36348795423 1987261632 1989057055
+109044000000 109049386575 36348000000 36349795525 1988261632 1990057157
+109047000000 109052386747 36349000000 36350795582 1989261632 1991057214
+109050000000 109055386880 36350000000 36351795626 1990261632 1992057258
+109053000000 109058386997 36351000000 36352795665 1991261632 1993057297
+109056000000 109061387182 36352000000 36353795727 1992261632 1994057359
+109059000000 109064387288 36353000000 36354795762 1993261632 1995057394
+109062000000 109067387469 36354000000 36355795823 1994261632 1996057455
+109065000000 109070387681 36355000000 36356795893 1995261632 1997057525
+109068000000 109073387788 36356000000 36357795929 1996261632 1998057561
+109071000000 109076387954 36357000000 36358795984 1997261632 1999057616
+109074000000 109078986699 36358000000 36359662233 1998261632 1999923865
+109077000000 109082388225 36359000000 36360796075 1999261632 2001057707
+109080000000 109085388337 36360000000 36361796112 2000261632 2002057744
+109083000000 109088388546 36361000000 36362796182 2001261632 2003057814
+109086000000 109091388625 36362000000 36363796208 2002261632 2004057840
+109089000000 109094388850 36363000000 36364796283 2003261632 2005057915
+109092000000 109097388977 36364000000 36365796325 2004261632 2006057957
+109095000000 109100389066 36365000000 36366796355 2005261632 2007057987
+109098000000 109103389172 36366000000 36367796390 2006261632 2008058022
+109101000000 109106389383 36367000000 36368796461 2007261632 2009058093
+109104000000 109109389592 36368000000 36369796530 2008261632 2010058162
+109107000000 109112389737 36369000000 36370796579 2009261632 2011058211
+109110000000 109115389863 36370000000 36371796621 2010261632 2012058253
+109113000000 109118390029 36371000000 36372796676 2011261632 2013058308
+109116000000 109121390109 36372000000 36373796703 2012261632 2014058335
+109119000000 109124390344 36373000000 36374796781 2013261632 2015058413
+109122000000 109127390503 36374000000 36375796834 2014261632 2016058466
+109125000000 109130390624 36375000000 36376796874 2015261632 2017058506
+109128000000 109133390784 36376000000 36377796928 2016261632 2018058560
+109131000000 109136390867 36377000000 36378796955 2017261632 2019058587
+109134000000 109139391113 36378000000 36379797037 2018261632 2020058669
+109137000000 109142391236 36379000000 36380797078 2019261632 2021058710
+109140000000 109145391372 36380000000 36381797124 2020261632 2022058756
+109143000000 109148391547 36381000000 36382797182 2021261632 2023058814
+109146000000 109151391669 36382000000 36383797223 2022261632 2024058855
+109149000000 109154391819 36383000000 36384797273 2023261632 2025058905
+109152000000 109157391967 36384000000 36385797322 2024261632 2026058954
+109155000000 109159565661 36385000000 36386521887 2025261632 2026783519
+109158000000 109163392287 36386000000 36387797429 2026261632 2028059061
+109161000000 109166392419 36387000000 36388797473 2027261632 2029059105
+109164000000 109169392593 36388000000 36389797531 2028261632 2030059163
+109167000000 109172392712 36389000000 36390797570 2029261632 2031059202
+109170000000 109175392836 36390000000 36391797612 2030261632 2032059244
+109173000000 109178393055 36391000000 36392797685 2031261632 2033059317
+109176000000 109181393191 36392000000 36393797730 2032261632 2034059362
+109179000000 109184393342 36393000000 36394797780 2033261632 2035059412
+109182000000 109187393492 36394000000 36395797830 2034261632 2036059462
+109185000000 109190393607 36395000000 36396797869 2035261632 2037059501
+109188000000 109193393704 36396000000 36397797901 2036261632 2038059533
+109191000000 109196393912 36397000000 36398797970 2037261632 2039059602
+109194000000 109199394067 36398000000 36399798022 2038261632 2040059654
+109197000000 109202394226 36399000000 36400798075 2039261632 2041059707
+109200000000 109205394400 36400000000 36401798133 2040261632 2042059765
+109203000000 109208394500 36401000000 36402798166 2041261632 2043059798
+109206000000 109211394678 36402000000 36403798226 2042261632 2044059858
+109209000000 109214394827 36403000000 36404798275 2043261632 2045059907
+109212000000 109217394955 36404000000 36405798318 2044261632 2046059950
+109215000000 109220395124 36405000000 36406798374 2045261632 2047060006
+109218000000 109223395244 36406000000 36407798414 2046261632 2048060046
+109221000000 109225222594 36407000000 36408407531 2047261632 2048669163
+109224000000 109229395494 36408000000 36409798498 2048261632 2050060130
+109227000000 109232395752 36409000000 36410798584 2049261632 2051060216
+109230000000 109235395857 36410000000 36411798619 2050261632 2052060251
+109233000000 109238395937 36411000000 36412798645 2051261632 2053060277
+109236000000 109241396084 36412000000 36413798694 2052261632 2054060326
+109239000000 109244396338 36413000000 36414798779 2053261632 2055060411
+109242000000 109247396428 36414000000 36415798809 2054261632 2056060441
+109245000000 109250396673 36415000000 36416798891 2055261632 2057060523
+109248000000 109253396751 36416000000 36417798917 2056261632 2058060549
+109251000000 109256396928 36417000000 36418798976 2057261632 2059060608
+109254000000 109259397074 36418000000 36419799024 2058261632 2060060656
+109257000000 109262397218 36419000000 36420799072 2059261632 2061060704
+109260000000 109264019872 36420000000 36421339957 2060261632 2061601589
+109263000000 109268397533 36421000000 36422799177 2061261632 2063060809
+109266000000 109271397693 36422000000 36423799231 2062261632 2064060863
+109269000000 109274397830 36423000000 36424799276 2063261632 2065060908
+109272000000 109277397988 36424000000 36425799329 2064261632 2066060961
+109275000000 109280398146 36425000000 36426799382 2065261632 2067061014
+109278000000 109283398260 36426000000 36427799420 2066261632 2068061052
+109281000000 109286398421 36427000000 36428799473 2067261632 2069061105
+109284000000 109289398548 36428000000 36429799516 2068261632 2070061148
+109287000000 109292398657 36429000000 36430799552 2069261632 2071061184
+109290000000 109295398799 36430000000 36431799599 2070261632 2072061231
+109293000000 109298399033 36431000000 36432799677 2071261632 2073061309
+109296000000 109301398946 36432000000 36433799648 2072261632 2074061280
+109299000000 109304399067 36433000000 36434799689 2073261632 2075061321
+109302000000 109307399175 36434000000 36435799725 2074261632 2076061357
+109305000000 109310399410 36435000000 36436799803 2075261632 2077061435
+109308000000 109313399589 36436000000 36437799863 2076261632 2078061495
+109311000000 109316313229 36437000000 36438771076 2077261632 2079032708
+109314000000 109319399858 36438000000 36439799952 2078261632 2080061584
+109317000000 109322400031 36439000000 36440800010 2079261632 2081061642
+109320000000 109325400147 36440000000 36441800049 2080261632 2082061681
+109323000000 109328400320 36441000000 36442800106 2081261632 2083061738
+109326000000 109331400492 36442000000 36443800164 2082261632 2084061796
+109329000000 109334400548 36443000000 36444800182 2083261632 2085061814
+109332000000 109337400694 36444000000 36445800231 2084261632 2086061863
+109335000000 109340400890 36445000000 36446800296 2085261632 2087061928
+109338000000 109343400919 36446000000 36447800306 2086261632 2088061938
+109341000000 109346401225 36447000000 36448800408 2087261632 2089062040
+109344000000 109349401397 36448000000 36449800465 2088261632 2090062097
+109347000000 109352401530 36449000000 36450800510 2089261632 2091062142
+109350000000 109355401647 36450000000 36451800549 2090261632 2092062181
+109353000000 109358401832 36451000000 36452800610 2091261632 2093062242
+109356000000 109361401938 36452000000 36453800646 2092261632 2094062278
+109359000000 109364402119 36453000000 36454800706 2093261632 2095062338
+109362000000 109367402331 36454000000 36455800777 2094261632 2096062409
+109365000000 109370402438 36455000000 36456800812 2095261632 2097062444
+109368000000 109373402604 36456000000 36457800868 2096261632 2098062500
+109371000000 109376001349 36457000000 36458667116 2097261632 2098928748
+109374000000 109379402875 36458000000 36459800958 2098261632 2100062590
+109377000000 109382402987 36459000000 36460800995 2099261632 2101062627
+109380000000 109385403196 36460000000 36461801065 2100261632 2102062697
+109383000000 109388403275 36461000000 36462801091 2101261632 2103062723
+109386000000 109391403500 36462000000 36463801166 2102261632 2104062798
+109389000000 109394403627 36463000000 36464801209 2103261632 2105062841
+109392000000 109397403716 36464000000 36465801238 2104261632 2106062870
+109395000000 109400403822 36465000000 36466801274 2105261632 2107062906
+109398000000 109403404033 36466000000 36467801344 2106261632 2108062976
+109401000000 109406404242 36467000000 36468801414 2107261632 2109063046
+109404000000 109409404387 36468000000 36469801462 2108261632 2110063094
+109407000000 109412404513 36469000000 36470801504 2109261632 2111063136
+109410000000 109415404679 36470000000 36471801559 2110261632 2112063191
+109413000000 109418404759 36471000000 36472801586 2111261632 2113063218
+109416000000 109421404994 36472000000 36473801664 2112261632 2114063296
+109419000000 109424405153 36473000000 36474801717 2113261632 2115063349
+109422000000 109427405274 36474000000 36475801758 2114261632 2116063390
+109425000000 109430405434 36475000000 36476801811 2115261632 2117063443
+109428000000 109433405517 36476000000 36477801839 2116261632 2118063471
+109431000000 109436405763 36477000000 36478801921 2117261632 2119063553
+109434000000 109439405886 36478000000 36479801962 2118261632 2120063594
+109437000000 109442406022 36479000000 36480802007 2119261632 2121063639
+109440000000 109445406197 36480000000 36481802065 2120261632 2122063697
+109443000000 109448406319 36481000000 36482802106 2121261632 2123063738
+109446000000 109451406469 36482000000 36483802156 2122261632 2124063788
+109449000000 109454406617 36483000000 36484802205 2123261632 2125063837
+109452000000 109456580311 36484000000 36485526770 2124261632 2125788402
+109455000000 109460406937 36485000000 36486802312 2125261632 2127063944
+109458000000 109463407069 36486000000 36487802356 2126261632 2128063988
+109461000000 109466407243 36487000000 36488802414 2127261632 2129064046
+109464000000 109469407362 36488000000 36489802454 2128261632 2130064086
+109467000000 109472407486 36489000000 36490802495 2129261632 2131064127
+109470000000 109475407705 36490000000 36491802568 2130261632 2132064200
+109473000000 109478407841 36491000000 36492802613 2131261632 2133064245
+109476000000 109481407992 36492000000 36493802664 2132261632 2134064296
+109479000000 109484408142 36493000000 36494802714 2133261632 2135064346
+109482000000 109487408257 36494000000 36495802752 2134261632 2136064384
+109485000000 109490408354 36495000000 36496802784 2135261632 2137064416
+109488000000 109493408562 36496000000 36497802854 2136261632 2138064486
+109491000000 109496408717 36497000000 36498802905 2137261632 2139064537
+109494000000 109499408876 36498000000 36499802958 2138261632 2140064590
+109497000000 109502409050 36499000000 36500803016 2139261632 2141064648
+109500000000 109505409150 36500000000 36501803050 2140261632 2142064682
+109503000000 109508409328 36501000000 36502803109 2141261632 2143064741
+109506000000 109511409477 36502000000 36503803159 2142261632 2144064791
+109509000000 109514409605 36503000000 36504803201 2143261632 2145064833
+109512000000 109517409774 36504000000 36505803258 2144261632 2146064890
+109515000000 109520409894 36505000000 36506803298 2145261632 2147064930
+109518000000 109522237244 36506000000 36507412414 2146261632 2147674046
+109521000000 109526410144 36507000000 36508803381 2147261632 2149065013
+109524000000 109529410402 36508000000 36509803467 2148261632 2150065099
+109527000000 109532410507 36509000000 36510803502 2149261632 2151065134
+109530000000 109535410587 36510000000 36511803529 2150261632 2152065161
+109533000000 109538410734 36511000000 36512803578 2151261632 2153065210
+109536000000 109541410988 36512000000 36513803662 2152261632 2154065294
+109539000000 109544411078 36513000000 36514803692 2153261632 2155065324
+109542000000 109547411323 36514000000 36515803774 2154261632 2156065406
+109545000000 109550411401 36515000000 36516803800 2155261632 2157065432
+109548000000 109553411578 36516000000 36517803859 2156261632 2158065491
+109551000000 109556411724 36517000000 36518803908 2157261632 2159065540
+109554000000 109559411868 36518000000 36519803956 2158261632 2160065588
+109557000000 109561034522 36519000000 36520344840 2159261632 2160606472
+109560000000 109565412183 36520000000 36521804061 2160261632 2162065693
+109563000000 109568412343 36521000000 36522804114 2161261632 2163065746
+109566000000 109571412480 36522000000 36523804160 2162261632 2164065792
+109569000000 109574412638 36523000000 36524804212 2163261632 2165065844
+109572000000 109577412796 36524000000 36525804265 2164261632 2166065897
+109575000000 109580412910 36525000000 36526804303 2165261632 2167065935
+109578000000 109583413071 36526000000 36527804357 2166261632 2168065989
+109581000000 109586413198 36527000000 36528804399 2167261632 2169066031
+109584000000 109589413307 36528000000 36529804435 2168261632 2170066067
+109587000000 109592413449 36529000000 36530804483 2169261632 2171066115
+109590000000 109595413683 36530000000 36531804561 2170261632 2172066193
+109593000000 109598413596 36531000000 36532804532 2171261632 2173066164
+109596000000 109601413717 36532000000 36533804572 2172261632 2174066204
+109599000000 109604413825 36533000000 36534804608 2173261632 2175066240
+109602000000 109607414060 36534000000 36535804686 2174261632 2176066318
+109605000000 109610414239 36535000000 36536804746 2175261632 2177066378
+109608000000 109613327879 36536000000 36537775959 2176261632 2178037591
+109611000000 109616414508 36537000000 36538804836 2177261632 2179066468
+109614000000 109619414681 36538000000 36539804893 2178261632 2180066525
+109617000000 109622414797 36539000000 36540804932 2179261632 2181066564
+109620000000 109625414970 36540000000 36541804990 2180261632 2182066622
+109623000000 109628415142 36541000000 36542805047 2181261632 2183066679
+109626000000 109631415198 36542000000 36543805066 2182261632 2184066698
+109629000000 109634415344 36543000000 36544805114 2183261632 2185066746
+109632000000 109637415540 36544000000 36545805180 2184261632 2186066812
+109635000000 109640415569 36545000000 36546805189 2185261632 2187066821
+109638000000 109643415875 36546000000 36547805291 2186261632 2188066923
+109641000000 109646416047 36547000000 36548805349 2187261632 2189066981
+109644000000 109649416180 36548000000 36549805393 2188261632 2190067025
+109647000000 109652416297 36549000000 36550805432 2189261632 2191067064
+109650000000 109655416482 36550000000 36551805494 2190261632 2192067126
+109653000000 109658416588 36551000000 36552805529 2191261632 2193067161
+109656000000 109661416769 36552000000 36553805589 2192261632 2194067221
+109659000000 109664416981 36553000000 36554805660 2193261632 2195067292
+109662000000 109667417088 36554000000 36555805696 2194261632 2196067328
+109665000000 109670417254 36555000000 36556805751 2195261632 2197067383
+109668000000 109673015999 36556000000 36557671999 2196261632 2197933631
+109671000000 109676417525 36557000000 36558805841 2197261632 2199067473
+109674000000 109679417637 36558000000 36559805879 2198261632 2200067511
+109677000000 109682417846 36559000000 36560805948 2199261632 2201067580
+109680000000 109685417925 36560000000 36561805975 2200261632 2202067607
+109683000000 109688418150 36561000000 36562806050 2201261632 2203067682
+109686000000 109691418277 36562000000 36563806092 2202261632 2204067724
+109689000000 109694418366 36563000000 36564806122 2203261632 2205067754
+109692000000 109697418472 36564000000 36565806157 2204261632 2206067789
+109695000000 109700418683 36565000000 36566806227 2205261632 2207067859
+109698000000 109703418892 36566000000 36567806297 2206261632 2208067929
+109701000000 109706419037 36567000000 36568806345 2207261632 2209067977
+109704000000 109709419163 36568000000 36569806387 2208261632 2210068019
+109707000000 109712419329 36569000000 36570806443 2209261632 2211068075
+109710000000 109715419409 36570000000 36571806469 2210261632 2212068101
+109713000000 109718419644 36571000000 36572806548 2211261632 2213068180
+109716000000 109721419803 36572000000 36573806601 2212261632 2214068233
+109719000000 109724419924 36573000000 36574806641 2213261632 2215068273
+109722000000 109727420084 36574000000 36575806694 2214261632 2216068326
+109725000000 109730420167 36575000000 36576806722 2215261632 2217068354
+109728000000 109733420413 36576000000 36577806804 2216261632 2218068436
+109731000000 109736420536 36577000000 36578806845 2217261632 2219068477
+109734000000 109739420672 36578000000 36579806890 2218261632 2220068522
+109737000000 109742420847 36579000000 36580806949 2219261632 2221068581
+109740000000 109745420969 36580000000 36581806989 2220261632 2222068621
+109743000000 109748421119 36581000000 36582807039 2221261632 2223068671
+109746000000 109751421267 36582000000 36583807089 2222261632 2224068721
+109749000000 109753594961 36583000000 36584531653 2223261632 2224793285
+109752000000 109757421587 36584000000 36585807195 2224261632 2226068827
+109755000000 109760421719 36585000000 36586807239 2225261632 2227068871
+109758000000 109763421893 36586000000 36587807297 2226261632 2228068929
+109761000000 109766422012 36587000000 36588807337 2227261632 2229068969
+109764000000 109769422136 36588000000 36589807378 2228261632 2230069010
+109767000000 109772422355 36589000000 36590807451 2229261632 2231069083
+109770000000 109775422491 36590000000 36591807497 2230261632 2232069129
+109773000000 109778422642 36591000000 36592807547 2231261632 2233069179
+109776000000 109781422792 36592000000 36593807597 2232261632 2234069229
+109779000000 109784422907 36593000000 36594807635 2233261632 2235069267
+109782000000 109787423004 36594000000 36595807668 2234261632 2236069300
+109785000000 109790423212 36595000000 36596807737 2235261632 2237069369
+109788000000 109793423367 36596000000 36597807789 2236261632 2238069421
+109791000000 109796423526 36597000000 36598807842 2237261632 2239069474
+109794000000 109799423700 36598000000 36599807900 2238261632 2240069532
+109797000000 109802423800 36599000000 36600807933 2239261632 2241069565
+109800000000 109805423978 36600000000 36601807992 2240261632 2242069624
+109803000000 109808424127 36601000000 36602808042 2241261632 2243069674
+109806000000 109811424255 36602000000 36603808085 2242261632 2244069717
+109809000000 109814424424 36603000000 36604808141 2243261632 2245069773
+109812000000 109817424544 36604000000 36605808181 2244261632 2246069813
+109815000000 109819251894 36605000000 36606417298 2245261632 2246678930
+109818000000 109823424794 36606000000 36607808264 2246261632 2248069896
+109821000000 109826425052 36607000000 36608808350 2247261632 2249069982
+109824000000 109829425157 36608000000 36609808385 2248261632 2250070017
+109827000000 109832425237 36609000000 36610808412 2249261632 2251070044
+109830000000 109835425384 36610000000 36611808461 2250261632 2252070093
+109833000000 109838425638 36611000000 36612808546 2251261632 2253070178
+109836000000 109841425728 36612000000 36613808576 2252261632 2254070208
+109839000000 109844425973 36613000000 36614808657 2253261632 2255070289
+109842000000 109847426051 36614000000 36615808683 2254261632 2256070315
+109845000000 109850426228 36615000000 36616808742 2255261632 2257070374
+109848000000 109853426374 36616000000 36617808791 2256261632 2258070423
+109851000000 109856426518 36617000000 36618808839 2257261632 2259070471
+109854000000 109858049172 36618000000 36619349724 2258261632 2259611356
+109857000000 109862426833 36619000000 36620808944 2259261632 2261070576
+109860000000 109865426993 36620000000 36621808997 2260261632 2262070629
+109863000000 109868427130 36621000000 36622809043 2261261632 2263070675
+109866000000 109871427288 36622000000 36623809096 2262261632 2264070728
+109869000000 109874427446 36623000000 36624809148 2263261632 2265070780
+109872000000 109877427560 36624000000 36625809186 2264261632 2266070818
+109875000000 109880427721 36625000000 36626809240 2265261632 2267070872
+109878000000 109883427848 36626000000 36627809282 2266261632 2268070914
+109881000000 109886427957 36627000000 36628809319 2267261632 2269070951
+109884000000 109889428099 36628000000 36629809366 2268261632 2270070998
+109887000000 109892428333 36629000000 36630809444 2269261632 2271071076
+109890000000 109895428246 36630000000 36631809415 2270261632 2272071047
+109893000000 109898428367 36631000000 36632809455 2271261632 2273071087
+109896000000 109901428475 36632000000 36633809491 2272261632 2274071123
+109899000000 109904428710 36633000000 36634809570 2273261632 2275071202
+109902000000 109907428889 36634000000 36635809629 2274261632 2276071261
+109905000000 109910342529 36635000000 36636780843 2275261632 2277042475
+109908000000 109913429158 36636000000 36637809719 2276261632 2278071351
+109911000000 109916429331 36637000000 36638809777 2277261632 2279071409
+109914000000 109919429447 36638000000 36639809815 2278261632 2280071447
+109917000000 109922429620 36639000000 36640809873 2279261632 2281071505
+109920000000 109925429792 36640000000 36641809930 2280261632 2282071562
+109923000000 109928429848 36641000000 36642809949 2281261632 2283071581
+109926000000 109931429994 36642000000 36643809998 2282261632 2284071630
+109929000000 109934430190 36643000000 36644810063 2283261632 2285071695
+109932000000 109937430219 36644000000 36645810073 2284261632 2286071705
+109935000000 109940430525 36645000000 36646810175 2285261632 2287071807
+109938000000 109943430697 36646000000 36647810232 2286261632 2288071864
+109941000000 109946430830 36647000000 36648810276 2287261632 2289071908
+109944000000 109949430947 36648000000 36649810315 2288261632 2290071947
+109947000000 109952431132 36649000000 36650810377 2289261632 2291072009
+109950000000 109955431238 36650000000 36651810412 2290261632 2292072044
+109953000000 109958431419 36651000000 36652810473 2291261632 2293072105
+109956000000 109961431631 36652000000 36653810543 2292261632 2294072175
+109959000000 109964431738 36653000000 36654810579 2293261632 2295072211
+109962000000 109967431904 36654000000 36655810634 2294261632 2296072266
+109965000000 109970030649 36655000000 36656676883 2295261632 2296938515
+109968000000 109973432175 36656000000 36657810725 2296261632 2298072357
+109971000000 109976432287 36657000000 36658810762 2297261632 2299072394
+109974000000 109979432496 36658000000 36659810832 2298261632 2300072464
+109977000000 109982432575 36659000000 36660810858 2299261632 2301072490
+109980000000 109985432800 36660000000 36661810933 2300261632 2302072565
+109983000000 109988432927 36661000000 36662810975 2301261632 2303072607
+109986000000 109991433016 36662000000 36663811005 2302261632 2304072637
+109989000000 109994433122 36663000000 36664811040 2303261632 2305072672
+109992000000 109997433333 36664000000 36665811111 2304261632 2306072743
+109995000000 110000433542 36665000000 36666811180 2305261632 2307072812
+109998000000 110003433687 36666000000 36667811229 2306261632 2308072861
+110001000000 110006433813 36667000000 36668811271 2307261632 2309072903
+110004000000 110009433979 36668000000 36669811326 2308261632 2310072958
+110007000000 110012434059 36669000000 36670811353 2309261632 2311072985
+110010000000 110015434294 36670000000 36671811431 2310261632 2312073063
+110013000000 110018434453 36671000000 36672811484 2311261632 2313073116
+110016000000 110021434574 36672000000 36673811524 2312261632 2314073156
+110019000000 110024434734 36673000000 36674811578 2313261632 2315073210
+110022000000 110027434817 36674000000 36675811605 2314261632 2316073237
+110025000000 110030435063 36675000000 36676811687 2315261632 2317073319
+110028000000 110033435186 36676000000 36677811728 2316261632 2318073360
+110031000000 110036435322 36677000000 36678811774 2317261632 2319073406
+110034000000 110039435497 36678000000 36679811832 2318261632 2320073464
+110037000000 110042435619 36679000000 36680811873 2319261632 2321073505
+110040000000 110045435769 36680000000 36681811923 2320261632 2322073555
+110043000000 110048435917 36681000000 36682811972 2321261632 2323073604
+110046000000 110050609611 36682000000 36683536537 2322261632 2323798169
+110049000000 110054436237 36683000000 36684812079 2323261632 2325073711
+110052000000 110057436369 36684000000 36685812123 2324261632 2326073755
+110055000000 110060436543 36685000000 36686812181 2325261632 2327073813
+110058000000 110063436662 36686000000 36687812220 2326261632 2328073852
+110061000000 110066436786 36687000000 36688812262 2327261632 2329073894
+110064000000 110069437005 36688000000 36689812335 2328261632 2330073967
+110067000000 110072437141 36689000000 36690812380 2329261632 2331074012
+110070000000 110075437292 36690000000 36691812430 2330261632 2332074062
+110073000000 110078437442 36691000000 36692812480 2331261632 2333074112
+110076000000 110081437557 36692000000 36693812519 2332261632 2334074151
+110079000000 110084437654 36693000000 36694812551 2333261632 2335074183
+110082000000 110087437862 36694000000 36695812620 2334261632 2336074252
+110085000000 110090438017 36695000000 36696812672 2335261632 2337074304
+110088000000 110093438176 36696000000 36697812725 2336261632 2338074357
+110091000000 110096438350 36697000000 36698812783 2337261632 2339074415
+110094000000 110099438450 36698000000 36699812816 2338261632 2340074448
+110097000000 110102438628 36699000000 36700812876 2339261632 2341074508
+110100000000 110105438777 36700000000 36701812925 2340261632 2342074557
+110103000000 110108438905 36701000000 36702812968 2341261632 2343074600
+110106000000 110111439074 36702000000 36703813024 2342261632 2344074656
+110109000000 110114439194 36703000000 36704813064 2343261632 2345074696
+110112000000 110116266544 36704000000 36705422181 2344261632 2345683813
+110115000000 110120439444 36705000000 36706813148 2345261632 2347074780
+110118000000 110123439702 36706000000 36707813234 2346261632 2348074866
+110121000000 110126439807 36707000000 36708813269 2347261632 2349074901
+110124000000 110129439887 36708000000 36709813295 2348261632 2350074927
+110127000000 110132440034 36709000000 36710813344 2349261632 2351074976
+110130000000 110135440288 36710000000 36711813429 2350261632 2352075061
+110133000000 110138440378 36711000000 36712813459 2351261632 2353075091
+110136000000 110141440623 36712000000 36713813541 2352261632 2354075173
+110139000000 110144440701 36713000000 36714813567 2353261632 2355075199
+110142000000 110147440878 36714000000 36715813626 2354261632 2356075258
+110145000000 110150441024 36715000000 36716813674 2355261632 2357075306
+110148000000 110153441168 36716000000 36717813722 2356261632 2358075354
+110151000000 110155063822 36717000000 36718354607 2357261632 2358616239
+110154000000 110159441483 36718000000 36719813827 2358261632 2360075459
+110157000000 110162441643 36719000000 36720813881 2359261632 2361075513
+110160000000 110165441780 36720000000 36721813926 2360261632 2362075558
+110163000000 110168441938 36721000000 36722813979 2361261632 2363075611
+110166000000 110171442096 36722000000 36723814032 2362261632 2364075664
+110169000000 110174442210 36723000000 36724814070 2363261632 2365075702
+110172000000 110177442371 36724000000 36725814123 2364261632 2366075755
+110175000000 110180442498 36725000000 36726814166 2365261632 2367075798
+110178000000 110183442607 36726000000 36727814202 2366261632 2368075834
+110181000000 110186442749 36727000000 36728814249 2367261632 2369075881
+110184000000 110189442983 36728000000 36729814327 2368261632 2370075959
+110187000000 110192442896 36729000000 36730814298 2369261632 2371075930
+110190000000 110195443017 36730000000 36731814339 2370261632 2372075971
+110193000000 110198443125 36731000000 36732814375 2371261632 2373076007
+110196000000 110201443360 36732000000 36733814453 2372261632 2374076085
+110199000000 110204443539 36733000000 36734814513 2373261632 2375076145
+110202000000 110207357179 36734000000 36735785726 2374261632 2376047358
+110205000000 110210443808 36735000000 36736814602 2375261632 2377076234
+110208000000 110213443981 36736000000 36737814660 2376261632 2378076292
+110211000000 110216444097 36737000000 36738814699 2377261632 2379076331
+110214000000 110219444270 36738000000 36739814756 2378261632 2380076388
+110217000000 110222444442 36739000000 36740814814 2379261632 2381076446
+110220000000 110225444498 36740000000 36741814832 2380261632 2382076464
+110223000000 110228444644 36741000000 36742814881 2381261632 2383076513
+110226000000 110231444840 36742000000 36743814946 2382261632 2384076578
+110229000000 110234444869 36743000000 36744814956 2383261632 2385076588
+110232000000 110237445175 36744000000 36745815058 2384261632 2386076690
+110235000000 110240445347 36745000000 36746815115 2385261632 2387076747
+110238000000 110243445480 36746000000 36747815160 2386261632 2388076792
+110241000000 110246445597 36747000000 36748815199 2387261632 2389076831
+110244000000 110249445782 36748000000 36749815260 2388261632 2390076892
+110247000000 110252445888 36749000000 36750815296 2389261632 2391076928
+110250000000 110255446069 36750000000 36751815356 2390261632 2392076988
+110253000000 110258446281 36751000000 36752815427 2391261632 2393077059
+110256000000 110261446388 36752000000 36753815462 2392261632 2394077094
+110259000000 110264446554 36753000000 36754815518 2393261632 2395077150
+110262000000 110267045299 36754000000 36755681766 2394261632 2395943398
+110265000000 110270446825 36755000000 36756815608 2395261632 2397077240
+110268000000 110273446937 36756000000 36757815645 2396261632 2398077277
+110271000000 110276447146 36757000000 36758815715 2397261632 2399077347
+110274000000 110279447225 36758000000 36759815741 2398261632 2400077373
+110277000000 110282447450 36759000000 36760815816 2399261632 2401077448
+110280000000 110285447577 36760000000 36761815859 2400261632 2402077491
+110283000000 110288447666 36761000000 36762815888 2401261632 2403077520
+110286000000 110291447772 36762000000 36763815924 2402261632 2404077556
+110289000000 110294447983 36763000000 36764815994 2403261632 2405077626
+110292000000 110297448192 36764000000 36765816064 2404261632 2406077696
+110295000000 110300448337 36765000000 36766816112 2405261632 2407077744
+110298000000 110303448463 36766000000 36767816154 2406261632 2408077786
+110301000000 110306448629 36767000000 36768816209 2407261632 2409077841
+110304000000 110309448709 36768000000 36769816236 2408261632 2410077868
+110307000000 110312448944 36769000000 36770816314 2409261632 2411077946
+110310000000 110315449103 36770000000 36771816367 2410261632 2412077999
+110313000000 110318449224 36771000000 36772816408 2411261632 2413078040
+110316000000 110321449384 36772000000 36773816461 2412261632 2414078093
+110319000000 110324449467 36773000000 36774816489 2413261632 2415078121
+110322000000 110327449713 36774000000 36775816571 2414261632 2416078203
+110325000000 110330449836 36775000000 36776816612 2415261632 2417078244
+110328000000 110333449972 36776000000 36777816657 2416261632 2418078289
+110331000000 110336450147 36777000000 36778816715 2417261632 2419078347
+110334000000 110339450269 36778000000 36779816756 2418261632 2420078388
+110337000000 110342450419 36779000000 36780816806 2419261632 2421078438
+110340000000 110345450567 36780000000 36781816855 2420261632 2422078487
+110343000000 110347624261 36781000000 36782541420 2421261632 2422803052
+110346000000 110351450887 36782000000 36783816962 2422261632 2424078594
+110349000000 110354451019 36783000000 36784817006 2423261632 2425078638
+110352000000 110357451193 36784000000 36785817064 2424261632 2426078696
+110355000000 110360451312 36785000000 36786817104 2425261632 2427078736
+110358000000 110363451436 36786000000 36787817145 2426261632 2428078777
+110361000000 110366451655 36787000000 36788817218 2427261632 2429078850
+110364000000 110369451791 36788000000 36789817263 2428261632 2430078895
+110367000000 110372451942 36789000000 36790817314 2429261632 2431078946
+110370000000 110375452092 36790000000 36791817364 2430261632 2432078996
+110373000000 110378452207 36791000000 36792817402 2431261632 2433079034
+110376000000 110381452304 36792000000 36793817434 2432261632 2434079066
+110379000000 110384452512 36793000000 36794817504 2433261632 2435079136
+110382000000 110387452667 36794000000 36795817555 2434261632 2436079187
+110385000000 110390452826 36795000000 36796817608 2435261632 2437079240
+110388000000 110393453000 36796000000 36797817666 2436261632 2438079298
+110391000000 110396453100 36797000000 36798817700 2437261632 2439079332
+110394000000 110399453278 36798000000 36799817759 2438261632 2440079391
+110397000000 110402453427 36799000000 36800817809 2439261632 2441079441
+110400000000 110405453555 36800000000 36801817851 2440261632 2442079483
+110403000000 110408453724 36801000000 36802817908 2441261632 2443079540
+110406000000 110411453844 36802000000 36803817948 2442261632 2444079580
+110409000000 110413281194 36803000000 36804427064 2443261632 2444688696
+110412000000 110417454094 36804000000 36805818031 2444261632 2446079663
+110415000000 110420454352 36805000000 36806818117 2445261632 2447079749
+110418000000 110423454457 36806000000 36807818152 2446261632 2448079784
+110421000000 110426454537 36807000000 36808818179 2447261632 2449079811
+110424000000 110429454684 36808000000 36809818228 2448261632 2450079860
+110427000000 110432454938 36809000000 36810818312 2449261632 2451079944
+110430000000 110435455028 36810000000 36811818342 2450261632 2452079974
+110433000000 110438455273 36811000000 36812818424 2451261632 2453080056
+110436000000 110441455351 36812000000 36813818450 2452261632 2454080082
+110439000000 110444455528 36813000000 36814818509 2453261632 2455080141
+110442000000 110447455674 36814000000 36815818558 2454261632 2456080190
+110445000000 110450455818 36815000000 36816818606 2455261632 2457080238
+110448000000 110452078472 36816000000 36817359490 2456261632 2457621122
+110451000000 110456456133 36817000000 36818818711 2457261632 2459080343
+110454000000 110459456293 36818000000 36819818764 2458261632 2460080396
+110457000000 110462456430 36819000000 36820818810 2459261632 2461080442
+110460000000 110465456588 36820000000 36821818862 2460261632 2462080494
+110463000000 110468456746 36821000000 36822818915 2461261632 2463080547
+110466000000 110471456860 36822000000 36823818953 2462261632 2464080585
+110469000000 110474457021 36823000000 36824819007 2463261632 2465080639
+110472000000 110477457148 36824000000 36825819049 2464261632 2466080681
+110475000000 110480457257 36825000000 36826819085 2465261632 2467080717
+110478000000 110483457399 36826000000 36827819133 2466261632 2468080765
+110481000000 110486457633 36827000000 36828819211 2467261632 2469080843
+110484000000 110489457546 36828000000 36829819182 2468261632 2470080814
+110487000000 110492457667 36829000000 36830819222 2469261632 2471080854
+110490000000 110495457775 36830000000 36831819258 2470261632 2472080890
+110493000000 110498458010 36831000000 36832819336 2471261632 2473080968
+110496000000 110501458189 36832000000 36833819396 2472261632 2474081028
+110499000000 110504371829 36833000000 36834790609 2473261632 2475052241
+110502000000 110507458458 36834000000 36835819486 2474261632 2476081118
+110505000000 110510458631 36835000000 36836819543 2475261632 2477081175
+110508000000 110513458747 36836000000 36837819582 2476261632 2478081214
+110511000000 110516458920 36837000000 36838819640 2477261632 2479081272
+110514000000 110519459092 36838000000 36839819697 2478261632 2480081329
+110517000000 110522459148 36839000000 36840819716 2479261632 2481081348
+110520000000 110525459294 36840000000 36841819764 2480261632 2482081396
+110523000000 110528459490 36841000000 36842819830 2481261632 2483081462
+110526000000 110531459519 36842000000 36843819839 2482261632 2484081471
+110529000000 110534459825 36843000000 36844819941 2483261632 2485081573
+110532000000 110537459997 36844000000 36845819999 2484261632 2486081631
+110535000000 110540460130 36845000000 36846820043 2485261632 2487081675
+110538000000 110543460247 36846000000 36847820082 2486261632 2488081714
+110541000000 110546460432 36847000000 36848820144 2487261632 2489081776
+110544000000 110549460538 36848000000 36849820179 2488261632 2490081811
+110547000000 110552460719 36849000000 36850820239 2489261632 2491081871
+110550000000 110555460931 36850000000 36851820310 2490261632 2492081942
+110553000000 110558461038 36851000000 36852820346 2491261632 2493081978
+110556000000 110561461204 36852000000 36853820401 2492261632 2494082033
+110559000000 110564059949 36853000000 36854686649 2493261632 2494948281
+110562000000 110567461475 36854000000 36855820491 2494261632 2496082123
+110565000000 110570461587 36855000000 36856820529 2495261632 2497082161
+110568000000 110573461796 36856000000 36857820598 2496261632 2498082230
+110571000000 110576461875 36857000000 36858820625 2497261632 2499082257
+110574000000 110579462100 36858000000 36859820700 2498261632 2500082332
+110577000000 110582462227 36859000000 36860820742 2499261632 2501082374
+110580000000 110585462316 36860000000 36861820772 2500261632 2502082404
+110583000000 110588462422 36861000000 36862820807 2501261632 2503082439
+110586000000 110591462633 36862000000 36863820877 2502261632 2504082509
+110589000000 110594462842 36863000000 36864820947 2503261632 2505082579
+110592000000 110597462987 36864000000 36865820995 2504261632 2506082627
+110595000000 110600463113 36865000000 36866821037 2505261632 2507082669
+110598000000 110603463279 36866000000 36867821093 2506261632 2508082725
+110601000000 110606463359 36867000000 36868821119 2507261632 2509082751
+110604000000 110609463594 36868000000 36869821198 2508261632 2510082830
+110607000000 110612463753 36869000000 36870821251 2509261632 2511082883
+110610000000 110615463874 36870000000 36871821291 2510261632 2512082923
+110613000000 110618464034 36871000000 36872821344 2511261632 2513082976
+110616000000 110621464117 36872000000 36873821372 2512261632 2514083004
+110619000000 110624464363 36873000000 36874821454 2513261632 2515083086
+110622000000 110627464486 36874000000 36875821495 2514261632 2516083127
+110625000000 110630464622 36875000000 36876821540 2515261632 2517083172
+110628000000 110633464797 36876000000 36877821599 2516261632 2518083231
+110631000000 110636464919 36877000000 36878821639 2517261632 2519083271
+110634000000 110639465069 36878000000 36879821689 2518261632 2520083321
+110637000000 110642465217 36879000000 36880821739 2519261632 2521083371
+110640000000 110644638911 36880000000 36881546303 2520261632 2521807935
+110643000000 110648465537 36881000000 36882821845 2521261632 2523083477
+110646000000 110651465669 36882000000 36883821889 2522261632 2524083521
+110649000000 110654465843 36883000000 36884821947 2523261632 2525083579
+110652000000 110657465962 36884000000 36885821987 2524261632 2526083619
+110655000000 110660466086 36885000000 36886822028 2525261632 2527083660
+110658000000 110663466305 36886000000 36887822101 2526261632 2528083733
+110661000000 110666466441 36887000000 36888822147 2527261632 2529083779
+110664000000 110669466592 36888000000 36889822197 2528261632 2530083829
+110667000000 110672466742 36889000000 36890822247 2529261632 2531083879
+110670000000 110675466857 36890000000 36891822285 2530261632 2532083917
+110673000000 110678466954 36891000000 36892822318 2531261632 2533083950
+110676000000 110681467162 36892000000 36893822387 2532261632 2534084019
+110679000000 110684467317 36893000000 36894822439 2533261632 2535084071
+110682000000 110687467476 36894000000 36895822492 2534261632 2536084124
+110685000000 110690467650 36895000000 36896822550 2535261632 2537084182
+110688000000 110693467750 36896000000 36897822583 2536261632 2538084215
+110691000000 110696467928 36897000000 36898822642 2537261632 2539084274
+110694000000 110699468077 36898000000 36899822692 2538261632 2540084324
+110697000000 110702468205 36899000000 36900822735 2539261632 2541084367
+110700000000 110705468374 36900000000 36901822791 2540261632 2542084423
+110703000000 110708468494 36901000000 36902822831 2541261632 2543084463
+110706000000 110710295844 36902000000 36903431948 2542261632 2543693580
+110709000000 110714468744 36903000000 36904822914 2543261632 2545084546
+110712000000 110717469002 36904000000 36905823000 2544261632 2546084632
+110715000000 110720469107 36905000000 36906823035 2545261632 2547084667
+110718000000 110723469187 36906000000 36907823062 2546261632 2548084694
+110721000000 110726469334 36907000000 36908823111 2547261632 2549084743
+110724000000 110729469588 36908000000 36909823196 2548261632 2550084828
+110727000000 110732469678 36909000000 36910823226 2549261632 2551084858
+110730000000 110735469923 36910000000 36911823307 2550261632 2552084939
+110733000000 110738470001 36911000000 36912823333 2551261632 2553084965
+110736000000 110741470178 36912000000 36913823392 2552261632 2554085024
+110739000000 110744470324 36913000000 36914823441 2553261632 2555085073
+110742000000 110747470468 36914000000 36915823489 2554261632 2556085121
+110745000000 110749093122 36915000000 36916364374 2555261632 2556626006
+110748000000 110753470783 36916000000 36917823594 2556261632 2558085226
+110751000000 110756470943 36917000000 36918823647 2557261632 2559085279
+110754000000 110759471080 36918000000 36919823693 2558261632 2560085325
+110757000000 110762471238 36919000000 36920823746 2559261632 2561085378
+110760000000 110765471396 36920000000 36921823798 2560261632 2562085430
+110763000000 110768471510 36921000000 36922823836 2561261632 2563085468
+110766000000 110771471671 36922000000 36923823890 2562261632 2564085522
+110769000000 110774471798 36923000000 36924823932 2563261632 2565085564
+110772000000 110777471907 36924000000 36925823969 2564261632 2566085601
+110775000000 110780472049 36925000000 36926824016 2565261632 2567085648
+110778000000 110783472283 36926000000 36927824094 2566261632 2568085726
+110781000000 110786472196 36927000000 36928824065 2567261632 2569085697
+110784000000 110789472317 36928000000 36929824105 2568261632 2570085737
+110787000000 110792472425 36929000000 36930824141 2569261632 2571085773
+110790000000 110795472660 36930000000 36931824220 2570261632 2572085852
+110793000000 110798472839 36931000000 36932824279 2571261632 2573085911
+110796000000 110801386479 36932000000 36933795493 2572261632 2574057125
+110799000000 110804473108 36933000000 36934824369 2573261632 2575086001
+110802000000 110807473281 36934000000 36935824427 2574261632 2576086059
+110805000000 110810473397 36935000000 36936824465 2575261632 2577086097
+110808000000 110813473570 36936000000 36937824523 2576261632 2578086155
+110811000000 110816473742 36937000000 36938824580 2577261632 2579086212
+110814000000 110819473798 36938000000 36939824599 2578261632 2580086231
+110817000000 110822473944 36939000000 36940824648 2579261632 2581086280
+110820000000 110825474140 36940000000 36941824713 2580261632 2582086345
+110823000000 110828474169 36941000000 36942824723 2581261632 2583086355
+110826000000 110831474475 36942000000 36943824825 2582261632 2584086457
+110829000000 110834474647 36943000000 36944824882 2583261632 2585086514
+110832000000 110837474780 36944000000 36945824926 2584261632 2586086558
+110835000000 110840474897 36945000000 36946824965 2585261632 2587086597
+110838000000 110843475082 36946000000 36947825027 2586261632 2588086659
+110841000000 110846475188 36947000000 36948825062 2587261632 2589086694
+110844000000 110849475369 36948000000 36949825123 2588261632 2590086755
+110847000000 110852475581 36949000000 36950825193 2589261632 2591086825
+110850000000 110855475688 36950000000 36951825229 2590261632 2592086861
+110853000000 110858475854 36951000000 36952825284 2591261632 2593086916
+110856000000 110861074599 36952000000 36953691533 2592261632 2593953165
+110859000000 110864476125 36953000000 36954825375 2593261632 2595087007
+110862000000 110867476237 36954000000 36955825412 2594261632 2596087044
+110865000000 110870476446 36955000000 36956825482 2595261632 2597087114
+110868000000 110873476525 36956000000 36957825508 2596261632 2598087140
+110871000000 110876476750 36957000000 36958825583 2597261632 2599087215
+110874000000 110879476877 36958000000 36959825625 2598261632 2600087257
+110877000000 110882476966 36959000000 36960825655 2599261632 2601087287
+110880000000 110885477072 36960000000 36961825690 2600261632 2602087322
+110883000000 110888477283 36961000000 36962825761 2601261632 2603087393
+110886000000 110891477492 36962000000 36963825830 2602261632 2604087462
+110889000000 110894477637 36963000000 36964825879 2603261632 2605087511
+110892000000 110897477763 36964000000 36965825921 2604261632 2606087553
+110895000000 110900477929 36965000000 36966825976 2605261632 2607087608
+110898000000 110903478009 36966000000 36967826003 2606261632 2608087635
+110901000000 110906478244 36967000000 36968826081 2607261632 2609087713
+110904000000 110909478403 36968000000 36969826134 2608261632 2610087766
+110907000000 110912478524 36969000000 36970826174 2609261632 2611087806
+110910000000 110915478684 36970000000 36971826228 2610261632 2612087860
+110913000000 110918478767 36971000000 36972826255 2611261632 2613087887
+110916000000 110921479013 36972000000 36973826337 2612261632 2614087969
+110919000000 110924479136 36973000000 36974826378 2613261632 2615088010
+110922000000 110927479272 36974000000 36975826424 2614261632 2616088056
+110925000000 110930479447 36975000000 36976826482 2615261632 2617088114
+110928000000 110933479569 36976000000 36977826523 2616261632 2618088155
+110931000000 110936479719 36977000000 36978826573 2617261632 2619088205
+110934000000 110939479867 36978000000 36979826622 2618261632 2620088254
+110937000000 110941653561 36979000000 36980551187 2619261632 2620812819
+110940000000 110945480187 36980000000 36981826729 2620261632 2622088361
+110943000000 110948480319 36981000000 36982826773 2621261632 2623088405
+110946000000 110951480493 36982000000 36983826831 2622261632 2624088463
+110949000000 110954480612 36983000000 36984826870 2623261632 2625088502
+110952000000 110957480736 36984000000 36985826912 2624261632 2626088544
+110955000000 110960480955 36985000000 36986826985 2625261632 2627088617
+110958000000 110963481091 36986000000 36987827030 2626261632 2628088662
+110961000000 110966481242 36987000000 36988827080 2627261632 2629088712
+110964000000 110969481392 36988000000 36989827130 2628261632 2630088762
+110967000000 110972481507 36989000000 36990827169 2629261632 2631088801
+110970000000 110975481604 36990000000 36991827201 2630261632 2632088833
+110973000000 110978481812 36991000000 36992827270 2631261632 2633088902
+110976000000 110981481967 36992000000 36993827322 2632261632 2634088954
+110979000000 110984482126 36993000000 36994827375 2633261632 2635089007
+110982000000 110987482300 36994000000 36995827433 2634261632 2636089065
+110985000000 110990482400 36995000000 36996827466 2635261632 2637089098
+110988000000 110993482578 36996000000 36997827526 2636261632 2638089158
+110991000000 110996482727 36997000000 36998827575 2637261632 2639089207
+110994000000 110999482855 36998000000 36999827618 2638261632 2640089250
+110997000000 111002483024 36999000000 37000827674 2639261632 2641089306
+111000000000 111005483144 37000000000 37001827714 2640261632 2642089346
+111003000000 111007310494 37001000000 37002436831 2641261632 2642698463
+111006000000 111011483394 37002000000 37003827798 2642261632 2644089430
+111009000000 111014483652 37003000000 37004827884 2643261632 2645089516
+111012000000 111017483757 37004000000 37005827919 2644261632 2646089551
+111015000000 111020483837 37005000000 37006827945 2645261632 2647089577
+111018000000 111023483984 37006000000 37007827994 2646261632 2648089626
+111021000000 111026484238 37007000000 37008828079 2647261632 2649089711
+111024000000 111029484328 37008000000 37009828109 2648261632 2650089741
+111027000000 111032484573 37009000000 37010828191 2649261632 2651089823
+111030000000 111035484651 37010000000 37011828217 2650261632 2652089849
+111033000000 111038484828 37011000000 37012828276 2651261632 2653089908
+111036000000 111041484974 37012000000 37013828324 2652261632 2654089956
+111039000000 111044485118 37013000000 37014828372 2653261632 2655090004
+111042000000 111046107772 37014000000 37015369257 2654261632 2655630889
+111045000000 111050485433 37015000000 37016828477 2655261632 2657090109
+111048000000 111053485593 37016000000 37017828531 2656261632 2658090163
+111051000000 111056485730 37017000000 37018828576 2657261632 2659090208
+111054000000 111059485888 37018000000 37019828629 2658261632 2660090261
+111057000000 111062486046 37019000000 37020828682 2659261632 2661090314
+111060000000 111065486160 37020000000 37021828720 2660261632 2662090352
+111063000000 111068486321 37021000000 37022828773 2661261632 2663090405
+111066000000 111071486448 37022000000 37023828816 2662261632 2664090448
+111069000000 111074486557 37023000000 37024828852 2663261632 2665090484
+111072000000 111077486699 37024000000 37025828899 2664261632 2666090531
+111075000000 111080486933 37025000000 37026828977 2665261632 2667090609
+111078000000 111083486846 37026000000 37027828948 2666261632 2668090580
+111081000000 111086486967 37027000000 37028828989 2667261632 2669090621
+111084000000 111089487075 37028000000 37029829025 2668261632 2670090657
+111087000000 111092487310 37029000000 37030829103 2669261632 2671090735
+111090000000 111095487489 37030000000 37031829163 2670261632 2672090795
+111093000000 111098401129 37031000000 37032800376 2671261632 2673062008
+111096000000 111101487758 37032000000 37033829252 2672261632 2674090884
+111099000000 111104487931 37033000000 37034829310 2673261632 2675090942
+111102000000 111107488047 37034000000 37035829349 2674261632 2676090981
+111105000000 111110488220 37035000000 37036829406 2675261632 2677091038
+111108000000 111113488392 37036000000 37037829464 2676261632 2678091096
+111111000000 111116488448 37037000000 37038829482 2677261632 2679091114
+111114000000 111119488594 37038000000 37039829531 2678261632 2680091163
+111117000000 111122488790 37039000000 37040829596 2679261632 2681091228
+111120000000 111125488819 37040000000 37041829606 2680261632 2682091238
+111123000000 111128489125 37041000000 37042829708 2681261632 2683091340
+111126000000 111131489297 37042000000 37043829765 2682261632 2684091397
+111129000000 111134489430 37043000000 37044829810 2683261632 2685091442
+111132000000 111137489547 37044000000 37045829849 2684261632 2686091481
+111135000000 111140489732 37045000000 37046829910 2685261632 2687091542
+111138000000 111143489838 37046000000 37047829946 2686261632 2688091578
+111141000000 111146490019 37047000000 37048830006 2687261632 2689091638
+111144000000 111149490231 37048000000 37049830077 2688261632 2690091709
+111147000000 111152490338 37049000000 37050830112 2689261632 2691091744
+111150000000 111155490504 37050000000 37051830168 2690261632 2692091800
+111153000000 111158089249 37051000000 37052696416 2691261632 2692958048
+111156000000 111161490775 37052000000 37053830258 2692261632 2694091890
+111159000000 111164490887 37053000000 37054830295 2693261632 2695091927
+111162000000 111167491096 37054000000 37055830365 2694261632 2696091997
+111165000000 111170491175 37055000000 37056830391 2695261632 2697092023
+111168000000 111173491400 37056000000 37057830466 2696261632 2698092098
+111171000000 111176491527 37057000000 37058830509 2697261632 2699092141
+111174000000 111179491616 37058000000 37059830538 2698261632 2700092170
+111177000000 111182491722 37059000000 37060830574 2699261632 2701092206
+111180000000 111185491933 37060000000 37061830644 2700261632 2702092276
+111183000000 111188492142 37061000000 37062830714 2701261632 2703092346
+111186000000 111191492287 37062000000 37063830762 2702261632 2704092394
+111189000000 111194492413 37063000000 37064830804 2703261632 2705092436
+111192000000 111197492579 37064000000 37065830859 2704261632 2706092491
+111195000000 111200492659 37065000000 37066830886 2705261632 2707092518
+111198000000 111203492894 37066000000 37067830964 2706261632 2708092596
+111201000000 111206493053 37067000000 37068831017 2707261632 2709092649
+111204000000 111209493174 37068000000 37069831058 2708261632 2710092690
+111207000000 111212493334 37069000000 37070831111 2709261632 2711092743
+111210000000 111215493417 37070000000 37071831139 2710261632 2712092771
+111213000000 111218493663 37071000000 37072831221 2711261632 2713092853
+111216000000 111221493786 37072000000 37073831262 2712261632 2714092894
+111219000000 111224493922 37073000000 37074831307 2713261632 2715092939
+111222000000 111227494097 37074000000 37075831365 2714261632 2716092997
+111225000000 111230494219 37075000000 37076831406 2715261632 2717093038
+111228000000 111233494369 37076000000 37077831456 2716261632 2718093088
+111231000000 111236494517 37077000000 37078831505 2717261632 2719093137
+111234000000 111238668211 37078000000 37079556070 2718261632 2719817702
+111237000000 111242494837 37079000000 37080831612 2719261632 2721093244
+111240000000 111245494969 37080000000 37081831656 2720261632 2722093288
+111243000000 111248495143 37081000000 37082831714 2721261632 2723093346
+111246000000 111251495262 37082000000 37083831754 2722261632 2724093386
+111249000000 111254495386 37083000000 37084831795 2723261632 2725093427
+111252000000 111257495605 37084000000 37085831868 2724261632 2726093500
+111255000000 111260495741 37085000000 37086831913 2725261632 2727093545
+111258000000 111263495892 37086000000 37087831964 2726261632 2728093596
+111261000000 111266496042 37087000000 37088832014 2727261632 2729093646
+111264000000 111269496157 37088000000 37089832052 2728261632 2730093684
+111267000000 111272496254 37089000000 37090832084 2729261632 2731093716
+111270000000 111275496462 37090000000 37091832154 2730261632 2732093786
+111273000000 111278496617 37091000000 37092832205 2731261632 2733093837
+111276000000 111281496776 37092000000 37093832258 2732261632 2734093890
+111279000000 111284496950 37093000000 37094832316 2733261632 2735093948
+111282000000 111287497050 37094000000 37095832350 2734261632 2736093982
+111285000000 111290497228 37095000000 37096832409 2735261632 2737094041
+111288000000 111293497377 37096000000 37097832459 2736261632 2738094091
+111291000000 111296497505 37097000000 37098832501 2737261632 2739094133
+111294000000 111299497674 37098000000 37099832558 2738261632 2740094190
+111297000000 111302497794 37099000000 37100832598 2739261632 2741094230
+111300000000 111304325144 37100000000 37101441714 2740261632 2741703346
+111303000000 111308498044 37101000000 37102832681 2741261632 2743094313
+111306000000 111311498302 37102000000 37103832767 2742261632 2744094399
+111309000000 111314498407 37103000000 37104832802 2743261632 2745094434
+111312000000 111317498487 37104000000 37105832829 2744261632 2746094461
+111315000000 111320498634 37105000000 37106832878 2745261632 2747094510
+111318000000 111323498888 37106000000 37107832962 2746261632 2748094594
+111321000000 111326498978 37107000000 37108832992 2747261632 2749094624
+111324000000 111329499223 37108000000 37109833074 2748261632 2750094706
+111327000000 111332499301 37109000000 37110833100 2749261632 2751094732
+111330000000 111335499478 37110000000 37111833159 2750261632 2752094791
+111333000000 111338499624 37111000000 37112833208 2751261632 2753094840
+111336000000 111341499768 37112000000 37113833256 2752261632 2754094888
+111339000000 111343122422 37113000000 37114374140 2753261632 2754635772
+111342000000 111347500083 37114000000 37115833361 2754261632 2756094993
+111345000000 111350500243 37115000000 37116833414 2755261632 2757095046
+111348000000 111353500380 37116000000 37117833460 2756261632 2758095092
+111351000000 111356500538 37117000000 37118833512 2757261632 2759095144
+111354000000 111359500696 37118000000 37119833565 2758261632 2760095197
+111357000000 111362500810 37119000000 37120833603 2759261632 2761095235
+111360000000 111365500971 37120000000 37121833657 2760261632 2762095289
+111363000000 111368501098 37121000000 37122833699 2761261632 2763095331
+111366000000 111371501207 37122000000 37123833735 2762261632 2764095367
+111369000000 111374501349 37123000000 37124833783 2763261632 2765095415
+111372000000 111377501583 37124000000 37125833861 2764261632 2766095493
+111375000000 111380501496 37125000000 37126833832 2765261632 2767095464
+111378000000 111383501617 37126000000 37127833872 2766261632 2768095504
+111381000000 111386501725 37127000000 37128833908 2767261632 2769095540
+111384000000 111389501960 37128000000 37129833986 2768261632 2770095618
+111387000000 111392502139 37129000000 37130834046 2769261632 2771095678
+111390000000 111395415779 37130000000 37131805259 2770261632 2772066891
+111393000000 111398502408 37131000000 37132834136 2771261632 2773095768
+111396000000 111401502581 37132000000 37133834193 2772261632 2774095825
+111399000000 111404502697 37133000000 37134834232 2773261632 2775095864
+111402000000 111407502870 37134000000 37135834290 2774261632 2776095922
+111405000000 111410503042 37135000000 37136834347 2775261632 2777095979
+111408000000 111413503098 37136000000 37137834366 2776261632 2778095998
+111411000000 111416503244 37137000000 37138834414 2777261632 2779096046
+111414000000 111419503440 37138000000 37139834480 2778261632 2780096112
+111417000000 111422503469 37139000000 37140834489 2779261632 2781096121
+111420000000 111425503775 37140000000 37141834591 2780261632 2782096223
+111423000000 111428503947 37141000000 37142834649 2781261632 2783096281
+111426000000 111431504080 37142000000 37143834693 2782261632 2784096325
+111429000000 111434504197 37143000000 37144834732 2783261632 2785096364
+111432000000 111437504382 37144000000 37145834794 2784261632 2786096426
+111435000000 111440504488 37145000000 37146834829 2785261632 2787096461
+111438000000 111443504669 37146000000 37147834889 2786261632 2788096521
+111441000000 111446504881 37147000000 37148834960 2787261632 2789096592
+111444000000 111449504988 37148000000 37149834996 2788261632 2790096628
+111447000000 111452505154 37149000000 37150835051 2789261632 2791096683
+111450000000 111455103899 37150000000 37151701299 2790261632 2791962931
+111453000000 111458505425 37151000000 37152835141 2791261632 2793096773
+111456000000 111461505537 37152000000 37153835179 2792261632 2794096811
+111459000000 111464505746 37153000000 37154835248 2793261632 2795096880
+111462000000 111467505825 37154000000 37155835275 2794261632 2796096907
+111465000000 111470506050 37155000000 37156835350 2795261632 2797096982
+111468000000 111473506177 37156000000 37157835392 2796261632 2798097024
+111471000000 111476506266 37157000000 37158835422 2797261632 2799097054
+111474000000 111479506372 37158000000 37159835457 2798261632 2800097089
+111477000000 111482506583 37159000000 37160835527 2799261632 2801097159
+111480000000 111485506792 37160000000 37161835597 2800261632 2802097229
+111483000000 111488506937 37161000000 37162835645 2801261632 2803097277
+111486000000 111491507063 37162000000 37163835687 2802261632 2804097319
+111489000000 111494507229 37163000000 37164835743 2803261632 2805097375
+111492000000 111497507309 37164000000 37165835769 2804261632 2806097401
+111495000000 111500507544 37165000000 37166835848 2805261632 2807097480
+111498000000 111503507703 37166000000 37167835901 2806261632 2808097533
+111501000000 111506507824 37167000000 37168835941 2807261632 2809097573
+111504000000 111509507984 37168000000 37169835994 2808261632 2810097626
+111507000000 111512508067 37169000000 37170836022 2809261632 2811097654
+111510000000 111515508313 37170000000 37171836104 2810261632 2812097736
+111513000000 111518508436 37171000000 37172836145 2811261632 2813097777
+111516000000 111521508572 37172000000 37173836190 2812261632 2814097822
+111519000000 111524508747 37173000000 37174836249 2813261632 2815097881
+111522000000 111527508869 37174000000 37175836289 2814261632 2816097921
+111525000000 111530509019 37175000000 37176836339 2815261632 2817097971
+111528000000 111533509167 37176000000 37177836389 2816261632 2818098021
+111531000000 111535682861 37177000000 37178560953 2817261632 2818822585
+111534000000 111539509487 37178000000 37179836495 2818261632 2820098127
+111537000000 111542509619 37179000000 37180836539 2819261632 2821098171
+111540000000 111545509793 37180000000 37181836597 2820261632 2822098229
+111543000000 111548509912 37181000000 37182836637 2821261632 2823098269
+111546000000 111551510036 37182000000 37183836678 2822261632 2824098310
+111549000000 111554510255 37183000000 37184836751 2823261632 2825098383
+111552000000 111557510391 37184000000 37185836797 2824261632 2826098429
+111555000000 111560510542 37185000000 37186836847 2825261632 2827098479
+111558000000 111563510692 37186000000 37187836897 2826261632 2828098529
+111561000000 111566510807 37187000000 37188836935 2827261632 2829098567
+111564000000 111569510904 37188000000 37189836968 2828261632 2830098600
+111567000000 111572511112 37189000000 37190837037 2829261632 2831098669
+111570000000 111575511267 37190000000 37191837089 2830261632 2832098721
+111573000000 111578511426 37191000000 37192837142 2831261632 2833098774
+111576000000 111581511600 37192000000 37193837200 2832261632 2834098832
+111579000000 111584511700 37193000000 37194837233 2833261632 2835098865
+111582000000 111587511878 37194000000 37195837292 2834261632 2836098924
+111585000000 111590512027 37195000000 37196837342 2835261632 2837098974
+111588000000 111593512155 37196000000 37197837385 2836261632 2838099017
+111591000000 111596512324 37197000000 37198837441 2837261632 2839099073
+111594000000 111599512444 37198000000 37199837481 2838261632 2840099113
+111597000000 111601339794 37199000000 37200446598 2839261632 2840708230
+111600000000 111605512694 37200000000 37201837564 2840261632 2842099196
+111603000000 111608512952 37201000000 37202837650 2841261632 2843099282
+111606000000 111611513057 37202000000 37203837685 2842261632 2844099317
+111609000000 111614513137 37203000000 37204837712 2843261632 2845099344
+111612000000 111617513284 37204000000 37205837761 2844261632 2846099393
+111615000000 111620513538 37205000000 37206837846 2845261632 2847099478
+111618000000 111623513628 37206000000 37207837876 2846261632 2848099508
+111621000000 111626513873 37207000000 37208837957 2847261632 2849099589
+111624000000 111629513951 37208000000 37209837983 2848261632 2850099615
+111627000000 111632514128 37209000000 37210838042 2849261632 2851099674
+111630000000 111635514274 37210000000 37211838091 2850261632 2852099723
+111633000000 111638514418 37211000000 37212838139 2851261632 2853099771
+111636000000 111640137072 37212000000 37213379024 2852261632 2853640656
+111639000000 111644514733 37213000000 37214838244 2853261632 2855099876
+111642000000 111647514893 37214000000 37215838297 2854261632 2856099929
+111645000000 111650515030 37215000000 37216838343 2855261632 2857099975
+111648000000 111653515188 37216000000 37217838396 2856261632 2858100028
+111651000000 111656515346 37217000000 37218838448 2857261632 2859100080
+111654000000 111659515460 37218000000 37219838486 2858261632 2860100118
+111657000000 111662515621 37219000000 37220838540 2859261632 2861100172
+111660000000 111665515748 37220000000 37221838582 2860261632 2862100214
+111663000000 111668515857 37221000000 37222838619 2861261632 2863100251
+111666000000 111671515999 37222000000 37223838666 2862261632 2864100298
+111669000000 111674516233 37223000000 37224838744 2863261632 2865100376
+111672000000 111677516146 37224000000 37225838715 2864261632 2866100347
+111675000000 111680516267 37225000000 37226838755 2865261632 2867100387
+111678000000 111683516375 37226000000 37227838791 2866261632 2868100423
+111681000000 111686516610 37227000000 37228838870 2867261632 2869100502
+111684000000 111689516789 37228000000 37229838929 2868261632 2870100561
+111687000000 111692430429 37229000000 37230810143 2869261632 2871071775
+111690000000 111695517058 37230000000 37231839019 2870261632 2872100651
+111693000000 111698517231 37231000000 37232839077 2871261632 2873100709
+111696000000 111701517347 37232000000 37233839115 2872261632 2874100747
+111699000000 111704517520 37233000000 37234839173 2873261632 2875100805
+111702000000 111707517692 37234000000 37235839230 2874261632 2876100862
+111705000000 111710517748 37235000000 37236839249 2875261632 2877100881
+111708000000 111713517894 37236000000 37237839298 2876261632 2878100930
+111711000000 111716518090 37237000000 37238839363 2877261632 2879100995
+111714000000 111719518119 37238000000 37239839373 2878261632 2880101005
+111717000000 111722518425 37239000000 37240839475 2879261632 2881101107
+111720000000 111725518597 37240000000 37241839532 2880261632 2882101164
+111723000000 111728518730 37241000000 37242839576 2881261632 2883101208
+111726000000 111731518847 37242000000 37243839615 2882261632 2884101247
+111729000000 111734519032 37243000000 37244839677 2883261632 2885101309
+111732000000 111737519138 37244000000 37245839712 2884261632 2886101344
+111735000000 111740519319 37245000000 37246839773 2885261632 2887101405
+111738000000 111743519531 37246000000 37247839843 2886261632 2888101475
+111741000000 111746519638 37247000000 37248839879 2887261632 2889101511
+111744000000 111749519804 37248000000 37249839934 2888261632 2890101566
+111747000000 111752118549 37249000000 37250706183 2889261632 2890967815
+111750000000 111755520075 37250000000 37251840025 2890261632 2892101657
+111753000000 111758520187 37251000000 37252840062 2891261632 2893101694
+111756000000 111761520396 37252000000 37253840132 2892261632 2894101764
+111759000000 111764520475 37253000000 37254840158 2893261632 2895101790
+111762000000 111767520700 37254000000 37255840233 2894261632 2896101865
+111765000000 111770520827 37255000000 37256840275 2895261632 2897101907
+111768000000 111773520916 37256000000 37257840305 2896261632 2898101937
+111771000000 111776521022 37257000000 37258840340 2897261632 2899101972
+111774000000 111779521233 37258000000 37259840411 2898261632 2900102043
+111777000000 111782521442 37259000000 37260840480 2899261632 2901102112
+111780000000 111785521587 37260000000 37261840529 2900261632 2902102161
+111783000000 111788521713 37261000000 37262840571 2901261632 2903102203
+111786000000 111791521879 37262000000 37263840626 2902261632 2904102258
+111789000000 111794521959 37263000000 37264840653 2903261632 2905102285
+111792000000 111797522194 37264000000 37265840731 2904261632 2906102363
+111795000000 111800522353 37265000000 37266840784 2905261632 2907102416
+111798000000 111803522474 37266000000 37267840824 2906261632 2908102456
+111801000000 111806522634 37267000000 37268840878 2907261632 2909102510
+111804000000 111809522717 37268000000 37269840905 2908261632 2910102537
+111807000000 111812522963 37269000000 37270840987 2909261632 2911102619
+111810000000 111815523086 37270000000 37271841028 2910261632 2912102660
+111813000000 111818523222 37271000000 37272841074 2911261632 2913102706
+111816000000 111821523397 37272000000 37273841132 2912261632 2914102764
+111819000000 111824523519 37273000000 37274841173 2913261632 2915102805
+111822000000 111827523669 37274000000 37275841223 2914261632 2916102855
+111825000000 111830523817 37275000000 37276841272 2915261632 2917102904
+111828000000 111832697511 37276000000 37277565837 2916261632 2917827469
+111831000000 111836524137 37277000000 37278841379 2917261632 2919103011
+111834000000 111839524269 37278000000 37279841423 2918261632 2920103055
+111837000000 111842524443 37279000000 37280841481 2919261632 2921103113
+111840000000 111845524562 37280000000 37281841520 2920261632 2922103152
+111843000000 111848524686 37281000000 37282841562 2921261632 2923103194
+111846000000 111851524905 37282000000 37283841635 2922261632 2924103267
+111849000000 111854525041 37283000000 37284841680 2923261632 2925103312
+111852000000 111857525192 37284000000 37285841730 2924261632 2926103362
+111855000000 111860525342 37285000000 37286841780 2925261632 2927103412
+111858000000 111863525457 37286000000 37287841819 2926261632 2928103451
+111861000000 111866525554 37287000000 37288841851 2927261632 2929103483
+111864000000 111869525762 37288000000 37289841920 2928261632 2930103552
+111867000000 111872525917 37289000000 37290841972 2929261632 2931103604
+111870000000 111875526076 37290000000 37291842025 2930261632 2932103657
+111873000000 111878526250 37291000000 37292842083 2931261632 2933103715
+111876000000 111881526350 37292000000 37293842116 2932261632 2934103748
+111879000000 111884526528 37293000000 37294842176 2933261632 2935103808
+111882000000 111887526677 37294000000 37295842225 2934261632 2936103857
+111885000000 111890526805 37295000000 37296842268 2935261632 2937103900
+111888000000 111893526974 37296000000 37297842324 2936261632 2938103956
+111891000000 111896527094 37297000000 37298842364 2937261632 2939103996
+111894000000 111898354444 37298000000 37299451481 2938261632 2939713113
+111897000000 111902527344 37299000000 37300842448 2939261632 2941104080
+111900000000 111905527602 37300000000 37301842534 2940261632 2942104166
+111903000000 111908527707 37301000000 37302842569 2941261632 2943104201
+111906000000 111911527787 37302000000 37303842595 2942261632 2944104227
+111909000000 111914527934 37303000000 37304842644 2943261632 2945104276
+111912000000 111917528188 37304000000 37305842729 2944261632 2946104361
+111915000000 111920528278 37305000000 37306842759 2945261632 2947104391
+111918000000 111923528523 37306000000 37307842841 2946261632 2948104473
+111921000000 111926528601 37307000000 37308842867 2947261632 2949104499
+111924000000 111929528778 37308000000 37309842926 2948261632 2950104558
+111927000000 111932528924 37309000000 37310842974 2949261632 2951104606
+111930000000 111935529068 37310000000 37311843022 2950261632 2952104654
+111933000000 111937151722 37311000000 37312383907 2951261632 2952645539
+111936000000 111941529383 37312000000 37313843127 2952261632 2954104759
+111939000000 111944529543 37313000000 37314843181 2953261632 2955104813
+111942000000 111947529680 37314000000 37315843226 2954261632 2956104858
+111945000000 111950529838 37315000000 37316843279 2955261632 2957104911
+111948000000 111953529996 37316000000 37317843332 2956261632 2958104964
+111951000000 111956530110 37317000000 37318843370 2957261632 2959105002
+111954000000 111959530271 37318000000 37319843423 2958261632 2960105055
+111957000000 111962530398 37319000000 37320843466 2959261632 2961105098
+111960000000 111965530507 37320000000 37321843502 2960261632 2962105134
+111963000000 111968530649 37321000000 37322843549 2961261632 2963105181
+111966000000 111971530883 37322000000 37323843627 2962261632 2964105259
+111969000000 111974530796 37323000000 37324843598 2963261632 2965105230
+111972000000 111977530917 37324000000 37325843639 2964261632 2966105271
+111975000000 111980531025 37325000000 37326843675 2965261632 2967105307
+111978000000 111983531260 37326000000 37327843753 2966261632 2968105385
+111981000000 111986531439 37327000000 37328843813 2967261632 2969105445
+111984000000 111989445079 37328000000 37329815026 2968261632 2970076658
+111987000000 111992531708 37329000000 37330843902 2969261632 2971105534
+111990000000 111995531881 37330000000 37331843960 2970261632 2972105592
+111993000000 111998531997 37331000000 37332843999 2971261632 2973105631
+111996000000 112001532170 37332000000 37333844056 2972261632 2974105688
+111999000000 112004532342 37333000000 37334844114 2973261632 2975105746
+112002000000 112007532398 37334000000 37335844132 2974261632 2976105764
+112005000000 112010532544 37335000000 37336844181 2975261632 2977105813
+112008000000 112013532740 37336000000 37337844246 2976261632 2978105878
+112011000000 112016532769 37337000000 37338844256 2977261632 2979105888
+112014000000 112019533075 37338000000 37339844358 2978261632 2980105990
+112017000000 112022533247 37339000000 37340844415 2979261632 2981106047
+112020000000 112025533380 37340000000 37341844460 2980261632 2982106092
+112023000000 112028533497 37341000000 37342844499 2981261632 2983106131
+112026000000 112031533682 37342000000 37343844560 2982261632 2984106192
+112029000000 112034533788 37343000000 37344844596 2983261632 2985106228
+112032000000 112037533969 37344000000 37345844656 2984261632 2986106288
+112035000000 112040534181 37345000000 37346844727 2985261632 2987106359
+112038000000 112043534288 37346000000 37347844762 2986261632 2988106394
+112041000000 112046534454 37347000000 37348844818 2987261632 2989106450
+112044000000 112049133199 37348000000 37349711066 2988261632 2989972698
+112047000000 112052534725 37349000000 37350844908 2989261632 2991106540
+112050000000 112055534837 37350000000 37351844945 2990261632 2992106577
+112053000000 112058535046 37351000000 37352845015 2991261632 2993106647
+112056000000 112061535125 37352000000 37353845041 2992261632 2994106673
+112059000000 112064535350 37353000000 37354845116 2993261632 2995106748
+112062000000 112067535477 37354000000 37355845159 2994261632 2996106791
+112065000000 112070535566 37355000000 37356845188 2995261632 2997106820
+112068000000 112073535672 37356000000 37357845224 2996261632 2998106856
+112071000000 112076535883 37357000000 37358845294 2997261632 2999106926
+112074000000 112079536092 37358000000 37359845364 2998261632 3000106996
+112077000000 112082536237 37359000000 37360845412 2999261632 3001107044
+112080000000 112085536363 37360000000 37361845454 3000261632 3002107086
+112083000000 112088536529 37361000000 37362845509 3001261632 3003107141
+112086000000 112091536609 37362000000 37363845536 3002261632 3004107168
+112089000000 112094536844 37363000000 37364845614 3003261632 3005107246
+112092000000 112097537003 37364000000 37365845667 3004261632 3006107299
+112095000000 112100537124 37365000000 37366845708 3005261632 3007107340
+112098000000 112103537284 37366000000 37367845761 3006261632 3008107393
+112101000000 112106537367 37367000000 37368845789 3007261632 3009107421
+112104000000 112109537613 37368000000 37369845871 3008261632 3010107503
+112107000000 112112537736 37369000000 37370845912 3009261632 3011107544
+112110000000 112115537872 37370000000 37371845957 3010261632 3012107589
+112113000000 112118538047 37371000000 37372846015 3011261632 3013107647
+112116000000 112121538169 37372000000 37373846056 3012261632 3014107688
+112119000000 112124538319 37373000000 37374846106 3013261632 3015107738
+112122000000 112127538467 37374000000 37375846155 3014261632 3016107787
+112125000000 112129712161 37375000000 37376570720 3015261632 3016832352
+112128000000 112133538787 37376000000 37377846262 3016261632 3018107894
+112131000000 112136538919 37377000000 37378846306 3017261632 3019107938
+112134000000 112139539093 37378000000 37379846364 3018261632 3020107996
+112137000000 112142539212 37379000000 37380846404 3019261632 3021108036
+112140000000 112145539336 37380000000 37381846445 3020261632 3022108077
+112143000000 112148539555 37381000000 37382846518 3021261632 3023108150
+112146000000 112151539691 37382000000 37383846563 3022261632 3024108195
+112149000000 112154539842 37383000000 37384846614 3023261632 3025108246
+112152000000 112157539992 37384000000 37385846664 3024261632 3026108296
+112155000000 112160540107 37385000000 37386846702 3025261632 3027108334
+112158000000 112163540204 37386000000 37387846734 3026261632 3028108366
+112161000000 112166540412 37387000000 37388846804 3027261632 3029108436
+112164000000 112169540567 37388000000 37389846855 3028261632 3030108487
+112167000000 112172540726 37389000000 37390846908 3029261632 3031108540
+112170000000 112175540900 37390000000 37391846966 3030261632 3032108598
+112173000000 112178541000 37391000000 37392847000 3031261632 3033108632
+112176000000 112181541178 37392000000 37393847059 3032261632 3034108691
+112179000000 112184541327 37393000000 37394847109 3033261632 3035108741
+112182000000 112187541455 37394000000 37395847151 3034261632 3036108783
+112185000000 112190541624 37395000000 37396847208 3035261632 3037108840
+112188000000 112193541744 37396000000 37397847248 3036261632 3038108880
+112191000000 112195369094 37397000000 37398456364 3037261632 3038717996
+112194000000 112199541994 37398000000 37399847331 3038261632 3040108963
+112197000000 112202542252 37399000000 37400847417 3039261632 3041109049
+112200000000 112205542357 37400000000 37401847452 3040261632 3042109084
+112203000000 112208542437 37401000000 37402847479 3041261632 3043109111
+112206000000 112211542584 37402000000 37403847528 3042261632 3044109160
+112209000000 112214542838 37403000000 37404847612 3043261632 3045109244
+112212000000 112217542928 37404000000 37405847642 3044261632 3046109274
+112215000000 112220543173 37405000000 37406847724 3045261632 3047109356
+112218000000 112223543251 37406000000 37407847750 3046261632 3048109382
+112221000000 112226543428 37407000000 37408847809 3047261632 3049109441
+112224000000 112229543574 37408000000 37409847858 3048261632 3050109490
+112227000000 112232543718 37409000000 37410847906 3049261632 3051109538
+112230000000 112234166372 37410000000 37411388790 3050261632 3051650422
+112233000000 112238544033 37411000000 37412848011 3051261632 3053109643
+112236000000 112241544193 37412000000 37413848064 3052261632 3054109696
+112239000000 112244544330 37413000000 37414848110 3053261632 3055109742
+112242000000 112247544488 37414000000 37415848162 3054261632 3056109794
+112245000000 112250544646 37415000000 37416848215 3055261632 3057109847
+112248000000 112253544760 37416000000 37417848253 3056261632 3058109885
+112251000000 112256544921 37417000000 37418848307 3057261632 3059109939
+112254000000 112259545048 37418000000 37419848349 3058261632 3060109981
+112257000000 112262545157 37419000000 37420848385 3059261632 3061110017
+112260000000 112265545299 37420000000 37421848433 3060261632 3062110065
+112263000000 112268545533 37421000000 37422848511 3061261632 3063110143
+112266000000 112271545446 37422000000 37423848482 3062261632 3064110114
+112269000000 112274545567 37423000000 37424848522 3063261632 3065110154
+112272000000 112277545675 37424000000 37425848558 3064261632 3066110190
+112275000000 112280545910 37425000000 37426848636 3065261632 3067110268
+112278000000 112283546089 37426000000 37427848696 3066261632 3068110328
+112281000000 112286459729 37427000000 37428819909 3067261632 3069081541
+112284000000 112289546358 37428000000 37429848786 3068261632 3070110418
+112287000000 112292546531 37429000000 37430848843 3069261632 3071110475
+112290000000 112295546647 37430000000 37431848882 3070261632 3072110514
+112293000000 112298546820 37431000000 37432848940 3071261632 3073110572
+112296000000 112301546992 37432000000 37433848997 3072261632 3074110629
+112299000000 112304547048 37433000000 37434849016 3073261632 3075110648
+112302000000 112307547194 37434000000 37435849064 3074261632 3076110696
+112305000000 112310547390 37435000000 37436849130 3075261632 3077110762
+112308000000 112313547419 37436000000 37437849139 3076261632 3078110771
+112311000000 112316547725 37437000000 37438849241 3077261632 3079110873
+112314000000 112319547897 37438000000 37439849299 3078261632 3080110931
+112317000000 112322548030 37439000000 37440849343 3079261632 3081110975
+112320000000 112325548147 37440000000 37441849382 3080261632 3082111014
+112323000000 112328548332 37441000000 37442849444 3081261632 3083111076
+112326000000 112331548438 37442000000 37443849479 3082261632 3084111111
+112329000000 112334548619 37443000000 37444849539 3083261632 3085111171
+112332000000 112337548831 37444000000 37445849610 3084261632 3086111242
+112335000000 112340548938 37445000000 37446849646 3085261632 3087111278
+112338000000 112343549104 37446000000 37447849701 3086261632 3088111333
+112341000000 112346147849 37447000000 37448715949 3087261632 3088977581
+112344000000 112349549375 37448000000 37449849791 3088261632 3090111423
+112347000000 112352549487 37449000000 37450849829 3089261632 3091111461
+112350000000 112355549696 37450000000 37451849898 3090261632 3092111530
+112353000000 112358549775 37451000000 37452849925 3091261632 3093111557
+112356000000 112361550000 37452000000 37453850000 3092261632 3094111632
+112359000000 112364550127 37453000000 37454850042 3093261632 3095111674
+112362000000 112367550216 37454000000 37455850072 3094261632 3096111704
+112365000000 112370550322 37455000000 37456850107 3095261632 3097111739
+112368000000 112373550533 37456000000 37457850177 3096261632 3098111809
+112371000000 112376550742 37457000000 37458850247 3097261632 3099111879
+112374000000 112379550887 37458000000 37459850295 3098261632 3100111927
+112377000000 112382551013 37459000000 37460850337 3099261632 3101111969
+112380000000 112385551179 37460000000 37461850393 3100261632 3102112025
+112383000000 112388551259 37461000000 37462850419 3101261632 3103112051
+112386000000 112391551494 37462000000 37463850498 3102261632 3104112130
+112389000000 112394551653 37463000000 37464850551 3103261632 3105112183
+112392000000 112397551774 37464000000 37465850591 3104261632 3106112223
+112395000000 112400551934 37465000000 37466850644 3105261632 3107112276
+112398000000 112403552017 37466000000 37467850672 3106261632 3108112304
+112401000000 112406552263 37467000000 37468850754 3107261632 3109112386
+112404000000 112409552386 37468000000 37469850795 3108261632 3110112427
+112407000000 112412552522 37469000000 37470850840 3109261632 3111112472
+112410000000 112415552697 37470000000 37471850899 3110261632 3112112531
+112413000000 112418552819 37471000000 37472850939 3111261632 3113112571
+112416000000 112421552969 37472000000 37473850989 3112261632 3114112621
+112419000000 112424553117 37473000000 37474851039 3113261632 3115112671
+112422000000 112426726811 37474000000 37475575603 3114261632 3115837235
+112425000000 112430553437 37475000000 37476851145 3115261632 3117112777
+112428000000 112433553569 37476000000 37477851189 3116261632 3118112821
+112431000000 112436553743 37477000000 37478851247 3117261632 3119112879
+112434000000 112439553862 37478000000 37479851287 3118261632 3120112919
+112437000000 112442553986 37479000000 37480851328 3119261632 3121112960
+112440000000 112445554205 37480000000 37481851401 3120261632 3122113033
+112443000000 112448554341 37481000000 37482851447 3121261632 3123113079
+112446000000 112451554492 37482000000 37483851497 3122261632 3124113129
+112449000000 112454554642 37483000000 37484851547 3123261632 3125113179
+112452000000 112457554757 37484000000 37485851585 3124261632 3126113217
+112455000000 112460554854 37485000000 37486851618 3125261632 3127113250
+112458000000 112463555062 37486000000 37487851687 3126261632 3128113319
+112461000000 112466555217 37487000000 37488851739 3127261632 3129113371
+112464000000 112469555376 37488000000 37489851792 3128261632 3130113424
+112467000000 112472555550 37489000000 37490851850 3129261632 3131113482
+112470000000 112475555650 37490000000 37491851883 3130261632 3132113515
+112473000000 112478555828 37491000000 37492851942 3131261632 3133113574
+112476000000 112481555977 37492000000 37493851992 3132261632 3134113624
+112479000000 112484556105 37493000000 37494852035 3133261632 3135113667
+112482000000 112487556274 37494000000 37495852091 3134261632 3136113723
+112485000000 112490556394 37495000000 37496852131 3135261632 3137113763
+112488000000 112492383744 37496000000 37497461248 3136261632 3137722880
+112491000000 112496556644 37497000000 37498852214 3137261632 3139113846
+112494000000 112499556902 37498000000 37499852300 3138261632 3140113932
+112497000000 112502557007 37499000000 37500852335 3139261632 3141113967
+112500000000 112505557087 37500000000 37501852362 3140261632 3142113994
+112503000000 112508557234 37501000000 37502852411 3141261632 3143114043
+112506000000 112511557488 37502000000 37503852496 3142261632 3144114128
+112509000000 112514557578 37503000000 37504852526 3143261632 3145114158
+112512000000 112517557823 37504000000 37505852607 3144261632 3146114239
+112515000000 112520557901 37505000000 37506852633 3145261632 3147114265
+112518000000 112523558078 37506000000 37507852692 3146261632 3148114324
+112521000000 112526558224 37507000000 37508852741 3147261632 3149114373
+112524000000 112529558368 37508000000 37509852789 3148261632 3150114421
+112527000000 112531181022 37509000000 37510393674 3149261632 3150655306
+112530000000 112535558683 37510000000 37511852894 3150261632 3152114526
+112533000000 112538558843 37511000000 37512852947 3151261632 3153114579
+112536000000 112541558980 37512000000 37513852993 3152261632 3154114625
+112539000000 112544559138 37513000000 37514853046 3153261632 3155114678
+112542000000 112547559296 37514000000 37515853098 3154261632 3156114730
+112545000000 112550559410 37515000000 37516853136 3155261632 3157114768
+112548000000 112553559571 37516000000 37517853190 3156261632 3158114822
+112551000000 112556559698 37517000000 37518853232 3157261632 3159114864
+112554000000 112559559807 37518000000 37519853269 3158261632 3160114901
+112557000000 112562559949 37519000000 37520853316 3159261632 3161114948
+112560000000 112565560183 37520000000 37521853394 3160261632 3162115026
+112563000000 112568560096 37521000000 37522853365 3161261632 3163114997
+112566000000 112571560217 37522000000 37523853405 3162261632 3164115037
+112569000000 112574560325 37523000000 37524853441 3163261632 3165115073
+112572000000 112577560560 37524000000 37525853520 3164261632 3166115152
+112575000000 112580560739 37525000000 37526853579 3165261632 3167115211
+112578000000 112583474379 37526000000 37527824793 3166261632 3168086425
+112581000000 112586561008 37527000000 37528853669 3167261632 3169115301
+112584000000 112589561181 37528000000 37529853727 3168261632 3170115359
+112587000000 112592561297 37529000000 37530853765 3169261632 3171115397
+112590000000 112595561470 37530000000 37531853823 3170261632 3172115455
+112593000000 112598561642 37531000000 37532853880 3171261632 3173115512
+112596000000 112601561698 37532000000 37533853899 3172261632 3174115531
+112599000000 112604561844 37533000000 37534853948 3173261632 3175115580
+112602000000 112607562040 37534000000 37535854013 3174261632 3176115645
+112605000000 112610562069 37535000000 37536854023 3175261632 3177115655
+112608000000 112613562375 37536000000 37537854125 3176261632 3178115757
+112611000000 112616562547 37537000000 37538854182 3177261632 3179115814
+112614000000 112619562680 37538000000 37539854226 3178261632 3180115858
+112617000000 112622562797 37539000000 37540854265 3179261632 3181115897
+112620000000 112625562982 37540000000 37541854327 3180261632 3182115959
+112623000000 112628563088 37541000000 37542854362 3181261632 3183115994
+112626000000 112631563269 37542000000 37543854423 3182261632 3184116055
+112629000000 112634563481 37543000000 37544854493 3183261632 3185116125
+112632000000 112637563588 37544000000 37545854529 3184261632 3186116161
+112635000000 112640563754 37545000000 37546854584 3185261632 3187116216
+112638000000 112643162499 37546000000 37547720833 3186261632 3187982465
+112641000000 112646564025 37547000000 37548854675 3187261632 3189116307
+112644000000 112649564137 37548000000 37549854712 3188261632 3190116344
+112647000000 112652564346 37549000000 37550854782 3189261632 3191116414
+112650000000 112655564425 37550000000 37551854808 3190261632 3192116440
+112653000000 112658564650 37551000000 37552854883 3191261632 3193116515
+112656000000 112661564777 37552000000 37553854925 3192261632 3194116557
+112659000000 112664564866 37553000000 37554854955 3193261632 3195116587
+112662000000 112667564972 37554000000 37555854990 3194261632 3196116622
+112665000000 112670565183 37555000000 37556855061 3195261632 3197116693
+112668000000 112673565392 37556000000 37557855130 3196261632 3198116762
+112671000000 112676565537 37557000000 37558855179 3197261632 3199116811
+112674000000 112679565663 37558000000 37559855221 3198261632 3200116853
+112677000000 112682565829 37559000000 37560855276 3199261632 3201116908
+112680000000 112685565909 37560000000 37561855303 3200261632 3202116935
+112683000000 112688566144 37561000000 37562855381 3201261632 3203117013
+112686000000 112691566303 37562000000 37563855434 3202261632 3204117066
+112689000000 112694566424 37563000000 37564855474 3203261632 3205117106
+112692000000 112697566584 37564000000 37565855528 3204261632 3206117160
+112695000000 112700566667 37565000000 37566855555 3205261632 3207117187
+112698000000 112703566913 37566000000 37567855637 3206261632 3208117269
+112701000000 112706567036 37567000000 37568855678 3207261632 3209117310
+112704000000 112709567172 37568000000 37569855724 3208261632 3210117356
+112707000000 112712567347 37569000000 37570855782 3209261632 3211117414
+112710000000 112715567469 37570000000 37571855823 3210261632 3212117455
+112713000000 112718567619 37571000000 37572855873 3211261632 3213117505
+112716000000 112721567767 37572000000 37573855922 3212261632 3214117554
+112719000000 112723741461 37573000000 37574580487 3213261632 3214842119
+112722000000 112727568087 37574000000 37575856029 3214261632 3216117661
+112725000000 112730568219 37575000000 37576856073 3215261632 3217117705
+112728000000 112733568393 37576000000 37577856131 3216261632 3218117763
+112731000000 112736568512 37577000000 37578856170 3217261632 3219117802
+112734000000 112739568636 37578000000 37579856212 3218261632 3220117844
+112737000000 112742568855 37579000000 37580856285 3219261632 3221117917
+112740000000 112745568991 37580000000 37581856330 3220261632 3222117962
+112743000000 112748569142 37581000000 37582856380 3221261632 3223118012
+112746000000 112751569292 37582000000 37583856430 3222261632 3224118062
+112749000000 112754569407 37583000000 37584856469 3223261632 3225118101
+112752000000 112757569504 37584000000 37585856501 3224261632 3226118133
+112755000000 112760569712 37585000000 37586856570 3225261632 3227118202
+112758000000 112763569867 37586000000 37587856622 3226261632 3228118254
+112761000000 112766570026 37587000000 37588856675 3227261632 3229118307
+112764000000 112769570200 37588000000 37589856733 3228261632 3230118365
+112767000000 112772570300 37589000000 37590856766 3229261632 3231118398
+112770000000 112775570478 37590000000 37591856826 3230261632 3232118458
+112773000000 112778570627 37591000000 37592856875 3231261632 3233118507
+112776000000 112781570755 37592000000 37593856918 3232261632 3234118550
+112779000000 112784570924 37593000000 37594856974 3233261632 3235118606
+112782000000 112787571044 37594000000 37595857014 3234261632 3236118646
+112785000000 112789398394 37595000000 37596466131 3235261632 3236727763
+112788000000 112793571294 37596000000 37597857098 3236261632 3238118730
+112791000000 112796571552 37597000000 37598857184 3237261632 3239118816
+112794000000 112799571657 37598000000 37599857219 3238261632 3240118851
+112797000000 112802571737 37599000000 37600857245 3239261632 3241118877
+112800000000 112805571884 37600000000 37601857294 3240261632 3242118926
+112803000000 112808572138 37601000000 37602857379 3241261632 3243119011
+112806000000 112811572228 37602000000 37603857409 3242261632 3244119041
+112809000000 112814572473 37603000000 37604857491 3243261632 3245119123
+112812000000 112817572551 37604000000 37605857517 3244261632 3246119149
+112815000000 112820572728 37605000000 37606857576 3245261632 3247119208
+112818000000 112823572874 37606000000 37607857624 3246261632 3248119256
+112821000000 112826573018 37607000000 37608857672 3247261632 3249119304
+112824000000 112828195672 37608000000 37609398557 3248261632 3249660189
+112827000000 112832573333 37609000000 37610857777 3249261632 3251119409
+112830000000 112835573493 37610000000 37611857831 3250261632 3252119463
+112833000000 112838573630 37611000000 37612857876 3251261632 3253119508
+112836000000 112841573788 37612000000 37613857929 3252261632 3254119561
+112839000000 112844573946 37613000000 37614857982 3253261632 3255119614
+112842000000 112847574060 37614000000 37615858020 3254261632 3256119652
+112845000000 112850574221 37615000000 37616858073 3255261632 3257119705
+112848000000 112853574348 37616000000 37617858116 3256261632 3258119748
+112851000000 112856574457 37617000000 37618858152 3257261632 3259119784
+112854000000 112859574599 37618000000 37619858199 3258261632 3260119831
+112857000000 112862574833 37619000000 37620858277 3259261632 3261119909
+112860000000 112865574746 37620000000 37621858248 3260261632 3262119880
+112863000000 112868574867 37621000000 37622858289 3261261632 3263119921
+112866000000 112871574975 37622000000 37623858325 3262261632 3264119957
+112869000000 112874575210 37623000000 37624858403 3263261632 3265120035
+112872000000 112877575389 37624000000 37625858463 3264261632 3266120095
+112875000000 112880489029 37625000000 37626829676 3265261632 3267091308
+112878000000 112883575658 37626000000 37627858552 3266261632 3268120184
+112881000000 112886575831 37627000000 37628858610 3267261632 3269120242
+112884000000 112889575947 37628000000 37629858649 3268261632 3270120281
+112887000000 112892576120 37629000000 37630858706 3269261632 3271120338
+112890000000 112895576292 37630000000 37631858764 3270261632 3272120396
+112893000000 112898576348 37631000000 37632858782 3271261632 3273120414
+112896000000 112901576494 37632000000 37633858831 3272261632 3274120463
+112899000000 112904576690 37633000000 37634858896 3273261632 3275120528
+112902000000 112907576719 37634000000 37635858906 3274261632 3276120538
+112905000000 112910577025 37635000000 37636859008 3275261632 3277120640
+112908000000 112913577197 37636000000 37637859065 3276261632 3278120697
+112911000000 112916577330 37637000000 37638859110 3277261632 3279120742
+112914000000 112919577447 37638000000 37639859149 3278261632 3280120781
+112917000000 112922577632 37639000000 37640859210 3279261632 3281120842
+112920000000 112925577738 37640000000 37641859246 3280261632 3282120878
+112923000000 112928577919 37641000000 37642859306 3281261632 3283120938
+112926000000 112931578131 37642000000 37643859377 3282261632 3284121009
+112929000000 112934578238 37643000000 37644859412 3283261632 3285121044
+112932000000 112937578404 37644000000 37645859468 3284261632 3286121100
+112935000000 112940177149 37645000000 37646725716 3285261632 3286987348
+112938000000 112943578675 37646000000 37647859558 3286261632 3288121190
+112941000000 112946578787 37647000000 37648859595 3287261632 3289121227
+112944000000 112949578996 37648000000 37649859665 3288261632 3290121297
+112947000000 112952579075 37649000000 37650859691 3289261632 3291121323
+112950000000 112955579300 37650000000 37651859766 3290261632 3292121398
+112953000000 112958579427 37651000000 37652859809 3291261632 3293121441
+112956000000 112961579516 37652000000 37653859838 3292261632 3294121470
+112959000000 112964579622 37653000000 37654859874 3293261632 3295121506
+112962000000 112967579833 37654000000 37655859944 3294261632 3296121576
+112965000000 112970580042 37655000000 37656860014 3295261632 3297121646
+112968000000 112973580187 37656000000 37657860062 3296261632 3298121694
+112971000000 112976580313 37657000000 37658860104 3297261632 3299121736
+112974000000 112979580479 37658000000 37659860159 3298261632 3300121791
+112977000000 112982580559 37659000000 37660860186 3299261632 3301121818
+112980000000 112985580794 37660000000 37661860264 3300261632 3302121896
+112983000000 112988580953 37661000000 37662860317 3301261632 3303121949
+112986000000 112991581074 37662000000 37663860358 3302261632 3304121990
+112989000000 112994581234 37663000000 37664860411 3303261632 3305122043
+112992000000 112997581317 37664000000 37665860439 3304261632 3306122071
+112995000000 113000581563 37665000000 37666860521 3305261632 3307122153
+112998000000 113003581686 37666000000 37667860562 3306261632 3308122194
+113001000000 113006581822 37667000000 37668860607 3307261632 3309122239
+113004000000 113009581997 37668000000 37669860665 3308261632 3310122297
+113007000000 113012582119 37669000000 37670860706 3309261632 3311122338
+113010000000 113015582269 37670000000 37671860756 3310261632 3312122388
+113013000000 113018582417 37671000000 37672860805 3311261632 3313122437
+113016000000 113020756111 37672000000 37673585370 3312261632 3313847002
+113019000000 113024582737 37673000000 37674860912 3313261632 3315122544
+113022000000 113027582869 37674000000 37675860956 3314261632 3316122588
+113025000000 113030583043 37675000000 37676861014 3315261632 3317122646
+113028000000 113033583162 37676000000 37677861054 3316261632 3318122686
+113031000000 113036583286 37677000000 37678861095 3317261632 3319122727
+113034000000 113039583505 37678000000 37679861168 3318261632 3320122800
+113037000000 113042583641 37679000000 37680861213 3319261632 3321122845
+113040000000 113045583792 37680000000 37681861264 3320261632 3322122896
+113043000000 113048583942 37681000000 37682861314 3321261632 3323122946
+113046000000 113051584057 37682000000 37683861352 3322261632 3324122984
+113049000000 113054584154 37683000000 37684861384 3323261632 3325123016
+113052000000 113057584362 37684000000 37685861454 3324261632 3326123086
+113055000000 113060584517 37685000000 37686861505 3325261632 3327123137
+113058000000 113063584676 37686000000 37687861558 3326261632 3328123190
+113061000000 113066584850 37687000000 37688861616 3327261632 3329123248
+113064000000 113069584950 37688000000 37689861650 3328261632 3330123282
+113067000000 113072585128 37689000000 37690861709 3329261632 3331123341
+113070000000 113075585277 37690000000 37691861759 3330261632 3332123391
+113073000000 113078585405 37691000000 37692861801 3331261632 3333123433
+113076000000 113081585574 37692000000 37693861858 3332261632 3334123490
+113079000000 113084585694 37693000000 37694861898 3333261632 3335123530
+113082000000 113086413044 37694000000 37695471014 3334261632 3335732646
+113085000000 113090585944 37695000000 37696861981 3335261632 3337123613
+113088000000 113093586202 37696000000 37697862067 3336261632 3338123699
+113091000000 113096586307 37697000000 37698862102 3337261632 3339123734
+113094000000 113099586387 37698000000 37699862129 3338261632 3340123761
+113097000000 113102586534 37699000000 37700862178 3339261632 3341123810
+113100000000 113105586788 37700000000 37701862262 3340261632 3342123894
+113103000000 113108586878 37701000000 37702862292 3341261632 3343123924
+113106000000 113111587123 37702000000 37703862374 3342261632 3344124006
+113109000000 113114587201 37703000000 37704862400 3343261632 3345124032
+113112000000 113117587378 37704000000 37705862459 3344261632 3346124091
+113115000000 113120587524 37705000000 37706862508 3345261632 3347124140
+113118000000 113123587668 37706000000 37707862556 3346261632 3348124188
+113121000000 113125210322 37707000000 37708403440 3347261632 3348665072
+113124000000 113129587983 37708000000 37709862661 3348261632 3350124293
+113127000000 113132588143 37709000000 37710862714 3349261632 3351124346
+113130000000 113135588280 37710000000 37711862760 3350261632 3352124392
+113133000000 113138588438 37711000000 37712862812 3351261632 3353124444
+113136000000 113141588596 37712000000 37713862865 3352261632 3354124497
+113139000000 113144588710 37713000000 37714862903 3353261632 3355124535
+113142000000 113147588871 37714000000 37715862957 3354261632 3356124589
+113145000000 113150588998 37715000000 37716862999 3355261632 3357124631
+113148000000 113153589107 37716000000 37717863035 3356261632 3358124667
+113151000000 113156589249 37717000000 37718863083 3357261632 3359124715
+113154000000 113159589483 37718000000 37719863161 3358261632 3360124793
+113157000000 113162589396 37719000000 37720863132 3359261632 3361124764
+113160000000 113165589517 37720000000 37721863172 3360261632 3362124804
+113163000000 113168589625 37721000000 37722863208 3361261632 3363124840
+113166000000 113171589860 37722000000 37723863286 3362261632 3364124918
+113169000000 113174590039 37723000000 37724863346 3363261632 3365124978
+113172000000 113177503679 37724000000 37725834559 3364261632 3366096191
+113175000000 113180590308 37725000000 37726863436 3365261632 3367125068
+113178000000 113183590481 37726000000 37727863493 3366261632 3368125125
+113181000000 113186590597 37727000000 37728863532 3367261632 3369125164
+113184000000 113189590770 37728000000 37729863590 3368261632 3370125222
+113187000000 113192590942 37729000000 37730863647 3369261632 3371125279
+113190000000 113195590998 37730000000 37731863666 3370261632 3372125298
+113193000000 113198591144 37731000000 37732863714 3371261632 3373125346
+113196000000 113201591340 37732000000 37733863780 3372261632 3374125412
+113199000000 113204591369 37733000000 37734863789 3373261632 3375125421
+113202000000 113207591675 37734000000 37735863891 3374261632 3376125523
+113205000000 113210591847 37735000000 37736863949 3375261632 3377125581
+113208000000 113213591980 37736000000 37737863993 3376261632 3378125625
+113211000000 113216592097 37737000000 37738864032 3377261632 3379125664
+113214000000 113219592282 37738000000 37739864094 3378261632 3380125726
+113217000000 113222592388 37739000000 37740864129 3379261632 3381125761
+113220000000 113225592569 37740000000 37741864189 3380261632 3382125821
+113223000000 113228592781 37741000000 37742864260 3381261632 3383125892
+113226000000 113231592888 37742000000 37743864296 3382261632 3384125928
+113229000000 113234593054 37743000000 37744864351 3383261632 3385125983
+113232000000 113237191799 37744000000 37745730599 3384261632 3385992231
+113235000000 113240593325 37745000000 37746864441 3385261632 3387126073
+113238000000 113243593437 37746000000 37747864479 3386261632 3388126111
+113241000000 113246593646 37747000000 37748864548 3387261632 3389126180
+113244000000 113249593725 37748000000 37749864575 3388261632 3390126207
+113247000000 113252593950 37749000000 37750864650 3389261632 3391126282
+113250000000 113255594077 37750000000 37751864692 3390261632 3392126324
+113253000000 113258594166 37751000000 37752864722 3391261632 3393126354
+113256000000 113261594272 37752000000 37753864757 3392261632 3394126389
+113259000000 113264594483 37753000000 37754864827 3393261632 3395126459
+113262000000 113267594692 37754000000 37755864897 3394261632 3396126529
+113265000000 113270594837 37755000000 37756864945 3395261632 3397126577
+113268000000 113273594963 37756000000 37757864987 3396261632 3398126619
+113271000000 113276595129 37757000000 37758865043 3397261632 3399126675
+113274000000 113279595209 37758000000 37759865069 3398261632 3400126701
+113277000000 113282595444 37759000000 37760865148 3399261632 3401126780
+113280000000 113285595603 37760000000 37761865201 3400261632 3402126833
+113283000000 113288595724 37761000000 37762865241 3401261632 3403126873
+113286000000 113291595884 37762000000 37763865294 3402261632 3404126926
+113289000000 113294595967 37763000000 37764865322 3403261632 3405126954
+113292000000 113297596213 37764000000 37765865404 3404261632 3406127036
+113295000000 113300596336 37765000000 37766865445 3405261632 3407127077
+113298000000 113303596472 37766000000 37767865490 3406261632 3408127122
+113301000000 113306596647 37767000000 37768865549 3407261632 3409127181
+113304000000 113309596769 37768000000 37769865589 3408261632 3410127221
+113307000000 113312596919 37769000000 37770865639 3409261632 3411127271
+113310000000 113315597067 37770000000 37771865689 3410261632 3412127321
+113313000000 113317770761 37771000000 37772590253 3411261632 3412851885
+113316000000 113321597387 37772000000 37773865795 3412261632 3414127427
+113319000000 113324597519 37773000000 37774865839 3413261632 3415127471
+113322000000 113327597693 37774000000 37775865897 3414261632 3416127529
+113325000000 113330597812 37775000000 37776865937 3415261632 3417127569
+113328000000 113333597936 37776000000 37777865978 3416261632 3418127610
+113331000000 113336598155 37777000000 37778866051 3417261632 3419127683
+113334000000 113339598291 37778000000 37779866097 3418261632 3420127729
+113337000000 113342598442 37779000000 37780866147 3419261632 3421127779
+113340000000 113345598592 37780000000 37781866197 3420261632 3422127829
+113343000000 113348598707 37781000000 37782866235 3421261632 3423127867
+113346000000 113351598804 37782000000 37783866268 3422261632 3424127900
+113349000000 113354599012 37783000000 37784866337 3423261632 3425127969
+113352000000 113357599167 37784000000 37785866389 3424261632 3426128021
+113355000000 113360599326 37785000000 37786866442 3425261632 3427128074
+113358000000 113363599500 37786000000 37787866500 3426261632 3428128132
+113361000000 113366599600 37787000000 37788866533 3427261632 3429128165
+113364000000 113369599778 37788000000 37789866592 3428261632 3430128224
+113367000000 113372599927 37789000000 37790866642 3429261632 3431128274
+113370000000 113375600055 37790000000 37791866685 3430261632 3432128317
+113373000000 113378600224 37791000000 37792866741 3431261632 3433128373
+113376000000 113381600344 37792000000 37793866781 3432261632 3434128413
+113379000000 113383427694 37793000000 37794475898 3433261632 3434737530
+113382000000 113387600594 37794000000 37795866864 3434261632 3436128496
+113385000000 113390600852 37795000000 37796866950 3435261632 3437128582
+113388000000 113393600957 37796000000 37797866985 3436261632 3438128617
+113391000000 113396601037 37797000000 37798867012 3437261632 3439128644
+113394000000 113399601184 37798000000 37799867061 3438261632 3440128693
+113397000000 113402601438 37799000000 37800867146 3439261632 3441128778
+113400000000 113405601528 37800000000 37801867176 3440261632 3442128808
+113403000000 113408601773 37801000000 37802867257 3441261632 3443128889
+113406000000 113411601851 37802000000 37803867283 3442261632 3444128915
+113409000000 113414602028 37803000000 37804867342 3443261632 3445128974
+113412000000 113417602174 37804000000 37805867391 3444261632 3446129023
+113415000000 113420602318 37805000000 37806867439 3445261632 3447129071
+113418000000 113422224972 37806000000 37807408324 3446261632 3447669956
+113421000000 113426602633 37807000000 37808867544 3447261632 3449129176
+113424000000 113429602793 37808000000 37809867597 3448261632 3450129229
+113427000000 113432602930 37809000000 37810867643 3449261632 3451129275
+113430000000 113435603088 37810000000 37811867696 3450261632 3452129328
+113433000000 113438603246 37811000000 37812867748 3451261632 3453129380
+113436000000 113441603360 37812000000 37813867786 3452261632 3454129418
+113439000000 113444603521 37813000000 37814867840 3453261632 3455129472
+113442000000 113447603648 37814000000 37815867882 3454261632 3456129514
+113445000000 113450603757 37815000000 37816867919 3455261632 3457129551
+113448000000 113453603899 37816000000 37817867966 3456261632 3458129598
+113451000000 113456604133 37817000000 37818868044 3457261632 3459129676
+113454000000 113459604046 37818000000 37819868015 3458261632 3460129647
+113457000000 113462604167 37819000000 37820868055 3459261632 3461129687
+113460000000 113465604275 37820000000 37821868091 3460261632 3462129723
+113463000000 113468604510 37821000000 37822868170 3461261632 3463129802
+113466000000 113471604689 37822000000 37823868229 3462261632 3464129861
+113469000000 113474518329 37823000000 37824839443 3463261632 3465101075
+113472000000 113477604958 37824000000 37825868319 3464261632 3466129951
+113475000000 113480605131 37825000000 37826868377 3465261632 3467130009
+113478000000 113483605247 37826000000 37827868415 3466261632 3468130047
+113481000000 113486605420 37827000000 37828868473 3467261632 3469130105
+113484000000 113489605592 37828000000 37829868530 3468261632 3470130162
+113487000000 113492605648 37829000000 37830868549 3469261632 3471130181
+113490000000 113495605794 37830000000 37831868598 3470261632 3472130230
+113493000000 113498605990 37831000000 37832868663 3471261632 3473130295
+113496000000 113501606019 37832000000 37833868673 3472261632 3474130305
+113499000000 113504606325 37833000000 37834868775 3473261632 3475130407
+113502000000 113507606497 37834000000 37835868832 3474261632 3476130464
+113505000000 113510606630 37835000000 37836868876 3475261632 3477130508
+113508000000 113513606747 37836000000 37837868915 3476261632 3478130547
+113511000000 113516606932 37837000000 37838868977 3477261632 3479130609
+113514000000 113519607038 37838000000 37839869012 3478261632 3480130644
+113517000000 113522607219 37839000000 37840869073 3479261632 3481130705
+113520000000 113525607431 37840000000 37841869143 3480261632 3482130775
+113523000000 113528607538 37841000000 37842869179 3481261632 3483130811
+113526000000 113531607704 37842000000 37843869234 3482261632 3484130866
+113529000000 113534206449 37843000000 37844735483 3483261632 3484997115
+113532000000 113537607975 37844000000 37845869325 3484261632 3486130957
+113535000000 113540608087 37845000000 37846869362 3485261632 3487130994
+113538000000 113543608296 37846000000 37847869432 3486261632 3488131064
+113541000000 113546608375 37847000000 37848869458 3487261632 3489131090
+113544000000 113549608600 37848000000 37849869533 3488261632 3490131165
+113547000000 113552608727 37849000000 37850869575 3489261632 3491131207
+113550000000 113555608816 37850000000 37851869605 3490261632 3492131237
+113553000000 113558608922 37851000000 37852869640 3491261632 3493131272
+113556000000 113561609133 37852000000 37853869711 3492261632 3494131343
+113559000000 113564609342 37853000000 37854869780 3493261632 3495131412
+113562000000 113567609487 37854000000 37855869829 3494261632 3496131461
+113565000000 113570609613 37855000000 37856869871 3495261632 3497131503
+113568000000 113573609779 37856000000 37857869926 3496261632 3498131558
+113571000000 113576609859 37857000000 37858869953 3497261632 3499131585
+113574000000 113579610094 37858000000 37859870031 3498261632 3500131663
+113577000000 113582610253 37859000000 37860870084 3499261632 3501131716
+113580000000 113585610374 37860000000 37861870124 3500261632 3502131756
+113583000000 113588610534 37861000000 37862870178 3501261632 3503131810
+113586000000 113591610617 37862000000 37863870205 3502261632 3504131837
+113589000000 113594610863 37863000000 37864870287 3503261632 3505131919
+113592000000 113597610986 37864000000 37865870328 3504261632 3506131960
+113595000000 113600611122 37865000000 37866870374 3505261632 3507132006
+113598000000 113603611297 37866000000 37867870432 3506261632 3508132064
+113601000000 113606611419 37867000000 37868870473 3507261632 3509132105
+113604000000 113609611569 37868000000 37869870523 3508261632 3510132155
+113607000000 113612611717 37869000000 37870870572 3509261632 3511132204
+113610000000 113614785411 37870000000 37871595137 3510261632 3511856769
+113613000000 113618612037 37871000000 37872870679 3511261632 3513132311
+113616000000 113621612169 37872000000 37873870723 3512261632 3514132355
+113619000000 113624612343 37873000000 37874870781 3513261632 3515132413
+113622000000 113627612462 37874000000 37875870820 3514261632 3516132452
+113625000000 113630612586 37875000000 37876870862 3515261632 3517132494
+113628000000 113633612805 37876000000 37877870935 3516261632 3518132567
+113631000000 113636612941 37877000000 37878870980 3517261632 3519132612
+113634000000 113639613092 37878000000 37879871030 3518261632 3520132662
+113637000000 113642613242 37879000000 37880871080 3519261632 3521132712
+113640000000 113645613357 37880000000 37881871119 3520261632 3522132751
+113643000000 113648613454 37881000000 37882871151 3521261632 3523132783
+113646000000 113651613662 37882000000 37883871220 3522261632 3524132852
+113649000000 113654613817 37883000000 37884871272 3523261632 3525132904
+113652000000 113657613976 37884000000 37885871325 3524261632 3526132957
+113655000000 113660614150 37885000000 37886871383 3525261632 3527133015
+113658000000 113663614250 37886000000 37887871416 3526261632 3528133048
+113661000000 113666614428 37887000000 37888871476 3527261632 3529133108
+113664000000 113669614577 37888000000 37889871525 3528261632 3530133157
+113667000000 113672614705 37889000000 37890871568 3529261632 3531133200
+113670000000 113675614874 37890000000 37891871624 3530261632 3532133256
+113673000000 113678614994 37891000000 37892871664 3531261632 3533133296
+113676000000 113680442344 37892000000 37893480781 3532261632 3533742413
+113679000000 113684615244 37893000000 37894871748 3533261632 3535133380
+113682000000 113687615502 37894000000 37895871834 3534261632 3536133466
+113685000000 113690615607 37895000000 37896871869 3535261632 3537133501
+113688000000 113693615687 37896000000 37897871895 3536261632 3538133527
+113691000000 113696615834 37897000000 37898871944 3537261632 3539133576
+113694000000 113699616088 37898000000 37899872029 3538261632 3540133661
+113697000000 113702616178 37899000000 37900872059 3539261632 3541133691
+113700000000 113705616423 37900000000 37901872141 3540261632 3542133773
+113703000000 113708616501 37901000000 37902872167 3541261632 3543133799
+113706000000 113711616678 37902000000 37903872226 3542261632 3544133858
+113709000000 113714616824 37903000000 37904872274 3543261632 3545133906
+113712000000 113717616968 37904000000 37905872322 3544261632 3546133954
+113715000000 113719239622 37905000000 37906413207 3545261632 3546674839
+113718000000 113723617283 37906000000 37907872427 3546261632 3548134059
+113721000000 113726617443 37907000000 37908872481 3547261632 3549134113
+113724000000 113729617580 37908000000 37909872526 3548261632 3550134158
+113727000000 113732617738 37909000000 37910872579 3549261632 3551134211
+113730000000 113735617896 37910000000 37911872632 3550261632 3552134264
+113733000000 113738618010 37911000000 37912872670 3551261632 3553134302
+113736000000 113741618171 37912000000 37913872723 3552261632 3554134355
+113739000000 113744618298 37913000000 37914872766 3553261632 3555134398
+113742000000 113747618407 37914000000 37915872802 3554261632 3556134434
+113745000000 113750618549 37915000000 37916872849 3555261632 3557134481
+113748000000 113753618783 37916000000 37917872927 3556261632 3558134559
+113751000000 113756618696 37917000000 37918872898 3557261632 3559134530
+113754000000 113759618817 37918000000 37919872939 3558261632 3560134571
+113757000000 113762618925 37919000000 37920872975 3559261632 3561134607
+113760000000 113765619160 37920000000 37921873053 3560261632 3562134685
+113763000000 113768619339 37921000000 37922873113 3561261632 3563134745
+113766000000 113771532979 37922000000 37923844326 3562261632 3564105958
+113769000000 113774619608 37923000000 37924873202 3563261632 3565134834
+113772000000 113777619781 37924000000 37925873260 3564261632 3566134892
+113775000000 113780619897 37925000000 37926873299 3565261632 3567134931
+113778000000 113783620070 37926000000 37927873356 3566261632 3568134988
+113781000000 113786620242 37927000000 37928873414 3567261632 3569135046
+113784000000 113789620298 37928000000 37929873432 3568261632 3570135064
+113787000000 113792620444 37929000000 37930873481 3569261632 3571135113
+113790000000 113795620640 37930000000 37931873546 3570261632 3572135178
+113793000000 113798620669 37931000000 37932873556 3571261632 3573135188
+113796000000 113801620975 37932000000 37933873658 3572261632 3574135290
+113799000000 113804621147 37933000000 37934873715 3573261632 3575135347
+113802000000 113807621280 37934000000 37935873760 3574261632 3576135392
+113805000000 113810621397 37935000000 37936873799 3575261632 3577135431
+113808000000 113813621582 37936000000 37937873860 3576261632 3578135492
+113811000000 113816621688 37937000000 37938873896 3577261632 3579135528
+113814000000 113819621869 37938000000 37939873956 3578261632 3580135588
+113817000000 113822622081 37939000000 37940874027 3579261632 3581135659
+113820000000 113825622188 37940000000 37941874062 3580261632 3582135694
+113823000000 113828622354 37941000000 37942874118 3581261632 3583135750
+113826000000 113831221099 37942000000 37943740366 3582261632 3584001998
+113829000000 113834622625 37943000000 37944874208 3583261632 3585135840
+113832000000 113837622737 37944000000 37945874245 3584261632 3586135877
+113835000000 113840622946 37945000000 37946874315 3585261632 3587135947
+113838000000 113843623025 37946000000 37947874341 3586261632 3588135973
+113841000000 113846623250 37947000000 37948874416 3587261632 3589136048
+113844000000 113849623377 37948000000 37949874459 3588261632 3590136091
+113847000000 113852623466 37949000000 37950874488 3589261632 3591136120
+113850000000 113855623572 37950000000 37951874524 3590261632 3592136156
+113853000000 113858623783 37951000000 37952874594 3591261632 3593136226
+113856000000 113861623992 37952000000 37953874664 3592261632 3594136296
+113859000000 113864624137 37953000000 37954874712 3593261632 3595136344
+113862000000 113867624263 37954000000 37955874754 3594261632 3596136386
+113865000000 113870624429 37955000000 37956874809 3595261632 3597136441
+113868000000 113873624509 37956000000 37957874836 3596261632 3598136468
+113871000000 113876624744 37957000000 37958874914 3597261632 3599136546
+113874000000 113879624903 37958000000 37959874967 3598261632 3600136599
+113877000000 113882625024 37959000000 37960875008 3599261632 3601136640
+113880000000 113885625184 37960000000 37961875061 3600261632 3602136693
+113883000000 113888625267 37961000000 37962875089 3601261632 3603136721
+113886000000 113891625513 37962000000 37963875171 3602261632 3604136803
+113889000000 113894625636 37963000000 37964875212 3603261632 3605136844
+113892000000 113897625772 37964000000 37965875257 3604261632 3606136889
+113895000000 113900625947 37965000000 37966875315 3605261632 3607136947
+113898000000 113903626069 37966000000 37967875356 3606261632 3608136988
+113901000000 113906626219 37967000000 37968875406 3607261632 3609137038
+113904000000 113909626367 37968000000 37969875455 3608261632 3610137087
+113907000000 113911800061 37969000000 37970600020 3609261632 3610861652
+113910000000 113915626687 37970000000 37971875562 3610261632 3612137194
+113913000000 113918626819 37971000000 37972875606 3611261632 3613137238
+113916000000 113921626993 37972000000 37973875664 3612261632 3614137296
+113919000000 113924627112 37973000000 37974875704 3613261632 3615137336
+113922000000 113927627236 37974000000 37975875745 3614261632 3616137377
+113925000000 113930627455 37975000000 37976875818 3615261632 3617137450
+113928000000 113933627591 37976000000 37977875863 3616261632 3618137495
+113931000000 113936627742 37977000000 37978875914 3617261632 3619137546
+113934000000 113939627892 37978000000 37979875964 3618261632 3620137596
+113937000000 113942628007 37979000000 37980876002 3619261632 3621137634
+113940000000 113945628104 37980000000 37981876034 3620261632 3622137666
+113943000000 113948628312 37981000000 37982876104 3621261632 3623137736
+113946000000 113951628467 37982000000 37983876155 3622261632 3624137787
+113949000000 113954628626 37983000000 37984876208 3623261632 3625137840
+113952000000 113957628800 37984000000 37985876266 3624261632 3626137898
+113955000000 113960628900 37985000000 37986876300 3625261632 3627137932
+113958000000 113963629078 37986000000 37987876359 3626261632 3628137991
+113961000000 113966629227 37987000000 37988876409 3627261632 3629138041
+113964000000 113969629355 37988000000 37989876451 3628261632 3630138083
+113967000000 113972629524 37989000000 37990876508 3629261632 3631138140
+113970000000 113975629644 37990000000 37991876548 3630261632 3632138180
+113973000000 113977456994 37991000000 37992485664 3631261632 3632747296
+113976000000 113981629894 37992000000 37993876631 3632261632 3634138263
+113979000000 113984630152 37993000000 37994876717 3633261632 3635138349
+113982000000 113987630257 37994000000 37995876752 3634261632 3636138384
+113985000000 113990630337 37995000000 37996876779 3635261632 3637138411
+113988000000 113993630484 37996000000 37997876828 3636261632 3638138460
+113991000000 113996630738 37997000000 37998876912 3637261632 3639138544
+113994000000 113999630828 37998000000 37999876942 3638261632 3640138574
+113997000000 114002631073 37999000000 38000877024 3639261632 3641138656
+114000000000 114005631151 38000000000 38001877050 3640261632 3642138682
+114003000000 114008631328 38001000000 38002877109 3641261632 3643138741
+114006000000 114011631474 38002000000 38003877158 3642261632 3644138790
+114009000000 114014631618 38003000000 38004877206 3643261632 3645138838
+114012000000 114016254272 38004000000 38005418090 3644261632 3645679722
+114015000000 114020631933 38005000000 38006877311 3645261632 3647138943
+114018000000 114023632093 38006000000 38007877364 3646261632 3648138996
+114021000000 114026632230 38007000000 38008877410 3647261632 3649139042
+114024000000 114029632388 38008000000 38009877462 3648261632 3650139094
+114027000000 114032632546 38009000000 38010877515 3649261632 3651139147
+114030000000 114035632660 38010000000 38011877553 3650261632 3652139185
+114033000000 114038632821 38011000000 38012877607 3651261632 3653139239
+114036000000 114041632948 38012000000 38013877649 3652261632 3654139281
+114039000000 114044633057 38013000000 38014877685 3653261632 3655139317
+114042000000 114047633199 38014000000 38015877733 3654261632 3656139365
+114045000000 114050633433 38015000000 38016877811 3655261632 3657139443
+114048000000 114053633346 38016000000 38017877782 3656261632 3658139414
+114051000000 114056633467 38017000000 38018877822 3657261632 3659139454
+114054000000 114059633575 38018000000 38019877858 3658261632 3660139490
+114057000000 114062633810 38019000000 38020877936 3659261632 3661139568
+114060000000 114065633989 38020000000 38021877996 3660261632 3662139628
+114063000000 114068547629 38021000000 38022849209 3661261632 3663110841
+114066000000 114071634258 38022000000 38023878086 3662261632 3664139718
+114069000000 114074634431 38023000000 38024878143 3663261632 3665139775
+114072000000 114077634547 38024000000 38025878182 3664261632 3666139814
+114075000000 114080634720 38025000000 38026878240 3665261632 3667139872
+114078000000 114083634892 38026000000 38027878297 3666261632 3668139929
+114081000000 114086634948 38027000000 38028878316 3667261632 3669139948
+114084000000 114089635094 38028000000 38029878364 3668261632 3670139996
+114087000000 114092635290 38029000000 38030878430 3669261632 3671140062
+114090000000 114095635319 38030000000 38031878439 3670261632 3672140071
+114093000000 114098635625 38031000000 38032878541 3671261632 3673140173
+114096000000 114101635797 38032000000 38033878599 3672261632 3674140231
+114099000000 114104635930 38033000000 38034878643 3673261632 3675140275
+114102000000 114107636047 38034000000 38035878682 3674261632 3676140314
+114105000000 114110636232 38035000000 38036878744 3675261632 3677140376
+114108000000 114113636338 38036000000 38037878779 3676261632 3678140411
+114111000000 114116636519 38037000000 38038878839 3677261632 3679140471
+114114000000 114119636731 38038000000 38039878910 3678261632 3680140542
+114117000000 114122636838 38039000000 38040878946 3679261632 3681140578
+114120000000 114125637004 38040000000 38041879001 3680261632 3682140633
+114123000000 114128235749 38041000000 38042745249 3681261632 3683006881
+114126000000 114131637275 38042000000 38043879091 3682261632 3684140723
+114129000000 114134637387 38043000000 38044879129 3683261632 3685140761
+114132000000 114137637596 38044000000 38045879198 3684261632 3686140830
+114135000000 114140637675 38045000000 38046879225 3685261632 3687140857
+114138000000 114143637900 38046000000 38047879300 3686261632 3688140932
+114141000000 114146638027 38047000000 38048879342 3687261632 3689140974
+114144000000 114149638116 38048000000 38049879372 3688261632 3690141004
+114147000000 114152638222 38049000000 38050879407 3689261632 3691141039
+114150000000 114155638433 38050000000 38051879477 3690261632 3692141109
+114153000000 114158638642 38051000000 38052879547 3691261632 3693141179
+114156000000 114161638787 38052000000 38053879595 3692261632 3694141227
+114159000000 114164638913 38053000000 38054879637 3693261632 3695141269
+114162000000 114167639079 38054000000 38055879693 3694261632 3696141325
+114165000000 114170639159 38055000000 38056879719 3695261632 3697141351
+114168000000 114173639394 38056000000 38057879798 3696261632 3698141430
+114171000000 114176639553 38057000000 38058879851 3697261632 3699141483
+114174000000 114179639674 38058000000 38059879891 3698261632 3700141523
+114177000000 114182639834 38059000000 38060879944 3699261632 3701141576
+114180000000 114185639917 38060000000 38061879972 3700261632 3702141604
+114183000000 114188640163 38061000000 38062880054 3701261632 3703141686
+114186000000 114191640286 38062000000 38063880095 3702261632 3704141727
+114189000000 114194640422 38063000000 38064880140 3703261632 3705141772
+114192000000 114197640597 38064000000 38065880199 3704261632 3706141831
+114195000000 114200640719 38065000000 38066880239 3705261632 3707141871
+114198000000 114203640869 38066000000 38067880289 3706261632 3708141921
+114201000000 114206641017 38067000000 38068880339 3707261632 3709141971
+114204000000 114208814711 38068000000 38069604903 3708261632 3709866535
+114207000000 114212641337 38069000000 38070880445 3709261632 3711142077
+114210000000 114215641469 38070000000 38071880489 3710261632 3712142121
+114213000000 114218641643 38071000000 38072880547 3711261632 3713142179
+114216000000 114221641762 38072000000 38073880587 3712261632 3714142219
+114219000000 114224641886 38073000000 38074880628 3713261632 3715142260
+114222000000 114227642105 38074000000 38075880701 3714261632 3716142333
+114225000000 114230642241 38075000000 38076880747 3715261632 3717142379
+114228000000 114233642392 38076000000 38077880797 3716261632 3718142429
+114231000000 114236642542 38077000000 38078880847 3717261632 3719142479
+114234000000 114239642657 38078000000 38079880885 3718261632 3720142517
+114237000000 114242642754 38079000000 38080880918 3719261632 3721142550
+114240000000 114245642962 38080000000 38081880987 3720261632 3722142619
+114243000000 114248643117 38081000000 38082881039 3721261632 3723142671
+114246000000 114251643276 38082000000 38083881092 3722261632 3724142724
+114249000000 114254643450 38083000000 38084881150 3723261632 3725142782
+114252000000 114257643550 38084000000 38085881183 3724261632 3726142815
+114255000000 114260643728 38085000000 38086881242 3725261632 3727142874
+114258000000 114263643877 38086000000 38087881292 3726261632 3728142924
+114261000000 114266644005 38087000000 38088881335 3727261632 3729142967
+114264000000 114269644174 38088000000 38089881391 3728261632 3730143023
+114267000000 114272644294 38089000000 38090881431 3729261632 3731143063
+114270000000 114274471644 38090000000 38091490548 3730261632 3731752180
+114273000000 114278644544 38091000000 38092881514 3731261632 3733143146
+114276000000 114281644802 38092000000 38093881600 3732261632 3734143232
+114279000000 114284644907 38093000000 38094881635 3733261632 3735143267
+114282000000 114287644987 38094000000 38095881662 3734261632 3736143294
+114285000000 114290645134 38095000000 38096881711 3735261632 3737143343
+114288000000 114293645388 38096000000 38097881796 3736261632 3738143428
+114291000000 114296645478 38097000000 38098881826 3737261632 3739143458
+114294000000 114299645723 38098000000 38099881907 3738261632 3740143539
+114297000000 114302645801 38099000000 38100881933 3739261632 3741143565
+114300000000 114305645978 38100000000 38101881992 3740261632 3742143624
+114303000000 114308646124 38101000000 38102882041 3741261632 3743143673
+114306000000 114311646268 38102000000 38103882089 3742261632 3744143721
+114309000000 114313268922 38103000000 38104422974 3743261632 3744684606
+114312000000 114317646583 38104000000 38105882194 3744261632 3746143826
+114315000000 114320646743 38105000000 38106882247 3745261632 3747143879
+114318000000 114323646880 38106000000 38107882293 3746261632 3748143925
+114321000000 114326647038 38107000000 38108882346 3747261632 3749143978
+114324000000 114329647196 38108000000 38109882398 3748261632 3750144030
+114327000000 114332647310 38109000000 38110882436 3749261632 3751144068
+114330000000 114335647471 38110000000 38111882490 3750261632 3752144122
+114333000000 114338647598 38111000000 38112882532 3751261632 3753144164
+114336000000 114341647707 38112000000 38113882569 3752261632 3754144201
+114339000000 114344647849 38113000000 38114882616 3753261632 3755144248
+114342000000 114347648083 38114000000 38115882694 3754261632 3756144326
+114345000000 114350647996 38115000000 38116882665 3755261632 3757144297
+114348000000 114353648117 38116000000 38117882705 3756261632 3758144337
+114351000000 114356648225 38117000000 38118882741 3757261632 3759144373
+114354000000 114359648460 38118000000 38119882820 3758261632 3760144452
+114357000000 114362648639 38119000000 38120882879 3759261632 3761144511
+114360000000 114365562279 38120000000 38121854093 3760261632 3762115725
+114363000000 114368648908 38121000000 38122882969 3761261632 3763144601
+114366000000 114371649081 38122000000 38123883027 3762261632 3764144659
+114369000000 114374649197 38123000000 38124883065 3763261632 3765144697
+114372000000 114377649370 38124000000 38125883123 3764261632 3766144755
+114375000000 114380649542 38125000000 38126883180 3765261632 3767144812
+114378000000 114383649598 38126000000 38127883199 3766261632 3768144831
+114381000000 114386649744 38127000000 38128883248 3767261632 3769144880
+114384000000 114389649940 38128000000 38129883313 3768261632 3770144945
+114387000000 114392649969 38129000000 38130883323 3769261632 3771144955
+114390000000 114395650275 38130000000 38131883425 3770261632 3772145057
+114393000000 114398650447 38131000000 38132883482 3771261632 3773145114
+114396000000 114401650580 38132000000 38133883526 3772261632 3774145158
+114399000000 114404650697 38133000000 38134883565 3773261632 3775145197
+114402000000 114407650882 38134000000 38135883627 3774261632 3776145259
+114405000000 114410650988 38135000000 38136883662 3775261632 3777145294
+114408000000 114413651169 38136000000 38137883723 3776261632 3778145355
+114411000000 114416651381 38137000000 38138883793 3777261632 3779145425
+114414000000 114419651488 38138000000 38139883829 3778261632 3780145461
+114417000000 114422651654 38139000000 38140883884 3779261632 3781145516
+114420000000 114425250399 38140000000 38141750133 3780261632 3782011765
+114423000000 114428651925 38141000000 38142883975 3781261632 3783145607
+114426000000 114431652037 38142000000 38143884012 3782261632 3784145644
+114429000000 114434652246 38143000000 38144884082 3783261632 3785145714
+114432000000 114437652325 38144000000 38145884108 3784261632 3786145740
+114435000000 114440652550 38145000000 38146884183 3785261632 3787145815
+114438000000 114443652677 38146000000 38147884225 3786261632 3788145857
+114441000000 114446652766 38147000000 38148884255 3787261632 3789145887
+114444000000 114449652872 38148000000 38149884290 3788261632 3790145922
+114447000000 114452653083 38149000000 38150884361 3789261632 3791145993
+114450000000 114455653292 38150000000 38151884430 3790261632 3792146062
+114453000000 114458653437 38151000000 38152884479 3791261632 3793146111
+114456000000 114461653563 38152000000 38153884521 3792261632 3794146153
+114459000000 114464653729 38153000000 38154884576 3793261632 3795146208
+114462000000 114467653809 38154000000 38155884603 3794261632 3796146235
+114465000000 114470654044 38155000000 38156884681 3795261632 3797146313
+114468000000 114473654203 38156000000 38157884734 3796261632 3798146366
+114471000000 114476654324 38157000000 38158884774 3797261632 3799146406
+114474000000 114479654484 38158000000 38159884828 3798261632 3800146460
+114477000000 114482654567 38159000000 38160884855 3799261632 3801146487
+114480000000 114485654813 38160000000 38161884937 3800261632 3802146569
+114483000000 114488654936 38161000000 38162884978 3801261632 3803146610
+114486000000 114491655072 38162000000 38163885024 3802261632 3804146656
+114489000000 114494655247 38163000000 38164885082 3803261632 3805146714
+114492000000 114497655369 38164000000 38165885123 3804261632 3806146755
+114495000000 114500655519 38165000000 38166885173 3805261632 3807146805
+114498000000 114503655667 38166000000 38167885222 3806261632 3808146854
+114501000000 114505829361 38167000000 38168609787 3807261632 3808871419
+114504000000 114509655987 38168000000 38169885329 3808261632 3810146961
+114507000000 114512656119 38169000000 38170885373 3809261632 3811147005
+114510000000 114515656293 38170000000 38171885431 3810261632 3812147063
+114513000000 114518656412 38171000000 38172885470 3811261632 3813147102
+114516000000 114521656536 38172000000 38173885512 3812261632 3814147144
+114519000000 114524656755 38173000000 38174885585 3813261632 3815147217
+114522000000 114527656891 38174000000 38175885630 3814261632 3816147262
+114525000000 114530657042 38175000000 38176885680 3815261632 3817147312
+114528000000 114533657192 38176000000 38177885730 3816261632 3818147362
+114531000000 114536657307 38177000000 38178885769 3817261632 3819147401
+114534000000 114539657404 38178000000 38179885801 3818261632 3820147433
+114537000000 114542657612 38179000000 38180885870 3819261632 3821147502
+114540000000 114545657767 38180000000 38181885922 3820261632 3822147554
+114543000000 114548657926 38181000000 38182885975 3821261632 3823147607
+114546000000 114551658100 38182000000 38183886033 3822261632 3824147665
+114549000000 114554658200 38183000000 38184886066 3823261632 3825147698
+114552000000 114557658378 38184000000 38185886126 3824261632 3826147758
+114555000000 114560658527 38185000000 38186886175 3825261632 3827147807
+114558000000 114563658655 38186000000 38187886218 3826261632 3828147850
+114561000000 114566658824 38187000000 38188886274 3827261632 3829147906
+114564000000 114569658944 38188000000 38189886314 3828261632 3830147946
+114567000000 114571486294 38189000000 38190495431 3829261632 3830757063
+114570000000 114575659194 38190000000 38191886398 3830261632 3832148030
+114573000000 114578659452 38191000000 38192886484 3831261632 3833148116
+114576000000 114581659557 38192000000 38193886519 3832261632 3834148151
+114579000000 114584659637 38193000000 38194886545 3833261632 3835148177
+114582000000 114587659784 38194000000 38195886594 3834261632 3836148226
+114585000000 114590660038 38195000000 38196886679 3835261632 3837148311
+114588000000 114593660128 38196000000 38197886709 3836261632 3838148341
+114591000000 114596660373 38197000000 38198886791 3837261632 3839148423
+114594000000 114599660451 38198000000 38199886817 3838261632 3840148449
+114597000000 114602660628 38199000000 38200886876 3839261632 3841148508
+114600000000 114605660774 38200000000 38201886924 3840261632 3842148556
+114603000000 114608660918 38201000000 38202886972 3841261632 3843148604
+114606000000 114610283572 38202000000 38203427857 3842261632 3843689489
+114609000000 114614661233 38203000000 38204887077 3843261632 3845148709
+114612000000 114617661393 38204000000 38205887131 3844261632 3846148763
+114615000000 114620661530 38205000000 38206887176 3845261632 3847148808
+114618000000 114623661688 38206000000 38207887229 3846261632 3848148861
+114621000000 114626661846 38207000000 38208887282 3847261632 3849148914
+114624000000 114629661960 38208000000 38209887320 3848261632 3850148952
+114627000000 114632662121 38209000000 38210887373 3849261632 3851149005
+114630000000 114635662248 38210000000 38211887416 3850261632 3852149048
+114633000000 114638662357 38211000000 38212887452 3851261632 3853149084
+114636000000 114641662499 38212000000 38213887499 3852261632 3854149131
+114639000000 114644662733 38213000000 38214887577 3853261632 3855149209
+114642000000 114647662646 38214000000 38215887548 3854261632 3856149180
+114645000000 114650662767 38215000000 38216887589 3855261632 3857149221
+114648000000 114653662875 38216000000 38217887625 3856261632 3858149257
+114651000000 114656663110 38217000000 38218887703 3857261632 3859149335
+114654000000 114659663289 38218000000 38219887763 3858261632 3860149395
+114657000000 114662576929 38219000000 38220858976 3859261632 3861120608
+114660000000 114665663558 38220000000 38221887852 3860261632 3862149484
+114663000000 114668663731 38221000000 38222887910 3861261632 3863149542
+114666000000 114671663847 38222000000 38223887949 3862261632 3864149581
+114669000000 114674664020 38223000000 38224888006 3863261632 3865149638
+114672000000 114677664192 38224000000 38225888064 3864261632 3866149696
+114675000000 114680664248 38225000000 38226888082 3865261632 3867149714
+114678000000 114683664394 38226000000 38227888131 3866261632 3868149763
+114681000000 114686664590 38227000000 38228888196 3867261632 3869149828
+114684000000 114689664619 38228000000 38229888206 3868261632 3870149838
+114687000000 114692664925 38229000000 38230888308 3869261632 3871149940
+114690000000 114695665097 38230000000 38231888365 3870261632 3872149997
+114693000000 114698665230 38231000000 38232888410 3871261632 3873150042
+114696000000 114701665347 38232000000 38233888449 3872261632 3874150081
+114699000000 114704665532 38233000000 38234888510 3873261632 3875150142
+114702000000 114707665638 38234000000 38235888546 3874261632 3876150178
+114705000000 114710665819 38235000000 38236888606 3875261632 3877150238
+114708000000 114713666031 38236000000 38237888677 3876261632 3878150309
+114711000000 114716666138 38237000000 38238888712 3877261632 3879150344
+114714000000 114719666304 38238000000 38239888768 3878261632 3880150400
+114717000000 114722265049 38239000000 38240755016 3879261632 3881016648
+114720000000 114725666575 38240000000 38241888858 3880261632 3882150490
+114723000000 114728666687 38241000000 38242888895 3881261632 3883150527
+114726000000 114731666896 38242000000 38243888965 3882261632 3884150597
+114729000000 114734666975 38243000000 38244888991 3883261632 3885150623
+114732000000 114737667200 38244000000 38245889066 3884261632 3886150698
+114735000000 114740667327 38245000000 38246889109 3885261632 3887150741
+114738000000 114743667416 38246000000 38247889138 3886261632 3888150770
+114741000000 114746667522 38247000000 38248889174 3887261632 3889150806
+114744000000 114749667733 38248000000 38249889244 3888261632 3890150876
+114747000000 114752667942 38249000000 38250889314 3889261632 3891150946
+114750000000 114755668087 38250000000 38251889362 3890261632 3892150994
+114753000000 114758668213 38251000000 38252889404 3891261632 3893151036
+114756000000 114761668379 38252000000 38253889459 3892261632 3894151091
+114759000000 114764668459 38253000000 38254889486 3893261632 3895151118
+114762000000 114767668694 38254000000 38255889564 3894261632 3896151196
+114765000000 114770668853 38255000000 38256889617 3895261632 3897151249
+114768000000 114773668974 38256000000 38257889658 3896261632 3898151290
+114771000000 114776669134 38257000000 38258889711 3897261632 3899151343
+114774000000 114779669217 38258000000 38259889739 3898261632 3900151371
+114777000000 114782669463 38259000000 38260889821 3899261632 3901151453
+114780000000 114785669586 38260000000 38261889862 3900261632 3902151494
+114783000000 114788669722 38261000000 38262889907 3901261632 3903151539
+114786000000 114791669897 38262000000 38263889965 3902261632 3904151597
+114789000000 114794670019 38263000000 38264890006 3903261632 3905151638
+114792000000 114797670169 38264000000 38265890056 3904261632 3906151688
+114795000000 114800670317 38265000000 38266890105 3905261632 3907151737
+114798000000 114802844011 38266000000 38267614670 3906261632 3907876302
+114801000000 114806670637 38267000000 38268890212 3907261632 3909151844
+114804000000 114809670769 38268000000 38269890256 3908261632 3910151888
+114807000000 114812670943 38269000000 38270890314 3909261632 3911151946
+114810000000 114815671062 38270000000 38271890354 3910261632 3912151986
+114813000000 114818671186 38271000000 38272890395 3911261632 3913152027
+114816000000 114821671405 38272000000 38273890468 3912261632 3914152100
+114819000000 114824671541 38273000000 38274890513 3913261632 3915152145
+114822000000 114827671692 38274000000 38275890564 3914261632 3916152196
+114825000000 114830671842 38275000000 38276890614 3915261632 3917152246
+114828000000 114833671957 38276000000 38277890652 3916261632 3918152284
+114831000000 114836672054 38277000000 38278890684 3917261632 3919152316
+114834000000 114839672262 38278000000 38279890754 3918261632 3920152386
+114837000000 114842672417 38279000000 38280890805 3919261632 3921152437
+114840000000 114845672576 38280000000 38281890858 3920261632 3922152490
+114843000000 114848672750 38281000000 38282890916 3921261632 3923152548
+114846000000 114851672850 38282000000 38283890950 3922261632 3924152582
+114849000000 114854673028 38283000000 38284891009 3923261632 3925152641
+114852000000 114857673177 38284000000 38285891059 3924261632 3926152691
+114855000000 114860673305 38285000000 38286891101 3925261632 3927152733
+114858000000 114863673474 38286000000 38287891158 3926261632 3928152790
+114861000000 114866673594 38287000000 38288891198 3927261632 3929152830
+114864000000 114868500944 38288000000 38289500314 3928261632 3929761946
+114867000000 114872673844 38289000000 38290891281 3929261632 3931152913
+114870000000 114875674102 38290000000 38291891367 3930261632 3932152999
+114873000000 114878674207 38291000000 38292891402 3931261632 3933153034
+114876000000 114881674287 38292000000 38293891429 3932261632 3934153061
+114879000000 114884674434 38293000000 38294891478 3933261632 3935153110
+114882000000 114887674688 38294000000 38295891562 3934261632 3936153194
+114885000000 114890674778 38295000000 38296891592 3935261632 3937153224
+114888000000 114893675023 38296000000 38297891674 3936261632 3938153306
+114891000000 114896675101 38297000000 38298891700 3937261632 3939153332
+114894000000 114899675278 38298000000 38299891759 3938261632 3940153391
+114897000000 114902675424 38299000000 38300891808 3939261632 3941153440
+114900000000 114905675568 38300000000 38301891856 3940261632 3942153488
+114903000000 114907298222 38301000000 38302432740 3941261632 3942694372
+114906000000 114911675883 38302000000 38303891961 3942261632 3944153593
+114909000000 114914676043 38303000000 38304892014 3943261632 3945153646
+114912000000 114917676180 38304000000 38305892060 3944261632 3946153692
+114915000000 114920676338 38305000000 38306892112 3945261632 3947153744
+114918000000 114923676496 38306000000 38307892165 3946261632 3948153797
+114921000000 114926676610 38307000000 38308892203 3947261632 3949153835
+114924000000 114929676771 38308000000 38309892257 3948261632 3950153889
+114927000000 114932676898 38309000000 38310892299 3949261632 3951153931
+114930000000 114935677007 38310000000 38311892335 3950261632 3952153967
+114933000000 114938677149 38311000000 38312892383 3951261632 3953154015
+114936000000 114941677383 38312000000 38313892461 3952261632 3954154093
+114939000000 114944677296 38313000000 38314892432 3953261632 3955154064
+114942000000 114947677417 38314000000 38315892472 3954261632 3956154104
+114945000000 114950677525 38315000000 38316892508 3955261632 3957154140
+114948000000 114953677760 38316000000 38317892586 3956261632 3958154218
+114951000000 114956677939 38317000000 38318892646 3957261632 3959154278
+114954000000 114959591579 38318000000 38319863859 3958261632 3960125491
+114957000000 114962678208 38319000000 38320892736 3959261632 3961154368
+114960000000 114965678381 38320000000 38321892793 3960261632 3962154425
+114963000000 114968678497 38321000000 38322892832 3961261632 3963154464
+114966000000 114971678670 38322000000 38323892890 3962261632 3964154522
+114969000000 114974678842 38323000000 38324892947 3963261632 3965154579
+114972000000 114977678898 38324000000 38325892966 3964261632 3966154598
+114975000000 114980679044 38325000000 38326893014 3965261632 3967154646
+114978000000 114983679240 38326000000 38327893080 3966261632 3968154712
+114981000000 114986679269 38327000000 38328893089 3967261632 3969154721
+114984000000 114989679575 38328000000 38329893191 3968261632 3970154823
+114987000000 114992679747 38329000000 38330893249 3969261632 3971154881
+114990000000 114995679880 38330000000 38331893293 3970261632 3972154925
+114993000000 114998679997 38331000000 38332893332 3971261632 3973154964
+114996000000 115001680182 38332000000 38333893394 3972261632 3974155026
+114999000000 115004680288 38333000000 38334893429 3973261632 3975155061
+115002000000 115007680469 38334000000 38335893489 3974261632 3976155121
+115005000000 115010680681 38335000000 38336893560 3975261632 3977155192
+115008000000 115013680788 38336000000 38337893596 3976261632 3978155228
+115011000000 115016680954 38337000000 38338893651 3977261632 3979155283
+115014000000 115019279699 38338000000 38339759899 3978261632 3980021531
+115017000000 115022681225 38339000000 38340893741 3979261632 3981155373
+115020000000 115025681337 38340000000 38341893779 3980261632 3982155411
+115023000000 115028681546 38341000000 38342893848 3981261632 3983155480
+115026000000 115031681625 38342000000 38343893875 3982261632 3984155507
+115029000000 115034681850 38343000000 38344893950 3983261632 3985155582
+115032000000 115037681977 38344000000 38345893992 3984261632 3986155624
+115035000000 115040682066 38345000000 38346894022 3985261632 3987155654
+115038000000 115043682172 38346000000 38347894057 3986261632 3988155689
+115041000000 115046682383 38347000000 38348894127 3987261632 3989155759
+115044000000 115049682592 38348000000 38349894197 3988261632 3990155829
+115047000000 115052682737 38349000000 38350894245 3989261632 3991155877
+115050000000 115055682863 38350000000 38351894287 3990261632 3992155919
+115053000000 115058683029 38351000000 38352894343 3991261632 3993155975
+115056000000 115061683109 38352000000 38353894369 3992261632 3994156001
+115059000000 115064683344 38353000000 38354894448 3993261632 3995156080
+115062000000 115067683503 38354000000 38355894501 3994261632 3996156133
+115065000000 115070683624 38355000000 38356894541 3995261632 3997156173
+115068000000 115073683784 38356000000 38357894594 3996261632 3998156226
+115071000000 115076683867 38357000000 38358894622 3997261632 3999156254
+115074000000 115079684113 38358000000 38359894704 3998261632 4000156336
+115077000000 115082684236 38359000000 38360894745 3999261632 4001156377
+115080000000 115085684372 38360000000 38361894790 4000261632 4002156422
+115083000000 115088684547 38361000000 38362894849 4001261632 4003156481
+115086000000 115091684669 38362000000 38363894889 4002261632 4004156521
+115089000000 115094684819 38363000000 38364894939 4003261632 4005156571
+115092000000 115097684967 38364000000 38365894989 4004261632 4006156621
+115095000000 115099858661 38365000000 38366619553 4005261632 4006881185
+115098000000 115103685287 38366000000 38367895095 4006261632 4008156727
+115101000000 115106685419 38367000000 38368895139 4007261632 4009156771
+115104000000 115109685593 38368000000 38369895197 4008261632 4010156829
+115107000000 115112685712 38369000000 38370895237 4009261632 4011156869
+115110000000 115115685836 38370000000 38371895278 4010261632 4012156910
+115113000000 115118686055 38371000000 38372895351 4011261632 4013156983
+115116000000 115121686191 38372000000 38373895397 4012261632 4014157029
+115119000000 115124686342 38373000000 38374895447 4013261632 4015157079
+115122000000 115127686492 38374000000 38375895497 4014261632 4016157129
+115125000000 115130686607 38375000000 38376895535 4015261632 4017157167
+115128000000 115133686704 38376000000 38377895568 4016261632 4018157200
+115131000000 115136686912 38377000000 38378895637 4017261632 4019157269
+115134000000 115139687067 38378000000 38379895689 4018261632 4020157321
+115137000000 115142687226 38379000000 38380895742 4019261632 4021157374
+115140000000 115145687400 38380000000 38381895800 4020261632 4022157432
+115143000000 115148687500 38381000000 38382895833 4021261632 4023157465
+115146000000 115151687678 38382000000 38383895892 4022261632 4024157524
+115149000000 115154687827 38383000000 38384895942 4023261632 4025157574
+115152000000 115157687955 38384000000 38385895985 4024261632 4026157617
+115155000000 115160688124 38385000000 38386896041 4025261632 4027157673
+115158000000 115163688244 38386000000 38387896081 4026261632 4028157713
+115161000000 115165515594 38387000000 38388505198 4027261632 4028766830
+115164000000 115169688494 38388000000 38389896164 4028261632 4030157796
+115167000000 115172688752 38389000000 38390896250 4029261632 4031157882
+115170000000 115175688857 38390000000 38391896285 4030261632 4032157917
+115173000000 115178688937 38391000000 38392896312 4031261632 4033157944
+115176000000 115181689084 38392000000 38393896361 4032261632 4034157993
+115179000000 115184689338 38393000000 38394896446 4033261632 4035158078
+115182000000 115187689428 38394000000 38395896476 4034261632 4036158108
+115185000000 115190689673 38395000000 38396896557 4035261632 4037158189
+115188000000 115193689751 38396000000 38397896583 4036261632 4038158215
+115191000000 115196689928 38397000000 38398896642 4037261632 4039158274
+115194000000 115199690074 38398000000 38399896691 4038261632 4040158323
+115197000000 115202690218 38399000000 38400896739 4039261632 4041158371
+115200000000 115204312872 38400000000 38401437624 4040261632 4041699256
+115203000000 115208690533 38401000000 38402896844 4041261632 4043158476
+115206000000 115211690693 38402000000 38403896897 4042261632 4044158529
+115209000000 115214690830 38403000000 38404896943 4043261632 4045158575
+115212000000 115217690988 38404000000 38405896996 4044261632 4046158628
+115215000000 115220691146 38405000000 38406897048 4045261632 4047158680
+115218000000 115223691260 38406000000 38407897086 4046261632 4048158718
+115221000000 115226691421 38407000000 38408897140 4047261632 4049158772
+115224000000 115229691548 38408000000 38409897182 4048261632 4050158814
+115227000000 115232691657 38409000000 38410897219 4049261632 4051158851
+115230000000 115235691799 38410000000 38411897266 4050261632 4052158898
+115233000000 115238692033 38411000000 38412897344 4051261632 4053158976
+115236000000 115241691946 38412000000 38413897315 4052261632 4054158947
+115239000000 115244692067 38413000000 38414897355 4053261632 4055158987
+115242000000 115247692175 38414000000 38415897391 4054261632 4056159023
+115245000000 115250692410 38415000000 38416897470 4055261632 4057159102
+115248000000 115253692589 38416000000 38417897529 4056261632 4058159161
+115251000000 115256606229 38417000000 38418868743 4057261632 4059130375
+115254000000 115259692858 38418000000 38419897619 4058261632 4060159251
+115257000000 115262693031 38419000000 38420897677 4059261632 4061159309
+115260000000 115265693147 38420000000 38421897715 4060261632 4062159347
+115263000000 115268693320 38421000000 38422897773 4061261632 4063159405
+115266000000 115271693492 38422000000 38423897830 4062261632 4064159462
+115269000000 115274693548 38423000000 38424897849 4063261632 4065159481
+115272000000 115277693694 38424000000 38425897898 4064261632 4066159530
+115275000000 115280693890 38425000000 38426897963 4065261632 4067159595
+115278000000 115283693919 38426000000 38427897973 4066261632 4068159605
+115281000000 115286694225 38427000000 38428898075 4067261632 4069159707
+115284000000 115289694397 38428000000 38429898132 4068261632 4070159764
+115287000000 115292694530 38429000000 38430898176 4069261632 4071159808
+115290000000 115295694647 38430000000 38431898215 4070261632 4072159847
+115293000000 115298694832 38431000000 38432898277 4071261632 4073159909
+115296000000 115301694938 38432000000 38433898312 4072261632 4074159944
+115299000000 115304695119 38433000000 38434898373 4073261632 4075160005
+115302000000 115307695331 38434000000 38435898443 4074261632 4076160075
+115305000000 115310695438 38435000000 38436898479 4075261632 4077160111
+115308000000 115313695604 38436000000 38437898534 4076261632 4078160166
+115311000000 115316294349 38437000000 38438764783 4077261632 4079026415
+115314000000 115319695875 38438000000 38439898625 4078261632 4080160257
+115317000000 115322695987 38439000000 38440898662 4079261632 4081160294
+115320000000 115325696196 38440000000 38441898732 4080261632 4082160364
+115323000000 115328696275 38441000000 38442898758 4081261632 4083160390
+115326000000 115331696500 38442000000 38443898833 4082261632 4084160465
+115329000000 115334696627 38443000000 38444898875 4083261632 4085160507
+115332000000 115337696716 38444000000 38445898905 4084261632 4086160537
+115335000000 115340696822 38445000000 38446898940 4085261632 4087160572
+115338000000 115343697033 38446000000 38447899011 4086261632 4088160643
+115341000000 115346697242 38447000000 38448899080 4087261632 4089160712
+115344000000 115349697387 38448000000 38449899129 4088261632 4090160761
+115347000000 115352697513 38449000000 38450899171 4089261632 4091160803
+115350000000 115355697679 38450000000 38451899226 4090261632 4092160858
+115353000000 115358697759 38451000000 38452899253 4091261632 4093160885
+115356000000 115361697994 38452000000 38453899331 4092261632 4094160963
+115359000000 115364698153 38453000000 38454899384 4093261632 4095161016
+115362000000 115367698274 38454000000 38455899424 4094261632 4096161056
+115365000000 115370698434 38455000000 38456899478 4095261632 4097161110
+115368000000 115373698517 38456000000 38457899505 4096261632 4098161137
+115371000000 115376698763 38457000000 38458899587 4097261632 4099161219
+115374000000 115379698886 38458000000 38459899628 4098261632 4100161260
+115377000000 115382699022 38459000000 38460899674 4099261632 4101161306
+115380000000 115385699197 38460000000 38461899732 4100261632 4102161364
+115383000000 115388699319 38461000000 38462899773 4101261632 4103161405
+115386000000 115391699469 38462000000 38463899823 4102261632 4104161455
+115389000000 115394699617 38463000000 38464899872 4103261632 4105161504
+115392000000 115396873311 38464000000 38465624437 4104261632 4105886069
+115395000000 115400699937 38465000000 38466899979 4105261632 4107161611
+115398000000 115403700069 38466000000 38467900023 4106261632 4108161655
+115401000000 115406700243 38467000000 38468900081 4107261632 4109161713
+115404000000 115409700362 38468000000 38469900120 4108261632 4110161752
+115407000000 115412700486 38469000000 38470900162 4109261632 4111161794
+115410000000 115415700705 38470000000 38471900235 4110261632 4112161867
+115413000000 115418700841 38471000000 38472900280 4111261632 4113161912
+115416000000 115421700992 38472000000 38473900330 4112261632 4114161962
+115419000000 115424701142 38473000000 38474900380 4113261632 4115162012
+115422000000 115427701257 38474000000 38475900419 4114261632 4116162051
+115425000000 115430701354 38475000000 38476900451 4115261632 4117162083
+115428000000 115433701562 38476000000 38477900520 4116261632 4118162152
+115431000000 115436701717 38477000000 38478900572 4117261632 4119162204
+115434000000 115439701876 38478000000 38479900625 4118261632 4120162257
+115437000000 115442702050 38479000000 38480900683 4119261632 4121162315
+115440000000 115445702150 38480000000 38481900716 4120261632 4122162348
+115443000000 115448702328 38481000000 38482900776 4121261632 4123162408
+115446000000 115451702477 38482000000 38483900825 4122261632 4124162457
+115449000000 115454702605 38483000000 38484900868 4123261632 4125162500
+115452000000 115457702774 38484000000 38485900924 4124261632 4126162556
+115455000000 115460702894 38485000000 38486900964 4125261632 4127162596
+115458000000 115462530244 38486000000 38487510081 4126261632 4127771713
+115461000000 115466703144 38487000000 38488901048 4127261632 4129162680
+115464000000 115469703402 38488000000 38489901134 4128261632 4130162766
+115467000000 115472703507 38489000000 38490901169 4129261632 4131162801
+115470000000 115475703587 38490000000 38491901195 4130261632 4132162827
+115473000000 115478703734 38491000000 38492901244 4131261632 4133162876
+115476000000 115481703988 38492000000 38493901329 4132261632 4134162961
+115479000000 115484704078 38493000000 38494901359 4133261632 4135162991
+115482000000 115487704323 38494000000 38495901441 4134261632 4136163073
+115485000000 115490704401 38495000000 38496901467 4135261632 4137163099
+115488000000 115493704578 38496000000 38497901526 4136261632 4138163158
+115491000000 115496704724 38497000000 38498901574 4137261632 4139163206
+115494000000 115499704868 38498000000 38499901622 4138261632 4140163254
+115497000000 115501327522 38499000000 38500442507 4139261632 4140704139
+115500000000 115505705183 38500000000 38501901727 4140261632 4142163359
+115503000000 115508705343 38501000000 38502901781 4141261632 4143163413
+115506000000 115511705480 38502000000 38503901826 4142261632 4144163458
+115509000000 115514705638 38503000000 38504901879 4143261632 4145163511
+115512000000 115517705796 38504000000 38505901932 4144261632 4146163564
+115515000000 115520705910 38505000000 38506901970 4145261632 4147163602
+115518000000 115523706071 38506000000 38507902023 4146261632 4148163655
+115521000000 115526706198 38507000000 38508902066 4147261632 4149163698
+115524000000 115529706307 38508000000 38509902102 4148261632 4150163734
+115527000000 115532706449 38509000000 38510902149 4149261632 4151163781
+115530000000 115535706683 38510000000 38511902227 4150261632 4152163859
+115533000000 115538706596 38511000000 38512902198 4151261632 4153163830
+115536000000 115541706717 38512000000 38513902239 4152261632 4154163871
+115539000000 115544706825 38513000000 38514902275 4153261632 4155163907
+115542000000 115547707060 38514000000 38515902353 4154261632 4156163985
+115545000000 115550707239 38515000000 38516902413 4155261632 4157164045
+115548000000 115553620879 38516000000 38517873626 4156261632 4158135258
+115551000000 115556707508 38517000000 38518902502 4157261632 4159164134
+115554000000 115559707681 38518000000 38519902560 4158261632 4160164192
+115557000000 115562707797 38519000000 38520902599 4159261632 4161164231
+115560000000 115565707970 38520000000 38521902656 4160261632 4162164288
+115563000000 115568708142 38521000000 38522902714 4161261632 4163164346
+115566000000 115571708198 38522000000 38523902732 4162261632 4164164364
+115569000000 115574708344 38523000000 38524902781 4163261632 4165164413
+115572000000 115577708540 38524000000 38525902846 4164261632 4166164478
+115575000000 115580708569 38525000000 38526902856 4165261632 4167164488
+115578000000 115583708875 38526000000 38527902958 4166261632 4168164590
+115581000000 115586709047 38527000000 38528903015 4167261632 4169164647
+115584000000 115589709180 38528000000 38529903060 4168261632 4170164692
+115587000000 115592709297 38529000000 38530903099 4169261632 4171164731
+115590000000 115595709482 38530000000 38531903160 4170261632 4172164792
+115593000000 115598709588 38531000000 38532903196 4171261632 4173164828
+115596000000 115601709769 38532000000 38533903256 4172261632 4174164888
+115599000000 115604709981 38533000000 38534903327 4173261632 4175164959
+115602000000 115607710088 38534000000 38535903362 4174261632 4176164994
+115605000000 115610710254 38535000000 38536903418 4175261632 4177165050
+115608000000 115613308999 38536000000 38537769666 4176261632 4178031298
+115611000000 115616710525 38537000000 38538903508 4177261632 4179165140
+115614000000 115619710637 38538000000 38539903545 4178261632 4180165177
+115617000000 115622710846 38539000000 38540903615 4179261632 4181165247
+115620000000 115625710925 38540000000 38541903641 4180261632 4182165273
+115623000000 115628711150 38541000000 38542903716 4181261632 4183165348
+115626000000 115631711277 38542000000 38543903759 4182261632 4184165391
+115629000000 115634711366 38543000000 38544903788 4183261632 4185165420
+115632000000 115637711472 38544000000 38545903824 4184261632 4186165456
+115635000000 115640711683 38545000000 38546903894 4185261632 4187165526
+115638000000 115643711892 38546000000 38547903964 4186261632 4188165596
+115641000000 115646712037 38547000000 38548904012 4187261632 4189165644
+115644000000 115649712163 38548000000 38549904054 4188261632 4190165686
+115647000000 115652712329 38549000000 38550904109 4189261632 4191165741
+115650000000 115655712409 38550000000 38551904136 4190261632 4192165768
+115653000000 115658712644 38551000000 38552904214 4191261632 4193165846
+115656000000 115661712803 38552000000 38553904267 4192261632 4194165899
+115659000000 115664712924 38553000000 38554904308 4193261632 4195165940
+115662000000 115667713084 38554000000 38555904361 4194261632 4196165993
+115665000000 115670713167 38555000000 38556904389 4195261632 4197166021
+115668000000 115673713413 38556000000 38557904471 4196261632 4198166103
+115671000000 115676713536 38557000000 38558904512 4197261632 4199166144
+115674000000 115679713672 38558000000 38559904557 4198261632 4200166189
+115677000000 115682713847 38559000000 38560904615 4199261632 4201166247
+115680000000 115685713969 38560000000 38561904656 4200261632 4202166288
+115683000000 115688714119 38561000000 38562904706 4201261632 4203166338
+115686000000 115691714267 38562000000 38563904755 4202261632 4204166387
+115689000000 115693887961 38563000000 38564629320 4203261632 4204890952
+115692000000 115697714587 38564000000 38565904862 4204261632 4206166494
+115695000000 115700714719 38565000000 38566904906 4205261632 4207166538
+115698000000 115703714893 38566000000 38567904964 4206261632 4208166596
+115701000000 115706715012 38567000000 38568905004 4207261632 4209166636
+115704000000 115709715136 38568000000 38569905045 4208261632 4210166677
+115707000000 115712715355 38569000000 38570905118 4209261632 4211166750
+115710000000 115715715491 38570000000 38571905163 4210261632 4212166795
+115713000000 115718715642 38571000000 38572905214 4211261632 4213166846
+115716000000 115721715792 38572000000 38573905264 4212261632 4214166896
+115719000000 115724715907 38573000000 38574905302 4213261632 4215166934
+115722000000 115727716004 38574000000 38575905334 4214261632 4216166966
+115725000000 115730716212 38575000000 38576905404 4215261632 4217167036
+115728000000 115733716367 38576000000 38577905455 4216261632 4218167087
+115731000000 115736716526 38577000000 38578905508 4217261632 4219167140
+115734000000 115739716700 38578000000 38579905566 4218261632 4220167198
+115737000000 115742716800 38579000000 38580905600 4219261632 4221167232
+115740000000 115745716978 38580000000 38581905659 4220261632 4222167291
+115743000000 115748717127 38581000000 38582905709 4221261632 4223167341
+115746000000 115751717255 38582000000 38583905751 4222261632 4224167383
+115749000000 115754717424 38583000000 38584905808 4223261632 4225167440
+115752000000 115757717544 38584000000 38585905848 4224261632 4226167480
+115755000000 115759544894 38585000000 38586514964 4225261632 4226776596
+115758000000 115763717794 38586000000 38587905931 4226261632 4228167563
+115761000000 115766718052 38587000000 38588906017 4227261632 4229167649
+115764000000 115769718157 38588000000 38589906052 4228261632 4230167684
+115767000000 115772718237 38589000000 38590906079 4229261632 4231167711
+115770000000 115775718384 38590000000 38591906128 4230261632 4232167760
+115773000000 115778718638 38591000000 38592906212 4231261632 4233167844
+115776000000 115781718728 38592000000 38593906242 4232261632 4234167874
+115779000000 115784718973 38593000000 38594906324 4233261632 4235167956
+115782000000 115787719051 38594000000 38595906350 4234261632 4236167982
+115785000000 115790719228 38595000000 38596906409 4235261632 4237168041
+115788000000 115793719374 38596000000 38597906458 4236261632 4238168090
+115791000000 115796719518 38597000000 38598906506 4237261632 4239168138
+115794000000 115798342172 38598000000 38599447390 4238261632 4239709022
+115797000000 115802719833 38599000000 38600906611 4239261632 4241168243
+115800000000 115805719993 38600000000 38601906664 4240261632 4242168296
+115803000000 115808720130 38601000000 38602906710 4241261632 4243168342
+115806000000 115811720288 38602000000 38603906762 4242261632 4244168394
+115809000000 115814720446 38603000000 38604906815 4243261632 4245168447
+115812000000 115817720560 38604000000 38605906853 4244261632 4246168485
+115815000000 115820720721 38605000000 38606906907 4245261632 4247168539
+115818000000 115823720848 38606000000 38607906949 4246261632 4248168581
+115821000000 115826720957 38607000000 38608906985 4247261632 4249168617
+115824000000 115829721099 38608000000 38609907033 4248261632 4250168665
+115827000000 115832721333 38609000000 38610907111 4249261632 4251168743
+115830000000 115835721246 38610000000 38611907082 4250261632 4252168714
+115833000000 115838721367 38611000000 38612907122 4251261632 4253168754
+115836000000 115841721475 38612000000 38613907158 4252261632 4254168790
+115839000000 115844721710 38613000000 38614907236 4253261632 4255168868
+115842000000 115847721889 38614000000 38615907296 4254261632 4256168928
+115845000000 115850635529 38615000000 38616878509 4255261632 4257140141
+115848000000 115853722158 38616000000 38617907386 4256261632 4258169018
+115851000000 115856722331 38617000000 38618907443 4257261632 4259169075
+115854000000 115859722447 38618000000 38619907482 4258261632 4260169114
+115857000000 115862722620 38619000000 38620907540 4259261632 4261169172
+115860000000 115865722792 38620000000 38621907597 4260261632 4262169229
+115863000000 115868722848 38621000000 38622907616 4261261632 4263169248
+115866000000 115871722994 38622000000 38623907664 4262261632 4264169296
+115869000000 115874723190 38623000000 38624907730 4263261632 4265169362
+115872000000 115877723219 38624000000 38625907739 4264261632 4266169371
+115875000000 115880723525 38625000000 38626907841 4265261632 4267169473
+115878000000 115883723697 38626000000 38627907899 4266261632 4268169531
+115881000000 115886723830 38627000000 38628907943 4267261632 4269169575
+115884000000 115889723947 38628000000 38629907982 4268261632 4270169614
+115887000000 115892724132 38629000000 38630908044 4269261632 4271169676
+115890000000 115895724238 38630000000 38631908079 4270261632 4272169711
+115893000000 115898724419 38631000000 38632908139 4271261632 4273169771
+115896000000 115901724631 38632000000 38633908210 4272261632 4274169842
+115899000000 115904724738 38633000000 38634908246 4273261632 4275169878
+115902000000 115907724904 38634000000 38635908301 4274261632 4276169933
+115905000000 115910323649 38635000000 38636774549 4275261632 4277036181
+115908000000 115913725175 38636000000 38637908391 4276261632 4278170023
+115911000000 115916725287 38637000000 38638908429 4277261632 4279170061
+115914000000 115919725496 38638000000 38639908498 4278261632 4280170130
+115917000000 115922725575 38639000000 38640908525 4279261632 4281170157
+115920000000 115925725800 38640000000 38641908600 4280261632 4282170232
+115923000000 115928725927 38641000000 38642908642 4281261632 4283170274
+115926000000 115931726016 38642000000 38643908672 4282261632 4284170304
+115929000000 115934726122 38643000000 38644908707 4283261632 4285170339
+115932000000 115937726333 38644000000 38645908777 4284261632 4286170409
+115935000000 115940726542 38645000000 38646908847 4285261632 4287170479
+115938000000 115943726687 38646000000 38647908895 4286261632 4288170527
+115941000000 115946726813 38647000000 38648908937 4287261632 4289170569
+115944000000 115949726979 38648000000 38649908993 4288261632 4290170625
+115947000000 115952727059 38649000000 38650909019 4289261632 4291170651
+115950000000 115955727294 38650000000 38651909098 4290261632 4292170730
+115953000000 115958727453 38651000000 38652909151 4291261632 4293170783
+115956000000 115961727574 38652000000 38653909191 4292261632 4294170823
+115959000000 115964727734 38653000000 38654909244 4293261632 203580
+115962000000 115967727817 38654000000 38655909272 4294261632 1203608
+115965000000 115970728063 38655000000 38656909354 294336 2203690
+115968000000 115973728186 38656000000 38657909395 1294336 3203731
+115971000000 115976728322 38657000000 38658909440 2294336 4203776
+115974000000 115979728497 38658000000 38659909499 3294336 5203835
+115977000000 115982728619 38659000000 38660909539 4294336 6203875
+115980000000 115985728769 38660000000 38661909589 5294336 7203925
+115983000000 115988728917 38661000000 38662909639 6294336 8203975
+115986000000 115990902611 38662000000 38663634203 7294336 8928539
+115989000000 115994729237 38663000000 38664909745 8294336 10204081
+115992000000 115997729369 38664000000 38665909789 9294336 11204125
+115995000000 116000729543 38665000000 38666909847 10294336 12204183
+115998000000 116003729662 38666000000 38667909887 11294336 13204223
+116001000000 116006729786 38667000000 38668909928 12294336 14204264
+116004000000 116009730005 38668000000 38669910001 13294336 15204337
+116007000000 116012730141 38669000000 38670910047 14294336 16204383
+116010000000 116015730292 38670000000 38671910097 15294336 17204433
+116013000000 116018730442 38671000000 38672910147 16294336 18204483
+116016000000 116021730557 38672000000 38673910185 17294336 19204521
+116019000000 116024730654 38673000000 38674910218 18294336 20204554
+116022000000 116027730862 38674000000 38675910287 19294336 21204623
+116025000000 116030731017 38675000000 38676910339 20294336 22204675
+116028000000 116033731176 38676000000 38677910392 21294336 23204728
+116031000000 116036731350 38677000000 38678910450 22294336 24204786
+116034000000 116039731450 38678000000 38679910483 23294336 25204819
+116037000000 116042731628 38679000000 38680910542 24294336 26204878
+116040000000 116045731777 38680000000 38681910592 25294336 27204928
+116043000000 116048731905 38681000000 38682910635 26294336 28204971
+116046000000 116051732074 38682000000 38683910691 27294336 29205027
+116049000000 116054732194 38683000000 38684910731 28294336 30205067
+116052000000 116056559544 38684000000 38685519848 29294336 30814184
+116055000000 116060732444 38685000000 38686910814 30294336 32205150
+116058000000 116063732702 38686000000 38687910900 31294336 33205236
+116061000000 116066732807 38687000000 38688910935 32294336 34205271
+116064000000 116069732887 38688000000 38689910962 33294336 35205298
+116067000000 116072733034 38689000000 38690911011 34294336 36205347
+116070000000 116075733288 38690000000 38691911096 35294336 37205432
+116073000000 116078733378 38691000000 38692911126 36294336 38205462
+116076000000 116081733623 38692000000 38693911207 37294336 39205543
+116079000000 116084733701 38693000000 38694911233 38294336 40205569
+116082000000 116087733878 38694000000 38695911292 39294336 41205628
+116085000000 116090734024 38695000000 38696911341 40294336 42205677
+116088000000 116093734168 38696000000 38697911389 41294336 43205725
+116091000000 116095356822 38697000000 38698452274 42294336 43746610
+116094000000 116099734483 38698000000 38699911494 43294336 45205830
+116097000000 116102734643 38699000000 38700911547 44294336 46205883
+116100000000 116105734780 38700000000 38701911593 45294336 47205929
+116103000000 116108734938 38701000000 38702911646 46294336 48205982
+116106000000 116111735096 38702000000 38703911698 47294336 49206034
+116109000000 116114735210 38703000000 38704911736 48294336 50206072
+116112000000 116117735371 38704000000 38705911790 49294336 51206126
+116115000000 116120735498 38705000000 38706911832 50294336 52206168
+116118000000 116123735607 38706000000 38707911869 51294336 53206205
+116121000000 116126735749 38707000000 38708911916 52294336 54206252
+116124000000 116129735983 38708000000 38709911994 53294336 55206330
+116127000000 116132735896 38709000000 38710911965 54294336 56206301
+116130000000 116135736017 38710000000 38711912005 55294336 57206341
+116133000000 116138736125 38711000000 38712912041 56294336 58206377
+116136000000 116141736360 38712000000 38713912120 57294336 59206456
+116139000000 116144736539 38713000000 38714912179 58294336 60206515
+116142000000 116147650179 38714000000 38715883393 59294336 61177729
+116145000000 116150736808 38715000000 38716912269 60294336 62206605
+116148000000 116153736981 38716000000 38717912327 61294336 63206663
+116151000000 116156737097 38717000000 38718912365 62294336 64206701
+116154000000 116159737270 38718000000 38719912423 63294336 65206759
+116157000000 116162737442 38719000000 38720912480 64294336 66206816
+116160000000 116165737498 38720000000 38721912499 65294336 67206835
+116163000000 116168737644 38721000000 38722912548 66294336 68206884
+116166000000 116171737840 38722000000 38723912613 67294336 69206949
+116169000000 116174737869 38723000000 38724912623 68294336 70206959
+116172000000 116177738175 38724000000 38725912725 69294336 71207061
+116175000000 116180738347 38725000000 38726912782 70294336 72207118
+116178000000 116183738480 38726000000 38727912826 71294336 73207162
+116181000000 116186738597 38727000000 38728912865 72294336 74207201
+116184000000 116189738782 38728000000 38729912927 73294336 75207263
+116187000000 116192738888 38729000000 38730912962 74294336 76207298
+116190000000 116195739069 38730000000 38731913023 75294336 77207359
+116193000000 116198739281 38731000000 38732913093 76294336 78207429
+116196000000 116201739388 38732000000 38733913129 77294336 79207465
+116199000000 116204739554 38733000000 38734913184 78294336 80207520
+116202000000 116207338299 38734000000 38735779433 79294336 81073769
+116205000000 116210739825 38735000000 38736913275 80294336 82207611
+116208000000 116213739937 38736000000 38737913312 81294336 83207648
+116211000000 116216740146 38737000000 38738913382 82294336 84207718
+116214000000 116219740225 38738000000 38739913408 83294336 85207744
+116217000000 116222740450 38739000000 38740913483 84294336 86207819
+116220000000 116225740577 38740000000 38741913525 85294336 87207861
+116223000000 116228740666 38741000000 38742913555 86294336 88207891
+116226000000 116231740772 38742000000 38743913590 87294336 89207926
+116229000000 116234740983 38743000000 38744913661 88294336 90207997
+116232000000 116237741192 38744000000 38745913730 89294336 91208066
+116235000000 116240741337 38745000000 38746913779 90294336 92208115
+116238000000 116243741463 38746000000 38747913821 91294336 93208157
+116241000000 116246741629 38747000000 38748913876 92294336 94208212
+116244000000 116249741709 38748000000 38749913903 93294336 95208239
+116247000000 116252741944 38749000000 38750913981 94294336 96208317
+116250000000 116255742103 38750000000 38751914034 95294336 97208370
+116253000000 116258742224 38751000000 38752914074 96294336 98208410
+116256000000 116261742384 38752000000 38753914128 97294336 99208464
+116259000000 116264742467 38753000000 38754914155 98294336 100208491
+116262000000 116267742713 38754000000 38755914237 99294336 101208573
+116265000000 116270742836 38755000000 38756914278 100294336 102208614
+116268000000 116273742972 38756000000 38757914324 101294336 103208660
+116271000000 116276743147 38757000000 38758914382 102294336 104208718
+116274000000 116279743269 38758000000 38759914423 103294336 105208759
+116277000000 116282743419 38759000000 38760914473 104294336 106208809
+116280000000 116285743567 38760000000 38761914522 105294336 107208858
+116283000000 116287917261 38761000000 38762639087 106294336 107933423
+116286000000 116291743887 38762000000 38763914629 107294336 109208965
+116289000000 116294744019 38763000000 38764914673 108294336 110209009
+116292000000 116297744193 38764000000 38765914731 109294336 111209067
+116295000000 116300744312 38765000000 38766914770 110294336 112209106
+116298000000 116303744436 38766000000 38767914812 111294336 113209148
+116301000000 116306744655 38767000000 38768914885 112294336 114209221
+116304000000 116309744791 38768000000 38769914930 113294336 115209266
+116307000000 116312744942 38769000000 38770914980 114294336 116209316
+116310000000 116315745092 38770000000 38771915030 115294336 117209366
+116313000000 116318745207 38771000000 38772915069 116294336 118209405
+116316000000 116321745304 38772000000 38773915101 117294336 119209437
+116319000000 116324745512 38773000000 38774915170 118294336 120209506
+116322000000 116327745667 38774000000 38775915222 119294336 121209558
+116325000000 116330745826 38775000000 38776915275 120294336 122209611
+116328000000 116333746000 38776000000 38777915333 121294336 123209669
+116331000000 116336746100 38777000000 38778915366 122294336 124209702
+116334000000 116339746278 38778000000 38779915426 123294336 125209762
+116337000000 116342746427 38779000000 38780915475 124294336 126209811
+116340000000 116345746555 38780000000 38781915518 125294336 127209854
+116343000000 116348746724 38781000000 38782915574 126294336 128209910
+116346000000 116351746844 38782000000 38783915614 127294336 129209950
+116349000000 116353574194 38783000000 38784524731 128294336 129819067
+116352000000 116357747094 38784000000 38785915698 129294336 131210034
+116355000000 116360747352 38785000000 38786915784 130294336 132210120
+116358000000 116363747457 38786000000 38787915819 131294336 133210155
+116361000000 116366747537 38787000000 38788915845 132294336 134210181
+116364000000 116369747684 38788000000 38789915894 133294336 135210230
+116367000000 116372747938 38789000000 38790915979 134294336 136210315
+116370000000 116375748028 38790000000 38791916009 135294336 137210345
+116373000000 116378748273 38791000000 38792916091 136294336 138210427
+116376000000 116381748351 38792000000 38793916117 137294336 139210453
+116379000000 116384748528 38793000000 38794916176 138294336 140210512
+116382000000 116387748674 38794000000 38795916224 139294336 141210560
+116385000000 116390748818 38795000000 38796916272 140294336 142210608
+116388000000 116392371472 38796000000 38797457157 141294336 142751493
+116391000000 116396749133 38797000000 38798916377 142294336 144210713
+116394000000 116399749293 38798000000 38799916431 143294336 145210767
+116397000000 116402749430 38799000000 38800916476 144294336 146210812
+116400000000 116405749588 38800000000 38801916529 145294336 147210865
+116403000000 116408749746 38801000000 38802916582 146294336 148210918
+116406000000 116411749860 38802000000 38803916620 147294336 149210956
+116409000000 116414750021 38803000000 38804916673 148294336 150211009
+116412000000 116417750148 38804000000 38805916716 149294336 151211052
+116415000000 116420750257 38805000000 38806916752 150294336 152211088
+116418000000 116423750399 38806000000 38807916799 151294336 153211135
+116421000000 116426750633 38807000000 38808916877 152294336 154211213
+116424000000 116429750546 38808000000 38809916848 153294336 155211184
+116427000000 116432750667 38809000000 38810916889 154294336 156211225
+116430000000 116435750775 38810000000 38811916925 155294336 157211261
+116433000000 116438751010 38811000000 38812917003 156294336 158211339
+116436000000 116441751189 38812000000 38813917063 157294336 159211399
+116439000000 116444664829 38813000000 38814888276 158294336 160182612
+116442000000 116447751458 38814000000 38815917152 159294336 161211488
+116445000000 116450751631 38815000000 38816917210 160294336 162211546
+116448000000 116453751747 38816000000 38817917249 161294336 163211585
+116451000000 116456751920 38817000000 38818917306 162294336 164211642
+116454000000 116459752092 38818000000 38819917364 163294336 165211700
+116457000000 116462752148 38819000000 38820917382 164294336 166211718
+116460000000 116465752294 38820000000 38821917431 165294336 167211767
+116463000000 116468752490 38821000000 38822917496 166294336 168211832
+116466000000 116471752519 38822000000 38823917506 167294336 169211842
+116469000000 116474752825 38823000000 38824917608 168294336 170211944
+116472000000 116477752997 38824000000 38825917665 169294336 171212001
+116475000000 116480753130 38825000000 38826917710 170294336 172212046
+116478000000 116483753247 38826000000 38827917749 171294336 173212085
+116481000000 116486753432 38827000000 38828917810 172294336 174212146
+116484000000 116489753538 38828000000 38829917846 173294336 175212182
+116487000000 116492753719 38829000000 38830917906 174294336 176212242
+116490000000 116495753931 38830000000 38831917977 175294336 177212313
+116493000000 116498754038 38831000000 38832918012 176294336 178212348
+116496000000 116501754204 38832000000 38833918068 177294336 179212404
+116499000000 116504352949 38833000000 38834784316 178294336 180078652
+116502000000 116507754475 38834000000 38835918158 179294336 181212494
+116505000000 116510754587 38835000000 38836918195 180294336 182212531
+116508000000 116513754796 38836000000 38837918265 181294336 183212601
+116511000000 116516754875 38837000000 38838918291 182294336 184212627
+116514000000 116519755100 38838000000 38839918366 183294336 185212702
+116517000000 116522755227 38839000000 38840918409 184294336 186212745
+116520000000 116525755316 38840000000 38841918438 185294336 187212774
+116523000000 116528755422 38841000000 38842918474 186294336 188212810
+116526000000 116531755633 38842000000 38843918544 187294336 189212880
+116529000000 116534755842 38843000000 38844918614 188294336 190212950
+116532000000 116537755987 38844000000 38845918662 189294336 191212998
+116535000000 116540756113 38845000000 38846918704 190294336 192213040
+116538000000 116543756279 38846000000 38847918759 191294336 193213095
+116541000000 116546756359 38847000000 38848918786 192294336 194213122
+116544000000 116549756594 38848000000 38849918864 193294336 195213200
+116547000000 116552756753 38849000000 38850918917 194294336 196213253
+116550000000 116555756874 38850000000 38851918958 195294336 197213294
+116553000000 116558757034 38851000000 38852919011 196294336 198213347
+116556000000 116561757117 38852000000 38853919039 197294336 199213375
+116559000000 116564757363 38853000000 38854919121 198294336 200213457
+116562000000 116567757486 38854000000 38855919162 199294336 201213498
+116565000000 116570757622 38855000000 38856919207 200294336 202213543
+116568000000 116573757797 38856000000 38857919265 201294336 203213601
+116571000000 116576757919 38857000000 38858919306 202294336 204213642
+116574000000 116579758069 38858000000 38859919356 203294336 205213692
+116577000000 116582758217 38859000000 38860919405 204294336 206213741
+116580000000 116584931911 38860000000 38861643970 205294336 206938306
+116583000000 116588758537 38861000000 38862919512 206294336 208213848
+116586000000 116591758669 38862000000 38863919556 207294336 209213892
+116589000000 116594758843 38863000000 38864919614 208294336 210213950
+116592000000 116597758962 38864000000 38865919654 209294336 211213990
+116595000000 116600759086 38865000000 38866919695 210294336 212214031
+116598000000 116603759305 38866000000 38867919768 211294336 213214104
+116601000000 116606759441 38867000000 38868919813 212294336 214214149
+116604000000 116609759592 38868000000 38869919864 213294336 215214200
+116607000000 116612759742 38869000000 38870919914 214294336 216214250
+116610000000 116615759857 38870000000 38871919952 215294336 217214288
+116613000000 116618759954 38871000000 38872919984 216294336 218214320
+116616000000 116621760162 38872000000 38873920054 217294336 219214390
+116619000000 116624760317 38873000000 38874920105 218294336 220214441
+116622000000 116627760476 38874000000 38875920158 219294336 221214494
+116625000000 116630760650 38875000000 38876920216 220294336 222214552
+116628000000 116633760750 38876000000 38877920250 221294336 223214586
+116631000000 116636760928 38877000000 38878920309 222294336 224214645
+116634000000 116639761077 38878000000 38879920359 223294336 225214695
+116637000000 116642761205 38879000000 38880920401 224294336 226214737
+116640000000 116645761374 38880000000 38881920458 225294336 227214794
+116643000000 116648761494 38881000000 38882920498 226294336 228214834
+116646000000 116650588844 38882000000 38883529614 227294336 228823950
+116649000000 116654761744 38883000000 38884920581 228294336 230214917
+116652000000 116657762002 38884000000 38885920667 229294336 231215003
+116655000000 116660762107 38885000000 38886920702 230294336 232215038
+116658000000 116663762187 38886000000 38887920729 231294336 233215065
+116661000000 116666762334 38887000000 38888920778 232294336 234215114
+116664000000 116669762588 38888000000 38889920862 233294336 235215198
+116667000000 116672762678 38889000000 38890920892 234294336 236215228
+116670000000 116675762923 38890000000 38891920974 235294336 237215310
+116673000000 116678763001 38891000000 38892921000 236294336 238215336
+116676000000 116681763178 38892000000 38893921059 237294336 239215395
+116679000000 116684763324 38893000000 38894921108 238294336 240215444
+116682000000 116687763468 38894000000 38895921156 239294336 241215492
+116685000000 116689386122 38895000000 38896462040 240294336 241756376
+116688000000 116693763783 38896000000 38897921261 241294336 243215597
+116691000000 116696763943 38897000000 38898921314 242294336 244215650
+116694000000 116699764080 38898000000 38899921360 243294336 245215696
+116697000000 116702764238 38899000000 38900921412 244294336 246215748
+116700000000 116705764396 38900000000 38901921465 245294336 247215801
+116703000000 116708764510 38901000000 38902921503 246294336 248215839
+116706000000 116711764671 38902000000 38903921557 247294336 249215893
+116709000000 116714764798 38903000000 38904921599 248294336 250215935
+116712000000 116717764907 38904000000 38905921635 249294336 251215971
+116715000000 116720765049 38905000000 38906921683 250294336 252216019
+116718000000 116723765283 38906000000 38907921761 251294336 253216097
+116721000000 116726765196 38907000000 38908921732 252294336 254216068
+116724000000 116729765317 38908000000 38909921772 253294336 255216108
+116727000000 116732765425 38909000000 38910921808 254294336 256216144
+116730000000 116735765660 38910000000 38911921886 255294336 257216222
+116733000000 116738765839 38911000000 38912921946 256294336 258216282
+116736000000 116741679479 38912000000 38913893159 257294336 259187495
+116739000000 116744766108 38913000000 38914922036 258294336 260216372
+116742000000 116747766281 38914000000 38915922093 259294336 261216429
+116745000000 116750766397 38915000000 38916922132 260294336 262216468
+116748000000 116753766570 38916000000 38917922190 261294336 263216526
+116751000000 116756766742 38917000000 38918922247 262294336 264216583
+116754000000 116759766798 38918000000 38919922266 263294336 265216602
+116757000000 116762766944 38919000000 38920922314 264294336 266216650
+116760000000 116765767140 38920000000 38921922380 265294336 267216716
+116763000000 116768767169 38921000000 38922922389 266294336 268216725
+116766000000 116771767475 38922000000 38923922491 267294336 269216827
+116769000000 116774767647 38923000000 38924922549 268294336 270216885
+116772000000 116777767780 38924000000 38925922593 269294336 271216929
+116775000000 116780767897 38925000000 38926922632 270294336 272216968
+116778000000 116783768082 38926000000 38927922694 271294336 273217030
+116781000000 116786768188 38927000000 38928922729 272294336 274217065
+116784000000 116789768369 38928000000 38929922789 273294336 275217125
+116787000000 116792768581 38929000000 38930922860 274294336 276217196
+116790000000 116795768688 38930000000 38931922896 275294336 277217232
+116793000000 116798768854 38931000000 38932922951 276294336 278217287
+116796000000 116801367599 38932000000 38933789199 277294336 279083535
+116799000000 116804769125 38933000000 38934923041 278294336 280217377
+116802000000 116807769237 38934000000 38935923079 279294336 281217415
+116805000000 116810769446 38935000000 38936923148 280294336 282217484
+116808000000 116813769525 38936000000 38937923175 281294336 283217511
+116811000000 116816769750 38937000000 38938923250 282294336 284217586
+116814000000 116819769877 38938000000 38939923292 283294336 285217628
+116817000000 116822769966 38939000000 38940923322 284294336 286217658
+116820000000 116825770072 38940000000 38941923357 285294336 287217693
+116823000000 116828770283 38941000000 38942923427 286294336 288217763
+116826000000 116831770492 38942000000 38943923497 287294336 289217833
+116829000000 116834770637 38943000000 38944923545 288294336 290217881
+116832000000 116837770763 38944000000 38945923587 289294336 291217923
+116835000000 116840770929 38945000000 38946923643 290294336 292217979
+116838000000 116843771009 38946000000 38947923669 291294336 293218005
+116841000000 116846771244 38947000000 38948923748 292294336 294218084
+116844000000 116849771403 38948000000 38949923801 293294336 295218137
+116847000000 116852771524 38949000000 38950923841 294294336 296218177
+116850000000 116855771684 38950000000 38951923894 295294336 297218230
+116853000000 116858771767 38951000000 38952923922 296294336 298218258
+116856000000 116861772013 38952000000 38953924004 297294336 299218340
+116859000000 116864772136 38953000000 38954924045 298294336 300218381
+116862000000 116867772272 38954000000 38955924090 299294336 301218426
+116865000000 116870772447 38955000000 38956924149 300294336 302218485
+116868000000 116873772569 38956000000 38957924189 301294336 303218525
+116871000000 116876772719 38957000000 38958924239 302294336 304218575
+116874000000 116879772867 38958000000 38959924289 303294336 305218625
+116877000000 116881946561 38959000000 38960648853 304294336 305943189
+116880000000 116885773187 38960000000 38961924395 305294336 307218731
+116883000000 116888773319 38961000000 38962924439 306294336 308218775
+116886000000 116891773493 38962000000 38963924497 307294336 309218833
+116889000000 116894773612 38963000000 38964924537 308294336 310218873
+116892000000 116897773736 38964000000 38965924578 309294336 311218914
+116895000000 116900773955 38965000000 38966924651 310294336 312218987
+116898000000 116903774091 38966000000 38967924697 311294336 313219033
+116901000000 116906774242 38967000000 38968924747 312294336 314219083
+116904000000 116909774392 38968000000 38969924797 313294336 315219133
+116907000000 116912774507 38969000000 38970924835 314294336 316219171
+116910000000 116915774604 38970000000 38971924868 315294336 317219204
+116913000000 116918774812 38971000000 38972924937 316294336 318219273
+116916000000 116921774967 38972000000 38973924989 317294336 319219325
+116919000000 116924775126 38973000000 38974925042 318294336 320219378
+116922000000 116927775300 38974000000 38975925100 319294336 321219436
+116925000000 116930775400 38975000000 38976925133 320294336 322219469
+116928000000 116933775578 38976000000 38977925192 321294336 323219528
+116931000000 116936775727 38977000000 38978925242 322294336 324219578
+116934000000 116939775855 38978000000 38979925285 323294336 325219621
+116937000000 116942776024 38979000000 38980925341 324294336 326219677
+116940000000 116945776144 38980000000 38981925381 325294336 327219717
+116943000000 116947603494 38981000000 38982534498 326294336 327828834
+116946000000 116951776394 38982000000 38983925464 327294336 329219800
+116949000000 116954776652 38983000000 38984925550 328294336 330219886
+116952000000 116957776757 38984000000 38985925585 329294336 331219921
+116955000000 116960776837 38985000000 38986925612 330294336 332219948
+116958000000 116963776984 38986000000 38987925661 331294336 333219997
+116961000000 116966777238 38987000000 38988925746 332294336 334220082
+116964000000 116969777328 38988000000 38989925776 333294336 335220112
+116967000000 116972777573 38989000000 38990925857 334294336 336220193
+116970000000 116975777651 38990000000 38991925883 335294336 337220219
+116973000000 116978777828 38991000000 38992925942 336294336 338220278
+116976000000 116981777974 38992000000 38993925991 337294336 339220327
+116979000000 116984778118 38993000000 38994926039 338294336 340220375
+116982000000 116986400772 38994000000 38995466924 339294336 340761260
+116985000000 116990778433 38995000000 38996926144 340294336 342220480
+116988000000 116993778593 38996000000 38997926197 341294336 343220533
+116991000000 116996778730 38997000000 38998926243 342294336 344220579
+116994000000 116999778888 38998000000 38999926296 343294336 345220632
+116997000000 117002779046 38999000000 39000926348 344294336 346220684
+117000000000 117005779160 39000000000 39001926386 345294336 347220722
+117003000000 117008779321 39001000000 39002926440 346294336 348220776
+117006000000 117011779448 39002000000 39003926482 347294336 349220818
+117009000000 117014779557 39003000000 39004926519 348294336 350220855
+117012000000 117017779699 39004000000 39005926566 349294336 351220902
+117015000000 117020779933 39005000000 39006926644 350294336 352220980
+117018000000 117023779846 39006000000 39007926615 351294336 353220951
+117021000000 117026779967 39007000000 39008926655 352294336 354220991
+117024000000 117029780075 39008000000 39009926691 353294336 355221027
+117027000000 117032780310 39009000000 39010926770 354294336 356221106
+117030000000 117035780489 39010000000 39011926829 355294336 357221165
+117033000000 117038694129 39011000000 39012898043 356294336 358192379
+117036000000 117041780758 39012000000 39013926919 357294336 359221255
+117039000000 117044780931 39013000000 39014926977 358294336 360221313
+117042000000 117047781047 39014000000 39015927015 359294336 361221351
+117045000000 117050781220 39015000000 39016927073 360294336 362221409
+117048000000 117053781392 39016000000 39017927130 361294336 363221466
+117051000000 117056781448 39017000000 39018927149 362294336 364221485
+117054000000 117059781594 39018000000 39019927198 363294336 365221534
+117057000000 117062781790 39019000000 39020927263 364294336 366221599
+117060000000 117065781819 39020000000 39021927273 365294336 367221609
+117063000000 117068782125 39021000000 39022927375 366294336 368221711
+117066000000 117071782297 39022000000 39023927432 367294336 369221768
+117069000000 117074782430 39023000000 39024927476 368294336 370221812
+117072000000 117077782547 39024000000 39025927515 369294336 371221851
+117075000000 117080782732 39025000000 39026927577 370294336 372221913
+117078000000 117083782838 39026000000 39027927612 371294336 373221948
+117081000000 117086783019 39027000000 39028927673 372294336 374222009
+117084000000 117089783231 39028000000 39029927743 373294336 375222079
+117087000000 117092783338 39029000000 39030927779 374294336 376222115
+117090000000 117095783504 39030000000 39031927834 375294336 377222170
+117093000000 117098382249 39031000000 39032794083 376294336 378088419
+117096000000 117101783775 39032000000 39033927925 377294336 379222261
+117099000000 117104783887 39033000000 39034927962 378294336 380222298
+117102000000 117107784096 39034000000 39035928032 379294336 381222368
+117105000000 117110784175 39035000000 39036928058 380294336 382222394
+117108000000 117113784400 39036000000 39037928133 381294336 383222469
+117111000000 117116784527 39037000000 39038928175 382294336 384222511
+117114000000 117119784616 39038000000 39039928205 383294336 385222541
+117117000000 117122784722 39039000000 39040928240 384294336 386222576
+117120000000 117125784933 39040000000 39041928311 385294336 387222647
+117123000000 117128785142 39041000000 39042928380 386294336 388222716
+117126000000 117131785287 39042000000 39043928429 387294336 389222765
+117129000000 117134785413 39043000000 39044928471 388294336 390222807
+117132000000 117137785579 39044000000 39045928526 389294336 391222862
+117135000000 117140785659 39045000000 39046928553 390294336 392222889
+117138000000 117143785894 39046000000 39047928631 391294336 393222967
+117141000000 117146786053 39047000000 39048928684 392294336 394223020
+117144000000 117149786174 39048000000 39049928724 393294336 395223060
+117147000000 117152786334 39049000000 39050928778 394294336 396223114
+117150000000 117155786417 39050000000 39051928805 395294336 397223141
+117153000000 117158786663 39051000000 39052928887 396294336 398223223
+117156000000 117161786786 39052000000 39053928928 397294336 399223264
+117159000000 117164786922 39053000000 39054928974 398294336 400223310
+117162000000 117167787097 39054000000 39055929032 399294336 401223368
+117165000000 117170787219 39055000000 39056929073 400294336 402223409
+117168000000 117173787369 39056000000 39057929123 401294336 403223459
+117171000000 117176787517 39057000000 39058929172 402294336 404223508
+117174000000 117178961211 39058000000 39059653737 403294336 404948073
+117177000000 117182787837 39059000000 39060929279 404294336 406223615
+117180000000 117185787969 39060000000 39061929323 405294336 407223659
+117183000000 117188788143 39061000000 39062929381 406294336 408223717
+117186000000 117191788262 39062000000 39063929420 407294336 409223756
+117189000000 117194788386 39063000000 39064929462 408294336 410223798
+117192000000 117197788605 39064000000 39065929535 409294336 411223871
+117195000000 117200788741 39065000000 39066929580 410294336 412223916
+117198000000 117203788892 39066000000 39067929630 411294336 413223966
+117201000000 117206789042 39067000000 39068929680 412294336 414224016
+117204000000 117209789157 39068000000 39069929719 413294336 415224055
+117207000000 117212789254 39069000000 39070929751 414294336 416224087
+117210000000 117215789462 39070000000 39071929820 415294336 417224156
+117213000000 117218789617 39071000000 39072929872 416294336 418224208
+117216000000 117221789776 39072000000 39073929925 417294336 419224261
+117219000000 117224789950 39073000000 39074929983 418294336 420224319
+117222000000 117227790050 39074000000 39075930016 419294336 421224352
+117225000000 117230790228 39075000000 39076930076 420294336 422224412
+117228000000 117233790377 39076000000 39077930125 421294336 423224461
+117231000000 117236790505 39077000000 39078930168 422294336 424224504
+117234000000 117239790674 39078000000 39079930224 423294336 425224560
+117237000000 117242790794 39079000000 39080930264 424294336 426224600
+117240000000 117244618144 39080000000 39081539381 425294336 426833717
+117243000000 117248791044 39081000000 39082930348 426294336 428224684
+117246000000 117251791302 39082000000 39083930434 427294336 429224770
+117249000000 117254791407 39083000000 39084930469 428294336 430224805
+117252000000 117257791487 39084000000 39085930495 429294336 431224831
+117255000000 117260791634 39085000000 39086930544 430294336 432224880
+117258000000 117263791888 39086000000 39087930629 431294336 433224965
+117261000000 117266791978 39087000000 39088930659 432294336 434224995
+117264000000 117269792223 39088000000 39089930741 433294336 435225077
+117267000000 117272792301 39089000000 39090930767 434294336 436225103
+117270000000 117275792478 39090000000 39091930826 435294336 437225162
+117273000000 117278792624 39091000000 39092930874 436294336 438225210
+117276000000 117281792768 39092000000 39093930922 437294336 439225258
+117279000000 117283415422 39093000000 39094471807 438294336 439766143
+117282000000 117287793083 39094000000 39095931027 439294336 441225363
+117285000000 117290793243 39095000000 39096931081 440294336 442225417
+117288000000 117293793380 39096000000 39097931126 441294336 443225462
+117291000000 117296793538 39097000000 39098931179 442294336 444225515
+117294000000 117299793696 39098000000 39099931232 443294336 445225568
+117297000000 117302793810 39099000000 39100931270 444294336 446225606
+117300000000 117305793971 39100000000 39101931323 445294336 447225659
+117303000000 117308794098 39101000000 39102931366 446294336 448225702
+117306000000 117311794207 39102000000 39103931402 447294336 449225738
+117309000000 117314794349 39103000000 39104931449 448294336 450225785
+117312000000 117317794583 39104000000 39105931527 449294336 451225863
+117315000000 117320794496 39105000000 39106931498 450294336 452225834
+117318000000 117323794617 39106000000 39107931539 451294336 453225875
+117321000000 117326794725 39107000000 39108931575 452294336 454225911
+117324000000 117329794960 39108000000 39109931653 453294336 455225989
+117327000000 117332795139 39109000000 39110931713 454294336 456226049
+117330000000 117335708779 39110000000 39111902926 455294336 457197262
+117333000000 117338795408 39111000000 39112931802 456294336 458226138
+117336000000 117341795581 39112000000 39113931860 457294336 459226196
+117339000000 117344795697 39113000000 39114931899 458294336 460226235
+117342000000 117347795870 39114000000 39115931956 459294336 461226292
+117345000000 117350796042 39115000000 39116932014 460294336 462226350
+117348000000 117353796098 39116000000 39117932032 461294336 463226368
+117351000000 117356796244 39117000000 39118932081 462294336 464226417
+117354000000 117359796440 39118000000 39119932146 463294336 465226482
+117357000000 117362796469 39119000000 39120932156 464294336 466226492
+117360000000 117365796775 39120000000 39121932258 465294336 467226594
+117363000000 117368796947 39121000000 39122932315 466294336 468226651
+117366000000 117371797080 39122000000 39123932360 467294336 469226696
+117369000000 117374797197 39123000000 39124932399 468294336 470226735
+117372000000 117377797382 39124000000 39125932460 469294336 471226796
+117375000000 117380797488 39125000000 39126932496 470294336 472226832
+117378000000 117383797669 39126000000 39127932556 471294336 473226892
+117381000000 117386797881 39127000000 39128932627 472294336 474226963
+117384000000 117389797988 39128000000 39129932662 473294336 475226998
+117387000000 117392798154 39129000000 39130932718 474294336 476227054
+117390000000 117395396899 39130000000 39131798966 475294336 477093302
+117393000000 117398798425 39131000000 39132932808 476294336 478227144
+117396000000 117401798537 39132000000 39133932845 477294336 479227181
+117399000000 117404798746 39133000000 39134932915 478294336 480227251
+117402000000 117407798825 39134000000 39135932941 479294336 481227277
+117405000000 117410799050 39135000000 39136933016 480294336 482227352
+117408000000 117413799177 39136000000 39137933059 481294336 483227395
+117411000000 117416799266 39137000000 39138933088 482294336 484227424
+117414000000 117419799372 39138000000 39139933124 483294336 485227460
+117417000000 117422799583 39139000000 39140933194 484294336 486227530
+117420000000 117425799792 39140000000 39141933264 485294336 487227600
+117423000000 117428799937 39141000000 39142933312 486294336 488227648
+117426000000 117431800063 39142000000 39143933354 487294336 489227690
+117429000000 117434800229 39143000000 39144933409 488294336 490227745
+117432000000 117437800309 39144000000 39145933436 489294336 491227772
+117435000000 117440800544 39145000000 39146933514 490294336 492227850
+117438000000 117443800703 39146000000 39147933567 491294336 493227903
+117441000000 117446800824 39147000000 39148933608 492294336 494227944
+117444000000 117449800984 39148000000 39149933661 493294336 495227997
+117447000000 117452801067 39149000000 39150933689 494294336 496228025
+117450000000 117455801313 39150000000 39151933771 495294336 497228107
+117453000000 117458801436 39151000000 39152933812 496294336 498228148
+117456000000 117461801572 39152000000 39153933857 497294336 499228193
+117459000000 117464801747 39153000000 39154933915 498294336 500228251
+117462000000 117467801869 39154000000 39155933956 499294336 501228292
+117465000000 117470802019 39155000000 39156934006 500294336 502228342
+117468000000 117473802167 39156000000 39157934055 501294336 503228391
+117471000000 117475975861 39157000000 39158658620 502294336 503952956
+117474000000 117479802487 39158000000 39159934162 503294336 505228498
+117477000000 117482802619 39159000000 39160934206 504294336 506228542
+117480000000 117485802793 39160000000 39161934264 505294336 507228600
+117483000000 117488802912 39161000000 39162934304 506294336 508228640
+117486000000 117491803036 39162000000 39163934345 507294336 509228681
+117489000000 117494803255 39163000000 39164934418 508294336 510228754
+117492000000 117497803391 39164000000 39165934463 509294336 511228799
+117495000000 117500803542 39165000000 39166934514 510294336 512228850
+117498000000 117503803692 39166000000 39167934564 511294336 513228900
+117501000000 117506803807 39167000000 39168934602 512294336 514228938
+117504000000 117509803904 39168000000 39169934634 513294336 515228970
+117507000000 117512804112 39169000000 39170934704 514294336 516229040
+117510000000 117515804267 39170000000 39171934755 515294336 517229091
+117513000000 117518804426 39171000000 39172934808 516294336 518229144
+117516000000 117521804600 39172000000 39173934866 517294336 519229202
+117519000000 117524804700 39173000000 39174934900 518294336 520229236
+117522000000 117527804878 39174000000 39175934959 519294336 521229295
+117525000000 117530805027 39175000000 39176935009 520294336 522229345
+117528000000 117533805155 39176000000 39177935051 521294336 523229387
+117531000000 117536805324 39177000000 39178935108 522294336 524229444
+117534000000 117539805444 39178000000 39179935148 523294336 525229484
+117537000000 117541632794 39179000000 39180544264 524294336 525838600
+117540000000 117545805694 39180000000 39181935231 525294336 527229567
+117543000000 117548805952 39181000000 39182935317 526294336 528229653
+117546000000 117551806057 39182000000 39183935352 527294336 529229688
+117549000000 117554806137 39183000000 39184935379 528294336 530229715
+117552000000 117557806284 39184000000 39185935428 529294336 531229764
+117555000000 117560806538 39185000000 39186935512 530294336 532229848
+117558000000 117563806628 39186000000 39187935542 531294336 533229878
+117561000000 117566806873 39187000000 39188935624 532294336 534229960
+117564000000 117569806951 39188000000 39189935650 533294336 535229986
+117567000000 117572807128 39189000000 39190935709 534294336 536230045
+117570000000 117575807274 39190000000 39191935758 535294336 537230094
+117573000000 117578807418 39191000000 39192935806 536294336 538230142
+117576000000 117580430072 39192000000 39193476690 537294336 538771026
+117579000000 117584807733 39193000000 39194935911 538294336 540230247
+117582000000 117587807893 39194000000 39195935964 539294336 541230300
+117585000000 117590808030 39195000000 39196936010 540294336 542230346
+117588000000 117593808188 39196000000 39197936062 541294336 543230398
+117591000000 117596808346 39197000000 39198936115 542294336 544230451
+117594000000 117599808460 39198000000 39199936153 543294336 545230489
+117597000000 117602808621 39199000000 39200936207 544294336 546230543
+117600000000 117605808748 39200000000 39201936249 545294336 547230585
+117603000000 117608808857 39201000000 39202936285 546294336 548230621
+117606000000 117611808999 39202000000 39203936333 547294336 549230669
+117609000000 117614809233 39203000000 39204936411 548294336 550230747
+117612000000 117617809146 39204000000 39205936382 549294336 551230718
+117615000000 117620809267 39205000000 39206936422 550294336 552230758
+117618000000 117623809375 39206000000 39207936458 551294336 553230794
+117621000000 117626809610 39207000000 39208936536 552294336 554230872
+117624000000 117629809789 39208000000 39209936596 553294336 555230932
+117627000000 117632723429 39209000000 39210907809 554294336 556202145
+117630000000 117635810058 39210000000 39211936686 555294336 557231022
+117633000000 117638810231 39211000000 39212936743 556294336 558231079
+117636000000 117641810347 39212000000 39213936782 557294336 559231118
+117639000000 117644810520 39213000000 39214936840 558294336 560231176
+117642000000 117647810692 39214000000 39215936897 559294336 561231233
+117645000000 117650810748 39215000000 39216936916 560294336 562231252
+117648000000 117653810894 39216000000 39217936964 561294336 563231300
+117651000000 117656811090 39217000000 39218937030 562294336 564231366
+117654000000 117659811119 39218000000 39219937039 563294336 565231375
+117657000000 117662811425 39219000000 39220937141 564294336 566231477
+117660000000 117665811597 39220000000 39221937199 565294336 567231535
+117663000000 117668811730 39221000000 39222937243 566294336 568231579
+117666000000 117671811847 39222000000 39223937282 567294336 569231618
+117669000000 117674812032 39223000000 39224937344 568294336 570231680
+117672000000 117677812138 39224000000 39225937379 569294336 571231715
+117675000000 117680812319 39225000000 39226937439 570294336 572231775
+117678000000 117683812531 39226000000 39227937510 571294336 573231846
+117681000000 117686812638 39227000000 39228937546 572294336 574231882
+117684000000 117689812804 39228000000 39229937601 573294336 575231937
+117687000000 117692411549 39229000000 39230803849 574294336 576098185
+117690000000 117695813075 39230000000 39231937691 575294336 577232027
+117693000000 117698813187 39231000000 39232937729 576294336 578232065
+117696000000 117701813396 39232000000 39233937798 577294336 579232134
+117699000000 117704813475 39233000000 39234937825 578294336 580232161
+117702000000 117707813700 39234000000 39235937900 579294336 581232236
+117705000000 117710813827 39235000000 39236937942 580294336 582232278
+117708000000 117713813916 39236000000 39237937972 581294336 583232308
+117711000000 117716814022 39237000000 39238938007 582294336 584232343
+117714000000 117719814233 39238000000 39239938077 583294336 585232413
+117717000000 117722814442 39239000000 39240938147 584294336 586232483
+117720000000 117725814587 39240000000 39241938195 585294336 587232531
+117723000000 117728814713 39241000000 39242938237 586294336 588232573
+117726000000 117731814879 39242000000 39243938293 587294336 589232629
+117729000000 117734814959 39243000000 39244938319 588294336 590232655
+117732000000 117737815194 39244000000 39245938398 589294336 591232734
+117735000000 117740815353 39245000000 39246938451 590294336 592232787
+117738000000 117743815474 39246000000 39247938491 591294336 593232827
+117741000000 117746815634 39247000000 39248938544 592294336 594232880
+117744000000 117749815717 39248000000 39249938572 593294336 595232908
+117747000000 117752815963 39249000000 39250938654 594294336 596232990
+117750000000 117755816086 39250000000 39251938695 595294336 597233031
+117753000000 117758816222 39251000000 39252938740 596294336 598233076
+117756000000 117761816397 39252000000 39253938799 597294336 599233135
+117759000000 117764816519 39253000000 39254938839 598294336 600233175
+117762000000 117767816669 39254000000 39255938889 599294336 601233225
+117765000000 117770816817 39255000000 39256938939 600294336 602233275
+117768000000 117772990511 39256000000 39257663503 601294336 602957839
+117771000000 117776817137 39257000000 39258939045 602294336 604233381
+117774000000 117779817269 39258000000 39259939089 603294336 605233425
+117777000000 117782817443 39259000000 39260939147 604294336 606233483
+117780000000 117785817562 39260000000 39261939187 605294336 607233523
+117783000000 117788817686 39261000000 39262939228 606294336 608233564
+117786000000 117791817905 39262000000 39263939301 607294336 609233637
+117789000000 117794818041 39263000000 39264939347 608294336 610233683
+117792000000 117797818192 39264000000 39265939397 609294336 611233733
+117795000000 117800818342 39265000000 39266939447 610294336 612233783
+117798000000 117803818457 39266000000 39267939485 611294336 613233821
+117801000000 117806818554 39267000000 39268939518 612294336 614233854
+117804000000 117809818762 39268000000 39269939587 613294336 615233923
+117807000000 117812818917 39269000000 39270939639 614294336 616233975
+117810000000 117815819076 39270000000 39271939692 615294336 617234028
+117813000000 117818819250 39271000000 39272939750 616294336 618234086
+117816000000 117821819350 39272000000 39273939783 617294336 619234119
+117819000000 117824819528 39273000000 39274939842 618294336 620234178
+117822000000 117827819677 39274000000 39275939892 619294336 621234228
+117825000000 117830819805 39275000000 39276939935 620294336 622234271
+117828000000 117833819974 39276000000 39277939991 621294336 623234327
+117831000000 117836820094 39277000000 39278940031 622294336 624234367
+117834000000 117838647444 39278000000 39279549148 623294336 624843484
+117837000000 117842820344 39279000000 39280940114 624294336 626234450
+117840000000 117845820602 39280000000 39281940200 625294336 627234536
+117843000000 117848820707 39281000000 39282940235 626294336 628234571
+117846000000 117851820787 39282000000 39283940262 627294336 629234598
+117849000000 117854820934 39283000000 39284940311 628294336 630234647
+117852000000 117857821188 39284000000 39285940396 629294336 631234732
+117855000000 117860821278 39285000000 39286940426 630294336 632234762
+117858000000 117863821523 39286000000 39287940507 631294336 633234843
+117861000000 117866821601 39287000000 39288940533 632294336 634234869
+117864000000 117869821778 39288000000 39289940592 633294336 635234928
+117867000000 117872821924 39289000000 39290940641 634294336 636234977
+117870000000 117875822068 39290000000 39291940689 635294336 637235025
+117873000000 117877444722 39291000000 39292481574 636294336 637775910
+117876000000 117881822383 39292000000 39293940794 637294336 639235130
+117879000000 117884822543 39293000000 39294940847 638294336 640235183
+117882000000 117887822680 39294000000 39295940893 639294336 641235229
+117885000000 117890822838 39295000000 39296940946 640294336 642235282
+117888000000 117893822996 39296000000 39297940998 641294336 643235334
+117891000000 117896823110 39297000000 39298941036 642294336 644235372
+117894000000 117899823271 39298000000 39299941090 643294336 645235426
+117897000000 117902823398 39299000000 39300941132 644294336 646235468
+117900000000 117905823507 39300000000 39301941169 645294336 647235505
+117903000000 117908823649 39301000000 39302941216 646294336 648235552
+117906000000 117911823883 39302000000 39303941294 647294336 649235630
+117909000000 117914823796 39303000000 39304941265 648294336 650235601
+117912000000 117917823917 39304000000 39305941305 649294336 651235641
+117915000000 117920824025 39305000000 39306941341 650294336 652235677
+117918000000 117923824260 39306000000 39307941420 651294336 653235756
+117921000000 117926824439 39307000000 39308941479 652294336 654235815
+117924000000 117929738079 39308000000 39309912693 653294336 655207029
+117927000000 117932824708 39309000000 39310941569 654294336 656235905
+117930000000 117935824881 39310000000 39311941627 655294336 657235963
+117933000000 117938824997 39311000000 39312941665 656294336 658236001
+117936000000 117941825170 39312000000 39313941723 657294336 659236059
+117939000000 117944825342 39313000000 39314941780 658294336 660236116
+117942000000 117947825398 39314000000 39315941799 659294336 661236135
+117945000000 117950825544 39315000000 39316941848 660294336 662236184
+117948000000 117953825740 39316000000 39317941913 661294336 663236249
+117951000000 117956825769 39317000000 39318941923 662294336 664236259
+117954000000 117959826075 39318000000 39319942025 663294336 665236361
+117957000000 117962826247 39319000000 39320942082 664294336 666236418
+117960000000 117965826380 39320000000 39321942126 665294336 667236462
+117963000000 117968826497 39321000000 39322942165 666294336 668236501
+117966000000 117971826682 39322000000 39323942227 667294336 669236563
+117969000000 117974826788 39323000000 39324942262 668294336 670236598
+117972000000 117977826969 39324000000 39325942323 669294336 671236659
+117975000000 117980827181 39325000000 39326942393 670294336 672236729
+117978000000 117983827288 39326000000 39327942429 671294336 673236765
+117981000000 117986827454 39327000000 39328942484 672294336 674236820
+117984000000 117989426199 39328000000 39329808733 673294336 675103069
+117987000000 117992827725 39329000000 39330942575 674294336 676236911
+117990000000 117995827837 39330000000 39331942612 675294336 677236948
+117993000000 117998828046 39331000000 39332942682 676294336 678237018
+117996000000 118001828125 39332000000 39333942708 677294336 679237044
+117999000000 118004828350 39333000000 39334942783 678294336 680237119
+118002000000 118007828477 39334000000 39335942825 679294336 681237161
+118005000000 118010828566 39335000000 39336942855 680294336 682237191
+118008000000 118013828672 39336000000 39337942890 681294336 683237226
+118011000000 118016828883 39337000000 39338942961 682294336 684237297
+118014000000 118019829092 39338000000 39339943030 683294336 685237366
+118017000000 118022829237 39339000000 39340943079 684294336 686237415
+118020000000 118025829363 39340000000 39341943121 685294336 687237457
+118023000000 118028829529 39341000000 39342943176 686294336 688237512
+118026000000 118031829609 39342000000 39343943203 687294336 689237539
+118029000000 118034829844 39343000000 39344943281 688294336 690237617
+118032000000 118037830003 39344000000 39345943334 689294336 691237670
+118035000000 118040830124 39345000000 39346943374 690294336 692237710
+118038000000 118043830284 39346000000 39347943428 691294336 693237764
+118041000000 118046830367 39347000000 39348943455 692294336 694237791
+118044000000 118049830613 39348000000 39349943537 693294336 695237873
+118047000000 118052830736 39349000000 39350943578 694294336 696237914
+118050000000 118055830872 39350000000 39351943624 695294336 697237960
+118053000000 118058831047 39351000000 39352943682 696294336 698238018
+118056000000 118061831169 39352000000 39353943723 697294336 699238059
+118059000000 118064831319 39353000000 39354943773 698294336 700238109
+118062000000 118067831467 39354000000 39355943822 699294336 701238158
+118065000000 118070005161 39355000000 39356668387 700294336 701962723
+118068000000 118073831787 39356000000 39357943929 701294336 703238265
+118071000000 118076831919 39357000000 39358943973 702294336 704238309
+118074000000 118079832093 39358000000 39359944031 703294336 705238367
+118077000000 118082832212 39359000000 39360944070 704294336 706238406
+118080000000 118085832336 39360000000 39361944112 705294336 707238448
+118083000000 118088832555 39361000000 39362944185 706294336 708238521
+118086000000 118091832691 39362000000 39363944230 707294336 709238566
+118089000000 118094832842 39363000000 39364944280 708294336 710238616
+118092000000 118097832992 39364000000 39365944330 709294336 711238666
+118095000000 118100833107 39365000000 39366944369 710294336 712238705
+118098000000 118103833204 39366000000 39367944401 711294336 713238737
+118101000000 118106833412 39367000000 39368944470 712294336 714238806
+118104000000 118109833567 39368000000 39369944522 713294336 715238858
+118107000000 118112833726 39369000000 39370944575 714294336 716238911
+118110000000 118115833900 39370000000 39371944633 715294336 717238969
+118113000000 118118834000 39371000000 39372944666 716294336 718239002
+118116000000 118121834178 39372000000 39373944726 717294336 719239062
+118119000000 118124834327 39373000000 39374944775 718294336 720239111
+118122000000 118127834455 39374000000 39375944818 719294336 721239154
+118125000000 118130834624 39375000000 39376944874 720294336 722239210
+118128000000 118133834744 39376000000 39377944914 721294336 723239250
+118131000000 118135662094 39377000000 39378554031 722294336 723848367
+118134000000 118139834994 39378000000 39379944998 723294336 725239334
+118137000000 118142835252 39379000000 39380945084 724294336 726239420
+118140000000 118145835357 39380000000 39381945119 725294336 727239455
+118143000000 118148835437 39381000000 39382945145 726294336 728239481
+118146000000 118151835584 39382000000 39383945194 727294336 729239530
+118149000000 118154835838 39383000000 39384945279 728294336 730239615
+118152000000 118157835928 39384000000 39385945309 729294336 731239645
+118155000000 118160836173 39385000000 39386945391 730294336 732239727
+118158000000 118163836251 39386000000 39387945417 731294336 733239753
+118161000000 118166836428 39387000000 39388945476 732294336 734239812
+118164000000 118169836574 39388000000 39389945524 733294336 735239860
+118167000000 118172836718 39389000000 39390945572 734294336 736239908
+118170000000 118174459372 39390000000 39391486457 735294336 736780793
+118173000000 118178837033 39391000000 39392945677 736294336 738240013
+118176000000 118181837193 39392000000 39393945731 737294336 739240067
+118179000000 118184837330 39393000000 39394945776 738294336 740240112
+118182000000 118187837488 39394000000 39395945829 739294336 741240165
+118185000000 118190837646 39395000000 39396945882 740294336 742240218
+118188000000 118193837760 39396000000 39397945920 741294336 743240256
+118191000000 118196837921 39397000000 39398945973 742294336 744240309
+118194000000 118199838048 39398000000 39399946016 743294336 745240352
+118197000000 118202838157 39399000000 39400946052 744294336 746240388
+118200000000 118205838299 39400000000 39401946099 745294336 747240435
+118203000000 118208838533 39401000000 39402946177 746294336 748240513
+118206000000 118211838446 39402000000 39403946148 747294336 749240484
+118209000000 118214838567 39403000000 39404946189 748294336 750240525
+118212000000 118217838675 39404000000 39405946225 749294336 751240561
+118215000000 118220838910 39405000000 39406946303 750294336 752240639
+118218000000 118223839089 39406000000 39407946363 751294336 753240699
+118221000000 118226752729 39407000000 39408917576 752294336 754211912
+118224000000 118229839358 39408000000 39409946452 753294336 755240788
+118227000000 118232839531 39409000000 39410946510 754294336 756240846
+118230000000 118235839647 39410000000 39411946549 755294336 757240885
+118233000000 118238839820 39411000000 39412946606 756294336 758240942
+118236000000 118241839992 39412000000 39413946664 757294336 759241000
+118239000000 118244840048 39413000000 39414946682 758294336 760241018
+118242000000 118247840194 39414000000 39415946731 759294336 761241067
+118245000000 118250840390 39415000000 39416946796 760294336 762241132
+118248000000 118253840419 39416000000 39417946806 761294336 763241142
+118251000000 118256840725 39417000000 39418946908 762294336 764241244
+118254000000 118259840897 39418000000 39419946965 763294336 765241301
+118257000000 118262841030 39419000000 39420947010 764294336 766241346
+118260000000 118265841147 39420000000 39421947049 765294336 767241385
+118263000000 118268841332 39421000000 39422947110 766294336 768241446
+118266000000 118271841438 39422000000 39423947146 767294336 769241482
+118269000000 118274841619 39423000000 39424947206 768294336 770241542
+118272000000 118277841831 39424000000 39425947277 769294336 771241613
+118275000000 118280841938 39425000000 39426947312 770294336 772241648
+118278000000 118283842104 39426000000 39427947368 771294336 773241704
+118281000000 118286440849 39427000000 39428813616 772294336 774107952
+118284000000 118289842375 39428000000 39429947458 773294336 775241794
+118287000000 118292842487 39429000000 39430947495 774294336 776241831
+118290000000 118295842696 39430000000 39431947565 775294336 777241901
+118293000000 118298842775 39431000000 39432947591 776294336 778241927
+118296000000 118301843000 39432000000 39433947666 777294336 779242002
+118299000000 118304843127 39433000000 39434947709 778294336 780242045
+118302000000 118307843216 39434000000 39435947738 779294336 781242074
+118305000000 118310843322 39435000000 39436947774 780294336 782242110
+118308000000 118313843533 39436000000 39437947844 781294336 783242180
+118311000000 118316843742 39437000000 39438947914 782294336 784242250
+118314000000 118319843887 39438000000 39439947962 783294336 785242298
diff --git a/cesar/cp/beacon/test/sync/spo_p0_snr_p0.txt b/cesar/cp/beacon/test/sync/spo_p0_snr_p0.txt
new file mode 100644
index 0000000000..ab63cef4c0
--- /dev/null
+++ b/cesar/cp/beacon/test/sync/spo_p0_snr_p0.txt
@@ -0,0 +1,39439 @@
+0 7775
+3000000 3007771
+6000000 6007779
+9000000 9007775
+12000000 12007781
+15000000 15007772
+18000000 18007788
+21000000 21007758
+24000000 24007779
+27000000 27007774
+30000000 30007783
+33000000 33007772
+36000000 36007796
+39000000 39007777
+42000000 42007762
+45000000 45007776
+48000000 48007779
+51000000 51007782
+54000000 54007783
+57000000 57007793
+60000000 60007782
+63000000 63007786
+66000000 66007777
+69000000 69007775
+72000000 72007777
+75000000 75007776
+78000000 78007742
+81000000 81007772
+84000000 84007766
+87000000 87007782
+90000000 90007758
+93000000 93007770
+96000000 96007783
+99000000 99007785
+102000000 102007774
+105000000 105007716
+108000000 108007714
+111000000 111007786
+114000000 114007701
+117000000 117007775
+120000000 120007787
+123000000 123007779
+126000000 126007779
+129000000 129007738
+132000000 132007763
+135000000 135007686
+138000000 138007767
+141000000 141007779
+144000000 144007782
+147000000 147007749
+150000000 150007760
+153000000 153007778
+156000000 156007774
+159000000 159007782
+162000000 162007781
+165000000 165007775
+168000000 168007800
+171000000 171007779
+174000000 174007783
+177000000 177007768
+180000000 180007766
+183000000 183007737
+186000000 186007767
+189000000 189007775
+192000000 192007792
+195000000 195007782
+198000000 198007732
+201000000 201007786
+204000000 204007780
+207000000 207007774
+210000000 210007774
+213000000 213007788
+216000000 216007779
+219000000 219007785
+222000000 222007774
+225000000 225007724
+228000000 228007783
+231000000 231007779
+234000000 234007766
+237000000 237007777
+240000000 240007695
+243000000 243007778
+246000000 246007770
+249000000 249007771
+252000000 252007782
+255000000 255007782
+258000000 258007736
+261000000 261007791
+264000000 264007756
+267000000 267007784
+270000000 270007783
+273000000 273007777
+276000000 276007732
+279000000 279007801
+282000000 282007780
+285000000 285007788
+288000000 288007774
+291000000 291007778
+294000000 294007780
+297000000 297007770
+300000000 300007766
+303000000 303007774
+306000000 306007770
+309000000 309007776
+312000000 312007767
+315000000 315007783
+318000000 318007753
+321000000 321007774
+324000000 324007769
+327000000 327007778
+330000000 330007767
+333000000 333007791
+336000000 336007772
+339000000 339007757
+342000000 342007771
+345000000 345007774
+348000000 348007777
+351000000 351007778
+354000000 354007788
+357000000 357007777
+360000000 360007781
+363000000 363007772
+366000000 366007770
+369000000 369007772
+372000000 372007771
+375000000 375007737
+378000000 378007767
+381000000 381007761
+384000000 384007777
+387000000 387007753
+390000000 390007765
+393000000 393007778
+396000000 396007780
+399000000 399007769
+402000000 402007711
+405000000 405007709
+408000000 408007781
+411000000 411007696
+414000000 414007770
+417000000 417007782
+420000000 420007774
+423000000 423007774
+426000000 426007733
+429000000 429007758
+432000000 432007681
+435000000 435007762
+438000000 438007774
+441000000 441007777
+444000000 444007744
+447000000 447007755
+450000000 450007773
+453000000 453007769
+456000000 456007777
+459000000 459007776
+462000000 462007770
+465000000 465007795
+468000000 468007774
+471000000 471007778
+474000000 474007763
+477000000 477007761
+480000000 480007732
+483000000 483007762
+486000000 486007770
+489000000 489007787
+492000000 492007777
+495000000 495007727
+498000000 498007781
+501000000 501007775
+504000000 504007769
+507000000 507007769
+510000000 510007783
+513000000 513007774
+516000000 516007780
+519000000 519007769
+522000000 522007719
+525000000 525007778
+528000000 528007774
+531000000 531007761
+534000000 534007772
+537000000 537007690
+540000000 540007773
+543000000 543007765
+546000000 546007766
+549000000 549007777
+552000000 552007777
+555000000 555007731
+558000000 558007786
+561000000 561007751
+564000000 564007779
+567000000 567007778
+570000000 570007772
+573000000 573007727
+576000000 576007796
+579000000 579007775
+582000000 582007783
+585000000 585007769
+588000000 588007773
+591000000 591007775
+594000000 594007765
+597000000 597007761
+600000000 600007769
+603000000 603007765
+606000000 606007771
+609000000 609007762
+612000000 612007778
+615000000 615007748
+618000000 618007769
+621000000 621007764
+624000000 624007773
+627000000 627007762
+630000000 630007786
+633000000 633007767
+636000000 636007752
+639000000 639007766
+642000000 642007769
+645000000 645007772
+648000000 648007773
+651000000 651007783
+654000000 654007772
+657000000 657007776
+660000000 660007767
+663000000 663007765
+666000000 666007767
+669000000 669007766
+672000000 672007732
+675000000 675007762
+678000000 678007756
+681000000 681007772
+684000000 684007748
+687000000 687007760
+690000000 690007773
+693000000 693007775
+696000000 696007764
+699000000 699007706
+702000000 702007704
+705000000 705007776
+708000000 708007691
+711000000 711007765
+714000000 714007777
+717000000 717007769
+720000000 720007769
+723000000 723007728
+726000000 726007753
+729000000 729007676
+732000000 732007757
+735000000 735007769
+738000000 738007772
+741000000 741007739
+744000000 744007750
+747000000 747007768
+750000000 750007764
+753000000 753007772
+756000000 756007771
+759000000 759007765
+762000000 762007790
+765000000 765007769
+768000000 768007773
+771000000 771007758
+774000000 774007756
+777000000 777007727
+780000000 780007757
+783000000 783007765
+786000000 786007782
+789000000 789007772
+792000000 792007722
+795000000 795007776
+798000000 798007770
+801000000 801007764
+804000000 804007764
+807000000 807007778
+810000000 810007769
+813000000 813007775
+816000000 816007764
+819000000 819007714
+822000000 822007773
+825000000 825007769
+828000000 828007756
+831000000 831007767
+834000000 834007685
+837000000 837007768
+840000000 840007760
+843000000 843007761
+846000000 846007772
+849000000 849007772
+852000000 852007726
+855000000 855007781
+858000000 858007746
+861000000 861007774
+864000000 864007773
+867000000 867007767
+870000000 870007722
+873000000 873007791
+876000000 876007770
+879000000 879007778
+882000000 882007764
+885000000 885007768
+888000000 888007770
+891000000 891007760
+894000000 894007756
+897000000 897007764
+900000000 900007760
+903000000 903007766
+906000000 906007757
+909000000 909007773
+912000000 912007743
+915000000 915007764
+918000000 918007759
+921000000 921007768
+924000000 924007757
+927000000 927007781
+930000000 930007762
+933000000 933007747
+936000000 936007761
+939000000 939007764
+942000000 942007767
+945000000 945007768
+948000000 948007778
+951000000 951007767
+954000000 954007771
+957000000 957007762
+960000000 960007760
+963000000 963007762
+966000000 966007761
+969000000 969007727
+972000000 972007757
+975000000 975007751
+978000000 978007767
+981000000 981007743
+984000000 984007755
+987000000 987007768
+990000000 990007770
+993000000 993007759
+996000000 996007701
+999000000 999007699
+1002000000 1002007771
+1005000000 1005007686
+1008000000 1008007760
+1011000000 1011007772
+1014000000 1014007764
+1017000000 1017007764
+1020000000 1020007723
+1023000000 1023007748
+1026000000 1026007671
+1029000000 1029007752
+1032000000 1032007764
+1035000000 1035007767
+1038000000 1038007734
+1041000000 1041007745
+1044000000 1044007763
+1047000000 1047007759
+1050000000 1050007767
+1053000000 1053007766
+1056000000 1056007760
+1059000000 1059007785
+1062000000 1062007764
+1065000000 1065007768
+1068000000 1068007753
+1071000000 1071007751
+1074000000 1074007722
+1077000000 1077007752
+1080000000 1080007760
+1083000000 1083007777
+1086000000 1086007767
+1089000000 1089007717
+1092000000 1092007771
+1095000000 1095007765
+1098000000 1098007759
+1101000000 1101007759
+1104000000 1104007773
+1107000000 1107007764
+1110000000 1110007770
+1113000000 1113007759
+1116000000 1116007709
+1119000000 1119007768
+1122000000 1122007764
+1125000000 1125007751
+1128000000 1128007762
+1131000000 1131007680
+1134000000 1134007763
+1137000000 1137007755
+1140000000 1140007756
+1143000000 1143007767
+1146000000 1146007767
+1149000000 1149007721
+1152000000 1152007776
+1155000000 1155007741
+1158000000 1158007769
+1161000000 1161007768
+1164000000 1164007762
+1167000000 1167007717
+1170000000 1170007786
+1173000000 1173007765
+1176000000 1176007773
+1179000000 1179007759
+1182000000 1182007763
+1185000000 1185007765
+1188000000 1188007755
+1191000000 1191007751
+1194000000 1194007759
+1197000000 1197007755
+1200000000 1200007761
+1203000000 1203007752
+1206000000 1206007768
+1209000000 1209007738
+1212000000 1212007759
+1215000000 1215007754
+1218000000 1218007763
+1221000000 1221007752
+1224000000 1224007776
+1227000000 1227007757
+1230000000 1230007742
+1233000000 1233007756
+1236000000 1236007759
+1239000000 1239007762
+1242000000 1242007763
+1245000000 1245007773
+1248000000 1248007762
+1251000000 1251007766
+1254000000 1254007757
+1257000000 1257007755
+1260000000 1260007757
+1263000000 1263007756
+1266000000 1266007722
+1269000000 1269007752
+1272000000 1272007746
+1275000000 1275007762
+1278000000 1278007738
+1281000000 1281007750
+1284000000 1284007763
+1287000000 1287007765
+1290000000 1290007754
+1293000000 1293007696
+1296000000 1296007694
+1299000000 1299007766
+1302000000 1302007681
+1305000000 1305007755
+1308000000 1308007767
+1311000000 1311007759
+1314000000 1314007759
+1317000000 1317007718
+1320000000 1320007743
+1323000000 1323007666
+1326000000 1326007747
+1329000000 1329007759
+1332000000 1332007762
+1335000000 1335007729
+1338000000 1338007740
+1341000000 1341007758
+1344000000 1344007754
+1347000000 1347007762
+1350000000 1350007761
+1353000000 1353007755
+1356000000 1356007780
+1359000000 1359007759
+1362000000 1362007763
+1365000000 1365007748
+1368000000 1368007746
+1371000000 1371007717
+1374000000 1374007747
+1377000000 1377007755
+1380000000 1380007772
+1383000000 1383007762
+1386000000 1386007712
+1389000000 1389007766
+1392000000 1392007760
+1395000000 1395007754
+1398000000 1398007754
+1401000000 1401007768
+1404000000 1404007759
+1407000000 1407007765
+1410000000 1410007754
+1413000000 1413007704
+1416000000 1416007763
+1419000000 1419007759
+1422000000 1422007746
+1425000000 1425007757
+1428000000 1428007675
+1431000000 1431007758
+1434000000 1434007750
+1437000000 1437007751
+1440000000 1440007762
+1443000000 1443007762
+1446000000 1446007716
+1449000000 1449007771
+1452000000 1452007736
+1455000000 1455007764
+1458000000 1458007763
+1461000000 1461007757
+1464000000 1464007712
+1467000000 1467007781
+1470000000 1470007760
+1473000000 1473007768
+1476000000 1476007754
+1479000000 1479007758
+1482000000 1482007760
+1485000000 1485007750
+1488000000 1488007746
+1491000000 1491007754
+1494000000 1494007750
+1497000000 1497007756
+1500000000 1500007747
+1503000000 1503007763
+1506000000 1506007733
+1509000000 1509007754
+1512000000 1512007749
+1515000000 1515007758
+1518000000 1518007747
+1521000000 1521007771
+1524000000 1524007752
+1527000000 1527007737
+1530000000 1530007751
+1533000000 1533007754
+1536000000 1536007757
+1539000000 1539007758
+1542000000 1542007768
+1545000000 1545007757
+1548000000 1548007761
+1551000000 1551007752
+1554000000 1554007750
+1557000000 1557007752
+1560000000 1560007751
+1563000000 1563007717
+1566000000 1566007747
+1569000000 1569007741
+1572000000 1572007757
+1575000000 1575007733
+1578000000 1578007745
+1581000000 1581007758
+1584000000 1584007760
+1587000000 1587007749
+1590000000 1590007691
+1593000000 1593007689
+1596000000 1596007761
+1599000000 1599007676
+1602000000 1602007750
+1605000000 1605007762
+1608000000 1608007754
+1611000000 1611007754
+1614000000 1614007713
+1617000000 1617007738
+1620000000 1620007661
+1623000000 1623007742
+1626000000 1626007754
+1629000000 1629007757
+1632000000 1632007724
+1635000000 1635007735
+1638000000 1638007753
+1641000000 1641007749
+1644000000 1644007757
+1647000000 1647007756
+1650000000 1650007750
+1653000000 1653007775
+1656000000 1656007754
+1659000000 1659007758
+1662000000 1662007743
+1665000000 1665007741
+1668000000 1668007712
+1671000000 1671007742
+1674000000 1674007750
+1677000000 1677007767
+1680000000 1680007757
+1683000000 1683007707
+1686000000 1686007761
+1689000000 1689007755
+1692000000 1692007749
+1695000000 1695007749
+1698000000 1698007763
+1701000000 1701007754
+1704000000 1704007760
+1707000000 1707007749
+1710000000 1710007699
+1713000000 1713007758
+1716000000 1716007754
+1719000000 1719007741
+1722000000 1722007752
+1725000000 1725007670
+1728000000 1728007753
+1731000000 1731007745
+1734000000 1734007746
+1737000000 1737007757
+1740000000 1740007757
+1743000000 1743007711
+1746000000 1746007766
+1749000000 1749007731
+1752000000 1752007759
+1755000000 1755007758
+1758000000 1758007752
+1761000000 1761007707
+1764000000 1764007776
+1767000000 1767007755
+1770000000 1770007763
+1773000000 1773007749
+1776000000 1776007753
+1779000000 1779007755
+1782000000 1782007745
+1785000000 1785007741
+1788000000 1788007749
+1791000000 1791007745
+1794000000 1794007751
+1797000000 1797007742
+1800000000 1800007758
+1803000000 1803007728
+1806000000 1806007749
+1809000000 1809007744
+1812000000 1812007753
+1815000000 1815007742
+1818000000 1818007766
+1821000000 1821007747
+1824000000 1824007732
+1827000000 1827007746
+1830000000 1830007749
+1833000000 1833007752
+1836000000 1836007753
+1839000000 1839007763
+1842000000 1842007752
+1845000000 1845007756
+1848000000 1848007747
+1851000000 1851007745
+1854000000 1854007747
+1857000000 1857007746
+1860000000 1860007712
+1863000000 1863007742
+1866000000 1866007736
+1869000000 1869007752
+1872000000 1872007728
+1875000000 1875007740
+1878000000 1878007753
+1881000000 1881007755
+1884000000 1884007744
+1887000000 1887007686
+1890000000 1890007684
+1893000000 1893007756
+1896000000 1896007671
+1899000000 1899007745
+1902000000 1902007757
+1905000000 1905007749
+1908000000 1908007749
+1911000000 1911007708
+1914000000 1914007733
+1917000000 1917007656
+1920000000 1920007737
+1923000000 1923007749
+1926000000 1926007752
+1929000000 1929007719
+1932000000 1932007730
+1935000000 1935007748
+1938000000 1938007744
+1941000000 1941007752
+1944000000 1944007751
+1947000000 1947007745
+1950000000 1950007770
+1953000000 1953007749
+1956000000 1956007753
+1959000000 1959007738
+1962000000 1962007736
+1965000000 1965007707
+1968000000 1968007737
+1971000000 1971007745
+1974000000 1974007762
+1977000000 1977007752
+1980000000 1980007702
+1983000000 1983007756
+1986000000 1986007750
+1989000000 1989007744
+1992000000 1992007744
+1995000000 1995007758
+1998000000 1998007749
+2001000000 2001007755
+2004000000 2004007744
+2007000000 2007007694
+2010000000 2010007753
+2013000000 2013007749
+2016000000 2016007736
+2019000000 2019007747
+2022000000 2022007665
+2025000000 2025007748
+2028000000 2028007740
+2031000000 2031007741
+2034000000 2034007752
+2037000000 2037007752
+2040000000 2040007706
+2043000000 2043007761
+2046000000 2046007726
+2049000000 2049007754
+2052000000 2052007753
+2055000000 2055007747
+2058000000 2058007702
+2061000000 2061007771
+2064000000 2064007750
+2067000000 2067007758
+2070000000 2070007744
+2073000000 2073007748
+2076000000 2076007750
+2079000000 2079007740
+2082000000 2082007736
+2085000000 2085007744
+2088000000 2088007740
+2091000000 2091007746
+2094000000 2094007737
+2097000000 2097007753
+2100000000 2100007723
+2103000000 2103007744
+2106000000 2106007739
+2109000000 2109007748
+2112000000 2112007737
+2115000000 2115007761
+2118000000 2118007742
+2121000000 2121007727
+2124000000 2124007741
+2127000000 2127007744
+2130000000 2130007747
+2133000000 2133007748
+2136000000 2136007758
+2139000000 2139007747
+2142000000 2142007751
+2145000000 2145007742
+2148000000 2148007740
+2151000000 2151007742
+2154000000 2154007741
+2157000000 2157007707
+2160000000 2160007737
+2163000000 2163007731
+2166000000 2166007747
+2169000000 2169007723
+2172000000 2172007735
+2175000000 2175007748
+2178000000 2178007750
+2181000000 2181007739
+2184000000 2184007681
+2187000000 2187007679
+2190000000 2190007751
+2193000000 2193007666
+2196000000 2196007740
+2199000000 2199007752
+2202000000 2202007744
+2205000000 2205007744
+2208000000 2208007703
+2211000000 2211007728
+2214000000 2214007651
+2217000000 2217007732
+2220000000 2220007744
+2223000000 2223007747
+2226000000 2226007714
+2229000000 2229007725
+2232000000 2232007743
+2235000000 2235007739
+2238000000 2238007747
+2241000000 2241007746
+2244000000 2244007740
+2247000000 2247007765
+2250000000 2250007744
+2253000000 2253007748
+2256000000 2256007733
+2259000000 2259007731
+2262000000 2262007702
+2265000000 2265007732
+2268000000 2268007740
+2271000000 2271007757
+2274000000 2274007747
+2277000000 2277007697
+2280000000 2280007751
+2283000000 2283007745
+2286000000 2286007739
+2289000000 2289007739
+2292000000 2292007753
+2295000000 2295007744
+2298000000 2298007750
+2301000000 2301007739
+2304000000 2304007689
+2307000000 2307007748
+2310000000 2310007744
+2313000000 2313007731
+2316000000 2316007742
+2319000000 2319007660
+2322000000 2322007743
+2325000000 2325007735
+2328000000 2328007736
+2331000000 2331007747
+2334000000 2334007747
+2337000000 2337007701
+2340000000 2340007756
+2343000000 2343007721
+2346000000 2346007749
+2349000000 2349007748
+2352000000 2352007742
+2355000000 2355007697
+2358000000 2358007766
+2361000000 2361007745
+2364000000 2364007753
+2367000000 2367007739
+2370000000 2370007743
+2373000000 2373007745
+2376000000 2376007735
+2379000000 2379007731
+2382000000 2382007739
+2385000000 2385007735
+2388000000 2388007741
+2391000000 2391007732
+2394000000 2394007748
+2397000000 2397007718
+2400000000 2400007739
+2403000000 2403007734
+2406000000 2406007743
+2409000000 2409007732
+2412000000 2412007756
+2415000000 2415007737
+2418000000 2418007722
+2421000000 2421007736
+2424000000 2424007739
+2427000000 2427007742
+2430000000 2430007743
+2433000000 2433007753
+2436000000 2436007742
+2439000000 2439007746
+2442000000 2442007737
+2445000000 2445007735
+2448000000 2448007737
+2451000000 2451007736
+2454000000 2454007702
+2457000000 2457007732
+2460000000 2460007726
+2463000000 2463007742
+2466000000 2466007718
+2469000000 2469007730
+2472000000 2472007743
+2475000000 2475007745
+2478000000 2478007734
+2481000000 2481007676
+2484000000 2484007674
+2487000000 2487007746
+2490000000 2490007661
+2493000000 2493007735
+2496000000 2496007747
+2499000000 2499007739
+2502000000 2502007739
+2505000000 2505007698
+2508000000 2508007723
+2511000000 2511007646
+2514000000 2514007727
+2517000000 2517007739
+2520000000 2520007742
+2523000000 2523007709
+2526000000 2526007720
+2529000000 2529007738
+2532000000 2532007734
+2535000000 2535007742
+2538000000 2538007741
+2541000000 2541007735
+2544000000 2544007760
+2547000000 2547007739
+2550000000 2550007743
+2553000000 2553007728
+2556000000 2556007726
+2559000000 2559007697
+2562000000 2562007727
+2565000000 2565007735
+2568000000 2568007752
+2571000000 2571007742
+2574000000 2574007692
+2577000000 2577007746
+2580000000 2580007740
+2583000000 2583007734
+2586000000 2586007734
+2589000000 2589007748
+2592000000 2592007739
+2595000000 2595007745
+2598000000 2598007734
+2601000000 2601007684
+2604000000 2604007743
+2607000000 2607007739
+2610000000 2610007726
+2613000000 2613007737
+2616000000 2616007655
+2619000000 2619007738
+2622000000 2622007730
+2625000000 2625007731
+2628000000 2628007742
+2631000000 2631007742
+2634000000 2634007696
+2637000000 2637007751
+2640000000 2640007716
+2643000000 2643007744
+2646000000 2646007743
+2649000000 2649007737
+2652000000 2652007692
+2655000000 2655007761
+2658000000 2658007740
+2661000000 2661007748
+2664000000 2664007734
+2667000000 2667007738
+2670000000 2670007740
+2673000000 2673007730
+2676000000 2676007726
+2679000000 2679007734
+2682000000 2682007730
+2685000000 2685007736
+2688000000 2688007727
+2691000000 2691007743
+2694000000 2694007713
+2697000000 2697007734
+2700000000 2700007729
+2703000000 2703007738
+2706000000 2706007727
+2709000000 2709007751
+2712000000 2712007732
+2715000000 2715007717
+2718000000 2718007731
+2721000000 2721007734
+2724000000 2724007737
+2727000000 2727007738
+2730000000 2730007748
+2733000000 2733007737
+2736000000 2736007741
+2739000000 2739007732
+2742000000 2742007730
+2745000000 2745007732
+2748000000 2748007731
+2751000000 2751007697
+2754000000 2754007727
+2757000000 2757007721
+2760000000 2760007737
+2763000000 2763007713
+2766000000 2766007725
+2769000000 2769007738
+2772000000 2772007740
+2775000000 2775007729
+2778000000 2778007671
+2781000000 2781007669
+2784000000 2784007741
+2787000000 2787007656
+2790000000 2790007730
+2793000000 2793007742
+2796000000 2796007734
+2799000000 2799007734
+2802000000 2802007693
+2805000000 2805007718
+2808000000 2808007641
+2811000000 2811007722
+2814000000 2814007734
+2817000000 2817007737
+2820000000 2820007704
+2823000000 2823007715
+2826000000 2826007733
+2829000000 2829007729
+2832000000 2832007737
+2835000000 2835007736
+2838000000 2838007730
+2841000000 2841007755
+2844000000 2844007734
+2847000000 2847007738
+2850000000 2850007723
+2853000000 2853007721
+2856000000 2856007692
+2859000000 2859007722
+2862000000 2862007730
+2865000000 2865007747
+2868000000 2868007737
+2871000000 2871007687
+2874000000 2874007741
+2877000000 2877007735
+2880000000 2880007729
+2883000000 2883007729
+2886000000 2886007743
+2889000000 2889007734
+2892000000 2892007740
+2895000000 2895007729
+2898000000 2898007679
+2901000000 2901007738
+2904000000 2904007734
+2907000000 2907007721
+2910000000 2910007732
+2913000000 2913007650
+2916000000 2916007733
+2919000000 2919007725
+2922000000 2922007726
+2925000000 2925007737
+2928000000 2928007737
+2931000000 2931007691
+2934000000 2934007746
+2937000000 2937007711
+2940000000 2940007739
+2943000000 2943007738
+2946000000 2946007732
+2949000000 2949007687
+2952000000 2952007756
+2955000000 2955007735
+2958000000 2958007743
+2961000000 2961007729
+2964000000 2964007733
+2967000000 2967007735
+2970000000 2970007725
+2973000000 2973007721
+2976000000 2976007729
+2979000000 2979007725
+2982000000 2982007731
+2985000000 2985007722
+2988000000 2988007738
+2991000000 2991007708
+2994000000 2994007729
+2997000000 2997007724
+3000000000 3000007733
+3003000000 3003007722
+3006000000 3006007746
+3009000000 3009007727
+3012000000 3012007712
+3015000000 3015007726
+3018000000 3018007729
+3021000000 3021007732
+3024000000 3024007733
+3027000000 3027007743
+3030000000 3030007732
+3033000000 3033007736
+3036000000 3036007727
+3039000000 3039007725
+3042000000 3042007727
+3045000000 3045007726
+3048000000 3048007692
+3051000000 3051007722
+3054000000 3054007716
+3057000000 3057007732
+3060000000 3060007708
+3063000000 3063007720
+3066000000 3066007733
+3069000000 3069007735
+3072000000 3072007724
+3075000000 3075007666
+3078000000 3078007664
+3081000000 3081007736
+3084000000 3084007651
+3087000000 3087007725
+3090000000 3090007737
+3093000000 3093007729
+3096000000 3096007729
+3099000000 3099007688
+3102000000 3102007713
+3105000000 3105007636
+3108000000 3108007717
+3111000000 3111007729
+3114000000 3114007732
+3117000000 3117007699
+3120000000 3120007710
+3123000000 3123007728
+3126000000 3126007724
+3129000000 3129007732
+3132000000 3132007731
+3135000000 3135007725
+3138000000 3138007750
+3141000000 3141007729
+3144000000 3144007733
+3147000000 3147007718
+3150000000 3150007716
+3153000000 3153007687
+3156000000 3156007717
+3159000000 3159007725
+3162000000 3162007742
+3165000000 3165007732
+3168000000 3168007682
+3171000000 3171007736
+3174000000 3174007730
+3177000000 3177007724
+3180000000 3180007724
+3183000000 3183007738
+3186000000 3186007729
+3189000000 3189007735
+3192000000 3192007724
+3195000000 3195007674
+3198000000 3198007733
+3201000000 3201007729
+3204000000 3204007716
+3207000000 3207007727
+3210000000 3210007645
+3213000000 3213007728
+3216000000 3216007720
+3219000000 3219007721
+3222000000 3222007732
+3225000000 3225007732
+3228000000 3228007686
+3231000000 3231007741
+3234000000 3234007706
+3237000000 3237007734
+3240000000 3240007733
+3243000000 3243007727
+3246000000 3246007682
+3249000000 3249007751
+3252000000 3252007730
+3255000000 3255007738
+3258000000 3258007724
+3261000000 3261007728
+3264000000 3264007730
+3267000000 3267007720
+3270000000 3270007716
+3273000000 3273007724
+3276000000 3276007720
+3279000000 3279007726
+3282000000 3282007717
+3285000000 3285007733
+3288000000 3288007703
+3291000000 3291007724
+3294000000 3294007719
+3297000000 3297007728
+3300000000 3300007717
+3303000000 3303007741
+3306000000 3306007722
+3309000000 3309007707
+3312000000 3312007721
+3315000000 3315007724
+3318000000 3318007727
+3321000000 3321007728
+3324000000 3324007738
+3327000000 3327007727
+3330000000 3330007731
+3333000000 3333007722
+3336000000 3336007720
+3339000000 3339007722
+3342000000 3342007721
+3345000000 3345007687
+3348000000 3348007717
+3351000000 3351007711
+3354000000 3354007727
+3357000000 3357007703
+3360000000 3360007715
+3363000000 3363007728
+3366000000 3366007730
+3369000000 3369007719
+3372000000 3372007661
+3375000000 3375007659
+3378000000 3378007731
+3381000000 3381007646
+3384000000 3384007720
+3387000000 3387007732
+3390000000 3390007724
+3393000000 3393007724
+3396000000 3396007683
+3399000000 3399007708
+3402000000 3402007631
+3405000000 3405007712
+3408000000 3408007724
+3411000000 3411007727
+3414000000 3414007694
+3417000000 3417007705
+3420000000 3420007723
+3423000000 3423007719
+3426000000 3426007727
+3429000000 3429007726
+3432000000 3432007720
+3435000000 3435007745
+3438000000 3438007724
+3441000000 3441007728
+3444000000 3444007713
+3447000000 3447007711
+3450000000 3450007682
+3453000000 3453007712
+3456000000 3456007720
+3459000000 3459007737
+3462000000 3462007727
+3465000000 3465007677
+3468000000 3468007731
+3471000000 3471007725
+3474000000 3474007719
+3477000000 3477007719
+3480000000 3480007733
+3483000000 3483007724
+3486000000 3486007730
+3489000000 3489007719
+3492000000 3492007669
+3495000000 3495007728
+3498000000 3498007724
+3501000000 3501007711
+3504000000 3504007722
+3507000000 3507007640
+3510000000 3510007723
+3513000000 3513007715
+3516000000 3516007716
+3519000000 3519007727
+3522000000 3522007727
+3525000000 3525007681
+3528000000 3528007736
+3531000000 3531007701
+3534000000 3534007729
+3537000000 3537007728
+3540000000 3540007722
+3543000000 3543007677
+3546000000 3546007746
+3549000000 3549007725
+3552000000 3552007733
+3555000000 3555007719
+3558000000 3558007723
+3561000000 3561007725
+3564000000 3564007715
+3567000000 3567007711
+3570000000 3570007719
+3573000000 3573007715
+3576000000 3576007721
+3579000000 3579007712
+3582000000 3582007728
+3585000000 3585007698
+3588000000 3588007719
+3591000000 3591007714
+3594000000 3594007723
+3597000000 3597007712
+3600000000 3600007736
+3603000000 3603007717
+3606000000 3606007702
+3609000000 3609007716
+3612000000 3612007719
+3615000000 3615007722
+3618000000 3618007723
+3621000000 3621007733
+3624000000 3624007722
+3627000000 3627007726
+3630000000 3630007717
+3633000000 3633007715
+3636000000 3636007717
+3639000000 3639007716
+3642000000 3642007682
+3645000000 3645007712
+3648000000 3648007706
+3651000000 3651007722
+3654000000 3654007698
+3657000000 3657007710
+3660000000 3660007723
+3663000000 3663007725
+3666000000 3666007714
+3669000000 3669007656
+3672000000 3672007654
+3675000000 3675007726
+3678000000 3678007641
+3681000000 3681007715
+3684000000 3684007727
+3687000000 3687007719
+3690000000 3690007719
+3693000000 3693007678
+3696000000 3696007703
+3699000000 3699007626
+3702000000 3702007707
+3705000000 3705007719
+3708000000 3708007722
+3711000000 3711007689
+3714000000 3714007700
+3717000000 3717007718
+3720000000 3720007714
+3723000000 3723007722
+3726000000 3726007721
+3729000000 3729007715
+3732000000 3732007740
+3735000000 3735007719
+3738000000 3738007723
+3741000000 3741007708
+3744000000 3744007706
+3747000000 3747007677
+3750000000 3750007707
+3753000000 3753007715
+3756000000 3756007732
+3759000000 3759007722
+3762000000 3762007672
+3765000000 3765007726
+3768000000 3768007720
+3771000000 3771007714
+3774000000 3774007714
+3777000000 3777007728
+3780000000 3780007719
+3783000000 3783007725
+3786000000 3786007714
+3789000000 3789007664
+3792000000 3792007723
+3795000000 3795007719
+3798000000 3798007706
+3801000000 3801007717
+3804000000 3804007635
+3807000000 3807007718
+3810000000 3810007710
+3813000000 3813007711
+3816000000 3816007722
+3819000000 3819007722
+3822000000 3822007676
+3825000000 3825007731
+3828000000 3828007696
+3831000000 3831007724
+3834000000 3834007723
+3837000000 3837007717
+3840000000 3840007672
+3843000000 3843007741
+3846000000 3846007720
+3849000000 3849007728
+3852000000 3852007714
+3855000000 3855007718
+3858000000 3858007720
+3861000000 3861007710
+3864000000 3864007706
+3867000000 3867007714
+3870000000 3870007710
+3873000000 3873007716
+3876000000 3876007707
+3879000000 3879007723
+3882000000 3882007693
+3885000000 3885007714
+3888000000 3888007709
+3891000000 3891007718
+3894000000 3894007707
+3897000000 3897007731
+3900000000 3900007712
+3903000000 3903007697
+3906000000 3906007711
+3909000000 3909007714
+3912000000 3912007717
+3915000000 3915007718
+3918000000 3918007728
+3921000000 3921007717
+3924000000 3924007721
+3927000000 3927007712
+3930000000 3930007710
+3933000000 3933007712
+3936000000 3936007711
+3939000000 3939007677
+3942000000 3942007707
+3945000000 3945007701
+3948000000 3948007717
+3951000000 3951007693
+3954000000 3954007705
+3957000000 3957007718
+3960000000 3960007720
+3963000000 3963007709
+3966000000 3966007651
+3969000000 3969007649
+3972000000 3972007721
+3975000000 3975007636
+3978000000 3978007710
+3981000000 3981007722
+3984000000 3984007714
+3987000000 3987007714
+3990000000 3990007673
+3993000000 3993007698
+3996000000 3996007621
+3999000000 3999007702
+4002000000 4002007714
+4005000000 4005007717
+4008000000 4008007684
+4011000000 4011007695
+4014000000 4014007713
+4017000000 4017007709
+4020000000 4020007717
+4023000000 4023007716
+4026000000 4026007710
+4029000000 4029007735
+4032000000 4032007714
+4035000000 4035007718
+4038000000 4038007703
+4041000000 4041007701
+4044000000 4044007672
+4047000000 4047007702
+4050000000 4050007710
+4053000000 4053007727
+4056000000 4056007717
+4059000000 4059007667
+4062000000 4062007721
+4065000000 4065007715
+4068000000 4068007709
+4071000000 4071007709
+4074000000 4074007723
+4077000000 4077007714
+4080000000 4080007720
+4083000000 4083007709
+4086000000 4086007659
+4089000000 4089007718
+4092000000 4092007714
+4095000000 4095007701
+4098000000 4098007712
+4101000000 4101007630
+4104000000 4104007713
+4107000000 4107007705
+4110000000 4110007706
+4113000000 4113007717
+4116000000 4116007717
+4119000000 4119007671
+4122000000 4122007726
+4125000000 4125007691
+4128000000 4128007719
+4131000000 4131007718
+4134000000 4134007712
+4137000000 4137007667
+4140000000 4140007736
+4143000000 4143007715
+4146000000 4146007723
+4149000000 4149007709
+4152000000 4152007713
+4155000000 4155007715
+4158000000 4158007705
+4161000000 4161007701
+4164000000 4164007709
+4167000000 4167007705
+4170000000 4170007711
+4173000000 4173007702
+4176000000 4176007718
+4179000000 4179007688
+4182000000 4182007709
+4185000000 4185007704
+4188000000 4188007713
+4191000000 4191007702
+4194000000 4194007726
+4197000000 4197007707
+4200000000 4200007692
+4203000000 4203007706
+4206000000 4206007709
+4209000000 4209007712
+4212000000 4212007713
+4215000000 4215007723
+4218000000 4218007712
+4221000000 4221007716
+4224000000 4224007707
+4227000000 4227007705
+4230000000 4230007707
+4233000000 4233007706
+4236000000 4236007672
+4239000000 4239007702
+4242000000 4242007696
+4245000000 4245007712
+4248000000 4248007688
+4251000000 4251007700
+4254000000 4254007713
+4257000000 4257007715
+4260000000 4260007704
+4263000000 4263007646
+4266000000 4266007644
+4269000000 4269007716
+4272000000 4272007631
+4275000000 4275007705
+4278000000 4278007717
+4281000000 4281007709
+4284000000 4284007709
+4287000000 4287007668
+4290000000 4290007693
+4293000000 4293007616
+4296000000 4296007697
+4299000000 4299007709
+4302000000 4302007712
+4305000000 4305007679
+4308000000 4308007690
+4311000000 4311007708
+4314000000 4314007704
+4317000000 4317007712
+4320000000 4320007711
+4323000000 4323007705
+4326000000 4326007730
+4329000000 4329007709
+4332000000 4332007713
+4335000000 4335007698
+4338000000 4338007696
+4341000000 4341007667
+4344000000 4344007697
+4347000000 4347007705
+4350000000 4350007722
+4353000000 4353007712
+4356000000 4356007662
+4359000000 4359007716
+4362000000 4362007710
+4365000000 4365007704
+4368000000 4368007704
+4371000000 4371007718
+4374000000 4374007709
+4377000000 4377007715
+4380000000 4380007704
+4383000000 4383007654
+4386000000 4386007713
+4389000000 4389007709
+4392000000 4392007696
+4395000000 4395007707
+4398000000 4398007625
+4401000000 4401007708
+4404000000 4404007700
+4407000000 4407007701
+4410000000 4410007712
+4413000000 4413007712
+4416000000 4416007666
+4419000000 4419007721
+4422000000 4422007686
+4425000000 4425007714
+4428000000 4428007713
+4431000000 4431007707
+4434000000 4434007662
+4437000000 4437007731
+4440000000 4440007710
+4443000000 4443007718
+4446000000 4446007704
+4449000000 4449007708
+4452000000 4452007710
+4455000000 4455007700
+4458000000 4458007696
+4461000000 4461007704
+4464000000 4464007700
+4467000000 4467007706
+4470000000 4470007697
+4473000000 4473007713
+4476000000 4476007683
+4479000000 4479007704
+4482000000 4482007699
+4485000000 4485007708
+4488000000 4488007697
+4491000000 4491007721
+4494000000 4494007702
+4497000000 4497007687
+4500000000 4500007701
+4503000000 4503007704
+4506000000 4506007707
+4509000000 4509007708
+4512000000 4512007718
+4515000000 4515007707
+4518000000 4518007711
+4521000000 4521007702
+4524000000 4524007700
+4527000000 4527007702
+4530000000 4530007701
+4533000000 4533007667
+4536000000 4536007697
+4539000000 4539007691
+4542000000 4542007707
+4545000000 4545007683
+4548000000 4548007695
+4551000000 4551007708
+4554000000 4554007710
+4557000000 4557007699
+4560000000 4560007641
+4563000000 4563007639
+4566000000 4566007711
+4569000000 4569007626
+4572000000 4572007700
+4575000000 4575007712
+4578000000 4578007704
+4581000000 4581007704
+4584000000 4584007663
+4587000000 4587007688
+4590000000 4590007611
+4593000000 4593007692
+4596000000 4596007704
+4599000000 4599007707
+4602000000 4602007674
+4605000000 4605007685
+4608000000 4608007703
+4611000000 4611007699
+4614000000 4614007707
+4617000000 4617007706
+4620000000 4620007700
+4623000000 4623007725
+4626000000 4626007704
+4629000000 4629007708
+4632000000 4632007693
+4635000000 4635007691
+4638000000 4638007662
+4641000000 4641007692
+4644000000 4644007700
+4647000000 4647007717
+4650000000 4650007707
+4653000000 4653007657
+4656000000 4656007711
+4659000000 4659007705
+4662000000 4662007699
+4665000000 4665007699
+4668000000 4668007713
+4671000000 4671007704
+4674000000 4674007710
+4677000000 4677007699
+4680000000 4680007649
+4683000000 4683007708
+4686000000 4686007704
+4689000000 4689007691
+4692000000 4692007702
+4695000000 4695007620
+4698000000 4698007703
+4701000000 4701007695
+4704000000 4704007696
+4707000000 4707007707
+4710000000 4710007707
+4713000000 4713007661
+4716000000 4716007716
+4719000000 4719007681
+4722000000 4722007709
+4725000000 4725007708
+4728000000 4728007702
+4731000000 4731007657
+4734000000 4734007726
+4737000000 4737007705
+4740000000 4740007713
+4743000000 4743007699
+4746000000 4746007703
+4749000000 4749007705
+4752000000 4752007695
+4755000000 4755007691
+4758000000 4758007699
+4761000000 4761007695
+4764000000 4764007701
+4767000000 4767007692
+4770000000 4770007708
+4773000000 4773007678
+4776000000 4776007699
+4779000000 4779007694
+4782000000 4782007703
+4785000000 4785007692
+4788000000 4788007716
+4791000000 4791007697
+4794000000 4794007682
+4797000000 4797007696
+4800000000 4800007699
+4803000000 4803007702
+4806000000 4806007703
+4809000000 4809007713
+4812000000 4812007702
+4815000000 4815007706
+4818000000 4818007697
+4821000000 4821007695
+4824000000 4824007697
+4827000000 4827007696
+4830000000 4830007662
+4833000000 4833007692
+4836000000 4836007686
+4839000000 4839007702
+4842000000 4842007678
+4845000000 4845007690
+4848000000 4848007703
+4851000000 4851007705
+4854000000 4854007694
+4857000000 4857007636
+4860000000 4860007634
+4863000000 4863007706
+4866000000 4866007621
+4869000000 4869007695
+4872000000 4872007707
+4875000000 4875007699
+4878000000 4878007699
+4881000000 4881007658
+4884000000 4884007683
+4887000000 4887007606
+4890000000 4890007687
+4893000000 4893007699
+4896000000 4896007702
+4899000000 4899007669
+4902000000 4902007680
+4905000000 4905007698
+4908000000 4908007694
+4911000000 4911007702
+4914000000 4914007701
+4917000000 4917007695
+4920000000 4920007720
+4923000000 4923007699
+4926000000 4926007703
+4929000000 4929007688
+4932000000 4932007686
+4935000000 4935007657
+4938000000 4938007687
+4941000000 4941007695
+4944000000 4944007712
+4947000000 4947007702
+4950000000 4950007652
+4953000000 4953007706
+4956000000 4956007700
+4959000000 4959007694
+4962000000 4962007694
+4965000000 4965007708
+4968000000 4968007699
+4971000000 4971007705
+4974000000 4974007694
+4977000000 4977007644
+4980000000 4980007703
+4983000000 4983007699
+4986000000 4986007686
+4989000000 4989007697
+4992000000 4992007615
+4995000000 4995007698
+4998000000 4998007690
+5001000000 5001007691
+5004000000 5004007702
+5007000000 5007007702
+5010000000 5010007656
+5013000000 5013007711
+5016000000 5016007676
+5019000000 5019007704
+5022000000 5022007703
+5025000000 5025007697
+5028000000 5028007652
+5031000000 5031007721
+5034000000 5034007700
+5037000000 5037007708
+5040000000 5040007694
+5043000000 5043007698
+5046000000 5046007700
+5049000000 5049007690
+5052000000 5052007686
+5055000000 5055007694
+5058000000 5058007690
+5061000000 5061007696
+5064000000 5064007687
+5067000000 5067007703
+5070000000 5070007673
+5073000000 5073007694
+5076000000 5076007689
+5079000000 5079007698
+5082000000 5082007687
+5085000000 5085007711
+5088000000 5088007692
+5091000000 5091007677
+5094000000 5094007691
+5097000000 5097007694
+5100000000 5100007697
+5103000000 5103007698
+5106000000 5106007708
+5109000000 5109007697
+5112000000 5112007701
+5115000000 5115007692
+5118000000 5118007690
+5121000000 5121007692
+5124000000 5124007691
+5127000000 5127007657
+5130000000 5130007687
+5133000000 5133007681
+5136000000 5136007697
+5139000000 5139007673
+5142000000 5142007685
+5145000000 5145007698
+5148000000 5148007700
+5151000000 5151007689
+5154000000 5154007631
+5157000000 5157007629
+5160000000 5160007701
+5163000000 5163007616
+5166000000 5166007690
+5169000000 5169007702
+5172000000 5172007694
+5175000000 5175007694
+5178000000 5178007653
+5181000000 5181007678
+5184000000 5184007601
+5187000000 5187007682
+5190000000 5190007694
+5193000000 5193007697
+5196000000 5196007664
+5199000000 5199007675
+5202000000 5202007693
+5205000000 5205007689
+5208000000 5208007697
+5211000000 5211007696
+5214000000 5214007690
+5217000000 5217007715
+5220000000 5220007694
+5223000000 5223007698
+5226000000 5226007683
+5229000000 5229007681
+5232000000 5232007652
+5235000000 5235007682
+5238000000 5238007690
+5241000000 5241007707
+5244000000 5244007697
+5247000000 5247007647
+5250000000 5250007701
+5253000000 5253007695
+5256000000 5256007689
+5259000000 5259007689
+5262000000 5262007703
+5265000000 5265007694
+5268000000 5268007700
+5271000000 5271007689
+5274000000 5274007639
+5277000000 5277007698
+5280000000 5280007694
+5283000000 5283007681
+5286000000 5286007692
+5289000000 5289007610
+5292000000 5292007693
+5295000000 5295007685
+5298000000 5298007686
+5301000000 5301007697
+5304000000 5304007697
+5307000000 5307007651
+5310000000 5310007706
+5313000000 5313007671
+5316000000 5316007699
+5319000000 5319007698
+5322000000 5322007692
+5325000000 5325007647
+5328000000 5328007716
+5331000000 5331007695
+5334000000 5334007703
+5337000000 5337007689
+5340000000 5340007693
+5343000000 5343007695
+5346000000 5346007685
+5349000000 5349007681
+5352000000 5352007689
+5355000000 5355007685
+5358000000 5358007691
+5361000000 5361007682
+5364000000 5364007698
+5367000000 5367007668
+5370000000 5370007689
+5373000000 5373007684
+5376000000 5376007693
+5379000000 5379007682
+5382000000 5382007706
+5385000000 5385007687
+5388000000 5388007672
+5391000000 5391007686
+5394000000 5394007689
+5397000000 5397007692
+5400000000 5400007693
+5403000000 5403007703
+5406000000 5406007692
+5409000000 5409007696
+5412000000 5412007687
+5415000000 5415007685
+5418000000 5418007687
+5421000000 5421007686
+5424000000 5424007652
+5427000000 5427007682
+5430000000 5430007676
+5433000000 5433007692
+5436000000 5436007668
+5439000000 5439007680
+5442000000 5442007693
+5445000000 5445007695
+5448000000 5448007684
+5451000000 5451007626
+5454000000 5454007624
+5457000000 5457007696
+5460000000 5460007611
+5463000000 5463007685
+5466000000 5466007697
+5469000000 5469007689
+5472000000 5472007689
+5475000000 5475007648
+5478000000 5478007673
+5481000000 5481007596
+5484000000 5484007677
+5487000000 5487007689
+5490000000 5490007692
+5493000000 5493007659
+5496000000 5496007670
+5499000000 5499007688
+5502000000 5502007684
+5505000000 5505007692
+5508000000 5508007691
+5511000000 5511007685
+5514000000 5514007710
+5517000000 5517007689
+5520000000 5520007693
+5523000000 5523007678
+5526000000 5526007676
+5529000000 5529007647
+5532000000 5532007677
+5535000000 5535007685
+5538000000 5538007702
+5541000000 5541007692
+5544000000 5544007642
+5547000000 5547007696
+5550000000 5550007690
+5553000000 5553007684
+5556000000 5556007684
+5559000000 5559007698
+5562000000 5562007689
+5565000000 5565007695
+5568000000 5568007684
+5571000000 5571007634
+5574000000 5574007693
+5577000000 5577007689
+5580000000 5580007676
+5583000000 5583007687
+5586000000 5586007605
+5589000000 5589007688
+5592000000 5592007680
+5595000000 5595007681
+5598000000 5598007692
+5601000000 5601007692
+5604000000 5604007646
+5607000000 5607007701
+5610000000 5610007666
+5613000000 5613007694
+5616000000 5616007693
+5619000000 5619007687
+5622000000 5622007642
+5625000000 5625007711
+5628000000 5628007690
+5631000000 5631007698
+5634000000 5634007684
+5637000000 5637007688
+5640000000 5640007690
+5643000000 5643007680
+5646000000 5646007676
+5649000000 5649007684
+5652000000 5652007680
+5655000000 5655007686
+5658000000 5658007677
+5661000000 5661007693
+5664000000 5664007663
+5667000000 5667007684
+5670000000 5670007679
+5673000000 5673007688
+5676000000 5676007677
+5679000000 5679007701
+5682000000 5682007682
+5685000000 5685007667
+5688000000 5688007681
+5691000000 5691007684
+5694000000 5694007687
+5697000000 5697007688
+5700000000 5700007698
+5703000000 5703007687
+5706000000 5706007691
+5709000000 5709007682
+5712000000 5712007680
+5715000000 5715007682
+5718000000 5718007681
+5721000000 5721007647
+5724000000 5724007677
+5727000000 5727007671
+5730000000 5730007687
+5733000000 5733007663
+5736000000 5736007675
+5739000000 5739007688
+5742000000 5742007690
+5745000000 5745007679
+5748000000 5748007621
+5751000000 5751007619
+5754000000 5754007691
+5757000000 5757007606
+5760000000 5760007680
+5763000000 5763007692
+5766000000 5766007684
+5769000000 5769007684
+5772000000 5772007643
+5775000000 5775007668
+5778000000 5778007591
+5781000000 5781007672
+5784000000 5784007684
+5787000000 5787007687
+5790000000 5790007654
+5793000000 5793007665
+5796000000 5796007683
+5799000000 5799007679
+5802000000 5802007687
+5805000000 5805007686
+5808000000 5808007680
+5811000000 5811007705
+5814000000 5814007684
+5817000000 5817007688
+5820000000 5820007673
+5823000000 5823007671
+5826000000 5826007642
+5829000000 5829007672
+5832000000 5832007680
+5835000000 5835007697
+5838000000 5838007687
+5841000000 5841007637
+5844000000 5844007691
+5847000000 5847007685
+5850000000 5850007679
+5853000000 5853007679
+5856000000 5856007693
+5859000000 5859007684
+5862000000 5862007690
+5865000000 5865007679
+5868000000 5868007629
+5871000000 5871007688
+5874000000 5874007684
+5877000000 5877007671
+5880000000 5880007682
+5883000000 5883007600
+5886000000 5886007683
+5889000000 5889007675
+5892000000 5892007676
+5895000000 5895007687
+5898000000 5898007687
+5901000000 5901007641
+5904000000 5904007696
+5907000000 5907007661
+5910000000 5910007689
+5913000000 5913007688
+5916000000 5916007682
+5919000000 5919007637
+5922000000 5922007706
+5925000000 5925007685
+5928000000 5928007693
+5931000000 5931007679
+5934000000 5934007683
+5937000000 5937007685
+5940000000 5940007675
+5943000000 5943007671
+5946000000 5946007679
+5949000000 5949007675
+5952000000 5952007681
+5955000000 5955007672
+5958000000 5958007688
+5961000000 5961007658
+5964000000 5964007679
+5967000000 5967007674
+5970000000 5970007683
+5973000000 5973007672
+5976000000 5976007696
+5979000000 5979007677
+5982000000 5982007662
+5985000000 5985007676
+5988000000 5988007679
+5991000000 5991007682
+5994000000 5994007683
+5997000000 5997007693
+6000000000 6000007682
+6003000000 6003007686
+6006000000 6006007677
+6009000000 6009007675
+6012000000 6012007677
+6015000000 6015007676
+6018000000 6018007642
+6021000000 6021007672
+6024000000 6024007666
+6027000000 6027007682
+6030000000 6030007658
+6033000000 6033007670
+6036000000 6036007683
+6039000000 6039007685
+6042000000 6042007674
+6045000000 6045007616
+6048000000 6048007614
+6051000000 6051007686
+6054000000 6054007601
+6057000000 6057007675
+6060000000 6060007687
+6063000000 6063007679
+6066000000 6066007679
+6069000000 6069007638
+6072000000 6072007663
+6075000000 6075007586
+6078000000 6078007667
+6081000000 6081007679
+6084000000 6084007682
+6087000000 6087007649
+6090000000 6090007660
+6093000000 6093007678
+6096000000 6096007674
+6099000000 6099007682
+6102000000 6102007681
+6105000000 6105007675
+6108000000 6108007700
+6111000000 6111007679
+6114000000 6114007683
+6117000000 6117007668
+6120000000 6120007666
+6123000000 6123007637
+6126000000 6126007667
+6129000000 6129007675
+6132000000 6132007692
+6135000000 6135007682
+6138000000 6138007632
+6141000000 6141007686
+6144000000 6144007680
+6147000000 6147007674
+6150000000 6150007674
+6153000000 6153007688
+6156000000 6156007679
+6159000000 6159007685
+6162000000 6162007674
+6165000000 6165007624
+6168000000 6168007683
+6171000000 6171007679
+6174000000 6174007666
+6177000000 6177007677
+6180000000 6180007595
+6183000000 6183007678
+6186000000 6186007670
+6189000000 6189007671
+6192000000 6192007682
+6195000000 6195007682
+6198000000 6198007636
+6201000000 6201007691
+6204000000 6204007656
+6207000000 6207007684
+6210000000 6210007683
+6213000000 6213007677
+6216000000 6216007632
+6219000000 6219007701
+6222000000 6222007680
+6225000000 6225007688
+6228000000 6228007674
+6231000000 6231007678
+6234000000 6234007680
+6237000000 6237007670
+6240000000 6240007666
+6243000000 6243007674
+6246000000 6246007670
+6249000000 6249007676
+6252000000 6252007667
+6255000000 6255007683
+6258000000 6258007653
+6261000000 6261007674
+6264000000 6264007669
+6267000000 6267007678
+6270000000 6270007667
+6273000000 6273007691
+6276000000 6276007672
+6279000000 6279007657
+6282000000 6282007671
+6285000000 6285007674
+6288000000 6288007677
+6291000000 6291007678
+6294000000 6294007688
+6297000000 6297007677
+6300000000 6300007681
+6303000000 6303007672
+6306000000 6306007670
+6309000000 6309007672
+6312000000 6312007671
+6315000000 6315007637
+6318000000 6318007667
+6321000000 6321007661
+6324000000 6324007677
+6327000000 6327007653
+6330000000 6330007665
+6333000000 6333007678
+6336000000 6336007680
+6339000000 6339007669
+6342000000 6342007611
+6345000000 6345007609
+6348000000 6348007681
+6351000000 6351007596
+6354000000 6354007670
+6357000000 6357007682
+6360000000 6360007674
+6363000000 6363007674
+6366000000 6366007633
+6369000000 6369007658
+6372000000 6372007581
+6375000000 6375007662
+6378000000 6378007674
+6381000000 6381007677
+6384000000 6384007644
+6387000000 6387007655
+6390000000 6390007673
+6393000000 6393007669
+6396000000 6396007677
+6399000000 6399007676
+6402000000 6402007670
+6405000000 6405007695
+6408000000 6408007674
+6411000000 6411007678
+6414000000 6414007663
+6417000000 6417007661
+6420000000 6420007632
+6423000000 6423007662
+6426000000 6426007670
+6429000000 6429007687
+6432000000 6432007677
+6435000000 6435007627
+6438000000 6438007681
+6441000000 6441007675
+6444000000 6444007669
+6447000000 6447007669
+6450000000 6450007683
+6453000000 6453007674
+6456000000 6456007680
+6459000000 6459007669
+6462000000 6462007619
+6465000000 6465007678
+6468000000 6468007674
+6471000000 6471007661
+6474000000 6474007672
+6477000000 6477007590
+6480000000 6480007673
+6483000000 6483007665
+6486000000 6486007666
+6489000000 6489007677
+6492000000 6492007677
+6495000000 6495007631
+6498000000 6498007686
+6501000000 6501007651
+6504000000 6504007679
+6507000000 6507007678
+6510000000 6510007672
+6513000000 6513007627
+6516000000 6516007696
+6519000000 6519007675
+6522000000 6522007683
+6525000000 6525007669
+6528000000 6528007673
+6531000000 6531007675
+6534000000 6534007665
+6537000000 6537007661
+6540000000 6540007669
+6543000000 6543007665
+6546000000 6546007671
+6549000000 6549007662
+6552000000 6552007678
+6555000000 6555007648
+6558000000 6558007669
+6561000000 6561007664
+6564000000 6564007673
+6567000000 6567007662
+6570000000 6570007686
+6573000000 6573007667
+6576000000 6576007652
+6579000000 6579007666
+6582000000 6582007669
+6585000000 6585007672
+6588000000 6588007673
+6591000000 6591007683
+6594000000 6594007672
+6597000000 6597007676
+6600000000 6600007667
+6603000000 6603007665
+6606000000 6606007667
+6609000000 6609007666
+6612000000 6612007632
+6615000000 6615007662
+6618000000 6618007656
+6621000000 6621007672
+6624000000 6624007648
+6627000000 6627007660
+6630000000 6630007673
+6633000000 6633007675
+6636000000 6636007664
+6639000000 6639007606
+6642000000 6642007604
+6645000000 6645007676
+6648000000 6648007591
+6651000000 6651007665
+6654000000 6654007677
+6657000000 6657007669
+6660000000 6660007669
+6663000000 6663007628
+6666000000 6666007653
+6669000000 6669007576
+6672000000 6672007657
+6675000000 6675007669
+6678000000 6678007672
+6681000000 6681007639
+6684000000 6684007650
+6687000000 6687007668
+6690000000 6690007664
+6693000000 6693007672
+6696000000 6696007671
+6699000000 6699007665
+6702000000 6702007690
+6705000000 6705007669
+6708000000 6708007673
+6711000000 6711007658
+6714000000 6714007656
+6717000000 6717007627
+6720000000 6720007657
+6723000000 6723007665
+6726000000 6726007682
+6729000000 6729007672
+6732000000 6732007622
+6735000000 6735007676
+6738000000 6738007670
+6741000000 6741007664
+6744000000 6744007664
+6747000000 6747007678
+6750000000 6750007669
+6753000000 6753007675
+6756000000 6756007664
+6759000000 6759007614
+6762000000 6762007673
+6765000000 6765007669
+6768000000 6768007656
+6771000000 6771007667
+6774000000 6774007585
+6777000000 6777007668
+6780000000 6780007660
+6783000000 6783007661
+6786000000 6786007672
+6789000000 6789007672
+6792000000 6792007626
+6795000000 6795007681
+6798000000 6798007646
+6801000000 6801007674
+6804000000 6804007673
+6807000000 6807007667
+6810000000 6810007622
+6813000000 6813007691
+6816000000 6816007670
+6819000000 6819007678
+6822000000 6822007664
+6825000000 6825007668
+6828000000 6828007670
+6831000000 6831007660
+6834000000 6834007656
+6837000000 6837007664
+6840000000 6840007660
+6843000000 6843007666
+6846000000 6846007657
+6849000000 6849007673
+6852000000 6852007643
+6855000000 6855007664
+6858000000 6858007659
+6861000000 6861007668
+6864000000 6864007657
+6867000000 6867007681
+6870000000 6870007662
+6873000000 6873007647
+6876000000 6876007661
+6879000000 6879007664
+6882000000 6882007667
+6885000000 6885007668
+6888000000 6888007678
+6891000000 6891007667
+6894000000 6894007671
+6897000000 6897007662
+6900000000 6900007660
+6903000000 6903007662
+6906000000 6906007661
+6909000000 6909007627
+6912000000 6912007657
+6915000000 6915007651
+6918000000 6918007667
+6921000000 6921007643
+6924000000 6924007655
+6927000000 6927007668
+6930000000 6930007670
+6933000000 6933007659
+6936000000 6936007601
+6939000000 6939007599
+6942000000 6942007671
+6945000000 6945007586
+6948000000 6948007660
+6951000000 6951007672
+6954000000 6954007664
+6957000000 6957007664
+6960000000 6960007623
+6963000000 6963007648
+6966000000 6966007571
+6969000000 6969007652
+6972000000 6972007664
+6975000000 6975007667
+6978000000 6978007634
+6981000000 6981007645
+6984000000 6984007663
+6987000000 6987007659
+6990000000 6990007667
+6993000000 6993007666
+6996000000 6996007660
+6999000000 6999007685
+7002000000 7002007664
+7005000000 7005007668
+7008000000 7008007653
+7011000000 7011007651
+7014000000 7014007622
+7017000000 7017007652
+7020000000 7020007660
+7023000000 7023007677
+7026000000 7026007667
+7029000000 7029007617
+7032000000 7032007671
+7035000000 7035007665
+7038000000 7038007659
+7041000000 7041007659
+7044000000 7044007673
+7047000000 7047007664
+7050000000 7050007670
+7053000000 7053007659
+7056000000 7056007609
+7059000000 7059007668
+7062000000 7062007664
+7065000000 7065007651
+7068000000 7068007662
+7071000000 7071007580
+7074000000 7074007663
+7077000000 7077007655
+7080000000 7080007656
+7083000000 7083007667
+7086000000 7086007667
+7089000000 7089007621
+7092000000 7092007676
+7095000000 7095007641
+7098000000 7098007669
+7101000000 7101007668
+7104000000 7104007662
+7107000000 7107007617
+7110000000 7110007686
+7113000000 7113007665
+7116000000 7116007673
+7119000000 7119007659
+7122000000 7122007663
+7125000000 7125007665
+7128000000 7128007655
+7131000000 7131007651
+7134000000 7134007659
+7137000000 7137007655
+7140000000 7140007661
+7143000000 7143007652
+7146000000 7146007668
+7149000000 7149007638
+7152000000 7152007659
+7155000000 7155007654
+7158000000 7158007663
+7161000000 7161007652
+7164000000 7164007676
+7167000000 7167007657
+7170000000 7170007642
+7173000000 7173007656
+7176000000 7176007659
+7179000000 7179007662
+7182000000 7182007663
+7185000000 7185007673
+7188000000 7188007662
+7191000000 7191007666
+7194000000 7194007657
+7197000000 7197007655
+7200000000 7200007657
+7203000000 7203007656
+7206000000 7206007622
+7209000000 7209007652
+7212000000 7212007646
+7215000000 7215007662
+7218000000 7218007638
+7221000000 7221007650
+7224000000 7224007663
+7227000000 7227007665
+7230000000 7230007654
+7233000000 7233007596
+7236000000 7236007594
+7239000000 7239007666
+7242000000 7242007581
+7245000000 7245007655
+7248000000 7248007667
+7251000000 7251007659
+7254000000 7254007659
+7257000000 7257007618
+7260000000 7260007643
+7263000000 7263007566
+7266000000 7266007647
+7269000000 7269007659
+7272000000 7272007662
+7275000000 7275007629
+7278000000 7278007640
+7281000000 7281007658
+7284000000 7284007654
+7287000000 7287007662
+7290000000 7290007661
+7293000000 7293007655
+7296000000 7296007680
+7299000000 7299007659
+7302000000 7302007663
+7305000000 7305007648
+7308000000 7308007646
+7311000000 7311007617
+7314000000 7314007647
+7317000000 7317007655
+7320000000 7320007672
+7323000000 7323007662
+7326000000 7326007612
+7329000000 7329007666
+7332000000 7332007660
+7335000000 7335007654
+7338000000 7338007654
+7341000000 7341007668
+7344000000 7344007659
+7347000000 7347007665
+7350000000 7350007654
+7353000000 7353007604
+7356000000 7356007663
+7359000000 7359007659
+7362000000 7362007646
+7365000000 7365007657
+7368000000 7368007575
+7371000000 7371007658
+7374000000 7374007650
+7377000000 7377007651
+7380000000 7380007662
+7383000000 7383007662
+7386000000 7386007616
+7389000000 7389007671
+7392000000 7392007636
+7395000000 7395007664
+7398000000 7398007663
+7401000000 7401007657
+7404000000 7404007612
+7407000000 7407007681
+7410000000 7410007660
+7413000000 7413007668
+7416000000 7416007654
+7419000000 7419007658
+7422000000 7422007660
+7425000000 7425007650
+7428000000 7428007646
+7431000000 7431007654
+7434000000 7434007650
+7437000000 7437007656
+7440000000 7440007647
+7443000000 7443007663
+7446000000 7446007633
+7449000000 7449007654
+7452000000 7452007649
+7455000000 7455007658
+7458000000 7458007647
+7461000000 7461007671
+7464000000 7464007652
+7467000000 7467007637
+7470000000 7470007651
+7473000000 7473007654
+7476000000 7476007657
+7479000000 7479007658
+7482000000 7482007668
+7485000000 7485007657
+7488000000 7488007661
+7491000000 7491007652
+7494000000 7494007650
+7497000000 7497007652
+7500000000 7500007651
+7503000000 7503007617
+7506000000 7506007647
+7509000000 7509007641
+7512000000 7512007657
+7515000000 7515007633
+7518000000 7518007645
+7521000000 7521007658
+7524000000 7524007660
+7527000000 7527007649
+7530000000 7530007591
+7533000000 7533007589
+7536000000 7536007661
+7539000000 7539007576
+7542000000 7542007650
+7545000000 7545007662
+7548000000 7548007654
+7551000000 7551007654
+7554000000 7554007613
+7557000000 7557007638
+7560000000 7560007561
+7563000000 7563007642
+7566000000 7566007654
+7569000000 7569007657
+7572000000 7572007624
+7575000000 7575007635
+7578000000 7578007653
+7581000000 7581007649
+7584000000 7584007657
+7587000000 7587007656
+7590000000 7590007650
+7593000000 7593007675
+7596000000 7596007654
+7599000000 7599007658
+7602000000 7602007643
+7605000000 7605007641
+7608000000 7608007612
+7611000000 7611007642
+7614000000 7614007650
+7617000000 7617007667
+7620000000 7620007657
+7623000000 7623007607
+7626000000 7626007661
+7629000000 7629007655
+7632000000 7632007649
+7635000000 7635007649
+7638000000 7638007663
+7641000000 7641007654
+7644000000 7644007660
+7647000000 7647007649
+7650000000 7650007599
+7653000000 7653007658
+7656000000 7656007654
+7659000000 7659007641
+7662000000 7662007652
+7665000000 7665007570
+7668000000 7668007653
+7671000000 7671007645
+7674000000 7674007646
+7677000000 7677007657
+7680000000 7680007657
+7683000000 7683007611
+7686000000 7686007666
+7689000000 7689007631
+7692000000 7692007659
+7695000000 7695007658
+7698000000 7698007652
+7701000000 7701007607
+7704000000 7704007676
+7707000000 7707007655
+7710000000 7710007663
+7713000000 7713007649
+7716000000 7716007653
+7719000000 7719007655
+7722000000 7722007645
+7725000000 7725007641
+7728000000 7728007649
+7731000000 7731007645
+7734000000 7734007651
+7737000000 7737007642
+7740000000 7740007658
+7743000000 7743007628
+7746000000 7746007649
+7749000000 7749007644
+7752000000 7752007653
+7755000000 7755007642
+7758000000 7758007666
+7761000000 7761007647
+7764000000 7764007632
+7767000000 7767007646
+7770000000 7770007649
+7773000000 7773007652
+7776000000 7776007653
+7779000000 7779007663
+7782000000 7782007652
+7785000000 7785007656
+7788000000 7788007647
+7791000000 7791007645
+7794000000 7794007647
+7797000000 7797007646
+7800000000 7800007612
+7803000000 7803007642
+7806000000 7806007636
+7809000000 7809007652
+7812000000 7812007628
+7815000000 7815007640
+7818000000 7818007653
+7821000000 7821007655
+7824000000 7824007644
+7827000000 7827007586
+7830000000 7830007584
+7833000000 7833007656
+7836000000 7836007571
+7839000000 7839007645
+7842000000 7842007657
+7845000000 7845007649
+7848000000 7848007649
+7851000000 7851007608
+7854000000 7854007633
+7857000000 7857007556
+7860000000 7860007637
+7863000000 7863007649
+7866000000 7866007652
+7869000000 7869007619
+7872000000 7872007630
+7875000000 7875007648
+7878000000 7878007644
+7881000000 7881007652
+7884000000 7884007651
+7887000000 7887007645
+7890000000 7890007670
+7893000000 7893007649
+7896000000 7896007653
+7899000000 7899007638
+7902000000 7902007636
+7905000000 7905007607
+7908000000 7908007637
+7911000000 7911007645
+7914000000 7914007662
+7917000000 7917007652
+7920000000 7920007602
+7923000000 7923007656
+7926000000 7926007650
+7929000000 7929007644
+7932000000 7932007644
+7935000000 7935007658
+7938000000 7938007649
+7941000000 7941007655
+7944000000 7944007644
+7947000000 7947007594
+7950000000 7950007653
+7953000000 7953007649
+7956000000 7956007636
+7959000000 7959007647
+7962000000 7962007565
+7965000000 7965007648
+7968000000 7968007640
+7971000000 7971007641
+7974000000 7974007652
+7977000000 7977007652
+7980000000 7980007606
+7983000000 7983007661
+7986000000 7986007626
+7989000000 7989007654
+7992000000 7992007653
+7995000000 7995007647
+7998000000 7998007602
+8001000000 8001007671
+8004000000 8004007650
+8007000000 8007007658
+8010000000 8010007644
+8013000000 8013007648
+8016000000 8016007650
+8019000000 8019007640
+8022000000 8022007636
+8025000000 8025007644
+8028000000 8028007640
+8031000000 8031007646
+8034000000 8034007637
+8037000000 8037007653
+8040000000 8040007623
+8043000000 8043007644
+8046000000 8046007639
+8049000000 8049007648
+8052000000 8052007637
+8055000000 8055007661
+8058000000 8058007642
+8061000000 8061007627
+8064000000 8064007641
+8067000000 8067007644
+8070000000 8070007647
+8073000000 8073007648
+8076000000 8076007658
+8079000000 8079007647
+8082000000 8082007651
+8085000000 8085007642
+8088000000 8088007640
+8091000000 8091007642
+8094000000 8094007641
+8097000000 8097007607
+8100000000 8100007637
+8103000000 8103007631
+8106000000 8106007647
+8109000000 8109007623
+8112000000 8112007635
+8115000000 8115007648
+8118000000 8118007650
+8121000000 8121007639
+8124000000 8124007581
+8127000000 8127007579
+8130000000 8130007651
+8133000000 8133007566
+8136000000 8136007640
+8139000000 8139007652
+8142000000 8142007644
+8145000000 8145007644
+8148000000 8148007603
+8151000000 8151007628
+8154000000 8154007551
+8157000000 8157007632
+8160000000 8160007644
+8163000000 8163007647
+8166000000 8166007614
+8169000000 8169007625
+8172000000 8172007643
+8175000000 8175007639
+8178000000 8178007647
+8181000000 8181007646
+8184000000 8184007640
+8187000000 8187007665
+8190000000 8190007644
+8193000000 8193007648
+8196000000 8196007633
+8199000000 8199007631
+8202000000 8202007602
+8205000000 8205007632
+8208000000 8208007640
+8211000000 8211007657
+8214000000 8214007647
+8217000000 8217007597
+8220000000 8220007651
+8223000000 8223007645
+8226000000 8226007639
+8229000000 8229007639
+8232000000 8232007653
+8235000000 8235007644
+8238000000 8238007650
+8241000000 8241007639
+8244000000 8244007589
+8247000000 8247007648
+8250000000 8250007644
+8253000000 8253007631
+8256000000 8256007642
+8259000000 8259007560
+8262000000 8262007643
+8265000000 8265007635
+8268000000 8268007636
+8271000000 8271007647
+8274000000 8274007647
+8277000000 8277007601
+8280000000 8280007656
+8283000000 8283007621
+8286000000 8286007649
+8289000000 8289007648
+8292000000 8292007642
+8295000000 8295007597
+8298000000 8298007666
+8301000000 8301007645
+8304000000 8304007653
+8307000000 8307007639
+8310000000 8310007643
+8313000000 8313007645
+8316000000 8316007635
+8319000000 8319007631
+8322000000 8322007639
+8325000000 8325007635
+8328000000 8328007641
+8331000000 8331007632
+8334000000 8334007648
+8337000000 8337007618
+8340000000 8340007639
+8343000000 8343007634
+8346000000 8346007643
+8349000000 8349007632
+8352000000 8352007656
+8355000000 8355007637
+8358000000 8358007622
+8361000000 8361007636
+8364000000 8364007639
+8367000000 8367007642
+8370000000 8370007643
+8373000000 8373007653
+8376000000 8376007642
+8379000000 8379007646
+8382000000 8382007637
+8385000000 8385007635
+8388000000 8388007637
+8391000000 8391007636
+8394000000 8394007602
+8397000000 8397007632
+8400000000 8400007626
+8403000000 8403007642
+8406000000 8406007618
+8409000000 8409007630
+8412000000 8412007643
+8415000000 8415007645
+8418000000 8418007634
+8421000000 8421007576
+8424000000 8424007574
+8427000000 8427007646
+8430000000 8430007561
+8433000000 8433007635
+8436000000 8436007647
+8439000000 8439007639
+8442000000 8442007639
+8445000000 8445007598
+8448000000 8448007623
+8451000000 8451007546
+8454000000 8454007627
+8457000000 8457007639
+8460000000 8460007642
+8463000000 8463007609
+8466000000 8466007620
+8469000000 8469007638
+8472000000 8472007634
+8475000000 8475007642
+8478000000 8478007641
+8481000000 8481007635
+8484000000 8484007660
+8487000000 8487007639
+8490000000 8490007643
+8493000000 8493007628
+8496000000 8496007626
+8499000000 8499007597
+8502000000 8502007627
+8505000000 8505007635
+8508000000 8508007652
+8511000000 8511007642
+8514000000 8514007592
+8517000000 8517007646
+8520000000 8520007640
+8523000000 8523007634
+8526000000 8526007634
+8529000000 8529007648
+8532000000 8532007639
+8535000000 8535007645
+8538000000 8538007634
+8541000000 8541007584
+8544000000 8544007643
+8547000000 8547007639
+8550000000 8550007626
+8553000000 8553007637
+8556000000 8556007555
+8559000000 8559007638
+8562000000 8562007630
+8565000000 8565007631
+8568000000 8568007642
+8571000000 8571007642
+8574000000 8574007596
+8577000000 8577007651
+8580000000 8580007616
+8583000000 8583007644
+8586000000 8586007643
+8589000000 8589007637
+8592000000 8592007592
+8595000000 8595007661
+8598000000 8598007640
+8601000000 8601007648
+8604000000 8604007634
+8607000000 8607007638
+8610000000 8610007640
+8613000000 8613007630
+8616000000 8616007626
+8619000000 8619007634
+8622000000 8622007630
+8625000000 8625007636
+8628000000 8628007627
+8631000000 8631007643
+8634000000 8634007613
+8637000000 8637007634
+8640000000 8640007629
+8643000000 8643007638
+8646000000 8646007627
+8649000000 8649007651
+8652000000 8652007632
+8655000000 8655007617
+8658000000 8658007631
+8661000000 8661007634
+8664000000 8664007637
+8667000000 8667007638
+8670000000 8670007648
+8673000000 8673007637
+8676000000 8676007641
+8679000000 8679007632
+8682000000 8682007630
+8685000000 8685007632
+8688000000 8688007631
+8691000000 8691007597
+8694000000 8694007627
+8697000000 8697007621
+8700000000 8700007637
+8703000000 8703007613
+8706000000 8706007625
+8709000000 8709007638
+8712000000 8712007640
+8715000000 8715007629
+8718000000 8718007571
+8721000000 8721007569
+8724000000 8724007641
+8727000000 8727007556
+8730000000 8730007630
+8733000000 8733007642
+8736000000 8736007634
+8739000000 8739007634
+8742000000 8742007593
+8745000000 8745007618
+8748000000 8748007541
+8751000000 8751007622
+8754000000 8754007634
+8757000000 8757007637
+8760000000 8760007604
+8763000000 8763007615
+8766000000 8766007633
+8769000000 8769007629
+8772000000 8772007637
+8775000000 8775007636
+8778000000 8778007630
+8781000000 8781007655
+8784000000 8784007634
+8787000000 8787007638
+8790000000 8790007623
+8793000000 8793007621
+8796000000 8796007592
+8799000000 8799007622
+8802000000 8802007630
+8805000000 8805007647
+8808000000 8808007637
+8811000000 8811007587
+8814000000 8814007641
+8817000000 8817007635
+8820000000 8820007629
+8823000000 8823007629
+8826000000 8826007643
+8829000000 8829007634
+8832000000 8832007640
+8835000000 8835007629
+8838000000 8838007579
+8841000000 8841007638
+8844000000 8844007634
+8847000000 8847007621
+8850000000 8850007632
+8853000000 8853007550
+8856000000 8856007633
+8859000000 8859007625
+8862000000 8862007626
+8865000000 8865007637
+8868000000 8868007637
+8871000000 8871007591
+8874000000 8874007646
+8877000000 8877007611
+8880000000 8880007639
+8883000000 8883007638
+8886000000 8886007632
+8889000000 8889007587
+8892000000 8892007656
+8895000000 8895007635
+8898000000 8898007643
+8901000000 8901007629
+8904000000 8904007633
+8907000000 8907007635
+8910000000 8910007625
+8913000000 8913007621
+8916000000 8916007629
+8919000000 8919007625
+8922000000 8922007631
+8925000000 8925007622
+8928000000 8928007638
+8931000000 8931007608
+8934000000 8934007629
+8937000000 8937007624
+8940000000 8940007633
+8943000000 8943007622
+8946000000 8946007646
+8949000000 8949007627
+8952000000 8952007612
+8955000000 8955007626
+8958000000 8958007629
+8961000000 8961007632
+8964000000 8964007633
+8967000000 8967007643
+8970000000 8970007632
+8973000000 8973007636
+8976000000 8976007627
+8979000000 8979007625
+8982000000 8982007627
+8985000000 8985007626
+8988000000 8988007592
+8991000000 8991007622
+8994000000 8994007616
+8997000000 8997007632
+9000000000 9000007608
+9003000000 9003007620
+9006000000 9006007633
+9009000000 9009007635
+9012000000 9012007624
+9015000000 9015007566
+9018000000 9018007564
+9021000000 9021007636
+9024000000 9024007551
+9027000000 9027007625
+9030000000 9030007637
+9033000000 9033007629
+9036000000 9036007629
+9039000000 9039007588
+9042000000 9042007613
+9045000000 9045007536
+9048000000 9048007617
+9051000000 9051007629
+9054000000 9054007632
+9057000000 9057007599
+9060000000 9060007610
+9063000000 9063007628
+9066000000 9066007624
+9069000000 9069007632
+9072000000 9072007631
+9075000000 9075007625
+9078000000 9078007650
+9081000000 9081007629
+9084000000 9084007633
+9087000000 9087007618
+9090000000 9090007616
+9093000000 9093007587
+9096000000 9096007617
+9099000000 9099007625
+9102000000 9102007642
+9105000000 9105007632
+9108000000 9108007582
+9111000000 9111007636
+9114000000 9114007630
+9117000000 9117007624
+9120000000 9120007624
+9123000000 9123007638
+9126000000 9126007629
+9129000000 9129007635
+9132000000 9132007624
+9135000000 9135007574
+9138000000 9138007633
+9141000000 9141007629
+9144000000 9144007616
+9147000000 9147007627
+9150000000 9150007545
+9153000000 9153007628
+9156000000 9156007620
+9159000000 9159007621
+9162000000 9162007632
+9165000000 9165007632
+9168000000 9168007586
+9171000000 9171007641
+9174000000 9174007606
+9177000000 9177007634
+9180000000 9180007633
+9183000000 9183007627
+9186000000 9186007582
+9189000000 9189007651
+9192000000 9192007630
+9195000000 9195007638
+9198000000 9198007624
+9201000000 9201007628
+9204000000 9204007630
+9207000000 9207007620
+9210000000 9210007616
+9213000000 9213007624
+9216000000 9216007620
+9219000000 9219007626
+9222000000 9222007617
+9225000000 9225007633
+9228000000 9228007603
+9231000000 9231007624
+9234000000 9234007619
+9237000000 9237007628
+9240000000 9240007617
+9243000000 9243007641
+9246000000 9246007622
+9249000000 9249007607
+9252000000 9252007621
+9255000000 9255007624
+9258000000 9258007627
+9261000000 9261007628
+9264000000 9264007638
+9267000000 9267007627
+9270000000 9270007631
+9273000000 9273007622
+9276000000 9276007620
+9279000000 9279007622
+9282000000 9282007621
+9285000000 9285007587
+9288000000 9288007617
+9291000000 9291007611
+9294000000 9294007627
+9297000000 9297007603
+9300000000 9300007615
+9303000000 9303007628
+9306000000 9306007630
+9309000000 9309007619
+9312000000 9312007561
+9315000000 9315007559
+9318000000 9318007631
+9321000000 9321007546
+9324000000 9324007620
+9327000000 9327007632
+9330000000 9330007624
+9333000000 9333007624
+9336000000 9336007583
+9339000000 9339007608
+9342000000 9342007531
+9345000000 9345007612
+9348000000 9348007624
+9351000000 9351007627
+9354000000 9354007594
+9357000000 9357007605
+9360000000 9360007623
+9363000000 9363007619
+9366000000 9366007627
+9369000000 9369007626
+9372000000 9372007620
+9375000000 9375007645
+9378000000 9378007624
+9381000000 9381007628
+9384000000 9384007613
+9387000000 9387007611
+9390000000 9390007582
+9393000000 9393007612
+9396000000 9396007620
+9399000000 9399007637
+9402000000 9402007627
+9405000000 9405007577
+9408000000 9408007631
+9411000000 9411007625
+9414000000 9414007619
+9417000000 9417007619
+9420000000 9420007633
+9423000000 9423007624
+9426000000 9426007630
+9429000000 9429007619
+9432000000 9432007569
+9435000000 9435007628
+9438000000 9438007624
+9441000000 9441007611
+9444000000 9444007622
+9447000000 9447007540
+9450000000 9450007623
+9453000000 9453007615
+9456000000 9456007616
+9459000000 9459007627
+9462000000 9462007627
+9465000000 9465007581
+9468000000 9468007636
+9471000000 9471007601
+9474000000 9474007629
+9477000000 9477007628
+9480000000 9480007622
+9483000000 9483007577
+9486000000 9486007646
+9489000000 9489007625
+9492000000 9492007633
+9495000000 9495007619
+9498000000 9498007623
+9501000000 9501007625
+9504000000 9504007615
+9507000000 9507007611
+9510000000 9510007619
+9513000000 9513007615
+9516000000 9516007621
+9519000000 9519007612
+9522000000 9522007628
+9525000000 9525007598
+9528000000 9528007619
+9531000000 9531007614
+9534000000 9534007623
+9537000000 9537007612
+9540000000 9540007636
+9543000000 9543007617
+9546000000 9546007602
+9549000000 9549007616
+9552000000 9552007619
+9555000000 9555007622
+9558000000 9558007623
+9561000000 9561007633
+9564000000 9564007622
+9567000000 9567007626
+9570000000 9570007617
+9573000000 9573007615
+9576000000 9576007617
+9579000000 9579007616
+9582000000 9582007582
+9585000000 9585007612
+9588000000 9588007606
+9591000000 9591007622
+9594000000 9594007598
+9597000000 9597007610
+9600000000 9600007623
+9603000000 9603007625
+9606000000 9606007614
+9609000000 9609007556
+9612000000 9612007554
+9615000000 9615007626
+9618000000 9618007541
+9621000000 9621007615
+9624000000 9624007627
+9627000000 9627007619
+9630000000 9630007619
+9633000000 9633007578
+9636000000 9636007603
+9639000000 9639007526
+9642000000 9642007607
+9645000000 9645007619
+9648000000 9648007622
+9651000000 9651007589
+9654000000 9654007600
+9657000000 9657007618
+9660000000 9660007614
+9663000000 9663007622
+9666000000 9666007621
+9669000000 9669007615
+9672000000 9672007640
+9675000000 9675007619
+9678000000 9678007623
+9681000000 9681007608
+9684000000 9684007606
+9687000000 9687007577
+9690000000 9690007607
+9693000000 9693007615
+9696000000 9696007632
+9699000000 9699007622
+9702000000 9702007572
+9705000000 9705007626
+9708000000 9708007620
+9711000000 9711007614
+9714000000 9714007614
+9717000000 9717007628
+9720000000 9720007619
+9723000000 9723007625
+9726000000 9726007614
+9729000000 9729007564
+9732000000 9732007623
+9735000000 9735007619
+9738000000 9738007606
+9741000000 9741007617
+9744000000 9744007535
+9747000000 9747007618
+9750000000 9750007610
+9753000000 9753007611
+9756000000 9756007622
+9759000000 9759007622
+9762000000 9762007576
+9765000000 9765007631
+9768000000 9768007596
+9771000000 9771007624
+9774000000 9774007623
+9777000000 9777007617
+9780000000 9780007572
+9783000000 9783007641
+9786000000 9786007620
+9789000000 9789007628
+9792000000 9792007614
+9795000000 9795007618
+9798000000 9798007620
+9801000000 9801007610
+9804000000 9804007606
+9807000000 9807007614
+9810000000 9810007610
+9813000000 9813007616
+9816000000 9816007607
+9819000000 9819007623
+9822000000 9822007593
+9825000000 9825007614
+9828000000 9828007609
+9831000000 9831007618
+9834000000 9834007607
+9837000000 9837007631
+9840000000 9840007612
+9843000000 9843007597
+9846000000 9846007611
+9849000000 9849007614
+9852000000 9852007617
+9855000000 9855007618
+9858000000 9858007628
+9861000000 9861007617
+9864000000 9864007621
+9867000000 9867007612
+9870000000 9870007610
+9873000000 9873007612
+9876000000 9876007611
+9879000000 9879007577
+9882000000 9882007607
+9885000000 9885007601
+9888000000 9888007617
+9891000000 9891007593
+9894000000 9894007605
+9897000000 9897007618
+9900000000 9900007620
+9903000000 9903007609
+9906000000 9906007551
+9909000000 9909007549
+9912000000 9912007621
+9915000000 9915007536
+9918000000 9918007610
+9921000000 9921007622
+9924000000 9924007614
+9927000000 9927007614
+9930000000 9930007573
+9933000000 9933007598
+9936000000 9936007521
+9939000000 9939007602
+9942000000 9942007614
+9945000000 9945007617
+9948000000 9948007584
+9951000000 9951007595
+9954000000 9954007613
+9957000000 9957007609
+9960000000 9960007617
+9963000000 9963007616
+9966000000 9966007610
+9969000000 9969007635
+9972000000 9972007614
+9975000000 9975007618
+9978000000 9978007603
+9981000000 9981007601
+9984000000 9984007572
+9987000000 9987007602
+9990000000 9990007610
+9993000000 9993007627
+9996000000 9996007617
+9999000000 9999007567
+10002000000 10002007621
+10005000000 10005007615
+10008000000 10008007609
+10011000000 10011007609
+10014000000 10014007623
+10017000000 10017007614
+10020000000 10020007620
+10023000000 10023007609
+10026000000 10026007559
+10029000000 10029007618
+10032000000 10032007614
+10035000000 10035007601
+10038000000 10038007612
+10041000000 10041007530
+10044000000 10044007613
+10047000000 10047007605
+10050000000 10050007606
+10053000000 10053007617
+10056000000 10056007617
+10059000000 10059007571
+10062000000 10062007626
+10065000000 10065007591
+10068000000 10068007619
+10071000000 10071007618
+10074000000 10074007612
+10077000000 10077007567
+10080000000 10080007636
+10083000000 10083007615
+10086000000 10086007623
+10089000000 10089007609
+10092000000 10092007613
+10095000000 10095007615
+10098000000 10098007605
+10101000000 10101007601
+10104000000 10104007609
+10107000000 10107007605
+10110000000 10110007611
+10113000000 10113007602
+10116000000 10116007618
+10119000000 10119007588
+10122000000 10122007609
+10125000000 10125007604
+10128000000 10128007613
+10131000000 10131007602
+10134000000 10134007626
+10137000000 10137007607
+10140000000 10140007592
+10143000000 10143007606
+10146000000 10146007609
+10149000000 10149007612
+10152000000 10152007613
+10155000000 10155007623
+10158000000 10158007612
+10161000000 10161007616
+10164000000 10164007607
+10167000000 10167007605
+10170000000 10170007607
+10173000000 10173007606
+10176000000 10176007572
+10179000000 10179007602
+10182000000 10182007596
+10185000000 10185007612
+10188000000 10188007588
+10191000000 10191007600
+10194000000 10194007613
+10197000000 10197007615
+10200000000 10200007604
+10203000000 10203007546
+10206000000 10206007544
+10209000000 10209007616
+10212000000 10212007531
+10215000000 10215007605
+10218000000 10218007617
+10221000000 10221007609
+10224000000 10224007609
+10227000000 10227007568
+10230000000 10230007593
+10233000000 10233007516
+10236000000 10236007597
+10239000000 10239007609
+10242000000 10242007612
+10245000000 10245007579
+10248000000 10248007590
+10251000000 10251007608
+10254000000 10254007604
+10257000000 10257007612
+10260000000 10260007611
+10263000000 10263007605
+10266000000 10266007630
+10269000000 10269007609
+10272000000 10272007613
+10275000000 10275007598
+10278000000 10278007596
+10281000000 10281007567
+10284000000 10284007597
+10287000000 10287007605
+10290000000 10290007622
+10293000000 10293007612
+10296000000 10296007562
+10299000000 10299007616
+10302000000 10302007610
+10305000000 10305007604
+10308000000 10308007604
+10311000000 10311007618
+10314000000 10314007609
+10317000000 10317007615
+10320000000 10320007604
+10323000000 10323007554
+10326000000 10326007613
+10329000000 10329007609
+10332000000 10332007596
+10335000000 10335007607
+10338000000 10338007525
+10341000000 10341007608
+10344000000 10344007600
+10347000000 10347007601
+10350000000 10350007612
+10353000000 10353007612
+10356000000 10356007566
+10359000000 10359007621
+10362000000 10362007586
+10365000000 10365007614
+10368000000 10368007613
+10371000000 10371007607
+10374000000 10374007562
+10377000000 10377007631
+10380000000 10380007610
+10383000000 10383007618
+10386000000 10386007604
+10389000000 10389007608
+10392000000 10392007610
+10395000000 10395007600
+10398000000 10398007596
+10401000000 10401007604
+10404000000 10404007600
+10407000000 10407007606
+10410000000 10410007597
+10413000000 10413007613
+10416000000 10416007583
+10419000000 10419007604
+10422000000 10422007599
+10425000000 10425007608
+10428000000 10428007597
+10431000000 10431007621
+10434000000 10434007602
+10437000000 10437007587
+10440000000 10440007601
+10443000000 10443007604
+10446000000 10446007607
+10449000000 10449007608
+10452000000 10452007618
+10455000000 10455007607
+10458000000 10458007611
+10461000000 10461007602
+10464000000 10464007600
+10467000000 10467007602
+10470000000 10470007601
+10473000000 10473007567
+10476000000 10476007597
+10479000000 10479007591
+10482000000 10482007607
+10485000000 10485007583
+10488000000 10488007595
+10491000000 10491007608
+10494000000 10494007610
+10497000000 10497007599
+10500000000 10500007541
+10503000000 10503007539
+10506000000 10506007611
+10509000000 10509007526
+10512000000 10512007600
+10515000000 10515007612
+10518000000 10518007604
+10521000000 10521007604
+10524000000 10524007563
+10527000000 10527007588
+10530000000 10530007511
+10533000000 10533007592
+10536000000 10536007604
+10539000000 10539007607
+10542000000 10542007574
+10545000000 10545007585
+10548000000 10548007603
+10551000000 10551007599
+10554000000 10554007607
+10557000000 10557007606
+10560000000 10560007600
+10563000000 10563007625
+10566000000 10566007604
+10569000000 10569007608
+10572000000 10572007593
+10575000000 10575007591
+10578000000 10578007562
+10581000000 10581007592
+10584000000 10584007600
+10587000000 10587007617
+10590000000 10590007607
+10593000000 10593007557
+10596000000 10596007611
+10599000000 10599007605
+10602000000 10602007599
+10605000000 10605007599
+10608000000 10608007613
+10611000000 10611007604
+10614000000 10614007610
+10617000000 10617007599
+10620000000 10620007549
+10623000000 10623007608
+10626000000 10626007604
+10629000000 10629007591
+10632000000 10632007602
+10635000000 10635007520
+10638000000 10638007603
+10641000000 10641007595
+10644000000 10644007596
+10647000000 10647007607
+10650000000 10650007607
+10653000000 10653007561
+10656000000 10656007616
+10659000000 10659007581
+10662000000 10662007609
+10665000000 10665007608
+10668000000 10668007602
+10671000000 10671007557
+10674000000 10674007626
+10677000000 10677007605
+10680000000 10680007613
+10683000000 10683007599
+10686000000 10686007603
+10689000000 10689007605
+10692000000 10692007595
+10695000000 10695007591
+10698000000 10698007599
+10701000000 10701007595
+10704000000 10704007601
+10707000000 10707007592
+10710000000 10710007608
+10713000000 10713007578
+10716000000 10716007599
+10719000000 10719007594
+10722000000 10722007603
+10725000000 10725007592
+10728000000 10728007616
+10731000000 10731007597
+10734000000 10734007582
+10737000000 10737007596
+10740000000 10740007599
+10743000000 10743007602
+10746000000 10746007603
+10749000000 10749007613
+10752000000 10752007602
+10755000000 10755007606
+10758000000 10758007597
+10761000000 10761007595
+10764000000 10764007597
+10767000000 10767007596
+10770000000 10770007562
+10773000000 10773007592
+10776000000 10776007586
+10779000000 10779007602
+10782000000 10782007578
+10785000000 10785007590
+10788000000 10788007603
+10791000000 10791007605
+10794000000 10794007594
+10797000000 10797007536
+10800000000 10800007534
+10803000000 10803007606
+10806000000 10806007521
+10809000000 10809007595
+10812000000 10812007607
+10815000000 10815007599
+10818000000 10818007599
+10821000000 10821007558
+10824000000 10824007583
+10827000000 10827007506
+10830000000 10830007587
+10833000000 10833007599
+10836000000 10836007602
+10839000000 10839007569
+10842000000 10842007580
+10845000000 10845007598
+10848000000 10848007594
+10851000000 10851007602
+10854000000 10854007601
+10857000000 10857007595
+10860000000 10860007620
+10863000000 10863007599
+10866000000 10866007603
+10869000000 10869007588
+10872000000 10872007586
+10875000000 10875007557
+10878000000 10878007587
+10881000000 10881007595
+10884000000 10884007612
+10887000000 10887007602
+10890000000 10890007552
+10893000000 10893007606
+10896000000 10896007600
+10899000000 10899007594
+10902000000 10902007594
+10905000000 10905007608
+10908000000 10908007599
+10911000000 10911007605
+10914000000 10914007594
+10917000000 10917007544
+10920000000 10920007603
+10923000000 10923007599
+10926000000 10926007586
+10929000000 10929007597
+10932000000 10932007515
+10935000000 10935007598
+10938000000 10938007590
+10941000000 10941007591
+10944000000 10944007602
+10947000000 10947007602
+10950000000 10950007556
+10953000000 10953007611
+10956000000 10956007576
+10959000000 10959007604
+10962000000 10962007603
+10965000000 10965007597
+10968000000 10968007552
+10971000000 10971007621
+10974000000 10974007600
+10977000000 10977007608
+10980000000 10980007594
+10983000000 10983007598
+10986000000 10986007600
+10989000000 10989007590
+10992000000 10992007586
+10995000000 10995007594
+10998000000 10998007590
+11001000000 11001007596
+11004000000 11004007587
+11007000000 11007007603
+11010000000 11010007573
+11013000000 11013007594
+11016000000 11016007589
+11019000000 11019007598
+11022000000 11022007587
+11025000000 11025007611
+11028000000 11028007592
+11031000000 11031007577
+11034000000 11034007591
+11037000000 11037007594
+11040000000 11040007597
+11043000000 11043007598
+11046000000 11046007608
+11049000000 11049007597
+11052000000 11052007601
+11055000000 11055007592
+11058000000 11058007590
+11061000000 11061007592
+11064000000 11064007591
+11067000000 11067007557
+11070000000 11070007587
+11073000000 11073007581
+11076000000 11076007597
+11079000000 11079007573
+11082000000 11082007585
+11085000000 11085007598
+11088000000 11088007600
+11091000000 11091007589
+11094000000 11094007531
+11097000000 11097007529
+11100000000 11100007601
+11103000000 11103007516
+11106000000 11106007590
+11109000000 11109007602
+11112000000 11112007594
+11115000000 11115007594
+11118000000 11118007553
+11121000000 11121007578
+11124000000 11124007501
+11127000000 11127007582
+11130000000 11130007594
+11133000000 11133007597
+11136000000 11136007564
+11139000000 11139007575
+11142000000 11142007593
+11145000000 11145007589
+11148000000 11148007597
+11151000000 11151007596
+11154000000 11154007590
+11157000000 11157007615
+11160000000 11160007594
+11163000000 11163007598
+11166000000 11166007583
+11169000000 11169007581
+11172000000 11172007552
+11175000000 11175007582
+11178000000 11178007590
+11181000000 11181007607
+11184000000 11184007597
+11187000000 11187007547
+11190000000 11190007601
+11193000000 11193007595
+11196000000 11196007589
+11199000000 11199007589
+11202000000 11202007603
+11205000000 11205007594
+11208000000 11208007600
+11211000000 11211007589
+11214000000 11214007539
+11217000000 11217007598
+11220000000 11220007594
+11223000000 11223007581
+11226000000 11226007592
+11229000000 11229007510
+11232000000 11232007593
+11235000000 11235007585
+11238000000 11238007586
+11241000000 11241007597
+11244000000 11244007597
+11247000000 11247007551
+11250000000 11250007606
+11253000000 11253007571
+11256000000 11256007599
+11259000000 11259007598
+11262000000 11262007592
+11265000000 11265007547
+11268000000 11268007616
+11271000000 11271007595
+11274000000 11274007603
+11277000000 11277007589
+11280000000 11280007593
+11283000000 11283007595
+11286000000 11286007585
+11289000000 11289007581
+11292000000 11292007589
+11295000000 11295007585
+11298000000 11298007591
+11301000000 11301007582
+11304000000 11304007598
+11307000000 11307007568
+11310000000 11310007589
+11313000000 11313007584
+11316000000 11316007593
+11319000000 11319007582
+11322000000 11322007606
+11325000000 11325007587
+11328000000 11328007572
+11331000000 11331007586
+11334000000 11334007589
+11337000000 11337007592
+11340000000 11340007593
+11343000000 11343007603
+11346000000 11346007592
+11349000000 11349007596
+11352000000 11352007587
+11355000000 11355007585
+11358000000 11358007587
+11361000000 11361007586
+11364000000 11364007552
+11367000000 11367007582
+11370000000 11370007576
+11373000000 11373007592
+11376000000 11376007568
+11379000000 11379007580
+11382000000 11382007593
+11385000000 11385007595
+11388000000 11388007584
+11391000000 11391007526
+11394000000 11394007524
+11397000000 11397007596
+11400000000 11400007511
+11403000000 11403007585
+11406000000 11406007597
+11409000000 11409007589
+11412000000 11412007589
+11415000000 11415007548
+11418000000 11418007573
+11421000000 11421007496
+11424000000 11424007577
+11427000000 11427007589
+11430000000 11430007592
+11433000000 11433007559
+11436000000 11436007570
+11439000000 11439007588
+11442000000 11442007584
+11445000000 11445007592
+11448000000 11448007591
+11451000000 11451007585
+11454000000 11454007610
+11457000000 11457007589
+11460000000 11460007593
+11463000000 11463007578
+11466000000 11466007576
+11469000000 11469007547
+11472000000 11472007577
+11475000000 11475007585
+11478000000 11478007602
+11481000000 11481007592
+11484000000 11484007542
+11487000000 11487007596
+11490000000 11490007590
+11493000000 11493007584
+11496000000 11496007584
+11499000000 11499007598
+11502000000 11502007589
+11505000000 11505007595
+11508000000 11508007584
+11511000000 11511007534
+11514000000 11514007593
+11517000000 11517007589
+11520000000 11520007576
+11523000000 11523007587
+11526000000 11526007505
+11529000000 11529007588
+11532000000 11532007580
+11535000000 11535007581
+11538000000 11538007592
+11541000000 11541007592
+11544000000 11544007546
+11547000000 11547007601
+11550000000 11550007566
+11553000000 11553007594
+11556000000 11556007593
+11559000000 11559007587
+11562000000 11562007542
+11565000000 11565007611
+11568000000 11568007590
+11571000000 11571007598
+11574000000 11574007584
+11577000000 11577007588
+11580000000 11580007590
+11583000000 11583007580
+11586000000 11586007576
+11589000000 11589007584
+11592000000 11592007580
+11595000000 11595007586
+11598000000 11598007577
+11601000000 11601007593
+11604000000 11604007563
+11607000000 11607007584
+11610000000 11610007579
+11613000000 11613007588
+11616000000 11616007577
+11619000000 11619007601
+11622000000 11622007582
+11625000000 11625007567
+11628000000 11628007581
+11631000000 11631007584
+11634000000 11634007587
+11637000000 11637007588
+11640000000 11640007598
+11643000000 11643007587
+11646000000 11646007591
+11649000000 11649007582
+11652000000 11652007580
+11655000000 11655007582
+11658000000 11658007581
+11661000000 11661007547
+11664000000 11664007577
+11667000000 11667007571
+11670000000 11670007587
+11673000000 11673007563
+11676000000 11676007575
+11679000000 11679007588
+11682000000 11682007590
+11685000000 11685007579
+11688000000 11688007521
+11691000000 11691007519
+11694000000 11694007591
+11697000000 11697007506
+11700000000 11700007580
+11703000000 11703007592
+11706000000 11706007584
+11709000000 11709007584
+11712000000 11712007543
+11715000000 11715007568
+11718000000 11718007491
+11721000000 11721007572
+11724000000 11724007584
+11727000000 11727007587
+11730000000 11730007554
+11733000000 11733007565
+11736000000 11736007583
+11739000000 11739007579
+11742000000 11742007587
+11745000000 11745007586
+11748000000 11748007580
+11751000000 11751007605
+11754000000 11754007584
+11757000000 11757007588
+11760000000 11760007573
+11763000000 11763007571
+11766000000 11766007542
+11769000000 11769007572
+11772000000 11772007580
+11775000000 11775007597
+11778000000 11778007587
+11781000000 11781007537
+11784000000 11784007591
+11787000000 11787007585
+11790000000 11790007579
+11793000000 11793007579
+11796000000 11796007593
+11799000000 11799007584
+11802000000 11802007590
+11805000000 11805007579
+11808000000 11808007529
+11811000000 11811007588
+11814000000 11814007584
+11817000000 11817007571
+11820000000 11820007582
+11823000000 11823007500
+11826000000 11826007583
+11829000000 11829007575
+11832000000 11832007576
+11835000000 11835007587
+11838000000 11838007587
+11841000000 11841007541
+11844000000 11844007596
+11847000000 11847007561
+11850000000 11850007589
+11853000000 11853007588
+11856000000 11856007582
+11859000000 11859007537
+11862000000 11862007606
+11865000000 11865007585
+11868000000 11868007593
+11871000000 11871007579
+11874000000 11874007583
+11877000000 11877007585
+11880000000 11880007575
+11883000000 11883007571
+11886000000 11886007579
+11889000000 11889007575
+11892000000 11892007581
+11895000000 11895007572
+11898000000 11898007588
+11901000000 11901007558
+11904000000 11904007579
+11907000000 11907007574
+11910000000 11910007583
+11913000000 11913007572
+11916000000 11916007596
+11919000000 11919007577
+11922000000 11922007562
+11925000000 11925007576
+11928000000 11928007579
+11931000000 11931007582
+11934000000 11934007583
+11937000000 11937007593
+11940000000 11940007582
+11943000000 11943007586
+11946000000 11946007577
+11949000000 11949007575
+11952000000 11952007577
+11955000000 11955007576
+11958000000 11958007542
+11961000000 11961007572
+11964000000 11964007566
+11967000000 11967007582
+11970000000 11970007558
+11973000000 11973007570
+11976000000 11976007583
+11979000000 11979007585
+11982000000 11982007574
+11985000000 11985007516
+11988000000 11988007514
+11991000000 11991007586
+11994000000 11994007501
+11997000000 11997007575
+12000000000 12000007587
+12003000000 12003007579
+12006000000 12006007579
+12009000000 12009007538
+12012000000 12012007563
+12015000000 12015007486
+12018000000 12018007567
+12021000000 12021007579
+12024000000 12024007582
+12027000000 12027007549
+12030000000 12030007560
+12033000000 12033007578
+12036000000 12036007574
+12039000000 12039007582
+12042000000 12042007581
+12045000000 12045007575
+12048000000 12048007600
+12051000000 12051007579
+12054000000 12054007583
+12057000000 12057007568
+12060000000 12060007566
+12063000000 12063007537
+12066000000 12066007567
+12069000000 12069007575
+12072000000 12072007592
+12075000000 12075007582
+12078000000 12078007532
+12081000000 12081007586
+12084000000 12084007580
+12087000000 12087007574
+12090000000 12090007574
+12093000000 12093007588
+12096000000 12096007579
+12099000000 12099007585
+12102000000 12102007574
+12105000000 12105007524
+12108000000 12108007583
+12111000000 12111007579
+12114000000 12114007566
+12117000000 12117007577
+12120000000 12120007495
+12123000000 12123007578
+12126000000 12126007570
+12129000000 12129007571
+12132000000 12132007582
+12135000000 12135007582
+12138000000 12138007536
+12141000000 12141007591
+12144000000 12144007556
+12147000000 12147007584
+12150000000 12150007583
+12153000000 12153007577
+12156000000 12156007532
+12159000000 12159007601
+12162000000 12162007580
+12165000000 12165007588
+12168000000 12168007574
+12171000000 12171007578
+12174000000 12174007580
+12177000000 12177007570
+12180000000 12180007566
+12183000000 12183007574
+12186000000 12186007570
+12189000000 12189007576
+12192000000 12192007567
+12195000000 12195007583
+12198000000 12198007553
+12201000000 12201007574
+12204000000 12204007569
+12207000000 12207007578
+12210000000 12210007567
+12213000000 12213007591
+12216000000 12216007572
+12219000000 12219007557
+12222000000 12222007571
+12225000000 12225007574
+12228000000 12228007577
+12231000000 12231007578
+12234000000 12234007588
+12237000000 12237007577
+12240000000 12240007581
+12243000000 12243007572
+12246000000 12246007570
+12249000000 12249007572
+12252000000 12252007571
+12255000000 12255007537
+12258000000 12258007567
+12261000000 12261007561
+12264000000 12264007577
+12267000000 12267007553
+12270000000 12270007565
+12273000000 12273007578
+12276000000 12276007580
+12279000000 12279007569
+12282000000 12282007511
+12285000000 12285007509
+12288000000 12288007581
+12291000000 12291007496
+12294000000 12294007570
+12297000000 12297007582
+12300000000 12300007574
+12303000000 12303007574
+12306000000 12306007533
+12309000000 12309007558
+12312000000 12312007481
+12315000000 12315007562
+12318000000 12318007574
+12321000000 12321007577
+12324000000 12324007544
+12327000000 12327007555
+12330000000 12330007573
+12333000000 12333007569
+12336000000 12336007577
+12339000000 12339007576
+12342000000 12342007570
+12345000000 12345007595
+12348000000 12348007574
+12351000000 12351007578
+12354000000 12354007563
+12357000000 12357007561
+12360000000 12360007532
+12363000000 12363007562
+12366000000 12366007570
+12369000000 12369007587
+12372000000 12372007577
+12375000000 12375007527
+12378000000 12378007581
+12381000000 12381007575
+12384000000 12384007569
+12387000000 12387007569
+12390000000 12390007583
+12393000000 12393007574
+12396000000 12396007580
+12399000000 12399007569
+12402000000 12402007519
+12405000000 12405007578
+12408000000 12408007574
+12411000000 12411007561
+12414000000 12414007572
+12417000000 12417007490
+12420000000 12420007573
+12423000000 12423007565
+12426000000 12426007566
+12429000000 12429007577
+12432000000 12432007577
+12435000000 12435007531
+12438000000 12438007586
+12441000000 12441007551
+12444000000 12444007579
+12447000000 12447007578
+12450000000 12450007572
+12453000000 12453007527
+12456000000 12456007596
+12459000000 12459007575
+12462000000 12462007583
+12465000000 12465007569
+12468000000 12468007573
+12471000000 12471007575
+12474000000 12474007565
+12477000000 12477007561
+12480000000 12480007569
+12483000000 12483007565
+12486000000 12486007571
+12489000000 12489007562
+12492000000 12492007578
+12495000000 12495007548
+12498000000 12498007569
+12501000000 12501007564
+12504000000 12504007573
+12507000000 12507007562
+12510000000 12510007586
+12513000000 12513007567
+12516000000 12516007552
+12519000000 12519007566
+12522000000 12522007569
+12525000000 12525007572
+12528000000 12528007573
+12531000000 12531007583
+12534000000 12534007572
+12537000000 12537007576
+12540000000 12540007567
+12543000000 12543007565
+12546000000 12546007567
+12549000000 12549007566
+12552000000 12552007532
+12555000000 12555007562
+12558000000 12558007556
+12561000000 12561007572
+12564000000 12564007548
+12567000000 12567007560
+12570000000 12570007573
+12573000000 12573007575
+12576000000 12576007564
+12579000000 12579007506
+12582000000 12582007504
+12585000000 12585007576
+12588000000 12588007491
+12591000000 12591007565
+12594000000 12594007577
+12597000000 12597007569
+12600000000 12600007569
+12603000000 12603007528
+12606000000 12606007553
+12609000000 12609007476
+12612000000 12612007557
+12615000000 12615007569
+12618000000 12618007572
+12621000000 12621007539
+12624000000 12624007550
+12627000000 12627007568
+12630000000 12630007564
+12633000000 12633007572
+12636000000 12636007571
+12639000000 12639007565
+12642000000 12642007590
+12645000000 12645007569
+12648000000 12648007573
+12651000000 12651007558
+12654000000 12654007556
+12657000000 12657007527
+12660000000 12660007557
+12663000000 12663007565
+12666000000 12666007582
+12669000000 12669007572
+12672000000 12672007522
+12675000000 12675007576
+12678000000 12678007570
+12681000000 12681007564
+12684000000 12684007564
+12687000000 12687007578
+12690000000 12690007569
+12693000000 12693007575
+12696000000 12696007564
+12699000000 12699007514
+12702000000 12702007573
+12705000000 12705007569
+12708000000 12708007556
+12711000000 12711007567
+12714000000 12714007485
+12717000000 12717007568
+12720000000 12720007560
+12723000000 12723007561
+12726000000 12726007572
+12729000000 12729007572
+12732000000 12732007526
+12735000000 12735007581
+12738000000 12738007546
+12741000000 12741007574
+12744000000 12744007573
+12747000000 12747007567
+12750000000 12750007522
+12753000000 12753007591
+12756000000 12756007570
+12759000000 12759007578
+12762000000 12762007564
+12765000000 12765007568
+12768000000 12768007570
+12771000000 12771007560
+12774000000 12774007556
+12777000000 12777007564
+12780000000 12780007560
+12783000000 12783007566
+12786000000 12786007557
+12789000000 12789007573
+12792000000 12792007543
+12795000000 12795007564
+12798000000 12798007559
+12801000000 12801007568
+12804000000 12804007557
+12807000000 12807007581
+12810000000 12810007562
+12813000000 12813007547
+12816000000 12816007561
+12819000000 12819007564
+12822000000 12822007567
+12825000000 12825007568
+12828000000 12828007578
+12831000000 12831007567
+12834000000 12834007571
+12837000000 12837007562
+12840000000 12840007560
+12843000000 12843007562
+12846000000 12846007561
+12849000000 12849007527
+12852000000 12852007557
+12855000000 12855007551
+12858000000 12858007567
+12861000000 12861007543
+12864000000 12864007555
+12867000000 12867007568
+12870000000 12870007570
+12873000000 12873007559
+12876000000 12876007501
+12879000000 12879007499
+12882000000 12882007571
+12885000000 12885007486
+12888000000 12888007560
+12891000000 12891007572
+12894000000 12894007564
+12897000000 12897007564
+12900000000 12900007523
+12903000000 12903007548
+12906000000 12906007471
+12909000000 12909007552
+12912000000 12912007564
+12915000000 12915007567
+12918000000 12918007534
+12921000000 12921007545
+12924000000 12924007563
+12927000000 12927007559
+12930000000 12930007567
+12933000000 12933007566
+12936000000 12936007560
+12939000000 12939007585
+12942000000 12942007564
+12945000000 12945007568
+12948000000 12948007553
+12951000000 12951007551
+12954000000 12954007522
+12957000000 12957007552
+12960000000 12960007560
+12963000000 12963007577
+12966000000 12966007567
+12969000000 12969007517
+12972000000 12972007571
+12975000000 12975007565
+12978000000 12978007559
+12981000000 12981007559
+12984000000 12984007573
+12987000000 12987007564
+12990000000 12990007570
+12993000000 12993007559
+12996000000 12996007509
+12999000000 12999007568
+13002000000 13002007564
+13005000000 13005007551
+13008000000 13008007562
+13011000000 13011007480
+13014000000 13014007563
+13017000000 13017007555
+13020000000 13020007556
+13023000000 13023007567
+13026000000 13026007567
+13029000000 13029007521
+13032000000 13032007576
+13035000000 13035007541
+13038000000 13038007569
+13041000000 13041007568
+13044000000 13044007562
+13047000000 13047007517
+13050000000 13050007586
+13053000000 13053007565
+13056000000 13056007573
+13059000000 13059007559
+13062000000 13062007563
+13065000000 13065007565
+13068000000 13068007555
+13071000000 13071007551
+13074000000 13074007559
+13077000000 13077007555
+13080000000 13080007561
+13083000000 13083007552
+13086000000 13086007568
+13089000000 13089007538
+13092000000 13092007559
+13095000000 13095007554
+13098000000 13098007563
+13101000000 13101007552
+13104000000 13104007576
+13107000000 13107007557
+13110000000 13110007542
+13113000000 13113007556
+13116000000 13116007559
+13119000000 13119007562
+13122000000 13122007563
+13125000000 13125007573
+13128000000 13128007562
+13131000000 13131007566
+13134000000 13134007557
+13137000000 13137007555
+13140000000 13140007557
+13143000000 13143007556
+13146000000 13146007522
+13149000000 13149007552
+13152000000 13152007546
+13155000000 13155007562
+13158000000 13158007538
+13161000000 13161007550
+13164000000 13164007563
+13167000000 13167007565
+13170000000 13170007554
+13173000000 13173007496
+13176000000 13176007494
+13179000000 13179007566
+13182000000 13182007481
+13185000000 13185007555
+13188000000 13188007567
+13191000000 13191007559
+13194000000 13194007559
+13197000000 13197007518
+13200000000 13200007543
+13203000000 13203007466
+13206000000 13206007547
+13209000000 13209007559
+13212000000 13212007562
+13215000000 13215007529
+13218000000 13218007540
+13221000000 13221007558
+13224000000 13224007554
+13227000000 13227007562
+13230000000 13230007561
+13233000000 13233007555
+13236000000 13236007580
+13239000000 13239007559
+13242000000 13242007563
+13245000000 13245007548
+13248000000 13248007546
+13251000000 13251007517
+13254000000 13254007547
+13257000000 13257007555
+13260000000 13260007572
+13263000000 13263007562
+13266000000 13266007512
+13269000000 13269007566
+13272000000 13272007560
+13275000000 13275007554
+13278000000 13278007554
+13281000000 13281007568
+13284000000 13284007559
+13287000000 13287007565
+13290000000 13290007554
+13293000000 13293007504
+13296000000 13296007563
+13299000000 13299007559
+13302000000 13302007546
+13305000000 13305007557
+13308000000 13308007475
+13311000000 13311007558
+13314000000 13314007550
+13317000000 13317007551
+13320000000 13320007562
+13323000000 13323007562
+13326000000 13326007516
+13329000000 13329007571
+13332000000 13332007536
+13335000000 13335007564
+13338000000 13338007563
+13341000000 13341007557
+13344000000 13344007512
+13347000000 13347007581
+13350000000 13350007560
+13353000000 13353007568
+13356000000 13356007554
+13359000000 13359007558
+13362000000 13362007560
+13365000000 13365007550
+13368000000 13368007546
+13371000000 13371007554
+13374000000 13374007550
+13377000000 13377007556
+13380000000 13380007547
+13383000000 13383007563
+13386000000 13386007533
+13389000000 13389007554
+13392000000 13392007549
+13395000000 13395007558
+13398000000 13398007547
+13401000000 13401007571
+13404000000 13404007552
+13407000000 13407007537
+13410000000 13410007551
+13413000000 13413007554
+13416000000 13416007557
+13419000000 13419007558
+13422000000 13422007568
+13425000000 13425007557
+13428000000 13428007561
+13431000000 13431007552
+13434000000 13434007550
+13437000000 13437007552
+13440000000 13440007551
+13443000000 13443007517
+13446000000 13446007547
+13449000000 13449007541
+13452000000 13452007557
+13455000000 13455007533
+13458000000 13458007545
+13461000000 13461007558
+13464000000 13464007560
+13467000000 13467007549
+13470000000 13470007491
+13473000000 13473007489
+13476000000 13476007561
+13479000000 13479007476
+13482000000 13482007550
+13485000000 13485007562
+13488000000 13488007554
+13491000000 13491007554
+13494000000 13494007513
+13497000000 13497007538
+13500000000 13500007461
+13503000000 13503007542
+13506000000 13506007554
+13509000000 13509007557
+13512000000 13512007524
+13515000000 13515007535
+13518000000 13518007553
+13521000000 13521007549
+13524000000 13524007557
+13527000000 13527007556
+13530000000 13530007550
+13533000000 13533007575
+13536000000 13536007554
+13539000000 13539007558
+13542000000 13542007543
+13545000000 13545007541
+13548000000 13548007512
+13551000000 13551007542
+13554000000 13554007550
+13557000000 13557007567
+13560000000 13560007557
+13563000000 13563007507
+13566000000 13566007561
+13569000000 13569007555
+13572000000 13572007549
+13575000000 13575007549
+13578000000 13578007563
+13581000000 13581007554
+13584000000 13584007560
+13587000000 13587007549
+13590000000 13590007499
+13593000000 13593007558
+13596000000 13596007554
+13599000000 13599007541
+13602000000 13602007552
+13605000000 13605007470
+13608000000 13608007553
+13611000000 13611007545
+13614000000 13614007546
+13617000000 13617007557
+13620000000 13620007557
+13623000000 13623007511
+13626000000 13626007566
+13629000000 13629007531
+13632000000 13632007559
+13635000000 13635007558
+13638000000 13638007552
+13641000000 13641007507
+13644000000 13644007576
+13647000000 13647007555
+13650000000 13650007563
+13653000000 13653007549
+13656000000 13656007553
+13659000000 13659007555
+13662000000 13662007545
+13665000000 13665007541
+13668000000 13668007549
+13671000000 13671007545
+13674000000 13674007551
+13677000000 13677007542
+13680000000 13680007558
+13683000000 13683007528
+13686000000 13686007549
+13689000000 13689007544
+13692000000 13692007553
+13695000000 13695007542
+13698000000 13698007566
+13701000000 13701007547
+13704000000 13704007532
+13707000000 13707007546
+13710000000 13710007549
+13713000000 13713007552
+13716000000 13716007553
+13719000000 13719007563
+13722000000 13722007552
+13725000000 13725007556
+13728000000 13728007547
+13731000000 13731007545
+13734000000 13734007547
+13737000000 13737007546
+13740000000 13740007512
+13743000000 13743007542
+13746000000 13746007536
+13749000000 13749007552
+13752000000 13752007528
+13755000000 13755007540
+13758000000 13758007553
+13761000000 13761007555
+13764000000 13764007544
+13767000000 13767007486
+13770000000 13770007484
+13773000000 13773007556
+13776000000 13776007471
+13779000000 13779007545
+13782000000 13782007557
+13785000000 13785007549
+13788000000 13788007549
+13791000000 13791007508
+13794000000 13794007533
+13797000000 13797007456
+13800000000 13800007537
+13803000000 13803007549
+13806000000 13806007552
+13809000000 13809007519
+13812000000 13812007530
+13815000000 13815007548
+13818000000 13818007544
+13821000000 13821007552
+13824000000 13824007551
+13827000000 13827007545
+13830000000 13830007570
+13833000000 13833007549
+13836000000 13836007553
+13839000000 13839007538
+13842000000 13842007536
+13845000000 13845007507
+13848000000 13848007537
+13851000000 13851007545
+13854000000 13854007562
+13857000000 13857007552
+13860000000 13860007502
+13863000000 13863007556
+13866000000 13866007550
+13869000000 13869007544
+13872000000 13872007544
+13875000000 13875007558
+13878000000 13878007549
+13881000000 13881007555
+13884000000 13884007544
+13887000000 13887007494
+13890000000 13890007553
+13893000000 13893007549
+13896000000 13896007536
+13899000000 13899007547
+13902000000 13902007465
+13905000000 13905007548
+13908000000 13908007540
+13911000000 13911007541
+13914000000 13914007552
+13917000000 13917007552
+13920000000 13920007506
+13923000000 13923007561
+13926000000 13926007526
+13929000000 13929007554
+13932000000 13932007553
+13935000000 13935007547
+13938000000 13938007502
+13941000000 13941007571
+13944000000 13944007550
+13947000000 13947007558
+13950000000 13950007544
+13953000000 13953007548
+13956000000 13956007550
+13959000000 13959007540
+13962000000 13962007536
+13965000000 13965007544
+13968000000 13968007540
+13971000000 13971007546
+13974000000 13974007537
+13977000000 13977007553
+13980000000 13980007523
+13983000000 13983007544
+13986000000 13986007539
+13989000000 13989007548
+13992000000 13992007537
+13995000000 13995007561
+13998000000 13998007542
+14001000000 14001007527
+14004000000 14004007541
+14007000000 14007007544
+14010000000 14010007547
+14013000000 14013007548
+14016000000 14016007558
+14019000000 14019007547
+14022000000 14022007551
+14025000000 14025007542
+14028000000 14028007540
+14031000000 14031007542
+14034000000 14034007541
+14037000000 14037007507
+14040000000 14040007537
+14043000000 14043007531
+14046000000 14046007547
+14049000000 14049007523
+14052000000 14052007535
+14055000000 14055007548
+14058000000 14058007550
+14061000000 14061007539
+14064000000 14064007481
+14067000000 14067007479
+14070000000 14070007551
+14073000000 14073007466
+14076000000 14076007540
+14079000000 14079007552
+14082000000 14082007544
+14085000000 14085007544
+14088000000 14088007503
+14091000000 14091007528
+14094000000 14094007451
+14097000000 14097007532
+14100000000 14100007544
+14103000000 14103007547
+14106000000 14106007514
+14109000000 14109007525
+14112000000 14112007543
+14115000000 14115007539
+14118000000 14118007547
+14121000000 14121007546
+14124000000 14124007540
+14127000000 14127007565
+14130000000 14130007544
+14133000000 14133007548
+14136000000 14136007533
+14139000000 14139007531
+14142000000 14142007502
+14145000000 14145007532
+14148000000 14148007540
+14151000000 14151007557
+14154000000 14154007547
+14157000000 14157007497
+14160000000 14160007551
+14163000000 14163007545
+14166000000 14166007539
+14169000000 14169007539
+14172000000 14172007553
+14175000000 14175007544
+14178000000 14178007550
+14181000000 14181007539
+14184000000 14184007489
+14187000000 14187007548
+14190000000 14190007544
+14193000000 14193007531
+14196000000 14196007542
+14199000000 14199007460
+14202000000 14202007543
+14205000000 14205007535
+14208000000 14208007536
+14211000000 14211007547
+14214000000 14214007547
+14217000000 14217007501
+14220000000 14220007556
+14223000000 14223007521
+14226000000 14226007549
+14229000000 14229007548
+14232000000 14232007542
+14235000000 14235007497
+14238000000 14238007566
+14241000000 14241007545
+14244000000 14244007553
+14247000000 14247007539
+14250000000 14250007543
+14253000000 14253007545
+14256000000 14256007535
+14259000000 14259007531
+14262000000 14262007539
+14265000000 14265007535
+14268000000 14268007541
+14271000000 14271007532
+14274000000 14274007548
+14277000000 14277007518
+14280000000 14280007539
+14283000000 14283007534
+14286000000 14286007543
+14289000000 14289007532
+14292000000 14292007556
+14295000000 14295007537
+14298000000 14298007522
+14301000000 14301007536
+14304000000 14304007539
+14307000000 14307007542
+14310000000 14310007543
+14313000000 14313007553
+14316000000 14316007542
+14319000000 14319007546
+14322000000 14322007537
+14325000000 14325007535
+14328000000 14328007537
+14331000000 14331007536
+14334000000 14334007502
+14337000000 14337007532
+14340000000 14340007526
+14343000000 14343007542
+14346000000 14346007518
+14349000000 14349007530
+14352000000 14352007543
+14355000000 14355007545
+14358000000 14358007534
+14361000000 14361007476
+14364000000 14364007474
+14367000000 14367007546
+14370000000 14370007461
+14373000000 14373007535
+14376000000 14376007547
+14379000000 14379007539
+14382000000 14382007539
+14385000000 14385007498
+14388000000 14388007523
+14391000000 14391007446
+14394000000 14394007527
+14397000000 14397007539
+14400000000 14400007542
+14403000000 14403007509
+14406000000 14406007520
+14409000000 14409007538
+14412000000 14412007534
+14415000000 14415007542
+14418000000 14418007541
+14421000000 14421007535
+14424000000 14424007560
+14427000000 14427007539
+14430000000 14430007543
+14433000000 14433007528
+14436000000 14436007526
+14439000000 14439007497
+14442000000 14442007527
+14445000000 14445007535
+14448000000 14448007552
+14451000000 14451007542
+14454000000 14454007492
+14457000000 14457007546
+14460000000 14460007540
+14463000000 14463007534
+14466000000 14466007534
+14469000000 14469007548
+14472000000 14472007539
+14475000000 14475007545
+14478000000 14478007534
+14481000000 14481007484
+14484000000 14484007543
+14487000000 14487007539
+14490000000 14490007526
+14493000000 14493007537
+14496000000 14496007455
+14499000000 14499007538
+14502000000 14502007530
+14505000000 14505007531
+14508000000 14508007542
+14511000000 14511007542
+14514000000 14514007496
+14517000000 14517007551
+14520000000 14520007516
+14523000000 14523007544
+14526000000 14526007543
+14529000000 14529007537
+14532000000 14532007492
+14535000000 14535007561
+14538000000 14538007540
+14541000000 14541007548
+14544000000 14544007534
+14547000000 14547007538
+14550000000 14550007540
+14553000000 14553007530
+14556000000 14556007526
+14559000000 14559007534
+14562000000 14562007530
+14565000000 14565007536
+14568000000 14568007527
+14571000000 14571007543
+14574000000 14574007513
+14577000000 14577007534
+14580000000 14580007529
+14583000000 14583007538
+14586000000 14586007527
+14589000000 14589007551
+14592000000 14592007532
+14595000000 14595007517
+14598000000 14598007531
+14601000000 14601007534
+14604000000 14604007537
+14607000000 14607007538
+14610000000 14610007548
+14613000000 14613007537
+14616000000 14616007541
+14619000000 14619007532
+14622000000 14622007530
+14625000000 14625007532
+14628000000 14628007531
+14631000000 14631007497
+14634000000 14634007527
+14637000000 14637007521
+14640000000 14640007537
+14643000000 14643007513
+14646000000 14646007525
+14649000000 14649007538
+14652000000 14652007540
+14655000000 14655007529
+14658000000 14658007471
+14661000000 14661007469
+14664000000 14664007541
+14667000000 14667007456
+14670000000 14670007530
+14673000000 14673007542
+14676000000 14676007534
+14679000000 14679007534
+14682000000 14682007493
+14685000000 14685007518
+14688000000 14688007441
+14691000000 14691007522
+14694000000 14694007534
+14697000000 14697007537
+14700000000 14700007504
+14703000000 14703007515
+14706000000 14706007533
+14709000000 14709007529
+14712000000 14712007537
+14715000000 14715007536
+14718000000 14718007530
+14721000000 14721007555
+14724000000 14724007534
+14727000000 14727007538
+14730000000 14730007523
+14733000000 14733007521
+14736000000 14736007492
+14739000000 14739007522
+14742000000 14742007530
+14745000000 14745007547
+14748000000 14748007537
+14751000000 14751007487
+14754000000 14754007541
+14757000000 14757007535
+14760000000 14760007529
+14763000000 14763007529
+14766000000 14766007543
+14769000000 14769007534
+14772000000 14772007540
+14775000000 14775007529
+14778000000 14778007479
+14781000000 14781007538
+14784000000 14784007534
+14787000000 14787007521
+14790000000 14790007532
+14793000000 14793007450
+14796000000 14796007533
+14799000000 14799007525
+14802000000 14802007526
+14805000000 14805007537
+14808000000 14808007537
+14811000000 14811007491
+14814000000 14814007546
+14817000000 14817007511
+14820000000 14820007539
+14823000000 14823007538
+14826000000 14826007532
+14829000000 14829007487
+14832000000 14832007556
+14835000000 14835007535
+14838000000 14838007543
+14841000000 14841007529
+14844000000 14844007533
+14847000000 14847007535
+14850000000 14850007525
+14853000000 14853007521
+14856000000 14856007529
+14859000000 14859007525
+14862000000 14862007531
+14865000000 14865007522
+14868000000 14868007538
+14871000000 14871007508
+14874000000 14874007529
+14877000000 14877007524
+14880000000 14880007533
+14883000000 14883007522
+14886000000 14886007546
+14889000000 14889007527
+14892000000 14892007512
+14895000000 14895007526
+14898000000 14898007529
+14901000000 14901007532
+14904000000 14904007533
+14907000000 14907007543
+14910000000 14910007532
+14913000000 14913007536
+14916000000 14916007527
+14919000000 14919007525
+14922000000 14922007527
+14925000000 14925007526
+14928000000 14928007492
+14931000000 14931007522
+14934000000 14934007516
+14937000000 14937007532
+14940000000 14940007508
+14943000000 14943007520
+14946000000 14946007533
+14949000000 14949007535
+14952000000 14952007524
+14955000000 14955007466
+14958000000 14958007464
+14961000000 14961007536
+14964000000 14964007451
+14967000000 14967007525
+14970000000 14970007537
+14973000000 14973007529
+14976000000 14976007529
+14979000000 14979007488
+14982000000 14982007513
+14985000000 14985007436
+14988000000 14988007517
+14991000000 14991007529
+14994000000 14994007532
+14997000000 14997007499
+15000000000 15000007510
+15003000000 15003007528
+15006000000 15006007524
+15009000000 15009007532
+15012000000 15012007531
+15015000000 15015007525
+15018000000 15018007550
+15021000000 15021007529
+15024000000 15024007533
+15027000000 15027007518
+15030000000 15030007516
+15033000000 15033007487
+15036000000 15036007517
+15039000000 15039007525
+15042000000 15042007542
+15045000000 15045007532
+15048000000 15048007482
+15051000000 15051007536
+15054000000 15054007530
+15057000000 15057007524
+15060000000 15060007524
+15063000000 15063007538
+15066000000 15066007529
+15069000000 15069007535
+15072000000 15072007524
+15075000000 15075007474
+15078000000 15078007533
+15081000000 15081007529
+15084000000 15084007516
+15087000000 15087007527
+15090000000 15090007445
+15093000000 15093007528
+15096000000 15096007520
+15099000000 15099007521
+15102000000 15102007532
+15105000000 15105007532
+15108000000 15108007486
+15111000000 15111007541
+15114000000 15114007506
+15117000000 15117007534
+15120000000 15120007533
+15123000000 15123007527
+15126000000 15126007482
+15129000000 15129007551
+15132000000 15132007530
+15135000000 15135007538
+15138000000 15138007524
+15141000000 15141007528
+15144000000 15144007530
+15147000000 15147007520
+15150000000 15150007516
+15153000000 15153007524
+15156000000 15156007520
+15159000000 15159007526
+15162000000 15162007517
+15165000000 15165007533
+15168000000 15168007503
+15171000000 15171007524
+15174000000 15174007519
+15177000000 15177007528
+15180000000 15180007517
+15183000000 15183007541
+15186000000 15186007522
+15189000000 15189007507
+15192000000 15192007521
+15195000000 15195007524
+15198000000 15198007527
+15201000000 15201007528
+15204000000 15204007538
+15207000000 15207007527
+15210000000 15210007531
+15213000000 15213007522
+15216000000 15216007520
+15219000000 15219007522
+15222000000 15222007521
+15225000000 15225007487
+15228000000 15228007517
+15231000000 15231007511
+15234000000 15234007527
+15237000000 15237007503
+15240000000 15240007515
+15243000000 15243007528
+15246000000 15246007530
+15249000000 15249007519
+15252000000 15252007461
+15255000000 15255007459
+15258000000 15258007531
+15261000000 15261007446
+15264000000 15264007520
+15267000000 15267007532
+15270000000 15270007524
+15273000000 15273007524
+15276000000 15276007483
+15279000000 15279007508
+15282000000 15282007431
+15285000000 15285007512
+15288000000 15288007524
+15291000000 15291007527
+15294000000 15294007494
+15297000000 15297007505
+15300000000 15300007523
+15303000000 15303007519
+15306000000 15306007527
+15309000000 15309007526
+15312000000 15312007520
+15315000000 15315007545
+15318000000 15318007524
+15321000000 15321007528
+15324000000 15324007513
+15327000000 15327007511
+15330000000 15330007482
+15333000000 15333007512
+15336000000 15336007520
+15339000000 15339007537
+15342000000 15342007527
+15345000000 15345007477
+15348000000 15348007531
+15351000000 15351007525
+15354000000 15354007519
+15357000000 15357007519
+15360000000 15360007533
+15363000000 15363007524
+15366000000 15366007530
+15369000000 15369007519
+15372000000 15372007469
+15375000000 15375007528
+15378000000 15378007524
+15381000000 15381007511
+15384000000 15384007522
+15387000000 15387007440
+15390000000 15390007523
+15393000000 15393007515
+15396000000 15396007516
+15399000000 15399007527
+15402000000 15402007527
+15405000000 15405007481
+15408000000 15408007536
+15411000000 15411007501
+15414000000 15414007529
+15417000000 15417007528
+15420000000 15420007522
+15423000000 15423007477
+15426000000 15426007546
+15429000000 15429007525
+15432000000 15432007533
+15435000000 15435007519
+15438000000 15438007523
+15441000000 15441007525
+15444000000 15444007515
+15447000000 15447007511
+15450000000 15450007519
+15453000000 15453007515
+15456000000 15456007521
+15459000000 15459007512
+15462000000 15462007528
+15465000000 15465007498
+15468000000 15468007519
+15471000000 15471007514
+15474000000 15474007523
+15477000000 15477007512
+15480000000 15480007536
+15483000000 15483007517
+15486000000 15486007502
+15489000000 15489007516
+15492000000 15492007519
+15495000000 15495007522
+15498000000 15498007523
+15501000000 15501007533
+15504000000 15504007522
+15507000000 15507007526
+15510000000 15510007517
+15513000000 15513007515
+15516000000 15516007517
+15519000000 15519007516
+15522000000 15522007482
+15525000000 15525007512
+15528000000 15528007506
+15531000000 15531007522
+15534000000 15534007498
+15537000000 15537007510
+15540000000 15540007523
+15543000000 15543007525
+15546000000 15546007514
+15549000000 15549007456
+15552000000 15552007454
+15555000000 15555007526
+15558000000 15558007441
+15561000000 15561007515
+15564000000 15564007527
+15567000000 15567007519
+15570000000 15570007519
+15573000000 15573007478
+15576000000 15576007503
+15579000000 15579007426
+15582000000 15582007507
+15585000000 15585007519
+15588000000 15588007522
+15591000000 15591007489
+15594000000 15594007500
+15597000000 15597007518
+15600000000 15600007514
+15603000000 15603007522
+15606000000 15606007521
+15609000000 15609007515
+15612000000 15612007540
+15615000000 15615007519
+15618000000 15618007523
+15621000000 15621007508
+15624000000 15624007506
+15627000000 15627007477
+15630000000 15630007507
+15633000000 15633007515
+15636000000 15636007532
+15639000000 15639007522
+15642000000 15642007472
+15645000000 15645007526
+15648000000 15648007520
+15651000000 15651007514
+15654000000 15654007514
+15657000000 15657007528
+15660000000 15660007519
+15663000000 15663007525
+15666000000 15666007514
+15669000000 15669007464
+15672000000 15672007523
+15675000000 15675007519
+15678000000 15678007506
+15681000000 15681007517
+15684000000 15684007435
+15687000000 15687007518
+15690000000 15690007510
+15693000000 15693007511
+15696000000 15696007522
+15699000000 15699007522
+15702000000 15702007476
+15705000000 15705007531
+15708000000 15708007496
+15711000000 15711007524
+15714000000 15714007523
+15717000000 15717007517
+15720000000 15720007472
+15723000000 15723007541
+15726000000 15726007520
+15729000000 15729007528
+15732000000 15732007514
+15735000000 15735007518
+15738000000 15738007520
+15741000000 15741007510
+15744000000 15744007506
+15747000000 15747007514
+15750000000 15750007510
+15753000000 15753007516
+15756000000 15756007507
+15759000000 15759007523
+15762000000 15762007493
+15765000000 15765007514
+15768000000 15768007509
+15771000000 15771007518
+15774000000 15774007507
+15777000000 15777007531
+15780000000 15780007512
+15783000000 15783007497
+15786000000 15786007511
+15789000000 15789007514
+15792000000 15792007517
+15795000000 15795007518
+15798000000 15798007528
+15801000000 15801007517
+15804000000 15804007521
+15807000000 15807007512
+15810000000 15810007510
+15813000000 15813007512
+15816000000 15816007511
+15819000000 15819007477
+15822000000 15822007507
+15825000000 15825007501
+15828000000 15828007517
+15831000000 15831007493
+15834000000 15834007505
+15837000000 15837007518
+15840000000 15840007520
+15843000000 15843007509
+15846000000 15846007451
+15849000000 15849007449
+15852000000 15852007521
+15855000000 15855007436
+15858000000 15858007510
+15861000000 15861007522
+15864000000 15864007514
+15867000000 15867007514
+15870000000 15870007473
+15873000000 15873007498
+15876000000 15876007421
+15879000000 15879007502
+15882000000 15882007514
+15885000000 15885007517
+15888000000 15888007484
+15891000000 15891007495
+15894000000 15894007513
+15897000000 15897007509
+15900000000 15900007517
+15903000000 15903007516
+15906000000 15906007510
+15909000000 15909007535
+15912000000 15912007514
+15915000000 15915007518
+15918000000 15918007503
+15921000000 15921007501
+15924000000 15924007472
+15927000000 15927007502
+15930000000 15930007510
+15933000000 15933007527
+15936000000 15936007517
+15939000000 15939007467
+15942000000 15942007521
+15945000000 15945007515
+15948000000 15948007509
+15951000000 15951007509
+15954000000 15954007523
+15957000000 15957007514
+15960000000 15960007520
+15963000000 15963007509
+15966000000 15966007459
+15969000000 15969007518
+15972000000 15972007514
+15975000000 15975007501
+15978000000 15978007512
+15981000000 15981007430
+15984000000 15984007513
+15987000000 15987007505
+15990000000 15990007506
+15993000000 15993007517
+15996000000 15996007517
+15999000000 15999007471
+16002000000 16002007526
+16005000000 16005007491
+16008000000 16008007519
+16011000000 16011007518
+16014000000 16014007512
+16017000000 16017007467
+16020000000 16020007536
+16023000000 16023007515
+16026000000 16026007523
+16029000000 16029007509
+16032000000 16032007513
+16035000000 16035007515
+16038000000 16038007505
+16041000000 16041007501
+16044000000 16044007509
+16047000000 16047007505
+16050000000 16050007511
+16053000000 16053007502
+16056000000 16056007518
+16059000000 16059007488
+16062000000 16062007509
+16065000000 16065007504
+16068000000 16068007513
+16071000000 16071007502
+16074000000 16074007526
+16077000000 16077007507
+16080000000 16080007492
+16083000000 16083007506
+16086000000 16086007509
+16089000000 16089007512
+16092000000 16092007513
+16095000000 16095007523
+16098000000 16098007512
+16101000000 16101007516
+16104000000 16104007507
+16107000000 16107007505
+16110000000 16110007507
+16113000000 16113007506
+16116000000 16116007472
+16119000000 16119007502
+16122000000 16122007496
+16125000000 16125007512
+16128000000 16128007488
+16131000000 16131007500
+16134000000 16134007513
+16137000000 16137007515
+16140000000 16140007504
+16143000000 16143007446
+16146000000 16146007444
+16149000000 16149007516
+16152000000 16152007431
+16155000000 16155007505
+16158000000 16158007517
+16161000000 16161007509
+16164000000 16164007509
+16167000000 16167007468
+16170000000 16170007493
+16173000000 16173007416
+16176000000 16176007497
+16179000000 16179007509
+16182000000 16182007512
+16185000000 16185007479
+16188000000 16188007490
+16191000000 16191007508
+16194000000 16194007504
+16197000000 16197007512
+16200000000 16200007511
+16203000000 16203007505
+16206000000 16206007530
+16209000000 16209007509
+16212000000 16212007513
+16215000000 16215007498
+16218000000 16218007496
+16221000000 16221007467
+16224000000 16224007497
+16227000000 16227007505
+16230000000 16230007522
+16233000000 16233007512
+16236000000 16236007462
+16239000000 16239007516
+16242000000 16242007510
+16245000000 16245007504
+16248000000 16248007504
+16251000000 16251007518
+16254000000 16254007509
+16257000000 16257007515
+16260000000 16260007504
+16263000000 16263007454
+16266000000 16266007513
+16269000000 16269007509
+16272000000 16272007496
+16275000000 16275007507
+16278000000 16278007425
+16281000000 16281007508
+16284000000 16284007500
+16287000000 16287007501
+16290000000 16290007512
+16293000000 16293007512
+16296000000 16296007466
+16299000000 16299007521
+16302000000 16302007486
+16305000000 16305007514
+16308000000 16308007513
+16311000000 16311007507
+16314000000 16314007462
+16317000000 16317007531
+16320000000 16320007510
+16323000000 16323007518
+16326000000 16326007504
+16329000000 16329007508
+16332000000 16332007510
+16335000000 16335007500
+16338000000 16338007496
+16341000000 16341007504
+16344000000 16344007500
+16347000000 16347007506
+16350000000 16350007497
+16353000000 16353007513
+16356000000 16356007483
+16359000000 16359007504
+16362000000 16362007499
+16365000000 16365007508
+16368000000 16368007497
+16371000000 16371007521
+16374000000 16374007502
+16377000000 16377007487
+16380000000 16380007501
+16383000000 16383007504
+16386000000 16386007507
+16389000000 16389007508
+16392000000 16392007518
+16395000000 16395007507
+16398000000 16398007511
+16401000000 16401007502
+16404000000 16404007500
+16407000000 16407007502
+16410000000 16410007501
+16413000000 16413007467
+16416000000 16416007497
+16419000000 16419007491
+16422000000 16422007507
+16425000000 16425007483
+16428000000 16428007495
+16431000000 16431007508
+16434000000 16434007510
+16437000000 16437007499
+16440000000 16440007441
+16443000000 16443007439
+16446000000 16446007511
+16449000000 16449007426
+16452000000 16452007500
+16455000000 16455007512
+16458000000 16458007504
+16461000000 16461007504
+16464000000 16464007463
+16467000000 16467007488
+16470000000 16470007411
+16473000000 16473007492
+16476000000 16476007504
+16479000000 16479007507
+16482000000 16482007474
+16485000000 16485007485
+16488000000 16488007503
+16491000000 16491007499
+16494000000 16494007507
+16497000000 16497007506
+16500000000 16500007500
+16503000000 16503007525
+16506000000 16506007504
+16509000000 16509007508
+16512000000 16512007493
+16515000000 16515007491
+16518000000 16518007462
+16521000000 16521007492
+16524000000 16524007500
+16527000000 16527007517
+16530000000 16530007507
+16533000000 16533007457
+16536000000 16536007511
+16539000000 16539007505
+16542000000 16542007499
+16545000000 16545007499
+16548000000 16548007513
+16551000000 16551007504
+16554000000 16554007510
+16557000000 16557007499
+16560000000 16560007449
+16563000000 16563007508
+16566000000 16566007504
+16569000000 16569007491
+16572000000 16572007502
+16575000000 16575007420
+16578000000 16578007503
+16581000000 16581007495
+16584000000 16584007496
+16587000000 16587007507
+16590000000 16590007507
+16593000000 16593007461
+16596000000 16596007516
+16599000000 16599007481
+16602000000 16602007509
+16605000000 16605007508
+16608000000 16608007502
+16611000000 16611007457
+16614000000 16614007526
+16617000000 16617007505
+16620000000 16620007513
+16623000000 16623007499
+16626000000 16626007503
+16629000000 16629007505
+16632000000 16632007495
+16635000000 16635007491
+16638000000 16638007499
+16641000000 16641007495
+16644000000 16644007501
+16647000000 16647007492
+16650000000 16650007508
+16653000000 16653007478
+16656000000 16656007499
+16659000000 16659007494
+16662000000 16662007503
+16665000000 16665007492
+16668000000 16668007516
+16671000000 16671007497
+16674000000 16674007482
+16677000000 16677007496
+16680000000 16680007499
+16683000000 16683007502
+16686000000 16686007503
+16689000000 16689007513
+16692000000 16692007502
+16695000000 16695007506
+16698000000 16698007497
+16701000000 16701007495
+16704000000 16704007497
+16707000000 16707007496
+16710000000 16710007462
+16713000000 16713007492
+16716000000 16716007486
+16719000000 16719007502
+16722000000 16722007478
+16725000000 16725007490
+16728000000 16728007503
+16731000000 16731007505
+16734000000 16734007494
+16737000000 16737007436
+16740000000 16740007434
+16743000000 16743007506
+16746000000 16746007421
+16749000000 16749007495
+16752000000 16752007507
+16755000000 16755007499
+16758000000 16758007499
+16761000000 16761007458
+16764000000 16764007483
+16767000000 16767007406
+16770000000 16770007487
+16773000000 16773007499
+16776000000 16776007502
+16779000000 16779007469
+16782000000 16782007480
+16785000000 16785007498
+16788000000 16788007494
+16791000000 16791007502
+16794000000 16794007501
+16797000000 16797007495
+16800000000 16800007520
+16803000000 16803007499
+16806000000 16806007503
+16809000000 16809007488
+16812000000 16812007486
+16815000000 16815007457
+16818000000 16818007487
+16821000000 16821007495
+16824000000 16824007512
+16827000000 16827007502
+16830000000 16830007452
+16833000000 16833007506
+16836000000 16836007500
+16839000000 16839007494
+16842000000 16842007494
+16845000000 16845007508
+16848000000 16848007499
+16851000000 16851007505
+16854000000 16854007494
+16857000000 16857007444
+16860000000 16860007503
+16863000000 16863007499
+16866000000 16866007486
+16869000000 16869007497
+16872000000 16872007415
+16875000000 16875007498
+16878000000 16878007490
+16881000000 16881007491
+16884000000 16884007502
+16887000000 16887007502
+16890000000 16890007456
+16893000000 16893007511
+16896000000 16896007476
+16899000000 16899007504
+16902000000 16902007503
+16905000000 16905007497
+16908000000 16908007452
+16911000000 16911007521
+16914000000 16914007500
+16917000000 16917007508
+16920000000 16920007494
+16923000000 16923007498
+16926000000 16926007500
+16929000000 16929007490
+16932000000 16932007486
+16935000000 16935007494
+16938000000 16938007490
+16941000000 16941007496
+16944000000 16944007487
+16947000000 16947007503
+16950000000 16950007473
+16953000000 16953007494
+16956000000 16956007489
+16959000000 16959007498
+16962000000 16962007487
+16965000000 16965007511
+16968000000 16968007492
+16971000000 16971007477
+16974000000 16974007491
+16977000000 16977007494
+16980000000 16980007497
+16983000000 16983007498
+16986000000 16986007508
+16989000000 16989007497
+16992000000 16992007501
+16995000000 16995007492
+16998000000 16998007490
+17001000000 17001007492
+17004000000 17004007491
+17007000000 17007007457
+17010000000 17010007487
+17013000000 17013007481
+17016000000 17016007497
+17019000000 17019007473
+17022000000 17022007485
+17025000000 17025007498
+17028000000 17028007500
+17031000000 17031007489
+17034000000 17034007431
+17037000000 17037007429
+17040000000 17040007501
+17043000000 17043007416
+17046000000 17046007490
+17049000000 17049007502
+17052000000 17052007494
+17055000000 17055007494
+17058000000 17058007453
+17061000000 17061007478
+17064000000 17064007401
+17067000000 17067007482
+17070000000 17070007494
+17073000000 17073007497
+17076000000 17076007464
+17079000000 17079007475
+17082000000 17082007493
+17085000000 17085007489
+17088000000 17088007497
+17091000000 17091007496
+17094000000 17094007490
+17097000000 17097007515
+17100000000 17100007494
+17103000000 17103007498
+17106000000 17106007483
+17109000000 17109007481
+17112000000 17112007452
+17115000000 17115007482
+17118000000 17118007490
+17121000000 17121007507
+17124000000 17124007497
+17127000000 17127007447
+17130000000 17130007501
+17133000000 17133007495
+17136000000 17136007489
+17139000000 17139007489
+17142000000 17142007503
+17145000000 17145007494
+17148000000 17148007500
+17151000000 17151007489
+17154000000 17154007439
+17157000000 17157007498
+17160000000 17160007494
+17163000000 17163007481
+17166000000 17166007492
+17169000000 17169007410
+17172000000 17172007493
+17175000000 17175007485
+17178000000 17178007486
+17181000000 17181007497
+17184000000 17184007497
+17187000000 17187007451
+17190000000 17190007506
+17193000000 17193007471
+17196000000 17196007499
+17199000000 17199007498
+17202000000 17202007492
+17205000000 17205007447
+17208000000 17208007516
+17211000000 17211007495
+17214000000 17214007503
+17217000000 17217007489
+17220000000 17220007493
+17223000000 17223007495
+17226000000 17226007485
+17229000000 17229007481
+17232000000 17232007489
+17235000000 17235007485
+17238000000 17238007491
+17241000000 17241007482
+17244000000 17244007498
+17247000000 17247007468
+17250000000 17250007489
+17253000000 17253007484
+17256000000 17256007493
+17259000000 17259007482
+17262000000 17262007506
+17265000000 17265007487
+17268000000 17268007472
+17271000000 17271007486
+17274000000 17274007489
+17277000000 17277007492
+17280000000 17280007493
+17283000000 17283007503
+17286000000 17286007492
+17289000000 17289007496
+17292000000 17292007487
+17295000000 17295007485
+17298000000 17298007487
+17301000000 17301007486
+17304000000 17304007452
+17307000000 17307007482
+17310000000 17310007476
+17313000000 17313007492
+17316000000 17316007468
+17319000000 17319007480
+17322000000 17322007493
+17325000000 17325007495
+17328000000 17328007484
+17331000000 17331007426
+17334000000 17334007424
+17337000000 17337007496
+17340000000 17340007411
+17343000000 17343007485
+17346000000 17346007497
+17349000000 17349007489
+17352000000 17352007489
+17355000000 17355007448
+17358000000 17358007473
+17361000000 17361007396
+17364000000 17364007477
+17367000000 17367007489
+17370000000 17370007492
+17373000000 17373007459
+17376000000 17376007470
+17379000000 17379007488
+17382000000 17382007484
+17385000000 17385007492
+17388000000 17388007491
+17391000000 17391007485
+17394000000 17394007510
+17397000000 17397007489
+17400000000 17400007493
+17403000000 17403007478
+17406000000 17406007476
+17409000000 17409007447
+17412000000 17412007477
+17415000000 17415007485
+17418000000 17418007502
+17421000000 17421007492
+17424000000 17424007442
+17427000000 17427007496
+17430000000 17430007490
+17433000000 17433007484
+17436000000 17436007484
+17439000000 17439007498
+17442000000 17442007489
+17445000000 17445007495
+17448000000 17448007484
+17451000000 17451007434
+17454000000 17454007493
+17457000000 17457007489
+17460000000 17460007476
+17463000000 17463007487
+17466000000 17466007405
+17469000000 17469007488
+17472000000 17472007480
+17475000000 17475007481
+17478000000 17478007492
+17481000000 17481007492
+17484000000 17484007446
+17487000000 17487007501
+17490000000 17490007466
+17493000000 17493007494
+17496000000 17496007493
+17499000000 17499007487
+17502000000 17502007442
+17505000000 17505007511
+17508000000 17508007490
+17511000000 17511007498
+17514000000 17514007484
+17517000000 17517007488
+17520000000 17520007490
+17523000000 17523007480
+17526000000 17526007476
+17529000000 17529007484
+17532000000 17532007480
+17535000000 17535007486
+17538000000 17538007477
+17541000000 17541007493
+17544000000 17544007463
+17547000000 17547007484
+17550000000 17550007479
+17553000000 17553007488
+17556000000 17556007477
+17559000000 17559007501
+17562000000 17562007482
+17565000000 17565007467
+17568000000 17568007481
+17571000000 17571007484
+17574000000 17574007487
+17577000000 17577007488
+17580000000 17580007498
+17583000000 17583007487
+17586000000 17586007491
+17589000000 17589007482
+17592000000 17592007480
+17595000000 17595007482
+17598000000 17598007481
+17601000000 17601007447
+17604000000 17604007477
+17607000000 17607007471
+17610000000 17610007487
+17613000000 17613007463
+17616000000 17616007475
+17619000000 17619007488
+17622000000 17622007490
+17625000000 17625007479
+17628000000 17628007421
+17631000000 17631007419
+17634000000 17634007491
+17637000000 17637007406
+17640000000 17640007480
+17643000000 17643007492
+17646000000 17646007484
+17649000000 17649007484
+17652000000 17652007443
+17655000000 17655007468
+17658000000 17658007391
+17661000000 17661007472
+17664000000 17664007484
+17667000000 17667007487
+17670000000 17670007454
+17673000000 17673007465
+17676000000 17676007483
+17679000000 17679007479
+17682000000 17682007487
+17685000000 17685007486
+17688000000 17688007480
+17691000000 17691007505
+17694000000 17694007484
+17697000000 17697007488
+17700000000 17700007473
+17703000000 17703007471
+17706000000 17706007442
+17709000000 17709007472
+17712000000 17712007480
+17715000000 17715007497
+17718000000 17718007487
+17721000000 17721007437
+17724000000 17724007491
+17727000000 17727007485
+17730000000 17730007479
+17733000000 17733007479
+17736000000 17736007493
+17739000000 17739007484
+17742000000 17742007490
+17745000000 17745007479
+17748000000 17748007429
+17751000000 17751007488
+17754000000 17754007484
+17757000000 17757007471
+17760000000 17760007482
+17763000000 17763007400
+17766000000 17766007483
+17769000000 17769007475
+17772000000 17772007476
+17775000000 17775007487
+17778000000 17778007487
+17781000000 17781007441
+17784000000 17784007496
+17787000000 17787007461
+17790000000 17790007489
+17793000000 17793007488
+17796000000 17796007482
+17799000000 17799007437
+17802000000 17802007506
+17805000000 17805007485
+17808000000 17808007493
+17811000000 17811007479
+17814000000 17814007483
+17817000000 17817007485
+17820000000 17820007475
+17823000000 17823007471
+17826000000 17826007479
+17829000000 17829007475
+17832000000 17832007481
+17835000000 17835007472
+17838000000 17838007488
+17841000000 17841007458
+17844000000 17844007479
+17847000000 17847007474
+17850000000 17850007483
+17853000000 17853007472
+17856000000 17856007496
+17859000000 17859007477
+17862000000 17862007462
+17865000000 17865007476
+17868000000 17868007479
+17871000000 17871007482
+17874000000 17874007483
+17877000000 17877007493
+17880000000 17880007482
+17883000000 17883007486
+17886000000 17886007477
+17889000000 17889007475
+17892000000 17892007477
+17895000000 17895007476
+17898000000 17898007442
+17901000000 17901007472
+17904000000 17904007466
+17907000000 17907007482
+17910000000 17910007458
+17913000000 17913007470
+17916000000 17916007483
+17919000000 17919007485
+17922000000 17922007474
+17925000000 17925007416
+17928000000 17928007414
+17931000000 17931007486
+17934000000 17934007401
+17937000000 17937007475
+17940000000 17940007487
+17943000000 17943007479
+17946000000 17946007479
+17949000000 17949007438
+17952000000 17952007463
+17955000000 17955007386
+17958000000 17958007467
+17961000000 17961007479
+17964000000 17964007482
+17967000000 17967007449
+17970000000 17970007460
+17973000000 17973007478
+17976000000 17976007474
+17979000000 17979007482
+17982000000 17982007481
+17985000000 17985007475
+17988000000 17988007500
+17991000000 17991007479
+17994000000 17994007483
+17997000000 17997007468
+18000000000 18000007466
+18003000000 18003007437
+18006000000 18006007467
+18009000000 18009007475
+18012000000 18012007492
+18015000000 18015007482
+18018000000 18018007432
+18021000000 18021007486
+18024000000 18024007480
+18027000000 18027007474
+18030000000 18030007474
+18033000000 18033007488
+18036000000 18036007479
+18039000000 18039007485
+18042000000 18042007474
+18045000000 18045007424
+18048000000 18048007483
+18051000000 18051007479
+18054000000 18054007466
+18057000000 18057007477
+18060000000 18060007395
+18063000000 18063007478
+18066000000 18066007470
+18069000000 18069007471
+18072000000 18072007482
+18075000000 18075007482
+18078000000 18078007436
+18081000000 18081007491
+18084000000 18084007456
+18087000000 18087007484
+18090000000 18090007483
+18093000000 18093007477
+18096000000 18096007432
+18099000000 18099007501
+18102000000 18102007480
+18105000000 18105007488
+18108000000 18108007474
+18111000000 18111007478
+18114000000 18114007480
+18117000000 18117007470
+18120000000 18120007466
+18123000000 18123007474
+18126000000 18126007470
+18129000000 18129007476
+18132000000 18132007467
+18135000000 18135007483
+18138000000 18138007453
+18141000000 18141007474
+18144000000 18144007469
+18147000000 18147007478
+18150000000 18150007467
+18153000000 18153007491
+18156000000 18156007472
+18159000000 18159007457
+18162000000 18162007471
+18165000000 18165007474
+18168000000 18168007477
+18171000000 18171007478
+18174000000 18174007488
+18177000000 18177007477
+18180000000 18180007481
+18183000000 18183007472
+18186000000 18186007470
+18189000000 18189007472
+18192000000 18192007471
+18195000000 18195007437
+18198000000 18198007467
+18201000000 18201007461
+18204000000 18204007477
+18207000000 18207007453
+18210000000 18210007465
+18213000000 18213007478
+18216000000 18216007480
+18219000000 18219007469
+18222000000 18222007411
+18225000000 18225007409
+18228000000 18228007481
+18231000000 18231007396
+18234000000 18234007470
+18237000000 18237007482
+18240000000 18240007474
+18243000000 18243007474
+18246000000 18246007433
+18249000000 18249007458
+18252000000 18252007381
+18255000000 18255007462
+18258000000 18258007474
+18261000000 18261007477
+18264000000 18264007444
+18267000000 18267007455
+18270000000 18270007473
+18273000000 18273007469
+18276000000 18276007477
+18279000000 18279007476
+18282000000 18282007470
+18285000000 18285007495
+18288000000 18288007474
+18291000000 18291007478
+18294000000 18294007463
+18297000000 18297007461
+18300000000 18300007432
+18303000000 18303007462
+18306000000 18306007470
+18309000000 18309007487
+18312000000 18312007477
+18315000000 18315007427
+18318000000 18318007481
+18321000000 18321007475
+18324000000 18324007469
+18327000000 18327007469
+18330000000 18330007483
+18333000000 18333007474
+18336000000 18336007480
+18339000000 18339007469
+18342000000 18342007419
+18345000000 18345007478
+18348000000 18348007474
+18351000000 18351007461
+18354000000 18354007472
+18357000000 18357007390
+18360000000 18360007473
+18363000000 18363007465
+18366000000 18366007466
+18369000000 18369007477
+18372000000 18372007477
+18375000000 18375007431
+18378000000 18378007486
+18381000000 18381007451
+18384000000 18384007479
+18387000000 18387007478
+18390000000 18390007472
+18393000000 18393007427
+18396000000 18396007496
+18399000000 18399007475
+18402000000 18402007483
+18405000000 18405007469
+18408000000 18408007473
+18411000000 18411007475
+18414000000 18414007465
+18417000000 18417007461
+18420000000 18420007469
+18423000000 18423007465
+18426000000 18426007471
+18429000000 18429007462
+18432000000 18432007478
+18435000000 18435007448
+18438000000 18438007469
+18441000000 18441007464
+18444000000 18444007473
+18447000000 18447007462
+18450000000 18450007486
+18453000000 18453007467
+18456000000 18456007452
+18459000000 18459007466
+18462000000 18462007469
+18465000000 18465007472
+18468000000 18468007473
+18471000000 18471007483
+18474000000 18474007472
+18477000000 18477007476
+18480000000 18480007467
+18483000000 18483007465
+18486000000 18486007467
+18489000000 18489007466
+18492000000 18492007432
+18495000000 18495007462
+18498000000 18498007456
+18501000000 18501007472
+18504000000 18504007448
+18507000000 18507007460
+18510000000 18510007473
+18513000000 18513007475
+18516000000 18516007464
+18519000000 18519007406
+18522000000 18522007404
+18525000000 18525007476
+18528000000 18528007391
+18531000000 18531007465
+18534000000 18534007477
+18537000000 18537007469
+18540000000 18540007469
+18543000000 18543007428
+18546000000 18546007453
+18549000000 18549007376
+18552000000 18552007457
+18555000000 18555007469
+18558000000 18558007472
+18561000000 18561007439
+18564000000 18564007450
+18567000000 18567007468
+18570000000 18570007464
+18573000000 18573007472
+18576000000 18576007471
+18579000000 18579007465
+18582000000 18582007490
+18585000000 18585007469
+18588000000 18588007473
+18591000000 18591007458
+18594000000 18594007456
+18597000000 18597007427
+18600000000 18600007457
+18603000000 18603007465
+18606000000 18606007482
+18609000000 18609007472
+18612000000 18612007422
+18615000000 18615007476
+18618000000 18618007470
+18621000000 18621007464
+18624000000 18624007464
+18627000000 18627007478
+18630000000 18630007469
+18633000000 18633007475
+18636000000 18636007464
+18639000000 18639007414
+18642000000 18642007473
+18645000000 18645007469
+18648000000 18648007456
+18651000000 18651007467
+18654000000 18654007385
+18657000000 18657007468
+18660000000 18660007460
+18663000000 18663007461
+18666000000 18666007472
+18669000000 18669007472
+18672000000 18672007426
+18675000000 18675007481
+18678000000 18678007446
+18681000000 18681007474
+18684000000 18684007473
+18687000000 18687007467
+18690000000 18690007422
+18693000000 18693007491
+18696000000 18696007470
+18699000000 18699007478
+18702000000 18702007464
+18705000000 18705007468
+18708000000 18708007470
+18711000000 18711007460
+18714000000 18714007456
+18717000000 18717007464
+18720000000 18720007460
+18723000000 18723007466
+18726000000 18726007457
+18729000000 18729007473
+18732000000 18732007443
+18735000000 18735007464
+18738000000 18738007459
+18741000000 18741007468
+18744000000 18744007457
+18747000000 18747007481
+18750000000 18750007462
+18753000000 18753007447
+18756000000 18756007461
+18759000000 18759007464
+18762000000 18762007467
+18765000000 18765007468
+18768000000 18768007478
+18771000000 18771007467
+18774000000 18774007471
+18777000000 18777007462
+18780000000 18780007460
+18783000000 18783007462
+18786000000 18786007461
+18789000000 18789007427
+18792000000 18792007457
+18795000000 18795007451
+18798000000 18798007467
+18801000000 18801007443
+18804000000 18804007455
+18807000000 18807007468
+18810000000 18810007470
+18813000000 18813007459
+18816000000 18816007401
+18819000000 18819007399
+18822000000 18822007471
+18825000000 18825007386
+18828000000 18828007460
+18831000000 18831007472
+18834000000 18834007464
+18837000000 18837007464
+18840000000 18840007423
+18843000000 18843007448
+18846000000 18846007371
+18849000000 18849007452
+18852000000 18852007464
+18855000000 18855007467
+18858000000 18858007434
+18861000000 18861007445
+18864000000 18864007463
+18867000000 18867007459
+18870000000 18870007467
+18873000000 18873007466
+18876000000 18876007460
+18879000000 18879007485
+18882000000 18882007464
+18885000000 18885007468
+18888000000 18888007453
+18891000000 18891007451
+18894000000 18894007422
+18897000000 18897007452
+18900000000 18900007460
+18903000000 18903007477
+18906000000 18906007467
+18909000000 18909007417
+18912000000 18912007471
+18915000000 18915007465
+18918000000 18918007459
+18921000000 18921007459
+18924000000 18924007473
+18927000000 18927007464
+18930000000 18930007470
+18933000000 18933007459
+18936000000 18936007409
+18939000000 18939007468
+18942000000 18942007464
+18945000000 18945007451
+18948000000 18948007462
+18951000000 18951007380
+18954000000 18954007463
+18957000000 18957007455
+18960000000 18960007456
+18963000000 18963007467
+18966000000 18966007467
+18969000000 18969007421
+18972000000 18972007476
+18975000000 18975007441
+18978000000 18978007469
+18981000000 18981007468
+18984000000 18984007462
+18987000000 18987007417
+18990000000 18990007486
+18993000000 18993007465
+18996000000 18996007473
+18999000000 18999007459
+19002000000 19002007463
+19005000000 19005007465
+19008000000 19008007455
+19011000000 19011007451
+19014000000 19014007459
+19017000000 19017007455
+19020000000 19020007461
+19023000000 19023007452
+19026000000 19026007468
+19029000000 19029007438
+19032000000 19032007459
+19035000000 19035007454
+19038000000 19038007463
+19041000000 19041007452
+19044000000 19044007476
+19047000000 19047007457
+19050000000 19050007442
+19053000000 19053007456
+19056000000 19056007459
+19059000000 19059007462
+19062000000 19062007463
+19065000000 19065007473
+19068000000 19068007462
+19071000000 19071007466
+19074000000 19074007457
+19077000000 19077007455
+19080000000 19080007457
+19083000000 19083007456
+19086000000 19086007422
+19089000000 19089007452
+19092000000 19092007446
+19095000000 19095007462
+19098000000 19098007438
+19101000000 19101007450
+19104000000 19104007463
+19107000000 19107007465
+19110000000 19110007454
+19113000000 19113007396
+19116000000 19116007394
+19119000000 19119007466
+19122000000 19122007381
+19125000000 19125007455
+19128000000 19128007467
+19131000000 19131007459
+19134000000 19134007459
+19137000000 19137007418
+19140000000 19140007443
+19143000000 19143007366
+19146000000 19146007447
+19149000000 19149007459
+19152000000 19152007462
+19155000000 19155007429
+19158000000 19158007440
+19161000000 19161007458
+19164000000 19164007454
+19167000000 19167007462
+19170000000 19170007461
+19173000000 19173007455
+19176000000 19176007480
+19179000000 19179007459
+19182000000 19182007463
+19185000000 19185007448
+19188000000 19188007446
+19191000000 19191007417
+19194000000 19194007447
+19197000000 19197007455
+19200000000 19200007472
+19203000000 19203007462
+19206000000 19206007412
+19209000000 19209007466
+19212000000 19212007460
+19215000000 19215007454
+19218000000 19218007454
+19221000000 19221007468
+19224000000 19224007459
+19227000000 19227007465
+19230000000 19230007454
+19233000000 19233007404
+19236000000 19236007463
+19239000000 19239007459
+19242000000 19242007446
+19245000000 19245007457
+19248000000 19248007375
+19251000000 19251007458
+19254000000 19254007450
+19257000000 19257007451
+19260000000 19260007462
+19263000000 19263007462
+19266000000 19266007416
+19269000000 19269007471
+19272000000 19272007436
+19275000000 19275007464
+19278000000 19278007463
+19281000000 19281007457
+19284000000 19284007412
+19287000000 19287007481
+19290000000 19290007460
+19293000000 19293007468
+19296000000 19296007454
+19299000000 19299007458
+19302000000 19302007460
+19305000000 19305007450
+19308000000 19308007446
+19311000000 19311007454
+19314000000 19314007450
+19317000000 19317007456
+19320000000 19320007447
+19323000000 19323007463
+19326000000 19326007433
+19329000000 19329007454
+19332000000 19332007449
+19335000000 19335007458
+19338000000 19338007447
+19341000000 19341007471
+19344000000 19344007452
+19347000000 19347007437
+19350000000 19350007451
+19353000000 19353007454
+19356000000 19356007457
+19359000000 19359007458
+19362000000 19362007468
+19365000000 19365007457
+19368000000 19368007461
+19371000000 19371007452
+19374000000 19374007450
+19377000000 19377007452
+19380000000 19380007451
+19383000000 19383007417
+19386000000 19386007447
+19389000000 19389007441
+19392000000 19392007457
+19395000000 19395007433
+19398000000 19398007445
+19401000000 19401007458
+19404000000 19404007460
+19407000000 19407007449
+19410000000 19410007391
+19413000000 19413007389
+19416000000 19416007461
+19419000000 19419007376
+19422000000 19422007450
+19425000000 19425007462
+19428000000 19428007454
+19431000000 19431007454
+19434000000 19434007413
+19437000000 19437007438
+19440000000 19440007361
+19443000000 19443007442
+19446000000 19446007454
+19449000000 19449007457
+19452000000 19452007424
+19455000000 19455007435
+19458000000 19458007453
+19461000000 19461007449
+19464000000 19464007457
+19467000000 19467007456
+19470000000 19470007450
+19473000000 19473007475
+19476000000 19476007454
+19479000000 19479007458
+19482000000 19482007443
+19485000000 19485007441
+19488000000 19488007412
+19491000000 19491007442
+19494000000 19494007450
+19497000000 19497007467
+19500000000 19500007457
+19503000000 19503007407
+19506000000 19506007461
+19509000000 19509007455
+19512000000 19512007449
+19515000000 19515007449
+19518000000 19518007463
+19521000000 19521007454
+19524000000 19524007460
+19527000000 19527007449
+19530000000 19530007399
+19533000000 19533007458
+19536000000 19536007454
+19539000000 19539007441
+19542000000 19542007452
+19545000000 19545007370
+19548000000 19548007453
+19551000000 19551007445
+19554000000 19554007446
+19557000000 19557007457
+19560000000 19560007457
+19563000000 19563007411
+19566000000 19566007466
+19569000000 19569007431
+19572000000 19572007459
+19575000000 19575007458
+19578000000 19578007452
+19581000000 19581007407
+19584000000 19584007476
+19587000000 19587007455
+19590000000 19590007463
+19593000000 19593007449
+19596000000 19596007453
+19599000000 19599007455
+19602000000 19602007445
+19605000000 19605007441
+19608000000 19608007449
+19611000000 19611007445
+19614000000 19614007451
+19617000000 19617007442
+19620000000 19620007458
+19623000000 19623007428
+19626000000 19626007449
+19629000000 19629007444
+19632000000 19632007453
+19635000000 19635007442
+19638000000 19638007466
+19641000000 19641007447
+19644000000 19644007432
+19647000000 19647007446
+19650000000 19650007449
+19653000000 19653007452
+19656000000 19656007453
+19659000000 19659007463
+19662000000 19662007452
+19665000000 19665007456
+19668000000 19668007447
+19671000000 19671007445
+19674000000 19674007447
+19677000000 19677007446
+19680000000 19680007412
+19683000000 19683007442
+19686000000 19686007436
+19689000000 19689007452
+19692000000 19692007428
+19695000000 19695007440
+19698000000 19698007453
+19701000000 19701007455
+19704000000 19704007444
+19707000000 19707007386
+19710000000 19710007384
+19713000000 19713007456
+19716000000 19716007371
+19719000000 19719007445
+19722000000 19722007457
+19725000000 19725007449
+19728000000 19728007449
+19731000000 19731007408
+19734000000 19734007433
+19737000000 19737007356
+19740000000 19740007437
+19743000000 19743007449
+19746000000 19746007452
+19749000000 19749007419
+19752000000 19752007430
+19755000000 19755007448
+19758000000 19758007444
+19761000000 19761007452
+19764000000 19764007451
+19767000000 19767007445
+19770000000 19770007470
+19773000000 19773007449
+19776000000 19776007453
+19779000000 19779007438
+19782000000 19782007436
+19785000000 19785007407
+19788000000 19788007437
+19791000000 19791007445
+19794000000 19794007462
+19797000000 19797007452
+19800000000 19800007402
+19803000000 19803007456
+19806000000 19806007450
+19809000000 19809007444
+19812000000 19812007444
+19815000000 19815007458
+19818000000 19818007449
+19821000000 19821007455
+19824000000 19824007444
+19827000000 19827007394
+19830000000 19830007453
+19833000000 19833007449
+19836000000 19836007436
+19839000000 19839007447
+19842000000 19842007365
+19845000000 19845007448
+19848000000 19848007440
+19851000000 19851007441
+19854000000 19854007452
+19857000000 19857007452
+19860000000 19860007406
+19863000000 19863007461
+19866000000 19866007426
+19869000000 19869007454
+19872000000 19872007453
+19875000000 19875007447
+19878000000 19878007402
+19881000000 19881007471
+19884000000 19884007450
+19887000000 19887007458
+19890000000 19890007444
+19893000000 19893007448
+19896000000 19896007450
+19899000000 19899007440
+19902000000 19902007436
+19905000000 19905007444
+19908000000 19908007440
+19911000000 19911007446
+19914000000 19914007437
+19917000000 19917007453
+19920000000 19920007423
+19923000000 19923007444
+19926000000 19926007439
+19929000000 19929007448
+19932000000 19932007437
+19935000000 19935007461
+19938000000 19938007442
+19941000000 19941007427
+19944000000 19944007441
+19947000000 19947007444
+19950000000 19950007447
+19953000000 19953007448
+19956000000 19956007458
+19959000000 19959007447
+19962000000 19962007451
+19965000000 19965007442
+19968000000 19968007440
+19971000000 19971007442
+19974000000 19974007441
+19977000000 19977007407
+19980000000 19980007437
+19983000000 19983007431
+19986000000 19986007447
+19989000000 19989007423
+19992000000 19992007435
+19995000000 19995007448
+19998000000 19998007450
+20001000000 20001007439
+20004000000 20004007381
+20007000000 20007007379
+20010000000 20010007451
+20013000000 20013007366
+20016000000 20016007440
+20019000000 20019007452
+20022000000 20022007444
+20025000000 20025007444
+20028000000 20028007403
+20031000000 20031007428
+20034000000 20034007351
+20037000000 20037007432
+20040000000 20040007444
+20043000000 20043007447
+20046000000 20046007414
+20049000000 20049007425
+20052000000 20052007443
+20055000000 20055007439
+20058000000 20058007447
+20061000000 20061007446
+20064000000 20064007440
+20067000000 20067007465
+20070000000 20070007444
+20073000000 20073007448
+20076000000 20076007433
+20079000000 20079007431
+20082000000 20082007402
+20085000000 20085007432
+20088000000 20088007440
+20091000000 20091007457
+20094000000 20094007447
+20097000000 20097007397
+20100000000 20100007451
+20103000000 20103007445
+20106000000 20106007439
+20109000000 20109007439
+20112000000 20112007453
+20115000000 20115007444
+20118000000 20118007450
+20121000000 20121007439
+20124000000 20124007389
+20127000000 20127007448
+20130000000 20130007444
+20133000000 20133007431
+20136000000 20136007442
+20139000000 20139007360
+20142000000 20142007443
+20145000000 20145007435
+20148000000 20148007436
+20151000000 20151007447
+20154000000 20154007447
+20157000000 20157007401
+20160000000 20160007456
+20163000000 20163007421
+20166000000 20166007449
+20169000000 20169007448
+20172000000 20172007442
+20175000000 20175007397
+20178000000 20178007466
+20181000000 20181007445
+20184000000 20184007453
+20187000000 20187007439
+20190000000 20190007443
+20193000000 20193007445
+20196000000 20196007435
+20199000000 20199007431
+20202000000 20202007439
+20205000000 20205007435
+20208000000 20208007441
+20211000000 20211007432
+20214000000 20214007448
+20217000000 20217007418
+20220000000 20220007439
+20223000000 20223007434
+20226000000 20226007443
+20229000000 20229007432
+20232000000 20232007456
+20235000000 20235007437
+20238000000 20238007422
+20241000000 20241007436
+20244000000 20244007439
+20247000000 20247007442
+20250000000 20250007443
+20253000000 20253007453
+20256000000 20256007442
+20259000000 20259007446
+20262000000 20262007437
+20265000000 20265007435
+20268000000 20268007437
+20271000000 20271007436
+20274000000 20274007402
+20277000000 20277007432
+20280000000 20280007426
+20283000000 20283007442
+20286000000 20286007418
+20289000000 20289007430
+20292000000 20292007443
+20295000000 20295007445
+20298000000 20298007434
+20301000000 20301007376
+20304000000 20304007374
+20307000000 20307007446
+20310000000 20310007361
+20313000000 20313007435
+20316000000 20316007447
+20319000000 20319007439
+20322000000 20322007439
+20325000000 20325007398
+20328000000 20328007423
+20331000000 20331007346
+20334000000 20334007427
+20337000000 20337007439
+20340000000 20340007442
+20343000000 20343007409
+20346000000 20346007420
+20349000000 20349007438
+20352000000 20352007434
+20355000000 20355007442
+20358000000 20358007441
+20361000000 20361007435
+20364000000 20364007460
+20367000000 20367007439
+20370000000 20370007443
+20373000000 20373007428
+20376000000 20376007426
+20379000000 20379007397
+20382000000 20382007427
+20385000000 20385007435
+20388000000 20388007452
+20391000000 20391007442
+20394000000 20394007392
+20397000000 20397007446
+20400000000 20400007440
+20403000000 20403007434
+20406000000 20406007434
+20409000000 20409007448
+20412000000 20412007439
+20415000000 20415007445
+20418000000 20418007434
+20421000000 20421007384
+20424000000 20424007443
+20427000000 20427007439
+20430000000 20430007426
+20433000000 20433007437
+20436000000 20436007355
+20439000000 20439007438
+20442000000 20442007430
+20445000000 20445007431
+20448000000 20448007442
+20451000000 20451007442
+20454000000 20454007396
+20457000000 20457007451
+20460000000 20460007416
+20463000000 20463007444
+20466000000 20466007443
+20469000000 20469007437
+20472000000 20472007392
+20475000000 20475007461
+20478000000 20478007440
+20481000000 20481007448
+20484000000 20484007434
+20487000000 20487007438
+20490000000 20490007440
+20493000000 20493007430
+20496000000 20496007426
+20499000000 20499007434
+20502000000 20502007430
+20505000000 20505007436
+20508000000 20508007427
+20511000000 20511007443
+20514000000 20514007413
+20517000000 20517007434
+20520000000 20520007429
+20523000000 20523007438
+20526000000 20526007427
+20529000000 20529007451
+20532000000 20532007432
+20535000000 20535007417
+20538000000 20538007431
+20541000000 20541007434
+20544000000 20544007437
+20547000000 20547007438
+20550000000 20550007448
+20553000000 20553007437
+20556000000 20556007441
+20559000000 20559007432
+20562000000 20562007430
+20565000000 20565007432
+20568000000 20568007431
+20571000000 20571007397
+20574000000 20574007427
+20577000000 20577007421
+20580000000 20580007437
+20583000000 20583007413
+20586000000 20586007425
+20589000000 20589007438
+20592000000 20592007440
+20595000000 20595007429
+20598000000 20598007371
+20601000000 20601007369
+20604000000 20604007441
+20607000000 20607007356
+20610000000 20610007430
+20613000000 20613007442
+20616000000 20616007434
+20619000000 20619007434
+20622000000 20622007393
+20625000000 20625007418
+20628000000 20628007341
+20631000000 20631007422
+20634000000 20634007434
+20637000000 20637007437
+20640000000 20640007404
+20643000000 20643007415
+20646000000 20646007433
+20649000000 20649007429
+20652000000 20652007437
+20655000000 20655007436
+20658000000 20658007430
+20661000000 20661007455
+20664000000 20664007434
+20667000000 20667007438
+20670000000 20670007423
+20673000000 20673007421
+20676000000 20676007392
+20679000000 20679007422
+20682000000 20682007430
+20685000000 20685007447
+20688000000 20688007437
+20691000000 20691007387
+20694000000 20694007441
+20697000000 20697007435
+20700000000 20700007429
+20703000000 20703007429
+20706000000 20706007443
+20709000000 20709007434
+20712000000 20712007440
+20715000000 20715007429
+20718000000 20718007379
+20721000000 20721007438
+20724000000 20724007434
+20727000000 20727007421
+20730000000 20730007432
+20733000000 20733007350
+20736000000 20736007433
+20739000000 20739007425
+20742000000 20742007426
+20745000000 20745007437
+20748000000 20748007437
+20751000000 20751007391
+20754000000 20754007446
+20757000000 20757007411
+20760000000 20760007439
+20763000000 20763007438
+20766000000 20766007432
+20769000000 20769007387
+20772000000 20772007456
+20775000000 20775007435
+20778000000 20778007443
+20781000000 20781007429
+20784000000 20784007433
+20787000000 20787007435
+20790000000 20790007425
+20793000000 20793007421
+20796000000 20796007429
+20799000000 20799007425
+20802000000 20802007431
+20805000000 20805007422
+20808000000 20808007438
+20811000000 20811007408
+20814000000 20814007429
+20817000000 20817007424
+20820000000 20820007433
+20823000000 20823007422
+20826000000 20826007446
+20829000000 20829007427
+20832000000 20832007412
+20835000000 20835007426
+20838000000 20838007429
+20841000000 20841007432
+20844000000 20844007433
+20847000000 20847007443
+20850000000 20850007432
+20853000000 20853007436
+20856000000 20856007427
+20859000000 20859007425
+20862000000 20862007427
+20865000000 20865007426
+20868000000 20868007392
+20871000000 20871007422
+20874000000 20874007416
+20877000000 20877007432
+20880000000 20880007408
+20883000000 20883007420
+20886000000 20886007433
+20889000000 20889007435
+20892000000 20892007424
+20895000000 20895007366
+20898000000 20898007364
+20901000000 20901007436
+20904000000 20904007351
+20907000000 20907007425
+20910000000 20910007437
+20913000000 20913007429
+20916000000 20916007429
+20919000000 20919007388
+20922000000 20922007413
+20925000000 20925007336
+20928000000 20928007417
+20931000000 20931007429
+20934000000 20934007432
+20937000000 20937007399
+20940000000 20940007410
+20943000000 20943007428
+20946000000 20946007424
+20949000000 20949007432
+20952000000 20952007431
+20955000000 20955007425
+20958000000 20958007450
+20961000000 20961007429
+20964000000 20964007433
+20967000000 20967007418
+20970000000 20970007416
+20973000000 20973007387
+20976000000 20976007417
+20979000000 20979007425
+20982000000 20982007442
+20985000000 20985007432
+20988000000 20988007382
+20991000000 20991007436
+20994000000 20994007430
+20997000000 20997007424
+21000000000 21000007424
+21003000000 21003007438
+21006000000 21006007429
+21009000000 21009007435
+21012000000 21012007424
+21015000000 21015007374
+21018000000 21018007433
+21021000000 21021007429
+21024000000 21024007416
+21027000000 21027007427
+21030000000 21030007345
+21033000000 21033007428
+21036000000 21036007420
+21039000000 21039007421
+21042000000 21042007432
+21045000000 21045007432
+21048000000 21048007386
+21051000000 21051007441
+21054000000 21054007406
+21057000000 21057007434
+21060000000 21060007433
+21063000000 21063007427
+21066000000 21066007382
+21069000000 21069007451
+21072000000 21072007430
+21075000000 21075007438
+21078000000 21078007424
+21081000000 21081007428
+21084000000 21084007430
+21087000000 21087007420
+21090000000 21090007416
+21093000000 21093007424
+21096000000 21096007420
+21099000000 21099007426
+21102000000 21102007417
+21105000000 21105007433
+21108000000 21108007403
+21111000000 21111007424
+21114000000 21114007419
+21117000000 21117007428
+21120000000 21120007417
+21123000000 21123007441
+21126000000 21126007422
+21129000000 21129007407
+21132000000 21132007421
+21135000000 21135007424
+21138000000 21138007427
+21141000000 21141007428
+21144000000 21144007438
+21147000000 21147007427
+21150000000 21150007431
+21153000000 21153007422
+21156000000 21156007420
+21159000000 21159007422
+21162000000 21162007421
+21165000000 21165007387
+21168000000 21168007417
+21171000000 21171007411
+21174000000 21174007427
+21177000000 21177007403
+21180000000 21180007415
+21183000000 21183007428
+21186000000 21186007430
+21189000000 21189007419
+21192000000 21192007361
+21195000000 21195007359
+21198000000 21198007431
+21201000000 21201007346
+21204000000 21204007420
+21207000000 21207007432
+21210000000 21210007424
+21213000000 21213007424
+21216000000 21216007383
+21219000000 21219007408
+21222000000 21222007331
+21225000000 21225007412
+21228000000 21228007424
+21231000000 21231007427
+21234000000 21234007394
+21237000000 21237007405
+21240000000 21240007423
+21243000000 21243007419
+21246000000 21246007427
+21249000000 21249007426
+21252000000 21252007420
+21255000000 21255007445
+21258000000 21258007424
+21261000000 21261007428
+21264000000 21264007413
+21267000000 21267007411
+21270000000 21270007382
+21273000000 21273007412
+21276000000 21276007420
+21279000000 21279007437
+21282000000 21282007427
+21285000000 21285007377
+21288000000 21288007431
+21291000000 21291007425
+21294000000 21294007419
+21297000000 21297007419
+21300000000 21300007433
+21303000000 21303007424
+21306000000 21306007430
+21309000000 21309007419
+21312000000 21312007369
+21315000000 21315007428
+21318000000 21318007424
+21321000000 21321007411
+21324000000 21324007422
+21327000000 21327007340
+21330000000 21330007423
+21333000000 21333007415
+21336000000 21336007416
+21339000000 21339007427
+21342000000 21342007427
+21345000000 21345007381
+21348000000 21348007436
+21351000000 21351007401
+21354000000 21354007429
+21357000000 21357007428
+21360000000 21360007422
+21363000000 21363007377
+21366000000 21366007446
+21369000000 21369007425
+21372000000 21372007433
+21375000000 21375007419
+21378000000 21378007423
+21381000000 21381007425
+21384000000 21384007415
+21387000000 21387007411
+21390000000 21390007419
+21393000000 21393007415
+21396000000 21396007421
+21399000000 21399007412
+21402000000 21402007428
+21405000000 21405007398
+21408000000 21408007419
+21411000000 21411007414
+21414000000 21414007423
+21417000000 21417007412
+21420000000 21420007436
+21423000000 21423007417
+21426000000 21426007402
+21429000000 21429007416
+21432000000 21432007419
+21435000000 21435007422
+21438000000 21438007423
+21441000000 21441007433
+21444000000 21444007422
+21447000000 21447007426
+21450000000 21450007417
+21453000000 21453007415
+21456000000 21456007417
+21459000000 21459007416
+21462000000 21462007382
+21465000000 21465007412
+21468000000 21468007406
+21471000000 21471007422
+21474000000 21474007398
+21477000000 21477007410
+21480000000 21480007423
+21483000000 21483007425
+21486000000 21486007414
+21489000000 21489007356
+21492000000 21492007354
+21495000000 21495007426
+21498000000 21498007341
+21501000000 21501007415
+21504000000 21504007427
+21507000000 21507007419
+21510000000 21510007419
+21513000000 21513007378
+21516000000 21516007403
+21519000000 21519007326
+21522000000 21522007407
+21525000000 21525007419
+21528000000 21528007422
+21531000000 21531007389
+21534000000 21534007400
+21537000000 21537007418
+21540000000 21540007414
+21543000000 21543007422
+21546000000 21546007421
+21549000000 21549007415
+21552000000 21552007440
+21555000000 21555007419
+21558000000 21558007423
+21561000000 21561007408
+21564000000 21564007406
+21567000000 21567007377
+21570000000 21570007407
+21573000000 21573007415
+21576000000 21576007432
+21579000000 21579007422
+21582000000 21582007372
+21585000000 21585007426
+21588000000 21588007420
+21591000000 21591007414
+21594000000 21594007414
+21597000000 21597007428
+21600000000 21600007419
+21603000000 21603007425
+21606000000 21606007414
+21609000000 21609007364
+21612000000 21612007423
+21615000000 21615007419
+21618000000 21618007406
+21621000000 21621007417
+21624000000 21624007335
+21627000000 21627007418
+21630000000 21630007410
+21633000000 21633007411
+21636000000 21636007422
+21639000000 21639007422
+21642000000 21642007376
+21645000000 21645007431
+21648000000 21648007396
+21651000000 21651007424
+21654000000 21654007423
+21657000000 21657007417
+21660000000 21660007372
+21663000000 21663007441
+21666000000 21666007420
+21669000000 21669007428
+21672000000 21672007414
+21675000000 21675007418
+21678000000 21678007420
+21681000000 21681007410
+21684000000 21684007406
+21687000000 21687007414
+21690000000 21690007410
+21693000000 21693007416
+21696000000 21696007407
+21699000000 21699007423
+21702000000 21702007393
+21705000000 21705007414
+21708000000 21708007409
+21711000000 21711007418
+21714000000 21714007407
+21717000000 21717007431
+21720000000 21720007412
+21723000000 21723007397
+21726000000 21726007411
+21729000000 21729007414
+21732000000 21732007417
+21735000000 21735007418
+21738000000 21738007428
+21741000000 21741007417
+21744000000 21744007421
+21747000000 21747007412
+21750000000 21750007410
+21753000000 21753007412
+21756000000 21756007411
+21759000000 21759007377
+21762000000 21762007407
+21765000000 21765007401
+21768000000 21768007417
+21771000000 21771007393
+21774000000 21774007405
+21777000000 21777007418
+21780000000 21780007420
+21783000000 21783007409
+21786000000 21786007351
+21789000000 21789007349
+21792000000 21792007421
+21795000000 21795007336
+21798000000 21798007410
+21801000000 21801007422
+21804000000 21804007414
+21807000000 21807007414
+21810000000 21810007373
+21813000000 21813007398
+21816000000 21816007321
+21819000000 21819007402
+21822000000 21822007414
+21825000000 21825007417
+21828000000 21828007384
+21831000000 21831007395
+21834000000 21834007413
+21837000000 21837007409
+21840000000 21840007417
+21843000000 21843007416
+21846000000 21846007410
+21849000000 21849007435
+21852000000 21852007414
+21855000000 21855007418
+21858000000 21858007403
+21861000000 21861007401
+21864000000 21864007372
+21867000000 21867007402
+21870000000 21870007410
+21873000000 21873007427
+21876000000 21876007417
+21879000000 21879007367
+21882000000 21882007421
+21885000000 21885007415
+21888000000 21888007409
+21891000000 21891007409
+21894000000 21894007423
+21897000000 21897007414
+21900000000 21900007420
+21903000000 21903007409
+21906000000 21906007359
+21909000000 21909007418
+21912000000 21912007414
+21915000000 21915007401
+21918000000 21918007412
+21921000000 21921007330
+21924000000 21924007413
+21927000000 21927007405
+21930000000 21930007406
+21933000000 21933007417
+21936000000 21936007417
+21939000000 21939007371
+21942000000 21942007426
+21945000000 21945007391
+21948000000 21948007419
+21951000000 21951007418
+21954000000 21954007412
+21957000000 21957007367
+21960000000 21960007436
+21963000000 21963007415
+21966000000 21966007423
+21969000000 21969007409
+21972000000 21972007413
+21975000000 21975007415
+21978000000 21978007405
+21981000000 21981007401
+21984000000 21984007409
+21987000000 21987007405
+21990000000 21990007411
+21993000000 21993007402
+21996000000 21996007418
+21999000000 21999007388
+22002000000 22002007409
+22005000000 22005007404
+22008000000 22008007413
+22011000000 22011007402
+22014000000 22014007426
+22017000000 22017007407
+22020000000 22020007392
+22023000000 22023007406
+22026000000 22026007409
+22029000000 22029007412
+22032000000 22032007413
+22035000000 22035007423
+22038000000 22038007412
+22041000000 22041007416
+22044000000 22044007407
+22047000000 22047007405
+22050000000 22050007407
+22053000000 22053007406
+22056000000 22056007372
+22059000000 22059007402
+22062000000 22062007396
+22065000000 22065007412
+22068000000 22068007388
+22071000000 22071007400
+22074000000 22074007413
+22077000000 22077007415
+22080000000 22080007404
+22083000000 22083007346
+22086000000 22086007344
+22089000000 22089007416
+22092000000 22092007331
+22095000000 22095007405
+22098000000 22098007417
+22101000000 22101007409
+22104000000 22104007409
+22107000000 22107007368
+22110000000 22110007393
+22113000000 22113007316
+22116000000 22116007397
+22119000000 22119007409
+22122000000 22122007412
+22125000000 22125007379
+22128000000 22128007390
+22131000000 22131007408
+22134000000 22134007404
+22137000000 22137007412
+22140000000 22140007411
+22143000000 22143007405
+22146000000 22146007430
+22149000000 22149007409
+22152000000 22152007413
+22155000000 22155007398
+22158000000 22158007396
+22161000000 22161007367
+22164000000 22164007397
+22167000000 22167007405
+22170000000 22170007422
+22173000000 22173007412
+22176000000 22176007362
+22179000000 22179007416
+22182000000 22182007410
+22185000000 22185007404
+22188000000 22188007404
+22191000000 22191007418
+22194000000 22194007409
+22197000000 22197007415
+22200000000 22200007404
+22203000000 22203007354
+22206000000 22206007413
+22209000000 22209007409
+22212000000 22212007396
+22215000000 22215007407
+22218000000 22218007325
+22221000000 22221007408
+22224000000 22224007400
+22227000000 22227007401
+22230000000 22230007412
+22233000000 22233007412
+22236000000 22236007366
+22239000000 22239007421
+22242000000 22242007386
+22245000000 22245007414
+22248000000 22248007413
+22251000000 22251007407
+22254000000 22254007362
+22257000000 22257007431
+22260000000 22260007410
+22263000000 22263007418
+22266000000 22266007404
+22269000000 22269007408
+22272000000 22272007410
+22275000000 22275007400
+22278000000 22278007396
+22281000000 22281007404
+22284000000 22284007400
+22287000000 22287007406
+22290000000 22290007397
+22293000000 22293007413
+22296000000 22296007383
+22299000000 22299007404
+22302000000 22302007399
+22305000000 22305007408
+22308000000 22308007397
+22311000000 22311007421
+22314000000 22314007402
+22317000000 22317007387
+22320000000 22320007401
+22323000000 22323007404
+22326000000 22326007407
+22329000000 22329007408
+22332000000 22332007418
+22335000000 22335007407
+22338000000 22338007411
+22341000000 22341007402
+22344000000 22344007400
+22347000000 22347007402
+22350000000 22350007401
+22353000000 22353007367
+22356000000 22356007397
+22359000000 22359007391
+22362000000 22362007407
+22365000000 22365007383
+22368000000 22368007395
+22371000000 22371007408
+22374000000 22374007410
+22377000000 22377007399
+22380000000 22380007341
+22383000000 22383007339
+22386000000 22386007411
+22389000000 22389007326
+22392000000 22392007400
+22395000000 22395007412
+22398000000 22398007404
+22401000000 22401007404
+22404000000 22404007363
+22407000000 22407007388
+22410000000 22410007311
+22413000000 22413007392
+22416000000 22416007404
+22419000000 22419007407
+22422000000 22422007374
+22425000000 22425007385
+22428000000 22428007403
+22431000000 22431007399
+22434000000 22434007407
+22437000000 22437007406
+22440000000 22440007400
+22443000000 22443007425
+22446000000 22446007404
+22449000000 22449007408
+22452000000 22452007393
+22455000000 22455007391
+22458000000 22458007362
+22461000000 22461007392
+22464000000 22464007400
+22467000000 22467007417
+22470000000 22470007407
+22473000000 22473007357
+22476000000 22476007411
+22479000000 22479007405
+22482000000 22482007399
+22485000000 22485007399
+22488000000 22488007413
+22491000000 22491007404
+22494000000 22494007410
+22497000000 22497007399
+22500000000 22500007349
+22503000000 22503007408
+22506000000 22506007404
+22509000000 22509007391
+22512000000 22512007402
+22515000000 22515007320
+22518000000 22518007403
+22521000000 22521007395
+22524000000 22524007396
+22527000000 22527007407
+22530000000 22530007407
+22533000000 22533007361
+22536000000 22536007416
+22539000000 22539007381
+22542000000 22542007409
+22545000000 22545007408
+22548000000 22548007402
+22551000000 22551007357
+22554000000 22554007426
+22557000000 22557007405
+22560000000 22560007413
+22563000000 22563007399
+22566000000 22566007403
+22569000000 22569007405
+22572000000 22572007395
+22575000000 22575007391
+22578000000 22578007399
+22581000000 22581007395
+22584000000 22584007401
+22587000000 22587007392
+22590000000 22590007408
+22593000000 22593007378
+22596000000 22596007399
+22599000000 22599007394
+22602000000 22602007403
+22605000000 22605007392
+22608000000 22608007416
+22611000000 22611007397
+22614000000 22614007382
+22617000000 22617007396
+22620000000 22620007399
+22623000000 22623007402
+22626000000 22626007403
+22629000000 22629007413
+22632000000 22632007402
+22635000000 22635007406
+22638000000 22638007397
+22641000000 22641007395
+22644000000 22644007397
+22647000000 22647007396
+22650000000 22650007362
+22653000000 22653007392
+22656000000 22656007386
+22659000000 22659007402
+22662000000 22662007378
+22665000000 22665007390
+22668000000 22668007403
+22671000000 22671007405
+22674000000 22674007394
+22677000000 22677007336
+22680000000 22680007334
+22683000000 22683007406
+22686000000 22686007321
+22689000000 22689007395
+22692000000 22692007407
+22695000000 22695007399
+22698000000 22698007399
+22701000000 22701007358
+22704000000 22704007383
+22707000000 22707007306
+22710000000 22710007387
+22713000000 22713007399
+22716000000 22716007402
+22719000000 22719007369
+22722000000 22722007380
+22725000000 22725007398
+22728000000 22728007394
+22731000000 22731007402
+22734000000 22734007401
+22737000000 22737007395
+22740000000 22740007420
+22743000000 22743007399
+22746000000 22746007403
+22749000000 22749007388
+22752000000 22752007386
+22755000000 22755007357
+22758000000 22758007387
+22761000000 22761007395
+22764000000 22764007412
+22767000000 22767007402
+22770000000 22770007352
+22773000000 22773007406
+22776000000 22776007400
+22779000000 22779007394
+22782000000 22782007394
+22785000000 22785007408
+22788000000 22788007399
+22791000000 22791007405
+22794000000 22794007394
+22797000000 22797007344
+22800000000 22800007403
+22803000000 22803007399
+22806000000 22806007386
+22809000000 22809007397
+22812000000 22812007315
+22815000000 22815007398
+22818000000 22818007390
+22821000000 22821007391
+22824000000 22824007402
+22827000000 22827007402
+22830000000 22830007356
+22833000000 22833007411
+22836000000 22836007376
+22839000000 22839007404
+22842000000 22842007403
+22845000000 22845007397
+22848000000 22848007352
+22851000000 22851007421
+22854000000 22854007400
+22857000000 22857007408
+22860000000 22860007394
+22863000000 22863007398
+22866000000 22866007400
+22869000000 22869007390
+22872000000 22872007386
+22875000000 22875007394
+22878000000 22878007390
+22881000000 22881007396
+22884000000 22884007387
+22887000000 22887007403
+22890000000 22890007373
+22893000000 22893007394
+22896000000 22896007389
+22899000000 22899007398
+22902000000 22902007387
+22905000000 22905007411
+22908000000 22908007392
+22911000000 22911007377
+22914000000 22914007391
+22917000000 22917007394
+22920000000 22920007397
+22923000000 22923007398
+22926000000 22926007408
+22929000000 22929007397
+22932000000 22932007401
+22935000000 22935007392
+22938000000 22938007390
+22941000000 22941007392
+22944000000 22944007391
+22947000000 22947007357
+22950000000 22950007387
+22953000000 22953007381
+22956000000 22956007397
+22959000000 22959007373
+22962000000 22962007385
+22965000000 22965007398
+22968000000 22968007400
+22971000000 22971007389
+22974000000 22974007331
+22977000000 22977007329
+22980000000 22980007401
+22983000000 22983007316
+22986000000 22986007390
+22989000000 22989007402
+22992000000 22992007394
+22995000000 22995007394
+22998000000 22998007353
+23001000000 23001007378
+23004000000 23004007301
+23007000000 23007007382
+23010000000 23010007394
+23013000000 23013007397
+23016000000 23016007364
+23019000000 23019007375
+23022000000 23022007393
+23025000000 23025007389
+23028000000 23028007397
+23031000000 23031007396
+23034000000 23034007390
+23037000000 23037007415
+23040000000 23040007394
+23043000000 23043007398
+23046000000 23046007383
+23049000000 23049007381
+23052000000 23052007352
+23055000000 23055007382
+23058000000 23058007390
+23061000000 23061007407
+23064000000 23064007397
+23067000000 23067007347
+23070000000 23070007401
+23073000000 23073007395
+23076000000 23076007389
+23079000000 23079007389
+23082000000 23082007403
+23085000000 23085007394
+23088000000 23088007400
+23091000000 23091007389
+23094000000 23094007339
+23097000000 23097007398
+23100000000 23100007394
+23103000000 23103007381
+23106000000 23106007392
+23109000000 23109007310
+23112000000 23112007393
+23115000000 23115007385
+23118000000 23118007386
+23121000000 23121007397
+23124000000 23124007397
+23127000000 23127007351
+23130000000 23130007406
+23133000000 23133007371
+23136000000 23136007399
+23139000000 23139007398
+23142000000 23142007392
+23145000000 23145007347
+23148000000 23148007416
+23151000000 23151007395
+23154000000 23154007403
+23157000000 23157007389
+23160000000 23160007393
+23163000000 23163007395
+23166000000 23166007385
+23169000000 23169007381
+23172000000 23172007389
+23175000000 23175007385
+23178000000 23178007391
+23181000000 23181007382
+23184000000 23184007398
+23187000000 23187007368
+23190000000 23190007389
+23193000000 23193007384
+23196000000 23196007393
+23199000000 23199007382
+23202000000 23202007406
+23205000000 23205007387
+23208000000 23208007372
+23211000000 23211007386
+23214000000 23214007389
+23217000000 23217007392
+23220000000 23220007393
+23223000000 23223007403
+23226000000 23226007392
+23229000000 23229007396
+23232000000 23232007387
+23235000000 23235007385
+23238000000 23238007387
+23241000000 23241007386
+23244000000 23244007352
+23247000000 23247007382
+23250000000 23250007376
+23253000000 23253007392
+23256000000 23256007368
+23259000000 23259007380
+23262000000 23262007393
+23265000000 23265007395
+23268000000 23268007384
+23271000000 23271007326
+23274000000 23274007324
+23277000000 23277007396
+23280000000 23280007311
+23283000000 23283007385
+23286000000 23286007397
+23289000000 23289007389
+23292000000 23292007389
+23295000000 23295007348
+23298000000 23298007373
+23301000000 23301007296
+23304000000 23304007377
+23307000000 23307007389
+23310000000 23310007392
+23313000000 23313007359
+23316000000 23316007370
+23319000000 23319007388
+23322000000 23322007384
+23325000000 23325007392
+23328000000 23328007391
+23331000000 23331007385
+23334000000 23334007410
+23337000000 23337007389
+23340000000 23340007393
+23343000000 23343007378
+23346000000 23346007376
+23349000000 23349007347
+23352000000 23352007377
+23355000000 23355007385
+23358000000 23358007402
+23361000000 23361007392
+23364000000 23364007342
+23367000000 23367007396
+23370000000 23370007390
+23373000000 23373007384
+23376000000 23376007384
+23379000000 23379007398
+23382000000 23382007389
+23385000000 23385007395
+23388000000 23388007384
+23391000000 23391007334
+23394000000 23394007393
+23397000000 23397007389
+23400000000 23400007376
+23403000000 23403007387
+23406000000 23406007305
+23409000000 23409007388
+23412000000 23412007380
+23415000000 23415007381
+23418000000 23418007392
+23421000000 23421007392
+23424000000 23424007346
+23427000000 23427007401
+23430000000 23430007366
+23433000000 23433007394
+23436000000 23436007393
+23439000000 23439007387
+23442000000 23442007342
+23445000000 23445007411
+23448000000 23448007390
+23451000000 23451007398
+23454000000 23454007384
+23457000000 23457007388
+23460000000 23460007390
+23463000000 23463007380
+23466000000 23466007376
+23469000000 23469007384
+23472000000 23472007380
+23475000000 23475007386
+23478000000 23478007377
+23481000000 23481007393
+23484000000 23484007363
+23487000000 23487007384
+23490000000 23490007379
+23493000000 23493007388
+23496000000 23496007377
+23499000000 23499007401
+23502000000 23502007382
+23505000000 23505007367
+23508000000 23508007381
+23511000000 23511007384
+23514000000 23514007387
+23517000000 23517007388
+23520000000 23520007398
+23523000000 23523007387
+23526000000 23526007391
+23529000000 23529007382
+23532000000 23532007380
+23535000000 23535007382
+23538000000 23538007381
+23541000000 23541007347
+23544000000 23544007377
+23547000000 23547007371
+23550000000 23550007387
+23553000000 23553007363
+23556000000 23556007375
+23559000000 23559007388
+23562000000 23562007390
+23565000000 23565007379
+23568000000 23568007321
+23571000000 23571007319
+23574000000 23574007391
+23577000000 23577007306
+23580000000 23580007380
+23583000000 23583007392
+23586000000 23586007384
+23589000000 23589007384
+23592000000 23592007343
+23595000000 23595007368
+23598000000 23598007291
+23601000000 23601007372
+23604000000 23604007384
+23607000000 23607007387
+23610000000 23610007354
+23613000000 23613007365
+23616000000 23616007383
+23619000000 23619007379
+23622000000 23622007387
+23625000000 23625007386
+23628000000 23628007380
+23631000000 23631007405
+23634000000 23634007384
+23637000000 23637007388
+23640000000 23640007373
+23643000000 23643007371
+23646000000 23646007342
+23649000000 23649007372
+23652000000 23652007380
+23655000000 23655007397
+23658000000 23658007387
+23661000000 23661007337
+23664000000 23664007391
+23667000000 23667007385
+23670000000 23670007379
+23673000000 23673007379
+23676000000 23676007393
+23679000000 23679007384
+23682000000 23682007390
+23685000000 23685007379
+23688000000 23688007329
+23691000000 23691007388
+23694000000 23694007384
+23697000000 23697007371
+23700000000 23700007382
+23703000000 23703007300
+23706000000 23706007383
+23709000000 23709007375
+23712000000 23712007376
+23715000000 23715007387
+23718000000 23718007387
+23721000000 23721007341
+23724000000 23724007396
+23727000000 23727007361
+23730000000 23730007389
+23733000000 23733007388
+23736000000 23736007382
+23739000000 23739007337
+23742000000 23742007406
+23745000000 23745007385
+23748000000 23748007393
+23751000000 23751007379
+23754000000 23754007383
+23757000000 23757007385
+23760000000 23760007375
+23763000000 23763007371
+23766000000 23766007379
+23769000000 23769007375
+23772000000 23772007381
+23775000000 23775007372
+23778000000 23778007388
+23781000000 23781007358
+23784000000 23784007379
+23787000000 23787007374
+23790000000 23790007383
+23793000000 23793007372
+23796000000 23796007396
+23799000000 23799007377
+23802000000 23802007362
+23805000000 23805007376
+23808000000 23808007379
+23811000000 23811007382
+23814000000 23814007383
+23817000000 23817007393
+23820000000 23820007382
+23823000000 23823007386
+23826000000 23826007377
+23829000000 23829007375
+23832000000 23832007377
+23835000000 23835007376
+23838000000 23838007342
+23841000000 23841007372
+23844000000 23844007366
+23847000000 23847007382
+23850000000 23850007358
+23853000000 23853007370
+23856000000 23856007383
+23859000000 23859007385
+23862000000 23862007374
+23865000000 23865007316
+23868000000 23868007314
+23871000000 23871007386
+23874000000 23874007301
+23877000000 23877007375
+23880000000 23880007387
+23883000000 23883007379
+23886000000 23886007379
+23889000000 23889007338
+23892000000 23892007363
+23895000000 23895007286
+23898000000 23898007367
+23901000000 23901007379
+23904000000 23904007382
+23907000000 23907007349
+23910000000 23910007360
+23913000000 23913007378
+23916000000 23916007374
+23919000000 23919007382
+23922000000 23922007381
+23925000000 23925007375
+23928000000 23928007400
+23931000000 23931007379
+23934000000 23934007383
+23937000000 23937007368
+23940000000 23940007366
+23943000000 23943007337
+23946000000 23946007367
+23949000000 23949007375
+23952000000 23952007392
+23955000000 23955007382
+23958000000 23958007332
+23961000000 23961007386
+23964000000 23964007380
+23967000000 23967007374
+23970000000 23970007374
+23973000000 23973007388
+23976000000 23976007379
+23979000000 23979007385
+23982000000 23982007374
+23985000000 23985007324
+23988000000 23988007383
+23991000000 23991007379
+23994000000 23994007366
+23997000000 23997007377
+24000000000 24000007295
+24003000000 24003007378
+24006000000 24006007370
+24009000000 24009007371
+24012000000 24012007382
+24015000000 24015007382
+24018000000 24018007336
+24021000000 24021007391
+24024000000 24024007356
+24027000000 24027007384
+24030000000 24030007383
+24033000000 24033007377
+24036000000 24036007332
+24039000000 24039007401
+24042000000 24042007380
+24045000000 24045007388
+24048000000 24048007374
+24051000000 24051007378
+24054000000 24054007380
+24057000000 24057007370
+24060000000 24060007366
+24063000000 24063007374
+24066000000 24066007370
+24069000000 24069007376
+24072000000 24072007367
+24075000000 24075007383
+24078000000 24078007353
+24081000000 24081007374
+24084000000 24084007369
+24087000000 24087007378
+24090000000 24090007367
+24093000000 24093007391
+24096000000 24096007372
+24099000000 24099007357
+24102000000 24102007371
+24105000000 24105007374
+24108000000 24108007377
+24111000000 24111007378
+24114000000 24114007388
+24117000000 24117007377
+24120000000 24120007381
+24123000000 24123007372
+24126000000 24126007370
+24129000000 24129007372
+24132000000 24132007371
+24135000000 24135007337
+24138000000 24138007367
+24141000000 24141007361
+24144000000 24144007377
+24147000000 24147007353
+24150000000 24150007365
+24153000000 24153007378
+24156000000 24156007380
+24159000000 24159007369
+24162000000 24162007311
+24165000000 24165007309
+24168000000 24168007381
+24171000000 24171007296
+24174000000 24174007370
+24177000000 24177007382
+24180000000 24180007374
+24183000000 24183007374
+24186000000 24186007333
+24189000000 24189007358
+24192000000 24192007281
+24195000000 24195007362
+24198000000 24198007374
+24201000000 24201007377
+24204000000 24204007344
+24207000000 24207007355
+24210000000 24210007373
+24213000000 24213007369
+24216000000 24216007377
+24219000000 24219007376
+24222000000 24222007370
+24225000000 24225007395
+24228000000 24228007374
+24231000000 24231007378
+24234000000 24234007363
+24237000000 24237007361
+24240000000 24240007332
+24243000000 24243007362
+24246000000 24246007370
+24249000000 24249007387
+24252000000 24252007377
+24255000000 24255007327
+24258000000 24258007381
+24261000000 24261007375
+24264000000 24264007369
+24267000000 24267007369
+24270000000 24270007383
+24273000000 24273007374
+24276000000 24276007380
+24279000000 24279007369
+24282000000 24282007319
+24285000000 24285007378
+24288000000 24288007374
+24291000000 24291007361
+24294000000 24294007372
+24297000000 24297007290
+24300000000 24300007373
+24303000000 24303007365
+24306000000 24306007366
+24309000000 24309007377
+24312000000 24312007377
+24315000000 24315007331
+24318000000 24318007386
+24321000000 24321007351
+24324000000 24324007379
+24327000000 24327007378
+24330000000 24330007372
+24333000000 24333007327
+24336000000 24336007396
+24339000000 24339007375
+24342000000 24342007383
+24345000000 24345007369
+24348000000 24348007373
+24351000000 24351007375
+24354000000 24354007365
+24357000000 24357007361
+24360000000 24360007369
+24363000000 24363007365
+24366000000 24366007371
+24369000000 24369007362
+24372000000 24372007378
+24375000000 24375007348
+24378000000 24378007369
+24381000000 24381007364
+24384000000 24384007373
+24387000000 24387007362
+24390000000 24390007386
+24393000000 24393007367
+24396000000 24396007352
+24399000000 24399007366
+24402000000 24402007369
+24405000000 24405007372
+24408000000 24408007373
+24411000000 24411007383
+24414000000 24414007372
+24417000000 24417007376
+24420000000 24420007367
+24423000000 24423007365
+24426000000 24426007367
+24429000000 24429007366
+24432000000 24432007332
+24435000000 24435007362
+24438000000 24438007356
+24441000000 24441007372
+24444000000 24444007348
+24447000000 24447007360
+24450000000 24450007373
+24453000000 24453007375
+24456000000 24456007364
+24459000000 24459007306
+24462000000 24462007304
+24465000000 24465007376
+24468000000 24468007291
+24471000000 24471007365
+24474000000 24474007377
+24477000000 24477007369
+24480000000 24480007369
+24483000000 24483007328
+24486000000 24486007353
+24489000000 24489007276
+24492000000 24492007357
+24495000000 24495007369
+24498000000 24498007372
+24501000000 24501007339
+24504000000 24504007350
+24507000000 24507007368
+24510000000 24510007364
+24513000000 24513007372
+24516000000 24516007371
+24519000000 24519007365
+24522000000 24522007390
+24525000000 24525007369
+24528000000 24528007373
+24531000000 24531007358
+24534000000 24534007356
+24537000000 24537007327
+24540000000 24540007357
+24543000000 24543007365
+24546000000 24546007382
+24549000000 24549007372
+24552000000 24552007322
+24555000000 24555007376
+24558000000 24558007370
+24561000000 24561007364
+24564000000 24564007364
+24567000000 24567007378
+24570000000 24570007369
+24573000000 24573007375
+24576000000 24576007364
+24579000000 24579007314
+24582000000 24582007373
+24585000000 24585007369
+24588000000 24588007356
+24591000000 24591007367
+24594000000 24594007285
+24597000000 24597007368
+24600000000 24600007360
+24603000000 24603007361
+24606000000 24606007372
+24609000000 24609007372
+24612000000 24612007326
+24615000000 24615007381
+24618000000 24618007346
+24621000000 24621007374
+24624000000 24624007373
+24627000000 24627007367
+24630000000 24630007322
+24633000000 24633007391
+24636000000 24636007370
+24639000000 24639007378
+24642000000 24642007364
+24645000000 24645007368
+24648000000 24648007370
+24651000000 24651007360
+24654000000 24654007356
+24657000000 24657007364
+24660000000 24660007360
+24663000000 24663007366
+24666000000 24666007357
+24669000000 24669007373
+24672000000 24672007343
+24675000000 24675007364
+24678000000 24678007359
+24681000000 24681007368
+24684000000 24684007357
+24687000000 24687007381
+24690000000 24690007362
+24693000000 24693007347
+24696000000 24696007361
+24699000000 24699007364
+24702000000 24702007367
+24705000000 24705007368
+24708000000 24708007378
+24711000000 24711007367
+24714000000 24714007371
+24717000000 24717007362
+24720000000 24720007360
+24723000000 24723007362
+24726000000 24726007361
+24729000000 24729007327
+24732000000 24732007357
+24735000000 24735007351
+24738000000 24738007367
+24741000000 24741007343
+24744000000 24744007355
+24747000000 24747007368
+24750000000 24750007370
+24753000000 24753007359
+24756000000 24756007301
+24759000000 24759007299
+24762000000 24762007371
+24765000000 24765007286
+24768000000 24768007360
+24771000000 24771007372
+24774000000 24774007364
+24777000000 24777007364
+24780000000 24780007323
+24783000000 24783007348
+24786000000 24786007271
+24789000000 24789007352
+24792000000 24792007364
+24795000000 24795007367
+24798000000 24798007334
+24801000000 24801007345
+24804000000 24804007363
+24807000000 24807007359
+24810000000 24810007367
+24813000000 24813007366
+24816000000 24816007360
+24819000000 24819007385
+24822000000 24822007364
+24825000000 24825007368
+24828000000 24828007353
+24831000000 24831007351
+24834000000 24834007322
+24837000000 24837007352
+24840000000 24840007360
+24843000000 24843007377
+24846000000 24846007367
+24849000000 24849007317
+24852000000 24852007371
+24855000000 24855007365
+24858000000 24858007359
+24861000000 24861007359
+24864000000 24864007373
+24867000000 24867007364
+24870000000 24870007370
+24873000000 24873007359
+24876000000 24876007309
+24879000000 24879007368
+24882000000 24882007364
+24885000000 24885007351
+24888000000 24888007362
+24891000000 24891007280
+24894000000 24894007363
+24897000000 24897007355
+24900000000 24900007356
+24903000000 24903007367
+24906000000 24906007367
+24909000000 24909007321
+24912000000 24912007376
+24915000000 24915007341
+24918000000 24918007369
+24921000000 24921007368
+24924000000 24924007362
+24927000000 24927007317
+24930000000 24930007386
+24933000000 24933007365
+24936000000 24936007373
+24939000000 24939007359
+24942000000 24942007363
+24945000000 24945007365
+24948000000 24948007355
+24951000000 24951007351
+24954000000 24954007359
+24957000000 24957007355
+24960000000 24960007361
+24963000000 24963007352
+24966000000 24966007368
+24969000000 24969007338
+24972000000 24972007359
+24975000000 24975007354
+24978000000 24978007363
+24981000000 24981007352
+24984000000 24984007376
+24987000000 24987007357
+24990000000 24990007342
+24993000000 24993007356
+24996000000 24996007359
+24999000000 24999007362
+25002000000 25002007363
+25005000000 25005007373
+25008000000 25008007362
+25011000000 25011007366
+25014000000 25014007357
+25017000000 25017007355
+25020000000 25020007357
+25023000000 25023007356
+25026000000 25026007322
+25029000000 25029007352
+25032000000 25032007346
+25035000000 25035007362
+25038000000 25038007338
+25041000000 25041007350
+25044000000 25044007363
+25047000000 25047007365
+25050000000 25050007354
+25053000000 25053007296
+25056000000 25056007294
+25059000000 25059007366
+25062000000 25062007281
+25065000000 25065007355
+25068000000 25068007367
+25071000000 25071007359
+25074000000 25074007359
+25077000000 25077007318
+25080000000 25080007343
+25083000000 25083007266
+25086000000 25086007347
+25089000000 25089007359
+25092000000 25092007362
+25095000000 25095007329
+25098000000 25098007340
+25101000000 25101007358
+25104000000 25104007354
+25107000000 25107007362
+25110000000 25110007361
+25113000000 25113007355
+25116000000 25116007380
+25119000000 25119007359
+25122000000 25122007363
+25125000000 25125007348
+25128000000 25128007346
+25131000000 25131007317
+25134000000 25134007347
+25137000000 25137007355
+25140000000 25140007372
+25143000000 25143007362
+25146000000 25146007312
+25149000000 25149007366
+25152000000 25152007360
+25155000000 25155007354
+25158000000 25158007354
+25161000000 25161007368
+25164000000 25164007359
+25167000000 25167007365
+25170000000 25170007354
+25173000000 25173007304
+25176000000 25176007363
+25179000000 25179007359
+25182000000 25182007346
+25185000000 25185007357
+25188000000 25188007275
+25191000000 25191007358
+25194000000 25194007350
+25197000000 25197007351
+25200000000 25200007362
+25203000000 25203007362
+25206000000 25206007316
+25209000000 25209007371
+25212000000 25212007336
+25215000000 25215007364
+25218000000 25218007363
+25221000000 25221007357
+25224000000 25224007312
+25227000000 25227007381
+25230000000 25230007360
+25233000000 25233007368
+25236000000 25236007354
+25239000000 25239007358
+25242000000 25242007360
+25245000000 25245007350
+25248000000 25248007346
+25251000000 25251007354
+25254000000 25254007350
+25257000000 25257007356
+25260000000 25260007347
+25263000000 25263007363
+25266000000 25266007333
+25269000000 25269007354
+25272000000 25272007349
+25275000000 25275007358
+25278000000 25278007347
+25281000000 25281007371
+25284000000 25284007352
+25287000000 25287007337
+25290000000 25290007351
+25293000000 25293007354
+25296000000 25296007357
+25299000000 25299007358
+25302000000 25302007368
+25305000000 25305007357
+25308000000 25308007361
+25311000000 25311007352
+25314000000 25314007350
+25317000000 25317007352
+25320000000 25320007351
+25323000000 25323007317
+25326000000 25326007347
+25329000000 25329007341
+25332000000 25332007357
+25335000000 25335007333
+25338000000 25338007345
+25341000000 25341007358
+25344000000 25344007360
+25347000000 25347007349
+25350000000 25350007291
+25353000000 25353007289
+25356000000 25356007361
+25359000000 25359007276
+25362000000 25362007350
+25365000000 25365007362
+25368000000 25368007354
+25371000000 25371007354
+25374000000 25374007313
+25377000000 25377007338
+25380000000 25380007261
+25383000000 25383007342
+25386000000 25386007354
+25389000000 25389007357
+25392000000 25392007324
+25395000000 25395007335
+25398000000 25398007353
+25401000000 25401007349
+25404000000 25404007357
+25407000000 25407007356
+25410000000 25410007350
+25413000000 25413007375
+25416000000 25416007354
+25419000000 25419007358
+25422000000 25422007343
+25425000000 25425007341
+25428000000 25428007312
+25431000000 25431007342
+25434000000 25434007350
+25437000000 25437007367
+25440000000 25440007357
+25443000000 25443007307
+25446000000 25446007361
+25449000000 25449007355
+25452000000 25452007349
+25455000000 25455007349
+25458000000 25458007363
+25461000000 25461007354
+25464000000 25464007360
+25467000000 25467007349
+25470000000 25470007299
+25473000000 25473007358
+25476000000 25476007354
+25479000000 25479007341
+25482000000 25482007352
+25485000000 25485007270
+25488000000 25488007353
+25491000000 25491007345
+25494000000 25494007346
+25497000000 25497007357
+25500000000 25500007357
+25503000000 25503007311
+25506000000 25506007366
+25509000000 25509007331
+25512000000 25512007359
+25515000000 25515007358
+25518000000 25518007352
+25521000000 25521007307
+25524000000 25524007376
+25527000000 25527007355
+25530000000 25530007363
+25533000000 25533007349
+25536000000 25536007353
+25539000000 25539007355
+25542000000 25542007345
+25545000000 25545007341
+25548000000 25548007349
+25551000000 25551007345
+25554000000 25554007351
+25557000000 25557007342
+25560000000 25560007358
+25563000000 25563007328
+25566000000 25566007349
+25569000000 25569007344
+25572000000 25572007353
+25575000000 25575007342
+25578000000 25578007366
+25581000000 25581007347
+25584000000 25584007332
+25587000000 25587007346
+25590000000 25590007349
+25593000000 25593007352
+25596000000 25596007353
+25599000000 25599007363
+25602000000 25602007352
+25605000000 25605007356
+25608000000 25608007347
+25611000000 25611007345
+25614000000 25614007347
+25617000000 25617007346
+25620000000 25620007312
+25623000000 25623007342
+25626000000 25626007336
+25629000000 25629007352
+25632000000 25632007328
+25635000000 25635007340
+25638000000 25638007353
+25641000000 25641007355
+25644000000 25644007344
+25647000000 25647007286
+25650000000 25650007284
+25653000000 25653007356
+25656000000 25656007271
+25659000000 25659007345
+25662000000 25662007357
+25665000000 25665007349
+25668000000 25668007349
+25671000000 25671007308
+25674000000 25674007333
+25677000000 25677007256
+25680000000 25680007337
+25683000000 25683007349
+25686000000 25686007352
+25689000000 25689007319
+25692000000 25692007330
+25695000000 25695007348
+25698000000 25698007344
+25701000000 25701007352
+25704000000 25704007351
+25707000000 25707007345
+25710000000 25710007370
+25713000000 25713007349
+25716000000 25716007353
+25719000000 25719007338
+25722000000 25722007336
+25725000000 25725007307
+25728000000 25728007337
+25731000000 25731007345
+25734000000 25734007362
+25737000000 25737007352
+25740000000 25740007302
+25743000000 25743007356
+25746000000 25746007350
+25749000000 25749007344
+25752000000 25752007344
+25755000000 25755007358
+25758000000 25758007349
+25761000000 25761007355
+25764000000 25764007344
+25767000000 25767007294
+25770000000 25770007353
+25773000000 25773007349
+25776000000 25776007336
+25779000000 25779007347
+25782000000 25782007265
+25785000000 25785007348
+25788000000 25788007340
+25791000000 25791007341
+25794000000 25794007352
+25797000000 25797007352
+25800000000 25800007306
+25803000000 25803007361
+25806000000 25806007326
+25809000000 25809007354
+25812000000 25812007353
+25815000000 25815007347
+25818000000 25818007302
+25821000000 25821007371
+25824000000 25824007350
+25827000000 25827007358
+25830000000 25830007344
+25833000000 25833007348
+25836000000 25836007350
+25839000000 25839007340
+25842000000 25842007336
+25845000000 25845007344
+25848000000 25848007340
+25851000000 25851007346
+25854000000 25854007337
+25857000000 25857007353
+25860000000 25860007323
+25863000000 25863007344
+25866000000 25866007339
+25869000000 25869007348
+25872000000 25872007337
+25875000000 25875007361
+25878000000 25878007342
+25881000000 25881007327
+25884000000 25884007341
+25887000000 25887007344
+25890000000 25890007347
+25893000000 25893007348
+25896000000 25896007358
+25899000000 25899007347
+25902000000 25902007351
+25905000000 25905007342
+25908000000 25908007340
+25911000000 25911007342
+25914000000 25914007341
+25917000000 25917007307
+25920000000 25920007337
+25923000000 25923007331
+25926000000 25926007347
+25929000000 25929007323
+25932000000 25932007335
+25935000000 25935007348
+25938000000 25938007350
+25941000000 25941007339
+25944000000 25944007281
+25947000000 25947007279
+25950000000 25950007351
+25953000000 25953007266
+25956000000 25956007340
+25959000000 25959007352
+25962000000 25962007344
+25965000000 25965007344
+25968000000 25968007303
+25971000000 25971007328
+25974000000 25974007251
+25977000000 25977007332
+25980000000 25980007344
+25983000000 25983007347
+25986000000 25986007314
+25989000000 25989007325
+25992000000 25992007343
+25995000000 25995007339
+25998000000 25998007347
+26001000000 26001007346
+26004000000 26004007340
+26007000000 26007007365
+26010000000 26010007344
+26013000000 26013007348
+26016000000 26016007333
+26019000000 26019007331
+26022000000 26022007302
+26025000000 26025007332
+26028000000 26028007340
+26031000000 26031007357
+26034000000 26034007347
+26037000000 26037007297
+26040000000 26040007351
+26043000000 26043007345
+26046000000 26046007339
+26049000000 26049007339
+26052000000 26052007353
+26055000000 26055007344
+26058000000 26058007350
+26061000000 26061007339
+26064000000 26064007289
+26067000000 26067007348
+26070000000 26070007344
+26073000000 26073007331
+26076000000 26076007342
+26079000000 26079007260
+26082000000 26082007343
+26085000000 26085007335
+26088000000 26088007336
+26091000000 26091007347
+26094000000 26094007347
+26097000000 26097007301
+26100000000 26100007356
+26103000000 26103007321
+26106000000 26106007349
+26109000000 26109007348
+26112000000 26112007342
+26115000000 26115007297
+26118000000 26118007366
+26121000000 26121007345
+26124000000 26124007353
+26127000000 26127007339
+26130000000 26130007343
+26133000000 26133007345
+26136000000 26136007335
+26139000000 26139007331
+26142000000 26142007339
+26145000000 26145007335
+26148000000 26148007341
+26151000000 26151007332
+26154000000 26154007348
+26157000000 26157007318
+26160000000 26160007339
+26163000000 26163007334
+26166000000 26166007343
+26169000000 26169007332
+26172000000 26172007356
+26175000000 26175007337
+26178000000 26178007322
+26181000000 26181007336
+26184000000 26184007339
+26187000000 26187007342
+26190000000 26190007343
+26193000000 26193007353
+26196000000 26196007342
+26199000000 26199007346
+26202000000 26202007337
+26205000000 26205007335
+26208000000 26208007337
+26211000000 26211007336
+26214000000 26214007302
+26217000000 26217007332
+26220000000 26220007326
+26223000000 26223007342
+26226000000 26226007318
+26229000000 26229007330
+26232000000 26232007343
+26235000000 26235007345
+26238000000 26238007334
+26241000000 26241007276
+26244000000 26244007274
+26247000000 26247007346
+26250000000 26250007261
+26253000000 26253007335
+26256000000 26256007347
+26259000000 26259007339
+26262000000 26262007339
+26265000000 26265007298
+26268000000 26268007323
+26271000000 26271007246
+26274000000 26274007327
+26277000000 26277007339
+26280000000 26280007342
+26283000000 26283007309
+26286000000 26286007320
+26289000000 26289007338
+26292000000 26292007334
+26295000000 26295007342
+26298000000 26298007341
+26301000000 26301007335
+26304000000 26304007360
+26307000000 26307007339
+26310000000 26310007343
+26313000000 26313007328
+26316000000 26316007326
+26319000000 26319007297
+26322000000 26322007327
+26325000000 26325007335
+26328000000 26328007352
+26331000000 26331007342
+26334000000 26334007292
+26337000000 26337007346
+26340000000 26340007340
+26343000000 26343007334
+26346000000 26346007334
+26349000000 26349007348
+26352000000 26352007339
+26355000000 26355007345
+26358000000 26358007334
+26361000000 26361007284
+26364000000 26364007343
+26367000000 26367007339
+26370000000 26370007326
+26373000000 26373007337
+26376000000 26376007255
+26379000000 26379007338
+26382000000 26382007330
+26385000000 26385007331
+26388000000 26388007342
+26391000000 26391007342
+26394000000 26394007296
+26397000000 26397007351
+26400000000 26400007316
+26403000000 26403007344
+26406000000 26406007343
+26409000000 26409007337
+26412000000 26412007292
+26415000000 26415007361
+26418000000 26418007340
+26421000000 26421007348
+26424000000 26424007334
+26427000000 26427007338
+26430000000 26430007340
+26433000000 26433007330
+26436000000 26436007326
+26439000000 26439007334
+26442000000 26442007330
+26445000000 26445007336
+26448000000 26448007327
+26451000000 26451007343
+26454000000 26454007313
+26457000000 26457007334
+26460000000 26460007329
+26463000000 26463007338
+26466000000 26466007327
+26469000000 26469007351
+26472000000 26472007332
+26475000000 26475007317
+26478000000 26478007331
+26481000000 26481007334
+26484000000 26484007337
+26487000000 26487007338
+26490000000 26490007348
+26493000000 26493007337
+26496000000 26496007341
+26499000000 26499007332
+26502000000 26502007330
+26505000000 26505007332
+26508000000 26508007331
+26511000000 26511007297
+26514000000 26514007327
+26517000000 26517007321
+26520000000 26520007337
+26523000000 26523007313
+26526000000 26526007325
+26529000000 26529007338
+26532000000 26532007340
+26535000000 26535007329
+26538000000 26538007271
+26541000000 26541007269
+26544000000 26544007341
+26547000000 26547007256
+26550000000 26550007330
+26553000000 26553007342
+26556000000 26556007334
+26559000000 26559007334
+26562000000 26562007293
+26565000000 26565007318
+26568000000 26568007241
+26571000000 26571007322
+26574000000 26574007334
+26577000000 26577007337
+26580000000 26580007304
+26583000000 26583007315
+26586000000 26586007333
+26589000000 26589007329
+26592000000 26592007337
+26595000000 26595007336
+26598000000 26598007330
+26601000000 26601007355
+26604000000 26604007334
+26607000000 26607007338
+26610000000 26610007323
+26613000000 26613007321
+26616000000 26616007292
+26619000000 26619007322
+26622000000 26622007330
+26625000000 26625007347
+26628000000 26628007337
+26631000000 26631007287
+26634000000 26634007341
+26637000000 26637007335
+26640000000 26640007329
+26643000000 26643007329
+26646000000 26646007343
+26649000000 26649007334
+26652000000 26652007340
+26655000000 26655007329
+26658000000 26658007279
+26661000000 26661007338
+26664000000 26664007334
+26667000000 26667007321
+26670000000 26670007332
+26673000000 26673007250
+26676000000 26676007333
+26679000000 26679007325
+26682000000 26682007326
+26685000000 26685007337
+26688000000 26688007337
+26691000000 26691007291
+26694000000 26694007346
+26697000000 26697007311
+26700000000 26700007339
+26703000000 26703007338
+26706000000 26706007332
+26709000000 26709007287
+26712000000 26712007356
+26715000000 26715007335
+26718000000 26718007343
+26721000000 26721007329
+26724000000 26724007333
+26727000000 26727007335
+26730000000 26730007325
+26733000000 26733007321
+26736000000 26736007329
+26739000000 26739007325
+26742000000 26742007331
+26745000000 26745007322
+26748000000 26748007338
+26751000000 26751007308
+26754000000 26754007329
+26757000000 26757007324
+26760000000 26760007333
+26763000000 26763007322
+26766000000 26766007346
+26769000000 26769007327
+26772000000 26772007312
+26775000000 26775007326
+26778000000 26778007329
+26781000000 26781007332
+26784000000 26784007333
+26787000000 26787007343
+26790000000 26790007332
+26793000000 26793007336
+26796000000 26796007327
+26799000000 26799007325
+26802000000 26802007327
+26805000000 26805007326
+26808000000 26808007292
+26811000000 26811007322
+26814000000 26814007316
+26817000000 26817007332
+26820000000 26820007308
+26823000000 26823007320
+26826000000 26826007333
+26829000000 26829007335
+26832000000 26832007324
+26835000000 26835007266
+26838000000 26838007264
+26841000000 26841007336
+26844000000 26844007251
+26847000000 26847007325
+26850000000 26850007337
+26853000000 26853007329
+26856000000 26856007329
+26859000000 26859007288
+26862000000 26862007313
+26865000000 26865007236
+26868000000 26868007317
+26871000000 26871007329
+26874000000 26874007332
+26877000000 26877007299
+26880000000 26880007310
+26883000000 26883007328
+26886000000 26886007324
+26889000000 26889007332
+26892000000 26892007331
+26895000000 26895007325
+26898000000 26898007350
+26901000000 26901007329
+26904000000 26904007333
+26907000000 26907007318
+26910000000 26910007316
+26913000000 26913007287
+26916000000 26916007317
+26919000000 26919007325
+26922000000 26922007342
+26925000000 26925007332
+26928000000 26928007282
+26931000000 26931007336
+26934000000 26934007330
+26937000000 26937007324
+26940000000 26940007324
+26943000000 26943007338
+26946000000 26946007329
+26949000000 26949007335
+26952000000 26952007324
+26955000000 26955007274
+26958000000 26958007333
+26961000000 26961007329
+26964000000 26964007316
+26967000000 26967007327
+26970000000 26970007245
+26973000000 26973007328
+26976000000 26976007320
+26979000000 26979007321
+26982000000 26982007332
+26985000000 26985007332
+26988000000 26988007286
+26991000000 26991007341
+26994000000 26994007306
+26997000000 26997007334
+27000000000 27000007333
+27003000000 27003007327
+27006000000 27006007282
+27009000000 27009007351
+27012000000 27012007330
+27015000000 27015007338
+27018000000 27018007324
+27021000000 27021007328
+27024000000 27024007330
+27027000000 27027007320
+27030000000 27030007316
+27033000000 27033007324
+27036000000 27036007320
+27039000000 27039007326
+27042000000 27042007317
+27045000000 27045007333
+27048000000 27048007303
+27051000000 27051007324
+27054000000 27054007319
+27057000000 27057007328
+27060000000 27060007317
+27063000000 27063007341
+27066000000 27066007322
+27069000000 27069007307
+27072000000 27072007321
+27075000000 27075007324
+27078000000 27078007327
+27081000000 27081007328
+27084000000 27084007338
+27087000000 27087007327
+27090000000 27090007331
+27093000000 27093007322
+27096000000 27096007320
+27099000000 27099007322
+27102000000 27102007321
+27105000000 27105007287
+27108000000 27108007317
+27111000000 27111007311
+27114000000 27114007327
+27117000000 27117007303
+27120000000 27120007315
+27123000000 27123007328
+27126000000 27126007330
+27129000000 27129007319
+27132000000 27132007261
+27135000000 27135007259
+27138000000 27138007331
+27141000000 27141007246
+27144000000 27144007320
+27147000000 27147007332
+27150000000 27150007324
+27153000000 27153007324
+27156000000 27156007283
+27159000000 27159007308
+27162000000 27162007231
+27165000000 27165007312
+27168000000 27168007324
+27171000000 27171007327
+27174000000 27174007294
+27177000000 27177007305
+27180000000 27180007323
+27183000000 27183007319
+27186000000 27186007327
+27189000000 27189007326
+27192000000 27192007320
+27195000000 27195007345
+27198000000 27198007324
+27201000000 27201007328
+27204000000 27204007313
+27207000000 27207007311
+27210000000 27210007282
+27213000000 27213007312
+27216000000 27216007320
+27219000000 27219007337
+27222000000 27222007327
+27225000000 27225007277
+27228000000 27228007331
+27231000000 27231007325
+27234000000 27234007319
+27237000000 27237007319
+27240000000 27240007333
+27243000000 27243007324
+27246000000 27246007330
+27249000000 27249007319
+27252000000 27252007269
+27255000000 27255007328
+27258000000 27258007324
+27261000000 27261007311
+27264000000 27264007322
+27267000000 27267007240
+27270000000 27270007323
+27273000000 27273007315
+27276000000 27276007316
+27279000000 27279007327
+27282000000 27282007327
+27285000000 27285007281
+27288000000 27288007336
+27291000000 27291007301
+27294000000 27294007329
+27297000000 27297007328
+27300000000 27300007322
+27303000000 27303007277
+27306000000 27306007346
+27309000000 27309007325
+27312000000 27312007333
+27315000000 27315007319
+27318000000 27318007323
+27321000000 27321007325
+27324000000 27324007315
+27327000000 27327007311
+27330000000 27330007319
+27333000000 27333007315
+27336000000 27336007321
+27339000000 27339007312
+27342000000 27342007328
+27345000000 27345007298
+27348000000 27348007319
+27351000000 27351007314
+27354000000 27354007323
+27357000000 27357007312
+27360000000 27360007336
+27363000000 27363007317
+27366000000 27366007302
+27369000000 27369007316
+27372000000 27372007319
+27375000000 27375007322
+27378000000 27378007323
+27381000000 27381007333
+27384000000 27384007322
+27387000000 27387007326
+27390000000 27390007317
+27393000000 27393007315
+27396000000 27396007317
+27399000000 27399007316
+27402000000 27402007282
+27405000000 27405007312
+27408000000 27408007306
+27411000000 27411007322
+27414000000 27414007298
+27417000000 27417007310
+27420000000 27420007323
+27423000000 27423007325
+27426000000 27426007314
+27429000000 27429007256
+27432000000 27432007254
+27435000000 27435007326
+27438000000 27438007241
+27441000000 27441007315
+27444000000 27444007327
+27447000000 27447007319
+27450000000 27450007319
+27453000000 27453007278
+27456000000 27456007303
+27459000000 27459007226
+27462000000 27462007307
+27465000000 27465007319
+27468000000 27468007322
+27471000000 27471007289
+27474000000 27474007300
+27477000000 27477007318
+27480000000 27480007314
+27483000000 27483007322
+27486000000 27486007321
+27489000000 27489007315
+27492000000 27492007340
+27495000000 27495007319
+27498000000 27498007323
+27501000000 27501007308
+27504000000 27504007306
+27507000000 27507007277
+27510000000 27510007307
+27513000000 27513007315
+27516000000 27516007332
+27519000000 27519007322
+27522000000 27522007272
+27525000000 27525007326
+27528000000 27528007320
+27531000000 27531007314
+27534000000 27534007314
+27537000000 27537007328
+27540000000 27540007319
+27543000000 27543007325
+27546000000 27546007314
+27549000000 27549007264
+27552000000 27552007323
+27555000000 27555007319
+27558000000 27558007306
+27561000000 27561007317
+27564000000 27564007235
+27567000000 27567007318
+27570000000 27570007310
+27573000000 27573007311
+27576000000 27576007322
+27579000000 27579007322
+27582000000 27582007276
+27585000000 27585007331
+27588000000 27588007296
+27591000000 27591007324
+27594000000 27594007323
+27597000000 27597007317
+27600000000 27600007272
+27603000000 27603007341
+27606000000 27606007320
+27609000000 27609007328
+27612000000 27612007314
+27615000000 27615007318
+27618000000 27618007320
+27621000000 27621007310
+27624000000 27624007306
+27627000000 27627007314
+27630000000 27630007310
+27633000000 27633007316
+27636000000 27636007307
+27639000000 27639007323
+27642000000 27642007293
+27645000000 27645007314
+27648000000 27648007309
+27651000000 27651007318
+27654000000 27654007307
+27657000000 27657007331
+27660000000 27660007312
+27663000000 27663007297
+27666000000 27666007311
+27669000000 27669007314
+27672000000 27672007317
+27675000000 27675007318
+27678000000 27678007328
+27681000000 27681007317
+27684000000 27684007321
+27687000000 27687007312
+27690000000 27690007310
+27693000000 27693007312
+27696000000 27696007311
+27699000000 27699007277
+27702000000 27702007307
+27705000000 27705007301
+27708000000 27708007317
+27711000000 27711007293
+27714000000 27714007305
+27717000000 27717007318
+27720000000 27720007320
+27723000000 27723007309
+27726000000 27726007251
+27729000000 27729007249
+27732000000 27732007321
+27735000000 27735007236
+27738000000 27738007310
+27741000000 27741007322
+27744000000 27744007314
+27747000000 27747007314
+27750000000 27750007273
+27753000000 27753007298
+27756000000 27756007221
+27759000000 27759007302
+27762000000 27762007314
+27765000000 27765007317
+27768000000 27768007284
+27771000000 27771007295
+27774000000 27774007313
+27777000000 27777007309
+27780000000 27780007317
+27783000000 27783007316
+27786000000 27786007310
+27789000000 27789007335
+27792000000 27792007314
+27795000000 27795007318
+27798000000 27798007303
+27801000000 27801007301
+27804000000 27804007272
+27807000000 27807007302
+27810000000 27810007310
+27813000000 27813007327
+27816000000 27816007317
+27819000000 27819007267
+27822000000 27822007321
+27825000000 27825007315
+27828000000 27828007309
+27831000000 27831007309
+27834000000 27834007323
+27837000000 27837007314
+27840000000 27840007320
+27843000000 27843007309
+27846000000 27846007259
+27849000000 27849007318
+27852000000 27852007314
+27855000000 27855007301
+27858000000 27858007312
+27861000000 27861007230
+27864000000 27864007313
+27867000000 27867007305
+27870000000 27870007306
+27873000000 27873007317
+27876000000 27876007317
+27879000000 27879007271
+27882000000 27882007326
+27885000000 27885007291
+27888000000 27888007319
+27891000000 27891007318
+27894000000 27894007312
+27897000000 27897007267
+27900000000 27900007336
+27903000000 27903007315
+27906000000 27906007323
+27909000000 27909007309
+27912000000 27912007313
+27915000000 27915007315
+27918000000 27918007305
+27921000000 27921007301
+27924000000 27924007309
+27927000000 27927007305
+27930000000 27930007311
+27933000000 27933007302
+27936000000 27936007318
+27939000000 27939007288
+27942000000 27942007309
+27945000000 27945007304
+27948000000 27948007313
+27951000000 27951007302
+27954000000 27954007326
+27957000000 27957007307
+27960000000 27960007292
+27963000000 27963007306
+27966000000 27966007309
+27969000000 27969007312
+27972000000 27972007313
+27975000000 27975007323
+27978000000 27978007312
+27981000000 27981007316
+27984000000 27984007307
+27987000000 27987007305
+27990000000 27990007307
+27993000000 27993007306
+27996000000 27996007272
+27999000000 27999007302
+28002000000 28002007296
+28005000000 28005007312
+28008000000 28008007288
+28011000000 28011007300
+28014000000 28014007313
+28017000000 28017007315
+28020000000 28020007304
+28023000000 28023007246
+28026000000 28026007244
+28029000000 28029007316
+28032000000 28032007231
+28035000000 28035007305
+28038000000 28038007317
+28041000000 28041007309
+28044000000 28044007309
+28047000000 28047007268
+28050000000 28050007293
+28053000000 28053007216
+28056000000 28056007297
+28059000000 28059007309
+28062000000 28062007312
+28065000000 28065007279
+28068000000 28068007290
+28071000000 28071007308
+28074000000 28074007304
+28077000000 28077007312
+28080000000 28080007311
+28083000000 28083007305
+28086000000 28086007330
+28089000000 28089007309
+28092000000 28092007313
+28095000000 28095007298
+28098000000 28098007296
+28101000000 28101007267
+28104000000 28104007297
+28107000000 28107007305
+28110000000 28110007322
+28113000000 28113007312
+28116000000 28116007262
+28119000000 28119007316
+28122000000 28122007310
+28125000000 28125007304
+28128000000 28128007304
+28131000000 28131007318
+28134000000 28134007309
+28137000000 28137007315
+28140000000 28140007304
+28143000000 28143007254
+28146000000 28146007313
+28149000000 28149007309
+28152000000 28152007296
+28155000000 28155007307
+28158000000 28158007225
+28161000000 28161007308
+28164000000 28164007300
+28167000000 28167007301
+28170000000 28170007312
+28173000000 28173007312
+28176000000 28176007266
+28179000000 28179007321
+28182000000 28182007286
+28185000000 28185007314
+28188000000 28188007313
+28191000000 28191007307
+28194000000 28194007262
+28197000000 28197007331
+28200000000 28200007310
+28203000000 28203007318
+28206000000 28206007304
+28209000000 28209007308
+28212000000 28212007310
+28215000000 28215007300
+28218000000 28218007296
+28221000000 28221007304
+28224000000 28224007300
+28227000000 28227007306
+28230000000 28230007297
+28233000000 28233007313
+28236000000 28236007283
+28239000000 28239007304
+28242000000 28242007299
+28245000000 28245007308
+28248000000 28248007297
+28251000000 28251007321
+28254000000 28254007302
+28257000000 28257007287
+28260000000 28260007301
+28263000000 28263007304
+28266000000 28266007307
+28269000000 28269007308
+28272000000 28272007318
+28275000000 28275007307
+28278000000 28278007311
+28281000000 28281007302
+28284000000 28284007300
+28287000000 28287007302
+28290000000 28290007301
+28293000000 28293007267
+28296000000 28296007297
+28299000000 28299007291
+28302000000 28302007307
+28305000000 28305007283
+28308000000 28308007295
+28311000000 28311007308
+28314000000 28314007310
+28317000000 28317007299
+28320000000 28320007241
+28323000000 28323007239
+28326000000 28326007311
+28329000000 28329007226
+28332000000 28332007300
+28335000000 28335007312
+28338000000 28338007304
+28341000000 28341007304
+28344000000 28344007263
+28347000000 28347007288
+28350000000 28350007211
+28353000000 28353007292
+28356000000 28356007304
+28359000000 28359007307
+28362000000 28362007274
+28365000000 28365007285
+28368000000 28368007303
+28371000000 28371007299
+28374000000 28374007307
+28377000000 28377007306
+28380000000 28380007300
+28383000000 28383007325
+28386000000 28386007304
+28389000000 28389007308
+28392000000 28392007293
+28395000000 28395007291
+28398000000 28398007262
+28401000000 28401007292
+28404000000 28404007300
+28407000000 28407007317
+28410000000 28410007307
+28413000000 28413007257
+28416000000 28416007311
+28419000000 28419007305
+28422000000 28422007299
+28425000000 28425007299
+28428000000 28428007313
+28431000000 28431007304
+28434000000 28434007310
+28437000000 28437007299
+28440000000 28440007249
+28443000000 28443007308
+28446000000 28446007304
+28449000000 28449007291
+28452000000 28452007302
+28455000000 28455007220
+28458000000 28458007303
+28461000000 28461007295
+28464000000 28464007296
+28467000000 28467007307
+28470000000 28470007307
+28473000000 28473007261
+28476000000 28476007316
+28479000000 28479007281
+28482000000 28482007309
+28485000000 28485007308
+28488000000 28488007302
+28491000000 28491007257
+28494000000 28494007326
+28497000000 28497007305
+28500000000 28500007313
+28503000000 28503007299
+28506000000 28506007303
+28509000000 28509007305
+28512000000 28512007295
+28515000000 28515007291
+28518000000 28518007299
+28521000000 28521007295
+28524000000 28524007301
+28527000000 28527007292
+28530000000 28530007308
+28533000000 28533007278
+28536000000 28536007299
+28539000000 28539007294
+28542000000 28542007303
+28545000000 28545007292
+28548000000 28548007316
+28551000000 28551007297
+28554000000 28554007282
+28557000000 28557007296
+28560000000 28560007299
+28563000000 28563007302
+28566000000 28566007303
+28569000000 28569007313
+28572000000 28572007302
+28575000000 28575007306
+28578000000 28578007297
+28581000000 28581007295
+28584000000 28584007297
+28587000000 28587007296
+28590000000 28590007262
+28593000000 28593007292
+28596000000 28596007286
+28599000000 28599007302
+28602000000 28602007278
+28605000000 28605007290
+28608000000 28608007303
+28611000000 28611007305
+28614000000 28614007294
+28617000000 28617007236
+28620000000 28620007234
+28623000000 28623007306
+28626000000 28626007221
+28629000000 28629007295
+28632000000 28632007307
+28635000000 28635007299
+28638000000 28638007299
+28641000000 28641007258
+28644000000 28644007283
+28647000000 28647007206
+28650000000 28650007287
+28653000000 28653007299
+28656000000 28656007302
+28659000000 28659007269
+28662000000 28662007280
+28665000000 28665007298
+28668000000 28668007294
+28671000000 28671007302
+28674000000 28674007301
+28677000000 28677007295
+28680000000 28680007320
+28683000000 28683007299
+28686000000 28686007303
+28689000000 28689007288
+28692000000 28692007286
+28695000000 28695007257
+28698000000 28698007287
+28701000000 28701007295
+28704000000 28704007312
+28707000000 28707007302
+28710000000 28710007252
+28713000000 28713007306
+28716000000 28716007300
+28719000000 28719007294
+28722000000 28722007294
+28725000000 28725007308
+28728000000 28728007299
+28731000000 28731007305
+28734000000 28734007294
+28737000000 28737007244
+28740000000 28740007303
+28743000000 28743007299
+28746000000 28746007286
+28749000000 28749007297
+28752000000 28752007215
+28755000000 28755007298
+28758000000 28758007290
+28761000000 28761007291
+28764000000 28764007302
+28767000000 28767007302
+28770000000 28770007256
+28773000000 28773007311
+28776000000 28776007276
+28779000000 28779007304
+28782000000 28782007303
+28785000000 28785007297
+28788000000 28788007252
+28791000000 28791007321
+28794000000 28794007300
+28797000000 28797007308
+28800000000 28800007294
+28803000000 28803007298
+28806000000 28806007300
+28809000000 28809007290
+28812000000 28812007286
+28815000000 28815007294
+28818000000 28818007290
+28821000000 28821007296
+28824000000 28824007287
+28827000000 28827007303
+28830000000 28830007273
+28833000000 28833007294
+28836000000 28836007289
+28839000000 28839007298
+28842000000 28842007287
+28845000000 28845007311
+28848000000 28848007292
+28851000000 28851007277
+28854000000 28854007291
+28857000000 28857007294
+28860000000 28860007297
+28863000000 28863007298
+28866000000 28866007308
+28869000000 28869007297
+28872000000 28872007301
+28875000000 28875007292
+28878000000 28878007290
+28881000000 28881007292
+28884000000 28884007291
+28887000000 28887007257
+28890000000 28890007287
+28893000000 28893007281
+28896000000 28896007297
+28899000000 28899007273
+28902000000 28902007285
+28905000000 28905007298
+28908000000 28908007300
+28911000000 28911007289
+28914000000 28914007231
+28917000000 28917007229
+28920000000 28920007301
+28923000000 28923007216
+28926000000 28926007290
+28929000000 28929007302
+28932000000 28932007294
+28935000000 28935007294
+28938000000 28938007253
+28941000000 28941007278
+28944000000 28944007201
+28947000000 28947007282
+28950000000 28950007294
+28953000000 28953007297
+28956000000 28956007264
+28959000000 28959007275
+28962000000 28962007293
+28965000000 28965007289
+28968000000 28968007297
+28971000000 28971007296
+28974000000 28974007290
+28977000000 28977007315
+28980000000 28980007294
+28983000000 28983007298
+28986000000 28986007283
+28989000000 28989007281
+28992000000 28992007252
+28995000000 28995007282
+28998000000 28998007290
+29001000000 29001007307
+29004000000 29004007297
+29007000000 29007007247
+29010000000 29010007301
+29013000000 29013007295
+29016000000 29016007289
+29019000000 29019007289
+29022000000 29022007303
+29025000000 29025007294
+29028000000 29028007300
+29031000000 29031007289
+29034000000 29034007239
+29037000000 29037007298
+29040000000 29040007294
+29043000000 29043007281
+29046000000 29046007292
+29049000000 29049007210
+29052000000 29052007293
+29055000000 29055007285
+29058000000 29058007286
+29061000000 29061007297
+29064000000 29064007297
+29067000000 29067007251
+29070000000 29070007306
+29073000000 29073007271
+29076000000 29076007299
+29079000000 29079007298
+29082000000 29082007292
+29085000000 29085007247
+29088000000 29088007316
+29091000000 29091007295
+29094000000 29094007303
+29097000000 29097007289
+29100000000 29100007293
+29103000000 29103007295
+29106000000 29106007285
+29109000000 29109007281
+29112000000 29112007289
+29115000000 29115007285
+29118000000 29118007291
+29121000000 29121007282
+29124000000 29124007298
+29127000000 29127007268
+29130000000 29130007289
+29133000000 29133007284
+29136000000 29136007293
+29139000000 29139007282
+29142000000 29142007306
+29145000000 29145007287
+29148000000 29148007272
+29151000000 29151007286
+29154000000 29154007289
+29157000000 29157007292
+29160000000 29160007293
+29163000000 29163007303
+29166000000 29166007292
+29169000000 29169007296
+29172000000 29172007287
+29175000000 29175007285
+29178000000 29178007287
+29181000000 29181007286
+29184000000 29184007252
+29187000000 29187007282
+29190000000 29190007276
+29193000000 29193007292
+29196000000 29196007268
+29199000000 29199007280
+29202000000 29202007293
+29205000000 29205007295
+29208000000 29208007284
+29211000000 29211007226
+29214000000 29214007224
+29217000000 29217007296
+29220000000 29220007211
+29223000000 29223007285
+29226000000 29226007297
+29229000000 29229007289
+29232000000 29232007289
+29235000000 29235007248
+29238000000 29238007273
+29241000000 29241007196
+29244000000 29244007277
+29247000000 29247007289
+29250000000 29250007292
+29253000000 29253007259
+29256000000 29256007270
+29259000000 29259007288
+29262000000 29262007284
+29265000000 29265007292
+29268000000 29268007291
+29271000000 29271007285
+29274000000 29274007310
+29277000000 29277007289
+29280000000 29280007293
+29283000000 29283007278
+29286000000 29286007276
+29289000000 29289007247
+29292000000 29292007277
+29295000000 29295007285
+29298000000 29298007302
+29301000000 29301007292
+29304000000 29304007242
+29307000000 29307007296
+29310000000 29310007290
+29313000000 29313007284
+29316000000 29316007284
+29319000000 29319007298
+29322000000 29322007289
+29325000000 29325007295
+29328000000 29328007284
+29331000000 29331007234
+29334000000 29334007293
+29337000000 29337007289
+29340000000 29340007276
+29343000000 29343007287
+29346000000 29346007205
+29349000000 29349007288
+29352000000 29352007280
+29355000000 29355007281
+29358000000 29358007292
+29361000000 29361007292
+29364000000 29364007246
+29367000000 29367007301
+29370000000 29370007266
+29373000000 29373007294
+29376000000 29376007293
+29379000000 29379007287
+29382000000 29382007242
+29385000000 29385007311
+29388000000 29388007290
+29391000000 29391007298
+29394000000 29394007284
+29397000000 29397007288
+29400000000 29400007290
+29403000000 29403007280
+29406000000 29406007276
+29409000000 29409007284
+29412000000 29412007280
+29415000000 29415007286
+29418000000 29418007277
+29421000000 29421007293
+29424000000 29424007263
+29427000000 29427007284
+29430000000 29430007279
+29433000000 29433007288
+29436000000 29436007277
+29439000000 29439007301
+29442000000 29442007282
+29445000000 29445007267
+29448000000 29448007281
+29451000000 29451007284
+29454000000 29454007287
+29457000000 29457007288
+29460000000 29460007298
+29463000000 29463007287
+29466000000 29466007291
+29469000000 29469007282
+29472000000 29472007280
+29475000000 29475007282
+29478000000 29478007281
+29481000000 29481007247
+29484000000 29484007277
+29487000000 29487007271
+29490000000 29490007287
+29493000000 29493007263
+29496000000 29496007275
+29499000000 29499007288
+29502000000 29502007290
+29505000000 29505007279
+29508000000 29508007221
+29511000000 29511007219
+29514000000 29514007291
+29517000000 29517007206
+29520000000 29520007280
+29523000000 29523007292
+29526000000 29526007284
+29529000000 29529007284
+29532000000 29532007243
+29535000000 29535007268
+29538000000 29538007191
+29541000000 29541007272
+29544000000 29544007284
+29547000000 29547007287
+29550000000 29550007254
+29553000000 29553007265
+29556000000 29556007283
+29559000000 29559007279
+29562000000 29562007287
+29565000000 29565007286
+29568000000 29568007280
+29571000000 29571007305
+29574000000 29574007284
+29577000000 29577007288
+29580000000 29580007273
+29583000000 29583007271
+29586000000 29586007242
+29589000000 29589007272
+29592000000 29592007280
+29595000000 29595007297
+29598000000 29598007287
+29601000000 29601007237
+29604000000 29604007291
+29607000000 29607007285
+29610000000 29610007279
+29613000000 29613007279
+29616000000 29616007293
+29619000000 29619007284
+29622000000 29622007290
+29625000000 29625007279
+29628000000 29628007229
+29631000000 29631007288
+29634000000 29634007284
+29637000000 29637007271
+29640000000 29640007282
+29643000000 29643007200
+29646000000 29646007283
+29649000000 29649007275
+29652000000 29652007276
+29655000000 29655007287
+29658000000 29658007287
+29661000000 29661007241
+29664000000 29664007296
+29667000000 29667007261
+29670000000 29670007289
+29673000000 29673007288
+29676000000 29676007282
+29679000000 29679007237
+29682000000 29682007306
+29685000000 29685007285
+29688000000 29688007293
+29691000000 29691007279
+29694000000 29694007283
+29697000000 29697007285
+29700000000 29700007275
+29703000000 29703007271
+29706000000 29706007279
+29709000000 29709007275
+29712000000 29712007281
+29715000000 29715007272
+29718000000 29718007288
+29721000000 29721007258
+29724000000 29724007279
+29727000000 29727007274
+29730000000 29730007283
+29733000000 29733007272
+29736000000 29736007296
+29739000000 29739007277
+29742000000 29742007262
+29745000000 29745007276
+29748000000 29748007279
+29751000000 29751007282
+29754000000 29754007283
+29757000000 29757007293
+29760000000 29760007282
+29763000000 29763007286
+29766000000 29766007277
+29769000000 29769007275
+29772000000 29772007277
+29775000000 29775007276
+29778000000 29778007242
+29781000000 29781007272
+29784000000 29784007266
+29787000000 29787007282
+29790000000 29790007258
+29793000000 29793007270
+29796000000 29796007283
+29799000000 29799007285
+29802000000 29802007274
+29805000000 29805007216
+29808000000 29808007214
+29811000000 29811007286
+29814000000 29814007201
+29817000000 29817007275
+29820000000 29820007287
+29823000000 29823007279
+29826000000 29826007279
+29829000000 29829007238
+29832000000 29832007263
+29835000000 29835007186
+29838000000 29838007267
+29841000000 29841007279
+29844000000 29844007282
+29847000000 29847007249
+29850000000 29850007260
+29853000000 29853007278
+29856000000 29856007274
+29859000000 29859007282
+29862000000 29862007281
+29865000000 29865007275
+29868000000 29868007300
+29871000000 29871007279
+29874000000 29874007283
+29877000000 29877007268
+29880000000 29880007266
+29883000000 29883007237
+29886000000 29886007267
+29889000000 29889007275
+29892000000 29892007292
+29895000000 29895007282
+29898000000 29898007232
+29901000000 29901007286
+29904000000 29904007280
+29907000000 29907007274
+29910000000 29910007274
+29913000000 29913007288
+29916000000 29916007279
+29919000000 29919007285
+29922000000 29922007274
+29925000000 29925007224
+29928000000 29928007283
+29931000000 29931007279
+29934000000 29934007266
+29937000000 29937007277
+29940000000 29940007195
+29943000000 29943007278
+29946000000 29946007270
+29949000000 29949007271
+29952000000 29952007282
+29955000000 29955007282
+29958000000 29958007236
+29961000000 29961007291
+29964000000 29964007256
+29967000000 29967007284
+29970000000 29970007283
+29973000000 29973007277
+29976000000 29976007232
+29979000000 29979007301
+29982000000 29982007280
+29985000000 29985007288
+29988000000 29988007274
+29991000000 29991007278
+29994000000 29994007280
+29997000000 29997007270
+30000000000 30000007266
+30003000000 30003007274
+30006000000 30006007270
+30009000000 30009007276
+30012000000 30012007267
+30015000000 30015007283
+30018000000 30018007253
+30021000000 30021007274
+30024000000 30024007269
+30027000000 30027007278
+30030000000 30030007267
+30033000000 30033007291
+30036000000 30036007272
+30039000000 30039007257
+30042000000 30042007271
+30045000000 30045007274
+30048000000 30048007277
+30051000000 30051007278
+30054000000 30054007288
+30057000000 30057007277
+30060000000 30060007281
+30063000000 30063007272
+30066000000 30066007270
+30069000000 30069007272
+30072000000 30072007271
+30075000000 30075007237
+30078000000 30078007267
+30081000000 30081007261
+30084000000 30084007277
+30087000000 30087007253
+30090000000 30090007265
+30093000000 30093007278
+30096000000 30096007280
+30099000000 30099007269
+30102000000 30102007211
+30105000000 30105007209
+30108000000 30108007281
+30111000000 30111007196
+30114000000 30114007270
+30117000000 30117007282
+30120000000 30120007274
+30123000000 30123007274
+30126000000 30126007233
+30129000000 30129007258
+30132000000 30132007181
+30135000000 30135007262
+30138000000 30138007274
+30141000000 30141007277
+30144000000 30144007244
+30147000000 30147007255
+30150000000 30150007273
+30153000000 30153007269
+30156000000 30156007277
+30159000000 30159007276
+30162000000 30162007270
+30165000000 30165007295
+30168000000 30168007274
+30171000000 30171007278
+30174000000 30174007263
+30177000000 30177007261
+30180000000 30180007232
+30183000000 30183007262
+30186000000 30186007270
+30189000000 30189007287
+30192000000 30192007277
+30195000000 30195007227
+30198000000 30198007281
+30201000000 30201007275
+30204000000 30204007269
+30207000000 30207007269
+30210000000 30210007283
+30213000000 30213007274
+30216000000 30216007280
+30219000000 30219007269
+30222000000 30222007219
+30225000000 30225007278
+30228000000 30228007274
+30231000000 30231007261
+30234000000 30234007272
+30237000000 30237007190
+30240000000 30240007273
+30243000000 30243007265
+30246000000 30246007266
+30249000000 30249007277
+30252000000 30252007277
+30255000000 30255007231
+30258000000 30258007286
+30261000000 30261007251
+30264000000 30264007279
+30267000000 30267007278
+30270000000 30270007272
+30273000000 30273007227
+30276000000 30276007296
+30279000000 30279007275
+30282000000 30282007283
+30285000000 30285007269
+30288000000 30288007273
+30291000000 30291007275
+30294000000 30294007265
+30297000000 30297007261
+30300000000 30300007269
+30303000000 30303007265
+30306000000 30306007271
+30309000000 30309007262
+30312000000 30312007278
+30315000000 30315007248
+30318000000 30318007269
+30321000000 30321007264
+30324000000 30324007273
+30327000000 30327007262
+30330000000 30330007286
+30333000000 30333007267
+30336000000 30336007252
+30339000000 30339007266
+30342000000 30342007269
+30345000000 30345007272
+30348000000 30348007273
+30351000000 30351007283
+30354000000 30354007272
+30357000000 30357007276
+30360000000 30360007267
+30363000000 30363007265
+30366000000 30366007267
+30369000000 30369007266
+30372000000 30372007232
+30375000000 30375007262
+30378000000 30378007256
+30381000000 30381007272
+30384000000 30384007248
+30387000000 30387007260
+30390000000 30390007273
+30393000000 30393007275
+30396000000 30396007264
+30399000000 30399007206
+30402000000 30402007204
+30405000000 30405007276
+30408000000 30408007191
+30411000000 30411007265
+30414000000 30414007277
+30417000000 30417007269
+30420000000 30420007269
+30423000000 30423007228
+30426000000 30426007253
+30429000000 30429007176
+30432000000 30432007257
+30435000000 30435007269
+30438000000 30438007272
+30441000000 30441007239
+30444000000 30444007250
+30447000000 30447007268
+30450000000 30450007264
+30453000000 30453007272
+30456000000 30456007271
+30459000000 30459007265
+30462000000 30462007290
+30465000000 30465007269
+30468000000 30468007273
+30471000000 30471007258
+30474000000 30474007256
+30477000000 30477007227
+30480000000 30480007257
+30483000000 30483007265
+30486000000 30486007282
+30489000000 30489007272
+30492000000 30492007222
+30495000000 30495007276
+30498000000 30498007270
+30501000000 30501007264
+30504000000 30504007264
+30507000000 30507007278
+30510000000 30510007269
+30513000000 30513007275
+30516000000 30516007264
+30519000000 30519007214
+30522000000 30522007273
+30525000000 30525007269
+30528000000 30528007256
+30531000000 30531007267
+30534000000 30534007185
+30537000000 30537007268
+30540000000 30540007260
+30543000000 30543007261
+30546000000 30546007272
+30549000000 30549007272
+30552000000 30552007226
+30555000000 30555007281
+30558000000 30558007246
+30561000000 30561007274
+30564000000 30564007273
+30567000000 30567007267
+30570000000 30570007222
+30573000000 30573007291
+30576000000 30576007270
+30579000000 30579007278
+30582000000 30582007264
+30585000000 30585007268
+30588000000 30588007270
+30591000000 30591007260
+30594000000 30594007256
+30597000000 30597007264
+30600000000 30600007260
+30603000000 30603007266
+30606000000 30606007257
+30609000000 30609007273
+30612000000 30612007243
+30615000000 30615007264
+30618000000 30618007259
+30621000000 30621007268
+30624000000 30624007257
+30627000000 30627007281
+30630000000 30630007262
+30633000000 30633007247
+30636000000 30636007261
+30639000000 30639007264
+30642000000 30642007267
+30645000000 30645007268
+30648000000 30648007278
+30651000000 30651007267
+30654000000 30654007271
+30657000000 30657007262
+30660000000 30660007260
+30663000000 30663007262
+30666000000 30666007261
+30669000000 30669007227
+30672000000 30672007257
+30675000000 30675007251
+30678000000 30678007267
+30681000000 30681007243
+30684000000 30684007255
+30687000000 30687007268
+30690000000 30690007270
+30693000000 30693007259
+30696000000 30696007201
+30699000000 30699007199
+30702000000 30702007271
+30705000000 30705007186
+30708000000 30708007260
+30711000000 30711007272
+30714000000 30714007264
+30717000000 30717007264
+30720000000 30720007223
+30723000000 30723007248
+30726000000 30726007171
+30729000000 30729007252
+30732000000 30732007264
+30735000000 30735007267
+30738000000 30738007234
+30741000000 30741007245
+30744000000 30744007263
+30747000000 30747007259
+30750000000 30750007267
+30753000000 30753007266
+30756000000 30756007260
+30759000000 30759007285
+30762000000 30762007264
+30765000000 30765007268
+30768000000 30768007253
+30771000000 30771007251
+30774000000 30774007222
+30777000000 30777007252
+30780000000 30780007260
+30783000000 30783007277
+30786000000 30786007267
+30789000000 30789007217
+30792000000 30792007271
+30795000000 30795007265
+30798000000 30798007259
+30801000000 30801007259
+30804000000 30804007273
+30807000000 30807007264
+30810000000 30810007270
+30813000000 30813007259
+30816000000 30816007209
+30819000000 30819007268
+30822000000 30822007264
+30825000000 30825007251
+30828000000 30828007262
+30831000000 30831007180
+30834000000 30834007263
+30837000000 30837007255
+30840000000 30840007256
+30843000000 30843007267
+30846000000 30846007267
+30849000000 30849007221
+30852000000 30852007276
+30855000000 30855007241
+30858000000 30858007269
+30861000000 30861007268
+30864000000 30864007262
+30867000000 30867007217
+30870000000 30870007286
+30873000000 30873007265
+30876000000 30876007273
+30879000000 30879007259
+30882000000 30882007263
+30885000000 30885007265
+30888000000 30888007255
+30891000000 30891007251
+30894000000 30894007259
+30897000000 30897007255
+30900000000 30900007261
+30903000000 30903007252
+30906000000 30906007268
+30909000000 30909007238
+30912000000 30912007259
+30915000000 30915007254
+30918000000 30918007263
+30921000000 30921007252
+30924000000 30924007276
+30927000000 30927007257
+30930000000 30930007242
+30933000000 30933007256
+30936000000 30936007259
+30939000000 30939007262
+30942000000 30942007263
+30945000000 30945007273
+30948000000 30948007262
+30951000000 30951007266
+30954000000 30954007257
+30957000000 30957007255
+30960000000 30960007257
+30963000000 30963007256
+30966000000 30966007222
+30969000000 30969007252
+30972000000 30972007246
+30975000000 30975007262
+30978000000 30978007238
+30981000000 30981007250
+30984000000 30984007263
+30987000000 30987007265
+30990000000 30990007254
+30993000000 30993007196
+30996000000 30996007194
+30999000000 30999007266
+31002000000 31002007181
+31005000000 31005007255
+31008000000 31008007267
+31011000000 31011007259
+31014000000 31014007259
+31017000000 31017007218
+31020000000 31020007243
+31023000000 31023007166
+31026000000 31026007247
+31029000000 31029007259
+31032000000 31032007262
+31035000000 31035007229
+31038000000 31038007240
+31041000000 31041007258
+31044000000 31044007254
+31047000000 31047007262
+31050000000 31050007261
+31053000000 31053007255
+31056000000 31056007280
+31059000000 31059007259
+31062000000 31062007263
+31065000000 31065007248
+31068000000 31068007246
+31071000000 31071007217
+31074000000 31074007247
+31077000000 31077007255
+31080000000 31080007272
+31083000000 31083007262
+31086000000 31086007212
+31089000000 31089007266
+31092000000 31092007260
+31095000000 31095007254
+31098000000 31098007254
+31101000000 31101007268
+31104000000 31104007259
+31107000000 31107007265
+31110000000 31110007254
+31113000000 31113007204
+31116000000 31116007263
+31119000000 31119007259
+31122000000 31122007246
+31125000000 31125007257
+31128000000 31128007175
+31131000000 31131007258
+31134000000 31134007250
+31137000000 31137007251
+31140000000 31140007262
+31143000000 31143007262
+31146000000 31146007216
+31149000000 31149007271
+31152000000 31152007236
+31155000000 31155007264
+31158000000 31158007263
+31161000000 31161007257
+31164000000 31164007212
+31167000000 31167007281
+31170000000 31170007260
+31173000000 31173007268
+31176000000 31176007254
+31179000000 31179007258
+31182000000 31182007260
+31185000000 31185007250
+31188000000 31188007246
+31191000000 31191007254
+31194000000 31194007250
+31197000000 31197007256
+31200000000 31200007247
+31203000000 31203007263
+31206000000 31206007233
+31209000000 31209007254
+31212000000 31212007249
+31215000000 31215007258
+31218000000 31218007247
+31221000000 31221007271
+31224000000 31224007252
+31227000000 31227007237
+31230000000 31230007251
+31233000000 31233007254
+31236000000 31236007257
+31239000000 31239007258
+31242000000 31242007268
+31245000000 31245007257
+31248000000 31248007261
+31251000000 31251007252
+31254000000 31254007250
+31257000000 31257007252
+31260000000 31260007251
+31263000000 31263007217
+31266000000 31266007247
+31269000000 31269007241
+31272000000 31272007257
+31275000000 31275007233
+31278000000 31278007245
+31281000000 31281007258
+31284000000 31284007260
+31287000000 31287007249
+31290000000 31290007191
+31293000000 31293007189
+31296000000 31296007261
+31299000000 31299007176
+31302000000 31302007250
+31305000000 31305007262
+31308000000 31308007254
+31311000000 31311007254
+31314000000 31314007213
+31317000000 31317007238
+31320000000 31320007161
+31323000000 31323007242
+31326000000 31326007254
+31329000000 31329007257
+31332000000 31332007224
+31335000000 31335007235
+31338000000 31338007253
+31341000000 31341007249
+31344000000 31344007257
+31347000000 31347007256
+31350000000 31350007250
+31353000000 31353007275
+31356000000 31356007254
+31359000000 31359007258
+31362000000 31362007243
+31365000000 31365007241
+31368000000 31368007212
+31371000000 31371007242
+31374000000 31374007250
+31377000000 31377007267
+31380000000 31380007257
+31383000000 31383007207
+31386000000 31386007261
+31389000000 31389007255
+31392000000 31392007249
+31395000000 31395007249
+31398000000 31398007263
+31401000000 31401007254
+31404000000 31404007260
+31407000000 31407007249
+31410000000 31410007199
+31413000000 31413007258
+31416000000 31416007254
+31419000000 31419007241
+31422000000 31422007252
+31425000000 31425007170
+31428000000 31428007253
+31431000000 31431007245
+31434000000 31434007246
+31437000000 31437007257
+31440000000 31440007257
+31443000000 31443007211
+31446000000 31446007266
+31449000000 31449007231
+31452000000 31452007259
+31455000000 31455007258
+31458000000 31458007252
+31461000000 31461007207
+31464000000 31464007276
+31467000000 31467007255
+31470000000 31470007263
+31473000000 31473007249
+31476000000 31476007253
+31479000000 31479007255
+31482000000 31482007245
+31485000000 31485007241
+31488000000 31488007249
+31491000000 31491007245
+31494000000 31494007251
+31497000000 31497007242
+31500000000 31500007258
+31503000000 31503007228
+31506000000 31506007249
+31509000000 31509007244
+31512000000 31512007253
+31515000000 31515007242
+31518000000 31518007266
+31521000000 31521007247
+31524000000 31524007232
+31527000000 31527007246
+31530000000 31530007249
+31533000000 31533007252
+31536000000 31536007253
+31539000000 31539007263
+31542000000 31542007252
+31545000000 31545007256
+31548000000 31548007247
+31551000000 31551007245
+31554000000 31554007247
+31557000000 31557007246
+31560000000 31560007212
+31563000000 31563007242
+31566000000 31566007236
+31569000000 31569007252
+31572000000 31572007228
+31575000000 31575007240
+31578000000 31578007253
+31581000000 31581007255
+31584000000 31584007244
+31587000000 31587007186
+31590000000 31590007184
+31593000000 31593007256
+31596000000 31596007171
+31599000000 31599007245
+31602000000 31602007257
+31605000000 31605007249
+31608000000 31608007249
+31611000000 31611007208
+31614000000 31614007233
+31617000000 31617007156
+31620000000 31620007237
+31623000000 31623007249
+31626000000 31626007252
+31629000000 31629007219
+31632000000 31632007230
+31635000000 31635007248
+31638000000 31638007244
+31641000000 31641007252
+31644000000 31644007251
+31647000000 31647007245
+31650000000 31650007270
+31653000000 31653007249
+31656000000 31656007253
+31659000000 31659007238
+31662000000 31662007236
+31665000000 31665007207
+31668000000 31668007237
+31671000000 31671007245
+31674000000 31674007262
+31677000000 31677007252
+31680000000 31680007202
+31683000000 31683007256
+31686000000 31686007250
+31689000000 31689007244
+31692000000 31692007244
+31695000000 31695007258
+31698000000 31698007249
+31701000000 31701007255
+31704000000 31704007244
+31707000000 31707007194
+31710000000 31710007253
+31713000000 31713007249
+31716000000 31716007236
+31719000000 31719007247
+31722000000 31722007165
+31725000000 31725007248
+31728000000 31728007240
+31731000000 31731007241
+31734000000 31734007252
+31737000000 31737007252
+31740000000 31740007206
+31743000000 31743007261
+31746000000 31746007226
+31749000000 31749007254
+31752000000 31752007253
+31755000000 31755007247
+31758000000 31758007202
+31761000000 31761007271
+31764000000 31764007250
+31767000000 31767007258
+31770000000 31770007244
+31773000000 31773007248
+31776000000 31776007250
+31779000000 31779007240
+31782000000 31782007236
+31785000000 31785007244
+31788000000 31788007240
+31791000000 31791007246
+31794000000 31794007237
+31797000000 31797007253
+31800000000 31800007223
+31803000000 31803007244
+31806000000 31806007239
+31809000000 31809007248
+31812000000 31812007237
+31815000000 31815007261
+31818000000 31818007242
+31821000000 31821007227
+31824000000 31824007241
+31827000000 31827007244
+31830000000 31830007247
+31833000000 31833007248
+31836000000 31836007258
+31839000000 31839007247
+31842000000 31842007251
+31845000000 31845007242
+31848000000 31848007240
+31851000000 31851007242
+31854000000 31854007241
+31857000000 31857007207
+31860000000 31860007237
+31863000000 31863007231
+31866000000 31866007247
+31869000000 31869007223
+31872000000 31872007235
+31875000000 31875007248
+31878000000 31878007250
+31881000000 31881007239
+31884000000 31884007181
+31887000000 31887007179
+31890000000 31890007251
+31893000000 31893007166
+31896000000 31896007240
+31899000000 31899007252
+31902000000 31902007244
+31905000000 31905007244
+31908000000 31908007203
+31911000000 31911007228
+31914000000 31914007151
+31917000000 31917007232
+31920000000 31920007244
+31923000000 31923007247
+31926000000 31926007214
+31929000000 31929007225
+31932000000 31932007243
+31935000000 31935007239
+31938000000 31938007247
+31941000000 31941007246
+31944000000 31944007240
+31947000000 31947007265
+31950000000 31950007244
+31953000000 31953007248
+31956000000 31956007233
+31959000000 31959007231
+31962000000 31962007202
+31965000000 31965007232
+31968000000 31968007240
+31971000000 31971007257
+31974000000 31974007247
+31977000000 31977007197
+31980000000 31980007251
+31983000000 31983007245
+31986000000 31986007239
+31989000000 31989007239
+31992000000 31992007253
+31995000000 31995007244
+31998000000 31998007250
+32001000000 32001007239
+32004000000 32004007189
+32007000000 32007007248
+32010000000 32010007244
+32013000000 32013007231
+32016000000 32016007242
+32019000000 32019007160
+32022000000 32022007243
+32025000000 32025007235
+32028000000 32028007236
+32031000000 32031007247
+32034000000 32034007247
+32037000000 32037007201
+32040000000 32040007256
+32043000000 32043007221
+32046000000 32046007249
+32049000000 32049007248
+32052000000 32052007242
+32055000000 32055007197
+32058000000 32058007266
+32061000000 32061007245
+32064000000 32064007253
+32067000000 32067007239
+32070000000 32070007243
+32073000000 32073007245
+32076000000 32076007235
+32079000000 32079007231
+32082000000 32082007239
+32085000000 32085007235
+32088000000 32088007241
+32091000000 32091007232
+32094000000 32094007248
+32097000000 32097007218
+32100000000 32100007239
+32103000000 32103007234
+32106000000 32106007243
+32109000000 32109007232
+32112000000 32112007256
+32115000000 32115007237
+32118000000 32118007222
+32121000000 32121007236
+32124000000 32124007239
+32127000000 32127007242
+32130000000 32130007243
+32133000000 32133007253
+32136000000 32136007242
+32139000000 32139007246
+32142000000 32142007237
+32145000000 32145007235
+32148000000 32148007237
+32151000000 32151007236
+32154000000 32154007202
+32157000000 32157007232
+32160000000 32160007226
+32163000000 32163007242
+32166000000 32166007218
+32169000000 32169007230
+32172000000 32172007243
+32175000000 32175007245
+32178000000 32178007234
+32181000000 32181007176
+32184000000 32184007174
+32187000000 32187007246
+32190000000 32190007161
+32193000000 32193007235
+32196000000 32196007247
+32199000000 32199007239
+32202000000 32202007239
+32205000000 32205007198
+32208000000 32208007223
+32211000000 32211007146
+32214000000 32214007227
+32217000000 32217007239
+32220000000 32220007242
+32223000000 32223007209
+32226000000 32226007220
+32229000000 32229007238
+32232000000 32232007234
+32235000000 32235007242
+32238000000 32238007241
+32241000000 32241007235
+32244000000 32244007260
+32247000000 32247007239
+32250000000 32250007243
+32253000000 32253007228
+32256000000 32256007226
+32259000000 32259007197
+32262000000 32262007227
+32265000000 32265007235
+32268000000 32268007252
+32271000000 32271007242
+32274000000 32274007192
+32277000000 32277007246
+32280000000 32280007240
+32283000000 32283007234
+32286000000 32286007234
+32289000000 32289007248
+32292000000 32292007239
+32295000000 32295007245
+32298000000 32298007234
+32301000000 32301007184
+32304000000 32304007243
+32307000000 32307007239
+32310000000 32310007226
+32313000000 32313007237
+32316000000 32316007155
+32319000000 32319007238
+32322000000 32322007230
+32325000000 32325007231
+32328000000 32328007242
+32331000000 32331007242
+32334000000 32334007196
+32337000000 32337007251
+32340000000 32340007216
+32343000000 32343007244
+32346000000 32346007243
+32349000000 32349007237
+32352000000 32352007192
+32355000000 32355007261
+32358000000 32358007240
+32361000000 32361007248
+32364000000 32364007234
+32367000000 32367007238
+32370000000 32370007240
+32373000000 32373007230
+32376000000 32376007226
+32379000000 32379007234
+32382000000 32382007230
+32385000000 32385007236
+32388000000 32388007227
+32391000000 32391007243
+32394000000 32394007213
+32397000000 32397007234
+32400000000 32400007229
+32403000000 32403007238
+32406000000 32406007227
+32409000000 32409007251
+32412000000 32412007232
+32415000000 32415007217
+32418000000 32418007231
+32421000000 32421007234
+32424000000 32424007237
+32427000000 32427007238
+32430000000 32430007248
+32433000000 32433007237
+32436000000 32436007241
+32439000000 32439007232
+32442000000 32442007230
+32445000000 32445007232
+32448000000 32448007231
+32451000000 32451007197
+32454000000 32454007227
+32457000000 32457007221
+32460000000 32460007237
+32463000000 32463007213
+32466000000 32466007225
+32469000000 32469007238
+32472000000 32472007240
+32475000000 32475007229
+32478000000 32478007171
+32481000000 32481007169
+32484000000 32484007241
+32487000000 32487007156
+32490000000 32490007230
+32493000000 32493007242
+32496000000 32496007234
+32499000000 32499007234
+32502000000 32502007193
+32505000000 32505007218
+32508000000 32508007141
+32511000000 32511007222
+32514000000 32514007234
+32517000000 32517007237
+32520000000 32520007204
+32523000000 32523007215
+32526000000 32526007233
+32529000000 32529007229
+32532000000 32532007237
+32535000000 32535007236
+32538000000 32538007230
+32541000000 32541007255
+32544000000 32544007234
+32547000000 32547007238
+32550000000 32550007223
+32553000000 32553007221
+32556000000 32556007192
+32559000000 32559007222
+32562000000 32562007230
+32565000000 32565007247
+32568000000 32568007237
+32571000000 32571007187
+32574000000 32574007241
+32577000000 32577007235
+32580000000 32580007229
+32583000000 32583007229
+32586000000 32586007243
+32589000000 32589007234
+32592000000 32592007240
+32595000000 32595007229
+32598000000 32598007179
+32601000000 32601007238
+32604000000 32604007234
+32607000000 32607007221
+32610000000 32610007232
+32613000000 32613007150
+32616000000 32616007233
+32619000000 32619007225
+32622000000 32622007226
+32625000000 32625007237
+32628000000 32628007237
+32631000000 32631007191
+32634000000 32634007246
+32637000000 32637007211
+32640000000 32640007239
+32643000000 32643007238
+32646000000 32646007232
+32649000000 32649007187
+32652000000 32652007256
+32655000000 32655007235
+32658000000 32658007243
+32661000000 32661007229
+32664000000 32664007233
+32667000000 32667007235
+32670000000 32670007225
+32673000000 32673007221
+32676000000 32676007229
+32679000000 32679007225
+32682000000 32682007231
+32685000000 32685007222
+32688000000 32688007238
+32691000000 32691007208
+32694000000 32694007229
+32697000000 32697007224
+32700000000 32700007233
+32703000000 32703007222
+32706000000 32706007246
+32709000000 32709007227
+32712000000 32712007212
+32715000000 32715007226
+32718000000 32718007229
+32721000000 32721007232
+32724000000 32724007233
+32727000000 32727007243
+32730000000 32730007232
+32733000000 32733007236
+32736000000 32736007227
+32739000000 32739007225
+32742000000 32742007227
+32745000000 32745007226
+32748000000 32748007192
+32751000000 32751007222
+32754000000 32754007216
+32757000000 32757007232
+32760000000 32760007208
+32763000000 32763007220
+32766000000 32766007233
+32769000000 32769007235
+32772000000 32772007224
+32775000000 32775007166
+32778000000 32778007164
+32781000000 32781007236
+32784000000 32784007151
+32787000000 32787007225
+32790000000 32790007237
+32793000000 32793007229
+32796000000 32796007229
+32799000000 32799007188
+32802000000 32802007213
+32805000000 32805007136
+32808000000 32808007217
+32811000000 32811007229
+32814000000 32814007232
+32817000000 32817007199
+32820000000 32820007210
+32823000000 32823007228
+32826000000 32826007224
+32829000000 32829007232
+32832000000 32832007231
+32835000000 32835007225
+32838000000 32838007250
+32841000000 32841007229
+32844000000 32844007233
+32847000000 32847007218
+32850000000 32850007216
+32853000000 32853007187
+32856000000 32856007217
+32859000000 32859007225
+32862000000 32862007242
+32865000000 32865007232
+32868000000 32868007182
+32871000000 32871007236
+32874000000 32874007230
+32877000000 32877007224
+32880000000 32880007224
+32883000000 32883007238
+32886000000 32886007229
+32889000000 32889007235
+32892000000 32892007224
+32895000000 32895007174
+32898000000 32898007233
+32901000000 32901007229
+32904000000 32904007216
+32907000000 32907007227
+32910000000 32910007145
+32913000000 32913007228
+32916000000 32916007220
+32919000000 32919007221
+32922000000 32922007232
+32925000000 32925007232
+32928000000 32928007186
+32931000000 32931007241
+32934000000 32934007206
+32937000000 32937007234
+32940000000 32940007233
+32943000000 32943007227
+32946000000 32946007182
+32949000000 32949007251
+32952000000 32952007230
+32955000000 32955007238
+32958000000 32958007224
+32961000000 32961007228
+32964000000 32964007230
+32967000000 32967007220
+32970000000 32970007216
+32973000000 32973007224
+32976000000 32976007220
+32979000000 32979007226
+32982000000 32982007217
+32985000000 32985007233
+32988000000 32988007203
+32991000000 32991007224
+32994000000 32994007219
+32997000000 32997007228
+33000000000 33000007217
+33003000000 33003007241
+33006000000 33006007222
+33009000000 33009007207
+33012000000 33012007221
+33015000000 33015007224
+33018000000 33018007227
+33021000000 33021007228
+33024000000 33024007238
+33027000000 33027007227
+33030000000 33030007231
+33033000000 33033007222
+33036000000 33036007220
+33039000000 33039007222
+33042000000 33042007221
+33045000000 33045007187
+33048000000 33048007217
+33051000000 33051007211
+33054000000 33054007227
+33057000000 33057007203
+33060000000 33060007215
+33063000000 33063007228
+33066000000 33066007230
+33069000000 33069007219
+33072000000 33072007161
+33075000000 33075007159
+33078000000 33078007231
+33081000000 33081007146
+33084000000 33084007220
+33087000000 33087007232
+33090000000 33090007224
+33093000000 33093007224
+33096000000 33096007183
+33099000000 33099007208
+33102000000 33102007131
+33105000000 33105007212
+33108000000 33108007224
+33111000000 33111007227
+33114000000 33114007194
+33117000000 33117007205
+33120000000 33120007223
+33123000000 33123007219
+33126000000 33126007227
+33129000000 33129007226
+33132000000 33132007220
+33135000000 33135007245
+33138000000 33138007224
+33141000000 33141007228
+33144000000 33144007213
+33147000000 33147007211
+33150000000 33150007182
+33153000000 33153007212
+33156000000 33156007220
+33159000000 33159007237
+33162000000 33162007227
+33165000000 33165007177
+33168000000 33168007231
+33171000000 33171007225
+33174000000 33174007219
+33177000000 33177007219
+33180000000 33180007233
+33183000000 33183007224
+33186000000 33186007230
+33189000000 33189007219
+33192000000 33192007169
+33195000000 33195007228
+33198000000 33198007224
+33201000000 33201007211
+33204000000 33204007222
+33207000000 33207007140
+33210000000 33210007223
+33213000000 33213007215
+33216000000 33216007216
+33219000000 33219007227
+33222000000 33222007227
+33225000000 33225007181
+33228000000 33228007236
+33231000000 33231007201
+33234000000 33234007229
+33237000000 33237007228
+33240000000 33240007222
+33243000000 33243007177
+33246000000 33246007246
+33249000000 33249007225
+33252000000 33252007233
+33255000000 33255007219
+33258000000 33258007223
+33261000000 33261007225
+33264000000 33264007215
+33267000000 33267007211
+33270000000 33270007219
+33273000000 33273007215
+33276000000 33276007221
+33279000000 33279007212
+33282000000 33282007228
+33285000000 33285007198
+33288000000 33288007219
+33291000000 33291007214
+33294000000 33294007223
+33297000000 33297007212
+33300000000 33300007236
+33303000000 33303007217
+33306000000 33306007202
+33309000000 33309007216
+33312000000 33312007219
+33315000000 33315007222
+33318000000 33318007223
+33321000000 33321007233
+33324000000 33324007222
+33327000000 33327007226
+33330000000 33330007217
+33333000000 33333007215
+33336000000 33336007217
+33339000000 33339007216
+33342000000 33342007182
+33345000000 33345007212
+33348000000 33348007206
+33351000000 33351007222
+33354000000 33354007198
+33357000000 33357007210
+33360000000 33360007223
+33363000000 33363007225
+33366000000 33366007214
+33369000000 33369007156
+33372000000 33372007154
+33375000000 33375007226
+33378000000 33378007141
+33381000000 33381007215
+33384000000 33384007227
+33387000000 33387007219
+33390000000 33390007219
+33393000000 33393007178
+33396000000 33396007203
+33399000000 33399007126
+33402000000 33402007207
+33405000000 33405007219
+33408000000 33408007222
+33411000000 33411007189
+33414000000 33414007200
+33417000000 33417007218
+33420000000 33420007214
+33423000000 33423007222
+33426000000 33426007221
+33429000000 33429007215
+33432000000 33432007240
+33435000000 33435007219
+33438000000 33438007223
+33441000000 33441007208
+33444000000 33444007206
+33447000000 33447007177
+33450000000 33450007207
+33453000000 33453007215
+33456000000 33456007232
+33459000000 33459007222
+33462000000 33462007172
+33465000000 33465007226
+33468000000 33468007220
+33471000000 33471007214
+33474000000 33474007214
+33477000000 33477007228
+33480000000 33480007219
+33483000000 33483007225
+33486000000 33486007214
+33489000000 33489007164
+33492000000 33492007223
+33495000000 33495007219
+33498000000 33498007206
+33501000000 33501007217
+33504000000 33504007135
+33507000000 33507007218
+33510000000 33510007210
+33513000000 33513007211
+33516000000 33516007222
+33519000000 33519007222
+33522000000 33522007176
+33525000000 33525007231
+33528000000 33528007196
+33531000000 33531007224
+33534000000 33534007223
+33537000000 33537007217
+33540000000 33540007172
+33543000000 33543007241
+33546000000 33546007220
+33549000000 33549007228
+33552000000 33552007214
+33555000000 33555007218
+33558000000 33558007220
+33561000000 33561007210
+33564000000 33564007206
+33567000000 33567007214
+33570000000 33570007210
+33573000000 33573007216
+33576000000 33576007207
+33579000000 33579007223
+33582000000 33582007193
+33585000000 33585007214
+33588000000 33588007209
+33591000000 33591007218
+33594000000 33594007207
+33597000000 33597007231
+33600000000 33600007212
+33603000000 33603007197
+33606000000 33606007211
+33609000000 33609007214
+33612000000 33612007217
+33615000000 33615007218
+33618000000 33618007228
+33621000000 33621007217
+33624000000 33624007221
+33627000000 33627007212
+33630000000 33630007210
+33633000000 33633007212
+33636000000 33636007211
+33639000000 33639007177
+33642000000 33642007207
+33645000000 33645007201
+33648000000 33648007217
+33651000000 33651007193
+33654000000 33654007205
+33657000000 33657007218
+33660000000 33660007220
+33663000000 33663007209
+33666000000 33666007151
+33669000000 33669007149
+33672000000 33672007221
+33675000000 33675007136
+33678000000 33678007210
+33681000000 33681007222
+33684000000 33684007214
+33687000000 33687007214
+33690000000 33690007173
+33693000000 33693007198
+33696000000 33696007121
+33699000000 33699007202
+33702000000 33702007214
+33705000000 33705007217
+33708000000 33708007184
+33711000000 33711007195
+33714000000 33714007213
+33717000000 33717007209
+33720000000 33720007217
+33723000000 33723007216
+33726000000 33726007210
+33729000000 33729007235
+33732000000 33732007214
+33735000000 33735007218
+33738000000 33738007203
+33741000000 33741007201
+33744000000 33744007172
+33747000000 33747007202
+33750000000 33750007210
+33753000000 33753007227
+33756000000 33756007217
+33759000000 33759007167
+33762000000 33762007221
+33765000000 33765007215
+33768000000 33768007209
+33771000000 33771007209
+33774000000 33774007223
+33777000000 33777007214
+33780000000 33780007220
+33783000000 33783007209
+33786000000 33786007159
+33789000000 33789007218
+33792000000 33792007214
+33795000000 33795007201
+33798000000 33798007212
+33801000000 33801007130
+33804000000 33804007213
+33807000000 33807007205
+33810000000 33810007206
+33813000000 33813007217
+33816000000 33816007217
+33819000000 33819007171
+33822000000 33822007226
+33825000000 33825007191
+33828000000 33828007219
+33831000000 33831007218
+33834000000 33834007212
+33837000000 33837007167
+33840000000 33840007236
+33843000000 33843007215
+33846000000 33846007223
+33849000000 33849007209
+33852000000 33852007213
+33855000000 33855007215
+33858000000 33858007205
+33861000000 33861007201
+33864000000 33864007209
+33867000000 33867007205
+33870000000 33870007211
+33873000000 33873007202
+33876000000 33876007218
+33879000000 33879007188
+33882000000 33882007209
+33885000000 33885007204
+33888000000 33888007213
+33891000000 33891007202
+33894000000 33894007226
+33897000000 33897007207
+33900000000 33900007192
+33903000000 33903007206
+33906000000 33906007209
+33909000000 33909007212
+33912000000 33912007213
+33915000000 33915007223
+33918000000 33918007212
+33921000000 33921007216
+33924000000 33924007207
+33927000000 33927007205
+33930000000 33930007207
+33933000000 33933007206
+33936000000 33936007172
+33939000000 33939007202
+33942000000 33942007196
+33945000000 33945007212
+33948000000 33948007188
+33951000000 33951007200
+33954000000 33954007213
+33957000000 33957007215
+33960000000 33960007204
+33963000000 33963007146
+33966000000 33966007144
+33969000000 33969007216
+33972000000 33972007131
+33975000000 33975007205
+33978000000 33978007217
+33981000000 33981007209
+33984000000 33984007209
+33987000000 33987007168
+33990000000 33990007193
+33993000000 33993007116
+33996000000 33996007197
+33999000000 33999007209
+34002000000 34002007212
+34005000000 34005007179
+34008000000 34008007190
+34011000000 34011007208
+34014000000 34014007204
+34017000000 34017007212
+34020000000 34020007211
+34023000000 34023007205
+34026000000 34026007230
+34029000000 34029007209
+34032000000 34032007213
+34035000000 34035007198
+34038000000 34038007196
+34041000000 34041007167
+34044000000 34044007197
+34047000000 34047007205
+34050000000 34050007222
+34053000000 34053007212
+34056000000 34056007162
+34059000000 34059007216
+34062000000 34062007210
+34065000000 34065007204
+34068000000 34068007204
+34071000000 34071007218
+34074000000 34074007209
+34077000000 34077007215
+34080000000 34080007204
+34083000000 34083007154
+34086000000 34086007213
+34089000000 34089007209
+34092000000 34092007196
+34095000000 34095007207
+34098000000 34098007125
+34101000000 34101007208
+34104000000 34104007200
+34107000000 34107007201
+34110000000 34110007212
+34113000000 34113007212
+34116000000 34116007166
+34119000000 34119007221
+34122000000 34122007186
+34125000000 34125007214
+34128000000 34128007213
+34131000000 34131007207
+34134000000 34134007162
+34137000000 34137007231
+34140000000 34140007210
+34143000000 34143007218
+34146000000 34146007204
+34149000000 34149007208
+34152000000 34152007210
+34155000000 34155007200
+34158000000 34158007196
+34161000000 34161007204
+34164000000 34164007200
+34167000000 34167007206
+34170000000 34170007197
+34173000000 34173007213
+34176000000 34176007183
+34179000000 34179007204
+34182000000 34182007199
+34185000000 34185007208
+34188000000 34188007197
+34191000000 34191007221
+34194000000 34194007202
+34197000000 34197007187
+34200000000 34200007201
+34203000000 34203007204
+34206000000 34206007207
+34209000000 34209007208
+34212000000 34212007218
+34215000000 34215007207
+34218000000 34218007211
+34221000000 34221007202
+34224000000 34224007200
+34227000000 34227007202
+34230000000 34230007201
+34233000000 34233007167
+34236000000 34236007197
+34239000000 34239007191
+34242000000 34242007207
+34245000000 34245007183
+34248000000 34248007195
+34251000000 34251007208
+34254000000 34254007210
+34257000000 34257007199
+34260000000 34260007141
+34263000000 34263007139
+34266000000 34266007211
+34269000000 34269007126
+34272000000 34272007200
+34275000000 34275007212
+34278000000 34278007204
+34281000000 34281007204
+34284000000 34284007163
+34287000000 34287007188
+34290000000 34290007111
+34293000000 34293007192
+34296000000 34296007204
+34299000000 34299007207
+34302000000 34302007174
+34305000000 34305007185
+34308000000 34308007203
+34311000000 34311007199
+34314000000 34314007207
+34317000000 34317007206
+34320000000 34320007200
+34323000000 34323007225
+34326000000 34326007204
+34329000000 34329007208
+34332000000 34332007193
+34335000000 34335007191
+34338000000 34338007162
+34341000000 34341007192
+34344000000 34344007200
+34347000000 34347007217
+34350000000 34350007207
+34353000000 34353007157
+34356000000 34356007211
+34359000000 34359007205
+34362000000 34362007199
+34365000000 34365007199
+34368000000 34368007213
+34371000000 34371007204
+34374000000 34374007210
+34377000000 34377007199
+34380000000 34380007149
+34383000000 34383007208
+34386000000 34386007204
+34389000000 34389007191
+34392000000 34392007202
+34395000000 34395007120
+34398000000 34398007203
+34401000000 34401007195
+34404000000 34404007196
+34407000000 34407007207
+34410000000 34410007207
+34413000000 34413007161
+34416000000 34416007216
+34419000000 34419007181
+34422000000 34422007209
+34425000000 34425007208
+34428000000 34428007202
+34431000000 34431007157
+34434000000 34434007226
+34437000000 34437007205
+34440000000 34440007213
+34443000000 34443007199
+34446000000 34446007203
+34449000000 34449007205
+34452000000 34452007195
+34455000000 34455007191
+34458000000 34458007199
+34461000000 34461007195
+34464000000 34464007201
+34467000000 34467007192
+34470000000 34470007208
+34473000000 34473007178
+34476000000 34476007199
+34479000000 34479007194
+34482000000 34482007203
+34485000000 34485007192
+34488000000 34488007216
+34491000000 34491007197
+34494000000 34494007182
+34497000000 34497007196
+34500000000 34500007199
+34503000000 34503007202
+34506000000 34506007203
+34509000000 34509007213
+34512000000 34512007202
+34515000000 34515007206
+34518000000 34518007197
+34521000000 34521007195
+34524000000 34524007197
+34527000000 34527007196
+34530000000 34530007162
+34533000000 34533007192
+34536000000 34536007186
+34539000000 34539007202
+34542000000 34542007178
+34545000000 34545007190
+34548000000 34548007203
+34551000000 34551007205
+34554000000 34554007194
+34557000000 34557007136
+34560000000 34560007134
+34563000000 34563007206
+34566000000 34566007121
+34569000000 34569007195
+34572000000 34572007207
+34575000000 34575007199
+34578000000 34578007199
+34581000000 34581007158
+34584000000 34584007183
+34587000000 34587007106
+34590000000 34590007187
+34593000000 34593007199
+34596000000 34596007202
+34599000000 34599007169
+34602000000 34602007180
+34605000000 34605007198
+34608000000 34608007194
+34611000000 34611007202
+34614000000 34614007201
+34617000000 34617007195
+34620000000 34620007220
+34623000000 34623007199
+34626000000 34626007203
+34629000000 34629007188
+34632000000 34632007186
+34635000000 34635007157
+34638000000 34638007187
+34641000000 34641007195
+34644000000 34644007212
+34647000000 34647007202
+34650000000 34650007152
+34653000000 34653007206
+34656000000 34656007200
+34659000000 34659007194
+34662000000 34662007194
+34665000000 34665007208
+34668000000 34668007199
+34671000000 34671007205
+34674000000 34674007194
+34677000000 34677007144
+34680000000 34680007203
+34683000000 34683007199
+34686000000 34686007186
+34689000000 34689007197
+34692000000 34692007115
+34695000000 34695007198
+34698000000 34698007190
+34701000000 34701007191
+34704000000 34704007202
+34707000000 34707007202
+34710000000 34710007156
+34713000000 34713007211
+34716000000 34716007176
+34719000000 34719007204
+34722000000 34722007203
+34725000000 34725007197
+34728000000 34728007152
+34731000000 34731007221
+34734000000 34734007200
+34737000000 34737007208
+34740000000 34740007194
+34743000000 34743007198
+34746000000 34746007200
+34749000000 34749007190
+34752000000 34752007186
+34755000000 34755007194
+34758000000 34758007190
+34761000000 34761007196
+34764000000 34764007187
+34767000000 34767007203
+34770000000 34770007173
+34773000000 34773007194
+34776000000 34776007189
+34779000000 34779007198
+34782000000 34782007187
+34785000000 34785007211
+34788000000 34788007192
+34791000000 34791007177
+34794000000 34794007191
+34797000000 34797007194
+34800000000 34800007197
+34803000000 34803007198
+34806000000 34806007208
+34809000000 34809007197
+34812000000 34812007201
+34815000000 34815007192
+34818000000 34818007190
+34821000000 34821007192
+34824000000 34824007191
+34827000000 34827007157
+34830000000 34830007187
+34833000000 34833007181
+34836000000 34836007197
+34839000000 34839007173
+34842000000 34842007185
+34845000000 34845007198
+34848000000 34848007200
+34851000000 34851007189
+34854000000 34854007131
+34857000000 34857007129
+34860000000 34860007201
+34863000000 34863007116
+34866000000 34866007190
+34869000000 34869007202
+34872000000 34872007194
+34875000000 34875007194
+34878000000 34878007153
+34881000000 34881007178
+34884000000 34884007101
+34887000000 34887007182
+34890000000 34890007194
+34893000000 34893007197
+34896000000 34896007164
+34899000000 34899007175
+34902000000 34902007193
+34905000000 34905007189
+34908000000 34908007197
+34911000000 34911007196
+34914000000 34914007190
+34917000000 34917007215
+34920000000 34920007194
+34923000000 34923007198
+34926000000 34926007183
+34929000000 34929007181
+34932000000 34932007152
+34935000000 34935007182
+34938000000 34938007190
+34941000000 34941007207
+34944000000 34944007197
+34947000000 34947007147
+34950000000 34950007201
+34953000000 34953007195
+34956000000 34956007189
+34959000000 34959007189
+34962000000 34962007203
+34965000000 34965007194
+34968000000 34968007200
+34971000000 34971007189
+34974000000 34974007139
+34977000000 34977007198
+34980000000 34980007194
+34983000000 34983007181
+34986000000 34986007192
+34989000000 34989007110
+34992000000 34992007193
+34995000000 34995007185
+34998000000 34998007186
+35001000000 35001007197
+35004000000 35004007197
+35007000000 35007007151
+35010000000 35010007206
+35013000000 35013007171
+35016000000 35016007199
+35019000000 35019007198
+35022000000 35022007192
+35025000000 35025007147
+35028000000 35028007216
+35031000000 35031007195
+35034000000 35034007203
+35037000000 35037007189
+35040000000 35040007193
+35043000000 35043007195
+35046000000 35046007185
+35049000000 35049007181
+35052000000 35052007189
+35055000000 35055007185
+35058000000 35058007191
+35061000000 35061007182
+35064000000 35064007198
+35067000000 35067007168
+35070000000 35070007189
+35073000000 35073007184
+35076000000 35076007193
+35079000000 35079007182
+35082000000 35082007206
+35085000000 35085007187
+35088000000 35088007172
+35091000000 35091007186
+35094000000 35094007189
+35097000000 35097007192
+35100000000 35100007193
+35103000000 35103007203
+35106000000 35106007192
+35109000000 35109007196
+35112000000 35112007187
+35115000000 35115007185
+35118000000 35118007187
+35121000000 35121007186
+35124000000 35124007152
+35127000000 35127007182
+35130000000 35130007176
+35133000000 35133007192
+35136000000 35136007168
+35139000000 35139007180
+35142000000 35142007193
+35145000000 35145007195
+35148000000 35148007184
+35151000000 35151007126
+35154000000 35154007124
+35157000000 35157007196
+35160000000 35160007111
+35163000000 35163007185
+35166000000 35166007197
+35169000000 35169007189
+35172000000 35172007189
+35175000000 35175007148
+35178000000 35178007173
+35181000000 35181007096
+35184000000 35184007177
+35187000000 35187007189
+35190000000 35190007192
+35193000000 35193007159
+35196000000 35196007170
+35199000000 35199007188
+35202000000 35202007184
+35205000000 35205007192
+35208000000 35208007191
+35211000000 35211007185
+35214000000 35214007210
+35217000000 35217007189
+35220000000 35220007193
+35223000000 35223007178
+35226000000 35226007176
+35229000000 35229007147
+35232000000 35232007177
+35235000000 35235007185
+35238000000 35238007202
+35241000000 35241007192
+35244000000 35244007142
+35247000000 35247007196
+35250000000 35250007190
+35253000000 35253007184
+35256000000 35256007184
+35259000000 35259007198
+35262000000 35262007189
+35265000000 35265007195
+35268000000 35268007184
+35271000000 35271007134
+35274000000 35274007193
+35277000000 35277007189
+35280000000 35280007176
+35283000000 35283007187
+35286000000 35286007105
+35289000000 35289007188
+35292000000 35292007180
+35295000000 35295007181
+35298000000 35298007192
+35301000000 35301007192
+35304000000 35304007146
+35307000000 35307007201
+35310000000 35310007166
+35313000000 35313007194
+35316000000 35316007193
+35319000000 35319007187
+35322000000 35322007142
+35325000000 35325007211
+35328000000 35328007190
+35331000000 35331007198
+35334000000 35334007184
+35337000000 35337007188
+35340000000 35340007190
+35343000000 35343007180
+35346000000 35346007176
+35349000000 35349007184
+35352000000 35352007180
+35355000000 35355007186
+35358000000 35358007177
+35361000000 35361007193
+35364000000 35364007163
+35367000000 35367007184
+35370000000 35370007179
+35373000000 35373007188
+35376000000 35376007177
+35379000000 35379007201
+35382000000 35382007182
+35385000000 35385007167
+35388000000 35388007181
+35391000000 35391007184
+35394000000 35394007187
+35397000000 35397007188
+35400000000 35400007198
+35403000000 35403007187
+35406000000 35406007191
+35409000000 35409007182
+35412000000 35412007180
+35415000000 35415007182
+35418000000 35418007181
+35421000000 35421007147
+35424000000 35424007177
+35427000000 35427007171
+35430000000 35430007187
+35433000000 35433007163
+35436000000 35436007175
+35439000000 35439007188
+35442000000 35442007190
+35445000000 35445007179
+35448000000 35448007121
+35451000000 35451007119
+35454000000 35454007191
+35457000000 35457007106
+35460000000 35460007180
+35463000000 35463007192
+35466000000 35466007184
+35469000000 35469007184
+35472000000 35472007143
+35475000000 35475007168
+35478000000 35478007091
+35481000000 35481007172
+35484000000 35484007184
+35487000000 35487007187
+35490000000 35490007154
+35493000000 35493007165
+35496000000 35496007183
+35499000000 35499007179
+35502000000 35502007187
+35505000000 35505007186
+35508000000 35508007180
+35511000000 35511007205
+35514000000 35514007184
+35517000000 35517007188
+35520000000 35520007173
+35523000000 35523007171
+35526000000 35526007142
+35529000000 35529007172
+35532000000 35532007180
+35535000000 35535007197
+35538000000 35538007187
+35541000000 35541007137
+35544000000 35544007191
+35547000000 35547007185
+35550000000 35550007179
+35553000000 35553007179
+35556000000 35556007193
+35559000000 35559007184
+35562000000 35562007190
+35565000000 35565007179
+35568000000 35568007129
+35571000000 35571007188
+35574000000 35574007184
+35577000000 35577007171
+35580000000 35580007182
+35583000000 35583007100
+35586000000 35586007183
+35589000000 35589007175
+35592000000 35592007176
+35595000000 35595007187
+35598000000 35598007187
+35601000000 35601007141
+35604000000 35604007196
+35607000000 35607007161
+35610000000 35610007189
+35613000000 35613007188
+35616000000 35616007182
+35619000000 35619007137
+35622000000 35622007206
+35625000000 35625007185
+35628000000 35628007193
+35631000000 35631007179
+35634000000 35634007183
+35637000000 35637007185
+35640000000 35640007175
+35643000000 35643007171
+35646000000 35646007179
+35649000000 35649007175
+35652000000 35652007181
+35655000000 35655007172
+35658000000 35658007188
+35661000000 35661007158
+35664000000 35664007179
+35667000000 35667007174
+35670000000 35670007183
+35673000000 35673007172
+35676000000 35676007196
+35679000000 35679007177
+35682000000 35682007162
+35685000000 35685007176
+35688000000 35688007179
+35691000000 35691007182
+35694000000 35694007183
+35697000000 35697007193
+35700000000 35700007182
+35703000000 35703007186
+35706000000 35706007177
+35709000000 35709007175
+35712000000 35712007177
+35715000000 35715007176
+35718000000 35718007142
+35721000000 35721007172
+35724000000 35724007166
+35727000000 35727007182
+35730000000 35730007158
+35733000000 35733007170
+35736000000 35736007183
+35739000000 35739007185
+35742000000 35742007174
+35745000000 35745007116
+35748000000 35748007114
+35751000000 35751007186
+35754000000 35754007101
+35757000000 35757007175
+35760000000 35760007187
+35763000000 35763007179
+35766000000 35766007179
+35769000000 35769007138
+35772000000 35772007163
+35775000000 35775007086
+35778000000 35778007167
+35781000000 35781007179
+35784000000 35784007182
+35787000000 35787007149
+35790000000 35790007160
+35793000000 35793007178
+35796000000 35796007174
+35799000000 35799007182
+35802000000 35802007181
+35805000000 35805007175
+35808000000 35808007200
+35811000000 35811007179
+35814000000 35814007183
+35817000000 35817007168
+35820000000 35820007166
+35823000000 35823007137
+35826000000 35826007167
+35829000000 35829007175
+35832000000 35832007192
+35835000000 35835007182
+35838000000 35838007132
+35841000000 35841007186
+35844000000 35844007180
+35847000000 35847007174
+35850000000 35850007174
+35853000000 35853007188
+35856000000 35856007179
+35859000000 35859007185
+35862000000 35862007174
+35865000000 35865007124
+35868000000 35868007183
+35871000000 35871007179
+35874000000 35874007166
+35877000000 35877007177
+35880000000 35880007095
+35883000000 35883007178
+35886000000 35886007170
+35889000000 35889007171
+35892000000 35892007182
+35895000000 35895007182
+35898000000 35898007136
+35901000000 35901007191
+35904000000 35904007156
+35907000000 35907007184
+35910000000 35910007183
+35913000000 35913007177
+35916000000 35916007132
+35919000000 35919007201
+35922000000 35922007180
+35925000000 35925007188
+35928000000 35928007174
+35931000000 35931007178
+35934000000 35934007180
+35937000000 35937007170
+35940000000 35940007166
+35943000000 35943007174
+35946000000 35946007170
+35949000000 35949007176
+35952000000 35952007167
+35955000000 35955007183
+35958000000 35958007153
+35961000000 35961007174
+35964000000 35964007169
+35967000000 35967007178
+35970000000 35970007167
+35973000000 35973007191
+35976000000 35976007172
+35979000000 35979007157
+35982000000 35982007171
+35985000000 35985007174
+35988000000 35988007177
+35991000000 35991007178
+35994000000 35994007188
+35997000000 35997007177
+36000000000 36000007181
+36003000000 36003007172
+36006000000 36006007170
+36009000000 36009007172
+36012000000 36012007171
+36015000000 36015007137
+36018000000 36018007167
+36021000000 36021007161
+36024000000 36024007177
+36027000000 36027007153
+36030000000 36030007165
+36033000000 36033007178
+36036000000 36036007180
+36039000000 36039007169
+36042000000 36042007111
+36045000000 36045007109
+36048000000 36048007181
+36051000000 36051007096
+36054000000 36054007170
+36057000000 36057007182
+36060000000 36060007174
+36063000000 36063007174
+36066000000 36066007133
+36069000000 36069007158
+36072000000 36072007081
+36075000000 36075007162
+36078000000 36078007174
+36081000000 36081007177
+36084000000 36084007144
+36087000000 36087007155
+36090000000 36090007173
+36093000000 36093007169
+36096000000 36096007177
+36099000000 36099007176
+36102000000 36102007170
+36105000000 36105007195
+36108000000 36108007174
+36111000000 36111007178
+36114000000 36114007163
+36117000000 36117007161
+36120000000 36120007132
+36123000000 36123007162
+36126000000 36126007170
+36129000000 36129007187
+36132000000 36132007177
+36135000000 36135007127
+36138000000 36138007181
+36141000000 36141007175
+36144000000 36144007169
+36147000000 36147007169
+36150000000 36150007183
+36153000000 36153007174
+36156000000 36156007180
+36159000000 36159007169
+36162000000 36162007119
+36165000000 36165007178
+36168000000 36168007174
+36171000000 36171007161
+36174000000 36174007172
+36177000000 36177007090
+36180000000 36180007173
+36183000000 36183007165
+36186000000 36186007166
+36189000000 36189007177
+36192000000 36192007177
+36195000000 36195007131
+36198000000 36198007186
+36201000000 36201007151
+36204000000 36204007179
+36207000000 36207007178
+36210000000 36210007172
+36213000000 36213007127
+36216000000 36216007196
+36219000000 36219007175
+36222000000 36222007183
+36225000000 36225007169
+36228000000 36228007173
+36231000000 36231007175
+36234000000 36234007165
+36237000000 36237007161
+36240000000 36240007169
+36243000000 36243007165
+36246000000 36246007171
+36249000000 36249007162
+36252000000 36252007178
+36255000000 36255007148
+36258000000 36258007169
+36261000000 36261007164
+36264000000 36264007173
+36267000000 36267007162
+36270000000 36270007186
+36273000000 36273007167
+36276000000 36276007152
+36279000000 36279007166
+36282000000 36282007169
+36285000000 36285007172
+36288000000 36288007173
+36291000000 36291007183
+36294000000 36294007172
+36297000000 36297007176
+36300000000 36300007167
+36303000000 36303007165
+36306000000 36306007167
+36309000000 36309007166
+36312000000 36312007132
+36315000000 36315007162
+36318000000 36318007156
+36321000000 36321007172
+36324000000 36324007148
+36327000000 36327007160
+36330000000 36330007173
+36333000000 36333007175
+36336000000 36336007164
+36339000000 36339007106
+36342000000 36342007104
+36345000000 36345007176
+36348000000 36348007091
+36351000000 36351007165
+36354000000 36354007177
+36357000000 36357007169
+36360000000 36360007169
+36363000000 36363007128
+36366000000 36366007153
+36369000000 36369007076
+36372000000 36372007157
+36375000000 36375007169
+36378000000 36378007172
+36381000000 36381007139
+36384000000 36384007150
+36387000000 36387007168
+36390000000 36390007164
+36393000000 36393007172
+36396000000 36396007171
+36399000000 36399007165
+36402000000 36402007190
+36405000000 36405007169
+36408000000 36408007173
+36411000000 36411007158
+36414000000 36414007156
+36417000000 36417007127
+36420000000 36420007157
+36423000000 36423007165
+36426000000 36426007182
+36429000000 36429007172
+36432000000 36432007122
+36435000000 36435007176
+36438000000 36438007170
+36441000000 36441007164
+36444000000 36444007164
+36447000000 36447007178
+36450000000 36450007169
+36453000000 36453007175
+36456000000 36456007164
+36459000000 36459007114
+36462000000 36462007173
+36465000000 36465007169
+36468000000 36468007156
+36471000000 36471007167
+36474000000 36474007085
+36477000000 36477007168
+36480000000 36480007160
+36483000000 36483007161
+36486000000 36486007172
+36489000000 36489007172
+36492000000 36492007126
+36495000000 36495007181
+36498000000 36498007146
+36501000000 36501007174
+36504000000 36504007173
+36507000000 36507007167
+36510000000 36510007122
+36513000000 36513007191
+36516000000 36516007170
+36519000000 36519007178
+36522000000 36522007164
+36525000000 36525007168
+36528000000 36528007170
+36531000000 36531007160
+36534000000 36534007156
+36537000000 36537007164
+36540000000 36540007160
+36543000000 36543007166
+36546000000 36546007157
+36549000000 36549007173
+36552000000 36552007143
+36555000000 36555007164
+36558000000 36558007159
+36561000000 36561007168
+36564000000 36564007157
+36567000000 36567007181
+36570000000 36570007162
+36573000000 36573007147
+36576000000 36576007161
+36579000000 36579007164
+36582000000 36582007167
+36585000000 36585007168
+36588000000 36588007178
+36591000000 36591007167
+36594000000 36594007171
+36597000000 36597007162
+36600000000 36600007160
+36603000000 36603007162
+36606000000 36606007161
+36609000000 36609007127
+36612000000 36612007157
+36615000000 36615007151
+36618000000 36618007167
+36621000000 36621007143
+36624000000 36624007155
+36627000000 36627007168
+36630000000 36630007170
+36633000000 36633007159
+36636000000 36636007101
+36639000000 36639007099
+36642000000 36642007171
+36645000000 36645007086
+36648000000 36648007160
+36651000000 36651007172
+36654000000 36654007164
+36657000000 36657007164
+36660000000 36660007123
+36663000000 36663007148
+36666000000 36666007071
+36669000000 36669007152
+36672000000 36672007164
+36675000000 36675007167
+36678000000 36678007134
+36681000000 36681007145
+36684000000 36684007163
+36687000000 36687007159
+36690000000 36690007167
+36693000000 36693007166
+36696000000 36696007160
+36699000000 36699007185
+36702000000 36702007164
+36705000000 36705007168
+36708000000 36708007153
+36711000000 36711007151
+36714000000 36714007122
+36717000000 36717007152
+36720000000 36720007160
+36723000000 36723007177
+36726000000 36726007167
+36729000000 36729007117
+36732000000 36732007171
+36735000000 36735007165
+36738000000 36738007159
+36741000000 36741007159
+36744000000 36744007173
+36747000000 36747007164
+36750000000 36750007170
+36753000000 36753007159
+36756000000 36756007109
+36759000000 36759007168
+36762000000 36762007164
+36765000000 36765007151
+36768000000 36768007162
+36771000000 36771007080
+36774000000 36774007163
+36777000000 36777007155
+36780000000 36780007156
+36783000000 36783007167
+36786000000 36786007167
+36789000000 36789007121
+36792000000 36792007176
+36795000000 36795007141
+36798000000 36798007169
+36801000000 36801007168
+36804000000 36804007162
+36807000000 36807007117
+36810000000 36810007186
+36813000000 36813007165
+36816000000 36816007173
+36819000000 36819007159
+36822000000 36822007163
+36825000000 36825007165
+36828000000 36828007155
+36831000000 36831007151
+36834000000 36834007159
+36837000000 36837007155
+36840000000 36840007161
+36843000000 36843007152
+36846000000 36846007168
+36849000000 36849007138
+36852000000 36852007159
+36855000000 36855007154
+36858000000 36858007163
+36861000000 36861007152
+36864000000 36864007176
+36867000000 36867007157
+36870000000 36870007142
+36873000000 36873007156
+36876000000 36876007159
+36879000000 36879007162
+36882000000 36882007163
+36885000000 36885007173
+36888000000 36888007162
+36891000000 36891007166
+36894000000 36894007157
+36897000000 36897007155
+36900000000 36900007157
+36903000000 36903007156
+36906000000 36906007122
+36909000000 36909007152
+36912000000 36912007146
+36915000000 36915007162
+36918000000 36918007138
+36921000000 36921007150
+36924000000 36924007163
+36927000000 36927007165
+36930000000 36930007154
+36933000000 36933007096
+36936000000 36936007094
+36939000000 36939007166
+36942000000 36942007081
+36945000000 36945007155
+36948000000 36948007167
+36951000000 36951007159
+36954000000 36954007159
+36957000000 36957007118
+36960000000 36960007143
+36963000000 36963007066
+36966000000 36966007147
+36969000000 36969007159
+36972000000 36972007162
+36975000000 36975007129
+36978000000 36978007140
+36981000000 36981007158
+36984000000 36984007154
+36987000000 36987007162
+36990000000 36990007161
+36993000000 36993007155
+36996000000 36996007180
+36999000000 36999007159
+37002000000 37002007163
+37005000000 37005007148
+37008000000 37008007146
+37011000000 37011007117
+37014000000 37014007147
+37017000000 37017007155
+37020000000 37020007172
+37023000000 37023007162
+37026000000 37026007112
+37029000000 37029007166
+37032000000 37032007160
+37035000000 37035007154
+37038000000 37038007154
+37041000000 37041007168
+37044000000 37044007159
+37047000000 37047007165
+37050000000 37050007154
+37053000000 37053007104
+37056000000 37056007163
+37059000000 37059007159
+37062000000 37062007146
+37065000000 37065007157
+37068000000 37068007075
+37071000000 37071007158
+37074000000 37074007150
+37077000000 37077007151
+37080000000 37080007162
+37083000000 37083007162
+37086000000 37086007116
+37089000000 37089007171
+37092000000 37092007136
+37095000000 37095007164
+37098000000 37098007163
+37101000000 37101007157
+37104000000 37104007112
+37107000000 37107007181
+37110000000 37110007160
+37113000000 37113007168
+37116000000 37116007154
+37119000000 37119007158
+37122000000 37122007160
+37125000000 37125007150
+37128000000 37128007146
+37131000000 37131007154
+37134000000 37134007150
+37137000000 37137007156
+37140000000 37140007147
+37143000000 37143007163
+37146000000 37146007133
+37149000000 37149007154
+37152000000 37152007149
+37155000000 37155007158
+37158000000 37158007147
+37161000000 37161007171
+37164000000 37164007152
+37167000000 37167007137
+37170000000 37170007151
+37173000000 37173007154
+37176000000 37176007157
+37179000000 37179007158
+37182000000 37182007168
+37185000000 37185007157
+37188000000 37188007161
+37191000000 37191007152
+37194000000 37194007150
+37197000000 37197007152
+37200000000 37200007151
+37203000000 37203007117
+37206000000 37206007147
+37209000000 37209007141
+37212000000 37212007157
+37215000000 37215007133
+37218000000 37218007145
+37221000000 37221007158
+37224000000 37224007160
+37227000000 37227007149
+37230000000 37230007091
+37233000000 37233007089
+37236000000 37236007161
+37239000000 37239007076
+37242000000 37242007150
+37245000000 37245007162
+37248000000 37248007154
+37251000000 37251007154
+37254000000 37254007113
+37257000000 37257007138
+37260000000 37260007061
+37263000000 37263007142
+37266000000 37266007154
+37269000000 37269007157
+37272000000 37272007124
+37275000000 37275007135
+37278000000 37278007153
+37281000000 37281007149
+37284000000 37284007157
+37287000000 37287007156
+37290000000 37290007150
+37293000000 37293007175
+37296000000 37296007154
+37299000000 37299007158
+37302000000 37302007143
+37305000000 37305007141
+37308000000 37308007112
+37311000000 37311007142
+37314000000 37314007150
+37317000000 37317007167
+37320000000 37320007157
+37323000000 37323007107
+37326000000 37326007161
+37329000000 37329007155
+37332000000 37332007149
+37335000000 37335007149
+37338000000 37338007163
+37341000000 37341007154
+37344000000 37344007160
+37347000000 37347007149
+37350000000 37350007099
+37353000000 37353007158
+37356000000 37356007154
+37359000000 37359007141
+37362000000 37362007152
+37365000000 37365007070
+37368000000 37368007153
+37371000000 37371007145
+37374000000 37374007146
+37377000000 37377007157
+37380000000 37380007157
+37383000000 37383007111
+37386000000 37386007166
+37389000000 37389007131
+37392000000 37392007159
+37395000000 37395007158
+37398000000 37398007152
+37401000000 37401007107
+37404000000 37404007176
+37407000000 37407007155
+37410000000 37410007163
+37413000000 37413007149
+37416000000 37416007153
+37419000000 37419007155
+37422000000 37422007145
+37425000000 37425007141
+37428000000 37428007149
+37431000000 37431007145
+37434000000 37434007151
+37437000000 37437007142
+37440000000 37440007158
+37443000000 37443007128
+37446000000 37446007149
+37449000000 37449007144
+37452000000 37452007153
+37455000000 37455007142
+37458000000 37458007166
+37461000000 37461007147
+37464000000 37464007132
+37467000000 37467007146
+37470000000 37470007149
+37473000000 37473007152
+37476000000 37476007153
+37479000000 37479007163
+37482000000 37482007152
+37485000000 37485007156
+37488000000 37488007147
+37491000000 37491007145
+37494000000 37494007147
+37497000000 37497007146
+37500000000 37500007112
+37503000000 37503007142
+37506000000 37506007136
+37509000000 37509007152
+37512000000 37512007128
+37515000000 37515007140
+37518000000 37518007153
+37521000000 37521007155
+37524000000 37524007144
+37527000000 37527007086
+37530000000 37530007084
+37533000000 37533007156
+37536000000 37536007071
+37539000000 37539007145
+37542000000 37542007157
+37545000000 37545007149
+37548000000 37548007149
+37551000000 37551007108
+37554000000 37554007133
+37557000000 37557007056
+37560000000 37560007137
+37563000000 37563007149
+37566000000 37566007152
+37569000000 37569007119
+37572000000 37572007130
+37575000000 37575007148
+37578000000 37578007144
+37581000000 37581007152
+37584000000 37584007151
+37587000000 37587007145
+37590000000 37590007170
+37593000000 37593007149
+37596000000 37596007153
+37599000000 37599007138
+37602000000 37602007136
+37605000000 37605007107
+37608000000 37608007137
+37611000000 37611007145
+37614000000 37614007162
+37617000000 37617007152
+37620000000 37620007102
+37623000000 37623007156
+37626000000 37626007150
+37629000000 37629007144
+37632000000 37632007144
+37635000000 37635007158
+37638000000 37638007149
+37641000000 37641007155
+37644000000 37644007144
+37647000000 37647007094
+37650000000 37650007153
+37653000000 37653007149
+37656000000 37656007136
+37659000000 37659007147
+37662000000 37662007065
+37665000000 37665007148
+37668000000 37668007140
+37671000000 37671007141
+37674000000 37674007152
+37677000000 37677007152
+37680000000 37680007106
+37683000000 37683007161
+37686000000 37686007126
+37689000000 37689007154
+37692000000 37692007153
+37695000000 37695007147
+37698000000 37698007102
+37701000000 37701007171
+37704000000 37704007150
+37707000000 37707007158
+37710000000 37710007144
+37713000000 37713007148
+37716000000 37716007150
+37719000000 37719007140
+37722000000 37722007136
+37725000000 37725007144
+37728000000 37728007140
+37731000000 37731007146
+37734000000 37734007137
+37737000000 37737007153
+37740000000 37740007123
+37743000000 37743007144
+37746000000 37746007139
+37749000000 37749007148
+37752000000 37752007137
+37755000000 37755007161
+37758000000 37758007142
+37761000000 37761007127
+37764000000 37764007141
+37767000000 37767007144
+37770000000 37770007147
+37773000000 37773007148
+37776000000 37776007158
+37779000000 37779007147
+37782000000 37782007151
+37785000000 37785007142
+37788000000 37788007140
+37791000000 37791007142
+37794000000 37794007141
+37797000000 37797007107
+37800000000 37800007137
+37803000000 37803007131
+37806000000 37806007147
+37809000000 37809007123
+37812000000 37812007135
+37815000000 37815007148
+37818000000 37818007150
+37821000000 37821007139
+37824000000 37824007081
+37827000000 37827007079
+37830000000 37830007151
+37833000000 37833007066
+37836000000 37836007140
+37839000000 37839007152
+37842000000 37842007144
+37845000000 37845007144
+37848000000 37848007103
+37851000000 37851007128
+37854000000 37854007051
+37857000000 37857007132
+37860000000 37860007144
+37863000000 37863007147
+37866000000 37866007114
+37869000000 37869007125
+37872000000 37872007143
+37875000000 37875007139
+37878000000 37878007147
+37881000000 37881007146
+37884000000 37884007140
+37887000000 37887007165
+37890000000 37890007144
+37893000000 37893007148
+37896000000 37896007133
+37899000000 37899007131
+37902000000 37902007102
+37905000000 37905007132
+37908000000 37908007140
+37911000000 37911007157
+37914000000 37914007147
+37917000000 37917007097
+37920000000 37920007151
+37923000000 37923007145
+37926000000 37926007139
+37929000000 37929007139
+37932000000 37932007153
+37935000000 37935007144
+37938000000 37938007150
+37941000000 37941007139
+37944000000 37944007089
+37947000000 37947007148
+37950000000 37950007144
+37953000000 37953007131
+37956000000 37956007142
+37959000000 37959007060
+37962000000 37962007143
+37965000000 37965007135
+37968000000 37968007136
+37971000000 37971007147
+37974000000 37974007147
+37977000000 37977007101
+37980000000 37980007156
+37983000000 37983007121
+37986000000 37986007149
+37989000000 37989007148
+37992000000 37992007142
+37995000000 37995007097
+37998000000 37998007166
+38001000000 38001007145
+38004000000 38004007153
+38007000000 38007007139
+38010000000 38010007143
+38013000000 38013007145
+38016000000 38016007135
+38019000000 38019007131
+38022000000 38022007139
+38025000000 38025007135
+38028000000 38028007141
+38031000000 38031007132
+38034000000 38034007148
+38037000000 38037007118
+38040000000 38040007139
+38043000000 38043007134
+38046000000 38046007143
+38049000000 38049007132
+38052000000 38052007156
+38055000000 38055007137
+38058000000 38058007122
+38061000000 38061007136
+38064000000 38064007139
+38067000000 38067007142
+38070000000 38070007143
+38073000000 38073007153
+38076000000 38076007142
+38079000000 38079007146
+38082000000 38082007137
+38085000000 38085007135
+38088000000 38088007137
+38091000000 38091007136
+38094000000 38094007102
+38097000000 38097007132
+38100000000 38100007126
+38103000000 38103007142
+38106000000 38106007118
+38109000000 38109007130
+38112000000 38112007143
+38115000000 38115007145
+38118000000 38118007134
+38121000000 38121007076
+38124000000 38124007074
+38127000000 38127007146
+38130000000 38130007061
+38133000000 38133007135
+38136000000 38136007147
+38139000000 38139007139
+38142000000 38142007139
+38145000000 38145007098
+38148000000 38148007123
+38151000000 38151007046
+38154000000 38154007127
+38157000000 38157007139
+38160000000 38160007142
+38163000000 38163007109
+38166000000 38166007120
+38169000000 38169007138
+38172000000 38172007134
+38175000000 38175007142
+38178000000 38178007141
+38181000000 38181007135
+38184000000 38184007160
+38187000000 38187007139
+38190000000 38190007143
+38193000000 38193007128
+38196000000 38196007126
+38199000000 38199007097
+38202000000 38202007127
+38205000000 38205007135
+38208000000 38208007152
+38211000000 38211007142
+38214000000 38214007092
+38217000000 38217007146
+38220000000 38220007140
+38223000000 38223007134
+38226000000 38226007134
+38229000000 38229007148
+38232000000 38232007139
+38235000000 38235007145
+38238000000 38238007134
+38241000000 38241007084
+38244000000 38244007143
+38247000000 38247007139
+38250000000 38250007126
+38253000000 38253007137
+38256000000 38256007055
+38259000000 38259007138
+38262000000 38262007130
+38265000000 38265007131
+38268000000 38268007142
+38271000000 38271007142
+38274000000 38274007096
+38277000000 38277007151
+38280000000 38280007116
+38283000000 38283007144
+38286000000 38286007143
+38289000000 38289007137
+38292000000 38292007092
+38295000000 38295007161
+38298000000 38298007140
+38301000000 38301007148
+38304000000 38304007134
+38307000000 38307007138
+38310000000 38310007140
+38313000000 38313007130
+38316000000 38316007126
+38319000000 38319007134
+38322000000 38322007130
+38325000000 38325007136
+38328000000 38328007127
+38331000000 38331007143
+38334000000 38334007113
+38337000000 38337007134
+38340000000 38340007129
+38343000000 38343007138
+38346000000 38346007127
+38349000000 38349007151
+38352000000 38352007132
+38355000000 38355007117
+38358000000 38358007131
+38361000000 38361007134
+38364000000 38364007137
+38367000000 38367007138
+38370000000 38370007148
+38373000000 38373007137
+38376000000 38376007141
+38379000000 38379007132
+38382000000 38382007130
+38385000000 38385007132
+38388000000 38388007131
+38391000000 38391007097
+38394000000 38394007127
+38397000000 38397007121
+38400000000 38400007137
+38403000000 38403007113
+38406000000 38406007125
+38409000000 38409007138
+38412000000 38412007140
+38415000000 38415007129
+38418000000 38418007071
+38421000000 38421007069
+38424000000 38424007141
+38427000000 38427007056
+38430000000 38430007130
+38433000000 38433007142
+38436000000 38436007134
+38439000000 38439007134
+38442000000 38442007093
+38445000000 38445007118
+38448000000 38448007041
+38451000000 38451007122
+38454000000 38454007134
+38457000000 38457007137
+38460000000 38460007104
+38463000000 38463007115
+38466000000 38466007133
+38469000000 38469007129
+38472000000 38472007137
+38475000000 38475007136
+38478000000 38478007130
+38481000000 38481007155
+38484000000 38484007134
+38487000000 38487007138
+38490000000 38490007123
+38493000000 38493007121
+38496000000 38496007092
+38499000000 38499007122
+38502000000 38502007130
+38505000000 38505007147
+38508000000 38508007137
+38511000000 38511007087
+38514000000 38514007141
+38517000000 38517007135
+38520000000 38520007129
+38523000000 38523007129
+38526000000 38526007143
+38529000000 38529007134
+38532000000 38532007140
+38535000000 38535007129
+38538000000 38538007079
+38541000000 38541007138
+38544000000 38544007134
+38547000000 38547007121
+38550000000 38550007132
+38553000000 38553007050
+38556000000 38556007133
+38559000000 38559007125
+38562000000 38562007126
+38565000000 38565007137
+38568000000 38568007137
+38571000000 38571007091
+38574000000 38574007146
+38577000000 38577007111
+38580000000 38580007139
+38583000000 38583007138
+38586000000 38586007132
+38589000000 38589007087
+38592000000 38592007156
+38595000000 38595007135
+38598000000 38598007143
+38601000000 38601007129
+38604000000 38604007133
+38607000000 38607007135
+38610000000 38610007125
+38613000000 38613007121
+38616000000 38616007129
+38619000000 38619007125
+38622000000 38622007131
+38625000000 38625007122
+38628000000 38628007138
+38631000000 38631007108
+38634000000 38634007129
+38637000000 38637007124
+38640000000 38640007133
+38643000000 38643007122
+38646000000 38646007146
+38649000000 38649007127
+38652000000 38652007112
+38655000000 38655007126
+38658000000 38658007129
+38661000000 38661007132
+38664000000 38664007133
+38667000000 38667007143
+38670000000 38670007132
+38673000000 38673007136
+38676000000 38676007127
+38679000000 38679007125
+38682000000 38682007127
+38685000000 38685007126
+38688000000 38688007092
+38691000000 38691007122
+38694000000 38694007116
+38697000000 38697007132
+38700000000 38700007108
+38703000000 38703007120
+38706000000 38706007133
+38709000000 38709007135
+38712000000 38712007124
+38715000000 38715007066
+38718000000 38718007064
+38721000000 38721007136
+38724000000 38724007051
+38727000000 38727007125
+38730000000 38730007137
+38733000000 38733007129
+38736000000 38736007129
+38739000000 38739007088
+38742000000 38742007113
+38745000000 38745007036
+38748000000 38748007117
+38751000000 38751007129
+38754000000 38754007132
+38757000000 38757007099
+38760000000 38760007110
+38763000000 38763007128
+38766000000 38766007124
+38769000000 38769007132
+38772000000 38772007131
+38775000000 38775007125
+38778000000 38778007150
+38781000000 38781007129
+38784000000 38784007133
+38787000000 38787007118
+38790000000 38790007116
+38793000000 38793007087
+38796000000 38796007117
+38799000000 38799007125
+38802000000 38802007142
+38805000000 38805007132
+38808000000 38808007082
+38811000000 38811007136
+38814000000 38814007130
+38817000000 38817007124
+38820000000 38820007124
+38823000000 38823007138
+38826000000 38826007129
+38829000000 38829007135
+38832000000 38832007124
+38835000000 38835007074
+38838000000 38838007133
+38841000000 38841007129
+38844000000 38844007116
+38847000000 38847007127
+38850000000 38850007045
+38853000000 38853007128
+38856000000 38856007120
+38859000000 38859007121
+38862000000 38862007132
+38865000000 38865007132
+38868000000 38868007086
+38871000000 38871007141
+38874000000 38874007106
+38877000000 38877007134
+38880000000 38880007133
+38883000000 38883007127
+38886000000 38886007082
+38889000000 38889007151
+38892000000 38892007130
+38895000000 38895007138
+38898000000 38898007124
+38901000000 38901007128
+38904000000 38904007130
+38907000000 38907007120
+38910000000 38910007116
+38913000000 38913007124
+38916000000 38916007120
+38919000000 38919007126
+38922000000 38922007117
+38925000000 38925007133
+38928000000 38928007103
+38931000000 38931007124
+38934000000 38934007119
+38937000000 38937007128
+38940000000 38940007117
+38943000000 38943007141
+38946000000 38946007122
+38949000000 38949007107
+38952000000 38952007121
+38955000000 38955007124
+38958000000 38958007127
+38961000000 38961007128
+38964000000 38964007138
+38967000000 38967007127
+38970000000 38970007131
+38973000000 38973007122
+38976000000 38976007120
+38979000000 38979007122
+38982000000 38982007121
+38985000000 38985007087
+38988000000 38988007117
+38991000000 38991007111
+38994000000 38994007127
+38997000000 38997007103
+39000000000 39000007115
+39003000000 39003007128
+39006000000 39006007130
+39009000000 39009007119
+39012000000 39012007061
+39015000000 39015007059
+39018000000 39018007131
+39021000000 39021007046
+39024000000 39024007120
+39027000000 39027007132
+39030000000 39030007124
+39033000000 39033007124
+39036000000 39036007083
+39039000000 39039007108
+39042000000 39042007031
+39045000000 39045007112
+39048000000 39048007124
+39051000000 39051007127
+39054000000 39054007094
+39057000000 39057007105
+39060000000 39060007123
+39063000000 39063007119
+39066000000 39066007127
+39069000000 39069007126
+39072000000 39072007120
+39075000000 39075007145
+39078000000 39078007124
+39081000000 39081007128
+39084000000 39084007113
+39087000000 39087007111
+39090000000 39090007082
+39093000000 39093007112
+39096000000 39096007120
+39099000000 39099007137
+39102000000 39102007127
+39105000000 39105007077
+39108000000 39108007131
+39111000000 39111007125
+39114000000 39114007119
+39117000000 39117007119
+39120000000 39120007133
+39123000000 39123007124
+39126000000 39126007130
+39129000000 39129007119
+39132000000 39132007069
+39135000000 39135007128
+39138000000 39138007124
+39141000000 39141007111
+39144000000 39144007122
+39147000000 39147007040
+39150000000 39150007123
+39153000000 39153007115
+39156000000 39156007116
+39159000000 39159007127
+39162000000 39162007127
+39165000000 39165007081
+39168000000 39168007136
+39171000000 39171007101
+39174000000 39174007129
+39177000000 39177007128
+39180000000 39180007122
+39183000000 39183007077
+39186000000 39186007146
+39189000000 39189007125
+39192000000 39192007133
+39195000000 39195007119
+39198000000 39198007123
+39201000000 39201007125
+39204000000 39204007115
+39207000000 39207007111
+39210000000 39210007119
+39213000000 39213007115
+39216000000 39216007121
+39219000000 39219007112
+39222000000 39222007128
+39225000000 39225007098
+39228000000 39228007119
+39231000000 39231007114
+39234000000 39234007123
+39237000000 39237007112
+39240000000 39240007136
+39243000000 39243007117
+39246000000 39246007102
+39249000000 39249007116
+39252000000 39252007119
+39255000000 39255007122
+39258000000 39258007123
+39261000000 39261007133
+39264000000 39264007122
+39267000000 39267007126
+39270000000 39270007117
+39273000000 39273007115
+39276000000 39276007117
+39279000000 39279007116
+39282000000 39282007082
+39285000000 39285007112
+39288000000 39288007106
+39291000000 39291007122
+39294000000 39294007098
+39297000000 39297007110
+39300000000 39300007123
+39303000000 39303007125
+39306000000 39306007114
+39309000000 39309007056
+39312000000 39312007054
+39315000000 39315007126
+39318000000 39318007041
+39321000000 39321007115
+39324000000 39324007127
+39327000000 39327007119
+39330000000 39330007119
+39333000000 39333007078
+39336000000 39336007103
+39339000000 39339007026
+39342000000 39342007107
+39345000000 39345007119
+39348000000 39348007122
+39351000000 39351007089
+39354000000 39354007100
+39357000000 39357007118
+39360000000 39360007114
+39363000000 39363007122
+39366000000 39366007121
+39369000000 39369007115
+39372000000 39372007140
+39375000000 39375007119
+39378000000 39378007123
+39381000000 39381007108
+39384000000 39384007106
+39387000000 39387007077
+39390000000 39390007107
+39393000000 39393007115
+39396000000 39396007132
+39399000000 39399007122
+39402000000 39402007072
+39405000000 39405007126
+39408000000 39408007120
+39411000000 39411007114
+39414000000 39414007114
+39417000000 39417007128
+39420000000 39420007119
+39423000000 39423007125
+39426000000 39426007114
+39429000000 39429007064
+39432000000 39432007123
+39435000000 39435007119
+39438000000 39438007106
+39441000000 39441007117
+39444000000 39444007035
+39447000000 39447007118
+39450000000 39450007110
+39453000000 39453007111
+39456000000 39456007122
+39459000000 39459007122
+39462000000 39462007076
+39465000000 39465007131
+39468000000 39468007096
+39471000000 39471007124
+39474000000 39474007123
+39477000000 39477007117
+39480000000 39480007072
+39483000000 39483007141
+39486000000 39486007120
+39489000000 39489007128
+39492000000 39492007114
+39495000000 39495007118
+39498000000 39498007120
+39501000000 39501007110
+39504000000 39504007106
+39507000000 39507007114
+39510000000 39510007110
+39513000000 39513007116
+39516000000 39516007107
+39519000000 39519007123
+39522000000 39522007093
+39525000000 39525007114
+39528000000 39528007109
+39531000000 39531007118
+39534000000 39534007107
+39537000000 39537007131
+39540000000 39540007112
+39543000000 39543007097
+39546000000 39546007111
+39549000000 39549007114
+39552000000 39552007117
+39555000000 39555007118
+39558000000 39558007128
+39561000000 39561007117
+39564000000 39564007121
+39567000000 39567007112
+39570000000 39570007110
+39573000000 39573007112
+39576000000 39576007111
+39579000000 39579007077
+39582000000 39582007107
+39585000000 39585007101
+39588000000 39588007117
+39591000000 39591007093
+39594000000 39594007105
+39597000000 39597007118
+39600000000 39600007120
+39603000000 39603007109
+39606000000 39606007051
+39609000000 39609007049
+39612000000 39612007121
+39615000000 39615007036
+39618000000 39618007110
+39621000000 39621007122
+39624000000 39624007114
+39627000000 39627007114
+39630000000 39630007073
+39633000000 39633007098
+39636000000 39636007021
+39639000000 39639007102
+39642000000 39642007114
+39645000000 39645007117
+39648000000 39648007084
+39651000000 39651007095
+39654000000 39654007113
+39657000000 39657007109
+39660000000 39660007117
+39663000000 39663007116
+39666000000 39666007110
+39669000000 39669007135
+39672000000 39672007114
+39675000000 39675007118
+39678000000 39678007103
+39681000000 39681007101
+39684000000 39684007072
+39687000000 39687007102
+39690000000 39690007110
+39693000000 39693007127
+39696000000 39696007117
+39699000000 39699007067
+39702000000 39702007121
+39705000000 39705007115
+39708000000 39708007109
+39711000000 39711007109
+39714000000 39714007123
+39717000000 39717007114
+39720000000 39720007120
+39723000000 39723007109
+39726000000 39726007059
+39729000000 39729007118
+39732000000 39732007114
+39735000000 39735007101
+39738000000 39738007112
+39741000000 39741007030
+39744000000 39744007113
+39747000000 39747007105
+39750000000 39750007106
+39753000000 39753007117
+39756000000 39756007117
+39759000000 39759007071
+39762000000 39762007126
+39765000000 39765007091
+39768000000 39768007119
+39771000000 39771007118
+39774000000 39774007112
+39777000000 39777007067
+39780000000 39780007136
+39783000000 39783007115
+39786000000 39786007123
+39789000000 39789007109
+39792000000 39792007113
+39795000000 39795007115
+39798000000 39798007105
+39801000000 39801007101
+39804000000 39804007109
+39807000000 39807007105
+39810000000 39810007111
+39813000000 39813007102
+39816000000 39816007118
+39819000000 39819007088
+39822000000 39822007109
+39825000000 39825007104
+39828000000 39828007113
+39831000000 39831007102
+39834000000 39834007126
+39837000000 39837007107
+39840000000 39840007092
+39843000000 39843007106
+39846000000 39846007109
+39849000000 39849007112
+39852000000 39852007113
+39855000000 39855007123
+39858000000 39858007112
+39861000000 39861007116
+39864000000 39864007107
+39867000000 39867007105
+39870000000 39870007107
+39873000000 39873007106
+39876000000 39876007072
+39879000000 39879007102
+39882000000 39882007096
+39885000000 39885007112
+39888000000 39888007088
+39891000000 39891007100
+39894000000 39894007113
+39897000000 39897007115
+39900000000 39900007104
+39903000000 39903007046
+39906000000 39906007044
+39909000000 39909007116
+39912000000 39912007031
+39915000000 39915007105
+39918000000 39918007117
+39921000000 39921007109
+39924000000 39924007109
+39927000000 39927007068
+39930000000 39930007093
+39933000000 39933007016
+39936000000 39936007097
+39939000000 39939007109
+39942000000 39942007112
+39945000000 39945007079
+39948000000 39948007090
+39951000000 39951007108
+39954000000 39954007104
+39957000000 39957007112
+39960000000 39960007111
+39963000000 39963007105
+39966000000 39966007130
+39969000000 39969007109
+39972000000 39972007113
+39975000000 39975007098
+39978000000 39978007096
+39981000000 39981007067
+39984000000 39984007097
+39987000000 39987007105
+39990000000 39990007122
+39993000000 39993007112
+39996000000 39996007062
+39999000000 39999007116
+40002000000 40002007110
+40005000000 40005007104
+40008000000 40008007104
+40011000000 40011007118
+40014000000 40014007109
+40017000000 40017007115
+40020000000 40020007104
+40023000000 40023007054
+40026000000 40026007113
+40029000000 40029007109
+40032000000 40032007096
+40035000000 40035007107
+40038000000 40038007025
+40041000000 40041007108
+40044000000 40044007100
+40047000000 40047007101
+40050000000 40050007112
+40053000000 40053007112
+40056000000 40056007066
+40059000000 40059007121
+40062000000 40062007086
+40065000000 40065007114
+40068000000 40068007113
+40071000000 40071007107
+40074000000 40074007062
+40077000000 40077007131
+40080000000 40080007110
+40083000000 40083007118
+40086000000 40086007104
+40089000000 40089007108
+40092000000 40092007110
+40095000000 40095007100
+40098000000 40098007096
+40101000000 40101007104
+40104000000 40104007100
+40107000000 40107007106
+40110000000 40110007097
+40113000000 40113007113
+40116000000 40116007083
+40119000000 40119007104
+40122000000 40122007099
+40125000000 40125007108
+40128000000 40128007097
+40131000000 40131007121
+40134000000 40134007102
+40137000000 40137007087
+40140000000 40140007101
+40143000000 40143007104
+40146000000 40146007107
+40149000000 40149007108
+40152000000 40152007118
+40155000000 40155007107
+40158000000 40158007111
+40161000000 40161007102
+40164000000 40164007100
+40167000000 40167007102
+40170000000 40170007101
+40173000000 40173007067
+40176000000 40176007097
+40179000000 40179007091
+40182000000 40182007107
+40185000000 40185007083
+40188000000 40188007095
+40191000000 40191007108
+40194000000 40194007110
+40197000000 40197007099
+40200000000 40200007041
+40203000000 40203007039
+40206000000 40206007111
+40209000000 40209007026
+40212000000 40212007100
+40215000000 40215007112
+40218000000 40218007104
+40221000000 40221007104
+40224000000 40224007063
+40227000000 40227007088
+40230000000 40230007011
+40233000000 40233007092
+40236000000 40236007104
+40239000000 40239007107
+40242000000 40242007074
+40245000000 40245007085
+40248000000 40248007103
+40251000000 40251007099
+40254000000 40254007107
+40257000000 40257007106
+40260000000 40260007100
+40263000000 40263007125
+40266000000 40266007104
+40269000000 40269007108
+40272000000 40272007093
+40275000000 40275007091
+40278000000 40278007062
+40281000000 40281007092
+40284000000 40284007100
+40287000000 40287007117
+40290000000 40290007107
+40293000000 40293007057
+40296000000 40296007111
+40299000000 40299007105
+40302000000 40302007099
+40305000000 40305007099
+40308000000 40308007113
+40311000000 40311007104
+40314000000 40314007110
+40317000000 40317007099
+40320000000 40320007049
+40323000000 40323007108
+40326000000 40326007104
+40329000000 40329007091
+40332000000 40332007102
+40335000000 40335007020
+40338000000 40338007103
+40341000000 40341007095
+40344000000 40344007096
+40347000000 40347007107
+40350000000 40350007107
+40353000000 40353007061
+40356000000 40356007116
+40359000000 40359007081
+40362000000 40362007109
+40365000000 40365007108
+40368000000 40368007102
+40371000000 40371007057
+40374000000 40374007126
+40377000000 40377007105
+40380000000 40380007113
+40383000000 40383007099
+40386000000 40386007103
+40389000000 40389007105
+40392000000 40392007095
+40395000000 40395007091
+40398000000 40398007099
+40401000000 40401007095
+40404000000 40404007101
+40407000000 40407007092
+40410000000 40410007108
+40413000000 40413007078
+40416000000 40416007099
+40419000000 40419007094
+40422000000 40422007103
+40425000000 40425007092
+40428000000 40428007116
+40431000000 40431007097
+40434000000 40434007082
+40437000000 40437007096
+40440000000 40440007099
+40443000000 40443007102
+40446000000 40446007103
+40449000000 40449007113
+40452000000 40452007102
+40455000000 40455007106
+40458000000 40458007097
+40461000000 40461007095
+40464000000 40464007097
+40467000000 40467007096
+40470000000 40470007062
+40473000000 40473007092
+40476000000 40476007086
+40479000000 40479007102
+40482000000 40482007078
+40485000000 40485007090
+40488000000 40488007103
+40491000000 40491007105
+40494000000 40494007094
+40497000000 40497007036
+40500000000 40500007034
+40503000000 40503007106
+40506000000 40506007021
+40509000000 40509007095
+40512000000 40512007107
+40515000000 40515007099
+40518000000 40518007099
+40521000000 40521007058
+40524000000 40524007083
+40527000000 40527007006
+40530000000 40530007087
+40533000000 40533007099
+40536000000 40536007102
+40539000000 40539007069
+40542000000 40542007080
+40545000000 40545007098
+40548000000 40548007094
+40551000000 40551007102
+40554000000 40554007101
+40557000000 40557007095
+40560000000 40560007120
+40563000000 40563007099
+40566000000 40566007103
+40569000000 40569007088
+40572000000 40572007086
+40575000000 40575007057
+40578000000 40578007087
+40581000000 40581007095
+40584000000 40584007112
+40587000000 40587007102
+40590000000 40590007052
+40593000000 40593007106
+40596000000 40596007100
+40599000000 40599007094
+40602000000 40602007094
+40605000000 40605007108
+40608000000 40608007099
+40611000000 40611007105
+40614000000 40614007094
+40617000000 40617007044
+40620000000 40620007103
+40623000000 40623007099
+40626000000 40626007086
+40629000000 40629007097
+40632000000 40632007015
+40635000000 40635007098
+40638000000 40638007090
+40641000000 40641007091
+40644000000 40644007102
+40647000000 40647007102
+40650000000 40650007056
+40653000000 40653007111
+40656000000 40656007076
+40659000000 40659007104
+40662000000 40662007103
+40665000000 40665007097
+40668000000 40668007052
+40671000000 40671007121
+40674000000 40674007100
+40677000000 40677007108
+40680000000 40680007094
+40683000000 40683007098
+40686000000 40686007100
+40689000000 40689007090
+40692000000 40692007086
+40695000000 40695007094
+40698000000 40698007090
+40701000000 40701007096
+40704000000 40704007087
+40707000000 40707007103
+40710000000 40710007073
+40713000000 40713007094
+40716000000 40716007089
+40719000000 40719007098
+40722000000 40722007087
+40725000000 40725007111
+40728000000 40728007092
+40731000000 40731007077
+40734000000 40734007091
+40737000000 40737007094
+40740000000 40740007097
+40743000000 40743007098
+40746000000 40746007108
+40749000000 40749007097
+40752000000 40752007101
+40755000000 40755007092
+40758000000 40758007090
+40761000000 40761007092
+40764000000 40764007091
+40767000000 40767007057
+40770000000 40770007087
+40773000000 40773007081
+40776000000 40776007097
+40779000000 40779007073
+40782000000 40782007085
+40785000000 40785007098
+40788000000 40788007100
+40791000000 40791007089
+40794000000 40794007031
+40797000000 40797007029
+40800000000 40800007101
+40803000000 40803007016
+40806000000 40806007090
+40809000000 40809007102
+40812000000 40812007094
+40815000000 40815007094
+40818000000 40818007053
+40821000000 40821007078
+40824000000 40824007001
+40827000000 40827007082
+40830000000 40830007094
+40833000000 40833007097
+40836000000 40836007064
+40839000000 40839007075
+40842000000 40842007093
+40845000000 40845007089
+40848000000 40848007097
+40851000000 40851007096
+40854000000 40854007090
+40857000000 40857007115
+40860000000 40860007094
+40863000000 40863007098
+40866000000 40866007083
+40869000000 40869007081
+40872000000 40872007052
+40875000000 40875007082
+40878000000 40878007090
+40881000000 40881007107
+40884000000 40884007097
+40887000000 40887007047
+40890000000 40890007101
+40893000000 40893007095
+40896000000 40896007089
+40899000000 40899007089
+40902000000 40902007103
+40905000000 40905007094
+40908000000 40908007100
+40911000000 40911007089
+40914000000 40914007039
+40917000000 40917007098
+40920000000 40920007094
+40923000000 40923007081
+40926000000 40926007092
+40929000000 40929007010
+40932000000 40932007093
+40935000000 40935007085
+40938000000 40938007086
+40941000000 40941007097
+40944000000 40944007097
+40947000000 40947007051
+40950000000 40950007106
+40953000000 40953007071
+40956000000 40956007099
+40959000000 40959007098
+40962000000 40962007092
+40965000000 40965007047
+40968000000 40968007116
+40971000000 40971007095
+40974000000 40974007103
+40977000000 40977007089
+40980000000 40980007093
+40983000000 40983007095
+40986000000 40986007085
+40989000000 40989007081
+40992000000 40992007089
+40995000000 40995007085
+40998000000 40998007091
+41001000000 41001007082
+41004000000 41004007098
+41007000000 41007007068
+41010000000 41010007089
+41013000000 41013007084
+41016000000 41016007093
+41019000000 41019007082
+41022000000 41022007106
+41025000000 41025007087
+41028000000 41028007072
+41031000000 41031007086
+41034000000 41034007089
+41037000000 41037007092
+41040000000 41040007093
+41043000000 41043007103
+41046000000 41046007092
+41049000000 41049007096
+41052000000 41052007087
+41055000000 41055007085
+41058000000 41058007087
+41061000000 41061007086
+41064000000 41064007052
+41067000000 41067007082
+41070000000 41070007076
+41073000000 41073007092
+41076000000 41076007068
+41079000000 41079007080
+41082000000 41082007093
+41085000000 41085007095
+41088000000 41088007084
+41091000000 41091007026
+41094000000 41094007024
+41097000000 41097007096
+41100000000 41100007011
+41103000000 41103007085
+41106000000 41106007097
+41109000000 41109007089
+41112000000 41112007089
+41115000000 41115007048
+41118000000 41118007073
+41121000000 41121006996
+41124000000 41124007077
+41127000000 41127007089
+41130000000 41130007092
+41133000000 41133007059
+41136000000 41136007070
+41139000000 41139007088
+41142000000 41142007084
+41145000000 41145007092
+41148000000 41148007091
+41151000000 41151007085
+41154000000 41154007110
+41157000000 41157007089
+41160000000 41160007093
+41163000000 41163007078
+41166000000 41166007076
+41169000000 41169007047
+41172000000 41172007077
+41175000000 41175007085
+41178000000 41178007102
+41181000000 41181007092
+41184000000 41184007042
+41187000000 41187007096
+41190000000 41190007090
+41193000000 41193007084
+41196000000 41196007084
+41199000000 41199007098
+41202000000 41202007089
+41205000000 41205007095
+41208000000 41208007084
+41211000000 41211007034
+41214000000 41214007093
+41217000000 41217007089
+41220000000 41220007076
+41223000000 41223007087
+41226000000 41226007005
+41229000000 41229007088
+41232000000 41232007080
+41235000000 41235007081
+41238000000 41238007092
+41241000000 41241007092
+41244000000 41244007046
+41247000000 41247007101
+41250000000 41250007066
+41253000000 41253007094
+41256000000 41256007093
+41259000000 41259007087
+41262000000 41262007042
+41265000000 41265007111
+41268000000 41268007090
+41271000000 41271007098
+41274000000 41274007084
+41277000000 41277007088
+41280000000 41280007090
+41283000000 41283007080
+41286000000 41286007076
+41289000000 41289007084
+41292000000 41292007080
+41295000000 41295007086
+41298000000 41298007077
+41301000000 41301007093
+41304000000 41304007063
+41307000000 41307007084
+41310000000 41310007079
+41313000000 41313007088
+41316000000 41316007077
+41319000000 41319007101
+41322000000 41322007082
+41325000000 41325007067
+41328000000 41328007081
+41331000000 41331007084
+41334000000 41334007087
+41337000000 41337007088
+41340000000 41340007098
+41343000000 41343007087
+41346000000 41346007091
+41349000000 41349007082
+41352000000 41352007080
+41355000000 41355007082
+41358000000 41358007081
+41361000000 41361007047
+41364000000 41364007077
+41367000000 41367007071
+41370000000 41370007087
+41373000000 41373007063
+41376000000 41376007075
+41379000000 41379007088
+41382000000 41382007090
+41385000000 41385007079
+41388000000 41388007021
+41391000000 41391007019
+41394000000 41394007091
+41397000000 41397007006
+41400000000 41400007080
+41403000000 41403007092
+41406000000 41406007084
+41409000000 41409007084
+41412000000 41412007043
+41415000000 41415007068
+41418000000 41418006991
+41421000000 41421007072
+41424000000 41424007084
+41427000000 41427007087
+41430000000 41430007054
+41433000000 41433007065
+41436000000 41436007083
+41439000000 41439007079
+41442000000 41442007087
+41445000000 41445007086
+41448000000 41448007080
+41451000000 41451007105
+41454000000 41454007084
+41457000000 41457007088
+41460000000 41460007073
+41463000000 41463007071
+41466000000 41466007042
+41469000000 41469007072
+41472000000 41472007080
+41475000000 41475007097
+41478000000 41478007087
+41481000000 41481007037
+41484000000 41484007091
+41487000000 41487007085
+41490000000 41490007079
+41493000000 41493007079
+41496000000 41496007093
+41499000000 41499007084
+41502000000 41502007090
+41505000000 41505007079
+41508000000 41508007029
+41511000000 41511007088
+41514000000 41514007084
+41517000000 41517007071
+41520000000 41520007082
+41523000000 41523007000
+41526000000 41526007083
+41529000000 41529007075
+41532000000 41532007076
+41535000000 41535007087
+41538000000 41538007087
+41541000000 41541007041
+41544000000 41544007096
+41547000000 41547007061
+41550000000 41550007089
+41553000000 41553007088
+41556000000 41556007082
+41559000000 41559007037
+41562000000 41562007106
+41565000000 41565007085
+41568000000 41568007093
+41571000000 41571007079
+41574000000 41574007083
+41577000000 41577007085
+41580000000 41580007075
+41583000000 41583007071
+41586000000 41586007079
+41589000000 41589007075
+41592000000 41592007081
+41595000000 41595007072
+41598000000 41598007088
+41601000000 41601007058
+41604000000 41604007079
+41607000000 41607007074
+41610000000 41610007083
+41613000000 41613007072
+41616000000 41616007096
+41619000000 41619007077
+41622000000 41622007062
+41625000000 41625007076
+41628000000 41628007079
+41631000000 41631007082
+41634000000 41634007083
+41637000000 41637007093
+41640000000 41640007082
+41643000000 41643007086
+41646000000 41646007077
+41649000000 41649007075
+41652000000 41652007077
+41655000000 41655007076
+41658000000 41658007042
+41661000000 41661007072
+41664000000 41664007066
+41667000000 41667007082
+41670000000 41670007058
+41673000000 41673007070
+41676000000 41676007083
+41679000000 41679007085
+41682000000 41682007074
+41685000000 41685007016
+41688000000 41688007014
+41691000000 41691007086
+41694000000 41694007001
+41697000000 41697007075
+41700000000 41700007087
+41703000000 41703007079
+41706000000 41706007079
+41709000000 41709007038
+41712000000 41712007063
+41715000000 41715006986
+41718000000 41718007067
+41721000000 41721007079
+41724000000 41724007082
+41727000000 41727007049
+41730000000 41730007060
+41733000000 41733007078
+41736000000 41736007074
+41739000000 41739007082
+41742000000 41742007081
+41745000000 41745007075
+41748000000 41748007100
+41751000000 41751007079
+41754000000 41754007083
+41757000000 41757007068
+41760000000 41760007066
+41763000000 41763007037
+41766000000 41766007067
+41769000000 41769007075
+41772000000 41772007092
+41775000000 41775007082
+41778000000 41778007032
+41781000000 41781007086
+41784000000 41784007080
+41787000000 41787007074
+41790000000 41790007074
+41793000000 41793007088
+41796000000 41796007079
+41799000000 41799007085
+41802000000 41802007074
+41805000000 41805007024
+41808000000 41808007083
+41811000000 41811007079
+41814000000 41814007066
+41817000000 41817007077
+41820000000 41820006995
+41823000000 41823007078
+41826000000 41826007070
+41829000000 41829007071
+41832000000 41832007082
+41835000000 41835007082
+41838000000 41838007036
+41841000000 41841007091
+41844000000 41844007056
+41847000000 41847007084
+41850000000 41850007083
+41853000000 41853007077
+41856000000 41856007032
+41859000000 41859007101
+41862000000 41862007080
+41865000000 41865007088
+41868000000 41868007074
+41871000000 41871007078
+41874000000 41874007080
+41877000000 41877007070
+41880000000 41880007066
+41883000000 41883007074
+41886000000 41886007070
+41889000000 41889007076
+41892000000 41892007067
+41895000000 41895007083
+41898000000 41898007053
+41901000000 41901007074
+41904000000 41904007069
+41907000000 41907007078
+41910000000 41910007067
+41913000000 41913007091
+41916000000 41916007072
+41919000000 41919007057
+41922000000 41922007071
+41925000000 41925007074
+41928000000 41928007077
+41931000000 41931007078
+41934000000 41934007088
+41937000000 41937007077
+41940000000 41940007081
+41943000000 41943007072
+41946000000 41946007070
+41949000000 41949007072
+41952000000 41952007071
+41955000000 41955007037
+41958000000 41958007067
+41961000000 41961007061
+41964000000 41964007077
+41967000000 41967007053
+41970000000 41970007065
+41973000000 41973007078
+41976000000 41976007080
+41979000000 41979007069
+41982000000 41982007011
+41985000000 41985007009
+41988000000 41988007081
+41991000000 41991006996
+41994000000 41994007070
+41997000000 41997007082
+42000000000 42000007074
+42003000000 42003007074
+42006000000 42006007033
+42009000000 42009007058
+42012000000 42012006981
+42015000000 42015007062
+42018000000 42018007074
+42021000000 42021007077
+42024000000 42024007044
+42027000000 42027007055
+42030000000 42030007073
+42033000000 42033007069
+42036000000 42036007077
+42039000000 42039007076
+42042000000 42042007070
+42045000000 42045007095
+42048000000 42048007074
+42051000000 42051007078
+42054000000 42054007063
+42057000000 42057007061
+42060000000 42060007032
+42063000000 42063007062
+42066000000 42066007070
+42069000000 42069007087
+42072000000 42072007077
+42075000000 42075007027
+42078000000 42078007081
+42081000000 42081007075
+42084000000 42084007069
+42087000000 42087007069
+42090000000 42090007083
+42093000000 42093007074
+42096000000 42096007080
+42099000000 42099007069
+42102000000 42102007019
+42105000000 42105007078
+42108000000 42108007074
+42111000000 42111007061
+42114000000 42114007072
+42117000000 42117006990
+42120000000 42120007073
+42123000000 42123007065
+42126000000 42126007066
+42129000000 42129007077
+42132000000 42132007077
+42135000000 42135007031
+42138000000 42138007086
+42141000000 42141007051
+42144000000 42144007079
+42147000000 42147007078
+42150000000 42150007072
+42153000000 42153007027
+42156000000 42156007096
+42159000000 42159007075
+42162000000 42162007083
+42165000000 42165007069
+42168000000 42168007073
+42171000000 42171007075
+42174000000 42174007065
+42177000000 42177007061
+42180000000 42180007069
+42183000000 42183007065
+42186000000 42186007071
+42189000000 42189007062
+42192000000 42192007078
+42195000000 42195007048
+42198000000 42198007069
+42201000000 42201007064
+42204000000 42204007073
+42207000000 42207007062
+42210000000 42210007086
+42213000000 42213007067
+42216000000 42216007052
+42219000000 42219007066
+42222000000 42222007069
+42225000000 42225007072
+42228000000 42228007073
+42231000000 42231007083
+42234000000 42234007072
+42237000000 42237007076
+42240000000 42240007067
+42243000000 42243007065
+42246000000 42246007067
+42249000000 42249007066
+42252000000 42252007032
+42255000000 42255007062
+42258000000 42258007056
+42261000000 42261007072
+42264000000 42264007048
+42267000000 42267007060
+42270000000 42270007073
+42273000000 42273007075
+42276000000 42276007064
+42279000000 42279007006
+42282000000 42282007004
+42285000000 42285007076
+42288000000 42288006991
+42291000000 42291007065
+42294000000 42294007077
+42297000000 42297007069
+42300000000 42300007069
+42303000000 42303007028
+42306000000 42306007053
+42309000000 42309006976
+42312000000 42312007057
+42315000000 42315007069
+42318000000 42318007072
+42321000000 42321007039
+42324000000 42324007050
+42327000000 42327007068
+42330000000 42330007064
+42333000000 42333007072
+42336000000 42336007071
+42339000000 42339007065
+42342000000 42342007090
+42345000000 42345007069
+42348000000 42348007073
+42351000000 42351007058
+42354000000 42354007056
+42357000000 42357007027
+42360000000 42360007057
+42363000000 42363007065
+42366000000 42366007082
+42369000000 42369007072
+42372000000 42372007022
+42375000000 42375007076
+42378000000 42378007070
+42381000000 42381007064
+42384000000 42384007064
+42387000000 42387007078
+42390000000 42390007069
+42393000000 42393007075
+42396000000 42396007064
+42399000000 42399007014
+42402000000 42402007073
+42405000000 42405007069
+42408000000 42408007056
+42411000000 42411007067
+42414000000 42414006985
+42417000000 42417007068
+42420000000 42420007060
+42423000000 42423007061
+42426000000 42426007072
+42429000000 42429007072
+42432000000 42432007026
+42435000000 42435007081
+42438000000 42438007046
+42441000000 42441007074
+42444000000 42444007073
+42447000000 42447007067
+42450000000 42450007022
+42453000000 42453007091
+42456000000 42456007070
+42459000000 42459007078
+42462000000 42462007064
+42465000000 42465007068
+42468000000 42468007070
+42471000000 42471007060
+42474000000 42474007056
+42477000000 42477007064
+42480000000 42480007060
+42483000000 42483007066
+42486000000 42486007057
+42489000000 42489007073
+42492000000 42492007043
+42495000000 42495007064
+42498000000 42498007059
+42501000000 42501007068
+42504000000 42504007057
+42507000000 42507007081
+42510000000 42510007062
+42513000000 42513007047
+42516000000 42516007061
+42519000000 42519007064
+42522000000 42522007067
+42525000000 42525007068
+42528000000 42528007078
+42531000000 42531007067
+42534000000 42534007071
+42537000000 42537007062
+42540000000 42540007060
+42543000000 42543007062
+42546000000 42546007061
+42549000000 42549007027
+42552000000 42552007057
+42555000000 42555007051
+42558000000 42558007067
+42561000000 42561007043
+42564000000 42564007055
+42567000000 42567007068
+42570000000 42570007070
+42573000000 42573007059
+42576000000 42576007001
+42579000000 42579006999
+42582000000 42582007071
+42585000000 42585006986
+42588000000 42588007060
+42591000000 42591007072
+42594000000 42594007064
+42597000000 42597007064
+42600000000 42600007023
+42603000000 42603007048
+42606000000 42606006971
+42609000000 42609007052
+42612000000 42612007064
+42615000000 42615007067
+42618000000 42618007034
+42621000000 42621007045
+42624000000 42624007063
+42627000000 42627007059
+42630000000 42630007067
+42633000000 42633007066
+42636000000 42636007060
+42639000000 42639007085
+42642000000 42642007064
+42645000000 42645007068
+42648000000 42648007053
+42651000000 42651007051
+42654000000 42654007022
+42657000000 42657007052
+42660000000 42660007060
+42663000000 42663007077
+42666000000 42666007067
+42669000000 42669007017
+42672000000 42672007071
+42675000000 42675007065
+42678000000 42678007059
+42681000000 42681007059
+42684000000 42684007073
+42687000000 42687007064
+42690000000 42690007070
+42693000000 42693007059
+42696000000 42696007009
+42699000000 42699007068
+42702000000 42702007064
+42705000000 42705007051
+42708000000 42708007062
+42711000000 42711006980
+42714000000 42714007063
+42717000000 42717007055
+42720000000 42720007056
+42723000000 42723007067
+42726000000 42726007067
+42729000000 42729007021
+42732000000 42732007076
+42735000000 42735007041
+42738000000 42738007069
+42741000000 42741007068
+42744000000 42744007062
+42747000000 42747007017
+42750000000 42750007086
+42753000000 42753007065
+42756000000 42756007073
+42759000000 42759007059
+42762000000 42762007063
+42765000000 42765007065
+42768000000 42768007055
+42771000000 42771007051
+42774000000 42774007059
+42777000000 42777007055
+42780000000 42780007061
+42783000000 42783007052
+42786000000 42786007068
+42789000000 42789007038
+42792000000 42792007059
+42795000000 42795007054
+42798000000 42798007063
+42801000000 42801007052
+42804000000 42804007076
+42807000000 42807007057
+42810000000 42810007042
+42813000000 42813007056
+42816000000 42816007059
+42819000000 42819007062
+42822000000 42822007063
+42825000000 42825007073
+42828000000 42828007062
+42831000000 42831007066
+42834000000 42834007057
+42837000000 42837007055
+42840000000 42840007057
+42843000000 42843007056
+42846000000 42846007022
+42849000000 42849007052
+42852000000 42852007046
+42855000000 42855007062
+42858000000 42858007038
+42861000000 42861007050
+42864000000 42864007063
+42867000000 42867007065
+42870000000 42870007054
+42873000000 42873006996
+42876000000 42876006994
+42879000000 42879007066
+42882000000 42882006981
+42885000000 42885007055
+42888000000 42888007067
+42891000000 42891007059
+42894000000 42894007059
+42897000000 42897007018
+42900000000 42900007043
+42903000000 42903006966
+42906000000 42906007047
+42909000000 42909007059
+42912000000 42912007062
+42915000000 42915007029
+42918000000 42918007040
+42921000000 42921007058
+42924000000 42924007054
+42927000000 42927007062
+42930000000 42930007061
+42933000000 42933007055
+42936000000 42936007080
+42939000000 42939007059
+42942000000 42942007063
+42945000000 42945007048
+42948000000 42948007046
+42951000000 42951007017
+42954000000 42954007047
+42957000000 42957007055
+42960000000 42960007072
+42963000000 42963007062
+42966000000 42966007012
+42969000000 42969007066
+42972000000 42972007060
+42975000000 42975007054
+42978000000 42978007054
+42981000000 42981007068
+42984000000 42984007059
+42987000000 42987007065
+42990000000 42990007054
+42993000000 42993007004
+42996000000 42996007063
+42999000000 42999007059
+43002000000 43002007046
+43005000000 43005007057
+43008000000 43008006975
+43011000000 43011007058
+43014000000 43014007050
+43017000000 43017007051
+43020000000 43020007062
+43023000000 43023007062
+43026000000 43026007016
+43029000000 43029007071
+43032000000 43032007036
+43035000000 43035007064
+43038000000 43038007063
+43041000000 43041007057
+43044000000 43044007012
+43047000000 43047007081
+43050000000 43050007060
+43053000000 43053007068
+43056000000 43056007054
+43059000000 43059007058
+43062000000 43062007060
+43065000000 43065007050
+43068000000 43068007046
+43071000000 43071007054
+43074000000 43074007050
+43077000000 43077007056
+43080000000 43080007047
+43083000000 43083007063
+43086000000 43086007033
+43089000000 43089007054
+43092000000 43092007049
+43095000000 43095007058
+43098000000 43098007047
+43101000000 43101007071
+43104000000 43104007052
+43107000000 43107007037
+43110000000 43110007051
+43113000000 43113007054
+43116000000 43116007057
+43119000000 43119007058
+43122000000 43122007068
+43125000000 43125007057
+43128000000 43128007061
+43131000000 43131007052
+43134000000 43134007050
+43137000000 43137007052
+43140000000 43140007051
+43143000000 43143007017
+43146000000 43146007047
+43149000000 43149007041
+43152000000 43152007057
+43155000000 43155007033
+43158000000 43158007045
+43161000000 43161007058
+43164000000 43164007060
+43167000000 43167007049
+43170000000 43170006991
+43173000000 43173006989
+43176000000 43176007061
+43179000000 43179006976
+43182000000 43182007050
+43185000000 43185007062
+43188000000 43188007054
+43191000000 43191007054
+43194000000 43194007013
+43197000000 43197007038
+43200000000 43200006961
+43203000000 43203007042
+43206000000 43206007054
+43209000000 43209007057
+43212000000 43212007024
+43215000000 43215007035
+43218000000 43218007053
+43221000000 43221007049
+43224000000 43224007057
+43227000000 43227007056
+43230000000 43230007050
+43233000000 43233007075
+43236000000 43236007054
+43239000000 43239007058
+43242000000 43242007043
+43245000000 43245007041
+43248000000 43248007012
+43251000000 43251007042
+43254000000 43254007050
+43257000000 43257007067
+43260000000 43260007057
+43263000000 43263007007
+43266000000 43266007061
+43269000000 43269007055
+43272000000 43272007049
+43275000000 43275007049
+43278000000 43278007063
+43281000000 43281007054
+43284000000 43284007060
+43287000000 43287007049
+43290000000 43290006999
+43293000000 43293007058
+43296000000 43296007054
+43299000000 43299007041
+43302000000 43302007052
+43305000000 43305006970
+43308000000 43308007053
+43311000000 43311007045
+43314000000 43314007046
+43317000000 43317007057
+43320000000 43320007057
+43323000000 43323007011
+43326000000 43326007066
+43329000000 43329007031
+43332000000 43332007059
+43335000000 43335007058
+43338000000 43338007052
+43341000000 43341007007
+43344000000 43344007076
+43347000000 43347007055
+43350000000 43350007063
+43353000000 43353007049
+43356000000 43356007053
+43359000000 43359007055
+43362000000 43362007045
+43365000000 43365007041
+43368000000 43368007049
+43371000000 43371007045
+43374000000 43374007051
+43377000000 43377007042
+43380000000 43380007058
+43383000000 43383007028
+43386000000 43386007049
+43389000000 43389007044
+43392000000 43392007053
+43395000000 43395007042
+43398000000 43398007066
+43401000000 43401007047
+43404000000 43404007032
+43407000000 43407007046
+43410000000 43410007049
+43413000000 43413007052
+43416000000 43416007053
+43419000000 43419007063
+43422000000 43422007052
+43425000000 43425007056
+43428000000 43428007047
+43431000000 43431007045
+43434000000 43434007047
+43437000000 43437007046
+43440000000 43440007012
+43443000000 43443007042
+43446000000 43446007036
+43449000000 43449007052
+43452000000 43452007028
+43455000000 43455007040
+43458000000 43458007053
+43461000000 43461007055
+43464000000 43464007044
+43467000000 43467006986
+43470000000 43470006984
+43473000000 43473007056
+43476000000 43476006971
+43479000000 43479007045
+43482000000 43482007057
+43485000000 43485007049
+43488000000 43488007049
+43491000000 43491007008
+43494000000 43494007033
+43497000000 43497006956
+43500000000 43500007037
+43503000000 43503007049
+43506000000 43506007052
+43509000000 43509007019
+43512000000 43512007030
+43515000000 43515007048
+43518000000 43518007044
+43521000000 43521007052
+43524000000 43524007051
+43527000000 43527007045
+43530000000 43530007070
+43533000000 43533007049
+43536000000 43536007053
+43539000000 43539007038
+43542000000 43542007036
+43545000000 43545007007
+43548000000 43548007037
+43551000000 43551007045
+43554000000 43554007062
+43557000000 43557007052
+43560000000 43560007002
+43563000000 43563007056
+43566000000 43566007050
+43569000000 43569007044
+43572000000 43572007044
+43575000000 43575007058
+43578000000 43578007049
+43581000000 43581007055
+43584000000 43584007044
+43587000000 43587006994
+43590000000 43590007053
+43593000000 43593007049
+43596000000 43596007036
+43599000000 43599007047
+43602000000 43602006965
+43605000000 43605007048
+43608000000 43608007040
+43611000000 43611007041
+43614000000 43614007052
+43617000000 43617007052
+43620000000 43620007006
+43623000000 43623007061
+43626000000 43626007026
+43629000000 43629007054
+43632000000 43632007053
+43635000000 43635007047
+43638000000 43638007002
+43641000000 43641007071
+43644000000 43644007050
+43647000000 43647007058
+43650000000 43650007044
+43653000000 43653007048
+43656000000 43656007050
+43659000000 43659007040
+43662000000 43662007036
+43665000000 43665007044
+43668000000 43668007040
+43671000000 43671007046
+43674000000 43674007037
+43677000000 43677007053
+43680000000 43680007023
+43683000000 43683007044
+43686000000 43686007039
+43689000000 43689007048
+43692000000 43692007037
+43695000000 43695007061
+43698000000 43698007042
+43701000000 43701007027
+43704000000 43704007041
+43707000000 43707007044
+43710000000 43710007047
+43713000000 43713007048
+43716000000 43716007058
+43719000000 43719007047
+43722000000 43722007051
+43725000000 43725007042
+43728000000 43728007040
+43731000000 43731007042
+43734000000 43734007041
+43737000000 43737007007
+43740000000 43740007037
+43743000000 43743007031
+43746000000 43746007047
+43749000000 43749007023
+43752000000 43752007035
+43755000000 43755007048
+43758000000 43758007050
+43761000000 43761007039
+43764000000 43764006981
+43767000000 43767006979
+43770000000 43770007051
+43773000000 43773006966
+43776000000 43776007040
+43779000000 43779007052
+43782000000 43782007044
+43785000000 43785007044
+43788000000 43788007003
+43791000000 43791007028
+43794000000 43794006951
+43797000000 43797007032
+43800000000 43800007044
+43803000000 43803007047
+43806000000 43806007014
+43809000000 43809007025
+43812000000 43812007043
+43815000000 43815007039
+43818000000 43818007047
+43821000000 43821007046
+43824000000 43824007040
+43827000000 43827007065
+43830000000 43830007044
+43833000000 43833007048
+43836000000 43836007033
+43839000000 43839007031
+43842000000 43842007002
+43845000000 43845007032
+43848000000 43848007040
+43851000000 43851007057
+43854000000 43854007047
+43857000000 43857006997
+43860000000 43860007051
+43863000000 43863007045
+43866000000 43866007039
+43869000000 43869007039
+43872000000 43872007053
+43875000000 43875007044
+43878000000 43878007050
+43881000000 43881007039
+43884000000 43884006989
+43887000000 43887007048
+43890000000 43890007044
+43893000000 43893007031
+43896000000 43896007042
+43899000000 43899006960
+43902000000 43902007043
+43905000000 43905007035
+43908000000 43908007036
+43911000000 43911007047
+43914000000 43914007047
+43917000000 43917007001
+43920000000 43920007056
+43923000000 43923007021
+43926000000 43926007049
+43929000000 43929007048
+43932000000 43932007042
+43935000000 43935006997
+43938000000 43938007066
+43941000000 43941007045
+43944000000 43944007053
+43947000000 43947007039
+43950000000 43950007043
+43953000000 43953007045
+43956000000 43956007035
+43959000000 43959007031
+43962000000 43962007039
+43965000000 43965007035
+43968000000 43968007041
+43971000000 43971007032
+43974000000 43974007048
+43977000000 43977007018
+43980000000 43980007039
+43983000000 43983007034
+43986000000 43986007043
+43989000000 43989007032
+43992000000 43992007056
+43995000000 43995007037
+43998000000 43998007022
+44001000000 44001007036
+44004000000 44004007039
+44007000000 44007007042
+44010000000 44010007043
+44013000000 44013007053
+44016000000 44016007042
+44019000000 44019007046
+44022000000 44022007037
+44025000000 44025007035
+44028000000 44028007037
+44031000000 44031007036
+44034000000 44034007002
+44037000000 44037007032
+44040000000 44040007026
+44043000000 44043007042
+44046000000 44046007018
+44049000000 44049007030
+44052000000 44052007043
+44055000000 44055007045
+44058000000 44058007034
+44061000000 44061006976
+44064000000 44064006974
+44067000000 44067007046
+44070000000 44070006961
+44073000000 44073007035
+44076000000 44076007047
+44079000000 44079007039
+44082000000 44082007039
+44085000000 44085006998
+44088000000 44088007023
+44091000000 44091006946
+44094000000 44094007027
+44097000000 44097007039
+44100000000 44100007042
+44103000000 44103007009
+44106000000 44106007020
+44109000000 44109007038
+44112000000 44112007034
+44115000000 44115007042
+44118000000 44118007041
+44121000000 44121007035
+44124000000 44124007060
+44127000000 44127007039
+44130000000 44130007043
+44133000000 44133007028
+44136000000 44136007026
+44139000000 44139006997
+44142000000 44142007027
+44145000000 44145007035
+44148000000 44148007052
+44151000000 44151007042
+44154000000 44154006992
+44157000000 44157007046
+44160000000 44160007040
+44163000000 44163007034
+44166000000 44166007034
+44169000000 44169007048
+44172000000 44172007039
+44175000000 44175007045
+44178000000 44178007034
+44181000000 44181006984
+44184000000 44184007043
+44187000000 44187007039
+44190000000 44190007026
+44193000000 44193007037
+44196000000 44196006955
+44199000000 44199007038
+44202000000 44202007030
+44205000000 44205007031
+44208000000 44208007042
+44211000000 44211007042
+44214000000 44214006996
+44217000000 44217007051
+44220000000 44220007016
+44223000000 44223007044
+44226000000 44226007043
+44229000000 44229007037
+44232000000 44232006992
+44235000000 44235007061
+44238000000 44238007040
+44241000000 44241007048
+44244000000 44244007034
+44247000000 44247007038
+44250000000 44250007040
+44253000000 44253007030
+44256000000 44256007026
+44259000000 44259007034
+44262000000 44262007030
+44265000000 44265007036
+44268000000 44268007027
+44271000000 44271007043
+44274000000 44274007013
+44277000000 44277007034
+44280000000 44280007029
+44283000000 44283007038
+44286000000 44286007027
+44289000000 44289007051
+44292000000 44292007032
+44295000000 44295007017
+44298000000 44298007031
+44301000000 44301007034
+44304000000 44304007037
+44307000000 44307007038
+44310000000 44310007048
+44313000000 44313007037
+44316000000 44316007041
+44319000000 44319007032
+44322000000 44322007030
+44325000000 44325007032
+44328000000 44328007031
+44331000000 44331006997
+44334000000 44334007027
+44337000000 44337007021
+44340000000 44340007037
+44343000000 44343007013
+44346000000 44346007025
+44349000000 44349007038
+44352000000 44352007040
+44355000000 44355007029
+44358000000 44358006971
+44361000000 44361006969
+44364000000 44364007041
+44367000000 44367006956
+44370000000 44370007030
+44373000000 44373007042
+44376000000 44376007034
+44379000000 44379007034
+44382000000 44382006993
+44385000000 44385007018
+44388000000 44388006941
+44391000000 44391007022
+44394000000 44394007034
+44397000000 44397007037
+44400000000 44400007004
+44403000000 44403007015
+44406000000 44406007033
+44409000000 44409007029
+44412000000 44412007037
+44415000000 44415007036
+44418000000 44418007030
+44421000000 44421007055
+44424000000 44424007034
+44427000000 44427007038
+44430000000 44430007023
+44433000000 44433007021
+44436000000 44436006992
+44439000000 44439007022
+44442000000 44442007030
+44445000000 44445007047
+44448000000 44448007037
+44451000000 44451006987
+44454000000 44454007041
+44457000000 44457007035
+44460000000 44460007029
+44463000000 44463007029
+44466000000 44466007043
+44469000000 44469007034
+44472000000 44472007040
+44475000000 44475007029
+44478000000 44478006979
+44481000000 44481007038
+44484000000 44484007034
+44487000000 44487007021
+44490000000 44490007032
+44493000000 44493006950
+44496000000 44496007033
+44499000000 44499007025
+44502000000 44502007026
+44505000000 44505007037
+44508000000 44508007037
+44511000000 44511006991
+44514000000 44514007046
+44517000000 44517007011
+44520000000 44520007039
+44523000000 44523007038
+44526000000 44526007032
+44529000000 44529006987
+44532000000 44532007056
+44535000000 44535007035
+44538000000 44538007043
+44541000000 44541007029
+44544000000 44544007033
+44547000000 44547007035
+44550000000 44550007025
+44553000000 44553007021
+44556000000 44556007029
+44559000000 44559007025
+44562000000 44562007031
+44565000000 44565007022
+44568000000 44568007038
+44571000000 44571007008
+44574000000 44574007029
+44577000000 44577007024
+44580000000 44580007033
+44583000000 44583007022
+44586000000 44586007046
+44589000000 44589007027
+44592000000 44592007012
+44595000000 44595007026
+44598000000 44598007029
+44601000000 44601007032
+44604000000 44604007033
+44607000000 44607007043
+44610000000 44610007032
+44613000000 44613007036
+44616000000 44616007027
+44619000000 44619007025
+44622000000 44622007027
+44625000000 44625007026
+44628000000 44628006992
+44631000000 44631007022
+44634000000 44634007016
+44637000000 44637007032
+44640000000 44640007008
+44643000000 44643007020
+44646000000 44646007033
+44649000000 44649007035
+44652000000 44652007024
+44655000000 44655006966
+44658000000 44658006964
+44661000000 44661007036
+44664000000 44664006951
+44667000000 44667007025
+44670000000 44670007037
+44673000000 44673007029
+44676000000 44676007029
+44679000000 44679006988
+44682000000 44682007013
+44685000000 44685006936
+44688000000 44688007017
+44691000000 44691007029
+44694000000 44694007032
+44697000000 44697006999
+44700000000 44700007010
+44703000000 44703007028
+44706000000 44706007024
+44709000000 44709007032
+44712000000 44712007031
+44715000000 44715007025
+44718000000 44718007050
+44721000000 44721007029
+44724000000 44724007033
+44727000000 44727007018
+44730000000 44730007016
+44733000000 44733006987
+44736000000 44736007017
+44739000000 44739007025
+44742000000 44742007042
+44745000000 44745007032
+44748000000 44748006982
+44751000000 44751007036
+44754000000 44754007030
+44757000000 44757007024
+44760000000 44760007024
+44763000000 44763007038
+44766000000 44766007029
+44769000000 44769007035
+44772000000 44772007024
+44775000000 44775006974
+44778000000 44778007033
+44781000000 44781007029
+44784000000 44784007016
+44787000000 44787007027
+44790000000 44790006945
+44793000000 44793007028
+44796000000 44796007020
+44799000000 44799007021
+44802000000 44802007032
+44805000000 44805007032
+44808000000 44808006986
+44811000000 44811007041
+44814000000 44814007006
+44817000000 44817007034
+44820000000 44820007033
+44823000000 44823007027
+44826000000 44826006982
+44829000000 44829007051
+44832000000 44832007030
+44835000000 44835007038
+44838000000 44838007024
+44841000000 44841007028
+44844000000 44844007030
+44847000000 44847007020
+44850000000 44850007016
+44853000000 44853007024
+44856000000 44856007020
+44859000000 44859007026
+44862000000 44862007017
+44865000000 44865007033
+44868000000 44868007003
+44871000000 44871007024
+44874000000 44874007019
+44877000000 44877007028
+44880000000 44880007017
+44883000000 44883007041
+44886000000 44886007022
+44889000000 44889007007
+44892000000 44892007021
+44895000000 44895007024
+44898000000 44898007027
+44901000000 44901007028
+44904000000 44904007038
+44907000000 44907007027
+44910000000 44910007031
+44913000000 44913007022
+44916000000 44916007020
+44919000000 44919007022
+44922000000 44922007021
+44925000000 44925006987
+44928000000 44928007017
+44931000000 44931007011
+44934000000 44934007027
+44937000000 44937007003
+44940000000 44940007015
+44943000000 44943007028
+44946000000 44946007030
+44949000000 44949007019
+44952000000 44952006961
+44955000000 44955006959
+44958000000 44958007031
+44961000000 44961006946
+44964000000 44964007020
+44967000000 44967007032
+44970000000 44970007024
+44973000000 44973007024
+44976000000 44976006983
+44979000000 44979007008
+44982000000 44982006931
+44985000000 44985007012
+44988000000 44988007024
+44991000000 44991007027
+44994000000 44994006994
+44997000000 44997007005
+45000000000 45000007023
+45003000000 45003007019
+45006000000 45006007027
+45009000000 45009007026
+45012000000 45012007020
+45015000000 45015007045
+45018000000 45018007024
+45021000000 45021007028
+45024000000 45024007013
+45027000000 45027007011
+45030000000 45030006982
+45033000000 45033007012
+45036000000 45036007020
+45039000000 45039007037
+45042000000 45042007027
+45045000000 45045006977
+45048000000 45048007031
+45051000000 45051007025
+45054000000 45054007019
+45057000000 45057007019
+45060000000 45060007033
+45063000000 45063007024
+45066000000 45066007030
+45069000000 45069007019
+45072000000 45072006969
+45075000000 45075007028
+45078000000 45078007024
+45081000000 45081007011
+45084000000 45084007022
+45087000000 45087006940
+45090000000 45090007023
+45093000000 45093007015
+45096000000 45096007016
+45099000000 45099007027
+45102000000 45102007027
+45105000000 45105006981
+45108000000 45108007036
+45111000000 45111007001
+45114000000 45114007029
+45117000000 45117007028
+45120000000 45120007022
+45123000000 45123006977
+45126000000 45126007046
+45129000000 45129007025
+45132000000 45132007033
+45135000000 45135007019
+45138000000 45138007023
+45141000000 45141007025
+45144000000 45144007015
+45147000000 45147007011
+45150000000 45150007019
+45153000000 45153007015
+45156000000 45156007021
+45159000000 45159007012
+45162000000 45162007028
+45165000000 45165006998
+45168000000 45168007019
+45171000000 45171007014
+45174000000 45174007023
+45177000000 45177007012
+45180000000 45180007036
+45183000000 45183007017
+45186000000 45186007002
+45189000000 45189007016
+45192000000 45192007019
+45195000000 45195007022
+45198000000 45198007023
+45201000000 45201007033
+45204000000 45204007022
+45207000000 45207007026
+45210000000 45210007017
+45213000000 45213007015
+45216000000 45216007017
+45219000000 45219007016
+45222000000 45222006982
+45225000000 45225007012
+45228000000 45228007006
+45231000000 45231007022
+45234000000 45234006998
+45237000000 45237007010
+45240000000 45240007023
+45243000000 45243007025
+45246000000 45246007014
+45249000000 45249006956
+45252000000 45252006954
+45255000000 45255007026
+45258000000 45258006941
+45261000000 45261007015
+45264000000 45264007027
+45267000000 45267007019
+45270000000 45270007019
+45273000000 45273006978
+45276000000 45276007003
+45279000000 45279006926
+45282000000 45282007007
+45285000000 45285007019
+45288000000 45288007022
+45291000000 45291006989
+45294000000 45294007000
+45297000000 45297007018
+45300000000 45300007014
+45303000000 45303007022
+45306000000 45306007021
+45309000000 45309007015
+45312000000 45312007040
+45315000000 45315007019
+45318000000 45318007023
+45321000000 45321007008
+45324000000 45324007006
+45327000000 45327006977
+45330000000 45330007007
+45333000000 45333007015
+45336000000 45336007032
+45339000000 45339007022
+45342000000 45342006972
+45345000000 45345007026
+45348000000 45348007020
+45351000000 45351007014
+45354000000 45354007014
+45357000000 45357007028
+45360000000 45360007019
+45363000000 45363007025
+45366000000 45366007014
+45369000000 45369006964
+45372000000 45372007023
+45375000000 45375007019
+45378000000 45378007006
+45381000000 45381007017
+45384000000 45384006935
+45387000000 45387007018
+45390000000 45390007010
+45393000000 45393007011
+45396000000 45396007022
+45399000000 45399007022
+45402000000 45402006976
+45405000000 45405007031
+45408000000 45408006996
+45411000000 45411007024
+45414000000 45414007023
+45417000000 45417007017
+45420000000 45420006972
+45423000000 45423007041
+45426000000 45426007020
+45429000000 45429007028
+45432000000 45432007014
+45435000000 45435007018
+45438000000 45438007020
+45441000000 45441007010
+45444000000 45444007006
+45447000000 45447007014
+45450000000 45450007010
+45453000000 45453007016
+45456000000 45456007007
+45459000000 45459007023
+45462000000 45462006993
+45465000000 45465007014
+45468000000 45468007009
+45471000000 45471007018
+45474000000 45474007007
+45477000000 45477007031
+45480000000 45480007012
+45483000000 45483006997
+45486000000 45486007011
+45489000000 45489007014
+45492000000 45492007017
+45495000000 45495007018
+45498000000 45498007028
+45501000000 45501007017
+45504000000 45504007021
+45507000000 45507007012
+45510000000 45510007010
+45513000000 45513007012
+45516000000 45516007011
+45519000000 45519006977
+45522000000 45522007007
+45525000000 45525007001
+45528000000 45528007017
+45531000000 45531006993
+45534000000 45534007005
+45537000000 45537007018
+45540000000 45540007020
+45543000000 45543007009
+45546000000 45546006951
+45549000000 45549006949
+45552000000 45552007021
+45555000000 45555006936
+45558000000 45558007010
+45561000000 45561007022
+45564000000 45564007014
+45567000000 45567007014
+45570000000 45570006973
+45573000000 45573006998
+45576000000 45576006921
+45579000000 45579007002
+45582000000 45582007014
+45585000000 45585007017
+45588000000 45588006984
+45591000000 45591006995
+45594000000 45594007013
+45597000000 45597007009
+45600000000 45600007017
+45603000000 45603007016
+45606000000 45606007010
+45609000000 45609007035
+45612000000 45612007014
+45615000000 45615007018
+45618000000 45618007003
+45621000000 45621007001
+45624000000 45624006972
+45627000000 45627007002
+45630000000 45630007010
+45633000000 45633007027
+45636000000 45636007017
+45639000000 45639006967
+45642000000 45642007021
+45645000000 45645007015
+45648000000 45648007009
+45651000000 45651007009
+45654000000 45654007023
+45657000000 45657007014
+45660000000 45660007020
+45663000000 45663007009
+45666000000 45666006959
+45669000000 45669007018
+45672000000 45672007014
+45675000000 45675007001
+45678000000 45678007012
+45681000000 45681006930
+45684000000 45684007013
+45687000000 45687007005
+45690000000 45690007006
+45693000000 45693007017
+45696000000 45696007017
+45699000000 45699006971
+45702000000 45702007026
+45705000000 45705006991
+45708000000 45708007019
+45711000000 45711007018
+45714000000 45714007012
+45717000000 45717006967
+45720000000 45720007036
+45723000000 45723007015
+45726000000 45726007023
+45729000000 45729007009
+45732000000 45732007013
+45735000000 45735007015
+45738000000 45738007005
+45741000000 45741007001
+45744000000 45744007009
+45747000000 45747007005
+45750000000 45750007011
+45753000000 45753007002
+45756000000 45756007018
+45759000000 45759006988
+45762000000 45762007009
+45765000000 45765007004
+45768000000 45768007013
+45771000000 45771007002
+45774000000 45774007026
+45777000000 45777007007
+45780000000 45780006992
+45783000000 45783007006
+45786000000 45786007009
+45789000000 45789007012
+45792000000 45792007013
+45795000000 45795007023
+45798000000 45798007012
+45801000000 45801007016
+45804000000 45804007007
+45807000000 45807007005
+45810000000 45810007007
+45813000000 45813007006
+45816000000 45816006972
+45819000000 45819007002
+45822000000 45822006996
+45825000000 45825007012
+45828000000 45828006988
+45831000000 45831007000
+45834000000 45834007013
+45837000000 45837007015
+45840000000 45840007004
+45843000000 45843006946
+45846000000 45846006944
+45849000000 45849007016
+45852000000 45852006931
+45855000000 45855007005
+45858000000 45858007017
+45861000000 45861007009
+45864000000 45864007009
+45867000000 45867006968
+45870000000 45870006993
+45873000000 45873006916
+45876000000 45876006997
+45879000000 45879007009
+45882000000 45882007012
+45885000000 45885006979
+45888000000 45888006990
+45891000000 45891007008
+45894000000 45894007004
+45897000000 45897007012
+45900000000 45900007011
+45903000000 45903007005
+45906000000 45906007030
+45909000000 45909007009
+45912000000 45912007013
+45915000000 45915006998
+45918000000 45918006996
+45921000000 45921006967
+45924000000 45924006997
+45927000000 45927007005
+45930000000 45930007022
+45933000000 45933007012
+45936000000 45936006962
+45939000000 45939007016
+45942000000 45942007010
+45945000000 45945007004
+45948000000 45948007004
+45951000000 45951007018
+45954000000 45954007009
+45957000000 45957007015
+45960000000 45960007004
+45963000000 45963006954
+45966000000 45966007013
+45969000000 45969007009
+45972000000 45972006996
+45975000000 45975007007
+45978000000 45978006925
+45981000000 45981007008
+45984000000 45984007000
+45987000000 45987007001
+45990000000 45990007012
+45993000000 45993007012
+45996000000 45996006966
+45999000000 45999007021
+46002000000 46002006986
+46005000000 46005007014
+46008000000 46008007013
+46011000000 46011007007
+46014000000 46014006962
+46017000000 46017007031
+46020000000 46020007010
+46023000000 46023007018
+46026000000 46026007004
+46029000000 46029007008
+46032000000 46032007010
+46035000000 46035007000
+46038000000 46038006996
+46041000000 46041007004
+46044000000 46044007000
+46047000000 46047007006
+46050000000 46050006997
+46053000000 46053007013
+46056000000 46056006983
+46059000000 46059007004
+46062000000 46062006999
+46065000000 46065007008
+46068000000 46068006997
+46071000000 46071007021
+46074000000 46074007002
+46077000000 46077006987
+46080000000 46080007001
+46083000000 46083007004
+46086000000 46086007007
+46089000000 46089007008
+46092000000 46092007018
+46095000000 46095007007
+46098000000 46098007011
+46101000000 46101007002
+46104000000 46104007000
+46107000000 46107007002
+46110000000 46110007001
+46113000000 46113006967
+46116000000 46116006997
+46119000000 46119006991
+46122000000 46122007007
+46125000000 46125006983
+46128000000 46128006995
+46131000000 46131007008
+46134000000 46134007010
+46137000000 46137006999
+46140000000 46140006941
+46143000000 46143006939
+46146000000 46146007011
+46149000000 46149006926
+46152000000 46152007000
+46155000000 46155007012
+46158000000 46158007004
+46161000000 46161007004
+46164000000 46164006963
+46167000000 46167006988
+46170000000 46170006911
+46173000000 46173006992
+46176000000 46176007004
+46179000000 46179007007
+46182000000 46182006974
+46185000000 46185006985
+46188000000 46188007003
+46191000000 46191006999
+46194000000 46194007007
+46197000000 46197007006
+46200000000 46200007000
+46203000000 46203007025
+46206000000 46206007004
+46209000000 46209007008
+46212000000 46212006993
+46215000000 46215006991
+46218000000 46218006962
+46221000000 46221006992
+46224000000 46224007000
+46227000000 46227007017
+46230000000 46230007007
+46233000000 46233006957
+46236000000 46236007011
+46239000000 46239007005
+46242000000 46242006999
+46245000000 46245006999
+46248000000 46248007013
+46251000000 46251007004
+46254000000 46254007010
+46257000000 46257006999
+46260000000 46260006949
+46263000000 46263007008
+46266000000 46266007004
+46269000000 46269006991
+46272000000 46272007002
+46275000000 46275006920
+46278000000 46278007003
+46281000000 46281006995
+46284000000 46284006996
+46287000000 46287007007
+46290000000 46290007007
+46293000000 46293006961
+46296000000 46296007016
+46299000000 46299006981
+46302000000 46302007009
+46305000000 46305007008
+46308000000 46308007002
+46311000000 46311006957
+46314000000 46314007026
+46317000000 46317007005
+46320000000 46320007013
+46323000000 46323006999
+46326000000 46326007003
+46329000000 46329007005
+46332000000 46332006995
+46335000000 46335006991
+46338000000 46338006999
+46341000000 46341006995
+46344000000 46344007001
+46347000000 46347006992
+46350000000 46350007008
+46353000000 46353006978
+46356000000 46356006999
+46359000000 46359006994
+46362000000 46362007003
+46365000000 46365006992
+46368000000 46368007016
+46371000000 46371006997
+46374000000 46374006982
+46377000000 46377006996
+46380000000 46380006999
+46383000000 46383007002
+46386000000 46386007003
+46389000000 46389007013
+46392000000 46392007002
+46395000000 46395007006
+46398000000 46398006997
+46401000000 46401006995
+46404000000 46404006997
+46407000000 46407006996
+46410000000 46410006962
+46413000000 46413006992
+46416000000 46416006986
+46419000000 46419007002
+46422000000 46422006978
+46425000000 46425006990
+46428000000 46428007003
+46431000000 46431007005
+46434000000 46434006994
+46437000000 46437006936
+46440000000 46440006934
+46443000000 46443007006
+46446000000 46446006921
+46449000000 46449006995
+46452000000 46452007007
+46455000000 46455006999
+46458000000 46458006999
+46461000000 46461006958
+46464000000 46464006983
+46467000000 46467006906
+46470000000 46470006987
+46473000000 46473006999
+46476000000 46476007002
+46479000000 46479006969
+46482000000 46482006980
+46485000000 46485006998
+46488000000 46488006994
+46491000000 46491007002
+46494000000 46494007001
+46497000000 46497006995
+46500000000 46500007020
+46503000000 46503006999
+46506000000 46506007003
+46509000000 46509006988
+46512000000 46512006986
+46515000000 46515006957
+46518000000 46518006987
+46521000000 46521006995
+46524000000 46524007012
+46527000000 46527007002
+46530000000 46530006952
+46533000000 46533007006
+46536000000 46536007000
+46539000000 46539006994
+46542000000 46542006994
+46545000000 46545007008
+46548000000 46548006999
+46551000000 46551007005
+46554000000 46554006994
+46557000000 46557006944
+46560000000 46560007003
+46563000000 46563006999
+46566000000 46566006986
+46569000000 46569006997
+46572000000 46572006915
+46575000000 46575006998
+46578000000 46578006990
+46581000000 46581006991
+46584000000 46584007002
+46587000000 46587007002
+46590000000 46590006956
+46593000000 46593007011
+46596000000 46596006976
+46599000000 46599007004
+46602000000 46602007003
+46605000000 46605006997
+46608000000 46608006952
+46611000000 46611007021
+46614000000 46614007000
+46617000000 46617007008
+46620000000 46620006994
+46623000000 46623006998
+46626000000 46626007000
+46629000000 46629006990
+46632000000 46632006986
+46635000000 46635006994
+46638000000 46638006990
+46641000000 46641006996
+46644000000 46644006987
+46647000000 46647007003
+46650000000 46650006973
+46653000000 46653006994
+46656000000 46656006989
+46659000000 46659006998
+46662000000 46662006987
+46665000000 46665007011
+46668000000 46668006992
+46671000000 46671006977
+46674000000 46674006991
+46677000000 46677006994
+46680000000 46680006997
+46683000000 46683006998
+46686000000 46686007008
+46689000000 46689006997
+46692000000 46692007001
+46695000000 46695006992
+46698000000 46698006990
+46701000000 46701006992
+46704000000 46704006991
+46707000000 46707006957
+46710000000 46710006987
+46713000000 46713006981
+46716000000 46716006997
+46719000000 46719006973
+46722000000 46722006985
+46725000000 46725006998
+46728000000 46728007000
+46731000000 46731006989
+46734000000 46734006931
+46737000000 46737006929
+46740000000 46740007001
+46743000000 46743006916
+46746000000 46746006990
+46749000000 46749007002
+46752000000 46752006994
+46755000000 46755006994
+46758000000 46758006953
+46761000000 46761006978
+46764000000 46764006901
+46767000000 46767006982
+46770000000 46770006994
+46773000000 46773006997
+46776000000 46776006964
+46779000000 46779006975
+46782000000 46782006993
+46785000000 46785006989
+46788000000 46788006997
+46791000000 46791006996
+46794000000 46794006990
+46797000000 46797007015
+46800000000 46800006994
+46803000000 46803006998
+46806000000 46806006983
+46809000000 46809006981
+46812000000 46812006952
+46815000000 46815006982
+46818000000 46818006990
+46821000000 46821007007
+46824000000 46824006997
+46827000000 46827006947
+46830000000 46830007001
+46833000000 46833006995
+46836000000 46836006989
+46839000000 46839006989
+46842000000 46842007003
+46845000000 46845006994
+46848000000 46848007000
+46851000000 46851006989
+46854000000 46854006939
+46857000000 46857006998
+46860000000 46860006994
+46863000000 46863006981
+46866000000 46866006992
+46869000000 46869006910
+46872000000 46872006993
+46875000000 46875006985
+46878000000 46878006986
+46881000000 46881006997
+46884000000 46884006997
+46887000000 46887006951
+46890000000 46890007006
+46893000000 46893006971
+46896000000 46896006999
+46899000000 46899006998
+46902000000 46902006992
+46905000000 46905006947
+46908000000 46908007016
+46911000000 46911006995
+46914000000 46914007003
+46917000000 46917006989
+46920000000 46920006993
+46923000000 46923006995
+46926000000 46926006985
+46929000000 46929006981
+46932000000 46932006989
+46935000000 46935006985
+46938000000 46938006991
+46941000000 46941006982
+46944000000 46944006998
+46947000000 46947006968
+46950000000 46950006989
+46953000000 46953006984
+46956000000 46956006993
+46959000000 46959006982
+46962000000 46962007006
+46965000000 46965006987
+46968000000 46968006972
+46971000000 46971006986
+46974000000 46974006989
+46977000000 46977006992
+46980000000 46980006993
+46983000000 46983007003
+46986000000 46986006992
+46989000000 46989006996
+46992000000 46992006987
+46995000000 46995006985
+46998000000 46998006987
+47001000000 47001006986
+47004000000 47004006952
+47007000000 47007006982
+47010000000 47010006976
+47013000000 47013006992
+47016000000 47016006968
+47019000000 47019006980
+47022000000 47022006993
+47025000000 47025006995
+47028000000 47028006984
+47031000000 47031006926
+47034000000 47034006924
+47037000000 47037006996
+47040000000 47040006911
+47043000000 47043006985
+47046000000 47046006997
+47049000000 47049006989
+47052000000 47052006989
+47055000000 47055006948
+47058000000 47058006973
+47061000000 47061006896
+47064000000 47064006977
+47067000000 47067006989
+47070000000 47070006992
+47073000000 47073006959
+47076000000 47076006970
+47079000000 47079006988
+47082000000 47082006984
+47085000000 47085006992
+47088000000 47088006991
+47091000000 47091006985
+47094000000 47094007010
+47097000000 47097006989
+47100000000 47100006993
+47103000000 47103006978
+47106000000 47106006976
+47109000000 47109006947
+47112000000 47112006977
+47115000000 47115006985
+47118000000 47118007002
+47121000000 47121006992
+47124000000 47124006942
+47127000000 47127006996
+47130000000 47130006990
+47133000000 47133006984
+47136000000 47136006984
+47139000000 47139006998
+47142000000 47142006989
+47145000000 47145006995
+47148000000 47148006984
+47151000000 47151006934
+47154000000 47154006993
+47157000000 47157006989
+47160000000 47160006976
+47163000000 47163006987
+47166000000 47166006905
+47169000000 47169006988
+47172000000 47172006980
+47175000000 47175006981
+47178000000 47178006992
+47181000000 47181006992
+47184000000 47184006946
+47187000000 47187007001
+47190000000 47190006966
+47193000000 47193006994
+47196000000 47196006993
+47199000000 47199006987
+47202000000 47202006942
+47205000000 47205007011
+47208000000 47208006990
+47211000000 47211006998
+47214000000 47214006984
+47217000000 47217006988
+47220000000 47220006990
+47223000000 47223006980
+47226000000 47226006976
+47229000000 47229006984
+47232000000 47232006980
+47235000000 47235006986
+47238000000 47238006977
+47241000000 47241006993
+47244000000 47244006963
+47247000000 47247006984
+47250000000 47250006979
+47253000000 47253006988
+47256000000 47256006977
+47259000000 47259007001
+47262000000 47262006982
+47265000000 47265006967
+47268000000 47268006981
+47271000000 47271006984
+47274000000 47274006987
+47277000000 47277006988
+47280000000 47280006998
+47283000000 47283006987
+47286000000 47286006991
+47289000000 47289006982
+47292000000 47292006980
+47295000000 47295006982
+47298000000 47298006981
+47301000000 47301006947
+47304000000 47304006977
+47307000000 47307006971
+47310000000 47310006987
+47313000000 47313006963
+47316000000 47316006975
+47319000000 47319006988
+47322000000 47322006990
+47325000000 47325006979
+47328000000 47328006921
+47331000000 47331006919
+47334000000 47334006991
+47337000000 47337006906
+47340000000 47340006980
+47343000000 47343006992
+47346000000 47346006984
+47349000000 47349006984
+47352000000 47352006943
+47355000000 47355006968
+47358000000 47358006891
+47361000000 47361006972
+47364000000 47364006984
+47367000000 47367006987
+47370000000 47370006954
+47373000000 47373006965
+47376000000 47376006983
+47379000000 47379006979
+47382000000 47382006987
+47385000000 47385006986
+47388000000 47388006980
+47391000000 47391007005
+47394000000 47394006984
+47397000000 47397006988
+47400000000 47400006973
+47403000000 47403006971
+47406000000 47406006942
+47409000000 47409006972
+47412000000 47412006980
+47415000000 47415006997
+47418000000 47418006987
+47421000000 47421006937
+47424000000 47424006991
+47427000000 47427006985
+47430000000 47430006979
+47433000000 47433006979
+47436000000 47436006993
+47439000000 47439006984
+47442000000 47442006990
+47445000000 47445006979
+47448000000 47448006929
+47451000000 47451006988
+47454000000 47454006984
+47457000000 47457006971
+47460000000 47460006982
+47463000000 47463006900
+47466000000 47466006983
+47469000000 47469006975
+47472000000 47472006976
+47475000000 47475006987
+47478000000 47478006987
+47481000000 47481006941
+47484000000 47484006996
+47487000000 47487006961
+47490000000 47490006989
+47493000000 47493006988
+47496000000 47496006982
+47499000000 47499006937
+47502000000 47502007006
+47505000000 47505006985
+47508000000 47508006993
+47511000000 47511006979
+47514000000 47514006983
+47517000000 47517006985
+47520000000 47520006975
+47523000000 47523006971
+47526000000 47526006979
+47529000000 47529006975
+47532000000 47532006981
+47535000000 47535006972
+47538000000 47538006988
+47541000000 47541006958
+47544000000 47544006979
+47547000000 47547006974
+47550000000 47550006983
+47553000000 47553006972
+47556000000 47556006996
+47559000000 47559006977
+47562000000 47562006962
+47565000000 47565006976
+47568000000 47568006979
+47571000000 47571006982
+47574000000 47574006983
+47577000000 47577006993
+47580000000 47580006982
+47583000000 47583006986
+47586000000 47586006977
+47589000000 47589006975
+47592000000 47592006977
+47595000000 47595006976
+47598000000 47598006942
+47601000000 47601006972
+47604000000 47604006966
+47607000000 47607006982
+47610000000 47610006958
+47613000000 47613006970
+47616000000 47616006983
+47619000000 47619006985
+47622000000 47622006974
+47625000000 47625006916
+47628000000 47628006914
+47631000000 47631006986
+47634000000 47634006901
+47637000000 47637006975
+47640000000 47640006987
+47643000000 47643006979
+47646000000 47646006979
+47649000000 47649006938
+47652000000 47652006963
+47655000000 47655006886
+47658000000 47658006967
+47661000000 47661006979
+47664000000 47664006982
+47667000000 47667006949
+47670000000 47670006960
+47673000000 47673006978
+47676000000 47676006974
+47679000000 47679006982
+47682000000 47682006981
+47685000000 47685006975
+47688000000 47688007000
+47691000000 47691006979
+47694000000 47694006983
+47697000000 47697006968
+47700000000 47700006966
+47703000000 47703006937
+47706000000 47706006967
+47709000000 47709006975
+47712000000 47712006992
+47715000000 47715006982
+47718000000 47718006932
+47721000000 47721006986
+47724000000 47724006980
+47727000000 47727006974
+47730000000 47730006974
+47733000000 47733006988
+47736000000 47736006979
+47739000000 47739006985
+47742000000 47742006974
+47745000000 47745006924
+47748000000 47748006983
+47751000000 47751006979
+47754000000 47754006966
+47757000000 47757006977
+47760000000 47760006895
+47763000000 47763006978
+47766000000 47766006970
+47769000000 47769006971
+47772000000 47772006982
+47775000000 47775006982
+47778000000 47778006936
+47781000000 47781006991
+47784000000 47784006956
+47787000000 47787006984
+47790000000 47790006983
+47793000000 47793006977
+47796000000 47796006932
+47799000000 47799007001
+47802000000 47802006980
+47805000000 47805006988
+47808000000 47808006974
+47811000000 47811006978
+47814000000 47814006980
+47817000000 47817006970
+47820000000 47820006966
+47823000000 47823006974
+47826000000 47826006970
+47829000000 47829006976
+47832000000 47832006967
+47835000000 47835006983
+47838000000 47838006953
+47841000000 47841006974
+47844000000 47844006969
+47847000000 47847006978
+47850000000 47850006967
+47853000000 47853006991
+47856000000 47856006972
+47859000000 47859006957
+47862000000 47862006971
+47865000000 47865006974
+47868000000 47868006977
+47871000000 47871006978
+47874000000 47874006988
+47877000000 47877006977
+47880000000 47880006981
+47883000000 47883006972
+47886000000 47886006970
+47889000000 47889006972
+47892000000 47892006971
+47895000000 47895006937
+47898000000 47898006967
+47901000000 47901006961
+47904000000 47904006977
+47907000000 47907006953
+47910000000 47910006965
+47913000000 47913006978
+47916000000 47916006980
+47919000000 47919006969
+47922000000 47922006911
+47925000000 47925006909
+47928000000 47928006981
+47931000000 47931006896
+47934000000 47934006970
+47937000000 47937006982
+47940000000 47940006974
+47943000000 47943006974
+47946000000 47946006933
+47949000000 47949006958
+47952000000 47952006881
+47955000000 47955006962
+47958000000 47958006974
+47961000000 47961006977
+47964000000 47964006944
+47967000000 47967006955
+47970000000 47970006973
+47973000000 47973006969
+47976000000 47976006977
+47979000000 47979006976
+47982000000 47982006970
+47985000000 47985006995
+47988000000 47988006974
+47991000000 47991006978
+47994000000 47994006963
+47997000000 47997006961
+48000000000 48000006932
+48003000000 48003006962
+48006000000 48006006970
+48009000000 48009006987
+48012000000 48012006977
+48015000000 48015006927
+48018000000 48018006981
+48021000000 48021006975
+48024000000 48024006969
+48027000000 48027006969
+48030000000 48030006983
+48033000000 48033006974
+48036000000 48036006980
+48039000000 48039006969
+48042000000 48042006919
+48045000000 48045006978
+48048000000 48048006974
+48051000000 48051006961
+48054000000 48054006972
+48057000000 48057006890
+48060000000 48060006973
+48063000000 48063006965
+48066000000 48066006966
+48069000000 48069006977
+48072000000 48072006977
+48075000000 48075006931
+48078000000 48078006986
+48081000000 48081006951
+48084000000 48084006979
+48087000000 48087006978
+48090000000 48090006972
+48093000000 48093006927
+48096000000 48096006996
+48099000000 48099006975
+48102000000 48102006983
+48105000000 48105006969
+48108000000 48108006973
+48111000000 48111006975
+48114000000 48114006965
+48117000000 48117006961
+48120000000 48120006969
+48123000000 48123006965
+48126000000 48126006971
+48129000000 48129006962
+48132000000 48132006978
+48135000000 48135006948
+48138000000 48138006969
+48141000000 48141006964
+48144000000 48144006973
+48147000000 48147006962
+48150000000 48150006986
+48153000000 48153006967
+48156000000 48156006952
+48159000000 48159006966
+48162000000 48162006969
+48165000000 48165006972
+48168000000 48168006973
+48171000000 48171006983
+48174000000 48174006972
+48177000000 48177006976
+48180000000 48180006967
+48183000000 48183006965
+48186000000 48186006967
+48189000000 48189006966
+48192000000 48192006932
+48195000000 48195006962
+48198000000 48198006956
+48201000000 48201006972
+48204000000 48204006948
+48207000000 48207006960
+48210000000 48210006973
+48213000000 48213006975
+48216000000 48216006964
+48219000000 48219006906
+48222000000 48222006904
+48225000000 48225006976
+48228000000 48228006891
+48231000000 48231006965
+48234000000 48234006977
+48237000000 48237006969
+48240000000 48240006969
+48243000000 48243006928
+48246000000 48246006953
+48249000000 48249006876
+48252000000 48252006957
+48255000000 48255006969
+48258000000 48258006972
+48261000000 48261006939
+48264000000 48264006950
+48267000000 48267006968
+48270000000 48270006964
+48273000000 48273006972
+48276000000 48276006971
+48279000000 48279006965
+48282000000 48282006990
+48285000000 48285006969
+48288000000 48288006973
+48291000000 48291006958
+48294000000 48294006956
+48297000000 48297006927
+48300000000 48300006957
+48303000000 48303006965
+48306000000 48306006982
+48309000000 48309006972
+48312000000 48312006922
+48315000000 48315006976
+48318000000 48318006970
+48321000000 48321006964
+48324000000 48324006964
+48327000000 48327006978
+48330000000 48330006969
+48333000000 48333006975
+48336000000 48336006964
+48339000000 48339006914
+48342000000 48342006973
+48345000000 48345006969
+48348000000 48348006956
+48351000000 48351006967
+48354000000 48354006885
+48357000000 48357006968
+48360000000 48360006960
+48363000000 48363006961
+48366000000 48366006972
+48369000000 48369006972
+48372000000 48372006926
+48375000000 48375006981
+48378000000 48378006946
+48381000000 48381006974
+48384000000 48384006973
+48387000000 48387006967
+48390000000 48390006922
+48393000000 48393006991
+48396000000 48396006970
+48399000000 48399006978
+48402000000 48402006964
+48405000000 48405006968
+48408000000 48408006970
+48411000000 48411006960
+48414000000 48414006956
+48417000000 48417006964
+48420000000 48420006960
+48423000000 48423006966
+48426000000 48426006957
+48429000000 48429006973
+48432000000 48432006943
+48435000000 48435006964
+48438000000 48438006959
+48441000000 48441006968
+48444000000 48444006957
+48447000000 48447006981
+48450000000 48450006962
+48453000000 48453006947
+48456000000 48456006961
+48459000000 48459006964
+48462000000 48462006967
+48465000000 48465006968
+48468000000 48468006978
+48471000000 48471006967
+48474000000 48474006971
+48477000000 48477006962
+48480000000 48480006960
+48483000000 48483006962
+48486000000 48486006961
+48489000000 48489006927
+48492000000 48492006957
+48495000000 48495006951
+48498000000 48498006967
+48501000000 48501006943
+48504000000 48504006955
+48507000000 48507006968
+48510000000 48510006970
+48513000000 48513006959
+48516000000 48516006901
+48519000000 48519006899
+48522000000 48522006971
+48525000000 48525006886
+48528000000 48528006960
+48531000000 48531006972
+48534000000 48534006964
+48537000000 48537006964
+48540000000 48540006923
+48543000000 48543006948
+48546000000 48546006871
+48549000000 48549006952
+48552000000 48552006964
+48555000000 48555006967
+48558000000 48558006934
+48561000000 48561006945
+48564000000 48564006963
+48567000000 48567006959
+48570000000 48570006967
+48573000000 48573006966
+48576000000 48576006960
+48579000000 48579006985
+48582000000 48582006964
+48585000000 48585006968
+48588000000 48588006953
+48591000000 48591006951
+48594000000 48594006922
+48597000000 48597006952
+48600000000 48600006960
+48603000000 48603006977
+48606000000 48606006967
+48609000000 48609006917
+48612000000 48612006971
+48615000000 48615006965
+48618000000 48618006959
+48621000000 48621006959
+48624000000 48624006973
+48627000000 48627006964
+48630000000 48630006970
+48633000000 48633006959
+48636000000 48636006909
+48639000000 48639006968
+48642000000 48642006964
+48645000000 48645006951
+48648000000 48648006962
+48651000000 48651006880
+48654000000 48654006963
+48657000000 48657006955
+48660000000 48660006956
+48663000000 48663006967
+48666000000 48666006967
+48669000000 48669006921
+48672000000 48672006976
+48675000000 48675006941
+48678000000 48678006969
+48681000000 48681006968
+48684000000 48684006962
+48687000000 48687006917
+48690000000 48690006986
+48693000000 48693006965
+48696000000 48696006973
+48699000000 48699006959
+48702000000 48702006963
+48705000000 48705006965
+48708000000 48708006955
+48711000000 48711006951
+48714000000 48714006959
+48717000000 48717006955
+48720000000 48720006961
+48723000000 48723006952
+48726000000 48726006968
+48729000000 48729006938
+48732000000 48732006959
+48735000000 48735006954
+48738000000 48738006963
+48741000000 48741006952
+48744000000 48744006976
+48747000000 48747006957
+48750000000 48750006942
+48753000000 48753006956
+48756000000 48756006959
+48759000000 48759006962
+48762000000 48762006963
+48765000000 48765006973
+48768000000 48768006962
+48771000000 48771006966
+48774000000 48774006957
+48777000000 48777006955
+48780000000 48780006957
+48783000000 48783006956
+48786000000 48786006922
+48789000000 48789006952
+48792000000 48792006946
+48795000000 48795006962
+48798000000 48798006938
+48801000000 48801006950
+48804000000 48804006963
+48807000000 48807006965
+48810000000 48810006954
+48813000000 48813006896
+48816000000 48816006894
+48819000000 48819006966
+48822000000 48822006881
+48825000000 48825006955
+48828000000 48828006967
+48831000000 48831006959
+48834000000 48834006959
+48837000000 48837006918
+48840000000 48840006943
+48843000000 48843006866
+48846000000 48846006947
+48849000000 48849006959
+48852000000 48852006962
+48855000000 48855006929
+48858000000 48858006940
+48861000000 48861006958
+48864000000 48864006954
+48867000000 48867006962
+48870000000 48870006961
+48873000000 48873006955
+48876000000 48876006980
+48879000000 48879006959
+48882000000 48882006963
+48885000000 48885006948
+48888000000 48888006946
+48891000000 48891006917
+48894000000 48894006947
+48897000000 48897006955
+48900000000 48900006972
+48903000000 48903006962
+48906000000 48906006912
+48909000000 48909006966
+48912000000 48912006960
+48915000000 48915006954
+48918000000 48918006954
+48921000000 48921006968
+48924000000 48924006959
+48927000000 48927006965
+48930000000 48930006954
+48933000000 48933006904
+48936000000 48936006963
+48939000000 48939006959
+48942000000 48942006946
+48945000000 48945006957
+48948000000 48948006875
+48951000000 48951006958
+48954000000 48954006950
+48957000000 48957006951
+48960000000 48960006962
+48963000000 48963006962
+48966000000 48966006916
+48969000000 48969006971
+48972000000 48972006936
+48975000000 48975006964
+48978000000 48978006963
+48981000000 48981006957
+48984000000 48984006912
+48987000000 48987006981
+48990000000 48990006960
+48993000000 48993006968
+48996000000 48996006954
+48999000000 48999006958
+49002000000 49002006960
+49005000000 49005006950
+49008000000 49008006946
+49011000000 49011006954
+49014000000 49014006950
+49017000000 49017006956
+49020000000 49020006947
+49023000000 49023006963
+49026000000 49026006933
+49029000000 49029006954
+49032000000 49032006949
+49035000000 49035006958
+49038000000 49038006947
+49041000000 49041006971
+49044000000 49044006952
+49047000000 49047006937
+49050000000 49050006951
+49053000000 49053006954
+49056000000 49056006957
+49059000000 49059006958
+49062000000 49062006968
+49065000000 49065006957
+49068000000 49068006961
+49071000000 49071006952
+49074000000 49074006950
+49077000000 49077006952
+49080000000 49080006951
+49083000000 49083006917
+49086000000 49086006947
+49089000000 49089006941
+49092000000 49092006957
+49095000000 49095006933
+49098000000 49098006945
+49101000000 49101006958
+49104000000 49104006960
+49107000000 49107006949
+49110000000 49110006891
+49113000000 49113006889
+49116000000 49116006961
+49119000000 49119006876
+49122000000 49122006950
+49125000000 49125006962
+49128000000 49128006954
+49131000000 49131006954
+49134000000 49134006913
+49137000000 49137006938
+49140000000 49140006861
+49143000000 49143006942
+49146000000 49146006954
+49149000000 49149006957
+49152000000 49152006924
+49155000000 49155006935
+49158000000 49158006953
+49161000000 49161006949
+49164000000 49164006957
+49167000000 49167006956
+49170000000 49170006950
+49173000000 49173006975
+49176000000 49176006954
+49179000000 49179006958
+49182000000 49182006943
+49185000000 49185006941
+49188000000 49188006912
+49191000000 49191006942
+49194000000 49194006950
+49197000000 49197006967
+49200000000 49200006957
+49203000000 49203006907
+49206000000 49206006961
+49209000000 49209006955
+49212000000 49212006949
+49215000000 49215006949
+49218000000 49218006963
+49221000000 49221006954
+49224000000 49224006960
+49227000000 49227006949
+49230000000 49230006899
+49233000000 49233006958
+49236000000 49236006954
+49239000000 49239006941
+49242000000 49242006952
+49245000000 49245006870
+49248000000 49248006953
+49251000000 49251006945
+49254000000 49254006946
+49257000000 49257006957
+49260000000 49260006957
+49263000000 49263006911
+49266000000 49266006966
+49269000000 49269006931
+49272000000 49272006959
+49275000000 49275006958
+49278000000 49278006952
+49281000000 49281006907
+49284000000 49284006976
+49287000000 49287006955
+49290000000 49290006963
+49293000000 49293006949
+49296000000 49296006953
+49299000000 49299006955
+49302000000 49302006945
+49305000000 49305006941
+49308000000 49308006949
+49311000000 49311006945
+49314000000 49314006951
+49317000000 49317006942
+49320000000 49320006958
+49323000000 49323006928
+49326000000 49326006949
+49329000000 49329006944
+49332000000 49332006953
+49335000000 49335006942
+49338000000 49338006966
+49341000000 49341006947
+49344000000 49344006932
+49347000000 49347006946
+49350000000 49350006949
+49353000000 49353006952
+49356000000 49356006953
+49359000000 49359006963
+49362000000 49362006952
+49365000000 49365006956
+49368000000 49368006947
+49371000000 49371006945
+49374000000 49374006947
+49377000000 49377006946
+49380000000 49380006912
+49383000000 49383006942
+49386000000 49386006936
+49389000000 49389006952
+49392000000 49392006928
+49395000000 49395006940
+49398000000 49398006953
+49401000000 49401006955
+49404000000 49404006944
+49407000000 49407006886
+49410000000 49410006884
+49413000000 49413006956
+49416000000 49416006871
+49419000000 49419006945
+49422000000 49422006957
+49425000000 49425006949
+49428000000 49428006949
+49431000000 49431006908
+49434000000 49434006933
+49437000000 49437006856
+49440000000 49440006937
+49443000000 49443006949
+49446000000 49446006952
+49449000000 49449006919
+49452000000 49452006930
+49455000000 49455006948
+49458000000 49458006944
+49461000000 49461006952
+49464000000 49464006951
+49467000000 49467006945
+49470000000 49470006970
+49473000000 49473006949
+49476000000 49476006953
+49479000000 49479006938
+49482000000 49482006936
+49485000000 49485006907
+49488000000 49488006937
+49491000000 49491006945
+49494000000 49494006962
+49497000000 49497006952
+49500000000 49500006902
+49503000000 49503006956
+49506000000 49506006950
+49509000000 49509006944
+49512000000 49512006944
+49515000000 49515006958
+49518000000 49518006949
+49521000000 49521006955
+49524000000 49524006944
+49527000000 49527006894
+49530000000 49530006953
+49533000000 49533006949
+49536000000 49536006936
+49539000000 49539006947
+49542000000 49542006865
+49545000000 49545006948
+49548000000 49548006940
+49551000000 49551006941
+49554000000 49554006952
+49557000000 49557006952
+49560000000 49560006906
+49563000000 49563006961
+49566000000 49566006926
+49569000000 49569006954
+49572000000 49572006953
+49575000000 49575006947
+49578000000 49578006902
+49581000000 49581006971
+49584000000 49584006950
+49587000000 49587006958
+49590000000 49590006944
+49593000000 49593006948
+49596000000 49596006950
+49599000000 49599006940
+49602000000 49602006936
+49605000000 49605006944
+49608000000 49608006940
+49611000000 49611006946
+49614000000 49614006937
+49617000000 49617006953
+49620000000 49620006923
+49623000000 49623006944
+49626000000 49626006939
+49629000000 49629006948
+49632000000 49632006937
+49635000000 49635006961
+49638000000 49638006942
+49641000000 49641006927
+49644000000 49644006941
+49647000000 49647006944
+49650000000 49650006947
+49653000000 49653006948
+49656000000 49656006958
+49659000000 49659006947
+49662000000 49662006951
+49665000000 49665006942
+49668000000 49668006940
+49671000000 49671006942
+49674000000 49674006941
+49677000000 49677006907
+49680000000 49680006937
+49683000000 49683006931
+49686000000 49686006947
+49689000000 49689006923
+49692000000 49692006935
+49695000000 49695006948
+49698000000 49698006950
+49701000000 49701006939
+49704000000 49704006881
+49707000000 49707006879
+49710000000 49710006951
+49713000000 49713006866
+49716000000 49716006940
+49719000000 49719006952
+49722000000 49722006944
+49725000000 49725006944
+49728000000 49728006903
+49731000000 49731006928
+49734000000 49734006851
+49737000000 49737006932
+49740000000 49740006944
+49743000000 49743006947
+49746000000 49746006914
+49749000000 49749006925
+49752000000 49752006943
+49755000000 49755006939
+49758000000 49758006947
+49761000000 49761006946
+49764000000 49764006940
+49767000000 49767006965
+49770000000 49770006944
+49773000000 49773006948
+49776000000 49776006933
+49779000000 49779006931
+49782000000 49782006902
+49785000000 49785006932
+49788000000 49788006940
+49791000000 49791006957
+49794000000 49794006947
+49797000000 49797006897
+49800000000 49800006951
+49803000000 49803006945
+49806000000 49806006939
+49809000000 49809006939
+49812000000 49812006953
+49815000000 49815006944
+49818000000 49818006950
+49821000000 49821006939
+49824000000 49824006889
+49827000000 49827006948
+49830000000 49830006944
+49833000000 49833006931
+49836000000 49836006942
+49839000000 49839006860
+49842000000 49842006943
+49845000000 49845006935
+49848000000 49848006936
+49851000000 49851006947
+49854000000 49854006947
+49857000000 49857006901
+49860000000 49860006956
+49863000000 49863006921
+49866000000 49866006949
+49869000000 49869006948
+49872000000 49872006942
+49875000000 49875006897
+49878000000 49878006966
+49881000000 49881006945
+49884000000 49884006953
+49887000000 49887006939
+49890000000 49890006943
+49893000000 49893006945
+49896000000 49896006935
+49899000000 49899006931
+49902000000 49902006939
+49905000000 49905006935
+49908000000 49908006941
+49911000000 49911006932
+49914000000 49914006948
+49917000000 49917006918
+49920000000 49920006939
+49923000000 49923006934
+49926000000 49926006943
+49929000000 49929006932
+49932000000 49932006956
+49935000000 49935006937
+49938000000 49938006922
+49941000000 49941006936
+49944000000 49944006939
+49947000000 49947006942
+49950000000 49950006943
+49953000000 49953006953
+49956000000 49956006942
+49959000000 49959006946
+49962000000 49962006937
+49965000000 49965006935
+49968000000 49968006937
+49971000000 49971006936
+49974000000 49974006902
+49977000000 49977006932
+49980000000 49980006926
+49983000000 49983006942
+49986000000 49986006918
+49989000000 49989006930
+49992000000 49992006943
+49995000000 49995006945
+49998000000 49998006934
+50001000000 50001006876
+50004000000 50004006874
+50007000000 50007006946
+50010000000 50010006861
+50013000000 50013006935
+50016000000 50016006947
+50019000000 50019006939
+50022000000 50022006939
+50025000000 50025006898
+50028000000 50028006923
+50031000000 50031006846
+50034000000 50034006927
+50037000000 50037006939
+50040000000 50040006942
+50043000000 50043006909
+50046000000 50046006920
+50049000000 50049006938
+50052000000 50052006934
+50055000000 50055006942
+50058000000 50058006941
+50061000000 50061006935
+50064000000 50064006960
+50067000000 50067006939
+50070000000 50070006943
+50073000000 50073006928
+50076000000 50076006926
+50079000000 50079006897
+50082000000 50082006927
+50085000000 50085006935
+50088000000 50088006952
+50091000000 50091006942
+50094000000 50094006892
+50097000000 50097006946
+50100000000 50100006940
+50103000000 50103006934
+50106000000 50106006934
+50109000000 50109006948
+50112000000 50112006939
+50115000000 50115006945
+50118000000 50118006934
+50121000000 50121006884
+50124000000 50124006943
+50127000000 50127006939
+50130000000 50130006926
+50133000000 50133006937
+50136000000 50136006855
+50139000000 50139006938
+50142000000 50142006930
+50145000000 50145006931
+50148000000 50148006942
+50151000000 50151006942
+50154000000 50154006896
+50157000000 50157006951
+50160000000 50160006916
+50163000000 50163006944
+50166000000 50166006943
+50169000000 50169006937
+50172000000 50172006892
+50175000000 50175006961
+50178000000 50178006940
+50181000000 50181006948
+50184000000 50184006934
+50187000000 50187006938
+50190000000 50190006940
+50193000000 50193006930
+50196000000 50196006926
+50199000000 50199006934
+50202000000 50202006930
+50205000000 50205006936
+50208000000 50208006927
+50211000000 50211006943
+50214000000 50214006913
+50217000000 50217006934
+50220000000 50220006929
+50223000000 50223006938
+50226000000 50226006927
+50229000000 50229006951
+50232000000 50232006932
+50235000000 50235006917
+50238000000 50238006931
+50241000000 50241006934
+50244000000 50244006937
+50247000000 50247006938
+50250000000 50250006948
+50253000000 50253006937
+50256000000 50256006941
+50259000000 50259006932
+50262000000 50262006930
+50265000000 50265006932
+50268000000 50268006931
+50271000000 50271006897
+50274000000 50274006927
+50277000000 50277006921
+50280000000 50280006937
+50283000000 50283006913
+50286000000 50286006925
+50289000000 50289006938
+50292000000 50292006940
+50295000000 50295006929
+50298000000 50298006871
+50301000000 50301006869
+50304000000 50304006941
+50307000000 50307006856
+50310000000 50310006930
+50313000000 50313006942
+50316000000 50316006934
+50319000000 50319006934
+50322000000 50322006893
+50325000000 50325006918
+50328000000 50328006841
+50331000000 50331006922
+50334000000 50334006934
+50337000000 50337006937
+50340000000 50340006904
+50343000000 50343006915
+50346000000 50346006933
+50349000000 50349006929
+50352000000 50352006937
+50355000000 50355006936
+50358000000 50358006930
+50361000000 50361006955
+50364000000 50364006934
+50367000000 50367006938
+50370000000 50370006923
+50373000000 50373006921
+50376000000 50376006892
+50379000000 50379006922
+50382000000 50382006930
+50385000000 50385006947
+50388000000 50388006937
+50391000000 50391006887
+50394000000 50394006941
+50397000000 50397006935
+50400000000 50400006929
+50403000000 50403006929
+50406000000 50406006943
+50409000000 50409006934
+50412000000 50412006940
+50415000000 50415006929
+50418000000 50418006879
+50421000000 50421006938
+50424000000 50424006934
+50427000000 50427006921
+50430000000 50430006932
+50433000000 50433006850
+50436000000 50436006933
+50439000000 50439006925
+50442000000 50442006926
+50445000000 50445006937
+50448000000 50448006937
+50451000000 50451006891
+50454000000 50454006946
+50457000000 50457006911
+50460000000 50460006939
+50463000000 50463006938
+50466000000 50466006932
+50469000000 50469006887
+50472000000 50472006956
+50475000000 50475006935
+50478000000 50478006943
+50481000000 50481006929
+50484000000 50484006933
+50487000000 50487006935
+50490000000 50490006925
+50493000000 50493006921
+50496000000 50496006929
+50499000000 50499006925
+50502000000 50502006931
+50505000000 50505006922
+50508000000 50508006938
+50511000000 50511006908
+50514000000 50514006929
+50517000000 50517006924
+50520000000 50520006933
+50523000000 50523006922
+50526000000 50526006946
+50529000000 50529006927
+50532000000 50532006912
+50535000000 50535006926
+50538000000 50538006929
+50541000000 50541006932
+50544000000 50544006933
+50547000000 50547006943
+50550000000 50550006932
+50553000000 50553006936
+50556000000 50556006927
+50559000000 50559006925
+50562000000 50562006927
+50565000000 50565006926
+50568000000 50568006892
+50571000000 50571006922
+50574000000 50574006916
+50577000000 50577006932
+50580000000 50580006908
+50583000000 50583006920
+50586000000 50586006933
+50589000000 50589006935
+50592000000 50592006924
+50595000000 50595006866
+50598000000 50598006864
+50601000000 50601006936
+50604000000 50604006851
+50607000000 50607006925
+50610000000 50610006937
+50613000000 50613006929
+50616000000 50616006929
+50619000000 50619006888
+50622000000 50622006913
+50625000000 50625006836
+50628000000 50628006917
+50631000000 50631006929
+50634000000 50634006932
+50637000000 50637006899
+50640000000 50640006910
+50643000000 50643006928
+50646000000 50646006924
+50649000000 50649006932
+50652000000 50652006931
+50655000000 50655006925
+50658000000 50658006950
+50661000000 50661006929
+50664000000 50664006933
+50667000000 50667006918
+50670000000 50670006916
+50673000000 50673006887
+50676000000 50676006917
+50679000000 50679006925
+50682000000 50682006942
+50685000000 50685006932
+50688000000 50688006882
+50691000000 50691006936
+50694000000 50694006930
+50697000000 50697006924
+50700000000 50700006924
+50703000000 50703006938
+50706000000 50706006929
+50709000000 50709006935
+50712000000 50712006924
+50715000000 50715006874
+50718000000 50718006933
+50721000000 50721006929
+50724000000 50724006916
+50727000000 50727006927
+50730000000 50730006845
+50733000000 50733006928
+50736000000 50736006920
+50739000000 50739006921
+50742000000 50742006932
+50745000000 50745006932
+50748000000 50748006886
+50751000000 50751006941
+50754000000 50754006906
+50757000000 50757006934
+50760000000 50760006933
+50763000000 50763006927
+50766000000 50766006882
+50769000000 50769006951
+50772000000 50772006930
+50775000000 50775006938
+50778000000 50778006924
+50781000000 50781006928
+50784000000 50784006930
+50787000000 50787006920
+50790000000 50790006916
+50793000000 50793006924
+50796000000 50796006920
+50799000000 50799006926
+50802000000 50802006917
+50805000000 50805006933
+50808000000 50808006903
+50811000000 50811006924
+50814000000 50814006919
+50817000000 50817006928
+50820000000 50820006917
+50823000000 50823006941
+50826000000 50826006922
+50829000000 50829006907
+50832000000 50832006921
+50835000000 50835006924
+50838000000 50838006927
+50841000000 50841006928
+50844000000 50844006938
+50847000000 50847006927
+50850000000 50850006931
+50853000000 50853006922
+50856000000 50856006920
+50859000000 50859006922
+50862000000 50862006921
+50865000000 50865006887
+50868000000 50868006917
+50871000000 50871006911
+50874000000 50874006927
+50877000000 50877006903
+50880000000 50880006915
+50883000000 50883006928
+50886000000 50886006930
+50889000000 50889006919
+50892000000 50892006861
+50895000000 50895006859
+50898000000 50898006931
+50901000000 50901006846
+50904000000 50904006920
+50907000000 50907006932
+50910000000 50910006924
+50913000000 50913006924
+50916000000 50916006883
+50919000000 50919006908
+50922000000 50922006831
+50925000000 50925006912
+50928000000 50928006924
+50931000000 50931006927
+50934000000 50934006894
+50937000000 50937006905
+50940000000 50940006923
+50943000000 50943006919
+50946000000 50946006927
+50949000000 50949006926
+50952000000 50952006920
+50955000000 50955006945
+50958000000 50958006924
+50961000000 50961006928
+50964000000 50964006913
+50967000000 50967006911
+50970000000 50970006882
+50973000000 50973006912
+50976000000 50976006920
+50979000000 50979006937
+50982000000 50982006927
+50985000000 50985006877
+50988000000 50988006931
+50991000000 50991006925
+50994000000 50994006919
+50997000000 50997006919
+51000000000 51000006933
+51003000000 51003006924
+51006000000 51006006930
+51009000000 51009006919
+51012000000 51012006869
+51015000000 51015006928
+51018000000 51018006924
+51021000000 51021006911
+51024000000 51024006922
+51027000000 51027006840
+51030000000 51030006923
+51033000000 51033006915
+51036000000 51036006916
+51039000000 51039006927
+51042000000 51042006927
+51045000000 51045006881
+51048000000 51048006936
+51051000000 51051006901
+51054000000 51054006929
+51057000000 51057006928
+51060000000 51060006922
+51063000000 51063006877
+51066000000 51066006946
+51069000000 51069006925
+51072000000 51072006933
+51075000000 51075006919
+51078000000 51078006923
+51081000000 51081006925
+51084000000 51084006915
+51087000000 51087006911
+51090000000 51090006919
+51093000000 51093006915
+51096000000 51096006921
+51099000000 51099006912
+51102000000 51102006928
+51105000000 51105006898
+51108000000 51108006919
+51111000000 51111006914
+51114000000 51114006923
+51117000000 51117006912
+51120000000 51120006936
+51123000000 51123006917
+51126000000 51126006902
+51129000000 51129006916
+51132000000 51132006919
+51135000000 51135006922
+51138000000 51138006923
+51141000000 51141006933
+51144000000 51144006922
+51147000000 51147006926
+51150000000 51150006917
+51153000000 51153006915
+51156000000 51156006917
+51159000000 51159006916
+51162000000 51162006882
+51165000000 51165006912
+51168000000 51168006906
+51171000000 51171006922
+51174000000 51174006898
+51177000000 51177006910
+51180000000 51180006923
+51183000000 51183006925
+51186000000 51186006914
+51189000000 51189006856
+51192000000 51192006854
+51195000000 51195006926
+51198000000 51198006841
+51201000000 51201006915
+51204000000 51204006927
+51207000000 51207006919
+51210000000 51210006919
+51213000000 51213006878
+51216000000 51216006903
+51219000000 51219006826
+51222000000 51222006907
+51225000000 51225006919
+51228000000 51228006922
+51231000000 51231006889
+51234000000 51234006900
+51237000000 51237006918
+51240000000 51240006914
+51243000000 51243006922
+51246000000 51246006921
+51249000000 51249006915
+51252000000 51252006940
+51255000000 51255006919
+51258000000 51258006923
+51261000000 51261006908
+51264000000 51264006906
+51267000000 51267006877
+51270000000 51270006907
+51273000000 51273006915
+51276000000 51276006932
+51279000000 51279006922
+51282000000 51282006872
+51285000000 51285006926
+51288000000 51288006920
+51291000000 51291006914
+51294000000 51294006914
+51297000000 51297006928
+51300000000 51300006919
+51303000000 51303006925
+51306000000 51306006914
+51309000000 51309006864
+51312000000 51312006923
+51315000000 51315006919
+51318000000 51318006906
+51321000000 51321006917
+51324000000 51324006835
+51327000000 51327006918
+51330000000 51330006910
+51333000000 51333006911
+51336000000 51336006922
+51339000000 51339006922
+51342000000 51342006876
+51345000000 51345006931
+51348000000 51348006896
+51351000000 51351006924
+51354000000 51354006923
+51357000000 51357006917
+51360000000 51360006872
+51363000000 51363006941
+51366000000 51366006920
+51369000000 51369006928
+51372000000 51372006914
+51375000000 51375006918
+51378000000 51378006920
+51381000000 51381006910
+51384000000 51384006906
+51387000000 51387006914
+51390000000 51390006910
+51393000000 51393006916
+51396000000 51396006907
+51399000000 51399006923
+51402000000 51402006893
+51405000000 51405006914
+51408000000 51408006909
+51411000000 51411006918
+51414000000 51414006907
+51417000000 51417006931
+51420000000 51420006912
+51423000000 51423006897
+51426000000 51426006911
+51429000000 51429006914
+51432000000 51432006917
+51435000000 51435006918
+51438000000 51438006928
+51441000000 51441006917
+51444000000 51444006921
+51447000000 51447006912
+51450000000 51450006910
+51453000000 51453006912
+51456000000 51456006911
+51459000000 51459006877
+51462000000 51462006907
+51465000000 51465006901
+51468000000 51468006917
+51471000000 51471006893
+51474000000 51474006905
+51477000000 51477006918
+51480000000 51480006920
+51483000000 51483006909
+51486000000 51486006851
+51489000000 51489006849
+51492000000 51492006921
+51495000000 51495006836
+51498000000 51498006910
+51501000000 51501006922
+51504000000 51504006914
+51507000000 51507006914
+51510000000 51510006873
+51513000000 51513006898
+51516000000 51516006821
+51519000000 51519006902
+51522000000 51522006914
+51525000000 51525006917
+51528000000 51528006884
+51531000000 51531006895
+51534000000 51534006913
+51537000000 51537006909
+51540000000 51540006917
+51543000000 51543006916
+51546000000 51546006910
+51549000000 51549006935
+51552000000 51552006914
+51555000000 51555006918
+51558000000 51558006903
+51561000000 51561006901
+51564000000 51564006872
+51567000000 51567006902
+51570000000 51570006910
+51573000000 51573006927
+51576000000 51576006917
+51579000000 51579006867
+51582000000 51582006921
+51585000000 51585006915
+51588000000 51588006909
+51591000000 51591006909
+51594000000 51594006923
+51597000000 51597006914
+51600000000 51600006920
+51603000000 51603006909
+51606000000 51606006859
+51609000000 51609006918
+51612000000 51612006914
+51615000000 51615006901
+51618000000 51618006912
+51621000000 51621006830
+51624000000 51624006913
+51627000000 51627006905
+51630000000 51630006906
+51633000000 51633006917
+51636000000 51636006917
+51639000000 51639006871
+51642000000 51642006926
+51645000000 51645006891
+51648000000 51648006919
+51651000000 51651006918
+51654000000 51654006912
+51657000000 51657006867
+51660000000 51660006936
+51663000000 51663006915
+51666000000 51666006923
+51669000000 51669006909
+51672000000 51672006913
+51675000000 51675006915
+51678000000 51678006905
+51681000000 51681006901
+51684000000 51684006909
+51687000000 51687006905
+51690000000 51690006911
+51693000000 51693006902
+51696000000 51696006918
+51699000000 51699006888
+51702000000 51702006909
+51705000000 51705006904
+51708000000 51708006913
+51711000000 51711006902
+51714000000 51714006926
+51717000000 51717006907
+51720000000 51720006892
+51723000000 51723006906
+51726000000 51726006909
+51729000000 51729006912
+51732000000 51732006913
+51735000000 51735006923
+51738000000 51738006912
+51741000000 51741006916
+51744000000 51744006907
+51747000000 51747006905
+51750000000 51750006907
+51753000000 51753006906
+51756000000 51756006872
+51759000000 51759006902
+51762000000 51762006896
+51765000000 51765006912
+51768000000 51768006888
+51771000000 51771006900
+51774000000 51774006913
+51777000000 51777006915
+51780000000 51780006904
+51783000000 51783006846
+51786000000 51786006844
+51789000000 51789006916
+51792000000 51792006831
+51795000000 51795006905
+51798000000 51798006917
+51801000000 51801006909
+51804000000 51804006909
+51807000000 51807006868
+51810000000 51810006893
+51813000000 51813006816
+51816000000 51816006897
+51819000000 51819006909
+51822000000 51822006912
+51825000000 51825006879
+51828000000 51828006890
+51831000000 51831006908
+51834000000 51834006904
+51837000000 51837006912
+51840000000 51840006911
+51843000000 51843006905
+51846000000 51846006930
+51849000000 51849006909
+51852000000 51852006913
+51855000000 51855006898
+51858000000 51858006896
+51861000000 51861006867
+51864000000 51864006897
+51867000000 51867006905
+51870000000 51870006922
+51873000000 51873006912
+51876000000 51876006862
+51879000000 51879006916
+51882000000 51882006910
+51885000000 51885006904
+51888000000 51888006904
+51891000000 51891006918
+51894000000 51894006909
+51897000000 51897006915
+51900000000 51900006904
+51903000000 51903006854
+51906000000 51906006913
+51909000000 51909006909
+51912000000 51912006896
+51915000000 51915006907
+51918000000 51918006825
+51921000000 51921006908
+51924000000 51924006900
+51927000000 51927006901
+51930000000 51930006912
+51933000000 51933006912
+51936000000 51936006866
+51939000000 51939006921
+51942000000 51942006886
+51945000000 51945006914
+51948000000 51948006913
+51951000000 51951006907
+51954000000 51954006862
+51957000000 51957006931
+51960000000 51960006910
+51963000000 51963006918
+51966000000 51966006904
+51969000000 51969006908
+51972000000 51972006910
+51975000000 51975006900
+51978000000 51978006896
+51981000000 51981006904
+51984000000 51984006900
+51987000000 51987006906
+51990000000 51990006897
+51993000000 51993006913
+51996000000 51996006883
+51999000000 51999006904
+52002000000 52002006899
+52005000000 52005006908
+52008000000 52008006897
+52011000000 52011006921
+52014000000 52014006902
+52017000000 52017006887
+52020000000 52020006901
+52023000000 52023006904
+52026000000 52026006907
+52029000000 52029006908
+52032000000 52032006918
+52035000000 52035006907
+52038000000 52038006911
+52041000000 52041006902
+52044000000 52044006900
+52047000000 52047006902
+52050000000 52050006901
+52053000000 52053006867
+52056000000 52056006897
+52059000000 52059006891
+52062000000 52062006907
+52065000000 52065006883
+52068000000 52068006895
+52071000000 52071006908
+52074000000 52074006910
+52077000000 52077006899
+52080000000 52080006841
+52083000000 52083006839
+52086000000 52086006911
+52089000000 52089006826
+52092000000 52092006900
+52095000000 52095006912
+52098000000 52098006904
+52101000000 52101006904
+52104000000 52104006863
+52107000000 52107006888
+52110000000 52110006811
+52113000000 52113006892
+52116000000 52116006904
+52119000000 52119006907
+52122000000 52122006874
+52125000000 52125006885
+52128000000 52128006903
+52131000000 52131006899
+52134000000 52134006907
+52137000000 52137006906
+52140000000 52140006900
+52143000000 52143006925
+52146000000 52146006904
+52149000000 52149006908
+52152000000 52152006893
+52155000000 52155006891
+52158000000 52158006862
+52161000000 52161006892
+52164000000 52164006900
+52167000000 52167006917
+52170000000 52170006907
+52173000000 52173006857
+52176000000 52176006911
+52179000000 52179006905
+52182000000 52182006899
+52185000000 52185006899
+52188000000 52188006913
+52191000000 52191006904
+52194000000 52194006910
+52197000000 52197006899
+52200000000 52200006849
+52203000000 52203006908
+52206000000 52206006904
+52209000000 52209006891
+52212000000 52212006902
+52215000000 52215006820
+52218000000 52218006903
+52221000000 52221006895
+52224000000 52224006896
+52227000000 52227006907
+52230000000 52230006907
+52233000000 52233006861
+52236000000 52236006916
+52239000000 52239006881
+52242000000 52242006909
+52245000000 52245006908
+52248000000 52248006902
+52251000000 52251006857
+52254000000 52254006926
+52257000000 52257006905
+52260000000 52260006913
+52263000000 52263006899
+52266000000 52266006903
+52269000000 52269006905
+52272000000 52272006895
+52275000000 52275006891
+52278000000 52278006899
+52281000000 52281006895
+52284000000 52284006901
+52287000000 52287006892
+52290000000 52290006908
+52293000000 52293006878
+52296000000 52296006899
+52299000000 52299006894
+52302000000 52302006903
+52305000000 52305006892
+52308000000 52308006916
+52311000000 52311006897
+52314000000 52314006882
+52317000000 52317006896
+52320000000 52320006899
+52323000000 52323006902
+52326000000 52326006903
+52329000000 52329006913
+52332000000 52332006902
+52335000000 52335006906
+52338000000 52338006897
+52341000000 52341006895
+52344000000 52344006897
+52347000000 52347006896
+52350000000 52350006862
+52353000000 52353006892
+52356000000 52356006886
+52359000000 52359006902
+52362000000 52362006878
+52365000000 52365006890
+52368000000 52368006903
+52371000000 52371006905
+52374000000 52374006894
+52377000000 52377006836
+52380000000 52380006834
+52383000000 52383006906
+52386000000 52386006821
+52389000000 52389006895
+52392000000 52392006907
+52395000000 52395006899
+52398000000 52398006899
+52401000000 52401006858
+52404000000 52404006883
+52407000000 52407006806
+52410000000 52410006887
+52413000000 52413006899
+52416000000 52416006902
+52419000000 52419006869
+52422000000 52422006880
+52425000000 52425006898
+52428000000 52428006894
+52431000000 52431006902
+52434000000 52434006901
+52437000000 52437006895
+52440000000 52440006920
+52443000000 52443006899
+52446000000 52446006903
+52449000000 52449006888
+52452000000 52452006886
+52455000000 52455006857
+52458000000 52458006887
+52461000000 52461006895
+52464000000 52464006912
+52467000000 52467006902
+52470000000 52470006852
+52473000000 52473006906
+52476000000 52476006900
+52479000000 52479006894
+52482000000 52482006894
+52485000000 52485006908
+52488000000 52488006899
+52491000000 52491006905
+52494000000 52494006894
+52497000000 52497006844
+52500000000 52500006903
+52503000000 52503006899
+52506000000 52506006886
+52509000000 52509006897
+52512000000 52512006815
+52515000000 52515006898
+52518000000 52518006890
+52521000000 52521006891
+52524000000 52524006902
+52527000000 52527006902
+52530000000 52530006856
+52533000000 52533006911
+52536000000 52536006876
+52539000000 52539006904
+52542000000 52542006903
+52545000000 52545006897
+52548000000 52548006852
+52551000000 52551006921
+52554000000 52554006900
+52557000000 52557006908
+52560000000 52560006894
+52563000000 52563006898
+52566000000 52566006900
+52569000000 52569006890
+52572000000 52572006886
+52575000000 52575006894
+52578000000 52578006890
+52581000000 52581006896
+52584000000 52584006887
+52587000000 52587006903
+52590000000 52590006873
+52593000000 52593006894
+52596000000 52596006889
+52599000000 52599006898
+52602000000 52602006887
+52605000000 52605006911
+52608000000 52608006892
+52611000000 52611006877
+52614000000 52614006891
+52617000000 52617006894
+52620000000 52620006897
+52623000000 52623006898
+52626000000 52626006908
+52629000000 52629006897
+52632000000 52632006901
+52635000000 52635006892
+52638000000 52638006890
+52641000000 52641006892
+52644000000 52644006891
+52647000000 52647006857
+52650000000 52650006887
+52653000000 52653006881
+52656000000 52656006897
+52659000000 52659006873
+52662000000 52662006885
+52665000000 52665006898
+52668000000 52668006900
+52671000000 52671006889
+52674000000 52674006831
+52677000000 52677006829
+52680000000 52680006901
+52683000000 52683006816
+52686000000 52686006890
+52689000000 52689006902
+52692000000 52692006894
+52695000000 52695006894
+52698000000 52698006853
+52701000000 52701006878
+52704000000 52704006801
+52707000000 52707006882
+52710000000 52710006894
+52713000000 52713006897
+52716000000 52716006864
+52719000000 52719006875
+52722000000 52722006893
+52725000000 52725006889
+52728000000 52728006897
+52731000000 52731006896
+52734000000 52734006890
+52737000000 52737006915
+52740000000 52740006894
+52743000000 52743006898
+52746000000 52746006883
+52749000000 52749006881
+52752000000 52752006852
+52755000000 52755006882
+52758000000 52758006890
+52761000000 52761006907
+52764000000 52764006897
+52767000000 52767006847
+52770000000 52770006901
+52773000000 52773006895
+52776000000 52776006889
+52779000000 52779006889
+52782000000 52782006903
+52785000000 52785006894
+52788000000 52788006900
+52791000000 52791006889
+52794000000 52794006839
+52797000000 52797006898
+52800000000 52800006894
+52803000000 52803006881
+52806000000 52806006892
+52809000000 52809006810
+52812000000 52812006893
+52815000000 52815006885
+52818000000 52818006886
+52821000000 52821006897
+52824000000 52824006897
+52827000000 52827006851
+52830000000 52830006906
+52833000000 52833006871
+52836000000 52836006899
+52839000000 52839006898
+52842000000 52842006892
+52845000000 52845006847
+52848000000 52848006916
+52851000000 52851006895
+52854000000 52854006903
+52857000000 52857006889
+52860000000 52860006893
+52863000000 52863006895
+52866000000 52866006885
+52869000000 52869006881
+52872000000 52872006889
+52875000000 52875006885
+52878000000 52878006891
+52881000000 52881006882
+52884000000 52884006898
+52887000000 52887006868
+52890000000 52890006889
+52893000000 52893006884
+52896000000 52896006893
+52899000000 52899006882
+52902000000 52902006906
+52905000000 52905006887
+52908000000 52908006872
+52911000000 52911006886
+52914000000 52914006889
+52917000000 52917006892
+52920000000 52920006893
+52923000000 52923006903
+52926000000 52926006892
+52929000000 52929006896
+52932000000 52932006887
+52935000000 52935006885
+52938000000 52938006887
+52941000000 52941006886
+52944000000 52944006852
+52947000000 52947006882
+52950000000 52950006876
+52953000000 52953006892
+52956000000 52956006868
+52959000000 52959006880
+52962000000 52962006893
+52965000000 52965006895
+52968000000 52968006884
+52971000000 52971006826
+52974000000 52974006824
+52977000000 52977006896
+52980000000 52980006811
+52983000000 52983006885
+52986000000 52986006897
+52989000000 52989006889
+52992000000 52992006889
+52995000000 52995006848
+52998000000 52998006873
+53001000000 53001006796
+53004000000 53004006877
+53007000000 53007006889
+53010000000 53010006892
+53013000000 53013006859
+53016000000 53016006870
+53019000000 53019006888
+53022000000 53022006884
+53025000000 53025006892
+53028000000 53028006891
+53031000000 53031006885
+53034000000 53034006910
+53037000000 53037006889
+53040000000 53040006893
+53043000000 53043006878
+53046000000 53046006876
+53049000000 53049006847
+53052000000 53052006877
+53055000000 53055006885
+53058000000 53058006902
+53061000000 53061006892
+53064000000 53064006842
+53067000000 53067006896
+53070000000 53070006890
+53073000000 53073006884
+53076000000 53076006884
+53079000000 53079006898
+53082000000 53082006889
+53085000000 53085006895
+53088000000 53088006884
+53091000000 53091006834
+53094000000 53094006893
+53097000000 53097006889
+53100000000 53100006876
+53103000000 53103006887
+53106000000 53106006805
+53109000000 53109006888
+53112000000 53112006880
+53115000000 53115006881
+53118000000 53118006892
+53121000000 53121006892
+53124000000 53124006846
+53127000000 53127006901
+53130000000 53130006866
+53133000000 53133006894
+53136000000 53136006893
+53139000000 53139006887
+53142000000 53142006842
+53145000000 53145006911
+53148000000 53148006890
+53151000000 53151006898
+53154000000 53154006884
+53157000000 53157006888
+53160000000 53160006890
+53163000000 53163006880
+53166000000 53166006876
+53169000000 53169006884
+53172000000 53172006880
+53175000000 53175006886
+53178000000 53178006877
+53181000000 53181006893
+53184000000 53184006863
+53187000000 53187006884
+53190000000 53190006879
+53193000000 53193006888
+53196000000 53196006877
+53199000000 53199006901
+53202000000 53202006882
+53205000000 53205006867
+53208000000 53208006881
+53211000000 53211006884
+53214000000 53214006887
+53217000000 53217006888
+53220000000 53220006898
+53223000000 53223006887
+53226000000 53226006891
+53229000000 53229006882
+53232000000 53232006880
+53235000000 53235006882
+53238000000 53238006881
+53241000000 53241006847
+53244000000 53244006877
+53247000000 53247006871
+53250000000 53250006887
+53253000000 53253006863
+53256000000 53256006875
+53259000000 53259006888
+53262000000 53262006890
+53265000000 53265006879
+53268000000 53268006821
+53271000000 53271006819
+53274000000 53274006891
+53277000000 53277006806
+53280000000 53280006880
+53283000000 53283006892
+53286000000 53286006884
+53289000000 53289006884
+53292000000 53292006843
+53295000000 53295006868
+53298000000 53298006791
+53301000000 53301006872
+53304000000 53304006884
+53307000000 53307006887
+53310000000 53310006854
+53313000000 53313006865
+53316000000 53316006883
+53319000000 53319006879
+53322000000 53322006887
+53325000000 53325006886
+53328000000 53328006880
+53331000000 53331006905
+53334000000 53334006884
+53337000000 53337006888
+53340000000 53340006873
+53343000000 53343006871
+53346000000 53346006842
+53349000000 53349006872
+53352000000 53352006880
+53355000000 53355006897
+53358000000 53358006887
+53361000000 53361006837
+53364000000 53364006891
+53367000000 53367006885
+53370000000 53370006879
+53373000000 53373006879
+53376000000 53376006893
+53379000000 53379006884
+53382000000 53382006890
+53385000000 53385006879
+53388000000 53388006829
+53391000000 53391006888
+53394000000 53394006884
+53397000000 53397006871
+53400000000 53400006882
+53403000000 53403006800
+53406000000 53406006883
+53409000000 53409006875
+53412000000 53412006876
+53415000000 53415006887
+53418000000 53418006887
+53421000000 53421006841
+53424000000 53424006896
+53427000000 53427006861
+53430000000 53430006889
+53433000000 53433006888
+53436000000 53436006882
+53439000000 53439006837
+53442000000 53442006906
+53445000000 53445006885
+53448000000 53448006893
+53451000000 53451006879
+53454000000 53454006883
+53457000000 53457006885
+53460000000 53460006875
+53463000000 53463006871
+53466000000 53466006879
+53469000000 53469006875
+53472000000 53472006881
+53475000000 53475006872
+53478000000 53478006888
+53481000000 53481006858
+53484000000 53484006879
+53487000000 53487006874
+53490000000 53490006883
+53493000000 53493006872
+53496000000 53496006896
+53499000000 53499006877
+53502000000 53502006862
+53505000000 53505006876
+53508000000 53508006879
+53511000000 53511006882
+53514000000 53514006883
+53517000000 53517006893
+53520000000 53520006882
+53523000000 53523006886
+53526000000 53526006877
+53529000000 53529006875
+53532000000 53532006877
+53535000000 53535006876
+53538000000 53538006842
+53541000000 53541006872
+53544000000 53544006866
+53547000000 53547006882
+53550000000 53550006858
+53553000000 53553006870
+53556000000 53556006883
+53559000000 53559006885
+53562000000 53562006874
+53565000000 53565006816
+53568000000 53568006814
+53571000000 53571006886
+53574000000 53574006801
+53577000000 53577006875
+53580000000 53580006887
+53583000000 53583006879
+53586000000 53586006879
+53589000000 53589006838
+53592000000 53592006863
+53595000000 53595006786
+53598000000 53598006867
+53601000000 53601006879
+53604000000 53604006882
+53607000000 53607006849
+53610000000 53610006860
+53613000000 53613006878
+53616000000 53616006874
+53619000000 53619006882
+53622000000 53622006881
+53625000000 53625006875
+53628000000 53628006900
+53631000000 53631006879
+53634000000 53634006883
+53637000000 53637006868
+53640000000 53640006866
+53643000000 53643006837
+53646000000 53646006867
+53649000000 53649006875
+53652000000 53652006892
+53655000000 53655006882
+53658000000 53658006832
+53661000000 53661006886
+53664000000 53664006880
+53667000000 53667006874
+53670000000 53670006874
+53673000000 53673006888
+53676000000 53676006879
+53679000000 53679006885
+53682000000 53682006874
+53685000000 53685006824
+53688000000 53688006883
+53691000000 53691006879
+53694000000 53694006866
+53697000000 53697006877
+53700000000 53700006795
+53703000000 53703006878
+53706000000 53706006870
+53709000000 53709006871
+53712000000 53712006882
+53715000000 53715006882
+53718000000 53718006836
+53721000000 53721006891
+53724000000 53724006856
+53727000000 53727006884
+53730000000 53730006883
+53733000000 53733006877
+53736000000 53736006832
+53739000000 53739006901
+53742000000 53742006880
+53745000000 53745006888
+53748000000 53748006874
+53751000000 53751006878
+53754000000 53754006880
+53757000000 53757006870
+53760000000 53760006866
+53763000000 53763006874
+53766000000 53766006870
+53769000000 53769006876
+53772000000 53772006867
+53775000000 53775006883
+53778000000 53778006853
+53781000000 53781006874
+53784000000 53784006869
+53787000000 53787006878
+53790000000 53790006867
+53793000000 53793006891
+53796000000 53796006872
+53799000000 53799006857
+53802000000 53802006871
+53805000000 53805006874
+53808000000 53808006877
+53811000000 53811006878
+53814000000 53814006888
+53817000000 53817006877
+53820000000 53820006881
+53823000000 53823006872
+53826000000 53826006870
+53829000000 53829006872
+53832000000 53832006871
+53835000000 53835006837
+53838000000 53838006867
+53841000000 53841006861
+53844000000 53844006877
+53847000000 53847006853
+53850000000 53850006865
+53853000000 53853006878
+53856000000 53856006880
+53859000000 53859006869
+53862000000 53862006811
+53865000000 53865006809
+53868000000 53868006881
+53871000000 53871006796
+53874000000 53874006870
+53877000000 53877006882
+53880000000 53880006874
+53883000000 53883006874
+53886000000 53886006833
+53889000000 53889006858
+53892000000 53892006781
+53895000000 53895006862
+53898000000 53898006874
+53901000000 53901006877
+53904000000 53904006844
+53907000000 53907006855
+53910000000 53910006873
+53913000000 53913006869
+53916000000 53916006877
+53919000000 53919006876
+53922000000 53922006870
+53925000000 53925006895
+53928000000 53928006874
+53931000000 53931006878
+53934000000 53934006863
+53937000000 53937006861
+53940000000 53940006832
+53943000000 53943006862
+53946000000 53946006870
+53949000000 53949006887
+53952000000 53952006877
+53955000000 53955006827
+53958000000 53958006881
+53961000000 53961006875
+53964000000 53964006869
+53967000000 53967006869
+53970000000 53970006883
+53973000000 53973006874
+53976000000 53976006880
+53979000000 53979006869
+53982000000 53982006819
+53985000000 53985006878
+53988000000 53988006874
+53991000000 53991006861
+53994000000 53994006872
+53997000000 53997006790
+54000000000 54000006873
+54003000000 54003006865
+54006000000 54006006866
+54009000000 54009006877
+54012000000 54012006877
+54015000000 54015006831
+54018000000 54018006886
+54021000000 54021006851
+54024000000 54024006879
+54027000000 54027006878
+54030000000 54030006872
+54033000000 54033006827
+54036000000 54036006896
+54039000000 54039006875
+54042000000 54042006883
+54045000000 54045006869
+54048000000 54048006873
+54051000000 54051006875
+54054000000 54054006865
+54057000000 54057006861
+54060000000 54060006869
+54063000000 54063006865
+54066000000 54066006871
+54069000000 54069006862
+54072000000 54072006878
+54075000000 54075006848
+54078000000 54078006869
+54081000000 54081006864
+54084000000 54084006873
+54087000000 54087006862
+54090000000 54090006886
+54093000000 54093006867
+54096000000 54096006852
+54099000000 54099006866
+54102000000 54102006869
+54105000000 54105006872
+54108000000 54108006873
+54111000000 54111006883
+54114000000 54114006872
+54117000000 54117006876
+54120000000 54120006867
+54123000000 54123006865
+54126000000 54126006867
+54129000000 54129006866
+54132000000 54132006832
+54135000000 54135006862
+54138000000 54138006856
+54141000000 54141006872
+54144000000 54144006848
+54147000000 54147006860
+54150000000 54150006873
+54153000000 54153006875
+54156000000 54156006864
+54159000000 54159006806
+54162000000 54162006804
+54165000000 54165006876
+54168000000 54168006791
+54171000000 54171006865
+54174000000 54174006877
+54177000000 54177006869
+54180000000 54180006869
+54183000000 54183006828
+54186000000 54186006853
+54189000000 54189006776
+54192000000 54192006857
+54195000000 54195006869
+54198000000 54198006872
+54201000000 54201006839
+54204000000 54204006850
+54207000000 54207006868
+54210000000 54210006864
+54213000000 54213006872
+54216000000 54216006871
+54219000000 54219006865
+54222000000 54222006890
+54225000000 54225006869
+54228000000 54228006873
+54231000000 54231006858
+54234000000 54234006856
+54237000000 54237006827
+54240000000 54240006857
+54243000000 54243006865
+54246000000 54246006882
+54249000000 54249006872
+54252000000 54252006822
+54255000000 54255006876
+54258000000 54258006870
+54261000000 54261006864
+54264000000 54264006864
+54267000000 54267006878
+54270000000 54270006869
+54273000000 54273006875
+54276000000 54276006864
+54279000000 54279006814
+54282000000 54282006873
+54285000000 54285006869
+54288000000 54288006856
+54291000000 54291006867
+54294000000 54294006785
+54297000000 54297006868
+54300000000 54300006860
+54303000000 54303006861
+54306000000 54306006872
+54309000000 54309006872
+54312000000 54312006826
+54315000000 54315006881
+54318000000 54318006846
+54321000000 54321006874
+54324000000 54324006873
+54327000000 54327006867
+54330000000 54330006822
+54333000000 54333006891
+54336000000 54336006870
+54339000000 54339006878
+54342000000 54342006864
+54345000000 54345006868
+54348000000 54348006870
+54351000000 54351006860
+54354000000 54354006856
+54357000000 54357006864
+54360000000 54360006860
+54363000000 54363006866
+54366000000 54366006857
+54369000000 54369006873
+54372000000 54372006843
+54375000000 54375006864
+54378000000 54378006859
+54381000000 54381006868
+54384000000 54384006857
+54387000000 54387006881
+54390000000 54390006862
+54393000000 54393006847
+54396000000 54396006861
+54399000000 54399006864
+54402000000 54402006867
+54405000000 54405006868
+54408000000 54408006878
+54411000000 54411006867
+54414000000 54414006871
+54417000000 54417006862
+54420000000 54420006860
+54423000000 54423006862
+54426000000 54426006861
+54429000000 54429006827
+54432000000 54432006857
+54435000000 54435006851
+54438000000 54438006867
+54441000000 54441006843
+54444000000 54444006855
+54447000000 54447006868
+54450000000 54450006870
+54453000000 54453006859
+54456000000 54456006801
+54459000000 54459006799
+54462000000 54462006871
+54465000000 54465006786
+54468000000 54468006860
+54471000000 54471006872
+54474000000 54474006864
+54477000000 54477006864
+54480000000 54480006823
+54483000000 54483006848
+54486000000 54486006771
+54489000000 54489006852
+54492000000 54492006864
+54495000000 54495006867
+54498000000 54498006834
+54501000000 54501006845
+54504000000 54504006863
+54507000000 54507006859
+54510000000 54510006867
+54513000000 54513006866
+54516000000 54516006860
+54519000000 54519006885
+54522000000 54522006864
+54525000000 54525006868
+54528000000 54528006853
+54531000000 54531006851
+54534000000 54534006822
+54537000000 54537006852
+54540000000 54540006860
+54543000000 54543006877
+54546000000 54546006867
+54549000000 54549006817
+54552000000 54552006871
+54555000000 54555006865
+54558000000 54558006859
+54561000000 54561006859
+54564000000 54564006873
+54567000000 54567006864
+54570000000 54570006870
+54573000000 54573006859
+54576000000 54576006809
+54579000000 54579006868
+54582000000 54582006864
+54585000000 54585006851
+54588000000 54588006862
+54591000000 54591006780
+54594000000 54594006863
+54597000000 54597006855
+54600000000 54600006856
+54603000000 54603006867
+54606000000 54606006867
+54609000000 54609006821
+54612000000 54612006876
+54615000000 54615006841
+54618000000 54618006869
+54621000000 54621006868
+54624000000 54624006862
+54627000000 54627006817
+54630000000 54630006886
+54633000000 54633006865
+54636000000 54636006873
+54639000000 54639006859
+54642000000 54642006863
+54645000000 54645006865
+54648000000 54648006855
+54651000000 54651006851
+54654000000 54654006859
+54657000000 54657006855
+54660000000 54660006861
+54663000000 54663006852
+54666000000 54666006868
+54669000000 54669006838
+54672000000 54672006859
+54675000000 54675006854
+54678000000 54678006863
+54681000000 54681006852
+54684000000 54684006876
+54687000000 54687006857
+54690000000 54690006842
+54693000000 54693006856
+54696000000 54696006859
+54699000000 54699006862
+54702000000 54702006863
+54705000000 54705006873
+54708000000 54708006862
+54711000000 54711006866
+54714000000 54714006857
+54717000000 54717006855
+54720000000 54720006857
+54723000000 54723006856
+54726000000 54726006822
+54729000000 54729006852
+54732000000 54732006846
+54735000000 54735006862
+54738000000 54738006838
+54741000000 54741006850
+54744000000 54744006863
+54747000000 54747006865
+54750000000 54750006854
+54753000000 54753006796
+54756000000 54756006794
+54759000000 54759006866
+54762000000 54762006781
+54765000000 54765006855
+54768000000 54768006867
+54771000000 54771006859
+54774000000 54774006859
+54777000000 54777006818
+54780000000 54780006843
+54783000000 54783006766
+54786000000 54786006847
+54789000000 54789006859
+54792000000 54792006862
+54795000000 54795006829
+54798000000 54798006840
+54801000000 54801006858
+54804000000 54804006854
+54807000000 54807006862
+54810000000 54810006861
+54813000000 54813006855
+54816000000 54816006880
+54819000000 54819006859
+54822000000 54822006863
+54825000000 54825006848
+54828000000 54828006846
+54831000000 54831006817
+54834000000 54834006847
+54837000000 54837006855
+54840000000 54840006872
+54843000000 54843006862
+54846000000 54846006812
+54849000000 54849006866
+54852000000 54852006860
+54855000000 54855006854
+54858000000 54858006854
+54861000000 54861006868
+54864000000 54864006859
+54867000000 54867006865
+54870000000 54870006854
+54873000000 54873006804
+54876000000 54876006863
+54879000000 54879006859
+54882000000 54882006846
+54885000000 54885006857
+54888000000 54888006775
+54891000000 54891006858
+54894000000 54894006850
+54897000000 54897006851
+54900000000 54900006862
+54903000000 54903006862
+54906000000 54906006816
+54909000000 54909006871
+54912000000 54912006836
+54915000000 54915006864
+54918000000 54918006863
+54921000000 54921006857
+54924000000 54924006812
+54927000000 54927006881
+54930000000 54930006860
+54933000000 54933006868
+54936000000 54936006854
+54939000000 54939006858
+54942000000 54942006860
+54945000000 54945006850
+54948000000 54948006846
+54951000000 54951006854
+54954000000 54954006850
+54957000000 54957006856
+54960000000 54960006847
+54963000000 54963006863
+54966000000 54966006833
+54969000000 54969006854
+54972000000 54972006849
+54975000000 54975006858
+54978000000 54978006847
+54981000000 54981006871
+54984000000 54984006852
+54987000000 54987006837
+54990000000 54990006851
+54993000000 54993006854
+54996000000 54996006857
+54999000000 54999006858
+55002000000 55002006868
+55005000000 55005006857
+55008000000 55008006861
+55011000000 55011006852
+55014000000 55014006850
+55017000000 55017006852
+55020000000 55020006851
+55023000000 55023006817
+55026000000 55026006847
+55029000000 55029006841
+55032000000 55032006857
+55035000000 55035006833
+55038000000 55038006845
+55041000000 55041006858
+55044000000 55044006860
+55047000000 55047006849
+55050000000 55050006791
+55053000000 55053006789
+55056000000 55056006861
+55059000000 55059006776
+55062000000 55062006850
+55065000000 55065006862
+55068000000 55068006854
+55071000000 55071006854
+55074000000 55074006813
+55077000000 55077006838
+55080000000 55080006761
+55083000000 55083006842
+55086000000 55086006854
+55089000000 55089006857
+55092000000 55092006824
+55095000000 55095006835
+55098000000 55098006853
+55101000000 55101006849
+55104000000 55104006857
+55107000000 55107006856
+55110000000 55110006850
+55113000000 55113006875
+55116000000 55116006854
+55119000000 55119006858
+55122000000 55122006843
+55125000000 55125006841
+55128000000 55128006812
+55131000000 55131006842
+55134000000 55134006850
+55137000000 55137006867
+55140000000 55140006857
+55143000000 55143006807
+55146000000 55146006861
+55149000000 55149006855
+55152000000 55152006849
+55155000000 55155006849
+55158000000 55158006863
+55161000000 55161006854
+55164000000 55164006860
+55167000000 55167006849
+55170000000 55170006799
+55173000000 55173006858
+55176000000 55176006854
+55179000000 55179006841
+55182000000 55182006852
+55185000000 55185006770
+55188000000 55188006853
+55191000000 55191006845
+55194000000 55194006846
+55197000000 55197006857
+55200000000 55200006857
+55203000000 55203006811
+55206000000 55206006866
+55209000000 55209006831
+55212000000 55212006859
+55215000000 55215006858
+55218000000 55218006852
+55221000000 55221006807
+55224000000 55224006876
+55227000000 55227006855
+55230000000 55230006863
+55233000000 55233006849
+55236000000 55236006853
+55239000000 55239006855
+55242000000 55242006845
+55245000000 55245006841
+55248000000 55248006849
+55251000000 55251006845
+55254000000 55254006851
+55257000000 55257006842
+55260000000 55260006858
+55263000000 55263006828
+55266000000 55266006849
+55269000000 55269006844
+55272000000 55272006853
+55275000000 55275006842
+55278000000 55278006866
+55281000000 55281006847
+55284000000 55284006832
+55287000000 55287006846
+55290000000 55290006849
+55293000000 55293006852
+55296000000 55296006853
+55299000000 55299006863
+55302000000 55302006852
+55305000000 55305006856
+55308000000 55308006847
+55311000000 55311006845
+55314000000 55314006847
+55317000000 55317006846
+55320000000 55320006812
+55323000000 55323006842
+55326000000 55326006836
+55329000000 55329006852
+55332000000 55332006828
+55335000000 55335006840
+55338000000 55338006853
+55341000000 55341006855
+55344000000 55344006844
+55347000000 55347006786
+55350000000 55350006784
+55353000000 55353006856
+55356000000 55356006771
+55359000000 55359006845
+55362000000 55362006857
+55365000000 55365006849
+55368000000 55368006849
+55371000000 55371006808
+55374000000 55374006833
+55377000000 55377006756
+55380000000 55380006837
+55383000000 55383006849
+55386000000 55386006852
+55389000000 55389006819
+55392000000 55392006830
+55395000000 55395006848
+55398000000 55398006844
+55401000000 55401006852
+55404000000 55404006851
+55407000000 55407006845
+55410000000 55410006870
+55413000000 55413006849
+55416000000 55416006853
+55419000000 55419006838
+55422000000 55422006836
+55425000000 55425006807
+55428000000 55428006837
+55431000000 55431006845
+55434000000 55434006862
+55437000000 55437006852
+55440000000 55440006802
+55443000000 55443006856
+55446000000 55446006850
+55449000000 55449006844
+55452000000 55452006844
+55455000000 55455006858
+55458000000 55458006849
+55461000000 55461006855
+55464000000 55464006844
+55467000000 55467006794
+55470000000 55470006853
+55473000000 55473006849
+55476000000 55476006836
+55479000000 55479006847
+55482000000 55482006765
+55485000000 55485006848
+55488000000 55488006840
+55491000000 55491006841
+55494000000 55494006852
+55497000000 55497006852
+55500000000 55500006806
+55503000000 55503006861
+55506000000 55506006826
+55509000000 55509006854
+55512000000 55512006853
+55515000000 55515006847
+55518000000 55518006802
+55521000000 55521006871
+55524000000 55524006850
+55527000000 55527006858
+55530000000 55530006844
+55533000000 55533006848
+55536000000 55536006850
+55539000000 55539006840
+55542000000 55542006836
+55545000000 55545006844
+55548000000 55548006840
+55551000000 55551006846
+55554000000 55554006837
+55557000000 55557006853
+55560000000 55560006823
+55563000000 55563006844
+55566000000 55566006839
+55569000000 55569006848
+55572000000 55572006837
+55575000000 55575006861
+55578000000 55578006842
+55581000000 55581006827
+55584000000 55584006841
+55587000000 55587006844
+55590000000 55590006847
+55593000000 55593006848
+55596000000 55596006858
+55599000000 55599006847
+55602000000 55602006851
+55605000000 55605006842
+55608000000 55608006840
+55611000000 55611006842
+55614000000 55614006841
+55617000000 55617006807
+55620000000 55620006837
+55623000000 55623006831
+55626000000 55626006847
+55629000000 55629006823
+55632000000 55632006835
+55635000000 55635006848
+55638000000 55638006850
+55641000000 55641006839
+55644000000 55644006781
+55647000000 55647006779
+55650000000 55650006851
+55653000000 55653006766
+55656000000 55656006840
+55659000000 55659006852
+55662000000 55662006844
+55665000000 55665006844
+55668000000 55668006803
+55671000000 55671006828
+55674000000 55674006751
+55677000000 55677006832
+55680000000 55680006844
+55683000000 55683006847
+55686000000 55686006814
+55689000000 55689006825
+55692000000 55692006843
+55695000000 55695006839
+55698000000 55698006847
+55701000000 55701006846
+55704000000 55704006840
+55707000000 55707006865
+55710000000 55710006844
+55713000000 55713006848
+55716000000 55716006833
+55719000000 55719006831
+55722000000 55722006802
+55725000000 55725006832
+55728000000 55728006840
+55731000000 55731006857
+55734000000 55734006847
+55737000000 55737006797
+55740000000 55740006851
+55743000000 55743006845
+55746000000 55746006839
+55749000000 55749006839
+55752000000 55752006853
+55755000000 55755006844
+55758000000 55758006850
+55761000000 55761006839
+55764000000 55764006789
+55767000000 55767006848
+55770000000 55770006844
+55773000000 55773006831
+55776000000 55776006842
+55779000000 55779006760
+55782000000 55782006843
+55785000000 55785006835
+55788000000 55788006836
+55791000000 55791006847
+55794000000 55794006847
+55797000000 55797006801
+55800000000 55800006856
+55803000000 55803006821
+55806000000 55806006849
+55809000000 55809006848
+55812000000 55812006842
+55815000000 55815006797
+55818000000 55818006866
+55821000000 55821006845
+55824000000 55824006853
+55827000000 55827006839
+55830000000 55830006843
+55833000000 55833006845
+55836000000 55836006835
+55839000000 55839006831
+55842000000 55842006839
+55845000000 55845006835
+55848000000 55848006841
+55851000000 55851006832
+55854000000 55854006848
+55857000000 55857006818
+55860000000 55860006839
+55863000000 55863006834
+55866000000 55866006843
+55869000000 55869006832
+55872000000 55872006856
+55875000000 55875006837
+55878000000 55878006822
+55881000000 55881006836
+55884000000 55884006839
+55887000000 55887006842
+55890000000 55890006843
+55893000000 55893006853
+55896000000 55896006842
+55899000000 55899006846
+55902000000 55902006837
+55905000000 55905006835
+55908000000 55908006837
+55911000000 55911006836
+55914000000 55914006802
+55917000000 55917006832
+55920000000 55920006826
+55923000000 55923006842
+55926000000 55926006818
+55929000000 55929006830
+55932000000 55932006843
+55935000000 55935006845
+55938000000 55938006834
+55941000000 55941006776
+55944000000 55944006774
+55947000000 55947006846
+55950000000 55950006761
+55953000000 55953006835
+55956000000 55956006847
+55959000000 55959006839
+55962000000 55962006839
+55965000000 55965006798
+55968000000 55968006823
+55971000000 55971006746
+55974000000 55974006827
+55977000000 55977006839
+55980000000 55980006842
+55983000000 55983006809
+55986000000 55986006820
+55989000000 55989006838
+55992000000 55992006834
+55995000000 55995006842
+55998000000 55998006841
+56001000000 56001006835
+56004000000 56004006860
+56007000000 56007006839
+56010000000 56010006843
+56013000000 56013006828
+56016000000 56016006826
+56019000000 56019006797
+56022000000 56022006827
+56025000000 56025006835
+56028000000 56028006852
+56031000000 56031006842
+56034000000 56034006792
+56037000000 56037006846
+56040000000 56040006840
+56043000000 56043006834
+56046000000 56046006834
+56049000000 56049006848
+56052000000 56052006839
+56055000000 56055006845
+56058000000 56058006834
+56061000000 56061006784
+56064000000 56064006843
+56067000000 56067006839
+56070000000 56070006826
+56073000000 56073006837
+56076000000 56076006755
+56079000000 56079006838
+56082000000 56082006830
+56085000000 56085006831
+56088000000 56088006842
+56091000000 56091006842
+56094000000 56094006796
+56097000000 56097006851
+56100000000 56100006816
+56103000000 56103006844
+56106000000 56106006843
+56109000000 56109006837
+56112000000 56112006792
+56115000000 56115006861
+56118000000 56118006840
+56121000000 56121006848
+56124000000 56124006834
+56127000000 56127006838
+56130000000 56130006840
+56133000000 56133006830
+56136000000 56136006826
+56139000000 56139006834
+56142000000 56142006830
+56145000000 56145006836
+56148000000 56148006827
+56151000000 56151006843
+56154000000 56154006813
+56157000000 56157006834
+56160000000 56160006829
+56163000000 56163006838
+56166000000 56166006827
+56169000000 56169006851
+56172000000 56172006832
+56175000000 56175006817
+56178000000 56178006831
+56181000000 56181006834
+56184000000 56184006837
+56187000000 56187006838
+56190000000 56190006848
+56193000000 56193006837
+56196000000 56196006841
+56199000000 56199006832
+56202000000 56202006830
+56205000000 56205006832
+56208000000 56208006831
+56211000000 56211006797
+56214000000 56214006827
+56217000000 56217006821
+56220000000 56220006837
+56223000000 56223006813
+56226000000 56226006825
+56229000000 56229006838
+56232000000 56232006840
+56235000000 56235006829
+56238000000 56238006771
+56241000000 56241006769
+56244000000 56244006841
+56247000000 56247006756
+56250000000 56250006830
+56253000000 56253006842
+56256000000 56256006834
+56259000000 56259006834
+56262000000 56262006793
+56265000000 56265006818
+56268000000 56268006741
+56271000000 56271006822
+56274000000 56274006834
+56277000000 56277006837
+56280000000 56280006804
+56283000000 56283006815
+56286000000 56286006833
+56289000000 56289006829
+56292000000 56292006837
+56295000000 56295006836
+56298000000 56298006830
+56301000000 56301006855
+56304000000 56304006834
+56307000000 56307006838
+56310000000 56310006823
+56313000000 56313006821
+56316000000 56316006792
+56319000000 56319006822
+56322000000 56322006830
+56325000000 56325006847
+56328000000 56328006837
+56331000000 56331006787
+56334000000 56334006841
+56337000000 56337006835
+56340000000 56340006829
+56343000000 56343006829
+56346000000 56346006843
+56349000000 56349006834
+56352000000 56352006840
+56355000000 56355006829
+56358000000 56358006779
+56361000000 56361006838
+56364000000 56364006834
+56367000000 56367006821
+56370000000 56370006832
+56373000000 56373006750
+56376000000 56376006833
+56379000000 56379006825
+56382000000 56382006826
+56385000000 56385006837
+56388000000 56388006837
+56391000000 56391006791
+56394000000 56394006846
+56397000000 56397006811
+56400000000 56400006839
+56403000000 56403006838
+56406000000 56406006832
+56409000000 56409006787
+56412000000 56412006856
+56415000000 56415006835
+56418000000 56418006843
+56421000000 56421006829
+56424000000 56424006833
+56427000000 56427006835
+56430000000 56430006825
+56433000000 56433006821
+56436000000 56436006829
+56439000000 56439006825
+56442000000 56442006831
+56445000000 56445006822
+56448000000 56448006838
+56451000000 56451006808
+56454000000 56454006829
+56457000000 56457006824
+56460000000 56460006833
+56463000000 56463006822
+56466000000 56466006846
+56469000000 56469006827
+56472000000 56472006812
+56475000000 56475006826
+56478000000 56478006829
+56481000000 56481006832
+56484000000 56484006833
+56487000000 56487006843
+56490000000 56490006832
+56493000000 56493006836
+56496000000 56496006827
+56499000000 56499006825
+56502000000 56502006827
+56505000000 56505006826
+56508000000 56508006792
+56511000000 56511006822
+56514000000 56514006816
+56517000000 56517006832
+56520000000 56520006808
+56523000000 56523006820
+56526000000 56526006833
+56529000000 56529006835
+56532000000 56532006824
+56535000000 56535006766
+56538000000 56538006764
+56541000000 56541006836
+56544000000 56544006751
+56547000000 56547006825
+56550000000 56550006837
+56553000000 56553006829
+56556000000 56556006829
+56559000000 56559006788
+56562000000 56562006813
+56565000000 56565006736
+56568000000 56568006817
+56571000000 56571006829
+56574000000 56574006832
+56577000000 56577006799
+56580000000 56580006810
+56583000000 56583006828
+56586000000 56586006824
+56589000000 56589006832
+56592000000 56592006831
+56595000000 56595006825
+56598000000 56598006850
+56601000000 56601006829
+56604000000 56604006833
+56607000000 56607006818
+56610000000 56610006816
+56613000000 56613006787
+56616000000 56616006817
+56619000000 56619006825
+56622000000 56622006842
+56625000000 56625006832
+56628000000 56628006782
+56631000000 56631006836
+56634000000 56634006830
+56637000000 56637006824
+56640000000 56640006824
+56643000000 56643006838
+56646000000 56646006829
+56649000000 56649006835
+56652000000 56652006824
+56655000000 56655006774
+56658000000 56658006833
+56661000000 56661006829
+56664000000 56664006816
+56667000000 56667006827
+56670000000 56670006745
+56673000000 56673006828
+56676000000 56676006820
+56679000000 56679006821
+56682000000 56682006832
+56685000000 56685006832
+56688000000 56688006786
+56691000000 56691006841
+56694000000 56694006806
+56697000000 56697006834
+56700000000 56700006833
+56703000000 56703006827
+56706000000 56706006782
+56709000000 56709006851
+56712000000 56712006830
+56715000000 56715006838
+56718000000 56718006824
+56721000000 56721006828
+56724000000 56724006830
+56727000000 56727006820
+56730000000 56730006816
+56733000000 56733006824
+56736000000 56736006820
+56739000000 56739006826
+56742000000 56742006817
+56745000000 56745006833
+56748000000 56748006803
+56751000000 56751006824
+56754000000 56754006819
+56757000000 56757006828
+56760000000 56760006817
+56763000000 56763006841
+56766000000 56766006822
+56769000000 56769006807
+56772000000 56772006821
+56775000000 56775006824
+56778000000 56778006827
+56781000000 56781006828
+56784000000 56784006838
+56787000000 56787006827
+56790000000 56790006831
+56793000000 56793006822
+56796000000 56796006820
+56799000000 56799006822
+56802000000 56802006821
+56805000000 56805006787
+56808000000 56808006817
+56811000000 56811006811
+56814000000 56814006827
+56817000000 56817006803
+56820000000 56820006815
+56823000000 56823006828
+56826000000 56826006830
+56829000000 56829006819
+56832000000 56832006761
+56835000000 56835006759
+56838000000 56838006831
+56841000000 56841006746
+56844000000 56844006820
+56847000000 56847006832
+56850000000 56850006824
+56853000000 56853006824
+56856000000 56856006783
+56859000000 56859006808
+56862000000 56862006731
+56865000000 56865006812
+56868000000 56868006824
+56871000000 56871006827
+56874000000 56874006794
+56877000000 56877006805
+56880000000 56880006823
+56883000000 56883006819
+56886000000 56886006827
+56889000000 56889006826
+56892000000 56892006820
+56895000000 56895006845
+56898000000 56898006824
+56901000000 56901006828
+56904000000 56904006813
+56907000000 56907006811
+56910000000 56910006782
+56913000000 56913006812
+56916000000 56916006820
+56919000000 56919006837
+56922000000 56922006827
+56925000000 56925006777
+56928000000 56928006831
+56931000000 56931006825
+56934000000 56934006819
+56937000000 56937006819
+56940000000 56940006833
+56943000000 56943006824
+56946000000 56946006830
+56949000000 56949006819
+56952000000 56952006769
+56955000000 56955006828
+56958000000 56958006824
+56961000000 56961006811
+56964000000 56964006822
+56967000000 56967006740
+56970000000 56970006823
+56973000000 56973006815
+56976000000 56976006816
+56979000000 56979006827
+56982000000 56982006827
+56985000000 56985006781
+56988000000 56988006836
+56991000000 56991006801
+56994000000 56994006829
+56997000000 56997006828
+57000000000 57000006822
+57003000000 57003006777
+57006000000 57006006846
+57009000000 57009006825
+57012000000 57012006833
+57015000000 57015006819
+57018000000 57018006823
+57021000000 57021006825
+57024000000 57024006815
+57027000000 57027006811
+57030000000 57030006819
+57033000000 57033006815
+57036000000 57036006821
+57039000000 57039006812
+57042000000 57042006828
+57045000000 57045006798
+57048000000 57048006819
+57051000000 57051006814
+57054000000 57054006823
+57057000000 57057006812
+57060000000 57060006836
+57063000000 57063006817
+57066000000 57066006802
+57069000000 57069006816
+57072000000 57072006819
+57075000000 57075006822
+57078000000 57078006823
+57081000000 57081006833
+57084000000 57084006822
+57087000000 57087006826
+57090000000 57090006817
+57093000000 57093006815
+57096000000 57096006817
+57099000000 57099006816
+57102000000 57102006782
+57105000000 57105006812
+57108000000 57108006806
+57111000000 57111006822
+57114000000 57114006798
+57117000000 57117006810
+57120000000 57120006823
+57123000000 57123006825
+57126000000 57126006814
+57129000000 57129006756
+57132000000 57132006754
+57135000000 57135006826
+57138000000 57138006741
+57141000000 57141006815
+57144000000 57144006827
+57147000000 57147006819
+57150000000 57150006819
+57153000000 57153006778
+57156000000 57156006803
+57159000000 57159006726
+57162000000 57162006807
+57165000000 57165006819
+57168000000 57168006822
+57171000000 57171006789
+57174000000 57174006800
+57177000000 57177006818
+57180000000 57180006814
+57183000000 57183006822
+57186000000 57186006821
+57189000000 57189006815
+57192000000 57192006840
+57195000000 57195006819
+57198000000 57198006823
+57201000000 57201006808
+57204000000 57204006806
+57207000000 57207006777
+57210000000 57210006807
+57213000000 57213006815
+57216000000 57216006832
+57219000000 57219006822
+57222000000 57222006772
+57225000000 57225006826
+57228000000 57228006820
+57231000000 57231006814
+57234000000 57234006814
+57237000000 57237006828
+57240000000 57240006819
+57243000000 57243006825
+57246000000 57246006814
+57249000000 57249006764
+57252000000 57252006823
+57255000000 57255006819
+57258000000 57258006806
+57261000000 57261006817
+57264000000 57264006735
+57267000000 57267006818
+57270000000 57270006810
+57273000000 57273006811
+57276000000 57276006822
+57279000000 57279006822
+57282000000 57282006776
+57285000000 57285006831
+57288000000 57288006796
+57291000000 57291006824
+57294000000 57294006823
+57297000000 57297006817
+57300000000 57300006772
+57303000000 57303006841
+57306000000 57306006820
+57309000000 57309006828
+57312000000 57312006814
+57315000000 57315006818
+57318000000 57318006820
+57321000000 57321006810
+57324000000 57324006806
+57327000000 57327006814
+57330000000 57330006810
+57333000000 57333006816
+57336000000 57336006807
+57339000000 57339006823
+57342000000 57342006793
+57345000000 57345006814
+57348000000 57348006809
+57351000000 57351006818
+57354000000 57354006807
+57357000000 57357006831
+57360000000 57360006812
+57363000000 57363006797
+57366000000 57366006811
+57369000000 57369006814
+57372000000 57372006817
+57375000000 57375006818
+57378000000 57378006828
+57381000000 57381006817
+57384000000 57384006821
+57387000000 57387006812
+57390000000 57390006810
+57393000000 57393006812
+57396000000 57396006811
+57399000000 57399006777
+57402000000 57402006807
+57405000000 57405006801
+57408000000 57408006817
+57411000000 57411006793
+57414000000 57414006805
+57417000000 57417006818
+57420000000 57420006820
+57423000000 57423006809
+57426000000 57426006751
+57429000000 57429006749
+57432000000 57432006821
+57435000000 57435006736
+57438000000 57438006810
+57441000000 57441006822
+57444000000 57444006814
+57447000000 57447006814
+57450000000 57450006773
+57453000000 57453006798
+57456000000 57456006721
+57459000000 57459006802
+57462000000 57462006814
+57465000000 57465006817
+57468000000 57468006784
+57471000000 57471006795
+57474000000 57474006813
+57477000000 57477006809
+57480000000 57480006817
+57483000000 57483006816
+57486000000 57486006810
+57489000000 57489006835
+57492000000 57492006814
+57495000000 57495006818
+57498000000 57498006803
+57501000000 57501006801
+57504000000 57504006772
+57507000000 57507006802
+57510000000 57510006810
+57513000000 57513006827
+57516000000 57516006817
+57519000000 57519006767
+57522000000 57522006821
+57525000000 57525006815
+57528000000 57528006809
+57531000000 57531006809
+57534000000 57534006823
+57537000000 57537006814
+57540000000 57540006820
+57543000000 57543006809
+57546000000 57546006759
+57549000000 57549006818
+57552000000 57552006814
+57555000000 57555006801
+57558000000 57558006812
+57561000000 57561006730
+57564000000 57564006813
+57567000000 57567006805
+57570000000 57570006806
+57573000000 57573006817
+57576000000 57576006817
+57579000000 57579006771
+57582000000 57582006826
+57585000000 57585006791
+57588000000 57588006819
+57591000000 57591006818
+57594000000 57594006812
+57597000000 57597006767
+57600000000 57600006836
+57603000000 57603006815
+57606000000 57606006823
+57609000000 57609006809
+57612000000 57612006813
+57615000000 57615006815
+57618000000 57618006805
+57621000000 57621006801
+57624000000 57624006809
+57627000000 57627006805
+57630000000 57630006811
+57633000000 57633006802
+57636000000 57636006818
+57639000000 57639006788
+57642000000 57642006809
+57645000000 57645006804
+57648000000 57648006813
+57651000000 57651006802
+57654000000 57654006826
+57657000000 57657006807
+57660000000 57660006792
+57663000000 57663006806
+57666000000 57666006809
+57669000000 57669006812
+57672000000 57672006813
+57675000000 57675006823
+57678000000 57678006812
+57681000000 57681006816
+57684000000 57684006807
+57687000000 57687006805
+57690000000 57690006807
+57693000000 57693006806
+57696000000 57696006772
+57699000000 57699006802
+57702000000 57702006796
+57705000000 57705006812
+57708000000 57708006788
+57711000000 57711006800
+57714000000 57714006813
+57717000000 57717006815
+57720000000 57720006804
+57723000000 57723006746
+57726000000 57726006744
+57729000000 57729006816
+57732000000 57732006731
+57735000000 57735006805
+57738000000 57738006817
+57741000000 57741006809
+57744000000 57744006809
+57747000000 57747006768
+57750000000 57750006793
+57753000000 57753006716
+57756000000 57756006797
+57759000000 57759006809
+57762000000 57762006812
+57765000000 57765006779
+57768000000 57768006790
+57771000000 57771006808
+57774000000 57774006804
+57777000000 57777006812
+57780000000 57780006811
+57783000000 57783006805
+57786000000 57786006830
+57789000000 57789006809
+57792000000 57792006813
+57795000000 57795006798
+57798000000 57798006796
+57801000000 57801006767
+57804000000 57804006797
+57807000000 57807006805
+57810000000 57810006822
+57813000000 57813006812
+57816000000 57816006762
+57819000000 57819006816
+57822000000 57822006810
+57825000000 57825006804
+57828000000 57828006804
+57831000000 57831006818
+57834000000 57834006809
+57837000000 57837006815
+57840000000 57840006804
+57843000000 57843006754
+57846000000 57846006813
+57849000000 57849006809
+57852000000 57852006796
+57855000000 57855006807
+57858000000 57858006725
+57861000000 57861006808
+57864000000 57864006800
+57867000000 57867006801
+57870000000 57870006812
+57873000000 57873006812
+57876000000 57876006766
+57879000000 57879006821
+57882000000 57882006786
+57885000000 57885006814
+57888000000 57888006813
+57891000000 57891006807
+57894000000 57894006762
+57897000000 57897006831
+57900000000 57900006810
+57903000000 57903006818
+57906000000 57906006804
+57909000000 57909006808
+57912000000 57912006810
+57915000000 57915006800
+57918000000 57918006796
+57921000000 57921006804
+57924000000 57924006800
+57927000000 57927006806
+57930000000 57930006797
+57933000000 57933006813
+57936000000 57936006783
+57939000000 57939006804
+57942000000 57942006799
+57945000000 57945006808
+57948000000 57948006797
+57951000000 57951006821
+57954000000 57954006802
+57957000000 57957006787
+57960000000 57960006801
+57963000000 57963006804
+57966000000 57966006807
+57969000000 57969006808
+57972000000 57972006818
+57975000000 57975006807
+57978000000 57978006811
+57981000000 57981006802
+57984000000 57984006800
+57987000000 57987006802
+57990000000 57990006801
+57993000000 57993006767
+57996000000 57996006797
+57999000000 57999006791
+58002000000 58002006807
+58005000000 58005006783
+58008000000 58008006795
+58011000000 58011006808
+58014000000 58014006810
+58017000000 58017006799
+58020000000 58020006741
+58023000000 58023006739
+58026000000 58026006811
+58029000000 58029006726
+58032000000 58032006800
+58035000000 58035006812
+58038000000 58038006804
+58041000000 58041006804
+58044000000 58044006763
+58047000000 58047006788
+58050000000 58050006711
+58053000000 58053006792
+58056000000 58056006804
+58059000000 58059006807
+58062000000 58062006774
+58065000000 58065006785
+58068000000 58068006803
+58071000000 58071006799
+58074000000 58074006807
+58077000000 58077006806
+58080000000 58080006800
+58083000000 58083006825
+58086000000 58086006804
+58089000000 58089006808
+58092000000 58092006793
+58095000000 58095006791
+58098000000 58098006762
+58101000000 58101006792
+58104000000 58104006800
+58107000000 58107006817
+58110000000 58110006807
+58113000000 58113006757
+58116000000 58116006811
+58119000000 58119006805
+58122000000 58122006799
+58125000000 58125006799
+58128000000 58128006813
+58131000000 58131006804
+58134000000 58134006810
+58137000000 58137006799
+58140000000 58140006749
+58143000000 58143006808
+58146000000 58146006804
+58149000000 58149006791
+58152000000 58152006802
+58155000000 58155006720
+58158000000 58158006803
+58161000000 58161006795
+58164000000 58164006796
+58167000000 58167006807
+58170000000 58170006807
+58173000000 58173006761
+58176000000 58176006816
+58179000000 58179006781
+58182000000 58182006809
+58185000000 58185006808
+58188000000 58188006802
+58191000000 58191006757
+58194000000 58194006826
+58197000000 58197006805
+58200000000 58200006813
+58203000000 58203006799
+58206000000 58206006803
+58209000000 58209006805
+58212000000 58212006795
+58215000000 58215006791
+58218000000 58218006799
+58221000000 58221006795
+58224000000 58224006801
+58227000000 58227006792
+58230000000 58230006808
+58233000000 58233006778
+58236000000 58236006799
+58239000000 58239006794
+58242000000 58242006803
+58245000000 58245006792
+58248000000 58248006816
+58251000000 58251006797
+58254000000 58254006782
+58257000000 58257006796
+58260000000 58260006799
+58263000000 58263006802
+58266000000 58266006803
+58269000000 58269006813
+58272000000 58272006802
+58275000000 58275006806
+58278000000 58278006797
+58281000000 58281006795
+58284000000 58284006797
+58287000000 58287006796
+58290000000 58290006762
+58293000000 58293006792
+58296000000 58296006786
+58299000000 58299006802
+58302000000 58302006778
+58305000000 58305006790
+58308000000 58308006803
+58311000000 58311006805
+58314000000 58314006794
+58317000000 58317006736
+58320000000 58320006734
+58323000000 58323006806
+58326000000 58326006721
+58329000000 58329006795
+58332000000 58332006807
+58335000000 58335006799
+58338000000 58338006799
+58341000000 58341006758
+58344000000 58344006783
+58347000000 58347006706
+58350000000 58350006787
+58353000000 58353006799
+58356000000 58356006802
+58359000000 58359006769
+58362000000 58362006780
+58365000000 58365006798
+58368000000 58368006794
+58371000000 58371006802
+58374000000 58374006801
+58377000000 58377006795
+58380000000 58380006820
+58383000000 58383006799
+58386000000 58386006803
+58389000000 58389006788
+58392000000 58392006786
+58395000000 58395006757
+58398000000 58398006787
+58401000000 58401006795
+58404000000 58404006812
+58407000000 58407006802
+58410000000 58410006752
+58413000000 58413006806
+58416000000 58416006800
+58419000000 58419006794
+58422000000 58422006794
+58425000000 58425006808
+58428000000 58428006799
+58431000000 58431006805
+58434000000 58434006794
+58437000000 58437006744
+58440000000 58440006803
+58443000000 58443006799
+58446000000 58446006786
+58449000000 58449006797
+58452000000 58452006715
+58455000000 58455006798
+58458000000 58458006790
+58461000000 58461006791
+58464000000 58464006802
+58467000000 58467006802
+58470000000 58470006756
+58473000000 58473006811
+58476000000 58476006776
+58479000000 58479006804
+58482000000 58482006803
+58485000000 58485006797
+58488000000 58488006752
+58491000000 58491006821
+58494000000 58494006800
+58497000000 58497006808
+58500000000 58500006794
+58503000000 58503006798
+58506000000 58506006800
+58509000000 58509006790
+58512000000 58512006786
+58515000000 58515006794
+58518000000 58518006790
+58521000000 58521006796
+58524000000 58524006787
+58527000000 58527006803
+58530000000 58530006773
+58533000000 58533006794
+58536000000 58536006789
+58539000000 58539006798
+58542000000 58542006787
+58545000000 58545006811
+58548000000 58548006792
+58551000000 58551006777
+58554000000 58554006791
+58557000000 58557006794
+58560000000 58560006797
+58563000000 58563006798
+58566000000 58566006808
+58569000000 58569006797
+58572000000 58572006801
+58575000000 58575006792
+58578000000 58578006790
+58581000000 58581006792
+58584000000 58584006791
+58587000000 58587006757
+58590000000 58590006787
+58593000000 58593006781
+58596000000 58596006797
+58599000000 58599006773
+58602000000 58602006785
+58605000000 58605006798
+58608000000 58608006800
+58611000000 58611006789
+58614000000 58614006731
+58617000000 58617006729
+58620000000 58620006801
+58623000000 58623006716
+58626000000 58626006790
+58629000000 58629006802
+58632000000 58632006794
+58635000000 58635006794
+58638000000 58638006753
+58641000000 58641006778
+58644000000 58644006701
+58647000000 58647006782
+58650000000 58650006794
+58653000000 58653006797
+58656000000 58656006764
+58659000000 58659006775
+58662000000 58662006793
+58665000000 58665006789
+58668000000 58668006797
+58671000000 58671006796
+58674000000 58674006790
+58677000000 58677006815
+58680000000 58680006794
+58683000000 58683006798
+58686000000 58686006783
+58689000000 58689006781
+58692000000 58692006752
+58695000000 58695006782
+58698000000 58698006790
+58701000000 58701006807
+58704000000 58704006797
+58707000000 58707006747
+58710000000 58710006801
+58713000000 58713006795
+58716000000 58716006789
+58719000000 58719006789
+58722000000 58722006803
+58725000000 58725006794
+58728000000 58728006800
+58731000000 58731006789
+58734000000 58734006739
+58737000000 58737006798
+58740000000 58740006794
+58743000000 58743006781
+58746000000 58746006792
+58749000000 58749006710
+58752000000 58752006793
+58755000000 58755006785
+58758000000 58758006786
+58761000000 58761006797
+58764000000 58764006797
+58767000000 58767006751
+58770000000 58770006806
+58773000000 58773006771
+58776000000 58776006799
+58779000000 58779006798
+58782000000 58782006792
+58785000000 58785006747
+58788000000 58788006816
+58791000000 58791006795
+58794000000 58794006803
+58797000000 58797006789
+58800000000 58800006793
+58803000000 58803006795
+58806000000 58806006785
+58809000000 58809006781
+58812000000 58812006789
+58815000000 58815006785
+58818000000 58818006791
+58821000000 58821006782
+58824000000 58824006798
+58827000000 58827006768
+58830000000 58830006789
+58833000000 58833006784
+58836000000 58836006793
+58839000000 58839006782
+58842000000 58842006806
+58845000000 58845006787
+58848000000 58848006772
+58851000000 58851006786
+58854000000 58854006789
+58857000000 58857006792
+58860000000 58860006793
+58863000000 58863006803
+58866000000 58866006792
+58869000000 58869006796
+58872000000 58872006787
+58875000000 58875006785
+58878000000 58878006787
+58881000000 58881006786
+58884000000 58884006752
+58887000000 58887006782
+58890000000 58890006776
+58893000000 58893006792
+58896000000 58896006768
+58899000000 58899006780
+58902000000 58902006793
+58905000000 58905006795
+58908000000 58908006784
+58911000000 58911006726
+58914000000 58914006724
+58917000000 58917006796
+58920000000 58920006711
+58923000000 58923006785
+58926000000 58926006797
+58929000000 58929006789
+58932000000 58932006789
+58935000000 58935006748
+58938000000 58938006773
+58941000000 58941006696
+58944000000 58944006777
+58947000000 58947006789
+58950000000 58950006792
+58953000000 58953006759
+58956000000 58956006770
+58959000000 58959006788
+58962000000 58962006784
+58965000000 58965006792
+58968000000 58968006791
+58971000000 58971006785
+58974000000 58974006810
+58977000000 58977006789
+58980000000 58980006793
+58983000000 58983006778
+58986000000 58986006776
+58989000000 58989006747
+58992000000 58992006777
+58995000000 58995006785
+58998000000 58998006802
+59001000000 59001006792
+59004000000 59004006742
+59007000000 59007006796
+59010000000 59010006790
+59013000000 59013006784
+59016000000 59016006784
+59019000000 59019006798
+59022000000 59022006789
+59025000000 59025006795
+59028000000 59028006784
+59031000000 59031006734
+59034000000 59034006793
+59037000000 59037006789
+59040000000 59040006776
+59043000000 59043006787
+59046000000 59046006705
+59049000000 59049006788
+59052000000 59052006780
+59055000000 59055006781
+59058000000 59058006792
+59061000000 59061006792
+59064000000 59064006746
+59067000000 59067006801
+59070000000 59070006766
+59073000000 59073006794
+59076000000 59076006793
+59079000000 59079006787
+59082000000 59082006742
+59085000000 59085006811
+59088000000 59088006790
+59091000000 59091006798
+59094000000 59094006784
+59097000000 59097006788
+59100000000 59100006790
+59103000000 59103006780
+59106000000 59106006776
+59109000000 59109006784
+59112000000 59112006780
+59115000000 59115006786
+59118000000 59118006777
+59121000000 59121006793
+59124000000 59124006763
+59127000000 59127006784
+59130000000 59130006779
+59133000000 59133006788
+59136000000 59136006777
+59139000000 59139006801
+59142000000 59142006782
+59145000000 59145006767
+59148000000 59148006781
+59151000000 59151006784
+59154000000 59154006787
+59157000000 59157006788
+59160000000 59160006798
+59163000000 59163006787
+59166000000 59166006791
+59169000000 59169006782
+59172000000 59172006780
+59175000000 59175006782
+59178000000 59178006781
+59181000000 59181006747
+59184000000 59184006777
+59187000000 59187006771
+59190000000 59190006787
+59193000000 59193006763
+59196000000 59196006775
+59199000000 59199006788
+59202000000 59202006790
+59205000000 59205006779
+59208000000 59208006721
+59211000000 59211006719
+59214000000 59214006791
+59217000000 59217006706
+59220000000 59220006780
+59223000000 59223006792
+59226000000 59226006784
+59229000000 59229006784
+59232000000 59232006743
+59235000000 59235006768
+59238000000 59238006691
+59241000000 59241006772
+59244000000 59244006784
+59247000000 59247006787
+59250000000 59250006754
+59253000000 59253006765
+59256000000 59256006783
+59259000000 59259006779
+59262000000 59262006787
+59265000000 59265006786
+59268000000 59268006780
+59271000000 59271006805
+59274000000 59274006784
+59277000000 59277006788
+59280000000 59280006773
+59283000000 59283006771
+59286000000 59286006742
+59289000000 59289006772
+59292000000 59292006780
+59295000000 59295006797
+59298000000 59298006787
+59301000000 59301006737
+59304000000 59304006791
+59307000000 59307006785
+59310000000 59310006779
+59313000000 59313006779
+59316000000 59316006793
+59319000000 59319006784
+59322000000 59322006790
+59325000000 59325006779
+59328000000 59328006729
+59331000000 59331006788
+59334000000 59334006784
+59337000000 59337006771
+59340000000 59340006782
+59343000000 59343006700
+59346000000 59346006783
+59349000000 59349006775
+59352000000 59352006776
+59355000000 59355006787
+59358000000 59358006787
+59361000000 59361006741
+59364000000 59364006796
+59367000000 59367006761
+59370000000 59370006789
+59373000000 59373006788
+59376000000 59376006782
+59379000000 59379006737
+59382000000 59382006806
+59385000000 59385006785
+59388000000 59388006793
+59391000000 59391006779
+59394000000 59394006783
+59397000000 59397006785
+59400000000 59400006775
+59403000000 59403006771
+59406000000 59406006779
+59409000000 59409006775
+59412000000 59412006781
+59415000000 59415006772
+59418000000 59418006788
+59421000000 59421006758
+59424000000 59424006779
+59427000000 59427006774
+59430000000 59430006783
+59433000000 59433006772
+59436000000 59436006796
+59439000000 59439006777
+59442000000 59442006762
+59445000000 59445006776
+59448000000 59448006779
+59451000000 59451006782
+59454000000 59454006783
+59457000000 59457006793
+59460000000 59460006782
+59463000000 59463006786
+59466000000 59466006777
+59469000000 59469006775
+59472000000 59472006777
+59475000000 59475006776
+59478000000 59478006742
+59481000000 59481006772
+59484000000 59484006766
+59487000000 59487006782
+59490000000 59490006758
+59493000000 59493006770
+59496000000 59496006783
+59499000000 59499006785
+59502000000 59502006774
+59505000000 59505006716
+59508000000 59508006714
+59511000000 59511006786
+59514000000 59514006701
+59517000000 59517006775
+59520000000 59520006787
+59523000000 59523006779
+59526000000 59526006779
+59529000000 59529006738
+59532000000 59532006763
+59535000000 59535006686
+59538000000 59538006767
+59541000000 59541006779
+59544000000 59544006782
+59547000000 59547006749
+59550000000 59550006760
+59553000000 59553006778
+59556000000 59556006774
+59559000000 59559006782
+59562000000 59562006781
+59565000000 59565006775
+59568000000 59568006800
+59571000000 59571006779
+59574000000 59574006783
+59577000000 59577006768
+59580000000 59580006766
+59583000000 59583006737
+59586000000 59586006767
+59589000000 59589006775
+59592000000 59592006792
+59595000000 59595006782
+59598000000 59598006732
+59601000000 59601006786
+59604000000 59604006780
+59607000000 59607006774
+59610000000 59610006774
+59613000000 59613006788
+59616000000 59616006779
+59619000000 59619006785
+59622000000 59622006774
+59625000000 59625006724
+59628000000 59628006783
+59631000000 59631006779
+59634000000 59634006766
+59637000000 59637006777
+59640000000 59640006695
+59643000000 59643006778
+59646000000 59646006770
+59649000000 59649006771
+59652000000 59652006782
+59655000000 59655006782
+59658000000 59658006736
+59661000000 59661006791
+59664000000 59664006756
+59667000000 59667006784
+59670000000 59670006783
+59673000000 59673006777
+59676000000 59676006732
+59679000000 59679006801
+59682000000 59682006780
+59685000000 59685006788
+59688000000 59688006774
+59691000000 59691006778
+59694000000 59694006780
+59697000000 59697006770
+59700000000 59700006766
+59703000000 59703006774
+59706000000 59706006770
+59709000000 59709006776
+59712000000 59712006767
+59715000000 59715006783
+59718000000 59718006753
+59721000000 59721006774
+59724000000 59724006769
+59727000000 59727006778
+59730000000 59730006767
+59733000000 59733006791
+59736000000 59736006772
+59739000000 59739006757
+59742000000 59742006771
+59745000000 59745006774
+59748000000 59748006777
+59751000000 59751006778
+59754000000 59754006788
+59757000000 59757006777
+59760000000 59760006781
+59763000000 59763006772
+59766000000 59766006770
+59769000000 59769006772
+59772000000 59772006771
+59775000000 59775006737
+59778000000 59778006767
+59781000000 59781006761
+59784000000 59784006777
+59787000000 59787006753
+59790000000 59790006765
+59793000000 59793006778
+59796000000 59796006780
+59799000000 59799006769
+59802000000 59802006711
+59805000000 59805006709
+59808000000 59808006781
+59811000000 59811006696
+59814000000 59814006770
+59817000000 59817006782
+59820000000 59820006774
+59823000000 59823006774
+59826000000 59826006733
+59829000000 59829006758
+59832000000 59832006681
+59835000000 59835006762
+59838000000 59838006774
+59841000000 59841006777
+59844000000 59844006744
+59847000000 59847006755
+59850000000 59850006773
+59853000000 59853006769
+59856000000 59856006777
+59859000000 59859006776
+59862000000 59862006770
+59865000000 59865006795
+59868000000 59868006774
+59871000000 59871006778
+59874000000 59874006763
+59877000000 59877006761
+59880000000 59880006732
+59883000000 59883006762
+59886000000 59886006770
+59889000000 59889006787
+59892000000 59892006777
+59895000000 59895006727
+59898000000 59898006781
+59901000000 59901006775
+59904000000 59904006769
+59907000000 59907006769
+59910000000 59910006783
+59913000000 59913006774
+59916000000 59916006780
+59919000000 59919006769
+59922000000 59922006719
+59925000000 59925006778
+59928000000 59928006774
+59931000000 59931006761
+59934000000 59934006772
+59937000000 59937006690
+59940000000 59940006773
+59943000000 59943006765
+59946000000 59946006766
+59949000000 59949006777
+59952000000 59952006777
+59955000000 59955006731
+59958000000 59958006786
+59961000000 59961006751
+59964000000 59964006779
+59967000000 59967006778
+59970000000 59970006772
+59973000000 59973006727
+59976000000 59976006796
+59979000000 59979006775
+59982000000 59982006783
+59985000000 59985006769
+59988000000 59988006773
+59991000000 59991006775
+59994000000 59994006765
+59997000000 59997006761
+60000000000 60000006769
+60003000000 60003006765
+60006000000 60006006771
+60009000000 60009006762
+60012000000 60012006778
+60015000000 60015006748
+60018000000 60018006769
+60021000000 60021006764
+60024000000 60024006773
+60027000000 60027006762
+60030000000 60030006786
+60033000000 60033006767
+60036000000 60036006752
+60039000000 60039006766
+60042000000 60042006769
+60045000000 60045006772
+60048000000 60048006773
+60051000000 60051006783
+60054000000 60054006772
+60057000000 60057006776
+60060000000 60060006767
+60063000000 60063006765
+60066000000 60066006767
+60069000000 60069006766
+60072000000 60072006732
+60075000000 60075006762
+60078000000 60078006756
+60081000000 60081006772
+60084000000 60084006748
+60087000000 60087006760
+60090000000 60090006773
+60093000000 60093006775
+60096000000 60096006764
+60099000000 60099006706
+60102000000 60102006704
+60105000000 60105006776
+60108000000 60108006691
+60111000000 60111006765
+60114000000 60114006777
+60117000000 60117006769
+60120000000 60120006769
+60123000000 60123006728
+60126000000 60126006753
+60129000000 60129006676
+60132000000 60132006757
+60135000000 60135006769
+60138000000 60138006772
+60141000000 60141006739
+60144000000 60144006750
+60147000000 60147006768
+60150000000 60150006764
+60153000000 60153006772
+60156000000 60156006771
+60159000000 60159006765
+60162000000 60162006790
+60165000000 60165006769
+60168000000 60168006773
+60171000000 60171006758
+60174000000 60174006756
+60177000000 60177006727
+60180000000 60180006757
+60183000000 60183006765
+60186000000 60186006782
+60189000000 60189006772
+60192000000 60192006722
+60195000000 60195006776
+60198000000 60198006770
+60201000000 60201006764
+60204000000 60204006764
+60207000000 60207006778
+60210000000 60210006769
+60213000000 60213006775
+60216000000 60216006764
+60219000000 60219006714
+60222000000 60222006773
+60225000000 60225006769
+60228000000 60228006756
+60231000000 60231006767
+60234000000 60234006685
+60237000000 60237006768
+60240000000 60240006760
+60243000000 60243006761
+60246000000 60246006772
+60249000000 60249006772
+60252000000 60252006726
+60255000000 60255006781
+60258000000 60258006746
+60261000000 60261006774
+60264000000 60264006773
+60267000000 60267006767
+60270000000 60270006722
+60273000000 60273006791
+60276000000 60276006770
+60279000000 60279006778
+60282000000 60282006764
+60285000000 60285006768
+60288000000 60288006770
+60291000000 60291006760
+60294000000 60294006756
+60297000000 60297006764
+60300000000 60300006760
+60303000000 60303006766
+60306000000 60306006757
+60309000000 60309006773
+60312000000 60312006743
+60315000000 60315006764
+60318000000 60318006759
+60321000000 60321006768
+60324000000 60324006757
+60327000000 60327006781
+60330000000 60330006762
+60333000000 60333006747
+60336000000 60336006761
+60339000000 60339006764
+60342000000 60342006767
+60345000000 60345006768
+60348000000 60348006778
+60351000000 60351006767
+60354000000 60354006771
+60357000000 60357006762
+60360000000 60360006760
+60363000000 60363006762
+60366000000 60366006761
+60369000000 60369006727
+60372000000 60372006757
+60375000000 60375006751
+60378000000 60378006767
+60381000000 60381006743
+60384000000 60384006755
+60387000000 60387006768
+60390000000 60390006770
+60393000000 60393006759
+60396000000 60396006701
+60399000000 60399006699
+60402000000 60402006771
+60405000000 60405006686
+60408000000 60408006760
+60411000000 60411006772
+60414000000 60414006764
+60417000000 60417006764
+60420000000 60420006723
+60423000000 60423006748
+60426000000 60426006671
+60429000000 60429006752
+60432000000 60432006764
+60435000000 60435006767
+60438000000 60438006734
+60441000000 60441006745
+60444000000 60444006763
+60447000000 60447006759
+60450000000 60450006767
+60453000000 60453006766
+60456000000 60456006760
+60459000000 60459006785
+60462000000 60462006764
+60465000000 60465006768
+60468000000 60468006753
+60471000000 60471006751
+60474000000 60474006722
+60477000000 60477006752
+60480000000 60480006760
+60483000000 60483006777
+60486000000 60486006767
+60489000000 60489006717
+60492000000 60492006771
+60495000000 60495006765
+60498000000 60498006759
+60501000000 60501006759
+60504000000 60504006773
+60507000000 60507006764
+60510000000 60510006770
+60513000000 60513006759
+60516000000 60516006709
+60519000000 60519006768
+60522000000 60522006764
+60525000000 60525006751
+60528000000 60528006762
+60531000000 60531006680
+60534000000 60534006763
+60537000000 60537006755
+60540000000 60540006756
+60543000000 60543006767
+60546000000 60546006767
+60549000000 60549006721
+60552000000 60552006776
+60555000000 60555006741
+60558000000 60558006769
+60561000000 60561006768
+60564000000 60564006762
+60567000000 60567006717
+60570000000 60570006786
+60573000000 60573006765
+60576000000 60576006773
+60579000000 60579006759
+60582000000 60582006763
+60585000000 60585006765
+60588000000 60588006755
+60591000000 60591006751
+60594000000 60594006759
+60597000000 60597006755
+60600000000 60600006761
+60603000000 60603006752
+60606000000 60606006768
+60609000000 60609006738
+60612000000 60612006759
+60615000000 60615006754
+60618000000 60618006763
+60621000000 60621006752
+60624000000 60624006776
+60627000000 60627006757
+60630000000 60630006742
+60633000000 60633006756
+60636000000 60636006759
+60639000000 60639006762
+60642000000 60642006763
+60645000000 60645006773
+60648000000 60648006762
+60651000000 60651006766
+60654000000 60654006757
+60657000000 60657006755
+60660000000 60660006757
+60663000000 60663006756
+60666000000 60666006722
+60669000000 60669006752
+60672000000 60672006746
+60675000000 60675006762
+60678000000 60678006738
+60681000000 60681006750
+60684000000 60684006763
+60687000000 60687006765
+60690000000 60690006754
+60693000000 60693006696
+60696000000 60696006694
+60699000000 60699006766
+60702000000 60702006681
+60705000000 60705006755
+60708000000 60708006767
+60711000000 60711006759
+60714000000 60714006759
+60717000000 60717006718
+60720000000 60720006743
+60723000000 60723006666
+60726000000 60726006747
+60729000000 60729006759
+60732000000 60732006762
+60735000000 60735006729
+60738000000 60738006740
+60741000000 60741006758
+60744000000 60744006754
+60747000000 60747006762
+60750000000 60750006761
+60753000000 60753006755
+60756000000 60756006780
+60759000000 60759006759
+60762000000 60762006763
+60765000000 60765006748
+60768000000 60768006746
+60771000000 60771006717
+60774000000 60774006747
+60777000000 60777006755
+60780000000 60780006772
+60783000000 60783006762
+60786000000 60786006712
+60789000000 60789006766
+60792000000 60792006760
+60795000000 60795006754
+60798000000 60798006754
+60801000000 60801006768
+60804000000 60804006759
+60807000000 60807006765
+60810000000 60810006754
+60813000000 60813006704
+60816000000 60816006763
+60819000000 60819006759
+60822000000 60822006746
+60825000000 60825006757
+60828000000 60828006675
+60831000000 60831006758
+60834000000 60834006750
+60837000000 60837006751
+60840000000 60840006762
+60843000000 60843006762
+60846000000 60846006716
+60849000000 60849006771
+60852000000 60852006736
+60855000000 60855006764
+60858000000 60858006763
+60861000000 60861006757
+60864000000 60864006712
+60867000000 60867006781
+60870000000 60870006760
+60873000000 60873006768
+60876000000 60876006754
+60879000000 60879006758
+60882000000 60882006760
+60885000000 60885006750
+60888000000 60888006746
+60891000000 60891006754
+60894000000 60894006750
+60897000000 60897006756
+60900000000 60900006747
+60903000000 60903006763
+60906000000 60906006733
+60909000000 60909006754
+60912000000 60912006749
+60915000000 60915006758
+60918000000 60918006747
+60921000000 60921006771
+60924000000 60924006752
+60927000000 60927006737
+60930000000 60930006751
+60933000000 60933006754
+60936000000 60936006757
+60939000000 60939006758
+60942000000 60942006768
+60945000000 60945006757
+60948000000 60948006761
+60951000000 60951006752
+60954000000 60954006750
+60957000000 60957006752
+60960000000 60960006751
+60963000000 60963006717
+60966000000 60966006747
+60969000000 60969006741
+60972000000 60972006757
+60975000000 60975006733
+60978000000 60978006745
+60981000000 60981006758
+60984000000 60984006760
+60987000000 60987006749
+60990000000 60990006691
+60993000000 60993006689
+60996000000 60996006761
+60999000000 60999006676
+61002000000 61002006750
+61005000000 61005006762
+61008000000 61008006754
+61011000000 61011006754
+61014000000 61014006713
+61017000000 61017006738
+61020000000 61020006661
+61023000000 61023006742
+61026000000 61026006754
+61029000000 61029006757
+61032000000 61032006724
+61035000000 61035006735
+61038000000 61038006753
+61041000000 61041006749
+61044000000 61044006757
+61047000000 61047006756
+61050000000 61050006750
+61053000000 61053006775
+61056000000 61056006754
+61059000000 61059006758
+61062000000 61062006743
+61065000000 61065006741
+61068000000 61068006712
+61071000000 61071006742
+61074000000 61074006750
+61077000000 61077006767
+61080000000 61080006757
+61083000000 61083006707
+61086000000 61086006761
+61089000000 61089006755
+61092000000 61092006749
+61095000000 61095006749
+61098000000 61098006763
+61101000000 61101006754
+61104000000 61104006760
+61107000000 61107006749
+61110000000 61110006699
+61113000000 61113006758
+61116000000 61116006754
+61119000000 61119006741
+61122000000 61122006752
+61125000000 61125006670
+61128000000 61128006753
+61131000000 61131006745
+61134000000 61134006746
+61137000000 61137006757
+61140000000 61140006757
+61143000000 61143006711
+61146000000 61146006766
+61149000000 61149006731
+61152000000 61152006759
+61155000000 61155006758
+61158000000 61158006752
+61161000000 61161006707
+61164000000 61164006776
+61167000000 61167006755
+61170000000 61170006763
+61173000000 61173006749
+61176000000 61176006753
+61179000000 61179006755
+61182000000 61182006745
+61185000000 61185006741
+61188000000 61188006749
+61191000000 61191006745
+61194000000 61194006751
+61197000000 61197006742
+61200000000 61200006758
+61203000000 61203006728
+61206000000 61206006749
+61209000000 61209006744
+61212000000 61212006753
+61215000000 61215006742
+61218000000 61218006766
+61221000000 61221006747
+61224000000 61224006732
+61227000000 61227006746
+61230000000 61230006749
+61233000000 61233006752
+61236000000 61236006753
+61239000000 61239006763
+61242000000 61242006752
+61245000000 61245006756
+61248000000 61248006747
+61251000000 61251006745
+61254000000 61254006747
+61257000000 61257006746
+61260000000 61260006712
+61263000000 61263006742
+61266000000 61266006736
+61269000000 61269006752
+61272000000 61272006728
+61275000000 61275006740
+61278000000 61278006753
+61281000000 61281006755
+61284000000 61284006744
+61287000000 61287006686
+61290000000 61290006684
+61293000000 61293006756
+61296000000 61296006671
+61299000000 61299006745
+61302000000 61302006757
+61305000000 61305006749
+61308000000 61308006749
+61311000000 61311006708
+61314000000 61314006733
+61317000000 61317006656
+61320000000 61320006737
+61323000000 61323006749
+61326000000 61326006752
+61329000000 61329006719
+61332000000 61332006730
+61335000000 61335006748
+61338000000 61338006744
+61341000000 61341006752
+61344000000 61344006751
+61347000000 61347006745
+61350000000 61350006770
+61353000000 61353006749
+61356000000 61356006753
+61359000000 61359006738
+61362000000 61362006736
+61365000000 61365006707
+61368000000 61368006737
+61371000000 61371006745
+61374000000 61374006762
+61377000000 61377006752
+61380000000 61380006702
+61383000000 61383006756
+61386000000 61386006750
+61389000000 61389006744
+61392000000 61392006744
+61395000000 61395006758
+61398000000 61398006749
+61401000000 61401006755
+61404000000 61404006744
+61407000000 61407006694
+61410000000 61410006753
+61413000000 61413006749
+61416000000 61416006736
+61419000000 61419006747
+61422000000 61422006665
+61425000000 61425006748
+61428000000 61428006740
+61431000000 61431006741
+61434000000 61434006752
+61437000000 61437006752
+61440000000 61440006706
+61443000000 61443006761
+61446000000 61446006726
+61449000000 61449006754
+61452000000 61452006753
+61455000000 61455006747
+61458000000 61458006702
+61461000000 61461006771
+61464000000 61464006750
+61467000000 61467006758
+61470000000 61470006744
+61473000000 61473006748
+61476000000 61476006750
+61479000000 61479006740
+61482000000 61482006736
+61485000000 61485006744
+61488000000 61488006740
+61491000000 61491006746
+61494000000 61494006737
+61497000000 61497006753
+61500000000 61500006723
+61503000000 61503006744
+61506000000 61506006739
+61509000000 61509006748
+61512000000 61512006737
+61515000000 61515006761
+61518000000 61518006742
+61521000000 61521006727
+61524000000 61524006741
+61527000000 61527006744
+61530000000 61530006747
+61533000000 61533006748
+61536000000 61536006758
+61539000000 61539006747
+61542000000 61542006751
+61545000000 61545006742
+61548000000 61548006740
+61551000000 61551006742
+61554000000 61554006741
+61557000000 61557006707
+61560000000 61560006737
+61563000000 61563006731
+61566000000 61566006747
+61569000000 61569006723
+61572000000 61572006735
+61575000000 61575006748
+61578000000 61578006750
+61581000000 61581006739
+61584000000 61584006681
+61587000000 61587006679
+61590000000 61590006751
+61593000000 61593006666
+61596000000 61596006740
+61599000000 61599006752
+61602000000 61602006744
+61605000000 61605006744
+61608000000 61608006703
+61611000000 61611006728
+61614000000 61614006651
+61617000000 61617006732
+61620000000 61620006744
+61623000000 61623006747
+61626000000 61626006714
+61629000000 61629006725
+61632000000 61632006743
+61635000000 61635006739
+61638000000 61638006747
+61641000000 61641006746
+61644000000 61644006740
+61647000000 61647006765
+61650000000 61650006744
+61653000000 61653006748
+61656000000 61656006733
+61659000000 61659006731
+61662000000 61662006702
+61665000000 61665006732
+61668000000 61668006740
+61671000000 61671006757
+61674000000 61674006747
+61677000000 61677006697
+61680000000 61680006751
+61683000000 61683006745
+61686000000 61686006739
+61689000000 61689006739
+61692000000 61692006753
+61695000000 61695006744
+61698000000 61698006750
+61701000000 61701006739
+61704000000 61704006689
+61707000000 61707006748
+61710000000 61710006744
+61713000000 61713006731
+61716000000 61716006742
+61719000000 61719006660
+61722000000 61722006743
+61725000000 61725006735
+61728000000 61728006736
+61731000000 61731006747
+61734000000 61734006747
+61737000000 61737006701
+61740000000 61740006756
+61743000000 61743006721
+61746000000 61746006749
+61749000000 61749006748
+61752000000 61752006742
+61755000000 61755006697
+61758000000 61758006766
+61761000000 61761006745
+61764000000 61764006753
+61767000000 61767006739
+61770000000 61770006743
+61773000000 61773006745
+61776000000 61776006735
+61779000000 61779006731
+61782000000 61782006739
+61785000000 61785006735
+61788000000 61788006741
+61791000000 61791006732
+61794000000 61794006748
+61797000000 61797006718
+61800000000 61800006739
+61803000000 61803006734
+61806000000 61806006743
+61809000000 61809006732
+61812000000 61812006756
+61815000000 61815006737
+61818000000 61818006722
+61821000000 61821006736
+61824000000 61824006739
+61827000000 61827006742
+61830000000 61830006743
+61833000000 61833006753
+61836000000 61836006742
+61839000000 61839006746
+61842000000 61842006737
+61845000000 61845006735
+61848000000 61848006737
+61851000000 61851006736
+61854000000 61854006702
+61857000000 61857006732
+61860000000 61860006726
+61863000000 61863006742
+61866000000 61866006718
+61869000000 61869006730
+61872000000 61872006743
+61875000000 61875006745
+61878000000 61878006734
+61881000000 61881006676
+61884000000 61884006674
+61887000000 61887006746
+61890000000 61890006661
+61893000000 61893006735
+61896000000 61896006747
+61899000000 61899006739
+61902000000 61902006739
+61905000000 61905006698
+61908000000 61908006723
+61911000000 61911006646
+61914000000 61914006727
+61917000000 61917006739
+61920000000 61920006742
+61923000000 61923006709
+61926000000 61926006720
+61929000000 61929006738
+61932000000 61932006734
+61935000000 61935006742
+61938000000 61938006741
+61941000000 61941006735
+61944000000 61944006760
+61947000000 61947006739
+61950000000 61950006743
+61953000000 61953006728
+61956000000 61956006726
+61959000000 61959006697
+61962000000 61962006727
+61965000000 61965006735
+61968000000 61968006752
+61971000000 61971006742
+61974000000 61974006692
+61977000000 61977006746
+61980000000 61980006740
+61983000000 61983006734
+61986000000 61986006734
+61989000000 61989006748
+61992000000 61992006739
+61995000000 61995006745
+61998000000 61998006734
+62001000000 62001006684
+62004000000 62004006743
+62007000000 62007006739
+62010000000 62010006726
+62013000000 62013006737
+62016000000 62016006655
+62019000000 62019006738
+62022000000 62022006730
+62025000000 62025006731
+62028000000 62028006742
+62031000000 62031006742
+62034000000 62034006696
+62037000000 62037006751
+62040000000 62040006716
+62043000000 62043006744
+62046000000 62046006743
+62049000000 62049006737
+62052000000 62052006692
+62055000000 62055006761
+62058000000 62058006740
+62061000000 62061006748
+62064000000 62064006734
+62067000000 62067006738
+62070000000 62070006740
+62073000000 62073006730
+62076000000 62076006726
+62079000000 62079006734
+62082000000 62082006730
+62085000000 62085006736
+62088000000 62088006727
+62091000000 62091006743
+62094000000 62094006713
+62097000000 62097006734
+62100000000 62100006729
+62103000000 62103006738
+62106000000 62106006727
+62109000000 62109006751
+62112000000 62112006732
+62115000000 62115006717
+62118000000 62118006731
+62121000000 62121006734
+62124000000 62124006737
+62127000000 62127006738
+62130000000 62130006748
+62133000000 62133006737
+62136000000 62136006741
+62139000000 62139006732
+62142000000 62142006730
+62145000000 62145006732
+62148000000 62148006731
+62151000000 62151006697
+62154000000 62154006727
+62157000000 62157006721
+62160000000 62160006737
+62163000000 62163006713
+62166000000 62166006725
+62169000000 62169006738
+62172000000 62172006740
+62175000000 62175006729
+62178000000 62178006671
+62181000000 62181006669
+62184000000 62184006741
+62187000000 62187006656
+62190000000 62190006730
+62193000000 62193006742
+62196000000 62196006734
+62199000000 62199006734
+62202000000 62202006693
+62205000000 62205006718
+62208000000 62208006641
+62211000000 62211006722
+62214000000 62214006734
+62217000000 62217006737
+62220000000 62220006704
+62223000000 62223006715
+62226000000 62226006733
+62229000000 62229006729
+62232000000 62232006737
+62235000000 62235006736
+62238000000 62238006730
+62241000000 62241006755
+62244000000 62244006734
+62247000000 62247006738
+62250000000 62250006723
+62253000000 62253006721
+62256000000 62256006692
+62259000000 62259006722
+62262000000 62262006730
+62265000000 62265006747
+62268000000 62268006737
+62271000000 62271006687
+62274000000 62274006741
+62277000000 62277006735
+62280000000 62280006729
+62283000000 62283006729
+62286000000 62286006743
+62289000000 62289006734
+62292000000 62292006740
+62295000000 62295006729
+62298000000 62298006679
+62301000000 62301006738
+62304000000 62304006734
+62307000000 62307006721
+62310000000 62310006732
+62313000000 62313006650
+62316000000 62316006733
+62319000000 62319006725
+62322000000 62322006726
+62325000000 62325006737
+62328000000 62328006737
+62331000000 62331006691
+62334000000 62334006746
+62337000000 62337006711
+62340000000 62340006739
+62343000000 62343006738
+62346000000 62346006732
+62349000000 62349006687
+62352000000 62352006756
+62355000000 62355006735
+62358000000 62358006743
+62361000000 62361006729
+62364000000 62364006733
+62367000000 62367006735
+62370000000 62370006725
+62373000000 62373006721
+62376000000 62376006729
+62379000000 62379006725
+62382000000 62382006731
+62385000000 62385006722
+62388000000 62388006738
+62391000000 62391006708
+62394000000 62394006729
+62397000000 62397006724
+62400000000 62400006733
+62403000000 62403006722
+62406000000 62406006746
+62409000000 62409006727
+62412000000 62412006712
+62415000000 62415006726
+62418000000 62418006729
+62421000000 62421006732
+62424000000 62424006733
+62427000000 62427006743
+62430000000 62430006732
+62433000000 62433006736
+62436000000 62436006727
+62439000000 62439006725
+62442000000 62442006727
+62445000000 62445006726
+62448000000 62448006692
+62451000000 62451006722
+62454000000 62454006716
+62457000000 62457006732
+62460000000 62460006708
+62463000000 62463006720
+62466000000 62466006733
+62469000000 62469006735
+62472000000 62472006724
+62475000000 62475006666
+62478000000 62478006664
+62481000000 62481006736
+62484000000 62484006651
+62487000000 62487006725
+62490000000 62490006737
+62493000000 62493006729
+62496000000 62496006729
+62499000000 62499006688
+62502000000 62502006713
+62505000000 62505006636
+62508000000 62508006717
+62511000000 62511006729
+62514000000 62514006732
+62517000000 62517006699
+62520000000 62520006710
+62523000000 62523006728
+62526000000 62526006724
+62529000000 62529006732
+62532000000 62532006731
+62535000000 62535006725
+62538000000 62538006750
+62541000000 62541006729
+62544000000 62544006733
+62547000000 62547006718
+62550000000 62550006716
+62553000000 62553006687
+62556000000 62556006717
+62559000000 62559006725
+62562000000 62562006742
+62565000000 62565006732
+62568000000 62568006682
+62571000000 62571006736
+62574000000 62574006730
+62577000000 62577006724
+62580000000 62580006724
+62583000000 62583006738
+62586000000 62586006729
+62589000000 62589006735
+62592000000 62592006724
+62595000000 62595006674
+62598000000 62598006733
+62601000000 62601006729
+62604000000 62604006716
+62607000000 62607006727
+62610000000 62610006645
+62613000000 62613006728
+62616000000 62616006720
+62619000000 62619006721
+62622000000 62622006732
+62625000000 62625006732
+62628000000 62628006686
+62631000000 62631006741
+62634000000 62634006706
+62637000000 62637006734
+62640000000 62640006733
+62643000000 62643006727
+62646000000 62646006682
+62649000000 62649006751
+62652000000 62652006730
+62655000000 62655006738
+62658000000 62658006724
+62661000000 62661006728
+62664000000 62664006730
+62667000000 62667006720
+62670000000 62670006716
+62673000000 62673006724
+62676000000 62676006720
+62679000000 62679006726
+62682000000 62682006717
+62685000000 62685006733
+62688000000 62688006703
+62691000000 62691006724
+62694000000 62694006719
+62697000000 62697006728
+62700000000 62700006717
+62703000000 62703006741
+62706000000 62706006722
+62709000000 62709006707
+62712000000 62712006721
+62715000000 62715006724
+62718000000 62718006727
+62721000000 62721006728
+62724000000 62724006738
+62727000000 62727006727
+62730000000 62730006731
+62733000000 62733006722
+62736000000 62736006720
+62739000000 62739006722
+62742000000 62742006721
+62745000000 62745006687
+62748000000 62748006717
+62751000000 62751006711
+62754000000 62754006727
+62757000000 62757006703
+62760000000 62760006715
+62763000000 62763006728
+62766000000 62766006730
+62769000000 62769006719
+62772000000 62772006661
+62775000000 62775006659
+62778000000 62778006731
+62781000000 62781006646
+62784000000 62784006720
+62787000000 62787006732
+62790000000 62790006724
+62793000000 62793006724
+62796000000 62796006683
+62799000000 62799006708
+62802000000 62802006631
+62805000000 62805006712
+62808000000 62808006724
+62811000000 62811006727
+62814000000 62814006694
+62817000000 62817006705
+62820000000 62820006723
+62823000000 62823006719
+62826000000 62826006727
+62829000000 62829006726
+62832000000 62832006720
+62835000000 62835006745
+62838000000 62838006724
+62841000000 62841006728
+62844000000 62844006713
+62847000000 62847006711
+62850000000 62850006682
+62853000000 62853006712
+62856000000 62856006720
+62859000000 62859006737
+62862000000 62862006727
+62865000000 62865006677
+62868000000 62868006731
+62871000000 62871006725
+62874000000 62874006719
+62877000000 62877006719
+62880000000 62880006733
+62883000000 62883006724
+62886000000 62886006730
+62889000000 62889006719
+62892000000 62892006669
+62895000000 62895006728
+62898000000 62898006724
+62901000000 62901006711
+62904000000 62904006722
+62907000000 62907006640
+62910000000 62910006723
+62913000000 62913006715
+62916000000 62916006716
+62919000000 62919006727
+62922000000 62922006727
+62925000000 62925006681
+62928000000 62928006736
+62931000000 62931006701
+62934000000 62934006729
+62937000000 62937006728
+62940000000 62940006722
+62943000000 62943006677
+62946000000 62946006746
+62949000000 62949006725
+62952000000 62952006733
+62955000000 62955006719
+62958000000 62958006723
+62961000000 62961006725
+62964000000 62964006715
+62967000000 62967006711
+62970000000 62970006719
+62973000000 62973006715
+62976000000 62976006721
+62979000000 62979006712
+62982000000 62982006728
+62985000000 62985006698
+62988000000 62988006719
+62991000000 62991006714
+62994000000 62994006723
+62997000000 62997006712
+63000000000 63000006736
+63003000000 63003006717
+63006000000 63006006702
+63009000000 63009006716
+63012000000 63012006719
+63015000000 63015006722
+63018000000 63018006723
+63021000000 63021006733
+63024000000 63024006722
+63027000000 63027006726
+63030000000 63030006717
+63033000000 63033006715
+63036000000 63036006717
+63039000000 63039006716
+63042000000 63042006682
+63045000000 63045006712
+63048000000 63048006706
+63051000000 63051006722
+63054000000 63054006698
+63057000000 63057006710
+63060000000 63060006723
+63063000000 63063006725
+63066000000 63066006714
+63069000000 63069006656
+63072000000 63072006654
+63075000000 63075006726
+63078000000 63078006641
+63081000000 63081006715
+63084000000 63084006727
+63087000000 63087006719
+63090000000 63090006719
+63093000000 63093006678
+63096000000 63096006703
+63099000000 63099006626
+63102000000 63102006707
+63105000000 63105006719
+63108000000 63108006722
+63111000000 63111006689
+63114000000 63114006700
+63117000000 63117006718
+63120000000 63120006714
+63123000000 63123006722
+63126000000 63126006721
+63129000000 63129006715
+63132000000 63132006740
+63135000000 63135006719
+63138000000 63138006723
+63141000000 63141006708
+63144000000 63144006706
+63147000000 63147006677
+63150000000 63150006707
+63153000000 63153006715
+63156000000 63156006732
+63159000000 63159006722
+63162000000 63162006672
+63165000000 63165006726
+63168000000 63168006720
+63171000000 63171006714
+63174000000 63174006714
+63177000000 63177006728
+63180000000 63180006719
+63183000000 63183006725
+63186000000 63186006714
+63189000000 63189006664
+63192000000 63192006723
+63195000000 63195006719
+63198000000 63198006706
+63201000000 63201006717
+63204000000 63204006635
+63207000000 63207006718
+63210000000 63210006710
+63213000000 63213006711
+63216000000 63216006722
+63219000000 63219006722
+63222000000 63222006676
+63225000000 63225006731
+63228000000 63228006696
+63231000000 63231006724
+63234000000 63234006723
+63237000000 63237006717
+63240000000 63240006672
+63243000000 63243006741
+63246000000 63246006720
+63249000000 63249006728
+63252000000 63252006714
+63255000000 63255006718
+63258000000 63258006720
+63261000000 63261006710
+63264000000 63264006706
+63267000000 63267006714
+63270000000 63270006710
+63273000000 63273006716
+63276000000 63276006707
+63279000000 63279006723
+63282000000 63282006693
+63285000000 63285006714
+63288000000 63288006709
+63291000000 63291006718
+63294000000 63294006707
+63297000000 63297006731
+63300000000 63300006712
+63303000000 63303006697
+63306000000 63306006711
+63309000000 63309006714
+63312000000 63312006717
+63315000000 63315006718
+63318000000 63318006728
+63321000000 63321006717
+63324000000 63324006721
+63327000000 63327006712
+63330000000 63330006710
+63333000000 63333006712
+63336000000 63336006711
+63339000000 63339006677
+63342000000 63342006707
+63345000000 63345006701
+63348000000 63348006717
+63351000000 63351006693
+63354000000 63354006705
+63357000000 63357006718
+63360000000 63360006720
+63363000000 63363006709
+63366000000 63366006651
+63369000000 63369006649
+63372000000 63372006721
+63375000000 63375006636
+63378000000 63378006710
+63381000000 63381006722
+63384000000 63384006714
+63387000000 63387006714
+63390000000 63390006673
+63393000000 63393006698
+63396000000 63396006621
+63399000000 63399006702
+63402000000 63402006714
+63405000000 63405006717
+63408000000 63408006684
+63411000000 63411006695
+63414000000 63414006713
+63417000000 63417006709
+63420000000 63420006717
+63423000000 63423006716
+63426000000 63426006710
+63429000000 63429006735
+63432000000 63432006714
+63435000000 63435006718
+63438000000 63438006703
+63441000000 63441006701
+63444000000 63444006672
+63447000000 63447006702
+63450000000 63450006710
+63453000000 63453006727
+63456000000 63456006717
+63459000000 63459006667
+63462000000 63462006721
+63465000000 63465006715
+63468000000 63468006709
+63471000000 63471006709
+63474000000 63474006723
+63477000000 63477006714
+63480000000 63480006720
+63483000000 63483006709
+63486000000 63486006659
+63489000000 63489006718
+63492000000 63492006714
+63495000000 63495006701
+63498000000 63498006712
+63501000000 63501006630
+63504000000 63504006713
+63507000000 63507006705
+63510000000 63510006706
+63513000000 63513006717
+63516000000 63516006717
+63519000000 63519006671
+63522000000 63522006726
+63525000000 63525006691
+63528000000 63528006719
+63531000000 63531006718
+63534000000 63534006712
+63537000000 63537006667
+63540000000 63540006736
+63543000000 63543006715
+63546000000 63546006723
+63549000000 63549006709
+63552000000 63552006713
+63555000000 63555006715
+63558000000 63558006705
+63561000000 63561006701
+63564000000 63564006709
+63567000000 63567006705
+63570000000 63570006711
+63573000000 63573006702
+63576000000 63576006718
+63579000000 63579006688
+63582000000 63582006709
+63585000000 63585006704
+63588000000 63588006713
+63591000000 63591006702
+63594000000 63594006726
+63597000000 63597006707
+63600000000 63600006692
+63603000000 63603006706
+63606000000 63606006709
+63609000000 63609006712
+63612000000 63612006713
+63615000000 63615006723
+63618000000 63618006712
+63621000000 63621006716
+63624000000 63624006707
+63627000000 63627006705
+63630000000 63630006707
+63633000000 63633006706
+63636000000 63636006672
+63639000000 63639006702
+63642000000 63642006696
+63645000000 63645006712
+63648000000 63648006688
+63651000000 63651006700
+63654000000 63654006713
+63657000000 63657006715
+63660000000 63660006704
+63663000000 63663006646
+63666000000 63666006644
+63669000000 63669006716
+63672000000 63672006631
+63675000000 63675006705
+63678000000 63678006717
+63681000000 63681006709
+63684000000 63684006709
+63687000000 63687006668
+63690000000 63690006693
+63693000000 63693006616
+63696000000 63696006697
+63699000000 63699006709
+63702000000 63702006712
+63705000000 63705006679
+63708000000 63708006690
+63711000000 63711006708
+63714000000 63714006704
+63717000000 63717006712
+63720000000 63720006711
+63723000000 63723006705
+63726000000 63726006730
+63729000000 63729006709
+63732000000 63732006713
+63735000000 63735006698
+63738000000 63738006696
+63741000000 63741006667
+63744000000 63744006697
+63747000000 63747006705
+63750000000 63750006722
+63753000000 63753006712
+63756000000 63756006662
+63759000000 63759006716
+63762000000 63762006710
+63765000000 63765006704
+63768000000 63768006704
+63771000000 63771006718
+63774000000 63774006709
+63777000000 63777006715
+63780000000 63780006704
+63783000000 63783006654
+63786000000 63786006713
+63789000000 63789006709
+63792000000 63792006696
+63795000000 63795006707
+63798000000 63798006625
+63801000000 63801006708
+63804000000 63804006700
+63807000000 63807006701
+63810000000 63810006712
+63813000000 63813006712
+63816000000 63816006666
+63819000000 63819006721
+63822000000 63822006686
+63825000000 63825006714
+63828000000 63828006713
+63831000000 63831006707
+63834000000 63834006662
+63837000000 63837006731
+63840000000 63840006710
+63843000000 63843006718
+63846000000 63846006704
+63849000000 63849006708
+63852000000 63852006710
+63855000000 63855006700
+63858000000 63858006696
+63861000000 63861006704
+63864000000 63864006700
+63867000000 63867006706
+63870000000 63870006697
+63873000000 63873006713
+63876000000 63876006683
+63879000000 63879006704
+63882000000 63882006699
+63885000000 63885006708
+63888000000 63888006697
+63891000000 63891006721
+63894000000 63894006702
+63897000000 63897006687
+63900000000 63900006701
+63903000000 63903006704
+63906000000 63906006707
+63909000000 63909006708
+63912000000 63912006718
+63915000000 63915006707
+63918000000 63918006711
+63921000000 63921006702
+63924000000 63924006700
+63927000000 63927006702
+63930000000 63930006701
+63933000000 63933006667
+63936000000 63936006697
+63939000000 63939006691
+63942000000 63942006707
+63945000000 63945006683
+63948000000 63948006695
+63951000000 63951006708
+63954000000 63954006710
+63957000000 63957006699
+63960000000 63960006641
+63963000000 63963006639
+63966000000 63966006711
+63969000000 63969006626
+63972000000 63972006700
+63975000000 63975006712
+63978000000 63978006704
+63981000000 63981006704
+63984000000 63984006663
+63987000000 63987006688
+63990000000 63990006611
+63993000000 63993006692
+63996000000 63996006704
+63999000000 63999006707
+64002000000 64002006674
+64005000000 64005006685
+64008000000 64008006703
+64011000000 64011006699
+64014000000 64014006707
+64017000000 64017006706
+64020000000 64020006700
+64023000000 64023006725
+64026000000 64026006704
+64029000000 64029006708
+64032000000 64032006693
+64035000000 64035006691
+64038000000 64038006662
+64041000000 64041006692
+64044000000 64044006700
+64047000000 64047006717
+64050000000 64050006707
+64053000000 64053006657
+64056000000 64056006711
+64059000000 64059006705
+64062000000 64062006699
+64065000000 64065006699
+64068000000 64068006713
+64071000000 64071006704
+64074000000 64074006710
+64077000000 64077006699
+64080000000 64080006649
+64083000000 64083006708
+64086000000 64086006704
+64089000000 64089006691
+64092000000 64092006702
+64095000000 64095006620
+64098000000 64098006703
+64101000000 64101006695
+64104000000 64104006696
+64107000000 64107006707
+64110000000 64110006707
+64113000000 64113006661
+64116000000 64116006716
+64119000000 64119006681
+64122000000 64122006709
+64125000000 64125006708
+64128000000 64128006702
+64131000000 64131006657
+64134000000 64134006726
+64137000000 64137006705
+64140000000 64140006713
+64143000000 64143006699
+64146000000 64146006703
+64149000000 64149006705
+64152000000 64152006695
+64155000000 64155006691
+64158000000 64158006699
+64161000000 64161006695
+64164000000 64164006701
+64167000000 64167006692
+64170000000 64170006708
+64173000000 64173006678
+64176000000 64176006699
+64179000000 64179006694
+64182000000 64182006703
+64185000000 64185006692
+64188000000 64188006716
+64191000000 64191006697
+64194000000 64194006682
+64197000000 64197006696
+64200000000 64200006699
+64203000000 64203006702
+64206000000 64206006703
+64209000000 64209006713
+64212000000 64212006702
+64215000000 64215006706
+64218000000 64218006697
+64221000000 64221006695
+64224000000 64224006697
+64227000000 64227006696
+64230000000 64230006662
+64233000000 64233006692
+64236000000 64236006686
+64239000000 64239006702
+64242000000 64242006678
+64245000000 64245006690
+64248000000 64248006703
+64251000000 64251006705
+64254000000 64254006694
+64257000000 64257006636
+64260000000 64260006634
+64263000000 64263006706
+64266000000 64266006621
+64269000000 64269006695
+64272000000 64272006707
+64275000000 64275006699
+64278000000 64278006699
+64281000000 64281006658
+64284000000 64284006683
+64287000000 64287006606
+64290000000 64290006687
+64293000000 64293006699
+64296000000 64296006702
+64299000000 64299006669
+64302000000 64302006680
+64305000000 64305006698
+64308000000 64308006694
+64311000000 64311006702
+64314000000 64314006701
+64317000000 64317006695
+64320000000 64320006720
+64323000000 64323006699
+64326000000 64326006703
+64329000000 64329006688
+64332000000 64332006686
+64335000000 64335006657
+64338000000 64338006687
+64341000000 64341006695
+64344000000 64344006712
+64347000000 64347006702
+64350000000 64350006652
+64353000000 64353006706
+64356000000 64356006700
+64359000000 64359006694
+64362000000 64362006694
+64365000000 64365006708
+64368000000 64368006699
+64371000000 64371006705
+64374000000 64374006694
+64377000000 64377006644
+64380000000 64380006703
+64383000000 64383006699
+64386000000 64386006686
+64389000000 64389006697
+64392000000 64392006615
+64395000000 64395006698
+64398000000 64398006690
+64401000000 64401006691
+64404000000 64404006702
+64407000000 64407006702
+64410000000 64410006656
+64413000000 64413006711
+64416000000 64416006676
+64419000000 64419006704
+64422000000 64422006703
+64425000000 64425006697
+64428000000 64428006652
+64431000000 64431006721
+64434000000 64434006700
+64437000000 64437006708
+64440000000 64440006694
+64443000000 64443006698
+64446000000 64446006700
+64449000000 64449006690
+64452000000 64452006686
+64455000000 64455006694
+64458000000 64458006690
+64461000000 64461006696
+64464000000 64464006687
+64467000000 64467006703
+64470000000 64470006673
+64473000000 64473006694
+64476000000 64476006689
+64479000000 64479006698
+64482000000 64482006687
+64485000000 64485006711
+64488000000 64488006692
+64491000000 64491006677
+64494000000 64494006691
+64497000000 64497006694
+64500000000 64500006697
+64503000000 64503006698
+64506000000 64506006708
+64509000000 64509006697
+64512000000 64512006701
+64515000000 64515006692
+64518000000 64518006690
+64521000000 64521006692
+64524000000 64524006691
+64527000000 64527006657
+64530000000 64530006687
+64533000000 64533006681
+64536000000 64536006697
+64539000000 64539006673
+64542000000 64542006685
+64545000000 64545006698
+64548000000 64548006700
+64551000000 64551006689
+64554000000 64554006631
+64557000000 64557006629
+64560000000 64560006701
+64563000000 64563006616
+64566000000 64566006690
+64569000000 64569006702
+64572000000 64572006694
+64575000000 64575006694
+64578000000 64578006653
+64581000000 64581006678
+64584000000 64584006601
+64587000000 64587006682
+64590000000 64590006694
+64593000000 64593006697
+64596000000 64596006664
+64599000000 64599006675
+64602000000 64602006693
+64605000000 64605006689
+64608000000 64608006697
+64611000000 64611006696
+64614000000 64614006690
+64617000000 64617006715
+64620000000 64620006694
+64623000000 64623006698
+64626000000 64626006683
+64629000000 64629006681
+64632000000 64632006652
+64635000000 64635006682
+64638000000 64638006690
+64641000000 64641006707
+64644000000 64644006697
+64647000000 64647006647
+64650000000 64650006701
+64653000000 64653006695
+64656000000 64656006689
+64659000000 64659006689
+64662000000 64662006703
+64665000000 64665006694
+64668000000 64668006700
+64671000000 64671006689
+64674000000 64674006639
+64677000000 64677006698
+64680000000 64680006694
+64683000000 64683006681
+64686000000 64686006692
+64689000000 64689006610
+64692000000 64692006693
+64695000000 64695006685
+64698000000 64698006686
+64701000000 64701006697
+64704000000 64704006697
+64707000000 64707006651
+64710000000 64710006706
+64713000000 64713006671
+64716000000 64716006699
+64719000000 64719006698
+64722000000 64722006692
+64725000000 64725006647
+64728000000 64728006716
+64731000000 64731006695
+64734000000 64734006703
+64737000000 64737006689
+64740000000 64740006693
+64743000000 64743006695
+64746000000 64746006685
+64749000000 64749006681
+64752000000 64752006689
+64755000000 64755006685
+64758000000 64758006691
+64761000000 64761006682
+64764000000 64764006698
+64767000000 64767006668
+64770000000 64770006689
+64773000000 64773006684
+64776000000 64776006693
+64779000000 64779006682
+64782000000 64782006706
+64785000000 64785006687
+64788000000 64788006672
+64791000000 64791006686
+64794000000 64794006689
+64797000000 64797006692
+64800000000 64800006693
+64803000000 64803006703
+64806000000 64806006692
+64809000000 64809006696
+64812000000 64812006687
+64815000000 64815006685
+64818000000 64818006687
+64821000000 64821006686
+64824000000 64824006652
+64827000000 64827006682
+64830000000 64830006676
+64833000000 64833006692
+64836000000 64836006668
+64839000000 64839006680
+64842000000 64842006693
+64845000000 64845006695
+64848000000 64848006684
+64851000000 64851006626
+64854000000 64854006624
+64857000000 64857006696
+64860000000 64860006611
+64863000000 64863006685
+64866000000 64866006697
+64869000000 64869006689
+64872000000 64872006689
+64875000000 64875006648
+64878000000 64878006673
+64881000000 64881006596
+64884000000 64884006677
+64887000000 64887006689
+64890000000 64890006692
+64893000000 64893006659
+64896000000 64896006670
+64899000000 64899006688
+64902000000 64902006684
+64905000000 64905006692
+64908000000 64908006691
+64911000000 64911006685
+64914000000 64914006710
+64917000000 64917006689
+64920000000 64920006693
+64923000000 64923006678
+64926000000 64926006676
+64929000000 64929006647
+64932000000 64932006677
+64935000000 64935006685
+64938000000 64938006702
+64941000000 64941006692
+64944000000 64944006642
+64947000000 64947006696
+64950000000 64950006690
+64953000000 64953006684
+64956000000 64956006684
+64959000000 64959006698
+64962000000 64962006689
+64965000000 64965006695
+64968000000 64968006684
+64971000000 64971006634
+64974000000 64974006693
+64977000000 64977006689
+64980000000 64980006676
+64983000000 64983006687
+64986000000 64986006605
+64989000000 64989006688
+64992000000 64992006680
+64995000000 64995006681
+64998000000 64998006692
+65001000000 65001006692
+65004000000 65004006646
+65007000000 65007006701
+65010000000 65010006666
+65013000000 65013006694
+65016000000 65016006693
+65019000000 65019006687
+65022000000 65022006642
+65025000000 65025006711
+65028000000 65028006690
+65031000000 65031006698
+65034000000 65034006684
+65037000000 65037006688
+65040000000 65040006690
+65043000000 65043006680
+65046000000 65046006676
+65049000000 65049006684
+65052000000 65052006680
+65055000000 65055006686
+65058000000 65058006677
+65061000000 65061006693
+65064000000 65064006663
+65067000000 65067006684
+65070000000 65070006679
+65073000000 65073006688
+65076000000 65076006677
+65079000000 65079006701
+65082000000 65082006682
+65085000000 65085006667
+65088000000 65088006681
+65091000000 65091006684
+65094000000 65094006687
+65097000000 65097006688
+65100000000 65100006698
+65103000000 65103006687
+65106000000 65106006691
+65109000000 65109006682
+65112000000 65112006680
+65115000000 65115006682
+65118000000 65118006681
+65121000000 65121006647
+65124000000 65124006677
+65127000000 65127006671
+65130000000 65130006687
+65133000000 65133006663
+65136000000 65136006675
+65139000000 65139006688
+65142000000 65142006690
+65145000000 65145006679
+65148000000 65148006621
+65151000000 65151006619
+65154000000 65154006691
+65157000000 65157006606
+65160000000 65160006680
+65163000000 65163006692
+65166000000 65166006684
+65169000000 65169006684
+65172000000 65172006643
+65175000000 65175006668
+65178000000 65178006591
+65181000000 65181006672
+65184000000 65184006684
+65187000000 65187006687
+65190000000 65190006654
+65193000000 65193006665
+65196000000 65196006683
+65199000000 65199006679
+65202000000 65202006687
+65205000000 65205006686
+65208000000 65208006680
+65211000000 65211006705
+65214000000 65214006684
+65217000000 65217006688
+65220000000 65220006673
+65223000000 65223006671
+65226000000 65226006642
+65229000000 65229006672
+65232000000 65232006680
+65235000000 65235006697
+65238000000 65238006687
+65241000000 65241006637
+65244000000 65244006691
+65247000000 65247006685
+65250000000 65250006679
+65253000000 65253006679
+65256000000 65256006693
+65259000000 65259006684
+65262000000 65262006690
+65265000000 65265006679
+65268000000 65268006629
+65271000000 65271006688
+65274000000 65274006684
+65277000000 65277006671
+65280000000 65280006682
+65283000000 65283006600
+65286000000 65286006683
+65289000000 65289006675
+65292000000 65292006676
+65295000000 65295006687
+65298000000 65298006687
+65301000000 65301006641
+65304000000 65304006696
+65307000000 65307006661
+65310000000 65310006689
+65313000000 65313006688
+65316000000 65316006682
+65319000000 65319006637
+65322000000 65322006706
+65325000000 65325006685
+65328000000 65328006693
+65331000000 65331006679
+65334000000 65334006683
+65337000000 65337006685
+65340000000 65340006675
+65343000000 65343006671
+65346000000 65346006679
+65349000000 65349006675
+65352000000 65352006681
+65355000000 65355006672
+65358000000 65358006688
+65361000000 65361006658
+65364000000 65364006679
+65367000000 65367006674
+65370000000 65370006683
+65373000000 65373006672
+65376000000 65376006696
+65379000000 65379006677
+65382000000 65382006662
+65385000000 65385006676
+65388000000 65388006679
+65391000000 65391006682
+65394000000 65394006683
+65397000000 65397006693
+65400000000 65400006682
+65403000000 65403006686
+65406000000 65406006677
+65409000000 65409006675
+65412000000 65412006677
+65415000000 65415006676
+65418000000 65418006642
+65421000000 65421006672
+65424000000 65424006666
+65427000000 65427006682
+65430000000 65430006658
+65433000000 65433006670
+65436000000 65436006683
+65439000000 65439006685
+65442000000 65442006674
+65445000000 65445006616
+65448000000 65448006614
+65451000000 65451006686
+65454000000 65454006601
+65457000000 65457006675
+65460000000 65460006687
+65463000000 65463006679
+65466000000 65466006679
+65469000000 65469006638
+65472000000 65472006663
+65475000000 65475006586
+65478000000 65478006667
+65481000000 65481006679
+65484000000 65484006682
+65487000000 65487006649
+65490000000 65490006660
+65493000000 65493006678
+65496000000 65496006674
+65499000000 65499006682
+65502000000 65502006681
+65505000000 65505006675
+65508000000 65508006700
+65511000000 65511006679
+65514000000 65514006683
+65517000000 65517006668
+65520000000 65520006666
+65523000000 65523006637
+65526000000 65526006667
+65529000000 65529006675
+65532000000 65532006692
+65535000000 65535006682
+65538000000 65538006632
+65541000000 65541006686
+65544000000 65544006680
+65547000000 65547006674
+65550000000 65550006674
+65553000000 65553006688
+65556000000 65556006679
+65559000000 65559006685
+65562000000 65562006674
+65565000000 65565006624
+65568000000 65568006683
+65571000000 65571006679
+65574000000 65574006666
+65577000000 65577006677
+65580000000 65580006595
+65583000000 65583006678
+65586000000 65586006670
+65589000000 65589006671
+65592000000 65592006682
+65595000000 65595006682
+65598000000 65598006636
+65601000000 65601006691
+65604000000 65604006656
+65607000000 65607006684
+65610000000 65610006683
+65613000000 65613006677
+65616000000 65616006632
+65619000000 65619006701
+65622000000 65622006680
+65625000000 65625006688
+65628000000 65628006674
+65631000000 65631006678
+65634000000 65634006680
+65637000000 65637006670
+65640000000 65640006666
+65643000000 65643006674
+65646000000 65646006670
+65649000000 65649006676
+65652000000 65652006667
+65655000000 65655006683
+65658000000 65658006653
+65661000000 65661006674
+65664000000 65664006669
+65667000000 65667006678
+65670000000 65670006667
+65673000000 65673006691
+65676000000 65676006672
+65679000000 65679006657
+65682000000 65682006671
+65685000000 65685006674
+65688000000 65688006677
+65691000000 65691006678
+65694000000 65694006688
+65697000000 65697006677
+65700000000 65700006681
+65703000000 65703006672
+65706000000 65706006670
+65709000000 65709006672
+65712000000 65712006671
+65715000000 65715006637
+65718000000 65718006667
+65721000000 65721006661
+65724000000 65724006677
+65727000000 65727006653
+65730000000 65730006665
+65733000000 65733006678
+65736000000 65736006680
+65739000000 65739006669
+65742000000 65742006611
+65745000000 65745006609
+65748000000 65748006681
+65751000000 65751006596
+65754000000 65754006670
+65757000000 65757006682
+65760000000 65760006674
+65763000000 65763006674
+65766000000 65766006633
+65769000000 65769006658
+65772000000 65772006581
+65775000000 65775006662
+65778000000 65778006674
+65781000000 65781006677
+65784000000 65784006644
+65787000000 65787006655
+65790000000 65790006673
+65793000000 65793006669
+65796000000 65796006677
+65799000000 65799006676
+65802000000 65802006670
+65805000000 65805006695
+65808000000 65808006674
+65811000000 65811006678
+65814000000 65814006663
+65817000000 65817006661
+65820000000 65820006632
+65823000000 65823006662
+65826000000 65826006670
+65829000000 65829006687
+65832000000 65832006677
+65835000000 65835006627
+65838000000 65838006681
+65841000000 65841006675
+65844000000 65844006669
+65847000000 65847006669
+65850000000 65850006683
+65853000000 65853006674
+65856000000 65856006680
+65859000000 65859006669
+65862000000 65862006619
+65865000000 65865006678
+65868000000 65868006674
+65871000000 65871006661
+65874000000 65874006672
+65877000000 65877006590
+65880000000 65880006673
+65883000000 65883006665
+65886000000 65886006666
+65889000000 65889006677
+65892000000 65892006677
+65895000000 65895006631
+65898000000 65898006686
+65901000000 65901006651
+65904000000 65904006679
+65907000000 65907006678
+65910000000 65910006672
+65913000000 65913006627
+65916000000 65916006696
+65919000000 65919006675
+65922000000 65922006683
+65925000000 65925006669
+65928000000 65928006673
+65931000000 65931006675
+65934000000 65934006665
+65937000000 65937006661
+65940000000 65940006669
+65943000000 65943006665
+65946000000 65946006671
+65949000000 65949006662
+65952000000 65952006678
+65955000000 65955006648
+65958000000 65958006669
+65961000000 65961006664
+65964000000 65964006673
+65967000000 65967006662
+65970000000 65970006686
+65973000000 65973006667
+65976000000 65976006652
+65979000000 65979006666
+65982000000 65982006669
+65985000000 65985006672
+65988000000 65988006673
+65991000000 65991006683
+65994000000 65994006672
+65997000000 65997006676
+66000000000 66000006667
+66003000000 66003006665
+66006000000 66006006667
+66009000000 66009006666
+66012000000 66012006632
+66015000000 66015006662
+66018000000 66018006656
+66021000000 66021006672
+66024000000 66024006648
+66027000000 66027006660
+66030000000 66030006673
+66033000000 66033006675
+66036000000 66036006664
+66039000000 66039006606
+66042000000 66042006604
+66045000000 66045006676
+66048000000 66048006591
+66051000000 66051006665
+66054000000 66054006677
+66057000000 66057006669
+66060000000 66060006669
+66063000000 66063006628
+66066000000 66066006653
+66069000000 66069006576
+66072000000 66072006657
+66075000000 66075006669
+66078000000 66078006672
+66081000000 66081006639
+66084000000 66084006650
+66087000000 66087006668
+66090000000 66090006664
+66093000000 66093006672
+66096000000 66096006671
+66099000000 66099006665
+66102000000 66102006690
+66105000000 66105006669
+66108000000 66108006673
+66111000000 66111006658
+66114000000 66114006656
+66117000000 66117006627
+66120000000 66120006657
+66123000000 66123006665
+66126000000 66126006682
+66129000000 66129006672
+66132000000 66132006622
+66135000000 66135006676
+66138000000 66138006670
+66141000000 66141006664
+66144000000 66144006664
+66147000000 66147006678
+66150000000 66150006669
+66153000000 66153006675
+66156000000 66156006664
+66159000000 66159006614
+66162000000 66162006673
+66165000000 66165006669
+66168000000 66168006656
+66171000000 66171006667
+66174000000 66174006585
+66177000000 66177006668
+66180000000 66180006660
+66183000000 66183006661
+66186000000 66186006672
+66189000000 66189006672
+66192000000 66192006626
+66195000000 66195006681
+66198000000 66198006646
+66201000000 66201006674
+66204000000 66204006673
+66207000000 66207006667
+66210000000 66210006622
+66213000000 66213006691
+66216000000 66216006670
+66219000000 66219006678
+66222000000 66222006664
+66225000000 66225006668
+66228000000 66228006670
+66231000000 66231006660
+66234000000 66234006656
+66237000000 66237006664
+66240000000 66240006660
+66243000000 66243006666
+66246000000 66246006657
+66249000000 66249006673
+66252000000 66252006643
+66255000000 66255006664
+66258000000 66258006659
+66261000000 66261006668
+66264000000 66264006657
+66267000000 66267006681
+66270000000 66270006662
+66273000000 66273006647
+66276000000 66276006661
+66279000000 66279006664
+66282000000 66282006667
+66285000000 66285006668
+66288000000 66288006678
+66291000000 66291006667
+66294000000 66294006671
+66297000000 66297006662
+66300000000 66300006660
+66303000000 66303006662
+66306000000 66306006661
+66309000000 66309006627
+66312000000 66312006657
+66315000000 66315006651
+66318000000 66318006667
+66321000000 66321006643
+66324000000 66324006655
+66327000000 66327006668
+66330000000 66330006670
+66333000000 66333006659
+66336000000 66336006601
+66339000000 66339006599
+66342000000 66342006671
+66345000000 66345006586
+66348000000 66348006660
+66351000000 66351006672
+66354000000 66354006664
+66357000000 66357006664
+66360000000 66360006623
+66363000000 66363006648
+66366000000 66366006571
+66369000000 66369006652
+66372000000 66372006664
+66375000000 66375006667
+66378000000 66378006634
+66381000000 66381006645
+66384000000 66384006663
+66387000000 66387006659
+66390000000 66390006667
+66393000000 66393006666
+66396000000 66396006660
+66399000000 66399006685
+66402000000 66402006664
+66405000000 66405006668
+66408000000 66408006653
+66411000000 66411006651
+66414000000 66414006622
+66417000000 66417006652
+66420000000 66420006660
+66423000000 66423006677
+66426000000 66426006667
+66429000000 66429006617
+66432000000 66432006671
+66435000000 66435006665
+66438000000 66438006659
+66441000000 66441006659
+66444000000 66444006673
+66447000000 66447006664
+66450000000 66450006670
+66453000000 66453006659
+66456000000 66456006609
+66459000000 66459006668
+66462000000 66462006664
+66465000000 66465006651
+66468000000 66468006662
+66471000000 66471006580
+66474000000 66474006663
+66477000000 66477006655
+66480000000 66480006656
+66483000000 66483006667
+66486000000 66486006667
+66489000000 66489006621
+66492000000 66492006676
+66495000000 66495006641
+66498000000 66498006669
+66501000000 66501006668
+66504000000 66504006662
+66507000000 66507006617
+66510000000 66510006686
+66513000000 66513006665
+66516000000 66516006673
+66519000000 66519006659
+66522000000 66522006663
+66525000000 66525006665
+66528000000 66528006655
+66531000000 66531006651
+66534000000 66534006659
+66537000000 66537006655
+66540000000 66540006661
+66543000000 66543006652
+66546000000 66546006668
+66549000000 66549006638
+66552000000 66552006659
+66555000000 66555006654
+66558000000 66558006663
+66561000000 66561006652
+66564000000 66564006676
+66567000000 66567006657
+66570000000 66570006642
+66573000000 66573006656
+66576000000 66576006659
+66579000000 66579006662
+66582000000 66582006663
+66585000000 66585006673
+66588000000 66588006662
+66591000000 66591006666
+66594000000 66594006657
+66597000000 66597006655
+66600000000 66600006657
+66603000000 66603006656
+66606000000 66606006622
+66609000000 66609006652
+66612000000 66612006646
+66615000000 66615006662
+66618000000 66618006638
+66621000000 66621006650
+66624000000 66624006663
+66627000000 66627006665
+66630000000 66630006654
+66633000000 66633006596
+66636000000 66636006594
+66639000000 66639006666
+66642000000 66642006581
+66645000000 66645006655
+66648000000 66648006667
+66651000000 66651006659
+66654000000 66654006659
+66657000000 66657006618
+66660000000 66660006643
+66663000000 66663006566
+66666000000 66666006647
+66669000000 66669006659
+66672000000 66672006662
+66675000000 66675006629
+66678000000 66678006640
+66681000000 66681006658
+66684000000 66684006654
+66687000000 66687006662
+66690000000 66690006661
+66693000000 66693006655
+66696000000 66696006680
+66699000000 66699006659
+66702000000 66702006663
+66705000000 66705006648
+66708000000 66708006646
+66711000000 66711006617
+66714000000 66714006647
+66717000000 66717006655
+66720000000 66720006672
+66723000000 66723006662
+66726000000 66726006612
+66729000000 66729006666
+66732000000 66732006660
+66735000000 66735006654
+66738000000 66738006654
+66741000000 66741006668
+66744000000 66744006659
+66747000000 66747006665
+66750000000 66750006654
+66753000000 66753006604
+66756000000 66756006663
+66759000000 66759006659
+66762000000 66762006646
+66765000000 66765006657
+66768000000 66768006575
+66771000000 66771006658
+66774000000 66774006650
+66777000000 66777006651
+66780000000 66780006662
+66783000000 66783006662
+66786000000 66786006616
+66789000000 66789006671
+66792000000 66792006636
+66795000000 66795006664
+66798000000 66798006663
+66801000000 66801006657
+66804000000 66804006612
+66807000000 66807006681
+66810000000 66810006660
+66813000000 66813006668
+66816000000 66816006654
+66819000000 66819006658
+66822000000 66822006660
+66825000000 66825006650
+66828000000 66828006646
+66831000000 66831006654
+66834000000 66834006650
+66837000000 66837006656
+66840000000 66840006647
+66843000000 66843006663
+66846000000 66846006633
+66849000000 66849006654
+66852000000 66852006649
+66855000000 66855006658
+66858000000 66858006647
+66861000000 66861006671
+66864000000 66864006652
+66867000000 66867006637
+66870000000 66870006651
+66873000000 66873006654
+66876000000 66876006657
+66879000000 66879006658
+66882000000 66882006668
+66885000000 66885006657
+66888000000 66888006661
+66891000000 66891006652
+66894000000 66894006650
+66897000000 66897006652
+66900000000 66900006651
+66903000000 66903006617
+66906000000 66906006647
+66909000000 66909006641
+66912000000 66912006657
+66915000000 66915006633
+66918000000 66918006645
+66921000000 66921006658
+66924000000 66924006660
+66927000000 66927006649
+66930000000 66930006591
+66933000000 66933006589
+66936000000 66936006661
+66939000000 66939006576
+66942000000 66942006650
+66945000000 66945006662
+66948000000 66948006654
+66951000000 66951006654
+66954000000 66954006613
+66957000000 66957006638
+66960000000 66960006561
+66963000000 66963006642
+66966000000 66966006654
+66969000000 66969006657
+66972000000 66972006624
+66975000000 66975006635
+66978000000 66978006653
+66981000000 66981006649
+66984000000 66984006657
+66987000000 66987006656
+66990000000 66990006650
+66993000000 66993006675
+66996000000 66996006654
+66999000000 66999006658
+67002000000 67002006643
+67005000000 67005006641
+67008000000 67008006612
+67011000000 67011006642
+67014000000 67014006650
+67017000000 67017006667
+67020000000 67020006657
+67023000000 67023006607
+67026000000 67026006661
+67029000000 67029006655
+67032000000 67032006649
+67035000000 67035006649
+67038000000 67038006663
+67041000000 67041006654
+67044000000 67044006660
+67047000000 67047006649
+67050000000 67050006599
+67053000000 67053006658
+67056000000 67056006654
+67059000000 67059006641
+67062000000 67062006652
+67065000000 67065006570
+67068000000 67068006653
+67071000000 67071006645
+67074000000 67074006646
+67077000000 67077006657
+67080000000 67080006657
+67083000000 67083006611
+67086000000 67086006666
+67089000000 67089006631
+67092000000 67092006659
+67095000000 67095006658
+67098000000 67098006652
+67101000000 67101006607
+67104000000 67104006676
+67107000000 67107006655
+67110000000 67110006663
+67113000000 67113006649
+67116000000 67116006653
+67119000000 67119006655
+67122000000 67122006645
+67125000000 67125006641
+67128000000 67128006649
+67131000000 67131006645
+67134000000 67134006651
+67137000000 67137006642
+67140000000 67140006658
+67143000000 67143006628
+67146000000 67146006649
+67149000000 67149006644
+67152000000 67152006653
+67155000000 67155006642
+67158000000 67158006666
+67161000000 67161006647
+67164000000 67164006632
+67167000000 67167006646
+67170000000 67170006649
+67173000000 67173006652
+67176000000 67176006653
+67179000000 67179006663
+67182000000 67182006652
+67185000000 67185006656
+67188000000 67188006647
+67191000000 67191006645
+67194000000 67194006647
+67197000000 67197006646
+67200000000 67200006612
+67203000000 67203006642
+67206000000 67206006636
+67209000000 67209006652
+67212000000 67212006628
+67215000000 67215006640
+67218000000 67218006653
+67221000000 67221006655
+67224000000 67224006644
+67227000000 67227006586
+67230000000 67230006584
+67233000000 67233006656
+67236000000 67236006571
+67239000000 67239006645
+67242000000 67242006657
+67245000000 67245006649
+67248000000 67248006649
+67251000000 67251006608
+67254000000 67254006633
+67257000000 67257006556
+67260000000 67260006637
+67263000000 67263006649
+67266000000 67266006652
+67269000000 67269006619
+67272000000 67272006630
+67275000000 67275006648
+67278000000 67278006644
+67281000000 67281006652
+67284000000 67284006651
+67287000000 67287006645
+67290000000 67290006670
+67293000000 67293006649
+67296000000 67296006653
+67299000000 67299006638
+67302000000 67302006636
+67305000000 67305006607
+67308000000 67308006637
+67311000000 67311006645
+67314000000 67314006662
+67317000000 67317006652
+67320000000 67320006602
+67323000000 67323006656
+67326000000 67326006650
+67329000000 67329006644
+67332000000 67332006644
+67335000000 67335006658
+67338000000 67338006649
+67341000000 67341006655
+67344000000 67344006644
+67347000000 67347006594
+67350000000 67350006653
+67353000000 67353006649
+67356000000 67356006636
+67359000000 67359006647
+67362000000 67362006565
+67365000000 67365006648
+67368000000 67368006640
+67371000000 67371006641
+67374000000 67374006652
+67377000000 67377006652
+67380000000 67380006606
+67383000000 67383006661
+67386000000 67386006626
+67389000000 67389006654
+67392000000 67392006653
+67395000000 67395006647
+67398000000 67398006602
+67401000000 67401006671
+67404000000 67404006650
+67407000000 67407006658
+67410000000 67410006644
+67413000000 67413006648
+67416000000 67416006650
+67419000000 67419006640
+67422000000 67422006636
+67425000000 67425006644
+67428000000 67428006640
+67431000000 67431006646
+67434000000 67434006637
+67437000000 67437006653
+67440000000 67440006623
+67443000000 67443006644
+67446000000 67446006639
+67449000000 67449006648
+67452000000 67452006637
+67455000000 67455006661
+67458000000 67458006642
+67461000000 67461006627
+67464000000 67464006641
+67467000000 67467006644
+67470000000 67470006647
+67473000000 67473006648
+67476000000 67476006658
+67479000000 67479006647
+67482000000 67482006651
+67485000000 67485006642
+67488000000 67488006640
+67491000000 67491006642
+67494000000 67494006641
+67497000000 67497006607
+67500000000 67500006637
+67503000000 67503006631
+67506000000 67506006647
+67509000000 67509006623
+67512000000 67512006635
+67515000000 67515006648
+67518000000 67518006650
+67521000000 67521006639
+67524000000 67524006581
+67527000000 67527006579
+67530000000 67530006651
+67533000000 67533006566
+67536000000 67536006640
+67539000000 67539006652
+67542000000 67542006644
+67545000000 67545006644
+67548000000 67548006603
+67551000000 67551006628
+67554000000 67554006551
+67557000000 67557006632
+67560000000 67560006644
+67563000000 67563006647
+67566000000 67566006614
+67569000000 67569006625
+67572000000 67572006643
+67575000000 67575006639
+67578000000 67578006647
+67581000000 67581006646
+67584000000 67584006640
+67587000000 67587006665
+67590000000 67590006644
+67593000000 67593006648
+67596000000 67596006633
+67599000000 67599006631
+67602000000 67602006602
+67605000000 67605006632
+67608000000 67608006640
+67611000000 67611006657
+67614000000 67614006647
+67617000000 67617006597
+67620000000 67620006651
+67623000000 67623006645
+67626000000 67626006639
+67629000000 67629006639
+67632000000 67632006653
+67635000000 67635006644
+67638000000 67638006650
+67641000000 67641006639
+67644000000 67644006589
+67647000000 67647006648
+67650000000 67650006644
+67653000000 67653006631
+67656000000 67656006642
+67659000000 67659006560
+67662000000 67662006643
+67665000000 67665006635
+67668000000 67668006636
+67671000000 67671006647
+67674000000 67674006647
+67677000000 67677006601
+67680000000 67680006656
+67683000000 67683006621
+67686000000 67686006649
+67689000000 67689006648
+67692000000 67692006642
+67695000000 67695006597
+67698000000 67698006666
+67701000000 67701006645
+67704000000 67704006653
+67707000000 67707006639
+67710000000 67710006643
+67713000000 67713006645
+67716000000 67716006635
+67719000000 67719006631
+67722000000 67722006639
+67725000000 67725006635
+67728000000 67728006641
+67731000000 67731006632
+67734000000 67734006648
+67737000000 67737006618
+67740000000 67740006639
+67743000000 67743006634
+67746000000 67746006643
+67749000000 67749006632
+67752000000 67752006656
+67755000000 67755006637
+67758000000 67758006622
+67761000000 67761006636
+67764000000 67764006639
+67767000000 67767006642
+67770000000 67770006643
+67773000000 67773006653
+67776000000 67776006642
+67779000000 67779006646
+67782000000 67782006637
+67785000000 67785006635
+67788000000 67788006637
+67791000000 67791006636
+67794000000 67794006602
+67797000000 67797006632
+67800000000 67800006626
+67803000000 67803006642
+67806000000 67806006618
+67809000000 67809006630
+67812000000 67812006643
+67815000000 67815006645
+67818000000 67818006634
+67821000000 67821006576
+67824000000 67824006574
+67827000000 67827006646
+67830000000 67830006561
+67833000000 67833006635
+67836000000 67836006647
+67839000000 67839006639
+67842000000 67842006639
+67845000000 67845006598
+67848000000 67848006623
+67851000000 67851006546
+67854000000 67854006627
+67857000000 67857006639
+67860000000 67860006642
+67863000000 67863006609
+67866000000 67866006620
+67869000000 67869006638
+67872000000 67872006634
+67875000000 67875006642
+67878000000 67878006641
+67881000000 67881006635
+67884000000 67884006660
+67887000000 67887006639
+67890000000 67890006643
+67893000000 67893006628
+67896000000 67896006626
+67899000000 67899006597
+67902000000 67902006627
+67905000000 67905006635
+67908000000 67908006652
+67911000000 67911006642
+67914000000 67914006592
+67917000000 67917006646
+67920000000 67920006640
+67923000000 67923006634
+67926000000 67926006634
+67929000000 67929006648
+67932000000 67932006639
+67935000000 67935006645
+67938000000 67938006634
+67941000000 67941006584
+67944000000 67944006643
+67947000000 67947006639
+67950000000 67950006626
+67953000000 67953006637
+67956000000 67956006555
+67959000000 67959006638
+67962000000 67962006630
+67965000000 67965006631
+67968000000 67968006642
+67971000000 67971006642
+67974000000 67974006596
+67977000000 67977006651
+67980000000 67980006616
+67983000000 67983006644
+67986000000 67986006643
+67989000000 67989006637
+67992000000 67992006592
+67995000000 67995006661
+67998000000 67998006640
+68001000000 68001006648
+68004000000 68004006634
+68007000000 68007006638
+68010000000 68010006640
+68013000000 68013006630
+68016000000 68016006626
+68019000000 68019006634
+68022000000 68022006630
+68025000000 68025006636
+68028000000 68028006627
+68031000000 68031006643
+68034000000 68034006613
+68037000000 68037006634
+68040000000 68040006629
+68043000000 68043006638
+68046000000 68046006627
+68049000000 68049006651
+68052000000 68052006632
+68055000000 68055006617
+68058000000 68058006631
+68061000000 68061006634
+68064000000 68064006637
+68067000000 68067006638
+68070000000 68070006648
+68073000000 68073006637
+68076000000 68076006641
+68079000000 68079006632
+68082000000 68082006630
+68085000000 68085006632
+68088000000 68088006631
+68091000000 68091006597
+68094000000 68094006627
+68097000000 68097006621
+68100000000 68100006637
+68103000000 68103006613
+68106000000 68106006625
+68109000000 68109006638
+68112000000 68112006640
+68115000000 68115006629
+68118000000 68118006571
+68121000000 68121006569
+68124000000 68124006641
+68127000000 68127006556
+68130000000 68130006630
+68133000000 68133006642
+68136000000 68136006634
+68139000000 68139006634
+68142000000 68142006593
+68145000000 68145006618
+68148000000 68148006541
+68151000000 68151006622
+68154000000 68154006634
+68157000000 68157006637
+68160000000 68160006604
+68163000000 68163006615
+68166000000 68166006633
+68169000000 68169006629
+68172000000 68172006637
+68175000000 68175006636
+68178000000 68178006630
+68181000000 68181006655
+68184000000 68184006634
+68187000000 68187006638
+68190000000 68190006623
+68193000000 68193006621
+68196000000 68196006592
+68199000000 68199006622
+68202000000 68202006630
+68205000000 68205006647
+68208000000 68208006637
+68211000000 68211006587
+68214000000 68214006641
+68217000000 68217006635
+68220000000 68220006629
+68223000000 68223006629
+68226000000 68226006643
+68229000000 68229006634
+68232000000 68232006640
+68235000000 68235006629
+68238000000 68238006579
+68241000000 68241006638
+68244000000 68244006634
+68247000000 68247006621
+68250000000 68250006632
+68253000000 68253006550
+68256000000 68256006633
+68259000000 68259006625
+68262000000 68262006626
+68265000000 68265006637
+68268000000 68268006637
+68271000000 68271006591
+68274000000 68274006646
+68277000000 68277006611
+68280000000 68280006639
+68283000000 68283006638
+68286000000 68286006632
+68289000000 68289006587
+68292000000 68292006656
+68295000000 68295006635
+68298000000 68298006643
+68301000000 68301006629
+68304000000 68304006633
+68307000000 68307006635
+68310000000 68310006625
+68313000000 68313006621
+68316000000 68316006629
+68319000000 68319006625
+68322000000 68322006631
+68325000000 68325006622
+68328000000 68328006638
+68331000000 68331006608
+68334000000 68334006629
+68337000000 68337006624
+68340000000 68340006633
+68343000000 68343006622
+68346000000 68346006646
+68349000000 68349006627
+68352000000 68352006612
+68355000000 68355006626
+68358000000 68358006629
+68361000000 68361006632
+68364000000 68364006633
+68367000000 68367006643
+68370000000 68370006632
+68373000000 68373006636
+68376000000 68376006627
+68379000000 68379006625
+68382000000 68382006627
+68385000000 68385006626
+68388000000 68388006592
+68391000000 68391006622
+68394000000 68394006616
+68397000000 68397006632
+68400000000 68400006608
+68403000000 68403006620
+68406000000 68406006633
+68409000000 68409006635
+68412000000 68412006624
+68415000000 68415006566
+68418000000 68418006564
+68421000000 68421006636
+68424000000 68424006551
+68427000000 68427006625
+68430000000 68430006637
+68433000000 68433006629
+68436000000 68436006629
+68439000000 68439006588
+68442000000 68442006613
+68445000000 68445006536
+68448000000 68448006617
+68451000000 68451006629
+68454000000 68454006632
+68457000000 68457006599
+68460000000 68460006610
+68463000000 68463006628
+68466000000 68466006624
+68469000000 68469006632
+68472000000 68472006631
+68475000000 68475006625
+68478000000 68478006650
+68481000000 68481006629
+68484000000 68484006633
+68487000000 68487006618
+68490000000 68490006616
+68493000000 68493006587
+68496000000 68496006617
+68499000000 68499006625
+68502000000 68502006642
+68505000000 68505006632
+68508000000 68508006582
+68511000000 68511006636
+68514000000 68514006630
+68517000000 68517006624
+68520000000 68520006624
+68523000000 68523006638
+68526000000 68526006629
+68529000000 68529006635
+68532000000 68532006624
+68535000000 68535006574
+68538000000 68538006633
+68541000000 68541006629
+68544000000 68544006616
+68547000000 68547006627
+68550000000 68550006545
+68553000000 68553006628
+68556000000 68556006620
+68559000000 68559006621
+68562000000 68562006632
+68565000000 68565006632
+68568000000 68568006586
+68571000000 68571006641
+68574000000 68574006606
+68577000000 68577006634
+68580000000 68580006633
+68583000000 68583006627
+68586000000 68586006582
+68589000000 68589006651
+68592000000 68592006630
+68595000000 68595006638
+68598000000 68598006624
+68601000000 68601006628
+68604000000 68604006630
+68607000000 68607006620
+68610000000 68610006616
+68613000000 68613006624
+68616000000 68616006620
+68619000000 68619006626
+68622000000 68622006617
+68625000000 68625006633
+68628000000 68628006603
+68631000000 68631006624
+68634000000 68634006619
+68637000000 68637006628
+68640000000 68640006617
+68643000000 68643006641
+68646000000 68646006622
+68649000000 68649006607
+68652000000 68652006621
+68655000000 68655006624
+68658000000 68658006627
+68661000000 68661006628
+68664000000 68664006638
+68667000000 68667006627
+68670000000 68670006631
+68673000000 68673006622
+68676000000 68676006620
+68679000000 68679006622
+68682000000 68682006621
+68685000000 68685006587
+68688000000 68688006617
+68691000000 68691006611
+68694000000 68694006627
+68697000000 68697006603
+68700000000 68700006615
+68703000000 68703006628
+68706000000 68706006630
+68709000000 68709006619
+68712000000 68712006561
+68715000000 68715006559
+68718000000 68718006631
+68721000000 68721006546
+68724000000 68724006620
+68727000000 68727006632
+68730000000 68730006624
+68733000000 68733006624
+68736000000 68736006583
+68739000000 68739006608
+68742000000 68742006531
+68745000000 68745006612
+68748000000 68748006624
+68751000000 68751006627
+68754000000 68754006594
+68757000000 68757006605
+68760000000 68760006623
+68763000000 68763006619
+68766000000 68766006627
+68769000000 68769006626
+68772000000 68772006620
+68775000000 68775006645
+68778000000 68778006624
+68781000000 68781006628
+68784000000 68784006613
+68787000000 68787006611
+68790000000 68790006582
+68793000000 68793006612
+68796000000 68796006620
+68799000000 68799006637
+68802000000 68802006627
+68805000000 68805006577
+68808000000 68808006631
+68811000000 68811006625
+68814000000 68814006619
+68817000000 68817006619
+68820000000 68820006633
+68823000000 68823006624
+68826000000 68826006630
+68829000000 68829006619
+68832000000 68832006569
+68835000000 68835006628
+68838000000 68838006624
+68841000000 68841006611
+68844000000 68844006622
+68847000000 68847006540
+68850000000 68850006623
+68853000000 68853006615
+68856000000 68856006616
+68859000000 68859006627
+68862000000 68862006627
+68865000000 68865006581
+68868000000 68868006636
+68871000000 68871006601
+68874000000 68874006629
+68877000000 68877006628
+68880000000 68880006622
+68883000000 68883006577
+68886000000 68886006646
+68889000000 68889006625
+68892000000 68892006633
+68895000000 68895006619
+68898000000 68898006623
+68901000000 68901006625
+68904000000 68904006615
+68907000000 68907006611
+68910000000 68910006619
+68913000000 68913006615
+68916000000 68916006621
+68919000000 68919006612
+68922000000 68922006628
+68925000000 68925006598
+68928000000 68928006619
+68931000000 68931006614
+68934000000 68934006623
+68937000000 68937006612
+68940000000 68940006636
+68943000000 68943006617
+68946000000 68946006602
+68949000000 68949006616
+68952000000 68952006619
+68955000000 68955006622
+68958000000 68958006623
+68961000000 68961006633
+68964000000 68964006622
+68967000000 68967006626
+68970000000 68970006617
+68973000000 68973006615
+68976000000 68976006617
+68979000000 68979006616
+68982000000 68982006582
+68985000000 68985006612
+68988000000 68988006606
+68991000000 68991006622
+68994000000 68994006598
+68997000000 68997006610
+69000000000 69000006623
+69003000000 69003006625
+69006000000 69006006614
+69009000000 69009006556
+69012000000 69012006554
+69015000000 69015006626
+69018000000 69018006541
+69021000000 69021006615
+69024000000 69024006627
+69027000000 69027006619
+69030000000 69030006619
+69033000000 69033006578
+69036000000 69036006603
+69039000000 69039006526
+69042000000 69042006607
+69045000000 69045006619
+69048000000 69048006622
+69051000000 69051006589
+69054000000 69054006600
+69057000000 69057006618
+69060000000 69060006614
+69063000000 69063006622
+69066000000 69066006621
+69069000000 69069006615
+69072000000 69072006640
+69075000000 69075006619
+69078000000 69078006623
+69081000000 69081006608
+69084000000 69084006606
+69087000000 69087006577
+69090000000 69090006607
+69093000000 69093006615
+69096000000 69096006632
+69099000000 69099006622
+69102000000 69102006572
+69105000000 69105006626
+69108000000 69108006620
+69111000000 69111006614
+69114000000 69114006614
+69117000000 69117006628
+69120000000 69120006619
+69123000000 69123006625
+69126000000 69126006614
+69129000000 69129006564
+69132000000 69132006623
+69135000000 69135006619
+69138000000 69138006606
+69141000000 69141006617
+69144000000 69144006535
+69147000000 69147006618
+69150000000 69150006610
+69153000000 69153006611
+69156000000 69156006622
+69159000000 69159006622
+69162000000 69162006576
+69165000000 69165006631
+69168000000 69168006596
+69171000000 69171006624
+69174000000 69174006623
+69177000000 69177006617
+69180000000 69180006572
+69183000000 69183006641
+69186000000 69186006620
+69189000000 69189006628
+69192000000 69192006614
+69195000000 69195006618
+69198000000 69198006620
+69201000000 69201006610
+69204000000 69204006606
+69207000000 69207006614
+69210000000 69210006610
+69213000000 69213006616
+69216000000 69216006607
+69219000000 69219006623
+69222000000 69222006593
+69225000000 69225006614
+69228000000 69228006609
+69231000000 69231006618
+69234000000 69234006607
+69237000000 69237006631
+69240000000 69240006612
+69243000000 69243006597
+69246000000 69246006611
+69249000000 69249006614
+69252000000 69252006617
+69255000000 69255006618
+69258000000 69258006628
+69261000000 69261006617
+69264000000 69264006621
+69267000000 69267006612
+69270000000 69270006610
+69273000000 69273006612
+69276000000 69276006611
+69279000000 69279006577
+69282000000 69282006607
+69285000000 69285006601
+69288000000 69288006617
+69291000000 69291006593
+69294000000 69294006605
+69297000000 69297006618
+69300000000 69300006620
+69303000000 69303006609
+69306000000 69306006551
+69309000000 69309006549
+69312000000 69312006621
+69315000000 69315006536
+69318000000 69318006610
+69321000000 69321006622
+69324000000 69324006614
+69327000000 69327006614
+69330000000 69330006573
+69333000000 69333006598
+69336000000 69336006521
+69339000000 69339006602
+69342000000 69342006614
+69345000000 69345006617
+69348000000 69348006584
+69351000000 69351006595
+69354000000 69354006613
+69357000000 69357006609
+69360000000 69360006617
+69363000000 69363006616
+69366000000 69366006610
+69369000000 69369006635
+69372000000 69372006614
+69375000000 69375006618
+69378000000 69378006603
+69381000000 69381006601
+69384000000 69384006572
+69387000000 69387006602
+69390000000 69390006610
+69393000000 69393006627
+69396000000 69396006617
+69399000000 69399006567
+69402000000 69402006621
+69405000000 69405006615
+69408000000 69408006609
+69411000000 69411006609
+69414000000 69414006623
+69417000000 69417006614
+69420000000 69420006620
+69423000000 69423006609
+69426000000 69426006559
+69429000000 69429006618
+69432000000 69432006614
+69435000000 69435006601
+69438000000 69438006612
+69441000000 69441006530
+69444000000 69444006613
+69447000000 69447006605
+69450000000 69450006606
+69453000000 69453006617
+69456000000 69456006617
+69459000000 69459006571
+69462000000 69462006626
+69465000000 69465006591
+69468000000 69468006619
+69471000000 69471006618
+69474000000 69474006612
+69477000000 69477006567
+69480000000 69480006636
+69483000000 69483006615
+69486000000 69486006623
+69489000000 69489006609
+69492000000 69492006613
+69495000000 69495006615
+69498000000 69498006605
+69501000000 69501006601
+69504000000 69504006609
+69507000000 69507006605
+69510000000 69510006611
+69513000000 69513006602
+69516000000 69516006618
+69519000000 69519006588
+69522000000 69522006609
+69525000000 69525006604
+69528000000 69528006613
+69531000000 69531006602
+69534000000 69534006626
+69537000000 69537006607
+69540000000 69540006592
+69543000000 69543006606
+69546000000 69546006609
+69549000000 69549006612
+69552000000 69552006613
+69555000000 69555006623
+69558000000 69558006612
+69561000000 69561006616
+69564000000 69564006607
+69567000000 69567006605
+69570000000 69570006607
+69573000000 69573006606
+69576000000 69576006572
+69579000000 69579006602
+69582000000 69582006596
+69585000000 69585006612
+69588000000 69588006588
+69591000000 69591006600
+69594000000 69594006613
+69597000000 69597006615
+69600000000 69600006604
+69603000000 69603006546
+69606000000 69606006544
+69609000000 69609006616
+69612000000 69612006531
+69615000000 69615006605
+69618000000 69618006617
+69621000000 69621006609
+69624000000 69624006609
+69627000000 69627006568
+69630000000 69630006593
+69633000000 69633006516
+69636000000 69636006597
+69639000000 69639006609
+69642000000 69642006612
+69645000000 69645006579
+69648000000 69648006590
+69651000000 69651006608
+69654000000 69654006604
+69657000000 69657006612
+69660000000 69660006611
+69663000000 69663006605
+69666000000 69666006630
+69669000000 69669006609
+69672000000 69672006613
+69675000000 69675006598
+69678000000 69678006596
+69681000000 69681006567
+69684000000 69684006597
+69687000000 69687006605
+69690000000 69690006622
+69693000000 69693006612
+69696000000 69696006562
+69699000000 69699006616
+69702000000 69702006610
+69705000000 69705006604
+69708000000 69708006604
+69711000000 69711006618
+69714000000 69714006609
+69717000000 69717006615
+69720000000 69720006604
+69723000000 69723006554
+69726000000 69726006613
+69729000000 69729006609
+69732000000 69732006596
+69735000000 69735006607
+69738000000 69738006525
+69741000000 69741006608
+69744000000 69744006600
+69747000000 69747006601
+69750000000 69750006612
+69753000000 69753006612
+69756000000 69756006566
+69759000000 69759006621
+69762000000 69762006586
+69765000000 69765006614
+69768000000 69768006613
+69771000000 69771006607
+69774000000 69774006562
+69777000000 69777006631
+69780000000 69780006610
+69783000000 69783006618
+69786000000 69786006604
+69789000000 69789006608
+69792000000 69792006610
+69795000000 69795006600
+69798000000 69798006596
+69801000000 69801006604
+69804000000 69804006600
+69807000000 69807006606
+69810000000 69810006597
+69813000000 69813006613
+69816000000 69816006583
+69819000000 69819006604
+69822000000 69822006599
+69825000000 69825006608
+69828000000 69828006597
+69831000000 69831006621
+69834000000 69834006602
+69837000000 69837006587
+69840000000 69840006601
+69843000000 69843006604
+69846000000 69846006607
+69849000000 69849006608
+69852000000 69852006618
+69855000000 69855006607
+69858000000 69858006611
+69861000000 69861006602
+69864000000 69864006600
+69867000000 69867006602
+69870000000 69870006601
+69873000000 69873006567
+69876000000 69876006597
+69879000000 69879006591
+69882000000 69882006607
+69885000000 69885006583
+69888000000 69888006595
+69891000000 69891006608
+69894000000 69894006610
+69897000000 69897006599
+69900000000 69900006541
+69903000000 69903006539
+69906000000 69906006611
+69909000000 69909006526
+69912000000 69912006600
+69915000000 69915006612
+69918000000 69918006604
+69921000000 69921006604
+69924000000 69924006563
+69927000000 69927006588
+69930000000 69930006511
+69933000000 69933006592
+69936000000 69936006604
+69939000000 69939006607
+69942000000 69942006574
+69945000000 69945006585
+69948000000 69948006603
+69951000000 69951006599
+69954000000 69954006607
+69957000000 69957006606
+69960000000 69960006600
+69963000000 69963006625
+69966000000 69966006604
+69969000000 69969006608
+69972000000 69972006593
+69975000000 69975006591
+69978000000 69978006562
+69981000000 69981006592
+69984000000 69984006600
+69987000000 69987006617
+69990000000 69990006607
+69993000000 69993006557
+69996000000 69996006611
+69999000000 69999006605
+70002000000 70002006599
+70005000000 70005006599
+70008000000 70008006613
+70011000000 70011006604
+70014000000 70014006610
+70017000000 70017006599
+70020000000 70020006549
+70023000000 70023006608
+70026000000 70026006604
+70029000000 70029006591
+70032000000 70032006602
+70035000000 70035006520
+70038000000 70038006603
+70041000000 70041006595
+70044000000 70044006596
+70047000000 70047006607
+70050000000 70050006607
+70053000000 70053006561
+70056000000 70056006616
+70059000000 70059006581
+70062000000 70062006609
+70065000000 70065006608
+70068000000 70068006602
+70071000000 70071006557
+70074000000 70074006626
+70077000000 70077006605
+70080000000 70080006613
+70083000000 70083006599
+70086000000 70086006603
+70089000000 70089006605
+70092000000 70092006595
+70095000000 70095006591
+70098000000 70098006599
+70101000000 70101006595
+70104000000 70104006601
+70107000000 70107006592
+70110000000 70110006608
+70113000000 70113006578
+70116000000 70116006599
+70119000000 70119006594
+70122000000 70122006603
+70125000000 70125006592
+70128000000 70128006616
+70131000000 70131006597
+70134000000 70134006582
+70137000000 70137006596
+70140000000 70140006599
+70143000000 70143006602
+70146000000 70146006603
+70149000000 70149006613
+70152000000 70152006602
+70155000000 70155006606
+70158000000 70158006597
+70161000000 70161006595
+70164000000 70164006597
+70167000000 70167006596
+70170000000 70170006562
+70173000000 70173006592
+70176000000 70176006586
+70179000000 70179006602
+70182000000 70182006578
+70185000000 70185006590
+70188000000 70188006603
+70191000000 70191006605
+70194000000 70194006594
+70197000000 70197006536
+70200000000 70200006534
+70203000000 70203006606
+70206000000 70206006521
+70209000000 70209006595
+70212000000 70212006607
+70215000000 70215006599
+70218000000 70218006599
+70221000000 70221006558
+70224000000 70224006583
+70227000000 70227006506
+70230000000 70230006587
+70233000000 70233006599
+70236000000 70236006602
+70239000000 70239006569
+70242000000 70242006580
+70245000000 70245006598
+70248000000 70248006594
+70251000000 70251006602
+70254000000 70254006601
+70257000000 70257006595
+70260000000 70260006620
+70263000000 70263006599
+70266000000 70266006603
+70269000000 70269006588
+70272000000 70272006586
+70275000000 70275006557
+70278000000 70278006587
+70281000000 70281006595
+70284000000 70284006612
+70287000000 70287006602
+70290000000 70290006552
+70293000000 70293006606
+70296000000 70296006600
+70299000000 70299006594
+70302000000 70302006594
+70305000000 70305006608
+70308000000 70308006599
+70311000000 70311006605
+70314000000 70314006594
+70317000000 70317006544
+70320000000 70320006603
+70323000000 70323006599
+70326000000 70326006586
+70329000000 70329006597
+70332000000 70332006515
+70335000000 70335006598
+70338000000 70338006590
+70341000000 70341006591
+70344000000 70344006602
+70347000000 70347006602
+70350000000 70350006556
+70353000000 70353006611
+70356000000 70356006576
+70359000000 70359006604
+70362000000 70362006603
+70365000000 70365006597
+70368000000 70368006552
+70371000000 70371006621
+70374000000 70374006600
+70377000000 70377006608
+70380000000 70380006594
+70383000000 70383006598
+70386000000 70386006600
+70389000000 70389006590
+70392000000 70392006586
+70395000000 70395006594
+70398000000 70398006590
+70401000000 70401006596
+70404000000 70404006587
+70407000000 70407006603
+70410000000 70410006573
+70413000000 70413006594
+70416000000 70416006589
+70419000000 70419006598
+70422000000 70422006587
+70425000000 70425006611
+70428000000 70428006592
+70431000000 70431006577
+70434000000 70434006591
+70437000000 70437006594
+70440000000 70440006597
+70443000000 70443006598
+70446000000 70446006608
+70449000000 70449006597
+70452000000 70452006601
+70455000000 70455006592
+70458000000 70458006590
+70461000000 70461006592
+70464000000 70464006591
+70467000000 70467006557
+70470000000 70470006587
+70473000000 70473006581
+70476000000 70476006597
+70479000000 70479006573
+70482000000 70482006585
+70485000000 70485006598
+70488000000 70488006600
+70491000000 70491006589
+70494000000 70494006531
+70497000000 70497006529
+70500000000 70500006601
+70503000000 70503006516
+70506000000 70506006590
+70509000000 70509006602
+70512000000 70512006594
+70515000000 70515006594
+70518000000 70518006553
+70521000000 70521006578
+70524000000 70524006501
+70527000000 70527006582
+70530000000 70530006594
+70533000000 70533006597
+70536000000 70536006564
+70539000000 70539006575
+70542000000 70542006593
+70545000000 70545006589
+70548000000 70548006597
+70551000000 70551006596
+70554000000 70554006590
+70557000000 70557006615
+70560000000 70560006594
+70563000000 70563006598
+70566000000 70566006583
+70569000000 70569006581
+70572000000 70572006552
+70575000000 70575006582
+70578000000 70578006590
+70581000000 70581006607
+70584000000 70584006597
+70587000000 70587006547
+70590000000 70590006601
+70593000000 70593006595
+70596000000 70596006589
+70599000000 70599006589
+70602000000 70602006603
+70605000000 70605006594
+70608000000 70608006600
+70611000000 70611006589
+70614000000 70614006539
+70617000000 70617006598
+70620000000 70620006594
+70623000000 70623006581
+70626000000 70626006592
+70629000000 70629006510
+70632000000 70632006593
+70635000000 70635006585
+70638000000 70638006586
+70641000000 70641006597
+70644000000 70644006597
+70647000000 70647006551
+70650000000 70650006606
+70653000000 70653006571
+70656000000 70656006599
+70659000000 70659006598
+70662000000 70662006592
+70665000000 70665006547
+70668000000 70668006616
+70671000000 70671006595
+70674000000 70674006603
+70677000000 70677006589
+70680000000 70680006593
+70683000000 70683006595
+70686000000 70686006585
+70689000000 70689006581
+70692000000 70692006589
+70695000000 70695006585
+70698000000 70698006591
+70701000000 70701006582
+70704000000 70704006598
+70707000000 70707006568
+70710000000 70710006589
+70713000000 70713006584
+70716000000 70716006593
+70719000000 70719006582
+70722000000 70722006606
+70725000000 70725006587
+70728000000 70728006572
+70731000000 70731006586
+70734000000 70734006589
+70737000000 70737006592
+70740000000 70740006593
+70743000000 70743006603
+70746000000 70746006592
+70749000000 70749006596
+70752000000 70752006587
+70755000000 70755006585
+70758000000 70758006587
+70761000000 70761006586
+70764000000 70764006552
+70767000000 70767006582
+70770000000 70770006576
+70773000000 70773006592
+70776000000 70776006568
+70779000000 70779006580
+70782000000 70782006593
+70785000000 70785006595
+70788000000 70788006584
+70791000000 70791006526
+70794000000 70794006524
+70797000000 70797006596
+70800000000 70800006511
+70803000000 70803006585
+70806000000 70806006597
+70809000000 70809006589
+70812000000 70812006589
+70815000000 70815006548
+70818000000 70818006573
+70821000000 70821006496
+70824000000 70824006577
+70827000000 70827006589
+70830000000 70830006592
+70833000000 70833006559
+70836000000 70836006570
+70839000000 70839006588
+70842000000 70842006584
+70845000000 70845006592
+70848000000 70848006591
+70851000000 70851006585
+70854000000 70854006610
+70857000000 70857006589
+70860000000 70860006593
+70863000000 70863006578
+70866000000 70866006576
+70869000000 70869006547
+70872000000 70872006577
+70875000000 70875006585
+70878000000 70878006602
+70881000000 70881006592
+70884000000 70884006542
+70887000000 70887006596
+70890000000 70890006590
+70893000000 70893006584
+70896000000 70896006584
+70899000000 70899006598
+70902000000 70902006589
+70905000000 70905006595
+70908000000 70908006584
+70911000000 70911006534
+70914000000 70914006593
+70917000000 70917006589
+70920000000 70920006576
+70923000000 70923006587
+70926000000 70926006505
+70929000000 70929006588
+70932000000 70932006580
+70935000000 70935006581
+70938000000 70938006592
+70941000000 70941006592
+70944000000 70944006546
+70947000000 70947006601
+70950000000 70950006566
+70953000000 70953006594
+70956000000 70956006593
+70959000000 70959006587
+70962000000 70962006542
+70965000000 70965006611
+70968000000 70968006590
+70971000000 70971006598
+70974000000 70974006584
+70977000000 70977006588
+70980000000 70980006590
+70983000000 70983006580
+70986000000 70986006576
+70989000000 70989006584
+70992000000 70992006580
+70995000000 70995006586
+70998000000 70998006577
+71001000000 71001006593
+71004000000 71004006563
+71007000000 71007006584
+71010000000 71010006579
+71013000000 71013006588
+71016000000 71016006577
+71019000000 71019006601
+71022000000 71022006582
+71025000000 71025006567
+71028000000 71028006581
+71031000000 71031006584
+71034000000 71034006587
+71037000000 71037006588
+71040000000 71040006598
+71043000000 71043006587
+71046000000 71046006591
+71049000000 71049006582
+71052000000 71052006580
+71055000000 71055006582
+71058000000 71058006581
+71061000000 71061006547
+71064000000 71064006577
+71067000000 71067006571
+71070000000 71070006587
+71073000000 71073006563
+71076000000 71076006575
+71079000000 71079006588
+71082000000 71082006590
+71085000000 71085006579
+71088000000 71088006521
+71091000000 71091006519
+71094000000 71094006591
+71097000000 71097006506
+71100000000 71100006580
+71103000000 71103006592
+71106000000 71106006584
+71109000000 71109006584
+71112000000 71112006543
+71115000000 71115006568
+71118000000 71118006491
+71121000000 71121006572
+71124000000 71124006584
+71127000000 71127006587
+71130000000 71130006554
+71133000000 71133006565
+71136000000 71136006583
+71139000000 71139006579
+71142000000 71142006587
+71145000000 71145006586
+71148000000 71148006580
+71151000000 71151006605
+71154000000 71154006584
+71157000000 71157006588
+71160000000 71160006573
+71163000000 71163006571
+71166000000 71166006542
+71169000000 71169006572
+71172000000 71172006580
+71175000000 71175006597
+71178000000 71178006587
+71181000000 71181006537
+71184000000 71184006591
+71187000000 71187006585
+71190000000 71190006579
+71193000000 71193006579
+71196000000 71196006593
+71199000000 71199006584
+71202000000 71202006590
+71205000000 71205006579
+71208000000 71208006529
+71211000000 71211006588
+71214000000 71214006584
+71217000000 71217006571
+71220000000 71220006582
+71223000000 71223006500
+71226000000 71226006583
+71229000000 71229006575
+71232000000 71232006576
+71235000000 71235006587
+71238000000 71238006587
+71241000000 71241006541
+71244000000 71244006596
+71247000000 71247006561
+71250000000 71250006589
+71253000000 71253006588
+71256000000 71256006582
+71259000000 71259006537
+71262000000 71262006606
+71265000000 71265006585
+71268000000 71268006593
+71271000000 71271006579
+71274000000 71274006583
+71277000000 71277006585
+71280000000 71280006575
+71283000000 71283006571
+71286000000 71286006579
+71289000000 71289006575
+71292000000 71292006581
+71295000000 71295006572
+71298000000 71298006588
+71301000000 71301006558
+71304000000 71304006579
+71307000000 71307006574
+71310000000 71310006583
+71313000000 71313006572
+71316000000 71316006596
+71319000000 71319006577
+71322000000 71322006562
+71325000000 71325006576
+71328000000 71328006579
+71331000000 71331006582
+71334000000 71334006583
+71337000000 71337006593
+71340000000 71340006582
+71343000000 71343006586
+71346000000 71346006577
+71349000000 71349006575
+71352000000 71352006577
+71355000000 71355006576
+71358000000 71358006542
+71361000000 71361006572
+71364000000 71364006566
+71367000000 71367006582
+71370000000 71370006558
+71373000000 71373006570
+71376000000 71376006583
+71379000000 71379006585
+71382000000 71382006574
+71385000000 71385006516
+71388000000 71388006514
+71391000000 71391006586
+71394000000 71394006501
+71397000000 71397006575
+71400000000 71400006587
+71403000000 71403006579
+71406000000 71406006579
+71409000000 71409006538
+71412000000 71412006563
+71415000000 71415006486
+71418000000 71418006567
+71421000000 71421006579
+71424000000 71424006582
+71427000000 71427006549
+71430000000 71430006560
+71433000000 71433006578
+71436000000 71436006574
+71439000000 71439006582
+71442000000 71442006581
+71445000000 71445006575
+71448000000 71448006600
+71451000000 71451006579
+71454000000 71454006583
+71457000000 71457006568
+71460000000 71460006566
+71463000000 71463006537
+71466000000 71466006567
+71469000000 71469006575
+71472000000 71472006592
+71475000000 71475006582
+71478000000 71478006532
+71481000000 71481006586
+71484000000 71484006580
+71487000000 71487006574
+71490000000 71490006574
+71493000000 71493006588
+71496000000 71496006579
+71499000000 71499006585
+71502000000 71502006574
+71505000000 71505006524
+71508000000 71508006583
+71511000000 71511006579
+71514000000 71514006566
+71517000000 71517006577
+71520000000 71520006495
+71523000000 71523006578
+71526000000 71526006570
+71529000000 71529006571
+71532000000 71532006582
+71535000000 71535006582
+71538000000 71538006536
+71541000000 71541006591
+71544000000 71544006556
+71547000000 71547006584
+71550000000 71550006583
+71553000000 71553006577
+71556000000 71556006532
+71559000000 71559006601
+71562000000 71562006580
+71565000000 71565006588
+71568000000 71568006574
+71571000000 71571006578
+71574000000 71574006580
+71577000000 71577006570
+71580000000 71580006566
+71583000000 71583006574
+71586000000 71586006570
+71589000000 71589006576
+71592000000 71592006567
+71595000000 71595006583
+71598000000 71598006553
+71601000000 71601006574
+71604000000 71604006569
+71607000000 71607006578
+71610000000 71610006567
+71613000000 71613006591
+71616000000 71616006572
+71619000000 71619006557
+71622000000 71622006571
+71625000000 71625006574
+71628000000 71628006577
+71631000000 71631006578
+71634000000 71634006588
+71637000000 71637006577
+71640000000 71640006581
+71643000000 71643006572
+71646000000 71646006570
+71649000000 71649006572
+71652000000 71652006571
+71655000000 71655006537
+71658000000 71658006567
+71661000000 71661006561
+71664000000 71664006577
+71667000000 71667006553
+71670000000 71670006565
+71673000000 71673006578
+71676000000 71676006580
+71679000000 71679006569
+71682000000 71682006511
+71685000000 71685006509
+71688000000 71688006581
+71691000000 71691006496
+71694000000 71694006570
+71697000000 71697006582
+71700000000 71700006574
+71703000000 71703006574
+71706000000 71706006533
+71709000000 71709006558
+71712000000 71712006481
+71715000000 71715006562
+71718000000 71718006574
+71721000000 71721006577
+71724000000 71724006544
+71727000000 71727006555
+71730000000 71730006573
+71733000000 71733006569
+71736000000 71736006577
+71739000000 71739006576
+71742000000 71742006570
+71745000000 71745006595
+71748000000 71748006574
+71751000000 71751006578
+71754000000 71754006563
+71757000000 71757006561
+71760000000 71760006532
+71763000000 71763006562
+71766000000 71766006570
+71769000000 71769006587
+71772000000 71772006577
+71775000000 71775006527
+71778000000 71778006581
+71781000000 71781006575
+71784000000 71784006569
+71787000000 71787006569
+71790000000 71790006583
+71793000000 71793006574
+71796000000 71796006580
+71799000000 71799006569
+71802000000 71802006519
+71805000000 71805006578
+71808000000 71808006574
+71811000000 71811006561
+71814000000 71814006572
+71817000000 71817006490
+71820000000 71820006573
+71823000000 71823006565
+71826000000 71826006566
+71829000000 71829006577
+71832000000 71832006577
+71835000000 71835006531
+71838000000 71838006586
+71841000000 71841006551
+71844000000 71844006579
+71847000000 71847006578
+71850000000 71850006572
+71853000000 71853006527
+71856000000 71856006596
+71859000000 71859006575
+71862000000 71862006583
+71865000000 71865006569
+71868000000 71868006573
+71871000000 71871006575
+71874000000 71874006565
+71877000000 71877006561
+71880000000 71880006569
+71883000000 71883006565
+71886000000 71886006571
+71889000000 71889006562
+71892000000 71892006578
+71895000000 71895006548
+71898000000 71898006569
+71901000000 71901006564
+71904000000 71904006573
+71907000000 71907006562
+71910000000 71910006586
+71913000000 71913006567
+71916000000 71916006552
+71919000000 71919006566
+71922000000 71922006569
+71925000000 71925006572
+71928000000 71928006573
+71931000000 71931006583
+71934000000 71934006572
+71937000000 71937006576
+71940000000 71940006567
+71943000000 71943006565
+71946000000 71946006567
+71949000000 71949006566
+71952000000 71952006532
+71955000000 71955006562
+71958000000 71958006556
+71961000000 71961006572
+71964000000 71964006548
+71967000000 71967006560
+71970000000 71970006573
+71973000000 71973006575
+71976000000 71976006564
+71979000000 71979006506
+71982000000 71982006504
+71985000000 71985006576
+71988000000 71988006491
+71991000000 71991006565
+71994000000 71994006577
+71997000000 71997006569
+72000000000 72000006569
+72003000000 72003006528
+72006000000 72006006553
+72009000000 72009006476
+72012000000 72012006557
+72015000000 72015006569
+72018000000 72018006572
+72021000000 72021006539
+72024000000 72024006550
+72027000000 72027006568
+72030000000 72030006564
+72033000000 72033006572
+72036000000 72036006571
+72039000000 72039006565
+72042000000 72042006590
+72045000000 72045006569
+72048000000 72048006573
+72051000000 72051006558
+72054000000 72054006556
+72057000000 72057006527
+72060000000 72060006557
+72063000000 72063006565
+72066000000 72066006582
+72069000000 72069006572
+72072000000 72072006522
+72075000000 72075006576
+72078000000 72078006570
+72081000000 72081006564
+72084000000 72084006564
+72087000000 72087006578
+72090000000 72090006569
+72093000000 72093006575
+72096000000 72096006564
+72099000000 72099006514
+72102000000 72102006573
+72105000000 72105006569
+72108000000 72108006556
+72111000000 72111006567
+72114000000 72114006485
+72117000000 72117006568
+72120000000 72120006560
+72123000000 72123006561
+72126000000 72126006572
+72129000000 72129006572
+72132000000 72132006526
+72135000000 72135006581
+72138000000 72138006546
+72141000000 72141006574
+72144000000 72144006573
+72147000000 72147006567
+72150000000 72150006522
+72153000000 72153006591
+72156000000 72156006570
+72159000000 72159006578
+72162000000 72162006564
+72165000000 72165006568
+72168000000 72168006570
+72171000000 72171006560
+72174000000 72174006556
+72177000000 72177006564
+72180000000 72180006560
+72183000000 72183006566
+72186000000 72186006557
+72189000000 72189006573
+72192000000 72192006543
+72195000000 72195006564
+72198000000 72198006559
+72201000000 72201006568
+72204000000 72204006557
+72207000000 72207006581
+72210000000 72210006562
+72213000000 72213006547
+72216000000 72216006561
+72219000000 72219006564
+72222000000 72222006567
+72225000000 72225006568
+72228000000 72228006578
+72231000000 72231006567
+72234000000 72234006571
+72237000000 72237006562
+72240000000 72240006560
+72243000000 72243006562
+72246000000 72246006561
+72249000000 72249006527
+72252000000 72252006557
+72255000000 72255006551
+72258000000 72258006567
+72261000000 72261006543
+72264000000 72264006555
+72267000000 72267006568
+72270000000 72270006570
+72273000000 72273006559
+72276000000 72276006501
+72279000000 72279006499
+72282000000 72282006571
+72285000000 72285006486
+72288000000 72288006560
+72291000000 72291006572
+72294000000 72294006564
+72297000000 72297006564
+72300000000 72300006523
+72303000000 72303006548
+72306000000 72306006471
+72309000000 72309006552
+72312000000 72312006564
+72315000000 72315006567
+72318000000 72318006534
+72321000000 72321006545
+72324000000 72324006563
+72327000000 72327006559
+72330000000 72330006567
+72333000000 72333006566
+72336000000 72336006560
+72339000000 72339006585
+72342000000 72342006564
+72345000000 72345006568
+72348000000 72348006553
+72351000000 72351006551
+72354000000 72354006522
+72357000000 72357006552
+72360000000 72360006560
+72363000000 72363006577
+72366000000 72366006567
+72369000000 72369006517
+72372000000 72372006571
+72375000000 72375006565
+72378000000 72378006559
+72381000000 72381006559
+72384000000 72384006573
+72387000000 72387006564
+72390000000 72390006570
+72393000000 72393006559
+72396000000 72396006509
+72399000000 72399006568
+72402000000 72402006564
+72405000000 72405006551
+72408000000 72408006562
+72411000000 72411006480
+72414000000 72414006563
+72417000000 72417006555
+72420000000 72420006556
+72423000000 72423006567
+72426000000 72426006567
+72429000000 72429006521
+72432000000 72432006576
+72435000000 72435006541
+72438000000 72438006569
+72441000000 72441006568
+72444000000 72444006562
+72447000000 72447006517
+72450000000 72450006586
+72453000000 72453006565
+72456000000 72456006573
+72459000000 72459006559
+72462000000 72462006563
+72465000000 72465006565
+72468000000 72468006555
+72471000000 72471006551
+72474000000 72474006559
+72477000000 72477006555
+72480000000 72480006561
+72483000000 72483006552
+72486000000 72486006568
+72489000000 72489006538
+72492000000 72492006559
+72495000000 72495006554
+72498000000 72498006563
+72501000000 72501006552
+72504000000 72504006576
+72507000000 72507006557
+72510000000 72510006542
+72513000000 72513006556
+72516000000 72516006559
+72519000000 72519006562
+72522000000 72522006563
+72525000000 72525006573
+72528000000 72528006562
+72531000000 72531006566
+72534000000 72534006557
+72537000000 72537006555
+72540000000 72540006557
+72543000000 72543006556
+72546000000 72546006522
+72549000000 72549006552
+72552000000 72552006546
+72555000000 72555006562
+72558000000 72558006538
+72561000000 72561006550
+72564000000 72564006563
+72567000000 72567006565
+72570000000 72570006554
+72573000000 72573006496
+72576000000 72576006494
+72579000000 72579006566
+72582000000 72582006481
+72585000000 72585006555
+72588000000 72588006567
+72591000000 72591006559
+72594000000 72594006559
+72597000000 72597006518
+72600000000 72600006543
+72603000000 72603006466
+72606000000 72606006547
+72609000000 72609006559
+72612000000 72612006562
+72615000000 72615006529
+72618000000 72618006540
+72621000000 72621006558
+72624000000 72624006554
+72627000000 72627006562
+72630000000 72630006561
+72633000000 72633006555
+72636000000 72636006580
+72639000000 72639006559
+72642000000 72642006563
+72645000000 72645006548
+72648000000 72648006546
+72651000000 72651006517
+72654000000 72654006547
+72657000000 72657006555
+72660000000 72660006572
+72663000000 72663006562
+72666000000 72666006512
+72669000000 72669006566
+72672000000 72672006560
+72675000000 72675006554
+72678000000 72678006554
+72681000000 72681006568
+72684000000 72684006559
+72687000000 72687006565
+72690000000 72690006554
+72693000000 72693006504
+72696000000 72696006563
+72699000000 72699006559
+72702000000 72702006546
+72705000000 72705006557
+72708000000 72708006475
+72711000000 72711006558
+72714000000 72714006550
+72717000000 72717006551
+72720000000 72720006562
+72723000000 72723006562
+72726000000 72726006516
+72729000000 72729006571
+72732000000 72732006536
+72735000000 72735006564
+72738000000 72738006563
+72741000000 72741006557
+72744000000 72744006512
+72747000000 72747006581
+72750000000 72750006560
+72753000000 72753006568
+72756000000 72756006554
+72759000000 72759006558
+72762000000 72762006560
+72765000000 72765006550
+72768000000 72768006546
+72771000000 72771006554
+72774000000 72774006550
+72777000000 72777006556
+72780000000 72780006547
+72783000000 72783006563
+72786000000 72786006533
+72789000000 72789006554
+72792000000 72792006549
+72795000000 72795006558
+72798000000 72798006547
+72801000000 72801006571
+72804000000 72804006552
+72807000000 72807006537
+72810000000 72810006551
+72813000000 72813006554
+72816000000 72816006557
+72819000000 72819006558
+72822000000 72822006568
+72825000000 72825006557
+72828000000 72828006561
+72831000000 72831006552
+72834000000 72834006550
+72837000000 72837006552
+72840000000 72840006551
+72843000000 72843006517
+72846000000 72846006547
+72849000000 72849006541
+72852000000 72852006557
+72855000000 72855006533
+72858000000 72858006545
+72861000000 72861006558
+72864000000 72864006560
+72867000000 72867006549
+72870000000 72870006491
+72873000000 72873006489
+72876000000 72876006561
+72879000000 72879006476
+72882000000 72882006550
+72885000000 72885006562
+72888000000 72888006554
+72891000000 72891006554
+72894000000 72894006513
+72897000000 72897006538
+72900000000 72900006461
+72903000000 72903006542
+72906000000 72906006554
+72909000000 72909006557
+72912000000 72912006524
+72915000000 72915006535
+72918000000 72918006553
+72921000000 72921006549
+72924000000 72924006557
+72927000000 72927006556
+72930000000 72930006550
+72933000000 72933006575
+72936000000 72936006554
+72939000000 72939006558
+72942000000 72942006543
+72945000000 72945006541
+72948000000 72948006512
+72951000000 72951006542
+72954000000 72954006550
+72957000000 72957006567
+72960000000 72960006557
+72963000000 72963006507
+72966000000 72966006561
+72969000000 72969006555
+72972000000 72972006549
+72975000000 72975006549
+72978000000 72978006563
+72981000000 72981006554
+72984000000 72984006560
+72987000000 72987006549
+72990000000 72990006499
+72993000000 72993006558
+72996000000 72996006554
+72999000000 72999006541
+73002000000 73002006552
+73005000000 73005006470
+73008000000 73008006553
+73011000000 73011006545
+73014000000 73014006546
+73017000000 73017006557
+73020000000 73020006557
+73023000000 73023006511
+73026000000 73026006566
+73029000000 73029006531
+73032000000 73032006559
+73035000000 73035006558
+73038000000 73038006552
+73041000000 73041006507
+73044000000 73044006576
+73047000000 73047006555
+73050000000 73050006563
+73053000000 73053006549
+73056000000 73056006553
+73059000000 73059006555
+73062000000 73062006545
+73065000000 73065006541
+73068000000 73068006549
+73071000000 73071006545
+73074000000 73074006551
+73077000000 73077006542
+73080000000 73080006558
+73083000000 73083006528
+73086000000 73086006549
+73089000000 73089006544
+73092000000 73092006553
+73095000000 73095006542
+73098000000 73098006566
+73101000000 73101006547
+73104000000 73104006532
+73107000000 73107006546
+73110000000 73110006549
+73113000000 73113006552
+73116000000 73116006553
+73119000000 73119006563
+73122000000 73122006552
+73125000000 73125006556
+73128000000 73128006547
+73131000000 73131006545
+73134000000 73134006547
+73137000000 73137006546
+73140000000 73140006512
+73143000000 73143006542
+73146000000 73146006536
+73149000000 73149006552
+73152000000 73152006528
+73155000000 73155006540
+73158000000 73158006553
+73161000000 73161006555
+73164000000 73164006544
+73167000000 73167006486
+73170000000 73170006484
+73173000000 73173006556
+73176000000 73176006471
+73179000000 73179006545
+73182000000 73182006557
+73185000000 73185006549
+73188000000 73188006549
+73191000000 73191006508
+73194000000 73194006533
+73197000000 73197006456
+73200000000 73200006537
+73203000000 73203006549
+73206000000 73206006552
+73209000000 73209006519
+73212000000 73212006530
+73215000000 73215006548
+73218000000 73218006544
+73221000000 73221006552
+73224000000 73224006551
+73227000000 73227006545
+73230000000 73230006570
+73233000000 73233006549
+73236000000 73236006553
+73239000000 73239006538
+73242000000 73242006536
+73245000000 73245006507
+73248000000 73248006537
+73251000000 73251006545
+73254000000 73254006562
+73257000000 73257006552
+73260000000 73260006502
+73263000000 73263006556
+73266000000 73266006550
+73269000000 73269006544
+73272000000 73272006544
+73275000000 73275006558
+73278000000 73278006549
+73281000000 73281006555
+73284000000 73284006544
+73287000000 73287006494
+73290000000 73290006553
+73293000000 73293006549
+73296000000 73296006536
+73299000000 73299006547
+73302000000 73302006465
+73305000000 73305006548
+73308000000 73308006540
+73311000000 73311006541
+73314000000 73314006552
+73317000000 73317006552
+73320000000 73320006506
+73323000000 73323006561
+73326000000 73326006526
+73329000000 73329006554
+73332000000 73332006553
+73335000000 73335006547
+73338000000 73338006502
+73341000000 73341006571
+73344000000 73344006550
+73347000000 73347006558
+73350000000 73350006544
+73353000000 73353006548
+73356000000 73356006550
+73359000000 73359006540
+73362000000 73362006536
+73365000000 73365006544
+73368000000 73368006540
+73371000000 73371006546
+73374000000 73374006537
+73377000000 73377006553
+73380000000 73380006523
+73383000000 73383006544
+73386000000 73386006539
+73389000000 73389006548
+73392000000 73392006537
+73395000000 73395006561
+73398000000 73398006542
+73401000000 73401006527
+73404000000 73404006541
+73407000000 73407006544
+73410000000 73410006547
+73413000000 73413006548
+73416000000 73416006558
+73419000000 73419006547
+73422000000 73422006551
+73425000000 73425006542
+73428000000 73428006540
+73431000000 73431006542
+73434000000 73434006541
+73437000000 73437006507
+73440000000 73440006537
+73443000000 73443006531
+73446000000 73446006547
+73449000000 73449006523
+73452000000 73452006535
+73455000000 73455006548
+73458000000 73458006550
+73461000000 73461006539
+73464000000 73464006481
+73467000000 73467006479
+73470000000 73470006551
+73473000000 73473006466
+73476000000 73476006540
+73479000000 73479006552
+73482000000 73482006544
+73485000000 73485006544
+73488000000 73488006503
+73491000000 73491006528
+73494000000 73494006451
+73497000000 73497006532
+73500000000 73500006544
+73503000000 73503006547
+73506000000 73506006514
+73509000000 73509006525
+73512000000 73512006543
+73515000000 73515006539
+73518000000 73518006547
+73521000000 73521006546
+73524000000 73524006540
+73527000000 73527006565
+73530000000 73530006544
+73533000000 73533006548
+73536000000 73536006533
+73539000000 73539006531
+73542000000 73542006502
+73545000000 73545006532
+73548000000 73548006540
+73551000000 73551006557
+73554000000 73554006547
+73557000000 73557006497
+73560000000 73560006551
+73563000000 73563006545
+73566000000 73566006539
+73569000000 73569006539
+73572000000 73572006553
+73575000000 73575006544
+73578000000 73578006550
+73581000000 73581006539
+73584000000 73584006489
+73587000000 73587006548
+73590000000 73590006544
+73593000000 73593006531
+73596000000 73596006542
+73599000000 73599006460
+73602000000 73602006543
+73605000000 73605006535
+73608000000 73608006536
+73611000000 73611006547
+73614000000 73614006547
+73617000000 73617006501
+73620000000 73620006556
+73623000000 73623006521
+73626000000 73626006549
+73629000000 73629006548
+73632000000 73632006542
+73635000000 73635006497
+73638000000 73638006566
+73641000000 73641006545
+73644000000 73644006553
+73647000000 73647006539
+73650000000 73650006543
+73653000000 73653006545
+73656000000 73656006535
+73659000000 73659006531
+73662000000 73662006539
+73665000000 73665006535
+73668000000 73668006541
+73671000000 73671006532
+73674000000 73674006548
+73677000000 73677006518
+73680000000 73680006539
+73683000000 73683006534
+73686000000 73686006543
+73689000000 73689006532
+73692000000 73692006556
+73695000000 73695006537
+73698000000 73698006522
+73701000000 73701006536
+73704000000 73704006539
+73707000000 73707006542
+73710000000 73710006543
+73713000000 73713006553
+73716000000 73716006542
+73719000000 73719006546
+73722000000 73722006537
+73725000000 73725006535
+73728000000 73728006537
+73731000000 73731006536
+73734000000 73734006502
+73737000000 73737006532
+73740000000 73740006526
+73743000000 73743006542
+73746000000 73746006518
+73749000000 73749006530
+73752000000 73752006543
+73755000000 73755006545
+73758000000 73758006534
+73761000000 73761006476
+73764000000 73764006474
+73767000000 73767006546
+73770000000 73770006461
+73773000000 73773006535
+73776000000 73776006547
+73779000000 73779006539
+73782000000 73782006539
+73785000000 73785006498
+73788000000 73788006523
+73791000000 73791006446
+73794000000 73794006527
+73797000000 73797006539
+73800000000 73800006542
+73803000000 73803006509
+73806000000 73806006520
+73809000000 73809006538
+73812000000 73812006534
+73815000000 73815006542
+73818000000 73818006541
+73821000000 73821006535
+73824000000 73824006560
+73827000000 73827006539
+73830000000 73830006543
+73833000000 73833006528
+73836000000 73836006526
+73839000000 73839006497
+73842000000 73842006527
+73845000000 73845006535
+73848000000 73848006552
+73851000000 73851006542
+73854000000 73854006492
+73857000000 73857006546
+73860000000 73860006540
+73863000000 73863006534
+73866000000 73866006534
+73869000000 73869006548
+73872000000 73872006539
+73875000000 73875006545
+73878000000 73878006534
+73881000000 73881006484
+73884000000 73884006543
+73887000000 73887006539
+73890000000 73890006526
+73893000000 73893006537
+73896000000 73896006455
+73899000000 73899006538
+73902000000 73902006530
+73905000000 73905006531
+73908000000 73908006542
+73911000000 73911006542
+73914000000 73914006496
+73917000000 73917006551
+73920000000 73920006516
+73923000000 73923006544
+73926000000 73926006543
+73929000000 73929006537
+73932000000 73932006492
+73935000000 73935006561
+73938000000 73938006540
+73941000000 73941006548
+73944000000 73944006534
+73947000000 73947006538
+73950000000 73950006540
+73953000000 73953006530
+73956000000 73956006526
+73959000000 73959006534
+73962000000 73962006530
+73965000000 73965006536
+73968000000 73968006527
+73971000000 73971006543
+73974000000 73974006513
+73977000000 73977006534
+73980000000 73980006529
+73983000000 73983006538
+73986000000 73986006527
+73989000000 73989006551
+73992000000 73992006532
+73995000000 73995006517
+73998000000 73998006531
+74001000000 74001006534
+74004000000 74004006537
+74007000000 74007006538
+74010000000 74010006548
+74013000000 74013006537
+74016000000 74016006541
+74019000000 74019006532
+74022000000 74022006530
+74025000000 74025006532
+74028000000 74028006531
+74031000000 74031006497
+74034000000 74034006527
+74037000000 74037006521
+74040000000 74040006537
+74043000000 74043006513
+74046000000 74046006525
+74049000000 74049006538
+74052000000 74052006540
+74055000000 74055006529
+74058000000 74058006471
+74061000000 74061006469
+74064000000 74064006541
+74067000000 74067006456
+74070000000 74070006530
+74073000000 74073006542
+74076000000 74076006534
+74079000000 74079006534
+74082000000 74082006493
+74085000000 74085006518
+74088000000 74088006441
+74091000000 74091006522
+74094000000 74094006534
+74097000000 74097006537
+74100000000 74100006504
+74103000000 74103006515
+74106000000 74106006533
+74109000000 74109006529
+74112000000 74112006537
+74115000000 74115006536
+74118000000 74118006530
+74121000000 74121006555
+74124000000 74124006534
+74127000000 74127006538
+74130000000 74130006523
+74133000000 74133006521
+74136000000 74136006492
+74139000000 74139006522
+74142000000 74142006530
+74145000000 74145006547
+74148000000 74148006537
+74151000000 74151006487
+74154000000 74154006541
+74157000000 74157006535
+74160000000 74160006529
+74163000000 74163006529
+74166000000 74166006543
+74169000000 74169006534
+74172000000 74172006540
+74175000000 74175006529
+74178000000 74178006479
+74181000000 74181006538
+74184000000 74184006534
+74187000000 74187006521
+74190000000 74190006532
+74193000000 74193006450
+74196000000 74196006533
+74199000000 74199006525
+74202000000 74202006526
+74205000000 74205006537
+74208000000 74208006537
+74211000000 74211006491
+74214000000 74214006546
+74217000000 74217006511
+74220000000 74220006539
+74223000000 74223006538
+74226000000 74226006532
+74229000000 74229006487
+74232000000 74232006556
+74235000000 74235006535
+74238000000 74238006543
+74241000000 74241006529
+74244000000 74244006533
+74247000000 74247006535
+74250000000 74250006525
+74253000000 74253006521
+74256000000 74256006529
+74259000000 74259006525
+74262000000 74262006531
+74265000000 74265006522
+74268000000 74268006538
+74271000000 74271006508
+74274000000 74274006529
+74277000000 74277006524
+74280000000 74280006533
+74283000000 74283006522
+74286000000 74286006546
+74289000000 74289006527
+74292000000 74292006512
+74295000000 74295006526
+74298000000 74298006529
+74301000000 74301006532
+74304000000 74304006533
+74307000000 74307006543
+74310000000 74310006532
+74313000000 74313006536
+74316000000 74316006527
+74319000000 74319006525
+74322000000 74322006527
+74325000000 74325006526
+74328000000 74328006492
+74331000000 74331006522
+74334000000 74334006516
+74337000000 74337006532
+74340000000 74340006508
+74343000000 74343006520
+74346000000 74346006533
+74349000000 74349006535
+74352000000 74352006524
+74355000000 74355006466
+74358000000 74358006464
+74361000000 74361006536
+74364000000 74364006451
+74367000000 74367006525
+74370000000 74370006537
+74373000000 74373006529
+74376000000 74376006529
+74379000000 74379006488
+74382000000 74382006513
+74385000000 74385006436
+74388000000 74388006517
+74391000000 74391006529
+74394000000 74394006532
+74397000000 74397006499
+74400000000 74400006510
+74403000000 74403006528
+74406000000 74406006524
+74409000000 74409006532
+74412000000 74412006531
+74415000000 74415006525
+74418000000 74418006550
+74421000000 74421006529
+74424000000 74424006533
+74427000000 74427006518
+74430000000 74430006516
+74433000000 74433006487
+74436000000 74436006517
+74439000000 74439006525
+74442000000 74442006542
+74445000000 74445006532
+74448000000 74448006482
+74451000000 74451006536
+74454000000 74454006530
+74457000000 74457006524
+74460000000 74460006524
+74463000000 74463006538
+74466000000 74466006529
+74469000000 74469006535
+74472000000 74472006524
+74475000000 74475006474
+74478000000 74478006533
+74481000000 74481006529
+74484000000 74484006516
+74487000000 74487006527
+74490000000 74490006445
+74493000000 74493006528
+74496000000 74496006520
+74499000000 74499006521
+74502000000 74502006532
+74505000000 74505006532
+74508000000 74508006486
+74511000000 74511006541
+74514000000 74514006506
+74517000000 74517006534
+74520000000 74520006533
+74523000000 74523006527
+74526000000 74526006482
+74529000000 74529006551
+74532000000 74532006530
+74535000000 74535006538
+74538000000 74538006524
+74541000000 74541006528
+74544000000 74544006530
+74547000000 74547006520
+74550000000 74550006516
+74553000000 74553006524
+74556000000 74556006520
+74559000000 74559006526
+74562000000 74562006517
+74565000000 74565006533
+74568000000 74568006503
+74571000000 74571006524
+74574000000 74574006519
+74577000000 74577006528
+74580000000 74580006517
+74583000000 74583006541
+74586000000 74586006522
+74589000000 74589006507
+74592000000 74592006521
+74595000000 74595006524
+74598000000 74598006527
+74601000000 74601006528
+74604000000 74604006538
+74607000000 74607006527
+74610000000 74610006531
+74613000000 74613006522
+74616000000 74616006520
+74619000000 74619006522
+74622000000 74622006521
+74625000000 74625006487
+74628000000 74628006517
+74631000000 74631006511
+74634000000 74634006527
+74637000000 74637006503
+74640000000 74640006515
+74643000000 74643006528
+74646000000 74646006530
+74649000000 74649006519
+74652000000 74652006461
+74655000000 74655006459
+74658000000 74658006531
+74661000000 74661006446
+74664000000 74664006520
+74667000000 74667006532
+74670000000 74670006524
+74673000000 74673006524
+74676000000 74676006483
+74679000000 74679006508
+74682000000 74682006431
+74685000000 74685006512
+74688000000 74688006524
+74691000000 74691006527
+74694000000 74694006494
+74697000000 74697006505
+74700000000 74700006523
+74703000000 74703006519
+74706000000 74706006527
+74709000000 74709006526
+74712000000 74712006520
+74715000000 74715006545
+74718000000 74718006524
+74721000000 74721006528
+74724000000 74724006513
+74727000000 74727006511
+74730000000 74730006482
+74733000000 74733006512
+74736000000 74736006520
+74739000000 74739006537
+74742000000 74742006527
+74745000000 74745006477
+74748000000 74748006531
+74751000000 74751006525
+74754000000 74754006519
+74757000000 74757006519
+74760000000 74760006533
+74763000000 74763006524
+74766000000 74766006530
+74769000000 74769006519
+74772000000 74772006469
+74775000000 74775006528
+74778000000 74778006524
+74781000000 74781006511
+74784000000 74784006522
+74787000000 74787006440
+74790000000 74790006523
+74793000000 74793006515
+74796000000 74796006516
+74799000000 74799006527
+74802000000 74802006527
+74805000000 74805006481
+74808000000 74808006536
+74811000000 74811006501
+74814000000 74814006529
+74817000000 74817006528
+74820000000 74820006522
+74823000000 74823006477
+74826000000 74826006546
+74829000000 74829006525
+74832000000 74832006533
+74835000000 74835006519
+74838000000 74838006523
+74841000000 74841006525
+74844000000 74844006515
+74847000000 74847006511
+74850000000 74850006519
+74853000000 74853006515
+74856000000 74856006521
+74859000000 74859006512
+74862000000 74862006528
+74865000000 74865006498
+74868000000 74868006519
+74871000000 74871006514
+74874000000 74874006523
+74877000000 74877006512
+74880000000 74880006536
+74883000000 74883006517
+74886000000 74886006502
+74889000000 74889006516
+74892000000 74892006519
+74895000000 74895006522
+74898000000 74898006523
+74901000000 74901006533
+74904000000 74904006522
+74907000000 74907006526
+74910000000 74910006517
+74913000000 74913006515
+74916000000 74916006517
+74919000000 74919006516
+74922000000 74922006482
+74925000000 74925006512
+74928000000 74928006506
+74931000000 74931006522
+74934000000 74934006498
+74937000000 74937006510
+74940000000 74940006523
+74943000000 74943006525
+74946000000 74946006514
+74949000000 74949006456
+74952000000 74952006454
+74955000000 74955006526
+74958000000 74958006441
+74961000000 74961006515
+74964000000 74964006527
+74967000000 74967006519
+74970000000 74970006519
+74973000000 74973006478
+74976000000 74976006503
+74979000000 74979006426
+74982000000 74982006507
+74985000000 74985006519
+74988000000 74988006522
+74991000000 74991006489
+74994000000 74994006500
+74997000000 74997006518
+75000000000 75000006514
+75003000000 75003006522
+75006000000 75006006521
+75009000000 75009006515
+75012000000 75012006540
+75015000000 75015006519
+75018000000 75018006523
+75021000000 75021006508
+75024000000 75024006506
+75027000000 75027006477
+75030000000 75030006507
+75033000000 75033006515
+75036000000 75036006532
+75039000000 75039006522
+75042000000 75042006472
+75045000000 75045006526
+75048000000 75048006520
+75051000000 75051006514
+75054000000 75054006514
+75057000000 75057006528
+75060000000 75060006519
+75063000000 75063006525
+75066000000 75066006514
+75069000000 75069006464
+75072000000 75072006523
+75075000000 75075006519
+75078000000 75078006506
+75081000000 75081006517
+75084000000 75084006435
+75087000000 75087006518
+75090000000 75090006510
+75093000000 75093006511
+75096000000 75096006522
+75099000000 75099006522
+75102000000 75102006476
+75105000000 75105006531
+75108000000 75108006496
+75111000000 75111006524
+75114000000 75114006523
+75117000000 75117006517
+75120000000 75120006472
+75123000000 75123006541
+75126000000 75126006520
+75129000000 75129006528
+75132000000 75132006514
+75135000000 75135006518
+75138000000 75138006520
+75141000000 75141006510
+75144000000 75144006506
+75147000000 75147006514
+75150000000 75150006510
+75153000000 75153006516
+75156000000 75156006507
+75159000000 75159006523
+75162000000 75162006493
+75165000000 75165006514
+75168000000 75168006509
+75171000000 75171006518
+75174000000 75174006507
+75177000000 75177006531
+75180000000 75180006512
+75183000000 75183006497
+75186000000 75186006511
+75189000000 75189006514
+75192000000 75192006517
+75195000000 75195006518
+75198000000 75198006528
+75201000000 75201006517
+75204000000 75204006521
+75207000000 75207006512
+75210000000 75210006510
+75213000000 75213006512
+75216000000 75216006511
+75219000000 75219006477
+75222000000 75222006507
+75225000000 75225006501
+75228000000 75228006517
+75231000000 75231006493
+75234000000 75234006505
+75237000000 75237006518
+75240000000 75240006520
+75243000000 75243006509
+75246000000 75246006451
+75249000000 75249006449
+75252000000 75252006521
+75255000000 75255006436
+75258000000 75258006510
+75261000000 75261006522
+75264000000 75264006514
+75267000000 75267006514
+75270000000 75270006473
+75273000000 75273006498
+75276000000 75276006421
+75279000000 75279006502
+75282000000 75282006514
+75285000000 75285006517
+75288000000 75288006484
+75291000000 75291006495
+75294000000 75294006513
+75297000000 75297006509
+75300000000 75300006517
+75303000000 75303006516
+75306000000 75306006510
+75309000000 75309006535
+75312000000 75312006514
+75315000000 75315006518
+75318000000 75318006503
+75321000000 75321006501
+75324000000 75324006472
+75327000000 75327006502
+75330000000 75330006510
+75333000000 75333006527
+75336000000 75336006517
+75339000000 75339006467
+75342000000 75342006521
+75345000000 75345006515
+75348000000 75348006509
+75351000000 75351006509
+75354000000 75354006523
+75357000000 75357006514
+75360000000 75360006520
+75363000000 75363006509
+75366000000 75366006459
+75369000000 75369006518
+75372000000 75372006514
+75375000000 75375006501
+75378000000 75378006512
+75381000000 75381006430
+75384000000 75384006513
+75387000000 75387006505
+75390000000 75390006506
+75393000000 75393006517
+75396000000 75396006517
+75399000000 75399006471
+75402000000 75402006526
+75405000000 75405006491
+75408000000 75408006519
+75411000000 75411006518
+75414000000 75414006512
+75417000000 75417006467
+75420000000 75420006536
+75423000000 75423006515
+75426000000 75426006523
+75429000000 75429006509
+75432000000 75432006513
+75435000000 75435006515
+75438000000 75438006505
+75441000000 75441006501
+75444000000 75444006509
+75447000000 75447006505
+75450000000 75450006511
+75453000000 75453006502
+75456000000 75456006518
+75459000000 75459006488
+75462000000 75462006509
+75465000000 75465006504
+75468000000 75468006513
+75471000000 75471006502
+75474000000 75474006526
+75477000000 75477006507
+75480000000 75480006492
+75483000000 75483006506
+75486000000 75486006509
+75489000000 75489006512
+75492000000 75492006513
+75495000000 75495006523
+75498000000 75498006512
+75501000000 75501006516
+75504000000 75504006507
+75507000000 75507006505
+75510000000 75510006507
+75513000000 75513006506
+75516000000 75516006472
+75519000000 75519006502
+75522000000 75522006496
+75525000000 75525006512
+75528000000 75528006488
+75531000000 75531006500
+75534000000 75534006513
+75537000000 75537006515
+75540000000 75540006504
+75543000000 75543006446
+75546000000 75546006444
+75549000000 75549006516
+75552000000 75552006431
+75555000000 75555006505
+75558000000 75558006517
+75561000000 75561006509
+75564000000 75564006509
+75567000000 75567006468
+75570000000 75570006493
+75573000000 75573006416
+75576000000 75576006497
+75579000000 75579006509
+75582000000 75582006512
+75585000000 75585006479
+75588000000 75588006490
+75591000000 75591006508
+75594000000 75594006504
+75597000000 75597006512
+75600000000 75600006511
+75603000000 75603006505
+75606000000 75606006530
+75609000000 75609006509
+75612000000 75612006513
+75615000000 75615006498
+75618000000 75618006496
+75621000000 75621006467
+75624000000 75624006497
+75627000000 75627006505
+75630000000 75630006522
+75633000000 75633006512
+75636000000 75636006462
+75639000000 75639006516
+75642000000 75642006510
+75645000000 75645006504
+75648000000 75648006504
+75651000000 75651006518
+75654000000 75654006509
+75657000000 75657006515
+75660000000 75660006504
+75663000000 75663006454
+75666000000 75666006513
+75669000000 75669006509
+75672000000 75672006496
+75675000000 75675006507
+75678000000 75678006425
+75681000000 75681006508
+75684000000 75684006500
+75687000000 75687006501
+75690000000 75690006512
+75693000000 75693006512
+75696000000 75696006466
+75699000000 75699006521
+75702000000 75702006486
+75705000000 75705006514
+75708000000 75708006513
+75711000000 75711006507
+75714000000 75714006462
+75717000000 75717006531
+75720000000 75720006510
+75723000000 75723006518
+75726000000 75726006504
+75729000000 75729006508
+75732000000 75732006510
+75735000000 75735006500
+75738000000 75738006496
+75741000000 75741006504
+75744000000 75744006500
+75747000000 75747006506
+75750000000 75750006497
+75753000000 75753006513
+75756000000 75756006483
+75759000000 75759006504
+75762000000 75762006499
+75765000000 75765006508
+75768000000 75768006497
+75771000000 75771006521
+75774000000 75774006502
+75777000000 75777006487
+75780000000 75780006501
+75783000000 75783006504
+75786000000 75786006507
+75789000000 75789006508
+75792000000 75792006518
+75795000000 75795006507
+75798000000 75798006511
+75801000000 75801006502
+75804000000 75804006500
+75807000000 75807006502
+75810000000 75810006501
+75813000000 75813006467
+75816000000 75816006497
+75819000000 75819006491
+75822000000 75822006507
+75825000000 75825006483
+75828000000 75828006495
+75831000000 75831006508
+75834000000 75834006510
+75837000000 75837006499
+75840000000 75840006441
+75843000000 75843006439
+75846000000 75846006511
+75849000000 75849006426
+75852000000 75852006500
+75855000000 75855006512
+75858000000 75858006504
+75861000000 75861006504
+75864000000 75864006463
+75867000000 75867006488
+75870000000 75870006411
+75873000000 75873006492
+75876000000 75876006504
+75879000000 75879006507
+75882000000 75882006474
+75885000000 75885006485
+75888000000 75888006503
+75891000000 75891006499
+75894000000 75894006507
+75897000000 75897006506
+75900000000 75900006500
+75903000000 75903006525
+75906000000 75906006504
+75909000000 75909006508
+75912000000 75912006493
+75915000000 75915006491
+75918000000 75918006462
+75921000000 75921006492
+75924000000 75924006500
+75927000000 75927006517
+75930000000 75930006507
+75933000000 75933006457
+75936000000 75936006511
+75939000000 75939006505
+75942000000 75942006499
+75945000000 75945006499
+75948000000 75948006513
+75951000000 75951006504
+75954000000 75954006510
+75957000000 75957006499
+75960000000 75960006449
+75963000000 75963006508
+75966000000 75966006504
+75969000000 75969006491
+75972000000 75972006502
+75975000000 75975006420
+75978000000 75978006503
+75981000000 75981006495
+75984000000 75984006496
+75987000000 75987006507
+75990000000 75990006507
+75993000000 75993006461
+75996000000 75996006516
+75999000000 75999006481
+76002000000 76002006509
+76005000000 76005006508
+76008000000 76008006502
+76011000000 76011006457
+76014000000 76014006526
+76017000000 76017006505
+76020000000 76020006513
+76023000000 76023006499
+76026000000 76026006503
+76029000000 76029006505
+76032000000 76032006495
+76035000000 76035006491
+76038000000 76038006499
+76041000000 76041006495
+76044000000 76044006501
+76047000000 76047006492
+76050000000 76050006508
+76053000000 76053006478
+76056000000 76056006499
+76059000000 76059006494
+76062000000 76062006503
+76065000000 76065006492
+76068000000 76068006516
+76071000000 76071006497
+76074000000 76074006482
+76077000000 76077006496
+76080000000 76080006499
+76083000000 76083006502
+76086000000 76086006503
+76089000000 76089006513
+76092000000 76092006502
+76095000000 76095006506
+76098000000 76098006497
+76101000000 76101006495
+76104000000 76104006497
+76107000000 76107006496
+76110000000 76110006462
+76113000000 76113006492
+76116000000 76116006486
+76119000000 76119006502
+76122000000 76122006478
+76125000000 76125006490
+76128000000 76128006503
+76131000000 76131006505
+76134000000 76134006494
+76137000000 76137006436
+76140000000 76140006434
+76143000000 76143006506
+76146000000 76146006421
+76149000000 76149006495
+76152000000 76152006507
+76155000000 76155006499
+76158000000 76158006499
+76161000000 76161006458
+76164000000 76164006483
+76167000000 76167006406
+76170000000 76170006487
+76173000000 76173006499
+76176000000 76176006502
+76179000000 76179006469
+76182000000 76182006480
+76185000000 76185006498
+76188000000 76188006494
+76191000000 76191006502
+76194000000 76194006501
+76197000000 76197006495
+76200000000 76200006520
+76203000000 76203006499
+76206000000 76206006503
+76209000000 76209006488
+76212000000 76212006486
+76215000000 76215006457
+76218000000 76218006487
+76221000000 76221006495
+76224000000 76224006512
+76227000000 76227006502
+76230000000 76230006452
+76233000000 76233006506
+76236000000 76236006500
+76239000000 76239006494
+76242000000 76242006494
+76245000000 76245006508
+76248000000 76248006499
+76251000000 76251006505
+76254000000 76254006494
+76257000000 76257006444
+76260000000 76260006503
+76263000000 76263006499
+76266000000 76266006486
+76269000000 76269006497
+76272000000 76272006415
+76275000000 76275006498
+76278000000 76278006490
+76281000000 76281006491
+76284000000 76284006502
+76287000000 76287006502
+76290000000 76290006456
+76293000000 76293006511
+76296000000 76296006476
+76299000000 76299006504
+76302000000 76302006503
+76305000000 76305006497
+76308000000 76308006452
+76311000000 76311006521
+76314000000 76314006500
+76317000000 76317006508
+76320000000 76320006494
+76323000000 76323006498
+76326000000 76326006500
+76329000000 76329006490
+76332000000 76332006486
+76335000000 76335006494
+76338000000 76338006490
+76341000000 76341006496
+76344000000 76344006487
+76347000000 76347006503
+76350000000 76350006473
+76353000000 76353006494
+76356000000 76356006489
+76359000000 76359006498
+76362000000 76362006487
+76365000000 76365006511
+76368000000 76368006492
+76371000000 76371006477
+76374000000 76374006491
+76377000000 76377006494
+76380000000 76380006497
+76383000000 76383006498
+76386000000 76386006508
+76389000000 76389006497
+76392000000 76392006501
+76395000000 76395006492
+76398000000 76398006490
+76401000000 76401006492
+76404000000 76404006491
+76407000000 76407006457
+76410000000 76410006487
+76413000000 76413006481
+76416000000 76416006497
+76419000000 76419006473
+76422000000 76422006485
+76425000000 76425006498
+76428000000 76428006500
+76431000000 76431006489
+76434000000 76434006431
+76437000000 76437006429
+76440000000 76440006501
+76443000000 76443006416
+76446000000 76446006490
+76449000000 76449006502
+76452000000 76452006494
+76455000000 76455006494
+76458000000 76458006453
+76461000000 76461006478
+76464000000 76464006401
+76467000000 76467006482
+76470000000 76470006494
+76473000000 76473006497
+76476000000 76476006464
+76479000000 76479006475
+76482000000 76482006493
+76485000000 76485006489
+76488000000 76488006497
+76491000000 76491006496
+76494000000 76494006490
+76497000000 76497006515
+76500000000 76500006494
+76503000000 76503006498
+76506000000 76506006483
+76509000000 76509006481
+76512000000 76512006452
+76515000000 76515006482
+76518000000 76518006490
+76521000000 76521006507
+76524000000 76524006497
+76527000000 76527006447
+76530000000 76530006501
+76533000000 76533006495
+76536000000 76536006489
+76539000000 76539006489
+76542000000 76542006503
+76545000000 76545006494
+76548000000 76548006500
+76551000000 76551006489
+76554000000 76554006439
+76557000000 76557006498
+76560000000 76560006494
+76563000000 76563006481
+76566000000 76566006492
+76569000000 76569006410
+76572000000 76572006493
+76575000000 76575006485
+76578000000 76578006486
+76581000000 76581006497
+76584000000 76584006497
+76587000000 76587006451
+76590000000 76590006506
+76593000000 76593006471
+76596000000 76596006499
+76599000000 76599006498
+76602000000 76602006492
+76605000000 76605006447
+76608000000 76608006516
+76611000000 76611006495
+76614000000 76614006503
+76617000000 76617006489
+76620000000 76620006493
+76623000000 76623006495
+76626000000 76626006485
+76629000000 76629006481
+76632000000 76632006489
+76635000000 76635006485
+76638000000 76638006491
+76641000000 76641006482
+76644000000 76644006498
+76647000000 76647006468
+76650000000 76650006489
+76653000000 76653006484
+76656000000 76656006493
+76659000000 76659006482
+76662000000 76662006506
+76665000000 76665006487
+76668000000 76668006472
+76671000000 76671006486
+76674000000 76674006489
+76677000000 76677006492
+76680000000 76680006493
+76683000000 76683006503
+76686000000 76686006492
+76689000000 76689006496
+76692000000 76692006487
+76695000000 76695006485
+76698000000 76698006487
+76701000000 76701006486
+76704000000 76704006452
+76707000000 76707006482
+76710000000 76710006476
+76713000000 76713006492
+76716000000 76716006468
+76719000000 76719006480
+76722000000 76722006493
+76725000000 76725006495
+76728000000 76728006484
+76731000000 76731006426
+76734000000 76734006424
+76737000000 76737006496
+76740000000 76740006411
+76743000000 76743006485
+76746000000 76746006497
+76749000000 76749006489
+76752000000 76752006489
+76755000000 76755006448
+76758000000 76758006473
+76761000000 76761006396
+76764000000 76764006477
+76767000000 76767006489
+76770000000 76770006492
+76773000000 76773006459
+76776000000 76776006470
+76779000000 76779006488
+76782000000 76782006484
+76785000000 76785006492
+76788000000 76788006491
+76791000000 76791006485
+76794000000 76794006510
+76797000000 76797006489
+76800000000 76800006493
+76803000000 76803006478
+76806000000 76806006476
+76809000000 76809006447
+76812000000 76812006477
+76815000000 76815006485
+76818000000 76818006502
+76821000000 76821006492
+76824000000 76824006442
+76827000000 76827006496
+76830000000 76830006490
+76833000000 76833006484
+76836000000 76836006484
+76839000000 76839006498
+76842000000 76842006489
+76845000000 76845006495
+76848000000 76848006484
+76851000000 76851006434
+76854000000 76854006493
+76857000000 76857006489
+76860000000 76860006476
+76863000000 76863006487
+76866000000 76866006405
+76869000000 76869006488
+76872000000 76872006480
+76875000000 76875006481
+76878000000 76878006492
+76881000000 76881006492
+76884000000 76884006446
+76887000000 76887006501
+76890000000 76890006466
+76893000000 76893006494
+76896000000 76896006493
+76899000000 76899006487
+76902000000 76902006442
+76905000000 76905006511
+76908000000 76908006490
+76911000000 76911006498
+76914000000 76914006484
+76917000000 76917006488
+76920000000 76920006490
+76923000000 76923006480
+76926000000 76926006476
+76929000000 76929006484
+76932000000 76932006480
+76935000000 76935006486
+76938000000 76938006477
+76941000000 76941006493
+76944000000 76944006463
+76947000000 76947006484
+76950000000 76950006479
+76953000000 76953006488
+76956000000 76956006477
+76959000000 76959006501
+76962000000 76962006482
+76965000000 76965006467
+76968000000 76968006481
+76971000000 76971006484
+76974000000 76974006487
+76977000000 76977006488
+76980000000 76980006498
+76983000000 76983006487
+76986000000 76986006491
+76989000000 76989006482
+76992000000 76992006480
+76995000000 76995006482
+76998000000 76998006481
+77001000000 77001006447
+77004000000 77004006477
+77007000000 77007006471
+77010000000 77010006487
+77013000000 77013006463
+77016000000 77016006475
+77019000000 77019006488
+77022000000 77022006490
+77025000000 77025006479
+77028000000 77028006421
+77031000000 77031006419
+77034000000 77034006491
+77037000000 77037006406
+77040000000 77040006480
+77043000000 77043006492
+77046000000 77046006484
+77049000000 77049006484
+77052000000 77052006443
+77055000000 77055006468
+77058000000 77058006391
+77061000000 77061006472
+77064000000 77064006484
+77067000000 77067006487
+77070000000 77070006454
+77073000000 77073006465
+77076000000 77076006483
+77079000000 77079006479
+77082000000 77082006487
+77085000000 77085006486
+77088000000 77088006480
+77091000000 77091006505
+77094000000 77094006484
+77097000000 77097006488
+77100000000 77100006473
+77103000000 77103006471
+77106000000 77106006442
+77109000000 77109006472
+77112000000 77112006480
+77115000000 77115006497
+77118000000 77118006487
+77121000000 77121006437
+77124000000 77124006491
+77127000000 77127006485
+77130000000 77130006479
+77133000000 77133006479
+77136000000 77136006493
+77139000000 77139006484
+77142000000 77142006490
+77145000000 77145006479
+77148000000 77148006429
+77151000000 77151006488
+77154000000 77154006484
+77157000000 77157006471
+77160000000 77160006482
+77163000000 77163006400
+77166000000 77166006483
+77169000000 77169006475
+77172000000 77172006476
+77175000000 77175006487
+77178000000 77178006487
+77181000000 77181006441
+77184000000 77184006496
+77187000000 77187006461
+77190000000 77190006489
+77193000000 77193006488
+77196000000 77196006482
+77199000000 77199006437
+77202000000 77202006506
+77205000000 77205006485
+77208000000 77208006493
+77211000000 77211006479
+77214000000 77214006483
+77217000000 77217006485
+77220000000 77220006475
+77223000000 77223006471
+77226000000 77226006479
+77229000000 77229006475
+77232000000 77232006481
+77235000000 77235006472
+77238000000 77238006488
+77241000000 77241006458
+77244000000 77244006479
+77247000000 77247006474
+77250000000 77250006483
+77253000000 77253006472
+77256000000 77256006496
+77259000000 77259006477
+77262000000 77262006462
+77265000000 77265006476
+77268000000 77268006479
+77271000000 77271006482
+77274000000 77274006483
+77277000000 77277006493
+77280000000 77280006482
+77283000000 77283006486
+77286000000 77286006477
+77289000000 77289006475
+77292000000 77292006477
+77295000000 77295006476
+77298000000 77298006442
+77301000000 77301006472
+77304000000 77304006466
+77307000000 77307006482
+77310000000 77310006458
+77313000000 77313006470
+77316000000 77316006483
+77319000000 77319006485
+77322000000 77322006474
+77325000000 77325006416
+77328000000 77328006414
+77331000000 77331006486
+77334000000 77334006401
+77337000000 77337006475
+77340000000 77340006487
+77343000000 77343006479
+77346000000 77346006479
+77349000000 77349006438
+77352000000 77352006463
+77355000000 77355006386
+77358000000 77358006467
+77361000000 77361006479
+77364000000 77364006482
+77367000000 77367006449
+77370000000 77370006460
+77373000000 77373006478
+77376000000 77376006474
+77379000000 77379006482
+77382000000 77382006481
+77385000000 77385006475
+77388000000 77388006500
+77391000000 77391006479
+77394000000 77394006483
+77397000000 77397006468
+77400000000 77400006466
+77403000000 77403006437
+77406000000 77406006467
+77409000000 77409006475
+77412000000 77412006492
+77415000000 77415006482
+77418000000 77418006432
+77421000000 77421006486
+77424000000 77424006480
+77427000000 77427006474
+77430000000 77430006474
+77433000000 77433006488
+77436000000 77436006479
+77439000000 77439006485
+77442000000 77442006474
+77445000000 77445006424
+77448000000 77448006483
+77451000000 77451006479
+77454000000 77454006466
+77457000000 77457006477
+77460000000 77460006395
+77463000000 77463006478
+77466000000 77466006470
+77469000000 77469006471
+77472000000 77472006482
+77475000000 77475006482
+77478000000 77478006436
+77481000000 77481006491
+77484000000 77484006456
+77487000000 77487006484
+77490000000 77490006483
+77493000000 77493006477
+77496000000 77496006432
+77499000000 77499006501
+77502000000 77502006480
+77505000000 77505006488
+77508000000 77508006474
+77511000000 77511006478
+77514000000 77514006480
+77517000000 77517006470
+77520000000 77520006466
+77523000000 77523006474
+77526000000 77526006470
+77529000000 77529006476
+77532000000 77532006467
+77535000000 77535006483
+77538000000 77538006453
+77541000000 77541006474
+77544000000 77544006469
+77547000000 77547006478
+77550000000 77550006467
+77553000000 77553006491
+77556000000 77556006472
+77559000000 77559006457
+77562000000 77562006471
+77565000000 77565006474
+77568000000 77568006477
+77571000000 77571006478
+77574000000 77574006488
+77577000000 77577006477
+77580000000 77580006481
+77583000000 77583006472
+77586000000 77586006470
+77589000000 77589006472
+77592000000 77592006471
+77595000000 77595006437
+77598000000 77598006467
+77601000000 77601006461
+77604000000 77604006477
+77607000000 77607006453
+77610000000 77610006465
+77613000000 77613006478
+77616000000 77616006480
+77619000000 77619006469
+77622000000 77622006411
+77625000000 77625006409
+77628000000 77628006481
+77631000000 77631006396
+77634000000 77634006470
+77637000000 77637006482
+77640000000 77640006474
+77643000000 77643006474
+77646000000 77646006433
+77649000000 77649006458
+77652000000 77652006381
+77655000000 77655006462
+77658000000 77658006474
+77661000000 77661006477
+77664000000 77664006444
+77667000000 77667006455
+77670000000 77670006473
+77673000000 77673006469
+77676000000 77676006477
+77679000000 77679006476
+77682000000 77682006470
+77685000000 77685006495
+77688000000 77688006474
+77691000000 77691006478
+77694000000 77694006463
+77697000000 77697006461
+77700000000 77700006432
+77703000000 77703006462
+77706000000 77706006470
+77709000000 77709006487
+77712000000 77712006477
+77715000000 77715006427
+77718000000 77718006481
+77721000000 77721006475
+77724000000 77724006469
+77727000000 77727006469
+77730000000 77730006483
+77733000000 77733006474
+77736000000 77736006480
+77739000000 77739006469
+77742000000 77742006419
+77745000000 77745006478
+77748000000 77748006474
+77751000000 77751006461
+77754000000 77754006472
+77757000000 77757006390
+77760000000 77760006473
+77763000000 77763006465
+77766000000 77766006466
+77769000000 77769006477
+77772000000 77772006477
+77775000000 77775006431
+77778000000 77778006486
+77781000000 77781006451
+77784000000 77784006479
+77787000000 77787006478
+77790000000 77790006472
+77793000000 77793006427
+77796000000 77796006496
+77799000000 77799006475
+77802000000 77802006483
+77805000000 77805006469
+77808000000 77808006473
+77811000000 77811006475
+77814000000 77814006465
+77817000000 77817006461
+77820000000 77820006469
+77823000000 77823006465
+77826000000 77826006471
+77829000000 77829006462
+77832000000 77832006478
+77835000000 77835006448
+77838000000 77838006469
+77841000000 77841006464
+77844000000 77844006473
+77847000000 77847006462
+77850000000 77850006486
+77853000000 77853006467
+77856000000 77856006452
+77859000000 77859006466
+77862000000 77862006469
+77865000000 77865006472
+77868000000 77868006473
+77871000000 77871006483
+77874000000 77874006472
+77877000000 77877006476
+77880000000 77880006467
+77883000000 77883006465
+77886000000 77886006467
+77889000000 77889006466
+77892000000 77892006432
+77895000000 77895006462
+77898000000 77898006456
+77901000000 77901006472
+77904000000 77904006448
+77907000000 77907006460
+77910000000 77910006473
+77913000000 77913006475
+77916000000 77916006464
+77919000000 77919006406
+77922000000 77922006404
+77925000000 77925006476
+77928000000 77928006391
+77931000000 77931006465
+77934000000 77934006477
+77937000000 77937006469
+77940000000 77940006469
+77943000000 77943006428
+77946000000 77946006453
+77949000000 77949006376
+77952000000 77952006457
+77955000000 77955006469
+77958000000 77958006472
+77961000000 77961006439
+77964000000 77964006450
+77967000000 77967006468
+77970000000 77970006464
+77973000000 77973006472
+77976000000 77976006471
+77979000000 77979006465
+77982000000 77982006490
+77985000000 77985006469
+77988000000 77988006473
+77991000000 77991006458
+77994000000 77994006456
+77997000000 77997006427
+78000000000 78000006457
+78003000000 78003006465
+78006000000 78006006482
+78009000000 78009006472
+78012000000 78012006422
+78015000000 78015006476
+78018000000 78018006470
+78021000000 78021006464
+78024000000 78024006464
+78027000000 78027006478
+78030000000 78030006469
+78033000000 78033006475
+78036000000 78036006464
+78039000000 78039006414
+78042000000 78042006473
+78045000000 78045006469
+78048000000 78048006456
+78051000000 78051006467
+78054000000 78054006385
+78057000000 78057006468
+78060000000 78060006460
+78063000000 78063006461
+78066000000 78066006472
+78069000000 78069006472
+78072000000 78072006426
+78075000000 78075006481
+78078000000 78078006446
+78081000000 78081006474
+78084000000 78084006473
+78087000000 78087006467
+78090000000 78090006422
+78093000000 78093006491
+78096000000 78096006470
+78099000000 78099006478
+78102000000 78102006464
+78105000000 78105006468
+78108000000 78108006470
+78111000000 78111006460
+78114000000 78114006456
+78117000000 78117006464
+78120000000 78120006460
+78123000000 78123006466
+78126000000 78126006457
+78129000000 78129006473
+78132000000 78132006443
+78135000000 78135006464
+78138000000 78138006459
+78141000000 78141006468
+78144000000 78144006457
+78147000000 78147006481
+78150000000 78150006462
+78153000000 78153006447
+78156000000 78156006461
+78159000000 78159006464
+78162000000 78162006467
+78165000000 78165006468
+78168000000 78168006478
+78171000000 78171006467
+78174000000 78174006471
+78177000000 78177006462
+78180000000 78180006460
+78183000000 78183006462
+78186000000 78186006461
+78189000000 78189006427
+78192000000 78192006457
+78195000000 78195006451
+78198000000 78198006467
+78201000000 78201006443
+78204000000 78204006455
+78207000000 78207006468
+78210000000 78210006470
+78213000000 78213006459
+78216000000 78216006401
+78219000000 78219006399
+78222000000 78222006471
+78225000000 78225006386
+78228000000 78228006460
+78231000000 78231006472
+78234000000 78234006464
+78237000000 78237006464
+78240000000 78240006423
+78243000000 78243006448
+78246000000 78246006371
+78249000000 78249006452
+78252000000 78252006464
+78255000000 78255006467
+78258000000 78258006434
+78261000000 78261006445
+78264000000 78264006463
+78267000000 78267006459
+78270000000 78270006467
+78273000000 78273006466
+78276000000 78276006460
+78279000000 78279006485
+78282000000 78282006464
+78285000000 78285006468
+78288000000 78288006453
+78291000000 78291006451
+78294000000 78294006422
+78297000000 78297006452
+78300000000 78300006460
+78303000000 78303006477
+78306000000 78306006467
+78309000000 78309006417
+78312000000 78312006471
+78315000000 78315006465
+78318000000 78318006459
+78321000000 78321006459
+78324000000 78324006473
+78327000000 78327006464
+78330000000 78330006470
+78333000000 78333006459
+78336000000 78336006409
+78339000000 78339006468
+78342000000 78342006464
+78345000000 78345006451
+78348000000 78348006462
+78351000000 78351006380
+78354000000 78354006463
+78357000000 78357006455
+78360000000 78360006456
+78363000000 78363006467
+78366000000 78366006467
+78369000000 78369006421
+78372000000 78372006476
+78375000000 78375006441
+78378000000 78378006469
+78381000000 78381006468
+78384000000 78384006462
+78387000000 78387006417
+78390000000 78390006486
+78393000000 78393006465
+78396000000 78396006473
+78399000000 78399006459
+78402000000 78402006463
+78405000000 78405006465
+78408000000 78408006455
+78411000000 78411006451
+78414000000 78414006459
+78417000000 78417006455
+78420000000 78420006461
+78423000000 78423006452
+78426000000 78426006468
+78429000000 78429006438
+78432000000 78432006459
+78435000000 78435006454
+78438000000 78438006463
+78441000000 78441006452
+78444000000 78444006476
+78447000000 78447006457
+78450000000 78450006442
+78453000000 78453006456
+78456000000 78456006459
+78459000000 78459006462
+78462000000 78462006463
+78465000000 78465006473
+78468000000 78468006462
+78471000000 78471006466
+78474000000 78474006457
+78477000000 78477006455
+78480000000 78480006457
+78483000000 78483006456
+78486000000 78486006422
+78489000000 78489006452
+78492000000 78492006446
+78495000000 78495006462
+78498000000 78498006438
+78501000000 78501006450
+78504000000 78504006463
+78507000000 78507006465
+78510000000 78510006454
+78513000000 78513006396
+78516000000 78516006394
+78519000000 78519006466
+78522000000 78522006381
+78525000000 78525006455
+78528000000 78528006467
+78531000000 78531006459
+78534000000 78534006459
+78537000000 78537006418
+78540000000 78540006443
+78543000000 78543006366
+78546000000 78546006447
+78549000000 78549006459
+78552000000 78552006462
+78555000000 78555006429
+78558000000 78558006440
+78561000000 78561006458
+78564000000 78564006454
+78567000000 78567006462
+78570000000 78570006461
+78573000000 78573006455
+78576000000 78576006480
+78579000000 78579006459
+78582000000 78582006463
+78585000000 78585006448
+78588000000 78588006446
+78591000000 78591006417
+78594000000 78594006447
+78597000000 78597006455
+78600000000 78600006472
+78603000000 78603006462
+78606000000 78606006412
+78609000000 78609006466
+78612000000 78612006460
+78615000000 78615006454
+78618000000 78618006454
+78621000000 78621006468
+78624000000 78624006459
+78627000000 78627006465
+78630000000 78630006454
+78633000000 78633006404
+78636000000 78636006463
+78639000000 78639006459
+78642000000 78642006446
+78645000000 78645006457
+78648000000 78648006375
+78651000000 78651006458
+78654000000 78654006450
+78657000000 78657006451
+78660000000 78660006462
+78663000000 78663006462
+78666000000 78666006416
+78669000000 78669006471
+78672000000 78672006436
+78675000000 78675006464
+78678000000 78678006463
+78681000000 78681006457
+78684000000 78684006412
+78687000000 78687006481
+78690000000 78690006460
+78693000000 78693006468
+78696000000 78696006454
+78699000000 78699006458
+78702000000 78702006460
+78705000000 78705006450
+78708000000 78708006446
+78711000000 78711006454
+78714000000 78714006450
+78717000000 78717006456
+78720000000 78720006447
+78723000000 78723006463
+78726000000 78726006433
+78729000000 78729006454
+78732000000 78732006449
+78735000000 78735006458
+78738000000 78738006447
+78741000000 78741006471
+78744000000 78744006452
+78747000000 78747006437
+78750000000 78750006451
+78753000000 78753006454
+78756000000 78756006457
+78759000000 78759006458
+78762000000 78762006468
+78765000000 78765006457
+78768000000 78768006461
+78771000000 78771006452
+78774000000 78774006450
+78777000000 78777006452
+78780000000 78780006451
+78783000000 78783006417
+78786000000 78786006447
+78789000000 78789006441
+78792000000 78792006457
+78795000000 78795006433
+78798000000 78798006445
+78801000000 78801006458
+78804000000 78804006460
+78807000000 78807006449
+78810000000 78810006391
+78813000000 78813006389
+78816000000 78816006461
+78819000000 78819006376
+78822000000 78822006450
+78825000000 78825006462
+78828000000 78828006454
+78831000000 78831006454
+78834000000 78834006413
+78837000000 78837006438
+78840000000 78840006361
+78843000000 78843006442
+78846000000 78846006454
+78849000000 78849006457
+78852000000 78852006424
+78855000000 78855006435
+78858000000 78858006453
+78861000000 78861006449
+78864000000 78864006457
+78867000000 78867006456
+78870000000 78870006450
+78873000000 78873006475
+78876000000 78876006454
+78879000000 78879006458
+78882000000 78882006443
+78885000000 78885006441
+78888000000 78888006412
+78891000000 78891006442
+78894000000 78894006450
+78897000000 78897006467
+78900000000 78900006457
+78903000000 78903006407
+78906000000 78906006461
+78909000000 78909006455
+78912000000 78912006449
+78915000000 78915006449
+78918000000 78918006463
+78921000000 78921006454
+78924000000 78924006460
+78927000000 78927006449
+78930000000 78930006399
+78933000000 78933006458
+78936000000 78936006454
+78939000000 78939006441
+78942000000 78942006452
+78945000000 78945006370
+78948000000 78948006453
+78951000000 78951006445
+78954000000 78954006446
+78957000000 78957006457
+78960000000 78960006457
+78963000000 78963006411
+78966000000 78966006466
+78969000000 78969006431
+78972000000 78972006459
+78975000000 78975006458
+78978000000 78978006452
+78981000000 78981006407
+78984000000 78984006476
+78987000000 78987006455
+78990000000 78990006463
+78993000000 78993006449
+78996000000 78996006453
+78999000000 78999006455
+79002000000 79002006445
+79005000000 79005006441
+79008000000 79008006449
+79011000000 79011006445
+79014000000 79014006451
+79017000000 79017006442
+79020000000 79020006458
+79023000000 79023006428
+79026000000 79026006449
+79029000000 79029006444
+79032000000 79032006453
+79035000000 79035006442
+79038000000 79038006466
+79041000000 79041006447
+79044000000 79044006432
+79047000000 79047006446
+79050000000 79050006449
+79053000000 79053006452
+79056000000 79056006453
+79059000000 79059006463
+79062000000 79062006452
+79065000000 79065006456
+79068000000 79068006447
+79071000000 79071006445
+79074000000 79074006447
+79077000000 79077006446
+79080000000 79080006412
+79083000000 79083006442
+79086000000 79086006436
+79089000000 79089006452
+79092000000 79092006428
+79095000000 79095006440
+79098000000 79098006453
+79101000000 79101006455
+79104000000 79104006444
+79107000000 79107006386
+79110000000 79110006384
+79113000000 79113006456
+79116000000 79116006371
+79119000000 79119006445
+79122000000 79122006457
+79125000000 79125006449
+79128000000 79128006449
+79131000000 79131006408
+79134000000 79134006433
+79137000000 79137006356
+79140000000 79140006437
+79143000000 79143006449
+79146000000 79146006452
+79149000000 79149006419
+79152000000 79152006430
+79155000000 79155006448
+79158000000 79158006444
+79161000000 79161006452
+79164000000 79164006451
+79167000000 79167006445
+79170000000 79170006470
+79173000000 79173006449
+79176000000 79176006453
+79179000000 79179006438
+79182000000 79182006436
+79185000000 79185006407
+79188000000 79188006437
+79191000000 79191006445
+79194000000 79194006462
+79197000000 79197006452
+79200000000 79200006402
+79203000000 79203006456
+79206000000 79206006450
+79209000000 79209006444
+79212000000 79212006444
+79215000000 79215006458
+79218000000 79218006449
+79221000000 79221006455
+79224000000 79224006444
+79227000000 79227006394
+79230000000 79230006453
+79233000000 79233006449
+79236000000 79236006436
+79239000000 79239006447
+79242000000 79242006365
+79245000000 79245006448
+79248000000 79248006440
+79251000000 79251006441
+79254000000 79254006452
+79257000000 79257006452
+79260000000 79260006406
+79263000000 79263006461
+79266000000 79266006426
+79269000000 79269006454
+79272000000 79272006453
+79275000000 79275006447
+79278000000 79278006402
+79281000000 79281006471
+79284000000 79284006450
+79287000000 79287006458
+79290000000 79290006444
+79293000000 79293006448
+79296000000 79296006450
+79299000000 79299006440
+79302000000 79302006436
+79305000000 79305006444
+79308000000 79308006440
+79311000000 79311006446
+79314000000 79314006437
+79317000000 79317006453
+79320000000 79320006423
+79323000000 79323006444
+79326000000 79326006439
+79329000000 79329006448
+79332000000 79332006437
+79335000000 79335006461
+79338000000 79338006442
+79341000000 79341006427
+79344000000 79344006441
+79347000000 79347006444
+79350000000 79350006447
+79353000000 79353006448
+79356000000 79356006458
+79359000000 79359006447
+79362000000 79362006451
+79365000000 79365006442
+79368000000 79368006440
+79371000000 79371006442
+79374000000 79374006441
+79377000000 79377006407
+79380000000 79380006437
+79383000000 79383006431
+79386000000 79386006447
+79389000000 79389006423
+79392000000 79392006435
+79395000000 79395006448
+79398000000 79398006450
+79401000000 79401006439
+79404000000 79404006381
+79407000000 79407006379
+79410000000 79410006451
+79413000000 79413006366
+79416000000 79416006440
+79419000000 79419006452
+79422000000 79422006444
+79425000000 79425006444
+79428000000 79428006403
+79431000000 79431006428
+79434000000 79434006351
+79437000000 79437006432
+79440000000 79440006444
+79443000000 79443006447
+79446000000 79446006414
+79449000000 79449006425
+79452000000 79452006443
+79455000000 79455006439
+79458000000 79458006447
+79461000000 79461006446
+79464000000 79464006440
+79467000000 79467006465
+79470000000 79470006444
+79473000000 79473006448
+79476000000 79476006433
+79479000000 79479006431
+79482000000 79482006402
+79485000000 79485006432
+79488000000 79488006440
+79491000000 79491006457
+79494000000 79494006447
+79497000000 79497006397
+79500000000 79500006451
+79503000000 79503006445
+79506000000 79506006439
+79509000000 79509006439
+79512000000 79512006453
+79515000000 79515006444
+79518000000 79518006450
+79521000000 79521006439
+79524000000 79524006389
+79527000000 79527006448
+79530000000 79530006444
+79533000000 79533006431
+79536000000 79536006442
+79539000000 79539006360
+79542000000 79542006443
+79545000000 79545006435
+79548000000 79548006436
+79551000000 79551006447
+79554000000 79554006447
+79557000000 79557006401
+79560000000 79560006456
+79563000000 79563006421
+79566000000 79566006449
+79569000000 79569006448
+79572000000 79572006442
+79575000000 79575006397
+79578000000 79578006466
+79581000000 79581006445
+79584000000 79584006453
+79587000000 79587006439
+79590000000 79590006443
+79593000000 79593006445
+79596000000 79596006435
+79599000000 79599006431
+79602000000 79602006439
+79605000000 79605006435
+79608000000 79608006441
+79611000000 79611006432
+79614000000 79614006448
+79617000000 79617006418
+79620000000 79620006439
+79623000000 79623006434
+79626000000 79626006443
+79629000000 79629006432
+79632000000 79632006456
+79635000000 79635006437
+79638000000 79638006422
+79641000000 79641006436
+79644000000 79644006439
+79647000000 79647006442
+79650000000 79650006443
+79653000000 79653006453
+79656000000 79656006442
+79659000000 79659006446
+79662000000 79662006437
+79665000000 79665006435
+79668000000 79668006437
+79671000000 79671006436
+79674000000 79674006402
+79677000000 79677006432
+79680000000 79680006426
+79683000000 79683006442
+79686000000 79686006418
+79689000000 79689006430
+79692000000 79692006443
+79695000000 79695006445
+79698000000 79698006434
+79701000000 79701006376
+79704000000 79704006374
+79707000000 79707006446
+79710000000 79710006361
+79713000000 79713006435
+79716000000 79716006447
+79719000000 79719006439
+79722000000 79722006439
+79725000000 79725006398
+79728000000 79728006423
+79731000000 79731006346
+79734000000 79734006427
+79737000000 79737006439
+79740000000 79740006442
+79743000000 79743006409
+79746000000 79746006420
+79749000000 79749006438
+79752000000 79752006434
+79755000000 79755006442
+79758000000 79758006441
+79761000000 79761006435
+79764000000 79764006460
+79767000000 79767006439
+79770000000 79770006443
+79773000000 79773006428
+79776000000 79776006426
+79779000000 79779006397
+79782000000 79782006427
+79785000000 79785006435
+79788000000 79788006452
+79791000000 79791006442
+79794000000 79794006392
+79797000000 79797006446
+79800000000 79800006440
+79803000000 79803006434
+79806000000 79806006434
+79809000000 79809006448
+79812000000 79812006439
+79815000000 79815006445
+79818000000 79818006434
+79821000000 79821006384
+79824000000 79824006443
+79827000000 79827006439
+79830000000 79830006426
+79833000000 79833006437
+79836000000 79836006355
+79839000000 79839006438
+79842000000 79842006430
+79845000000 79845006431
+79848000000 79848006442
+79851000000 79851006442
+79854000000 79854006396
+79857000000 79857006451
+79860000000 79860006416
+79863000000 79863006444
+79866000000 79866006443
+79869000000 79869006437
+79872000000 79872006392
+79875000000 79875006461
+79878000000 79878006440
+79881000000 79881006448
+79884000000 79884006434
+79887000000 79887006438
+79890000000 79890006440
+79893000000 79893006430
+79896000000 79896006426
+79899000000 79899006434
+79902000000 79902006430
+79905000000 79905006436
+79908000000 79908006427
+79911000000 79911006443
+79914000000 79914006413
+79917000000 79917006434
+79920000000 79920006429
+79923000000 79923006438
+79926000000 79926006427
+79929000000 79929006451
+79932000000 79932006432
+79935000000 79935006417
+79938000000 79938006431
+79941000000 79941006434
+79944000000 79944006437
+79947000000 79947006438
+79950000000 79950006448
+79953000000 79953006437
+79956000000 79956006441
+79959000000 79959006432
+79962000000 79962006430
+79965000000 79965006432
+79968000000 79968006431
+79971000000 79971006397
+79974000000 79974006427
+79977000000 79977006421
+79980000000 79980006437
+79983000000 79983006413
+79986000000 79986006425
+79989000000 79989006438
+79992000000 79992006440
+79995000000 79995006429
+79998000000 79998006371
+80001000000 80001006369
+80004000000 80004006441
+80007000000 80007006356
+80010000000 80010006430
+80013000000 80013006442
+80016000000 80016006434
+80019000000 80019006434
+80022000000 80022006393
+80025000000 80025006418
+80028000000 80028006341
+80031000000 80031006422
+80034000000 80034006434
+80037000000 80037006437
+80040000000 80040006404
+80043000000 80043006415
+80046000000 80046006433
+80049000000 80049006429
+80052000000 80052006437
+80055000000 80055006436
+80058000000 80058006430
+80061000000 80061006455
+80064000000 80064006434
+80067000000 80067006438
+80070000000 80070006423
+80073000000 80073006421
+80076000000 80076006392
+80079000000 80079006422
+80082000000 80082006430
+80085000000 80085006447
+80088000000 80088006437
+80091000000 80091006387
+80094000000 80094006441
+80097000000 80097006435
+80100000000 80100006429
+80103000000 80103006429
+80106000000 80106006443
+80109000000 80109006434
+80112000000 80112006440
+80115000000 80115006429
+80118000000 80118006379
+80121000000 80121006438
+80124000000 80124006434
+80127000000 80127006421
+80130000000 80130006432
+80133000000 80133006350
+80136000000 80136006433
+80139000000 80139006425
+80142000000 80142006426
+80145000000 80145006437
+80148000000 80148006437
+80151000000 80151006391
+80154000000 80154006446
+80157000000 80157006411
+80160000000 80160006439
+80163000000 80163006438
+80166000000 80166006432
+80169000000 80169006387
+80172000000 80172006456
+80175000000 80175006435
+80178000000 80178006443
+80181000000 80181006429
+80184000000 80184006433
+80187000000 80187006435
+80190000000 80190006425
+80193000000 80193006421
+80196000000 80196006429
+80199000000 80199006425
+80202000000 80202006431
+80205000000 80205006422
+80208000000 80208006438
+80211000000 80211006408
+80214000000 80214006429
+80217000000 80217006424
+80220000000 80220006433
+80223000000 80223006422
+80226000000 80226006446
+80229000000 80229006427
+80232000000 80232006412
+80235000000 80235006426
+80238000000 80238006429
+80241000000 80241006432
+80244000000 80244006433
+80247000000 80247006443
+80250000000 80250006432
+80253000000 80253006436
+80256000000 80256006427
+80259000000 80259006425
+80262000000 80262006427
+80265000000 80265006426
+80268000000 80268006392
+80271000000 80271006422
+80274000000 80274006416
+80277000000 80277006432
+80280000000 80280006408
+80283000000 80283006420
+80286000000 80286006433
+80289000000 80289006435
+80292000000 80292006424
+80295000000 80295006366
+80298000000 80298006364
+80301000000 80301006436
+80304000000 80304006351
+80307000000 80307006425
+80310000000 80310006437
+80313000000 80313006429
+80316000000 80316006429
+80319000000 80319006388
+80322000000 80322006413
+80325000000 80325006336
+80328000000 80328006417
+80331000000 80331006429
+80334000000 80334006432
+80337000000 80337006399
+80340000000 80340006410
+80343000000 80343006428
+80346000000 80346006424
+80349000000 80349006432
+80352000000 80352006431
+80355000000 80355006425
+80358000000 80358006450
+80361000000 80361006429
+80364000000 80364006433
+80367000000 80367006418
+80370000000 80370006416
+80373000000 80373006387
+80376000000 80376006417
+80379000000 80379006425
+80382000000 80382006442
+80385000000 80385006432
+80388000000 80388006382
+80391000000 80391006436
+80394000000 80394006430
+80397000000 80397006424
+80400000000 80400006424
+80403000000 80403006438
+80406000000 80406006429
+80409000000 80409006435
+80412000000 80412006424
+80415000000 80415006374
+80418000000 80418006433
+80421000000 80421006429
+80424000000 80424006416
+80427000000 80427006427
+80430000000 80430006345
+80433000000 80433006428
+80436000000 80436006420
+80439000000 80439006421
+80442000000 80442006432
+80445000000 80445006432
+80448000000 80448006386
+80451000000 80451006441
+80454000000 80454006406
+80457000000 80457006434
+80460000000 80460006433
+80463000000 80463006427
+80466000000 80466006382
+80469000000 80469006451
+80472000000 80472006430
+80475000000 80475006438
+80478000000 80478006424
+80481000000 80481006428
+80484000000 80484006430
+80487000000 80487006420
+80490000000 80490006416
+80493000000 80493006424
+80496000000 80496006420
+80499000000 80499006426
+80502000000 80502006417
+80505000000 80505006433
+80508000000 80508006403
+80511000000 80511006424
+80514000000 80514006419
+80517000000 80517006428
+80520000000 80520006417
+80523000000 80523006441
+80526000000 80526006422
+80529000000 80529006407
+80532000000 80532006421
+80535000000 80535006424
+80538000000 80538006427
+80541000000 80541006428
+80544000000 80544006438
+80547000000 80547006427
+80550000000 80550006431
+80553000000 80553006422
+80556000000 80556006420
+80559000000 80559006422
+80562000000 80562006421
+80565000000 80565006387
+80568000000 80568006417
+80571000000 80571006411
+80574000000 80574006427
+80577000000 80577006403
+80580000000 80580006415
+80583000000 80583006428
+80586000000 80586006430
+80589000000 80589006419
+80592000000 80592006361
+80595000000 80595006359
+80598000000 80598006431
+80601000000 80601006346
+80604000000 80604006420
+80607000000 80607006432
+80610000000 80610006424
+80613000000 80613006424
+80616000000 80616006383
+80619000000 80619006408
+80622000000 80622006331
+80625000000 80625006412
+80628000000 80628006424
+80631000000 80631006427
+80634000000 80634006394
+80637000000 80637006405
+80640000000 80640006423
+80643000000 80643006419
+80646000000 80646006427
+80649000000 80649006426
+80652000000 80652006420
+80655000000 80655006445
+80658000000 80658006424
+80661000000 80661006428
+80664000000 80664006413
+80667000000 80667006411
+80670000000 80670006382
+80673000000 80673006412
+80676000000 80676006420
+80679000000 80679006437
+80682000000 80682006427
+80685000000 80685006377
+80688000000 80688006431
+80691000000 80691006425
+80694000000 80694006419
+80697000000 80697006419
+80700000000 80700006433
+80703000000 80703006424
+80706000000 80706006430
+80709000000 80709006419
+80712000000 80712006369
+80715000000 80715006428
+80718000000 80718006424
+80721000000 80721006411
+80724000000 80724006422
+80727000000 80727006340
+80730000000 80730006423
+80733000000 80733006415
+80736000000 80736006416
+80739000000 80739006427
+80742000000 80742006427
+80745000000 80745006381
+80748000000 80748006436
+80751000000 80751006401
+80754000000 80754006429
+80757000000 80757006428
+80760000000 80760006422
+80763000000 80763006377
+80766000000 80766006446
+80769000000 80769006425
+80772000000 80772006433
+80775000000 80775006419
+80778000000 80778006423
+80781000000 80781006425
+80784000000 80784006415
+80787000000 80787006411
+80790000000 80790006419
+80793000000 80793006415
+80796000000 80796006421
+80799000000 80799006412
+80802000000 80802006428
+80805000000 80805006398
+80808000000 80808006419
+80811000000 80811006414
+80814000000 80814006423
+80817000000 80817006412
+80820000000 80820006436
+80823000000 80823006417
+80826000000 80826006402
+80829000000 80829006416
+80832000000 80832006419
+80835000000 80835006422
+80838000000 80838006423
+80841000000 80841006433
+80844000000 80844006422
+80847000000 80847006426
+80850000000 80850006417
+80853000000 80853006415
+80856000000 80856006417
+80859000000 80859006416
+80862000000 80862006382
+80865000000 80865006412
+80868000000 80868006406
+80871000000 80871006422
+80874000000 80874006398
+80877000000 80877006410
+80880000000 80880006423
+80883000000 80883006425
+80886000000 80886006414
+80889000000 80889006356
+80892000000 80892006354
+80895000000 80895006426
+80898000000 80898006341
+80901000000 80901006415
+80904000000 80904006427
+80907000000 80907006419
+80910000000 80910006419
+80913000000 80913006378
+80916000000 80916006403
+80919000000 80919006326
+80922000000 80922006407
+80925000000 80925006419
+80928000000 80928006422
+80931000000 80931006389
+80934000000 80934006400
+80937000000 80937006418
+80940000000 80940006414
+80943000000 80943006422
+80946000000 80946006421
+80949000000 80949006415
+80952000000 80952006440
+80955000000 80955006419
+80958000000 80958006423
+80961000000 80961006408
+80964000000 80964006406
+80967000000 80967006377
+80970000000 80970006407
+80973000000 80973006415
+80976000000 80976006432
+80979000000 80979006422
+80982000000 80982006372
+80985000000 80985006426
+80988000000 80988006420
+80991000000 80991006414
+80994000000 80994006414
+80997000000 80997006428
+81000000000 81000006419
+81003000000 81003006425
+81006000000 81006006414
+81009000000 81009006364
+81012000000 81012006423
+81015000000 81015006419
+81018000000 81018006406
+81021000000 81021006417
+81024000000 81024006335
+81027000000 81027006418
+81030000000 81030006410
+81033000000 81033006411
+81036000000 81036006422
+81039000000 81039006422
+81042000000 81042006376
+81045000000 81045006431
+81048000000 81048006396
+81051000000 81051006424
+81054000000 81054006423
+81057000000 81057006417
+81060000000 81060006372
+81063000000 81063006441
+81066000000 81066006420
+81069000000 81069006428
+81072000000 81072006414
+81075000000 81075006418
+81078000000 81078006420
+81081000000 81081006410
+81084000000 81084006406
+81087000000 81087006414
+81090000000 81090006410
+81093000000 81093006416
+81096000000 81096006407
+81099000000 81099006423
+81102000000 81102006393
+81105000000 81105006414
+81108000000 81108006409
+81111000000 81111006418
+81114000000 81114006407
+81117000000 81117006431
+81120000000 81120006412
+81123000000 81123006397
+81126000000 81126006411
+81129000000 81129006414
+81132000000 81132006417
+81135000000 81135006418
+81138000000 81138006428
+81141000000 81141006417
+81144000000 81144006421
+81147000000 81147006412
+81150000000 81150006410
+81153000000 81153006412
+81156000000 81156006411
+81159000000 81159006377
+81162000000 81162006407
+81165000000 81165006401
+81168000000 81168006417
+81171000000 81171006393
+81174000000 81174006405
+81177000000 81177006418
+81180000000 81180006420
+81183000000 81183006409
+81186000000 81186006351
+81189000000 81189006349
+81192000000 81192006421
+81195000000 81195006336
+81198000000 81198006410
+81201000000 81201006422
+81204000000 81204006414
+81207000000 81207006414
+81210000000 81210006373
+81213000000 81213006398
+81216000000 81216006321
+81219000000 81219006402
+81222000000 81222006414
+81225000000 81225006417
+81228000000 81228006384
+81231000000 81231006395
+81234000000 81234006413
+81237000000 81237006409
+81240000000 81240006417
+81243000000 81243006416
+81246000000 81246006410
+81249000000 81249006435
+81252000000 81252006414
+81255000000 81255006418
+81258000000 81258006403
+81261000000 81261006401
+81264000000 81264006372
+81267000000 81267006402
+81270000000 81270006410
+81273000000 81273006427
+81276000000 81276006417
+81279000000 81279006367
+81282000000 81282006421
+81285000000 81285006415
+81288000000 81288006409
+81291000000 81291006409
+81294000000 81294006423
+81297000000 81297006414
+81300000000 81300006420
+81303000000 81303006409
+81306000000 81306006359
+81309000000 81309006418
+81312000000 81312006414
+81315000000 81315006401
+81318000000 81318006412
+81321000000 81321006330
+81324000000 81324006413
+81327000000 81327006405
+81330000000 81330006406
+81333000000 81333006417
+81336000000 81336006417
+81339000000 81339006371
+81342000000 81342006426
+81345000000 81345006391
+81348000000 81348006419
+81351000000 81351006418
+81354000000 81354006412
+81357000000 81357006367
+81360000000 81360006436
+81363000000 81363006415
+81366000000 81366006423
+81369000000 81369006409
+81372000000 81372006413
+81375000000 81375006415
+81378000000 81378006405
+81381000000 81381006401
+81384000000 81384006409
+81387000000 81387006405
+81390000000 81390006411
+81393000000 81393006402
+81396000000 81396006418
+81399000000 81399006388
+81402000000 81402006409
+81405000000 81405006404
+81408000000 81408006413
+81411000000 81411006402
+81414000000 81414006426
+81417000000 81417006407
+81420000000 81420006392
+81423000000 81423006406
+81426000000 81426006409
+81429000000 81429006412
+81432000000 81432006413
+81435000000 81435006423
+81438000000 81438006412
+81441000000 81441006416
+81444000000 81444006407
+81447000000 81447006405
+81450000000 81450006407
+81453000000 81453006406
+81456000000 81456006372
+81459000000 81459006402
+81462000000 81462006396
+81465000000 81465006412
+81468000000 81468006388
+81471000000 81471006400
+81474000000 81474006413
+81477000000 81477006415
+81480000000 81480006404
+81483000000 81483006346
+81486000000 81486006344
+81489000000 81489006416
+81492000000 81492006331
+81495000000 81495006405
+81498000000 81498006417
+81501000000 81501006409
+81504000000 81504006409
+81507000000 81507006368
+81510000000 81510006393
+81513000000 81513006316
+81516000000 81516006397
+81519000000 81519006409
+81522000000 81522006412
+81525000000 81525006379
+81528000000 81528006390
+81531000000 81531006408
+81534000000 81534006404
+81537000000 81537006412
+81540000000 81540006411
+81543000000 81543006405
+81546000000 81546006430
+81549000000 81549006409
+81552000000 81552006413
+81555000000 81555006398
+81558000000 81558006396
+81561000000 81561006367
+81564000000 81564006397
+81567000000 81567006405
+81570000000 81570006422
+81573000000 81573006412
+81576000000 81576006362
+81579000000 81579006416
+81582000000 81582006410
+81585000000 81585006404
+81588000000 81588006404
+81591000000 81591006418
+81594000000 81594006409
+81597000000 81597006415
+81600000000 81600006404
+81603000000 81603006354
+81606000000 81606006413
+81609000000 81609006409
+81612000000 81612006396
+81615000000 81615006407
+81618000000 81618006325
+81621000000 81621006408
+81624000000 81624006400
+81627000000 81627006401
+81630000000 81630006412
+81633000000 81633006412
+81636000000 81636006366
+81639000000 81639006421
+81642000000 81642006386
+81645000000 81645006414
+81648000000 81648006413
+81651000000 81651006407
+81654000000 81654006362
+81657000000 81657006431
+81660000000 81660006410
+81663000000 81663006418
+81666000000 81666006404
+81669000000 81669006408
+81672000000 81672006410
+81675000000 81675006400
+81678000000 81678006396
+81681000000 81681006404
+81684000000 81684006400
+81687000000 81687006406
+81690000000 81690006397
+81693000000 81693006413
+81696000000 81696006383
+81699000000 81699006404
+81702000000 81702006399
+81705000000 81705006408
+81708000000 81708006397
+81711000000 81711006421
+81714000000 81714006402
+81717000000 81717006387
+81720000000 81720006401
+81723000000 81723006404
+81726000000 81726006407
+81729000000 81729006408
+81732000000 81732006418
+81735000000 81735006407
+81738000000 81738006411
+81741000000 81741006402
+81744000000 81744006400
+81747000000 81747006402
+81750000000 81750006401
+81753000000 81753006367
+81756000000 81756006397
+81759000000 81759006391
+81762000000 81762006407
+81765000000 81765006383
+81768000000 81768006395
+81771000000 81771006408
+81774000000 81774006410
+81777000000 81777006399
+81780000000 81780006341
+81783000000 81783006339
+81786000000 81786006411
+81789000000 81789006326
+81792000000 81792006400
+81795000000 81795006412
+81798000000 81798006404
+81801000000 81801006404
+81804000000 81804006363
+81807000000 81807006388
+81810000000 81810006311
+81813000000 81813006392
+81816000000 81816006404
+81819000000 81819006407
+81822000000 81822006374
+81825000000 81825006385
+81828000000 81828006403
+81831000000 81831006399
+81834000000 81834006407
+81837000000 81837006406
+81840000000 81840006400
+81843000000 81843006425
+81846000000 81846006404
+81849000000 81849006408
+81852000000 81852006393
+81855000000 81855006391
+81858000000 81858006362
+81861000000 81861006392
+81864000000 81864006400
+81867000000 81867006417
+81870000000 81870006407
+81873000000 81873006357
+81876000000 81876006411
+81879000000 81879006405
+81882000000 81882006399
+81885000000 81885006399
+81888000000 81888006413
+81891000000 81891006404
+81894000000 81894006410
+81897000000 81897006399
+81900000000 81900006349
+81903000000 81903006408
+81906000000 81906006404
+81909000000 81909006391
+81912000000 81912006402
+81915000000 81915006320
+81918000000 81918006403
+81921000000 81921006395
+81924000000 81924006396
+81927000000 81927006407
+81930000000 81930006407
+81933000000 81933006361
+81936000000 81936006416
+81939000000 81939006381
+81942000000 81942006409
+81945000000 81945006408
+81948000000 81948006402
+81951000000 81951006357
+81954000000 81954006426
+81957000000 81957006405
+81960000000 81960006413
+81963000000 81963006399
+81966000000 81966006403
+81969000000 81969006405
+81972000000 81972006395
+81975000000 81975006391
+81978000000 81978006399
+81981000000 81981006395
+81984000000 81984006401
+81987000000 81987006392
+81990000000 81990006408
+81993000000 81993006378
+81996000000 81996006399
+81999000000 81999006394
+82002000000 82002006403
+82005000000 82005006392
+82008000000 82008006416
+82011000000 82011006397
+82014000000 82014006382
+82017000000 82017006396
+82020000000 82020006399
+82023000000 82023006402
+82026000000 82026006403
+82029000000 82029006413
+82032000000 82032006402
+82035000000 82035006406
+82038000000 82038006397
+82041000000 82041006395
+82044000000 82044006397
+82047000000 82047006396
+82050000000 82050006362
+82053000000 82053006392
+82056000000 82056006386
+82059000000 82059006402
+82062000000 82062006378
+82065000000 82065006390
+82068000000 82068006403
+82071000000 82071006405
+82074000000 82074006394
+82077000000 82077006336
+82080000000 82080006334
+82083000000 82083006406
+82086000000 82086006321
+82089000000 82089006395
+82092000000 82092006407
+82095000000 82095006399
+82098000000 82098006399
+82101000000 82101006358
+82104000000 82104006383
+82107000000 82107006306
+82110000000 82110006387
+82113000000 82113006399
+82116000000 82116006402
+82119000000 82119006369
+82122000000 82122006380
+82125000000 82125006398
+82128000000 82128006394
+82131000000 82131006402
+82134000000 82134006401
+82137000000 82137006395
+82140000000 82140006420
+82143000000 82143006399
+82146000000 82146006403
+82149000000 82149006388
+82152000000 82152006386
+82155000000 82155006357
+82158000000 82158006387
+82161000000 82161006395
+82164000000 82164006412
+82167000000 82167006402
+82170000000 82170006352
+82173000000 82173006406
+82176000000 82176006400
+82179000000 82179006394
+82182000000 82182006394
+82185000000 82185006408
+82188000000 82188006399
+82191000000 82191006405
+82194000000 82194006394
+82197000000 82197006344
+82200000000 82200006403
+82203000000 82203006399
+82206000000 82206006386
+82209000000 82209006397
+82212000000 82212006315
+82215000000 82215006398
+82218000000 82218006390
+82221000000 82221006391
+82224000000 82224006402
+82227000000 82227006402
+82230000000 82230006356
+82233000000 82233006411
+82236000000 82236006376
+82239000000 82239006404
+82242000000 82242006403
+82245000000 82245006397
+82248000000 82248006352
+82251000000 82251006421
+82254000000 82254006400
+82257000000 82257006408
+82260000000 82260006394
+82263000000 82263006398
+82266000000 82266006400
+82269000000 82269006390
+82272000000 82272006386
+82275000000 82275006394
+82278000000 82278006390
+82281000000 82281006396
+82284000000 82284006387
+82287000000 82287006403
+82290000000 82290006373
+82293000000 82293006394
+82296000000 82296006389
+82299000000 82299006398
+82302000000 82302006387
+82305000000 82305006411
+82308000000 82308006392
+82311000000 82311006377
+82314000000 82314006391
+82317000000 82317006394
+82320000000 82320006397
+82323000000 82323006398
+82326000000 82326006408
+82329000000 82329006397
+82332000000 82332006401
+82335000000 82335006392
+82338000000 82338006390
+82341000000 82341006392
+82344000000 82344006391
+82347000000 82347006357
+82350000000 82350006387
+82353000000 82353006381
+82356000000 82356006397
+82359000000 82359006373
+82362000000 82362006385
+82365000000 82365006398
+82368000000 82368006400
+82371000000 82371006389
+82374000000 82374006331
+82377000000 82377006329
+82380000000 82380006401
+82383000000 82383006316
+82386000000 82386006390
+82389000000 82389006402
+82392000000 82392006394
+82395000000 82395006394
+82398000000 82398006353
+82401000000 82401006378
+82404000000 82404006301
+82407000000 82407006382
+82410000000 82410006394
+82413000000 82413006397
+82416000000 82416006364
+82419000000 82419006375
+82422000000 82422006393
+82425000000 82425006389
+82428000000 82428006397
+82431000000 82431006396
+82434000000 82434006390
+82437000000 82437006415
+82440000000 82440006394
+82443000000 82443006398
+82446000000 82446006383
+82449000000 82449006381
+82452000000 82452006352
+82455000000 82455006382
+82458000000 82458006390
+82461000000 82461006407
+82464000000 82464006397
+82467000000 82467006347
+82470000000 82470006401
+82473000000 82473006395
+82476000000 82476006389
+82479000000 82479006389
+82482000000 82482006403
+82485000000 82485006394
+82488000000 82488006400
+82491000000 82491006389
+82494000000 82494006339
+82497000000 82497006398
+82500000000 82500006394
+82503000000 82503006381
+82506000000 82506006392
+82509000000 82509006310
+82512000000 82512006393
+82515000000 82515006385
+82518000000 82518006386
+82521000000 82521006397
+82524000000 82524006397
+82527000000 82527006351
+82530000000 82530006406
+82533000000 82533006371
+82536000000 82536006399
+82539000000 82539006398
+82542000000 82542006392
+82545000000 82545006347
+82548000000 82548006416
+82551000000 82551006395
+82554000000 82554006403
+82557000000 82557006389
+82560000000 82560006393
+82563000000 82563006395
+82566000000 82566006385
+82569000000 82569006381
+82572000000 82572006389
+82575000000 82575006385
+82578000000 82578006391
+82581000000 82581006382
+82584000000 82584006398
+82587000000 82587006368
+82590000000 82590006389
+82593000000 82593006384
+82596000000 82596006393
+82599000000 82599006382
+82602000000 82602006406
+82605000000 82605006387
+82608000000 82608006372
+82611000000 82611006386
+82614000000 82614006389
+82617000000 82617006392
+82620000000 82620006393
+82623000000 82623006403
+82626000000 82626006392
+82629000000 82629006396
+82632000000 82632006387
+82635000000 82635006385
+82638000000 82638006387
+82641000000 82641006386
+82644000000 82644006352
+82647000000 82647006382
+82650000000 82650006376
+82653000000 82653006392
+82656000000 82656006368
+82659000000 82659006380
+82662000000 82662006393
+82665000000 82665006395
+82668000000 82668006384
+82671000000 82671006326
+82674000000 82674006324
+82677000000 82677006396
+82680000000 82680006311
+82683000000 82683006385
+82686000000 82686006397
+82689000000 82689006389
+82692000000 82692006389
+82695000000 82695006348
+82698000000 82698006373
+82701000000 82701006296
+82704000000 82704006377
+82707000000 82707006389
+82710000000 82710006392
+82713000000 82713006359
+82716000000 82716006370
+82719000000 82719006388
+82722000000 82722006384
+82725000000 82725006392
+82728000000 82728006391
+82731000000 82731006385
+82734000000 82734006410
+82737000000 82737006389
+82740000000 82740006393
+82743000000 82743006378
+82746000000 82746006376
+82749000000 82749006347
+82752000000 82752006377
+82755000000 82755006385
+82758000000 82758006402
+82761000000 82761006392
+82764000000 82764006342
+82767000000 82767006396
+82770000000 82770006390
+82773000000 82773006384
+82776000000 82776006384
+82779000000 82779006398
+82782000000 82782006389
+82785000000 82785006395
+82788000000 82788006384
+82791000000 82791006334
+82794000000 82794006393
+82797000000 82797006389
+82800000000 82800006376
+82803000000 82803006387
+82806000000 82806006305
+82809000000 82809006388
+82812000000 82812006380
+82815000000 82815006381
+82818000000 82818006392
+82821000000 82821006392
+82824000000 82824006346
+82827000000 82827006401
+82830000000 82830006366
+82833000000 82833006394
+82836000000 82836006393
+82839000000 82839006387
+82842000000 82842006342
+82845000000 82845006411
+82848000000 82848006390
+82851000000 82851006398
+82854000000 82854006384
+82857000000 82857006388
+82860000000 82860006390
+82863000000 82863006380
+82866000000 82866006376
+82869000000 82869006384
+82872000000 82872006380
+82875000000 82875006386
+82878000000 82878006377
+82881000000 82881006393
+82884000000 82884006363
+82887000000 82887006384
+82890000000 82890006379
+82893000000 82893006388
+82896000000 82896006377
+82899000000 82899006401
+82902000000 82902006382
+82905000000 82905006367
+82908000000 82908006381
+82911000000 82911006384
+82914000000 82914006387
+82917000000 82917006388
+82920000000 82920006398
+82923000000 82923006387
+82926000000 82926006391
+82929000000 82929006382
+82932000000 82932006380
+82935000000 82935006382
+82938000000 82938006381
+82941000000 82941006347
+82944000000 82944006377
+82947000000 82947006371
+82950000000 82950006387
+82953000000 82953006363
+82956000000 82956006375
+82959000000 82959006388
+82962000000 82962006390
+82965000000 82965006379
+82968000000 82968006321
+82971000000 82971006319
+82974000000 82974006391
+82977000000 82977006306
+82980000000 82980006380
+82983000000 82983006392
+82986000000 82986006384
+82989000000 82989006384
+82992000000 82992006343
+82995000000 82995006368
+82998000000 82998006291
+83001000000 83001006372
+83004000000 83004006384
+83007000000 83007006387
+83010000000 83010006354
+83013000000 83013006365
+83016000000 83016006383
+83019000000 83019006379
+83022000000 83022006387
+83025000000 83025006386
+83028000000 83028006380
+83031000000 83031006405
+83034000000 83034006384
+83037000000 83037006388
+83040000000 83040006373
+83043000000 83043006371
+83046000000 83046006342
+83049000000 83049006372
+83052000000 83052006380
+83055000000 83055006397
+83058000000 83058006387
+83061000000 83061006337
+83064000000 83064006391
+83067000000 83067006385
+83070000000 83070006379
+83073000000 83073006379
+83076000000 83076006393
+83079000000 83079006384
+83082000000 83082006390
+83085000000 83085006379
+83088000000 83088006329
+83091000000 83091006388
+83094000000 83094006384
+83097000000 83097006371
+83100000000 83100006382
+83103000000 83103006300
+83106000000 83106006383
+83109000000 83109006375
+83112000000 83112006376
+83115000000 83115006387
+83118000000 83118006387
+83121000000 83121006341
+83124000000 83124006396
+83127000000 83127006361
+83130000000 83130006389
+83133000000 83133006388
+83136000000 83136006382
+83139000000 83139006337
+83142000000 83142006406
+83145000000 83145006385
+83148000000 83148006393
+83151000000 83151006379
+83154000000 83154006383
+83157000000 83157006385
+83160000000 83160006375
+83163000000 83163006371
+83166000000 83166006379
+83169000000 83169006375
+83172000000 83172006381
+83175000000 83175006372
+83178000000 83178006388
+83181000000 83181006358
+83184000000 83184006379
+83187000000 83187006374
+83190000000 83190006383
+83193000000 83193006372
+83196000000 83196006396
+83199000000 83199006377
+83202000000 83202006362
+83205000000 83205006376
+83208000000 83208006379
+83211000000 83211006382
+83214000000 83214006383
+83217000000 83217006393
+83220000000 83220006382
+83223000000 83223006386
+83226000000 83226006377
+83229000000 83229006375
+83232000000 83232006377
+83235000000 83235006376
+83238000000 83238006342
+83241000000 83241006372
+83244000000 83244006366
+83247000000 83247006382
+83250000000 83250006358
+83253000000 83253006370
+83256000000 83256006383
+83259000000 83259006385
+83262000000 83262006374
+83265000000 83265006316
+83268000000 83268006314
+83271000000 83271006386
+83274000000 83274006301
+83277000000 83277006375
+83280000000 83280006387
+83283000000 83283006379
+83286000000 83286006379
+83289000000 83289006338
+83292000000 83292006363
+83295000000 83295006286
+83298000000 83298006367
+83301000000 83301006379
+83304000000 83304006382
+83307000000 83307006349
+83310000000 83310006360
+83313000000 83313006378
+83316000000 83316006374
+83319000000 83319006382
+83322000000 83322006381
+83325000000 83325006375
+83328000000 83328006400
+83331000000 83331006379
+83334000000 83334006383
+83337000000 83337006368
+83340000000 83340006366
+83343000000 83343006337
+83346000000 83346006367
+83349000000 83349006375
+83352000000 83352006392
+83355000000 83355006382
+83358000000 83358006332
+83361000000 83361006386
+83364000000 83364006380
+83367000000 83367006374
+83370000000 83370006374
+83373000000 83373006388
+83376000000 83376006379
+83379000000 83379006385
+83382000000 83382006374
+83385000000 83385006324
+83388000000 83388006383
+83391000000 83391006379
+83394000000 83394006366
+83397000000 83397006377
+83400000000 83400006295
+83403000000 83403006378
+83406000000 83406006370
+83409000000 83409006371
+83412000000 83412006382
+83415000000 83415006382
+83418000000 83418006336
+83421000000 83421006391
+83424000000 83424006356
+83427000000 83427006384
+83430000000 83430006383
+83433000000 83433006377
+83436000000 83436006332
+83439000000 83439006401
+83442000000 83442006380
+83445000000 83445006388
+83448000000 83448006374
+83451000000 83451006378
+83454000000 83454006380
+83457000000 83457006370
+83460000000 83460006366
+83463000000 83463006374
+83466000000 83466006370
+83469000000 83469006376
+83472000000 83472006367
+83475000000 83475006383
+83478000000 83478006353
+83481000000 83481006374
+83484000000 83484006369
+83487000000 83487006378
+83490000000 83490006367
+83493000000 83493006391
+83496000000 83496006372
+83499000000 83499006357
+83502000000 83502006371
+83505000000 83505006374
+83508000000 83508006377
+83511000000 83511006378
+83514000000 83514006388
+83517000000 83517006377
+83520000000 83520006381
+83523000000 83523006372
+83526000000 83526006370
+83529000000 83529006372
+83532000000 83532006371
+83535000000 83535006337
+83538000000 83538006367
+83541000000 83541006361
+83544000000 83544006377
+83547000000 83547006353
+83550000000 83550006365
+83553000000 83553006378
+83556000000 83556006380
+83559000000 83559006369
+83562000000 83562006311
+83565000000 83565006309
+83568000000 83568006381
+83571000000 83571006296
+83574000000 83574006370
+83577000000 83577006382
+83580000000 83580006374
+83583000000 83583006374
+83586000000 83586006333
+83589000000 83589006358
+83592000000 83592006281
+83595000000 83595006362
+83598000000 83598006374
+83601000000 83601006377
+83604000000 83604006344
+83607000000 83607006355
+83610000000 83610006373
+83613000000 83613006369
+83616000000 83616006377
+83619000000 83619006376
+83622000000 83622006370
+83625000000 83625006395
+83628000000 83628006374
+83631000000 83631006378
+83634000000 83634006363
+83637000000 83637006361
+83640000000 83640006332
+83643000000 83643006362
+83646000000 83646006370
+83649000000 83649006387
+83652000000 83652006377
+83655000000 83655006327
+83658000000 83658006381
+83661000000 83661006375
+83664000000 83664006369
+83667000000 83667006369
+83670000000 83670006383
+83673000000 83673006374
+83676000000 83676006380
+83679000000 83679006369
+83682000000 83682006319
+83685000000 83685006378
+83688000000 83688006374
+83691000000 83691006361
+83694000000 83694006372
+83697000000 83697006290
+83700000000 83700006373
+83703000000 83703006365
+83706000000 83706006366
+83709000000 83709006377
+83712000000 83712006377
+83715000000 83715006331
+83718000000 83718006386
+83721000000 83721006351
+83724000000 83724006379
+83727000000 83727006378
+83730000000 83730006372
+83733000000 83733006327
+83736000000 83736006396
+83739000000 83739006375
+83742000000 83742006383
+83745000000 83745006369
+83748000000 83748006373
+83751000000 83751006375
+83754000000 83754006365
+83757000000 83757006361
+83760000000 83760006369
+83763000000 83763006365
+83766000000 83766006371
+83769000000 83769006362
+83772000000 83772006378
+83775000000 83775006348
+83778000000 83778006369
+83781000000 83781006364
+83784000000 83784006373
+83787000000 83787006362
+83790000000 83790006386
+83793000000 83793006367
+83796000000 83796006352
+83799000000 83799006366
+83802000000 83802006369
+83805000000 83805006372
+83808000000 83808006373
+83811000000 83811006383
+83814000000 83814006372
+83817000000 83817006376
+83820000000 83820006367
+83823000000 83823006365
+83826000000 83826006367
+83829000000 83829006366
+83832000000 83832006332
+83835000000 83835006362
+83838000000 83838006356
+83841000000 83841006372
+83844000000 83844006348
+83847000000 83847006360
+83850000000 83850006373
+83853000000 83853006375
+83856000000 83856006364
+83859000000 83859006306
+83862000000 83862006304
+83865000000 83865006376
+83868000000 83868006291
+83871000000 83871006365
+83874000000 83874006377
+83877000000 83877006369
+83880000000 83880006369
+83883000000 83883006328
+83886000000 83886006353
+83889000000 83889006276
+83892000000 83892006357
+83895000000 83895006369
+83898000000 83898006372
+83901000000 83901006339
+83904000000 83904006350
+83907000000 83907006368
+83910000000 83910006364
+83913000000 83913006372
+83916000000 83916006371
+83919000000 83919006365
+83922000000 83922006390
+83925000000 83925006369
+83928000000 83928006373
+83931000000 83931006358
+83934000000 83934006356
+83937000000 83937006327
+83940000000 83940006357
+83943000000 83943006365
+83946000000 83946006382
+83949000000 83949006372
+83952000000 83952006322
+83955000000 83955006376
+83958000000 83958006370
+83961000000 83961006364
+83964000000 83964006364
+83967000000 83967006378
+83970000000 83970006369
+83973000000 83973006375
+83976000000 83976006364
+83979000000 83979006314
+83982000000 83982006373
+83985000000 83985006369
+83988000000 83988006356
+83991000000 83991006367
+83994000000 83994006285
+83997000000 83997006368
+84000000000 84000006360
+84003000000 84003006361
+84006000000 84006006372
+84009000000 84009006372
+84012000000 84012006326
+84015000000 84015006381
+84018000000 84018006346
+84021000000 84021006374
+84024000000 84024006373
+84027000000 84027006367
+84030000000 84030006322
+84033000000 84033006391
+84036000000 84036006370
+84039000000 84039006378
+84042000000 84042006364
+84045000000 84045006368
+84048000000 84048006370
+84051000000 84051006360
+84054000000 84054006356
+84057000000 84057006364
+84060000000 84060006360
+84063000000 84063006366
+84066000000 84066006357
+84069000000 84069006373
+84072000000 84072006343
+84075000000 84075006364
+84078000000 84078006359
+84081000000 84081006368
+84084000000 84084006357
+84087000000 84087006381
+84090000000 84090006362
+84093000000 84093006347
+84096000000 84096006361
+84099000000 84099006364
+84102000000 84102006367
+84105000000 84105006368
+84108000000 84108006378
+84111000000 84111006367
+84114000000 84114006371
+84117000000 84117006362
+84120000000 84120006360
+84123000000 84123006362
+84126000000 84126006361
+84129000000 84129006327
+84132000000 84132006357
+84135000000 84135006351
+84138000000 84138006367
+84141000000 84141006343
+84144000000 84144006355
+84147000000 84147006368
+84150000000 84150006370
+84153000000 84153006359
+84156000000 84156006301
+84159000000 84159006299
+84162000000 84162006371
+84165000000 84165006286
+84168000000 84168006360
+84171000000 84171006372
+84174000000 84174006364
+84177000000 84177006364
+84180000000 84180006323
+84183000000 84183006348
+84186000000 84186006271
+84189000000 84189006352
+84192000000 84192006364
+84195000000 84195006367
+84198000000 84198006334
+84201000000 84201006345
+84204000000 84204006363
+84207000000 84207006359
+84210000000 84210006367
+84213000000 84213006366
+84216000000 84216006360
+84219000000 84219006385
+84222000000 84222006364
+84225000000 84225006368
+84228000000 84228006353
+84231000000 84231006351
+84234000000 84234006322
+84237000000 84237006352
+84240000000 84240006360
+84243000000 84243006377
+84246000000 84246006367
+84249000000 84249006317
+84252000000 84252006371
+84255000000 84255006365
+84258000000 84258006359
+84261000000 84261006359
+84264000000 84264006373
+84267000000 84267006364
+84270000000 84270006370
+84273000000 84273006359
+84276000000 84276006309
+84279000000 84279006368
+84282000000 84282006364
+84285000000 84285006351
+84288000000 84288006362
+84291000000 84291006280
+84294000000 84294006363
+84297000000 84297006355
+84300000000 84300006356
+84303000000 84303006367
+84306000000 84306006367
+84309000000 84309006321
+84312000000 84312006376
+84315000000 84315006341
+84318000000 84318006369
+84321000000 84321006368
+84324000000 84324006362
+84327000000 84327006317
+84330000000 84330006386
+84333000000 84333006365
+84336000000 84336006373
+84339000000 84339006359
+84342000000 84342006363
+84345000000 84345006365
+84348000000 84348006355
+84351000000 84351006351
+84354000000 84354006359
+84357000000 84357006355
+84360000000 84360006361
+84363000000 84363006352
+84366000000 84366006368
+84369000000 84369006338
+84372000000 84372006359
+84375000000 84375006354
+84378000000 84378006363
+84381000000 84381006352
+84384000000 84384006376
+84387000000 84387006357
+84390000000 84390006342
+84393000000 84393006356
+84396000000 84396006359
+84399000000 84399006362
+84402000000 84402006363
+84405000000 84405006373
+84408000000 84408006362
+84411000000 84411006366
+84414000000 84414006357
+84417000000 84417006355
+84420000000 84420006357
+84423000000 84423006356
+84426000000 84426006322
+84429000000 84429006352
+84432000000 84432006346
+84435000000 84435006362
+84438000000 84438006338
+84441000000 84441006350
+84444000000 84444006363
+84447000000 84447006365
+84450000000 84450006354
+84453000000 84453006296
+84456000000 84456006294
+84459000000 84459006366
+84462000000 84462006281
+84465000000 84465006355
+84468000000 84468006367
+84471000000 84471006359
+84474000000 84474006359
+84477000000 84477006318
+84480000000 84480006343
+84483000000 84483006266
+84486000000 84486006347
+84489000000 84489006359
+84492000000 84492006362
+84495000000 84495006329
+84498000000 84498006340
+84501000000 84501006358
+84504000000 84504006354
+84507000000 84507006362
+84510000000 84510006361
+84513000000 84513006355
+84516000000 84516006380
+84519000000 84519006359
+84522000000 84522006363
+84525000000 84525006348
+84528000000 84528006346
+84531000000 84531006317
+84534000000 84534006347
+84537000000 84537006355
+84540000000 84540006372
+84543000000 84543006362
+84546000000 84546006312
+84549000000 84549006366
+84552000000 84552006360
+84555000000 84555006354
+84558000000 84558006354
+84561000000 84561006368
+84564000000 84564006359
+84567000000 84567006365
+84570000000 84570006354
+84573000000 84573006304
+84576000000 84576006363
+84579000000 84579006359
+84582000000 84582006346
+84585000000 84585006357
+84588000000 84588006275
+84591000000 84591006358
+84594000000 84594006350
+84597000000 84597006351
+84600000000 84600006362
+84603000000 84603006362
+84606000000 84606006316
+84609000000 84609006371
+84612000000 84612006336
+84615000000 84615006364
+84618000000 84618006363
+84621000000 84621006357
+84624000000 84624006312
+84627000000 84627006381
+84630000000 84630006360
+84633000000 84633006368
+84636000000 84636006354
+84639000000 84639006358
+84642000000 84642006360
+84645000000 84645006350
+84648000000 84648006346
+84651000000 84651006354
+84654000000 84654006350
+84657000000 84657006356
+84660000000 84660006347
+84663000000 84663006363
+84666000000 84666006333
+84669000000 84669006354
+84672000000 84672006349
+84675000000 84675006358
+84678000000 84678006347
+84681000000 84681006371
+84684000000 84684006352
+84687000000 84687006337
+84690000000 84690006351
+84693000000 84693006354
+84696000000 84696006357
+84699000000 84699006358
+84702000000 84702006368
+84705000000 84705006357
+84708000000 84708006361
+84711000000 84711006352
+84714000000 84714006350
+84717000000 84717006352
+84720000000 84720006351
+84723000000 84723006317
+84726000000 84726006347
+84729000000 84729006341
+84732000000 84732006357
+84735000000 84735006333
+84738000000 84738006345
+84741000000 84741006358
+84744000000 84744006360
+84747000000 84747006349
+84750000000 84750006291
+84753000000 84753006289
+84756000000 84756006361
+84759000000 84759006276
+84762000000 84762006350
+84765000000 84765006362
+84768000000 84768006354
+84771000000 84771006354
+84774000000 84774006313
+84777000000 84777006338
+84780000000 84780006261
+84783000000 84783006342
+84786000000 84786006354
+84789000000 84789006357
+84792000000 84792006324
+84795000000 84795006335
+84798000000 84798006353
+84801000000 84801006349
+84804000000 84804006357
+84807000000 84807006356
+84810000000 84810006350
+84813000000 84813006375
+84816000000 84816006354
+84819000000 84819006358
+84822000000 84822006343
+84825000000 84825006341
+84828000000 84828006312
+84831000000 84831006342
+84834000000 84834006350
+84837000000 84837006367
+84840000000 84840006357
+84843000000 84843006307
+84846000000 84846006361
+84849000000 84849006355
+84852000000 84852006349
+84855000000 84855006349
+84858000000 84858006363
+84861000000 84861006354
+84864000000 84864006360
+84867000000 84867006349
+84870000000 84870006299
+84873000000 84873006358
+84876000000 84876006354
+84879000000 84879006341
+84882000000 84882006352
+84885000000 84885006270
+84888000000 84888006353
+84891000000 84891006345
+84894000000 84894006346
+84897000000 84897006357
+84900000000 84900006357
+84903000000 84903006311
+84906000000 84906006366
+84909000000 84909006331
+84912000000 84912006359
+84915000000 84915006358
+84918000000 84918006352
+84921000000 84921006307
+84924000000 84924006376
+84927000000 84927006355
+84930000000 84930006363
+84933000000 84933006349
+84936000000 84936006353
+84939000000 84939006355
+84942000000 84942006345
+84945000000 84945006341
+84948000000 84948006349
+84951000000 84951006345
+84954000000 84954006351
+84957000000 84957006342
+84960000000 84960006358
+84963000000 84963006328
+84966000000 84966006349
+84969000000 84969006344
+84972000000 84972006353
+84975000000 84975006342
+84978000000 84978006366
+84981000000 84981006347
+84984000000 84984006332
+84987000000 84987006346
+84990000000 84990006349
+84993000000 84993006352
+84996000000 84996006353
+84999000000 84999006363
+85002000000 85002006352
+85005000000 85005006356
+85008000000 85008006347
+85011000000 85011006345
+85014000000 85014006347
+85017000000 85017006346
+85020000000 85020006312
+85023000000 85023006342
+85026000000 85026006336
+85029000000 85029006352
+85032000000 85032006328
+85035000000 85035006340
+85038000000 85038006353
+85041000000 85041006355
+85044000000 85044006344
+85047000000 85047006286
+85050000000 85050006284
+85053000000 85053006356
+85056000000 85056006271
+85059000000 85059006345
+85062000000 85062006357
+85065000000 85065006349
+85068000000 85068006349
+85071000000 85071006308
+85074000000 85074006333
+85077000000 85077006256
+85080000000 85080006337
+85083000000 85083006349
+85086000000 85086006352
+85089000000 85089006319
+85092000000 85092006330
+85095000000 85095006348
+85098000000 85098006344
+85101000000 85101006352
+85104000000 85104006351
+85107000000 85107006345
+85110000000 85110006370
+85113000000 85113006349
+85116000000 85116006353
+85119000000 85119006338
+85122000000 85122006336
+85125000000 85125006307
+85128000000 85128006337
+85131000000 85131006345
+85134000000 85134006362
+85137000000 85137006352
+85140000000 85140006302
+85143000000 85143006356
+85146000000 85146006350
+85149000000 85149006344
+85152000000 85152006344
+85155000000 85155006358
+85158000000 85158006349
+85161000000 85161006355
+85164000000 85164006344
+85167000000 85167006294
+85170000000 85170006353
+85173000000 85173006349
+85176000000 85176006336
+85179000000 85179006347
+85182000000 85182006265
+85185000000 85185006348
+85188000000 85188006340
+85191000000 85191006341
+85194000000 85194006352
+85197000000 85197006352
+85200000000 85200006306
+85203000000 85203006361
+85206000000 85206006326
+85209000000 85209006354
+85212000000 85212006353
+85215000000 85215006347
+85218000000 85218006302
+85221000000 85221006371
+85224000000 85224006350
+85227000000 85227006358
+85230000000 85230006344
+85233000000 85233006348
+85236000000 85236006350
+85239000000 85239006340
+85242000000 85242006336
+85245000000 85245006344
+85248000000 85248006340
+85251000000 85251006346
+85254000000 85254006337
+85257000000 85257006353
+85260000000 85260006323
+85263000000 85263006344
+85266000000 85266006339
+85269000000 85269006348
+85272000000 85272006337
+85275000000 85275006361
+85278000000 85278006342
+85281000000 85281006327
+85284000000 85284006341
+85287000000 85287006344
+85290000000 85290006347
+85293000000 85293006348
+85296000000 85296006358
+85299000000 85299006347
+85302000000 85302006351
+85305000000 85305006342
+85308000000 85308006340
+85311000000 85311006342
+85314000000 85314006341
+85317000000 85317006307
+85320000000 85320006337
+85323000000 85323006331
+85326000000 85326006347
+85329000000 85329006323
+85332000000 85332006335
+85335000000 85335006348
+85338000000 85338006350
+85341000000 85341006339
+85344000000 85344006281
+85347000000 85347006279
+85350000000 85350006351
+85353000000 85353006266
+85356000000 85356006340
+85359000000 85359006352
+85362000000 85362006344
+85365000000 85365006344
+85368000000 85368006303
+85371000000 85371006328
+85374000000 85374006251
+85377000000 85377006332
+85380000000 85380006344
+85383000000 85383006347
+85386000000 85386006314
+85389000000 85389006325
+85392000000 85392006343
+85395000000 85395006339
+85398000000 85398006347
+85401000000 85401006346
+85404000000 85404006340
+85407000000 85407006365
+85410000000 85410006344
+85413000000 85413006348
+85416000000 85416006333
+85419000000 85419006331
+85422000000 85422006302
+85425000000 85425006332
+85428000000 85428006340
+85431000000 85431006357
+85434000000 85434006347
+85437000000 85437006297
+85440000000 85440006351
+85443000000 85443006345
+85446000000 85446006339
+85449000000 85449006339
+85452000000 85452006353
+85455000000 85455006344
+85458000000 85458006350
+85461000000 85461006339
+85464000000 85464006289
+85467000000 85467006348
+85470000000 85470006344
+85473000000 85473006331
+85476000000 85476006342
+85479000000 85479006260
+85482000000 85482006343
+85485000000 85485006335
+85488000000 85488006336
+85491000000 85491006347
+85494000000 85494006347
+85497000000 85497006301
+85500000000 85500006356
+85503000000 85503006321
+85506000000 85506006349
+85509000000 85509006348
+85512000000 85512006342
+85515000000 85515006297
+85518000000 85518006366
+85521000000 85521006345
+85524000000 85524006353
+85527000000 85527006339
+85530000000 85530006343
+85533000000 85533006345
+85536000000 85536006335
+85539000000 85539006331
+85542000000 85542006339
+85545000000 85545006335
+85548000000 85548006341
+85551000000 85551006332
+85554000000 85554006348
+85557000000 85557006318
+85560000000 85560006339
+85563000000 85563006334
+85566000000 85566006343
+85569000000 85569006332
+85572000000 85572006356
+85575000000 85575006337
+85578000000 85578006322
+85581000000 85581006336
+85584000000 85584006339
+85587000000 85587006342
+85590000000 85590006343
+85593000000 85593006353
+85596000000 85596006342
+85599000000 85599006346
+85602000000 85602006337
+85605000000 85605006335
+85608000000 85608006337
+85611000000 85611006336
+85614000000 85614006302
+85617000000 85617006332
+85620000000 85620006326
+85623000000 85623006342
+85626000000 85626006318
+85629000000 85629006330
+85632000000 85632006343
+85635000000 85635006345
+85638000000 85638006334
+85641000000 85641006276
+85644000000 85644006274
+85647000000 85647006346
+85650000000 85650006261
+85653000000 85653006335
+85656000000 85656006347
+85659000000 85659006339
+85662000000 85662006339
+85665000000 85665006298
+85668000000 85668006323
+85671000000 85671006246
+85674000000 85674006327
+85677000000 85677006339
+85680000000 85680006342
+85683000000 85683006309
+85686000000 85686006320
+85689000000 85689006338
+85692000000 85692006334
+85695000000 85695006342
+85698000000 85698006341
+85701000000 85701006335
+85704000000 85704006360
+85707000000 85707006339
+85710000000 85710006343
+85713000000 85713006328
+85716000000 85716006326
+85719000000 85719006297
+85722000000 85722006327
+85725000000 85725006335
+85728000000 85728006352
+85731000000 85731006342
+85734000000 85734006292
+85737000000 85737006346
+85740000000 85740006340
+85743000000 85743006334
+85746000000 85746006334
+85749000000 85749006348
+85752000000 85752006339
+85755000000 85755006345
+85758000000 85758006334
+85761000000 85761006284
+85764000000 85764006343
+85767000000 85767006339
+85770000000 85770006326
+85773000000 85773006337
+85776000000 85776006255
+85779000000 85779006338
+85782000000 85782006330
+85785000000 85785006331
+85788000000 85788006342
+85791000000 85791006342
+85794000000 85794006296
+85797000000 85797006351
+85800000000 85800006316
+85803000000 85803006344
+85806000000 85806006343
+85809000000 85809006337
+85812000000 85812006292
+85815000000 85815006361
+85818000000 85818006340
+85821000000 85821006348
+85824000000 85824006334
+85827000000 85827006338
+85830000000 85830006340
+85833000000 85833006330
+85836000000 85836006326
+85839000000 85839006334
+85842000000 85842006330
+85845000000 85845006336
+85848000000 85848006327
+85851000000 85851006343
+85854000000 85854006313
+85857000000 85857006334
+85860000000 85860006329
+85863000000 85863006338
+85866000000 85866006327
+85869000000 85869006351
+85872000000 85872006332
+85875000000 85875006317
+85878000000 85878006331
+85881000000 85881006334
+85884000000 85884006337
+85887000000 85887006338
+85890000000 85890006348
+85893000000 85893006337
+85896000000 85896006341
+85899000000 85899006332
+85902000000 85902006330
+85905000000 85905006332
+85908000000 85908006331
+85911000000 85911006297
+85914000000 85914006327
+85917000000 85917006321
+85920000000 85920006337
+85923000000 85923006313
+85926000000 85926006325
+85929000000 85929006338
+85932000000 85932006340
+85935000000 85935006329
+85938000000 85938006271
+85941000000 85941006269
+85944000000 85944006341
+85947000000 85947006256
+85950000000 85950006330
+85953000000 85953006342
+85956000000 85956006334
+85959000000 85959006334
+85962000000 85962006293
+85965000000 85965006318
+85968000000 85968006241
+85971000000 85971006322
+85974000000 85974006334
+85977000000 85977006337
+85980000000 85980006304
+85983000000 85983006315
+85986000000 85986006333
+85989000000 85989006329
+85992000000 85992006337
+85995000000 85995006336
+85998000000 85998006330
+86001000000 86001006355
+86004000000 86004006334
+86007000000 86007006338
+86010000000 86010006323
+86013000000 86013006321
+86016000000 86016006292
+86019000000 86019006322
+86022000000 86022006330
+86025000000 86025006347
+86028000000 86028006337
+86031000000 86031006287
+86034000000 86034006341
+86037000000 86037006335
+86040000000 86040006329
+86043000000 86043006329
+86046000000 86046006343
+86049000000 86049006334
+86052000000 86052006340
+86055000000 86055006329
+86058000000 86058006279
+86061000000 86061006338
+86064000000 86064006334
+86067000000 86067006321
+86070000000 86070006332
+86073000000 86073006250
+86076000000 86076006333
+86079000000 86079006325
+86082000000 86082006326
+86085000000 86085006337
+86088000000 86088006337
+86091000000 86091006291
+86094000000 86094006346
+86097000000 86097006311
+86100000000 86100006339
+86103000000 86103006338
+86106000000 86106006332
+86109000000 86109006287
+86112000000 86112006356
+86115000000 86115006335
+86118000000 86118006343
+86121000000 86121006329
+86124000000 86124006333
+86127000000 86127006335
+86130000000 86130006325
+86133000000 86133006321
+86136000000 86136006329
+86139000000 86139006325
+86142000000 86142006331
+86145000000 86145006322
+86148000000 86148006338
+86151000000 86151006308
+86154000000 86154006329
+86157000000 86157006324
+86160000000 86160006333
+86163000000 86163006322
+86166000000 86166006346
+86169000000 86169006327
+86172000000 86172006312
+86175000000 86175006326
+86178000000 86178006329
+86181000000 86181006332
+86184000000 86184006333
+86187000000 86187006343
+86190000000 86190006332
+86193000000 86193006336
+86196000000 86196006327
+86199000000 86199006325
+86202000000 86202006327
+86205000000 86205006326
+86208000000 86208006292
+86211000000 86211006322
+86214000000 86214006316
+86217000000 86217006332
+86220000000 86220006308
+86223000000 86223006320
+86226000000 86226006333
+86229000000 86229006335
+86232000000 86232006324
+86235000000 86235006266
+86238000000 86238006264
+86241000000 86241006336
+86244000000 86244006251
+86247000000 86247006325
+86250000000 86250006337
+86253000000 86253006329
+86256000000 86256006329
+86259000000 86259006288
+86262000000 86262006313
+86265000000 86265006236
+86268000000 86268006317
+86271000000 86271006329
+86274000000 86274006332
+86277000000 86277006299
+86280000000 86280006310
+86283000000 86283006328
+86286000000 86286006324
+86289000000 86289006332
+86292000000 86292006331
+86295000000 86295006325
+86298000000 86298006350
+86301000000 86301006329
+86304000000 86304006333
+86307000000 86307006318
+86310000000 86310006316
+86313000000 86313006287
+86316000000 86316006317
+86319000000 86319006325
+86322000000 86322006342
+86325000000 86325006332
+86328000000 86328006282
+86331000000 86331006336
+86334000000 86334006330
+86337000000 86337006324
+86340000000 86340006324
+86343000000 86343006338
+86346000000 86346006329
+86349000000 86349006335
+86352000000 86352006324
+86355000000 86355006274
+86358000000 86358006333
+86361000000 86361006329
+86364000000 86364006316
+86367000000 86367006327
+86370000000 86370006245
+86373000000 86373006328
+86376000000 86376006320
+86379000000 86379006321
+86382000000 86382006332
+86385000000 86385006332
+86388000000 86388006286
+86391000000 86391006341
+86394000000 86394006306
+86397000000 86397006334
+86400000000 86400006333
+86403000000 86403006327
+86406000000 86406006282
+86409000000 86409006351
+86412000000 86412006330
+86415000000 86415006338
+86418000000 86418006324
+86421000000 86421006328
+86424000000 86424006330
+86427000000 86427006320
+86430000000 86430006316
+86433000000 86433006324
+86436000000 86436006320
+86439000000 86439006326
+86442000000 86442006317
+86445000000 86445006333
+86448000000 86448006303
+86451000000 86451006324
+86454000000 86454006319
+86457000000 86457006328
+86460000000 86460006317
+86463000000 86463006341
+86466000000 86466006322
+86469000000 86469006307
+86472000000 86472006321
+86475000000 86475006324
+86478000000 86478006327
+86481000000 86481006328
+86484000000 86484006338
+86487000000 86487006327
+86490000000 86490006331
+86493000000 86493006322
+86496000000 86496006320
+86499000000 86499006322
+86502000000 86502006321
+86505000000 86505006287
+86508000000 86508006317
+86511000000 86511006311
+86514000000 86514006327
+86517000000 86517006303
+86520000000 86520006315
+86523000000 86523006328
+86526000000 86526006330
+86529000000 86529006319
+86532000000 86532006261
+86535000000 86535006259
+86538000000 86538006331
+86541000000 86541006246
+86544000000 86544006320
+86547000000 86547006332
+86550000000 86550006324
+86553000000 86553006324
+86556000000 86556006283
+86559000000 86559006308
+86562000000 86562006231
+86565000000 86565006312
+86568000000 86568006324
+86571000000 86571006327
+86574000000 86574006294
+86577000000 86577006305
+86580000000 86580006323
+86583000000 86583006319
+86586000000 86586006327
+86589000000 86589006326
+86592000000 86592006320
+86595000000 86595006345
+86598000000 86598006324
+86601000000 86601006328
+86604000000 86604006313
+86607000000 86607006311
+86610000000 86610006282
+86613000000 86613006312
+86616000000 86616006320
+86619000000 86619006337
+86622000000 86622006327
+86625000000 86625006277
+86628000000 86628006331
+86631000000 86631006325
+86634000000 86634006319
+86637000000 86637006319
+86640000000 86640006333
+86643000000 86643006324
+86646000000 86646006330
+86649000000 86649006319
+86652000000 86652006269
+86655000000 86655006328
+86658000000 86658006324
+86661000000 86661006311
+86664000000 86664006322
+86667000000 86667006240
+86670000000 86670006323
+86673000000 86673006315
+86676000000 86676006316
+86679000000 86679006327
+86682000000 86682006327
+86685000000 86685006281
+86688000000 86688006336
+86691000000 86691006301
+86694000000 86694006329
+86697000000 86697006328
+86700000000 86700006322
+86703000000 86703006277
+86706000000 86706006346
+86709000000 86709006325
+86712000000 86712006333
+86715000000 86715006319
+86718000000 86718006323
+86721000000 86721006325
+86724000000 86724006315
+86727000000 86727006311
+86730000000 86730006319
+86733000000 86733006315
+86736000000 86736006321
+86739000000 86739006312
+86742000000 86742006328
+86745000000 86745006298
+86748000000 86748006319
+86751000000 86751006314
+86754000000 86754006323
+86757000000 86757006312
+86760000000 86760006336
+86763000000 86763006317
+86766000000 86766006302
+86769000000 86769006316
+86772000000 86772006319
+86775000000 86775006322
+86778000000 86778006323
+86781000000 86781006333
+86784000000 86784006322
+86787000000 86787006326
+86790000000 86790006317
+86793000000 86793006315
+86796000000 86796006317
+86799000000 86799006316
+86802000000 86802006282
+86805000000 86805006312
+86808000000 86808006306
+86811000000 86811006322
+86814000000 86814006298
+86817000000 86817006310
+86820000000 86820006323
+86823000000 86823006325
+86826000000 86826006314
+86829000000 86829006256
+86832000000 86832006254
+86835000000 86835006326
+86838000000 86838006241
+86841000000 86841006315
+86844000000 86844006327
+86847000000 86847006319
+86850000000 86850006319
+86853000000 86853006278
+86856000000 86856006303
+86859000000 86859006226
+86862000000 86862006307
+86865000000 86865006319
+86868000000 86868006322
+86871000000 86871006289
+86874000000 86874006300
+86877000000 86877006318
+86880000000 86880006314
+86883000000 86883006322
+86886000000 86886006321
+86889000000 86889006315
+86892000000 86892006340
+86895000000 86895006319
+86898000000 86898006323
+86901000000 86901006308
+86904000000 86904006306
+86907000000 86907006277
+86910000000 86910006307
+86913000000 86913006315
+86916000000 86916006332
+86919000000 86919006322
+86922000000 86922006272
+86925000000 86925006326
+86928000000 86928006320
+86931000000 86931006314
+86934000000 86934006314
+86937000000 86937006328
+86940000000 86940006319
+86943000000 86943006325
+86946000000 86946006314
+86949000000 86949006264
+86952000000 86952006323
+86955000000 86955006319
+86958000000 86958006306
+86961000000 86961006317
+86964000000 86964006235
+86967000000 86967006318
+86970000000 86970006310
+86973000000 86973006311
+86976000000 86976006322
+86979000000 86979006322
+86982000000 86982006276
+86985000000 86985006331
+86988000000 86988006296
+86991000000 86991006324
+86994000000 86994006323
+86997000000 86997006317
+87000000000 87000006272
+87003000000 87003006341
+87006000000 87006006320
+87009000000 87009006328
+87012000000 87012006314
+87015000000 87015006318
+87018000000 87018006320
+87021000000 87021006310
+87024000000 87024006306
+87027000000 87027006314
+87030000000 87030006310
+87033000000 87033006316
+87036000000 87036006307
+87039000000 87039006323
+87042000000 87042006293
+87045000000 87045006314
+87048000000 87048006309
+87051000000 87051006318
+87054000000 87054006307
+87057000000 87057006331
+87060000000 87060006312
+87063000000 87063006297
+87066000000 87066006311
+87069000000 87069006314
+87072000000 87072006317
+87075000000 87075006318
+87078000000 87078006328
+87081000000 87081006317
+87084000000 87084006321
+87087000000 87087006312
+87090000000 87090006310
+87093000000 87093006312
+87096000000 87096006311
+87099000000 87099006277
+87102000000 87102006307
+87105000000 87105006301
+87108000000 87108006317
+87111000000 87111006293
+87114000000 87114006305
+87117000000 87117006318
+87120000000 87120006320
+87123000000 87123006309
+87126000000 87126006251
+87129000000 87129006249
+87132000000 87132006321
+87135000000 87135006236
+87138000000 87138006310
+87141000000 87141006322
+87144000000 87144006314
+87147000000 87147006314
+87150000000 87150006273
+87153000000 87153006298
+87156000000 87156006221
+87159000000 87159006302
+87162000000 87162006314
+87165000000 87165006317
+87168000000 87168006284
+87171000000 87171006295
+87174000000 87174006313
+87177000000 87177006309
+87180000000 87180006317
+87183000000 87183006316
+87186000000 87186006310
+87189000000 87189006335
+87192000000 87192006314
+87195000000 87195006318
+87198000000 87198006303
+87201000000 87201006301
+87204000000 87204006272
+87207000000 87207006302
+87210000000 87210006310
+87213000000 87213006327
+87216000000 87216006317
+87219000000 87219006267
+87222000000 87222006321
+87225000000 87225006315
+87228000000 87228006309
+87231000000 87231006309
+87234000000 87234006323
+87237000000 87237006314
+87240000000 87240006320
+87243000000 87243006309
+87246000000 87246006259
+87249000000 87249006318
+87252000000 87252006314
+87255000000 87255006301
+87258000000 87258006312
+87261000000 87261006230
+87264000000 87264006313
+87267000000 87267006305
+87270000000 87270006306
+87273000000 87273006317
+87276000000 87276006317
+87279000000 87279006271
+87282000000 87282006326
+87285000000 87285006291
+87288000000 87288006319
+87291000000 87291006318
+87294000000 87294006312
+87297000000 87297006267
+87300000000 87300006336
+87303000000 87303006315
+87306000000 87306006323
+87309000000 87309006309
+87312000000 87312006313
+87315000000 87315006315
+87318000000 87318006305
+87321000000 87321006301
+87324000000 87324006309
+87327000000 87327006305
+87330000000 87330006311
+87333000000 87333006302
+87336000000 87336006318
+87339000000 87339006288
+87342000000 87342006309
+87345000000 87345006304
+87348000000 87348006313
+87351000000 87351006302
+87354000000 87354006326
+87357000000 87357006307
+87360000000 87360006292
+87363000000 87363006306
+87366000000 87366006309
+87369000000 87369006312
+87372000000 87372006313
+87375000000 87375006323
+87378000000 87378006312
+87381000000 87381006316
+87384000000 87384006307
+87387000000 87387006305
+87390000000 87390006307
+87393000000 87393006306
+87396000000 87396006272
+87399000000 87399006302
+87402000000 87402006296
+87405000000 87405006312
+87408000000 87408006288
+87411000000 87411006300
+87414000000 87414006313
+87417000000 87417006315
+87420000000 87420006304
+87423000000 87423006246
+87426000000 87426006244
+87429000000 87429006316
+87432000000 87432006231
+87435000000 87435006305
+87438000000 87438006317
+87441000000 87441006309
+87444000000 87444006309
+87447000000 87447006268
+87450000000 87450006293
+87453000000 87453006216
+87456000000 87456006297
+87459000000 87459006309
+87462000000 87462006312
+87465000000 87465006279
+87468000000 87468006290
+87471000000 87471006308
+87474000000 87474006304
+87477000000 87477006312
+87480000000 87480006311
+87483000000 87483006305
+87486000000 87486006330
+87489000000 87489006309
+87492000000 87492006313
+87495000000 87495006298
+87498000000 87498006296
+87501000000 87501006267
+87504000000 87504006297
+87507000000 87507006305
+87510000000 87510006322
+87513000000 87513006312
+87516000000 87516006262
+87519000000 87519006316
+87522000000 87522006310
+87525000000 87525006304
+87528000000 87528006304
+87531000000 87531006318
+87534000000 87534006309
+87537000000 87537006315
+87540000000 87540006304
+87543000000 87543006254
+87546000000 87546006313
+87549000000 87549006309
+87552000000 87552006296
+87555000000 87555006307
+87558000000 87558006225
+87561000000 87561006308
+87564000000 87564006300
+87567000000 87567006301
+87570000000 87570006312
+87573000000 87573006312
+87576000000 87576006266
+87579000000 87579006321
+87582000000 87582006286
+87585000000 87585006314
+87588000000 87588006313
+87591000000 87591006307
+87594000000 87594006262
+87597000000 87597006331
+87600000000 87600006310
+87603000000 87603006318
+87606000000 87606006304
+87609000000 87609006308
+87612000000 87612006310
+87615000000 87615006300
+87618000000 87618006296
+87621000000 87621006304
+87624000000 87624006300
+87627000000 87627006306
+87630000000 87630006297
+87633000000 87633006313
+87636000000 87636006283
+87639000000 87639006304
+87642000000 87642006299
+87645000000 87645006308
+87648000000 87648006297
+87651000000 87651006321
+87654000000 87654006302
+87657000000 87657006287
+87660000000 87660006301
+87663000000 87663006304
+87666000000 87666006307
+87669000000 87669006308
+87672000000 87672006318
+87675000000 87675006307
+87678000000 87678006311
+87681000000 87681006302
+87684000000 87684006300
+87687000000 87687006302
+87690000000 87690006301
+87693000000 87693006267
+87696000000 87696006297
+87699000000 87699006291
+87702000000 87702006307
+87705000000 87705006283
+87708000000 87708006295
+87711000000 87711006308
+87714000000 87714006310
+87717000000 87717006299
+87720000000 87720006241
+87723000000 87723006239
+87726000000 87726006311
+87729000000 87729006226
+87732000000 87732006300
+87735000000 87735006312
+87738000000 87738006304
+87741000000 87741006304
+87744000000 87744006263
+87747000000 87747006288
+87750000000 87750006211
+87753000000 87753006292
+87756000000 87756006304
+87759000000 87759006307
+87762000000 87762006274
+87765000000 87765006285
+87768000000 87768006303
+87771000000 87771006299
+87774000000 87774006307
+87777000000 87777006306
+87780000000 87780006300
+87783000000 87783006325
+87786000000 87786006304
+87789000000 87789006308
+87792000000 87792006293
+87795000000 87795006291
+87798000000 87798006262
+87801000000 87801006292
+87804000000 87804006300
+87807000000 87807006317
+87810000000 87810006307
+87813000000 87813006257
+87816000000 87816006311
+87819000000 87819006305
+87822000000 87822006299
+87825000000 87825006299
+87828000000 87828006313
+87831000000 87831006304
+87834000000 87834006310
+87837000000 87837006299
+87840000000 87840006249
+87843000000 87843006308
+87846000000 87846006304
+87849000000 87849006291
+87852000000 87852006302
+87855000000 87855006220
+87858000000 87858006303
+87861000000 87861006295
+87864000000 87864006296
+87867000000 87867006307
+87870000000 87870006307
+87873000000 87873006261
+87876000000 87876006316
+87879000000 87879006281
+87882000000 87882006309
+87885000000 87885006308
+87888000000 87888006302
+87891000000 87891006257
+87894000000 87894006326
+87897000000 87897006305
+87900000000 87900006313
+87903000000 87903006299
+87906000000 87906006303
+87909000000 87909006305
+87912000000 87912006295
+87915000000 87915006291
+87918000000 87918006299
+87921000000 87921006295
+87924000000 87924006301
+87927000000 87927006292
+87930000000 87930006308
+87933000000 87933006278
+87936000000 87936006299
+87939000000 87939006294
+87942000000 87942006303
+87945000000 87945006292
+87948000000 87948006316
+87951000000 87951006297
+87954000000 87954006282
+87957000000 87957006296
+87960000000 87960006299
+87963000000 87963006302
+87966000000 87966006303
+87969000000 87969006313
+87972000000 87972006302
+87975000000 87975006306
+87978000000 87978006297
+87981000000 87981006295
+87984000000 87984006297
+87987000000 87987006296
+87990000000 87990006262
+87993000000 87993006292
+87996000000 87996006286
+87999000000 87999006302
+88002000000 88002006278
+88005000000 88005006290
+88008000000 88008006303
+88011000000 88011006305
+88014000000 88014006294
+88017000000 88017006236
+88020000000 88020006234
+88023000000 88023006306
+88026000000 88026006221
+88029000000 88029006295
+88032000000 88032006307
+88035000000 88035006299
+88038000000 88038006299
+88041000000 88041006258
+88044000000 88044006283
+88047000000 88047006206
+88050000000 88050006287
+88053000000 88053006299
+88056000000 88056006302
+88059000000 88059006269
+88062000000 88062006280
+88065000000 88065006298
+88068000000 88068006294
+88071000000 88071006302
+88074000000 88074006301
+88077000000 88077006295
+88080000000 88080006320
+88083000000 88083006299
+88086000000 88086006303
+88089000000 88089006288
+88092000000 88092006286
+88095000000 88095006257
+88098000000 88098006287
+88101000000 88101006295
+88104000000 88104006312
+88107000000 88107006302
+88110000000 88110006252
+88113000000 88113006306
+88116000000 88116006300
+88119000000 88119006294
+88122000000 88122006294
+88125000000 88125006308
+88128000000 88128006299
+88131000000 88131006305
+88134000000 88134006294
+88137000000 88137006244
+88140000000 88140006303
+88143000000 88143006299
+88146000000 88146006286
+88149000000 88149006297
+88152000000 88152006215
+88155000000 88155006298
+88158000000 88158006290
+88161000000 88161006291
+88164000000 88164006302
+88167000000 88167006302
+88170000000 88170006256
+88173000000 88173006311
+88176000000 88176006276
+88179000000 88179006304
+88182000000 88182006303
+88185000000 88185006297
+88188000000 88188006252
+88191000000 88191006321
+88194000000 88194006300
+88197000000 88197006308
+88200000000 88200006294
+88203000000 88203006298
+88206000000 88206006300
+88209000000 88209006290
+88212000000 88212006286
+88215000000 88215006294
+88218000000 88218006290
+88221000000 88221006296
+88224000000 88224006287
+88227000000 88227006303
+88230000000 88230006273
+88233000000 88233006294
+88236000000 88236006289
+88239000000 88239006298
+88242000000 88242006287
+88245000000 88245006311
+88248000000 88248006292
+88251000000 88251006277
+88254000000 88254006291
+88257000000 88257006294
+88260000000 88260006297
+88263000000 88263006298
+88266000000 88266006308
+88269000000 88269006297
+88272000000 88272006301
+88275000000 88275006292
+88278000000 88278006290
+88281000000 88281006292
+88284000000 88284006291
+88287000000 88287006257
+88290000000 88290006287
+88293000000 88293006281
+88296000000 88296006297
+88299000000 88299006273
+88302000000 88302006285
+88305000000 88305006298
+88308000000 88308006300
+88311000000 88311006289
+88314000000 88314006231
+88317000000 88317006229
+88320000000 88320006301
+88323000000 88323006216
+88326000000 88326006290
+88329000000 88329006302
+88332000000 88332006294
+88335000000 88335006294
+88338000000 88338006253
+88341000000 88341006278
+88344000000 88344006201
+88347000000 88347006282
+88350000000 88350006294
+88353000000 88353006297
+88356000000 88356006264
+88359000000 88359006275
+88362000000 88362006293
+88365000000 88365006289
+88368000000 88368006297
+88371000000 88371006296
+88374000000 88374006290
+88377000000 88377006315
+88380000000 88380006294
+88383000000 88383006298
+88386000000 88386006283
+88389000000 88389006281
+88392000000 88392006252
+88395000000 88395006282
+88398000000 88398006290
+88401000000 88401006307
+88404000000 88404006297
+88407000000 88407006247
+88410000000 88410006301
+88413000000 88413006295
+88416000000 88416006289
+88419000000 88419006289
+88422000000 88422006303
+88425000000 88425006294
+88428000000 88428006300
+88431000000 88431006289
+88434000000 88434006239
+88437000000 88437006298
+88440000000 88440006294
+88443000000 88443006281
+88446000000 88446006292
+88449000000 88449006210
+88452000000 88452006293
+88455000000 88455006285
+88458000000 88458006286
+88461000000 88461006297
+88464000000 88464006297
+88467000000 88467006251
+88470000000 88470006306
+88473000000 88473006271
+88476000000 88476006299
+88479000000 88479006298
+88482000000 88482006292
+88485000000 88485006247
+88488000000 88488006316
+88491000000 88491006295
+88494000000 88494006303
+88497000000 88497006289
+88500000000 88500006293
+88503000000 88503006295
+88506000000 88506006285
+88509000000 88509006281
+88512000000 88512006289
+88515000000 88515006285
+88518000000 88518006291
+88521000000 88521006282
+88524000000 88524006298
+88527000000 88527006268
+88530000000 88530006289
+88533000000 88533006284
+88536000000 88536006293
+88539000000 88539006282
+88542000000 88542006306
+88545000000 88545006287
+88548000000 88548006272
+88551000000 88551006286
+88554000000 88554006289
+88557000000 88557006292
+88560000000 88560006293
+88563000000 88563006303
+88566000000 88566006292
+88569000000 88569006296
+88572000000 88572006287
+88575000000 88575006285
+88578000000 88578006287
+88581000000 88581006286
+88584000000 88584006252
+88587000000 88587006282
+88590000000 88590006276
+88593000000 88593006292
+88596000000 88596006268
+88599000000 88599006280
+88602000000 88602006293
+88605000000 88605006295
+88608000000 88608006284
+88611000000 88611006226
+88614000000 88614006224
+88617000000 88617006296
+88620000000 88620006211
+88623000000 88623006285
+88626000000 88626006297
+88629000000 88629006289
+88632000000 88632006289
+88635000000 88635006248
+88638000000 88638006273
+88641000000 88641006196
+88644000000 88644006277
+88647000000 88647006289
+88650000000 88650006292
+88653000000 88653006259
+88656000000 88656006270
+88659000000 88659006288
+88662000000 88662006284
+88665000000 88665006292
+88668000000 88668006291
+88671000000 88671006285
+88674000000 88674006310
+88677000000 88677006289
+88680000000 88680006293
+88683000000 88683006278
+88686000000 88686006276
+88689000000 88689006247
+88692000000 88692006277
+88695000000 88695006285
+88698000000 88698006302
+88701000000 88701006292
+88704000000 88704006242
+88707000000 88707006296
+88710000000 88710006290
+88713000000 88713006284
+88716000000 88716006284
+88719000000 88719006298
+88722000000 88722006289
+88725000000 88725006295
+88728000000 88728006284
+88731000000 88731006234
+88734000000 88734006293
+88737000000 88737006289
+88740000000 88740006276
+88743000000 88743006287
+88746000000 88746006205
+88749000000 88749006288
+88752000000 88752006280
+88755000000 88755006281
+88758000000 88758006292
+88761000000 88761006292
+88764000000 88764006246
+88767000000 88767006301
+88770000000 88770006266
+88773000000 88773006294
+88776000000 88776006293
+88779000000 88779006287
+88782000000 88782006242
+88785000000 88785006311
+88788000000 88788006290
+88791000000 88791006298
+88794000000 88794006284
+88797000000 88797006288
+88800000000 88800006290
+88803000000 88803006280
+88806000000 88806006276
+88809000000 88809006284
+88812000000 88812006280
+88815000000 88815006286
+88818000000 88818006277
+88821000000 88821006293
+88824000000 88824006263
+88827000000 88827006284
+88830000000 88830006279
+88833000000 88833006288
+88836000000 88836006277
+88839000000 88839006301
+88842000000 88842006282
+88845000000 88845006267
+88848000000 88848006281
+88851000000 88851006284
+88854000000 88854006287
+88857000000 88857006288
+88860000000 88860006298
+88863000000 88863006287
+88866000000 88866006291
+88869000000 88869006282
+88872000000 88872006280
+88875000000 88875006282
+88878000000 88878006281
+88881000000 88881006247
+88884000000 88884006277
+88887000000 88887006271
+88890000000 88890006287
+88893000000 88893006263
+88896000000 88896006275
+88899000000 88899006288
+88902000000 88902006290
+88905000000 88905006279
+88908000000 88908006221
+88911000000 88911006219
+88914000000 88914006291
+88917000000 88917006206
+88920000000 88920006280
+88923000000 88923006292
+88926000000 88926006284
+88929000000 88929006284
+88932000000 88932006243
+88935000000 88935006268
+88938000000 88938006191
+88941000000 88941006272
+88944000000 88944006284
+88947000000 88947006287
+88950000000 88950006254
+88953000000 88953006265
+88956000000 88956006283
+88959000000 88959006279
+88962000000 88962006287
+88965000000 88965006286
+88968000000 88968006280
+88971000000 88971006305
+88974000000 88974006284
+88977000000 88977006288
+88980000000 88980006273
+88983000000 88983006271
+88986000000 88986006242
+88989000000 88989006272
+88992000000 88992006280
+88995000000 88995006297
+88998000000 88998006287
+89001000000 89001006237
+89004000000 89004006291
+89007000000 89007006285
+89010000000 89010006279
+89013000000 89013006279
+89016000000 89016006293
+89019000000 89019006284
+89022000000 89022006290
+89025000000 89025006279
+89028000000 89028006229
+89031000000 89031006288
+89034000000 89034006284
+89037000000 89037006271
+89040000000 89040006282
+89043000000 89043006200
+89046000000 89046006283
+89049000000 89049006275
+89052000000 89052006276
+89055000000 89055006287
+89058000000 89058006287
+89061000000 89061006241
+89064000000 89064006296
+89067000000 89067006261
+89070000000 89070006289
+89073000000 89073006288
+89076000000 89076006282
+89079000000 89079006237
+89082000000 89082006306
+89085000000 89085006285
+89088000000 89088006293
+89091000000 89091006279
+89094000000 89094006283
+89097000000 89097006285
+89100000000 89100006275
+89103000000 89103006271
+89106000000 89106006279
+89109000000 89109006275
+89112000000 89112006281
+89115000000 89115006272
+89118000000 89118006288
+89121000000 89121006258
+89124000000 89124006279
+89127000000 89127006274
+89130000000 89130006283
+89133000000 89133006272
+89136000000 89136006296
+89139000000 89139006277
+89142000000 89142006262
+89145000000 89145006276
+89148000000 89148006279
+89151000000 89151006282
+89154000000 89154006283
+89157000000 89157006293
+89160000000 89160006282
+89163000000 89163006286
+89166000000 89166006277
+89169000000 89169006275
+89172000000 89172006277
+89175000000 89175006276
+89178000000 89178006242
+89181000000 89181006272
+89184000000 89184006266
+89187000000 89187006282
+89190000000 89190006258
+89193000000 89193006270
+89196000000 89196006283
+89199000000 89199006285
+89202000000 89202006274
+89205000000 89205006216
+89208000000 89208006214
+89211000000 89211006286
+89214000000 89214006201
+89217000000 89217006275
+89220000000 89220006287
+89223000000 89223006279
+89226000000 89226006279
+89229000000 89229006238
+89232000000 89232006263
+89235000000 89235006186
+89238000000 89238006267
+89241000000 89241006279
+89244000000 89244006282
+89247000000 89247006249
+89250000000 89250006260
+89253000000 89253006278
+89256000000 89256006274
+89259000000 89259006282
+89262000000 89262006281
+89265000000 89265006275
+89268000000 89268006300
+89271000000 89271006279
+89274000000 89274006283
+89277000000 89277006268
+89280000000 89280006266
+89283000000 89283006237
+89286000000 89286006267
+89289000000 89289006275
+89292000000 89292006292
+89295000000 89295006282
+89298000000 89298006232
+89301000000 89301006286
+89304000000 89304006280
+89307000000 89307006274
+89310000000 89310006274
+89313000000 89313006288
+89316000000 89316006279
+89319000000 89319006285
+89322000000 89322006274
+89325000000 89325006224
+89328000000 89328006283
+89331000000 89331006279
+89334000000 89334006266
+89337000000 89337006277
+89340000000 89340006195
+89343000000 89343006278
+89346000000 89346006270
+89349000000 89349006271
+89352000000 89352006282
+89355000000 89355006282
+89358000000 89358006236
+89361000000 89361006291
+89364000000 89364006256
+89367000000 89367006284
+89370000000 89370006283
+89373000000 89373006277
+89376000000 89376006232
+89379000000 89379006301
+89382000000 89382006280
+89385000000 89385006288
+89388000000 89388006274
+89391000000 89391006278
+89394000000 89394006280
+89397000000 89397006270
+89400000000 89400006266
+89403000000 89403006274
+89406000000 89406006270
+89409000000 89409006276
+89412000000 89412006267
+89415000000 89415006283
+89418000000 89418006253
+89421000000 89421006274
+89424000000 89424006269
+89427000000 89427006278
+89430000000 89430006267
+89433000000 89433006291
+89436000000 89436006272
+89439000000 89439006257
+89442000000 89442006271
+89445000000 89445006274
+89448000000 89448006277
+89451000000 89451006278
+89454000000 89454006288
+89457000000 89457006277
+89460000000 89460006281
+89463000000 89463006272
+89466000000 89466006270
+89469000000 89469006272
+89472000000 89472006271
+89475000000 89475006237
+89478000000 89478006267
+89481000000 89481006261
+89484000000 89484006277
+89487000000 89487006253
+89490000000 89490006265
+89493000000 89493006278
+89496000000 89496006280
+89499000000 89499006269
+89502000000 89502006211
+89505000000 89505006209
+89508000000 89508006281
+89511000000 89511006196
+89514000000 89514006270
+89517000000 89517006282
+89520000000 89520006274
+89523000000 89523006274
+89526000000 89526006233
+89529000000 89529006258
+89532000000 89532006181
+89535000000 89535006262
+89538000000 89538006274
+89541000000 89541006277
+89544000000 89544006244
+89547000000 89547006255
+89550000000 89550006273
+89553000000 89553006269
+89556000000 89556006277
+89559000000 89559006276
+89562000000 89562006270
+89565000000 89565006295
+89568000000 89568006274
+89571000000 89571006278
+89574000000 89574006263
+89577000000 89577006261
+89580000000 89580006232
+89583000000 89583006262
+89586000000 89586006270
+89589000000 89589006287
+89592000000 89592006277
+89595000000 89595006227
+89598000000 89598006281
+89601000000 89601006275
+89604000000 89604006269
+89607000000 89607006269
+89610000000 89610006283
+89613000000 89613006274
+89616000000 89616006280
+89619000000 89619006269
+89622000000 89622006219
+89625000000 89625006278
+89628000000 89628006274
+89631000000 89631006261
+89634000000 89634006272
+89637000000 89637006190
+89640000000 89640006273
+89643000000 89643006265
+89646000000 89646006266
+89649000000 89649006277
+89652000000 89652006277
+89655000000 89655006231
+89658000000 89658006286
+89661000000 89661006251
+89664000000 89664006279
+89667000000 89667006278
+89670000000 89670006272
+89673000000 89673006227
+89676000000 89676006296
+89679000000 89679006275
+89682000000 89682006283
+89685000000 89685006269
+89688000000 89688006273
+89691000000 89691006275
+89694000000 89694006265
+89697000000 89697006261
+89700000000 89700006269
+89703000000 89703006265
+89706000000 89706006271
+89709000000 89709006262
+89712000000 89712006278
+89715000000 89715006248
+89718000000 89718006269
+89721000000 89721006264
+89724000000 89724006273
+89727000000 89727006262
+89730000000 89730006286
+89733000000 89733006267
+89736000000 89736006252
+89739000000 89739006266
+89742000000 89742006269
+89745000000 89745006272
+89748000000 89748006273
+89751000000 89751006283
+89754000000 89754006272
+89757000000 89757006276
+89760000000 89760006267
+89763000000 89763006265
+89766000000 89766006267
+89769000000 89769006266
+89772000000 89772006232
+89775000000 89775006262
+89778000000 89778006256
+89781000000 89781006272
+89784000000 89784006248
+89787000000 89787006260
+89790000000 89790006273
+89793000000 89793006275
+89796000000 89796006264
+89799000000 89799006206
+89802000000 89802006204
+89805000000 89805006276
+89808000000 89808006191
+89811000000 89811006265
+89814000000 89814006277
+89817000000 89817006269
+89820000000 89820006269
+89823000000 89823006228
+89826000000 89826006253
+89829000000 89829006176
+89832000000 89832006257
+89835000000 89835006269
+89838000000 89838006272
+89841000000 89841006239
+89844000000 89844006250
+89847000000 89847006268
+89850000000 89850006264
+89853000000 89853006272
+89856000000 89856006271
+89859000000 89859006265
+89862000000 89862006290
+89865000000 89865006269
+89868000000 89868006273
+89871000000 89871006258
+89874000000 89874006256
+89877000000 89877006227
+89880000000 89880006257
+89883000000 89883006265
+89886000000 89886006282
+89889000000 89889006272
+89892000000 89892006222
+89895000000 89895006276
+89898000000 89898006270
+89901000000 89901006264
+89904000000 89904006264
+89907000000 89907006278
+89910000000 89910006269
+89913000000 89913006275
+89916000000 89916006264
+89919000000 89919006214
+89922000000 89922006273
+89925000000 89925006269
+89928000000 89928006256
+89931000000 89931006267
+89934000000 89934006185
+89937000000 89937006268
+89940000000 89940006260
+89943000000 89943006261
+89946000000 89946006272
+89949000000 89949006272
+89952000000 89952006226
+89955000000 89955006281
+89958000000 89958006246
+89961000000 89961006274
+89964000000 89964006273
+89967000000 89967006267
+89970000000 89970006222
+89973000000 89973006291
+89976000000 89976006270
+89979000000 89979006278
+89982000000 89982006264
+89985000000 89985006268
+89988000000 89988006270
+89991000000 89991006260
+89994000000 89994006256
+89997000000 89997006264
+90000000000 90000006260
+90003000000 90003006266
+90006000000 90006006257
+90009000000 90009006273
+90012000000 90012006243
+90015000000 90015006264
+90018000000 90018006259
+90021000000 90021006268
+90024000000 90024006257
+90027000000 90027006281
+90030000000 90030006262
+90033000000 90033006247
+90036000000 90036006261
+90039000000 90039006264
+90042000000 90042006267
+90045000000 90045006268
+90048000000 90048006278
+90051000000 90051006267
+90054000000 90054006271
+90057000000 90057006262
+90060000000 90060006260
+90063000000 90063006262
+90066000000 90066006261
+90069000000 90069006227
+90072000000 90072006257
+90075000000 90075006251
+90078000000 90078006267
+90081000000 90081006243
+90084000000 90084006255
+90087000000 90087006268
+90090000000 90090006270
+90093000000 90093006259
+90096000000 90096006201
+90099000000 90099006199
+90102000000 90102006271
+90105000000 90105006186
+90108000000 90108006260
+90111000000 90111006272
+90114000000 90114006264
+90117000000 90117006264
+90120000000 90120006223
+90123000000 90123006248
+90126000000 90126006171
+90129000000 90129006252
+90132000000 90132006264
+90135000000 90135006267
+90138000000 90138006234
+90141000000 90141006245
+90144000000 90144006263
+90147000000 90147006259
+90150000000 90150006267
+90153000000 90153006266
+90156000000 90156006260
+90159000000 90159006285
+90162000000 90162006264
+90165000000 90165006268
+90168000000 90168006253
+90171000000 90171006251
+90174000000 90174006222
+90177000000 90177006252
+90180000000 90180006260
+90183000000 90183006277
+90186000000 90186006267
+90189000000 90189006217
+90192000000 90192006271
+90195000000 90195006265
+90198000000 90198006259
+90201000000 90201006259
+90204000000 90204006273
+90207000000 90207006264
+90210000000 90210006270
+90213000000 90213006259
+90216000000 90216006209
+90219000000 90219006268
+90222000000 90222006264
+90225000000 90225006251
+90228000000 90228006262
+90231000000 90231006180
+90234000000 90234006263
+90237000000 90237006255
+90240000000 90240006256
+90243000000 90243006267
+90246000000 90246006267
+90249000000 90249006221
+90252000000 90252006276
+90255000000 90255006241
+90258000000 90258006269
+90261000000 90261006268
+90264000000 90264006262
+90267000000 90267006217
+90270000000 90270006286
+90273000000 90273006265
+90276000000 90276006273
+90279000000 90279006259
+90282000000 90282006263
+90285000000 90285006265
+90288000000 90288006255
+90291000000 90291006251
+90294000000 90294006259
+90297000000 90297006255
+90300000000 90300006261
+90303000000 90303006252
+90306000000 90306006268
+90309000000 90309006238
+90312000000 90312006259
+90315000000 90315006254
+90318000000 90318006263
+90321000000 90321006252
+90324000000 90324006276
+90327000000 90327006257
+90330000000 90330006242
+90333000000 90333006256
+90336000000 90336006259
+90339000000 90339006262
+90342000000 90342006263
+90345000000 90345006273
+90348000000 90348006262
+90351000000 90351006266
+90354000000 90354006257
+90357000000 90357006255
+90360000000 90360006257
+90363000000 90363006256
+90366000000 90366006222
+90369000000 90369006252
+90372000000 90372006246
+90375000000 90375006262
+90378000000 90378006238
+90381000000 90381006250
+90384000000 90384006263
+90387000000 90387006265
+90390000000 90390006254
+90393000000 90393006196
+90396000000 90396006194
+90399000000 90399006266
+90402000000 90402006181
+90405000000 90405006255
+90408000000 90408006267
+90411000000 90411006259
+90414000000 90414006259
+90417000000 90417006218
+90420000000 90420006243
+90423000000 90423006166
+90426000000 90426006247
+90429000000 90429006259
+90432000000 90432006262
+90435000000 90435006229
+90438000000 90438006240
+90441000000 90441006258
+90444000000 90444006254
+90447000000 90447006262
+90450000000 90450006261
+90453000000 90453006255
+90456000000 90456006280
+90459000000 90459006259
+90462000000 90462006263
+90465000000 90465006248
+90468000000 90468006246
+90471000000 90471006217
+90474000000 90474006247
+90477000000 90477006255
+90480000000 90480006272
+90483000000 90483006262
+90486000000 90486006212
+90489000000 90489006266
+90492000000 90492006260
+90495000000 90495006254
+90498000000 90498006254
+90501000000 90501006268
+90504000000 90504006259
+90507000000 90507006265
+90510000000 90510006254
+90513000000 90513006204
+90516000000 90516006263
+90519000000 90519006259
+90522000000 90522006246
+90525000000 90525006257
+90528000000 90528006175
+90531000000 90531006258
+90534000000 90534006250
+90537000000 90537006251
+90540000000 90540006262
+90543000000 90543006262
+90546000000 90546006216
+90549000000 90549006271
+90552000000 90552006236
+90555000000 90555006264
+90558000000 90558006263
+90561000000 90561006257
+90564000000 90564006212
+90567000000 90567006281
+90570000000 90570006260
+90573000000 90573006268
+90576000000 90576006254
+90579000000 90579006258
+90582000000 90582006260
+90585000000 90585006250
+90588000000 90588006246
+90591000000 90591006254
+90594000000 90594006250
+90597000000 90597006256
+90600000000 90600006247
+90603000000 90603006263
+90606000000 90606006233
+90609000000 90609006254
+90612000000 90612006249
+90615000000 90615006258
+90618000000 90618006247
+90621000000 90621006271
+90624000000 90624006252
+90627000000 90627006237
+90630000000 90630006251
+90633000000 90633006254
+90636000000 90636006257
+90639000000 90639006258
+90642000000 90642006268
+90645000000 90645006257
+90648000000 90648006261
+90651000000 90651006252
+90654000000 90654006250
+90657000000 90657006252
+90660000000 90660006251
+90663000000 90663006217
+90666000000 90666006247
+90669000000 90669006241
+90672000000 90672006257
+90675000000 90675006233
+90678000000 90678006245
+90681000000 90681006258
+90684000000 90684006260
+90687000000 90687006249
+90690000000 90690006191
+90693000000 90693006189
+90696000000 90696006261
+90699000000 90699006176
+90702000000 90702006250
+90705000000 90705006262
+90708000000 90708006254
+90711000000 90711006254
+90714000000 90714006213
+90717000000 90717006238
+90720000000 90720006161
+90723000000 90723006242
+90726000000 90726006254
+90729000000 90729006257
+90732000000 90732006224
+90735000000 90735006235
+90738000000 90738006253
+90741000000 90741006249
+90744000000 90744006257
+90747000000 90747006256
+90750000000 90750006250
+90753000000 90753006275
+90756000000 90756006254
+90759000000 90759006258
+90762000000 90762006243
+90765000000 90765006241
+90768000000 90768006212
+90771000000 90771006242
+90774000000 90774006250
+90777000000 90777006267
+90780000000 90780006257
+90783000000 90783006207
+90786000000 90786006261
+90789000000 90789006255
+90792000000 90792006249
+90795000000 90795006249
+90798000000 90798006263
+90801000000 90801006254
+90804000000 90804006260
+90807000000 90807006249
+90810000000 90810006199
+90813000000 90813006258
+90816000000 90816006254
+90819000000 90819006241
+90822000000 90822006252
+90825000000 90825006170
+90828000000 90828006253
+90831000000 90831006245
+90834000000 90834006246
+90837000000 90837006257
+90840000000 90840006257
+90843000000 90843006211
+90846000000 90846006266
+90849000000 90849006231
+90852000000 90852006259
+90855000000 90855006258
+90858000000 90858006252
+90861000000 90861006207
+90864000000 90864006276
+90867000000 90867006255
+90870000000 90870006263
+90873000000 90873006249
+90876000000 90876006253
+90879000000 90879006255
+90882000000 90882006245
+90885000000 90885006241
+90888000000 90888006249
+90891000000 90891006245
+90894000000 90894006251
+90897000000 90897006242
+90900000000 90900006258
+90903000000 90903006228
+90906000000 90906006249
+90909000000 90909006244
+90912000000 90912006253
+90915000000 90915006242
+90918000000 90918006266
+90921000000 90921006247
+90924000000 90924006232
+90927000000 90927006246
+90930000000 90930006249
+90933000000 90933006252
+90936000000 90936006253
+90939000000 90939006263
+90942000000 90942006252
+90945000000 90945006256
+90948000000 90948006247
+90951000000 90951006245
+90954000000 90954006247
+90957000000 90957006246
+90960000000 90960006212
+90963000000 90963006242
+90966000000 90966006236
+90969000000 90969006252
+90972000000 90972006228
+90975000000 90975006240
+90978000000 90978006253
+90981000000 90981006255
+90984000000 90984006244
+90987000000 90987006186
+90990000000 90990006184
+90993000000 90993006256
+90996000000 90996006171
+90999000000 90999006245
+91002000000 91002006257
+91005000000 91005006249
+91008000000 91008006249
+91011000000 91011006208
+91014000000 91014006233
+91017000000 91017006156
+91020000000 91020006237
+91023000000 91023006249
+91026000000 91026006252
+91029000000 91029006219
+91032000000 91032006230
+91035000000 91035006248
+91038000000 91038006244
+91041000000 91041006252
+91044000000 91044006251
+91047000000 91047006245
+91050000000 91050006270
+91053000000 91053006249
+91056000000 91056006253
+91059000000 91059006238
+91062000000 91062006236
+91065000000 91065006207
+91068000000 91068006237
+91071000000 91071006245
+91074000000 91074006262
+91077000000 91077006252
+91080000000 91080006202
+91083000000 91083006256
+91086000000 91086006250
+91089000000 91089006244
+91092000000 91092006244
+91095000000 91095006258
+91098000000 91098006249
+91101000000 91101006255
+91104000000 91104006244
+91107000000 91107006194
+91110000000 91110006253
+91113000000 91113006249
+91116000000 91116006236
+91119000000 91119006247
+91122000000 91122006165
+91125000000 91125006248
+91128000000 91128006240
+91131000000 91131006241
+91134000000 91134006252
+91137000000 91137006252
+91140000000 91140006206
+91143000000 91143006261
+91146000000 91146006226
+91149000000 91149006254
+91152000000 91152006253
+91155000000 91155006247
+91158000000 91158006202
+91161000000 91161006271
+91164000000 91164006250
+91167000000 91167006258
+91170000000 91170006244
+91173000000 91173006248
+91176000000 91176006250
+91179000000 91179006240
+91182000000 91182006236
+91185000000 91185006244
+91188000000 91188006240
+91191000000 91191006246
+91194000000 91194006237
+91197000000 91197006253
+91200000000 91200006223
+91203000000 91203006244
+91206000000 91206006239
+91209000000 91209006248
+91212000000 91212006237
+91215000000 91215006261
+91218000000 91218006242
+91221000000 91221006227
+91224000000 91224006241
+91227000000 91227006244
+91230000000 91230006247
+91233000000 91233006248
+91236000000 91236006258
+91239000000 91239006247
+91242000000 91242006251
+91245000000 91245006242
+91248000000 91248006240
+91251000000 91251006242
+91254000000 91254006241
+91257000000 91257006207
+91260000000 91260006237
+91263000000 91263006231
+91266000000 91266006247
+91269000000 91269006223
+91272000000 91272006235
+91275000000 91275006248
+91278000000 91278006250
+91281000000 91281006239
+91284000000 91284006181
+91287000000 91287006179
+91290000000 91290006251
+91293000000 91293006166
+91296000000 91296006240
+91299000000 91299006252
+91302000000 91302006244
+91305000000 91305006244
+91308000000 91308006203
+91311000000 91311006228
+91314000000 91314006151
+91317000000 91317006232
+91320000000 91320006244
+91323000000 91323006247
+91326000000 91326006214
+91329000000 91329006225
+91332000000 91332006243
+91335000000 91335006239
+91338000000 91338006247
+91341000000 91341006246
+91344000000 91344006240
+91347000000 91347006265
+91350000000 91350006244
+91353000000 91353006248
+91356000000 91356006233
+91359000000 91359006231
+91362000000 91362006202
+91365000000 91365006232
+91368000000 91368006240
+91371000000 91371006257
+91374000000 91374006247
+91377000000 91377006197
+91380000000 91380006251
+91383000000 91383006245
+91386000000 91386006239
+91389000000 91389006239
+91392000000 91392006253
+91395000000 91395006244
+91398000000 91398006250
+91401000000 91401006239
+91404000000 91404006189
+91407000000 91407006248
+91410000000 91410006244
+91413000000 91413006231
+91416000000 91416006242
+91419000000 91419006160
+91422000000 91422006243
+91425000000 91425006235
+91428000000 91428006236
+91431000000 91431006247
+91434000000 91434006247
+91437000000 91437006201
+91440000000 91440006256
+91443000000 91443006221
+91446000000 91446006249
+91449000000 91449006248
+91452000000 91452006242
+91455000000 91455006197
+91458000000 91458006266
+91461000000 91461006245
+91464000000 91464006253
+91467000000 91467006239
+91470000000 91470006243
+91473000000 91473006245
+91476000000 91476006235
+91479000000 91479006231
+91482000000 91482006239
+91485000000 91485006235
+91488000000 91488006241
+91491000000 91491006232
+91494000000 91494006248
+91497000000 91497006218
+91500000000 91500006239
+91503000000 91503006234
+91506000000 91506006243
+91509000000 91509006232
+91512000000 91512006256
+91515000000 91515006237
+91518000000 91518006222
+91521000000 91521006236
+91524000000 91524006239
+91527000000 91527006242
+91530000000 91530006243
+91533000000 91533006253
+91536000000 91536006242
+91539000000 91539006246
+91542000000 91542006237
+91545000000 91545006235
+91548000000 91548006237
+91551000000 91551006236
+91554000000 91554006202
+91557000000 91557006232
+91560000000 91560006226
+91563000000 91563006242
+91566000000 91566006218
+91569000000 91569006230
+91572000000 91572006243
+91575000000 91575006245
+91578000000 91578006234
+91581000000 91581006176
+91584000000 91584006174
+91587000000 91587006246
+91590000000 91590006161
+91593000000 91593006235
+91596000000 91596006247
+91599000000 91599006239
+91602000000 91602006239
+91605000000 91605006198
+91608000000 91608006223
+91611000000 91611006146
+91614000000 91614006227
+91617000000 91617006239
+91620000000 91620006242
+91623000000 91623006209
+91626000000 91626006220
+91629000000 91629006238
+91632000000 91632006234
+91635000000 91635006242
+91638000000 91638006241
+91641000000 91641006235
+91644000000 91644006260
+91647000000 91647006239
+91650000000 91650006243
+91653000000 91653006228
+91656000000 91656006226
+91659000000 91659006197
+91662000000 91662006227
+91665000000 91665006235
+91668000000 91668006252
+91671000000 91671006242
+91674000000 91674006192
+91677000000 91677006246
+91680000000 91680006240
+91683000000 91683006234
+91686000000 91686006234
+91689000000 91689006248
+91692000000 91692006239
+91695000000 91695006245
+91698000000 91698006234
+91701000000 91701006184
+91704000000 91704006243
+91707000000 91707006239
+91710000000 91710006226
+91713000000 91713006237
+91716000000 91716006155
+91719000000 91719006238
+91722000000 91722006230
+91725000000 91725006231
+91728000000 91728006242
+91731000000 91731006242
+91734000000 91734006196
+91737000000 91737006251
+91740000000 91740006216
+91743000000 91743006244
+91746000000 91746006243
+91749000000 91749006237
+91752000000 91752006192
+91755000000 91755006261
+91758000000 91758006240
+91761000000 91761006248
+91764000000 91764006234
+91767000000 91767006238
+91770000000 91770006240
+91773000000 91773006230
+91776000000 91776006226
+91779000000 91779006234
+91782000000 91782006230
+91785000000 91785006236
+91788000000 91788006227
+91791000000 91791006243
+91794000000 91794006213
+91797000000 91797006234
+91800000000 91800006229
+91803000000 91803006238
+91806000000 91806006227
+91809000000 91809006251
+91812000000 91812006232
+91815000000 91815006217
+91818000000 91818006231
+91821000000 91821006234
+91824000000 91824006237
+91827000000 91827006238
+91830000000 91830006248
+91833000000 91833006237
+91836000000 91836006241
+91839000000 91839006232
+91842000000 91842006230
+91845000000 91845006232
+91848000000 91848006231
+91851000000 91851006197
+91854000000 91854006227
+91857000000 91857006221
+91860000000 91860006237
+91863000000 91863006213
+91866000000 91866006225
+91869000000 91869006238
+91872000000 91872006240
+91875000000 91875006229
+91878000000 91878006171
+91881000000 91881006169
+91884000000 91884006241
+91887000000 91887006156
+91890000000 91890006230
+91893000000 91893006242
+91896000000 91896006234
+91899000000 91899006234
+91902000000 91902006193
+91905000000 91905006218
+91908000000 91908006141
+91911000000 91911006222
+91914000000 91914006234
+91917000000 91917006237
+91920000000 91920006204
+91923000000 91923006215
+91926000000 91926006233
+91929000000 91929006229
+91932000000 91932006237
+91935000000 91935006236
+91938000000 91938006230
+91941000000 91941006255
+91944000000 91944006234
+91947000000 91947006238
+91950000000 91950006223
+91953000000 91953006221
+91956000000 91956006192
+91959000000 91959006222
+91962000000 91962006230
+91965000000 91965006247
+91968000000 91968006237
+91971000000 91971006187
+91974000000 91974006241
+91977000000 91977006235
+91980000000 91980006229
+91983000000 91983006229
+91986000000 91986006243
+91989000000 91989006234
+91992000000 91992006240
+91995000000 91995006229
+91998000000 91998006179
+92001000000 92001006238
+92004000000 92004006234
+92007000000 92007006221
+92010000000 92010006232
+92013000000 92013006150
+92016000000 92016006233
+92019000000 92019006225
+92022000000 92022006226
+92025000000 92025006237
+92028000000 92028006237
+92031000000 92031006191
+92034000000 92034006246
+92037000000 92037006211
+92040000000 92040006239
+92043000000 92043006238
+92046000000 92046006232
+92049000000 92049006187
+92052000000 92052006256
+92055000000 92055006235
+92058000000 92058006243
+92061000000 92061006229
+92064000000 92064006233
+92067000000 92067006235
+92070000000 92070006225
+92073000000 92073006221
+92076000000 92076006229
+92079000000 92079006225
+92082000000 92082006231
+92085000000 92085006222
+92088000000 92088006238
+92091000000 92091006208
+92094000000 92094006229
+92097000000 92097006224
+92100000000 92100006233
+92103000000 92103006222
+92106000000 92106006246
+92109000000 92109006227
+92112000000 92112006212
+92115000000 92115006226
+92118000000 92118006229
+92121000000 92121006232
+92124000000 92124006233
+92127000000 92127006243
+92130000000 92130006232
+92133000000 92133006236
+92136000000 92136006227
+92139000000 92139006225
+92142000000 92142006227
+92145000000 92145006226
+92148000000 92148006192
+92151000000 92151006222
+92154000000 92154006216
+92157000000 92157006232
+92160000000 92160006208
+92163000000 92163006220
+92166000000 92166006233
+92169000000 92169006235
+92172000000 92172006224
+92175000000 92175006166
+92178000000 92178006164
+92181000000 92181006236
+92184000000 92184006151
+92187000000 92187006225
+92190000000 92190006237
+92193000000 92193006229
+92196000000 92196006229
+92199000000 92199006188
+92202000000 92202006213
+92205000000 92205006136
+92208000000 92208006217
+92211000000 92211006229
+92214000000 92214006232
+92217000000 92217006199
+92220000000 92220006210
+92223000000 92223006228
+92226000000 92226006224
+92229000000 92229006232
+92232000000 92232006231
+92235000000 92235006225
+92238000000 92238006250
+92241000000 92241006229
+92244000000 92244006233
+92247000000 92247006218
+92250000000 92250006216
+92253000000 92253006187
+92256000000 92256006217
+92259000000 92259006225
+92262000000 92262006242
+92265000000 92265006232
+92268000000 92268006182
+92271000000 92271006236
+92274000000 92274006230
+92277000000 92277006224
+92280000000 92280006224
+92283000000 92283006238
+92286000000 92286006229
+92289000000 92289006235
+92292000000 92292006224
+92295000000 92295006174
+92298000000 92298006233
+92301000000 92301006229
+92304000000 92304006216
+92307000000 92307006227
+92310000000 92310006145
+92313000000 92313006228
+92316000000 92316006220
+92319000000 92319006221
+92322000000 92322006232
+92325000000 92325006232
+92328000000 92328006186
+92331000000 92331006241
+92334000000 92334006206
+92337000000 92337006234
+92340000000 92340006233
+92343000000 92343006227
+92346000000 92346006182
+92349000000 92349006251
+92352000000 92352006230
+92355000000 92355006238
+92358000000 92358006224
+92361000000 92361006228
+92364000000 92364006230
+92367000000 92367006220
+92370000000 92370006216
+92373000000 92373006224
+92376000000 92376006220
+92379000000 92379006226
+92382000000 92382006217
+92385000000 92385006233
+92388000000 92388006203
+92391000000 92391006224
+92394000000 92394006219
+92397000000 92397006228
+92400000000 92400006217
+92403000000 92403006241
+92406000000 92406006222
+92409000000 92409006207
+92412000000 92412006221
+92415000000 92415006224
+92418000000 92418006227
+92421000000 92421006228
+92424000000 92424006238
+92427000000 92427006227
+92430000000 92430006231
+92433000000 92433006222
+92436000000 92436006220
+92439000000 92439006222
+92442000000 92442006221
+92445000000 92445006187
+92448000000 92448006217
+92451000000 92451006211
+92454000000 92454006227
+92457000000 92457006203
+92460000000 92460006215
+92463000000 92463006228
+92466000000 92466006230
+92469000000 92469006219
+92472000000 92472006161
+92475000000 92475006159
+92478000000 92478006231
+92481000000 92481006146
+92484000000 92484006220
+92487000000 92487006232
+92490000000 92490006224
+92493000000 92493006224
+92496000000 92496006183
+92499000000 92499006208
+92502000000 92502006131
+92505000000 92505006212
+92508000000 92508006224
+92511000000 92511006227
+92514000000 92514006194
+92517000000 92517006205
+92520000000 92520006223
+92523000000 92523006219
+92526000000 92526006227
+92529000000 92529006226
+92532000000 92532006220
+92535000000 92535006245
+92538000000 92538006224
+92541000000 92541006228
+92544000000 92544006213
+92547000000 92547006211
+92550000000 92550006182
+92553000000 92553006212
+92556000000 92556006220
+92559000000 92559006237
+92562000000 92562006227
+92565000000 92565006177
+92568000000 92568006231
+92571000000 92571006225
+92574000000 92574006219
+92577000000 92577006219
+92580000000 92580006233
+92583000000 92583006224
+92586000000 92586006230
+92589000000 92589006219
+92592000000 92592006169
+92595000000 92595006228
+92598000000 92598006224
+92601000000 92601006211
+92604000000 92604006222
+92607000000 92607006140
+92610000000 92610006223
+92613000000 92613006215
+92616000000 92616006216
+92619000000 92619006227
+92622000000 92622006227
+92625000000 92625006181
+92628000000 92628006236
+92631000000 92631006201
+92634000000 92634006229
+92637000000 92637006228
+92640000000 92640006222
+92643000000 92643006177
+92646000000 92646006246
+92649000000 92649006225
+92652000000 92652006233
+92655000000 92655006219
+92658000000 92658006223
+92661000000 92661006225
+92664000000 92664006215
+92667000000 92667006211
+92670000000 92670006219
+92673000000 92673006215
+92676000000 92676006221
+92679000000 92679006212
+92682000000 92682006228
+92685000000 92685006198
+92688000000 92688006219
+92691000000 92691006214
+92694000000 92694006223
+92697000000 92697006212
+92700000000 92700006236
+92703000000 92703006217
+92706000000 92706006202
+92709000000 92709006216
+92712000000 92712006219
+92715000000 92715006222
+92718000000 92718006223
+92721000000 92721006233
+92724000000 92724006222
+92727000000 92727006226
+92730000000 92730006217
+92733000000 92733006215
+92736000000 92736006217
+92739000000 92739006216
+92742000000 92742006182
+92745000000 92745006212
+92748000000 92748006206
+92751000000 92751006222
+92754000000 92754006198
+92757000000 92757006210
+92760000000 92760006223
+92763000000 92763006225
+92766000000 92766006214
+92769000000 92769006156
+92772000000 92772006154
+92775000000 92775006226
+92778000000 92778006141
+92781000000 92781006215
+92784000000 92784006227
+92787000000 92787006219
+92790000000 92790006219
+92793000000 92793006178
+92796000000 92796006203
+92799000000 92799006126
+92802000000 92802006207
+92805000000 92805006219
+92808000000 92808006222
+92811000000 92811006189
+92814000000 92814006200
+92817000000 92817006218
+92820000000 92820006214
+92823000000 92823006222
+92826000000 92826006221
+92829000000 92829006215
+92832000000 92832006240
+92835000000 92835006219
+92838000000 92838006223
+92841000000 92841006208
+92844000000 92844006206
+92847000000 92847006177
+92850000000 92850006207
+92853000000 92853006215
+92856000000 92856006232
+92859000000 92859006222
+92862000000 92862006172
+92865000000 92865006226
+92868000000 92868006220
+92871000000 92871006214
+92874000000 92874006214
+92877000000 92877006228
+92880000000 92880006219
+92883000000 92883006225
+92886000000 92886006214
+92889000000 92889006164
+92892000000 92892006223
+92895000000 92895006219
+92898000000 92898006206
+92901000000 92901006217
+92904000000 92904006135
+92907000000 92907006218
+92910000000 92910006210
+92913000000 92913006211
+92916000000 92916006222
+92919000000 92919006222
+92922000000 92922006176
+92925000000 92925006231
+92928000000 92928006196
+92931000000 92931006224
+92934000000 92934006223
+92937000000 92937006217
+92940000000 92940006172
+92943000000 92943006241
+92946000000 92946006220
+92949000000 92949006228
+92952000000 92952006214
+92955000000 92955006218
+92958000000 92958006220
+92961000000 92961006210
+92964000000 92964006206
+92967000000 92967006214
+92970000000 92970006210
+92973000000 92973006216
+92976000000 92976006207
+92979000000 92979006223
+92982000000 92982006193
+92985000000 92985006214
+92988000000 92988006209
+92991000000 92991006218
+92994000000 92994006207
+92997000000 92997006231
+93000000000 93000006212
+93003000000 93003006197
+93006000000 93006006211
+93009000000 93009006214
+93012000000 93012006217
+93015000000 93015006218
+93018000000 93018006228
+93021000000 93021006217
+93024000000 93024006221
+93027000000 93027006212
+93030000000 93030006210
+93033000000 93033006212
+93036000000 93036006211
+93039000000 93039006177
+93042000000 93042006207
+93045000000 93045006201
+93048000000 93048006217
+93051000000 93051006193
+93054000000 93054006205
+93057000000 93057006218
+93060000000 93060006220
+93063000000 93063006209
+93066000000 93066006151
+93069000000 93069006149
+93072000000 93072006221
+93075000000 93075006136
+93078000000 93078006210
+93081000000 93081006222
+93084000000 93084006214
+93087000000 93087006214
+93090000000 93090006173
+93093000000 93093006198
+93096000000 93096006121
+93099000000 93099006202
+93102000000 93102006214
+93105000000 93105006217
+93108000000 93108006184
+93111000000 93111006195
+93114000000 93114006213
+93117000000 93117006209
+93120000000 93120006217
+93123000000 93123006216
+93126000000 93126006210
+93129000000 93129006235
+93132000000 93132006214
+93135000000 93135006218
+93138000000 93138006203
+93141000000 93141006201
+93144000000 93144006172
+93147000000 93147006202
+93150000000 93150006210
+93153000000 93153006227
+93156000000 93156006217
+93159000000 93159006167
+93162000000 93162006221
+93165000000 93165006215
+93168000000 93168006209
+93171000000 93171006209
+93174000000 93174006223
+93177000000 93177006214
+93180000000 93180006220
+93183000000 93183006209
+93186000000 93186006159
+93189000000 93189006218
+93192000000 93192006214
+93195000000 93195006201
+93198000000 93198006212
+93201000000 93201006130
+93204000000 93204006213
+93207000000 93207006205
+93210000000 93210006206
+93213000000 93213006217
+93216000000 93216006217
+93219000000 93219006171
+93222000000 93222006226
+93225000000 93225006191
+93228000000 93228006219
+93231000000 93231006218
+93234000000 93234006212
+93237000000 93237006167
+93240000000 93240006236
+93243000000 93243006215
+93246000000 93246006223
+93249000000 93249006209
+93252000000 93252006213
+93255000000 93255006215
+93258000000 93258006205
+93261000000 93261006201
+93264000000 93264006209
+93267000000 93267006205
+93270000000 93270006211
+93273000000 93273006202
+93276000000 93276006218
+93279000000 93279006188
+93282000000 93282006209
+93285000000 93285006204
+93288000000 93288006213
+93291000000 93291006202
+93294000000 93294006226
+93297000000 93297006207
+93300000000 93300006192
+93303000000 93303006206
+93306000000 93306006209
+93309000000 93309006212
+93312000000 93312006213
+93315000000 93315006223
+93318000000 93318006212
+93321000000 93321006216
+93324000000 93324006207
+93327000000 93327006205
+93330000000 93330006207
+93333000000 93333006206
+93336000000 93336006172
+93339000000 93339006202
+93342000000 93342006196
+93345000000 93345006212
+93348000000 93348006188
+93351000000 93351006200
+93354000000 93354006213
+93357000000 93357006215
+93360000000 93360006204
+93363000000 93363006146
+93366000000 93366006144
+93369000000 93369006216
+93372000000 93372006131
+93375000000 93375006205
+93378000000 93378006217
+93381000000 93381006209
+93384000000 93384006209
+93387000000 93387006168
+93390000000 93390006193
+93393000000 93393006116
+93396000000 93396006197
+93399000000 93399006209
+93402000000 93402006212
+93405000000 93405006179
+93408000000 93408006190
+93411000000 93411006208
+93414000000 93414006204
+93417000000 93417006212
+93420000000 93420006211
+93423000000 93423006205
+93426000000 93426006230
+93429000000 93429006209
+93432000000 93432006213
+93435000000 93435006198
+93438000000 93438006196
+93441000000 93441006167
+93444000000 93444006197
+93447000000 93447006205
+93450000000 93450006222
+93453000000 93453006212
+93456000000 93456006162
+93459000000 93459006216
+93462000000 93462006210
+93465000000 93465006204
+93468000000 93468006204
+93471000000 93471006218
+93474000000 93474006209
+93477000000 93477006215
+93480000000 93480006204
+93483000000 93483006154
+93486000000 93486006213
+93489000000 93489006209
+93492000000 93492006196
+93495000000 93495006207
+93498000000 93498006125
+93501000000 93501006208
+93504000000 93504006200
+93507000000 93507006201
+93510000000 93510006212
+93513000000 93513006212
+93516000000 93516006166
+93519000000 93519006221
+93522000000 93522006186
+93525000000 93525006214
+93528000000 93528006213
+93531000000 93531006207
+93534000000 93534006162
+93537000000 93537006231
+93540000000 93540006210
+93543000000 93543006218
+93546000000 93546006204
+93549000000 93549006208
+93552000000 93552006210
+93555000000 93555006200
+93558000000 93558006196
+93561000000 93561006204
+93564000000 93564006200
+93567000000 93567006206
+93570000000 93570006197
+93573000000 93573006213
+93576000000 93576006183
+93579000000 93579006204
+93582000000 93582006199
+93585000000 93585006208
+93588000000 93588006197
+93591000000 93591006221
+93594000000 93594006202
+93597000000 93597006187
+93600000000 93600006201
+93603000000 93603006204
+93606000000 93606006207
+93609000000 93609006208
+93612000000 93612006218
+93615000000 93615006207
+93618000000 93618006211
+93621000000 93621006202
+93624000000 93624006200
+93627000000 93627006202
+93630000000 93630006201
+93633000000 93633006167
+93636000000 93636006197
+93639000000 93639006191
+93642000000 93642006207
+93645000000 93645006183
+93648000000 93648006195
+93651000000 93651006208
+93654000000 93654006210
+93657000000 93657006199
+93660000000 93660006141
+93663000000 93663006139
+93666000000 93666006211
+93669000000 93669006126
+93672000000 93672006200
+93675000000 93675006212
+93678000000 93678006204
+93681000000 93681006204
+93684000000 93684006163
+93687000000 93687006188
+93690000000 93690006111
+93693000000 93693006192
+93696000000 93696006204
+93699000000 93699006207
+93702000000 93702006174
+93705000000 93705006185
+93708000000 93708006203
+93711000000 93711006199
+93714000000 93714006207
+93717000000 93717006206
+93720000000 93720006200
+93723000000 93723006225
+93726000000 93726006204
+93729000000 93729006208
+93732000000 93732006193
+93735000000 93735006191
+93738000000 93738006162
+93741000000 93741006192
+93744000000 93744006200
+93747000000 93747006217
+93750000000 93750006207
+93753000000 93753006157
+93756000000 93756006211
+93759000000 93759006205
+93762000000 93762006199
+93765000000 93765006199
+93768000000 93768006213
+93771000000 93771006204
+93774000000 93774006210
+93777000000 93777006199
+93780000000 93780006149
+93783000000 93783006208
+93786000000 93786006204
+93789000000 93789006191
+93792000000 93792006202
+93795000000 93795006120
+93798000000 93798006203
+93801000000 93801006195
+93804000000 93804006196
+93807000000 93807006207
+93810000000 93810006207
+93813000000 93813006161
+93816000000 93816006216
+93819000000 93819006181
+93822000000 93822006209
+93825000000 93825006208
+93828000000 93828006202
+93831000000 93831006157
+93834000000 93834006226
+93837000000 93837006205
+93840000000 93840006213
+93843000000 93843006199
+93846000000 93846006203
+93849000000 93849006205
+93852000000 93852006195
+93855000000 93855006191
+93858000000 93858006199
+93861000000 93861006195
+93864000000 93864006201
+93867000000 93867006192
+93870000000 93870006208
+93873000000 93873006178
+93876000000 93876006199
+93879000000 93879006194
+93882000000 93882006203
+93885000000 93885006192
+93888000000 93888006216
+93891000000 93891006197
+93894000000 93894006182
+93897000000 93897006196
+93900000000 93900006199
+93903000000 93903006202
+93906000000 93906006203
+93909000000 93909006213
+93912000000 93912006202
+93915000000 93915006206
+93918000000 93918006197
+93921000000 93921006195
+93924000000 93924006197
+93927000000 93927006196
+93930000000 93930006162
+93933000000 93933006192
+93936000000 93936006186
+93939000000 93939006202
+93942000000 93942006178
+93945000000 93945006190
+93948000000 93948006203
+93951000000 93951006205
+93954000000 93954006194
+93957000000 93957006136
+93960000000 93960006134
+93963000000 93963006206
+93966000000 93966006121
+93969000000 93969006195
+93972000000 93972006207
+93975000000 93975006199
+93978000000 93978006199
+93981000000 93981006158
+93984000000 93984006183
+93987000000 93987006106
+93990000000 93990006187
+93993000000 93993006199
+93996000000 93996006202
+93999000000 93999006169
+94002000000 94002006180
+94005000000 94005006198
+94008000000 94008006194
+94011000000 94011006202
+94014000000 94014006201
+94017000000 94017006195
+94020000000 94020006220
+94023000000 94023006199
+94026000000 94026006203
+94029000000 94029006188
+94032000000 94032006186
+94035000000 94035006157
+94038000000 94038006187
+94041000000 94041006195
+94044000000 94044006212
+94047000000 94047006202
+94050000000 94050006152
+94053000000 94053006206
+94056000000 94056006200
+94059000000 94059006194
+94062000000 94062006194
+94065000000 94065006208
+94068000000 94068006199
+94071000000 94071006205
+94074000000 94074006194
+94077000000 94077006144
+94080000000 94080006203
+94083000000 94083006199
+94086000000 94086006186
+94089000000 94089006197
+94092000000 94092006115
+94095000000 94095006198
+94098000000 94098006190
+94101000000 94101006191
+94104000000 94104006202
+94107000000 94107006202
+94110000000 94110006156
+94113000000 94113006211
+94116000000 94116006176
+94119000000 94119006204
+94122000000 94122006203
+94125000000 94125006197
+94128000000 94128006152
+94131000000 94131006221
+94134000000 94134006200
+94137000000 94137006208
+94140000000 94140006194
+94143000000 94143006198
+94146000000 94146006200
+94149000000 94149006190
+94152000000 94152006186
+94155000000 94155006194
+94158000000 94158006190
+94161000000 94161006196
+94164000000 94164006187
+94167000000 94167006203
+94170000000 94170006173
+94173000000 94173006194
+94176000000 94176006189
+94179000000 94179006198
+94182000000 94182006187
+94185000000 94185006211
+94188000000 94188006192
+94191000000 94191006177
+94194000000 94194006191
+94197000000 94197006194
+94200000000 94200006197
+94203000000 94203006198
+94206000000 94206006208
+94209000000 94209006197
+94212000000 94212006201
+94215000000 94215006192
+94218000000 94218006190
+94221000000 94221006192
+94224000000 94224006191
+94227000000 94227006157
+94230000000 94230006187
+94233000000 94233006181
+94236000000 94236006197
+94239000000 94239006173
+94242000000 94242006185
+94245000000 94245006198
+94248000000 94248006200
+94251000000 94251006189
+94254000000 94254006131
+94257000000 94257006129
+94260000000 94260006201
+94263000000 94263006116
+94266000000 94266006190
+94269000000 94269006202
+94272000000 94272006194
+94275000000 94275006194
+94278000000 94278006153
+94281000000 94281006178
+94284000000 94284006101
+94287000000 94287006182
+94290000000 94290006194
+94293000000 94293006197
+94296000000 94296006164
+94299000000 94299006175
+94302000000 94302006193
+94305000000 94305006189
+94308000000 94308006197
+94311000000 94311006196
+94314000000 94314006190
+94317000000 94317006215
+94320000000 94320006194
+94323000000 94323006198
+94326000000 94326006183
+94329000000 94329006181
+94332000000 94332006152
+94335000000 94335006182
+94338000000 94338006190
+94341000000 94341006207
+94344000000 94344006197
+94347000000 94347006147
+94350000000 94350006201
+94353000000 94353006195
+94356000000 94356006189
+94359000000 94359006189
+94362000000 94362006203
+94365000000 94365006194
+94368000000 94368006200
+94371000000 94371006189
+94374000000 94374006139
+94377000000 94377006198
+94380000000 94380006194
+94383000000 94383006181
+94386000000 94386006192
+94389000000 94389006110
+94392000000 94392006193
+94395000000 94395006185
+94398000000 94398006186
+94401000000 94401006197
+94404000000 94404006197
+94407000000 94407006151
+94410000000 94410006206
+94413000000 94413006171
+94416000000 94416006199
+94419000000 94419006198
+94422000000 94422006192
+94425000000 94425006147
+94428000000 94428006216
+94431000000 94431006195
+94434000000 94434006203
+94437000000 94437006189
+94440000000 94440006193
+94443000000 94443006195
+94446000000 94446006185
+94449000000 94449006181
+94452000000 94452006189
+94455000000 94455006185
+94458000000 94458006191
+94461000000 94461006182
+94464000000 94464006198
+94467000000 94467006168
+94470000000 94470006189
+94473000000 94473006184
+94476000000 94476006193
+94479000000 94479006182
+94482000000 94482006206
+94485000000 94485006187
+94488000000 94488006172
+94491000000 94491006186
+94494000000 94494006189
+94497000000 94497006192
+94500000000 94500006193
+94503000000 94503006203
+94506000000 94506006192
+94509000000 94509006196
+94512000000 94512006187
+94515000000 94515006185
+94518000000 94518006187
+94521000000 94521006186
+94524000000 94524006152
+94527000000 94527006182
+94530000000 94530006176
+94533000000 94533006192
+94536000000 94536006168
+94539000000 94539006180
+94542000000 94542006193
+94545000000 94545006195
+94548000000 94548006184
+94551000000 94551006126
+94554000000 94554006124
+94557000000 94557006196
+94560000000 94560006111
+94563000000 94563006185
+94566000000 94566006197
+94569000000 94569006189
+94572000000 94572006189
+94575000000 94575006148
+94578000000 94578006173
+94581000000 94581006096
+94584000000 94584006177
+94587000000 94587006189
+94590000000 94590006192
+94593000000 94593006159
+94596000000 94596006170
+94599000000 94599006188
+94602000000 94602006184
+94605000000 94605006192
+94608000000 94608006191
+94611000000 94611006185
+94614000000 94614006210
+94617000000 94617006189
+94620000000 94620006193
+94623000000 94623006178
+94626000000 94626006176
+94629000000 94629006147
+94632000000 94632006177
+94635000000 94635006185
+94638000000 94638006202
+94641000000 94641006192
+94644000000 94644006142
+94647000000 94647006196
+94650000000 94650006190
+94653000000 94653006184
+94656000000 94656006184
+94659000000 94659006198
+94662000000 94662006189
+94665000000 94665006195
+94668000000 94668006184
+94671000000 94671006134
+94674000000 94674006193
+94677000000 94677006189
+94680000000 94680006176
+94683000000 94683006187
+94686000000 94686006105
+94689000000 94689006188
+94692000000 94692006180
+94695000000 94695006181
+94698000000 94698006192
+94701000000 94701006192
+94704000000 94704006146
+94707000000 94707006201
+94710000000 94710006166
+94713000000 94713006194
+94716000000 94716006193
+94719000000 94719006187
+94722000000 94722006142
+94725000000 94725006211
+94728000000 94728006190
+94731000000 94731006198
+94734000000 94734006184
+94737000000 94737006188
+94740000000 94740006190
+94743000000 94743006180
+94746000000 94746006176
+94749000000 94749006184
+94752000000 94752006180
+94755000000 94755006186
+94758000000 94758006177
+94761000000 94761006193
+94764000000 94764006163
+94767000000 94767006184
+94770000000 94770006179
+94773000000 94773006188
+94776000000 94776006177
+94779000000 94779006201
+94782000000 94782006182
+94785000000 94785006167
+94788000000 94788006181
+94791000000 94791006184
+94794000000 94794006187
+94797000000 94797006188
+94800000000 94800006198
+94803000000 94803006187
+94806000000 94806006191
+94809000000 94809006182
+94812000000 94812006180
+94815000000 94815006182
+94818000000 94818006181
+94821000000 94821006147
+94824000000 94824006177
+94827000000 94827006171
+94830000000 94830006187
+94833000000 94833006163
+94836000000 94836006175
+94839000000 94839006188
+94842000000 94842006190
+94845000000 94845006179
+94848000000 94848006121
+94851000000 94851006119
+94854000000 94854006191
+94857000000 94857006106
+94860000000 94860006180
+94863000000 94863006192
+94866000000 94866006184
+94869000000 94869006184
+94872000000 94872006143
+94875000000 94875006168
+94878000000 94878006091
+94881000000 94881006172
+94884000000 94884006184
+94887000000 94887006187
+94890000000 94890006154
+94893000000 94893006165
+94896000000 94896006183
+94899000000 94899006179
+94902000000 94902006187
+94905000000 94905006186
+94908000000 94908006180
+94911000000 94911006205
+94914000000 94914006184
+94917000000 94917006188
+94920000000 94920006173
+94923000000 94923006171
+94926000000 94926006142
+94929000000 94929006172
+94932000000 94932006180
+94935000000 94935006197
+94938000000 94938006187
+94941000000 94941006137
+94944000000 94944006191
+94947000000 94947006185
+94950000000 94950006179
+94953000000 94953006179
+94956000000 94956006193
+94959000000 94959006184
+94962000000 94962006190
+94965000000 94965006179
+94968000000 94968006129
+94971000000 94971006188
+94974000000 94974006184
+94977000000 94977006171
+94980000000 94980006182
+94983000000 94983006100
+94986000000 94986006183
+94989000000 94989006175
+94992000000 94992006176
+94995000000 94995006187
+94998000000 94998006187
+95001000000 95001006141
+95004000000 95004006196
+95007000000 95007006161
+95010000000 95010006189
+95013000000 95013006188
+95016000000 95016006182
+95019000000 95019006137
+95022000000 95022006206
+95025000000 95025006185
+95028000000 95028006193
+95031000000 95031006179
+95034000000 95034006183
+95037000000 95037006185
+95040000000 95040006175
+95043000000 95043006171
+95046000000 95046006179
+95049000000 95049006175
+95052000000 95052006181
+95055000000 95055006172
+95058000000 95058006188
+95061000000 95061006158
+95064000000 95064006179
+95067000000 95067006174
+95070000000 95070006183
+95073000000 95073006172
+95076000000 95076006196
+95079000000 95079006177
+95082000000 95082006162
+95085000000 95085006176
+95088000000 95088006179
+95091000000 95091006182
+95094000000 95094006183
+95097000000 95097006193
+95100000000 95100006182
+95103000000 95103006186
+95106000000 95106006177
+95109000000 95109006175
+95112000000 95112006177
+95115000000 95115006176
+95118000000 95118006142
+95121000000 95121006172
+95124000000 95124006166
+95127000000 95127006182
+95130000000 95130006158
+95133000000 95133006170
+95136000000 95136006183
+95139000000 95139006185
+95142000000 95142006174
+95145000000 95145006116
+95148000000 95148006114
+95151000000 95151006186
+95154000000 95154006101
+95157000000 95157006175
+95160000000 95160006187
+95163000000 95163006179
+95166000000 95166006179
+95169000000 95169006138
+95172000000 95172006163
+95175000000 95175006086
+95178000000 95178006167
+95181000000 95181006179
+95184000000 95184006182
+95187000000 95187006149
+95190000000 95190006160
+95193000000 95193006178
+95196000000 95196006174
+95199000000 95199006182
+95202000000 95202006181
+95205000000 95205006175
+95208000000 95208006200
+95211000000 95211006179
+95214000000 95214006183
+95217000000 95217006168
+95220000000 95220006166
+95223000000 95223006137
+95226000000 95226006167
+95229000000 95229006175
+95232000000 95232006192
+95235000000 95235006182
+95238000000 95238006132
+95241000000 95241006186
+95244000000 95244006180
+95247000000 95247006174
+95250000000 95250006174
+95253000000 95253006188
+95256000000 95256006179
+95259000000 95259006185
+95262000000 95262006174
+95265000000 95265006124
+95268000000 95268006183
+95271000000 95271006179
+95274000000 95274006166
+95277000000 95277006177
+95280000000 95280006095
+95283000000 95283006178
+95286000000 95286006170
+95289000000 95289006171
+95292000000 95292006182
+95295000000 95295006182
+95298000000 95298006136
+95301000000 95301006191
+95304000000 95304006156
+95307000000 95307006184
+95310000000 95310006183
+95313000000 95313006177
+95316000000 95316006132
+95319000000 95319006201
+95322000000 95322006180
+95325000000 95325006188
+95328000000 95328006174
+95331000000 95331006178
+95334000000 95334006180
+95337000000 95337006170
+95340000000 95340006166
+95343000000 95343006174
+95346000000 95346006170
+95349000000 95349006176
+95352000000 95352006167
+95355000000 95355006183
+95358000000 95358006153
+95361000000 95361006174
+95364000000 95364006169
+95367000000 95367006178
+95370000000 95370006167
+95373000000 95373006191
+95376000000 95376006172
+95379000000 95379006157
+95382000000 95382006171
+95385000000 95385006174
+95388000000 95388006177
+95391000000 95391006178
+95394000000 95394006188
+95397000000 95397006177
+95400000000 95400006181
+95403000000 95403006172
+95406000000 95406006170
+95409000000 95409006172
+95412000000 95412006171
+95415000000 95415006137
+95418000000 95418006167
+95421000000 95421006161
+95424000000 95424006177
+95427000000 95427006153
+95430000000 95430006165
+95433000000 95433006178
+95436000000 95436006180
+95439000000 95439006169
+95442000000 95442006111
+95445000000 95445006109
+95448000000 95448006181
+95451000000 95451006096
+95454000000 95454006170
+95457000000 95457006182
+95460000000 95460006174
+95463000000 95463006174
+95466000000 95466006133
+95469000000 95469006158
+95472000000 95472006081
+95475000000 95475006162
+95478000000 95478006174
+95481000000 95481006177
+95484000000 95484006144
+95487000000 95487006155
+95490000000 95490006173
+95493000000 95493006169
+95496000000 95496006177
+95499000000 95499006176
+95502000000 95502006170
+95505000000 95505006195
+95508000000 95508006174
+95511000000 95511006178
+95514000000 95514006163
+95517000000 95517006161
+95520000000 95520006132
+95523000000 95523006162
+95526000000 95526006170
+95529000000 95529006187
+95532000000 95532006177
+95535000000 95535006127
+95538000000 95538006181
+95541000000 95541006175
+95544000000 95544006169
+95547000000 95547006169
+95550000000 95550006183
+95553000000 95553006174
+95556000000 95556006180
+95559000000 95559006169
+95562000000 95562006119
+95565000000 95565006178
+95568000000 95568006174
+95571000000 95571006161
+95574000000 95574006172
+95577000000 95577006090
+95580000000 95580006173
+95583000000 95583006165
+95586000000 95586006166
+95589000000 95589006177
+95592000000 95592006177
+95595000000 95595006131
+95598000000 95598006186
+95601000000 95601006151
+95604000000 95604006179
+95607000000 95607006178
+95610000000 95610006172
+95613000000 95613006127
+95616000000 95616006196
+95619000000 95619006175
+95622000000 95622006183
+95625000000 95625006169
+95628000000 95628006173
+95631000000 95631006175
+95634000000 95634006165
+95637000000 95637006161
+95640000000 95640006169
+95643000000 95643006165
+95646000000 95646006171
+95649000000 95649006162
+95652000000 95652006178
+95655000000 95655006148
+95658000000 95658006169
+95661000000 95661006164
+95664000000 95664006173
+95667000000 95667006162
+95670000000 95670006186
+95673000000 95673006167
+95676000000 95676006152
+95679000000 95679006166
+95682000000 95682006169
+95685000000 95685006172
+95688000000 95688006173
+95691000000 95691006183
+95694000000 95694006172
+95697000000 95697006176
+95700000000 95700006167
+95703000000 95703006165
+95706000000 95706006167
+95709000000 95709006166
+95712000000 95712006132
+95715000000 95715006162
+95718000000 95718006156
+95721000000 95721006172
+95724000000 95724006148
+95727000000 95727006160
+95730000000 95730006173
+95733000000 95733006175
+95736000000 95736006164
+95739000000 95739006106
+95742000000 95742006104
+95745000000 95745006176
+95748000000 95748006091
+95751000000 95751006165
+95754000000 95754006177
+95757000000 95757006169
+95760000000 95760006169
+95763000000 95763006128
+95766000000 95766006153
+95769000000 95769006076
+95772000000 95772006157
+95775000000 95775006169
+95778000000 95778006172
+95781000000 95781006139
+95784000000 95784006150
+95787000000 95787006168
+95790000000 95790006164
+95793000000 95793006172
+95796000000 95796006171
+95799000000 95799006165
+95802000000 95802006190
+95805000000 95805006169
+95808000000 95808006173
+95811000000 95811006158
+95814000000 95814006156
+95817000000 95817006127
+95820000000 95820006157
+95823000000 95823006165
+95826000000 95826006182
+95829000000 95829006172
+95832000000 95832006122
+95835000000 95835006176
+95838000000 95838006170
+95841000000 95841006164
+95844000000 95844006164
+95847000000 95847006178
+95850000000 95850006169
+95853000000 95853006175
+95856000000 95856006164
+95859000000 95859006114
+95862000000 95862006173
+95865000000 95865006169
+95868000000 95868006156
+95871000000 95871006167
+95874000000 95874006085
+95877000000 95877006168
+95880000000 95880006160
+95883000000 95883006161
+95886000000 95886006172
+95889000000 95889006172
+95892000000 95892006126
+95895000000 95895006181
+95898000000 95898006146
+95901000000 95901006174
+95904000000 95904006173
+95907000000 95907006167
+95910000000 95910006122
+95913000000 95913006191
+95916000000 95916006170
+95919000000 95919006178
+95922000000 95922006164
+95925000000 95925006168
+95928000000 95928006170
+95931000000 95931006160
+95934000000 95934006156
+95937000000 95937006164
+95940000000 95940006160
+95943000000 95943006166
+95946000000 95946006157
+95949000000 95949006173
+95952000000 95952006143
+95955000000 95955006164
+95958000000 95958006159
+95961000000 95961006168
+95964000000 95964006157
+95967000000 95967006181
+95970000000 95970006162
+95973000000 95973006147
+95976000000 95976006161
+95979000000 95979006164
+95982000000 95982006167
+95985000000 95985006168
+95988000000 95988006178
+95991000000 95991006167
+95994000000 95994006171
+95997000000 95997006162
+96000000000 96000006160
+96003000000 96003006162
+96006000000 96006006161
+96009000000 96009006127
+96012000000 96012006157
+96015000000 96015006151
+96018000000 96018006167
+96021000000 96021006143
+96024000000 96024006155
+96027000000 96027006168
+96030000000 96030006170
+96033000000 96033006159
+96036000000 96036006101
+96039000000 96039006099
+96042000000 96042006171
+96045000000 96045006086
+96048000000 96048006160
+96051000000 96051006172
+96054000000 96054006164
+96057000000 96057006164
+96060000000 96060006123
+96063000000 96063006148
+96066000000 96066006071
+96069000000 96069006152
+96072000000 96072006164
+96075000000 96075006167
+96078000000 96078006134
+96081000000 96081006145
+96084000000 96084006163
+96087000000 96087006159
+96090000000 96090006167
+96093000000 96093006166
+96096000000 96096006160
+96099000000 96099006185
+96102000000 96102006164
+96105000000 96105006168
+96108000000 96108006153
+96111000000 96111006151
+96114000000 96114006122
+96117000000 96117006152
+96120000000 96120006160
+96123000000 96123006177
+96126000000 96126006167
+96129000000 96129006117
+96132000000 96132006171
+96135000000 96135006165
+96138000000 96138006159
+96141000000 96141006159
+96144000000 96144006173
+96147000000 96147006164
+96150000000 96150006170
+96153000000 96153006159
+96156000000 96156006109
+96159000000 96159006168
+96162000000 96162006164
+96165000000 96165006151
+96168000000 96168006162
+96171000000 96171006080
+96174000000 96174006163
+96177000000 96177006155
+96180000000 96180006156
+96183000000 96183006167
+96186000000 96186006167
+96189000000 96189006121
+96192000000 96192006176
+96195000000 96195006141
+96198000000 96198006169
+96201000000 96201006168
+96204000000 96204006162
+96207000000 96207006117
+96210000000 96210006186
+96213000000 96213006165
+96216000000 96216006173
+96219000000 96219006159
+96222000000 96222006163
+96225000000 96225006165
+96228000000 96228006155
+96231000000 96231006151
+96234000000 96234006159
+96237000000 96237006155
+96240000000 96240006161
+96243000000 96243006152
+96246000000 96246006168
+96249000000 96249006138
+96252000000 96252006159
+96255000000 96255006154
+96258000000 96258006163
+96261000000 96261006152
+96264000000 96264006176
+96267000000 96267006157
+96270000000 96270006142
+96273000000 96273006156
+96276000000 96276006159
+96279000000 96279006162
+96282000000 96282006163
+96285000000 96285006173
+96288000000 96288006162
+96291000000 96291006166
+96294000000 96294006157
+96297000000 96297006155
+96300000000 96300006157
+96303000000 96303006156
+96306000000 96306006122
+96309000000 96309006152
+96312000000 96312006146
+96315000000 96315006162
+96318000000 96318006138
+96321000000 96321006150
+96324000000 96324006163
+96327000000 96327006165
+96330000000 96330006154
+96333000000 96333006096
+96336000000 96336006094
+96339000000 96339006166
+96342000000 96342006081
+96345000000 96345006155
+96348000000 96348006167
+96351000000 96351006159
+96354000000 96354006159
+96357000000 96357006118
+96360000000 96360006143
+96363000000 96363006066
+96366000000 96366006147
+96369000000 96369006159
+96372000000 96372006162
+96375000000 96375006129
+96378000000 96378006140
+96381000000 96381006158
+96384000000 96384006154
+96387000000 96387006162
+96390000000 96390006161
+96393000000 96393006155
+96396000000 96396006180
+96399000000 96399006159
+96402000000 96402006163
+96405000000 96405006148
+96408000000 96408006146
+96411000000 96411006117
+96414000000 96414006147
+96417000000 96417006155
+96420000000 96420006172
+96423000000 96423006162
+96426000000 96426006112
+96429000000 96429006166
+96432000000 96432006160
+96435000000 96435006154
+96438000000 96438006154
+96441000000 96441006168
+96444000000 96444006159
+96447000000 96447006165
+96450000000 96450006154
+96453000000 96453006104
+96456000000 96456006163
+96459000000 96459006159
+96462000000 96462006146
+96465000000 96465006157
+96468000000 96468006075
+96471000000 96471006158
+96474000000 96474006150
+96477000000 96477006151
+96480000000 96480006162
+96483000000 96483006162
+96486000000 96486006116
+96489000000 96489006171
+96492000000 96492006136
+96495000000 96495006164
+96498000000 96498006163
+96501000000 96501006157
+96504000000 96504006112
+96507000000 96507006181
+96510000000 96510006160
+96513000000 96513006168
+96516000000 96516006154
+96519000000 96519006158
+96522000000 96522006160
+96525000000 96525006150
+96528000000 96528006146
+96531000000 96531006154
+96534000000 96534006150
+96537000000 96537006156
+96540000000 96540006147
+96543000000 96543006163
+96546000000 96546006133
+96549000000 96549006154
+96552000000 96552006149
+96555000000 96555006158
+96558000000 96558006147
+96561000000 96561006171
+96564000000 96564006152
+96567000000 96567006137
+96570000000 96570006151
+96573000000 96573006154
+96576000000 96576006157
+96579000000 96579006158
+96582000000 96582006168
+96585000000 96585006157
+96588000000 96588006161
+96591000000 96591006152
+96594000000 96594006150
+96597000000 96597006152
+96600000000 96600006151
+96603000000 96603006117
+96606000000 96606006147
+96609000000 96609006141
+96612000000 96612006157
+96615000000 96615006133
+96618000000 96618006145
+96621000000 96621006158
+96624000000 96624006160
+96627000000 96627006149
+96630000000 96630006091
+96633000000 96633006089
+96636000000 96636006161
+96639000000 96639006076
+96642000000 96642006150
+96645000000 96645006162
+96648000000 96648006154
+96651000000 96651006154
+96654000000 96654006113
+96657000000 96657006138
+96660000000 96660006061
+96663000000 96663006142
+96666000000 96666006154
+96669000000 96669006157
+96672000000 96672006124
+96675000000 96675006135
+96678000000 96678006153
+96681000000 96681006149
+96684000000 96684006157
+96687000000 96687006156
+96690000000 96690006150
+96693000000 96693006175
+96696000000 96696006154
+96699000000 96699006158
+96702000000 96702006143
+96705000000 96705006141
+96708000000 96708006112
+96711000000 96711006142
+96714000000 96714006150
+96717000000 96717006167
+96720000000 96720006157
+96723000000 96723006107
+96726000000 96726006161
+96729000000 96729006155
+96732000000 96732006149
+96735000000 96735006149
+96738000000 96738006163
+96741000000 96741006154
+96744000000 96744006160
+96747000000 96747006149
+96750000000 96750006099
+96753000000 96753006158
+96756000000 96756006154
+96759000000 96759006141
+96762000000 96762006152
+96765000000 96765006070
+96768000000 96768006153
+96771000000 96771006145
+96774000000 96774006146
+96777000000 96777006157
+96780000000 96780006157
+96783000000 96783006111
+96786000000 96786006166
+96789000000 96789006131
+96792000000 96792006159
+96795000000 96795006158
+96798000000 96798006152
+96801000000 96801006107
+96804000000 96804006176
+96807000000 96807006155
+96810000000 96810006163
+96813000000 96813006149
+96816000000 96816006153
+96819000000 96819006155
+96822000000 96822006145
+96825000000 96825006141
+96828000000 96828006149
+96831000000 96831006145
+96834000000 96834006151
+96837000000 96837006142
+96840000000 96840006158
+96843000000 96843006128
+96846000000 96846006149
+96849000000 96849006144
+96852000000 96852006153
+96855000000 96855006142
+96858000000 96858006166
+96861000000 96861006147
+96864000000 96864006132
+96867000000 96867006146
+96870000000 96870006149
+96873000000 96873006152
+96876000000 96876006153
+96879000000 96879006163
+96882000000 96882006152
+96885000000 96885006156
+96888000000 96888006147
+96891000000 96891006145
+96894000000 96894006147
+96897000000 96897006146
+96900000000 96900006112
+96903000000 96903006142
+96906000000 96906006136
+96909000000 96909006152
+96912000000 96912006128
+96915000000 96915006140
+96918000000 96918006153
+96921000000 96921006155
+96924000000 96924006144
+96927000000 96927006086
+96930000000 96930006084
+96933000000 96933006156
+96936000000 96936006071
+96939000000 96939006145
+96942000000 96942006157
+96945000000 96945006149
+96948000000 96948006149
+96951000000 96951006108
+96954000000 96954006133
+96957000000 96957006056
+96960000000 96960006137
+96963000000 96963006149
+96966000000 96966006152
+96969000000 96969006119
+96972000000 96972006130
+96975000000 96975006148
+96978000000 96978006144
+96981000000 96981006152
+96984000000 96984006151
+96987000000 96987006145
+96990000000 96990006170
+96993000000 96993006149
+96996000000 96996006153
+96999000000 96999006138
+97002000000 97002006136
+97005000000 97005006107
+97008000000 97008006137
+97011000000 97011006145
+97014000000 97014006162
+97017000000 97017006152
+97020000000 97020006102
+97023000000 97023006156
+97026000000 97026006150
+97029000000 97029006144
+97032000000 97032006144
+97035000000 97035006158
+97038000000 97038006149
+97041000000 97041006155
+97044000000 97044006144
+97047000000 97047006094
+97050000000 97050006153
+97053000000 97053006149
+97056000000 97056006136
+97059000000 97059006147
+97062000000 97062006065
+97065000000 97065006148
+97068000000 97068006140
+97071000000 97071006141
+97074000000 97074006152
+97077000000 97077006152
+97080000000 97080006106
+97083000000 97083006161
+97086000000 97086006126
+97089000000 97089006154
+97092000000 97092006153
+97095000000 97095006147
+97098000000 97098006102
+97101000000 97101006171
+97104000000 97104006150
+97107000000 97107006158
+97110000000 97110006144
+97113000000 97113006148
+97116000000 97116006150
+97119000000 97119006140
+97122000000 97122006136
+97125000000 97125006144
+97128000000 97128006140
+97131000000 97131006146
+97134000000 97134006137
+97137000000 97137006153
+97140000000 97140006123
+97143000000 97143006144
+97146000000 97146006139
+97149000000 97149006148
+97152000000 97152006137
+97155000000 97155006161
+97158000000 97158006142
+97161000000 97161006127
+97164000000 97164006141
+97167000000 97167006144
+97170000000 97170006147
+97173000000 97173006148
+97176000000 97176006158
+97179000000 97179006147
+97182000000 97182006151
+97185000000 97185006142
+97188000000 97188006140
+97191000000 97191006142
+97194000000 97194006141
+97197000000 97197006107
+97200000000 97200006137
+97203000000 97203006131
+97206000000 97206006147
+97209000000 97209006123
+97212000000 97212006135
+97215000000 97215006148
+97218000000 97218006150
+97221000000 97221006139
+97224000000 97224006081
+97227000000 97227006079
+97230000000 97230006151
+97233000000 97233006066
+97236000000 97236006140
+97239000000 97239006152
+97242000000 97242006144
+97245000000 97245006144
+97248000000 97248006103
+97251000000 97251006128
+97254000000 97254006051
+97257000000 97257006132
+97260000000 97260006144
+97263000000 97263006147
+97266000000 97266006114
+97269000000 97269006125
+97272000000 97272006143
+97275000000 97275006139
+97278000000 97278006147
+97281000000 97281006146
+97284000000 97284006140
+97287000000 97287006165
+97290000000 97290006144
+97293000000 97293006148
+97296000000 97296006133
+97299000000 97299006131
+97302000000 97302006102
+97305000000 97305006132
+97308000000 97308006140
+97311000000 97311006157
+97314000000 97314006147
+97317000000 97317006097
+97320000000 97320006151
+97323000000 97323006145
+97326000000 97326006139
+97329000000 97329006139
+97332000000 97332006153
+97335000000 97335006144
+97338000000 97338006150
+97341000000 97341006139
+97344000000 97344006089
+97347000000 97347006148
+97350000000 97350006144
+97353000000 97353006131
+97356000000 97356006142
+97359000000 97359006060
+97362000000 97362006143
+97365000000 97365006135
+97368000000 97368006136
+97371000000 97371006147
+97374000000 97374006147
+97377000000 97377006101
+97380000000 97380006156
+97383000000 97383006121
+97386000000 97386006149
+97389000000 97389006148
+97392000000 97392006142
+97395000000 97395006097
+97398000000 97398006166
+97401000000 97401006145
+97404000000 97404006153
+97407000000 97407006139
+97410000000 97410006143
+97413000000 97413006145
+97416000000 97416006135
+97419000000 97419006131
+97422000000 97422006139
+97425000000 97425006135
+97428000000 97428006141
+97431000000 97431006132
+97434000000 97434006148
+97437000000 97437006118
+97440000000 97440006139
+97443000000 97443006134
+97446000000 97446006143
+97449000000 97449006132
+97452000000 97452006156
+97455000000 97455006137
+97458000000 97458006122
+97461000000 97461006136
+97464000000 97464006139
+97467000000 97467006142
+97470000000 97470006143
+97473000000 97473006153
+97476000000 97476006142
+97479000000 97479006146
+97482000000 97482006137
+97485000000 97485006135
+97488000000 97488006137
+97491000000 97491006136
+97494000000 97494006102
+97497000000 97497006132
+97500000000 97500006126
+97503000000 97503006142
+97506000000 97506006118
+97509000000 97509006130
+97512000000 97512006143
+97515000000 97515006145
+97518000000 97518006134
+97521000000 97521006076
+97524000000 97524006074
+97527000000 97527006146
+97530000000 97530006061
+97533000000 97533006135
+97536000000 97536006147
+97539000000 97539006139
+97542000000 97542006139
+97545000000 97545006098
+97548000000 97548006123
+97551000000 97551006046
+97554000000 97554006127
+97557000000 97557006139
+97560000000 97560006142
+97563000000 97563006109
+97566000000 97566006120
+97569000000 97569006138
+97572000000 97572006134
+97575000000 97575006142
+97578000000 97578006141
+97581000000 97581006135
+97584000000 97584006160
+97587000000 97587006139
+97590000000 97590006143
+97593000000 97593006128
+97596000000 97596006126
+97599000000 97599006097
+97602000000 97602006127
+97605000000 97605006135
+97608000000 97608006152
+97611000000 97611006142
+97614000000 97614006092
+97617000000 97617006146
+97620000000 97620006140
+97623000000 97623006134
+97626000000 97626006134
+97629000000 97629006148
+97632000000 97632006139
+97635000000 97635006145
+97638000000 97638006134
+97641000000 97641006084
+97644000000 97644006143
+97647000000 97647006139
+97650000000 97650006126
+97653000000 97653006137
+97656000000 97656006055
+97659000000 97659006138
+97662000000 97662006130
+97665000000 97665006131
+97668000000 97668006142
+97671000000 97671006142
+97674000000 97674006096
+97677000000 97677006151
+97680000000 97680006116
+97683000000 97683006144
+97686000000 97686006143
+97689000000 97689006137
+97692000000 97692006092
+97695000000 97695006161
+97698000000 97698006140
+97701000000 97701006148
+97704000000 97704006134
+97707000000 97707006138
+97710000000 97710006140
+97713000000 97713006130
+97716000000 97716006126
+97719000000 97719006134
+97722000000 97722006130
+97725000000 97725006136
+97728000000 97728006127
+97731000000 97731006143
+97734000000 97734006113
+97737000000 97737006134
+97740000000 97740006129
+97743000000 97743006138
+97746000000 97746006127
+97749000000 97749006151
+97752000000 97752006132
+97755000000 97755006117
+97758000000 97758006131
+97761000000 97761006134
+97764000000 97764006137
+97767000000 97767006138
+97770000000 97770006148
+97773000000 97773006137
+97776000000 97776006141
+97779000000 97779006132
+97782000000 97782006130
+97785000000 97785006132
+97788000000 97788006131
+97791000000 97791006097
+97794000000 97794006127
+97797000000 97797006121
+97800000000 97800006137
+97803000000 97803006113
+97806000000 97806006125
+97809000000 97809006138
+97812000000 97812006140
+97815000000 97815006129
+97818000000 97818006071
+97821000000 97821006069
+97824000000 97824006141
+97827000000 97827006056
+97830000000 97830006130
+97833000000 97833006142
+97836000000 97836006134
+97839000000 97839006134
+97842000000 97842006093
+97845000000 97845006118
+97848000000 97848006041
+97851000000 97851006122
+97854000000 97854006134
+97857000000 97857006137
+97860000000 97860006104
+97863000000 97863006115
+97866000000 97866006133
+97869000000 97869006129
+97872000000 97872006137
+97875000000 97875006136
+97878000000 97878006130
+97881000000 97881006155
+97884000000 97884006134
+97887000000 97887006138
+97890000000 97890006123
+97893000000 97893006121
+97896000000 97896006092
+97899000000 97899006122
+97902000000 97902006130
+97905000000 97905006147
+97908000000 97908006137
+97911000000 97911006087
+97914000000 97914006141
+97917000000 97917006135
+97920000000 97920006129
+97923000000 97923006129
+97926000000 97926006143
+97929000000 97929006134
+97932000000 97932006140
+97935000000 97935006129
+97938000000 97938006079
+97941000000 97941006138
+97944000000 97944006134
+97947000000 97947006121
+97950000000 97950006132
+97953000000 97953006050
+97956000000 97956006133
+97959000000 97959006125
+97962000000 97962006126
+97965000000 97965006137
+97968000000 97968006137
+97971000000 97971006091
+97974000000 97974006146
+97977000000 97977006111
+97980000000 97980006139
+97983000000 97983006138
+97986000000 97986006132
+97989000000 97989006087
+97992000000 97992006156
+97995000000 97995006135
+97998000000 97998006143
+98001000000 98001006129
+98004000000 98004006133
+98007000000 98007006135
+98010000000 98010006125
+98013000000 98013006121
+98016000000 98016006129
+98019000000 98019006125
+98022000000 98022006131
+98025000000 98025006122
+98028000000 98028006138
+98031000000 98031006108
+98034000000 98034006129
+98037000000 98037006124
+98040000000 98040006133
+98043000000 98043006122
+98046000000 98046006146
+98049000000 98049006127
+98052000000 98052006112
+98055000000 98055006126
+98058000000 98058006129
+98061000000 98061006132
+98064000000 98064006133
+98067000000 98067006143
+98070000000 98070006132
+98073000000 98073006136
+98076000000 98076006127
+98079000000 98079006125
+98082000000 98082006127
+98085000000 98085006126
+98088000000 98088006092
+98091000000 98091006122
+98094000000 98094006116
+98097000000 98097006132
+98100000000 98100006108
+98103000000 98103006120
+98106000000 98106006133
+98109000000 98109006135
+98112000000 98112006124
+98115000000 98115006066
+98118000000 98118006064
+98121000000 98121006136
+98124000000 98124006051
+98127000000 98127006125
+98130000000 98130006137
+98133000000 98133006129
+98136000000 98136006129
+98139000000 98139006088
+98142000000 98142006113
+98145000000 98145006036
+98148000000 98148006117
+98151000000 98151006129
+98154000000 98154006132
+98157000000 98157006099
+98160000000 98160006110
+98163000000 98163006128
+98166000000 98166006124
+98169000000 98169006132
+98172000000 98172006131
+98175000000 98175006125
+98178000000 98178006150
+98181000000 98181006129
+98184000000 98184006133
+98187000000 98187006118
+98190000000 98190006116
+98193000000 98193006087
+98196000000 98196006117
+98199000000 98199006125
+98202000000 98202006142
+98205000000 98205006132
+98208000000 98208006082
+98211000000 98211006136
+98214000000 98214006130
+98217000000 98217006124
+98220000000 98220006124
+98223000000 98223006138
+98226000000 98226006129
+98229000000 98229006135
+98232000000 98232006124
+98235000000 98235006074
+98238000000 98238006133
+98241000000 98241006129
+98244000000 98244006116
+98247000000 98247006127
+98250000000 98250006045
+98253000000 98253006128
+98256000000 98256006120
+98259000000 98259006121
+98262000000 98262006132
+98265000000 98265006132
+98268000000 98268006086
+98271000000 98271006141
+98274000000 98274006106
+98277000000 98277006134
+98280000000 98280006133
+98283000000 98283006127
+98286000000 98286006082
+98289000000 98289006151
+98292000000 98292006130
+98295000000 98295006138
+98298000000 98298006124
+98301000000 98301006128
+98304000000 98304006130
+98307000000 98307006120
+98310000000 98310006116
+98313000000 98313006124
+98316000000 98316006120
+98319000000 98319006126
+98322000000 98322006117
+98325000000 98325006133
+98328000000 98328006103
+98331000000 98331006124
+98334000000 98334006119
+98337000000 98337006128
+98340000000 98340006117
+98343000000 98343006141
+98346000000 98346006122
+98349000000 98349006107
+98352000000 98352006121
+98355000000 98355006124
+98358000000 98358006127
+98361000000 98361006128
+98364000000 98364006138
+98367000000 98367006127
+98370000000 98370006131
+98373000000 98373006122
+98376000000 98376006120
+98379000000 98379006122
+98382000000 98382006121
+98385000000 98385006087
+98388000000 98388006117
+98391000000 98391006111
+98394000000 98394006127
+98397000000 98397006103
+98400000000 98400006115
+98403000000 98403006128
+98406000000 98406006130
+98409000000 98409006119
+98412000000 98412006061
+98415000000 98415006059
+98418000000 98418006131
+98421000000 98421006046
+98424000000 98424006120
+98427000000 98427006132
+98430000000 98430006124
+98433000000 98433006124
+98436000000 98436006083
+98439000000 98439006108
+98442000000 98442006031
+98445000000 98445006112
+98448000000 98448006124
+98451000000 98451006127
+98454000000 98454006094
+98457000000 98457006105
+98460000000 98460006123
+98463000000 98463006119
+98466000000 98466006127
+98469000000 98469006126
+98472000000 98472006120
+98475000000 98475006145
+98478000000 98478006124
+98481000000 98481006128
+98484000000 98484006113
+98487000000 98487006111
+98490000000 98490006082
+98493000000 98493006112
+98496000000 98496006120
+98499000000 98499006137
+98502000000 98502006127
+98505000000 98505006077
+98508000000 98508006131
+98511000000 98511006125
+98514000000 98514006119
+98517000000 98517006119
+98520000000 98520006133
+98523000000 98523006124
+98526000000 98526006130
+98529000000 98529006119
+98532000000 98532006069
+98535000000 98535006128
+98538000000 98538006124
+98541000000 98541006111
+98544000000 98544006122
+98547000000 98547006040
+98550000000 98550006123
+98553000000 98553006115
+98556000000 98556006116
+98559000000 98559006127
+98562000000 98562006127
+98565000000 98565006081
+98568000000 98568006136
+98571000000 98571006101
+98574000000 98574006129
+98577000000 98577006128
+98580000000 98580006122
+98583000000 98583006077
+98586000000 98586006146
+98589000000 98589006125
+98592000000 98592006133
+98595000000 98595006119
+98598000000 98598006123
+98601000000 98601006125
+98604000000 98604006115
+98607000000 98607006111
+98610000000 98610006119
+98613000000 98613006115
+98616000000 98616006121
+98619000000 98619006112
+98622000000 98622006128
+98625000000 98625006098
+98628000000 98628006119
+98631000000 98631006114
+98634000000 98634006123
+98637000000 98637006112
+98640000000 98640006136
+98643000000 98643006117
+98646000000 98646006102
+98649000000 98649006116
+98652000000 98652006119
+98655000000 98655006122
+98658000000 98658006123
+98661000000 98661006133
+98664000000 98664006122
+98667000000 98667006126
+98670000000 98670006117
+98673000000 98673006115
+98676000000 98676006117
+98679000000 98679006116
+98682000000 98682006082
+98685000000 98685006112
+98688000000 98688006106
+98691000000 98691006122
+98694000000 98694006098
+98697000000 98697006110
+98700000000 98700006123
+98703000000 98703006125
+98706000000 98706006114
+98709000000 98709006056
+98712000000 98712006054
+98715000000 98715006126
+98718000000 98718006041
+98721000000 98721006115
+98724000000 98724006127
+98727000000 98727006119
+98730000000 98730006119
+98733000000 98733006078
+98736000000 98736006103
+98739000000 98739006026
+98742000000 98742006107
+98745000000 98745006119
+98748000000 98748006122
+98751000000 98751006089
+98754000000 98754006100
+98757000000 98757006118
+98760000000 98760006114
+98763000000 98763006122
+98766000000 98766006121
+98769000000 98769006115
+98772000000 98772006140
+98775000000 98775006119
+98778000000 98778006123
+98781000000 98781006108
+98784000000 98784006106
+98787000000 98787006077
+98790000000 98790006107
+98793000000 98793006115
+98796000000 98796006132
+98799000000 98799006122
+98802000000 98802006072
+98805000000 98805006126
+98808000000 98808006120
+98811000000 98811006114
+98814000000 98814006114
+98817000000 98817006128
+98820000000 98820006119
+98823000000 98823006125
+98826000000 98826006114
+98829000000 98829006064
+98832000000 98832006123
+98835000000 98835006119
+98838000000 98838006106
+98841000000 98841006117
+98844000000 98844006035
+98847000000 98847006118
+98850000000 98850006110
+98853000000 98853006111
+98856000000 98856006122
+98859000000 98859006122
+98862000000 98862006076
+98865000000 98865006131
+98868000000 98868006096
+98871000000 98871006124
+98874000000 98874006123
+98877000000 98877006117
+98880000000 98880006072
+98883000000 98883006141
+98886000000 98886006120
+98889000000 98889006128
+98892000000 98892006114
+98895000000 98895006118
+98898000000 98898006120
+98901000000 98901006110
+98904000000 98904006106
+98907000000 98907006114
+98910000000 98910006110
+98913000000 98913006116
+98916000000 98916006107
+98919000000 98919006123
+98922000000 98922006093
+98925000000 98925006114
+98928000000 98928006109
+98931000000 98931006118
+98934000000 98934006107
+98937000000 98937006131
+98940000000 98940006112
+98943000000 98943006097
+98946000000 98946006111
+98949000000 98949006114
+98952000000 98952006117
+98955000000 98955006118
+98958000000 98958006128
+98961000000 98961006117
+98964000000 98964006121
+98967000000 98967006112
+98970000000 98970006110
+98973000000 98973006112
+98976000000 98976006111
+98979000000 98979006077
+98982000000 98982006107
+98985000000 98985006101
+98988000000 98988006117
+98991000000 98991006093
+98994000000 98994006105
+98997000000 98997006118
+99000000000 99000006120
+99003000000 99003006109
+99006000000 99006006051
+99009000000 99009006049
+99012000000 99012006121
+99015000000 99015006036
+99018000000 99018006110
+99021000000 99021006122
+99024000000 99024006114
+99027000000 99027006114
+99030000000 99030006073
+99033000000 99033006098
+99036000000 99036006021
+99039000000 99039006102
+99042000000 99042006114
+99045000000 99045006117
+99048000000 99048006084
+99051000000 99051006095
+99054000000 99054006113
+99057000000 99057006109
+99060000000 99060006117
+99063000000 99063006116
+99066000000 99066006110
+99069000000 99069006135
+99072000000 99072006114
+99075000000 99075006118
+99078000000 99078006103
+99081000000 99081006101
+99084000000 99084006072
+99087000000 99087006102
+99090000000 99090006110
+99093000000 99093006127
+99096000000 99096006117
+99099000000 99099006067
+99102000000 99102006121
+99105000000 99105006115
+99108000000 99108006109
+99111000000 99111006109
+99114000000 99114006123
+99117000000 99117006114
+99120000000 99120006120
+99123000000 99123006109
+99126000000 99126006059
+99129000000 99129006118
+99132000000 99132006114
+99135000000 99135006101
+99138000000 99138006112
+99141000000 99141006030
+99144000000 99144006113
+99147000000 99147006105
+99150000000 99150006106
+99153000000 99153006117
+99156000000 99156006117
+99159000000 99159006071
+99162000000 99162006126
+99165000000 99165006091
+99168000000 99168006119
+99171000000 99171006118
+99174000000 99174006112
+99177000000 99177006067
+99180000000 99180006136
+99183000000 99183006115
+99186000000 99186006123
+99189000000 99189006109
+99192000000 99192006113
+99195000000 99195006115
+99198000000 99198006105
+99201000000 99201006101
+99204000000 99204006109
+99207000000 99207006105
+99210000000 99210006111
+99213000000 99213006102
+99216000000 99216006118
+99219000000 99219006088
+99222000000 99222006109
+99225000000 99225006104
+99228000000 99228006113
+99231000000 99231006102
+99234000000 99234006126
+99237000000 99237006107
+99240000000 99240006092
+99243000000 99243006106
+99246000000 99246006109
+99249000000 99249006112
+99252000000 99252006113
+99255000000 99255006123
+99258000000 99258006112
+99261000000 99261006116
+99264000000 99264006107
+99267000000 99267006105
+99270000000 99270006107
+99273000000 99273006106
+99276000000 99276006072
+99279000000 99279006102
+99282000000 99282006096
+99285000000 99285006112
+99288000000 99288006088
+99291000000 99291006100
+99294000000 99294006113
+99297000000 99297006115
+99300000000 99300006104
+99303000000 99303006046
+99306000000 99306006044
+99309000000 99309006116
+99312000000 99312006031
+99315000000 99315006105
+99318000000 99318006117
+99321000000 99321006109
+99324000000 99324006109
+99327000000 99327006068
+99330000000 99330006093
+99333000000 99333006016
+99336000000 99336006097
+99339000000 99339006109
+99342000000 99342006112
+99345000000 99345006079
+99348000000 99348006090
+99351000000 99351006108
+99354000000 99354006104
+99357000000 99357006112
+99360000000 99360006111
+99363000000 99363006105
+99366000000 99366006130
+99369000000 99369006109
+99372000000 99372006113
+99375000000 99375006098
+99378000000 99378006096
+99381000000 99381006067
+99384000000 99384006097
+99387000000 99387006105
+99390000000 99390006122
+99393000000 99393006112
+99396000000 99396006062
+99399000000 99399006116
+99402000000 99402006110
+99405000000 99405006104
+99408000000 99408006104
+99411000000 99411006118
+99414000000 99414006109
+99417000000 99417006115
+99420000000 99420006104
+99423000000 99423006054
+99426000000 99426006113
+99429000000 99429006109
+99432000000 99432006096
+99435000000 99435006107
+99438000000 99438006025
+99441000000 99441006108
+99444000000 99444006100
+99447000000 99447006101
+99450000000 99450006112
+99453000000 99453006112
+99456000000 99456006066
+99459000000 99459006121
+99462000000 99462006086
+99465000000 99465006114
+99468000000 99468006113
+99471000000 99471006107
+99474000000 99474006062
+99477000000 99477006131
+99480000000 99480006110
+99483000000 99483006118
+99486000000 99486006104
+99489000000 99489006108
+99492000000 99492006110
+99495000000 99495006100
+99498000000 99498006096
+99501000000 99501006104
+99504000000 99504006100
+99507000000 99507006106
+99510000000 99510006097
+99513000000 99513006113
+99516000000 99516006083
+99519000000 99519006104
+99522000000 99522006099
+99525000000 99525006108
+99528000000 99528006097
+99531000000 99531006121
+99534000000 99534006102
+99537000000 99537006087
+99540000000 99540006101
+99543000000 99543006104
+99546000000 99546006107
+99549000000 99549006108
+99552000000 99552006118
+99555000000 99555006107
+99558000000 99558006111
+99561000000 99561006102
+99564000000 99564006100
+99567000000 99567006102
+99570000000 99570006101
+99573000000 99573006067
+99576000000 99576006097
+99579000000 99579006091
+99582000000 99582006107
+99585000000 99585006083
+99588000000 99588006095
+99591000000 99591006108
+99594000000 99594006110
+99597000000 99597006099
+99600000000 99600006041
+99603000000 99603006039
+99606000000 99606006111
+99609000000 99609006026
+99612000000 99612006100
+99615000000 99615006112
+99618000000 99618006104
+99621000000 99621006104
+99624000000 99624006063
+99627000000 99627006088
+99630000000 99630006011
+99633000000 99633006092
+99636000000 99636006104
+99639000000 99639006107
+99642000000 99642006074
+99645000000 99645006085
+99648000000 99648006103
+99651000000 99651006099
+99654000000 99654006107
+99657000000 99657006106
+99660000000 99660006100
+99663000000 99663006125
+99666000000 99666006104
+99669000000 99669006108
+99672000000 99672006093
+99675000000 99675006091
+99678000000 99678006062
+99681000000 99681006092
+99684000000 99684006100
+99687000000 99687006117
+99690000000 99690006107
+99693000000 99693006057
+99696000000 99696006111
+99699000000 99699006105
+99702000000 99702006099
+99705000000 99705006099
+99708000000 99708006113
+99711000000 99711006104
+99714000000 99714006110
+99717000000 99717006099
+99720000000 99720006049
+99723000000 99723006108
+99726000000 99726006104
+99729000000 99729006091
+99732000000 99732006102
+99735000000 99735006020
+99738000000 99738006103
+99741000000 99741006095
+99744000000 99744006096
+99747000000 99747006107
+99750000000 99750006107
+99753000000 99753006061
+99756000000 99756006116
+99759000000 99759006081
+99762000000 99762006109
+99765000000 99765006108
+99768000000 99768006102
+99771000000 99771006057
+99774000000 99774006126
+99777000000 99777006105
+99780000000 99780006113
+99783000000 99783006099
+99786000000 99786006103
+99789000000 99789006105
+99792000000 99792006095
+99795000000 99795006091
+99798000000 99798006099
+99801000000 99801006095
+99804000000 99804006101
+99807000000 99807006092
+99810000000 99810006108
+99813000000 99813006078
+99816000000 99816006099
+99819000000 99819006094
+99822000000 99822006103
+99825000000 99825006092
+99828000000 99828006116
+99831000000 99831006097
+99834000000 99834006082
+99837000000 99837006096
+99840000000 99840006099
+99843000000 99843006102
+99846000000 99846006103
+99849000000 99849006113
+99852000000 99852006102
+99855000000 99855006106
+99858000000 99858006097
+99861000000 99861006095
+99864000000 99864006097
+99867000000 99867006096
+99870000000 99870006062
+99873000000 99873006092
+99876000000 99876006086
+99879000000 99879006102
+99882000000 99882006078
+99885000000 99885006090
+99888000000 99888006103
+99891000000 99891006105
+99894000000 99894006094
+99897000000 99897006036
+99900000000 99900006034
+99903000000 99903006106
+99906000000 99906006021
+99909000000 99909006095
+99912000000 99912006107
+99915000000 99915006099
+99918000000 99918006099
+99921000000 99921006058
+99924000000 99924006083
+99927000000 99927006006
+99930000000 99930006087
+99933000000 99933006099
+99936000000 99936006102
+99939000000 99939006069
+99942000000 99942006080
+99945000000 99945006098
+99948000000 99948006094
+99951000000 99951006102
+99954000000 99954006101
+99957000000 99957006095
+99960000000 99960006120
+99963000000 99963006099
+99966000000 99966006103
+99969000000 99969006088
+99972000000 99972006086
+99975000000 99975006057
+99978000000 99978006087
+99981000000 99981006095
+99984000000 99984006112
+99987000000 99987006102
+99990000000 99990006052
+99993000000 99993006106
+99996000000 99996006100
+99999000000 99999006094
+100002000000 100002006094
+100005000000 100005006108
+100008000000 100008006099
+100011000000 100011006105
+100014000000 100014006094
+100017000000 100017006044
+100020000000 100020006103
+100023000000 100023006099
+100026000000 100026006086
+100029000000 100029006097
+100032000000 100032006015
+100035000000 100035006098
+100038000000 100038006090
+100041000000 100041006091
+100044000000 100044006102
+100047000000 100047006102
+100050000000 100050006056
+100053000000 100053006111
+100056000000 100056006076
+100059000000 100059006104
+100062000000 100062006103
+100065000000 100065006097
+100068000000 100068006052
+100071000000 100071006121
+100074000000 100074006100
+100077000000 100077006108
+100080000000 100080006094
+100083000000 100083006098
+100086000000 100086006100
+100089000000 100089006090
+100092000000 100092006086
+100095000000 100095006094
+100098000000 100098006090
+100101000000 100101006096
+100104000000 100104006087
+100107000000 100107006103
+100110000000 100110006073
+100113000000 100113006094
+100116000000 100116006089
+100119000000 100119006098
+100122000000 100122006087
+100125000000 100125006111
+100128000000 100128006092
+100131000000 100131006077
+100134000000 100134006091
+100137000000 100137006094
+100140000000 100140006097
+100143000000 100143006098
+100146000000 100146006108
+100149000000 100149006097
+100152000000 100152006101
+100155000000 100155006092
+100158000000 100158006090
+100161000000 100161006092
+100164000000 100164006091
+100167000000 100167006057
+100170000000 100170006087
+100173000000 100173006081
+100176000000 100176006097
+100179000000 100179006073
+100182000000 100182006085
+100185000000 100185006098
+100188000000 100188006100
+100191000000 100191006089
+100194000000 100194006031
+100197000000 100197006029
+100200000000 100200006101
+100203000000 100203006016
+100206000000 100206006090
+100209000000 100209006102
+100212000000 100212006094
+100215000000 100215006094
+100218000000 100218006053
+100221000000 100221006078
+100224000000 100224006001
+100227000000 100227006082
+100230000000 100230006094
+100233000000 100233006097
+100236000000 100236006064
+100239000000 100239006075
+100242000000 100242006093
+100245000000 100245006089
+100248000000 100248006097
+100251000000 100251006096
+100254000000 100254006090
+100257000000 100257006115
+100260000000 100260006094
+100263000000 100263006098
+100266000000 100266006083
+100269000000 100269006081
+100272000000 100272006052
+100275000000 100275006082
+100278000000 100278006090
+100281000000 100281006107
+100284000000 100284006097
+100287000000 100287006047
+100290000000 100290006101
+100293000000 100293006095
+100296000000 100296006089
+100299000000 100299006089
+100302000000 100302006103
+100305000000 100305006094
+100308000000 100308006100
+100311000000 100311006089
+100314000000 100314006039
+100317000000 100317006098
+100320000000 100320006094
+100323000000 100323006081
+100326000000 100326006092
+100329000000 100329006010
+100332000000 100332006093
+100335000000 100335006085
+100338000000 100338006086
+100341000000 100341006097
+100344000000 100344006097
+100347000000 100347006051
+100350000000 100350006106
+100353000000 100353006071
+100356000000 100356006099
+100359000000 100359006098
+100362000000 100362006092
+100365000000 100365006047
+100368000000 100368006116
+100371000000 100371006095
+100374000000 100374006103
+100377000000 100377006089
+100380000000 100380006093
+100383000000 100383006095
+100386000000 100386006085
+100389000000 100389006081
+100392000000 100392006089
+100395000000 100395006085
+100398000000 100398006091
+100401000000 100401006082
+100404000000 100404006098
+100407000000 100407006068
+100410000000 100410006089
+100413000000 100413006084
+100416000000 100416006093
+100419000000 100419006082
+100422000000 100422006106
+100425000000 100425006087
+100428000000 100428006072
+100431000000 100431006086
+100434000000 100434006089
+100437000000 100437006092
+100440000000 100440006093
+100443000000 100443006103
+100446000000 100446006092
+100449000000 100449006096
+100452000000 100452006087
+100455000000 100455006085
+100458000000 100458006087
+100461000000 100461006086
+100464000000 100464006052
+100467000000 100467006082
+100470000000 100470006076
+100473000000 100473006092
+100476000000 100476006068
+100479000000 100479006080
+100482000000 100482006093
+100485000000 100485006095
+100488000000 100488006084
+100491000000 100491006026
+100494000000 100494006024
+100497000000 100497006096
+100500000000 100500006011
+100503000000 100503006085
+100506000000 100506006097
+100509000000 100509006089
+100512000000 100512006089
+100515000000 100515006048
+100518000000 100518006073
+100521000000 100521005996
+100524000000 100524006077
+100527000000 100527006089
+100530000000 100530006092
+100533000000 100533006059
+100536000000 100536006070
+100539000000 100539006088
+100542000000 100542006084
+100545000000 100545006092
+100548000000 100548006091
+100551000000 100551006085
+100554000000 100554006110
+100557000000 100557006089
+100560000000 100560006093
+100563000000 100563006078
+100566000000 100566006076
+100569000000 100569006047
+100572000000 100572006077
+100575000000 100575006085
+100578000000 100578006102
+100581000000 100581006092
+100584000000 100584006042
+100587000000 100587006096
+100590000000 100590006090
+100593000000 100593006084
+100596000000 100596006084
+100599000000 100599006098
+100602000000 100602006089
+100605000000 100605006095
+100608000000 100608006084
+100611000000 100611006034
+100614000000 100614006093
+100617000000 100617006089
+100620000000 100620006076
+100623000000 100623006087
+100626000000 100626006005
+100629000000 100629006088
+100632000000 100632006080
+100635000000 100635006081
+100638000000 100638006092
+100641000000 100641006092
+100644000000 100644006046
+100647000000 100647006101
+100650000000 100650006066
+100653000000 100653006094
+100656000000 100656006093
+100659000000 100659006087
+100662000000 100662006042
+100665000000 100665006111
+100668000000 100668006090
+100671000000 100671006098
+100674000000 100674006084
+100677000000 100677006088
+100680000000 100680006090
+100683000000 100683006080
+100686000000 100686006076
+100689000000 100689006084
+100692000000 100692006080
+100695000000 100695006086
+100698000000 100698006077
+100701000000 100701006093
+100704000000 100704006063
+100707000000 100707006084
+100710000000 100710006079
+100713000000 100713006088
+100716000000 100716006077
+100719000000 100719006101
+100722000000 100722006082
+100725000000 100725006067
+100728000000 100728006081
+100731000000 100731006084
+100734000000 100734006087
+100737000000 100737006088
+100740000000 100740006098
+100743000000 100743006087
+100746000000 100746006091
+100749000000 100749006082
+100752000000 100752006080
+100755000000 100755006082
+100758000000 100758006081
+100761000000 100761006047
+100764000000 100764006077
+100767000000 100767006071
+100770000000 100770006087
+100773000000 100773006063
+100776000000 100776006075
+100779000000 100779006088
+100782000000 100782006090
+100785000000 100785006079
+100788000000 100788006021
+100791000000 100791006019
+100794000000 100794006091
+100797000000 100797006006
+100800000000 100800006080
+100803000000 100803006092
+100806000000 100806006084
+100809000000 100809006084
+100812000000 100812006043
+100815000000 100815006068
+100818000000 100818005991
+100821000000 100821006072
+100824000000 100824006084
+100827000000 100827006087
+100830000000 100830006054
+100833000000 100833006065
+100836000000 100836006083
+100839000000 100839006079
+100842000000 100842006087
+100845000000 100845006086
+100848000000 100848006080
+100851000000 100851006105
+100854000000 100854006084
+100857000000 100857006088
+100860000000 100860006073
+100863000000 100863006071
+100866000000 100866006042
+100869000000 100869006072
+100872000000 100872006080
+100875000000 100875006097
+100878000000 100878006087
+100881000000 100881006037
+100884000000 100884006091
+100887000000 100887006085
+100890000000 100890006079
+100893000000 100893006079
+100896000000 100896006093
+100899000000 100899006084
+100902000000 100902006090
+100905000000 100905006079
+100908000000 100908006029
+100911000000 100911006088
+100914000000 100914006084
+100917000000 100917006071
+100920000000 100920006082
+100923000000 100923006000
+100926000000 100926006083
+100929000000 100929006075
+100932000000 100932006076
+100935000000 100935006087
+100938000000 100938006087
+100941000000 100941006041
+100944000000 100944006096
+100947000000 100947006061
+100950000000 100950006089
+100953000000 100953006088
+100956000000 100956006082
+100959000000 100959006037
+100962000000 100962006106
+100965000000 100965006085
+100968000000 100968006093
+100971000000 100971006079
+100974000000 100974006083
+100977000000 100977006085
+100980000000 100980006075
+100983000000 100983006071
+100986000000 100986006079
+100989000000 100989006075
+100992000000 100992006081
+100995000000 100995006072
+100998000000 100998006088
+101001000000 101001006058
+101004000000 101004006079
+101007000000 101007006074
+101010000000 101010006083
+101013000000 101013006072
+101016000000 101016006096
+101019000000 101019006077
+101022000000 101022006062
+101025000000 101025006076
+101028000000 101028006079
+101031000000 101031006082
+101034000000 101034006083
+101037000000 101037006093
+101040000000 101040006082
+101043000000 101043006086
+101046000000 101046006077
+101049000000 101049006075
+101052000000 101052006077
+101055000000 101055006076
+101058000000 101058006042
+101061000000 101061006072
+101064000000 101064006066
+101067000000 101067006082
+101070000000 101070006058
+101073000000 101073006070
+101076000000 101076006083
+101079000000 101079006085
+101082000000 101082006074
+101085000000 101085006016
+101088000000 101088006014
+101091000000 101091006086
+101094000000 101094006001
+101097000000 101097006075
+101100000000 101100006087
+101103000000 101103006079
+101106000000 101106006079
+101109000000 101109006038
+101112000000 101112006063
+101115000000 101115005986
+101118000000 101118006067
+101121000000 101121006079
+101124000000 101124006082
+101127000000 101127006049
+101130000000 101130006060
+101133000000 101133006078
+101136000000 101136006074
+101139000000 101139006082
+101142000000 101142006081
+101145000000 101145006075
+101148000000 101148006100
+101151000000 101151006079
+101154000000 101154006083
+101157000000 101157006068
+101160000000 101160006066
+101163000000 101163006037
+101166000000 101166006067
+101169000000 101169006075
+101172000000 101172006092
+101175000000 101175006082
+101178000000 101178006032
+101181000000 101181006086
+101184000000 101184006080
+101187000000 101187006074
+101190000000 101190006074
+101193000000 101193006088
+101196000000 101196006079
+101199000000 101199006085
+101202000000 101202006074
+101205000000 101205006024
+101208000000 101208006083
+101211000000 101211006079
+101214000000 101214006066
+101217000000 101217006077
+101220000000 101220005995
+101223000000 101223006078
+101226000000 101226006070
+101229000000 101229006071
+101232000000 101232006082
+101235000000 101235006082
+101238000000 101238006036
+101241000000 101241006091
+101244000000 101244006056
+101247000000 101247006084
+101250000000 101250006083
+101253000000 101253006077
+101256000000 101256006032
+101259000000 101259006101
+101262000000 101262006080
+101265000000 101265006088
+101268000000 101268006074
+101271000000 101271006078
+101274000000 101274006080
+101277000000 101277006070
+101280000000 101280006066
+101283000000 101283006074
+101286000000 101286006070
+101289000000 101289006076
+101292000000 101292006067
+101295000000 101295006083
+101298000000 101298006053
+101301000000 101301006074
+101304000000 101304006069
+101307000000 101307006078
+101310000000 101310006067
+101313000000 101313006091
+101316000000 101316006072
+101319000000 101319006057
+101322000000 101322006071
+101325000000 101325006074
+101328000000 101328006077
+101331000000 101331006078
+101334000000 101334006088
+101337000000 101337006077
+101340000000 101340006081
+101343000000 101343006072
+101346000000 101346006070
+101349000000 101349006072
+101352000000 101352006071
+101355000000 101355006037
+101358000000 101358006067
+101361000000 101361006061
+101364000000 101364006077
+101367000000 101367006053
+101370000000 101370006065
+101373000000 101373006078
+101376000000 101376006080
+101379000000 101379006069
+101382000000 101382006011
+101385000000 101385006009
+101388000000 101388006081
+101391000000 101391005996
+101394000000 101394006070
+101397000000 101397006082
+101400000000 101400006074
+101403000000 101403006074
+101406000000 101406006033
+101409000000 101409006058
+101412000000 101412005981
+101415000000 101415006062
+101418000000 101418006074
+101421000000 101421006077
+101424000000 101424006044
+101427000000 101427006055
+101430000000 101430006073
+101433000000 101433006069
+101436000000 101436006077
+101439000000 101439006076
+101442000000 101442006070
+101445000000 101445006095
+101448000000 101448006074
+101451000000 101451006078
+101454000000 101454006063
+101457000000 101457006061
+101460000000 101460006032
+101463000000 101463006062
+101466000000 101466006070
+101469000000 101469006087
+101472000000 101472006077
+101475000000 101475006027
+101478000000 101478006081
+101481000000 101481006075
+101484000000 101484006069
+101487000000 101487006069
+101490000000 101490006083
+101493000000 101493006074
+101496000000 101496006080
+101499000000 101499006069
+101502000000 101502006019
+101505000000 101505006078
+101508000000 101508006074
+101511000000 101511006061
+101514000000 101514006072
+101517000000 101517005990
+101520000000 101520006073
+101523000000 101523006065
+101526000000 101526006066
+101529000000 101529006077
+101532000000 101532006077
+101535000000 101535006031
+101538000000 101538006086
+101541000000 101541006051
+101544000000 101544006079
+101547000000 101547006078
+101550000000 101550006072
+101553000000 101553006027
+101556000000 101556006096
+101559000000 101559006075
+101562000000 101562006083
+101565000000 101565006069
+101568000000 101568006073
+101571000000 101571006075
+101574000000 101574006065
+101577000000 101577006061
+101580000000 101580006069
+101583000000 101583006065
+101586000000 101586006071
+101589000000 101589006062
+101592000000 101592006078
+101595000000 101595006048
+101598000000 101598006069
+101601000000 101601006064
+101604000000 101604006073
+101607000000 101607006062
+101610000000 101610006086
+101613000000 101613006067
+101616000000 101616006052
+101619000000 101619006066
+101622000000 101622006069
+101625000000 101625006072
+101628000000 101628006073
+101631000000 101631006083
+101634000000 101634006072
+101637000000 101637006076
+101640000000 101640006067
+101643000000 101643006065
+101646000000 101646006067
+101649000000 101649006066
+101652000000 101652006032
+101655000000 101655006062
+101658000000 101658006056
+101661000000 101661006072
+101664000000 101664006048
+101667000000 101667006060
+101670000000 101670006073
+101673000000 101673006075
+101676000000 101676006064
+101679000000 101679006006
+101682000000 101682006004
+101685000000 101685006076
+101688000000 101688005991
+101691000000 101691006065
+101694000000 101694006077
+101697000000 101697006069
+101700000000 101700006069
+101703000000 101703006028
+101706000000 101706006053
+101709000000 101709005976
+101712000000 101712006057
+101715000000 101715006069
+101718000000 101718006072
+101721000000 101721006039
+101724000000 101724006050
+101727000000 101727006068
+101730000000 101730006064
+101733000000 101733006072
+101736000000 101736006071
+101739000000 101739006065
+101742000000 101742006090
+101745000000 101745006069
+101748000000 101748006073
+101751000000 101751006058
+101754000000 101754006056
+101757000000 101757006027
+101760000000 101760006057
+101763000000 101763006065
+101766000000 101766006082
+101769000000 101769006072
+101772000000 101772006022
+101775000000 101775006076
+101778000000 101778006070
+101781000000 101781006064
+101784000000 101784006064
+101787000000 101787006078
+101790000000 101790006069
+101793000000 101793006075
+101796000000 101796006064
+101799000000 101799006014
+101802000000 101802006073
+101805000000 101805006069
+101808000000 101808006056
+101811000000 101811006067
+101814000000 101814005985
+101817000000 101817006068
+101820000000 101820006060
+101823000000 101823006061
+101826000000 101826006072
+101829000000 101829006072
+101832000000 101832006026
+101835000000 101835006081
+101838000000 101838006046
+101841000000 101841006074
+101844000000 101844006073
+101847000000 101847006067
+101850000000 101850006022
+101853000000 101853006091
+101856000000 101856006070
+101859000000 101859006078
+101862000000 101862006064
+101865000000 101865006068
+101868000000 101868006070
+101871000000 101871006060
+101874000000 101874006056
+101877000000 101877006064
+101880000000 101880006060
+101883000000 101883006066
+101886000000 101886006057
+101889000000 101889006073
+101892000000 101892006043
+101895000000 101895006064
+101898000000 101898006059
+101901000000 101901006068
+101904000000 101904006057
+101907000000 101907006081
+101910000000 101910006062
+101913000000 101913006047
+101916000000 101916006061
+101919000000 101919006064
+101922000000 101922006067
+101925000000 101925006068
+101928000000 101928006078
+101931000000 101931006067
+101934000000 101934006071
+101937000000 101937006062
+101940000000 101940006060
+101943000000 101943006062
+101946000000 101946006061
+101949000000 101949006027
+101952000000 101952006057
+101955000000 101955006051
+101958000000 101958006067
+101961000000 101961006043
+101964000000 101964006055
+101967000000 101967006068
+101970000000 101970006070
+101973000000 101973006059
+101976000000 101976006001
+101979000000 101979005999
+101982000000 101982006071
+101985000000 101985005986
+101988000000 101988006060
+101991000000 101991006072
+101994000000 101994006064
+101997000000 101997006064
+102000000000 102000006023
+102003000000 102003006048
+102006000000 102006005971
+102009000000 102009006052
+102012000000 102012006064
+102015000000 102015006067
+102018000000 102018006034
+102021000000 102021006045
+102024000000 102024006063
+102027000000 102027006059
+102030000000 102030006067
+102033000000 102033006066
+102036000000 102036006060
+102039000000 102039006085
+102042000000 102042006064
+102045000000 102045006068
+102048000000 102048006053
+102051000000 102051006051
+102054000000 102054006022
+102057000000 102057006052
+102060000000 102060006060
+102063000000 102063006077
+102066000000 102066006067
+102069000000 102069006017
+102072000000 102072006071
+102075000000 102075006065
+102078000000 102078006059
+102081000000 102081006059
+102084000000 102084006073
+102087000000 102087006064
+102090000000 102090006070
+102093000000 102093006059
+102096000000 102096006009
+102099000000 102099006068
+102102000000 102102006064
+102105000000 102105006051
+102108000000 102108006062
+102111000000 102111005980
+102114000000 102114006063
+102117000000 102117006055
+102120000000 102120006056
+102123000000 102123006067
+102126000000 102126006067
+102129000000 102129006021
+102132000000 102132006076
+102135000000 102135006041
+102138000000 102138006069
+102141000000 102141006068
+102144000000 102144006062
+102147000000 102147006017
+102150000000 102150006086
+102153000000 102153006065
+102156000000 102156006073
+102159000000 102159006059
+102162000000 102162006063
+102165000000 102165006065
+102168000000 102168006055
+102171000000 102171006051
+102174000000 102174006059
+102177000000 102177006055
+102180000000 102180006061
+102183000000 102183006052
+102186000000 102186006068
+102189000000 102189006038
+102192000000 102192006059
+102195000000 102195006054
+102198000000 102198006063
+102201000000 102201006052
+102204000000 102204006076
+102207000000 102207006057
+102210000000 102210006042
+102213000000 102213006056
+102216000000 102216006059
+102219000000 102219006062
+102222000000 102222006063
+102225000000 102225006073
+102228000000 102228006062
+102231000000 102231006066
+102234000000 102234006057
+102237000000 102237006055
+102240000000 102240006057
+102243000000 102243006056
+102246000000 102246006022
+102249000000 102249006052
+102252000000 102252006046
+102255000000 102255006062
+102258000000 102258006038
+102261000000 102261006050
+102264000000 102264006063
+102267000000 102267006065
+102270000000 102270006054
+102273000000 102273005996
+102276000000 102276005994
+102279000000 102279006066
+102282000000 102282005981
+102285000000 102285006055
+102288000000 102288006067
+102291000000 102291006059
+102294000000 102294006059
+102297000000 102297006018
+102300000000 102300006043
+102303000000 102303005966
+102306000000 102306006047
+102309000000 102309006059
+102312000000 102312006062
+102315000000 102315006029
+102318000000 102318006040
+102321000000 102321006058
+102324000000 102324006054
+102327000000 102327006062
+102330000000 102330006061
+102333000000 102333006055
+102336000000 102336006080
+102339000000 102339006059
+102342000000 102342006063
+102345000000 102345006048
+102348000000 102348006046
+102351000000 102351006017
+102354000000 102354006047
+102357000000 102357006055
+102360000000 102360006072
+102363000000 102363006062
+102366000000 102366006012
+102369000000 102369006066
+102372000000 102372006060
+102375000000 102375006054
+102378000000 102378006054
+102381000000 102381006068
+102384000000 102384006059
+102387000000 102387006065
+102390000000 102390006054
+102393000000 102393006004
+102396000000 102396006063
+102399000000 102399006059
+102402000000 102402006046
+102405000000 102405006057
+102408000000 102408005975
+102411000000 102411006058
+102414000000 102414006050
+102417000000 102417006051
+102420000000 102420006062
+102423000000 102423006062
+102426000000 102426006016
+102429000000 102429006071
+102432000000 102432006036
+102435000000 102435006064
+102438000000 102438006063
+102441000000 102441006057
+102444000000 102444006012
+102447000000 102447006081
+102450000000 102450006060
+102453000000 102453006068
+102456000000 102456006054
+102459000000 102459006058
+102462000000 102462006060
+102465000000 102465006050
+102468000000 102468006046
+102471000000 102471006054
+102474000000 102474006050
+102477000000 102477006056
+102480000000 102480006047
+102483000000 102483006063
+102486000000 102486006033
+102489000000 102489006054
+102492000000 102492006049
+102495000000 102495006058
+102498000000 102498006047
+102501000000 102501006071
+102504000000 102504006052
+102507000000 102507006037
+102510000000 102510006051
+102513000000 102513006054
+102516000000 102516006057
+102519000000 102519006058
+102522000000 102522006068
+102525000000 102525006057
+102528000000 102528006061
+102531000000 102531006052
+102534000000 102534006050
+102537000000 102537006052
+102540000000 102540006051
+102543000000 102543006017
+102546000000 102546006047
+102549000000 102549006041
+102552000000 102552006057
+102555000000 102555006033
+102558000000 102558006045
+102561000000 102561006058
+102564000000 102564006060
+102567000000 102567006049
+102570000000 102570005991
+102573000000 102573005989
+102576000000 102576006061
+102579000000 102579005976
+102582000000 102582006050
+102585000000 102585006062
+102588000000 102588006054
+102591000000 102591006054
+102594000000 102594006013
+102597000000 102597006038
+102600000000 102600005961
+102603000000 102603006042
+102606000000 102606006054
+102609000000 102609006057
+102612000000 102612006024
+102615000000 102615006035
+102618000000 102618006053
+102621000000 102621006049
+102624000000 102624006057
+102627000000 102627006056
+102630000000 102630006050
+102633000000 102633006075
+102636000000 102636006054
+102639000000 102639006058
+102642000000 102642006043
+102645000000 102645006041
+102648000000 102648006012
+102651000000 102651006042
+102654000000 102654006050
+102657000000 102657006067
+102660000000 102660006057
+102663000000 102663006007
+102666000000 102666006061
+102669000000 102669006055
+102672000000 102672006049
+102675000000 102675006049
+102678000000 102678006063
+102681000000 102681006054
+102684000000 102684006060
+102687000000 102687006049
+102690000000 102690005999
+102693000000 102693006058
+102696000000 102696006054
+102699000000 102699006041
+102702000000 102702006052
+102705000000 102705005970
+102708000000 102708006053
+102711000000 102711006045
+102714000000 102714006046
+102717000000 102717006057
+102720000000 102720006057
+102723000000 102723006011
+102726000000 102726006066
+102729000000 102729006031
+102732000000 102732006059
+102735000000 102735006058
+102738000000 102738006052
+102741000000 102741006007
+102744000000 102744006076
+102747000000 102747006055
+102750000000 102750006063
+102753000000 102753006049
+102756000000 102756006053
+102759000000 102759006055
+102762000000 102762006045
+102765000000 102765006041
+102768000000 102768006049
+102771000000 102771006045
+102774000000 102774006051
+102777000000 102777006042
+102780000000 102780006058
+102783000000 102783006028
+102786000000 102786006049
+102789000000 102789006044
+102792000000 102792006053
+102795000000 102795006042
+102798000000 102798006066
+102801000000 102801006047
+102804000000 102804006032
+102807000000 102807006046
+102810000000 102810006049
+102813000000 102813006052
+102816000000 102816006053
+102819000000 102819006063
+102822000000 102822006052
+102825000000 102825006056
+102828000000 102828006047
+102831000000 102831006045
+102834000000 102834006047
+102837000000 102837006046
+102840000000 102840006012
+102843000000 102843006042
+102846000000 102846006036
+102849000000 102849006052
+102852000000 102852006028
+102855000000 102855006040
+102858000000 102858006053
+102861000000 102861006055
+102864000000 102864006044
+102867000000 102867005986
+102870000000 102870005984
+102873000000 102873006056
+102876000000 102876005971
+102879000000 102879006045
+102882000000 102882006057
+102885000000 102885006049
+102888000000 102888006049
+102891000000 102891006008
+102894000000 102894006033
+102897000000 102897005956
+102900000000 102900006037
+102903000000 102903006049
+102906000000 102906006052
+102909000000 102909006019
+102912000000 102912006030
+102915000000 102915006048
+102918000000 102918006044
+102921000000 102921006052
+102924000000 102924006051
+102927000000 102927006045
+102930000000 102930006070
+102933000000 102933006049
+102936000000 102936006053
+102939000000 102939006038
+102942000000 102942006036
+102945000000 102945006007
+102948000000 102948006037
+102951000000 102951006045
+102954000000 102954006062
+102957000000 102957006052
+102960000000 102960006002
+102963000000 102963006056
+102966000000 102966006050
+102969000000 102969006044
+102972000000 102972006044
+102975000000 102975006058
+102978000000 102978006049
+102981000000 102981006055
+102984000000 102984006044
+102987000000 102987005994
+102990000000 102990006053
+102993000000 102993006049
+102996000000 102996006036
+102999000000 102999006047
+103002000000 103002005965
+103005000000 103005006048
+103008000000 103008006040
+103011000000 103011006041
+103014000000 103014006052
+103017000000 103017006052
+103020000000 103020006006
+103023000000 103023006061
+103026000000 103026006026
+103029000000 103029006054
+103032000000 103032006053
+103035000000 103035006047
+103038000000 103038006002
+103041000000 103041006071
+103044000000 103044006050
+103047000000 103047006058
+103050000000 103050006044
+103053000000 103053006048
+103056000000 103056006050
+103059000000 103059006040
+103062000000 103062006036
+103065000000 103065006044
+103068000000 103068006040
+103071000000 103071006046
+103074000000 103074006037
+103077000000 103077006053
+103080000000 103080006023
+103083000000 103083006044
+103086000000 103086006039
+103089000000 103089006048
+103092000000 103092006037
+103095000000 103095006061
+103098000000 103098006042
+103101000000 103101006027
+103104000000 103104006041
+103107000000 103107006044
+103110000000 103110006047
+103113000000 103113006048
+103116000000 103116006058
+103119000000 103119006047
+103122000000 103122006051
+103125000000 103125006042
+103128000000 103128006040
+103131000000 103131006042
+103134000000 103134006041
+103137000000 103137006007
+103140000000 103140006037
+103143000000 103143006031
+103146000000 103146006047
+103149000000 103149006023
+103152000000 103152006035
+103155000000 103155006048
+103158000000 103158006050
+103161000000 103161006039
+103164000000 103164005981
+103167000000 103167005979
+103170000000 103170006051
+103173000000 103173005966
+103176000000 103176006040
+103179000000 103179006052
+103182000000 103182006044
+103185000000 103185006044
+103188000000 103188006003
+103191000000 103191006028
+103194000000 103194005951
+103197000000 103197006032
+103200000000 103200006044
+103203000000 103203006047
+103206000000 103206006014
+103209000000 103209006025
+103212000000 103212006043
+103215000000 103215006039
+103218000000 103218006047
+103221000000 103221006046
+103224000000 103224006040
+103227000000 103227006065
+103230000000 103230006044
+103233000000 103233006048
+103236000000 103236006033
+103239000000 103239006031
+103242000000 103242006002
+103245000000 103245006032
+103248000000 103248006040
+103251000000 103251006057
+103254000000 103254006047
+103257000000 103257005997
+103260000000 103260006051
+103263000000 103263006045
+103266000000 103266006039
+103269000000 103269006039
+103272000000 103272006053
+103275000000 103275006044
+103278000000 103278006050
+103281000000 103281006039
+103284000000 103284005989
+103287000000 103287006048
+103290000000 103290006044
+103293000000 103293006031
+103296000000 103296006042
+103299000000 103299005960
+103302000000 103302006043
+103305000000 103305006035
+103308000000 103308006036
+103311000000 103311006047
+103314000000 103314006047
+103317000000 103317006001
+103320000000 103320006056
+103323000000 103323006021
+103326000000 103326006049
+103329000000 103329006048
+103332000000 103332006042
+103335000000 103335005997
+103338000000 103338006066
+103341000000 103341006045
+103344000000 103344006053
+103347000000 103347006039
+103350000000 103350006043
+103353000000 103353006045
+103356000000 103356006035
+103359000000 103359006031
+103362000000 103362006039
+103365000000 103365006035
+103368000000 103368006041
+103371000000 103371006032
+103374000000 103374006048
+103377000000 103377006018
+103380000000 103380006039
+103383000000 103383006034
+103386000000 103386006043
+103389000000 103389006032
+103392000000 103392006056
+103395000000 103395006037
+103398000000 103398006022
+103401000000 103401006036
+103404000000 103404006039
+103407000000 103407006042
+103410000000 103410006043
+103413000000 103413006053
+103416000000 103416006042
+103419000000 103419006046
+103422000000 103422006037
+103425000000 103425006035
+103428000000 103428006037
+103431000000 103431006036
+103434000000 103434006002
+103437000000 103437006032
+103440000000 103440006026
+103443000000 103443006042
+103446000000 103446006018
+103449000000 103449006030
+103452000000 103452006043
+103455000000 103455006045
+103458000000 103458006034
+103461000000 103461005976
+103464000000 103464005974
+103467000000 103467006046
+103470000000 103470005961
+103473000000 103473006035
+103476000000 103476006047
+103479000000 103479006039
+103482000000 103482006039
+103485000000 103485005998
+103488000000 103488006023
+103491000000 103491005946
+103494000000 103494006027
+103497000000 103497006039
+103500000000 103500006042
+103503000000 103503006009
+103506000000 103506006020
+103509000000 103509006038
+103512000000 103512006034
+103515000000 103515006042
+103518000000 103518006041
+103521000000 103521006035
+103524000000 103524006060
+103527000000 103527006039
+103530000000 103530006043
+103533000000 103533006028
+103536000000 103536006026
+103539000000 103539005997
+103542000000 103542006027
+103545000000 103545006035
+103548000000 103548006052
+103551000000 103551006042
+103554000000 103554005992
+103557000000 103557006046
+103560000000 103560006040
+103563000000 103563006034
+103566000000 103566006034
+103569000000 103569006048
+103572000000 103572006039
+103575000000 103575006045
+103578000000 103578006034
+103581000000 103581005984
+103584000000 103584006043
+103587000000 103587006039
+103590000000 103590006026
+103593000000 103593006037
+103596000000 103596005955
+103599000000 103599006038
+103602000000 103602006030
+103605000000 103605006031
+103608000000 103608006042
+103611000000 103611006042
+103614000000 103614005996
+103617000000 103617006051
+103620000000 103620006016
+103623000000 103623006044
+103626000000 103626006043
+103629000000 103629006037
+103632000000 103632005992
+103635000000 103635006061
+103638000000 103638006040
+103641000000 103641006048
+103644000000 103644006034
+103647000000 103647006038
+103650000000 103650006040
+103653000000 103653006030
+103656000000 103656006026
+103659000000 103659006034
+103662000000 103662006030
+103665000000 103665006036
+103668000000 103668006027
+103671000000 103671006043
+103674000000 103674006013
+103677000000 103677006034
+103680000000 103680006029
+103683000000 103683006038
+103686000000 103686006027
+103689000000 103689006051
+103692000000 103692006032
+103695000000 103695006017
+103698000000 103698006031
+103701000000 103701006034
+103704000000 103704006037
+103707000000 103707006038
+103710000000 103710006048
+103713000000 103713006037
+103716000000 103716006041
+103719000000 103719006032
+103722000000 103722006030
+103725000000 103725006032
+103728000000 103728006031
+103731000000 103731005997
+103734000000 103734006027
+103737000000 103737006021
+103740000000 103740006037
+103743000000 103743006013
+103746000000 103746006025
+103749000000 103749006038
+103752000000 103752006040
+103755000000 103755006029
+103758000000 103758005971
+103761000000 103761005969
+103764000000 103764006041
+103767000000 103767005956
+103770000000 103770006030
+103773000000 103773006042
+103776000000 103776006034
+103779000000 103779006034
+103782000000 103782005993
+103785000000 103785006018
+103788000000 103788005941
+103791000000 103791006022
+103794000000 103794006034
+103797000000 103797006037
+103800000000 103800006004
+103803000000 103803006015
+103806000000 103806006033
+103809000000 103809006029
+103812000000 103812006037
+103815000000 103815006036
+103818000000 103818006030
+103821000000 103821006055
+103824000000 103824006034
+103827000000 103827006038
+103830000000 103830006023
+103833000000 103833006021
+103836000000 103836005992
+103839000000 103839006022
+103842000000 103842006030
+103845000000 103845006047
+103848000000 103848006037
+103851000000 103851005987
+103854000000 103854006041
+103857000000 103857006035
+103860000000 103860006029
+103863000000 103863006029
+103866000000 103866006043
+103869000000 103869006034
+103872000000 103872006040
+103875000000 103875006029
+103878000000 103878005979
+103881000000 103881006038
+103884000000 103884006034
+103887000000 103887006021
+103890000000 103890006032
+103893000000 103893005950
+103896000000 103896006033
+103899000000 103899006025
+103902000000 103902006026
+103905000000 103905006037
+103908000000 103908006037
+103911000000 103911005991
+103914000000 103914006046
+103917000000 103917006011
+103920000000 103920006039
+103923000000 103923006038
+103926000000 103926006032
+103929000000 103929005987
+103932000000 103932006056
+103935000000 103935006035
+103938000000 103938006043
+103941000000 103941006029
+103944000000 103944006033
+103947000000 103947006035
+103950000000 103950006025
+103953000000 103953006021
+103956000000 103956006029
+103959000000 103959006025
+103962000000 103962006031
+103965000000 103965006022
+103968000000 103968006038
+103971000000 103971006008
+103974000000 103974006029
+103977000000 103977006024
+103980000000 103980006033
+103983000000 103983006022
+103986000000 103986006046
+103989000000 103989006027
+103992000000 103992006012
+103995000000 103995006026
+103998000000 103998006029
+104001000000 104001006032
+104004000000 104004006033
+104007000000 104007006043
+104010000000 104010006032
+104013000000 104013006036
+104016000000 104016006027
+104019000000 104019006025
+104022000000 104022006027
+104025000000 104025006026
+104028000000 104028005992
+104031000000 104031006022
+104034000000 104034006016
+104037000000 104037006032
+104040000000 104040006008
+104043000000 104043006020
+104046000000 104046006033
+104049000000 104049006035
+104052000000 104052006024
+104055000000 104055005966
+104058000000 104058005964
+104061000000 104061006036
+104064000000 104064005951
+104067000000 104067006025
+104070000000 104070006037
+104073000000 104073006029
+104076000000 104076006029
+104079000000 104079005988
+104082000000 104082006013
+104085000000 104085005936
+104088000000 104088006017
+104091000000 104091006029
+104094000000 104094006032
+104097000000 104097005999
+104100000000 104100006010
+104103000000 104103006028
+104106000000 104106006024
+104109000000 104109006032
+104112000000 104112006031
+104115000000 104115006025
+104118000000 104118006050
+104121000000 104121006029
+104124000000 104124006033
+104127000000 104127006018
+104130000000 104130006016
+104133000000 104133005987
+104136000000 104136006017
+104139000000 104139006025
+104142000000 104142006042
+104145000000 104145006032
+104148000000 104148005982
+104151000000 104151006036
+104154000000 104154006030
+104157000000 104157006024
+104160000000 104160006024
+104163000000 104163006038
+104166000000 104166006029
+104169000000 104169006035
+104172000000 104172006024
+104175000000 104175005974
+104178000000 104178006033
+104181000000 104181006029
+104184000000 104184006016
+104187000000 104187006027
+104190000000 104190005945
+104193000000 104193006028
+104196000000 104196006020
+104199000000 104199006021
+104202000000 104202006032
+104205000000 104205006032
+104208000000 104208005986
+104211000000 104211006041
+104214000000 104214006006
+104217000000 104217006034
+104220000000 104220006033
+104223000000 104223006027
+104226000000 104226005982
+104229000000 104229006051
+104232000000 104232006030
+104235000000 104235006038
+104238000000 104238006024
+104241000000 104241006028
+104244000000 104244006030
+104247000000 104247006020
+104250000000 104250006016
+104253000000 104253006024
+104256000000 104256006020
+104259000000 104259006026
+104262000000 104262006017
+104265000000 104265006033
+104268000000 104268006003
+104271000000 104271006024
+104274000000 104274006019
+104277000000 104277006028
+104280000000 104280006017
+104283000000 104283006041
+104286000000 104286006022
+104289000000 104289006007
+104292000000 104292006021
+104295000000 104295006024
+104298000000 104298006027
+104301000000 104301006028
+104304000000 104304006038
+104307000000 104307006027
+104310000000 104310006031
+104313000000 104313006022
+104316000000 104316006020
+104319000000 104319006022
+104322000000 104322006021
+104325000000 104325005987
+104328000000 104328006017
+104331000000 104331006011
+104334000000 104334006027
+104337000000 104337006003
+104340000000 104340006015
+104343000000 104343006028
+104346000000 104346006030
+104349000000 104349006019
+104352000000 104352005961
+104355000000 104355005959
+104358000000 104358006031
+104361000000 104361005946
+104364000000 104364006020
+104367000000 104367006032
+104370000000 104370006024
+104373000000 104373006024
+104376000000 104376005983
+104379000000 104379006008
+104382000000 104382005931
+104385000000 104385006012
+104388000000 104388006024
+104391000000 104391006027
+104394000000 104394005994
+104397000000 104397006005
+104400000000 104400006023
+104403000000 104403006019
+104406000000 104406006027
+104409000000 104409006026
+104412000000 104412006020
+104415000000 104415006045
+104418000000 104418006024
+104421000000 104421006028
+104424000000 104424006013
+104427000000 104427006011
+104430000000 104430005982
+104433000000 104433006012
+104436000000 104436006020
+104439000000 104439006037
+104442000000 104442006027
+104445000000 104445005977
+104448000000 104448006031
+104451000000 104451006025
+104454000000 104454006019
+104457000000 104457006019
+104460000000 104460006033
+104463000000 104463006024
+104466000000 104466006030
+104469000000 104469006019
+104472000000 104472005969
+104475000000 104475006028
+104478000000 104478006024
+104481000000 104481006011
+104484000000 104484006022
+104487000000 104487005940
+104490000000 104490006023
+104493000000 104493006015
+104496000000 104496006016
+104499000000 104499006027
+104502000000 104502006027
+104505000000 104505005981
+104508000000 104508006036
+104511000000 104511006001
+104514000000 104514006029
+104517000000 104517006028
+104520000000 104520006022
+104523000000 104523005977
+104526000000 104526006046
+104529000000 104529006025
+104532000000 104532006033
+104535000000 104535006019
+104538000000 104538006023
+104541000000 104541006025
+104544000000 104544006015
+104547000000 104547006011
+104550000000 104550006019
+104553000000 104553006015
+104556000000 104556006021
+104559000000 104559006012
+104562000000 104562006028
+104565000000 104565005998
+104568000000 104568006019
+104571000000 104571006014
+104574000000 104574006023
+104577000000 104577006012
+104580000000 104580006036
+104583000000 104583006017
+104586000000 104586006002
+104589000000 104589006016
+104592000000 104592006019
+104595000000 104595006022
+104598000000 104598006023
+104601000000 104601006033
+104604000000 104604006022
+104607000000 104607006026
+104610000000 104610006017
+104613000000 104613006015
+104616000000 104616006017
+104619000000 104619006016
+104622000000 104622005982
+104625000000 104625006012
+104628000000 104628006006
+104631000000 104631006022
+104634000000 104634005998
+104637000000 104637006010
+104640000000 104640006023
+104643000000 104643006025
+104646000000 104646006014
+104649000000 104649005956
+104652000000 104652005954
+104655000000 104655006026
+104658000000 104658005941
+104661000000 104661006015
+104664000000 104664006027
+104667000000 104667006019
+104670000000 104670006019
+104673000000 104673005978
+104676000000 104676006003
+104679000000 104679005926
+104682000000 104682006007
+104685000000 104685006019
+104688000000 104688006022
+104691000000 104691005989
+104694000000 104694006000
+104697000000 104697006018
+104700000000 104700006014
+104703000000 104703006022
+104706000000 104706006021
+104709000000 104709006015
+104712000000 104712006040
+104715000000 104715006019
+104718000000 104718006023
+104721000000 104721006008
+104724000000 104724006006
+104727000000 104727005977
+104730000000 104730006007
+104733000000 104733006015
+104736000000 104736006032
+104739000000 104739006022
+104742000000 104742005972
+104745000000 104745006026
+104748000000 104748006020
+104751000000 104751006014
+104754000000 104754006014
+104757000000 104757006028
+104760000000 104760006019
+104763000000 104763006025
+104766000000 104766006014
+104769000000 104769005964
+104772000000 104772006023
+104775000000 104775006019
+104778000000 104778006006
+104781000000 104781006017
+104784000000 104784005935
+104787000000 104787006018
+104790000000 104790006010
+104793000000 104793006011
+104796000000 104796006022
+104799000000 104799006022
+104802000000 104802005976
+104805000000 104805006031
+104808000000 104808005996
+104811000000 104811006024
+104814000000 104814006023
+104817000000 104817006017
+104820000000 104820005972
+104823000000 104823006041
+104826000000 104826006020
+104829000000 104829006028
+104832000000 104832006014
+104835000000 104835006018
+104838000000 104838006020
+104841000000 104841006010
+104844000000 104844006006
+104847000000 104847006014
+104850000000 104850006010
+104853000000 104853006016
+104856000000 104856006007
+104859000000 104859006023
+104862000000 104862005993
+104865000000 104865006014
+104868000000 104868006009
+104871000000 104871006018
+104874000000 104874006007
+104877000000 104877006031
+104880000000 104880006012
+104883000000 104883005997
+104886000000 104886006011
+104889000000 104889006014
+104892000000 104892006017
+104895000000 104895006018
+104898000000 104898006028
+104901000000 104901006017
+104904000000 104904006021
+104907000000 104907006012
+104910000000 104910006010
+104913000000 104913006012
+104916000000 104916006011
+104919000000 104919005977
+104922000000 104922006007
+104925000000 104925006001
+104928000000 104928006017
+104931000000 104931005993
+104934000000 104934006005
+104937000000 104937006018
+104940000000 104940006020
+104943000000 104943006009
+104946000000 104946005951
+104949000000 104949005949
+104952000000 104952006021
+104955000000 104955005936
+104958000000 104958006010
+104961000000 104961006022
+104964000000 104964006014
+104967000000 104967006014
+104970000000 104970005973
+104973000000 104973005998
+104976000000 104976005921
+104979000000 104979006002
+104982000000 104982006014
+104985000000 104985006017
+104988000000 104988005984
+104991000000 104991005995
+104994000000 104994006013
+104997000000 104997006009
+105000000000 105000006017
+105003000000 105003006016
+105006000000 105006006010
+105009000000 105009006035
+105012000000 105012006014
+105015000000 105015006018
+105018000000 105018006003
+105021000000 105021006001
+105024000000 105024005972
+105027000000 105027006002
+105030000000 105030006010
+105033000000 105033006027
+105036000000 105036006017
+105039000000 105039005967
+105042000000 105042006021
+105045000000 105045006015
+105048000000 105048006009
+105051000000 105051006009
+105054000000 105054006023
+105057000000 105057006014
+105060000000 105060006020
+105063000000 105063006009
+105066000000 105066005959
+105069000000 105069006018
+105072000000 105072006014
+105075000000 105075006001
+105078000000 105078006012
+105081000000 105081005930
+105084000000 105084006013
+105087000000 105087006005
+105090000000 105090006006
+105093000000 105093006017
+105096000000 105096006017
+105099000000 105099005971
+105102000000 105102006026
+105105000000 105105005991
+105108000000 105108006019
+105111000000 105111006018
+105114000000 105114006012
+105117000000 105117005967
+105120000000 105120006036
+105123000000 105123006015
+105126000000 105126006023
+105129000000 105129006009
+105132000000 105132006013
+105135000000 105135006015
+105138000000 105138006005
+105141000000 105141006001
+105144000000 105144006009
+105147000000 105147006005
+105150000000 105150006011
+105153000000 105153006002
+105156000000 105156006018
+105159000000 105159005988
+105162000000 105162006009
+105165000000 105165006004
+105168000000 105168006013
+105171000000 105171006002
+105174000000 105174006026
+105177000000 105177006007
+105180000000 105180005992
+105183000000 105183006006
+105186000000 105186006009
+105189000000 105189006012
+105192000000 105192006013
+105195000000 105195006023
+105198000000 105198006012
+105201000000 105201006016
+105204000000 105204006007
+105207000000 105207006005
+105210000000 105210006007
+105213000000 105213006006
+105216000000 105216005972
+105219000000 105219006002
+105222000000 105222005996
+105225000000 105225006012
+105228000000 105228005988
+105231000000 105231006000
+105234000000 105234006013
+105237000000 105237006015
+105240000000 105240006004
+105243000000 105243005946
+105246000000 105246005944
+105249000000 105249006016
+105252000000 105252005931
+105255000000 105255006005
+105258000000 105258006017
+105261000000 105261006009
+105264000000 105264006009
+105267000000 105267005968
+105270000000 105270005993
+105273000000 105273005916
+105276000000 105276005997
+105279000000 105279006009
+105282000000 105282006012
+105285000000 105285005979
+105288000000 105288005990
+105291000000 105291006008
+105294000000 105294006004
+105297000000 105297006012
+105300000000 105300006011
+105303000000 105303006005
+105306000000 105306006030
+105309000000 105309006009
+105312000000 105312006013
+105315000000 105315005998
+105318000000 105318005996
+105321000000 105321005967
+105324000000 105324005997
+105327000000 105327006005
+105330000000 105330006022
+105333000000 105333006012
+105336000000 105336005962
+105339000000 105339006016
+105342000000 105342006010
+105345000000 105345006004
+105348000000 105348006004
+105351000000 105351006018
+105354000000 105354006009
+105357000000 105357006015
+105360000000 105360006004
+105363000000 105363005954
+105366000000 105366006013
+105369000000 105369006009
+105372000000 105372005996
+105375000000 105375006007
+105378000000 105378005925
+105381000000 105381006008
+105384000000 105384006000
+105387000000 105387006001
+105390000000 105390006012
+105393000000 105393006012
+105396000000 105396005966
+105399000000 105399006021
+105402000000 105402005986
+105405000000 105405006014
+105408000000 105408006013
+105411000000 105411006007
+105414000000 105414005962
+105417000000 105417006031
+105420000000 105420006010
+105423000000 105423006018
+105426000000 105426006004
+105429000000 105429006008
+105432000000 105432006010
+105435000000 105435006000
+105438000000 105438005996
+105441000000 105441006004
+105444000000 105444006000
+105447000000 105447006006
+105450000000 105450005997
+105453000000 105453006013
+105456000000 105456005983
+105459000000 105459006004
+105462000000 105462005999
+105465000000 105465006008
+105468000000 105468005997
+105471000000 105471006021
+105474000000 105474006002
+105477000000 105477005987
+105480000000 105480006001
+105483000000 105483006004
+105486000000 105486006007
+105489000000 105489006008
+105492000000 105492006018
+105495000000 105495006007
+105498000000 105498006011
+105501000000 105501006002
+105504000000 105504006000
+105507000000 105507006002
+105510000000 105510006001
+105513000000 105513005967
+105516000000 105516005997
+105519000000 105519005991
+105522000000 105522006007
+105525000000 105525005983
+105528000000 105528005995
+105531000000 105531006008
+105534000000 105534006010
+105537000000 105537005999
+105540000000 105540005941
+105543000000 105543005939
+105546000000 105546006011
+105549000000 105549005926
+105552000000 105552006000
+105555000000 105555006012
+105558000000 105558006004
+105561000000 105561006004
+105564000000 105564005963
+105567000000 105567005988
+105570000000 105570005911
+105573000000 105573005992
+105576000000 105576006004
+105579000000 105579006007
+105582000000 105582005974
+105585000000 105585005985
+105588000000 105588006003
+105591000000 105591005999
+105594000000 105594006007
+105597000000 105597006006
+105600000000 105600006000
+105603000000 105603006025
+105606000000 105606006004
+105609000000 105609006008
+105612000000 105612005993
+105615000000 105615005991
+105618000000 105618005962
+105621000000 105621005992
+105624000000 105624006000
+105627000000 105627006017
+105630000000 105630006007
+105633000000 105633005957
+105636000000 105636006011
+105639000000 105639006005
+105642000000 105642005999
+105645000000 105645005999
+105648000000 105648006013
+105651000000 105651006004
+105654000000 105654006010
+105657000000 105657005999
+105660000000 105660005949
+105663000000 105663006008
+105666000000 105666006004
+105669000000 105669005991
+105672000000 105672006002
+105675000000 105675005920
+105678000000 105678006003
+105681000000 105681005995
+105684000000 105684005996
+105687000000 105687006007
+105690000000 105690006007
+105693000000 105693005961
+105696000000 105696006016
+105699000000 105699005981
+105702000000 105702006009
+105705000000 105705006008
+105708000000 105708006002
+105711000000 105711005957
+105714000000 105714006026
+105717000000 105717006005
+105720000000 105720006013
+105723000000 105723005999
+105726000000 105726006003
+105729000000 105729006005
+105732000000 105732005995
+105735000000 105735005991
+105738000000 105738005999
+105741000000 105741005995
+105744000000 105744006001
+105747000000 105747005992
+105750000000 105750006008
+105753000000 105753005978
+105756000000 105756005999
+105759000000 105759005994
+105762000000 105762006003
+105765000000 105765005992
+105768000000 105768006016
+105771000000 105771005997
+105774000000 105774005982
+105777000000 105777005996
+105780000000 105780005999
+105783000000 105783006002
+105786000000 105786006003
+105789000000 105789006013
+105792000000 105792006002
+105795000000 105795006006
+105798000000 105798005997
+105801000000 105801005995
+105804000000 105804005997
+105807000000 105807005996
+105810000000 105810005962
+105813000000 105813005992
+105816000000 105816005986
+105819000000 105819006002
+105822000000 105822005978
+105825000000 105825005990
+105828000000 105828006003
+105831000000 105831006005
+105834000000 105834005994
+105837000000 105837005936
+105840000000 105840005934
+105843000000 105843006006
+105846000000 105846005921
+105849000000 105849005995
+105852000000 105852006007
+105855000000 105855005999
+105858000000 105858005999
+105861000000 105861005958
+105864000000 105864005983
+105867000000 105867005906
+105870000000 105870005987
+105873000000 105873005999
+105876000000 105876006002
+105879000000 105879005969
+105882000000 105882005980
+105885000000 105885005998
+105888000000 105888005994
+105891000000 105891006002
+105894000000 105894006001
+105897000000 105897005995
+105900000000 105900006020
+105903000000 105903005999
+105906000000 105906006003
+105909000000 105909005988
+105912000000 105912005986
+105915000000 105915005957
+105918000000 105918005987
+105921000000 105921005995
+105924000000 105924006012
+105927000000 105927006002
+105930000000 105930005952
+105933000000 105933006006
+105936000000 105936006000
+105939000000 105939005994
+105942000000 105942005994
+105945000000 105945006008
+105948000000 105948005999
+105951000000 105951006005
+105954000000 105954005994
+105957000000 105957005944
+105960000000 105960006003
+105963000000 105963005999
+105966000000 105966005986
+105969000000 105969005997
+105972000000 105972005915
+105975000000 105975005998
+105978000000 105978005990
+105981000000 105981005991
+105984000000 105984006002
+105987000000 105987006002
+105990000000 105990005956
+105993000000 105993006011
+105996000000 105996005976
+105999000000 105999006004
+106002000000 106002006003
+106005000000 106005005997
+106008000000 106008005952
+106011000000 106011006021
+106014000000 106014006000
+106017000000 106017006008
+106020000000 106020005994
+106023000000 106023005998
+106026000000 106026006000
+106029000000 106029005990
+106032000000 106032005986
+106035000000 106035005994
+106038000000 106038005990
+106041000000 106041005996
+106044000000 106044005987
+106047000000 106047006003
+106050000000 106050005973
+106053000000 106053005994
+106056000000 106056005989
+106059000000 106059005998
+106062000000 106062005987
+106065000000 106065006011
+106068000000 106068005992
+106071000000 106071005977
+106074000000 106074005991
+106077000000 106077005994
+106080000000 106080005997
+106083000000 106083005998
+106086000000 106086006008
+106089000000 106089005997
+106092000000 106092006001
+106095000000 106095005992
+106098000000 106098005990
+106101000000 106101005992
+106104000000 106104005991
+106107000000 106107005957
+106110000000 106110005987
+106113000000 106113005981
+106116000000 106116005997
+106119000000 106119005973
+106122000000 106122005985
+106125000000 106125005998
+106128000000 106128006000
+106131000000 106131005989
+106134000000 106134005931
+106137000000 106137005929
+106140000000 106140006001
+106143000000 106143005916
+106146000000 106146005990
+106149000000 106149006002
+106152000000 106152005994
+106155000000 106155005994
+106158000000 106158005953
+106161000000 106161005978
+106164000000 106164005901
+106167000000 106167005982
+106170000000 106170005994
+106173000000 106173005997
+106176000000 106176005964
+106179000000 106179005975
+106182000000 106182005993
+106185000000 106185005989
+106188000000 106188005997
+106191000000 106191005996
+106194000000 106194005990
+106197000000 106197006015
+106200000000 106200005994
+106203000000 106203005998
+106206000000 106206005983
+106209000000 106209005981
+106212000000 106212005952
+106215000000 106215005982
+106218000000 106218005990
+106221000000 106221006007
+106224000000 106224005997
+106227000000 106227005947
+106230000000 106230006001
+106233000000 106233005995
+106236000000 106236005989
+106239000000 106239005989
+106242000000 106242006003
+106245000000 106245005994
+106248000000 106248006000
+106251000000 106251005989
+106254000000 106254005939
+106257000000 106257005998
+106260000000 106260005994
+106263000000 106263005981
+106266000000 106266005992
+106269000000 106269005910
+106272000000 106272005993
+106275000000 106275005985
+106278000000 106278005986
+106281000000 106281005997
+106284000000 106284005997
+106287000000 106287005951
+106290000000 106290006006
+106293000000 106293005971
+106296000000 106296005999
+106299000000 106299005998
+106302000000 106302005992
+106305000000 106305005947
+106308000000 106308006016
+106311000000 106311005995
+106314000000 106314006003
+106317000000 106317005989
+106320000000 106320005993
+106323000000 106323005995
+106326000000 106326005985
+106329000000 106329005981
+106332000000 106332005989
+106335000000 106335005985
+106338000000 106338005991
+106341000000 106341005982
+106344000000 106344005998
+106347000000 106347005968
+106350000000 106350005989
+106353000000 106353005984
+106356000000 106356005993
+106359000000 106359005982
+106362000000 106362006006
+106365000000 106365005987
+106368000000 106368005972
+106371000000 106371005986
+106374000000 106374005989
+106377000000 106377005992
+106380000000 106380005993
+106383000000 106383006003
+106386000000 106386005992
+106389000000 106389005996
+106392000000 106392005987
+106395000000 106395005985
+106398000000 106398005987
+106401000000 106401005986
+106404000000 106404005952
+106407000000 106407005982
+106410000000 106410005976
+106413000000 106413005992
+106416000000 106416005968
+106419000000 106419005980
+106422000000 106422005993
+106425000000 106425005995
+106428000000 106428005984
+106431000000 106431005926
+106434000000 106434005924
+106437000000 106437005996
+106440000000 106440005911
+106443000000 106443005985
+106446000000 106446005997
+106449000000 106449005989
+106452000000 106452005989
+106455000000 106455005948
+106458000000 106458005973
+106461000000 106461005896
+106464000000 106464005977
+106467000000 106467005989
+106470000000 106470005992
+106473000000 106473005959
+106476000000 106476005970
+106479000000 106479005988
+106482000000 106482005984
+106485000000 106485005992
+106488000000 106488005991
+106491000000 106491005985
+106494000000 106494006010
+106497000000 106497005989
+106500000000 106500005993
+106503000000 106503005978
+106506000000 106506005976
+106509000000 106509005947
+106512000000 106512005977
+106515000000 106515005985
+106518000000 106518006002
+106521000000 106521005992
+106524000000 106524005942
+106527000000 106527005996
+106530000000 106530005990
+106533000000 106533005984
+106536000000 106536005984
+106539000000 106539005998
+106542000000 106542005989
+106545000000 106545005995
+106548000000 106548005984
+106551000000 106551005934
+106554000000 106554005993
+106557000000 106557005989
+106560000000 106560005976
+106563000000 106563005987
+106566000000 106566005905
+106569000000 106569005988
+106572000000 106572005980
+106575000000 106575005981
+106578000000 106578005992
+106581000000 106581005992
+106584000000 106584005946
+106587000000 106587006001
+106590000000 106590005966
+106593000000 106593005994
+106596000000 106596005993
+106599000000 106599005987
+106602000000 106602005942
+106605000000 106605006011
+106608000000 106608005990
+106611000000 106611005998
+106614000000 106614005984
+106617000000 106617005988
+106620000000 106620005990
+106623000000 106623005980
+106626000000 106626005976
+106629000000 106629005984
+106632000000 106632005980
+106635000000 106635005986
+106638000000 106638005977
+106641000000 106641005993
+106644000000 106644005963
+106647000000 106647005984
+106650000000 106650005979
+106653000000 106653005988
+106656000000 106656005977
+106659000000 106659006001
+106662000000 106662005982
+106665000000 106665005967
+106668000000 106668005981
+106671000000 106671005984
+106674000000 106674005987
+106677000000 106677005988
+106680000000 106680005998
+106683000000 106683005987
+106686000000 106686005991
+106689000000 106689005982
+106692000000 106692005980
+106695000000 106695005982
+106698000000 106698005981
+106701000000 106701005947
+106704000000 106704005977
+106707000000 106707005971
+106710000000 106710005987
+106713000000 106713005963
+106716000000 106716005975
+106719000000 106719005988
+106722000000 106722005990
+106725000000 106725005979
+106728000000 106728005921
+106731000000 106731005919
+106734000000 106734005991
+106737000000 106737005906
+106740000000 106740005980
+106743000000 106743005992
+106746000000 106746005984
+106749000000 106749005984
+106752000000 106752005943
+106755000000 106755005968
+106758000000 106758005891
+106761000000 106761005972
+106764000000 106764005984
+106767000000 106767005987
+106770000000 106770005954
+106773000000 106773005965
+106776000000 106776005983
+106779000000 106779005979
+106782000000 106782005987
+106785000000 106785005986
+106788000000 106788005980
+106791000000 106791006005
+106794000000 106794005984
+106797000000 106797005988
+106800000000 106800005973
+106803000000 106803005971
+106806000000 106806005942
+106809000000 106809005972
+106812000000 106812005980
+106815000000 106815005997
+106818000000 106818005987
+106821000000 106821005937
+106824000000 106824005991
+106827000000 106827005985
+106830000000 106830005979
+106833000000 106833005979
+106836000000 106836005993
+106839000000 106839005984
+106842000000 106842005990
+106845000000 106845005979
+106848000000 106848005929
+106851000000 106851005988
+106854000000 106854005984
+106857000000 106857005971
+106860000000 106860005982
+106863000000 106863005900
+106866000000 106866005983
+106869000000 106869005975
+106872000000 106872005976
+106875000000 106875005987
+106878000000 106878005987
+106881000000 106881005941
+106884000000 106884005996
+106887000000 106887005961
+106890000000 106890005989
+106893000000 106893005988
+106896000000 106896005982
+106899000000 106899005937
+106902000000 106902006006
+106905000000 106905005985
+106908000000 106908005993
+106911000000 106911005979
+106914000000 106914005983
+106917000000 106917005985
+106920000000 106920005975
+106923000000 106923005971
+106926000000 106926005979
+106929000000 106929005975
+106932000000 106932005981
+106935000000 106935005972
+106938000000 106938005988
+106941000000 106941005958
+106944000000 106944005979
+106947000000 106947005974
+106950000000 106950005983
+106953000000 106953005972
+106956000000 106956005996
+106959000000 106959005977
+106962000000 106962005962
+106965000000 106965005976
+106968000000 106968005979
+106971000000 106971005982
+106974000000 106974005983
+106977000000 106977005993
+106980000000 106980005982
+106983000000 106983005986
+106986000000 106986005977
+106989000000 106989005975
+106992000000 106992005977
+106995000000 106995005976
+106998000000 106998005942
+107001000000 107001005972
+107004000000 107004005966
+107007000000 107007005982
+107010000000 107010005958
+107013000000 107013005970
+107016000000 107016005983
+107019000000 107019005985
+107022000000 107022005974
+107025000000 107025005916
+107028000000 107028005914
+107031000000 107031005986
+107034000000 107034005901
+107037000000 107037005975
+107040000000 107040005987
+107043000000 107043005979
+107046000000 107046005979
+107049000000 107049005938
+107052000000 107052005963
+107055000000 107055005886
+107058000000 107058005967
+107061000000 107061005979
+107064000000 107064005982
+107067000000 107067005949
+107070000000 107070005960
+107073000000 107073005978
+107076000000 107076005974
+107079000000 107079005982
+107082000000 107082005981
+107085000000 107085005975
+107088000000 107088006000
+107091000000 107091005979
+107094000000 107094005983
+107097000000 107097005968
+107100000000 107100005966
+107103000000 107103005937
+107106000000 107106005967
+107109000000 107109005975
+107112000000 107112005992
+107115000000 107115005982
+107118000000 107118005932
+107121000000 107121005986
+107124000000 107124005980
+107127000000 107127005974
+107130000000 107130005974
+107133000000 107133005988
+107136000000 107136005979
+107139000000 107139005985
+107142000000 107142005974
+107145000000 107145005924
+107148000000 107148005983
+107151000000 107151005979
+107154000000 107154005966
+107157000000 107157005977
+107160000000 107160005895
+107163000000 107163005978
+107166000000 107166005970
+107169000000 107169005971
+107172000000 107172005982
+107175000000 107175005982
+107178000000 107178005936
+107181000000 107181005991
+107184000000 107184005956
+107187000000 107187005984
+107190000000 107190005983
+107193000000 107193005977
+107196000000 107196005932
+107199000000 107199006001
+107202000000 107202005980
+107205000000 107205005988
+107208000000 107208005974
+107211000000 107211005978
+107214000000 107214005980
+107217000000 107217005970
+107220000000 107220005966
+107223000000 107223005974
+107226000000 107226005970
+107229000000 107229005976
+107232000000 107232005967
+107235000000 107235005983
+107238000000 107238005953
+107241000000 107241005974
+107244000000 107244005969
+107247000000 107247005978
+107250000000 107250005967
+107253000000 107253005991
+107256000000 107256005972
+107259000000 107259005957
+107262000000 107262005971
+107265000000 107265005974
+107268000000 107268005977
+107271000000 107271005978
+107274000000 107274005988
+107277000000 107277005977
+107280000000 107280005981
+107283000000 107283005972
+107286000000 107286005970
+107289000000 107289005972
+107292000000 107292005971
+107295000000 107295005937
+107298000000 107298005967
+107301000000 107301005961
+107304000000 107304005977
+107307000000 107307005953
+107310000000 107310005965
+107313000000 107313005978
+107316000000 107316005980
+107319000000 107319005969
+107322000000 107322005911
+107325000000 107325005909
+107328000000 107328005981
+107331000000 107331005896
+107334000000 107334005970
+107337000000 107337005982
+107340000000 107340005974
+107343000000 107343005974
+107346000000 107346005933
+107349000000 107349005958
+107352000000 107352005881
+107355000000 107355005962
+107358000000 107358005974
+107361000000 107361005977
+107364000000 107364005944
+107367000000 107367005955
+107370000000 107370005973
+107373000000 107373005969
+107376000000 107376005977
+107379000000 107379005976
+107382000000 107382005970
+107385000000 107385005995
+107388000000 107388005974
+107391000000 107391005978
+107394000000 107394005963
+107397000000 107397005961
+107400000000 107400005932
+107403000000 107403005962
+107406000000 107406005970
+107409000000 107409005987
+107412000000 107412005977
+107415000000 107415005927
+107418000000 107418005981
+107421000000 107421005975
+107424000000 107424005969
+107427000000 107427005969
+107430000000 107430005983
+107433000000 107433005974
+107436000000 107436005980
+107439000000 107439005969
+107442000000 107442005919
+107445000000 107445005978
+107448000000 107448005974
+107451000000 107451005961
+107454000000 107454005972
+107457000000 107457005890
+107460000000 107460005973
+107463000000 107463005965
+107466000000 107466005966
+107469000000 107469005977
+107472000000 107472005977
+107475000000 107475005931
+107478000000 107478005986
+107481000000 107481005951
+107484000000 107484005979
+107487000000 107487005978
+107490000000 107490005972
+107493000000 107493005927
+107496000000 107496005996
+107499000000 107499005975
+107502000000 107502005983
+107505000000 107505005969
+107508000000 107508005973
+107511000000 107511005975
+107514000000 107514005965
+107517000000 107517005961
+107520000000 107520005969
+107523000000 107523005965
+107526000000 107526005971
+107529000000 107529005962
+107532000000 107532005978
+107535000000 107535005948
+107538000000 107538005969
+107541000000 107541005964
+107544000000 107544005973
+107547000000 107547005962
+107550000000 107550005986
+107553000000 107553005967
+107556000000 107556005952
+107559000000 107559005966
+107562000000 107562005969
+107565000000 107565005972
+107568000000 107568005973
+107571000000 107571005983
+107574000000 107574005972
+107577000000 107577005976
+107580000000 107580005967
+107583000000 107583005965
+107586000000 107586005967
+107589000000 107589005966
+107592000000 107592005932
+107595000000 107595005962
+107598000000 107598005956
+107601000000 107601005972
+107604000000 107604005948
+107607000000 107607005960
+107610000000 107610005973
+107613000000 107613005975
+107616000000 107616005964
+107619000000 107619005906
+107622000000 107622005904
+107625000000 107625005976
+107628000000 107628005891
+107631000000 107631005965
+107634000000 107634005977
+107637000000 107637005969
+107640000000 107640005969
+107643000000 107643005928
+107646000000 107646005953
+107649000000 107649005876
+107652000000 107652005957
+107655000000 107655005969
+107658000000 107658005972
+107661000000 107661005939
+107664000000 107664005950
+107667000000 107667005968
+107670000000 107670005964
+107673000000 107673005972
+107676000000 107676005971
+107679000000 107679005965
+107682000000 107682005990
+107685000000 107685005969
+107688000000 107688005973
+107691000000 107691005958
+107694000000 107694005956
+107697000000 107697005927
+107700000000 107700005957
+107703000000 107703005965
+107706000000 107706005982
+107709000000 107709005972
+107712000000 107712005922
+107715000000 107715005976
+107718000000 107718005970
+107721000000 107721005964
+107724000000 107724005964
+107727000000 107727005978
+107730000000 107730005969
+107733000000 107733005975
+107736000000 107736005964
+107739000000 107739005914
+107742000000 107742005973
+107745000000 107745005969
+107748000000 107748005956
+107751000000 107751005967
+107754000000 107754005885
+107757000000 107757005968
+107760000000 107760005960
+107763000000 107763005961
+107766000000 107766005972
+107769000000 107769005972
+107772000000 107772005926
+107775000000 107775005981
+107778000000 107778005946
+107781000000 107781005974
+107784000000 107784005973
+107787000000 107787005967
+107790000000 107790005922
+107793000000 107793005991
+107796000000 107796005970
+107799000000 107799005978
+107802000000 107802005964
+107805000000 107805005968
+107808000000 107808005970
+107811000000 107811005960
+107814000000 107814005956
+107817000000 107817005964
+107820000000 107820005960
+107823000000 107823005966
+107826000000 107826005957
+107829000000 107829005973
+107832000000 107832005943
+107835000000 107835005964
+107838000000 107838005959
+107841000000 107841005968
+107844000000 107844005957
+107847000000 107847005981
+107850000000 107850005962
+107853000000 107853005947
+107856000000 107856005961
+107859000000 107859005964
+107862000000 107862005967
+107865000000 107865005968
+107868000000 107868005978
+107871000000 107871005967
+107874000000 107874005971
+107877000000 107877005962
+107880000000 107880005960
+107883000000 107883005962
+107886000000 107886005961
+107889000000 107889005927
+107892000000 107892005957
+107895000000 107895005951
+107898000000 107898005967
+107901000000 107901005943
+107904000000 107904005955
+107907000000 107907005968
+107910000000 107910005970
+107913000000 107913005959
+107916000000 107916005901
+107919000000 107919005899
+107922000000 107922005971
+107925000000 107925005886
+107928000000 107928005960
+107931000000 107931005972
+107934000000 107934005964
+107937000000 107937005964
+107940000000 107940005923
+107943000000 107943005948
+107946000000 107946005871
+107949000000 107949005952
+107952000000 107952005964
+107955000000 107955005967
+107958000000 107958005934
+107961000000 107961005945
+107964000000 107964005963
+107967000000 107967005959
+107970000000 107970005967
+107973000000 107973005966
+107976000000 107976005960
+107979000000 107979005985
+107982000000 107982005964
+107985000000 107985005968
+107988000000 107988005953
+107991000000 107991005951
+107994000000 107994005922
+107997000000 107997005952
+108000000000 108000005960
+108003000000 108003005977
+108006000000 108006005967
+108009000000 108009005917
+108012000000 108012005971
+108015000000 108015005965
+108018000000 108018005959
+108021000000 108021005959
+108024000000 108024005973
+108027000000 108027005964
+108030000000 108030005970
+108033000000 108033005959
+108036000000 108036005909
+108039000000 108039005968
+108042000000 108042005964
+108045000000 108045005951
+108048000000 108048005962
+108051000000 108051005880
+108054000000 108054005963
+108057000000 108057005955
+108060000000 108060005956
+108063000000 108063005967
+108066000000 108066005967
+108069000000 108069005921
+108072000000 108072005976
+108075000000 108075005941
+108078000000 108078005969
+108081000000 108081005968
+108084000000 108084005962
+108087000000 108087005917
+108090000000 108090005986
+108093000000 108093005965
+108096000000 108096005973
+108099000000 108099005959
+108102000000 108102005963
+108105000000 108105005965
+108108000000 108108005955
+108111000000 108111005951
+108114000000 108114005959
+108117000000 108117005955
+108120000000 108120005961
+108123000000 108123005952
+108126000000 108126005968
+108129000000 108129005938
+108132000000 108132005959
+108135000000 108135005954
+108138000000 108138005963
+108141000000 108141005952
+108144000000 108144005976
+108147000000 108147005957
+108150000000 108150005942
+108153000000 108153005956
+108156000000 108156005959
+108159000000 108159005962
+108162000000 108162005963
+108165000000 108165005973
+108168000000 108168005962
+108171000000 108171005966
+108174000000 108174005957
+108177000000 108177005955
+108180000000 108180005957
+108183000000 108183005956
+108186000000 108186005922
+108189000000 108189005952
+108192000000 108192005946
+108195000000 108195005962
+108198000000 108198005938
+108201000000 108201005950
+108204000000 108204005963
+108207000000 108207005965
+108210000000 108210005954
+108213000000 108213005896
+108216000000 108216005894
+108219000000 108219005966
+108222000000 108222005881
+108225000000 108225005955
+108228000000 108228005967
+108231000000 108231005959
+108234000000 108234005959
+108237000000 108237005918
+108240000000 108240005943
+108243000000 108243005866
+108246000000 108246005947
+108249000000 108249005959
+108252000000 108252005962
+108255000000 108255005929
+108258000000 108258005940
+108261000000 108261005958
+108264000000 108264005954
+108267000000 108267005962
+108270000000 108270005961
+108273000000 108273005955
+108276000000 108276005980
+108279000000 108279005959
+108282000000 108282005963
+108285000000 108285005948
+108288000000 108288005946
+108291000000 108291005917
+108294000000 108294005947
+108297000000 108297005955
+108300000000 108300005972
+108303000000 108303005962
+108306000000 108306005912
+108309000000 108309005966
+108312000000 108312005960
+108315000000 108315005954
+108318000000 108318005954
+108321000000 108321005968
+108324000000 108324005959
+108327000000 108327005965
+108330000000 108330005954
+108333000000 108333005904
+108336000000 108336005963
+108339000000 108339005959
+108342000000 108342005946
+108345000000 108345005957
+108348000000 108348005875
+108351000000 108351005958
+108354000000 108354005950
+108357000000 108357005951
+108360000000 108360005962
+108363000000 108363005962
+108366000000 108366005916
+108369000000 108369005971
+108372000000 108372005936
+108375000000 108375005964
+108378000000 108378005963
+108381000000 108381005957
+108384000000 108384005912
+108387000000 108387005981
+108390000000 108390005960
+108393000000 108393005968
+108396000000 108396005954
+108399000000 108399005958
+108402000000 108402005960
+108405000000 108405005950
+108408000000 108408005946
+108411000000 108411005954
+108414000000 108414005950
+108417000000 108417005956
+108420000000 108420005947
+108423000000 108423005963
+108426000000 108426005933
+108429000000 108429005954
+108432000000 108432005949
+108435000000 108435005958
+108438000000 108438005947
+108441000000 108441005971
+108444000000 108444005952
+108447000000 108447005937
+108450000000 108450005951
+108453000000 108453005954
+108456000000 108456005957
+108459000000 108459005958
+108462000000 108462005968
+108465000000 108465005957
+108468000000 108468005961
+108471000000 108471005952
+108474000000 108474005950
+108477000000 108477005952
+108480000000 108480005951
+108483000000 108483005917
+108486000000 108486005947
+108489000000 108489005941
+108492000000 108492005957
+108495000000 108495005933
+108498000000 108498005945
+108501000000 108501005958
+108504000000 108504005960
+108507000000 108507005949
+108510000000 108510005891
+108513000000 108513005889
+108516000000 108516005961
+108519000000 108519005876
+108522000000 108522005950
+108525000000 108525005962
+108528000000 108528005954
+108531000000 108531005954
+108534000000 108534005913
+108537000000 108537005938
+108540000000 108540005861
+108543000000 108543005942
+108546000000 108546005954
+108549000000 108549005957
+108552000000 108552005924
+108555000000 108555005935
+108558000000 108558005953
+108561000000 108561005949
+108564000000 108564005957
+108567000000 108567005956
+108570000000 108570005950
+108573000000 108573005975
+108576000000 108576005954
+108579000000 108579005958
+108582000000 108582005943
+108585000000 108585005941
+108588000000 108588005912
+108591000000 108591005942
+108594000000 108594005950
+108597000000 108597005967
+108600000000 108600005957
+108603000000 108603005907
+108606000000 108606005961
+108609000000 108609005955
+108612000000 108612005949
+108615000000 108615005949
+108618000000 108618005963
+108621000000 108621005954
+108624000000 108624005960
+108627000000 108627005949
+108630000000 108630005899
+108633000000 108633005958
+108636000000 108636005954
+108639000000 108639005941
+108642000000 108642005952
+108645000000 108645005870
+108648000000 108648005953
+108651000000 108651005945
+108654000000 108654005946
+108657000000 108657005957
+108660000000 108660005957
+108663000000 108663005911
+108666000000 108666005966
+108669000000 108669005931
+108672000000 108672005959
+108675000000 108675005958
+108678000000 108678005952
+108681000000 108681005907
+108684000000 108684005976
+108687000000 108687005955
+108690000000 108690005963
+108693000000 108693005949
+108696000000 108696005953
+108699000000 108699005955
+108702000000 108702005945
+108705000000 108705005941
+108708000000 108708005949
+108711000000 108711005945
+108714000000 108714005951
+108717000000 108717005942
+108720000000 108720005958
+108723000000 108723005928
+108726000000 108726005949
+108729000000 108729005944
+108732000000 108732005953
+108735000000 108735005942
+108738000000 108738005966
+108741000000 108741005947
+108744000000 108744005932
+108747000000 108747005946
+108750000000 108750005949
+108753000000 108753005952
+108756000000 108756005953
+108759000000 108759005963
+108762000000 108762005952
+108765000000 108765005956
+108768000000 108768005947
+108771000000 108771005945
+108774000000 108774005947
+108777000000 108777005946
+108780000000 108780005912
+108783000000 108783005942
+108786000000 108786005936
+108789000000 108789005952
+108792000000 108792005928
+108795000000 108795005940
+108798000000 108798005953
+108801000000 108801005955
+108804000000 108804005944
+108807000000 108807005886
+108810000000 108810005884
+108813000000 108813005956
+108816000000 108816005871
+108819000000 108819005945
+108822000000 108822005957
+108825000000 108825005949
+108828000000 108828005949
+108831000000 108831005908
+108834000000 108834005933
+108837000000 108837005856
+108840000000 108840005937
+108843000000 108843005949
+108846000000 108846005952
+108849000000 108849005919
+108852000000 108852005930
+108855000000 108855005948
+108858000000 108858005944
+108861000000 108861005952
+108864000000 108864005951
+108867000000 108867005945
+108870000000 108870005970
+108873000000 108873005949
+108876000000 108876005953
+108879000000 108879005938
+108882000000 108882005936
+108885000000 108885005907
+108888000000 108888005937
+108891000000 108891005945
+108894000000 108894005962
+108897000000 108897005952
+108900000000 108900005902
+108903000000 108903005956
+108906000000 108906005950
+108909000000 108909005944
+108912000000 108912005944
+108915000000 108915005958
+108918000000 108918005949
+108921000000 108921005955
+108924000000 108924005944
+108927000000 108927005894
+108930000000 108930005953
+108933000000 108933005949
+108936000000 108936005936
+108939000000 108939005947
+108942000000 108942005865
+108945000000 108945005948
+108948000000 108948005940
+108951000000 108951005941
+108954000000 108954005952
+108957000000 108957005952
+108960000000 108960005906
+108963000000 108963005961
+108966000000 108966005926
+108969000000 108969005954
+108972000000 108972005953
+108975000000 108975005947
+108978000000 108978005902
+108981000000 108981005971
+108984000000 108984005950
+108987000000 108987005958
+108990000000 108990005944
+108993000000 108993005948
+108996000000 108996005950
+108999000000 108999005940
+109002000000 109002005936
+109005000000 109005005944
+109008000000 109008005940
+109011000000 109011005946
+109014000000 109014005937
+109017000000 109017005953
+109020000000 109020005923
+109023000000 109023005944
+109026000000 109026005939
+109029000000 109029005948
+109032000000 109032005937
+109035000000 109035005961
+109038000000 109038005942
+109041000000 109041005927
+109044000000 109044005941
+109047000000 109047005944
+109050000000 109050005947
+109053000000 109053005948
+109056000000 109056005958
+109059000000 109059005947
+109062000000 109062005951
+109065000000 109065005942
+109068000000 109068005940
+109071000000 109071005942
+109074000000 109074005941
+109077000000 109077005907
+109080000000 109080005937
+109083000000 109083005931
+109086000000 109086005947
+109089000000 109089005923
+109092000000 109092005935
+109095000000 109095005948
+109098000000 109098005950
+109101000000 109101005939
+109104000000 109104005881
+109107000000 109107005879
+109110000000 109110005951
+109113000000 109113005866
+109116000000 109116005940
+109119000000 109119005952
+109122000000 109122005944
+109125000000 109125005944
+109128000000 109128005903
+109131000000 109131005928
+109134000000 109134005851
+109137000000 109137005932
+109140000000 109140005944
+109143000000 109143005947
+109146000000 109146005914
+109149000000 109149005925
+109152000000 109152005943
+109155000000 109155005939
+109158000000 109158005947
+109161000000 109161005946
+109164000000 109164005940
+109167000000 109167005965
+109170000000 109170005944
+109173000000 109173005948
+109176000000 109176005933
+109179000000 109179005931
+109182000000 109182005902
+109185000000 109185005932
+109188000000 109188005940
+109191000000 109191005957
+109194000000 109194005947
+109197000000 109197005897
+109200000000 109200005951
+109203000000 109203005945
+109206000000 109206005939
+109209000000 109209005939
+109212000000 109212005953
+109215000000 109215005944
+109218000000 109218005950
+109221000000 109221005939
+109224000000 109224005889
+109227000000 109227005948
+109230000000 109230005944
+109233000000 109233005931
+109236000000 109236005942
+109239000000 109239005860
+109242000000 109242005943
+109245000000 109245005935
+109248000000 109248005936
+109251000000 109251005947
+109254000000 109254005947
+109257000000 109257005901
+109260000000 109260005956
+109263000000 109263005921
+109266000000 109266005949
+109269000000 109269005948
+109272000000 109272005942
+109275000000 109275005897
+109278000000 109278005966
+109281000000 109281005945
+109284000000 109284005953
+109287000000 109287005939
+109290000000 109290005943
+109293000000 109293005945
+109296000000 109296005935
+109299000000 109299005931
+109302000000 109302005939
+109305000000 109305005935
+109308000000 109308005941
+109311000000 109311005932
+109314000000 109314005948
+109317000000 109317005918
+109320000000 109320005939
+109323000000 109323005934
+109326000000 109326005943
+109329000000 109329005932
+109332000000 109332005956
+109335000000 109335005937
+109338000000 109338005922
+109341000000 109341005936
+109344000000 109344005939
+109347000000 109347005942
+109350000000 109350005943
+109353000000 109353005953
+109356000000 109356005942
+109359000000 109359005946
+109362000000 109362005937
+109365000000 109365005935
+109368000000 109368005937
+109371000000 109371005936
+109374000000 109374005902
+109377000000 109377005932
+109380000000 109380005926
+109383000000 109383005942
+109386000000 109386005918
+109389000000 109389005930
+109392000000 109392005943
+109395000000 109395005945
+109398000000 109398005934
+109401000000 109401005876
+109404000000 109404005874
+109407000000 109407005946
+109410000000 109410005861
+109413000000 109413005935
+109416000000 109416005947
+109419000000 109419005939
+109422000000 109422005939
+109425000000 109425005898
+109428000000 109428005923
+109431000000 109431005846
+109434000000 109434005927
+109437000000 109437005939
+109440000000 109440005942
+109443000000 109443005909
+109446000000 109446005920
+109449000000 109449005938
+109452000000 109452005934
+109455000000 109455005942
+109458000000 109458005941
+109461000000 109461005935
+109464000000 109464005960
+109467000000 109467005939
+109470000000 109470005943
+109473000000 109473005928
+109476000000 109476005926
+109479000000 109479005897
+109482000000 109482005927
+109485000000 109485005935
+109488000000 109488005952
+109491000000 109491005942
+109494000000 109494005892
+109497000000 109497005946
+109500000000 109500005940
+109503000000 109503005934
+109506000000 109506005934
+109509000000 109509005948
+109512000000 109512005939
+109515000000 109515005945
+109518000000 109518005934
+109521000000 109521005884
+109524000000 109524005943
+109527000000 109527005939
+109530000000 109530005926
+109533000000 109533005937
+109536000000 109536005855
+109539000000 109539005938
+109542000000 109542005930
+109545000000 109545005931
+109548000000 109548005942
+109551000000 109551005942
+109554000000 109554005896
+109557000000 109557005951
+109560000000 109560005916
+109563000000 109563005944
+109566000000 109566005943
+109569000000 109569005937
+109572000000 109572005892
+109575000000 109575005961
+109578000000 109578005940
+109581000000 109581005948
+109584000000 109584005934
+109587000000 109587005938
+109590000000 109590005940
+109593000000 109593005930
+109596000000 109596005926
+109599000000 109599005934
+109602000000 109602005930
+109605000000 109605005936
+109608000000 109608005927
+109611000000 109611005943
+109614000000 109614005913
+109617000000 109617005934
+109620000000 109620005929
+109623000000 109623005938
+109626000000 109626005927
+109629000000 109629005951
+109632000000 109632005932
+109635000000 109635005917
+109638000000 109638005931
+109641000000 109641005934
+109644000000 109644005937
+109647000000 109647005938
+109650000000 109650005948
+109653000000 109653005937
+109656000000 109656005941
+109659000000 109659005932
+109662000000 109662005930
+109665000000 109665005932
+109668000000 109668005931
+109671000000 109671005897
+109674000000 109674005927
+109677000000 109677005921
+109680000000 109680005937
+109683000000 109683005913
+109686000000 109686005925
+109689000000 109689005938
+109692000000 109692005940
+109695000000 109695005929
+109698000000 109698005871
+109701000000 109701005869
+109704000000 109704005941
+109707000000 109707005856
+109710000000 109710005930
+109713000000 109713005942
+109716000000 109716005934
+109719000000 109719005934
+109722000000 109722005893
+109725000000 109725005918
+109728000000 109728005841
+109731000000 109731005922
+109734000000 109734005934
+109737000000 109737005937
+109740000000 109740005904
+109743000000 109743005915
+109746000000 109746005933
+109749000000 109749005929
+109752000000 109752005937
+109755000000 109755005936
+109758000000 109758005930
+109761000000 109761005955
+109764000000 109764005934
+109767000000 109767005938
+109770000000 109770005923
+109773000000 109773005921
+109776000000 109776005892
+109779000000 109779005922
+109782000000 109782005930
+109785000000 109785005947
+109788000000 109788005937
+109791000000 109791005887
+109794000000 109794005941
+109797000000 109797005935
+109800000000 109800005929
+109803000000 109803005929
+109806000000 109806005943
+109809000000 109809005934
+109812000000 109812005940
+109815000000 109815005929
+109818000000 109818005879
+109821000000 109821005938
+109824000000 109824005934
+109827000000 109827005921
+109830000000 109830005932
+109833000000 109833005850
+109836000000 109836005933
+109839000000 109839005925
+109842000000 109842005926
+109845000000 109845005937
+109848000000 109848005937
+109851000000 109851005891
+109854000000 109854005946
+109857000000 109857005911
+109860000000 109860005939
+109863000000 109863005938
+109866000000 109866005932
+109869000000 109869005887
+109872000000 109872005956
+109875000000 109875005935
+109878000000 109878005943
+109881000000 109881005929
+109884000000 109884005933
+109887000000 109887005935
+109890000000 109890005925
+109893000000 109893005921
+109896000000 109896005929
+109899000000 109899005925
+109902000000 109902005931
+109905000000 109905005922
+109908000000 109908005938
+109911000000 109911005908
+109914000000 109914005929
+109917000000 109917005924
+109920000000 109920005933
+109923000000 109923005922
+109926000000 109926005946
+109929000000 109929005927
+109932000000 109932005912
+109935000000 109935005926
+109938000000 109938005929
+109941000000 109941005932
+109944000000 109944005933
+109947000000 109947005943
+109950000000 109950005932
+109953000000 109953005936
+109956000000 109956005927
+109959000000 109959005925
+109962000000 109962005927
+109965000000 109965005926
+109968000000 109968005892
+109971000000 109971005922
+109974000000 109974005916
+109977000000 109977005932
+109980000000 109980005908
+109983000000 109983005920
+109986000000 109986005933
+109989000000 109989005935
+109992000000 109992005924
+109995000000 109995005866
+109998000000 109998005864
+110001000000 110001005936
+110004000000 110004005851
+110007000000 110007005925
+110010000000 110010005937
+110013000000 110013005929
+110016000000 110016005929
+110019000000 110019005888
+110022000000 110022005913
+110025000000 110025005836
+110028000000 110028005917
+110031000000 110031005929
+110034000000 110034005932
+110037000000 110037005899
+110040000000 110040005910
+110043000000 110043005928
+110046000000 110046005924
+110049000000 110049005932
+110052000000 110052005931
+110055000000 110055005925
+110058000000 110058005950
+110061000000 110061005929
+110064000000 110064005933
+110067000000 110067005918
+110070000000 110070005916
+110073000000 110073005887
+110076000000 110076005917
+110079000000 110079005925
+110082000000 110082005942
+110085000000 110085005932
+110088000000 110088005882
+110091000000 110091005936
+110094000000 110094005930
+110097000000 110097005924
+110100000000 110100005924
+110103000000 110103005938
+110106000000 110106005929
+110109000000 110109005935
+110112000000 110112005924
+110115000000 110115005874
+110118000000 110118005933
+110121000000 110121005929
+110124000000 110124005916
+110127000000 110127005927
+110130000000 110130005845
+110133000000 110133005928
+110136000000 110136005920
+110139000000 110139005921
+110142000000 110142005932
+110145000000 110145005932
+110148000000 110148005886
+110151000000 110151005941
+110154000000 110154005906
+110157000000 110157005934
+110160000000 110160005933
+110163000000 110163005927
+110166000000 110166005882
+110169000000 110169005951
+110172000000 110172005930
+110175000000 110175005938
+110178000000 110178005924
+110181000000 110181005928
+110184000000 110184005930
+110187000000 110187005920
+110190000000 110190005916
+110193000000 110193005924
+110196000000 110196005920
+110199000000 110199005926
+110202000000 110202005917
+110205000000 110205005933
+110208000000 110208005903
+110211000000 110211005924
+110214000000 110214005919
+110217000000 110217005928
+110220000000 110220005917
+110223000000 110223005941
+110226000000 110226005922
+110229000000 110229005907
+110232000000 110232005921
+110235000000 110235005924
+110238000000 110238005927
+110241000000 110241005928
+110244000000 110244005938
+110247000000 110247005927
+110250000000 110250005931
+110253000000 110253005922
+110256000000 110256005920
+110259000000 110259005922
+110262000000 110262005921
+110265000000 110265005887
+110268000000 110268005917
+110271000000 110271005911
+110274000000 110274005927
+110277000000 110277005903
+110280000000 110280005915
+110283000000 110283005928
+110286000000 110286005930
+110289000000 110289005919
+110292000000 110292005861
+110295000000 110295005859
+110298000000 110298005931
+110301000000 110301005846
+110304000000 110304005920
+110307000000 110307005932
+110310000000 110310005924
+110313000000 110313005924
+110316000000 110316005883
+110319000000 110319005908
+110322000000 110322005831
+110325000000 110325005912
+110328000000 110328005924
+110331000000 110331005927
+110334000000 110334005894
+110337000000 110337005905
+110340000000 110340005923
+110343000000 110343005919
+110346000000 110346005927
+110349000000 110349005926
+110352000000 110352005920
+110355000000 110355005945
+110358000000 110358005924
+110361000000 110361005928
+110364000000 110364005913
+110367000000 110367005911
+110370000000 110370005882
+110373000000 110373005912
+110376000000 110376005920
+110379000000 110379005937
+110382000000 110382005927
+110385000000 110385005877
+110388000000 110388005931
+110391000000 110391005925
+110394000000 110394005919
+110397000000 110397005919
+110400000000 110400005933
+110403000000 110403005924
+110406000000 110406005930
+110409000000 110409005919
+110412000000 110412005869
+110415000000 110415005928
+110418000000 110418005924
+110421000000 110421005911
+110424000000 110424005922
+110427000000 110427005840
+110430000000 110430005923
+110433000000 110433005915
+110436000000 110436005916
+110439000000 110439005927
+110442000000 110442005927
+110445000000 110445005881
+110448000000 110448005936
+110451000000 110451005901
+110454000000 110454005929
+110457000000 110457005928
+110460000000 110460005922
+110463000000 110463005877
+110466000000 110466005946
+110469000000 110469005925
+110472000000 110472005933
+110475000000 110475005919
+110478000000 110478005923
+110481000000 110481005925
+110484000000 110484005915
+110487000000 110487005911
+110490000000 110490005919
+110493000000 110493005915
+110496000000 110496005921
+110499000000 110499005912
+110502000000 110502005928
+110505000000 110505005898
+110508000000 110508005919
+110511000000 110511005914
+110514000000 110514005923
+110517000000 110517005912
+110520000000 110520005936
+110523000000 110523005917
+110526000000 110526005902
+110529000000 110529005916
+110532000000 110532005919
+110535000000 110535005922
+110538000000 110538005923
+110541000000 110541005933
+110544000000 110544005922
+110547000000 110547005926
+110550000000 110550005917
+110553000000 110553005915
+110556000000 110556005917
+110559000000 110559005916
+110562000000 110562005882
+110565000000 110565005912
+110568000000 110568005906
+110571000000 110571005922
+110574000000 110574005898
+110577000000 110577005910
+110580000000 110580005923
+110583000000 110583005925
+110586000000 110586005914
+110589000000 110589005856
+110592000000 110592005854
+110595000000 110595005926
+110598000000 110598005841
+110601000000 110601005915
+110604000000 110604005927
+110607000000 110607005919
+110610000000 110610005919
+110613000000 110613005878
+110616000000 110616005903
+110619000000 110619005826
+110622000000 110622005907
+110625000000 110625005919
+110628000000 110628005922
+110631000000 110631005889
+110634000000 110634005900
+110637000000 110637005918
+110640000000 110640005914
+110643000000 110643005922
+110646000000 110646005921
+110649000000 110649005915
+110652000000 110652005940
+110655000000 110655005919
+110658000000 110658005923
+110661000000 110661005908
+110664000000 110664005906
+110667000000 110667005877
+110670000000 110670005907
+110673000000 110673005915
+110676000000 110676005932
+110679000000 110679005922
+110682000000 110682005872
+110685000000 110685005926
+110688000000 110688005920
+110691000000 110691005914
+110694000000 110694005914
+110697000000 110697005928
+110700000000 110700005919
+110703000000 110703005925
+110706000000 110706005914
+110709000000 110709005864
+110712000000 110712005923
+110715000000 110715005919
+110718000000 110718005906
+110721000000 110721005917
+110724000000 110724005835
+110727000000 110727005918
+110730000000 110730005910
+110733000000 110733005911
+110736000000 110736005922
+110739000000 110739005922
+110742000000 110742005876
+110745000000 110745005931
+110748000000 110748005896
+110751000000 110751005924
+110754000000 110754005923
+110757000000 110757005917
+110760000000 110760005872
+110763000000 110763005941
+110766000000 110766005920
+110769000000 110769005928
+110772000000 110772005914
+110775000000 110775005918
+110778000000 110778005920
+110781000000 110781005910
+110784000000 110784005906
+110787000000 110787005914
+110790000000 110790005910
+110793000000 110793005916
+110796000000 110796005907
+110799000000 110799005923
+110802000000 110802005893
+110805000000 110805005914
+110808000000 110808005909
+110811000000 110811005918
+110814000000 110814005907
+110817000000 110817005931
+110820000000 110820005912
+110823000000 110823005897
+110826000000 110826005911
+110829000000 110829005914
+110832000000 110832005917
+110835000000 110835005918
+110838000000 110838005928
+110841000000 110841005917
+110844000000 110844005921
+110847000000 110847005912
+110850000000 110850005910
+110853000000 110853005912
+110856000000 110856005911
+110859000000 110859005877
+110862000000 110862005907
+110865000000 110865005901
+110868000000 110868005917
+110871000000 110871005893
+110874000000 110874005905
+110877000000 110877005918
+110880000000 110880005920
+110883000000 110883005909
+110886000000 110886005851
+110889000000 110889005849
+110892000000 110892005921
+110895000000 110895005836
+110898000000 110898005910
+110901000000 110901005922
+110904000000 110904005914
+110907000000 110907005914
+110910000000 110910005873
+110913000000 110913005898
+110916000000 110916005821
+110919000000 110919005902
+110922000000 110922005914
+110925000000 110925005917
+110928000000 110928005884
+110931000000 110931005895
+110934000000 110934005913
+110937000000 110937005909
+110940000000 110940005917
+110943000000 110943005916
+110946000000 110946005910
+110949000000 110949005935
+110952000000 110952005914
+110955000000 110955005918
+110958000000 110958005903
+110961000000 110961005901
+110964000000 110964005872
+110967000000 110967005902
+110970000000 110970005910
+110973000000 110973005927
+110976000000 110976005917
+110979000000 110979005867
+110982000000 110982005921
+110985000000 110985005915
+110988000000 110988005909
+110991000000 110991005909
+110994000000 110994005923
+110997000000 110997005914
+111000000000 111000005920
+111003000000 111003005909
+111006000000 111006005859
+111009000000 111009005918
+111012000000 111012005914
+111015000000 111015005901
+111018000000 111018005912
+111021000000 111021005830
+111024000000 111024005913
+111027000000 111027005905
+111030000000 111030005906
+111033000000 111033005917
+111036000000 111036005917
+111039000000 111039005871
+111042000000 111042005926
+111045000000 111045005891
+111048000000 111048005919
+111051000000 111051005918
+111054000000 111054005912
+111057000000 111057005867
+111060000000 111060005936
+111063000000 111063005915
+111066000000 111066005923
+111069000000 111069005909
+111072000000 111072005913
+111075000000 111075005915
+111078000000 111078005905
+111081000000 111081005901
+111084000000 111084005909
+111087000000 111087005905
+111090000000 111090005911
+111093000000 111093005902
+111096000000 111096005918
+111099000000 111099005888
+111102000000 111102005909
+111105000000 111105005904
+111108000000 111108005913
+111111000000 111111005902
+111114000000 111114005926
+111117000000 111117005907
+111120000000 111120005892
+111123000000 111123005906
+111126000000 111126005909
+111129000000 111129005912
+111132000000 111132005913
+111135000000 111135005923
+111138000000 111138005912
+111141000000 111141005916
+111144000000 111144005907
+111147000000 111147005905
+111150000000 111150005907
+111153000000 111153005906
+111156000000 111156005872
+111159000000 111159005902
+111162000000 111162005896
+111165000000 111165005912
+111168000000 111168005888
+111171000000 111171005900
+111174000000 111174005913
+111177000000 111177005915
+111180000000 111180005904
+111183000000 111183005846
+111186000000 111186005844
+111189000000 111189005916
+111192000000 111192005831
+111195000000 111195005905
+111198000000 111198005917
+111201000000 111201005909
+111204000000 111204005909
+111207000000 111207005868
+111210000000 111210005893
+111213000000 111213005816
+111216000000 111216005897
+111219000000 111219005909
+111222000000 111222005912
+111225000000 111225005879
+111228000000 111228005890
+111231000000 111231005908
+111234000000 111234005904
+111237000000 111237005912
+111240000000 111240005911
+111243000000 111243005905
+111246000000 111246005930
+111249000000 111249005909
+111252000000 111252005913
+111255000000 111255005898
+111258000000 111258005896
+111261000000 111261005867
+111264000000 111264005897
+111267000000 111267005905
+111270000000 111270005922
+111273000000 111273005912
+111276000000 111276005862
+111279000000 111279005916
+111282000000 111282005910
+111285000000 111285005904
+111288000000 111288005904
+111291000000 111291005918
+111294000000 111294005909
+111297000000 111297005915
+111300000000 111300005904
+111303000000 111303005854
+111306000000 111306005913
+111309000000 111309005909
+111312000000 111312005896
+111315000000 111315005907
+111318000000 111318005825
+111321000000 111321005908
+111324000000 111324005900
+111327000000 111327005901
+111330000000 111330005912
+111333000000 111333005912
+111336000000 111336005866
+111339000000 111339005921
+111342000000 111342005886
+111345000000 111345005914
+111348000000 111348005913
+111351000000 111351005907
+111354000000 111354005862
+111357000000 111357005931
+111360000000 111360005910
+111363000000 111363005918
+111366000000 111366005904
+111369000000 111369005908
+111372000000 111372005910
+111375000000 111375005900
+111378000000 111378005896
+111381000000 111381005904
+111384000000 111384005900
+111387000000 111387005906
+111390000000 111390005897
+111393000000 111393005913
+111396000000 111396005883
+111399000000 111399005904
+111402000000 111402005899
+111405000000 111405005908
+111408000000 111408005897
+111411000000 111411005921
+111414000000 111414005902
+111417000000 111417005887
+111420000000 111420005901
+111423000000 111423005904
+111426000000 111426005907
+111429000000 111429005908
+111432000000 111432005918
+111435000000 111435005907
+111438000000 111438005911
+111441000000 111441005902
+111444000000 111444005900
+111447000000 111447005902
+111450000000 111450005901
+111453000000 111453005867
+111456000000 111456005897
+111459000000 111459005891
+111462000000 111462005907
+111465000000 111465005883
+111468000000 111468005895
+111471000000 111471005908
+111474000000 111474005910
+111477000000 111477005899
+111480000000 111480005841
+111483000000 111483005839
+111486000000 111486005911
+111489000000 111489005826
+111492000000 111492005900
+111495000000 111495005912
+111498000000 111498005904
+111501000000 111501005904
+111504000000 111504005863
+111507000000 111507005888
+111510000000 111510005811
+111513000000 111513005892
+111516000000 111516005904
+111519000000 111519005907
+111522000000 111522005874
+111525000000 111525005885
+111528000000 111528005903
+111531000000 111531005899
+111534000000 111534005907
+111537000000 111537005906
+111540000000 111540005900
+111543000000 111543005925
+111546000000 111546005904
+111549000000 111549005908
+111552000000 111552005893
+111555000000 111555005891
+111558000000 111558005862
+111561000000 111561005892
+111564000000 111564005900
+111567000000 111567005917
+111570000000 111570005907
+111573000000 111573005857
+111576000000 111576005911
+111579000000 111579005905
+111582000000 111582005899
+111585000000 111585005899
+111588000000 111588005913
+111591000000 111591005904
+111594000000 111594005910
+111597000000 111597005899
+111600000000 111600005849
+111603000000 111603005908
+111606000000 111606005904
+111609000000 111609005891
+111612000000 111612005902
+111615000000 111615005820
+111618000000 111618005903
+111621000000 111621005895
+111624000000 111624005896
+111627000000 111627005907
+111630000000 111630005907
+111633000000 111633005861
+111636000000 111636005916
+111639000000 111639005881
+111642000000 111642005909
+111645000000 111645005908
+111648000000 111648005902
+111651000000 111651005857
+111654000000 111654005926
+111657000000 111657005905
+111660000000 111660005913
+111663000000 111663005899
+111666000000 111666005903
+111669000000 111669005905
+111672000000 111672005895
+111675000000 111675005891
+111678000000 111678005899
+111681000000 111681005895
+111684000000 111684005901
+111687000000 111687005892
+111690000000 111690005908
+111693000000 111693005878
+111696000000 111696005899
+111699000000 111699005894
+111702000000 111702005903
+111705000000 111705005892
+111708000000 111708005916
+111711000000 111711005897
+111714000000 111714005882
+111717000000 111717005896
+111720000000 111720005899
+111723000000 111723005902
+111726000000 111726005903
+111729000000 111729005913
+111732000000 111732005902
+111735000000 111735005906
+111738000000 111738005897
+111741000000 111741005895
+111744000000 111744005897
+111747000000 111747005896
+111750000000 111750005862
+111753000000 111753005892
+111756000000 111756005886
+111759000000 111759005902
+111762000000 111762005878
+111765000000 111765005890
+111768000000 111768005903
+111771000000 111771005905
+111774000000 111774005894
+111777000000 111777005836
+111780000000 111780005834
+111783000000 111783005906
+111786000000 111786005821
+111789000000 111789005895
+111792000000 111792005907
+111795000000 111795005899
+111798000000 111798005899
+111801000000 111801005858
+111804000000 111804005883
+111807000000 111807005806
+111810000000 111810005887
+111813000000 111813005899
+111816000000 111816005902
+111819000000 111819005869
+111822000000 111822005880
+111825000000 111825005898
+111828000000 111828005894
+111831000000 111831005902
+111834000000 111834005901
+111837000000 111837005895
+111840000000 111840005920
+111843000000 111843005899
+111846000000 111846005903
+111849000000 111849005888
+111852000000 111852005886
+111855000000 111855005857
+111858000000 111858005887
+111861000000 111861005895
+111864000000 111864005912
+111867000000 111867005902
+111870000000 111870005852
+111873000000 111873005906
+111876000000 111876005900
+111879000000 111879005894
+111882000000 111882005894
+111885000000 111885005908
+111888000000 111888005899
+111891000000 111891005905
+111894000000 111894005894
+111897000000 111897005844
+111900000000 111900005903
+111903000000 111903005899
+111906000000 111906005886
+111909000000 111909005897
+111912000000 111912005815
+111915000000 111915005898
+111918000000 111918005890
+111921000000 111921005891
+111924000000 111924005902
+111927000000 111927005902
+111930000000 111930005856
+111933000000 111933005911
+111936000000 111936005876
+111939000000 111939005904
+111942000000 111942005903
+111945000000 111945005897
+111948000000 111948005852
+111951000000 111951005921
+111954000000 111954005900
+111957000000 111957005908
+111960000000 111960005894
+111963000000 111963005898
+111966000000 111966005900
+111969000000 111969005890
+111972000000 111972005886
+111975000000 111975005894
+111978000000 111978005890
+111981000000 111981005896
+111984000000 111984005887
+111987000000 111987005903
+111990000000 111990005873
+111993000000 111993005894
+111996000000 111996005889
+111999000000 111999005898
+112002000000 112002005887
+112005000000 112005005911
+112008000000 112008005892
+112011000000 112011005877
+112014000000 112014005891
+112017000000 112017005894
+112020000000 112020005897
+112023000000 112023005898
+112026000000 112026005908
+112029000000 112029005897
+112032000000 112032005901
+112035000000 112035005892
+112038000000 112038005890
+112041000000 112041005892
+112044000000 112044005891
+112047000000 112047005857
+112050000000 112050005887
+112053000000 112053005881
+112056000000 112056005897
+112059000000 112059005873
+112062000000 112062005885
+112065000000 112065005898
+112068000000 112068005900
+112071000000 112071005889
+112074000000 112074005831
+112077000000 112077005829
+112080000000 112080005901
+112083000000 112083005816
+112086000000 112086005890
+112089000000 112089005902
+112092000000 112092005894
+112095000000 112095005894
+112098000000 112098005853
+112101000000 112101005878
+112104000000 112104005801
+112107000000 112107005882
+112110000000 112110005894
+112113000000 112113005897
+112116000000 112116005864
+112119000000 112119005875
+112122000000 112122005893
+112125000000 112125005889
+112128000000 112128005897
+112131000000 112131005896
+112134000000 112134005890
+112137000000 112137005915
+112140000000 112140005894
+112143000000 112143005898
+112146000000 112146005883
+112149000000 112149005881
+112152000000 112152005852
+112155000000 112155005882
+112158000000 112158005890
+112161000000 112161005907
+112164000000 112164005897
+112167000000 112167005847
+112170000000 112170005901
+112173000000 112173005895
+112176000000 112176005889
+112179000000 112179005889
+112182000000 112182005903
+112185000000 112185005894
+112188000000 112188005900
+112191000000 112191005889
+112194000000 112194005839
+112197000000 112197005898
+112200000000 112200005894
+112203000000 112203005881
+112206000000 112206005892
+112209000000 112209005810
+112212000000 112212005893
+112215000000 112215005885
+112218000000 112218005886
+112221000000 112221005897
+112224000000 112224005897
+112227000000 112227005851
+112230000000 112230005906
+112233000000 112233005871
+112236000000 112236005899
+112239000000 112239005898
+112242000000 112242005892
+112245000000 112245005847
+112248000000 112248005916
+112251000000 112251005895
+112254000000 112254005903
+112257000000 112257005889
+112260000000 112260005893
+112263000000 112263005895
+112266000000 112266005885
+112269000000 112269005881
+112272000000 112272005889
+112275000000 112275005885
+112278000000 112278005891
+112281000000 112281005882
+112284000000 112284005898
+112287000000 112287005868
+112290000000 112290005889
+112293000000 112293005884
+112296000000 112296005893
+112299000000 112299005882
+112302000000 112302005906
+112305000000 112305005887
+112308000000 112308005872
+112311000000 112311005886
+112314000000 112314005889
+112317000000 112317005892
+112320000000 112320005893
+112323000000 112323005903
+112326000000 112326005892
+112329000000 112329005896
+112332000000 112332005887
+112335000000 112335005885
+112338000000 112338005887
+112341000000 112341005886
+112344000000 112344005852
+112347000000 112347005882
+112350000000 112350005876
+112353000000 112353005892
+112356000000 112356005868
+112359000000 112359005880
+112362000000 112362005893
+112365000000 112365005895
+112368000000 112368005884
+112371000000 112371005826
+112374000000 112374005824
+112377000000 112377005896
+112380000000 112380005811
+112383000000 112383005885
+112386000000 112386005897
+112389000000 112389005889
+112392000000 112392005889
+112395000000 112395005848
+112398000000 112398005873
+112401000000 112401005796
+112404000000 112404005877
+112407000000 112407005889
+112410000000 112410005892
+112413000000 112413005859
+112416000000 112416005870
+112419000000 112419005888
+112422000000 112422005884
+112425000000 112425005892
+112428000000 112428005891
+112431000000 112431005885
+112434000000 112434005910
+112437000000 112437005889
+112440000000 112440005893
+112443000000 112443005878
+112446000000 112446005876
+112449000000 112449005847
+112452000000 112452005877
+112455000000 112455005885
+112458000000 112458005902
+112461000000 112461005892
+112464000000 112464005842
+112467000000 112467005896
+112470000000 112470005890
+112473000000 112473005884
+112476000000 112476005884
+112479000000 112479005898
+112482000000 112482005889
+112485000000 112485005895
+112488000000 112488005884
+112491000000 112491005834
+112494000000 112494005893
+112497000000 112497005889
+112500000000 112500005876
+112503000000 112503005887
+112506000000 112506005805
+112509000000 112509005888
+112512000000 112512005880
+112515000000 112515005881
+112518000000 112518005892
+112521000000 112521005892
+112524000000 112524005846
+112527000000 112527005901
+112530000000 112530005866
+112533000000 112533005894
+112536000000 112536005893
+112539000000 112539005887
+112542000000 112542005842
+112545000000 112545005911
+112548000000 112548005890
+112551000000 112551005898
+112554000000 112554005884
+112557000000 112557005888
+112560000000 112560005890
+112563000000 112563005880
+112566000000 112566005876
+112569000000 112569005884
+112572000000 112572005880
+112575000000 112575005886
+112578000000 112578005877
+112581000000 112581005893
+112584000000 112584005863
+112587000000 112587005884
+112590000000 112590005879
+112593000000 112593005888
+112596000000 112596005877
+112599000000 112599005901
+112602000000 112602005882
+112605000000 112605005867
+112608000000 112608005881
+112611000000 112611005884
+112614000000 112614005887
+112617000000 112617005888
+112620000000 112620005898
+112623000000 112623005887
+112626000000 112626005891
+112629000000 112629005882
+112632000000 112632005880
+112635000000 112635005882
+112638000000 112638005881
+112641000000 112641005847
+112644000000 112644005877
+112647000000 112647005871
+112650000000 112650005887
+112653000000 112653005863
+112656000000 112656005875
+112659000000 112659005888
+112662000000 112662005890
+112665000000 112665005879
+112668000000 112668005821
+112671000000 112671005819
+112674000000 112674005891
+112677000000 112677005806
+112680000000 112680005880
+112683000000 112683005892
+112686000000 112686005884
+112689000000 112689005884
+112692000000 112692005843
+112695000000 112695005868
+112698000000 112698005791
+112701000000 112701005872
+112704000000 112704005884
+112707000000 112707005887
+112710000000 112710005854
+112713000000 112713005865
+112716000000 112716005883
+112719000000 112719005879
+112722000000 112722005887
+112725000000 112725005886
+112728000000 112728005880
+112731000000 112731005905
+112734000000 112734005884
+112737000000 112737005888
+112740000000 112740005873
+112743000000 112743005871
+112746000000 112746005842
+112749000000 112749005872
+112752000000 112752005880
+112755000000 112755005897
+112758000000 112758005887
+112761000000 112761005837
+112764000000 112764005891
+112767000000 112767005885
+112770000000 112770005879
+112773000000 112773005879
+112776000000 112776005893
+112779000000 112779005884
+112782000000 112782005890
+112785000000 112785005879
+112788000000 112788005829
+112791000000 112791005888
+112794000000 112794005884
+112797000000 112797005871
+112800000000 112800005882
+112803000000 112803005800
+112806000000 112806005883
+112809000000 112809005875
+112812000000 112812005876
+112815000000 112815005887
+112818000000 112818005887
+112821000000 112821005841
+112824000000 112824005896
+112827000000 112827005861
+112830000000 112830005889
+112833000000 112833005888
+112836000000 112836005882
+112839000000 112839005837
+112842000000 112842005906
+112845000000 112845005885
+112848000000 112848005893
+112851000000 112851005879
+112854000000 112854005883
+112857000000 112857005885
+112860000000 112860005875
+112863000000 112863005871
+112866000000 112866005879
+112869000000 112869005875
+112872000000 112872005881
+112875000000 112875005872
+112878000000 112878005888
+112881000000 112881005858
+112884000000 112884005879
+112887000000 112887005874
+112890000000 112890005883
+112893000000 112893005872
+112896000000 112896005896
+112899000000 112899005877
+112902000000 112902005862
+112905000000 112905005876
+112908000000 112908005879
+112911000000 112911005882
+112914000000 112914005883
+112917000000 112917005893
+112920000000 112920005882
+112923000000 112923005886
+112926000000 112926005877
+112929000000 112929005875
+112932000000 112932005877
+112935000000 112935005876
+112938000000 112938005842
+112941000000 112941005872
+112944000000 112944005866
+112947000000 112947005882
+112950000000 112950005858
+112953000000 112953005870
+112956000000 112956005883
+112959000000 112959005885
+112962000000 112962005874
+112965000000 112965005816
+112968000000 112968005814
+112971000000 112971005886
+112974000000 112974005801
+112977000000 112977005875
+112980000000 112980005887
+112983000000 112983005879
+112986000000 112986005879
+112989000000 112989005838
+112992000000 112992005863
+112995000000 112995005786
+112998000000 112998005867
+113001000000 113001005879
+113004000000 113004005882
+113007000000 113007005849
+113010000000 113010005860
+113013000000 113013005878
+113016000000 113016005874
+113019000000 113019005882
+113022000000 113022005881
+113025000000 113025005875
+113028000000 113028005900
+113031000000 113031005879
+113034000000 113034005883
+113037000000 113037005868
+113040000000 113040005866
+113043000000 113043005837
+113046000000 113046005867
+113049000000 113049005875
+113052000000 113052005892
+113055000000 113055005882
+113058000000 113058005832
+113061000000 113061005886
+113064000000 113064005880
+113067000000 113067005874
+113070000000 113070005874
+113073000000 113073005888
+113076000000 113076005879
+113079000000 113079005885
+113082000000 113082005874
+113085000000 113085005824
+113088000000 113088005883
+113091000000 113091005879
+113094000000 113094005866
+113097000000 113097005877
+113100000000 113100005795
+113103000000 113103005878
+113106000000 113106005870
+113109000000 113109005871
+113112000000 113112005882
+113115000000 113115005882
+113118000000 113118005836
+113121000000 113121005891
+113124000000 113124005856
+113127000000 113127005884
+113130000000 113130005883
+113133000000 113133005877
+113136000000 113136005832
+113139000000 113139005901
+113142000000 113142005880
+113145000000 113145005888
+113148000000 113148005874
+113151000000 113151005878
+113154000000 113154005880
+113157000000 113157005870
+113160000000 113160005866
+113163000000 113163005874
+113166000000 113166005870
+113169000000 113169005876
+113172000000 113172005867
+113175000000 113175005883
+113178000000 113178005853
+113181000000 113181005874
+113184000000 113184005869
+113187000000 113187005878
+113190000000 113190005867
+113193000000 113193005891
+113196000000 113196005872
+113199000000 113199005857
+113202000000 113202005871
+113205000000 113205005874
+113208000000 113208005877
+113211000000 113211005878
+113214000000 113214005888
+113217000000 113217005877
+113220000000 113220005881
+113223000000 113223005872
+113226000000 113226005870
+113229000000 113229005872
+113232000000 113232005871
+113235000000 113235005837
+113238000000 113238005867
+113241000000 113241005861
+113244000000 113244005877
+113247000000 113247005853
+113250000000 113250005865
+113253000000 113253005878
+113256000000 113256005880
+113259000000 113259005869
+113262000000 113262005811
+113265000000 113265005809
+113268000000 113268005881
+113271000000 113271005796
+113274000000 113274005870
+113277000000 113277005882
+113280000000 113280005874
+113283000000 113283005874
+113286000000 113286005833
+113289000000 113289005858
+113292000000 113292005781
+113295000000 113295005862
+113298000000 113298005874
+113301000000 113301005877
+113304000000 113304005844
+113307000000 113307005855
+113310000000 113310005873
+113313000000 113313005869
+113316000000 113316005877
+113319000000 113319005876
+113322000000 113322005870
+113325000000 113325005895
+113328000000 113328005874
+113331000000 113331005878
+113334000000 113334005863
+113337000000 113337005861
+113340000000 113340005832
+113343000000 113343005862
+113346000000 113346005870
+113349000000 113349005887
+113352000000 113352005877
+113355000000 113355005827
+113358000000 113358005881
+113361000000 113361005875
+113364000000 113364005869
+113367000000 113367005869
+113370000000 113370005883
+113373000000 113373005874
+113376000000 113376005880
+113379000000 113379005869
+113382000000 113382005819
+113385000000 113385005878
+113388000000 113388005874
+113391000000 113391005861
+113394000000 113394005872
+113397000000 113397005790
+113400000000 113400005873
+113403000000 113403005865
+113406000000 113406005866
+113409000000 113409005877
+113412000000 113412005877
+113415000000 113415005831
+113418000000 113418005886
+113421000000 113421005851
+113424000000 113424005879
+113427000000 113427005878
+113430000000 113430005872
+113433000000 113433005827
+113436000000 113436005896
+113439000000 113439005875
+113442000000 113442005883
+113445000000 113445005869
+113448000000 113448005873
+113451000000 113451005875
+113454000000 113454005865
+113457000000 113457005861
+113460000000 113460005869
+113463000000 113463005865
+113466000000 113466005871
+113469000000 113469005862
+113472000000 113472005878
+113475000000 113475005848
+113478000000 113478005869
+113481000000 113481005864
+113484000000 113484005873
+113487000000 113487005862
+113490000000 113490005886
+113493000000 113493005867
+113496000000 113496005852
+113499000000 113499005866
+113502000000 113502005869
+113505000000 113505005872
+113508000000 113508005873
+113511000000 113511005883
+113514000000 113514005872
+113517000000 113517005876
+113520000000 113520005867
+113523000000 113523005865
+113526000000 113526005867
+113529000000 113529005866
+113532000000 113532005832
+113535000000 113535005862
+113538000000 113538005856
+113541000000 113541005872
+113544000000 113544005848
+113547000000 113547005860
+113550000000 113550005873
+113553000000 113553005875
+113556000000 113556005864
+113559000000 113559005806
+113562000000 113562005804
+113565000000 113565005876
+113568000000 113568005791
+113571000000 113571005865
+113574000000 113574005877
+113577000000 113577005869
+113580000000 113580005869
+113583000000 113583005828
+113586000000 113586005853
+113589000000 113589005776
+113592000000 113592005857
+113595000000 113595005869
+113598000000 113598005872
+113601000000 113601005839
+113604000000 113604005850
+113607000000 113607005868
+113610000000 113610005864
+113613000000 113613005872
+113616000000 113616005871
+113619000000 113619005865
+113622000000 113622005890
+113625000000 113625005869
+113628000000 113628005873
+113631000000 113631005858
+113634000000 113634005856
+113637000000 113637005827
+113640000000 113640005857
+113643000000 113643005865
+113646000000 113646005882
+113649000000 113649005872
+113652000000 113652005822
+113655000000 113655005876
+113658000000 113658005870
+113661000000 113661005864
+113664000000 113664005864
+113667000000 113667005878
+113670000000 113670005869
+113673000000 113673005875
+113676000000 113676005864
+113679000000 113679005814
+113682000000 113682005873
+113685000000 113685005869
+113688000000 113688005856
+113691000000 113691005867
+113694000000 113694005785
+113697000000 113697005868
+113700000000 113700005860
+113703000000 113703005861
+113706000000 113706005872
+113709000000 113709005872
+113712000000 113712005826
+113715000000 113715005881
+113718000000 113718005846
+113721000000 113721005874
+113724000000 113724005873
+113727000000 113727005867
+113730000000 113730005822
+113733000000 113733005891
+113736000000 113736005870
+113739000000 113739005878
+113742000000 113742005864
+113745000000 113745005868
+113748000000 113748005870
+113751000000 113751005860
+113754000000 113754005856
+113757000000 113757005864
+113760000000 113760005860
+113763000000 113763005866
+113766000000 113766005857
+113769000000 113769005873
+113772000000 113772005843
+113775000000 113775005864
+113778000000 113778005859
+113781000000 113781005868
+113784000000 113784005857
+113787000000 113787005881
+113790000000 113790005862
+113793000000 113793005847
+113796000000 113796005861
+113799000000 113799005864
+113802000000 113802005867
+113805000000 113805005868
+113808000000 113808005878
+113811000000 113811005867
+113814000000 113814005871
+113817000000 113817005862
+113820000000 113820005860
+113823000000 113823005862
+113826000000 113826005861
+113829000000 113829005827
+113832000000 113832005857
+113835000000 113835005851
+113838000000 113838005867
+113841000000 113841005843
+113844000000 113844005855
+113847000000 113847005868
+113850000000 113850005870
+113853000000 113853005859
+113856000000 113856005801
+113859000000 113859005799
+113862000000 113862005871
+113865000000 113865005786
+113868000000 113868005860
+113871000000 113871005872
+113874000000 113874005864
+113877000000 113877005864
+113880000000 113880005823
+113883000000 113883005848
+113886000000 113886005771
+113889000000 113889005852
+113892000000 113892005864
+113895000000 113895005867
+113898000000 113898005834
+113901000000 113901005845
+113904000000 113904005863
+113907000000 113907005859
+113910000000 113910005867
+113913000000 113913005866
+113916000000 113916005860
+113919000000 113919005885
+113922000000 113922005864
+113925000000 113925005868
+113928000000 113928005853
+113931000000 113931005851
+113934000000 113934005822
+113937000000 113937005852
+113940000000 113940005860
+113943000000 113943005877
+113946000000 113946005867
+113949000000 113949005817
+113952000000 113952005871
+113955000000 113955005865
+113958000000 113958005859
+113961000000 113961005859
+113964000000 113964005873
+113967000000 113967005864
+113970000000 113970005870
+113973000000 113973005859
+113976000000 113976005809
+113979000000 113979005868
+113982000000 113982005864
+113985000000 113985005851
+113988000000 113988005862
+113991000000 113991005780
+113994000000 113994005863
+113997000000 113997005855
+114000000000 114000005856
+114003000000 114003005867
+114006000000 114006005867
+114009000000 114009005821
+114012000000 114012005876
+114015000000 114015005841
+114018000000 114018005869
+114021000000 114021005868
+114024000000 114024005862
+114027000000 114027005817
+114030000000 114030005886
+114033000000 114033005865
+114036000000 114036005873
+114039000000 114039005859
+114042000000 114042005863
+114045000000 114045005865
+114048000000 114048005855
+114051000000 114051005851
+114054000000 114054005859
+114057000000 114057005855
+114060000000 114060005861
+114063000000 114063005852
+114066000000 114066005868
+114069000000 114069005838
+114072000000 114072005859
+114075000000 114075005854
+114078000000 114078005863
+114081000000 114081005852
+114084000000 114084005876
+114087000000 114087005857
+114090000000 114090005842
+114093000000 114093005856
+114096000000 114096005859
+114099000000 114099005862
+114102000000 114102005863
+114105000000 114105005873
+114108000000 114108005862
+114111000000 114111005866
+114114000000 114114005857
+114117000000 114117005855
+114120000000 114120005857
+114123000000 114123005856
+114126000000 114126005822
+114129000000 114129005852
+114132000000 114132005846
+114135000000 114135005862
+114138000000 114138005838
+114141000000 114141005850
+114144000000 114144005863
+114147000000 114147005865
+114150000000 114150005854
+114153000000 114153005796
+114156000000 114156005794
+114159000000 114159005866
+114162000000 114162005781
+114165000000 114165005855
+114168000000 114168005867
+114171000000 114171005859
+114174000000 114174005859
+114177000000 114177005818
+114180000000 114180005843
+114183000000 114183005766
+114186000000 114186005847
+114189000000 114189005859
+114192000000 114192005862
+114195000000 114195005829
+114198000000 114198005840
+114201000000 114201005858
+114204000000 114204005854
+114207000000 114207005862
+114210000000 114210005861
+114213000000 114213005855
+114216000000 114216005880
+114219000000 114219005859
+114222000000 114222005863
+114225000000 114225005848
+114228000000 114228005846
+114231000000 114231005817
+114234000000 114234005847
+114237000000 114237005855
+114240000000 114240005872
+114243000000 114243005862
+114246000000 114246005812
+114249000000 114249005866
+114252000000 114252005860
+114255000000 114255005854
+114258000000 114258005854
+114261000000 114261005868
+114264000000 114264005859
+114267000000 114267005865
+114270000000 114270005854
+114273000000 114273005804
+114276000000 114276005863
+114279000000 114279005859
+114282000000 114282005846
+114285000000 114285005857
+114288000000 114288005775
+114291000000 114291005858
+114294000000 114294005850
+114297000000 114297005851
+114300000000 114300005862
+114303000000 114303005862
+114306000000 114306005816
+114309000000 114309005871
+114312000000 114312005836
+114315000000 114315005864
+114318000000 114318005863
+114321000000 114321005857
+114324000000 114324005812
+114327000000 114327005881
+114330000000 114330005860
+114333000000 114333005868
+114336000000 114336005854
+114339000000 114339005858
+114342000000 114342005860
+114345000000 114345005850
+114348000000 114348005846
+114351000000 114351005854
+114354000000 114354005850
+114357000000 114357005856
+114360000000 114360005847
+114363000000 114363005863
+114366000000 114366005833
+114369000000 114369005854
+114372000000 114372005849
+114375000000 114375005858
+114378000000 114378005847
+114381000000 114381005871
+114384000000 114384005852
+114387000000 114387005837
+114390000000 114390005851
+114393000000 114393005854
+114396000000 114396005857
+114399000000 114399005858
+114402000000 114402005868
+114405000000 114405005857
+114408000000 114408005861
+114411000000 114411005852
+114414000000 114414005850
+114417000000 114417005852
+114420000000 114420005851
+114423000000 114423005817
+114426000000 114426005847
+114429000000 114429005841
+114432000000 114432005857
+114435000000 114435005833
+114438000000 114438005845
+114441000000 114441005858
+114444000000 114444005860
+114447000000 114447005849
+114450000000 114450005791
+114453000000 114453005789
+114456000000 114456005861
+114459000000 114459005776
+114462000000 114462005850
+114465000000 114465005862
+114468000000 114468005854
+114471000000 114471005854
+114474000000 114474005813
+114477000000 114477005838
+114480000000 114480005761
+114483000000 114483005842
+114486000000 114486005854
+114489000000 114489005857
+114492000000 114492005824
+114495000000 114495005835
+114498000000 114498005853
+114501000000 114501005849
+114504000000 114504005857
+114507000000 114507005856
+114510000000 114510005850
+114513000000 114513005875
+114516000000 114516005854
+114519000000 114519005858
+114522000000 114522005843
+114525000000 114525005841
+114528000000 114528005812
+114531000000 114531005842
+114534000000 114534005850
+114537000000 114537005867
+114540000000 114540005857
+114543000000 114543005807
+114546000000 114546005861
+114549000000 114549005855
+114552000000 114552005849
+114555000000 114555005849
+114558000000 114558005863
+114561000000 114561005854
+114564000000 114564005860
+114567000000 114567005849
+114570000000 114570005799
+114573000000 114573005858
+114576000000 114576005854
+114579000000 114579005841
+114582000000 114582005852
+114585000000 114585005770
+114588000000 114588005853
+114591000000 114591005845
+114594000000 114594005846
+114597000000 114597005857
+114600000000 114600005857
+114603000000 114603005811
+114606000000 114606005866
+114609000000 114609005831
+114612000000 114612005859
+114615000000 114615005858
+114618000000 114618005852
+114621000000 114621005807
+114624000000 114624005876
+114627000000 114627005855
+114630000000 114630005863
+114633000000 114633005849
+114636000000 114636005853
+114639000000 114639005855
+114642000000 114642005845
+114645000000 114645005841
+114648000000 114648005849
+114651000000 114651005845
+114654000000 114654005851
+114657000000 114657005842
+114660000000 114660005858
+114663000000 114663005828
+114666000000 114666005849
+114669000000 114669005844
+114672000000 114672005853
+114675000000 114675005842
+114678000000 114678005866
+114681000000 114681005847
+114684000000 114684005832
+114687000000 114687005846
+114690000000 114690005849
+114693000000 114693005852
+114696000000 114696005853
+114699000000 114699005863
+114702000000 114702005852
+114705000000 114705005856
+114708000000 114708005847
+114711000000 114711005845
+114714000000 114714005847
+114717000000 114717005846
+114720000000 114720005812
+114723000000 114723005842
+114726000000 114726005836
+114729000000 114729005852
+114732000000 114732005828
+114735000000 114735005840
+114738000000 114738005853
+114741000000 114741005855
+114744000000 114744005844
+114747000000 114747005786
+114750000000 114750005784
+114753000000 114753005856
+114756000000 114756005771
+114759000000 114759005845
+114762000000 114762005857
+114765000000 114765005849
+114768000000 114768005849
+114771000000 114771005808
+114774000000 114774005833
+114777000000 114777005756
+114780000000 114780005837
+114783000000 114783005849
+114786000000 114786005852
+114789000000 114789005819
+114792000000 114792005830
+114795000000 114795005848
+114798000000 114798005844
+114801000000 114801005852
+114804000000 114804005851
+114807000000 114807005845
+114810000000 114810005870
+114813000000 114813005849
+114816000000 114816005853
+114819000000 114819005838
+114822000000 114822005836
+114825000000 114825005807
+114828000000 114828005837
+114831000000 114831005845
+114834000000 114834005862
+114837000000 114837005852
+114840000000 114840005802
+114843000000 114843005856
+114846000000 114846005850
+114849000000 114849005844
+114852000000 114852005844
+114855000000 114855005858
+114858000000 114858005849
+114861000000 114861005855
+114864000000 114864005844
+114867000000 114867005794
+114870000000 114870005853
+114873000000 114873005849
+114876000000 114876005836
+114879000000 114879005847
+114882000000 114882005765
+114885000000 114885005848
+114888000000 114888005840
+114891000000 114891005841
+114894000000 114894005852
+114897000000 114897005852
+114900000000 114900005806
+114903000000 114903005861
+114906000000 114906005826
+114909000000 114909005854
+114912000000 114912005853
+114915000000 114915005847
+114918000000 114918005802
+114921000000 114921005871
+114924000000 114924005850
+114927000000 114927005858
+114930000000 114930005844
+114933000000 114933005848
+114936000000 114936005850
+114939000000 114939005840
+114942000000 114942005836
+114945000000 114945005844
+114948000000 114948005840
+114951000000 114951005846
+114954000000 114954005837
+114957000000 114957005853
+114960000000 114960005823
+114963000000 114963005844
+114966000000 114966005839
+114969000000 114969005848
+114972000000 114972005837
+114975000000 114975005861
+114978000000 114978005842
+114981000000 114981005827
+114984000000 114984005841
+114987000000 114987005844
+114990000000 114990005847
+114993000000 114993005848
+114996000000 114996005858
+114999000000 114999005847
+115002000000 115002005851
+115005000000 115005005842
+115008000000 115008005840
+115011000000 115011005842
+115014000000 115014005841
+115017000000 115017005807
+115020000000 115020005837
+115023000000 115023005831
+115026000000 115026005847
+115029000000 115029005823
+115032000000 115032005835
+115035000000 115035005848
+115038000000 115038005850
+115041000000 115041005839
+115044000000 115044005781
+115047000000 115047005779
+115050000000 115050005851
+115053000000 115053005766
+115056000000 115056005840
+115059000000 115059005852
+115062000000 115062005844
+115065000000 115065005844
+115068000000 115068005803
+115071000000 115071005828
+115074000000 115074005751
+115077000000 115077005832
+115080000000 115080005844
+115083000000 115083005847
+115086000000 115086005814
+115089000000 115089005825
+115092000000 115092005843
+115095000000 115095005839
+115098000000 115098005847
+115101000000 115101005846
+115104000000 115104005840
+115107000000 115107005865
+115110000000 115110005844
+115113000000 115113005848
+115116000000 115116005833
+115119000000 115119005831
+115122000000 115122005802
+115125000000 115125005832
+115128000000 115128005840
+115131000000 115131005857
+115134000000 115134005847
+115137000000 115137005797
+115140000000 115140005851
+115143000000 115143005845
+115146000000 115146005839
+115149000000 115149005839
+115152000000 115152005853
+115155000000 115155005844
+115158000000 115158005850
+115161000000 115161005839
+115164000000 115164005789
+115167000000 115167005848
+115170000000 115170005844
+115173000000 115173005831
+115176000000 115176005842
+115179000000 115179005760
+115182000000 115182005843
+115185000000 115185005835
+115188000000 115188005836
+115191000000 115191005847
+115194000000 115194005847
+115197000000 115197005801
+115200000000 115200005856
+115203000000 115203005821
+115206000000 115206005849
+115209000000 115209005848
+115212000000 115212005842
+115215000000 115215005797
+115218000000 115218005866
+115221000000 115221005845
+115224000000 115224005853
+115227000000 115227005839
+115230000000 115230005843
+115233000000 115233005845
+115236000000 115236005835
+115239000000 115239005831
+115242000000 115242005839
+115245000000 115245005835
+115248000000 115248005841
+115251000000 115251005832
+115254000000 115254005848
+115257000000 115257005818
+115260000000 115260005839
+115263000000 115263005834
+115266000000 115266005843
+115269000000 115269005832
+115272000000 115272005856
+115275000000 115275005837
+115278000000 115278005822
+115281000000 115281005836
+115284000000 115284005839
+115287000000 115287005842
+115290000000 115290005843
+115293000000 115293005853
+115296000000 115296005842
+115299000000 115299005846
+115302000000 115302005837
+115305000000 115305005835
+115308000000 115308005837
+115311000000 115311005836
+115314000000 115314005802
+115317000000 115317005832
+115320000000 115320005826
+115323000000 115323005842
+115326000000 115326005818
+115329000000 115329005830
+115332000000 115332005843
+115335000000 115335005845
+115338000000 115338005834
+115341000000 115341005776
+115344000000 115344005774
+115347000000 115347005846
+115350000000 115350005761
+115353000000 115353005835
+115356000000 115356005847
+115359000000 115359005839
+115362000000 115362005839
+115365000000 115365005798
+115368000000 115368005823
+115371000000 115371005746
+115374000000 115374005827
+115377000000 115377005839
+115380000000 115380005842
+115383000000 115383005809
+115386000000 115386005820
+115389000000 115389005838
+115392000000 115392005834
+115395000000 115395005842
+115398000000 115398005841
+115401000000 115401005835
+115404000000 115404005860
+115407000000 115407005839
+115410000000 115410005843
+115413000000 115413005828
+115416000000 115416005826
+115419000000 115419005797
+115422000000 115422005827
+115425000000 115425005835
+115428000000 115428005852
+115431000000 115431005842
+115434000000 115434005792
+115437000000 115437005846
+115440000000 115440005840
+115443000000 115443005834
+115446000000 115446005834
+115449000000 115449005848
+115452000000 115452005839
+115455000000 115455005845
+115458000000 115458005834
+115461000000 115461005784
+115464000000 115464005843
+115467000000 115467005839
+115470000000 115470005826
+115473000000 115473005837
+115476000000 115476005755
+115479000000 115479005838
+115482000000 115482005830
+115485000000 115485005831
+115488000000 115488005842
+115491000000 115491005842
+115494000000 115494005796
+115497000000 115497005851
+115500000000 115500005816
+115503000000 115503005844
+115506000000 115506005843
+115509000000 115509005837
+115512000000 115512005792
+115515000000 115515005861
+115518000000 115518005840
+115521000000 115521005848
+115524000000 115524005834
+115527000000 115527005838
+115530000000 115530005840
+115533000000 115533005830
+115536000000 115536005826
+115539000000 115539005834
+115542000000 115542005830
+115545000000 115545005836
+115548000000 115548005827
+115551000000 115551005843
+115554000000 115554005813
+115557000000 115557005834
+115560000000 115560005829
+115563000000 115563005838
+115566000000 115566005827
+115569000000 115569005851
+115572000000 115572005832
+115575000000 115575005817
+115578000000 115578005831
+115581000000 115581005834
+115584000000 115584005837
+115587000000 115587005838
+115590000000 115590005848
+115593000000 115593005837
+115596000000 115596005841
+115599000000 115599005832
+115602000000 115602005830
+115605000000 115605005832
+115608000000 115608005831
+115611000000 115611005797
+115614000000 115614005827
+115617000000 115617005821
+115620000000 115620005837
+115623000000 115623005813
+115626000000 115626005825
+115629000000 115629005838
+115632000000 115632005840
+115635000000 115635005829
+115638000000 115638005771
+115641000000 115641005769
+115644000000 115644005841
+115647000000 115647005756
+115650000000 115650005830
+115653000000 115653005842
+115656000000 115656005834
+115659000000 115659005834
+115662000000 115662005793
+115665000000 115665005818
+115668000000 115668005741
+115671000000 115671005822
+115674000000 115674005834
+115677000000 115677005837
+115680000000 115680005804
+115683000000 115683005815
+115686000000 115686005833
+115689000000 115689005829
+115692000000 115692005837
+115695000000 115695005836
+115698000000 115698005830
+115701000000 115701005855
+115704000000 115704005834
+115707000000 115707005838
+115710000000 115710005823
+115713000000 115713005821
+115716000000 115716005792
+115719000000 115719005822
+115722000000 115722005830
+115725000000 115725005847
+115728000000 115728005837
+115731000000 115731005787
+115734000000 115734005841
+115737000000 115737005835
+115740000000 115740005829
+115743000000 115743005829
+115746000000 115746005843
+115749000000 115749005834
+115752000000 115752005840
+115755000000 115755005829
+115758000000 115758005779
+115761000000 115761005838
+115764000000 115764005834
+115767000000 115767005821
+115770000000 115770005832
+115773000000 115773005750
+115776000000 115776005833
+115779000000 115779005825
+115782000000 115782005826
+115785000000 115785005837
+115788000000 115788005837
+115791000000 115791005791
+115794000000 115794005846
+115797000000 115797005811
+115800000000 115800005839
+115803000000 115803005838
+115806000000 115806005832
+115809000000 115809005787
+115812000000 115812005856
+115815000000 115815005835
+115818000000 115818005843
+115821000000 115821005829
+115824000000 115824005833
+115827000000 115827005835
+115830000000 115830005825
+115833000000 115833005821
+115836000000 115836005829
+115839000000 115839005825
+115842000000 115842005831
+115845000000 115845005822
+115848000000 115848005838
+115851000000 115851005808
+115854000000 115854005829
+115857000000 115857005824
+115860000000 115860005833
+115863000000 115863005822
+115866000000 115866005846
+115869000000 115869005827
+115872000000 115872005812
+115875000000 115875005826
+115878000000 115878005829
+115881000000 115881005832
+115884000000 115884005833
+115887000000 115887005843
+115890000000 115890005832
+115893000000 115893005836
+115896000000 115896005827
+115899000000 115899005825
+115902000000 115902005827
+115905000000 115905005826
+115908000000 115908005792
+115911000000 115911005822
+115914000000 115914005816
+115917000000 115917005832
+115920000000 115920005808
+115923000000 115923005820
+115926000000 115926005833
+115929000000 115929005835
+115932000000 115932005824
+115935000000 115935005766
+115938000000 115938005764
+115941000000 115941005836
+115944000000 115944005751
+115947000000 115947005825
+115950000000 115950005837
+115953000000 115953005829
+115956000000 115956005829
+115959000000 115959005788
+115962000000 115962005813
+115965000000 115965005736
+115968000000 115968005817
+115971000000 115971005829
+115974000000 115974005832
+115977000000 115977005799
+115980000000 115980005810
+115983000000 115983005828
+115986000000 115986005824
+115989000000 115989005832
+115992000000 115992005831
+115995000000 115995005825
+115998000000 115998005850
+116001000000 116001005829
+116004000000 116004005833
+116007000000 116007005818
+116010000000 116010005816
+116013000000 116013005787
+116016000000 116016005817
+116019000000 116019005825
+116022000000 116022005842
+116025000000 116025005832
+116028000000 116028005782
+116031000000 116031005836
+116034000000 116034005830
+116037000000 116037005824
+116040000000 116040005824
+116043000000 116043005838
+116046000000 116046005829
+116049000000 116049005835
+116052000000 116052005824
+116055000000 116055005774
+116058000000 116058005833
+116061000000 116061005829
+116064000000 116064005816
+116067000000 116067005827
+116070000000 116070005745
+116073000000 116073005828
+116076000000 116076005820
+116079000000 116079005821
+116082000000 116082005832
+116085000000 116085005832
+116088000000 116088005786
+116091000000 116091005841
+116094000000 116094005806
+116097000000 116097005834
+116100000000 116100005833
+116103000000 116103005827
+116106000000 116106005782
+116109000000 116109005851
+116112000000 116112005830
+116115000000 116115005838
+116118000000 116118005824
+116121000000 116121005828
+116124000000 116124005830
+116127000000 116127005820
+116130000000 116130005816
+116133000000 116133005824
+116136000000 116136005820
+116139000000 116139005826
+116142000000 116142005817
+116145000000 116145005833
+116148000000 116148005803
+116151000000 116151005824
+116154000000 116154005819
+116157000000 116157005828
+116160000000 116160005817
+116163000000 116163005841
+116166000000 116166005822
+116169000000 116169005807
+116172000000 116172005821
+116175000000 116175005824
+116178000000 116178005827
+116181000000 116181005828
+116184000000 116184005838
+116187000000 116187005827
+116190000000 116190005831
+116193000000 116193005822
+116196000000 116196005820
+116199000000 116199005822
+116202000000 116202005821
+116205000000 116205005787
+116208000000 116208005817
+116211000000 116211005811
+116214000000 116214005827
+116217000000 116217005803
+116220000000 116220005815
+116223000000 116223005828
+116226000000 116226005830
+116229000000 116229005819
+116232000000 116232005761
+116235000000 116235005759
+116238000000 116238005831
+116241000000 116241005746
+116244000000 116244005820
+116247000000 116247005832
+116250000000 116250005824
+116253000000 116253005824
+116256000000 116256005783
+116259000000 116259005808
+116262000000 116262005731
+116265000000 116265005812
+116268000000 116268005824
+116271000000 116271005827
+116274000000 116274005794
+116277000000 116277005805
+116280000000 116280005823
+116283000000 116283005819
+116286000000 116286005827
+116289000000 116289005826
+116292000000 116292005820
+116295000000 116295005845
+116298000000 116298005824
+116301000000 116301005828
+116304000000 116304005813
+116307000000 116307005811
+116310000000 116310005782
+116313000000 116313005812
+116316000000 116316005820
+116319000000 116319005837
+116322000000 116322005827
+116325000000 116325005777
+116328000000 116328005831
+116331000000 116331005825
+116334000000 116334005819
+116337000000 116337005819
+116340000000 116340005833
+116343000000 116343005824
+116346000000 116346005830
+116349000000 116349005819
+116352000000 116352005769
+116355000000 116355005828
+116358000000 116358005824
+116361000000 116361005811
+116364000000 116364005822
+116367000000 116367005740
+116370000000 116370005823
+116373000000 116373005815
+116376000000 116376005816
+116379000000 116379005827
+116382000000 116382005827
+116385000000 116385005781
+116388000000 116388005836
+116391000000 116391005801
+116394000000 116394005829
+116397000000 116397005828
+116400000000 116400005822
+116403000000 116403005777
+116406000000 116406005846
+116409000000 116409005825
+116412000000 116412005833
+116415000000 116415005819
+116418000000 116418005823
+116421000000 116421005825
+116424000000 116424005815
+116427000000 116427005811
+116430000000 116430005819
+116433000000 116433005815
+116436000000 116436005821
+116439000000 116439005812
+116442000000 116442005828
+116445000000 116445005798
+116448000000 116448005819
+116451000000 116451005814
+116454000000 116454005823
+116457000000 116457005812
+116460000000 116460005836
+116463000000 116463005817
+116466000000 116466005802
+116469000000 116469005816
+116472000000 116472005819
+116475000000 116475005822
+116478000000 116478005823
+116481000000 116481005833
+116484000000 116484005822
+116487000000 116487005826
+116490000000 116490005817
+116493000000 116493005815
+116496000000 116496005817
+116499000000 116499005816
+116502000000 116502005782
+116505000000 116505005812
+116508000000 116508005806
+116511000000 116511005822
+116514000000 116514005798
+116517000000 116517005810
+116520000000 116520005823
+116523000000 116523005825
+116526000000 116526005814
+116529000000 116529005756
+116532000000 116532005754
+116535000000 116535005826
+116538000000 116538005741
+116541000000 116541005815
+116544000000 116544005827
+116547000000 116547005819
+116550000000 116550005819
+116553000000 116553005778
+116556000000 116556005803
+116559000000 116559005726
+116562000000 116562005807
+116565000000 116565005819
+116568000000 116568005822
+116571000000 116571005789
+116574000000 116574005800
+116577000000 116577005818
+116580000000 116580005814
+116583000000 116583005822
+116586000000 116586005821
+116589000000 116589005815
+116592000000 116592005840
+116595000000 116595005819
+116598000000 116598005823
+116601000000 116601005808
+116604000000 116604005806
+116607000000 116607005777
+116610000000 116610005807
+116613000000 116613005815
+116616000000 116616005832
+116619000000 116619005822
+116622000000 116622005772
+116625000000 116625005826
+116628000000 116628005820
+116631000000 116631005814
+116634000000 116634005814
+116637000000 116637005828
+116640000000 116640005819
+116643000000 116643005825
+116646000000 116646005814
+116649000000 116649005764
+116652000000 116652005823
+116655000000 116655005819
+116658000000 116658005806
+116661000000 116661005817
+116664000000 116664005735
+116667000000 116667005818
+116670000000 116670005810
+116673000000 116673005811
+116676000000 116676005822
+116679000000 116679005822
+116682000000 116682005776
+116685000000 116685005831
+116688000000 116688005796
+116691000000 116691005824
+116694000000 116694005823
+116697000000 116697005817
+116700000000 116700005772
+116703000000 116703005841
+116706000000 116706005820
+116709000000 116709005828
+116712000000 116712005814
+116715000000 116715005818
+116718000000 116718005820
+116721000000 116721005810
+116724000000 116724005806
+116727000000 116727005814
+116730000000 116730005810
+116733000000 116733005816
+116736000000 116736005807
+116739000000 116739005823
+116742000000 116742005793
+116745000000 116745005814
+116748000000 116748005809
+116751000000 116751005818
+116754000000 116754005807
+116757000000 116757005831
+116760000000 116760005812
+116763000000 116763005797
+116766000000 116766005811
+116769000000 116769005814
+116772000000 116772005817
+116775000000 116775005818
+116778000000 116778005828
+116781000000 116781005817
+116784000000 116784005821
+116787000000 116787005812
+116790000000 116790005810
+116793000000 116793005812
+116796000000 116796005811
+116799000000 116799005777
+116802000000 116802005807
+116805000000 116805005801
+116808000000 116808005817
+116811000000 116811005793
+116814000000 116814005805
+116817000000 116817005818
+116820000000 116820005820
+116823000000 116823005809
+116826000000 116826005751
+116829000000 116829005749
+116832000000 116832005821
+116835000000 116835005736
+116838000000 116838005810
+116841000000 116841005822
+116844000000 116844005814
+116847000000 116847005814
+116850000000 116850005773
+116853000000 116853005798
+116856000000 116856005721
+116859000000 116859005802
+116862000000 116862005814
+116865000000 116865005817
+116868000000 116868005784
+116871000000 116871005795
+116874000000 116874005813
+116877000000 116877005809
+116880000000 116880005817
+116883000000 116883005816
+116886000000 116886005810
+116889000000 116889005835
+116892000000 116892005814
+116895000000 116895005818
+116898000000 116898005803
+116901000000 116901005801
+116904000000 116904005772
+116907000000 116907005802
+116910000000 116910005810
+116913000000 116913005827
+116916000000 116916005817
+116919000000 116919005767
+116922000000 116922005821
+116925000000 116925005815
+116928000000 116928005809
+116931000000 116931005809
+116934000000 116934005823
+116937000000 116937005814
+116940000000 116940005820
+116943000000 116943005809
+116946000000 116946005759
+116949000000 116949005818
+116952000000 116952005814
+116955000000 116955005801
+116958000000 116958005812
+116961000000 116961005730
+116964000000 116964005813
+116967000000 116967005805
+116970000000 116970005806
+116973000000 116973005817
+116976000000 116976005817
+116979000000 116979005771
+116982000000 116982005826
+116985000000 116985005791
+116988000000 116988005819
+116991000000 116991005818
+116994000000 116994005812
+116997000000 116997005767
+117000000000 117000005836
+117003000000 117003005815
+117006000000 117006005823
+117009000000 117009005809
+117012000000 117012005813
+117015000000 117015005815
+117018000000 117018005805
+117021000000 117021005801
+117024000000 117024005809
+117027000000 117027005805
+117030000000 117030005811
+117033000000 117033005802
+117036000000 117036005818
+117039000000 117039005788
+117042000000 117042005809
+117045000000 117045005804
+117048000000 117048005813
+117051000000 117051005802
+117054000000 117054005826
+117057000000 117057005807
+117060000000 117060005792
+117063000000 117063005806
+117066000000 117066005809
+117069000000 117069005812
+117072000000 117072005813
+117075000000 117075005823
+117078000000 117078005812
+117081000000 117081005816
+117084000000 117084005807
+117087000000 117087005805
+117090000000 117090005807
+117093000000 117093005806
+117096000000 117096005772
+117099000000 117099005802
+117102000000 117102005796
+117105000000 117105005812
+117108000000 117108005788
+117111000000 117111005800
+117114000000 117114005813
+117117000000 117117005815
+117120000000 117120005804
+117123000000 117123005746
+117126000000 117126005744
+117129000000 117129005816
+117132000000 117132005731
+117135000000 117135005805
+117138000000 117138005817
+117141000000 117141005809
+117144000000 117144005809
+117147000000 117147005768
+117150000000 117150005793
+117153000000 117153005716
+117156000000 117156005797
+117159000000 117159005809
+117162000000 117162005812
+117165000000 117165005779
+117168000000 117168005790
+117171000000 117171005808
+117174000000 117174005804
+117177000000 117177005812
+117180000000 117180005811
+117183000000 117183005805
+117186000000 117186005830
+117189000000 117189005809
+117192000000 117192005813
+117195000000 117195005798
+117198000000 117198005796
+117201000000 117201005767
+117204000000 117204005797
+117207000000 117207005805
+117210000000 117210005822
+117213000000 117213005812
+117216000000 117216005762
+117219000000 117219005816
+117222000000 117222005810
+117225000000 117225005804
+117228000000 117228005804
+117231000000 117231005818
+117234000000 117234005809
+117237000000 117237005815
+117240000000 117240005804
+117243000000 117243005754
+117246000000 117246005813
+117249000000 117249005809
+117252000000 117252005796
+117255000000 117255005807
+117258000000 117258005725
+117261000000 117261005808
+117264000000 117264005800
+117267000000 117267005801
+117270000000 117270005812
+117273000000 117273005812
+117276000000 117276005766
+117279000000 117279005821
+117282000000 117282005786
+117285000000 117285005814
+117288000000 117288005813
+117291000000 117291005807
+117294000000 117294005762
+117297000000 117297005831
+117300000000 117300005810
+117303000000 117303005818
+117306000000 117306005804
+117309000000 117309005808
+117312000000 117312005810
+117315000000 117315005800
+117318000000 117318005796
+117321000000 117321005804
+117324000000 117324005800
+117327000000 117327005806
+117330000000 117330005797
+117333000000 117333005813
+117336000000 117336005783
+117339000000 117339005804
+117342000000 117342005799
+117345000000 117345005808
+117348000000 117348005797
+117351000000 117351005821
+117354000000 117354005802
+117357000000 117357005787
+117360000000 117360005801
+117363000000 117363005804
+117366000000 117366005807
+117369000000 117369005808
+117372000000 117372005818
+117375000000 117375005807
+117378000000 117378005811
+117381000000 117381005802
+117384000000 117384005800
+117387000000 117387005802
+117390000000 117390005801
+117393000000 117393005767
+117396000000 117396005797
+117399000000 117399005791
+117402000000 117402005807
+117405000000 117405005783
+117408000000 117408005795
+117411000000 117411005808
+117414000000 117414005810
+117417000000 117417005799
+117420000000 117420005741
+117423000000 117423005739
+117426000000 117426005811
+117429000000 117429005726
+117432000000 117432005800
+117435000000 117435005812
+117438000000 117438005804
+117441000000 117441005804
+117444000000 117444005763
+117447000000 117447005788
+117450000000 117450005711
+117453000000 117453005792
+117456000000 117456005804
+117459000000 117459005807
+117462000000 117462005774
+117465000000 117465005785
+117468000000 117468005803
+117471000000 117471005799
+117474000000 117474005807
+117477000000 117477005806
+117480000000 117480005800
+117483000000 117483005825
+117486000000 117486005804
+117489000000 117489005808
+117492000000 117492005793
+117495000000 117495005791
+117498000000 117498005762
+117501000000 117501005792
+117504000000 117504005800
+117507000000 117507005817
+117510000000 117510005807
+117513000000 117513005757
+117516000000 117516005811
+117519000000 117519005805
+117522000000 117522005799
+117525000000 117525005799
+117528000000 117528005813
+117531000000 117531005804
+117534000000 117534005810
+117537000000 117537005799
+117540000000 117540005749
+117543000000 117543005808
+117546000000 117546005804
+117549000000 117549005791
+117552000000 117552005802
+117555000000 117555005720
+117558000000 117558005803
+117561000000 117561005795
+117564000000 117564005796
+117567000000 117567005807
+117570000000 117570005807
+117573000000 117573005761
+117576000000 117576005816
+117579000000 117579005781
+117582000000 117582005809
+117585000000 117585005808
+117588000000 117588005802
+117591000000 117591005757
+117594000000 117594005826
+117597000000 117597005805
+117600000000 117600005813
+117603000000 117603005799
+117606000000 117606005803
+117609000000 117609005805
+117612000000 117612005795
+117615000000 117615005791
+117618000000 117618005799
+117621000000 117621005795
+117624000000 117624005801
+117627000000 117627005792
+117630000000 117630005808
+117633000000 117633005778
+117636000000 117636005799
+117639000000 117639005794
+117642000000 117642005803
+117645000000 117645005792
+117648000000 117648005816
+117651000000 117651005797
+117654000000 117654005782
+117657000000 117657005796
+117660000000 117660005799
+117663000000 117663005802
+117666000000 117666005803
+117669000000 117669005813
+117672000000 117672005802
+117675000000 117675005806
+117678000000 117678005797
+117681000000 117681005795
+117684000000 117684005797
+117687000000 117687005796
+117690000000 117690005762
+117693000000 117693005792
+117696000000 117696005786
+117699000000 117699005802
+117702000000 117702005778
+117705000000 117705005790
+117708000000 117708005803
+117711000000 117711005805
+117714000000 117714005794
+117717000000 117717005736
+117720000000 117720005734
+117723000000 117723005806
+117726000000 117726005721
+117729000000 117729005795
+117732000000 117732005807
+117735000000 117735005799
+117738000000 117738005799
+117741000000 117741005758
+117744000000 117744005783
+117747000000 117747005706
+117750000000 117750005787
+117753000000 117753005799
+117756000000 117756005802
+117759000000 117759005769
+117762000000 117762005780
+117765000000 117765005798
+117768000000 117768005794
+117771000000 117771005802
+117774000000 117774005801
+117777000000 117777005795
+117780000000 117780005820
+117783000000 117783005799
+117786000000 117786005803
+117789000000 117789005788
+117792000000 117792005786
+117795000000 117795005757
+117798000000 117798005787
+117801000000 117801005795
+117804000000 117804005812
+117807000000 117807005802
+117810000000 117810005752
+117813000000 117813005806
+117816000000 117816005800
+117819000000 117819005794
+117822000000 117822005794
+117825000000 117825005808
+117828000000 117828005799
+117831000000 117831005805
+117834000000 117834005794
+117837000000 117837005744
+117840000000 117840005803
+117843000000 117843005799
+117846000000 117846005786
+117849000000 117849005797
+117852000000 117852005715
+117855000000 117855005798
+117858000000 117858005790
+117861000000 117861005791
+117864000000 117864005802
+117867000000 117867005802
+117870000000 117870005756
+117873000000 117873005811
+117876000000 117876005776
+117879000000 117879005804
+117882000000 117882005803
+117885000000 117885005797
+117888000000 117888005752
+117891000000 117891005821
+117894000000 117894005800
+117897000000 117897005808
+117900000000 117900005794
+117903000000 117903005798
+117906000000 117906005800
+117909000000 117909005790
+117912000000 117912005786
+117915000000 117915005794
+117918000000 117918005790
+117921000000 117921005796
+117924000000 117924005787
+117927000000 117927005803
+117930000000 117930005773
+117933000000 117933005794
+117936000000 117936005789
+117939000000 117939005798
+117942000000 117942005787
+117945000000 117945005811
+117948000000 117948005792
+117951000000 117951005777
+117954000000 117954005791
+117957000000 117957005794
+117960000000 117960005797
+117963000000 117963005798
+117966000000 117966005808
+117969000000 117969005797
+117972000000 117972005801
+117975000000 117975005792
+117978000000 117978005790
+117981000000 117981005792
+117984000000 117984005791
+117987000000 117987005757
+117990000000 117990005787
+117993000000 117993005781
+117996000000 117996005797
+117999000000 117999005773
+118002000000 118002005785
+118005000000 118005005798
+118008000000 118008005800
+118011000000 118011005789
+118014000000 118014005731
+118017000000 118017005729
+118020000000 118020005801
+118023000000 118023005716
+118026000000 118026005790
+118029000000 118029005802
+118032000000 118032005794
+118035000000 118035005794
+118038000000 118038005753
+118041000000 118041005778
+118044000000 118044005701
+118047000000 118047005782
+118050000000 118050005794
+118053000000 118053005797
+118056000000 118056005764
+118059000000 118059005775
+118062000000 118062005793
+118065000000 118065005789
+118068000000 118068005797
+118071000000 118071005796
+118074000000 118074005790
+118077000000 118077005815
+118080000000 118080005794
+118083000000 118083005798
+118086000000 118086005783
+118089000000 118089005781
+118092000000 118092005752
+118095000000 118095005782
+118098000000 118098005790
+118101000000 118101005807
+118104000000 118104005797
+118107000000 118107005747
+118110000000 118110005801
+118113000000 118113005795
+118116000000 118116005789
+118119000000 118119005789
+118122000000 118122005803
+118125000000 118125005794
+118128000000 118128005800
+118131000000 118131005789
+118134000000 118134005739
+118137000000 118137005798
+118140000000 118140005794
+118143000000 118143005781
+118146000000 118146005792
+118149000000 118149005710
+118152000000 118152005793
+118155000000 118155005785
+118158000000 118158005786
+118161000000 118161005797
+118164000000 118164005797
+118167000000 118167005751
+118170000000 118170005806
+118173000000 118173005771
+118176000000 118176005799
+118179000000 118179005798
+118182000000 118182005792
+118185000000 118185005747
+118188000000 118188005816
+118191000000 118191005795
+118194000000 118194005803
+118197000000 118197005789
+118200000000 118200005793
+118203000000 118203005795
+118206000000 118206005785
+118209000000 118209005781
+118212000000 118212005789
+118215000000 118215005785
+118218000000 118218005791
+118221000000 118221005782
+118224000000 118224005798
+118227000000 118227005768
+118230000000 118230005789
+118233000000 118233005784
+118236000000 118236005793
+118239000000 118239005782
+118242000000 118242005806
+118245000000 118245005787
+118248000000 118248005772
+118251000000 118251005786
+118254000000 118254005789
+118257000000 118257005792
+118260000000 118260005793
+118263000000 118263005803
+118266000000 118266005792
+118269000000 118269005796
+118272000000 118272005787
+118275000000 118275005785
+118278000000 118278005787
+118281000000 118281005786
+118284000000 118284005752
+118287000000 118287005782
+118290000000 118290005776
+118293000000 118293005792
+118296000000 118296005768
+118299000000 118299005780
+118302000000 118302005793
+118305000000 118305005795
+118308000000 118308005784
+118311000000 118311005726
+118314000000 118314005724
diff --git a/cesar/cp/beacon/test/sync/src/test_sync.c b/cesar/cp/beacon/test/sync/src/test_sync.c
new file mode 100644
index 0000000000..ce6766db7a
--- /dev/null
+++ b/cesar/cp/beacon/test/sync/src/test_sync.c
@@ -0,0 +1,114 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+
+#include "common/std.h"
+#include "lib/test.h"
+#include "hal/phy/phy.h"
+#include <stdio.h>
+#include "mac/common/config.h"
+
+#include "cp/beacon/inc/ntb_clock_sync.h"
+#define FIRST_JITTER_UNKNOWN 0
+
+//#define TEST_SYNC_DBG
+
+#ifdef TEST_SYNC_DBG
+void
+print_data (int beacon_nb, u32 bts, u32 ltmr_corr_at_beacon, s32 ntb_error_at_beacon,
+ u32 ltmr_captured, u32 ltmr_corr_captured, u32 numerator, s32 offset, double rho, double rho_error)
+{
+ printf ("%5d %10u %10u %10d %10u %10u %10u %10d %2.14g %2.14g\n", beacon_nb, bts, ltmr_corr_at_beacon,
+ ntb_error_at_beacon, ltmr_captured, ltmr_corr_captured, numerator, offset, rho, rho_error);
+}
+#endif
+
+int
+main (int argc, char **argv)
+{
+ FILE *fp;
+ double rho_vrai = -50.0;
+ int line;
+ u64 tmp;
+ u32 bts, ltmr_corr_at_beacon;
+ s32 ntb_error_at_beacon;
+ u32 ltmr_captured, ltmr_corr_captured;
+ u32 zltmr_captured, zbts;
+ ntb_t *ntb_ctx;
+ mac_config_t mac_config;
+ test_t test;
+
+ test_init (test, argc, argv);
+ test_case_begin (test, "CALCUL DE SYNCHRO NTB TEST");
+ fp = fopen ("spo_m50_snr_m02.txt","r");
+ //if (fp == NULL) {printf ("file not found\n"); return -1;}
+ test_begin (test, "test initialisation")
+ {
+ test_fail_if ( fp == NULL );
+ } test_end;
+ mac_config.ntb_offset_tck = 0;
+ phy_t *phy_ctx = phy_init ();
+ ntb_ctx = ntb_init (phy_ctx, &mac_config);
+ test_begin (test, "phy_init")
+ {
+ test_fail_if (phy_ctx->numerator != 1000000);
+ test_fail_if (phy_ctx->rho_ppm != 0);
+ } test_end;
+ // line 0
+ fscanf(fp, "%llu", &tmp);
+ fscanf(fp, "%llu", &tmp);
+ fscanf(fp, "%llu", &tmp);
+ fscanf(fp, "%llu", &tmp);
+ fscanf(fp, "%u", &bts);
+ fscanf(fp, "%u", &ltmr_captured);
+ zbts = 0;
+ zltmr_captured = 0;
+ ltmr_corr_at_beacon = 0;
+ ntb_error_at_beacon = (ltmr_corr_at_beacon + mac_config.ntb_offset_tck) - bts;
+ ltmr_corr_captured = (ltmr_captured- zltmr_captured) * ((double)(phy_ctx->numerator/ 1000000.0));
+ ntb_clk_sync (ntb_ctx, bts, ltmr_captured, ltmr_corr_captured);
+#ifdef TEST_SYNC_DBG
+ printf ("beac bts ltmr_corr ntb_error ltmr_capt ltmr_corr new_N new_Offset new_Rho rho_error\n");
+ printf (" @beacon capt \n");
+ print_data (0, bts, ltmr_corr_at_beacon, ntb_error_at_beacon, ltmr_captured, ltmr_corr_captured,
+ phy_ctx->numerator, mac_config.ntb_offset_tck, phy_ctx->rho_ppm,
+ phy_ctx->rho_ppm - rho_vrai);
+#endif
+ test_begin (test, "check values")
+ {
+ for (line=1; line<17000; line++)
+ {
+ zbts = bts;
+ zltmr_captured = ltmr_captured;
+ fscanf(fp, "%llu", &tmp);
+ fscanf(fp, "%llu", &tmp);
+ fscanf(fp, "%llu", &tmp);
+ fscanf(fp, "%llu", &tmp);
+ fscanf(fp, "%u", &bts);
+ fscanf(fp, "%u", &ltmr_captured);
+ ltmr_corr_at_beacon = ltmr_corr_captured + (bts-zbts)*((double)(phy_ctx->numerator / 1000000.0))*(1000000.0/(1000000.0+rho_vrai));
+ ntb_error_at_beacon = (ltmr_corr_at_beacon + mac_config.ntb_offset_tck) - bts;
+ ltmr_corr_captured += (ltmr_captured-zltmr_captured) * ((double)(phy_ctx->numerator/ 1000000.0));
+ ntb_clk_sync (ntb_ctx, bts, ltmr_captured, ltmr_corr_captured);
+#ifdef TEST_SYNC_DBG
+ print_data (line, bts, ltmr_corr_at_beacon, ntb_error_at_beacon, ltmr_captured, ltmr_corr_captured,
+ phy_ctx->numerator, mac_config.ntb_offset_tck, phy_ctx->rho_ppm,
+ phy_ctx->rho_ppm - rho_vrai);
+#endif
+ test_fail_if (line > 2 && (ntb_error_at_beacon > 100 || ntb_error_at_beacon < -100));
+ test_fail_if (line > 100 && ( (phy_ctx->rho_ppm > rho_vrai + 1) || (phy_ctx->rho_ppm < rho_vrai - 1)));
+ }
+#ifdef TEST_SYNC_DBG
+ printf ("\n");
+#endif
+ } test_end;
+ test_result (test);
+ return (test_nb_failed (test) == 0 ? 0 : 1);
+ return 0;
+}
+
+
diff --git a/cesar/cp/cco/Module b/cesar/cp/cco/Module
new file mode 100644
index 0000000000..0ea6ec2506
--- /dev/null
+++ b/cesar/cp/cco/Module
@@ -0,0 +1 @@
+SOURCES := cco.c
diff --git a/cesar/cp/cco/cco.h b/cesar/cp/cco/cco.h
new file mode 100644
index 0000000000..81b5bf64e6
--- /dev/null
+++ b/cesar/cp/cco/cco.h
@@ -0,0 +1,123 @@
+#ifndef cp_cco_cco_h
+#define cp_cco_cco_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/cco/cco.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+/** Forward declaration */
+typedef struct cp_cco_t cp_cco_t;
+
+cp_cco_t *
+cp_cco_init (void);
+
+void
+cp_cco_uninit (cp_cco_t *ctx);
+
+uint
+cp_cco_get_dt_av(cp_cco_t *ctx);
+
+void
+cp_coo_set_dt_av (cp_cco_t *ctx, uint dt_av);
+
+bool
+cp_cco_get_access(cp_cco_t *ctx);
+
+void
+cp_cco_set_access(cp_cco_t *ctx, bool access);
+
+bool
+cp_cco_get_ncnr (cp_cco_t *ctx);
+
+void
+cp_cco_set_ncnr (cp_cco_t *ctx, bool ncnr);
+
+bool
+cp_cco_get_npsm (cp_cco_t *ctx);
+
+void
+cp_cco_set_npsm (cp_cco_t *ctx, bool npsm);
+
+u8
+cp_cco_get_numslots (cp_cco_t *ctx);
+
+void
+cp_cco_set_numslots (cp_cco_t *ctx, u8 num_slots);
+
+u8
+cp_cco_get_slotusage (cp_cco_t *ctx);
+
+void
+cp_cco_set_slotusage (cp_cco_t *ctx, u8 slotusage);
+
+u8
+cp_cco_get_slot_id (cp_cco_t *ctx);
+
+void
+cp_cco_set_slot_id (cp_cco_t *ctx, u8 slot_id);
+
+u8
+cp_cco_get_aclss (cp_cco_t *ctx);
+
+void
+cp_cco_set_aclss (cp_cco_t *ctx, u8 aclss);
+
+u8
+cp_cco_get_nm (cp_cco_t *ctx);
+
+void
+cp_cco_set_nm (cp_cco_t *ctx, u8 nm);
+
+u8
+cp_cco_get_cco_cap (cp_cco_t *ctx);
+
+void
+cp_cco_set_cco_cap (cp_cco_t *ctx, u8 cco_cap);
+
+bool
+cp_cco_get_proxy_cap (cp_cco_t *ctx);
+
+void
+cp_cco_set_proxy_cap (cp_cco_t *ctx, bool proxy_cap);
+
+bool
+cp_cco_get_backup_cap (cp_cco_t *ctx);
+
+void
+cp_cco_set_backup_cap (cp_cco_t *ctx, bool backup_cap);
+
+bool
+cp_cco_get_cco_status (cp_cco_t *ctx);
+
+void
+cp_cco_set_cco_status (cp_cco_t *ctx, bool cco_status);
+
+bool
+cp_cco_get_pco_status(cp_cco_t *ctx);
+
+void
+cp_cco_set_pco_status(cp_cco_t *ctx, bool pco_status);
+
+bool
+cp_cco_get_backup_cco_status(cp_cco_t *ctx);
+
+void
+cp_cco_set_backup_cco_status(cp_cco_t *ctx, bool backup_cco_status);
+
+bool
+cp_cco_get_user_appointed_cco_status(cp_cco_t *ctx);
+
+void
+cp_cco_set_user_appointed_cco_status(cp_cco_t *ctx, bool ua_cco_status);
+
+#endif /* cp_cco_cco_h */
diff --git a/cesar/cp/cco/inc/context.h b/cesar/cp/cco/inc/context.h
new file mode 100644
index 0000000000..c7f98d5589
--- /dev/null
+++ b/cesar/cp/cco/inc/context.h
@@ -0,0 +1,46 @@
+#ifndef cp_cco_inc_context_h
+#define cp_cco_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/cco/inc/context.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+struct cp_cco_t
+{
+ BITFIELDS_WORD
+ (
+ uint dt_av:3;,
+ uint access:1;,
+ uint ncnr:1;,
+ uint npsm:1;,
+ uint num_slots:3;,
+ uint slot_usage:8;,
+ uint slotid:3;,
+ uint aclss:3;,
+ uint nm:2;,
+ uint cco_cap:2;,
+ uint proxy_cap:1;,
+ uint backup_cap:1;,
+ uint cco_status:1;,
+ uint pco_status:1;,
+ uint backup_cco:1;
+ );
+ BITFIELDS_WORD
+ (
+ uint nr:6;,
+ uint user_appointed_cco_status:1;,
+ uint rsvd:25;
+ );
+};
+
+#endif /* cp_cco_inc_context_h */
diff --git a/cesar/cp/cco/src/cco.c b/cesar/cp/cco/src/cco.c
new file mode 100644
index 0000000000..0ef74335eb
--- /dev/null
+++ b/cesar/cp/cco/src/cco.c
@@ -0,0 +1,281 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/cco/src/cco.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "cp/cco/cco.h"
+#include "cp/cco/inc/context.h"
+
+static cp_cco_t cco;
+
+cp_cco_t *
+cp_cco_init (void)
+{
+ cco.dt_av = 0x0;
+ cco.access = 0x0;
+ cco.ncnr = 0x0;
+ cco.npsm = 0x0;
+ cco.num_slots = 0x1;
+ cco.slot_usage = 0x1;
+ cco.slotid = 0x0;
+ cco.aclss = 0x1;
+ cco.nm = 0x2;
+ cco.cco_cap = 0x0;
+ cco.proxy_cap = 0;
+ cco.backup_cap = 0;
+ cco.cco_status = 0;
+ cco.pco_status = 0;
+ cco.backup_cco = 0;
+ cco.nr = 0;
+ cco.user_appointed_cco_status = 0;
+ cco.rsvd = 0;
+
+ return &cco;
+}
+
+void
+cp_cco_uninit (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+}
+
+uint
+cp_cco_get_dt_av(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->dt_av;
+}
+
+void
+cp_coo_set_dt_av (cp_cco_t *ctx, uint dt_av)
+{
+ dbg_assert (ctx);
+ ctx->dt_av = dt_av;
+}
+
+bool
+cp_cco_get_access(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->access;
+}
+
+void
+cp_cco_set_access(cp_cco_t *ctx, bool access)
+{
+ dbg_assert (ctx);
+
+ ctx->access = access;
+}
+
+bool
+cp_cco_get_ncnr (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->ncnr;
+}
+
+void
+cp_cco_set_ncnr (cp_cco_t *ctx, bool ncnr)
+{
+ dbg_assert (ctx);
+ ctx->ncnr = ncnr;
+}
+
+bool
+cp_cco_get_npsm (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->npsm;
+}
+
+void
+cp_cco_set_npsm (cp_cco_t *ctx, bool npsm)
+{
+ dbg_assert (ctx);
+ ctx->npsm = npsm;
+}
+
+u8
+cp_cco_get_numslots (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->num_slots;
+}
+
+void
+cp_cco_set_numslots (cp_cco_t *ctx, u8 num_slots)
+{
+ dbg_assert (ctx);
+ ctx->num_slots = num_slots;
+}
+
+u8
+cp_cco_get_slotusage (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->slot_usage;
+}
+
+void
+cp_cco_set_slotusage (cp_cco_t *ctx, u8 slotusage)
+{
+ dbg_assert (ctx);
+ ctx->slot_usage = slotusage;
+}
+
+u8
+cp_cco_get_slot_id (cp_cco_t *cco)
+{
+ dbg_assert (cco);
+ return cco->slotid;
+}
+
+void
+cp_cco_set_slot_id (cp_cco_t *ctx, u8 slot_id)
+{
+ dbg_assert (ctx);
+ ctx->slotid = slot_id;
+}
+
+u8
+cp_cco_get_aclss (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->aclss;
+}
+
+void
+cp_cco_set_aclss (cp_cco_t *ctx, u8 aclss)
+{
+ dbg_assert (ctx);
+ ctx->aclss = aclss;
+}
+
+u8
+cp_cco_get_nm (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->nm;
+}
+
+void
+cp_cco_set_nm (cp_cco_t *ctx, u8 nm)
+{
+ dbg_assert (ctx);
+ ctx->nm = nm;
+}
+
+u8
+cp_cco_get_cco_cap (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->cco_cap;
+}
+
+void
+cp_cco_set_cco_cap (cp_cco_t *ctx, u8 cco_cap)
+{
+ dbg_assert (ctx);
+ ctx->cco_cap = cco_cap;
+}
+
+bool
+cp_cco_get_proxy_cap (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->proxy_cap;
+}
+
+void
+cp_cco_set_proxy_cap (cp_cco_t *ctx, bool proxy_cap)
+{
+ dbg_assert (ctx);
+ ctx->proxy_cap = proxy_cap;
+}
+
+bool
+cp_cco_get_backup_cap (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->backup_cap;
+}
+
+void
+cp_cco_set_backup_cap (cp_cco_t *ctx, bool backup_cap)
+{
+ dbg_assert (ctx);
+ ctx->backup_cap = backup_cap;
+}
+
+bool
+cp_cco_get_cco_status (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->cco_status;
+}
+
+void
+cp_cco_set_cco_status (cp_cco_t *ctx, bool cco_status)
+{
+ dbg_assert (ctx);
+ ctx->cco_status = cco_status;
+}
+
+bool
+cp_cco_get_pco_status(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->pco_status;
+}
+
+void
+cp_cco_set_pco_status(cp_cco_t *ctx, bool pco_status)
+{
+ dbg_assert(ctx);
+ ctx->pco_status = pco_status;
+}
+
+bool
+cp_cco_get_backup_cco_status(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->backup_cco;
+}
+
+void
+cp_cco_set_backup_cco_status(cp_cco_t *ctx, bool backup_cco_status)
+{
+ dbg_assert (ctx);
+ ctx->backup_cco = backup_cco_status;
+}
+
+bool
+cp_cco_get_user_appointed_cco_status(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->user_appointed_cco_status;
+}
+
+void
+cp_cco_set_user_appointed_cco_status(cp_cco_t *ctx, bool ua_cco_status)
+{
+ dbg_assert (ctx);
+ ctx->user_appointed_cco_status = ua_cco_status;
+}
+
diff --git a/cesar/cp/conn/Module b/cesar/cp/conn/Module
new file mode 100644
index 0000000000..124dd907ce
--- /dev/null
+++ b/cesar/cp/conn/Module
@@ -0,0 +1 @@
+SOURCES := conn.c \ No newline at end of file
diff --git a/cesar/cp/conn/conn.h b/cesar/cp/conn/conn.h
new file mode 100644
index 0000000000..e60f4a8bf1
--- /dev/null
+++ b/cesar/cp/conn/conn.h
@@ -0,0 +1,29 @@
+#ifndef CONN_H_
+#define CONN_H_
+
+#include "cp/conn/inc/conn_defs.h"
+
+
+void
+cp_conn_init(void);
+
+/**
+ * \brief create a new connection on the init side of it.
+ *
+ * \param osa : original source address
+ * \param oda : original destination address
+ * \param req_id : request id provided by the HLE, or 0 if the
+ * connection is created by the Auto Connect Service
+ * \param cspec :
+ * \param classifier_rules :
+ *
+ * \return void
+ */
+void
+cp_conn_create_init(mac_address_t osa,
+ mac_address_t oda,
+ u16 req_id,
+ cspec_t cspec,
+ classifier_rules_t classifier_rules);
+
+#endif /*CONN_H_*/
diff --git a/cesar/cp/conn/inc/conn_actions.h b/cesar/cp/conn/inc/conn_actions.h
new file mode 100644
index 0000000000..02be22d17c
--- /dev/null
+++ b/cesar/cp/conn/inc/conn_actions.h
@@ -0,0 +1,17 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/conn/inc/conn_actions.h
+ * \brief actions of the conn fsm
+ * \ingroup cp_conn
+ */
+
+#ifndef CONN_ACTIONS_H_
+#define CONN_ACTIONS_H_
+
+#endif /*CONN_ACTIONS_H_*/
diff --git a/cesar/cp/conn/inc/conn_defs.h b/cesar/cp/conn/inc/conn_defs.h
new file mode 100644
index 0000000000..4884f89500
--- /dev/null
+++ b/cesar/cp/conn/inc/conn_defs.h
@@ -0,0 +1,118 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/conn/inc/conn_types.h
+ * \brief basics types for the conn module
+ * \ingroup cp_conn
+ */
+
+#ifndef CONN_TYPES_H_
+#define CONN_TYPES_H_
+
+#include "cp/cp_types.h"
+#include "mac/common/defs.h"
+#include "lib/blk.h"
+
+/*
+ * max number of BLE intervalle for a link
+ */
+#define MAX_NB_BLE_INT 10
+/*
+ * max number of available connexions
+ */
+#define MAX_NB_CONN (MAC_TEI_STA_NB * MAC_LLID_NB)
+
+// TODO : move this structure to the LINK module
+typedef struct link_t
+{
+ u8 tl_flag; // 11.5.35
+ tei_t stei;
+ tei_t dtei[MAX_STA_NB];
+ u8 lid;
+} link_t;
+
+typedef enum conn_status_t
+{
+ CONN_FREE,
+ CONN_WAIT,
+ CONN_ECTED
+} __attribute__ ((packed)) conn_status_t;
+
+typedef enum mac_service_type_t
+{
+ CONN_CONTENTION_FREE = 0,
+ CONN_CONTENTION_BASED = 1,
+ CONN_CONTENTION_FREE_PREFERED = 2
+} __attribute__ ((packed)) mac_service_type_t;
+
+typedef struct cinfo_t // table 7-145
+{
+ u8 valid;
+ mac_service_type_t mac_service_type;
+ u8 user_priority;
+ u8 arrival_time_stamp;
+ u8 smoothing;
+} cinfo_t;
+
+typedef struct qmp_t // table 7-147
+{
+ u16 cf[0x1C];
+ u32 cfl[4];
+ u8 cdesc;
+} qmp_t;
+
+typedef struct cspec_t // table 7-144
+{
+ cinfo_t cinfo_fw;
+ cinfo_t cinfo_rv;
+ qmp_t qmp_fw;
+ qmp_t qmp_rv;
+} cspec_t;
+
+typedef struct ble_t // table 11-196
+{
+ u16 end_time;
+ u8 ble;
+} ble_t;
+
+typedef struct con_info_t
+{
+ cspec_t cspec;
+ u16 cid;
+ mac_address_t init;
+ mac_address_t term;
+ ble_t ble_fw[MAX_NB_BLE_INT];
+ ble_t ble_rv[MAX_NB_BLE_INT];
+} con_info_t;
+
+typedef struct classifier_rules_t // 6.3
+{
+ u8 rule_id;
+ u8 rule[16];
+} classifier_rules_t;
+
+#define NB_RULES (BLK_SIZE - (2*sizeof(link_t) + sizeof(con_info_t))) / sizeof(classifier_rules_t)
+
+
+typedef struct connexion_t
+{
+ link_t fl; // forward link
+ link_t rl; // reverse link
+ con_info_t con_info;
+ classifier_rules_t rules[NB_RULES];
+} connexion_t;
+
+typedef struct conn_data_t
+{
+ conn_status_t conn_status;
+ connexion_t *connexion;
+ u16 req_id; // the id given by HLE
+}conn_data_t;
+
+
+#endif /*CONN_TYPES_H_*/
diff --git a/cesar/cp/conn/inc/conn_priv.h b/cesar/cp/conn/inc/conn_priv.h
new file mode 100644
index 0000000000..fb28459ea2
--- /dev/null
+++ b/cesar/cp/conn/inc/conn_priv.h
@@ -0,0 +1,39 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/conn/inc/conn_priv.h
+ * \brief private functions for the conn module
+ * \ingroup cp_conn
+ */
+
+
+#ifndef CONN_PRIV_H_
+#define CONN_PRIV_H_
+
+
+
+/**
+ * \brief convert the CID of a connexion to it index
+ *
+ * \param cid
+ * \return index
+ */
+u16
+cp_conn_cid_2_index(u16 cid);
+
+/**
+ * \brief return an available connexion index
+ * the CID can be calculated from this index
+ * \param
+ * \return index
+ */
+u16
+cp_conn_get_new_conn_index(void);
+
+
+#endif /*CONN_PRIV_H_*/
diff --git a/cesar/cp/conn/src/conn.c b/cesar/cp/conn/src/conn.c
new file mode 100644
index 0000000000..febf31b806
--- /dev/null
+++ b/cesar/cp/conn/src/conn.c
@@ -0,0 +1,113 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/conn/src/conn.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#include "common/std.h"
+#include "cp/conn/inc/conn_defs.h"
+#include "cp/conn/inc/conn_priv.h"
+#include "lib/swap.h"
+#include <string.h>
+
+static conn_data_t conn_data[MAX_NB_CONN];
+
+/****************** private functions ************************/
+
+u16
+cp_conn_cid_2_index(u16 cid)
+{
+ tei_t tei;
+ u8 llid;
+ u16 index;
+
+ llid = cid & 0xFF;
+ tei = cid >> 8;
+ index = (llid - MAC_LLID_MIN) * MAC_TEI_STA_NB + tei - 1;
+ dbg_assert(index < COUNT(conn_data));
+ return index;
+}
+
+u16
+cp_conn_get_new_conn_index(void)
+{
+ tei_t tei;
+ u8 llid;
+ u16 index;
+
+ tei = cp_station_get_tei(NULL);
+ for(llid = MAC_LLID_MIN ; llid < MAC_LLID_MAX ; llid ++)
+ {
+ index = (llid - MAC_LLID_MIN) * MAC_TEI_STA_NB + tei - 1;
+ if(conn_data[index].conn_status == CONN_FREE)
+ {
+ return index;
+ }
+ }
+ // all connexion are used !!!
+ dbg_assert(0);
+ return 0;
+}
+
+
+/****************** public functions ************************/
+
+void
+cp_conn_init(void)
+{
+ u32 i;
+ for(i=0 ; i < COUNT(conn_data) ; i++)
+ {
+ conn_data[i].conn_status = CONN_FREE;
+ conn_data[i].connexion = NULL;
+ conn_data[i].req_id = 0;
+ }
+}
+
+bool
+cp_conn_is_multicast(mac_address_t ad)
+{
+
+}
+
+void
+cp_conn_create_init(mac_address_t osa,
+ mac_address_t oda,
+ u16 req_id,
+ cspec_t cspec,
+ classifier_rules_t classifier_rules)
+{
+ u16 index;
+
+ // check if the connection is compliant with the current network mode (5.2.3.1)
+ // TODO
+ // do the connection admission control procedure (7.8.3)
+ if(cspec.cinfo_fw.mac_service_type != CONN_CONTENTION_BASED)
+ {
+ // TODO
+ }
+ index = cp_conn_get_new_conn_index();
+ if(index)
+ { // create the new connection
+ // record the CSPEC
+ conn_data[index].connexion = blk_alloc_zero();
+ memcpy(&conn_data[index].connexion->con_info.cspec, &cspec, sizeof(cspec));
+ // record the connection info
+ memcpy(conn_data[index].connexion->con_info.init, osa, sizeof(mac_address_t));
+ memcpy(conn_data[index].connexion->con_info.term, oda, sizeof(mac_address_t));
+ memcpy(&conn_data[index].connexion->rules, &classifier_rules, sizeof(classifier_rules_t));
+ conn_data[index].req_id = req_id;
+ // send the connexion request to the other station(s)
+ conn_data[index].conn_status = CONN_WAIT;
+
+ }
+}
diff --git a/cesar/cp/cp_types.h b/cesar/cp/cp_types.h
new file mode 100644
index 0000000000..77c97e898b
--- /dev/null
+++ b/cesar/cp/cp_types.h
@@ -0,0 +1,53 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/cp_types.h
+ * \brief Types and const used in control plane
+ * \ingroup cp
+ */
+
+#ifndef cp_types__h__
+#define cp_types__h__
+
+#define THEORICAL_MAX_STA_NB 0xFF
+#define MAX_STA_NB 64 // maximum number of STA within an AVLN
+#define MAX_AVLN_NB 8 // maximum number of AVLN
+
+#define MINUTES_TO_TICK_FACTOR 600 // used to convert minutes in system tick
+
+// if you'v got an idea to set the constant with only 6 byte, tell me ! (GL)
+#define BROADCAST_MAC_AD "\xFF\xFF\xFF\xFF\xFF\xFF"
+#define ZEROS_MAC_AD "\0\0\0\0\0\0"
+
+typedef unsigned char mac_address_t[6];
+typedef u64 nid_t;
+typedef unsigned char snid_t;
+
+typedef unsigned char tei_t;
+#define MAX_TEI 0xFF
+
+typedef enum E_ErrCode
+{
+ Success = 0,
+ Failure,
+ // SECU error codes
+ PWD_UnknowType,
+ PWD_ForbidenChar,
+ PWD_WrongSize,
+ PID_Unknown,
+ PID_Wrong,
+ PRN_Wrong,
+ PMN_Wrong,
+ PRN_NotInitialised,
+ NONCE_INCORRECT,
+ // INTERF error codes
+ NbBufIncoherent
+} E_ErrCode;
+
+#endif
+
diff --git a/cesar/cp/interf/Makefile b/cesar/cp/interf/Makefile
new file mode 100644
index 0000000000..9cda9ddfdf
--- /dev/null
+++ b/cesar/cp/interf/Makefile
@@ -0,0 +1,9 @@
+BASE = ../../
+
+ECOS = y
+
+TARGET_PROGRAMS = interf
+interf_SOURCES = interf.c interf_sar_layer.c
+interf_MODULES = lib mac/sar cp/station cp/msg
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/cp/interf/Module b/cesar/cp/interf/Module
new file mode 100644
index 0000000000..edbfb5a666
--- /dev/null
+++ b/cesar/cp/interf/Module
@@ -0,0 +1,2 @@
+SOURCES := interf_cl_layer.c interf.c
+
diff --git a/cesar/cp/interf/ecos.ecc.sh b/cesar/cp/interf/ecos.ecc.sh
new file mode 100644
index 0000000000..8253d98c9a
--- /dev/null
+++ b/cesar/cp/interf/ecos.ecc.sh
@@ -0,0 +1,5 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new linux default
+cat >> $config <<EOF
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/cp/interf/inc/interf_cl_layer.h b/cesar/cp/interf/inc/interf_cl_layer.h
new file mode 100644
index 0000000000..8411a3d594
--- /dev/null
+++ b/cesar/cp/interf/inc/interf_cl_layer.h
@@ -0,0 +1,53 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file interf_cl_layer.h
+ * \brief adapt the common MME interface to MAC/SAR
+ * \ingroup cp/interf
+ *
+ */
+#ifndef INTERF_CL_LAYER_H_
+#define INTERF_CL_LAYER_H_
+
+#include "cp/msg/inc/msg_const.h"
+#include "cl/cl.h"
+#include "mac/common/store.h"
+#include "cp/station/station.h"
+
+
+/**
+ * \brief init the interf_cl layer
+ * \param
+ * \return
+ */
+void
+interf_cl_layer_init (void);
+
+/**
+ * \brief function to give the buffer to the interface
+ * \param
+ * \return
+ */
+void
+interf_cl_layer_add_buf (msg_mme_t *msg);
+
+/**
+ * \brief to send a message through the CL interface
+ * \param
+ * \return
+ */
+void
+interf_cl_layer_send_buf (
+ const msg_mme_t *msg,
+ const uint length,
+ const msg_param_t msg_param,
+ const tei_t tei
+ );
+
+
+#endif /*INTER_CL_LAYER_H_*/
diff --git a/cesar/cp/interf/inc/interf_private.h b/cesar/cp/interf/inc/interf_private.h
new file mode 100644
index 0000000000..5587e8a266
--- /dev/null
+++ b/cesar/cp/interf/inc/interf_private.h
@@ -0,0 +1,34 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/interf/interf.h
+ * \brief the "private" functions of module interf
+ * \ingroup cp_interf
+ */
+#ifndef INTERF_PRIVATE_H_
+#define INTERF_PRIVATE_H_
+
+#define MME_BUFFER_MAXCOUNT 8
+
+/**
+ * \brief Receive fragment of message
+ *
+ * \param (void *) pointer to message fragment
+ * \return NULL or ptr to first part of message MME is complete
+ */
+msg_mme_t *interf_received_frag (msg_mme_t *msg);
+
+/**
+ * \brief release a buffer for CCO or STA
+ *
+ * \param
+ * \return
+ */
+void interf_local_buf_release (msg_mme_t *msg);
+
+#endif /*INTERF_PRIVATE_H_*/
diff --git a/cesar/cp/interf/inc/interf_types.h b/cesar/cp/interf/inc/interf_types.h
new file mode 100644
index 0000000000..8eee47caea
--- /dev/null
+++ b/cesar/cp/interf/inc/interf_types.h
@@ -0,0 +1,77 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/interf/inc/interf_types.h
+ * \brief basics types for the interf module
+ * \ingroup cp_interf
+ */
+#ifndef INTERF_TYPES_H_
+#define INTERF_TYPES_H_
+
+#include <cyg/kernel/kapi.h>
+
+#include "lib/types.h"
+#include "cp/cp_types.h"
+#include "cp/msg/inc/msg_const.h"
+
+/*
+ * Homeplug AV constantes
+ */
+#define FragMMI_ReassemblyTimeOut_sec 2
+
+/*
+ * INTERF constantes
+ */
+#define INTERF_NB_BUFFER 0x33
+#define INTERF_MAX_FRAG_PER_MSG 0x10
+#define INTERF_MAX_FRAG_MSG_SIM 3
+
+/*
+ * This directive is used to check some buffer overflow within the pool
+ * array.
+ */
+#define CHECK_BUFFER_OVERFLOW 0
+#define BUFFER_SIGNATURE 0xDEADABCD
+/*
+ * check constant coherency
+ */
+#if (INTERF_NB_BUFFER < INTERF_MAX_FRAG_PER_MSG * INTERF_MAX_FRAG_MSG_SIM)
+ #warning "interf.h : number of buffer not coherent"
+#endif
+#if (CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE < INTERF_NB_BUFFER)
+// #warning "interf.h : CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE looks too small"
+ // !!! nota : if this condition is not true, the function interf_release_buf
+ // may be block forever !!!
+#endif
+
+/*
+ * basic types for INTERF
+ */
+
+/*
+ * this is the buffer used for exange MME with CL */
+typedef struct interf_buffer_t
+{
+ uint size;
+ msg_mme_t msg;
+ #if CHECK_BUFFER_OVERFLOW
+ uint signature;
+ #endif
+ msg_mme_t *next_msg;
+} interf_buffer_t;
+
+typedef struct interf_frag_msg_t
+{
+ mac_address_t osa;
+ u8 fmsn;
+ cyg_tick_count_t date_cyg_tick;
+ u8 frag_counter; // also used to check if the slot is empty !
+ msg_mme_t *msg[INTERF_MAX_FRAG_PER_MSG];
+} interf_frag_msg_t;
+
+#endif /*INTERF_TYPES_H_*/
diff --git a/cesar/cp/interf/interf.h b/cesar/cp/interf/interf.h
new file mode 100644
index 0000000000..65a96b1fe2
--- /dev/null
+++ b/cesar/cp/interf/interf.h
@@ -0,0 +1,132 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/interf/interf.h
+ * \brief Interface for MME messages between CP and others elements
+ * \ingroup cp_interf
+ */
+
+#ifndef interf__h__
+#define interf__h__
+
+#include <string.h>
+#include <stdbool.h>
+#include <stdio.h>
+
+#include <cyg/kernel/kapi.h>
+
+#include "lib/types.h"
+#include "cp/interf/inc/interf_types.h"
+#include "cp/interf/inc/interf_private.h"
+#include "cp/interf/inc/interf_cl_layer.h"
+#include "cp/msg/msg.h"
+#include "cp/station/station.h"
+#include "cp/cp_types.h"
+#include "cl/cl.h"
+
+/**
+ * \brief Init and check the MME interface
+ * \param interf_cl_ctx pointer to CL context
+ * \return 0 or Error code if failure
+ */
+E_ErrCode
+interf_init (cl_t *interf_cl_ctx);
+
+/**
+ * \brief receive new MME message
+ * this function can be called from any context
+ * \param see cl_mme_callback.H
+ * \return
+ */
+//void
+//interf_receive (const msg_mme_t *msg);
+void
+interf_receive (void *user, mfs_rx_t *mfs, u8 *buffer, uint length, cl_mme_recv_t *mme_recv);
+
+/**
+ * \brief Receive new MME message
+ * function is called in STA context
+ *
+ * \param
+ * \return
+ */
+void
+interf_received (void);
+
+/**
+ * \brief Send new MME message
+ * can be called from any context
+ * \param Msg : the message to send
+ * \param MsgSize : size of the message (in octets)
+ * \param IntId : the interface where to send the message
+ * \param msg_param : some particular parameters
+ * \return
+ */
+void
+interf_send (
+ const msg_mme_t *msg,
+ const uint msg_size,
+ const msg_param_t msg_param,
+ const tei_t tei
+ );
+
+/**
+ * \brief retreive the next part of a fragmented message
+ *
+ * \param MMEDest destination fifo
+ * \return pointer to the message or NULL
+ */
+msg_mme_t *
+interf_msg_get_next_part (const msg_mme_t *msg);
+
+/**
+ * \brief release the buffer of the given message
+ *
+ * \param msg : the given message
+ * \return
+ */
+void
+interf_release_buf (void *msg);
+
+/**
+ * \brief release buffer for any interface
+ *
+ * \param
+ * \return
+ */
+void
+interf_buf_to_release (void);
+
+/**
+ * \brief give a buffer to the STA or CCO process
+ * (can be called only from CCO or STA)
+ * \param
+ * \return the given buffer
+ */
+msg_mme_t *
+interf_give_buf (void);
+
+/**
+ * \brief purge the expired fragment of messages
+ * \param
+ * \return
+ */
+void
+interf_msg_purge (void);
+
+/**
+ * \brief convert a time in ms to a number of system tick
+ * this function can be moved in another module
+ * \param the value to convert
+ * \return the converted value
+ */
+cyg_tick_count_t
+interf_ms_to_cyg_tick (const uint ms);
+
+#endif
+
diff --git a/cesar/cp/interf/src/interf.c b/cesar/cp/interf/src/interf.c
new file mode 100644
index 0000000000..b07380b98f
--- /dev/null
+++ b/cesar/cp/interf/src/interf.c
@@ -0,0 +1,639 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/interf/interf.c
+ * \brief Interfaces between CP and CL
+ * \ingroup cp_interf
+ */
+
+#include "common/std.h"
+
+#include "cp/beacon/inc/bentry.h"
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/forward.h"
+#include "cp/beacon/inc/beacons_work.h"
+
+#include "cp/interf/interf.h"
+#include "cp/interf/inc/interf_private.h"
+
+/*
+ * locale Variables
+ */
+
+static interf_buffer_t pool[INTERF_NB_BUFFER];
+static interf_frag_msg_t frag_msg[INTERF_MAX_FRAG_MSG_SIM];
+static uint nb_local_buf_available;
+static cyg_mutex_t local_ressource_lock;
+static cyg_cond_t local_ressource_wait;
+// mbox for incomming msg
+static cyg_handle_t incoming_mbox_handle;
+static cyg_mbox incoming_mbox;
+// mbox for buf to release
+static cyg_handle_t buf_rel_mbox_handle;
+static cyg_mbox buf_rel_mbox;
+// delay in ticks for the frag MMI timeout
+static cyg_tick_count_t frag_MMI_time_out_delay;
+
+#if 1
+
+extern cp_sta_t cp_sta_global;
+
+int mme_buffer_count = 0;
+int mme_buffer_first = 0;
+int mme_buffer_last = -1;
+u8 * mme_tx_buffer[MME_BUFFER_MAXCOUNT];
+
+#define NEW_INTERFACE_WITH_DATA_PLANE
+#ifndef NEW_INTERFACE_WITH_DATA_PLANE
+void
+cp_mme_recv (void *user, mfs_rx_t *mfs, u8 *buffer, uint length,
+ cl_mme_recv_t *mme_recv);
+#else
+void
+cp_mme_recv (void *user, mfs_rx_t *mfs, u8 *buffer, uint length,
+ cl_mme_recv_t *mme_recv, bool encryption);
+void
+cp_beacon_recv(void *user_data, pb_beacon_t *beacon);
+#endif
+
+void cp_mme_get (void *user, u8 *buffer);
+
+#else
+
+/* External functions */
+
+extern void cp_mme_recv (void *user, mfs_rx_t *mfs, u8 *buffer, uint length,
+ cl_mme_recv_t *mme_recv);
+
+extern void cp_mme_get (void *user, u8 *buffer);
+
+#endif
+
+/***************************************************************/
+/***************************************************************/
+/***************************************************************/
+/* "Private" functions */
+/***************************************************************/
+/***************************************************************/
+/***************************************************************/
+
+msg_mme_t *
+interf_received_frag (msg_mme_t *msg)
+{
+ int i, j, checksum;
+ msg_mme_t *first_frag;
+ interf_buffer_t *buffer = NULL;
+
+ dbg_assert ( !msg_check_wrong_mme_const_values (msg));
+
+ // check if some old messages must be removed
+ // this can be done anywhere, but i think here is a good place.
+ interf_msg_purge ();
+ // now, process the received fragment
+ // check if previous fragment has been received
+ for (i=0; i < INTERF_MAX_FRAG_MSG_SIM ; i++)
+ {
+ if ( (frag_msg[i].fmsn == msg->fmi.fmsn)
+ && (memcmp (frag_msg[i].osa,msg->osa, sizeof(msg->osa))==0)
+ )
+ {
+ // we find previous fragment, so stop searching
+ break;
+ }
+ }
+ if(i == INTERF_MAX_FRAG_MSG_SIM)
+ {
+ // we did not found any previous fragment
+ // so look for first empty slot
+ for(i=0 ; i < INTERF_MAX_FRAG_MSG_SIM ; i++)
+ {
+ if( ! frag_msg[i].frag_counter)
+ {
+ // we found an empty slot
+ frag_msg[i].fmsn = msg->fmi.fmsn;
+ memcpy(frag_msg[i].osa, msg->osa, sizeof(msg->osa));
+ break;
+ }
+ }
+ }
+ if(i == INTERF_MAX_FRAG_MSG_SIM)
+ {
+ // obviously, there is no more space...
+ dbg_assert_print(0, "interf.c : frag_msg array is full, loose fragment");
+ // and so, we loose the message
+ interf_release_buf(msg);
+ return NULL;
+ }
+ frag_msg[i].date_cyg_tick = cyg_current_time();
+ // message are ordered in our structure
+ frag_msg[i].msg[msg->fmi.fn_mi] = msg;
+ frag_msg[i].frag_counter ++;
+ // check if message is complete and return
+ if( frag_msg[i].frag_counter == (msg->fmi.nf_mi + 1) )
+ {
+ // message is supposed to be completed
+ // check if all fragment are coherent
+ checksum = 0;
+ for(j=0 ; j<frag_msg[i].frag_counter ; j++)
+ checksum += frag_msg[i].msg[j]->fmi.fn_mi;
+ if(checksum != (frag_msg[i].frag_counter * msg->fmi.nf_mi / 2))
+ {
+ // the message fragment are not coherent (and they will be purged later)
+ dbg_assert_print(0, "interf.c : MME fragments incoherents\n");
+ return NULL;
+ }
+ // update the buffer structure
+ first_frag = frag_msg[i].msg[0];
+ for(j=0; j<frag_msg[i].frag_counter; j++)
+ {
+ buffer = PARENT_OF(interf_buffer_t, msg, frag_msg[i].msg[j]);
+ dbg_assert(buffer);
+ buffer->next_msg = frag_msg[i].msg[j+1];
+ }
+ // the last fragment has no NextPart
+ dbg_assert(buffer);
+ buffer->next_msg = NULL;
+ // reset the current slot
+ bzero(&frag_msg[i], sizeof(interf_frag_msg_t));
+ // and return ptr to first part of MME
+ return first_frag;
+ }
+ return NULL;
+}
+
+void
+interf_buf_to_release (void)
+{
+ interf_buffer_t *buf;
+ msg_mme_t *msg, *next_msg;
+
+ // as we have buffer to release in the mailbox
+ while ( (msg = cyg_mbox_tryget (buf_rel_mbox_handle)) != NULL )
+ {
+ #if DEBUG
+ int i;
+ dbg_assert( ! msg_check_wrong_mme_const_values(msg));
+ // check that the message to release is not the last part
+ // of a fragmented message (which would cause a severe
+ // memory leak)
+ for(i=0; i<INTERF_NB_BUFFER; i++)
+ {
+ dbg_assert(pool[i].next_msg != msg);
+ }
+ #endif
+ do
+ {
+ buf = PARENT_OF (interf_buffer_t, msg, msg);
+ buf->size = 0;
+ next_msg = buf->next_msg;
+ buf->next_msg = NULL;
+ } while (next_msg);
+ }
+}
+
+/***************************************************************/
+/***************************************************************/
+/***************************************************************/
+/* "Public" functions */
+/***************************************************************/
+/***************************************************************/
+/***************************************************************/
+
+#ifndef NEW_INTERFACE_WITH_DATA_PLANE
+E_ErrCode
+interf_init (cl_t *interf_cl_ctx)
+#else
+E_ErrCode
+interf_init (cl_t *interf_cl_ctx)
+#endif
+{
+ unsigned int i;
+ #if DEBUG
+ // check parameters
+ if (sizeof(pool[0].msg) != ETH_PACKET_MAX_SIZE )
+ {
+ printf("%u %s() : wrong mmentry size : %lu octets instead of %i\n",cyg_hal_sys_getpid(),__FUNCTION__, sizeof(pool[0].msg), ETH_PACKET_MAX_SIZE);
+ printf("%u %s() : osa : %lu\n",cyg_hal_sys_getpid(),__FUNCTION__, sizeof(pool[0].msg.osa));
+ printf("%u %s() : oda : %lu\n",cyg_hal_sys_getpid(),__FUNCTION__, sizeof(pool[0].msg.oda));
+ //printf("%u %s() : v_lan_tag : %lu\n",cyg_hal_sys_getpid(),__FUNCTION__, sizeof(pool[0].msg.v_lan_tag));
+ printf("%u %s() : m_type : %lu\n",cyg_hal_sys_getpid(),__FUNCTION__, sizeof(pool[0].msg.m_type));
+ printf("%u %s() : mmv : %lu\n",cyg_hal_sys_getpid(),__FUNCTION__, sizeof(pool[0].msg.mmv));
+ printf("%u %s() : mm_type : %lu\n",cyg_hal_sys_getpid(),__FUNCTION__, sizeof(pool[0].msg.mm_type));
+ printf("%u %s() : fmi : %lu\n",cyg_hal_sys_getpid(),__FUNCTION__, sizeof(pool[0].msg.fmi));
+ printf("%u %s() : mm_entry : %lu\n",cyg_hal_sys_getpid(),__FUNCTION__, sizeof(pool[0].msg.mm_entry));
+ }
+ #endif
+
+ // calculate the frag MMI timeout delay
+ frag_MMI_time_out_delay = FragMMI_ReassemblyTimeOut_sec;
+ // convert it from s to ms
+ frag_MMI_time_out_delay *= 1000;
+ // and then convert it to system ticks
+ frag_MMI_time_out_delay = interf_ms_to_cyg_tick (frag_MMI_time_out_delay);
+ // init msg const values
+ bzero (pool, sizeof(pool));
+ for(i=0 ; i<COUNT(pool) ; i++)
+ {
+ msg_set_mme_const_values(&pool[i].msg);
+ }
+ // Init FragMsg
+ bzero(frag_msg, sizeof(frag_msg));
+ // init of local ressources
+ nb_local_buf_available = 0;
+ cyg_mutex_init( & local_ressource_lock);
+ cyg_cond_init( & local_ressource_wait, & local_ressource_lock);
+ // Init callback and transmit buffer's pool
+ // init of mailboxes
+ cyg_mbox_create( & incoming_mbox_handle, & incoming_mbox);
+ cyg_mbox_create( & buf_rel_mbox_handle, & buf_rel_mbox);
+#if 0
+ // init CL layer
+ interf_cl_layer_init();
+#else
+ printf("%u %s() : Configure the CP-DP interface...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+# ifdef NEW_INTERFACE_WITH_DATA_PLANE
+ /* Configure the interface module between Control-Plane and Data-Plane */
+ interface_callback_init (cp_sta_global.interface, cp_mme_recv, cp_mme_get, cp_beacon_recv, NULL);
+# else
+ /* Configure the CP-CL interface */
+ cl_mme_recv_init (interf_cl_ctx, cp_mme_recv, NULL);
+ cl_mme_init_buffer_add_cb (interf_cl_ctx, cp_mme_get, NULL);
+# endif
+ printf("%u %s() : CP-CL interface configuration done.\n",cyg_hal_sys_getpid(),__FUNCTION__);
+#endif
+ // TODO : give one buffer to the CL
+ return Success;
+}
+
+msg_ctx_t my_msg_ctx;
+//void
+//interf_receive (const msg_mme_t *msg)
+void
+interf_receive (void *user, mfs_rx_t *mfs, u8 *buffer, uint length, cl_mme_recv_t *mme_recv)
+{
+ uint i, j;
+ msg_mme_t *msg = (msg_mme_t *) buffer;
+ msg_ctx_t *msg_ctx = &my_msg_ctx;
+
+ printf ("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+
+ //msg_ctx = blk_alloc();
+ msg_ctx->user = user;
+ msg_ctx->mfs = mfs;
+ msg_ctx->buffer = buffer;
+ msg_ctx->length = length;
+ //msg_ctx->mme_recv = mme_recv;
+ msg_ctx->cl_mme_data = (void*)mme_recv;
+
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* STA : %d CP : RECEIVING AN MME (len = %u bytes)...\n",cyg_hal_sys_getpid(),
+ /*cp_sta_global.mac_config->tei*/0,
+ length);
+ printf ("%u /* buffer = 0x%08lX ; msg_ctx = 0x%08lX ; msg_ctx->buffer = 0x%08lX\n",cyg_hal_sys_getpid(),(unsigned long)buffer,(unsigned long)msg_ctx,(unsigned long)msg_ctx->buffer);
+ if (length > 0)
+ {
+ j = 0;
+ printf("%u /* ",cyg_hal_sys_getpid());
+ for (i = 0; i < (length / 16); i++)
+ {
+ for (j = 0; j < 16; j++) printf ("%02x.",buffer[(i*16)+j]);
+ printf("\n");
+ printf("%u /* ",cyg_hal_sys_getpid());
+ }
+ for (i = 0; i < (length % 16); i++)
+ {
+ printf ("%02x.",buffer[(j*16)+i]);
+ }
+ printf("\n");
+ }
+ else
+ {
+ printf("%u /*\n",cyg_hal_sys_getpid());
+ }
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+
+ printf ("%u /* AVANT cyg_mbox_put() : msg_ctx = 0x%08lX ; msg_ctx->buffer = 0x%08lX\n",cyg_hal_sys_getpid(),(unsigned long)msg_ctx,(unsigned long)msg_ctx->buffer);
+
+ dbg_assert ( !msg_check_wrong_mme_const_values (msg));
+
+ #if DEBUG
+ printf("%u /* ON PASSE dans le cas DEBUG...*/\n",cyg_hal_sys_getpid());
+ //dbg_assert(cyg_mbox_tryput(incoming_mbox_handle, (void *) msg));
+ dbg_assert(cyg_mbox_tryput(incoming_mbox_handle, (void *) msg_ctx));
+ #else
+ //cyg_mbox_put (incoming_mbox_handle, msg);
+ printf ("%u /* AVANT cyg_mbox_put() : msg_ctx = 0x%08lX ; msg_ctx->buffer = 0x%08lX\n",cyg_hal_sys_getpid(),(unsigned long)msg_ctx,(unsigned long)msg_ctx->buffer);
+ cyg_mbox_put (incoming_mbox_handle, msg_ctx);
+ #endif
+ // set the event flag for the station
+ printf ("%u /* AVANT cyg_flag_setbits() : @station_flag=0x%08lx ; station_flag=0x%08lX\n",cyg_hal_sys_getpid(),(unsigned long)&station_flag,(unsigned long)*((u32*)&station_flag));
+ cyg_flag_setbits (&station_flag, STATION_FLAG_MSG_RCV);
+ printf ("%u /* APRES cyg_flag_setbits() : @station_flag=0x%08lx ; station_flag=0x%08lX\n",cyg_hal_sys_getpid(),(unsigned long)&station_flag,(unsigned long)*((u32*)&station_flag));
+}
+
+void
+interf_received (void)
+{
+ msg_ctx_t * msg_ctx;
+ msg_mme_t * msg;
+ msg_mme_b_t * msg_b;
+
+ printf ("%u %s() : AVANT while(cyg_mbox_tryget)...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ // as we have msg in the mailbox
+ while ( (msg_ctx = cyg_mbox_tryget (incoming_mbox_handle)) != NULL )
+ {
+ //printf ("%u %s() : DANS while(cyg_mbox_tryget)...",cyg_hal_sys_getpid(),__FUNCTION__);
+ //printf ("\t\tmsg_ctx = 0x%08lX ; msg_ctx->buffer = 0x%08lX\n",(unsigned long)msg_ctx,(unsigned long)msg_ctx->buffer);
+ printf ("%u %s() : DANS while(cyg_mbox_tryget)...\t\tmsg_ctx = 0x%08lX ; msg_ctx->buffer = 0x%08lX\n",cyg_hal_sys_getpid(),__FUNCTION__,(unsigned long)msg_ctx,(unsigned long)msg_ctx->buffer);
+ // check that the message is really an mme
+ //{int k; for (k=0;k<60;k++)printf("%02x.",msg_ctx->buffer[k]);printf("\n");}
+ if(msg_check_wrong_mme_const_values (msg_ctx->buffer))
+ {
+ // in debug we should ask why we received a wrong message...
+ dbg_assert(0);
+ // discard it and process the next msg
+ interf_release_buf(msg_ctx->buffer);
+ continue;
+ }
+ msg = (msg_mme_t *)msg_ctx->buffer;
+ // TODO : vérifier que l'ODA est bien celle de la station
+ // check if message is complete
+ printf("%u test msg->fmi.nf_mi != 0 ?\n",cyg_hal_sys_getpid());
+ msg_b = (msg_mme_b_t *)msg;
+ if (
+ ((msg->m_type == MSG_MTYPE_IEEE_ETHERTYPE) && (msg->fmi.nf_mi != 0))
+ ||
+ ((msg_b->m_type == MSG_MTYPE_IEEE_ETHERTYPE) && (msg_b->fmi.nf_mi != 0))
+ )
+ {
+ msg = interf_received_frag (msg);
+ // if message not complete, process the next one
+ if ( ! msg) continue;
+ }
+ // the message is complete, so we process it
+ msg_dispatch(msg_ctx);
+ }
+ printf ("%u %s() : APRES while(cyg_mbox_tryget)... => (achieved op.)\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ // give another buffer to the CL
+ // TODO : give one buffer to the CL
+}
+
+void
+interf_send (
+ const msg_mme_t *msg,
+ const uint msg_size,
+ const msg_param_t msg_param,
+ const tei_t tei
+ )
+{
+ uint size;
+
+ printf ("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert ( !msg_check_wrong_mme_const_values (msg));
+ dbg_assert (msg_size <= ETH_PACKET_MAX_SIZE);
+
+ // check if padding is requested (and if yes, do so)
+ if (msg_size < ETH_PACKET_MIN_SIZE) size = ETH_PACKET_MIN_SIZE;
+ else size = msg_size;
+ // and send the param...
+ interf_cl_layer_send_buf(msg, size, msg_param, tei);
+
+}
+
+msg_mme_t *
+interf_msg_get_next_part (const msg_mme_t *msg)
+{
+ dbg_assert ( !msg_check_wrong_mme_const_values (msg));
+
+ return PARENT_OF(interf_buffer_t, msg, msg)->next_msg;
+}
+
+void
+interf_release_buf (void *msg)
+{
+ printf ("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert ( !msg_check_wrong_mme_const_values (msg));
+
+ #if DEBUG
+ dbg_assert(cyg_mbox_tryput(buf_rel_mbox_handle, msg));
+ #else
+ // !!! WARNING : in some case we can wait here forever !!!
+ // TODO think about it...
+ cyg_mbox_put (buf_rel_mbox_handle, msg);
+ #endif
+ // set the flag
+ cyg_flag_setbits (&station_flag, STATION_FLAG_BUF_REL);
+}
+
+msg_mme_t *
+interf_give_buf (void)
+{
+ msg_mme_t *msg;
+ uint i;
+
+ printf ("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ for (i=0 ; i < sizeof(pool) ; i++)
+ {
+ if (pool[i].size == 0)
+ break;
+ }
+ dbg_assert (i != sizeof(pool));
+ // lock the availble buffer and return it
+ pool[i].size = 1;
+ msg = &pool[i].msg;
+ // and return the buffer
+ dbg_assert ( !msg_check_wrong_mme_const_values (msg));
+ return msg;
+}
+
+void
+interf_msg_purge (void)
+{
+ int i, j;
+ cyg_tick_count_t time_out_date;
+
+ printf ("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert (frag_MMI_time_out_delay >= 1);
+ // calculate the date before which messages has expired
+ time_out_date = cyg_current_time ();
+ if (time_out_date < frag_MMI_time_out_delay)
+ return;
+ time_out_date -= frag_MMI_time_out_delay;
+ // check if some messages has expired
+ for (i=0; i<INTERF_MAX_FRAG_MSG_SIM ; i++)
+ {
+ if ( (frag_msg[i].date_cyg_tick != 0)&& (frag_msg[i].date_cyg_tick
+ < time_out_date))
+ {
+ // the message has expired, so remove it parts
+ for (j=0; j<INTERF_MAX_FRAG_PER_MSG ; j++)
+ {
+ if (frag_msg[i].msg[j])
+ interf_release_buf (frag_msg[i].msg[j]);
+ }
+ // and reset it slot in the waiting file
+ bzero ( &frag_msg[i], sizeof(frag_msg[i]));
+ }
+ }
+}
+
+cyg_tick_count_t
+interf_ms_to_cyg_tick (const uint ms)
+{
+ cyg_resolution_t resolution;
+ cyg_tick_count_t return_value;
+
+ return_value = ms;
+ // convert it from ms to ns
+ return_value *= 1000000;
+ // and then convert it to system ticks
+ resolution = cyg_clock_get_resolution (cyg_real_time_clock ());
+ return_value *= resolution.divisor;
+ return_value /= resolution.dividend;
+ return return_value;
+}
+
+/*************/
+
+#if 1
+
+/**
+ * \brief Get a buffer from HLE (such a buffer is used to send MME to HLE or over PWL).
+ *
+ * \param user pointer to user context
+ * \param buffer buffer pointer
+ */
+void cp_mme_get (void *user, u8 *buffer)
+{
+ printf ("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* STA : %d CP : OBTAINING AN MME BUFFER...\n",cyg_hal_sys_getpid(),
+ cp_sta_global.mac_config->tei);
+ printf ("%u ### AVANT maj mme_buffer_count (first = %d ; last = %d ; count = %d) ###\n",cyg_hal_sys_getpid(),
+ mme_buffer_first, mme_buffer_last, mme_buffer_count);
+ if (mme_buffer_count < MME_BUFFER_MAXCOUNT)
+ {
+ mme_buffer_last = (mme_buffer_last + 1) % MME_BUFFER_MAXCOUNT;
+ mme_tx_buffer[mme_buffer_last] = buffer;
+ mme_buffer_count++;
+ if (mme_buffer_count == MME_BUFFER_MAXCOUNT)
+ {
+ printf ("%u /* STA : %d OK, BUT CP WILL NOT ACCEPT\n",cyg_hal_sys_getpid(),
+ cp_sta_global.mac_config->tei);
+ printf ("%u /* ANOTHER MME BUFFER.\n",cyg_hal_sys_getpid());
+ printf ("%u /* (MME_BUFFER_MAXCOUNT reached)\n",cyg_hal_sys_getpid());
+ }
+ }
+ else
+ {
+ printf ("%u /* STA : %d WARNING, CP CANNOT ACCEPT\n",cyg_hal_sys_getpid(),
+ cp_sta_global.mac_config->tei);
+ printf ("%u /* ANOTHER MME BUFFER !\n",cyg_hal_sys_getpid());
+ printf ("%u /* (MME_BUFFER_MAXCOUNT reached)\n",cyg_hal_sys_getpid());
+ }
+ printf ("%u ### APRES maj mme_buffer_count (first = %d ; last = %d ; count = %d) ###\n",cyg_hal_sys_getpid(),
+ mme_buffer_first, mme_buffer_last, mme_buffer_count);
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+}
+
+/**
+ * \brief Receive an MME message from CL.
+ *
+ * \param user a specific user context
+ * \param mfs the mfs used
+ * \param buffer the buffer containing the message being received
+ * \param length the length of message being received
+ * \param mme_recv
+ * \return status of memory blocks check
+ */
+#ifndef NEW_INTERFACE_WITH_DATA_PLANE
+void
+cp_mme_recv (void *user, mfs_rx_t *mfs, u8 *buffer, uint length, cl_mme_recv_t *mme_recv)
+#else
+void
+cp_mme_recv (void *user, mfs_rx_t *mfs, u8 *buffer, uint length, cl_mme_recv_t *mme_recv, bool encryption)
+#endif
+{
+ printf ("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ interf_receive (user, mfs, buffer, length, mme_recv);
+}
+
+#if 0
+/** Beacon PB descriptor. */
+union pb_beacon_t
+{
+ /** Common block descriptor. */
+ blk_t blk;
+ /** Hardware descriptor. */
+ phy_pb_t phy_pb;
+ struct
+ {
+ /** Pointer to next descriptor. */
+ union pb_t *next;
+ /** Pointer to data. */
+ u8 *data;
+ /** First four bytes of the beacon payload. */
+ u32 first_data_word;
+ };
+};
+typedef union pb_beacon_t pb_beacon_t;
+#endif
+
+/**
+ * \brief Receive a beacon.
+ *
+ * \param user a specific user context
+ * \param beacon the received beacon buffer reference
+ *
+ */
+void
+cp_beacon_recv(void *user_data, pb_beacon_t *beacon)
+{
+#define BEACON_DATA_MAXSIZE 132
+ uint i, j;
+ u8 *buffer;
+
+ printf ("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert (beacon);
+
+
+ // TODO : to be removed (Hexdump of beacon is for debug purpose only)
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* STA : %d CP : RECEIVING A BEACON...\n",cyg_hal_sys_getpid(),
+ /*cp_sta_global.mac_config->tei*/0);
+ printf ("%u /* @beacon_descriptor = 0x%08lx\n",cyg_hal_sys_getpid(),
+ (unsigned long)beacon);
+ {
+ j = 0;
+ printf("%u /* ",cyg_hal_sys_getpid());
+ buffer = (u8 *)&(beacon->first_data_word);
+ for (i = 0; i < (BEACON_DATA_MAXSIZE / 16); i++)
+ {
+ for (j = 0; j < 16; j++)
+ {
+ if (((j*16)+i) == 4) buffer = beacon->data;
+ printf ("%02x.",buffer[(i*16)+j]);
+ }
+ printf("\n");
+ printf("%u /* ",cyg_hal_sys_getpid());
+ }
+ for (i = 0; i < (BEACON_DATA_MAXSIZE % 16); i++)
+ {
+ printf ("%02x.",buffer[(j*16)+i]);
+ }
+ printf("\n");
+ }
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+
+
+ // TODO : generate beacon receive event for Control-Plane FSM
+ // and use this beacon
+
+}
+
+#endif
diff --git a/cesar/cp/interf/src/interf_cl_layer.c b/cesar/cp/interf/src/interf_cl_layer.c
new file mode 100644
index 0000000000..468121ad39
--- /dev/null
+++ b/cesar/cp/interf/src/interf_cl_layer.c
@@ -0,0 +1,89 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+
+#include "common/std.h"
+
+#include "cp/beacon/inc/bentry.h"
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/forward.h"
+#include "cp/beacon/inc/beacons_work.h"
+
+#include "cp/interf/inc/interf_cl_layer.h"
+
+extern cl_t *m_cl_ctx;
+extern mac_store_t *m_mac_store_ctx;
+
+void interf_cl_layer_init (void)
+{
+// u8 *buf;
+// int i;
+ // get the mac store context
+ // get the cl context
+ // register the receive callback at the cl
+ //cl_mme_recv_init (m_cl_ctx, interf_receive, NULL);
+ // transmit some buffer to the cl
+/* for(i=0 ; i<3 ; i++)
+ {
+ buf = (u8 *) interf_give_buf();
+ cl_mme_recv_done (m_cl_ctx, buf);
+ }*/
+}
+
+void interf_cl_layer_add_buf (msg_mme_t *msg)
+{
+ /*
+ dbg_assert(m_mac_store_ctx);
+ dbg_assert (m_cl_ctx);
+ dbg_assert ( !msg_check_wrong_mme_const_values (msg));
+*/
+}
+
+void
+interf_cl_layer_send_buf (
+ const msg_mme_t *msg,
+ const uint length,
+ const msg_param_t msg_param,
+ const tei_t tei
+ )
+{
+ /*
+ mfs_tx_t *mfs_tx;
+ bool added;
+
+ dbg_assert(m_mac_store_ctx);
+ dbg_assert (m_cl_ctx);
+ dbg_assert ( !msg_check_wrong_mme_const_values (msg));
+
+ // Retrieve the TX MFS.
+ mfs_tx = mac_store_mfs_get_tx (m_mac_store_ctx,
+ msg_param.mnbf,
+ true,
+ MAC_LID_NONE,
+ tei
+ );
+ if( ! mfs_tx)
+ {
+ mfs_tx = mac_store_mfs_add_tx (m_mac_store_ctx,
+ msg_param.mnbf,
+ true,
+ MAC_LID_NONE,
+ tei,
+ &added
+ );
+ dbg_assert(added);
+ }
+ // Send the MME to the PLC
+ cl_mme_send (m_cl_ctx,
+ (u8 *) msg,
+ length,
+ mfs_tx,
+ interf_release_buf,
+ (void *) msg
+ );
+*/
+}
diff --git a/cesar/cp/msg/Module b/cesar/cp/msg/Module
new file mode 100644
index 0000000000..39783871f8
--- /dev/null
+++ b/cesar/cp/msg/Module
@@ -0,0 +1,7 @@
+SOURCES := msg.c \
+ msg_cm.c \
+ msg_cm_convert.c \
+ msg_cc.c \
+ msg_apcm.c \
+ msg_drv.c \
+
diff --git a/cesar/cp/msg/ecos.ecc.sh b/cesar/cp/msg/ecos.ecc.sh
new file mode 100644
index 0000000000..8253d98c9a
--- /dev/null
+++ b/cesar/cp/msg/ecos.ecc.sh
@@ -0,0 +1,5 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new linux default
+cat >> $config <<EOF
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/cp/msg/inc/msg_apcm.h b/cesar/cp/msg/inc/msg_apcm.h
new file mode 100644
index 0000000000..13b38c1d42
--- /dev/null
+++ b/cesar/cp/msg/inc/msg_apcm.h
@@ -0,0 +1,16 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file msg_apcm.h
+ * \brief File Description
+ * \ingroup cp/msg
+ *
+ */
+
+#include "common/std.h"
+
+
diff --git a/cesar/cp/msg/inc/msg_cc.h b/cesar/cp/msg/inc/msg_cc.h
new file mode 100644
index 0000000000..0bfa9c1649
--- /dev/null
+++ b/cesar/cp/msg/inc/msg_cc.h
@@ -0,0 +1,73 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/msg/inc/msg_cc.h
+ * \brief MME messages of CC type
+ * \ingroup cp_msg
+ */
+
+#ifndef msg_cc__h__
+#define msg_cc__h__
+
+#include "cp/msg/msg.h"
+
+
+typedef struct cc_assoc_req_t // 11.2.28
+{
+ // TODO : set the real types
+ u8 req_type;
+ nid_t nid;
+ u8 cco_capability;
+ u8 proxy_networking_capability;
+} __attribute__ ((packed)) cc_assoc_req_t;
+
+typedef struct cc_assoc_cnf_t // 11.2.29
+{
+ u8 result;
+ nid_t nid;
+ u8 snid;
+ tei_t sta_tei;
+ u16 lease_time;
+} __attribute__ ((packed)) cc_assoc_cnf_t;
+
+typedef struct cc_set_tei_map_ind_sub_t // 11.2.35
+{
+ tei_t tei;
+ mac_address_t mac_address;
+ u8 status;
+} __attribute__ ((packed)) cc_set_tei_map_ind_sub_t;
+
+#define SET_TEI_MAP_SUB_NB_ELEM ((ETH_PACKET_MAX_SIZE - MSG_MME_HEADER_SIZE) / sizeof(cc_set_tei_map_ind_sub_t))
+
+typedef struct cc_set_tei_map_ind_t // 11.2.35
+{
+ u8 mode;
+ u8 num;
+ cc_set_tei_map_ind_sub_t sub[SET_TEI_MAP_SUB_NB_ELEM];
+} __attribute__ ((packed)) cc_set_tei_map_ind_t;
+
+
+void msg_cc_assoc_req_send(const mac_address_t oda);
+
+void msg_cc_assoc_cnf_send(const mac_address_t oda, const u8 result, const tei_t sta_tei, const u16 lease_time);
+
+/**
+ * \brief will send msg_cc_set_tei_map_ind
+ * \param oda : station to which the message is sent
+ * \param mode : see 11.2.35.1
+ * \param tei : if mode == 0x01 (resp 0x02), this is the tei of the added (resp deleted) sta
+ * if mode == 0x0, set tei to 0
+ * \param recall : when this message is fragmented, call this function once per fragment, but
+ * set recall to true only the first time.
+ * \return
+ */
+void msg_cc_set_tei_map_ind_send(const mac_address_t oda, const u8 mode, const tei_t tei, const bool recall);
+
+
+
+#endif
diff --git a/cesar/cp/msg/inc/msg_cm.h b/cesar/cp/msg/inc/msg_cm.h
new file mode 100644
index 0000000000..9307d91ee5
--- /dev/null
+++ b/cesar/cp/msg/inc/msg_cm.h
@@ -0,0 +1,88 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/msg/inc/msg_cm.h
+ * \brief MME messages of CM type
+ * \ingroup cp_msg
+ */
+#ifndef MSG_CM_H_
+#define MSG_CM_H_
+
+#include "cp/cp_types.h"
+#include "cp/interf/inc/interf_types.h"
+#include "cp/msg/msg.h"
+#include "cp/secu/secu.h"
+
+//#include "cp/msg/inc/msg_cm_conn.h"
+#include "cp/msg/inc/msg_cm_convert.h"
+
+
+typedef struct cm_unassociated_sta_t // 11.5.1
+{
+ // TODO : set the real types
+ nid_t nid;
+ u8 cco_capability;
+} __attribute__ ((packed)) cm_unassociated_sta_t;
+
+typedef struct cm_encrypted_payload_t // 11.5.2
+{
+ peks_t peks;
+ u8 avln_status;
+ u8 pid;
+ u16 prn;
+ u8 pmn;
+ u8 iv[16];
+ u16 len;
+ u8 rf[15];
+} __attribute__ ((packed)) cm_encrypted_payload_t;
+
+typedef struct cm_encrypted_payload_sub_t // 11.5.2
+{
+ u32 crc;
+ u8 pid;
+ u16 prn;
+ u8 pmn;
+ u8 padding[15];
+ u8 rf_len;
+} __attribute__ ((packed)) cm_encrypted_payload_sub_t;
+
+typedef struct cm_set_key_req_t
+{
+ u8 key_type;
+ u32 my_nonce;
+ u32 your_nonce;
+ u8 pid;
+ u16 prn;
+ u8 pmn;
+ u8 cco_capa;
+ //nid_t nid;
+ u8 nid[7];
+ u8 new_eks;
+ u8 new_key[16];
+} __attribute__ ((packed)) cm_set_key_req_t;
+
+void
+msg_cm_init(void);
+
+//void msg_cm_unassociated_sta_ind_send(interf_id_t interf_id, mac_adresse_t oda);
+void
+msg_cm_unassociated_sta_ind_send(const mac_address_t oda);
+
+void
+msg_cm_encrypted_payload_ind_send(
+ const msg_mme_t *encapsulated_msg,
+ const msg_param_t encapsulated_msg_param,
+ const tei_t tei,
+ const bool last_msg_of_p_run,
+ const cp_pid_t pid,
+ const u16 msg_size
+ );
+
+
+
+#endif /*MSG_CM_H_*/
diff --git a/cesar/cp/msg/inc/msg_cm_conn_dbg.h b/cesar/cp/msg/inc/msg_cm_conn_dbg.h
new file mode 100644
index 0000000000..e8e7730131
--- /dev/null
+++ b/cesar/cp/msg/inc/msg_cm_conn_dbg.h
@@ -0,0 +1,239 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file msg_cm_conn_dbg.h
+ * \brief File Description
+ * \ingroup cp/msg
+ *
+ */
+
+
+
+
+
+#ifndef MSG_CM_CONN_DBG_H_
+#define MSG_CM_CONN_DBG_H_
+
+/*! \def cp_dbg_cinfo_valid(cinfo_valid)
+ * Assertion for CINFO.valid.
+ */
+#define cp_dbg_cinfo_valid(cinfo_valid) \
+ dbg_assert_print( ((cinfo_valid) == CINFO_NOT_VALID) || ((cinfo_valid) == CINFO_VALID), "Invalid CINFO.valid field - current value 0x%x", cinfo_valid)
+
+/*! \def cp_dbg_mac_service_type(mac_service_type)
+ * Assertion for CINFO.MAC_SERVICE_TYPE.
+ */
+#define cp_dbg_mac_service_type(mac_service_type) \
+ dbg_assert_print( ((mac_service_type) == MAC_CONTENTION_FREE) || ((mac_service_type) == MAC_CONTENTION) || (mac_service_type == MAC_CONTENTION_FREE_PREFERRED), "Invalid CINFO.mac_service_type field - current value 0x%x", mac_service_type)
+
+/*! \def cp_dbg_user_priority(user_priotity)
+ * Assertion for CINFO.USER_PRIORITY.
+ */
+#define cp_dbg_user_priority(user_priority) \
+ dbg_assert_print( ((user_priority) == USER_PRIORITY_CAP0) || ((user_priority) == USER_PRIORITY_CAP1) || (user_priority == USER_PRIORITY_CAP2) || (user_priority == USER_PRIORITY_CAP3), "Invalid CINFO.user_priority field - current valie 0x%x", user_priority )
+
+/*! \def cp_dbg_ats(ats)
+ * Assertion for CINFO.ats.
+ */
+#define cp_dbg_ats(ats)\
+ dbg_assert_print( ((ats) == ATS_FOR_HLE) || ((ats) == ATS_NOT_FOR_HLE), "Invalid CINFO.ats field - current value 0x%x", ats)
+
+/*! \def cp_dbg_smoothing(smoothing)
+ * Assertion for CINFO.smoothing.
+ */
+#define cp_dbg_smoothing(smoothing)\
+ dbg_assert_print( ((smoothing) == SMOOTHING_REQUESTED) || ((smoothing) == SMOOTHING_NOT_REQUESTED), "Invalid CINFO.smoothing field - current value 0x%x", smoothing)
+
+/*! \def cp_dbg_qmp_forward_or_reverse(ForR)
+ * Assertion for QMP.forward_or_reverse.
+ */
+#define cp_dbg_qmp_forward_or_reverse(ForR)\
+ dbg_assert_print( ((ForR) == QMP_FORWARD) || ((ForR) == QMP_REVERSE), "Invalid QMP.forward_or_reverse field - current value 0x%x", ForR)
+
+/*! \def cp_dbg_qmp_field_identifier(field_identifier)
+ * Assertion for QMP.fid.
+ */
+#define cp_dbg_qmp_field_identifier(field_identifier) \
+ dbg_assert_print( ((field_identifier) < 0x16) || (0X80 > (field_identifier)), "Invalid QMP.field_identifier field - current value 0x%x", field_identifier)
+
+/*! \def cp_dbg_cid(cid)
+ * Assertion for CID.
+ */
+#define cp_dbg_cid(cid) \
+ dbg_assert_print( (cid) != 0, "Invalid cid - current value 0x%x", cid)
+
+/*! \def cp_dbg_classifier_version(classifier_version)
+ * Assertion for classifier version.
+ */
+#define cp_dbg_classifier_version(classifier_version) \
+ dbg_assert_print((classifier_version) == 0, "Invalid classifier_version field - current value 0x%x", classifier_version)
+
+/*! \def cp_dbg_exception_policy(exception_policy)
+ * Assertion for exception policy.
+ */
+#define cp_dbg_exception_policy(exception_policy) \
+ dbg_assert_print( ((exception_policy) == 0x00) || ((exception_policy) == 0x01), "Invalid exception_policy field - current value 0x%x", exception_policy)
+
+/*! \def cp_dbg_bidirectional_burst(burst)
+ * Assertion for bidirectional burst.
+ */
+#define cp_dbg_bidirectional_burst(burst) \
+ dbg_assert_print( ( (burst) == 0x00 ) || ( (burst) == 0x01) || ( (burst) == 0x02), "Invalid bidirectional_burst field - current value 0x%x", burst)
+
+/*! \def cp_dbg_cdesc_ipversion(ipversion)
+ * Assertion for CDESC.ipversion
+ */
+#define cp_dbg_cdesc_ipversion(ipversion) \
+ dbg_assert_print( ( (ipversion) == 0x00) || ((ipversion) == 0x01), "Invalid CDESC.ipversion field - current version 0x%x", ipversion)
+
+/*! \def cp_dbg_lid(lid)
+ * Assertion for lid. See table 5-134 for more details
+ */
+#define cp_dbg_lid(lid) \
+ dbg_assert_print( ( (lid) !=0x01) || ( (lid) != 0x02) || ( (lid) != 0x03), "Invalid lid - current value 0x%x", lid)
+
+/*! \def cp_dbg_llid(lid)
+ * Assertion for llid.
+ */
+#define cp_dbg_llid(lid) cp_dbg_lid(lid)
+
+/*! \def cp_dbg_conn_new_result(result)
+ * Assertion for connection new result.
+ */
+#define cp_dbg_conn_new_result(result) \
+ dbg_assert_print( ( (result) == CONN_SUCCESS) || ( (result) == CONN_FAILURE_CLASSIFIER_RESSOURCE_NOT_AVAILABLE) || ( (result) == CONN_FAILURE_CLASSIFIER_RULE_NOT_SUPPORTED) || ( (result) == CONN_FAILURE_MAXIMUM_CONNECTION_REACHED) || ( (result) == CONN_FAILURE_OTHER), "Invalid conn_new_result - current value 0x%x", result )
+
+/*! \def cp_dbg_reason_code
+ * Assertion for reason code.
+ */
+#define cp_dbg_reason_code(reason_code) \
+ dbg_assert_print( ( (reason_code) == NORMAL_RELEASE) || ( (reason_code) == VIOLATED_CSPEC), "Invalid reason_code - current value 0x%x", reason_code)
+
+/*! \def cp_dbg_conn_mod_result(conn_mod_result)
+ * Assertion for conn_mod_result.
+ */
+#define cp_dbg_conn_mod_result(conn_mod_result) \
+ dbg_assert_print( ( (conn_mod_result) == CONN_MOD_FAILED) || ( (conn_mod_result) == CONN_MOD_SUCCESS), "Invalid conn_mod_result - current value 0x%x", conn_mod_result)
+
+/*! \def cp_dbg_conn_info_req_type(reqType)
+ * Assertion for req type.
+ */
+#define cp_dbg_conn_info_req_type(reqType) \
+ dbg_assert_print( ( (reqType) == CONN_INFO_ALL_ACTIVE_CONNECTION) || ( (reqType) == CONN_INFO_SPECIFIC_CID) || (reqType == CONN_INFO_GLOBAL_LINK), "Invalid request_type - current value 0x%x", reqType)
+
+/*! \def cp_dbg_tei(tei)
+ * Assertion for TEI (Terminal Equipment Identifier).
+ */
+#define cp_dbg_tei(tei) \
+ dbg_assert_print( tei, "Invalid TEI - current value 0x%x", tei)
+
+/*! \def cp_dbg_cinfo(cinfo)
+ * Assertion for cinfo structure.
+ */
+#define cp_dbg_cinfo(cinfo)\
+ cp_dbg_cinfo_valid( (cinfo).valid); \
+ cp_dbg_mac_service_type( (cinfo).mac_service_type); \
+ cp_dbg_user_priority( (cinfo).user_priority); \
+ cp_dbg_ats( (cinfo).ats); \
+ cp_dbg_smoothing( (cinfo).smoothing)
+
+/*! \def cp_dbg_qmp(qmp)
+ * Assertion for qmp structure.
+ */
+#define cp_dbg_qmp(qmp) \
+ cp_dbg_qmp_forward_or_reverse( (qmp).forward_or_reverse);\
+ cp_dbg_exception_policy( (qmp).cm.exception_policy); \
+ cp_dbg_bidirectional_burst( (qmp).cm.bidirectional_burst ); \
+ cp_dbg_cdesc_ipversion( (qmp).cm.cdesc.ip_version)
+
+/*! \def cp_dbg_cspec(cspec)
+ * Assertion for cspec structure.
+ */
+#define cp_dbg_cspec(cspec) \
+ cp_dbg_cinfo( (cspec).cinfo_forward); \
+ cp_dbg_cinfo( (cspec).cinfo_reverse); \
+ cp_dbg_qmp( (cspec).qmp_forward); \
+ cp_dbg_qmp( (cspec).qmp_reverse);\
+ dbg_assert_print( (cspec).qmp_forward.forward_or_reverse == QMP_FORWARD, "Invalid QMP_forward.forward_or_reverse value - expected QMP_FORWARD and current value : %i", (cspec).qmp_forward.forward_or_reverse );\
+ dbg_assert_print( (cspec).qmp_reverse.forward_or_reverse == QMP_REVERSE, "Invalid QMP_reverse.forward_or_reverse value - expected QMP_REVERSE and current value : %i", (cspec).qmp_forward.forward_or_reverse )
+
+
+/*! \def cp_dbg_classifier_rule(classifier_rule)
+ * Assertion for classifier rule
+ */
+#define cp_dbg_classifier_rule(classifier_rule)\
+ cp_dbg_classifier_version( (classifier_rule).classifier_version)
+
+/*! \def cp_dbg_conn_info(conn_info)
+ * Assertion for conn_info structure
+ */
+#define cp_dbg_conn_info( conn_info ) \
+ cp_dbg_cid( (conn_info).cid); \
+ cp_dbg_tei( (conn_info).stei); \
+ cp_dbg_tei( (conn_info).dtei); \
+ cp_dbg_lid( (conn_info).lid_t); \
+ cp_dbg_lid( (conn_info).lid_f); \
+ cp_dbg_cspec( (conn_info).cspec)
+
+/*! \def cp_dbg_msg_cm_conn_new_req(msg_cm_conn_new_req)
+ * Assertion for CM_CONN_NEW.REQ message.
+ */
+#define cp_dbg_msg_cm_conn_new_req(msg_cm_conn_new_req) \
+ cp_dbg_cid( (msg_cm_conn_new_req).cid); \
+ cp_dbg_cspec( (msg_cm_conn_new_req).cspec); \
+ cp_dbg_classifier_rule( (msg_cm_conn_new_req).classifier_rule)
+
+/*! \def cp_dbg_msg_cm_conn_new_cnf(msg_cm_conn_new_cnf)
+ * Assertion for CM_CONN_NEW.CNF message.
+ */
+#define cp_dbg_msg_cm_conn_new_cnf(msg_cm_conn_new_cnf) \
+ cp_dbg_cid( (msg_cm_conn_new_cnf).cid); \
+ cp_dbg_llid( (msg_cm_conn_new_cnf).llid_r); \
+ cp_dbg_conn_new_result( (msg_cm_conn_new_cnf).result); \
+ cp_dbg_cspec( (msg_cm_conn_new_cnf).cspec_proposed)
+
+/*! \def cp_dbg_msg_cm_conn_rel_ind(msg_cm_conn_rel_ind)
+ * Assertion for CM_CONN_REL.IND message
+ */
+#define cp_dbg_msg_cm_conn_rel_ind(msg_cm_conn_rel_ind) \
+ cp_dbg_cid( (msg_cm_conn_rel_ind).cid); \
+ cp_dbg_reason_code( (msg_cm_conn_rel_ind).reason_code);\
+ cp_dbg_cspec( (msg_cm_conn_rel_ind).violated_cspec)
+
+/*! \def cp_dbg_msg_cm_conn_rel_rsp(msg_cm_conn_rel_rsp)
+ * Assertion for CM_CONN_REL.RSP message.
+ */
+#define cp_dbg_msg_cm_conn_rel_rsp(msg_cm_conn_rel_rsp) \
+ cp_dbg_cid( (msg_cm_conn_rel_rsp).cid)
+
+/*! \def cp_dbg_msg_cm_conn_mod_req(msg_cm_conn_mod_req)
+ * Assertion for CM_CONN_MOD.REQ message.
+ */
+#define cp_dbg_msg_cm_conn_mod_req(msg_cm_conn_mod_req) \
+ cp_dbg_cid( (msg_cm_conn_mod_req).cid); \
+ cp_dbg_cspec( (msg_cm_conn_mod_req).modified_cspec)
+
+/*! \def cp_dbg_msg_cm_conn_mod_cnf(msg_cm_conn_mod_cnf)
+ * Assertion for CM_CONN_MOD.CNF message.
+ */
+#define cp_dbg_msg_cm_conn_mod_cnf(msg_cm_conn_mod_cnf)\
+ cp_dbg_cid( (msg_cm_conn_mod_cnf).cid); \
+ cp_dbg_conn_mod_result( (msg_cm_conn_mod_cnf).result); \
+ cp_dbg_cspec( (msg_cm_conn_mod_cnf).proposed_cspec)
+
+/*! \def cp_dbg_msg_cm_conn_info_req(msg_cm_conn_info_req)
+ * Assertion for CM_CONN_INFO.REQ message.
+ */
+#define cp_dbg_msg_cm_conn_info_req(msg_cm_conn_info_req) \
+ cp_dbg_conn_info_req_type( (msg_cm_conn_info_req).reqType); \
+ cp_dbg_cid( (msg_cm_conn_info_req).cid); \
+ cp_dbg_llid( (msg_cm_conn_info_req).glid)
+
+// TODO make cm_conn_info.cnf
+//#define cp_dbg_msg_cm_conn_info_cnf(msg_cm_conn_info) cp_dbg_conn()
+
+#endif /*MSG_CM_CONN_DBG_H_*/
diff --git a/cesar/cp/msg/inc/msg_cm_convert.h b/cesar/cp/msg/inc/msg_cm_convert.h
new file mode 100644
index 0000000000..3d90fbb68d
--- /dev/null
+++ b/cesar/cp/msg/inc/msg_cm_convert.h
@@ -0,0 +1,24 @@
+#ifndef MSG_CM_CONVERT_H_
+#define MSG_CM_CONVERT_H_
+
+#include "cp/msg/inc/msg_cm.h"
+#include "lib/bitstream.h"
+
+
+void
+msg_mme_header_convert(
+ u8 *buffer,
+ msg_mme_t *msg,
+ bitstream_type_t read,
+ bitstream_t ctx
+ );
+
+void
+msg_cm_unassociated_sta_ind_convert(
+ u8 *buffer,
+ msg_mme_t *msg,
+ bitstream_type_t read
+ );
+
+
+#endif /*MSG_CM_CONVERT_H_*/
diff --git a/cesar/cp/msg/inc/msg_const.h b/cesar/cp/msg/inc/msg_const.h
new file mode 100644
index 0000000000..c393d63df8
--- /dev/null
+++ b/cesar/cp/msg/inc/msg_const.h
@@ -0,0 +1,325 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/msg/inc/msg_const.h
+ * \brief constants of msg module
+ * \ingroup cp_msg
+ */
+#ifndef MSG_CONST_H_
+#define MSG_CONST_H_
+
+#include "mac/sar/inc/sar_mf.h"
+#include "cp/cp_types.h"
+#include "cp/secu/inc/secu_types.h"
+
+/*
+ * Homeplug AV constantes
+ */
+#define MSG_VLAN_TAG 0 // TBD
+#define MSG_VLAN_TAG_IEEE_802_1Q 0x8100 // 11.1.3
+#define MSG_MTYPE 0x88E1 // 11.1
+#define MSG_MTYPE_IEEE_ETHERTYPE MSG_MTYPE
+#define MSG_MME_HEADER_SIZE 19
+#define MSG_MM_VERSION 0x01 // 11.1.5
+
+/* physical min & max length of MME header (refer to Table 11-178 in HP_AV spec) */
+#define MME_HEADER_MINSIZE 19 // physical min length of MME message header (MME header having no "VLAN Tag" field)
+#define MME_HEADER_MAXSIZE 23 // physical max length of MME message header (MME header having a "VLAN Tag" field)
+
+/*
+ * other constants
+ */
+
+// MMTYPE base-values for DRV-MME messages
+#define DRV_STA_SET_MAC_ADDR 0xA000
+#define DRV_STA_SET_CCO_PREF 0xA004
+#define DRV_STA_SET_WAS_CCO 0xA008
+#define DRV_STA_SET_NPW 0xA00C
+#define DRV_STA_SET_DPW 0xA010
+#define DRV_STA_SET_SL 0xA014
+#define DRV_STA_SET_M_STA_HFID 0xA018
+#define DRV_STA_SET_U_STA_HFID 0xA01C
+#define DRV_STA_SET_AVLN_HFID 0xA020
+#define DRV_STA_SET_TONEMASK 0xA024
+#define DRV_STA_START 0xA028
+#define DRV_STA_STOP 0xA02C
+
+// MMTYPE sub-values for MMEs (REQ, CNF, IND or RSP)
+#define REQ 0x00
+#define CNF 0x01
+#define IND 0x02
+#define RSP 0x03
+
+/*
+ * mm type constants
+ * take care of the following :
+ * according to Intellon technical reference manual of Homeplug AV firmware p9,
+ * the two LSB value of messages should be :
+ * 0b00 for REQ
+ * 0b01 for CNF
+ * 0b10 for IND
+ * 0b11 for RSP
+ * this is very unclear in the Homeplug AV specification v1.0.10
+ */
+typedef enum mm_type_t
+{
+ CC_CCO_APPOINT_REQ = 0x0000,
+ CC_CCO_APPOINT_CNF = 0x0001,
+ CC_BACKUP_APPOINT_REQ = 0x0004,
+ CC_BACKUP_APPOINT_CNF = 0x0005,
+ CC_LINK_INFO_REQ = 0x0008,
+ CC_LINK_INFO_CNF = 0x0009,
+ CC_LINK_INFO_IND = 0x000A,
+ CC_LINK_INFO_RSP = 0x000B,
+ CC_HANDOVER_REQ = 0x000C,
+ CC_HANDOVER_CNF = 0x000D,
+ CC_HANDOVER_INFO_IND = 0x0012,
+ CC_HANDOVER_INFO_RSP = 0x0013,
+ CC_DISCOVER_LIST_REQ = 0x0014,
+ CC_DISCOVER_LIST_CNF = 0x0015,
+ CC_DISCOVER_LIST_IND = 0x0016,
+ CC_LINK_NEW_REQ = 0x0018,
+ CC_LINK_NEW_CNF = 0x0019,
+ CC_LINK_MOD_REQ = 0x001C,
+ CC_LINK_MOD_CNF = 0x001D,
+ CC_LINK_SQZ_REQ = 0x0020,
+ CC_LINK_SQZ_CNF = 0x0021,
+ CC_LINK_REL_REQ = 0x0024,
+ CC_LINK_REL_IND = 0x0025,
+ CC_DETECT_REPORT_REQ = 0x0028,
+ CC_DETECT_REPORT_CNF = 0x0029,
+ CC_WHO_RU_REQ = 0x002C,
+ CC_WHO_RU_CNF = 0x002D,
+ CC_ASSOC_REQ = 0x0030,
+ CC_ASSOC_CNF = 0x0031,
+ CC_LEAVE_REQ = 0x0034,
+ CC_LEAVE_CNF = 0x0035,
+ CC_LEAVE_IND = 0x0036,
+ CC_LEAVE_RSP = 0x0037,
+ CC_SET_TEI_MAP_REQ = 0x0038,
+ CC_SET_TEI_MAP_IND = 0x0039,
+ CC_RELAY_REQ = 0x003C,
+ CC_RELAY_IND = 0x003D,
+ CC_BEACON_RELIABILITY_REQ = 0x0040,
+ CC_BEACON_RELIABILITY_CNF = 0x0041,
+ CC_ALLOC_MOVE_REQ = 0x0044,
+ CC_ALLOC_MOVE_CNF = 0x0045,
+ CC_ACCESS_NEW_REQ = 0x0048,
+ CC_ACCESS_NEW_CNF = 0x0049,
+ CC_ACCESS_NEW_IND = 0x004A,
+ CC_ACCESS_NEW_RSP = 0x004B,
+ CC_ACCESS_REL_REQ = 0x004C,
+ CC_ACCESS_REL_CNF = 0x004D,
+ CC_ACCESS_REL_IND = 0x004E,
+ CC_ACCESS_REL_RSP = 0x004F,
+ CC_DCPPC_IND = 0x0052,
+ CC_DCPPC_RSP = 0x0053,
+ CC_HP1_DET_REQ = 0x0054,
+ CC_HP1_DET_CNF = 0x0055,
+ CC_BLE_UPDATE_IND = 0x005A,
+
+ CP_PROXY_APPOINT_REQ = 0x2000,
+ CP_PROXY_APPOINT_CNF = 0x2001,
+ PH_PROXY_APPOINT_IND = 0x2006,
+ CP_PROXY_WAKE_REQ = 0x2008,
+
+ NN_INL_REQ = 0x4000,
+ NN_INL_CNF = 0x4001,
+ NN_NEW_REQ = 0x4004,
+ NN_NEW_CNF = 0x4005,
+ NN_NEW_IND = 0x4006,
+ NN_ADD_ALLOC_REQ = 0x4008,
+ NN_ADD_ALLOC_CNF = 0x4009,
+ NN_ADD_ALLOC_IND = 0x400A,
+ NN_REL_ALLOC_REQ = 0x400C,
+ NN_REL_ALLOC_CNF = 0x400D,
+ NN_REL_NET_IND = 0x4012,
+
+ CM_UNASSOCIATED_STA_IND = 0x6002,
+ CM_ENCRYPTED_PAYLOAD_IND = 0x6006,
+ CM_ENCRYPTED_PAYLOAD_RSP = 0x6007,
+ CM_SET_KEY_REQ = 0x6008,
+ CM_SET_KEY_CNF = 0x6009,
+ CM_GET_KEY_REQ = 0x600C,
+ CM_GET_KEY_CNF = 0x600D,
+ CM_SC_JOIN_REQ = 0x6010,
+ CM_SC_JOIN_CNF = 0x6011,
+ CM_CHAN_EST_IND = 0x6016,
+ CM_TM_UPDATE_IND = 0x601A,
+ CM_AMP_MAP_REQ = 0x601C,
+ CM_AMP_MAP_CNF = 0x601D,
+ CM_BRG_INFO_REQ = 0x6020,
+ CM_BRG_INFO_CNF = 0x6021,
+ CM_CONN_NEW_REQ = 0x6024,
+ CM_CONN_NEW_CNF = 0x6025,
+ CM_CONN_REL_IND = 0x602A,
+ CM_CONN_REL_RSP = 0x602B,
+ CM_CONN_MOD_REQ = 0x602C,
+ CM_CONN_MOD_CNF = 0x602D,
+ CM_CONN_INFO_REQ = 0x6030,
+ CM_CONN_INFO_CNF = 0x6031,
+ CM_STA_CAP_REQ = 0x6034,
+ CM_STA_CAP_CNF = 0x6035,
+ CM_NW_INFO_REQ = 0x6038,
+ CM_NW_INFO_CNF = 0x6039,
+ CM_GET_BEACON_REQ = 0x603C,
+ CM_GET_BEACON_CNF = 0x603D,
+ CM_HFID_REQ = 0x6040,
+ CM_HFID_CNF = 0x6041,
+ CM_MME_ERROR_IND = 0x6046,
+ CM_NW_STATS_REQ = 0x6048,
+ CM_NW_STATS_CNF = 0x6049,
+ CM_LINK_STATS_REQ = 0x604C,
+ CM_LINK_STATS_CNF = 0x604D,
+
+ DRV_STA_SET_MAC_ADDR_REQ = DRV_STA_SET_MAC_ADDR + REQ,
+ DRV_STA_SET_MAC_ADDR_CNF = DRV_STA_SET_MAC_ADDR + CNF,
+ DRV_STA_SET_CCO_PREF_REQ = DRV_STA_SET_CCO_PREF + REQ,
+ DRV_STA_SET_CCO_PREF_CNF = DRV_STA_SET_CCO_PREF + CNF,
+ DRV_STA_SET_WAS_CCO_REQ = DRV_STA_SET_WAS_CCO + REQ,
+ DRV_STA_SET_WAS_CCO_CNF = DRV_STA_SET_WAS_CCO + CNF,
+ DRV_STA_SET_WAS_CCO_IND = DRV_STA_SET_WAS_CCO + IND,
+ DRV_STA_SET_WAS_CCO_RSP = DRV_STA_SET_WAS_CCO + RSP,
+ DRV_STA_SET_NPW_REQ = DRV_STA_SET_NPW + REQ,
+ DRV_STA_SET_NPW_CNF = DRV_STA_SET_NPW + CNF,
+ DRV_STA_SET_DPW_REQ = DRV_STA_SET_DPW + REQ,
+ DRV_STA_SET_DPW_CNF = DRV_STA_SET_DPW + CNF,
+ DRV_STA_SET_SL_REQ = DRV_STA_SET_SL + REQ,
+ DRV_STA_SET_SL_CNF = DRV_STA_SET_SL + CNF,
+ DRV_STA_SET_M_STA_HFID_REQ = DRV_STA_SET_M_STA_HFID + REQ,
+ DRV_STA_SET_M_STA_HFID_CNF = DRV_STA_SET_M_STA_HFID + CNF,
+ DRV_STA_SET_U_STA_HFID_REQ = DRV_STA_SET_U_STA_HFID + REQ,
+ DRV_STA_SET_U_STA_HFID_CNF = DRV_STA_SET_U_STA_HFID + CNF,
+ DRV_STA_SET_AVLN_HFID_REQ = DRV_STA_SET_AVLN_HFID + REQ,
+ DRV_STA_SET_AVLN_HFID_CNF = DRV_STA_SET_AVLN_HFID + CNF,
+ DRV_STA_SET_TONEMASK_REQ = DRV_STA_SET_TONEMASK + REQ,
+ DRV_STA_SET_TONEMASK_CNF = DRV_STA_SET_TONEMASK + CNF,
+ DRV_STA_START_REQ = DRV_STA_START + REQ,
+ DRV_STA_START_CNF = DRV_STA_START + CNF,
+ DRV_STA_STOP_REQ = DRV_STA_STOP + REQ,
+ DRV_STA_STOP_CNF = DRV_STA_STOP + CNF,
+
+ TEST_MSG_NUM,
+ MSG_UNKNOW = 0xFFFF
+} __attribute__ ((packed)) mm_type_t;
+
+/*
+ * types of messages
+ */
+typedef struct msg_fmi_t // Table 11-178
+{
+ u8 nf_mi :4; // Number of fragments for message
+ u8 fn_mi :4; // fragment number
+ u8 fmsn; // fragmentation message sequence number
+} msg_fmi_t;
+
+typedef struct msg_mme_t // Table 11-178
+{
+ mac_address_t oda; // original destination adress
+ mac_address_t osa; // original source adress
+ u16 m_type; // const = 0x88E1
+ u8 mmv; // management message version
+ mm_type_t mm_type; // management message type
+ msg_fmi_t fmi;
+ u8 mm_entry[ETH_PACKET_MAX_SIZE - MSG_MME_HEADER_SIZE];
+} __attribute__ ((packed)) msg_mme_t;
+
+// the same, with vlan tag
+typedef struct msg_mme_b_t // Table 11-178
+{
+ mac_address_t oda; // original destination adress
+ mac_address_t osa; // original source adress
+ u32 v_lan_tag; // ieee 802.1 tag (optional)
+ u16 m_type; // const = 0x88E1
+ u8 mmv; // management message version
+ mm_type_t mm_type; // management message type
+ msg_fmi_t fmi;
+ u8 mm_entry[ETH_PACKET_MAX_SIZE - MSG_MME_HEADER_SIZE - 4];
+} __attribute__ ((packed)) msg_mme_b_t;
+
+/*
+ * MME header
+ *
+ * here, it is not the MME header format on phy but internal software format
+ * avoiding memory-alignment questions, thus more easy & suitable
+ * to manage MME header info
+ */
+struct mme_header_type {
+ bool vlan_tag_flag;
+ union {
+ u8 b[8];
+ unsigned long long u64;
+ } un_osa;
+ union {
+ u8 b[8];
+ unsigned long long u64;
+ } un_oda;
+ union {
+ u8 b[4];
+ unsigned long u32;
+ } un_vlan_tag;
+ union {
+ u8 b[4];
+ unsigned long u32;
+ } un_mtype;
+ union {
+ u8 b[4];
+ unsigned long u32;
+ } un_mmv;
+ union {
+ u8 b[4];
+ unsigned long u32;
+ } un_mmtype;
+ union {
+ u8 b[4];
+ unsigned long u32;
+ } un_fmi;
+};
+typedef struct mme_header_type mme_header_type;
+
+typedef struct msg_list_mme_t
+{
+ mm_type_t mm_type; // HP_AV Message type identifier
+ //void (*msg_func) (const msg_mme_t *msg); // Function processing the message
+ int msg_num; // FSM transition identifier (see FSM data & constants generated by VisualState from FSM model designed with VisualState)
+} msg_list_mme_t;
+
+typedef enum encryption_type_t
+{
+ NOT_ENCRYPTED,
+ HARDWARE_ENCRYPTED,
+ SOFTWARE_ENCRYPTED
+} encryption_type_t;
+
+
+typedef struct msg_param_t
+{
+ bool mnbf; // multi-network broadcast flag
+ encryption_type_t encryption;
+ peks_t peks; // if the message is soft encrypted, set the peks
+} msg_param_t;
+
+/**
+ * \brief Get DRV-MME .REQ message name
+ *
+ * \param cnf the REQ message type identifier
+ * \return the .REQ message name string constant
+ */
+char *
+get_str_drv_mme_req(int req);
+
+/**
+ * \brief Get DRV-MME .CNF message name
+ *
+ * \param cnf the CNF message type identifier
+ * \return the .CNF message name string constant
+ */
+char *
+get_str_drv_mme_cnf(int cnf);
+
+#endif /*MSG_CONST_H_*/
diff --git a/cesar/cp/msg/inc/msg_drv.h b/cesar/cp/msg/inc/msg_drv.h
new file mode 100644
index 0000000000..ae11683c00
--- /dev/null
+++ b/cesar/cp/msg/inc/msg_drv.h
@@ -0,0 +1,276 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/msg/inc/msg_drv.h
+ * \brief DRV-MME messages
+ * \ingroup cp_msg
+ */
+
+#ifndef msg_drv__h__
+#define msg_drv__h__
+
+/* MME message context */
+typedef struct {
+ void *user; // user context
+ mfs_rx_t *mfs; // the mfs from the one the MF comes if it comes from the PWL.
+ u8 *buffer; // buffer containing the MME message
+ uint length; // length of MME message
+ //cl_mme_recv_t *mme_recv; //
+ void *cl_mme_data; // data use by the CL
+} msg_ctx_t;
+
+/* enum constants for MME DRV ".CNF" message payload fields */
+typedef enum {
+ E_DRVMME_RESULT_FAILURE = 0,
+ E_DRVMME_RESULT_SUCCESS = 1
+} e_drv_mme_cnf_result;
+
+typedef enum {
+ E_DRVMME_ERRCODE_BAD_PARAMETER = 0,
+ E_DRVMME_ERRCODE_UNKNOWN_ID = 1,
+ E_DRVMME_ERRCODE_INVALID_VALUE = 2
+} e_drv_mme_cnf_errcode;
+
+/* constants for DRV-MME fields (DRV_STA_SET_TONEMASK.REQ) */
+#define TONEMASK_MAXCOUNT 1536
+#define TONEMASK_MAXSIZE (TONEMASK_MAXCOUNT / 8)
+
+/* MME DRV ".REQ" payloads */
+struct mme_drv_sta_set_mac_addr_payload_type {
+ u8 mac_addr[MAC_ADDR_SIZE];
+};
+typedef struct mme_drv_sta_set_mac_addr_payload_type mme_drv_sta_set_mac_addr_payload_type;
+
+struct mme_drv_sta_set_cco_pref_payload_type {
+ u8 cco_pref;
+};
+typedef struct mme_drv_sta_set_cco_pref_payload_type mme_drv_sta_set_cco_pref_payload_type;
+
+struct mme_drv_sta_set_was_cco_payload_type {
+ u8 was_cco;
+};
+typedef struct mme_drv_sta_set_was_cco_payload_type mme_drv_sta_set_was_cco_payload_type;
+
+struct mme_drv_sta_set_npw_payload_type {
+ char npw[MAX_PWD_SIZE];
+};
+typedef struct mme_drv_sta_set_npw_payload_type mme_drv_sta_set_npw_payload_type;
+
+struct mme_drv_sta_set_dpw_payload_type {
+ char dpw[MAX_PWD_SIZE];
+};
+typedef struct mme_drv_sta_set_dpw_payload_type mme_drv_sta_set_dpw_payload_type;
+
+struct mme_drv_sta_set_sl_payload_type {
+ u8 sl;
+};
+typedef struct mme_drv_sta_set_sl_payload_type mme_drv_sta_set_sl_payload_type;
+
+struct mme_drv_sta_set_m_sta_hfid_payload_type {
+ char m_sta_hfid[MAX_HFID_SIZE];
+};
+typedef struct mme_drv_sta_set_m_sta_hfid_payload_type mme_drv_sta_set_m_sta_hfid_payload_type;
+
+struct mme_drv_sta_set_u_sta_hfid_payload_type {
+ char u_sta_hfid[MAX_HFID_SIZE];
+};
+typedef struct mme_drv_sta_set_u_sta_hfid_payload_type mme_drv_sta_set_u_sta_hfid_payload_type;
+
+struct mme_drv_sta_set_avln_hfid_payload_type {
+ char u_sta_hfid[MAX_HFID_SIZE];
+};
+typedef struct mme_drv_sta_set_avln_hfid_payload_type mme_drv_sta_set_avln_hfid_payload_type;
+
+struct mme_drv_sta_set_tonemask_payload_type {
+ u8 sta_tonemask[TONEMASK_MAXSIZE];
+};
+typedef struct mme_drv_sta_set_tonemask_payload_type mme_drv_sta_set_tonemask_payload_type;
+
+
+/* MME DRV ".REQ" messages */
+struct mme_drv_sta_set_mac_addr_req_type {
+ mme_header_type header;
+ u8 mac_addr[MAC_ADDR_SIZE];
+};
+typedef struct mme_drv_sta_set_mac_addr_req_type mme_drv_sta_set_mac_addr_req_type;
+
+struct mme_drv_sta_set_cco_pref_req_type {
+ mme_header_type header;
+ u8 cco_pref;
+};
+typedef struct mme_drv_sta_set_cco_pref_req_type mme_drv_sta_set_cco_pref_req_type;
+
+struct mme_drv_sta_set_was_cco_req_type {
+ mme_header_type header;
+ u8 was_cco;
+};
+typedef struct mme_drv_sta_set_was_cco_req_type mme_drv_sta_set_was_cco_req_type;
+
+struct mme_drv_sta_set_npw_req_type {
+ mme_header_type header;
+ char npw[MAX_PWD_SIZE];
+};
+typedef struct mme_drv_sta_set_npw_req_type mme_drv_sta_set_npw_req_type;
+
+struct mme_drv_sta_set_dpw_req_type {
+ mme_header_type header;
+ char dpw[MAX_PWD_SIZE];
+};
+typedef struct mme_drv_sta_set_dpw_req_type mme_drv_sta_set_dpw_req_type;
+
+struct mme_drv_sta_set_sl_req_type {
+ mme_header_type header;
+ u8 sl;
+};
+typedef struct mme_drv_sta_set_sl_req_type mme_drv_sta_set_sl_req_type;
+
+struct mme_drv_sta_set_m_sta_hfid_req_type {
+ mme_header_type header;
+ char m_sta_hfid[MAX_HFID_SIZE];
+};
+typedef struct mme_drv_sta_set_m_sta_hfid_req_type mme_drv_sta_set_m_sta_hfid_req_type;
+
+struct mme_drv_sta_set_u_sta_hfid_req_type {
+ mme_header_type header;
+ char u_sta_hfid[MAX_HFID_SIZE];
+};
+typedef struct mme_drv_sta_set_u_sta_hfid_req_type mme_drv_sta_set_u_sta_hfid_req_type;
+
+struct mme_drv_sta_set_avln_hfid_req_type {
+ mme_header_type header;
+ char u_sta_hfid[MAX_HFID_SIZE];
+};
+typedef struct mme_drv_sta_set_avln_hfid_req_type mme_drv_sta_set_avln_hfid_req_type;
+
+struct mme_drv_sta_set_tonemask_req_type {
+ mme_header_type header;
+ u8 sta_tonemask[TONEMASK_MAXSIZE];
+};
+typedef struct mme_drv_sta_set_tonemask_req_type mme_drv_sta_set_tonemask_req_type;
+
+struct mme_drv_sta_start_mac_req_type {
+ mme_header_type header;
+ /* (no specific payload data) */
+};
+typedef struct mme_drv_sta_start_mac_req_type mme_drv_sta_start_mac_req_type;
+
+struct mme_drv_sta_stop_mac_req_type {
+ mme_header_type header;
+ /* (no specific payload data) */
+};
+typedef struct mme_drv_sta_stop_mac_req_type mme_drv_sta_stop_mac_req_type;
+
+
+/* MME DRV ".CNF" message */
+struct mme_drv_cnf_type {
+ mme_header_type header;
+ u8 result;
+ u8 errcode;
+};
+typedef struct mme_drv_cnf_type mme_drv_cnf_type;
+
+
+/**
+ * \brief Get DRV-MME .CNF message result string
+ *
+ * \param cnf_result the result code
+ * \return the result code string constant
+ */
+char *
+get_str_drv_mme_cnf_result(int cnf_result);
+
+/**
+ * \brief Get DRV-MME .CNF message error code string
+ *
+ * \param cnf_errcode the error code
+ * \return the error code string constant
+ */
+char *
+get_str_drv_mme_cnf_errcode(int cnf_errcode);
+
+/**
+ * \brief Get yes/no string.
+ *
+ * \param no_yes the index of yes/no string array
+ * \return the yes or no string constant
+ */
+char *
+get_str_yes_no(int no_yes);
+
+/**
+ * \brief Verify a password or HFID string validity.
+ *
+ * \param str the HFID string to be verified
+ * \param minlen the minimal length
+ * \param maxlen the maximal length
+ * \return true or false depending on validity ok or not
+ */
+bool
+check_password_or_hfid_is_valid(char *str, int minlen,int maxlen);
+
+/**
+ * \brief little endian to CPU host endian conversion.
+ *
+ * \param addrval pointer to the value to be (re)formatted from little endian to CPU host endian
+ * \param bytesizeval the size in bytes of the value
+ */
+void
+little_to_cpuhost_endian(u8 *addrval, int bytesizeval);
+
+/**
+ * \brief big endian to CPU host endian conversion.
+ *
+ * \param addrval pointer to the value to be (re)formatted from big endian to CPU host endian
+ * \param bytesizeval the size in bytes of the value
+ */
+void
+big_to_cpuhost_endian(u8 *addrval, int bytesizeval);
+
+/**
+ * \brief CPU host endian to little endian conversion.
+ *
+ * \param addrval pointer to the value to be (re)formatted from CPU host endian to little endian
+ * \param bytesizeval the size in bytes of the value
+ */
+void
+cpuhost_to_little_endian(u8 *addrval, int bytesizeval);
+
+/**
+ * \brief CPU host endian to big endian conversion.
+ *
+ * \param addrval pointer to the value to be (re)formatted from CPU host endian to big endian
+ * \param bytesizeval the size in bytes of the value
+ */
+void
+cpuhost_to_big_endian(u8 *addrval, int bytesizeval);
+
+u16
+big_to_cpuhost_endian_u16(u16 val);
+u32
+big_to_cpuhost_endian_u32(u32 val);
+u16
+cpuhost_to_big_endian_u16(u16 val);
+u32
+cpuhost_to_big_endian_u32(u32 val);
+
+void display_mme_header(mme_header_type *mme_header);
+
+/**
+ * \brief Build a "MME.CNF" confirmation message.
+ *
+ * \param recv_mme_header the buffer to contain the MME.CNF message being built
+ * \param send_mme the buffer containing the MME initially received for which we're building a CNF
+ * \param cnf_result the result code of the MME.CNF message to be built
+ * \param cnf_errcode the error code of the MME.CNF message to be built
+ * \param cnf_len the returned length of the MME.CNF message being built
+ *
+ */
+void
+cp_mme_build_cnf (mme_header_type *recv_mme_header, mme_drv_cnf_type *send_mme, e_drv_mme_cnf_result cnf_result, e_drv_mme_cnf_errcode cnf_errcode, uint *cnf_len, u8 *mme_tx_buffer, int *mme_buffer_first);
+
+#endif
diff --git a/cesar/cp/msg/inc/msg_field.h b/cesar/cp/msg/inc/msg_field.h
new file mode 100644
index 0000000000..d970de1b3c
--- /dev/null
+++ b/cesar/cp/msg/inc/msg_field.h
@@ -0,0 +1,410 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file msg_cm_conn_field.h
+ * \brief File Description
+ * \ingroup cp/msg
+ *
+ */
+
+
+#ifndef MSG_CM_CONN_FIELD_H_
+#define MSG_CM_CONN_FIELD_H_
+
+#include "cp/msg/inc/msg_const.h"
+
+/////////////////// ENUM ///////////////////////////
+
+// QMP Forward/Reverse definition (section 7.8.1 table 7-146)
+typedef enum
+{
+ QMP_FORWARD = 0x00, // forward (from source to receiver)
+ QMP_REVERSE = 0X01 // reverse (from receiver to source)
+} qmp_forward_or_reverse_t;
+
+// VALID CINFO definition (section 7.8.1 table 7-145)
+typedef enum
+{
+ CINFO_NOT_VALID = 0x00,
+ CINFO_VALID = 0x01
+} cinfo_valid_t;
+
+// MAC Service Type definition (section 7.8.1 table 7-145)
+typedef enum
+{
+ MAC_CONTENTION_FREE = 0x00, // Contention-free service
+ MAC_CONTENTION = 0x01, // Contention-based service
+ MAC_CONTENTION_FREE_PREFERRED = 0x02 // Contention-free service preferred
+} mac_service_type_t;
+
+// User Priority definition (section 7.8.1 table 7-145)
+typedef enum
+{
+ USER_PRIORITY_CAP0 = 0x00,
+ USER_PRIORITY_CAP1 = 0x01,
+ USER_PRIORITY_CAP2 = 0x02,
+ USER_PRIORITY_CAP3 = 0x03
+} user_priority_t;
+
+// Arrival Time Stamp definition (section 7.8.1 table 7-145)
+typedef enum
+{
+ ATS_NOT_FOR_HLE = 0x00,
+ ATS_FOR_HLE = 0x01
+} ats_t;
+
+/////////////////// DEFINTION ///////////////////////////
+
+typedef u32 len_t;
+
+// QMP Length definition (section 7.8.1 table 7-146)
+typedef u8 qmp_len_t;
+
+// CSPEC_LEN definition (section 7.8.1 table 7-144)
+typedef u16 cspec_len_t; // Length of CSPEC, including the 2 octets CSPEC_LEN field
+
+// CID definition (section 5.2.1.4.2)
+typedef u16 cid_t;
+
+// LID definition (section 5.2.1.4.2)
+typedef u8 lid_t;
+
+// LLID definition (section 5.2.1.4.2)
+typedef u8 llid_t;
+
+// LLID_F definition (section 5.2.1.4.2)
+typedef u8 llid_f_t;
+
+// LLID_R definition (section 5.2.1.4.2)
+typedef u8 llid_r_t;
+
+// TEI (Terminal Equipment Identifier) definition (section 7.3.2.1)
+//typedef u8 tei_t;
+
+// QMP Body
+#define MAX_SIZE_QMP_BODY 37
+typedef u8 qmp_body_t[MAX_SIZE_QMP_BODY];
+
+
+typedef struct
+{
+ bool available;
+ u32 value;
+}qmp_delay_bound_t;
+
+typedef struct
+{
+ bool delay_bound_available :1;
+ bool jitter_bound_available:1;
+ bool average_msdu_size_available:1;
+ bool maximum_msdu_size_available:1;
+ bool average_data_rate_available:1;
+ bool minimum_data_rate_available:1;
+ bool maximum_data_rate_available:1;
+ bool maximum_inter_txop_time_available:1;
+ bool minimum_inter_txop_time_available:1;
+ bool maximum_burst_size_available:1;
+ bool exception_policy_available:1;
+ bool inactivity_interval_available:1;
+ bool msdu_error_rate_available:1;
+ bool clst_available:1;
+ bool cdesc_available:1;
+ bool vendor_specific_available:1;
+ bool ats_tolerance_available:1;
+ bool smallest_tolerable_data_rate_available:1;
+ bool original_average_data_rate_available:1;
+ bool rx_window_size_available:1;
+ bool smoothing_buffer_size_available:1;
+ bool bidirectional_burst_available:1;
+ bool txops_per_beacon_period_available:1;
+ bool average_number_of_pbs_per_txop_available:1;
+ bool minimum_number_of_pbs_per_txop_available:1;
+ bool maximum_number_of_pbs_per_txop_available:1;
+ bool ppb_threshold_available:1;
+ bool surplus_bandwith_available:1;
+ bool cco_vendor_specific_available:1;
+ bool smallest_tolerable_average_number_of_pbs_per_txop_available:1;
+ bool original_average_number_of_pbs_per_txop_available:1;
+ bool cco_bidirectional_burst_available:1;
+}qmp_valid_field_t;
+
+
+typedef enum
+{
+ EXCEPTION_TERMINATE_CONNEXION = 0x00,
+ EXCEPTION_RECONFIGURE_CONNEXION = 0x01
+}qmp_exception_policy_t;
+
+typedef enum
+{
+ IP_VERSION_4 = 0x00,
+ IP_VERSION_6 = 0x01
+}ip_version_t;
+
+typedef struct
+{
+ ip_version_t ip_version:8;
+ union
+ {
+ u8 ipv4_source_address[4];
+ u8 ipv6_source_address[16];
+ };
+ u16 source_port;
+ union
+ {
+ u8 ipv4_destination_address[4];
+ u8 ipv6_destination_address[16];
+ };
+ u16 destination_port;
+ u8 protocol_type;
+}cdesc_t;
+/*
+// QMP (QoS and MAC Parameter) definition (section 7.8.1 table 7-146)
+typedef struct
+{
+ qmp_forward_or_reverse_t forward_or_reverse:8;
+ union
+ {
+ qmp_valid_field_t valid;
+ u32 valid_in_block;
+ };
+ struct
+ {
+ u32 delay_bound;
+ u32 jitter_bound;
+ u16 average_msdu_size;
+ u16 maximum_msdu_size;
+ u16 average_data_rate;
+ u16 minimum_data_rate;
+ u16 maximum_data_rate;
+ u16 maximum_inter_txop_time;
+ u16 minimum_inter_txop_time;
+ u16 maximum_burst_size;
+ qmp_exception_policy_t exception_policy;
+ u32 inactivity_interval;
+ u16 msdu_error_rate;
+ u8 clst;
+ cdesc_t cdesc;
+ u16 ats_tolerance;
+ u16 smallest_tolerable_data_rate;
+ u16 original_average_data_rate;
+ u16 rx_window_size;
+ u32 smoothing_buffer_size; //warning on 24 bits
+ u8 bidirectional_burst;
+ }cm;
+
+ struct
+ {
+ u8 txops_per_beacon_period;
+ u16 average_number_of_pbs_per_txop;
+ u16 minimum_number_of_pbs_per_txop;
+ u16 maximum_number_of_pbs_per_txop;
+ u16 ppb_threshold;
+ u16 surplus_bandwith;
+ u16 smallest_tolerable_average_number_of_pbs_per_txop;
+ u16 original_average_number_of_pbs_per_txop;
+ u8 cco_bidirectional_burst;
+ }cco;
+
+} qmp_t;
+
+
+
+
+// Smoothing definition (section 7.8.1 table 7-145)
+typedef enum
+{
+ SMOOTHING_NOT_REQUESTED = 0x00,
+ SMOOTHING_REQUESTED = 0x01
+}smoothing_t;
+
+
+// CINFO definition (section 7.8.1 table 7-145)
+typedef struct
+{
+ cinfo_valid_t valid:8;
+ mac_service_type_t mac_service_type:8;
+ user_priority_t user_priority:8; // Channel access priority of the Connection
+ ats_t ats:8;
+ smoothing_t smoothing:8;
+} cinfo_t;
+
+// CSPEC definition (section 7.8.1 table 7-144)
+typedef struct
+{
+ cspec_len_t len; // Length of CSPEC, including the 2 octets CSPEC_LEN field
+ cinfo_t cinfo_forward; // Forward Connection Information
+ cinfo_t cinfo_reverse; // Reverse Connection Information
+ qmp_t qmp_forward; // Forward QoS and MAC Parameters
+ qmp_t qmp_reverse; // Reverse QoS and MAC Parameters
+} cspec_t;
+
+// Conn Info definition (section 11.5.23 table 11-117)
+typedef struct
+{
+ cid_t cid; // Connection identifier of the Link
+ tei_t dtei; // TEI of the destination STA
+ tei_t stei; // TEI of the source STA
+ lid_t lid_f; // Link ID of the Forward Link
+ lid_t lid_r; // Link ID of the Reverse Link
+ cspec_t cspec; // Connection cspec
+} conn_info_t;
+
+*/
+///////////////////////////////////////////////////
+///////////// CLASSIFIER_RULE //////////////////
+///////////////////////////////////////////////////
+
+
+typedef u8 ethernet_destination_address_t[6];
+typedef u8 ethernet_source_address_t[6];
+typedef u8 vlan_user_priority_t;
+typedef u16 vlan_id_t;
+typedef u8 ipv4_type_of_service_t;
+typedef u8 ipv4_protocol_t;
+typedef u8 ipv4_source_address_t[4];
+typedef u8 ipv4_destination_address_t[4];
+typedef u8 ipv6_traffic_class_t;
+typedef u8 ipv6_flow_label_t[3];
+typedef u8 ipv6_source_address_t[16];
+typedef u8 ipv6_destination_address_t[16];
+typedef u16 tcp_source_port_t;
+typedef u16 tcp_destination_port_t;
+typedef u16 udp_source_port_t;
+typedef u16 udp_destination_port_t;
+
+typedef struct
+{
+ bool ethernet_destination_address_field_available :1;
+ bool ethernet_source_address_field_available : 1;
+ bool vlan_user_priority_field_available : 1;
+ bool vlan_id_field_available : 1;
+ bool ipv4_type_of_protocol_field_available :1;
+ bool ipv4_protocol_field_available : 1;
+ bool ipv4_source_address_field_available : 1;
+ bool ipv4_destination_address_field_available : 1;
+ bool ipv6_traffic_class_field_available : 1;
+ bool ipv6_flow_label_field_available : 1;
+ bool ipv6_source_address_field_available : 1;
+ bool ipv6_destination_address_field_available : 1;
+ bool tcp_source_port_field_available : 1;
+ bool tcp_destination_port_field_available : 1;
+ bool udp_source_port_field_available : 1;
+ bool udp_destination_port_field_available : 1;
+} classifier_rules_available_t;
+
+typedef struct
+{
+ union
+ {
+ classifier_rules_available_t classifier_rules_available;
+ u32 classifier_rules_available_block;
+ };
+ ethernet_destination_address_t ethernet_destination_address;
+ ethernet_source_address_t ethernet_source_address;
+ vlan_user_priority_t vlan_user_priority;
+ vlan_id_t vlan_id;
+ ipv4_type_of_service_t ipv4_type_of_service;
+ ipv4_protocol_t ipv4_protocol;
+ ipv4_source_address_t ipv4_source_address;
+ ipv4_destination_address_t ipv4_destination_address;
+ ipv6_traffic_class_t ipv6_traffic_class;
+ ipv6_flow_label_t ipv6_flow_label;
+ ipv6_source_address_t ipv6_source_address;
+ ipv6_destination_address_t ipv6_destination_address;
+ tcp_source_port_t tcp_source_port;
+ tcp_destination_port_t tcp_destination_port;
+ udp_source_port_t udp_source_port;
+ udp_destination_port_t udp_destination_port;
+} classifier_rules_data_t;
+
+// Classifier Rule Set Version definition (section 6.3 table 6-138)
+typedef enum
+{
+ CLASSIFIER_CURRENT_VERSION = 0x00 // Current Version
+ // 0X01 to 0x0FF reserved for future use
+} classifier_version_t;
+
+// Classifier Rule definition (section 6.3 table 6-138)
+typedef struct
+{
+ classifier_version_t classifier_version:8;
+ u8 nbr_rules;
+ classifier_rules_data_t data;
+} classifier_rules_t;
+
+typedef u8 id_t;
+
+// Reason Code definition (section 11.5.18) needed by cm_conn_rel_ind
+typedef enum
+{
+ NORMAL_RELEASE = 0x00,
+ VIOLATED_CSPEC = 0x01
+} reason_code_t;
+
+// New Connection Result definition (section 11.5.17 table 11-280)
+typedef enum
+{
+ CONN_SUCCESS = 0x00,
+ CONN_FAILURE_CLASSIFIER_RULE_NOT_SUPPORTED = 0x01,
+ CONN_FAILURE_CLASSIFIER_RESSOURCE_NOT_AVAILABLE = 0x02,
+ CONN_FAILURE_MAXIMUM_CONNECTION_REACHED = 0x03,
+ CONN_FAILURE_OTHER = 0X04
+} conn_new_result_t;
+
+// Mod Connection Result definition (section 11.5.21 table 11-284)
+typedef enum
+{
+ CONN_MOD_SUCCESS = 0x00,
+ CONN_MOD_FAILED = 0X01
+} conn_mod_result_t;
+
+// Add Connection Result definition (section 12.2.2.2)
+typedef enum
+{
+ CONN_ADD_SUCCESS = 0x00,
+ CONN_ADD_FAILED = 0x01
+} conn_add_result_t;
+
+// Info Connection - Request Type (section 11.5.22 table 11-285)
+typedef enum
+{
+ CONN_INFO_ALL_ACTIVE_CONNECTIONS = 0x00,
+ CONN_INFO_SPECIFIC_CID = 0x01,
+ CONN_INFO_GLOBAL_LINK = 0x02
+} conn_info_req_type_t;
+
+
+
+
+///////////////////////////////////////////////////////////////////////////
+//////////////////// FUNCTION DECLARATION /////////////////////////////////
+///////////////////////////////////////////////////////////////////////////
+
+/*
+void msg_field_cinfo_init (cinfo_t*);
+void msg_field_qmp_init (qmp_t*);
+void msg_field_cid_init (cid_t*);
+void msg_field_classifier_init(classifier_rules_t*);
+void msg_field_cspec_init (cspec_t*);
+
+
+len_t msg_field_cid_get_from_stream (u8* stream, cid_t* cid);
+len_t msg_field_cinfo_get_from_stream (u8* stream, cinfo_t* cinfo);
+len_t msg_field_qmp_get_from_stream (u8* stream,u8* stream_end, qmp_t* qmp, qmp_forward_or_reverse_t qmp_type);
+len_t msg_field_classifier_get_from_stream (u8* stream, classifier_rules_t* claissifier_rules);
+len_t msg_field_cspec_get_from_stream (u8* stream, cspec_t* cspec);
+
+len_t msg_field_cid_set_on_stream (u8* stream, cid_t* cid);
+len_t msg_field_classifier_set_on_stream (u8* stream, classifier_rules_t* classifier_rules);
+len_t msg_field_qmp_set_on_stream (u8* stream, qmp_t* qmp);
+len_t msg_field_cinfo_set_on_stream (u8* stream, cinfo_t* cinfo);
+len_t msg_field_cspec_set_on_stream (u8* stream, cspec_t* cspec);
+
+*/
+
+#endif /*MSG_CM_CONN_FIELD_H_*/
diff --git a/cesar/cp/msg/msg.h b/cesar/cp/msg/msg.h
new file mode 100644
index 0000000000..448ab2f92e
--- /dev/null
+++ b/cesar/cp/msg/msg.h
@@ -0,0 +1,105 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/msg/msg.h
+ * \brief MME message processing
+ * \ingroup cp_msg
+ */
+
+#ifndef msg__h__
+#define msg__h__
+
+#include "cp/interf/inc/interf_types.h"
+#include "cp/msg/inc/msg_const.h"
+#include "cp/msg/inc/msg_cc.h"
+#include "cp/msg/inc/msg_cm.h"
+#include "cp/msg/inc/msg_drv.h"
+#include "cp/cp_types.h"
+#include "cp/interf/interf.h"
+
+/*
+ * Global variables
+ */
+extern const msg_list_mme_t msg_list[];
+
+
+void
+msg_test_rcv(const msg_mme_t *msg);
+
+/**
+ * \brief init the msg module
+ */
+void msg_init(void);
+
+/**
+ * \brief return the fmsn (Fragmentation Message Sequence Number) to be used
+ * \param new : set to true if this is a new sequence
+ * \return the fmsn
+ */
+u8
+msg_get_fmsn(const bool new);
+
+
+/**
+ * \brief Give the message number in our local reference.
+ * \param Msg : pointer to the message
+ * \return the message number or UNKNOW_MSG
+ */
+u16
+msg_get_number (msg_mme_t *msg);
+
+/**
+ * \brief this function is called in STA or CCO thread when a message is
+ * present in the corresponding fifo.
+// * \param msg : pointer to the message
+ * \param msg_ctx : pointer to the message context
+ * \return
+ */
+//void
+//msg_dispatch (msg_mme_t *msg);
+void
+msg_dispatch (msg_ctx_t *msg_ctx);
+
+/**
+ * \brief set the const values of mme (ie mtype)
+ * \param Msg : pointer to the message
+ * \return
+ */
+void
+msg_set_mme_const_values (msg_mme_t *msg);
+
+/**
+ * \brief check the const values of mme (ie mtype)
+ * \param Msg : pointer to the message
+ * \return true if ok
+ */
+bool
+msg_check_wrong_mme_const_values (const msg_mme_t *msg);
+
+
+/**
+ * \brief common process to all message when sending a message
+ * \param oda : destination mac address
+ * \param msg_param : the message parameters (will be set to default values)
+ * \return pointer to the message
+ */
+msg_mme_t *
+msg_sending_common_part(msg_mme_t *msg, const mac_address_t oda, msg_param_t *msg_param);
+
+/**
+ * \brief add field common to all mme messages (OSA)
+ * and send it through the interface
+ * \param msg : pointer to the message
+ * \param msg_size : size of the message (including header)
+ * \return
+ */
+void
+msg_send(msg_mme_t *msg, u16 msg_size, msg_param_t msg_param);
+
+#endif
+
diff --git a/cesar/cp/msg/src/cm/conn/msg_cm_conn_info_cnf.c b/cesar/cp/msg/src/cm/conn/msg_cm_conn_info_cnf.c
new file mode 100644
index 0000000000..1ccb86bc67
--- /dev/null
+++ b/cesar/cp/msg/src/cm/conn/msg_cm_conn_info_cnf.c
@@ -0,0 +1,17 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file test_msg_cm_conn_rel_ind.c
+ * \brief This file provides management functions for message CM_CONN_INFO.CNF.
+ * \ingroup cp/msg
+ *
+ */
+
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm.h"
+
diff --git a/cesar/cp/msg/src/cm/conn/msg_cm_conn_info_req.c b/cesar/cp/msg/src/cm/conn/msg_cm_conn_info_req.c
new file mode 100644
index 0000000000..be01371940
--- /dev/null
+++ b/cesar/cp/msg/src/cm/conn/msg_cm_conn_info_req.c
@@ -0,0 +1,17 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file test_msg_cm_conn_rel_ind.c
+ * \brief This file provides management functions for message CM_CONN_INFO.REQ.
+ * \ingroup cp/msg
+ *
+ */
+
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm.h"
+
diff --git a/cesar/cp/msg/src/cm/conn/msg_cm_conn_mod_cnf.c b/cesar/cp/msg/src/cm/conn/msg_cm_conn_mod_cnf.c
new file mode 100644
index 0000000000..267006eb47
--- /dev/null
+++ b/cesar/cp/msg/src/cm/conn/msg_cm_conn_mod_cnf.c
@@ -0,0 +1,95 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file msg_cm_conn_mod_cnf.c
+ * \brief This file provides management functions for message CM_CONN_MOD.CNF.
+ * \ingroup cp/msg
+ *
+ */
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm_conn.h"
+#include "cp/msg/inc/msg_field.h"
+
+
+
+/**
+ * Initialize the message CM_CONN_MOD_CNF
+ * \param msg Message to be initialized.
+ *
+ */
+void
+msg_cm_conn_mod_cnf_init(msg_cm_conn_mod_cnf_t* data)
+{
+ dbg_assert_ptr(data);
+
+ msg_field_cid_init(&(data->cid));
+ data->result = 0;
+ msg_field_cspec_init(&(data->proposed_cspec));
+
+ cp_dbg_msg_cm_conn_mod_cnf(*data);
+
+}
+
+
+
+/**
+ * Decode a CM_CONN_MOD_CNF message from a MME message.
+ * \param msg MME Message.
+ * \param data Structure where the data is saved.
+ *
+ */
+void
+msg_cm_conn_mod_cnf_set_on_mme_msg(msg_mme_t* msg, msg_cm_conn_mod_cnf_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+ len_t len;
+
+ dbg_assert_ptr(data);
+ cp_dbg_msg_cm_conn_mod_cnf(*data);
+ dbg_assert_ptr(msg);
+
+ len = msg_field_cid_set_on_stream( local_stream, &(data->cid));
+ local_stream += len;
+
+ *local_stream = data->result;
+ local_stream++;
+
+ if(data->result == CONN_MOD_FAILED)
+ msg_field_cspec_set_on_stream( local_stream, &(data->proposed_cspec));
+
+}
+
+
+/**
+ * Encode a CM_CONN_MOD_CNF message on a MME msg.
+ * \param msg MME message where the data is saved.
+ * \param data Data source.
+ *
+ */
+void
+msg_cm_conn_mod_cnf_get_from_mme_msg(msg_mme_t* msg, msg_cm_conn_mod_cnf_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+ len_t len;
+
+
+ dbg_assert_ptr(msg);
+ dbg_assert_ptr(data);
+
+ len = msg_field_cid_get_from_stream( local_stream, &(data->cid));
+ local_stream += len;
+
+ data->result = *local_stream;
+ local_stream ++;
+
+ if(data->result == CONN_MOD_FAILED)
+ msg_field_cspec_get_from_stream( local_stream, &(data->proposed_cspec));
+
+ cp_dbg_msg_cm_conn_mod_cnf(*data);
+}
+
diff --git a/cesar/cp/msg/src/cm/conn/msg_cm_conn_mod_req.c b/cesar/cp/msg/src/cm/conn/msg_cm_conn_mod_req.c
new file mode 100644
index 0000000000..b422464692
--- /dev/null
+++ b/cesar/cp/msg/src/cm/conn/msg_cm_conn_mod_req.c
@@ -0,0 +1,85 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file msg_cm_conn_mod_req.c
+ * \brief This file provides management functions for message CM_CONN_MOD.REQ.
+ * \ingroup cp/msg
+ *
+ */
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm_conn.h"
+#include "cp/msg/inc/msg_field.h"
+
+
+
+/**
+ * Initialize the message CM_CONN_MOD_REQ
+ * \param msg Message to be initialized.
+ *
+ */
+void
+msg_cm_conn_mod_req_init(msg_cm_conn_mod_req_t* data)
+{
+ dbg_assert_ptr(data);
+
+ msg_field_cid_init(&(data->cid));
+ msg_field_cspec_init(&(data->modified_cspec));
+
+ cp_dbg_msg_cm_conn_mod_req(*data);
+
+}
+
+
+
+/**
+ * Decode a CM_CONN_MOD_REQ message from a MME message.
+ * \param msg MME Message.
+ * \param data Structure where the data is saved.
+ *
+ */
+void
+msg_cm_conn_mod_req_set_on_mme_msg(msg_mme_t* msg, msg_cm_conn_mod_req_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+ len_t len;
+
+ dbg_assert_ptr(data);
+ cp_dbg_msg_cm_conn_mod_req(*data);
+ dbg_assert_ptr(msg);
+
+ len = msg_field_cid_set_on_stream( local_stream, &(data->cid));
+ local_stream += len;
+
+ msg_field_cspec_set_on_stream( local_stream, &(data->modified_cspec));
+
+}
+
+
+/**
+ * Encode a CM_CONN_MOD_REQ message on a MME msg.
+ * \param msg MME message where the data is saved.
+ * \param data Data source.
+ *
+ */
+void
+msg_cm_conn_mod_req_get_from_mme_msg(msg_mme_t* msg, msg_cm_conn_mod_req_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+ len_t len;
+
+ dbg_assert_ptr(msg);
+ dbg_assert_ptr(data);
+
+ len = msg_field_cid_get_from_stream( local_stream, &(data->cid));
+ local_stream += len;
+
+ msg_field_cspec_get_from_stream( local_stream, &(data->modified_cspec));
+
+ cp_dbg_msg_cm_conn_mod_req(*data);
+}
+
diff --git a/cesar/cp/msg/src/cm/conn/msg_cm_conn_new_cnf.c b/cesar/cp/msg/src/cm/conn/msg_cm_conn_new_cnf.c
new file mode 100644
index 0000000000..da2cc7b4a8
--- /dev/null
+++ b/cesar/cp/msg/src/cm/conn/msg_cm_conn_new_cnf.c
@@ -0,0 +1,110 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file msg_cm_conn_new_cnf.c
+ * \brief This file provides management functions for message CM_CONN_NEW.CNF.
+ * \ingroup cp/msg
+ *
+ */
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm_conn.h"
+#include "cp/msg/inc/msg_field.h"
+
+
+/**
+ * Initialize the message MSG_CM_CONN_NEW_CNF.
+ * \param msg Message to be initialized.
+ *
+ */
+void
+msg_cm_conn_new_cnf_init(msg_cm_conn_new_cnf_t* msg)
+{
+ dbg_assert_ptr(msg);
+
+ msg_field_cid_init(&(msg->cid));
+ msg->llid_r = 0;
+ msg->result = 0;
+ msg_field_cspec_init( &(msg->cspec_proposed));
+}
+
+
+
+/**
+ * Decode a CM_CONN_NEW_CNF message from a MME message.
+ * \param msg MME Message.
+ * \param data Structure where the data is saved.
+ *
+ */
+void
+msg_cm_conn_new_cnf_get_from_mme_msg(msg_mme_t* msg, msg_cm_conn_new_cnf_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+ len_t len;
+
+ dbg_assert_ptr(data);
+ dbg_assert_ptr(msg);
+
+ // get CID
+ len = msg_field_cid_get_from_stream(local_stream, &(data->cid));
+ local_stream += len;
+
+ // get LLID-R
+ data->llid_r = *local_stream;
+ local_stream ++;
+
+ // get Result
+ data->result = *local_stream;
+ local_stream ++;
+
+ if(data->result == CONN_FAILURE_OTHER)
+ {
+ // get CSPEC
+ msg_field_cspec_get_from_stream(local_stream, &(data->cspec_proposed));
+ }
+
+ cp_dbg_msg_cm_conn_new_cnf(*data);
+
+}
+
+
+/**
+ * Encode a CM_CONN_NEW_CNF message on a MME msg.
+ * \param msg MME message where the data is saved.
+ * \param data Data source.
+ *
+ */
+void
+msg_cm_conn_new_cnf_set_on_mme_msg(msg_mme_t* msg, msg_cm_conn_new_cnf_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+ len_t len;
+
+ dbg_assert_ptr(data);
+ cp_dbg_msg_cm_conn_new_cnf(*data);
+ dbg_assert_ptr(msg);
+
+
+ // set CID
+ len = msg_field_cid_set_on_stream(local_stream, &(data->cid));
+ local_stream += len;
+
+ // set LLID-R
+ *local_stream = data->llid_r ;
+ local_stream ++;
+
+ // set Result
+ *local_stream = data->result;
+ local_stream ++;
+
+ if (data->result == CONN_FAILURE_OTHER)
+ {
+ // set CSPEC
+ msg_field_cspec_set_on_stream(local_stream, &(data->cspec_proposed));
+ }
+
+}
diff --git a/cesar/cp/msg/src/cm/conn/msg_cm_conn_new_req.c b/cesar/cp/msg/src/cm/conn/msg_cm_conn_new_req.c
new file mode 100644
index 0000000000..abe38597ae
--- /dev/null
+++ b/cesar/cp/msg/src/cm/conn/msg_cm_conn_new_req.c
@@ -0,0 +1,91 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file msg_cm_conn_new_req.c
+ * \brief This file provides management functions for message CM_CONN_NEW.REQ.
+ * \ingroup cp/msg
+ *
+ */
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm_conn.h"
+
+
+/**
+ * Initialize the message CM_CONN_NEW_REQ
+ * \param msg Message to be initialized.
+ *
+ */
+void
+msg_cm_conn_new_req_init(msg_cm_conn_new_req_t* data)
+{
+ dbg_assert_ptr(data);
+
+ msg_field_cid_init( &(data->cid));
+ msg_field_classifier_init( &(data->classifier_rule));
+ msg_field_cspec_init( &(data->cspec));
+
+}
+
+/**
+ * Decode a CM_CONN_NEW_REQ message from a MME message.
+ * \param msg MME Message.
+ * \param data Structure where the data is saved.
+ *
+ */
+void
+msg_cm_conn_new_req_get_from_mme_msg(msg_mme_t* msg, msg_cm_conn_new_req_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+ len_t len;
+
+ dbg_assert_ptr(data);
+
+ dbg_assert_ptr(msg);
+
+ // get CID
+ len = msg_field_cid_get_from_stream(local_stream, &(data->cid));
+ local_stream += len;
+
+ // get CSPEC
+ len = msg_field_cspec_get_from_stream(local_stream, &(data->cspec));
+ local_stream += len;
+
+ // get classifier rules
+ msg_field_classifier_get_from_stream(local_stream, &(data->classifier_rule));
+
+ cp_dbg_msg_cm_conn_new_req( *data );
+}
+
+/**
+ * Encode a CM_CONN_NEW_REQ message on a MME msg.
+ * \param msg MME message where the data is saved.
+ * \param data Data source.
+ *
+ */
+void
+msg_cm_conn_new_req_set_on_mme_msg(msg_mme_t* msg, msg_cm_conn_new_req_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+ len_t len;
+
+ dbg_assert_ptr(data);
+ cp_dbg_msg_cm_conn_new_req( *data );
+ dbg_assert_ptr(msg);
+
+ // set CID
+ len = msg_field_cid_set_on_stream(local_stream, &(data->cid));
+ local_stream += len;
+
+ // set CSPEC
+ len = msg_field_cspec_set_on_stream(local_stream, &(data->cspec));
+ local_stream += len;
+
+ // set classifier rule
+ msg_field_classifier_set_on_stream( local_stream, &(data->classifier_rule));
+
+}
diff --git a/cesar/cp/msg/src/cm/conn/msg_cm_conn_rel_ind.c b/cesar/cp/msg/src/cm/conn/msg_cm_conn_rel_ind.c
new file mode 100644
index 0000000000..f06409c028
--- /dev/null
+++ b/cesar/cp/msg/src/cm/conn/msg_cm_conn_rel_ind.c
@@ -0,0 +1,92 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file msg_cm_conn_rel_ind.c
+ * \brief This file provides management functions for message CM_CONN_NEW.REQ.
+ * \ingroup cp/msg
+ *
+ */
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm_conn.h"
+
+
+/**
+ * Initialize the message CM_CONN_REL_IND
+ * \param msg Message to be initialized.
+ *
+ */
+void
+msg_cm_conn_rel_ind_init(msg_cm_conn_rel_ind_t* data)
+{
+ dbg_assert_ptr(data);
+
+ msg_field_cid_init(&(data->cid));
+ data->reason_code = 0;
+ msg_field_cspec_init( &(data->violated_cspec));
+}
+
+/**
+ * Decode a CM_CONN_REL_IND message from a MME message.
+ * \param msg MME Message.
+ * \param data Structure where the data is saved.
+ *
+ */
+void
+msg_cm_conn_rel_ind_get_from_mme_msg(msg_mme_t* msg, msg_cm_conn_rel_ind_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+ len_t len;
+
+ dbg_assert_ptr(data);
+ dbg_assert_ptr(msg);
+
+ // get CID
+ len = msg_field_cid_get_from_stream(local_stream, &(data->cid));
+ local_stream += len;
+
+ // get Reason Code
+ data->reason_code = *local_stream;
+ local_stream ++;
+
+ // get violated CSPEC
+ msg_field_cspec_get_from_stream(local_stream, &(data->violated_cspec));
+
+ cp_dbg_msg_cm_conn_rel_ind(*data);
+}
+
+
+/**
+ * Encode a CM_CONN_REL_IND message on a MME msg.
+ * \param msg MME message where the data is saved.
+ * \param data Data source.
+ *
+ */
+void
+msg_cm_conn_rel_ind_set_on_mme_msg(msg_mme_t* msg, msg_cm_conn_rel_ind_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+ len_t len;
+
+ dbg_assert_ptr(data);
+ cp_dbg_msg_cm_conn_rel_ind(*data);
+ dbg_assert_ptr(msg);
+
+ // set CID
+ len = msg_field_cid_set_on_stream(local_stream, &(data->cid));
+ local_stream += len;
+
+ // set Reason Code
+ *local_stream = data->reason_code;
+ local_stream ++;
+
+ // set violated CSPEC
+ msg_field_cspec_set_on_stream(local_stream, &(data->violated_cspec));
+
+}
+
+
diff --git a/cesar/cp/msg/src/cm/conn/msg_cm_conn_rel_rsp.c b/cesar/cp/msg/src/cm/conn/msg_cm_conn_rel_rsp.c
new file mode 100644
index 0000000000..e25f5017e8
--- /dev/null
+++ b/cesar/cp/msg/src/cm/conn/msg_cm_conn_rel_rsp.c
@@ -0,0 +1,76 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file msg_cm_conn_new_rsp.c
+ * \brief This file provides management functions for message CM_CONN_NEW.RSP.
+ * \ingroup cp/msg
+ *
+ */
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm_conn.h"
+#include "cp/msg/inc/msg_field.h"
+
+
+
+/**
+ * Initialize the message CM_CONN_REL_RSP
+ * \param msg Message to be initialized.
+ *
+ */
+void
+msg_cm_conn_rel_rsp_init(msg_cm_conn_rel_rsp_t* data)
+{
+ dbg_assert_ptr(data);
+
+ msg_field_cid_init(&(data->cid));
+
+ cp_dbg_msg_cm_conn_rel_rsp(*data);
+
+}
+
+
+
+/**
+ * Decode a CM_CONN_REL_RSP message from a MME message.
+ * \param msg MME Message.
+ * \param data Structure where the data is saved.
+ *
+ */
+void
+msg_cm_conn_rel_rsp_set_on_mme_msg(msg_mme_t* msg, msg_cm_conn_rel_rsp_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+
+ dbg_assert_ptr(data);
+ cp_dbg_msg_cm_conn_rel_rsp(*data);
+ dbg_assert_ptr(msg);
+
+ msg_field_cid_set_on_stream( local_stream, &(data->cid));
+
+}
+
+
+/**
+ * Encode a CM_CONN_REL_RSP message on a MME msg.
+ * \param msg MME message where the data is saved.
+ * \param data Data source.
+ *
+ */
+void
+msg_cm_conn_rel_rsp_get_from_mme_msg(msg_mme_t* msg, msg_cm_conn_rel_rsp_t* data)
+{
+ u8* local_stream = (u8*)msg->mm_entry;
+
+ dbg_assert_ptr(msg);
+ dbg_assert_ptr(data);
+
+ msg_field_cid_get_from_stream( local_stream, &(data->cid));
+
+ cp_dbg_msg_cm_conn_rel_rsp(*data);
+}
+
diff --git a/cesar/cp/msg/src/field/msg_field_cid.c b/cesar/cp/msg/src/field/msg_field_cid.c
new file mode 100644
index 0000000000..b893e1314c
--- /dev/null
+++ b/cesar/cp/msg/src/field/msg_field_cid.c
@@ -0,0 +1,70 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file conn_msg_cid.c
+ * \brief This file provides management functions for CID (Connection Identifier) field.
+ * \ingroup cp/msg
+ *
+ */
+
+#include "common/std.h"
+#include "lib/swap.h"
+#include "cp/msg/inc/msg_cm_conn.h"
+
+
+/**
+ * Initialize a CID (Connection Identifier) structure.
+ * \param cid Pointer of the data to be initialized
+ *
+ */
+void
+msg_field_cid_init(cid_t* cid)
+{
+ *cid = 1;
+}
+
+
+
+/**
+ * Read the CID (Connection Identifier) from the stream and put the CID value
+ * on the cid pointer. The function returns the CID length.
+ *
+ * \param stream Data source contening the cid value.
+ * \param cid Pointer of the data to be modified.
+ * \return length of the CID field.
+ *
+ */
+len_t
+msg_field_cid_get_from_stream (u8* stream, cid_t * cid)
+{
+
+ dbg_assert_ptr (stream);
+ dbg_assert_ptr (cid);
+
+
+ *cid = ntohs(*(u16*)stream);
+
+ dbg_assert (*cid != 0);
+
+ return 2;
+}
+
+
+/**
+* Write the CID value on the stream. The function returns the data length written.
+*
+* param stream Data destination of the CID value.
+* param cid Pointer of the data to be written.
+* return Length of the data.
+*
+*/
+len_t
+msg_field_cid_set_on_stream(u8 * stream, cid_t* cid)
+{
+ *(u16*)stream = htons(*cid);
+ return 2;
+}
diff --git a/cesar/cp/msg/src/field/msg_field_cinfo.c b/cesar/cp/msg/src/field/msg_field_cinfo.c
new file mode 100644
index 0000000000..4407feb04a
--- /dev/null
+++ b/cesar/cp/msg/src/field/msg_field_cinfo.c
@@ -0,0 +1,93 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file conn_msg_cinfo.c
+ * \brief This file provides management functions for CINFO (Connection Information) field.
+ * \ingroup cp/msg
+ *
+ */
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm_conn.h"
+
+
+/**
+ * Initialize a CINFO structure.
+ * \param cinfo
+ *
+ */
+void
+msg_field_cinfo_init (cinfo_t* cinfo)
+{
+
+ bzero(cinfo, 5);
+
+}
+
+
+/**
+ * Read a CINFO structure on a stream. The function returns the length of the structure.
+ * \param stream Data source contening the CINFO structure.
+ * \param cinfo Pointer of the data destination.
+ * \return Length of the CINFO structure.
+ *
+ */
+len_t
+msg_field_cinfo_get_from_stream(u8 * stream, cinfo_t* cinfo)
+{
+
+ u8 * local_stream = stream;
+ len_t len;
+
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(cinfo);
+
+ cinfo->valid = *local_stream; local_stream++;
+
+ if (cinfo->valid == CINFO_VALID)
+ {
+ bcopy( local_stream, (u8*)(cinfo)+1, 4);
+ len = 5;
+ }
+ else // cinfo->valid == CINFO_NOT_VALID
+ {
+ len = 1;
+ }
+
+ cp_dbg_cinfo(*cinfo);
+
+ return len;
+}
+
+
+
+/**
+ * Write a CINFO structure on a stream. The function returns the length of the structure.
+ * \param stream Destination of the CINFO data.
+ * \param cinfo Source.
+ * \return Length of the data written.
+ *
+ */
+len_t
+msg_field_cinfo_set_on_stream(u8 * stream, cinfo_t* cinfo)
+{
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(cinfo);
+ cp_dbg_cinfo(*cinfo);
+
+ if (cinfo->valid == CINFO_VALID)
+ {
+ bcopy((u8*)cinfo, stream, 5);
+ return 5;
+ }
+ else // cinfo->valid == CINFO_NOT_VALID
+ {
+ bcopy( (u8*)cinfo, stream, 1);
+ return 1;
+ }
+
+}
diff --git a/cesar/cp/msg/src/field/msg_field_classifier.c b/cesar/cp/msg/src/field/msg_field_classifier.c
new file mode 100644
index 0000000000..90ccc065da
--- /dev/null
+++ b/cesar/cp/msg/src/field/msg_field_classifier.c
@@ -0,0 +1,563 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file msg_field_classifier.c
+ * \brief This file provides management functions for classifier_rules field.
+ * \ingroup cp/msg
+ *
+ */
+
+#include "common/std.h"
+#include "lib/swap.h"
+#include "cp/msg/inc/msg_cm_conn.h"
+
+// Private functions declaration
+len_t msg_field_classifier_copy_rule_ethernet_destination_address_on_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_rule_ethernet_source_address_on_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_rule_vlan_user_priority_on_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_rule_vlan_id_on_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_ipv4_type_of_service_on_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_ipv4_protocol_on_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_ipv4_source_address_on_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_ipv4_destination_address_on_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_ipv6_traffic_class_on_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_ipv6_flow_label_on_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_ipv6_source_address_on_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_ipv6_destination_address_on_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_tcp_source_port_on_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_tcp_destination_port_on_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_udp_source_port_on_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_udp_destination_port_on_stream(u8* stream, classifier_rules_data_t* data);
+
+
+len_t msg_field_classifier_copy_rule_ethernet_destination_address_from_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_rule_ethernet_source_address_from_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_rule_vlan_user_priority_from_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_rule_vlan_id_from_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_ipv4_type_of_service_from_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_ipv4_protocol_from_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_ipv4_source_address_from_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_ipv4_destination_address_from_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_ipv6_traffic_class_from_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_ipv6_flow_label_from_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_ipv6_source_address_from_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_ipv6_destination_address_from_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_tcp_source_port_from_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_tcp_destination_port_from_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_udp_source_port_from_stream(u8* stream, classifier_rules_data_t* data);
+len_t msg_field_classifier_copy_udp_destination_port_from_stream(u8* stream, classifier_rules_data_t* data);
+
+
+
+
+
+//////////////////////////////////////////////////////////////
+// Private Type
+
+#define NBR_CLASSIFIER_FIELD 16
+#define FILTER_FIRST_BIT 0x01
+
+typedef len_t ( *copy_classifier_t)(u8* stream, classifier_rules_data_t* data);
+
+copy_classifier_t copy_classifier_from_stream_tb[] =
+{
+ msg_field_classifier_copy_rule_ethernet_destination_address_from_stream,
+ msg_field_classifier_copy_rule_ethernet_source_address_from_stream,
+ msg_field_classifier_copy_rule_vlan_user_priority_from_stream,
+ msg_field_classifier_copy_rule_vlan_id_from_stream,
+ msg_field_classifier_copy_ipv4_type_of_service_from_stream,
+ msg_field_classifier_copy_ipv4_protocol_from_stream,
+ msg_field_classifier_copy_ipv4_source_address_from_stream,
+ msg_field_classifier_copy_ipv4_destination_address_from_stream,
+ msg_field_classifier_copy_ipv6_traffic_class_from_stream,
+ msg_field_classifier_copy_ipv6_flow_label_from_stream,
+ msg_field_classifier_copy_ipv6_source_address_from_stream,
+ msg_field_classifier_copy_ipv6_destination_address_from_stream,
+ msg_field_classifier_copy_tcp_source_port_from_stream,
+ msg_field_classifier_copy_tcp_destination_port_from_stream,
+ msg_field_classifier_copy_udp_source_port_from_stream,
+ msg_field_classifier_copy_udp_destination_port_from_stream
+};
+
+copy_classifier_t copy_classifier_on_stream_tb[] =
+{
+ msg_field_classifier_copy_rule_ethernet_destination_address_on_stream,
+ msg_field_classifier_copy_rule_ethernet_source_address_on_stream,
+ msg_field_classifier_copy_rule_vlan_user_priority_on_stream,
+ msg_field_classifier_copy_rule_vlan_id_on_stream,
+ msg_field_classifier_copy_ipv4_type_of_service_on_stream,
+ msg_field_classifier_copy_ipv4_protocol_on_stream,
+ msg_field_classifier_copy_ipv4_source_address_on_stream,
+ msg_field_classifier_copy_ipv4_destination_address_on_stream,
+ msg_field_classifier_copy_ipv6_traffic_class_on_stream,
+ msg_field_classifier_copy_ipv6_flow_label_on_stream,
+ msg_field_classifier_copy_ipv6_source_address_on_stream,
+ msg_field_classifier_copy_ipv6_destination_address_on_stream,
+ msg_field_classifier_copy_tcp_source_port_on_stream,
+ msg_field_classifier_copy_tcp_destination_port_on_stream,
+ msg_field_classifier_copy_udp_source_port_on_stream,
+ msg_field_classifier_copy_udp_destination_port_on_stream
+};
+typedef struct
+{
+ u32 len;
+ u32 ptr_shift;
+} info_rule_t;
+
+/////////////////////////////////////////////////////////////////////
+//////////////////// Classifier TOOLBOX ////////////////////////////
+/////////////////////////////////////////////////////////////////////
+
+
+
+len_t
+msg_field_classifier_copy_rule_ethernet_destination_address_on_stream(u8* stream, classifier_rules_data_t* data)
+{
+ ethernet_destination_address_t* address = &(data->ethernet_destination_address);
+
+ bcopy((void *)address, stream, 6);
+
+ return 6;
+}
+
+len_t
+msg_field_classifier_copy_rule_ethernet_destination_address_from_stream(u8* stream, classifier_rules_data_t* data)
+{
+ ethernet_destination_address_t* address = &(data->ethernet_destination_address);
+
+ bcopy(stream, (void *)address, 6);
+
+ return 6;
+}
+
+
+
+len_t
+msg_field_classifier_copy_rule_ethernet_source_address_on_stream(u8* stream, classifier_rules_data_t* data)
+{
+ ethernet_source_address_t* address = &(data->ethernet_source_address);
+
+ bcopy((void *)address, stream, 6);
+
+ return 6;
+}
+
+len_t
+msg_field_classifier_copy_rule_ethernet_source_address_from_stream(u8* stream, classifier_rules_data_t* data)
+{
+ ethernet_source_address_t* address = &(data->ethernet_source_address);
+
+ bcopy(stream, (void *)address, 6);
+
+ return 6;
+}
+
+
+
+
+len_t
+msg_field_classifier_copy_rule_vlan_user_priority_on_stream(u8* stream, classifier_rules_data_t* data)
+{
+ *stream = data->vlan_user_priority;
+
+ return 1;
+}
+
+len_t
+msg_field_classifier_copy_rule_vlan_user_priority_from_stream(u8* stream, classifier_rules_data_t* data)
+{
+ data->vlan_user_priority = *stream;
+
+ return 1;
+}
+
+
+
+
+len_t
+msg_field_classifier_copy_rule_vlan_id_on_stream(u8* stream, classifier_rules_data_t* data)
+{
+ *(u16*)stream = htons(data->vlan_id);
+
+ return 2;
+}
+
+len_t
+msg_field_classifier_copy_rule_vlan_id_from_stream(u8* stream, classifier_rules_data_t* data)
+{
+ data->vlan_id = ntohs(*(u16*)stream);
+
+ return 2;
+}
+
+
+
+len_t
+msg_field_classifier_copy_ipv4_type_of_service_on_stream(u8* stream, classifier_rules_data_t* data)
+{
+ *stream = data->ipv4_type_of_service;
+
+ return 1;
+}
+
+len_t
+msg_field_classifier_copy_ipv4_type_of_service_from_stream(u8* stream, classifier_rules_data_t* data)
+{
+ data->ipv4_type_of_service = *stream;
+
+ return 1;
+}
+
+
+
+len_t
+msg_field_classifier_copy_ipv4_protocol_on_stream(u8* stream, classifier_rules_data_t* data)
+{
+ *stream = data->ipv4_protocol;
+
+ return 1;
+}
+
+len_t
+msg_field_classifier_copy_ipv4_protocol_from_stream(u8* stream, classifier_rules_data_t* data)
+{
+ data->ipv4_protocol = *stream;
+
+ return 1;
+}
+
+
+
+len_t
+msg_field_classifier_copy_ipv4_source_address_on_stream(u8* stream, classifier_rules_data_t* data)
+{
+ ipv4_source_address_t* address = &(data->ipv4_source_address);
+
+ bcopy( (void *)address, (void *)stream, 4);
+
+ return 4;
+}
+
+len_t
+msg_field_classifier_copy_ipv4_source_address_from_stream(u8* stream, classifier_rules_data_t* data)
+{
+ ipv4_source_address_t* dest = &(data->ipv4_source_address);
+
+ bcopy( stream, (void *)dest, 4);
+
+ return 4;
+}
+
+
+
+len_t
+msg_field_classifier_copy_ipv4_destination_address_on_stream(u8* stream, classifier_rules_data_t* data)
+{
+ ipv4_destination_address_t* address = &(data->ipv4_destination_address);
+
+ bcopy( (void*)address, stream, 4);
+
+ return 4;
+}
+
+len_t
+msg_field_classifier_copy_ipv4_destination_address_from_stream(u8* stream, classifier_rules_data_t* data)
+{
+ ipv4_destination_address_t* dest = &(data->ipv4_destination_address);
+
+ bcopy( stream, (void*)dest, 4);
+
+ return 4;
+}
+
+
+
+
+len_t
+msg_field_classifier_copy_ipv6_traffic_class_on_stream(u8* stream, classifier_rules_data_t* data)
+{
+ *stream = data->ipv6_traffic_class;
+
+ return 1;
+}
+
+len_t
+msg_field_classifier_copy_ipv6_traffic_class_from_stream(u8* stream, classifier_rules_data_t* data)
+{
+ data->ipv6_traffic_class = *stream;
+
+ return 1;
+}
+
+
+
+len_t
+msg_field_classifier_copy_ipv6_flow_label_on_stream(u8* stream, classifier_rules_data_t* data)
+{
+ ipv6_flow_label_t* flow = &(data->ipv6_flow_label);
+
+ bcopy( (void*)flow, stream, 3);
+
+ return 3;
+}
+
+len_t
+msg_field_classifier_copy_ipv6_flow_label_from_stream(u8* stream, classifier_rules_data_t* data)
+{
+ ipv6_flow_label_t* flow = &(data->ipv6_flow_label);
+
+ bcopy( stream, (void*)flow, 3);
+
+ return 3;
+}
+
+
+
+len_t
+msg_field_classifier_copy_ipv6_source_address_on_stream(u8* stream, classifier_rules_data_t* data)
+{
+ ipv6_source_address_t* address = &(data->ipv6_source_address);
+
+ bcopy( (void*)address, stream, 16);
+
+ return 16;
+}
+
+len_t
+msg_field_classifier_copy_ipv6_source_address_from_stream(u8* stream, classifier_rules_data_t* data)
+{
+ ipv6_source_address_t* address = &(data->ipv6_source_address);
+
+ bcopy( stream, (void*)address, 16);
+
+ return 16;
+}
+
+
+
+
+len_t
+msg_field_classifier_copy_ipv6_destination_address_on_stream(u8* stream, classifier_rules_data_t* data)
+{
+ ipv6_destination_address_t* address = &(data->ipv6_destination_address);
+
+ bcopy( (void*)address, stream, 16);
+
+ return 16;
+}
+
+len_t
+msg_field_classifier_copy_ipv6_destination_address_from_stream(u8* stream, classifier_rules_data_t* data)
+{
+ ipv6_destination_address_t* address = &(data->ipv6_destination_address);
+
+ bcopy( stream, (void*)address, 16);
+
+ return 16;
+}
+
+
+
+len_t
+msg_field_classifier_copy_tcp_source_port_on_stream(u8* stream, classifier_rules_data_t* data)
+{
+ *(u16*)stream = htons(data->tcp_source_port);
+
+ return 2;
+}
+
+len_t
+msg_field_classifier_copy_tcp_source_port_from_stream(u8* stream, classifier_rules_data_t* data)
+{
+ data->tcp_source_port = ntohs(*(u16*)stream );
+
+ return 2;
+}
+
+
+
+len_t
+msg_field_classifier_copy_tcp_destination_port_on_stream(u8* stream, classifier_rules_data_t* data)
+{
+ *(u16*)stream = htons(data->tcp_destination_port);
+
+ return 2;
+}
+
+len_t
+msg_field_classifier_copy_tcp_destination_port_from_stream(u8* stream, classifier_rules_data_t* data)
+{
+ data->tcp_destination_port = ntohs(*(u16*)stream);
+
+ return 2;
+}
+
+
+
+len_t
+msg_field_classifier_copy_udp_source_port_on_stream(u8* stream, classifier_rules_data_t* data)
+{
+ *(u16*)stream = htons(data->udp_source_port);
+
+ return 2;
+}
+
+len_t
+msg_field_classifier_copy_udp_source_port_from_stream(u8* stream, classifier_rules_data_t* data)
+{
+ data->udp_source_port = ntohs(*(u16*)stream);
+
+ return 2;
+}
+
+
+
+len_t
+msg_field_classifier_copy_udp_destination_port_on_stream(u8* stream, classifier_rules_data_t* data)
+{
+ *(u16*)stream = htons(data->udp_destination_port);
+
+ return 2;
+}
+
+len_t
+msg_field_classifier_copy_udp_destination_port_from_stream(u8* stream, classifier_rules_data_t* data)
+{
+ data->udp_destination_port = ntohs(*(u16*)stream);
+
+ return 2;
+}
+
+////////////////////////////////////////////////////////////////////
+////////////////// Main Classifier Function ////////////////////////
+////////////////////////////////////////////////////////////////////
+
+
+/**
+ * Init a Classifier_rules structures
+ * \param classifier_rules pointer of the data to be initialized
+ *
+ */
+void
+msg_field_classifier_init(classifier_rules_t* classifier_rules)
+{
+ bzero(classifier_rules, sizeof(classifier_rules_t));
+
+}
+
+
+
+/**
+ * Get Classifier from stream
+ * \param stream the source stream
+ * \param classifier_rules destination of the data
+ * \return len the function return the length of the classifier_rules frame on the stream,
+ * this value does not correspond with the reality when the frame contains vendor field
+ *
+ */
+len_t
+msg_field_classifier_get_from_stream (u8* stream, classifier_rules_t* classifier_rules)
+{
+ int nbr_classifier_rules;
+ int rule_index = 0;
+ u8* local_stream;
+ len_t len = 0;
+
+ dbg_assert_ptr (stream);
+ dbg_assert_ptr (classifier_rules);
+
+ // Init
+ classifier_rules->classifier_version = *stream; stream++;
+ nbr_classifier_rules = *stream;stream++;
+
+ local_stream = stream;
+
+ while (rule_index < nbr_classifier_rules)
+ {
+ // get the Classifier Rule Identifier
+ u8 classifier_rule_id = *local_stream;
+ len++;local_stream++;
+
+ dbg_assert_print( (classifier_rule_id < 0x10) || (classifier_rule_id > 0xDF), "Classifier Rule Identifier not valid - received fid: 0x%x", classifier_rule_id);
+
+ classifier_rules->data.classifier_rules_available_block |= (0x01 << classifier_rule_id);
+
+ if (classifier_rule_id > 0xDF)
+ {
+ // Vendor defined Classifier Rule
+ nbr_classifier_rules = rule_index;
+ break;
+ }
+ else
+ {
+ // Homeplug AV Classifier Rule
+ len += copy_classifier_from_stream_tb[classifier_rule_id](local_stream, &(classifier_rules->data));
+ }
+
+
+ local_stream = stream + len;
+ rule_index ++;
+ }
+
+ classifier_rules->nbr_rules = nbr_classifier_rules;
+
+ cp_dbg_classifier_rule(*classifier_rules);
+
+ return len + 2;
+}
+
+
+
+
+/**
+ * set Classifier Rules on stream
+ * \param stream Destination.
+ * \param classifier_rules Source.
+ * \return Length of the data.
+ */
+len_t
+msg_field_classifier_set_on_stream(u8* stream, classifier_rules_t* classifier_rules)
+{
+ u8 index_rules;
+ u8* local_stream;
+ u32 available_rules = classifier_rules->data.classifier_rules_available_block;
+ len_t len = 0;
+
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(classifier_rules);
+ cp_dbg_classifier_rule(*classifier_rules);
+
+ bcopy( classifier_rules, stream, 2);//Copy of Classifier version and nbr of rules
+
+ stream += 2;
+
+ local_stream = stream;
+ // copy of the rules
+ for(index_rules = 0; index_rules < NBR_CLASSIFIER_FIELD; index_rules++)
+ {
+ u32 shift = available_rules >> index_rules;
+ u32 filtered = shift & FILTER_FIRST_BIT;
+
+ if ( filtered == 0X1)
+ {
+
+ *local_stream = index_rules;
+
+ local_stream++;
+ len ++;
+
+ len += copy_classifier_on_stream_tb[index_rules](local_stream, &(classifier_rules->data));
+ local_stream = stream + len;
+ }
+ }
+
+ return len+2;
+
+}
+
+
+
diff --git a/cesar/cp/msg/src/field/msg_field_cspec.c b/cesar/cp/msg/src/field/msg_field_cspec.c
new file mode 100644
index 0000000000..e148597300
--- /dev/null
+++ b/cesar/cp/msg/src/field/msg_field_cspec.c
@@ -0,0 +1,114 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file msg_field_cspec.c
+ * \brief This file provides management functions for CSPEC (Connection Specification) field.
+ * \ingroup cp/msg
+ *
+ */
+
+#include "common/std.h"
+#include "lib/swap.h"
+#include "cp/msg/inc/msg_cm_conn.h"
+
+
+/**
+ * Initialize the CSPEC (Connection Specification) structure.
+ * \param cspec Pointer of the data to be initialized.
+ *
+ */
+void
+msg_field_cspec_init(cspec_t* cspec)
+{
+ cspec->len = 0;
+ msg_field_cinfo_init( &(cspec->cinfo_forward) );
+ msg_field_cinfo_init( &(cspec->cinfo_reverse) );
+ msg_field_qmp_init( &(cspec->qmp_forward) );
+ cspec->qmp_forward.forward_or_reverse = QMP_FORWARD;
+ msg_field_qmp_init( &(cspec->qmp_reverse) );
+ cspec->qmp_reverse.forward_or_reverse = QMP_REVERSE;
+}
+
+
+/**
+ * Get CSPEC field from a stream.
+ * \param stream Source Stream.
+ * \param cspec Destination.
+ * \return Length of the CSPEC data.
+ *
+ */
+len_t
+msg_field_cspec_get_from_stream(u8* stream, cspec_t* cspec)
+{
+ u8* local_stream = stream;
+ u8* stream_end;
+
+ dbg_assert_ptr( stream );
+ dbg_assert_ptr( cspec );
+
+ cspec->len = ntohs (*(u16*)local_stream); local_stream += 2;
+ stream_end = stream + cspec->len;
+
+ local_stream += msg_field_cinfo_get_from_stream(local_stream, &(cspec->cinfo_forward) );
+ local_stream += msg_field_cinfo_get_from_stream(local_stream, &(cspec->cinfo_reverse) );
+
+ if(cspec->cinfo_forward.valid == CINFO_VALID)
+ local_stream += msg_field_qmp_get_from_stream(local_stream, stream_end, &(cspec->qmp_forward), QMP_FORWARD);
+
+ if(cspec->cinfo_reverse.valid == CINFO_VALID)
+ msg_field_qmp_get_from_stream(local_stream, stream_end, &(cspec->qmp_reverse), QMP_REVERSE);
+
+ cp_dbg_cspec(*cspec);
+
+ return cspec->len;
+
+}
+
+
+
+
+/**
+ * Set CSPEC on stream.
+ * \param stream Data destination.
+ * \param cspec Data source.
+ * \return Length of the data copied.
+ *
+ */
+len_t
+msg_field_cspec_set_on_stream(u8 * stream, cspec_t* cspec)
+{
+ u8 * local_stream = stream;
+
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(cspec);
+ cp_dbg_cspec(*cspec);
+
+ //cspec_len
+ local_stream += 2;
+
+ // copy cinfo_forward
+ local_stream += msg_field_cinfo_set_on_stream( local_stream, &(cspec->cinfo_forward));
+
+ // copy cinfo_reverse
+ local_stream += msg_field_cinfo_set_on_stream( local_stream, &(cspec->cinfo_reverse));
+
+ // copy qmp_forward
+ if (cspec->cinfo_forward.valid == CINFO_VALID)
+ {
+ local_stream += msg_field_qmp_set_on_stream( local_stream, &(cspec->qmp_forward));
+ }
+
+ // copy qmp_reverse
+ if (cspec->cinfo_reverse.valid == CINFO_VALID)
+ {
+ local_stream += msg_field_qmp_set_on_stream( local_stream, &(cspec->qmp_reverse));
+ }
+
+ // copy cspec_len
+ *(u16*)stream = htons(local_stream-stream);
+ return local_stream - stream;
+}
diff --git a/cesar/cp/msg/src/field/msg_field_qmp.c b/cesar/cp/msg/src/field/msg_field_qmp.c
new file mode 100644
index 0000000000..b0351e38a3
--- /dev/null
+++ b/cesar/cp/msg/src/field/msg_field_qmp.c
@@ -0,0 +1,1189 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file msg_field_qmp.c
+ * \brief This file provides management functions for QMP (QoS and Mac Parameters) field.
+ * \ingroup cp/msg
+ *
+ */
+
+#include "common/std.h"
+#include "lib/swap.h"
+#include "cp/msg/inc/msg_cm_conn.h"
+
+
+
+// Private definition
+typedef struct
+{
+ qmp_forward_or_reverse_t forward_or_reverse:8;
+ u8 qmp_len;
+ u8 fid;
+ u8 data[];
+} data_qmp_t;
+
+typedef void (*qmp_copy_from_stream_t)(u8*, qmp_t*);
+typedef len_t (*qmp_copy_from_qmp_t )(qmp_t*, u8*);
+
+void msg_field_qmp_copy_delay_bound_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_jitter_bound_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_average_msdu_size_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_maximum_msdu_size_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_average_data_rate_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_minimum_data_rate_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_maximum_data_rate_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_maximum_inter_txop_time_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_minimum_inter_txop_time_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_maximum_burst_size_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_exception_policy_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_inactivity_interval_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_msdu_error_rate_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_clst_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_cdesc_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_ats_tolerance_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_smallest_tolerable_data_rate_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_original_average_data_rate_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_rx_window_size_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_smoothing_buffer_size_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_bidirectional_burst_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_txops_per_beacon_period_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_average_number_of_pbs_per_txop_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_minimum_number_of_pbs_per_txop_from_stream_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_maximum_number_of_pbs_per_txop_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_ppb_threshold_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_surplus_bandwith_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_smallest_tolerable_average_number_of_pbs_per_txop_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_original_average_number_of_pbs_per_txop_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_cco_bidirectional_burst_from_stream(u8 * stream, qmp_t* qmp);
+void msg_field_qmp_copy_unknown_from_stream(u8 * stream, qmp_t* qmp);
+
+len_t msg_field_qmp_copy_delay_bound_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_jitter_bound_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_average_msdu_size_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_maximum_msdu_size_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_average_data_rate_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_minimum_data_rate_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_maximum_data_rate_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_maximum_inter_txop_time_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_minimum_inter_txop_time_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_maximum_burst_size_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_exception_policy_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_inactivity_interval_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_msdu_error_rate_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_clst_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_cdesc_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_ats_tolerance_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_smallest_tolerable_data_rate_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_original_average_data_rate_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_rx_window_size_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_smoothing_buffer_size_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_bidirectional_burst_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_txops_per_beacon_period_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_average_number_of_pbs_per_txop_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_minimum_number_of_pbs_per_txop_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_maximum_number_of_pbs_per_txop_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_ppb_threshold_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_surplus_bandwith_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_smallest_tolerable_average_number_of_pbs_per_txop_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_original_average_number_of_pbs_per_txop_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_cco_bidirectional_burst_from_qmp(qmp_t* qmp, u8* stream);
+len_t msg_field_qmp_copy_unknown_from_qmp(qmp_t* qmp, u8* stream);
+
+
+
+
+qmp_copy_from_stream_t qmp_copy_from_stream[32] =
+{
+ msg_field_qmp_copy_delay_bound_from_stream,
+ msg_field_qmp_copy_jitter_bound_from_stream,
+ msg_field_qmp_copy_average_msdu_size_from_stream,
+ msg_field_qmp_copy_maximum_msdu_size_from_stream,
+ msg_field_qmp_copy_average_data_rate_from_stream,
+ msg_field_qmp_copy_minimum_data_rate_from_stream,
+ msg_field_qmp_copy_maximum_data_rate_from_stream,
+ msg_field_qmp_copy_maximum_inter_txop_time_from_stream,
+ msg_field_qmp_copy_minimum_inter_txop_time_from_stream,
+ msg_field_qmp_copy_maximum_burst_size_from_stream,
+ msg_field_qmp_copy_exception_policy_from_stream,
+ msg_field_qmp_copy_inactivity_interval_from_stream,
+ msg_field_qmp_copy_msdu_error_rate_from_stream,
+ msg_field_qmp_copy_clst_from_stream,
+ msg_field_qmp_copy_cdesc_from_stream,
+ msg_field_qmp_copy_unknown_from_stream,
+ msg_field_qmp_copy_ats_tolerance_from_stream,
+ msg_field_qmp_copy_smallest_tolerable_data_rate_from_stream,
+ msg_field_qmp_copy_original_average_data_rate_from_stream,
+ msg_field_qmp_copy_rx_window_size_from_stream,
+ msg_field_qmp_copy_smoothing_buffer_size_from_stream,
+ msg_field_qmp_copy_bidirectional_burst_from_stream,
+ msg_field_qmp_copy_txops_per_beacon_period_from_stream,
+ msg_field_qmp_copy_average_number_of_pbs_per_txop_from_stream,
+ msg_field_qmp_copy_minimum_number_of_pbs_per_txop_from_stream_from_stream,
+ msg_field_qmp_copy_maximum_number_of_pbs_per_txop_from_stream,
+ msg_field_qmp_copy_ppb_threshold_from_stream,
+ msg_field_qmp_copy_surplus_bandwith_from_stream,
+ msg_field_qmp_copy_unknown_from_stream,
+ msg_field_qmp_copy_smallest_tolerable_average_number_of_pbs_per_txop_from_stream,
+ msg_field_qmp_copy_original_average_number_of_pbs_per_txop_from_stream,
+ msg_field_qmp_copy_cco_bidirectional_burst_from_stream
+
+};
+
+
+qmp_copy_from_qmp_t qmp_copy_from_qmp[32]=
+{
+ msg_field_qmp_copy_delay_bound_from_qmp,
+ msg_field_qmp_copy_jitter_bound_from_qmp,
+ msg_field_qmp_copy_average_msdu_size_from_qmp,
+ msg_field_qmp_copy_maximum_msdu_size_from_qmp,
+ msg_field_qmp_copy_average_data_rate_from_qmp,
+ msg_field_qmp_copy_minimum_data_rate_from_qmp,
+ msg_field_qmp_copy_maximum_data_rate_from_qmp,
+ msg_field_qmp_copy_maximum_inter_txop_time_from_qmp,
+ msg_field_qmp_copy_minimum_inter_txop_time_from_qmp,
+ msg_field_qmp_copy_maximum_burst_size_from_qmp,
+ msg_field_qmp_copy_exception_policy_from_qmp,
+ msg_field_qmp_copy_inactivity_interval_from_qmp,
+ msg_field_qmp_copy_msdu_error_rate_from_qmp,
+ msg_field_qmp_copy_clst_from_qmp,
+ msg_field_qmp_copy_cdesc_from_qmp,
+ msg_field_qmp_copy_unknown_from_qmp, // vendor specific
+ msg_field_qmp_copy_ats_tolerance_from_qmp,
+ msg_field_qmp_copy_smallest_tolerable_data_rate_from_qmp,
+ msg_field_qmp_copy_original_average_data_rate_from_qmp,
+ msg_field_qmp_copy_rx_window_size_from_qmp,
+ msg_field_qmp_copy_smoothing_buffer_size_from_qmp,
+ msg_field_qmp_copy_bidirectional_burst_from_qmp,
+ msg_field_qmp_copy_txops_per_beacon_period_from_qmp,
+ msg_field_qmp_copy_average_number_of_pbs_per_txop_from_qmp,
+ msg_field_qmp_copy_minimum_number_of_pbs_per_txop_from_qmp,
+ msg_field_qmp_copy_maximum_number_of_pbs_per_txop_from_qmp,
+ msg_field_qmp_copy_ppb_threshold_from_qmp,
+ msg_field_qmp_copy_surplus_bandwith_from_qmp,
+ msg_field_qmp_copy_unknown_from_qmp,
+ msg_field_qmp_copy_smallest_tolerable_average_number_of_pbs_per_txop_from_qmp,
+ msg_field_qmp_copy_original_average_number_of_pbs_per_txop_from_qmp,
+ msg_field_qmp_copy_cco_bidirectional_burst_from_qmp
+
+
+};
+////////////////////////////////////////////////////////////////////
+//////////////////////////// QMP TOOLBOX////////////////////////////
+////////////////////////////////////////////////////////////////////
+
+
+void
+msg_field_qmp_copy_delay_bound_from_stream(u8* stream, qmp_t* qmp)
+{
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(qmp);
+
+ qmp->valid.delay_bound_available = true;
+
+ qmp->cm.delay_bound = ntohl( *(u32*)stream);
+
+}
+
+len_t
+msg_field_qmp_copy_delay_bound_from_qmp(qmp_t* qmp, u8* stream)
+{
+
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.delay_bound_available, "PRE : no delay_bound_present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x04; stream++; // body length
+ *stream = 0x00; stream++; // FID : delay bound
+ *(u32*)stream = htonl(qmp->cm.delay_bound);
+
+ return 7;
+
+}
+
+
+
+void
+msg_field_qmp_copy_jitter_bound_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert(stream);
+ dbg_assert(qmp);
+
+ qmp->valid.jitter_bound_available = true;
+
+ qmp->cm.jitter_bound = ntohl( *(u32*)stream);
+}
+
+len_t
+msg_field_qmp_copy_jitter_bound_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.jitter_bound_available, "PRE : no jitter_bound_present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x04; stream++; // body length
+ *stream = 0x01; stream++; // FID : delay bound
+ *(u32*)stream = htonl(qmp->cm.jitter_bound);
+
+ return 7;
+}
+
+
+
+void
+msg_field_qmp_copy_average_msdu_size_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(qmp);
+
+ qmp->valid.average_msdu_size_available = true;
+
+ qmp->cm.average_msdu_size = ntohs( *(u16*)stream);
+
+}
+
+len_t
+msg_field_qmp_copy_average_msdu_size_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.average_msdu_size_available, "PRE : no average_msdu_size_present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x02; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cm.average_msdu_size);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_maximum_msdu_size_from_stream(u8 * stream, qmp_t* qmp)
+{
+ qmp->valid.maximum_msdu_size_available = true;
+
+ qmp->cm.maximum_msdu_size = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_maximum_msdu_size_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.maximum_msdu_size_available, "PRE : no maximum_msdu_size_present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x03; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cm.maximum_msdu_size);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_average_data_rate_from_stream(u8 * stream, qmp_t* qmp)
+{
+ qmp->valid.average_data_rate_available = true;
+
+ qmp->cm.average_data_rate = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_average_data_rate_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.average_data_rate_available, "PRE : no average_data_rate_present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x04; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cm.average_data_rate);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_minimum_data_rate_from_stream(u8 * stream, qmp_t* qmp)
+{
+ qmp->valid.minimum_data_rate_available = true;
+
+ qmp->cm.minimum_data_rate = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_minimum_data_rate_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.minimum_data_rate_available, "PRE : no minimum_data_rate_present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x05; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cm.minimum_data_rate);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_maximum_data_rate_from_stream(u8 * stream, qmp_t* qmp)
+{
+ qmp->valid.maximum_data_rate_available = true;
+
+ qmp->cm.maximum_data_rate = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_maximum_data_rate_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.maximum_data_rate_available, "PRE : no maximum_data_rate present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x06; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cm.maximum_data_rate);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_maximum_inter_txop_time_from_stream(u8 * stream, qmp_t* qmp)
+{
+ qmp->valid.maximum_inter_txop_time_available = true;
+
+ qmp->cm.maximum_inter_txop_time = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_maximum_inter_txop_time_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.maximum_inter_txop_time_available, "PRE : no maximum_inter_txop_time present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x07; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cm.maximum_inter_txop_time);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_minimum_inter_txop_time_from_stream(u8 * stream, qmp_t* qmp)
+{
+ qmp->valid.minimum_inter_txop_time_available = true;
+
+ qmp->cm.minimum_inter_txop_time = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_minimum_inter_txop_time_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.minimum_inter_txop_time_available, "PRE : no minimum_inter_txop_time present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x08; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cm.minimum_inter_txop_time);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_maximum_burst_size_from_stream(u8 * stream, qmp_t* qmp)
+{
+ qmp->valid.maximum_burst_size_available = true;
+
+ qmp->cm.maximum_burst_size = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_maximum_burst_size_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.maximum_burst_size_available, "PRE : no maximum_burst_size present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x09; stream++; // FID : maximum burst size
+ *(u16*)stream = htons(qmp->cm.maximum_burst_size);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_exception_policy_from_stream(u8 * stream, qmp_t* qmp)
+{
+ qmp->valid.exception_policy_available = true;
+
+ qmp->cm.exception_policy = *stream;
+}
+
+len_t
+msg_field_qmp_copy_exception_policy_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.exception_policy_available, "PRE : no exception_policy present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x01; stream++; // body length
+ *stream = 0x0A; stream++; // FID : delay bound
+ *stream = qmp->cm.exception_policy;
+
+ return 4;
+}
+
+
+
+void
+msg_field_qmp_copy_inactivity_interval_from_stream(u8 * stream, qmp_t* qmp)
+{
+ qmp->valid.inactivity_interval_available = true;
+
+ qmp->cm.inactivity_interval = ntohl( *(u32*)stream);
+}
+
+len_t
+msg_field_qmp_copy_inactivity_interval_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.inactivity_interval_available, "PRE : no inactivity_interval on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x04; stream++; // body length
+ *stream = 0x0B; stream++; // FID : delay bound
+ *(u32*)stream = htonl(qmp->cm.inactivity_interval);
+
+ return 7;
+}
+
+
+
+void
+msg_field_qmp_copy_msdu_error_rate_from_stream(u8 * stream, qmp_t* qmp)
+{
+ qmp->valid.msdu_error_rate_available = true;
+
+ qmp->cm.msdu_error_rate = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_msdu_error_rate_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.msdu_error_rate_available, "PRE : no msdu_error_rate present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x0C; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cm.msdu_error_rate);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_clst_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(qmp);
+
+ qmp->valid.clst_available = true;
+
+ qmp->cm.clst = *stream;
+}
+
+len_t
+msg_field_qmp_copy_clst_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.clst_available, "PRE : no clst present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x01; stream++; // body length
+ *stream = 0x0D; stream++; // FID : delay bound
+ *stream = qmp->cm.clst;
+
+ return 4;
+}
+
+
+
+void
+msg_field_qmp_copy_cdesc_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(qmp);
+
+ qmp->valid.cdesc_available = true;
+
+ qmp->cm.cdesc.ip_version = *stream;
+ stream ++;
+
+ if( qmp->cm.cdesc.ip_version == IP_VERSION_4)
+ {
+ bcopy(stream, &qmp->cm.cdesc.ipv4_source_address , 4); stream += 4; // copy source ip address
+ qmp->cm.cdesc.source_port = ntohs( *(u16*)stream);stream += 2;
+
+ bcopy(stream, &qmp->cm.cdesc.ipv4_destination_address , 4); stream += 4; // copy destination ip address
+ qmp->cm.cdesc.destination_port = ntohs( *(u16*)stream); stream += 2;
+
+ }
+ else if ( qmp->cm.cdesc.ip_version == IP_VERSION_6)
+ {
+ bcopy(stream, &qmp->cm.cdesc.ipv6_source_address, 36);
+ qmp->cm.cdesc.destination_port = ntohs(qmp->cm.cdesc.destination_port);
+ qmp->cm.cdesc.source_port = ntohs(qmp->cm.cdesc.source_port);
+ }
+ else
+ {
+ dbg_assert_print(true, "!!! ERROR : ip version invalid");
+ }
+ qmp->cm.cdesc.protocol_type = *stream;
+
+}
+
+len_t
+msg_field_qmp_copy_cdesc_from_qmp(qmp_t* qmp, u8* stream)
+{
+ len_t len = 0;
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.cdesc_available, "PRE : no cdesc present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+
+ if(qmp->cm.cdesc.ip_version == IP_VERSION_4)
+ {
+ *stream = 0x0E; stream++; // body length
+ *stream = 0x0E; stream++; // FID : delay bound
+ *stream = qmp->cm.cdesc.ip_version; stream++;
+
+ bcopy(qmp->cm.cdesc.ipv4_source_address,stream, sizeof( qmp->cm.cdesc.ipv4_source_address ) );
+ stream += sizeof( qmp->cm.cdesc.ipv4_source_address );
+
+ *(u16*)stream = htons(qmp->cm.cdesc.source_port);
+ stream += 2;
+
+ bcopy(qmp->cm.cdesc.ipv4_destination_address,stream, sizeof( qmp->cm.cdesc.ipv4_destination_address ) );
+ stream += sizeof( qmp->cm.cdesc.ipv4_destination_address);
+
+ *(u16*)stream = htons(qmp->cm.cdesc.destination_port);
+ stream += 2;
+
+ len = 17;
+ }
+ else if(qmp->cm.cdesc.ip_version == IP_VERSION_6)
+ {
+ *stream = 0x26; stream++; // body length
+ *stream = 0x0E; stream++; // FID : delay bound
+ *stream = qmp->cm.cdesc.ip_version; stream++;
+
+ bcopy(qmp->cm.cdesc.ipv4_source_address,stream, 16 ); stream += 16;
+ *(u16*)stream = htons(qmp->cm.cdesc.source_port); stream += 2;
+ bcopy(qmp->cm.cdesc.ipv4_destination_address,stream, 16 ); stream += 16;
+ *(u16*)stream = htons(qmp->cm.cdesc.destination_port); stream += 2;
+
+ len = 41;
+ }
+ else
+ dbg_assert_print(true,"Invalid ip version");
+
+ *stream = qmp->cm.cdesc.protocol_type;
+
+
+ return len;
+}
+
+
+
+void
+msg_field_qmp_copy_ats_tolerance_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(qmp);
+
+ qmp->valid.ats_tolerance_available = true;
+
+ qmp->cm.ats_tolerance = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_ats_tolerance_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.ats_tolerance_available, "PRE : no ats_tolerance present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x10; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cm.ats_tolerance);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_smallest_tolerable_data_rate_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(qmp);
+
+ qmp->valid.smallest_tolerable_data_rate_available = true;
+
+ qmp->cm.smallest_tolerable_data_rate = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_smallest_tolerable_data_rate_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.smallest_tolerable_data_rate_available, "PRE : no smallest_tolerable_data_rate present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x11; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cm.smallest_tolerable_data_rate);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_original_average_data_rate_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(qmp);
+
+ qmp->valid.original_average_data_rate_available = true;
+
+ qmp->cm.original_average_data_rate = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_original_average_data_rate_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.original_average_data_rate_available, "PRE : no original_average_data_rate present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x12; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cm.original_average_data_rate);
+
+ return 5;
+}
+
+
+
+
+void
+msg_field_qmp_copy_rx_window_size_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(qmp);
+
+ qmp->valid.rx_window_size_available = true;
+
+ qmp->cm.rx_window_size = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_rx_window_size_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.rx_window_size_available, "PRE : no rx_window_size present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x13; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cm.rx_window_size);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_smoothing_buffer_size_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(qmp);
+
+ qmp->valid.smoothing_buffer_size_available = true;
+
+ bcopy(stream, &qmp->cm.smoothing_buffer_size, 3);
+
+#if DEFS_BIG_ENDIAN
+
+#else
+#define var (qmp->cm.smoothing_buffer_size)
+ var = (var & 0x0000FF) << 16 | (var & 0x00FF00) | (var & 0xFF0000) >> 16;
+#endif
+}
+
+len_t
+msg_field_qmp_copy_smoothing_buffer_size_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.smoothing_buffer_size_available, "PRE : no smoothing_buffer_sizepresent on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x03; stream++; // body length
+ *stream = 0x14; stream++; // FID : delay bound
+
+
+#if DEFS_BIG_ENDIAN
+
+#else
+#define var (qmp->cm.smoothing_buffer_size)
+ *(u32*)stream = (var & 0x0000FF) << 16 | (var & 0x00FF00) | (var & 0xFF0000) >> 16;
+#endif
+
+
+ return 6;
+}
+
+
+
+void
+msg_field_qmp_copy_bidirectional_burst_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert(stream);
+ dbg_assert(qmp);
+
+ qmp->valid.bidirectional_burst_available = true;
+
+ qmp->cm.bidirectional_burst = *stream;
+}
+
+len_t
+msg_field_qmp_copy_bidirectional_burst_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.bidirectional_burst_available, "PRE : no bidirectional_burst present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x01; stream++; // body length
+ *stream = 0x15; stream++; // FID : delay bound
+ *stream = qmp->cm.bidirectional_burst;
+
+ return 4;
+}
+
+
+
+void
+msg_field_qmp_copy_txops_per_beacon_period_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(qmp);
+ qmp->valid.txops_per_beacon_period_available = true;
+
+ qmp->cco.txops_per_beacon_period = *stream;
+}
+
+len_t
+msg_field_qmp_copy_txops_per_beacon_period_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.txops_per_beacon_period_available, "PRE : no txops_per_beacon_period present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x01; stream++; // body length
+ *stream = 0x80; stream++; // FID : delay bound
+ *stream = qmp->cco.txops_per_beacon_period;
+
+ return 4;
+}
+
+
+
+void
+msg_field_qmp_copy_average_number_of_pbs_per_txop_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert(stream);
+ dbg_assert(qmp);
+
+ qmp->valid.average_number_of_pbs_per_txop_available = true;
+
+ qmp->cco.average_number_of_pbs_per_txop = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_average_number_of_pbs_per_txop_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.average_number_of_pbs_per_txop_available, "PRE : no average_number_of_pbs_per_txop present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x81; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cco.average_number_of_pbs_per_txop);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_minimum_number_of_pbs_per_txop_from_stream_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(qmp);
+
+ qmp->valid.minimum_number_of_pbs_per_txop_available = true;
+
+ qmp->cco.minimum_number_of_pbs_per_txop = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_minimum_number_of_pbs_per_txop_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.minimum_number_of_pbs_per_txop_available, "PRE : no minimum_number_of_pbs_per_txop present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x82; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cco.minimum_number_of_pbs_per_txop);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_maximum_number_of_pbs_per_txop_from_stream(u8 * stream, qmp_t* qmp)
+{
+ qmp->valid.maximum_number_of_pbs_per_txop_available = true;
+
+ qmp->cco.maximum_number_of_pbs_per_txop = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_maximum_number_of_pbs_per_txop_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.maximum_number_of_pbs_per_txop_available, "PRE : no maximum_number_of_pbs_per_txop present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x83; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cco.maximum_number_of_pbs_per_txop);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_ppb_threshold_from_stream(u8 * stream, qmp_t* qmp)
+{
+ qmp->valid.ppb_threshold_available = true;
+
+ qmp->cco.ppb_threshold = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_ppb_threshold_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.ppb_threshold_available, "PRE : no ppb_threshold present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x84; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cco.ppb_threshold);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_surplus_bandwith_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(qmp);
+
+ qmp->valid.surplus_bandwith_available = true;
+
+ qmp->cco.surplus_bandwith = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_surplus_bandwith_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.ppb_threshold_available, "PRE : no ppb_threshold present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x85; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cco.ppb_threshold);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_smallest_tolerable_average_number_of_pbs_per_txop_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(qmp);
+
+ qmp->valid.smallest_tolerable_average_number_of_pbs_per_txop_available = true;
+
+ qmp->cco.smallest_tolerable_average_number_of_pbs_per_txop = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_smallest_tolerable_average_number_of_pbs_per_txop_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.smallest_tolerable_average_number_of_pbs_per_txop_available, "PRE : no smallest_tolerable_average_number_of_pbs_per_txop present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x87; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cco.smallest_tolerable_average_number_of_pbs_per_txop);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_original_average_number_of_pbs_per_txop_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(qmp);
+
+ qmp->valid.original_average_number_of_pbs_per_txop_available = true;
+
+ qmp->cco.original_average_number_of_pbs_per_txop = ntohs( *(u16*)stream);
+}
+
+len_t
+msg_field_qmp_copy_original_average_number_of_pbs_per_txop_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.original_average_number_of_pbs_per_txop_available, "PRE : no original_average_number_of_pbs_per_txop present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x02; stream++; // body length
+ *stream = 0x88; stream++; // FID : delay bound
+ *(u16*)stream = htons(qmp->cco.original_average_number_of_pbs_per_txop);
+
+ return 5;
+}
+
+
+
+void
+msg_field_qmp_copy_cco_bidirectional_burst_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(qmp);
+
+ qmp->valid.cco_bidirectional_burst_available = true;
+
+ qmp->cco.cco_bidirectional_burst = *stream;
+}
+
+len_t
+msg_field_qmp_copy_cco_bidirectional_burst_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_ptr(qmp);
+ dbg_assert_ptr(stream);
+ dbg_assert_print(qmp->valid.cco_bidirectional_burst_available, "PRE : no cco_bidirectional_burst present on qmp frame");
+
+ *stream = qmp->forward_or_reverse; stream ++;
+ *stream = 0x01; stream++; // body length
+ *stream = 0x89; stream++; // FID : delay bound
+ *stream = qmp->cco.cco_bidirectional_burst;
+
+ return 4;
+}
+
+
+
+void
+msg_field_qmp_copy_unknown_from_stream(u8 * stream, qmp_t* qmp)
+{
+ dbg_assert_print(true, "Error unknown fid on QMP");
+}
+
+
+len_t
+msg_field_qmp_copy_unknown_from_qmp(qmp_t* qmp, u8* stream)
+{
+ dbg_assert_print(true, "Erreur copy unknown");
+ return 0;
+}
+
+
+
+u8
+qmp_get_index_from_fid(u8 fid)
+{
+ dbg_assert_print(fid < 0x16 || fid >= 0x80, "PRE : fid value not valid");
+
+ if( fid < 0x16)
+ { // cm fid
+ return fid;
+ }
+ else
+ { // cco fid
+ dbg_assert_print( (fid < 0x8A) && ( fid > 0x7F), "POST: invalid fid range = %x", fid);
+ return fid-0x6A;
+ }
+
+}
+////////////////////////////////////////////////////////////////////
+//////////////////////// Main QMP Function /////////////////////////
+////////////////////////////////////////////////////////////////////
+
+
+
+/**
+ * Initialize the QMP structure.
+ *
+ * \param qmp Data to be initialized.
+ *
+ */
+void
+msg_field_qmp_init(qmp_t* qmp)
+{
+ bzero(qmp, sizeof(qmp_t));
+}
+
+
+
+/**
+ * Get a QMP field from a stream.
+ *
+ * \param stream Stream of data contening the qmp field.
+ * \param qmp Data destination.
+ * \param qmp_type Type of QMP frame to read (QMP_FORWARD or QMP_REVERSE defined on CSPEC).
+ * return Length of the data;
+ *
+ */
+len_t
+msg_field_qmp_get_from_stream (u8* stream, u8* stream_end, qmp_t * qmp, qmp_forward_or_reverse_t qmp_type)
+{
+ data_qmp_t* packet;
+ len_t len;
+
+ dbg_assert_ptr (stream);
+ dbg_assert (*stream == qmp_type); // is really a forward qmp stream
+ dbg_assert_ptr (qmp);
+
+ qmp->forward_or_reverse = qmp_type;
+
+ packet = (data_qmp_t*)(stream);
+
+ while ( (packet->forward_or_reverse == qmp_type) && ( (u8*)packet < stream_end))
+ {
+ u8 index;
+
+ dbg_assert_ptr(packet);
+
+ index = qmp_get_index_from_fid(packet->fid);
+
+ qmp_copy_from_stream[index]((u8*)(packet->data), qmp);
+
+ len = packet->qmp_len;
+ packet = (data_qmp_t *)((u8*)(packet)+(len) + 3);
+ }
+
+ cp_dbg_qmp(*qmp);
+ return (len_t)((u8*)packet-stream);
+}
+
+
+
+/**
+ * Set QMP field on stream.
+ *
+ * \param stream Data destination.
+ * \param qmp Data source.
+ * \return Length of the data.
+ */
+len_t
+msg_field_qmp_set_on_stream(u8 * stream, qmp_t* qmp)
+{
+ len_t len = 0;
+ int qmp_field_i;
+ u8 * local_stream = stream;
+
+ dbg_assert_ptr(stream);
+ dbg_assert_ptr(qmp);
+ cp_dbg_qmp(*qmp);
+
+ for(qmp_field_i = 0; qmp_field_i < 32; qmp_field_i++ )
+ {
+ if ( ( (0x01<< qmp_field_i) & qmp->valid_in_block ) != 0)
+ {
+ len += qmp_copy_from_qmp[qmp_field_i](qmp, local_stream);
+
+ local_stream = stream + len;
+ }
+
+ }
+
+ return len;
+}
+
+
diff --git a/cesar/cp/msg/src/msg.c b/cesar/cp/msg/src/msg.c
new file mode 100644
index 0000000000..b5eb37cdca
--- /dev/null
+++ b/cesar/cp/msg/src/msg.c
@@ -0,0 +1,336 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/msg/msg.c
+ * \brief MME message processing
+ * \ingroup cp_msg
+ */
+
+#include "common/std.h"
+
+#include "cp/beacon/inc/bentry.h"
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/forward.h"
+#include "cp/beacon/inc/beacons_work.h"
+
+#include "cp/msg/msg.h"
+
+/*
+ * this array describe messages, their prefered destination and the function
+ * which process it.
+ * the array must be ordered on the first field of each line.
+ */
+const msg_list_mme_t msg_list_m[] =
+ {
+ { CC_CCO_APPOINT_REQ, 0 },
+ { CC_CCO_APPOINT_CNF, 0 },
+ { CC_BACKUP_APPOINT_REQ, 0 },
+ { CC_BACKUP_APPOINT_CNF, 0 },
+ { CC_LINK_INFO_REQ, 0 },
+ { CC_LINK_INFO_CNF, 0 },
+ { CC_LINK_INFO_IND, 0 },
+ { CC_LINK_INFO_RSP, 0 },
+ { CC_HANDOVER_REQ, 0 },
+ { CC_HANDOVER_CNF, 0 },
+ { CC_HANDOVER_INFO_IND, 0 },
+ { CC_HANDOVER_INFO_RSP, 0 },
+ // TBC ...
+ {CC_ASSOC_REQ, RECEIVE_CC_ASSOC_REQ},
+ {CC_ASSOC_CNF, RECEIVE_CC_ASSOC_CNF},
+ {CC_SET_TEI_MAP_REQ, RECEIVE_CC_SET_TEI_MAP_REQ},
+ {CC_SET_TEI_MAP_IND, RECEIVE_CC_SET_TEI_MAP_IND},
+
+ { CM_UNASSOCIATED_STA_IND, RECEIVE_USTA_MME},
+ // TBC ...
+
+ {DRV_STA_SET_MAC_ADDR_REQ, RECEIVE_DRV_SET_MAC_ADDRESS},
+ {DRV_STA_SET_CCO_PREF_REQ, RECEIVE_DRV_SET_CCO_PREFERENCE_REQ},
+ {DRV_STA_SET_WAS_CCO_REQ, RECEIVE_DRV_SET_WAS_CCO},
+ {DRV_STA_SET_NPW_REQ, RECEIVE_DRV_SET_NPW_REQ},
+ {DRV_STA_SET_DPW_REQ, RECEIVE_DRV_SET_DPW_REQ},
+ {DRV_STA_SET_SL_REQ, RECEIVE_DRV_SET_SL},
+ {DRV_STA_SET_M_STA_HFID_REQ, RECEIVE_DRV_SET_M_STA_HFID},
+ {DRV_STA_SET_U_STA_HFID_REQ, RECEIVE_DRV_SET_U_STA_HFID},
+ {DRV_STA_SET_AVLN_HFID_REQ, RECEIVE_DRV_SET_AVLN_HFID},
+ {DRV_STA_SET_TONEMASK_REQ, RECEIVE_DRV_SET_TONEMASK},
+ {DRV_STA_START_REQ, RECEIVE_DRV_MAC_START_REQ},
+ {DRV_STA_STOP_REQ, RECEIVE_DRV_MAC_STOP_IND}
+ /*
+ {DRV_STA_SET_NID_REQ, RECEIVE_DRV_SET_NID},
+ {DRV_STA_SET_SNID_REQ, RECEIVE_DRV_SET_SNID},
+ */
+ };
+
+const char *cst_str_drv_mme_req[] = {
+ "DRV_STA_SET_MAC_ADDR.REQ",
+ "DRV_STA_SET_CCO_PREF.REQ",
+ "DRV_STA_SET_WAS_CCO.REQ",
+ "DRV_STA_SET_NPW.REQ",
+ "DRV_STA_SET_DPW.REQ",
+ "DRV_STA_SET_SL.REQ",
+ "DRV_STA_SET_M_STA_HFID.REQ",
+ "DRV_STA_SET_U_STA_HFID.REQ",
+ "DRV_STA_SET_AVLN_HFID.REQ",
+ "DRV_STA_SET_TONEMASK.REQ",
+ "DRV_STA_START.REQ",
+ "DRV_STA_STOP.REQ"
+};
+
+const char *cst_str_drv_mme_cnf[] = {
+ "DRV_STA_SET_MAC_ADDR.CNF",
+ "DRV_STA_SET_CCO_PREF.CNF",
+ "DRV_STA_SET_WAS_CCO.CNF",
+ "DRV_STA_SET_NPW.CNF",
+ "DRV_STA_SET_DPW.CNF",
+ "DRV_STA_SET_SL.CNF",
+ "DRV_STA_SET_M_STA_HFID.CNF",
+ "DRV_STA_SET_U_STA_HFID.CNF",
+ "DRV_STA_SET_AVLN_HFID.CNF",
+ "DRV_STA_SET_TONEMASK.CNF",
+ "DRV_STA_START.CNF",
+ "DRV_STA_STOP.CNF"
+};
+
+// this is the fmsn that will be used in fragmented mme
+static u8 fmsn_m;
+
+void msg_init(void)
+{
+#if DEBUG == 0
+ uint i;
+ for(i=1 ; i<COUNT(msg_list_m) ; i++)
+ dbg_assert(msg_list_m[i].mm_type > msg_list_m[i-1].mm_type);
+#endif
+ fmsn_m = 0;
+ msg_cm_init();
+}
+
+u8
+msg_get_fmsn(const bool new)
+{
+ printf ("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ // TODO the question is : is it possible to have 2 thread accessing this
+ // function at the same time ?
+ if(new) fmsn_m++;
+ return fmsn_m;
+}
+
+u16
+msg_get_number (msg_mme_t *msg)
+{
+ msg_mme_b_t * msg_b;
+ u16 mme_num;
+ u16 ret = MSG_UNKNOW;
+
+ printf ("%u %s() : DEBUT...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert ( !msg_check_wrong_mme_const_values (msg));
+ msg_b = (msg_mme_b_t *)msg;
+ printf ("%u %s() : VERIF... msg->m_type = 0x%04x ; msg_b->m_type = 0x%04x\n",cyg_hal_sys_getpid(),__FUNCTION__,big_to_cpuhost_endian_u16(msg->m_type),big_to_cpuhost_endian_u16(msg_b->m_type));
+ //TODO this is maybe not very efficient, to check with more messages ...
+ if (big_to_cpuhost_endian_u16(msg->m_type) == MSG_MTYPE_IEEE_ETHERTYPE)
+ {
+ printf ("%u %s() : DICHOTOMY sur msg->mm_type 0x%04x...\n",cyg_hal_sys_getpid(),__FUNCTION__,msg->mm_type);
+ DICHOTOMY_SEARCH(0, COUNT(msg_list_m), mme_num, msg->mm_type <= msg_list_m[mme_num].mm_type);
+ printf("%u requested msg : 0x%04x, index found : %i\n",cyg_hal_sys_getpid(), msg->mm_type, mme_num);
+ if(msg->mm_type != msg_list_m[mme_num].mm_type)
+ {
+ printf ("%u %s() : FIN. ; MSG_UNKNOW !\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ ret = MSG_UNKNOW;
+ }
+ else
+ {
+ printf ("%u %s() : FIN. ; mme_num = %i (0x%04x)\n",cyg_hal_sys_getpid(),__FUNCTION__,mme_num,mme_num);
+ ret = mme_num;
+ }
+ }
+ else if ((big_to_cpuhost_endian_u16(msg_b->m_type) == MSG_MTYPE_IEEE_ETHERTYPE))
+ {
+ printf ("%u %s() : DICHOTOMY sur msg_b->mm_type 0x%04x...\n",cyg_hal_sys_getpid(),__FUNCTION__,msg_b->mm_type);
+ DICHOTOMY_SEARCH(0, COUNT(msg_list_m), mme_num, msg_b->mm_type <= msg_list_m[mme_num].mm_type);
+ printf ("%u requested msg : 0x%04x, index found : %i\n",cyg_hal_sys_getpid(), msg_b->mm_type, mme_num);
+ if(msg_b->mm_type != msg_list_m[mme_num].mm_type)
+ {
+ printf ("%u %s() : FIN. ; MSG_UNKNOW !\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ ret = MSG_UNKNOW;
+ }
+ else
+ {
+ printf ("%u %s() : FIN. ; mme_num = %i (0x%04x)\n",cyg_hal_sys_getpid(),__FUNCTION__,mme_num,mme_num);
+ ret = mme_num;
+ }
+ }
+ else
+ {
+ printf ("%u %s() : FIN. ; ERREUR (mme_num = %i (0x%04x) !!!\n",cyg_hal_sys_getpid(),__FUNCTION__,mme_num,mme_num);
+ }
+ return ret;
+}
+
+//void
+//msg_dispatch (msg_mme_t *msg)
+void
+msg_dispatch (msg_ctx_t *msg_ctx)
+{
+ msg_mme_t *msg;
+ msg_mme_b_t *msg_b;
+ u16 mme_num;
+
+ printf ("%u %s() : DEBUT...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+
+ dbg_assert(msg_ctx);
+ dbg_assert(msg_ctx->buffer);
+ msg = (msg_mme_t *)msg_ctx->buffer;
+ msg_b = (msg_mme_b_t *)msg;
+
+ dbg_assert ( !msg_check_wrong_mme_const_values (msg));
+ mme_num = msg_get_number (msg);
+ printf ("%u %s() : suite... ; mme_num = %i (0x%04x)\n",cyg_hal_sys_getpid(),__FUNCTION__,mme_num,mme_num);
+ if (mme_num != MSG_UNKNOW)
+ {
+ dbg_assert(msg_list_m[mme_num].msg_num);
+ cp_station_add_event(msg_list_m[mme_num].msg_num, (void *) msg_ctx);
+ }
+ // release the message's buffer(s)
+// interf_release_buf(msg);
+ printf ("%u %s() : FIN.\n",cyg_hal_sys_getpid(),__FUNCTION__);
+}
+
+void
+msg_set_mme_const_values (msg_mme_t *msg)
+{
+ dbg_assert (msg);
+
+ msg->m_type = cpuhost_to_big_endian_u16(MSG_MTYPE); // 11.1.4
+ msg->mmv = MSG_MM_VERSION;
+ #if CHECK_BUFFER_OVERFLOW
+ interf_buffer_t *buffer = NULL;
+ buffer = PARENT_OF(interf_buffer_t, msg, msg);
+ buffer->signature = BUFFER_SIGNATURE;
+ #endif
+}
+
+bool
+msg_check_wrong_mme_const_values (const msg_mme_t *msg)
+{int i; u8 *p = (u8*)msg;
+ msg_mme_b_t *msg_b;
+
+ printf ("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ for (i=0;i<1;i++)printf("msg = 0x%08lx ",(unsigned long)msg);printf("\n");
+ dbg_assert (msg);
+
+ msg_b = (msg_mme_b_t *)msg;
+
+ #if CHECK_BUFFER_OVERFLOW
+ interf_buffer_t *buffer = NULL;
+ buffer = PARENT_OF(interf_buffer_t, msg, msg);
+ dbg_assert(buffer->signature == BUFFER_SIGNATURE);
+ #endif
+
+ for (i= 0;i<16;i++)printf("%02x.",p[i]);printf("\n");
+ for (i=16;i<32;i++)printf("%02x.",p[i]);printf("\n");
+ for (i=32;i<48;i++)printf("%02x.",p[i]);printf("\n");
+ for (i=48;i<64;i++)printf("%02x.",p[i]);printf("\n");
+ printf("%u %s() : msg->m_type = 0x%04x\n",cyg_hal_sys_getpid(),__FUNCTION__,big_to_cpuhost_endian_u16(msg->m_type));
+ printf("%u %s() : msg_b->m_type = 0x%04x\n",cyg_hal_sys_getpid(),__FUNCTION__,big_to_cpuhost_endian_u16(msg_b->m_type));
+ if (big_to_cpuhost_endian_u16(msg->m_type) == MSG_MTYPE)
+ for (i=0;i<1;i++)printf("msg->m_type = 0x%04x ; msg->mm_type = 0x%04x",big_to_cpuhost_endian_u16(msg->m_type),msg->mm_type);
+ else if (big_to_cpuhost_endian_u16(msg_b->m_type) == MSG_MTYPE)
+ for (i=0;i<1;i++)printf("msg->m_type = 0x%04x ; msg->mm_type = 0x%04x",big_to_cpuhost_endian_u16(msg_b->m_type),msg_b->mm_type);
+ else
+ for (i=0;i<1;i++)printf("msg->m_type = 0x???? ; msg->mm_type = 0x????");
+ printf("\n");
+
+ return ((big_to_cpuhost_endian_u16(msg->m_type) != MSG_MTYPE) && (big_to_cpuhost_endian_u16(msg_b->m_type) != MSG_MTYPE));
+}
+
+msg_mme_t *
+msg_sending_common_part(msg_mme_t *msg, const mac_address_t oda, msg_param_t *msg_param)
+{
+ dbg_assert(msg);
+ dbg_assert(msg_param);
+
+ // ask for a buffer
+ //msg = interf_give_buf ();
+ //dbg_assert ( !msg_check_wrong_mme_const_values (msg));
+ // set the header values of msg
+ memcpy(msg->oda, oda, sizeof(mac_address_t));
+ //memcpy(msg->osa, station_get_mac_address(), sizeof(mac_address_t));
+ cp_station_get_mac_address(NULL,&msg->osa); //TODO : pass CP ctx as first argument instead of NULL pointer...
+ // vlan is optional and not used
+ msg->m_type = cpuhost_to_big_endian_u16(MSG_MTYPE); // 11.1.4
+ msg->mmv = MSG_MM_VERSION;
+ // set fragmentation default values
+ msg->fmi.nf_mi = 0;
+ msg->fmi.fn_mi = 0;
+ msg->fmi.fmsn = 0;
+ // set the default message parameters
+ memset(msg_param, 0, sizeof(msg_param_t));
+ msg_param->encryption = HARDWARE_ENCRYPTED;
+ msg_param->peks = NOT_ENCRYPTED;
+ return msg;
+}
+
+void
+msg_send(msg_mme_t *msg, u16 msg_size, msg_param_t msg_param)
+{
+ tei_t tei;
+
+ dbg_assert ( !msg_check_wrong_mme_const_values (msg));
+ dbg_assert(msg_size <= ETH_PACKET_MAX_SIZE);
+
+ // find the tei of the ODA
+ tei = cp_station_find_tei_from_mac(msg->oda);
+ // check if the message is software encrypted
+ if(msg_param.encryption == SOFTWARE_ENCRYPTED)
+ {
+
+ }
+ else
+ {
+ // and then, send the message
+ interf_send (msg, msg_size, msg_param, tei);
+ }
+}
+
+/**
+ * \brief Get DRV-MME .REQ message name
+ *
+ * \param cnf the REQ message type identifier
+ * \return the .REQ message name string constant
+ */
+char *
+get_str_drv_mme_req(int req)
+{
+ return (char*)cst_str_drv_mme_req[req];
+}
+
+/**
+ * \brief Get DRV-MME .CNF message name
+ *
+ * \param cnf the CNF message type identifier
+ * \return the .CNF message name string constant
+ */
+char *
+get_str_drv_mme_cnf(int cnf)
+{
+ return (char*)cst_str_drv_mme_cnf[cnf];
+}
+
+#if 0
+/**
+ * \brief Get a message type name string
+ *
+ * \param mmtype the message type identifier
+ * \return the message type name string constant
+ */
+char *
+get_str_mmtype(u16 mmtype)
+{
+ return (char*)cst_str_drv_mme_cnf[cnf];
+}
+#endif
diff --git a/cesar/cp/msg/src/msg_apcm.c b/cesar/cp/msg/src/msg_apcm.c
new file mode 100644
index 0000000000..9aee40a5c3
--- /dev/null
+++ b/cesar/cp/msg/src/msg_apcm.c
@@ -0,0 +1,16 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file msg_apcm.c
+ * \brief File Description
+ * \ingroup cp/msg
+ *
+ */
+
+#include "common/std.h"
+
+
diff --git a/cesar/cp/msg/src/msg_cc.c b/cesar/cp/msg/src/msg_cc.c
new file mode 100644
index 0000000000..cdee5d9a46
--- /dev/null
+++ b/cesar/cp/msg/src/msg_cc.c
@@ -0,0 +1,141 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/msg/msg_cc.c
+ * \brief
+ * \ingroup cp_msg
+ */
+
+#include "common/std.h"
+
+#include "cp/beacon/inc/bentry.h"
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/forward.h"
+#include "cp/beacon/inc/beacons_work.h"
+
+#include "cp/msg/inc/msg_cc.h"
+
+
+
+void msg_cc_assoc_req_send(const mac_address_t oda)
+{
+/* msg_mme_t *msg;
+ cc_assoc_req_t *cc_assoc_req;
+ msg_param_t msg_param;
+
+ msg = msg_sending_common_part(oda, &msg_param);
+ msg->mm_type = CC_ASSOC_REQ;
+ // set the message values ( 11.2.28 )
+ cc_assoc_req = (cc_assoc_req_t *) & msg->mm_entry;
+ cc_assoc_req->cco_capability = station_get_cco_capa();
+ cc_assoc_req->nid = station_get_nid();
+ cc_assoc_req->proxy_networking_capability = 0;
+ cc_assoc_req->req_type = 0;
+ // set the message parameters
+ msg_param.encryption = NOT_ENCRYPTED;
+ // and then, send the message
+ msg_send(msg, sizeof(cc_assoc_req_t) + MSG_MME_HEADER_SIZE, msg_param);
+ */
+}
+
+void msg_cc_assoc_cnf_send(const mac_address_t oda, const u8 result, const tei_t sta_tei, const u16 lease_time)
+{
+/* msg_mme_t *msg;
+ cc_assoc_cnf_t *cc_assoc_cnf;
+ msg_param_t msg_param;
+
+ msg = msg_sending_common_part(oda, &msg_param);
+ msg->mm_type = CC_ASSOC_CNF;
+ // set the message values ( 11.2.29 )
+ cc_assoc_cnf = (cc_assoc_cnf_t *) & msg->mm_entry;
+ cc_assoc_cnf->result = result;
+ cc_assoc_cnf->nid = station_get_nid();
+ cc_assoc_cnf->snid = station_get_snid();
+ cc_assoc_cnf->sta_tei = sta_tei;
+ cc_assoc_cnf->lease_time = lease_time;
+ // set the message parameters
+ msg_param.encryption = NOT_ENCRYPTED;
+ // and then, send the message
+ msg_send(msg, sizeof(cc_assoc_cnf_t) + MSG_MME_HEADER_SIZE, msg_param);
+*/
+}
+
+void
+msg_cc_set_tei_map_ind_send(const mac_address_t oda, const u8 mode, const tei_t tei, const bool recall)
+{/*
+ // 11.2.35
+ msg_mme_t *msg;
+ cc_set_tei_map_ind_t *cc_set_tei_map_ind;
+ msg_param_t msg_param;
+ u8 number_sta;
+ int i;
+ static tei_t m_tei;
+ tei_t next_tei;
+ station_t sta;
+
+ // TODO remove printf
+ //printf("msg_cc_set_tei_map_ind_send oda : %c%c%c%c%c%c, mode : %i\n", oda[0], oda[1], oda[2], oda[3], oda[4], oda[5], mode);
+ msg = msg_sending_common_part(oda, &msg_param);
+ msg->mm_type = CC_SET_TEI_MAP_IND;
+ // set the message values ( 11.2.35 )
+ cc_set_tei_map_ind = (cc_set_tei_map_ind_t *) & msg->mm_entry;
+ cc_set_tei_map_ind->mode = mode;
+ if(mode == 0)
+ {
+ msg_param.encryption = NOT_ENCRYPTED;
+ number_sta = station_get_number_of_assoc();
+ if( ! recall)
+ {
+ // first time that the function is called
+ if(number_sta < SET_TEI_MAP_SUB_NB_ELEM)
+ {
+ cc_set_tei_map_ind->num = number_sta;
+ }
+ else
+ {
+ msg->fmi.nf_mi = 1;
+ msg->fmi.fn_mi = 0;
+ msg->fmi.fmsn = msg_get_fmsn(true);
+ cc_set_tei_map_ind->num = SET_TEI_MAP_SUB_NB_ELEM;
+ }
+ }
+ else
+ {
+ cc_set_tei_map_ind->num = number_sta - SET_TEI_MAP_SUB_NB_ELEM;
+ msg->fmi.nf_mi = 1;
+ msg->fmi.fn_mi = 1;
+ msg->fmi.fmsn = msg_get_fmsn(false);
+ }
+ }
+ else // mode != 0
+ {
+ msg_param.encryption = HARDWARE_ENCRYPTED;
+ number_sta = 1;
+ cc_set_tei_map_ind->num = 1;
+ }
+ if( ! recall) m_tei = tei;
+ for(i=0 ; i<number_sta ; i++)
+ {
+ if( ( ! tei) && ( ! i ) && ( ! recall) )
+ next_tei = station_get_associate_info(&sta, true , 0);
+ else
+ next_tei = station_get_associate_info(&sta, false , m_tei);
+ memcpy(cc_set_tei_map_ind->sub[i].mac_address, sta.mac_address, sizeof(mac_address_t));
+ if(sta.station_status == STATION_ASSOCIATED)
+ cc_set_tei_map_ind->sub[i].status = 0x0;
+ else cc_set_tei_map_ind->sub[i].status = 0x1;
+ cc_set_tei_map_ind->sub[i].tei = m_tei;
+ m_tei = next_tei;
+ }
+ // set the message parameters
+ //msg_param.mnbf = 0;
+ // and then, send the message
+ msg_send(msg, MSG_MME_HEADER_SIZE + 2 + number_sta * sizeof(cc_set_tei_map_ind_sub_t), msg_param);
+*/
+}
+
diff --git a/cesar/cp/msg/src/msg_cm.c b/cesar/cp/msg/src/msg_cm.c
new file mode 100644
index 0000000000..3795fe2828
--- /dev/null
+++ b/cesar/cp/msg/src/msg_cm.c
@@ -0,0 +1,273 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/msg/msg_cm.c
+ * \brief
+ * \ingroup cp_msg
+ */
+
+#include "common/std.h"
+
+#include "cp/beacon/inc/bentry.h"
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/forward.h"
+#include "cp/beacon/inc/beacons_work.h"
+
+#include "cp/msg/inc/msg_cm.h"
+#include "lib/crc.h"
+
+
+static crc_t crc_m;
+static u32 *crc_table[256];
+
+void
+msg_cm_init(void)
+{
+ // init the CRC context (CRC used in cm_encrypted_payload)
+ crc_m.width = 32;
+ crc_m.generator = 0x4C11DB7; //4.2.1
+ crc_m.init = 0xFFFFFFFF;
+ crc_m.refin = true;
+ crc_m.refout = true;
+ crc_m.xorout = 0xFFFFFFFF;
+ crc_m.table.t32 = (u32 *) crc_table;
+ crc_m.reg_init = 0;
+ crc_init(&crc_m);
+}
+
+void
+msg_cm_unassociated_sta_ind_send(const mac_address_t oda)
+{
+ // 11.5.1
+ msg_mme_t *msg_p, *msg_to_send;
+ cm_unassociated_sta_t *unassociated_sta_p;
+ msg_param_t msg_param;
+ u8 buffer[1518];
+
+ msg_p = msg_sending_common_part((msg_mme_t *)buffer, oda, &msg_param);
+ msg_p->mm_type = CM_UNASSOCIATED_STA_IND;
+ // set the message values
+ unassociated_sta_p = (cm_unassociated_sta_t *) & msg_p->mm_entry;
+ unassociated_sta_p->nid = cp_station_get_nid(NULL); //TODO : pass CP ctx as first argument instead of NULL pointer...
+ unassociated_sta_p->cco_capability = cp_station_get_cco_capa();
+ // set the mnbf flag
+ msg_param.mnbf = 1;
+ msg_param.encryption = NOT_ENCRYPTED;
+ // and finaly, send the message
+ printf(" send cm_unassociated_sta\n");
+ msg_to_send = interf_give_buf ();
+ dbg_assert ( !msg_check_wrong_mme_const_values (msg_to_send));
+ //msg_cm_unassociated_sta_ind_convert((u8 *)msg_to_send, msg_p, BITSTREAM_WRITE);
+ msg_send(msg_p, sizeof(cm_unassociated_sta_t) + MSG_MME_HEADER_SIZE, msg_param);
+}
+
+// set the following flag to 1 if you want to
+// test the message as on page 681
+#define TEST_681 0
+
+void
+msg_cm_encrypted_payload_ind_send(
+ const msg_mme_t *encapsulated_msg_p,
+ const msg_param_t encapsulated_msg_param,
+ const tei_t tei,
+ const bool last_msg_of_p_run,
+ const cp_pid_t pid,
+ const u16 msg_size
+ )
+{
+ // 11.5.2
+ msg_mme_t *msg_p;
+ cm_encrypted_payload_t *cm_encrypted_payload_p;
+ cm_encrypted_payload_sub_t *cm_encrypted_payload_sub_p;
+ msg_param_t msg_param;
+ cp_station_status_t station_status;
+ protocol_run_t pr_run;
+ u8 rf, i, pad_size;
+ aes_key_t *aes_key_p;
+ aes_context ctx;
+ u16 total_msg_size = msg_size + sizeof(cm_encrypted_payload_t) - COUNT(cm_encrypted_payload_p->rf) + 9;
+ u8 buffer[1518], data_to_encrypt[1518];
+ int *int_p;
+ u8 iv[16];
+
+ dbg_assert ( !msg_check_wrong_mme_const_values (encapsulated_msg_p));
+ dbg_assert(tei != 0 && tei != 0xFF);
+ dbg_assert(pid <= HLE_PRO);
+ dbg_assert(msg_size < (sizeof(msg_mme_t) - sizeof(cm_encrypted_payload_t) - sizeof(cm_encrypted_payload_sub_t)));
+
+
+ msg_p = msg_sending_common_part((msg_mme_t *)buffer, encapsulated_msg_p->oda, &msg_param);
+ msg_p->mm_type = CM_ENCRYPTED_PAYLOAD_IND;
+ // set the message values
+ cm_encrypted_payload_p = (cm_encrypted_payload_t *) & msg_p->mm_entry;
+ // set the message values...
+ cm_encrypted_payload_p->peks = encapsulated_msg_param.peks;
+ // set the avln status of the station
+ station_status = cp_station_get_status();
+ #if TEST_681
+ station_status = 5;
+ #endif
+ if(station_status == STATION_UNASSOCIATED)
+ {
+ cm_encrypted_payload_p->avln_status = cp_station_get_cco_capa();
+ }
+ else
+ {
+ if(cp_station_get_is_cco())
+ {
+ cm_encrypted_payload_p->avln_status = 0x08;
+ }
+ else
+ {
+ // the station is assosciated
+ cm_encrypted_payload_p->avln_status = 0x04;
+ if(cp_station_get_pcco_capa()) cm_encrypted_payload_p->avln_status = 0x05;
+ }
+ }
+ // set the protocol run parameters
+ if(secu_gen_protocol_run_param(tei, last_msg_of_p_run, &pr_run) == PRN_NotInitialised)
+ {
+ secu_start_new_protocol_run(tei, pid, &pr_run);
+ secu_gen_protocol_run_param(tei, last_msg_of_p_run, &pr_run);
+ #if TEST_681
+ pr_run.pmn = 3;
+ pr_run.prn = 0x372D;
+ #endif
+ }
+ cm_encrypted_payload_p->pid = pr_run.pid;
+ cm_encrypted_payload_p->prn = pr_run.prn;
+ cm_encrypted_payload_p->pmn = pr_run.pmn;
+ cm_encrypted_payload_p->len = msg_size;
+ if(pid == HLE_PRO) // case PID == 0x4
+ {
+ // calculate the UUID field as specified in rfc4122 chap 4.4
+ int_p = (int *)cm_encrypted_payload_p->iv;
+ for(i=0 ; i<4 ; i++)
+ {
+ *int_p = rand_in(0, 0);
+ int_p++;
+ }
+ cm_encrypted_payload_p->iv[8] &= 0xBF;
+ cm_encrypted_payload_p->iv[8] |= 0x80;
+ cm_encrypted_payload_p->iv[6] = 0x4;
+ cm_encrypted_payload_p->iv[7] = 0x0;
+ // case PID == 0x4 implies no random filer
+ rf = 0;
+ memcpy(cm_encrypted_payload_p->rf, encapsulated_msg_p, msg_size);
+ }
+ else
+ {
+ // set the IV field (16 random bytes)
+ int_p = (int *) iv;
+ for(i=0 ; i<4 ; i++)
+ {
+ *int_p = rand_in(0, 0);
+ int_p++;
+ }
+ #if TEST_681
+ memcpy(iv, "\xFE\xDC\xBA\x98\x76\x54\x32\x10\xFE\xDC\xBA\x98\x76\x54\x32\x10", 16);
+ #endif
+ memcpy(cm_encrypted_payload_p->iv, iv, 16);
+ // calculate the rf filler size
+ rf = rand_in(0, COUNT(cm_encrypted_payload_p->rf));
+ // fill the rf field with random data
+ for(i=0 ; i<rf ; i++)
+ data_to_encrypt[i] = (u8) rand_in(0, 0xFF);
+ #if TEST_681
+ rf = 5;
+ data_to_encrypt[0] = 0x24;
+ data_to_encrypt[1] = 0x68;
+ data_to_encrypt[2] = 0xac;
+ data_to_encrypt[3] = 0xe0;
+ data_to_encrypt[4] = 0x35;
+ #endif
+ memcpy(&data_to_encrypt[rf], encapsulated_msg_p, msg_size);
+ cm_encrypted_payload_sub_p = (cm_encrypted_payload_sub_t *) &data_to_encrypt[i+msg_size];
+ // calculate CRC of the encapsulated mme
+ cm_encrypted_payload_sub_p->crc = crc_compute_block(&crc_m, (u8 *)encapsulated_msg_p, msg_size);
+ cm_encrypted_payload_sub_p->pid = pid;
+ cm_encrypted_payload_sub_p->prn = pr_run.prn;
+ cm_encrypted_payload_sub_p->pmn = pr_run.pmn;
+ pad_size = 16 - (msg_size + rf + 9) % 16;
+ for(i=0 ; i < pad_size ; i++)
+ cm_encrypted_payload_sub_p->padding[i] = (u8) rand_in(0, 0xFF);
+ #if TEST_681
+ cm_encrypted_payload_sub_p->padding[0] = 0xac ;
+ cm_encrypted_payload_sub_p->padding[1] = 0xbc ;
+ cm_encrypted_payload_sub_p->padding[2] = 0xd2 ;
+ cm_encrypted_payload_sub_p->padding[3] = 0x11 ;
+ cm_encrypted_payload_sub_p->padding[4] = 0x4d ;
+ cm_encrypted_payload_sub_p->padding[5] = 0xae ;
+ cm_encrypted_payload_sub_p->padding[6] = 0x15 ;
+ cm_encrypted_payload_sub_p->padding[7] = 0x77 ;
+ cm_encrypted_payload_sub_p->padding[8] = 0xc6 ;
+ #endif
+ cm_encrypted_payload_sub_p->padding[i] = rf;
+ aes_key_p = secu_get_ek_from_peks(encapsulated_msg_param.peks, tei);
+ aes_set_key(&ctx, (u8 *) aes_key_p, sizeof(aes_key_t)*8);
+ aes_cbc_encrypt (&ctx, iv, data_to_encrypt, cm_encrypted_payload_p->rf+rf, rf+msg_size+pad_size+9);
+ total_msg_size += rf + pad_size;
+ }
+ // set the mnbf flag
+ msg_param.encryption = NOT_ENCRYPTED;
+ // and finaly, send the message
+ msg_send(msg_p, total_msg_size, msg_param);
+
+}
+
+
+/*
+void
+msg_cm_conn_new_req_send(msg_cm_conn_new_req_t msg)
+{
+ // msg_mme_t *msg;
+ // cm_conn_new_req_t
+}
+
+void
+msg_cm_conn_new_cnf_send()
+{
+
+}
+
+void
+msg_cm_conn_rel_ind_send()
+{
+
+}
+
+void
+msg_cm_conn_rel_rsp_send()
+{
+
+}
+
+void
+msg_cm_conn_mod_req_send()
+{
+
+}
+
+void
+msg_cm_conn_mod_cnf_send()
+{
+
+}
+
+void
+msg_cm_conn_info_req_send()
+{
+
+}
+
+void
+msg_cm_conn_info_cnf_send()
+{
+
+}
+*/
diff --git a/cesar/cp/msg/src/msg_cm_convert.c b/cesar/cp/msg/src/msg_cm_convert.c
new file mode 100644
index 0000000000..b009db35f5
--- /dev/null
+++ b/cesar/cp/msg/src/msg_cm_convert.c
@@ -0,0 +1,65 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/msg/msg_cm.c
+ * \brief
+ * \ingroup cp_msg
+ */
+
+#include "common/std.h"
+
+#include "cp/beacon/inc/bentry.h"
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/forward.h"
+#include "cp/beacon/inc/beacons_work.h"
+
+#include "cp/msg/inc/msg_cm_convert.h"
+
+void
+msg_mme_header_convert(u8 *buffer, msg_mme_t *msg, bitstream_type_t b_type, bitstream_t ctx)
+{/*
+ dbg_assert(buffer);
+ dbg_assert(msg);
+ u8 tmp;
+
+ bitstream_access(&ctx, &msg->oda, 48);
+ bitstream_access(&ctx, &msg->osa, 48);
+ //bitstream_access(&ctx, &msg->v_lan_tag, 32);
+ bitstream_access(&ctx, &msg->m_type, 16);
+ bitstream_access(&ctx, &msg->mmv, 8);
+ bitstream_access(&ctx, &msg->mm_type, 16);
+ tmp = msg->fmi.nf_mi;
+ bitstream_access(&ctx, &tmp, 4);
+ if(b_type == BITSTREAM_READ) msg->fmi.nf_mi = tmp;
+ tmp = msg->fmi.fn_mi;
+ bitstream_access(&ctx, &tmp, 4);
+ if(b_type == BITSTREAM_READ) msg->fmi.fn_mi = tmp;
+ bitstream_access(&ctx, &msg->fmi.fmsn, 8);
+*/
+}
+
+void
+msg_cm_unassociated_sta_ind_convert(u8 *buffer, msg_mme_t *msg, bitstream_type_t read)
+{// 11.5.1
+
+ bitstream_t ctx;
+ cm_unassociated_sta_t *entry_p;
+
+ dbg_assert(buffer);
+ dbg_assert(msg);
+
+ bitstream_init(&ctx, buffer, 1518, read);
+
+ msg_mme_header_convert(buffer, msg, read, ctx);
+ entry_p = ( cm_unassociated_sta_t *) msg->mm_entry;
+ bitstream_access(&ctx, &entry_p->nid, 2); // this is just to read the 2 non significant bits
+ bitstream_access(&ctx, &entry_p->nid, 54);
+ bitstream_access(&ctx, &entry_p->cco_capability, 1);
+
+ bitstream_finalise(&ctx); // don't forget it to write the last word
+}
diff --git a/cesar/cp/msg/src/msg_drv.c b/cesar/cp/msg/src/msg_drv.c
new file mode 100644
index 0000000000..60533040a5
--- /dev/null
+++ b/cesar/cp/msg/src/msg_drv.c
@@ -0,0 +1,497 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/msg/src/msg_drv.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include <stdio.h>
+#include <string.h>
+#include "common/std.h"
+#include "lib/bitstream.h"
+#include "cp/secu/inc/secu_types.h"
+#include "cp/msg/inc/msg_const.h"
+#include "cp/msg/inc/msg_drv.h"
+
+const char *cst_str_drv_mme_cnf_result[] = {
+ "FAILURE",
+ "SUCCESS"
+};
+
+const char *cst_str_drv_mme_cnf_errcode[] = {
+ "BAD PARAMETER",
+ "UNKNOWN ID",
+ "INVALID VALUE"
+};
+
+const char *cst_str_yes_no[] = {
+ "no",
+ "yes"
+};
+
+
+/**
+ * \brief Get DRV-MME .CNF message result string
+ *
+ * \param cnf_result the result code
+ * \return the result code string constant
+ */
+char *
+get_str_drv_mme_cnf_result(int cnf_result)
+{
+ return (char*)cst_str_drv_mme_cnf_result[cnf_result];
+}
+
+/**
+ * \brief Get DRV-MME .CNF message error code string
+ *
+ * \param cnf_errcode the error code
+ * \return the error code string constant
+ */
+char *
+get_str_drv_mme_cnf_errcode(int cnf_errcode)
+{
+ return (char*)cst_str_drv_mme_cnf_errcode[cnf_errcode];
+}
+
+/**
+ * \brief Get yes/no string.
+ *
+ * \param no_yes the index of yes/no string array
+ * \return the yes or no string constant
+ */
+char *
+get_str_yes_no(int no_yes)
+{
+ return (char*)cst_str_yes_no[no_yes];
+}
+
+/**
+ * \brief Verify a password or HFID string validity.
+ *
+ * \param str the HFID string to be verified
+ * \param minlen the minimal length
+ * \param maxlen the maximal length
+ * \return true or false depending on validity ok or not
+ */
+bool
+check_password_or_hfid_is_valid(char *str, int minlen,int maxlen)
+{
+ int i;
+
+ if (((int)strlen(str) < minlen) || ((int)strlen(str) > maxlen)) return false;
+
+ for (i = 0; i < (int)strlen(str); i++)
+ {
+ if (((u8)str[i] < MIN_PWD_ASCII_CHAR) || ((u8)str[i] > MAX_PWD_ASCII_CHAR))
+ {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/**
+ * \brief little endian to CPU host endian conversion.
+ *
+ * \param addrval pointer to the value to be (re)formatted from little endian to CPU host endian
+ * \param bytesizeval the size in bytes of the value
+ */
+void
+little_to_cpuhost_endian(u8 *addrval, int bytesizeval)
+{
+ u8 c;
+ int i;
+ union {
+ u32 u32;
+ u8 b[4];
+ } cpuarch;
+
+ cpuarch.u32 = 1;
+ if (cpuarch.b[0] != 1)
+ {
+ //printf("BIG-ENDIAN CPU...\n");
+ for (i = 0; i < (bytesizeval / 2); i++)
+ {
+ c = addrval[i];
+ addrval[i] = addrval[bytesizeval-1-i];
+ //printf("[%d] <- 0x%02X ; [%d] <- 0x%02X\n",i,addrval[bytesizeval-1-i],bytesizeval-1-i,c);
+ addrval[bytesizeval-1-i] = c;
+ }
+ }
+}
+
+/**
+ * \brief big endian to CPU host endian conversion.
+ *
+ * \param addrval pointer to the value to be (re)formatted from big endian to CPU host endian
+ * \param bytesizeval the size in bytes of the value
+ */
+void
+big_to_cpuhost_endian(u8 *addrval, int bytesizeval)
+{
+ u8 c;
+ int i;
+ union {
+ u32 u32;
+ u8 b[4];
+ } cpuarch;
+
+ cpuarch.u32 = 1;
+ if (cpuarch.b[0] == 1)
+ {
+ //printf("LITTLE-ENDIAN CPU...\n");
+ for (i = 0; i < (bytesizeval / 2); i++)
+ {
+ c = addrval[i];
+ addrval[i] = addrval[bytesizeval-1-i];
+ //printf("[%d] <- 0x%02X ; [%d] <- 0x%02X\n",i,addrval[bytesizeval-1-i],bytesizeval-1-i,c);
+ addrval[bytesizeval-1-i] = c;
+ }
+ }
+}
+
+/**
+ * \brief CPU host endian to little endian conversion.
+ *
+ * \param addrval pointer to the value to be (re)formatted from CPU host endian to little endian
+ * \param bytesizeval the size in bytes of the value
+ */
+void
+cpuhost_to_little_endian(u8 *addrval, int bytesizeval)
+{
+ u8 c;
+ int i;
+ union {
+ u32 u32;
+ u8 b[4];
+ } cpuarch;
+
+ cpuarch.u32 = 1;
+ if (cpuarch.b[0] != 1)
+ {
+ //printf("BIG-ENDIAN CPU...\n");
+ for (i = 0; i < (bytesizeval / 2); i++)
+ {
+ c = addrval[i];
+ addrval[i] = addrval[bytesizeval-1-i];
+ //printf("[%d] <- 0x%02X ; [%d] <- 0x%02X\n",i,addrval[bytesizeval-1-i],bytesizeval-1-i,c);
+ addrval[bytesizeval-1-i] = c;
+ }
+ }
+}
+
+/**
+ * \brief CPU host endian to big endian conversion.
+ *
+ * \param addrval pointer to the value to be (re)formatted from CPU host endian to big endian
+ * \param bytesizeval the size in bytes of the value
+ */
+void
+cpuhost_to_big_endian(u8 *addrval, int bytesizeval)
+{
+ u8 c;
+ int i;
+ union {
+ u32 u32;
+ u8 b[4];
+ } cpuarch;
+
+ cpuarch.u32 = 1;
+ if (cpuarch.b[0] == 1)
+ {
+ //printf("LITTLE-ENDIAN CPU...\n");
+ for (i = 0; i < (bytesizeval / 2); i++)
+ {
+ c = addrval[i];
+ addrval[i] = addrval[bytesizeval-1-i];
+ //printf("[%d] <- 0x%02X ; [%d] <- 0x%02X\n",i,addrval[bytesizeval-1-i],bytesizeval-1-i,c);
+ addrval[bytesizeval-1-i] = c;
+ }
+ }
+}
+
+u16
+big_to_cpuhost_endian_u16(u16 val)
+{
+ u16 ret = val;
+ big_to_cpuhost_endian((u8 *)&ret, sizeof(ret));
+ return ret;
+}
+
+u32
+big_to_cpuhost_endian_u32(u32 val)
+{
+ u32 ret = val;
+ big_to_cpuhost_endian((u8 *)&ret, sizeof(ret));
+ return ret;
+}
+
+u16
+cpuhost_to_big_endian_u16(u16 val)
+{
+ u16 ret = val;
+ cpuhost_to_big_endian((u8 *)&ret, sizeof(ret));
+ return ret;
+}
+
+u32
+cpuhost_to_big_endian_u32(u32 val)
+{
+ u32 ret = val;
+ cpuhost_to_big_endian((u8 *)&ret, sizeof(ret));
+ return ret;
+}
+
+void display_mme_header(mme_header_type *mme_header)
+{
+ printf ("%u /*\t0x%08x : osa ........ 0x%012llX => @MAC %02x:%02x:%02x:%02x:%02x:%02x\n",
+ cyg_hal_sys_getpid(),
+ (unsigned int)&mme_header->un_osa,
+ mme_header->un_osa.u64,
+ (u8)((mme_header->un_osa.u64 & 0xFF0000000000ULL) >> 40),
+ (u8)((mme_header->un_osa.u64 & 0x00FF00000000ULL) >> 32),
+ (u8)((mme_header->un_osa.u64 & 0x0000FF000000ULL) >> 24),
+ (u8)((mme_header->un_osa.u64 & 0x000000FF0000ULL) >> 16),
+ (u8)((mme_header->un_osa.u64 & 0x00000000FF00ULL) >> 8),
+ (u8) (mme_header->un_osa.u64 & 0x0000000000FFULL)
+ );
+ printf ("%u /*\t0x%08x : oda ........ 0x%012llX => @MAC %02x:%02x:%02x:%02x:%02x:%02x\n",
+ cyg_hal_sys_getpid(),
+ (unsigned int)&mme_header->un_oda,
+ mme_header->un_oda.u64,
+ (u8)((mme_header->un_oda.u64 & 0xFF0000000000ULL) >> 40),
+ (u8)((mme_header->un_oda.u64 & 0x00FF00000000ULL) >> 32),
+ (u8)((mme_header->un_oda.u64 & 0x0000FF000000ULL) >> 24),
+ (u8)((mme_header->un_oda.u64 & 0x000000FF0000ULL) >> 16),
+ (u8)((mme_header->un_oda.u64 & 0x00000000FF00ULL) >> 8),
+ (u8) (mme_header->un_oda.u64 & 0x0000000000FFULL)
+ );
+ if (mme_header->vlan_tag_flag == true)
+ {
+ printf
+ ("%u /*\t0x%08x : vlan_tag ... 0x%04X 0x%04X",
+ cyg_hal_sys_getpid(),
+ (unsigned int)&mme_header->un_vlan_tag,
+ (u16)(mme_header->un_vlan_tag.u32 >> 16),
+ (u16)(mme_header->un_vlan_tag.u32 & 0x0000FFFF));
+ if ((u16)(mme_header->un_vlan_tag.u32 >> 16) == MSG_VLAN_TAG_IEEE_802_1Q)
+ printf(" => IEEE 802.1Q VLAN Tag\n");
+ else
+ printf(" => UNKNOWN/UNEXPECTED !?\n");
+ }
+ printf ("%u /*\t0x%08x : mtype ...... 0x%04lX",
+ cyg_hal_sys_getpid(),
+ (unsigned int)&mme_header->un_mtype,
+ mme_header->un_mtype.u32);
+ if (mme_header->un_mtype.u32 == MSG_MTYPE_IEEE_ETHERTYPE)
+ printf(" => IEEE ETHERTYPE\n");
+ else
+ printf(" => UNKNOWN/UNEXPECTED !?\n");
+ printf ("%u /*\t0x%08x : mmv ........ 0x%02lX (%lu) => HomePlug AV 1.%lu specification\n",
+ cyg_hal_sys_getpid(),
+ (unsigned int)&mme_header->un_mmv,
+ mme_header->un_mmv.u32,mme_header->un_mmv.u32,
+ mme_header->un_mmv.u32);
+ printf ("%u /*\t0x%08x : mmtype ..... 0x%04lX",
+ cyg_hal_sys_getpid(),
+ (unsigned int)&mme_header->un_mmtype,
+ mme_header->un_mmtype.u32);
+
+ switch(mme_header->un_mmtype.u32)
+ {
+ case DRV_STA_SET_MAC_ADDR_REQ :
+ case DRV_STA_SET_CCO_PREF_REQ :
+ case DRV_STA_SET_WAS_CCO_REQ :
+ case DRV_STA_SET_NPW_REQ :
+ case DRV_STA_SET_DPW_REQ :
+ case DRV_STA_SET_SL_REQ :
+ case DRV_STA_SET_M_STA_HFID_REQ :
+ case DRV_STA_SET_U_STA_HFID_REQ :
+ case DRV_STA_SET_AVLN_HFID_REQ :
+ case DRV_STA_SET_TONEMASK_REQ :
+ case DRV_STA_START_REQ :
+ case DRV_STA_STOP_REQ :
+ printf(" => %s\n",get_str_drv_mme_req((mme_header->un_mmtype.u32-DRV_STA_SET_MAC_ADDR_REQ)/4));
+ break;
+ case DRV_STA_SET_MAC_ADDR_CNF :
+ case DRV_STA_SET_CCO_PREF_CNF :
+ case DRV_STA_SET_WAS_CCO_CNF :
+ case DRV_STA_SET_NPW_CNF :
+ case DRV_STA_SET_DPW_CNF :
+ case DRV_STA_SET_SL_CNF :
+ case DRV_STA_SET_M_STA_HFID_CNF :
+ case DRV_STA_SET_U_STA_HFID_CNF :
+ case DRV_STA_SET_AVLN_HFID_CNF :
+ case DRV_STA_SET_TONEMASK_CNF :
+ case DRV_STA_START_CNF :
+ case DRV_STA_STOP_CNF :
+ printf(" => %s\n",get_str_drv_mme_cnf((mme_header->un_mmtype.u32-DRV_STA_SET_MAC_ADDR_CNF)/4));
+ break;
+ default :
+ printf("\n");
+ break;
+ }
+ printf ("%u /*\t0x%08x : fmi ........ 0x%04lX => MMENTRY fragment %lu/%lu, FNSM = 0x%02lX (%lu)\n",
+ cyg_hal_sys_getpid(),
+ (unsigned int)&mme_header->un_fmi,
+ mme_header->un_fmi.u32,
+ ((mme_header->un_fmi.u32 & 0xF000) >> 12)+1,
+ ((mme_header->un_fmi.u32 & 0xF00) >> 8)+1,
+ mme_header->un_fmi.u32 & 0xFF,
+ mme_header->un_fmi.u32 & 0xFF);
+}
+
+/**
+ * \brief Build a "MME.CNF" confirmation message.
+ *
+ * \param recv_mme_header the buffer to contain the MME.CNF message being built
+ * \param send_mme the buffer containing the MME initially received for which we're building a CNF
+ * \param cnf_result the result code of the MME.CNF message to be built
+ * \param cnf_errcode the error code of the MME.CNF message to be built
+ * \param cnf_len the returned length of the MME.CNF message being built
+ *
+ */
+void
+cp_mme_build_cnf (mme_header_type *recv_mme_header, mme_drv_cnf_type *send_mme, e_drv_mme_cnf_result cnf_result, e_drv_mme_cnf_errcode cnf_errcode, uint *cnf_len, u8 *mme_tx_buffer, int *mme_buffer_first)
+{
+ bitstream_t bstr_ctx;
+ uint pld_maxlen;
+ uint i, j;
+
+ printf ("%u %s() : mme_tx_buffer = 0x%08lx\n",cyg_hal_sys_getpid(),__FUNCTION__,(unsigned long)mme_tx_buffer);
+
+ /* Prepare CNF message to be sent back to OSA */
+ send_mme->header = *recv_mme_header;
+ send_mme->header.un_osa.u64 = recv_mme_header->un_oda.u64;
+ send_mme->header.un_oda.u64 = recv_mme_header->un_osa.u64;
+ send_mme->header.un_mmtype.u32 |= CNF;
+
+ /* TODO : don't reset the VLAN tag field, keep the one of the incoming message header... */
+ send_mme->header.un_vlan_tag.u32 = 0x00000000;
+
+ /* TODO : fill & format the FMI field... */
+ send_mme->header.un_fmi.u32 = 0x00000000;
+
+ printf ("%u /* MME HEADER :\n",cyg_hal_sys_getpid());
+ display_mme_header(&send_mme->header);
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+
+ switch(send_mme->header.un_mmtype.u32)
+ {
+ case DRV_STA_SET_MAC_ADDR_CNF :
+ case DRV_STA_SET_CCO_PREF_CNF :
+ case DRV_STA_SET_WAS_CCO_CNF :
+ case DRV_STA_SET_NPW_CNF :
+ case DRV_STA_SET_DPW_CNF :
+ case DRV_STA_SET_SL_CNF :
+ case DRV_STA_SET_M_STA_HFID_CNF :
+ case DRV_STA_SET_U_STA_HFID_CNF :
+ case DRV_STA_SET_AVLN_HFID_CNF :
+ case DRV_STA_SET_TONEMASK_CNF :
+ case DRV_STA_START_CNF :
+ case DRV_STA_STOP_CNF :
+ pld_maxlen = 2;
+ break;
+ default :
+ pld_maxlen = 0; /* TO DO : what length ? */
+ break;
+ }
+
+ printf ("%u /* MME PAYLOAD :\n",cyg_hal_sys_getpid());
+ switch(send_mme->header.un_mmtype.u32)
+ {
+ case DRV_STA_SET_MAC_ADDR_CNF :
+ case DRV_STA_SET_CCO_PREF_CNF :
+ case DRV_STA_SET_WAS_CCO_CNF :
+ case DRV_STA_SET_NPW_CNF :
+ case DRV_STA_SET_DPW_CNF :
+ case DRV_STA_SET_SL_CNF :
+ case DRV_STA_SET_M_STA_HFID_CNF :
+ case DRV_STA_SET_U_STA_HFID_CNF :
+ case DRV_STA_SET_AVLN_HFID_CNF :
+ case DRV_STA_SET_TONEMASK_CNF :
+ case DRV_STA_START_CNF :
+ case DRV_STA_STOP_CNF :
+ send_mme->result = cnf_result;
+ send_mme->errcode = cnf_errcode;
+ printf ("%u /*\t0x%08x : result ..... 0x%02X (%u) => %s\n",cyg_hal_sys_getpid(),(unsigned int)&send_mme->result,
+ send_mme->result,send_mme->result,get_str_drv_mme_cnf_result(send_mme->result));
+ printf ("%u /*\t0x%08x : errcode .... 0x%02X (%u)",cyg_hal_sys_getpid(),(unsigned int)&send_mme->errcode,
+ send_mme->errcode,send_mme->errcode);
+ if (send_mme->result != E_DRVMME_RESULT_SUCCESS)
+ printf (" => %s\n",get_str_drv_mme_cnf_errcode(send_mme->errcode));
+ else
+ printf ("\n");
+ break;
+ default :
+ printf("\n");
+ break;
+ }
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+
+ /* re-convert needed fields to big-endian... */
+ cpuhost_to_big_endian(&send_mme->header.un_osa.b[0],MAC_ADDR_SIZE);
+ cpuhost_to_big_endian(&send_mme->header.un_oda.b[0],MAC_ADDR_SIZE);
+ cpuhost_to_big_endian(&send_mme->header.un_vlan_tag.b[0],4);
+ cpuhost_to_big_endian(&send_mme->header.un_mtype.b[0],2);
+
+ /*
+ * take into account right mme header len depending on VLAN Tag field
+ * was present in incoming message or not (reply message header conforms
+ * to incoming message header)
+ */
+ if (!send_mme->header.vlan_tag_flag)
+ {
+ *cnf_len = (uint)MAX(60,MME_HEADER_MINSIZE+(int)pld_maxlen);
+ }
+ else
+ {
+ *cnf_len = (uint)MAX(60,MME_HEADER_MAXSIZE+(int)pld_maxlen);
+ }
+ memset(mme_tx_buffer,0x00,*cnf_len);
+
+#if 1
+ bitstream_init(&bstr_ctx,mme_tx_buffer,*cnf_len,BITSTREAM_WRITE);
+ bitstream_access(&bstr_ctx,&send_mme->header.un_osa.u64,48);
+ bitstream_access(&bstr_ctx,&send_mme->header.un_oda.u64,48);
+ if (send_mme->header.vlan_tag_flag) bitstream_access(&bstr_ctx,&send_mme->header.un_vlan_tag.u32,32);
+ bitstream_access(&bstr_ctx,&send_mme->header.un_mtype.u32,16);
+ bitstream_access(&bstr_ctx,&send_mme->header.un_mmv.u32,8);
+ bitstream_access(&bstr_ctx,&send_mme->header.un_mmtype.u32,16);
+ bitstream_access(&bstr_ctx,&send_mme->header.un_fmi.u32,16);
+ bitstream_access(&bstr_ctx,&send_mme->result,8);
+ bitstream_access(&bstr_ctx,&send_mme->errcode,8);
+ bitstream_finalise(&bstr_ctx);
+#endif
+
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* STA : %d CP : SENDING AN MME (len = %u bytes)...\n",
+ cyg_hal_sys_getpid(),
+ 0/*cp_sta_global.mac_config->tei*/,
+ *cnf_len);
+#if 1
+ j = 0;
+ printf("%u /* ",cyg_hal_sys_getpid());
+ for (i = 0; i < (uint)(*cnf_len / 16); i++)
+ {
+ for (j = 0; j < 16; j++) printf ("%02x.",mme_tx_buffer[(i*16)+j]);
+ printf("\n");
+ printf("%u /* ",cyg_hal_sys_getpid());
+ }
+ for (i = 0; i < (*cnf_len % 16); i++)
+ {
+ printf ("%02x.",mme_tx_buffer[(j*16)+i]);
+ }
+ printf("\n");
+#endif
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+}
diff --git a/cesar/cp/msg/test/ecos.ecc.sh b/cesar/cp/msg/test/ecos.ecc.sh
new file mode 100644
index 0000000000..8253d98c9a
--- /dev/null
+++ b/cesar/cp/msg/test/ecos.ecc.sh
@@ -0,0 +1,5 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new linux default
+cat >> $config <<EOF
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/cp/msg/test/inc/test_conn.h b/cesar/cp/msg/test/inc/test_conn.h
new file mode 100644
index 0000000000..d7fe99fac9
--- /dev/null
+++ b/cesar/cp/msg/test/inc/test_conn.h
@@ -0,0 +1,34 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file test_conn.h
+ * \brief File Description
+ * \ingroup cp/conn
+ *
+ */
+
+
+
+#ifndef TEST_H_
+#define TEST_H_
+
+#include <stdio.h>
+#include "lib/test.h"
+
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_arch.h>
+
+
+// Function declaration
+void test_msg_field(test_t t);
+void test_msg_cm_conn_new_req(test_t t);
+void test_msg_cm_conn_new_cnf(test_t t);
+void test_msg_cm_conn_rel_ind(test_t t);
+void test_msg_cm_conn_rel_rsp(test_t t);
+void test_msg_cm_conn_mod_cnf(test_t t);
+void test_msg_cm_conn_mod_req(test_t t);
+#endif /*TEST_H_*/
diff --git a/cesar/cp/msg/test/src/test_msg_cm_conn.c b/cesar/cp/msg/test/src/test_msg_cm_conn.c
new file mode 100644
index 0000000000..3d5b9e3a78
--- /dev/null
+++ b/cesar/cp/msg/test/src/test_msg_cm_conn.c
@@ -0,0 +1,29 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file test_msg_cm_conn.c
+ * \brief File Description
+ * \ingroup cp/msg
+ *
+ */
+
+#include "common/std.h"
+
+
+
+
+
+void test_msg_cm_conn(test_t t)
+{
+ dbg_assert(t);
+
+ test_suite_begin (t, "TEST MESSAGE CM_CONN");
+
+ //TODO to complete
+
+
+}
diff --git a/cesar/cp/msg/test/src/test_msg_cm_conn_mod_cnf.c b/cesar/cp/msg/test/src/test_msg_cm_conn_mod_cnf.c
new file mode 100644
index 0000000000..60c0fcfad1
--- /dev/null
+++ b/cesar/cp/msg/test/src/test_msg_cm_conn_mod_cnf.c
@@ -0,0 +1,801 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file test_msg_cm_conn_mod_cnf.c
+ * \brief File Description
+ * \ingroup cp/msg
+ *
+ */
+
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm.h"
+
+
+msg_mme_t msg_cm_conn_mod_cnf_1 =
+{
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // ODA
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // OSA
+ 0, // vlan tag
+ 0x88E1,
+ 0, // mmv
+ CM_CONN_MOD_CNF,
+ {0,0,0},
+ {
+ 0x53, // CID
+ 0x25, // CID
+ 0x00 // result (=success)
+ }
+};
+
+msg_mme_t msg_cm_conn_mod_cnf_2 =
+{
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // ODA
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // OSA
+ 0, // vlan tag
+ 0x88E1,
+ 0, // mmv
+ CM_CONN_MOD_CNF,
+ {0,0,0},
+ {
+ 0x53, // CID
+ 0x25, // CID
+ 0x01, // result (=failure)
+ 0x01, // CSPEC Length :338 bytes
+ 0x54, // CSPEC Length :
+ CINFO_VALID, // CINFO Valid? CINFO Forward
+ MAC_CONTENTION, // Mac Service Type
+ USER_PRIORITY_CAP0, // User Priori ty
+ ATS_FOR_HLE, // Arrival Time Stamp
+ SMOOTHING_REQUESTED, // Smoothing
+ CINFO_VALID, // CINFO Valid? CINFO Reverse
+ MAC_CONTENTION, // Mac Service Type
+ USER_PRIORITY_CAP0, // User Priority
+ ATS_FOR_HLE, // Arrival Time Stamp
+ SMOOTHING_REQUESTED, // Smoothing
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x00, // FID: Delay bound
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x01, // FID: Jitter bound
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x02, // FID: Average MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x03, // FID: Maximum MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x04, // FID: Average Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x05, // FID: Minimum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x06, // FID: Maximum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x07, // FID: Maximum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x08, // FID: Minimum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x09, // FID: Maximum Burst Size
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x0A, // FID: Exception Policy
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x0B, // FID: inactivity_interval
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x0C, // FID: MSDU Error Rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x0D, // FID: CLST
+ 0x00, // QMP BODY
+ QMP_FORWARD,
+ 0x0E, // QMP body length
+ 0x0E, // FID: CDESC
+ 0x00, // IP Version 4
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x0F, // source port
+ 0xF1, // source port
+ 0x01, // Dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0xFF, // dest port
+ 0xF1, // dest port
+ 0x00, // ip proto type
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x10, // FID: ATS Tolerance
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x11, // FID: Smallest tolerable Average data rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x12, // FID: Original Average data rate
+ 0x00, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x13, // FID: rx_window_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x03, // QMP body length
+ 0x14, // FID: smoothing_buffer_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x15, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x80, // FID: TXOPs per Beacon Period
+ 0x15, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x81, // FID: Average Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x82, // FID: Minimum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x83, // FID: Maximum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x84, // FID: PPB_Threshold
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x85, // FID: Surplus Bandwidth
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x87, // FID: Smallest Tolerable Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x88, // FID: Original Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x89, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x00, // FID: Delay bound
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x01, // FID: Jitter bound
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x02, // FID: Average MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x03, // FID: Maximum MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x04, // FID: Average Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x05, // FID: Minimum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x06, // FID: Maximum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x07, // FID: Maximum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x08, // FID: Minimum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x09, // FID: Maximum Burst Size
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x0A, // FID: Exception Policy
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x0B, // FID: inactivity_interval
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x0C, // FID: MSDU Error Rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x0D, // FID: CLST
+ 0x00, // QMP BODY
+ QMP_REVERSE,
+ 0x0E, // QMP body length
+ 0x0E, // FID: CDESC
+ 0x00, // IP Version 4
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x0F, // source port
+ 0xF1, // source port
+ 0x01, // Dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0xFF, // dest port
+ 0xF1, // dest port
+ 0x00, // ip proto type
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x10, // FID: ATS Tolerance
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x11, // FID: Smallest tolerable Average data rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x12, // FID: Original Average data rate
+ 0x00, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x13, // FID: rx_window_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x03, // QMP body length
+ 0x14, // FID: smoothing_buffer_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x15, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x80, // FID: TXOPs per Beacon Period
+ 0x15, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x81, // FID: Average Number of PBs per TXOP
+ 0x10, // QMP BODY copy
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x82, // FID: Minimum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x83, // FID: Maximum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x84, // FID: PPB_Threshold
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x85, // FID: Surplus Bandwidth
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x87, // FID: Smallest Tolerable Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x88, // FID: Original Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x89, // FID: Bidirectional Burst
+ 0x01 // QMP BODY
+ }
+};
+
+
+void
+test_msg_cm_conn_mod_cnf_get_from_mme_msg(test_t t)
+{
+ msg_cm_conn_mod_cnf_t msg;
+
+ test_case_begin(t, "TEST cm_conn_mod_cnf_get_from_mme_msg");
+
+ test_begin(t, "test case 1")
+ {
+ msg_cm_conn_mod_cnf_init(&msg);
+
+ msg_cm_conn_mod_cnf_get_from_mme_msg( &msg_cm_conn_mod_cnf_1, &msg);
+
+ test_fail_unless(msg.cid == 0x5325);
+ test_fail_unless(msg.result == CONN_MOD_SUCCESS);
+
+ }test_end;
+
+ test_begin(t, "test case 2")
+ {
+
+ msg_cm_conn_mod_cnf_init(&msg);
+
+ msg_cm_conn_mod_cnf_get_from_mme_msg( &msg_cm_conn_mod_cnf_2, &msg);
+
+ test_fail_unless( msg.cid == 0x5325 );
+ test_fail_unless( msg.result == CONN_MOD_FAILED );
+
+
+
+
+ // CINFO FORWARD
+ test_fail_unless( msg.proposed_cspec.cinfo_forward.valid == CINFO_VALID);
+ test_fail_unless( msg.proposed_cspec.cinfo_forward.mac_service_type == MAC_CONTENTION);
+ test_fail_unless( msg.proposed_cspec.cinfo_forward.user_priority == USER_PRIORITY_CAP0);
+ test_fail_unless( msg.proposed_cspec.cinfo_forward.ats == ATS_FOR_HLE);
+ test_fail_unless( msg.proposed_cspec.cinfo_forward.smoothing == SMOOTHING_REQUESTED);
+
+ // CINFO REVERSE
+ test_fail_unless( msg.proposed_cspec.cinfo_reverse.valid == CINFO_VALID );
+ test_fail_unless( msg.proposed_cspec.cinfo_reverse.mac_service_type == MAC_CONTENTION );
+ test_fail_unless( msg.proposed_cspec.cinfo_reverse.user_priority == USER_PRIORITY_CAP0 );
+ test_fail_unless( msg.proposed_cspec.cinfo_reverse.ats == ATS_FOR_HLE );
+ test_fail_unless( msg.proposed_cspec.cinfo_reverse.smoothing == SMOOTHING_REQUESTED );
+
+ // QMP FORWARD
+ test_fail_unless( msg.proposed_cspec.qmp_forward.forward_or_reverse == QMP_FORWARD);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.delay_bound_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.jitter_bound_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.average_msdu_size_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.maximum_msdu_size_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.average_data_rate_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.minimum_data_rate_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.maximum_data_rate_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.minimum_inter_txop_time_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.maximum_inter_txop_time_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.maximum_burst_size_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.exception_policy_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.inactivity_interval_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.msdu_error_rate_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.clst_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.cdesc_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.ats_tolerance_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.smallest_tolerable_data_rate_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.original_average_data_rate_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.rx_window_size_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.smoothing_buffer_size_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.bidirectional_burst_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.txops_per_beacon_period_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.minimum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.maximum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.ppb_threshold_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.surplus_bandwith_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.smallest_tolerable_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.original_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.valid.cco_bidirectional_burst_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.delay_bound == 0x01010101);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.jitter_bound == 0x10101010);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.average_msdu_size == 0XF0F0);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.maximum_msdu_size == 0XF0F0);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.average_data_rate == 0x0F0F);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.minimum_data_rate == 0x0F0F);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.maximum_data_rate == 0x0F0F);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.maximum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.minimum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.maximum_burst_size == 0x00FF);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.exception_policy == EXCEPTION_RECONFIGURE_CONNEXION);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.inactivity_interval == 0X00FF00FF);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.msdu_error_rate == 0x00FF);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.clst == 0x00);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.cdesc.ip_version == 0x00);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.cdesc.ipv4_source_address[0] == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.cdesc.ipv4_source_address[1] == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.cdesc.ipv4_source_address[2] == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.cdesc.ipv4_source_address[3] == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.cdesc.source_port == 0x0FF1);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[0] == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[1] == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[2] == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[3] == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.cdesc.destination_port == 0xFFF1);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.cdesc.protocol_type == 0x00);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.ats_tolerance == 0x00FF);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.smallest_tolerable_data_rate == 0x00FF);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.original_average_data_rate == 0x000F);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.rx_window_size == 0x100F);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.smoothing_buffer_size == 0x100F10);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cm.bidirectional_burst == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cco.txops_per_beacon_period == 0x15);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cco.average_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cco.minimum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cco.maximum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cco.ppb_threshold == 0x0FF0);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cco.surplus_bandwith == 0x0FF0);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cco.smallest_tolerable_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cco.original_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.proposed_cspec.qmp_forward.cco.cco_bidirectional_burst == 0x01);
+
+
+ // QMP REVERSE
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.forward_or_reverse == QMP_REVERSE);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.delay_bound_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.jitter_bound_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.average_msdu_size_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.maximum_msdu_size_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.average_data_rate_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.minimum_data_rate_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.maximum_data_rate_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.minimum_inter_txop_time_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.maximum_inter_txop_time_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.maximum_burst_size_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.exception_policy_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.inactivity_interval_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.msdu_error_rate_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.clst_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.cdesc_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.ats_tolerance_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.smallest_tolerable_data_rate_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.original_average_data_rate_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.rx_window_size_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.smoothing_buffer_size_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.bidirectional_burst_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.txops_per_beacon_period_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.minimum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.maximum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.ppb_threshold_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.surplus_bandwith_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.smallest_tolerable_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.original_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.valid.cco_bidirectional_burst_available == true);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.delay_bound == 0x01010101);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.jitter_bound == 0x10101010);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.average_msdu_size == 0XF0F0);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.maximum_msdu_size == 0XF0F0);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.average_data_rate == 0x0F0F);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.minimum_data_rate == 0x0F0F);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.maximum_data_rate == 0x0F0F);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.maximum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.minimum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.maximum_burst_size == 0x00FF);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.exception_policy == EXCEPTION_RECONFIGURE_CONNEXION);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.inactivity_interval == 0X00FF00FF);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.msdu_error_rate == 0x00FF);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.clst == 0x00);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.cdesc.ip_version == 0x00);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[0] == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[1] == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[2] == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[3] == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.cdesc.source_port == 0x0FF1);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[0] == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[1] == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[2] == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[3] == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.cdesc.destination_port == 0xFFF1);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.cdesc.protocol_type == 0x00);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.ats_tolerance == 0x00FF);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.smallest_tolerable_data_rate == 0x00FF);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.original_average_data_rate == 0x000F);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.rx_window_size == 0x100F);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.smoothing_buffer_size == 0x100F10);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cm.bidirectional_burst == 0x01);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cco.txops_per_beacon_period == 0x15);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cco.average_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cco.minimum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cco.maximum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cco.ppb_threshold == 0x0FF0);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cco.surplus_bandwith == 0x0FF0);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cco.smallest_tolerable_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cco.original_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.proposed_cspec.qmp_reverse.cco.cco_bidirectional_burst == 0x01);
+
+ test_fail_unless( msg.proposed_cspec.len == 0x0154 );
+
+ }test_end;
+
+}
+
+
+void
+test_msg_cm_conn_mod_cnf_set_on_mme_msg(test_t t)
+{
+ msg_cm_conn_mod_cnf_t msg;
+ msg_mme_t test_msg;
+ int i;
+
+ test_case_begin(t, "TEST cm_conn_mod_cnf_set_on_mme_msg");
+
+ test_begin(t, "test case 1")
+ {
+ msg_cm_conn_mod_cnf_init(&msg);
+
+ msg.cid = 0x5325;
+ msg.result = CONN_MOD_SUCCESS;
+
+ msg_cm_conn_mod_cnf_set_on_mme_msg(&test_msg, &msg);
+
+ for(i=0; i< 2;i++)
+ {
+ test_fail_unless( test_msg.mm_entry[i] == msg_cm_conn_mod_cnf_1.mm_entry[i], "Error on test_mme in item %i test = 0x%x msg = 0x%x\n",i,test_msg.mm_entry[i],msg_cm_conn_mod_cnf_1.mm_entry[i]);
+ }
+
+ }test_end;
+
+ test_begin(t, "test case 2")
+ {
+ msg.cid = 0x5325;
+ msg.result = CONN_MOD_FAILED;
+
+ msg.proposed_cspec.cinfo_forward.valid = CINFO_VALID;
+ msg.proposed_cspec.cinfo_forward.mac_service_type = MAC_CONTENTION;
+ msg.proposed_cspec.cinfo_forward.user_priority = USER_PRIORITY_CAP0;
+ msg.proposed_cspec.cinfo_forward.ats = ATS_FOR_HLE;
+ msg.proposed_cspec.cinfo_forward.smoothing = SMOOTHING_REQUESTED;
+ msg.proposed_cspec.cinfo_reverse.valid = CINFO_VALID ;
+ msg.proposed_cspec.cinfo_reverse.mac_service_type = MAC_CONTENTION ;
+ msg.proposed_cspec.cinfo_reverse.user_priority = USER_PRIORITY_CAP0 ;
+ msg.proposed_cspec.cinfo_reverse.ats = ATS_FOR_HLE ;
+ msg.proposed_cspec.cinfo_reverse.smoothing = SMOOTHING_REQUESTED ;
+ msg.proposed_cspec.qmp_forward.forward_or_reverse = QMP_FORWARD;
+ msg.proposed_cspec.qmp_forward.valid.delay_bound_available = true;
+ msg.proposed_cspec.qmp_forward.valid.jitter_bound_available = true;
+ msg.proposed_cspec.qmp_forward.valid.average_msdu_size_available = true;
+ msg.proposed_cspec.qmp_forward.valid.maximum_msdu_size_available = true;
+ msg.proposed_cspec.qmp_forward.valid.average_data_rate_available = true;
+ msg.proposed_cspec.qmp_forward.valid.minimum_data_rate_available = true;
+ msg.proposed_cspec.qmp_forward.valid.maximum_data_rate_available = true;
+ msg.proposed_cspec.qmp_forward.valid.minimum_inter_txop_time_available = true;
+ msg.proposed_cspec.qmp_forward.valid.maximum_inter_txop_time_available = true;
+ msg.proposed_cspec.qmp_forward.valid.maximum_burst_size_available = true;
+ msg.proposed_cspec.qmp_forward.valid.exception_policy_available = true;
+ msg.proposed_cspec.qmp_forward.valid.inactivity_interval_available = true;
+ msg.proposed_cspec.qmp_forward.valid.msdu_error_rate_available = true;
+ msg.proposed_cspec.qmp_forward.valid.clst_available = true;
+ msg.proposed_cspec.qmp_forward.valid.cdesc_available = true;
+ msg.proposed_cspec.qmp_forward.valid.ats_tolerance_available = true;
+ msg.proposed_cspec.qmp_forward.valid.smallest_tolerable_data_rate_available = true;
+ msg.proposed_cspec.qmp_forward.valid.original_average_data_rate_available = true;
+ msg.proposed_cspec.qmp_forward.valid.rx_window_size_available = true;
+ msg.proposed_cspec.qmp_forward.valid.smoothing_buffer_size_available = true;
+ msg.proposed_cspec.qmp_forward.valid.bidirectional_burst_available = true;
+ msg.proposed_cspec.qmp_forward.valid.txops_per_beacon_period_available = true;
+ msg.proposed_cspec.qmp_forward.valid.average_number_of_pbs_per_txop_available = true;
+ msg.proposed_cspec.qmp_forward.valid.minimum_number_of_pbs_per_txop_available = true;
+ msg.proposed_cspec.qmp_forward.valid.maximum_number_of_pbs_per_txop_available = true;
+ msg.proposed_cspec.qmp_forward.valid.ppb_threshold_available = true;
+ msg.proposed_cspec.qmp_forward.valid.surplus_bandwith_available = true;
+ msg.proposed_cspec.qmp_forward.valid.smallest_tolerable_average_number_of_pbs_per_txop_available = true;
+ msg.proposed_cspec.qmp_forward.valid.original_average_number_of_pbs_per_txop_available = true;
+ msg.proposed_cspec.qmp_forward.valid.cco_bidirectional_burst_available = true;
+ msg.proposed_cspec.qmp_forward.cm.delay_bound = 0x01010101;
+ msg.proposed_cspec.qmp_forward.cm.jitter_bound = 0x10101010;
+ msg.proposed_cspec.qmp_forward.cm.average_msdu_size = 0XF0F0;
+ msg.proposed_cspec.qmp_forward.cm.maximum_msdu_size = 0XF0F0;
+ msg.proposed_cspec.qmp_forward.cm.average_data_rate = 0x0F0F;
+ msg.proposed_cspec.qmp_forward.cm.minimum_data_rate = 0x0F0F;
+ msg.proposed_cspec.qmp_forward.cm.maximum_data_rate = 0x0F0F;
+ msg.proposed_cspec.qmp_forward.cm.maximum_inter_txop_time = 0xFFFF;
+ msg.proposed_cspec.qmp_forward.cm.minimum_inter_txop_time = 0xFFFF;
+ msg.proposed_cspec.qmp_forward.cm.maximum_burst_size = 0x00FF;
+ msg.proposed_cspec.qmp_forward.cm.exception_policy = EXCEPTION_RECONFIGURE_CONNEXION;
+ msg.proposed_cspec.qmp_forward.cm.inactivity_interval = 0X00FF00FF;
+ msg.proposed_cspec.qmp_forward.cm.msdu_error_rate = 0x00FF;
+ msg.proposed_cspec.qmp_forward.cm.clst = 0x00;
+ msg.proposed_cspec.qmp_forward.cm.cdesc.ip_version = 0x00;
+ msg.proposed_cspec.qmp_forward.cm.cdesc.ipv4_source_address[0] = 0x01;
+ msg.proposed_cspec.qmp_forward.cm.cdesc.ipv4_source_address[1] = 0x01;
+ msg.proposed_cspec.qmp_forward.cm.cdesc.ipv4_source_address[2] = 0x01;
+ msg.proposed_cspec.qmp_forward.cm.cdesc.ipv4_source_address[3] = 0x01;
+ msg.proposed_cspec.qmp_forward.cm.cdesc.source_port = 0x0FF1;
+ msg.proposed_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[0] = 0x01;
+ msg.proposed_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[1] = 0x01;
+ msg.proposed_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[2] = 0x01;
+ msg.proposed_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[3] = 0x01;
+ msg.proposed_cspec.qmp_forward.cm.cdesc.destination_port = 0xFFF1;
+ msg.proposed_cspec.qmp_forward.cm.cdesc.protocol_type = 0x00;
+ msg.proposed_cspec.qmp_forward.cm.ats_tolerance = 0x00FF;
+ msg.proposed_cspec.qmp_forward.cm.smallest_tolerable_data_rate = 0x00FF;
+ msg.proposed_cspec.qmp_forward.cm.original_average_data_rate = 0x000F;
+ msg.proposed_cspec.qmp_forward.cm.rx_window_size = 0x100F;
+ msg.proposed_cspec.qmp_forward.cm.smoothing_buffer_size = 0x100F10;
+ msg.proposed_cspec.qmp_forward.cm.bidirectional_burst = 0x01;
+ msg.proposed_cspec.qmp_forward.cco.txops_per_beacon_period = 0x15;
+ msg.proposed_cspec.qmp_forward.cco.average_number_of_pbs_per_txop = 0x100F;
+ msg.proposed_cspec.qmp_forward.cco.minimum_number_of_pbs_per_txop = 0x100F;
+ msg.proposed_cspec.qmp_forward.cco.maximum_number_of_pbs_per_txop = 0x100F;
+ msg.proposed_cspec.qmp_forward.cco.ppb_threshold = 0x0FF0;
+ msg.proposed_cspec.qmp_forward.cco.surplus_bandwith = 0x0FF0;
+ msg.proposed_cspec.qmp_forward.cco.smallest_tolerable_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.proposed_cspec.qmp_forward.cco.original_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.proposed_cspec.qmp_forward.cco.cco_bidirectional_burst = 0x01;
+ msg.proposed_cspec.qmp_reverse.forward_or_reverse = QMP_REVERSE;
+ msg.proposed_cspec.qmp_reverse.valid.delay_bound_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.jitter_bound_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.average_msdu_size_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.maximum_msdu_size_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.average_data_rate_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.minimum_data_rate_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.maximum_data_rate_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.minimum_inter_txop_time_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.maximum_inter_txop_time_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.maximum_burst_size_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.exception_policy_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.inactivity_interval_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.msdu_error_rate_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.clst_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.cdesc_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.ats_tolerance_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.smallest_tolerable_data_rate_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.original_average_data_rate_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.rx_window_size_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.smoothing_buffer_size_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.bidirectional_burst_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.txops_per_beacon_period_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.average_number_of_pbs_per_txop_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.minimum_number_of_pbs_per_txop_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.maximum_number_of_pbs_per_txop_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.ppb_threshold_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.surplus_bandwith_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.smallest_tolerable_average_number_of_pbs_per_txop_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.original_average_number_of_pbs_per_txop_available = true;
+ msg.proposed_cspec.qmp_reverse.valid.cco_bidirectional_burst_available = true;
+ msg.proposed_cspec.qmp_reverse.cm.delay_bound = 0x01010101;
+ msg.proposed_cspec.qmp_reverse.cm.jitter_bound = 0x10101010;
+ msg.proposed_cspec.qmp_reverse.cm.average_msdu_size = 0XF0F0;
+ msg.proposed_cspec.qmp_reverse.cm.maximum_msdu_size = 0XF0F0;
+ msg.proposed_cspec.qmp_reverse.cm.average_data_rate = 0x0F0F;
+ msg.proposed_cspec.qmp_reverse.cm.minimum_data_rate = 0x0F0F;
+ msg.proposed_cspec.qmp_reverse.cm.maximum_data_rate = 0x0F0F;
+ msg.proposed_cspec.qmp_reverse.cm.maximum_inter_txop_time = 0xFFFF;
+ msg.proposed_cspec.qmp_reverse.cm.minimum_inter_txop_time = 0xFFFF;
+ msg.proposed_cspec.qmp_reverse.cm.maximum_burst_size = 0x00FF;
+ msg.proposed_cspec.qmp_reverse.cm.exception_policy = EXCEPTION_RECONFIGURE_CONNEXION;
+ msg.proposed_cspec.qmp_reverse.cm.inactivity_interval = 0X00FF00FF;
+ msg.proposed_cspec.qmp_reverse.cm.msdu_error_rate = 0x00FF;
+ msg.proposed_cspec.qmp_reverse.cm.clst = 0x00;
+ msg.proposed_cspec.qmp_reverse.cm.cdesc.ip_version = 0x00;
+ msg.proposed_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[0] = 0x01;
+ msg.proposed_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[1] = 0x01;
+ msg.proposed_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[2] = 0x01;
+ msg.proposed_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[3] = 0x01;
+ msg.proposed_cspec.qmp_reverse.cm.cdesc.source_port = 0x0FF1;
+ msg.proposed_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[0] = 0x01;
+ msg.proposed_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[1] = 0x01;
+ msg.proposed_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[2] = 0x01;
+ msg.proposed_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[3] = 0x01;
+ msg.proposed_cspec.qmp_reverse.cm.cdesc.destination_port = 0xFFF1;
+ msg.proposed_cspec.qmp_reverse.cm.cdesc.protocol_type = 0x00;
+ msg.proposed_cspec.qmp_reverse.cm.ats_tolerance = 0x00FF;
+ msg.proposed_cspec.qmp_reverse.cm.smallest_tolerable_data_rate = 0x00FF;
+ msg.proposed_cspec.qmp_reverse.cm.original_average_data_rate = 0x000F;
+ msg.proposed_cspec.qmp_reverse.cm.rx_window_size = 0x100F;
+ msg.proposed_cspec.qmp_reverse.cm.smoothing_buffer_size = 0x100F10;
+ msg.proposed_cspec.qmp_reverse.cm.bidirectional_burst = 0x01;
+ msg.proposed_cspec.qmp_reverse.cco.txops_per_beacon_period = 0x15;
+ msg.proposed_cspec.qmp_reverse.cco.average_number_of_pbs_per_txop = 0x100F;
+ msg.proposed_cspec.qmp_reverse.cco.minimum_number_of_pbs_per_txop = 0x100F;
+ msg.proposed_cspec.qmp_reverse.cco.maximum_number_of_pbs_per_txop = 0x100F;
+ msg.proposed_cspec.qmp_reverse.cco.ppb_threshold = 0x0FF0;
+ msg.proposed_cspec.qmp_reverse.cco.surplus_bandwith = 0x0FF0;
+ msg.proposed_cspec.qmp_reverse.cco.smallest_tolerable_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.proposed_cspec.qmp_reverse.cco.original_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.proposed_cspec.qmp_reverse.cco.cco_bidirectional_burst = 0x01;
+ msg.proposed_cspec.len = 0x0154 ;
+
+ msg_cm_conn_mod_cnf_set_on_mme_msg(&test_msg, &msg);
+
+ for(i=0; i< 341;i++)
+ {
+ test_fail_unless( test_msg.mm_entry[i] == msg_cm_conn_mod_cnf_2.mm_entry[i], "Error on test_mme in item %i test = 0x%x msg = 0x%x\n",i,test_msg.mm_entry[i],msg_cm_conn_mod_cnf_2.mm_entry[i]);
+ }
+
+ }test_end;
+
+}
+
+
+void
+test_msg_cm_conn_mod_cnf(test_t t)
+{
+ dbg_assert(t);
+
+ test_suite_begin(t, "TEST MESSAGE CM_CONN_MOD_CNF");
+
+ test_msg_cm_conn_mod_cnf_get_from_mme_msg(t);
+ test_msg_cm_conn_mod_cnf_set_on_mme_msg(t);
+
+}
diff --git a/cesar/cp/msg/test/src/test_msg_cm_conn_mod_req.c b/cesar/cp/msg/test/src/test_msg_cm_conn_mod_req.c
new file mode 100644
index 0000000000..2152156aed
--- /dev/null
+++ b/cesar/cp/msg/test/src/test_msg_cm_conn_mod_req.c
@@ -0,0 +1,755 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file test_msg_cm_conn_mod_req.c
+ * \brief File Description
+ * \ingroup cp/msg
+ *
+ */
+
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm.h"
+
+
+msg_mme_t msg_cm_conn_mod_req_1 =
+{
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // ODA
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // OSA
+ 0, // vlan tag
+ 0x88E1,
+ 0, // mmv
+ CM_CONN_MOD_REQ,
+ {0,0,0},
+ {
+ 0x53, // CID
+ 0x25, // CID
+ 0x01, // CSPEC Length :338 bytes
+ 0x54, // CSPEC Length :
+ CINFO_VALID, // CINFO Valid? CINFO Forward
+ MAC_CONTENTION, // Mac Service Type
+ USER_PRIORITY_CAP0, // User Priori ty
+ ATS_FOR_HLE, // Arrival Time Stamp
+ SMOOTHING_REQUESTED, // Smoothing
+ CINFO_VALID, // CINFO Valid? CINFO Reverse
+ MAC_CONTENTION, // Mac Service Type
+ USER_PRIORITY_CAP0, // User Priority
+ ATS_FOR_HLE, // Arrival Time Stamp
+ SMOOTHING_REQUESTED, // Smoothing
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x00, // FID: Delay bound
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x01, // FID: Jitter bound
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x02, // FID: Average MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x03, // FID: Maximum MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x04, // FID: Average Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x05, // FID: Minimum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x06, // FID: Maximum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x07, // FID: Maximum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x08, // FID: Minimum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x09, // FID: Maximum Burst Size
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x0A, // FID: Exception Policy
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x0B, // FID: inactivity_interval
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x0C, // FID: MSDU Error Rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x0D, // FID: CLST
+ 0x00, // QMP BODY
+ QMP_FORWARD,
+ 0x0E, // QMP body length
+ 0x0E, // FID: CDESC
+ 0x00, // IP Version 4
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x0F, // source port
+ 0xF1, // source port
+ 0x01, // Dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0xFF, // dest port
+ 0xF1, // dest port
+ 0x00, // ip proto type
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x10, // FID: ATS Tolerance
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x11, // FID: Smallest tolerable Average data rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x12, // FID: Original Average data rate
+ 0x00, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x13, // FID: rx_window_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x03, // QMP body length
+ 0x14, // FID: smoothing_buffer_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x15, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x80, // FID: TXOPs per Beacon Period
+ 0x15, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x81, // FID: Average Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x82, // FID: Minimum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x83, // FID: Maximum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x84, // FID: PPB_Threshold
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x85, // FID: Surplus Bandwidth
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x87, // FID: Smallest Tolerable Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x88, // FID: Original Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x89, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x00, // FID: Delay bound
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x01, // FID: Jitter bound
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x02, // FID: Average MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x03, // FID: Maximum MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x04, // FID: Average Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x05, // FID: Minimum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x06, // FID: Maximum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x07, // FID: Maximum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x08, // FID: Minimum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x09, // FID: Maximum Burst Size
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x0A, // FID: Exception Policy
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x0B, // FID: inactivity_interval
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x0C, // FID: MSDU Error Rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x0D, // FID: CLST
+ 0x00, // QMP BODY
+ QMP_REVERSE,
+ 0x0E, // QMP body length
+ 0x0E, // FID: CDESC
+ 0x00, // IP Version 4
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x0F, // source port
+ 0xF1, // source port
+ 0x01, // Dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0xFF, // dest port
+ 0xF1, // dest port
+ 0x00, // ip proto type
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x10, // FID: ATS Tolerance
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x11, // FID: Smallest tolerable Average data rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x12, // FID: Original Average data rate
+ 0x00, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x13, // FID: rx_window_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x03, // QMP body length
+ 0x14, // FID: smoothing_buffer_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x15, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x80, // FID: TXOPs per Beacon Period
+ 0x15, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x81, // FID: Average Number of PBs per TXOP
+ 0x10, // QMP BODY copy
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x82, // FID: Minimum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x83, // FID: Maximum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x84, // FID: PPB_Threshold
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x85, // FID: Surplus Bandwidth
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x87, // FID: Smallest Tolerable Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x88, // FID: Original Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x89, // FID: Bidirectional Burst
+ 0x01 // QMP BODY
+ }
+};
+
+
+void
+test_msg_cm_conn_mod_req_get_from_mme_msg(test_t t)
+{
+ msg_cm_conn_mod_req_t msg;
+
+ test_case_begin(t, "TEST cm_conn_mod_req_get_from_mme_msg");
+
+ test_begin(t, "test case 1")
+ {
+
+ msg_cm_conn_mod_req_init(&msg);
+
+ msg_cm_conn_mod_req_get_from_mme_msg( &msg_cm_conn_mod_req_1, &msg);
+
+ test_fail_unless( msg.cid == 0x5325 );
+
+ // CINFO FORWARD
+ test_fail_unless( msg.modified_cspec.cinfo_forward.valid == CINFO_VALID);
+ test_fail_unless( msg.modified_cspec.cinfo_forward.mac_service_type == MAC_CONTENTION);
+ test_fail_unless( msg.modified_cspec.cinfo_forward.user_priority == USER_PRIORITY_CAP0);
+ test_fail_unless( msg.modified_cspec.cinfo_forward.ats == ATS_FOR_HLE);
+ test_fail_unless( msg.modified_cspec.cinfo_forward.smoothing == SMOOTHING_REQUESTED);
+
+ // CINFO REVERSE
+ test_fail_unless( msg.modified_cspec.cinfo_reverse.valid == CINFO_VALID );
+ test_fail_unless( msg.modified_cspec.cinfo_reverse.mac_service_type == MAC_CONTENTION );
+ test_fail_unless( msg.modified_cspec.cinfo_reverse.user_priority == USER_PRIORITY_CAP0 );
+ test_fail_unless( msg.modified_cspec.cinfo_reverse.ats == ATS_FOR_HLE );
+ test_fail_unless( msg.modified_cspec.cinfo_reverse.smoothing == SMOOTHING_REQUESTED );
+
+ // QMP FORWARD
+ test_fail_unless( msg.modified_cspec.qmp_forward.forward_or_reverse == QMP_FORWARD);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.delay_bound_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.jitter_bound_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.average_msdu_size_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.maximum_msdu_size_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.average_data_rate_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.minimum_data_rate_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.maximum_data_rate_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.minimum_inter_txop_time_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.maximum_inter_txop_time_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.maximum_burst_size_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.exception_policy_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.inactivity_interval_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.msdu_error_rate_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.clst_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.cdesc_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.ats_tolerance_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.smallest_tolerable_data_rate_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.original_average_data_rate_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.rx_window_size_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.smoothing_buffer_size_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.bidirectional_burst_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.txops_per_beacon_period_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.minimum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.maximum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.ppb_threshold_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.surplus_bandwith_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.smallest_tolerable_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.original_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.valid.cco_bidirectional_burst_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.delay_bound == 0x01010101);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.jitter_bound == 0x10101010);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.average_msdu_size == 0XF0F0);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.maximum_msdu_size == 0XF0F0);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.average_data_rate == 0x0F0F);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.minimum_data_rate == 0x0F0F);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.maximum_data_rate == 0x0F0F);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.maximum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.minimum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.maximum_burst_size == 0x00FF);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.exception_policy == EXCEPTION_RECONFIGURE_CONNEXION);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.inactivity_interval == 0X00FF00FF);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.msdu_error_rate == 0x00FF);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.clst == 0x00);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.cdesc.ip_version == 0x00);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.cdesc.ipv4_source_address[0] == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.cdesc.ipv4_source_address[1] == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.cdesc.ipv4_source_address[2] == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.cdesc.ipv4_source_address[3] == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.cdesc.source_port == 0x0FF1);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[0] == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[1] == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[2] == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[3] == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.cdesc.destination_port == 0xFFF1);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.cdesc.protocol_type == 0x00);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.ats_tolerance == 0x00FF);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.smallest_tolerable_data_rate == 0x00FF);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.original_average_data_rate == 0x000F);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.rx_window_size == 0x100F);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.smoothing_buffer_size == 0x100F10);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cm.bidirectional_burst == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cco.txops_per_beacon_period == 0x15);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cco.average_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cco.minimum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cco.maximum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cco.ppb_threshold == 0x0FF0);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cco.surplus_bandwith == 0x0FF0);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cco.smallest_tolerable_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cco.original_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.modified_cspec.qmp_forward.cco.cco_bidirectional_burst == 0x01);
+
+
+ // QMP REVERSE
+ test_fail_unless( msg.modified_cspec.qmp_reverse.forward_or_reverse == QMP_REVERSE);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.delay_bound_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.jitter_bound_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.average_msdu_size_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.maximum_msdu_size_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.average_data_rate_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.minimum_data_rate_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.maximum_data_rate_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.minimum_inter_txop_time_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.maximum_inter_txop_time_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.maximum_burst_size_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.exception_policy_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.inactivity_interval_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.msdu_error_rate_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.clst_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.cdesc_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.ats_tolerance_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.smallest_tolerable_data_rate_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.original_average_data_rate_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.rx_window_size_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.smoothing_buffer_size_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.bidirectional_burst_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.txops_per_beacon_period_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.minimum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.maximum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.ppb_threshold_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.surplus_bandwith_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.smallest_tolerable_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.original_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.valid.cco_bidirectional_burst_available == true);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.delay_bound == 0x01010101);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.jitter_bound == 0x10101010);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.average_msdu_size == 0XF0F0);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.maximum_msdu_size == 0XF0F0);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.average_data_rate == 0x0F0F);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.minimum_data_rate == 0x0F0F);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.maximum_data_rate == 0x0F0F);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.maximum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.minimum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.maximum_burst_size == 0x00FF);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.exception_policy == EXCEPTION_RECONFIGURE_CONNEXION);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.inactivity_interval == 0X00FF00FF);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.msdu_error_rate == 0x00FF);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.clst == 0x00);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.cdesc.ip_version == 0x00);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[0] == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[1] == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[2] == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[3] == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.cdesc.source_port == 0x0FF1);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[0] == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[1] == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[2] == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[3] == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.cdesc.destination_port == 0xFFF1);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.cdesc.protocol_type == 0x00);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.ats_tolerance == 0x00FF);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.smallest_tolerable_data_rate == 0x00FF);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.original_average_data_rate == 0x000F);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.rx_window_size == 0x100F);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.smoothing_buffer_size == 0x100F10);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cm.bidirectional_burst == 0x01);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cco.txops_per_beacon_period == 0x15);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cco.average_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cco.minimum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cco.maximum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cco.ppb_threshold == 0x0FF0);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cco.surplus_bandwith == 0x0FF0);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cco.smallest_tolerable_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cco.original_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.modified_cspec.qmp_reverse.cco.cco_bidirectional_burst == 0x01);
+
+ test_fail_unless( msg.modified_cspec.len == 0x0154 );
+
+ }test_end;
+
+}
+
+
+void
+test_msg_cm_conn_mod_req_set_on_mme_msg(test_t t)
+{
+ msg_cm_conn_mod_req_t msg;
+ msg_mme_t test_msg;
+ int i;
+
+ test_case_begin(t, "TEST cm_conn_mod_req_set_on_mme_msg");
+
+
+ test_begin(t, "test case 1")
+ {
+
+ msg_cm_conn_mod_req_init(&msg);
+
+ msg.cid = 0x5325;
+
+ msg.modified_cspec.cinfo_forward.valid = CINFO_VALID;
+ msg.modified_cspec.cinfo_forward.mac_service_type = MAC_CONTENTION;
+ msg.modified_cspec.cinfo_forward.user_priority = USER_PRIORITY_CAP0;
+ msg.modified_cspec.cinfo_forward.ats = ATS_FOR_HLE;
+ msg.modified_cspec.cinfo_forward.smoothing = SMOOTHING_REQUESTED;
+ msg.modified_cspec.cinfo_reverse.valid = CINFO_VALID ;
+ msg.modified_cspec.cinfo_reverse.mac_service_type = MAC_CONTENTION ;
+ msg.modified_cspec.cinfo_reverse.user_priority = USER_PRIORITY_CAP0 ;
+ msg.modified_cspec.cinfo_reverse.ats = ATS_FOR_HLE ;
+ msg.modified_cspec.cinfo_reverse.smoothing = SMOOTHING_REQUESTED ;
+ msg.modified_cspec.qmp_forward.forward_or_reverse = QMP_FORWARD;
+ msg.modified_cspec.qmp_forward.valid.delay_bound_available = true;
+ msg.modified_cspec.qmp_forward.valid.jitter_bound_available = true;
+ msg.modified_cspec.qmp_forward.valid.average_msdu_size_available = true;
+ msg.modified_cspec.qmp_forward.valid.maximum_msdu_size_available = true;
+ msg.modified_cspec.qmp_forward.valid.average_data_rate_available = true;
+ msg.modified_cspec.qmp_forward.valid.minimum_data_rate_available = true;
+ msg.modified_cspec.qmp_forward.valid.maximum_data_rate_available = true;
+ msg.modified_cspec.qmp_forward.valid.minimum_inter_txop_time_available = true;
+ msg.modified_cspec.qmp_forward.valid.maximum_inter_txop_time_available = true;
+ msg.modified_cspec.qmp_forward.valid.maximum_burst_size_available = true;
+ msg.modified_cspec.qmp_forward.valid.exception_policy_available = true;
+ msg.modified_cspec.qmp_forward.valid.inactivity_interval_available = true;
+ msg.modified_cspec.qmp_forward.valid.msdu_error_rate_available = true;
+ msg.modified_cspec.qmp_forward.valid.clst_available = true;
+ msg.modified_cspec.qmp_forward.valid.cdesc_available = true;
+ msg.modified_cspec.qmp_forward.valid.ats_tolerance_available = true;
+ msg.modified_cspec.qmp_forward.valid.smallest_tolerable_data_rate_available = true;
+ msg.modified_cspec.qmp_forward.valid.original_average_data_rate_available = true;
+ msg.modified_cspec.qmp_forward.valid.rx_window_size_available = true;
+ msg.modified_cspec.qmp_forward.valid.smoothing_buffer_size_available = true;
+ msg.modified_cspec.qmp_forward.valid.bidirectional_burst_available = true;
+ msg.modified_cspec.qmp_forward.valid.txops_per_beacon_period_available = true;
+ msg.modified_cspec.qmp_forward.valid.average_number_of_pbs_per_txop_available = true;
+ msg.modified_cspec.qmp_forward.valid.minimum_number_of_pbs_per_txop_available = true;
+ msg.modified_cspec.qmp_forward.valid.maximum_number_of_pbs_per_txop_available = true;
+ msg.modified_cspec.qmp_forward.valid.ppb_threshold_available = true;
+ msg.modified_cspec.qmp_forward.valid.surplus_bandwith_available = true;
+ msg.modified_cspec.qmp_forward.valid.smallest_tolerable_average_number_of_pbs_per_txop_available = true;
+ msg.modified_cspec.qmp_forward.valid.original_average_number_of_pbs_per_txop_available = true;
+ msg.modified_cspec.qmp_forward.valid.cco_bidirectional_burst_available = true;
+ msg.modified_cspec.qmp_forward.cm.delay_bound = 0x01010101;
+ msg.modified_cspec.qmp_forward.cm.jitter_bound = 0x10101010;
+ msg.modified_cspec.qmp_forward.cm.average_msdu_size = 0XF0F0;
+ msg.modified_cspec.qmp_forward.cm.maximum_msdu_size = 0XF0F0;
+ msg.modified_cspec.qmp_forward.cm.average_data_rate = 0x0F0F;
+ msg.modified_cspec.qmp_forward.cm.minimum_data_rate = 0x0F0F;
+ msg.modified_cspec.qmp_forward.cm.maximum_data_rate = 0x0F0F;
+ msg.modified_cspec.qmp_forward.cm.maximum_inter_txop_time = 0xFFFF;
+ msg.modified_cspec.qmp_forward.cm.minimum_inter_txop_time = 0xFFFF;
+ msg.modified_cspec.qmp_forward.cm.maximum_burst_size = 0x00FF;
+ msg.modified_cspec.qmp_forward.cm.exception_policy = EXCEPTION_RECONFIGURE_CONNEXION;
+ msg.modified_cspec.qmp_forward.cm.inactivity_interval = 0X00FF00FF;
+ msg.modified_cspec.qmp_forward.cm.msdu_error_rate = 0x00FF;
+ msg.modified_cspec.qmp_forward.cm.clst = 0x00;
+ msg.modified_cspec.qmp_forward.cm.cdesc.ip_version = 0x00;
+ msg.modified_cspec.qmp_forward.cm.cdesc.ipv4_source_address[0] = 0x01;
+ msg.modified_cspec.qmp_forward.cm.cdesc.ipv4_source_address[1] = 0x01;
+ msg.modified_cspec.qmp_forward.cm.cdesc.ipv4_source_address[2] = 0x01;
+ msg.modified_cspec.qmp_forward.cm.cdesc.ipv4_source_address[3] = 0x01;
+ msg.modified_cspec.qmp_forward.cm.cdesc.source_port = 0x0FF1;
+ msg.modified_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[0] = 0x01;
+ msg.modified_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[1] = 0x01;
+ msg.modified_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[2] = 0x01;
+ msg.modified_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[3] = 0x01;
+ msg.modified_cspec.qmp_forward.cm.cdesc.destination_port = 0xFFF1;
+ msg.modified_cspec.qmp_forward.cm.cdesc.protocol_type = 0x00;
+ msg.modified_cspec.qmp_forward.cm.ats_tolerance = 0x00FF;
+ msg.modified_cspec.qmp_forward.cm.smallest_tolerable_data_rate = 0x00FF;
+ msg.modified_cspec.qmp_forward.cm.original_average_data_rate = 0x000F;
+ msg.modified_cspec.qmp_forward.cm.rx_window_size = 0x100F;
+ msg.modified_cspec.qmp_forward.cm.smoothing_buffer_size = 0x100F10;
+ msg.modified_cspec.qmp_forward.cm.bidirectional_burst = 0x01;
+ msg.modified_cspec.qmp_forward.cco.txops_per_beacon_period = 0x15;
+ msg.modified_cspec.qmp_forward.cco.average_number_of_pbs_per_txop = 0x100F;
+ msg.modified_cspec.qmp_forward.cco.minimum_number_of_pbs_per_txop = 0x100F;
+ msg.modified_cspec.qmp_forward.cco.maximum_number_of_pbs_per_txop = 0x100F;
+ msg.modified_cspec.qmp_forward.cco.ppb_threshold = 0x0FF0;
+ msg.modified_cspec.qmp_forward.cco.surplus_bandwith = 0x0FF0;
+ msg.modified_cspec.qmp_forward.cco.smallest_tolerable_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.modified_cspec.qmp_forward.cco.original_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.modified_cspec.qmp_forward.cco.cco_bidirectional_burst = 0x01;
+ msg.modified_cspec.qmp_reverse.forward_or_reverse = QMP_REVERSE;
+ msg.modified_cspec.qmp_reverse.valid.delay_bound_available = true;
+ msg.modified_cspec.qmp_reverse.valid.jitter_bound_available = true;
+ msg.modified_cspec.qmp_reverse.valid.average_msdu_size_available = true;
+ msg.modified_cspec.qmp_reverse.valid.maximum_msdu_size_available = true;
+ msg.modified_cspec.qmp_reverse.valid.average_data_rate_available = true;
+ msg.modified_cspec.qmp_reverse.valid.minimum_data_rate_available = true;
+ msg.modified_cspec.qmp_reverse.valid.maximum_data_rate_available = true;
+ msg.modified_cspec.qmp_reverse.valid.minimum_inter_txop_time_available = true;
+ msg.modified_cspec.qmp_reverse.valid.maximum_inter_txop_time_available = true;
+ msg.modified_cspec.qmp_reverse.valid.maximum_burst_size_available = true;
+ msg.modified_cspec.qmp_reverse.valid.exception_policy_available = true;
+ msg.modified_cspec.qmp_reverse.valid.inactivity_interval_available = true;
+ msg.modified_cspec.qmp_reverse.valid.msdu_error_rate_available = true;
+ msg.modified_cspec.qmp_reverse.valid.clst_available = true;
+ msg.modified_cspec.qmp_reverse.valid.cdesc_available = true;
+ msg.modified_cspec.qmp_reverse.valid.ats_tolerance_available = true;
+ msg.modified_cspec.qmp_reverse.valid.smallest_tolerable_data_rate_available = true;
+ msg.modified_cspec.qmp_reverse.valid.original_average_data_rate_available = true;
+ msg.modified_cspec.qmp_reverse.valid.rx_window_size_available = true;
+ msg.modified_cspec.qmp_reverse.valid.smoothing_buffer_size_available = true;
+ msg.modified_cspec.qmp_reverse.valid.bidirectional_burst_available = true;
+ msg.modified_cspec.qmp_reverse.valid.txops_per_beacon_period_available = true;
+ msg.modified_cspec.qmp_reverse.valid.average_number_of_pbs_per_txop_available = true;
+ msg.modified_cspec.qmp_reverse.valid.minimum_number_of_pbs_per_txop_available = true;
+ msg.modified_cspec.qmp_reverse.valid.maximum_number_of_pbs_per_txop_available = true;
+ msg.modified_cspec.qmp_reverse.valid.ppb_threshold_available = true;
+ msg.modified_cspec.qmp_reverse.valid.surplus_bandwith_available = true;
+ msg.modified_cspec.qmp_reverse.valid.smallest_tolerable_average_number_of_pbs_per_txop_available = true;
+ msg.modified_cspec.qmp_reverse.valid.original_average_number_of_pbs_per_txop_available = true;
+ msg.modified_cspec.qmp_reverse.valid.cco_bidirectional_burst_available = true;
+ msg.modified_cspec.qmp_reverse.cm.delay_bound = 0x01010101;
+ msg.modified_cspec.qmp_reverse.cm.jitter_bound = 0x10101010;
+ msg.modified_cspec.qmp_reverse.cm.average_msdu_size = 0XF0F0;
+ msg.modified_cspec.qmp_reverse.cm.maximum_msdu_size = 0XF0F0;
+ msg.modified_cspec.qmp_reverse.cm.average_data_rate = 0x0F0F;
+ msg.modified_cspec.qmp_reverse.cm.minimum_data_rate = 0x0F0F;
+ msg.modified_cspec.qmp_reverse.cm.maximum_data_rate = 0x0F0F;
+ msg.modified_cspec.qmp_reverse.cm.maximum_inter_txop_time = 0xFFFF;
+ msg.modified_cspec.qmp_reverse.cm.minimum_inter_txop_time = 0xFFFF;
+ msg.modified_cspec.qmp_reverse.cm.maximum_burst_size = 0x00FF;
+ msg.modified_cspec.qmp_reverse.cm.exception_policy = EXCEPTION_RECONFIGURE_CONNEXION;
+ msg.modified_cspec.qmp_reverse.cm.inactivity_interval = 0X00FF00FF;
+ msg.modified_cspec.qmp_reverse.cm.msdu_error_rate = 0x00FF;
+ msg.modified_cspec.qmp_reverse.cm.clst = 0x00;
+ msg.modified_cspec.qmp_reverse.cm.cdesc.ip_version = 0x00;
+ msg.modified_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[0] = 0x01;
+ msg.modified_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[1] = 0x01;
+ msg.modified_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[2] = 0x01;
+ msg.modified_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[3] = 0x01;
+ msg.modified_cspec.qmp_reverse.cm.cdesc.source_port = 0x0FF1;
+ msg.modified_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[0] = 0x01;
+ msg.modified_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[1] = 0x01;
+ msg.modified_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[2] = 0x01;
+ msg.modified_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[3] = 0x01;
+ msg.modified_cspec.qmp_reverse.cm.cdesc.destination_port = 0xFFF1;
+ msg.modified_cspec.qmp_reverse.cm.cdesc.protocol_type = 0x00;
+ msg.modified_cspec.qmp_reverse.cm.ats_tolerance = 0x00FF;
+ msg.modified_cspec.qmp_reverse.cm.smallest_tolerable_data_rate = 0x00FF;
+ msg.modified_cspec.qmp_reverse.cm.original_average_data_rate = 0x000F;
+ msg.modified_cspec.qmp_reverse.cm.rx_window_size = 0x100F;
+ msg.modified_cspec.qmp_reverse.cm.smoothing_buffer_size = 0x100F10;
+ msg.modified_cspec.qmp_reverse.cm.bidirectional_burst = 0x01;
+ msg.modified_cspec.qmp_reverse.cco.txops_per_beacon_period = 0x15;
+ msg.modified_cspec.qmp_reverse.cco.average_number_of_pbs_per_txop = 0x100F;
+ msg.modified_cspec.qmp_reverse.cco.minimum_number_of_pbs_per_txop = 0x100F;
+ msg.modified_cspec.qmp_reverse.cco.maximum_number_of_pbs_per_txop = 0x100F;
+ msg.modified_cspec.qmp_reverse.cco.ppb_threshold = 0x0FF0;
+ msg.modified_cspec.qmp_reverse.cco.surplus_bandwith = 0x0FF0;
+ msg.modified_cspec.qmp_reverse.cco.smallest_tolerable_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.modified_cspec.qmp_reverse.cco.original_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.modified_cspec.qmp_reverse.cco.cco_bidirectional_burst = 0x01;
+ msg.modified_cspec.len = 0x0154 ;
+
+ msg_cm_conn_mod_req_set_on_mme_msg(&test_msg, &msg);
+
+ for(i=0; i< 340;i++)
+ {
+ test_fail_unless( test_msg.mm_entry[i] == msg_cm_conn_mod_req_1.mm_entry[i], "Error on test_mme in item %i test = 0x%x msg = 0x%x\n",i,test_msg.mm_entry[i],msg_cm_conn_mod_req_1.mm_entry[i]);
+ }
+
+ }test_end;
+
+}
+
+
+void
+test_msg_cm_conn_mod_req(test_t t)
+{
+ dbg_assert(t);
+
+ test_suite_begin(t, "TEST MESSAGE CM_CONN_MOD_REQ");
+ test_msg_cm_conn_mod_req_get_from_mme_msg(t);
+ test_msg_cm_conn_mod_req_set_on_mme_msg(t);
+
+}
diff --git a/cesar/cp/msg/test/src/test_msg_cm_conn_new_cnf.c b/cesar/cp/msg/test/src/test_msg_cm_conn_new_cnf.c
new file mode 100644
index 0000000000..d823069b42
--- /dev/null
+++ b/cesar/cp/msg/test/src/test_msg_cm_conn_new_cnf.c
@@ -0,0 +1,816 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file test_msg_cm_conn_new_cnf.c
+ * \brief File Description
+ * \ingroup cp/msg
+ *
+ */
+
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm.h"
+
+
+msg_mme_t msg_cm_conn_new_cnf_1 =
+{
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // ODA
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // OSA
+ 0, // vlan tag
+ 0x88E1,
+ 0, // mmv
+ CM_CONN_NEW_CNF,
+ {0,0,0},
+ {
+ 0x53, // CID (=0x5325)
+ 0x25, // CID
+ 0x25, // LLID-R (=0x25)
+ 0x04, // Result
+ 0x01, // CSPEC Length :338 bytes
+ 0x54, // CSPEC Length :
+ CINFO_VALID, // CINFO Valid? CINFO Forward
+ MAC_CONTENTION, // Mac Service Type
+ USER_PRIORITY_CAP0, // User Priori ty
+ ATS_FOR_HLE, // Arrival Time Stamp
+ SMOOTHING_REQUESTED, // Smoothing
+ CINFO_VALID, // CINFO Valid? CINFO Reverse
+ MAC_CONTENTION, // Mac Service Type
+ USER_PRIORITY_CAP0, // User Priority
+ ATS_FOR_HLE, // Arrival Time Stamp
+ SMOOTHING_REQUESTED, // Smoothing
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x00, // FID: Delay bound
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x01, // FID: Jitter bound
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x02, // FID: Average MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x03, // FID: Maximum MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x04, // FID: Average Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x05, // FID: Minimum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x06, // FID: Maximum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x07, // FID: Maximum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x08, // FID: Minimum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x09, // FID: Maximum Burst Size
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x0A, // FID: Exception Policy
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x0B, // FID: inactivity_interval
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x0C, // FID: MSDU Error Rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x0D, // FID: CLST
+ 0x00, // QMP BODY
+ QMP_FORWARD,
+ 0x0E, // QMP body length
+ 0x0E, // FID: CDESC
+ 0x00, // IP Version 4
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x0F, // source port
+ 0xF1, // source port
+ 0x01, // Dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0xFF, // dest port
+ 0xF1, // dest port
+ 0x00, // ip proto type
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x10, // FID: ATS Tolerance
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x11, // FID: Smallest tolerable Average data rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x12, // FID: Original Average data rate
+ 0x00, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x13, // FID: rx_window_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x03, // QMP body length
+ 0x14, // FID: smoothing_buffer_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x15, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x80, // FID: TXOPs per Beacon Period
+ 0x15, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x81, // FID: Average Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x82, // FID: Minimum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x83, // FID: Maximum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x84, // FID: PPB_Threshold
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x85, // 0x0FID: Surplus Bandwidth
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x87, // FID: Smallest Tolerable Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x88, // FID: Original Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x89, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x00, // FID: Delay bound
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x01, // FID: Jitter bound
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x02, // FID: Average MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x03, // FID: Maximum MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x04, // FID: Average Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x05, // FID: Minimum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x06, // FID: Maximum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x07, // FID: Maximum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x08, // FID: Minimum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x09, // FID: Maximum Burst Size
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x0A, // FID: Exception Policy
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x0B, // FID: inactivity_interval
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x0C, // FID: MSDU Error Rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x0D, // FID: CLST
+ 0x00, // QMP BODY
+ QMP_REVERSE,
+ 0x0E, // QMP body length
+ 0x0E, // FID: CDESC
+ 0x00, // IP Version 4
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x0F, // source port
+ 0xF1, // source port
+ 0x01, // Dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0xFF, // dest port
+ 0xF1, // dest port
+ 0x00, // ip proto type
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x10, // FID: ATS Tolerance
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x11, // FID: Smallest tolerable Average data rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x12, // FID: Original Average data rate
+ 0x00, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x13, // FID: rx_window_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x03, // QMP body length
+ 0x14, // FID: smoothing_buffer_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x15, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x80, // FID: TXOPs per Beacon Period
+ 0x15, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x81, // FID: Average Number of PBs per TXOP
+ 0x10, // QMP BODY copy
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x82, // FID: Minimum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x83, // FID: Maximum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x84, // FID: PPB_Threshold
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x85, // FID: Surplus Bandwidth
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x87, // FID: Smallest Tolerable Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x88, // FID: Original Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x89, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ }
+};
+
+
+
+msg_mme_t msg_cm_conn_new_cnf_2 =
+{
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // ODA
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // OSA
+ 0, // vlan tag
+ 0x88E1,
+ 0, // mmv
+ CM_CONN_NEW_CNF,
+ {0,0,0},
+ {
+ 0x53, // CID (=0x5325)
+ 0x25, // CID
+ 0x25, // LLID-R (=0x25)
+ 0x00 // Result (=success)
+ }
+};
+
+void
+test_msg_cm_conn_new_cnf_set_on_mme_msg(test_t t)
+{
+ msg_cm_conn_new_cnf_t msg;
+
+ test_case_begin(t, "TEST msg_cm_conn_new_cnf_set_on_mme_msg");
+
+ test_begin(t, "test case 1")
+ {
+
+ msg_cm_conn_new_cnf_init(&msg);
+
+
+
+ msg.cid = 0x5325;
+ msg.llid_r = 0x25;
+ msg.result = CONN_FAILURE_OTHER;
+ msg.cspec_proposed.cinfo_forward.valid = CINFO_VALID;
+ msg.cspec_proposed.cinfo_forward.mac_service_type = MAC_CONTENTION;
+ msg.cspec_proposed.cinfo_forward.user_priority = USER_PRIORITY_CAP0;
+ msg.cspec_proposed.cinfo_forward.ats = ATS_FOR_HLE;
+ msg.cspec_proposed.cinfo_forward.smoothing = SMOOTHING_REQUESTED;
+
+ msg.cspec_proposed.cinfo_reverse.valid = CINFO_VALID;
+ msg.cspec_proposed.cinfo_reverse.mac_service_type = MAC_CONTENTION;
+ msg.cspec_proposed.cinfo_reverse.user_priority = USER_PRIORITY_CAP0;
+ msg.cspec_proposed.cinfo_reverse.ats = ATS_FOR_HLE;
+ msg.cspec_proposed.cinfo_reverse.smoothing = SMOOTHING_REQUESTED;
+
+ msg.cspec_proposed.qmp_forward.valid.delay_bound_available = true;
+ msg.cspec_proposed.qmp_forward.valid.jitter_bound_available = true;
+ msg.cspec_proposed.qmp_forward.valid.average_msdu_size_available = true;
+ msg.cspec_proposed.qmp_forward.valid.maximum_msdu_size_available = true;
+ msg.cspec_proposed.qmp_forward.valid.average_data_rate_available = true;
+ msg.cspec_proposed.qmp_forward.valid.minimum_data_rate_available = true;
+ msg.cspec_proposed.qmp_forward.valid.maximum_data_rate_available = true;
+ msg.cspec_proposed.qmp_forward.valid.minimum_inter_txop_time_available = true;
+ msg.cspec_proposed.qmp_forward.valid.maximum_inter_txop_time_available = true;
+ msg.cspec_proposed.qmp_forward.valid.maximum_burst_size_available = true;
+ msg.cspec_proposed.qmp_forward.valid.exception_policy_available = true;
+ msg.cspec_proposed.qmp_forward.valid.inactivity_interval_available = true;
+ msg.cspec_proposed.qmp_forward.valid.msdu_error_rate_available = true;
+ msg.cspec_proposed.qmp_forward.valid.clst_available = true;
+ msg.cspec_proposed.qmp_forward.valid.cdesc_available = true;
+ msg.cspec_proposed.qmp_forward.valid.ats_tolerance_available = true;
+ msg.cspec_proposed.qmp_forward.valid.smallest_tolerable_data_rate_available = true;
+ msg.cspec_proposed.qmp_forward.valid.original_average_data_rate_available = true;
+ msg.cspec_proposed.qmp_forward.valid.rx_window_size_available = true;
+ msg.cspec_proposed.qmp_forward.valid.smoothing_buffer_size_available = true;
+ msg.cspec_proposed.qmp_forward.valid.bidirectional_burst_available = true;
+ msg.cspec_proposed.qmp_forward.valid.txops_per_beacon_period_available = true;
+ msg.cspec_proposed.qmp_forward.valid.average_number_of_pbs_per_txop_available = true;
+ msg.cspec_proposed.qmp_forward.valid.minimum_number_of_pbs_per_txop_available = true;
+ msg.cspec_proposed.qmp_forward.valid.maximum_number_of_pbs_per_txop_available = true;
+ msg.cspec_proposed.qmp_forward.valid.ppb_threshold_available = true;
+ msg.cspec_proposed.qmp_forward.valid.surplus_bandwith_available = true;
+ msg.cspec_proposed.qmp_forward.valid.smallest_tolerable_average_number_of_pbs_per_txop_available = true;
+ msg.cspec_proposed.qmp_forward.valid.original_average_number_of_pbs_per_txop_available = true;
+ msg.cspec_proposed.qmp_forward.valid.cco_bidirectional_burst_available = true;
+ msg.cspec_proposed.qmp_forward.cm.delay_bound = 0x01010101;
+ msg.cspec_proposed.qmp_forward.cm.jitter_bound = 0x10101010;
+ msg.cspec_proposed.qmp_forward.cm.average_msdu_size = 0XF0F0;
+ msg.cspec_proposed.qmp_forward.cm.maximum_msdu_size = 0XF0F0;
+ msg.cspec_proposed.qmp_forward.cm.average_data_rate = 0x0F0F;
+ msg.cspec_proposed.qmp_forward.cm.minimum_data_rate = 0x0F0F;
+ msg.cspec_proposed.qmp_forward.cm.maximum_data_rate = 0x0F0F;
+ msg.cspec_proposed.qmp_forward.cm.maximum_inter_txop_time = 0xFFFF;
+ msg.cspec_proposed.qmp_forward.cm.minimum_inter_txop_time = 0xFFFF;
+ msg.cspec_proposed.qmp_forward.cm.maximum_burst_size = 0x00FF;
+ msg.cspec_proposed.qmp_forward.cm.exception_policy = EXCEPTION_RECONFIGURE_CONNEXION;
+ msg.cspec_proposed.qmp_forward.cm.inactivity_interval = 0X00FF00FF;
+ msg.cspec_proposed.qmp_forward.cm.msdu_error_rate = 0x00FF;
+ msg.cspec_proposed.qmp_forward.cm.clst = 0x00;
+ msg.cspec_proposed.qmp_forward.cm.cdesc.ip_version = 0x00;
+ msg.cspec_proposed.qmp_forward.cm.cdesc.ipv4_source_address[0] = 0x01;
+ msg.cspec_proposed.qmp_forward.cm.cdesc.ipv4_source_address[1] = 0x01;
+ msg.cspec_proposed.qmp_forward.cm.cdesc.ipv4_source_address[2] = 0x01;
+ msg.cspec_proposed.qmp_forward.cm.cdesc.ipv4_source_address[3] = 0x01;
+ msg.cspec_proposed.qmp_forward.cm.cdesc.source_port = 0x0FF1;
+ msg.cspec_proposed.qmp_forward.cm.cdesc.ipv4_destination_address[0] = 0x01;
+ msg.cspec_proposed.qmp_forward.cm.cdesc.ipv4_destination_address[1] = 0x01;
+ msg.cspec_proposed.qmp_forward.cm.cdesc.ipv4_destination_address[2] = 0x01;
+ msg.cspec_proposed.qmp_forward.cm.cdesc.ipv4_destination_address[3] = 0x01;
+ msg.cspec_proposed.qmp_forward.cm.cdesc.destination_port = 0xFFF1;
+ msg.cspec_proposed.qmp_forward.cm.cdesc.protocol_type = 0x00;
+ msg.cspec_proposed.qmp_forward.cm.ats_tolerance = 0x00FF;
+ msg.cspec_proposed.qmp_forward.cm.smallest_tolerable_data_rate = 0x00FF;
+ msg.cspec_proposed.qmp_forward.cm.original_average_data_rate = 0x000F;
+ msg.cspec_proposed.qmp_forward.cm.rx_window_size = 0x100F;
+ msg.cspec_proposed.qmp_forward.cm.smoothing_buffer_size = 0x100F10;
+ msg.cspec_proposed.qmp_forward.cm.bidirectional_burst = 0x01;
+ msg.cspec_proposed.qmp_forward.cco.txops_per_beacon_period = 0x15;
+ msg.cspec_proposed.qmp_forward.cco.average_number_of_pbs_per_txop = 0x100F;
+ msg.cspec_proposed.qmp_forward.cco.minimum_number_of_pbs_per_txop = 0x100F;
+ msg.cspec_proposed.qmp_forward.cco.maximum_number_of_pbs_per_txop = 0x100F;
+ msg.cspec_proposed.qmp_forward.cco.ppb_threshold = 0x0FF0;
+ msg.cspec_proposed.qmp_forward.cco.surplus_bandwith = 0x0FF0;
+ msg.cspec_proposed.qmp_forward.cco.smallest_tolerable_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.cspec_proposed.qmp_forward.cco.original_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.cspec_proposed.qmp_forward.cco.cco_bidirectional_burst = 0x01;
+
+ msg.cspec_proposed.qmp_reverse.valid.delay_bound_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.jitter_bound_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.average_msdu_size_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.maximum_msdu_size_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.average_data_rate_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.minimum_data_rate_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.maximum_data_rate_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.minimum_inter_txop_time_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.maximum_inter_txop_time_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.maximum_burst_size_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.exception_policy_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.inactivity_interval_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.msdu_error_rate_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.clst_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.cdesc_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.ats_tolerance_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.smallest_tolerable_data_rate_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.original_average_data_rate_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.rx_window_size_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.smoothing_buffer_size_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.bidirectional_burst_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.txops_per_beacon_period_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.average_number_of_pbs_per_txop_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.minimum_number_of_pbs_per_txop_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.maximum_number_of_pbs_per_txop_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.ppb_threshold_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.surplus_bandwith_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.smallest_tolerable_average_number_of_pbs_per_txop_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.original_average_number_of_pbs_per_txop_available = true;
+ msg.cspec_proposed.qmp_reverse.valid.cco_bidirectional_burst_available = true;
+ msg.cspec_proposed.qmp_reverse.cm.delay_bound = 0x01010101;
+ msg.cspec_proposed.qmp_reverse.cm.jitter_bound = 0x10101010;
+ msg.cspec_proposed.qmp_reverse.cm.average_msdu_size = 0XF0F0;
+ msg.cspec_proposed.qmp_reverse.cm.maximum_msdu_size = 0XF0F0;
+ msg.cspec_proposed.qmp_reverse.cm.average_data_rate = 0x0F0F;
+ msg.cspec_proposed.qmp_reverse.cm.minimum_data_rate = 0x0F0F;
+ msg.cspec_proposed.qmp_reverse.cm.maximum_data_rate = 0x0F0F;
+ msg.cspec_proposed.qmp_reverse.cm.maximum_inter_txop_time = 0xFFFF;
+ msg.cspec_proposed.qmp_reverse.cm.minimum_inter_txop_time = 0xFFFF;
+ msg.cspec_proposed.qmp_reverse.cm.maximum_burst_size = 0x00FF;
+ msg.cspec_proposed.qmp_reverse.cm.exception_policy = EXCEPTION_RECONFIGURE_CONNEXION;
+ msg.cspec_proposed.qmp_reverse.cm.inactivity_interval = 0X00FF00FF;
+ msg.cspec_proposed.qmp_reverse.cm.msdu_error_rate = 0x00FF;
+ msg.cspec_proposed.qmp_reverse.cm.clst = 0x00;
+ msg.cspec_proposed.qmp_reverse.cm.cdesc.ip_version = 0x00;
+ msg.cspec_proposed.qmp_reverse.cm.cdesc.ipv4_source_address[0] = 0x01;
+ msg.cspec_proposed.qmp_reverse.cm.cdesc.ipv4_source_address[1] = 0x01;
+ msg.cspec_proposed.qmp_reverse.cm.cdesc.ipv4_source_address[2] = 0x01;
+ msg.cspec_proposed.qmp_reverse.cm.cdesc.ipv4_source_address[3] = 0x01;
+ msg.cspec_proposed.qmp_reverse.cm.cdesc.source_port = 0x0FF1;
+ msg.cspec_proposed.qmp_reverse.cm.cdesc.ipv4_destination_address[0] = 0x01;
+ msg.cspec_proposed.qmp_reverse.cm.cdesc.ipv4_destination_address[1] = 0x01;
+ msg.cspec_proposed.qmp_reverse.cm.cdesc.ipv4_destination_address[2] = 0x01;
+ msg.cspec_proposed.qmp_reverse.cm.cdesc.ipv4_destination_address[3] = 0x01;
+ msg.cspec_proposed.qmp_reverse.cm.cdesc.destination_port = 0xFFF1;
+ msg.cspec_proposed.qmp_reverse.cm.cdesc.protocol_type = 0x00;
+ msg.cspec_proposed.qmp_reverse.cm.ats_tolerance = 0x00FF;
+ msg.cspec_proposed.qmp_reverse.cm.smallest_tolerable_data_rate = 0x00FF;
+ msg.cspec_proposed.qmp_reverse.cm.original_average_data_rate = 0x000F;
+ msg.cspec_proposed.qmp_reverse.cm.rx_window_size = 0x100F;
+ msg.cspec_proposed.qmp_reverse.cm.smoothing_buffer_size = 0x100F10;
+ msg.cspec_proposed.qmp_reverse.cm.bidirectional_burst = 0x01;
+ msg.cspec_proposed.qmp_reverse.cco.txops_per_beacon_period = 0x15;
+ msg.cspec_proposed.qmp_reverse.cco.average_number_of_pbs_per_txop = 0x100F;
+ msg.cspec_proposed.qmp_reverse.cco.minimum_number_of_pbs_per_txop = 0x100F;
+ msg.cspec_proposed.qmp_reverse.cco.maximum_number_of_pbs_per_txop = 0x100F;
+ msg.cspec_proposed.qmp_reverse.cco.ppb_threshold = 0x0FF0;
+ msg.cspec_proposed.qmp_reverse.cco.surplus_bandwith = 0x0FF0;
+ msg.cspec_proposed.qmp_reverse.cco.smallest_tolerable_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.cspec_proposed.qmp_reverse.cco.original_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.cspec_proposed.qmp_reverse.cco.cco_bidirectional_burst = 0x01;
+
+
+ {
+
+ msg_mme_t test_mme;
+
+ msg_cm_conn_new_cnf_set_on_mme_msg(&test_mme, &msg);
+
+
+ int i;
+
+ for(i=0; i < 378; i++)
+ {
+ test_fail_unless(test_mme.mm_entry[i] == msg_cm_conn_new_cnf_1.mm_entry[i], "Error on test_mme in item %i test = 0x%x msg = 0x%x\n",i,test_mme.mm_entry[i],msg_cm_conn_new_cnf_1.mm_entry[i]);
+ }
+ }
+
+
+ }test_end;
+
+
+ test_begin(t, "test case 2")
+ {
+
+ msg_cm_conn_new_cnf_init(&msg);
+ msg.cid = 0x5325;
+ msg.llid_r = 0x25;
+ msg.result = CONN_SUCCESS;
+
+ {
+ msg_mme_t test_mme;
+ int i;
+
+ msg_cm_conn_new_cnf_set_on_mme_msg(&test_mme, &msg);
+
+ for(i=0; i < 3; i++)
+ {
+ test_fail_unless(test_mme.mm_entry[i] == msg_cm_conn_new_cnf_2.mm_entry[i], "Error on test_mme in item %i test = 0x%x msg = 0x%x\n",i,test_mme.mm_entry[i],msg_cm_conn_new_cnf_2.mm_entry[i]);
+ }
+ }
+
+
+
+
+ }test_end;
+
+
+}
+
+
+void
+test_msg_cm_conn_new_cnf_get_from_mme_msg(test_t t)
+{
+ msg_cm_conn_new_cnf_t msg;
+
+ test_case_begin(t, "TEST msg_cm_conn_new_cnf_get_from_mme_msg");
+
+ test_begin(t, "test case 1")
+ {
+ msg_cm_conn_new_cnf_init(&msg);
+
+ msg_cm_conn_new_cnf_get_from_mme_msg(&msg_cm_conn_new_cnf_1, &msg);
+
+ test_fail_unless( msg.cid == 0x5325 );
+ test_fail_unless( msg.llid_r == 0x25 );
+ test_fail_unless( msg.result == CONN_FAILURE_OTHER );
+ test_fail_unless(msg.cspec_proposed.cinfo_forward.valid == CINFO_VALID );
+ test_fail_unless(msg.cspec_proposed.cinfo_forward.mac_service_type == MAC_CONTENTION);
+ test_fail_unless(msg.cspec_proposed.cinfo_forward.user_priority == USER_PRIORITY_CAP0);
+ test_fail_unless(msg.cspec_proposed.cinfo_forward.ats == ATS_FOR_HLE);
+ test_fail_unless(msg.cspec_proposed.cinfo_forward.smoothing = SMOOTHING_REQUESTED);
+
+ test_fail_unless(msg.cspec_proposed.cinfo_reverse.valid == CINFO_VALID );
+ test_fail_unless(msg.cspec_proposed.cinfo_reverse.mac_service_type == MAC_CONTENTION);
+ test_fail_unless(msg.cspec_proposed.cinfo_reverse.user_priority == USER_PRIORITY_CAP0);
+ test_fail_unless(msg.cspec_proposed.cinfo_reverse.ats == ATS_FOR_HLE);
+ test_fail_unless(msg.cspec_proposed.cinfo_reverse.smoothing = SMOOTHING_REQUESTED);
+
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.delay_bound_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.jitter_bound_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.average_msdu_size_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.maximum_msdu_size_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.average_data_rate_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.minimum_data_rate_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.maximum_data_rate_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.minimum_inter_txop_time_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.maximum_inter_txop_time_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.maximum_burst_size_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.exception_policy_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.inactivity_interval_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.msdu_error_rate_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.clst_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.cdesc_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.ats_tolerance_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.smallest_tolerable_data_rate_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.original_average_data_rate_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.rx_window_size_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.smoothing_buffer_size_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.bidirectional_burst_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.txops_per_beacon_period_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.minimum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.maximum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.ppb_threshold_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.surplus_bandwith_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.smallest_tolerable_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.original_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.cco_bidirectional_burst_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.delay_bound == 0x01010101);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.jitter_bound == 0x10101010);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.average_msdu_size == 0XF0F0);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.maximum_msdu_size == 0XF0F0);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.average_data_rate == 0x0F0F);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.minimum_data_rate == 0x0F0F);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.maximum_data_rate == 0x0F0F);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.maximum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.minimum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.maximum_burst_size == 0x00FF);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.exception_policy == EXCEPTION_RECONFIGURE_CONNEXION);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.inactivity_interval == 0X00FF00FF);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.msdu_error_rate == 0x00FF);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.clst == 0x00);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.cdesc.ip_version == 0x00);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.cdesc.ipv4_source_address[0] == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.cdesc.ipv4_source_address[1] == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.cdesc.ipv4_source_address[2] == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.cdesc.ipv4_source_address[3] == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.cdesc.source_port == 0x0FF1);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.cdesc.ipv4_destination_address[0] == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.cdesc.ipv4_destination_address[1] == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.cdesc.ipv4_destination_address[2] == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.cdesc.ipv4_destination_address[3] == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.cdesc.destination_port == 0xFFF1);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.cdesc.protocol_type == 0x00);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.ats_tolerance == 0x00FF);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.smallest_tolerable_data_rate == 0x00FF);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.original_average_data_rate == 0x000F);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.rx_window_size == 0x100F);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.smoothing_buffer_size == 0x100F10);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cm.bidirectional_burst == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cco.txops_per_beacon_period == 0x15);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cco.average_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cco.minimum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cco.maximum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cco.ppb_threshold == 0x0FF0);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cco.surplus_bandwith == 0x0FF0);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cco.smallest_tolerable_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cco.original_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.cco.cco_bidirectional_burst == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.delay_bound_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.jitter_bound_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.average_msdu_size_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.maximum_msdu_size_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.average_data_rate_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.minimum_data_rate_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.maximum_data_rate_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.minimum_inter_txop_time_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.maximum_inter_txop_time_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.maximum_burst_size_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.exception_policy_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.inactivity_interval_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.msdu_error_rate_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.clst_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.cdesc_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.ats_tolerance_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.smallest_tolerable_data_rate_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.original_average_data_rate_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.rx_window_size_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.smoothing_buffer_size_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.bidirectional_burst_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.minimum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.maximum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.ppb_threshold_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.surplus_bandwith_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.smallest_tolerable_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.original_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_forward.valid.cco_bidirectional_burst_available == true);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.delay_bound == 0x01010101);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.jitter_bound == 0x10101010);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.average_msdu_size == 0XF0F0);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.maximum_msdu_size == 0XF0F0);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.average_data_rate == 0x0F0F);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.minimum_data_rate == 0x0F0F);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.maximum_data_rate == 0x0F0F);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.maximum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.minimum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.maximum_burst_size == 0x00FF);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.exception_policy == EXCEPTION_RECONFIGURE_CONNEXION);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.inactivity_interval == 0X00FF00FF);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.msdu_error_rate == 0x00FF);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.clst == 0x00);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.cdesc.ip_version == 0x00);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.cdesc.ipv4_source_address[0] == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.cdesc.ipv4_source_address[1] == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.cdesc.ipv4_source_address[2] == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.cdesc.ipv4_source_address[3] == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.cdesc.source_port == 0x0FF1);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.cdesc.ipv4_destination_address[0] == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.cdesc.ipv4_destination_address[1] == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.cdesc.ipv4_destination_address[2] == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.cdesc.ipv4_destination_address[3] == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.cdesc.destination_port == 0xFFF1);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.cdesc.protocol_type == 0x00);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.ats_tolerance == 0x00FF);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.smallest_tolerable_data_rate == 0x00FF);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.original_average_data_rate == 0x000F);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.rx_window_size == 0x100F);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.smoothing_buffer_size == 0x100F10);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cm.bidirectional_burst == 0x01);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cco.txops_per_beacon_period == 0x15);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cco.average_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cco.minimum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cco.maximum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cco.ppb_threshold == 0x0FF0);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cco.surplus_bandwith == 0x0FF0);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cco.smallest_tolerable_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cco.original_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.cspec_proposed.qmp_reverse.cco.cco_bidirectional_burst == 0x01);
+
+
+ }test_end;
+
+ test_begin(t, "test case 2")
+ {
+
+ msg_cm_conn_new_cnf_init(&msg);
+
+ msg_cm_conn_new_cnf_get_from_mme_msg(&msg_cm_conn_new_cnf_2, &msg);
+
+
+ test_fail_unless( msg.cid == 0x5325 );
+ test_fail_unless( msg.llid_r == 0x25 );
+ test_fail_unless( msg.result == CONN_SUCCESS );
+
+
+ }test_end;
+}
+
+
+void
+test_msg_cm_conn_new_cnf(test_t t)
+{
+ dbg_assert(t);
+
+ test_suite_begin(t, "TEST MESSAGE CM_CONN_NEW_CNF");
+
+ test_msg_cm_conn_new_cnf_get_from_mme_msg(t);
+ test_msg_cm_conn_new_cnf_set_on_mme_msg(t);
+
+}
diff --git a/cesar/cp/msg/test/src/test_msg_cm_conn_new_req.c b/cesar/cp/msg/test/src/test_msg_cm_conn_new_req.c
new file mode 100644
index 0000000000..489a777cb0
--- /dev/null
+++ b/cesar/cp/msg/test/src/test_msg_cm_conn_new_req.c
@@ -0,0 +1,879 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file test_msg_cm_conn_new_req.c
+ * \brief File Description
+ * \ingroup cp/msg
+ *
+ */
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm.h"
+
+
+msg_mme_t msg_cm_conn_new_req =
+{
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // oda
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // osa
+ 0, // ieee tag
+ 0x88E1, // m_type
+ 0, // mmv
+ CM_CONN_NEW_REQ, // mm_types
+ { 0, 0, 0}, //fmi
+ {
+ 0x53, // CID
+ 0x53, //CID
+ 0x01, // CSPEC Length :338 bytes
+ 0x54, // CSPEC Length :
+ CINFO_VALID, // CINFO Valid? CINFO Forward
+ MAC_CONTENTION, // Mac Service Type
+ USER_PRIORITY_CAP0, // User Priori ty
+ ATS_FOR_HLE, // Arrival Time Stamp
+ SMOOTHING_REQUESTED, // Smoothing
+ CINFO_VALID, // CINFO Valid? CINFO Reverse
+ MAC_CONTENTION, // Mac Service Type
+ USER_PRIORITY_CAP0, // User Priority
+ ATS_FOR_HLE, // Arrival Time Stamp
+ SMOOTHING_REQUESTED, // Smoothing
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x00, // FID: Delay bound
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x01, // FID: Jitter bound
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x02, // FID: Average MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x03, // FID: Maximum MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x04, // FID: Average Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x05, // FID: Minimum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x06, // FID: Maximum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x07, // FID: Maximum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x08, // FID: Minimum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x09, // FID: Maximum Burst Size
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x0A, // FID: Exception Policy
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x0B, // FID: inactivity_interval
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x0C, // FID: MSDU Error Rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x0D, // FID: CLST
+ 0x00, // QMP BODY
+ QMP_FORWARD,
+ 0x0E, // QMP body length
+ 0x0E, // FID: CDESC
+ 0x00, // IP Version 4
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x0F, // source port
+ 0xF1, // source port
+ 0x01, // Dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0xFF, // dest port
+ 0xF1, // dest port
+ 0x00, // ip proto type
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x10, // FID: ATS Tolerance
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x11, // FID: Smallest tolerable Average data rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x12, // FID: Original Average data rate
+ 0x00, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x13, // FID: rx_window_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x03, // QMP body length
+ 0x14, // FID: smoothing_buffer_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x15, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x80, // FID: TXOPs per Beacon Period
+ 0x15, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x81, // FID: Average Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x82, // FID: Minimum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x83, // FID: Maximum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x84, // FID: PPB_Threshold
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x85, // FID: Surplus Bandwidth
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x87, // FID: Smallest Tolerable Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x88, // FID: Original Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x89, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x00, // FID: Delay bound
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x01, // FID: Jitter bound
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x02, // FID: Average MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x03, // FID: Maximum MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x04, // FID: Average Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x05, // FID: Minimum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x06, // FID: Maximum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x07, // FID: Maximum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x08, // FID: Minimum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x09, // FID: Maximum Burst Size
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x0A, // FID: Exception Policy
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x0B, // FID: inactivity_interval
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x0C, // FID: MSDU Error Rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x0D, // FID: CLST
+ 0x00, // QMP BODY
+ QMP_REVERSE,
+ 0x0E, // QMP body length
+ 0x0E, // FID: CDESC
+ 0x00, // IP Version 4
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x0F, // source port
+ 0xF1, // source port
+ 0x01, // Dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0xFF, // dest port
+ 0xF1, // dest port
+ 0x00, // ip proto type
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x10, // FID: ATS Tolerance
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x11, // FID: Smallest tolerable Average data rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x12, // FID: Original Average data rate
+ 0x00, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x13, // FID: rx_window_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x03, // QMP body length
+ 0x14, // FID: smoothing_buffer_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x15, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x80, // FID: TXOPs per Beacon Period
+ 0x15, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x81, // FID: Average Number of PBs per TXOP
+ 0x10, // QMP BODY copy
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x82, // FID: Minimum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x83, // FID: Maximum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x84, // FID: PPB_Threshold
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x85, // FID: Surplus Bandwidth
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x87, // FID: Smallest Tolerable Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x88, // FID: Original Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x89, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ 0x00, // Classifier Version Classifier_rule
+ 0x08, // Number of classifier rule
+ 0x00, // Classifier Rule identifier //Ethernet Destination Address
+ 0x01, // Classifier Rule data
+ 0x02, // Classifier Rule data
+ 0x03, // Classifier Rule data
+ 0x04, // Classifier Rule data
+ 0x05, // Classifier Rule data
+ 0x06, // Classifier Rule data
+ 0x01, // Classifier Rule identifier //Ethernet Source Address
+ 0x06, // Classifier Rule data
+ 0x05, // Classifier Rule data
+ 0x04, // Classifier Rule data
+ 0x03, // Classifier Rule data
+ 0x02, // Classifier Rule data
+ 0x01, // Classifier Rule data
+ 0X04, // Classifier Rule identifier //IPV4 type of service
+ 0x08, // Classifier Rule data
+ 0x05, // Classifier Rule identifier //IPV4 Proto
+ 0x02, // Classifier Rule data
+ 0x06, // Classifier Rule identifier //IPV4 source addr
+ 0x04, // Classifier Rule data
+ 0x04, // Classifier Rule data
+ 0x04, // Classifier Rule data
+ 0x04, // Classifier Rule data
+ 0x07, // Classifier Rule identifier //IPV4 destination addr
+ 0x34, // Classifier Rule data
+ 0x34, // Classifier Rule data
+ 0x34, // Classifier Rule data
+ 0x34, // Classifier Rule data
+ 0x0C, // Classifier Rule identifier //TCP Source port
+ 0x54, // Classifier Rule data
+ 0X32,
+ 0x0D, // Classifier Rule identifier //TCP Destination Port
+ 0x34, // Classifier Rule data
+ 0x54, // Classifier Rule data
+
+}};
+
+
+
+void
+test_msg_cm_conn_new_req_get_from_mme_msg(test_t t)
+{
+ msg_cm_conn_new_req_t msg;
+
+ test_case_begin(t, "TEST msg_cm_conn_new_req_get_from_mme_msg");
+
+ test_begin(t, "test case 1")
+ {
+
+ msg_cm_conn_new_req_init(&msg);
+
+ msg_cm_conn_new_req_get_from_mme_msg(&(msg_cm_conn_new_req), &msg);
+
+ test_fail_unless(msg.cid == 0x5353);
+
+ test_fail_unless(msg.cspec.cinfo_forward.valid == CINFO_VALID );
+ test_fail_unless(msg.cspec.cinfo_forward.mac_service_type == MAC_CONTENTION);
+ test_fail_unless(msg.cspec.cinfo_forward.user_priority == USER_PRIORITY_CAP0);
+ test_fail_unless(msg.cspec.cinfo_forward.ats == ATS_FOR_HLE);
+ test_fail_unless(msg.cspec.cinfo_forward.smoothing = SMOOTHING_REQUESTED);
+
+ test_fail_unless(msg.cspec.cinfo_reverse.valid == CINFO_VALID );
+ test_fail_unless(msg.cspec.cinfo_reverse.mac_service_type == MAC_CONTENTION);
+ test_fail_unless(msg.cspec.cinfo_reverse.user_priority == USER_PRIORITY_CAP0);
+ test_fail_unless(msg.cspec.cinfo_reverse.ats == ATS_FOR_HLE);
+ test_fail_unless(msg.cspec.cinfo_reverse.smoothing = SMOOTHING_REQUESTED);
+
+ test_fail_unless( msg.cspec.qmp_forward.valid.delay_bound_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.jitter_bound_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.average_msdu_size_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.maximum_msdu_size_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.average_data_rate_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.minimum_data_rate_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.maximum_data_rate_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.minimum_inter_txop_time_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.maximum_inter_txop_time_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.maximum_burst_size_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.exception_policy_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.inactivity_interval_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.msdu_error_rate_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.clst_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.cdesc_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.ats_tolerance_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.smallest_tolerable_data_rate_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.original_average_data_rate_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.rx_window_size_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.smoothing_buffer_size_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.bidirectional_burst_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.txops_per_beacon_period_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.minimum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.maximum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.ppb_threshold_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.surplus_bandwith_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.smallest_tolerable_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.original_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.cco_bidirectional_burst_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.cm.delay_bound == 0x01010101);
+ test_fail_unless( msg.cspec.qmp_forward.cm.jitter_bound == 0x10101010);
+ test_fail_unless( msg.cspec.qmp_forward.cm.average_msdu_size == 0XF0F0);
+ test_fail_unless( msg.cspec.qmp_forward.cm.maximum_msdu_size == 0XF0F0);
+ test_fail_unless( msg.cspec.qmp_forward.cm.average_data_rate == 0x0F0F);
+ test_fail_unless( msg.cspec.qmp_forward.cm.minimum_data_rate == 0x0F0F);
+ test_fail_unless( msg.cspec.qmp_forward.cm.maximum_data_rate == 0x0F0F);
+ test_fail_unless( msg.cspec.qmp_forward.cm.maximum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.cspec.qmp_forward.cm.minimum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.cspec.qmp_forward.cm.maximum_burst_size == 0x00FF);
+ test_fail_unless( msg.cspec.qmp_forward.cm.exception_policy == EXCEPTION_RECONFIGURE_CONNEXION);
+ test_fail_unless( msg.cspec.qmp_forward.cm.inactivity_interval == 0X00FF00FF);
+ test_fail_unless( msg.cspec.qmp_forward.cm.msdu_error_rate == 0x00FF);
+ test_fail_unless( msg.cspec.qmp_forward.cm.clst == 0x00);
+ test_fail_unless( msg.cspec.qmp_forward.cm.cdesc.ip_version == 0x00);
+ test_fail_unless( msg.cspec.qmp_forward.cm.cdesc.ipv4_source_address[0] == 0x01);
+ test_fail_unless( msg.cspec.qmp_forward.cm.cdesc.ipv4_source_address[1] == 0x01);
+ test_fail_unless( msg.cspec.qmp_forward.cm.cdesc.ipv4_source_address[2] == 0x01);
+ test_fail_unless( msg.cspec.qmp_forward.cm.cdesc.ipv4_source_address[3] == 0x01);
+ test_fail_unless( msg.cspec.qmp_forward.cm.cdesc.source_port == 0x0FF1);
+ test_fail_unless( msg.cspec.qmp_forward.cm.cdesc.ipv4_destination_address[0] == 0x01);
+ test_fail_unless( msg.cspec.qmp_forward.cm.cdesc.ipv4_destination_address[1] == 0x01);
+ test_fail_unless( msg.cspec.qmp_forward.cm.cdesc.ipv4_destination_address[2] == 0x01);
+ test_fail_unless( msg.cspec.qmp_forward.cm.cdesc.ipv4_destination_address[3] == 0x01);
+ test_fail_unless( msg.cspec.qmp_forward.cm.cdesc.destination_port == 0xFFF1);
+ test_fail_unless( msg.cspec.qmp_forward.cm.cdesc.protocol_type == 0x00);
+ test_fail_unless( msg.cspec.qmp_forward.cm.ats_tolerance == 0x00FF);
+ test_fail_unless( msg.cspec.qmp_forward.cm.smallest_tolerable_data_rate == 0x00FF);
+ test_fail_unless( msg.cspec.qmp_forward.cm.original_average_data_rate == 0x000F);
+ test_fail_unless( msg.cspec.qmp_forward.cm.rx_window_size == 0x100F);
+ test_fail_unless( msg.cspec.qmp_forward.cm.smoothing_buffer_size == 0x100F10);
+ test_fail_unless( msg.cspec.qmp_forward.cm.bidirectional_burst == 0x01);
+ test_fail_unless( msg.cspec.qmp_forward.cco.txops_per_beacon_period == 0x15);
+ test_fail_unless( msg.cspec.qmp_forward.cco.average_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.cspec.qmp_forward.cco.minimum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.cspec.qmp_forward.cco.maximum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.cspec.qmp_forward.cco.ppb_threshold == 0x0FF0);
+ test_fail_unless( msg.cspec.qmp_forward.cco.surplus_bandwith == 0x0FF0);
+ test_fail_unless( msg.cspec.qmp_forward.cco.smallest_tolerable_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.cspec.qmp_forward.cco.original_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.cspec.qmp_forward.cco.cco_bidirectional_burst == 0x01);
+
+ test_fail_unless( msg.cspec.qmp_forward.valid.delay_bound_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.jitter_bound_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.average_msdu_size_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.maximum_msdu_size_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.average_data_rate_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.minimum_data_rate_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.maximum_data_rate_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.minimum_inter_txop_time_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.maximum_inter_txop_time_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.maximum_burst_size_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.exception_policy_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.inactivity_interval_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.msdu_error_rate_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.clst_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.cdesc_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.ats_tolerance_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.smallest_tolerable_data_rate_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.original_average_data_rate_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.rx_window_size_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.smoothing_buffer_size_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.bidirectional_burst_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.txops_per_beacon_period_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.minimum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.maximum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.ppb_threshold_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.surplus_bandwith_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.smallest_tolerable_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.original_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.cspec.qmp_forward.valid.cco_bidirectional_burst_available == true);
+
+ test_fail_unless( msg.cspec.qmp_reverse.cm.delay_bound == 0x01010101);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.jitter_bound == 0x10101010);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.average_msdu_size == 0XF0F0);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.maximum_msdu_size == 0XF0F0);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.average_data_rate == 0x0F0F);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.minimum_data_rate == 0x0F0F);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.maximum_data_rate == 0x0F0F);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.maximum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.minimum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.maximum_burst_size == 0x00FF);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.exception_policy == EXCEPTION_RECONFIGURE_CONNEXION);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.inactivity_interval == 0X00FF00FF);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.msdu_error_rate == 0x00FF);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.clst == 0x00);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.cdesc.ip_version == 0x00);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.cdesc.ipv4_source_address[0] == 0x01);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.cdesc.ipv4_source_address[1] == 0x01);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.cdesc.ipv4_source_address[2] == 0x01);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.cdesc.ipv4_source_address[3] == 0x01);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.cdesc.source_port == 0x0FF1);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[0] == 0x01);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[1] == 0x01);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[2] == 0x01);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[3] == 0x01);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.cdesc.destination_port == 0xFFF1);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.cdesc.protocol_type == 0x00);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.ats_tolerance == 0x00FF);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.smallest_tolerable_data_rate == 0x00FF);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.original_average_data_rate == 0x000F);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.rx_window_size == 0x100F);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.smoothing_buffer_size == 0x100F10);
+ test_fail_unless( msg.cspec.qmp_reverse.cm.bidirectional_burst == 0x01);
+ test_fail_unless( msg.cspec.qmp_reverse.cco.txops_per_beacon_period == 0x15);
+ test_fail_unless( msg.cspec.qmp_reverse.cco.average_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.cspec.qmp_reverse.cco.minimum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.cspec.qmp_reverse.cco.maximum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.cspec.qmp_reverse.cco.ppb_threshold == 0x0FF0);
+ test_fail_unless( msg.cspec.qmp_reverse.cco.surplus_bandwith == 0x0FF0);
+ test_fail_unless( msg.cspec.qmp_reverse.cco.smallest_tolerable_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.cspec.qmp_reverse.cco.original_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.cspec.qmp_reverse.cco.cco_bidirectional_burst == 0x01);
+
+ test_fail_unless( msg.classifier_rule.classifier_version == CLASSIFIER_CURRENT_VERSION);
+ test_fail_unless( msg.classifier_rule.nbr_rules == 8 );
+ test_fail_unless( msg.classifier_rule.data.classifier_rules_available.ethernet_destination_address_field_available == 1 );
+ test_fail_unless( msg.classifier_rule.data.classifier_rules_available.ethernet_source_address_field_available == 1 );
+ test_fail_unless( msg.classifier_rule.data.classifier_rules_available.vlan_user_priority_field_available == 0 );
+ test_fail_unless( msg.classifier_rule.data.classifier_rules_available.vlan_id_field_available == 0 );
+ test_fail_unless( msg.classifier_rule.data.classifier_rules_available.ipv4_type_of_protocol_field_available == 1 );
+ test_fail_unless( msg.classifier_rule.data.classifier_rules_available.ipv4_protocol_field_available == 1 );
+ test_fail_unless( msg.classifier_rule.data.classifier_rules_available.ipv4_source_address_field_available == 1 );
+ test_fail_unless( msg.classifier_rule.data.classifier_rules_available.ipv4_destination_address_field_available == 1 );
+ test_fail_unless( msg.classifier_rule.data.classifier_rules_available.ipv6_traffic_class_field_available == 0 );
+ test_fail_unless( msg.classifier_rule.data.classifier_rules_available.ipv6_flow_label_field_available == 0 );
+ test_fail_unless( msg.classifier_rule.data.classifier_rules_available.ipv6_source_address_field_available == 0 );
+ test_fail_unless( msg.classifier_rule.data.classifier_rules_available.ipv6_destination_address_field_available == 0 );
+ test_fail_unless( msg.classifier_rule.data.classifier_rules_available.tcp_source_port_field_available == 1 );
+ test_fail_unless( msg.classifier_rule.data.classifier_rules_available.tcp_destination_port_field_available == 1 );
+ test_fail_unless( msg.classifier_rule.data.classifier_rules_available.udp_source_port_field_available == 0 );
+ test_fail_unless( msg.classifier_rule.data.classifier_rules_available.udp_destination_port_field_available == 0 );
+ test_fail_unless( msg.classifier_rule.data.ethernet_destination_address[0] == 0x01 );
+ test_fail_unless( msg.classifier_rule.data.ethernet_destination_address[1] == 0x02 );
+ test_fail_unless( msg.classifier_rule.data.ethernet_destination_address[2] == 0x03 );
+ test_fail_unless( msg.classifier_rule.data.ethernet_destination_address[3] == 0x04 );
+ test_fail_unless( msg.classifier_rule.data.ethernet_destination_address[4] == 0x05 );
+ test_fail_unless( msg.classifier_rule.data.ethernet_destination_address[5] == 0x06 );
+ test_fail_unless( msg.classifier_rule.data.ethernet_source_address[0] == 0x06 );
+ test_fail_unless( msg.classifier_rule.data.ethernet_source_address[1] == 0x05 );
+ test_fail_unless( msg.classifier_rule.data.ethernet_source_address[2] == 0x04 );
+ test_fail_unless( msg.classifier_rule.data.ethernet_source_address[3] == 0x03 );
+ test_fail_unless( msg.classifier_rule.data.ethernet_source_address[4] == 0x02 );
+ test_fail_unless( msg.classifier_rule.data.ethernet_source_address[5] == 0x01 );
+ test_fail_unless( msg.classifier_rule.data.ipv4_type_of_service == 0x08 );
+ test_fail_unless( msg.classifier_rule.data.ipv4_protocol == 0x02);
+ test_fail_unless( msg.classifier_rule.data.ipv4_source_address[0] == 0x04 );
+ test_fail_unless( msg.classifier_rule.data.ipv4_source_address[1] == 0x04 );
+ test_fail_unless( msg.classifier_rule.data.ipv4_source_address[2] == 0x04 );
+ test_fail_unless( msg.classifier_rule.data.ipv4_source_address[3] == 0x04 );
+ test_fail_unless( msg.classifier_rule.data.ipv4_destination_address[0] == 0x34 );
+ test_fail_unless( msg.classifier_rule.data.ipv4_destination_address[1] == 0x34 );
+ test_fail_unless( msg.classifier_rule.data.ipv4_destination_address[2] == 0x34 );
+ test_fail_unless( msg.classifier_rule.data.ipv4_destination_address[3] == 0x34 );
+ test_fail_unless( msg.classifier_rule.data.tcp_destination_port == 0x3454 );
+ test_fail_unless( msg.classifier_rule.data.tcp_source_port == 0x5432 );
+
+ }test_end;
+
+}
+
+
+void
+test_msg_cm_conn_new_req_set_on_mme_msg(test_t t)
+{
+ msg_cm_conn_new_req_t msg;
+ msg_mme_t test_mme;
+
+ test_case_begin(t, "TEST set_msg_cm_conn_new_req");
+
+ test_begin(t, "test case 1")
+ {
+
+ msg_cm_conn_new_req_init(&msg);
+
+ msg.cid = 0x5353;
+
+
+ msg.cspec.cinfo_forward.valid = CINFO_VALID;
+ msg.cspec.cinfo_forward.mac_service_type = MAC_CONTENTION;
+ msg.cspec.cinfo_forward.user_priority = USER_PRIORITY_CAP0;
+ msg.cspec.cinfo_forward.ats = ATS_FOR_HLE;
+ msg.cspec.cinfo_forward.smoothing = SMOOTHING_REQUESTED;
+
+ msg.cspec.cinfo_reverse.valid = CINFO_VALID ;
+ msg.cspec.cinfo_reverse.mac_service_type = MAC_CONTENTION;
+ msg.cspec.cinfo_reverse.user_priority = USER_PRIORITY_CAP0;
+ msg.cspec.cinfo_reverse.ats = ATS_FOR_HLE;
+ msg.cspec.cinfo_reverse.smoothing = SMOOTHING_REQUESTED;
+
+ msg.cspec.qmp_forward.forward_or_reverse = QMP_FORWARD;
+ msg.cspec.qmp_forward.valid.delay_bound_available = true;
+ msg.cspec.qmp_forward.valid.jitter_bound_available = true;
+ msg.cspec.qmp_forward.valid.average_msdu_size_available = true;
+ msg.cspec.qmp_forward.valid.maximum_msdu_size_available = true;
+ msg.cspec.qmp_forward.valid.average_data_rate_available = true;
+ msg.cspec.qmp_forward.valid.minimum_data_rate_available = true;
+ msg.cspec.qmp_forward.valid.maximum_data_rate_available = true;
+ msg.cspec.qmp_forward.valid.minimum_inter_txop_time_available = true;
+ msg.cspec.qmp_forward.valid.maximum_inter_txop_time_available = true;
+ msg.cspec.qmp_forward.valid.maximum_burst_size_available = true;
+ msg.cspec.qmp_forward.valid.exception_policy_available = true;
+ msg.cspec.qmp_forward.valid.inactivity_interval_available = true;
+ msg.cspec.qmp_forward.valid.msdu_error_rate_available = true;
+ msg.cspec.qmp_forward.valid.clst_available = true;
+ msg.cspec.qmp_forward.valid.cdesc_available = true;
+ msg.cspec.qmp_forward.valid.ats_tolerance_available = true;
+ msg.cspec.qmp_forward.valid.smallest_tolerable_data_rate_available = true;
+ msg.cspec.qmp_forward.valid.original_average_data_rate_available = true;
+ msg.cspec.qmp_forward.valid.rx_window_size_available = true;
+ msg.cspec.qmp_forward.valid.smoothing_buffer_size_available = true;
+ msg.cspec.qmp_forward.valid.bidirectional_burst_available = true;
+ msg.cspec.qmp_forward.valid.txops_per_beacon_period_available = true;
+ msg.cspec.qmp_forward.valid.average_number_of_pbs_per_txop_available = true;
+ msg.cspec.qmp_forward.valid.minimum_number_of_pbs_per_txop_available = true;
+ msg.cspec.qmp_forward.valid.maximum_number_of_pbs_per_txop_available = true;
+ msg.cspec.qmp_forward.valid.ppb_threshold_available = true;
+ msg.cspec.qmp_forward.valid.surplus_bandwith_available = true;
+ msg.cspec.qmp_forward.valid.smallest_tolerable_average_number_of_pbs_per_txop_available = true;
+ msg.cspec.qmp_forward.valid.original_average_number_of_pbs_per_txop_available = true;
+ msg.cspec.qmp_forward.valid.cco_bidirectional_burst_available = true;
+ msg.cspec.qmp_forward.cm.delay_bound = 0x01010101;
+ msg.cspec.qmp_forward.cm.jitter_bound = 0x10101010;
+ msg.cspec.qmp_forward.cm.average_msdu_size = 0XF0F0;
+ msg.cspec.qmp_forward.cm.maximum_msdu_size = 0XF0F0;
+ msg.cspec.qmp_forward.cm.average_data_rate = 0x0F0F;
+ msg.cspec.qmp_forward.cm.minimum_data_rate = 0x0F0F;
+ msg.cspec.qmp_forward.cm.maximum_data_rate = 0x0F0F;
+ msg.cspec.qmp_forward.cm.maximum_inter_txop_time = 0xFFFF;
+ msg.cspec.qmp_forward.cm.minimum_inter_txop_time = 0xFFFF;
+ msg.cspec.qmp_forward.cm.maximum_burst_size = 0x00FF;
+ msg.cspec.qmp_forward.cm.exception_policy = EXCEPTION_RECONFIGURE_CONNEXION;
+ msg.cspec.qmp_forward.cm.inactivity_interval = 0X00FF00FF;
+ msg.cspec.qmp_forward.cm.msdu_error_rate = 0x00FF;
+ msg.cspec.qmp_forward.cm.clst = 0x00;
+ msg.cspec.qmp_forward.cm.cdesc.ip_version = 0x00;
+ msg.cspec.qmp_forward.cm.cdesc.ipv4_source_address[0] = 0x01;
+ msg.cspec.qmp_forward.cm.cdesc.ipv4_source_address[1] = 0x01;
+ msg.cspec.qmp_forward.cm.cdesc.ipv4_source_address[2] = 0x01;
+ msg.cspec.qmp_forward.cm.cdesc.ipv4_source_address[3] = 0x01;
+ msg.cspec.qmp_forward.cm.cdesc.source_port = 0x0FF1;
+ msg.cspec.qmp_forward.cm.cdesc.ipv4_destination_address[0] = 0x01;
+ msg.cspec.qmp_forward.cm.cdesc.ipv4_destination_address[1] = 0x01;
+ msg.cspec.qmp_forward.cm.cdesc.ipv4_destination_address[2] = 0x01;
+ msg.cspec.qmp_forward.cm.cdesc.ipv4_destination_address[3] = 0x01;
+ msg.cspec.qmp_forward.cm.cdesc.destination_port = 0xFFF1;
+ msg.cspec.qmp_forward.cm.cdesc.protocol_type = 0x00;
+ msg.cspec.qmp_forward.cm.ats_tolerance = 0x00FF;
+ msg.cspec.qmp_forward.cm.smallest_tolerable_data_rate = 0x00FF;
+ msg.cspec.qmp_forward.cm.original_average_data_rate = 0x000F;
+ msg.cspec.qmp_forward.cm.rx_window_size = 0x100F;
+ msg.cspec.qmp_forward.cm.smoothing_buffer_size = 0x100F10;
+ msg.cspec.qmp_forward.cm.bidirectional_burst = 0x01;
+ msg.cspec.qmp_forward.cco.txops_per_beacon_period = 0x15;
+ msg.cspec.qmp_forward.cco.average_number_of_pbs_per_txop = 0x100F;
+ msg.cspec.qmp_forward.cco.minimum_number_of_pbs_per_txop = 0x100F;
+ msg.cspec.qmp_forward.cco.maximum_number_of_pbs_per_txop = 0x100F;
+ msg.cspec.qmp_forward.cco.ppb_threshold = 0x0FF0;
+ msg.cspec.qmp_forward.cco.surplus_bandwith = 0x0FF0;
+ msg.cspec.qmp_forward.cco.smallest_tolerable_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.cspec.qmp_forward.cco.original_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.cspec.qmp_forward.cco.cco_bidirectional_burst = 0x01;
+
+ msg.cspec.qmp_reverse.forward_or_reverse = QMP_REVERSE;
+ msg.cspec.qmp_reverse.valid.delay_bound_available = true;
+ msg.cspec.qmp_reverse.valid.jitter_bound_available = true;
+ msg.cspec.qmp_reverse.valid.average_msdu_size_available = true;
+ msg.cspec.qmp_reverse.valid.maximum_msdu_size_available = true;
+ msg.cspec.qmp_reverse.valid.average_data_rate_available = true;
+ msg.cspec.qmp_reverse.valid.minimum_data_rate_available = true;
+ msg.cspec.qmp_reverse.valid.maximum_data_rate_available = true;
+ msg.cspec.qmp_reverse.valid.minimum_inter_txop_time_available = true;
+ msg.cspec.qmp_reverse.valid.maximum_inter_txop_time_available = true;
+ msg.cspec.qmp_reverse.valid.maximum_burst_size_available = true;
+ msg.cspec.qmp_reverse.valid.exception_policy_available = true;
+ msg.cspec.qmp_reverse.valid.inactivity_interval_available = true;
+ msg.cspec.qmp_reverse.valid.msdu_error_rate_available = true;
+ msg.cspec.qmp_reverse.valid.clst_available = true;
+ msg.cspec.qmp_reverse.valid.cdesc_available = true;
+ msg.cspec.qmp_reverse.valid.ats_tolerance_available = true;
+ msg.cspec.qmp_reverse.valid.smallest_tolerable_data_rate_available = true;
+ msg.cspec.qmp_reverse.valid.original_average_data_rate_available = true;
+ msg.cspec.qmp_reverse.valid.rx_window_size_available = true;
+ msg.cspec.qmp_reverse.valid.smoothing_buffer_size_available = true;
+ msg.cspec.qmp_reverse.valid.bidirectional_burst_available = true;
+ msg.cspec.qmp_reverse.valid.txops_per_beacon_period_available = true;
+ msg.cspec.qmp_reverse.valid.average_number_of_pbs_per_txop_available = true;
+ msg.cspec.qmp_reverse.valid.minimum_number_of_pbs_per_txop_available = true;
+ msg.cspec.qmp_reverse.valid.maximum_number_of_pbs_per_txop_available = true;
+ msg.cspec.qmp_reverse.valid.ppb_threshold_available = true;
+ msg.cspec.qmp_reverse.valid.surplus_bandwith_available = true;
+ msg.cspec.qmp_reverse.valid.smallest_tolerable_average_number_of_pbs_per_txop_available = true;
+ msg.cspec.qmp_reverse.valid.original_average_number_of_pbs_per_txop_available = true;
+ msg.cspec.qmp_reverse.valid.cco_bidirectional_burst_available = true;
+
+ msg.cspec.qmp_reverse.cm.delay_bound = 0x01010101;
+ msg.cspec.qmp_reverse.cm.jitter_bound = 0x10101010;
+ msg.cspec.qmp_reverse.cm.average_msdu_size = 0XF0F0;
+ msg.cspec.qmp_reverse.cm.maximum_msdu_size = 0XF0F0;
+ msg.cspec.qmp_reverse.cm.average_data_rate = 0x0F0F;
+ msg.cspec.qmp_reverse.cm.minimum_data_rate = 0x0F0F;
+ msg.cspec.qmp_reverse.cm.maximum_data_rate = 0x0F0F;
+ msg.cspec.qmp_reverse.cm.maximum_inter_txop_time = 0xFFFF;
+ msg.cspec.qmp_reverse.cm.minimum_inter_txop_time = 0xFFFF;
+ msg.cspec.qmp_reverse.cm.maximum_burst_size = 0x00FF;
+ msg.cspec.qmp_reverse.cm.exception_policy = EXCEPTION_RECONFIGURE_CONNEXION;
+ msg.cspec.qmp_reverse.cm.inactivity_interval = 0X00FF00FF;
+ msg.cspec.qmp_reverse.cm.msdu_error_rate = 0x00FF;
+ msg.cspec.qmp_reverse.cm.clst = 0x00;
+ msg.cspec.qmp_reverse.cm.cdesc.ip_version = 0x00;
+ msg.cspec.qmp_reverse.cm.cdesc.ipv4_source_address[0] = 0x01;
+ msg.cspec.qmp_reverse.cm.cdesc.ipv4_source_address[1] = 0x01;
+ msg.cspec.qmp_reverse.cm.cdesc.ipv4_source_address[2] = 0x01;
+ msg.cspec.qmp_reverse.cm.cdesc.ipv4_source_address[3] = 0x01;
+ msg.cspec.qmp_reverse.cm.cdesc.source_port = 0x0FF1;
+ msg.cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[0] = 0x01;
+ msg.cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[1] = 0x01;
+ msg.cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[2] = 0x01;
+ msg.cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[3] = 0x01;
+ msg.cspec.qmp_reverse.cm.cdesc.destination_port = 0xFFF1;
+ msg.cspec.qmp_reverse.cm.cdesc.protocol_type = 0x00;
+ msg.cspec.qmp_reverse.cm.ats_tolerance = 0x00FF;
+ msg.cspec.qmp_reverse.cm.smallest_tolerable_data_rate = 0x00FF;
+ msg.cspec.qmp_reverse.cm.original_average_data_rate = 0x000F;
+ msg.cspec.qmp_reverse.cm.rx_window_size = 0x100F;
+ msg.cspec.qmp_reverse.cm.smoothing_buffer_size = 0x100F10;
+ msg.cspec.qmp_reverse.cm.bidirectional_burst = 0x01;
+ msg.cspec.qmp_reverse.cco.txops_per_beacon_period = 0x15;
+ msg.cspec.qmp_reverse.cco.average_number_of_pbs_per_txop = 0x100F;
+ msg.cspec.qmp_reverse.cco.minimum_number_of_pbs_per_txop = 0x100F;
+ msg.cspec.qmp_reverse.cco.maximum_number_of_pbs_per_txop = 0x100F;
+ msg.cspec.qmp_reverse.cco.ppb_threshold = 0x0FF0;
+ msg.cspec.qmp_reverse.cco.surplus_bandwith = 0x0FF0;
+ msg.cspec.qmp_reverse.cco.smallest_tolerable_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.cspec.qmp_reverse.cco.original_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.cspec.qmp_reverse.cco.cco_bidirectional_burst = 0x01;
+
+ msg.classifier_rule.classifier_version = CLASSIFIER_CURRENT_VERSION;
+ msg.classifier_rule.nbr_rules = 8 ;
+ msg.classifier_rule.data.classifier_rules_available.ethernet_destination_address_field_available = 1 ;
+ msg.classifier_rule.data.classifier_rules_available.ethernet_source_address_field_available = 1 ;
+ msg.classifier_rule.data.classifier_rules_available.vlan_user_priority_field_available = 0 ;
+ msg.classifier_rule.data.classifier_rules_available.vlan_id_field_available = 0 ;
+ msg.classifier_rule.data.classifier_rules_available.ipv4_type_of_protocol_field_available = 1 ;
+ msg.classifier_rule.data.classifier_rules_available.ipv4_protocol_field_available = 1 ;
+ msg.classifier_rule.data.classifier_rules_available.ipv4_source_address_field_available = 1 ;
+ msg.classifier_rule.data.classifier_rules_available.ipv4_destination_address_field_available = 1 ;
+ msg.classifier_rule.data.classifier_rules_available.ipv6_traffic_class_field_available = 0 ;
+ msg.classifier_rule.data.classifier_rules_available.ipv6_flow_label_field_available = 0 ;
+ msg.classifier_rule.data.classifier_rules_available.ipv6_source_address_field_available = 0 ;
+ msg.classifier_rule.data.classifier_rules_available.ipv6_destination_address_field_available = 0 ;
+ msg.classifier_rule.data.classifier_rules_available.tcp_source_port_field_available = 1 ;
+ msg.classifier_rule.data.classifier_rules_available.tcp_destination_port_field_available = 1 ;
+ msg.classifier_rule.data.classifier_rules_available.udp_source_port_field_available = 0 ;
+ msg.classifier_rule.data.classifier_rules_available.udp_destination_port_field_available = 0 ;
+ msg.classifier_rule.data.ethernet_destination_address[0] = 0x01 ;
+ msg.classifier_rule.data.ethernet_destination_address[1] = 0x02 ;
+ msg.classifier_rule.data.ethernet_destination_address[2] = 0x03 ;
+ msg.classifier_rule.data.ethernet_destination_address[3] = 0x04 ;
+ msg.classifier_rule.data.ethernet_destination_address[4] = 0x05 ;
+ msg.classifier_rule.data.ethernet_destination_address[5] = 0x06 ;
+ msg.classifier_rule.data.ethernet_source_address[0] = 0x06 ;
+ msg.classifier_rule.data.ethernet_source_address[1] = 0x05 ;
+ msg.classifier_rule.data.ethernet_source_address[2] = 0x04 ;
+ msg.classifier_rule.data.ethernet_source_address[3] = 0x03 ;
+ msg.classifier_rule.data.ethernet_source_address[4] = 0x02 ;
+ msg.classifier_rule.data.ethernet_source_address[5] = 0x01 ;
+ msg.classifier_rule.data.ipv4_type_of_service = 0x08 ;
+ msg.classifier_rule.data.ipv4_protocol = 0x02;
+ msg.classifier_rule.data.ipv4_source_address[0] = 0x04 ;
+ msg.classifier_rule.data.ipv4_source_address[1] = 0x04 ;
+ msg.classifier_rule.data.ipv4_source_address[2] = 0x04 ;
+ msg.classifier_rule.data.ipv4_source_address[3] = 0x04 ;
+ msg.classifier_rule.data.ipv4_destination_address[0] = 0x34 ;
+ msg.classifier_rule.data.ipv4_destination_address[1] = 0x34 ;
+ msg.classifier_rule.data.ipv4_destination_address[2] = 0x34 ;
+ msg.classifier_rule.data.ipv4_destination_address[3] = 0x34 ;
+ msg.classifier_rule.data.tcp_destination_port = 0x3454 ;
+ msg.classifier_rule.data.tcp_source_port = 0x5432 ;
+
+
+ msg_cm_conn_new_req_set_on_mme_msg(&test_mme, &msg);
+
+ {
+ // test block
+ int i;
+
+ for(i=0; i < 378; i++)
+ {
+ test_fail_unless(test_mme.mm_entry[i] == msg_cm_conn_new_req.mm_entry[i], "Error on test_mme in item %i test = 0x%x msg = 0x%x\n",i,test_mme.mm_entry[i],msg_cm_conn_new_req.mm_entry[i]);
+ }
+ }
+ }
+ test_end;
+}
+
+
+
+void
+test_msg_cm_conn_new_req(test_t t)
+{
+ dbg_assert(t);
+
+ test_suite_begin(t, "TEST MESSAGE CM_CONN_NEW_REQ");
+
+ test_msg_cm_conn_new_req_get_from_mme_msg(t);
+ test_msg_cm_conn_new_req_set_on_mme_msg(t);
+
+
+}
diff --git a/cesar/cp/msg/test/src/test_msg_cm_conn_rel_ind.c b/cesar/cp/msg/test/src/test_msg_cm_conn_rel_ind.c
new file mode 100644
index 0000000000..2e4abb8e4b
--- /dev/null
+++ b/cesar/cp/msg/test/src/test_msg_cm_conn_rel_ind.c
@@ -0,0 +1,800 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file test_msg_cm_conn_rel_ind.c
+ * \brief This file provides management functions for message CM_CONN_REL.IND.
+ * \ingroup cp/msg
+ *
+ */
+
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm.h"
+
+
+msg_mme_t msg_cm_conn_rel_ind_1 =
+{
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // ODA
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // OSA
+ 0, // vlan tag
+ 0x88E1,
+ 0, // mmv
+ CM_CONN_NEW_CNF,
+ {0,0,0},
+ {
+ 0x53, // CID (=0x5325)
+ 0x25, // CID
+ 0x01, // reason code (=violated cspec)
+ 0x01, // CSPEC Length :338 bytes
+ 0x54, // CSPEC Length :
+ CINFO_VALID, // CINFO Valid? CINFO Forward
+ MAC_CONTENTION, // Mac Service Type
+ USER_PRIORITY_CAP0, // User Priori ty
+ ATS_FOR_HLE, // Arrival Time Stamp
+ SMOOTHING_REQUESTED, // Smoothing
+ CINFO_VALID, // CINFO Valid? CINFO Reverse
+ MAC_CONTENTION, // Mac Service Type
+ USER_PRIORITY_CAP0, // User Priority
+ ATS_FOR_HLE, // Arrival Time Stamp
+ SMOOTHING_REQUESTED, // Smoothing
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x00, // FID: Delay bound
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x01, // FID: Jitter bound
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x02, // FID: Average MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x03, // FID: Maximum MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x04, // FID: Average Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x05, // FID: Minimum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x06, // FID: Maximum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x07, // FID: Maximum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x08, // FID: Minimum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x09, // FID: Maximum Burst Size
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x0A, // FID: Exception Policy
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x0B, // FID: inactivity_interval
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x0C, // FID: MSDU Error Rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x0D, // FID: CLST
+ 0x00, // QMP BODY
+ QMP_FORWARD,
+ 0x0E, // QMP body length
+ 0x0E, // FID: CDESC
+ 0x00, // IP Version 4
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x0F, // source port
+ 0xF1, // source port
+ 0x01, // Dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0xFF, // dest port
+ 0xF1, // dest port
+ 0x00, // ip proto type
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x10, // FID: ATS Tolerance
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x11, // FID: Smallest tolerable Average data rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x12, // FID: Original Average data rate
+ 0x00, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x13, // FID: rx_window_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x03, // QMP body length
+ 0x14, // FID: smoothing_buffer_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x15, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x80, // FID: TXOPs per Beacon Period
+ 0x15, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x81, // FID: Average Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x82, // FID: Minimum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x83, // FID: Maximum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x84, // FID: PPB_Threshold
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x85, // 0x0FID: Surplus Bandwidth
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x87, // FID: Smallest Tolerable Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x88, // FID: Original Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x89, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x00, // FID: Delay bound
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x01, // FID: Jitter bound
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x02, // FID: Average MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x03, // FID: Maximum MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x04, // FID: Average Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x05, // FID: Minimum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x06, // FID: Maximum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x07, // FID: Maximum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x08, // FID: Minimum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x09, // FID: Maximum Burst Size
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x0A, // FID: Exception Policy
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x0B, // FID: inactivity_interval
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x0C, // FID: MSDU Error Rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x0D, // FID: CLST
+ 0x00, // QMP BODY
+ QMP_REVERSE,
+ 0x0E, // QMP body length
+ 0x0E, // FID: CDESC
+ 0x00, // IP Version 4
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x0F, // source port
+ 0xF1, // source port
+ 0x01, // Dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0xFF, // dest port
+ 0xF1, // dest port
+ 0x00, // ip proto type
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x10, // FID: ATS Tolerance
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x11, // FID: Smallest tolerable Average data rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x12, // FID: Original Average data rate
+ 0x00, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x13, // FID: rx_window_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x03, // QMP body length
+ 0x14, // FID: smoothing_buffer_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x15, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x80, // FID: TXOPs per Beacon Period
+ 0x15, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x81, // FID: Average Number of PBs per TXOP
+ 0x10, // QMP BODY copy
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x82, // FID: Minimum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x83, // FID: Maximum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x84, // FID: PPB_Threshold
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x85, // FID: Surplus Bandwidth
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x87, // FID: Smallest Tolerable Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x88, // FID: Original Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x89, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ }
+};
+
+msg_mme_t msg_cm_conn_rel_ind_2 =
+{
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // ODA
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // OSA
+ 0, // vlan tag
+ 0x88E1,
+ 0, // mmv
+ CM_CONN_NEW_CNF,
+ {0,0,0},
+ {
+ 0x53, // CID (=0x5325)
+ 0x25, // CID
+ 0x00 // reason code (= normal release)
+ }
+};
+
+
+void
+test_msg_cm_conn_rel_ind_set_on_mme_msg(test_t t)
+{
+ msg_cm_conn_rel_ind_t msg;
+
+ test_case_begin(t, "TEST msg_cm_conn_rel_ind_set_on_mme_msg");
+
+ test_begin(t, "test case 1")
+ {
+
+ msg_cm_conn_rel_ind_init(&msg);
+
+
+
+ msg.cid = 0x5325;
+ msg.reason_code = VIOLATED_CSPEC;
+ msg.violated_cspec.cinfo_forward.valid = CINFO_VALID;
+ msg.violated_cspec.cinfo_forward.mac_service_type = MAC_CONTENTION;
+ msg.violated_cspec.cinfo_forward.user_priority = USER_PRIORITY_CAP0;
+ msg.violated_cspec.cinfo_forward.ats = ATS_FOR_HLE;
+ msg.violated_cspec.cinfo_forward.smoothing = SMOOTHING_REQUESTED;
+
+ msg.violated_cspec.cinfo_reverse.valid = CINFO_VALID;
+ msg.violated_cspec.cinfo_reverse.mac_service_type = MAC_CONTENTION;
+ msg.violated_cspec.cinfo_reverse.user_priority = USER_PRIORITY_CAP0;
+ msg.violated_cspec.cinfo_reverse.ats = ATS_FOR_HLE;
+ msg.violated_cspec.cinfo_reverse.smoothing = SMOOTHING_REQUESTED;
+
+ msg.violated_cspec.qmp_forward.valid.delay_bound_available = true;
+ msg.violated_cspec.qmp_forward.valid.jitter_bound_available = true;
+ msg.violated_cspec.qmp_forward.valid.average_msdu_size_available = true;
+ msg.violated_cspec.qmp_forward.valid.maximum_msdu_size_available = true;
+ msg.violated_cspec.qmp_forward.valid.average_data_rate_available = true;
+ msg.violated_cspec.qmp_forward.valid.minimum_data_rate_available = true;
+ msg.violated_cspec.qmp_forward.valid.maximum_data_rate_available = true;
+ msg.violated_cspec.qmp_forward.valid.minimum_inter_txop_time_available = true;
+ msg.violated_cspec.qmp_forward.valid.maximum_inter_txop_time_available = true;
+ msg.violated_cspec.qmp_forward.valid.maximum_burst_size_available = true;
+ msg.violated_cspec.qmp_forward.valid.exception_policy_available = true;
+ msg.violated_cspec.qmp_forward.valid.inactivity_interval_available = true;
+ msg.violated_cspec.qmp_forward.valid.msdu_error_rate_available = true;
+ msg.violated_cspec.qmp_forward.valid.clst_available = true;
+ msg.violated_cspec.qmp_forward.valid.cdesc_available = true;
+ msg.violated_cspec.qmp_forward.valid.ats_tolerance_available = true;
+ msg.violated_cspec.qmp_forward.valid.smallest_tolerable_data_rate_available = true;
+ msg.violated_cspec.qmp_forward.valid.original_average_data_rate_available = true;
+ msg.violated_cspec.qmp_forward.valid.rx_window_size_available = true;
+ msg.violated_cspec.qmp_forward.valid.smoothing_buffer_size_available = true;
+ msg.violated_cspec.qmp_forward.valid.bidirectional_burst_available = true;
+ msg.violated_cspec.qmp_forward.valid.txops_per_beacon_period_available = true;
+ msg.violated_cspec.qmp_forward.valid.average_number_of_pbs_per_txop_available = true;
+ msg.violated_cspec.qmp_forward.valid.minimum_number_of_pbs_per_txop_available = true;
+ msg.violated_cspec.qmp_forward.valid.maximum_number_of_pbs_per_txop_available = true;
+ msg.violated_cspec.qmp_forward.valid.ppb_threshold_available = true;
+ msg.violated_cspec.qmp_forward.valid.surplus_bandwith_available = true;
+ msg.violated_cspec.qmp_forward.valid.smallest_tolerable_average_number_of_pbs_per_txop_available = true;
+ msg.violated_cspec.qmp_forward.valid.original_average_number_of_pbs_per_txop_available = true;
+ msg.violated_cspec.qmp_forward.valid.cco_bidirectional_burst_available = true;
+ msg.violated_cspec.qmp_forward.cm.delay_bound = 0x01010101;
+ msg.violated_cspec.qmp_forward.cm.jitter_bound = 0x10101010;
+ msg.violated_cspec.qmp_forward.cm.average_msdu_size = 0XF0F0;
+ msg.violated_cspec.qmp_forward.cm.maximum_msdu_size = 0XF0F0;
+ msg.violated_cspec.qmp_forward.cm.average_data_rate = 0x0F0F;
+ msg.violated_cspec.qmp_forward.cm.minimum_data_rate = 0x0F0F;
+ msg.violated_cspec.qmp_forward.cm.maximum_data_rate = 0x0F0F;
+ msg.violated_cspec.qmp_forward.cm.maximum_inter_txop_time = 0xFFFF;
+ msg.violated_cspec.qmp_forward.cm.minimum_inter_txop_time = 0xFFFF;
+ msg.violated_cspec.qmp_forward.cm.maximum_burst_size = 0x00FF;
+ msg.violated_cspec.qmp_forward.cm.exception_policy = EXCEPTION_RECONFIGURE_CONNEXION;
+ msg.violated_cspec.qmp_forward.cm.inactivity_interval = 0X00FF00FF;
+ msg.violated_cspec.qmp_forward.cm.msdu_error_rate = 0x00FF;
+ msg.violated_cspec.qmp_forward.cm.clst = 0x00;
+ msg.violated_cspec.qmp_forward.cm.cdesc.ip_version = 0x00;
+ msg.violated_cspec.qmp_forward.cm.cdesc.ipv4_source_address[0] = 0x01;
+ msg.violated_cspec.qmp_forward.cm.cdesc.ipv4_source_address[1] = 0x01;
+ msg.violated_cspec.qmp_forward.cm.cdesc.ipv4_source_address[2] = 0x01;
+ msg.violated_cspec.qmp_forward.cm.cdesc.ipv4_source_address[3] = 0x01;
+ msg.violated_cspec.qmp_forward.cm.cdesc.source_port = 0x0FF1;
+ msg.violated_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[0] = 0x01;
+ msg.violated_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[1] = 0x01;
+ msg.violated_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[2] = 0x01;
+ msg.violated_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[3] = 0x01;
+ msg.violated_cspec.qmp_forward.cm.cdesc.destination_port = 0xFFF1;
+ msg.violated_cspec.qmp_forward.cm.cdesc.protocol_type = 0x00;
+ msg.violated_cspec.qmp_forward.cm.ats_tolerance = 0x00FF;
+ msg.violated_cspec.qmp_forward.cm.smallest_tolerable_data_rate = 0x00FF;
+ msg.violated_cspec.qmp_forward.cm.original_average_data_rate = 0x000F;
+ msg.violated_cspec.qmp_forward.cm.rx_window_size = 0x100F;
+ msg.violated_cspec.qmp_forward.cm.smoothing_buffer_size = 0x100F10;
+ msg.violated_cspec.qmp_forward.cm.bidirectional_burst = 0x01;
+ msg.violated_cspec.qmp_forward.cco.txops_per_beacon_period = 0x15;
+ msg.violated_cspec.qmp_forward.cco.average_number_of_pbs_per_txop = 0x100F;
+ msg.violated_cspec.qmp_forward.cco.minimum_number_of_pbs_per_txop = 0x100F;
+ msg.violated_cspec.qmp_forward.cco.maximum_number_of_pbs_per_txop = 0x100F;
+ msg.violated_cspec.qmp_forward.cco.ppb_threshold = 0x0FF0;
+ msg.violated_cspec.qmp_forward.cco.surplus_bandwith = 0x0FF0;
+ msg.violated_cspec.qmp_forward.cco.smallest_tolerable_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.violated_cspec.qmp_forward.cco.original_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.violated_cspec.qmp_forward.cco.cco_bidirectional_burst = 0x01;
+
+ msg.violated_cspec.qmp_reverse.valid.delay_bound_available = true;
+ msg.violated_cspec.qmp_reverse.valid.jitter_bound_available = true;
+ msg.violated_cspec.qmp_reverse.valid.average_msdu_size_available = true;
+ msg.violated_cspec.qmp_reverse.valid.maximum_msdu_size_available = true;
+ msg.violated_cspec.qmp_reverse.valid.average_data_rate_available = true;
+ msg.violated_cspec.qmp_reverse.valid.minimum_data_rate_available = true;
+ msg.violated_cspec.qmp_reverse.valid.maximum_data_rate_available = true;
+ msg.violated_cspec.qmp_reverse.valid.minimum_inter_txop_time_available = true;
+ msg.violated_cspec.qmp_reverse.valid.maximum_inter_txop_time_available = true;
+ msg.violated_cspec.qmp_reverse.valid.maximum_burst_size_available = true;
+ msg.violated_cspec.qmp_reverse.valid.exception_policy_available = true;
+ msg.violated_cspec.qmp_reverse.valid.inactivity_interval_available = true;
+ msg.violated_cspec.qmp_reverse.valid.msdu_error_rate_available = true;
+ msg.violated_cspec.qmp_reverse.valid.clst_available = true;
+ msg.violated_cspec.qmp_reverse.valid.cdesc_available = true;
+ msg.violated_cspec.qmp_reverse.valid.ats_tolerance_available = true;
+ msg.violated_cspec.qmp_reverse.valid.smallest_tolerable_data_rate_available = true;
+ msg.violated_cspec.qmp_reverse.valid.original_average_data_rate_available = true;
+ msg.violated_cspec.qmp_reverse.valid.rx_window_size_available = true;
+ msg.violated_cspec.qmp_reverse.valid.smoothing_buffer_size_available = true;
+ msg.violated_cspec.qmp_reverse.valid.bidirectional_burst_available = true;
+ msg.violated_cspec.qmp_reverse.valid.txops_per_beacon_period_available = true;
+ msg.violated_cspec.qmp_reverse.valid.average_number_of_pbs_per_txop_available = true;
+ msg.violated_cspec.qmp_reverse.valid.minimum_number_of_pbs_per_txop_available = true;
+ msg.violated_cspec.qmp_reverse.valid.maximum_number_of_pbs_per_txop_available = true;
+ msg.violated_cspec.qmp_reverse.valid.ppb_threshold_available = true;
+ msg.violated_cspec.qmp_reverse.valid.surplus_bandwith_available = true;
+ msg.violated_cspec.qmp_reverse.valid.smallest_tolerable_average_number_of_pbs_per_txop_available = true;
+ msg.violated_cspec.qmp_reverse.valid.original_average_number_of_pbs_per_txop_available = true;
+ msg.violated_cspec.qmp_reverse.valid.cco_bidirectional_burst_available = true;
+ msg.violated_cspec.qmp_reverse.cm.delay_bound = 0x01010101;
+ msg.violated_cspec.qmp_reverse.cm.jitter_bound = 0x10101010;
+ msg.violated_cspec.qmp_reverse.cm.average_msdu_size = 0XF0F0;
+ msg.violated_cspec.qmp_reverse.cm.maximum_msdu_size = 0XF0F0;
+ msg.violated_cspec.qmp_reverse.cm.average_data_rate = 0x0F0F;
+ msg.violated_cspec.qmp_reverse.cm.minimum_data_rate = 0x0F0F;
+ msg.violated_cspec.qmp_reverse.cm.maximum_data_rate = 0x0F0F;
+ msg.violated_cspec.qmp_reverse.cm.maximum_inter_txop_time = 0xFFFF;
+ msg.violated_cspec.qmp_reverse.cm.minimum_inter_txop_time = 0xFFFF;
+ msg.violated_cspec.qmp_reverse.cm.maximum_burst_size = 0x00FF;
+ msg.violated_cspec.qmp_reverse.cm.exception_policy = EXCEPTION_RECONFIGURE_CONNEXION;
+ msg.violated_cspec.qmp_reverse.cm.inactivity_interval = 0X00FF00FF;
+ msg.violated_cspec.qmp_reverse.cm.msdu_error_rate = 0x00FF;
+ msg.violated_cspec.qmp_reverse.cm.clst = 0x00;
+ msg.violated_cspec.qmp_reverse.cm.cdesc.ip_version = 0x00;
+ msg.violated_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[0] = 0x01;
+ msg.violated_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[1] = 0x01;
+ msg.violated_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[2] = 0x01;
+ msg.violated_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[3] = 0x01;
+ msg.violated_cspec.qmp_reverse.cm.cdesc.source_port = 0x0FF1;
+ msg.violated_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[0] = 0x01;
+ msg.violated_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[1] = 0x01;
+ msg.violated_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[2] = 0x01;
+ msg.violated_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[3] = 0x01;
+ msg.violated_cspec.qmp_reverse.cm.cdesc.destination_port = 0xFFF1;
+ msg.violated_cspec.qmp_reverse.cm.cdesc.protocol_type = 0x00;
+ msg.violated_cspec.qmp_reverse.cm.ats_tolerance = 0x00FF;
+ msg.violated_cspec.qmp_reverse.cm.smallest_tolerable_data_rate = 0x00FF;
+ msg.violated_cspec.qmp_reverse.cm.original_average_data_rate = 0x000F;
+ msg.violated_cspec.qmp_reverse.cm.rx_window_size = 0x100F;
+ msg.violated_cspec.qmp_reverse.cm.smoothing_buffer_size = 0x100F10;
+ msg.violated_cspec.qmp_reverse.cm.bidirectional_burst = 0x01;
+ msg.violated_cspec.qmp_reverse.cco.txops_per_beacon_period = 0x15;
+ msg.violated_cspec.qmp_reverse.cco.average_number_of_pbs_per_txop = 0x100F;
+ msg.violated_cspec.qmp_reverse.cco.minimum_number_of_pbs_per_txop = 0x100F;
+ msg.violated_cspec.qmp_reverse.cco.maximum_number_of_pbs_per_txop = 0x100F;
+ msg.violated_cspec.qmp_reverse.cco.ppb_threshold = 0x0FF0;
+ msg.violated_cspec.qmp_reverse.cco.surplus_bandwith = 0x0FF0;
+ msg.violated_cspec.qmp_reverse.cco.smallest_tolerable_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.violated_cspec.qmp_reverse.cco.original_average_number_of_pbs_per_txop = 0x0FF0;
+ msg.violated_cspec.qmp_reverse.cco.cco_bidirectional_burst = 0x01;
+
+
+ {
+
+ msg_mme_t test_mme;
+
+ msg_cm_conn_rel_ind_set_on_mme_msg(&test_mme, &msg);
+
+
+ int i;
+
+ for(i=0; i < 342; i++)
+ {
+ test_fail_unless(test_mme.mm_entry[i] == msg_cm_conn_rel_ind_1.mm_entry[i], "Error on test_mme in item %i test = 0x%x msg = 0x%x\n",i,test_mme.mm_entry[i],msg_cm_conn_rel_ind_1.mm_entry[i]);
+ }
+ }
+
+
+ }test_end;
+
+
+ test_begin(t,"test case 2");
+ {
+
+ msg.cid = 0x5325;
+ msg.reason_code = NORMAL_RELEASE;
+
+
+ {
+ msg_mme_t test_mme;
+
+ msg_cm_conn_rel_ind_set_on_mme_msg(&test_mme, &msg);
+
+ int i;
+
+ for(i=0; i<2 ;i++)
+ {
+ test_fail_unless(test_mme.mm_entry[i] == msg_cm_conn_rel_ind_2.mm_entry[i], "Error on test_mme in item %i test = 0x%x msg = 0x%x\n",i,test_mme.mm_entry[i],msg_cm_conn_rel_ind_2.mm_entry[i]);
+ }
+ }
+
+ }test_end;
+}
+
+
+void
+test_msg_cm_conn_rel_ind_get_from_mme_msg(test_t t)
+{
+ msg_cm_conn_rel_ind_t msg;
+
+ test_case_begin(t, "TEST msg_cm_conn_rel_ind_get_from_mme_msg");
+
+ test_begin(t, "test case 1")
+ {
+ msg_cm_conn_rel_ind_init(&msg);
+
+ msg_cm_conn_rel_ind_get_from_mme_msg(&msg_cm_conn_rel_ind_1, &msg);
+
+ test_fail_unless( msg.cid == 0x5325 );
+ test_fail_unless( msg.reason_code == VIOLATED_CSPEC );
+ test_fail_unless(msg.violated_cspec.cinfo_forward.valid == CINFO_VALID );
+ test_fail_unless(msg.violated_cspec.cinfo_forward.mac_service_type == MAC_CONTENTION);
+ test_fail_unless(msg.violated_cspec.cinfo_forward.user_priority == USER_PRIORITY_CAP0);
+ test_fail_unless(msg.violated_cspec.cinfo_forward.ats == ATS_FOR_HLE);
+ test_fail_unless(msg.violated_cspec.cinfo_forward.smoothing = SMOOTHING_REQUESTED);
+
+ test_fail_unless(msg.violated_cspec.cinfo_reverse.valid == CINFO_VALID );
+ test_fail_unless(msg.violated_cspec.cinfo_reverse.mac_service_type == MAC_CONTENTION);
+ test_fail_unless(msg.violated_cspec.cinfo_reverse.user_priority == USER_PRIORITY_CAP0);
+ test_fail_unless(msg.violated_cspec.cinfo_reverse.ats == ATS_FOR_HLE);
+ test_fail_unless(msg.violated_cspec.cinfo_reverse.smoothing = SMOOTHING_REQUESTED);
+
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.delay_bound_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.jitter_bound_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.average_msdu_size_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.maximum_msdu_size_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.average_data_rate_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.minimum_data_rate_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.maximum_data_rate_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.minimum_inter_txop_time_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.maximum_inter_txop_time_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.maximum_burst_size_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.exception_policy_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.inactivity_interval_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.msdu_error_rate_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.clst_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.cdesc_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.ats_tolerance_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.smallest_tolerable_data_rate_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.original_average_data_rate_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.rx_window_size_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.smoothing_buffer_size_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.bidirectional_burst_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.txops_per_beacon_period_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.minimum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.maximum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.ppb_threshold_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.surplus_bandwith_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.smallest_tolerable_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.original_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.cco_bidirectional_burst_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.delay_bound == 0x01010101);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.jitter_bound == 0x10101010);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.average_msdu_size == 0XF0F0);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.maximum_msdu_size == 0XF0F0);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.average_data_rate == 0x0F0F);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.minimum_data_rate == 0x0F0F);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.maximum_data_rate == 0x0F0F);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.maximum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.minimum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.maximum_burst_size == 0x00FF);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.exception_policy == EXCEPTION_RECONFIGURE_CONNEXION);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.inactivity_interval == 0X00FF00FF);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.msdu_error_rate == 0x00FF);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.clst == 0x00);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.cdesc.ip_version == 0x00);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.cdesc.ipv4_source_address[0] == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.cdesc.ipv4_source_address[1] == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.cdesc.ipv4_source_address[2] == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.cdesc.ipv4_source_address[3] == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.cdesc.source_port == 0x0FF1);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[0] == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[1] == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[2] == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.cdesc.ipv4_destination_address[3] == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.cdesc.destination_port == 0xFFF1);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.cdesc.protocol_type == 0x00);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.ats_tolerance == 0x00FF);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.smallest_tolerable_data_rate == 0x00FF);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.original_average_data_rate == 0x000F);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.rx_window_size == 0x100F);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.smoothing_buffer_size == 0x100F10);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cm.bidirectional_burst == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cco.txops_per_beacon_period == 0x15);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cco.average_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cco.minimum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cco.maximum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cco.ppb_threshold == 0x0FF0);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cco.surplus_bandwith == 0x0FF0);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cco.smallest_tolerable_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cco.original_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.violated_cspec.qmp_forward.cco.cco_bidirectional_burst == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.delay_bound_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.jitter_bound_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.average_msdu_size_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.maximum_msdu_size_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.average_data_rate_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.minimum_data_rate_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.maximum_data_rate_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.minimum_inter_txop_time_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.maximum_inter_txop_time_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.exception_policy_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.inactivity_interval_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.msdu_error_rate_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.clst_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.cdesc_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.ats_tolerance_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.smallest_tolerable_data_rate_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.original_average_data_rate_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.rx_window_size_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.smoothing_buffer_size_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.bidirectional_burst_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.minimum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.maximum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.ppb_threshold_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.surplus_bandwith_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.smallest_tolerable_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.original_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_forward.valid.cco_bidirectional_burst_available == true);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.delay_bound == 0x01010101);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.jitter_bound == 0x10101010);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.average_msdu_size == 0XF0F0);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.maximum_msdu_size == 0XF0F0);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.average_data_rate == 0x0F0F);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.minimum_data_rate == 0x0F0F);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.maximum_data_rate == 0x0F0F);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.maximum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.minimum_inter_txop_time == 0xFFFF);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.maximum_burst_size == 0x00FF);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.exception_policy == EXCEPTION_RECONFIGURE_CONNEXION);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.inactivity_interval == 0X00FF00FF);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.msdu_error_rate == 0x00FF);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.clst == 0x00);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.cdesc.ip_version == 0x00);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[0] == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[1] == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[2] == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.cdesc.ipv4_source_address[3] == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.cdesc.source_port == 0x0FF1);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[0] == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[1] == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[2] == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[3] == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.cdesc.destination_port == 0xFFF1);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.cdesc.protocol_type == 0x00);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.ats_tolerance == 0x00FF);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.smallest_tolerable_data_rate == 0x00FF);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.original_average_data_rate == 0x000F);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.rx_window_size == 0x100F);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.smoothing_buffer_size == 0x100F10);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cm.bidirectional_burst == 0x01);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cco.txops_per_beacon_period == 0x15);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cco.average_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cco.minimum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cco.maximum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cco.ppb_threshold == 0x0FF0);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cco.surplus_bandwith == 0x0FF0);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cco.smallest_tolerable_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cco.original_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( msg.violated_cspec.qmp_reverse.cco.cco_bidirectional_burst == 0x01);
+
+
+ }test_end;
+
+ test_begin(t, "test case 2")
+ {
+ msg_cm_conn_rel_ind_init(&msg);
+
+ msg_cm_conn_rel_ind_get_from_mme_msg(&msg_cm_conn_rel_ind_2, &msg);
+
+ test_fail_unless( msg.cid == 0x5325 );
+ test_fail_unless( msg.reason_code == NORMAL_RELEASE );
+ }test_end;
+}
+
+
+void
+test_msg_cm_conn_rel_ind(test_t t)
+{
+ dbg_assert(t);
+
+ test_suite_begin(t, "TEST MESSAGE CM_CONN_REL_IND");
+
+ test_msg_cm_conn_rel_ind_get_from_mme_msg(t);
+ test_msg_cm_conn_rel_ind_set_on_mme_msg(t);
+
+}
diff --git a/cesar/cp/msg/test/src/test_msg_cm_conn_rel_rsp.c b/cesar/cp/msg/test/src/test_msg_cm_conn_rel_rsp.c
new file mode 100644
index 0000000000..024fcefebc
--- /dev/null
+++ b/cesar/cp/msg/test/src/test_msg_cm_conn_rel_rsp.c
@@ -0,0 +1,90 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file test_msg_cm_conn_rel_rsp.c
+ * \brief File Description
+ * \ingroup cp/msg
+ *
+ */
+
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm.h"
+
+
+msg_mme_t msg_cm_conn_rel_rsp_1 =
+{
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // ODA
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // OSA
+ 0, // vlan tag
+ 0x88E1,
+ 0, // mmv
+ CM_CONN_REL_RSP,
+ {0,0,0},
+ {
+ 0x53,
+ 0x25
+ }
+};
+
+
+
+void
+test_msg_cm_conn_rel_rsp_get_from_mme_msg(test_t t)
+{
+ msg_cm_conn_rel_rsp_t msg;
+
+ test_case_begin(t, "TEST msg_cm_conn_rel_rsp_get_from_mme_msg");
+
+ test_begin(t, "test case 1")
+ {
+ msg_cm_conn_rel_rsp_init(&msg);
+
+ msg_cm_conn_rel_rsp_get_from_mme_msg(&msg_cm_conn_rel_rsp_1, &msg);
+
+ test_fail_unless(msg.cid == 0x5325);
+
+ }test_end;
+}
+
+
+
+void
+test_msg_cm_conn_rel_rsp_set_on_mme_msg(test_t t)
+{
+ msg_cm_conn_rel_rsp_t msg;
+ msg_mme_t result;
+
+ test_case_begin(t, "TEST msg_cm_conn_rel_rsp_set_on_mme_msg");
+
+ test_begin(t, "test case 1")
+ {
+ msg_cm_conn_rel_rsp_init(&msg);
+
+ msg.cid = 0x5325;
+
+ msg_cm_conn_rel_rsp_set_on_mme_msg(&result, &msg);
+
+ test_fail_unless( result.mm_entry[0] == 0x53);
+ test_fail_unless( result.mm_entry[1] == 0x25);
+
+ }test_end;
+}
+
+
+
+void
+test_msg_cm_conn_rel_rsp(test_t t)
+{
+ dbg_assert(t);
+
+ test_suite_begin(t, "TEST MESSAGE CM_CONN_REL_RSP");
+
+ test_msg_cm_conn_rel_rsp_get_from_mme_msg(t);
+ test_msg_cm_conn_rel_rsp_set_on_mme_msg(t);
+
+}
diff --git a/cesar/cp/msg/test/src/test_msg_field.c b/cesar/cp/msg/test/src/test_msg_field.c
new file mode 100644
index 0000000000..2663c13209
--- /dev/null
+++ b/cesar/cp/msg/test/src/test_msg_field.c
@@ -0,0 +1,2898 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file test_conn_msg_field.c
+ * \brief File Description
+ * \ingroup cp/conn
+ *
+ */
+
+#include "common/std.h"
+#include "cp/msg/inc/msg_cm_conn.h"
+#include "cp/msg/inc/msg_field.h"
+
+u8 test_stream_forward_1[255] =
+{
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x00, // FID: Delay bound
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x01, // FID: Jitter bound
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x02, // FID: Average MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x03, // FID: Maximum MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x04, // FID: Average Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x05, // FID: Minimum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x06, // FID: Maximum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x07, // FID: Maximum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x08, // FID: Minimum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x09, // FID: Maximum Burst Size
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x0A, // FID: Exception Policy
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x0B, // FID: inactivity_interval
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x0C, // FID: MSDU Error Rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x0D, // FID: CLST
+ 0x00, // QMP BODY
+ QMP_FORWARD,
+ 0x0E, // QMP body length
+ 0x0E, // FID: CDESC
+ 0x00, // IP Version 4
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x0F, // source port
+ 0xF1, // source port
+ 0x01, // Dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0xFF, // dest port
+ 0xF1, // dest port
+ 0x00, // ip proto type
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x10, // FID: ATS Tolerance
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x11, // FID: Smallest tolerable Average data rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x12, // FID: Original Average data rate
+ 0x00, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x13, // FID: rx_window_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x03, // QMP body length
+ 0x14, // FID: smoothing_buffer_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x15, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x80, // FID: TXOPs per Beacon Period
+ 0x15, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x81, // FID: Average Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x82, // FID: Minimum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x83, // FID: Maximum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x84, // FID: PPB_Threshold
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x85, // FID: Surplus Bandwidth
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x87, // FID: Smallest Tolerable Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x88, // FID: Original Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x89, // FID: Biderectional Burst
+ 0x01, // QMP BODY
+ QMP_REVERSE
+};
+
+
+u8 test_stream_reverse_1[255] =
+{
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x00, // FID: Delay bound
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x01, // FID: Jitter bound
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x02, // FID: Average MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x03, // FID: Maximum MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x04, // FID: Average Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x05, // FID: Minimum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x06, // FID: Maximum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x07, // FID: Maximum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x08, // FID: Minimum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x09, // FID: Maximum Burst Size
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x0A, // FID: Exception Policy
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x0B, // FID: inactivity_interval
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x0C, // FID: MSDU Error Rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x0D, // FID: CLST
+ 0x00, // QMP BODY
+ QMP_REVERSE,
+ 0x0E, // QMP body length
+ 0x0E, // FID: CDESC
+ 0x00, // IP Version 4
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x0F, // source port
+ 0xF1, // source port
+ 0x01, // Dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0xFF, // dest port
+ 0xF1, // dest port
+ 0x00, // ip proto type
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x10, // FID: ATS Tolerance
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x11, // FID: Smallest tolerable Average data rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x12, // FID: Original Average data rate
+ 0x00, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x13, // FID: rx_window_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x03, // QMP body length
+ 0x14, // FID: smoothing_buffer_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x15, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x80, // FID: TXOPs per Beacon Period
+ 0x15, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x81, // FID: Average Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x82, // FID: Minimum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x83, // FID: Maximum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x84, // FID: PPB_Threshold
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x85, // FID: Surplus Bandwidth
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x87, // FID: Smallest Tolerable Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x88, // FID: Original Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x89, // FID: Biderectional Burst
+ 0x01 // QMP BODY
+};
+
+
+msg_mme_t test_msg_1 = { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, // MAC_ADDRESS OSA
+ { 0x02, 0x02, 0x02, 0x02, 0x02, 0x02 }, // MAC_ADDRESS ODA
+ 0x00000000, // VLAN_TAG
+ 0x88E1, // M_TYPE
+ 0x00, // MMV
+ CM_CONN_NEW_REQ, // Management Message Type
+ { 1, 1, 1 }, // fmi
+ { 0x53, // CID
+ 0x53, //CID
+ 0x01, // CSPEC Length :338 bytes
+ 0x52, // CSPEC Length :
+ CINFO_VALID, // CINFO Valid? CINFO Forward
+ MAC_CONTENTION, // Mac Service Type
+ USER_PRIORITY_CAP0, // User Priority
+ ATS_FOR_HLE, // Arrival Time Stamp
+ SMOOTHING_REQUESTED, // Smoothing
+ CINFO_VALID, // CINFO Valid? CINFO Reverse
+ MAC_CONTENTION, // Mac Service Type
+ USER_PRIORITY_CAP0, // User Priority
+ ATS_FOR_HLE, // Arrival Time Stamp
+ SMOOTHING_REQUESTED, // Smoothing
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x00, // FID: Delay bound
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x01, // FID: Jitter bound
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x02, // FID: Average MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x03, // FID: Maximum MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x04, // FID: Average Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x05, // FID: Minimum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x06, // FID: Maximum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x07, // FID: Maximum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x08, // FID: Minimum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x09, // FID: Maximum Burst Size
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x0A, // FID: Exception Policy
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x0B, // FID: inactivity_interval
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x0C, // FID: MSDU Error Rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x0D, // FID: CLST
+ 0x00, // QMP BODY
+ QMP_FORWARD,
+ 0x0E, // QMP body length
+ 0x0E, // FID: CDESC
+ 0x00, // IP Version 4
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x0F, // source port
+ 0xF1, // source port
+ 0x01, // Dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0xFF, // dest port
+ 0xF1, // dest port
+ 0x00, // ip proto type
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x10, // FID: ATS Tolerance
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x11, // FID: Smallest tolerable Average data rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x12, // FID: Original Average data rate
+ 0x00, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x13, // FID: rx_window_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x03, // QMP body length
+ 0x14, // FID: smoothing_buffer_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x15, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x80, // FID: TXOPs per Beacon Period
+ 0x15, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x81, // FID: Average Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x82, // FID: Minimum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x83, // FID: Maximum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x84, // FID: PPB_Threshold
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x85, // FID: Surplus Bandwidth
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x87, // FID: Smallest Tolerable Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x88, // FID: Original Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x89, // FID: Biderectional Burst
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x00, // FID: Delay bound
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x01, // FID: Jitter bound
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x02, // FID: Average MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x03, // FID: Maximum MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x04, // FID: Average Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x05, // FID: Minimum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x06, // FID: Maximum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x07, // FID: Maximum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x08, // FID: Minimum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x09, // FID: Maximum Burst Size
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x0A, // FID: Exception Policy
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x0B, // FID: inactivity_interval
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x0C, // FID: MSDU Error Rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x0D, // FID: CLST
+ 0x00, // QMP BODY
+ QMP_REVERSE,
+ 0x0E, // QMP body length
+ 0x0E, // FID: CDESC
+ 0x00, // IP Version 4
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x0F, // source port
+ 0xF1, // source port
+ 0x01, // Dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0xFF, // dest port
+ 0xF1, // dest port
+ 0x00, // ip proto type
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x10, // FID: ATS Tolerance
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x11, // FID: Smallest tolerable Average data rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x12, // FID: Original Average data rate
+ 0x00, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x13, // FID: rx_window_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x03, // QMP body length
+ 0x14, // FID: smoothing_buffer_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x15, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x80, // FID: TXOPs per Beacon Period
+ 0x15, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x81, // FID: Average Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x82, // FID: Minimum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x83, // FID: Maximum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x84, // FID: PPB_Threshold
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x85, // FID: Surplus Bandwidth
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x87, // FID: Smallest Tolerable Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x88, // FID: Original Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x89, // FID: Biderectional Burst
+ 0x01, // QMP BODY
+ 0x00, // Classifier Version Classifier_rule
+ 0x08, // Number of classifier rule
+ 0x01, // Classifier Rule identifier //Ethernet Source Address
+ 0x06, // Classifier Rule data
+ 0x05, // Classifier Rule data
+ 0x04, // Classifier Rule data
+ 0x03, // Classifier Rule data
+ 0x02, // Classifier Rule data
+ 0x01, // Classifier Rule data
+ 0x00, // Classifier Rule identifier //Ethernet Destination Address
+ 0x01, // Classifier Rule data
+ 0x02, // Classifier Rule data
+ 0x03, // Classifier Rule data
+ 0x04, // Classifier Rule data
+ 0x05, // Classifier Rule data
+ 0x06, // Classifier Rule data
+ 0X04, // Classifier Rule identifier //IPV4 type of service
+ 0x08, // Classifier Rule data
+ 0x05, // Classifier Rule identifier //IPV4 Proto
+ 0x02, // Classifier Rule data
+ 0x06, // Classifier Rule identifier //IPV4 source addr
+ 0x04, // Classifier Rule data
+ 0x04, // Classifier Rule data
+ 0x04, // Classifier Rule data
+ 0x04, // Classifier Rule data
+ 0x07, // Classifier Rule identifier //IPV4 destination addr
+ 0x34, // Classifier Rule data
+ 0x34, // Classifier Rule data
+ 0x34, // Classifier Rule data
+ 0x34, // Classifier Rule data
+ 0x0D, // Classifier Rule identifier //TCP Destination Port
+ 0x34, // Classifier Rule data
+ 0x54, // Classifier Rule data
+ 0x0C, // Classifier Rule identifier //TCP Source port
+ 0x54, // Classifier Rule data
+ 0X32
+
+}
+};
+
+msg_mme_t test_msg_2 = { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, // MAC_ADDRESS OSA
+ { 0x02, 0x02, 0x02, 0x02, 0x02, 0x02 }, // MAC_ADDRESS ODA
+ 0x00000000, // VLAN_TAG
+ 0x88E1, // M_TYPE
+ 0x00, // MMV
+ CM_CONN_NEW_REQ, // Management Message Type
+ { 1, 1, 1 }, // fmi
+ { 0x53, // CID
+ 0x53, // CID
+ 0x00, // CSPEC Length
+ 0xAA, // CSPEC Length
+ CINFO_VALID, // CINFO Valid? CINFO Forward
+ MAC_CONTENTION, // Mac Service Type
+ USER_PRIORITY_CAP0, // User Priority
+ ATS_FOR_HLE, // Arrival Time Stamp
+ SMOOTHING_REQUESTED, // Smoothing
+ CINFO_NOT_VALID, // CINFO Valid? CINFO Reverse
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x00, // FID: Delay bound
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x01, // FID: Jitter bound
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x02, // FID: Average MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x03, // FID: Maximum MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x04, // FID: Average Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x05, // FID: Minimum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x06, // FID: Maximum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x07, // FID: Maximum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x08, // FID: Minimum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x09, // FID: Maximum Burst Size
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x0A, // FID: Exception Policy
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x04, // QMP body length
+ 0x0B, // FID: inactivity_interval
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x0C, // FID: MSDU Error Rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x0D, // FID: CLST
+ 0x00, // QMP BODY
+ QMP_FORWARD,
+ 0x0E, // QMP body length
+ 0x0E, // FID: CDESC
+ 0x00, // IP Version 4
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x0F, // source port
+ 0xF1, // source port
+ 0x01, // Dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0xFF, // dest port
+ 0xF1, // dest port
+ 0x00, // ip proto type
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x10, // FID: ATS Tolerance
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x11, // FID: Smallest tolerable Average data rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x12, // FID: Original Average data rate
+ 0x00, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x13, // FID: rx_window_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x03, // QMP body length
+ 0x14, // FID: smoothing_buffer_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x15, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x80, // FID: TXOPs per Beacon Period
+ 0x15, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x81, // FID: Average Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x82, // FID: Minimum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x83, // FID: Maximum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x84, // FID: PPB_Threshold
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x85, // FID: Surplus Bandwidth
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x87, // FID: Smallest Tolerable Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x02, // QMP body length
+ 0x88, // FID: Original Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_FORWARD,
+ 0x01, // QMP body length
+ 0x89, // FID: Biderectional Burst
+ 0x01, // QMP BODY
+ 0x00, // Classifier Version
+ 0x0A, // Number of Classifier Rule
+ 0x00, // Classifier Rule Identifier // Ethernet Destination Addr
+ 0x22, // Classifier Rule Data
+ 0x22, // Classifier Rule Data
+ 0x22, // Classifier Rule Data
+ 0x22, // Classifier Rule Data
+ 0x22, // Classifier Rule Data
+ 0x22, // Classifier Rule Data
+ 0x01, // Classifier Rule Identifier // Ethernet Source Addr
+ 0x33, // Classifier Rule Data
+ 0x33, // Classifier Rule Data
+ 0x33, // Classifier Rule Data
+ 0x33, // Classifier Rule Data
+ 0x33, // Classifier Rule Data
+ 0x33, // Classifier Rule Data
+ 0x02, // Classifier Rule Identifier // VLAN User Priority
+ 0x34, // Classifier Rule Data
+ 0x03, // Classifier Rule Identifier // VLAN ID
+ 0x45, // Classifier Rule Data
+ 0x54, // Classifier Rule Data
+ 0x08, // Classifier Rule Identifier // IPV6 traffic Class
+ 0x45, // Classifier Rule Data
+ 0x09, // Classifier Rule Identifier // IPV6 Flow Label
+ 0x05, // Classifier Rule Data
+ 0x15, // Classifier Rule Data
+ 0x25, // Classifier Rule Data
+ 0x0A, // Classifier Rule Identifier // IPV6 Source Address
+ 0x05, // Classifier Rule Data 1
+ 0x15, // Classifier Rule Data 2
+ 0x25, // Classifier Rule Data 3
+ 0x05, // Classifier Rule Data 4
+ 0x15, // Classifier Rule Data 5
+ 0x25, // Classifier Rule Data 6
+ 0x05, // Classifier Rule Data 7
+ 0x15, // Classifier Rule Data 8
+ 0x25, // Classifier Rule Data 9
+ 0x05, // Classifier Rule Data 10
+ 0x15, // Classifier Rule Data 11
+ 0x25, // Classifier Rule Data 12
+ 0x05, // Classifier Rule Data 13
+ 0x15, // Classifier Rule Data 14
+ 0x25, // Classifier Rule Data 15
+ 0x05, // Classifier Rule Data 16
+ 0x0B, // Classifier Rule Identifier // IPV6 Source Address
+ 0x15, // Classifier Rule Data 1
+ 0x25, // Classifier Rule Data 2
+ 0x35, // Classifier Rule Data 3
+ 0x15, // Classifier Rule Data 4
+ 0x25, // Classifier Rule Data 5
+ 0x35, // Classifier Rule Data 6
+ 0x15, // Classifier Rule Data 7
+ 0x25, // Classifier Rule Data 8
+ 0x35, // Classifier Rule Data 9
+ 0x15, // Classifier Rule Data 10
+ 0x25, // Classifier Rule Data 11
+ 0x35, // Classifier Rule Data 12
+ 0x15, // Classifier Rule Data 13
+ 0x25, // Classifier Rule Data 14
+ 0x35, // Classifier Rule Data 15
+ 0x15, // Classifier Rule Data 16
+ 0x0E, // Classifier Rule Identifier // UDP Source Port
+ 0x34, // Classifier Rule Data
+ 0x83, // Classifier Rule Data
+ 0x0F, // Classifier Rule Identifier // UDP Destination Port
+ 0x83, // Classifier Rule Data
+ 0x43 // Classifier Rule Data
+
+
+ } };
+
+msg_mme_t test_msg_3 = { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, // MAC_ADDRESS OSA
+ { 0x02, 0x02, 0x02, 0x02, 0x02, 0x02 }, // MAC_ADDRESS ODA
+ 0x00000000, // VLAN_TAG
+ 0x88E1, // M_TYPE
+ 0x00, // MMV
+ CM_CONN_NEW_REQ, // Management Message Type
+ { 1, 1, 1 }, // fmi
+ { 0x53, // CID
+ 0x53, // CID
+ 0x00, // CSPEC Length
+ 0xAF, // CSPEC Length
+ CINFO_NOT_VALID, // CINFO Valid? CINFO Forward
+ CINFO_VALID, // CINFO Valid? CINFO Reverse
+ MAC_CONTENTION, // Mac Service Type
+ USER_PRIORITY_CAP0, // User Priority
+ ATS_FOR_HLE, // Arrival Time Stamp
+ SMOOTHING_REQUESTED, // Smoothing
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x00, // FID: Delay bound
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x01, // FID: Jitter bound
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x02, // FID: Average MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x03, // FID: Maximum MSDU Size
+ 0xF0, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x04, // FID: Average Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x05, // FID: Minimum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x06, // FID: Maximum Data Rate
+ 0x0F, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x07, // FID: Maximum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x08, // FID: Minimum Inter-TXOP time
+ 0xFF, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x09, // FID: Maximum Burst Size
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x0A, // FID: Exception Policy
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x04, // QMP body length
+ 0x0B, // FID: inactivity_interval
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x0C, // FID: MSDU Error Rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x0D, // FID: CLST
+ 0x00, // QMP BODY
+ QMP_REVERSE,
+ 0x0E, // QMP body length
+ 0x0E, // FID: CDESC
+ 0x00, // IP Version 4
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x01, // Source IP
+ 0x0F, // source port
+ 0xF1, // source port
+ 0x01, // Dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0x01, // dest IP
+ 0xFF, // dest port
+ 0xF1, // dest port
+ 0x00, // ip proto type
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x10, // FID: ATS Tolerance
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x11, // FID: Smallest tolerable Average data rate
+ 0x00, // QMP BODY
+ 0xFF, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x12, // FID: Original Average data rate
+ 0x00, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x13, // FID: rx_window_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x03, // QMP body length
+ 0x14, // FID: smoothing_buffer_size
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ 0x10, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x15, // FID: Bidirectional Burst
+ 0x01, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x80, // FID: TXOPs per Beacon Period
+ 0x15, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x81, // FID: Average Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x82, // FID: Minimum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x83, // FID: Maximum Number of PBs per TXOP
+ 0x10, // QMP BODY
+ 0x0F, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x84, // FID: PPB_Threshold
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x85, // FID: Surplus Bandwidth
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x87, // FID: Smallest Tolerable Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x02, // QMP body length
+ 0x88, // FID: Original Average Number of PBs per TXOP
+ 0x0F, // QMP BODY
+ 0xF0, // QMP BODY
+ QMP_REVERSE,
+ 0x01, // QMP body length
+ 0x89, // FID: Biderectional Burst
+ 0x01, // QMP BODY
+ 0x00, // Classifier Version
+ 0x0A, // Number of Classifier Rule
+ 0x00, // Classifier Rule Identifier // Ethernet Destination Addr
+ 0x22, // Classifier Rule Data
+ 0x22, // Classifier Rule Data
+ 0x22, // Classifier Rule Data
+ 0x22, // Classifier Rule Data
+ 0x22, // Classifier Rule Data
+ 0x22, // Classifier Rule Data
+ 0x01, // Classifier Rule Identifier // Ethernet Source Addr
+ 0x33, // Classifier Rule Data
+ 0x33, // Classifier Rule Data
+ 0x33, // Classifier Rule Data
+ 0x33, // Classifier Rule Data
+ 0x33, // Classifier Rule Data
+ 0x33, // Classifier Rule Data
+ 0x02, // Classifier Rule Identifier // VLAN User Priority
+ 0x34, // Classifier Rule Data
+ 0x03, // Classifier Rule Identifier // VLAN ID
+ 0x45, // Classifier Rule Data
+ 0x54, // Classifier Rule Data
+ 0x08, // Classifier Rule Identifier // IPV6 traffic Class
+ 0x45, // Classifier Rule Data
+ 0x09, // Classifier Rule Identifier // IPV6 Flow Label
+ 0x05, // Classifier Rule Data
+ 0x15, // Classifier Rule Data
+ 0x25, // Classifier Rule Data
+ 0x0A, // Classifier Rule Identifier // IPV6 Source Address
+ 0x05, // Classifier Rule Data 1
+ 0x15, // Classifier Rule Data 2
+ 0x25, // Classifier Rule Data 3
+ 0x05, // Classifier Rule Data 4
+ 0x15, // Classifier Rule Data 5
+ 0x25, // Classifier Rule Data 6
+ 0x05, // Classifier Rule Data 7
+ 0x15, // Classifier Rule Data 8
+ 0x25, // Classifier Rule Data 9
+ 0x05, // Classifier Rule Data 10
+ 0x15, // Classifier Rule Data 11
+ 0x25, // Classifier Rule Data 12
+ 0x05, // Classifier Rule Data 13
+ 0x15, // Classifier Rule Data 14
+ 0x25, // Classifier Rule Data 15
+ 0x05, // Classifier Rule Data 16
+ 0x0B, // Classifier Rule Identifier // IPV6 Source Address
+ 0x15, // Classifier Rule Data 1
+ 0x25, // Classifier Rule Data 2
+ 0x35, // Classifier Rule Data 3
+ 0x15, // Classifier Rule Data 4
+ 0x25, // Classifier Rule Data 5
+ 0x35, // Classifier Rule Data 6
+ 0x15, // Classifier Rule Data 7
+ 0x25, // Classifier Rule Data 8
+ 0x35, // Classifier Rule Data 9
+ 0x15, // Classifier Rule Data 10
+ 0x25, // Classifier Rule Data 11
+ 0x35, // Classifier Rule Data 12
+ 0x15, // Classifier Rule Data 13
+ 0x25, // Classifier Rule Data 14
+ 0x35, // Classifier Rule Data 15
+ 0x15, // Classifier Rule Data 16
+ 0x0E, // Classifier Rule Identifier // UDP Source Port
+ 0x34, // Classifier Rule Data
+ 0x83, // Classifier Rule Data
+ 0x0F, // Classifier Rule Identifier // UDP Destination Port
+ 0x83, // Classifier Rule Data
+ 0x43 // Classifier Rule Data
+}
+};
+
+msg_mme_t test_msg_4 = { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, // MAC_ADDRESS OSA
+ { 0x02, 0x02, 0x02, 0x02, 0x02, 0x02 }, // MAC_ADDRESS ODA
+ 0x00000000, // VLAN_TAG
+ 0x88E1, // M_TYPE
+ 0x00, // MMV
+ CM_CONN_NEW_REQ, // Management Message Type
+ { 1, 1, 1 }, // fmi
+ { 0x53, // CID
+ 0x53, // CID
+ 0x00, // CSPEC Length
+ 0x09, // CSPEC Length
+ CINFO_NOT_VALID, // CINFO Valid? CINFO Forward
+ CINFO_NOT_VALID, // CINFO Valid? CINFO Reverse
+ QMP_FORWARD, // QMP Forward QMP
+ 0x04, // QMP body length
+ 0X00, // FID Delay Bound
+ 0x00, // QMP body
+ 0X00, // QMP body
+ 0x00, // QMP body
+ 0x00, // Version Number of the Classifier Rule
+ 0x01 // Number of classifier Rule
+
+ } };
+/*
+void conn_test_is_valid_cm_conn_new_req (test_t t)
+{
+ // Intialization
+ msg_mme_t msg_test;
+
+ test_case_begin (t, "TEST is_valid_cm_conn_new_req");
+
+ test_begin(t, "valid frame")
+ {
+ msg_test.mm_type = CM_CONN_NEW_REQ;
+ msg_test.oda[2] = 4;
+ msg_test.osa[4] = 35;
+
+ test_fail_unless( is_valid_cm_conn_new_req(&msg_test) == true );
+
+ }
+ test_end;
+
+ test_begin(t, "invalid oda")
+ {
+
+ bzero(msg_test.oda,6);
+
+ test_fail_unless( is_valid_cm_conn_new_req(&msg_test) == false );
+
+ }
+ test_end;
+
+ msg_test.oda[3] = 23;
+ bzero (msg_test.osa, 6);
+
+ test_begin(t, "invalid osa")
+ {
+ test_fail_unless( is_valid_cm_conn_new_req(&msg_test) == false);
+
+ }
+ test_end;
+
+ msg_test.osa[4] = 34;
+ dbg_assert_ptr (t);
+ msg_test.mm_type = CM_CONN_INFO_REQ;
+
+ test_begin(t, "m_type invalid")
+ {
+ test_fail_unless( is_valid_cm_conn_new_req(&msg_test) == false);
+
+ }
+ test_end;
+
+}
+*/
+
+
+void
+conn_test_set_cinfo_on_stream(test_t t )
+{
+ cinfo_t local_cinfo;
+ u8 stream[10];
+ len_t len;
+
+ test_case_begin(t, "TEST set_cinfo_on_stream");
+
+ test_begin(t, "test case 1 : cinfo valid")
+ {
+ msg_field_cinfo_init(&local_cinfo);
+
+ local_cinfo.valid = CINFO_NOT_VALID;
+
+ len = msg_field_cinfo_set_on_stream(stream, &local_cinfo);
+
+ test_fail_unless( len == 1);
+ test_fail_unless( stream[0] == CINFO_NOT_VALID);
+
+ }test_end;
+
+ test_begin(t, "test case 2 : cinfo not valid")
+ {
+ msg_field_cinfo_init(&local_cinfo);
+
+ local_cinfo.valid = CINFO_VALID;
+ local_cinfo.mac_service_type = MAC_CONTENTION;
+ local_cinfo.user_priority = USER_PRIORITY_CAP0;
+ local_cinfo.ats = ATS_FOR_HLE;
+ local_cinfo.smoothing = SMOOTHING_REQUESTED;
+
+ len = msg_field_cinfo_set_on_stream(stream, &local_cinfo);
+
+ test_fail_unless( len == 5);
+ test_fail_unless( stream[0] == CINFO_VALID);
+ test_fail_unless( stream[1] == MAC_CONTENTION);
+ test_fail_unless( stream[2] == USER_PRIORITY_CAP0);
+ test_fail_unless( stream[3] == ATS_FOR_HLE);
+ test_fail_unless( stream[4] == SMOOTHING_REQUESTED);
+
+ }test_end;
+}
+
+
+void
+conn_test_get_cinfo_from_stream(test_t t)
+{
+ cinfo_t local_cinfo;
+ len_t len;
+
+ test_case_begin(t, "TEST set_cinfo_from_stream");
+
+ test_begin(t, "test case 1 : cinfo valid")
+ {
+ u8 stream = CINFO_NOT_VALID;
+
+ msg_field_cinfo_init( &local_cinfo );
+
+ len = msg_field_cinfo_get_from_stream(&stream, &local_cinfo);
+
+ test_fail_unless( len == 1);
+ test_fail_unless( local_cinfo.valid == CINFO_NOT_VALID);
+
+
+ }test_end;
+
+ test_begin(t, "test case 2 : cinfo not valid")
+ {
+
+ u8 stream[5] = {CINFO_VALID, 0X00, 0X01, 0X01, 0X00};
+
+ msg_field_cinfo_init(&local_cinfo);
+
+ len = msg_field_cinfo_get_from_stream(stream, &local_cinfo);
+
+ test_fail_unless( len == 5);
+ test_fail_unless( local_cinfo.valid == CINFO_VALID);
+ test_fail_unless( local_cinfo.mac_service_type == 0x00);
+ test_fail_unless( local_cinfo.user_priority == 0x01);
+ test_fail_unless( local_cinfo.ats == 0x01);
+ test_fail_unless( local_cinfo.smoothing == 0x00);
+ }test_end;
+}
+
+
+
+void conn_test_get_classifier_rules_from_stream (test_t t)
+{
+ classifier_rules_t local_classifier;
+ classifier_rules_data_t data_classifier;
+ u8 stream[255];
+ len_t len;
+
+ test_case_begin (t, "TEST get_classifier_rule_from_cm_conn_new_req");
+
+ test_begin(t, "test case 1 : IPV4 connexion - tcp")
+ {
+
+ stream[0 ] = 0x00; // Classifier Version Classifier_rule
+ stream[1 ] = 0x09; // Number of classifier rule (8 Homeplug + 1 Vendor Specific)
+ stream[2 ] = 0x01; // Classifier Rule identifier //Ethernet Source Address
+ stream[3 ] = 0x06; // Classifier Rule data
+ stream[4 ] = 0x05; // Classifier Rule data
+ stream[5 ] = 0x04; // Classifier Rule data
+ stream[6 ] = 0x03; // Classifier Rule data
+ stream[7 ] = 0x02; // Classifier Rule data
+ stream[8 ] = 0x01; // Classifier Rule data
+ stream[9 ] = 0x00; // Classifier Rule identifier //Ethernet Destination Address
+ stream[10] = 0x01; // Classifier Rule data
+ stream[11] = 0x02; // Classifier Rule data
+ stream[12] = 0x03; // Classifier Rule data
+ stream[13] = 0x04; // Classifier Rule data
+ stream[14] = 0x05; // Classifier Rule data
+ stream[15] = 0x06; // Classifier Rule data
+ stream[16] = 0X04; // Classifier Rule identifier //IPV4 type of service
+ stream[17] = 0x08; // Classifier Rule data
+ stream[18] = 0x05; // Classifier Rule identifier //IPV4 Proto
+ stream[19] = 0x02; // Classifier Rule data
+ stream[20] = 0x06; // Classifier Rule identifier //IPV4 source addr
+ stream[21] = 0x04; // Classifier Rule data
+ stream[22] = 0x04; // Classifier Rule data
+ stream[23] = 0x04; // Classifier Rule data
+ stream[24] = 0x04; // Classifier Rule data
+ stream[25] = 0x07; // Classifier Rule identifier //IPV4 destination addr
+ stream[26] = 0x34; // Classifier Rule data
+ stream[27] = 0x34; // Classifier Rule data
+ stream[28] = 0x34; // Classifier Rule data
+ stream[29] = 0x34; // Classifier Rule data
+ stream[30] = 0x0D; // Classifier Rule identifier //TCP Dest port
+ stream[31] = 0x34; // Classifier Rule data
+ stream[32] = 0x54; // Classifier Rule data
+ stream[33] = 0x0C; // Classifier Rule identifier //TCP Source port
+ stream[34] = 0x54; // Classifier Rule data
+ stream[35] = 0X32; // Classifier Rule data
+ stream[36] = 0xE0; // Classifier Rule identifier //Vendor Specific
+ stream[37] = 0xAA; // Classifier Rule data
+
+
+ msg_field_classifier_init(&local_classifier);
+
+ len = msg_field_classifier_get_from_stream( stream, &local_classifier );
+ data_classifier = local_classifier.data;
+
+ //test_fail_unless( len == 36, "invalid length : %i", len);
+
+ test_fail_unless( local_classifier.classifier_version == CLASSIFIER_CURRENT_VERSION);
+ test_fail_unless( local_classifier.nbr_rules == 8 );
+ test_fail_unless( data_classifier.classifier_rules_available.ethernet_destination_address_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.ethernet_source_address_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.vlan_user_priority_field_available == 0 );
+ test_fail_unless( data_classifier.classifier_rules_available.vlan_id_field_available == 0 );
+ test_fail_unless( data_classifier.classifier_rules_available.ipv4_type_of_protocol_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.ipv4_protocol_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.ipv4_source_address_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.ipv4_destination_address_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.ipv6_traffic_class_field_available == 0 );
+ test_fail_unless( data_classifier.classifier_rules_available.ipv6_flow_label_field_available == 0 );
+ test_fail_unless( data_classifier.classifier_rules_available.ipv6_source_address_field_available == 0 );
+ test_fail_unless( data_classifier.classifier_rules_available.ipv6_destination_address_field_available == 0 );
+ test_fail_unless( data_classifier.classifier_rules_available.tcp_source_port_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.tcp_destination_port_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.udp_source_port_field_available == 0 );
+ test_fail_unless( data_classifier.classifier_rules_available.udp_destination_port_field_available == 0 );
+
+ test_fail_unless( data_classifier.ethernet_destination_address[0] == 0x01 );
+ test_fail_unless( data_classifier.ethernet_destination_address[1] == 0x02 );
+ test_fail_unless( data_classifier.ethernet_destination_address[2] == 0x03 );
+ test_fail_unless( data_classifier.ethernet_destination_address[3] == 0x04 );
+ test_fail_unless( data_classifier.ethernet_destination_address[4] == 0x05 );
+ test_fail_unless( data_classifier.ethernet_destination_address[5] == 0x06 );
+
+ test_fail_unless( data_classifier.ethernet_source_address[0] == 0x06 );
+ test_fail_unless( data_classifier.ethernet_source_address[1] == 0x05 );
+ test_fail_unless( data_classifier.ethernet_source_address[2] == 0x04 );
+ test_fail_unless( data_classifier.ethernet_source_address[3] == 0x03 );
+ test_fail_unless( data_classifier.ethernet_source_address[4] == 0x02 );
+ test_fail_unless( data_classifier.ethernet_source_address[5] == 0x01 );
+
+ test_fail_unless( data_classifier.ipv4_type_of_service == 0x08 );
+
+ test_fail_unless( data_classifier.ipv4_protocol == 0x02);
+
+ test_fail_unless( data_classifier.ipv4_source_address[0] == 0x04 );
+ test_fail_unless( data_classifier.ipv4_source_address[1] == 0x04 );
+ test_fail_unless( data_classifier.ipv4_source_address[2] == 0x04 );
+ test_fail_unless( data_classifier.ipv4_source_address[3] == 0x04 );
+
+ test_fail_unless( data_classifier.ipv4_destination_address[0] == 0x34 );
+ test_fail_unless( data_classifier.ipv4_destination_address[1] == 0x34 );
+ test_fail_unless( data_classifier.ipv4_destination_address[2] == 0x34 );
+ test_fail_unless( data_classifier.ipv4_destination_address[3] == 0x34 );
+
+ test_fail_unless( data_classifier.tcp_destination_port == 0x3454 );
+
+ test_fail_unless( data_classifier.tcp_source_port == 0x5432 );
+
+ }
+ test_end;
+
+ test_begin(t, "test case 2 : IPV6 connexion - udp")
+ {
+
+
+ stream[0] = 0x00; // Classifier Version
+ stream[1] = 0x0A; // Number of Classifier Rule
+ stream[2] = 0x00; // Classifier Rule Identifier // Ethernet Destination Addr
+ stream[3] = 0x22; // Classifier Rule Data
+ stream[4] = 0x22; // Classifier Rule Data
+ stream[5] = 0x22; // Classifier Rule Data
+ stream[6] = 0x22; // Classifier Rule Data
+ stream[7] = 0x22; // Classifier Rule Data
+ stream[8] = 0x22; // Classifier Rule Data
+ stream[9] = 0x01; // Classifier Rule Identifier // Ethernet Source Addr
+ stream[10] = 0x33; // Classifier Rule Data
+ stream[11] = 0x33; // Classifier Rule Data
+ stream[12] = 0x33; // Classifier Rule Data
+ stream[13] = 0x33; // Classifier Rule Data
+ stream[14] = 0x33; // Classifier Rule Data
+ stream[15] = 0x33; // Classifier Rule Data
+ stream[16] = 0x02; // Classifier Rule Identifier // VLAN User Priority
+ stream[17] = 0x34; // Classifier Rule Data
+ stream[18] = 0x03; // Classifier Rule Identifier // VLAN ID
+ stream[19] = 0x45; // Classifier Rule Data
+ stream[20] = 0x54; // Classifier Rule Data
+ stream[21] = 0x08; // Classifier Rule Identifier // IPV6 traffic Class
+ stream[22] = 0x45; // Classifier Rule Data
+ stream[23] = 0x09; // Classifier Rule Identifier // IPV6 Flow Label
+ stream[24] = 0x05; // Classifier Rule Data
+ stream[25] = 0x15; // Classifier Rule Data
+ stream[26] = 0x25; // Classifier Rule Data
+ stream[27] = 0x0A; // Classifier Rule Identifier // IPV6 Source Address
+ stream[28] = 0x05; // Classifier Rule Data 1
+ stream[29] = 0x15; // Classifier Rule Data 2
+ stream[30] = 0x25; // Classifier Rule Data 3
+ stream[31] = 0x05; // Classifier Rule Data 4
+ stream[32] = 0x15; // Classifier Rule Data 5
+ stream[33] = 0x25; // Classifier Rule Data 6
+ stream[34] = 0x05; // Classifier Rule Data 7
+ stream[35] = 0x15; // Classifier Rule Data 8
+ stream[36] = 0x25; // Classifier Rule Data 9
+ stream[37] = 0x05; // Classifier Rule Data 10
+ stream[38] = 0x15; // Classifier Rule Data 11
+ stream[39] = 0x25; // Classifier Rule Data 12
+ stream[40] = 0x05; // Classifier Rule Data 13
+ stream[41] = 0x15; // Classifier Rule Data 14
+ stream[42] = 0x25; // Classifier Rule Data 15
+ stream[43] = 0x05; // Classifier Rule Data 16
+ stream[44] = 0x0B; // Classifier Rule Identifier // IPV6 Source Address
+ stream[45] = 0x15; // Classifier Rule Data 1
+ stream[46] = 0x25; // Classifier Rule Data 2
+ stream[47] = 0x35; // Classifier Rule Data 3
+ stream[48] = 0x15; // Classifier Rule Data 4
+ stream[49] = 0x25; // Classifier Rule Data 5
+ stream[50] = 0x35; // Classifier Rule Data 6
+ stream[51] = 0x15; // Classifier Rule Data 7
+ stream[52] = 0x25; // Classifier Rule Data 8
+ stream[53] = 0x35; // Classifier Rule Data 9
+ stream[54] = 0x15; // Classifier Rule Data 10
+ stream[55] = 0x25; // Classifier Rule Data 11
+ stream[56] = 0x35; // Classifier Rule Data 12
+ stream[57] = 0x15; // Classifier Rule Data 13
+ stream[58] = 0x25; // Classifier Rule Data 14
+ stream[59] = 0x35; // Classifier Rule Data 15
+ stream[60] = 0x15; // Classifier Rule Data 16
+ stream[61] = 0x0E; // Classifier Rule Identifier // UDP Source Port
+ stream[62] = 0x34; // Classifier Rule Data
+ stream[63] = 0x83; // Classifier Rule Data
+ stream[64] = 0x0F; // Classifier Rule Identifier // UDP Destination Port
+ stream[65] = 0x83; // Classifier Rule Data
+ stream[66] = 0x43;// Classifier Rule Data
+
+ msg_field_classifier_init(&local_classifier);
+
+ len = msg_field_classifier_get_from_stream( stream, &local_classifier);
+ data_classifier = local_classifier.data;
+
+ test_fail_unless( local_classifier.classifier_version == CLASSIFIER_CURRENT_VERSION);
+ test_fail_unless( local_classifier.nbr_rules == 10 );
+
+ test_fail_unless( data_classifier.classifier_rules_available.ethernet_destination_address_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.ethernet_source_address_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.vlan_user_priority_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.vlan_id_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.ipv4_type_of_protocol_field_available == 0 );
+ test_fail_unless( data_classifier.classifier_rules_available.ipv4_protocol_field_available == 0 );
+ test_fail_unless( data_classifier.classifier_rules_available.ipv4_source_address_field_available == 0 );
+ test_fail_unless( data_classifier.classifier_rules_available.ipv4_destination_address_field_available == 0 );
+ test_fail_unless( data_classifier.classifier_rules_available.ipv6_traffic_class_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.ipv6_flow_label_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.ipv6_source_address_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.ipv6_destination_address_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.tcp_source_port_field_available == 0 );
+ test_fail_unless( data_classifier.classifier_rules_available.tcp_destination_port_field_available == 0 );
+ test_fail_unless( data_classifier.classifier_rules_available.udp_source_port_field_available == 1 );
+ test_fail_unless( data_classifier.classifier_rules_available.udp_destination_port_field_available == 1 );
+
+ test_fail_unless( data_classifier.ethernet_destination_address[0] == 0x22 );
+ test_fail_unless( data_classifier.ethernet_destination_address[1] == 0x22 );
+ test_fail_unless( data_classifier.ethernet_destination_address[2] == 0x22 );
+ test_fail_unless( data_classifier.ethernet_destination_address[3] == 0x22 );
+ test_fail_unless( data_classifier.ethernet_destination_address[4] == 0x22 );
+ test_fail_unless( data_classifier.ethernet_destination_address[5] == 0x22 );
+
+ test_fail_unless( data_classifier.ethernet_source_address[0] == 0x33 );
+ test_fail_unless( data_classifier.ethernet_source_address[1] == 0x33 );
+ test_fail_unless( data_classifier.ethernet_source_address[2] == 0x33 );
+ test_fail_unless( data_classifier.ethernet_source_address[3] == 0x33 );
+ test_fail_unless( data_classifier.ethernet_source_address[4] == 0x33 );
+ test_fail_unless( data_classifier.ethernet_source_address[5] == 0x33 );
+
+ test_fail_unless( data_classifier.vlan_user_priority == 0x34 );
+
+ test_fail_unless( data_classifier.vlan_id == 0x4554 );
+
+ test_fail_unless( data_classifier.ipv6_traffic_class == 0x45 );
+
+ test_fail_unless( data_classifier.ipv6_flow_label[0] == 0x05 );
+ test_fail_unless( data_classifier.ipv6_flow_label[1] == 0x15 );
+ test_fail_unless( data_classifier.ipv6_flow_label[2] == 0x25 );
+
+ test_fail_unless( data_classifier.ipv6_source_address[0] == 0x05 );
+ test_fail_unless( data_classifier.ipv6_source_address[1] == 0x15 );
+ test_fail_unless( data_classifier.ipv6_source_address[2] == 0x25 );
+ test_fail_unless( data_classifier.ipv6_source_address[3] == 0x05 );
+ test_fail_unless( data_classifier.ipv6_source_address[4] == 0x15 );
+ test_fail_unless( data_classifier.ipv6_source_address[5] == 0x25 );
+ test_fail_unless( data_classifier.ipv6_source_address[6] == 0x05 );
+ test_fail_unless( data_classifier.ipv6_source_address[7] == 0x15 );
+ test_fail_unless( data_classifier.ipv6_source_address[8] == 0x25 );
+ test_fail_unless( data_classifier.ipv6_source_address[9] == 0x05 );
+ test_fail_unless( data_classifier.ipv6_source_address[10] == 0x15 );
+ test_fail_unless( data_classifier.ipv6_source_address[11] == 0x25 );
+ test_fail_unless( data_classifier.ipv6_source_address[12] == 0x05 );
+ test_fail_unless( data_classifier.ipv6_source_address[13] == 0x15 );
+ test_fail_unless( data_classifier.ipv6_source_address[14] == 0x25 );
+ test_fail_unless( data_classifier.ipv6_source_address[15] == 0x05 );
+
+ test_fail_unless( data_classifier.ipv6_destination_address[0] == 0x15 );
+ test_fail_unless( data_classifier.ipv6_destination_address[1] == 0x25 );
+ test_fail_unless( data_classifier.ipv6_destination_address[2] == 0x35 );
+ test_fail_unless( data_classifier.ipv6_destination_address[3] == 0x15 );
+ test_fail_unless( data_classifier.ipv6_destination_address[4] == 0x25 );
+ test_fail_unless( data_classifier.ipv6_destination_address[5] == 0x35 );
+ test_fail_unless( data_classifier.ipv6_destination_address[6] == 0x15 );
+ test_fail_unless( data_classifier.ipv6_destination_address[7] == 0x25 );
+ test_fail_unless( data_classifier.ipv6_destination_address[8] == 0x35 );
+ test_fail_unless( data_classifier.ipv6_destination_address[9] == 0x15 );
+ test_fail_unless( data_classifier.ipv6_destination_address[10] == 0x25 );
+ test_fail_unless( data_classifier.ipv6_destination_address[11] == 0x35 );
+ test_fail_unless( data_classifier.ipv6_destination_address[12] == 0x15 );
+ test_fail_unless( data_classifier.ipv6_destination_address[13] == 0x25 );
+ test_fail_unless( data_classifier.ipv6_destination_address[14] == 0x35 );
+ test_fail_unless( data_classifier.ipv6_destination_address[15] == 0x15 );
+
+ test_fail_unless( data_classifier.udp_destination_port == 0x8343 );
+
+ test_fail_unless( data_classifier.udp_source_port == 0x3483 );
+
+ }
+ test_end;
+}
+
+
+
+
+void
+conn_test_get_cspec_from_stream(test_t t)
+{
+ cspec_t cspec;
+ len_t len;
+ u8 * stream;
+
+
+ test_case_begin(t, "TEST get_cspec_from_stream");
+
+ test_begin(t, "test case 1")
+ {
+
+ stream = (test_msg_1.mm_entry) + 2;
+
+ msg_field_cspec_init(&cspec);
+
+ len = msg_field_cspec_get_from_stream(stream, &cspec);
+
+ test_fail_unless( cspec.len == 0x0152 );
+
+ // CINFO FORWARD
+ test_fail_unless( cspec.cinfo_forward.valid == CINFO_VALID);
+ test_fail_unless( cspec.cinfo_forward.mac_service_type == MAC_CONTENTION);
+ test_fail_unless( cspec.cinfo_forward.user_priority == USER_PRIORITY_CAP0);
+ test_fail_unless( cspec.cinfo_forward.ats == ATS_FOR_HLE);
+ test_fail_unless( cspec.cinfo_forward.smoothing == SMOOTHING_REQUESTED);
+
+ // CINFO REVERSE
+ test_fail_unless( cspec.cinfo_reverse.valid == CINFO_VALID );
+ test_fail_unless( cspec.cinfo_reverse.mac_service_type == MAC_CONTENTION );
+ test_fail_unless( cspec.cinfo_reverse.user_priority == USER_PRIORITY_CAP0 );
+ test_fail_unless( cspec.cinfo_reverse.ats == ATS_FOR_HLE );
+ test_fail_unless( cspec.cinfo_reverse.smoothing == SMOOTHING_REQUESTED );
+
+ // QMP FORWARD
+ test_fail_unless( cspec.qmp_forward.forward_or_reverse == QMP_FORWARD);
+
+ test_fail_unless( cspec.qmp_forward.cm.delay_bound == 0x01010101);
+ test_fail_unless( cspec.qmp_forward.cm.jitter_bound == 0x10101010);
+ test_fail_unless( cspec.qmp_forward.cm.average_msdu_size == 0XF0F0);
+ test_fail_unless( cspec.qmp_forward.cm.maximum_msdu_size == 0XF0F0);
+ test_fail_unless( cspec.qmp_forward.cm.average_data_rate == 0x0F0F);
+ test_fail_unless( cspec.qmp_forward.cm.minimum_data_rate == 0x0F0F);
+ test_fail_unless( cspec.qmp_forward.cm.maximum_data_rate == 0x0F0F);
+ test_fail_unless( cspec.qmp_forward.cm.maximum_inter_txop_time == 0xFFFF);
+ test_fail_unless( cspec.qmp_forward.cm.minimum_inter_txop_time == 0xFFFF);
+ test_fail_unless( cspec.qmp_forward.cm.maximum_burst_size == 0x00FF);
+ test_fail_unless( cspec.qmp_forward.cm.exception_policy == EXCEPTION_RECONFIGURE_CONNEXION);
+ test_fail_unless( cspec.qmp_forward.cm.inactivity_interval == 0X00FF00FF);
+ test_fail_unless( cspec.qmp_forward.cm.msdu_error_rate == 0x00FF);
+ test_fail_unless( cspec.qmp_forward.cm.clst == 0x00);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ip_version == 0x00);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ipv4_source_address[0] == 0x01);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ipv4_source_address[1] == 0x01);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ipv4_source_address[2] == 0x01);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ipv4_source_address[3] == 0x01);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.source_port == 0x0FF1);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ipv4_destination_address[0] == 0x01);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ipv4_destination_address[1] == 0x01);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ipv4_destination_address[2] == 0x01);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ipv4_destination_address[3] == 0x01);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.destination_port == 0xFFF1);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.protocol_type == 0x00);
+ test_fail_unless( cspec.qmp_forward.cm.ats_tolerance == 0x00FF);
+ test_fail_unless( cspec.qmp_forward.cm.smallest_tolerable_data_rate == 0x00FF);
+ test_fail_unless( cspec.qmp_forward.cm.original_average_data_rate == 0x000F);
+ test_fail_unless( cspec.qmp_forward.cm.rx_window_size == 0x100F);
+ test_fail_unless( cspec.qmp_forward.cm.smoothing_buffer_size == 0x100F10);
+ test_fail_unless( cspec.qmp_forward.cm.bidirectional_burst == 0x01);
+ test_fail_unless( cspec.qmp_forward.cco.txops_per_beacon_period == 0x15);
+ test_fail_unless( cspec.qmp_forward.cco.average_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( cspec.qmp_forward.cco.minimum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( cspec.qmp_forward.cco.maximum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( cspec.qmp_forward.cco.ppb_threshold == 0x0FF0);
+ test_fail_unless( cspec.qmp_forward.cco.surplus_bandwith == 0x0FF0);
+ test_fail_unless( cspec.qmp_forward.cco.smallest_tolerable_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( cspec.qmp_forward.cco.original_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( cspec.qmp_forward.cco.cco_bidirectional_burst == 0x01);
+
+
+ // QMP REVERSE
+ test_fail_unless( cspec.qmp_reverse.forward_or_reverse == QMP_REVERSE);
+ test_fail_unless( cspec.qmp_reverse.valid.delay_bound_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.jitter_bound_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.average_msdu_size_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.maximum_msdu_size_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.average_data_rate_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.minimum_data_rate_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.maximum_data_rate_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.minimum_inter_txop_time_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.maximum_inter_txop_time_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.maximum_burst_size_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.exception_policy_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.inactivity_interval_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.msdu_error_rate_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.clst_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.cdesc_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.ats_tolerance_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.smallest_tolerable_data_rate_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.original_average_data_rate_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.rx_window_size_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.smoothing_buffer_size_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.bidirectional_burst_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.txops_per_beacon_period_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.minimum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.maximum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.ppb_threshold_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.surplus_bandwith_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.smallest_tolerable_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.original_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.cco_bidirectional_burst_available == true);
+ test_fail_unless( cspec.qmp_reverse.cm.delay_bound == 0x01010101);
+ test_fail_unless( cspec.qmp_reverse.cm.jitter_bound == 0x10101010);
+ test_fail_unless( cspec.qmp_reverse.cm.average_msdu_size == 0XF0F0);
+ test_fail_unless( cspec.qmp_reverse.cm.maximum_msdu_size == 0XF0F0);
+ test_fail_unless( cspec.qmp_reverse.cm.average_data_rate == 0x0F0F);
+ test_fail_unless( cspec.qmp_reverse.cm.minimum_data_rate == 0x0F0F);
+ test_fail_unless( cspec.qmp_reverse.cm.maximum_data_rate == 0x0F0F);
+ test_fail_unless( cspec.qmp_reverse.cm.maximum_inter_txop_time == 0xFFFF);
+ test_fail_unless( cspec.qmp_reverse.cm.minimum_inter_txop_time == 0xFFFF);
+ test_fail_unless( cspec.qmp_reverse.cm.maximum_burst_size == 0x00FF);
+ test_fail_unless( cspec.qmp_reverse.cm.exception_policy == EXCEPTION_RECONFIGURE_CONNEXION);
+ test_fail_unless( cspec.qmp_reverse.cm.inactivity_interval == 0X00FF00FF);
+ test_fail_unless( cspec.qmp_reverse.cm.msdu_error_rate == 0x00FF);
+ test_fail_unless( cspec.qmp_reverse.cm.clst == 0x00);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ip_version == 0x00);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ipv4_source_address[0] == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ipv4_source_address[1] == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ipv4_source_address[2] == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ipv4_source_address[3] == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.source_port == 0x0FF1);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[0] == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[1] == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[2] == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[3] == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.destination_port == 0xFFF1);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.protocol_type == 0x00);
+ test_fail_unless( cspec.qmp_reverse.cm.ats_tolerance == 0x00FF);
+ test_fail_unless( cspec.qmp_reverse.cm.smallest_tolerable_data_rate == 0x00FF);
+ test_fail_unless( cspec.qmp_reverse.cm.original_average_data_rate == 0x000F);
+ test_fail_unless( cspec.qmp_reverse.cm.rx_window_size == 0x100F);
+ test_fail_unless( cspec.qmp_reverse.cm.smoothing_buffer_size == 0x100F10);
+ test_fail_unless( cspec.qmp_reverse.cm.bidirectional_burst == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cco.txops_per_beacon_period == 0x15);
+ test_fail_unless( cspec.qmp_reverse.cco.average_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( cspec.qmp_reverse.cco.minimum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( cspec.qmp_reverse.cco.maximum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( cspec.qmp_reverse.cco.ppb_threshold == 0x0FF0);
+ test_fail_unless( cspec.qmp_reverse.cco.surplus_bandwith == 0x0FF0);
+ test_fail_unless( cspec.qmp_reverse.cco.smallest_tolerable_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( cspec.qmp_reverse.cco.original_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( cspec.qmp_reverse.cco.cco_bidirectional_burst == 0x01);
+
+ } test_end;
+
+ test_begin(t, "test case 2")
+ {
+ stream = (test_msg_2.mm_entry) + 2;
+ msg_field_cspec_init(&cspec);
+
+ len = msg_field_cspec_get_from_stream(stream, &cspec);
+
+ test_fail_unless( cspec.len == 0xAA );
+
+ // cinfo forward
+ test_fail_unless( cspec.cinfo_forward.valid == CINFO_VALID );
+ test_fail_unless( cspec.cinfo_forward.mac_service_type == MAC_CONTENTION );
+ test_fail_unless( cspec.cinfo_forward.user_priority == USER_PRIORITY_CAP0 );
+ test_fail_unless( cspec.cinfo_forward.ats == ATS_FOR_HLE );
+ test_fail_unless( cspec.cinfo_forward.smoothing == SMOOTHING_REQUESTED);
+
+ // cinfo reverse
+ test_fail_unless( (cspec.cinfo_reverse.valid == CINFO_NOT_VALID) );
+
+ // qmp forward
+ test_fail_unless( cspec.qmp_forward.forward_or_reverse == QMP_FORWARD);
+ test_fail_unless( cspec.qmp_forward.cm.delay_bound == 0x01010101);
+ test_fail_unless( cspec.qmp_forward.cm.jitter_bound == 0x10101010);
+ test_fail_unless( cspec.qmp_forward.cm.average_msdu_size == 0XF0F0);
+ test_fail_unless( cspec.qmp_forward.cm.maximum_msdu_size == 0XF0F0);
+ test_fail_unless( cspec.qmp_forward.cm.average_data_rate == 0x0F0F);
+ test_fail_unless( cspec.qmp_forward.cm.minimum_data_rate == 0x0F0F);
+ test_fail_unless( cspec.qmp_forward.cm.maximum_data_rate == 0x0F0F);
+ test_fail_unless( cspec.qmp_forward.cm.maximum_inter_txop_time == 0xFFFF);
+ test_fail_unless( cspec.qmp_forward.cm.minimum_inter_txop_time == 0xFFFF);
+ test_fail_unless( cspec.qmp_forward.cm.maximum_burst_size == 0x00FF);
+ test_fail_unless( cspec.qmp_forward.cm.exception_policy == EXCEPTION_RECONFIGURE_CONNEXION);
+ test_fail_unless( cspec.qmp_forward.cm.inactivity_interval == 0X00FF00FF);
+ test_fail_unless( cspec.qmp_forward.cm.msdu_error_rate == 0x00FF);
+ test_fail_unless( cspec.qmp_forward.cm.clst == 0x00);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ip_version == 0x00);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ipv4_source_address[0] == 0x01);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ipv4_source_address[1] == 0x01);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ipv4_source_address[2] == 0x01);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ipv4_source_address[3] == 0x01);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.source_port == 0x0FF1);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ipv4_destination_address[0] == 0x01);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ipv4_destination_address[1] == 0x01);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ipv4_destination_address[2] == 0x01);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.ipv4_destination_address[3] == 0x01);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.destination_port == 0xFFF1);
+ test_fail_unless( cspec.qmp_forward.cm.cdesc.protocol_type == 0x00);
+ test_fail_unless( cspec.qmp_forward.cm.ats_tolerance == 0x00FF);
+ test_fail_unless( cspec.qmp_forward.cm.smallest_tolerable_data_rate == 0x00FF);
+ test_fail_unless( cspec.qmp_forward.cm.original_average_data_rate == 0x000F);
+ test_fail_unless( cspec.qmp_forward.cm.rx_window_size == 0x100F);
+ test_fail_unless( cspec.qmp_forward.cm.smoothing_buffer_size == 0x100F10);
+ test_fail_unless( cspec.qmp_forward.cm.bidirectional_burst == 0x01);
+ test_fail_unless( cspec.qmp_forward.cco.txops_per_beacon_period == 0x15);
+ test_fail_unless( cspec.qmp_forward.cco.average_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( cspec.qmp_forward.cco.minimum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( cspec.qmp_forward.cco.maximum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( cspec.qmp_forward.cco.ppb_threshold == 0x0FF0);
+ test_fail_unless( cspec.qmp_forward.cco.surplus_bandwith == 0x0FF0);
+ test_fail_unless( cspec.qmp_forward.cco.smallest_tolerable_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( cspec.qmp_forward.cco.original_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( cspec.qmp_forward.cco.cco_bidirectional_burst == 0x01);
+
+ // qmp reverse
+ test_fail_unless( cspec.qmp_reverse.forward_or_reverse == QMP_REVERSE);
+
+ }test_end;
+
+ test_begin(t, "test case 3")
+ {
+
+ stream = (test_msg_3.mm_entry) + 2;
+ msg_field_cspec_init(&cspec);
+
+ len = msg_field_cspec_get_from_stream(stream, &cspec);
+
+
+ test_fail_unless( cspec.len == 0x00AF );
+
+ // cinfo forward
+ test_fail_unless( (cspec.cinfo_forward.valid == CINFO_NOT_VALID) );
+
+ // cinfo reverse
+ test_fail_unless( cspec.cinfo_reverse.valid == CINFO_VALID);
+ test_fail_unless( cspec.cinfo_reverse.mac_service_type == MAC_CONTENTION);
+ test_fail_unless( cspec.cinfo_reverse.user_priority == USER_PRIORITY_CAP0);
+ test_fail_unless( cspec.cinfo_reverse.ats == ATS_FOR_HLE);
+ test_fail_unless( cspec.cinfo_reverse.smoothing == SMOOTHING_REQUESTED);
+
+ // qmp forward
+ test_fail_unless( cspec.qmp_forward.forward_or_reverse == QMP_FORWARD);
+
+
+ // qmp reverse
+ test_fail_unless( cspec.qmp_reverse.forward_or_reverse == QMP_REVERSE);
+ test_fail_unless( cspec.qmp_reverse.valid.delay_bound_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.jitter_bound_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.average_msdu_size_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.maximum_msdu_size_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.average_data_rate_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.minimum_data_rate_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.maximum_data_rate_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.minimum_inter_txop_time_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.maximum_inter_txop_time_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.maximum_burst_size_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.exception_policy_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.inactivity_interval_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.msdu_error_rate_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.clst_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.cdesc_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.ats_tolerance_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.smallest_tolerable_data_rate_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.original_average_data_rate_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.rx_window_size_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.smoothing_buffer_size_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.bidirectional_burst_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.txops_per_beacon_period_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.minimum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.maximum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.ppb_threshold_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.surplus_bandwith_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.smallest_tolerable_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.original_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( cspec.qmp_reverse.valid.cco_bidirectional_burst_available == true);
+ test_fail_unless( cspec.qmp_reverse.cm.delay_bound == 0x01010101);
+ test_fail_unless( cspec.qmp_reverse.cm.jitter_bound == 0x10101010);
+ test_fail_unless( cspec.qmp_reverse.cm.average_msdu_size == 0XF0F0);
+ test_fail_unless( cspec.qmp_reverse.cm.maximum_msdu_size == 0XF0F0);
+ test_fail_unless( cspec.qmp_reverse.cm.average_data_rate == 0x0F0F);
+ test_fail_unless( cspec.qmp_reverse.cm.minimum_data_rate == 0x0F0F);
+ test_fail_unless( cspec.qmp_reverse.cm.maximum_data_rate == 0x0F0F);
+ test_fail_unless( cspec.qmp_reverse.cm.maximum_inter_txop_time == 0xFFFF);
+ test_fail_unless( cspec.qmp_reverse.cm.minimum_inter_txop_time == 0xFFFF);
+ test_fail_unless( cspec.qmp_reverse.cm.maximum_burst_size == 0x00FF);
+ test_fail_unless( cspec.qmp_reverse.cm.exception_policy == EXCEPTION_RECONFIGURE_CONNEXION);
+ test_fail_unless( cspec.qmp_reverse.cm.inactivity_interval == 0X00FF00FF);
+ test_fail_unless( cspec.qmp_reverse.cm.msdu_error_rate == 0x00FF);
+ test_fail_unless( cspec.qmp_reverse.cm.clst == 0x00);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ip_version == 0x00);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ipv4_source_address[0] == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ipv4_source_address[1] == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ipv4_source_address[2] == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ipv4_source_address[3] == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.source_port == 0x0FF1);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[0] == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[1] == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[2] == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[3] == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.destination_port == 0xFFF1);
+ test_fail_unless( cspec.qmp_reverse.cm.cdesc.protocol_type == 0x00);
+ test_fail_unless( cspec.qmp_reverse.cm.ats_tolerance == 0x00FF);
+ test_fail_unless( cspec.qmp_reverse.cm.smallest_tolerable_data_rate == 0x00FF);
+ test_fail_unless( cspec.qmp_reverse.cm.original_average_data_rate == 0x000F);
+ test_fail_unless( cspec.qmp_reverse.cm.rx_window_size == 0x100F);
+ test_fail_unless( cspec.qmp_reverse.cm.smoothing_buffer_size == 0x100F10);
+ test_fail_unless( cspec.qmp_reverse.cm.bidirectional_burst == 0x01);
+ test_fail_unless( cspec.qmp_reverse.cco.txops_per_beacon_period == 0x15);
+ test_fail_unless( cspec.qmp_reverse.cco.average_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( cspec.qmp_reverse.cco.minimum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( cspec.qmp_reverse.cco.maximum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( cspec.qmp_reverse.cco.ppb_threshold == 0x0FF0);
+ test_fail_unless( cspec.qmp_reverse.cco.surplus_bandwith == 0x0FF0);
+ test_fail_unless( cspec.qmp_reverse.cco.smallest_tolerable_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( cspec.qmp_reverse.cco.original_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( cspec.qmp_reverse.cco.cco_bidirectional_burst == 0x01);
+
+ }test_end;
+
+ test_begin(t, "test case 4")
+ {
+ stream = (test_msg_4.mm_entry) + 2;
+ msg_field_cspec_init(&cspec);
+
+ len = msg_field_cspec_get_from_stream(stream, &cspec);
+
+
+
+ test_fail_unless( cspec.len == 0x0009 );
+
+ // cinfo forward
+ test_fail_unless( (cspec.cinfo_forward.valid == CINFO_NOT_VALID) );
+
+ // cinfo reverse
+ test_fail_unless( (cspec.cinfo_reverse.valid == CINFO_NOT_VALID) );
+
+ // qmp forward
+ // test_fail_unless( qmp_forward.forward_or_reverse == QMP_FORWARD);
+
+
+ // qmp reverse
+ // test_fail_unless( qmp_reverse.qmp_len == 0);
+
+ }test_end;
+
+}
+
+
+void
+conn_test_set_cspec_on_stream(test_t t)
+{
+ cspec_t cspec;
+ len_t len;
+ u8 stream[255];
+
+ test_case_begin(t, "TEST: set_cspec_on_stream");
+
+ test_begin(t, "test case 1")
+ {
+ msg_field_cspec_init(&cspec);
+
+ // CINFO FORWARD
+
+ cspec.cinfo_forward.valid = CINFO_VALID;
+ cspec.cinfo_forward.mac_service_type = MAC_CONTENTION;
+ cspec.cinfo_forward.user_priority = USER_PRIORITY_CAP0;
+ cspec.cinfo_forward.ats = ATS_FOR_HLE;
+ cspec.cinfo_forward.smoothing = SMOOTHING_REQUESTED;
+
+ // CINFO REVERSE
+ cspec.cinfo_reverse.valid = CINFO_VALID;
+ cspec.cinfo_reverse.mac_service_type = MAC_CONTENTION;
+ cspec.cinfo_reverse.user_priority = USER_PRIORITY_CAP0;
+ cspec.cinfo_reverse.ats = ATS_FOR_HLE;
+ cspec.cinfo_reverse.smoothing = SMOOTHING_REQUESTED;
+
+ // QMP FORWARD
+ cspec.qmp_forward.forward_or_reverse = QMP_FORWARD;
+ cspec.qmp_forward.cm.delay_bound = 0x01010101;
+ cspec.qmp_forward.cm.jitter_bound = 0x10101010;
+ cspec.qmp_forward.cm.average_msdu_size = 0XF0F0;
+ cspec.qmp_forward.cm.maximum_msdu_size = 0XF0F0;
+ cspec.qmp_forward.cm.average_data_rate = 0x0F0F;
+ cspec.qmp_forward.cm.minimum_data_rate = 0x0F0F;
+ cspec.qmp_forward.cm.maximum_data_rate = 0x0F0F;
+ cspec.qmp_forward.cm.maximum_inter_txop_time = 0xFFFF;
+ cspec.qmp_forward.cm.minimum_inter_txop_time = 0xFFFF;
+ cspec.qmp_forward.cm.maximum_burst_size = 0x00FF;
+ cspec.qmp_forward.cm.exception_policy = EXCEPTION_RECONFIGURE_CONNEXION;
+ cspec.qmp_forward.cm.inactivity_interval = 0X00FF00FF;
+ cspec.qmp_forward.cm.msdu_error_rate = 0x00FF;
+ cspec.qmp_forward.cm.clst = 0x00;
+ cspec.qmp_forward.cm.cdesc.ip_version = 0x00;
+ cspec.qmp_forward.cm.cdesc.ipv4_source_address[0] = 0x01;
+ cspec.qmp_forward.cm.cdesc.ipv4_source_address[1] = 0x01;
+ cspec.qmp_forward.cm.cdesc.ipv4_source_address[2] = 0x01;
+ cspec.qmp_forward.cm.cdesc.ipv4_source_address[3] = 0x01;
+ cspec.qmp_forward.cm.cdesc.source_port = 0x0FF1;
+ cspec.qmp_forward.cm.cdesc.ipv4_destination_address[0] = 0x01;
+ cspec.qmp_forward.cm.cdesc.ipv4_destination_address[1] = 0x01;
+ cspec.qmp_forward.cm.cdesc.ipv4_destination_address[2] = 0x01;
+ cspec.qmp_forward.cm.cdesc.ipv4_destination_address[3] = 0x01;
+ cspec.qmp_forward.cm.cdesc.destination_port = 0xFFF1;
+ cspec.qmp_forward.cm.cdesc.protocol_type = 0x00;
+ cspec.qmp_forward.cm.ats_tolerance = 0x00FF;
+ cspec.qmp_forward.cm.smallest_tolerable_data_rate = 0x00FF;
+ cspec.qmp_forward.cm.original_average_data_rate = 0x000F;
+ cspec.qmp_forward.cm.rx_window_size = 0x100F;
+ cspec.qmp_forward.cm.smoothing_buffer_size = 0x100F10;
+ cspec.qmp_forward.cm.bidirectional_burst = 0x01;
+ cspec.qmp_forward.cco.txops_per_beacon_period = 0x15;
+ cspec.qmp_forward.cco.average_number_of_pbs_per_txop = 0x100F;
+ cspec.qmp_forward.cco.minimum_number_of_pbs_per_txop = 0x100F;
+ cspec.qmp_forward.cco.maximum_number_of_pbs_per_txop = 0x100F;
+ cspec.qmp_forward.cco.ppb_threshold = 0x0FF0;
+ cspec.qmp_forward.cco.surplus_bandwith = 0x0FF0;
+ cspec.qmp_forward.cco.smallest_tolerable_average_number_of_pbs_per_txop = 0x0FF0;
+ cspec.qmp_forward.cco.original_average_number_of_pbs_per_txop = 0x0FF0;
+ cspec.qmp_forward.cco.cco_bidirectional_burst = 0x01;
+
+
+ // QMP REVERSE
+ cspec.qmp_reverse.forward_or_reverse = QMP_REVERSE;
+ cspec.qmp_reverse.valid.delay_bound_available = true;
+ cspec.qmp_reverse.valid.jitter_bound_available = true;
+ cspec.qmp_reverse.valid.average_msdu_size_available = true;
+ cspec.qmp_reverse.valid.maximum_msdu_size_available = true;
+ cspec.qmp_reverse.valid.average_data_rate_available = true;
+ cspec.qmp_reverse.valid.minimum_data_rate_available = true;
+ cspec.qmp_reverse.valid.maximum_data_rate_available = true;
+ cspec.qmp_reverse.valid.minimum_inter_txop_time_available = true;
+ cspec.qmp_reverse.valid.maximum_inter_txop_time_available = true;
+ cspec.qmp_reverse.valid.maximum_burst_size_available = true;
+ cspec.qmp_reverse.valid.exception_policy_available = true;
+ cspec.qmp_reverse.valid.inactivity_interval_available = true;
+ cspec.qmp_reverse.valid.msdu_error_rate_available = true;
+ cspec.qmp_reverse.valid.clst_available = true;
+ cspec.qmp_reverse.valid.cdesc_available = true;
+ cspec.qmp_reverse.valid.ats_tolerance_available = true;
+ cspec.qmp_reverse.valid.smallest_tolerable_data_rate_available = true;
+ cspec.qmp_reverse.valid.original_average_data_rate_available = true;
+ cspec.qmp_reverse.valid.rx_window_size_available = true;
+ cspec.qmp_reverse.valid.smoothing_buffer_size_available = true;
+ cspec.qmp_reverse.valid.bidirectional_burst_available = true;
+ cspec.qmp_reverse.valid.txops_per_beacon_period_available = true;
+ cspec.qmp_reverse.valid.average_number_of_pbs_per_txop_available = true;
+ cspec.qmp_reverse.valid.minimum_number_of_pbs_per_txop_available = true;
+ cspec.qmp_reverse.valid.maximum_number_of_pbs_per_txop_available = true;
+ cspec.qmp_reverse.valid.ppb_threshold_available = true;
+ cspec.qmp_reverse.valid.surplus_bandwith_available = true;
+ cspec.qmp_reverse.valid.smallest_tolerable_average_number_of_pbs_per_txop_available = true;
+ cspec.qmp_reverse.valid.original_average_number_of_pbs_per_txop_available = true;
+ cspec.qmp_reverse.valid.cco_bidirectional_burst_available = true;
+ cspec.qmp_reverse.cm.delay_bound = 0x01010101;
+ cspec.qmp_reverse.cm.jitter_bound = 0x10101010;
+ cspec.qmp_reverse.cm.average_msdu_size = 0XF0F0;
+ cspec.qmp_reverse.cm.maximum_msdu_size = 0XF0F0;
+ cspec.qmp_reverse.cm.average_data_rate = 0x0F0F;
+ cspec.qmp_reverse.cm.minimum_data_rate = 0x0F0F;
+ cspec.qmp_reverse.cm.maximum_data_rate = 0x0F0F;
+ cspec.qmp_reverse.cm.maximum_inter_txop_time = 0xFFFF;
+ cspec.qmp_reverse.cm.minimum_inter_txop_time = 0xFFFF;
+ cspec.qmp_reverse.cm.maximum_burst_size = 0x00FF;
+ cspec.qmp_reverse.cm.exception_policy = EXCEPTION_RECONFIGURE_CONNEXION;
+ cspec.qmp_reverse.cm.inactivity_interval = 0X00FF00FF;
+ cspec.qmp_reverse.cm.msdu_error_rate = 0x00FF;
+ cspec.qmp_reverse.cm.clst = 0x00;
+ cspec.qmp_reverse.cm.cdesc.ip_version = 0x00;
+ cspec.qmp_reverse.cm.cdesc.ipv4_source_address[0] = 0x01;
+ cspec.qmp_reverse.cm.cdesc.ipv4_source_address[1] = 0x01;
+ cspec.qmp_reverse.cm.cdesc.ipv4_source_address[2] = 0x01;
+ cspec.qmp_reverse.cm.cdesc.ipv4_source_address[3] = 0x01;
+ cspec.qmp_reverse.cm.cdesc.source_port = 0x0FF1;
+ cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[0] = 0x01;
+ cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[1] = 0x01;
+ cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[2] = 0x01;
+ cspec.qmp_reverse.cm.cdesc.ipv4_destination_address[3] = 0x01;
+ cspec.qmp_reverse.cm.cdesc.destination_port = 0xFFF1;
+ cspec.qmp_reverse.cm.cdesc.protocol_type = 0x00;
+ cspec.qmp_reverse.cm.ats_tolerance = 0x00FF;
+ cspec.qmp_reverse.cm.smallest_tolerable_data_rate = 0x00FF;
+ cspec.qmp_reverse.cm.original_average_data_rate = 0x000F;
+ cspec.qmp_reverse.cm.rx_window_size = 0x100F;
+ cspec.qmp_reverse.cm.smoothing_buffer_size = 0x100F10;
+ cspec.qmp_reverse.cm.bidirectional_burst = 0x01;
+ cspec.qmp_reverse.cco.txops_per_beacon_period = 0x15;
+ cspec.qmp_reverse.cco.average_number_of_pbs_per_txop = 0x100F;
+ cspec.qmp_reverse.cco.minimum_number_of_pbs_per_txop = 0x100F;
+ cspec.qmp_reverse.cco.maximum_number_of_pbs_per_txop = 0x100F;
+ cspec.qmp_reverse.cco.ppb_threshold = 0x0FF0;
+ cspec.qmp_reverse.cco.surplus_bandwith = 0x0FF0;
+ cspec.qmp_reverse.cco.smallest_tolerable_average_number_of_pbs_per_txop = 0x0FF0;
+ cspec.qmp_reverse.cco.original_average_number_of_pbs_per_txop = 0x0FF0;
+ cspec.qmp_reverse.cco.cco_bidirectional_burst = 0x01;
+
+ len = msg_field_cspec_set_on_stream(stream, &cspec);
+
+ test_fail_unless(true);
+
+ } test_end;
+}
+
+void
+conn_test_set_classifier_rules_on_stream(test_t t)
+{
+ msg_mme_t msg;
+ classifier_rules_t classifier_rule;
+
+
+ test_case_begin(t, "TEST save_classifier_rules");
+
+ test_begin(t, "test case 1")
+ {
+ classifier_rule.classifier_version = CLASSIFIER_CURRENT_VERSION;
+ classifier_rule.nbr_rules = 10;
+
+ classifier_rule.data.classifier_rules_available.ethernet_destination_address_field_available = 1;
+ classifier_rule.data.classifier_rules_available.ethernet_source_address_field_available = 1;
+ classifier_rule.data.classifier_rules_available.vlan_user_priority_field_available = 1;
+ classifier_rule.data.classifier_rules_available.vlan_id_field_available = 1;
+ classifier_rule.data.classifier_rules_available.ipv4_type_of_protocol_field_available = 0;
+ classifier_rule.data.classifier_rules_available.ipv4_protocol_field_available = 0;
+ classifier_rule.data.classifier_rules_available.ipv4_source_address_field_available = 0;
+ classifier_rule.data.classifier_rules_available.ipv4_destination_address_field_available = 0;
+ classifier_rule.data.classifier_rules_available.ipv6_traffic_class_field_available = 1;
+ classifier_rule.data.classifier_rules_available.ipv6_flow_label_field_available = 1;
+ classifier_rule.data.classifier_rules_available.ipv6_source_address_field_available = 1;
+ classifier_rule.data.classifier_rules_available.ipv6_destination_address_field_available = 1;
+ classifier_rule.data.classifier_rules_available.tcp_source_port_field_available = 0;
+ classifier_rule.data.classifier_rules_available.tcp_destination_port_field_available = 0;
+ classifier_rule.data.classifier_rules_available.udp_source_port_field_available = 1;
+ classifier_rule.data.classifier_rules_available.udp_destination_port_field_available = 1;
+
+ classifier_rule.data.ethernet_destination_address[0] = 0x22;
+ classifier_rule.data.ethernet_destination_address[1] = 0x22;
+ classifier_rule.data.ethernet_destination_address[2] = 0x22;
+ classifier_rule.data.ethernet_destination_address[3] = 0x22;
+ classifier_rule.data.ethernet_destination_address[4] = 0x22;
+ classifier_rule.data.ethernet_destination_address[5] = 0x22;
+
+ classifier_rule.data.ethernet_source_address[0] = 0x33;
+ classifier_rule.data.ethernet_source_address[1] = 0x33;
+ classifier_rule.data.ethernet_source_address[2] = 0x33;
+ classifier_rule.data.ethernet_source_address[3] = 0x33;
+ classifier_rule.data.ethernet_source_address[4] = 0x33;
+ classifier_rule.data.ethernet_source_address[5] = 0x33;
+
+ classifier_rule.data.vlan_user_priority = 0x34;
+ classifier_rule.data.vlan_id = 0x4554;
+ classifier_rule.data.ipv6_traffic_class = 0x45;
+
+ classifier_rule.data.ipv6_flow_label[0] = 0x05;
+ classifier_rule.data.ipv6_flow_label[1] = 0x15;
+ classifier_rule.data.ipv6_flow_label[2] = 0x25;
+
+ classifier_rule.data.ipv6_source_address[0] = 0x05;
+ classifier_rule.data.ipv6_source_address[1] = 0x15;
+ classifier_rule.data.ipv6_source_address[2] = 0x25;
+ classifier_rule.data.ipv6_source_address[3] = 0x05;
+ classifier_rule.data.ipv6_source_address[4] = 0x15;
+ classifier_rule.data.ipv6_source_address[5] = 0x25;
+ classifier_rule.data.ipv6_source_address[6] = 0x05;
+ classifier_rule.data.ipv6_source_address[7] = 0x15;
+ classifier_rule.data.ipv6_source_address[8] = 0x25;
+ classifier_rule.data.ipv6_source_address[9] = 0x05;
+ classifier_rule.data.ipv6_source_address[10] = 0x15;
+ classifier_rule.data.ipv6_source_address[11] = 0x25;
+ classifier_rule.data.ipv6_source_address[12] = 0x05;
+ classifier_rule.data.ipv6_source_address[13] = 0x15;
+ classifier_rule.data.ipv6_source_address[14] = 0x25;
+ classifier_rule.data.ipv6_source_address[15] = 0x05;
+ classifier_rule.data.ipv6_destination_address[0] = 0x15;
+ classifier_rule.data.ipv6_destination_address[1] = 0x25;
+ classifier_rule.data.ipv6_destination_address[2] = 0x35;
+ classifier_rule.data.ipv6_destination_address[3] = 0x15;
+ classifier_rule.data.ipv6_destination_address[4] = 0x25;
+ classifier_rule.data.ipv6_destination_address[5] = 0x35;
+ classifier_rule.data.ipv6_destination_address[6] = 0x15;
+ classifier_rule.data.ipv6_destination_address[7] = 0x25;
+ classifier_rule.data.ipv6_destination_address[8] = 0x35;
+ classifier_rule.data.ipv6_destination_address[9] = 0x15;
+ classifier_rule.data.ipv6_destination_address[10] = 0x25;
+ classifier_rule.data.ipv6_destination_address[11] = 0x35;
+ classifier_rule.data.ipv6_destination_address[12] = 0x15;
+ classifier_rule.data.ipv6_destination_address[13] = 0x25;
+ classifier_rule.data.ipv6_destination_address[14] = 0x35;
+ classifier_rule.data.ipv6_destination_address[15] = 0x15;
+
+ classifier_rule.data.udp_destination_port = 0x8343;
+
+ classifier_rule.data.udp_source_port = 0x3483;
+
+ msg_field_classifier_set_on_stream((u8*)&msg.mm_entry, &classifier_rule );
+
+ test_fail_unless(msg.mm_entry[0] == 0x00);
+ test_fail_unless(msg.mm_entry[1] == 0x0A);
+ test_fail_unless(msg.mm_entry[2] == 0x00);
+ test_fail_unless(msg.mm_entry[3] == 0x22);
+ test_fail_unless(msg.mm_entry[4] == 0x22);
+ test_fail_unless(msg.mm_entry[5] == 0x22);
+ test_fail_unless(msg.mm_entry[6] == 0x22);
+ test_fail_unless(msg.mm_entry[7] == 0x22);
+ test_fail_unless(msg.mm_entry[8] == 0x22);
+ test_fail_unless(msg.mm_entry[9] == 0x01);
+ test_fail_unless(msg.mm_entry[10] == 0x33);
+ test_fail_unless(msg.mm_entry[11] == 0x33);
+ test_fail_unless(msg.mm_entry[12] == 0x33);
+ test_fail_unless(msg.mm_entry[13] == 0x33);
+ test_fail_unless(msg.mm_entry[14] == 0x33);
+ test_fail_unless(msg.mm_entry[15] == 0x33);
+ test_fail_unless(msg.mm_entry[16] == 0x02);
+ test_fail_unless(msg.mm_entry[17] == 0x34);
+ test_fail_unless(msg.mm_entry[18] == 0x03);
+ test_fail_unless(msg.mm_entry[19] == 0x45);
+ test_fail_unless(msg.mm_entry[20] == 0x54);
+ test_fail_unless(msg.mm_entry[21] == 0x08);
+ test_fail_unless(msg.mm_entry[22] == 0x45);
+ test_fail_unless(msg.mm_entry[23] == 0x09);
+ test_fail_unless(msg.mm_entry[24] == 0x05);
+ test_fail_unless(msg.mm_entry[25] == 0x15);
+ test_fail_unless(msg.mm_entry[26] == 0x25);
+ test_fail_unless(msg.mm_entry[27] == 0x0A);
+ test_fail_unless(msg.mm_entry[28] == 0x05);
+ test_fail_unless(msg.mm_entry[29] == 0x15);
+ test_fail_unless(msg.mm_entry[30] == 0x25);
+ test_fail_unless(msg.mm_entry[31] == 0x05);
+ test_fail_unless(msg.mm_entry[32] == 0x15);
+ test_fail_unless(msg.mm_entry[33] == 0x25);
+ test_fail_unless(msg.mm_entry[34] == 0x05);
+ test_fail_unless(msg.mm_entry[35] == 0x15);
+ test_fail_unless(msg.mm_entry[36] == 0x25);
+ test_fail_unless(msg.mm_entry[37] == 0x05);
+ test_fail_unless(msg.mm_entry[38] == 0x15);
+ test_fail_unless(msg.mm_entry[39] == 0x25);
+ test_fail_unless(msg.mm_entry[40] == 0x05);
+ test_fail_unless(msg.mm_entry[41] == 0x15);
+ test_fail_unless(msg.mm_entry[42] == 0x25);
+ test_fail_unless(msg.mm_entry[43] == 0x05);
+ test_fail_unless(msg.mm_entry[44] == 0x0B);
+ test_fail_unless(msg.mm_entry[45] == 0x15);
+ test_fail_unless(msg.mm_entry[46] == 0x25);
+ test_fail_unless(msg.mm_entry[47] == 0x35);
+ test_fail_unless(msg.mm_entry[48] == 0x15);
+ test_fail_unless(msg.mm_entry[49] == 0x25);
+ test_fail_unless(msg.mm_entry[50] == 0x35);
+ test_fail_unless(msg.mm_entry[51] == 0x15);
+ test_fail_unless(msg.mm_entry[52] == 0x25);
+ test_fail_unless(msg.mm_entry[53] == 0x35);
+ test_fail_unless(msg.mm_entry[54] == 0x15);
+ test_fail_unless(msg.mm_entry[55] == 0x25);
+ test_fail_unless(msg.mm_entry[56] == 0x35);
+ test_fail_unless(msg.mm_entry[57] == 0x15);
+ test_fail_unless(msg.mm_entry[58] == 0x25);
+ test_fail_unless(msg.mm_entry[59] == 0x35);
+ test_fail_unless(msg.mm_entry[60] == 0x15);
+ test_fail_unless(msg.mm_entry[61] == 0x0E);
+ test_fail_unless(msg.mm_entry[62] == 0x34);
+ test_fail_unless(msg.mm_entry[63] == 0x83);
+ test_fail_unless(msg.mm_entry[64] == 0x0F);
+ test_fail_unless(msg.mm_entry[65] == 0x83);
+ test_fail_unless(msg.mm_entry[66] == 0x43);
+
+
+ test_fail_unless(true);
+ }test_end;
+
+ test_begin(t, "test case 2")
+ {
+
+ classifier_rule.classifier_version = CLASSIFIER_CURRENT_VERSION;
+ classifier_rule.nbr_rules = 8;
+ classifier_rule.data.classifier_rules_available.ethernet_destination_address_field_available = 1;
+ classifier_rule.data.classifier_rules_available.ethernet_source_address_field_available = 1;
+ classifier_rule.data.classifier_rules_available.vlan_user_priority_field_available = 0;
+ classifier_rule.data.classifier_rules_available.vlan_id_field_available = 0;
+ classifier_rule.data.classifier_rules_available.ipv4_type_of_protocol_field_available = 1;
+ classifier_rule.data.classifier_rules_available.ipv4_protocol_field_available = 1;
+ classifier_rule.data.classifier_rules_available.ipv4_source_address_field_available = 1;
+ classifier_rule.data.classifier_rules_available.ipv4_destination_address_field_available = 1;
+ classifier_rule.data.classifier_rules_available.ipv6_traffic_class_field_available = 0;
+ classifier_rule.data.classifier_rules_available.ipv6_flow_label_field_available = 0;
+ classifier_rule.data.classifier_rules_available.ipv6_source_address_field_available = 0;
+ classifier_rule.data.classifier_rules_available.ipv6_destination_address_field_available = 0;
+ classifier_rule.data.classifier_rules_available.tcp_source_port_field_available = 1;
+ classifier_rule.data.classifier_rules_available.tcp_destination_port_field_available = 1;
+ classifier_rule.data.classifier_rules_available.udp_source_port_field_available = 0;
+ classifier_rule.data.classifier_rules_available.udp_destination_port_field_available = 0;
+
+ classifier_rule.data.ethernet_destination_address[0] = 0x01;
+ classifier_rule.data.ethernet_destination_address[1] = 0x02;
+ classifier_rule.data.ethernet_destination_address[2] = 0x03;
+ classifier_rule.data.ethernet_destination_address[3] = 0x04;
+ classifier_rule.data.ethernet_destination_address[4] = 0x05;
+ classifier_rule.data.ethernet_destination_address[5] = 0x06;
+
+ classifier_rule.data.ethernet_source_address[0] = 0x06;
+ classifier_rule.data.ethernet_source_address[1] = 0x05;
+ classifier_rule.data.ethernet_source_address[2] = 0x04;
+ classifier_rule.data.ethernet_source_address[3] = 0x03;
+ classifier_rule.data.ethernet_source_address[4] = 0x02;
+ classifier_rule.data.ethernet_source_address[5] = 0x01;
+
+ classifier_rule.data.ipv4_type_of_service = 0x08;
+
+ classifier_rule.data.ipv4_protocol = 0x0;
+
+ classifier_rule.data.ipv4_source_address[0] = 0x04;
+ classifier_rule.data.ipv4_source_address[1] = 0x04;
+ classifier_rule.data.ipv4_source_address[2] = 0x04;
+ classifier_rule.data.ipv4_source_address[3] = 0x04;
+
+ classifier_rule.data.ipv4_destination_address[0] = 0x34;
+ classifier_rule.data.ipv4_destination_address[1] = 0x34;
+ classifier_rule.data.ipv4_destination_address[2] = 0x34;
+ classifier_rule.data.ipv4_destination_address[3] = 0x34;
+
+ classifier_rule.data.tcp_destination_port = 0x3454;
+
+ classifier_rule.data.tcp_source_port = 0x5432;
+
+ msg_field_classifier_set_on_stream((u8*)&msg.mm_entry, &classifier_rule );
+
+ test_fail_unless(msg.mm_entry[0] == 0x00);
+ test_fail_unless(msg.mm_entry[1] == 0x08);
+ test_fail_unless(msg.mm_entry[2] == 0x00);
+ test_fail_unless(msg.mm_entry[3] == 0x01);
+ test_fail_unless(msg.mm_entry[4] == 0x02);
+ test_fail_unless(msg.mm_entry[5] == 0x03);
+ test_fail_unless(msg.mm_entry[6] == 0x04);
+ test_fail_unless(msg.mm_entry[7] == 0x05);
+ test_fail_unless(msg.mm_entry[8] == 0x06);
+ test_fail_unless(msg.mm_entry[9] == 0x01);
+ test_fail_unless(msg.mm_entry[10] == 0x06);
+ test_fail_unless(msg.mm_entry[11] == 0x05);
+ test_fail_unless(msg.mm_entry[12] == 0x04);
+ test_fail_unless(msg.mm_entry[13] == 0x03);
+ test_fail_unless(msg.mm_entry[14] == 0x02);
+ test_fail_unless(msg.mm_entry[15] == 0x01);
+ test_fail_unless(msg.mm_entry[16] == 0X04);
+ test_fail_unless(msg.mm_entry[17] == 0x08);
+ test_fail_unless(msg.mm_entry[18] == 0x05);
+ test_fail_unless(msg.mm_entry[19] == 0x00);
+ test_fail_unless(msg.mm_entry[20] == 0x06);
+ test_fail_unless(msg.mm_entry[21] == 0x04);
+ test_fail_unless(msg.mm_entry[22] == 0x04);
+ test_fail_unless(msg.mm_entry[23] == 0x04);
+ test_fail_unless(msg.mm_entry[24] == 0x04);
+ test_fail_unless(msg.mm_entry[25] == 0x07);
+ test_fail_unless(msg.mm_entry[26] == 0x34);
+ test_fail_unless(msg.mm_entry[27] == 0x34);
+ test_fail_unless(msg.mm_entry[28] == 0x34);
+ test_fail_unless(msg.mm_entry[29] == 0x34);
+ test_fail_unless(msg.mm_entry[30] == 0x0C);
+ test_fail_unless(msg.mm_entry[31] == 0x54);
+ test_fail_unless(msg.mm_entry[32] == 0X32);
+ test_fail_unless(msg.mm_entry[33] == 0x0D);
+ test_fail_unless(msg.mm_entry[34] == 0x34);
+ test_fail_unless(msg.mm_entry[35] == 0x54);
+
+
+ }test_end;
+}
+
+
+void conn_test_set_qmp_on_stream(test_t t)
+{
+ qmp_t qmp;
+ u8 msg[256];
+ u32 len;
+ int i;
+
+ test_case_begin(t, "TEST set_qmp");
+
+
+ test_begin(t, "test case 1 - forward")
+ {
+ msg_field_qmp_init(&qmp);
+
+ qmp.forward_or_reverse = QMP_FORWARD;
+ qmp.valid.delay_bound_available = true;
+ qmp.valid.jitter_bound_available = true;
+ qmp.valid.average_msdu_size_available = true;
+ qmp.valid.maximum_msdu_size_available = true;
+ qmp.valid.average_data_rate_available = true;
+ qmp.valid.minimum_data_rate_available = true;
+ qmp.valid.maximum_data_rate_available = true;
+ qmp.valid.minimum_inter_txop_time_available = true;
+ qmp.valid.maximum_inter_txop_time_available = true;
+ qmp.valid.maximum_burst_size_available = true;
+ qmp.valid.exception_policy_available = true;
+ qmp.valid.inactivity_interval_available = true;
+ qmp.valid.msdu_error_rate_available = true;
+ qmp.valid.clst_available = true;
+ qmp.valid.cdesc_available = true;
+ qmp.valid.ats_tolerance_available = true;
+ qmp.valid.smallest_tolerable_data_rate_available = true;
+ qmp.valid.original_average_data_rate_available = true;
+ qmp.valid.rx_window_size_available = true;
+ qmp.valid.smoothing_buffer_size_available = true;
+ qmp.valid.bidirectional_burst_available = true;
+ qmp.valid.txops_per_beacon_period_available = true;
+ qmp.valid.average_number_of_pbs_per_txop_available = true;
+ qmp.valid.minimum_number_of_pbs_per_txop_available = true;
+ qmp.valid.maximum_number_of_pbs_per_txop_available = true;
+ qmp.valid.ppb_threshold_available = true;
+ qmp.valid.surplus_bandwith_available = true;
+ qmp.valid.smallest_tolerable_average_number_of_pbs_per_txop_available = true;
+ qmp.valid.original_average_number_of_pbs_per_txop_available = true;
+ qmp.valid.cco_bidirectional_burst_available = true;
+ qmp.cm.delay_bound = 0x01010101;
+ qmp.cm.jitter_bound = 0x10101010;
+ qmp.cm.average_msdu_size = 0XF0F0;
+ qmp.cm.maximum_msdu_size = 0XF0F0;
+ qmp.cm.average_data_rate = 0x0F0F;
+ qmp.cm.minimum_data_rate = 0x0F0F;
+ qmp.cm.maximum_data_rate = 0x0F0F;
+ qmp.cm.maximum_inter_txop_time = 0xFFFF;
+ qmp.cm.minimum_inter_txop_time = 0xFFFF;
+ qmp.cm.maximum_burst_size = 0x00FF;
+ qmp.cm.exception_policy = EXCEPTION_RECONFIGURE_CONNEXION;
+ qmp.cm.inactivity_interval = 0X00FF00FF;
+ qmp.cm.msdu_error_rate = 0x00FF;
+ qmp.cm.clst = 0x00;
+ qmp.cm.cdesc.ip_version = 0x00;
+ qmp.cm.cdesc.ipv4_source_address[0] = 0x01;
+ qmp.cm.cdesc.ipv4_source_address[1] = 0x01;
+ qmp.cm.cdesc.ipv4_source_address[2] = 0x01;
+ qmp.cm.cdesc.ipv4_source_address[3] = 0x01;
+ qmp.cm.cdesc.source_port = 0x0FF1;
+ qmp.cm.cdesc.ipv4_destination_address[0] = 0x01;
+ qmp.cm.cdesc.ipv4_destination_address[1] = 0x01;
+ qmp.cm.cdesc.ipv4_destination_address[2] = 0x01;
+ qmp.cm.cdesc.ipv4_destination_address[3] = 0x01;
+ qmp.cm.cdesc.destination_port = 0xFFF1;
+ qmp.cm.cdesc.protocol_type = 0x00;
+ qmp.cm.ats_tolerance = 0x00FF;
+ qmp.cm.smallest_tolerable_data_rate = 0x00FF;
+ qmp.cm.original_average_data_rate = 0x000F;
+ qmp.cm.rx_window_size = 0x100F;
+ qmp.cm.smoothing_buffer_size = 0x100F10;
+ qmp.cm.bidirectional_burst = 0x01;
+ qmp.cco.txops_per_beacon_period = 0x15;
+ qmp.cco.average_number_of_pbs_per_txop = 0x100F;
+ qmp.cco.minimum_number_of_pbs_per_txop = 0x100F;
+ qmp.cco.maximum_number_of_pbs_per_txop = 0x100F;
+ qmp.cco.ppb_threshold = 0x0FF0;
+ qmp.cco.surplus_bandwith = 0x0FF0;
+ qmp.cco.smallest_tolerable_average_number_of_pbs_per_txop = 0x0FF0;
+ qmp.cco.original_average_number_of_pbs_per_txop = 0x0FF0;
+ qmp.cco.cco_bidirectional_burst = 0x01;
+
+
+ len = msg_field_qmp_set_on_stream(msg,&qmp);
+
+
+ test_fail_unless( len == 164, "Invalid value - current value %i", len );
+
+ for(i = 0; i < 164; i++)
+ {
+ test_fail_unless(msg[i] == test_stream_forward_1[i], "i=%i unvalid ",i);
+ }
+
+ }test_end;
+
+ test_begin(t, "test case 2")
+ {
+ msg_field_qmp_init(&qmp);
+
+ qmp.valid.delay_bound_available = true;
+ qmp.valid.jitter_bound_available = true;
+ qmp.valid.average_msdu_size_available = true;
+ qmp.valid.maximum_msdu_size_available = true;
+ qmp.valid.average_data_rate_available = true;
+ qmp.valid.minimum_data_rate_available = true;
+ qmp.valid.maximum_data_rate_available = true;
+ qmp.valid.minimum_inter_txop_time_available = true;
+ qmp.valid.maximum_inter_txop_time_available = true;
+ qmp.valid.maximum_burst_size_available = true;
+ qmp.valid.exception_policy_available = true;
+ qmp.valid.inactivity_interval_available = true;
+ qmp.valid.msdu_error_rate_available = true;
+ qmp.valid.clst_available = true;
+ qmp.valid.cdesc_available = true;
+ qmp.valid.ats_tolerance_available = true;
+ qmp.valid.smallest_tolerable_data_rate_available = true;
+ qmp.valid.original_average_data_rate_available = true;
+ qmp.valid.rx_window_size_available = true;
+ qmp.valid.smoothing_buffer_size_available = true;
+ qmp.valid.bidirectional_burst_available = true;
+ qmp.valid.txops_per_beacon_period_available = true;
+ qmp.valid.average_number_of_pbs_per_txop_available = true;
+ qmp.valid.minimum_number_of_pbs_per_txop_available = true;
+ qmp.valid.maximum_number_of_pbs_per_txop_available = true;
+ qmp.valid.ppb_threshold_available = true;
+ qmp.valid.surplus_bandwith_available = true;
+ qmp.valid.smallest_tolerable_average_number_of_pbs_per_txop_available = true;
+ qmp.valid.original_average_number_of_pbs_per_txop_available = true;
+ qmp.valid.cco_bidirectional_burst_available = true;
+ qmp.cm.delay_bound = 0x01010101;
+ qmp.cm.jitter_bound = 0x10101010;
+ qmp.cm.average_msdu_size = 0XF0F0;
+ qmp.cm.maximum_msdu_size = 0XF0F0;
+ qmp.cm.average_data_rate = 0x0F0F;
+ qmp.cm.minimum_data_rate = 0x0F0F;
+ qmp.cm.maximum_data_rate = 0x0F0F;
+ qmp.cm.maximum_inter_txop_time = 0xFFFF;
+ qmp.cm.minimum_inter_txop_time = 0xFFFF;
+ qmp.cm.maximum_burst_size = 0x00FF;
+ qmp.cm.exception_policy = EXCEPTION_RECONFIGURE_CONNEXION;
+ qmp.cm.inactivity_interval = 0X00FF00FF;
+ qmp.cm.msdu_error_rate = 0x00FF;
+ qmp.cm.clst = 0x00;
+ qmp.cm.cdesc.ip_version = 0x00;
+ qmp.cm.cdesc.ipv4_source_address[0] = 0x01;
+ qmp.cm.cdesc.ipv4_source_address[1] = 0x01;
+ qmp.cm.cdesc.ipv4_source_address[2] = 0x01;
+ qmp.cm.cdesc.ipv4_source_address[3] = 0x01;
+ qmp.cm.cdesc.source_port = 0x0FF1;
+ qmp.cm.cdesc.ipv4_destination_address[0] = 0x01;
+ qmp.cm.cdesc.ipv4_destination_address[1] = 0x01;
+ qmp.cm.cdesc.ipv4_destination_address[2] = 0x01;
+ qmp.cm.cdesc.ipv4_destination_address[3] = 0x01;
+ qmp.cm.cdesc.destination_port = 0xFFF1;
+ qmp.cm.cdesc.protocol_type = 0x00;
+ qmp.cm.ats_tolerance = 0x00FF;
+ qmp.cm.smallest_tolerable_data_rate = 0x00FF;
+ qmp.cm.original_average_data_rate = 0x000F;
+ qmp.cm.rx_window_size = 0x100F;
+ qmp.cm.smoothing_buffer_size = 0x100F10;
+ qmp.cm.bidirectional_burst = 0x01;
+ qmp.cco.txops_per_beacon_period = 0x15;
+ qmp.cco.average_number_of_pbs_per_txop = 0x100F;
+ qmp.cco.minimum_number_of_pbs_per_txop = 0x100F;
+ qmp.cco.maximum_number_of_pbs_per_txop = 0x100F;
+ qmp.cco.ppb_threshold = 0x0FF0;
+ qmp.cco.surplus_bandwith = 0x0FF0;
+ qmp.cco.smallest_tolerable_average_number_of_pbs_per_txop = 0x0FF0;
+ qmp.cco.original_average_number_of_pbs_per_txop = 0x0FF0;
+ qmp.cco.cco_bidirectional_burst = 0x01;
+
+ len = msg_field_qmp_set_on_stream(msg, &qmp);
+
+ test_fail_unless( len == 164);
+
+ for(i = 0; i < 164; i++)
+ {
+ test_fail_unless(msg[i] == test_stream_forward_1[i], "i=%i unvalid ",i);
+ }
+
+
+ }test_end;
+}
+
+
+
+void
+conn_test_set_cid_on_stream (test_t t)
+{
+ cid_t cid;
+ len_t len;
+ u8 stream[4];
+
+ test_case_begin(t, "TEST set_cid_on_stream");
+
+ test_begin(t, "test case 1")
+ {
+ cid = 0X4352;
+
+ len = msg_field_cid_set_on_stream(stream, &cid);
+
+ test_fail_unless( len == 2);
+ test_fail_unless( stream[0] = 0x43);
+ test_fail_unless( stream[1] = 0x52);
+
+ }test_end;
+
+}
+
+
+void
+conn_test_get_cid_from_stream(test_t t)
+{
+ cid_t cid;
+ len_t len;
+ u8 stream[2] = { 0x34,0x76};
+
+ test_case_begin(t, "TEST get_cid_from_stream");
+
+ test_begin(t, "test case 1")
+ {
+ msg_field_cid_init(&cid);
+
+
+ len = msg_field_cid_get_from_stream(stream, &cid);
+
+ test_fail_unless( len == 2 );
+ test_fail_unless( cid == 0x3476);
+
+ }test_end;
+}
+
+
+void
+conn_test_get_qmp_from_stream(test_t t)
+{
+ qmp_t qmp;
+ len_t len;
+
+ test_case_begin(t, "TEST get_from_stream");
+
+ test_begin(t, "test case 1")
+ {
+ msg_field_qmp_init(&qmp);
+
+ len = msg_field_qmp_get_from_stream(test_stream_forward_1, test_stream_forward_1 + 164, &qmp, QMP_FORWARD);
+
+ test_fail_unless( len == 164);
+ test_fail_unless( qmp.valid.delay_bound_available == true);
+ test_fail_unless( qmp.valid.jitter_bound_available == true);
+ test_fail_unless( qmp.valid.average_msdu_size_available == true);
+ test_fail_unless( qmp.valid.maximum_msdu_size_available == true);
+ test_fail_unless( qmp.valid.average_data_rate_available == true);
+ test_fail_unless( qmp.valid.minimum_data_rate_available == true);
+ test_fail_unless( qmp.valid.maximum_data_rate_available == true);
+ test_fail_unless( qmp.valid.minimum_inter_txop_time_available == true);
+ test_fail_unless( qmp.valid.maximum_inter_txop_time_available == true);
+ test_fail_unless( qmp.valid.maximum_burst_size_available == true);
+ test_fail_unless( qmp.valid.exception_policy_available == true);
+ test_fail_unless( qmp.valid.inactivity_interval_available == true);
+ test_fail_unless( qmp.valid.msdu_error_rate_available == true);
+ test_fail_unless( qmp.valid.clst_available == true);
+ test_fail_unless( qmp.valid.cdesc_available == true);
+ test_fail_unless( qmp.valid.ats_tolerance_available == true);
+ test_fail_unless( qmp.valid.smallest_tolerable_data_rate_available == true);
+ test_fail_unless( qmp.valid.original_average_data_rate_available == true);
+ test_fail_unless( qmp.valid.rx_window_size_available == true);
+ test_fail_unless( qmp.valid.smoothing_buffer_size_available == true);
+ test_fail_unless( qmp.valid.bidirectional_burst_available == true);
+ test_fail_unless( qmp.valid.txops_per_beacon_period_available == true);
+ test_fail_unless( qmp.valid.average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( qmp.valid.minimum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( qmp.valid.maximum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( qmp.valid.ppb_threshold_available == true);
+ test_fail_unless( qmp.valid.surplus_bandwith_available == true);
+ test_fail_unless( qmp.valid.smallest_tolerable_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( qmp.valid.original_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( qmp.valid.cco_bidirectional_burst_available == true);
+
+ test_fail_unless( qmp.cm.delay_bound == 0x01010101);
+ test_fail_unless( qmp.cm.jitter_bound == 0x10101010);
+ test_fail_unless( qmp.cm.average_msdu_size == 0XF0F0);
+ test_fail_unless( qmp.cm.maximum_msdu_size == 0XF0F0);
+ test_fail_unless( qmp.cm.average_data_rate == 0x0F0F);
+ test_fail_unless( qmp.cm.minimum_data_rate == 0x0F0F);
+ test_fail_unless( qmp.cm.maximum_data_rate == 0x0F0F);
+ test_fail_unless( qmp.cm.maximum_inter_txop_time == 0xFFFF);
+ test_fail_unless( qmp.cm.minimum_inter_txop_time == 0xFFFF);
+ test_fail_unless( qmp.cm.maximum_burst_size == 0x00FF);
+ test_fail_unless( qmp.cm.exception_policy == EXCEPTION_RECONFIGURE_CONNEXION);
+ test_fail_unless( qmp.cm.inactivity_interval == 0X00FF00FF);
+ test_fail_unless( qmp.cm.msdu_error_rate == 0x00FF);
+ test_fail_unless( qmp.cm.clst == 0x00);
+ test_fail_unless( qmp.cm.cdesc.ip_version == 0x00);
+ test_fail_unless( qmp.cm.cdesc.ipv4_source_address[0] == 0x01);
+ test_fail_unless( qmp.cm.cdesc.ipv4_source_address[1] == 0x01);
+ test_fail_unless( qmp.cm.cdesc.ipv4_source_address[2] == 0x01);
+ test_fail_unless( qmp.cm.cdesc.ipv4_source_address[3] == 0x01);
+ test_fail_unless( qmp.cm.cdesc.source_port == 0x0FF1);
+ test_fail_unless( qmp.cm.cdesc.ipv4_destination_address[0] == 0x01);
+ test_fail_unless( qmp.cm.cdesc.ipv4_destination_address[1] == 0x01);
+ test_fail_unless( qmp.cm.cdesc.ipv4_destination_address[2] == 0x01);
+ test_fail_unless( qmp.cm.cdesc.ipv4_destination_address[3] == 0x01);
+ test_fail_unless( qmp.cm.cdesc.destination_port == 0xFFF1);
+ test_fail_unless( qmp.cm.cdesc.protocol_type == 0x00);
+ test_fail_unless( qmp.cm.ats_tolerance == 0x00FF);
+ test_fail_unless( qmp.cm.smallest_tolerable_data_rate == 0x00FF);
+ test_fail_unless( qmp.cm.original_average_data_rate == 0x000F);
+ test_fail_unless( qmp.cm.rx_window_size == 0x100F);
+ test_fail_unless( qmp.cm.smoothing_buffer_size == 0x100F10);
+ test_fail_unless( qmp.cm.bidirectional_burst == 0x01);
+ test_fail_unless( qmp.cco.txops_per_beacon_period == 0x15);
+ test_fail_unless( qmp.cco.average_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( qmp.cco.minimum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( qmp.cco.maximum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( qmp.cco.ppb_threshold == 0x0FF0);
+ test_fail_unless( qmp.cco.surplus_bandwith == 0x0FF0);
+ test_fail_unless( qmp.cco.smallest_tolerable_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( qmp.cco.original_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( qmp.cco.cco_bidirectional_burst == 0x01);
+ }test_end;
+
+ test_begin(t, "test case 2")
+ {
+ msg_field_qmp_init(&qmp);
+
+ msg_field_qmp_get_from_stream(test_stream_reverse_1, test_stream_reverse_1 + 164, &qmp, QMP_REVERSE);
+
+ test_fail_unless( qmp.valid.delay_bound_available == true);
+ test_fail_unless( qmp.valid.jitter_bound_available == true);
+ test_fail_unless( qmp.valid.average_msdu_size_available == true);
+ test_fail_unless( qmp.valid.maximum_msdu_size_available == true);
+ test_fail_unless( qmp.valid.average_data_rate_available == true);
+ test_fail_unless( qmp.valid.minimum_data_rate_available == true);
+ test_fail_unless( qmp.valid.maximum_data_rate_available == true);
+ test_fail_unless( qmp.valid.minimum_inter_txop_time_available == true);
+ test_fail_unless( qmp.valid.maximum_inter_txop_time_available == true);
+ test_fail_unless( qmp.valid.maximum_burst_size_available == true);
+ test_fail_unless( qmp.valid.exception_policy_available == true);
+ test_fail_unless( qmp.valid.inactivity_interval_available == true);
+ test_fail_unless( qmp.valid.msdu_error_rate_available == true);
+ test_fail_unless( qmp.valid.clst_available == true);
+ test_fail_unless( qmp.valid.cdesc_available == true);
+ test_fail_unless( qmp.valid.ats_tolerance_available == true);
+ test_fail_unless( qmp.valid.smallest_tolerable_data_rate_available == true);
+ test_fail_unless( qmp.valid.original_average_data_rate_available == true);
+ test_fail_unless( qmp.valid.rx_window_size_available == true);
+ test_fail_unless( qmp.valid.smoothing_buffer_size_available == true);
+ test_fail_unless( qmp.valid.bidirectional_burst_available == true);
+ test_fail_unless( qmp.valid.txops_per_beacon_period_available == true);
+ test_fail_unless( qmp.valid.average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( qmp.valid.minimum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( qmp.valid.maximum_number_of_pbs_per_txop_available == true);
+ test_fail_unless( qmp.valid.ppb_threshold_available == true);
+ test_fail_unless( qmp.valid.surplus_bandwith_available == true);
+ test_fail_unless( qmp.valid.smallest_tolerable_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( qmp.valid.original_average_number_of_pbs_per_txop_available == true);
+ test_fail_unless( qmp.valid.cco_bidirectional_burst_available == true);
+ test_fail_unless( qmp.cm.delay_bound == 0x01010101);
+ test_fail_unless( qmp.cm.jitter_bound == 0x10101010);
+ test_fail_unless( qmp.cm.average_msdu_size == 0XF0F0);
+ test_fail_unless( qmp.cm.maximum_msdu_size == 0XF0F0);
+ test_fail_unless( qmp.cm.average_data_rate == 0x0F0F);
+ test_fail_unless( qmp.cm.minimum_data_rate == 0x0F0F);
+ test_fail_unless( qmp.cm.maximum_data_rate == 0x0F0F);
+ test_fail_unless( qmp.cm.maximum_inter_txop_time == 0xFFFF);
+ test_fail_unless( qmp.cm.minimum_inter_txop_time == 0xFFFF);
+ test_fail_unless( qmp.cm.maximum_burst_size == 0x00FF);
+ test_fail_unless( qmp.cm.exception_policy == EXCEPTION_RECONFIGURE_CONNEXION);
+ test_fail_unless( qmp.cm.inactivity_interval == 0X00FF00FF);
+ test_fail_unless( qmp.cm.msdu_error_rate == 0x00FF);
+ test_fail_unless( qmp.cm.clst == 0x00);
+ test_fail_unless( qmp.cm.cdesc.ip_version == 0x00);
+ test_fail_unless( qmp.cm.cdesc.ipv4_source_address[0] == 0x01);
+ test_fail_unless( qmp.cm.cdesc.ipv4_source_address[1] == 0x01);
+ test_fail_unless( qmp.cm.cdesc.ipv4_source_address[2] == 0x01);
+ test_fail_unless( qmp.cm.cdesc.ipv4_source_address[3] == 0x01);
+ test_fail_unless( qmp.cm.cdesc.source_port == 0x0FF1);
+ test_fail_unless( qmp.cm.cdesc.ipv4_destination_address[0] == 0x01);
+ test_fail_unless( qmp.cm.cdesc.ipv4_destination_address[1] == 0x01);
+ test_fail_unless( qmp.cm.cdesc.ipv4_destination_address[2] == 0x01);
+ test_fail_unless( qmp.cm.cdesc.ipv4_destination_address[3] == 0x01);
+ test_fail_unless( qmp.cm.cdesc.destination_port == 0xFFF1);
+ test_fail_unless( qmp.cm.cdesc.protocol_type == 0x00);
+ test_fail_unless( qmp.cm.ats_tolerance == 0x00FF);
+ test_fail_unless( qmp.cm.smallest_tolerable_data_rate == 0x00FF);
+ test_fail_unless( qmp.cm.original_average_data_rate == 0x000F);
+ test_fail_unless( qmp.cm.rx_window_size == 0x100F);
+ test_fail_unless( qmp.cm.smoothing_buffer_size == 0x100F10);
+ test_fail_unless( qmp.cm.bidirectional_burst == 0x01);
+ test_fail_unless( qmp.cco.txops_per_beacon_period == 0x15);
+ test_fail_unless( qmp.cco.average_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( qmp.cco.minimum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( qmp.cco.maximum_number_of_pbs_per_txop == 0x100F);
+ test_fail_unless( qmp.cco.ppb_threshold == 0x0FF0);
+ test_fail_unless( qmp.cco.surplus_bandwith == 0x0FF0);
+ test_fail_unless( qmp.cco.smallest_tolerable_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( qmp.cco.original_average_number_of_pbs_per_txop == 0x0FF0);
+ test_fail_unless( qmp.cco.cco_bidirectional_burst == 0x01);
+ }test_end;
+}
+
+
+
+
+
+
+void
+test_msg_field (test_t t)
+{
+ dbg_assert (t);
+
+ test_suite_begin (t, "TEST MESSAGE FIELD");
+
+ conn_test_get_cid_from_stream(t);
+ conn_test_set_cid_on_stream(t);
+
+ conn_test_set_cinfo_on_stream(t);
+ conn_test_get_cinfo_from_stream(t);
+
+ conn_test_set_qmp_on_stream(t);
+ conn_test_get_qmp_from_stream(t);
+
+ conn_test_set_classifier_rules_on_stream(t);
+ conn_test_get_classifier_rules_from_stream (t);
+
+ conn_test_get_cspec_from_stream( t);
+ conn_test_set_cspec_on_stream(t);
+}
+
+
diff --git a/cesar/cp/secu/Makefile b/cesar/cp/secu/Makefile
new file mode 100644
index 0000000000..5883b30821
--- /dev/null
+++ b/cesar/cp/secu/Makefile
@@ -0,0 +1,9 @@
+BASE = ../../
+
+ECOS = y
+
+TARGET_PROGRAMS = secu
+secu_SOURCES = secu_aes.c secu_lib.c secu_pbkdf1.c secu_sha2.c
+secu_MODULES = lib
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/cp/secu/Module b/cesar/cp/secu/Module
new file mode 100644
index 0000000000..7b71337d21
--- /dev/null
+++ b/cesar/cp/secu/Module
@@ -0,0 +1,2 @@
+SOURCES := secu_aes.c secu_lib.c secu_pbkdf1.c secu_sha2.c secu_p_run.c
+
diff --git a/cesar/cp/secu/inc/secu_aes.h b/cesar/cp/secu/inc/secu_aes.h
new file mode 100644
index 0000000000..2b7fc19199
--- /dev/null
+++ b/cesar/cp/secu/inc/secu_aes.h
@@ -0,0 +1,113 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/secu/aes.h
+ * \brief AES method
+ * \ingroup cp_secu
+ */
+
+#ifndef uint8
+#define uint8 unsigned char
+#endif
+
+#ifndef uint32
+#define uint32 unsigned long
+#endif
+
+/*
+ * 32-bit integer manipulation macros (big endian)
+ */
+#ifndef GET_UINT32_BE
+#define GET_UINT32_BE(n,b,i) \
+{ \
+ (n) = ( (uint32) (b)[(i) ] << 24 ) \
+ | ( (uint32) (b)[(i) + 1] << 16 ) \
+ | ( (uint32) (b)[(i) + 2] << 8 ) \
+ | ( (uint32) (b)[(i) + 3] ); \
+}
+#endif
+#ifndef PUT_UINT32_BE
+#define PUT_UINT32_BE(n,b,i) \
+{ \
+ (b)[(i) ] = (uint8) ( (n) >> 24 ); \
+ (b)[(i) + 1] = (uint8) ( (n) >> 16 ); \
+ (b)[(i) + 2] = (uint8) ( (n) >> 8 ); \
+ (b)[(i) + 3] = (uint8) ( (n) ); \
+}
+#endif
+
+#ifndef _AES_H
+#define _AES_H
+
+#include <string.h>
+
+/**
+ * \brief AES context structure
+ */
+typedef struct
+{
+ unsigned long erk[64]; /*!< encryption round keys */
+ unsigned long drk[64]; /*!< decryption round keys */
+ int nr; /*!< number of rounds */
+} aes_context;
+
+/**
+ * \brief AES key schedule
+ *
+ * \param ctx AES context to be initialized
+ * \param key the secret key
+ * \param keysize must be 128, 192 or 256 bits long
+ */
+void
+aes_set_key (aes_context *ctx, unsigned char *key, int keysize);
+
+/**
+ * \brief AES block encryption (ECB mode)
+ *
+ * \param ctx AES context
+ * \param input plaintext block (16 bytes)
+ * \param output ciphertext block (16 bytes)
+ */
+void
+aes_encrypt (aes_context *ctx, unsigned char input[16], unsigned char output[16]);
+
+/**
+ * \brief AES block decryption (ECB mode)
+ *
+ * \param ctx AES context
+ * \param input ciphertext block (16 bytes)
+ * \param output plaintext block (16 bytes)
+ */
+void
+aes_decrypt (aes_context *ctx, unsigned char input[16], unsigned char output[16]);
+
+/**
+ * \brief AES-CBC buffer encryption
+ *
+ * \param ctx AES context
+ * \param iv initialization vector (modified after use) (16 bytes)
+ * \param input buffer holding the plaintext
+ * \param output buffer holding the ciphertext
+ * \param len length of the data to be encrypted
+ */
+void
+aes_cbc_encrypt (aes_context *ctx, unsigned char iv[16], unsigned char *input, unsigned char *output, int len);
+
+/**
+ * \brief AES-CBC buffer decryption
+ *
+ * \param ctx AES context
+ * \param iv initialization vector (modified after use)
+ * \param input buffer holding the ciphertext
+ * \param output buffer holding the plaintext
+ * \param len length of the data to be decrypted
+ */
+void
+aes_cbc_decrypt (aes_context *ctx, unsigned char iv[16], unsigned char *input, unsigned char *output, int len);
+
+#endif /* aes.h */
diff --git a/cesar/cp/secu/inc/secu_p_run.h b/cesar/cp/secu/inc/secu_p_run.h
new file mode 100644
index 0000000000..0d0444bd60
--- /dev/null
+++ b/cesar/cp/secu/inc/secu_p_run.h
@@ -0,0 +1,60 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/secu/seculib.h
+ * \brief All functions related to protocolrun
+ * \ingroup cp_secu
+ */
+#ifndef SECU_PRUN_H_
+#define SECU_PRUN_H_
+
+#include "cp/secu/secu.h"
+
+
+void
+secu_p_run_init(void);
+
+/**
+ * nonce generation
+ * \param p_sec station security context
+ * \return error code or 0 if success
+ */
+void
+secu_gen_nonce (const tei_t tei);
+
+
+/**
+ * Re-init protocol run parameters
+ * \param p_sec security context of station or CCO
+ * \param PID PID of the futur protocol run
+ * \return error code or 0 if success
+ */
+void
+secu_start_new_protocol_run(const tei_t tei, const cp_pid_t pid, protocol_run_t *p_run);
+
+/**
+ * Check parameters of received protocol run
+ * \param p_sec security context of station or CCO
+ * \param to_check the parameters to check
+ * \return error code or 0 if success
+ */
+E_ErrCode
+secu_check_protocol_run_param (const tei_t tei, const protocol_run_t to_check);
+
+/**
+ * generate parameters of the received protocol run
+ * \param p_sec security context of station or CCO
+ * \param gen the generated parameters
+ * \param last_msg set true if this is the last message of the protocol run
+ * \return error code or 0 if success
+ */
+E_ErrCode
+secu_gen_protocol_run_param (const tei_t tei, const bool last_msg, protocol_run_t *gen);
+
+
+#endif /*SECU_PRUN_H_*/
diff --git a/cesar/cp/secu/inc/secu_pbkdf1.h b/cesar/cp/secu/inc/secu_pbkdf1.h
new file mode 100644
index 0000000000..9d12c891e5
--- /dev/null
+++ b/cesar/cp/secu/inc/secu_pbkdf1.h
@@ -0,0 +1,46 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/secu/secu_pbkdf1.h
+ * \brief Fonction PBKDF1.
+ * \ingroup cp_secu
+ */
+
+#ifndef pbkdf1__h__
+#define pbkdf1__h__
+
+#include <string.h>
+
+#include "cp/secu/inc/secu_types.h"
+#include "cp/secu/inc/secu_sha2.h"
+#include "cp/secu/inc/secu_aes.h"
+
+/**
+ * Check that password is Homeplug AV compliant
+ * Homeplug AV 1.0.10 chap 7.10.7.1
+ * \param pwd_type password type (DPW, NMK, NPW)
+ * \param password password to check
+ * \return error code or 0 if success
+ */
+E_ErrCode
+secu_check_password_validity (pwd_type_t pwd_type, u8 password[]);
+
+/**
+ * pbkdf1
+ * \param input the input data to hash (can be a clear ascii password)
+ * \param input_len length of input
+ * \param salt salt to apply to input data
+ * \param salt_len length of salt
+ * \param it_count iteration number for the hash function
+ * \param output_key result of hash
+ * \return error code or 0 if success
+ */
+E_ErrCode
+secu_pbkdf1 (u8 input[], int input_len, u8 salt[], int salt_len, int it_count, u8 output_key[]);
+
+#endif
diff --git a/cesar/cp/secu/inc/secu_sha2.h b/cesar/cp/secu/inc/secu_sha2.h
new file mode 100644
index 0000000000..a752a6fc8a
--- /dev/null
+++ b/cesar/cp/secu/inc/secu_sha2.h
@@ -0,0 +1,129 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/secu/secu_sha2.h
+ * \brief SHA256 fonction
+ * \ingroup cp_secu
+ */
+
+#ifndef _SHA2_H
+#define _SHA2_H
+
+#include <string.h>
+#include <stdio.h>
+
+/**
+ * \brief SHA-256 context structure
+ */
+typedef struct
+{
+ unsigned long total[2]; /*!< number of bytes processed */
+ unsigned long state[8]; /*!< intermediate digest state */
+ unsigned char buffer[64]; /*!< data block being processed */
+ unsigned char ipad[64]; /*!< HMAC: inner padding */
+ unsigned char opad[64]; /*!< HMAC: outer padding */
+ int is224; /*!< 0 if SHA-256, 1 if SHA-224 */
+} sha2_context;
+
+/**
+ * \brief SHA-256 context setup
+ *
+ * \param ctx context to be initialized
+ * \param is224 0 = use SHA256, 1 = use SHA224
+ */
+void
+sha2_starts (sha2_context *ctx, int is224);
+
+/**
+ * \brief SHA-256 process buffer
+ *
+ * \param ctx SHA-256 context
+ * \param input buffer holding the data
+ * \param ilen length of the input data
+ */
+void
+sha2_update (sha2_context *ctx, unsigned char *input, int ilen);
+
+/**
+ * \brief SHA-256 final digest
+ *
+ * \param ctx SHA-256 context
+ * \param output SHA-224/256 checksum result
+ */
+void
+sha2_finish (sha2_context *ctx, unsigned char *output);
+
+/**
+ * \brief Output = SHA-256( input buffer )
+ *
+ * \param input buffer holding the data
+ * \param ilen length of the input data
+ * \param output SHA-224/256 checksum result size is SHA256OutputSize bytes
+ * \param is224 0 = use SHA256, 1 = use SHA224
+ */
+void
+sha2 (unsigned char *input, int ilen, unsigned char *output, int is224);
+
+/**
+ * \brief Output = SHA-256( file contents )
+ *
+ * \param path input file name
+ * \param output SHA-224/256 checksum result
+ * \param is224 0 = use SHA256, 1 = use SHA224
+ *
+ * \return 0 if successful, 1 if fopen failed,
+ * or 2 if fread failed
+ */
+//int
+//sha2_file( char *path, unsigned char *output, int is224 );
+
+/**
+ * \brief SHA-256 HMAC context setup
+ *
+ * \param ctx HMAC context to be initialized
+ * \param is224 0 = use SHA256, 1 = use SHA224
+ * \param key HMAC secret key
+ * \param keylen length of the HMAC key
+ */
+/*void sha2_hmac_starts( sha2_context *ctx, int is224,
+ unsigned char *key, int keylen );
+ */
+/**
+ * \brief SHA-256 HMAC process buffer
+ *
+ * \param ctx HMAC context
+ * \param input buffer holding the data
+ * \param ilen length of the input data
+ */
+/*void sha2_hmac_update( sha2_context *ctx,
+ unsigned char *input, int ilen );
+ */
+/**
+ * \brief SHA-256 HMAC final digest
+ *
+ * \param ctx HMAC context
+ * \param output SHA-224/256 HMAC checksum result
+ */
+//void sha2_hmac_finish( sha2_context *ctx, unsigned char *output );
+
+/**
+ * \brief Output = HMAC-SHA-256( hmac key, input buffer )
+ *
+ * \param key HMAC secret key
+ * \param keylen length of the HMAC key
+ * \param input buffer holding the data
+ * \param ilen length of the input data
+ * \param output HMAC-SHA-224/256 result
+ * \param is224 0 = use SHA256, 1 = use SHA224
+ */
+/*void sha2_hmac( unsigned char *key, int keylen,
+ unsigned char *input, int ilen,
+ unsigned char *output, int is224 );
+ */
+
+#endif /* sha2.h */
diff --git a/cesar/cp/secu/inc/secu_types.h b/cesar/cp/secu/inc/secu_types.h
new file mode 100644
index 0000000000..4d29da5857
--- /dev/null
+++ b/cesar/cp/secu/inc/secu_types.h
@@ -0,0 +1,126 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/secu/secutypes.h
+ * \brief AES keys and protocol run.
+ * \ingroup cp_secu
+ */
+
+#ifndef secutypes__h__
+#define secutypes__h__
+
+#include "cp/cp_types.h"
+
+/*
+ * HPAV const definition
+ */
+
+#define MAC_ADDR_SIZE 6
+
+#define MIN_PWD_ASCII_CHAR 32 // lower ASCII char accepted for password
+#define MAX_PWD_ASCII_CHAR 127 // upper ASCII char accepted for password
+#define MIN_DPW_SIZE 16 // min size of DPW password
+#define MIN_NPW_SIZE 8 // min size of NPW password
+#define MAX_PWD_SIZE 64 // max size of password
+#define MAX_HFID_SIZE 64 // max size of hfid (human-friendly identifier)
+#define AES_KEY_SIZE 16 // AES key size (in byte)
+#define SHA256_OUTPUT_SIZE 32 // SHA 256 generated key size
+#define OUTPUT_KEY_SIZE AES_KEY_SIZE // pbkdf1 generated key size
+#define SALT_SIZE 8 // salt size (byte)
+#define NID_SIZE 7 // NID size (byte)
+#define PMN_LAST_MSG 255 // protocol run last message
+
+typedef u8 aes_key_t[AES_KEY_SIZE];
+
+// payload encryption key select see p122
+typedef enum peks_t
+{
+ PEKS_DESTINATION_STA_DAK = 0x0,
+ PEKS_NMK = 0x1,
+ PEKS_TEK1 = 0x2,
+ PEKS_TEK2 = 0x3,
+ PEKS_TEK3 = 0x4,
+ PEKS_TEK4 = 0x5,
+ PEKS_TEK5 = 0x6,
+ PEKS_TEK6 = 0x7,
+ PEKS_TEK7 = 0x8,
+ PEKS_TEK8 = 0x9,
+ PEKS_TEK9 = 0xA,
+ PEKS_TEKA = 0xB,
+ PEKS_TEKB = 0xC,
+ PEKS_TEKC = 0xD,
+ PEKS_TEKD = 0xE,
+ PEKS_NOT_ENCRYPTED = 0xF
+} __attribute__ ((packed)) peks_t;
+
+typedef enum key_type_t
+{ DAK, NMK, NID, TEST} key_type_t;
+
+typedef enum pwd_type_t
+{ PWD_DPW, PWD_NMK, PWD_NMK_HS, PWD_TEST, PWD_NPW} pwd_type_t;
+
+typedef enum sec_level_t
+{ SIMPLE_CONNECT, SECURE} sec_level_t;
+
+typedef enum sec_state_t
+{ JOIN, ADD, ACCEPT} sec_state_t;
+
+typedef enum cp_pid_t
+{ AUTH_REQ_BY_NEW_STA = 0x0,
+ PROV_AUTH_STA_WITH_NEK = 0x1,
+ PROV_STA_WITH_NMK_U_DAK = 0x2,
+ PROV_STA_WITH_NMK_U_UKE = 0x3,
+ HLE_PRO = 0x4
+} cp_pid_t;
+
+typedef struct protocol_run_t
+{
+ cp_pid_t pid; // Protocol ID
+ s16 prn; // Protocol Run Number
+ u8 pmn; // Protocol Message Number
+ s32 nonce;
+} protocol_run_t;
+
+typedef struct nmk_t
+{
+ u8 nmk[AES_KEY_SIZE]; // (7.10.2.3)
+ u8 nid[NID_SIZE]; // (default is NMK hash)
+ sec_level_t sl; //Security Level associated with NMK
+} nmk_t;
+
+typedef struct security_parameters_t
+{
+ sec_level_t sl; // Security Level (7.10.3.1)
+ u8 dak[MAX_PWD_SIZE]; // Device Access Key (7.10.2.1)
+ nmk_t nmk[2]; // Network Membership Key
+ u8 nek[AES_KEY_SIZE];
+} security_parameters_t;
+
+typedef struct tek_t //(7.10.2.6) used for CM_ENCRYPTED_PAYLOAD.IND
+{
+ u8 tek[AES_KEY_SIZE];
+ //cyg_tick_count_t expires_date; // expiration date of tek
+ u32 expires_date; // expiration date of tek TODO change this
+} tek_t;
+
+typedef struct gen_key_t //(7.10.7.2) parameters for key generation
+{
+ u8 key[AES_KEY_SIZE]; // secret key for key generation
+ int count; // internal counter
+} gen_key_t;
+
+typedef struct cp_secu_t
+{
+ sec_state_t sec_state; // (Join, Add, Accept)
+ security_parameters_t security_parameters;
+ tek_t tek;
+ bool kbc;
+ u8 eks;
+} cp_secu_t;
+
+#endif
diff --git a/cesar/cp/secu/secu.h b/cesar/cp/secu/secu.h
new file mode 100644
index 0000000000..6d1f614a8b
--- /dev/null
+++ b/cesar/cp/secu/secu.h
@@ -0,0 +1,131 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/secu/seculib.h
+ * \brief All functions related to keys, protocolrun and security
+ * \ingroup cp_secu
+ */
+
+#ifndef seculib__h__
+#define seculib__h__
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "cp/secu/inc/secu_types.h"
+#include "cp/secu/inc/secu_pbkdf1.h"
+#include "cp/secu/inc/secu_p_run.h"
+
+/**
+ * initialize the secu module
+ * \param ctx the security context
+ */
+void
+secu_init (cp_secu_t *ctx);
+
+/**
+ * Uninitialize the security layer
+ *
+ * \param ctx the security context
+ */
+void
+secu_uninit (cp_secu_t *ctx);
+
+/**
+ * hash data or password.
+ * \param pwd_type the input or password type (DPW, NMK, NPW)
+ * \param in input or password to hash
+ * \param in_len input or password length
+ * \param key obtained key from input or password
+ * \return error code or 0 if success
+ */
+E_ErrCode
+secu_hash (pwd_type_t pwd_type, u8 in[], int in_len, u8 out[]);
+
+/**
+ * AES key generation
+ * \param key generated key, AES_KEY_SIZE (in bytes)
+ * \return error code or 0 if success
+ */
+E_ErrCode
+secu_gen_aes_key (u8 key[]);
+
+/**
+ * return the ek for the given peks
+ * \param peks the peks
+ * \param tei tei of the station (only if peks == PEKS_DESTINATION_STA_DAK)
+ * \return the key
+ */
+aes_key_t *
+secu_get_ek_from_peks(const peks_t peks, const tei_t tei);
+
+void
+secu_set_sta_s_dak(const tei_t, const aes_key_t dak);
+
+
+/*
+ * Hash a 128 bits NMK key to generate a 54 bits NID
+ * conforming to the security level specified.
+ * \param nmk, the NMK buffer pointer (input)
+ * \param security_level, the station security-level
+ * \param nid, the NID buffer pointer (output)
+ * \return E_ErrCode, return code (0 if success)
+ */
+E_ErrCode secu_nmk2nid(u8 *nmk, u8 security_level, u8 *nid);
+
+/*
+ * Hash a NPW password (1 to 64 chars in the 0x20-0x7F standard ASCII interval)
+ * to generate a 16 octets (128 bits) NMK key.
+ * \param npw,the NPW buffer pointer (input)
+ * \param nmk, the NMK buffer pointer (output)
+ * \return E_ErrCode, return code (0 if success)
+ */
+E_ErrCode secu_npw2nmk(char *npw, u8 *nmk);
+
+/**
+ * Get Key being changed.
+ * 0 for a frame level encryption key NEK.
+ * 1 for a payload encryption key.
+ *
+ * \param ctx the security context.
+ * \return the boolean value
+ */
+bool
+secu_get_kbc (cp_secu_t *ctx);
+
+/**
+ * Get Key being changed.
+ * 0 for a frame level encryption key NEK.
+ * 1 for a payload encryption key.
+ *
+ * \param ctx the security context.
+ * \return the boolean value
+ */
+bool
+cp_secu_get_kbc (cp_secu_t *ctx);
+
+/**
+ * Get the new EKS for the next beacon period.
+ *
+ * \param ctx the security context
+ * \return the eks value.
+ */
+u8
+secu_get_eks (cp_secu_t *ctx);
+
+/**
+ * Get the new EKS for the next beacon period.
+ *
+ * \param ctx the security context
+ * \return the eks value.
+ */
+u8
+cp_secu_get_eks (cp_secu_t *ctx);
+
+#endif
+
diff --git a/cesar/cp/secu/src/secu_aes.c b/cesar/cp/secu/src/secu_aes.c
new file mode 100644
index 0000000000..78787d834e
--- /dev/null
+++ b/cesar/cp/secu/src/secu_aes.c
@@ -0,0 +1,768 @@
+#ifndef _CRT_SECURE_NO_DEPRECATE
+#define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/secu/secu_aes.c
+ * \brief AES functions
+ * \ingroup cp_
+ */
+
+#include "common/std.h"
+#include "cp/secu/inc/secu_aes.h"
+
+#include <stdio.h>
+
+/*
+ * Uncomment the following line to use pre-computed tables,
+ * otherwise the tables will be generated at the first run.
+ */
+#define FIXED_TABLES
+
+#if !defined(FIXED_TABLES)
+
+/*
+ * Forward S-box & tables
+ */
+static uint8 FSb[256];
+static uint32 FT0[256];
+static uint32 FT1[256];
+static uint32 FT2[256];
+static uint32 FT3[256];
+
+/*
+ * Reverse S-box & tables
+ */
+static uint8 RSb[256];
+static uint32 RT0[256];
+static uint32 RT1[256];
+static uint32 RT2[256];
+static uint32 RT3[256];
+
+/*
+ * Round constants
+ */
+static uint32 RCON[10];
+
+/*
+ * Tables generation code
+ */
+#define ROTR8(x) ( ( ( x << 24 ) & 0xFFFFFFFF ) | \
+ ( ( x & 0xFFFFFFFF ) >> 8 ) )
+#define XTIME(x) ( ( x << 1 ) ^ ( ( x & 0x80 ) ? 0x1B : 0x00 ) )
+#define MUL(x,y) ( ( x && y ) ? pow[(log[x] + log[y]) % 255] : 0 )
+
+static void aes_gen_tables( void )
+{
+ int i;
+ uint8 x, y;
+ uint8 pow[256];
+ uint8 log[256];
+
+ /*
+ * compute pow and log tables over GF(2^8)
+ */
+ for( i = 0, x = 1; i < 256; i++, x ^= XTIME( x ) )
+ {
+ pow[i] = x;
+ log[x] = i;
+ }
+ /*
+ * calculate the round constants
+ */
+ for( i = 0, x = 1; i < 10; i++, x = XTIME( x ) )
+ {
+ RCON[i] = (uint32) x << 24;
+ }
+ /*
+ * generate the forward and reverse S-boxes
+ */
+ FSb[0x00] = 0x63;
+ RSb[0x63] = 0x00;
+
+ for( i = 1; i < 256; i++ )
+ {
+ x = pow[255 - log[i]];
+
+ y = x; y = ( y << 1 ) | ( y >> 7 );
+ x ^= y; y = ( y << 1 ) | ( y >> 7 );
+ x ^= y; y = ( y << 1 ) | ( y >> 7 );
+ x ^= y; y = ( y << 1 ) | ( y >> 7 );
+ x ^= y ^ 0x63;
+
+ FSb[i] = x;
+ RSb[x] = i;
+ }
+
+ /*
+ * generate the forward and reverse tables
+ */
+ for( i = 0; i < 256; i++ )
+ {
+ x = FSb[i]; y = XTIME( x );
+
+ FT0[i] = (uint32) ( x ^ y ) ^
+ ( (uint32) x << 8 ) ^
+ ( (uint32) x << 16 ) ^
+ ( (uint32) y << 24 );
+
+ FT0[i] &= 0xFFFFFFFF;
+
+ FT1[i] = ROTR8( FT0[i] );
+ FT2[i] = ROTR8( FT1[i] );
+ FT3[i] = ROTR8( FT2[i] );
+
+ y = RSb[i];
+
+ RT0[i] = ( (uint32) MUL( 0x0B, y ) ) ^
+ ( (uint32) MUL( 0x0D, y ) << 8 ) ^
+ ( (uint32) MUL( 0x09, y ) << 16 ) ^
+ ( (uint32) MUL( 0x0E, y ) << 24 );
+
+ RT0[i] &= 0xFFFFFFFF;
+
+ RT1[i] = ROTR8( RT0[i] );
+ RT2[i] = ROTR8( RT1[i] );
+ RT3[i] = ROTR8( RT2[i] );
+ }
+}
+
+#else
+
+/*
+ * Forward S-box
+ */
+static const uint8 FSb[256] = { 0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F,
+ 0xC5, 0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76, 0xCA, 0x82,
+ 0xC9, 0x7D, 0xFA, 0x59, 0x47, 0xF0, 0xAD, 0xD4, 0xA2, 0xAF, 0x9C,
+ 0xA4, 0x72, 0xC0, 0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC,
+ 0x34, 0xA5, 0xE5, 0xF1, 0x71, 0xD8, 0x31, 0x15, 0x04, 0xC7, 0x23,
+ 0xC3, 0x18, 0x96, 0x05, 0x9A, 0x07, 0x12, 0x80, 0xE2, 0xEB, 0x27,
+ 0xB2, 0x75, 0x09, 0x83, 0x2C, 0x1A, 0x1B, 0x6E, 0x5A, 0xA0, 0x52,
+ 0x3B, 0xD6, 0xB3, 0x29, 0xE3, 0x2F, 0x84, 0x53, 0xD1, 0x00, 0xED,
+ 0x20, 0xFC, 0xB1, 0x5B, 0x6A, 0xCB, 0xBE, 0x39, 0x4A, 0x4C, 0x58,
+ 0xCF, 0xD0, 0xEF, 0xAA, 0xFB, 0x43, 0x4D, 0x33, 0x85, 0x45, 0xF9,
+ 0x02, 0x7F, 0x50, 0x3C, 0x9F, 0xA8, 0x51, 0xA3, 0x40, 0x8F, 0x92,
+ 0x9D, 0x38, 0xF5, 0xBC, 0xB6, 0xDA, 0x21, 0x10, 0xFF, 0xF3, 0xD2,
+ 0xCD, 0x0C, 0x13, 0xEC, 0x5F, 0x97, 0x44, 0x17, 0xC4, 0xA7, 0x7E,
+ 0x3D, 0x64, 0x5D, 0x19, 0x73, 0x60, 0x81, 0x4F, 0xDC, 0x22, 0x2A,
+ 0x90, 0x88, 0x46, 0xEE, 0xB8, 0x14, 0xDE, 0x5E, 0x0B, 0xDB, 0xE0,
+ 0x32, 0x3A, 0x0A, 0x49, 0x06, 0x24, 0x5C, 0xC2, 0xD3, 0xAC, 0x62,
+ 0x91, 0x95, 0xE4, 0x79, 0xE7, 0xC8, 0x37, 0x6D, 0x8D, 0xD5, 0x4E,
+ 0xA9, 0x6C, 0x56, 0xF4, 0xEA, 0x65, 0x7A, 0xAE, 0x08, 0xBA, 0x78,
+ 0x25, 0x2E, 0x1C, 0xA6, 0xB4, 0xC6, 0xE8, 0xDD, 0x74, 0x1F, 0x4B,
+ 0xBD, 0x8B, 0x8A, 0x70, 0x3E, 0xB5, 0x66, 0x48, 0x03, 0xF6, 0x0E,
+ 0x61, 0x35, 0x57, 0xB9, 0x86, 0xC1, 0x1D, 0x9E, 0xE1, 0xF8, 0x98,
+ 0x11, 0x69, 0xD9, 0x8E, 0x94, 0x9B, 0x1E, 0x87, 0xE9, 0xCE, 0x55,
+ 0x28, 0xDF, 0x8C, 0xA1, 0x89, 0x0D, 0xBF, 0xE6, 0x42, 0x68, 0x41,
+ 0x99, 0x2D, 0x0F, 0xB0, 0x54, 0xBB, 0x16 };
+
+/*
+ * Forward tables
+ */
+#define FT \
+\
+ V(C6,63,63,A5), V(F8,7C,7C,84), V(EE,77,77,99), V(F6,7B,7B,8D), \
+ V(FF,F2,F2,0D), V(D6,6B,6B,BD), V(DE,6F,6F,B1), V(91,C5,C5,54), \
+ V(60,30,30,50), V(02,01,01,03), V(CE,67,67,A9), V(56,2B,2B,7D), \
+ V(E7,FE,FE,19), V(B5,D7,D7,62), V(4D,AB,AB,E6), V(EC,76,76,9A), \
+ V(8F,CA,CA,45), V(1F,82,82,9D), V(89,C9,C9,40), V(FA,7D,7D,87), \
+ V(EF,FA,FA,15), V(B2,59,59,EB), V(8E,47,47,C9), V(FB,F0,F0,0B), \
+ V(41,AD,AD,EC), V(B3,D4,D4,67), V(5F,A2,A2,FD), V(45,AF,AF,EA), \
+ V(23,9C,9C,BF), V(53,A4,A4,F7), V(E4,72,72,96), V(9B,C0,C0,5B), \
+ V(75,B7,B7,C2), V(E1,FD,FD,1C), V(3D,93,93,AE), V(4C,26,26,6A), \
+ V(6C,36,36,5A), V(7E,3F,3F,41), V(F5,F7,F7,02), V(83,CC,CC,4F), \
+ V(68,34,34,5C), V(51,A5,A5,F4), V(D1,E5,E5,34), V(F9,F1,F1,08), \
+ V(E2,71,71,93), V(AB,D8,D8,73), V(62,31,31,53), V(2A,15,15,3F), \
+ V(08,04,04,0C), V(95,C7,C7,52), V(46,23,23,65), V(9D,C3,C3,5E), \
+ V(30,18,18,28), V(37,96,96,A1), V(0A,05,05,0F), V(2F,9A,9A,B5), \
+ V(0E,07,07,09), V(24,12,12,36), V(1B,80,80,9B), V(DF,E2,E2,3D), \
+ V(CD,EB,EB,26), V(4E,27,27,69), V(7F,B2,B2,CD), V(EA,75,75,9F), \
+ V(12,09,09,1B), V(1D,83,83,9E), V(58,2C,2C,74), V(34,1A,1A,2E), \
+ V(36,1B,1B,2D), V(DC,6E,6E,B2), V(B4,5A,5A,EE), V(5B,A0,A0,FB), \
+ V(A4,52,52,F6), V(76,3B,3B,4D), V(B7,D6,D6,61), V(7D,B3,B3,CE), \
+ V(52,29,29,7B), V(DD,E3,E3,3E), V(5E,2F,2F,71), V(13,84,84,97), \
+ V(A6,53,53,F5), V(B9,D1,D1,68), V(00,00,00,00), V(C1,ED,ED,2C), \
+ V(40,20,20,60), V(E3,FC,FC,1F), V(79,B1,B1,C8), V(B6,5B,5B,ED), \
+ V(D4,6A,6A,BE), V(8D,CB,CB,46), V(67,BE,BE,D9), V(72,39,39,4B), \
+ V(94,4A,4A,DE), V(98,4C,4C,D4), V(B0,58,58,E8), V(85,CF,CF,4A), \
+ V(BB,D0,D0,6B), V(C5,EF,EF,2A), V(4F,AA,AA,E5), V(ED,FB,FB,16), \
+ V(86,43,43,C5), V(9A,4D,4D,D7), V(66,33,33,55), V(11,85,85,94), \
+ V(8A,45,45,CF), V(E9,F9,F9,10), V(04,02,02,06), V(FE,7F,7F,81), \
+ V(A0,50,50,F0), V(78,3C,3C,44), V(25,9F,9F,BA), V(4B,A8,A8,E3), \
+ V(A2,51,51,F3), V(5D,A3,A3,FE), V(80,40,40,C0), V(05,8F,8F,8A), \
+ V(3F,92,92,AD), V(21,9D,9D,BC), V(70,38,38,48), V(F1,F5,F5,04), \
+ V(63,BC,BC,DF), V(77,B6,B6,C1), V(AF,DA,DA,75), V(42,21,21,63), \
+ V(20,10,10,30), V(E5,FF,FF,1A), V(FD,F3,F3,0E), V(BF,D2,D2,6D), \
+ V(81,CD,CD,4C), V(18,0C,0C,14), V(26,13,13,35), V(C3,EC,EC,2F), \
+ V(BE,5F,5F,E1), V(35,97,97,A2), V(88,44,44,CC), V(2E,17,17,39), \
+ V(93,C4,C4,57), V(55,A7,A7,F2), V(FC,7E,7E,82), V(7A,3D,3D,47), \
+ V(C8,64,64,AC), V(BA,5D,5D,E7), V(32,19,19,2B), V(E6,73,73,95), \
+ V(C0,60,60,A0), V(19,81,81,98), V(9E,4F,4F,D1), V(A3,DC,DC,7F), \
+ V(44,22,22,66), V(54,2A,2A,7E), V(3B,90,90,AB), V(0B,88,88,83), \
+ V(8C,46,46,CA), V(C7,EE,EE,29), V(6B,B8,B8,D3), V(28,14,14,3C), \
+ V(A7,DE,DE,79), V(BC,5E,5E,E2), V(16,0B,0B,1D), V(AD,DB,DB,76), \
+ V(DB,E0,E0,3B), V(64,32,32,56), V(74,3A,3A,4E), V(14,0A,0A,1E), \
+ V(92,49,49,DB), V(0C,06,06,0A), V(48,24,24,6C), V(B8,5C,5C,E4), \
+ V(9F,C2,C2,5D), V(BD,D3,D3,6E), V(43,AC,AC,EF), V(C4,62,62,A6), \
+ V(39,91,91,A8), V(31,95,95,A4), V(D3,E4,E4,37), V(F2,79,79,8B), \
+ V(D5,E7,E7,32), V(8B,C8,C8,43), V(6E,37,37,59), V(DA,6D,6D,B7), \
+ V(01,8D,8D,8C), V(B1,D5,D5,64), V(9C,4E,4E,D2), V(49,A9,A9,E0), \
+ V(D8,6C,6C,B4), V(AC,56,56,FA), V(F3,F4,F4,07), V(CF,EA,EA,25), \
+ V(CA,65,65,AF), V(F4,7A,7A,8E), V(47,AE,AE,E9), V(10,08,08,18), \
+ V(6F,BA,BA,D5), V(F0,78,78,88), V(4A,25,25,6F), V(5C,2E,2E,72), \
+ V(38,1C,1C,24), V(57,A6,A6,F1), V(73,B4,B4,C7), V(97,C6,C6,51), \
+ V(CB,E8,E8,23), V(A1,DD,DD,7C), V(E8,74,74,9C), V(3E,1F,1F,21), \
+ V(96,4B,4B,DD), V(61,BD,BD,DC), V(0D,8B,8B,86), V(0F,8A,8A,85), \
+ V(E0,70,70,90), V(7C,3E,3E,42), V(71,B5,B5,C4), V(CC,66,66,AA), \
+ V(90,48,48,D8), V(06,03,03,05), V(F7,F6,F6,01), V(1C,0E,0E,12), \
+ V(C2,61,61,A3), V(6A,35,35,5F), V(AE,57,57,F9), V(69,B9,B9,D0), \
+ V(17,86,86,91), V(99,C1,C1,58), V(3A,1D,1D,27), V(27,9E,9E,B9), \
+ V(D9,E1,E1,38), V(EB,F8,F8,13), V(2B,98,98,B3), V(22,11,11,33), \
+ V(D2,69,69,BB), V(A9,D9,D9,70), V(07,8E,8E,89), V(33,94,94,A7), \
+ V(2D,9B,9B,B6), V(3C,1E,1E,22), V(15,87,87,92), V(C9,E9,E9,20), \
+ V(87,CE,CE,49), V(AA,55,55,FF), V(50,28,28,78), V(A5,DF,DF,7A), \
+ V(03,8C,8C,8F), V(59,A1,A1,F8), V(09,89,89,80), V(1A,0D,0D,17), \
+ V(65,BF,BF,DA), V(D7,E6,E6,31), V(84,42,42,C6), V(D0,68,68,B8), \
+ V(82,41,41,C3), V(29,99,99,B0), V(5A,2D,2D,77), V(1E,0F,0F,11), \
+ V(7B,B0,B0,CB), V(A8,54,54,FC), V(6D,BB,BB,D6), V(2C,16,16,3A)
+
+#define V(a,b,c,d) 0x##a##b##c##d
+static const uint32 FT0[256] = { FT};
+#undef V
+
+#define V(a,b,c,d) 0x##d##a##b##c
+static const uint32 FT1[256] = { FT};
+#undef V
+
+#define V(a,b,c,d) 0x##c##d##a##b
+static const uint32 FT2[256] = { FT};
+#undef V
+
+#define V(a,b,c,d) 0x##b##c##d##a
+static const uint32 FT3[256] = { FT};
+#undef V
+
+#undef FT
+
+/*
+ * Reverse S-box
+ */
+static const uint8 RSb[256] = { 0x52, 0x09, 0x6A, 0xD5, 0x30, 0x36, 0xA5,
+ 0x38, 0xBF, 0x40, 0xA3, 0x9E, 0x81, 0xF3, 0xD7, 0xFB, 0x7C, 0xE3,
+ 0x39, 0x82, 0x9B, 0x2F, 0xFF, 0x87, 0x34, 0x8E, 0x43, 0x44, 0xC4,
+ 0xDE, 0xE9, 0xCB, 0x54, 0x7B, 0x94, 0x32, 0xA6, 0xC2, 0x23, 0x3D,
+ 0xEE, 0x4C, 0x95, 0x0B, 0x42, 0xFA, 0xC3, 0x4E, 0x08, 0x2E, 0xA1,
+ 0x66, 0x28, 0xD9, 0x24, 0xB2, 0x76, 0x5B, 0xA2, 0x49, 0x6D, 0x8B,
+ 0xD1, 0x25, 0x72, 0xF8, 0xF6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xD4,
+ 0xA4, 0x5C, 0xCC, 0x5D, 0x65, 0xB6, 0x92, 0x6C, 0x70, 0x48, 0x50,
+ 0xFD, 0xED, 0xB9, 0xDA, 0x5E, 0x15, 0x46, 0x57, 0xA7, 0x8D, 0x9D,
+ 0x84, 0x90, 0xD8, 0xAB, 0x00, 0x8C, 0xBC, 0xD3, 0x0A, 0xF7, 0xE4,
+ 0x58, 0x05, 0xB8, 0xB3, 0x45, 0x06, 0xD0, 0x2C, 0x1E, 0x8F, 0xCA,
+ 0x3F, 0x0F, 0x02, 0xC1, 0xAF, 0xBD, 0x03, 0x01, 0x13, 0x8A, 0x6B,
+ 0x3A, 0x91, 0x11, 0x41, 0x4F, 0x67, 0xDC, 0xEA, 0x97, 0xF2, 0xCF,
+ 0xCE, 0xF0, 0xB4, 0xE6, 0x73, 0x96, 0xAC, 0x74, 0x22, 0xE7, 0xAD,
+ 0x35, 0x85, 0xE2, 0xF9, 0x37, 0xE8, 0x1C, 0x75, 0xDF, 0x6E, 0x47,
+ 0xF1, 0x1A, 0x71, 0x1D, 0x29, 0xC5, 0x89, 0x6F, 0xB7, 0x62, 0x0E,
+ 0xAA, 0x18, 0xBE, 0x1B, 0xFC, 0x56, 0x3E, 0x4B, 0xC6, 0xD2, 0x79,
+ 0x20, 0x9A, 0xDB, 0xC0, 0xFE, 0x78, 0xCD, 0x5A, 0xF4, 0x1F, 0xDD,
+ 0xA8, 0x33, 0x88, 0x07, 0xC7, 0x31, 0xB1, 0x12, 0x10, 0x59, 0x27,
+ 0x80, 0xEC, 0x5F, 0x60, 0x51, 0x7F, 0xA9, 0x19, 0xB5, 0x4A, 0x0D,
+ 0x2D, 0xE5, 0x7A, 0x9F, 0x93, 0xC9, 0x9C, 0xEF, 0xA0, 0xE0, 0x3B,
+ 0x4D, 0xAE, 0x2A, 0xF5, 0xB0, 0xC8, 0xEB, 0xBB, 0x3C, 0x83, 0x53,
+ 0x99, 0x61, 0x17, 0x2B, 0x04, 0x7E, 0xBA, 0x77, 0xD6, 0x26, 0xE1,
+ 0x69, 0x14, 0x63, 0x55, 0x21, 0x0C, 0x7D };
+
+/*
+ * Reverse tables
+ */
+#define RT \
+\
+ V(51,F4,A7,50), V(7E,41,65,53), V(1A,17,A4,C3), V(3A,27,5E,96), \
+ V(3B,AB,6B,CB), V(1F,9D,45,F1), V(AC,FA,58,AB), V(4B,E3,03,93), \
+ V(20,30,FA,55), V(AD,76,6D,F6), V(88,CC,76,91), V(F5,02,4C,25), \
+ V(4F,E5,D7,FC), V(C5,2A,CB,D7), V(26,35,44,80), V(B5,62,A3,8F), \
+ V(DE,B1,5A,49), V(25,BA,1B,67), V(45,EA,0E,98), V(5D,FE,C0,E1), \
+ V(C3,2F,75,02), V(81,4C,F0,12), V(8D,46,97,A3), V(6B,D3,F9,C6), \
+ V(03,8F,5F,E7), V(15,92,9C,95), V(BF,6D,7A,EB), V(95,52,59,DA), \
+ V(D4,BE,83,2D), V(58,74,21,D3), V(49,E0,69,29), V(8E,C9,C8,44), \
+ V(75,C2,89,6A), V(F4,8E,79,78), V(99,58,3E,6B), V(27,B9,71,DD), \
+ V(BE,E1,4F,B6), V(F0,88,AD,17), V(C9,20,AC,66), V(7D,CE,3A,B4), \
+ V(63,DF,4A,18), V(E5,1A,31,82), V(97,51,33,60), V(62,53,7F,45), \
+ V(B1,64,77,E0), V(BB,6B,AE,84), V(FE,81,A0,1C), V(F9,08,2B,94), \
+ V(70,48,68,58), V(8F,45,FD,19), V(94,DE,6C,87), V(52,7B,F8,B7), \
+ V(AB,73,D3,23), V(72,4B,02,E2), V(E3,1F,8F,57), V(66,55,AB,2A), \
+ V(B2,EB,28,07), V(2F,B5,C2,03), V(86,C5,7B,9A), V(D3,37,08,A5), \
+ V(30,28,87,F2), V(23,BF,A5,B2), V(02,03,6A,BA), V(ED,16,82,5C), \
+ V(8A,CF,1C,2B), V(A7,79,B4,92), V(F3,07,F2,F0), V(4E,69,E2,A1), \
+ V(65,DA,F4,CD), V(06,05,BE,D5), V(D1,34,62,1F), V(C4,A6,FE,8A), \
+ V(34,2E,53,9D), V(A2,F3,55,A0), V(05,8A,E1,32), V(A4,F6,EB,75), \
+ V(0B,83,EC,39), V(40,60,EF,AA), V(5E,71,9F,06), V(BD,6E,10,51), \
+ V(3E,21,8A,F9), V(96,DD,06,3D), V(DD,3E,05,AE), V(4D,E6,BD,46), \
+ V(91,54,8D,B5), V(71,C4,5D,05), V(04,06,D4,6F), V(60,50,15,FF), \
+ V(19,98,FB,24), V(D6,BD,E9,97), V(89,40,43,CC), V(67,D9,9E,77), \
+ V(B0,E8,42,BD), V(07,89,8B,88), V(E7,19,5B,38), V(79,C8,EE,DB), \
+ V(A1,7C,0A,47), V(7C,42,0F,E9), V(F8,84,1E,C9), V(00,00,00,00), \
+ V(09,80,86,83), V(32,2B,ED,48), V(1E,11,70,AC), V(6C,5A,72,4E), \
+ V(FD,0E,FF,FB), V(0F,85,38,56), V(3D,AE,D5,1E), V(36,2D,39,27), \
+ V(0A,0F,D9,64), V(68,5C,A6,21), V(9B,5B,54,D1), V(24,36,2E,3A), \
+ V(0C,0A,67,B1), V(93,57,E7,0F), V(B4,EE,96,D2), V(1B,9B,91,9E), \
+ V(80,C0,C5,4F), V(61,DC,20,A2), V(5A,77,4B,69), V(1C,12,1A,16), \
+ V(E2,93,BA,0A), V(C0,A0,2A,E5), V(3C,22,E0,43), V(12,1B,17,1D), \
+ V(0E,09,0D,0B), V(F2,8B,C7,AD), V(2D,B6,A8,B9), V(14,1E,A9,C8), \
+ V(57,F1,19,85), V(AF,75,07,4C), V(EE,99,DD,BB), V(A3,7F,60,FD), \
+ V(F7,01,26,9F), V(5C,72,F5,BC), V(44,66,3B,C5), V(5B,FB,7E,34), \
+ V(8B,43,29,76), V(CB,23,C6,DC), V(B6,ED,FC,68), V(B8,E4,F1,63), \
+ V(D7,31,DC,CA), V(42,63,85,10), V(13,97,22,40), V(84,C6,11,20), \
+ V(85,4A,24,7D), V(D2,BB,3D,F8), V(AE,F9,32,11), V(C7,29,A1,6D), \
+ V(1D,9E,2F,4B), V(DC,B2,30,F3), V(0D,86,52,EC), V(77,C1,E3,D0), \
+ V(2B,B3,16,6C), V(A9,70,B9,99), V(11,94,48,FA), V(47,E9,64,22), \
+ V(A8,FC,8C,C4), V(A0,F0,3F,1A), V(56,7D,2C,D8), V(22,33,90,EF), \
+ V(87,49,4E,C7), V(D9,38,D1,C1), V(8C,CA,A2,FE), V(98,D4,0B,36), \
+ V(A6,F5,81,CF), V(A5,7A,DE,28), V(DA,B7,8E,26), V(3F,AD,BF,A4), \
+ V(2C,3A,9D,E4), V(50,78,92,0D), V(6A,5F,CC,9B), V(54,7E,46,62), \
+ V(F6,8D,13,C2), V(90,D8,B8,E8), V(2E,39,F7,5E), V(82,C3,AF,F5), \
+ V(9F,5D,80,BE), V(69,D0,93,7C), V(6F,D5,2D,A9), V(CF,25,12,B3), \
+ V(C8,AC,99,3B), V(10,18,7D,A7), V(E8,9C,63,6E), V(DB,3B,BB,7B), \
+ V(CD,26,78,09), V(6E,59,18,F4), V(EC,9A,B7,01), V(83,4F,9A,A8), \
+ V(E6,95,6E,65), V(AA,FF,E6,7E), V(21,BC,CF,08), V(EF,15,E8,E6), \
+ V(BA,E7,9B,D9), V(4A,6F,36,CE), V(EA,9F,09,D4), V(29,B0,7C,D6), \
+ V(31,A4,B2,AF), V(2A,3F,23,31), V(C6,A5,94,30), V(35,A2,66,C0), \
+ V(74,4E,BC,37), V(FC,82,CA,A6), V(E0,90,D0,B0), V(33,A7,D8,15), \
+ V(F1,04,98,4A), V(41,EC,DA,F7), V(7F,CD,50,0E), V(17,91,F6,2F), \
+ V(76,4D,D6,8D), V(43,EF,B0,4D), V(CC,AA,4D,54), V(E4,96,04,DF), \
+ V(9E,D1,B5,E3), V(4C,6A,88,1B), V(C1,2C,1F,B8), V(46,65,51,7F), \
+ V(9D,5E,EA,04), V(01,8C,35,5D), V(FA,87,74,73), V(FB,0B,41,2E), \
+ V(B3,67,1D,5A), V(92,DB,D2,52), V(E9,10,56,33), V(6D,D6,47,13), \
+ V(9A,D7,61,8C), V(37,A1,0C,7A), V(59,F8,14,8E), V(EB,13,3C,89), \
+ V(CE,A9,27,EE), V(B7,61,C9,35), V(E1,1C,E5,ED), V(7A,47,B1,3C), \
+ V(9C,D2,DF,59), V(55,F2,73,3F), V(18,14,CE,79), V(73,C7,37,BF), \
+ V(53,F7,CD,EA), V(5F,FD,AA,5B), V(DF,3D,6F,14), V(78,44,DB,86), \
+ V(CA,AF,F3,81), V(B9,68,C4,3E), V(38,24,34,2C), V(C2,A3,40,5F), \
+ V(16,1D,C3,72), V(BC,E2,25,0C), V(28,3C,49,8B), V(FF,0D,95,41), \
+ V(39,A8,01,71), V(08,0C,B3,DE), V(D8,B4,E4,9C), V(64,56,C1,90), \
+ V(7B,CB,84,61), V(D5,32,B6,70), V(48,6C,5C,74), V(D0,B8,57,42)
+
+#define V(a,b,c,d) 0x##a##b##c##d
+static const uint32 RT0[256] = { RT};
+#undef V
+
+#define V(a,b,c,d) 0x##d##a##b##c
+static const uint32 RT1[256] = { RT};
+#undef V
+
+#define V(a,b,c,d) 0x##c##d##a##b
+static const uint32 RT2[256] = { RT};
+#undef V
+
+#define V(a,b,c,d) 0x##b##c##d##a
+static const uint32 RT3[256] = { RT};
+#undef V
+
+#undef RT
+
+/*
+ * Round constants
+ */
+static const uint32 RCON[10] = { 0x01000000, 0x02000000, 0x04000000,
+ 0x08000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000,
+ 0x1B000000, 0x36000000 };
+
+static void aes_gen_tables (void)
+{
+}
+
+#endif
+
+/*
+ * Decryption key schedule tables
+ */
+static uint32 KT0[256];
+static uint32 KT1[256];
+static uint32 KT2[256];
+static uint32 KT3[256];
+
+/*
+ * AES key schedule
+ */
+void
+aes_set_key (aes_context *ctx, uint8 *key, int keysize)
+{
+ int i;
+ uint32 *RK, *SK;
+ static int ft_init = 0;
+ static int kt_init = 0;
+
+ dbg_assert (ctx);
+ dbg_assert (key);
+
+ if (ft_init == 0)
+ {
+ aes_gen_tables ();
+ ft_init = 1;
+ }
+
+ switch (keysize )
+ {
+ case 128:
+ ctx->nr = 10;
+ break;
+ case 192:
+ ctx->nr = 12;
+ break;
+ case 256:
+ ctx->nr = 14;
+ break;
+ default:
+ return;
+ }
+
+ RK = ctx->erk;
+
+ for (i = 0; i < (keysize >> 5); i++)
+ {
+ GET_UINT32_BE (RK[i], key, i << 2);
+ }
+
+ /*
+ * setup encryption round keys
+ */
+ switch (ctx->nr)
+ {
+ case 10:
+
+ for (i = 0; i < 10; i++, RK += 4)
+ {
+ RK[4] = RK[0] ^ RCON[i]^(FSb[ (uint8) ( RK[3] >> 16 ) ] << 24)^(FSb[ (uint8) ( RK[3] >> 8 ) ] << 16)^(FSb[ (uint8) ( RK[3] ) ] << 8)^(FSb[ (uint8) ( RK[3] >> 24 ) ] );
+
+ RK[5] = RK[1] ^ RK[4];
+ RK[6] = RK[2] ^ RK[5];
+ RK[7] = RK[3] ^ RK[6];
+ }
+ break;
+
+ case 12:
+
+ for (i = 0; i < 8; i++, RK += 6)
+ {
+ RK[6] = RK[0] ^ RCON[i]^(FSb[ (uint8) ( RK[5] >> 16 ) ] << 24)^(FSb[ (uint8) ( RK[5] >> 8 ) ] << 16)^(FSb[ (uint8) ( RK[5] ) ] << 8)^(FSb[ (uint8) ( RK[5] >> 24 ) ] );
+
+ RK[7] = RK[1] ^ RK[6];
+ RK[8] = RK[2] ^ RK[7];
+ RK[9] = RK[3] ^ RK[8];
+ RK[10] = RK[4] ^ RK[9];
+ RK[11] = RK[5] ^ RK[10];
+ }
+ break;
+
+ case 14:
+
+ for (i = 0; i < 7; i++, RK += 8)
+ {
+ RK[8] = RK[0] ^ RCON[i]^(FSb[ (uint8) ( RK[7] >> 16 ) ] << 24)^(FSb[ (uint8) ( RK[7] >> 8 ) ] << 16)^(FSb[ (uint8) ( RK[7] ) ] << 8)^(FSb[ (uint8) ( RK[7] >> 24 ) ] );
+
+ RK[9] = RK[1] ^ RK[8];
+ RK[10] = RK[2] ^ RK[9];
+ RK[11] = RK[3] ^ RK[10];
+
+ RK[12] = RK[4] ^(FSb[ (uint8) ( RK[11] >> 24 ) ] << 24)^(FSb[ (uint8) ( RK[11] >> 16 ) ] << 16)^(FSb[ (uint8) ( RK[11] >> 8 ) ] << 8)^(FSb[ (uint8) ( RK[11] ) ] );
+
+ RK[13] = RK[5] ^ RK[12];
+ RK[14] = RK[6] ^ RK[13];
+ RK[15] = RK[7] ^ RK[14];
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ /*
+ * setup decryption round keys
+ */
+ if (kt_init == 0)
+ {
+ for (i = 0; i < 256; i++)
+ {
+ KT0[i] = RT0[ FSb[i] ];
+ KT1[i] = RT1[ FSb[i] ];
+ KT2[i] = RT2[ FSb[i] ];
+ KT3[i] = RT3[ FSb[i] ];
+ }
+
+ kt_init = 1;
+ }
+
+ SK = ctx->drk;
+
+ *SK++ = *RK++;
+ *SK++ = *RK++;
+ *SK++ = *RK++;
+ *SK++ = *RK++;
+
+ for (i = 1; i < ctx->nr; i++)
+ {
+ RK -= 8;
+
+ *SK++ = KT0[ (uint8) ( *RK >> 24 ) ] ^KT1[ (uint8) ( *RK >> 16 ) ]^KT2[ (uint8) ( *RK >> 8 ) ]^KT3[ (uint8) ( *RK ) ];
+ RK++;
+
+ *SK++ = KT0[ (uint8) ( *RK >> 24 ) ] ^KT1[ (uint8) ( *RK >> 16 ) ]^KT2[ (uint8) ( *RK >> 8 ) ]^KT3[ (uint8) ( *RK ) ];
+ RK++;
+
+ *SK++ = KT0[ (uint8) ( *RK >> 24 ) ] ^KT1[ (uint8) ( *RK >> 16 ) ]^KT2[ (uint8) ( *RK >> 8 ) ]^KT3[ (uint8) ( *RK ) ];
+ RK++;
+
+ *SK++ = KT0[ (uint8) ( *RK >> 24 ) ] ^KT1[ (uint8) ( *RK >> 16 ) ]^KT2[ (uint8) ( *RK >> 8 ) ]^KT3[ (uint8) ( *RK ) ];
+ RK++;
+ }
+
+ RK -= 8;
+
+ *SK++ = *RK++;
+ *SK++ = *RK++;
+ *SK++ = *RK++;
+ *SK++ = *RK++;
+}
+
+/**
+ * AES block encryption (ECB mode)
+ */
+void
+aes_encrypt (aes_context *ctx, unsigned char input[16], unsigned char output[16])
+{
+ uint32 *RK, X0, X1, X2, X3, Y0, Y1, Y2, Y3;
+
+ dbg_assert (ctx);
+ dbg_assert (input);
+ dbg_assert (output);
+
+ RK = ctx->erk;
+
+ GET_UINT32_BE (X0, input, 0);
+ X0 ^= RK[0];
+ GET_UINT32_BE (X1, input, 4);
+ X1 ^= RK[1];
+ GET_UINT32_BE (X2, input, 8);
+ X2 ^= RK[2];
+ GET_UINT32_BE (X3, input, 12);
+ X3 ^= RK[3];
+
+#define AES_FROUND(X0,X1,X2,X3,Y0,Y1,Y2,Y3) \
+{ \
+ RK += 4; \
+ \
+ X0 = RK[0] ^ FT0[ (uint8) ( Y0 >> 24 ) ] ^ \
+ FT1[ (uint8) ( Y1 >> 16 ) ] ^ \
+ FT2[ (uint8) ( Y2 >> 8 ) ] ^ \
+ FT3[ (uint8) ( Y3 ) ]; \
+ \
+ X1 = RK[1] ^ FT0[ (uint8) ( Y1 >> 24 ) ] ^ \
+ FT1[ (uint8) ( Y2 >> 16 ) ] ^ \
+ FT2[ (uint8) ( Y3 >> 8 ) ] ^ \
+ FT3[ (uint8) ( Y0 ) ]; \
+ \
+ X2 = RK[2] ^ FT0[ (uint8) ( Y2 >> 24 ) ] ^ \
+ FT1[ (uint8) ( Y3 >> 16 ) ] ^ \
+ FT2[ (uint8) ( Y0 >> 8 ) ] ^ \
+ FT3[ (uint8) ( Y1 ) ]; \
+ \
+ X3 = RK[3] ^ FT0[ (uint8) ( Y3 >> 24 ) ] ^ \
+ FT1[ (uint8) ( Y0 >> 16 ) ] ^ \
+ FT2[ (uint8) ( Y1 >> 8 ) ] ^ \
+ FT3[ (uint8) ( Y2 ) ]; \
+}
+
+ AES_FROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 );
+ AES_FROUND( X0, X1, X2, X3, Y0, Y1, Y2, Y3 );
+ AES_FROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 );
+ AES_FROUND( X0, X1, X2, X3, Y0, Y1, Y2, Y3 );
+ AES_FROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 );
+ AES_FROUND( X0, X1, X2, X3, Y0, Y1, Y2, Y3 );
+ AES_FROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 );
+ AES_FROUND( X0, X1, X2, X3, Y0, Y1, Y2, Y3 );
+ AES_FROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 );
+
+ if (ctx->nr > 10)
+ {
+ AES_FROUND( X0, X1, X2, X3, Y0, Y1, Y2, Y3 );
+ AES_FROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 );
+ }
+
+ if (ctx->nr > 12)
+ {
+ AES_FROUND( X0, X1, X2, X3, Y0, Y1, Y2, Y3 );
+ AES_FROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 );
+ }
+
+ RK += 4;
+
+ X0 = RK[0] ^ (FSb[ (uint8) ( Y0 >> 24 ) ] << 24)^(FSb[ (uint8) ( Y1 >> 16 ) ] << 16)^(FSb[ (uint8) ( Y2 >> 8 ) ] << 8)^(FSb[ (uint8) ( Y3 ) ] );
+
+ X1 = RK[1] ^ (FSb[ (uint8) ( Y1 >> 24 ) ] << 24)^(FSb[ (uint8) ( Y2 >> 16 ) ] << 16)^(FSb[ (uint8) ( Y3 >> 8 ) ] << 8)^(FSb[ (uint8) ( Y0 ) ] );
+
+ X2 = RK[2] ^ (FSb[ (uint8) ( Y2 >> 24 ) ] << 24)^(FSb[ (uint8) ( Y3 >> 16 ) ] << 16)^(FSb[ (uint8) ( Y0 >> 8 ) ] << 8)^(FSb[ (uint8) ( Y1 ) ] );
+
+ X3 = RK[3] ^ (FSb[ (uint8) ( Y3 >> 24 ) ] << 24)^(FSb[ (uint8) ( Y0 >> 16 ) ] << 16)^(FSb[ (uint8) ( Y1 >> 8 ) ] << 8)^(FSb[ (uint8) ( Y2 ) ] );
+
+ PUT_UINT32_BE (X0, output, 0);
+ PUT_UINT32_BE (X1, output, 4);
+ PUT_UINT32_BE (X2, output, 8);
+ PUT_UINT32_BE (X3, output, 12);
+}
+
+/*
+ * AES block decryption (ECB mode)
+ */
+void
+aes_decrypt (aes_context *ctx, unsigned char input[16], unsigned char output[16])
+{
+ uint32 *RK, X0, X1, X2, X3, Y0, Y1, Y2, Y3;
+
+ dbg_assert (ctx);
+ dbg_assert (input);
+ dbg_assert (output);
+
+ RK = ctx->drk;
+
+ GET_UINT32_BE (X0, input, 0);
+ X0 ^= RK[0];
+ GET_UINT32_BE (X1, input, 4);
+ X1 ^= RK[1];
+ GET_UINT32_BE (X2, input, 8);
+ X2 ^= RK[2];
+ GET_UINT32_BE (X3, input, 12);
+ X3 ^= RK[3];
+
+#define AES_RROUND(X0,X1,X2,X3,Y0,Y1,Y2,Y3) \
+{ \
+ RK += 4; \
+ \
+ X0 = RK[0] ^ RT0[ (uint8) ( Y0 >> 24 ) ] ^ \
+ RT1[ (uint8) ( Y3 >> 16 ) ] ^ \
+ RT2[ (uint8) ( Y2 >> 8 ) ] ^ \
+ RT3[ (uint8) ( Y1 ) ]; \
+ \
+ X1 = RK[1] ^ RT0[ (uint8) ( Y1 >> 24 ) ] ^ \
+ RT1[ (uint8) ( Y0 >> 16 ) ] ^ \
+ RT2[ (uint8) ( Y3 >> 8 ) ] ^ \
+ RT3[ (uint8) ( Y2 ) ]; \
+ \
+ X2 = RK[2] ^ RT0[ (uint8) ( Y2 >> 24 ) ] ^ \
+ RT1[ (uint8) ( Y1 >> 16 ) ] ^ \
+ RT2[ (uint8) ( Y0 >> 8 ) ] ^ \
+ RT3[ (uint8) ( Y3 ) ]; \
+ \
+ X3 = RK[3] ^ RT0[ (uint8) ( Y3 >> 24 ) ] ^ \
+ RT1[ (uint8) ( Y2 >> 16 ) ] ^ \
+ RT2[ (uint8) ( Y1 >> 8 ) ] ^ \
+ RT3[ (uint8) ( Y0 ) ]; \
+}
+
+ AES_RROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 );
+ AES_RROUND( X0, X1, X2, X3, Y0, Y1, Y2, Y3 );
+ AES_RROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 );
+ AES_RROUND( X0, X1, X2, X3, Y0, Y1, Y2, Y3 );
+ AES_RROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 );
+ AES_RROUND( X0, X1, X2, X3, Y0, Y1, Y2, Y3 );
+ AES_RROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 );
+ AES_RROUND( X0, X1, X2, X3, Y0, Y1, Y2, Y3 );
+ AES_RROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 );
+
+ if (ctx->nr > 10)
+ {
+ AES_RROUND( X0, X1, X2, X3, Y0, Y1, Y2, Y3 );
+ AES_RROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 );
+ }
+
+ if (ctx->nr > 12)
+ {
+ AES_RROUND( X0, X1, X2, X3, Y0, Y1, Y2, Y3 );
+ AES_RROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 );
+ }
+
+ RK += 4;
+
+ X0 = RK[0] ^ (RSb[ (uint8) ( Y0 >> 24 ) ] << 24)^(RSb[ (uint8) ( Y3 >> 16 ) ] << 16)^(RSb[ (uint8) ( Y2 >> 8 ) ] << 8)^(RSb[ (uint8) ( Y1 ) ] );
+
+ X1 = RK[1] ^ (RSb[ (uint8) ( Y1 >> 24 ) ] << 24)^(RSb[ (uint8) ( Y0 >> 16 ) ] << 16)^(RSb[ (uint8) ( Y3 >> 8 ) ] << 8)^(RSb[ (uint8) ( Y2 ) ] );
+
+ X2 = RK[2] ^ (RSb[ (uint8) ( Y2 >> 24 ) ] << 24)^(RSb[ (uint8) ( Y1 >> 16 ) ] << 16)^(RSb[ (uint8) ( Y0 >> 8 ) ] << 8)^(RSb[ (uint8) ( Y3 ) ] );
+
+ X3 = RK[3] ^ (RSb[ (uint8) ( Y3 >> 24 ) ] << 24)^(RSb[ (uint8) ( Y2 >> 16 ) ] << 16)^(RSb[ (uint8) ( Y1 >> 8 ) ] << 8)^(RSb[ (uint8) ( Y0 ) ] );
+
+ PUT_UINT32_BE (X0, output, 0);
+ PUT_UINT32_BE (X1, output, 4);
+ PUT_UINT32_BE (X2, output, 8);
+ PUT_UINT32_BE (X3, output, 12);
+}
+
+/*
+ * AES-CBC buffer encryption
+ */
+void
+aes_cbc_encrypt (aes_context *ctx, unsigned char iv[16], unsigned char *input, unsigned char *output, int len)
+{
+ int i;
+ unsigned char tmp;
+
+ dbg_assert (ctx);
+ dbg_assert (iv);
+ dbg_assert (input);
+ dbg_assert (output);
+
+ while (len > 0)
+ {
+ for (i = 0; i < 16; i++)
+ {
+ output[i] = input[i] ^ iv[i];
+ tmp = output[i];
+ }
+
+ aes_encrypt (ctx, output, output );
+ memcpy (iv, output, 16);
+
+ input += 16;
+ output += 16;
+ len -= 16;
+ }
+}
+
+/*
+ * AES-CBC buffer decryption
+ */
+void
+aes_cbc_decrypt (aes_context *ctx, unsigned char iv[16], unsigned char *input, unsigned char *output, int len)
+{
+ int i;
+ unsigned char temp[16];
+
+ dbg_assert (ctx);
+ dbg_assert (iv);
+ dbg_assert (input);
+ dbg_assert (output);
+
+ while (len > 0)
+ {
+ memcpy (temp, input, 16);
+
+ aes_decrypt (ctx, input, output );
+
+ for (i = 0; i < 16; i++)
+ //output[i] = output[i] ^ iv[i];
+ output[i] ^= iv[i];
+
+ memcpy (iv, temp, 16);
+
+ input += 16;
+ output += 16;
+ len -= 16;
+ }
+}
+
diff --git a/cesar/cp/secu/src/secu_lib.c b/cesar/cp/secu/src/secu_lib.c
new file mode 100644
index 0000000000..73e9ddd45b
--- /dev/null
+++ b/cesar/cp/secu/src/secu_lib.c
@@ -0,0 +1,231 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/secu/secu_lib.c
+ * \brief all security related function
+ * \ingroup cp_secu
+ *
+ */
+
+#include "common/std.h"
+#include "cp/secu/secu.h"
+
+static peks_t m_peks; // see p588
+static u8 m_eks; // see p122
+
+static aes_key_t m_dak[THEORICAL_MAX_STA_NB];
+static aes_key_t m_tek[PEKS_TEKD + 1];
+static aes_key_t m_nmk;
+
+
+void
+secu_init (cp_secu_t *p_sec)
+{
+ dbg_assert (p_sec);
+
+ memset (p_sec, 0, sizeof(cp_secu_t));
+ memset (m_dak, 0, sizeof(m_dak));
+ memset (m_tek, 0, sizeof(m_tek));
+
+ m_peks = PEKS_NOT_ENCRYPTED;
+ m_eks = 0xF; // 0xF : no encryption key
+#ifndef DEBUG
+ /* TODO
+ * ici, lire DAK, NMK, Security Level
+ */
+#error "paramètres à charger à partir de la flash"
+#else // utilisons des valeurs par défaut
+ // choisissons un DAK...
+ memcpy(p_sec->security_parameters.dak, "un DAK au pif...", AES_KEY_SIZE);
+ // choisissons la première NMK
+ memcpy(p_sec->security_parameters.nmk[0].nmk, "NMK au pif... ", AES_KEY_SIZE);
+ memcpy(p_sec->security_parameters.nmk[0].nid, "un NID ", NID_SIZE);
+ p_sec->security_parameters.nmk[0].sl = SIMPLE_CONNECT;
+ // choisissons la seconde NMK
+ memcpy(p_sec->security_parameters.nmk[1].nmk, "seconde NMK au p", AES_KEY_SIZE);
+ secu_hash(PWD_NMK, p_sec->security_parameters.nmk[1].nmk, AES_KEY_SIZE, p_sec->security_parameters.nmk[1].nid);
+ p_sec->security_parameters.nmk[1].sl = SIMPLE_CONNECT;
+#endif
+
+ secu_p_run_init();
+}
+
+void
+cp_secu_uninit (cp_secu_t *ctx)
+{
+ dbg_assert (ctx);
+}
+
+struct pbkdf1_params_t
+{
+ u8 salt[SALT_SIZE];
+ int salt_len;
+ int it_count;
+ int out_key_size;
+};
+
+E_ErrCode
+secu_hash (pwd_type_t pwd_type, u8 in[], int in_len, u8 out[])
+{
+ E_ErrCode res;
+ u8 str[OUTPUT_KEY_SIZE];
+ struct pbkdf1_params_t pbkdf1params[] =
+ {
+ { { 0x08, 0x85, 0x6D, 0xAF, 0x7C, 0xF5, 0x81, 0x85 }, 8, 1000, 16 }, // obtenir DAK depuis DPW (7.10.7.1)
+ { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0, 5, NID_SIZE }, // obtenir "NID offset" depuis NMK (4.4.3.1)
+ { { 0x08, 0x85, 0x6D, 0xAF, 0x7C, 0xF5, 0x81, 0x86 }, 8, 1000, 16 }, // obtenir NMK-HS (7.10.7.1)
+ { { 0x58, 0x56, 0x52, 0xf6, 0x9c, 0x04, 0xb5, 0x72 }, 8, 1000, 16 }, // Test
+ { { 0x08, 0x85, 0x6D, 0xAF, 0x7C, 0xF5, 0x81, 0x86 }, 8, 1000, 16 } // obtenir NMK depuis NPW
+ };
+#ifdef DEBUG
+ uint i;
+ for(i=0 ; i<COUNT(pbkdf1params) ; i++)
+ {
+ if(pbkdf1params[i].out_key_size > OUTPUT_KEY_SIZE) exit(EXIT_FAILURE);
+ }
+ if(pwd_type >= COUNT(pbkdf1params) ) exit(EXIT_FAILURE);
+#endif
+
+ dbg_assert (in);
+ dbg_assert (out);
+
+ if ( (pwd_type == PWD_DPW) || (pwd_type == PWD_NPW) )
+ {
+ if ( (res = secu_check_password_validity (pwd_type, in)) != Success)
+ return res;
+ }
+ if ( (res = secu_pbkdf1(in, in_len, pbkdf1params[pwd_type].salt, pbkdf1params[pwd_type].salt_len, pbkdf1params[pwd_type].it_count, str) != Success))
+ return res;
+ memcpy(out, str, pbkdf1params[pwd_type].out_key_size);
+ return Success;
+}
+
+E_ErrCode
+secu_gen_aes_key (u8 key[])
+{
+ u8 tmp_key[SHA256_OUTPUT_SIZE];
+ aes_context ctx;
+ gen_key_t sec;
+
+ dbg_assert (key);
+
+#ifndef DEBUG
+ /*
+ * TODO ici, lire les paramètres de génération de la clé aléatoire,
+ * puis incrémenter le compteur et le réécrire dans la flash.
+ */
+#error "paramètres à charger à partir de la flash"
+#else // utilisons des valeurs par défaut
+ memcpy(sec.key, "une cle choisie ", AES_KEY_SIZE);
+ sec.count = 456;
+#endif
+ /*
+ * generate a pseudo-random number
+ */
+ sha2 ((u8*) &sec.count, sizeof(sec.count), tmp_key, 0);
+ /*
+ * generate an aes key from this number
+ */
+ aes_set_key( &ctx, sec.key, AES_KEY_SIZE * 8);
+ aes_encrypt( &ctx, tmp_key, key);
+ return Success;
+}
+
+aes_key_t *
+secu_get_ek_from_peks(const peks_t peks, const tei_t tei)
+{
+ dbg_assert(peks < PEKS_NOT_ENCRYPTED);
+ dbg_assert(tei != 0 && tei != 0xFF);
+
+ if(peks == PEKS_DESTINATION_STA_DAK) return &m_dak[tei];
+ if(peks == PEKS_NMK) return &m_nmk;
+ if(peks == PEKS_NOT_ENCRYPTED) return NULL;
+ return &m_tek[peks];
+}
+
+void
+secu_set_sta_s_dak(const tei_t tei, const aes_key_t dak)
+{
+ dbg_assert(tei != 0 && tei != 0xFF);
+ memcpy(m_dak[tei], dak, sizeof(m_dak[0]));
+}
+
+E_ErrCode secu_nmk2nid(u8 *nmk, u8 security_level, u8 *nid)
+{
+ E_ErrCode ret;
+ u8 nid_offset[NID_SIZE] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+
+ dbg_assert (nmk);
+ dbg_assert (nid);
+ dbg_assert (security_level <= 2); /* supported security-levels = 0, 1 or 2 */
+
+ /* generate NID offset value (52 bits) from NMK */
+ ret = secu_hash(PWD_NMK, nmk, 16, nid_offset);
+ if (ret == Success)
+ {
+ memcpy(nid,nid_offset,NID_SIZE);
+ /*
+ * combine the NID offset (52 bits) and Security Level (2 bits) together
+ * to form the NID value (54 bits)
+ * - Octets[0:5] of NID = octets[0:5] of the 52 Bit Hashed NID offset
+ * (Leftmost octet = Leftmost Octet of 52 Bit Hashed NID Offset)
+ * - Right nibble of rightmost octet of NID = rightmost nibble of the 52 Bit Hashed NID offset
+ * - Left nibble of rightmost octet of NID = Security Level
+ */
+ nid[NID_SIZE-1] >>= 4; /* Set the right nibble of rightmost octet of NID = rightmost nibble of the 52 Bit Hashed NID offset*/
+ nid[NID_SIZE-1] &= 0x0F; /* Mask the left nibble of rightmost octet of NID... */
+ nid[NID_SIZE-1] |= ((security_level << 4) & 0xF0); /* ... and then, insert the Security Level */
+ }
+
+ return ret;
+}
+
+E_ErrCode secu_npw2nmk(char *npw, u8 *nmk)
+{
+ E_ErrCode ret;
+
+ dbg_assert (npw);
+ dbg_assert (nmk);
+
+ /* generate default NMK key from NPW password */
+ ret = secu_hash(PWD_NPW, (u8*)npw, strlen(npw), nmk);
+
+ return ret;
+}
+
+bool
+secu_get_kbc (cp_secu_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->kbc;
+}
+
+bool
+cp_secu_get_kbc (cp_secu_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->kbc;
+}
+
+u8
+secu_get_eks (cp_secu_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->eks;
+}
+
+u8
+cp_secu_get_eks (cp_secu_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->eks;
+}
diff --git a/cesar/cp/secu/src/secu_p_run.c b/cesar/cp/secu/src/secu_p_run.c
new file mode 100644
index 0000000000..2161c9e4aa
--- /dev/null
+++ b/cesar/cp/secu/src/secu_p_run.c
@@ -0,0 +1,117 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/secu/secu_lib.c
+ * \brief all protocol run related function
+ * \ingroup cp_secu
+ *
+ */
+
+#include "common/std.h"
+#include "cp/secu/inc/secu_p_run.h"
+
+static protocol_run_t m_p_run[THEORICAL_MAX_STA_NB]; // variables du protocol run
+
+
+void
+secu_p_run_init(void)
+{
+ uint i;
+ memset(m_p_run, 0, sizeof(m_p_run));
+ for(i = 0 ; i<COUNT(m_p_run) ; i++)
+ m_p_run[i].pmn = PMN_LAST_MSG;
+}
+
+void
+secu_gen_nonce (const tei_t tei)
+{
+ u8 nonce[AES_KEY_SIZE];
+
+ dbg_assert( tei != 0 && tei != 0xFF);
+
+ secu_gen_aes_key (nonce);
+ memcpy(&m_p_run[tei].nonce, nonce, sizeof(m_p_run[tei].nonce));
+}
+
+
+
+void
+secu_start_new_protocol_run(const tei_t tei, const cp_pid_t pid, protocol_run_t *p_run)
+{
+ u8 rand_num[AES_KEY_SIZE];
+
+ dbg_assert( tei != 0 && tei != 0xFF);
+ dbg_assert (p_run);
+
+ m_p_run[tei].pid = pid; // Protocol ID
+
+ secu_gen_aes_key(rand_num);
+ memcpy(&m_p_run[tei].prn, rand_num, sizeof(m_p_run[tei].prn));
+
+ m_p_run[tei].pmn = 0; // Protocol Message Number
+
+ memcpy(p_run, &m_p_run[tei], sizeof(p_run));
+}
+
+E_ErrCode
+secu_check_protocol_run_param (const tei_t tei, const protocol_run_t to_check)
+{
+ dbg_assert( tei != 0 && tei != 0xFF);
+
+ // check the global parameters
+ if (to_check.pid > HLE_PRO)
+ return PID_Unknown;
+ // check parameters specific to this run
+ if(to_check.nonce != m_p_run[tei].nonce)
+ {
+ return NONCE_INCORRECT;
+ }
+ if (to_check.pmn == 1)
+ {
+ // we start a run, so initialize station context
+ memcpy (&m_p_run[tei], &to_check, sizeof(protocol_run_t));
+ return Success;
+ }
+ else
+ {
+ if (to_check.pid != m_p_run[tei].pid)
+ return PID_Wrong;
+ if (to_check.prn != m_p_run[tei].prn)
+ return PRN_Wrong;
+ if (to_check.pmn == PMN_LAST_MSG)
+ {
+ // the run is over
+ m_p_run[tei].pmn = PMN_LAST_MSG;
+ m_p_run[tei].prn = 0;
+ }
+ else if (to_check.pmn != ++m_p_run[tei].pmn)
+ return PMN_Wrong;
+ return Success;
+ }
+}
+
+E_ErrCode
+secu_gen_protocol_run_param (const tei_t tei, const bool last_msg, protocol_run_t *gen)
+{
+ dbg_assert( tei != 0 && tei != 0xFF);
+ dbg_assert (gen);
+
+ if (last_msg)
+ m_p_run[tei].pmn = PMN_LAST_MSG;
+ else
+ {
+ if ( (m_p_run[tei].pmn == PMN_LAST_MSG)
+ || (m_p_run[tei].pmn == PMN_LAST_MSG - 1) )
+ {
+ return PRN_NotInitialised;
+ }
+ m_p_run[tei].pmn ++;
+ }
+ memcpy (gen, &m_p_run[tei], sizeof(protocol_run_t));
+ return Success;
+}
diff --git a/cesar/cp/secu/src/secu_pbkdf1.c b/cesar/cp/secu/src/secu_pbkdf1.c
new file mode 100644
index 0000000000..74fad2d25a
--- /dev/null
+++ b/cesar/cp/secu/src/secu_pbkdf1.c
@@ -0,0 +1,90 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/secu/secu_pbkdf1.c
+ * \brief The pbkdf1 function
+ * \ingroup cp_secus
+ */
+
+#include "common/std.h"
+#include "cp/secu/inc/secu_pbkdf1.h"
+
+E_ErrCode
+secu_check_password_validity (pwd_type_t pwd_type, unsigned char password[])
+{
+ int i;
+
+ dbg_assert (password);
+
+ for(i=0 ; (password[i] != '\0') && (i < MAX_PWD_SIZE) ; i++)
+ {
+ if (password[i] < MIN_PWD_ASCII_CHAR)
+ return PWD_ForbidenChar;
+ if (password[i] > MAX_PWD_ASCII_CHAR)
+ return PWD_ForbidenChar;
+ }
+ switch (pwd_type)
+ {
+ case PWD_DPW:
+ if (i < MIN_DPW_SIZE)
+ return PWD_WrongSize;
+ break;
+ case PWD_NPW:
+ if (i < MIN_NPW_SIZE)
+ return PWD_WrongSize;
+ break;
+ default:
+ return Failure;
+ }
+ return Success;
+}
+
+E_ErrCode
+secu_pbkdf1 (u8 input[], int input_len, u8 salt[], int salt_len, int it_count, u8 output_key[])
+{
+
+ u8 dk[MAX_PWD_SIZE + SALT_SIZE] = "";
+ u8 sha_output[SHA256_OUTPUT_SIZE];
+ int dp_size, i;
+
+ dbg_assert (input);
+ dbg_assert (salt);
+ dbg_assert (output_key);
+ /*
+ * Copy input to DK (max size cannot be greater than DK buffer)
+ */
+ for (dp_size = 0; (dp_size < input_len) && (dp_size < MAX_PWD_SIZE); dp_size++)
+ {
+ dk[dp_size] = input[dp_size];
+ }
+ /*
+ * Concat salt with input on DK and count total input size
+ */
+ for (i=0 ; i < salt_len ; i++)
+ {
+ dk[dp_size+i] = salt[i];
+ }
+ dp_size += salt_len;
+ /*
+ * Compute the first derived key with sha256
+ */
+ sha2 (dk, dp_size, sha_output, 0);
+ /*
+ * compute the following iterations
+ */
+ for(i=1 ; i < it_count ; i++)
+ {
+ memcpy (dk, sha_output, SHA256_OUTPUT_SIZE);
+ sha2 (dk, SHA256_OUTPUT_SIZE, sha_output, 0);
+ }
+ /*
+ * we keep only the OutputKeySize leftmost bytes
+ */
+ memcpy(output_key, sha_output, OUTPUT_KEY_SIZE);
+ return Success;
+}
diff --git a/cesar/cp/secu/src/secu_sha2.c b/cesar/cp/secu/src/secu_sha2.c
new file mode 100644
index 0000000000..d86a0d746a
--- /dev/null
+++ b/cesar/cp/secu/src/secu_sha2.c
@@ -0,0 +1,427 @@
+#ifndef _CRT_SECURE_NO_DEPRECATE
+#define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+
+
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/secu/secu_sha2.c
+ * \brief The sha256 function
+ * \ingroup cp_secu
+ */
+
+#include "common/std.h"
+#include "cp/secu/inc/secu_sha2.h"
+
+/*
+ * 32-bit integer manipulation macros (big endian)
+ */
+#ifndef GET_UINT32_BE
+#define GET_UINT32_BE(n,b,i) \
+{ \
+ (n) = ( (unsigned long) (b)[(i) ] << 24 ) \
+ | ( (unsigned long) (b)[(i) + 1] << 16 ) \
+ | ( (unsigned long) (b)[(i) + 2] << 8 ) \
+ | ( (unsigned long) (b)[(i) + 3] ); \
+}
+#endif
+
+#ifndef PUT_UINT32_BE
+#define PUT_UINT32_BE(n,b,i) \
+{ \
+ (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \
+ (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \
+ (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \
+ (b)[(i) + 3] = (unsigned char) ( (n) ); \
+}
+#endif
+
+/*
+ * SHA-256 context setup
+ */
+void sha2_starts( sha2_context *ctx, int is224 )
+{
+
+ dbg_assert(ctx);
+
+ ctx->total[0] = 0;
+ ctx->total[1] = 0;
+ if( is224 == 0 )
+ {
+ /* SHA-256 */
+ ctx->state[0] = 0x6A09E667;
+ ctx->state[1] = 0xBB67AE85;
+ ctx->state[2] = 0x3C6EF372;
+ ctx->state[3] = 0xA54FF53A;
+ ctx->state[4] = 0x510E527F;
+ ctx->state[5] = 0x9B05688C;
+ ctx->state[6] = 0x1F83D9AB;
+ ctx->state[7] = 0x5BE0CD19;
+ }
+ else
+ {
+ /* SHA-224 */
+ ctx->state[0] = 0xC1059ED8;
+ ctx->state[1] = 0x367CD507;
+ ctx->state[2] = 0x3070DD17;
+ ctx->state[3] = 0xF70E5939;
+ ctx->state[4] = 0xFFC00B31;
+ ctx->state[5] = 0x68581511;
+ ctx->state[6] = 0x64F98FA7;
+ ctx->state[7] = 0xBEFA4FA4;
+ }
+
+ ctx->is224 = is224;
+}
+
+static void sha2_process( sha2_context *ctx, unsigned char data[64] )
+{
+ unsigned long temp1, temp2, W[64];
+ unsigned long A, B, C, D, E, F, G, H;
+
+ dbg_assert(ctx);
+ dbg_assert(data);
+
+ GET_UINT32_BE( W[ 0], data, 0 );
+ GET_UINT32_BE( W[ 1], data, 4 );
+ GET_UINT32_BE( W[ 2], data, 8 );
+ GET_UINT32_BE( W[ 3], data, 12 );
+ GET_UINT32_BE( W[ 4], data, 16 );
+ GET_UINT32_BE( W[ 5], data, 20 );
+ GET_UINT32_BE( W[ 6], data, 24 );
+ GET_UINT32_BE( W[ 7], data, 28 );
+ GET_UINT32_BE( W[ 8], data, 32 );
+ GET_UINT32_BE( W[ 9], data, 36 );
+ GET_UINT32_BE( W[10], data, 40 );
+ GET_UINT32_BE( W[11], data, 44 );
+ GET_UINT32_BE( W[12], data, 48 );
+ GET_UINT32_BE( W[13], data, 52 );
+ GET_UINT32_BE( W[14], data, 56 );
+ GET_UINT32_BE( W[15], data, 60 );
+
+#define SHR(x,n) ((x & 0xFFFFFFFF) >> n)
+#define ROTR(x,n) (SHR(x,n) | (x << (32 - n)))
+
+#define S0(x) (ROTR(x, 7) ^ ROTR(x,18) ^ SHR(x, 3))
+#define S1(x) (ROTR(x,17) ^ ROTR(x,19) ^ SHR(x,10))
+
+#define S2(x) (ROTR(x, 2) ^ ROTR(x,13) ^ ROTR(x,22))
+#define S3(x) (ROTR(x, 6) ^ ROTR(x,11) ^ ROTR(x,25))
+
+#define F0(x,y,z) ((x & y) | (z & (x | y)))
+#define F1(x,y,z) (z ^ (x & (y ^ z)))
+
+#define R(t) \
+( \
+ W[t] = S1(W[t - 2]) + W[t - 7] + \
+ S0(W[t - 15]) + W[t - 16] \
+)
+
+#define P(a,b,c,d,e,f,g,h,x,K) \
+{ \
+ temp1 = h + S3(e) + F1(e,f,g) + K + x; \
+ temp2 = S2(a) + F0(a,b,c); \
+ d += temp1; h = temp1 + temp2; \
+}
+
+ A = ctx->state[0];
+ B = ctx->state[1];
+ C = ctx->state[2];
+ D = ctx->state[3];
+ E = ctx->state[4];
+ F = ctx->state[5];
+ G = ctx->state[6];
+ H = ctx->state[7];
+
+ P( A, B, C, D, E, F, G, H, W[ 0], 0x428A2F98 );
+ P( H, A, B, C, D, E, F, G, W[ 1], 0x71374491 );
+ P( G, H, A, B, C, D, E, F, W[ 2], 0xB5C0FBCF );
+ P( F, G, H, A, B, C, D, E, W[ 3], 0xE9B5DBA5 );
+ P( E, F, G, H, A, B, C, D, W[ 4], 0x3956C25B );
+ P( D, E, F, G, H, A, B, C, W[ 5], 0x59F111F1 );
+ P( C, D, E, F, G, H, A, B, W[ 6], 0x923F82A4 );
+ P( B, C, D, E, F, G, H, A, W[ 7], 0xAB1C5ED5 );
+ P( A, B, C, D, E, F, G, H, W[ 8], 0xD807AA98 );
+ P( H, A, B, C, D, E, F, G, W[ 9], 0x12835B01 );
+ P( G, H, A, B, C, D, E, F, W[10], 0x243185BE );
+ P( F, G, H, A, B, C, D, E, W[11], 0x550C7DC3 );
+ P( E, F, G, H, A, B, C, D, W[12], 0x72BE5D74 );
+ P( D, E, F, G, H, A, B, C, W[13], 0x80DEB1FE );
+ P( C, D, E, F, G, H, A, B, W[14], 0x9BDC06A7 );
+ P( B, C, D, E, F, G, H, A, W[15], 0xC19BF174 );
+ P( A, B, C, D, E, F, G, H, R(16), 0xE49B69C1 );
+ P( H, A, B, C, D, E, F, G, R(17), 0xEFBE4786 );
+ P( G, H, A, B, C, D, E, F, R(18), 0x0FC19DC6 );
+ P( F, G, H, A, B, C, D, E, R(19), 0x240CA1CC );
+ P( E, F, G, H, A, B, C, D, R(20), 0x2DE92C6F );
+ P( D, E, F, G, H, A, B, C, R(21), 0x4A7484AA );
+ P( C, D, E, F, G, H, A, B, R(22), 0x5CB0A9DC );
+ P( B, C, D, E, F, G, H, A, R(23), 0x76F988DA );
+ P( A, B, C, D, E, F, G, H, R(24), 0x983E5152 );
+ P( H, A, B, C, D, E, F, G, R(25), 0xA831C66D );
+ P( G, H, A, B, C, D, E, F, R(26), 0xB00327C8 );
+ P( F, G, H, A, B, C, D, E, R(27), 0xBF597FC7 );
+ P( E, F, G, H, A, B, C, D, R(28), 0xC6E00BF3 );
+ P( D, E, F, G, H, A, B, C, R(29), 0xD5A79147 );
+ P( C, D, E, F, G, H, A, B, R(30), 0x06CA6351 );
+ P( B, C, D, E, F, G, H, A, R(31), 0x14292967 );
+ P( A, B, C, D, E, F, G, H, R(32), 0x27B70A85 );
+ P( H, A, B, C, D, E, F, G, R(33), 0x2E1B2138 );
+ P( G, H, A, B, C, D, E, F, R(34), 0x4D2C6DFC );
+ P( F, G, H, A, B, C, D, E, R(35), 0x53380D13 );
+ P( E, F, G, H, A, B, C, D, R(36), 0x650A7354 );
+ P( D, E, F, G, H, A, B, C, R(37), 0x766A0ABB );
+ P( C, D, E, F, G, H, A, B, R(38), 0x81C2C92E );
+ P( B, C, D, E, F, G, H, A, R(39), 0x92722C85 );
+ P( A, B, C, D, E, F, G, H, R(40), 0xA2BFE8A1 );
+ P( H, A, B, C, D, E, F, G, R(41), 0xA81A664B );
+ P( G, H, A, B, C, D, E, F, R(42), 0xC24B8B70 );
+ P( F, G, H, A, B, C, D, E, R(43), 0xC76C51A3 );
+ P( E, F, G, H, A, B, C, D, R(44), 0xD192E819 );
+ P( D, E, F, G, H, A, B, C, R(45), 0xD6990624 );
+ P( C, D, E, F, G, H, A, B, R(46), 0xF40E3585 );
+ P( B, C, D, E, F, G, H, A, R(47), 0x106AA070 );
+ P( A, B, C, D, E, F, G, H, R(48), 0x19A4C116 );
+ P( H, A, B, C, D, E, F, G, R(49), 0x1E376C08 );
+ P( G, H, A, B, C, D, E, F, R(50), 0x2748774C );
+ P( F, G, H, A, B, C, D, E, R(51), 0x34B0BCB5 );
+ P( E, F, G, H, A, B, C, D, R(52), 0x391C0CB3 );
+ P( D, E, F, G, H, A, B, C, R(53), 0x4ED8AA4A );
+ P( C, D, E, F, G, H, A, B, R(54), 0x5B9CCA4F );
+ P( B, C, D, E, F, G, H, A, R(55), 0x682E6FF3 );
+ P( A, B, C, D, E, F, G, H, R(56), 0x748F82EE );
+ P( H, A, B, C, D, E, F, G, R(57), 0x78A5636F );
+ P( G, H, A, B, C, D, E, F, R(58), 0x84C87814 );
+ P( F, G, H, A, B, C, D, E, R(59), 0x8CC70208 );
+ P( E, F, G, H, A, B, C, D, R(60), 0x90BEFFFA );
+ P( D, E, F, G, H, A, B, C, R(61), 0xA4506CEB );
+ P( C, D, E, F, G, H, A, B, R(62), 0xBEF9A3F7 );
+ P( B, C, D, E, F, G, H, A, R(63), 0xC67178F2 );
+
+ ctx->state[0] += A;
+ ctx->state[1] += B;
+ ctx->state[2] += C;
+ ctx->state[3] += D;
+ ctx->state[4] += E;
+ ctx->state[5] += F;
+ ctx->state[6] += G;
+ ctx->state[7] += H;
+}
+
+/*
+ * SHA-256 process buffer
+ */
+void sha2_update( sha2_context *ctx, unsigned char *input, int ilen )
+{
+ int fill;
+ unsigned long left;
+
+ dbg_assert(ctx);
+ dbg_assert(input);
+
+ if( ilen <= 0 ) return;
+ left = ctx->total[0] & 0x3F;
+ fill = 64 - left;
+ ctx->total[0] += ilen;
+ ctx->total[0] &= 0xFFFFFFFF;
+ if(ctx->total[0] < (unsigned long) ilen ) ctx->total[1]++;
+ if( left && ilen >= fill )
+ {
+ memcpy( (void *) (ctx->buffer + left),
+ (void *) input, fill );
+ sha2_process( ctx, ctx->buffer );
+ input += fill;
+ ilen -= fill;
+ left = 0;
+ }
+ while( ilen >= 64 )
+ {
+ sha2_process( ctx, input );
+ input += 64;
+ ilen -= 64;
+ }
+ if( ilen > 0 )
+ {
+ memcpy( (void *) (ctx->buffer + left),
+ (void *) input, ilen );
+ }
+}
+
+//static const unsigned char sha2_padding[64] =
+static unsigned char sha2_padding[64] =
+{
+ 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/*
+ * SHA-256 final digest
+ */
+void sha2_finish( sha2_context *ctx, unsigned char *output )
+{
+ unsigned long last, padn;
+ unsigned long high, low;
+ unsigned char msglen[8];
+
+ dbg_assert(ctx);
+ dbg_assert(output);
+
+ high = ( ctx->total[0] >> 29 )
+ | ( ctx->total[1] << 3 );
+ low = ( ctx->total[0] << 3 );
+ PUT_UINT32_BE( high, msglen, 0 );
+ PUT_UINT32_BE( low, msglen, 4 );
+ last = ctx->total[0] & 0x3F;
+ padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last );
+ sha2_update( ctx, sha2_padding, padn );
+ sha2_update( ctx, msglen, 8 );
+ PUT_UINT32_BE( ctx->state[0], output, 0 );
+ PUT_UINT32_BE( ctx->state[1], output, 4 );
+ PUT_UINT32_BE( ctx->state[2], output, 8 );
+ PUT_UINT32_BE( ctx->state[3], output, 12 );
+ PUT_UINT32_BE( ctx->state[4], output, 16 );
+ PUT_UINT32_BE( ctx->state[5], output, 20 );
+ PUT_UINT32_BE( ctx->state[6], output, 24 );
+ if( ctx->is224 == 0 ) PUT_UINT32_BE( ctx->state[7], output, 28 );
+}
+
+/*
+ * Output = SHA-256( input buffer )
+ */
+void sha2( unsigned char *input, int ilen,
+ unsigned char *output, int is224 )
+{
+ sha2_context ctx;
+
+ dbg_assert(input);
+ dbg_assert(output);
+
+ sha2_starts( &ctx, is224 );
+ sha2_update( &ctx, input, ilen );
+ sha2_finish( &ctx, output );
+
+ memset( &ctx, 0, sizeof( sha2_context ) );
+}
+
+/*
+ * Output = SHA-256( file contents )
+ */
+ /*
+int sha2_file( char *path, unsigned char *output, int is224 )
+{
+ FILE *f;
+ size_t n;
+ sha2_context ctx;
+ unsigned char buf[1024];
+
+ dbg_assert(path);
+ dbg_assert(output);
+
+ if( ( f = fopen( path, "rb" ) ) == NULL )
+ return( 1 );
+
+ sha2_starts( &ctx, is224 );
+
+ while( ( n = fread( buf, 1, sizeof( buf ), f ) ) > 0 )
+ sha2_update( &ctx, buf, (int) n );
+
+ sha2_finish( &ctx, output );
+
+ memset( &ctx, 0, sizeof( sha2_context ) );
+
+ if( ferror( f ) != 0 )
+ {
+ fclose( f );
+ return( 2 );
+ }
+
+ fclose( f );
+ return( 0 );
+}
+*/
+/*
+ * SHA-256 HMAC context setup
+ */
+ /*
+void sha2_hmac_starts( sha2_context *ctx, int is224,
+ unsigned char *key, int keylen )
+{
+ int i;
+
+ dbg_assert(ctx);
+ dbg_assert(key);
+
+ memset( ctx->ipad, 0x36, 64 );
+ memset( ctx->opad, 0x5C, 64 );
+ for( i = 0; i < keylen; i++ )
+ {
+ if( i >= 64 ) break;
+ ctx->ipad[i] ^= key[i];
+ ctx->opad[i] ^= key[i];
+ }
+ sha2_starts( ctx, is224 );
+ sha2_update( ctx, ctx->ipad, 64 );
+}
+*/
+/*
+ * SHA-256 HMAC process buffer
+ */
+ /*
+void sha2_hmac_update( sha2_context *ctx,
+ unsigned char *input, int ilen )
+{
+ dbg_assert(ctx);
+ dbg_assert(input);
+ sha2_update( ctx, input, ilen );
+}
+*/
+/*
+ * SHA-256 HMAC final digest
+ */
+ /*
+void sha2_hmac_finish( sha2_context *ctx, unsigned char *output )
+{
+ int is224, hlen;
+ unsigned char tmpbuf[32];
+
+ dbg_assert(ctx);
+ dbg_assert(output);
+
+ is224 = ctx->is224;
+ hlen = ( is224 == 0 ) ? 32 : 28;
+ sha2_finish( ctx, tmpbuf );
+ sha2_starts( ctx, is224 );
+ sha2_update( ctx, ctx->opad, 64 );
+ sha2_update( ctx, tmpbuf, hlen );
+ sha2_finish( ctx, output );
+ memset( tmpbuf, 0, sizeof( tmpbuf ) );
+}
+*/
+/*
+ * Output = HMAC-SHA-256( hmac key, input buffer )
+ */
+ /*
+void sha2_hmac( unsigned char *key, int keylen,
+ unsigned char *input, int ilen,
+ unsigned char *output, int is224 )
+{
+ sha2_context ctx;
+
+ dbg_assert(key);
+ dbg_assert(input);
+ dbg_assert(output);
+
+ sha2_hmac_starts( &ctx, is224, key, keylen );
+ sha2_hmac_update( &ctx, input, ilen );
+ sha2_hmac_finish( &ctx, output );
+ memset( &ctx, 0, sizeof( sha2_context ) );
+}
+*/
diff --git a/cesar/cp/spoc/Module b/cesar/cp/spoc/Module
new file mode 100644
index 0000000000..3eadb9ee3f
--- /dev/null
+++ b/cesar/cp/spoc/Module
@@ -0,0 +1 @@
+SOURCES := spoc.c
diff --git a/cesar/cp/spoc/spoc.h b/cesar/cp/spoc/spoc.h
new file mode 100644
index 0000000000..36cfca523e
--- /dev/null
+++ b/cesar/cp/spoc/spoc.h
@@ -0,0 +1,50 @@
+#ifndef spoc_h
+#define spoc_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file spoc.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+//typedef float spoc_prec_t;
+typedef double spoc_prec_t; // en flottant sinx/x avec x=0.1ppm retourne 1
+
+
+#ifdef SPOC_COMPARE_SCILAB
+spoc_prec_t args_haut[41];
+spoc_prec_t args_bas[41];
+spoc_prec_t sinc_haut[41];
+spoc_prec_t sinc_bas[41];
+spoc_prec_t divisor[41];
+spoc_prec_t args_haut_rx[41];
+spoc_prec_t args_bas_rx[41];
+spoc_prec_t sinc_haut_rx[41];
+spoc_prec_t sinc_bas_rx[41];
+#endif
+spoc_prec_t reg_pente_tx[41];
+spoc_prec_t reg_ordo_tx[41];
+spoc_prec_t reg_pente_rx[41];
+spoc_prec_t reg_ordo_rx[41];
+
+spoc_prec_t reg_CG_N[21];
+spoc_prec_t reg_CG_FC10[21];
+spoc_prec_t reg_CG_PR1[21];
+spoc_prec_t reg_CG_PR2[21];
+
+
+void
+spoc_MCoeff (spoc_prec_t rho);
+
+void
+spoc_CG (spoc_prec_t rho, int n, spoc_prec_t *reg);
+
+#endif /* spoc_h */
diff --git a/cesar/cp/spoc/src/spoc.c b/cesar/cp/spoc/src/spoc.c
new file mode 100644
index 0000000000..ef258570a0
--- /dev/null
+++ b/cesar/cp/spoc/src/spoc.c
@@ -0,0 +1,175 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/spoc.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+#include "hal/phy/defs.h"
+#include "cp/spoc/spoc.h"
+#include "math.h"
+
+#define SPOC_PMIN PHY_CARRIER_OFFSET
+#define SPOC_PMAX (PHY_CARRIER_NB + SPOC_PMIN - 1)
+#define SPOC_DIAGONAL_LENGTH PHY_CARRIER_NB
+
+spoc_prec_t kaiser[10] = { 0.9905, 0.9622, 0.9164, 0.8546, 0.7792, 0.6929, 0.5989, 0.5005, 0.4011, 0.304 };
+
+void
+spoc_CG (spoc_prec_t rho, int N, spoc_prec_t *reg)
+{
+ spoc_prec_t arg_p = N*M_PI*rho;
+ spoc_prec_t arg_n = arg_p;
+ spoc_prec_t sinus = sin (arg_p);
+ if (arg_p == 0) reg[10] = 1;
+ else reg[10] = sinus/arg_p;
+ int k;
+ spoc_prec_t kk;
+ for(k=1;k<=10; k++)
+ {
+ sinus = -sinus;
+ kk = kaiser[k-1]*sinus;
+ arg_p+=M_PI;
+ arg_n-=M_PI;
+ /* Remarque sur la division par arg_p = pi(k-N*rho).
+ * si |rho|<300ppm, N<3072, |k|<=1 alors arg_p != 0
+ * et lalors arg_p=0 que si rho=0 et k=0. voir au dessus. */
+ reg[k+10] = kk/arg_p;
+ reg[10-k] = kk/arg_n;
+ }
+}
+
+void
+spoc_MCoeff (spoc_prec_t rho)
+{
+ int k;
+ spoc_prec_t xi,xe;
+ spoc_prec_t sin_xi,sin_xe;
+ spoc_prec_t cos_xi,cos_xe;
+ spoc_prec_t pirho = M_PI * rho;
+ spoc_prec_t SIN_PIRHO = sin(pirho);
+ spoc_prec_t COS_PIRHO = cos(pirho);
+ spoc_prec_t delta;
+ uint len;
+ spoc_prec_t sin_prev;
+
+ spoc_prec_t rho_abs = rho;
+ if (rho < 0) rho_abs = -rho;
+ if (rho_abs >= 1e-8)
+ {
+ //printf ("normal computation\n");
+ xi = pirho * SPOC_PMIN;
+ xe = pirho * SPOC_PMAX;
+ sin_xi = sin(xi);
+ sin_xe = sin(xe);
+ cos_xi = cos(xi);
+ len = SPOC_DIAGONAL_LENGTH - 1; // interval nb in the diagonal.
+
+#ifdef SPOC_COMPARE_SCILAB
+ args_haut[20] = xi;
+ args_bas[20] = xe;
+ sinc_haut[20] = sin_xi/xi;
+ sinc_bas[20] = sin_xe/xe;
+ divisor[20] = len*len;
+ args_haut_rx[20] = -xi;
+ args_bas_rx[20] = -xe;
+ sinc_haut_rx[20] = sin_xi/xi;
+ sinc_bas_rx[20] = sin_xe/xe;
+#endif
+ if (xi == 0 )
+ {
+ reg_ordo_tx[20] = reg_ordo_rx[20] = 1;
+ reg_pente_tx[20] = reg_pente_rx[20] = 0;
+ }
+ else
+ {
+ reg_ordo_tx[20] = reg_ordo_rx[20] = sin_xi/xi;
+ reg_pente_tx[20] = reg_pente_rx[20] = (sin_xe/xe - reg_ordo_tx[20])/(len*len);
+ }
+
+ delta = 0;
+ /* Diagonales superieures */
+ for (k=1; k<=20; k++)
+ {
+ xi += (M_PI + pirho);
+ xe += M_PI;
+ delta += 2*M_PI;
+ sin_prev = sin_xi;
+ sin_xi = -sin_prev * COS_PIRHO - cos_xi * SIN_PIRHO;
+ cos_xi = sin_prev * SIN_PIRHO - cos_xi * COS_PIRHO;
+ sin_xe = -sin_xe;
+ sin_xi = sin(xi);
+ len -= 1;
+ spoc_prec_t mux = 1.0/len;
+ reg_ordo_tx[k+20] = sin_xi/xi;
+ reg_ordo_rx[k+20] = -sin_xi/(-xi+delta);
+ reg_pente_tx[k+20] = (sin_xe/xe - reg_ordo_tx[k+20])*mux;
+ reg_pente_rx[k+20] = (-sin_xe/(-xe+delta) - reg_ordo_rx[k+20])*mux;
+#ifdef SPOC_COMPARE_SCILAB
+ divisor[k+20] = len;
+ args_haut[k+20] = xi;
+ args_bas[k+20] = xe;
+ sinc_haut[k+20] = sin_xi/xi;
+ sinc_bas[k+20] = sin_xe/xe;
+ args_haut_rx[k+20] = -xi+delta;
+ args_bas_rx[k+20] = -xe+delta;
+ sinc_haut_rx[k+20] = -sin_xi/(-xi+delta);
+ sinc_bas_rx[k+20] = -sin_xe/(-xe+delta);
+#endif
+ }
+ xi = pirho * SPOC_PMIN;
+ xe = pirho * SPOC_PMAX;
+ sin_xi = reg_ordo_tx[20] * xi;
+ sin_xe = sin(xe);
+ cos_xe = cos(xe);
+ len = SPOC_DIAGONAL_LENGTH - 1;
+ delta=0;
+ /* Diagonales inferieures */
+ for (k=1; k<=20; k++)
+ {
+ xe -= (M_PI + pirho);
+ xi -= M_PI;
+ delta -= 2*M_PI;
+ sin_prev = sin_xe;
+ sin_xe = -sin_prev * COS_PIRHO + cos_xe * SIN_PIRHO;
+ cos_xe = -sin_prev * SIN_PIRHO - cos_xe * COS_PIRHO;
+ sin_xi = -sin_xi;
+ len -= 1;
+ spoc_prec_t mux = 1.0/len;
+ reg_ordo_tx[20-k] = sin_xi/xi;
+ reg_ordo_rx[20-k] = -sin_xi/(-xi+delta);
+ reg_pente_tx[20-k] = (sin_xe/xe - reg_ordo_tx[20-k])*mux;
+ reg_pente_rx[20-k] = (-sin_xe/(-xe+delta) - reg_ordo_rx[20-k])*mux;
+#ifdef SPOC_COMPARE_SCILAB
+ divisor[20-k] = len;
+ args_haut[20-k] = xi;
+ args_bas[20-k] = xe;
+ sinc_haut[20-k] = sin_xi/xi;
+ sinc_bas[20-k] = sin_xe/xe;
+ args_haut_rx[20-k] = -xi+delta;
+ args_bas_rx[20-k] = -xe+delta;
+ sinc_haut_rx[20-k] = -sin_xi/(-xi+delta);
+ sinc_bas_rx[20-k] = -sin_xe/(-xe+delta);
+#endif
+ }
+ }
+ else
+ {
+ //printf ("fast computation\n");
+ for (k=1; k<=20; k++)
+ {
+ reg_ordo_tx[k+20] = reg_ordo_tx[20-k] = reg_ordo_rx[k+20] = reg_ordo_rx [20-k] = 0;
+ reg_pente_tx[k+20] = reg_pente_tx[20-k]= reg_pente_rx[k+20] = reg_pente_rx [20-k] = 0;
+ }
+ reg_ordo_tx[20] = reg_ordo_rx[20] = 1;
+ reg_pente_tx[20] = reg_pente_rx[20] = 0;
+ }
+}
diff --git a/cesar/cp/spoc/test/ApproxOrder1ParamMCoeff.sci b/cesar/cp/spoc/test/ApproxOrder1ParamMCoeff.sci
new file mode 100644
index 0000000000..b76f650c69
--- /dev/null
+++ b/cesar/cp/spoc/test/ApproxOrder1ParamMCoeff.sci
@@ -0,0 +1,36 @@
+function [arg_i, arg_e, sinc_i, sinc_e, div, ordo, pente] = ApproxOrder1ParamMCoeff(rho,X0,N,Coeff_number)
+
+if Coeff_number<0
+ xi=X0 - Coeff_number;
+ xe=N-1;
+ qi= X0-Coeff_number;
+ qe=N-1;
+ ki=X0+ 0;
+ ke=N+Coeff_number-1;
+elseif Coeff_number>0
+ xi=X0;
+ xe=(N-1)-abs(Coeff_number);
+ qi=X0+ 0;
+ qe=N-Coeff_number-1;
+ ki=X0+ Coeff_number;
+ ke=N-1;
+else
+ xi=X0;
+ xe=(N-1)-abs(Coeff_number);
+ qi=X0;
+ qe=N-1;
+ ki=X0;
+ ke=N-1;
+end
+xi;
+xe;
+arg_i = %pi*(ki*(1+rho)-qi);
+arg_e = %pi*(ke*(1+rho) - qe);
+sinc_i=sinc( arg_i);
+sinc_e=sinc( arg_e);
+div = xe-xi;
+pente=(sinc_e-sinc_i)/(xe-xi);
+//pente=(sinc_e-sinc_i);
+ordo=sinc_i;
+
+endfunction
diff --git a/cesar/cp/spoc/test/ApproxOrder2ParamMCoeff.sci b/cesar/cp/spoc/test/ApproxOrder2ParamMCoeff.sci
new file mode 100644
index 0000000000..fca72b620f
--- /dev/null
+++ b/cesar/cp/spoc/test/ApproxOrder2ParamMCoeff.sci
@@ -0,0 +1,34 @@
+function [args_i,args_e, sinc_i, sinc_e, div, ordo, pente] = ApproxOrder2ParamMCoeff(rho,X0,N,Coeff_number)
+
+
+// calcul des points pour approximer
+if Coeff_number<21
+ x1= X0 + 21-Coeff_number;
+ x3=N-1;
+elseif Coeff_number>21
+ x1= X0;
+ x3=N-1 -(Coeff_number-21);
+else
+ x1= X0;
+ x3=N-1;
+
+end
+
+args_i = %pi*((x1 + (Coeff_number-21))*(1+rho) - x1 );
+args_e = %pi*((x3 + (Coeff_number-21))*(1+rho) - x3 );
+sinc_i=sinc(args_i);
+sinc_e=sinc(args_e);
+
+
+// calcul des coefficients when y=ax²+c
+div = (x3 - x1)^2;
+pente= (sinc_e-sinc_i)/(div);
+ordo = sinc_i;
+
+endfunction
+
+
+
+
+
+
diff --git a/cesar/cp/spoc/test/Makefile b/cesar/cp/spoc/test/Makefile
new file mode 100755
index 0000000000..439b2e2572
--- /dev/null
+++ b/cesar/cp/spoc/test/Makefile
@@ -0,0 +1,11 @@
+BASE = ../../..
+
+INCLUDES = cp/spoc/test
+
+EXTRA_HOST_CFLAGS=-O3
+EXTRA_HOST_LDFLAGS=-lm
+HOST_PROGRAMS = test_coeff_check
+test_coeff_check_SOURCES = test_coeff_check.c
+test_coeff_check_MODULES = lib
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/cp/spoc/test/coeff_generation.scilab b/cesar/cp/spoc/test/coeff_generation.scilab
new file mode 100644
index 0000000000..f26946f208
--- /dev/null
+++ b/cesar/cp/spoc/test/coeff_generation.scilab
@@ -0,0 +1,22 @@
+pwd
+args = sciargs();
+rho = msscanf(args(5),"%lg")
+getf ("ApproxOrder1ParamMCoeff.sci");
+getf ("ApproxOrder2ParamMCoeff.sci");
+getf ("get_Approx1.sci");
+[args_tx_i,args_tx_e,sinc_tx_i, sinc_tx_e, div_tx, ordo_tx, pente_tx] = get_Approx1( rho,74,1155+74);
+[args_rx_i,args_rx_e,sinc_rx_i, sinc_rx_e, div_rx, ordo_rx, pente_rx] = get_Approx1(-rho,74,1155+74);
+fp = file("open","./obj/args_of_sinc.txt","unknown");
+fprintf (fp, "%5.15g %5.15g %5.15g %5.15g\n", args_tx_i, args_tx_e, args_rx_i, args_rx_e);
+file ("close", fp);
+fp = file("open","./obj/sinc.txt","unknown");
+fprintf (fp, "%5.15g %5.15g %5.15g %5.15g\n", sinc_tx_i, sinc_tx_e, sinc_rx_i, sinc_rx_e);
+file ("close", fp);
+fp = file("open","./obj/divisor.txt","unknown");
+fprintf (fp, "%5.15g %5.15g\n", div_tx, div_rx);
+file ("close", fp);
+fp = file("open","./obj/coeff.txt","unknown");
+fprintf (fp, "%5.15g %5.15g %5.15g %5.15g\n", ordo_tx, pente_tx, ordo_rx, pente_rx);
+file ("close", fp);
+exit;
+
diff --git a/cesar/cp/spoc/test/define_spoc_c.h b/cesar/cp/spoc/test/define_spoc_c.h
new file mode 100644
index 0000000000..325e6aa214
--- /dev/null
+++ b/cesar/cp/spoc/test/define_spoc_c.h
@@ -0,0 +1,20 @@
+#ifndef define_spoc_c_h
+#define define_spoc_c_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file define_spoc_c.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#define SPOC_COMPARE_SCILAB
+#include "cp/spoc/src/spoc.c"
+#endif /* define_spoc_c_h */
diff --git a/cesar/cp/spoc/test/get_Approx1.sci b/cesar/cp/spoc/test/get_Approx1.sci
new file mode 100644
index 0000000000..4ec86afc2f
--- /dev/null
+++ b/cesar/cp/spoc/test/get_Approx1.sci
@@ -0,0 +1,21 @@
+function [args_i, args_e, sinc_i, sinc_e, divs, ordos, pentes] = get_Approx1(rho,X0,N)
+for i=-20:20
+ if (i==0)
+ [arg_i, arg_e, si, se, div, ordo,pente] = ApproxOrder2ParamMCoeff(rho,X0,N,21);
+ else
+ [arg_i, arg_e, si, se, div, ordo,pente] = ApproxOrder1ParamMCoeff(rho,X0,N,i);
+ end
+ args_i(i+21)=arg_i;
+ args_e(i+21)=arg_e;
+ sinc_i(i+21)=si;
+ sinc_e(i+21)=se;
+ divs(i+21) = div;
+ ordos(i+21)=ordo;
+ pentes(i+21)=pente;
+end
+
+
+
+
+endfunction
+
diff --git a/cesar/cp/spoc/test/src/test_coeff_check.c b/cesar/cp/spoc/test/src/test_coeff_check.c
new file mode 100644
index 0000000000..5a50d41d0b
--- /dev/null
+++ b/cesar/cp/spoc/test/src/test_coeff_check.c
@@ -0,0 +1,194 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/test_spoc.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "define_spoc_c.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "math.h"
+#include "lib/test.h"
+
+#define FAIL_LIMIT 1e-6
+#define SPOC_TEST_DBG 0
+
+double kaiser_d[10] = { 0.9905, 0.9622, 0.9164, 0.8546, 0.7792, 0.6929, 0.5989, 0.5005, 0.4011, 0.304 };
+
+double
+err (double a, double ref)
+{
+ double ret = 0;
+ //printf ("DBG : a=%5.15g ref=%5.15g\n", a, ref);
+ if (ref == 0)
+ {
+ ret = a;
+ }
+ else
+ {
+ if (a == 0) ret = ref;
+ else ret = (a-ref)/ref;
+ }
+ if (ret<0) ret = -ret;
+ return(ret);
+}
+
+double
+data_Mcheck_dbg_print (char* filestring, char* haut_str, char *bas_str,
+ spoc_prec_t *tx_coeff_haut, spoc_prec_t *tx_coeff_bas,
+ spoc_prec_t *rx_coeff_haut, spoc_prec_t *rx_coeff_bas )
+{
+ double tx_haut, tx_bas;
+ double rx_haut, rx_bas;
+ double tx_haut_err, tx_bas_err;
+ double rx_haut_err, rx_bas_err;
+ double ret=0;
+ FILE *fref = fopen (filestring, "r");
+ int i;
+ for (i=0; i<41; i++)
+ {
+ fscanf (fref, "%lg %lg %lg %lg", &tx_haut, &tx_bas, &rx_haut, &rx_bas);
+ tx_haut_err = err (tx_coeff_haut[i], tx_haut);
+ tx_bas_err = err(tx_coeff_bas[i], tx_bas);
+ rx_haut_err = err (rx_coeff_haut[i], rx_haut);
+ rx_bas_err = err(rx_coeff_bas[i], rx_bas);
+ if (ret < rx_haut_err) ret = rx_haut_err;
+ if (ret < rx_bas_err) ret = rx_bas_err;
+ if (ret < tx_haut_err) ret = tx_haut_err;
+ if (ret < tx_bas_err) ret = tx_bas_err;
+#if defined (SPOC_TEST_DBG) && (SPOC_TEST_DBG==2)
+ printf ("TX_%s[%d] %5.15g<-->%5.15g\t %5.15g\n", haut_str, i-20, tx_coeff_haut[i], tx_haut, tx_haut_err);
+ printf ("TX_%s[%d] %5.15g<-->%5.15g\t %5.15g ", bas_str, i-20, tx_coeff_bas[i], tx_bas, tx_bas_err);
+ if ((tx_bas_err > FAIL_LIMIT) || (tx_haut_err > FAIL_LIMIT)) printf (" * \n");
+ else printf ("\n");
+ printf ("RX_%s[%d] %5.15g<-->%5.15g\t %5.15g\n", haut_str, i-20, rx_coeff_haut[i], rx_haut, rx_haut_err);
+ printf ("RX_%s[%d] %5.15g<-->%5.15g\t %5.15g ", bas_str, i-20, rx_coeff_bas[i], rx_bas, rx_bas_err);
+ if ((rx_bas_err > FAIL_LIMIT) || (rx_haut_err > FAIL_LIMIT)) printf (" * \n");
+ else printf ("\n");
+#endif
+ }
+ fclose (fref);
+ return ret;
+}
+
+void
+test_Mcoeff_check (test_t test, double rho)
+{
+ char cmd_scilab[128];
+ char test_string[64];
+ sprintf (test_string, "rho=%lg\n", rho);
+ test_begin (test, test_string)
+ {
+ spoc_MCoeff (rho);
+ sprintf (cmd_scilab,"scilab -f ./coeff_generation.scilab -nogui -args %lg > ./obj/toto.log 2>./obj/titi.log </dev/null", rho);
+ system (cmd_scilab);
+#if defined (SPOC_TEST_DBG) && (SPOC_TEST_DBG==2)
+ printf ("\nargs\n");
+ data_Mcheck_dbg_print ("./obj/args_of_sinc.txt", "ARGS_HAUT", "ARGS_BAS ",
+ args_haut, args_bas, args_haut_rx, args_bas_rx);
+ printf ("\nsinc\n");
+ data_Mcheck_dbg_print ("./obj/sinc.txt", "SINC_HAUT", "SINC_BAS ",
+ sinc_haut, sinc_bas, sinc_haut_rx, sinc_bas_rx);
+ printf ("\ncoeff\n");
+#endif
+ double err = data_Mcheck_dbg_print ("./obj/coeff.txt", "ORDON", "PENTE",
+ reg_ordo_tx, reg_pente_tx, reg_ordo_rx, reg_pente_rx);
+#if defined (SPOC_TEST_DBG) && (SPOC_TEST_DBG>=1)
+ printf ("Matrix M ... err = %5.15g\n", err);
+#endif
+ test_fail_if (err > FAIL_LIMIT);
+ } test_end;
+}
+
+double
+sinc (double arg)
+{
+ if (arg == 0) return 1;
+ else return (sin(arg)/arg);
+}
+
+void
+test_CG_check (test_t test, double rho)
+{
+ char test_string[64];
+ sprintf (test_string, "rho=%lg\n", rho);
+ test_begin (test, test_string)
+ {
+ double CG_N[21], CG_FC10[21], CG_PR1[21], CG_PR2[21];
+ int k;
+ for (k=-10; k<=10; k++)
+ {
+ double kk, arg;
+ if (k==0) kk=1.0; else kk = kaiser_d[abs(k)-1];
+ arg = M_PI*(k-3072*rho); CG_N[k+10] = kk * sinc(arg);
+ arg = M_PI*(k+3072*rho); CG_FC10[k+10] = kk * sinc(arg);
+ arg = M_PI*(k+372*rho); CG_PR1[k+10] = kk * sinc(arg);
+ arg = M_PI*(k+1140*rho); CG_PR2[k+10] = kk * sinc(arg);
+ }
+ spoc_CG (rho, -3072, reg_CG_N);
+ spoc_CG (rho, 3072, reg_CG_FC10);
+ spoc_CG (rho, 372, reg_CG_PR1);
+ spoc_CG (rho, 1140, reg_CG_PR2);
+ double err_N, err_FC10, err_PR1, err_PR2, error_global;
+ error_global = 0;
+ for (k=-10; k<=10; k++)
+ {
+ double error = 0;
+ int i = 10+k;
+ err_N = err (CG_N[i], reg_CG_N[i]);
+ if (error < err_N) error = err_N;
+ err_FC10 = err (CG_FC10[i], reg_CG_FC10[i]);
+ if (error < err_FC10) error = err_FC10;
+ err_PR1 = err (CG_PR1[i], reg_CG_PR1[i]);
+ if (error < err_PR1) error = err_PR1;
+ err_PR2 = err (CG_PR2[i], reg_CG_PR2[i]);
+ if (error < err_PR2) error = err_PR2;
+ if (error_global< error) error_global=error;
+#if defined (SPOC_TEST_DBG) && (SPOC_TEST_DBG==2)
+ printf ("N[%d] %5.15g<-->%5.15g %5.15g\n", k, CG_N[i], reg_CG_N[i], err_N);
+ printf ("FC10[%d] %5.15g<-->%5.15g %5.15g\n", k, CG_FC10[i], reg_CG_FC10[i], err_FC10);
+ printf ("PR1[%d] %5.15g<-->%5.15g %5.15g\n", k, CG_PR1[i], reg_CG_PR1[i], err_PR1);
+ printf ("PR2[%d] %5.15g<-->%5.15g %5.15g", k, CG_PR2[i], reg_CG_PR2[i], err_PR2);
+ if (error > FAIL_LIMIT) printf (" *\n"); else printf ("\n");
+#endif
+ }
+#if defined (SPOC_TEST_DBG) && (SPOC_TEST_DBG>=1)
+ printf ("Vectors [N,FC10,PR1,PR2] ...err = %5.15g\n", error_global);
+#endif
+ test_fail_if (error_global > FAIL_LIMIT);
+ } test_end;
+}
+
+int
+main (int argc, char **argv)
+{
+ test_t test;
+ test_init (test, argc, argv);
+ int step, rho_eps, max_eps;
+ for (step = 1; step<=100000; step = step*10)
+ {
+ rho_eps = -10 * step;
+ max_eps = 10 * step;
+ for (; rho_eps<=max_eps; rho_eps+=step)
+ {
+ double rho = rho_eps * 1e-9;
+#if defined (SPOC_TEST_DBG) && (SPOC_TEST_DBG>=1)
+ printf ("\nSPOC rho=%g \n", rho);
+#endif
+ test_case_begin(test, "check Mcoeff");
+ test_Mcoeff_check(test, rho);
+ test_case_begin(test, "check CGcoeff");
+ test_CG_check(test, rho);
+ }
+ }
+ test_result (test);
+ return (test_nb_failed (test) == 0 ? 0 : 1);
+}
diff --git a/cesar/cp/station/Module b/cesar/cp/station/Module
new file mode 100644
index 0000000000..00235e9565
--- /dev/null
+++ b/cesar/cp/station/Module
@@ -0,0 +1,2 @@
+SOURCES := station_actions.c station_apivs.c station_core.c station_event_handler.c station_data.c
+
diff --git a/cesar/cp/station/ecos.ecc.sh b/cesar/cp/station/ecos.ecc.sh
new file mode 100644
index 0000000000..8253d98c9a
--- /dev/null
+++ b/cesar/cp/station/ecos.ecc.sh
@@ -0,0 +1,5 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new linux default
+cat >> $config <<EOF
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/cp/station/inc/station_actions.h b/cesar/cp/station/inc/station_actions.h
new file mode 100644
index 0000000000..a7f5b16f10
--- /dev/null
+++ b/cesar/cp/station/inc/station_actions.h
@@ -0,0 +1,86 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/station/inc/station_actions.h
+ * \brief all the action called from the visual state machine
+ * \ingroup cp_station
+ */
+#ifndef STATION_EVENTS_H_
+#define STATION_EVENTS_H_
+
+#include "cp/station/station.h"
+#include "cp/station/inc/station_event_handler.h"
+#include "cp/msg/msg.h"
+#include "cp/beacon/beacon.h"
+
+/**
+ * \brief called when the ustt timer has expired
+ * \param
+ * \return
+ */
+void
+station_ustt_expires(void);
+
+
+void init_system (void);
+void launch_bbt_timer (void);
+
+/**
+ * \brief return a random number between min and max
+ * if max == 0, return a number between 0 and RAND_MAX
+ * \param min
+ * \param max
+ * \return the random value
+ */
+uint rand_in(uint min, uint max);
+
+void launch_beacon_timer (void);
+void launch_ustt_timer (void);
+void transmit_unassoc_sta_mme(void);
+void station_bbt_expires(void);
+VS_VOID process_usta_mme (VS_VOIDPTR mme_address);
+VS_VOID trace_cco (VS_VOID);
+VS_VOID trace_pond (VS_VOID);
+VS_VOID trace_sta (VS_VOID);
+VS_VOID trace_ucco (VS_VOID);
+VS_VOID trace_usta (VS_VOID);
+VS_VOID try_associate (VS_VOIDPTR beacon_address);
+/**
+ * \brief process cc_assoc_req message received by the cco
+ * \param address of the message
+ * \return
+ */
+VS_VOID process_cc_assoc_req (VS_VOIDPTR mme_address);
+VS_VOID process_cc_assoc_cnf (VS_VOIDPTR mme_address);
+
+VS_VOID process_cc_set_tei_map_ind (VS_VOIDPTR mme_address);
+VS_VOID process_cc_set_tei_map_req (VS_VOIDPTR mme_address);
+
+VS_VOID send_discover_beacon_as_ucco (VS_VOID);
+
+VS_VOID process_drv_set_mac_address (VS_VOIDPTR msg);
+VS_VOID process_drv_set_avln_hfid (VS_VOIDPTR msg);
+VS_VOID process_drv_set_cco_preference (VS_VOIDPTR msg);
+VS_VOID process_drv_set_dpw_req (VS_VOIDPTR msg);
+VS_VOID process_drv_set_m_sta_hfid (VS_VOIDPTR msg);
+VS_VOID process_drv_set_nid (VS_VOIDPTR msg);
+VS_VOID process_drv_set_npw (VS_VOIDPTR msg);
+VS_VOID process_drv_set_sl (VS_VOIDPTR msg);
+VS_VOID process_drv_set_snid (VS_VOIDPTR msg);
+VS_VOID process_drv_set_tonemask (VS_VOIDPTR msg);
+VS_VOID process_drv_set_u_sta_hfid (VS_VOIDPTR msg);
+
+VS_VOID cp_station_set_assoc_status (VS_BOOL associated);
+VS_VOID cp_station_set_auth_status (VS_BOOL is_authenticated);
+VS_VOID cp_station_set_cco_status (VS_BOOL is_cco);
+VS_VOID process_drv_start_mac_req (VS_VOIDPTR msg);
+
+VS_VOID process_drv_set_was_cco (VS_VOIDPTR msg);
+
+
+#endif /*STATION_EVENTS_H_*/
diff --git a/cesar/cp/station/inc/station_apivs.h b/cesar/cp/station/inc/station_apivs.h
new file mode 100644
index 0000000000..827e1643fb
--- /dev/null
+++ b/cesar/cp/station/inc/station_apivs.h
@@ -0,0 +1,49 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/station/inc/event_handler.h
+ * \brief event handler for the fsm events
+ * \ingroup cp_sta
+ */
+#ifndef STATION_APIVS_H_
+#define STATION_APIVS_H_
+
+
+#include "cp/vstate_fsm/src/main_fsm.h"
+#include "cp/vstate_fsm/src/main_fsmAction.h"
+#include "cp/vstate_fsm/src/main_fsmData.h"
+#include "cp/station/inc/station_event_handler.h"
+
+#include "lib/visual_state_api/src/SEMLibE.h"
+
+/**
+ * \brief init the visual state fsm
+ * \param
+ * \return
+ */
+void
+cp_station_init_fsm(void);
+
+/**
+ * \brief process the event stored in the event handler
+ * \param
+ * \return
+ */
+void
+cp_station_process_fsm_event(void);
+
+
+void
+cp_station_test_fsm(void);
+
+
+void
+cp_station_print_fsm_states(void);
+
+
+#endif /*STATION_APIVS_H_*/
diff --git a/cesar/cp/station/inc/station_ctx.h b/cesar/cp/station/inc/station_ctx.h
new file mode 100644
index 0000000000..6eee974ef4
--- /dev/null
+++ b/cesar/cp/station/inc/station_ctx.h
@@ -0,0 +1,77 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/station/inc/station_ctx.h
+ * \brief
+ * \ingroup cp_station
+ */
+#ifndef CP_STATION_CTX_H_
+#define CP_STATION_CTX_H_
+
+#include "hal/timer/timer.h"
+#include "hle/hle.h"
+#include "interface/interface.h"
+#include "cp/cco/cco.h"
+//#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/inc/ntb_clock_sync.h"
+
+struct cp_sta_flash_params_t {
+ u64 mac_address;
+ u32 cco_preference;
+ u32 was_cco;
+ u32 sl;
+ char npw[MAX_PWD_SIZE+1];
+ char dpw[MAX_PWD_SIZE+1];
+ char m_sta_hfid[MAX_HFID_SIZE+1];
+ char u_sta_hfid[MAX_HFID_SIZE+1];
+ char avln_hfid[MAX_HFID_SIZE+1];
+};
+typedef struct cp_sta_flash_params_t cp_sta_flash_params_t;
+
+struct cp_sta_secu_params_t {
+ u8 nmk[16];
+ u8 nid[7];
+};
+typedef struct cp_sta_secu_params_t cp_sta_secu_params_t;
+
+#if 0
+typedef struct cp_cco_t cp_cco_t;
+#endif
+
+struct cp_sta_t
+{
+ mac_config_t *mac_config;
+ mac_store_t *mac_store;
+ pbproc_t *pbproc;
+ sar_t *sar;
+ hal_timer_t *hal_timer;
+ cl_t *cl;
+ hle_t *hle;
+ interface_t *interface;
+
+ cp_beacon_t *cp_beacon;
+
+ ntb_t *ntb;
+ cp_secu_t *sec;
+ cp_cco_t *cco;
+
+ cp_sta_flash_params_t cp_sta_flash_params;
+ cp_sta_secu_params_t cp_sta_secu_params;
+
+ mac_t mac_addr;
+ u64 nid;
+ bool hoip;
+ u8 numDisSta;
+ u8 numDisNet;
+ bool authentication;
+};
+
+typedef struct cp_sta_t cp_sta_t;
+
+
+#endif /*CP_STATION_CTX_H_*/
diff --git a/cesar/cp/station/inc/station_data.h b/cesar/cp/station/inc/station_data.h
new file mode 100644
index 0000000000..862d13441a
--- /dev/null
+++ b/cesar/cp/station/inc/station_data.h
@@ -0,0 +1,401 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/station/inc/station_data.h
+ * \brief the data stored
+ * \ingroup cp_station
+ */
+#ifndef STATION_DATA_H_
+#define STATION_DATA_H_
+
+#include <string.h>
+#include "mac/common/store.h"
+#include "cp/cp_types.h"
+#include "cp/station/inc/station_types.h"
+#include "cp/station/inc/station_ctx.h"
+#include "cl/cl.h"
+#include "SEMTypes.h"
+
+typedef enum process_usta_result_t
+{
+ BECOME_CCO,
+ USTA_MATCHING_NID,
+ CHECK_EXISTING_OTHER_AVLN
+} process_usta_result_t;
+
+/*
+cl_t *
+station_get_cl_ctx(void);
+
+mac_store_t *
+station_get_mac_store_ctx(void);
+*/
+
+cp_sta_t *my_cp_sta_ctx;
+/**
+ * \brief return the nid of the station
+ * \param ctx pointer to station context.
+ * \return the nid !
+ */
+nid_t
+cp_station_get_nid(cp_sta_t *ctx);
+
+/**
+ * \brief return the snid of the station
+ * \param
+ * \return the snid !
+ */
+snid_t
+cp_station_get_snid(void);
+
+/**
+ * \brief return the cco capability of the station
+ * \param
+ * \return guess what ? the cco capa !
+ * ie : 0 : cco level 0
+ * 1 : level 1
+ * ...
+ */
+u8
+cp_station_get_cco_capa(void);
+
+/**
+ * \brief return true if the station is cco
+ * \param
+ * \return
+ */
+bool
+cp_station_get_is_cco(void);
+
+/**
+ * \brief return true if the station is pcco capable
+ * \param
+ * \return
+ */
+bool
+cp_station_get_pcco_capa(void);
+
+/**
+ * \brief return true if the station is can be backup cco
+ * \param
+ * \return
+ */
+bool
+cp_station_get_backup_cco_capa(void);
+
+
+/**
+ * \brief return the number of associated station of the avln
+ * \param
+ * \return the number
+ */
+u8
+cp_station_get_number_of_assoc(void);
+
+/**
+ * \brief set the new tei of the station
+ * \param new_tei : the new tei
+ * \param lease_time : liease time of this tei
+ * \return
+ */
+void
+cp_station_set_tei(const tei_t new_tei, const u16 lease_time);
+
+/**
+ * \brief get the new tei of the station
+ * \return the tei of the station
+ */
+tei_t
+cp_station_get_tei(void *v);
+
+/**
+ * \brief set the mac address of the station
+ * \param ctx pointer to station context.
+ * \param mac_address : the mac address
+ * \return
+ */
+void
+cp_station_set_mac_address(cp_sta_t *ctx, mac_address_t mac_address);
+
+/**
+ * \brief return the mac address of the station
+ * \param ctx pointer to station context.
+ * \return
+ */
+void
+cp_station_get_mac_address(cp_sta_t *ctx, mac_address_t *mac_address);
+
+/**
+ * \brief clear the associated sta list
+ * \return
+ */
+void
+cp_station_clear_assoc_sta_list(void);
+
+/**
+ * \brief init the storage class
+ * \param
+ * \return
+ */
+void
+cp_station_data_init(mac_store_t *mac_store_ctx, cl_t *interf_cl_ctx, pbproc_t *pbproc_ctx);
+
+
+/**
+ * \brief in the POND state, this function will record the cm_unassociated_sta.ind
+ * received.
+ * \param mac_address : the osa of the message
+ * \param cco_capa : the cco_capa field of the message
+ * \param nid : the nid field of the message
+ * \return
+ */
+void
+cp_station_add_usta(const mac_address_t mac_address, const u8 cco_capa, const nid_t nid);
+
+/**
+ * \brief this will process the previously recorded messages, to know if
+ * in which state the station should go.
+ * \return process_usta_result_t
+ */
+process_usta_result_t
+cp_station_process_recorded_usta(void);
+
+/**
+ * \brief this will compare the field of a received cm_unssociated_sta.ind
+ * with the station's parameters
+ * \param mac_address : the osa of the message
+ * \param cco_capa : the cco_capa field of the message
+ * \param nid : the nid field of the message
+ * \return
+ */
+process_usta_result_t
+cp_station_process_usta(const mac_address_t mac_address, const u8 cco_capa, const nid_t nid);
+
+/**
+ * \brief this will add an avln to the discovered avln list of the station
+ * \param nid : the nid of the new avln
+ * \param snid : the snid of the new avln
+ * \return
+ */
+void
+cp_station_add_avln(const nid_t nid, const snid_t snid);
+
+/**
+ * \brief associate a new station. call this function when cco
+ * (the station has no TEI)
+ * \param sta : information about the new station
+ * \return TEI of the newly associated station, or 0 if failed
+ */
+tei_t
+cp_station_associate_new(const station_t sta);
+
+/**
+ * \brief renew the TEI of a station
+ * \param sta : information about the new station
+ * \return TEI of the newly associated station, or 0 if failed
+ */
+tei_t
+cp_station_renew(const station_t sta);
+
+/**
+ * \brief add a station to the associated station list.
+ * (the station already had a TEI)
+ * \param tei : tei of the station
+ * \param sta : information about the new station
+ * \return
+ */
+void
+cp_station_associate_old(const tei_t tei, const station_t sta);
+
+/**
+ * \brief remove a station from the associated station list.
+ * \param tei : tei of the station
+ * \return
+ */
+void
+cp_station_remove_associated(const tei_t tei);
+
+/**
+ * \brief return the data of an associated sta
+ * \param sta : the returned data
+ * \param from_first : set to true if you want to search station from the begining of the list
+ * \param tei : if you already know the tei of the station, set it here
+ * \return TEI of the next station in the list, or 0 if none
+ */
+tei_t
+cp_station_get_associate_info(station_t *sta, const bool from_first, const tei_t tei);
+
+/**
+ * \brief return the tei associated to this mac address
+ * \param mac : the mac address
+ * \return the tei
+ */
+tei_t
+cp_station_find_tei_from_mac(const mac_address_t mac_address);
+
+/**
+ * \brief get the status of the station
+ * \param
+ * \return the current status of the station
+ */
+cp_station_status_t
+cp_station_get_status(void);
+
+/**
+ * \brief set the association status of the station
+ * \param become_associated true to set station in associated station state
+ * \return
+ */
+VS_VOID
+cp_station_set_assoc_status (VS_BOOL become_associated);
+
+/**
+ * Return the association status of the station
+ *
+ * \return boolean informing if the sta is associated or not.
+ */
+VS_BOOL
+cp_station_get_assoc_status (void);
+
+/**
+ * Return the association status of the station
+ *
+ * \param ctx the station context.
+ * \return boolean informing if the sta is associated or not.
+ */
+VS_BOOL
+cp_station_is_associated(cp_sta_t *ctx);
+
+/**
+ * \brief set the cco status of the station
+ * \param is_cco true to set station in cco state
+ * \return
+ */
+VS_VOID
+cp_station_set_cco_status (VS_BOOL is_cco);
+
+/**
+ * \brief set the authentication status of the station
+ * \param become_authenticated true to set station in authenticated station state
+ * \return
+ */
+VS_VOID
+cp_station_set_auth_status (VS_BOOL become_authenticated);
+
+/**
+ * Return the authentication status of the station
+ *
+ * \return boolean informing if the sta is authenticated or not.
+ */
+VS_BOOL
+cp_station_get_auth_status (void);
+
+/**
+ * Return the authentication status of the station
+ *
+ * \param ctx the station context.
+ * \return boolean informing if the sta is authenticated or not.
+ */
+VS_BOOL
+cp_station_is_authenticated(cp_sta_t *ctx);
+
+/**
+ * \brief return true if the station is pco
+ * \param
+ * \return
+ */
+bool
+cp_station_get_is_pco(void);
+
+/**
+ * \brief return true if the station is backup cco
+ * \param
+ * \return
+ */
+bool
+cp_station_get_is_backup_cco(void);
+
+/**
+ * \brief return the number of station recorded in the discovered sta list
+ * \param
+ * \return
+ */
+u16
+cp_station_get_num_discovered_sta(void);
+
+/**
+ * \brief return the number of discovered AVLN
+ * \param
+ * \return
+ */
+u16
+cp_station_get_num_discovered_avln(void);
+
+/**
+ * \brief return true if the station user appointed cco
+ * \param
+ * \return
+ */
+bool
+cp_station_get_is_user_appointed_cco(void);
+
+/**
+ * Get the Handover in progress status.
+ *
+ * \param sta the station context
+ * \return the handover progress status.
+ */
+bool
+cp_station_get_hoip (cp_sta_t *sta);
+
+/**
+ * Set the Handover in progress status.
+ *
+ * \param sta context.
+ * \param hoip handover in progress.
+ */
+void
+cp_station_set_hoip(cp_sta_t *sta, uint hoip);
+
+/**
+ * get the rstbf flag
+ *
+ * \param sta the sta context.
+ */
+bool
+cp_station_get_rtsbf(cp_sta_t *sta);
+
+/**
+ * Set the sta rtsbf
+ *
+ * \param sta the station context
+ * \param rstbf the flag
+ */
+void
+cp_station_set_rtsbf (cp_sta_t *sta, bool rtsbf);
+
+/**
+ * Get the number of distant STAs
+ *
+ * \param sta the station context
+ * \return the number of distant stations
+ */
+u8
+cp_station_get_num_dis_sta(cp_sta_t *sta);
+
+/**
+ * Get number of distant networks.
+ *
+ * \param sta the sta context.
+ * \return the number of distant networks.
+ */
+u8
+cp_station_get_num_dis_net(cp_sta_t *sta);
+
+
+#endif /*STATION_DATA_H_*/
diff --git a/cesar/cp/station/inc/station_event_handler.h b/cesar/cp/station/inc/station_event_handler.h
new file mode 100644
index 0000000000..7d986d6183
--- /dev/null
+++ b/cesar/cp/station/inc/station_event_handler.h
@@ -0,0 +1,73 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/station/inc/event_handler.h
+ * \brief event handler for the fsm events
+ * \ingroup cp_station
+ */
+
+#ifndef EVENTHANDLER_H_
+#define EVENTHANDLER_H_
+
+
+#include "cp/msg/inc/msg_const.h"
+#include "cp/interf/inc/interf_types.h"
+#include "cp/vstate_fsm/src/SEMTypes.h"
+#include "cp/station/station.h"
+#include <cyg/kernel/kapi.h>
+
+#define EVENT_QUEUE_SIZE (INTERF_NB_BUFFER * 3)
+
+#if (INTERF_NB_BUFFER > EVENT_QUEUE_SIZE)
+ #error "event queue size too small."
+#endif
+
+
+typedef struct event_t
+{
+ SEM_EVENT_TYPE event_type;
+ VS_VOIDPTR mme_address;
+} event_t;
+
+typedef enum ev_err_code_t
+{
+ EV_OK = 0,
+ EV_QUEUE_FULL,
+ EV_QUEUE_EMPTY
+} ev_err_code_t;
+
+
+/**
+ * \brief initialize the event handler
+ * \param
+ * \return
+ */
+void
+cp_station_initialize_handler(void);
+
+/**
+ * \brief add an event to the event stack
+ * \param event_type : the event type. They are defined in main_fsmData.h
+ * \param mme_address : if necessary, pointer to a mme,
+ * or beacon address if the event is related to a beacon
+ * \return error code or 0 if success
+ */
+ev_err_code_t
+cp_station_add_event(const SEM_EVENT_TYPE event_type, const VS_VOIDPTR mme_address);
+
+/**
+ * \brief retrieve an event from the event stack
+ * \param event : the retieved event
+ * \return error code or 0 if success
+ */
+ev_err_code_t
+cp_station_get_event(event_t *event);
+
+
+
+#endif /*EVENTHANDLER_H_*/
diff --git a/cesar/cp/station/inc/station_types.h b/cesar/cp/station/inc/station_types.h
new file mode 100644
index 0000000000..512eb097dd
--- /dev/null
+++ b/cesar/cp/station/inc/station_types.h
@@ -0,0 +1,103 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/station/inc/station_types.h
+ * \brief main types and constantes of station module
+ * \ingroup cp_station
+ */
+#ifndef STA_TYPES_H_
+#define STA_TYPES_H_
+
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_arch.h>
+
+#include "SEMTypes.h"
+
+#include "cp/secu/inc/secu_types.h"
+
+/*
+ * station module constantes
+ */
+// the number of alarm that we can create
+#define ALARM_NB 20
+
+/*
+ * Homeplug AV constantes
+ */
+#define MinCCoScanTime_ms 1000
+#define MaxCCoScanTime_ms 2000
+#define MinScanTime_ms 2000
+#define MaxScanTime_ms 4000
+#define USAI_ms 1000
+#define MaxDiscoverPeriod_ms 10000
+#define LEASE_TIME_USTA 0xF // Table 11-212
+#define LEASE_TIME_AUTH_STA 0x0B40 // Table 11-212
+/*
+ * the event flags
+ * these are some flag, so take care to give a value with all bits set to 0 but one.
+ */
+typedef enum station_flag_t
+{
+ STATION_FLAG_MSG_RCV = 0x1, // the sta has received a mme (for sta or cco)
+ STATION_FLAG_BUF_REL = 0x2, // some buffer can be released
+ STATION_FLAG_FSM = 0x4, // some event are ready to be processed in the FSM
+ STATION_FLAG_USTT = 0x8
+ // TBC
+} station_flag_t;
+
+typedef enum station_status_t
+{
+ STATION_UNASSOCIATED,
+ STATION_ASSOCIATED,
+ STATION_AUTHENTICATED
+} cp_station_status_t;
+
+typedef struct station_event_t
+{
+ cyg_flag_value_t flag_value;
+ void (*func) (void);
+} station_event_t;
+
+typedef struct alarm_def_t
+{
+ bool alarm_used; // set to true if this alarm is used
+ cyg_alarm alarm;
+ cyg_handle_t alarm_handle;
+ cyg_flag_t *cyg_flag; // the wait-event handler
+ station_flag_t station_flag; // the flag to set
+ SEM_EVENT_TYPE event_type; // to set if the previous flag is == to STATION_FLAG_FSM
+} alarm_def_t;
+
+typedef struct station_t
+{
+ mac_address_t mac_address;
+ cyg_tick_count_t tei_lease_time; // date when the tei will expires
+ cyg_tick_count_t last_discover_beacon; // date of the last discover beacon received from this station
+ u8 cco_capa; // CCO capability of the station (0 : level 0, 1 : level 1 ...)
+ bool proxy_net_capa; // proxy networking capability of the station
+ cp_station_status_t station_status;
+ aes_key_t dak; // dak of the station
+} station_t;
+
+typedef struct u_station_t
+{
+ mac_address_t mac_address;
+ u8 cco_capa; // CCO capability of the station
+ nid_t nid; // expected nid of the u_sta
+} u_station_t;
+
+
+typedef struct avln_t
+{
+ nid_t nid; // nid of the avln
+ snid_t snid; // snid of the avln
+ station_t sta[THEORICAL_MAX_STA_NB]; // stations of the avln
+}avln_t;
+
+
+#endif /*STA_TYPES_H_*/
diff --git a/cesar/cp/station/maximus/Module b/cesar/cp/station/maximus/Module
new file mode 100644
index 0000000000..7c08fc98d1
--- /dev/null
+++ b/cesar/cp/station/maximus/Module
@@ -0,0 +1,5 @@
+SOURCES := maximus_cp_station.c
+MODULES := lib/visual_state_api hal/phy/maximus hal/leon/maximus hal/timer \
+ mac/common mac/ca mac/pbproc mac/sar \
+ hle cl \
+ cp/cco cp/beacon cp/interf cp/msg cp/secu cp/station cp/vstate_fsm
diff --git a/cesar/cp/station/maximus/inc/maximus_cp_station.h b/cesar/cp/station/maximus/inc/maximus_cp_station.h
new file mode 100644
index 0000000000..6290bdba61
--- /dev/null
+++ b/cesar/cp/station/maximus/inc/maximus_cp_station.h
@@ -0,0 +1,49 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus_cp_station.h
+ * \brief Declaration of Maximus function calls used for the station configuration
+ * \ingroup
+ */
+#ifndef cp_station_maximus_inc_maximus_cp_station_h
+#define cp_station_maximus_inc_maximus_cp_station_h
+
+#include "hal/phy/defs.h" // for 'PHY_CARRIER_NB'
+#include "host/fwd.h" // for 'station_ctx_t', 'fcall_ctx_t', and 'sci_msg_t',
+#include "host/fcall.h" // for 'fcall_param_t'
+
+// typedef unsigned char mac_address_t[6]; // defined in 'cp/cp_types.h'
+typedef bool cco_preference_t;
+typedef bool was_cco_t;
+typedef char npw_t[64];
+typedef char dpw_t[64];
+typedef char m_sta_hfid_t[64];
+typedef char u_sta_hfid_t[64];
+typedef char avln_hfid_t[64];
+typedef u8 sl_t;
+typedef u8 tonemask_t[(PHY_CARRIER_NB + 7) / 8];
+// typedef unsigned char snid_t; // defined in 'cp/cp_types.h'
+
+void maximus_cp_station_init (station_ctx_t *station);
+
+int maximus_set_mac_address (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data);
+int maximus_set_cco_preference (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data);
+int maximus_set_was_cco (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data);
+int maximus_set_npw (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data);
+int maximus_set_dpw (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data);
+int maximus_set_m_sta_hfid (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data);
+int maximus_set_u_sta_hfid (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data);
+int maximus_set_avln_hfid (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data);
+int maximus_set_sl (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data);
+int maximus_set_tonemask (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data);
+int maximus_set_snid (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data);
+
+int maximus_mac_start (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data);
+int maximus_mac_stop (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data);
+
+#endif /* cp_station_maximus_inc_maximus_cp_station_h */
diff --git a/cesar/cp/station/maximus/src/maximus_cp_station.c b/cesar/cp/station/maximus/src/maximus_cp_station.c
new file mode 100644
index 0000000000..5b8e961efa
--- /dev/null
+++ b/cesar/cp/station/maximus/src/maximus_cp_station.c
@@ -0,0 +1,535 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus_cp_station.c
+ * \brief Maximus function calls used for the station configuration
+ * \ingroup
+ */
+
+#include "common/std.h"
+
+#include "cp/beacon/beacons.h"
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/forward.h"
+
+#include "cp/station/maximus/inc/maximus_cp_station.h"
+#include "cp/station/inc/station_data.h" // for cp station functions
+#include "cp/station/inc/station_actions.h" // for process drv functions
+#include "cp/station/station.h" // for 'cp_station_mac_start()'
+#include "common/defs/ethernet.h" // for 'ETH_PACKET_MAX_SIZE'
+#include <stdio.h> // for 'sprintf()'
+#include <errno.h>
+
+char mme[ETH_PACKET_MAX_SIZE];
+
+void maximus_cp_station_init (station_ctx_t *station)
+{
+ dbg_assert_ptr(station);
+ if (NULL == station)
+ {
+ errno = EINVAL;
+ station_log(&my_station, STATION_LOG_ERROR, STATION_LOGTYPE_STATION,
+ "%s: errno = %d", __FUNCTION__, errno);
+ }
+ else
+ {
+ fcall_register(station->fcall, "maximus_set_mac_address", (void*)&maximus_set_mac_address, NULL);
+ fcall_register(station->fcall, "maximus_set_cco_preference", (void*)&maximus_set_cco_preference, NULL);
+ fcall_register(station->fcall, "maximus_set_was_cco", (void*)&maximus_set_was_cco, NULL);
+ fcall_register(station->fcall, "maximus_set_npw", (void*)&maximus_set_npw, NULL);
+ fcall_register(station->fcall, "maximus_set_dpw", (void*)&maximus_set_dpw, NULL);
+ fcall_register(station->fcall, "maximus_set_m_sta_hfid", (void*)&maximus_set_m_sta_hfid, NULL);
+ fcall_register(station->fcall, "maximus_set_u_sta_hfid", (void*)&maximus_set_u_sta_hfid, NULL);
+ fcall_register(station->fcall, "maximus_set_avln_hfid", (void*)&maximus_set_avln_hfid, NULL);
+ fcall_register(station->fcall, "maximus_set_sl", (void*)&maximus_set_sl, NULL);
+ fcall_register(station->fcall, "maximus_set_tonemask", (void*)&maximus_set_tonemask, NULL);
+ fcall_register(station->fcall, "maximus_set_snid", (void*)&maximus_set_snid, NULL);
+
+ fcall_register(station->fcall, "maximus_mac_start", (void*)&maximus_mac_start, NULL);
+ fcall_register(station->fcall, "maximus_mac_stop", (void*)&maximus_mac_stop, NULL);
+ }
+}
+
+
+int maximus_set_mac_address (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
+{
+ int ret = -1;
+ mac_address_t mac_address;
+ const unsigned short int mac_address_length = 6;
+ memset(mac_address, '\0', mac_address_length);
+
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "=> maximus_set_mac_address");
+
+ /* get parameters content */
+
+ if ( fcall_is_param(*param, *msg, "mac_address")
+ && (0 == fcall_param_bind(*param, *msg, "mac_address", mac_address_length, &mac_address)) )
+ {
+ /* do other tasks ... */
+ int i;
+ char buffer[STATION_MAX_LOG_SIZE];
+
+ sprintf(buffer, "mac address = 0x");
+ for (i=0; i<mac_address_length; i++)
+ {
+ sprintf(buffer, " %X", (unsigned short int)mac_address[i]);
+ }
+ sprintf(buffer, "\n");
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "%s", buffer);
+
+ cp_station_set_mac_address(NULL, mac_address);
+
+ ret = 0;
+ }
+
+ if ( fcall_is_param(*param, *msg, "mme")
+ && (0 == fcall_param_bind(*param, *msg, "mme", ETH_PACKET_MAX_SIZE, &mme)) )
+ {
+ /* do other tasks ... */
+ process_drv_set_mac_address((void *)mme);
+
+ ret = 0;
+ }
+
+ /* now make the return parameter list */
+ fcall_param_reset(*param);
+
+ return ret;
+}
+
+int maximus_set_cco_preference (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
+{
+ int ret = -1;
+ cco_preference_t cco_preference = false;
+
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "=> maximus_set_cco_preference");
+
+ /* get parameters content */
+
+ if ( fcall_is_param(*param, *msg, "cco_preference")
+ && (0 == fcall_param_bind(*param, *msg, "cco_preference", sizeof(cco_preference_t), &cco_preference)) )
+ {
+ /* do other tasks ... */
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "cco preference = %u\n", (unsigned short int)cco_preference);
+ //cp_station_set_cco_preference(cco_preference); // TBD
+
+ ret = 0;
+ }
+
+ if ( fcall_is_param(*param, *msg, "mme")
+ && (0 == fcall_param_bind(*param, *msg, "mme", ETH_PACKET_MAX_SIZE, &mme)) )
+ {
+ /* do other tasks ... */
+ process_drv_set_cco_preference((void *)&mme);
+
+ ret = 0;
+ }
+
+ /* now make the return parameter list */
+ fcall_param_reset(*param);
+
+ return ret;
+}
+
+int maximus_set_was_cco (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
+{
+ int ret = -1;
+ was_cco_t was_cco = false;
+
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "=> maximus_set_was_cco");
+
+ /* get parameters content */
+
+ if ( fcall_is_param(*param, *msg, "was_cco")
+ && (0 == fcall_param_bind(*param, *msg, "was_cco", sizeof(was_cco_t), &was_cco)) )
+ {
+ /* do other tasks ... */
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "previous cco status = %u\n", (unsigned short int)was_cco);
+ //cp_station_set_was_cco(was_cco); // TBD
+
+ ret = 0;
+ }
+
+ if ( fcall_is_param(*param, *msg, "mme")
+ && (0 == fcall_param_bind(*param, *msg, "mme", ETH_PACKET_MAX_SIZE, &mme)) )
+ {
+ /* do other tasks ... */
+ process_drv_set_was_cco((void *)&mme);
+
+ ret = 0;
+ }
+
+ /* now make the return parameter list */
+ fcall_param_reset(*param);
+
+ return ret;
+}
+
+int maximus_set_npw (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
+{
+ int ret = -1;
+ npw_t npw;
+ const unsigned short int npw_length = 65;
+ memset(npw, '\0', npw_length);
+
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "=> maximus_set_npw");
+
+ /* get parameters content */
+
+ if ( fcall_is_param(*param, *msg, "npw")
+ && (0 == fcall_param_bind(*param, *msg, "npw", npw_length, &npw)) )
+ {
+ /* do other tasks ... */
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "npw = %s\n", npw);
+ //cp_station_set_npw(npw); // TBD
+
+ ret = 0;
+ }
+
+ if ( fcall_is_param(*param, *msg, "mme")
+ && (0 == fcall_param_bind(*param, *msg, "mme", ETH_PACKET_MAX_SIZE, &mme)) )
+ {
+ /* do other tasks ... */
+ process_drv_set_npw((void *)&mme);
+
+ ret = 0;
+ }
+
+ /* now make the return parameter list */
+ fcall_param_reset(*param);
+
+ return ret;
+}
+
+int maximus_set_dpw (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
+{
+ int ret = -1;
+ dpw_t dpw;
+ const unsigned short int dpw_length = 65;
+ memset(dpw, '\0', dpw_length);
+
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "=> maximus_set_dpw");
+
+ /* get parameters content */
+
+ if ( fcall_is_param(*param, *msg, "dpw")
+ && (0 == fcall_param_bind(*param, *msg, "dpw", dpw_length, &dpw)) )
+ {
+ /* do other tasks ... */
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "dpw = %s\n", dpw);
+ //cp_station_set_dpw(dpw); // TBD
+
+ ret = 0;
+ }
+
+ if ( fcall_is_param(*param, *msg, "mme")
+ && (0 == fcall_param_bind(*param, *msg, "mme", ETH_PACKET_MAX_SIZE, &mme)) )
+ {
+ /* do other tasks ... */
+ process_drv_set_dpw_req((void *)&mme);
+
+ ret = 0;
+ }
+
+ /* now make the return parameter list */
+ fcall_param_reset(*param);
+
+ return ret;
+}
+
+int maximus_set_m_sta_hfid (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
+{
+ int ret = -1;
+ m_sta_hfid_t m_sta_hfid;
+ const unsigned short int m_sta_hfid_length = 65;
+ memset(m_sta_hfid, '\0', m_sta_hfid_length);
+
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "=> maximus_set_m_sta_hfid");
+
+ /* get parameters content */
+
+ if ( fcall_is_param(*param, *msg, "m_sta_hfid")
+ && (0 == fcall_param_bind(*param, *msg, "m_sta_hfid", m_sta_hfid_length, &m_sta_hfid)) )
+ {
+ /* do other tasks ... */
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "m_sta_hfid = %s\n", m_sta_hfid);
+ //cp_station_set_m_sta_hfid(m_sta_hfid); // TBD
+
+ ret = 0;
+ }
+
+ if ( fcall_is_param(*param, *msg, "mme")
+ && (0 == fcall_param_bind(*param, *msg, "mme", ETH_PACKET_MAX_SIZE, &mme)) )
+ {
+ /* do other tasks ... */
+ process_drv_set_m_sta_hfid((void *)&mme);
+
+ ret = 0;
+ }
+
+ /* now make the return parameter list */
+ fcall_param_reset(*param);
+
+ return ret;
+}
+
+int maximus_set_u_sta_hfid (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
+{
+ int ret = -1;
+ u_sta_hfid_t u_sta_hfid;
+ const unsigned short int u_sta_hfid_length = 65;
+ memset(u_sta_hfid, '\0', u_sta_hfid_length);
+
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "=> maximus_set_u_sta_hfid");
+
+ /* get parameters content */
+
+ if ( fcall_is_param(*param, *msg, "u_sta_hfid")
+ && (0 == fcall_param_bind(*param, *msg, "u_sta_hfid", u_sta_hfid_length, &u_sta_hfid)) )
+ {
+ /* do other tasks ... */
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "u_sta_hfid = %s\n", u_sta_hfid);
+ //cp_station_set_u_sta_hfid(u_sta_hfid); // TBD
+
+ ret = 0;
+ }
+
+ if ( fcall_is_param(*param, *msg, "mme")
+ && (0 == fcall_param_bind(*param, *msg, "mme", ETH_PACKET_MAX_SIZE, &mme)) )
+ {
+ /* do other tasks ... */
+ process_drv_set_u_sta_hfid((void *)&mme);
+
+ ret = 0;
+ }
+
+ /* now make the return parameter list */
+ fcall_param_reset(*param);
+
+ return ret;
+}
+
+int maximus_set_avln_hfid (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
+{
+ int ret = -1;
+ avln_hfid_t avln_hfid;
+ const unsigned short int avln_hfid_length = 65;
+ memset(avln_hfid, '\0', avln_hfid_length);
+
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "=> maximus_set_avln_hfid");
+
+ /* get parameters content */
+
+ if ( fcall_is_param(*param, *msg, "avln_hfid")
+ && (0 == fcall_param_bind(*param, *msg, "avln_hfid", avln_hfid_length, &avln_hfid)) )
+ {
+ /* do other tasks ... */
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "avln_hfid = %s\n", avln_hfid);
+ //cp_station_set_avln_hfid(avln_hfid); // TBD
+
+ ret = 0;
+ }
+
+ if ( fcall_is_param(*param, *msg, "mme")
+ && (0 == fcall_param_bind(*param, *msg, "mme", ETH_PACKET_MAX_SIZE, &mme)) )
+ {
+ /* do other tasks ... */
+ process_drv_set_avln_hfid((void *)&mme);
+
+ ret = 0;
+ }
+
+ /* now make the return parameter list */
+ fcall_param_reset(*param);
+
+ return ret;
+}
+
+int maximus_set_sl (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
+{
+ int ret = -1;
+ sl_t sl = '\0';
+
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "=> maximus_set_sl");
+
+ /* get parameters content */
+
+ if ( fcall_is_param(*param, *msg, "sl")
+ && (0 == fcall_param_bind(*param, *msg, "sl", sizeof(sl_t), &sl)) )
+ {
+ /* do other tasks ... */
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "sl = %u\n", (unsigned short int)sl);
+ //cp_station_set_sl(sl); // TBD
+
+ ret = 0;
+ }
+
+ if ( fcall_is_param(*param, *msg, "mme")
+ && (0 == fcall_param_bind(*param, *msg, "mme", ETH_PACKET_MAX_SIZE, &mme)) )
+ {
+ /* do other tasks ... */
+ process_drv_set_sl((void *)&mme);
+
+ ret = 0;
+ }
+
+ /* now make the return parameter list */
+ fcall_param_reset(*param);
+
+ return ret;
+}
+
+int maximus_set_tonemask (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
+{
+ int ret = -1;
+ tonemask_t tonemask;
+ const unsigned short int tonemask_length = (PHY_CARRIER_NB + 7) / 8;
+ memset(tonemask, '\0', tonemask_length);
+
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "=> maximus_set_tonemask");
+
+ /* get parameters content */
+
+ if ( fcall_is_param(*param, *msg, "tonemask")
+ && (0 == fcall_param_bind(*param, *msg, "tonemask", tonemask_length, &tonemask)) )
+ {
+ /* do other tasks ... */
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "tonemask = %s\n", tonemask);
+ //cp_station_set_tonemask(tonemask); // TBD
+
+ ret = 0;
+ }
+
+ if ( fcall_is_param(*param, *msg, "mme")
+ && (0 == fcall_param_bind(*param, *msg, "mme", ETH_PACKET_MAX_SIZE, &mme)) )
+ {
+ /* do other tasks ... */
+ process_drv_set_tonemask((void *)&mme);
+
+ ret = 0;
+ }
+
+ /* now make the return parameter list */
+ fcall_param_reset(*param);
+
+ return ret;
+}
+
+int maximus_set_snid (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
+{
+ int ret = -1;
+ snid_t snid = '\0';
+
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "=> maximus_set_snid");
+
+ /* get parameters content */
+
+ if ( fcall_is_param(*param, *msg, "snid")
+ && (0 == fcall_param_bind(*param, *msg, "snid", sizeof(snid_t), &snid)) )
+ {
+ /* do other tasks ... */
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "snid = %u\n", (unsigned short int)snid);
+ //cp_station_set_snid(snid); // TBD
+
+ ret = 0;
+ }
+
+ /* now make the return parameter list */
+ fcall_param_reset(*param);
+
+ return ret;
+}
+
+
+int maximus_mac_start (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
+{
+ int ret = -1;
+
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "=> maximus_mac_start");
+
+ /* get parameters content */
+
+ if (fcall_is_param(*param, *msg, "mme"))
+ {
+ if (0 == fcall_param_bind(*param, *msg, "mme", ETH_PACKET_MAX_SIZE, &mme))
+ {
+ /* do other tasks ... */
+ process_drv_start_mac_req((void *)mme);
+
+ ret = 0;
+ }
+ }
+ else
+ {
+ /* do other tasks ... */
+ cp_station_mac_start();
+
+ ret = 0;
+ }
+
+ /* now make the return parameter list */
+ fcall_param_reset(*param);
+
+ return ret;
+}
+
+int maximus_mac_stop (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
+{
+ int ret = -1;
+
+ station_log(&my_station, STATION_LOG_DEBUG, STATION_LOGTYPE_FCALL,
+ "=> maximus_mac_stop");
+
+ /* get parameters content */
+
+ if (fcall_is_param(*param, *msg, "mme"))
+ {
+ if (0 == fcall_param_bind(*param, *msg, "mme", ETH_PACKET_MAX_SIZE, &mme))
+ {
+ /* do other tasks ... */
+ //process_drv_stop_mac_req((void *)mme);
+
+ ret = 0;
+ }
+ }
+ else
+ {
+ /* do other tasks ... */
+ //cp_station_mac_stop();
+
+ ret = 0;
+ }
+
+ /* now make the return parameter list */
+ fcall_param_reset(*param);
+
+ return ret;
+}
diff --git a/cesar/cp/station/src/station_actions.c b/cesar/cp/station/src/station_actions.c
new file mode 100644
index 0000000000..ba0ec9a593
--- /dev/null
+++ b/cesar/cp/station/src/station_actions.c
@@ -0,0 +1,1261 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/station/src/station_events.c
+ * \brief the events generated in station module
+ * \ingroup cp_station
+ */
+
+#include "common/std.h"
+#include "cp/beacon/beacons.h"
+#include "cp/station/inc/station_actions.h"
+
+extern cp_sta_t cp_sta_global;
+
+extern int mme_buffer_count;
+extern int mme_buffer_first;
+extern int mme_buffer_last;
+extern u8 * mme_tx_buffer[MME_BUFFER_MAXCOUNT];
+
+/*
+void
+station_ustt_expires(void)
+{
+ printf("%u %s()\n", cyg_hal_sys_getpid(), __FUNCTION__);
+ sta_add_event(USTT_EXPIRES, NULL);
+}
+*/
+void
+transmit_unassoc_sta_mme(void)
+{
+ //printf("%u %s()\n", cyg_hal_sys_getpid(), __FUNCTION__);
+ msg_cm_unassociated_sta_ind_send(BROADCAST_MAC_AD);
+}
+
+void
+init_system (void)
+{
+// printf("%u %s()\n", cyg_hal_sys_getpid(), __FUNCTION__);
+}
+
+void
+launch_bbt_timer (void)
+{
+ bool sta_was_cco = false;
+ uint min_bbt, max_bbt, bbt;
+
+ //printf("%u %s()\n", cyg_hal_sys_getpid(), __FUNCTION__);
+ // TODO check if before the previous reboot the sta was CCO
+ // if yes, set sta_was_cco to true
+ // calculate the BBT
+ if (sta_was_cco)
+ {
+ min_bbt = MinCCoScanTime_ms;
+ max_bbt = MaxCCoScanTime_ms;
+ }
+ else
+ {
+ min_bbt = MinScanTime_ms;
+ max_bbt = MaxScanTime_ms;
+ }
+ bbt = rand_in(min_bbt, max_bbt);
+ dbg_assert( (bbt > MinCCoScanTime_ms) && (bbt < MaxScanTime_ms) );
+ // set the BBT timer
+ //printf("%u bbt = %i ms\n", cyg_hal_sys_getpid(), bbt);
+ cp_station_gen_timed_event(&station_flag, STATION_FLAG_FSM, BBT_EXPIRES, bbt);
+
+}
+
+uint rand_in(uint min, uint max)
+{
+ double tmp;
+
+ if(max)
+ {
+ dbg_assert(min < max);
+ tmp = rand_r( & station_seed);
+ tmp /= RAND_MAX;
+ tmp *= (max - min);
+ return (uint) (tmp + min);
+ }
+ else return rand_r( & station_seed);
+}
+
+void
+launch_beacon_timer (void)
+{
+ //printf("%u %s()\n", cyg_hal_sys_getpid(), __FUNCTION__);
+
+}
+void
+launch_ustt_timer (void)
+{
+ uint ustt;
+
+ //printf("%u %s()\n", cyg_hal_sys_getpid(), __FUNCTION__);
+
+ ustt = rand_in(0, USAI_ms);
+ // TODO si la station est USTA, ustt se choisit sur un autre intervalle
+ if(ustt < 10) ustt = 10; // tick is 10 ms
+ //printf("%u ustt = %i \n", cyg_hal_sys_getpid(), ustt);
+ dbg_assert(ustt < USAI_ms);
+ dbg_assert(ustt);
+ cp_station_gen_timed_event(&station_flag, STATION_FLAG_FSM, USTT_EXPIRES, ustt);
+
+}
+
+void
+station_bbt_expires(void) // see figure 7-76
+{
+ process_usta_result_t process_usta_result;
+
+ //printf("%u %s()\n", cyg_hal_sys_getpid(), __FUNCTION__);
+ // check the condition "NID match & Should become CCO"
+ if( (process_usta_result = cp_station_process_recorded_usta()) == BECOME_CCO)
+ {
+ cp_station_add_event(TO_CCO, NULL);
+ return;
+ }
+ if(process_usta_result == CHECK_EXISTING_OTHER_AVLN)
+ {
+ // no other AVLN has been detected, and no matching nid so become uCCO
+ // fire the transition anyway, it is protected with a positive state condition
+ cp_station_add_event(POND_TO_UCCO, NULL);
+ return;
+ }
+ // there are some matching nid or some other avln, so become usta
+ // fire the condition anyway but we know that it some case it will not fire
+ cp_station_add_event(TO_USTA, NULL);
+}
+
+VS_VOID
+record_usta_mme (VS_VOIDPTR mme_address)
+{
+ cm_unassociated_sta_t *cm_unassociated_sta;
+ msg_mme_t *msg_mme;
+
+ //printf("%u %s() mme_address = 0x%08lX\n", cyg_hal_sys_getpid(), __FUNCTION__, mme_address);
+ dbg_assert ( !msg_check_wrong_mme_const_values (mme_address));
+
+ msg_mme = mme_address;
+ cm_unassociated_sta = (cm_unassociated_sta_t *) &msg_mme->mm_entry;
+ cp_station_add_usta(msg_mme->osa, cm_unassociated_sta->cco_capability, cm_unassociated_sta->nid);
+}
+
+VS_VOID
+process_usta_mme (VS_VOIDPTR mme_address)
+{
+ cm_unassociated_sta_t *cm_unassociated_sta;
+ msg_mme_t *msg_mme;
+ process_usta_result_t process_usta_result;
+
+ //printf("%u %s()\n", cyg_hal_sys_getpid(), __FUNCTION__);
+ dbg_assert ( !msg_check_wrong_mme_const_values (mme_address));
+
+ msg_mme = mme_address;
+ cm_unassociated_sta = (cm_unassociated_sta_t *) &msg_mme->mm_entry;
+ process_usta_result = cp_station_process_usta(msg_mme->osa, cm_unassociated_sta->cco_capability, cm_unassociated_sta->nid);
+ if(process_usta_result == BECOME_CCO) cp_station_add_event(TO_CCO, NULL);
+}
+
+#define TRACE_FSM_STATE 1
+
+VS_VOID trace_cco (VS_VOID)
+{
+ cp_station_set_cco_status(true);
+#if TRACE_FSM_STATE
+ printf("%u station 0x%016llx is now CCO\n",cyg_hal_sys_getpid(),cp_sta_global.cp_sta_flash_params.mac_address);
+#endif
+}
+VS_VOID trace_pond (VS_VOID)
+{
+#if TRACE_FSM_STATE
+ printf("%u station 0x%016llx is now POND\n",cyg_hal_sys_getpid(),cp_sta_global.cp_sta_flash_params.mac_address);
+#endif
+}
+VS_VOID trace_sta (VS_VOID)
+{
+#if TRACE_FSM_STATE
+ printf("%u station 0x%016llx is now associated STA\n",cyg_hal_sys_getpid(),cp_sta_global.cp_sta_flash_params.mac_address);
+#endif
+}
+VS_VOID trace_ucco (VS_VOID)
+{
+#if TRACE_FSM_STATE
+ printf("%u station 0x%016llx is now UCCO\n",cyg_hal_sys_getpid(),cp_sta_global.cp_sta_flash_params.mac_address);
+#endif
+}
+VS_VOID trace_usta (VS_VOID)
+{
+#if TRACE_FSM_STATE
+ printf("%u station 0x%016llx is now USTA\n",cyg_hal_sys_getpid(),cp_sta_global.cp_sta_flash_params.mac_address);
+#endif
+}
+
+VS_VOID try_associate (VS_VOIDPTR beacon_address)
+{
+ beacon_t *beacon;
+
+ dbg_assert(beacon_address);
+ beacon = (beacon_t *) beacon_address;
+ // check if NID match
+ if(beacon->nid != cp_station_get_nid(NULL)) return; //TODO : pass CP ctx as first argument instead of NULL pointer...
+ // if yes, then we start the association procedure (see 7.3.2)
+ // first, send a cm_assoc.req to the cco
+ msg_cc_assoc_req_send(ZEROS_MAC_AD);
+}
+
+VS_VOID process_cc_assoc_req (VS_VOIDPTR mme_address)
+{ // 11.2.28
+ cc_assoc_req_t *cc_assoc_req;
+ msg_mme_t *msg_mme;
+ station_t sta;
+ tei_t tei, next_tei;
+ u16 lease_time_m = 0xF; // default lease time in minutes
+ u8 number_of_associated_sta;
+ unsigned int i;
+
+ dbg_assert ( !msg_check_wrong_mme_const_values (mme_address));
+ msg_mme = (msg_mme_t *) mme_address;
+ cc_assoc_req = (cc_assoc_req_t *) msg_mme->mm_entry;
+ // check if nid match
+ if(cc_assoc_req->nid != cp_station_get_nid(NULL)) return; //TODO : pass CP ctx as first argument instead of NULL pointer...
+ // check req_type
+ if(cc_assoc_req->req_type == 0)
+ {
+ // try to associate the new sta
+ sta.cco_capa = cc_assoc_req->cco_capability;
+ sta.last_discover_beacon = cyg_current_time();
+ sta.tei_lease_time = sta.last_discover_beacon + lease_time_m * MINUTES_TO_TICK_FACTOR;
+ memcpy(sta.mac_address, msg_mme->osa, sizeof(mac_address_t));
+ sta.proxy_net_capa = cc_assoc_req->proxy_networking_capability;
+ sta.station_status = STATION_ASSOCIATED;
+ tei = cp_station_associate_new(sta);
+ if( ! tei)
+ {
+ // we failed to associate the sta
+ msg_cc_assoc_cnf_send(msg_mme->osa, 1, 0, 0);
+ }
+ else
+ {
+ // we succed to associate the sta
+ msg_cc_assoc_cnf_send(msg_mme->osa, 0, tei, lease_time_m);
+ // send the message cc_set_tei_map.ind to the newly associated station
+ number_of_associated_sta = cp_station_get_number_of_assoc();
+ for(i=0 ; i<number_of_associated_sta ; i+= SET_TEI_MAP_SUB_NB_ELEM)
+ msg_cc_set_tei_map_ind_send(msg_mme->osa, 0, 0, i);
+ // and send cc_set_tei_map.ind in add mode to all other stations
+ // BEWARE, msg_cc_set_tei_map_ind_send() also use station_get_associate_info function
+ // and this may corrupt info
+ next_tei = cp_station_get_associate_info(&sta, true, 0);
+ for(i=1 ; i<number_of_associated_sta ; i++)
+ {
+ if(memcmp(sta.mac_address, msg_mme->osa, sizeof(mac_address_t)))
+ msg_cc_set_tei_map_ind_send(sta.mac_address, 1, tei, 0);
+ next_tei = cp_station_get_associate_info(&sta, false, next_tei);
+ }
+ }
+ return;
+ }
+ if(cc_assoc_req->req_type == 1)
+ {
+ // this is a TEI renewal
+ // calculate the new lease_time
+ if(sta.station_status == STATION_AUTHENTICATED)
+ lease_time_m = LEASE_TIME_AUTH_STA;
+ sta.tei_lease_time = cyg_current_time() + lease_time_m * MINUTES_TO_TICK_FACTOR;
+ // process the renew
+ tei = cp_station_renew(sta);
+ if( ! tei)
+ {
+ // we failed to renew the tei
+ msg_cc_assoc_cnf_send(msg_mme->osa, 1, 0, 0);
+ }
+ else
+ {
+ // we succed to associate the sta
+ msg_cc_assoc_cnf_send(msg_mme->osa, 0, tei, lease_time_m);
+ return;
+ }
+ }
+ // how can we be there ???
+ dbg_assert(0);
+}
+
+VS_VOID process_cc_assoc_cnf (VS_VOIDPTR mme_address)
+{
+ cc_assoc_cnf_t *cc_assoc_cnf;
+ msg_mme_t *msg_mme;
+
+ dbg_assert ( !msg_check_wrong_mme_const_values (mme_address));
+ msg_mme = (msg_mme_t *) mme_address;
+ cc_assoc_cnf = (cc_assoc_cnf_t *) msg_mme->mm_entry;
+ // check if nid match
+ if(cc_assoc_cnf->nid != cp_station_get_nid(NULL)) return; //TODO : pass CP ctx as first argument instead of NULL pointer...
+ // if yes, check the assoc result
+ if(cc_assoc_cnf->result == 0)
+ {
+ // association success
+ cp_station_set_tei(cc_assoc_cnf->sta_tei, cc_assoc_cnf->lease_time);
+ cp_station_add_event(TO_STA, NULL);
+ }
+ else
+ {
+ // et sinon quoi ?
+ // TODO
+ }
+}
+
+VS_VOID process_cc_set_tei_map_ind (VS_VOIDPTR mme_address)
+{
+ msg_mme_t *msg_mme;
+
+ dbg_assert ( !msg_check_wrong_mme_const_values (mme_address));
+ msg_mme = (msg_mme_t *) mme_address;
+ msg_cc_set_tei_map_ind_send(msg_mme->osa, 0, 0, 0);
+
+}
+
+VS_VOID
+process_cc_set_tei_map_req (VS_VOIDPTR mme_address)
+{//11.2.34
+ u8 i;
+ cc_set_tei_map_ind_t *cc_set_tei_map_ind;
+ msg_mme_t *msg_mme;
+ station_t sta;
+
+ dbg_assert ( !msg_check_wrong_mme_const_values (mme_address));
+ msg_mme = (msg_mme_t *) mme_address;
+ cc_set_tei_map_ind = (cc_set_tei_map_ind_t *) msg_mme->mm_entry;
+ switch(cc_set_tei_map_ind->mode)
+ {
+ case 0: // update entire sta list
+ cp_station_clear_assoc_sta_list();
+ // intentionaly no break here !!!
+ case 1: // add some new sta
+ for(i=0 ; i < cc_set_tei_map_ind->num ; i++)
+ {
+ sta.cco_capa = 0;
+ sta.last_discover_beacon = 0;
+ memcpy(sta.mac_address, cc_set_tei_map_ind->sub[i].mac_address, sizeof(mac_address_t));
+ sta.proxy_net_capa = 0;
+ if(cc_set_tei_map_ind->sub[i].status == 0x0)
+ sta.station_status = STATION_ASSOCIATED;
+ else sta.station_status = STATION_AUTHENTICATED;
+ sta.tei_lease_time = 0;
+ cp_station_associate_old(cc_set_tei_map_ind->sub[i].tei, sta);
+ }
+ break;
+ case 2: // remove sta from the list
+ for(i=0 ; i < cc_set_tei_map_ind->num ; i++)
+ {
+ cp_station_remove_associated(cc_set_tei_map_ind->sub[i].tei);
+ }
+ break;
+ }
+}
+
+
+VS_VOID
+send_discover_beacon_as_ucco (VS_VOID)
+{
+ // first, create and send a discover beacon
+#if 0
+ beacon_send_discover();
+#else
+ // TODO : call the right function dedicated to sending discover beacon,
+ // with right arguments (like the beacon context...)
+ cp_beacon_cco_send_discover_beacon (cp_sta_global.cp_beacon); // TODO : the pointer to beacon context should be
+ // an argument of the local send_discover_beacon_as_ucco() function...
+#endif
+ // then, launch the timer for the next beacon
+ cp_station_gen_timed_event(&station_flag, STATION_FLAG_FSM, UCCO_MAX_DISCOVER_EXPIRES, MaxDiscoverPeriod_s * 1000);
+}
+
+/**
+ * \brief Read and verify MME message header info.
+ *
+ * \param msg the MME message buffer
+ * \param recv_mme_header the pointer to structure where to copy header info extracted sequentially from MME message buffer
+ *
+ * \return size of header if valid header, else (-1)
+ */
+int read_mme_header(VS_VOIDPTR msg, mme_header_type *recv_mme_header)
+{
+ u8 *buf = (u8*)msg;
+ bitstream_t bstr_ctx;
+ int header_size = (-1); // by default, -1 indicates invalid header (not finding IEEE ETHERTYPE 0x88E1 pattern at expected offset or other invalid field)
+
+ diag_printf("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+
+ dbg_assert(msg);
+ dbg_assert(recv_mme_header);
+
+ //*(buf+12)=0x81; *(buf+13)=0x00; *(buf+14)=0x03; *(buf+15)=0x04;
+
+ /* decode whole header info, depending on "VLAN Tag" field is present or not */
+ bitstream_init(&bstr_ctx,(u8*)msg,MME_HEADER_MAXSIZE,BITSTREAM_READ);
+ memset(recv_mme_header,0x00,sizeof(*recv_mme_header));
+ bitstream_access(&bstr_ctx,&(recv_mme_header->un_osa.u64),48);
+ bitstream_access(&bstr_ctx,&(recv_mme_header->un_oda.u64),48);
+ /* see if "VLAN Tag" field is present or not... */
+ bitstream_access(&bstr_ctx,&(recv_mme_header->un_mtype.u32),16);
+ if ((big_to_cpuhost_endian_u32(recv_mme_header->un_mtype.u32) >> 16) == (u32)MSG_MTYPE_IEEE_ETHERTYPE)
+ {
+ // Header without "AVLN Tag' field (IEEE_ETHERTYPE value 0x88E1 found at "VLAN tag" field offset => no "VLAN Tag" field in this header)
+ printf("%u %s() : Header without AVLN Tag field...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ recv_mme_header->vlan_tag_flag = false;
+ header_size = MME_HEADER_MINSIZE;
+ }
+ else
+ {
+ // May be, Header with "AVLN Tag" field
+ printf("%u %s() : May be, Header with AVLN Tag field...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ recv_mme_header->vlan_tag_flag = true;
+ header_size = MME_HEADER_MAXSIZE;
+ // read last 16 bits of VLAN Tag field...
+ bitstream_access(&bstr_ctx,&(recv_mme_header->un_vlan_tag.u32),16);
+ // ... and recombine them with first 16 bits already read, ...
+ recv_mme_header->un_vlan_tag.u32 = (recv_mme_header->un_vlan_tag.u32 << 16) | recv_mme_header->un_mtype.u32;
+#if 0
+ printf("%u %s() : vlan_tag = 0x%04x\n",cyg_hal_sys_getpid(),__FUNCTION__,(u16)(big_to_cpuhost_endian_u32(recv_mme_header->un_vlan_tag.u32)>>16));
+#endif
+ // ... and then, verify the IEEE 802.1Q VLAN Tag pattern (0x8100) at the expected offset
+ if ((big_to_cpuhost_endian_u32(recv_mme_header->un_vlan_tag.u32)>>16) != (u32)MSG_VLAN_TAG_IEEE_802_1Q)
+ header_size = (-1);
+ // read the MTYPE field (16 bits)...
+ bitstream_access(&bstr_ctx,&(recv_mme_header->un_mtype.u32),16);
+ // ... and verify the IEEE ETHERTYPE pattern (0x88E1) at this offset...
+ if (big_to_cpuhost_endian_u32(recv_mme_header->un_mtype.u32) == (u32)MSG_MTYPE_IEEE_ETHERTYPE)
+ header_size = (-1);
+ }
+
+ bitstream_access(&bstr_ctx,&(recv_mme_header->un_mmv.u32),8);
+ // HP_AV section 11.1.5 : Implementations based on HomePlug AV specification Version 1.1
+ // shall discard all MMEs with MMV greater than 0x01
+ if (recv_mme_header->un_mmv.u32 > 1)
+ header_size = (-1);
+
+ bitstream_access(&bstr_ctx,&(recv_mme_header->un_mmtype.u32),16);
+ bitstream_access(&bstr_ctx,&(recv_mme_header->un_fmi.u32),16);
+ bitstream_finalise(&bstr_ctx);
+
+ big_to_cpuhost_endian(&(recv_mme_header->un_osa.b[0]),MAC_ADDR_SIZE);
+ big_to_cpuhost_endian(&(recv_mme_header->un_oda.b[0]),MAC_ADDR_SIZE);
+ big_to_cpuhost_endian(&(recv_mme_header->un_vlan_tag.b[0]),4);
+ big_to_cpuhost_endian(&(recv_mme_header->un_mtype.b[0]),2);
+ little_to_cpuhost_endian(&(recv_mme_header->un_mmtype.b[0]),4);
+
+ if (header_size != (-1))
+ printf
+ ("%u /* VALID MME HEADER (len = %u bytes) :\n",cyg_hal_sys_getpid(),header_size);
+ else
+ printf
+ ("%u /* INVALID MME HEADER :\n",cyg_hal_sys_getpid());
+
+ display_mme_header(recv_mme_header);
+
+ if (header_size == (-1))
+ {
+ printf ("%u /*\n",cyg_hal_sys_getpid());
+ printf ("%u /* => IGNORING THIS INVALID MESSAGE !\n",cyg_hal_sys_getpid());
+ printf ("%u /*\n",cyg_hal_sys_getpid());
+ }
+ return header_size;
+}
+
+/***
+ * \brief Dump MME specific payload data.
+ *
+ * \param buffer the MME message buffer
+ * \param mme_header_len the length of MME header
+ * \param mme_data_len the length of MME data
+ */
+void
+mme_payload_hexdump(u8 *buffer,int mme_header_len,int mme_data_len)
+{
+ int i, j;
+
+ j = 0;
+ printf("%u /* ",cyg_hal_sys_getpid());
+ for (i = 0; i < (mme_data_len / 16); i++)
+ {
+ for (j = 0; j < 16; j++) printf ("%02x.",buffer[mme_header_len+(i*16)+j]);
+ printf("\n");
+ printf("%u /* ",cyg_hal_sys_getpid());
+ }
+ for (i = 0; i < (mme_data_len % 16); i++)
+ {
+ printf ("%02x.",buffer[mme_header_len+(j*16)+i]);
+ }
+ printf("\n");
+}
+
+/***
+ * \brief Build and send a ".CNF" MME message.
+ *
+ * \param msg_ctx the incoming MME message context
+ * \param recv_mme_header the incoming MME header working data structure
+ * \param cnf_result the CNF result field value
+ * \param cnf_errcode the CNF error code field value
+ * \param send_mme_len pointer to result length of the MME to be sent
+ * \mme_tx_buffer buffer where to build the MME
+ */
+void
+build_and_send_cnf(msg_ctx_t *msg_ctx,
+ mme_header_type *recv_mme_header,
+ mme_drv_cnf_type *send_mme,
+ e_drv_mme_cnf_result cnf_result,
+ e_drv_mme_cnf_errcode cnf_errcode,
+ uint *send_mme_len,
+ u8 *mme_tx_buffer)
+{
+ mfs_tx_t *txmfs;
+ bool txmfs_added;
+
+ /* preparing answer to incoming MME */
+ cp_mme_build_cnf (recv_mme_header,
+ send_mme,
+ cnf_result,
+ cnf_errcode,
+ send_mme_len,
+ mme_tx_buffer,
+ &mme_buffer_first);
+
+ /* as we've finished to work with the buffer associated to received MME, free this buffer... */
+ printf("%u AVANT interface_mme_recv_done()...\n",cyg_hal_sys_getpid());
+ interface_mme_recv_done (cp_sta_global.interface, msg_ctx->cl_mme_data);
+ printf("%u APRES interface_mme_recv_done()...\n",cyg_hal_sys_getpid());
+
+ /* answer to initial OSA (sending the answer to incoming MME) */
+ if (msg_ctx->mfs == (mfs_rx_t *)NULL)
+ {
+ /* (answer = DRV MME ".CNF" for incoming DRV MME ".REQ") */
+ printf("%u AVANT interface_mme_send()...\n",cyg_hal_sys_getpid());
+ interface_mme_send (cp_sta_global.interface, mme_tx_buffer, *send_mme_len, NULL);
+ printf("%u APRES interface_mme_send()...\n",cyg_hal_sys_getpid());
+ }
+ else
+ {
+ /* (answer to other incoming MME) */
+ txmfs = mac_store_mfs_add_tx (cp_sta_global.mac_store, msg_ctx->mfs->common.bcast, true, msg_ctx->mfs->common.tei, MAC_LID_NONE, &txmfs_added);
+
+ /* Vérif MFS : assert si NULL (aucune MFS disponible !?) */
+ dbg_assert (txmfs);
+
+ interface_mme_send (cp_sta_global.interface, mme_tx_buffer, *send_mme_len, txmfs);
+ blk_release (txmfs);
+ blk_release (msg_ctx->mfs);
+ }
+ /* update buffer management data */
+ printf("%u ### AVANT liberation mme_buffer (first = %d ; last = %d ; count = %d) ###\n",
+ cyg_hal_sys_getpid(), mme_buffer_first, mme_buffer_last, mme_buffer_count);
+ mme_buffer_first = (mme_buffer_first + 1) % MME_BUFFER_MAXCOUNT;
+ mme_buffer_count--;
+ printf("%u ### APRES liberation mme_buffer (first = %d ; last = %d ; count = %d) ###\n",
+ cyg_hal_sys_getpid(), mme_buffer_first, mme_buffer_last, mme_buffer_count);
+}
+
+VS_VOID
+process_drv_set_mac_address (VS_VOIDPTR msg)
+{
+ msg_ctx_t *msg_ctx;
+ bitstream_t bstr_ctx;
+ mme_header_type recv_mme_header;
+ int mme_header_len;
+ uint pld_maxlen = MAC_ADDR_SIZE;
+ mme_drv_cnf_type send_mme;
+ uint send_mme_len;
+ e_drv_mme_cnf_result cnf_result;
+ e_drv_mme_cnf_errcode cnf_errcode;
+
+ diag_printf("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert(msg);
+ msg_ctx = (msg_ctx_t *)msg;
+
+ /* decode MME header */
+ mme_header_len = read_mme_header(msg_ctx->buffer,&recv_mme_header);
+
+ if (mme_header_len != (-1))
+ {
+ /* dump MME specific payload data */
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* MME PAYLOAD :\n",cyg_hal_sys_getpid());
+ mme_payload_hexdump(msg_ctx->buffer,mme_header_len,pld_maxlen);
+
+ /* decode MME specific payload data and prepare answer to incoming MME */
+ cnf_result = E_DRVMME_RESULT_SUCCESS;
+ cnf_errcode = 0 /*E_DRVMME_ERRCODE_BAD_PARAMETER*/;
+
+ bitstream_init(&bstr_ctx,((u8*)msg_ctx->buffer)+mme_header_len,pld_maxlen,BITSTREAM_READ);
+ cp_sta_global.cp_sta_flash_params.mac_address = 0;
+ bitstream_access(&bstr_ctx,&cp_sta_global.cp_sta_flash_params.mac_address,48);
+ bitstream_finalise(&bstr_ctx);
+#if 0
+ big_to_cpuhost_endian((u8 *)&cp_sta_global.cp_sta_flash_params.mac_address,MAC_ADDR_SIZE);
+ printf("%u /* @MAC ............ %02x:%02x:%02x:%02x:%02x:%02x (0x%016llx)\n",
+ cyg_hal_sys_getpid(),
+ (u8)(cp_sta_global.cp_sta_flash_params.mac_address >> 40),
+ (u8)(cp_sta_global.cp_sta_flash_params.mac_address >> 32),
+ (u8)(cp_sta_global.cp_sta_flash_params.mac_address >> 24),
+ (u8)(cp_sta_global.cp_sta_flash_params.mac_address >> 16),
+ (u8)(cp_sta_global.cp_sta_flash_params.mac_address >> 8),
+ (u8)(cp_sta_global.cp_sta_flash_params.mac_address ),
+ cp_sta_global.cp_sta_flash_params.mac_address
+ );
+#else
+ printf("%u /* @MAC ............ %02x:%02x:%02x:%02x:%02x:%02x (0x%016llx)\n",
+ cyg_hal_sys_getpid(),
+ (u8)(cp_sta_global.cp_sta_flash_params.mac_address ),
+ (u8)(cp_sta_global.cp_sta_flash_params.mac_address >> 8),
+ (u8)(cp_sta_global.cp_sta_flash_params.mac_address >> 16),
+ (u8)(cp_sta_global.cp_sta_flash_params.mac_address >> 24),
+ (u8)(cp_sta_global.cp_sta_flash_params.mac_address >> 32),
+ (u8)(cp_sta_global.cp_sta_flash_params.mac_address >> 40),
+ cp_sta_global.cp_sta_flash_params.mac_address
+ );
+#endif
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+
+ /* answer to incoming MME (acknowledge MME request) */
+ build_and_send_cnf(msg_ctx,
+ &recv_mme_header,
+ &send_mme,
+ cnf_result,
+ cnf_errcode,
+ &send_mme_len,
+ mme_tx_buffer[mme_buffer_first]);
+ }
+
+}
+
+VS_VOID
+process_drv_set_avln_hfid (VS_VOIDPTR msg)
+{
+ msg_ctx_t *msg_ctx;
+ bitstream_t bstr_ctx;
+ mme_header_type recv_mme_header;
+ int mme_header_len;
+ uint pld_maxlen = MAX_HFID_SIZE;
+ mme_drv_cnf_type send_mme;
+ uint send_mme_len;
+ e_drv_mme_cnf_result cnf_result;
+ e_drv_mme_cnf_errcode cnf_errcode;
+
+ diag_printf("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert(msg);
+ msg_ctx = (msg_ctx_t *)msg;
+
+ /* decode MME header */
+ mme_header_len = read_mme_header(msg_ctx->buffer,&recv_mme_header);
+
+ if (mme_header_len != (-1))
+ {
+ /* dump MME specific payload data */
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* MME PAYLOAD :\n",cyg_hal_sys_getpid());
+ mme_payload_hexdump(msg_ctx->buffer,mme_header_len,pld_maxlen);
+
+ /* decode MME specific payload data and prepare answer to incoming MME */
+ cnf_result = E_DRVMME_RESULT_SUCCESS;
+ cnf_errcode = 0 /*E_DRVMME_ERRCODE_BAD_PARAMETER*/;
+
+ strncpy(cp_sta_global.cp_sta_flash_params.avln_hfid,&msg_ctx->buffer[mme_header_len],MAX_HFID_SIZE);
+ cp_sta_global.cp_sta_flash_params.avln_hfid[MAX_HFID_SIZE] = '\0';
+ if (!check_password_or_hfid_is_valid(cp_sta_global.cp_sta_flash_params.avln_hfid,0,MAX_HFID_SIZE))
+ {
+ cnf_result = E_DRVMME_RESULT_FAILURE;
+ cnf_errcode = E_DRVMME_ERRCODE_INVALID_VALUE;
+ }
+
+ printf ("%u /* AVLN_HFID ....... %s\n",cyg_hal_sys_getpid(),cp_sta_global.cp_sta_flash_params.avln_hfid);
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+
+ /* answer to incoming MME (acknowledge MME request) */
+ build_and_send_cnf(msg_ctx,
+ &recv_mme_header,
+ &send_mme,
+ cnf_result,
+ cnf_errcode,
+ &send_mme_len,
+ mme_tx_buffer[mme_buffer_first]);
+ }
+
+}
+
+VS_VOID
+process_drv_set_cco_preference (VS_VOIDPTR msg)
+{
+ msg_ctx_t *msg_ctx;
+ bitstream_t bstr_ctx;
+ mme_header_type recv_mme_header;
+ int mme_header_len;
+ uint pld_maxlen = 1;
+ mme_drv_cnf_type send_mme;
+ uint send_mme_len;
+ e_drv_mme_cnf_result cnf_result;
+ e_drv_mme_cnf_errcode cnf_errcode;
+ u8 cco_pref;
+
+ diag_printf("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert(msg);
+ msg_ctx = (msg_ctx_t *)msg;
+
+ /* decode MME header */
+ mme_header_len = read_mme_header(msg_ctx->buffer,&recv_mme_header);
+
+ if (mme_header_len != (-1))
+ {
+ /* dump MME specific payload data */
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* MME PAYLOAD :\n",cyg_hal_sys_getpid());
+ mme_payload_hexdump(msg_ctx->buffer,mme_header_len,pld_maxlen);
+
+ /* decode MME specific payload data and prepare answer to incoming MME */
+ cnf_result = E_DRVMME_RESULT_SUCCESS;
+ cnf_errcode = 0 /*E_DRVMME_ERRCODE_BAD_PARAMETER*/;
+
+ bitstream_init(&bstr_ctx,((u8*)msg_ctx->buffer)+mme_header_len,pld_maxlen,BITSTREAM_READ);
+ bitstream_access(&bstr_ctx,&cco_pref,8);
+ bitstream_finalise(&bstr_ctx);
+
+ if (cco_pref == 0)
+ cp_sta_global.cp_sta_flash_params.cco_preference = false;
+ else if (cco_pref == 1)
+ cp_sta_global.cp_sta_flash_params.cco_preference = true;
+ else
+ {
+ cp_sta_global.cp_sta_flash_params.cco_preference = false;
+ cnf_result = E_DRVMME_RESULT_FAILURE;
+ cnf_errcode = E_DRVMME_ERRCODE_INVALID_VALUE;
+ }
+
+ printf ("%u /* preferred CCo ... %s\n",cyg_hal_sys_getpid(),get_str_yes_no(cp_sta_global.cp_sta_flash_params.cco_preference));
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+
+ /* answer to incoming MME (acknowledge MME request) */
+ build_and_send_cnf(msg_ctx,
+ &recv_mme_header,
+ &send_mme,
+ cnf_result,
+ cnf_errcode,
+ &send_mme_len,
+ mme_tx_buffer[mme_buffer_first]);
+ }
+
+}
+
+VS_VOID
+process_drv_set_dpw_req (VS_VOIDPTR msg)
+{
+ msg_ctx_t *msg_ctx;
+ bitstream_t bstr_ctx;
+ mme_header_type recv_mme_header;
+ int mme_header_len;
+ uint pld_maxlen = MAX_PWD_SIZE;
+ mme_drv_cnf_type send_mme;
+ uint send_mme_len;
+ e_drv_mme_cnf_result cnf_result;
+ e_drv_mme_cnf_errcode cnf_errcode;
+
+ diag_printf("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert(msg);
+ msg_ctx = (msg_ctx_t *)msg;
+
+ /* decode MME header */
+ mme_header_len = read_mme_header(msg_ctx->buffer,&recv_mme_header);
+
+ if (mme_header_len != (-1))
+ {
+ /* dump MME specific payload data */
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* MME PAYLOAD :\n",cyg_hal_sys_getpid());
+ mme_payload_hexdump(msg_ctx->buffer,mme_header_len,pld_maxlen);
+
+ /* decode MME specific payload data and prepare answer to incoming MME */
+ cnf_result = E_DRVMME_RESULT_SUCCESS;
+ cnf_errcode = 0 /*E_DRVMME_ERRCODE_BAD_PARAMETER*/;
+
+ strncpy(cp_sta_global.cp_sta_flash_params.dpw,&msg_ctx->buffer[mme_header_len],MAX_PWD_SIZE);
+ cp_sta_global.cp_sta_flash_params.dpw[MAX_PWD_SIZE] = '\0';
+ if (!check_password_or_hfid_is_valid(cp_sta_global.cp_sta_flash_params.dpw,0,MAX_PWD_SIZE))
+ {
+ cnf_result = E_DRVMME_RESULT_FAILURE;
+ cnf_errcode = E_DRVMME_ERRCODE_INVALID_VALUE;
+ }
+
+ printf ("%u /* DPW ............. %s\n",cyg_hal_sys_getpid(),cp_sta_global.cp_sta_flash_params.dpw);
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+
+ /* answer to incoming MME (acknowledge MME request) */
+ build_and_send_cnf(msg_ctx,
+ &recv_mme_header,
+ &send_mme,
+ cnf_result,
+ cnf_errcode,
+ &send_mme_len,
+ mme_tx_buffer[mme_buffer_first]);
+ }
+
+}
+
+VS_VOID
+process_drv_set_m_sta_hfid (VS_VOIDPTR msg)
+{
+ msg_ctx_t *msg_ctx;
+ bitstream_t bstr_ctx;
+ mme_header_type recv_mme_header;
+ int mme_header_len;
+ uint pld_maxlen = MAX_HFID_SIZE;
+ mme_drv_cnf_type send_mme;
+ uint send_mme_len;
+ e_drv_mme_cnf_result cnf_result;
+ e_drv_mme_cnf_errcode cnf_errcode;
+
+ diag_printf("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert(msg);
+ msg_ctx = (msg_ctx_t *)msg;
+
+ /* decode MME header */
+ mme_header_len = read_mme_header(msg_ctx->buffer,&recv_mme_header);
+
+ if (mme_header_len != (-1))
+ {
+ /* dump MME specific payload data */
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* MME PAYLOAD :\n",cyg_hal_sys_getpid());
+ mme_payload_hexdump(msg_ctx->buffer,mme_header_len,pld_maxlen);
+
+ /* decode MME specific payload data and prepare answer to incoming MME */
+ cnf_result = E_DRVMME_RESULT_SUCCESS;
+ cnf_errcode = 0 /*E_DRVMME_ERRCODE_BAD_PARAMETER*/;
+
+ strncpy(cp_sta_global.cp_sta_flash_params.m_sta_hfid,&msg_ctx->buffer[mme_header_len],MAX_HFID_SIZE);
+ cp_sta_global.cp_sta_flash_params.m_sta_hfid[MAX_HFID_SIZE] = '\0';
+ if (!check_password_or_hfid_is_valid(cp_sta_global.cp_sta_flash_params.m_sta_hfid,0,MAX_HFID_SIZE))
+ {
+ cnf_result = E_DRVMME_RESULT_FAILURE;
+ cnf_errcode = E_DRVMME_ERRCODE_INVALID_VALUE;
+ }
+
+ printf ("%u /* M_STA_HFID ...... %s\n",cyg_hal_sys_getpid(),cp_sta_global.cp_sta_flash_params.m_sta_hfid);
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+
+ /* answer to incoming MME (acknowledge MME request) */
+ build_and_send_cnf(msg_ctx,
+ &recv_mme_header,
+ &send_mme,
+ cnf_result,
+ cnf_errcode,
+ &send_mme_len,
+ mme_tx_buffer[mme_buffer_first]);
+ }
+
+}
+
+VS_VOID process_drv_set_nid (VS_VOIDPTR msg)
+{
+ diag_printf("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert(msg);
+
+}
+
+VS_VOID process_drv_set_npw (VS_VOIDPTR msg)
+{
+ msg_ctx_t *msg_ctx;
+ bitstream_t bstr_ctx;
+ mme_header_type recv_mme_header;
+ int mme_header_len;
+ uint pld_maxlen = MAX_PWD_SIZE;
+ mme_drv_cnf_type send_mme;
+ uint send_mme_len;
+ e_drv_mme_cnf_result cnf_result;
+ e_drv_mme_cnf_errcode cnf_errcode;
+
+ diag_printf("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert(msg);
+ msg_ctx = (msg_ctx_t *)msg;
+
+ /* decode MME header */
+ mme_header_len = read_mme_header(msg_ctx->buffer,&recv_mme_header);
+
+ if (mme_header_len != (-1))
+ {
+ /* dump MME specific payload data */
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* MME PAYLOAD :\n",cyg_hal_sys_getpid());
+ mme_payload_hexdump(msg_ctx->buffer,mme_header_len,pld_maxlen);
+
+ /* decode MME specific payload data and prepare answer to incoming MME */
+ cnf_result = E_DRVMME_RESULT_SUCCESS;
+ cnf_errcode = 0 /*E_DRVMME_ERRCODE_BAD_PARAMETER*/;
+
+ strncpy(cp_sta_global.cp_sta_flash_params.npw,&msg_ctx->buffer[mme_header_len],MAX_PWD_SIZE);
+ cp_sta_global.cp_sta_flash_params.npw[MAX_PWD_SIZE] = '\0';
+ if (!check_password_or_hfid_is_valid(cp_sta_global.cp_sta_flash_params.npw,MIN_NPW_SIZE,MAX_PWD_SIZE))
+ {
+ cnf_result = E_DRVMME_RESULT_FAILURE;
+ cnf_errcode = E_DRVMME_ERRCODE_INVALID_VALUE;
+ }
+
+ printf ("%u /* NPW ............. %s\n",cyg_hal_sys_getpid(),cp_sta_global.cp_sta_flash_params.npw);
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+
+ /* answer to incoming MME (acknowledge MME request) */
+ build_and_send_cnf(msg_ctx,
+ &recv_mme_header,
+ &send_mme,
+ cnf_result,
+ cnf_errcode,
+ &send_mme_len,
+ mme_tx_buffer[mme_buffer_first]);
+ }
+
+}
+
+VS_VOID process_drv_set_sl (VS_VOIDPTR msg)
+{
+ msg_ctx_t *msg_ctx;
+ bitstream_t bstr_ctx;
+ mme_header_type recv_mme_header;
+ int mme_header_len;
+ uint pld_maxlen = 1;
+ mme_drv_cnf_type send_mme;
+ uint send_mme_len;
+ e_drv_mme_cnf_result cnf_result;
+ e_drv_mme_cnf_errcode cnf_errcode;
+
+ diag_printf("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert(msg);
+ msg_ctx = (msg_ctx_t *)msg;
+
+ /* decode MME header */
+ mme_header_len = read_mme_header(msg_ctx->buffer,&recv_mme_header);
+
+ if (mme_header_len != (-1))
+ {
+ /* dump MME specific payload data */
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* MME PAYLOAD :\n",cyg_hal_sys_getpid());
+ mme_payload_hexdump(msg_ctx->buffer,mme_header_len,pld_maxlen);
+
+ /* decode MME specific payload data and prepare answer to incoming MME */
+ cnf_result = E_DRVMME_RESULT_SUCCESS;
+ cnf_errcode = 0 /*E_DRVMME_ERRCODE_BAD_PARAMETER*/;
+
+ if (msg_ctx->buffer[mme_header_len] <= 2)
+ cp_sta_global.cp_sta_flash_params.sl = msg_ctx->buffer[mme_header_len];
+ else
+ {
+ cp_sta_global.cp_sta_flash_params.sl = 0;
+ cnf_result = E_DRVMME_RESULT_FAILURE;
+ cnf_errcode = E_DRVMME_ERRCODE_INVALID_VALUE;
+ }
+ printf ("%u /* SL .............. %u\n",cyg_hal_sys_getpid(),cp_sta_global.cp_sta_flash_params.sl);
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+
+ /* answer to incoming MME (acknowledge MME request) */
+ build_and_send_cnf(msg_ctx,
+ &recv_mme_header,
+ &send_mme,
+ cnf_result,
+ cnf_errcode,
+ &send_mme_len,
+ mme_tx_buffer[mme_buffer_first]);
+ }
+
+}
+
+VS_VOID process_drv_set_snid (VS_VOIDPTR msg)
+{
+ diag_printf("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert(msg);
+
+}
+
+VS_VOID process_drv_set_tonemask (VS_VOIDPTR msg)
+{
+ msg_ctx_t *msg_ctx;
+ bitstream_t bstr_ctx;
+ mme_header_type recv_mme_header;
+ int mme_header_len;
+ uint pld_maxlen;
+ mme_drv_cnf_type send_mme;
+ uint send_mme_len;
+ e_drv_mme_cnf_result cnf_result;
+ e_drv_mme_cnf_errcode cnf_errcode;
+ u16 tonemask_offset;
+ u16 tonemask_length_in_bits;
+
+ diag_printf("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert(msg);
+ msg_ctx = (msg_ctx_t *)msg;
+
+ /* decode MME header */
+ mme_header_len = read_mme_header(msg_ctx->buffer,&recv_mme_header);
+
+ if (mme_header_len != (-1))
+ {
+ /* dump MME specific payload data */
+ pld_maxlen = 4 + (((msg_ctx->buffer[26] + (256 * msg_ctx->buffer[27])) + 7) / 8);
+
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* MME PAYLOAD :\n",cyg_hal_sys_getpid());
+ mme_payload_hexdump(msg_ctx->buffer,mme_header_len,pld_maxlen);
+
+ /* decode MME specific payload data and prepare answer to incoming MME */
+ cnf_result = E_DRVMME_RESULT_SUCCESS;
+ cnf_errcode = 0 /*E_DRVMME_ERRCODE_BAD_PARAMETER*/;
+
+ tonemask_offset = (u16)msg_ctx->buffer[mme_header_len]+256*(u16)msg_ctx->buffer[mme_header_len+1];
+ tonemask_length_in_bits = (u16)msg_ctx->buffer[mme_header_len+2]+256*(u16)msg_ctx->buffer[mme_header_len+3];
+ printf("%u /* tonemask cfg .... offset = %u ; length (in bits) = %u\n",
+ cyg_hal_sys_getpid(),
+ tonemask_offset,
+ tonemask_length_in_bits);
+ if ( ((tonemask_length_in_bits+7)/8) > TONEMASK_MAXSIZE)
+ {
+ cnf_result = E_DRVMME_RESULT_FAILURE;
+ cnf_errcode = E_DRVMME_ERRCODE_INVALID_VALUE;
+ }
+ printf ("%u /* tonemask ........ (see payload dump)\n",cyg_hal_sys_getpid());
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+
+ /* answer to incoming MME (acknowledge MME request) */
+ build_and_send_cnf(msg_ctx,
+ &recv_mme_header,
+ &send_mme,
+ cnf_result,
+ cnf_errcode,
+ &send_mme_len,
+ mme_tx_buffer[mme_buffer_first]);
+ }
+
+}
+
+VS_VOID process_drv_set_u_sta_hfid (VS_VOIDPTR msg)
+{
+ msg_ctx_t *msg_ctx;
+ bitstream_t bstr_ctx;
+ mme_header_type recv_mme_header;
+ int mme_header_len;
+ uint pld_maxlen = MAX_HFID_SIZE;
+ mme_drv_cnf_type send_mme;
+ uint send_mme_len;
+ e_drv_mme_cnf_result cnf_result;
+ e_drv_mme_cnf_errcode cnf_errcode;
+
+ diag_printf("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert(msg);
+ msg_ctx = (msg_ctx_t *)msg;
+
+ /* decode MME header */
+ mme_header_len = read_mme_header(msg_ctx->buffer,&recv_mme_header);
+
+ if (mme_header_len != (-1))
+ {
+ /* dump MME specific payload data */
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* MME PAYLOAD :\n",cyg_hal_sys_getpid());
+ mme_payload_hexdump(msg_ctx->buffer,mme_header_len,pld_maxlen);
+
+ /* decode MME specific payload data and prepare answer to incoming MME */
+ cnf_result = E_DRVMME_RESULT_SUCCESS;
+ cnf_errcode = 0 /*E_DRVMME_ERRCODE_BAD_PARAMETER*/;
+
+ strncpy(cp_sta_global.cp_sta_flash_params.u_sta_hfid,&msg_ctx->buffer[mme_header_len],MAX_HFID_SIZE);
+ cp_sta_global.cp_sta_flash_params.u_sta_hfid[MAX_HFID_SIZE] = '\0';
+ if (!check_password_or_hfid_is_valid(cp_sta_global.cp_sta_flash_params.u_sta_hfid,0,MAX_HFID_SIZE))
+ {
+ cnf_result = E_DRVMME_RESULT_FAILURE;
+ cnf_errcode = E_DRVMME_ERRCODE_INVALID_VALUE;
+ }
+
+ printf ("%u /* U_STA_HFID ...... %s\n",cyg_hal_sys_getpid(),cp_sta_global.cp_sta_flash_params.u_sta_hfid);
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+
+ /* answer to incoming MME (acknowledge MME request) */
+ build_and_send_cnf(msg_ctx,
+ &recv_mme_header,
+ &send_mme,
+ cnf_result,
+ cnf_errcode,
+ &send_mme_len,
+ mme_tx_buffer[mme_buffer_first]);
+ }
+
+}
+
+VS_VOID
+process_drv_set_was_cco (VS_VOIDPTR msg)
+{
+ msg_ctx_t *msg_ctx;
+ bitstream_t bstr_ctx;
+ mme_header_type recv_mme_header;
+ int mme_header_len;
+ uint pld_maxlen = 1;
+ mme_drv_cnf_type send_mme;
+ uint send_mme_len;
+ e_drv_mme_cnf_result cnf_result;
+ e_drv_mme_cnf_errcode cnf_errcode;
+ u8 was_cco;
+
+ diag_printf("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert(msg);
+ msg_ctx = (msg_ctx_t *)msg;
+
+ /* decode MME header */
+ mme_header_len = read_mme_header(msg_ctx->buffer,&recv_mme_header);
+
+ if (mme_header_len != (-1))
+ {
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* MME PAYLOAD :\n",cyg_hal_sys_getpid());
+ mme_payload_hexdump(msg_ctx->buffer,mme_header_len,pld_maxlen);
+
+ /* decode MME specific payload data and prepare answer to incoming MME */
+ cnf_result = E_DRVMME_RESULT_SUCCESS;
+ cnf_errcode = 0 /*E_DRVMME_ERRCODE_BAD_PARAMETER*/;
+
+ bitstream_init(&bstr_ctx,((u8*)msg_ctx->buffer)+mme_header_len,pld_maxlen,BITSTREAM_READ);
+ bitstream_access(&bstr_ctx,&was_cco,8);
+ bitstream_finalise(&bstr_ctx);
+
+ if (was_cco == 0)
+ cp_sta_global.cp_sta_flash_params.was_cco = false;
+ else if (was_cco == 1)
+ cp_sta_global.cp_sta_flash_params.was_cco = true;
+ else
+ {
+ cp_sta_global.cp_sta_flash_params.was_cco = false;
+ cnf_result = E_DRVMME_RESULT_FAILURE;
+ cnf_errcode = E_DRVMME_ERRCODE_INVALID_VALUE;
+ }
+
+ printf ("%u /* was CCo ......... %s\n",cyg_hal_sys_getpid(),get_str_yes_no(cp_sta_global.cp_sta_flash_params.was_cco));
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+
+ /* answer to incoming MME (acknowledge MME request) */
+ build_and_send_cnf(msg_ctx,
+ &recv_mme_header,
+ &send_mme,
+ cnf_result,
+ cnf_errcode,
+ &send_mme_len,
+ mme_tx_buffer[mme_buffer_first]);
+ }
+
+}
+
+VS_VOID process_drv_start_mac_req (VS_VOIDPTR msg)
+{
+ msg_ctx_t *msg_ctx;
+ mme_header_type recv_mme_header;
+ int mme_header_len;
+ uint pld_maxlen = 0;
+ mme_drv_cnf_type send_mme;
+ uint send_mme_len;
+ e_drv_mme_cnf_result cnf_result;
+ e_drv_mme_cnf_errcode cnf_errcode;
+ E_ErrCode ret;
+ int i;
+
+ diag_printf("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert(msg);
+ msg_ctx = (msg_ctx_t *)msg;
+
+ /* decode MME header */
+ mme_header_len = read_mme_header(msg_ctx->buffer,&recv_mme_header);
+
+ if (mme_header_len != (-1))
+ {
+ /* dump MME specific payload data */
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* MME PAYLOAD :\n",cyg_hal_sys_getpid());
+ mme_payload_hexdump(msg_ctx->buffer,mme_header_len,pld_maxlen);
+
+ /* decode MME specific payload data and prepare answer to incoming MME */
+ cnf_result = E_DRVMME_RESULT_SUCCESS;
+ cnf_errcode = 0 /*E_DRVMME_ERRCODE_BAD_PARAMETER*/;
+ /* (no MME specific payload data to decode)*/
+
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+
+ /* acknowledge MME request (acknowledge MME request) */
+ build_and_send_cnf(msg_ctx,
+ &recv_mme_header,
+ &send_mme,
+ cnf_result,
+ cnf_errcode,
+ &send_mme_len,
+ mme_tx_buffer[mme_buffer_first]);
+
+ /*
+ * TODO : init some cp_sta_secu_params parameters from flash parameters
+ * and then, we shall/can start...
+ */
+ ret = secu_npw2nmk(cp_sta_global.cp_sta_flash_params.npw, cp_sta_global.cp_sta_secu_params.nmk);
+ ret = secu_nmk2nid(cp_sta_global.cp_sta_secu_params.nmk, cp_sta_global.cp_sta_flash_params.sl, cp_sta_global.cp_sta_secu_params.nid);
+ memcpy(&cp_sta_global.nid,cp_sta_global.cp_sta_secu_params.nid,7);
+ //cp_sta_global.nid = cp_sta_global.nid >> 8;
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* STA params defined from NPW :\n",cyg_hal_sys_getpid());
+ printf ("%u /* NMK_HS .......... ",cyg_hal_sys_getpid());
+ for (i = 0; i < 16; i++) printf("%02x.",cp_sta_global.cp_sta_secu_params.nmk[i]);
+ printf ("\n");
+ printf ("%u /* NID ............. ",cyg_hal_sys_getpid());
+ for (i = 0; i < 7; i++) printf("%02x.",cp_sta_global.cp_sta_secu_params.nid[i]);
+ printf (" (0x%016llx)",cp_sta_global.nid);
+ printf ("\n");
+ }
+
+}
+
+VS_VOID process_drv_stop_mac_req (VS_VOIDPTR msg)
+{
+ msg_ctx_t *msg_ctx;
+ mme_header_type recv_mme_header;
+ int mme_header_len;
+ uint pld_maxlen = 0;
+ mme_drv_cnf_type send_mme;
+ uint send_mme_len;
+ e_drv_mme_cnf_result cnf_result;
+ e_drv_mme_cnf_errcode cnf_errcode;
+
+ diag_printf("%u %s()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ dbg_assert(msg);
+ msg_ctx = (msg_ctx_t *)msg;
+
+ /* decode MME header */
+ mme_header_len = read_mme_header(msg_ctx->buffer,&recv_mme_header);
+
+ if (mme_header_len != (-1))
+ {
+ /* dump MME specific payload data */
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+ printf ("%u /* MME PAYLOAD :\n",cyg_hal_sys_getpid());
+ mme_payload_hexdump(msg_ctx->buffer,mme_header_len,pld_maxlen);
+
+ /* decode MME specific payload data and prepare answer to incoming MME */
+ cnf_result = E_DRVMME_RESULT_SUCCESS;
+ cnf_errcode = 0 /*E_DRVMME_ERRCODE_BAD_PARAMETER*/;
+ /* (no MME specific payload data to decode)*/
+
+ printf ("%u /***************************************************/\n",cyg_hal_sys_getpid());
+
+ /* acknowledge MME request (acknowledge MME request) */
+ build_and_send_cnf(msg_ctx,
+ &recv_mme_header,
+ &send_mme,
+ cnf_result,
+ cnf_errcode,
+ &send_mme_len,
+ mme_tx_buffer[mme_buffer_first]);
+ }
+
+}
diff --git a/cesar/cp/station/src/station_apivs.c b/cesar/cp/station/src/station_apivs.c
new file mode 100644
index 0000000000..3a4df197da
--- /dev/null
+++ b/cesar/cp/station/src/station_apivs.c
@@ -0,0 +1,148 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/station/src/station_apivs.c
+ * \brief here are all the functions to control the visual state fsm
+ * \ingroup cp_station
+ */
+
+
+#include "common/std.h"
+
+#include "cp/beacon/inc/bentry.h"
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/forward.h"
+#include "cp/beacon/inc/beacons_work.h"
+
+#include "cp/station/inc/station_apivs.h"
+
+
+
+// Define SEM_CONTEXT storage
+static SEM_CONTEXT *pSEMContext;
+
+
+void
+cp_station_init_fsm(void)
+{
+ // Define completion code storage
+ unsigned char cc;
+
+ //printf("%s\n", __FUNCTION__);
+ // Initialize the VS System.
+ if ((cc = SMP_Connect(&pSEMContext, &main_fsm)) != SES_OKAY)
+ dbg_assert(0); // error handling
+ // Initialize all needed data
+ main_fsmSMP_InitAll(&pSEMContext);
+ // send the reset event to the fsm
+ if(cp_station_add_event(SE_RESET, NULL) != EV_OK) dbg_assert(0);
+}
+
+
+
+void
+cp_station_process_fsm_event(void)
+{
+ msg_ctx_t *msg_ctx;
+ event_t event;
+ // Define completion code storage
+ unsigned char cc;
+ // Define action expression variable.
+ SEM_ACTION_EXPRESSION_TYPE actionExpressNo;
+
+ dbg_assert(pSEMContext);
+ //printf("%s\n", __FUNCTION__);
+ // get the event from the handler
+ while(cp_station_get_event(&event) != EV_QUEUE_EMPTY)
+ {
+ //printf("event type : 0x%x\n", event.event_type);
+ // Deduct the event
+ if ((cc = main_fsmSMP_Deduct(pSEMContext, event.event_type, event.mme_address)) != SES_OKAY)
+ dbg_assert(0); // error handling
+ // Get resulting action expressions and execute them.
+ while ((cc = SMP_GetOutput(pSEMContext, &actionExpressNo)) == SES_FOUND)
+ {
+ //printf("SMP_GetOutput : context %i, mainVSaction %i, actionexpressno %i\n", pSEMContext, MainVSAction , actionExpressNo);
+ SMP_TableAction(pSEMContext, MainVSAction , actionExpressNo);
+ }
+ if (cc != SES_OKAY)
+ dbg_assert(0); // error handling
+ // Change the next state vector.
+ if ((cc = SMP_NextState(pSEMContext)) != SES_OKAY)
+ dbg_assert(0); // error handling
+ // finaly, free the message buffer (if ir exist)
+ if(event.mme_address)
+ {
+ msg_ctx = (msg_ctx_t *)event.mme_address;
+ //dbg_assert ( !msg_check_wrong_mme_const_values (event.mme_address));
+ dbg_assert ( !msg_check_wrong_mme_const_values ((msg_mme_t *)msg_ctx->buffer));
+#if 0
+ interf_release_buf(event.mme_address);
+#else
+ /* TODO : (re)faire le (bon) release ici ? ... */
+#endif
+ }
+ }
+}
+
+
+// this function is for test purpose only
+void
+cp_station_test_fsm(void)
+{
+/* msg_mme_t *msg;
+ msg_param_t msg_param;
+
+ msg = msg_sending_common_part("ABCEFG", &msg_param);
+
+
+ printf("start of fsm test\n");
+ // send the reset event to the fsm
+ if(sta_add_event(SE_RESET, NULL) != EV_OK) dbg_assert(0);
+ station_process_fsm_event();
+ station_print_fsm_states();
+ // send the USTA event to the fsm
+ if(sta_add_event(TO_USTA, NULL) != EV_OK) dbg_assert(0);
+ station_process_fsm_event();
+ station_print_fsm_states();
+ // set the fsm to UCCO
+ if(sta_add_event(BEACON_TIMER_EXPIRES, NULL) != EV_OK) dbg_assert(0);
+ station_process_fsm_event();
+ station_print_fsm_states();
+ // go to associated sta state
+ if(sta_add_event(SE_RESET, NULL) != EV_OK) dbg_assert(0);
+ if(sta_add_event(TO_STA, msg) != EV_OK) dbg_assert(0);
+ station_process_fsm_event();
+ station_print_fsm_states();
+ // go to CCO
+ if(sta_add_event(BECOME_BACKUP_CCO, NULL) != EV_OK) dbg_assert(0);
+ if(sta_add_event(BEACON_TIMER_EXPIRES, NULL) != EV_OK) dbg_assert(0);
+ station_process_fsm_event();
+ station_print_fsm_states();
+ */
+}
+
+
+// this function is for test purpose only
+void
+cp_station_print_fsm_states(void)
+{
+ SEM_STATE_MACHINE_TYPE i;
+ SEM_STATE_TYPE StateNo = STATE_UNDEFINED;
+
+ for (i = 0 ; i < VS_NOF_STATE_MACHINES ; i++)
+ {
+ if (SMP_State (pSEMContext, i, &StateNo) != SES_FOUND)
+ printf ("\nState machine is in undefined state\n");
+ else
+ printf ("%2d ; ", StateNo);
+ }
+ printf("\n");
+}
+
+
diff --git a/cesar/cp/station/src/station_core.c b/cesar/cp/station/src/station_core.c
new file mode 100644
index 0000000000..0e01c21721
--- /dev/null
+++ b/cesar/cp/station/src/station_core.c
@@ -0,0 +1,265 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/station/src/station_fsm.c
+ * \brief finite state machine and main loop of the thread station
+ * \ingroup cp_station
+ */
+
+#include "common/std.h"
+
+#include "cp/beacon/inc/bentry.h"
+
+#include "cp/beacon/beacons.h"
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/forward.h"
+#include "cp/beacon/inc/beacons_work.h"
+
+#include "cp/station/station.h"
+
+extern cp_sta_t cp_sta_global;
+
+/*
+ * global variables of station module
+ */
+// this is for the STA events
+cyg_flag_t station_flag;
+// the seed used for random numbers
+uint station_seed = 894;
+
+
+/*
+ * locale variables
+ */
+const station_event_t station_event[] =
+ {
+ { STATION_FLAG_MSG_RCV, interf_received },
+ { STATION_FLAG_BUF_REL, interf_buf_to_release },
+// { STATION_FLAG_USTT, station_ustt_expires},
+ //{ STATION_FLAG_PERIODIC_UNASSO, station_send_cm_unassoc_sta_mme_periodicaly },
+ //{ STATION_FLAG_MSG_RCV_STA, msg_dispatch}
+ { STATION_FLAG_FSM, cp_station_process_fsm_event}
+ };
+static alarm_def_t alarm_def[ALARM_NB];
+static cyg_mutex_t alarm_lock;
+// variable for counter and alarm
+cyg_handle_t real_time_counter;
+cyg_handle_t real_time_clock_handle;
+
+/*
+ * functions of station module
+ */
+
+void
+cp_station_init (mac_store_t *mac_store_ctx, cl_t *interf_cl_ctx, pbproc_t *pbproc_ctx, ca_t *ca_ctx)
+{
+ uint i;
+ // init the counter
+ real_time_clock_handle = cyg_real_time_clock();
+ cyg_clock_to_counter(real_time_clock_handle, &real_time_counter);
+ // 1) init the station module
+ // init the event
+ printf("%u %s() : AVANT cyg_flag_init()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ cyg_flag_init (&station_flag);
+ printf("%u %s() : APRES cyg_flag_init()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ // init the alarm
+ for(i=0 ; i<COUNT(alarm_def) ; i++)
+ alarm_def[i].alarm_used = false;
+ cyg_mutex_init( & alarm_lock);
+ // init the sta handler
+ cp_station_initialize_handler();
+ // initialize the station data
+ cp_station_data_init(mac_store_ctx, interf_cl_ctx, pbproc_ctx);
+
+ // TODO init station_seed
+ // wait 60 ms for some zero cross (to calculate network frequency)
+// #if DEBUG == 0
+// cyg_thread_delay (interf_ms_to_cyg_tick (60));
+// #endif
+ cp_station_init_fsm();
+ #if DEBUG == 0
+ // TODO remove the following function call when not in debug mode
+ cp_station_mac_start();
+ #endif
+}
+
+
+void
+cp_station_mac_start(void)
+{
+ /*
+ * before "executing" the MAC_START order, derive some internal station parameters
+ * from explicit station parameters obtained from the driver
+ */
+#if 0
+ /* TODO :
+ secu_npw2nmk(,,);
+ secu_nmk2nid(,);
+ */
+ /*
+ * init some cp_sta_secu_params parameters from flash parameters
+ * and then, we shall/can start...
+ */
+ ret = secu_npw2nmk(cp_sta_flash_params.npw, cp_sta_secu_params.nmk);
+ ret = secu_nmk2nid(cp_sta_secu_params.nmk, cp_sta_flash_params.sl, cp_sta_secu_params.nid);
+ printf("/***************************************************/\n");
+ printf("/* STA params defined from NPW :\n");
+ printf("/* NMK_HS .......... ");
+ for (i = 0; i < 16; i++) printf("%02x.",cp_sta_secu_params.nmk[i]);
+ printf("\n");
+ printf("/* NID ............. ");
+ for (i = 0; i < 7; i++) printf("%02x.",cp_sta_secu_params.nid[i]);
+ printf("\n");
+#endif
+
+ /* post the MAC_START order to the station event handler */
+ if(cp_station_add_event(RECEIVE_DRV_MAC_START_REQ, NULL) != EV_OK) dbg_assert(0);
+}
+
+
+void
+cp_station_wait_event (cyg_addrword_t data)
+{
+ cyg_flag_value_t flag_value, flag_mask;
+ uint i;
+
+#if DEBUG
+ printf("%u %s() : CP thread entry-point...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+#endif
+
+ //Power-Line frequency detection (50Hz or 60Hz)
+ printf("%u %s() : AVANT 1er acl_frequency()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ cp_beacon_acl_frequency_detection(cp_sta_global.cp_beacon);
+ printf("%u %s() : APRES 1er acl_frequency()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ cyg_thread_delay(2);
+ printf("%u %s() : AVANT 2em acl_frequency()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ cp_beacon_acl_frequency_detection(cp_sta_global.cp_beacon);
+ printf("%u %s() : APRES 2em acl_frequency()...\n",cyg_hal_sys_getpid(),__FUNCTION__);
+ printf("%u %s() : beacon period (in 25Mhz ticks) = %u\n",cyg_hal_sys_getpid(),__FUNCTION__,cp_sta_global.cp_beacon->pwl.bp_ntb);
+
+ // create the flag mask
+ flag_mask = 0;
+ for(i=0 ; i<COUNT(station_event) ; i++)
+ {
+ flag_mask |= station_event[i].flag_value;
+ }
+ // the infinite loop of the thread
+//#if DEBUG
+// printf("%u %s() : station ready and waiting for event (@station_flag=0x%08lx ; flag_mask=0x%08lx)...\n",cyg_hal_sys_getpid(),__FUNCTION__,(unsigned long)&station_flag,(unsigned long)flag_mask);
+//#endif
+ while (1)
+ {
+#if DEBUG
+ printf("%u %s() : station ready and waiting for event (@station_flag=0x%08lx ; flag_mask=0x%08lx)...\n",cyg_hal_sys_getpid(),__FUNCTION__,(unsigned long)&station_flag,(unsigned long)flag_mask);
+#endif
+ // wait for a station event
+ flag_value = cyg_flag_wait (&station_flag, flag_mask, CYG_FLAG_WAITMODE_OR );
+ printf("%u %s() : flag_value : %x\n",cyg_hal_sys_getpid(),__FUNCTION__,flag_value);
+ // process the event
+ for (i=0; i<COUNT (station_event) ; i++)
+ {
+ if (flag_value & station_event[i].flag_value)
+ {
+ // we find an event, so we clear it
+#if DEBUG
+ printf("%u %s() : we find an event (flag_value=0x%08lx ; flag_mask=0x%08lx)...\n",cyg_hal_sys_getpid(),__FUNCTION__,(unsigned long)flag_value,(unsigned long)flag_mask);
+#endif
+ cyg_flag_maskbits (&station_flag, ~station_event[i].flag_value);
+#if DEBUG
+ printf("%u %s() : ... so, we clear it before we treat it (station_flag=0x%08lx ; flag_mask=0x%08lx)...\n",cyg_hal_sys_getpid(),__FUNCTION__,(unsigned long)*((u32*)&station_flag),(unsigned long)flag_mask);
+#endif
+ // and then we process it
+ dbg_assert (station_event[i].func);
+ station_event[i].func ();
+ }
+ }
+ }
+}
+
+
+
+
+void
+cp_station_gen_timed_event(cyg_flag_t *cyg_flag, station_flag_t station_flag, SEM_EVENT_TYPE event_type, uint event_delay_ms)
+{
+ uint i;
+ cyg_tick_count_t trigger_time;
+
+ dbg_assert(cyg_flag);
+
+cyg_mutex_lock ( & alarm_lock);
+
+ // search for an available alarm
+ for(i=0 ; (i<COUNT(alarm_def)) && (alarm_def[i].alarm_used == true) ; i++);
+ dbg_assert(i<COUNT(alarm_def));
+ alarm_def[i].alarm_used = true;
+
+cyg_mutex_unlock ( & alarm_lock);
+
+ // create the alarm
+ alarm_def[i].cyg_flag = cyg_flag;
+ alarm_def[i].station_flag = station_flag;
+ alarm_def[i].event_type = event_type;
+ cyg_alarm_create ( real_time_counter,
+ cp_station_alarm_handler,
+ i,
+ & alarm_def[i].alarm_handle,
+ & alarm_def[i].alarm
+ );
+ // initialize the alarm
+ trigger_time = interf_ms_to_cyg_tick(event_delay_ms) + cyg_current_time();
+ cyg_alarm_initialize(alarm_def[i].alarm_handle, trigger_time, 0);
+ //printf("%u %s() : create alarm %i at %i\n",cyg_hal_sys_getpid(),__FUNCTION__, i, (int) cyg_current_time());
+}
+
+void
+cp_station_stop_timed_event(cyg_flag_t *cyg_flag, station_flag_t station_flag)
+{
+ uint i;
+
+cyg_mutex_lock ( & alarm_lock);
+
+ // search for the alarm to stop
+ for(i=0 ; i<COUNT(alarm_def) ; i++)
+ if( (alarm_def[i].cyg_flag == cyg_flag)
+ && (alarm_def[i].station_flag == station_flag) ) break;
+ if(i < COUNT(alarm_def))
+ {
+ cyg_alarm_disable(alarm_def[i].alarm_handle);
+ alarm_def[i].alarm_used = false;
+ cyg_flag_maskbits(cyg_flag, ~ station_flag);
+ //printf("%u %s() : delete alarm %i\n",cyg_hal_sys_getpid(),__FUNCTION__, i);
+ }
+
+cyg_mutex_unlock ( & alarm_lock);
+
+}
+
+void
+cp_station_alarm_handler(cyg_handle_t alarm, cyg_addrword_t data)
+// warning : this function is called in DSR context
+{
+ dbg_assert(data < COUNT(alarm_def));
+ dbg_assert(alarm_def[data].cyg_flag);
+
+cyg_mutex_lock ( & alarm_lock);
+
+ // release the alarm
+ alarm_def[data].alarm_used = false;
+ // generate the event
+ cyg_flag_setbits (alarm_def[data].cyg_flag, alarm_def[data].station_flag);
+ //printf("%u %s() : got event at %i\n",cyg_hal_sys_getpid(),__FUNCTION__, (int) cyg_current_time());
+ if(alarm_def[data].station_flag == STATION_FLAG_FSM)
+ {
+ cp_station_add_event(alarm_def[data].event_type, NULL);
+ }
+
+cyg_mutex_unlock ( & alarm_lock);
+
+}
+
diff --git a/cesar/cp/station/src/station_data.c b/cesar/cp/station/src/station_data.c
new file mode 100644
index 0000000000..97d947218c
--- /dev/null
+++ b/cesar/cp/station/src/station_data.c
@@ -0,0 +1,577 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/station/src/station_data.c
+ * \brief
+ * \ingroup cp_station
+ */
+
+#include "common/std.h"
+
+#include "cp/beacon/beacons.h"
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/forward.h"
+
+#include "cp/station/station.h"
+
+static avln_t m_avln[MAX_AVLN_NB];
+static u_station_t m_u_sta[MAX_AVLN_NB + MAX_STA_NB];
+static u8 m_tei;
+static u8 m_number_of_assoc_sta;
+static bool m_is_cco;
+
+mac_store_t *m_mac_store_ctx = NULL;
+cl_t *m_cl_ctx = NULL;
+pbproc_t *m_pbproc_ctx = NULL;
+
+
+/*
+cl_t *
+station_get_cl_ctx(void)
+{
+ return m_interf_cl_ctx;
+}
+
+mac_store_t *
+station_get_mac_store_ctx(void)
+{
+ return m_mac_store_ctx;
+}
+*/
+
+nid_t
+cp_station_get_nid(cp_sta_t *ctx)
+{
+#if 0
+ return m_avln[0].nid;
+#else
+ return ctx->nid;
+#endif
+}
+
+snid_t
+cp_station_get_snid(void)
+{
+ return m_avln[0].snid;
+}
+
+u8
+cp_station_get_cco_capa(void)
+{
+ return m_avln[0].sta[m_tei].cco_capa;
+}
+
+u8
+cp_station_get_number_of_assoc(void)
+{
+ return m_number_of_assoc_sta;
+}
+
+void
+cp_station_set_tei(const tei_t new_tei, const u16 lease_time)
+{
+ tei_t old_tei;
+ old_tei = m_tei;
+ m_tei = new_tei;
+ memcpy(&m_avln[0].sta[new_tei], &m_avln[0].sta[old_tei], sizeof(m_avln[0].sta[new_tei]));
+ m_avln[0].sta[new_tei].tei_lease_time = cyg_current_time() + lease_time * MINUTES_TO_TICK_FACTOR;
+}
+
+tei_t
+cp_station_get_tei(void *v)
+{
+ return m_tei;
+}
+
+void
+cp_station_set_mac_address(cp_sta_t *ctx, mac_address_t mac_address)
+{
+#if 0
+ memcpy(m_avln[0].sta[m_tei].mac_address, mac_address, sizeof(mac_address_t));
+#else
+ memcpy(&(ctx->cp_sta_flash_params.mac_address), mac_address, sizeof(mac_address_t));
+#endif
+}
+
+void
+cp_station_get_mac_address(cp_sta_t *ctx, mac_address_t *mac_address)
+{
+#if 0
+ memcpy(mac_address, &m_avln[0].sta[m_tei].mac_address, sizeof(mac_address_t));
+#else
+ memcpy(mac_address, &(ctx->cp_sta_flash_params.mac_address), sizeof(mac_address_t));
+#endif
+}
+
+void
+cp_station_clear_assoc_sta_list(void)
+{
+ memset(m_avln, 0, sizeof(m_avln));
+ m_number_of_assoc_sta = 0;
+}
+
+void
+cp_station_data_init(mac_store_t *mac_store_ctx, cl_t *interf_cl_ctx, pbproc_t *pbproc_ctx)
+{
+ //printf("%s\n", __FUNCTION__);
+ // erase the usta list
+ memset(m_u_sta, 0, sizeof(m_u_sta));
+ // erase the associated stations list
+ cp_station_clear_assoc_sta_list();
+ // set the tei to not attibuted
+ m_tei = 0;
+ m_is_cco = false;
+ m_mac_store_ctx = mac_store_ctx;
+ m_cl_ctx = interf_cl_ctx;
+ m_pbproc_ctx = pbproc_ctx;
+ // TODO remplir les champ nid et snid de m_avln[0]
+ // TODO remplir les champs cco_capa, etc de m_avln[0].sta[0]
+}
+
+void
+cp_station_add_usta(const mac_address_t mac_address, const u8 cco_capa, const nid_t nid)
+{
+ unsigned int i=0;
+
+ //printf("%s\n", __FUNCTION__);
+ // search for the first empty slot
+ while( (memcmp(m_u_sta[i].mac_address, ZEROS_MAC_AD, sizeof(mac_address_t)))
+ && (i<COUNT(m_u_sta)) )
+ i++;
+ // check if a slot was found
+ if(i == COUNT(m_u_sta))
+ {
+ dbg_assert(0);
+ return;
+ }
+ // if yes, fill the blank
+ m_u_sta[i].cco_capa = cco_capa;
+ memcpy(m_u_sta[i].mac_address, mac_address, sizeof(mac_address_t));
+ m_u_sta[i].nid = nid;
+}
+
+process_usta_result_t
+cp_station_process_recorded_usta(void)
+{
+ unsigned int i=0;
+ bool sta_matching_nid = false, become_cco = false;
+ process_usta_result_t process_usta_result;
+ // 7.4.1
+ //printf("%s\n", __FUNCTION__);
+ while( (memcmp(m_u_sta[i].mac_address, ZEROS_MAC_AD, sizeof(mac_address_t)))
+ && (i<COUNT(m_u_sta)) )
+ {
+ process_usta_result = cp_station_process_usta(m_u_sta[i].mac_address, m_u_sta[i].cco_capa, m_u_sta[i].nid);
+ if(process_usta_result == USTA_MATCHING_NID)
+ {
+ sta_matching_nid = true;
+ become_cco = false;
+ }
+ if( (process_usta_result == BECOME_CCO) && ( ! sta_matching_nid) )
+ {
+ become_cco = true;
+ }
+ i++;
+ }
+ if(become_cco) return BECOME_CCO;
+ if(sta_matching_nid) return USTA_MATCHING_NID;
+ return CHECK_EXISTING_OTHER_AVLN;
+}
+
+
+process_usta_result_t
+cp_station_process_usta(const mac_address_t mac_address, const u8 cco_capa, const nid_t nid)
+{
+ // check if the nid match
+ //printf("%s\n", __FUNCTION__);
+ if(nid == m_avln[0].nid)
+ {
+ // TODO : reply to the question : what if the station is
+ // user prefered cco but has lesser capability ???
+ // check if the other sta had better cco capability
+ if(cco_capa < m_avln[0].sta[m_tei].cco_capa)
+ {
+ return BECOME_CCO;
+ }
+ // if not, check if the other sta had same capability but upper mac adress
+ if( (cco_capa == m_avln[0].sta[m_tei].cco_capa)
+ && (memcmp(mac_address, m_avln[0].sta[m_tei].mac_address, sizeof(mac_address_t)) < 0) )
+ {
+ return BECOME_CCO;
+ }
+ // the other sta has matching nid, but we should not become cco
+ return USTA_MATCHING_NID;
+ }
+ return CHECK_EXISTING_OTHER_AVLN;
+}
+
+void
+cp_station_add_avln(const nid_t nid, const snid_t snid)
+{
+ int i;
+ //printf("%s\n", __FUNCTION__);
+ // search if the nid is already known
+ for(i=0 ; i<MAX_AVLN_NB ; i++)
+ {
+ if(m_avln[i].nid == nid) return;
+ }
+ // this is a new avln, add it to the list
+ // search for the first empty slot
+ for(i=0 ; i<MAX_AVLN_NB ; i++)
+ {
+ if( ! m_avln[i].nid)
+ {
+ m_avln[i].nid = nid;
+ m_avln[i].snid = snid;
+ return;
+ }
+ }
+ // we should never be here
+ dbg_assert(0);
+}
+
+tei_t
+cp_station_associate_new(const station_t sta)
+{
+ int i=1;
+
+ // check if the station is not already associated
+ while( memcmp(m_avln[0].sta[i].mac_address, sta.mac_address, sizeof(mac_address_t)) && (i<MAX_TEI))
+ {
+ i++;
+ }
+ if(i != MAX_TEI)
+ {
+ // the mac address is already associated
+ dbg_assert(0);
+ return 0;
+ }
+ i=1;
+ // search for a free tei
+ while( memcmp(m_avln[0].sta[i].mac_address, ZEROS_MAC_AD, sizeof(mac_address_t)) && (i<MAX_TEI))
+ {
+ i++;
+ }
+ if(i == MAX_TEI) return 0;
+ cp_station_associate_old(i, sta);
+ return i;
+}
+
+tei_t
+cp_station_renew(const station_t sta)
+{
+ int i = 1;
+
+ // check if the station is associated
+ while( memcmp(m_avln[0].sta[i].mac_address, sta.mac_address, sizeof(mac_address_t)) && (i<MAX_TEI))
+ {
+ i++;
+ }
+ if(i == MAX_TEI)
+ {
+ // the station is not associated
+ dbg_assert(0);
+ return 0;
+ }
+ m_avln[0].sta[i].tei_lease_time = sta.tei_lease_time;
+ return i;
+}
+
+void
+cp_station_associate_old(const tei_t tei, const station_t sta)
+{
+ // check if the slot is blank
+ if( ! memcmp(&m_avln[0].sta[tei].mac_address, ZEROS_MAC_AD, sizeof(mac_address_t)))
+ m_number_of_assoc_sta ++;
+ // add the station to the list
+ memcpy(&m_avln[0].sta[tei], &sta, sizeof(station_t));
+ // add the statio to the mac store
+ // TODO
+ //mac_store_sta_add (m_mac_store_ctx, tei);
+}
+
+void
+cp_station_remove_associated(const tei_t tei)
+{
+ // check if the slot is blank
+ if( ! memcmp(&m_avln[0].sta[tei].mac_address, ZEROS_MAC_AD, sizeof(mac_address_t)))
+ return;
+ // first, remove the station from the mac store
+
+ // then remove the station from the station_data
+ memset(&m_avln[0].sta[tei], 0, sizeof(station_t));
+ if(m_number_of_assoc_sta) m_number_of_assoc_sta --;
+
+
+}
+
+tei_t
+cp_station_get_associate_info(station_t *sta, const bool from_first, const tei_t tei)
+{
+ u8 i;
+ u8 station_pointer;
+
+ dbg_assert(sta);
+ if(from_first)
+ {
+ i = 1;
+ while( ! memcmp(m_avln[0].sta[i].mac_address, ZEROS_MAC_AD, sizeof(mac_address_t)) && (i<THEORICAL_MAX_STA_NB))
+ i++;
+ if(i == THEORICAL_MAX_STA_NB)
+ {
+ bzero(sta, sizeof(station_t));
+ return 0;
+ }
+ // we found a station
+ station_pointer = i+1;
+ memcpy(sta, & m_avln[0].sta[i], sizeof(station_t));
+ }
+ else
+ {
+ dbg_assert(tei);
+ dbg_assert( ! memcmp(m_avln[0].sta[i].mac_address, ZEROS_MAC_AD, sizeof(mac_address_t)));
+ memcpy(sta, & m_avln[0].sta[tei], sizeof(station_t));
+ station_pointer = tei+1;
+ }
+ i = station_pointer;
+ // search for the next sta to find
+ while( ! memcmp(m_avln[0].sta[i].mac_address, ZEROS_MAC_AD, sizeof(mac_address_t)) && (i<THEORICAL_MAX_STA_NB)) i++;
+ if(i == THEORICAL_MAX_STA_NB)
+ {
+ return 0;
+ }
+ // we found a station
+ return i;
+}
+
+tei_t
+cp_station_find_tei_from_mac(const mac_address_t mac_address)
+{
+ int i;
+ // check if the mac address is not the broadcast mac address
+ if( ! memcmp(mac_address, BROADCAST_MAC_AD, sizeof(mac_address_t))) return 0xFF;
+ // check if the mac address is unknown, and in this case use broadcast TEI
+ if( ! memcmp(mac_address, ZEROS_MAC_AD, sizeof(mac_address_t))) return 0xFF;
+ // TODO : what about multicast address ??
+ // search for the TEI of an unicast mac address
+ for(i=0 ; i<THEORICAL_MAX_STA_NB ; i++)
+ if( ! memcmp(mac_address, m_avln[0].sta[i].mac_address, sizeof(mac_address_t))) return i;
+ // if we did not find anything, return the tei broadcast
+ return 0xFF;
+}
+
+/**
+ * \brief set the association status of the station
+ * \param become_associated true to set station in associated station state
+ * \return
+ */
+VS_VOID
+cp_station_set_assoc_status (VS_BOOL become_associated)
+{
+ if(become_associated)
+ m_avln[0].sta[m_tei].station_status = STATION_ASSOCIATED;
+ else m_avln[0].sta[m_tei].station_status = STATION_UNASSOCIATED;
+}
+
+VS_BOOL
+cp_station_get_assoc_status (void)
+{
+ return (m_avln[0].sta[m_tei].station_status == STATION_ASSOCIATED) || (m_avln[0].sta[m_tei].station_status == STATION_AUTHENTICATED);
+}
+
+VS_BOOL
+cp_station_is_associated(cp_sta_t *ctx)
+{
+ return cp_station_get_assoc_status ();
+}
+
+
+cp_station_status_t
+cp_station_get_status(void)
+{
+ return m_avln[0].sta[m_tei].station_status;
+}
+
+/**
+ * \brief set the cco status of the station
+ * \param is_cco true if station is cco
+ * \return
+ */
+VS_VOID
+cp_station_set_cco_status(VS_BOOL is_cco)
+{
+ m_is_cco = is_cco;
+}
+
+bool
+cp_station_get_is_cco(void)
+{
+ return m_is_cco;
+}
+
+bool
+cp_station_get_pcco_capa(void)
+{
+ return m_avln[0].sta[m_tei].proxy_net_capa;
+}
+
+bool
+cp_station_get_backup_cco_capa(void)
+{
+ // TODO a changer quand la fonction est implémentée
+ return false;
+}
+
+/**
+ * \brief set the authentication status of the station
+ * \param become_authenticated true to set station in authenticated station state
+ * \return
+ */
+VS_VOID
+cp_station_set_auth_status (VS_BOOL become_authenticated)
+{
+ if(become_authenticated)
+ m_avln[0].sta[m_tei].station_status = STATION_AUTHENTICATED;
+ else m_avln[0].sta[m_tei].station_status = STATION_ASSOCIATED;
+}
+
+VS_BOOL
+cp_station_get_auth_status (void)
+{
+ return (m_avln[0].sta[m_tei].station_status == STATION_AUTHENTICATED);
+}
+
+VS_BOOL
+cp_station_is_authenticated(cp_sta_t *ctx)
+{
+ return cp_station_get_auth_status ();
+}
+
+bool
+cp_station_get_is_pco(void)
+{
+ // TODO a changer quand la fonction est implémentée
+ return false;
+}
+
+bool
+cp_station_get_is_backup_cco(void)
+{
+ // TODO a changer quand la fonction est implémentée
+ return false;
+}
+
+u16
+cp_station_get_num_discovered_sta(void)
+{
+ u16 count = 0, i, j;
+ for(i=0 ; i<MAX_AVLN_NB ; i++)
+ for(j=0 ; j<THEORICAL_MAX_STA_NB ; j++)
+ if(m_avln[i].sta[j].last_discover_beacon) count ++;
+ return count;
+}
+
+u16
+cp_station_get_num_discovered_avln(void)
+{
+ u16 count = 0, i;
+
+ for(i=0 ; i<MAX_AVLN_NB ; i++)
+ if(m_avln[i].snid) count++;
+ return count;
+}
+
+bool
+cp_station_get_is_user_appointed_cco(void)
+{
+ // TODO a changer quand la fonction est implémentée
+ return false;
+}
+
+/**
+ * Get the Handover in progress status.
+ *
+ * \param sta the station context
+ * \return the handover progress status.
+ */
+bool
+cp_station_get_hoip (cp_sta_t *sta)
+{
+ dbg_assert (sta);
+
+ return sta->hoip;
+}
+
+/**
+ * Set the Handover in progress status.
+ *
+ * \param sta context.
+ * \param hoip handover in progress.
+ */
+void
+cp_station_set_hoip(cp_sta_t *sta, uint hoip)
+{
+ dbg_assert (sta);
+
+ sta->hoip = hoip;
+}
+
+/**
+ * get the rstbf flag
+ *
+ * \param sta the sta context.
+ */
+bool
+cp_station_get_rtsbf(cp_sta_t *sta)
+{
+ dbg_assert (sta);
+
+ return sta->mac_config->rts_broadcast;
+}
+
+/**
+ * Set the sta rtsbf
+ *
+ * \param sta the station context
+ * \param rstbf the flag
+ */
+void
+cp_station_set_rtsbf (cp_sta_t *sta, bool rtsbf)
+{
+ dbg_assert (sta);
+ sta->mac_config->rts_broadcast = true;
+}
+
+/**
+ * Get the number of distant STAs
+ *
+ * \param sta the station context
+ * \return the number of distant stations
+ */
+u8
+cp_station_get_num_dis_sta(cp_sta_t *sta)
+{
+ dbg_assert (sta);
+
+ return sta->numDisSta;
+}
+
+/**
+ * Get number of distant networks.
+ *
+ * \param sta the sta context.
+ * \return the number of distant networks.
+ */
+u8
+cp_station_get_num_dis_net(cp_sta_t *sta)
+{
+ dbg_assert (sta);
+
+ return sta->numDisNet;
+}
+
diff --git a/cesar/cp/station/src/station_event_handler.c b/cesar/cp/station/src/station_event_handler.c
new file mode 100644
index 0000000000..a534a7d7c3
--- /dev/null
+++ b/cesar/cp/station/src/station_event_handler.c
@@ -0,0 +1,76 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}}
+ * \file cp/station/src/station_event_handler.c
+ * \brief a simple event handler
+ * \ingroup cp/station
+ *
+ */
+
+#include "common/std.h"
+
+#include "cp/beacon/beacons.h"
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/forward.h"
+
+#include "cp/station/inc/station_event_handler.h"
+
+
+static event_t events[EVENT_QUEUE_SIZE];
+static u32 head, tail;
+static cyg_mutex_t mutex_event;
+
+void
+cp_station_initialize_handler()
+{
+ tail = 0;
+ head = 1;
+ cyg_mutex_init(&mutex_event);
+}
+
+
+ev_err_code_t
+cp_station_add_event(const SEM_EVENT_TYPE event_type, const VS_VOIDPTR mme_address)
+{
+ msg_ctx_t *msg_ctx = (msg_ctx_t *)mme_address;
+ ev_err_code_t return_value = EV_QUEUE_FULL;
+
+ #if DEBUG
+ //if(mme_address) dbg_assert ( !msg_check_wrong_mme_const_values (mme_address));
+ if(mme_address) dbg_assert ( !msg_check_wrong_mme_const_values (msg_ctx->buffer));
+ #endif
+cyg_mutex_lock(&mutex_event);
+ if( ((head+1)%EVENT_QUEUE_SIZE) != tail)
+ {
+ events[head].event_type = event_type;
+ //events[head].mme_address = (VS_VOIDPTR) mme_address;
+ events[head].mme_address = (VS_VOIDPTR) msg_ctx;
+ head++;
+ head %= EVENT_QUEUE_SIZE;
+ return_value = EV_OK;
+ }
+cyg_mutex_unlock(&mutex_event);
+ // generate the event
+ cyg_flag_setbits (&station_flag, STATION_FLAG_FSM);
+ return return_value;
+}
+
+
+ev_err_code_t
+cp_station_get_event(event_t *event)
+{
+ if( ((tail+1)%EVENT_QUEUE_SIZE) != head)
+ {
+ tail++;
+ tail %= EVENT_QUEUE_SIZE;
+ event->event_type = events[tail].event_type;
+ event->mme_address = events[tail].mme_address;
+ return EV_OK;
+ }
+ return EV_QUEUE_EMPTY;
+}
+
diff --git a/cesar/cp/station/station.h b/cesar/cp/station/station.h
new file mode 100644
index 0000000000..dab1f204f6
--- /dev/null
+++ b/cesar/cp/station/station.h
@@ -0,0 +1,97 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/station/station.h
+ * \brief
+ * \ingroup cp_sta
+ */
+#ifndef CP_STATION_H_
+#define CP_STATION_H_
+
+#include <stdlib.h>
+
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_arch.h>
+
+#include "cp/interf/interf.h"
+#include "cp/station/inc/station_types.h"
+#include "cp/station/inc/station_apivs.h"
+#include "cp/station/inc/station_actions.h"
+#include "cp/station/inc/station_data.h"
+#include "cp/beacon/beacon.h"
+#include "cl/cl.h"
+#include "mac/common/store.h"
+
+/*
+ * some global variables
+ */
+
+extern uint station_seed;
+extern cyg_flag_t station_flag;
+
+
+/**
+ * \brief Init station module
+ * This is the cp entry point.
+ * \param
+ * \return
+ */
+void
+cp_station_init (mac_store_t *mac_store_ctx, cl_t *interf_cl_ctx, pbproc_t *pbproc_ctx, ca_t *ca_ctx);
+
+/**
+ * \brief start mac service
+ * \param
+ * \return
+ */
+void
+cp_station_mac_start(void);
+
+/**
+ * \brief wait for a station event
+ * \param
+ * \return
+ */
+void
+cp_station_wait_event (cyg_addrword_t data);
+
+/**
+ * \brief create an alarm that will generate an event after
+ * the specified delay
+ * \param cyg_flag : the event handle
+ * \param station_flag : the event flag
+ * \param event_delay_ms : the amount of time to wait
+ * \return
+ */
+void
+cp_station_gen_timed_event(cyg_flag_t *cyg_flag, station_flag_t station_flag, SEM_EVENT_TYPE event_type, uint event_delay_ms);
+
+/**
+ * \brief will stop an alarm previously created with station_gen_timed_event
+ *
+ * \param cyg_flag : the event handle
+ * \param station_flag : the event flag
+ * \return
+ */
+void
+cp_station_stop_timed_event(cyg_flag_t *cyg_flag, station_flag_t station_flag);
+
+
+/**
+ * \brief this function is called when the amount of time specified
+ * with station_wait_event() has elapsed.
+ * warning : this function is called in DSR context
+ *
+ * \param see ecos manual about alarm
+ * \return
+ */
+void
+cp_station_alarm_handler(cyg_handle_t alarm, cyg_addrword_t data);
+
+
+#endif /* CP_STATION_H_ */
diff --git a/cesar/cp/test/Makefile b/cesar/cp/test/Makefile
new file mode 100644
index 0000000000..840cb4033b
--- /dev/null
+++ b/cesar/cp/test/Makefile
@@ -0,0 +1,30 @@
+BASE = ../../
+
+ECOS = y
+
+INCLUDES = cp/test/overide/
+
+TARGET_PROGRAMS = UnitTestCP
+UnitTestCP_SOURCES = test_interf.c test_cp.c test_msg.c test_station.c test_secu.c test_conn.c
+UnitTestCP_MODULES = lib \
+ lib/visual_state_api \
+ cp/interf \
+ cp/msg \
+ cp/station \
+ cp/secu \
+ cp/vstate_fsm \
+ cp/beacon \
+ cp/conn \
+ cl \
+ mac/sar \
+ mac/common \
+ mac/pbproc \
+ mac/sar/bridgedma \
+
+
+
+
+mac_pbproc_MODULE_SOURCES = mfs.c
+cp_beacon_MODULE_SOURCES = beacon.c ntb_clock_sync.c
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/cp/test/ecos.ecc.sh b/cesar/cp/test/ecos.ecc.sh
new file mode 100644
index 0000000000..8253d98c9a
--- /dev/null
+++ b/cesar/cp/test/ecos.ecc.sh
@@ -0,0 +1,5 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new linux default
+cat >> $config <<EOF
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/cp/test/inc/test_conn.h b/cesar/cp/test/inc/test_conn.h
new file mode 100644
index 0000000000..6eff0cbd7f
--- /dev/null
+++ b/cesar/cp/test/inc/test_conn.h
@@ -0,0 +1,28 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/test/test_conn.h
+ * \brief Unit test for module conn
+ * \ingroup cp_test
+ */
+
+#ifndef conn__test__h
+#define conn__test__h
+
+#include <stdio.h>
+#include <string.h>
+
+#include "cp/cp_types.h"
+#include "cp/conn/conn.h"
+#include "cp/conn/inc/conn_priv.h"
+
+
+int conn_test (bool verbose);
+
+#endif
+
diff --git a/cesar/cp/test/inc/test_interf.h b/cesar/cp/test/inc/test_interf.h
new file mode 100644
index 0000000000..72a5455ed2
--- /dev/null
+++ b/cesar/cp/test/inc/test_interf.h
@@ -0,0 +1,29 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/test/test_interf.h
+ * \brief Unit test for module interf
+ * \ingroup cp_test
+ */
+
+#ifndef interf__test__h
+#define interf__test__h
+
+#include <stdio.h>
+#include <string.h>
+
+#include "cp/cp_types.h"
+#include "cp/interf/interf.h"
+#include "cp/interf/inc/interf_private.h"
+#include "cp/msg/msg.h"
+
+
+int interf_test (bool verbose);
+
+#endif
+
diff --git a/cesar/cp/test/inc/test_msg.h b/cesar/cp/test/inc/test_msg.h
new file mode 100644
index 0000000000..1fa18f4720
--- /dev/null
+++ b/cesar/cp/test/inc/test_msg.h
@@ -0,0 +1,27 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/test/test_msg.h
+ * \brief Unit tests for module MSG.
+ * \ingroup cp_test
+ */
+
+#ifndef messages__test__h
+#define messages__test__h
+
+#include <stdio.h>
+#include <string.h>
+
+#include "cp/msg/msg.h"
+#include "cp/cp_types.h"
+
+
+int msg_test (bool verbose);
+
+#endif
+
diff --git a/cesar/cp/test/inc/test_secu.h b/cesar/cp/test/inc/test_secu.h
new file mode 100644
index 0000000000..1dbb6bd180
--- /dev/null
+++ b/cesar/cp/test/inc/test_secu.h
@@ -0,0 +1,24 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/test/test_secu.h
+ * \brief Unit tests for module secu.
+ * \ingroup cp_test
+ */
+
+#ifndef secu__test__h
+#define secu__test__h
+
+#include <stdio.h>
+#include <string.h>
+
+#include "cp/secu/secu.h"
+
+int secu_test (bool verbose);
+
+#endif
diff --git a/cesar/cp/test/inc/test_station.h b/cesar/cp/test/inc/test_station.h
new file mode 100644
index 0000000000..71c1e4b81f
--- /dev/null
+++ b/cesar/cp/test/inc/test_station.h
@@ -0,0 +1,26 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/test/test_station.h
+ * \brief Unit tests for module station.
+ * \ingroup cp_test
+ */
+#ifndef TEST_STATION_H_
+#define TEST_STATION_H_
+
+#include "cp/station/station.h"
+#include "cp/station/inc/station_event_handler.h"
+#include "cp/msg/msg.h"
+
+#include <cyg/hal/hal_arch.h>
+
+
+int station_test (bool verbose);
+
+
+#endif /*TEST_STATION_H_*/
diff --git a/cesar/cp/test/overide/cp/cco/Module b/cesar/cp/test/overide/cp/cco/Module
new file mode 100644
index 0000000000..89eab437be
--- /dev/null
+++ b/cesar/cp/test/overide/cp/cco/Module
@@ -0,0 +1 @@
+SOURCES:=cco.c
diff --git a/cesar/cp/test/overide/cp/cco/cco.h b/cesar/cp/test/overide/cp/cco/cco.h
new file mode 100644
index 0000000000..0dcda62b01
--- /dev/null
+++ b/cesar/cp/test/overide/cp/cco/cco.h
@@ -0,0 +1,123 @@
+#ifndef cp_beacon_test_central_beacon_overide_cp_cco_cco_h
+#define cp_beacon_test_central_beacon_overide_cp_cco_cco_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/cco/cco.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+/** Foward declaration */
+typedef struct cp_cco_t cp_cco_t;
+
+cp_cco_t *
+cp_cco_init (void);
+
+void
+cp_cco_uninit (cp_cco_t *ctx);
+
+uint
+cp_cco_get_dt_av(cp_cco_t *ctx);
+
+void
+cp_coo_set_dt_av (cp_cco_t *ctx, uint dt_av);
+
+bool
+cp_cco_get_access(cp_cco_t *ctx);
+
+void
+cp_cco_set_access(cp_cco_t *ctx, bool access);
+
+bool
+cp_cco_get_ncnr (cp_cco_t *ctx);
+
+void
+cp_cco_set_ncnr (cp_cco_t *ctx, bool ncnr);
+
+bool
+cp_cco_get_npsm (cp_cco_t *ctx);
+
+void
+cp_cco_set_npsm (cp_cco_t *ctx, bool npsm);
+
+u8
+cp_cco_get_numslots (cp_cco_t *ctx);
+
+void
+cp_cco_set_numslots (cp_cco_t *ctx, u8 num_slots);
+
+u8
+cp_cco_get_slotusage (cp_cco_t *ctx);
+
+void
+cp_cco_set_slotusage (cp_cco_t *ctx, u8 slotusage);
+
+u8
+cp_cco_get_slot_id (cp_cco_t *ctx);
+
+void
+cp_cco_set_slot_id (cp_cco_t *ctx, u8 slot_id);
+
+u8
+cp_cco_get_aclss (cp_cco_t *ctx);
+
+void
+cp_cco_set_aclss (cp_cco_t *ctx, u8 aclss);
+
+u8
+cp_cco_get_nm (cp_cco_t *ctx);
+
+void
+cp_cco_set_nm (cp_cco_t *ctx, u8 nm);
+
+u8
+cp_cco_get_cco_cap (cp_cco_t *ctx);
+
+void
+cp_cco_set_cco_cap (cp_cco_t *ctx, u8 cco_cap);
+
+bool
+cp_cco_get_proxy_cap (cp_cco_t *ctx);
+
+void
+cp_cco_set_proxy_cap (cp_cco_t *ctx, bool proxy_cap);
+
+bool
+cp_cco_get_backup_cap (cp_cco_t *ctx);
+
+void
+cp_cco_set_backup_cap (cp_cco_t *ctx, bool backup_cap);
+
+bool
+cp_cco_get_cco_status (cp_cco_t *ctx);
+
+void
+cp_cco_set_cco_status (cp_cco_t *ctx, bool cco_status);
+
+bool
+cp_cco_get_pco_status(cp_cco_t *ctx);
+
+void
+cp_cco_set_pco_status(cp_cco_t *ctx, bool pco_status);
+
+bool
+cp_cco_get_backup_cco_status(cp_cco_t *ctx);
+
+void
+cp_cco_set_backup_cco_status(cp_cco_t *ctx, bool backup_cco_status);
+
+bool
+cp_cco_get_user_appointed_cco_status(cp_cco_t *ctx);
+
+void
+cp_cco_set_user_appointed_cco_status(cp_cco_t *ctx, bool ua_cco_status);
+
+#endif /* cp_beacon_test_central_beacon_overide_cp_cco_cco_h */
diff --git a/cesar/cp/test/overide/cp/cco/inc/context.h b/cesar/cp/test/overide/cp/cco/inc/context.h
new file mode 100644
index 0000000000..a503f02382
--- /dev/null
+++ b/cesar/cp/test/overide/cp/cco/inc/context.h
@@ -0,0 +1,46 @@
+#ifndef cp_beacon_test_central_beacon_overide_cp_cco_inc_context_h
+#define cp_beacon_test_central_beacon_overide_cp_cco_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/cco/inc/context.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+struct cp_cco_t
+{
+ BITFIELDS_WORD
+ (
+ uint dt_av:3;,
+ uint access:1;,
+ uint ncnr:1;,
+ uint npsm:1;,
+ uint num_slots:3;,
+ uint slot_usage:8;,
+ uint slotid:3;,
+ uint aclss:3;,
+ uint nm:2;,
+ uint cco_cap:2;,
+ uint proxy_cap:1;,
+ uint backup_cap:1;,
+ uint cco_status:1;,
+ uint pco_status:1;,
+ uint backup_cco:1;
+ );
+ BITFIELDS_WORD
+ (
+ uint nr:6;,
+ uint user_appointed_cco_status:1;,
+ uint rsvd:25;
+ );
+};
+
+#endif /* cp_beacon_test_central_beacon_overide_cp_cco_inc_context_h */
diff --git a/cesar/cp/test/overide/cp/cco/src/cco.c b/cesar/cp/test/overide/cp/cco/src/cco.c
new file mode 100644
index 0000000000..c793828138
--- /dev/null
+++ b/cesar/cp/test/overide/cp/cco/src/cco.c
@@ -0,0 +1,281 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/cco/src/cco.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "cp/cco/cco.h"
+#include "cp/cco/inc/context.h"
+
+static cp_cco_t cco;
+
+cp_cco_t *
+cp_cco_init (void)
+{
+ cco.dt_av = 0x0;
+ cco.access = 0x0;
+ cco.ncnr = 0x0;
+ cco.npsm = 0x0;
+ cco.num_slots = 0x1;
+ cco.slot_usage = 0x1;
+ cco.slotid = 0x0;
+ cco.aclss = 0x1;
+ cco.nm = 0x2;
+ cco.cco_cap = 0x0;
+ cco.proxy_cap = 0;
+ cco.backup_cap = 0;
+ cco.cco_status = 0;
+ cco.pco_status = 0;
+ cco.backup_cco = 0;
+ cco.nr = 0;
+ cco.user_appointed_cco_status = 0;
+ cco.rsvd = 0;
+
+ return &cco;
+}
+
+void
+cp_cco_uninit (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+}
+
+uint
+cp_cco_get_dt_av(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->dt_av;
+}
+
+void
+cp_coo_set_dt_av (cp_cco_t *ctx, uint dt_av)
+{
+ dbg_assert (ctx);
+ ctx->dt_av = dt_av;
+}
+
+bool
+cp_cco_get_access(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->access;
+}
+
+void
+cp_cco_set_access(cp_cco_t *ctx, bool access)
+{
+ dbg_assert (ctx);
+
+ ctx->access = access;
+}
+
+bool
+cp_cco_get_ncnr (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->ncnr;
+}
+
+void
+cp_cco_set_ncnr (cp_cco_t *ctx, bool ncnr)
+{
+ dbg_assert (ctx);
+ ctx->ncnr = ncnr;
+}
+
+bool
+cp_cco_get_npsm (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->npsm;
+}
+
+void
+cp_cco_set_npsm (cp_cco_t *ctx, bool npsm)
+{
+ dbg_assert (ctx);
+ ctx->npsm = npsm;
+}
+
+u8
+cp_cco_get_numslots (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->num_slots;
+}
+
+void
+cp_cco_set_numslots (cp_cco_t *ctx, u8 num_slots)
+{
+ dbg_assert (ctx);
+ ctx->num_slots = num_slots;
+}
+
+u8
+cp_cco_get_slotusage (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->slot_usage;
+}
+
+void
+cp_cco_set_slotusage (cp_cco_t *ctx, u8 slotusage)
+{
+ dbg_assert (ctx);
+ ctx->slot_usage = slotusage;
+}
+
+u8
+cp_cco_get_slot_id (cp_cco_t *cco)
+{
+ dbg_assert (cco);
+ return cco->slotid;
+}
+
+void
+cp_cco_set_slot_id (cp_cco_t *ctx, u8 slot_id)
+{
+ dbg_assert (ctx);
+ ctx->slotid = slot_id;
+}
+
+u8
+cp_cco_get_aclss (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->aclss;
+}
+
+void
+cp_cco_set_aclss (cp_cco_t *ctx, u8 aclss)
+{
+ dbg_assert (ctx);
+ ctx->aclss = aclss;
+}
+
+u8
+cp_cco_get_nm (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->nm;
+}
+
+void
+cp_cco_set_nm (cp_cco_t *ctx, u8 nm)
+{
+ dbg_assert (ctx);
+ ctx->nm = nm;
+}
+
+u8
+cp_cco_get_cco_cap (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->cco_cap;
+}
+
+void
+cp_cco_set_cco_cap (cp_cco_t *ctx, u8 cco_cap)
+{
+ dbg_assert (ctx);
+ ctx->cco_cap = cco_cap;
+}
+
+bool
+cp_cco_get_proxy_cap (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->proxy_cap;
+}
+
+void
+cp_cco_set_proxy_cap (cp_cco_t *ctx, bool proxy_cap)
+{
+ dbg_assert (ctx);
+ ctx->proxy_cap = proxy_cap;
+}
+
+bool
+cp_cco_get_backup_cap (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->backup_cap;
+}
+
+void
+cp_cco_set_backup_cap (cp_cco_t *ctx, bool backup_cap)
+{
+ dbg_assert (ctx);
+ ctx->backup_cap = backup_cap;
+}
+
+bool
+cp_cco_get_cco_status (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->cco_status;
+}
+
+void
+cp_cco_set_cco_status (cp_cco_t *ctx, bool cco_status)
+{
+ dbg_assert (ctx);
+ ctx->cco_status = cco_status;
+}
+
+bool
+cp_cco_get_pco_status(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->pco_status;
+}
+
+void
+cp_cco_set_pco_status(cp_cco_t *ctx, bool pco_status)
+{
+ dbg_assert(ctx);
+ ctx->pco_status = pco_status;
+}
+
+bool
+cp_cco_get_backup_cco_status(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->backup_cco;
+}
+
+void
+cp_cco_set_backup_cco_status(cp_cco_t *ctx, bool backup_cco_status)
+{
+ dbg_assert (ctx);
+ ctx->backup_cco = backup_cco_status;
+}
+
+bool
+cp_cco_get_user_appointed_cco_status(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->user_appointed_cco_status;
+}
+
+void
+cp_cco_set_user_appointed_cco_status(cp_cco_t *ctx, bool ua_cco_status)
+{
+ dbg_assert (ctx);
+ ctx->user_appointed_cco_status = ua_cco_status;
+}
+
diff --git a/cesar/cp/test/src/test_conn.c b/cesar/cp/test/src/test_conn.c
new file mode 100644
index 0000000000..074458f969
--- /dev/null
+++ b/cesar/cp/test/src/test_conn.c
@@ -0,0 +1,69 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/test/test_conn.c
+ * \brief unit tests for conn module
+ * \ingroup cp_test
+ */
+
+#include "common/std.h"
+#include "cp/test/inc/test_conn.h"
+
+/*
+ * Test de void interf_init(void);
+ */
+int cp_conn_init_test (void)
+{
+ cp_conn_init ();
+ return 0;
+}
+
+/*
+ * test de cp_conn_cid_2_index(u16 cid)
+ */
+int
+cp_conn_cid_2_index_test(void)
+{
+ if(cp_conn_cid_2_index(0) != 0) return 1;
+ if(cp_conn_cid_2_index(0xFF00) != 0x00FF) return 2;
+ return 0;
+}
+
+
+struct interf_test_t
+{
+ int(*func) (void);
+ char func_name[30];
+};
+
+int
+conn_test (bool verbose)
+{
+ unsigned int i;
+ int res, return_value = 0;
+ struct interf_test_t my_test[]=
+ {
+ { cp_conn_init_test, "cp_conn_init" },
+ { cp_conn_cid_2_index_test, "cp_conn_cid_2_index" }
+ };
+
+ printf ("test du module conn\n");
+ for (i=0 ; i<COUNT(my_test) ; i++)
+ {
+ res = my_test[i].func ();
+ if(verbose || (res != 0))
+ {
+ printf (" %-50s", my_test[i].func_name);
+ if (res == 0) printf ("OK\n");
+ else printf ("FAILED : %i\n", res);
+ }
+ if(res != 0) return_value++;
+ }
+ if (i != COUNT(my_test)) return 1;
+ return return_value;
+}
diff --git a/cesar/cp/test/src/test_cp.c b/cesar/cp/test/src/test_cp.c
new file mode 100644
index 0000000000..34bc7998a5
--- /dev/null
+++ b/cesar/cp/test/src/test_cp.c
@@ -0,0 +1,91 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/test/test_cp.c
+ * \brief main entry to launch all cp unit tests
+ * \ingroup cp_test
+ *
+ */
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/kernel/kapi.h>
+
+#include "common/std.h"
+
+#include "cp/test/inc/test_secu.h"
+#include "cp/test/inc/test_msg.h"
+#include "cp/test/inc/test_interf.h"
+#include "cp/test/inc/test_station.h"
+#include "cp/beacon/inc/beacon_types.h"
+#include "cp/test/inc/test_conn.h"
+#include "lib/trace.h"
+
+
+/////////////////
+
+mac_store_t *mac_store;
+mac_config_t *mac_config;
+pbproc_t *pbproc;
+sar_t *sar;
+cl_t *cl;
+ca_t *ca;
+cp_secu_t sec_m;
+
+
+#define STA_THREAD_PRIORITY 30
+/*
+static unsigned char station_thread_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+static cyg_handle_t station_thread_handle;
+static cyg_thread station_thread;
+*/
+
+/*
+ * this will init the cp module, and launch the cp thread
+ */
+int cp_init(mac_store_t *mac_store_ctx, cl_t *interf_cl_ctx)
+{
+ /*
+ beacon_init();
+ interf_init ();
+ msg_init();
+ secu_init(&sec_m);
+ cp_station_init(mac_store_ctx, interf_cl_ctx);
+ // creation of the CP thread
+ cyg_thread_create(
+ STA_THREAD_PRIORITY,
+ &station_wait_event,
+ 0,
+ "CP",
+ station_thread_stack,
+ sizeof(station_thread_stack),
+ &station_thread_handle,
+ &station_thread
+ );
+ cyg_thread_resume(station_thread_handle);
+ */
+ return 0;
+}
+
+/////////////////
+int main ( int argc, char * argv[] )
+{
+ int return_value = 0;
+
+ return_value += secu_test(0);
+ return_value += msg_test (0);
+ return_value += interf_test (0);
+ return_value += station_test (0);
+ return_value += conn_test (1);
+
+ if(return_value == 0) printf ("test complete successfully.\n");
+ else printf ("test complete with some failures.\n");
+ // and stop the ecos thread
+ HAL_PLATFORM_EXIT(0);
+
+ return return_value;
+}
diff --git a/cesar/cp/test/src/test_interf.c b/cesar/cp/test/src/test_interf.c
new file mode 100644
index 0000000000..923be92301
--- /dev/null
+++ b/cesar/cp/test/src/test_interf.c
@@ -0,0 +1,341 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/test/test_interf.c
+ * \brief unit tests for interf module
+ * \ingroup cp_test
+ */
+
+#include "common/std.h"
+#include "cp/test/inc/test_interf.h"
+
+/*
+ * Test de void interf_init(void);
+ */
+int interf_init_test (void)
+{
+ return interf_init ();
+}
+
+/*
+ * Test de interf_received_frag_test
+ */
+int interf_received_frag_test (void)
+{
+ interf_buffer_t buf_test[5];
+ msg_mme_t *msg;
+ int i;
+
+ interf_init ();
+ // init the buf
+ bzero (buf_test, sizeof(buf_test));
+ // Test add of a 5 fragments message
+ for(i=0; i<5; i++)
+ {
+ msg = &buf_test[i].msg;
+ msg_set_mme_const_values(msg);
+ bzero(msg->osa, 6);
+ msg->fmi.nf_mi = 4; // Number of fragments for message
+ msg->fmi.fn_mi = i; // fragment number
+ msg->fmi.fmsn = 32;
+ msg->mm_type = TEST_MSG_NUM;
+ if(i != msg->fmi.nf_mi)
+ {
+ if(interf_received_frag(msg) != NULL) return 1;
+ }
+ else if(interf_received_frag(msg) == NULL) return 2;
+ }
+ // check that BufTest structure is updated correctly
+ for(i=0; i < 3; i++)
+ {
+ if(buf_test[i].next_msg != &buf_test[i+1].msg ) return 3;
+ }
+ // Test filling the receiving struct
+ interf_init();
+ for(i=0 ; i < INTERF_MAX_FRAG_MSG_SIM ; i++)
+ {
+ msg = &buf_test[i].msg;
+ bzero(msg->osa, 6);
+ msg->fmi.nf_mi = 4; // Number of fragments for message
+ msg->fmi.fn_mi = i; // fragment number
+ msg->fmi.fmsn = i;
+ if(interf_received_frag(msg) != NULL) return 4;
+ }
+ // and then test adding others fragments
+ for(i=1 ; i<5 ; i++)
+ {
+ msg = &buf_test[i].msg;
+ bzero(msg->osa, 6);
+ msg->fmi.nf_mi = 4; // Number of fragments for message
+ msg->fmi.fn_mi = i; // fragment number
+ msg->fmi.fmsn = 0;
+ if(i != msg->fmi.nf_mi)
+ {
+ if(interf_received_frag(msg) != NULL) return 5;
+ }
+ else if(interf_received_frag(msg) == NULL) return 6;
+ }
+ return 0;
+}
+
+/*
+ * Test de void interf_send(msg_mme_t *msg)
+ *
+ */
+int interf_send_test (void)
+{
+ interf_buffer_t buffer;
+ msg_mme_t *msg;
+ msg_param_t msg_param;
+
+ msg = &buffer.msg;
+ msg_param.mnbf = 1;
+ msg_set_mme_const_values (msg);
+ interf_send (msg, 80, msg_param, 0xFF);
+ return 0;
+}
+
+/*
+ * Test de void interf_received(void)
+ *
+ */
+int interf_received_test (void)
+{
+ interf_buffer_t buf_test;
+ msg_mme_t *msg;
+
+ msg = &buf_test.msg;
+ msg_set_mme_const_values (msg);
+ msg->mm_type = TEST_MSG_NUM;
+
+ interf_init();
+
+ interf_receive(0, 0, (u8*) msg, 0, 0);
+
+ interf_received ();
+ return 0;
+}
+
+
+/*
+ * test de void interf_release_buf(msg_mme_t *msg)
+ * et des fonctions attachées
+ */
+#define MY_CONST_ 9 // doit etre inférieure a la taille d'une mailbox
+int interf_release_buf_test (void)
+{
+ interf_buffer_t buf[MY_CONST_];
+ msg_mme_t *msg[MY_CONST_];
+ int i;
+
+ // init all the interf module
+ interf_init ();
+ bzero (&buf, sizeof(buf));
+
+ // init the messages for test
+ for(i=0 ; i<MY_CONST_ ; i++)
+ {
+ msg[i] = &buf[i].msg;
+ bzero(msg[i]->osa, sizeof(msg[i]->osa));
+ msg_set_mme_const_values(msg[i]);
+ msg[i]->mm_type = 4; // cc_backup_appoint.req message,to STA
+ }
+
+ // empile les message dans la fifo
+ for(i=0 ; i<MY_CONST_ ; i++)
+ {
+ interf_release_buf(msg[i]);
+ }
+ // et hop on vide !
+ interf_buf_to_release();
+
+ return 0;
+}
+
+/*
+ * test de la fonction de purge
+ */
+int interf_msg_purge_test (void)
+{
+ interf_buffer_t buf_test;
+ msg_mme_t *msg;
+
+ // init all the interf module
+ interf_init ();
+ bzero (&buf_test, sizeof(buf_test));
+
+ // create a fragment of message
+ msg = &buf_test.msg;
+ msg_set_mme_const_values(msg);
+ bzero(msg->osa, 6);
+ msg->fmi.nf_mi = 4; // Number of fragments for message
+ msg->fmi.fn_mi = 1; // fragment number
+ msg->fmi.fmsn = 32;
+ // add this fragment in the fifo
+ //interf_receive(msg);
+ interf_receive(0, 0, (u8*) msg, 0, 0);
+
+ interf_received();
+ cyg_thread_delay( (FragMMI_ReassemblyTimeOut_sec + 1) * 100);
+ interf_msg_purge();
+ return 0;
+}
+
+/*
+ * Test de l'ensemble du module
+ *
+ */
+#define NB_MSG_TEST 9
+
+int interf_module_test (void)
+{
+/*
+ interf_buffer_t buf[NB_MSG_TEST];
+ msg_mme_t *msg[NB_MSG_TEST], *test;
+ int i;
+
+ for (i=0 ; i<NB_MSG_TEST ; i++)
+ {
+ msg[i] = &buf[i].msg;
+ }
+
+ // init all the interf module
+ interf_init ();
+ bzero (&buf, sizeof(buf));
+
+ // init the messages for test
+ for(i=0 ; i<NB_MSG_TEST ; i++)
+ {
+ bzero(msg[i]->osa, sizeof(msg[i]->osa));
+ msg_set_mme_const_values(msg[i]);
+ msg[i]->mm_type = TEST_MSG_NUM;
+ }
+ // create a test message
+ msg[1]->mm_type = TEST_MSG_NUM;
+
+ // create a 3 parts fragmented message
+
+ msg[2]->mm_type = TEST_MSG_NUM;
+ msg[2]->fmi.nf_mi = 2;
+ msg[2]->fmi.fn_mi = 0;
+ msg[2]->fmi.fmsn = 45;
+
+ msg[4]->mm_type = TEST_MSG_NUM;
+ msg[4]->fmi.nf_mi = 2;
+ msg[4]->fmi.fn_mi = 1;
+ msg[4]->fmi.fmsn = 45;
+
+ msg[7]->mm_type = TEST_MSG_NUM;
+ msg[7]->fmi.nf_mi = 2;
+ msg[7]->fmi.fn_mi = 2;
+ msg[7]->fmi.fmsn = 45;
+
+ // receive the message at the STA
+ for(i=0 ; i<NB_MSG_TEST ; i++)
+ {
+ interf_receive(msg[i]);
+ }
+
+ // simulate the sta event,
+ interf_received();
+
+ // the msg should now be in the STA fifo, so ask for it
+ test = interf_msg_get_last(MSG_STA);
+ // check that we have the same msg
+ if(test != msg[8]) return 1;
+
+ // the previous msg should be the first part of frag msg
+ test = interf_msg_get_previous(MSG_STA);
+ if(test != msg[2]) return 2;
+
+ // then we should have the other complete msg
+ test = interf_msg_get_previous(MSG_STA);
+ if(test != msg[6]) return 3;
+ test = interf_msg_get_previous(MSG_STA);
+ if(test != msg[5]) return 4;
+ test = interf_msg_get_previous(MSG_STA);
+ if(test != msg[3]) return 5;
+ test = interf_msg_get_previous(MSG_STA);
+ if(test != msg[1]) return 6;
+ test = interf_msg_get_previous(MSG_STA);
+ if(test != msg[0]) return 7;
+
+ // and here, we are at the end of the fifo
+ test = interf_msg_get_previous(MSG_STA);
+ if(test != NULL) return 8;
+ // test it once again to discover an assert ...
+ test = interf_msg_get_previous(MSG_STA);
+ if(test != NULL) return 9;
+
+ // then we try to get a message from it type
+ test = interf_msg_get_last_of_type(MSG_STA, 9);
+ if(test != msg[2]) return 10;
+
+ // remove one before it, and ask again
+ if( ! interf_msg_remove(MSG_STA, msg[3])) return 11;
+ test = interf_msg_get_last_of_type(MSG_STA, 9);
+ if(test != msg[2]) return 12;
+
+ // and we ask for the others parts of the message
+ test = interf_msg_get_next_part(test);
+ if(test != msg[4]) return 13;
+
+ test = interf_msg_get_next_part(test);
+ if(test != msg[7]) return 14;
+
+ // there is no more part
+ test = interf_msg_get_next_part(test);
+ if(test != NULL) return 15;
+
+ // then we try (again) to get a message from it type
+ test = interf_msg_get_last_of_type(MSG_STA, 9);
+ if(test != msg[2]) return 16;
+ // we ask for previous message of this type
+ test = interf_msg_get_previous_of_type(MSG_STA, 9);
+ if(test != msg[1]) return 17;
+*/
+ return 0;
+}
+
+struct interf_test_t
+{
+ int(*func) (void);
+ char func_name[30];
+};
+
+int interf_test (bool verbose)
+{
+ unsigned int i;
+ int res, return_value = 0;
+ struct interf_test_t my_test[]=
+ {
+ { interf_init_test, "interf_init" },
+ { interf_received_frag_test, "interf_received_frag" },
+ { interf_received_test, "inter_received"},
+ { interf_send_test, "interf_send" },
+ { interf_received_test, "interf_received" },
+ { interf_release_buf_test, "interf_release_buf" },
+ { interf_msg_purge_test, "interf_msg_purge" }
+ //{ interf_module_test, "interf : module" }
+ };
+
+ printf ("test du module interf\n");
+ for (i=0 ; i<COUNT(my_test) ; i++)
+ {
+ res = my_test[i].func ();
+ if(verbose || (res != 0))
+ {
+ printf (" %-50s", my_test[i].func_name);
+ if (res == 0) printf ("OK\n");
+ else printf ("FAILED : %i\n", res);
+ }
+ if(res != 0) return_value++;
+ }
+ if (i != COUNT(my_test)) return 1;
+ return return_value;
+}
diff --git a/cesar/cp/test/src/test_msg.c b/cesar/cp/test/src/test_msg.c
new file mode 100644
index 0000000000..36b9a5ef07
--- /dev/null
+++ b/cesar/cp/test/src/test_msg.c
@@ -0,0 +1,158 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/test/test_msg.c
+ * \brief unit tests for msg module
+ * \ingroup cp_test
+ */
+
+#include "common/std.h"
+#include "cp/test/inc/test_msg.h"
+#include "cp/secu/inc/secu_aes.h"
+
+/*
+ * test de void msg_init(void)
+ */
+int msg_init_test (void)
+{
+ msg_init();
+ return 0;
+}
+
+/*
+ * test de void msg_xxx_mme_const_values
+ */
+int msg_set_mme_const_values_test (void)
+{
+ msg_mme_t msg;
+ msg_set_mme_const_values (&msg);
+ return msg_check_wrong_mme_const_values (&msg);
+}
+
+
+/*
+ * u16 msg_get_number (msg_mme_t *msg)
+ */
+
+int msg_get_number_test(void)
+{
+ msg_mme_t msg;
+ msg_set_mme_const_values(& msg);
+ msg.mm_type = 0;
+ if(msg_get_number(&msg) != 0) return 1;
+ msg.mm_type = 63;
+ if(msg_get_number(&msg) != MSG_UNKNOW) return 2;
+ msg.mm_type = 0xE;
+ if(msg_get_number(&msg) != MSG_UNKNOW) return 3;
+ msg.mm_type = 0xD;
+ if(msg_get_number(&msg) != 9) return 4;
+ return 0;
+}
+
+/*
+ * test cm_encrypted payload
+ */
+int
+int_test_enc(void)
+{
+ //char msg_orig[] = "\x00\x31\x32\x33\x34\x35\x00\x46\x47\x48\x49\x50\x88\xe1\x01\x08\x60\x00\x00\x01\x00\x11\x22\x33\x44\x33\x22\x11\x02\x2d\x37\x03\x02\x02\x6b\xcb\xa5\x35\x4e\x18\x01\xb5\x93\x19\xd7\xe8\x15\x7b\xa0\x01\xb0\x18\x66\x9c\xce\xe3\x0d";
+ unsigned char msg[] = "\x00\x31\x32\x33\x34\x35\x00\x46\x47\x48\x49\x50\x88\xe1\x01\x06\x60\x00\x00\x00\x05\x02\x2d\x37\x03\xfe\xdc\xba\x98\x76\x54\x32\x10\xfe\xdc\xba\x98\x76\x54\x32\x10\x39\x00\x24\x68\xac\xe0\x35\x00\x31\x32\x33\x34\x35\x00\x46\x47\x48\x49\x50\x88\xe1\x01\x08\x60\x00\x00\x01\x00\x11\x22\x33\x44\x33\x22\x11\x02\x2d\x37\x03\x02\x02\x6b\xcb\xa5\x35\x4e\x18\x01\xb5\x93\x19\xd7\xe8\x15\x7b\xa0\x01\xb0\x18\x66\x9c\xce\xe3\x0d\xf1\x66\x28\x20\x02\x2d\x37\x03\xac\xbc\xd2\x11\x4d\xae\x15\x77\xc6\x05";
+ unsigned char iv[] = "\xfe\xdc\xba\x98\x76\x54\x32\x10\xfe\xdc\xba\x98\x76\x54\x32\x10";
+ unsigned char key[] = "\xEE\x7F\x57\x88\xE2\xA0\x21\xC9\x99\x46\x9A\xC5\x2A\xF3\x0A\x06";
+ unsigned char res[] = "\xa9\xa8\x87\xca\x49\x53\x09\x31\xbb\x73\x60\xad\x22\xb2\x84\x61\x9e\xaf\xb1\x07\x8a";
+ unsigned char enc[1518];
+ aes_context ctx;
+ int i;
+
+ aes_set_key(&ctx, key, sizeof(aes_key_t)*8);
+ aes_cbc_encrypt (&ctx, iv, &msg[43], enc, 0x50);
+ i = memcmp(enc, res, COUNT(res)-1);
+ if(i)return 1;
+ return 0;
+}
+
+int
+msg_cm_encrypted_payload_ind_send_test(void)
+{
+ msg_mme_t msg;
+ cm_set_key_req_t *cm_set_key_req;
+ msg_param_t msg_param;
+ tei_t tei = 1;
+ int i;
+
+ i = int_test_enc();
+ if(i) return i;
+
+ // create the message cm_set_key.REQ such as in table 13-144
+ memcpy(&msg.oda, "\x00\x31\x32\x33\x34\x35", 6);
+ memcpy(&msg.osa, "\x00\x46\x47\x48\x49\x50", 6);
+ msg_set_mme_const_values((msg_mme_t *)&msg);
+ msg.mm_type = CM_SET_KEY_REQ;
+ msg.fmi.fmsn = 0;
+ msg.fmi.fn_mi = 0;
+ msg.fmi.nf_mi = 0;
+ cm_set_key_req = (cm_set_key_req_t *) msg.mm_entry;
+ cm_set_key_req->key_type = 1;
+ cm_set_key_req->my_nonce = 0x33221100;
+ cm_set_key_req->your_nonce = 0x11223344;
+ cm_set_key_req->pid = 2;
+ cm_set_key_req->prn = 0x372D;
+ cm_set_key_req->pmn = 3;
+ cm_set_key_req->cco_capa = 2;
+ memcpy(cm_set_key_req->nid, "\x02\x6B\xCB\xA5\x35\x4E\x18", 7);
+ cm_set_key_req->new_eks = 1;
+ memcpy(cm_set_key_req->new_key, "\xB5\x93\x19\xD7\xE8\x15\x7B\xA0\x01\xB0\x18\x66\x9C\xCE\xE3\x0D", 16);
+
+ msg_param.peks = PEKS_DESTINATION_STA_DAK;
+ secu_set_sta_s_dak(tei, "\xEE\x7F\x57\x88\xE2\xA0\x21\xC9\x99\x46\x9A\xC5\x2A\xF3\x0A\x06");
+ cp_station_set_mac_address(NULL, "\x00\x46\x47\x48\x49\x50");
+
+ msg_cm_encrypted_payload_ind_send(
+ (msg_mme_t *)&msg,
+ msg_param,
+ tei,
+ false,
+ 2,
+ sizeof(cm_set_key_req_t) + MSG_MME_HEADER_SIZE
+ );
+ return 0;
+}
+
+struct msg_test_t
+{
+ int(*func) (void);
+ char func_name[30];
+};
+
+int msg_test (bool verbose)
+{
+ unsigned int i;
+ int res, return_value = 0;
+ struct msg_test_t my_test[]=
+ {
+ { msg_init_test, "msg_init"},
+ { msg_set_mme_const_values_test, "msg_xxx_mme_const_values" },
+ { msg_get_number_test, "msg_get_number"},
+ { msg_cm_encrypted_payload_ind_send_test, "cm_encrypted_payload_ind"}
+ };
+
+ printf ("test du module msg\n");
+ for (i=0 ; i<COUNT (my_test) ; i++)
+ {
+ res = my_test[i].func ();
+ if(verbose || (res != 0))
+ {
+ printf (" %-50s", my_test[i].func_name);
+ if (res == 0) printf ("OK\n");
+ else printf ("FAILED : %i\n", res);
+ }
+ if(res != 0) return_value++;
+ }
+ if (i != COUNT(my_test)) return 1;
+ return return_value;
+}
diff --git a/cesar/cp/test/src/test_secu.c b/cesar/cp/test/src/test_secu.c
new file mode 100644
index 0000000000..6532344d07
--- /dev/null
+++ b/cesar/cp/test/src/test_secu.c
@@ -0,0 +1,570 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/test/test_secu.c
+ * \brief unit tests for secu module
+ * \ingroup cp_test
+ */
+
+#include "common/std.h"
+#include "cp/test/inc/test_secu.h"
+
+/*
+ * Test de la fonction sha2
+ */
+
+/*
+ * FIPS-180-2 test vectors
+ */
+
+//static const char sha2_test_str[3][57] =
+static char sha2_test_str[3][57] =
+ {
+ { "abc" },
+ { "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" },
+ { "" }
+ };
+
+static const unsigned char sha2_test_sum[6][32] = {
+/*
+ * SHA-224 test vectors
+ */
+{ 0x23, 0x09, 0x7D, 0x22, 0x34, 0x05, 0xD8, 0x22, 0x86, 0x42, 0xA4, 0x77,
+ 0xBD, 0xA2, 0x55, 0xB3, 0x2A, 0xAD, 0xBC, 0xE4, 0xBD, 0xA0, 0xB3,
+ 0xF7, 0xE3, 0x6C, 0x9D, 0xA7 }, { 0x75, 0x38, 0x8B, 0x16, 0x51, 0x27,
+ 0x76, 0xCC, 0x5D, 0xBA, 0x5D, 0xA1, 0xFD, 0x89, 0x01, 0x50, 0xB0,
+ 0xC6, 0x45, 0x5C, 0xB4, 0xF5, 0x8B, 0x19, 0x52, 0x52, 0x25, 0x25 }, {
+ 0x20, 0x79, 0x46, 0x55, 0x98, 0x0C, 0x91, 0xD8, 0xBB, 0xB4, 0xC1,
+ 0xEA, 0x97, 0x61, 0x8A, 0x4B, 0xF0, 0x3F, 0x42, 0x58, 0x19, 0x48,
+ 0xB2, 0xEE, 0x4E, 0xE7, 0xAD, 0x67 },
+
+/*
+ * SHA-256 test vectors
+ */
+{ 0xBA, 0x78, 0x16, 0xBF, 0x8F, 0x01, 0xCF, 0xEA, 0x41, 0x41, 0x40, 0xDE,
+ 0x5D, 0xAE, 0x22, 0x23, 0xB0, 0x03, 0x61, 0xA3, 0x96, 0x17, 0x7A,
+ 0x9C, 0xB4, 0x10, 0xFF, 0x61, 0xF2, 0x00, 0x15, 0xAD }, { 0x24, 0x8D,
+ 0x6A, 0x61, 0xD2, 0x06, 0x38, 0xB8, 0xE5, 0xC0, 0x26, 0x93, 0x0C,
+ 0x3E, 0x60, 0x39, 0xA3, 0x3C, 0xE4, 0x59, 0x64, 0xFF, 0x21, 0x67,
+ 0xF6, 0xEC, 0xED, 0xD4, 0x19, 0xDB, 0x06, 0xC1 }, { 0xCD, 0xC7, 0x6E,
+ 0x5C, 0x99, 0x14, 0xFB, 0x92, 0x81, 0xA1, 0xC7, 0xE2, 0x84, 0xD7,
+ 0x3E, 0x67, 0xF1, 0x80, 0x9A, 0x48, 0xA4, 0x97, 0x20, 0x0E, 0x04,
+ 0x6D, 0x39, 0xCC, 0xC7, 0x11, 0x2C, 0xD0 } };
+
+/*
+ * Checkup routine
+ */
+int sha2_self_test (void)
+{
+ //int verbose = 0;
+ int i, j, k;
+ unsigned char buf[1000];
+ unsigned char sha2sum[32];
+ sha2_context ctx;
+
+ memset (buf, 'a', 1000);
+
+ for (i = 0; i < 6; i++)
+ {
+ j = i % 3;
+ k = i < 3;
+
+ sha2_starts ( &ctx, k );
+ if (j < 2)
+ sha2_update ( &ctx, (unsigned char *)sha2_test_str[j],
+ strlen (sha2_test_str[j]) );
+ else
+ {
+ for (j = 0; j < 1000; j++)
+ sha2_update ( &ctx, buf, 1000);
+ }
+ sha2_finish ( &ctx, sha2sum );
+ if (memcmp (sha2sum, sha2_test_sum[i], 32 - k * 4) != 0)
+ {
+ return ( 1 );
+ }
+ }
+ return ( 0 );
+}
+
+int sha2_self_test_wikipedia (void)
+// these test vector were found on wikipedia
+{
+ unsigned int i;
+ int j, errcount = 0;
+ unsigned char output[SHA256_OUTPUT_SIZE];
+ unsigned char samples[3][44] = { {
+ "The quick brown fox jumps over the lazy dog" }, {
+ "The quick brown fox jumps over the lazy cog" }, { "" } };
+ unsigned char samplesres[3][SHA256_OUTPUT_SIZE] = { { 0xd7, 0xa8, 0xfb,
+ 0xb3, 0x07, 0xd7, 0x80, 0x94, 0x69, 0xca, 0x9a, 0xbc, 0xb0, 0x08,
+ 0x2e, 0x4f, 0x8d, 0x56, 0x51, 0xe4, 0x6d, 0x3c, 0xdb, 0x76, 0x2d,
+ 0x02, 0xd0, 0xbf, 0x37, 0xc9, 0xe5, 0x92 }, { 0xe4, 0xc4, 0xd8,
+ 0xf3, 0xbf, 0x76, 0xb6, 0x92, 0xde, 0x79, 0x1a, 0x17, 0x3e, 0x05,
+ 0x32, 0x11, 0x50, 0xf7, 0xa3, 0x45, 0xb4, 0x64, 0x84, 0xfe, 0x42,
+ 0x7f, 0x6a, 0xcc, 0x7e, 0xcc, 0x81, 0xbe }, { 0xe3, 0xb0, 0xc4,
+ 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f,
+ 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4,
+ 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55 } };
+
+ for (i=0; i<COUNT (samples) ; i++)
+ {
+ if (i!=2)
+ sha2 (samples[i], 43, output, 0);
+ else
+ sha2 (samples[i], 0, output, 0);
+ for (j=0; j<32; j++)
+ {
+ if (output[j] != samplesres[i][j])
+ errcount++;
+ }
+ }
+ return (errcount);
+}
+
+/*
+ * Test of secu_check_password_validity
+ */
+struct pwd_test_t
+{
+ pwd_type_t pwd_type;
+ unsigned char password[MAX_PWD_SIZE + 1];
+ unsigned int exp_result;
+};
+
+int secu_check_password_validity_test (void)
+{
+ struct pwd_test_t pwd_test[]=
+ {
+ { 0x32, "abcd efgh ijkl mnop", Failure }, // type de mot de passe incorrect
+ { PWD_DPW, "abcd efgh ijkl m", Success }, // le plus petit mot de passe DPW
+ { PWD_NPW, "abcd efg", Success }, // le plus petit mot de passe NPW
+ { PWD_DPW, "abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd", Success }, // le plus grand mot de passe
+ { PWD_DPW, "abcd efgh ijkl ", PWD_WrongSize }, // mot de passe DPW trop petit
+ { PWD_NPW, "abcd ef", PWD_WrongSize }, // mot de passe NPW trop petit
+ { PWD_DPW, "abcd efgh ijkl m\x1F", PWD_ForbidenChar }, // mot de passe avec caractère incorrect
+ { PWD_DPW, "abcd efgh ijkl m\x80", PWD_ForbidenChar } // mot de passe avec caractère incorrect
+ };
+ unsigned int i;
+ for (i=0 ; i<COUNT (pwd_test) ; i++)
+ {
+ if (secu_check_password_validity (pwd_test[i].pwd_type, pwd_test[i].password)
+ != pwd_test[i].exp_result)
+ return Failure;
+ }
+ return 0;
+}
+
+/*
+ * Test secu_pbkdf1
+ */
+struct pbkdf1_test_t
+{
+ u8 input[MAX_PWD_SIZE + 1];
+ int input_len;
+ u8 salt[SALT_SIZE];
+ int salt_len;
+ int it_count;
+ u8 exp_output_key[OUTPUT_KEY_SIZE];
+};
+
+int
+secu_pbkdf1_test (void)
+{
+ unsigned int i;
+ u8 output_key[OUTPUT_KEY_SIZE];
+ struct pbkdf1_test_t pbkdf1_test[]=
+ {
+ { "hello world how are you?",
+ 24,
+ { 0x58, 0x56, 0x52, 0xf6, 0x9c, 0x04, 0xb5, 0x72 },
+ 8,
+ 1000,
+ { 0x84, 0x33, 0x45, 0x96, 0xab, 0xe5, 0x1e, 0x60, 0x7e, 0x63, 0x8f, 0x4b, 0x2d, 0x8c, 0x51, 0x68 }
+ } //
+ };
+ for(i=0 ; i<COUNT(pbkdf1_test) ; i++)
+ {
+ secu_pbkdf1(pbkdf1_test[i].input, pbkdf1_test[i].input_len, pbkdf1_test[i].salt, pbkdf1_test[i].salt_len, pbkdf1_test[i].it_count, output_key);
+ if(memcmp( output_key, pbkdf1_test[i].exp_output_key, OUTPUT_KEY_SIZE)) return Failure;
+ }
+ return 0;
+}
+
+/*
+ * Test des fonctions AES
+ */
+
+/*
+ * AES-ECB test vectors (source: NIST, rijndael-vals.zip)
+ */
+
+/*
+ * Checkup routine
+ */
+int aes_self_test (void)
+{
+ //int verbose = 0;
+ int i, j, u, v;
+ aes_context ctx;
+ unsigned char buf[32];
+
+ uint8 aes_enc_test[3][16] = { { 0xC3, 0x4C, 0x05, 0x2C, 0xC0, 0xDA, 0x8D,
+ 0x73, 0x45, 0x1A, 0xFE, 0x5F, 0x03, 0xBE, 0x29, 0x7F }, { 0xF3,
+ 0xF6, 0x75, 0x2A, 0xE8, 0xD7, 0x83, 0x11, 0x38, 0xF0, 0x41, 0x56,
+ 0x06, 0x31, 0xB1, 0x14 }, { 0x8B, 0x79, 0xEE, 0xCC, 0x93, 0xA0,
+ 0xEE, 0x5D, 0xFF, 0x30, 0xB4, 0xEA, 0x21, 0x63, 0x6D, 0xA4 } };
+
+ uint8 aes_dec_test[3][16] = { { 0x44, 0x41, 0x6A, 0xC2, 0xD1, 0xF5, 0x3C,
+ 0x58, 0x33, 0x03, 0x91, 0x7E, 0x6B, 0xE9, 0xEB, 0xE0 }, { 0x48,
+ 0xE3, 0x1E, 0x9E, 0x25, 0x67, 0x18, 0xF2, 0x92, 0x29, 0x31, 0x9C,
+ 0x19, 0xF1, 0x5B, 0xA4 }, { 0x05, 0x8C, 0xCF, 0xFD, 0xBB, 0xCB,
+ 0x38, 0x2D, 0x1F, 0x6F, 0x56, 0x58, 0x5D, 0x8A, 0x4A, 0xDE } };
+
+ for (i = 0; i < 6; i++)
+ {
+ u = i >> 1;
+ v = i & 1;
+
+ memset (buf, 0, 32);
+ aes_set_key ( &ctx, buf, 128 + u * 64);
+ for (j = 0; j < 10000; j++)
+ {
+ if (v == 0)
+ aes_encrypt ( &ctx, buf, buf );
+ if (v == 1)
+ aes_decrypt ( &ctx, buf, buf );
+ }
+ if ( (v == 0&& memcmp (buf, aes_enc_test[u], 16) != 0) ||(v == 1
+ && memcmp (buf, aes_dec_test[u], 16) != 0))
+ {
+ return ( 1 );
+ }
+ }
+ return ( 0 );
+}
+/*
+ * test of aes function, with test vectors provided by NIS
+ */
+#define AES_TEXT_SIZE 112
+struct T_aes_test
+{
+ unsigned char Key[AES_KEY_SIZE];
+ unsigned char IV[16];
+ unsigned char PlainText[AES_TEXT_SIZE];
+ int len;
+ unsigned char CypherText[AES_TEXT_SIZE];
+};
+
+int aes_avs_test (void)
+{
+ aes_context ctx;
+ unsigned char AESOutput[AES_TEXT_SIZE];
+ unsigned char tmp[AES_TEXT_SIZE];
+ unsigned int i;
+ struct T_aes_test aes_test[]=
+ {
+ { // élément de test http://www.faqs.org/rfcs/rfc3602.html case #1
+ { 0x06, 0xa9, 0x21, 0x40, 0x36, 0xb8, 0xa1, 0x5b, 0x51, 0x2e, 0x03, 0xd5, 0x34, 0x12, 0x00, 0x06 },
+ { 0x3d, 0xaf, 0xba, 0x42, 0x9d, 0x9e, 0xb4, 0x30, 0xb4, 0x22, 0xda, 0x80, 0x2c, 0x9f, 0xac, 0x41 },
+ { "Single block msg" },
+ 16,
+ {0xe3, 0x53, 0x77, 0x9c, 0x10, 0x79, 0xae, 0xb8, 0x27, 0x08, 0x94, 0x2d, 0xbe, 0x77, 0x18, 0x1a }
+ },
+ { // élément de test http://www.faqs.org/rfcs/rfc3602.html case #4
+ { 0x56, 0xe4, 0x7a, 0x38, 0xc5, 0x59, 0x89, 0x74, 0xbc, 0x46, 0x90, 0x3d, 0xba, 0x29, 0x03, 0x49 },
+ { 0x8c, 0xe8, 0x2e, 0xef, 0xbe, 0xa0, 0xda, 0x3c, 0x44, 0x69, 0x9e, 0xd7, 0xdb, 0x51, 0xb7, 0xd9 },
+ { 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
+ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
+ 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
+ 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf },
+ 64,
+ { 0xc3, 0x0e, 0x32, 0xff, 0xed, 0xc0, 0x77, 0x4e, 0x6a, 0xff, 0x6a, 0xf0, 0x86, 0x9f, 0x71, 0xaa,
+ 0x0f, 0x3a, 0xf0, 0x7a, 0x9a, 0x31, 0xa9, 0xc6, 0x84, 0xdb, 0x20, 0x7e, 0xb0, 0xef, 0x8e, 0x4e,
+ 0x35, 0x90, 0x7a, 0xa6, 0x32, 0xc3, 0xff, 0xdf, 0x86, 0x8b, 0xb7, 0xb2, 0x9d, 0x3d, 0x46, 0xad,
+ 0x83, 0xce, 0x9f, 0x9a, 0x10, 0x2e, 0xe9, 0x9d, 0x49, 0xa5, 0x3e, 0x87, 0xf4, 0xc3, 0xda, 0x55 }
+ }
+
+ };
+ // teste une valeur de clé incorrecte
+ aes_set_key ( &ctx, aes_test[0].Key, 1);
+
+ // vérifie le fonctionnement de l'encryptage/décryptage AES
+ // sans le mode CBC
+ aes_set_key ( &ctx, aes_test[0].Key, AES_KEY_SIZE*8);
+ aes_encrypt ( &ctx, aes_test[0].PlainText, AESOutput);
+ memset(tmp, 0, sizeof(tmp));
+ aes_decrypt ( &ctx, AESOutput, tmp);
+ if (memcmp (tmp, aes_test[0].PlainText, aes_test[0].len) != 0)
+ {
+ return 1;
+ }
+
+ // test du mode CBC
+ for (i=0; i<COUNT (aes_test) ; i++)
+ {
+ aes_set_key ( &ctx, aes_test[i].Key, AES_KEY_SIZE*8);
+ memcpy(tmp, aes_test[i].IV, sizeof(aes_test[i].IV));
+ aes_cbc_encrypt (&ctx, tmp, aes_test[i].PlainText, AESOutput, aes_test[i].len);
+ if (memcmp (aes_test[i].CypherText, AESOutput, aes_test[i].len) != 0)
+ {
+ return 3;
+ }
+
+ aes_set_key ( &ctx, aes_test[i].Key, AES_KEY_SIZE*8);
+ memset(tmp, 0, sizeof(tmp));
+ aes_cbc_decrypt (&ctx, aes_test[i].IV, aes_test[i].CypherText, tmp, aes_test[i].len);
+ if (memcmp (aes_test[i].PlainText, tmp, aes_test[i].len) != 0)
+ {
+ return 4;
+ }
+ }
+ return 0;
+}
+
+/*
+ * test de void SECU_Init(T_SEC *p_sec)
+ */
+int secu_init_test (void)
+{
+ cp_secu_t sec;
+
+ secu_init (&sec);
+
+ return 0;
+}
+/*
+ * test de E_SecuErrCode SECU_Hash(E_PWDType PWDType, u8 in[], u8 out[])
+ */
+int secu_hash_test (void)
+{
+ u8 out[AES_KEY_SIZE];
+ u8 pwd[] = "Hello world! what's up ?";
+ return secu_hash (PWD_DPW, pwd, strlen(pwd), out);
+}
+
+/*
+ * test de E_SecuErrCode SECU_GenAESKey(u8 Key[])
+ */
+int secu_gen_aes_key_test (void)
+{
+ u8 key[AES_KEY_SIZE];
+ E_ErrCode r;
+ unsigned int i;
+ u8 ExpRes[] = { 0x18, 0x72, 0xce, 0x0, 0x56, 0xcb, 0xf2, 0xdf, 0x33,
+ 0x5a, 0x6, 0x9c, 0x6b, 0x41, 0x2d, 0x26 };
+
+ r = secu_gen_aes_key (key);
+ if (r != 0)
+ return r;
+ for (i=0; i<COUNT (ExpRes) ; i++)
+ if (key[i] != ExpRes[i])
+ return Failure;
+ return 0;
+}
+
+/*
+ * test de E_SecuErrCode SECU_GenNonce(T_SEC *p_sec)
+ */
+int secu_gen_nonce_test (void)
+{
+ tei_t tei = 1;
+ cp_secu_t sec;
+ protocol_run_t p_run;
+
+ secu_init (&sec);
+ secu_gen_nonce (tei);
+ p_run.pid = 0;
+ p_run.nonce = 0xce7218; // résultat obtenu avec la clé par défaut de SECU_GenAESKey()
+ if (secu_check_protocol_run_param(tei, p_run) != NONCE_INCORRECT)
+ return 0;
+ else
+ return 1;
+}
+
+struct npw2nmk_test_t
+{
+ char npw[65];
+ u8 expected_nmk[16];
+};
+
+int secu_npw2nmk_test (void)
+{
+ struct npw2nmk_test_t data = {
+ "HomePlugAV0123",
+ { 0xB5, 0x93, 0x19, 0xD7, 0xE8, 0x15, 0x7B, 0xA0, 0x01, 0xB0, 0x18, 0x66, 0x9C, 0xCE, 0xE3, 0x0D }
+ };
+ u8 nmk[16];
+ int i;
+ bool verbose = true;
+
+ memset((char*)nmk,0x00,sizeof(nmk));
+ secu_npw2nmk(data.npw,nmk);
+
+ for (i = 0; i < 16; i++)
+ {
+ if (nmk[i] != data.expected_nmk[i])
+ {
+ if (verbose)
+ {
+ printf("hashed NMK from \"%s\" NPW : 0x",data.npw);
+ for (i = 0; i < 16; i++)
+ {
+ printf("%02X",nmk[i]);
+ }
+ printf("\n");
+ printf("different from expected one : 0x");
+ for (i = 0; i < 16; i++)
+ {
+ printf("%02X",data.expected_nmk[i]);
+ }
+ printf("\n");
+ }
+ return 1;
+ }
+ }
+ return 0;
+}
+
+struct nmk2nid_test_t
+{
+ u8 nmk[16];
+ u8 sl;
+ u8 expected_nid[7];
+};
+
+int secu_nmk2nid_test (void)
+{
+ struct nmk2nid_test_t data = {
+ { 0xB5, 0x93, 0x19, 0xD7, 0xE8, 0x15, 0x7B, 0xA0, 0x01, 0xB0, 0x18, 0x66, 0x9C, 0xCE, 0xE3, 0x0D },
+ 1,
+ { 0x02, 0x6B, 0xCB, 0xA5, 0x35, 0x4E, 0x18 }
+ };
+ u8 nid[7];
+ int i;
+ bool verbose = true;
+
+ memset((char*)nid,0x00,sizeof(nid));
+ secu_nmk2nid(data.nmk,data.sl,nid);
+
+ for (i = 0; i < 7; i++)
+ {
+ if (nid[i] != data.expected_nid[i])
+ {
+ if (verbose)
+ {
+ printf("hashed NID from 0x");
+ for (i = 0; i < 7; i++)
+ {
+ printf("%02X",nid[i]);
+ }
+ printf(" NMK\n");
+ printf("different from expected one : 0x");
+ for (i = 0; i < 7; i++)
+ {
+ printf("%02X",data.expected_nid[i]);
+ }
+ printf("\n");
+ }
+ return 1;
+ }
+ }
+ return 0;
+}
+
+/*
+ * test des protocol-run
+ */
+int secu_protocol_run_test (void)
+{
+ cp_secu_t STA_sec;
+ protocol_run_t Msg;
+ cp_pid_t PID = PROV_STA_WITH_NMK_U_UKE;
+ tei_t tei_cco = 1, tei_sta = 2;
+
+ secu_init (&STA_sec);
+
+ // cco start a new protocol-run
+ secu_start_new_protocol_run (tei_cco, PID, &Msg);
+ // check that parameters are correctly set
+ if (Msg.pid != PROV_STA_WITH_NMK_U_UKE)
+ return 2;
+ // le CCO demande les paramètres du pr en cours
+ if (secu_gen_protocol_run_param (tei_cco, false, &Msg) != 0)
+ return 3;
+ // la STA reçoit le premier message du pr
+ if (secu_check_protocol_run_param (tei_sta, Msg) != 0)
+ return 4;
+ // la STA génère un nouveau message
+ if (secu_gen_protocol_run_param (tei_sta, false, &Msg) != 0)
+ return 5;
+ // et le renvoie au CCO
+ if (secu_check_protocol_run_param (tei_cco, Msg) != 0)
+ return 6;
+ // le CCO refait un message
+ if (secu_gen_protocol_run_param (tei_cco, false, &Msg) != 0)
+ return 7;
+ // et le renvoie à la STA
+ if (secu_check_protocol_run_param (tei_sta, Msg) != 0)
+ return 8;
+ // la STA génère le dernier message du protocol run
+ if (secu_gen_protocol_run_param (tei_sta, true, &Msg) != 0)
+ return 9;
+ // et le renvoie au CCO
+ if (secu_check_protocol_run_param (tei_cco, Msg) != 0)
+ return 10;
+ // le CCO ne peut plus renvoyer de messages
+ if (secu_gen_protocol_run_param (tei_cco, false, &Msg)
+ != PRN_NotInitialised)
+ return 11;
+
+ return 0;
+}
+
+struct T_SecuTest
+{
+ int(*func) (void);
+ char FuncName[30];
+};
+
+int secu_test (bool verbose)
+{
+ unsigned int i;
+ int res, return_value = 0;
+ struct T_SecuTest SecuTest[]=
+ {
+ { sha2_self_test, "sha2 (1)" },
+ { sha2_self_test_wikipedia, "sha2 (2)" },
+ { secu_check_password_validity_test, "check_password_validity" },
+ { secu_pbkdf1_test, "pbkdf1" },
+ { aes_self_test, "aes (1)" },
+ { aes_avs_test, "aes (2)" },
+ { secu_init_test, "secu_init" },
+ { secu_hash_test, "secu_hash" },
+ { secu_gen_aes_key_test, "secu_gen_aes_key" },
+ { secu_gen_nonce_test, "secu_gen_nonce" },
+ { secu_protocol_run_test, "secu_protocol_run" },
+ { secu_npw2nmk_test, "secu_npw2nmk" },
+ { secu_nmk2nid_test, "secu_nmk2nid" }
+ };
+
+ printf ("test du module secu\n");
+ for (i=0; i<COUNT (SecuTest) ; i++)
+ {
+ res = SecuTest[i].func ();
+ if(verbose || (res != 0))
+ {
+ printf (" %-50s", SecuTest[i].FuncName);
+ if (res == 0) printf ("OK\n");
+ else printf ("FAILED : %i\n", res);
+ }
+ if(res != 0) return_value++;
+ }
+ if (i != COUNT(SecuTest)) return 1;
+ return return_value;
+}
diff --git a/cesar/cp/test/src/test_station.c b/cesar/cp/test/src/test_station.c
new file mode 100644
index 0000000000..1cebf00ed8
--- /dev/null
+++ b/cesar/cp/test/src/test_station.c
@@ -0,0 +1,392 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/test/test_station.c
+ * \brief unit tests for station module
+ * \ingroup cp_test
+ */
+
+#include "common/std.h"
+#include "cp/test/inc/test_station.h"
+#include "mac/pbproc/pbproc.h"
+#include "hal/phy/phy.h"
+
+
+#define STA_THREAD_PRIORITY 30
+
+
+static unsigned char station_thread_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+static cyg_handle_t station_thread_handle;
+static cyg_thread station_thread;
+static cp_secu_t sec_m;
+
+
+/*
+ * void station_gen_timed_event(cyg_flag_t *cyg_flag, station_flag_t station_flag, uint event_delay_ms)
+ */
+int station_gen_timed_event_test(void)
+{
+ // we create a local event for the test
+ cyg_flag_t local_flag;
+ cyg_flag_value_t flag_value = 4, flag_return = 0;
+ cyg_tick_count_t cyg_tick_count, cur_time, event_wait_tick;
+ uint event_wait_ms = 200;
+
+ event_wait_tick = interf_ms_to_cyg_tick(event_wait_ms);
+ // init the local event
+ cyg_flag_init(&local_flag);
+ // generate the timed event
+ cp_station_gen_timed_event(&local_flag, flag_value>>1, 0, event_wait_ms/2);
+ cp_station_gen_timed_event(&local_flag, flag_value, 0, event_wait_ms);
+ cp_station_gen_timed_event(&local_flag, flag_value<<1, 0, event_wait_ms/2);
+ // and now wait for the event...
+ cur_time = cyg_current_time();
+ //printf("cur_time = %i\n", cur_time);
+ cyg_flag_timed_wait (&local_flag, flag_value, CYG_FLAG_WAITMODE_OR, event_wait_ms*2);
+ if(cyg_current_time() != (cur_time + event_wait_tick) ) return 1;
+ //cur_time = cyg_current_time();
+ //printf("cur_time 2 = %i\n", cur_time);
+ // test if we can delete an event
+ // delete the previous events
+ cp_station_stop_timed_event(&local_flag, flag_value>>1);
+ cp_station_stop_timed_event(&local_flag, flag_value);
+ cp_station_stop_timed_event(&local_flag, flag_value<<1);
+ // generated another timed event
+ cp_station_gen_timed_event(&local_flag, flag_value, 0, event_wait_ms);
+ // and another one which arrive later
+ cp_station_gen_timed_event(&local_flag, flag_value>>1, 0, 2*event_wait_ms);
+ // delete the first one
+ cp_station_stop_timed_event(&local_flag, flag_value);
+ // wait for it...
+ cyg_tick_count = cyg_current_time();
+ cyg_tick_count += (event_wait_ms * 3);
+ //printf("wait at %i\n", (int)cyg_current_time());
+ flag_return = cyg_flag_timed_wait(&local_flag, 0xFFFFFFFF, CYG_FLAG_WAITMODE_OR, cyg_tick_count);
+ //printf("got event %i at %i\n", (int)flag_return, cyg_current_time());
+ // if we had an event, it's a failure
+ if(flag_return != (flag_value>>1)) return 2;
+ //
+ // check if we can re-arm the timer
+ //
+ // delete any previous timer
+ // delete the previous events
+ cp_station_stop_timed_event(&local_flag, flag_value>>1);
+ cp_station_stop_timed_event(&local_flag, flag_value);
+ cp_station_stop_timed_event(&local_flag, flag_value<<1);
+ // set a first timer in 200 ms
+ cur_time = cyg_current_time();
+ //printf("cur_time1 = %i\n",cur_time);
+ cp_station_gen_timed_event(&local_flag, flag_value, 0, 200);
+ // wait 100 ms
+ cyg_thread_delay (interf_ms_to_cyg_tick (100));
+ // re-set the timer in 200 ms
+ // note that we should kill the first timer and reset it.
+ cp_station_stop_timed_event(&local_flag, flag_value);
+ cp_station_gen_timed_event(&local_flag, flag_value, 0, 200);
+ // wait for the timer to expires
+ cyg_tick_count = cyg_current_time();
+ cyg_tick_count += (600);
+ flag_return = cyg_flag_timed_wait(&local_flag, 0xFFFFFFFF, CYG_FLAG_WAITMODE_OR, cyg_tick_count);
+ if(flag_return != (flag_value)) return 3;
+ // here, we should have wait at least event_wait_ms + event_wait_ms/2
+ if(cur_time + (event_wait_ms + event_wait_ms/2)/10 != cyg_current_time()) return 4;
+ //cur_time = cyg_current_time();
+ //printf("cyg_current2 = %i\n", cur_time);
+
+// cyg_thread_delay (interf_ms_to_cyg_tick (1000));
+ return 0;
+}
+
+
+/*
+ * test de l'envoie d'un message unassociated_sta et de sa reception...
+ */
+int station_unassociated_sta_test(void)
+{
+ msg_mme_t *msg;
+ cm_unassociated_sta_t *cm_unassociated_sta;
+
+ msg = interf_give_buf();
+ msg->mm_type = CM_UNASSOCIATED_STA_IND;
+ msg->osa[3] = 3;
+ cm_unassociated_sta = (cm_unassociated_sta_t *) msg->mm_entry;
+ cm_unassociated_sta->cco_capability = 0;
+ cm_unassociated_sta->nid = 0;
+
+ interf_receive(0, 0, (u8 *)msg, 0, 0);
+ cyg_thread_delay (interf_ms_to_cyg_tick (100));
+ return 0;
+}
+
+/*
+ * test du event handler
+ */
+int station_event_handler_test(void)
+{
+ event_t event;
+ int i;
+
+ // test init function
+ cp_station_initialize_handler();
+ // test add and get function
+ if(cp_station_get_event(&event) != EV_QUEUE_EMPTY) return 1;
+ if(cp_station_add_event(0, NULL) != EV_OK) return 2;
+ if(cp_station_get_event(&event) != EV_OK) return 3;
+ if(cp_station_get_event(&event) != EV_QUEUE_EMPTY) return 4;
+ // try to fill the queue
+ for(i = 0 ; i < 2*INTERF_NB_BUFFER/3 ; i++)
+ if(cp_station_add_event(0, NULL) != EV_OK) return 5;
+ for(i = 0 ; i < INTERF_NB_BUFFER/3 ; i++)
+ if(cp_station_get_event(&event) != EV_OK) return 6;
+ for(i = 0 ; i < 2*INTERF_NB_BUFFER/3+1 ; i++)
+ if(cp_station_add_event(0, NULL) != EV_OK) return 7;
+ for(i = 0 ; i < INTERF_NB_BUFFER+1 ; i++)
+ if(cp_station_get_event(&event) != EV_OK) return 8;
+ if(cp_station_get_event(&event) != EV_QUEUE_EMPTY) return 9;
+
+ return 0;
+}
+
+/*
+ * test de cp_station_process_usta
+ */
+int station_process_usta_test(void)
+{
+ mac_address_t mac_address;
+ u8 cco_capa;
+ nid_t nid;
+ process_usta_result_t process_usta_result;
+
+ // init the test vectors
+ bzero(mac_address, sizeof(mac_address_t));
+ cco_capa = 0;
+ nid = 0;
+ // init the station with it default parameters
+ cp_station_data_init(NULL, NULL, NULL);
+ // first, test with a different nid
+ nid = 3;
+ process_usta_result = cp_station_process_usta(mac_address, cco_capa, nid);
+ if(process_usta_result != CHECK_EXISTING_OTHER_AVLN) return 1;
+ // test with same nid and same cco_capability, but higher mac adress
+ mac_address[3] = 5;
+ cco_capa = 0;
+ nid = 0;
+ process_usta_result = cp_station_process_usta(mac_address, cco_capa, nid);
+ if(process_usta_result != USTA_MATCHING_NID) return 2;
+ // now, test the recording functions
+ bzero(mac_address, sizeof(mac_address_t));
+ cco_capa = 0;
+ nid = 3;
+ cp_station_add_usta(mac_address, cco_capa, nid);
+ process_usta_result = cp_station_process_recorded_usta();
+ if(process_usta_result != CHECK_EXISTING_OTHER_AVLN) return 3;
+ mac_address[3] = 5;
+ cco_capa = 0;
+ nid = 0;
+ cp_station_add_usta(mac_address, cco_capa, nid);
+ process_usta_result = cp_station_process_recorded_usta();
+ if(process_usta_result != USTA_MATCHING_NID) return 4;
+
+ return 0;
+}
+
+/*
+ * test sur les stations associées
+ */
+int associated_sta_test(void)
+{
+ station_t sta;
+ tei_t tei;
+ char s[] = "GHIJKL";
+
+ // init the station with it default parameters
+ cp_station_data_init(NULL, NULL, NULL);
+ // test retreiving a sta
+ tei = cp_station_get_associate_info(&sta, true, 0);
+ if(tei != 0) return 1;
+ // add a new created station
+ sta.cco_capa = true;
+ memcpy(sta.mac_address, "ABCEDF", sizeof(mac_address_t));
+ sta.proxy_net_capa = 0;
+ sta.station_status = STATION_UNASSOCIATED;
+ tei = cp_station_associate_new(sta);
+ if(tei != 1) return 2;
+ // add a new created station
+ sta.cco_capa = true;
+ memcpy(sta.mac_address, "GHIJKL", sizeof(mac_address_t));
+ sta.proxy_net_capa = 0;
+ sta.station_status = STATION_UNASSOCIATED;
+ tei = cp_station_associate_new(sta);
+ if(tei != 2) return 3;
+ // try to retreive the first station added
+ tei = cp_station_get_associate_info(&sta, true, 0);
+ if(tei != 2) return 4;
+ memcpy(s, "ABCEDF", sizeof(mac_address_t));
+ if(memcmp(sta.mac_address, s, 6)) return 5;
+ // try to retreive the second station added
+ tei = cp_station_get_associate_info(&sta, false, tei);
+ if(tei != 0) return 6;
+ memcpy(s, "GHIJKL", sizeof(mac_address_t));
+ if( memcmp(sta.mac_address, s, 6)) return 7;
+
+ // test tei renewal
+ memcpy(sta.mac_address, "GHIJKL", sizeof(mac_address_t));
+ if(cp_station_renew(sta) != 2) return 8;
+
+
+ return 0;
+}
+
+int
+process_cc_assoc_req_test(void)
+{
+ station_t sta;
+ tei_t tei;
+ msg_mme_t *msg;
+ cc_assoc_req_t *cc_assoc_req;
+ msg_param_t msg_param;
+ u8 buf[1518];
+
+ // init the station with it default parameters
+ cp_station_data_init(NULL, NULL, NULL);
+ // associate 2 sta for test purpose
+ sta.cco_capa = true;
+ memcpy(sta.mac_address, "ABCEDF", sizeof(mac_address_t));
+ sta.proxy_net_capa = 0;
+ sta.station_status = STATION_UNASSOCIATED;
+ tei = cp_station_associate_new(sta);
+ if(tei != 1) return 1;
+ // add a new created station
+ sta.cco_capa = true;
+ memcpy(sta.mac_address, "GHIJKL", sizeof(mac_address_t));
+ sta.proxy_net_capa = 0;
+ sta.station_status = STATION_UNASSOCIATED;
+ tei = cp_station_associate_new(sta);
+ if(tei != 2) return 2;
+ // simulate the reception of a cc_assoc_req
+ // 1) construct the message
+ msg = msg_sending_common_part((msg_mme_t *)buf, "IJKLMN", &msg_param);
+ msg->mm_type = CC_ASSOC_REQ;
+ memcpy(&msg->osa, "HELLO!", 6);
+ // set the message values ( 11.2.28 )
+ cc_assoc_req = (cc_assoc_req_t *) & msg->mm_entry;
+ cc_assoc_req->cco_capability = cp_station_get_cco_capa();
+ cc_assoc_req->nid = cp_station_get_nid();
+ cc_assoc_req->proxy_networking_capability = 0;
+ cc_assoc_req->req_type = 0;
+ // 2) simulate it reception
+ process_cc_assoc_req(msg);
+
+ return 0;
+}
+
+/*
+ * running the thread used for testing
+ */
+int station_run_testing_thread(void)
+{
+ /*
+ int_station_t int_sta_global;
+ phy_t *phy_ctx;
+ ca_t *ca_ctx;
+
+ // do the station init procedure
+ int_sta_global.mac_store = mac_store_init ();
+
+ int_sta_global.mac_config = blk_alloc ();
+ int_sta_global.mac_config->rts_broadcast = false;
+ int_sta_global.mac_config->fc_symbols_nb = 1;
+ int_sta_global.mac_config->ntb_offset_tck = 0;
+ tonemask_default ((u8*) &int_sta_global.mac_config->tonemask_info);
+ tonemask_update (&int_sta_global.mac_config->tonemask_info);
+
+// int_sta_global.pbproc = pbproc_init (int_sta_global.mac_config, int_sta_global.mac_store);
+
+
+// int_sta_global.sar = sar_init (int_sta_global.mac_store,
+// int_sta_global.pbproc, pbproc_get_ca (int_sta_global.pbproc));
+
+// int_sta_global.cl
+// = cl_init (int_sta_global.mac_store, int_sta_global.sar);
+
+// phy_ctx = phy_init (NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+// ca_ctx = ca_init (phy_ctx, int_sta_global.mac_config, int_sta_global.mac_store);
+
+
+ // do the CP init procedure
+ interf_init ();
+ msg_init();
+ secu_init(&sec_m);
+ cp_station_init(int_sta_global.mac_store, int_sta_global.cl, int_sta_global.pbproc, NULL);
+ beacon_init();
+
+ cyg_thread_resume(station_thread_handle);
+ // wait for the thread to start and init
+ cyg_thread_delay(10);
+
+ */
+ return 0;
+}
+
+struct station_test_t
+{
+ int(*func) (void);
+ char func_name[30];
+};
+
+
+int station_test (bool verbose)
+{
+ unsigned int i;
+ int res, return_value = 0;
+ struct station_test_t my_test[]=
+ {
+ {station_event_handler_test, "station_event_handler"},
+ {station_process_usta_test, "station_process_usta"},
+ {associated_sta_test, "associated_sta"},
+ { process_cc_assoc_req_test, "process_cc_assoc_req"},
+
+ {station_run_testing_thread, "sta thread launched"},
+ // from now, it is possible to test function that request the thread
+ // {station_gen_timed_event_test, "station_gen_timed_event"},
+ //{station_unassociated_sta_test, "station_unassociated_sta"}
+ };
+
+ printf ("test du module station\n");
+
+ // for the test, we create a thread STA
+ cyg_thread_create(
+ STA_THREAD_PRIORITY,
+ &cp_station_wait_event,
+ 0,
+ "STA",
+ station_thread_stack,
+ sizeof(station_thread_stack),
+ &station_thread_handle,
+ &station_thread
+ );
+ // and now do the unit tests
+ for (i=0 ; i<COUNT (my_test) ; i++)
+ {
+ res = my_test[i].func ();
+ if(verbose || (res != 0))
+ {
+ printf (" %-50s", my_test[i].func_name);
+ if (res == 0) printf ("OK\n");
+ else printf ("FAILED : %i\n", res);
+ }
+ if(res != 0) return_value++;
+ }
+ // end of the test, we destroy the STA thread
+ cyg_thread_delay(2000);
+ cyg_thread_kill(station_thread_handle);
+
+ if (i != COUNT(my_test)) return 1;
+ return return_value;
+}
+
diff --git a/cesar/cp/test_maximus/.gdbinit b/cesar/cp/test_maximus/.gdbinit
new file mode 100644
index 0000000000..eacb9b1c8a
--- /dev/null
+++ b/cesar/cp/test_maximus/.gdbinit
@@ -0,0 +1,2 @@
+break ca_access_goto_aifs
+continue
diff --git a/cesar/cp/test_maximus/Makefile b/cesar/cp/test_maximus/Makefile
new file mode 100644
index 0000000000..548adaf260
--- /dev/null
+++ b/cesar/cp/test_maximus/Makefile
@@ -0,0 +1,26 @@
+BASE = ../../
+
+ECOS = y
+
+TARGET_PROGRAMS = testCPMaximus
+testCPMaximus_SOURCES = cp_test_maximus.c
+testCPMaximus_MODULES = lib \
+ lib/visual_state_api \
+ cp/interf \
+ cp/msg \
+ cp/station \
+ cp/secu \
+ cp/vstate_fsm \
+ cp/beacon \
+ cl \
+ mac/sar \
+ mac/common \
+ mac/pbproc \
+ mac/ca \
+ hal/phy/maximus \
+ hal/hle/maximus \
+ host \
+ hle \
+ test_general/station
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/cp/test_maximus/ecos.ecc.sh b/cesar/cp/test_maximus/ecos.ecc.sh
new file mode 100644
index 0000000000..7984aef8ed
--- /dev/null
+++ b/cesar/cp/test_maximus/ecos.ecc.sh
@@ -0,0 +1,5 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new maximus default
+cat >> $config <<EOF
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/cp/test_maximus/src/AV_station.c b/cesar/cp/test_maximus/src/AV_station.c
new file mode 100644
index 0000000000..03e0551b66
--- /dev/null
+++ b/cesar/cp/test_maximus/src/AV_station.c
@@ -0,0 +1,598 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file hle-cl-sar-pbproc.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#include "common/std.h"
+#include "host/station.h"
+
+#include "lib/test.h"
+#include "lib/read_word.h"
+
+#include "mac/sar/sar.h"
+#include "cl/cl.h"
+
+#include "hal/hle/ipmbox.h"
+
+#include "test_general/station/int_station.h"
+#include "test_general/station/int_station_fc.h"
+
+#include "cp/test/inc/test_secu.h"
+#include "cp/test/inc/test_msg.h"
+#include "cp/test/inc/test_interf.h"
+#include "cp/test/inc/test_station.h"
+#include "cp/beacon/inc/beacon_types.h"
+
+int_station_t *my_sta;
+
+struct cp_t
+{
+ u8 *mme_tx_buffer;
+};
+typedef struct cp_t cp_t;
+
+cp_t cp;
+
+/* Use to keep a list of rx params in the CE */
+list_t ce_rx_params_list;
+
+struct ce_rx_params_node_t
+{
+ list_node_t node;
+ pbproc_rx_params_t *rx_params;
+};
+typedef struct ce_rx_params_node_t ce_rx_params_node_t;
+
+/////////////////
+
+mac_store_t *mac_store;
+mac_config_t *mac_config;
+pbproc_t *pbproc;
+sar_t *sar;
+cl_t *cl;
+ca_t *ca;
+cp_secu_t sec_m;
+
+#define STA_THREAD_PRIORITY 30
+static unsigned char station_thread_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+static cyg_handle_t station_thread_handle;
+static cyg_thread station_thread;
+
+/*
+ * this will init the cp module, and launch the cp thread
+ */
+int cp_init (mac_store_t *mac_store_ctx, cl_t *interf_cl_ctx, pbproc_t *pbproc)
+{
+ beacon_init ();
+ interf_init ();
+ msg_init ();
+ secu_init (&sec_m);
+ cp_station_init (mac_store_ctx, interf_cl_ctx, pbproc);
+ // creation of the CP thread
+ cyg_thread_create (
+ STA_THREAD_PRIORITY,
+ &station_wait_event,
+ 0,
+ "CP",
+ station_thread_stack,
+ sizeof(station_thread_stack),
+ &station_thread_handle,
+ &station_thread);
+ cyg_thread_resume (station_thread_handle);
+ return 0;
+}
+
+/////////////////
+
+
+/****************** CALL BACKS DEFINITION ****************/
+
+void maximus_cp_mme_recv (void *user, mfs_rx_t *mfs, u8 *buffer, uint length,
+ cl_mme_recv_t *mme_recv)
+{
+ printf ("/***************************************************/\n");
+ printf ("/* STA : %d CP MME RECEIVED */\n",
+ my_sta->mac_config->tei);
+ printf ("/***************************************************/\n");
+ cl_mme_recv_done (my_sta->cl, mme_recv);
+}
+
+void maximus_cp_mme_get (void *user, u8 *buffer)
+{
+ printf ("/***************************************************/\n");
+ printf (" STA : %d CP MME GOT \n",
+ my_sta->mac_config->tei);
+ printf ("/***************************************************/\n");
+
+ cp.mme_tx_buffer = buffer;
+}
+
+/**
+ * Transmit an Ethernet packet.
+ * \param ctx ipmbox context
+ * \param first_msg pointer to the first received message header
+ * \param length total length (in word) of messages to transmit
+ */
+void ipmbox_tx (ipmbox_t *ctx, u32 *first_msg, uint length)
+{
+ printf ("/***************************************************/\n");
+ printf ("/ IPMBOX RECV /\n");
+ printf ("/STA : %d\n", my_sta->mac_config->tei);
+
+ uint type;
+
+ type = *first_msg & 0xFF;
+ switch (type)
+ {
+ case HLE_MSG_TYPE_DATA:
+ length = *first_msg >> 13;
+ if ((*first_msg >> 12) & 0x1)
+ {
+ printf ("[IPMBOX] MME received, length : %d\n", length);
+ }
+ else
+ {
+ printf ("[IPMBOX] Data received, length : %d\n", length);
+ }
+ break;
+ case HLE_MSG_TYPE_SEND_DONE:
+ printf ("[IPMBOX] Send done\n");
+ free ((u8 *) first_msg[1]);
+ break;
+ default:
+ printf ("[IPMBOX] Relase buffer\n");
+ }
+
+ printf ("/***************************************************/\n");
+
+}
+
+/**
+ * Initialise the HAL HLE.
+ * \param user_data user data passed to any callback, contains RX and TX data
+ * \param rx_cb RX callback, callback used when an Ethernet packet is received
+ * \return the newly created context
+ */
+ipmbox_t *ipmbox_init (void *user_data, ipmbox_rx_cb_t rx_cb)
+{
+ return user_data;
+}
+
+/**
+ * CE measurements. To be replace by the CE function to get the measurements
+ *
+ * Pb measurement RX callback for Channel estimation.
+ * This call back will return one or two block in order to insert all the
+ * measurements contained in each PB of the mpdu received.
+ * Two cases can happen, the first the pb_nb is lesser than the blk capacity,
+ * this callback will return only a blk pointed by the first and the last
+ * pointer.
+ * In the second case the quantity of PB are greater than one blk capacity, this
+ * callback will return two blk (chained) the first pointed by the first pointer
+ * and the last one by the last pointer.
+ *
+ * \param user User data
+ * \param rx_params Frame control information to know date and tonemap used
+ * \param number of pbs
+ * \param first blk to insert the measurements.
+ * \param last blk to insert the measurements.
+ * \param chandata chan data measurements
+ *
+ * \return boolean to indicate if a block had been returned or not.
+ */
+bool ce_measurements (void *user, pbproc_rx_params_t *rx_params, uint pb_nb,
+ blk_t **first, blk_t **last, pb_t *chandata)
+{
+ ce_rx_params_node_t *ce_node;
+
+ *first = NULL;
+ *last = NULL;
+
+ dbg_assert (rx_params);
+
+ ce_node = blk_alloc ();
+ list_init_node (&ce_node->node);
+ list_push (&ce_rx_params_list, &ce_node->node);
+ ce_node->rx_params = rx_params;
+
+ if (chandata)
+ {
+ blk_release (chandata);
+ }
+
+ return false;
+}
+
+/*********************** FUNCTIONS ***********************/
+
+/**
+ * Send a data to the PWL
+ *
+ * - packet
+ * - length
+ *
+ * \param fcall the fcall context.
+ * \param param the fcall param
+ * \param msg the message
+ * \param data anything
+ */
+int fc_ipmbox_data_send (fcall_ctx_t *fcall, fcall_param_t **param,
+ sci_msg_t **msg, void *data)
+{
+ uint length;
+ u8 *buffer;
+ uint words[2];
+ mac_t mac;
+
+ length = 0;
+ fcall_param_bind_short (*param, *msg, "length", &length);
+
+ dbg_assert (length);
+
+ buffer = (u8 *) malloc (length * sizeof(u8));
+ fcall_param_bind (*param, *msg, "packet", length * sizeof(u8), buffer);
+
+ mac = read_u32_from_word (buffer);
+ mac = mac << 16;
+ mac = mac | read_u32_from_word (buffer + 4);
+ printf ("[Data SEND] STA : %d TO sta Mac @ : %llx\n",
+ my_sta->mac_config->tei, mac);
+
+ words[0] = HLE_MSG_TYPE_DATA | (1 << 8) | (0 << 12) | (length << 13);
+ words[1] = (uint) buffer;
+
+ hle_ipmbox_recv (my_sta->hle, words, 2);
+
+ fcall_param_reset (*param);
+
+ return true;
+}
+
+/**
+ * Send a MME to the PWL
+ *
+ * - packet
+ * - length
+ *
+ * \param fcall the fcall context.
+ * \param param the fcall param
+ * \param msg the message
+ * \param data anything
+ */
+int fc_ipmbox_mme_send (fcall_ctx_t *fcall, fcall_param_t **param,
+ sci_msg_t **msg, void *data)
+{
+ uint length;
+ u8 *buffer;
+ uint words[2];
+ mac_t mac;
+
+ length = 0;
+ fcall_param_bind_short (*param, *msg, "length", &length);
+
+ dbg_assert (length);
+
+ buffer = (u8 *) malloc (length * sizeof(u8));
+ fcall_param_bind (*param, *msg, "packet", length * sizeof(u8), buffer);
+
+ words[0] = HLE_MSG_TYPE_DATA | (1 << 8) | (1 << 12) | (length << 13);
+ words[1] = (uint) buffer;
+
+ mac = read_u32_from_word (buffer);
+ mac = mac << 16;
+ mac = mac | read_u32_from_word (buffer + 4);
+ printf ("[MME SEND] STA : %d TO sta Mac @ : %llx\n",
+ my_sta->mac_config->tei, mac);
+
+ hle_ipmbox_recv (my_sta->hle, words, 2);
+
+ fcall_param_reset (*param);
+
+ return true;
+}
+
+/**
+ * Add a data buffer
+ *
+ * \param fcall the fcall context.
+ * \param param the fcall param
+ * \param msg the message
+ * \param data anything
+ */
+int fc_ipmbox_data_buffer_add (fcall_ctx_t *fcall, fcall_param_t **param,
+ sci_msg_t **msg, void *data)
+{
+ u8 *buffer;
+ uint words[2];
+
+ buffer = (u8 *) malloc (2048 * sizeof(u8));
+
+ words[0] = HLE_MSG_TYPE_BUFFER_ADD | (1 << 8) | (0 << 12);
+ words[1] = (uint) buffer;
+
+ hle_ipmbox_recv (my_sta->hle, words, 2);
+
+ printf ("[DATA buffer add] STA : %d\n", my_sta->mac_config->tei);
+
+ fcall_param_reset (*param);
+
+ return true;
+}
+
+/**
+ * Add a MME buffer
+ *
+ * \param fcall the fcall context.
+ * \param param the fcall param
+ * \param msg the message
+ * \param data anything
+ */
+int fc_ipmbox_mme_buffer_add (fcall_ctx_t *fcall, fcall_param_t **param,
+ sci_msg_t **msg, void *data)
+{
+ u8 *buffer;
+ uint words[2];
+
+ buffer = (u8 *) malloc (2048 * sizeof(u8));
+
+ words[0] = HLE_MSG_TYPE_BUFFER_ADD | (1 << 8) | (1 << 12);
+ words[1] = (uint) buffer;
+
+ hle_ipmbox_recv (my_sta->hle, words, 2);
+
+ printf ("[MME buffer add] STA : %d\n", my_sta->mac_config->tei);
+
+ fcall_param_reset (*param);
+
+ return true;
+}
+
+/**
+ * Add Msdu to send
+ *
+ * - tei
+ * - bcast
+ * - buffer the buffer containing a frame
+ * - length the buffer length
+ *
+ * \param fcall the fcall context.
+ * \param param the fcall param
+ * \param msg the message
+ * \param data anything
+ */
+int fc_cp_mme_send_as_mme (fcall_ctx_t *fcall, fcall_param_t **param,
+ sci_msg_t **msg, void *data)
+{
+ uint length;
+ u8 *buffer;
+ uint tei;
+ uint bcast;
+
+ mfs_tx_t *mfs;
+
+ length = 0;
+ tei = 0;
+ bcast = 0;
+
+ fcall_param_bind_short (*param, *msg, "length", &length);
+ fcall_param_bind_short (*param, *msg, "tei", &tei);
+ fcall_param_bind_short (*param, *msg, "bcast", &bcast);
+
+ buffer = (u8 *) malloc (length * sizeof (length));
+ fcall_param_bind (*param, *msg, "buffer", length * sizeof(u8), buffer);
+
+ mfs = mac_store_mfs_get_tx (my_sta->mac_store, bcast, true, MAC_LID_NONE,
+ tei);
+ dbg_assert (mfs);
+
+ cl_mme_send_as_mme (my_sta->cl, buffer, length, mfs);
+
+ printf ("[CP send MME] STA : %d to tei : %d\n", my_sta->mac_config->tei,
+ tei);
+
+ blk_release (mfs);
+
+ fcall_param_reset (*param);
+
+ return true;
+}
+
+/**
+ * Add Msdu to send
+ *
+ * - tei
+ * - bcast
+ * - buffer the buffer containing a frame
+ * - length the buffer length
+ *
+ * \param fcall the fcall context.
+ * \param param the fcall param
+ * \param msg the message
+ * \param data anything
+ */
+int fc_cp_mme_send_as_data (fcall_ctx_t *fcall, fcall_param_t **param,
+ sci_msg_t **msg, void *data)
+{
+ uint length;
+ u8 *buffer;
+ mac_t mac;
+
+ length = 0;
+
+ fcall_param_bind_short (*param, *msg, "length", &length);
+
+ buffer = (u8 *) malloc (length * sizeof (length));
+ fcall_param_bind (*param, *msg, "buffer", length * sizeof(u8), buffer);
+
+ cl_mme_send_as_data (my_sta->cl, buffer, length);
+
+ mac = read_u32_from_word (buffer);
+ mac = mac << 16;
+ mac = mac | read_u32_from_word (buffer + 4);
+ printf ("[CP send MME] STA : %d to MAC @ : %llx\n",
+ my_sta->mac_config->tei, mac);
+
+ fcall_param_reset (*param);
+
+ return true;
+}
+
+/**
+ * Uninit the station and returns the result of the memory test
+ *
+ * \param fcall the fcall context.
+ * \param param the fcall param
+ * \param msg the message
+ * \param data anything
+ */
+int fc_station_uninit (fcall_ctx_t *fcall, fcall_param_t **param,
+ sci_msg_t **msg, void *data)
+{
+ static fcall_param_t return_param;
+ static sci_msg_t return_msg;
+ static unsigned char return_buffer[SCI_MSG_MAX_SIZE];
+
+ ce_rx_params_node_t *ce_node;
+ uint result;
+
+ uint msg_id = (*param)->msg_id;
+
+ while (!list_empty (&ce_rx_params_list))
+ {
+ ce_node = PARENT_OF (ce_rx_params_node_t, node,
+ list_pop (&ce_rx_params_list));
+
+ blk_release (ce_node->rx_params);
+ blk_release (ce_node);
+ }
+
+ /** reset the param list **/
+ fcall_param_init (&return_param, "sta_end", msg_id);
+ sci_msg_init (&return_msg, return_buffer, SCI_MSG_MAX_SIZE);
+ /* init the params */
+ fcall_param_reset (&return_param);
+
+ result = blk_check_memory ();
+ fcall_param_add (&return_param, &return_msg, "memory", sizeof(uint),
+ (unsigned char *) &result);
+
+ int_station_uninit (my_sta);
+
+ /* return */
+ fcall_return (my_station.fcall, &return_param, &return_msg);
+
+ return blk_check_memory ();
+}
+
+int_station_t int_sta_global;
+
+/**
+ * Init the station and returns the result of the memory test
+ *
+ * \return ctx the int_station context.
+ */
+int_station_t *int_station_init2 (void)
+{
+ trace_init ();
+
+ int_sta_global.mac_store = mac_store_init ();
+
+ int_sta_global.mac_config = blk_alloc ();
+ mac_config_init (int_sta_global.mac_config);
+
+ int_sta_global.pbproc = pbproc_init (int_sta_global.mac_config,
+ int_sta_global.mac_store);
+
+ int_sta_global.sar = sar_init (int_sta_global.mac_store,
+ int_sta_global.pbproc, pbproc_get_ca (int_sta_global.pbproc));
+
+ int_sta_global.cl
+ = cl_init (int_sta_global.mac_store, int_sta_global.sar, int_sta_global.mac_config);
+
+ int_sta_global.hle = hle_init (int_sta_global.cl);
+
+ // Create the Thread for the SAR.
+ cyg_thread_create (9, &sar_process, (cyg_addrword_t) int_sta_global.sar,
+ "SAR", sar_stack, CYGNUM_HAL_STACK_SIZE_TYPICAL,
+ &int_sta_global.sar_handle, &int_sta_global.sar_thread);
+ cyg_thread_resume (int_sta_global.sar_handle);
+
+ printf ("[STATION] SAR launched\n");
+
+ list_init (&int_sta_global.tei_list);
+
+ cp_init (int_sta_global.mac_store, int_sta_global.cl, int_sta_global.pbproc);
+
+ return &int_sta_global;
+}
+
+/** Function called by maximus*/
+int main (void)
+{
+ my_sta = int_station_init2 ();
+
+// station_log_set_level (&my_station, STATION_LOG_DEBUG);
+// station_log_set_mask (&my_station, STATION_LOGTYPE_ALL);
+ my_station.pipe_log_fd = 1;
+
+ list_init (&ce_rx_params_list);
+
+ trace_init ();
+
+ // Configure the CP
+ cl_mme_recv_init (my_sta->cl, maximus_cp_mme_recv, NULL);
+ cl_mme_init_buffer_add_cb (my_sta->cl, maximus_cp_mme_get, &cp);
+
+ sar_init_measure_context (my_sta->sar, my_sta->sar);
+ sar_init_measurement_cb (my_sta->sar, ce_measurements);
+
+ sar_init_measure_context (my_sta->sar, my_sta->sar);
+ sar_init_measurement_cb (my_sta->sar, ce_measurements);
+
+ fcall_register (my_station.fcall, "fc_station_link_add",
+ &fc_station_link_add, NULL);
+
+ fcall_register (my_station.fcall, "fc_station_link_remove",
+ &fc_station_link_remove, NULL);
+
+ fcall_register (my_station.fcall, "fc_station_init_config",
+ &fc_station_init_config, NULL);
+
+ fcall_register (my_station.fcall, "fc_station_discover",
+ &fc_station_discover, NULL);
+
+ fcall_register (my_station.fcall, "fc_station_uninit",
+ &fc_station_uninit, NULL);
+
+ fcall_register (my_station.fcall, "fc_ipmbox_data_send",
+ &fc_ipmbox_data_send, NULL);
+
+ fcall_register (my_station.fcall, "fc_ipmbox_mme_send",
+ &fc_ipmbox_mme_send, NULL);
+
+ fcall_register (my_station.fcall, "fc_ipmbox_data_buffer_add",
+ &fc_ipmbox_data_buffer_add, NULL);
+
+ fcall_register (my_station.fcall, "fc_ipmbox_mme_buffer_add",
+ &fc_ipmbox_mme_buffer_add, NULL);
+
+ fcall_register (my_station.fcall, "fc_cp_mme_send_as_data",
+ &fc_cp_mme_send_as_data, NULL);
+
+ fcall_register (my_station.fcall, "fc_cp_mme_send_as_mme",
+ &fc_cp_mme_send_as_mme, NULL);
+
+ list_init (&ce_rx_params_list);
+
+ return true;
+}
diff --git a/cesar/cp/test_maximus/src/Maximus.py b/cesar/cp/test_maximus/src/Maximus.py
new file mode 100644
index 0000000000..b0d38855a7
--- /dev/null
+++ b/cesar/cp/test_maximus/src/Maximus.py
@@ -0,0 +1,198 @@
+#!/usr/bin/env python
+
+import sys
+sys.path.append('../../maximus/python/obj');
+sys.path.append('../../maximus/python/');
+
+from interface import *
+from maximus import *
+from struct import *
+
+def my_eth_filter(eth):
+ try:
+ eth.get_type()
+ return True
+ except:
+ return False
+
+maximus = Maximus()
+maximus.init (sys.argv)
+
+# TEI of station 1 will be 1
+station1 = maximus.create_sta()
+#station1.debug()
+
+## TEI of station 2 will be 2
+#station2 = maximus.create_sta()
+##station2.debug()
+
+#fc1 = maximus.create_fcall ("fc_station_init_config")
+#fc1.set_sta (station1)
+#fc1.add_param_ushort ("snid", 1)
+#fc1.add_param_ushort ("tei", 1)
+#fc1.add_param_ushort ("auto", 1)
+#fc1.send()
+
+#fc2 = maximus.create_fcall ("fc_station_init_config")
+#fc2.set_sta (station2)
+#fc2.add_param_ushort ("snid", 1)
+#fc2.add_param_ushort ("tei", 2)
+#fc2.add_param_ushort ("auto", 1)
+#fc2.send()
+
+##neighbour discovery
+#fc1 = maximus.create_fcall ("fc_station_discover")
+#fc1.set_sta (station1)
+#fc1.add_param_ushort ("qte", 1)
+#fc1.add_param_ushort ("tei0", 2)
+#param = pack ('Q', 0x123456789abc)[0:6]
+#fc1.add_param ("mac0", param)
+#fc1.send()
+
+#fc2 = maximus.create_fcall ("fc_station_discover")
+#fc2.set_sta (station2)
+#fc2.add_param_ushort ("qte", 1)
+#fc2.add_param_ushort ("tei0", 1)
+#param = pack ('Q', 0x23456789abcd)[0:6]
+#fc2.add_param ("mac0", param)
+#fc2.send()
+
+#fc1 = maximus.create_fcall ("fc_station_link_add")
+#fc1.set_sta (station1)
+#fc1.add_param_ushort ("type", 1)
+#fc1.add_param_ushort ("bcast", 0)
+#fc1.add_param_ushort ("mme", 0)
+#fc1.add_param_ushort ("lid", 1)
+#fc1.add_param_ushort ("tei", 2)
+#fc1.send()
+
+#fc1 = maximus.create_fcall ("fc_station_link_add")
+#fc1.set_sta (station1)
+#fc1.add_param_ushort ("type", 1)
+#fc1.add_param_ushort ("bcast", 0)
+#fc1.add_param_ushort ("mme", 1)
+#fc1.add_param_ushort ("lid", 248)
+#fc1.add_param_ushort ("tei", 2)
+#fc1.send()
+
+#fc2 = maximus.create_fcall ("fc_station_link_add")
+#fc2.set_sta (station2)
+#fc2.add_param_ushort ("type", 0)
+#fc2.add_param_ushort ("bcast", 0)
+#fc2.add_param_ushort ("mme", 0)
+#fc2.add_param_ushort ("lid", 1)
+#fc2.add_param_ushort ("tei", 1)
+#fc2.send()
+
+#fc2 = maximus.create_fcall ("fc_station_link_add")
+#fc2.set_sta (station2)
+#fc2.add_param_ushort ("type", 0)
+#fc2.add_param_ushort ("bcast", 0)
+#fc2.add_param_ushort ("mme", 1)
+#fc2.add_param_ushort ("lid", 248)
+#fc2.add_param_ushort ("tei", 1)
+#fc2.send()
+
+## Add a buffer to the SAR
+#alloc_data_buffer (maximus, station2)
+
+##sends three buffers to the station 2
+#alloc_data_buffer (maximus, station2)
+#alloc_data_buffer (maximus, station2)
+#alloc_data_buffer (maximus, station2)
+
+##create three Ethernet Packets
+
+
+## read the ethernet full packet
+#packet_file = open ('../packet_max','r')
+#packet = packet_file.read()
+
+##first ethernet pack of 1500 bytes.
+#pack1 = packet
+
+##second one 424 bytes of length
+#pack2 = packet[0:423]
+
+##third one 1240 bytes
+#pack3 = packet[0:1239]
+
+##First one
+#frame0 = Eth()
+#frame0.src = '23:45:67:89:ab:cd'
+#frame0.dst = '12:34:56:78:9a:bc'
+#frame0.vlantag = 0x4D4E4F50
+#frame0.type = 0x5152
+#frame0.payload = pack1
+#frame0.send (maximus, station1)
+
+##Second frame
+#frame1 = Eth()
+#frame1.src = '23:45:67:89:ab:cd'
+#frame1.dst = '12:34:56:78:9a:bc'
+#frame1.vlantag = 0x4D4E4F50
+#frame1.type = 0x5152
+#frame1.payload = pack2;
+#frame1.send (maximus, station1)
+
+##third frame
+#frame2 = Eth()
+#frame2.src = '23:45:67:89:ab:cd'
+#frame2.dst = '12:34:56:78:9a:bc'
+#frame2.vlantag = 0x4D4E4F50
+#frame2.type = 0x5152
+#frame2.payload = pack3;
+#frame2.send (maximus, station1)
+
+##Catch the ethernet packets
+#rsp = recv(maximus, count=3, filter=my_eth_filter)
+
+#if (rsp[0].dst != frame0.dst) and (rsp[0].src != frame0.src) and (rsp[0].vlantag != frame0.vlantag) and (rsp[0].type != frame0.type):
+ #print "Frame0 dst dont correspond with the dst mac address of the frame"
+#else:
+ #if frame0.payload != rsp[0].payload:
+ #print "Error the frame 0 payload is deferent from the received one"
+
+maximus.wait (500000000)
+#while not station1.is_idle() and not station2.is_idle():
+ #maximus.wait (10000)
+
+#print the traces of the HLE
+print "\n\n ************** Station 1 Traces *******************\n"
+fc1 = maximus.create_fcall ("fc_hle_print_trace")
+fc1.set_sta (station1)
+fc1.send()
+
+print ""
+fc1 = maximus.create_fcall ("fc_cl_print_trace")
+fc1.set_sta (station1)
+fc1.send()
+
+print ""
+fc1 = maximus.create_fcall ("fc_sar_print_trace")
+fc1.set_sta (station1)
+fc1.send()
+
+print "\n\n ************ Station 1 Traces END ******************\n"
+
+station1.remove()
+
+##print the traces of the HLE
+#print "\n\n ************** Station 2 Traces *******************\n"
+#fc1 = maximus.create_fcall ("fc_hle_print_trace")
+#fc1.set_sta (station2)
+#fc1.send()
+
+#print ""
+#fc1 = maximus.create_fcall ("fc_cl_print_trace")
+#fc1.set_sta (station2)
+#fc1.send()
+
+#print ""
+#fc1 = maximus.create_fcall ("fc_sar_print_trace")
+#fc1.set_sta (station2)
+#fc1.send()
+
+#print "\n\n ************ Station 2 Traces END ******************\n"
+
+#station2.remove()
diff --git a/cesar/cp/test_maximus/src/cp_test_maximus.c b/cesar/cp/test_maximus/src/cp_test_maximus.c
new file mode 100644
index 0000000000..ab7e85e12c
--- /dev/null
+++ b/cesar/cp/test_maximus/src/cp_test_maximus.c
@@ -0,0 +1,375 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file hle-cl-sar-pbproc.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#include "common/std.h"
+#include "host/station.h"
+
+#include "lib/test.h"
+#include "lib/trace.h"
+#include "lib/read_word.h"
+#include "lib/restrack.h"
+
+#include "mac/sar/sar.h"
+#include "cl/cl.h"
+
+#include "hal/hle/ipmbox.h"
+
+#include "test_general/station/int_station.h"
+#include "test_general/station/int_station_fc.h"
+
+#include "cp/test/inc/test_secu.h"
+#include "cp/test/inc/test_msg.h"
+#include "cp/test/inc/test_interf.h"
+#include "cp/test/inc/test_station.h"
+#include "cp/beacon/inc/beacon_types.h"
+
+
+int_station_t *my_sta;
+cp_secu_t sec_m;
+
+#define STA_THREAD_PRIORITY 30
+static unsigned char station_thread_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+static cyg_handle_t station_thread_handle;
+static cyg_thread station_thread;
+
+struct cp_t
+{
+ u8 *mme_tx_buffer;
+};
+typedef struct cp_t cp_t;
+
+cp_t cp;
+
+/* Use to keep a list of rx params in the CE */
+list_t ce_rx_params_list;
+
+struct ce_rx_params_node_t
+{
+ list_node_t node;
+ pbproc_rx_params_t *rx_params;
+};
+typedef struct ce_rx_params_node_t ce_rx_params_node_t;
+
+/****************** CALL BACKS DEFINITION ****************/
+
+void maximus_cp_mme_recv (void *user, mfs_rx_t *mfs, u8 *buffer, uint length,
+ cl_mme_recv_t *mme_recv)
+{
+ printf ("/***************************************************/\n");
+ printf ("/* STA : %d CP MME RECEIVED */\n",
+ my_sta->mac_config->tei);
+ printf ("/***************************************************/\n");
+ cl_mme_recv_done (my_sta->cl, mme_recv);
+}
+
+void maximus_cp_mme_get (void *user, u8 *buffer)
+{
+ printf ("/***************************************************/\n");
+ printf (" STA : %d CP MME BUFFER GOT\n",
+ my_sta->mac_config->tei);
+ printf ("/***************************************************/\n");
+
+ cp.mme_tx_buffer = buffer;
+}
+
+/**
+ * CE measurements. To be replace by the CE function to get the measurements
+ *
+ * Pb measurement RX callback for Channel estimation.
+ * This call back will return one or two block in order to insert all the
+ * measurements contained in each PB of the mpdu received.
+ * Two cases can happen, the first the pb_nb is lesser than the blk capacity,
+ * this callback will return only a blk pointed by the first and the last
+ * pointer.
+ * In the second case the quantity of PB are greater than one blk capacity, this
+ * callback will return two blk (chained) the first pointed by the first pointer
+ * and the last one by the last pointer.
+ *
+ * \param user User data
+ * \param rx_params Frame control information to know date and tonemap used
+ * \param number of pbs
+ * \param first blk to insert the measurements.
+ * \param last blk to insert the measurements.
+ * \param chandata chan data measurements
+ *
+ * \return boolean to indicate if a block had been returned or not.
+ */
+bool ce_measurements (void *user, pbproc_rx_params_t *rx_params, uint pb_nb,
+ blk_t **first, blk_t **last, pb_t *chandata)
+{
+ ce_rx_params_node_t *ce_node;
+
+ *first = NULL;
+ *last = NULL;
+
+ dbg_assert (rx_params);
+
+ ce_node = blk_alloc ();
+ list_init_node (&ce_node->node);
+ list_push (&ce_rx_params_list, &ce_node->node);
+ ce_node->rx_params = rx_params;
+
+ if (chandata)
+ {
+ blk_release (chandata);
+ }
+
+ return false;
+}
+
+/*********************** FUNCTIONS ***********************/
+
+/**
+ * Add Msdu to send
+ *
+ * - tei
+ * - bcast
+ * - buffer the buffer containing a frame
+ * - length the buffer length
+ *
+ * \param fcall the fcall context.
+ * \param param the fcall param
+ * \param msg the message
+ * \param data anything
+ */
+int fc_cp_mme_send_as_mme (fcall_ctx_t *fcall, fcall_param_t **param,
+ sci_msg_t **msg, void *data)
+{
+ uint length;
+ uint tei;
+ uint bcast;
+ u8 *buff;
+
+ mfs_tx_t *mfs;
+
+ length = 0;
+ tei = 0;
+ bcast = 0;
+
+ fcall_param_bind_short (*param, *msg, "length", &length);
+ fcall_param_bind_short (*param, *msg, "tei", &tei);
+ fcall_param_bind_short (*param, *msg, "bcast", &bcast);
+
+ if (cp.mme_tx_buffer)
+ {
+ fcall_param_bind (*param, *msg, "buffer", length * sizeof(u8), cp.mme_tx_buffer);
+
+ mfs = mac_store_mfs_get_tx (my_sta->mac_store, bcast, true, MAC_LID_NONE, tei);
+ dbg_assert (mfs);
+
+ buff = cp.mme_tx_buffer;
+ cp.mme_tx_buffer = NULL;
+ cl_mme_send_as_mme (my_sta->cl, buff, length, mfs);
+
+ printf ("[CP send MME] STA : %d to tei : %d\n", my_sta->mac_config->tei,
+ tei);
+
+ blk_release (mfs);
+ }
+ else
+ {
+ printf ("[CP send MME] STA : %d No buffer available\n",
+ my_sta->mac_config->tei);
+ }
+
+ fcall_param_reset (*param);
+
+ return true;
+}
+
+/**
+ * Add Msdu to send
+ *
+ * - tei
+ * - bcast
+ * - buffer the buffer containing a frame
+ * - length the buffer length
+ *
+ * \param fcall the fcall context.
+ * \param param the fcall param
+ * \param msg the message
+ * \param data anything
+ */
+int fc_cp_mme_send_as_data (fcall_ctx_t *fcall, fcall_param_t **param,
+ sci_msg_t **msg, void *data)
+{
+ uint length;
+ u8 *buff;
+ mac_t mac;
+
+ length = 0;
+
+ fcall_param_bind_short (*param, *msg, "length", &length);
+
+ if (cp.mme_tx_buffer)
+ {
+ fcall_param_bind (*param, *msg, "buffer", length * sizeof(u8), cp.mme_tx_buffer);
+
+ buff = cp.mme_tx_buffer;
+ cp.mme_tx_buffer = NULL;
+ cl_mme_send_as_data (my_sta->cl, buff, length);
+
+ mac = read_u32_from_word (buff);
+ mac = mac << 16;
+ mac = mac | read_u32_from_word (buff + 4);
+ printf ("[CP send MME] STA : %d to MAC @ : %llx\n",
+ my_sta->mac_config->tei, mac);
+ }
+ else
+ {
+ printf ("[CP send MME] STA : %d No buffer available\n",
+ my_sta->mac_config->tei);
+ }
+
+ fcall_param_reset (*param);
+
+ return true;
+}
+
+/**
+ * Uninit the station and returns the result of the memory test
+ *
+ * \param fcall the fcall context.
+ * \param param the fcall param
+ * \param msg the message
+ * \param data anything
+ */
+int fc_station_uninit (fcall_ctx_t *fcall, fcall_param_t **param,
+ sci_msg_t **msg, void *data)
+{
+ static fcall_param_t return_param;
+ static sci_msg_t return_msg;
+ static unsigned char return_buffer[SCI_MSG_MAX_SIZE];
+
+ ce_rx_params_node_t *ce_node;
+ uint result;
+
+ uint msg_id = (*param)->msg_id;
+
+ while (!list_empty (&ce_rx_params_list))
+ {
+ ce_node = PARENT_OF (ce_rx_params_node_t, node,
+ list_pop (&ce_rx_params_list));
+
+ blk_release (ce_node->rx_params);
+ blk_release (ce_node);
+ }
+
+ /** reset the param list **/
+ fcall_param_init (&return_param, "sta_end", msg_id);
+ sci_msg_init (&return_msg, return_buffer, SCI_MSG_MAX_SIZE);
+ /* init the params */
+ fcall_param_reset (&return_param);
+
+ result = blk_check_memory ();
+ fcall_param_add (&return_param, &return_msg, "memory", sizeof(uint),
+ (unsigned char *) &result);
+
+ int_station_uninit (my_sta);
+
+ /* return */
+ fcall_return (my_station.fcall, &return_param, &return_msg);
+
+ return blk_check_memory ();
+}
+
+int cp_init (mac_store_t *mac_store_ctx, cl_t *interf_cl_ctx, pbproc_t *pbproc, ca_t *ca_ctx)
+{
+ dbg_assert(mac_store_ctx);
+ dbg_assert(interf_cl_ctx);
+ dbg_assert(pbproc);
+ dbg_assert(ca_ctx);
+
+ interf_init (interf_cl_ctx);
+ msg_init ();
+ secu_init (&sec_m);
+ cp_station_init (mac_store_ctx, interf_cl_ctx, pbproc, ca_ctx);
+ beacon_init ();
+ // creation of the CP thread
+ cyg_thread_create (
+ STA_THREAD_PRIORITY,
+ &cp_station_wait_event,
+ 0,
+ "CP",
+ station_thread_stack,
+ sizeof(station_thread_stack),
+ &station_thread_handle,
+ &station_thread);
+ cyg_thread_resume (station_thread_handle);
+ return 0;
+}
+
+
+/** Function called by maximus*/
+int main (void)
+{
+ my_sta = int_station_init ();
+
+ cp_init (my_sta->mac_store, my_sta->cl, my_sta->pbproc, NULL);
+
+
+ list_init (&ce_rx_params_list);
+
+ trace_init ();
+
+ list_init (&ce_rx_params_list);
+
+ trace_init ();
+
+ /* Configure the CP */
+ cl_mme_recv_init (my_sta->cl, maximus_cp_mme_recv, NULL);
+ cl_mme_init_buffer_add_cb (my_sta->cl, maximus_cp_mme_get, &cp);
+
+ sar_init_measure_context (my_sta->sar, my_sta->sar);
+ sar_init_measurement_cb (my_sta->sar, ce_measurements);
+
+ sar_init_measure_context (my_sta->sar, my_sta->sar);
+ sar_init_measurement_cb (my_sta->sar, ce_measurements);
+
+ fcall_register (my_station.fcall, "fc_station_link_add",
+ &fc_station_link_add, NULL);
+
+ fcall_register (my_station.fcall, "fc_station_link_remove",
+ &fc_station_link_remove, NULL);
+
+ fcall_register (my_station.fcall, "fc_station_init_config",
+ &fc_station_init_config, NULL);
+
+ fcall_register (my_station.fcall, "fc_station_discover",
+ &fc_station_discover, NULL);
+
+ fcall_register (my_station.fcall, "fc_station_uninit",
+ &fc_station_uninit, NULL);
+
+ fcall_register (my_station.fcall, "fc_cp_mme_send_as_data",
+ &fc_cp_mme_send_as_data, NULL);
+
+ fcall_register (my_station.fcall, "fc_cp_mme_send_as_mme",
+ &fc_cp_mme_send_as_mme, NULL);
+
+ fcall_register (my_station.fcall, "fc_hle_print_trace",
+ &fc_hle_print_trace, NULL);
+
+ fcall_register (my_station.fcall, "fc_cl_print_trace",
+ &fc_cl_print_trace, NULL);
+
+ fcall_register (my_station.fcall, "fc_sar_print_trace",
+ &fc_sar_print_trace, NULL);
+
+
+ list_init (&ce_rx_params_list);
+
+ return true;
+}
diff --git a/cesar/cp/vstate_fsm/Module b/cesar/cp/vstate_fsm/Module
new file mode 100644
index 0000000000..327d9f3ff5
--- /dev/null
+++ b/cesar/cp/vstate_fsm/Module
@@ -0,0 +1,3 @@
+SOURCES := main_fsm.c main_fsmData.c sta_connection.c sta_connectionData.c
+INCLUDES += cp/vstate_fsm/src
+ \ No newline at end of file
diff --git a/cesar/cp/vstate_fsm/ecos.ecc.sh b/cesar/cp/vstate_fsm/ecos.ecc.sh
new file mode 100644
index 0000000000..8253d98c9a
--- /dev/null
+++ b/cesar/cp/vstate_fsm/ecos.ecc.sh
@@ -0,0 +1,5 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new linux default
+cat >> $config <<EOF
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/cp/vstate_fsm/src/SEMEDef.h b/cesar/cp/vstate_fsm/src/SEMEDef.h
new file mode 100644
index 0000000000..f347525716
--- /dev/null
+++ b/cesar/cp/vstate_fsm/src/SEMEDef.h
@@ -0,0 +1,178 @@
+/*
+ * Id: SEMEDef.h
+ *
+ * Function: SEM Defines Header File.
+ *
+ * Generated: Fri Feb 15 11:49:29 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __SEMEDEF_H
+#define __SEMEDEF_H
+
+
+/*
+ * Include SEM Types Header File.
+ */
+#include "SEMTypes.h"
+
+
+#if (VS_CODER_GUID != 0X01188aba8)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+/*
+ * Conditional Compilation Definitions for the API only.
+ */
+#define SEM_RDHW_TYPE_1 1
+#define SEM_RDHW_TYPE_2 0
+#define SEM_RDHW_TYPE_3 0
+#define SEM_RDHW_WIDTH_16_BIT 1
+#define SEM_RDHW_WIDTH_24_BIT 0
+#define SEM_RDHW_WIDTH_32_BIT 0
+#define SEM_RDHW_WIDTH_48_BIT 0
+#define SEM_RDHW_WIDTH_64_BIT 0
+#define SEM_RD_WIDTH_8_BIT 0
+#define SEM_RD_WIDTH_16_BIT 1
+#define SEM_RD_WIDTH_32_BIT 0
+#define SEM_RDFM_NUMBER 4
+#define SEM_EVENT_GROUP_INDEX 1
+#define SEM_EVENT_GROUP_TABLE_INDEX 0
+#define SEM_SIGNAL_QUEUE_ERROR_IF_FULL 1
+#define SEM_SIGNAL_QUEUE_NO_ERROR_IF_FULL 0
+#define SEM_RMN_ACTIONS 4
+#define SEM_RMN_GUARDS 0
+#define SEM_RMN_NEGATIVE_STATE_SYNCS 1
+#define SEM_RMN_NEXT_STATES 10
+#define SEM_RMN_POSITIVE_STATE_SYNCS 5
+#define SEM_RMN_SIGNALS 0
+#define SEM_SIGNAL 0
+
+
+/*
+ * Conditional Compilation Definitions.
+ */
+#define SEM_FUNCEXPHANDLING 0
+#define SEM_GUARD_EXPRESSION 0
+#define SEM_SIGNAL_DB 0
+#define VS_REALLINKMODE 0
+#define VS_USE_HEAP 1
+
+
+/*
+ * Undefined State.
+ */
+#define STATE_UNDEFINED 0X0FF /* 255 */
+
+
+/*
+ * Undefined Event.
+ */
+#define EVENT_UNDEFINED 0X0FF /* 255 */
+
+
+/*
+ * Undefined Event Group.
+ */
+#define EVENT_GROUP_UNDEFINED 0X0FFFF /* 65535 */
+
+
+/*
+ * Event Termination ID.
+ */
+#define EVENT_TERMINATION_ID 0X0FF /* 255 */
+
+
+/*
+ * Action Expression Termination ID.
+ */
+#define ACTION_EXPRESSION_TERMINATION_ID 0X0FF /* 255 */
+
+
+#ifdef SE_EXPERTDLL
+#include <stdio.h>
+#endif
+
+
+#if (SEM_RD_WIDTH_8_BIT)
+#define SEM_RULE_DATA_TYPE VS_UINT8
+#elif (SEM_RD_WIDTH_16_BIT)
+#define SEM_RULE_DATA_TYPE VS_UINT16
+#elif (SEM_RD_WIDTH_32_BIT)
+#define SEM_RULE_DATA_TYPE VS_UINT32
+#else
+#error Invalid files, contact the vendor
+#endif
+
+
+/*
+ * Type qualifier macros
+ */
+#define VS_TQ_RULEBASE const
+#define VS_TQ_GUARDEXPRCOL const
+#define VS_TQ_ACTIONEXPRCOL const
+#define VS_TQ_CONTEXT
+
+
+/*
+ * Functional expression type definitions
+ */
+struct SEM_CONTEXT;
+typedef VS_BOOL (* VS_GUARDEXPR_TYPE) (struct SEM_CONTEXT VS_TQ_CONTEXT * );
+typedef VS_VOID (* VS_ACTIONEXPR_TYPE) (struct SEM_CONTEXT VS_TQ_CONTEXT * );
+
+
+/*
+ * SEM Library Datatype Definition.
+ */
+typedef struct SEM_CONTEXT
+{
+ SEM_STATE_TYPE VS_TQ_CONTEXT * pCSV;
+ SEM_STATE_TYPE VS_TQ_CONTEXT * pWSV;
+ SEM_STATE_TYPE VS_TQ_CONTEXT * pIns;
+ VS_UINT8 Status;
+ VS_UINT8 EventGroupType;
+ VS_UINT8 State;
+ VS_UINT8 DIt;
+ VS_UINT8 InqAct;
+ VS_UINT8 StateChange;
+ VS_UINT8 nNofActions;
+ SEM_EVENT_TYPE nNofEvents;
+ SEM_STATE_TYPE nNofStates;
+ SEM_STATE_MACHINE_TYPE nNofStateMachines;
+ SEM_ACTION_FUNCTION_TYPE nNofActionFunctions;
+ SEM_INSTANCE_TYPE nNofInstances;
+ SEM_INSTANCE_TYPE ActIns;
+ SEM_EVENT_TYPE EventNo;
+ SEM_RULE_INDEX_TYPE iRI;
+ SEM_RULE_TABLE_INDEX_TYPE iFirstR;
+ SEM_RULE_TABLE_INDEX_TYPE iLastR;
+ SEM_RULE_INDEX_TYPE iInqRI;
+ SEM_EVENT_TYPE InqEventNo;
+ SEM_EVENT_TYPE InqCurrentEventNo;
+ SEM_EVENT_TYPE InqFoundEventNo;
+ VS_FILE_TYPE * pVSFile;
+ void VS_TQ_RULEBASE * pVSData;
+ SEM_STATE_MACHINE_TYPE VS_TQ_RULEBASE * pSMI;
+ SEM_EVENT_GROUP_TYPE VS_TQ_RULEBASE * pEGT;
+ SEM_EGTI_TYPE VS_TQ_RULEBASE * pEGTI;
+ SEM_RULE_DATA_TYPE VS_TQ_RULEBASE * pRD;
+ SEM_RULE_INDEX_TYPE VS_TQ_RULEBASE * pRI;
+ SEM_RULE_TABLE_INDEX_TYPE VS_TQ_RULEBASE * pRTI;
+ unsigned long VS_TQ_RULEBASE * pENIPos;
+ unsigned long VS_TQ_RULEBASE * pSNIPos;
+ unsigned long VS_TQ_RULEBASE * pANIPos;
+ unsigned long VS_TQ_RULEBASE * pEEIPos;
+ unsigned long VS_TQ_RULEBASE * pSEIPos;
+ unsigned long VS_TQ_RULEBASE * pAEIPos;
+} SEM_CONTEXT;
+
+
+#endif
diff --git a/cesar/cp/vstate_fsm/src/SEMTypes.h b/cesar/cp/vstate_fsm/src/SEMTypes.h
new file mode 100644
index 0000000000..d08e10020b
--- /dev/null
+++ b/cesar/cp/vstate_fsm/src/SEMTypes.h
@@ -0,0 +1,126 @@
+/*
+ * Id: SEMTypes.h
+ *
+ * Function: SEM Types Header File.
+ *
+ * Generated: Fri Feb 15 11:49:29 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __SEMTYPES_H
+#define __SEMTYPES_H
+
+
+#define VS_CODER_GUID 0X01188aba8
+
+
+#include <limits.h>
+
+
+#ifdef SE_EXPERTDLL
+#define VS_FILE_TYPE FILE
+#else
+#define VS_FILE_TYPE void
+#endif
+
+
+#define VS_BOOL unsigned char
+#define VS_UCHAR unsigned char
+#define VS_SCHAR signed char
+#define VS_UINT unsigned int
+#define VS_INT signed int
+#define VS_FLOAT float
+#define VS_DOUBLE double
+#define VS_VOID void
+#define VS_VOIDPTR void*
+
+#if (UCHAR_MAX >= 0x0ff)
+#define VS_UINT8 unsigned char
+#define VS_INT8 signed char
+#elif (USHRT_MAX >= 0x0ff)
+#define VS_UINT8 unsigned short
+#define VS_INT8 signed short
+#elif (UINT_MAX >= 0x0ff)
+#define VS_UINT8 unsigned int
+#define VS_INT8 signed int
+#elif (ULONG_MAX >= 0x0ff)
+#define VS_UINT8 unsigned long
+#define VS_INT8 signed long
+#else
+#define VS_UINT8 (unsupported data type)
+#define VS_INT8 (unsupported data type)
+#endif
+
+#define VS_UINT16_VAARG VS_INT
+#define VS_INT16_VAARG VS_INT
+#if (UCHAR_MAX >= 0x0ffff)
+#define VS_UINT16 unsigned char
+#define VS_INT16 signed char
+#elif (USHRT_MAX >= 0x0ffff)
+#define VS_UINT16 unsigned short
+#define VS_INT16 signed short
+#elif (UINT_MAX >= 0x0ffff)
+#define VS_UINT16 unsigned int
+#define VS_INT16 signed int
+#elif (ULONG_MAX >= 0x0ffff)
+#define VS_UINT16 unsigned long
+#define VS_INT16 signed long
+#undef VS_UINT16_VAARG
+#undef VS_INT16_VAARG
+#define VS_UINT16_VAARG VS_INT16
+#define VS_INT16_VAARG VS_INT16
+#else
+#define VS_UINT16 (unsupported data type)
+#define VS_INT16 (unsupported data type)
+#endif
+
+#define VS_UINT32_VAARG VS_INT
+#define VS_INT32_VAARG VS_INT
+#if (UCHAR_MAX >= 0x0ffffffffUL)
+#define VS_UINT32 unsigned char
+#define VS_INT32 signed char
+#elif (USHRT_MAX >= 0x0ffffffffUL)
+#define VS_UINT32 unsigned short
+#define VS_INT32 signed short
+#elif (UINT_MAX >= 0x0ffffffffUL)
+#define VS_UINT32 unsigned int
+#define VS_INT32 signed int
+#elif (ULONG_MAX >= 0x0ffffffffUL)
+#define VS_UINT32 unsigned long
+#define VS_INT32 signed long
+#undef VS_UINT32_VAARG
+#undef VS_INT32_VAARG
+#define VS_UINT32_VAARG VS_INT32
+#define VS_INT32_VAARG VS_INT32
+#else
+#define VS_UINT32 (unsupported data type)
+#define VS_INT32 (unsupported data type)
+#endif
+
+
+/*
+ * SEM Variable Types.
+ */
+#define SEM_EVENT_TYPE VS_UINT8
+#define SEM_ACTION_EXPRESSION_TYPE VS_UINT8
+#define SEM_GUARD_EXPRESSION_TYPE VS_UINT8
+#define SEM_EXPLANATION_TYPE VS_UINT8
+#define SEM_STATE_TYPE VS_UINT8
+#define SEM_STATE_MACHINE_TYPE VS_UINT16
+#define SEM_INSTANCE_TYPE VS_UINT8
+#define SEM_RULE_INDEX_TYPE VS_UINT16
+#define SEM_INTERNAL_TYPE VS_UINT16
+#define SEM_SIGNAL_QUEUE_TYPE VS_UINT8
+#define SEM_ACTION_FUNCTION_TYPE VS_UINT8
+#define SEM_EVENT_GROUP_TYPE VS_UINT16
+#define SEM_EGTI_TYPE VS_UINT16
+#define SEM_RULE_TABLE_INDEX_TYPE VS_UINT16
+
+
+#endif
diff --git a/cesar/cp/vstate_fsm/src/cesar_cp_PConstant.h b/cesar/cp/vstate_fsm/src/cesar_cp_PConstant.h
new file mode 100644
index 0000000000..3be0a28639
--- /dev/null
+++ b/cesar/cp/vstate_fsm/src/cesar_cp_PConstant.h
@@ -0,0 +1,25 @@
+/*
+ * Id: cesar_cp_PConstant.h
+ *
+ * Function: VS Project Constant File.
+ *
+ * Generated: Fri Feb 15 11:49:29 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __CESAR_CP_PCONSTANT_H
+#define __CESAR_CP_PCONSTANT_H
+
+
+/*
+ * There are no VS Project constants, so this section is intentionally empty!
+ */
+
+
+#endif
diff --git a/cesar/cp/vstate_fsm/src/cesar_cp_PEvent.h b/cesar/cp/vstate_fsm/src/cesar_cp_PEvent.h
new file mode 100644
index 0000000000..4744660f09
--- /dev/null
+++ b/cesar/cp/vstate_fsm/src/cesar_cp_PEvent.h
@@ -0,0 +1,26 @@
+/*
+ * Id: cesar_cp_PEvent.h
+ *
+ * Function: VS Project Event Header File.
+ *
+ * Generated: Fri Feb 15 11:49:29 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __CESAR_CP_PEVENT_H
+#define __CESAR_CP_PEVENT_H
+
+
+/*
+ * Global Event Identifier Definitions.
+ */
+#define SE_RESET 0X000 /* 0 */
+
+
+#endif
diff --git a/cesar/cp/vstate_fsm/src/main_fsm.c b/cesar/cp/vstate_fsm/src/main_fsm.c
new file mode 100644
index 0000000000..ec49aa80f6
--- /dev/null
+++ b/cesar/cp/vstate_fsm/src/main_fsm.c
@@ -0,0 +1,129 @@
+/*
+ * Id: main_fsm.c
+ *
+ * Function: VS System Source File.
+ *
+ * Generated: Fri Feb 15 11:49:29 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+/*
+ * Include VS System Data Header File.
+ */
+#include "main_fsm.h"
+
+
+#if (VS_CODER_GUID != 0X01188aba8)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+#include <stddef.h>
+
+
+/*
+ * VS System Data Declaration and Initialization.
+ *
+ * VS System Informations:
+ * - Rule data format number: 4
+ */
+VSDATAmain_fsm const main_fsm =
+{
+ {
+ 0X000000150, 0X00000002A, 0X000000000,
+ 0X000000017, 0X00000000A, 0X00000000C,
+ 0X000000001, 0X000000000, offsetof(VSDATAmain_fsm, S1) + 0,
+ offsetof(VSDATAmain_fsm, S1) + 46, 0X000000000, offsetof(VSDATAmain_fsm, S1) + 130,
+ offsetof(VSDATAmain_fsm, S1) + 1038, offsetof(VSDATAmain_fsm, S1) + 1174, offsetof(VSDATAmain_fsm, S1) + 1262,
+ 0X000000000, 0X000000000, 0X000000000,
+ 0X000000000, 0X000000000, 0X000000000,
+
+ },
+ {
+ 0X00000, 0X00000, 0X00001, 0X00001, 0X00001, 0X00002, 0X00002, 0X00003,
+ 0X00003, 0X00004, 0X00004, 0X00004, 0X00005, 0X00005, 0X00006, 0X00006,
+ 0X00007, 0X00007, 0X00008, 0X00008, 0X00008, 0X00009, 0X00009, 0X0FFFF,
+ 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF,
+ 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF,
+ 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF,
+ 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X00000, 0X0FFFF,
+ 0X0FFFF, 0X00000, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF, 0X0FFFF,
+ 0X0FFFF, 0X01A00, 0X00001, 0X00003, 0X00005, 0X00008, 0X00015, 0X00009,
+ 0X0000C, 0X0000E, 0X00011, 0X00012, 0X00000, 0X01103, 0X00000, 0X00004,
+ 0X00007, 0X00001, 0X0000C, 0X01104, 0X00000, 0X00004, 0X00008, 0X00016,
+ 0X00001, 0X0000D, 0X01102, 0X00000, 0X00004, 0X00001, 0X0000E, 0X00101,
+ 0X00000, 0X00001, 0X04301, 0X00001, 0X00000, 0X00003, 0X00005, 0X0000F,
+ 0X00003, 0X00001, 0X00007, 0X01101, 0X00001, 0X00001, 0X00010, 0X01101,
+ 0X00001, 0X00001, 0X00011, 0X01101, 0X00001, 0X00001, 0X00012, 0X01101,
+ 0X00001, 0X00001, 0X00013, 0X01101, 0X00001, 0X00001, 0X00014, 0X01101,
+ 0X00001, 0X00001, 0X00015, 0X01101, 0X00001, 0X00001, 0X00016, 0X01101,
+ 0X00001, 0X00001, 0X00017, 0X01101, 0X00001, 0X00001, 0X00018, 0X01101,
+ 0X00001, 0X00001, 0X00019, 0X01101, 0X00001, 0X00001, 0X0001A, 0X01101,
+ 0X00001, 0X00001, 0X0001B, 0X02302, 0X00002, 0X00000, 0X00006, 0X00003,
+ 0X00000, 0X00003, 0X0000A, 0X04502, 0X00002, 0X00000, 0X00007, 0X00004,
+ 0X00000, 0X00011, 0X0000E, 0X0001C, 0X0001D, 0X00006, 0X0001E, 0X03502,
+ 0X00003, 0X00000, 0X00007, 0X00004, 0X00000, 0X00011, 0X0000E, 0X0001D,
+ 0X00006, 0X0001E, 0X02402, 0X00003, 0X00000, 0X00004, 0X00000, 0X00008,
+ 0X00015, 0X0001E, 0X00008, 0X02204, 0X00005, 0X00003, 0X00000, 0X0000C,
+ 0X00002, 0X00000, 0X00009, 0X00004, 0X02203, 0X00006, 0X00003, 0X00000,
+ 0X00002, 0X00000, 0X00009, 0X00004, 0X04204, 0X00000, 0X0000C, 0X00004,
+ 0X00007, 0X00002, 0X00000, 0X0000C, 0X0000E, 0X00009, 0X00004, 0X04304,
+ 0X00000, 0X0000D, 0X00004, 0X00007, 0X00006, 0X00003, 0X00000, 0X0000C,
+ 0X0000E, 0X00003, 0X0000A, 0X01305, 0X00000, 0X00011, 0X00004, 0X00008,
+ 0X00016, 0X00005, 0X00003, 0X00000, 0X0000D, 0X04304, 0X00008, 0X00000,
+ 0X00011, 0X00004, 0X00005, 0X00003, 0X00000, 0X0000E, 0X00003, 0X00001,
+ 0X00007, 0X01304, 0X00000, 0X00004, 0X00008, 0X00016, 0X00006, 0X00003,
+ 0X00000, 0X0000D, 0X03303, 0X00008, 0X00000, 0X00004, 0X00006, 0X00003,
+ 0X00000, 0X0000E, 0X00003, 0X0000A, 0X01202, 0X00002, 0X00000, 0X00002,
+ 0X00000, 0X00004, 0X01202, 0X00003, 0X00000, 0X00003, 0X00000, 0X00003,
+ 0X01103, 0X00003, 0X00000, 0X0000D, 0X00000, 0X0000B, 0X01202, 0X00003,
+ 0X00000, 0X00003, 0X00000, 0X0001F, 0X01202, 0X00003, 0X00000, 0X00003,
+ 0X00000, 0X00020, 0X01303, 0X00005, 0X00003, 0X00000, 0X00006, 0X00003,
+ 0X00000, 0X0000A, 0X01303, 0X00005, 0X00003, 0X00000, 0X00005, 0X00003,
+ 0X00000, 0X00005, 0X01303, 0X00005, 0X00003, 0X00000, 0X00005, 0X00003,
+ 0X00000, 0X00021, 0X01303, 0X00006, 0X00003, 0X00000, 0X00006, 0X00003,
+ 0X00000, 0X00022, 0X03404, 0X00004, 0X00000, 0X0000A, 0X00007, 0X00016,
+ 0X00008, 0X00004, 0X00000, 0X0000C, 0X00008, 0X00023, 0X02303, 0X00007,
+ 0X00004, 0X00000, 0X00007, 0X00004, 0X00000, 0X0000C, 0X00024, 0X02303,
+ 0X00007, 0X00004, 0X00000, 0X00007, 0X00004, 0X00000, 0X0000C, 0X00025,
+ 0X01505, 0X00010, 0X00000, 0X00004, 0X00008, 0X00016, 0X00007, 0X00004,
+ 0X00000, 0X00011, 0X0000E, 0X0000D, 0X02504, 0X00008, 0X00004, 0X00000,
+ 0X00010, 0X00007, 0X00004, 0X00000, 0X00011, 0X0000E, 0X0001D, 0X00006,
+ 0X01505, 0X0000A, 0X00000, 0X00004, 0X00008, 0X00016, 0X00007, 0X00004,
+ 0X00000, 0X00011, 0X0000E, 0X0000D, 0X02504, 0X00008, 0X00004, 0X00000,
+ 0X0000A, 0X00007, 0X00004, 0X00000, 0X00011, 0X0000E, 0X0001D, 0X00006,
+ 0X01304, 0X00008, 0X00004, 0X00000, 0X00016, 0X00008, 0X00004, 0X00000,
+ 0X0000D, 0X02403, 0X00008, 0X00004, 0X00000, 0X00008, 0X00004, 0X00000,
+ 0X00015, 0X00026, 0X00008, 0X01404, 0X00015, 0X00008, 0X00004, 0X00000,
+ 0X00016, 0X00008, 0X00004, 0X00000, 0X00023, 0X01404, 0X00008, 0X00004,
+ 0X00000, 0X00016, 0X00015, 0X00008, 0X00004, 0X00000, 0X0000D, 0X00101,
+ 0X00009, 0X0000B, 0X00101, 0X00009, 0X0000A, 0X00101, 0X0000A, 0X00009,
+ 0X00101, 0X0000B, 0X00009, 0X01101, 0X0000C, 0X0000D, 0X00002, 0X01101,
+ 0X0000D, 0X0000D, 0X00002, 0X00101, 0X0000D, 0X0000C, 0X00101, 0X0000E,
+ 0X0000F, 0X00101, 0X0000F, 0X0000E, 0X00101, 0X00010, 0X00011, 0X00104,
+ 0X00011, 0X00000, 0X00004, 0X00008, 0X00010, 0X00112, 0X00011, 0X00000,
+ 0X00004, 0X00010, 0X00102, 0X00011, 0X00001, 0X00010, 0X00101, 0X00012,
+ 0X00013, 0X00101, 0X00012, 0X00014, 0X00101, 0X00013, 0X00012, 0X00103,
+ 0X00014, 0X00003, 0X00000, 0X00013, 0X00101, 0X00014, 0X00012, 0X00000,
+ 0X00172, 0X000F9, 0X0005A, 0X000E5, 0X00192, 0X00196, 0X0008B, 0X000AA,
+ 0X000B4, 0X0012F, 0X0013B, 0X0019A, 0X001A6, 0X001AC, 0X001B1, 0X0019D,
+ 0X00111, 0X00147, 0X00153, 0X0018C, 0X0018F, 0X00093, 0X0009E, 0X001A3,
+ 0X001A0, 0X00082, 0X000EB, 0X00062, 0X0011D, 0X0015F, 0X00168, 0X00126,
+ 0X00021, 0X0000C, 0X00012, 0X00019, 0X0001E, 0X00046, 0X0002E, 0X0003A,
+ 0X0002A, 0X0003E, 0X00052, 0X00036, 0X0004A, 0X00056, 0X0004E, 0X00042,
+ 0X00032, 0X00101, 0X00109, 0X001B5, 0X001B8, 0X001BB, 0X001C3, 0X001BE,
+ 0X00189, 0X00186, 0X00079, 0X000C0, 0X000C9, 0X000F1, 0X000D3, 0X0017C,
+ 0X000D9, 0X000DF, 0X0006E, 0X00000, 0X00001, 0X00002, 0X00003, 0X00007,
+ 0X0000D, 0X00010, 0X00011, 0X00016, 0X00018, 0X00019, 0X0001A, 0X0001B,
+ 0X0001C, 0X0001E, 0X00020, 0X00021, 0X00022, 0X00026, 0X00027, 0X00028,
+ 0X00029, 0X0002A, 0X0002B, 0X0002C, 0X0002D, 0X0002E, 0X0002F, 0X00030,
+ 0X00031, 0X00032, 0X00034, 0X00035, 0X00036, 0X00038, 0X00039, 0X0003A,
+ 0X0003B, 0X0003C, 0X0003F, 0X00040, 0X00041, 0X00043, 0X00044
+ }
+};
diff --git a/cesar/cp/vstate_fsm/src/main_fsm.h b/cesar/cp/vstate_fsm/src/main_fsm.h
new file mode 100644
index 0000000000..91c7ef7d94
--- /dev/null
+++ b/cesar/cp/vstate_fsm/src/main_fsm.h
@@ -0,0 +1,47 @@
+/*
+ * Id: main_fsm.h
+ *
+ * Function: Include VS System Data Header File.
+ *
+ * Generated: Fri Feb 15 11:49:29 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __MAIN_FSM_H
+#define __MAIN_FSM_H
+
+
+/*
+ * Include SEM Defines Header File.
+ */
+#include "SEMEDef.h"
+
+
+#if (VS_CODER_GUID != 0X01188aba8)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+/*
+ * VS System Datatype Definition.
+ */
+typedef struct
+{
+ VS_UINT32 S0[0X000000016];
+ VS_UINT16 S1[0X00277];
+} VSDATAmain_fsm;
+
+
+/*
+ * External Declaration for VS System Data.
+ */
+extern VSDATAmain_fsm const main_fsm;
+
+
+#endif
diff --git a/cesar/cp/vstate_fsm/src/main_fsmAction.h b/cesar/cp/vstate_fsm/src/main_fsmAction.h
new file mode 100644
index 0000000000..67a398fce1
--- /dev/null
+++ b/cesar/cp/vstate_fsm/src/main_fsmAction.h
@@ -0,0 +1,165 @@
+/*
+ * Id: main_fsmAction.h
+ *
+ * Function: VS System Action Expression Pointer Table Header File.
+ *
+ * Generated: Fri Feb 15 11:49:29 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __MAIN_FSMACTION_H
+#define __MAIN_FSMACTION_H
+
+
+/*
+ * Include SEM Defines Header File.
+ */
+#include "SEMEDef.h"
+
+
+#if (VS_CODER_GUID != 0X01188aba8)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+/*
+ * Action Function Prototypes.
+ */
+extern VS_VOID cp_station_set_assoc_status (VS_BOOL associated);
+extern VS_VOID cp_station_set_auth_status (VS_BOOL is_authenticated);
+extern VS_VOID cp_station_set_cco_status (VS_BOOL is_cco);
+extern VS_VOID init_system (VS_VOID);
+extern VS_VOID launch_bbt_timer (VS_VOID);
+extern VS_VOID launch_beacon_timer (VS_VOID);
+extern VS_VOID launch_ustt_timer (VS_VOID);
+extern VS_VOID process_cc_assoc_cnf (VS_VOIDPTR mme_address);
+extern VS_VOID process_cc_assoc_req (VS_VOIDPTR mme_address);
+extern VS_VOID process_cc_set_tei_map_ind (VS_VOIDPTR mme_address);
+extern VS_VOID process_cc_set_tei_map_req (VS_VOIDPTR mme_address);
+extern VS_VOID process_drv_set_avln_hfid (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_cco_preference (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_dpw_req (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_m_sta_hfid (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_mac_address (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_nid (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_npw (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_sl (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_snid (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_tonemask (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_u_sta_hfid (VS_VOIDPTR msg);
+extern VS_VOID process_drv_set_was_cco (VS_VOIDPTR msg);
+extern VS_VOID process_drv_start_mac_req (VS_VOIDPTR msg);
+extern VS_VOID process_usta_mme (VS_VOIDPTR mme_address);
+extern VS_VOID record_usta_mme (VS_VOIDPTR mme_address);
+extern VS_VOID send_discover_beacon_as_ucco (VS_VOID);
+extern VS_VOID station_bbt_expires (VS_VOID);
+extern VS_VOID trace_cco (VS_VOID);
+extern VS_VOID trace_pond (VS_VOID);
+extern VS_VOID trace_sta (VS_VOID);
+extern VS_VOID trace_ucco (VS_VOID);
+extern VS_VOID trace_usta (VS_VOID);
+extern VS_VOID transmit_unassoc_sta_mme (VS_VOID);
+extern VS_VOID try_associate (VS_VOIDPTR beacon_address);
+
+
+/*
+ * Include SEM Library Header File.
+ */
+#include "SEMLibE.h"
+
+
+/*
+ * Action Expression Function Prototypes.
+ */
+extern VS_VOID MainVSAction_0 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_1 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_2 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_3 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_4 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_5 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_6 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_7 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_8 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_9 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_10 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_11 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_12 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_13 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_14 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_15 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_16 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_17 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_18 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_19 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_20 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_21 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_22 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_23 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_24 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_25 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_26 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_27 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_28 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_29 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_30 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_31 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_32 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_33 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_34 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_35 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_36 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_37 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+extern VS_VOID MainVSAction_38 (SEM_CONTEXT VS_TQ_CONTEXT * Context);
+
+
+/*
+ * Action Expression Pointer Table.
+ */
+extern VS_ACTIONEXPR_TYPE const MainVSAction[39];
+
+
+#endif
diff --git a/cesar/cp/vstate_fsm/src/main_fsmData.c b/cesar/cp/vstate_fsm/src/main_fsmData.c
new file mode 100644
index 0000000000..cec34f616f
--- /dev/null
+++ b/cesar/cp/vstate_fsm/src/main_fsmData.c
@@ -0,0 +1,376 @@
+/*
+ * Id: main_fsmData.c
+ *
+ * Function: VS System Data Source File.
+ *
+ * Generated: Fri Feb 15 11:49:29 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+/*
+ * Include VS System Data Header File.
+ */
+#include "main_fsmData.h"
+
+
+#if (VS_CODER_GUID != 0X01188aba8)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+/*
+ * Include VS System Header File.
+ */
+#include "main_fsm.h"
+
+
+/*
+ * Include VS Project Constants Header file.
+ */
+#include "cesar_cp_PConstant.h"
+
+
+/*
+ * Include VS Project Event Header File.
+ */
+#include "cesar_cp_PEvent.h"
+
+
+/*
+ * Include VS System Action Expression Pointer Table File.
+ */
+#include "main_fsmAction.h"
+
+
+#include <stdarg.h>
+
+
+typedef union
+{
+ struct
+ {
+ VS_VOIDPTR VS_VOIDPTRVar[0X00001];
+ } DB30;
+} main_fsmVSDBDATA;
+
+
+/*
+ * VS System Double Buffer Variable Declaration.
+ */
+static main_fsmVSDBDATA main_fsmVSDBVar;
+
+
+/*
+ * SEM Deduct Function.
+ */
+unsigned char main_fsmSMP_Deduct (SEM_CONTEXT VS_TQ_CONTEXT * Context, SEM_EVENT_TYPE EventNo, ...)
+{
+ va_list ap;
+
+ va_start(ap, EventNo);
+ if (Context == NULL)
+ return (SES_NOT_LOADED);
+ if (Context->nNofEvents <= EventNo)
+ return (SES_RANGE_ERR);
+ Context->EventNo = EventNo;
+ Context->State = STATE_SEM_PREPARE;
+ Context->DIt = 2;
+ switch (EventNo)
+ {
+ case 3:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 12:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 13:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 14:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 15:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 16:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 18:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 19:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 20:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 21:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 22:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 23:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 24:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 25:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 26:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 27:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 28:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 29:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+ case 30:
+ main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0] = (VS_VOIDPTR) va_arg(ap, VS_VOIDPTR);
+ break;
+
+ default:
+ break;
+ }
+
+ va_end(ap);
+ if (Context->InqAct)
+ return (SES_ACTIVE);
+ return (SES_OKAY);
+}
+
+
+/*
+ * Action Expression Functions.
+ */
+VS_VOID MainVSAction_0 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ init_system();
+}
+VS_VOID MainVSAction_1 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ launch_bbt_timer();
+}
+VS_VOID MainVSAction_2 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ launch_beacon_timer();
+}
+VS_VOID MainVSAction_3 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ launch_ustt_timer();
+}
+VS_VOID MainVSAction_4 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ send_discover_beacon_as_ucco();
+}
+VS_VOID MainVSAction_5 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ station_bbt_expires();
+}
+VS_VOID MainVSAction_6 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ trace_cco();
+}
+VS_VOID MainVSAction_7 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ trace_pond();
+}
+VS_VOID MainVSAction_8 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ trace_sta();
+}
+VS_VOID MainVSAction_9 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ trace_ucco();
+}
+VS_VOID MainVSAction_10 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ trace_usta();
+}
+VS_VOID MainVSAction_11 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ transmit_unassoc_sta_mme();
+}
+VS_VOID MainVSAction_12 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ cp_station_set_cco_status(0);
+}
+VS_VOID MainVSAction_13 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ cp_station_set_auth_status(0);
+}
+VS_VOID MainVSAction_14 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ cp_station_set_assoc_status(0);
+}
+VS_VOID MainVSAction_15 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_start_mac_req(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_16 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_mac_address(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_17 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_cco_preference(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_18 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_was_cco(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_19 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_npw(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_20 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_dpw_req(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_21 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_m_sta_hfid(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_22 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_u_sta_hfid(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_23 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_avln_hfid(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_24 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_sl(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_25 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_tonemask(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_26 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_nid(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_27 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_drv_set_snid(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_28 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_cc_assoc_req(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_29 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ cp_station_set_cco_status(1);
+}
+VS_VOID MainVSAction_30 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ cp_station_set_assoc_status(1);
+}
+VS_VOID MainVSAction_31 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ try_associate(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_32 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_cc_assoc_cnf(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_33 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ record_usta_mme(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_34 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_usta_mme(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_35 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ cp_station_set_auth_status(1);
+}
+VS_VOID MainVSAction_36 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_cc_assoc_req(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_37 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_cc_set_tei_map_req(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+VS_VOID MainVSAction_38 (SEM_CONTEXT VS_TQ_CONTEXT * Context)
+{
+ process_cc_set_tei_map_ind(main_fsmVSDBVar.DB30.VS_VOIDPTRVar[0]);
+}
+
+
+/*
+ * Action Expression Pointer Table.
+ */
+VS_ACTIONEXPR_TYPE const MainVSAction[39] =
+{
+ MainVSAction_0,
+ MainVSAction_1,
+ MainVSAction_2,
+ MainVSAction_3,
+ MainVSAction_4,
+ MainVSAction_5,
+ MainVSAction_6,
+ MainVSAction_7,
+ MainVSAction_8,
+ MainVSAction_9,
+ MainVSAction_10,
+ MainVSAction_11,
+ MainVSAction_12,
+ MainVSAction_13,
+ MainVSAction_14,
+ MainVSAction_15,
+ MainVSAction_16,
+ MainVSAction_17,
+ MainVSAction_18,
+ MainVSAction_19,
+ MainVSAction_20,
+ MainVSAction_21,
+ MainVSAction_22,
+ MainVSAction_23,
+ MainVSAction_24,
+ MainVSAction_25,
+ MainVSAction_26,
+ MainVSAction_27,
+ MainVSAction_28,
+ MainVSAction_29,
+ MainVSAction_30,
+ MainVSAction_31,
+ MainVSAction_32,
+ MainVSAction_33,
+ MainVSAction_34,
+ MainVSAction_35,
+ MainVSAction_36,
+ MainVSAction_37,
+ MainVSAction_38
+};
+
+
+/*
+ * Wrapper function for all initializing functions.
+ */
+unsigned char main_fsmSMP_InitAll (SEM_CONTEXT VS_TQ_CONTEXT * * Context)
+{
+ unsigned char CC;
+
+ if ((CC = SMP_Connect(Context, &main_fsm)) != SES_OKAY)
+ return CC;
+
+ SMP_Init(*Context);
+
+ return SES_OKAY;
+}
diff --git a/cesar/cp/vstate_fsm/src/main_fsmData.h b/cesar/cp/vstate_fsm/src/main_fsmData.h
new file mode 100644
index 0000000000..8ddb833c0b
--- /dev/null
+++ b/cesar/cp/vstate_fsm/src/main_fsmData.h
@@ -0,0 +1,123 @@
+/*
+ * Id: main_fsmData.h
+ *
+ * Function: VS System Header File.
+ *
+ * Generated: Fri Feb 15 11:49:29 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __MAIN_FSMDATA_H
+#define __MAIN_FSMDATA_H
+
+
+/*
+ * Number of Identifiers.
+ */
+#define VS_NOF_ACTION_EXPRESSIONS 0X027 /* 39 */
+#define VS_NOF_ACTION_FUNCTIONS 0X00c /* 12 */
+#define VS_NOF_EVENT_GROUPS 0X001 /* 1 */
+#define VS_NOF_EVENTS 0X02a /* 42 */
+#define VS_NOF_EXTERNAL_VARIABLES 0X000 /* 0 */
+#define VS_NOF_GUARD_EXPRESSIONS 0X000 /* 0 */
+#define VS_NOF_INSTANCES 0X001 /* 1 */
+#define VS_NOF_INTERNAL_VARIABLES 0X000 /* 0 */
+#define VS_NOF_SIGNALS 0X000 /* 0 */
+#define VS_NOF_STATE_MACHINES 0X00a /* 10 */
+#define VS_NOF_STATES 0X017 /* 23 */
+
+
+/*
+ * Include SEM Library Header File.
+ */
+#include "SEMLibE.h"
+
+
+#if (VS_CODER_GUID != 0X01188aba8)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+/*
+ * Include Global Events Header File.
+ */
+#include "cesar_cp_PEvent.h"
+
+
+/*
+ * External Declaration for SEM Deduct Function.
+ */
+extern unsigned char main_fsmSMP_Deduct (SEM_CONTEXT VS_TQ_CONTEXT * Context, SEM_EVENT_TYPE EventNo, ...);
+
+
+/*
+ * External Declaration for wrapper function for all initializing functions.
+ */
+extern unsigned char main_fsmSMP_InitAll (SEM_CONTEXT VS_TQ_CONTEXT * * Context);
+
+
+/*
+ * Conditional Compilation Definitions.
+ */
+#define SEM_DEDUCT_FUNC 1
+#define SEM_DEDUCT_WITH_VA_LIST 1
+
+
+/*
+ * Event Identifier Definitions.
+ */
+#define AUTHENTIFIE_STA 0X001 /* 1 */
+#define BBT_EXPIRES 0X002 /* 2 */
+#define BEACON_DETECTED 0X003 /* 3 */
+#define BEACON_TIMER_EXPIRES 0X004 /* 4 */
+#define BECOME_BACKUP_CCO 0X005 /* 5 */
+#define BECOME_PCO 0X006 /* 6 */
+#define HANDOVER_DONE 0X007 /* 7 */
+#define JOIN_WAIT_TIMER_EXPIRES 0X008 /* 8 */
+#define LEAVE_BACKUP_CCO 0X009 /* 9 */
+#define LEAVE_PCO 0X00A /* 10 */
+#define POND_TO_UCCO 0X00B /* 11 */
+#define RECEIVE_CC_ASSOC_CNF 0X00C /* 12 */
+#define RECEIVE_CC_ASSOC_REQ 0X00D /* 13 */
+#define RECEIVE_CC_SET_TEI_MAP_IND 0X00E /* 14 */
+#define RECEIVE_CC_SET_TEI_MAP_REQ 0X00F /* 15 */
+#define RECEIVE_DRV_MAC_START_REQ 0X010 /* 16 */
+#define RECEIVE_DRV_MAC_STOP_IND 0X011 /* 17 */
+#define RECEIVE_DRV_SET_AVLN_HFID 0X012 /* 18 */
+#define RECEIVE_DRV_SET_CCO_PREFERENCE_REQ 0X013 /* 19 */
+#define RECEIVE_DRV_SET_DPW_REQ 0X014 /* 20 */
+#define RECEIVE_DRV_SET_MAC_ADDRESS 0X015 /* 21 */
+#define RECEIVE_DRV_SET_M_STA_HFID 0X016 /* 22 */
+#define RECEIVE_DRV_SET_NID 0X017 /* 23 */
+#define RECEIVE_DRV_SET_NPW_REQ 0X018 /* 24 */
+#define RECEIVE_DRV_SET_SL 0X019 /* 25 */
+#define RECEIVE_DRV_SET_SNID 0X01A /* 26 */
+#define RECEIVE_DRV_SET_TONEMASK 0X01B /* 27 */
+#define RECEIVE_DRV_SET_U_STA_HFID 0X01C /* 28 */
+#define RECEIVE_DRV_SET_WAS_CCO 0X01D /* 29 */
+#define RECEIVE_USTA_MME 0X01E /* 30 */
+#define SC_ADD 0X01F /* 31 */
+#define SC_JOIN 0X020 /* 32 */
+#define SC_TIMER_EXPIRES 0X021 /* 33 */
+#define TO_CCO 0X022 /* 34 */
+#define TO_HANDOVER 0X023 /* 35 */
+#define TO_HANDOVER_IN_PROGRESS 0X024 /* 36 */
+#define TO_STA 0X025 /* 37 */
+#define TO_USTA 0X026 /* 38 */
+#define UCCO_MAX_DISCOVER_EXPIRES 0X027 /* 39 */
+#define UNAUTHENTIFIE_STA 0X028 /* 40 */
+#define USTT_EXPIRES 0X029 /* 41 */
+
+
+/*
+ * There are no VS System constants, so this section is intentionally empty!
+ */
+
+
+#endif
diff --git a/cesar/cp/vstate_fsm/src/sta_connection.c b/cesar/cp/vstate_fsm/src/sta_connection.c
new file mode 100644
index 0000000000..3fb925aa67
--- /dev/null
+++ b/cesar/cp/vstate_fsm/src/sta_connection.c
@@ -0,0 +1,54 @@
+/*
+ * Id: sta_connection.c
+ *
+ * Function: VS System Source File.
+ *
+ * Generated: Fri Feb 15 11:49:29 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+/*
+ * Include VS System Data Header File.
+ */
+#include "sta_connection.h"
+
+
+#if (VS_CODER_GUID != 0X01188aba8)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+#include <stddef.h>
+
+
+/*
+ * VS System Data Declaration and Initialization.
+ *
+ * VS System Informations:
+ * - Rule data format number: 4
+ */
+VSDATAsta_connection const sta_connection =
+{
+ {
+ 0X001000050, 0X000000005, 0X000000000,
+ 0X000000003, 0X000000001, 0X000000000,
+ 0X000000012, 0X000000000, offsetof(VSDATAsta_connection, S1) + 0,
+ 0X000000000, 0X000000000, offsetof(VSDATAsta_connection, S1) + 6,
+ offsetof(VSDATAsta_connection, S1) + 34, offsetof(VSDATAsta_connection, S1) + 44, offsetof(VSDATAsta_connection, S1) + 56,
+ 0X000000000, 0X000000000, 0X000000000,
+ 0X000000000, 0X000000000, 0X000000000,
+
+ },
+ {
+ 0X00000, 0X00000, 0X00000, 0X00100, 0X00000, 0X00101, 0X00000, 0X00001,
+ 0X00101, 0X00001, 0X00002, 0X00101, 0X00001, 0X00000, 0X00101, 0X00002,
+ 0X00000, 0X00000, 0X0000B, 0X00005, 0X00008, 0X00002, 0X00000, 0X00001,
+ 0X00002, 0X00003, 0X00004, 0X00005
+ }
+};
diff --git a/cesar/cp/vstate_fsm/src/sta_connection.h b/cesar/cp/vstate_fsm/src/sta_connection.h
new file mode 100644
index 0000000000..2c26b4a218
--- /dev/null
+++ b/cesar/cp/vstate_fsm/src/sta_connection.h
@@ -0,0 +1,47 @@
+/*
+ * Id: sta_connection.h
+ *
+ * Function: Include VS System Data Header File.
+ *
+ * Generated: Fri Feb 15 11:49:29 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __STA_CONNECTION_H
+#define __STA_CONNECTION_H
+
+
+/*
+ * Include SEM Defines Header File.
+ */
+#include "SEMEDef.h"
+
+
+#if (VS_CODER_GUID != 0X01188aba8)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+/*
+ * VS System Datatype Definition.
+ */
+typedef struct
+{
+ VS_UINT32 S0[0X000000016];
+ VS_UINT16 S1[0X0001C];
+} VSDATAsta_connection;
+
+
+/*
+ * External Declaration for VS System Data.
+ */
+extern VSDATAsta_connection const sta_connection;
+
+
+#endif
diff --git a/cesar/cp/vstate_fsm/src/sta_connectionAction.h b/cesar/cp/vstate_fsm/src/sta_connectionAction.h
new file mode 100644
index 0000000000..71c7719e4e
--- /dev/null
+++ b/cesar/cp/vstate_fsm/src/sta_connectionAction.h
@@ -0,0 +1,31 @@
+/*
+ * Id: sta_connectionAction.h
+ *
+ * Function: VS System Action Expression Pointer Table Header File.
+ *
+ * Generated: Fri Feb 15 11:49:29 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __STA_CONNECTIONACTION_H
+#define __STA_CONNECTIONACTION_H
+
+
+/*
+ * Include SEM Defines Header File.
+ */
+#include "SEMEDef.h"
+
+
+#if (VS_CODER_GUID != 0X01188aba8)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+#endif
diff --git a/cesar/cp/vstate_fsm/src/sta_connectionData.c b/cesar/cp/vstate_fsm/src/sta_connectionData.c
new file mode 100644
index 0000000000..cfb278de07
--- /dev/null
+++ b/cesar/cp/vstate_fsm/src/sta_connectionData.c
@@ -0,0 +1,39 @@
+/*
+ * Id: sta_connectionData.c
+ *
+ * Function: VS System Data Source File.
+ *
+ * Generated: Fri Feb 15 11:49:29 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+/*
+ * Include VS System Data Header File.
+ */
+#include "sta_connectionData.h"
+
+
+#if (VS_CODER_GUID != 0X01188aba8)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+/*
+ * Include VS Project Constants Header file.
+ */
+#include "cesar_cp_PConstant.h"
+
+
+/*
+ * Include VS Project Event Header File.
+ */
+#include "cesar_cp_PEvent.h"
+
+
+#include <stdarg.h>
diff --git a/cesar/cp/vstate_fsm/src/sta_connectionData.h b/cesar/cp/vstate_fsm/src/sta_connectionData.h
new file mode 100644
index 0000000000..c63f060d45
--- /dev/null
+++ b/cesar/cp/vstate_fsm/src/sta_connectionData.h
@@ -0,0 +1,74 @@
+/*
+ * Id: sta_connectionData.h
+ *
+ * Function: VS System Header File.
+ *
+ * Generated: Fri Feb 15 11:49:29 2008
+ *
+ * Coder 5, 4, 0, 1273
+ *
+ * This is an automatically generated file. It will be overwritten by the Coder.
+ *
+ * DO NOT EDIT THE FILE!
+ */
+
+
+#ifndef __STA_CONNECTIONDATA_H
+#define __STA_CONNECTIONDATA_H
+
+
+/*
+ * Number of Identifiers.
+ */
+#define VS_NOF_ACTION_EXPRESSIONS 0X000 /* 0 */
+#define VS_NOF_ACTION_FUNCTIONS 0X000 /* 0 */
+#define VS_NOF_EVENT_GROUPS 0X000 /* 0 */
+#define VS_NOF_EVENTS 0X005 /* 5 */
+#define VS_NOF_EXTERNAL_VARIABLES 0X000 /* 0 */
+#define VS_NOF_GUARD_EXPRESSIONS 0X000 /* 0 */
+#define VS_NOF_INSTANCES 0X012 /* 18 */
+#define VS_NOF_INTERNAL_VARIABLES 0X000 /* 0 */
+#define VS_NOF_SIGNALS 0X000 /* 0 */
+#define VS_NOF_STATE_MACHINES 0X001 /* 1 */
+#define VS_NOF_STATES 0X003 /* 3 */
+
+
+/*
+ * Include SEM Library Header File.
+ */
+#include "SEMLibE.h"
+
+
+#if (VS_CODER_GUID != 0X01188aba8)
+#error The generated file does not match the SEMTypes.h header file.
+#endif
+
+
+/*
+ * Include Global Events Header File.
+ */
+#include "cesar_cp_PEvent.h"
+
+
+/*
+ * Conditional Compilation Definitions.
+ */
+#define SEM_DEDUCT_FUNC 0
+#define SEM_DEDUCT_WITH_VA_LIST 0
+
+
+/*
+ * Event Identifier Definitions.
+ */
+#define CLOSE_CONNECTION 0X001 /* 1 */
+#define CONNECTION_REQUEST_ACCEPTED 0X002 /* 2 */
+#define CONNECTION_REQUEST_REFUSED 0X003 /* 3 */
+#define NEW_CONNECTION 0X004 /* 4 */
+
+
+/*
+ * There are no VS System constants, so this section is intentionally empty!
+ */
+
+
+#endif
diff --git a/cesar/cp2/beacon/beacons.h b/cesar/cp2/beacon/beacons.h
new file mode 100644
index 0000000000..49d2231248
--- /dev/null
+++ b/cesar/cp2/beacon/beacons.h
@@ -0,0 +1,115 @@
+#ifndef cp_beacon_beacons_h
+#define cp_beacon_beacons_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/beacons.h
+ * \brief CP Beacon module
+ * \ingroup cp_beacon
+ *
+ */
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_arch.h>
+
+#include "cp/beacon/forward.h"
+
+#include "interface/interface.h"
+#include "mac/ca/ca.h"
+#include "mac/pbproc/pbproc.h"
+#include "mac/common/store.h"
+#include "hal/phy/phy.h"
+#include "hal/timer/timer.h"
+#include "cp/station/station.h"
+#include "cp/secu/secu.h"
+#include "cp/cco/cco.h"
+
+/** Call back used when the timer calls the beacon modules.
+ * This will be use to provide the data to the CP.
+ * The CP shall keep the event to request the beacon to process by calling the
+ * right function.
+ *
+ * \param user_data the data registered in the callback.
+ */
+typedef void (*cp_beacon_timer_cb_t) (void *user_data);
+
+enum cp_beacon_type
+{
+ CP_BEACON_CENTRAL_BEACON,
+ CP_BEACON_DISCOVER_BEACON,
+ CP_BEACON_PROXY_BACON
+};
+
+/** Init the beacons module.
+ * \param ctx the CP context.
+ *
+ * The Beacon module will need the following context to work :
+ * - interface the interface context.
+ * - phy the phy context.
+ * - sta the station context.
+ * - secu the control plane security layer context.
+ * - ca the Channel Access context.
+ * - mac_store mac_store.
+ * - pbproc pbproc.
+ * - cco the cco context.
+ * - cb the function to call back when the module is awake by the
+ * timer.
+ * \return the beacon context.
+ */
+cp_beacon_t *
+cp_beacon_init(cp_t *ctx);
+
+/** Initialise the beacon timer function call back.
+ * \param ctx the cp context.
+ * \param user_data a data register to call back.
+ * \param cb the function to call.
+ */
+void
+cp_beacon_init_timer_callback (cp_t *ctx, void *user_data,
+ cp_beacon_timer_cb_t cb);
+
+/** Uninit the beacon module
+ * \param ctx the cp context.
+ */
+void
+cp_beacon_uninit(cp_t *ctx);
+
+/** Compute the AC line frequency from the PRATIC register.
+ * \param ctx cp context.
+ */
+void
+cp_beacon_acl_frequency_detection (cp_t *ctx);
+
+/** Send a beacon when the STA is acting as a CCo.
+ * \param ctx the cp context.
+ * \param beacon_type beacon type.
+ */
+void
+cp_beacon_cco_send_beacon (cp_t *ctx, uint beacon_type);
+
+
+/** Generate the central beacon when the STA acts as a CCo.
+ * \param ctx the cp context.
+ */
+extern inline void
+cp_beacon_cco_send_central_beacon (cp_t *ctx)
+{
+ dbg_assert (ctx);
+ cp_beacon_cco_send_beacon (ctx, CP_BEACON_CENTRAL_BEACON);
+}
+
+/** Generate the discover beacon when the STA acts as a UCCo.
+ * \param ctx the beacon context.
+ */
+extern inline void
+cp_beacon_cco_send_discover_beacon (cp_t *ctx)
+{
+ dbg_assert (ctx);
+ cp_beacon_cco_send_beacon (ctx, CP_BEACON_DISCOVER_BEACON);
+}
+
+#endif /* cp_beacon_beacons_h */
diff --git a/cesar/cp2/beacon/inc/beacons.h b/cesar/cp2/beacon/inc/beacons.h
new file mode 100644
index 0000000000..6df7167794
--- /dev/null
+++ b/cesar/cp2/beacon/inc/beacons.h
@@ -0,0 +1,132 @@
+#ifndef cp_beacon_inc_beacons_h
+#define cp_beacon_inc_beacons_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/inc/beacons.h
+ * \brief central beacon private functions.
+ * \ingroup cp_beacon
+ *
+ */
+
+/**
+ * Initialize the sub module for the discover, central and proxy beacons.
+ * The beacon_ctx corresponds to the each part contained in the ctx.
+ *
+ * \param ctx the becon module context.
+ * \param beacon_ctx the central, discover or proxy context.
+ */
+void
+cp_beacon_init_beacons (cp_beacon_t *ctx, cp_beacon_common_t *beacon_ctx);
+
+/**
+ * Uninit the sub beacon modules.
+ *
+ * \param ctx the beacon module context
+ * \param beacon_ctx the beacon context to uninit.
+ */
+void
+cp_beacon_uninit_beacons (cp_beacon_t *ctx, cp_beacon_common_t *beacon_ctx);
+
+/**
+ * Compute the beacon period using the beacon period thereotic calculated
+ * during the pw frequency detection.
+ *
+ * \param ctx the beacon period context.
+ */
+uint
+cp_beacon_pwl_period (cp_beacon_t *ctx);
+
+/**
+ * Fill the payload of the beacon when the STA is accting as CCo or UCCo.
+ * Can be use for
+ * - the Central beacon when acting as a CCo
+ * - the discover beacon when acting as a UCCo.
+ *
+ *
+ * \param ctx the beacon module context
+ * \param beacon the beacon to fill.
+ * \param beacon_type the beacon type, central, discover or proxy.
+ */
+void
+cp_beacon_xcco_fill_common_part (cp_beacon_t *ctx, cp_beacon_desc_t *beacon,
+ uint beacon_type);
+
+/**
+ * Generate the central beacon.
+ *
+ * \param ctx the beacon context.
+ * \param beacon the central beacon to fill
+ */
+void
+cp_beacon_cco_beacon_central_generate (cp_beacon_t *ctx,
+ cp_beacon_desc_t *beacon);
+
+/**
+ * Generate the discover beacon when STA is UCCo.
+ *
+ * \param ctx the beacon context.
+ * \param beacon the central beacon to fill
+ */
+void
+cp_beacon_cco_beacon_discover_generate (cp_beacon_t *ctx,
+ cp_beacon_desc_t *beacon);
+
+
+/**
+ * Send the beacon over the PWL.
+ * TODO Implement the proxy beacon part
+ *
+ * \param ctx the cp beacon context
+ * \param beacon the beacon to send
+ * \param beacon_type the beacon type.
+ */
+void
+cp_beacon_send_beacon (cp_beacon_t *ctx, cp_beacon_desc_t *beacon,
+ uint beacon_type);
+
+/**
+ * Process the received beacon
+ *
+ * \param ctx the beacon context.
+ * \param beacon the beacon received.
+ */
+void
+cp_beacon_process (cp_beacon_t *ctx, cp_beacon_desc_t *beacon);
+
+/**
+ * Function call by the timer when the timer expires.
+ *
+ * \param ctx the beacon context.
+ */
+void
+cp_beacon_timer_it (cp_beacon_t *ctx);
+
+/** create the default schedule for the ca.
+ * \param ctx the cp context
+ *
+ * create the default schedule for the ca to be able to listen the pwl on the
+ * pond procedure.
+ * this will create four beacon periods of a duration corresponding to
+ * cp_beacon_default_schedule_time / 4.
+ */
+void
+cp_beacon_create_default_schedule (cp_t *ctx);
+
+/** Compute the next BTS, the four next BTOs and the BP.
+ * \param ctx the cp context.
+ * \param common the common part of the beacons structure.
+ *
+ * Compute the next BTS, the four next BTOs and the BP. in Time Allocation
+ * Unit to provide the data to the generated beacon.
+ */
+void
+cp_beacon_estimate_bts_bto_bp (cp_beacon_t *ctx, cp_beacon_common_t *common);
+
+
+#endif /* cp_beacon_inc_beacons_h */
diff --git a/cesar/cp2/beacon/ntb/inc/ntb_clock_sync.h b/cesar/cp2/beacon/ntb/inc/ntb_clock_sync.h
new file mode 100755
index 0000000000..ce218132ed
--- /dev/null
+++ b/cesar/cp2/beacon/ntb/inc/ntb_clock_sync.h
@@ -0,0 +1,170 @@
+#ifndef cp_beacon_ntb_inc_ntb_clock_sync_h
+#define cp_beacon_ntb_inc_ntb_clock_sync_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/ntb/inc/ntb_clock_sync.h
+ * \brief 25Mhz clock management and synchronization functions.
+ * \ingroup cp_beacon
+ */
+
+#include "hal/phy/phy.h" /* HAL-PHY functions dedicated to NTB clock management (access to dedicated PRATIC registers) */
+#include "mac/common/config.h"
+
+#undef MANUFACTURER_TEST /* undef it for operational mode! */
+
+// ntb Constants
+
+#define NTB_CCO 0
+#ifdef MANUFACTURER_TEST
+#define NTB_STA1 1
+#define NTB_STA2 2
+#define NTB_SMAX 3 // count of stations (including the CCo)
+#else
+#define NTB_SMAX 2 // count of stations (including the CCo)
+#endif
+
+#define NTB_DEFAULT_OFFSET 0
+#define NTB_DEFAULT_NUMERATOR 1000000 // PRATIC default clock ratio numerator
+#define NTB_DEFAULT_DIVISOR 3000000 // PRATIC default clock ratio divisor
+
+#define NTB_PHY_Clk_theoric 75000000 // ideal PHY clock frequency in Hz
+#define NTB_STA_Clk_theoric 25000000 // ideal STA clock frequency in Hz (1/3 of PHY clock frequency)
+
+// ntb Types
+
+typedef enum
+{
+ prev, // previous
+ curr, // current
+ next, // next
+ e_cnt
+} e_ntb_histo;
+
+typedef struct {
+
+ unsigned long k; // k Factor value for "w" weighting constant (w = 1 / 2^k)
+ unsigned long beacon[e_cnt]; // beacon index
+ unsigned long bts_ticks[e_cnt]; // BTS (Beacon Time Stamp) = CCo NTB date in entire ticks
+ double sta_ntb_date_decticks[e_cnt]; // LTmr = STAn NTB date in decimal ticks
+ unsigned long sta_ntb_date_ticks[e_cnt]; // LTmr = STAn NTB date in entire ticks
+ double sta_phy_date_decticks[e_cnt]; // PHY LTmr = STA1 25Mhz PHY date (not corrected) in decimal ticks
+ unsigned long sta_phy_date_ticks[e_cnt]; // PHY LTmr = STA1 25Mhz PHY date (not corrected) in entire ticks
+ double sta_hpav_frequ_error[e_cnt]; // FreqError
+ signed long long sta_hpav_offset[e_cnt]; // Offset calculated by formula from paragraph 5.5 of HP_AV specification
+ signed long long sta_offset[e_cnt]; // Offset of NTB STA clock relative to CCo clock
+ signed long sta_deriv_from_cco_ntb_ticks[e_cnt]; // STAn NTB date derive from CCo NTB in entire ticks
+ signed long sta_relative_deriv_from_cco_ntb_ticks[e_cnt]; // STA NTB date relative derive from CCo NTB in entire ticks
+ unsigned long sta_numerator[e_cnt]; // STAn current numerator for PHY_Clk divisor
+ double sta_clk_frequ[e_cnt]; // STAn current STA_Clk frenquency in Hz
+ unsigned long sta_predict_next_bts_ticks[e_cnt]; // Predicted value of CCo NTB date [next BTS] at next beacon (in entire ticks)
+ unsigned long sta_predict_next_sta_ticks[e_cnt]; // Predicted value of STAn NTB date at next beacon if no correction (in entire ticks)
+ signed long sta_predict_error_of_next_sta_ticks[e_cnt]; // Predicted error of STAn NTB date at next beacon (compared to next BTS value) if no correction (in entire ticks)
+ double sta_clk_frequ_should_be[e_cnt]; // STAn STA clock should be adjusted to (in Hz)
+ double sta_decimal_numerator_should_be[e_cnt]; // For max. derive of 25 ticks (25 ticks = 1 ppm @ 25Mhz), STAn STA/PHY clock ratio should be adjusted to (decimal numerator)
+ unsigned long sta_integer_numerator_should_be[e_cnt]; // STAn STA/PHY clock ratio should be adjusted to (pure integer numerator)
+ double sta_clk_frequ_will_be[e_cnt]; // STAn STA clock will be adjusted to (in Hz)
+ double sta_ntb_estimated_decticks[e_cnt]; // NTB date estimation in decimal ticks
+ unsigned long sta_ntb_estimated_ticks[e_cnt]; // NTB date estimation in entire ticks
+ double sta_clk_frequ_sync_ratio[e_cnt];
+ //double sta_average_deriv_from_cco_ntb_ticks[e_cnt];
+ unsigned long sta_count_samples_for_average_deriv[e_cnt];
+
+} ntb_histo_t;
+
+typedef struct {
+
+ phy_t * ntb_phy_ctx;
+ mac_config_t * ntb_mac_config;
+
+ ntb_histo_t ntb_histo;
+
+ unsigned long long beacon_count;
+
+#ifdef MANUFACTURER_TEST
+
+#define beacon_period_on_50hz_pwl 40000 // in microseconds
+#define beacon_period_on_60hz_pwl 33333 // in microseconds
+#define beacon_period beacon_period_on_50hz_pwl // in microseconds
+
+#define simu_duration (60*15) // in seconds
+#define count_of_beacons ((simu_duration * 1000000) / beacon_period)
+
+double STA_Clk[NTB_SMAX]; // NTB STA clock frequency in Hz (CCo, STA1, ..., STAn)
+double beacon_period_decimal_ticks[NTB_SMAX];
+unsigned long beacon_period_ticks[NTB_SMAX];
+
+unsigned long PHY_Clk[NTB_SMAX]; // PHY clock frequency in Hz (CCo, STA1, ..., STAn)
+unsigned long numerator[NTB_SMAX]; // numerator for PHY clock division factor (CCo, STA1, ..., STAn)
+unsigned long divisor[NTB_SMAX]; // divisor for PHY clock division factor (CCo, STA1, ..., STAn)
+
+unsigned long current_sta;
+unsigned long beacon[count_of_beacons]; // beacon index
+signed long sta_cco_offset_ticks[NTB_SMAX-1];
+double cco_ntb_date_decticks[NTB_SMAX-1][count_of_beacons]; // CCo NTB date in decimal ticks
+unsigned long bts_ticks[NTB_SMAX-1][count_of_beacons]; // BTS (Beacon Time Stamp) = CCo NTB date in entire ticks
+double sta_ntb_date_decticks[NTB_SMAX-1][count_of_beacons]; // STAn NTB date in decimal ticks
+unsigned long sta_ntb_date_ticks[NTB_SMAX-1][count_of_beacons]; // STAn NTB date in entire ticks
+double sta_phy_date_decticks[NTB_SMAX-1][count_of_beacons]; // PHY LTmr = STAn 25Mhz PHY date (not corrected) in decimal ticks
+unsigned long sta_phy_date_ticks[NTB_SMAX-1][count_of_beacons]; // PHY LTmr = STAn 25Mhz PHY date (not corrected) in entire ticks
+signed long sta_deriv_from_cco_ntb_ticks[NTB_SMAX-1][count_of_beacons]; // STAn NTB date derive from CCo NTB in entire ticks
+signed long sta_relative_deriv_from_cco_ntb_ticks[NTB_SMAX-1][count_of_beacons]; // STAn NTB date relative derive from CCo NTB in entire ticks
+unsigned long sta_numerator[NTB_SMAX-1][count_of_beacons]; // STAn current numerator for PHY_Clk divisor
+double sta_clk_frequ[NTB_SMAX-1][count_of_beacons]; // STAn current STA_Clk frenquency in Hz
+unsigned long sta_predict_next_bts_ticks[NTB_SMAX-1][count_of_beacons]; // Predicted value of CCo NTB date [next BTS] at next beacon (in entire ticks)
+unsigned long sta_predict_next_sta_ticks[NTB_SMAX-1][count_of_beacons]; // Predicted value of STAn NTB date at next beacon if no correction (in entire ticks)
+signed long sta_predict_error_of_next_sta_ticks[NTB_SMAX-1][count_of_beacons]; // Predicted error of STAn NTB date at next beacon (compared to next BTS value) if no correction (in entire ticks)
+double sta_clk_frequ_should_be[NTB_SMAX-1][count_of_beacons]; // STAn STA clock should be adjusted to (in Hz)
+double sta_decimal_numerator_should_be[NTB_SMAX-1][count_of_beacons]; // For max. derive of 25 ticks (25 ticks = 1 ppm @ 25Mhz), STAn STA/PHY clock ratio should be adjusted to (decimal numerator)
+unsigned long sta_integer_numerator_should_be[NTB_SMAX-1][count_of_beacons]; // STAn STA/PHY clock ratio should be adjusted to (pure integer numerator)
+double sta_clk_frequ_will_be[NTB_SMAX-1][count_of_beacons]; // STAn STA clock will be adjusted to (in Hz)
+double sta_clk_frequ_sync_ratio[NTB_SMAX-1][count_of_beacons];
+#endif
+
+} ntb_t; // ntb context data structure
+
+BEGIN_DECLS
+
+// ntb API functions
+
+/*
+ * Set or update NTB offset in the MAC Config.
+ *
+ * \param ntb_ctx, pointer to ntb context
+ * \param offset, offset between NTB date (CCo date) and NTB_STA date (station date)
+ */
+void cp_beacon_ntb_update_offset_in_mac_config(ntb_t *ntb_ctx, signed long offset);
+
+/*
+ * NTB clock management module initialisation.
+ *
+ * \param phy_ctx, pointer to phy context
+ * \param mac_config, pointer to mac config
+ *
+ * \return pointer to ntb_t ntb context data structure being allocated
+ */
+ntb_t * ntb_init(phy_t *phy_ctx, mac_config_t *mac_config);
+
+/*
+ * Synchronize local STA clock by adjusting its clock divisor as needed
+ * depending on
+ *
+ * - current beacon timestamp (BTS),
+ * - SYS-base local receive time of current beacon (SYS LTmr, based on 25 Mhz local clock frequency not adjusted onto CCo clock frequency),
+ * - STA-base local receive time of current beacon (STA LTmr, based on 25 Mhz local clock frequency adjusted onto CCo clock frequency).
+ *
+ * \param ntb_ctx, pointer to ntb context
+ * \param beacon_bts, beacon time stamp
+ * \param beacon_sys_ltmr, SYS local time captured when receiving beacon
+ * \param beacon_sta_ltmr, STA local time captured when receiving beacon
+ */
+void ntb_clk_sync(ntb_t *ntb_ctx, unsigned long beacon_bts, unsigned long beacon_sys_ltmr, unsigned long beacon_sta_ltmr);
+
+END_DECLS
+
+#endif /* cp_beacon_ntb_inc_ntb_clock_sync_h */
diff --git a/cesar/cp2/beacon/ntb/src/ntb_clock_sync.c b/cesar/cp2/beacon/ntb/src/ntb_clock_sync.c
new file mode 100755
index 0000000000..445051ed2d
--- /dev/null
+++ b/cesar/cp2/beacon/ntb/src/ntb_clock_sync.c
@@ -0,0 +1,541 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/ntb/src/ntb_clock_sync.c
+ * \brief 25Mhz clock management and synchronization functions.
+ * \ingroup cp_beacon
+ */
+#include "common/std.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+
+#include "cp/beacon/ntb/inc/ntb_clock_sync.h"
+
+// Local constants
+#ifdef MANUFACTURER_TEST
+//unsigned long PHY_Clk[] = { 74999997, 74992500, 75000030 }; // PHY clock frequency in Hz (CCo, STA1, STA2)
+unsigned long PHY_Clk[] = { 75001875, /*74998125*/75001875, 75000030 }; // PHY clock frequency in Hz (CCo, STA1, STA2)
+unsigned long numerator[] = { 1000000, 1000000, 1000000 }; // numerator for PHY clock division factor (CCo, STA1, STA2)
+unsigned long divisor[] = { 3000000, 3000000, 3000000 }; // divisor for PHY clock division factor (CCo, STA1, STA2)
+#endif
+
+#define ntb_max_ppm_deriv 1
+//#define ntb_max_ticks_deriv (ntb_max_ppm_deriv * NTB_STA_Clk_theoric / 1000000)
+#define ntb_max_ticks_deriv 0
+
+#define NTB_MAX_SAMPLES_FOR_AVERAGE 100
+#define ntb_kmax 10
+
+#define NTB_FREQU_MIN_25MHZ 24999375.0 // 25 Mhz + 25 ppm
+#define NTB_FREQU_MAX_25MHZ 25000625.0 // 25 Mhz - 25 ppm
+#define PWL_FREQU_MIN_50HZ 47.0 // see EN50160
+#define PWL_FREQU_MAX_50HZ 52.0 // see EN50160
+#define PWL_FREQU_MIN_60HZ 60.0 // TBD
+#define PWL_FREQU_MAX_60HZ 60.0 // TBD
+
+// More local declarations & inits
+
+#ifdef MANUFACTURER_TEST
+double STA_Clk[] = { 0.0, 0.0, 0.0 }; // NTB STA clock frequency in Hz (CCo, STA1, STA2)
+double beacon_period_decimal_ticks[] = { 0.0, 0.0, 0.0 };
+unsigned long beacon_period_ticks[] = { 0, 0, 0 };
+#else
+double STA_Clk[] = { 0.0, 0.0 }; // NTB STA clock frequency in Hz (CCo, STA)
+double beacon_period_decimal_ticks[] = { 0.0, 0.0 };
+unsigned long beacon_period_ticks[] = { 0, 0 };
+#endif
+
+#ifdef MANUFACTURER_TEST
+unsigned long current_sta = 0;
+unsigned long beacon[count_of_beacons]; // beacon index
+signed long sta_cco_offset_ticks[NTB_SMAX-1];
+double cco_ntb_date_decticks[NTB_SMAX-1][count_of_beacons]; // CCo NTB date in decimal ticks
+unsigned long bts_ticks[NTB_SMAX-1][count_of_beacons]; // BTS (Beacon Time Stamp) = CCo NTB date in entire ticks
+double sta_ntb_date_decticks[NTB_SMAX-1][count_of_beacons]; // STAn NTB date in decimal ticks
+unsigned long sta_ntb_date_ticks[NTB_SMAX-1][count_of_beacons]; // STAn NTB date in entire ticks
+double sta_phy_date_decticks[NTB_SMAX-1][count_of_beacons]; // PHY LTmr = STAn 25Mhz PHY date (not corrected) in decimal ticks
+unsigned long sta_phy_date_ticks[NTB_SMAX-1][count_of_beacons]; // PHY LTmr = STAn 25Mhz PHY date (not corrected) in entire ticks
+signed long sta_deriv_from_cco_ntb_ticks[NTB_SMAX-1][count_of_beacons]; // STAn NTB date derive from CCo NTB in entire ticks
+signed long sta_relative_deriv_from_cco_ntb_ticks[NTB_SMAX-1][count_of_beacons]; // STAn NTB date relative derive from CCo NTB in entire ticks
+unsigned long sta_numerator[NTB_SMAX-1][count_of_beacons]; // STAn current numerator for PHY_Clk divisor
+double sta_clk_frequ[NTB_SMAX-1][count_of_beacons]; // STAn current STA_Clk frenquency in Hz
+unsigned long sta_predict_next_bts_ticks[NTB_SMAX-1][count_of_beacons]; // Predicted value of CCo NTB date [next BTS] at next beacon (in entire ticks)
+unsigned long sta_predict_next_sta_ticks[NTB_SMAX-1][count_of_beacons]; // Predicted value of STAn NTB date at next beacon if no correction (in entire ticks)
+signed long sta_predict_error_of_next_sta_ticks[NTB_SMAX-1][count_of_beacons]; // Predicted error of STAn NTB date at next beacon (compared to next BTS value) if no correction (in entire ticks)
+double sta_clk_frequ_should_be[NTB_SMAX-1][count_of_beacons]; // STAn STA clock should be adjusted to (in Hz)
+double sta_decimal_numerator_should_be[NTB_SMAX-1][count_of_beacons]; // For max. derive of 25 ticks (25 ticks = 1 ppm @ 25Mhz), STAn STA/PHY clock ratio should be adjusted to (decimal numerator)
+unsigned long sta_integer_numerator_should_be[NTB_SMAX-1][count_of_beacons]; // STAn STA/PHY clock ratio should be adjusted to (pure integer numerator)
+double sta_clk_frequ_will_be[NTB_SMAX-1][count_of_beacons]; // STAn STA clock will be adjusted to (in Hz)
+double sta_clk_frequ_sync_ratio[NTB_SMAX-1][count_of_beacons];
+#endif
+
+static unsigned long ntb_lost_beacons(unsigned long delta_ticks);
+
+/*
+ * Set or update NTB offset in the MAC Config.
+ * \param ntb_ctx, pointer to ntb context
+ * \param offset, offset between NTB date (CCo date) and NTB_STA date (station date)
+ */
+void ntb_update_offset_in_mac_config(ntb_t *ntb_ctx, signed long offset)
+{
+ dbg_assert_ptr(ntb_ctx);
+ dbg_assert_ptr(ntb_ctx->ntb_mac_config);
+
+ /* update the u32 "ntb_offset_tck" field (NTB offset) in the mac_config_t Struct Reference */
+ ntb_ctx->ntb_mac_config->ntb_offset_tck = (unsigned long) offset;
+}
+
+/*
+ * NTB clock management module initialisation.
+ * \param phy_ctx, pointer to phy context
+ * \param mac_config, pointer to mac config
+ * \return pointer to ntb_t ntb context data structure being allocated
+ */
+ntb_t * ntb_init(phy_t *phy_ctx, mac_config_t *mac_config)
+{
+ //int i;
+ ntb_t * ntb_ctx;
+
+ dbg_assert_ptr(phy_ctx);
+ dbg_assert_ptr(mac_config);
+
+ ntb_ctx = malloc(sizeof(ntb_t));
+ if (ntb_ctx != NULL)
+ {
+ /* reset ntb context data */
+ memset(ntb_ctx,0x00,sizeof(ntb_t));
+
+ /* set pointers to needed contexts */
+ ntb_ctx->ntb_phy_ctx = phy_ctx;
+ ntb_ctx->ntb_mac_config = mac_config;
+
+ /*for (i = 0; i < NTB_SMAX; i++)
+ {
+ ntb_ctx->STA_Clk[i] = 0.0;
+ ntb_ctx->beacon_period_decimal_ticks[i] = 0.0;
+ ntb_ctx->beacon_period_ticks[i] = 0;
+ }*/
+
+ ntb_ctx->beacon_count = 0;
+
+ /* initialize the numerator value in the PRATIC config to its default value (1000000) */
+ phy_clock_set_numerator (ntb_ctx->ntb_phy_ctx, NTB_DEFAULT_NUMERATOR);
+ /* initialize the offset value in the MAC Config to zero by default */
+ ntb_update_offset_in_mac_config(ntb_ctx, NTB_DEFAULT_OFFSET);
+ }
+
+ return ntb_ctx;
+}
+
+/*
+ * Calculate the number of beacons lost (if any) between 2 beacons received.
+ * \param delta_ticks difference of BTS timestamp between 2 last received beacons
+ * \return count of lost beacons
+ */
+static unsigned long ntb_lost_beacons(unsigned long delta_ticks)
+{
+ unsigned long i;
+
+ /*
+ * Remembering beacon period equals twice the PWL cycle (here in 25 Mhz ticks),
+ * evaluating the count of lost beacons between the two last beacons being received,
+ * by successive cumulative comparisons with min and max theoric values of normal beacon period
+ */
+ for (i = 0; ; i++)
+ {
+ if (
+ ((double)delta_ticks > ((double)(i+1)*((NTB_FREQU_MIN_25MHZ * 2.0) / PWL_FREQU_MAX_50HZ)))
+ &&
+ ((double)delta_ticks < ((double)(i+1)*((NTB_FREQU_MAX_25MHZ * 2.0) / PWL_FREQU_MIN_50HZ)))
+ )
+ break;
+ }
+ //if (i > 0) printf("%s(%lu) : %lu lost beacon(s)!!!\n",__FUNCTION__,delta_ticks,i);
+ return i;
+}
+
+/*
+ * Synchronize local STA clock by adjusting its clock divisor as needed
+ * depending on
+ *
+ * - current beacon timestamp (BTS),
+ * - SYS-base local receive time of current beacon (SYS LTmr, based on 25 Mhz local clock frequency not adjusted onto CCo clock frequency),
+ * - STA-base local receive time of current beacon (STA LTmr, based on 25 Mhz local clock frequency adjusted onto CCo clock frequency).
+ *
+ * \param ntb_ctx pointer to ntb context
+ * \param beacon_bts beacon time stamp
+ * \param beacon_sys_ltmr SYS local time captured when receiving beacon
+ * \param beacon_sta_ltmr STA local time captured when receiving beacon
+ */
+void ntb_clk_sync(ntb_t *ntb_ctx, unsigned long beacon_bts, unsigned long beacon_sys_ltmr, unsigned long beacon_sta_ltmr)
+{
+ #define p ntb_ctx
+ #define nh ntb_ctx->ntb_histo
+
+ unsigned long long i; /* beacon index */
+ double err_freq_ppm;
+ unsigned long delta_bts_ticks;
+ unsigned long lost_beacons_count;
+
+ dbg_assert_ptr(p);
+ dbg_assert_ptr(p->ntb_phy_ctx);
+ dbg_assert_ptr(p->ntb_mac_config);
+
+ /* update count of beacons and current beacon index */
+ i = p->beacon_count;
+ p->beacon_count++;
+
+ /* k factor for w weighting constant (w = 1/2^k) */
+ // LOI EXPONENTIELLE
+ nh.k = (int) (kmax+1)*(1-exp(-(i*1.0)/100.0));
+
+ /* save old values */
+ nh.bts_ticks[prev] = nh.bts_ticks[curr];
+ nh.sta_ntb_date_decticks[prev] = nh.sta_ntb_date_decticks[curr];
+ nh.sta_ntb_date_ticks[prev] = nh.sta_ntb_date_ticks[curr];
+ nh.sta_phy_date_decticks[prev] = nh.sta_phy_date_decticks[curr];
+ nh.sta_phy_date_ticks[prev] = nh.sta_phy_date_ticks[curr];
+ nh.sta_hpav_frequ_error[prev] = nh.sta_hpav_frequ_error[curr];
+ nh.sta_hpav_offset[prev] = nh.sta_hpav_offset[curr];
+ nh.sta_offset[prev] = nh.sta_offset[curr];
+ nh.sta_numerator[prev] = nh.sta_numerator[curr];
+ nh.sta_numerator[curr] = nh.sta_numerator[next];
+
+ /* compute new current data depending on new current values (function arguments) and, if needed, predict future values */
+ nh.bts_ticks[curr] = beacon_bts;
+ nh.sta_ntb_date_ticks[curr] = beacon_sta_ltmr;
+ nh.sta_phy_date_ticks[curr] = beacon_sys_ltmr;
+ nh.sta_phy_date_decticks[curr] = beacon_sys_ltmr;
+
+ if (i == 0)
+ {
+ nh.bts_ticks[prev] = 0;
+ nh.sta_ntb_date_decticks[prev] = 0;
+ nh.sta_ntb_date_ticks[prev] = 0;
+ nh.sta_phy_date_decticks[prev] = 0;
+ nh.sta_phy_date_ticks[prev] = 0;
+ //nh.sta_cco_offset_ticks[prev] = 0;
+ nh.sta_deriv_from_cco_ntb_ticks[prev] = 0;
+ nh.sta_relative_deriv_from_cco_ntb_ticks[prev] = 0;
+ nh.sta_numerator[prev] = 0;
+ nh.sta_clk_frequ[prev] = 0;
+ nh.sta_predict_next_bts_ticks[prev] = 0;
+ nh.sta_predict_next_sta_ticks[prev] = 0;
+ nh.sta_predict_error_of_next_sta_ticks[prev] = 0;
+ nh.sta_clk_frequ_should_be[prev] = 0;
+ nh.sta_decimal_numerator_should_be[prev] = 0;
+ nh.sta_integer_numerator_should_be[prev] = 0;
+ nh.sta_clk_frequ_will_be[prev] = 0;
+
+ nh.sta_clk_frequ_sync_ratio[prev] = 0;
+ //nh.sta_average_deriv_from_cco_ntb_ticks[prev] = 0;
+ nh.sta_count_samples_for_average_deriv[prev] = 0;
+
+ //nh.sta_cco_offset_ticks[curr] = 0;
+ nh.sta_deriv_from_cco_ntb_ticks[curr] = 0;
+ nh.sta_relative_deriv_from_cco_ntb_ticks[curr] = 0;
+ nh.sta_numerator[curr] = NTB_DEFAULT_NUMERATOR;
+ nh.sta_clk_frequ[curr] = 0;
+ nh.sta_predict_next_bts_ticks[curr] = 0;
+ nh.sta_predict_next_sta_ticks[curr] = 0;
+ nh.sta_predict_error_of_next_sta_ticks[curr] = 0;
+ nh.sta_clk_frequ_should_be[curr] = 0;
+ nh.sta_decimal_numerator_should_be[curr] = 0;
+ nh.sta_integer_numerator_should_be[curr] = 0;
+ nh.sta_clk_frequ_will_be[curr] = 0;
+ nh.sta_clk_frequ_sync_ratio[curr] = 0;
+ nh.sta_count_samples_for_average_deriv[curr] = 0;
+
+ /* only one (first) beacon received, so no sufficient data available to compute clock adjustment */
+ nh.sta_hpav_frequ_error[curr] = 0;
+ nh.sta_hpav_offset[curr] = (signed long long) nh.bts_ticks[curr] - (signed long long) nh.sta_phy_date_ticks[curr];
+
+ //*p_err_freq_ppm = 0.0;
+ err_freq_ppm = 0.0;
+ }
+ else
+ {
+ delta_bts_ticks = nh.bts_ticks[curr] - nh.bts_ticks[prev];
+ lost_beacons_count = ntb_lost_beacons(delta_bts_ticks);
+ //if (lost_beacons_count > 0) printf("%s() : %lu lost beacon(s)\n",__FUNCTION__,lost_beacons_count);
+ if (i == 1)
+ {
+ /* two beacons received, compute/prepare clock adjustment parameters */
+ nh.sta_hpav_frequ_error[curr] = (double)(nh.bts_ticks[curr] - nh.bts_ticks[prev]) / (double)(nh.sta_phy_date_ticks[curr] - nh.sta_phy_date_ticks[prev]) - 1;
+ nh.sta_hpav_offset[curr] = (signed long long) nh.bts_ticks[curr] - (signed long long) nh.sta_phy_date_ticks[curr];
+ }
+ else
+ {
+ /* more than two beacons received, compute/prepare clock adjustment parameters */
+ nh.sta_hpav_frequ_error[curr] = nh.sta_hpav_frequ_error[prev] + (1.0/pow(2.0,nh.k)) * ((double)(nh.bts_ticks[curr] - nh.bts_ticks[prev]) / (double)(nh.sta_phy_date_ticks[curr] - nh.sta_phy_date_ticks[prev]) - 1 - nh.sta_hpav_frequ_error[prev]);
+ /*nh.sta_hpav_offset[curr] = nh.sta_hpav_offset[prev] + nh.sta_hpav_frequ_error[curr] * (nh.sta_ntb_date_ticks[curr] - nh.sta_ntb_date_ticks[prev]) + (1.0/pow(2.0,nh.k)) * ((nh.bts_ticks[curr] - nh.sta_ntb_date_ticks[curr]) - (nh.sta_hpav_offset[prev] + nh.sta_hpav_frequ_error[curr] * (nh.sta_ntb_date_ticks[curr] - nh.sta_ntb_date_ticks[prev])));*/
+ nh.sta_hpav_offset[curr] = (double) nh.sta_hpav_offset[prev] + nh.sta_hpav_frequ_error[curr] * (double)((signed long long)nh.sta_phy_date_ticks[curr] - (signed long long)nh.sta_phy_date_ticks[prev]) + (1.0/pow(2.0,nh.k)) * (double)((signed long long)nh.bts_ticks[curr] - (signed long long)nh.sta_phy_date_ticks[curr]) - ((signed long long)nh.sta_hpav_offset[prev] + nh.sta_hpav_frequ_error[curr] * (double)((signed long long)nh.sta_phy_date_ticks[curr] - (signed long long)nh.sta_phy_date_ticks[prev]));
+ }
+ err_freq_ppm = nh.sta_hpav_frequ_error[curr] * 1000000.0;
+ phy_sysclock_set_freqerror (ntb_ctx->ntb_phy_ctx, err_freq_ppm);
+ /* At least 2 beacons received, we can compute/estimate STA clock offset & derivation and update the clock divisor factor as needed */
+ //nh.sta_ntb_estimated_decticks[curr] = nh.sta_ntb_date_decticks[curr] + nh.sta_hpav_offset[curr] + nh.sta_hpav_frequ_error[curr] * (nh.sta_ntb_date_decticks[curr] - nh.sta_ntb_date_decticks[prev]);
+ //nh.sta_ntb_estimated_ticks[curr] = nh.sta_ntb_date_ticks[curr] + nh.sta_hpav_offset[curr] + nh.sta_hpav_frequ_error[curr] * (nh.sta_ntb_date_ticks[curr] - nh.sta_ntb_date_ticks[curr-1]);
+ nh.sta_decimal_numerator_should_be[curr] = (double)NTB_DEFAULT_NUMERATOR * (nh.sta_hpav_frequ_error[curr] + 1.0);
+ nh.sta_integer_numerator_should_be[curr] = (signed long)(nh.sta_decimal_numerator_should_be[curr]+0.5);
+ if (nh.sta_integer_numerator_should_be[curr] != nh.sta_numerator[curr])
+ {
+ // update the numerator value in the PRATIC config ! */
+ phy_clock_set_numerator (ntb_ctx->ntb_phy_ctx, nh.sta_integer_numerator_should_be[curr]);
+ nh.sta_numerator[next] = nh.sta_integer_numerator_should_be[curr];
+ }
+ else
+ {
+ nh.sta_numerator[next] = nh.sta_numerator[curr];
+ }
+ }
+
+ /* offset from adjusted STA clock to NTB clock (NTB clock = CCo clock) */
+ nh.sta_offset[curr] = nh.bts_ticks[curr] - nh.sta_ntb_date_ticks[curr];
+ //nh.sta_offset[curr] = nh.bts_ticks[curr] - nh.sta_phy_date_ticks[curr];
+ //printf ("%d\n", (nh.bts_ticks[curr] - nh.bts[prev]) - (
+ //if (nh.k>=7)
+ //int t;
+ //if (nh.k<3) t=0;
+ //else t = nh.k-3;
+ // nh.sta_offset[curr] = nh.sta_offset[prev] + (1.0/pow(2,nh.k-7))*(nh.sta_offset[curr] - nh.sta_offset[prev]);
+ if (nh.sta_offset[curr] != nh.sta_offset[prev])
+ {
+ /* update the offset value in the MAC Config ! */
+ ntb_update_offset_in_mac_config(ntb_ctx, nh.sta_offset[curr]);
+ nh.sta_offset[next] = nh.sta_offset[curr];
+ }
+ else
+ {
+ nh.sta_offset[next] = nh.sta_offset[prev];
+ }
+
+#ifdef MANUFACTURER_TEST
+ printf("Beacon_%05llu %010lu %010lu %011ld (%05ld) %010lu %010lu %05ld %08.14g %08.14g %02.14g (numer.div=%07lu) [%03lu]\n",
+ i,
+ nh.bts_ticks[curr],
+ nh.sta_ntb_date_ticks[curr],
+ (signed long)((signed long long)nh.sta_ntb_date_ticks[curr]-(signed long long)nh.bts_ticks[curr]),
+ nh.sta_relative_deriv_from_cco_ntb_ticks[curr],
+ nh.sta_predict_next_bts_ticks[curr],
+ nh.sta_predict_next_sta_ticks[curr],
+ nh.sta_predict_error_of_next_sta_ticks[curr],
+ STA_Clk[0],
+ nh.sta_clk_frequ_will_be[curr],
+ nh.sta_clk_frequ_sync_ratio[curr],
+ nh.sta_integer_numerator_should_be[curr],
+ nh.sta_count_samples_for_average_deriv[curr]
+ );
+#else
+
+ printf("Beacon_%05llu (%lu) %010lu %010lu %011ld (%05ld) %010lu %010lu %05ld %08.14g %08.14g %02.14g (numer.div=%07lu) [%03lu] %02.14g\n",
+ i,
+ nh.k,
+ nh.bts_ticks[curr],
+ nh.sta_ntb_date_ticks[curr],
+ (signed long)((signed long long)nh.sta_ntb_date_ticks[curr]-(signed long long)nh.bts_ticks[curr]),
+ nh.sta_relative_deriv_from_cco_ntb_ticks[curr],
+ nh.sta_predict_next_bts_ticks[curr],
+ nh.sta_predict_next_sta_ticks[curr],
+ nh.sta_predict_error_of_next_sta_ticks[curr],
+ STA_Clk[0],
+ nh.sta_clk_frequ_will_be[curr],
+ nh.sta_clk_frequ_sync_ratio[curr],
+ nh.sta_integer_numerator_should_be[curr],
+ nh.sta_count_samples_for_average_deriv[curr],
+ err_freq_ppm//nh.sta_average_deriv_from_cco_ntb_ticks[curr]
+ );
+
+#endif
+
+}
+
+
+#ifdef MANUFACTURER_TEST
+// Computing clock synchronization over time & beacons transmitted by CCo and received by STAs...
+// argv[1] = initial date for CCo
+// argv[2] = initial date for STA1
+// argv[3] = initial date for STA2
+int main(int argc, char *argv[])
+{
+ unsigned long s;
+ unsigned long i;
+ unsigned long cco_ntb_date_begin_ticks = 0;
+ unsigned long sta_ntb_date_begin_ticks[NTB_SMAX-1];
+ phy_t phy_ctx[NTB_SMAX-1];
+ mac_config_t mac_cfg[NTB_SMAX-1];
+ ntb_t * my_ntb_ctx[NTB_SMAX-1];
+
+ ///////////////// Inits... ///////////////////////////////////////
+
+ if (argc > 2)
+ {
+ cco_ntb_date_begin_ticks = atoi(argv[1]);
+ for (s = 0; s < (argc-2); s++)
+ {
+ sta_ntb_date_begin_ticks[s] = atoi(argv[s+2]);
+ }
+ }
+ else
+ {
+ for (s = 0; s < (NTB_SMAX-1); s++)
+ {
+ sta_ntb_date_begin_ticks[s] = 0;
+ }
+ }
+
+ /*for (i = 0; i < (NTB_SMAX-1); i++)
+ {
+ my_ntb_ctx[i] = ntb_init(&phy_ctx[i],&mac_cfg[i]);
+ if (my_ntb_ctx[i] == NULL)
+ {
+ return -1;
+ }
+ }*/
+
+ //for (i = 0; i < NTB_SMAX; i++) s[i] = i + 1;
+
+ for (i = 0; i < NTB_SMAX; i++)
+ {
+ STA_Clk[i] = ((double)PHY_Clk[i] * (double)numerator[i]) / (double)divisor[i];
+ beacon_period_decimal_ticks[i] = (double)(STA_Clk[i] * ((double)beacon_period/1000.0)) / 1000.0;
+ beacon_period_ticks[i] = (signed long)(beacon_period_decimal_ticks[i]);
+ }
+
+ ///////////////// End of Inits /////////////////////////////////////
+
+
+ //// Simulation loop ////
+
+ // for each beacon...
+ for (i = 0; i < count_of_beacons; i++)
+ {
+ // for each STA receiving that beacon...
+ for (s = 0; s < (NTB_SMAX-1); s++)
+ {
+ cco_ntb_date_decticks[s][i] = cco_ntb_date_begin_ticks + ((double)i * beacon_period_decimal_ticks[CCO]);
+ bts_ticks[s][i] = (signed long)(cco_ntb_date_decticks[s][i]);
+ sta_phy_date_decticks[s][i] = sta_ntb_date_begin_ticks[s] + ((double)i * beacon_period_decimal_ticks[s+1]);
+ sta_phy_date_ticks[s][i] = (signed long)(sta_phy_date_decticks[s][i]);
+
+ if (i == 0)
+ {
+ // first beacon...
+ sta_numerator[s][i] = numerator[s+1];
+ sta_clk_frequ[s][i] = STA_Clk[s+1];
+ sta_ntb_date_decticks[s][i] = sta_ntb_date_begin_ticks[s];
+ sta_ntb_date_ticks[s][i] = (signed long)(sta_ntb_date_decticks[s][i]);
+ sta_cco_offset_ticks[s] = (signed long) (sta_ntb_date_ticks[s][i] - bts_ticks[s][i]);
+ sta_predict_next_bts_ticks[s][i] = 0; // N/A => 0 ? Shall be theoritically [current_BTS + theoric_ticks_count_for_beacon_period_at_25mhz] !
+ sta_predict_next_sta_ticks[s][i] = 0; // N/A => 0 ? Shall be theoritically [current_STA_Clk + theoric_ticks_count_for_beacon_period_at_current_STA_Clk_Frequ] !
+ sta_predict_error_of_next_sta_ticks[s][i] = 0; // N/A => 0 ?
+ sta_clk_frequ_should_be[s][i] = sta_clk_frequ[s][i];
+ sta_clk_frequ_sync_ratio[s][i] = sta_clk_frequ_should_be[s][i] / sta_clk_frequ[s][i];
+ sta_decimal_numerator_should_be[s][i] = numerator[s+1];
+ }
+ else
+ {
+ // next beacons...
+ sta_numerator[s][i] = sta_integer_numerator_should_be[s][i-1];
+ sta_clk_frequ[s][i] = sta_clk_frequ_will_be[s][i-1];
+ sta_ntb_date_decticks[s][i] = sta_ntb_date_decticks[s][i-1] + ((sta_clk_frequ_will_be[s][i-1] * ((double)beacon_period/1000.0)) / 1000.0);
+ sta_ntb_date_ticks[s][i] = (signed long)(sta_ntb_date_decticks[s][i]);
+ sta_predict_next_bts_ticks[s][i] = bts_ticks[s][i] + (bts_ticks[s][i] - bts_ticks[s][i-1]);
+ sta_predict_next_sta_ticks[s][i] = sta_ntb_date_ticks[s][i] + (sta_ntb_date_ticks[s][i] - sta_ntb_date_ticks[s][i-1]);
+ sta_predict_error_of_next_sta_ticks[s][i] = (signed long)( sta_predict_next_sta_ticks[s][i]
+ - sta_predict_next_bts_ticks[s][i]
+ - sta_cco_offset_ticks[s]);
+ sta_clk_frequ_should_be[s][i] = (double)((sta_predict_next_bts_ticks[s][i] - (sta_ntb_date_ticks[s][i]-sta_cco_offset_ticks[s])) * 1000) / ((double)beacon_period/1000.0);
+ sta_clk_frequ_sync_ratio[s][i] = sta_clk_frequ_should_be[s][i] / sta_clk_frequ[s][i];
+
+ // detect clock derive and, if needed, compute the clock division factor to adjust the clock frequency...
+ if (abs(sta_predict_error_of_next_sta_ticks[s][i]) < max_ticks_deriv)
+ {
+ sta_decimal_numerator_should_be[s][i] = sta_numerator[s][i];
+ }
+ else
+ {
+ sta_decimal_numerator_should_be[s][i] = ((double)sta_numerator[s][i] * sta_clk_frequ_should_be[s][i]) / sta_clk_frequ[s][i];
+ }
+ }
+ sta_integer_numerator_should_be[s][i] = (signed long)(sta_decimal_numerator_should_be[s][i]+0.5);
+ sta_clk_frequ_will_be[s][i] = ((double)PHY_Clk[s+1] * (double)sta_integer_numerator_should_be[s][i]) / (double)divisor[s+1];
+ sta_deriv_from_cco_ntb_ticks[s][i] = bts_ticks[s][i] - sta_ntb_date_ticks[s][i];
+ sta_relative_deriv_from_cco_ntb_ticks[s][i] = (signed long)((signed long long)sta_ntb_date_ticks[s][i]-(signed long long)bts_ticks[s][i]-(signed long long)sta_cco_offset_ticks[s]);
+
+ }
+ }
+
+ // print simulation data...
+ printf("\n\n");
+ // for each STA...
+ for (s = 0; s < (NTB_SMAX-1); s++)
+ {
+ printf("Results of clock synchronization simulation for STA%lu :\n\n",s+1);
+ // print clock synchronization data for each beacon being received...
+ for (i = 0; i < count_of_beacons; i++)
+ {
+ printf("Beacon_%05lu %010lu %010lu %010lu %011ld (%011ld ; %05ld) %010lu %010lu %05ld %08.14g %08.14g %02.14g (numer.div=%07lu)\n",
+ i,
+ sta_phy_date_ticks[s][i],
+ bts_ticks[s][i],
+ sta_ntb_date_ticks[s][i],
+ (signed long)((signed long long)sta_ntb_date_ticks[s][i]-(signed long long)bts_ticks[s][i]),
+ sta_cco_offset_ticks[s],
+ sta_relative_deriv_from_cco_ntb_ticks[s][i],
+ sta_predict_next_bts_ticks[s][i],
+ sta_predict_next_sta_ticks[s][i],
+ sta_predict_error_of_next_sta_ticks[s][i],
+ STA_Clk[0],
+ sta_clk_frequ_will_be[s][i],
+ sta_clk_frequ_sync_ratio[s][i],
+ sta_integer_numerator_should_be[s][i]
+ );
+ }
+ printf("\n\n");
+ }
+
+ signed long err_ticks;
+ double freq_err_ppm;
+ // compare simulation data with synchronization data computed with independent synchronization function (applying same algorithm)...
+ printf("\n\n");
+ // for each STA...
+ for (s = 0; s < (NTB_SMAX-1); s++)
+ {
+ printf("Compare results of clock synchronization for STA%lu :\n\n",s+1);
+#ifdef MANUFACTURER_TEST
+ current_sta = s+1;
+#endif
+ // new STA => need to init the NTB clock synchro module dedicated to that STA...
+ my_ntb_ctx[s] = ntb_init(&phy_ctx[s],&mac_cfg[s]);
+ if (my_ntb_ctx[s] == NULL)
+ {
+ return -1;
+ }
+ // compare clock synchronization data for each beacon being received...
+ for (i = 0; i < count_of_beacons; i++)
+ {
+#if 0
+ err_ticks = ntb_clk_sync(my_ntb_ctx[s], bts_ticks[s][i], sta_phy_date_ticks[s][i], sta_ntb_date_ticks[s][i], &freq_err_ppm);
+ if (err_ticks != sta_relative_deriv_from_cco_ntb_ticks[s][i])
+ {
+ printf("ntb_clk_sync() for beacon_%05lu on STA%lu revealed %ld tick of relative error for %ld expected by simulation\n",i,s+1,err_ticks,sta_relative_deriv_from_cco_ntb_ticks[s][i]);
+ }
+#else
+ ntb_clk_sync(my_ntb_ctx[s], bts_ticks[s][i], sta_phy_date_ticks[s][i], sta_ntb_date_ticks[s][i]);
+#endif
+ }
+ printf("\n\n");
+ free(my_ntb_ctx[s]);
+ }
+
+ return 0;
+}
+#endif
diff --git a/cesar/cp2/cco/action/action.h b/cesar/cp2/cco/action/action.h
new file mode 100644
index 0000000000..3d2247394a
--- /dev/null
+++ b/cesar/cp2/cco/action/action.h
@@ -0,0 +1,179 @@
+#ifndef cp_cco_action_action_h
+#define cp_cco_action_action_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/cco/action/action.h
+ * \brief actions of CCo responsability
+ * \ingroup cp_cco
+ *
+ * CCo action module implements actions of CCo responsability
+ * manage SNID "collisions" (if SNID conflict, a new SNID value shall be chosen)
+ * manage TEI leases (create, suppress, expire)
+ * manage sta association
+ * manage authentication with relevant keys (NEK, NMK) and security-level
+ * in 1st step/version, each sta generates the default NMK from own NPW
+ * (the NMK is used to belong to a given AVLN where all STAs and the CCo
+ * have the same NMK) and the CCo in a given AVLN generates a NEK key
+ * and sends it to stations which perform authentication steps.
+ *
+ * Initialisation of SNID & management of SNID conflicts (section 4.4.1.4 in HP_AV spec)
+ * Le SNID est prévu comme étant une représentation "raccourcie" du NID d'un AVLN
+ * devant également permettre de faire la distinction entre 2 AVLNs ayant des NMKs
+ * respectives différentes mais qui auraient un NID identique (un NID étant
+ * obtenu par hachage SHA256 de NMK, le hachage de 2 NMKs différentes peut
+ * produire un même NID, même si ce cas de figure est statistiquement improbable).
+ * Dans le cas d'un NID identique pour 2 AVLNs ayant chacun une NMK respective
+ * différente de celle de l'autre AVLN, il faut alors un SNID différent pour chacun
+ * des 2 AVLNs.
+ * Une CCo "1" qui détecterait un SNID identique au sien (arrivée d'un Central Beacon
+ * d'une autre CCo "2", donc d'un autre AVLN, avec SNID identique) doit choisir
+ * un autre SNID.
+ * Le SNID qui était en double doit être marqué comme utilisé et la CCo "1" peut
+ * finalement choisir une autre valeur de SNID parmi les SNIDs non utilisés
+ * sur les 16 SNIDs possibles (le SNID est un entier sur 4 bits).
+ * Le choix initial du SNID lorsqu'une station (un équipement) HP_AV s'initialise
+ * puis passe à l'état "Unassociated CCo" ou "CCo" sera un tirage aléatoire entre
+ * 0 inclus et 15 inclus, ce qui permet de diminuer le risque de doublon de SNID
+ * entre les UCCo et CCo sur le même réseau Power-Line au démarrage (mise en route
+ * du secteur avec des équipements fixes connectés, ou branchement d'un ou plusieurs
+ * nouveaux équipements configurés avec un NPW différent de celui des autres équipements
+ * déjà présents, par exemple)
+ * La valeur initiale du SNID ou une nouvelle valeur du SNID déterminée/choisie
+ * après détection d'un conflit de SNID doit être recopiée dans la structure
+ * mac_config pour être rendue disponible dans les couches du Data-Plane qui
+ * utilisent le SNID. Un mécanisme approprié d'activation temporisée d'une nouvelle
+ * valeur du SNID soit être prévu
+ */
+
+BEGIN_DECLS
+
+/**
+ * initialisation of CCo action module.
+ *
+ * \param ctx control plane context
+ */
+void
+cp_cco_action_init(cp_t *ctx);
+
+/**
+ * initialisation of "SNID in use" flags.
+ *
+ * \param ctx control plane context
+ */
+void
+cp_cco_action_reset_snid_flags(cp_t *ctx);
+
+/**
+ * check against SNID conflict.
+ *
+ * \param ctx control plane context
+ *
+ * \return true if SNID conflict, else false
+ *
+ * if the SNID value in argument is in conflict, it is flagged
+ * as already used in the SNID flags
+ */
+bool
+cp_cco_action_check_snid_conflict(cp_t *ctx, snid_t snid);
+
+/**
+ * choose a new SNID value.
+ *
+ * \param ctx control plane context
+ * \param p_snid pointer to return new snid value chosen
+ *
+ * \return false if new SNID could not be chosen, else true
+ *
+ * \todo what to do if new SNID could not be chosen?
+ *
+ * WARNING La valeur initiale du SNID ou une nouvelle valeur du SNID déterminée/choisie
+ * après détection d'un conflit de SNID doit être recopiée dans la structure
+ * mac_config pour être rendue disponible dans les couches du Data-Plane qui
+ * utilisent le SNID. Un mécanisme approprié d'activation temporisée d'une nouvelle
+ * valeur du SNID soit être prévu
+ */
+bool
+cp_cco_action_choose_new_snid(cp_t *ctx, snid_t *p_snid);
+
+
+/**
+ * get a (first) random SNID value.
+ *
+ * \param ctx control plane context
+ *
+ * \return random SNID value between 0 and 15
+ *
+ * WARNING La valeur initiale du SNID doit être recopiée dans la structure
+ * mac_config pour être rendue disponible dans les couches du Data-Plane qui
+ * utilisent le SNID.
+ */
+snid_t
+cp_cco_action_get_random_snid(cp_t *ctx);
+
+/**
+ * create a TEI lease.
+ *
+ * \param ctx control plane context
+ * \param p_tei pointer to return new TEI lease
+ *
+ * \return false if TEI lease creation failed, else true
+ */
+bool
+cp_cco_action_create_tei_lease(cp_t *ctx, tei_t *p_tei);
+
+/**
+ * check for TEI lease expiration.
+ *
+ * \param ctx control plane context
+ * \param p_tei pointer to TEI lease to be checked
+ *
+ * \return true if TEI lease expired, else false
+ */
+bool
+cp_cco_action_check_tei_lease(cp_t *ctx, tei_t *p_tei);
+
+/**
+ * remove a TEI lease.
+ *
+ * \param ctx control plane context
+ * \param p_tei pointer to TEI lease to be removed
+ *
+ * \return false if removing TEI lease failed, else true
+ */
+bool
+cp_cco_action_remove_tei_lease(cp_t *ctx, tei_t *p_tei);
+
+/**
+ * generate a new NEK value.
+ *
+ * \param ctx control plane context
+ * \param sl security level
+ *
+ * \return generated nek value
+ */
+nek_t
+cp_cco_action_gen_nek(cp_t *ctx, u8 sl);
+
+/**
+ * manage association of a station.
+ *
+ * \param ctx control plane context
+ */
+void cp_cco_action_manage_sta_assoc(cp_t *ctx);
+
+/**
+ * manage authentication of a station.
+ *
+ * \param ctx control plane context
+ */
+void cp_cco_action_manage_sta_auth(cp_t *ctx);
+
+END_DECLS
+
+#endif /* cp_cco_action_action_h */
diff --git a/cesar/cp2/cco/action/doc/CCo Con.odt b/cesar/cp2/cco/action/doc/CCo Con.odt
new file mode 100755
index 0000000000..3d3fa51285
--- /dev/null
+++ b/cesar/cp2/cco/action/doc/CCo Con.odt
Binary files differ
diff --git a/cesar/cp2/cco/bw/doc/Bandwidth_Manager.odt b/cesar/cp2/cco/bw/doc/Bandwidth_Manager.odt
new file mode 100755
index 0000000000..50ccce066e
--- /dev/null
+++ b/cesar/cp2/cco/bw/doc/Bandwidth_Manager.odt
Binary files differ
diff --git a/cesar/cp2/cco/region/doc/Region_Manager.odt b/cesar/cp2/cco/region/doc/Region_Manager.odt
new file mode 100755
index 0000000000..bb652ca06f
--- /dev/null
+++ b/cesar/cp2/cco/region/doc/Region_Manager.odt
Binary files differ
diff --git a/cesar/cp2/cl_interf/cl_interf.h b/cesar/cp2/cl_interf/cl_interf.h
new file mode 100644
index 0000000000..6f51494e99
--- /dev/null
+++ b/cesar/cp2/cl_interf/cl_interf.h
@@ -0,0 +1,126 @@
+#ifndef cl_interf__h__
+#define cl_interf__h__
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file Cesare/cp/cl_interf/cl_interf.h
+ * \brief mme interface between CP and DP
+ * \ingroup cp/cl_interf
+ *
+ * This module will :
+ * - get the mme from CL
+ * - if necessary, reassemble it
+ * - manage the Tx buffer
+ * - send mme to the CL
+ */
+
+#include "inc/cl_interf_defs.h"
+
+
+
+BEGIN_DECLS
+
+/**
+ * initialisation of cp_cl_interf module.
+ *
+ * \param ctx the cp context
+ *
+ * register callbacks in DP/CL module,
+ * clear buffers etc.
+ *
+ */
+void
+cp_cl_interf_init(cp_t *ctx);
+
+/**
+ * callback for Rx MME.
+ *
+ * \param ctx the cp context
+ * \param payload the mme itself
+ * \param payload_size size of the payload
+ * \param mfs the receiving mfs
+ * \param hardware_encrypted set to true if the mme was hardwarely encrypted
+ *
+ * !!! this function is executed in the CL context !!!
+ * 1) push the message in the MMEs fifo
+ * 2) set the flag to unlock the station core
+ */
+void
+cp_cl_interf_rx_mme(cp_t *ctx, char *payload, int payload_size, mfs_t * mfs, bool hardware_encrypted);
+
+/**
+ * return the last received and completed mme.
+ *
+ * \param ctx the cp context
+ * \return mme_rx_t the mme context (for unit test purpose only)
+ *
+ * 1) get the last MME from the MMEs fifo
+ * 2) read the MME's header and store it in a newly allocated MME Tx context
+ * 3) check the ODA, and the MME constants
+ * 4) if it is a fragment from a bigger MME
+ * - update the MME context
+ * - copy the payload in 512 byte blocs
+ * 5) if the message is completed, call the msg_dispatch function
+ */
+mme_rx_t *
+cp_cl_interf_give_last_mme(cp_t *ctx);
+
+
+/**
+ * return the Tx MME buffer.
+ *
+ * \param ctx the cp context
+ * \return mme_rx_t the mme context
+ *
+ * !!! This function must be thread-safe !!!
+ * If the Tx buffer is available, return it.
+ * else, wait for it.
+ * It can be called either from CP or CE thread, and the Tx buffer is given
+ * from the CL environnement.
+ */
+mme_tx_t *
+cp_cl_interf_give_tx_buffer(cp_t *ctx);
+
+/**
+ * will send the MME buffer to the DP.
+ *
+ * \param ctx the cp context
+ * \param mme the mme to send and it context
+ *
+ * Must retreive the MFS and send the message through this MFS.
+ * if necessary, will pad the message to the minimum MME size
+ */
+void
+cp_cl_interf_mme_send(cp_t *ctx, mme_tx_t *mme);
+
+/**
+ * callback used by the CL to give back the Tx buffer.
+ *
+ * \param ctx the cp context
+ * \param buffer the buffer
+ *
+ * * !!! this function is executed in the CL context
+ */
+void
+cp_cl_interf_receive_tx_buffer(cp_t *ctx, char * buffer);
+
+/**
+ * this function will remove expired block of fragmented mme.
+ *
+ * \param ctx the cp context
+ *
+ * it is called periodicly, and will check all the currently stored MME
+ * fragments. If necessary, release it.
+ */
+void
+cp_cl_interf_garbage_collector(cp_t *ctx);
+
+
+END_DECLS
+
+#endif \ No newline at end of file
diff --git a/cesar/cp2/cl_interf/inc/cl_interf_defs.h b/cesar/cp2/cl_interf/inc/cl_interf_defs.h
new file mode 100644
index 0000000000..d4265ffee3
--- /dev/null
+++ b/cesar/cp2/cl_interf/inc/cl_interf_defs.h
@@ -0,0 +1,18 @@
+#ifndef CL_INTERF_DEFS_H_
+#define CL_INTERF_DEFS_H_
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file Cesare/cp/cl_interf/inc/cl_interf_defs.h
+ * \brief definition of the cl_interf module
+ * \ingroup cp/cl_interf
+ *
+ */
+
+
+#endif /*CL_INTERF_DEFS_H_*/
diff --git a/cesar/cp2/defs.h b/cesar/cp2/defs.h
new file mode 100644
index 0000000000..48ed1193fa
--- /dev/null
+++ b/cesar/cp2/defs.h
@@ -0,0 +1,31 @@
+#ifndef cp2_defs_h
+#define cp2_defs_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp2/defs.h
+ * \brief Definition for the Contol Plane.
+ * \ingroup cp2
+ *
+ */
+
+/** min size of NPW password. */
+#define MIN_NPW_SIZE 8 // bytes
+#define MAX_NPW_SIZE 64 // bytes
+
+/** max size of hfid (human-friendly identifier). */
+#define HFID_SIZE 64 // bytes
+
+/** NMK size. */
+#define NMK_SIZE 16 // 16 bytes
+
+/** Devince password length. */
+#define MIN_DPW_SIZE 16 // bytes
+#define MAX_DPW_SIZE 64 // bytes
+
+#endif /* cp2_defs_h */
diff --git a/cesar/cp2/mme.h b/cesar/cp2/mme.h
new file mode 100644
index 0000000000..47f4573f40
--- /dev/null
+++ b/cesar/cp2/mme.h
@@ -0,0 +1,229 @@
+#ifndef MME_H_
+#define MME_H_
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file Cesare/cp/mme.h
+ * \brief definition of the mme types
+ * \ingroup cp/
+ *
+ */
+
+
+
+// MMTYPE base-values for DRV-MME messages
+#define DRV_STA_SET_MAC_ADDR 0xA000
+#define DRV_STA_SET_CCO_PREF 0xA004
+#define DRV_STA_SET_WAS_CCO 0xA008
+#define DRV_STA_SET_NPW 0xA00C
+#define DRV_STA_SET_DPW 0xA010
+#define DRV_STA_SET_SL 0xA014
+#define DRV_STA_SET_M_STA_HFID 0xA018
+#define DRV_STA_SET_U_STA_HFID 0xA01C
+#define DRV_STA_SET_AVLN_HFID 0xA020
+#define DRV_STA_SET_TONEMASK 0xA024
+#define DRV_STA_START 0xA028
+#define DRV_STA_STOP 0xA02C
+
+// MMTYPE sub-values for MMEs (REQ, CNF, IND or RSP)
+#define REQ 0x00
+#define CNF 0x01
+#define IND 0x02
+#define RSP 0x03
+/*
+ * mm type constants
+ * take care of the following :
+ * according to Intellon technical reference manual of Homeplug AV firmware p9,
+ * the two LSB value of messages should be :
+ * 0b00 for REQ
+ * 0b01 for CNF
+ * 0b10 for IND
+ * 0b11 for RSP
+ * this is very unclear in the Homeplug AV specification v1.0.10
+ */
+typedef enum cp_mmtype_t
+{
+ CC_CCO_APPOINT_REQ = 0x0000,
+ CC_CCO_APPOINT_CNF = 0x0001,
+ CC_BACKUP_APPOINT_REQ = 0x0004,
+ CC_BACKUP_APPOINT_CNF = 0x0005,
+ CC_LINK_INFO_REQ = 0x0008,
+ CC_LINK_INFO_CNF = 0x0009,
+ CC_LINK_INFO_IND = 0x000A,
+ CC_LINK_INFO_RSP = 0x000B,
+ CC_HANDOVER_REQ = 0x000C,
+ CC_HANDOVER_CNF = 0x000D,
+ CC_HANDOVER_INFO_IND = 0x0012,
+ CC_HANDOVER_INFO_RSP = 0x0013,
+ CC_DISCOVER_LIST_REQ = 0x0014,
+ CC_DISCOVER_LIST_CNF = 0x0015,
+ CC_DISCOVER_LIST_IND = 0x0016,
+ CC_LINK_NEW_REQ = 0x0018,
+ CC_LINK_NEW_CNF = 0x0019,
+ CC_LINK_MOD_REQ = 0x001C,
+ CC_LINK_MOD_CNF = 0x001D,
+ CC_LINK_SQZ_REQ = 0x0020,
+ CC_LINK_SQZ_CNF = 0x0021,
+ CC_LINK_REL_REQ = 0x0024,
+ CC_LINK_REL_IND = 0x0025,
+ CC_DETECT_REPORT_REQ = 0x0028,
+ CC_DETECT_REPORT_CNF = 0x0029,
+ CC_WHO_RU_REQ = 0x002C,
+ CC_WHO_RU_CNF = 0x002D,
+ CC_ASSOC_REQ = 0x0030,
+ CC_ASSOC_CNF = 0x0031,
+ CC_LEAVE_REQ = 0x0034,
+ CC_LEAVE_CNF = 0x0035,
+ CC_LEAVE_IND = 0x0036,
+ CC_LEAVE_RSP = 0x0037,
+ CC_SET_TEI_MAP_REQ = 0x0038,
+ CC_SET_TEI_MAP_IND = 0x0039,
+ CC_RELAY_REQ = 0x003C,
+ CC_RELAY_IND = 0x003D,
+ CC_BEACON_RELIABILITY_REQ = 0x0040,
+ CC_BEACON_RELIABILITY_CNF = 0x0041,
+ CC_ALLOC_MOVE_REQ = 0x0044,
+ CC_ALLOC_MOVE_CNF = 0x0045,
+ CC_ACCESS_NEW_REQ = 0x0048,
+ CC_ACCESS_NEW_CNF = 0x0049,
+ CC_ACCESS_NEW_IND = 0x004A,
+ CC_ACCESS_NEW_RSP = 0x004B,
+ CC_ACCESS_REL_REQ = 0x004C,
+ CC_ACCESS_REL_CNF = 0x004D,
+ CC_ACCESS_REL_IND = 0x004E,
+ CC_ACCESS_REL_RSP = 0x004F,
+ CC_DCPPC_IND = 0x0052,
+ CC_DCPPC_RSP = 0x0053,
+ CC_HP1_DET_REQ = 0x0054,
+ CC_HP1_DET_CNF = 0x0055,
+ CC_BLE_UPDATE_IND = 0x005A,
+
+ CP_PROXY_APPOINT_REQ = 0x2000,
+ CP_PROXY_APPOINT_CNF = 0x2001,
+ PH_PROXY_APPOINT_IND = 0x2006,
+ CP_PROXY_WAKE_REQ = 0x2008,
+
+ NN_INL_REQ = 0x4000,
+ NN_INL_CNF = 0x4001,
+ NN_NEW_REQ = 0x4004,
+ NN_NEW_CNF = 0x4005,
+ NN_NEW_IND = 0x4006,
+ NN_ADD_ALLOC_REQ = 0x4008,
+ NN_ADD_ALLOC_CNF = 0x4009,
+ NN_ADD_ALLOC_IND = 0x400A,
+ NN_REL_ALLOC_REQ = 0x400C,
+ NN_REL_ALLOC_CNF = 0x400D,
+ NN_REL_NET_IND = 0x4012,
+
+ CM_UNASSOCIATED_STA_IND = 0x6002,
+ CM_ENCRYPTED_PAYLOAD_IND = 0x6006,
+ CM_ENCRYPTED_PAYLOAD_RSP = 0x6007,
+ CM_SET_KEY_REQ = 0x6008,
+ CM_SET_KEY_CNF = 0x6009,
+ CM_GET_KEY_REQ = 0x600C,
+ CM_GET_KEY_CNF = 0x600D,
+ CM_SC_JOIN_REQ = 0x6010,
+ CM_SC_JOIN_CNF = 0x6011,
+ CM_CHAN_EST_IND = 0x6016,
+ CM_TM_UPDATE_IND = 0x601A,
+ CM_AMP_MAP_REQ = 0x601C,
+ CM_AMP_MAP_CNF = 0x601D,
+ CM_BRG_INFO_REQ = 0x6020,
+ CM_BRG_INFO_CNF = 0x6021,
+ CM_CONN_NEW_REQ = 0x6024,
+ CM_CONN_NEW_CNF = 0x6025,
+ CM_CONN_REL_IND = 0x602A,
+ CM_CONN_REL_RSP = 0x602B,
+ CM_CONN_MOD_REQ = 0x602C,
+ CM_CONN_MOD_CNF = 0x602D,
+ CM_CONN_INFO_REQ = 0x6030,
+ CM_CONN_INFO_CNF = 0x6031,
+ CM_STA_CAP_REQ = 0x6034,
+ CM_STA_CAP_CNF = 0x6035,
+ CM_NW_INFO_REQ = 0x6038,
+ CM_NW_INFO_CNF = 0x6039,
+ CM_GET_BEACON_REQ = 0x603C,
+ CM_GET_BEACON_CNF = 0x603D,
+ CM_HFID_REQ = 0x6040,
+ CM_HFID_CNF = 0x6041,
+ CM_MME_ERROR_IND = 0x6046,
+ CM_NW_STATS_REQ = 0x6048,
+ CM_NW_STATS_CNF = 0x6049,
+ CM_LINK_STATS_REQ = 0x604C,
+ CM_LINK_STATS_CNF = 0x604D,
+
+ DRV_STA_SET_MAC_ADDR_REQ = DRV_STA_SET_MAC_ADDR + REQ,
+ DRV_STA_SET_MAC_ADDR_CNF = DRV_STA_SET_MAC_ADDR + CNF,
+ DRV_STA_SET_CCO_PREF_REQ = DRV_STA_SET_CCO_PREF + REQ,
+ DRV_STA_SET_CCO_PREF_CNF = DRV_STA_SET_CCO_PREF + CNF,
+ DRV_STA_SET_WAS_CCO_REQ = DRV_STA_SET_WAS_CCO + REQ,
+ DRV_STA_SET_WAS_CCO_CNF = DRV_STA_SET_WAS_CCO + CNF,
+ DRV_STA_SET_WAS_CCO_IND = DRV_STA_SET_WAS_CCO + IND,
+ DRV_STA_SET_WAS_CCO_RSP = DRV_STA_SET_WAS_CCO + RSP,
+ DRV_STA_SET_NPW_REQ = DRV_STA_SET_NPW + REQ,
+ DRV_STA_SET_NPW_CNF = DRV_STA_SET_NPW + CNF,
+ DRV_STA_SET_DPW_REQ = DRV_STA_SET_DPW + REQ,
+ DRV_STA_SET_DPW_CNF = DRV_STA_SET_DPW + CNF,
+ DRV_STA_SET_SL_REQ = DRV_STA_SET_SL + REQ,
+ DRV_STA_SET_SL_CNF = DRV_STA_SET_SL + CNF,
+ DRV_STA_SET_M_STA_HFID_REQ = DRV_STA_SET_M_STA_HFID + REQ,
+ DRV_STA_SET_M_STA_HFID_CNF = DRV_STA_SET_M_STA_HFID + CNF,
+ DRV_STA_SET_U_STA_HFID_REQ = DRV_STA_SET_U_STA_HFID + REQ,
+ DRV_STA_SET_U_STA_HFID_CNF = DRV_STA_SET_U_STA_HFID + CNF,
+ DRV_STA_SET_AVLN_HFID_REQ = DRV_STA_SET_AVLN_HFID + REQ,
+ DRV_STA_SET_AVLN_HFID_CNF = DRV_STA_SET_AVLN_HFID + CNF,
+ DRV_STA_SET_TONEMASK_REQ = DRV_STA_SET_TONEMASK + REQ,
+ DRV_STA_SET_TONEMASK_CNF = DRV_STA_SET_TONEMASK + CNF,
+ DRV_STA_START_REQ = DRV_STA_START + REQ,
+ DRV_STA_START_CNF = DRV_STA_START + CNF,
+ DRV_STA_STOP_REQ = DRV_STA_STOP + REQ,
+ DRV_STA_STOP_CNF = DRV_STA_STOP + CNF,
+
+ TEST_MSG_NUM,
+ MSG_UNKNOW = 0xFFFF
+} cp_mmtype_t;
+
+
+typedef struct cp_mme_header_t // Table 11-178
+{
+ mac_address_t oda; // original destination adress
+ mac_address_t osa; // original source adress
+ u32 v_lan_tag; // ieee 802.1 tag (optional)
+ u16 m_type; // const = 0x88E1
+ u8 mmv; // management message version
+ cp_mmtype_t mmtype; // management message type
+ u8 nf_mi; // Number of fragments for message
+ u8 fn_mi; // fragment number
+ u8 fmsn; // fragmentation message sequence number
+} cp_mme_header_t;
+
+
+typedef struct cp_mme_rx_t
+{
+ char *p_mme; // pointer to the received MME
+ blk_t *p_frag; // pointer to the mme's fragments
+ uint length; // size of the mme (including header)
+ mfs_t mfs; // pointer to the rx mfs
+ tei_t s_tei; // source tei
+ cp_mme_header_t header; // readen header
+ // todo : add bitstream context
+} cp_mme_rx_t;
+
+typedef struct cp_mme_tx_t
+{
+ char *p_mme; // pointer to the Tx buffer
+ uint length; // size of the mme (including header)
+ mfs_t mfs; // pointer to the rx mfs
+ tei_t d_tei; // destination tei
+ bool relay; // true if the message is encapsulated in cc_relay
+ cp_mme_header_t header; // readen header
+ // todo : add bitstream context
+} cp_mme_tx_t;
+
+
+#endif /*MME_H_*/
diff --git a/cesar/cp2/msg/inc/msg_cc.h b/cesar/cp2/msg/inc/msg_cc.h
new file mode 100644
index 0000000000..6d3a0e417d
--- /dev/null
+++ b/cesar/cp2/msg/inc/msg_cc.h
@@ -0,0 +1,52 @@
+#ifndef MSG_CC_H_
+#define MSG_CC_H_
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file Cesare/cp/msg/inc/msg_cc.h
+ * \brief creation and decoding of cc prefixed MMEs
+ * \ingroup cp/msg
+ *
+ * « long description »
+ */
+
+
+
+BEGIN_DECLS
+
+void cp_msg_cc_who_ru_req_send (cp_t *ctx);
+void cp_msg_cc_who_ru_req_receive(cp_t *ctx, mme_rx_t *mme);
+
+void cp_msg_cc_who_ru_cnf_send (cp_t *ctx);
+void cp_msg_cc_who_ru_cnf_receive(cp_t *ctx, mme_rx_t *mme);
+
+void cp_msg_cc_assoc_req_send (cp_t *ctx);
+void cp_msg_cc_assoc_req_receive(cp_t *ctx, mme_rx_t *mme);
+
+void cp_msg_cc_assoc_cnf_send (cp_t *ctx);
+void cp_msg_cc_assoc_cnf_receive(cp_t *ctx, mme_rx_t *mme);
+
+void cp_msg_cc_leave_req_send (cp_t *ctx);
+void cp_msg_cc_leave_req_receive(cp_t *ctx, mme_rx_t *mme);
+
+void cp_msg_cc_leave_cnf_send (cp_t *ctx);
+void cp_msg_cc_leave_cnf_receive(cp_t *ctx, mme_rx_t *mme);
+
+void cp_msg_cc_leave_ind_send (cp_t *ctx);
+void cp_msg_cc_leave_ind_receive(cp_t *ctx, mme_rx_t *mme);
+
+void cp_msg_cc_set_tei_map_ind_send (cp_t *ctx);
+void cp_msg_cc_set_tei_map_ind_receive (cp_t *ctx, mme_rx_t *mme);
+
+void cp_msg_cc_relay_req_send (cp_t *ctx);
+void cp_msg_cc_relay_req_receive (cp_t *ctx, mme_rx_t *mme);
+
+void cp_msg_cc_relay_ind_send (cp_t *ctx);
+void cp_msg_cc_relay_ind_receive (cp_t *ctx, mme_rx_t *mme);
+
+#endif /*MSG_CC_H_*/
diff --git a/cesar/cp2/msg/inc/msg_cm.h b/cesar/cp2/msg/inc/msg_cm.h
new file mode 100644
index 0000000000..5bcc9e4f41
--- /dev/null
+++ b/cesar/cp2/msg/inc/msg_cm.h
@@ -0,0 +1,44 @@
+#ifndef MSG_CM_H_
+#define MSG_CM_H_
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file Cesare/cp/msg/inc/msg_cm.h
+ * \brief creation and decoding of cm prefixed MMEs
+ * \ingroup cp/msg
+ *
+ * « long description »
+ */
+
+
+
+BEGIN_DECLS
+
+void cp_msg_cm_unassociated_sta_ind_send (cp_t *ctx);
+void cp_msg_cm_unassociated_sta_ind_receive (cp_t *ctx, mme_rx_t *mme);
+
+void cp_msg_cm_encrypted_payload_ind_send (cp_t *ctx);
+void cp_msg_cm_encrypted_payload_ind_receive (cp_t *ctx, mme_rx_t *mme);
+
+void cp_msg_cm_set_key_req_send (cp_t *ctx);
+void cp_msg_cm_set_key_req_receive (cp_t *ctx, mme_rx_t *mme);
+
+void cp_msg_cm_set_key_cnf_send (cp_t *ctx);
+void cp_msg_cm_set_key_cnf_receive (cp_t *ctx, mme_rx_t *mme);
+
+
+void cp_msg_cm_get_key_req_send (cp_t *ctx);
+void cp_msg_cm_get_key_req_receive (cp_t *ctx, mme_rx_t *mme);
+
+void cp_msg_cm_get_key_cnf_send (cp_t *ctx);
+void cp_msg_cm_get_key_cnf_receive (cp_t *ctx, mme_rx_t *mme);
+
+void cp_msg_cm_mme_error_ind_send (cp_t *ctx);
+void cp_msg_cm_mme_error_ind_receive (cp_t *ctx, mme_rx_t *mme);
+
+#endif /*MSG_CM_H_*/
diff --git a/cesar/cp2/msg/msg.h b/cesar/cp2/msg/msg.h
new file mode 100644
index 0000000000..e222968b22
--- /dev/null
+++ b/cesar/cp2/msg/msg.h
@@ -0,0 +1,105 @@
+#ifndef msg__h__
+#define msg__h__
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file Cesare/cp/msg/msg.h
+ * \brief mme creation and decoding
+ * \ingroup cp/msg
+ *
+ * This module contain all the function related to the interpretation and
+ * creation of MME messages.
+ * These functions are grouped with messages prefix.
+ */
+
+#include "inc/msg_cc.h"
+#include "inc/msg_cm.h"
+#include "../mme.h"
+
+BEGIN_DECLS
+
+
+/**
+ * initialisation of cp_msg module.
+ *
+ * \param ctx the cp context
+ *
+ */
+void
+cp_msg_init(cp_t *ctx);
+
+
+/**
+ * lookup the message number.
+ *
+ * \param ctx the cp context
+ * \param mme is the message to lookup
+ *
+ * 1) lookup the visual state event from the mmtype
+ * 2) check that the encryption level is compliant with the mme type and the
+ * station status
+ * 3) send the event in the visual state fsm
+ */
+void
+cp_msg_dispatch(cp_t *ctx, cp_mme_rx_t *mme);
+
+
+/**
+ * initialize the buffer for a new message.
+ *
+ * \param ctx the cp context
+ * \param d_tei destination tei of the MME
+ * \return context of the mme (with the header, pointer to the buffer etc)
+ *
+ * 1) will get a buffer for mme transmition,
+ * 2) if the mme is encapsulated in cc_relay, then préformat the cc_relay header
+ * 3) preformat the mme header
+ *
+ */
+cp_mme_tx_t *
+cp_msg_init_mme (cp_t *ctx, tei_t d_tei);
+
+/**
+ * initialize the buffer for an encrypted message.
+ *
+ * \param ctx the cp context
+ * \param d_tei
+ * \param pid protocol id
+ * \param peks encryption key
+ * \return context of the mme (with the header, pointer to the buffer etc)
+ *
+ * same as cp_msg_init, but add : 2b
+ * 1) will get a buffer for mme transmition,
+ * 2) if the mme is encapsulated in cc_relay, then preformat the cc_relay header
+ * 2b) preformat the encrypted header
+ * 3) preformat the mme header
+ *
+ */
+cp_mme_tx_t *
+cp_msg_init_encrypted_mme (cp_t *ctx, tei_t d_tei, pid, peks);
+
+/**
+ * send the message through the cp_cl_interf api.
+ *
+ * \param ctx the cp context
+ * \param mme_tx context of the mme (with the header, pointer to the buffer etc)
+ *
+ * if requested, complete the mme encapsulation
+ * if requested, complete the header
+ * send the messsage through cp_cl_interf
+ * free the mme_tx context
+ *
+ */
+void
+cp_msg_mme_send (cp_t *ctx, cp_mme_tx_t *mme_tx);
+
+
+
+END_DECLS
+
+#endif \ No newline at end of file
diff --git a/cesar/cp2/secu/secu.h b/cesar/cp2/secu/secu.h
new file mode 100644
index 0000000000..8ee67c700f
--- /dev/null
+++ b/cesar/cp2/secu/secu.h
@@ -0,0 +1,160 @@
+#ifndef secu__h__
+#define secu__h__
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file Cesare/cp/secu/secu.h
+ * \brief library of security related functions (crypto, ...)
+ * \ingroup cp/secu
+ *
+ * « long description »
+ */
+
+struct cp_secu_ctx_t
+
+
+BEGIN_DECLS
+
+/**
+ * start a new protocol run.
+ *
+ * \param PID PID of the futur protocol run
+ * \param p_run context of the current protocol run
+ */
+void
+cp_secu_start_new_protocol_run(const cp_pid_t pid, protocol_run_t *p_run);
+
+/**
+ * Check parameters of received protocol run.
+ *
+ * \param p_run security context of the current protocol run
+ * \param pid pid to compare with the current protocol run
+ * \param prn Protocol Run Number to check
+ * \param pmn Protocol Message Number to check
+ * \param nonce nonce to check
+ *
+ * \return error code or 0 if success
+ */
+E_ErrCode
+cp_secu_check_protocol_run_param (
+ const protocol_run_t p_run,
+ const cp_pid_t pid,
+ const s16 prn, // Protocol Run Number
+ const u8 pmn, // Protocol Message Number
+ const s32 nonce
+ );
+
+/**
+ * generate parameters for the protocol run.
+ *
+ * \param p_run security context of the current protocol run
+ * \param pid pid to use for this protocol run
+ * \param prn Protocol Run Number to use
+ * \param pmn Protocol Message Number to use
+ * \param nonce nonce to use
+ *
+ * \return error code or 0 if success
+ */
+E_ErrCode
+secu_gen_protocol_run_param (protocol_run_t *p_run, cp_pid_t *pid, s16 *prn, u8 *pmn, s32 *nonce);
+
+
+/**
+ * AES-CBC buffer encryption.
+ *
+ * \param ctx AES context
+ * \param iv initialization vector (modified after use) (16 bytes)
+ * \param input buffer holding the plaintext
+ * \param output buffer holding the ciphertext
+ * \param len length of the data to be encrypted
+ */
+void
+cp_secu_aes_cbc_encrypt (aes_context *ctx, unsigned char iv[16], unsigned char *input, unsigned char *output, int len);
+/**
+ * AES-CBC buffer decryption.
+ *
+ * \param ctx AES context
+ * \param iv initialization vector (modified after use)
+ * \param input buffer holding the ciphertext
+ * \param output buffer holding the plaintext
+ * \param len length of the data to be decrypted
+ */
+void
+cp_secu_aes_cbc_decrypt (aes_context *ctx, unsigned char iv[16], unsigned char *input, unsigned char *output, int len);
+
+/**
+ * set AES key.
+ *
+ * \param ctx AES context to be initialized
+ * \param key the secret key
+ * \param keysize must be 128, 192 or 256 bits long
+ */
+void
+cp_secu_aes_set_key (aes_context *ctx, unsigned char *key, int keysize);
+
+/**
+ * Output = SHA-256( input buffer ).
+ *
+ * \param input buffer holding the data
+ * \param ilen length of the input data
+ * \param output SHA-224/256 checksum result size is SHA256OutputSize bytes
+ * \param is224 0 = use SHA256, 1 = use SHA224
+ */
+void
+cp_secu_sha2 (unsigned char *input, int ilen, unsigned char *output, int is224);
+
+/**
+ * pbkdf1 function
+ * \param input the input data to hash (can be a clear ascii password)
+ * \param input_len length of input
+ * \param salt salt to apply to input data
+ * \param salt_len length of salt
+ * \param it_count iteration number for the hash function
+ * \param output_key result of hash
+ * \return error code or 0 if success
+ */
+E_ErrCode
+cp_secu_pbkdf1 (u8 input[], int input_len, u8 salt[], int salt_len, int it_count, u8 output_key[]);
+
+
+/**
+ * generate AES key (NEK, NMK or TEK).
+ * \param
+ * \return error code or 0 if success
+ *
+ * see 7.10.7.2 for details
+ */
+void
+cp_secu_gen_aes_key(void);
+
+/*
+ * Hash a 128 bits NMK key to generate a 54 bits NID.
+ * conforming to the security level specified.
+ * \param nmk, the NMK buffer pointer (input)
+ * \param security_level, the station security-level
+ * \param nid, the NID buffer pointer (output)
+ * \return E_ErrCode, return code (0 if success)
+ */
+E_ErrCode
+cp_secu_nmk2nid(u8 *nmk, u8 security_level, u8 *nid);
+
+/*
+ * Hash a NPW password (1 to 64 chars in the 0x20-0x7F standard ASCII interval)
+ * to generate a 16 octets (128 bits) NMK key.
+ * \param npw,the NPW buffer pointer (input)
+ * \param nmk, the NMK buffer pointer (output)
+ * \return E_ErrCode, return code (0 if success)
+ */
+E_ErrCode
+cp_secu_npw2nmk(char *npw, u8 *nmk);
+
+
+
+END_DECLS
+
+#endif \ No newline at end of file
diff --git a/cesar/cp2/sta/action/action.h b/cesar/cp2/sta/action/action.h
new file mode 100644
index 0000000000..6182b65964
--- /dev/null
+++ b/cesar/cp2/sta/action/action.h
@@ -0,0 +1,46 @@
+#ifndef cp_sta_action_action_h
+#define cp_sta_action_action_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/sta/action/action.h
+ * \brief STA action.
+ * \ingroup cp_sta
+ *
+ * This module implements actions defined in the FSM and actions corresponding
+ * to MME reception.
+ */
+#include "cp/sta/action/assoc.h"
+#include "cp/sta/action/key.h"
+#include "cp/sta/action/misc.h"
+
+BEGIN_DECLS
+
+/**
+ * Process a CM_UNASSOCIATED_STA.IND, 11.5.1.
+ * \param ctx control plane context
+ * \param mme received MME handle
+ * \param nid NID the STA try to associate with
+ * \param cco_cap CCo capabilities of the sending STA
+ *
+ * Update the STA list and if should become CCo, post an event to do so.
+ *
+ * Need:
+ * - our NID
+ *
+ * Update:
+ * - STA mgr.
+ */
+void
+cp_sta_action_process_cm_unassociated_sta_ind (cp_t *ctx, cp_mme_t *mme,
+ cp_nid_t nid,
+ cp_cco_cap_t cco_cap);
+
+END_DECLS
+
+#endif /* cp_sta_action_action_h */
diff --git a/cesar/cp2/sta/action/assoc.h b/cesar/cp2/sta/action/assoc.h
new file mode 100644
index 0000000000..2e8a872133
--- /dev/null
+++ b/cesar/cp2/sta/action/assoc.h
@@ -0,0 +1,190 @@
+#ifndef cp_sta_action_assoc_h
+#define cp_sta_action_assoc_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/sta/action/assoc.h
+ * \brief STA action, association related definitions.
+ * \ingroup cp_sta
+ *
+ * Association/disassociation
+ * ==========================
+ *
+ * This part relates to association and disassociation for a STA. A state
+ * machine is used to handle the association status of the station:
+ *
+ * \image html assoc.png "Association state machine"
+ *
+ * - (1) send CC_ASSOC.REQ
+ * - (2) send CM_GET_KEY.REQ
+ * - (3) send CC_ASSOC.REQ for renewal
+ * - (4) send CM_SET_KEY.CNF
+ * - (5) send CC_LEAVE.REQ
+ * - (6) send CC_LEAVE.RSP
+ * - (7) cleanup data plane
+ *
+ * For the moment, only one association scheme is supported: association with
+ * matching NID, without proxy network.
+ *
+ * Related: 7.3.2, 7.3.3, 7.3.4.1, 7.3.5.1, 7.3.6.
+ *
+ *
+ * Association
+ * -----------
+ *
+ * When the station wants to associate, it set the association parameters and
+ * trigger the "to assoc" event. This will send the CC_ASSOC.REQ message to
+ * the CCo and wait for response.
+ *
+ * If no response is received, retry. Retry is needed because we are not
+ * associated and broadcast is used.
+ *
+ * If a negative response is received, association has failed, this is
+ * remembered in order not to try to associate too often to the same CCo.
+ *
+ * If a positive response is received, go to associated state.
+ *
+ *
+ * Authentication
+ * --------------
+ *
+ * When entering this state, send a payload encrypted CM_GET_KEY.REQ to
+ * request the NEK.
+ *
+ * Once the station is authenticated, CC_SET_TEI_MAP.IND messages can be
+ * received.
+ *
+ * As unicast transmissions are used, a timeout will directly break the
+ * association sequence.
+ *
+ * If a negative response is received, association has failed, the CCo is
+ * using a different NMK. This is remembered in order not to associate with
+ * this CCo again (until keys are changed).
+ *
+ * If a positive response is received, the station is authenticated.
+ *
+ * Once authenticated, the CCo can change the NEK periodically.
+ *
+ * Lease renewal
+ * -------------
+ *
+ * Association is granted for a given time. When the station is associated,
+ * program a timer to renew the association. When this timer expires, send a
+ * CC_ASSOC.REQ for renewal and set the timer for a second chance.
+ *
+ * The station will not leave the AVLN by itself due to lease expiration. It
+ * will wait an eventual CC_LEAVE.IND message to do so.
+ *
+ * When the CCo confirms the renewal, the renew timer is reset to the value
+ * given in its confirmation message. Ignore renewal failure, will wait for
+ * the CC_LEAVE.IND message.
+ *
+ *
+ * Leaving
+ * -------
+ *
+ * If the request comes from the sta, trigger the "leave" event. This will
+ * send the CC_LEAVE.REQ message to the CCo and wait for response. If no
+ * response cames for three beacon periods, resend and go to the "leave wait"
+ * state.
+ *
+ * If the request comes from the CCo (CC_LEAVE.IND), send a response and go to
+ * the "leave wait" state.
+ *
+ * The "leave wait" state is there to give time to the data plane to send the
+ * MME. After a fixed timer, go back to unassociated state and cleanup the
+ * data plane from all AVLN related parameters.
+ */
+
+BEGIN_DECLS
+
+/**
+ * Start a association procedure.
+ * \param ctx control plane context
+ * \param cco CCo to associate with
+ *
+ * Send a CC_ASSOC.REQ to the CCo and trigger TO_ASSOC event.
+ *
+ * Need:
+ * - CCo to associate to (MAC, TEI, NID).
+ * - our CCo cap and proxy network cap.
+ */
+void
+cp_sta_action_assoc_start (cp_t *ctx, cp_sta_t *cco);
+
+/**
+ * Process a CC_ASSOC.CNF, 11.2.29.
+ * \param ctx control plane context
+ * \param mme received MME handle
+ * \param result association result
+ * \param nid NID of the sender network
+ * \param snid SNID of the sender network
+ * \param tei new TEI to use, valid if association is successful
+ * \param lease_time_min period of time of TEI validity
+ *
+ * Confirmation from the CCo on association request. If this does not
+ * correspond to a previously sent request, drop.
+ *
+ * If we were associating and if the CCo accepted our association, update
+ * association information, send the CC_GET_KEY.REQ, and post a TO_SUCCESS
+ * event. If the CCo refused, post a TO_FAILURE and update the CCo
+ * information to remember the failure.
+ *
+ * If we were renewing, just update the lease time.
+ *
+ * Need:
+ * - whether a association is pending and its characteristics.
+ *
+ * Update:
+ * - our TEI.
+ * - our TEI lease time (update lease timer).
+ * - our AVLN.
+ * - our AVLN SNID.
+ * - CCo failure info.
+ */
+void
+cp_sta_action_process_cc_assoc_cnf (cp_t *ctx, cp_mme_t *mme,
+ cp_msg_cc_assoc_cnf_result_t result,
+ cp_nid_t nid, cp_snid_t snid,
+ cp_tei_t tei, uint lease_time_min);
+
+/**
+ * Process a CC_LEAVE.CNF, 11.2.31.
+ * \param ctx control plane context
+ * \param mme received MME handle
+ *
+ * Confirmation from the CCo on leave request. If this does not correspond to
+ * a previously sent request, drop. Else, post an event to leave the AVLN.
+ *
+ * Need:
+ * - whether a leave is pending and its characteristics.
+ */
+void
+cp_sta_action_process_cc_leave_cnf (cp_t *ctx, cp_mme_t *mme);
+
+/**
+ * Process a CC_LEAVE.IND, 11.2.32.
+ * \param ctx control plane context
+ * \param mme received MME handle
+ * \param reason reason for the disassociation
+ * \param nid NID
+ *
+ * The CCo ask us to leave the AVLN. Send a CC_LEAVE.RSP, and post an event
+ * to leave the AVLN.
+ *
+ * Need:
+ * - our AVLN NID (to check message).
+ */
+void
+cp_sta_action_process_cc_leave_ind (cp_t *ctx, cp_mme_t *mme,
+ cp_msg_cc_leave_ind_reason_t reason,
+ nid_t nid);
+
+END_DECLS
+
+#endif /* cp_sta_action_assoc_h */
diff --git a/cesar/cp2/sta/action/doc/Makefile b/cesar/cp2/sta/action/doc/Makefile
new file mode 100644
index 0000000000..44acd4bd16
--- /dev/null
+++ b/cesar/cp2/sta/action/doc/Makefile
@@ -0,0 +1,47 @@
+PAGES = assoc key misc
+GRAPHS = assoc
+
+DOTFLAGS = -Gbgcolor='\#f7f7f7' -Nfillcolor=white
+CONVERTFLAGS = -border 1 -bordercolor '\#d7d7d7'
+
+TOOLS_DIR = ../../../../common/tools
+DOC_DIR = ../../../../common/doc
+SDL2DOT = $(TOOLS_DIR)/sdl2dot
+SDLPS = $(TOOLS_DIR)/sdl.ps
+EXTRACT_DOC = $(DOC_DIR)/extractdoc
+DOX2RST = $(DOC_DIR)/dox2rst
+
+all: png rst
+
+png: $(GRAPHS:%=%.png)
+ps: $(GRAPHS:%=%.ps)
+
+%.png: %.ps
+ convert $(CONVERTFLAGS) $< $@
+
+%.ps: %.dot Makefile
+ dot $(DOTFLAGS) -Tps -l $(SDLPS) -o $@ $<
+
+%.dot: %.sdl
+ $(SDL2DOT) $< > $@
+
+rst: top.rst
+html: png top.html
+odt: top.odt
+
+top.rst: $(PAGES:%=%.rst)
+ cat $^ > $@
+
+%.rst: ../%.h
+ $(EXTRACT_DOC) $< | $(DOX2RST) > $@
+
+%.html: %.rst
+ rst2html $< $@
+
+%.odt: %.rst
+ rst2odt.py $< $@
+
+clean:
+ rm -f $(GRAPHS:%=%.ps) $(GRAPHS:%=%.png)
+ rm -f $(PAGES:%=%.rst) $(PAGES:%=%.html)
+ rm -f top.rst top.html top.odt
diff --git a/cesar/cp2/sta/action/doc/assoc.sdl b/cesar/cp2/sta/action/doc/assoc.sdl
new file mode 100644
index 0000000000..62da4a08c3
--- /dev/null
+++ b/cesar/cp2/sta/action/doc/assoc.sdl
@@ -0,0 +1,21 @@
+(unassociated) -to assoc(1)-> (wait assoc cnf)
+
+(wait assoc cnf) -CC_ASSOC.CNF-> <w:ok?> -y(2)-> (associated)
+ <w:ok?> -n-> (unassociated)
+(wait assoc cnf) -timeout-> <retry?> -y(1)-> (wait assoc cnf)
+ <retry?> -n-> (unassociated)
+
+(associated) -CM_GET_KEY.CNF-> <a:ok?> -y-> (authenticated)
+ <a:ok?> -n-> (unassociated)
+(associated) -timeout-> (unassociated)
+
+(authenticated) -renew(3)-> (authenticated)
+(authenticated) -CC_ASSOC.CNF-> (authenticated)
+(authenticated) -CM_SET_KEY.REQ(4)-> (authenticated)
+(authenticated) -leave(5)-> (leaving)
+(authenticated) -CC_LEAVE.IND(6)-> (leave wait)
+
+(leaving) -CC_LEAVE.CNF(7)-> (unassociated)
+(leaving) -timeout(5) (3pb)-> (leave wait)
+
+(leave wait) -timeout(7)-> (unassociated)
diff --git a/cesar/cp2/sta/action/doc/cp_sta_action.odt b/cesar/cp2/sta/action/doc/cp_sta_action.odt
new file mode 100644
index 0000000000..68dc798f8b
--- /dev/null
+++ b/cesar/cp2/sta/action/doc/cp_sta_action.odt
Binary files differ
diff --git a/cesar/cp2/sta/action/key.h b/cesar/cp2/sta/action/key.h
new file mode 100644
index 0000000000..d55fc824b5
--- /dev/null
+++ b/cesar/cp2/sta/action/key.h
@@ -0,0 +1,165 @@
+#ifndef cp_sta_action_key_h
+#define cp_sta_action_key_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/sta/action/key.h
+ * \brief STA action, key exchange messages.
+ * \ingroup cp_sta
+ *
+ * Key exchanges
+ * =============
+ *
+ * This part handle key exchange messages. As theses messages are used for
+ * many unrelated protocol, theses functions will only handle generic
+ * verifications and will then forward the message to the right recipient.
+ */
+
+BEGIN_DECLS
+
+/**
+ * Process a CM_SET_KEY.REQ, 11.5.4.
+ * \param ctx control plane context
+ * \param mme received MME handle
+ * \param key_type key type being set
+ * \param my_nounce to be used in next message
+ * \param your_nounce used in previous message
+ * \param pid protocol identifier
+ * \param prn protocol run number
+ * \param pmn protocol message number
+ * \param cco_cap CCo capabilities of the sending STA
+ * \param nid NID of the sender network, associated with the NMK
+ * \param new_eks EKS of the key being set
+ * \param new_key new key, or NULL if none.
+ *
+ * This message is used in several protocols. First check that this message
+ * is legitimate, then depending of the protocol, call the corresponding
+ * function.
+ *
+ * Used to:
+ * - from STA to STA:
+ * - NMK provisioning using DAK (PID=2):
+ * - set TEK, DAK encrypted (not handled): used to start the protocol
+ * - set NMK, DAK encrypted (not handled)
+ * - NMK provisioning using UKE (PID=3):
+ * - set NMK, TEK encrypted (not handled)
+ * - from CCo to STA:
+ * - set NEK (PID=1), done periodically by the CCo
+ * - from HLE to STA:
+ * - set NMK (not handled)
+ */
+void
+cp_sta_action_process_cm_set_key_req (cp_t *ctx, cp_mme_t *mme,
+ cp_key_type_t key_type,
+ u32 my_nounce, u32 your_nounce,
+ cp_pid_t pid,
+ u16 prn, u8 pmn,
+ cp_cco_cap_t cco_cap,
+ cp_nid_t nid,
+ u8 new_eks,
+ cp_key_t *new_key);
+
+/**
+ * Process a CM_SET_KEY.CNF, 11.5.5.
+ * \param ctx control plane context
+ * \param mme received MME handle
+ * \param result transaction result
+ * \param my_nounce to be used in next message
+ * \param your_nounce used in previous message
+ * \param pid protocol identifier
+ * \param prn protocol run number
+ * \param pmn protocol message number
+ * \param cco_cap CCo capabilities of the sending STA
+ *
+ * Response from a preceding CM_SET_KEY.REQ. First check that this message is
+ * legitimate and that it correspond to a sent request, then call the
+ * corresponding function.
+ *
+ * This message can be forwarded to the CCo module.
+ */
+void
+cp_sta_action_process_cm_set_key_cnf (cp_t *ctx, cp_mme_t *mme,
+ cp_msg_cm_set_key_cnf_result_t result,
+ u32 my_nounce, u32 your_nounce,
+ cp_pid_t pid,
+ u16 prn, u8 pmn,
+ cp_cco_cap_t cco_cap);
+
+/**
+ * Process a CM_GET_KEY.REQ, 11.5.6.
+ * \param ctx control plane context
+ * \param mme received MME handle
+ * \param req_type request type (relayed or not)
+ * \param key_type requested key type
+ * \param nid NID of the network of the sender, or the sender want to join
+ * \param my_nounce to be used in next message
+ * \param pid protocol identifier
+ * \param prn protocol run number
+ * \param pmn protocol message number
+ * \param hash HASH key, used to generate a TEK, or NULL if not present
+ *
+ * This message is used in several protocols. First check that this message
+ * is legitimate, then depending of the protocol, call the corresponding
+ * function.
+ *
+ * This message can be forwarded to the CCo module.
+ *
+ * Used to:
+ * - from STA to STA:
+ * - NMK provisioning using UKE (PID=3):
+ * - get HASH KEY, unencrypted unicast (not handled): used to derive the
+ * TEK
+ * - from STA to CCo:
+ * - get NEK, NMK encrypted (PID=0)
+ * - from HLE to STA:
+ * - get NMK (not handled)
+ */
+void
+cp_sta_action_process_cm_get_key_req (cp_t *ctx, cp_mme_t *mme,
+ cp_msg_cm_get_key_req_type_t req_type,
+ cp_key_type_t key_type,
+ cp_nid_t nid,
+ u32 my_nounce,
+ cp_pid_t pid,
+ u16 prn, u8 pmn,
+ u8 *hash);
+
+/**
+ * Process a CM_GET_KEY.CNF, 11.5.7.
+ * \param ctx control plane context
+ * \param mme received MME handle
+ * \param result transaction result
+ * \param key_type requested key type
+ * \param my_nounce to be used in next message
+ * \param your_nounce used in previous message
+ * \param nid NID of the sender network
+ * \param eks EKS of the received key
+ * \param pid protocol identifier
+ * \param prn protocol run number
+ * \param pmn protocol message number
+ * \param hash HASH key, used to generate a TEK, or NULL if not present
+ * \param key received key, or NULL if not present
+ *
+ * Response from a preceding CM_GET_KEY.REQ. First check that this message is
+ * legitimate and that it correspond to a sent request, then call the
+ * corresponding function.
+ */
+void
+cp_sta_action_process_cm_get_key_cnf (cp_t *ctx, cp_mme_t *mme,
+ cp_msg_cm_get_key_cnd_result_t result,
+ cp_key_type_t key_type,
+ u32 my_nounce, u32 your_nounce,
+ cp_nid_t nid,
+ u8 eks,
+ cp_pid_t pid,
+ u16 prn, u8 pmn,
+ u8 *hash, cp_key_t *key);
+
+END_DECLS
+
+#endif /* cp_sta_action_key_h */
diff --git a/cesar/cp2/sta/action/misc.h b/cesar/cp2/sta/action/misc.h
new file mode 100644
index 0000000000..8a9b717578
--- /dev/null
+++ b/cesar/cp2/sta/action/misc.h
@@ -0,0 +1,117 @@
+#ifndef misc_h
+#define misc_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file misc.h
+ * \brief STA action, miscellaneous definitions.
+ * \ingroup cp_sta
+ *
+ * Miscellaneous
+ * =============
+ *
+ * This part handle other miscellaneous STA function, most of theses are
+ * simple enough to be handled without any remembered state.
+ */
+
+BEGIN_DECLS
+
+/**
+ * Process a CC_WHO_RU.REQ, 11.2.26.
+ * \param ctx control plane context
+ * \param mme received MME handle
+ * \param nid NID of network being queried
+ *
+ * Provide AVLN identity and CCo MAC address. If the NID correspond to our
+ * NID, send a CC_WHO_RU.CNF. In other cases, drop.
+ *
+ * Need:
+ * - our CCo MAC address.
+ * - our AVLN HFID.
+ */
+void
+cp_sta_action_process_cc_who_ru_req (cp_t *ctx, cp_mme_t *mme, cp_nid_t nid);
+
+/**
+ * Process a CC_SET_TEI_MAP.IND, 11.2.35.
+ * \param ctx control plane context
+ * \param mme received MME handle
+ * \param mode update, add or remove
+ *
+ * The CCo send an update of the AVLN list of STA. According to the mode,
+ * update the whole list, add or remove a STA.
+ *
+ * Need:
+ * - use a cp_msg function to read the rest of the message.
+ *
+ * Update:
+ * - STA mgr.
+ */
+void
+cp_sta_action_process_cc_set_tei_map_ind_update (
+ cp_t *ctx, cp_mme_t *mme, cp_msg_cc_set_tei_map_ind_mode_t mode);
+
+/**
+ * Process a CC_RELAY.REQ, 11.2.36.
+ * \param ctx control plane context
+ * \param mme received MME handle
+ * \param fda final destination address
+ * \param ftei final destination TEI
+ * \param len payload size
+ *
+ * Extract the payload from the MME, and encapsulate it in a CC_RELAY.IND to
+ * the final destination.
+ *
+ * There is special behaviour depending on the contained payload. If the
+ * relay request is not encrypted, only relay MME which are permitted to be
+ * unencrypted. If the relay request is not encrypted and contains a
+ * CM_ENCRYPTED_PAYLOAD.IND, the CC_RELAY.IND should be sent broadcast. This
+ * could be done by the cp_msg module.
+ *
+ * - What to do with the MAC address?
+ */
+void
+cp_sta_action_process_cc_relay_req (cp_t *ctx, cp_mme_t *mme, mac_t fda,
+ cp_tei_t ftei, uint len);
+
+/**
+ * Process a CC_RELAY.IND, 11.2.37.
+ * \param ctx control plane context
+ * \param mme received MME handle
+ * \param osa original source address
+ * \param otei original source TEI
+ * \param len payload size
+ *
+ * Extract the payload and insert the message back.
+ *
+ * Relay station is trusted as long as it is authenticated. It should have
+ * filtered unauthorised payload.
+ */
+void
+cp_sta_action_process_cc_relay_ind (cp_t *ctx, cp_mme_t *mme, mac_t osa,
+ cp_tei_t otei, uint len);
+
+/**
+ * Process a CM_MME_ERROR.IND, 11.5.32.
+ * \param ctx control plane context
+ * \param mme received MME handle
+ * \param reason reason of the error
+ * \param rx_mmv MMV of the erroneous MME
+ * \param rx_mmtype MMTYPE of the erroneous MME
+ * \param invalid_byte_offset offset in the MME of the error
+ *
+ * Used for debug. Trace the error.
+ */
+void
+cp_sta_action_process_cm_mme_error_ind (
+ cp_t *ctx, cp_mme_t *mme, cp_msg_cm_mme_error_ind_reason_t reason,
+ u8 rx_mmv, u16 rx_mmtype, u16 invalid_byte_offset);
+
+END_DECLS
+
+#endif /* misc_h */
diff --git a/cesar/cp2/sta/core/core.h b/cesar/cp2/sta/core/core.h
new file mode 100644
index 0000000000..d0d02fea2e
--- /dev/null
+++ b/cesar/cp2/sta/core/core.h
@@ -0,0 +1,122 @@
+#ifndef cp_sta_core_core_h
+#define cp_sta_core_core_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/sta/core/core.h
+ * \brief STA core.
+ * \ingroup cp_sta
+ *
+ * station core module implements following elements and functionalities
+ * *CP thread
+ * *main CP thread wait event loop
+ * station events as eCos event flags
+ * eCos event flag mask initialisation, event masking & unmasking,
+ * manage MME, beacon, FSM and garbage events
+ * garbage collector event flag
+ * manage (set/stop) the garbage collector timer
+ * *garbage collector timer DSR function (activation of the garbage flag,
+ * the garbage collector event flag will be taken into account with the
+ * lowest priority by the main wait event loop)
+ * *in case of garbage flag event activated, garbage collector consists in
+ * freeing "not terminated" MME messages buffers (i.e. MME messages which
+ * were not fully re-assembled, that is, which have a recorded date exceeding
+ * the current date + 1 second)
+ * dispatch a MME message beeing received
+ * in case of MME event flag activated, call the cp_interf() function which
+ * takes the available MME in the Rx FIFO and then calls the msg_dispatch()
+ * function that will post the relevant FSM event in the FSM event FIFO
+ * manage beacon data
+ * in case of beacon event flag activated
+ * implement various utility functions
+ * launch/stop a timer
+ * timer callback function for each sort of timer
+ * API function to put a FSM event in the FSM event FIFO.
+ */
+
+BEGIN_DECLS
+
+/**
+ * initialisation of station core.
+ *
+ * \param ctx control plane context
+ */
+void
+cp_station_core_init(cp_t *ctx);
+
+/**
+ * garbage collector, that is, freeing "not terminated" MME messages buffers
+ * (i.e. MME messages which were not fully re-assembled, that is, which have
+ * a recorded date exceeding the current date + 1 second).
+ *
+ * \param ctx control plane context
+ */
+void
+cp_station_core_garbage_collector(cp_t *ctx);
+
+/**
+ * garbage collector timer DSR (set the relevant event flag).
+ *
+ * \param ctx control plane context
+ */
+void
+cp_station_core_garbage_collector_timer_dsr(cp_t *ctx);
+
+/**
+ * create an alarm that will generate an event after the specified delay.
+ *
+ * \param cyg_flag the event handle
+ * \param station_flag the event flag
+ * \param event_delay_ms the amount of time to wait in millisecond
+ */
+void
+cp_station_core_gen_timed_event(cyg_flag_t *cyg_flag, station_flag_t station_flag, SEM_EVENT_TYPE event_type, uint event_delay_ms);
+
+/**
+ * will stop an alarm previously created with cp_station_core_gen_timed_event
+ *
+ * \param cyg_flag the event handle
+ * \param station_flag the event flag
+ */
+void
+cp_station_core_stop_timed_event(cyg_flag_t *cyg_flag, station_flag_t station_flag);
+
+/**
+ * this function is called when the amount of time specified
+ * with station_wait_event() has elapsed.
+ *
+ * \param alarm
+ * \param data
+ *
+ * see eCos manual about alarm
+ * warning : this function is called in DSR context
+ */
+void
+cp_station_core_alarm_handler(cyg_handle_t alarm, cyg_addrword_t data);
+
+
+/**
+ * CP main wait event loop.
+ *
+ * \param ctx control plane context
+ */
+void
+cp_station_core_wait_event_loop(cp_t *ctx);
+
+/**
+ * main CP thread (Control-Plane thread).
+ *
+ * \param data thread entry data
+ *
+ * calls the CP main wait event loop
+ */
+void cp_station_core_cp_thread(cyg_addrword_t data);
+
+END_DECLS
+
+#endif /* cp_sta_core_core_h */
diff --git a/cesar/cp2/sta/data/inc/own_data.h b/cesar/cp2/sta/data/inc/own_data.h
new file mode 100644
index 0000000000..df9e67ca0c
--- /dev/null
+++ b/cesar/cp2/sta/data/inc/own_data.h
@@ -0,0 +1,30 @@
+#ifndef cp2_sta_data_inc_own_data_h
+#define cp2_sta_data_inc_own_data_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp2/sta/data/inc/own_data.h
+ * \brief Station own data.
+ * \ingroup cp_sta_data
+ *
+ * Structure containing the station own data.
+ */
+
+struct cp_sta_own_data_private
+{
+ /** STA's tei. */
+ u8 tei;
+ /** Mac address. */
+ mac_t mac_address;
+ /** Security level. */
+ u8 security_level;
+};
+typedef struct cp_sta_own_data_private cp_sta_own_data_private;
+
+
+#endif /* cp2_sta_data_inc_own_data_h */
diff --git a/cesar/cp2/sta/data/inc/sta_data.h b/cesar/cp2/sta/data/inc/sta_data.h
new file mode 100644
index 0000000000..9bfe395837
--- /dev/null
+++ b/cesar/cp2/sta/data/inc/sta_data.h
@@ -0,0 +1,33 @@
+#ifndef cp2_sta_data_inc_sta_data_h
+#define cp2_sta_data_inc_sta_data_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp2/sta/data/inc/sta_data.h
+ * \brief Sta private paramters.
+ * \ingroup cp_sta_data
+ *
+ */
+
+struct cp_sta_private_t
+{
+ /** TEI of the station. */
+ u8 tei;
+ /** STA's mac address. */
+ mac_t mac_address;
+ /** boolean associated. */
+ bool assoc;
+ /** CCo status. */
+ bool cco_status;
+ /** PCo status. */
+ bool pco_status;
+ /** backup CCo status. */
+ bool backup_cco_status;
+};
+
+#endif /* cp2_sta_data_inc_sta_data_h */
diff --git a/cesar/cp2/sta/data/net_list.h b/cesar/cp2/sta/data/net_list.h
new file mode 100644
index 0000000000..52f1ff1d8e
--- /dev/null
+++ b/cesar/cp2/sta/data/net_list.h
@@ -0,0 +1,83 @@
+#ifndef cp2_sta_data_net_list_h
+#define cp2_sta_data_net_list_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp2/sta/data/net_list.h
+ * \brief CP Net list managing an AVLN.
+ * \ingroup cp_sta_data
+ *
+ * The Network list data for one AVLN.
+ */
+
+#include "cp2/sta/data/sta_list.h"
+
+struct cp_net_list_t
+{
+ /** Short Network ID. */
+ u16 snid;
+ /** Network ID. */
+ u64 nid;
+ /** Network Membership Key. */
+ uint nmk;
+ /** Network password. */
+ u128 npw;
+ /** Network present. */
+ bool present;
+ /** CCo in the AVLN. */
+ cp_sta_t cco;
+ /** PCo in the AVLN. */
+ cp_sta_t pco;
+};
+typedef struct cp_net_list_t cp_net_list_t;
+
+/** Add a sta to this AVLN.
+ * \param net_list the net list to add the sta.
+ * \param sta the sta to add.
+ */
+void
+cp_net_list_add_sta(cp_net_list_t *net_list, cp_sta_t *sta);
+
+/** Remove a station from the AVLN.
+ * \param net_list the list to remove ths sta.
+ * \param the sta to remove.
+ */
+void
+cp_net_list_remove_sta(cp_net_list_t *net_list, cp_sta_t *sta);
+
+/** Remove the sta by providing the STA's tei from this AVLN.
+ * \param net_list the net_list from the one the sta shall be removed.
+ * \param tei the station's tei.
+ */
+void
+cp_net_list_remove_sta_from_tei(cp_net_list_t *net_list, u8 tei);
+
+/** Get the station from the AVLN.
+ * \param net_list the net_list to get the station.
+ * \param tei the tei of the station.
+ * \return the station if it is in the AVLN, NULL otherwise.
+ */
+cp_sta_t *
+cp_net_list_get_sta(cp_net_list_t *net_list, u8 tei);
+
+/** Get the first station of the AVLN.
+ * \param net_list the AVLN list to get it's first sta.
+ * \return the first station if the AVLN has one.
+ */
+cp_sta_t *
+cp_net_list_first_sta(cp_net_list_t *net_list);
+
+/** Get the next station from the AVLN.
+ * \param net_list the AVLN net list.
+ * \param sta the current station to get the next one.
+ * \return the next station of the one provided.
+ */
+cp_sta_t *
+cp_sta_t cp_net_list_next_sta(cp_net_list_t *net_list, cp_sta_t *sta);
+
+#endif /* cp2_sta_data_net_list_h */
diff --git a/cesar/cp2/sta/data/own_data.h b/cesar/cp2/sta/data/own_data.h
new file mode 100644
index 0000000000..2865cd1346
--- /dev/null
+++ b/cesar/cp2/sta/data/own_data.h
@@ -0,0 +1,111 @@
+#ifndef cp2_sta_data_own_data_h
+#define cp2_sta_data_own_data_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp2/sta/data/own_data.h
+ * \brief Station own data.
+ * \ingroup cp_sta_data
+ *
+ * Structure containing the station own data.
+ */
+
+#include "cp2/defs.h"
+#include "cp2/sta/data/inc/own_data.h"
+
+/** Waning When storing data bigger than one word, think about the access. */
+
+struct cp_sta_own_data
+{
+ /** Private part only usable with the accessor defined below. */
+ cp_sta_own_data_private private;
+
+ /** NID. */
+ u64 nid;
+ /** NMK. */
+ u8 nmk[NMK_SIZE];
+ /** Network password. */
+ u8 npw[MAX_NPW_SIZE];
+ /** Devide password. */
+ u8 dpw[MAX_DPW_SIZE];
+
+
+ /** CCo prefered status. */
+ bool cco_prefered;
+ /** Was CCo status. */
+ bool was_cco;
+
+
+ /** Manufacturer Human identifier. */
+ u8 hfid_manu[HFID_SIZE];
+ /** User HFID. */
+ u8 hfid_user[HFID_SIZE];
+ /** Avln HFID. */
+ u8 hfid_avln[HFID_SIZE];
+};
+typedef struct cp_sta_own_data cp_sta_own_data;
+
+/** Initialise the sta own data
+ * \param ctx the CP context.
+ */
+void
+cp_sta_data_own_init (cp_t *ctx);
+
+/** Uninitialise the sta own data.
+ * \param ctx the cp context.
+ */
+void
+cp_sta_data_own_uninit (cp_t *ctx);
+
+/** Set the Mac address of the sta.
+ * \param ctx the CP context.
+ * \param mac the mac address of the station.
+ *
+ * This function will update the mac config to update the mac address in it.
+ */
+void
+cp_sta_data_own_set_mac_address (cp_t *ctx);
+
+/** Get the Mac address of the sta.
+ * \param ctx the CP context.
+ * \return the station's mac address.
+ */
+mac_t
+cp_sta_data_own_get_mac_address (cp_t *ctx);
+
+/** Set the TEI of the station.
+ * \param ctx the cp context.
+ * \param tei the station's tei.
+ *
+ * This function will update the mac config.
+ */
+void
+cp_sta_data_own_set_tei (cp_t *ctx, u8 tei);
+
+/** Get the station's tei.
+ * \param ctx the CP context.
+ * \return the station's tei.
+ */
+u8
+cp_sta_data_own_get_tei (cp_t *ctx);
+
+/** Set the station Security level.
+ * \param ctx the CP context.
+ * \param sl the security level policy.
+ */
+void
+cp_sta_data_own_set_security_level (cp_t *ctx, u8 sl);
+
+/** Get the security level.
+ * \param ctx the CP context.
+ * \return the station's security level.
+ */
+u8
+cp_sta_data_own_get_security_level (cp_t *ctx);
+
+#endif /* cp2_sta_data_own_data_h */
diff --git a/cesar/cp2/sta/data/sta_data.h b/cesar/cp2/sta/data/sta_data.h
new file mode 100644
index 0000000000..d7dba97021
--- /dev/null
+++ b/cesar/cp2/sta/data/sta_data.h
@@ -0,0 +1,122 @@
+#ifndef cp2_sta_data_sta_data_h
+#define cp2_sta_data_sta_data_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp2/sta/data/sta_data.h
+ * \brief Sta data.
+ * \ingroup cp_sta_data
+ *
+ * Sta data.
+ */
+
+/* forward declaration. */
+typedef struct cp_sta_data_private_t cp_sta_data_private_t;
+
+struct cp_msg_reassembly_ctx_t
+{
+
+};
+typedef struct cp_msg_reassembly_ctx_t cp_msg_reassembly_ctx_t;
+
+struct cp_sta_data_t
+{
+ /** Private part. */
+ cp_sta_data_private_t private;
+ /** Visible true if the STA is visible by out STA. */
+ bool visible;
+ /** Last seen. */
+ uint last_seen_ntb;
+ /** Reassembly context. */
+ cp_msg_reassembly_ctx_t rea;
+};
+typedef struct cp_sta_data_t cp_sta_data_t;
+
+/** Get the TEI of the station.
+ * \param sta the station.
+ * \return the sta's tei.
+ */
+u8
+cp_sta_get_tei(cp_sta_t *sta);
+
+/** Get the mac address of the station.
+ * \param sta the station.
+ * \return the sta's mac address.
+ */
+mac_t
+cp_sta_get_mac_address(cp_sta_t *sta);
+
+/** Set the associated status of the station.
+ * \param sta the station.
+ * \param associated the association status, true if associated, false
+ * otherwise.
+ */
+void
+cp_sta_set_associated (cp_sta_t *sta, bool associated);
+
+/** Get the association status.
+ * \param sta the station.
+ * \return the association status.
+ *
+ * This function will return true if the station is associated, false
+ * otherwise.
+ */
+bool
+cp_sta_is_associated (cp_sta_t *sta);
+
+/** Set the CCo status of the station.
+ * \param sta the station.
+ * \param cco the cco status, true if the sta is cco, false otherwise.
+ */
+void
+cp_sta_set_cco_status (cp_sta_t *sta, bool cco);
+
+/** Get the station CCo's status.
+ * \param sta the station.
+ * \return the cco status of the sta.
+ *
+ * This function will return true if the Station is CCo, false otherwise.
+ */
+bool
+cp_sta_is_cco_status (cp_sta_t *sta);
+
+/** Set the PCo status of the station.
+ * \param sta the station.
+ * \param pco the pco status, true if the sta is pco false otherwise.
+ */
+void
+cp_sta_set_pco_status (cp_sta_t *sta, bool pco);
+
+/** Get the PCo status of the station.
+ * \param sta the station.
+ * \return the PCo's station status.
+ *
+ * This will return true if the STA is PCo, false otherwise.
+ */
+bool
+cp_sta_is_pco_status (cp_sta_t *sta);
+
+/** Set the backup CCo status of the station.
+ * \param sta the station.
+ * \param backup_cco the backup cco status.
+ *
+ * This shall set true if the station is backup CCo, false otherwise.
+ */
+void
+cp_sta_set_backup_cco_status (cp_sta_t *sta, bool backup_cco);
+
+/** Get the backup CCo of the station.
+ * \param sta the sta.
+ * \return the sta's backup cco status.
+ *
+ * This will return true if the station is backup cco, false otherwise.
+ */
+bool
+cp_sta_is_backup_cco_status (cp_sta_t *sta);
+
+#endif /* cp2_sta_data_sta_data_h */
diff --git a/cesar/cp2/sta/mgr/doc/sta_manager.odt b/cesar/cp2/sta/mgr/doc/sta_manager.odt
new file mode 100644
index 0000000000..b7df7da727
--- /dev/null
+++ b/cesar/cp2/sta/mgr/doc/sta_manager.odt
Binary files differ
diff --git a/cesar/cp2/sta/mgr/sta_mgr.h b/cesar/cp2/sta/mgr/sta_mgr.h
new file mode 100644
index 0000000000..190b8d011e
--- /dev/null
+++ b/cesar/cp2/sta/mgr/sta_mgr.h
@@ -0,0 +1,163 @@
+#ifndef cp2_sta_data_sta_mgr_h
+#define cp2_sta_data_sta_mgr_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp2/sta/data/sta_mgr.h
+ * \brief Station and AVLN manager.
+ * \ingroup cp_sta_data
+ *
+ * Manage the network list and its Stations. The station manager job it to
+ * keep the integrity of the differents databases.
+ */
+
+#include "cp2/sta/data/net_list.h"
+#include "cp2/sta/data/sta_data.h"
+
+struct cp_t
+{
+ /** the index 0 represents our avln. The others are the neighbour avln. */
+ cp_net_list_t avln[8];
+ /** Last AVLN access in the neigbour avln. */
+ cp_net_list_t *current_avln;
+};
+typedef struct cp_t cp_sta_mgr_t;
+
+/** Initialise the cp.
+ * \return the cp context.
+ */
+cp_t *
+cp_sta_mgr_init(void);
+
+/** Uninitialise the cp.
+ * \param ctx the cp context.
+ */
+void
+cp_sta_mgr_uninit(cp_t *ctx);
+
+/** Get an AVLN from the cp.
+ * \param ctx the cp context.
+ * \return the avln identified by its snid.
+ *
+ * This function shall return an avln with the snid provided or NULL if the
+ * avln does not exists.
+ */
+cp_net_list_t*
+cp_sta_mgr_get_avln(cp_t *ctx, u16 snid);
+
+/** Get our AVLN.
+ * \param ctx the cp context.
+ * \return Our AVLN.
+ */
+cp_net_list_t*
+cp_sta_mgr_get_our_avln(cp_t *ctx);
+
+/** Add an AVLN.
+ * \param ctx the cp context.
+ * \param snid the new avln's snid.
+ * \return the new avln.
+ */
+cp_net_list_t*
+cp_sta_mgr_add_avln(cp_t *ctx, u16 snid);
+
+/** Remove an AVLN from the list and all the STAs associated in it.
+ * \param ctx the cp context.
+ * \param snid the avln snid.
+ *
+ * This function shall not remove our AVLN.
+ */
+void
+cp_sta_mgr_remove_avln(cp_t *ctx, u16 snid);
+
+/** Add a station to a specified AVLN.
+ * \param ctx the cp context.
+ * \param tei the tei of the station
+ * \param mac_addr the mac address
+ * \param added true if the station was just create, flase otherwise.
+ * \return the station just created.
+ *
+ * This function shall return the station just created and fill the added
+ * boolean parameters with true value if the station has just been created or
+ * false if the station already exists.
+ */
+cp_sta_t*
+cp_sta_mgr_add_sta(cp_t *ctx, u16 snid, u8 tei, mac_t mac_addr,
+ bool added);
+
+/** Remove a sta from the specified AVLN.
+ * \param ctx the cp context.
+ * \param snid the AVLN's snid.
+ * \param tei the station tei.
+ */
+void
+cp_sta_mgr_remove_sta(cp_t *ctx, u16 snid, u8 tei);
+
+/** Add a STA to our AVLN.
+ * \param ctx the cp context.
+ * \param tei the station tei
+ * \param mac_address the station mac address.
+ * \param added true if the station was just create, flase otherwise.
+ * \return the station just created.
+ *
+ * This function shall return the station just created and fill the added
+ * boolean parameters with true value if the station has just been created or
+ * false if the station already exists.
+ */
+cp_sta_t*
+cp_sta_mgr_add_sta_our_avln(cp_t *ctx, u8 tei, mac_t mac_address);
+
+/** Remove a STA of our AVLN.
+ * \param ctx the cp context.
+ * \param tei the station tei.
+ */
+void
+cp_sta_mgr_remove_sta_our_avln(cp_t *ctx, u8 tei);
+
+/** Get a STA from an AVLN.
+ * \param ctx the cp context.
+ * \param snid the AVLN's snid.
+ * \param tei the STA's tei.
+ * \return The station associated of NULL of no tei is associated.
+ */
+cp_sta_t*
+cp_sta_mgr_get_sta(cp_t *ctx, u16 snid, u8 tei);
+
+/** Get the STA in our AVLN corresponding to the tei provided.
+ * \param ctx the cp context.
+ * \param tei the station's tei
+ * \return the station corresponding to the tei.
+ */
+cp_sta_t*
+cp_sta_mgr_get_sta_in_avln(cp_t *ctx, u8 tei);
+
+/** Update the STA data in our AVLN.
+ * \param ctx the cp context.
+ * \param sta the station to update
+ * \param tei the station's new tei
+ * \param mac address the station's new mac address.
+ */
+void
+cp_sta_mgr_update_sta_in_avln(cp_t *ctx, cp_sta_t *sta,
+ u8 tei, mac_t mac_addr);
+
+/** Update the STA data in any AVLN.
+ * \param ctx the cp context.
+ * \param sta the station to update the data.
+ * \param tei the station new tei.
+ * \param mac_addr the station's new mac address.
+ */
+void
+cp_sta_mgr_update_sta(cp_sta_t sta, u8 tei, mac_t mac_addr);
+
+/** Commit the modification done when a STA has been removed of added.
+ * \param ctx the cp context.
+ */
+void
+cp_sta_mgr_commit (cp_t *ctx);
+
+#endif /* cp2_sta_data_sta_mgr_h */
diff --git a/cesar/cp2/vstate_fsm/vstate_fsm.h b/cesar/cp2/vstate_fsm/vstate_fsm.h
new file mode 100644
index 0000000000..cf9f89cf24
--- /dev/null
+++ b/cesar/cp2/vstate_fsm/vstate_fsm.h
@@ -0,0 +1,65 @@
+#ifndef vstate_fsm__h__
+#define vstate_fsm__h__
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file Cesare/cp/vstate_fsm/vstate_fsm.h
+ * \brief functions to run the visual state fsm
+ * \ingroup cp/vstate_fsm
+ *
+ * « long description »
+ */
+
+
+
+BEGIN_DECLS
+
+
+/**
+ * initialisation of the vstate fsm.
+ *
+ * \param ctx cp context
+ */
+void
+cp_vstate_fsm_init(cp_t *ctx);
+
+
+/**
+ * process the event from the fsm queue.
+ *
+ * \param ctx the cp context
+ *
+ * 1) get the last event for the fsm and process it
+ * 2) if the event was related to a MME, free the buffer
+ */
+void
+cp_vstate_fsm__process_event(cp_t *ctx);
+
+/**
+ * process the event immediately.
+ *
+ * \param ctx the cp context
+ * \param event_type the visual state event to process
+ *
+ * The event must be a transition from one state to another.
+ */
+void
+cp_vstate_fsm_process_event_now(cp_t *ctx, SEM_EVENT_TYPE event_type);
+
+
+/**
+ * debugging function, will print the fsm state.
+ */
+void
+cp_vstate_fsm_print_state(void);
+
+
+
+END_DECLS
+
+#endif \ No newline at end of file
diff --git a/cesar/ecos/COPYING b/cesar/ecos/COPYING
new file mode 100644
index 0000000000..d60c31a97a
--- /dev/null
+++ b/cesar/ecos/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/cesar/ecos/ChangeLog b/cesar/ecos/ChangeLog
new file mode 100644
index 0000000000..f22c08f88b
--- /dev/null
+++ b/cesar/ecos/ChangeLog
@@ -0,0 +1,116 @@
+2003-03-27 Bart Veer <bartv@ecoscentric.com>
+
+ * configure.in, configure:
+ Look for the host-side sources in tools/src as well as in host, as
+ per the 2.0 release tree.
+ Look for per-package host-side software in any/all versions of a
+ package, not just "current".
+
+2003-02-12 Bart Veer <bartv@ecoscentric.com>
+
+ * README.host: update Tcl-related instructions
+
+ * Makefile.in: regenerate
+
+2002-08-13 Bart Veer <bartv@ecoscentric.com>
+
+ * README.host: update host-side build instructions
+
+2002-08-03 Bart Veer <bartv@ecoscentric.com>
+
+ * acinclude.m4, configure.in, Makefile.am:
+ Rework host-side autoconf support
+
+1999-11-10 Bart Veer <bartv@cygnus.co.uk>
+
+ * configure.in
+ * configure
+ Added host/tools/configtool/standalone/common
+
+1999-11-09 Bart Veer <bartv@cygnus.co.uk>
+
+ * configure:
+ * configure.in:
+ Added host/tools/ecostest/common, suppressed the configtool
+ support for now.
+
+1999-08-12 Bart Veer <bartv@cygnus.co.uk>
+
+ * Makefile.in:
+ * acinclude.m4:
+ * aclocal.m4:
+ * configure.in:
+ * configure:
+ First attempt at autoconfiscation of the configtool.
+
+1999-06-03 Bart Veer <bartv@cygnus.co.uk>
+
+ * acinclude.m4:
+ Trying to sort out the compiler flags a bit better.
+
+1999-06-02 Bart Veer <bartv@cygnus.co.uk>
+
+ * acinclude.m4:
+ Added -enable-debuginfo flag which will do the right thing
+ for both gcc/g++ (add -g) and VC++ (add -MDd or -MD)
+
+1999-03-25 Bart Veer <bartv@cygnus.co.uk>
+
+ * configure.in:
+ * aclocal.m4:
+ * acinclude.m4:
+ * Makefile.am:
+ Sorting out the banner.
+
+1999-01-26 Bart Veer <bartv@cygnus.co.uk>
+
+ * configure.in:
+ * configure:
+ * aclocal.m4:
+ * Makefile.in
+ Update to use autoconf 2.13 and automake 1.4
+
+ * acinclude.m4 (CYG_AC_PATH_TCL):
+ Improve the support for linking with Tcl
+
+1999-01-21 Bart Veer <bartv@cygnus.co.uk>
+
+ * acinclude.m4:
+ Added new macro CYG_AC_SUBST_VERSION so that different packages
+ can use different symbols for versioning.
+
+1999-01-19 Bart Veer <bartv@cygnus.co.uk>
+
+ * acinclude.m4:
+ * aclocal.m4:
+ * Makefile.in:
+ Added new macros: CYG_AC_MSVC_PATH for handling pathname
+ problems between cygwin and VC++; and CYG_AC_PATH_TCL so
+ that the user can specify the location of a suitable Tcl
+ installation.
+
+1998-12-24 Bart Veer <bartv@cygnus.co.uk>
+
+ * configure.in:
+ * configure:
+ * aclocal.m4:
+ * acinclude.m4:
+ * Makefile.in:
+ * Makefile.am:
+ Provide support for building all host-side packages.
+
+1998-07-13 Bart Veer <bartv@cygnus.co.uk>
+
+ * ltconfig
+ * ltmain-sh
+ Merge with latest versions from devo
+
+ * missing
+ * mkinstalldirs
+ * config.guess
+ * config.sub
+ * install-sh
+ * ltconfig
+ * ltmain-sh
+ Restore files that had been removed prematurely
+
diff --git a/cesar/ecos/Makefile.am b/cesar/ecos/Makefile.am
new file mode 100644
index 0000000000..d6e3b6fa4b
--- /dev/null
+++ b/cesar/ecos/Makefile.am
@@ -0,0 +1,44 @@
+## Process this file with automake to produce Makefile.in
+## =====================================================================
+##
+## Makefile.am
+##
+## eCos host-side software toplevel makefile
+##
+## =====================================================================
+#######ECOSHOSTGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+# Copyright (C) 2002 Bart Veer
+# Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc.
+#
+# This file is part of the eCos host tools.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+## -------------------------------------------
+#######ECOSHOSTGPLCOPYRIGHTEND####
+## =====================================================================
+#######DESCRIPTIONBEGIN####
+##
+## Author(s): bartv
+## Contact(s): bartv
+## Date: 1998/12/17
+## Version: 0.01
+##
+######DESCRIPTIONEND####
+## =====================================================================
+
+AUTOMAKE_OPTIONS = 1.3 foreign
+SUBDIRS = @SUBDIRS@
+
diff --git a/cesar/ecos/Makefile.in b/cesar/ecos/Makefile.in
new file mode 100644
index 0000000000..e497cf7324
--- /dev/null
+++ b/cesar/ecos/Makefile.in
@@ -0,0 +1,363 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+#######ECOSHOSTGPLCOPYRIGHTBEGIN####
+# Copyright (C) 2002 Bart Veer
+# Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc.
+#
+# This file is part of the eCos host tools.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#######ECOSHOSTGPLCOPYRIGHTEND####
+#######DESCRIPTIONBEGIN####
+######DESCRIPTIONEND####
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+CC = @CC@
+CXX = @CXX@
+ECOS_REPOSITORY = @ECOS_REPOSITORY@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MSVC_SRCDIR = @MSVC_SRCDIR@
+PACKAGE = @PACKAGE@
+PACKAGE_DIR = @PACKAGE_DIR@
+PACKAGE_INSTALL = @PACKAGE_INSTALL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+VERSION = @VERSION@
+ecos_CFLAGS = @ecos_CFLAGS@
+ecos_CXXFLAGS = @ecos_CXXFLAGS@
+ecos_INCLUDES = @ecos_INCLUDES@
+ecos_LDADD = @ecos_LDADD@
+ecos_LIBS = @ecos_LIBS@
+ecos_infra_incdir = @ecos_infra_incdir@
+ecos_infra_libdir = @ecos_infra_libdir@
+ecos_libcdl_incdir = @ecos_libcdl_incdir@
+ecos_libcdl_libdir = @ecos_libcdl_libdir@
+ecos_tk_includes = @ecos_tk_includes@
+ecos_tk_libs = @ecos_tk_libs@
+
+AUTOMAKE_OPTIONS = 1.3 foreign
+SUBDIRS = @SUBDIRS@
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/acsupport/mkinstalldirs
+CONFIG_CLEAN_FILES =
+DIST_COMMON = COPYING ChangeLog Makefile.am Makefile.in acinclude.m4 \
+aclocal.m4 configure configure.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
+ cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+ rev="$$subdir $$rev"; \
+ test "$$subdir" != "." || dot_seen=yes; \
+ done; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ -rm -rf $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ dc_install_base=`cd $(distdir)/=inst && pwd`; \
+ cd $(distdir)/=build \
+ && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) dist
+ -rm -rf $(distdir)
+ @banner="$(distdir).tar.gz is ready for distribution"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"
+dist: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+dist-all: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+distdir: $(DISTFILES)
+ -rm -rf $(distdir)
+ mkdir $(distdir)
+ -chmod 777 $(distdir)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+ for subdir in $(SUBDIRS); do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
+ done
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
+check-am: all-am
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+install-exec-am:
+install-exec: install-exec-recursive
+
+install-data-am:
+install-data: install-data-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am:
+uninstall: uninstall-recursive
+all-am: Makefile
+all-redirect: all-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-recursive
+
+clean-am: clean-tags clean-generic mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am: distclean-tags distclean-generic clean-am
+
+distclean: distclean-recursive
+ -rm -f config.status
+
+maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f config.status
+
+.PHONY: install-data-recursive uninstall-data-recursive \
+install-exec-recursive uninstall-exec-recursive installdirs-recursive \
+uninstalldirs-recursive all-recursive check-recursive \
+installcheck-recursive info-recursive dvi-recursive \
+mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs-am \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/cesar/ecos/README.host b/cesar/ecos/README.host
new file mode 100644
index 0000000000..5fba43ae64
--- /dev/null
+++ b/cesar/ecos/README.host
@@ -0,0 +1,365 @@
+ eCos Host-side Software
+ =======================
+
+This README file only describes the eCos host-side software. For
+details of the eCos target-side software or the required toolchains,
+please see other documentation. A good starting point is
+http://sources.redhat.com/ecos
+
+There are two categories of host-side software. The host subdirectory
+contains generic software, primarily related to the eCos configuration
+technology. All eCos users will need to use some of this technology to
+configure and build eCos, either using pre-built binaries or by
+building the host-side software from source. The generic software
+should be portable to a wide range of host platforms.
+
+There is also package-specific host-side software. Much of this is I/O
+related. For example the generic USB-slave package contains some
+programs related to testing; a test application is run on a target
+with suitable USB slave-side hardware, and needs to interact with
+another program running on the USB host; the latter is
+package-specific host-side software and can be found in the
+subdirectory packages/io/usb/slave. Code like this may have
+significant platform dependencies and may only work on a single
+platform or on a small number of platforms. There may also be
+special requirements, for example it may be necessary to install some
+programs suid root so that they have appropriate access to the
+hardware.
+
+
+The host subdirectory includes the following:
+
+infra/
+ This is an implementation of the eCos infrastructure that can be
+ used on the host-side, and provides assertion, tracing and
+ testcase support.
+
+ NOTE: the eCos infrastructure facilities are not especially
+ well-suited to host-side development, in particular they are not
+ C++-oriented. There are plans to remove the current infrastructure
+ completely and replace it with something more suitable. People
+ planning new projects should be aware of this, and may wish to
+ avoid using the current infrastructure.
+
+libcdl/
+ The CDL library lies at the heart of the eCos configuration
+ technology.
+
+tools/configtool/
+ The sources to the various configuration tools can be found here.
+
+tools/configtool/common/common/
+ Contains sources related to makefile generation, shared by the
+ command line and graphical tools.
+
+tools/configtool/standalone/common/
+ Contains the command line ecosconfig tool.
+
+tools/configtool/standalone/wxwin/
+ Contains sources for the wxWindows-based, Linux and Windows graphical
+ configuration tool. The Windows version can currently only be
+ built with Visual C++, not with cygwin g++.
+
+tools/configtool/common/win32/
+tools/configtool/standalone/win32/
+ Contains sources for the older, MFC-based, Windows-only graphical
+ configuration tool. Again this can currently only be built with
+ Visual C++.
+
+The two graphical configuration tools have their own build procedures,
+described in tools/configtool/standalone/wxwin/ReadMe and
+tools/configtool/standalone/win32/ReadMe respectively.
+
+Package-specific host-side code lives in the host subdirectory of the
+appropriate package, for example packages/io/usb/slave/<version>/host.
+Most packages only provide target-side code and hence will not have a
+host subdirectory. Users can install various packages from a variety
+of sources, and where a package does have host-side software the
+package documentation should be consulted for further information.
+
+
+Installing on Linux, Other Unix Systems, and Cygwin
+---------------------------------------------------
+
+Both generic host-side software (infra, libcdl and ecosconfig) and
+package-specific software can be built with the conventional
+"configure/make/make install" sequence. However the code does not
+conform fully to GNU coding standards so some operations such as "make
+dist" are not supported. There is limited support for DejaGnu-based
+testing.
+
+Much of the host-side software has a dependency on Tcl. This is not
+supplied with the sources since many users will already have a
+suitable installation, for example it is shipped as standard with all
+major Linux distributions. The generic host-side software should work
+with any release of Tcl from 8.0 onwards. The package-specific
+software requires a more recent version, 8.3 or later. If no suitable
+Tcl installation is available then the configure step will still
+succeed but some of the package-specific software will not be built.
+
+There are two main approaches to building the host-side software:
+
+1) build the generic and the package-specific code in one build tree.
+ This uses the top-level configure script. The script automatically
+ invokes the configure script in the main host subdirectory. In
+ addition it searches the packages hierarchy for host subdirectories
+ containing their own configure scripts and will invoke those.
+
+ Note: the search for host subdirectories happens during configure
+ time, not during the make. If new packages with host-side code are
+ added to the repository then it will be necessary to re-run the
+ toplevel configure script.
+
+2) build the generic code in one build tree, using the configure
+ script in the toplevel's host subdirectory. Then build some or all
+ of the package-specific code in separate build trees, using the
+ configure scripts in each package's host subdirectory.
+
+The first approach is generally simpler. However some of the
+package-specific code requires special installation, for example a
+program may have to be installed suid root so that it has the right
+privileges to access hardware, and hence the "make install" step has
+to be run by the superuser. Also some of the package-specific code is
+rather specialized and may be of no interest to many users. For
+example, the USB testing code is only useful when developing
+USB-based applications. Hence some users may prefer the second
+approach, building just the generic code and a subset of the
+package-specific code.
+
+It is necessary to use a separate build tree rather than build
+directly in the source tree. This is enforced by the configure scripts.
+
+ $ mkdir build
+ $ cd build
+
+The next step is to run the desired configure script. To build all
+the host-side software this means the toplevel configure script:
+
+ $ <path>/configure <args>
+
+Alternatively to build just the generic host-side software, use the
+configure script in the host subdirectory.
+
+ $ mkdir host
+ $ cd host
+ $ <path>/host/configure <args>
+
+Or, to build just one package's host-side code:
+
+ $ mkdir -p packages/io/usb/slave/current/host
+ $ cd packages/io/usb/slave/current/host
+ $ <path>/packages/io/usb/slave/current/host/configure <args>
+
+(It is not actually necessary to use the same directory structure in
+the build tree as in the source tree, but doing so can avoid
+confusion).
+
+A list of all the command-line options can be obtained by running
+"configure --help". The most important ones are as follows:
+
+1) --prefix. This can be used to specify the location of the install
+ tree, defaulting to /usr/local, so the ecosconfig program ends up
+ in /usr/local/bin/ecosconfig and the CDL library ends up in
+ /usr/local/lib/libcdl.a. If an alternative location is preferred
+ this can be specified with --prefix, for example:
+
+ $ <path>/configure --prefix=/usr/local/ecos <args>
+
+2) --enable-debug. By default all assertions and tracing are disabled.
+ When debugging any of the generic host-side software these should
+ be enabled. Some package-specific code may not have any extra
+ debug support, in which case --enable-debug would be ignored.
+
+ $ <path>/configure --enable-debug
+
+ It is also possible to control most of the assertion and tracing
+ macros at a finer grain. This is intended mainly for use by the
+ developers.
+
+ --disable-asserts disable all assertions
+ --disable-preconditions disable a subset of the assertions
+ --disable-postconditions disable a subset of the assertions
+ --disable-invariants disable a subset of the assertions
+ --disable-loopinvariants disable a subset of the assertions
+ --disable-tracing disable tracing
+ --disable-fntracing disable function entry/exit tracing
+
+3) --with-tcl=<path>
+ --with-tcl-version=<number>
+
+ The host-side tools have a dependency on Tcl, which is not supplied
+ with the sources because many people will already have a suitable
+ installation. Specifically it is necessary to have the header file
+ tcl.h and appropriate libraries such that -ltcl will work - this
+ can involve either static or shared libraries. Some tools may require
+ Tk as well as Tcl.
+
+ Unfortunately there is considerable variation in Tcl installations.
+ In theory all Tcl installations have a file tclConfig.sh which
+ defines exactly how to compile and link code that uses Tcl, and Tk
+ has a similar file tkConfig.sh. The eCos configure scripts look for
+ these files, first in $(prefix)/lib, then in /usr/lib. If the system
+ already has a Tcl installation in /usr then the configure script will
+ automatically find /usr/lib/tclConfig.sh and it is not necessary
+ to pass additional options when configuring the eCos host-side
+ software. Alternatively, if for example you have installed a more
+ recent version of Tcl/Tk in the same place that you want to install the
+ eCos software, e.g. /usr/local, then $(prefix)/lib/tclConfig.sh
+ will be read in.
+
+ It is also possible that a more recent version of Tcl has been installed
+ in a different location. For example, you may wish to install the eCos host
+ tools in /opt/ecos but use a version of Tcl installed in /usr/local. The
+ eCos configure scripts need to be told explicitly where to look for
+ the Tcl:
+
+ $ <path>/configure --with-tcl=/usr/local ...
+
+ Some systems, for example Debian Linux 3.0, do not install tclConfig.sh
+ in /usr/lib because that makes it more difficult to have several different
+ versions of Tcl installed at the same time. Instead tclConfig.sh is found
+ in a versioned directory such as /usr/lib/tcl8.3. Since several versions
+ may be installed the desired one must be specified explicitly.
+
+ $ <path>/configure --with-tcl-version=8.3
+
+ The --with-tcl and --with-tcl-version options are combined to give a search path:
+
+ <with>/lib/tclConfig.sh
+ <with>/lib/tcl<vsn>/tclConfig.sh
+ <prefix>/lib/tclConfig.sh
+ <prefix>/lib/tcl<vsn>/tclConfig.sh
+ /usr/lib/tclConfig.sh
+ /usr/lib/tcl<vsn>/tclConfig.sh
+
+ If tclConfig.sh cannot be found in any of these places then it is assumed
+ that Tcl has not been properly installed and the eCos configure script will
+ fail. The --with-tcl and --with-tcl-version are also used to give a search
+ path for tkConfig.sh
+
+ <with>/lib/tkConfig.sh
+ <with>/lib/tk<vsn>/tkConfig.sh
+ <prefix>/lib/tkConfig.sh
+ <prefix>/lib/tk<vsn>/tkConfig.sh
+ /usr/lib/tkConfig.sh
+ /usr/lib/tk<vsn>/tkConfig.sh
+
+ Again, the configure scripts must be able to find tkConfig.sh
+
+ Once tclConfig.sh and tkConfig.sh have been found and read in, the eCos
+ configure scripts should have all the information needed to compile and
+ link code that uses Tcl. First the location of key headers such as
+ <tcl.h> is needed. A tclConfig.sh file may define TCL_INC_DIR to give
+ a specific location, otherwise the header files should be in
+ $(TCL_PREFIX)/include. If <tcl.h> cannot be found then the eCos configure
+ scripts will fail.
+
+ Next it is necessary to work out how to link applications with Tcl. This
+ information should be provided by a tclConfig.sh variable TCL_LIB_SPEC.
+ Unfortunately not all Tcl installations set this, for example the cygwin
+ Tcl 8.4 release. If TCL_LIB_SPEC is not defined then instead the
+ configure script will look for a library libtcl<vsn>.a, where <vsn> is
+ specified using --with-tcl-version, then for a library libtcl.a
+
+Following the configure step the build tree should be set up
+correctly. All that remains is the actual build and install:
+
+ $ make
+ $ make install
+
+This should result in an ecosconfig executable, plus appropriate
+libraries and header files. If the install prefix is a system
+location, for example /usr/local/, then "make install" will normally
+require root privileges. Also some of the package-specific software
+has special installation requirements, for example programs that need
+to be installed suid root, and this will also need root privileges.
+
+
+Installing with Visual C++
+--------------------------
+
+Under Windows it is possible to build the generic host-side software
+(infra, libcdl and ecosconfig) with Visual C++ but this is deprecated.
+Building with g++ under cygwin is preferred.
+
+It is still necessary to run the configure script and a suitable make
+utility. That requires a shell and a Unix-like environment, as
+provided by cygwin. The Visual C++ compiler cl.exe needs to be on the
+shell's search path, and some environment variables such as INCLUDE
+and LIB may need to be set to point at the Visual C++ installation -
+the details may vary depending on the version of the compiler. Then
+the configure command should be run like this:
+
+ $ CC=cl CXX=cl <path>/host/configure <args>
+
+Note that the path should be a cygwin path: cygwin mount points are
+accepted and forward slashes should be used. The various configure
+scripts now detect that Visual C++ should be used, and adapt
+accordingly.
+
+Depending on what cygwin mount points are set up, /usr/local may or
+may not be an appropriate install location for VC++ applications.
+If not, the install location should be specified with --prefix:
+
+ $ CC=cl CXX=cl <path>/configure --prefix=<install-path> <args>
+
+It is also necessary to use the right version of Tcl. For a VC++ build
+the cygwin release of Tcl should not be used. Instead a suitable
+prebuilt Tcl package can be obtained from http://www.tcl.tk/.
+It is necessary to tell the configure script where this has been
+installed, for example:
+
+ $ CC=cl CXX=cl <path>/configure --prefix=<install-path> \
+ --with-tcl=/cygdrive/d/local/scriptics/Tcl/tcl8.1 <args>
+
+The library name will be of the form tcl81.lib, and there will not be
+a symbolic link from tcl.lib to the appropriate version. It will be
+necessary to specify the Tcl version explicitly since the default
+version is currently 8.0.
+
+ $ CC=cl CXX=cl <path>/configure --prefix=<install-path> \
+ --with-tcl=/d/local/scriptics/Tcl/tcl8.1 --with-tcl-version=81 <args>
+
+Following a successful configure, the tools can be built and installed
+in the normal fashion:
+
+ $ make
+ $ make install
+
+
+More Information
+================
+
+Please see the eCos web site, http://sources.redhat.com/ecos/, for
+further details. This includes the FAQ, a form for reporting problems,
+and details of the various mailing lists
+(http://sources.redhat.com/ecos/intouch.html) At the time of writing
+there are no separate mailing lists for the eCos host-side sources,
+the main mailing list ecos-discuss@sources.redhat.com should be used
+instead.
+
+//####COPYRIGHTBEGIN####
+//
+//----------------------------------------------------------------------------
+// Copyright (C) 2002 Bart Veer
+// Copyright (C) 2000, 2001 Red Hat, Inc.
+//
+// This file is part of the eCos host tools.
+//
+// This program is free software; you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 of the License, or (at your option)
+// any later version.
+//
+// This program is distributed in the hope that it will be useful, but WITHOUT
+// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+// more details.
+//
+// You should have received a copy of the GNU General Public License along with
+// this program; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// ----------------------------------------------------------------------------
+//
+//####COPYRIGHTEND####
diff --git a/cesar/ecos/acinclude.m4 b/cesar/ecos/acinclude.m4
new file mode 100644
index 0000000000..e8c1802287
--- /dev/null
+++ b/cesar/ecos/acinclude.m4
@@ -0,0 +1,44 @@
+dnl Process this file with aclocal to get an aclocal.m4 file. Then
+dnl process that with autoconf.
+dnl ====================================================================
+dnl
+dnl acinclude.m4
+dnl
+dnl ====================================================================
+dnl ####ECOSHOSTGPLCOPYRIGHTBEGIN####
+dnl ----------------------------------------------------------------------------
+dnl Copyright (C) 2002 Bart Veer
+dnl
+dnl This file is part of the eCos host tools.
+dnl
+dnl This program is free software; you can redistribute it and/or modify it
+dnl under the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 of the License, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but WITHOUT
+dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+dnl more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along with
+dnl this program; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+dnl
+dnl ----------------------------------------------------------------------------
+dnl ####ECOSHOSTGPLCOPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s): bartv
+dnl Contact(s): bartv
+dnl Date: 2002/08/03
+dnl Version: 0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+dnl Access shared macros.
+dnl AM_CONDITIONAL needs to be mentioned here or else aclocal does not
+dnl incorporate the macro into aclocal.m4
+sinclude(acsupport/acinclude.m4)
diff --git a/cesar/ecos/aclocal.m4 b/cesar/ecos/aclocal.m4
new file mode 100644
index 0000000000..89c78fee9f
--- /dev/null
+++ b/cesar/ecos/aclocal.m4
@@ -0,0 +1,182 @@
+dnl aclocal.m4 generated automatically by aclocal 1.4-p5
+
+dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+dnl Process this file with aclocal to get an aclocal.m4 file. Then
+dnl process that with autoconf.
+dnl ====================================================================
+dnl
+dnl acinclude.m4
+dnl
+dnl ====================================================================
+dnl ####ECOSHOSTGPLCOPYRIGHTBEGIN####
+dnl ----------------------------------------------------------------------------
+dnl Copyright (C) 2002 Bart Veer
+dnl
+dnl This file is part of the eCos host tools.
+dnl
+dnl This program is free software; you can redistribute it and/or modify it
+dnl under the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 of the License, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but WITHOUT
+dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+dnl more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along with
+dnl this program; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+dnl
+dnl ----------------------------------------------------------------------------
+dnl ####ECOSHOSTGPLCOPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s): bartv
+dnl Contact(s): bartv
+dnl Date: 2002/08/03
+dnl Version: 0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+dnl Access shared macros.
+dnl AM_CONDITIONAL needs to be mentioned here or else aclocal does not
+dnl incorporate the macro into aclocal.m4
+sinclude(acsupport/acinclude.m4)
+
+# Define a conditional.
+
+AC_DEFUN([AM_CONDITIONAL],
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi])
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AC_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "[$]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "[$]*" != "X $srcdir/configure conftestfile" \
+ && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "[$]2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN([AM_MISSING_PROG],
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+ $1=$2
+ AC_MSG_RESULT(found)
+else
+ $1="$3/missing $2"
+ AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
+
+# serial 1
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT($USE_MAINTAINER_MODE)
+ AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST(MAINT)dnl
+]
+)
+
diff --git a/cesar/ecos/acsupport/ChangeLog b/cesar/ecos/acsupport/ChangeLog
new file mode 100644
index 0000000000..b295d632a2
--- /dev/null
+++ b/cesar/ecos/acsupport/ChangeLog
@@ -0,0 +1,51 @@
+2003-02-12 Bart Veer <bartv@ecoscentric.com>
+
+ * acinclude.m4: Another attempt at the Tcl macro, to cope with
+ cygwin tcl 8.3 and 8.4. Also fix some problems with VC++ builds.
+
+2002-10-27 Bart Veer <bartv@ecoscentric.com>
+
+ * acinclude.m4 (ECOS_PATH_TCL): fix typo that prevented a build
+ under Debian Woody
+
+2002-09-22 Bart Veer <bartv@ecoscentric.com>
+
+ * acinclude.m4:
+ Add the Tcl library path to ecos_LDADD (patch provided by Andrew
+ Lunn). Also add a reminder about ecos_tcl_version issues and
+ fix up Tk support.
+
+2002-08-27 Robin Farine <robin.farine@acn-group.ch>
+
+ * acinclude.m4 (ECOS_PATH_TCL): having found tclConfig.sh in
+ /<lib>/tcl<ver>, search for tkConfig.sh in /<lib>/tcl<ver> and in
+ /<lib>/tk<ver>.
+
+2002-08-03 Bart Veer <bartv@ecoscentric.com>
+
+ * Created as part of autoconf reorganization.
+
+//####COPYRIGHTBEGIN####
+//
+// ----------------------------------------------------------------------------
+// Copyright (C) 2002, 2003 Bart Veer
+//
+// This file is part of the eCos autoconf support.
+//
+// This program is free software; you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 of the License, or (at your option)
+// any later version.
+//
+// This program is distributed in the hope that it will be useful, but WITHOUT
+// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+// more details.
+//
+// You should have received a copy of the GNU General Public License along with
+// this program; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// ----------------------------------------------------------------------------
+//
+//####COPYRIGHTEND####
diff --git a/cesar/ecos/acsupport/acinclude.m4 b/cesar/ecos/acsupport/acinclude.m4
new file mode 100644
index 0000000000..c537de2ef2
--- /dev/null
+++ b/cesar/ecos/acsupport/acinclude.m4
@@ -0,0 +1,891 @@
+dnl Process this file with aclocal to get an aclocal.m4 file. Then
+dnl process that with autoconf.
+dnl ====================================================================
+dnl
+dnl acinclude.m4
+dnl
+dnl Various autoconf macros that are shared between different
+dnl eCos packages.
+dnl
+dnl ====================================================================
+dnl ####ECOSHOSTGPLCOPYRIGHTBEGIN####
+dnl ----------------------------------------------------------------------------
+dnl Copyright (C) 2002, 2003 Bart Veer
+dnl Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+dnl
+dnl This file is part of the eCos host tools.
+dnl
+dnl This program is free software; you can redistribute it and/or modify it
+dnl under the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 of the License, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but WITHOUT
+dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+dnl more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along with
+dnl this program; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+dnl
+dnl ----------------------------------------------------------------------------
+dnl ####ECOSHOSTGPLCOPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s): bartv
+dnl Contact(s): bartv
+dnl Date: 1998/12/16
+dnl Version: 0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+dnl ====================================================================
+dnl Ensure that configure is not being run in the source tree, i.e.
+dnl that a separate build tree has been created. This is not absolutely
+dnl necessary at the time of writing but may become so in future, and
+dnl is good practice.
+
+AC_DEFUN(ECOS_CHECK_BUILD_ne_SRC,[
+ AC_MSG_CHECKING([that a separate build tree is being used])
+ ecos_cwd=`/bin/pwd`
+ if test "${srcdir}" = "." ; then
+ srcdir=${ecos_cwd}
+ fi
+ if test "${ecos_cwd}" = "${srcdir}" ; then
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([This configure script should not be run inside the source tree. Instead please use a separate build tree])
+ else
+ AC_MSG_RESULT(yes)
+ fi
+])
+
+dnl ====================================================================
+dnl The AM_INIT_AUTOMAKE() will define a symbol VERSION for the
+dnl package's version number. Unfortunately this symbol is rather
+dnl hard to share if several different packages are involved, so this
+dnl macro is used to define an alternative symbol
+
+AC_DEFUN(ECOS_SUBST_VERSION,[
+ AC_REQUIRE([AM_INIT_AUTOMAKE])
+ ifelse($#,1,,AC_MSG_ERROR([Invalid number of arguments passed to ECOS SUBST_VERSION]))
+ AC_DEFINE_UNQUOTED($1, "$VERSION")
+])
+
+dnl --------------------------------------------------------------------
+dnl Convert a cygwin pathname to something acceptable to VC++ (but
+dnl still invoked from bash and cygwin's make). This means using
+dnl the cygpath utility and then translating any backslashes into
+dnl forward slashes to avoid confusing make.
+
+AC_DEFUN(ECOS_MSVC_PATH, [
+ AC_REQUIRE([ECOS_PROG_MSVC])
+ ifelse($#, 1, , AC_MSG_ERROR("Invalid number of arguments passed to ECOS MSVC_PATH"))
+ if test "${MSVC}" = "yes" ; then
+ $1=`cygpath -w ${$1} | tr \\\\\\\\ /`
+ fi
+])
+
+dnl ====================================================================
+dnl An internal utility to define eCos variants of various compilation
+dnl related flags. The aim is to avoid messing with CFLAGS, LIBS, and
+dnl so on because those are used for feature tests as well as for
+dnl passing on to the application.
+AC_DEFUN(ECOS_PROG_DEFINE_COMPILER_FLAGS,[
+ ecos_CFLAGS=""
+ ecos_CXXFLAGS=""
+ ecos_LDADD=""
+ ecos_INCLUDES=""
+ ecos_LIBS=""
+ AC_SUBST(ecos_CFLAGS)
+ AC_SUBST(ecos_CXXFLAGS)
+ AC_SUBST(ecos_LDADD)
+ AC_SUBST(ecos_INCLUDES)
+ AC_SUBST(ecos_LIBS)
+])
+
+dnl For historical reasons some of the eCos host-side software can be
+dnl built with Visual C++ as well as g++. The user can specify this
+dnl at configure time using CC=cl, where cl.exe is the compiler driver.
+dnl This macro will set the variable MSVC to "yes" or to "no" depending
+dnl on whether or not VC++ is being used, analogous to the variable
+dnl GCC set by AC_PROG_CC. It provides support for an automake
+dnl conditional thus allowing the makefile to adapt somewhat to the
+dnl compiler being used. Finally it fills in the ECOS_INCLUDES,
+dnl ECOS_LIBS and ECOS_LDADD variables with suitable initial values.
+
+AC_DEFUN(ECOS_PROG_MSVC,[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_PROG_CXX])
+ AC_REQUIRE([ECOS_PROG_DEFINE_COMPILER_FLAGS])
+
+ AC_MSG_CHECKING("for Visual C++")
+ MSVC="no";
+ if test "${CC}" = "cl" ; then
+ MSVC="yes"
+ CXX="cl"
+ MSVC_SRCDIR=${srcdir}
+ ECOS_MSVC_PATH(MSVC_SRCDIR)
+ AC_SUBST(MSVC_SRCDIR)
+ ecos_INCLUDES="${ecos_INCLUDES} \"-I${MSVC_SRCDIR}\""
+ ecos_LDADD="-link"
+ ecos_LIBS="advapi32.lib"
+ fi
+ AM_CONDITIONAL(MSVC, test "${MSVC}" = "yes")
+ if test "${MSVC}" = "yes" ; then
+ AC_MSG_RESULT([unfortunately yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+])
+
+dnl ====================================================================
+dnl Set up sensible flags for the various different compilers. This
+dnl is achieved by manipulating AM-CFLAGS and AM-CXXFLAGS via a subst,
+dnl plus undoing the setting of CFLAGS and CXXFLAGS done by
+dnl the AC_PROC_CC and AC_PROG_CXX macros (e.g. setting the default
+dnl compilation flags to -O2). Note that this relies
+dnl on knowing about the internals of those macros.
+dnl
+dnl There is little point in checking the cache: this macro does
+dnl not do any feature tests so checking the cache would probably
+dnl be more expensive than doing the work here.
+dnl
+dnl For now the only supported compilers are gcc/g++ and VC++. Attempts
+dnl to use another compiler will result in an error at configure-time.
+AC_DEFUN(ECOS_PROG_STANDARD_COMPILER_FLAGS, [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_PROG_CXX])
+ AC_REQUIRE([ECOS_PROG_DEFINE_COMPILER_FLAGS])
+ AC_REQUIRE([ECOS_PROG_MSVC])
+
+ AC_MSG_CHECKING("the default compiler flags")
+
+ dnl Add a user-settable flag to control whether or debugging info is
+ dnl incorporated at compile-time.
+ ecosflags_enable_debug="no"
+ AC_ARG_ENABLE(debug,[ --enable-debug do a debug rather than a release build],
+ [case "${enableval}" in
+ yes) ecosflags_enable_debug="yes" ;;
+ *) ecosflags_enable_debug="no" ;;
+ esac])
+
+ dnl For VC++ builds also provide a flag for ANSI vs. unicode builds.
+ dnl For now this does not actually affect the compiler flags.
+ dnl NOTE: there may also have to be a flag to control whether or
+ dnl the VC++ multi-threading flags are enabled.
+ ecosflags_enable_ansi="no"
+ if test "${MSVC}" = "yes" ; then
+ AC_ARG_ENABLE(ansi,[ --enable-ansi do an ANSI rather than a unicode build],
+ [case "${enableval}" in
+ yes) ecosflags_enable_ansi="yes" ;;
+ *) ecosflags_enable_ansi="no" ;;
+ esac])
+ fi
+
+ dnl Now we know what the user is after.
+ if test "${GCC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -pipe -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -pipe -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Woverloaded-virtual"
+ elif test "${MSVC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -nologo -W3"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -nologo -W3 -GR -GX"
+ else
+ AC_MSG_ERROR("default flags for ${CC} are not known")
+ fi
+
+ dnl Choose between debugging and optimization.
+ if test "${ecosflags_enable_debug}" = "yes" ; then
+ if test "${GCC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -g -O0"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -g -O0"
+ elif test "${MSVC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -MDd -Zi"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -MDd -Zi"
+ fi
+ else
+ dnl For now building with g++ implies -O0 rather than -O2. The
+ dnl compile-time performance of g++ at -O2 has been disappointing
+ dnl for quite some time, and the eCos host-side code is not
+ dnl sufficiently cpu-intensive to require -O2.
+ if test "${GCC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -O0"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -O0"
+ elif test "${MSVC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -MD -O2"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -MD -O2"
+ fi
+ fi
+
+ CFLAGS="${ac_save_CFLAGS}"
+ CXXFLAGS="${ac_save_CXXFLAGS}"
+
+ AC_MSG_RESULT(done)
+])
+
+dnl --------------------------------------------------------------------
+dnl User-settable options for assertions and tracing.
+dnl
+dnl The settable options are:
+dnl --disable-asserts
+dnl --disable-preconditions
+dnl --disable-postconditions
+dnl --disable-invariants
+dnl --disable-loopinvariants
+dnl --disable-tracing
+dnl --disable-fntracing
+
+AC_DEFUN(ECOS_ARG_INFRASTRUCTURE, [
+
+ AC_REQUIRE([ECOS_PROG_STANDARD_COMPILER_FLAGS])
+
+ if test "${ecosflags_enable_debug}" = "yes" ; then
+ ecosinfra_asserts="yes"
+ ecosinfra_preconditions="yes"
+ ecosinfra_postconditions="yes"
+ ecosinfra_invariants="yes"
+ ecosinfra_loopinvariants="yes"
+ ecosinfra_tracing="yes"
+ ecosinfra_fntracing="yes"
+ else
+ ecosinfra_asserts="no"
+ ecosinfra_preconditions="no"
+ ecosinfra_postconditions="no"
+ ecosinfra_invariants="no"
+ ecosinfra_loopinvariants="no"
+ ecosinfra_tracing="no"
+ ecosinfra_fntracing="no"
+ fi
+
+ AC_ARG_ENABLE(asserts,[ --disable-asserts disable all assertions],
+ [case "${enableval}" in
+ yes) ecosinfra_asserts="yes" ;;
+ no) ecosinfra_asserts="no" ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for disable-asserts option]) ;;
+ esac])
+ if test "${ecosinfra_asserts}" = "yes"; then
+ AC_DEFINE(CYGDBG_USE_ASSERTS)
+ fi
+
+ AC_ARG_ENABLE(preconditions, [ --disable-preconditions disable a subset of the assertions],
+ [case "${enableval}" in
+ yes) ecosinfra_preconditions="yes" ;;
+ no) ecosinfra_preconditions="no" ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for disable-preconditions option]) ;;
+ esac])
+ if test "${ecosinfra_preconditions}" = "yes"; then
+ AC_DEFINE(CYGDBG_INFRA_DEBUG_PRECONDITIONS)
+ fi
+
+ AC_ARG_ENABLE(postconditions, [ --disable-postconditions disable a subset of the assertions],
+ [case "${enableval}" in
+ yes) ecosinfra_postconditions="yes" ;;
+ no) ecosinfra_postconditions="no" ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for disable-postconditions option]) ;;
+ esac])
+ if test "${ecosinfra_postconditions}" = "yes"; then
+ AC_DEFINE(CYGDBG_INFRA_DEBUG_POSTCONDITIONS)
+ fi
+
+ AC_ARG_ENABLE(invariants, [ --disable-invariants disable a subset of the assertions],
+ [case "${enableval}" in
+ yes) ecosinfra_invariants="yes" ;;
+ no) ecosinfra_invariants="no" ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for disable-invariants option]) ;;
+ esac])
+ if test "${ecosinfra_invariants}" = "yes"; then
+ AC_DEFINE(CYGDBG_INFRA_DEBUG_INVARIANTS)
+ fi
+
+ AC_ARG_ENABLE(loopinvariants, [ --disable-loopinvariants disable a subset of the assertions],
+ [case "${enableval}" in
+ yes) ecosinfra_loopinvariants="yes" ;;
+ no) ecosinfra_loopinvariants="no" ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for disable-loopinvariants option]) ;;
+ esac])
+ if test "${ecosinfra_loopinvariants}" = "yes"; then
+ AC_DEFINE(CYGDBG_INFRA_DEBUG_LOOP_INVARIANTS)
+ fi
+
+ AC_ARG_ENABLE(tracing,[ --disable-tracing disable tracing],
+ [case "${enableval}" in
+ yes) ecosinfra_tracing="yes" ;;
+ no) ecosinfra_tracing="no" ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for disable-tracing option]) ;;
+ esac])
+ if test "${ecosinfra_tracing}" = "yes"; then
+ AC_DEFINE(CYGDBG_USE_TRACING)
+ fi
+
+ AC_ARG_ENABLE(fntracing,[ --disable-fntracing disable function entry/exit tracing],
+ [case "${enableval}" in
+ yes) ecosinfra_fntracing="yes" ;;
+ no) ecosinfra_fntracing=no ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for disable-fntracing option]) ;;
+ esac])
+ if test "${ecosinfra_fntracing}" = "yes"; then
+ AC_DEFINE(CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS)
+ fi
+])
+
+dnl ====================================================================
+dnl Inspired by KDE's autoconfig
+dnl This macro takes three Arguments like this:
+dnl AC_FIND_FILE(foo.h, $incdirs, incdir)
+dnl the filename to look for, the list of paths to check and
+dnl the variable with the result.
+
+AC_DEFUN(AC_FIND_FILE,[
+ $3=""
+ for i in $2; do
+ if test -r "$i/$1"; then
+ $3=$i
+ break
+ fi
+ done
+])
+
+dnl ====================================================================
+dnl Variation of the above.
+dnl This macro takes three Arguments like this:
+dnl AC_FIND_DIR(infra, $incdirs, incdir)
+dnl the directory name to look for, the list of paths to check and
+dnl the variable with the result.
+
+AC_DEFUN(AC_FIND_DIR,[
+ $3=""
+ for i in $2; do
+ if test -d "$i/$1"; then
+ $3=$i
+ break
+ fi
+ done
+])
+
+dnl ====================================================================
+dnl Work out details of the Tcl/tk installation that should be used.
+dnl In theory this is simple: when Tcl is installed in <tcl_prefix>
+dnl (usually /usr) there should be a file <tcl_prefix>/lib/tclConfig.sh
+dnl which defines exactly how to build Tcl-based applications. Of course
+dnl Tcl may be installed anywhere, not just in /usr, so it is necessary
+dnl to do some searching. There is a command-line argument
+dnl --with-tcl=<path> to specify the Tcl installation, so the macro
+dnl can search for <with_tcl>/lib/tclConfig.sh, <prefix>/lib/tclConfig.sh
+dnl and /usr/lib/tclConfig.sh
+dnl
+dnl Unfortunately not all systems use this convention. For example,
+dnl at the time of writing Debian installs tclConfig.sh in a versioned
+dnl subdirectory /usr/lib/tcl8.3/tclConfig.sh. Hence there is an
+dnl additional argument --with-tcl-version=<vsn> which is used to
+dnl extend the search path.
+dnl
+dnl For VC++ builds the situation is different again. Tcl may be
+dnl installed anywhere, so the data in tclConfig.sh is not useful
+dnl (and that file may not be provided at all). Instead --with-tcl
+dnl must be used to specify the path. Alternatively separate paths
+dnl for headers and libraries can be specified using --with-tcl-header
+dnl and --with-tcl-lib. Usually it will also be necessary to specify
+dnl the library version number using --with-tcl-version.
+
+dnl This adds two main command-line options, --with-tcl=<prefix> to
+dnl specify the Tcl install directory, and --with-tcl-version=<vsn>
+dnl to control which version of Tcl should be used. For finer-grained
+dnl control there are additional options --with-tcl-header and
+dnl --with-tcl-version. It is assumed that Tcl and Tk are installed
+dnl in the same place.
+dnl
+dnl On Unix systems and under cygwin there should be a file
+dnl $(tcl_prefix)/lib/tclConfig.sh containing all the information
+dnl needed for Tcl. This file is consulted and the appropriate
+dnl variables extracted. Similar information for Tk lives in
+dnl tkConfig.sh. As a useful side effect all variables defined
+dnl in those scripts can be accessed.
+dnl
+dnl To confuse matters, subtly different naming conventions are used
+dnl under Unix and NT. Under Unix the Tcl library will be called
+dnl libtcl8.0.a, libtcl8.1.a, etc. with a dot between the major and
+dnl minor version. Under NT (including cygwin) the library will be
+dnl called tcl80.lib, tcl81.lib, libtcl80.a, libtcl81.a, etc.
+dnl without a dot.
+dnl
+dnl Currently this macro assumes that Tcl is preinstalled, and not
+dnl built alongside eCos. Specifically the macro checks that
+dnl tcl.h can be found, plus on Unix systems tclConfig.sh and
+dnl tkConfig.sh as well.
+dnl
+dnl This macro updates the build-related variables ecos_INCLUDES,
+dnl ecos_LDADD, and ecos_LIBS. The latter assumes the application
+dnl only needs Tcl. If Tk is needed as well then the variable
+dnl ecos_tklibs should be used in addition.
+
+AC_DEFUN(ECOS_PATH_TCL, [
+
+ AC_REQUIRE([ECOS_PROG_MSVC])
+ AC_REQUIRE([AC_CYGWIN])
+
+ ecos_tk_libs=""
+ ecos_tk_libdir=""
+
+ dnl Where is the Tcl installation, and what version should be used?
+ AC_MSG_CHECKING(for Tcl installation)
+ AC_ARG_WITH(tcl,[ --with-tcl=<path> location of Tcl header and libraries])
+ AC_ARG_WITH(tcl-version,[ --with-tcl-version=<vsn> version of Tcl to be used])
+
+ dnl If using VC++ then there are no sensible default directories
+ dnl to search for a Tcl installation. Instead the user must
+ dnl supply either --with-tcl, or both --with-tcl-header and
+ dnl --with-tcl-lib.
+ dnl
+ dnl Also when using VC++ there is no tclConfig.sh file to
+ dnl consult about which libraries are needed. Instead that
+ dnl information is hard-wired here.
+ if test "${MSVC}" = "yes" ; then
+ AC_ARG_WITH(tcl-header,[ --with-tcl-header=<path> location of Tcl header])
+ AC_ARG_WITH(tcl-lib,[ --with-tcl-lib=<path> location of Tcl libraries])
+ ecos_tcl_incdir=""
+ ecos_tcl_libdir=""
+ if test "${with_tcl_version+set}" != set ; then
+ AC_MSG_ERROR(You must specify a Tcl version using --with-tcl-version=<vsn>)
+ fi
+ if test "${with_tcl_header+set}" = set ; then
+ ecos_tcl_incdir=${with_tcl_header}
+ elif test "${with_tcl+set}" = set ; then
+ ecos_tcl_incdir="${with_tcl}/include"
+ else
+ AC_MSG_ERROR(You must specify a Tcl installation with either --with-tcl=<path> or --with-tcl-header=<path>)
+ fi
+ if test "${with_tcl_lib+set}" = set; then
+ ecos_tcl_libdir=${with_tcl_lib}
+ elif test "${with_tcl+set}" = set; then
+ ecos_tcl_libdir="${with_tcl}/lib"
+ else
+ AC_MSG_ERROR(You must specify a Tcl installation with either --with-tcl=<path> or --with-tcl-lib=<path>)
+ fi
+
+ dnl Sanity check, make sure that there is a tcl.h header file.
+ dnl If not then there is no point in proceeding.
+ if test \! -r "${ecos_tcl_incdir}/tcl.h" ; then
+ AC_MSG_ERROR([unable to locate Tcl header file tcl.h])
+ fi
+
+ ECOS_MSVC_PATH(ecos_tcl_incdir)
+ ECOS_MSVC_PATH(ecos_tcl_libdir)
+ ecos_INCLUDES="${ecos_INCLUDES} \"-I${ecos_tcl_incdir}\""
+ ecos_LIBS="${ecos_LIBS} tcl${with_tcl_version}.lib"
+ ecos_LDADD="${ecos_LDADD} \"-libpath=${ecos_tcl_libdir}\""
+
+ dnl FIXME: what libraries are needed for a tk application under VC++?
+ dnl and can the version be determined more accurately?
+ ecos_tk_libs=""
+
+ else
+ dnl Try to find tclConfig.sh
+ possibles=""
+ if test "${with_tcl+set}" = set ; then
+ possibles="${with_tcl}/lib"
+ if test "${with_tcl_version+set}" = set ; then
+ possibles="${possibles} ${with_tcl}/lib/tcl${with_tcl_version}"
+ fi
+ fi
+ possibles="${possibles} ${prefix}/lib"
+ if test "${with_tcl_version+set}" = set ; then
+ possibles="${possibles} ${prefix}/lib/tcl${with_tcl_version}"
+ fi
+ possibles="${possibles} /usr/lib"
+ if test "${with_tcl_version+set}" = set ; then
+ possibles="${possibles} /usr/lib/tcl${with_tcl_version}"
+ fi
+ AC_FIND_FILE("tclConfig.sh", ${possibles}, tclconfig)
+ if test \! -r "${tclconfig}/tclConfig.sh" ; then
+ AC_MSG_ERROR(unable to locate Tcl configuration file tclConfig.sh)
+ else
+ . ${tclconfig}/tclConfig.sh
+
+ dnl Now we need to figure out where to find the Tcl header files.
+ dnl tclConfig.sh may define a variable TCL_INC_DIR, otherwise
+ dnl use TCL_PREFIX/include
+ if test -z "${TCL_INC_DIR}" ; then
+ ecos_tcl_incdir="${TCL_PREFIX}/include"
+ else
+ ecos_tcl_incdir="${TCL_INC_DIR}"
+ fi
+ if test \! -r "${ecos_tcl_incdir}/tcl.h" ; then
+ AC_MSG_ERROR(unable to locate Tcl header file tcl.h)
+ else
+ dnl On Unix systems -I/usr/include is unnecessary, and can
+ dnl cause problems on hosts where gcc is not the platform's
+ dnl default compiler because of the use of unfixed headers.
+ dnl Hence it is explicitly removed here.
+ if test "${ecos_tcl_incdir}" != "/usr/include" ; then
+ ecos_INCLUDES="${ecos_INCLUDES} -I${ecos_tcl_incdir}"
+ fi
+ fi
+
+ dnl There should be a variable TCL_LIB_SPEC which defines
+ dnl exactly how to link with Tcl. Unfortunately this is not
+ dnl 100% guaranteed, so a backup solution is still needed.
+ dnl NOTE: there is also TCL_LIBS defining additional libraries
+ dnl such as -ldl. That may have to be added to ecos_LIBS.
+ if test -z "${TCL_LIB_SPEC}" -a "${with_tcl_version+set}" = set ; then
+ AC_FIND_FILE("libtcl${with_tcl_version}.a", ${possibles}, libtcl)
+ if test -r "${libtcl}/libtcl${with_tcl_version}.a" ; then
+ TCL_LIB_SPEC="-L${libtcl} -ltcl${with_tcl_version}"
+ fi
+ fi
+ if test -z "${TCL_LIB_SPEC}" ; then
+ AC_FIND_FILE("libtcl.a", ${possibles}, libtcl)
+ if test -r "${libtcl}/libtcl.a" ; then
+ TCL_LIB_SPEC="-L${libtcl} -ltcl"
+ fi
+ fi
+ if test -z "${TCL_LIB_SPEC}" ; then
+ AC_MSG_ERROR(${tclconfig}/tclConfig.sh does not define TCL_LIB_SPEC, and unable to find libtcl.a)
+ fi
+ ecos_LIBS="${ecos_LIBS} ${TCL_LIB_SPEC}"
+
+ dnl Next, look for tkConfig.sh
+ possibles=`echo ${possibles} | sed -e 's,tcl,tk,g'`
+ AC_FIND_FILE("tkConfig.sh", ${possibles}, tkconfig)
+ if test \! -r "${tkconfig}/tkConfig.sh" ; then
+ AC_MSG_ERROR(unable to locate Tk config file tkConfig.sh)
+ else
+ . ${tkconfig}/tkConfig.sh
+ if test -z "${TK_INC_DIR}" ; then
+ if test "${TK_PREFIX}" = "/usr" ; then
+ ecos_tk_includes="${TK_XINCLUDES}"
+ else
+ ecos_tk_includes="-I${TK_PREFIX}/include ${TK_XINCLUDES}"
+ fi
+ else
+ ecos_tk_includes="-I${TK_INC_DIR} ${TK_XINCLUDES}"
+ fi
+
+ dnl As with TCL_LIB_SPEC, TK_LIB_SPEC may be empty
+ if test -z "${TK_LIB_SPEC}" -a "${with_tcl_version+set}" = set ; then
+ AC_FIND_FILE("libtk${with_tcl_version}.a", ${possibles}, libtk)
+ if test -r "${libtk}/libtk${with_tcl_version}.a" ; then
+ TK_LIB_SPEC="-L${libtk} -ltk${with_tcl_version}"
+ fi
+ fi
+ if test -z "${TK_LIB_SPEC}" ; then
+ AC_FIND_FILE("libtk.a", ${possibles}, libtk)
+ if test -r "${libtk}/libtk.a" ; then
+ TK_LIB_SPEC="-L${libtk} -ltk"
+ fi
+ fi
+ if test -z "${TK_LIB_SPEC}" ; then
+ AC_MSG_ERROR(${tkconfig}/tkConfig.sh does not define TK_LIB_SPEC, and unable to find libtk.a)
+ fi
+ ecos_tk_libs="${TK_LIB_SPEC} ${TK_LIBS}"
+ fi
+ fi
+ fi
+
+ AC_MSG_RESULT([-I${ecos_tcl_incdir} ${TCL_LIB_SPEC}])
+ AC_SUBST(ecos_tk_includes)
+ AC_SUBST(ecos_tk_libs)
+])
+
+dnl ====================================================================
+dnl Search for the infrastructure headers. Usually these can be picked
+dnl up from host/infra in the build tree. This macro updates
+dnl ecos_INCLUDES, ecos_LDADD and ecos_LIBS appropriately. In addition
+dnl it defines new variables ecos_infra_incdir and ecos_infra_libdir,
+dnl useful for listing explicit dependencies.
+dnl
+dnl This macro should only be used in configure scripts that run after
+dnl the infrastructure has been configured because it relies on the
+dnl infra directory already having been created in the build tree.
+
+AC_DEFUN(ECOS_PATH_INFRA, [
+ AC_MSG_CHECKING([for eCos host-side infrastructure])
+
+ dnl Where are we in the build tree? First assume that we are in the host
+ dnl tree, thus allowing configury of just the host-side. If that fails
+ dnl assume we can be anywhere.
+ infra_builddir=""
+ possibles=".. ../.. ../../.. ../../../.. ../../../../.."
+ AC_FIND_DIR("infra", ${possibles}, infra_builddir)
+ if test "${infra_builddir}" = "" ; then
+ possibles="../host ../../host ../../../host ../../../../host ../../../../../host ../../../../../../host"
+ AC_FIND_DIR("infra", ${possibles}, infra_builddir)
+ fi
+ if test "${infra_builddir}" != "" ; then
+ infra_builddir="${infra_builddir}/infra"
+ infra_builddir=`cd ${infra_builddir} && /bin/pwd`
+ fi
+
+ ecos_infra_incdir=""
+ ecos_infra_libdir=""
+ ecos_infra_libs=""
+
+ AC_ARG_WITH(infra-header,[ --with-infra-header=<path> location of eCos infrastructure headers])
+ AC_ARG_WITH(infra-lib,[ --with-infra-lib=<path> location of eCos infrastructure library])
+ AC_ARG_WITH(infra,[ --with-infra=<path> location of eCos infrastructure installation])
+
+ if test "${with_infra_header+set}" = "set"; then
+ ecos_infra_incdir="${with_infra_header}"
+ elif test "${with_infra+set}" = "set"; then
+ ecos_infra_incdir="${with_infra}/include"
+ elif test "${infra_builddir}" != "" ; then
+ ecos_infra_incdir="${infra_builddir}"
+ else
+ AC_MSG_ERROR([infrastructure headers not found])
+ fi
+ if test "${MSVC}" = "yes" ; then
+ ecos_msvc_infra_incdir=${ecos_infra_incdir}
+ ECOS_MSVC_PATH(ecos_msvc_infra_incdir)
+ ecos_INCLUDES="${ecos_INCLUDES} \"-I${ecos_msvc_infra_incdir}\""
+ else
+ ecos_INCLUDES="${ecos_INCLUDES} -I${ecos_infra_incdir}"
+ fi
+
+ if test "${with_infra_lib+set}" = "set"; then
+ ecos_infra_libdir="${with_infra_lib}"
+ elif test "${with_infra+set}" = "set"; then
+ ecos_infra_libdir="${with_infra}/lib"
+ elif test "${infra_builddir}" != "" ; then
+ ecos_infra_libdir="${infra_builddir}"
+ else
+ AC_MSG_ERROR([infrastructure library not found])
+ fi
+ if test "${MSVC}" = "yes" ; then
+ ecos_msvc_infra_libdir=${ecos_infra_libdir}
+ ECOS_MSVC_PATH(ecos_msvc_infra_libdir)
+ ecos_LIBS="${ecos_LIBS} cyginfra.lib"
+ ecos_LDADD="${ecos_LDADD} \"-libpath=${ecos_msvc_infra_libdir}\""
+ else
+ ecos_LIBS="${ecos_LIBS} -lcyginfra"
+ ecos_LDADD="${ecos_LDADD} -L${ecos_infra_libdir}"
+ fi
+
+ AC_SUBST(ecos_infra_incdir)
+ AC_SUBST(ecos_infra_libdir)
+ AC_MSG_RESULT(-I[${ecos_infra_incdir} -L${ecos_infra_libdir}])
+])
+
+dnl ====================================================================
+dnl And a very similar macro for libcdl, but note that the headers
+dnl are in the source tree rather than the build tree.
+
+AC_DEFUN(ECOS_PATH_LIBCDL, [
+ AC_MSG_CHECKING([for libcdl])
+
+ dnl Where are we in the source tree?
+ libcdl_srcdir=""
+ possibles="${srcdir}/.. ${srcdir}/../.. ${srcdir}/../../.. ${srcdir}/../../../.. ${srcdir}/../../../../.."
+ AC_FIND_DIR("libcdl", ${possibles}, libcdl_srcdir)
+ if test "${libcdl_srcdir}" = "" ; then
+ possibles="${srcdir}/../host ${srcdir}/../../host ${srcdir}/../../../host ${srcdir}/../../../../host ${srcdir}/../../../../../host ${srcdir}/../../../../../../host"
+ AC_FIND_DIR("libcdl", ${possibles}, libcdl_srcdir)
+ fi
+ if test "${libcdl_srcdir}" != "" ; then
+ libcdl_srcdir="${libcdl_srcdir}/libcdl"
+ libcdl_srcdir=`cd ${libcdl_srcdir} && /bin/pwd`
+ fi
+
+ dnl And where are we in the build tree?
+ libcdl_builddir=""
+ possibles=".. ../.. ../../.. ../../../.. ../../../../.."
+ AC_FIND_DIR("libcdl", ${possibles}, libcdl_builddir)
+ if test "${libcdl_builddir}" = "" ; then
+ possibles="../host ../../host ../../../host ../../../../host ../../../../../host ../../../../../../host"
+ AC_FIND_DIR("libcdl", ${possibles}, libcdl_builddir)
+ fi
+ if test "${libcdl_builddir}" != "" ; then
+ libcdl_builddir="${libcdl_builddir}/libcdl"
+ libcdl_builddir=`cd ${libcdl_builddir} && /bin/pwd`
+ fi
+
+ ecos_libcdl_incdir=""
+ ecos_libcdl_libdir=""
+ ecos_libcdl_libs=""
+
+ AC_ARG_WITH(libcdl-header,[ --with-libcdl-header=<path> location of eCos libcdl headers])
+ AC_ARG_WITH(libcdl-lib,[ --with-libcdl-lib=<path> location of eCos libcdl library])
+ AC_ARG_WITH(libcdl,[ --with-libcdl=<path> location of eCos libcdl installation])
+
+ if test "${with_libcdl_header+set}" = "set"; then
+ ecos_libcdl_incdir="${with_libcdl_header}"
+ elif test "${with_libcdl+set}" = "set"; then
+ ecos_libcdl_incdir="${with_libcdl}/include"
+ elif test "${libcdl_srcdir}" != "" ; then
+ ecos_libcdl_incdir="${libcdl_srcdir}"
+ fi
+ if test \! -r "${ecos_libcdl_incdir}/cdl.hxx" ; then
+ AC_MSG_ERROR([libcdl headers not found])
+ fi
+ if test "${MSVC}" = "yes" ; then
+ ecos_msvc_libcdl_incdir="${ecos_libcdl_incdir}"
+ ECOS_MSVC_PATH(ecos_msvc_libcdl_incdir)
+ ecos_INCLUDES="${ecos_INCLUDES} \"-I${ecos_msvc_libcdl_incdir}\""
+ else
+ ecos_INCLUDES="${ecos_INCLUDES} -I${ecos_libcdl_incdir}"
+ fi
+
+ if test "${with_libcdl_lib+set}" = "set"; then
+ ecos_libcdl_libdir="${with_libcdl_lib}"
+ elif test "${with_libcdl+set}" = "set"; then
+ ecos_libcdl_libdir="${with_libcdl}/lib"
+ elif test "${libcdl_builddir}" != "" ; then
+ ecos_libcdl_libdir="${libcdl_builddir}"
+ else
+ AC_MSG_ERROR([libcdl library not found])
+ fi
+ if test "${MSVC}" = "yes" ; then
+ ecos_msvc_libcdl_libdir=${ecos_libcdl_libdir}
+ ECOS_MSVC_PATH(ecos_msvc_libcdl_libdir)
+ ecos_LIBS="${ecos_LIBS} cdl.lib"
+ ecos_LDADD="${ecos_LDADD} \"-libpath=${ecos_msvc_libcdl_libdir}\""
+ else
+ ecos_LIBS="${ecos_LIBS} -lcdl"
+ ecos_LDADD="${ecos_LDADD} -L${ecos_libcdl_libdir}"
+ fi
+
+ AC_SUBST(ecos_libcdl_incdir)
+ AC_SUBST(ecos_libcdl_libdir)
+ AC_MSG_RESULT([-I${ecos_libcdl_incdir} -L${ecos_libcdl_libdir}])
+])
+
+dnl ====================================================================
+dnl Look for a 64 bit data type. It is necessary to check both C and C++
+dnl compilers.
+dnl
+dnl A better implementation would check whether or not AC_PROG_CC and
+dnl AC_PROG_CXX have been invoked and only test the appropriate
+dnl compiler.
+dnl
+dnl When cross-compiling, default to long long on the assumption that
+dnl gcc/g++ must be used and long long is likely to be the 64 bit data
+dnl type. This is not guaranteed, but sufficiently likely to meet
+dnl the requirements for the time being. The CHECK_SIZEOF() macro
+dnl might be another way to get the desired information.
+
+AC_DEFUN(ECOS_TYPE_64bit, [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_PROG_CXX])
+
+ AC_CACHE_CHECK("for a 64 bit data type",ecos_cv_type_64bit,[
+ for type in "long" "long long" "__int64"; do
+ AC_LANG_SAVE
+ AC_LANG_C
+ AC_TRY_RUN([
+ main() {
+ return 8 != sizeof($type);
+ }
+ ],ctype_64bit=$type,ctype_64bit="unknown",ctype_64bit="long long")
+ AC_LANG_CPLUSPLUS
+ AC_TRY_RUN([
+ int main(int argc, char ** argv) {
+ return 8 != sizeof($type);
+ }
+ ],cxxtype_64bit=$type,cxxtype_64bit="unknown",cxxtype_64bit="long long")
+ AC_LANG_RESTORE
+ if test "${ctype_64bit}" = "${type}" -a "${cxxtype_64bit}" = "${type}"; then
+ ecos_cv_type_64bit="${type}"
+ break
+ fi
+ done
+ ])
+ if test "${ecos_cv_type_64bit}" = ""; then
+ AC_MSG_ERROR(Unable to figure out how to do 64 bit arithmetic)
+ else
+ if test "${ecos_cv_type_64bit}" != "long long"; then
+ AC_DEFINE_UNQUOTED(cyg_halint64,${ecos_cv_type_64bit})
+ AC_DEFINE_UNQUOTED(cyg_halcount64,${ecos_cv_type_64bit})
+ fi
+ fi
+])
+
+dnl ====================================================================
+dnl Check that both the C and C++ compilers support __PRETTY_FUNCTION__
+
+AC_DEFUN(ECOS_C_PRETTY_FUNCTION,[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_PROG_CXX])
+
+ AC_CACHE_CHECK("for __PRETTY_FUNCTION__ support",ecos_cv_c_pretty_function,[
+ AC_LANG_SAVE
+ AC_LANG_C
+ AC_TRY_LINK(
+ [#include <stdio.h>],
+ [puts(__PRETTY_FUNCTION__);],
+ c_ok="yes",
+ c_ok="no"
+ )
+ AC_LANG_CPLUSPLUS
+ AC_TRY_LINK(
+ [#include <cstdio>],
+ [puts(__PRETTY_FUNCTION__);],
+ cxx_ok="yes",
+ cxx_ok="no"
+ )
+ AC_LANG_RESTORE
+ if test "${c_ok}" = "yes" -a "${cxx_ok}" = "yes"; then
+ ecos_cv_c_pretty_function="yes"
+ fi
+ ])
+ if test "${ecos_cv_c_pretty_function}" = "yes"; then
+ AC_DEFINE(CYGDBG_INFRA_DEBUG_FUNCTION_PSEUDOMACRO)
+ fi
+])
+
+dnl ====================================================================
+dnl During installation eCos package-specific host-side code should be
+dnl versioned in the same way as the packages themselves, allowing
+dnl different versions to coexist in one installation. This is analogous
+dnl to having multiple versions of a shared library installed so that
+dnl applications can load whichever one they were linked with.
+dnl
+dnl To support all this the host-side code needs access to a number
+dnl of directory names:
+dnl ECOS_REPOSITORY e.g. ~/ecc/ecc
+dnl PACKAGE_DIR e.g. hal/synth/arch
+dnl PACKAGE_VERSION e.g. current
+dnl PACKAGE_INSTALL e.g. hal/synth/arch/current
+dnl
+dnl These, together with the standard variable libexecdir, allow
+dnl the host-side code to navigate around both source and install
+dnl trees.
+
+AC_DEFUN(ECOS_PACKAGE_DIRS,[
+
+ dnl srcdir will be something like <path>/packages/<package_path>/<version>/host
+ package_dir=`cd ${srcdir} && /bin/pwd`
+ PACKAGE_VERSION=`dirname ${package_dir}`
+ PACKAGE_VERSION=`basename ${PACKAGE_VERSION}`
+
+ dnl Now look for an "acsupport" directory as a good way of identifying
+ dnl the root of the repository. Assume that this does not clash with
+ dnl any real packages in the repository. Also assume that no silly games
+ dnl are being played with symlinks.
+ package_dir=`dirname ${package_dir}`
+ package_dir=`dirname ${package_dir}`
+
+ possibles="${package_dir}/.. ${package_dir}/../.. ${package_dir}/../../.. ${package_dir}/../../../.."
+ possibles="${possibles} ${package_dir}/../../../../.. ${package_dir}/../../../../../.."
+ AC_FIND_DIR("acsupport", ${possibles}, repository_root)
+ if test "${repository_root}" = "" ; then
+ AC_MSG_ERROR([Failed to identify this package's position within the eCos repository])
+ fi
+ dnl repository_root will still contain the ..'s, instead of an absolute path
+ ECOS_REPOSITORY=`cd "${repository_root}/packages/pkgconf/.." && /bin/pwd`
+
+ dnl Now we have two absolute paths, so just remove one from the other
+ PACKAGE_DIR=`echo ${package_dir} | sed -e "s:${ECOS_REPOSITORY}/::"`
+
+ dnl To avoid creating too many subdirectories on the host-side, turn
+ dnl e.g. hal/synth/arch into hal_synth_arch. Theoretically this could
+ dnl go wrong because multiple packages could map onto the same string,
+ dnl but in practice there should be a net reduction in complexity.
+ dnl bartv: / to _ conversion disabled for now, 5 March 2002
+ PACKAGE_INSTALL="${PACKAGE_DIR}/${PACKAGE_VERSION}"
+ dnl PACKAGE_INSTALL=`echo ${PACKAGE_INSTALL} | sed -e "s:/:_:g"`
+
+ AC_SUBST(ECOS_REPOSITORY)
+ AC_SUBST(PACKAGE_DIR)
+ AC_SUBST(PACKAGE_VERSION)
+ AC_SUBST(PACKAGE_INSTALL)
+])
diff --git a/cesar/ecos/acsupport/config.guess b/cesar/ecos/acsupport/config.guess
new file mode 100755
index 0000000000..20c971aae9
--- /dev/null
+++ b/cesar/ecos/acsupport/config.guess
@@ -0,0 +1,1171 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Written by Per Bothner <bothner@cygnus.com>.
+# Please send patches to <config-patches@gnu.org>.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit system type (host/target name).
+#
+# Only a few systems have been added to this list; please add others
+# (but try to keep the structure clean).
+#
+
+# Use $HOST_CC if defined. $CC may point to a cross-compiler
+if test x"$CC_FOR_BUILD" = x; then
+ if test x"$HOST_CC" != x; then
+ CC_FOR_BUILD="$HOST_CC"
+ else
+ if test x"$CC" != x; then
+ CC_FOR_BUILD="$CC"
+ else
+ CC_FOR_BUILD=cc
+ fi
+ fi
+fi
+
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 8/24/94.)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # Netbsd (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ # Determine the machine/vendor (is the vendor relevant).
+ case "${UNAME_MACHINE}" in
+ amiga) machine=m68k-cbm ;;
+ arm32) machine=arm-unknown ;;
+ atari*) machine=m68k-atari ;;
+ sun3*) machine=m68k-sun ;;
+ mac68k) machine=m68k-apple ;;
+ macppc) machine=powerpc-apple ;;
+ hp3[0-9][05]) machine=m68k-hp ;;
+ ibmrt|romp-ibm) machine=romp-ibm ;;
+ *) machine=${UNAME_MACHINE}-unknown ;;
+ esac
+ # The Operating System including object format.
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ # The OS release
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit 0 ;;
+ alpha:OSF1:*:*)
+ if test $UNAME_RELEASE = "V4.0"; then
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ fi
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ cat <<EOF >$dummy.s
+ .data
+\$Lformat:
+ .byte 37,100,45,37,120,10,0 # "%d-%x\n"
+
+ .text
+ .globl main
+ .align 4
+ .ent main
+main:
+ .frame \$30,16,\$26,0
+ ldgp \$29,0(\$27)
+ .prologue 1
+ .long 0x47e03d80 # implver \$0
+ lda \$2,-1
+ .long 0x47e20c21 # amask \$2,\$1
+ lda \$16,\$Lformat
+ mov \$0,\$17
+ not \$1,\$18
+ jsr \$26,printf
+ ldgp \$29,0(\$26)
+ mov 0,\$16
+ jsr \$26,exit
+ .end main
+EOF
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ case `./$dummy` in
+ 0-0)
+ UNAME_MACHINE="alpha"
+ ;;
+ 1-0)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 1-1)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 1-101)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 2-303)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ 2-307)
+ UNAME_MACHINE="alphaev67"
+ ;;
+ esac
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-cbm-sysv4
+ exit 0;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
+ arc64:OpenBSD:*:*)
+ echo mips64el-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hkmips:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ SR2?01:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit 0;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit 0 ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit 0 ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit 0 ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit 0 ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy \
+ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit 0 ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i?86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo rs6000-ibm-aix3.2.5
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit 0 ;;
+ *:AIX:*:4)
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=4.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 9000/[34678]??:HP-UX:*:*)
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ sed 's/^ //' << EOF >$dummy.c
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+ rm -f $dummy.c $dummy
+ esac
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ *9??*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit 0 ;;
+ i?86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
+ hppa*:OpenBSD:*:*)
+ echo hppa-unknown-openbsd
+ exit 0 ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*X-MP:*:*:*)
+ echo xmp-cray-unicos
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+ exit 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY-2:*:*:*)
+ echo cray2-cray-unicos
+ exit 0 ;;
+ F300:UNIX_System_V:*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ F301:UNIX_System_V:*:*)
+ echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*)
+ if test -x /usr/bin/objformat; then
+ if test "elf" = "`/usr/bin/objformat`"; then
+ echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+ exit 0
+ fi
+ fi
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit 0 ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i386-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit 0 ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ *:GNU:*:*)
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
+ *:Linux:*:*)
+
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ ld_help_string=`cd /; ld --help 2>&1`
+ ld_supported_emulations=`echo $ld_help_string \
+ | sed -ne '/supported emulations:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported emulations: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_emulations" in
+ *ia64)
+ echo "${UNAME_MACHINE}-unknown-linux"
+ exit 0
+ ;;
+ i?86linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit 0
+ ;;
+ i?86coff)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit 0
+ ;;
+ sparclinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ armlinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ elf32arm*)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
+ exit 0
+ ;;
+ armelf_linux*)
+ echo "${UNAME_MACHINE}-unknown-linux-gnu"
+ exit 0
+ ;;
+ m68klinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ elf32ppc | elf32ppclinux)
+ # Determine Lib Version
+ cat >$dummy.c <<EOF
+#include <features.h>
+#if defined(__GLIBC__)
+extern char __libc_version[];
+extern char __libc_release[];
+#endif
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+#if defined(__GLIBC__)
+ printf("%s %s\n", __libc_version, __libc_release);
+#else
+ printf("unkown\n");
+#endif
+ return 0;
+}
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy | grep 1\.99 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f $dummy.c $dummy
+ echo powerpc-unknown-linux-gnu${LIBC}
+ exit 0
+ ;;
+ esac
+
+ if test "${UNAME_MACHINE}" = "alpha" ; then
+ cat <<EOF >$dummy.s
+ .data
+ \$Lformat:
+ .byte 37,100,45,37,120,10,0 # "%d-%x\n"
+
+ .text
+ .globl main
+ .align 4
+ .ent main
+ main:
+ .frame \$30,16,\$26,0
+ ldgp \$29,0(\$27)
+ .prologue 1
+ .long 0x47e03d80 # implver \$0
+ lda \$2,-1
+ .long 0x47e20c21 # amask \$2,\$1
+ lda \$16,\$Lformat
+ mov \$0,\$17
+ not \$1,\$18
+ jsr \$26,printf
+ ldgp \$29,0(\$26)
+ mov 0,\$16
+ jsr \$26,exit
+ .end main
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ case `./$dummy` in
+ 0-0)
+ UNAME_MACHINE="alpha"
+ ;;
+ 1-0)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 1-1)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 1-101)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 2-303)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ 2-307)
+ UNAME_MACHINE="alphaev67"
+ ;;
+ esac
+
+ objdump --private-headers $dummy | \
+ grep ld.so.1 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
+ elif test "${UNAME_MACHINE}" = "mips" ; then
+ cat >$dummy.c <<EOF
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __MIPSEB__
+ printf ("%s-unknown-linux-gnu\n", argv[1]);
+#endif
+#ifdef __MIPSEL__
+ printf ("%sel-unknown-linux-gnu\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ elif test "${UNAME_MACHINE}" = "s390"; then
+ echo s390-ibm-linux && exit 0
+ else
+ # Either a pre-BFD a.out linker (linux-gnuoldld)
+ # or one that does not give us useful --help.
+ # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+ # If ld does not provide *any* "supported emulations:"
+ # that means it is gnuoldld.
+ echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
+ test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+
+ case "${UNAME_MACHINE}" in
+ i?86)
+ VENDOR=pc;
+ ;;
+ *)
+ VENDOR=unknown;
+ ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ cat >$dummy.c <<EOF
+#include <features.h>
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __ELF__
+# ifdef __GLIBC__
+# if __GLIBC__ >= 2
+ printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+#else
+ printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ fi ;;
+# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
+# are messed up and put the nodename in both sysname and nodename.
+ i?86:DYNIX/ptx:4*:*)
+ echo i386-sequent-sysv4
+ exit 0 ;;
+ i?86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit 0 ;;
+ i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit 0 ;;
+ i?86:*:5:7*)
+ # Fixed at (any) Pentium or better
+ UNAME_MACHINE=i586
+ if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
+ echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ i?86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit 0 ;;
+ i?86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit 0 ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit 0 ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit 0 ;;
+ PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit 0 ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit 0 ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+ news*:NEWS-OS:*:6*)
+ echo mips-sony-newsos6
+ exit 0 ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Mac*OS:*:*)
+ echo powerpc-apple-macos${UNAME_RELEASE}
+ exit 0 ;;
+ *:Mac*OS:*:*)
+ echo ${UNAME_MACHINE}-apple-macos${UNAME_RELEASE}
+ exit 0 ;;
+ *:QNX:*:4*)
+ echo i386-qnx-qnx${UNAME_VERSION}
+ exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+ printf ("vax-dec-bsd\n"); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ esac
+fi
+
+#echo '(Unable to guess system type)' 1>&2
+
+exit 1
diff --git a/cesar/ecos/acsupport/config.sub b/cesar/ecos/acsupport/config.sub
new file mode 100755
index 0000000000..5d75624045
--- /dev/null
+++ b/cesar/ecos/acsupport/config.sub
@@ -0,0 +1,1250 @@
+#! /bin/sh
+# Configuration validation subroutine script, version 1.1.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Free Software Foundation, Inc.
+#
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Written by Per Bothner <bothner@cygnus.com>.
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+if [ x$1 = x ]
+then
+ echo Configuration name missing. 1>&2
+ echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
+ echo "or $0 ALIAS" 1>&2
+ echo where ALIAS is a recognized configuration type. 1>&2
+ exit 1
+fi
+
+# First pass through any local machine types.
+case $1 in
+ *local*)
+ echo $1
+ exit 0
+ ;;
+ *)
+ ;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ linux-gnu*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
+ | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
+ | 580 | i960 | h8300 \
+ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
+ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
+ | alphaev6[78] \
+ | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
+ | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
+ | mips64orion | mips64orionel | mipstx39 | mipstx39el \
+ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
+ | mips64vr5000 | miprs64vr5000el | mcore \
+ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
+ | thumb | d10v | fr30 | avr)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i[34567]86)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ # FIXME: clean up the formatting here.
+ vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
+ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
+ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
+ | xmp-* | ymp-* \
+ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
+ | alphaev6[78]-* \
+ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
+ | clipper-* | orion-* \
+ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
+ | mips64el-* | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
+ | mipstx39-* | mipstx39el-* | mcore-* \
+ | f301-* | armv*-* | s390-* | sv1-* | t3e-* \
+ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
+ | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-cbm
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-cbm
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-cbm
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ cray2)
+ basic_machine=cray2-cray
+ os=-unicos
+ ;;
+ [ctj]90-cray)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i[34567]86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i[34567]86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i[34567]86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i[34567]86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ i386-go32 | go32)
+ basic_machine=i386-unknown
+ os=-go32
+ ;;
+ i386-mingw32 | mingw32)
+ basic_machine=i386-unknown
+ os=-mingw32
+ ;;
+ i386-qnx | qnx)
+ basic_machine=i386-qnx
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mipsel*-linux*)
+ basic_machine=mipsel-unknown
+ os=-linux-gnu
+ ;;
+ mips*-linux*)
+ basic_machine=mips-unknown
+ os=-linux-gnu
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ mmix*)
+ basic_machine=mmix-knuth
+ os=-mmixware
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ msdos)
+ basic_machine=i386-unknown
+ os=-msdos
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pentium | p5 | k5 | k6 | nexen)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexen-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=rs6000-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sparclite-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=t3e-cray
+ os=-unicos
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xmp)
+ basic_machine=xmp-cray
+ os=-unicos
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ mips)
+ if [ x$os = x-linux-gnu ]; then
+ basic_machine=mips-unknown
+ else
+ basic_machine=mips-mips
+ fi
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sparc | sparcv9)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ c4x*)
+ basic_machine=c4x-none
+ os=-coff
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -qnx)
+ os=-qnx4
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -*MiNT)
+ os=-mint
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f301-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -vxsim* | -vxworks*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -*MiNT)
+ vendor=atari
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
diff --git a/cesar/ecos/acsupport/install-sh b/cesar/ecos/acsupport/install-sh
new file mode 100755
index 0000000000..e9de23842d
--- /dev/null
+++ b/cesar/ecos/acsupport/install-sh
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission. M.I.T. makes no representations about the
+# suitability of this software for any purpose. It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+else
+ true
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d $dst ]; then
+ instcmd=:
+ chmodcmd=""
+ else
+ instcmd=mkdir
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f $src -o -d $src ]
+ then
+ true
+ else
+ echo "install: $src does not exist"
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "install: no destination specified"
+ exit 1
+ else
+ true
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d $dst ]
+ then
+ dst="$dst"/`basename $src`
+ else
+ true
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp="${pathcomp}${1}"
+ shift
+
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $mkdirprog "${pathcomp}"
+ else
+ true
+ fi
+
+ pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd $dst &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ dstfile=`basename $dst $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ true
+ fi
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd $src $dsttmp &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+
+fi &&
+
+
+exit 0
diff --git a/cesar/ecos/acsupport/ltconfig b/cesar/ecos/acsupport/ltconfig
new file mode 100755
index 0000000000..ab304fd3b7
--- /dev/null
+++ b/cesar/ecos/acsupport/ltconfig
@@ -0,0 +1,2822 @@
+#! /bin/sh
+
+# ltconfig - Create a system-specific libtool.
+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# A lot of this script is taken from autoconf-2.10.
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+echo=echo
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit 0
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+ # Yippee, $echo works!
+ :
+else
+ # Restart under the correct shell.
+ exec "$SHELL" "$0" --no-reexec ${1+"$@"}
+fi
+
+# Find the correct PATH separator. Usually this is `:', but
+# DJGPP uses `;' like DOS.
+if test "X${PATH_SEPARATOR+set}" != "Xset"; then
+ UNAME=${UNAME-`uname 2>/dev/null`}
+ case X$UNAME in
+ *-DOS) PATH_SEPARATOR=';' ;;
+ *) PATH_SEPARATOR=':' ;;
+ esac
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
+
+if test "X${echo_test_string+set}" != "Xset"; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if (echo_test_string="`eval $cmd`") 2>/dev/null &&
+ echo_test_string="`eval $cmd`" &&
+ (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
+ break
+ fi
+ done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
+ test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for dir in $PATH /usr/ucb; do
+ if test -f $dir/echo &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ echo="$dir/echo"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ if test "X$echo" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ echo='print -r'
+ elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running ltconfig again with it.
+ ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ echo='printf "%s\n"'
+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ echo="$CONFIG_SHELL $0 --fallback-echo"
+ elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ echo="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ echo=echo
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# The name of this program.
+progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
+
+# Constants:
+PROGRAM=ltconfig
+PACKAGE=libtool
+VERSION=1.2f
+TIMESTAMP=" (1.385 1999/03/15 17:24:54)"
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
+rm="rm -f"
+
+help="Try \`$progname --help' for more information."
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+enable_shared=yes
+# All known linkers require a `.a' archive for static linking.
+enable_static=yes
+enable_fast_install=yes
+enable_dlopen=unknown
+ltmain=
+silent=
+srcdir=
+ac_config_guess=
+ac_config_sub=
+host=
+nonopt=
+ofile="$default_ofile"
+verify_host=yes
+with_gcc=no
+with_gnu_ld=no
+need_locks=yes
+ac_ext=c
+objext=o
+libext=a
+cache_file=
+
+old_AR="$AR"
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+old_CPPFLAGS="$CPPFLAGS"
+old_LD="$LD"
+old_LN_S="$LN_S"
+old_NM="$NM"
+old_RANLIB="$RANLIB"
+old_DLLTOOL="$DLLTOOL"
+old_AS="$AS"
+
+# Parse the command line options.
+args=
+prev=
+for option
+do
+ case "$option" in
+ -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ eval "$prev=\$option"
+ prev=
+ continue
+ fi
+
+ case "$option" in
+ --help) cat <<EOM
+Usage: $progname [OPTION]... [HOST [LTMAIN]]
+
+Generate a system-specific libtool script.
+
+ --debug enable verbose shell tracing
+ --disable-shared do not build shared libraries
+ --disable-static do not build static libraries
+ --disable-fast-install do not optimize for fast installation
+ --enable-dlopen enable dlopen support
+ --enable-dlopen-self enable support for dlopening programs
+ --help display this help and exit
+ --no-verify do not verify that HOST is a valid host type
+-o, --output=FILE specify the output file [default=$default_ofile]
+ --quiet same as \`--silent'
+ --silent do not print informational messages
+ --srcdir=DIR find \`config.guess' in DIR
+ --version output version information and exit
+ --with-gcc assume that the GNU C compiler will be used
+ --with-gnu-ld assume that the C compiler uses the GNU linker
+ --disable-lock disable file locking
+ --cache-file=FILE configure cache file
+
+LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
+that provides basic libtool functionality.
+
+HOST is the canonical host system name [default=guessed].
+EOM
+ exit 0
+ ;;
+
+ --debug)
+ echo "$progname: enabling shell trace mode"
+ set -x
+ ;;
+
+ --disable-shared) enable_shared=no ;;
+
+ --disable-static) enable_static=no ;;
+
+ --disable-fast-install) enable_fast_install=no ;;
+
+ --enable-dlopen) enable_dlopen=yes ;;
+
+ --quiet | --silent) silent=yes ;;
+
+ --srcdir) prev=srcdir ;;
+ --srcdir=*) srcdir="$optarg" ;;
+
+ --no-verify) verify_host=no ;;
+
+ --output | -o) prev=ofile ;;
+ --output=*) ofile="$optarg" ;;
+
+ --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
+
+ --with-gcc) with_gcc=yes ;;
+ --with-gnu-ld) with_gnu_ld=yes ;;
+
+ --disable-lock) need_locks=no ;;
+
+ --cache-file=*) cache_file="$optarg" ;;
+
+ -*)
+ echo "$progname: unrecognized option \`$option'" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ ;;
+
+ *)
+ if test -z "$ltmain"; then
+ ltmain="$option"
+ elif test -z "$host"; then
+# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
+# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
+# echo "$progname: warning \`$option' is not a valid host type" 1>&2
+# fi
+ host="$option"
+ else
+ echo "$progname: too many arguments" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ fi ;;
+ esac
+done
+
+if test -z "$ltmain"; then
+ echo "$progname: you must specify a LTMAIN file" 1>&2
+ echo "$help" 1>&2
+ exit 1
+fi
+
+if test ! -f "$ltmain"; then
+ echo "$progname: \`$ltmain' does not exist" 1>&2
+ echo "$help" 1>&2
+ exit 1
+fi
+
+# Quote any args containing shell metacharacters.
+ltconfig_args=
+for arg
+do
+ case "$arg" in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ltconfig_args="$ltconfig_args '$arg'" ;;
+ *) ltconfig_args="$ltconfig_args $arg" ;;
+ esac
+done
+
+# A relevant subset of AC_INIT.
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 5 compiler messages saved in config.log
+# 6 checking for... messages and results
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>>./config.log
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+
+if test -n "$cache_file" && test -r "$cache_file"; then
+ echo "loading cache $cache_file within ltconfig"
+ . $cache_file
+fi
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+if test -z "$srcdir"; then
+ # Assume the source directory is the same one as the path to LTMAIN.
+ srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
+ test "$srcdir" = "$ltmain" && srcdir=.
+fi
+
+trap "$rm conftest*; exit 1" 1 2 15
+if test "$verify_host" = yes; then
+ # Check for config.guess and config.sub.
+ ac_aux_dir=
+ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/config.guess; then
+ ac_aux_dir=$ac_dir
+ break
+ fi
+ done
+ if test -z "$ac_aux_dir"; then
+ echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
+ echo "$help" 1>&2
+ exit 1
+ fi
+ ac_config_guess=$ac_aux_dir/config.guess
+ ac_config_sub=$ac_aux_dir/config.sub
+
+ # Make sure we can run config.sub.
+ if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
+ else
+ echo "$progname: cannot run $ac_config_sub" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ fi
+
+ echo $ac_n "checking host system type""... $ac_c" 1>&6
+
+ host_alias=$host
+ case "$host_alias" in
+ "")
+ if host_alias=`$SHELL $ac_config_guess`; then :
+ else
+ echo "$progname: cannot guess host type; you must specify one" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ fi ;;
+ esac
+ host=`$SHELL $ac_config_sub $host_alias`
+ echo "$ac_t$host" 1>&6
+
+ # Make sure the host verified.
+ test -z "$host" && exit 1
+
+elif test -z "$host"; then
+ echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
+ echo "$help" 1>&2
+ exit 1
+else
+ host_alias=$host
+fi
+
+# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+case "$host_os" in
+linux-gnu*) ;;
+linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+esac
+
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+case "$host_os" in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "${COLLECT_NAMES+set}" != set; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR cru $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+# Set a sane default for `AR'.
+test -z "$AR" && AR=ar
+
+# If RANLIB is not set, then run the test.
+if test "${RANLIB+set}" != "set"; then
+ result=no
+
+ echo $ac_n "checking for ranlib... $ac_c" 1>&6
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/ranlib; then
+ RANLIB="ranlib"
+ result="ranlib"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ echo "$ac_t$result" 1>&6
+fi
+
+if test -n "$RANLIB"; then
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+fi
+
+# Set sane defaults for `DLLTOOL' and `AS', used on cygwin.
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$AS" && AS=as
+
+# Check to see if we are using GCC.
+if test "$with_gcc" != yes || test -z "$CC"; then
+ # If CC is not set, then try to find GCC or a usable CC.
+ if test -z "$CC"; then
+ echo $ac_n "checking for gcc... $ac_c" 1>&6
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for dir in $PATH; do
+ IFS="$save_ifs"
+ test -z "$dir" && dir=.
+ if test -f $dir/gcc; then
+ CC="gcc"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ if test -n "$CC"; then
+ echo "$ac_t$CC" 1>&6
+ else
+ echo "$ac_t"no 1>&6
+ fi
+ fi
+
+ # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
+ if test -z "$CC"; then
+ echo $ac_n "checking for cc... $ac_c" 1>&6
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ cc_rejected=no
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/cc; then
+ if test "$dir/cc" = "/usr/ucb/cc"; then
+ cc_rejected=yes
+ continue
+ fi
+ CC="cc"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test $cc_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same name, so the bogon will be chosen
+ # first if we set CC to just the name; use the full file name.
+ shift
+ set dummy "$dir/cc" "$@"
+ shift
+ CC="$@"
+ fi
+ fi
+
+ if test -n "$CC"; then
+ echo "$ac_t$CC" 1>&6
+ else
+ echo "$ac_t"no 1>&6
+ fi
+
+ if test -z "$CC"; then
+ echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
+ exit 1
+ fi
+ fi
+
+ # Now see if the compiler is really GCC.
+ with_gcc=no
+ echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
+ echo "$progname:564: checking whether we are using GNU C" >&5
+
+ $rm conftest.c
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+ if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ with_gcc=yes
+ fi
+ $rm conftest.c
+ echo "$ac_t$with_gcc" 1>&6
+fi
+
+# Allow CC to be a program name with arguments.
+set dummy $CC
+compiler="$2"
+
+echo $ac_n "checking for object suffix... $ac_c" 1>&6
+$rm conftest*
+echo 'int i = 1;' > conftest.c
+echo "$progname:586: checking for object suffix" >& 5
+if { (eval echo $progname:587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
+ # Append any warnings to the config.log.
+ cat conftest.err 1>&5
+
+ for ac_file in conftest.*; do
+ case $ac_file in
+ *.c) ;;
+ *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
+ esac
+ done
+else
+ cat conftest.err 1>&5
+ echo "$progname: failed program was:" >&5
+ cat conftest.c >&5
+fi
+$rm conftest*
+echo "$ac_t$objext" 1>&6
+
+echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
+pic_flag=
+special_shlib_compile_flags=
+wl=
+link_static_flag=
+no_builtin_flag=
+
+if test "$with_gcc" = yes; then
+ wl='-Wl,'
+ link_static_flag='-static'
+
+ case "$host_os" in
+ beos* | irix5* | irix6* | osf3* | osf4*)
+ # PIC is the default for these OSes.
+ ;;
+ aix*)
+ # Below there is a dirty hack to force normal static linking with -ldl
+ # The problem is because libdl dynamically linked with both libc and
+ # libC (AIX C++ library), which obviously doesn't included in libraries
+ # list by gcc. This cause undefined symbols with -static flags.
+ # This hack allows C programs to be linked with "-static -ldl", but
+ # we not sure about C++ programs.
+ link_static_flag="$link_static_flag ${wl}-lC"
+ ;;
+ cygwin* | mingw* | os2*)
+ # We can build DLLs from non-PIC.
+ ;;
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ pic_flag='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ *)
+ pic_flag='-fPIC'
+ ;;
+ esac
+else
+ # PORTME Check for PIC flags for the system compiler.
+ case "$host_os" in
+ aix3* | aix4*)
+ # All AIX code is PIC.
+ link_static_flag='-bnso -bI:/lib/syscalls.exp'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ # Is there a better link_static_flag that works with the bundled CC?
+ wl='-Wl,'
+ link_static_flag="${wl}-a ${wl}archive"
+ pic_flag='+Z'
+ ;;
+
+ irix5* | irix6*)
+ wl='-Wl,'
+ link_static_flag='-non_shared'
+ # PIC (with -KPIC) is the default.
+ ;;
+
+ cygwin* | mingw* | os2*)
+ # We can build DLLs from non-PIC.
+ ;;
+
+ osf3* | osf4*)
+ # All OSF/1 code is PIC.
+ wl='-Wl,'
+ link_static_flag='-non_shared'
+ ;;
+
+ sco3.2v5*)
+ pic_flag='-Kpic'
+ link_static_flag='-dn'
+ special_shlib_compile_flags='-belf'
+ ;;
+
+ solaris*)
+ pic_flag='-KPIC'
+ link_static_flag='-Bstatic'
+ wl='-Wl,'
+ ;;
+
+ sunos4*)
+ pic_flag='-PIC'
+ link_static_flag='-Bstatic'
+ wl='-Qoption ld '
+ ;;
+
+ sysv4.2uw2* | sysv4.3* | sysv5*)
+ pic_flag='-KPIC'
+ link_static_flag='-Bstatic'
+ wl='-Wl,'
+ ;;
+
+ uts4*)
+ pic_flag='-pic'
+ link_static_flag='-Bstatic'
+ ;;
+
+ *)
+ can_build_shared=no
+ ;;
+ esac
+fi
+
+if test -n "$pic_flag"; then
+ echo "$ac_t$pic_flag" 1>&6
+
+ # Check to make sure the pic_flag actually works.
+ echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
+ $rm conftest*
+ echo "int some_variable = 0;" > conftest.c
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $pic_flag -DPIC"
+ echo "$progname:717: checking if $compiler PIC flag $pic_flag works" >&5
+ if { (eval echo $progname:718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
+ # Append any warnings to the config.log.
+ cat conftest.err 1>&5
+
+ case "$host_os" in
+ hpux9* | hpux10* | hpux11*)
+ # On HP-UX, both CC and GCC only warn that PIC is supported... then they
+ # create non-PIC objects. So, if there were any warnings, we assume that
+ # PIC is not supported.
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ can_build_shared=no
+ pic_flag=
+ else
+ echo "$ac_t"yes 1>&6
+ pic_flag=" $pic_flag"
+ fi
+ ;;
+ *)
+ echo "$ac_t"yes 1>&6
+ pic_flag=" $pic_flag"
+ ;;
+ esac
+ else
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ can_build_shared=no
+ pic_flag=
+ echo "$ac_t"no 1>&6
+ fi
+ CFLAGS="$save_CFLAGS"
+ $rm conftest*
+else
+ echo "$ac_t"none 1>&6
+fi
+
+# Check to see if options -o and -c are simultaneously supported by compiler
+echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
+$rm conftest*
+echo "int some_variable = 0;" > conftest.c
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -c -o conftest2.o"
+echo "$progname:760: checking if $compiler supports -c -o file.o" >&5
+if { (eval echo $progname:761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest2.o; then
+
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ compiler_c_o=no
+ else
+ echo "$ac_t"yes 1>&6
+ compiler_c_o=yes
+ fi
+else
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ compiler_c_o=no
+ echo "$ac_t"no 1>&6
+fi
+CFLAGS="$save_CFLAGS"
+$rm conftest*
+
+if test x"$compiler_c_o" = x"yes"; then
+ # Check to see if we can write to a .lo
+ echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
+ $rm conftest*
+ echo "int some_variable = 0;" > conftest.c
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -c -o conftest.lo"
+ echo "$progname:788: checking if $compiler supports -c -o file.lo" >&5
+if { (eval echo $progname:789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
+
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ compiler_o_lo=no
+ else
+ echo "$ac_t"yes 1>&6
+ compiler_o_lo=yes
+ fi
+ else
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ compiler_o_lo=no
+ echo "$ac_t"no 1>&6
+ fi
+ CFLAGS="$save_CFLAGS"
+ $rm conftest*
+else
+ compiler_o_lo=no
+fi
+
+# Check to see if we can do hard links to lock some files if needed
+hard_links="nottested"
+if test "$compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
+ hard_links=yes
+ $rm conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ echo "$ac_t$hard_links" 1>&6
+ $rm conftest*
+ if test "$hard_links" = no; then
+ echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+if test "$with_gcc" = yes; then
+ # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
+ echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
+ $rm conftest*
+ echo "int some_variable = 0;" > conftest.c
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
+ echo "$progname:840: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+ if { (eval echo $progname:841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
+
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ compiler_rtti_exceptions=no
+ else
+ echo "$ac_t"yes 1>&6
+ compiler_rtti_exceptions=yes
+ fi
+ else
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ compiler_rtti_exceptions=no
+ echo "$ac_t"no 1>&6
+ fi
+ CFLAGS="$save_CFLAGS"
+ $rm conftest*
+
+ if test "$compiler_rtti_exceptions" = "yes"; then
+ no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
+ else
+ no_builtin_flag=' -fno-builtin'
+ fi
+
+fi
+
+# Check for any special shared library compilation flags.
+if test -n "$special_shlib_compile_flags"; then
+ echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
+ if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then :
+ else
+ echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
+ can_build_shared=no
+ fi
+fi
+
+echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
+$rm conftest*
+echo 'main(){return(0);}' > conftest.c
+save_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS $link_static_flag"
+echo "$progname:884: checking if $compiler static flag $link_static_flag works" >&5
+if { (eval echo $progname:885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ echo "$ac_t$link_static_flag" 1>&6
+else
+ echo "$ac_t"none 1>&6
+ link_static_flag=
+fi
+LDFLAGS="$save_LDFLAGS"
+$rm conftest*
+
+if test -z "$LN_S"; then
+ # Check to see if we can use ln -s, or we need hard links.
+ echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
+ $rm conftestdata
+ if ln -s X conftestdata 2>/dev/null; then
+ $rm conftestdata
+ LN_S="ln -s"
+ else
+ LN_S=ln
+ fi
+ if test "$LN_S" = "ln -s"; then
+ echo "$ac_t"yes 1>&6
+ else
+ echo "$ac_t"no 1>&6
+ fi
+fi
+
+# Make sure LD is an absolute path.
+if test -z "$LD"; then
+ ac_prog=ld
+ if test "$with_gcc" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
+ echo "$progname:917: checking for ld used by GCC" >&5
+ ac_prog=`($CC -print-prog-name=ld) 2>&5`
+ case "$ac_prog" in
+ # Accept absolute paths.
+ /* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we are not using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+ elif test "$with_gnu_ld" = yes; then
+ echo $ac_n "checking for GNU ld... $ac_c" 1>&6
+ echo "$progname:941: checking for GNU ld" >&5
+ else
+ echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+ echo "$progname:944: checking for non-GNU ld" >&5
+ fi
+
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog"; then
+ LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ fi
+
+ if test -n "$LD"; then
+ echo "$ac_t$LD" 1>&6
+ else
+ echo "$ac_t"no 1>&6
+ fi
+
+ if test -z "$LD"; then
+ echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
+ exit 1
+ fi
+fi
+
+# Check to see if it really is or is not GNU ld.
+echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
+# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+echo "$ac_t$with_gnu_ld" 1>&6
+
+# See if the linker supports building shared libraries.
+echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
+
+allow_undefined_flag=
+no_undefined_flag=
+need_lib_prefix=unknown
+need_version=unknown
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+archive_cmds=
+archive_expsym_cmds=
+old_archive_from_new_cmds=
+export_dynamic_flag_spec=
+whole_archive_flag_spec=
+thread_safe_flag_spec=
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+hardcode_shlibpath_var=unsupported
+runpath_var=
+always_export_symbols=no
+export_symbols_cmds='$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+# include_expsyms should be a list of space-separated symbols to be *always*
+# included in the symbol list
+include_expsyms=
+# exclude_expsyms can be an egrep regular expression of symbols to exclude
+# it will be wrapped by ` (' and `)$', so one must not match beginning or
+# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+# as well as any symbol that contains `d'.
+exclude_expsyms=
+
+case "$host_os" in
+cygwin* | mingw*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$with_gcc" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+
+freebsd2* | sunos4*)
+ exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+ ;;
+
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # See if GNU ld supports shared libraries.
+ case "$host_os" in
+ aix3* | aix4*)
+ # On AIX, the GNU linker is very broken
+ ld_shlibs=no
+ cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+ ;;
+
+ amigaos*)
+ archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+
+ # Extract the symbol export list from an `--export-all' def file,
+ # then regenerate the def file from the symbol export list, so that
+ # the compiled dll only exports the symbol export list.
+ export_symbols_cmds='rm -f $objdir/$soname-ltdll.c~
+ sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
+ (cd $objdir && $CC -c $soname-ltdll.c)~
+ $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs~
+ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
+
+ archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
+ _lt_hint=1;
+ for symbol in `cat $export_symbols`; do
+ echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
+ _lt_hint=`expr 1 + \$_lt_hint`;
+ done~
+ $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
+ $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
+ $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
+
+ old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
+ ;;
+
+ *)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = yes; then
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case "$host_os" in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$with_gcc" = yes && test -z "$link_static_flag"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix4*)
+ allow_undefined_flag=
+ if test "$with_gcc" = yes; then
+ if strings `${CC} -print-prog-name=collect2` | \
+ grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ hardcode_direct=yes
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ fi
+ archive_cmds='$CC -shared ${wl}-bnoentry -o $objdir/$soname $libobjs $deplibs $linkopts'
+ else
+ always_export_symbols=yes
+ archive_expsym_cmds='$CC -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bM:SRE ${wl}-bnoentry'
+ hardcode_direct=yes
+ fi
+ hardcode_minus_L=yes
+ # Though LIBPATH variable hardcodes shlibpath into executable,
+ # it doesn't affect searching for -l* libraries; this confuses
+ # tests in mdemo.
+ hardcode_shlibpath_var=unsupported
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+
+ amigaos*)
+ archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+
+ cygwin* | mingw*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib /OUT:$oldlib$oldobjs'
+ fix_srcfile_path='`cygpath -w $srcfile`'
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
+ can_build_shared=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=no # verified on 2.2.6
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ archive_cmds='$rm $objdir/$soname~$LD -b +s +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib'
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10* | hpux11*)
+ archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ irix5* | irix6*)
+ if test "$with_gcc" = yes; then
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+ else
+ archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF
+ fi
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ openbsd*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
+ ;;
+
+ osf3* | osf4*)
+ if test "$with_gcc" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ sco3.2v5*)
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
+ hardcode_direct=yes
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sunos4*)
+ # Why do we need -Bstatic? To avoid inter-library dependencies, maybe...
+ if test "$with_gcc" = yes; then
+ # Use -fPIC here because libgcc is multilibbed
+ archive_cmds='$CC -shared ${wl}-Bstatic -fPIC -o $lib $libobjs $deplibs $linkopts'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ hardcode_direct=no
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=no
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=no
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=no
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ can_build_shared=no
+ ;;
+ esac
+fi
+echo "$ac_t$ld_shlibs" 1>&6
+
+if test -z "$NM"; then
+ echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
+ case "$NM" in
+ /* | [A-Za-z]:[/\\]*) ;; # Let the user override the test with a path.
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ NM="$ac_dir/nm -B"
+ break
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ NM="$ac_dir/nm -p"
+ break
+ else
+ NM=${NM="$ac_dir/nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$NM" && NM=nm
+ ;;
+ esac
+ echo "$ac_t$NM" 1>&6
+fi
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Transform the above into a raw symbol and a C symbol.
+symxfrm='\1 \2\3 \3'
+
+# Transform an extracted symbol line into a proper C declaration
+global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
+
+# Define system-specific variables.
+case "$host_os" in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*) # Its linker distinguishes data from code symbols
+ global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
+ ;;
+irix*)
+ symcode='[BCDEGRST]'
+ ;;
+solaris*)
+ symcode='[BDT]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
+ symcode='[ABCDGISTW]'
+fi
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Write the raw and C identifiers.
+ global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+ $rm conftest*
+ cat > conftest.c <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+ echo "$progname:1447: checking if global_symbol_pipe works" >&5
+ if { (eval echo $progname:1448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { echo "$progname:1451: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
+
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if egrep ' nm_test_var$' "$nlist" >/dev/null; then
+ if egrep ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<EOF > conftest.c
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+ # Now generate the symbol file.
+ eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
+
+ cat <<EOF >> conftest.c
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ lt_ptr_t address;
+}
+lt_preloaded_symbols[] =
+{
+EOF
+ sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
+ cat <<\EOF >> conftest.c
+ {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+ # Now try linking the two files.
+ mv conftest.$objext conftestm.$objext
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="conftestm.$objext"
+ CFLAGS="$CFLAGS$no_builtin_flag"
+ if { (eval echo $progname:1503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ pipe_works=yes
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.c >&5
+ fi
+ LIBS="$save_LIBS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.c >&5
+ fi
+ $rm conftest*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ global_symbol_pipe=
+ fi
+done
+echo "$ac_t$pipe_works" 1>&6
+
+if test -z "$global_symbol_pipe"; then
+ global_symbol_to_cdecl=
+fi
+
+# Check hardcoding attributes.
+echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" || \
+ test -n "$runpath_var"; then
+
+ # We can hardcode non-existant directories.
+ if test "$hardcode_direct" != no && \
+ test "$hardcode_minus_L" != no && \
+ test "$hardcode_shlibpath_var" != no; then
+
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+echo "$ac_t$hardcode_action" 1>&6
+
+
+reload_flag=
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
+# PORTME Some linkers may need a different reload flag.
+reload_flag='-r'
+echo "$ac_t$reload_flag" 1>&6
+test -n "$reload_flag" && reload_flag=" $reload_flag"
+
+# PORTME Fill in your ld.so characteristics
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+file_magic_cmd=
+file_magic_test_file=
+deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [regex]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given egrep regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
+case "$host_os" in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}.so$major'
+ ;;
+
+aix4*)
+ version_type=linux
+ # AIX has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ # We preserve .a as extension for shared libraries though AIX4.2
+ # and later linker supports .so
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
+ shlibpath_var=LIBPATH
+ deplibs_check_method=pass_all
+ ;;
+
+amigaos*)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
+ ;;
+
+beos*)
+ library_names_spec='${libname}.so'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi4*)
+ version_type=linux
+ library_names_spec='${libname}.so$major ${libname}.so'
+ soname_spec='${libname}.so'
+ finish_cmds='PATH="$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ deplibs_check_method='file_magic ELF 32-bit LSB shared object'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=/shlib/libc.so
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw*)
+ version_type=windows
+ if test "$with_gcc" = yes; then
+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
+ else
+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
+ fi
+ dynamic_linker='Win32 ld.exe'
+ deplibs_check_method='file_magic file format pei*-i386.*architecture: i386'
+ file_magic_cmd='objdump -f'
+ need_lib_prefix=no
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ version_type=freebsd-$objformat
+ case "$version_type" in
+ freebsd-elf*)
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /usr/lib/libc.so*`
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ deplibs_check_method=unknown
+ library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
+ need_version=yes
+ ;;
+ esac
+ finish_cmds='PATH="$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+gnu*)
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ dynamic_linker="$host_os dld.sl"
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_var=SHLIB_PATH
+ library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
+ soname_spec='${libname}${release}.sl$major'
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+irix5*)
+ version_type=irix
+ soname_spec='${libname}${release}.so'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" # or should it be pass_all?
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /lib/libc.so*`
+ shlibpath_overrides_runpath=no
+ ;;
+
+irix6*)
+ version_type=irix
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}.so'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+ case "$LD" in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ # even though /usr/local/lib is always searched, the man-page says
+ # shared libraries should not be installed there if they use an ABI
+ # different from -32, so we'd better not search for shared libraries
+ # there either
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" # or should it be pass_all?
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux-gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+
+ if test -f /lib/ld.so.1; then
+ dynamic_linker='GNU ld.so'
+ else
+ # Only the GNU ld.so supports shared libraries on MkLinux.
+ case "$host_cpu" in
+ powerpc*) dynamic_linker=no ;;
+ *) dynamic_linker='Linux ld.so' ;;
+ esac
+ fi
+ ;;
+
+netbsd*)
+ version_type=sunos
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
+ soname_spec='${libname}${release}.so$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+openbsd*)
+ version_type=sunos
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ need_version=no
+ fi
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+os2*)
+ libname_spec='$name'
+ need_lib_prefix=no
+ library_names_spec='$libname.dll $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4*)
+ version_type=osf
+ soname_spec='${libname}${release}.so'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ # deplibs_check_method='pass_all'
+ # Although pass_all appears to work, it copies symbols from static libraries
+ # into shared ones and exports them. So, when a program is linked with two
+ # or more libraries that have got copies of the same symbols, link fails
+ # This was only tested on osf4:
+ deplibs_check_method='file_magic COFF format alpha shared library'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=/shlib/libc.so
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+sco3.2v5*)
+ version_type=osf
+ soname_spec='${libname}${release}.so$major'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib"
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=/lib/libc.so
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4.2uw2* | sysv4.3* | sysv5*)
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case "$host_vendor" in
+ ncr)
+ deplibs_check_method='pass_all'
+ ;;
+ esac
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+echo "$ac_t$dynamic_linker" 1>&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+# Report the final consequences.
+echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
+
+if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
+ case "$deplibs_check_method" in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ egrep "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+fi
+
+echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+aix4*)
+ test "$enable_shared" = yes && enable_static=no
+ ;;
+esac
+
+echo "$ac_t$enable_shared" 1>&6
+
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+
+echo "checking whether to build static libraries... $enable_static" 1>&6
+
+if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+echo $ac_n "checking for objdir... $ac_c" 1>&6
+rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+echo "$ac_t$objdir" 1>&6
+
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
+ lt_cv_dlopen=no lt_cv_dlopen_libs=
+echo $ac_n "checking for dlopen""... $ac_c" 1>&6
+echo "$progname:1977: checking for dlopen" >&5
+if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1982 "ltconfig"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlopen(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+dlopen();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo $progname:2004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_dlopen=yes"
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_dlopen=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="dlopen"
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+echo "$progname:2022: checking for dlopen in -ldl" >&5
+ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2030 "ltconfig"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen();
+
+int main() {
+dlopen()
+; return 0; }
+EOF
+if { (eval echo $progname:2040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
+echo "$progname:2059: checking for dld_link in -ldld" >&5
+ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldld $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2067 "ltconfig"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dld_link();
+
+int main() {
+dld_link()
+; return 0; }
+EOF
+if { (eval echo $progname:2077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for shl_load""... $ac_c" 1>&6
+echo "$progname:2096: checking for shl_load" >&5
+if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2101 "ltconfig"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shl_load(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+shl_load();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo $progname:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_shl_load=yes"
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_shl_load=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="shl_load"
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for LoadLibrary""... $ac_c" 1>&6
+echo "$progname:2141: checking for LoadLibrary" >&5
+if eval "test \"`echo '$''{'ac_cv_func_LoadLibrary'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2146 "ltconfig"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char LoadLibrary(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char LoadLibrary();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_LoadLibrary) || defined (__stub___LoadLibrary)
+choke me
+#else
+LoadLibrary();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo $progname:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_LoadLibrary=yes"
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_LoadLibrary=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'LoadLibrary`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="LoadLibrary"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+fi
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ fi
+
+ case "$lt_cv_dlopen" in
+ dlopen)
+for ac_hdr in dlfcn.h; do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "$progname:2210: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2215 "ltconfig"
+#include <$ac_hdr>
+int fnord = 0;
+EOF
+ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo $progname:2220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ if test "x$ac_cv_header_dlfcn_h" = xyes; then
+ CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+ fi
+ eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
+echo "$progname:2248: checking whether a program can dlopen itself" >&5
+if test "${lt_cv_dlopen_self+set}" = set; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ lt_cv_dlopen_self=cross
+ else
+ cat > conftest.c <<EOF
+#line 2256 "ltconfig"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LTDL_GLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LTDL_GLOBAL DL_GLOBAL
+# else
+# define LTDL_GLOBAL 0
+# endif
+#endif
+
+/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LTDL_LAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LTDL_LAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LTDL_LAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LTDL_LAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LTDL_LAZY_OR_NOW DL_NOW
+# else
+# define LTDL_LAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+fnord() { int i=42;}
+main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
+ if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
+ if(ptr1 || ptr2) exit(0); } exit(1); }
+
+EOF
+if { (eval echo $progname:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ lt_cv_dlopen_self=yes
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ lt_cv_dlopen_self=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$lt_cv_dlopen_self" 1>&6
+
+ if test "$lt_cv_dlopen_self" = yes; then
+ LDFLAGS="$LDFLAGS $link_static_flag"
+ echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
+echo "$progname:2321: checking whether a statically linked program can dlopen itself" >&5
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ lt_cv_dlopen_self_static=cross
+ else
+ cat > conftest.c <<EOF
+#line 2329 "ltconfig"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LTDL_GLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LTDL_GLOBAL DL_GLOBAL
+# else
+# define LTDL_GLOBAL 0
+# endif
+#endif
+
+/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LTDL_LAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LTDL_LAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LTDL_LAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LTDL_LAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LTDL_LAZY_OR_NOW DL_NOW
+# else
+# define LTDL_LAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+fnord() { int i=42;}
+main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
+ if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
+ if(ptr1 || ptr2) exit(0); } exit(1); }
+
+EOF
+if { (eval echo $progname:2375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ lt_cv_dlopen_self_static=yes
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ lt_cv_dlopen_self_static=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
+fi
+ ;;
+ esac
+
+ case "$lt_cv_dlopen_self" in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case "$lt_cv_dlopen_self_static" in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+# Copy echo and quote the copy, instead of the original, because it is
+# used later.
+ltecho="$echo"
+if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ ltecho="$CONFIG_SHELL \$0 --fallback-echo"
+fi
+LTSHELL="$SHELL"
+
+LTCONFIG_VERSION="$VERSION"
+
+# Only quote variables if we're using ltmain.sh.
+case "$ltmain" in
+*.sh)
+ # Now quote all the things that may contain metacharacters.
+ for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
+ old_LN_S old_DLLTOOL old_AS AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
+ reload_flag reload_cmds wl \
+ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
+ thread_safe_flag_spec whole_archive_flag_spec libname_spec \
+ library_names_spec soname_spec \
+ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
+ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \
+ file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \
+ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
+ hardcode_libdir_flag_spec hardcode_libdir_separator \
+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
+
+ case "$var" in
+ reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
+ old_postinstall_cmds | old_postuninstall_cmds | \
+ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
+ postinstall_cmds | postuninstall_cmds | \
+ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+ # Double-quote double-evaled strings.
+ eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+ ;;
+ *)
+ eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+ ;;
+ esac
+ done
+
+ case "$ltecho" in
+ *'\$0 --fallback-echo"')
+ ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+ ;;
+ esac
+
+ trap "$rm \"$ofile\"; exit 1" 1 2 15
+ echo "creating $ofile"
+ $rm "$ofile"
+ cat <<EOF > "$ofile"
+#! $SHELL
+
+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
+#
+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="sed -e s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
+
+### BEGIN LIBTOOL CONFIG
+EOF
+ cfgfile="$ofile"
+ ;;
+
+*)
+ # Double-quote the variables that need it (for aesthetics).
+ for var in old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
+ old_LN_S old_DLLTOOL old_AS; do
+ eval "$var=\\\"\$var\\\""
+ done
+
+ # Just create a config file.
+ cfgfile="$ofile.cfg"
+ trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+ echo "creating $cfgfile"
+ $rm "$cfgfile"
+ cat <<EOF > "$cfgfile"
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+EOF
+ ;;
+esac
+
+cat <<EOF >> "$cfgfile"
+# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
+# LD=$old_LD NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
+# DLLTOOL="$old_DLLTOOL" AS="$old_AS" \\
+# $0$ltconfig_args
+#
+# Compiler and other test output produced by $progname, useful for
+# debugging $progname, is in ./config.log if it exists.
+
+# The version of $progname that generated this script.
+LTCONFIG_VERSION=$LTCONFIG_VERSION
+
+# Shell to use when invoking shell scripts.
+SHELL=$LTSHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$ltecho
+
+# The archiver.
+AR=$AR
+
+# The default C compiler.
+CC=$CC
+
+# The linker used to build libraries.
+LD=$LD
+
+# Whether we need hard or soft links.
+LN_S=$LN_S
+
+# A BSD-compatible nm program.
+NM=$NM
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$reload_flag
+reload_cmds=$reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$wl
+
+# Object file suffix (normally "o").
+objext="$objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$pic_flag
+
+# Does compiler simultaneously support -c and -o options
+compiler_c_o=$compiler_c_o
+
+# Can we write directly to a .lo ?
+compiler_o_lo=$compiler_o_lo
+
+# Must we lock files when doing compilation ?
+need_locks=$need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$link_static_flag
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$no_builtin_flag
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$whole_archive_flag_spec
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$thread_safe_flag_spec
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$RANLIB
+old_archive_cmds=$old_archive_cmds
+old_postinstall_cmds=$old_postinstall_cmds
+old_postuninstall_cmds=$old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$old_archive_from_new_cmds
+
+# Commands used to build and install a shared archive.
+archive_cmds=$archive_cmds
+archive_expsym_cmds=$archive_expsym_cmds
+postinstall_cmds=$postinstall_cmds
+postuninstall_cmds=$postuninstall_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic
+file_magic_cmd=$file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$allow_undefined_flag
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$no_undefined_flag
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$global_symbol_to_cdecl
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$hardcode_libdir_separator
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path"
+
+# Set to yes if exported symbols are required
+always_export_symbols=$always_export_symbols
+
+# The command to extract exported symbols
+export_symbols_cmds=$export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols
+exclude_expsyms=$exclude_expsyms
+
+# Symbols that must always be exported
+include_expsyms=$include_expsyms
+
+EOF
+
+case "$ltmain" in
+*.sh)
+ echo '### END LIBTOOL CONFIG' >> "$ofile"
+ echo >> "$ofile"
+ case "$host_os" in
+ aix3*)
+ cat <<\EOF >> "$ofile"
+
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "${COLLECT_NAMES+set}" != set; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+EOF
+ ;;
+ esac
+
+ # Append the ltmain.sh script.
+ cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
+
+ chmod +x "$ofile"
+ ;;
+
+*)
+ # Compile the libtool program.
+ echo "FIXME: would compile $ltmain"
+ ;;
+esac
+
+test -n "$cache_file" || exit 0
+
+# AC_CACHE_SAVE
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+exit 0
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/cesar/ecos/acsupport/ltmain.sh b/cesar/ecos/acsupport/ltmain.sh
new file mode 100644
index 0000000000..bfc7e9d7ad
--- /dev/null
+++ b/cesar/ecos/acsupport/ltmain.sh
@@ -0,0 +1,3779 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun ltconfig.
+#
+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit 0
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+ # Yippee, $echo works!
+ :
+else
+ # Restart under the correct shell, and then maybe $echo will work.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+# The name of this program.
+progname=`$echo "$0" | sed 's%^.*/%%'`
+modename="$progname"
+
+# Constants.
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.2f
+TIMESTAMP=" (1.385 1999/03/15 17:24:54)"
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+SP2NL='tr \040 \012'
+NL2SP='tr \012 \040'
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" = set; then
+ save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+ save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+if test "$LTCONFIG_VERSION" != "$VERSION"; then
+ echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit 1
+fi
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ echo "$modename: not configured to build any kind of library" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit 1
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+lo2o="s/\\.lo\$/.${objext}/"
+
+# Parse our command line options once, thoroughly.
+while test $# -gt 0
+do
+ arg="$1"
+ shift
+
+ case "$arg" in
+ -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case "$prev" in
+ execute_dlfiles)
+ eval "$prev=\"\$$prev \$arg\""
+ ;;
+ *)
+ eval "$prev=\$arg"
+ ;;
+ esac
+
+ prev=
+ prevopt=
+ continue
+ fi
+
+ # Have we seen a non-optional argument yet?
+ case "$arg" in
+ --help)
+ show_help=yes
+ ;;
+
+ --version)
+ echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+ exit 0
+ ;;
+
+ --config)
+ sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
+ exit 0
+ ;;
+
+ --debug)
+ echo "$progname: enabling shell trace mode"
+ set -x
+ ;;
+
+ --dry-run | -n)
+ run=:
+ ;;
+
+ --features)
+ echo "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+ exit 0
+ ;;
+
+ --finish) mode="finish" ;;
+
+ --mode) prevopt="--mode" prev=mode ;;
+ --mode=*) mode="$optarg" ;;
+
+ --quiet | --silent)
+ show=:
+ ;;
+
+ -dlopen)
+ prevopt="-dlopen"
+ prev=execute_dlfiles
+ ;;
+
+ -*)
+ $echo "$modename: unrecognized option \`$arg'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+
+ *)
+ nonopt="$arg"
+ break
+ ;;
+ esac
+done
+
+if test -n "$prevopt"; then
+ $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+fi
+
+if test -z "$show_help"; then
+
+ # Infer the operation mode.
+ if test -z "$mode"; then
+ case "$nonopt" in
+ *cc | *++ | gcc* | *-gcc*)
+ mode=link
+ for arg
+ do
+ case "$arg" in
+ -c)
+ mode=compile
+ break
+ ;;
+ esac
+ done
+ ;;
+ *db | *dbx | *strace | *truss)
+ mode=execute
+ ;;
+ *install*|cp|mv)
+ mode=install
+ ;;
+ *rm)
+ mode=uninstall
+ ;;
+ *)
+ # If we have no mode, but dlfiles were specified, then do execute mode.
+ test -n "$execute_dlfiles" && mode=execute
+
+ # Just use the default operation mode.
+ if test -z "$mode"; then
+ if test -n "$nonopt"; then
+ $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+ else
+ $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+ fi
+ fi
+ ;;
+ esac
+ fi
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$execute_dlfiles" && test "$mode" != execute; then
+ $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$modename --help --mode=$mode' for more information."
+
+ # These modes are in order of execution frequency so that they run quickly.
+ case "$mode" in
+ # libtool compile mode
+ compile)
+ modename="$modename: compile"
+ # Get the compilation command and the source file.
+ base_compile=
+ lastarg=
+ srcfile="$nonopt"
+ suppress_output=
+
+ user_target=no
+ for arg
+ do
+ # Accept any command-line options.
+ case "$arg" in
+ -o)
+ if test "$user_target" != "no"; then
+ $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+ exit 1
+ fi
+ user_target=next
+ ;;
+
+ -static)
+ build_old_libs=yes
+ continue
+ ;;
+ esac
+
+ case "$user_target" in
+ next)
+ # The next one is the -o target name
+ user_target=yes
+ continue
+ ;;
+ yes)
+ # We got the output file
+ user_target=set
+ libobj="$arg"
+ continue
+ ;;
+ esac
+
+ # Accept the current argument as the source file.
+ lastarg="$srcfile"
+ srcfile="$arg"
+
+ # Aesthetically quote the previous argument.
+
+ # Backslashify any backslashes, double quotes, and dollar signs.
+ # These are the only characters that are still specially
+ # interpreted inside of double-quoted scrings.
+ lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+ # Double-quote args containing other shell metacharacters.
+ # Many Bourne shells cannot handle close brackets correctly in scan
+ # sets, so we specify it separately.
+ case "$lastarg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ lastarg="\"$lastarg\""
+ ;;
+ esac
+
+ # Add the previous argument to base_compile.
+ if test -z "$base_compile"; then
+ base_compile="$lastarg"
+ else
+ base_compile="$base_compile $lastarg"
+ fi
+ done
+
+ case "$user_target" in
+ set)
+ ;;
+ no)
+ # Get the name of the library object.
+ libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+ ;;
+ *)
+ $echo "$modename: you must specify a target with \`-o'" 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ xform='[cCFSfmso]'
+ case "$libobj" in
+ *.ada) xform=ada ;;
+ *.adb) xform=adb ;;
+ *.ads) xform=ads ;;
+ *.asm) xform=asm ;;
+ *.c++) xform=c++ ;;
+ *.cc) xform=cc ;;
+ *.cpp) xform=cpp ;;
+ *.cxx) xform=cxx ;;
+ *.f90) xform=f90 ;;
+ *.for) xform=for ;;
+ esac
+
+ libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+ case "$libobj" in
+ *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+ *)
+ $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+ exit 1
+ ;;
+ esac
+
+ if test -z "$base_compile"; then
+ $echo "$modename: you must specify a compilation command" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $libobj"
+ else
+ removelist="$libobj"
+ fi
+
+ $run $rm $removelist
+ trap "$run $rm $removelist; exit 1" 1 2 15
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ removelist="$removelist $output_obj $lockfile"
+ trap "$run $rm $removelist; exit 1" 1 2 15
+ else
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until ln "$0" "$lockfile" 2>/dev/null; do
+ $show "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+ echo $srcfile > "$lockfile"
+ fi
+
+ if test -n "$fix_srcfile_path"; then
+ eval srcfile=\"$fix_srcfile_path\"
+ fi
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ # All platforms use -DPIC, to notify preprocessed assembler code.
+ command="$base_compile $pic_flag -DPIC $srcfile"
+ if test "$build_old_libs" = yes; then
+ lo_libobj="$libobj"
+ dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$dir" = "X$libobj"; then
+ dir="$objdir"
+ else
+ dir="$dir/$objdir"
+ fi
+ libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+
+ if test -d "$dir"; then
+ $show "$rm $libobj"
+ $run $rm $libobj
+ else
+ $show "$mkdir $dir"
+ $run $mkdir $dir
+ status=$?
+ if test $status -ne 0 && test ! -d $dir; then
+ exit $status
+ fi
+ fi
+ fi
+ if test "$compiler_o_lo" = yes; then
+ output_obj="$libobj"
+ command="$command -o $output_obj"
+ elif test "$compiler_c_o" = yes; then
+ output_obj="$obj"
+ command="$command -o $output_obj"
+ fi
+
+ $show "$command"
+ if $run eval "$command"; then :
+ else
+ test -n "$output_obj" && $run $rm $removelist
+ exit 1
+ fi
+
+ if test "$need_locks" = warn &&
+ test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+ echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test x"$output_obj" != x"$libobj"; then
+ $show "$mv $output_obj $libobj"
+ if $run $mv $output_obj $libobj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # If we have no pic_flag, then copy the object into place and finish.
+ if test -z "$pic_flag" && test "$build_old_libs" = yes; then
+ # Rename the .lo from within objdir to obj
+ if test -f $obj; then
+ $show $rm $obj
+ $run $rm $obj
+ fi
+
+ $show "$mv $libobj $obj"
+ if $run $mv $libobj $obj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+
+ # Now arrange that obj and lo_libobj become the same file
+ $show "$LN_S $obj $lo_libobj"
+ if $run $LN_S $obj $lo_libobj; then
+ exit 0
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # Allow error messages only from the first compilation.
+ suppress_output=' >/dev/null 2>&1'
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ command="$base_compile $srcfile"
+ if test "$compiler_c_o" = yes; then
+ command="$command -o $obj"
+ output_obj="$obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ command="$command$suppress_output"
+ $show "$command"
+ if $run eval "$command"; then :
+ else
+ $run $rm $removelist
+ exit 1
+ fi
+
+ if test "$need_locks" = warn &&
+ test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+ echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+
+ # Just move the object if needed
+ if test x"$output_obj" != x"$obj"; then
+ $show "$mv $output_obj $obj"
+ if $run $mv $output_obj $obj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we do not
+ # accidentally link it into a program.
+ if test "$build_libtool_libs" != yes; then
+ $show "echo timestamp > $libobj"
+ $run eval "echo timestamp > \$libobj" || exit $?
+ else
+ # Move the .lo from within objdir
+ $show "$mv $libobj $lo_libobj"
+ if $run $mv $libobj $lo_libobj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+ fi
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ $rm "$lockfile"
+ fi
+
+ exit 0
+ ;;
+
+ # libtool link mode
+ link)
+ modename="$modename: link"
+ C_compiler="$CC" # save it, to compile generated C sources
+ CC="$nonopt"
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invokation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+
+ # This is a source program that is used to create dlls on Windows
+ # Don't remove nor modify the starting and closing comments
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+#
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+# __hDllInstance_base = hInst;
+# return TRUE;
+# }
+# /* ltdll.c ends here */
+ # This is a source program that is used to create import libraries
+ # on Windows for dlls which lack them. Don't remove nor modify the
+ # starting and closing comments
+# /* impgen.c starts here */
+# /* Copyright (C) 1999 Free Software Foundation, Inc.
+#
+# This file is part of GNU libtool.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# */
+#
+# #include <stdio.h> /* for printf() */
+# #include <unistd.h> /* for open(), lseek(), read() */
+# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
+# #include <string.h> /* for strdup() */
+#
+# static unsigned int
+# pe_get16 (fd, offset)
+# int fd;
+# int offset;
+# {
+# unsigned char b[2];
+# lseek (fd, offset, SEEK_SET);
+# read (fd, b, 2);
+# return b[0] + (b[1]<<8);
+# }
+#
+# static unsigned int
+# pe_get32 (fd, offset)
+# int fd;
+# int offset;
+# {
+# unsigned char b[4];
+# lseek (fd, offset, SEEK_SET);
+# read (fd, b, 4);
+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# static unsigned int
+# pe_as32 (ptr)
+# void *ptr;
+# {
+# unsigned char *b = ptr;
+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# int
+# main (argc, argv)
+# int argc;
+# char *argv[];
+# {
+# int dll;
+# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
+# unsigned long export_rva, export_size, nsections, secptr, expptr;
+# unsigned long name_rvas, nexp;
+# unsigned char *expdata, *erva;
+# char *filename, *dll_name;
+#
+# filename = argv[1];
+#
+# dll = open(filename, O_RDONLY|O_BINARY);
+# if (!dll)
+# return 1;
+#
+# dll_name = filename;
+#
+# for (i=0; filename[i]; i++)
+# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
+# dll_name = filename + i +1;
+#
+# pe_header_offset = pe_get32 (dll, 0x3c);
+# opthdr_ofs = pe_header_offset + 4 + 20;
+# num_entries = pe_get32 (dll, opthdr_ofs + 92);
+#
+# if (num_entries < 1) /* no exports */
+# return 1;
+#
+# export_rva = pe_get32 (dll, opthdr_ofs + 96);
+# export_size = pe_get32 (dll, opthdr_ofs + 100);
+# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
+# secptr = (pe_header_offset + 4 + 20 +
+# pe_get16 (dll, pe_header_offset + 4 + 16));
+#
+# expptr = 0;
+# for (i = 0; i < nsections; i++)
+# {
+# char sname[8];
+# unsigned long secptr1 = secptr + 40 * i;
+# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
+# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
+# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
+# lseek(dll, secptr1, SEEK_SET);
+# read(dll, sname, 8);
+# if (vaddr <= export_rva && vaddr+vsize > export_rva)
+# {
+# expptr = fptr + (export_rva - vaddr);
+# if (export_rva + export_size > vaddr + vsize)
+# export_size = vsize - (export_rva - vaddr);
+# break;
+# }
+# }
+#
+# expdata = (unsigned char*)malloc(export_size);
+# lseek (dll, expptr, SEEK_SET);
+# read (dll, expdata, export_size);
+# erva = expdata - export_rva;
+#
+# nexp = pe_as32 (expdata+24);
+# name_rvas = pe_as32 (expdata+32);
+#
+# printf ("EXPORTS\n");
+# for (i = 0; i<nexp; i++)
+# {
+# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
+# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
+# }
+#
+# return 0;
+# }
+# /* impgen.c ends here */
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ compile_command="$CC"
+ finalize_command="$CC"
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ linkopts=
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+ else
+ lib_search_path=
+ fi
+ # now prepend the system-specific ones
+ eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ avoid_version=no
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ link_against_libtool_libs=
+ ltlibs=
+ module=no
+ objs=
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case "$arg" in
+ -all-static | -static)
+ if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+ fi
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test $# -gt 0; do
+ arg="$1"
+ shift
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case "$prev" in
+ output)
+ compile_command="$compile_command @OUTPUT@"
+ finalize_command="$finalize_command @OUTPUT@"
+ ;;
+ esac
+
+ case "$prev" in
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ compile_command="$compile_command @SYMFILE@"
+ finalize_command="$finalize_command @SYMFILE@"
+ preload=yes
+ fi
+ case "$arg" in
+ *.la | *.lo) ;; # We handle these cases below.
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ dlprefiles="$dlprefiles $arg"
+ test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
+ prev=
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ if test ! -f "$arg"; then
+ $echo "$modename: symbol file \`$arg' does not exist"
+ exit 1
+ fi
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath)
+ rpath="$rpath $arg"
+ prev=
+ continue
+ ;;
+ xrpath)
+ xrpath="$xrpath $arg"
+ prev=
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi
+
+ prevarg="$arg"
+
+ case "$arg" in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ compile_command="$compile_command $link_static_flag"
+ finalize_command="$finalize_command $link_static_flag"
+ dlopen_self=$dlopen_self_static
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+ continue
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ if test "$export_dynamic" != yes; then
+ export_dynamic=yes
+ if test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ else
+ arg=
+ fi
+ fi
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ $echo "$modename: cannot have more than one -exported-symbols"
+ exit 1
+ fi
+ if test "$arg" = "-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -L*)
+ dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
+ case "$dir" in
+ /* | [A-Za-z]:[/\\]*)
+ # Add the corresponding hardcode_libdir_flag, if it is not identical.
+ ;;
+ *)
+ $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2
+ exit 1
+ ;;
+ esac
+ case " $deplibs " in
+ *" $arg "*) ;;
+ *) deplibs="$deplibs $arg";;
+ esac
+ case " $lib_search_path " in
+ *" $dir "*) ;;
+ *) lib_search_path="$lib_search_path $dir";;
+ esac
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
+ dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
+ case ":$dllsearchpath:" in
+ ::) dllsearchpath="$dllsearchdir";;
+ *":$dllsearchdir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$dllsearchdir";;
+ esac
+ ;;
+ esac
+ ;;
+
+ -l*)
+ deplibs="$deplibs $arg"
+ ;;
+
+ -module)
+ if test "$module" != yes; then
+ module=yes
+ if test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ else
+ arg=
+ fi
+ fi
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ xrpath="$xrpath "`$echo "X$arg" | $Xsed -e 's/^-R//'`
+ continue
+ ;;
+
+ -static)
+ # If we have no pic_flag, then this is the same as -all-static.
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ compile_command="$compile_command $link_static_flag"
+ finalize_command="$finalize_command $link_static_flag"
+ dlopen_self=$dlopen_self_static
+ fi
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case "$arg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ ;;
+
+ *.o | *.obj | *.a | *.lib)
+ # A standard object.
+ objs="$objs $arg"
+ ;;
+
+ *.lo)
+ # A library object.
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
+ prev=
+ fi
+ libobjs="$libobjs $arg"
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ dlname=
+ libdir=
+ library_names=
+ old_library=
+
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variable installed.
+ installed=yes
+
+ # If there is no directory component, then add one.
+ case "$arg" in
+ */* | *\\*) . $arg ;;
+ *) . ./$arg ;;
+ esac
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+
+ if test -z "$linklib"; then
+ $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
+ exit 1
+ fi
+
+ # Find the relevant object directory and library name.
+ name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
+
+ if test "X$installed" = Xyes; then
+ dir="$libdir"
+ else
+ dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$dir" = "X$arg"; then
+ dir="$objdir"
+ else
+ dir="$dir/$objdir"
+ fi
+ fi
+
+ if test -n "$dependency_libs"; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for deplib in $dependency_libs; do
+ case "$deplib" in
+ -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+ case " $rpath $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) xrpath="$xrpath $temp_xrpath";;
+ esac;;
+ -L*) case "$compile_command $temp_deplibs " in
+ *" $deplib "*) ;;
+ *) temp_deplibs="$temp_deplibs $deplib";;
+ esac;;
+ *) temp_deplibs="$temp_deplibs $deplib";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ if test -z "$libdir"; then
+ # It is a libtool convenience library, so add in its objects.
+ convenience="$convenience $dir/$old_library"
+ old_convenience="$old_convenience $dir/$old_library"
+ deplibs="$deplibs$dependency_libs"
+ compile_command="$compile_command $dir/$old_library$dependency_libs"
+ finalize_command="$finalize_command $dir/$old_library$dependency_libs"
+ continue
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking statically,
+ # we need to preload.
+ prev=dlprefiles
+ else
+ # We should not create a dependency on this library, but we
+ # may need any libraries it requires.
+ compile_command="$compile_command$dependency_libs"
+ finalize_command="$finalize_command$dependency_libs"
+ prev=
+ continue
+ fi
+ fi
+
+ # The library was specified with -dlpreopen.
+ if test "$prev" = dlprefiles; then
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ dlprefiles="$dlprefiles $dir/$old_library"
+ else
+ dlprefiles="$dlprefiles $dir/$linklib"
+ fi
+ prev=
+ fi
+
+ if test "$build_libtool_libs" = yes && test -n "$library_names"; then
+ link_against_libtool_libs="$link_against_libtool_libs $arg"
+ if test -n "$shlibpath_var"; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath " in
+ *" $dir "*) ;;
+ *) temp_rpath="$temp_rpath $dir" ;;
+ esac
+ fi
+
+ # We need an absolute path.
+ case "$dir" in
+ /* | [A-Za-z]:[/\\]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: cannot determine absolute directory name of \`$libdir'" 1>&2
+ exit 1
+ fi
+ ;;
+ esac
+
+ # This is the magic to use -rpath.
+ # Skip directories that are in the system default run-time
+ # search path, unless they have been requested with -R.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+
+ lib_linked=yes
+ case "$hardcode_action" in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ compile_command="$compile_command $dir/$linklib"
+ deplibs="$deplibs $dir/$linklib"
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
+ dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
+ if test -n "$dllsearchpath"; then
+ dllsearchpath="$dllsearchpath:$dllsearchdir"
+ else
+ dllsearchpath="$dllsearchdir"
+ fi
+ ;;
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case "$host" in
+ *-*-sunos*)
+ compile_shlibpath="$compile_shlibpath$dir:"
+ ;;
+ esac
+ case "$compile_command " in
+ *" -L$dir "*) ;;
+ *) compile_command="$compile_command -L$dir";;
+ esac
+ compile_command="$compile_command -l$name"
+ deplibs="$deplibs -L$dir -l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ case ":$compile_shlibpath:" in
+ *":$dir:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$dir:";;
+ esac
+ compile_command="$compile_command -l$name"
+ deplibs="$deplibs -l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+
+ relink)
+ if test "$hardcode_direct" = yes; then
+ compile_command="$compile_command $absdir/$linklib"
+ deplibs="$deplibs $absdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ case "$compile_command " in
+ *" -L$absdir "*) ;;
+ *) compile_command="$compile_command -L$absdir";;
+ esac
+ compile_command="$compile_command -l$name"
+ deplibs="$deplibs -L$absdir -l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case ":$compile_shlibpath:" in
+ *":$absdir:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$absdir:";;
+ esac
+ compile_command="$compile_command -l$name"
+ deplibs="$deplibs -l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+
+ *)
+ lib_linked=no
+ ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ $echo "$modename: configuration error: unsupported hardcode properties"
+ exit 1
+ fi
+
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes; then
+ finalize_command="$finalize_command $libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ case "$finalize_command " in
+ *" -L$libdir "*) ;;
+ *) finalize_command="$finalize_command -L$libdir";;
+ esac
+ finalize_command="$finalize_command -l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case ":$finalize_shlibpath:" in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:";;
+ esac
+ finalize_command="$finalize_command -l$name"
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ case "$finalize_command " in
+ *" -L$dir "*) ;;
+ *) finalize_command="$finalize_command -L$libdir";;
+ esac
+ finalize_command="$finalize_command -l$name"
+ fi
+ else
+ # Transform directly to old archives if we don't build new libraries.
+ if test -n "$pic_flag" && test -z "$old_library"; then
+ $echo "$modename: cannot find static library for \`$arg'" 1>&2
+ exit 1
+ fi
+
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_command="$compile_command $dir/$linklib"
+ finalize_command="$finalize_command $dir/$linklib"
+ else
+ case "$compile_command " in
+ *" -L$dir "*) ;;
+ *) compile_command="$compile_command -L$dir";;
+ esac
+ compile_command="$compile_command -l$name"
+ case "$finalize_command " in
+ *" -L$dir "*) ;;
+ *) finalize_command="$finalize_command -L$dir";;
+ esac
+ finalize_command="$finalize_command -l$name"
+ fi
+ fi
+
+ # Add in any libraries that this one depends upon.
+ compile_command="$compile_command$dependency_libs"
+ finalize_command="$finalize_command$dependency_libs"
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case "$arg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ ;;
+ esac
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ fi
+ done
+
+ if test -n "$prev"; then
+ $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+ libobjs_save="$libobjs"
+
+ case "$output" in
+ "")
+ $echo "$modename: you must specify an output file" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+
+ *.a | *.lib)
+ if test -n "$link_against_libtool_libs"; then
+ $echo "$modename: error: cannot link libtool libraries into archives" 1>&2
+ exit 1
+ fi
+
+ if test -n "$deplibs"; then
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+ fi
+
+ if test -n "$dlfiles$dlprefiles"; then
+ $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$rpath"; then
+ $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$xrpath"; then
+ $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$export_symbols"; then
+ $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+ fi
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ ;;
+
+ *.la)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case "$outputname" in
+ lib*)
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ if test "$module" = no; then
+ $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ eval libname=\"$libname_spec\"
+ else
+ libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ fi
+ ;;
+ esac
+
+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$output_objdir" = "X$output"; then
+ output_objdir="$objdir"
+ else
+ output_objdir="$output_objdir/$objdir"
+ fi
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ if test -n "$objs"; then
+ $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
+ exit 1
+ fi
+
+ # How the heck are we supposed to write a wrapper for a shared library?
+ if test -n "$link_against_libtool_libs"; then
+ $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
+ exit 1
+ fi
+
+ if test -n "$dlfiles$dlprefiles"; then
+ $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
+ fi
+
+ set dummy $rpath
+ if test $# -gt 2; then
+ $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+ fi
+ install_libdir="$2"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ libext=al
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+ dependency_libs="$deplibs"
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+ fi
+ else
+
+ # Parse the version information argument.
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ IFS="$save_ifs"
+
+ if test -n "$8"; then
+ $echo "$modename: too many parameters to \`-version-info'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ current="$2"
+ revision="$3"
+ age="$4"
+
+ # Check that each of the things are valid numbers.
+ case "$current" in
+ 0 | [1-9] | [1-9][0-9]*) ;;
+ *)
+ $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ case "$revision" in
+ 0 | [1-9] | [1-9][0-9]*) ;;
+ *)
+ $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ case "$age" in
+ 0 | [1-9] | [1-9][0-9]*) ;;
+ *)
+ $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ if test $age -gt $current; then
+ $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case "$version_type" in
+ none) ;;
+
+ irix)
+ major=`expr $current - $age + 1`
+ versuffix="$major.$revision"
+ verstring="sgi$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test $loop != 0; do
+ iface=`expr $revision - $loop`
+ loop=`expr $loop - 1`
+ verstring="sgi$major.$iface:$verstring"
+ done
+ ;;
+
+ linux)
+ major=.`expr $current - $age`
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ major=`expr $current - $age`
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test $loop != 0; do
+ iface=`expr $current - $loop`
+ loop=`expr $loop - 1`
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring="$verstring:${current}.0"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current";
+ ;;
+
+ windows)
+ # Like Linux, but with '-' rather than '.', since we only
+ # want one extension on Windows 95.
+ major=`expr $current - $age`
+ versuffix="-$major-$age-$revision"
+ ;;
+
+ *)
+ $echo "$modename: unknown library version type \`$version_type'" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ verstring="0.0"
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ dependency_libs="$deplibs"
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *)
+ # Add libc to deplibs on all other systems.
+ deplibs="$deplibs -lc"
+ ;;
+ esac
+ fi
+
+ # Create the output directory, or remove our outputs if we need to.
+ if test -d $output_objdir; then
+ $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
+ $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
+ else
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $output_objdir; then
+ exit $status
+ fi
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+ fi
+
+ if test "$build_libtool_libs" = yes; then
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case "$deplibs_check_method" in
+ pass_all)
+ newdeplibs=$deplibs
+ ;; # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behaviour.
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $rm conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $rm conftest
+ $C_compiler -o conftest conftest.c $deplibs
+ if test $? -eq 0 ; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ else
+ # Error occured in the first compile. Let's try to salvage the situation:
+ # Compile a seperate program for each library.
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" ; then
+ $rm conftest
+ $C_compiler -o conftest conftest.c $i
+ # Did it work?
+ if test $? -eq 0 ; then
+ ldd_output=`ldd conftest`
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ fi
+ deplibs=$newdeplibs
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`"
+ for a_deplib in $deplibs; do
+ name="`expr $a_deplib : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potlib" 2>/dev/null \
+ | grep " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | sed 's/.* -> //'`
+ case "$potliblink" in
+ /*) potlib="$potliblink";;
+ *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" \
+ | sed 10q \
+ | egrep "$file_magic_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ fi
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *) newdeplibs=""
+ if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+ -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
+ grep . >/dev/null; then
+ echo
+ if test "X$deplibs_check_method" = "Xnone"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ fi
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ echo "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ dlname=
+ library_names=
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+ fi
+ fi
+ fi
+
+ # test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ deplibs=$newdeplibs
+ # Done checking deplibs!
+
+ # Get the real and link names of the library.
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ realname="$2"
+ shift; shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ lib="$output_objdir/$realname"
+ for link
+ do
+ linknames="$linknames $link"
+ done
+
+ # Ensure that we have .o objects for linkers which dislike .lo
+ # (e.g. aix) incase we are running --disable-static
+ for obj in $libobjs; do
+ oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"`
+ test -f $oldobj || ${LN_S} $obj $oldobj
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+ if test -n "$whole_archive_flag_spec"; then
+ if test -n "$convenience"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ fi
+ else
+ for xlib in $convenience; do
+ # Extract the objects.
+ xdir="$xlib"x
+ generated="$generated $xdir"
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x ../$xlib)"
+ $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
+
+ libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+ done
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+
+ linkopts="$linkopts $flag"
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ $show "generating symbol list for \`$libname.la'"
+ export_symbols="$objdir/$libname.exp"
+ $run $rm $export_symbols
+ eval cmds=\"$export_symbols_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex"; then
+ $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+ $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+ $run eval '$mv "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+ fi
+
+ # Do each of the archive commands.
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval cmds=\"$archive_expsym_cmds\"
+ else
+ eval cmds=\"$archive_cmds\"
+ fi
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+ $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ *.lo | *.o | *.obj)
+ if test -n "$link_against_libtool_libs"; then
+ $echo "$modename: error: cannot link libtool libraries into objects" 1>&2
+ exit 1
+ fi
+
+ if test -n "$deplibs"; then
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+ fi
+
+ if test -n "$dlfiles$dlprefiles"; then
+ $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$rpath"; then
+ $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$xrpath"; then
+ $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+ fi
+
+ case "$output" in
+ *.lo)
+ if test -n "$objs"; then
+ $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+ exit 1
+ fi
+ libobj="$output"
+ obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $run $rm $obj $libobj
+
+ # Create the old-style object.
+ reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
+
+ output="$obj"
+ eval cmds=\"$reload_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ # Exit if we aren't doing a library object file.
+ test -z "$libobj" && exit 0
+
+ if test "$build_libtool_libs" != yes; then
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ $show "echo timestamp > $libobj"
+ $run eval "echo timestamp > $libobj" || exit $?
+ exit 0
+ fi
+
+ if test -n "$pic_flag"; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs"
+ output="$libobj"
+ eval cmds=\"$reload_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ else
+ # Just create a symlink.
+ $show $rm $libobj
+ $run $rm $libobj
+ $show "$LN_S $obj $libobj"
+ $run $LN_S $obj $libobj || exit $?
+ fi
+
+ exit 0
+ ;;
+
+ # Anything else should be a program.
+ *)
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+ fi
+
+ if test "$preload" = yes; then
+ if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
+ test "$dlopen_self_static" = unknown; then
+ $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+ fi
+ fi
+
+ if test "$dlself" = yes && test "$export_dynamic" = no; then
+ $echo "$modename: error: \`-dlopen self' requires \`-export-dynamic'" 1>&2
+ exit 1
+ fi
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$compile_rpath " in
+ *" $libdir "*) ;;
+ *) compile_rpath="$compile_rpath $libdir" ;;
+ esac
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$output_objdir" = "X$output"; then
+ output_objdir="$objdir"
+ else
+ output_objdir="$output_objdir/$objdir"
+ fi
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ fi
+
+ dlsyms=
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" = yes; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ dlsyms="${outputname}S.c"
+ else
+ $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+ fi
+ fi
+
+ if test -n "$dlsyms"; then
+ case "$dlsyms" in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$objdir/${output}.nm"
+
+ if test -d $objdir; then
+ $show "$rm $nlist ${nlist}S ${nlist}T"
+ $run $rm "$nlist" "${nlist}S" "${nlist}T"
+ else
+ $show "$mkdir $objdir"
+ $run $mkdir $objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $objdir; then
+ exit $status
+ fi
+ fi
+
+ # Parse the name list into a source file.
+ $show "creating $objdir/$dlsyms"
+
+ $echo > "$objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ $show "generating symbol list for \`$output'"
+
+ echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for arg in $progfiles; do
+ $show "extracting global C symbols from \`$arg'"
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ $run eval '$mv "$nlist"T "$nlist"'
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ $run eval '$mv "$nlist"T "$nlist"'
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$objdir/$output.exp"
+ $run $rm $export_symbols
+ $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ else
+ $run $rm $export_symbols
+ $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$objdir/$output.exp"'
+ $run eval 'grep -f "$objdir/$output.exp" < "$nlist" > "$nlist"T'
+ $run eval 'mv "$nlist"T "$nlist"'
+ fi
+ fi
+
+ for arg in $dlprefiles; do
+ $show "extracting global C symbols from \`$arg'"
+ name=`echo "$arg" | sed -e 's%^.*/%%'`
+ $run eval 'echo ": $name " >> "$nlist"'
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -z "$run"; then
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $mv "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
+ :
+ else
+ grep -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$dlsyms"
+ fi
+
+ $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ lt_ptr_t address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+ sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
+ -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
+ < "$nlist" >> "$output_objdir/$dlsyms"
+
+ $echo >> "$output_objdir/$dlsyms" "\
+ {0, (lt_ptr_t) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ fi
+
+ pic_flag_for_symtable=
+ case "$host" in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*)
+ case "$compile_command " in
+ *" -static "*) ;;
+ *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
+ esac
+ esac
+
+ # Now compile the dynamic symbol file.
+ $show "(cd $objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+ $run eval '(cd $objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+ # Transform the symbol file into the correct name.
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
+ ;;
+ *)
+ $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+ exit 1
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ fi
+
+ if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
+ # Replace the output file specification.
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ $show "$link_command"
+ $run eval "$link_command"
+ exit $?
+ fi
+
+ if test -n "$shlibpath_var"; then
+ # We should set the shlibpath_var
+ rpath=
+ for dir in $temp_rpath; do
+ case "$dir" in
+ /* | [A-Za-z]:[/\\]*)
+ # Absolute path.
+ rpath="$rpath$dir:"
+ ;;
+ *)
+ # Relative path: add a thisdir entry.
+ rpath="$rpath\$thisdir/$dir:"
+ ;;
+ esac
+ done
+ temp_rpath="$rpath"
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ # AGH! Flame the AIX and HP-UX people for me, will ya?
+ $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+ $echo "$modename: \`$output' will be relinked during installation" 1>&2
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Create the binary in the object directory, then wrap it.
+ if test ! -d $output_objdir; then
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $objdir; then
+ exit $status
+ fi
+ fi
+
+ # Delete the old output file.
+ $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ $show "$link_command"
+ $run eval "$link_command" || exit $?
+
+ # Now create the wrapper script.
+ $show "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Quote $echo for shipping.
+ if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
+ case "$0" in
+ /* | [A-Za-z]:[/\\]*) qecho="$SHELL $0 --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+ esac
+ qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if our run command is non-null.
+ if test -z "$run"; then
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
+ esac
+ $rm $output
+ trap "$rm $output; exit 1" 1 2 15
+
+ $echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variable:
+ link_against_libtool_libs='$link_against_libtool_libs'
+else
+ # When we are sourced in execute mode, \$file and \$echo are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ echo=\"$qecho\"
+ file=\"\$0\"
+ # Make sure echo works.
+ if test \"X\$1\" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+ # Yippee, \$echo works!
+ :
+ else
+ # Restart under the correct shell, and then maybe \$echo will work.
+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+ fi
+ fi\
+"
+ $echo >> $output "\
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ /* | [A-Za-z]:[/\\]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
+ done
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ echo >> $output "\
+ program=lt-'$outputname'
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" || \\
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $mkdir \"\$progdir\"
+ else
+ $rm \"\$progdir/\$file\"
+ fi"
+
+ echo >> $output "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if (cd \"\$thisdir\" && eval \$relink_command); then :
+ else
+ $rm \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $rm \"\$progdir/\$program\";
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $rm \"\$progdir/\$file\"
+ fi"
+ else
+ echo >> $output "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ echo >> $output "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $echo >> $output "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ # fixup the dll searchpath if we need to.
+ if test -n "$dllsearchpath"; then
+ $echo >> $output "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ $echo >> $output "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+"
+ case $host in
+ *-*-cygwin* | *-*-mingw | *-*-os2*)
+ # win32 systems need to use the prog path for dll
+ # lookup to work
+ $echo >> $output "\
+ exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+ ;;
+ *)
+ $echo >> $output "\
+ # Export the path to the program.
+ PATH=\"\$progdir:\$PATH\"
+ export PATH
+
+ exec \$program \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $echo >> $output "\
+ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+ exit 1
+ fi
+ else
+ # The program doesn't exist.
+ \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+ \$echo \"This script is just a wrapper for \$program.\" 1>&2
+ echo \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+ chmod +x $output
+ fi
+ exit 0
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ # Add in members from convenience archives.
+ for xlib in $addlibs; do
+ # Extract the objects.
+ xdir="$xlib"x
+ generated="$generated $xdir"
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x ../$xlib)"
+ $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
+
+ oldobjs="$oldobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+ done
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ eval cmds=\"$old_archive_from_new_cmds\"
+ else
+ eval cmds=\"$old_archive_cmds\"
+ fi
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ done
+
+ if test -n "$generated"; then
+ $show "${rm}r$generated"
+ $run ${rm}r$generated
+ fi
+
+ # Now create the libtool archive.
+ case "$output" in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ $show "creating $output"
+
+ if test -n "$xrpath"; then
+ temp_xrpath=
+ for libdir in $xrpath; do
+ temp_xrpath="$temp_xrpath -R$libdir"
+ done
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+
+ # Only create the output if not a dry run.
+ if test -z "$run"; then
+ $echo > $output "\
+# $output - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+
+# The name that we can dlopen(3).
+dlname='$dlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=no
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'\
+"
+
+ $rm "$output_objdir/$outputname"i
+ sed 's/^installed=no$/installed=yes/' \
+ < "$output" > "$output_objdir/$outputname"i || exit 1
+ fi
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+ $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $?
+ ;;
+ esac
+ exit 0
+ ;;
+
+ # libtool install mode
+ install)
+ modename="$modename: install"
+
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
+ # Aesthetically quote it.
+ arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+ case "$arg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$arg "
+ arg="$1"
+ shift
+ else
+ install_prog=
+ arg="$nonopt"
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case "$arg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$install_prog$arg"
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ for arg
+ do
+ if test -n "$dest"; then
+ files="$files $dest"
+ dest="$arg"
+ continue
+ fi
+
+ case "$arg" in
+ -d) isdir=yes ;;
+ -f) prev="-f" ;;
+ -g) prev="-g" ;;
+ -m) prev="-m" ;;
+ -o) prev="-o" ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*) ;;
+
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest="$arg"
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case "$arg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$install_prog $arg"
+ done
+
+ if test -z "$install_prog"; then
+ $echo "$modename: you must specify an install program" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ if test -n "$prev"; then
+ $echo "$modename: the \`$prev' option requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ $echo "$modename: no file or destination specified" 1>&2
+ else
+ $echo "$modename: you must specify a destination" 1>&2
+ fi
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Strip any trailing slash from the destination.
+ dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$destdir" = "X$dest" && destdir=.
+ destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files
+ if test $# -gt 2; then
+ $echo "$modename: \`$dest' is not a directory" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+ fi
+ case "$destdir" in
+ /* | [A-Za-z]:[/\\]*) ;;
+ *)
+ for file in $files; do
+ case "$file" in
+ *.lo) ;;
+ *)
+ $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case "$file" in
+ *.a | *.lib)
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
+
+ *.la)
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ library_names=
+ old_library=
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
+ test "X$dir" = "X$file/" && dir=
+ dir="$dir$objdir"
+
+ # See the names of the shared library.
+ set dummy $library_names
+ if test -n "$2"; then
+ realname="$2"
+ shift
+ shift
+
+ # Install the shared library and build the symlinks.
+ $show "$install_prog $dir/$realname $destdir/$realname"
+ $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
+ test "X$dlname" = "X$realname" && dlname=
+
+ if test $# -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ for linkname
+ do
+ test "X$dlname" = "X$linkname" && dlname=
+ if test "$linkname" != "$realname"; then
+ $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ fi
+ done
+ fi
+
+ if test -n "$dlname"; then
+ # Install the dynamically-loadable library.
+ $show "$install_prog $dir/$dlname $destdir/$dlname"
+ $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $?
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ eval cmds=\"$postinstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ fi
+
+ # Install the pseudo-library for information purposes.
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ instname="$dir/$name"i
+ if test ! -f "$instname"; then
+ # Just in case it was removed...
+ $show "Creating $instname"
+ $rm "$instname"
+ sed 's/^installed=no$/installed=yes/' "$file" > "$instname"
+ fi
+ $show "$install_prog $instname $destdir/$name"
+ $run eval "$install_prog $instname $destdir/$name" || exit $?
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case "$destfile" in
+ *.lo)
+ staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+ ;;
+ *.o | *.obj)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ if test -n "$destfile"; then
+ $show "$install_prog $file $destfile"
+ $run eval "$install_prog $file $destfile" || exit $?
+ fi
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+ $show "$install_prog $staticobj $staticdest"
+ $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+ fi
+ exit 0
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile="$destdir/$destfile"
+ fi
+
+ # Do a test to see if this is really a libtool program.
+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ link_against_libtool_libs=
+ relink_command=
+
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Check the variables that should have been set.
+ if test -z "$link_against_libtool_libs"; then
+ $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
+ exit 1
+ fi
+
+ finalize=yes
+ for lib in $link_against_libtool_libs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ # If there is no directory component, then add one.
+ case "$lib" in
+ */* | *\\*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+ fi
+ libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+ finalize=no
+ fi
+ done
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ if test "$finalize" = yes; then
+ outputname="/tmp/$$-$file"
+ # Replace the output file specification.
+ relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
+ else
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+ continue
+ fi
+ file="$outputname"
+ else
+ $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
+ fi
+ else
+ # Install the binary that we compiled earlier.
+ file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ $show "$install_prog$stripme $file $destfile"
+ $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+ test -n "$outputname" && $rm $outputname
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ $show "$install_prog $file $oldlib"
+ $run eval "$install_prog \$file \$oldlib" || exit $?
+
+ # Do each command in the postinstall commands.
+ eval cmds=\"$old_postinstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ done
+
+ if test -n "$future_libdirs"; then
+ $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+ fi
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ test -n "$run" && current_libdirs=" -n$current_libdirs"
+ exec $SHELL $0 --finish$current_libdirs
+ exit 1
+ fi
+
+ exit 0
+ ;;
+
+ # libtool finish mode
+ finish)
+ modename="$modename: finish"
+ libdirs="$nonopt"
+ admincmds=
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs="$libdirs $dir"
+ done
+
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ eval cmds=\"$finish_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || admincmds="$admincmds
+ $cmd"
+ done
+ IFS="$save_ifs"
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $run eval "$cmds" || admincmds="$admincmds
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ test "$show" = : && exit 0
+
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ echo " $libdir"
+ done
+ echo
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use \`-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ echo " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ echo " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ echo
+ echo "See any operating system documentation about shared libraries for"
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ echo "----------------------------------------------------------------------"
+ exit 0
+ ;;
+
+ # libtool execute mode
+ execute)
+ modename="$modename: execute"
+
+ # The first argument is the command name.
+ cmd="$nonopt"
+ if test -z "$cmd"; then
+ $echo "$modename: you must specify a COMMAND" 1>&2
+ $echo "$help"
+ exit 1
+ fi
+
+ # Handle -dlopen flags immediately.
+ for file in $execute_dlfiles; do
+ if test ! -f "$file"; then
+ $echo "$modename: \`$file' is not a file" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ dir=
+ case "$file" in
+ *.la)
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$file" && dir=.
+
+ if test -f "$dir/$objdir/$dlname"; then
+ dir="$dir/$objdir"
+ else
+ $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+ exit 1
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$file" && dir=.
+ ;;
+
+ *)
+ $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case "$file" in
+ -*) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+ args="$args \"$file\""
+ done
+
+ if test -z "$run"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+
+ # Restore saved enviroment variables
+ if test "${save_LC_ALL+set}" = set; then
+ LC_ALL="$save_LC_ALL"; export LC_ALL
+ fi
+ if test "${save_LANG+set}" = set; then
+ LANG="$save_LANG"; export LANG
+ fi
+
+ # Now actually exec the command.
+ eval "exec \$cmd$args"
+
+ $echo "$modename: cannot exec \$cmd$args"
+ exit 1
+ else
+ # Display what would be done.
+ eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+ $echo "export $shlibpath_var"
+ $echo "$cmd$args"
+ exit 0
+ fi
+ ;;
+
+ # libtool uninstall mode
+ uninstall)
+ modename="$modename: uninstall"
+ rm="$nonopt"
+ files=
+
+ for arg
+ do
+ case "$arg" in
+ -*) rm="$rm $arg" ;;
+ *) files="$files $arg" ;;
+ esac
+ done
+
+ if test -z "$rm"; then
+ $echo "$modename: you must specify an RM program" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ for file in $files; do
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$file" && dir=.
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+ rmfiles="$file"
+
+ case "$name" in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ . $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $dir/$n"
+ test "X$n" = "X$dlname" && dlname=
+ done
+ test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname"
+ test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
+
+ $show "$rm $rmfiles"
+ $run $rm $rmfiles
+
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ eval cmds=\"$postuninstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd"
+ done
+ IFS="$save_ifs"
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ eval cmds=\"$old_postuninstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd"
+ done
+ IFS="$save_ifs"
+ fi
+
+ # FIXME: should reinstall the best remaining shared library.
+ fi
+ ;;
+
+ *.lo)
+ if test "$build_old_libs" = yes; then
+ oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
+ rmfiles="$rmfiles $dir/$oldobj"
+ fi
+ $show "$rm $rmfiles"
+ $run $rm $rmfiles
+ ;;
+
+ *)
+ $show "$rm $rmfiles"
+ $run $rm $rmfiles
+ ;;
+ esac
+ done
+ exit 0
+ ;;
+
+ "")
+ $echo "$modename: you must specify a MODE" 1>&2
+ $echo "$generic_help" 1>&2
+ exit 1
+ ;;
+ esac
+
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
+ $echo "$generic_help" 1>&2
+ exit 1
+fi # test -z "$show_help"
+
+# We need to display help for each of the modes.
+case "$mode" in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+ --config show all configuration variables
+ --debug enable verbose shell tracing
+-n, --dry-run display commands without modifying any files
+ --features display basic configuration information and exit
+ --finish same as \`--mode=finish'
+ --help display this help message and exit
+ --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
+ --quiet same as \`--silent'
+ --silent don't print informational messages
+ --version print version information
+
+MODE must be one of the following:
+
+ compile compile a source file into a libtool object
+ execute automatically set library path, then run a program
+ finish complete the installation of libtool libraries
+ install install libraries or executables
+ link create a library or an executable
+ uninstall remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE."
+ exit 0
+ ;;
+
+compile)
+ $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -static always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+execute)
+ $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+finish)
+ $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+install)
+ $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+link)
+ $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -static do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+uninstall)
+ $echo
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+*)
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+esac
+
+echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit 0
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/cesar/ecos/acsupport/missing b/cesar/ecos/acsupport/missing
new file mode 100755
index 0000000000..cbe2b0ef0e
--- /dev/null
+++ b/cesar/ecos/acsupport/missing
@@ -0,0 +1,188 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+case "$1" in
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing - GNU libit 0.0"
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+ aclocal)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acinclude.m4' or \`configure.in'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`configure.in'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acconfig.h' or \`configure.in'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in`
+ if test -z "$files"; then
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in`
+ test -z "$files" || files="$files.in"
+ else
+ files=`echo "$files" | sed -e 's/:/ /g'`
+ fi
+ test -z "$files" && files="config.h.in"
+ touch $files
+ ;;
+
+ automake)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print \
+ | sed 's/^\(.*\).am$/touch \1.in/' \
+ | sh
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ makeinfo)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ fi
+ touch $file
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequirements for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/cesar/ecos/acsupport/mkinstalldirs b/cesar/ecos/acsupport/mkinstalldirs
new file mode 100755
index 0000000000..cc8783edce
--- /dev/null
+++ b/cesar/ecos/acsupport/mkinstalldirs
@@ -0,0 +1,36 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Last modified: 1994-03-25
+# Public domain
+
+errstatus=0
+
+for file in ${1+"$@"} ; do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d in ${1+"$@"} ; do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp" 1>&2
+ mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
+ fi
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/cesar/ecos/configure b/cesar/ecos/configure
new file mode 100755
index 0000000000..ddf09c51c7
--- /dev/null
+++ b/cesar/ecos/configure
@@ -0,0 +1,1245 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=acsupport/config.guess
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+ac_aux_dir=
+for ac_dir in acsupport $srcdir/acsupport; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in acsupport $srcdir/acsupport" 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:554: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:586: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:639: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "$*" != "X $srcdir/configure conftestfile" \
+ && test "$*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+ fi
+
+ test "$2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+else
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:696: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+PACKAGE=eCos
+
+VERSION=2.0
+
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
+
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
+echo "configure:735: checking for working aclocal" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+ ACLOCAL=aclocal
+ echo "$ac_t""found" 1>&6
+else
+ ACLOCAL="$missing_dir/missing aclocal"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:748: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+ AUTOCONF=autoconf
+ echo "$ac_t""found" 1>&6
+else
+ AUTOCONF="$missing_dir/missing autoconf"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake""... $ac_c" 1>&6
+echo "configure:761: checking for working automake" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (automake --version) < /dev/null > /dev/null 2>&1; then
+ AUTOMAKE=automake
+ echo "$ac_t""found" 1>&6
+else
+ AUTOMAKE="$missing_dir/missing automake"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:774: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+ AUTOHEADER=autoheader
+ echo "$ac_t""found" 1>&6
+else
+ AUTOHEADER="$missing_dir/missing autoheader"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:787: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+ MAKEINFO=makeinfo
+ echo "$ac_t""found" 1>&6
+else
+ MAKEINFO="$missing_dir/missing makeinfo"
+ echo "$ac_t""missing" 1>&6
+fi
+
+
+echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
+echo "configure:801: checking whether to enable maintainer-specific portions of Makefiles" >&5
+ # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+ enableval="$enable_maintainer_mode"
+ USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
+
+
+if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+ echo $ac_n "checking that a separate build tree is being used""... $ac_c" 1>&6
+echo "configure:825: checking that a separate build tree is being used" >&5
+ ecos_cwd=`/bin/pwd`
+ if test "${srcdir}" = "." ; then
+ srcdir=${ecos_cwd}
+ fi
+ if test "${ecos_cwd}" = "${srcdir}" ; then
+ echo "$ac_t""no" 1>&6
+ { echo "configure: error: This configure script should not be run inside the source tree. Instead please use a separate build tree" 1>&2; exit 1; }
+ else
+ echo "$ac_t""yes" 1>&6
+ fi
+
+
+
+if test -f "${srcdir}/host/configure" ; then
+ SUBDIRS="host"
+elif test -f "${srcdir}/tools/src/configure" ; then
+ SUBDIRS="tools/src"
+else
+ SUBDIRS=""
+fi
+
+
+PKGHOSTDIRS=""
+FOUND_CONFIGURES=""
+FOUND_CONFIGURES="${FOUND_CONFIGURES} ${srcdir}/packages/*/*/host/configure"
+FOUND_CONFIGURES="${FOUND_CONFIGURES} ${srcdir}/packages/*/*/*/host/configure"
+FOUND_CONFIGURES="${FOUND_CONFIGURES} ${srcdir}/packages/*/*/*/*/host/configure"
+FOUND_CONFIGURES="${FOUND_CONFIGURES} ${srcdir}/packages/*/*/*/*/*/host/configure"
+FOUND_CONFIGURES="${FOUND_CONFIGURES} ${srcdir}/packages/*/*/*/*/*/*/host/configure"
+for configure in ${FOUND_CONFIGURES}; do
+ if test -f ${configure}; then
+ hostdir=`dirname ${configure}`
+ hostdir=`echo ${hostdir} | sed -e "s:^${srcdir}/::"`
+ PKGHOSTDIRS="${PKGHOSTDIRS} ${hostdir}"
+ fi
+done
+
+SUBDIRS="${SUBDIRS} ${PKGHOSTDIRS}"
+
+
+
+
+subdirs="${SUBDIRS}"
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
+s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
+s%@MAINT@%$MAINT%g
+s%@SUBDIRS@%$SUBDIRS%g
+s%@subdirs@%$subdirs%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+REQUIRED_DIRS="${SUBDIRS}"
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+${CONFIG_SHELL-/bin/sh} ${top_srcdir}/acsupport/mkinstalldirs ${REQUIRED_DIRS}
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+if test "$no_recursion" != yes; then
+
+ # Remove --cache-file and --srcdir arguments so they do not pile up.
+ ac_sub_configure_args=
+ ac_prev=
+ for ac_arg in $ac_configure_args; do
+ if test -n "$ac_prev"; then
+ ac_prev=
+ continue
+ fi
+ case "$ac_arg" in
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ ;;
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ ;;
+ *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
+ esac
+ done
+
+ for ac_config_dir in ${SUBDIRS}; do
+
+ # Do not complain, so a configure script can configure whichever
+ # parts of a large source tree are present.
+ if test ! -d $srcdir/$ac_config_dir; then
+ continue
+ fi
+
+ echo configuring in $ac_config_dir
+
+ case "$srcdir" in
+ .) ;;
+ *)
+ if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
+ else
+ { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
+ fi
+ ;;
+ esac
+
+ ac_popdir=`pwd`
+ cd $ac_config_dir
+
+ # A "../" for each directory in /$ac_config_dir.
+ ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
+
+ case "$srcdir" in
+ .) # No --srcdir option. We are building in place.
+ ac_sub_srcdir=$srcdir ;;
+ /*) # Absolute path.
+ ac_sub_srcdir=$srcdir/$ac_config_dir ;;
+ *) # Relative path.
+ ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
+ esac
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_sub_srcdir/configure; then
+ ac_sub_configure=$ac_sub_srcdir/configure
+ elif test -f $ac_sub_srcdir/configure.in; then
+ ac_sub_configure=$ac_configure
+ else
+ echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
+ ac_sub_configure=
+ fi
+
+ # The recursion is here.
+ if test -n "$ac_sub_configure"; then
+
+ # Make the cache file name correct relative to the subdirectory.
+ case "$cache_file" in
+ /*) ac_sub_cache_file=$cache_file ;;
+ *) # Relative path.
+ ac_sub_cache_file="$ac_dots$cache_file" ;;
+ esac
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
+ # The eval makes quoting arguments work.
+ if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
+ then :
+ else
+ { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
+ fi
+ fi
+
+ cd $ac_popdir
+ done
+fi
+
diff --git a/cesar/ecos/configure.in b/cesar/ecos/configure.in
new file mode 100644
index 0000000000..13214e31a0
--- /dev/null
+++ b/cesar/ecos/configure.in
@@ -0,0 +1,195 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl ====================================================================
+dnl
+dnl configure.in
+dnl
+dnl Top-level configure script for eCos software.
+dnl
+dnl ====================================================================
+dnl ####ECOSHOSTGPLCOPYRIGHTBEGIN####
+dnl ----------------------------------------------------------------------------
+dnl Copyright (C) 2002, 2003 Bart Veer
+dnl Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc.
+dnl
+dnl This file is part of the eCos host tools.
+dnl
+dnl This program is free software; you can redistribute it and/or modify it
+dnl under the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 of the License, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but WITHOUT
+dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+dnl more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along with
+dnl this program; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+dnl ----------------------------------------------------------------------------
+dnl ####ECOSHOSTGPLCOPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s): bartv
+dnl Contact(s): bartv
+dnl Date: 1998/12/17
+dnl Version: 0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+dnl eCos is a componentized architecture for deeply embedded systems.
+dnl It requires a very different configuration system from typical
+dnl autoconfiscated software such as the various GNU packages.
+dnl
+dnl The main eCos host-side software is autoconfiscated to some extent,
+dnl in that the usual sequence of "configure;make;make install" will
+dnl work under the right conditions. However it does not conform to
+dnl the GNU coding standards in numerous ways, for example "make dist"
+dnl will not work. The main eCos host-side software lives in the
+dnl "host" subdirectory, and is built unconditionally.
+dnl
+dnl The eCos target-side software lives in the "packages" subdirectory,
+dnl and is organized in numerous subdirectories corresponding to different
+dnl packages and potentially different versions of each package. In the
+dnl master repository managed by CVS there will only be one version of
+dnl each package, "current", which simplifies things somewhat. Other
+dnl repositories will not be quite so straightforward and require a
+dnl suitable administration tool.
+dnl
+dnl The various eCos packages are not currently auto-confiscated.
+dnl In particular building eCos requires the use of eCos configuration
+dnl technology, not autoconf - there is simply no good way of handling
+dnl a system as highly configurable as eCos using a few command-line
+dnl options passed to "configure". There would also be serious confusion
+dnl between host and target, especially when e.g. cross-compiling the
+dnl host tools. However a possible future enhancement
+dnl would involve making eCos releases via configure and make, thus
+dnl allowing for a release process that combines building the various
+dnl host-side tools such as gcc with creating eCos epk's for the various
+dnl packages.
+dnl
+dnl A complication is that some of the eCos target-side packages also
+dnl contain package-specific host-side support. For example the
+dnl Linux synthetic target support uses special host-side software
+dnl to provide I/O facilities: the architectural HAL package provdes
+dnl generic support, the synthetic ethernet package extends this
+dnl with ethernet support, and so on. Such package-specific host-side
+dnl software does not belong in the main host subdirectory, that
+dnl would make it very difficult to distribute new packages or
+dnl new versions of a package. However keeping the code with the
+dnl various packages makes building more complicated.
+dnl
+dnl 1) if the entire repository is managed by CVS or anoncvs, this
+dnl configure script will search the packages tree for any packages
+dnl that have host-side software that needs to be built -
+dnl specifically, that have a file "configure" inside a "host"
+dnl subdirectory in a version of a package.
+dnl
+dnl 2) if instead the repository contains additional packages
+dnl installed as epk's and managed by an administration tool then
+dnl it is the responsibility of that tool to let the users build
+dnl and rebuild the host-side software as required, for whichever
+dnl host platform or platforms are being used. In other words
+dnl it is the responsibility of the admin tool to create a
+dnl suitable build directory and run "configure; make; make install",
+dnl usually as part of the installation process. Note that several
+dnl versions of a package may be installed, and it is the
+dnl responsibility of each package to take this into account
+dnl (although the configure macros are aware of this to some extent,
+dnl and will e.g. generate suitable install directory names).
+dnl Also note that the top-level configure script will not pick
+dnl up such packages because they will be versioned, i.e. the
+dnl test for current/host/configure will fail because the
+dnl version will not be "current".
+dnl
+dnl 3) as a special case it may be desirable to ship pre-built binaries
+dnl of some of the package-specific software. It is not clear
+dnl just what would be the best way of shipping these - putting
+dnl them into the epk's would not be quite right because that would
+dnl make the epk's host-specific rather than generic.
+dnl
+dnl There is an unresolved problem with possible dependencies between
+dnl packages, if e.g. the host-side of the synthetic ethernet package could
+dnl only be built after the architectural synthetic target package.
+
+dnl Some of the eCos documentation is generic and lives in the "doc"
+dnl subdirectory. Other eCos documentation is package-specific and lives
+dnl in the appropriate package directory. At present there is no support
+dnl for building the documentation via configure and make, but such
+dnl support may be added in future.
+dnl
+dnl There is a subdirectory acsupport containing various files such
+dnl as config.guess and install.sh that are common. This also contains
+dnl an acinclude.m4 file with various macros that are useful for
+dnl eCos.
+
+dnl Generic initialization.
+AC_INIT(acsupport/config.guess)
+AC_CONFIG_AUX_DIR(acsupport)
+AC_CANONICAL_HOST
+AM_INIT_AUTOMAKE(eCos,2.0,0)
+AM_MAINTAINER_MODE
+ECOS_CHECK_BUILD_ne_SRC
+
+dnl Nothing actually gets built in this directory, so there should be no
+dnl need to worry about compiler flags etc. Instead, the problem is
+dnl figuring out what should actually get built.
+dnl
+dnl 1) the host subdirectory should always get built, if it exists.
+dnl With the 2.0 release system the directory gets moved to
+dnl tools/src
+
+if test -f "${srcdir}/host/configure" ; then
+ SUBDIRS="host"
+elif test -f "${srcdir}/tools/src/configure" ; then
+ SUBDIRS="tools/src"
+else
+ SUBDIRS=""
+fi
+
+dnl 2) any package which has a configure script in a
+dnl current/host subdirectory should also get built.
+dnl
+dnl Searching the directory tree is currently done by shell globbing.
+dnl Invoking "find" with suitable arguments might be quicker, but
+dnl less portable. On some hosts there may be problems with environmental
+dnl limits if too many packages provide host-side software.
+dnl
+dnl Currently there is no ordering of packages, so e.g. a device
+dnl driver's host-side support cannot depend on some HAL package
+dnl because the latter may not have been built and installed yet.
+dnl This is a good thing because packages are meant to be self-contained
+dnl whenever possible. Interaction between packages is typically handled
+dnl at the Tcl level at run-time, so there are no build-time complications.
+
+PKGHOSTDIRS=""
+FOUND_CONFIGURES=""
+FOUND_CONFIGURES="${FOUND_CONFIGURES} ${srcdir}/packages/*/*/host/configure"
+FOUND_CONFIGURES="${FOUND_CONFIGURES} ${srcdir}/packages/*/*/*/host/configure"
+FOUND_CONFIGURES="${FOUND_CONFIGURES} ${srcdir}/packages/*/*/*/*/host/configure"
+FOUND_CONFIGURES="${FOUND_CONFIGURES} ${srcdir}/packages/*/*/*/*/*/host/configure"
+FOUND_CONFIGURES="${FOUND_CONFIGURES} ${srcdir}/packages/*/*/*/*/*/*/host/configure"
+for configure in ${FOUND_CONFIGURES}; do
+ if test -f ${configure}; then
+ dnl A configure script has been found in the source tree.
+ dnl First turn it into a directory, then replace the absolute path
+ dnl with a relative one.
+ hostdir=`dirname ${configure}`
+ hostdir=`echo ${hostdir} | sed -e "s:^${srcdir}/::"`
+ PKGHOSTDIRS="${PKGHOSTDIRS} ${hostdir}"
+ fi
+done
+
+SUBDIRS="${SUBDIRS} ${PKGHOSTDIRS}"
+
+dnl Because the eCos directory layout does not conform to GNU conventions
+dnl it is necessary to create various levels of intermediate directories.
+dnl This happens via config.status, prior to the recursion into the
+dnl appropriate directories.
+AC_OUTPUT_COMMANDS([${CONFIG_SHELL-/bin/sh} ${top_srcdir}/acsupport/mkinstalldirs ${REQUIRED_DIRS}],REQUIRED_DIRS="${SUBDIRS}")
+
+AC_SUBST(SUBDIRS)
+AC_CONFIG_SUBDIRS(${SUBDIRS})
+AC_OUTPUT(Makefile)
diff --git a/cesar/ecos/doc/ChangeLog b/cesar/ecos/doc/ChangeLog
new file mode 100644
index 0000000000..96b9b6d464
--- /dev/null
+++ b/cesar/ecos/doc/ChangeLog
@@ -0,0 +1,154 @@
+2005-04-21 Bart Veer <bartv@ecoscentric.com>
+
+ * sgml/doclist: add I2C and DS1307 documentation
+
+2005-03-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * sgml/doclist: added memalloc documentation.
+
+2004-08-25 Bart Veer <bartv@ecoscentric.com>
+
+ * sgml/doclist: add SPI documentation
+
+2004-06-20 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * sgml/doclist: Added flash API documentation.
+
+2004-06-15 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * sgml/makemakefile: Replace plusses with x'es in all entities.
+
+2004-04-19 John Dallaway <jld@ecoscentric.com>
+
+ * sgml/doclist: Remove RedBoot documentation which is now built
+ separately.
+
+2004-04-14 Nick Garnett <nickg@calivar.com>
+
+ * sgml/doclist: Added PPP package documentation.
+
+2003-11-25 Manu Sharma <manu.sharma@ascom.com>
+
+ * sgml/doclist: Add OpenBSD specific documentation.
+
+2003-11-22 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * sgml/doclist: Added ipsec packages documentation
+ * sgml/makemakefile: Added another set of man pages to the kludge.
+
+2003-11-08 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * sgml/user-guide/programming.sgml: Suggest Unix users may prefer
+ ecosconfig rather than the GUI.
+ * sgml/user-guide/makefile: Listed the other .sgml files so
+ dependency checking works
+
+2003-09-11 Gary Thomas <gary@mlbassoc.com>
+
+ * sgml/doclist: Add ethernet PHY documentation.
+
+2003-07-09 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * sgml/makemakefile: Update trademark info and sort.
+
+2003-05-01 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * sgml/jadetex.cfg: Add this to configure PDF output nicely with index
+ and coloured links.
+
+2003-03-23 Iztok Zupet <iz@vsr.si>
+
+ * sgml/makemakefile: modified copyfiles to copy png-s instead of
+ gif-s.
+ * sgml/README-PDF: Comment on pdfjadetext failure and workaround.
+
+2003-03-27 Thomas Koeller <thomas.koeller@baslerweb.com>
+
+ * sgml/makemakefile: Modified to generate makefile that can
+ be used to build docs in arbitrary directory.
+
+2003-02-25 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * sgml/doclist: Added the simple network time protocol client
+ documentation.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * sgml/doclist: Reorder in a slightly more logical order with
+ related bits grouped together.
+ Add docs for power management, USB (slave, eth slave, and SA11x0
+ and NEC uPD8985xx drivers), and synthetic target HAL, eth and
+ watchdog drivers.
+
+ * sgml/.cvsignore: Add gifs and rename ecos.* to ecos-ref.*
+
+ * sgml/makemakefile: Rename ecos.sgml/html/etc. to ecos-ref.
+ Copy over GIFs where they exist.
+ Don't treat porting guide specially at the top... treat it only as
+ specially as the other special cases.
+ Update (C) holders.
+ Update licence/warranty blurb.
+
+2003-01-30 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * sgml/doclist: Added snmp-manpages.sgml
+ * sgml/makemakefile: Extend the kludge to include snmp-manpages.sgml
+
+2003-01-22 John Dallaway <jld@ecoscentric.com>
+
+ * sgml/makemakefile: Allow eCos package version to be specified
+ (when not "current") as the first command line parameter.
+
+2003-01-04 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * sgml/makemakefile: Oops, use new entity consistently in generated
+ ecos.sgml.
+
+2003-01-03 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * sgml/makemakefile: Try to shorten generated entity names.
+ * sgml/doclist: add terminating LF.
+
+2002-12-22 Nick Garnett <nickg@ecoscentric.com>
+
+ * sgml/doclist: Added HTTPD package documentation.
+
+ * sgml/.cvsignore: Added files generated during PDF build.
+
+2002-10-28 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * sgml/makemakefile: Removed the second OTHER_SGML which clobbers
+ the first correct definition, so stopping dependencies working.
+
+2002-10-15 Iztok Zupet <iz@vsr.si>
+
+ * sgml/README-PDF: added
+ * sgml/makemakefile: defined MAIN_PDF
+
+2002-10-15 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * sgml/makemakefile: Only put ecos.sgml in MAIN_SGML. Put all others
+ in OTHER_SGML. From Bart Veer.
+
+2002-09-02 Andrew Lunn <andrew.lunn@ascom.ch
+
+ * sgml/tutorial/makefile: changed ecc to packages
+ * sgml/user-guide/makefile: changed ecc to packages
+
+2002-08-15 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * sgml/doclist: Added the CPU load package documentation.
+
+2002-08-09 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * sgml/doclist: Added the CRC package documentation.
+
+2002-08-09 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * sgml/.cvsignore: Ignore the generated html files etc.
+
+2002-08-07 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * sgml/makemakefile: Replaced the old internal RedHat ecc
+ directory name with the new name "packages"
+
diff --git a/cesar/ecos/doc/sgml/.cvsignore b/cesar/ecos/doc/sgml/.cvsignore
new file mode 100644
index 0000000000..25615506ef
--- /dev/null
+++ b/cesar/ecos/doc/sgml/.cvsignore
@@ -0,0 +1,9 @@
+ecos-ref.sgml
+ecos-ref.tex
+ecos-ref.log
+ecos-ref.aux
+ecos-ref.out
+ecos-ref.pdf
+makefile
+*.html
+*.gif
diff --git a/cesar/ecos/doc/sgml/README-PDF b/cesar/ecos/doc/sgml/README-PDF
new file mode 100644
index 0000000000..c584fc2c7e
--- /dev/null
+++ b/cesar/ecos/doc/sgml/README-PDF
@@ -0,0 +1,31 @@
+To build the PDF version of docs (on Linux), simply use:
+make pdfa4 for A4 size or
+make pdfletter for US letter size
+
+If Your pdfjadetex complains with
+ > ! TeX capacity exceeded, sorry [save size=5000].
+then define
+ save_size.pdfjadetex=10000 (at least) in
+ /usr/share/texmf/web2c/texmf.cnf instead of 5000.
+
+If Your pdfjadetex complains with
+ > ! TeX capacity exceeded, sorry [number of strings=55000].
+then define
+ max_strings.pdfjadetex=155000 (for instance) in
+ /usr/share/texmf/web2c/texmf.cnf instead of 5000.
+
+If You don't get coloured links in Your output, or if You
+wish to modify the pdfjadetex default behaviour then add
+a file named jadetex.cfg into each directory where the build
+takes place and put something like that into:
+
+\hypersetup{pdfpagemode=None, pdfauthor=eCos (pdfjadetex) , colorlinks=true,
+ linkcolor=blue, pdfstartview=FitH}
+
+Regards
+Iztok
+<iz@vsr.si>
+
+
+
+
diff --git a/cesar/ecos/doc/sgml/doclist b/cesar/ecos/doc/sgml/doclist
new file mode 100644
index 0000000000..526159bb90
--- /dev/null
+++ b/cesar/ecos/doc/sgml/doclist
@@ -0,0 +1,43 @@
+kernel/current/doc/kernel.sgml
+hal/common/current/doc/hal.sgml
+hal/common/current/doc/porting.sgml
+language/c/libc/common/current/doc/libc.sgml
+io/common/current/doc/io.sgml
+io/fileio/current/doc/fileio.sgml
+io/pci/current/doc/pci.sgml
+io/flash/current/doc/flash.sgml
+io/spi/current/doc/spi.sgml
+io/i2c/current/doc/i2c.sgml
+compat/posix/current/doc/posix.sgml
+compat/uitron/current/doc/uitron.sgml
+net/common/current/doc/tcpip.sgml
+net/common/current/doc/tcpip-manpages.sgml
+net/bsd_tcpip/current/doc/freebsd.sgml
+net/tcpip/current/doc/openbsd.sgml
+net/tcpip/current/doc/openbsd-manpages-bridge.sgml
+net/tcpip/current/doc/openbsd-manpages-netintro.sgml
+net/tcpip/current/doc/openbsd-manpages-stp.sgml
+net/ns/dns/current/doc/dns.sgml
+net/common/current/doc/ipsec.sgml
+net/ipsec/libipsec/current/doc/libipsec-manpages.sgml
+net/ppp/current/doc/ppp.sgml
+io/eth/current/doc/ethdrv.sgml
+devs/eth/phy/current/doc/eth_phy.sgml
+net/snmp/agent/current/doc/snmp.sgml
+net/snmp/agent/current/doc/snmp-manpages.sgml
+net/httpd/current/doc/httpd.sgml
+net/ftpclient/current/doc/ftpclient.sgml
+net/sntp/current/doc/sntp.sgml
+services/memalloc/common/current/doc/memalloc.sgml
+services/crc/current/doc/crc.sgml
+services/cpuload/current/doc/cpuload.sgml
+services/profile/gprof/current/doc/profile.sgml
+services/power/common/current/doc/power.sgml
+io/usb/slave/current/doc/usbs.sgml
+io/usb/eth/slave/current/doc/usbseth.sgml
+hal/synth/arch/current/doc/synth.sgml
+devs/usb/sa11x0/current/doc/usbs_sa11x0.sgml
+devs/usb/nec_upd985xx/current/doc/usbs_upd985xx.sgml
+devs/eth/synth/ecosynth/current/doc/syntheth.sgml
+devs/watchdog/synth/current/doc/synth_watchdog.sgml
+devs/wallclock/dallas/ds1307/current/doc/ds1307.sgml
diff --git a/cesar/ecos/doc/sgml/jadetex.cfg b/cesar/ecos/doc/sgml/jadetex.cfg
new file mode 100644
index 0000000000..f5c94ecd7c
--- /dev/null
+++ b/cesar/ecos/doc/sgml/jadetex.cfg
@@ -0,0 +1 @@
+\hypersetup{pdfauthor=eCos (pdfjadetex) , colorlinks=true, linkcolor=blue, pdfstartview=FitH}
diff --git a/cesar/ecos/doc/sgml/makemakefile b/cesar/ecos/doc/sgml/makemakefile
new file mode 100755
index 0000000000..cf215d6ee8
--- /dev/null
+++ b/cesar/ecos/doc/sgml/makemakefile
@@ -0,0 +1,225 @@
+#!/bin/sh
+
+touch ecos-ref.sgml
+touch makefile
+chmod +w ecos-ref.sgml
+chmod +w makefile
+
+sgmldir="`dirname $0`"
+doclist="${sgmldir}/doclist"
+toplvl="${sgmldir}/../.."
+
+cat > makefile <<EOF
+#=============================================================================
+#
+# makefile
+#
+# For building the eCos docs
+#
+#=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+# -------------------------------------------
+# This file is part of eCos, the Embedded Configurable Operating System.
+# Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+# Copyright (C) 2003 Jonathan Larmour
+#
+# eCos is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 or (at your option) any later version.
+#
+# eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with eCos; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+#
+# As a special exception, if other files instantiate templates or use macros
+# or inline functions from this file, or you compile this file and link it
+# with other works to produce a work based on this file, this file does not
+# by itself cause the resulting work to be covered by the GNU General Public
+# License. However the source code for this file must still be made available
+# in accordance with section (3) of the GNU General Public License.
+#
+# This exception does not invalidate any other reasons why a work based on
+# this file might be covered by the GNU General Public License.
+# -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#=============================================================================
+#####DESCRIPTIONBEGIN####
+#
+# Author(s): jlarmour
+# Date: 2002-02-05
+#####DESCRIPTIONEND####
+#=============================================================================
+
+TOPLEVEL := ${toplvl}/packages
+EOF
+/bin/echo MAIN_SGML := ecos-ref.sgml >> makefile
+/bin/echo -n OTHER_SGML := >> makefile
+
+cat >ecos-ref.sgml <<EOF
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
+
+<!-- Begin Document Specific Declarations -->
+<!ENTITY ui "&micro;ITRON">
+<!ENTITY versiondir CDATA "v2_0">
+<!ENTITY version CDATA "2.0">
+<!ENTITY lt SDATA "[lt ]">
+EOF
+
+PACKAGEVER=${1:-'current'}
+
+for i in `cat ${doclist}`; do
+ line="`echo $i | sed 's/#.*//;'`"
+ if (test ! -z $line); then
+ /bin/echo -n " ${toplvl}/packages/$i" | sed "s@/current/@/${PACKAGEVER}/@g" >> makefile
+ entityi="`echo $i | sed 's@\+@x@g; s@/@-@g; s@\.@-@g; s@_@-@g; s@-current-doc@@g; s@-current@@g'`"
+ echo "<!ENTITY $entityi SYSTEM \"${toplvl}/packages/$i\">" | sed "s@/current/@/${PACKAGEVER}/@g" >> ecos-ref.sgml
+ fi
+done
+
+# Go through again but find GIFs and PNGs to copy
+for i in `for j in \`cat ${doclist}\` ; do dirname $j ; done | sort | uniq` ; do
+ diri=`echo ${toplvl}/packages/$i | sed "s@/current/@/${PACKAGEVER}/@g"`
+ dirigifs=`ls $diri/*.gif $diri/*.png 2>/dev/null | tr '\n' ' '`
+ if [ x"$dirigifs" != x ]; then
+ copyfiles="$copyfiles $dirigifs"
+ fi
+done
+
+cat >> makefile <<EOF
+
+MAIN_HTML := ecos-ref.html
+MAIN_PDF := ecos-ref.pdf
+PICTURES :=
+COPYFILES := $copyfiles
+
+include \$(TOPLEVEL)/pkgconf/rules.doc
+EOF
+
+cat >> ecos-ref.sgml <<EOF
+<!-- End Document Specific Declarations -->
+]>
+
+<BOOK ID="ECOS-REF">
+ <bookinfo>
+ <TITLE>eCos Reference Manual</TITLE>
+
+ <copyright>
+ <year>1998</year>
+ <year>1999</year>
+ <year>2000</year>
+ <year>2001</year>
+ <year>2002</year>
+ <year>2003</year>
+ <holder>Red Hat, Inc.</holder>
+ <holder>Nick Garnett (eCosCentric)</holder>
+ <holder>Jonathan Larmour (eCosCentric)</holder>
+ <holder>Andrew Lunn (Ascom)</holder>
+ <holder>Gary Thomas (MLB Associates)</holder>
+ <holder>Bart Veer (eCosCentric)</holder>
+ </copyright>
+
+ <legalnotice>
+ <title>Documentation licensing terms</title>
+<para>This material may be distributed only subject to the terms
+and conditions set forth in the Open Publication License, v1.0
+or later (the latest version is presently available at
+<ulink url="http://www.opencontent.org/openpub/">http://www.opencontent.org/openpub/</ulink>).
+</para>
+<para>
+Distribution of substantively modified versions of this
+document is prohibited without the explicit permission of the
+copyright holder.</para>
+<para>
+Distribution of the work or derivative of the work in any
+standard (paper) book form is prohibited unless prior
+permission is obtained from the copyright holder.
+</para>
+ </legalnotice>
+ <legalnotice>
+ <title>Trademarks</title>
+<para>Altera&reg; and Excalibur&trade; are trademarks of Altera Corporation.</para>
+<para>AMD&reg; is a registered trademark of Advanced Micro Devices, Inc.</para>
+<para>ARM&reg;, StrongARM&reg;, Thumb&reg;, ARM7&trade;, ARM9&trade; is a registered trademark of Advanced RISC Machines, Ltd.</para>
+<para>Cirrus Logic&reg; and Maverick&trade; are registered trademarks of Cirrus Logic, Inc.</para>
+<para>Cogent&trade; is a trademark of Cogent Computer Systems, Inc.</para>
+<para>Compaq&reg; is a registered trademark of the Compaq Computer Corporation.</para>
+<para>Fujitsu&reg; is a registered trademark of Fujitsu Limited.</para>
+<para>IBM&reg;, and PowerPC&trade; are trademarks of International Business Machines Corporation.</para>
+<para>IDT&reg; is a registered trademark of Integrated Device Technology Inc.</para>
+<para>Intel&reg;, i386&trade;, Pentium&reg;, StrataFlash&reg; and XScale&trade; are trademarks of Intel Corporation.</para>
+<para>Intrinsyc&reg; and Cerf&trade; are trademarks of Intrinsyc Software, Inc.</para>
+<para>Linux&reg; is a registered trademark of Linus Torvalds. </para>
+<para>Matsushita&trade; and Panasonic&reg; are trademarks of the Matsushita Electric Industrial Corporation.</para>
+<para>Microsoft&reg;, Windows&reg;, Windows NT&reg; and Windows XP&reg; are registered trademarks of Microsoft Corporation, Inc. </para>
+<para>MIPS&reg;, MIPS32&trade; MIPS64&trade;, 4K&trade, 5K&trade; Atlas&trade; and Malta&trade; are trademarks of MIPS Technologies, Inc.</para>
+<para>Motorola&reg;, ColdFire&reg; is a trademark of Motorola, Inc.</para>
+<para>NEC&reg; V800&trade;, V850&trade;, V850/SA1&trade;, V850/SB1&trade;, VR4300&trade;, and VRC4375&trade; are trademarks of NEC Corporation.</para>
+<para>PMC-Sierra&reg; RM7000&trade; and Ocelot&trade; are trademarks of PMC-Sierra Incorporated. </para>
+<para>Red Hat, eCos&trade;, RedBoot&trade;, GNUPro&reg;, and Insight&trade; are trademarks of Red Hat, Inc. </para>
+<para>Samsung&reg; and CalmRISC&trade; are trademarks or registered trademarks of Samsung, Inc. </para>
+<para>Sharp&reg; is a registered trademark of Sharp Electronics Corp.</para>
+<para>SPARC&reg; is a registered trademark of SPARC International, Inc., and is used under license by Sun Microsystems, Inc. </para>
+<para>Sun Microsystems&reg; and Solaris&reg; are registered trademarks of Sun Microsystems, Inc. </para>
+<para>SuperH&trade; and Renesas&trade; are trademarks owned by Renesas Technology Corp.</para>
+<para>Texas Instruments&reg;, OMAP&trade; and Innovator&trade; are trademarks of Texas Instruments Incorporated.</para>
+<para>Toshiba&reg; is a registered trademark of the Toshiba Corporation.</para>
+<para>UNIX&reg; is a registered trademark of The Open Group. </para>
+<para>All other brand and product names, trademarks, and copyrights are the
+property of their respective owners. </para>
+ </legalnotice>
+ <legalnotice>
+<title>Warranty</title>
+<para>eCos and RedBoot are open source software, covered by a
+modified version of the <ulink url="http://www.gnu.org/copyleft/gpl.html">GNU
+General Public Licence</ulink>,
+and you are welcome to change it and/or distribute copies of it under certain
+conditions. See <ulink
+url="http://ecos.sourceware.org/license-overview.html">http://ecos.sourceware.org/license-overview.html
+</ulink> for more information about the license.</para>
+<para>eCos and RedBoot software have NO WARRANTY. </para>
+<para>Because this software is licensed free of charge, there are no warranties
+for it, to the extent permitted by applicable law. Except when otherwise stated
+in writing, the copyright holders and/or other parties provide the software
+&ldquo;as is&rdquo; without warranty of any kind, either expressed or implied,
+including, but not limited to, the implied warranties of merchantability and
+fitness for a particular purpose. The entire risk as to the quality and performance
+of the software is with you. Should the software prove defective, you assume
+the cost of all necessary servicing, repair or correction.</para>
+<para> In no event, unless required by applicable law or agreed to in writing,
+will any copyright holder, or any other party who may modify and/or redistribute
+the program as permitted above, be liable to you for damages, including any
+general, special, incidental or consequential damages arising out of the use
+or inability to use the program (including but not limited to loss of data
+or data being rendered inaccurate or losses sustained by you or third parties
+or a failure of the program to operate with any other programs), even if such
+holder or other party has been advised of the possibility of such damages.
+</para>
+ </legalnotice>
+ </bookinfo>
+<toc id="ecos-toc"></toc>
+EOF
+
+for i in `cat ${doclist}`; do
+ line="`echo $i | sed 's/#.*//;'`"
+ if (test ! -z $line); then
+ entityi="`echo $i | sed 's@\+@x@g; s@/@-@g; s@\.@-@g; s@_@-@g; s@-current-doc@@g; s@-current@@g'`"
+ # special kludge
+ if [ "`basename $i`" != "tcpip-manpages.sgml" -a \
+ "`basename $i`" != "snmp-manpages.sgml" -a \
+ "`basename $i`" != "libipsec.sgml" -a \
+ "`basename $i`" != "libipsec-manpages.sgml" -a \
+ "`basename $i`" != "openbsd-manpages-bridge.sgml" -a \
+ "`basename $i`" != "openbsd-manpages-netintro.sgml" -a \
+ "`basename $i`" != "openbsd-manpages-stp.sgml" -a \
+ "`basename $i`" != "porting.sgml" ]; then
+ echo "&$entityi;" >> ecos-ref.sgml
+ fi
+ fi
+done
+
+echo '</book>' >> ecos-ref.sgml
diff --git a/cesar/ecos/doc/sgml/user-guide/.cvsignore b/cesar/ecos/doc/sgml/user-guide/.cvsignore
new file mode 100644
index 0000000000..0b84df0f02
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/.cvsignore
@@ -0,0 +1 @@
+*.html \ No newline at end of file
diff --git a/cesar/ecos/doc/sgml/user-guide/ChangeLog b/cesar/ecos/doc/sgml/user-guide/ChangeLog
new file mode 100644
index 0000000000..0aef56edc0
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/ChangeLog
@@ -0,0 +1,165 @@
+2004-06-15 Roland Cassebohn <Roland.Cassebohm@VisionSystems.de>
+
+ * target-setup.sgml:
+ * real-time-characterization.sgmo:
+ Added documentation for the aim711 module
+
+2003-10-17 Alex Schuilenburg <alex@schuilenburg.org>
+ * user-guide/installation.sgml:
+ * user-guide/introduction.sgml:
+ * user-guide/makefile:
+ * user-guide/target-setup.sgml:
+ Brought URLs up to date and amended header which was incaccurate
+ (referred to alternative licenses no longer available)
+
+2003-07-09 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * user-guide.sgml: Update trademark info and sort.
+
+ * real-time-characterization.sgml: real-time characterization is
+ discussed in ref manual, not user guide.
+
+2003-05-04 John Dallaway <jld@ecoscentric.com>
+
+ * installation.sgml: Refer to installation instructions on the
+ eCos website.
+
+2003-05-01 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * jadetex.cfg: Add this to configure PDF output nicely with index
+ and coloured links.
+
+ * pix/*.gif: Delete as they are now unused.
+ * introduction.sgml: Add ID for notation and conventions chap.
+
+2003-03-03 John Dallaway <jld@ecoscentric.com>
+
+ * programming-concepts-techniques.sgml:
+ PKG_INSTALL_DIR -> INSTALL_DIR
+
+2003-02-12 Nick Garnett <nickg@calivar.com>
+
+ * user-guide.sgml:
+ * config-tool.sgml:
+ * configuration.sgml:
+ Files extensively modified to bring them up to date. Essentially
+ the old Tutorial document has been merged in with the User Guide
+ to give a single document from which to start with eCos.
+
+ * introduction.sgml:
+ * installation.sgml:
+ * programming.sgml:
+ * programming-concepts-techniques.sgml:
+ * target-setup.sgml:
+ * real-time-characterization.sgml:
+ New files containing both fresh text and text merged in from the
+ old tutorial, which is now obsolete.
+
+ * pix/templates01.png:
+ * pix/ARMStartup01.png:
+ * pix/build-lib01.png:
+ * pix/build-tests01.png:
+ * pix/twothreads2.png:
+ Graphics copied here from old tutorial.
+
+
+2002-10-15 Iztok Zupet <iz@vsr.si>
+
+ * user-guide.sgml: pictures (gif==>png)
+ * pix/*.png: generated from gifs with gimp
+ * makefile: defined MAIN_PDF
+
+2002-09-23 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * .cvsignore: Ignore the generated html files.
+
+2002-02-26 Julian Smart <julians@redhat.com>
+
+ * config-tool.sgml: updated further text and graphics
+ for Windows/Unix configtool.
+
+2002-02-15 Julian Smart <julians@redhat.com>
+
+ * user-guide.sgml: added further GIF files
+ * config-tool.sgml: started to updated text and graphics
+ to encompass Windows and Linux tools.
+
+2002-02-07 Jonathan Larmour <jlarmour@redhat.com>
+
+ * user-guide.sgml: Move special topics to kernel doc.
+ * special-topics.sgml: delete.
+
+ * config-tool.sgml: Add ids to all <sect1>s and <chapter>s
+ * configuration.sgml: ditto.
+ * programming-concepts-techniques.sgml: ditto.
+ * special-topics.sgml: ditto.
+
+2001-12-21 Jonathan Larmour <jlarmour@redhat.com>
+
+ * user-guide.sgml: Move pictures to pix/ subdirectory.
+
+2001-12-17 Mark Galassi <rosalia@galassi.org>
+
+ * added legal stuff and contact information.
+
+2001-11-28 Jonathan Larmour <jlarmour@redhat.com>
+
+ * configuration.sgml: Many cosmetic fixes, to bring the document in
+ line with the version on sources.redhat.com, including adding a little
+ missing content.
+ * config-tool.sgml: Ditto.
+ * programming-concepts-techniques.sgml: Ditto.
+
+ * config-tool.sgml: Fix fig1 title.
+
+2001-11-23 Mark Galassi <rosalia@galassi.org>
+
+ * configuration.sgml: took care of the <programlisting> tags.
+
+2001-11-21 Mark Galassi <rosalia@galassi.org>
+
+ * programming-concepts-techniques.sgml: restored the two tables in
+ this part.
+
+ * config-tool.sgml: reinstated the keyboard shortcut table.
+
+ * config-tool.sgml, configuration.sgml,
+ programming-concepts-techniques.sgml, special-topics.sgml: the new
+ files with the individual parts.
+
+ * user-guide.sgml: split each part into its own file to make
+ editing more manageable.
+
+2001-10-31 Mark Galassi <rosalia@galassi.org>
+
+ * user-guide-not-normalized.sgml: this is the deprecated
+ original hand-edited file.
+
+ * user-guide.sgml: this is now the normalized file and the active
+ one.
+
+ * user-duide-normalized.sgml: removed this file.
+
+ * user-guide.sgml: last change (update the DTD) before I replace
+ this had-edited version with the normalized one.
+
+2001-10-29 Mark Galassi <rosalia@galassi.org>
+
+ * user-guide-normalized.sgml: put this in because it satisfies all
+ the little nitpicks on other systems.
+
+2001-10-21 Mark Galassi <rosalia@galassi.org>
+
+ * user-guide.sgml: more fixes; the HTML seems quite correct.
+
+ * *.gif: added all .gif files to CVS.
+
+ * user-guide.sgml: validates!!
+
+ * user-guide.sgml: 85% validates now.
+
+2001-10-20 Mark Galassi <rosalia@galassi.org>
+
+ * user-guide.sgml: now into part III for the touch-up work.
+
+ * user-guide.sgml: did more fixing up.
diff --git a/cesar/ecos/doc/sgml/user-guide/config-tool.sgml b/cesar/ecos/doc/sgml/user-guide/config-tool.sgml
new file mode 100755
index 0000000000..07578366f0
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/config-tool.sgml
@@ -0,0 +1,1520 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- config-tool.sgml -->
+<!-- -->
+<!-- eCos User Guide -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part ID="THE-ECOS-CONFIGURATION-TOOL">
+<TITLE>The eCos Configuration Tool</TITLE>
+
+<!-- {{{ Getting Started -->
+
+<CHAPTER id="config-tool-getting-started">
+<TITLE>Getting Started</TITLE>
+
+<!-- ====================================================================== -->
+
+<SECT1 id="config-tool-getting-started-intro">
+<TITLE>Introduction</TITLE>
+
+<PARA> The <productname>eCos</productname> <application>Configuration Tool</application> is used
+ to tailor <productname>eCos</productname> at source level, prior to compilation or
+ assembly, and provides a configuration file and a set of
+ files used to build user applications. The sources and other
+ files used for building a configuration are provided in a
+ <EMPHASIS>component repository</EMPHASIS>, which is loaded
+ when the <productname>eCos</productname> <APPLICATION>Configuration Tool</APPLICATION>
+ is invoked. The component repository includes a set of files
+ defining the structure of relationships between the
+ <application>Configuration Tool</application> and other components, and is written in a
+ <FIRSTTERM>Component Definition Language</FIRSTTERM> (<ACRONYM>CDL</ACRONYM>).
+ For a description of the concepts underlying component
+ configuration, see <xref linkend="cdl-concepts">.</PARA>
+</SECT1>
+
+<!-- ====================================================================== -->
+
+<SECT1 id="config-tool-invoking">
+<TITLE>Invoking the <productname>eCos</productname> <application>Configuration Tool</application></TITLE>
+
+<SECT2>
+<TITLE>On Linux</TITLE>
+
+<PARA>Add the <productname>eCos</productname> <application>Configuration Tool</application> install directory to your PATH, for example:</PARA>
+
+<PROGRAMLISTING>
+export PATH=/opt/ecos/ecos<replaceable>&Version;</replaceable>/bin:$PATH
+</PROGRAMLISTING>
+
+<PARA>You may run configtool with zero, one or two arguments. You can specify the <productname>eCos</productname> repository
+ location, and/or an <productname>eCos</productname> save file (extension .ecc) on the command line. The ordering of these
+two arguments is not significant. For example:</PARA>
+
+<PROGRAMLISTING>
+configtool /opt/ecos/ecos<replaceable>&Version;</replaceable>/packages myfile.ecc
+</PROGRAMLISTING>
+
+<PARA>The <application>Configuration Tool</application> will be displayed (see <xref linkend="figure-configuration-tool">).</PARA>
+</SECT2>
+
+<SECT2>
+<TITLE>On Windows</TITLE>
+
+<PARA>There are two ways in which to invoke the <productname>eCos</productname> <application>Configuration Tool</application>:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA> from the desktop explorer or program set up at installation
+ time (by default
+ <EMPHASIS>Start</EMPHASIS>
+ -&gt;
+ <EMPHASIS>Programs</EMPHASIS>
+ -&gt;
+ <EMPHASIS>eCos</EMPHASIS>
+ -&gt;
+ <EMPHASIS>Configuration Tool</EMPHASIS>
+ ).</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>type (at a command prompt or in the
+ <EMPHASIS>Start</EMPHASIS>
+ menu&rsquo;s
+ <EMPHASIS>Run</EMPHASIS>
+ item): &lt;foldername&gt;&bsol;ConfigTool.exe where &lt;foldername&gt; is
+ the full path of the directory in which you installed the <productname>eCos</productname>
+ <application>Configuration Tool</application>.</PARA>
+<!--
+<para>
+XXXXX Change location of configtool in line with installation
+ instructions. XXXXX
+</para>
+-->
+
+</LISTITEM>
+<LISTITEM>
+<PARA>The
+ <application>Configuration Tool</application>
+ will be displayed (see <xref linkend="figure-configuration-tool">).</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+
+<PARA>
+You may run configtool with zero, one or two arguments. You can specify the <productname>eCos</productname> repository
+location, and/or an <productname>eCos</productname> save file (extension .ecc) on the command line. The ordering of these
+two arguments is not significant. For example:</PARA>
+
+<PROGRAMLISTING>
+configtool "c:\Program Files\eCos\packages" myfile.ecc
+</PROGRAMLISTING>
+
+<!--
+ <para>
+XXXXX Change location of eCos in line with installation instructions. XXXXX
+ </para>
+-->
+
+<PARA>If you invoke the configuration tool from the command line with
+<EMPHASIS>--help</EMPHASIS>, you will see this output:</PARA>
+
+<PROGRAMLISTING>
+Usage: eCos Configuration Tool [-h] [-e] [-v] [-c] [input file 1] [input file 2]
+ -h --help displays help on the command line parameters
+ -e --edit-only edit save file only
+ -v --version print version
+ -c --compile-help compile online help only
+</PROGRAMLISTING>
+
+<PARA>This summarizes valid parameters and switches. Switches are shown with
+both short form and long form.</PARA>
+
+<PARA><EMPHASIS>--help</EMPHASIS> shows valid options and parameters, as above.</PARA>
+
+<PARA><EMPHASIS>--edit-only</EMPHASIS> runs the <application>Configuration Tool</application> in a mode that
+suppresses creation of a build tree, in case you only want to create and edit save files.</PARA>
+
+<PARA><EMPHASIS>--version</EMPHASIS> shows version and build date information, and exits.</PARA>
+
+<PARA><EMPHASIS>--compile-help</EMPHASIS> compiles help contents files from the HTML documentation
+files that the tool finds in the <productname>eCos</productname> repository, and exits.</PARA>
+
+<FIGURE id="figure-configuration-tool">
+<TITLE><application>Configuration Tool</application></TITLE>
+<GRAPHIC ENTITYREF="graphic1"></GRAPHIC>
+</FIGURE>
+</SECT2>
+</SECT1>
+
+<!-- ====================================================================== -->
+
+
+<SECT1 id="config-tool-component-repository">
+<TITLE>The Component Repository</TITLE>
+<PARA>When you invoke the <productname>eCos</productname> <application>Configuration Tool</application>, it accesses the Component
+ Repository, a read-only location of configuration
+ information. For an explanation of &ldquo;Component
+ Repository&rdquo; see <xref linkend="cdl-concepts">.</PARA>
+<PARA>The <productname>eCos</productname> <application>Configuration Tool</application> will look
+ for a component repository using (in descending order of preference):</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>A location specified on the command line
+</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>The component repository most recently used by the
+current user</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>An <productname>eCos</productname> distribution under <filename>/opt/ecos</filename> (under
+Linux) or a default location set by the installation procedure (under
+Windows)</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>User input</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+<PARA>The final case above will normally only occur if the previous
+ repository has been moved or (under Windows) installation information stored in
+ the Windows registry has been modified; it will result in a dialog box
+being displayed that allows you to specify the repository location:</PARA>
+<FIGURE>
+<TITLE>Repository relocation dialog box</TITLE>
+<GRAPHIC ENTITYREF="graphic2"></GRAPHIC>
+</FIGURE>
+<PARA>Note that in order to use the <productname>eCos</productname> <application>Configuration Tool</application> you are obliged to provide a
+ valid repository location. </PARA>
+<PARA>In the rare event that you subsequently wish to change
+ the component location, select
+ <EMPHASIS>Build</EMPHASIS>-&gt;<EMPHASIS>Repository</EMPHASIS>
+ and the above dialog box will then be displayed.</PARA>
+<PARA>You can check the location of the current repository, the current save file
+path, and the current hardware template and default package,
+by selecting <EMPHASIS>Help</EMPHASIS>-&gt;<EMPHASIS>Repository Information...</EMPHASIS>.
+A summary will be displayed.</PARA>
+</SECT1>
+
+<!-- ====================================================================== -->
+
+
+<SECT1 ID="config-tool-documents">
+<TITLE><productname>eCos</productname> <application>Configuration Tool</application> Documents</TITLE>
+<SECT2>
+<TITLE>Configuration Save File</TITLE>
+<PARA><productname>eCos</productname> configuration settings and other information
+ (such as disabled conflicts) that are set using the
+ <productname>eCos</productname> <application>Configuration Tool</application> are saved to
+ a file between sessions. By default, when the
+ <productname>eCos</productname> <application>Configuration Tool</application> is first
+ invoked, it reads and displays information from the
+ Component Registry and displays the information in an
+ untitled blank document. You can perform the following
+ operations on a document:</PARA>
+<SECT3>
+<TITLE>Save the currently active document</TITLE>
+<PARA>Use the &ldquo;<EMPHASIS>File-&gt;Save</EMPHASIS>&rdquo; menu
+ item or click the <EMPHASIS>Save Document</EMPHASIS> icon on the
+ toolbar; if the current document is unnamed, you will be prompted
+ to supply a name for the configuration save file.</PARA>
+<FIGURE>
+<TITLE>Save As dialog box</TITLE>
+<GRAPHIC ENTITYREF="graphic3"></GRAPHIC>
+</FIGURE>
+</SECT3>
+<SECT3>
+<TITLE>Open an existing document</TITLE>
+<PARA>Select <EMPHASIS>File</EMPHASIS>-&gt;<EMPHASIS>Open</EMPHASIS>,
+ or click the <EMPHASIS>Open Document</EMPHASIS> icon on the toolbar.
+ You will be prompted to supply a name for the configuration save
+ file. </PARA>
+<FIGURE>
+<TITLE>Open dialog box</TITLE>
+<GRAPHIC ENTITYREF="graphic4"></GRAPHIC>
+</FIGURE>
+</SECT3>
+<SECT3>
+<TITLE>Open a document you have used recently</TITLE>
+<PARA>Click its name at the bottom of the
+ <EMPHASIS>File</EMPHASIS> menu. </PARA>
+<PARA>Documents may also be opened by:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>double-clicking a Configuration Save File in the desktop
+explorer (Windows only);</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>invoking the <productname>eCos</productname>
+<application>Configuration Tool</application>
+with the name of a Configuration File as command-line argument,
+or by creating a shortcut to the <productname>eCos</productname> <application>Configuration Tool</application> with such an argument
+(under Windows or a suitable Linux desktop environment).</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+</SECT3>
+<SECT3>
+<TITLE>Create a new blank document based on the Component
+ Registry</TITLE>
+<PARA>Select <EMPHASIS>File</EMPHASIS>-&gt;<EMPHASIS>New</EMPHASIS>,
+or click the <EMPHASIS>New Document</EMPHASIS> icon on the toolbar.</PARA>
+</SECT3>
+<SECT3>
+<TITLE>Save to a different file name</TITLE>
+<PARA>Select <EMPHASIS>File</EMPHASIS>-&gt;<EMPHASIS>Save
+ As</EMPHASIS>. You will be prompted to supply a new
+ name for the configuration save file.</PARA>
+</SECT3>
+</SECT2>
+<SECT2>
+<TITLE>Build and Install Trees</TITLE>
+<PARA>The location of the build and install trees are
+ derived from the <productname>eCos</productname> save file name as illustrated in the
+ following example:</PARA>
+<PARA>Save file name = &ldquo;c:&bsol;My
+ eCos&bsol;config1.ecc&rdquo;</PARA>
+<PARA>Install tree folder = &ldquo;c:&bsol;My
+ eCos&bsol;config1_install&rdquo;</PARA>
+<PARA>Build tree folder = &ldquo;c:&bsol;My
+ eCos&bsol;config1_build&rdquo;</PARA>
+<PARA>These names are automatically generated from the name
+ of the save file.</PARA>
+<PARA>See also <xref linkend="cdl-concepts">.</PARA>
+</SECT2>
+</SECT1>
+</CHAPTER>
+
+<!-- }}} -->
+<!-- {{{ Getting Help -->
+
+<CHAPTER id="config-tool-getting-help">
+<TITLE>Getting Help</TITLE>
+
+<PARA>The <productname>eCos</productname> <application>Configuration Tool</application> contains
+several methods for accessing online help.</PARA>
+
+<!-- ================================================== -->
+
+<SECT1 id="config-tool-context-help-dialogs">
+
+<TITLE>Context-sensitive Help for Dialogs</TITLE>
+<PARA>Most dialogs displayed by the <productname>eCos</productname> <application>Configuration Tool</application> are supplied
+with context-sensitive help. You can then get help relating
+to any control within the current dialog box by</PARA>
+
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>Right-clicking the control (or pressing
+ <EMPHASIS>F1</EMPHASIS>
+ )</PARA>
+<PARA>A &ldquo;What&rsquo;s This?&rdquo; popup menu will
+ be displayed. Click the menu to display a brief description of the
+ function of the selected control.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Clicking the question mark icon in the dialog
+ caption bar (Windows) or the question mark button on the dialog (Linux).</PARA>
+<PARA>A question mark cursor will be displayed. Click on
+ any control to display a brief description of its
+ function.</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+<PARA>Some dialogs may have a <EMPHASIS>Help</EMPHASIS>
+ button. You can press this to display a more general
+ description of the function of the dialog box as a whole.
+ This help will be in HTML form; for more information, see
+ below.</PARA>
+</SECT1>
+
+<!-- ================================================== -->
+
+<SECT1 id="config-tool-context-help-otherwin">
+<TITLE>Context-sensitive Help for Other Windows</TITLE>
+<PARA>In the <EMPHASIS>Help</EMPHASIS> menu, click
+ <EMPHASIS>Help On...</EMPHASIS>
+<!--
+ (or press
+ <EMPHASIS>F1</EMPHASIS>)
+-->
+and then click on a window (or click on the arrow/question mark button
+on the toolbar, then click on a window). A small popup window page describing the
+window will be displayed. The same thing can be achieved by right-clicking
+on a window and clicking on <EMPHASIS>What's This?</EMPHASIS>.
+<!--
+ This help will normally be in HTML format; for more
+ information, see <xref linkend="methods-of-displaying-html-help">.
+-->
+</PARA>
+</SECT1>
+<SECT1 id="config-tool-context-help-config-items">
+<TITLE>Context-sensitive Help for Configuration Items</TITLE>
+<PARA>In the configuration window, right-click on a configuration
+item (or use <EMPHASIS>Shift+F10</EMPHASIS>). A context
+menu will be displayed; select <EMPHASIS>Visit Documentation</EMPHASIS>
+to display the page in the <productname>eCos</productname> documentation that most closely
+corresponds to the selected item.</PARA>
+</SECT1>
+
+<SECT1 id="methods-of-displaying-html-help">
+<TITLE>Methods of Displaying HTML Help</TITLE>
+
+<ORDEREDLIST>
+
+<LISTITEM>
+<PARA>
+Using the internal help system. This will show an internal viewer similar to Microsoft HTML Help, with a contents
+hierarchy on the left and HTML pages on the right; see <xref linkend="figure-help-viewer">. The index is regenerated for each repository. If the documentation in
+the repository has changed but the contents does not reflect this, please use the Tools Regenerate Help Index menu
+item.
+</PARA>
+</LISTITEM>
+
+<LISTITEM>
+<PARA>
+Using the default HTML browser. On Unix, you will need a .mailcap entry similar to this:
+</PARA>
+
+<PARA>
+<PROGRAMLISTING>
+text/html; netscape -no-about-splash %s
+</PROGRAMLISTING>
+</PARA>
+</LISTITEM>
+
+<LISTITEM>
+<PARA>
+Using the specified browser.
+</PARA>
+</LISTITEM>
+
+</ORDEREDLIST>
+
+
+<FIGURE id="figure-help-viewer">
+<TITLE>HTML Help viewer</TITLE>
+<GRAPHIC ENTITYREF="graphic5"></GRAPHIC>
+</FIGURE>
+<PARA>If you wish, you may choose to have <EMPHASIS>HTML Help</EMPHASIS> displayed
+in a browser of your choice. To do this, select <EMPHASIS>View</EMPHASIS>-&gt;<EMPHASIS>Settings</EMPHASIS> and
+use the controls in the View Documentation group to select the replacement browser.
+Note that the Navigation facilities of the built-in <EMPHASIS>HTML
+Help</EMPHASIS> system will be unavailable if you choose this method
+of displaying help.</PARA>
+</SECT1>
+</CHAPTER>
+
+<!-- }}} -->
+<!-- {{{ Customization -->
+
+<CHAPTER id="config-tool-customization">
+<TITLE>Customization</TITLE>
+<PARA>The following visual aspects of the <productname>eCos</productname> <application>Configuration Tool</application> can be changed to suit
+ individual preferences. These aspects are saved on a per-user
+ basis, so that when the <productname>eCos</productname> <application>Configuration Tool</application> is next invoked by the same
+ user, the appearance will be as set in the previous
+ session.</PARA>
+<SECT1 id="config-tool-window-placement">
+<TITLE>Window Placement</TITLE>
+<PARA>The relative sizes of all windows in the <productname>eCos</productname> <application>Configuration Tool</application> may be adjusted by dragging
+ the splitter bars that separate the windows. The chosen
+ sizes will be used the next time the <productname>eCos</productname> <application>Configuration Tool</application> is invoked by the current
+ user. </PARA>
+<PARA>All windows except the <EMPHASIS>Configuration
+ Window</EMPHASIS> may be shown or hidden by using the
+ commands under the <EMPHASIS>View</EMPHASIS> menu (for
+ example, <EMPHASIS>View-&gt;Output</EMPHASIS>) or the
+ corresponding keyboard accelerators
+ (<EMPHASIS>Alt+1</EMPHASIS> to
+ <EMPHASIS>Alt+4</EMPHASIS>).
+<!--
+By default the
+conflicts window is hidden.
+-->
+</PARA>
+<PARA>Your chosen set of windows (and their relative sizes) will
+be preserved between invocations of the <productname>eCos</productname> <application>Configuration
+Tool</application>.</PARA>
+</SECT1>
+<!--
+<SECT1 id="config-tool-toolbars">
+<TITLE>Toolbars</TITLE>
+<PARA>Select
+ <EMPHASIS>View</EMPHASIS>-&gt;<EMPHASIS>Toolbars</EMPHASIS>:
+ each of the standard and Memory Layout toolbars may be
+ hidden or shown.</PARA>
+</SECT1>
+-->
+<SECT1 id="config-tool-settings">
+<TITLE>Settings</TITLE>
+<PARA>To change other visual aspects, select
+ <EMPHASIS>View</EMPHASIS>-&gt;<EMPHASIS>Settings</EMPHASIS>
+ and then select the <EMPHASIS>Display</EMPHASIS> and
+ <EMPHASIS>View</EMPHASIS> tabs depending on the settings
+ you wish to alter..
+ The options are as follows:
+</PARA>
+
+
+<SECT2>
+<TITLE>Settings: Display tab</TITLE>
+
+<FIGURE>
+<TITLE>Settings dialog, Display tab</TITLE>
+<GRAPHIC ENTITYREF="graphic32"></GRAPHIC>
+</FIGURE>
+
+<SECT3>
+<TITLE>Labels</TITLE>
+
+<PARA>In the configuration window, you can choose to have
+ either <EMPHASIS>descriptive names</EMPHASIS> (the
+ default) or <EMPHASIS>macro names</EMPHASIS> displayed as
+ tree item labels. Descriptive names are generally more
+ comprehensible, but macro names are used in some contexts
+ such as conflict resolution and may be directly related to
+ the source code of the configuration. Note that it is
+ possible to search for an item in the configuration view
+ by selecting
+ <EMPHASIS>Find</EMPHASIS>-&gt;<EMPHASIS>Edit</EMPHASIS>
+ (see <xref linkend="config-tool-searching">). Both
+ descriptive names and macro names can be searched.</PARA>
+</SECT3>
+
+<SECT3>
+<TITLE>Integer Items</TITLE>
+<PARA>You can choose to have integer items in the
+ Configuration Window displayed in decimal or hexadecimal
+ format.</PARA>
+</SECT3>
+
+<SECT3>
+<TITLE>Font</TITLE>
+
+<PARA>
+Change the font for a particular window by selecting the window name using the drop-down list,
+then clicking on <EMPHASIS>Change Font</EMPHASIS> to select a font for that
+window. The changes will be applied when the press <EMPHASIS>OK</EMPHASIS> to dismiss the Settings dialog.
+If you never make font changes, then the windows will take
+the default setting determined by your current Windows or Unix environment.
+</PARA>
+</SECT3>
+
+<SECT3>
+<TITLE>Miscellaneous</TITLE>
+
+<PARA>
+If the <EMPHASIS>Splash Screen</EMPHASIS> checkbox is checked, a <EMPHASIS>splash</EMPHASIS>
+window will appear as the application is loading. Uncheck this to eliminate the splash screen.
+</PARA>
+
+</SECT3>
+</SECT2>
+
+<SECT2>
+<TITLE>Settings: Viewers tab</TITLE>
+
+<FIGURE>
+<TITLE>Settings dialog, Viewers tab</TITLE>
+<GRAPHIC ENTITYREF="graphic6"></GRAPHIC>
+</FIGURE>
+
+<SECT3>
+<TITLE>View header files</TITLE>
+
+<PARA>You can change the viewer used to display header files.</PARA>
+</SECT3>
+
+<SECT3>
+<TITLE>View documentation</TITLE>
+
+<PARA>You can change the viewer used to display HTML files.
+See <xref linkend="methods-of-displaying-html-help">.
+</PARA>
+
+
+
+</SECT3>
+
+</SECT2>
+
+</SECT1>
+</CHAPTER>
+
+<!-- }}} -->
+<!-- {{{ Screen Layout -->
+
+<CHAPTER id="config-tool-screen-layout">
+<TITLE>Screen Layout</TITLE>
+<PARA>The following windows are available within the
+ <productname>eCos</productname> <application> Configuration
+ Tool</application>:
+ </PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA> Configuration Window</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Properties Window</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Short Description</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Conflicts</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Output</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+
+<PARA>The layout of the windows may be adjusted to suit your
+ preferences: see <xref linkend="config-tool-settings">.</PARA>
+
+<SECT1 id="config-tool-configuration-window">
+<TITLE>Configuration Window</TITLE>
+<PARA>This is the principal window used to configure <productname>eCos</productname>. It
+ takes the form of a tree-based representation of the
+ configuration items within the currently loaded <productname>eCos</productname>
+ packages.</PARA>
+<PARA>In the case of items whose values may be changed,
+ controls are available to set the item values. These either
+ take the form of check boxes or radio buttons within the
+ tree itself or cells to the right of the thin vertical
+ splitter bar. Controls in the tree may be used in the usual
+ way; cells, however, must first be activated.</PARA>
+<PARA>To activate a cell, simply click on it: it will assume a sunken
+appearance and data can then be edited in the cell. To terminate
+in-cell editing, click elsewhere in the configuration window or
+press <EMPHASIS>ENTER</EMPHASIS>. To discard the partial results
+of in-cell editing and revert to the previous value, press <EMPHASIS>ESCAPE</EMPHASIS>.
+<!-- Not yet implemented
+Note that an asterisk appears against configuration items which have changed since the configuration
+was last saved.
+-->
+</PARA>
+<PARA><GRAPHIC ENTITYREF="graphic7"></GRAPHIC></PARA>
+<PARA>Cells come in three varieties, according to the type of
+ data they accept:</PARA>
+<TABLE>
+<TITLE>Cell types</TITLE>
+<TGROUP COLS="2">
+<THEAD>
+<ROW>
+<ENTRY>Cell Type</ENTRY>
+<ENTRY><PARA>Data Accepted</PARA></ENTRY>
+</ROW>
+</THEAD>
+<TBODY>
+<ROW>
+<ENTRY>Integer</ENTRY>
+<ENTRY>Decimal or hexadecimal values</ENTRY>
+</ROW>
+<ROW>
+<ENTRY>Floating Point</ENTRY>
+<ENTRY>Floating point values</ENTRY>
+</ROW>
+<ROW>
+<ENTRY>String</ENTRY>
+<ENTRY>Any</ENTRY>
+</ROW>
+</TBODY>
+</TGROUP>
+</TABLE><!--
+<row>
+<cell><normal>Integer</normal></cell><cell><normal>Decimal or hexadecimal
+values</normal></cell></row>
+<row>
+<cell><normal>Floating Point</normal></cell><cell><normal>Floating
+point values</normal></cell></row>
+<row>
+<cell><normal>String</normal></cell><cell><normal>Any</normal></cell></row>
+</body></formata>
+-->
+<PARA>In the case of string cells, you can double-click the cell
+to display a dialog box containing a larger region in which to edit
+the string value. This is useful in the case of long strings, or
+those spanning multiple lines.</PARA>
+<SECT2>
+<TITLE>Disabled items</TITLE>
+<PARA>Some items will appear disabled. In this case the item
+ label and any associated controls and cells will be
+ grayed. It is not be possible to change the values of
+ disabled items.</PARA>
+<SECT3>
+<TITLE>Right-Clicking</TITLE>
+<PARA>You can right-click on an item in the configuration
+ window item to display a pop-up menu which (depending on
+ the type of the item selected) allows you to:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA> <EMPHASIS>Properties</EMPHASIS> &ndash;
+ information relating to the currently selected item
+ is displayed. The information is equivalent to that
+ displayed in the Properties
+ Window.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> <EMPHASIS>Restore Defaults</EMPHASIS> -
+ the default value of the currently selected item is
+ restored.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA><EMPHASIS>Visit Documentation</EMPHASIS>
+ - causes the HTML page most closely relating to the
+ currently selected item to be displayed. This has
+ the same effect as double-clicking the URL property
+ in the Properties Window.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> <EMPHASIS>View Header File</EMPHASIS>
+ &ndash; this causes the file containing the items to
+ be displayed. This is equivalent to double-clicking
+ on the File property in the Properties Window. The
+ viewer used for this purpose may be changed using
+ the <EMPHASIS>View-&gt;Settings</EMPHASIS> menu item
+ (see <xref linkend="config-tool-settings">).
+ Note that this operation is only possible when the
+ current configuration is saved, in order to avoid
+ the possibility of changing the source
+ repository.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA><EMPHASIS>Unload Package</EMPHASIS> -
+ this is equivalent to using the
+ <EMPHASIS>Build-&gt;Packages</EMPHASIS> menu item to
+ select and unload the package in
+ question.</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+</SECT3>
+</SECT2>
+<SECT2>
+<TITLE>Conflicts Window</TITLE>
+<PARA>This window exists to display any configuration item
+ conflicts. Conflicts are the result of failures to meet
+ the requirements between configuration items expressed in
+ the CDL. See <xref linkend="cdl-conflicts"> <!--in &ldquo;CDL
+ Concepts&rdquo; on&nbsp;page&nbsp;45 -->.<GRAPHIC ENTITYREF="graphic8"></GRAPHIC></PARA>
+<PARA>The window comprises three columns:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA> <EMPHASIS>Item</EMPHASIS></PARA>
+<PARA>This is the macro name of the first item involved
+ in the conflict.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>
+ <EMPHASIS>Conflict</EMPHASIS></PARA>
+<PARA>This is a description of the conflict type. The currently
+ supported types are &ldquo;unresolved&rdquo;, &ldquo;illegal
+ value&rdquo;, &ldquo;evaluation exception&rdquo;, &ldquo;goal
+ unsatisfied&rdquo; and &ldquo;bad data&rdquo;.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>
+ <EMPHASIS>Property</EMPHASIS></PARA>
+<PARA>This contains a description of the configuration
+ item&rsquo;s property that caused the conflict.</PARA>
+<PARA>Within the conflicts window you can right-click on
+ any item to display a context menu which allows you to
+ choose from one of the following options:</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+
+<PARA>To locate the item involved in the
+conflict, double-click in the first or third column, or
+right-click over the item and choose <EMPHASIS>Locate</EMPHASIS>
+from the popup menu.
+</PARA>
+
+<PARA>You can use the <EMPHASIS>Tools-&gt;Resolve Conflicts</EMPHASIS> menu
+item, or right-click over the item and select <EMPHASIS>Resolve</EMPHASIS> from the popup menu,
+to resolve conflicts &mdash; <xref linkend="resolving-conflicts">.</PARA>
+<SECT3>
+<TITLE>Output Window</TITLE>
+<PARA>This window displays any output generated by
+ execution of external tools and any error messages that
+ are not suitable for display in other forms (for
+ example, as message boxes).</PARA>
+<PARA>Within the output window you can right-click to display a
+context menu which allows you to:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>Save the contents of the window to a
+ file</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Clear the contents of the
+ window</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+</SECT3>
+<SECT3>
+<TITLE>Properties Window</TITLE>
+<PARA>This window displays the CDL properties of the item
+ currently selected in the configuration window. The same
+ information may be displayed by right-clicking the item
+ and selecting &ldquo;properties&rdquo;.</PARA>
+<PARA> <GRAPHIC ENTITYREF="graphic9"></GRAPHIC></PARA>
+<PARA>Two properties may be double-clicked as
+ follows:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA><EMPHASIS>URL</EMPHASIS> &ndash;
+ double-clicking on a URL property causes the
+ referenced HTML page to be displayed. This has the
+ same effect as right-clicking on the item and
+ choosing &ldquo;Visit
+ Documentation&rdquo;.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA><EMPHASIS>File</EMPHASIS> &ndash;
+ double-clicking on a File property in a saved
+ configuration causes the File to be displayed. The
+ viewer used for this purpose may be changed using
+ the <EMPHASIS>View-&gt;Settings</EMPHASIS> menu
+ item. Note that this operation is only possible when
+ the current configuration is saved, in order to
+ avoid the possibility of changing the source
+ repository.</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+</SECT3>
+<SECT3>
+<TITLE>Short Description Window</TITLE>
+<PARA>This window displays a short description of the item
+ currently selected in the configuration window. More
+ extensive documentation may be available by
+ right-clicking on the item and choosing &ldquo;Visit
+ Documentation&rdquo;.</PARA>
+</SECT3>
+</SECT2>
+</SECT1>
+</CHAPTER>
+
+<!-- }}} -->
+<!-- {{{ Updating and Configuration -->
+
+<CHAPTER id="config-tool-updating-configuration">
+<TITLE>Updating the Configuration</TITLE>
+<SECT1 id="config-tool-adding-removing-packages">
+<TITLE>Adding and Removing Packages</TITLE>
+<PARA>To add or remove packages from the configuration, select
+ <EMPHASIS>Build</EMPHASIS>-&gt;<EMPHASIS>Packages</EMPHASIS>.<!--<conditionaltext>-->
+ The following dialog box will be displayed:</PARA>
+<FIGURE>
+<TITLE>Packages dialog box</TITLE>
+<GRAPHIC ENTITYREF="graphic14"></GRAPHIC>
+</FIGURE>
+<PARA>The left-hand list shows those packages that are available to
+ be loaded. The right-hand list shows those that are
+ currently loaded. In order to transfer packages from one
+ list to another (that is, to load or unload packages)
+ double-click the selection or click the
+ <EMPHASIS>Add</EMPHASIS> or <EMPHASIS>Remove</EMPHASIS>
+ buttons.</PARA>
+
+<PARA>The version drop-down list displays the versions of the
+ selected packages. When loading packages, this control may
+ be used to load versions other than the most recent
+ (current). Note that if more than one package is selected,
+ the version drop-down list will display only the versions
+ common to all the selected packages.</PARA>
+
+<PARA>The window under the version displays a brief
+ description of the selected package. If more than one
+ package is selected, this window will be blank.</PARA>
+
+<PARA>
+ Under the description window there is a <EMPHASIS>Keywords</EMPHASIS>
+control into which you can type a string to be matched against
+package names, macro names and descriptions. The lists are updated
+a second or so after typing has stopped.
+If you type several separate words,
+all of these words must be associated with a given package
+for that package to be displayed. If you select
+the <EMPHASIS>Match exactly</EMPHASIS> checkbox, then the string
+is taken to be a complete fragment and matched against the beginning
+of a name, macro name or descriptions. All matches are done
+case-insensitively.</PARA>
+
+<PARA>
+If you check <EMPHASIS>Omit hardware packages</EMPHASIS>, only
+non-hardware packages will be shown.
+</PARA>
+
+</SECT1>
+<SECT1 id="config-tool-platform-selection">
+<TITLE>Platform Selection</TITLE>
+<PARA>To add, modify or remove entries in the list of
+ platforms used for running tests, select
+ <EMPHASIS>Tools-&gt;Platforms</EMPHASIS>. The following
+ dialog will be displayed:</PARA>
+<FIGURE>
+<TITLE>Platforms dialog box</TITLE>
+<GRAPHIC ENTITYREF="graphic15"></GRAPHIC>
+</FIGURE>
+<PARA>You may add, modify or remove platform entries as you
+ wish, but in order to run tests, a platform must be defined
+ to correspond to the currently loaded hardware template. The
+ information associated with each platform name is used to
+ run tests.</PARA>
+<PARA>To modify a platform, click the
+ <EMPHASIS>Modify</EMPHASIS> button with the appropriate
+ platform selected, or double-click on an entry in the list.
+ A dialog will be displayed that allows you to change the
+ command prefix, platform type and arguments for
+ <EMPHASIS>GDB</EMPHASIS>. </PARA>
+<FIGURE>
+<TITLE>Platform Modify dialog box</TITLE>
+<GRAPHIC ENTITYREF="graphic16"></GRAPHIC>
+</FIGURE>
+<PARA>To add a new platform, click the
+ <EMPHASIS>Add</EMPHASIS> button. A similar dialog will be
+ displayed that allows you to define a new platform. To
+ remove a platform, click the <EMPHASIS>Delete</EMPHASIS>
+ button or press the <EMPHASIS>DEL</EMPHASIS> key with the
+ appropriate platform selected.</PARA>
+
+<PARA>The command prefix is used when running tests in order
+ to determine the names of the executables (such as gdb) to
+ be used. For example, if the gdb executable name is
+ &ldquo;arm-elf-gdb.exe&rdquo; the prefix should be set to
+ &ldquo;arm-elf&rdquo;.</PARA>
+<PARA>The platform type indicates the capabilities of the platform
+- whether it is hardware or a simulator, and whether breakpoints
+are supported.</PARA>
+<PARA>The arguments for the <EMPHASIS>GDB</EMPHASIS> field allow
+additional arguments to be passed to gdb when it is used to run
+a test. This is typically used in the case of simulators linked
+to gdb in order to define memory layout.</PARA>
+</SECT1>
+<SECT1 id="config-tool-using-templates">
+<TITLE>Using Templates</TITLE>
+<PARA>To load a configuration based on a template, select
+ <EMPHASIS>Build</EMPHASIS>-&gt;<EMPHASIS>Templates</EMPHASIS>.<!--<conditionaltext>--></PARA>
+<PARA>The following dialog box will be displayed:</PARA>
+<FIGURE>
+<TITLE>Templates dialog box</TITLE>
+<GRAPHIC ENTITYREF="graphic18"></GRAPHIC>
+</FIGURE>
+<PARA>Change the hardware template, the packages template, or
+ both. To select a hardware template, choose from the first
+ drop-list. To choose a packages template, choose from the
+ second. Brief descriptions of each kind of template are
+ provided in the corresponding edit boxes.</PARA>
+<SECT2 id="resolving-conflicts">
+<TITLE>Resolving conflicts</TITLE>
+<PARA>During the process of configuring <productname>eCos</productname> it is possible
+ that conflicts will be created. For more details of the
+ meaning of conflicts, see <xref linkend="cdl-concepts">.</PARA>
+<PARA>The Conflicts Window displays all conflicts in the
+ current configuration. Additionally, a window in the
+ status bar displays a count of the conflicts. Because the
+ resolution of conflicts can be time-consuming, a mechanism
+ exists whereby conflicts can be resolved
+ automatically.</PARA>
+<PARA>You can choose to have a conflicts resolution dialog
+ box displayed by means of the <EMPHASIS>View-&gt;Settings...
+ <!--<conditionaltext>--></EMPHASIS>menu item, on the <EMPHASIS>Conflict Resolution</EMPHASIS>
+tab of the dialog.</PARA>
+<FIGURE>
+<TITLE>Options</TITLE>
+<GRAPHIC ENTITYREF="graphic19"></GRAPHIC>
+</FIGURE>
+<PARA>You can choose to have conflicts checked under the
+ following circumstances:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>After any item is changed (in other words,
+ as soon as the conflict is created)</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Before saving the configuration (including
+ building)</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Never</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+<PARA>The method you chose depends on how much you need
+ your configuration to be free of conflicts. You may
+ want to avoid having to clean up all the conflicts at
+ once, or you may want to keep the configuration
+ consistent at all times. If you have major changes to
+ implement, which may resolve the conflicts, then you
+ might want to wait until after you have completed
+ these changes before you check for conflicts.</PARA>
+<!-- <label>NOTE</label> -->
+<NOTE>
+<PARA>If you choose to check conflicts after any item
+ is changed, only newly arising conflicts are displayed.
+ If you choose to check for conflicts before saving the
+ configuration, the complete set is
+ displayed.</PARA>
+</NOTE>
+</SECT2>
+<SECT2>
+<TITLE>Automatic resolution</TITLE>
+<PARA>If you check the &ldquo;Automatically suggest
+ fixes&rdquo; check box, a conflicts resolution dialog box
+ will be displayed whenever new conflicts are created. The
+ same dialog box may be displayed at any stage by means of
+ the <EMPHASIS>Tools-&gt;Resolve Conflicts</EMPHASIS>
+ <EMPHASIS><!--<conditionaltext>--></EMPHASIS>menu item.
+ </PARA>
+<PARA>The conflicts resolution dialog box contains two major windows. </PARA>
+<FIGURE>
+<TITLE>Resolve conflicts window</TITLE>
+<GRAPHIC ENTITYREF="graphic20"></GRAPHIC>
+</FIGURE>
+<PARA>The upper contains the set of conflicts to be addressed; the
+format of the data being as that of the Conflicts Window. The lower
+window contains a set of proposed resolutions &ndash; each entry
+is a suggested configuration item value change that as a whole may
+be expected to lead to the currently selected conflict being resolved. </PARA>
+<PARA>Note that there is no guarantee:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>that automatic resolutions will be determinable for every
+conflict.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> that the resolutions for separate conflicts will be independent.
+In other words, the resolution of one conflict may serve to prevent
+the resolution of another.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> that the resolution conflicts will not create further
+conflicts.</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+<PARA>The above warnings are, however, conservative. In practice
+(so long as the number and extent of conflicts are limited) automatic
+conflict resolution may be used to good effect to correct problems
+without undue amounts of programmer intervention.</PARA>
+<PARA>In order to select the conflicts to be applied, select or
+clear the check boxes against the resolutions for each proposed
+resolution. By default all resolutions are selected; you can return
+to the default state (in other words, cause all check boxes for
+each conflict to again become checked) by pressing the &ldquo;Reset&rdquo; button.
+Note that multiple selection may be used in the resolutions control
+to allow ranges of check boxes to be toggled in one gesture.</PARA>
+<PARA>When you are happy to apply the selected resolutions for each
+conflict displayed, click <EMPHASIS>Apply</EMPHASIS>; this will
+apply the resolutions. Alternatively you may cancel from the dialog
+box without any resolutions being applied.</PARA>
+</SECT2>
+</SECT1>
+</CHAPTER>
+
+<!-- }}} -->
+<!-- {{{ Searching -->
+
+<CHAPTER id="config-tool-searching">
+<TITLE>Searching</TITLE>
+<PARA>Select <EMPHASIS>Edit </EMPHASIS>--&gt; <EMPHASIS>Find</EMPHASIS>.
+You will be presented with a Find dialog box:</PARA>
+<FIGURE>
+<TITLE>Find dialog box</TITLE>
+<GRAPHIC ENTITYREF="graphic21"></GRAPHIC>
+</FIGURE>
+<PARA>Using this dialog box you can search for an exact text string
+in any one of three ways, as specified by your selection in the &ldquo;Search
+in&rdquo; drop-list:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>Macro names - the search is for a text match within
+configuration item macro names</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Item names - the search is for a text match within
+configuration item descriptive names</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Short descriptions - the search is for a text match
+within configuration item short descriptions</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+<PARA>Note that to invoke <EMPHASIS>Find</EMPHASIS> you can also
+click the <EMPHASIS>Find</EMPHASIS> icon on the toolbar. </PARA>
+</CHAPTER>
+
+<!-- }}} -->
+<!-- {{{ Building -->
+
+<CHAPTER id="config-tool-building">
+<TITLE>Building</TITLE>
+<PARA>When you have configured <productname>eCos</productname>, you may build the configuration.</PARA>
+<PARA><!--<conditionaltext>-->On the <EMPHASIS>Build</EMPHASIS> menu, click:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>
+<EMPHASIS>Library</EMPHASIS>
+ (or click the Build Library icon on the toolbar) &ndash; this
+causes the <productname>eCos</productname> configuration to be built. The result of a successful
+build will be (among other things) a library against which user
+code can be linked</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>
+<EMPHASIS>Tests</EMPHASIS>
+ &ndash; this causes the <productname>eCos</productname> configuration to be built, and
+additionally builds the relevant test cases linked against the <productname>eCos</productname> library</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>
+<EMPHASIS>Clean</EMPHASIS>
+ &ndash; this removes all intermediate files, thus causing a
+subsequent build/library or build/tests operation
+to cause recompilation of all relevant files.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>
+<EMPHASIS>Stop</EMPHASIS>
+ &ndash; this causes a currently executing build (any of the
+above steps) to be interrupted</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+<PARA>Build options may be displayed by using the <EMPHASIS>Build-&gt;Options</EMPHASIS> menu
+item. This displays a dialog box containing a drop-list control
+and two windows. The drop-list control allows you to select the
+type of build option to be displayed (for example &ldquo;LDFLAGS&rdquo; are
+the options applied at link-time. The left-hand window is a tree
+view of the packages loaded in the current configuration. The right-hand
+window is a list of the build options that will be used for the
+currently selected package.</PARA>
+<PARA>Note that this dialog box currently affords only read-only
+access to the build options. In order to change build options you
+must edit the relevant string configuration item.</PARA>
+<PARA>A single level of inheritance is supported: each package&rsquo;s
+build options are combined with the global options (these are to
+be found in the &ldquo;Global build options&rdquo; folder
+in the configuration view).</PARA>
+<PARA><GRAPHIC ENTITYREF="graphic22"></GRAPHIC></PARA>
+<SECT1 id="config-tool-selecting-build-tools">
+<TITLE>Selecting Build Tools</TITLE>
+<PARA>Normally the installation process will supply the information
+required for the <productname>eCos</productname><APPLICATION>Configuration Tool</APPLICATION> to
+locate the build tools (compiler, linker, etc.) necessary
+to perform a build. However if this information is not registered,
+or it is necessary to specify the location manually (for example,
+when a new toolchain installation has been made), select <EMPHASIS>Tools</EMPHASIS>-&gt;<EMPHASIS>Paths</EMPHASIS>-&gt;<EMPHASIS>Build
+Tools</EMPHASIS>. The following dialog box will be displayed:</PARA>
+<FIGURE>
+<TITLE>Build tools</TITLE>
+<GRAPHIC ENTITYREF="graphic23"></GRAPHIC>
+</FIGURE>
+<PARA>This dialog box allows you to locate the folder containing
+the build tools. </PARA>
+</SECT1>
+<SECT1 id="config-tool-selecting-user-tools">
+<TITLE>Selecting User Tools</TITLE>
+<PARA>Normally the installation process will supply the information
+required for the <productname>eCos</productname><APPLICATION>Configuration Tool</APPLICATION> to
+locate the user tools (cat, ls, etc.) necessary to perform
+a build. However if this information is not registered, or it is
+necessary to specify the location manually (for example, when a
+new toolchain installation has been made), select <EMPHASIS>Tools</EMPHASIS>-&gt;<EMPHASIS>Paths</EMPHASIS>-&gt;<EMPHASIS>User
+Tools</EMPHASIS>. The following dialog box will be displayed:</PARA>
+<FIGURE>
+<TITLE>User tools</TITLE>
+<GRAPHIC ENTITYREF="graphic24"></GRAPHIC>
+</FIGURE>
+</SECT1>
+</CHAPTER>
+
+<!-- }}} -->
+<!-- {{{ Execution -->
+
+<CHAPTER id="config-tool-test-execution"><!--<conditionaltext>-->
+<TITLE>Execution</TITLE>
+<PARA>Test executables that have been linked using the Build/Tests
+operation against the current configuration can be executed by selecting <!--<conditionaltext>--><EMPHASIS>Tools</EMPHASIS>-&gt;<EMPHASIS>Run
+Tests<!--<conditionaltext>--></EMPHASIS>.</PARA>
+<PARA>When tests are run, the <application>Configuration Tool</application> looks
+for a platform name corresponding to the currently loaded hardware template.
+If no such platform is found, a dialog will be displayed for you
+to define one; this dialog is similar to that displayed by the <EMPHASIS>Add</EMPHASIS> function
+in the <EMPHASIS>Tools-&gt;Platforms</EMPHASIS> dialog, but
+in this case the platform name cannot be changed.</PARA>
+<PARA>When a test run is invoked, a property sheet is displayed,
+comprising three tabs: <EMPHASIS>Executables</EMPHASIS>, <EMPHASIS>Output</EMPHASIS> and <EMPHASIS>Summary</EMPHASIS>.</PARA>
+<PARA>Note that the property sheet is resizable.</PARA>
+<PARA>Three buttons appear on the property sheet itself: <EMPHASIS>Run/Stop</EMPHASIS>, <EMPHASIS>Close</EMPHASIS> and <EMPHASIS>Properties</EMPHASIS>.</PARA>
+<PARA>The <EMPHASIS>Run</EMPHASIS> button is used to initiate a
+test run. Those tests selected on the <EMPHASIS>Executables</EMPHASIS> tab
+are run, and the output recorded on the <EMPHASIS>Output</EMPHASIS> and <EMPHASIS>Summary</EMPHASIS> tabs.
+During the course of a run, the <EMPHASIS>Run</EMPHASIS> button
+changes to &ldquo;Stop&rdquo;. The button may be used to interrupt
+a test run at any point.</PARA>
+<SECT1 id="config-tool-test-properties">
+<TITLE>Properties</TITLE>
+<PARA>The <EMPHASIS>Properties</EMPHASIS> button is used to change
+the connectivity properties for the test run.</PARA>
+<FIGURE>
+<TITLE>Properties dialog box</TITLE>
+<GRAPHIC ENTITYREF="graphic25"></GRAPHIC>
+</FIGURE>
+<SECT2>
+<TITLE>Download Timeout</TITLE>
+<PARA> This group of controls serves to set the maximum time that
+ is allowed for downloading a test to the target board. If
+ the time is exceeded, the test will be deemed to have
+ failed for reason of &ldquo;Download Timeout&rdquo; and
+ the execution of that particular test will be abandoned.
+ This option only applies to tests run on hardware, not to
+ those executed in a simulator. Times are in units of
+ elapsed seconds.</PARA>
+<PARA>Three options are available using the drop-down
+ list:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>Calculated from file size - an estimate of the maximum
+time required for download is made using the (stripped) executable
+size and the currently used baud rate</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Specified - a user-specified value may be entered in
+the adjacent edit box</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> None - no maximum download time is to be applied.</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+</SECT2>
+<SECT2>
+<TITLE>Run time Timeout</TITLE>
+<PARA>This group of controls serves to set the maximum time
+ that is allowed for executing a test on the target board
+ or in a simulator. If the time is exceeded, the test will
+ be deemed to have failed for reason of
+ &ldquo;Timeout&rdquo; and the execution of that particular
+ test will be abandoned. In the case of hardware, the time
+ is measured in elapsed seconds: in the case of a simulator
+ it is in CPU seconds.</PARA>
+<PARA>Three options are available using the drop-down
+ list:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>None - no maximum download time is to be
+ applied.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Specified - a user-specified value may be
+ entered in the adjacent edit box</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Default - a default value of 30 seconds is
+ used</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+</SECT2>
+<SECT2>
+<TITLE>Connection</TITLE>
+<PARA>The <EMPHASIS>Connection</EMPHASIS> controls may be used
+ to specify how the target board is to be accessed.</PARA>
+
+<PARA>If the target board is connected using a serial cable, the <EMPHASIS>Serial</EMPHASIS> radio
+button should be checked. In this case you can select a port (COM1,
+COM2, &hellip;) and an appropriate baud rate using drop-list boxes.</PARA>
+<PARA>If the target board is accessed remotely using GDB remote
+protocol, the &ldquo;TCP/IP&rdquo; radio button should
+be checked. In this case you can select a host name and TCP/IP port
+number using edit boxes.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Executables Tab</TITLE>
+<PARA>This is used to adjust the set of tests available for execution.
+A check box against each executable name indicates whether that
+executable will be included when the <EMPHASIS>Run</EMPHASIS> button
+is pressed. The <EMPHASIS>Check All</EMPHASIS> and <EMPHASIS>Uncheck
+All</EMPHASIS> buttons may be used to check or uncheck all items.</PARA>
+<PARA>When the property sheet is first displayed, it will be pre-populated
+with those test executables that have been linked using the Build/Tests
+operation against the current configuration. </PARA>
+<FIGURE>
+<TITLE>Run tests </TITLE>
+<GRAPHIC ENTITYREF="graphic27"></GRAPHIC>
+</FIGURE>
+<PARA>You can right-click in the window to display a context menu
+containing <EMPHASIS>Add</EMPHASIS> and <EMPHASIS>Remove</EMPHASIS> items.
+Clicking <EMPHASIS>Remove</EMPHASIS> will remove those executables
+selected. Clicking <EMPHASIS>Add</EMPHASIS> will display a dialog
+box that allows you to add to the set of items. Equivalently the <EMPHASIS>Add</EMPHASIS> button
+may be used to add executables, and the <EMPHASIS>DEL</EMPHASIS> key
+may be used to remove them.</PARA>
+<PARA>You can use the <EMPHASIS>Add from Folder</EMPHASIS> button
+to add a number of executables in a specified folder (optionally
+including subfolders, if you click on <EMPHASIS>Yes</EMPHASIS> when
+asked).</PARA>
+<FIGURE>
+<TITLE>Add files from folder </TITLE>
+<GRAPHIC ENTITYREF="graphic28"></GRAPHIC>
+</FIGURE>
+
+<!--
+<PARA>The &ldquo;Add from subfolders&rdquo; check box should
+be checked if you wish the search for executables to descend into
+subfolders (in the example above the whole of the C drive would
+be searched).</PARA>
+
+<PARA>The &ldquo;Files of type&rdquo; edit box should be used
+to specify the extension of those files to be matched &lsqb;for
+example, &ldquo;*.exe&rdquo;&rsqb;.</PARA>
+-->
+</SECT2>
+<SECT2>
+<TITLE>Output Tab</TITLE>
+<PARA>This tab is used to display the output from running tests.
+The output can be saved to a file or cleared by means of the popup
+menu displayed when you right-click in the window.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Summary Tab</TITLE>
+<PARA>This tab is used to display a record, in summary form, of
+those tests executed. For each execution, the following information
+is displayed:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA> <EMPHASIS>Time</EMPHASIS> - the date and time of execution</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> <EMPHASIS>Host</EMPHASIS> - the host name of the machine
+from which the test was downloaded</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> <EMPHASIS>Platform</EMPHASIS> - the platform on which
+the test was executed</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> <EMPHASIS>Executable</EMPHASIS> - the executable (file
+name) of the test executed</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> <EMPHASIS>Status</EMPHASIS> - the result of executing
+the test. This will be one of the following:</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Not started</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>No result</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Inapplicable</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Pass</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>DTimeout</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Timeout</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Cancelled</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Fail</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Assert fail</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> <EMPHASIS>Size</EMPHASIS> - the size &lsqb;stripped/unstripped&rsqb; of
+the test executed</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> <EMPHASIS>Download</EMPHASIS> - the download time &lsqb;mm:ss/mm:ss&rsqb; used.
+The first of the two times displayed represents the actual time
+used: the second the limit time.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> <EMPHASIS>Elapsed</EMPHASIS> - the elapsed time &lsqb;mm:ss&rsqb; used.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> <EMPHASIS>Execution</EMPHASIS> - the execution time
+ &lsqb;mm:ss/mm:ss&rsqb; used. The first of the
+two times displayed represents the actual time used: the second
+the limit time.</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+<PARA>The output can be saved to a file or cleared by means of the
+popup menu displayed when you right-click in the window.</PARA>
+</SECT2>
+</SECT1>
+</CHAPTER>
+
+<!-- }}} -->
+<!-- {{{ Creating a Shell -->
+
+<CHAPTER id="config-tool-creating-a-shell">
+<TITLE>Creating a Shell</TITLE>
+<PARA>To call up a shell window, select <EMPHASIS>Tools</EMPHASIS>-&gt;<EMPHASIS>Shell</EMPHASIS>.
+Under Windows, you will get a Cygwin shell similar to the one below. On Linux, you will
+get a standard Linux shell window.</PARA>
+<GRAPHIC ENTITYREF="graphic29"></GRAPHIC>
+<SECT1 id="config-tool-keyboard-accelerators">
+<TITLE>Keyboard Accelerators</TITLE>
+<PARA>The following table presents the list of keyboard accelerators
+that can be used with the <application>Configuration Tool</application>. </PARA>
+
+<table id="keyboard-accelerators"><title>Keyboard accelerators</title>
+<tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Accelerator</entry>
+ <entry>Action</entry>
+ <entry>Remarks</entry>
+ </row>
+ </thead>
+<tbody>
+
+<row>
+<entry><emphasis>Alt+1</emphasis></entry>
+<entry>hide/show properties window</entry>
+<entry></entry>
+</row>
+
+<row>
+<entry><emphasis>Alt+2</emphasis></entry>
+<entry>hide/show output window</entry>
+<entry></entry></row>
+
+<row>
+<entry><emphasis>Alt+3</emphasis></entry>
+<entry>hide/show short description window</entry>
+<entry></entry></row>
+
+<row>
+<entry><emphasis>Alt+4</emphasis></entry>
+<entry>hide/show conflicts window</entry>
+<entry></entry>
+</row>
+
+<row>
+<entry><emphasis>Ctrl+A</emphasis></entry>
+<entry>select all</entry><entry>output
+window and in-cell editing</entry></row>
+<row>
+<entry><emphasis>Ctrl+C</emphasis></entry>
+<entry>copy</entry><entry>output window
+and in-cell editing</entry></row>
+<row>
+<entry><emphasis>Ctrl+F</emphasis></entry>
+<entry>Edit-&gt;Find</entry><entry></entry></row>
+<row>
+<entry><emphasis>Ctrl+N</emphasis></entry>
+<entry>File-&gt;New</entry><entry></entry></row>
+<row>
+<entry><emphasis>Ctrl+O</emphasis></entry>
+<entry>File-&gt;Open</entry><entry></entry></row>
+<row>
+<entry><emphasis>Ctrl+S</emphasis></entry>
+<entry>File-&gt;Save</entry><entry></entry></row>
+<row>
+<entry><emphasis>Ctrl+V</emphasis></entry>
+<entry>Paste</entry><entry>in-cell editing
+only</entry></row>
+<row>
+<entry><emphasis>Ctrl+X</emphasis></entry>
+<entry>Cut</entry><entry>in-cell-editing
+only</entry></row>
+<row>
+<entry><emphasis>Ctrl+Z</emphasis></entry>
+<entry>Undo</entry><entry>in-cell editing
+only</entry></row>
+<row>
+<entry><emphasis>F1</emphasis></entry>
+<entry>Context-sensitive help</entry><entry></entry></row>
+<row>
+<entry><emphasis>F3</emphasis></entry>
+<entry>Find next</entry><entry></entry></row>
+<row>
+<entry><emphasis>F7</emphasis></entry>
+<entry>Build-&gt;Library</entry><entry></entry></row>
+<row>
+<entry><emphasis>Shift+F7</emphasis></entry>
+<entry>Build-&gt;Tests</entry><entry></entry></row>
+<row>
+<entry><emphasis>Alt+F6</emphasis></entry>
+<entry>View-&gt;Next window</entry>
+<entry></entry></row>
+<row>
+<entry><emphasis>Shift+Alt+0</emphasis></entry>
+<entry>View-&gt;Previous window</entry>
+<entry></entry></row>
+<row>
+<entry><emphasis>Shift+Ins</emphasis></entry>
+<entry>Paste</entry><entry>in-cell editing
+only</entry></row>
+<row>
+<entry><emphasis>Shift+F10</emphasis></entry>
+<entry>Display context menu</entry><entry>Configuration
+window</entry></row>
+<row>
+<entry><emphasis>Alt+Enter</emphasis></entry>
+<entry>Display properties dialog box</entry>
+<entry>Configuration window</entry></row>
+<row>
+<entry><emphasis>&gt;</emphasis></entry>
+<entry>Increment item value</entry><entry>Configuration
+window</entry></row>
+<row>
+<entry>&lt;</entry><entry>Decrement
+item value</entry><entry>Configuration window</entry></row>
+<row>
+<entry><emphasis>Space</emphasis></entry>
+<entry>Toggle item value</entry><entry>Configuration
+window</entry></row>
+ </tbody>
+ </tgroup>
+ </table>
+
+</SECT1>
+</CHAPTER>
+
+<!-- }}} -->
+
+
+</PART>
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:nil
+sgml-shorttag:t
+sgml-namecase-general:t
+sgml-general-insert-case:lower
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:("user-guide.sgml" "book" "part")
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
diff --git a/cesar/ecos/doc/sgml/user-guide/configuration.sgml b/cesar/ecos/doc/sgml/user-guide/configuration.sgml
new file mode 100644
index 0000000000..7b1081a0a6
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/configuration.sgml
@@ -0,0 +1,2023 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- configuration.sgml -->
+<!-- -->
+<!-- eCos User Guide -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<PART id="configuration-and-the-package-repository">
+<TITLE>Configuration and the Package Repository</TITLE>
+<PARTINTRO>
+<PARA>The following chapters contain information on running
+ <COMMAND>ecosconfig</COMMAND> (the command line tool that
+ manipulates configurations and constructs build trees) and on
+ managing a source repository across multiple versions of
+ <productname>eCos</productname>. </PARA>
+</PARTINTRO>
+<CHAPTER id="manual-configuration">
+<TITLE>Manual Configuration</TITLE>
+
+ <PARA><productname>eCos</productname> developers will generally use the graphical
+ Configuration Tool for configuring an <productname>eCos</productname> system and building
+ the target library. However, some user prefer to use command
+ line tools. These command line tools can also be used for batch
+ operations on all platforms, for example as part of a nightly
+ rebuild and testing procedure.
+ </PARA>
+
+<PARA>In the current release of the system the command line tools
+ do not provide exactly the same functionality as the graphical
+ tool. Most importantly, there is no facility to resolve
+ configuration conflicts interactively.</PARA>
+<PARA>The <productname>eCos</productname> configuration system, both graphical and command
+ line tools, are under constant development and enhancement.
+ Developers should note that the procedures described may change
+ considerably in future releases. </PARA>
+
+<SECT1 id="directory-tree-structure">
+<TITLE>Directory Tree Structure</TITLE>
+<PARA>When building <productname>eCos</productname> there are three main directory trees to
+ consider: the source tree, the build tree, and the install
+ tree.</PARA>
+<PARA>The source tree, also known as the component repository,
+ is read-only. It is possible to use a single component
+ repository for any number of different configurations, and
+ it is also possible to share a component repository between
+ multiple users by putting it on a network drive.</PARA>
+<PARA>The build tree contains everything that is specific to a
+ particular configuration, including header and other files
+ that contain configuration data, and the object files that
+ result from compiling the system sources for this
+ configuration. </PARA>
+<PARA>The install tree is usually located in the <filename>install</filename> subdirectory
+of the build tree. Once an <productname>eCos</productname> system has been built, the install
+tree contains all the files needed for application development including
+the header files and the target library. By making copies of the
+install tree after a build it is possible to separate application
+development and system configuration, which may be desirable for
+some organizations. </PARA>
+</SECT1>
+
+<SECT1 id="creating-build-tree">
+<TITLE>Creating the Build Tree</TITLE>
+<PARA>Generating a build tree is a non-trivial operation and
+ should not be attempted manually. Instead, <productname>eCos</productname> is shipped
+ with a tool called <COMMAND>ecosconfig</COMMAND> that should
+ be used to create a build tree.</PARA>
+<PARA>Usually <command>ecosconfig</command> will be
+run inside the build tree itself. If you are creating a new build
+tree then typically you will create a new empty directory using
+the <command>mkdir</command> command, <command>cd</command> into
+that directory, and then invoke <command>ecosconfig</command> to
+create a configuration. By default, the configuration is stored
+in a file <filename>ecos.ecc</filename> in the current
+directory. The configuration may be modified by editing this file directly. <command>ecosconfig</command> itself
+deals with a number of coarse-grained configuration options such
+as the target platform and the packages that should be used.</PARA>
+<PARA>The <command>ecosconfig</command> tool is also
+used subsequently to generate a build tree for a configuration.
+Once a build tree exists, it is possible to run <command>ecosconfig</command> again
+inside the same build tree. This will be necessary if your wish
+to change some of the configuration options.</PARA>
+<PARA><COMMAND>ecosconfig</COMMAND> does not generate
+the top-level directory of the build tree; you must do this
+ yourself. </PARA>
+<SCREEN>$ mkdir ecos-work
+$ cd ecos-work</SCREEN>
+<PARA>The next step is to run <COMMAND>ecosconfig</COMMAND>: </PARA>
+<SCREEN>$ ecosconfig &lt;qualifiers&gt; &lt;command&gt;</SCREEN>
+<SECT2>
+<TITLE>ecosconfig qualifiers</TITLE>
+<PARA>The available command line qualifiers for
+ <COMMAND>ecosconfig</COMMAND> are as follows. Multiple
+ qualifiers may be used on the command line:
+ </PARA>
+<VARIABLELIST>
+<VARLISTENTRY>
+<TERM><OPTION>--help</OPTION></TERM>
+<LISTITEM>
+<PARA>Provides basic usage guidelines for the
+ available commands and qualifiers.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><OPTION>--config=&lt;file&gt;</OPTION></TERM>
+<LISTITEM>
+<PARA>Specifies an <productname>eCos</productname> configuration save file for
+ use by the tool. By default, the file
+ <filename>ecos.ecc</filename> in the
+ current directory is used. Developers may prefer to
+ use a common location for all their <productname>eCos</productname>
+ configurations rather than keep the configuration
+ information in the base of the build tree.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><OPTION>--prefix=&lt;dir&gt;</OPTION></TERM>
+<LISTITEM>
+<PARA>Specifies an alternative location for the
+ install tree. By default, the install tree resides
+ inside the <filename>install</filename>
+ directory in the build tree. Developers may prefer
+ to locate the build tree in a temporary file
+ hierarchy but keep the install tree in a more
+ permanent location.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><OPTION>--srcdir=&lt;dir&gt;</OPTION></TERM>
+<LISTITEM>
+<PARA>Specifies the location of the component
+ repository. By default, the tool uses the location
+ specified in the
+ <REPLACEABLE>ECOS_REPOSITORY</REPLACEABLE>
+ environment variable. Developers may prefer to use
+ of this qualifier if they are working with more than
+ one repository.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><OPTION>--no-resolve</OPTION></TERM>
+<LISTITEM>
+<PARA>Disables the implicit resolution of conflicts
+ while manipulating the configuration data.
+ developers may prefer to resolve conflicts by
+ editing the <productname>eCos</productname> configuration save file
+ manually.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><OPTION>--ignore-errors</OPTION></TERM>
+<TERM><OPTION>-i</OPTION></TERM>
+<LISTITEM>
+<PARA>
+By default, ecosconfig will exit with an error code if the current
+configuration contains any conflicts, and it is not possible to
+generate or update a build tree for such configurations. This
+qualifier causes ecosconfig to ignore such problems, and hence it is
+possible to generate a build tree even if there are still
+conflicts. Of course, there are no guarantees that the resulting
+system will actually do anything.
+</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><OPTION>--verbose</OPTION></TERM>
+<TERM><OPTION>-v</OPTION></TERM>
+<LISTITEM>
+<PARA>
+Display more information.
+</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><OPTION>--quiet</OPTION></TERM>
+<TERM><OPTION>-q</OPTION></TERM>
+<LISTITEM>
+<PARA>
+Display less information.
+</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+</VARIABLELIST>
+<PARA>
+The <OPTION>--config</OPTION>, <OPTION>--prefix</OPTION> and
+<OPTION>--srcdir</OPTION> qualifiers can also be written with two arguments,
+for example:
+</para>
+<SCREEN>
+ecosconfig --srcdir <REPLACEABLE>&lt;dir&gt;</REPLACEABLE> ...
+</SCREEN>
+<para>
+This simplifies filename completion with some shells.
+</PARA>
+</SECT2>
+<SECT2>
+<TITLE>ecosconfig commands</TITLE>
+<PARA>The available commands for
+ <COMMAND>ecosconfig</COMMAND> are as
+ follows:</PARA>
+<VARIABLELIST>
+<VARLISTENTRY>
+<TERM><COMMAND>list</COMMAND></TERM>
+<LISTITEM>
+<PARA>Lists the available packages, targets and
+ templates as installed in the <productname>eCos</productname> repository.
+ Aliases and package versions are also
+ reported.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><COMMAND>new &lt;target&gt; [&lt;template&gt; [&lt;version&gt;]]</COMMAND></TERM>
+<LISTITEM>
+<PARA>Creates a new <productname>eCos</productname> configuration for
+ the specified target hardware and saves it. A
+ software template may also be specified. By default,
+ the template named &lsquo;default&rsquo; is used. If
+ the template version is not specified, the latest
+ version is used.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><COMMAND>target &lt;target&gt;</COMMAND></TERM>
+<LISTITEM>
+<PARA>Changes the target hardware selection
+ for the <productname>eCos</productname> configuration. This has the effect of
+ unloading packages supporting the target selected
+ previously and loading the packages which support
+ the new hardware. This command will be used
+ typically when switching between a simulator and
+ real hardware.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><COMMAND>template &lt;template&gt; [&lt;version&gt;]</COMMAND></TERM>
+<LISTITEM>
+<PARA>Changes the template selection for the <productname>eCos</productname>
+ configuration. This has the effect of unloading
+ packages specified by the template selected
+ previously and loading the packages specified by the
+ new template. By default, the latest version of the
+ specified template is used.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><COMMAND>remove &lt;packages&gt;</COMMAND></TERM>
+<LISTITEM>
+<PARA>Removes the specified packages from the <productname>eCos</productname>
+ configuration. This command will be used typically
+ when the template on which a configuration is based
+ contains packages which are not required.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><COMMAND>add &lt;packages&gt;</COMMAND></TERM>
+<LISTITEM>
+<PARA>Adds the specified packages to the <productname>eCos</productname> configuration. This
+command will be used typically when the template on which a
+configuration is based does not contain all the packages which are
+required.For example, add-on packages provided by third parties will
+not be known to the standard templates, so they will have to be added
+explicitly. </PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><COMMAND>version &lt;version&gt; &lt;packages&gt;</COMMAND></TERM>
+<LISTITEM>
+<PARA>Selects the specified version of a
+ number of packages in the <productname>eCos</productname> configuration. By
+ default, the most recent version of each package is
+ used. This command will be used typically when an
+ older version of a package is required.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><COMMAND>check</COMMAND></TERM>
+<LISTITEM>
+<PARA>Presents the following information
+ concerning the current configuration:</PARA>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>the selected target hardware</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>the selected template</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>additional packages</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>removed packages</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>the selected version of packages
+ where this is not the most recent
+ version</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>conflicts in the current configuration</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><COMMAND>resolve</COMMAND></TERM>
+<LISTITEM>
+<PARA>Resolves conflicts identified in the
+ current <productname>eCos</productname> configuration by invoking an inference
+ capability. Resolved conflicts are reported, but not
+ all conflicts may be resolvable. This command will
+ be used typically following manual editing of the
+ configuration.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><COMMAND>export &lt;file&gt;</COMMAND></TERM>
+<LISTITEM>
+<PARA>Exports a minimal <productname>eCos</productname> configuration
+ save file with the specified name. This file
+ contains only those options which do not have their
+ default value. Such files are used typically to
+ transfer option values from one configuration to
+ another.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><COMMAND>import &lt;file&gt;</COMMAND></TERM>
+<LISTITEM>
+<PARA>Imports a minimal <productname>eCos</productname> configuration
+ save file with the specified name. The values of
+ those options specified in the file are applied to
+ the current configuration.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><COMMAND>tree</COMMAND></TERM>
+<LISTITEM>
+<PARA>Generates a build tree based on the current <productname>eCos</productname>
+ configuration. This command will be used typically
+ just before building <productname>eCos</productname>.Normally a build tree can
+only be generated if if the configuration has no unresolved
+conflicts, but <OPTION>--ignore-errors</OPTION> can be used to override
+this.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+</VARIABLELIST>
+</SECT2>
+</SECT1>
+<SECT1 id="conflicts-and-constraints">
+<TITLE>Conflicts and constraints</TITLE>
+<PARA>Configuration options are not completely independent. For example
+the C library's <FUNCTION>strtod()</FUNCTION> and <FUNCTION>atof()</FUNCTION>
+functions rely on the math library package to provide certain functionality. If the math library package is removed then the C
+library can no longer provide these functions. Each package describes constraints like these in CDL <EMPHASIS>"requires"</EMPHASIS> properties. If a constraint is not satisfied, then the configuration contains a conflict. For any given conflict there can
+be several resolution options. For example, it would be possible to add the math library package back to the
+configuration, or to disable the <FUNCTION>strtod()</FUNCTION> and <FUNCTION>atof()</FUNCTION> functions.</PARA>
+<PARA>
+The <productname>eCos</productname> configuration tools will report any conflicts in the current configuration. If there are any such conflicts
+then the configuration is usually unsafe and it makes no sense to build and run <productname>eCos</productname> in such circumstances. In fact,
+any attempt at building <productname>eCos</productname> is likely to fail. In exceptional cases it is possible to override this by using e.g. the
+<OPTION>--ignore-errors</OPTION> qualifier with ecosconfig.
+</PARA>
+<PARA>
+Many constraints are fairly simple in nature, and the configuration tools contain an inference engine which can
+resolve the associated conflicts automatically. For example, if the math library package is removed then the
+inference engine can resolve the resulting conflict by disabling the configuration option for <FUNCTION>strtod()</FUNCTION> and <FUNCTION>atof()</FUNCTION>. All
+such changes will be reported. Sometimes the inference engine cannot resolve a conflict, for example it is not
+allowed to override a change that has been made explicitly by the user. Sometimes it will find a solution which does
+not match the application's requirements.
+</PARA>
+<PARA>
+A typical session involving conflicts would look something like this:
+<SCREEN>
+$ ecosconfig new pid
+</SCREEN>This creates a new configuration with the default template. For most targets this will not result in any conflicts,
+because the default settings for the various options meet the requirements of the default template.
+</PARA><PARA> For some targets
+there may be conflicts and the inference engine would come into play.
+<SCREEN>
+$ ecosconfig remove libm
+U CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT, new inferred value 0
+U CYGFUN_LIBC_strtod, new inferred value 0
+U CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT, new inferred value 0
+</SCREEN>
+ecosconfig reports that this change caused three conflicts, all in the C library. The inference engine was able to
+resolve all the conflicts and update the relevant configuration options accordingly. </PARA>
+<PARA>To suppress the inference engine <OPTION>--no-resolve</OPTION> can be used:
+<SCREEN>
+$ ecosconfig new pid
+$ ecosconfig --no-resolve remove libm
+C CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT, "requires" constraint not satisfied: CYGPKG_LIBM
+C CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT, "requires" constraint not satisfied: CYGPKG_LIBM
+C CYGFUN_LIBC_strtod, "requires" constraint not satisfied: CYGPKG_LIBM
+</SCREEN>
+Three unresolved conflicts are reported.
+</PARA>
+<PARA>The <COMMAND>check</COMMAND> command can be used to get the current state of the
+configuration, and the <OPTION>--verbose</OPTION> qualifier will provide additional information: </PARA>
+<SCREEN>
+$ ecosconfig --srcdir /home/bartv/ecc/ecc --verbose check
+Target: pid
+Template: default
+Removed:
+ CYGPKG_LIBM
+3 conflict(s):
+C CYGFUN_LIBC_strtod, "requires" constraint not satisfied: CYGPKG_LIBM
+ Possible solution:
+ CYGFUN_LIBC_strtod -> 0
+ CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT -> 0
+C CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT, "requires" constraint not satisfied: CYGPKG_LIBM
+ Possible solution:
+ CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT -> 0
+C CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT, "requires" constraint not satisfied: CYGPKG_LIBM
+ Possible solution:
+ CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT -> 0
+</SCREEN>
+<PARA>
+If the proposed solutions are acceptable, the resolve command can be used to apply them:
+<SCREEN>
+$ ecosconfig resolve
+U CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT, new inferred value 0
+U CYGFUN_LIBC_strtod, new inferred value 0
+U CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT, new inferred value 0
+</SCREEN></PARA>
+<PARA>The current configuration is again conflict-free and it is possible to generate a build tree. The <OPTION>--quiet</OPTION> qualifier can
+be used to suppress the change messages, if desired.
+</PARA><PARA>
+When changing individual configuration options by editing the ecos.ecc file (as described below), the resulting
+system should be checked and any problems should be resolved. For example, if CYGFUN_LIBC_strtod is
+explicitly enabled in the savefile:
+<SCREEN>
+$ edit ecos.ecc
+$ ecosconfig check
+Target: pid
+Template: default
+Removed:
+ CYGPKG_LIBM
+1 conflict(s):
+C CYGFUN_LIBC_strtod, "requires" constraint not satisfied: CYGPKG_LIBM
+$ ecosconfig resolve
+C CYGFUN_LIBC_strtod, "requires" constraint not satisfied: CYGPKG_LIBM
+</SCREEN>
+In this case the inference engine cannot resolve the conflict automatically because that would involve changing a
+user setting. Any attempt to generate a build tree will fail:
+<SCREEN>
+$ ecosconfig --srcdir /home/bartv/ecc/ecc tree
+C CYGFUN_LIBC_strtod, "requires" constraint not satisfied: CYGPKG_LIBM
+Unable to generate build tree, this configuration still contains conflicts.
+Either resolve the conflicts or use --ignore-errors
+</SCREEN>
+</PARA><PARA>
+It is still possible to generate a build tree:
+<SCREEN>
+$ ecosconfig --srcdir /home/bartv/ecc/ecc --ignore-errors tree
+C CYGFUN_LIBC_strtod, "requires" constraint not satisfied: CYGPKG_LIBM
+$ make
+</SCREEN>
+In this case <productname>eCos</productname> will fail to build. In other cases of unresolved conflicts <productname>eCos</productname> may build, but may not run. In
+general all conflicts should be resolved by editing the <FILENAME>ecos.ecc</FILENAME> file, by letting the inference engine make appropriate
+changes, or by other means, before any attempt is made to build or run <productname>eCos</productname>.
+</PARA>
+</SECT1>
+<SECT1 id="building-the-system">
+<TITLE>Building the System</TITLE>
+<PARA>Once a build tree has been generated with
+ <COMMAND>ecosconfig</COMMAND>, <!-- <index></index>
+ -->building <productname>eCos</productname> is straightforward:</PARA>
+<SCREEN>$ make</SCREEN>
+<PARA>The build tree contains the subdirectories, makefiles,
+ and everything else that is needed to generate the default
+ configuration for the selected architecture and platform.
+ The only requirement is that the tools needed for that
+ architecture, for example
+ <COMMAND>powerpc-eabi-g++</COMMAND>,
+ are available using the standard search path. If this is not
+ the case then the <COMMAND>make</COMMAND> will
+ fail with an error message. If you have a multiprocessor
+ system then it may be more efficient to use:</PARA>
+<SCREEN>$ make -j <REPLACEABLE>n</REPLACEABLE></SCREEN>
+<PARA>where <REPLACEABLE>n</REPLACEABLE> is equal to the
+ number of processors on your system.</PARA>
+<PARA>Once the <COMMAND>make</COMMAND> process
+ has completed, the install tree will contain the header
+ files and the target library that are needed for application
+ development. </PARA>
+<PARA>It is also possible to build the system&rsquo;s test cases
+for the current configuration:</PARA>
+<SCREEN>$ make tests</SCREEN>
+<PARA>The resulting test executables will end up in a
+ <FILENAME>tests</FILENAME> subdirectory of the
+ <!-- <index></index> -->install tree. </PARA>
+<PARA>If disk space is scarce then it is possible to make the copy
+of the install tree for application development purposes, and then
+use: </PARA>
+<SCREEN>$ make clean</SCREEN>
+<PARA>The build tree will now use up a minimum of disk space &mdash; the
+bulk of what is left consists of configuration header files that
+you may have edited and hence should not be deleted automatically.
+However, it is possible to rebuild the system at any time without
+re-invoking <COMMAND>ecosconfig</COMMAND>, just by
+running <COMMAND>make</COMMAND> again. </PARA>
+<PARA>Under exceptional circumstances it may be necessary to run <COMMAND>make
+clean</COMMAND> for other reasons, such as when a new release
+of the toolchain is installed. The toolchain includes a number of
+header files which are closely tied to the compiler, for example <filename>limits.h</filename>,
+and these header files are not and should not be duplicated by <productname>eCos</productname>.
+The makefiles perform header file dependency analysis, so that when
+a header file is changed all affected sources will be rebuilt during
+the next <COMMAND>make</COMMAND>. This is very useful
+when the configuration header files are changed, but it also means
+that a build tree containing information about the locations of
+header files must be rebuilt. If a new version of the toolchain
+is installed and the old version is removed then this location information
+is no longer accurate, and <COMMAND>make</COMMAND> will
+complain that certain dependencies cannot be satisfied. Under such circumstances
+it is necessary to do a <COMMAND>make clean</COMMAND> first. </PARA>
+</SECT1>
+<SECT1 id="ecos-packages">
+<TITLE>Packages</TITLE>
+<PARA><productname>eCos</productname> is a component architecture. The system comes as a
+ number of <!-- <index></index> -->packages which can be
+ enabled or disabled as required, and new packages can be
+ added as they become available. Unfortunately, the packages
+ are not completely independent: for example the &micro;ITRON
+ compatibility package relies almost entirely on
+ functionality provided by the kernel package, and it would
+ not make sense to try to build &micro;ITRON if the kernel
+ was disabled. The C library has fewer dependencies: some
+ parts of the C library rely on kernel functionality, but it
+ is possible to disable these parts and thus build a system
+ that has the C library but no kernel. The
+ <command>ecosconfig</command> tool has the capability of
+ checking that all the dependencies are satisfied, but it
+ may still be possible to produce configurations that will
+ not build or (conceivably) that will build but not run.
+ Developers should be aware of this and take appropriate
+ care.</PARA>
+<PARA>By default, <!-- <index></index> --><command>ecosconfig</command> will
+include all packages that are appropriate for the specified hardware
+in the configuration. The common <!-- <index></index> -->HAL package and
+the <productname>eCos</productname> infrastructure must be present in every configuration. In
+addition, it is always necessary to have one architectural HAL package
+and one platform HAL package. Other packages are optional, and can
+be added or removed from a configuration as required.</PARA>
+<PARA>The application may not require all of the packages; for example,
+it might not need the &micro;ITRON compatibility
+package, or the floating point support provided by the math library.
+There is a slight overhead when <productname>eCos</productname> is built because the packages
+will get compiled, and there is also a small disk space penalty.
+However, any unused facilities will get stripped out at link-time,
+so having redundant packages will not affect the final executable. </PARA>
+</SECT1>
+<SECT1 id="coarse-grained-configuration">
+<TITLE>Coarse-grained Configuration</TITLE>
+<PARA>Coarse-grained <!-- <index></index> -->configuration of
+ an <productname>eCos</productname> system means making configuration changes using the
+ <COMMAND>ecosconfig</COMMAND> tool. These changes
+ include: </PARA>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>switching to different target hardware</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>switching to a different template</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>adding or removing a package</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>changing the version of a package</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+<PARA>Whenever <COMMAND>ecosconfig</COMMAND> generates or
+ updates an <productname>eCos</productname> configuration, it generates a configuration
+ save file.</PARA>
+<PARA>Suppose that the configuration was first created using
+ the following command line: </PARA>
+<SCREEN>$ ecosconfig new stdeval1</SCREEN>
+<PARA>To change the target hardware to the Cogent CMA28x
+ PowerPC board, the following command would be needed:
+ </PARA>
+<SCREEN>$ ecosconfig target cma28x</SCREEN>
+<PARA>To switch to the PowerPC simulator instead: </PARA>
+<SCREEN>$ ecosconfig target psim</SCREEN>
+<PARA>As the hardware changes, hardware-related packages such as
+the HAL packages and device drivers will be added to and removed
+from the configuration as appropriate. </PARA>
+<PARA>To remove any package from the current configuration, use
+the <COMMAND>remove</COMMAND> command: </PARA>
+<SCREEN>$ ecosconfig remove uitron</SCREEN>
+<PARA>You can disable multiple packages using multiple arguments,
+for example: </PARA>
+<SCREEN>$ ecosconfig remove uitron libm</SCREEN>
+<PARA>If this turns out to have been a mistake then you can
+ re-enable one or more packages with the
+ <COMMAND>add</COMMAND> command: </PARA>
+<SCREEN>$ ecosconfig add libm</SCREEN>
+<PARA>Changing the desired version for a package is also
+ straightforward:</PARA>
+<SCREEN>$ ecosconfig version v2_1 kernel</SCREEN>
+<PARA>It is necessary to regenerate the build tree and header
+ files following any changes to the configuration before
+ rebuilding <productname>eCos</productname>:</PARA>
+<SCREEN>$ ecosconfig tree</SCREEN>
+</SECT1>
+<SECT1 id="fine-grained-configuration">
+<TITLE>Fine-grained Configuration</TITLE>
+<PARA><COMMAND>ecosconfig</COMMAND> only provides
+ coarse-grained control over the configuration: the hardware,
+ the template and the packages that should be built. Unlike
+ the Configuration Tool,
+ <COMMAND>ecosconfig</COMMAND> does not provide
+ any facilities for manipulating finer-grained <!--
+ <index></index> -->configuration options such as how many
+ priority levels the scheduler should support. There are
+ hundreds of these options, and manipulating them by means of
+ command line arguments would not be sensible. </PARA>
+<PARA>In the current system fine-grained configuration options may
+be manipulated by manual editing of the configuration file. When
+a file has been edited in this way, the <COMMAND>ecosconfig</COMMAND> tool
+should be used to check the configuration for any conflicts which
+may have been introduced:</PARA>
+<SCREEN>$ ecosconfig check</SCREEN>
+<PARA>The <COMMAND>check</COMMAND> command will list
+all conflicts and will also rewrite the configuration file, propagating
+any changes which affect other options. The user may choose to resolve
+the conflicts either by re-editing the configuration file manually
+or by invoking the inference engine using the <COMMAND>resolve</COMMAND> command:</PARA>
+<SCREEN>$ ecosconfig resolve</SCREEN>
+<PARA>The <COMMAND>resolve</COMMAND> command will
+list all conflicts which can be resolved and save the resulting changes
+to the configuration.</PARA>
+<PARA>It is necessary to regenerate the build tree and header files
+following any changes to the configuration before rebuilding <productname>eCos</productname>:</PARA>
+<SCREEN>$ ecosconfig tree</SCREEN>
+<PARA>All the configuration options and their descriptions are listed
+in the <citetitle><productname>eCos</productname> Reference Manual</citetitle>. </PARA>
+</SECT1>
+<SECT1 id="editing-an-ecos-savefile">
+<TITLE>Editing an <productname>eCos</productname> Savefile</TITLE>
+<PARA>The <productname>eCos</productname> configuration information is held in a single
+ savefile, typically <FILENAME>ecos.ecc</FILENAME>, which can
+ be generated by either the GUI configuration tool or by the
+ command line <command>ecosconfig</command> tool. The file
+ normally exists at the top level of the build tree. It is a
+ text file, allowing the various configurations options to be
+ edited inside a suitable text editor or by other programs or
+ scripts, as well as in the GUI config tool.</PARA>
+<PARA>An <productname>eCos</productname> savefile is actually a script in the <EMPHASIS>Tcl</EMPHASIS> programming
+language, so any modifications to the file need to preserve Tcl
+syntax. For most configuration options, any modifications will be
+trivial and there is no need to worry about Tcl syntax. For example,
+changing a 1 to a 0 to disable an option. For more complicated
+options, for example<literal> CYGDAT_UITRON_TASK_EXTERNS</literal>,
+which involves some lines of C code, more care has
+to be taken. If an edited savefile is no longer a valid Tcl script
+then the configuration tools will be unable to read back the data
+for further processing, for example to generate a build tree. An
+outline of Tcl syntax is given below. One point worth noting here
+is that a line that begins with a &ldquo;#&rdquo; is
+usually a comment, and the bulk of an <productname>eCos</productname> savefile actually consists
+of such comments, to make it easier to edit.</PARA>
+<SECT2>
+<TITLE>Header</TITLE>
+<PARA>An <productname>eCos</productname> savefile begins with a header, which typically
+ looks something like this:</PARA>
+<SCREEN># eCos saved configuration
+# ---- commands --------------------------------------------------------
+# This section contains information about the savefile format.
+# It should not be edited. Any modifications made to this section
+# may make it impossible for the configuration tools to read
+# the savefile.
+
+cdl_savefile_version 1;
+cdl_savefile_command cdl_savefile_version {};
+cdl_savefile_command cdl_savefile_command {};
+cdl_savefile_command
+cdl_configuration { description hardware template package };
+cdl_savefile_command cdl_package { value_source user_value wizard_value inferred_value };
+cdl_savefile_command cdl_component { value_source user_value wizard_value inferred_value };
+cdl_savefile_command cdl_option { value_source user_value wizard_value inferred_value };
+cdl_savefile_command cdl_interface { value_source user_value wizard_value inferred_value };
+ </SCREEN>
+<PARA>This section of the savefile is intended for use by the
+ configuration system, and should not be edited. If this
+ section is edited then the various configuration tools may no
+ longer be able to read in the modified savefile.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Toplevel Section</TITLE>
+<PARA>The header is followed by a section that defines the
+ configuration as a whole. A typical example would
+ be:</PARA>
+<SCREEN># ---- toplevel --------------------------------------------------------
+# This section defines the toplevel configuration object. The only
+# values that can be changed are the name of the configuration and
+# the description field. It is not possible to modify the target,
+# the template or the set of packages simply by editing the lines
+# below because these changes have wide-ranging effects. Instead
+# the appropriate tools should be used to make such modifications.
+
+cdl_configuration eCos {
+description &ldquo;&ldquo; ;
+
+# These fields should not be modified.
+hardware pid ;
+template uitron ;
+package -hardware CYGPKG_HAL_ARM current ;
+package -hardware CYGPKG_HAL_ARM_PID current ;
+package -hardware CYGPKG_IO_SERIAL current ;
+package -template CYGPKG_HAL current ;
+package -template CYGPKG_IO current ;
+package -template CYGPKG_INFRA current ;
+package -template CYGPKG_KERNEL current ;
+package -template CYGPKG_UITRON current ;
+package -template CYGPKG_LIBC current ;
+package -template CYGPKG_LIBM current ;
+package -template CYGPKG_DEVICES_WALLCLOCK current ;
+package -template CYGPKG_ERROR current ;
+};
+ </SCREEN>
+<PARA>This section allows the configuration tools to reload the
+various packages that make up the configuration. Most of the information
+should not be edited. If it is necessary to add a new package or
+to remove an existing one then the appropriate tools should be used
+for this, for example:</PARA>
+<PROGRAMLISTING>$ ecosconfig remove CYGPKG_LIBM</PROGRAMLISTING>
+<PARA>There are two fields which can be edited. Configurations have
+a name; in this case <productname>eCos</productname>. They can also have a description, which
+is some arbitrary text. The configuration tools do not make use
+of these fields, they exist so that users can store additional information
+about a configuration.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Conflicts Section</TITLE>
+<PARA>The toplevel section is followed by details of all the
+ conflicts (if any) in the configuration, for
+ example:</PARA>
+<SCREEN># ---- conflicts -------------------------------------------------------
+# There are 2 conflicts.
+#
+# option CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET
+# Property LegalValues
+# Illegal current value 100000
+# Legal values are: -90000 to 90000
+#
+# option CYGSEM_LIBC_TIME_CLOCK_WORKING
+# Property Requires
+# Requires constraint not satisfied: CYGFUN_KERNEL_THREADS_TIMER
+ </SCREEN>
+<PARA>When editing a configuration you may end up with something
+that is invalid. Any problems in the configuration will be reported
+in the conflicts section. In this case there are two conflicts.
+The option <literal>CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET</literal> has
+been given an illegal value: typically this would be fixed by searching
+for the definition of that option later on in the savefile and modifying
+the value. The second conflict is more interesting, an unsatisfied <EMPHASIS>requires</EMPHASIS> constraint.
+Configuration options are not independent: disabling some functionality
+in, say, the kernel, can have an impact elsewhere; in this case
+the C library. The various dependencies between the options are
+specified by the component developers and checked by the configuration
+system. In this case there are two obvious ways in which the conflict could
+be resolved: re-enabling <literal>CYGFUN_KERNEL_THREADS_TIMER</literal>,
+or disabling <literal>CYGSEM_LIBC_TIME_CLOCK_WORKING</literal>.
+Both of these options will be listed later on in the file.</PARA>
+<PARA>Some care has to be taken when modifying configuration options,
+to avoid introducing new conflict. For instance it is possible that
+there might be other options in the system which have a dependency
+on <literal>CYGSEM_LIBC_TIME_CLOCK_WORKING</literal>,
+so disabling that option may not be the best way to resolve the
+conflict. Details of all such dependencies are provided in the appropriate
+places in the savefile.</PARA>
+<PARA>It is not absolutely required that a configuration be conflict-free
+before generating a build tree and building <productname>eCos</productname>. It is up to the
+developers of each component to decide what would happen if an attempt
+is made to build <productname>eCos</productname> while there are still conflicts. In serious
+cases there is likely to be a compile-time failure, or possibly
+a link-time failure. In less serious cases the system may build
+happily and the application can be linked with the resulting library,
+but the component may not quite function as intended - although
+it may still be good enough for the specific needs of the application.
+It is also possible that everything builds and links, but once in
+a while the system will unaccountably crash. Using a configuration
+that still has conflicts is done entirely at the user&rsquo;s
+risk.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Data Section</TITLE>
+<PARA>The bulk of the savefile lists the various packages,
+ components, and options, including their values and the
+ various dependencies. A number of global options come
+ first, especially those related to the build process such
+ as compiler flags. These are followed by the various
+ packages, and the components and options within those
+ packages, in order.</PARA>
+<PARA>Packages, components and options are organized in a
+ hierarchy. If a particular component is disabled then all
+ options and sub-components below it will be inactive: any
+ changes made to these will have no effect. The savefile
+ contains information about the hierarchy in the form of
+ comments, for example:</PARA>
+<SCREEN>cdl_package CYGPKG_KERNEL ...
+# &gt;
+cdl_component CYGPKG_KERNEL_EXCEPTIONS ...
+# &gt;
+cdl_option CYGSEM_KERNEL_EXCEPTIONS_DECODE ...
+cdl_option CYGSEM_KERNEL_EXCEPTIONS_GLOBAL ...
+# &lt;
+cdl_component CYGPKG_KERNEL_SCHED ...
+# &gt;
+cdl_option CYGSEM_KERNEL_SCHED_MLQUEUE ...
+cdl_option CYGSEM_KERNEL_SCHED_BITMAP ...
+# &lt;
+# &lt;
+ </SCREEN>
+<PARA>This corresponds to the following hierarchy:</PARA>
+<SCREEN> CYGPKG_KERNEL
+ CYGPKG_KERNEL_EXCEPTIONS
+ CYGSEM_KERNEL_EXCEPTIONS_DECODE
+ CYGSEM_KERNEL_EXCEPTIONS_GLOBAL
+ CYGPKG_KERNEL_SCHED
+ CYGSEM_KERNEL_SCHED_MLQUEUE
+ CYGSEM_KERNEL_SCHED_BITMAP
+ </SCREEN>
+<PARA>Providing the hierarchy information in this way allows
+ programs or scripts to analyze the savefile and readily
+ determine the hierarchy. It could also be used by a
+ sufficiently powerful editor to support structured editing
+ of <productname>eCos</productname> savefiles. The information is not used by the
+ configuration tools themselves since they obtain the
+ hierarchy from the original CDL scripts.</PARA>
+<PARA>Each configurable entity is preceded by a comment, of
+ the following form:</PARA>
+<SCREEN># Kernel schedulers
+# doc: ref/ecos-ref/ecos-kernel-overview.html#THE-SCHEDULER
+# The eCos kernel provides a choice of schedulers. In addition
+# there are a number of configuration options to control the
+# detailed behaviour of these schedulers.
+cdl_component CYGPKG_KERNEL_SCHED {
+...
+};
+ </SCREEN>
+<PARA>This provides a short textual alias
+ <literal>Kernel schedulers</literal> for the
+ component. If online documentation is available for the
+ configurable entity then this will come next. Finally
+ there is a short description of the entity as a whole. All
+ this information is provided by the component
+ developers.</PARA>
+<PARA>Each configurable entity takes the form:</PARA>
+<SCREEN>&lt;type&gt; &lt;name&gt; {
+ &lt;data&gt;
+};</SCREEN>
+<PARA>Configurable entities may not be active. This can be either
+because the parent is disabled or inactive, or because there are
+one or more <EMPHASIS>active_if</EMPHASIS> properties. Modifying
+the value of an inactive entity has no effect on the configuration,
+so this information is provided first:</PARA>
+<PARA></PARA>
+<SCREEN>cdl_option CYGSEM_KERNEL_EXCEPTIONS_DECODE {
+# This option is not active
+# The parent CYGPKG_KERNEL_EXCEPTIONS is disabled
+...
+};
+
+...
+
+cdl_option CYGIMP_IDLE_THREAD_YIELD {
+# This option is not active
+# ActiveIf constraint: (CYGNUM_KERNEL_SCHED_PRIORITIES == 1)
+# CYGNUM_KERNEL_SCHED_PRIORITIES == 32
+# --&gt; 0
+...
+};
+
+</SCREEN>
+<PARA>For <literal>CYGIMP_IDLE_THREAD_YIELD</literal> the
+savefile lists the expression that must be satisfied if the option
+is to be active, followed by the current value of all entities that
+are referenced in the expression, and finally the result of evaluating
+that expression.</PARA>
+<PARA>Not all options are directly modifiable in the savefile. First,
+the value of packages (which is the version of that package loaded
+into the configuration) cannot be modified here.</PARA>
+<SCREEN>
+
+cdl_package CYGPKG_KERNEL {
+# Packages cannot be added or removed, nor can their version be changed,
+# simply by editing their value. Instead the appropriate configuration
+# should be used to perform these actions.
+...
+};
+
+</SCREEN>
+<PARA>The version of a package can be changed using e.g.: </PARA>
+<SCREEN>$ ecosconfig version 1.3 CYGPKG_KERNEL</SCREEN>
+<PARA>Even though a package&rsquo;s value cannot be modified
+here, it is still important for the savefile to contain the details.
+In particular packages may impose constraints on other configurable
+entities and may be referenced by other configurable entities. Also
+it would be difficult to understand or extract the configuration&rsquo;s
+hierarchy if the packages were not listed in the appropriate places
+in the savefile.</PARA>
+<PARA>Some components (or, conceivably, options) do not have any
+associated data. Typically they serve only to introduce another
+level in the hierarchy, which can be useful in the context of the
+GUI configuration tool.</PARA>
+<SCREEN>
+
+cdl_component CYGPKG_HAL_COMMON_INTERRUPTS {
+# There is no associated value.
+};
+
+</SCREEN>
+<PARA>Other components or options have a calculated value. These
+are not user-modifiable, but typically the value will depend on
+other options which can be modified. Such calculated options can
+be useful when controlling what gets built or what ends up in the
+generated configuration header files. A calculated value may also
+effect other parts of the configuration, for instance, via a <EMPHASIS>requires</EMPHASIS> constraint.</PARA>
+<SCREEN>
+
+cdl_option BUFSIZ {
+# Calculated value: CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO ? CYGNUM_LIBC_STDIO_BUFSIZE : 0
+# CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO == 1
+# CYGNUM_LIBC_STDIO_BUFSIZE == 256
+# Current_value: 256
+};
+
+</SCREEN>
+<PARA>A special type of calculated value is the <EMPHASIS>interface</EMPHASIS>.
+The value of an interface is the number of active and enabled options
+which <EMPHASIS>implement</EMPHASIS> that interface. Again the value
+of an interface cannot be modified directly; only by modifying the
+options which implement the interface. However, an interface can
+be referenced by other parts of the configuration. </PARA>
+<SCREEN>cdl_interface CYGINT_KERNEL_SCHEDULER {
+# Implemented by CYGSEM_KERNEL_SCHED_MLQUEUE, active, enabled
+# Implemented by CYGSEM_KERNEL_SCHED_BITMAP, active, disabled
+# This value cannot be modified here.
+# Current_value: 1
+# Requires: 1 == CYGINT_KERNEL_SCHEDULER
+# CYGINT_KERNEL_SCHEDULER == 1
+# --&gt; 1
+
+</SCREEN>
+<SCREEN># The following properties are affected by this value
+# interface CYGINT_KERNEL_SCHEDULER
+# Requires: 1 == CYGINT_KERNEL_SCHEDULER
+}; </SCREEN>
+<PARA>If the configurable entity is modifiable then there will be
+lines like the following:</PARA>
+<SCREEN>
+cdl_option CYGSEM_KERNEL_SCHED_MLQUEUE {
+...
+# Flavor: bool
+# No user value, uncomment the following line to provide one.
+# user_value 1
+# value_source default
+# Default value: 1
+...
+};
+
+</SCREEN>
+<PARA>Configurable entities can have one of four different flavors:
+none, bool, data and booldata. Flavor none indicates that there
+is no data associated with the entity, typically it just acts as
+a placeholder in the overall hierarchy. Flavor bool is the most
+common, it is a simple yes-or-no choice. Flavor data is for more
+complicated configuration choices, for instance the size of an array
+or the name of a device. Flavor booldata is a combination of bool
+and data: the option can be enabled or disabled, and there is some
+additional data associated with the option as well.</PARA>
+<PARA>In the above example the user has not modified this particular
+option, as indicated by the comment and by the commented-out <literal>user_value</literal> line.
+To disable this option the file should be edited to:</PARA>
+<SCREEN>
+
+cdl_option CYGSEM_KERNEL_SCHED_MLQUEUE {
+...
+# Flavor: bool
+# No user value, uncomment the following line to provide one.
+user_value 0
+# value_source default
+# Default value: 1
+...
+}
+
+</SCREEN>
+<PARA>The comment preceding the <literal>user_value
+0</literal> line can be removed if desired, otherwise it
+will be removed automatically the next time the file is read and
+updated by the configuration tools.</PARA>
+<PARA>Much the same process should be used for options with the
+data flavor, for example:</PARA>
+<SCREEN>
+cdl_option CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET {
+# Flavor: data
+# No user value, uncomment the following line to provide one.
+# user_value 3600
+# value_source default
+# Default value: 3600
+# Legal values: -90000 to 90000
+};
+
+</SCREEN>
+<PARA>can be changed to:</PARA>
+<SCREEN>
+
+cdl_option CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET {
+# Flavor: data
+user_value 7200
+# value_source default
+# Default value: 3600
+# Legal values: -90000 to 90000 };
+
+</SCREEN>
+<PARA>Note that the original text provides the default value in
+the <literal>user_value</literal> comment,
+on the assumption that the desired new value is likely to be similar
+to the default value. The <literal>value_source</literal> comment
+does not need to be updated, it will be fixed up if the savefile
+is fed back into the configuration system and regenerated.</PARA>
+<PARA>For options with the booldata flavor, the <literal>user_value</literal> line
+needs take two arguments. The first argument is for the boolean
+part, the second for the data part. For example:</PARA>
+<SCREEN>
+cdl_component CYGNUM_LIBM_COMPATIBILITY {
+# Flavor: booldata
+# No user value, uncomment the following line to provide one.
+# user_value 1 POSIX
+# value_source default
+# Default value: 1 POSIX
+# Legal values: &ldquo;POSIX&rdquo; &ldquo;IEEE&rdquo; &ldquo;XOPEN&rdquo; &ldquo;SVID&rdquo;
+...
+};
+
+</SCREEN>
+<PARA>could be changed to:</PARA>
+<SCREEN>
+cdl_component CYGNUM_LIBM_COMPATIBILITY {
+# Flavor: booldata
+user_value 1 IEEE
+# value_source default
+# Default value: 1 POSIX
+# Legal values: &ldquo;POSIX&rdquo; &ldquo;IEEE&rdquo; &ldquo;XOPEN&rdquo; &ldquo;SVID&rdquo;
+...
+};
+
+</SCREEN>
+<PARA>or alternatively, if the whole component should be disabled,
+to:</PARA>
+<SCREEN>
+cdl_component CYGNUM_LIBM_COMPATIBILITY {
+# Flavor: booldata
+user_value 0 POSIX
+# value_source default
+# Default value: 1 POSIX
+# Legal values: &ldquo;POSIX&rdquo; &ldquo;IEEE&rdquo; &ldquo;XOPEN&rdquo; &ldquo;SVID&rdquo;
+...
+};
+
+</SCREEN>
+<PARA>Some options take values that span multiple lines. An example
+would be:</PARA>
+<SCREEN>
+
+cdl_option CYGDAT_UITRON_MEMPOOLVAR_INITIALIZERS {
+# Flavor: data
+# No user value, uncomment the following line to provide one.
+# user_value \
+# &ldquo;CYG_UIT_MEMPOOLVAR( vpool1, 2000 ), \\
+# CYG_UIT_MEMPOOLVAR( vpool2, 2000 ), \\
+# CYG_UIT_MEMPOOLVAR( vpool3, 2000 ),&rdquo;
+# value_source default
+# Default value: \
+# &ldquo;CYG_UIT_MEMPOOLVAR( vpool1, 2000 ), \\
+# CYG_UIT_MEMPOOLVAR( vpool2, 2000 ), \\
+# CYG_UIT_MEMPOOLVAR( vpool3, 2000 ),&rdquo;
+};
+
+</SCREEN>
+<PARA>Setting a user value for this option involves uncommenting
+and modifying all relevant lines, for example:</PARA>
+<SCREEN>
+
+cdl_option CYGDAT_UITRON_MEMPOOLVAR_INITIALIZERS {
+# Flavor: data
+user_value \
+&ldquo;CYG_UIT_MEMPOOLVAR( vpool1, 4000 ), \\
+CYG_UIT_MEMPOOLVAR( vpool2, 4000 ),&rdquo;
+# value_source default
+# Default value: \
+# &ldquo;CYG_UIT_MEMPOOLVAR( vpool1, 2000 ), \\
+# CYG_UIT_MEMPOOLVAR( vpool2, 2000 ), \\
+# CYG_UIT_MEMPOOLVAR( vpool3, 2000 ),&rdquo;
+};
+
+</SCREEN>
+<PARA>In such cases appropriate care has to be taken to preserve
+Tcl syntax, as discussed below.</PARA>
+<PARA>The configuration system has the ability to keep track of
+ several different values for any given option. All options
+ start off with a default value, in other words their value
+ source is set to <literal>default</literal>. If a
+ configuration involves conflicts and the configuration
+ system&rsquo;s inference engine is allowed to resolve these
+ automatically then it may provide an
+ <literal>inferred</literal> value instead, for
+ example:</PARA>
+<SCREEN>
+
+cdl_option CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT {
+# Flavor: bool
+# No user value, uncomment the following line to provide one.
+# user_value 1
+# The inferred value should not be edited directly.
+inferred_value 0
+# value_source inferred
+# Default value: 1
+...
+};
+
+</SCREEN>
+<PARA>Inferred values are calculated by the configuration system
+and should not be edited by the user. If the inferred value is not
+correct then a user value should be substituted instead:</PARA>
+<SCREEN>
+
+cdl_option CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT {
+# Flavor: bool
+user_value 1
+# The inferred value should not be edited directly.
+inferred_value 0
+# value_source inferred
+# Default value: 1
+...
+}; </SCREEN>
+<PARA>The inference engine will not override a user value with an
+inferred one. Making a change like this may well re-introduce a
+conflict, since the inferred value was only calculated to resolve
+a conflict. Another run of the inference engine may find a different
+and more acceptable way of resolving the conflict, but this is not guaranteed
+and it may be up to the user to examine the various dependencies
+and work out an acceptable solution.</PARA>
+<PARA>Inferred values are listed in the savefile because the exact
+inferred value may depend on the order in which changes were made
+and conflicts were resolved. If the inferred values were absent
+then it is possible that reloading a savefile would not exactly
+restore the configuration. Default values on the other hand are
+entirely deterministic so there is no actual need for the values
+to be listed in the savefile. However, the default value can be
+very useful information so it is provided in a comment.</PARA>
+<PARA>Occasionally the user will want to do some experimentation,
+and temporarily switch an option from a user value back to a default
+or inferred one to see what the effect would be. This could be achieved
+by simply commenting out the user value. For instance, if the current
+savefile contains:</PARA>
+<SCREEN>
+cdl_option CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT {
+# Flavor: bool
+user_value 1
+# The inferred value should not be edited directly.
+inferred_value 0
+# value_source user
+# Default value: 1
+...
+};
+
+</SCREEN>
+<PARA>then the inferred value could be restored by commenting out
+or removing the <literal>user_value</literal> line:</PARA>
+<SCREEN>
+cdl_option CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT {
+# Flavor: bool
+# user_value 1
+# The inferred value should not be edited directly.
+inferred_value 0
+# value_source user
+# Default value: 1
+...
+};
+
+</SCREEN>
+<PARA>This is fine for simple values. However if the value is complicated
+then there is a problem: commenting out the <LITERAL>user_value</LITERAL> line
+or lines means that the user value becomes invisible to the configuration system,
+so if the savefile is loaded and then regenerated the information
+will be lost. An alternative approach is to keep the <LITERAL>user_value</LITERAL> but
+explicitly set the <LITERAL>value_source</LITERAL> line,
+for example:</PARA>
+<SCREEN>
+
+cdl_option CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT {
+# Flavor: bool
+user_value 1
+# The inferred value should not be edited directly.
+inferred_value 0
+value_source inferred
+# Default value: 1
+...
+};
+
+</SCREEN>
+<PARA>In this case the configuration system will use the inferred
+value for the purposes of dependency analysis etc., even though
+a user value is present. To restore the user value the <LITERAL>value_source</LITERAL> line
+can be commented out again. If there is no explicit <LITERAL>value_source</LITERAL> then
+the configuration system will just use the highest priority one:
+the user value if it exists; otherwise the inferred value if it
+exists; otherwise the default value which always exists.</PARA>
+<PARA>The default value for an option can be a simple constant,
+or it can be an expression involving other options. In the latter
+case the expression will be listed, together with the values for
+all options referenced in the expression and the current result
+of evaluating that expression. This is for informational purposes
+only, the default value is always recalculated deterministically
+when loading in a savefile.</PARA>
+<SCREEN>
+
+cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
+# Flavor: data
+# No user value, uncomment the following line to provide one.
+# user_value arm-elf
+# value_source default
+# Default value: CYGHWR_THUMB ? &ldquo;thumb-elf&rdquo; : &ldquo;arm-elf&rdquo;
+# CYGHWR_THUMB == 0
+# --&gt; arm-elf
+};
+
+</SCREEN>
+<PARA>For options with the data or booldata flavor, there are likely
+to be constraints on the possible values. If the value is supposed
+to be a number in a given range and a user value of &ldquo;<LITERAL>hello
+world</LITERAL>&rdquo; is provided instead then there
+are likely to be compile-time failures. Component developers can
+specify constraints on the legal values, and these will be listed
+in the savefile.</PARA>
+<SCREEN>
+cdl_option X_TLOSS {
+# Flavor: data
+# No user value, uncomment the following line to provide one.
+# user_value 1.41484755040569E+16
+# value_source default
+# Default value: 1.41484755040569E+16
+# Legal values: 1 to 1e308
+};
+
+</SCREEN>
+<SCREEN>cdl_component CYGNUM_LIBM_COMPATIBILITY {
+# Flavor: booldata
+# No user value, uncomment the following line to provide one.
+# user_value 1 POSIX
+# value_source default
+# Default value: 1 POSIX
+# Legal values: &ldquo;POSIX&rdquo; &ldquo;IEEE&rdquo; &ldquo;XOPEN&rdquo; &ldquo;SVID&rdquo;
+...
+};
+
+</SCREEN>
+<PARA>In some cases the legal values list may be an expression involving
+other options. If so then the current values of the referenced options
+will be listed, together with the result of evaluating the list
+expression, just as for default value expressions.</PARA>
+<PARA>If an illegal value is provided then this will result in a
+conflict, listed in the conflicts section of the savefile. For more
+complicated options a simple legal values list is not sufficient
+to allow the current value to be validated, and the configuration
+system will be unable to flag conflicts. This issue will be addressed in
+future releases of the configuration system.</PARA>
+<PARA>Following the value-related fields for a given option, any <EMPHASIS>requires</EMPHASIS> constraints belonging
+to this option will be listed. These constraints are only effective
+if the option is active and, for bool and booldata flavors, enabled.
+If some aspect of <productname>eCos</productname> functionality is inactive or disabled then
+it cannot impose any constraints on the rest of the system. As usual,
+the full expression will be listed followed by the current values
+of all options that are referenced and the result of evaluating
+the expression:</PARA>
+<SCREEN>
+
+cdl_option CYGSEM_LIBC_TIME_TIME_WORKING {
+...
+# Requires: CYGPKG_DEVICES_WALLCLOCK
+# CYGPKG_DEVICES_WALLCLOCK == current
+# --&gt; 1
+};
+
+</SCREEN>
+<PARA>When modifying the value of an option it is useful to know
+not only what constraints the option imposes on the rest of the
+system but also what other options in the system depend in some
+way on this one. The savefile provides this information:</PARA>
+<SCREEN>cdl_option CYGFUN_KERNEL_THREADS_TIMER {
+...
+# The following properties are affected by this value
+# option CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT
+# Requires: CYGFUN_KERNEL_THREADS_TIMER
+# option CYGIMP_UITRON_STRICT_CONFORMANCE
+# Requires: CYGFUN_KERNEL_THREADS_TIMER
+# option CYGSEM_LIBC_TIME_CLOCK_WORKING
+# Requires: CYGFUN_KERNEL_THREADS_TIMER
+};
+
+</SCREEN>
+</SECT2>
+<SECT2>
+<TITLE>Tcl Syntax</TITLE>
+<PARA><productname>eCos</productname> savefiles are implemented as Tcl scripts, and are read
+in by running the data through a standard Tcl interpreter that has
+been extended with a small number of additional commands such as <LITERAL>cdl_option</LITERAL> and <LITERAL>cdl_configuration</LITERAL>.
+In many cases this is an implementation detail that can be safely
+ignored while editing a savefile: simply replacing a <LITERAL>1</LITERAL> with
+a <LITERAL>0</LITERAL> to disable some functionality
+is not going to affect whether or not the savefile is still a valid
+Tcl script and can be processed by a Tcl interpreter. However, there
+are more complicated cases where an understanding of Tcl syntax
+is at least desirable, for example:</PARA>
+<SCREEN>
+
+cdl_option CYGDAT_UITRON_MEMPOOLVAR_EXTERNS {
+ # Flavor: data
+ user_value \
+ &ldquo;static char vpool1\[ 2000 \], \\
+ vpool2\[ 2000 \], \\
+ vpool3\[ 2000 \];&rdquo;
+# value_source default
+# Default value: \
+ # &ldquo;static char vpool1\[ 2000 \], \\
+ # vpool2\[ 2000 \], \\
+ # vpool3\[ 2000 \];&rdquo;
+};
+
+</SCREEN>
+<PARA>The backslash at the end of the <LITERAL>user_value</LITERAL> line
+is processed by the Tcl interpreter as a line continuation character.
+The quote marks around the user data are also interpreted by the
+Tcl interpreter and serve to turn the entire data field into a single
+argument. The backslashes preceding the opening and closing square
+brackets prevent the Tcl interpreter from treating these characters
+specially, otherwise there would be an attempt at <EMPHASIS>command
+substitution</EMPHASIS> as described below. The double backslashes
+at the end of each line of the data will be turned into a single
+backslash by the Tcl interpreter, rather than escaping the newline
+character, so that the actual data seen by the configuration system
+is:</PARA>
+<SCREEN>
+
+static char vpool1[ 2000 ], \
+ vpool2[ 2000 ], \
+ vpool3[ 2000 ];
+
+</SCREEN>
+<PARA>This is of course the data that should end up in the &micro;ITRON
+configuration header file. The opening and closing braces surrounding
+the entire body of the option data are also significant and cause
+this body to be passed as a single argument to the <command>cdl_option</command> command.
+The closing semicolon is optional in this example, but provides
+a small amount of additional robustness if the savefile is edited
+such that it is no longer a valid Tcl script. If the data contained
+any <LITERAL>$</LITERAL> characters then
+these would have to be treated specially as well, via a backslash escape.</PARA>
+<PARA>In spite of what all the above might seem to suggest, Tcl
+is actually a very simple yet powerful scripting language: the syntax
+is defined by just eleven rules. On occasion this simplicity means
+that Tcl&rsquo;s behaviour is subtly different from other languages,
+which can confuse newcomers.</PARA>
+<PARA>When the Tcl interpreter is passed some data such as <LITERAL>puts
+Hello</LITERAL>, it splits this data into a command and its
+arguments. The command will be terminated by a newline or by a semicolon,
+unless one of the quoting mechanisms is used. The command and each
+of its arguments are separated by white space. So in the following
+example:</PARA>
+<SCREEN>puts Hello
+set x 42 </SCREEN>
+<PARA>will result in two separate commands being executed. The first
+command is <LITERAL>puts</LITERAL> and is passed a
+single argument, <LITERAL>Hello</LITERAL>. The second
+command is <LITERAL>set</LITERAL> and is passed two
+arguments, <LITERAL>x</LITERAL> and <LITERAL>42</LITERAL>.
+The intervening newline character serves to terminate the first
+command, and a semi-colon separator could be used instead: </PARA>
+<programlisting>puts Hello;set x 42</programlisting>
+<PARA>Any white space surrounding the semicolon is just ignored
+because it does not serve to separate arguments.</PARA>
+<PARA>Now consider the following:</PARA>
+<SCREEN>set x Hello world</SCREEN>
+<PARA>This is not valid Tcl. It is an attempt to invoke the <LITERAL>set</LITERAL> command
+with three arguments: <LITERAL>x</LITERAL>, <LITERAL>Hello</LITERAL>,
+and <LITERAL>world</LITERAL>. The <LITERAL>set</LITERAL> only
+takes two arguments, a variable name and a value, so it is necessary
+to combine the data into a single argument by quoting:</PARA>
+<PROGRAMLISTING>set x &ldquo;Hello world&rdquo;</PROGRAMLISTING>
+<PARA>When the Tcl interpreter encounters the first quote character
+it treats all subsequent data up to but not including the closing
+quote as part of the current argument. The quote marks are removed
+by the interpreter, so the second argument passed to the <LITERAL>set</LITERAL> command
+is just <LITERAL>Hello world</LITERAL> without the
+quote characters. This can be significant in the context of <productname>eCos</productname> savefiles.
+For instance, consider the following configuration option:</PARA>
+<SCREEN>
+
+cdl_option CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE {
+# Flavor: data
+# No user value, uncomment the following line to provide one.
+# user_value &ldquo;\&rdquo;/dev/ttydiag\&rdquo;&rdquo;
+# value_source default
+# Default value: &ldquo;\&rdquo;/dev/ttydiag\&rdquo;&rdquo;
+};
+
+</SCREEN>
+<PARA>The desired value of the configuration option should be a
+valid C string, complete with quote characters. If the savefile
+was edited to: </PARA>
+<SCREEN>
+
+cdl_option CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE {
+# Flavor: data
+user_value &ldquo;/dev/ttydiag&rdquo;
+# value_source default
+# Default value: &ldquo;\&rdquo;/dev/ttydiag\&rdquo;&rdquo;
+};
+
+</SCREEN>
+<PARA>then the Tcl interpreter would remove the quote marks when
+the savefile is read back in, so the option&rsquo;s value would
+not have any quote marks and would not be a valid C string. The
+configuration system is not yet able to perform the required validation
+so the following <LITERAL>#define</LITERAL> would
+be generated in the configuration header file:</PARA>
+<PROGRAMLISTING>#define CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE /dev/ttydiag </PROGRAMLISTING>
+<PARA>This is likely to cause a compile-time failure when building
+<productname>eCos</productname>.</PARA>
+<PARA>A quoted argument continues until the closing quote character
+is encountered, which means that it can span multiple lines. This
+can also be encountered in <productname>eCos</productname> savefiles, for instance, in the <literal>CYGDAT_UITRON_MEMPOOLVAR_EXTERNS</literal> example
+mentioned earlier. Newline or semicolon characters do not terminate
+the current command in such cases.</PARA>
+<PARA>The Tcl interpreter supports much the same forms of backslash
+substitution as other common programming languages. Some backslash
+sequences such as <literal>\n</literal> will
+be replaced by the appropriate character. The sequence <literal>\\</literal> will
+be replaced by a single backslash. A backslash at the very end of
+a line will cause that backslash, the newline character, and any
+white space at the start of the next line to be replaced by a single
+space. Hence the following two Tcl commands are equivalent:</PARA>
+<PROGRAMLISTING>puts &ldquo;Hello\nworld\n&rdquo;
+puts \
+&ldquo;Hello
+world
+&ldquo;</PROGRAMLISTING>
+<PARA>In addition to quote and backslash characters, the Tcl interpreter
+treats square brackets, the <literal>$</literal> character,
+and braces specially. Square brackets are used for command substitution,
+for example:</PARA>
+<PROGRAMLISTING>puts &ldquo;The answer is [expr 6 * 9]&rdquo;</PROGRAMLISTING>
+<PARA>When the Tcl interpreter encounters the square brackets it
+will treat the contents as another command that should be executed
+first, and the result of executing that is used when continuing
+to process the script. In this case the Tcl interpreter will execute
+the command <literal>expr 6 * 9</literal>,
+yielding a result of 54, and then the Tcl interpreter will execute
+<literal>puts &ldquo;The answer is 54&rdquo;</literal>. It should be noted that
+the interpreter contains only one level of substitution: if the
+result of performing command substitution performs further special
+characters such as square brackets then these will not be treated
+specially.</PARA>
+<PARA>Command line substitution is very unlikely to prove useful
+in the context of an <productname>eCos</productname> savefile, but it is part of the Tcl language
+and hence cannot be easily suppressed while reading in a savefile.
+As a result care has to be taken when savefile data involves square
+brackets. Consider the following:</PARA>
+<PROGRAMLISTING>
+
+cdl_option CYGDAT_UITRON_MEMPOOLFIXED_EXTERNS {
+ ...
+ user_value \
+&ldquo;static char fpool1[ 2000 ],
+fpool2[ 2000 ];&rdquo;
+ ...
+};
+</PROGRAMLISTING>
+<PARA>The Tcl interpreter will interpret the square brackets as
+an attempt at command substitution and hence it will attempt to
+execute the command <literal>2000</literal> with no
+arguments. No such command is defined by the Tcl language or by
+the savefile-related extensions provided by the configuration system,
+so this will result in an error when an attempt is made to read
+back the savefile. Instead it is necessary to backslash-escape the
+square brackets and thus suppress command substitution:</PARA>
+<PROGRAMLISTING>
+
+cdl_option CYGDAT_UITRON_MEMPOOLFIXED_EXTERNS {
+ ...
+ user_value \
+&ldquo;static char fpool1\[ 2000 \],
+fpool2\[ 2000 \];&rdquo;
+ ...
+}; </PROGRAMLISTING>
+<PARA>Similarly the <literal>$</literal> character
+is used in Tcl scripts to perform variable substitution:</PARA>
+<PROGRAMLISTING>set x [expr 6 * 9]
+puts &ldquo;The answer is $x&rdquo; </PROGRAMLISTING>
+<PARA>Variable substitution, like command substitution, is very
+unlikely to prove useful in the context of an <productname>eCos</productname> savefile. Should
+it be necessary to have a <literal>$</literal> character
+in configuration data then again a backslash escape needs to be
+used.</PARA>
+<PROGRAMLISTING>cdl_option FOODAT_MONITOR_PROMPT {
+ ...
+ user_value &ldquo;\$ &ldquo;
+ ...
+};</PROGRAMLISTING>
+<PARA>Braces are used to collect a sequence of characters into a
+single argument, just like quotes. The difference is that variable,
+command and backslash substitution do not occur inside braces (with
+the sole exception of backslash substitution at the end of a line).
+So, for example, the <literal>CYGDAT_UITRON_MEMPOOL_EXTERNFIXED_EXTERNS</literal> value
+could be written as:</PARA>
+<PROGRAMLISTING>cdl_option CYGDAT_UITRON_MEMPOOLFIXED_EXTERNS {
+ ...
+ user_value \
+{static char fpool1[ 2000 ],
+fpool2[ 2000 ];}
+ ...
+};</PROGRAMLISTING>
+<PARA>The configuration system does not use this when generating
+savefiles because for simple edits of a savefile by inexperienced
+users the use of brace characters is likely to be a little bit more
+confusing than the use of quotes.</PARA>
+<PARA>At this stage it is worth noting that the basic format of
+each configuration option in the savefile makes use of braces:</PARA>
+<PROGRAMLISTING>cdl_option &lt;name&gt; {
+ ...
+};</PROGRAMLISTING>
+<PARA>The configuration system extends the Tcl language with a small
+number of additional commands such as <LITERAL>cdl_option</LITERAL>.
+These commands take two arguments, a name and a body, where the
+body consists of all the text between the braces. First a check
+is made that the specified option is actually present in the configuration.
+Then the body is executed in a recursive invocation of the Tcl interpreter,
+this time with additional commands such as <LITERAL>user_value</LITERAL> and <LITERAL>value_source</LITERAL>.
+If, after editing, the braces are not correctly matched up then
+the savefile will no longer be a valid Tcl script and errors will
+be reported when the savefile is loaded again.</PARA>
+<PARA>Comments in Tcl scripts are introduced by a hash character <LITERAL>#</LITERAL>.
+However, a hash character only introduces a comment if it occurs
+where a command is expected. Consider the following:</PARA>
+<PROGRAMLISTING># This is a comment
+puts &ldquo;Hello&rdquo; # world </PROGRAMLISTING>
+<PARA>The first line is a valid comment, since the hash character
+occurs right at the start where a command name is expected. The
+second line does not contain a comment. Instead it is an attempt
+to invoke the <LITERAL>puts</LITERAL> command with
+three arguments: <LITERAL>Hello</LITERAL>, <LITERAL>#</LITERAL> and <LITERAL>world</LITERAL>.
+These are not valid arguments for the <LITERAL>puts</LITERAL> command
+so an error will be raised.</PARA>
+<PARA>If the second line was rewritten as:</PARA>
+<PROGRAMLISTING>puts &ldquo;Hello&rdquo;; # world</PROGRAMLISTING>
+<PARA>then this is a valid Tcl script. The semicolon identifies
+the end of the current command, so the hash character occurs at
+a point where the next command would start and hence it is interpreted
+as the start of a comment.</PARA>
+<PARA>This handling of comments can lead to subtle behaviour. Consider
+the following:</PARA>
+<PROGRAMLISTING>cdl_option WHATEVER {
+ # This is a comment }
+ user_value 42
+ ...
+}</PROGRAMLISTING>
+<PARA>Consider the way the Tcl interpreter processes this. The command
+name and the first argument do not pose any special difficulties.
+The opening brace is interpreted as the start of the next argument,
+which continues until a closing brace is encountered. In this case
+the closing brace occurs on the second line, so the second argument
+passed to <LITERAL>cdl_option</LITERAL> is <literal>\n # This is a comment</LITERAL> . This second argument
+is processed in a recursive invocation of the Tcl interpreter and
+does not contain any commands, just a comment. Toplevel savefile
+processing then resumes, and the next command that is encountered
+is <LITERAL>user_value</LITERAL>. Since the
+relevant savefile code is not currently processing a configuration
+option this is an error. Later on the Tcl interpreter would encounter
+a closing brace by itself, which is also an error. Fortunately this
+sequence of events is very unlikely to occur when editing generated
+savefiles.</PARA>
+<PARA>This should be sufficient information about Tcl to allow for
+safe editing of <productname>eCos</productname> savefiles. Further information is available
+from a wide variety of sources, for example the book <EMPHASIS>Tcl
+and the Tk Toolkit </EMPHASIS>by John K Ousterhout.</PARA>
+</SECT2>
+</SECT1>
+<SECT1 id="editing-the-sources">
+<TITLE>Editing the Sources</TITLE>
+<PARA>For many users, controlling the packages and
+ manipulating the available configuration options will be
+ sufficient to create an embedded operating system that meets
+ the application's requirements. However, since <productname>eCos</productname> is
+ shipped entirely in source form, it is possible to go
+ further when necessary: you can edit the <productname>eCos</productname> <!--
+ <index></index> -->sources themselves. This requires some
+ understanding of the way the <productname>eCos</productname> build system works.
+ </PARA>
+<PARA>The most obvious place to edit the source code is directly
+in the <!-- <index></index> -->component repository. For example, you could
+edit the file <filename>kernel/<replaceable>&Version;</replaceable>/src/sync/mutex.cxx</filename>
+to change the way kernel mutexes work, or possibly just to add some
+extra diagnostics or assertions. Once the file has been edited,
+it is possible to invoke <command>make</command> at
+the top level of the build tree and the target library will be rebuilt
+as required. A small optimization is possible: the build tree is
+largely a mirror of the component repository, so it too will contain
+a subdirectory <filename>kernel/<replaceable>&Version;</replaceable></filename>;
+if make is invoked in this directory
+then it will only check for changes to the kernel sources, which
+is a bit more efficient than checking for changes throughout the component
+repository. </PARA>
+<PARA>Editing a file in the component repository is fine if this
+tree is used for only one <productname>eCos</productname> configuration. If the repository
+is used for several different configurations, however, and especially
+if it is shared by multiple users, then making what may be experimental
+changes to the master sources would be a bad idea. The build system provides
+an alternative. It is possible to make a copy of the file in the
+build tree, in other words copy <filename>mutex.cxx</filename> from
+the <filename>kernel/<replaceable>&Version;</replaceable>/src/sync</filename> directory
+in the component repository to <filename>kernel/<replaceable>&Version;</replaceable>/src/sync</filename> in
+the build tree, and edit the file in the build tree. When <command>make</command> is
+invoked it will pick up local copies of any of the sources in preference
+to the master versions in the component repository. Once you have
+finished modifying the <productname>eCos</productname> sources you can install the final version
+back in the component repository. If the changes were temporary
+in nature and only served to aid the debugging process, then you
+can discard the modified version of the sources. </PARA>
+<PARA>The situation is slightly more complicated for the header
+files that a package may export, such as the C library&rsquo;s <filename>stdio.h</filename> header
+file, which can be found in the directory <filename>language/c/libc/<replaceable>&Version;</replaceable>/include</filename>.
+If such a header file is changed, either directly in the component
+repository or after copying it to the build tree, then <command>make</command> must
+be invoked at the top level of the build tree. In cases like this
+it is not safe to rebuild just the C library because other packages
+may depend on the contents of <filename>stdio.h</filename>. </PARA>
+</SECT1>
+<SECT1 id="modifying-the-memory-layout">
+<TITLE>Modifying the Memory Layout</TITLE>
+<PARA>Each <productname>eCos</productname> platform package is supplied with linker script
+fragments which describe the location of memory regions on the evaluation
+board and the location of memory sections within these regions.
+The correct linker script fragment is selected and included in the
+<productname>eCos</productname> linker script <!-- <index></index> --><filename>target.ld</filename> when
+<productname>eCos</productname> is built.</PARA>
+<PARA>It is not necessary to <!-- <index></index> -->modify the default memory
+layouts in order to start development with <productname>eCos</productname>. However, it will
+be necessary to edit a linker script fragment when the memory map
+of the evaluation board is changed. For example, if additional memory
+is added, the linker must be notified that the new memory is available
+for use. As a minimum, this would involve modifying the length of
+the corresponding memory region. Where the available memory is non-contiguous,
+it may be necessary to declare a new memory region and reassign
+certain linker output sections to the new region.</PARA>
+<PARA>Linker script fragments and memory layout header files should
+be <!-- <index></index> -->edited within the <productname>eCos</productname> install tree. They are
+located at <filename>include/pkgconf/mlt_*.*</filename>.
+Where multiple start-up types are in use, it will be necessary to
+edit multiple linker script fragments and header files. The information
+provided in the header file and the corresponding linker script
+fragment must always match. A typical linker script fragment is
+shown below:</PARA>
+<EXAMPLE><!-- <index></index> -->
+<TITLE><productname>eCos</productname> linker script fragment</TITLE>
+<PROGRAMLISTING>MEMORY
+{
+ rom : ORIGIN = 0x40000000, LENGTH = 0x80000
+ ram : ORIGIN = 0x48000000, LENGTH = 0x200000
+}
+
+SECTIONS
+{
+ SECTIONS_BEGIN
+ SECTION_rom_vectors (rom, 0x40000000, LMA_EQ_VMA)
+ SECTION_text (rom, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_fini (rom, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_rodata (rom, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_rodata1 (rom, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_fixup (rom, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_gcc_except_table (rom, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_data (ram, 0x48000000, FOLLOWING (.gcc_except_table))
+ SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
+ SECTIONS_END
+}</PROGRAMLISTING>
+</EXAMPLE>
+<PARA>The file consists of two blocks, the <literal>MEMORY</literal> block
+contains lines describing the address (<literal>ORIGIN</literal>)
+and the size (<literal>LENGTH</literal>) of each memory
+region. The <literal>MEMORY</literal> block is followed
+by the <literal>SECTIONS</literal> block which contains
+lines describing each of the linker output sections. Each section
+is represented by a macro call. The arguments of these macros are
+ordered as follows: </PARA>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>The memory region in which the section will finally
+ reside.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>The final address (
+<LITERAL>VMA</LITERAL>
+) of the section. This is expressed using one of the following forms:</PARA>
+<VARIABLELIST>
+<VARLISTENTRY>
+<TERM><EMPHASIS>n</EMPHASIS></TERM>
+<LISTITEM>
+<PARA>at the absolute address specified by the
+ unsigned integer <EMPHASIS>n</EMPHASIS></PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM>ALIGN (<EMPHASIS>n</EMPHASIS>)</TERM>
+<LISTITEM>
+<PARA>following the final location of the previous section
+ with alignment to the next <EMPHASIS>n</EMPHASIS>-byte
+ boundary</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+</VARIABLELIST>
+</LISTITEM>
+<LISTITEM>
+<PARA>The initial address (<LITERAL>LMA</LITERAL>)
+ of the section. This is expressed using one of the
+ following forms:</PARA>
+<VARIABLELIST>
+<VARLISTENTRY>
+<TERM>LMA_EQ_VMA</TERM>
+<LISTITEM>
+<PARA>the <LITERAL>LMA</LITERAL>
+ equals the <LITERAL>VMA</LITERAL> (no relocation)</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM>AT (<EMPHASIS>n</EMPHASIS>)</TERM>
+<LISTITEM>
+<PARA>at the absolute address specified by the
+ unsigned integer <EMPHASIS>n</EMPHASIS></PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM>FOLLOWING (.<EMPHASIS>name</EMPHASIS>)</TERM>
+<LISTITEM>
+<PARA>following the initial location of section
+ <EMPHASIS>name</EMPHASIS></PARA>
+</LISTITEM>
+</VARLISTENTRY>
+</VARIABLELIST>
+</LISTITEM>
+</ORDEREDLIST>
+<PARA>In order to maintain compatibility with linker script
+ fragments and header files exported by the
+ <productname>eCos</productname> <APPLICATION>Configuration Tool</APPLICATION>, the use
+ of other expressions within these files is not
+ recommended.</PARA>
+<PARA>Note that the names of the linker output sections will vary
+between target architectures. A description of these sections can
+be found in the specific <productname>GCC</productname> documentation for
+your architecture.</PARA>
+</SECT1>
+</CHAPTER>
+<CHAPTER id="managing-package-repository">
+<TITLE>Managing the <!-- <index></index> -->Package Repository</TITLE>
+<PARA>A source distribution of <productname>eCos</productname> consists of a number of
+ packages, such as the kernel, the C library, and the
+ &micro;ITRON subsystems. These are
+ individually versioned in the tree structure of the source
+ code, to support distribution on a per-package basis and to
+ support third party packages whose versioning systems might be
+ different. The <productname>eCos</productname> <application>Package
+ Administration Tool</application> is used to manage the
+ installation and removal of packages from a variety of sources
+ with potentially multiple versions.</PARA>
+<PARA>The presence of the version information in the source tree
+ structure might be a hindrance to the use of a separate source
+ control system such as <EMPHASIS>CVS</EMPHASIS> or
+ <EMPHASIS>SourceSafe</EMPHASIS>. To work
+ in this way, you can rename all the version components to some
+ common name (such as &ldquo;current&rdquo;) thus unifying the
+ structure of source trees from distinct <productname>eCos</productname> releases.</PARA>
+<PARA>The <productname>eCos</productname> build system will treat any such name as just another
+version of the package(s), and support building in exactly the same
+way. However, performing this rename invalidates any existing build
+trees that referred to the versioned source tree, so do the rename
+first, before any other work, and do a complete rebuild afterwards.</PARA>
+<SECT1 id="package-installation">
+<TITLE>Package Installation</TITLE>
+<PARA>Package installation and removal is performed using the
+ <productname>eCos</productname> <application>Package Administration Tool</application>. This
+ tool is a Tcl script named
+ <command>ecosadmin.tcl</command> which allows
+ the user to add new <productname>eCos</productname> packages and new versions of
+ existing packages to an <productname>eCos</productname> repository. Such packages must
+ be distributed as a single file in the <productname>eCos</productname> package
+ distribution format. Unwanted packages may also be removed
+ from the repository using this tool. A graphical version of
+ the tool is provided as part of the
+ <productname>eCos</productname> <application>Configuration Tool</application>.</PARA>
+<SECT2>
+<TITLE>Using the Administration Tool</TITLE> <PARA>The graphical
+version of the <productname>eCos</productname> <application>Package
+Administration Tool</application>, provided as part of the
+<productname>eCos</productname> <application>Configuration
+Tool</application>, provides functions equivalent to the command-line
+version for those who prefer a Windows-based interface.</PARA>
+<PARA>It may be invoked in one of two ways:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>from the <GUIMENU>start menu</GUIMENU> (by default
+ <GUIMENUITEM>Start-&gt;Programs-&gt;
+ eCos-&gt;Package Administration
+ Tool</GUIMENUITEM>)</PARA>
+<!--
+<para>
+XXXXX What is the Windows menu structure now? XXXXX
+</para>
+-->
+
+</LISTITEM>
+<LISTITEM>
+<PARA>from the <productname>eCos</productname> <APPLICATION>Configuration
+ Tool</APPLICATION> via the
+ <GUIMENUITEM>Tools-&gt;Administration</GUIMENUITEM>
+ menu item</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+<PARA><GRAPHIC ENTITYREF="graphic31"></GRAPHIC></PARA>
+<PARA>The main window of the tool displays the packages which are
+currently installed in the form of a tree. The installed versions
+of each package may be examined by expanding the tree.</PARA>
+<PARA>Packages may be added to the <productname>eCos</productname> repository by clicking on
+the <EMPHASIS>Add</EMPHASIS> button. The <productname>eCos</productname> package distribution
+file to be added is then selected via a <EMPHASIS>File Open</EMPHASIS> dialog
+box.</PARA>
+<PARA>Packages may be removed by selecting a package in the tree
+and then clicking on the <EMPHASIS>Remove</EMPHASIS> button. If
+a package node is selected, all versions of the selected package
+will be removed. If a package version node is selected, only the
+selected version of the package will be removed.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Using the command line</TITLE>
+<PARA>The <command>ecosadmin.tcl</command>
+ script is located in the base of the <productname>eCos</productname> repository. Use
+ a command of the following form under versions of
+ UNIX:</PARA>
+<SCREEN>$ tclsh ecosadmin.tcl &lt;command&gt;</SCREEN>
+<PARA>Under Windows, a command of the following form may be used
+at the Cygwin command line prompt:</PARA>
+<SCREEN>$ cygtclsh80 ecosadmin.tcl &lt;command&gt;</SCREEN>
+<PARA>The following commands are available:</PARA>
+<VARIABLELIST>
+<VARLISTENTRY>
+<TERM><COMMAND>add &lt;file&gt;</COMMAND></TERM>
+<LISTITEM><!-- <index></index> -->
+<PARA>Adds the packages contained with the specified package distribution
+file to the <productname>eCos</productname> repository and updates the package database accordingly.
+By convention, <productname>eCos</productname> package distribution files are given the <filename>.epk</filename> suffix.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><COMMAND>remove &lt;package&gt; [ --version=&lt;version&gt; ]</COMMAND></TERM><!-- <index></index> -->
+<LISTITEM>
+<PARA>Removes the specified package from the <productname>eCos</productname>
+ repository and updates the package database
+ accordingly. Where the optional version qualifier is
+ used, only the specified version of the package is
+ removed.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><COMMAND>list</COMMAND></TERM><!-- <index></index> -->
+<LISTITEM>
+<PARA>Produces a list of the packages which
+ are currently installed and their versions. The
+ available templates and hardware targets are also
+ listed.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+</VARIABLELIST>
+<PARA>Note that is is possible to remove critical packages
+ such as the common HAL package using this tool. Users
+ should take care to avoid such errors since core <productname>eCos</productname>
+ packages may only be re-installed in the context of a
+ complete re-installation of <productname>eCos</productname>.</PARA>
+</SECT2>
+</SECT1>
+<SECT1 id="package-structure">
+<TITLE>Package Structure</TITLE>
+<PARA>The files in an installed <productname>eCos</productname> source tree are organized in
+a natural tree structure, grouping together files which work together
+into <EMPHASIS>Packages</EMPHASIS>. For example, the kernel files
+are all together in: </PARA>
+<SIMPLELIST>
+<MEMBER><FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/kernel/<replaceable>&Version;</replaceable>/include/</FILENAME></MEMBER>
+<MEMBER> <FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/kernel/<replaceable>&Version;</replaceable>/src/</FILENAME></MEMBER>
+<MEMBER> <FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/kernel/<replaceable>&Version;</replaceable>/tests/</FILENAME></MEMBER>
+</SIMPLELIST>
+<PARA>and &micro;ITRON compatibility layer files are in:
+ </PARA>
+<SIMPLELIST>
+<MEMBER> <FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/compat/uitron/<replaceable>&Version;</replaceable>/include/</FILENAME></MEMBER>
+<MEMBER> <FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/compat/uitron/<replaceable>&Version;</replaceable>/src/</FILENAME></MEMBER>
+<MEMBER> <FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/compat/uitron/<replaceable>&Version;</replaceable>/tests/</FILENAME></MEMBER>
+</SIMPLELIST>
+<PARA>The feature of these names which is of interest here is
+ the <replaceable>&Version;</replaceable> near the end. It may seem odd to place a version number deep in the
+ path, rather than having something like
+ <FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/<replaceable>&Version;</replaceable>/...everything...</FILENAME>
+ or leaving it up to you to choose a different
+ install-place when a new release of the system arrives.
+ </PARA>
+<PARA>There is a rationale for this organization: as
+ indicated, the kernel and the
+ &micro;ITRON compatibility subsystem
+ are examples of software packages. For the first few
+ releases of <productname>eCos</productname>, all the packages will move along
+ in step, i.e. Release 1.3.x will feature Version
+ 1.3.x of every package, and so forth. But in future,
+ especially when third party packages become available, it is
+ intended that the package be the unit of software
+ distribution, so it will be possible to build a system from
+ a selection of packages with different version numbers, and
+ even differing versioning <EMPHASIS>schemes</EMPHASIS>. A
+ Tcl script <command>ecosadmin.tcl</command> is
+ provided in the <productname>eCos</productname> repository to manage the installation
+ and removal of packages in this way.</PARA>
+<PARA>Many users will have their own source code control system,
+version control system or equivalent, and will want to use it with
+<productname>eCos</productname> sources. In that case, since a new release of <productname>eCos</productname> comes with
+different pathnames for all the source files, a bit of work is necessary
+to import a new release into your source repository. </PARA>
+<PARA>One way of handling the import is to rename all the version
+parts to some common name, for example &ldquo;current&rdquo;,
+and continue to work. &ldquo;current&rdquo; is suggested because <command>ecosconfig</command> recognizes
+it and places it first in any list of versions. In the future, we
+may provide a tool to help with this, or an option in the install
+wizard. Alternatively, in a POSIX shell environment (Linux or Cygwin
+on Windows) use the following command: </PARA>
+<SCREEN>find . -name <replaceable>&Version;</replaceable> -type d -printf 'mv &percnt;p &percnt;h/current\n' | sh</SCREEN>
+<PARA>Having carried out such a renaming operation, your
+ source tree will now look like this: </PARA>
+<SCREEN><REPLACEABLE>BASE_DIR</REPLACEABLE>/kernel/current/include/
+<REPLACEABLE>BASE_DIR</REPLACEABLE>/kernel/current/src/
+<REPLACEABLE>BASE_DIR</REPLACEABLE>/kernel/current/tests/
+ ...
+<REPLACEABLE>BASE_DIR</REPLACEABLE>/compat/uitron/current/include/
+<REPLACEABLE>BASE_DIR</REPLACEABLE>/compat/uitron/current/src/
+<REPLACEABLE>BASE_DIR</REPLACEABLE>/compat/uitron/current/tests/
+ </SCREEN>
+<PARA>which is a suitable format for import into your own
+ source code control system. When you get a subsequent
+ release of <productname>eCos</productname>, do the same thing and use your own source
+ code control system to manage the new source base, by
+ importing the new version from </PARA>
+<SCREEN><REPLACEABLE>NEW_BASE_DIR</REPLACEABLE>/kernel/current/include/</SCREEN>
+<PARA>and so on. </PARA>
+<PARA>The <productname>eCos</productname> build tool will now offer only the
+ &ldquo;current&rdquo; version of each package; select this
+ for the packages you wish to use. </PARA>
+<PARA>Making such a change has implications for any build
+ trees you already have in use. A configured build tree
+ contains information about the selected packages and their
+ selected versions. Changing the name of the
+ &ldquo;versioning&rdquo; folder in the source tree
+ invalidates this information, and in consequence it also
+ invalidates any local configuration options you have set up
+ in this build tree. So if you want to change the version
+ information in the source tree, do it first, before
+ investing any serious time in configuring and building your
+ system. When you create a new build tree to deal with the
+ new source layout, it will contain default settings for all
+ the configuration options, just like the old build tree did
+ before you configured it. You will need to redo that
+ configuration work in the new tree. </PARA>
+<PARA>Moving source code around also invalidates debugging information
+in any programs or libraries built from the old tree; these will
+need to be rebuilt. </PARA>
+</SECT1>
+</CHAPTER>
+</PART>
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:nil
+sgml-shorttag:t
+sgml-namecase-general:t
+sgml-general-insert-case:lower
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:("user-guide.sgml" "book" "part")
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
diff --git a/cesar/ecos/doc/sgml/user-guide/ecos-license.sgml b/cesar/ecos/doc/sgml/user-guide/ecos-license.sgml
new file mode 100644
index 0000000000..49e5cad660
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/ecos-license.sgml
@@ -0,0 +1,382 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- config-tool.sgml -->
+<!-- -->
+<!-- eCos User Guide -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<APPENDIX ID="GNU-GENERAL-PUBLIC-LICENSE">
+ <docinfo>
+ <edition>Version 2, June 1991</edition>
+ <copyright>
+ <year>1989</year>
+ <year>1991</year>
+ <holder>Free Software Foundation, Inc.</holder>
+ </copyright>
+ <address>59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</address>
+ </docinfo>
+<TITLE>GNU General Public License</TITLE>
+<LITERALLAYOUT>
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ &lt;one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) &lt;year> &lt;name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ &lt;signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+</LITERALLAYOUT>
+</APPENDIX>
diff --git a/cesar/ecos/doc/sgml/user-guide/installation.sgml b/cesar/ecos/doc/sgml/user-guide/installation.sgml
new file mode 100644
index 0000000000..8b2949ffea
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/installation.sgml
@@ -0,0 +1,250 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- installation.sgml -->
+<!-- -->
+<!-- eCos User Guide -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- Copyright (C) 2003 Nick Garnett -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part ID="user-guide-installation">
+<TITLE>Installing <productname>eCos</productname></TITLE>
+
+<!-- {{{ System Requirements -->
+
+<chapter id="user-guide-installation-requirements">
+<title>System Requirements</title>
+
+<ITEMIZEDLIST>
+
+<LISTITEM>
+<PARA><!-- <conditionaltext> -->Standard Intel architecture PC running
+ Linux (tested on recent Red Hat, SuSE and Debian distributions),
+ Microsoft Windows NT (no earlier than 4.0 + SP6a), Windows 2000 and
+ Windows XP. Linux distributions from other vendors may also work, but
+ are currently untested. </PARA>
+</LISTITEM>
+
+<LISTITEM>
+<PARA>Enough <!-- <index></index> --> disk space for the installed
+distribution. The <productname>eCos</productname> installation process
+will detail the various components of <productname>eCos</productname>
+and the compiler toolkit that can be installed, and their disk space
+requirements.</PARA>
+</LISTITEM>
+
+<LISTITEM>
+<PARA>64MB of RAM and a 350MHz or faster Pentium processor.</PARA><!-- <conditionaltext> -->
+</LISTITEM>
+
+</ITEMIZEDLIST>
+
+<PARA>If you are downloading the <productname>eCos</productname>
+release distribution from <ULINK
+URL="http://ecos.sourceware.org">ecos.sourceware.org</ULINK>,
+you will also need space to store that image and to compile the
+toolchain and <productname>eCos</productname> from source.</PARA>
+
+
+</chapter>
+
+<!-- }}} -->
+<!-- {{{ Installation on Linux -->
+
+<chapter id="user-guide-installation-linux">
+<title>Installation on Linux</title>
+
+<para>
+Full instructions for the <ULINK
+URL="http://ecos.sourceware.org/getstart.html">downloading and
+installation of eCos</ULINK> on Linux hosts are provided on the eCos
+website.
+</para>
+
+</chapter>
+
+<!-- }}} -->
+<!-- {{{ Installation on Windows -->
+
+<chapter id="user-guide-installation-windows">
+<title>Installation on Windows</title>
+
+<para>
+Full instructions for the <ULINK
+URL="http://ecos.sourceware.org/getstart.html">downloading and
+installation of eCos</ULINK> on Windows hosts are provided on the
+eCos website.
+</para>
+
+</chapter>
+
+<!-- }}} -->
+<!-- {{{ Target Setup -->
+
+<chapter id="user-guide-installation-target">
+<title>Target Setup</title>
+
+<PARA>While <productname>eCos</productname> supports a variety of
+targets, communication with all the targets happens in one of four
+ways. These are described in general below. Any details or variations
+from these descriptions will be found in the
+<productname>eCos</productname> documentation for a specific target,
+in the appendix.</PARA>
+
+<SECT1 id="connecting-target-serial">
+<TITLE><!-- <index></index> -->Connecting Via Serial Line</TITLE>
+
+<PARA>Most targets will have RedBoot or GDB Stubs installed.
+These normally waits for GDB to connect at 38400 baud, using 8 data
+bit, no parity bit and 1 stop-bit and no hardware flow control. Check
+the documentation for your target to ensure it uses this speed. If not,
+adjust the following instructions accordingly.</PARA>
+
+<PARA>The following instructions depend on your having selected
+the appropriate serial port on the host. That is, the serial port
+which connects to the target's (primary) serial port. On
+Linux this could be <FILENAME>/dev/ttyS0</FILENAME>,
+while the same port on Windows would be named COM1.
+Substitute the proper serial port name in the below.</PARA>
+
+<PARA>Connect to the target by issuing the following commands in
+GDB console mode:</PARA>
+
+<PROGRAMLISTING>
+(gdb) set remotebaud 38400 <!-- <conditionaltext> -->
+(gdb) target remote /dev/ttyS0
+</PROGRAMLISTING>
+
+<PARA>In Insight, connect by opening the <EMPHASIS>File-&#62;Target
+Settings</EMPHASIS> window and enter:</PARA>
+
+<PROGRAMLISTING>
+Target: Remote/Serial
+Baud Rate: 38400
+Port: /dev/ttyS0
+</PROGRAMLISTING>
+
+<PARA>Set other options according to preference, close the window
+and select
+<EMPHASIS>Run-&#62;Connect to target</EMPHASIS>.
+</PARA>
+
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="connecting-target-ethernet">
+<TITLE><!-- <index></index> -->Connecting Via Ethernet</TITLE>
+
+<PARA>Some targets allow GDB to connect via Ethernet - if so, it will
+be mentioned in the document describing the target. Substitute the
+target's assigned IP address or hostname for &lt;hostname&#62; in the
+following. Depending on how RedBoot has been configured, it will
+either have this address allocated statically, or will acquire it via
+BOOTP. In both cases RedBoot will report the IP address it is
+listening on in its startup message printed on the serial port. The
+&lt;port&#62; is the TCP port which RedBoot is listening on, usually
+9000. It is also listed in the target document.</PARA>
+
+<PARA>Connect to the target by issuing the following command in
+GDB console mode:</PARA>
+
+<PROGRAMLISTING>
+(gdb) target remote &lt;hostname&#62;:&lt;port&#62;
+</PROGRAMLISTING>
+
+<PARA>In Insight, connect by opening the <EMPHASIS>File-&#62;Target
+Settings</EMPHASIS> window and enter:</PARA>
+
+<PROGRAMLISTING>
+Target: Remote/TCP
+Hostname: &lt;hostname&#62;
+Port: &lt;port&#62;
+</PROGRAMLISTING>
+
+<PARA><!-- <conditionaltext> -->Set other options according to
+preference, close the window and select <EMPHASIS>Run-&#62;Connect to
+target</EMPHASIS>.</PARA>
+
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="connecting-target-sim">
+<TITLE><!-- <index></index> -->Using A Simulator Target</TITLE>
+
+<PARA>GDB connects to all simulator targets using the same basic
+command, although each simulator may require additional options.
+These are listed in the document describing the target, and should
+be used when connecting.</PARA>
+
+<PARA>Connect to the target by issuing the following command in
+GDB console mode:</PARA>
+
+<PROGRAMLISTING>
+(gdb) target sim [target specific options]
+</PROGRAMLISTING>
+
+<PARA>In Insight, connect by opening the <EMPHASIS>File-&#62;Target
+Settings</EMPHASIS> window and enter:</PARA>
+
+<PROGRAMLISTING>
+Target: Simulator
+Options: [target specific options]
+</PROGRAMLISTING>
+
+<PARA>Set other options according to preference, close the window and
+select <EMPHASIS>Run-&#62;Connect to target</EMPHASIS>.</PARA>
+
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="connecting-target-synth">
+<TITLE>Using A Synthetic Target</TITLE>
+
+<PARA>Synthetic targets are special in that the built tests and
+applications actually run as native applications on the host. This
+means that there is no target to connect to. The test or application
+can be run directly from the GDB console using:</PARA>
+
+<PROGRAMLISTING>
+(gdb) run
+</PROGRAMLISTING>
+
+<PARA>or from Insight by pressing the <EMPHASIS>Run</EMPHASIS> icon.
+There is therefore no need to connect to the target or download the
+application, so you should ignore GDB &ldquo;target&rdquo; and
+&ldquo;load&rdquo; commands in any instructions found in other places
+in the documentation.</PARA>
+</SECT1>
+
+</chapter>
+
+<!-- }}} -->
+
+</part>
+
diff --git a/cesar/ecos/doc/sgml/user-guide/introduction.sgml b/cesar/ecos/doc/sgml/user-guide/introduction.sgml
new file mode 100644
index 0000000000..b417f8396f
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/introduction.sgml
@@ -0,0 +1,785 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- introduction.sgml -->
+<!-- -->
+<!-- eCos User Guide -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- Copyright (C) 2003 Nick Garnett -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part ID="user-guide-introduction">
+<TITLE>Introduction</TITLE>
+
+<!--
+<chapter ID="FOREWORD-WHATS-NEW">
+<TITLE>What's New?</TITLE>
+
+<para>
+XXXXX So what is new??? XXXXX
+</para>
+
+</chapter>
+-->
+
+<!-- ==================================================== -->
+
+<chapter ID="ecos-key-features">
+<TITLE>Key Features</TITLE>
+
+<itemizedlist>
+
+<listitem>
+<para><productname>eCos</productname> is distributed under the GPL
+license with an exception which permits proprietary application code
+to be linked with <productname>eCos</productname> without itself being
+forced to be released under the GPL. It is also royalty and buyout
+free.
+</para>
+</listitem>
+
+<listitem>
+<para>As an Open Source project, <productname>eCos</productname> is
+under constant improvement, with an active developer community, based
+around the <productname>eCos</productname> web site at <ULINK
+URL="http://ecos.sourceware.org/">http://ecos.sourceware.org/</ULINK>.
+</para>
+</listitem>
+
+<listitem>
+<para>Powerful GUI-based configuration system allowing both large and
+fine grained configuration of <productname>eCos</productname>. This
+allows the functionality of <productname>eCos</productname> to be
+customized to the exact requirements of the application.
+</para>
+</listitem>
+
+<listitem>
+<para>Full-featured, flexible, configurable, real time embedded
+kernel. The kernel provides thread scheduling, synchronization,
+timer, and communication primitives. It handles hardware resources
+such as interrupts, exceptions, memory and caches.
+</para>
+</listitem>
+
+<listitem>
+<para>The Hardware Abstraction Layer (HAL) hides the specific features
+of each supported CPU and platform, so that the kernel and other
+run-time components can be implemented in a portable fashion.
+</para>
+</listitem>
+
+<listitem>
+<para>Support for &micro;ITRON and POSIX Application Programmer
+Interfaces (APIs). It also includes a fully featured, thread-safe ISO
+standard C library and math library.
+</para>
+</listitem>
+
+<listitem>
+<para>Support for a wide variety of devices including many serial
+devices, ethernet controllers and FLASH memories. There is also
+support for PCMCIA, USB and PCI interconnects.
+</para>
+</listitem>
+
+<listitem>
+<para>A fully featured TCP/IP stack implementing IP, IPv6, ICMP, UDP
+and TCP over ethernet. Support for SNMP, HTTP, TFTP and FTP are also
+present.
+</para>
+</listitem>
+
+<listitem>
+<para>The RedBoot ROM monitor is an application that uses the
+<productname>eCos</productname> HAL for portability. It provides
+serial and ethernet based booting and debug services during
+development.
+</para>
+</listitem>
+
+<listitem>
+<para>Many components include test programs that validate the
+components behaviour. These can be used both to check that hardware is
+functioning correctly, and as examples of
+<productname>eCos</productname> usage.
+</para>
+</listitem>
+
+<listitem>
+<para><productname>eCos</productname> documentation included this User
+Guide, the Reference Manual and the Components Writer's Guide. These
+are being continually updated as the system develops.
+</para>
+</listitem>
+
+</itemizedlist>
+
+</chapter>
+
+<!-- ==================================================== -->
+
+<chapter ID="ecos-overview">
+<TITLE><productname>eCos</productname> Overview</TITLE>
+
+<PARA><productname>eCos</productname> is an open source, configurable,
+ portable, and royalty-free embedded real-time operating
+ system. The following text expands on these core aspects that
+ define <productname>eCos</productname>.</PARA>
+
+<PARA><productname>eCos</productname> is provided as an open source
+ runtime system supported by the GNU open source development
+ tools. Developers have full and unfettered access to all
+ aspects of the runtime system. No parts of it are proprietary
+ or hidden, and you are at liberty to examine, add to, and
+ modify the code as you deem necessary. These rights are
+ granted to you and protected by the GNU Public License (GPL).
+ An exception clause has been added to the eCos license which
+ limits the circumstances in which the license applies to other
+ code when used in conjunction with eCos. This exception grants
+ you the right to freely develop and distribute applications
+ based on <productname>eCos</productname>. You are not expected
+ or required to make your embedded applications or any
+ additional components that you develop freely available so
+ long as they are not derived from
+ <productname>eCos</productname> code. We of course welcome all
+ contributions back to <productname>eCos</productname> such as
+ board ports, device drivers and other components, as this
+ helps the growth and development of
+ <productname>eCos</productname>, and is of benefit to the
+ entire <productname>eCos</productname> community. See <XREF
+ LINKEND="ecos-licensing"> for more details.</PARA>
+
+<PARA>One of the key technological innovations in
+ <productname>eCos</productname> is the configuration
+ system. The configuration system allows the application writer
+ to impose their requirements on the run-time components, both
+ in terms of their functionality and implementation, whereas
+ traditionally the operating system has constrained the
+ application's own implementation. Essentially, this enables
+ <productname>eCos</productname> developers to create their own
+ application-specific operating system and makes
+ <productname>eCos</productname> suitable for a wide range of
+ embedded uses. Configuration also ensures that the resource
+ footprint of <productname>eCos</productname> is minimized as
+ all unnecessary functionality and features are removed. The
+ configuration system also presents
+ <productname>eCos</productname> as a component
+ architecture. This provides a standardized mechanism for
+ component suppliers to extend the functionality of
+ <productname>eCos</productname> and allows applications to be
+ built from a wide set of optional configurable run-time
+ components. Components can be provided from a variety of
+ sources including: the standard
+ <productname>eCos</productname> release; commercial third
+ party developers or open source contributors.</PARA>
+
+<PARA>The royalty-free nature of <productname>eCos</productname> means that you can develop and
+deploy your application using the standard <productname>eCos</productname> release without
+incurring any royalty charges. In addition, there are no up-front
+license charges for the <productname>eCos</productname> runtime source code and associated
+tools. We provide, without charge, everything necessary for basic
+embedded applications development.</PARA>
+
+<PARA><productname>eCos</productname> is designed to be portable to a
+wide range of target architectures and target platforms including 16,
+32, and 64 bit architectures, MPUs, MCUs and DSPs. The
+<productname>eCos</productname> kernel, libraries and runtime
+components are layered on the Hardware Abstraction Layer (HAL), and
+thus will run on any target once the HAL and relevant device drivers
+have been ported to the target's processor architecture and
+board. Currently <productname>eCos</productname> supports a large
+range of different target architectures:
+ </para>
+
+<itemizedlist>
+
+<listitem><para>ARM, Intel StrongARM and XScale</para></listitem>
+
+<listitem><para>Fujitsu FR-V</para></listitem>
+
+<listitem><para>Hitachi SH2/3/4</para></listitem>
+
+<listitem><para>Hitachi H8/300H </para></listitem>
+
+<listitem><para>Intel x86</para></listitem>
+
+<listitem><para>MIPS</para></listitem>
+
+<listitem><para>Matsushita AM3x</para></listitem>
+
+<listitem><para>Motorola PowerPC</para></listitem>
+
+<listitem><para>Motorola 68k/Coldfire</para></listitem>
+
+<listitem><para>NEC V850</para></listitem>
+
+<listitem><para>Sun SPARC</para></listitem>
+
+</itemizedlist>
+
+<para>
+including many of the popular variants of these architectures
+and evaluation boards.</PARA>
+
+<PARA><productname>eCos</productname> has been designed to support
+applications with real-time requirements, providing features such as
+full preemptability, minimal interrupt latencies, and all the
+necessary synchronization primitives, scheduling policies, and
+interrupt handling mechanisms needed for these type of
+applications. <productname>eCos</productname> also provides all the
+functionality required for general embedded application support
+including device drivers, memory management, exception handling, C,
+math libraries, etc. In addition to runtime support, the
+<productname>eCos</productname> system includes all the tools
+necessary to develop embedded applications, including
+<productname>eCos</productname> software configuration and build
+tools, and GNU based compilers, assemblers, linkers, debuggers, and
+simulators.</PARA>
+
+<PARA>To get the most out of <productname>eCos</productname> you
+should visit the <productname>eCos</productname> open source
+developers site: <ULINK
+URL="http://ecos.sourceware.org/">http://ecos.sourceware.org/</ULINK>.
+</para>
+
+<PARA>The site is dedicated to the <productname>eCos</productname>
+ developer community and contains a rich set of resources
+ including news, FAQ, online documentation, installation guide,
+ discussion and announcement mailing lists, and runtime and
+ development tools downloads. The site also supports anonymous
+ CVS and WEBCVS access to provide direct access to the latest
+ <productname>eCos</productname> source base. </PARA>
+
+<PARA><productname>eCos</productname> is released as open source
+ software because we believe that this is the most effective
+ software development model, and that it provides the greatest
+ benefit to the embedded developer community as a whole. As part
+ of this endeavor, we seek the input and participation of
+ <productname>eCos</productname> developers in its continuing
+ evolution. Participation can take many forms including:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>providing us with feedback on how <productname>eCos</productname> might be made more
+useful to you - by taking part in the ongoing mailing list discussions
+and by submitting problem reports covering bugs, documentation issues,
+and missing features</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>contributing bug fixes and enhancement patches</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>contributing new code including device drivers, board
+ports, libraries, and other runtime components</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+
+<PARA>Our long term aim is to make <productname>eCos</productname> a
+rich and ubiquitous standard infrastructure for the development of
+deeply embedded applications. This will be achieved with the
+assistance of the <productname>eCos</productname> developer community
+cooperating to improve <productname>eCos</productname> for all. We
+would like to take this opportunity to extend our thanks to the many
+<productname>eCos</productname> developers who have already
+contributed feedback, ideas, patches, and code that have augmented and
+improved this release.</PARA>
+
+
+<para>
+<emphasis>The <productname>eCos</productname> Maintainers</emphasis>
+</para>
+
+</chapter>
+
+<!-- ==================================================== -->
+
+<chapter ID="ecos-licensing">
+<TITLE><productname>eCos</productname> Licence Overview</TITLE>
+
+<para>As of May 2002, <productname>eCos</productname> is released
+under a modified version of the well known <ulink
+url="http://www.gnu.org/copyleft/gpl.html">GNU General Public License
+(GPL)</ulink>, now making it an <ulink
+url="http://www.gnu.org/philosophy/license-list.html">official
+GPL-compatible Free Software License</ulink>. An exception clause has
+been added to the <productname>eCos</productname> license which limits
+the circumstances in which the license applies to other code when used
+in conjunction with <productname>eCos</productname>. The exception
+clause is as follows:</para>
+
+<programlisting width=72>
+ As a special exception, if other files instantiate templates or use macros
+ or inline functions from this file, or you compile this file and link it
+ with other works to produce a work based on this file, this file does not
+ by itself cause the resulting work to be covered by the GNU General Public
+ License. However the source code for this file must still be made
+ available in accordance with section (3) of the GNU General Public
+ License.
+
+ This exception does not invalidate any other reasons why a work based on
+ this file might be covered by the GNU General Public License.
+</programlisting>
+
+<para>The goal of the license is to serve the
+<productname>eCos</productname> user community as a whole. It allows
+all <productname>eCos</productname> users to develop products without
+paying anybody anything, no matter how many developers are working on
+the product or how many units will be shipped. The license also
+guarantees that the <productname>eCos</productname> source code will
+always be freely available. This applies not only to the core
+<productname>eCos</productname> code itself but also to any changes
+that anybody makes to the core. In particular, it should prevent any
+company or individual contributing code to the system and then later
+claiming that all <productname>eCos</productname> users are now guilty
+of copyright or patent infringements and have to pay royalties. It
+should also prevent any company from making some small improvements,
+calling the result a completely new system, and releasing this under a
+new and less generous license.</para>
+
+<para>The license does <emphasis>not</emphasis> require users to
+release the source code of any <emphasis>applications</emphasis> that
+are developed with <productname>eCos</productname>. However, if
+anybody makes any changes to code covered by the
+<productname>eCos</productname> license, or writes new files derived
+in any way from <productname>eCos</productname> code, then we believe
+that the entire user community should have the opportunity to benefit
+from this. The license stipulates that these changes must be made
+available in source code form to all recipients of binaries based on
+the modified code, either by including the sources along with the
+binaries you deliver (or with any device containing such binaries) or
+with a written offer to supply the source code to the general public
+for three years. It is perhaps most practical for
+<productname>eCos</productname> developers to make the source code
+available online and inform those who are receiving binaries
+containing <productname>eCos</productname> code, and probably also the
+<productname>eCos</productname> maintainers, about the location of the
+code. See the <ulink url="http://www.gnu.org/copyleft/gpl.html">full
+text of the GPL</ulink> for the most authoritative definition of the
+obligations.</para>
+
+<para>Although it is not strictly necessary to contribute the modified
+code back to the <productname>eCos</productname> open source project,
+we are always pleased to receive code contributions and hope that
+developers will also be keen to give back in return for what they
+received from the <productname>eCos</productname> project completely
+free of charge. The <productname>eCos</productname> maintainers are
+responsible for deciding whether such contributions should be applied
+to the public repository. In addition, a <ulink
+url="http://ecos.sourceware.org/assign.html">copyright
+assignment</ulink> is required for any significant changes to the core
+<productname>eCos</productname> packages.</para>
+
+<para>The result is a royalty-free system with minimal obligations on
+the part of application developers. This has resulted in the rapid
+uptake of <productname>eCos</productname>. At the same time,
+<productname>eCos</productname> is fully open source with all the
+benefits that implies in terms of quality and innovation. We believe
+that this is a winning combination.</para>
+
+<sect1 id="ecos-licensing-qna">
+<title>Questions and answers</title>
+
+<para>The following queries provide some clarification as to the
+implications of the <productname>eCos</productname> license. They do
+not consititute part of the legal meaning of the license.</para>
+
+<para><emphasis>Q.</emphasis> What is the effect of the
+<productname>eCos</productname> license?</para>
+
+<para><emphasis>A.</emphasis> In the simplest terms, when you
+distribute anything containing <productname>eCos</productname> code,
+you must make the source code to <productname>eCos</productname>
+available under the terms of the GPL.</para>
+
+<para><emphasis>Q.</emphasis> What if I make changes to
+<productname>eCos</productname>, or write new code based on
+<productname>eCos</productname> code?</para>
+
+<para><emphasis>A.</emphasis> Then you must make those changes
+available as well.</para>
+
+<para><emphasis>Q.</emphasis> Do I have to distribute the source
+code to my application? Isn't the GPL "viral"?</para>
+
+<para><emphasis>A.</emphasis> You do not have to distribute any
+code under the terms of the GPL other than
+<productname>eCos</productname> code or code derived from
+<productname>eCos</productname>. For example, if you write a HAL port
+based on copying an existing <productname>eCos</productname> HAL in
+any way, you must make the source code available with the
+binary. However you would not need to make available any other code,
+such as the code of a wholly separate application linked with
+<productname>eCos</productname>.</para>
+
+<para><emphasis>Q.</emphasis> I would rather stick with the
+RHEPL code, but I updated my anonymous CVS checkout.</para>
+
+<para><emphasis>A.</emphasis> You can check out the final
+version of anonymous CVS before the license change using the CVS tag
+<literal>last-rhepl</literal>. See <ulink
+url="http://ecos.sourceware.org/anoncvs.html">the anonymous CVS
+access page</ulink>
+for details.</para>
+
+</sect1>
+
+<sect1 id="ecos-licensing-previous">
+<title>Previous License</title>
+
+<para>
+
+Prior to May 2002, <productname>eCos</productname> was released under
+the <ulink url="http://ecos.sourceware.org/old-license.html">Red
+Hat eCos Public License (RHEPL)</ulink>. The RHEPL required any
+modifications to <productname>eCos</productname> code to be made
+available under preferential terms to Red Hat and was therefore
+incompatible with code licensed under the GPL. The use of
+<productname>eCos</productname> source code which was licensed under
+the RHEPL is not affected by the switch to the modified GPL for later
+revisions.
+</para>
+
+</sect1>
+
+</chapter>
+
+<!-- ==================================================== -->
+
+<chapter id="notation-and-conventions">
+<title>Notation and Conventions</title>
+
+<para>
+Since there are many supported target architectures, notation
+conventions are used in this manual to avoid repeating instructions
+that are very similar.
+</para>
+
+<SECT1 ID="GDB-AND-GCC-COMMAND-NOTATION"><!-- <index></index> --><!-- <xref> -->
+<TITLE>GDB and <!-- <index></index> -->GCC Command Notation</TITLE>
+
+<para>
+Cross-development commands like <COMMAND>gcc</COMMAND> and
+<COMMAND>gdb</COMMAND> will be shown with a
+<replaceable>TARGET-</replaceable> prefix. You need to replace
+<replaceable>TARGET-</replaceable> with the correct prefix before
+using the command. Just using <command>gcc</command> or
+<command>gdb</command> will use the tools for the host, which is not
+(usually) what you want.
+</para>
+
+<para>
+For example use <command>arm-elf-gcc</command> and
+<command>arm-elf-gdb</command> for ARM, Thumb, and StrongARM targets.
+Use <command>xscale-elf-gcc</command> and
+<command>xscale-elf-gdb</command> for Intel Xscale targets.
+Use <command>i386-elf-gcc</command> and
+<command>i386-elf-gdb</command> for IA32 targets. And so on, the exact
+prefix to use is shown in the documentation for each target.
+</para>
+
+<PARA>Note that some versions of the GCC cross compiler generate
+executable files with the <FILENAME>.exe</FILENAME> suffix on Windows,
+but not on Linux. The suffix <FILENAME>.exe</FILENAME> will be omitted
+from executable file names, so you will see <FILENAME>hello</FILENAME>
+instead of <FILENAME>hello.exe</FILENAME>.</PARA>
+
+</sect1>
+
+<SECT1 ID="DIRECTORY-AND-FILE-SYSTEM-CONVENTIONS"><!-- <index></index> -->
+<TITLE>Directory and File System Conventions</TITLE>
+
+<PARA>The default directory for installing
+<productname>eCos</productname> on Windows (usually
+<FILENAME>C:/Program Files/eCos</FILENAME>) is different from that on
+Linux (usually <FILENAME>/opt/ecos</FILENAME>). Since many command
+line examples in the tutorials use these paths, this default (base)
+directory will be cited as <replaceable>BASE_DIR</replaceable>.</PARA>
+
+<PARA>Windows and Linux have a similar file system syntax, but the
+MS-DOS command interpreter on Windows uses the backslash character
+(\) as a path separator, while Linux and POSIX shells (including
+the Cygwin bash shell for windows) use the forward slash (/).</PARA>
+
+<PARA>This document will use the POSIX shell convention of forward
+slashes throughout.</PARA>
+
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 ID="VERSION-CONVENTIONS">
+<TITLE>Version Conventions</TITLE>
+
+<para>
+This manual does not refer explicitly to any particular version of
+<productname>eCos</productname>. However, version numbers form part of
+many file path names. In all of these places the version number will
+be shown like this: <replaceable>&Version;</replaceable>.
+</para>
+
+<para>
+If you have used anonymous CVS to check
+<productname>eCos</productname> out of the CVS repository, the version
+number will always be <literal>current</literal>, since that is the
+name of the directory in the repository. When a stable release is made
+this directory name is changed, in the release, to the number of the
+release, for example <literal>v2_0</literal> or
+<literal>v2_1</literal>.
+</para>
+
+</SECT1>
+
+
+</chapter>
+
+
+
+<chapter id="documentation-roadmap">
+<title>Documentation Roadmap</title>
+
+<para>
+The <productname>eCos</productname> documentation is divided into a
+three main parts:
+</para>
+
+<VARIABLELIST>
+<VARLISTENTRY>
+<TERM><EMPHASIS>User Guide</EMPHASIS></TERM>
+<LISTITEM>
+<PARA>This document. It includes the following sections:</PARA>
+
+ <VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Installing <productname>eCos</productname></TERM>
+ <LISTITEM>
+ <para>
+ This section describes how to install the
+ <productname>eCos</productname> software, how to set up your
+ hardware and how to test that it is all working.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <VARLISTENTRY>
+ <TERM>Programming Under <productname>eCos</productname></TERM>
+ <LISTITEM>
+ <para>
+ This section describes how to write programs that run under
+ <productname>eCos</productname> by running through some examples.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <VARLISTENTRY>
+ <TERM>The <productname>eCos</productname> <application>Configuration Tool</application></TERM>
+ <LISTITEM>
+ <para>
+ This section describes the <productname>eCos</productname> graphical
+ configuration tool and how to use it to change how
+ <productname>eCos</productname> behaves.</para>
+ </listitem>
+ </varlistentry>
+
+ <VARLISTENTRY>
+ <TERM><productname>eCos</productname> Programming Concepts and Techniques</TERM>
+ <LISTITEM>
+ <PARA>An explanation of the <productname>eCos</productname> programming
+ cycle, and a description of some debugging facilities that
+ <productname>eCos</productname> offers.
+ </PARA>
+ </listitem>
+ </varlistentry>
+
+ <VARLISTENTRY>
+ <TERM>Configuration and the Package
+ Repository</TERM>
+ <LISTITEM>
+ <PARA>Information on how to configure <productname>eCos</productname>
+ manually, including a reference on the
+ <command>ecosconfig</command> command, memory layouts,
+ and information on how to manage a package repository
+ using the <productname>eCos</productname> Package Administration
+ Tool.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+
+ </variablelist>
+
+</LISTITEM>
+</VARLISTENTRY>
+
+<VARLISTENTRY>
+<TERM><EMPHASIS>Reference Guide</EMPHASIS></TERM>
+<LISTITEM>
+
+<PARA>The Reference Guide provides detailed documentation on various
+aspects of <productname>eCos</productname>. This document is being
+constantly updated, so the following list just mentions the more
+important sections, take a look at the guide itself for the full
+story.</PARA>
+
+ <variablelist>
+
+ <VARLISTENTRY>
+ <TERM>The <productname>eCos</productname> Kernel</TERM>
+ <LISTITEM>
+ <PARA>In-depth description of <productname>eCos</productname>&quot;s
+ native C kernel API Important considerations are given
+ for programming the <productname>eCos</productname>
+ kernel. The semantics for each kernel function are
+ described, including how they are affected by
+ configuration. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>POSIX and &micro;ITRON APIs</TERM>
+ <LISTITEM>
+ <PARA>A description of the POSIX and &micro;ITRON APIs and how they
+ are supported under <productname>eCos</productname>.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>The <productname>eCos</productname> Hardware Abstraction Layer (HAL)</TERM>
+ <LISTITEM>
+ <PARA>A description of the structure and functionality of the
+ <productname>eCos</productname> HAL. This section also includes a
+ porting guide to help moving <productname>eCos</productname> to
+ different platforms.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>Device Drivers</TERM>
+ <LISTITEM>
+ <PARA>A description of the philosophy behind
+ <productname>eCos</productname> device drivers, as well as a
+ presentation of the C language APIs for using the current
+ device drivers. </PARA>
+ <para>
+ Device driver support includes serial, ethernet and FLASH devices,
+ and support for PCI, PCMCIA and USB interconnects.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>RedBoot User's Guide</TERM>
+ <LISTITEM>
+ <PARA>This describes RedBoot, which provides a complete bootstrap
+ environment for a range of embedded operating systems, such as
+ embedded Linux and <productname>eCos</productname>, and
+ includes facilities such as network downloading and
+ debugging. It also provides a simple flash file system for
+ boot images.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>TCP/IP Stack Support</TERM>
+ <LISTITEM>
+ <PARA>This describes the Common Networking for
+ <productname>eCos</productname> package, which provides
+ support for a complete TCP/IP networking stack. The design
+ allows for the actual stack to be modular and at the current
+ time two different implementations, one based on OpenBSD from
+ 2000 and a new version based on FreeBSD, are available.
+ </para>
+ <para>Other components related to networking, including support for
+ SNMP, DNS, HTTP and FTP, are also described.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ </variablelist>
+
+</LISTITEM>
+</VARLISTENTRY>
+
+<VARLISTENTRY>
+<TERM><EMPHASIS>Component Writer's Guide</EMPHASIS></TERM>
+<LISTITEM>
+<PARA>The Component Writer's Guide is intended for developers who need
+to add or modify parts of <productname>eCos</productname> itself. It
+describes the following things:
+</PARA>
+
+ <VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Overview</TERM>
+ <LISTITEM>
+ <PARA>An explanation of the configuration technology used in
+ <productname>eCos</productname>, why it is done this way, how it
+ works and the terminology used.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>Package Organization</TERM>
+ <LISTITEM>
+ <PARA>A description of the <productname>eCos</productname> package
+ repository, how it is organized and how packages themselves are
+ organized.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>The CDL Language</TERM>
+ <LISTITEM>
+ <PARA>A description of the CDL language and how it is used to
+ control the configuration of <productname>eCos</productname>
+ components. The document also contains a complete specification of
+ the language.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>The Build Process</TERM>
+ <LISTITEM>
+ <PARA>A description of what happens once a configuration has been
+ created and must be built into a set of executables.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ </variablelist>
+
+</LISTITEM>
+</VARLISTENTRY>
+</variablelist>
+
+</chapter>
+
+
+</part>
diff --git a/cesar/ecos/doc/sgml/user-guide/jadetex.cfg b/cesar/ecos/doc/sgml/user-guide/jadetex.cfg
new file mode 100644
index 0000000000..f5c94ecd7c
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/jadetex.cfg
@@ -0,0 +1 @@
+\hypersetup{pdfauthor=eCos (pdfjadetex) , colorlinks=true, linkcolor=blue, pdfstartview=FitH}
diff --git a/cesar/ecos/doc/sgml/user-guide/makefile b/cesar/ecos/doc/sgml/user-guide/makefile
new file mode 100644
index 0000000000..724f7b5a3e
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/makefile
@@ -0,0 +1,54 @@
+#=============================================================================
+#
+# makefile
+#
+# For building the eCos RedBoot docs
+#
+#=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+# -------------------------------------------
+# This file is part of eCos, the Embedded Configurable Operating System.
+# Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+#
+# eCos is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 or (at your option) any later version.
+#
+# eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with eCos; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+#
+# As a special exception, if other files instantiate templates or use macros
+# or inline functions from this file, or you compile this file and link it
+# with other works to produce a work based on this file, this file does not
+# by itself cause the resulting work to be covered by the GNU General Public
+# License. However the source code for this file must still be made available
+# in accordance with section (3) of the GNU General Public License.
+#
+# This exception does not invalidate any other reasons why a work based on
+# this file might be covered by the GNU General Public License.
+# -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#=============================================================================
+#####DESCRIPTIONBEGIN####
+#
+# Author(s): bartv, jlarmour
+# Date: 2001-01-11
+#####DESCRIPTIONEND####
+#=============================================================================
+
+TOPLEVEL := ../../../packages
+MAIN_SGML := user-guide.sgml
+MAIN_HTML := ecos-user-guide.html
+MAIN_PDF := ecos-user-guide.pdf
+OTHER_SGML := config-tool.sgml configuration.sgml ecos-license.sgml installation.sgml \
+ introduction.sgml programming-concepts-techniques.sgml \
+ programming.sgml real-time-characterization.sgml target-setup.sgml
+PICTURES :=
+
+include $(TOPLEVEL)/pkgconf/rules.doc
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/ARMStartup01.png b/cesar/ecos/doc/sgml/user-guide/pix/ARMStartup01.png
new file mode 100644
index 0000000000..3b7f13b2c9
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/ARMStartup01.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/BuildPackages.png b/cesar/ecos/doc/sgml/user-guide/pix/BuildPackages.png
new file mode 100644
index 0000000000..859ffe411b
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/BuildPackages.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/Conflicts.png b/cesar/ecos/doc/sgml/user-guide/pix/Conflicts.png
new file mode 100644
index 0000000000..87e3e830b1
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/Conflicts.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/ToolsOptions.png b/cesar/ecos/doc/sgml/user-guide/pix/ToolsOptions.png
new file mode 100644
index 0000000000..66b33c840b
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/ToolsOptions.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/addfromfolder.png b/cesar/ecos/doc/sgml/user-guide/pix/addfromfolder.png
new file mode 100644
index 0000000000..c3be0d8cf0
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/addfromfolder.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/addplatform.png b/cesar/ecos/doc/sgml/user-guide/pix/addplatform.png
new file mode 100644
index 0000000000..a0e156109e
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/addplatform.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/admin.png b/cesar/ecos/doc/sgml/user-guide/pix/admin.png
new file mode 100644
index 0000000000..1dbdb093d9
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/admin.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/bash.png b/cesar/ecos/doc/sgml/user-guide/pix/bash.png
new file mode 100644
index 0000000000..8fee4dc9de
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/bash.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/build-lib01.png b/cesar/ecos/doc/sgml/user-guide/pix/build-lib01.png
new file mode 100644
index 0000000000..75f9b30b06
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/build-lib01.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/build-processalt.png b/cesar/ecos/doc/sgml/user-guide/pix/build-processalt.png
new file mode 100644
index 0000000000..a7b7b4fb9d
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/build-processalt.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/build-tests01.png b/cesar/ecos/doc/sgml/user-guide/pix/build-tests01.png
new file mode 100644
index 0000000000..d10a2f77f1
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/build-tests01.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/build-tools.png b/cesar/ecos/doc/sgml/user-guide/pix/build-tools.png
new file mode 100644
index 0000000000..e5b75362de
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/build-tools.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/build-tools2.png b/cesar/ecos/doc/sgml/user-guide/pix/build-tools2.png
new file mode 100644
index 0000000000..35a0fb204b
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/build-tools2.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/buildoptions.png b/cesar/ecos/doc/sgml/user-guide/pix/buildoptions.png
new file mode 100644
index 0000000000..cdbe9a771f
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/buildoptions.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/ch-properties-dialog.png b/cesar/ecos/doc/sgml/user-guide/pix/ch-properties-dialog.png
new file mode 100644
index 0000000000..887543c547
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/ch-properties-dialog.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/comprepos.png b/cesar/ecos/doc/sgml/user-guide/pix/comprepos.png
new file mode 100644
index 0000000000..5fcd4602e3
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/comprepos.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/config-f1.png b/cesar/ecos/doc/sgml/user-guide/pix/config-f1.png
new file mode 100644
index 0000000000..787f3133a0
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/config-f1.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/configwin.png b/cesar/ecos/doc/sgml/user-guide/pix/configwin.png
new file mode 100644
index 0000000000..a5e2e33743
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/configwin.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/conflictwin.png b/cesar/ecos/doc/sgml/user-guide/pix/conflictwin.png
new file mode 100644
index 0000000000..62eea1a3e1
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/conflictwin.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/connection.png b/cesar/ecos/doc/sgml/user-guide/pix/connection.png
new file mode 100644
index 0000000000..bbecb1fa87
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/connection.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/find-dialog.png b/cesar/ecos/doc/sgml/user-guide/pix/find-dialog.png
new file mode 100644
index 0000000000..5994d85b63
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/find-dialog.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/html-help.png b/cesar/ecos/doc/sgml/user-guide/pix/html-help.png
new file mode 100644
index 0000000000..bf752b533f
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/html-help.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/memorywin.png b/cesar/ecos/doc/sgml/user-guide/pix/memorywin.png
new file mode 100644
index 0000000000..d21a60be9a
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/memorywin.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/memregions.png b/cesar/ecos/doc/sgml/user-guide/pix/memregions.png
new file mode 100644
index 0000000000..c573ba5e01
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/memregions.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/memreloc.png b/cesar/ecos/doc/sgml/user-guide/pix/memreloc.png
new file mode 100644
index 0000000000..7f951aab3b
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/memreloc.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/modifyplatform.png b/cesar/ecos/doc/sgml/user-guide/pix/modifyplatform.png
new file mode 100644
index 0000000000..f794789e0a
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/modifyplatform.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/open-dialog.png b/cesar/ecos/doc/sgml/user-guide/pix/open-dialog.png
new file mode 100644
index 0000000000..233e46c020
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/open-dialog.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/propwin.png b/cesar/ecos/doc/sgml/user-guide/pix/propwin.png
new file mode 100644
index 0000000000..f8afa6cc50
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/propwin.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/regprops.png b/cesar/ecos/doc/sgml/user-guide/pix/regprops.png
new file mode 100644
index 0000000000..7459d91cbd
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/regprops.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/repos-relocate.png b/cesar/ecos/doc/sgml/user-guide/pix/repos-relocate.png
new file mode 100644
index 0000000000..38d80fbbb2
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/repos-relocate.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/run-tests.png b/cesar/ecos/doc/sgml/user-guide/pix/run-tests.png
new file mode 100644
index 0000000000..0a36ab321f
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/run-tests.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/save-as-dialog.png b/cesar/ecos/doc/sgml/user-guide/pix/save-as-dialog.png
new file mode 100644
index 0000000000..29336ea937
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/save-as-dialog.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/settings-conflict.png b/cesar/ecos/doc/sgml/user-guide/pix/settings-conflict.png
new file mode 100644
index 0000000000..0f4b59d63c
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/settings-conflict.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/settings-display.png b/cesar/ecos/doc/sgml/user-guide/pix/settings-display.png
new file mode 100644
index 0000000000..a9cb40bece
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/settings-display.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/settings-runtests.png b/cesar/ecos/doc/sgml/user-guide/pix/settings-runtests.png
new file mode 100644
index 0000000000..cd5dde488f
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/settings-runtests.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/settings-viewers.png b/cesar/ecos/doc/sgml/user-guide/pix/settings-viewers.png
new file mode 100644
index 0000000000..7b7957b4b7
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/settings-viewers.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/templates.png b/cesar/ecos/doc/sgml/user-guide/pix/templates.png
new file mode 100644
index 0000000000..7adb370a31
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/templates.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/templates01.png b/cesar/ecos/doc/sgml/user-guide/pix/templates01.png
new file mode 100644
index 0000000000..a888aa3532
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/templates01.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/toolsplatforms.png b/cesar/ecos/doc/sgml/user-guide/pix/toolsplatforms.png
new file mode 100644
index 0000000000..bd2497f8a1
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/toolsplatforms.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/twothreads2.png b/cesar/ecos/doc/sgml/user-guide/pix/twothreads2.png
new file mode 100644
index 0000000000..455933926b
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/twothreads2.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/pix/user-tools-dialog.png b/cesar/ecos/doc/sgml/user-guide/pix/user-tools-dialog.png
new file mode 100644
index 0000000000..9738d516e5
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/pix/user-tools-dialog.png
Binary files differ
diff --git a/cesar/ecos/doc/sgml/user-guide/programming-concepts-techniques.sgml b/cesar/ecos/doc/sgml/user-guide/programming-concepts-techniques.sgml
new file mode 100644
index 0000000000..dd497c93d1
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/programming-concepts-techniques.sgml
@@ -0,0 +1,959 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- programming-concepts-techniques.sgml -->
+<!-- -->
+<!-- eCos User Guide -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<PART id="ecos-programming-concepts-and-techniques">
+<TITLE><productname>eCos</productname> Programming Concepts and Techniques</TITLE>
+<PARTINTRO id="programming-partintro">
+<PARA>Programming with <productname>eCos</productname> is somewhat different from programming
+ in more traditional environments. <productname>eCos</productname> is a configurable open
+ source system, and you are able to configure and build a system
+ specifically to meet the needs of your application. </PARA>
+<PARA>Various different directory hierarchies are involved in
+ configuring and building the system: the <EMPHASIS>component
+ repository</EMPHASIS>, the <EMPHASIS>build tree</EMPHASIS>,
+ and the <EMPHASIS>install tree</EMPHASIS>. These directories
+ exist in addition to the ones used to develop
+ applications.</PARA>
+</PARTINTRO>
+<CHAPTER id="cdl-concepts">
+<TITLE>CDL Concepts</TITLE>
+<SECT1 id="cdl-concepts-about">
+<TITLE>About this chapter</TITLE>
+<PARA>This chapter serves as a brief introduction to the
+ concepts involved in <productname>eCos</productname> (Embedded Configurable Operating
+ System). It describes the configuration architecture and the
+ underlying technology to a level required for the embedded
+ systems developer to configure <productname>eCos</productname>. It does not describe in
+ detail aspects such as how to write reusable components for
+ <productname>eCos</productname>: this information is given in the <citetitle>Component
+ Writer&rsquo;s Guide</citetitle>.</PARA>
+<SECT2>
+<TITLE>Background</TITLE>
+<PARA>Software solutions for the embedded space place
+ particularly stringent demands on the developer, typically
+ represented as requirements for small memory footprint, high
+ performance and robustness. These demands are addressed in
+ <productname>eCos</productname> by providing the ability to perform compile-time
+ specialization: the developer can tailor the operating
+ system to suit the needs of the application. In order to
+ make this process manageable, <productname>eCos</productname> is built in the context
+ of a Configuration Infrastructure: a set of tools including
+ a <application>Configuration Tool</application> and a formal
+ description of the process of configuration by means of a
+ <EMPHASIS>Component Definition Language</EMPHASIS>.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Configurations</TITLE>
+<PARA><productname>eCos</productname> is tailored at source level (that is, before
+ compilation or assembly) in order to create an <productname>eCos</productname>
+ <EMPHASIS>configuration</EMPHASIS>. In concrete terms, an
+ <productname>eCos</productname> configuration takes the form of a configuration save
+ file (with extension .ecc) and set of files used to build
+ user applications (including, when built, a library file
+ against which the application is linked). </PARA>
+</SECT2>
+</SECT1>
+<SECT1 id="cdl-component-repository">
+<TITLE>Component Repository</TITLE>
+<PARA><productname>eCos</productname> is shipped in source in the form of a
+ <EMPHASIS>component repository</EMPHASIS> - a directory
+ hierarchy that contains the sources and other files which
+ are used to build a configuration. The component repository
+ can be added to by, for example, downloading from the
+ net.</PARA>
+</SECT1>
+<SECT1 id="cdl-component-definition-language">
+<TITLE>Component Definition Language</TITLE>
+<PARA>Part of the component repository is a set of files
+ containing a definition of its structure. The form used for
+ this purpose is the <EMPHASIS>Component Definition
+ Language</EMPHASIS> (CDL). CDL defines the relationships
+ between components and other information used by tools such
+ as the <productname>eCos</productname><APPLICATION>Configuration Tool</APPLICATION>.
+ CDL is generally formulated by the writers of components: it
+ is not necessary to write or understand CDL in order for the
+ embedded systems developer to construct an <productname>eCos</productname>
+ configuration. </PARA>
+</SECT1>
+<SECT1 id="cdl-packages">
+<TITLE>Packages</TITLE>
+<PARA>The building blocks of an <productname>eCos</productname> configuration are called
+ <EMPHASIS>packages</EMPHASIS>. Packages are the units of
+ software distribution. A set of core packages (such as
+ kernel, C library and math library) is provided by Red Hat:
+ additional third-party packages will be available in
+ future.</PARA>
+<PARA>A package may exist in one of a number of <EMPHASIS>versions</EMPHASIS>.
+ The default version is the <EMPHASIS>current</EMPHASIS> version.
+ Only one version of a given package may be present in the component
+repository at any given time.</PARA>
+<PARA>Packages are organized in a tree hierarchy. Each package
+is either at the top-level or is the child of another package.</PARA>
+<PARA>The <productname>eCos</productname> <application> Package Administration Tool</application> can be used to add or remove
+packages from the component repository. The <productname>eCos</productname> <APPLICATION>Configuration Tool</APPLICATION> can be used to include or exclude packages from the configuration
+being built.</PARA>
+</SECT1>
+<SECT1 id="cdl-configuration-items">
+<TITLE>Configuration Items</TITLE>
+<PARA><EMPHASIS>Configuration items</EMPHASIS> are the
+ individual entities that form a configuration. Each item
+ corresponds to the setting of a C pre-processor macro (for
+ example,
+ <literal>CYGHWR_HAL_ARM_PID_GDB_BAUD</literal>).
+ The code of <productname>eCos</productname> itself is written to test such pre-processor
+ macros so as to tailor the code. User code can do
+ likewise.</PARA>
+<PARA>Configuration items come in the following flavors:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA><EMPHASIS>None</EMPHASIS>: such entities serve only as
+place holders in the hierarchy, allowing other entities to be grouped
+more easily.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA><EMPHASIS>Boolean</EMPHASIS> entities are the most common
+flavor; they correspond to units of functionality that can be either
+enabled or disabled. If the entity is enabled then there will be
+a #define; code will check the setting using, for example, #ifdef</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA><EMPHASIS>Data</EMPHASIS> entities encapsulate some arbitrary
+data. Other properties such as a set or range of legal values can
+be used to constrain the actual values, for example to an integer
+or floating point value within a certain range.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA><EMPHASIS>Booldata</EMPHASIS> entities combine the attributes
+of <EMPHASIS>Boolean</EMPHASIS> and <EMPHASIS>Data</EMPHASIS>: they
+can be enabled or disabled and, if enabled, will hold a data value.</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+<PARA>Like packages, configuration items exist in a tree-based hierarchy:
+each configuration item has a parent which may be another configuration
+item or a package. Under some conditions (such as when packages
+are added or removed from a configuration), items may be &ldquo;re-parented&rdquo; such
+that their position in the tree changes. </PARA>
+<SECT2>
+<TITLE>Expressions</TITLE>
+<PARA>Expressions are relationships between CDL items. There are
+three types of expression in CDL:</PARA>
+ <table id="cdl-expressions">
+ <title>CDL Expressions</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>Expression Type</entry>
+ <entry>Result</entry>
+ <entry>Common Use (see <xref linkend="table-configuration-properties">)</entry></row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Ordinary</entry>
+ <entry>A single value</entry>
+ <entry>legal_values property</entry>
+ </row>
+ <row>
+ <entry>List</entry><entry>A range of
+ values (for example &ldquo;1 to 10&rdquo;)</entry>
+ <entry>legal_values property </entry></row>
+ <row>
+ <entry>Goal</entry><entry>True or False</entry>
+ <entry>requires and active_if properties</entry></row>
+ </tbody>
+ </tgroup>
+ </table>
+ </SECT2>
+ <SECT2>
+ <TITLE>Properties</TITLE>
+<PARA>Each configuration item has a set of properties. The following
+table describes the most commonly used:</PARA>
+ <table id="table-configuration-properties">
+ <title>Configuration properties</title>
+ <tgroup cols="2">
+ <thead><row>
+ <entry><emphasis>Property</emphasis></entry>
+<entry><emphasis>Use </emphasis></entry></row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Flavor</entry>
+ <entry>The &ldquo;type&rdquo; of the item, as
+ described above </entry></row>
+ <row>
+ <entry>Enabled</entry><entry>Whether
+ the item is enabled </entry></row>
+ <row>
+ <entry>Current_value</entry>
+<entry>The current value of the item </entry></row>
+ <row>
+ <entry>Default_value</entry>
+<entry>An ordinary expression defining the default value of the
+ item</entry></row>
+ <row>
+ <entry>Legal_values</entry><entry>A
+ list expression defining the values the item may hold (for example,
+ 1 to10) </entry></row>
+ <row>
+ <entry>Active_if</entry><entry>A
+ goal expression denoting the requirement for this item to be active
+(see below: <emphasis>Inactive Items</emphasis>) </entry></row>
+<row>
+<entry>Requires</entry><entry>A goal
+expression denoting requirements this item places on others (see
+below: <emphasis>Conflicts</emphasis>) </entry></row>
+<row>
+<entry>Calculated</entry><entry>Whether
+the item as non-modifiable </entry></row>
+<row>
+<entry>Macro</entry><entry>The corresponding
+C pre-processor macro </entry></row>
+<row>
+<entry>File</entry><entry>The C header
+file in which the macro is defined </entry></row>
+<row>
+<entry>URL</entry><entry>The URL of
+a documentation page describing the item </entry></row>
+<row>
+<entry>Hardware</entry><entry>Indicates
+that a particular package is related to specific hardware</entry></row>
+ </tbody>
+ </tgroup>
+ </table>
+
+<PARA>A complete description of properties is contained in the <citetitle>Component
+Writer&rsquo;s Guide</citetitle>.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Inactive Items</TITLE>
+<PARA>Descendants of an item that is disabled are inactive: their
+values may not be changed. Items may also become <EMPHASIS>inactive</EMPHASIS> if
+an active_if expression is used to make the item dependent
+on an expression involving other items. </PARA>
+</SECT2>
+</SECT1>
+<SECT1 id="cdl-conflicts">
+<TITLE>Conflicts</TITLE>
+<PARA>Not all settings of configuration items will lead to a
+ coherent configuration; for example, the use of a timeout
+ facility might require the existence of timer support, so if
+ the one is required the other cannot be removed. Coherence
+ is policed by means of consistency rules (in particular, the
+ goal expressions that appear as CDL items
+ <EMPHASIS>requires</EMPHASIS> and
+ <EMPHASIS>active_if</EMPHASIS> attributes [see
+ above]). A violation of consistency rules creates a
+ <EMPHASIS>conflict</EMPHASIS>, which must be resolved in
+ order to ensure a consistent configuration. Conflict
+ resolution can be performed manually or with the assistance
+ of the <productname>eCos</productname> tools. Conflicts come in the following
+ flavors:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>An <EMPHASIS>unresolved</EMPHASIS> conflict means that
+there is a reference to an entity that is not yet in the current
+configuration </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>An <EMPHASIS>illegal value</EMPHASIS> conflict is caused
+when a configuration item is set to a value that is not permitted
+(that is, a <EMPHASIS>legal_values</EMPHASIS> goal expression
+is failing) </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>An <EMPHASIS>evaluation exception</EMPHASIS> conflict
+is caused when the evaluation of an expression would fail (for example,
+because of a division by zero) </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>An <EMPHASIS>unsatisfied goal</EMPHASIS> conflict is caused
+by a failing <EMPHASIS>requires</EMPHASIS> goal expression </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>A <EMPHASIS>bad data</EMPHASIS> conflict arises only rarely,
+and corresponds to badly constructed CDL. Such a conflict can only
+be resolved by reference to the CDL writer.</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+</SECT1>
+<SECT1 id="cdl-templates">
+<TITLE>Templates</TITLE>
+<PARA>A <EMPHASIS>template</EMPHASIS> is a saved configuration
+ - that is, a set of packages and configuration item
+ settings. Templates are provided with <productname>eCos</productname> to allow you to
+ get started quickly by instantiating (copying) a saved
+ configuration corresponding to one of a number of common
+ scenarios; for example, a basic <productname>eCos</productname> configuration template
+ is supplied that contains the infrastructure, kernel, C and
+ math libraries, plus their support packages.</PARA>
+</SECT1>
+</CHAPTER>
+<CHAPTER id="component-repo-and-working-dirs">
+<TITLE>The Component Repository and Working Directories</TITLE>
+<PARA>Each of the file trees involved in <productname>eCos</productname> development has a
+ different role. </PARA>
+<SECT1 id="component-repo">
+<TITLE>Component Repository</TITLE>
+<PARA>The <productname>eCos</productname> <FIRSTTERM>component repository</FIRSTTERM>
+ contains directories for all the packages that are shipped
+ with <productname>eCos</productname> or provided by third parties.</PARA>
+<PARA>The component repository should not be modified as part of
+application development. </PARA>
+<!--
+<para>
+XXXXX We may want to change this picture XXXXX
+</para>
+-->
+<FIGURE>
+<TITLE>Component repository</TITLE>
+<GRAPHIC ENTITYREF="graphic30"></GRAPHIC>
+</FIGURE>
+<SECT2>
+<TITLE>Purpose</TITLE>
+<PARA>The component repository is the master copy of source code
+for all system and third party components. It also contains some
+files needed to administer and build the system, such as <command>ecosadmin.tcl</command>.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>How is it modified?</TITLE>
+<PARA>You modify it by importing new versions of packages from a
+distribution or removing existing packages. These activities are
+undertaken using the <productname>eCos</productname> <application>Package Administration Tool</application>.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>When is it edited manually?</TITLE>
+<PARA>Files in the component repository should only be edited manually
+as determined by the component maintainer.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>User Applications</TITLE>
+<PARA>User application source code should <EMPHASIS>not</EMPHASIS> go
+into the component repository.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Examples of files in this hierarchy:</TITLE>
+<VARIABLELIST>
+<VARLISTENTRY>
+<TERM><FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/doc/ref/ecos-ref.html</FILENAME></TERM>
+<LISTITEM>
+<PARA>The top level HTML file for the
+ <citetitle><PRODUCTNAME>eCos</PRODUCTNAME> Reference
+ Manual</citetitle>. </PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/prebuilt/pid/tests/kernel/<replaceable>&Version;</replaceable>/tests/thread_gdb.exe</FILENAME></TERM>
+<LISTITEM>
+<PARA></PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/prebuilt/linux/tests/kernel/<replaceable>&Version;</replaceable>/tests/thread_gdb.exe</FILENAME></TERM>
+<LISTITEM>
+<PARA>Pre-built tests for the supported platforms, and
+ the synthetic Linux target.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/examples/twothreads.c</FILENAME></TERM>
+<LISTITEM>
+<PARA>One of the example programs.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/ecosadmin.tcl</FILENAME></TERM>
+<LISTITEM>
+<para>The Tcl program which is used to import new versions of packages
+from a distribution or remove existing packages.</para>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/packages/language/c/libm/<replaceable>&Version;</replaceable>/src/double/portable-api/s_tanh.c</FILENAME></TERM>
+<LISTITEM>
+<para>Implementation of the hyperbolic tangent function in the standard
+math library.</para>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/pkgconf/rules.mak</FILENAME></TERM>
+<LISTITEM>
+<para>A file with <command>make</command> rules, used
+by the <FILENAME>makefile</FILENAME>.</para>
+</LISTITEM>
+</VARLISTENTRY>
+</VARIABLELIST>
+</SECT2>
+</SECT1>
+<SECT1 id="build-tree">
+<TITLE>Build Tree</TITLE>
+<PARA>The <FIRSTTERM>build tree</FIRSTTERM> is the directory
+ hierarchy in which all <EMPHASIS>generated</EMPHASIS> files
+ are placed. Generated files consist of the
+ <FILENAME>makefile</FILENAME>, the compiled object files,
+ and a dependency file (with a <FILENAME>.d</FILENAME>
+ extension) for each source file.</PARA>
+<SECT2><!--<conditionaltext>-->
+<TITLE>Purpose</TITLE>
+<PARA>The build tree is where all intermediate object files are
+ placed. </PARA>
+</SECT2>
+<SECT2>
+<TITLE>How is it modified?</TITLE>
+<PARA>Recompiling can modify the object files.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>User applications</TITLE>
+<PARA>User application source or binary code should
+ <EMPHASIS>not</EMPHASIS> go in the build tree. </PARA>
+</SECT2>
+<SECT2>
+<TITLE>Examples of files in this hierarchy</TITLE>
+<VARIABLELIST>
+<VARLISTENTRY>
+<TERM><FILENAME>ecos-work/language/c/libc/<replaceable>&Version;</replaceable>/src</FILENAME></TERM>
+<LISTITEM>
+<PARA>The directory in which object files for
+ the C library are built.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+</VARIABLELIST>
+</SECT2>
+</SECT1>
+<SECT1 id="install-tree">
+<TITLE>Install Tree</TITLE>
+<PARA>The <FIRSTTERM>install tree</FIRSTTERM> is the location
+ for all files needed for application development. The
+ <filename>libtarget.a</filename> library, which contains the
+ custom-built <productname>eCos</productname> kernel and other components, is placed
+ in the install tree, along with all packages&rsquo; public
+ header files. If you build the tests, the test executable
+ programs will also be placed in the install
+ tree. </PARA>
+<PARA>By default, the install tree is created by
+ <COMMAND>ecosconfig</COMMAND> in a subdirectory of the build
+ tree called <FILENAME>install</FILENAME>. This can be
+ modified with the <OPTION>--prefix</OPTION> option (see
+ <xref linkend="manual-configuration">).
+ </PARA>
+<SECT2><!--<conditionaltext>-->
+<TITLE>Purpose</TITLE>
+<PARA>The install tree is where the custom-built
+ <FILENAME>libtarget.a</FILENAME> library, which contains
+ the <productname>eCos</productname> kernel and other components, is located. The
+ install tree is also the location for all the header files
+ that are part of a published interface for their
+ component. </PARA>
+</SECT2>
+<SECT2>
+<TITLE>How is it modified?</TITLE>
+<PARA>Recompiling can replace
+ <FILENAME>libtarget.a</FILENAME> and the test
+ executables. </PARA>
+</SECT2>
+<SECT2>
+<TITLE>When is it edited manually?</TITLE>
+<PARA>Where a memory layout requires modification without
+ use of the <productname>eCos</productname> <application>Configuration Tool</application>, the memory layout
+ files must be edited directly in the install tree. These
+ files are located at
+ <FILENAME>install/include/pkgconf/mlt_*.*</FILENAME>.
+ Note that subsequent modification of the install tree
+ using the Configuration Tool will result in such manual
+ edits being lost.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>User applications</TITLE>
+<PARA>User application source or binary code should
+ <EMPHASIS>not</EMPHASIS> go in the install tree. </PARA>
+</SECT2>
+<SECT2>
+<TITLE>Examples of files in this hierarchy</TITLE>
+<VARIABLELIST>
+<VARLISTENTRY>
+<TERM><FILENAME>install/lib/libtarget.a</FILENAME></TERM>
+<LISTITEM>
+<PARA>The library containing the kernel and other components.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><FILENAME>install/include/cyg/kernel/kapi.h</FILENAME></TERM>
+<LISTITEM>
+<PARA>The header file for the kernel C language API.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><FILENAME>install/include/pkgconf/mlt_arm_pid_ram.ldi</FILENAME></TERM>
+<LISTITEM>
+<PARA>The linker script fragment describing the memory
+ layout for linking applications intended for
+ execution on an ARM PID development board using RAM
+ startup.</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM><FILENAME>install/include/stdio.h</FILENAME></TERM>
+<LISTITEM>
+<PARA>The C library header file for standard I/O. </PARA>
+</LISTITEM>
+</VARLISTENTRY>
+</VARIABLELIST>
+</SECT2>
+</SECT1>
+<SECT1 id="repository-app-build-tree">
+<TITLE>Application Build Tree</TITLE>
+<PARA>This tree is not part of <productname>eCos</productname> itself: it is the
+ directory in which <productname>eCos</productname> end users write their own
+ applications.</PARA>
+<PARA>Example applications and their
+ <FILENAME>Makefile</FILENAME> are located in the component
+ repository, in the directory
+ <FILENAME>BASE_DIR</FILENAME><FILENAME>/examples</FILENAME>.
+
+ </PARA>
+<PARA>There is no imposed format on this directory, but there
+ are certain compiler and linker flags that must be used to
+ compile an <productname>eCos</productname> application. The basic set of flags is shown
+ in the example <FILENAME>Makefile</FILENAME>, and additional
+ details can be found in <xref linkend="compiler-and-linker-options">. </PARA>
+</SECT1>
+</CHAPTER>
+<CHAPTER id="compiler-and-linker-options">
+<TITLE>Compiler and Linker Options</TITLE>
+
+ <PARA><productname>eCos</productname> is built using
+ the GNU C and C++ compilers. <productname>eCos</productname> relies on certain features of these
+ tools such as constructor priority ordering and selective linking
+ which are not part of other toolchains.
+ </PARA>
+
+<PARA>Some <application>GCC</application> options are required for <productname>eCos</productname>,
+and others can be useful. This chapter gives a brief description
+of the required options as well as some recommended <productname>eCos</productname>-specific options.
+All other <application>GCC</application> options (described in the <application>GCC</application> manuals)
+are available. </PARA>
+<SECT1 id="compiling-c-app">
+<TITLE>Compiling a C Application</TITLE>
+<PARA>The following command lines demonstrate the
+ <EMPHASIS>minimum</EMPHASIS> set of options required to
+ compile and link an <productname>eCos</productname> program written in C. </PARA>
+<NOTE>
+<PARA>Remember that when this manual shows
+ <COMMAND><replaceable>TARGET-</replaceable>gcc</COMMAND>
+ you should use the full name of the cross compiler,
+ e.g. <COMMAND>i386-elf-gcc</COMMAND>,
+ <COMMAND>arm-elf-gcc</COMMAND>, or
+ <COMMAND>sh-elf-gcc</COMMAND>. When compiling for the
+ synthetic Linux target, use the native
+ <command>gcc</command> which must have the features
+ required by <productname>eCos</productname>.</PARA>
+</NOTE>
+<SCREEN>
+$ <replaceable>TARGET-</replaceable>gcc -c -I<EMPHASIS>INSTALL_DIR</EMPHASIS>/include file.c
+$ <replaceable>TARGET-</replaceable>gcc -o program file.o -L<EMPHASIS>INSTALL_DIR</EMPHASIS>/lib -Ttarget.ld -nostdlib
+</SCREEN>
+<NOTE>
+<PARA>Certain targets may require extra options, for example
+ the SPARClite architectures require the option
+ <OPTION>-mcpu=sparclite</OPTION>. Examine the
+ <FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/examples/Makefile</FILENAME>
+ or the &ldquo;Global compiler flags&rdquo; option
+ (CYGBLD_GLOBAL_CFLAGS) in your generated
+ <productname>eCos</productname> configuration) to see if any extra options are
+ required, and if so, what they are. </PARA>
+<PARA>The following command lines use some other options
+ which are recommended because they use the
+ <!-- <index></index> -->selective linking feature:</PARA>
+<SCREEN>$ <replaceable>TARGET-</replaceable>gcc -c -I<REPLACEABLE>INSTALL_DIR</REPLACEABLE>/include -I. -ffunction-sections -fdata-sections -g -O2 file.c
+$ <replaceable>TARGET-</replaceable>gcc -o program file.o -ffunction-sections -fdata-sections -Wl,--gc-sections -g -O2 \
+ -L<REPLACEABLE>INSTALL_DIR</REPLACEABLE>/lib -Ttarget.ld -nostdlib
+</SCREEN>
+
+</NOTE>
+</SECT1>
+<SECT1 id="compiling-cpp-app">
+<TITLE>Compiling a C++ Application</TITLE>
+<PARA>The following command lines demonstrate the
+ <EMPHASIS>minimum</EMPHASIS> set of options required to
+ compile and link an <productname>eCos</productname> program written in C++.
+ </PARA>
+<NOTE>
+<PARA>Remember that when this manual shows
+ <COMMAND><replaceable>TARGET-</replaceable>g++</COMMAND>
+ you should use the full name of the cross compiler,
+ e.g. <COMMAND>i386-elf-g++</COMMAND>,
+ <COMMAND>arm-elf-g++</COMMAND>, or
+ <COMMAND>sh-elf-g++</COMMAND>. When compiling for the
+ synthetic Linux target, use the native
+ <command>g++</command> which must have the features
+ required by <productname>eCos</productname>.</PARA>
+</NOTE>
+<SCREEN>$ <replaceable>TARGET-</replaceable>g++ -c -I<REPLACEABLE>INSTALL_DIR</REPLACEABLE>/include -fno-rtti -fno-exceptions file.cxx
+$ <replaceable>TARGET-</replaceable>g++ -o program file.o -L<REPLACEABLE>INSTALL_DIR</REPLACEABLE>/lib -Ttarget.ld -nostdlib
+</SCREEN>
+
+<NOTE>
+<PARA>Certain targets may require extra options,
+ for example the SPARClite architectures require the option
+ <OPTION>-mcpu=sparclite</OPTION>. Examine the
+ <FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/packages/targets</FILENAME>
+ file or <FILENAME><REPLACEABLE>BASE_DIR</REPLACEABLE>/examples/Makefile</FILENAME>
+ or the &ldquo;Global compiler flags&rdquo; option
+ (CYGBLD_GLOBAL_CFLAGS) in your generated
+ <productname>eCos</productname> configuration) to see if any extra options are
+ required, and if so, what they are.</PARA>
+<PARA>The following command lines use some other options
+ which are recommended because they use the
+ <FIRSTTERM>selective linking</FIRSTTERM> feature:</PARA>
+<SCREEN>
+$ <replaceable>TARGET-</replaceable>g++ -c -I<REPLACEABLE>INSTALL_DIR</REPLACEABLE>/include -I. -ffunction-sections -fdata-sections -fno-rtti \
+ -fno-exceptions -finit-priority -g -O2 file.cxx
+$ <replaceable>TARGET-</replaceable>g++ -o program file.o -W1,--gc-sections -g -O2 -L<REPLACEABLE>INSTALL_DIR</REPLACEABLE>/lib -Ttarget.ld -nostdlib</SCREEN>
+</NOTE>
+</SECT1>
+</CHAPTER>
+
+<CHAPTER id="debugging-techniques">
+<TITLE>Debugging Techniques</TITLE>
+<PARA><productname>eCos</productname> applications and components can be debugged in
+ traditional ways, with printing statements and debugger
+ single-stepping, but there are situations in which these
+ techniques cannot be used. One example of this is when a
+ program is getting data at a high rate from a real-time
+ source, and cannot be slowed down or interrupted.</PARA>
+<PARA><productname>eCos</productname>&rsquo;s infrastructure module provides a
+ <EMPHASIS>tracing</EMPHASIS> formalism, allowing the
+ kernel&rsquo;s tracing macros to be configured in many useful
+ ways. <productname>eCos</productname>&rsquo;s kernel provides <FIRSTTERM>instrumentation
+ buffers</FIRSTTERM> which also collect specific
+ (configurable) data about the system&rsquo;s history and
+ performance.</PARA>
+<SECT1 id="tracing">
+<TITLE>Tracing</TITLE>
+<PARA>To use <productname>eCos</productname>&rsquo;s tracing facilities you must first
+ configure your system to use <FIRSTTERM>tracing</FIRSTTERM>.
+ You should enable the Asserts and Tracing component
+ (<OPTION>CYGPKG_INFRA_DEBUG</OPTION>) and the
+ <OPTION>Use tracing</OPTION> component within it
+ (<OPTION>CYGDBG_USE_TRACING</OPTION>). These
+ options can be enabled with the <APPLICATION>Configuration
+ Tool</APPLICATION> or by editing the file
+ <FILENAME><REPLACEABLE>BUILD_DIR</REPLACEABLE>/pkgconf/infra.h
+ </FILENAME> manually.</PARA>
+<PARA>You should then examine all the tracing-related options in
+the <citetitle>Package: Infrastructure</citetitle> chapter of the <citetitle><PRODUCTNAME>eCos</PRODUCTNAME> Reference
+Manual</citetitle>. One useful set of configuration options are: <literal>CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS</literal> and <literal>CYGDBG_INFRA_DEBUG_TRACE_MESSAGE</literal>,
+which are both enabled by default when tracing is enabled.</PARA>
+<PARA>The following &ldquo;Hello world with tracing&rdquo; shows
+the output from running the hello world program (from <xref linkend="ecos-hello-world">) that was
+built with tracing enabled: </PARA>
+<EXAMPLE>
+<TITLE>Hello world with tracing</TITLE>
+<SCREEN>$ mips-tx39-elf-run --board=jmr3904 hello
+Hello, eCos world!
+ASSERT FAIL: &lt;2&gt;cyg_trac.h [ 623] Cyg_TraceFunction_Report_::set_exitvoid() exitvoid used in typed function
+TRACE: &lt;1&gt;mlqueue.cxx [ 395] Cyg_ThreadQueue_Implementation::enqueue() {{enter
+TRACE: &lt;1&gt;mlqueue.cxx [ 395] Cyg_ThreadQueue_Implementation::enqueue() }}RETURNING UNSET!
+TRACE: &lt;1&gt;mlqueue.cxx [ 126] Cyg_Scheduler_Implementation::add_thread() }}RETURNING UNSET!
+TRACE: &lt;1&gt;thread.cxx [ 654] Cyg_Thread::resume() }}return void
+TRACE: &lt;1&gt;cstartup.cxx [ 160] cyg_iso_c_start() }}return void
+TRACE: &lt;1&gt;startup.cxx [ 142] cyg_package_start() }}return void
+TRACE: &lt;1&gt;startup.cxx [ 150] cyg_user_start() {{enter
+TRACE: &lt;1&gt;startup.cxx [ 150] cyg_user_start() (((void)))
+TRACE: &lt;1&gt;startup.cxx [ 153] cyg_user_start() 'This is the system default cyg_user_start()'
+TRACE: &lt;1&gt;startup.cxx [ 157] cyg_user_start() }}return void
+TRACE: &lt;1&gt;sched.cxx [ 212] Cyg_Scheduler::start() {{enter
+TRACE: &lt;1&gt;mlqueue.cxx [ 102] Cyg_Scheduler_Implementation::schedule() {{enter
+TRACE: &lt;1&gt;mlqueue.cxx [ 437] Cyg_ThreadQueue_Implementation::highpri() {{enter
+TRACE: &lt;1&gt;mlqueue.cxx [ 437] Cyg_ThreadQueue_Implementation::highpri() }}RETURNING UNSET!
+TRACE: &lt;1&gt;mlqueue.cxx [ 102] Cyg_Scheduler_Implementation::schedule() }}RETURNING UNSET!
+TRACE: &lt;2&gt;intr.cxx [ 450] Cyg_Interrupt::enable_interrupts() {{enter
+TRACE: &lt;2&gt;intr.cxx [ 450] Cyg_Interrupt::enable_interrupts() }}RETURNING UNSET!
+TRACE: &lt;2&gt;thread.cxx [ 69] Cyg_HardwareThread::thread_entry() {{enter
+TRACE: &lt;2&gt;cstartup.cxx [ 127] invoke_main() {{enter
+TRACE: &lt;2&gt;cstartup.cxx [ 127] invoke_main() ((argument is ignored))
+TRACE: &lt;2&gt;dummyxxmain.cxx [ 60] __main() {{enter
+TRACE: &lt;2&gt;dummyxxmain.cxx [ 60] __main() (((void)))
+TRACE: &lt;2&gt;dummyxxmain.cxx [ 63] __main() 'This is the system default __main()'
+TRACE: &lt;2&gt;dummyxxmain.cxx [ 67] __main() }}return void
+TRACE: &lt;2&gt;memcpy.c [ 112] _memcpy() {{enter
+TRACE: &lt;2&gt;memcpy.c [ 112] _memcpy() ((dst=80002804, src=BFC14E58, n=19))
+TRACE: &lt;2&gt;memcpy.c [ 164] _memcpy() }}returning 80002804
+TRACE: &lt;2&gt;cstartup.cxx [ 137] invoke_main() 'main() has returned with code 0. Calling exit()'
+TRACE: &lt;2&gt;exit.cxx [ 71] __libc_exit() {{enter
+TRACE: &lt;2&gt;exit.cxx [ 71] __libc_exit() ((status=0 ))
+TRACE: &lt;2&gt;atexit.cxx [ 84] cyg_libc_invoke_atexit_handlers() {{enter
+TRACE: &lt;2&gt;atexit.cxx [ 84] cyg_libc_invoke_atexit_handlers() (((void)))
+
+Scheduler:
+
+Lock: 0
+Current Thread: &lt;null&gt;
+
+Threads:
+
+Idle Thread pri = 31 state = R id = 1
+ stack base = 800021F0 ptr = 80002510 size = 00000400
+ sleep reason NONE wake reason NONE
+ queue = 80000C54 wait info = 00000000
+
+&lt;null&gt; pri = 0 state = R id = 2
+ stack base = 80002A48 ptr = 8000A968 size = 00008000
+ sleep reason NONE wake reason NONE
+ queue = 80000BD8 wait info = 00000000
+ </SCREEN>
+</EXAMPLE>
+</SECT1>
+<SECT1 id="kernel-instrumentation">
+<TITLE>Kernel Instrumentation</TITLE>
+<PARA><FIRSTTERM>Instrument buffers</FIRSTTERM> can be used to
+ find out how many events of a given type happened in the
+ kernel during execution of a program.</PARA>
+<PARA>You can monitor a class of several types of events, or
+ you can just look at individual events. </PARA>
+<PARA>Examples of <FIRSTTERM>events</FIRSTTERM> that can be
+ monitored are:
+ </PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>scheduler events </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>thread operations</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>interrupts </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>mutex operations </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>binary semaphore operations </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>counting semaphore operations </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>clock ticks and interrupts </PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+<PARA>Examples of fine-grained scheduler event types are: </PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>scheduler lock</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>scheduler unlock</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>rescheduling</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>time slicing </PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+<PARA>Information about the events is stored in an
+ <FIRSTTERM>event record</FIRSTTERM>. The structure that
+ defines this record has type <type>struct
+ Instrument_Record</type>:
+</PARA>
+<PARA>The list of records is stored in an array called <TYPE>instrument_buffer</TYPE>
+which you can let the kernel provide or you can provide yourself
+by setting the configuration option <literal>CYGVAR_KERNEL_INSTRUMENT_EXTERNAL_BUFFER</literal>. </PARA>
+<PARA>To write a program that examines the instrumentation
+ buffers: </PARA>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Enable instrumentation buffers in the <productname>eCos</productname> kernel configuration.
+The component macro is <literal>CYGPKG_KERNEL_INSTRUMENT</literal>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>To allocate the buffers yourself, enable the configuration
+option <literal>CYGVAR_KERNEL_INSTRUMENT_EXTERNAL_BUFFER</literal>. </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Include the header file
+<FILENAME>cyg/kernel/instrmnt.h</FILENAME>
+.
+<PROGRAMLISTING>#include &lt;cyg/kernel/instrmnt.h&gt;</PROGRAMLISTING></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>The <STRUCTNAME>Instrumentation_Record</STRUCTNAME> structure
+is not published in the kernel header file. In the future there
+will be a cleaner mechanism to access it, but for now you should
+paste into your code in the following lines:
+ </para>
+<PROGRAMLISTING>struct Instrument_Record
+{
+ CYG_WORD16 type; // record type
+ CYG_WORD16 thread; // current thread id
+ CYG_WORD timestamp; // 32 bit timestamp
+ CYG_WORD arg1; // first arg
+ CYG_WORD arg2; // second arg
+};</PROGRAMLISTING>
+</LISTITEM>
+<LISTITEM>
+<PARA>Enable the events you want to record using
+<FUNCTION>cyg_instrument_enable()</FUNCTION>
+, and disable them later. Look at
+<filename>cyg/kernel/instrmnt.h</filename>
+ and the examples below to see what events can be enabled. </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Place the code you want to debug between the matching
+functions
+<FUNCTION>cyg_instrument_enable()</FUNCTION>
+ and
+<FUNCTION>cyg_instrument_disable()</FUNCTION>
+. </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Examine the buffer. For now you need to look at the data
+in there (the example program below shows how to do that), and future
+versions of <productname>eCos</productname> will include a host-side tool to help you understand
+the data. </PARA>
+</LISTITEM>
+</ORDEREDLIST>
+<EXAMPLE>
+<TITLE>Using instrument buffers</TITLE>
+<PARA>This program is also provided in the
+ <FILENAME>examples</FILENAME> directory.
+ </PARA>
+<PROGRAMLISTING>
+/* this is a program which uses <productname>eCos</productname> instrumentation buffers; it needs
+ to be linked with a kernel which was compiled with support for
+ instrumentation */
+
+#include &lt;stdio.h&gt;
+#include &lt;pkgconf/kernel.h&gt;
+#include &lt;cyg/kernel/instrmnt.h&gt;
+#include &lt;cyg/kernel/kapi.h&gt;
+
+#ifndef CYGVAR_KERNEL_INSTRUMENT_EXTERNAL_BUFFER
+# error You must configure eCos with CYGVAR_KERNEL_INSTRUMENT_EXTERNAL_BUFFER
+#endif
+
+struct Instrument_Record
+{
+ CYG_WORD16 type; // record type
+ CYG_WORD16 thread; // current thread id
+ CYG_WORD timestamp; // 32 bit timestamp
+ CYG_WORD arg1; // first arg
+ CYG_WORD arg2; // second arg
+};
+
+struct Instrument_Record instrument_buffer[20];
+cyg_uint32 instrument_buffer_size = 20;
+
+int main(void)
+{
+ int i;
+
+ cyg_instrument_enable(CYG_INSTRUMENT_CLASS_CLOCK, 0);
+ cyg_instrument_enable(CYG_INSTRUMENT_CLASS_THREAD, 0);
+ cyg_instrument_enable(CYG_INSTRUMENT_CLASS_ALARM, 0);
+
+ printf("Program to play with instrumentation buffer\n");
+
+ cyg_thread_delay(2);
+
+ cyg_instrument_disable(CYG_INSTRUMENT_CLASS_CLOCK, 0);
+ cyg_instrument_disable(CYG_INSTRUMENT_CLASS_THREAD, 0);
+ cyg_instrument_disable(CYG_INSTRUMENT_CLASS_ALARM, 0);
+
+ for (i = 0; i &lt; instrument_buffer_size; ++i) {
+ printf("Record %02d: type 0x%04x, thread %d, ",
+ i, instrument_buffer[i].type, instrument_buffer[i].thread);
+ printf("time %5d, arg1 0x%08x, arg2 0x%08x\n",
+ instrument_buffer[i].timestamp, instrument_buffer[i].arg1,
+ instrument_buffer[i].arg2);
+ }
+ return 0;
+}</PROGRAMLISTING>
+</EXAMPLE>
+<PARA>Here is how you could compile and run this program in the <filename>examples</filename> directory,
+using (for example) the MN10300 simulator target: </PARA>
+<SCREEN>
+$ make XCC=mn10300-elf-gcc INSTALL_DIR=/tmp/ecos-work-mn10300/install instrument-test
+mn10300-elf-gcc -c -o instrument-test.o -g -Wall -I/tmp/ecos-work-mn10300/install/include \
+ -ffunction-sections -fdata-sections instrument-test.c
+mn10300-elf-gcc -nostartfiles -L/tmp/ecos-work-mn10300/install/lib -W1,--gc-sections -o \
+ instrument-test instrument-test.o -Ttarget.ld -nostdlib
+$ mn10300-elf-run --board=stdeval1 instrument-test
+</SCREEN>
+<EXAMPLE>
+<TITLE>Instrument buffer output</TITLE>
+<PARA>Here is the output of the
+ <COMMAND>instrument-test</COMMAND> program. Notice that in
+ little over 2 seconds, and with very little activity, and
+ with few event types enabled, it gathered 17 records. In
+ larger programs it will be necessary to select very few
+ event types for debugging. </PARA>
+<PROGRAMLISTING>Program to play with instrumentation buffer
+Record 00: type 0x0207, thread 2, time 6057, arg1 0x48001cd8, arg2 0x00000002
+Record 01: type 0x0202, thread 2, time 6153, arg1 0x48001cd8, arg2 0x00000000
+Record 02: type 0x0904, thread 2, time 6358, arg1 0x48001d24, arg2 0x00000000
+Record 03: type 0x0905, thread 2, time 6424, arg1 0x00000002, arg2 0x00000000
+Record 04: type 0x0906, thread 2, time 6490, arg1 0x00000000, arg2 0x00000000
+Record 05: type 0x0901, thread 2, time 6608, arg1 0x48009d74, arg2 0x48001d24
+Record 06: type 0x0201, thread 2, time 6804, arg1 0x48001cd8, arg2 0x480013e0
+Record 07: type 0x0803, thread 1, time 94, arg1 0x00000000, arg2 0x00000000
+Record 08: type 0x0801, thread 1, time 361, arg1 0x00000000, arg2 0x00000000
+Record 09: type 0x0802, thread 1, time 548, arg1 0x00000001, arg2 0x00000000
+Record 10: type 0x0803, thread 1, time 94, arg1 0x00000000, arg2 0x00000000
+Record 11: type 0x0801, thread 1, time 361, arg1 0x00000001, arg2 0x00000000
+Record 12: type 0x0903, thread 1, time 513, arg1 0x48009d74, arg2 0x48001d24
+Record 13: type 0x0208, thread 1, time 588, arg1 0x00000000, arg2 0x00000000
+Record 14: type 0x0203, thread 1, time 697, arg1 0x48001cd8, arg2 0x480013e0
+Record 15: type 0x0802, thread 1, time 946, arg1 0x00000002, arg2 0x00000000
+Record 16: type 0x0201, thread 1, time 1083, arg1 0x480013e0, arg2 0x48001cd8
+Record 17: type 0x0000, thread 0, time 0, arg1 0x00000000, arg2 0x00000000
+Record 18: type 0x0000, thread 0, time 0, arg1 0x00000000, arg2 0x00000000
+Record 19: type 0x0000, thread 0, time 0, arg1 0x00000000, arg2 0x00000000</PROGRAMLISTING>
+</EXAMPLE>
+</SECT1>
+</CHAPTER>
+</PART>
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:nil
+sgml-shorttag:t
+sgml-namecase-general:t
+sgml-general-insert-case:lower
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:("user-guide.sgml" "book" "part")
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
diff --git a/cesar/ecos/doc/sgml/user-guide/programming.sgml b/cesar/ecos/doc/sgml/user-guide/programming.sgml
new file mode 100644
index 0000000000..e6ff254a31
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/programming.sgml
@@ -0,0 +1,1340 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- programming.sgml -->
+<!-- -->
+<!-- eCos User Guide -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- Copyright (C) 2003 Nick Garnett -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part ID="user-guide-programming">
+<TITLE>Programming With <productname>eCos</productname></TITLE>
+
+<CHAPTER ID="PROGRAMMING-WITH-ECOS">
+<TITLE>Programming With <productname>eCos</productname></TITLE>
+
+<PARA>The following chapters of this manual comprise a simple tutorial
+for configuring and building <productname>eCos</productname>, building and running <productname>eCos</productname> tests,
+and finally building three stand-alone example programs which use
+the <productname>eCos</productname> API to perform some simple tasks.</PARA>
+
+<PARA>You will need a properly installed <productname>eCos</productname> system, with the correct
+versions of the GNU toolchain.<!-- <conditionaltext> --> On Windows
+you will be using the bash command line interpreter that comes with
+Cygwin, with the environment variables set as described in the
+toolchain documentation.</PARA>
+
+<SECT1 id="development-process">
+<TITLE>The Development Process</TITLE>
+
+<PARA>Most development projects using <productname>eCos</productname> would contain some (or
+most) of the following:</PARA>
+
+<SECT2>
+<TITLE><productname>eCos</productname> Configuration</TITLE>
+
+<PARA><productname>eCos</productname> is configured to provide the desired API (the inclusion
+of libc, uitron, and the disabling of certain undesired funtions,
+etc.), and semantics (selecting scheduler, mutex behavior, etc.).
+See <XREF LINKEND="CONFIGURING-AND-BUILDING-ECOS-FROM-SOURCE">.</PARA>
+
+<PARA>It would normally make sense to enable <productname>eCos</productname> assertion checking
+at this time as well, to catch as many programming errors during
+the development phase as possible.</PARA>
+
+<PARA>Note that it should not be necessary to spend much time on
+<productname>eCos</productname> configuration initially. It may be important to perform fine
+tuning to reduce the memory footprint and to improve performance
+later when the product reaches a testable state.</PARA>
+</SECT2>
+
+<SECT2>
+<TITLE> Integrity check of the <productname>eCos</productname> configuration</TITLE>
+
+<PARA>While we strive to thoroughly test <productname>eCos</productname>, the vast number
+of configuration permutations mean that the particular configuration
+parameters used for your project may not have been tested. Therefore,
+we advise running the <productname>eCos</productname> tests after the project's
+<productname>eCos</productname> configuration has been determined. See <XREF LINKEND="RUNNING-AN-ECOS-TEST-CASE">.</PARA>
+
+<PARA>Obviously, this should be repeated if the configuration changes
+later on in the development process.</PARA>
+</SECT2>
+
+<SECT2>
+<TITLE> Application Development - Target Neutral Part</TITLE>
+
+<PARA>While your project is probably targeting a specific architecture
+and platform, possibly custom hardware, it may be possible to perform
+part of the application development using simulated or synthetic
+targets.</PARA>
+
+<PARA>There are three good reasons for doing this:</PARA>
+
+<ITEMIZEDLIST>
+
+<LISTITEM>
+<PARA>It may be possible by this means to perform application
+development in parallel with the design/implementation
+of the target hardware, thus providing more time for developing
+and testing functionality, and reducing time-to-market.</PARA>
+</LISTITEM>
+
+<LISTITEM>
+<PARA>The build-run-debug-cycle may be faster when the application
+does not have to be downloaded to a target via a serial interface.
+Debugging is also likely to be more responsive when you do not have to
+to communicate with the remote GDB stubs in RedBoot via serial. It
+also removes the need for manually or automatically resetting the
+target hardware.</PARA>
+</LISTITEM>
+
+<listitem>
+<para>
+New hardware can often be buggy. Comparing the behaviour of the
+program on the hardware and in the simulator or synthetic target may
+allow you to identify where the problems lie.
+</para>
+</listitem>
+
+</ITEMIZEDLIST>
+
+<PARA>This approach is possible because all targets (including
+simulators and synthetic ones) provide the same basic API: that
+is, kernel, libc, libm, uitron, infra, and to some extent, HAL and
+IO.</PARA>
+
+<PARA>Synthetic targets are especially suitable as they allow you
+to construct simulations of elaborate devices by interaction with
+the host system, where an IO device API can hide the details from
+the application. When switching to hardware later in the development
+cycle, the IO driver is properly implemented.
+</para>
+
+<para>
+Simulators can also do this, but it all depends on the
+design and capabilities of the simulator you use. Some, like
+<ULINK URL="http://sources.redhat.com/sid">SID</ULINK> or
+<ULINK URL="http://bochs.sourceforge.net/">Bochs</ULINK> provide
+complete hardware emulation, while others just support enough of the
+instruction set to run compiled code.
+</PARA>
+
+<PARA>Therefore, select a simulator or synthetic target and use
+it for as long as possible for application development. That is,
+configure for the selected target, build <productname>eCos</productname>, build the application
+and link with <productname>eCos</productname>, run and debug. Repeat the latter two steps until
+you are happy with it.</PARA>
+
+<PARA>Obviously, at some time you will have to switch to the intended
+target hardware, for example when adding target specific feature
+support, for memory footprint/performance characterization,
+and for final tuning of <productname>eCos</productname> and the application.</PARA>
+
+</SECT2>
+
+<SECT2>
+<TITLE> Application Development - Target Specific Part</TITLE>
+
+<PARA>Repeat the build-run-debug-cycle while performing final tuning
+and debugging of application. Remember to disable <productname>eCos</productname> assertion
+checking if you are testing any performance-related aspects, it can
+make a big difference.</PARA>
+
+<PARA>It may be useful to switch between this and the previous step
+repeatedly through the development process; use the simulator/synthetic
+target for actual development, and use the target hardware to continually
+check memory footprint and performance. There should be little cost
+in switching between the two targets when using two separate build
+trees. </PARA>
+</SECT2>
+
+</SECT1>
+
+</CHAPTER>
+
+<!-- ==================================================== -->
+
+<CHAPTER ID="CONFIGURING-AND-BUILDING-ECOS-FROM-SOURCE"><!-- <conditionaltext> -->
+<TITLE><!-- <xref> --><!-- <index></index> -->Configuring and Building <productname>eCos</productname> from Source</TITLE>
+
+<PARA>This chapter documents the configuration of <productname>eCos</productname>. The process is
+the same for any of the supported targets: you may select a
+hardware target (if you have a board available), any one of the
+simulators, or a synthetic target (if your host platform has synthetic
+target support).</PARA>
+
+<!-- ==================================================== -->
+
+<SECT1 id="ecos-startup-configs">
+<TITLE><!-- <xref> --><productname>eCos</productname> Start-up Configurations</TITLE>
+
+<PARA>There are various ways to download an executable image to a
+target board, and these involve different ways of preparing the
+executable image. In the <productname>eCos</productname> Hardware Abstraction Layer (HAL package)
+there are configuration options to support the different download
+methods. <XREF LINKEND="user-guide-download-methods"> summarizes the
+ways in which an <productname>eCos</productname> image can be prepared for different types of
+download. This is not an exhaustive list, some targets define
+additional start-up types of their own. Where a ROM Monitor is
+mentioned, this will usually be RedBoot, although on some older, or
+low resource, targets you may need to use CygMon or the GDB stubs ROM,
+see the target documentation for details.</PARA>
+
+
+<TABLE id="user-guide-download-methods">
+<TITLE>Configuration for various download methods</TITLE>
+<TGROUP COLS="2">
+<THEAD>
+<ROW>
+<ENTRY>Download method</ENTRY>
+<ENTRY>HAL configuration</ENTRY>
+</ROW>
+</THEAD>
+<TBODY>
+<ROW>
+<ENTRY>Burn hardware ROM</ENTRY>
+<ENTRY>&nbsp;ROM or ROMRAM start-up</ENTRY>
+</ROW>
+<ROW>
+<ENTRY>Download to ROM emulator</ENTRY>
+<ENTRY>&nbsp;ROM or ROMRAM start-up</ENTRY>
+</ROW>
+<ROW>
+<ENTRY>Download to board with ROM Monitor</ENTRY>
+<ENTRY>&nbsp;RAM start-up</ENTRY>
+</ROW>
+<ROW>
+<ENTRY>Download to simulator without ROM Monitor</ENTRY>
+<ENTRY>&nbsp;ROM start-up</ENTRY>
+</ROW>
+<ROW>
+<ENTRY>Download to simulator with ROM Monitor</ENTRY>
+<ENTRY>&nbsp;RAM start-up</ENTRY>
+</ROW>
+<ROW>
+<ENTRY>Download to simulator ignoring devices</ENTRY>
+<ENTRY>&nbsp;SIM configuration</ENTRY>
+</ROW>
+<ROW>
+<ENTRY>Run synthetic target</ENTRY>
+<ENTRY>&nbsp;RAM start-up</ENTRY>
+</ROW>
+</TBODY>
+</TGROUP>
+</TABLE>
+
+<CAUTION>
+
+<PARA>You cannot run an application configured for RAM start-up
+on the simulator directly: it will fail during start-up. You can
+only download it to the simulator if
+you are already running RedBoot in the simulator,
+as described in the toolchain documentation
+or you load through the
+<EMPHASIS>SID </EMPHASIS>
+GDB debugging component. This is not the same as the simulated
+stub, since it does not require a target program to be running to
+get GDB to talk to it. It can be done before letting the simulator
+run
+or you use the ELF loader component to get a program into memory.</PARA>
+
+</CAUTION><!-- <label> --><!-- <conditionaltext> --><!-- NOTE</label> -->
+
+<NOTE>
+<PARA>Configuring <productname>eCos</productname>' HAL package for simulation should
+rarely be needed for real development; binaries built with such
+a kernel will not run on target boards at all,<!-- <conditionaltext> -->
+and the MN10300 and
+TX39 simulators can run binaries built for stdeval1 and jmr3904
+target boards.
+The main use for a ``simulation'' configuration
+is if you are trying to work around problems with the device drivers
+or with the simulator. Also note that when using a TX39 system configured
+for simulator start-up you should then invoke the simulator with
+the <OPTION>--board=jmr3904pal</OPTION>
+option instead of
+<OPTION>--board=jmr3904</OPTION><!-- <conditionaltext> --></PARA>
+</NOTE>
+
+<NOTE>
+<PARA>If your chosen architecture does not have simulator support,
+then the combinations above that refer to the simulator do not apply.
+Similarly, if your chosen platform does not have RedBoot
+ROM support, the combinations listed above that use
+RedBoot do not apply.</PARA>
+</NOTE>
+
+<PARA>The debugging environment for most developers will be either
+a hardware board or the simulator, in which case they will be able
+to select a single HAL configuration.</PARA>
+
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="using-configtool-windows-linux">
+<TITLE><!-- <index></index> -->
+Configuration Tool on Windows and Linux Quick Start</TITLE>
+
+<PARA><!-- <conditionaltext> -->
+
+This section described the GUI based configuration tool. This
+tool is probably more suited to users who prefer GUI's. The next
+section describes a CLI based tool which Unix users may
+prefer. </PARA>
+
+<PARA>Note that the use of the <application>Configuration Tool</application>
+is described in detail in <XREF
+LINKEND="THE-ECOS-CONFIGURATION-TOOL">.</PARA>
+
+<PARA>The <application>Configuration Tool</application> (see <XREF LINKEND="PROGRAMMING-FIGURE-CONFIGURATION-TOOL">)
+has five main elements: the <EMPHASIS>configuration window</EMPHASIS>,
+the <emphasis>conflicts window</emphasis>,
+the <EMPHASIS>properties window</EMPHASIS>, the <!-- <xref> --><EMPHASIS>short
+description window</EMPHASIS>,
+and the <EMPHASIS>output window</EMPHASIS>.</PARA>
+
+<FIGURE ID="PROGRAMMING-FIGURE-CONFIGURATION-TOOL">
+<TITLE>Configuration Tool</TITLE><!-- <xref> -->
+<GRAPHIC ENTITYREF="programming-graphic1"></GRAPHIC>
+</FIGURE>
+
+<PARA>Start by opening the templates window via <GUIMENUITEM>Build-&#62;Templates</GUIMENUITEM>.
+Select the desired target (see <XREF LINKEND="FIGURE-TEMPLATE-SELECTION">).</PARA>
+
+<FIGURE ID="FIGURE-TEMPLATE-SELECTION">
+<TITLE>Template selection</TITLE><!-- <xref> -->
+<GRAPHIC ENTITYREF="programming-graphic2"></GRAPHIC>
+</FIGURE>
+
+<PARA>Make sure that the configuration is correct for the target
+in terms of endianness, CPU model, Startup type, etc. (see <XREF LINKEND="CONFIGURING-FOR-THE-TARGET">).</PARA>
+
+<FIGURE ID="CONFIGURING-FOR-THE-TARGET">
+<TITLE><!-- <conditionaltext> --><!-- <xref> -->Configuring
+for the target</TITLE>
+<GRAPHIC ENTITYREF="programming-graphic3"></GRAPHIC>
+</FIGURE>
+
+<PARA>Next, select the <EMPHASIS>Build-&#62;Library</EMPHASIS> menu
+item to start building <productname>eCos</productname> (see <XREF
+LINKEND="FIGURE-SELECTING-THE-BUILD-LIBRARY-MENU-ITEM">). The
+application will configure the sources, prepare a build tree, and
+build the <FILENAME>libtarget.a</FILENAME> library, which contains the
+<productname>eCos</productname> kernel and other packages.</PARA>
+
+<FIGURE ID="FIGURE-SELECTING-THE-BUILD-LIBRARY-MENU-ITEM"><!-- <xref> -->
+<TITLE>Selecting the Build Library menu item</TITLE>
+<GRAPHIC ENTITYREF="programming-graphic4"></GRAPHIC>
+</FIGURE>
+
+
+<PARA>The <EMPHASIS>Save As</EMPHASIS> dialog box will appear, asking
+you to specify a directory in which to place your save file. You
+can use the default, but it is a good idea to make a subdirectory,
+called <filename>ecos-work</filename> for example. </PARA>
+
+<FIGURE>
+<TITLE>Save file dialog</TITLE>
+<GRAPHIC ENTITYREF="programming-graphic5"></GRAPHIC>
+</FIGURE>
+
+<PARA>The first time you build an <productname>eCos</productname> library for a specific
+architecture, the <application>Configuration Tool</application> may prompt
+you for the location of the appropriate build tools (including
+<command>make</command> and
+<command><replaceable>TARGET-</replaceable>gcc</command>) using a
+<EMPHASIS>Build Tools</EMPHASIS> dialog box (as shown in <XREF
+LINKEND="FIGURE-BUILD-TOOLS-DIALOG">). You can select a location from
+the drop down list, browse to the directory using the
+<EMPHASIS>Browse</EMPHASIS> button, or type in the location of the
+build tools manually.</PARA>
+
+<FIGURE ID="FIGURE-BUILD-TOOLS-DIALOG"><!-- <xref> -->
+<TITLE>Build tools dialog</TITLE>
+<GRAPHIC ENTITYREF="programming-graphic6"></GRAPHIC>
+</FIGURE>
+
+<PARA>The <application>Configuration Tool</application> may also prompt you
+for the location of the user tools (such as <command>cat</command> and
+<command>ls</command>) using a <emphasis>User Tools</emphasis> dialog
+box (as shown in <XREF LINKEND="FIGURE-USER-TOOLS-DIALOG">). As with
+the <EMPHASIS>Build Tools</EMPHASIS> dialog, you can select a location
+from the drop down list, browse to the directory using the
+<EMPHASIS>Browse</EMPHASIS> button, or type in the location of the
+user tools manually. Note that on Linux, this will often be
+unnecessary as the tools will already be on your PATH.</PARA>
+
+<FIGURE ID="FIGURE-USER-TOOLS-DIALOG"><!-- <xref> -->
+<TITLE>User tools dialog</TITLE>
+<GRAPHIC ENTITYREF="programming-graphic7"></GRAPHIC>
+</FIGURE>
+
+<PARA>When the tool locations have been entered, the <application>Configuration
+Tool</application> will configure the sources, prepare a build tree,
+and build the <filename>libtarget.a</filename> library, which contains
+the <productname>eCos</productname> kernel and other packages.</PARA>
+
+<PARA>The output from the configuration process and the building
+of <filename>libtarget.a</filename> will be shown in the output
+window.</PARA>
+
+<PARA>Once the build process has finished you will have a kernel
+with other packages in <FILENAME>libtarget.a</FILENAME>. You should
+now build the <productname>eCos</productname> tests for your particular configuration. </PARA>
+
+<PARA>You can do this by selecting <EMPHASIS>Build</EMPHASIS> -&#62; <EMPHASIS>Tests</EMPHASIS>.
+Notice that you could have selected <EMPHASIS>Tests</EMPHASIS> instead
+of <EMPHASIS>Library</EMPHASIS> in the earlier step and it would
+have built <EMPHASIS>both</EMPHASIS> the library and the tests,
+but this would increase the build time substantially, and if you
+do not need to build the tests it is unnecessary.</PARA>
+
+<FIGURE>
+<TITLE>Selecting the Build Tests menu item</TITLE>
+<GRAPHIC ENTITYREF="programming-graphic8"></GRAPHIC>
+</FIGURE>
+
+<PARA><XREF LINKEND="RUNNING-AN-ECOS-TEST-CASE"> will guide you through running one
+ of the test cases you just built on the selected target,
+ using GDB. </PARA>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 ID="USING-ECOSCONFIG-ON-LINUX">
+<TITLE><!-- <index></index> -->
+Ecosconfig on Windows and Linux Quick Start</TITLE>
+
+<PARA>As an alternative to using the graphical
+<application>Configuration Tool</application>, it is possible to
+configure and build a kernel by editing a configuration file manually
+and using the <command>ecosconfig</command> command. Users with a Unix
+background may find this tool more suitable than the GUI tool
+described in the previous section.</PARA>
+
+<para>
+Manual configuration and the <command>ecosconfig</command> command are
+described in detail in <XREF LINKEND="manual-configuration">.
+</para>
+
+<para>
+To use the <command>ecosconfig</command> command you need to start a
+shell. In Windows you need to start a
+<productname>CygWin</productname> <command>bash</command> shell, not a
+DOS command line.
+</para>
+
+<!--
+<para>
+XXXXX Need to know whether there will be a packaged shell entry in the
+start menu, and where XXXXX
+</para>
+-->
+
+<PARA>The following instructions assume that the
+<literal>PATH</literal> and <literal>ECOS_REPOSITORY</literal>
+environment variables have been setup correctly as described in <XREF
+LINKEND="user-guide-installation-linux">. They also assume Linux
+usage but equally well apply to Windows running Cygwin.</PARA>
+
+<PARA>Before invoking <command>ecosconfig</command> you need to
+choose a directory in which to work. For the purposes of this tutorial,
+the default path will be <FILENAME><replaceable>BASE_DIR</replaceable>/ecos-work</FILENAME>.
+Create this directory and change to it by typing: </PARA>
+
+<PROGRAMLISTING>
+$ mkdir <replaceable>BASE_DIR</replaceable>/ecos-work
+$ cd <replaceable>BASE_DIR</replaceable>/ecos-work
+</PROGRAMLISTING>
+
+<PARA>To see what options can be used with <command>ecosconfig</command>,
+type: </PARA>
+
+<PROGRAMLISTING>$ ecosconfig --help</PROGRAMLISTING>
+
+<PARA>The available packages, targets and templates may be listed
+as follows:</PARA>
+
+<PROGRAMLISTING>
+$ ecosconfig list
+</PROGRAMLISTING>
+
+<PARA>Here is sample output from <command>ecosconfig</command> showing
+the usage message.</PARA>
+
+<EXAMPLE>
+<TITLE>Getting <!-- <index></index> --> help from ecosconfig</TITLE>
+
+<PROGRAMLISTING>
+$ ecosconfig --help
+Usage: ecosconfig [ qualifier ... ] [ command ]
+ commands are:
+ list : list repository contents
+ new TARGET [ TEMPLATE [ VERSION ] ] : create a configuration
+ target TARGET : change the target hardware
+ template TEMPLATE [ VERSION ] : change the template
+ add PACKAGE [ PACKAGE ... ] : add package(s)
+ remove PACKAGE [ PACKAGE ... ] : remove package(s)
+ version VERSION PACKAGE [ PACKAGE ... ] : change version of package(s)
+ export FILE : export minimal config info
+ import FILE : import additional config info
+ check : check the configuration
+ resolve : resolve conflicts
+ tree : create a build tree
+ qualifiers are:
+ --config=FILE : the configuration file
+ --prefix=DIRECTORY : the install prefix
+ --srcdir=DIRECTORY : the source repository
+ --no-resolve : disable conflict
+resolution
+ --version : show version and copyright
+$
+</PROGRAMLISTING>
+</EXAMPLE>
+
+<EXAMPLE>
+
+<TITLE>ecosconfig output &mdash; <!-- <index></index> -->
+list of available packages, targets and templates</TITLE>
+
+<PROGRAMLISTING>
+$ ecosconfig list
+Package CYGPKG_CYGMON (CygMon support via eCos):
+aliases: cygmon
+versions: &Version;
+Package CYGPKG_DEVICES_WALLCLOCK_DALLAS_DS1742 (Wallclock driver for Dallas 1742):
+aliases: devices_wallclock_ds1742 device_wallclock_ds1742
+versions: &Version;
+Package CYGPKG_DEVICES_WALLCLOCK_SH3 (Wallclock driver for SH3 RTC module):
+aliases: devices_wallclock_sh3 device_wallclock_sh3
+versions: &Version;
+Package CYGPKG_DEVICES_WATCHDOG_ARM_AEB (Watchdog driver for ARM/AEB board):
+aliases: devices_watchdog_aeb device_watchdog_aeb
+versions: &Version;
+Package CYGPKG_DEVICES_WATCHDOG_ARM_EBSA285 (Watchdog driver for ARM/EBSA285 board):
+aliases: devices_watchdog_ebsa285 device_watchdog_ebsa285
+versions: &Version;
+&hellip;
+</PROGRAMLISTING>
+</EXAMPLE>
+
+
+<SECT2>
+<TITLE>Selecting a <!-- <index></index> --> Target</TITLE>
+
+<PARA>To configure for a listed target, type: </PARA>
+
+<PROGRAMLISTING>
+$ ecosconfig new &lt;target&#62;
+</PROGRAMLISTING>
+
+<PARA>For example, to configure for the ARM PID development board,
+type: </PARA>
+
+<PROGRAMLISTING>
+$ ecosconfig new pid
+</PROGRAMLISTING>
+
+<PARA>You can then edit the generated file,
+<FILENAME>ecos.ecc</FILENAME>, setting the options as required for the
+target (endianess, CPU model, Startup type, etc.). For detailed
+information about how to edit the <filename>ecos.ecc</filename> file,
+see the <citetitle>CDL Writer's Guide</citetitle> and <XREF
+LINKEND="editing-an-ecos-savefile">.
+</PARA>
+
+<PARA>Create a build tree for the configured target by typing:</PARA>
+
+<PROGRAMLISTING>
+$ ecosconfig tree
+</PROGRAMLISTING>
+
+<para>
+If there are any problem with the configuration,
+<command>ecosconfig</command> will tell you. The most likely cause of
+this is mistakes when editing the <filename>ecos.ecc</filename> file.
+You can check whether the configuration you have made is correct,
+without building the tree with the following command:
+</para>
+
+<PROGRAMLISTING>
+$ ecosconfig check
+</PROGRAMLISTING>
+
+<para>
+If this reports any conflicts you can get
+<command>ecosconfig</command> to try and resolve them itself by typing:
+</para>
+
+<PROGRAMLISTING>
+$ ecosconfig resolve
+</PROGRAMLISTING>
+
+<para>
+See <XREF LINKEND="conflicts-and-constraints"> for more details.
+</para>
+
+<PARA>You can now run the command <command>make</command> or <command>make
+tests</command>, after which you will be at the same point you
+would be after running the <application>Configuration Tool</application>
+&mdash; you can start developing your own applications,
+following the steps in <XREF LINKEND="BUILDING-AND-RUNNING-SAMPLE-APPLIATIONS">. </PARA>
+
+<PARA>The procedure shown above allows you to do very coarse-grained
+configuration of the <productname>eCos</productname> kernel: you can select which packages
+to include in your kernel, and give target and start-up options.
+But you cannot select components within a package, or set the very
+fine-grained options. </PARA>
+
+<PARA>To select fine-grained configuration options you will need to
+edit the configuration file <filename>ecos.ecc</filename> in the
+current directory and regenerate the build tree.</PARA>
+
+<CAUTION>
+<PARA>You should follow the manual configuration process described
+above very carefully, and you should read the comments in each file
+to see when one option depends on other options or packages being
+enabled or disabled. If you do not, you might end up with an inconsistently
+configured kernel which could fail to build or might execute
+incorrectly.</PARA>
+</CAUTION>
+
+</SECT2>
+</SECT1>
+
+</CHAPTER>
+
+<!-- ==================================================== -->
+
+<CHAPTER ID="RUNNING-AN-ECOS-TEST-CASE">
+<TITLE>Running an <productname>eCos</productname> Test Case</TITLE>
+
+<PARA>In <XREF LINKEND="using-configtool-windows-linux"> or <XREF
+LINKEND="using-ecosconfig-on-linux"> you created the <productname>eCos</productname> test cases
+as part of the build process. Now it is time to try and run one.
+</para>
+
+<!-- ==================================================== -->
+
+<SECT1 id="using-configtool-testcase">
+<TITLE>Using the <application>Configuration Tool</application></TITLE>
+
+<PARA>Test executables that have been linked using the
+<emphasis>Build-&gt;Tests</emphasis> operation against the current
+configuration can be executed by selecting <EMPHASIS>Tools-&#62;Run
+Tests</EMPHASIS>.</PARA>
+
+<PARA>When a test run is invoked, a property sheet is displayed, see
+<xref linkend="programming-run-tests">. Press the <emphasis>Uncheck
+All</emphasis> button and then find and check just one test,
+<filename>bin_sem0</filename> for example.
+</para>
+
+<FIGURE id="programming-run-tests">
+<TITLE>Run tests</TITLE>
+<GRAPHIC ENTITYREF="graphic27"></GRAPHIC>
+</FIGURE>
+
+<para>
+Now press the <emphasis>Properties</emphasis> button to set up
+communications with the target. This will bring up a properties dialog
+shown in <xref linkend="programming-run-properties">. If you have
+connected the target board via a serial cable, check the
+<emphasis>Serial</emphasis> radio button, and select the serial port
+and baud rate for the board. If the target is connected via the
+network select the <emphasis>TCP/IP</emphasis> button and enter the IP
+address that the board has been given, and the port number (usually
+9000).
+</para>
+
+<FIGURE id="programming-run-properties">
+<TITLE>Properties dialog box</TITLE>
+<GRAPHIC ENTITYREF="graphic25"></GRAPHIC>
+</FIGURE>
+
+<para>
+Click OK on this dialog and go back to the <emphasis>Run
+Tests</emphasis> dialog. Press the <emphasis>Run</emphasis> button and
+the selected test will be downloaded and run. The
+<emphasis>Output</emphasis> tab will show you how this is
+progressing. If it seems to stop for a long time, check that the
+target board is correctly connected, and that <productname>eCos</productname> has been correctly
+configured -- especially the start-up type.
+</para>
+
+<para>
+When the program runs you should see a couple of line similar to this appear:
+</para>
+
+<PROGRAMLISTING>
+PASS:&lt;Binary Semaphore 0 OK&gt;
+EXIT:&lt;done&gt;
+</PROGRAMLISTING>
+
+<para>
+This indicates that the test has run successfully.
+</para>
+
+<PARA>See <xref linkend="config-tool-test-execution"> for
+further details.</PARA>
+
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="using-commandline-testcase">
+<TITLE>Using the command line</TITLE>
+
+<PARA>Start a command shell (such as a Cygwin shell window in Windows)
+with the environment variables set as described in the toolchain
+documentation. Change to the directory in which you set up your build
+tree, and invoke <!-- <index></index> --> GDB on the test
+program.</PARA>
+
+<PARA>To run the <!-- <index></index> -->bin_sem0 test (which will
+test the kernel for the correct creation and destruction of binary
+semaphores) type: </PARA>
+
+<PROGRAMLISTING>
+$ <replaceable>TARGET-</replaceable>gdb -nw install/tests/kernel/<replaceable>&Version;</replaceable>/tests/bin_sem0
+</PROGRAMLISTING>
+
+<PARA>You should see output similar to the following in the command
+window:</PARA>
+
+<PROGRAMLISTING>
+GNU gdb THIS-GDB-VERSION
+Copyright 2001 Free Software Foundation, Inc.
+GDB is free software, covered by the GNU General Public License, and you are
+welcome to change it and/or distribute copies of it under certain conditions.
+Type "show copying" to see the conditions.
+There is absolutely no warranty for GDB. Type "show warranty" for details.
+This GDB was configured as "--host=THIS-HOST --target=THIS-TARGET".
+(gdb)
+</PROGRAMLISTING>
+
+<PARA>If you are trying to run a synthetic target test on <!--
+<index></index> -->Linux, skip the following connection and download
+steps. Otherwise, connect to the target by typing: </PARA>
+
+<PROGRAMLISTING>
+(gdb) set remotebaud 38400
+(gdb) target remote /dev/ttyS0
+</PROGRAMLISTING>
+<PARA>on Linux or</PARA>
+<PROGRAMLISTING>
+(gdb) set remotebaud 38400
+(gdb) target remote com1
+</PROGRAMLISTING>
+<PARA>on Windows or</PARA>
+<PROGRAMLISTING>
+(gdb) target sim
+</PROGRAMLISTING>
+<para>to use a simulator in either host O/S.</para>
+
+<para>
+Check the documentation for the target board for the actual baud rate
+to use when connecting to real targets.
+</para>
+
+<PARA>
+You will see output similar to the following: </PARA>
+
+<programlisting width=72>
+Remote debugging using /dev/ttyS1
+0x0000d50c in ?? ()
+ at <replaceable>BASE_DIR</replaceable>/kernel/<replaceable>&Version;</replaceable>/src/common/kapi.cxx:345
+
+Current language: auto; currently c++
+(gdb)
+</programlisting>
+
+<para>
+Or if you are using the simulator:
+</para>
+
+<PROGRAMLISTING>
+Connected to the simulator.
+(gdb)
+</PROGRAMLISTING>
+
+<PARA>Now download the program to the target with</PARA>
+
+<PROGRAMLISTING>
+(gdb) load
+</PROGRAMLISTING>
+
+<PARA>You should see output similar to the following on your screen: </PARA>
+
+<PROGRAMLISTING>
+Loading section .text, size 0x4b04 lma 0x108000
+Loading section .rodata, size 0x738 lma 0x10cb08
+Loading section .data, size 0x1c0 lma 0x10d240
+Start address 0x108000, load size 21500
+Transfer rate: 24571 bits/sec, 311 bytes/write.
+(gdb)
+</PROGRAMLISTING>
+
+<PARA>You are now ready to run your program. If you type: </PARA>
+
+<PROGRAMLISTING>
+(gdb) continue
+</PROGRAMLISTING>
+
+<PARA>you will see output similar to the following: </PARA>
+
+<PROGRAMLISTING>
+Continuing.
+PASS:&lt;Binary Semaphore 0 OK&gt;
+EXIT:&lt;done&gt;
+</PROGRAMLISTING>
+
+<NOTE>
+<PARA> If you are using a simulator or the synthetic target rather
+ than real hardware, you must use the GDB command
+ &ldquo;run&rdquo; rather than &ldquo;continue&rdquo; to
+ start your program.</PARA>
+</NOTE>
+
+<PARA>You can terminate your GDB session with
+<EMPHASIS>Control+C</EMPHASIS>, otherwise it will sit in the
+&ldquo;idle&rdquo; thread and use up CPU time. This is not a problem
+with real targets, but may have undesirable effects in simulated or
+synthetic targets. Type <command>quit</command> and you are
+done. </PARA>
+
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="testing-filters">
+<TITLE>Testing Filters</TITLE>
+
+<PARA>While most test cases today run solely in the target environment,
+some packages may require external testing infrastructure and/or
+feedback from the external environment to do complete testing.</PARA>
+
+<PARA>The serial package is an example of this. The network package
+also contains some tests that require programs to be run on a
+host. See the network <citetitle>Tests and Demonstrations</citetitle>
+section in the network documentation in the <citetitle><productname>eCos</productname> Reference
+Guide</citetitle>. Here we will concentrate on the serial tests since
+these are applicable to more targets.
+</para>
+
+<PARA>Since the serial line is also used for communication with
+GDB, a filter is inserted in the communication pathway between
+GDB and the serial device which is connected to the hardware target.
+The filter forwards all communication between the two, but also
+listens for special commands embedded in the data stream from the
+target.</PARA>
+
+<PARA>When such a command is seen, the filter stops forwarding data
+to GDB from the target and enters a special mode. In this mode
+the test case running on the target is able to control the filter,
+commanding it to run various tests. While these tests run, GDB is
+isolated from the target.</PARA>
+
+<PARA>As the test completes (or if the filter detects a target crash)
+the communication path between GDB and the hardware target is re-established,
+allowing GDB to resume control.</PARA>
+
+<PARA>In theory, it is possible to extend the filter to provide
+a generic framework for other target-external testing components,
+thus decoupling the testing infrastructure from the (possibly limited)
+communication means provided by the target (serial, JTAG, Ethernet,
+etc). </PARA>
+
+<PARA>Another advantage is that the host tools do not need to
+know about the various testing environments required by the <productname>eCos</productname>
+packages, since all contact with the target continues to happen
+via GDB.</PARA>
+
+</sect1>
+
+</CHAPTER>
+
+
+<!-- ==================================================== -->
+
+<CHAPTER ID="BUILDING-AND-RUNNING-SAMPLE-APPLIATIONS"><!-- <conditionaltext> -->
+<TITLE><!-- <xref> -->Building and <!-- <index></index> -->Running Sample Applications</TITLE>
+
+<PARA>The example programs in this tutorial are included, along
+with a <filename>Makefile</filename>, in the <filename>examples</filename> directory
+of the <productname>eCos</productname> distribution. The first program you will run is a <EMPHASIS>hello
+world</EMPHASIS>-style application, then you will run a more complex
+application that demonstrates the creation of threads and the use
+of cyg_thread_delay(), and finally you will run
+one that uses clocks and alarm handlers.</PARA>
+
+<PARA>The <filename>Makefile</filename> depends on an externally
+defined variable to find the <productname>eCos</productname> library and header files. This
+variable is <literal>INSTALL_DIR</literal> and must be set to the
+pathname of the install directory created in <xref
+linkend="using-configtool-windows-linux">.
+</PARA>
+
+<para>
+<literal>INSTALL_DIR</literal> may be either be set in the shell
+environment or may be supplied on the command line. To set it in the
+shell do the following in a <command>bash</command> shell:
+</para>
+
+<programlisting width=72>
+$ export INSTALL_DIR=BASE_DIR/ecos-work/arm_install
+</programlisting>
+
+<para>
+You can then run <command>make</command> without any extra parameters
+to build the examples.
+</para>
+
+<para>
+Alternatively, if you can do the following:
+</para>
+
+<programlisting width=72>
+$ make INSTALL_DIR=BASE_DIR/ecos-work/arm_install
+</programlisting>
+
+<!-- ==================================================== -->
+
+<SECT1 id="ecos-hello-world">
+<TITLE><productname>eCos</productname> Hello World</TITLE>
+
+<PARA>The following code is found in the file <FILENAME><!-- <index></index> -->hello.c</FILENAME>
+in the <FILENAME>examples</FILENAME> directory: </PARA>
+
+<SECT2>
+<TITLE><productname>eCos</productname><!-- <index></index> --> hello world program listing</TITLE>
+
+<PROGRAMLISTING>
+/* this is a simple hello world program */
+#include &lt;stdio.h&#62;
+int main(void)
+{
+ printf("Hello, eCos world!\n");
+ return 0;
+}
+</PROGRAMLISTING>
+
+<PARA>To compile this or any other program that is not part of the
+<productname>eCos</productname> distribution, you can follow the procedures described below. Type
+this explicit compilation command (assuming your current working
+directory is also where you built the <productname>eCos</productname> kernel):</PARA>
+
+<PROGRAMLISTING>
+$ <replaceable>TARGET-</replaceable>gcc -g -I<replaceable>BASE_DIR</replaceable>/ecos-work/install/include hello.c -L<replaceable>BASE_DIR</replaceable>/ecos-work/install/lib -Ttarget.ld -nostdlib
+</PROGRAMLISTING>
+
+<PARA>The compilation command above contains some standard GCC
+options (for example, <OPTION>-g</OPTION> enables debugging), as well
+as some mention of paths
+(<OPTION>-I<replaceable>BASE_DIR</replaceable>/ecos-work/install/include</OPTION> allows files
+like <FILENAME>cyg/kernel/kapi.h</FILENAME> to be found, and
+<OPTION>-L<replaceable>BASE_DIR</replaceable>/ecos-work/install/lib</OPTION> allows the linker to
+find <OPTION>-Ttarget.ld</OPTION>). </PARA>
+
+<PARA>The executable program will be called <FILENAME>a.out</FILENAME>. </PARA>
+
+<NOTE>
+<PARA>Some target systems require special options to be passed to
+gcc to compile correctly for that system. Please examine the Makefile
+in the examples directory to see if this applies to your target.</PARA>
+</NOTE>
+
+<PARA>You can now run the resulting program using GDB in exactly the
+same the way you ran the test case before. The procedure will be the
+same, but this time run
+<command><replaceable>TARGET-</replaceable>gdb</command> specifying
+<option>-nw a.out</option> on the command line:</PARA>
+
+<PROGRAMLISTING>
+$ <replaceable>TARGET-</replaceable>gdb -nw a.out
+</PROGRAMLISTING>
+
+<PARA>For targets other than the synthetic linux target, you should
+now run the usual GDB commands described earlier. Once this is done,
+typing the command "continue" at the (gdb) prompt ("run" for
+simulators) will allow the program to execute and print the string
+"Hello, eCos world!" on your screen.</PARA>
+
+<PARA>On the synthetic linux target, you may use the "run" command
+immediately - you do not need to connect to the target, nor use the
+"load" command.<!-- <conditionaltext> --></PARA>
+
+</SECT2>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="sample-twothreads">
+<TITLE>A Sample Program with Two Threads</TITLE>
+
+<PARA>Below is a program that uses some of <productname>eCos</productname>' system calls. It
+creates two threads, each of which goes into an infinite loop in which
+it sleeps for a while (using cyg_thread_delay()). This code is found
+in the file <filename><!-- <index></index> -->twothreads.c</filename>
+in the examples directory.</PARA>
+
+<SECT2>
+<TITLE><productname>eCos</productname> <!-- <index></index> -->two-threaded program listing</TITLE>
+
+<PROGRAMLISTING>
+#include &lt;cyg/kernel/kapi.h&#62;
+#include &lt;stdio.h&#62;
+#include &lt;math.h&#62;
+#include &lt;stdlib.h&#62;
+
+/* now declare (and allocate space for) some kernel objects,
+ like the two threads we will use */
+cyg_thread thread_s[2]; /* space for two thread objects */
+
+char stack[2][4096]; /* space for two 4K stacks */
+
+/* now the handles for the threads */
+cyg_handle_t simple_threadA, simple_threadB;
+
+/* and now variables for the procedure which is the thread */
+cyg_thread_entry_t simple_program;
+
+/* and now a mutex to protect calls to the C library */
+cyg_mutex_t cliblock;
+
+/* we install our own startup routine which sets up threads */
+void cyg_user_start(void)
+{
+ printf("Entering twothreads' cyg_user_start() function\n");
+
+ cyg_mutex_init(&amp;cliblock);
+
+ cyg_thread_create(4, simple_program, (cyg_addrword_t) 0,
+ "Thread A", (void *) stack[0], 4096,
+ &amp;simple_threadA, &amp;thread_s[0]);
+ cyg_thread_create(4, simple_program, (cyg_addrword_t) 1,
+ "Thread B", (void *) stack[1], 4096,
+ &amp;simple_threadB, &amp;thread_s[1]);
+
+ cyg_thread_resume(simple_threadA);
+ cyg_thread_resume(simple_threadB);
+}
+
+/* this is a simple program which runs in a thread */
+void simple_program(cyg_addrword_t data)
+{
+ int message = (int) data;
+ int delay;
+
+ printf("Beginning execution; thread data is %d\n", message);
+
+ cyg_thread_delay(200);
+
+ for (;;) {
+ delay = 200 + (rand() % 50);
+
+ /* note: printf() must be protected by a
+ call to cyg_mutex_lock() */
+ cyg_mutex_lock(&amp;cliblock); {
+ printf("Thread %d: and now a delay of %d clock ticks\n",
+ message, delay);
+ }
+ cyg_mutex_unlock(&amp;cliblock);
+ cyg_thread_delay(delay);
+ }
+}
+</PROGRAMLISTING>
+
+<PARA>
+When you run the program (by typing <command>continue</command> at
+the (<EMPHASIS>gdb</EMPHASIS>) prompt) the output should look like
+this:</PARA>
+
+<PROGRAMLISTING>
+Starting program: <replaceable>BASE_DIR</replaceable>/examples/twothreads.exe
+Entering twothreads' cyg_user_start()
+function
+Beginning execution; thread data is 0
+Beginning execution; thread data is 1
+Thread 0: and now a delay of 240 clock ticks
+Thread 1: and now a delay of 225 clock ticks
+Thread 1: and now a delay of 234 clock ticks
+Thread 0: and now a delay of 231 clock ticks
+Thread 1: and now a delay of 224 clock ticks
+Thread 0: and now a delay of 249 clock ticks
+Thread 1: and now a delay of 202 clock ticks
+Thread 0: and now a delay of 235 clock ticks
+</PROGRAMLISTING>
+
+<NOTE>
+<PARA>When running in a simulator the <!-- <index></index> -->
+delays might be quite long. On a hardware board (where the clock
+speed is 100 ticks/second) the delays should average to
+about 2.25 seconds. In simulation, the delay will depend on the
+speed of the host processor and will almost always be much slower than
+the actual board. You might want to reduce the delay parameter when running
+in simulation.
+</PARA>
+</NOTE>
+
+<PARA>
+<XREF LINKEND="FIGURE-TWOTHREADS-WITH-SIMPLE-PRINTS"> shows how this
+multitasking program executes. Note that apart from the thread
+creation system calls, this program also creates and uses a
+<EMPHASIS><!-- <index></index> -->mutex</EMPHASIS> for synchronization
+between the <function>printf()</function> calls in the two
+threads. This is because the C library standard I/O (by default) is
+configured not to be thread-safe, which means that if more than one
+thread is using standard I/O they might corrupt each other. This is
+fixed by a mutual exclusion (or <EMPHASIS>mutex</EMPHASIS>) lockout
+mechanism: the threads do not call <function>printf()</function> until
+<function>cyg_mutex_lock()</function> has returned, which only happens
+when the other thread calls
+<function>cyg_mutex_unlock()</function>.</PARA>
+
+<PARA>You could avoid using the mutex by configuring the C library to
+be thread-safe (by selecting the component
+<LITERAL>CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS</LITERAL>).</PARA>
+
+<FIGURE
+ID="FIGURE-TWOTHREADS-WITH-SIMPLE-PRINTS"><!-- <xref> --> <TITLE>Two
+threads with simple print statements after random delays</TITLE>
+<GRAPHIC ENTITYREF="programming-graphic9"></GRAPHIC>
+</FIGURE>
+
+</SECT2>
+
+</SECT1>
+
+</CHAPTER>
+
+<!-- ==================================================== -->
+
+<CHAPTER ID="CLOCKS-AND-ALARM-HANDLERS">
+<TITLE>More Features &mdash; <!-- <index></index> -->Clocks and Alarm
+Handlers</TITLE>
+
+<PARA>If a program wanted to execute a task at a given time, or
+periodically, it could do it in an inefficient way by sitting in a
+loop and checking the real-time clock to see if the proper amount of
+time has elapsed. But operating systems usually provide system calls
+which allow the program to be informed at the desired time.</PARA>
+
+<PARA><productname>eCos</productname> provides a rich timekeeping formalism, involving
+<EMPHASIS>counters</EMPHASIS>, <EMPHASIS>clocks</EMPHASIS>,
+<EMPHASIS>alarms</EMPHASIS>, and <EMPHASIS>timers</EMPHASIS>. The
+precise definition, relationship, and motivation of these features is
+beyond the scope of this tutorial, but these examples illustrate how
+to set up basic periodic tasks.</PARA>
+
+<PARA><!-- <index></index> -->Alarms are events that happen at
+a given time, either once or periodically. A thread associates an
+alarm handling function with the alarm, so that the function will
+be invoked every time the alarm &ldquo;goes off&rdquo;.</PARA>
+
+<!-- ==================================================== -->
+
+<SECT1 id="sample-alarms">
+<TITLE>A Sample Program with Alarms</TITLE>
+
+<PARA><!-- <index></index> --><FILENAME>simple-alarm.c</FILENAME> (in
+the examples directory) is a short program that creates a thread that
+creates an alarm. The alarm is handled by the function
+<FUNCTION>test_alarm_func()</FUNCTION>, which sets a global
+variable. When the main thread of execution sees that the variable has
+changed, it prints a message.</PARA>
+
+<EXAMPLE>
+<TITLE>A sample <!-- <index></index> -->program that creates an alarm</TITLE>
+
+<PROGRAMLISTING>
+/* this is a very simple program meant to demonstrate
+ a basic use of time, alarms and alarm-handling functions in eCos */
+
+#include &lt;cyg/kernel/kapi.h&#62;
+
+#include &lt;stdio.h&#62;
+
+#define NTHREADS 1
+#define STACKSIZE 4096
+
+static cyg_handle_t thread[NTHREADS];
+
+static cyg_thread thread_obj[NTHREADS];
+static char stack[NTHREADS][STACKSIZE];
+
+static void alarm_prog( cyg_addrword_t data );
+
+/* we install our own startup routine which sets up
+ threads and starts the scheduler */
+void cyg_user_start(void)
+{
+ cyg_thread_create(4, alarm_prog, (cyg_addrword_t) 0,
+ "alarm_thread", (void *) stack[0],
+ STACKSIZE, &amp;thread[0], &amp;thread_obj[0]);
+ cyg_thread_resume(thread[0]);
+}
+
+/* we need to declare the alarm handling function (which is
+ defined below), so that we can pass it to cyg_alarm_initialize() */
+cyg_alarm_t test_alarm_func;
+
+/* alarm_prog() is a thread which sets up an alarm which is then
+ handled by test_alarm_func() */
+static void alarm_prog(cyg_addrword_t data)
+{
+ cyg_handle_t test_counterH, system_clockH, test_alarmH;
+ cyg_tick_count_t ticks;
+ cyg_alarm test_alarm;
+ unsigned how_many_alarms = 0, prev_alarms = 0, tmp_how_many;
+
+ system_clockH = cyg_real_time_clock();
+ cyg_clock_to_counter(system_clockH, &amp;test_counterH);
+ cyg_alarm_create(test_counterH, test_alarm_func,
+ (cyg_addrword_t) &amp;how_many_alarms,
+ &amp;test_alarmH, &amp;test_alarm);
+ cyg_alarm_initialize(test_alarmH, cyg_current_time()+200, 200);
+
+ /* get in a loop in which we read the current time and
+ print it out, just to have something scrolling by */
+ for (;;) {
+ ticks = cyg_current_time();
+ printf("Time is %llu\n", ticks);
+ /* note that we must lock access to how_many_alarms, since the
+ alarm handler might change it. this involves using the
+ annoying temporary variable tmp_how_many so that I can keep the
+ critical region short */
+ cyg_scheduler_lock();
+ tmp_how_many = how_many_alarms;
+ cyg_scheduler_unlock();
+ if (prev_alarms != tmp_how_many) {
+ printf(" --- alarm calls so far: %u\n", tmp_how_many);
+ prev_alarms = tmp_how_many;
+ }
+ cyg_thread_delay(30);
+ }
+}
+
+/* test_alarm_func() is invoked as an alarm handler, so
+ it should be quick and simple. in this case it increments
+ the data that is passed to it. */
+void test_alarm_func(cyg_handle_t alarmH, cyg_addrword_t data)
+{
+ ++*((unsigned *) data);
+}
+</PROGRAMLISTING>
+</EXAMPLE>
+
+<PARA>When you run this program (by typing <COMMAND>continue</COMMAND> at
+the (<EMPHASIS>gdb</EMPHASIS>) prompt) the output should look like
+this:</PARA>
+<SCREEN>
+Starting program: <replaceable>BASE_DIR</replaceable>/examples/simple-alarm.exe
+Time is 0
+Time is 30
+Time is 60
+Time is 90
+Time is 120
+Time is 150
+Time is 180
+Time is 210
+ --- alarm calls so far: 1
+Time is 240
+Time is 270
+Time is 300
+Time is 330
+Time is 360
+Time is 390
+Time is 420
+ --- alarm calls so far: 2
+Time is 450
+Time is 480
+</SCREEN>
+
+<NOTE>
+<PARA>When running in a simulator the <!-- <index></index> --> delays
+might be quite long. On a hardware board (where the clock speed is 100
+ticks/second) the delays should average to about 0.3 seconds (and 2
+seconds between alarms). In simulation, the delay will depend on the
+speed of the host processor and will almost always be much slower than
+the actual board. You might want to reduce the delay parameter when
+running in simulation.</PARA>
+</NOTE>
+
+<PARA>Here are a few things you might notice about this program:</PARA>
+
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>It used the <function>cyg_real_time_clock()</function> function;
+this always returns a handle to the default system real-time <!--
+<index></index> --> clock. </PARA>
+</LISTITEM>
+
+<LISTITEM>
+<PARA><!-- <index></index> -->Clocks are based on <!-- <index></index>
+--> counters, so the function <function>cyg_alarm_create()</function>
+uses a counter handle. The program used the function
+<function>cyg_clock_to_counter()</function> to strip the clock handle
+to the underlying counter handle. </PARA>
+</LISTITEM>
+
+<LISTITEM>
+<PARA>Once the alarm is created it is <!-- <index></index> -->
+initialized with <function>cyg_alarm_initialize()</function>, which
+sets the time at which the alarm should go off, as well as the period
+for repeating alarms. It is set to go off at the current time and
+then to repeat every 200 ticks. </PARA>
+</LISTITEM>
+
+<LISTITEM>
+<PARA>The alarm handler function
+<function>test_alarm_func()</function> conforms to the guidelines for
+writing alarm handlers and other <!-- <index></index> --><!--
+<index></index> --> delayed service routines: it does not invoke any
+functions which might lock the scheduler. This is discussed in detail
+in the <CITETITLE><productname>eCos</productname> Reference Manual</CITETITLE>, in the chapter
+<citetitle>The <productname>eCos</productname> Kernel</citetitle>.</PARA>
+</LISTITEM>
+
+<LISTITEM>
+<PARA>There is a <EMPHASIS>critical region</EMPHASIS> in this program:
+the variable <LITERAL>how_many_alarms</LITERAL> is accessed in the
+main thread of control and is also modified in the alarm handler. To
+prevent a possible (though unlikely) race condition on this variable,
+access to <LITERAL>how_many_alarms</LITERAL> in the principal thread
+is protected by calls to <FUNCTION>cyg_scheduler_lock()</FUNCTION> and
+<FUNCTION>cyg_scheduler_unlock()</FUNCTION>. When the scheduler is
+locked, the alarm handler will not be invoked, so the problem is
+averted. </PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+</SECT1>
+</CHAPTER>
+
+</part>
+
diff --git a/cesar/ecos/doc/sgml/user-guide/real-time-characterization.sgml b/cesar/ecos/doc/sgml/user-guide/real-time-characterization.sgml
new file mode 100644
index 0000000000..cd246ff99e
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/real-time-characterization.sgml
@@ -0,0 +1,3316 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- config-tool.sgml -->
+<!-- -->
+<!-- eCos User Guide -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<APPENDIX ID="REAL-TIME-CHARACTERIZATION">
+<TITLE>Real-time characterization</TITLE>
+
+<PARA>For a discussion of real-time performance measurement for eCos, see the
+kernel documentation in the eCos Reference Manual.
+</PARA>
+
+<caution>
+<para>
+As with the target setup descriptions in the previous appendix, this
+information will eventually be merged into per-target documents.
+</para>
+</caution>
+
+<PARA> Sample numbers:
+ </PARA>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-arm-aeb1">
+<TITLE>Board: ARM AEB-1 Revision B Evaluation Board</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">
+
+Board: ARM AEB-1 Revision B Evaluation Board
+
+CPU : Sharp LH77790A 24MHz
+
+
+
+Startup, main stack : stack used 404 size 2400
+Startup : Interrupt stack used 128 size 2048
+Startup : Idlethread stack used 80 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 13 'ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 193.49 microseconds (290 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 7
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 110.19 104.67 116.00 3.26 42% 28% Create thread
+ 34.00 34.00 34.00 0.00 100% 100% Yield thread [all suspended]
+ 24.67 24.67 24.67 0.00 100% 100% Suspend [suspended] thread
+ 25.05 24.67 25.33 0.33 57% 42% Resume thread
+ 37.14 36.67 37.33 0.27 71% 28% Set priority
+ 3.81 3.33 4.00 0.27 71% 28% Get priority
+ 80.00 80.00 80.00 0.00 100% 100% Kill [suspended] thread
+ 33.90 33.33 34.00 0.16 85% 14% Yield [no other] thread
+ 45.90 44.00 46.67 0.54 57% 14% Resume [suspended low prio] thread
+ 24.57 24.00 24.67 0.16 85% 14% Resume [runnable low prio] thread
+ 42.29 36.67 43.33 1.61 85% 14% Suspend [runnable] thread
+ 33.90 33.33 34.00 0.16 85% 14% Yield [only low prio] thread
+ 24.67 24.67 24.67 0.00 100% 100% Suspend [runnable-&#62;not runnable]
+ 80.00 80.00 80.00 0.00 100% 100% Kill [runnable] thread
+ 43.33 43.33 43.33 0.00 100% 100% Destroy [dead] thread
+ 106.29 101.33 107.33 1.41 85% 14% Destroy [runnable] thread
+ 144.95 141.33 166.00 6.01 85% 85% Resume [high priority] thread
+ 78.31 76.67 254.67 2.75 99% 99% Thread switch
+
+ 4.00 4.00 4.00 0.00 100% 100% Scheduler lock
+ 16.37 16.00 16.67 0.33 56% 43% Scheduler unlock [0 threads]
+ 16.37 16.00 16.67 0.33 56% 43% Scheduler unlock [1 suspended]
+ 16.37 16.00 16.67 0.33 56% 43% Scheduler unlock [many suspended]
+ 16.37 16.00 16.67 0.33 56% 43% Scheduler unlock [many low prio]
+
+ 10.67 10.67 10.67 0.00 100% 100% Init mutex
+ 28.67 28.67 28.67 0.00 100% 100% Lock [unlocked] mutex
+ 30.44 30.00 31.33 0.33 59% 37% Unlock [locked] mutex
+ 25.42 25.33 26.00 0.15 87% 87% Trylock [unlocked] mutex
+ 22.50 22.00 22.67 0.25 75% 25% Trylock [locked] mutex
+ 5.75 5.33 6.00 0.31 62% 37% Destroy mutex
+ 185.33 185.33 185.33 0.00 100% 100% Unlock/Lock mutex
+
+ 20.17 20.00 20.67 0.25 75% 75% Create mbox
+ 2.92 2.67 3.33 0.31 62% 62% Peek [empty] mbox
+ 32.42 32.00 32.67 0.31 62% 37% Put [first] mbox
+ 3.00 2.67 3.33 0.33 100% 50% Peek [1 msg] mbox
+ 32.50 32.00 32.67 0.25 75% 25% Put [second] mbox
+ 2.92 2.67 3.33 0.31 62% 62% Peek [2 msgs] mbox
+ 32.83 32.67 33.33 0.25 75% 75% Get [first] mbox
+ 32.67 32.67 32.67 0.00 100% 100% Get [second] mbox
+ 31.33 31.33 31.33 0.00 100% 100% Tryput [first] mbox
+ 27.58 27.33 28.00 0.31 62% 62% Peek item [non-empty] mbox
+ 32.83 32.67 33.33 0.25 75% 75% Tryget [non-empty] mbox
+ 26.50 26.00 26.67 0.25 75% 25% Peek item [empty] mbox
+ 28.00 28.00 28.00 0.00 100% 100% Tryget [empty] mbox
+ 3.25 2.67 3.33 0.15 87% 12% Waiting to get mbox
+ 3.25 2.67 3.33 0.15 87% 12% Waiting to put mbox
+ 30.83 30.67 31.33 0.25 75% 75% Delete mbox
+ 101.08 100.67 101.33 0.31 62% 37% Put/Get mbox
+
+ 11.17 10.67 11.33 0.25 75% 25% Init semaphore
+ 24.17 24.00 24.67 0.25 75% 75% Post [0] semaphore
+ 27.08 26.67 27.33 0.31 62% 37% Wait [1] semaphore
+ 22.75 22.67 23.33 0.15 87% 87% Trywait [0] semaphore
+ 22.21 22.00 22.67 0.29 68% 68% Trywait [1] semaphore
+ 7.33 7.33 7.33 0.00 100% 100% Peek semaphore
+ 5.92 5.33 6.00 0.15 87% 12% Destroy semaphore
+ 110.04 110.00 110.67 0.08 93% 93% Post/Wait semaphore
+
+ 9.54 9.33 10.00 0.29 68% 68% Create counter
+ 3.92 3.33 4.00 0.15 87% 12% Get counter value
+ 4.00 4.00 4.00 0.00 100% 100% Set counter value
+ 30.92 30.67 31.33 0.31 62% 62% Tick counter
+ 5.75 5.33 6.00 0.31 62% 37% Delete counter
+
+ 13.83 13.33 14.00 0.25 75% 25% Create alarm
+ 46.67 46.67 46.67 0.00 100% 100% Initialize alarm
+ 3.67 3.33 4.00 0.33 100% 50% Disable alarm
+ 45.67 45.33 46.00 0.33 100% 50% Enable alarm
+ 8.33 8.00 8.67 0.33 100% 50% Delete alarm
+ 36.33 36.00 36.67 0.33 100% 50% Tick counter [1 alarm]
+ 214.67 214.67 214.67 0.00 100% 100% Tick counter [many alarms]
+ 62.67 62.67 62.67 0.00 100% 100% Tick &#38; fire counter [1 alarm]
+ 1087.04 1075.33 1278.67 21.91 93% 93% Tick &#38; fire counters [&#62;1 together]
+ 246.35 240.67 412.00 10.35 96% 96% Tick &#38; fire counters [&#62;1 separately]
+ 168.01 167.33 237.33 1.08 99% 99% Alarm latency [0 threads]
+ 187.36 168.00 234.67 3.60 86% 1% Alarm latency [2 threads]
+ 187.37 167.33 235.33 3.59 85% 1% Alarm latency [many threads]
+ 303.12 280.00 508.67 3.21 98% 0% Alarm -&#62; thread resume latency
+
+ 36.65 36.00 38.67 0.00 Clock/interrupt latency
+
+ 65.79 52.00 152.67 0.00 Clock DSR latency
+
+ 316 316 316 (main stack: 752) Thread stack used (1120 total)
+All done, main stack : stack used 752 size 2400
+All done : Interrupt stack used 280 size 2048
+All done : Idlethread stack used 268 size 2048
+
+Timing complete - 30390 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+
+ </LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-at91-eb40">
+<TITLE>Board: Atmel AT91/EB40</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">
+Board: Atmel AT91/EB40
+CPU : AT91R40807 (ARM7TDMI core), 32MHz
+512KB RAM, 64K Flash
+
+Startup, main stack : stack used 420 size 2400
+Startup : Interrupt stack used 144 size 4096
+Startup : Idlethread stack used 84 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 3 'ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 127.53 microseconds (130 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 25
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 86.48 71.29 101.56 7.99 48% 28% Create thread
+ 20.70 20.51 21.48 0.31 80% 80% Yield thread [all suspended]
+ 17.15 16.60 17.58 0.48 56% 44% Suspend [suspended] thread
+ 17.07 16.60 17.58 0.49 52% 52% Resume thread
+ 25.51 25.39 26.37 0.21 88% 88% Set priority
+ 3.16 2.93 3.91 0.36 76% 76% Get priority
+ 52.34 51.76 52.73 0.47 60% 40% Kill [suspended] thread
+ 20.70 20.51 21.48 0.31 80% 80% Yield [no other] thread
+ 28.98 28.32 30.27 0.48 60% 36% Resume [suspended low prio] thread
+ 17.11 16.60 17.58 0.49 52% 48% Resume [runnable low prio] thread
+ 27.85 26.37 28.32 0.52 96% 4% Suspend [runnable] thread
+ 20.70 20.51 21.48 0.31 80% 80% Yield [only low prio] thread
+ 17.23 16.60 17.58 0.45 64% 36% Suspend [runnable-&#62;not runnable]
+ 52.34 51.76 52.73 0.47 60% 40% Kill [runnable] thread
+ 33.01 32.23 33.20 0.31 80% 20% Destroy [dead] thread
+ 72.03 70.31 72.27 0.38 80% 4% Destroy [runnable] thread
+ 96.99 95.70 112.30 1.22 64% 96% Resume [high priority] thread
+ 51.48 49.80 164.06 1.76 99% 99% Thread switch
+
+ 2.78 1.95 2.93 0.26 84% 15% Scheduler lock
+ 11.81 11.72 12.70 0.17 90% 90% Scheduler unlock [0 threads]
+ 11.81 11.72 12.70 0.17 90% 90% Scheduler unlock [1 suspended]
+ 11.81 11.72 12.70 0.17 90% 90% Scheduler unlock [many suspended]
+ 11.81 11.72 12.70 0.17 90% 90% Scheduler unlock [many low prio]
+
+ 5.49 4.88 5.86 0.46 62% 37% Init mutex
+ 20.20 19.53 20.51 0.42 68% 31% Lock [unlocked] mutex
+ 24.44 24.41 25.39 0.06 96% 96% Unlock [locked] mutex
+ 18.25 17.58 18.55 0.42 68% 31% Trylock [unlocked] mutex
+ 16.11 15.63 16.60 0.49 100% 50% Trylock [locked] mutex
+ 6.10 5.86 6.84 0.37 75% 75% Destroy mutex
+ 124.21 124.02 125.00 0.30 81% 81% Unlock/Lock mutex
+
+ 9.28 8.79 9.77 0.49 100% 50% Create mbox
+ 2.93 2.93 2.93 0.00 100% 100% Peek [empty] mbox
+ 22.58 22.46 23.44 0.21 87% 87% Put [first] mbox
+ 2.44 1.95 2.93 0.49 100% 50% Peek [1 msg] mbox
+ 22.58 22.46 23.44 0.21 87% 87% Put [second] mbox
+ 2.44 1.95 2.93 0.49 100% 50% Peek [2 msgs] mbox
+ 22.71 22.46 23.44 0.37 75% 75% Get [first] mbox
+ 22.71 22.46 23.44 0.37 75% 75% Get [second] mbox
+ 21.18 20.51 21.48 0.42 68% 31% Tryput [first] mbox
+ 18.98 18.55 19.53 0.48 56% 56% Peek item [non-empty] mbox
+ 22.46 22.46 22.46 0.00 100% 100% Tryget [non-empty] mbox
+ 18.31 17.58 18.55 0.37 75% 25% Peek item [empty] mbox
+ 19.53 19.53 19.53 0.00 100% 100% Tryget [empty] mbox
+ 2.69 1.95 2.93 0.37 75% 25% Waiting to get mbox
+ 2.93 2.93 2.93 0.00 100% 100% Waiting to put mbox
+ 23.86 23.44 24.41 0.48 56% 56% Delete mbox
+ 67.60 67.38 68.36 0.33 78% 78% Put/Get mbox
+
+ 5.37 4.88 5.86 0.49 100% 50% Init semaphore
+ 16.97 16.60 17.58 0.46 62% 62% Post [0] semaphore
+ 18.98 18.55 19.53 0.48 56% 56% Wait [1] semaphore
+ 15.81 15.63 16.60 0.30 81% 81% Trywait [0] semaphore
+ 15.29 14.65 15.63 0.44 65% 34% Trywait [1] semaphore
+ 5.62 4.88 5.86 0.37 75% 25% Peek semaphore
+ 6.35 5.86 6.84 0.49 100% 50% Destroy semaphore
+ 72.36 72.27 73.24 0.17 90% 90% Post/Wait semaphore
+
+ 7.08 6.84 7.81 0.37 75% 75% Create counter
+ 3.17 2.93 3.91 0.37 75% 75% Get counter value
+ 3.05 2.93 3.91 0.21 87% 87% Set counter value
+ 24.11 23.44 24.41 0.42 68% 31% Tick counter
+ 5.49 4.88 5.86 0.46 62% 37% Delete counter
+
+ 10.92 10.74 11.72 0.30 81% 81% Create alarm
+ 31.46 31.25 32.23 0.33 78% 78% Initialize alarm
+ 3.05 2.93 3.91 0.21 87% 87% Disable alarm
+ 31.49 31.25 32.23 0.37 75% 75% Enable alarm
+ 7.02 6.84 7.81 0.30 81% 81% Delete alarm
+ 31.16 30.27 31.25 0.17 90% 9% Tick counter [1 alarm]
+ 309.26 304.69 425.78 7.28 96% 96% Tick counter [many alarms]
+ 44.83 43.95 44.92 0.17 90% 9% Tick &#38; fire counter [1 alarm]
+ 781.68 774.41 893.55 13.62 93% 93% Tick &#38; fire counters [&#62;1 together]
+ 324.16 320.31 433.59 6.84 96% 96% Tick &#38; fire counters [&#62;1 separately]
+ 114.26 113.28 167.97 0.84 57% 42% Alarm latency [0 threads]
+ 126.91 113.28 159.18 8.20 50% 31% Alarm latency [2 threads]
+ 127.11 113.28 158.20 8.09 51% 28% Alarm latency [many threads]
+ 196.49 189.45 331.05 2.10 98% 0% Alarm -&#62; thread resume latency
+
+ 23.50 23.44 25.39 0.00 Clock/interrupt latency
+
+ 40.31 33.20 514.65 0.00 Clock DSR latency
+
+ 300 271 312 (main stack: 832) Thread stack used (1120 total)
+All done, main stack : stack used 832 size 2400
+All done : Interrupt stack used 288 size 4096
+All done : Idlethread stack used 272 size 2048
+
+Timing complete - 30350 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+ </LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-arm-ebsa285">
+<TITLE>Board: Intel StrongARM EBSA-285 Evaluation Board</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">Board: Intel StrongARM EBSA-285 Evaluation Board
+
+CPU : Intel StrongARM SA-110 228MHz
+
+
+Startup, main stack : stack used 404 size 2400
+Startup : Interrupt stack used 136 size 4096
+Startup : Idlethread stack used 80 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 1 'ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 4.61 microseconds (16 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 64
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 4.97 3.26 7.34 0.60 50% 4% Create thread
+ 0.73 0.54 2.17 0.14 60% 37% Yield thread [all suspended]
+ 0.98 0.82 2.99 0.23 81% 68% Suspend [suspended] thread
+ 0.54 0.27 1.63 0.03 92% 6% Resume thread
+ 0.83 0.54 1.90 0.10 73% 14% Set priority
+ 0.21 0.00 0.54 0.21 25% 48% Get priority
+ 2.25 1.90 10.05 0.37 96% 67% Kill [suspended] thread
+ 0.70 0.54 1.09 0.14 53% 45% Yield [no other] thread
+ 0.96 0.82 1.36 0.14 50% 48% Resume [suspended low prio] thread
+ 0.53 0.27 0.82 0.03 92% 6% Resume [runnable low prio] thread
+ 0.90 0.82 1.63 0.13 70% 70% Suspend [runnable] thread
+ 0.70 0.54 0.82 0.13 57% 42% Yield [only low prio] thread
+ 0.55 0.54 0.82 0.01 98% 98% Suspend [runnable-&#62;not runnable]
+ 1.64 1.63 2.17 0.02 98% 98% Kill [runnable] thread
+ 0.97 0.82 4.62 0.20 98% 64% Destroy [dead] thread
+ 2.17 1.90 2.17 0.01 98% 1% Destroy [runnable] thread
+ 6.06 5.16 10.60 0.53 59% 31% Resume [high priority] thread
+ 1.69 1.63 5.98 0.11 90% 90% Thread switch
+
+ 0.14 0.00 1.36 0.14 99% 50% Scheduler lock
+ 0.37 0.27 0.54 0.13 62% 62% Scheduler unlock [0 threads]
+ 0.38 0.27 0.54 0.13 60% 60% Scheduler unlock [1 suspended]
+ 0.37 0.27 0.54 0.13 63% 63% Scheduler unlock [many suspended]
+ 0.37 0.27 0.54 0.13 63% 63% Scheduler unlock [many low prio]
+
+ 0.34 0.00 1.90 0.15 78% 6% Init mutex
+ 0.88 0.54 4.62 0.37 93% 71% Lock [unlocked] mutex
+ 0.79 0.54 4.35 0.26 93% 53% Unlock [locked] mutex
+ 0.59 0.27 2.17 0.10 93% 3% Trylock [unlocked] mutex
+ 0.50 0.27 0.82 0.09 78% 18% Trylock [locked] mutex
+ 0.18 0.00 0.54 0.13 59% 37% Destroy mutex
+ 3.85 3.80 5.16 0.08 96% 96% Unlock/Lock mutex
+
+ 0.64 0.27 3.53 0.24 81% 15% Create mbox
+ 0.61 0.27 2.17 0.21 68% 18% Peek [empty] mbox
+ 0.87 0.54 5.16 0.31 59% 87% Put [first] mbox
+ 0.08 0.00 0.54 0.12 71% 71% Peek [1 msg] mbox
+ 0.71 0.54 1.09 0.14 56% 40% Put [second] mbox
+ 0.08 0.00 0.27 0.12 68% 68% Peek [2 msgs] mbox
+ 0.89 0.54 4.89 0.31 62% 81% Get [first] mbox
+ 0.76 0.54 1.09 0.17 43% 37% Get [second] mbox
+ 0.76 0.54 3.26 0.21 96% 50% Tryput [first] mbox
+ 0.65 0.54 2.45 0.17 81% 81% Peek item [non-empty] mbox
+ 0.76 0.54 2.72 0.19 53% 43% Tryget [non-empty] mbox
+ 0.58 0.54 0.82 0.06 87% 87% Peek item [empty] mbox
+ 0.61 0.54 0.82 0.10 75% 75% Tryget [empty] mbox
+ 0.10 0.00 0.54 0.13 65% 65% Waiting to get mbox
+ 0.10 0.00 0.54 0.13 65% 65% Waiting to put mbox
+ 0.77 0.54 3.26 0.20 53% 43% Delete mbox
+ 2.10 1.90 6.25 0.30 93% 93% Put/Get mbox
+
+ 0.34 0.27 1.09 0.11 81% 81% Init semaphore
+ 0.60 0.27 1.09 0.12 68% 6% Post [0] semaphore
+ 0.59 0.54 0.82 0.08 81% 81% Wait [1] semaphore
+ 0.59 0.54 2.17 0.10 96% 96% Trywait [0] semaphore
+ 0.48 0.27 0.82 0.11 71% 25% Trywait [1] semaphore
+ 0.24 0.00 0.82 0.09 78% 18% Peek semaphore
+ 0.19 0.00 0.54 0.13 62% 34% Destroy semaphore
+ 2.28 2.17 4.08 0.18 93% 90% Post/Wait semaphore
+
+ 0.43 0.00 2.72 0.23 90% 6% Create counter
+ 0.40 0.00 1.63 0.25 68% 28% Get counter value
+ 0.13 0.00 0.82 0.15 96% 59% Set counter value
+ 0.71 0.54 1.63 0.16 50% 46% Tick counter
+ 0.16 0.00 0.54 0.14 53% 43% Delete counter
+
+ 0.47 0.27 1.36 0.15 59% 37% Create alarm
+ 1.58 1.09 7.07 0.44 71% 68% Initialize alarm
+ 0.12 0.00 1.09 0.16 96% 65% Disable alarm
+ 1.01 0.82 2.45 0.17 53% 43% Enable alarm
+ 0.21 0.00 0.27 0.09 78% 21% Delete alarm
+ 0.78 0.54 1.90 0.12 71% 25% Tick counter [1 alarm]
+ 3.90 3.80 4.35 0.13 68% 68% Tick counter [many alarms]
+ 1.25 1.09 1.63 0.14 53% 43% Tick &#38; fire counter [1 alarm]
+ 19.88 19.84 20.11 0.07 84% 84% Tick &#38; fire counters [&#62;1 together]
+ 4.37 4.35 4.62 0.05 90% 90% Tick &#38; fire counters [&#62;1 separately]
+ 3.83 3.80 7.61 0.06 99% 99% Alarm latency [0 threads]
+ 4.46 3.80 7.88 0.27 71% 24% Alarm latency [2 threads]
+ 16.06 13.59 26.36 1.05 54% 10% Alarm latency [many threads]
+ 6.67 6.52 22.83 0.29 98% 98% Alarm -&#62; thread resume latency
+
+ 1.89 0.82 9.78 0.00 Clock/interrupt latency
+
+ 2.17 1.09 7.34 0.00 Clock DSR latency
+
+ 11 0 316 (main stack: 744) Thread stack used (1120 total)
+All done, main stack : stack used 744 size 2400
+All done : Interrupt stack used 288 size 4096
+All done : Idlethread stack used 268 size 2048
+
+Timing complete - 30210 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+ </LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-arm-ep7211">
+<TITLE>Board: Cirrus Logic EDB7111-2 Development Board</TITLE>
+<SECT2>
+<TITLE>CPU : Cirrus Logic EP7211 73MHz</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">Board: Cirrus Logic EDB7111-2 Development Board
+
+CPU : Cirrus Logic EP7211 73MHz
+
+
+
+Startup, main stack : stack used 404 size 2400
+Startup : Interrupt stack used 136 size 4096
+Startup : Idlethread stack used 88 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 0 'ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 356.69 microseconds (182 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 64
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 22.71 17.58 37.11 3.07 46% 34% Create thread
+ 4.36 3.91 5.86 0.70 76% 76% Yield thread [all suspended]
+ 4.24 3.91 7.81 0.56 84% 84% Suspend [suspended] thread
+ 4.09 1.95 7.81 0.45 85% 3% Resume thread
+ 5.31 3.91 11.72 0.92 65% 32% Set priority
+ 2.11 1.95 3.91 0.28 92% 92% Get priority
+ 11.54 9.77 25.39 0.99 62% 28% Kill [suspended] thread
+ 4.46 3.91 9.77 0.82 75% 75% Yield [no other] thread
+ 7.57 5.86 13.67 0.69 75% 20% Resume [suspended low prio] thread
+ 3.94 1.95 5.86 0.18 92% 3% Resume [runnable low prio] thread
+ 7.02 5.86 13.67 1.05 53% 45% Suspend [runnable] thread
+ 4.42 3.91 9.77 0.79 76% 76% Yield [only low prio] thread
+ 4.24 1.95 5.86 0.61 79% 1% Suspend [runnable-&#62;not runnable]
+ 11.29 9.77 27.34 1.14 57% 37% Kill [runnable] thread
+ 6.29 3.91 11.72 0.84 71% 4% Destroy [dead] thread
+ 13.52 11.72 31.25 0.90 70% 25% Destroy [runnable] thread
+ 24.50 21.48 42.97 1.69 79% 12% Resume [high priority] thread
+ 8.79 7.81 19.53 1.05 99% 53% Thread switch
+
+ 1.66 0.00 3.91 0.52 83% 15% Scheduler lock
+ 2.59 1.95 3.91 0.86 67% 67% Scheduler unlock [0 threads]
+ 2.62 1.95 3.91 0.88 65% 65% Scheduler unlock [1 suspended]
+ 2.61 1.95 3.91 0.87 66% 66% Scheduler unlock [many suspended]
+ 2.58 1.95 3.91 0.85 67% 67% Scheduler unlock [many low prio]
+
+ 2.69 1.95 5.86 0.96 65% 65% Init mutex
+ 4.88 3.91 9.77 1.10 96% 56% Lock [unlocked] mutex
+ 4.64 3.91 11.72 1.05 71% 71% Unlock [locked] mutex
+ 3.97 1.95 7.81 0.47 81% 9% Trylock [unlocked] mutex
+ 3.48 1.95 3.91 0.67 78% 21% Trylock [locked] mutex
+ 1.77 0.00 3.91 0.44 84% 12% Destroy mutex
+ 31.92 29.30 42.97 1.65 71% 18% Unlock/Lock mutex
+
+ 4.09 3.91 9.77 0.35 96% 96% Create mbox
+ 1.83 0.00 3.91 0.34 87% 9% Peek [empty] mbox
+ 5.31 3.91 9.77 0.96 62% 34% Put [first] mbox
+ 1.59 0.00 1.95 0.60 81% 18% Peek [1 msg] mbox
+ 5.19 3.91 9.77 1.04 56% 40% Put [second] mbox
+ 1.65 0.00 3.91 0.62 78% 18% Peek [2 msgs] mbox
+ 5.43 3.91 9.77 0.86 68% 28% Get [first] mbox
+ 5.31 3.91 7.81 0.96 59% 34% Get [second] mbox
+ 4.76 3.91 9.77 1.07 62% 62% Tryput [first] mbox
+ 4.82 1.95 9.77 1.15 93% 3% Peek item [non-empty] mbox
+ 5.55 3.91 11.72 0.82 71% 25% Tryget [non-empty] mbox
+ 3.97 1.95 7.81 0.59 75% 12% Peek item [empty] mbox
+ 4.33 3.91 7.81 0.69 81% 81% Tryget [empty] mbox
+ 1.59 0.00 3.91 0.79 68% 25% Waiting to get mbox
+ 1.71 0.00 3.91 0.53 81% 15% Waiting to put mbox
+ 5.25 3.91 9.77 1.01 59% 37% Delete mbox
+ 17.82 15.63 29.30 1.14 65% 18% Put/Get mbox
+
+ 2.69 1.95 5.86 0.96 65% 65% Init semaphore
+ 3.78 1.95 7.81 0.46 84% 12% Post [0] semaphore
+ 4.27 3.91 7.81 0.62 84% 84% Wait [1] semaphore
+ 3.72 1.95 7.81 0.66 75% 18% Trywait [0] semaphore
+ 3.29 1.95 5.86 0.92 62% 34% Trywait [1] semaphore
+ 2.32 1.95 3.91 0.59 81% 81% Peek semaphore
+ 1.89 0.00 3.91 0.24 90% 6% Destroy semaphore
+ 15.75 13.67 29.30 1.07 68% 21% Post/Wait semaphore
+
+ 2.69 1.95 5.86 0.96 65% 65% Create counter
+ 1.83 0.00 1.95 0.23 93% 6% Get counter value
+ 1.53 0.00 3.91 0.76 71% 25% Set counter value
+ 4.82 3.91 5.86 0.97 53% 53% Tick counter
+ 1.89 0.00 1.95 0.12 96% 3% Delete counter
+
+ 3.78 1.95 7.81 0.46 84% 12% Create alarm
+ 7.99 5.86 15.63 0.70 81% 9% Initialize alarm
+ 1.71 0.00 1.95 0.43 87% 12% Disable alarm
+ 7.14 5.86 11.72 1.04 56% 40% Enable alarm
+ 2.50 1.95 3.91 0.79 71% 71% Delete alarm
+ 4.94 3.91 7.81 1.04 96% 50% Tick counter [1 alarm]
+ 19.47 17.58 23.44 0.36 87% 9% Tick counter [many alarms]
+ 7.63 5.86 11.72 0.55 81% 15% Tick &#38; fire counter [1 alarm]
+ 99.06 97.66 105.47 1.05 59% 37% Tick &#38; fire counters [&#62;1 together]
+ 22.15 21.48 27.34 0.96 71% 71% Tick &#38; fire counters [&#62;1 separately]
+ 359.16 357.42 378.91 0.87 71% 25% Alarm latency [0 threads]
+ 364.03 357.42 402.34 3.03 58% 15% Alarm latency [2 threads]
+ 408.25 402.34 416.02 2.89 53% 24% Alarm latency [many threads]
+ 381.16 376.95 492.19 2.48 95% 46% Alarm -&#62; thread resume latency
+
+ 9.79 5.86 19.53 0.00 Clock/interrupt latency
+
+ 12.13 5.86 31.25 0.00 Clock DSR latency
+
+ 12 0 316 (main stack: 752) Thread stack used (1120 total)
+All done, main stack : stack used 752 size 2400
+All done : Interrupt stack used 288 size 4096
+All done : Idlethread stack used 276 size 2048
+
+Timing complete - 30450 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+
+ </LITERALLAYOUT>
+</SECT2>
+<SECT2>
+<TITLE>CPU : Cirrus Logic EP7212 73MHz</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">Board: Cirrus Logic EDB7111-2 Development Board
+
+CPU : Cirrus Logic EP7212 73MHz
+
+
+
+Startup, main stack : stack used 404 size 2400
+Startup : Interrupt stack used 136 size 4096
+Startup : Idlethread stack used 88 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 0 'ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 356.32 microseconds (182 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 64
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 22.43 15.63 33.20 3.02 68% 18% Create thread
+ 4.48 3.91 5.86 0.81 70% 70% Yield thread [all suspended]
+ 4.42 3.91 7.81 0.78 75% 75% Suspend [suspended] thread
+ 4.12 1.95 5.86 0.49 82% 3% Resume thread
+ 5.62 3.91 11.72 0.64 78% 18% Set priority
+ 2.17 1.95 3.91 0.38 89% 89% Get priority
+ 11.54 9.77 27.34 0.88 70% 25% Kill [suspended] thread
+ 4.64 3.91 9.77 0.96 65% 65% Yield [no other] thread
+ 7.51 5.86 15.63 0.72 76% 21% Resume [suspended low prio] thread
+ 3.88 1.95 9.77 0.42 82% 10% Resume [runnable low prio] thread
+ 7.14 5.86 13.67 1.00 59% 39% Suspend [runnable] thread
+ 4.52 3.91 7.81 0.86 70% 70% Yield [only low prio] thread
+ 4.15 1.95 7.81 0.49 85% 1% Suspend [runnable-&#62;not runnable]
+ 11.26 9.77 27.34 1.17 56% 39% Kill [runnable] thread
+ 6.22 3.91 13.67 0.88 70% 7% Destroy [dead] thread
+ 13.64 11.72 33.20 1.02 64% 26% Destroy [runnable] thread
+ 24.17 21.48 41.02 1.49 82% 12% Resume [high priority] thread
+ 8.80 7.81 21.48 1.08 98% 54% Thread switch
+
+ 1.60 0.00 1.95 0.58 82% 17% Scheduler lock
+ 2.61 1.95 3.91 0.87 66% 66% Scheduler unlock [0 threads]
+ 2.59 1.95 3.91 0.86 67% 67% Scheduler unlock [1 suspended]
+ 2.61 1.95 3.91 0.87 66% 66% Scheduler unlock [many suspended]
+ 2.59 1.95 3.91 0.86 67% 67% Scheduler unlock [many low prio]
+
+ 2.62 1.95 3.91 0.88 65% 65% Init mutex
+ 4.82 3.91 9.77 1.09 96% 59% Lock [unlocked] mutex
+ 4.39 3.91 9.77 0.79 81% 81% Unlock [locked] mutex
+ 3.84 1.95 7.81 0.36 87% 9% Trylock [unlocked] mutex
+ 3.54 1.95 5.86 0.69 75% 21% Trylock [locked] mutex
+ 1.83 0.00 3.91 0.34 87% 9% Destroy mutex
+ 34.61 31.25 46.88 1.68 78% 9% Unlock/Lock mutex
+
+ 3.97 1.95 7.81 0.24 93% 3% Create mbox
+ 1.83 0.00 3.91 0.34 87% 9% Peek [empty] mbox
+ 4.76 3.91 9.77 1.07 62% 62% Put [first] mbox
+ 1.71 0.00 3.91 0.64 75% 18% Peek [1 msg] mbox
+ 5.00 3.91 9.77 1.10 96% 50% Put [second] mbox
+ 1.65 0.00 1.95 0.52 84% 15% Peek [2 msgs] mbox
+ 5.31 3.91 11.72 1.05 59% 37% Get [first] mbox
+ 5.13 3.91 7.81 0.99 56% 40% Get [second] mbox
+ 4.76 3.91 11.72 1.12 96% 65% Tryput [first] mbox
+ 4.46 3.91 7.81 0.82 75% 75% Peek item [non-empty] mbox
+ 5.55 3.91 9.77 0.82 68% 25% Tryget [non-empty] mbox
+ 4.03 1.95 7.81 0.58 78% 9% Peek item [empty] mbox
+ 4.27 3.91 5.86 0.59 81% 81% Tryget [empty] mbox
+ 1.77 0.00 3.91 0.44 84% 12% Waiting to get mbox
+ 1.59 0.00 1.95 0.60 81% 18% Waiting to put mbox
+ 5.37 3.91 9.77 0.91 65% 31% Delete mbox
+ 16.66 13.67 27.34 1.42 90% 3% Put/Get mbox
+
+ 2.62 1.95 5.86 0.92 68% 68% Init semaphore
+ 3.84 1.95 7.81 0.47 81% 12% Post [0] semaphore
+ 4.21 3.91 7.81 0.53 87% 87% Wait [1] semaphore
+ 3.48 1.95 5.86 0.76 71% 25% Trywait [0] semaphore
+ 3.60 1.95 5.86 0.62 78% 18% Trywait [1] semaphore
+ 2.26 1.95 5.86 0.53 87% 87% Peek semaphore
+ 1.89 0.00 1.95 0.12 96% 3% Destroy semaphore
+ 16.05 13.67 29.30 1.40 59% 18% Post/Wait semaphore
+
+ 2.38 1.95 3.91 0.67 78% 78% Create counter
+ 2.01 0.00 3.91 0.35 84% 6% Get counter value
+ 1.89 0.00 3.91 0.24 90% 6% Set counter value
+ 4.58 3.91 5.86 0.88 65% 65% Tick counter
+ 1.71 0.00 1.95 0.43 87% 12% Delete counter
+
+ 3.84 1.95 7.81 0.36 87% 9% Create alarm
+ 7.99 5.86 15.63 0.47 93% 3% Initialize alarm
+ 2.01 0.00 3.91 0.35 84% 6% Disable alarm
+ 6.53 5.86 13.67 1.01 75% 75% Enable alarm
+ 2.32 1.95 3.91 0.59 81% 81% Delete alarm
+ 4.76 3.91 7.81 1.01 59% 59% Tick counter [1 alarm]
+ 19.53 17.58 23.44 0.24 90% 6% Tick counter [many alarms]
+ 7.57 5.86 13.67 0.75 75% 21% Tick &#38; fire counter [1 alarm]
+ 98.57 97.66 105.47 1.14 96% 62% Tick &#38; fire counters [&#62;1 together]
+ 22.15 21.48 27.34 0.96 71% 71% Tick &#38; fire counters [&#62;1 separately]
+ 359.18 357.42 384.77 1.10 65% 31% Alarm latency [0 threads]
+ 362.63 357.42 396.48 2.55 43% 27% Alarm latency [2 threads]
+ 408.22 402.34 416.02 2.73 55% 21% Alarm latency [many threads]
+ 378.63 375.00 494.14 2.56 93% 71% Alarm -&#62; thread resume latency
+
+ 9.78 5.86 19.53 0.00 Clock/interrupt latency
+
+ 12.21 5.86 31.25 0.00 Clock DSR latency
+
+ 12 0 316 (main stack: 752) Thread stack used (1120 total)
+All done, main stack : stack used 752 size 2400
+All done : Interrupt stack used 288 size 4096
+All done : Idlethread stack used 276 size 2048
+
+Timing complete - 30550 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+
+ </LITERALLAYOUT>
+</SECT2>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-arm-pid">
+<TITLE>Board: ARM PID Evaluation Board</TITLE>
+<SECT2>
+<TITLE>CPU : ARM 7TDMI 20 MHz</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">Board: ARM PID Evaluation Board
+
+CPU : ARM 7TDMI 20 MHz
+
+
+
+Startup, main stack : stack used 404 size 2400
+Startup : Interrupt stack used 136 size 4096
+Startup : Idlethread stack used 84 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 6 'ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 120.74 microseconds (150 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 50
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 99.01 68.00 129.60 15.62 50% 26% Create thread
+ 21.60 21.60 21.60 0.00 100% 100% Yield thread [all suspended]
+ 15.65 15.20 16.00 0.39 56% 44% Suspend [suspended] thread
+ 15.79 15.20 16.00 0.31 74% 26% Resume thread
+ 23.65 23.20 24.00 0.39 56% 44% Set priority
+ 2.26 1.60 2.40 0.24 82% 18% Get priority
+ 51.39 51.20 52.00 0.29 76% 76% Kill [suspended] thread
+ 21.60 21.60 21.60 0.00 100% 100% Yield [no other] thread
+ 29.47 28.00 29.60 0.22 86% 2% Resume [suspended low prio] thread
+ 15.60 15.20 16.00 0.40 100% 50% Resume [runnable low prio] thread
+ 27.73 24.00 28.00 0.40 74% 2% Suspend [runnable] thread
+ 21.60 21.60 21.60 0.00 100% 100% Yield [only low prio] thread
+ 15.65 15.20 16.00 0.39 56% 44% Suspend [runnable-&#62;not runnable]
+ 51.39 51.20 52.00 0.29 76% 76% Kill [runnable] thread
+ 27.66 27.20 28.80 0.41 54% 44% Destroy [dead] thread
+ 68.93 64.80 69.60 0.35 72% 2% Destroy [runnable] thread
+ 91.26 90.40 107.20 0.64 66% 32% Resume [high priority] thread
+ 49.14 48.80 49.60 0.39 57% 57% Thread switch
+
+ 2.20 1.60 2.40 0.30 75% 25% Scheduler lock
+ 10.20 9.60 10.40 0.30 75% 25% Scheduler unlock [0 threads]
+ 10.20 9.60 10.40 0.30 75% 25% Scheduler unlock [1 suspended]
+ 10.20 9.60 10.40 0.30 75% 25% Scheduler unlock [many suspended]
+ 10.20 9.60 10.40 0.30 75% 25% Scheduler unlock [many low prio]
+
+ 6.85 6.40 7.20 0.39 56% 43% Init mutex
+ 18.40 18.40 18.40 0.00 100% 100% Lock [unlocked] mutex
+ 19.57 19.20 20.00 0.40 53% 53% Unlock [locked] mutex
+ 16.55 16.00 16.80 0.34 68% 31% Trylock [unlocked] mutex
+ 14.55 14.40 15.20 0.24 81% 81% Trylock [locked] mutex
+ 3.55 3.20 4.00 0.39 56% 56% Destroy mutex
+ 119.85 119.20 120.00 0.24 81% 18% Unlock/Lock mutex
+
+ 12.85 12.80 13.60 0.09 93% 93% Create mbox
+ 1.65 1.60 2.40 0.09 93% 93% Peek [empty] mbox
+ 20.70 20.00 20.80 0.17 87% 12% Put [first] mbox
+ 1.65 1.60 2.40 0.09 93% 93% Peek [1 msg] mbox
+ 20.70 20.00 20.80 0.17 87% 12% Put [second] mbox
+ 1.65 1.60 2.40 0.09 93% 93% Peek [2 msgs] mbox
+ 20.85 20.80 21.60 0.09 93% 93% Get [first] mbox
+ 20.85 20.80 21.60 0.09 93% 93% Get [second] mbox
+ 19.90 19.20 20.00 0.17 87% 12% Tryput [first] mbox
+ 17.60 17.60 17.60 0.00 100% 100% Peek item [non-empty] mbox
+ 20.90 20.80 21.60 0.17 87% 87% Tryget [non-empty] mbox
+ 16.80 16.80 16.80 0.00 100% 100% Peek item [empty] mbox
+ 17.65 17.60 18.40 0.09 93% 93% Tryget [empty] mbox
+ 1.85 1.60 2.40 0.34 68% 68% Waiting to get mbox
+ 1.85 1.60 2.40 0.34 68% 68% Waiting to put mbox
+ 19.40 19.20 20.00 0.30 75% 75% Delete mbox
+ 65.05 64.80 65.60 0.34 68% 68% Put/Get mbox
+
+ 7.05 6.40 7.20 0.24 81% 18% Init semaphore
+ 15.55 15.20 16.00 0.39 56% 56% Post [0] semaphore
+ 17.35 16.80 17.60 0.34 68% 31% Wait [1] semaphore
+ 14.60 14.40 15.20 0.30 75% 75% Trywait [0] semaphore
+ 14.20 13.60 14.40 0.30 75% 25% Trywait [1] semaphore
+ 4.55 4.00 4.80 0.34 68% 31% Peek semaphore
+ 3.75 3.20 4.00 0.34 68% 31% Destroy semaphore
+ 70.85 70.40 71.20 0.39 56% 43% Post/Wait semaphore
+
+ 6.05 5.60 6.40 0.39 56% 43% Create counter
+ 2.25 1.60 2.40 0.24 81% 18% Get counter value
+ 2.25 1.60 2.40 0.24 81% 18% Set counter value
+ 19.70 19.20 20.00 0.37 62% 37% Tick counter
+ 3.45 3.20 4.00 0.34 68% 68% Delete counter
+
+ 9.05 8.80 9.60 0.34 68% 68% Create alarm
+ 29.60 29.60 29.60 0.00 100% 100% Initialize alarm
+ 2.15 1.60 2.40 0.34 68% 31% Disable alarm
+ 29.35 28.80 29.60 0.34 68% 31% Enable alarm
+ 5.10 4.80 5.60 0.37 62% 62% Delete alarm
+ 23.20 23.20 23.20 0.00 100% 100% Tick counter [1 alarm]
+ 138.00 137.60 138.40 0.40 100% 50% Tick counter [many alarms]
+ 40.40 40.00 40.80 0.40 100% 50% Tick &#38; fire counter [1 alarm]
+ 704.25 697.60 804.00 12.47 93% 93% Tick &#38; fire counters [&#62;1 together]
+ 155.20 155.20 155.20 0.00 100% 100% Tick &#38; fire counters [&#62;1 separately]
+ 105.20 104.80 151.20 0.76 99% 94% Alarm latency [0 threads]
+ 117.57 104.80 149.60 7.13 57% 25% Alarm latency [2 threads]
+ 117.49 104.80 148.80 7.10 58% 26% Alarm latency [many threads]
+ 192.59 177.60 316.00 1.93 98% 0% Alarm -&#62; thread resume latency
+
+ 22.10 21.60 24.00 0.00 Clock/interrupt latency
+
+ 38.69 32.80 61.60 0.00 Clock DSR latency
+
+ 297 276 316 (main stack: 752) Thread stack used (1120 total)
+All done, main stack : stack used 752 size 2400
+All done : Interrupt stack used 288 size 4096
+All done : Idlethread stack used 272 size 2048
+
+Timing complete - 30350 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+
+ </LITERALLAYOUT>
+</SECT2>
+<SECT2>
+<TITLE>CPU : ARM 920T 20 MHz</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">
+
+Board: ARM PID Evaluation Board
+
+CPU : ARM 920T 20 MHz
+
+
+Startup, main stack : stack used 404 size 2400
+Startup : Interrupt stack used 136 size 4096
+Startup : Idlethread stack used 84 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 15 'ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 291.41 microseconds (364 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 50
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 257.78 168.00 568.00 48.70 56% 28% Create thread
+ 50.21 49.60 50.40 0.29 76% 24% Yield thread [all suspended]
+ 36.26 36.00 36.80 0.35 68% 68% Suspend [suspended] thread
+ 37.20 36.80 37.60 0.40 100% 50% Resume thread
+ 56.24 56.00 56.80 0.34 70% 70% Set priority
+ 5.20 4.80 5.60 0.40 100% 50% Get priority
+ 122.75 122.40 123.20 0.39 56% 56% Kill [suspended] thread
+ 50.19 49.60 50.40 0.31 74% 26% Yield [no other] thread
+ 69.49 66.40 69.60 0.21 92% 2% Resume [suspended low prio] thread
+ 37.01 36.80 37.60 0.31 74% 74% Resume [runnable low prio] thread
+ 64.75 55.20 65.60 0.38 80% 2% Suspend [runnable] thread
+ 50.19 49.60 50.40 0.31 74% 26% Yield [only low prio] thread
+ 36.24 36.00 36.80 0.34 70% 70% Suspend [runnable-&#62;not runnable]
+ 122.75 122.40 123.20 0.39 56% 56% Kill [runnable] thread
+ 67.76 67.20 68.00 0.34 70% 30% Destroy [dead] thread
+ 167.07 158.40 168.00 0.35 92% 2% Destroy [runnable] thread
+ 213.49 212.00 249.60 1.46 84% 90% Resume [high priority] thread
+ 122.81 120.00 389.60 4.17 99% 99% Thread switch
+
+ 4.70 4.00 4.80 0.17 87% 12% Scheduler lock
+ 23.70 23.20 24.00 0.37 62% 37% Scheduler unlock [0 threads]
+ 23.60 23.20 24.00 0.40 100% 50% Scheduler unlock [1 suspended]
+ 23.70 23.20 24.00 0.37 62% 37% Scheduler unlock [many suspended]
+ 23.60 23.20 24.00 0.40 100% 50% Scheduler unlock [many low prio]
+
+ 15.65 15.20 16.00 0.39 56% 43% Init mutex
+ 42.40 42.40 42.40 0.00 100% 100% Lock [unlocked] mutex
+ 45.37 44.80 46.40 0.36 65% 31% Unlock [locked] mutex
+ 39.20 39.20 39.20 0.00 100% 100% Trylock [unlocked] mutex
+ 34.45 34.40 35.20 0.09 93% 93% Trylock [locked] mutex
+ 8.00 8.00 8.00 0.00 100% 100% Destroy mutex
+ 284.42 284.00 284.80 0.40 53% 46% Unlock/Lock mutex
+
+ 29.40 28.80 29.60 0.30 75% 25% Create mbox
+ 3.35 3.20 4.00 0.24 81% 81% Peek [empty] mbox
+ 49.35 48.80 49.60 0.34 68% 31% Put [first] mbox
+ 3.35 3.20 4.00 0.24 81% 81% Peek [1 msg] mbox
+ 49.35 48.80 49.60 0.34 68% 31% Put [second] mbox
+ 3.35 3.20 4.00 0.24 81% 81% Peek [2 msgs] mbox
+ 49.15 48.80 49.60 0.39 56% 56% Get [first] mbox
+ 49.15 48.80 49.60 0.39 56% 56% Get [second] mbox
+ 47.80 47.20 48.00 0.30 75% 25% Tryput [first] mbox
+ 41.40 40.80 41.60 0.30 75% 25% Peek item [non-empty] mbox
+ 49.40 48.80 49.60 0.30 75% 25% Tryget [non-empty] mbox
+ 40.15 40.00 40.80 0.24 81% 81% Peek item [empty] mbox
+ 40.95 40.80 41.60 0.24 81% 81% Tryget [empty] mbox
+ 4.05 4.00 4.80 0.09 93% 93% Waiting to get mbox
+ 4.05 4.00 4.80 0.09 93% 93% Waiting to put mbox
+ 45.60 45.60 45.60 0.00 100% 100% Delete mbox
+ 153.27 152.80 153.60 0.39 59% 40% Put/Get mbox
+
+ 16.80 16.80 16.80 0.00 100% 100% Init semaphore
+ 36.60 36.00 36.80 0.30 75% 25% Post [0] semaphore
+ 39.60 39.20 40.00 0.40 100% 50% Wait [1] semaphore
+ 34.80 34.40 35.20 0.40 100% 50% Trywait [0] semaphore
+ 33.35 32.80 33.60 0.34 68% 31% Trywait [1] semaphore
+ 10.30 9.60 10.40 0.17 87% 12% Peek semaphore
+ 8.80 8.80 8.80 0.00 100% 100% Destroy semaphore
+ 166.92 166.40 167.20 0.36 65% 34% Post/Wait semaphore
+
+ 13.60 13.60 13.60 0.00 100% 100% Create counter
+ 4.85 4.80 5.60 0.09 93% 93% Get counter value
+ 4.80 4.80 4.80 0.00 100% 100% Set counter value
+ 45.25 44.80 45.60 0.39 56% 43% Tick counter
+ 7.75 7.20 8.00 0.34 68% 31% Delete counter
+
+ 20.80 20.80 20.80 0.00 100% 100% Create alarm
+ 69.30 68.80 69.60 0.37 62% 37% Initialize alarm
+ 4.80 4.80 4.80 0.00 100% 100% Disable alarm
+ 67.35 67.20 68.00 0.24 81% 81% Enable alarm
+ 11.80 11.20 12.00 0.30 75% 25% Delete alarm
+ 54.80 54.40 55.20 0.40 100% 50% Tick counter [1 alarm]
+ 372.35 363.20 652.80 17.53 96% 96% Tick counter [many alarms]
+ 95.50 95.20 96.00 0.37 62% 62% Tick &#38; fire counter [1 alarm]
+ 1757.92 1707.20 1996.80 81.43 81% 81% Tick &#38; fire counters [&#62;1 together]
+ 404.37 404.00 404.80 0.40 53% 53% Tick &#38; fire counters [&#62;1 separately]
+ 256.57 254.40 395.20 2.17 98% 97% Alarm latency [0 threads]
+ 296.60 255.20 359.20 23.53 53% 31% Alarm latency [2 threads]
+ 307.49 265.60 357.60 27.52 53% 53% Alarm latency [many threads]
+ 467.04 432.00 788.80 5.03 97% 1% Alarm -&#62; thread resume latency
+
+ 55.63 54.40 60.80 0.00 Clock/interrupt latency
+
+ 101.23 80.80 1433.60 0.00 Clock DSR latency
+
+ 316 316 316 (main stack: 752) Thread stack used (1120 total)
+All done, main stack : stack used 752 size 2400
+All done : Interrupt stack used 288 size 4096
+All done : Idlethread stack used 272 size 2048
+
+Timing complete - 30780 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+ </LITERALLAYOUT>
+</SECT2>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-arm-iq80310">
+<TITLE>Board: Intel IQ80310 XScale Development Kit</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">Board: Intel IQ80310 XScale Development Kit
+
+CPU: Intel XScale 600MHz
+
+
+Startup, main stack : stack used 388 size 2400
+Startup : Interrupt stack used 148 size 4096
+Startup : Idlethread stack used 76 size 1120
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 73 'ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 12.11 microseconds (399 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 64
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 6.53 5.48 8.55 0.50 53% 23% Create thread
+ 0.37 0.03 3.24 0.18 87% 1% Yield thread [all suspended]
+ 0.24 0.00 2.06 0.12 87% 1% Suspend [suspended] thread
+ 0.25 0.00 0.73 0.06 71% 1% Resume thread
+ 0.36 0.09 0.82 0.10 89% 1% Set priority
+ 0.03 0.00 0.42 0.05 90% 90% Get priority
+ 1.07 0.52 6.39 0.18 92% 1% Kill [suspended] thread
+ 0.33 0.06 0.91 0.08 78% 3% Yield [no other] thread
+ 0.55 0.03 1.06 0.09 85% 1% Resume [suspended low prio] thread
+ 0.28 0.00 1.79 0.11 84% 4% Resume [runnable low prio] thread
+ 0.43 0.00 1.00 0.12 76% 1% Suspend [runnable] thread
+ 0.31 0.00 1.24 0.09 82% 4% Yield [only low prio] thread
+ 0.21 0.00 0.42 0.04 73% 1% Suspend [runnable-&#62;not runnable]
+ 1.00 0.88 1.45 0.04 78% 4% Kill [runnable] thread
+ 0.59 0.42 3.97 0.13 81% 87% Destroy [dead] thread
+ 1.43 1.27 1.94 0.07 78% 7% Destroy [runnable] thread
+ 3.12 2.58 5.09 0.33 56% 34% Resume [high priority] thread
+ 0.87 0.36 1.39 0.07 86% 0% Thread switch
+
+ 0.15 0.00 1.39 0.21 81% 81% Scheduler lock
+ 0.16 0.00 0.64 0.08 85% 7% Scheduler unlock [0 threads]
+ 0.16 0.00 0.64 0.08 75% 8% Scheduler unlock [1 suspended]
+ 0.16 0.00 0.70 0.08 78% 6% Scheduler unlock [many suspended]
+ 0.16 0.00 0.64 0.07 81% 4% Scheduler unlock [many low prio]
+
+ 0.45 0.00 1.39 0.34 56% 46% Init mutex
+ 0.43 0.18 3.27 0.23 87% 87% Lock [unlocked] mutex
+ 0.48 0.09 3.88 0.26 84% 71% Unlock [locked] mutex
+ 0.35 0.21 2.24 0.21 87% 84% Trylock [unlocked] mutex
+ 0.26 0.00 0.67 0.13 78% 9% Trylock [locked] mutex
+ 0.21 0.00 1.27 0.24 78% 75% Destroy mutex
+ 2.58 2.09 3.09 0.13 75% 9% Unlock/Lock mutex
+
+ 0.99 0.21 2.48 0.41 65% 28% Create mbox
+ 0.04 0.00 0.39 0.07 90% 87% Peek [empty] mbox
+ 0.47 0.27 3.48 0.29 90% 78% Put [first] mbox
+ 0.02 0.00 0.39 0.03 90% 90% Peek [1 msg] mbox
+ 0.29 0.15 0.58 0.04 68% 3% Put [second] mbox
+ 0.02 0.00 0.45 0.04 93% 93% Peek [2 msgs] mbox
+ 0.48 0.21 3.67 0.26 84% 87% Get [first] mbox
+ 0.35 0.09 0.82 0.11 75% 3% Get [second] mbox
+ 0.50 0.21 3.18 0.33 90% 68% Tryput [first] mbox
+ 0.39 0.15 1.39 0.19 78% 68% Peek item [non-empty] mbox
+ 0.43 0.18 3.33 0.23 87% 90% Tryget [non-empty] mbox
+ 0.28 0.03 0.79 0.06 68% 3% Peek item [empty] mbox
+ 0.28 0.21 0.58 0.05 71% 65% Tryget [empty] mbox
+ 0.01 0.00 0.36 0.02 96% 90% Waiting to get mbox
+ 0.05 0.00 0.45 0.09 87% 84% Waiting to put mbox
+ 0.42 0.09 2.88 0.20 84% 12% Delete mbox
+ 1.39 1.27 2.39 0.14 87% 87% Put/Get mbox
+
+ 0.35 0.00 1.36 0.45 75% 68% Init semaphore
+ 0.19 0.00 0.45 0.04 81% 3% Post [0] semaphore
+ 0.25 0.21 0.88 0.06 84% 81% Wait [1] semaphore
+ 0.32 0.06 1.79 0.21 78% 68% Trywait [0] semaphore
+ 0.20 0.00 0.52 0.06 62% 3% Trywait [1] semaphore
+ 0.07 0.00 0.45 0.10 84% 81% Peek semaphore
+ 0.06 0.00 0.52 0.06 71% 78% Destroy semaphore
+ 1.45 1.42 1.79 0.04 87% 87% Post/Wait semaphore
+
+ 0.70 0.00 2.88 0.47 43% 34% Create counter
+ 0.05 0.00 0.42 0.09 87% 84% Get counter value
+ 0.02 0.00 0.45 0.04 93% 93% Set counter value
+ 0.38 0.12 0.58 0.06 59% 3% Tick counter
+ 0.03 0.00 0.48 0.05 93% 78% Delete counter
+
+ 1.10 0.39 4.30 0.47 62% 53% Create alarm
+ 0.58 0.03 3.12 0.18 87% 3% Initialize alarm
+ 0.04 0.00 0.42 0.07 90% 90% Disable alarm
+ 0.54 0.36 1.36 0.12 84% 43% Enable alarm
+ 0.03 0.00 0.70 0.06 84% 84% Delete alarm
+ 0.50 0.24 0.97 0.08 84% 6% Tick counter [1 alarm]
+ 5.30 5.12 5.97 0.14 84% 75% Tick counter [many alarms]
+ 0.82 0.64 1.36 0.11 78% 43% Tick &#38; fire counter [1 alarm]
+ 14.13 13.85 14.55 0.09 78% 3% Tick &#38; fire counters [&#62;1 together]
+ 5.56 5.45 6.00 0.09 78% 71% Tick &#38; fire counters [&#62;1 separately]
+ 9.69 9.45 12.52 0.22 64% 71% Alarm latency [0 threads]
+ 9.98 9.48 12.76 0.23 69% 14% Alarm latency [2 threads]
+ 10.38 9.48 24.67 0.59 74% 45% Alarm latency [many threads]
+ 11.72 11.30 21.33 0.32 81% 58% Alarm -&#62; thread resume latency
+
+ 1.87 1.82 10.42 0.00 Clock/interrupt latency
+
+ 3.02 2.58 7.67 0.00 Clock DSR latency
+
+ 9 0 260 (main stack: 776) Thread stack used (1120 total)
+All done, main stack : stack used 776 size 2400
+All done : Interrupt stack used 268 size 4096
+All done : Idlethread stack used 244 size 1120
+
+Timing complete - 30300 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+
+ </LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-tx39-jmr3904">
+<TITLE>Board: Toshiba JMR3904 Evaluation Board</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">
+
+Board: Toshiba JMR3904 Evaluation Board
+
+CPU : TMPR3904F 50MHz
+
+
+eCOS Kernel Timings
+Note: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 0 'ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 29.68 microseconds (45 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 24
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 13.62 11.72 27.99 1.51 79% 54% Create thread
+ 2.77 2.60 3.91 0.26 79% 79% Yield thread [all suspended]
+ 3.31 2.60 6.51 0.27 83% 12% Suspend [suspended] thread
+ 2.58 1.95 7.81 0.47 58% 37% Resume thread
+ 4.94 4.56 11.07 0.60 95% 79% Set priority
+ 0.71 0.65 1.95 0.10 95% 95% Get priority
+ 14.97 14.32 25.39 0.87 95% 95% Kill [suspended] thread
+ 2.25 1.95 9.11 0.57 95% 95% Yield [no other] thread
+ 7.27 6.51 12.37 0.42 79% 16% Resume [suspended low prio] thread
+ 2.28 1.95 7.16 0.51 95% 79% Resume [runnable low prio] thread
+ 4.31 3.26 12.37 0.75 87% 79% Suspend [runnable] thread
+ 2.17 1.95 7.16 0.42 95% 95% Yield [only low prio] thread
+ 2.39 1.95 6.51 0.51 95% 58% Suspend [runnable-&#62;not runnable]
+ 13.43 12.37 22.79 0.80 91% 91% Kill [runnable] thread
+ 22.30 20.83 37.76 1.76 91% 91% Resume [high priority] thread
+ 4.62 4.56 11.07 0.13 98% 98% Thread switch
+
+ 1.51 1.30 2.60 0.29 68% 68% Scheduler lock
+ 2.36 1.95 3.26 0.31 61% 37% Scheduler unlock [0 threads]
+ 2.39 1.95 5.21 0.32 62% 36% Scheduler unlock [1 suspended]
+ 2.38 1.95 4.56 0.32 61% 37% Scheduler unlock [many suspended]
+ 2.38 1.95 5.21 0.32 61% 37% Scheduler unlock [many low prio]
+
+ 0.90 0.65 3.26 0.35 71% 71% Init mutex
+ 2.48 1.95 8.46 0.50 50% 46% Lock [unlocked] mutex
+ 2.83 2.60 9.11 0.42 93% 93% Unlock [locked] mutex
+ 2.30 1.95 6.51 0.45 96% 65% Trylock [unlocked] mutex
+ 1.99 1.30 5.86 0.24 84% 12% Trylock [locked] mutex
+ 0.04 0.00 1.30 0.08 96% 96% Destroy mutex
+ 42.40 42.32 44.92 0.16 96% 96% Unlock/Lock mutex
+
+ 1.44 1.30 5.86 0.28 96% 96% Create mbox
+ 0.51 0.00 1.30 0.25 71% 25% Peek [empty] mbox
+ 2.93 2.60 9.11 0.51 96% 78% Put [first] mbox
+ 0.51 0.00 1.30 0.25 71% 25% Peek [1 msg] mbox
+ 4.19 3.91 5.21 0.34 59% 59% Put [second] mbox
+ 0.45 0.00 0.65 0.28 68% 31% Peek [2 msgs] mbox
+ 3.28 2.60 10.42 0.45 65% 31% Get [first] mbox
+ 3.34 2.60 9.77 0.40 78% 18% Get [second] mbox
+ 2.69 1.95 9.11 0.40 78% 18% Tryput [first] mbox
+ 2.75 1.95 7.81 0.32 93% 3% Peek item [non-empty] mbox
+ 3.15 2.60 9.11 0.48 53% 43% Tryget [non-empty] mbox
+ 2.22 1.95 6.51 0.41 96% 78% Peek item [empty] mbox
+ 2.40 1.95 5.86 0.42 50% 46% Tryget [empty] mbox
+ 0.47 0.00 0.65 0.26 71% 28% Waiting to get mbox
+ 0.59 0.00 1.30 0.15 84% 12% Waiting to put mbox
+ 4.01 3.26 10.42 0.40 81% 15% Delete mbox
+ 26.18 26.04 30.60 0.28 96% 96% Put/Get mbox
+
+ 0.92 0.65 3.91 0.38 71% 71% Init semaphore
+ 2.24 1.95 6.51 0.43 96% 75% Post [0] semaphore
+ 2.32 1.95 7.16 0.48 96% 65% Wait [1] semaphore
+ 2.03 1.30 5.86 0.24 90% 6% Trywait [0] semaphore
+ 1.91 1.30 4.56 0.23 78% 18% Trywait [1] semaphore
+ 0.77 0.00 1.95 0.30 65% 9% Peek semaphore
+ 0.61 0.00 1.95 0.15 84% 12% Destroy semaphore
+ 22.62 22.14 30.60 0.61 96% 62% Post/Wait semaphore
+
+ 0.92 0.65 3.91 0.38 71% 71% Create counter
+ 0.69 0.65 1.95 0.08 96% 96% Get counter value
+ 0.41 0.00 1.30 0.33 56% 40% Set counter value
+ 3.21 2.60 5.86 0.27 71% 21% Tick counter
+ 0.65 0.00 3.26 0.16 84% 12% Delete counter
+
+ 1.57 1.30 4.56 0.38 71% 71% Create alarm
+ 4.52 3.91 13.02 0.57 50% 46% Initialize alarm
+ 0.61 0.00 1.95 0.15 84% 12% Disable alarm
+ 4.43 3.91 9.11 0.43 56% 40% Enable alarm
+ 0.87 0.65 2.60 0.32 71% 71% Delete alarm
+ 2.93 2.60 6.51 0.43 96% 65% Tick counter [1 alarm]
+ 14.83 14.32 22.79 0.60 96% 59% Tick counter [many alarms]
+ 4.88 4.56 11.07 0.51 96% 78% Tick &#38; fire counter [1 alarm]
+ 83.25 82.03 102.86 1.23 96% 93% Tick &#38; fire counters [&#62;1 together]
+ 17.58 16.93 27.34 0.61 50% 46% Tick &#38; fire counters [&#62;1 separately]
+ 26.18 24.74 40.36 0.30 97% 0% Alarm latency [0 threads]
+ 33.88 29.30 56.64 1.70 85% 6% Alarm latency [2 threads]
+ 36.37 29.30 61.20 3.25 53% 24% Alarm latency [many threads]
+
+ 7.85 6.51 14.97 0.00 Clock/interrupt latency
+
+Timing complete - 23540 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+
+ </LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-tx49-ref4955">
+<TITLE>Board: Toshiba REF 4955</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">
+
+Board: Toshiba REF 4955
+
+CPU : Toshiba TX4955 66MHz
+
+Startup, main stack : stack used 960 size 2936
+Startup : Interrupt stack used 168 size 4096
+Startup : Idlethread stack used 372 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 3 `ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 4.00 microseconds (264 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 64
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 11.21 9.58 14.11 0.95 48% 34% Create thread
+ 0.66 0.65 1.29 0.02 98% 98% Yield thread [all suspended]
+ 0.63 0.53 3.06 0.17 82% 82% Suspend [suspended] thread
+ 0.54 0.53 1.06 0.02 98% 98% Resume thread
+ 0.78 0.74 1.39 0.05 93% 93% Set priority
+ 0.05 0.05 0.36 0.01 98% 98% Get priority
+ 2.06 1.89 6.65 0.25 95% 79% Kill [suspended] thread
+ 0.65 0.65 0.68 0.00 98% 98% Yield [no other] thread
+ 1.15 1.02 3.03 0.20 81% 81% Resume [suspended low prio] thread
+ 0.54 0.52 1.18 0.03 96% 96% Resume [runnable low prio] thread
+ 0.94 0.88 1.27 0.01 95% 1% Suspend [runnable] thread
+ 0.65 0.65 0.68 0.00 98% 98% Yield [only low prio] thread
+ 0.54 0.53 0.86 0.01 98% 96% Suspend [runnable-&#62;not runnable]
+ 1.97 1.89 2.98 0.12 84% 84% Kill [runnable] thread
+ 1.03 0.92 4.94 0.17 89% 89% Destroy [dead] thread
+ 2.55 2.33 4.38 0.24 89% 70% Destroy [runnable] thread
+ 5.62 4.11 13.23 0.99 65% 40% Resume [high priority] thread
+ 1.84 1.83 2.79 0.02 98% 98% Thread switch
+
+ 0.12 0.02 0.65 0.15 74% 74% Scheduler lock
+ 0.35 0.35 0.35 0.00 100% 100% Scheduler unlock [0 threads]
+ 0.35 0.35 0.35 0.00 100% 100% Scheduler unlock [1 suspended]
+ 0.43 0.35 1.17 0.13 78% 78% Scheduler unlock [many suspended]
+ 0.45 0.35 1.17 0.15 75% 75% Scheduler unlock [many low prio]
+
+ 0.46 0.15 3.38 0.30 62% 50% Init mutex
+ 0.73 0.64 3.27 0.16 96% 96% Lock [unlocked] mutex
+ 0.77 0.65 4.50 0.23 96% 96% Unlock [locked] mutex
+ 0.58 0.55 1.42 0.05 96% 96% Trylock [unlocked] mutex
+ 0.51 0.50 0.83 0.02 96% 96% Trylock [locked] mutex
+ 0.12 0.11 0.41 0.02 96% 96% Destroy mutex
+ 4.72 4.70 5.58 0.05 96% 96% Unlock/Lock mutex
+
+ 1.01 0.67 3.48 0.40 71% 71% Create mbox
+ 0.02 0.00 0.53 0.03 96% 96% Peek [empty] mbox
+ 0.89 0.68 4.20 0.29 96% 71% Put [first] mbox
+ 0.02 0.00 0.33 0.02 96% 96% Peek [1 msg] mbox
+ 0.69 0.68 0.76 0.01 50% 46% Put [second] mbox
+ 0.02 0.00 0.30 0.02 96% 96% Peek [2 msgs] mbox
+ 0.81 0.71 3.83 0.19 96% 96% Get [first] mbox
+ 0.72 0.71 1.02 0.02 96% 96% Get [second] mbox
+ 0.81 0.65 2.74 0.22 96% 71% Tryput [first] mbox
+ 0.67 0.62 2.27 0.10 96% 96% Peek item [non-empty] mbox
+ 0.77 0.71 2.41 0.10 96% 96% Tryget [non-empty] mbox
+ 0.59 0.58 0.88 0.02 96% 96% Peek item [empty] mbox
+ 0.62 0.62 0.67 0.00 96% 96% Tryget [empty] mbox
+ 0.03 0.02 0.32 0.02 96% 96% Waiting to get mbox
+ 0.02 0.02 0.06 0.01 50% 46% Waiting to put mbox
+ 0.75 0.65 3.59 0.18 96% 96% Delete mbox
+ 2.80 2.77 3.59 0.05 96% 96% Put/Get mbox
+
+ 0.37 0.18 0.88 0.28 71% 71% Init semaphore
+ 0.48 0.47 0.80 0.02 96% 96% Post [0] semaphore
+ 0.60 0.59 0.67 0.01 50% 46% Wait [1] semaphore
+ 0.53 0.50 1.41 0.06 96% 96% Trywait [0] semaphore
+ 0.51 0.50 0.71 0.01 96% 50% Trywait [1] semaphore
+ 0.09 0.09 0.15 0.00 96% 96% Peek semaphore
+ 0.12 0.11 0.41 0.02 96% 96% Destroy semaphore
+ 3.05 3.05 3.05 0.00 100% 100% Post/Wait semaphore
+
+ 0.57 0.17 2.76 0.24 59% 25% Create counter
+ 0.06 0.05 0.58 0.03 96% 96% Get counter value
+ 0.06 0.03 0.64 0.04 96% 96% Set counter value
+ 0.73 0.71 1.02 0.02 96% 96% Tick counter
+ 0.12 0.11 0.15 0.01 50% 46% Delete counter
+
+ 0.89 0.64 3.15 0.34 84% 71% Create alarm
+ 1.00 0.95 2.41 0.09 96% 96% Initialize alarm
+ 0.09 0.06 0.68 0.04 96% 96% Disable alarm
+ 1.05 1.00 2.48 0.09 96% 96% Enable alarm
+ 0.18 0.17 0.50 0.02 96% 96% Delete alarm
+ 0.90 0.89 1.11 0.01 96% 96% Tick counter [1 alarm]
+ 5.60 5.59 5.88 0.02 96% 96% Tick counter [many alarms]
+ 1.53 1.52 2.11 0.04 96% 96% Tick &#38; fire counter [1 alarm]
+ 25.48 25.47 25.76 0.02 96% 96% Tick &#38; fire counters [&#62;1 together]
+ 6.22 6.21 6.44 0.01 96% 96% Tick &#38; fire counters [&#62;1 separately]
+ 2.59 2.56 6.17 0.07 98% 98% Alarm latency [0 threads]
+ 4.06 3.95 6.24 0.08 78% 57% Alarm latency [2 threads]
+ 5.03 2.56 9.03 0.89 59% 10% Alarm latency [many threads]
+ 5.68 5.59 15.45 0.15 99% 99% Alarm -&#62; thread resume latency
+
+ 2.52 1.41 8.12 0.00 Clock/interrupt latency
+
+ 2.05 1.17 6.00 0.00 Clock DSR latency
+
+ 34 0 1072 (main stack: 1320) Thread stack used (1912 total)
+All done, main stack : stack used 1320 size 2936
+All done : Interrupt stack used 136 size 4096
+All done : Idlethread stack used 996 size 2048
+
+Timing complete - 30360 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+
+ </LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-mn10300-stdeval1">
+<TITLE>Board: Matsushita STDEVAL1 Board</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">
+
+Board: Matsushita STDEVAL1 Board
+
+CPU : MN103002A 60MHz
+
+eCOS Kernel Timings
+Note: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 18 'ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 13.73 microseconds (205 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 24
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 14.36 11.53 23.53 1.81 54% 33% Create thread
+ 2.64 2.53 5.07 0.20 95% 95% Yield thread [all suspended]
+ 2.25 1.93 4.80 0.31 45% 83% Suspend [suspended] thread
+ 2.19 2.00 4.93 0.28 91% 91% Resume thread
+ 3.42 3.00 8.40 0.47 95% 87% Set priority
+ 0.31 0.13 1.20 0.19 79% 58% Get priority
+ 8.26 7.40 18.80 0.93 95% 87% Kill [suspended] thread
+ 2.58 2.47 5.13 0.21 95% 95% Yield [no other] thread
+ 5.07 4.53 8.67 0.44 62% 50% Resume [suspended low prio] thread
+ 2.27 2.07 4.53 0.23 87% 87% Resume [runnable low prio] thread
+ 4.76 4.07 9.40 0.65 66% 75% Suspend [runnable] thread
+ 2.63 2.53 4.73 0.18 95% 95% Yield [only low prio] thread
+ 2.09 1.87 4.27 0.27 91% 79% Suspend [runnable-&#62;not runnable]
+ 10.79 10.00 18.20 0.81 95% 79% Kill [runnable] thread
+ 20.30 18.40 28.80 1.42 79% 54% Resume [high priority] thread
+ 5.53 5.47 12.13 0.11 98% 97% Thread switch
+
+ 0.28 0.27 2.20 0.03 97% 97% Scheduler lock
+ 1.14 1.13 2.00 0.01 99% 99% Scheduler unlock [0 threads]
+ 1.14 1.13 2.40 0.02 99% 99% Scheduler unlock [1 suspended]
+ 1.16 1.13 3.33 0.06 95% 95% Scheduler unlock [many suspended]
+ 1.23 1.20 3.13 0.05 95% 95% Scheduler unlock [many low prio]
+
+ 1.29 1.00 4.20 0.25 65% 50% Init mutex
+ 2.65 2.47 5.27 0.23 93% 87% Lock [unlocked] mutex
+ 3.26 3.07 6.80 0.28 93% 87% Unlock [locked] mutex
+ 2.48 2.33 5.07 0.21 90% 87% Trylock [unlocked] mutex
+ 2.20 2.07 4.67 0.21 93% 87% Trylock [locked] mutex
+ 0.23 0.20 1.00 0.05 96% 93% Destroy mutex
+ 25.11 24.73 27.53 0.21 65% 31% Unlock/Lock mutex
+
+ 2.49 2.00 5.73 0.32 81% 37% Create mbox
+ 0.11 0.00 1.60 0.15 84% 81% Peek [empty] mbox
+ 3.01 2.60 9.47 0.52 96% 78% Put [first] mbox
+ 0.10 0.00 1.67 0.15 87% 81% Peek [1 msg] mbox
+ 3.09 2.60 8.33 0.50 93% 75% Put [second] mbox
+ 0.06 0.00 1.13 0.08 96% 87% Peek [2 msgs] mbox
+ 3.10 2.80 7.93 0.40 93% 84% Get [first] mbox
+ 3.13 2.80 7.53 0.43 90% 78% Get [second] mbox
+ 2.99 2.60 8.53 0.52 93% 75% Tryput [first] mbox
+ 2.65 2.33 6.80 0.42 90% 78% Peek item [non-empty] mbox
+ 3.05 2.73 7.60 0.42 93% 78% Tryget [non-empty] mbox
+ 3.16 2.93 6.27 0.31 84% 84% Peek item [empty] mbox
+ 2.48 2.27 5.73 0.30 84% 84% Tryget [empty] mbox
+ 0.23 0.13 2.07 0.14 96% 87% Waiting to get mbox
+ 0.22 0.13 1.93 0.13 96% 75% Waiting to put mbox
+ 3.08 2.80 7.93 0.42 84% 84% Delete mbox
+ 16.01 15.53 19.00 0.52 78% 59% Put/Get mbox
+
+ 0.85 0.67 3.27 0.19 96% 50% Init semaphore
+ 2.00 1.93 3.87 0.12 96% 90% Post [0] semaphore
+ 2.05 2.00 3.47 0.09 96% 96% Wait [1] semaphore
+ 1.85 1.80 3.47 0.10 96% 96% Trywait [0] semaphore
+ 1.82 1.80 2.53 0.04 96% 96% Trywait [1] semaphore
+ 0.36 0.33 1.33 0.06 96% 96% Peek semaphore
+ 0.38 0.33 1.87 0.09 96% 96% Destroy semaphore
+ 12.38 12.20 16.27 0.30 93% 87% Post/Wait semaphore
+
+ 1.18 0.73 4.07 0.24 78% 18% Create counter
+ 0.20 0.13 1.40 0.11 87% 87% Get counter value
+ 0.24 0.20 1.40 0.08 93% 93% Set counter value
+ 3.17 3.13 4.20 0.07 93% 93% Tick counter
+ 0.44 0.40 1.73 0.08 96% 96% Delete counter
+
+ 2.24 1.67 5.13 0.47 68% 65% Create alarm
+ 3.86 3.40 9.67 0.51 90% 78% Initialize alarm
+ 0.15 0.07 1.60 0.12 96% 68% Disable alarm
+ 3.76 3.47 7.67 0.35 93% 75% Enable alarm
+ 0.57 0.47 2.73 0.16 96% 84% Delete alarm
+ 3.64 3.60 4.73 0.07 96% 96% Tick counter [1 alarm]
+ 21.72 21.67 23.27 0.10 96% 96% Tick counter [many alarms]
+ 6.13 6.07 8.07 0.12 96% 96% Tick &#38; fire counter [1 alarm]
+ 101.40 99.53 132.73 2.75 93% 93% Tick &#38; fire counters [&#62;1 together]
+ 24.21 24.13 26.40 0.14 96% 96% Tick &#38; fire counters [&#62;1 separately]
+ 11.74 11.60 22.67 0.26 98% 98% Alarm latency [0 threads]
+ 14.58 11.73 24.93 1.59 54% 28% Alarm latency [2 threads]
+ 18.18 15.20 41.07 1.96 60% 43% Alarm latency [many threads]
+
+ 3.06 2.13 10.33 0.00 Clock/interrupt latency
+
+Timing complete - 23480 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+
+ </LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-sparclite-sleb">
+<TITLE>Board: Fujitsu SPARClite Evaluation Board</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">
+
+Board: Fujitsu SPARClite Evaluation Board
+
+CPU : Fujitsu SPARClite MB8683X 100MHz
+
+
+eCOS Kernel Timings
+Note: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 0 'ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 17.19 microseconds (17 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 24
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 48.59 47.00 63.01 1.41 66% 70% Create thread
+ 2.13 2.00 5.00 0.24 95% 95% Yield thread [all suspended]
+ 2.92 2.00 10.00 0.69 58% 37% Suspend [suspended] thread
+ 2.13 1.00 10.00 0.66 75% 20% Resume thread
+ 2.79 2.00 11.00 0.86 95% 54% Set priority
+ 1.00 0.00 5.00 0.33 79% 16% Get priority
+ 7.17 5.00 34.00 2.24 95% 95% Kill [suspended] thread
+ 2.42 2.00 12.00 0.80 95% 95% Yield [no other] thread
+ 3.46 2.00 14.00 1.10 75% 83% Resume [suspended low prio] thread
+ 2.00 1.00 9.00 0.58 66% 29% Resume [runnable low prio] thread
+ 4.21 3.00 20.00 1.38 95% 91% Suspend [runnable] thread
+ 2.33 2.00 10.00 0.64 95% 95% Yield [only low prio] thread
+ 2.00 1.00 9.00 0.67 58% 33% Suspend [runnable-&#62;not runnable]
+ 5.79 4.00 30.00 2.07 95% 95% Kill [runnable] thread
+ 39.34 37.00 75.01 3.36 91% 91% Resume [high priority] thread
+ 15.20 15.00 31.00 0.40 97% 97% Thread switch
+
+ 1.04 1.00 4.00 0.08 97% 97% Scheduler lock
+ 1.42 1.00 5.00 0.51 60% 60% Scheduler unlock [0 threads]
+ 1.41 1.00 5.00 0.50 61% 61% Scheduler unlock [1 suspended]
+ 1.41 1.00 5.00 0.50 60% 60% Scheduler unlock [many suspended]
+ 1.40 1.00 5.00 0.50 62% 62% Scheduler unlock [many low prio]
+
+ 1.19 1.00 6.00 0.35 93% 93% Init mutex
+ 2.34 2.00 12.00 0.64 93% 93% Lock [unlocked] mutex
+ 3.41 3.00 13.00 0.71 96% 87% Unlock [locked] mutex
+ 2.16 1.00 10.00 0.49 87% 9% Trylock [unlocked] mutex
+ 1.78 1.00 7.00 0.59 59% 37% Trylock [locked] mutex
+ 0.72 0.00 2.00 0.45 65% 31% Destroy mutex
+ 25.25 24.00 41.00 0.98 71% 25% Unlock/Lock mutex
+
+ 1.44 1.00 9.00 0.68 96% 78% Create mbox
+ 0.94 0.00 3.00 0.23 84% 12% Peek [empty] mbox
+ 3.06 2.00 13.00 0.62 71% 25% Put [first] mbox
+ 0.69 0.00 3.00 0.52 59% 37% Peek [1 msg] mbox
+ 2.44 2.00 10.00 0.68 96% 78% Put [second] mbox
+ 0.78 0.00 3.00 0.44 68% 28% Peek [2 msgs] mbox
+ 3.78 3.00 14.00 0.83 96% 53% Get [first] mbox
+ 2.97 2.00 9.00 0.61 56% 31% Get [second] mbox
+ 2.53 2.00 12.00 0.80 96% 75% Tryput [first] mbox
+ 2.72 2.00 12.00 0.81 96% 56% Peek item [non-empty] mbox
+ 2.63 2.00 13.00 0.94 90% 75% Tryget [non-empty] mbox
+ 1.97 1.00 6.00 0.42 68% 21% Peek item [empty] mbox
+ 2.09 1.00 9.00 0.49 78% 15% Tryget [empty] mbox
+ 0.84 0.00 4.00 0.42 71% 25% Waiting to get mbox
+ 0.81 0.00 4.00 0.46 68% 28% Waiting to put mbox
+ 2.38 2.00 11.00 0.66 96% 87% Delete mbox
+ 23.41 22.00 47.00 1.47 96% 96% Put/Get mbox
+
+ 1.03 0.00 6.00 0.31 84% 12% Init semaphore
+ 2.66 2.00 8.00 0.66 96% 50% Post [0] semaphore
+ 1.97 1.00 10.00 0.55 68% 28% Wait [1] semaphore
+ 1.78 1.00 8.00 0.63 56% 40% Trywait [0] semaphore
+ 1.84 1.00 8.00 0.58 62% 34% Trywait [1] semaphore
+ 1.00 0.00 5.00 0.25 84% 12% Peek semaphore
+ 0.81 0.00 4.00 0.46 68% 28% Destroy semaphore
+ 19.03 18.00 41.00 1.37 96% 96% Post/Wait semaphore
+
+ 1.38 1.00 6.00 0.56 75% 75% Create counter
+ 1.09 1.00 3.00 0.18 93% 93% Get counter value
+ 1.00 0.00 5.00 0.31 78% 15% Set counter value
+ 3.09 2.00 6.00 0.35 78% 9% Tick counter
+ 0.91 0.00 5.00 0.40 75% 21% Delete counter
+
+ 2.53 2.00 9.00 0.70 96% 65% Create alarm
+ 6.03 5.00 22.00 1.00 50% 46% Initialize alarm
+ 0.78 0.00 4.00 0.49 65% 31% Disable alarm
+ 2.91 2.00 13.00 0.91 87% 50% Enable alarm
+ 0.97 0.00 5.00 0.30 81% 15% Delete alarm
+ 2.69 2.00 9.00 0.69 96% 50% Tick counter [1 alarm]
+ 12.00 11.00 23.00 0.69 62% 34% Tick counter [many alarms]
+ 4.16 3.00 13.00 0.55 84% 12% Tick &#38; fire counter [1 alarm]
+ 72.69 72.01 87.01 1.03 96% 96% Tick &#38; fire counters [&#62;1 together]
+ 13.66 13.00 23.00 0.82 96% 62% Tick &#38; fire counters [&#62;1 separately]
+ 13.26 13.00 42.00 0.51 98% 98% Alarm latency [0 threads]
+ 16.75 11.00 53.01 2.78 64% 16% Alarm latency [2 threads]
+ 24.06 18.00 58.01 3.55 67% 25% Alarm latency [many threads]
+
+ 3.61 2.00 13.00 0.00 Clock/interrupt latency
+
+Timing complete - 23590 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+
+ </LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-ppc-cogent">
+<TITLE>Board: Cogent CMA MPC860 (PowerPC) Evaluation </TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">Board: Cogent CMA MPC860 (PowerPC) Evaluation
+CPU : MPC860, revision A3 33MHz
+
+
+eCOS Kernel Timings
+Note: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 0 'ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 14.46 microseconds (30 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 24
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 26.78 23.52 41.76 1.97 66% 37% Create thread
+ 4.00 3.84 4.80 0.23 70% 70% Yield thread [all suspended]
+ 3.78 3.36 7.68 0.38 50% 45% Suspend [suspended] thread
+ 3.56 3.36 7.68 0.37 95% 91% Resume thread
+ 5.28 4.32 12.96 0.76 83% 66% Set priority
+ 0.84 0.48 3.84 0.39 91% 54% Get priority
+ 11.76 10.08 32.16 1.70 95% 95% Kill [suspended] thread
+ 4.14 3.84 8.64 0.45 95% 75% Yield [no other] thread
+ 7.14 5.76 17.76 1.07 79% 70% Resume [suspended low prio] thread
+ 3.60 3.36 8.16 0.42 95% 87% Resume [runnable low prio] thread
+ 6.10 5.28 14.88 0.80 62% 70% Suspend [runnable] thread
+ 4.00 3.84 5.76 0.25 79% 79% Yield [only low prio] thread
+ 3.66 3.36 8.64 0.47 95% 79% Suspend [runnable-&#62;not runnable]
+ 11.66 10.08 30.24 1.58 79% 91% Kill [runnable] thread
+ 31.12 27.84 53.28 2.35 87% 50% Resume [high priority] thread
+ 7.52 7.20 15.84 0.30 50% 48% Thread switch
+
+ 1.00 0.48 2.88 0.21 63% 14% Scheduler lock
+ 2.57 2.40 3.84 0.23 65% 65% Scheduler unlock [0 threads]
+ 2.58 2.40 4.32 0.23 64% 64% Scheduler unlock [1 suspended]
+ 2.59 2.40 4.32 0.24 62% 62% Scheduler unlock [many suspended]
+ 2.59 2.40 4.32 0.24 61% 61% Scheduler unlock [many low prio]
+
+ 1.69 1.44 5.76 0.37 96% 71% Init mutex
+ 4.15 3.84 10.56 0.47 96% 75% Lock [unlocked] mutex
+ 5.82 5.28 10.56 0.38 62% 28% Unlock [locked] mutex
+ 3.70 3.36 8.64 0.41 96% 59% Trylock [unlocked] mutex
+ 3.42 2.88 6.72 0.26 75% 15% Trylock [locked] mutex
+ 0.36 0.00 1.92 0.25 62% 34% Destroy mutex
+ 43.41 42.72 45.12 0.34 81% 3% Unlock/Lock mutex
+
+ 3.27 2.88 8.16 0.39 96% 50% Create mbox
+ 0.57 0.00 2.40 0.34 50% 21% Peek [empty] mbox
+ 6.16 5.76 11.04 0.48 87% 87% Put [first] mbox
+ 0.48 0.00 1.92 0.27 50% 28% Peek [1 msg] mbox
+ 5.92 5.28 10.56 0.35 90% 6% Put [second] mbox
+ 0.60 0.00 2.40 0.30 62% 12% Peek [2 msgs] mbox
+ 4.69 4.32 12.00 0.54 93% 93% Get [first] mbox
+ 4.68 4.32 11.52 0.52 93% 93% Get [second] mbox
+ 5.86 5.28 11.04 0.47 62% 31% Tryput [first] mbox
+ 4.00 3.36 9.12 0.38 87% 9% Peek item [non-empty] mbox
+ 4.59 3.84 12.48 0.61 71% 75% Tryget [non-empty] mbox
+ 3.75 3.36 7.68 0.34 53% 43% Peek item [empty] mbox
+ 3.93 3.36 9.60 0.45 65% 31% Tryget [empty] mbox
+ 0.63 0.00 2.40 0.28 68% 6% Waiting to get mbox
+ 0.54 0.00 1.92 0.19 75% 9% Waiting to put mbox
+ 4.84 4.32 12.00 0.47 56% 40% Delete mbox
+ 24.18 23.52 29.76 0.66 81% 75% Put/Get mbox
+
+ 1.72 0.96 3.84 0.33 90% 6% Init semaphore
+ 3.15 2.88 6.24 0.34 96% 62% Post [0] semaphore
+ 3.85 3.36 8.64 0.30 68% 28% Wait [1] semaphore
+ 3.24 2.88 6.24 0.34 46% 46% Trywait [0] semaphore
+ 3.22 2.88 6.24 0.32 50% 46% Trywait [1] semaphore
+ 0.96 0.48 2.88 0.12 84% 12% Peek semaphore
+ 0.99 0.96 1.92 0.06 96% 96% Destroy semaphore
+ 24.71 24.00 28.80 0.40 87% 6% Post/Wait semaphore
+
+ 2.31 1.44 6.24 0.77 46% 56% Create counter
+ 0.45 0.00 0.96 0.08 87% 9% Get counter value
+ 0.42 0.00 0.96 0.16 75% 18% Set counter value
+ 4.14 3.84 4.80 0.26 50% 43% Tick counter
+ 0.91 0.48 2.40 0.19 71% 21% Delete counter
+
+ 5.23 4.32 7.68 0.61 65% 53% Create alarm
+ 5.58 4.80 12.96 0.72 68% 84% Initialize alarm
+ 0.75 0.48 1.92 0.30 90% 56% Disable alarm
+ 8.02 7.20 14.40 0.53 84% 68% Enable alarm
+ 1.32 0.96 3.84 0.29 56% 40% Delete alarm
+ 4.63 4.32 6.24 0.28 53% 43% Tick counter [1 alarm]
+ 23.67 23.52 25.44 0.23 78% 78% Tick counter [many alarms]
+ 7.24 6.72 10.56 0.21 84% 12% Tick &#38; fire counter [1 alarm]
+ 106.83 106.56 110.40 0.35 96% 65% Tick &#38; fire counters [&#62;1 together]
+ 26.18 25.44 29.76 0.46 81% 9% Tick &#38; fire counters [&#62;1 separately]
+ 10.79 10.08 29.28 0.66 53% 55% Alarm latency [0 threads]
+ 17.20 13.92 35.52 1.48 67% 21% Alarm latency [2 threads]
+ 29.69 22.56 47.04 3.58 57% 17% Alarm latency [many threads]
+
+ 7.66 3.84 19.20 0.00 Clock/interrupt latency
+
+Timing complete - 23530 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+
+ </LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-vr4300-vrc4373">
+<TITLE>Board: NEC VR4373</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">
+
+Board: NEC VR4373
+
+CPU : NEC VR4300 133MHz
+
+
+Startup, main stack : stack used 1304 size 3576
+Startup : Interrupt stack used 980 size 4096
+Startup : Idlethread stack used 494 size 2552
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 3 `ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 6.49 microseconds (431 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 16
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 17.21 16.18 22.14 0.88 75% 68% Create thread
+ 0.84 0.78 1.29 0.10 81% 81% Yield thread [all suspended]
+ 0.90 0.62 3.20 0.35 87% 87% Suspend [suspended] thread
+ 0.74 0.65 1.16 0.12 81% 68% Resume thread
+ 1.11 0.90 1.70 0.25 75% 68% Set priority
+ 0.11 0.05 0.35 0.09 75% 75% Get priority
+ 2.93 2.24 8.27 0.78 93% 75% Kill [suspended] thread
+ 0.88 0.78 1.92 0.16 93% 81% Yield [no other] thread
+ 1.82 1.20 4.71 0.62 87% 62% Resume [suspended low prio] thread
+ 0.70 0.63 0.86 0.09 68% 68% Resume [runnable low prio] thread
+ 1.21 1.07 1.61 0.13 81% 68% Suspend [runnable] thread
+ 0.86 0.78 1.58 0.13 81% 81% Yield [only low prio] thread
+ 0.69 0.62 0.84 0.09 68% 68% Suspend [runnable-&#62;not runnable]
+ 2.64 2.24 4.35 0.43 81% 62% Kill [runnable] thread
+ 1.50 1.07 5.82 0.56 93% 87% Destroy [dead] thread
+ 3.66 2.75 7.74 0.82 50% 56% Destroy [runnable] thread
+ 13.65 8.33 27.88 3.70 50% 43% Resume [high priority] thread
+ 2.04 1.89 3.32 0.15 46% 49% Thread switch
+
+ 0.19 0.05 0.83 0.13 48% 44% Scheduler lock
+ 0.50 0.41 1.59 0.13 89% 73% Scheduler unlock [0 threads]
+ 0.52 0.41 1.29 0.14 89% 64% Scheduler unlock [1 suspended]
+ 0.56 0.41 1.49 0.15 42% 47% Scheduler unlock [many suspended]
+ 0.56 0.41 1.41 0.15 43% 47% Scheduler unlock [many low prio]
+
+ 0.57 0.20 2.33 0.27 65% 50% Init mutex
+ 0.89 0.75 3.35 0.20 96% 75% Lock [unlocked] mutex
+ 0.90 0.74 4.38 0.25 96% 93% Unlock [locked] mutex
+ 0.77 0.65 2.63 0.17 96% 75% Trylock [unlocked] mutex
+ 0.66 0.59 1.16 0.10 75% 75% Trylock [locked] mutex
+ 0.07 0.00 0.45 0.09 75% 75% Destroy mutex
+ 7.95 7.71 9.49 0.19 50% 46% Unlock/Lock mutex
+
+ 1.04 0.81 3.44 0.27 93% 68% Create mbox
+ 0.10 0.02 0.57 0.11 71% 68% Peek [empty] mbox
+ 1.15 0.83 4.71 0.31 53% 71% Put [first] mbox
+ 0.10 0.02 0.57 0.12 68% 68% Peek [1 msg] mbox
+ 1.01 0.83 3.83 0.22 93% 75% Put [second] mbox
+ 0.09 0.02 0.57 0.10 71% 71% Peek [2 msgs] mbox
+ 1.03 0.81 5.02 0.27 96% 87% Get [first] mbox
+ 0.93 0.81 1.61 0.14 84% 62% Get [second] mbox
+ 1.07 0.77 4.18 0.23 68% 50% Tryput [first] mbox
+ 0.89 0.72 3.49 0.21 93% 71% Peek item [non-empty] mbox
+ 1.04 0.83 4.09 0.26 90% 81% Tryget [non-empty] mbox
+ 0.79 0.68 1.97 0.15 87% 68% Peek item [empty] mbox
+ 0.84 0.72 2.36 0.17 93% 68% Tryget [empty] mbox
+ 0.13 0.02 0.59 0.13 87% 62% Waiting to get mbox
+ 0.13 0.02 0.90 0.13 90% 62% Waiting to put mbox
+ 0.93 0.77 3.23 0.21 90% 71% Delete mbox
+ 4.74 4.51 8.80 0.32 93% 78% Put/Get mbox
+
+ 0.50 0.21 1.95 0.29 90% 50% Init semaphore
+ 0.86 0.57 2.87 0.29 93% 56% Post [0] semaphore
+ 1.01 0.74 3.62 0.28 93% 56% Wait [1] semaphore
+ 0.87 0.60 3.17 0.28 90% 59% Trywait [0] semaphore
+ 0.74 0.62 1.70 0.14 93% 56% Trywait [1] semaphore
+ 0.36 0.11 1.11 0.26 65% 56% Peek semaphore
+ 0.25 0.12 1.19 0.14 93% 56% Destroy semaphore
+ 7.85 7.52 8.93 0.21 62% 43% Post/Wait semaphore
+
+ 0.90 0.44 3.08 0.29 65% 28% Create counter
+ 0.07 0.05 0.89 0.05 96% 96% Get counter value
+ 0.06 0.05 0.33 0.02 96% 96% Set counter value
+ 0.88 0.86 1.62 0.05 96% 96% Tick counter
+ 0.13 0.12 0.41 0.02 96% 96% Delete counter
+
+ 1.37 0.81 2.95 0.27 62% 25% Create alarm
+ 1.35 1.17 6.03 0.31 96% 93% Initialize alarm
+ 0.11 0.08 0.65 0.05 90% 90% Disable alarm
+ 1.23 1.14 3.05 0.15 93% 87% Enable alarm
+ 0.21 0.18 0.47 0.04 90% 90% Delete alarm
+ 1.03 0.99 2.11 0.07 96% 96% Tick counter [1 alarm]
+ 4.96 4.96 4.96 0.00 100% 100% Tick counter [many alarms]
+ 1.70 1.67 2.51 0.05 96% 96% Tick &#38; fire counter [1 alarm]
+ 26.39 26.38 26.71 0.02 96% 96% Tick &#38; fire counters [&#62;1 together]
+ 5.65 5.64 5.91 0.02 96% 96% Tick &#38; fire counters [&#62;1 separately]
+ 2.55 2.38 9.86 0.19 96% 54% Alarm latency [0 threads]
+ 5.37 3.80 9.73 0.95 50% 34% Alarm latency [2 threads]
+ 8.79 5.83 16.12 1.29 57% 14% Alarm latency [many threads]
+
+ 5.85 2.26 16.24 0.00 Clock/interrupt latency
+
+ 1540 1536 1544 (main stack: 1664) Thread stack used (2552 total)
+All done, main stack : stack used 1664 size 3576
+All done : Interrupt stack used 312 size 4096
+All done : Idlethread stack used 1440 size 2552
+
+Timing complete - 23810 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+ </LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-arm-assabet">
+<TITLE>Board: Intel SA1110 (Assabet)</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">Board: Intel SA1110 (Assabet)
+
+CPU : StrongARM 221.2 MHz
+
+
+
+Microseconds for one run through Dhrystone: 3.3
+Dhrystones per Second: 306748.5
+VAX MIPS rating = 174.586
+
+Startup, main stack : stack used 420 size 2400
+Startup : Interrupt stack used 136 size 4096
+Startup : Idlethread stack used 84 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 0 `ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 3.20 microseconds (11 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 64
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 5.98 4.88 14.38 0.70 57% 35% Create thread
+ 0.86 0.81 1.90 0.08 87% 87% Yield thread [all suspended]
+ 1.05 0.81 3.53 0.19 46% 39% Suspend [suspended] thread
+ 1.07 0.81 3.80 0.18 48% 35% Resume thread
+ 1.36 1.09 5.97 0.22 45% 39% Set priority
+ 0.73 0.54 1.90 0.19 85% 50% Get priority
+ 2.93 2.44 13.56 0.39 79% 70% Kill [suspended] thread
+ 0.89 0.81 4.34 0.14 89% 89% Yield [no other] thread
+ 1.63 1.36 4.61 0.17 57% 29% Resume [suspended low prio] thread
+ 1.03 0.81 3.53 0.19 46% 42% Resume [runnable low prio] thread
+ 1.74 1.36 6.51 0.22 87% 6% Suspend [runnable] thread
+ 0.93 0.81 4.61 0.18 98% 78% Yield [only low prio] thread
+ 1.06 0.81 3.26 0.19 42% 39% Suspend [runnable-&#62;not runnable]
+ 2.56 1.90 13.02 0.41 87% 34% Kill [runnable] thread
+ 2.02 1.63 7.05 0.22 92% 3% Destroy [dead] thread
+ 3.09 2.44 15.19 0.51 78% 46% Destroy [runnable] thread
+ 6.77 5.43 13.02 0.59 75% 17% Resume [high priority] thread
+ 1.81 1.63 7.87 0.18 49% 49% Thread switch
+
+ 0.25 0.00 1.36 0.05 89% 10% Scheduler lock
+ 0.51 0.27 1.36 0.06 85% 13% Scheduler unlock [0 threads]
+ 0.51 0.27 1.09 0.06 85% 13% Scheduler unlock [1 suspended]
+ 0.51 0.27 1.09 0.07 85% 14% Scheduler unlock [many suspended]
+ 0.51 0.27 1.09 0.06 85% 13% Scheduler unlock [many low prio]
+
+ 0.52 0.27 2.17 0.15 62% 31% Init mutex
+ 0.97 0.54 4.34 0.28 84% 65% Lock [unlocked] mutex
+ 1.05 0.81 5.15 0.28 96% 96% Unlock [locked] mutex
+ 0.86 0.54 3.26 0.24 65% 31% Trylock [unlocked] mutex
+ 0.79 0.54 3.53 0.23 43% 46% Trylock [locked] mutex
+ 0.33 0.27 1.63 0.11 90% 90% Destroy mutex
+ 4.16 3.80 8.95 0.30 75% 96% Unlock/Lock mutex
+
+ 0.70 0.54 2.98 0.21 96% 65% Create mbox
+ 0.59 0.27 1.63 0.14 75% 9% Peek [empty] mbox
+ 1.33 1.09 5.70 0.31 96% 93% Put [first] mbox
+ 0.61 0.27 1.63 0.13 81% 3% Peek [1 msg] mbox
+ 1.35 1.09 5.43 0.31 96% 87% Put [second] mbox
+ 0.58 0.27 1.36 0.11 78% 6% Peek [2 msgs] mbox
+ 1.38 1.09 4.88 0.25 59% 37% Get [first] mbox
+ 1.40 1.09 5.15 0.26 62% 34% Get [second] mbox
+ 1.27 0.81 4.88 0.28 90% 65% Tryput [first] mbox
+ 1.34 0.81 4.61 0.22 59% 6% Peek item [non-empty] mbox
+ 1.47 1.09 5.15 0.27 84% 12% Tryget [non-empty] mbox
+ 1.12 0.81 4.34 0.23 59% 31% Peek item [empty] mbox
+ 1.14 0.81 4.07 0.24 71% 25% Tryget [empty] mbox
+ 0.59 0.27 1.36 0.12 78% 6% Waiting to get mbox
+ 0.59 0.27 1.36 0.12 78% 6% Waiting to put mbox
+ 1.28 0.81 5.43 0.32 87% 78% Delete mbox
+ 2.64 2.17 10.31 0.48 96% 96% Put/Get mbox
+
+ 0.47 0.27 2.17 0.19 46% 46% Init semaphore
+ 0.77 0.54 3.80 0.26 90% 56% Post [0] semaphore
+ 0.90 0.54 4.07 0.26 75% 21% Wait [1] semaphore
+ 0.85 0.54 3.26 0.21 56% 28% Trywait [0] semaphore
+ 0.69 0.54 2.17 0.18 96% 62% Trywait [1] semaphore
+ 0.44 0.27 2.17 0.19 96% 56% Peek semaphore
+ 0.38 0.27 1.90 0.17 96% 75% Destroy semaphore
+ 2.74 2.44 9.49 0.42 96% 96% Post/Wait semaphore
+
+ 0.43 0.27 1.90 0.18 96% 56% Create counter
+ 0.49 0.00 2.17 0.18 56% 3% Get counter value
+ 0.33 0.00 1.63 0.13 78% 6% Set counter value
+ 1.03 0.81 2.44 0.22 84% 50% Tick counter
+ 0.42 0.27 1.90 0.20 90% 65% Delete counter
+
+ 0.70 0.54 2.44 0.20 93% 62% Create alarm
+ 1.65 1.36 6.78 0.40 96% 81% Initialize alarm
+ 0.75 0.54 1.63 0.18 43% 43% Disable alarm
+ 1.75 1.36 7.05 0.38 65% 81% Enable alarm
+ 0.81 0.54 2.44 0.15 62% 28% Delete alarm
+ 1.01 0.81 2.17 0.16 56% 40% Tick counter [1 alarm]
+ 4.19 4.07 5.43 0.16 96% 68% Tick counter [many alarms]
+ 1.48 1.36 3.80 0.20 96% 78% Tick &#38; fire counter [1 alarm]
+ 20.23 20.07 22.52 0.21 96% 65% Tick &#38; fire counters [&#62;1 together]
+ 4.70 4.61 6.78 0.16 87% 87% Tick &#38; fire counters [&#62;1 separately]
+ 2.81 2.71 14.38 0.20 98% 98% Alarm latency [0 threads]
+ 3.19 2.71 13.56 0.38 73% 59% Alarm latency [2 threads]
+ 9.71 7.87 18.17 1.25 59% 53% Alarm latency [many threads]
+ 5.77 5.43 45.57 0.68 97% 97% Alarm -&#62; thread resume latency
+
+ 2.38 0.81 9.49 0.00 Clock/interrupt latency
+
+ 2.02 1.09 7.32 0.00 Clock DSR latency
+
+ 11 0 316 (main stack: 764) Thread stack used (1120 total)
+All done, main stack : stack used 764 size 2400
+All done : Interrupt stack used 287 size 4096
+All done : Idlethread stack used 272 size 2048
+
+Timing complete - 30220 ms total
+ </LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-arm-brutus">
+<TITLE>Board: Intel SA1100 (Brutus)</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">Board: Intel SA1100 (Brutus)
+
+CPU : StrongARM 221.2 MHz
+
+Microseconds for one run through Dhrystone: 3.3
+Dhrystones per Second: 306748.5
+VAX MIPS rating = 174.586
+
+Startup, main stack : stack used 404 size 2400
+Startup : Interrupt stack used 136 size 4096
+Startup : Idlethread stack used 87 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 0 `ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 3.09 microseconds (11 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 64
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 6.63 5.43 18.99 0.77 70% 37% Create thread
+ 0.83 0.81 2.17 0.04 98% 98% Yield thread [all suspended]
+ 1.27 0.81 5.15 0.30 68% 73% Suspend [suspended] thread
+ 1.25 0.81 5.15 0.25 82% 1% Resume thread
+ 1.52 1.09 7.87 0.30 78% 75% Set priority
+ 0.97 0.54 2.71 0.28 64% 51% Get priority
+ 3.45 2.71 19.53 0.66 84% 76% Kill [suspended] thread
+ 0.90 0.81 6.24 0.17 98% 98% Yield [no other] thread
+ 1.86 1.36 6.24 0.33 68% 50% Resume [suspended low prio] thread
+ 1.25 0.81 5.15 0.25 82% 1% Resume [runnable low prio] thread
+ 2.01 1.63 10.04 0.32 70% 84% Suspend [runnable] thread
+ 0.90 0.81 6.24 0.17 98% 98% Yield [only low prio] thread
+ 1.25 0.81 5.15 0.24 84% 1% Suspend [runnable-&#62;not runnable]
+ 2.92 1.90 18.72 0.57 85% 43% Kill [runnable] thread
+ 2.45 1.90 10.31 0.33 95% 54% Destroy [dead] thread
+ 3.95 2.71 23.60 0.89 68% 54% Destroy [runnable] thread
+ 8.55 6.24 19.53 1.15 60% 23% Resume [high priority] thread
+ 1.85 1.63 11.94 0.21 49% 49% Thread switch
+
+ 0.25 0.00 1.63 0.05 89% 10% Scheduler lock
+ 0.52 0.27 1.90 0.07 85% 13% Scheduler unlock [0 threads]
+ 0.51 0.27 1.36 0.06 85% 13% Scheduler unlock [1 suspended]
+ 0.51 0.27 1.36 0.06 85% 13% Scheduler unlock [many suspended]
+ 0.51 0.27 1.63 0.06 85% 13% Scheduler unlock [many low prio]
+
+ 0.58 0.27 3.53 0.20 71% 21% Init mutex
+ 1.07 0.54 5.70 0.35 87% 59% Lock [unlocked] mutex
+ 1.14 0.81 6.51 0.40 96% 81% Unlock [locked] mutex
+ 0.96 0.54 5.15 0.34 68% 65% Trylock [unlocked] mutex
+ 0.94 0.54 4.88 0.34 65% 65% Trylock [locked] mutex
+ 0.33 0.27 2.17 0.11 96% 96% Destroy mutex
+ 4.21 3.80 10.85 0.41 71% 96% Unlock/Lock mutex
+ 0.76 0.54 4.07 0.25 96% 56% Create mbox
+ 0.75 0.54 1.90 0.20 84% 50% Peek [empty] mbox
+ 1.56 1.09 6.78 0.39 68% 59% Put [first] mbox
+ 0.75 0.54 1.90 0.20 84% 50% Peek [1 msg] mbox
+ 1.55 1.09 6.78 0.40 68% 62% Put [second] mbox
+ 0.77 0.54 1.63 0.17 46% 37% Peek [2 msgs] mbox
+ 1.67 1.09 6.24 0.31 87% 34% Get [first] mbox
+ 1.63 1.09 6.24 0.31 75% 34% Get [second] mbox
+ 1.50 1.09 6.51 0.40 56% 62% Tryput [first] mbox
+ 1.58 1.09 5.43 0.37 68% 53% Peek item [non-empty] mbox
+ 1.79 1.09 7.05 0.43 71% 25% Tryget [non-empty] mbox
+ 1.29 1.09 5.15 0.32 87% 87% Peek item [empty] mbox
+ 1.33 1.09 5.97 0.37 96% 84% Tryget [empty] mbox
+ 0.73 0.54 1.90 0.21 84% 56% Waiting to get mbox
+ 0.76 0.54 1.90 0.19 40% 43% Waiting to put mbox
+ 1.47 1.09 6.78 0.39 59% 84% Delete mbox
+ 2.70 2.17 12.75 0.63 96% 96% Put/Get mbox
+
+ 0.47 0.27 2.71 0.20 96% 50% Init semaphore
+ 0.89 0.54 4.88 0.33 56% 75% Post [0] semaphore
+ 0.96 0.54 5.15 0.33 71% 75% Wait [1] semaphore
+ 0.86 0.54 4.88 0.32 96% 81% Trywait [0] semaphore
+ 0.69 0.54 3.26 0.22 96% 75% Trywait [1] semaphore
+ 0.49 0.27 3.26 0.28 84% 84% Peek semaphore
+ 0.39 0.27 2.44 0.19 96% 78% Destroy semaphore
+ 2.83 2.44 11.66 0.55 96% 96% Post/Wait semaphore
+
+ 0.52 0.27 3.26 0.20 56% 40% Create counter
+ 0.59 0.00 2.71 0.34 81% 46% Get counter value
+ 0.36 0.00 2.44 0.21 81% 9% Set counter value
+ 1.13 0.81 2.98 0.26 59% 37% Tick counter
+ 0.39 0.27 1.90 0.19 90% 78% Delete counter
+
+ 0.86 0.54 4.07 0.24 65% 31% Create alarm
+ 1.86 1.36 9.77 0.54 96% 90% Initialize alarm
+ 0.77 0.54 2.71 0.23 84% 50% Disable alarm
+ 1.86 1.36 9.22 0.51 96% 75% Enable alarm
+ 0.89 0.54 3.26 0.25 65% 21% Delete alarm
+ 0.99 0.81 3.26 0.21 96% 59% Tick counter [1 alarm]
+ 4.22 4.07 6.78 0.22 96% 71% Tick counter [many alarms]
+ 1.51 1.36 4.61 0.24 96% 78% Tick &#38; fire counter [1 alarm]
+ 20.29 20.07 23.33 0.23 96% 53% Tick &#38; fire counters [&#62;1 together]
+ 4.71 4.61 7.87 0.20 96% 96% Tick &#38; fire counters [&#62;1 separately]
+ 2.88 2.71 23.87 0.33 99% 99% Alarm latency [0 threads]
+ 3.24 2.71 17.36 0.40 79% 58% Alarm latency [2 threads]
+ 15.71 12.48 27.40 1.47 53% 17% Alarm latency [many threads]
+ 5.95 5.43 64.56 1.02 97% 97% Alarm -&#62; thread resume latency
+
+ 3.25 0.81 14.11 0.00 Clock/interrupt latency
+
+ 2.68 1.09 12.75 0.00 Clock DSR latency
+
+ 29 0 316 (main stack: 764) Thread stack used (1120 total)
+All done, main stack : stack used 764 size 2400
+All done : Interrupt stack used 288 size 4096
+All done : Idlethread stack used 260 size 2048
+
+
+Timing complete - 30280 ms total
+
+ </LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-ppc-mbx860">
+<TITLE>Board: Motorola MBX</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">
+
+Board: Motorola MBX
+
+CPU : Motorola MPC860 66MHZ
+
+
+Startup, main stack : stack used 643 size 5664
+Startup : Interrupt stack used 427 size 4096
+Startup : Idlethread stack used 236 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 0 `ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 25.36 microseconds (79 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 16
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 27.58 25.60 44.16 2.07 93% 93% Create thread
+ 5.94 5.76 7.04 0.22 93% 62% Yield thread [all suspended]
+ 6.06 5.44 10.56 0.57 75% 75% Suspend [suspended] thread
+ 5.42 4.80 9.60 0.53 87% 81% Resume thread
+ 7.10 6.40 14.08 0.90 93% 87% Set priority
+ 0.86 0.64 1.92 0.22 93% 50% Get priority
+ 16.74 15.04 36.48 2.47 93% 93% Kill [suspended] thread
+ 6.14 5.76 10.56 0.55 93% 93% Yield [no other] thread
+ 9.74 8.96 18.56 1.10 93% 93% Resume [suspended low prio] thread
+ 5.28 4.80 9.28 0.54 93% 81% Resume [runnable low prio] thread
+ 9.40 8.32 18.56 1.14 93% 93% Suspend [runnable] thread
+ 6.04 5.76 8.96 0.38 93% 93% Yield [only low prio] thread
+ 5.68 5.12 9.60 0.52 68% 75% Suspend [runnable-&#62;not runnable]
+ 16.10 14.40 35.20 2.39 93% 93% Kill [runnable] thread
+ 8.54 7.68 16.00 0.94 93% 87% Destroy [dead] thread
+ 20.20 18.56 40.64 2.55 93% 93% Destroy [runnable] thread
+ 39.02 36.48 57.28 3.28 87% 87% Resume [high priority] thread
+ 13.13 12.80 22.08 0.15 78% 20% Thread switch
+
+ 0.59 0.32 1.60 0.09 82% 16% Scheduler lock
+ 3.67 3.52 5.12 0.17 99% 54% Scheduler unlock [0 threads]
+ 3.67 3.52 4.80 0.17 99% 53% Scheduler unlock [1 suspended]
+ 3.67 3.52 4.80 0.17 54% 54% Scheduler unlock [many suspended]
+ 3.69 3.52 5.12 0.17 99% 50% Scheduler unlock [many low prio]
+
+ 2.41 2.24 5.44 0.25 96% 75% Init mutex
+ 6.83 6.40 11.84 0.34 75% 90% Lock [unlocked] mutex
+ 6.74 6.40 13.12 0.40 96% 96% Unlock [locked] mutex
+ 5.53 5.12 9.60 0.25 84% 12% Trylock [unlocked] mutex
+ 4.84 4.48 7.36 0.17 78% 15% Trylock [locked] mutex
+ 0.34 0.00 0.96 0.06 90% 3% Destroy mutex
+ 56.10 55.68 59.52 0.21 93% 3% Unlock/Lock mutex
+
+ 4.72 4.48 10.24 0.37 96% 96% Create mbox
+ 0.75 0.64 1.92 0.16 75% 75% Peek [empty] mbox
+ 6.79 6.40 12.80 0.41 96% 90% Put [first] mbox
+ 0.46 0.32 1.60 0.19 93% 68% Peek [1 msg] mbox
+ 6.68 6.40 12.16 0.37 96% 96% Put [second] mbox
+ 0.50 0.32 1.60 0.20 93% 56% Peek [2 msgs] mbox
+ 7.13 6.40 14.08 0.49 90% 46% Get [first] mbox
+ 6.97 6.40 13.44 0.47 84% 78% Get [second] mbox
+ 6.24 5.76 11.52 0.38 78% 81% Tryput [first] mbox
+ 5.98 5.44 11.20 0.39 78% 62% Peek item [non-empty] mbox
+ 6.52 6.08 13.12 0.49 93% 81% Tryget [non-empty] mbox
+ 5.50 5.12 10.24 0.30 68% 28% Peek item [empty] mbox
+ 5.76 5.44 10.88 0.32 96% 96% Tryget [empty] mbox
+ 0.50 0.32 1.60 0.19 96% 53% Waiting to get mbox
+ 0.50 0.32 1.60 0.19 96% 53% Waiting to put mbox
+ 7.45 7.04 15.04 0.49 96% 93% Delete mbox
+ 37.47 36.80 48.64 0.70 96% 96% Put/Get mbox
+
+ 2.49 2.24 6.08 0.28 96% 56% Init semaphore
+ 5.09 4.80 8.64 0.27 46% 46% Post [0] semaphore
+ 6.25 5.76 10.88 0.32 93% 3% Wait [1] semaphore
+ 4.84 4.48 8.32 0.23 68% 25% Trywait [0] semaphore
+ 4.98 4.80 8.00 0.26 96% 71% Trywait [1] semaphore
+ 1.66 1.28 3.84 0.20 68% 15% Peek semaphore
+ 1.24 0.96 3.20 0.17 65% 31% Destroy semaphore
+ 40.74 40.32 49.28 0.53 96% 96% Post/Wait semaphore
+
+ 2.65 2.24 6.08 0.23 84% 9% Create counter
+ 0.85 0.64 2.24 0.22 90% 53% Get counter value
+ 0.68 0.64 1.92 0.08 96% 96% Set counter value
+ 7.13 6.72 8.64 0.24 78% 18% Tick counter
+ 1.30 0.96 3.20 0.12 84% 12% Delete counter
+
+ 3.69 3.52 7.68 0.29 96% 84% Create alarm
+ 8.98 8.32 17.60 0.61 68% 62% Initialize alarm
+ 0.96 0.64 2.88 0.14 71% 21% Disable alarm
+ 8.76 8.32 17.60 0.59 96% 87% Enable alarm
+ 1.99 1.60 5.12 0.21 81% 12% Delete alarm
+ 7.44 7.36 9.92 0.15 96% 96% Tick counter [1 alarm]
+ 21.68 21.44 24.64 0.25 96% 53% Tick counter [many alarms]
+ 10.95 10.56 15.04 0.26 78% 18% Tick &#38; fire counter [1 alarm]
+ 132.79 132.48 136.32 0.23 59% 37% Tick &#38; fire counters [&#62;1 together]
+ 25.18 24.96 28.80 0.29 96% 65% Tick &#38; fire counters [&#62;1 separately]
+ 23.06 22.72 47.36 0.40 98% 98% Alarm latency [0 threads]
+ 31.53 27.20 56.00 0.63 96% 0% Alarm latency [2 threads]
+ 36.86 30.40 58.88 4.15 50% 28% Alarm latency [many threads]
+
+ 11.41 8.96 16.32 0.00 Clock/interrupt latency
+
+ 609 603 651 (main stack: 1059) Thread stack used (1704 total)
+All done, main stack : stack used 1059 size 5664
+All done : Interrupt stack used 251 size 4096
+All done : Idlethread stack used 587 size 2048
+
+Timing complete - 23690 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+
+ </LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-sh-edk7708">
+<TITLE>Board: Hitachi EDK7708</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">
+
+
+Board: Hitachi EDK7708
+
+CPU: Hitachi SH3/7708 60MHz
+
+
+
+Startup, main stack : stack used 444 size 4112
+Startup : Interrupt stack used 76 size 4096
+Startup : Idlethread stack used 96 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 2 `ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 14.75 microseconds (55 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 16
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 15.43 13.60 24.00 1.29 62% 50% Create thread
+ 3.33 3.20 4.27 0.18 93% 68% Yield thread [all suspended]
+ 2.90 2.40 5.33 0.36 81% 62% Suspend [suspended] thread
+ 2.93 2.67 4.80 0.27 93% 87% Resume thread
+ 4.30 3.73 10.13 0.73 93% 93% Set priority
+ 0.65 0.27 2.13 0.28 68% 62% Get priority
+ 9.72 8.53 21.33 1.45 93% 93% Kill [suspended] thread
+ 3.33 3.20 4.53 0.20 93% 75% Yield [no other] thread
+ 5.30 4.80 10.13 0.65 93% 87% Resume [suspended low prio] thread
+ 2.80 2.40 4.53 0.27 81% 75% Resume [runnable low prio] thread
+ 4.82 4.00 8.27 0.49 68% 25% Suspend [runnable] thread
+ 3.32 3.20 4.00 0.16 93% 68% Yield [only low prio] thread
+ 2.82 2.40 4.27 0.25 81% 12% Suspend [runnable-&#62;not runnable]
+ 9.45 8.53 19.47 1.25 93% 93% Kill [runnable] thread
+ 5.30 4.53 11.20 0.74 87% 93% Destroy [dead] thread
+ 11.83 10.67 25.07 1.65 93% 93% Destroy [runnable] thread
+ 19.53 17.33 31.20 1.88 75% 75% Resume [high priority] thread
+ 6.70 6.67 11.47 0.07 99% 99% Thread switch
+
+ 0.33 0.27 0.80 0.10 75% 75% Scheduler lock
+ 1.74 1.60 2.67 0.14 99% 50% Scheduler unlock [0 threads]
+ 1.72 1.60 3.20 0.14 99% 57% Scheduler unlock [1 suspended]
+ 1.81 1.60 3.20 0.10 75% 23% Scheduler unlock [many suspended]
+ 1.86 1.60 3.20 0.02 94% 4% Scheduler unlock [many low prio]
+
+ 1.22 1.07 3.20 0.20 96% 65% Init mutex
+ 3.21 2.93 5.87 0.17 68% 28% Lock [unlocked] mutex
+ 3.36 2.93 7.47 0.30 84% 75% Unlock [locked] mutex
+ 2.83 2.67 5.33 0.22 96% 65% Trylock [unlocked] mutex
+ 2.53 2.40 2.93 0.14 96% 53% Trylock [locked] mutex
+ 0.28 0.27 0.80 0.03 96% 96% Destroy mutex
+ 20.09 19.73 23.20 0.23 84% 12% Unlock/Lock mutex
+
+ 2.38 2.13 4.53 0.17 59% 34% Create mbox
+ 0.45 0.27 1.33 0.15 56% 40% Peek [empty] mbox
+ 3.70 3.20 7.20 0.29 84% 59% Put [first] mbox
+ 0.45 0.27 0.80 0.13 62% 34% Peek [1 msg] mbox
+ 3.67 3.20 5.60 0.23 81% 6% Put [second] mbox
+ 0.42 0.27 0.53 0.13 59% 40% Peek [2 msgs] mbox
+ 3.98 3.47 7.47 0.24 59% 9% Get [first] mbox
+ 3.97 3.47 4.80 0.24 59% 12% Get [second] mbox
+ 3.51 3.20 6.67 0.28 56% 78% Tryput [first] mbox
+ 3.29 2.93 5.60 0.29 59% 65% Peek item [non-empty] mbox
+ 4.06 3.47 7.20 0.26 68% 3% Tryget [non-empty] mbox
+ 3.03 2.67 5.33 0.19 93% 3% Peek item [empty] mbox
+ 3.36 3.20 4.80 0.18 96% 56% Tryget [empty] mbox
+ 0.57 0.27 1.33 0.09 84% 3% Waiting to get mbox
+ 0.52 0.27 1.07 0.11 62% 21% Waiting to put mbox
+ 3.88 3.47 7.47 0.30 78% 65% Delete mbox
+ 12.04 11.73 17.33 0.33 96% 96% Put/Get mbox
+
+ 1.17 1.07 2.40 0.16 71% 71% Init semaphore
+ 2.67 2.40 4.27 0.15 62% 25% Post [0] semaphore
+ 3.00 2.67 4.53 0.17 65% 12% Wait [1] semaphore
+ 2.54 2.40 4.80 0.20 96% 71% Trywait [0] semaphore
+ 2.42 2.40 2.93 0.03 96% 96% Trywait [1] semaphore
+ 0.79 0.53 2.13 0.15 59% 28% Peek semaphore
+ 0.77 0.53 1.87 0.12 71% 25% Destroy semaphore
+ 12.64 12.27 17.07 0.28 84% 96% Post/Wait semaphore
+
+ 1.27 1.07 2.93 0.17 53% 43% Create counter
+ 0.54 0.27 1.33 0.13 59% 21% Get counter value
+ 0.47 0.27 1.60 0.17 46% 43% Set counter value
+ 3.47 3.20 4.80 0.16 53% 28% Tick counter
+ 0.80 0.53 2.13 0.13 62% 25% Delete counter
+
+ 1.86 1.60 4.00 0.21 43% 40% Create alarm
+ 5.12 4.80 9.07 0.36 93% 75% Initialize alarm
+ 0.44 0.27 1.33 0.19 87% 53% Disable alarm
+ 4.77 4.27 9.60 0.35 87% 62% Enable alarm
+ 1.02 0.80 2.67 0.18 53% 40% Delete alarm
+ 3.56 3.47 5.33 0.15 84% 84% Tick counter [1 alarm]
+ 15.04 14.93 16.27 0.16 71% 71% Tick counter [many alarms]
+ 5.75 5.60 8.00 0.21 96% 68% Tick &#38; fire counter [1 alarm]
+ 79.60 79.47 81.07 0.17 96% 65% Tick &#38; fire counters [&#62;1 together]
+ 17.04 16.80 18.93 0.15 65% 31% Tick &#38; fire counters [&#62;1 separately]
+ 12.44 12.27 29.60 0.31 96% 96% Alarm latency [0 threads]
+ 14.06 12.27 27.20 0.53 82% 4% Alarm latency [2 threads]
+ 19.62 17.07 38.40 1.44 57% 34% Alarm latency [many threads]
+
+ 2.79 2.40 6.13 0.00 Clock/interrupt latency
+
+ 376 376 376 (main stack: 764) Thread stack used (992 total)
+All done, main stack : stack used 764 size 4112
+All done : Interrupt stack used 176 size 4096
+All done : Idlethread stack used 352 size 2048
+
+Timing complete - 23860 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+
+ </LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-sh-cq7708">
+<TITLE>Board: CQ CqREEK SH3 Evaluation Board (cq7708)</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">
+
+Board: CQ CqREEK SH3 Evaluation Board (cq7708)
+
+CPU: Hitachi SH3/7708 60MHz
+
+Startup, main stack : stack used 448 size 4112
+Startup : Interrupt stack used 80 size 4096
+Startup : Idlethread stack used 96 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 2 `ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 19.17 microseconds (71 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 64
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 20.62 14.40 26.93 3.23 48% 26% Create thread
+ 3.16 2.93 4.27 0.09 78% 20% Yield thread [all suspended]
+ 2.91 2.40 5.87 0.17 57% 1% Suspend [suspended] thread
+ 2.73 2.40 6.40 0.19 64% 15% Resume thread
+ 4.05 3.73 11.47 0.27 62% 90% Set priority
+ 0.82 0.27 2.67 0.17 56% 3% Get priority
+ 9.07 8.53 24.27 0.51 78% 71% Kill [suspended] thread
+ 3.19 2.93 7.20 0.14 70% 28% Yield [no other] thread
+ 5.45 4.53 17.87 0.49 78% 17% Resume [suspended low prio] thread
+ 2.67 2.40 5.07 0.15 56% 28% Resume [runnable low prio] thread
+ 4.95 4.27 11.47 0.28 82% 14% Suspend [runnable] thread
+ 3.15 2.93 4.53 0.11 73% 25% Yield [only low prio] thread
+ 2.82 2.40 5.60 0.21 84% 10% Suspend [runnable-&#62;not runnable]
+ 8.92 8.00 24.27 0.51 84% 14% Kill [runnable] thread
+ 5.10 4.53 12.00 0.27 59% 39% Destroy [dead] thread
+ 11.81 10.93 37.33 0.81 87% 95% Destroy [runnable] thread
+ 22.15 20.80 54.67 1.27 92% 92% Resume [high priority] thread
+ 6.85 6.67 13.60 0.19 99% 50% Thread switch
+
+ 0.27 0.27 1.07 0.01 99% 99% Scheduler lock
+ 1.74 1.60 2.67 0.14 99% 50% Scheduler unlock [0 threads]
+ 1.74 1.60 2.93 0.14 99% 50% Scheduler unlock [1 suspended]
+ 1.81 1.60 4.27 0.11 72% 26% Scheduler unlock [many suspended]
+ 1.75 1.60 4.00 0.15 50% 49% Scheduler unlock [many low prio]
+
+ 1.22 1.07 4.27 0.23 96% 78% Init mutex
+ 3.18 2.93 7.20 0.27 96% 53% Lock [unlocked] mutex
+ 3.40 3.20 8.00 0.31 96% 96% Unlock [locked] mutex
+ 2.77 2.40 5.87 0.22 87% 9% Trylock [unlocked] mutex
+ 2.35 2.13 3.47 0.14 65% 31% Trylock [locked] mutex
+ 0.78 0.53 2.67 0.14 68% 28% Destroy mutex
+ 22.80 22.40 28.80 0.51 96% 71% Unlock/Lock mutex
+
+ 2.61 2.40 6.13 0.26 96% 62% Create mbox
+ 0.52 0.27 1.60 0.19 40% 37% Peek [empty] mbox
+ 3.54 3.20 7.73 0.35 93% 78% Put [first] mbox
+ 0.50 0.27 1.60 0.17 46% 37% Peek [1 msg] mbox
+ 3.62 3.20 6.93 0.34 59% 65% Put [second] mbox
+ 0.52 0.27 2.13 0.23 31% 43% Peek [2 msgs] mbox
+ 3.93 3.47 10.13 0.43 65% 65% Get [first] mbox
+ 3.92 3.47 7.47 0.40 56% 56% Get [second] mbox
+ 3.37 2.93 6.93 0.36 59% 68% Tryput [first] mbox
+ 3.30 2.67 6.93 0.38 84% 40% Peek item [non-empty] mbox
+ 3.93 3.47 9.33 0.44 65% 71% Tryget [non-empty] mbox
+ 2.94 2.67 6.13 0.25 43% 43% Peek item [empty] mbox
+ 3.23 2.93 6.67 0.27 56% 84% Tryget [empty] mbox
+ 0.58 0.27 2.67 0.20 62% 21% Waiting to get mbox
+ 0.55 0.27 1.87 0.14 62% 21% Waiting to put mbox
+ 3.82 3.47 9.87 0.39 96% 93% Delete mbox
+ 13.35 12.80 21.33 0.50 87% 78% Put/Get mbox
+
+ 1.22 1.07 2.93 0.19 96% 59% Init semaphore
+ 2.42 2.13 4.27 0.12 81% 15% Post [0] semaphore
+ 2.96 2.67 5.07 0.16 68% 21% Wait [1] semaphore
+ 2.37 2.13 4.53 0.17 62% 34% Trywait [0] semaphore
+ 2.29 2.13 3.47 0.17 96% 53% Trywait [1] semaphore
+ 0.66 0.53 2.13 0.17 96% 68% Peek semaphore
+ 0.81 0.53 2.93 0.13 75% 21% Destroy semaphore
+ 14.47 14.13 21.33 0.43 96% 96% Post/Wait semaphore
+
+ 1.44 1.07 3.47 0.29 56% 71% Create counter
+ 0.62 0.27 1.07 0.14 62% 3% Get counter value
+ 0.56 0.27 1.60 0.17 50% 25% Set counter value
+ 3.39 3.20 4.27 0.16 53% 40% Tick counter
+ 0.83 0.53 1.87 0.14 68% 15% Delete counter
+
+ 2.02 1.87 4.00 0.21 93% 68% Create alarm
+ 5.06 4.27 11.73 0.46 78% 18% Initialize alarm
+ 0.73 0.27 2.40 0.22 84% 3% Disable alarm
+ 4.82 4.27 11.47 0.48 81% 65% Enable alarm
+ 1.19 0.80 3.47 0.22 87% 9% Delete alarm
+ 3.63 3.47 5.60 0.20 96% 59% Tick counter [1 alarm]
+ 15.01 14.93 16.53 0.13 87% 87% Tick counter [many alarms]
+ 5.50 5.33 8.00 0.22 96% 65% Tick &#38; fire counter [1 alarm]
+ 74.27 74.13 76.80 0.21 96% 78% Tick &#38; fire counters [&#62;1 together]
+ 16.90 16.53 19.47 0.23 81% 15% Tick &#38; fire counters [&#62;1 separately]
+ 16.70 16.53 36.27 0.33 98% 98% Alarm latency [0 threads]
+ 17.85 16.53 34.40 0.47 73% 0% Alarm latency [2 threads]
+ 63.26 58.40 80.00 2.64 52% 32% Alarm latency [many threads]
+ 30.37 29.33 124.80 1.68 98% 97% Alarm -&#62; thread resume latency
+
+ 7.37 5.07 17.87 0.00 Clock/interrupt latency
+
+ 9.00 4.53 26.93 0.00 Clock DSR latency
+
+ 106 0 376 (main stack: 764) Thread stack used (992 total)
+All done, main stack : stack used 764 size 4112
+All done : Interrupt stack used 176 size 4096
+All done : Idlethread stack used 352 size 2048
+
+Timing complete - 30310 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+
+ </LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-sh-hs7729pci">
+<TITLE>Board: Hitachi HS7729PCI HS7729 SH3</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">
+
+Board: Hitachi HS7729PCI HS7729 SH3
+
+CPU: Hitachi SH3/7729 132MHz
+
+
+Startup, main stack : stack used 464 size 4112
+Startup : Interrupt stack used 92 size 4096
+Startup : Idlethread stack used 94 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 3 'ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 18.10 microseconds (149 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 64
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 18.33 15.52 28.24 1.47 53% 28% Create thread
+ 3.08 2.91 6.79 0.13 78% 89% Yield thread [all suspended]
+ 3.23 3.03 6.18 0.16 59% 70% Suspend [suspended] thread
+ 2.70 2.55 6.18 0.15 54% 82% Resume thread
+ 4.12 4.00 7.52 0.16 96% 81% Set priority
+ 0.61 0.48 1.33 0.07 57% 28% Get priority
+ 9.14 8.61 18.91 0.42 85% 57% Kill [suspended] thread
+ 3.04 2.91 4.48 0.07 68% 20% Yield [no other] thread
+ 5.12 4.73 7.88 0.29 60% 53% Resume [suspended low prio] thread
+ 2.54 2.42 3.03 0.09 39% 40% Resume [runnable low prio] thread
+ 5.00 4.36 9.45 0.21 75% 1% Suspend [runnable] thread
+ 3.04 2.91 4.61 0.07 65% 21% Yield [only low prio] thread
+ 2.91 2.79 3.27 0.08 43% 31% Suspend [runnable-&#62;not runnable]
+ 8.82 8.12 15.39 0.36 68% 29% Kill [runnable] thread
+ 5.07 4.48 12.73 0.37 76% 50% Destroy [dead] thread
+ 11.17 10.55 22.91 0.52 78% 67% Destroy [runnable] thread
+ 22.43 21.45 32.73 0.61 81% 50% Resume [high priority] thread
+ 7.99 7.88 13.58 0.14 98% 86% Thread switch
+
+ 0.37 0.36 1.33 0.02 97% 97% Scheduler lock
+ 1.74 1.70 2.06 0.06 70% 70% Scheduler unlock [0 threads]
+ 1.75 1.70 2.06 0.07 92% 64% Scheduler unlock [1 suspended]
+ 1.71 1.70 2.42 0.03 89% 89% Scheduler unlock [many suspended]
+ 1.76 1.70 3.64 0.08 96% 64% Scheduler unlock [many low prio]
+
+ 4.23 3.88 10.67 0.41 96% 93% Unlock [locked] mutex
+ 3.12 2.91 6.91 0.29 96% 87% Trylock [unlocked] mutex
+ 2.54 2.42 2.91 0.11 18% 46% Trylock [locked] mutex
+ 0.88 0.73 3.15 0.14 65% 96% Destroy mutex
+ 22.33 22.06 25.94 0.23 81% 62% Unlock/Lock mutex
+
+ 1.92 1.82 4.73 0.19 96% 93% Create mbox
+ 0.61 0.48 1.70 0.15 84% 75% Peek [empty] mbox
+ 4.00 3.64 9.45 0.36 96% 87% Put [first] mbox
+ 0.30 0.24 0.73 0.09 84% 75% Peek [1 msg] mbox
+ 3.82 3.64 6.67 0.22 90% 84% Put [second] mbox
+ 0.32 0.24 1.33 0.12 81% 81% Peek [2 msgs] mbox
+ 4.19 3.76 9.21 0.34 84% 50% Get [first] mbox
+ 3.91 3.76 5.21 0.16 84% 75% Get [second] mbox
+ 3.51 3.27 8.12 0.34 93% 87% Tryput [first] mbox
+ 3.25 2.91 7.15 0.30 62% 56% Peek item [non-empty] mbox
+ 3.86 3.52 8.73 0.37 93% 84% Tryget [non-empty] mbox
+ 2.87 2.79 3.76 0.12 84% 71% Peek item [empty] mbox
+ 3.15 3.03 4.24 0.10 46% 40% Tryget [empty] mbox
+ 0.34 0.24 1.33 0.10 43% 46% Waiting to get mbox
+ 0.36 0.24 1.45 0.09 53% 37% Waiting to put mbox
+ 4.49 4.24 10.91 0.41 96% 96% Delete mbox
+ 12.67 12.36 19.52 0.43 96% 96% Put/Get mbox
+
+ 0.87 0.85 1.45 0.05 93% 93% Init semaphore
+ 2.74 2.55 4.48 0.18 50% 50% Post [0] semaphore
+ 3.39 3.15 4.24 0.14 78% 50% Wait [1] semaphore
+ 2.62 2.42 5.33 0.21 96% 65% Trywait [0] semaphore
+ 2.76 2.67 3.27 0.08 46% 43% Trywait [1] semaphore
+ 1.09 0.85 2.91 0.19 68% 56% Peek semaphore
+ 0.97 0.73 3.39 0.17 90% 65% Destroy semaphore
+ 13.09 12.85 16.12 0.19 84% 65% Post/Wait semaphore
+
+ 1.57 1.45 3.88 0.15 96% 93% Create counter
+ 0.91 0.73 2.18 0.16 46% 68% Get counter value
+ 0.55 0.48 0.97 0.09 90% 62% Set counter value
+ 4.19 4.00 5.82 0.13 84% 75% Tick counter
+ 0.87 0.73 3.15 0.16 93% 93% Delete counter
+
+ 2.50 2.30 5.21 0.18 81% 90% Create alarm
+ 6.16 5.70 12.97 0.47 96% 71% Initialize alarm
+ 0.50 0.36 1.70 0.11 62% 34% Disable alarm
+ 5.16 4.85 8.73 0.29 78% 78% Enable alarm
+ 1.18 1.09 2.30 0.12 84% 65% Delete alarm
+ 5.22 5.09 7.39 0.14 96% 93% Tick counter [1 alarm]
+ 52.37 52.12 52.73 0.20 37% 56% Tick counter [many alarms]
+ 6.73 6.55 8.24 0.13 78% 68% Tick &#38; fire counter [1 alarm]
+ 108.65 108.61 109.21 0.07 87% 87% Tick &#38; fire counters [&#62;1 together]
+ 54.25 54.06 54.79 0.11 65% 18% Tick &#38; fire counters [&#62;1 separately]
+ 17.36 17.09 29.82 0.23 82% 57% Alarm latency [0 threads]
+ 19.75 17.09 28.00 1.65 46% 40% Alarm latency [2 threads]
+ 39.02 34.06 50.67 2.00 53% 15% Alarm latency [many threads]
+ 29.31 28.36 105.09 1.27 98% 97% Alarm -&#62; thread resume latency
+
+ 5.08 3.88 11.15 0.00 Clock/interrupt latency
+
+ 7.32 5.09 16.73 0.00 Clock DSR latency
+
+ 6 0 380 (main stack: 820) Thread stack used (992 total)
+All done, main stack : stack used 820 size 4112
+All done : Interrupt stack used 196 size 4096
+All done : Idlethread stack used 360 size 2048
+
+Timing complete - 29960 ms total
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62; </LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-sh-se7751">
+<TITLE>Board: Hitachi Solution Engine 7751 SH4 (se7751)</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">Board: Hitachi Solution Engine 7751 SH4 (se7751)
+
+CPU: Hitachi SH4/7751 162MHz
+
+
+Startup, main stack : stack used 464 size 4112
+Startup : Interrupt stack used 92 size 4096
+Startup : Idlethread stack used 94 size 2048
+
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+
+Reading the hardware clock takes 1 `ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 14.27 microseconds (96 raw clock ticks)
+
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 64
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 8.06 5.63 12.15 1.37 46% 29% Create thread
+ 1.15 1.04 5.19 0.15 98% 98% Yield thread [all suspended]
+ 1.13 0.89 5.04 0.27 89% 62% Suspend [suspended] thread
+ 1.11 0.89 5.19 0.26 89% 71% Resume thread
+ 1.45 1.19 3.56 0.23 53% 53% Set priority
+ 0.21 0.15 1.19 0.10 90% 79% Get priority
+ 4.15 3.56 13.04 0.53 68% 64% Kill [suspended] thread
+ 1.12 1.04 3.70 0.12 98% 70% Yield [no other] thread
+ 1.75 1.33 8.00 0.38 59% 65% Resume [suspended low prio] thread
+ 1.10 0.89 4.59 0.25 87% 73% Resume [runnable low prio] thread
+ 1.59 1.33 5.93 0.33 81% 79% Suspend [runnable] thread
+ 1.13 1.04 4.30 0.13 98% 71% Yield [only low prio] thread
+ 1.09 0.89 3.56 0.21 89% 70% Suspend [runnable-&#62;not runnable]
+ 4.96 4.30 11.70 0.44 68% 39% Kill [runnable] thread
+ 1.95 1.48 8.00 0.34 75% 57% Destroy [dead] thread
+ 4.41 3.85 10.37 0.47 53% 57% Destroy [runnable] thread
+ 13.15 11.41 23.85 1.11 73% 39% Resume [high priority] thread
+ 3.10 2.96 6.22 0.11 41% 39% Thread switch
+
+ 0.13 0.00 1.33 0.06 74% 21% Scheduler lock
+ 0.76 0.74 1.78 0.03 96% 96% Scheduler unlock [0 threads]
+ 0.76 0.74 1.78 0.03 96% 96% Scheduler unlock [1 suspended]
+ 0.77 0.74 2.67 0.05 95% 95% Scheduler unlock [many suspended]
+ 0.76 0.74 2.37 0.04 95% 95% Scheduler unlock [many low prio]
+
+ 0.52 0.15 2.67 0.26 65% 34% Init mutex
+ 1.23 1.04 5.63 0.32 93% 93% Lock [unlocked] mutex
+ 1.45 1.19 5.33 0.31 90% 87% Unlock [locked] mutex
+ 1.13 0.89 4.15 0.28 90% 84% Trylock [unlocked] mutex
+ 1.00 0.89 2.96 0.17 87% 87% Trylock [locked] mutex
+ 0.37 0.30 1.78 0.13 90% 84% Destroy mutex
+ 9.09 8.59 12.59 0.43 71% 71% Unlock/Lock mutex
+ 0.93 0.59 4.30 0.40 84% 71% Create mbox
+ 0.26 0.00 1.19 0.17 71% 59% Peek [empty] mbox
+ 3.03 2.52 6.37 0.47 50% 59% Put [first] mbox
+ 0.23 0.00 0.74 0.14 68% 15% Peek [1 msg] mbox
+ 2.93 2.52 4.74 0.46 71% 59% Put [second] mbox
+ 0.22 0.00 0.59 0.13 68% 15% Peek [2 msgs] mbox
+ 2.07 1.63 5.93 0.37 84% 59% Get [first] mbox
+ 2.06 1.63 4.74 0.34 78% 59% Get [second] mbox
+ 1.48 1.04 5.48 0.37 62% 53% Tryput [first] mbox
+ 1.31 1.04 4.89 0.32 96% 75% Peek item [non-empty] mbox
+ 1.47 1.04 5.78 0.38 84% 65% Tryget [non-empty] mbox
+ 1.15 0.89 3.11 0.18 71% 56% Peek item [empty] mbox
+ 1.20 1.04 3.85 0.21 93% 84% Tryget [empty] mbox
+ 0.21 0.00 0.74 0.14 68% 18% Waiting to get mbox
+ 0.19 0.00 0.44 0.10 43% 15% Waiting to put mbox
+ 2.19 1.93 5.78 0.27 93% 71% Delete mbox
+ 10.23 9.93 11.56 0.15 53% 37% Put/Get mbox
+
+ 0.37 0.15 1.33 0.26 71% 71% Init semaphore
+ 0.98 0.89 2.52 0.13 96% 68% Post [0] semaphore
+ 1.08 0.89 3.26 0.15 68% 93% Wait [1] semaphore
+ 0.98 0.89 3.41 0.16 93% 93% Trywait [0] semaphore
+ 0.73 0.59 1.63 0.07 71% 25% Trywait [1] semaphore
+ 0.33 0.30 1.33 0.07 93% 93% Peek semaphore
+ 0.34 0.30 1.78 0.09 96% 96% Destroy semaphore
+ 9.36 8.74 10.37 0.33 56% 31% Post/Wait semaphore
+
+ 0.54 0.15 3.26 0.23 59% 37% Create counter
+ 0.13 0.00 0.59 0.07 68% 25% Get counter value
+ 0.14 0.00 0.59 0.07 68% 25% Set counter value
+ 3.74 3.56 5.33 0.17 53% 75% Tick counter
+ 0.32 0.15 2.07 0.12 71% 21% Delete counter
+
+ 1.59 1.19 3.11 0.29 71% 43% Create alarm
+ 1.89 1.48 6.37 0.44 87% 78% Initialize alarm
+ 0.20 0.15 0.74 0.09 87% 84% Disable alarm
+ 1.62 1.33 5.63 0.41 87% 84% Enable alarm
+ 0.40 0.30 1.33 0.13 87% 62% Delete alarm
+
+ 4.03 3.70 5.78 0.27 68% 56% Tick counter [1 alarm]
+ 14.18 13.93 15.70 0.27 81% 75% Tick counter [many alarms]
+ 4.81 4.59 5.93 0.13 81% 15% Tick &#38; fire counter [1 alarm]
+ 30.77 30.52 33.63 0.20 75% 65% Tick &#38; fire counters [&#62;1 together]
+ 15.10 14.52 17.04 0.23 71% 3% Tick &#38; fire counters [&#62;1 separately]
+ 8.78 8.59 18.22 0.20 97% 89% Alarm latency [0 threads]
+ 11.29 9.33 17.48 1.02 56% 22% Alarm latency [2 threads]
+ 18.70 15.70 26.37 1.45 54% 22% Alarm latency [many threads]
+ 19.40 18.81 57.48 0.65 97% 97% Alarm -&#62; thread resume latency
+
+ 4.18 2.81 8.89 0.00 Clock/interrupt latency
+
+ 3.98 2.52 11.56 0.00 Clock DSR latency
+
+ 6 0 380 (main stack: 728) Thread stack used (992 total)
+All done, main stack : stack used 728 size 4112
+All done : Interrupt stack used 196 size 4096
+All done : Idlethread stack used 360 size 2048
+
+Timing complete - 29790 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62; </LITERALLAYOUT>
+</SECT1>
+<SECT1 id="rt-i386-pc">
+<TITLE>Board: PC</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">Board: PC
+
+CPU: 433MHz Celeron
+
+Startup, main stack : stack used 124 size 2912
+Startup : Interrupt stack used 280 size 4108
+Startup : Idlethread stack used 62 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 8 'ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 6.75 microseconds (8 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 64
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 3.93 1.68 8.38 0.93 68% 3% Create thread
+ 0.71 0.00 3.35 0.84 59% 59% Yield thread [all suspended]
+ 0.65 0.00 5.03 0.84 64% 64% Suspend [suspended] thread
+ 0.63 0.00 1.68 0.79 62% 62% Resume thread
+ 0.76 0.00 1.68 0.83 54% 54% Set priority
+ 0.39 0.00 1.68 0.60 76% 76% Get priority
+ 1.34 0.00 6.70 0.67 73% 25% Kill [suspended] thread
+ 0.68 0.00 1.68 0.81 59% 59% Yield [no other] thread
+ 0.92 0.00 1.68 0.83 54% 45% Resume [suspended low prio] thread
+ 0.63 0.00 1.68 0.79 62% 62% Resume [runnable low prio] thread
+ 0.84 0.00 1.68 0.84 100% 50% Suspend [runnable] thread
+ 0.73 0.00 1.68 0.82 56% 56% Yield [only low prio] thread
+ 0.58 0.00 1.68 0.76 65% 65% Suspend [runnable-&#62;not runnable]
+ 1.26 0.00 3.35 0.67 71% 26% Kill [runnable] thread
+ 0.86 0.00 3.35 0.86 98% 50% Destroy [dead] thread
+ 1.44 0.00 1.68 0.40 85% 14% Destroy [runnable] thread
+ 4.45 3.35 6.70 0.89 53% 40% Resume [high priority] thread
+ 1.62 0.00 1.68 0.10 96% 3% Thread switch
+
+ 0.41 0.00 1.68 0.61 75% 75% Scheduler lock
+ 0.48 0.00 1.68 0.69 71% 71% Scheduler unlock [0 threads]
+ 0.59 0.00 1.68 0.76 64% 64% Scheduler unlock [1 suspended]
+ 0.45 0.00 1.68 0.65 73% 73% Scheduler unlock [many suspended]
+ 0.45 0.00 1.68 0.65 73% 73% Scheduler unlock [many low prio]
+
+ 0.52 0.00 1.68 0.72 68% 68% Init mutex
+ 0.79 0.00 5.03 0.93 96% 59% Lock [unlocked] mutex
+ 0.84 0.00 5.03 0.94 96% 56% Unlock [locked] mutex
+ 0.63 0.00 1.68 0.79 62% 62% Trylock [unlocked] mutex
+ 0.52 0.00 1.68 0.72 68% 68% Trylock [locked] mutex
+ 0.58 0.00 1.68 0.76 65% 65% Destroy mutex
+ 3.40 3.35 5.03 0.10 96% 96% Unlock/Lock mutex
+
+ 0.99 0.00 1.68 0.81 59% 40% Create mbox
+ 0.47 0.00 1.68 0.68 71% 71% Peek [empty] mbox
+ 0.79 0.00 5.03 0.93 96% 59% Put [first] mbox
+ 0.42 0.00 1.68 0.63 75% 75% Peek [1 msg] mbox
+ 0.79 0.00 1.68 0.83 53% 53% Put [second] mbox
+ 0.37 0.00 1.68 0.57 78% 78% Peek [2 msgs] mbox
+ 0.73 0.00 3.35 0.87 59% 59% Get [first] mbox
+ 0.73 0.00 1.68 0.82 56% 56% Get [second] mbox
+ 0.79 0.00 3.35 0.88 56% 56% Tryput [first] mbox
+ 0.68 0.00 3.35 0.85 62% 62% Peek item [non-empty] mbox
+ 0.73 0.00 3.35 0.87 59% 59% Tryget [non-empty] mbox
+ 0.63 0.00 1.68 0.79 62% 62% Peek item [empty] mbox
+ 0.68 0.00 1.68 0.81 59% 59% Tryget [empty] mbox
+ 0.26 0.00 1.68 0.44 84% 84% Waiting to get mbox
+ 0.63 0.00 1.68 0.79 62% 62% Waiting to put mbox
+ 0.73 0.00 3.35 0.87 59% 59% Delete mbox
+ 3.25 1.68 3.35 0.20 93% 6% Put/Get mbox
+
+ 0.63 0.00 1.68 0.79 62% 62% Init semaphore
+ 0.63 0.00 1.68 0.79 62% 62% Post [0] semaphore
+ 0.63 0.00 1.68 0.79 62% 62% Wait [1] semaphore
+ 0.52 0.00 1.68 0.72 68% 68% Trywait [0] semaphore
+ 0.52 0.00 1.68 0.72 68% 68% Trywait [1] semaphore
+ 0.52 0.00 1.68 0.72 68% 68% Peek semaphore
+ 0.21 0.00 1.68 0.37 87% 87% Destroy semaphore
+ 3.30 1.68 3.35 0.10 96% 3% Post/Wait semaphore
+
+ 0.79 0.00 3.35 0.88 56% 56% Create counter
+ 0.42 0.00 1.68 0.63 75% 75% Get counter value
+ 0.37 0.00 1.68 0.57 78% 78% Set counter value
+ 0.73 0.00 1.68 0.82 56% 56% Tick counter
+ 0.63 0.00 1.68 0.79 62% 62% Delete counter
+
+ 0.89 0.00 3.35 0.89 96% 50% Create alarm
+ 0.84 0.00 1.68 0.84 100% 50% Initialize alarm
+ 0.52 0.00 1.68 0.72 68% 68% Disable alarm
+ 0.89 0.00 3.35 0.89 96% 50% Enable alarm
+ 0.58 0.00 1.68 0.76 65% 65% Delete alarm
+ 0.63 0.00 1.68 0.79 62% 62% Tick counter [1 alarm]
+ 5.03 3.35 6.70 0.10 93% 3% Tick counter [many alarms]
+ 0.94 0.00 1.68 0.82 56% 43% Tick &#38; fire counter [1 alarm]
+ 11.16 10.06 11.73 0.76 65% 34% Tick &#38; fire counters [&#62;1 together]
+ 5.19 5.03 6.70 0.28 90% 90% Tick &#38; fire counters [&#62;1 separately]
+ 0.01 0.00 1.68 0.03 99% 99% Alarm latency [0 threads]
+ 0.13 0.00 1.68 0.24 92% 92% Alarm latency [2 threads]
+ 0.94 0.00 3.35 0.85 53% 45% Alarm latency [many threads]
+ 1.75 1.68 6.70 0.15 96% 96% Alarm -&#62; thread resume latency
+
+ 41 0 368 (main stack: 1036) Thread stack used (1712 total)
+All done, main stack : stack used 1036 size 2912
+All done : Interrupt stack used 368 size 4108
+All done : Idlethread stack used 288 size 2048
+
+Timing complete - 28520 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+
+</LITERALLAYOUT>
+</SECT1>
+<SECT1 id="rt-v850-cebsa1">
+<TITLE>Board: NEC V850 Cosmo Evaluation Board</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">Board: NEC V850 Cosmo Evaluation Board
+
+CPU: NEC CEB-V850/SA1 17MHz
+
+Startup, main stack : stack used 552 size 2936
+Startup : Interrupt stack used 120 size 4096
+Startup : Idlethread stack used 206 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 27 `ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 280.04 microseconds (1190 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 7
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 288.71 280.24 297.18 4.84 42% 28% Create thread
+ 70.76 70.59 70.82 0.10 71% 28% Yield thread [all suspended]
+ 59.06 59.06 59.06 0.00 100% 100% Suspend [suspended] thread
+ 60.00 60.00 60.00 0.00 100% 100% Resume thread
+ 77.38 77.18 77.41 0.06 85% 14% Set priority
+ 3.13 3.06 3.29 0.10 71% 71% Get priority
+ 187.46 187.29 187.53 0.10 71% 28% Kill [suspended] thread
+ 70.76 70.59 70.82 0.10 71% 28% Yield [no other] thread
+ 104.40 103.29 104.71 0.32 85% 14% Resume [suspended low prio] thread
+ 59.06 59.06 59.06 0.00 100% 100% Resume [runnable low prio] thread
+ 97.11 91.06 98.12 1.73 85% 14% Suspend [runnable] thread
+ 70.76 70.59 70.82 0.10 71% 28% Yield [only low prio] thread
+ 59.06 59.06 59.06 0.00 100% 100% Suspend [runnable-&#62;not runnable]
+ 187.46 187.29 187.53 0.10 71% 28% Kill [runnable] thread
+ 95.63 95.29 97.18 0.44 85% 85% Destroy [dead] thread
+ 241.28 236.94 242.12 1.24 85% 14% Destroy [runnable] thread
+ 378.55 370.35 427.06 13.86 85% 85% Resume [high priority] thread
+ 198.77 183.76 452.94 18.77 96% 96% Thread switch
+
+ 2.59 2.59 2.59 0.00 100% 100% Scheduler lock
+ 41.29 41.18 41.41 0.12 100% 50% Scheduler unlock [0 threads]
+ 40.82 40.71 40.94 0.12 100% 50% Scheduler unlock [1 suspended]
+ 41.29 41.18 41.41 0.12 100% 50% Scheduler unlock [many suspended]
+ 41.29 41.18 41.41 0.12 100% 50% Scheduler unlock [many low prio]
+
+ 17.94 17.88 18.12 0.09 75% 75% Init mutex
+ 68.71 68.71 68.71 0.00 100% 100% Lock [unlocked] mutex
+ 72.10 72.00 73.41 0.15 96% 71% Unlock [locked] mutex
+ 57.88 57.88 57.88 0.00 100% 100% Trylock [unlocked] mutex
+ 52.24 52.24 52.24 0.00 100% 100% Trylock [locked] mutex
+ 12.41 12.24 12.47 0.09 75% 25% Destroy mutex
+ 427.06 427.06 427.06 0.00 100% 100% Unlock/Lock mutex
+
+
+ 34.94 34.82 35.06 0.12 100% 50% Create mbox
+ 0.76 0.71 0.94 0.09 75% 75% Peek [empty] mbox
+ 75.29 75.29 75.29 0.00 100% 100% Put [first] mbox
+ 1.24 1.18 1.41 0.09 75% 75% Peek [1 msg] mbox
+ 75.76 75.76 75.76 0.00 100% 100% Put [second] mbox
+ 0.76 0.71 0.94 0.09 75% 75% Peek [2 msgs] mbox
+ 80.12 80.00 80.24 0.12 100% 50% Get [first] mbox
+ 79.65 79.53 79.76 0.12 100% 50% Get [second] mbox
+ 70.12 70.12 70.12 0.00 100% 100% Tryput [first] mbox
+ 65.76 65.65 65.88 0.12 100% 50% Peek item [non-empty] mbox
+ 78.00 77.88 78.12 0.12 100% 50% Tryget [non-empty] mbox
+ 63.12 63.06 63.29 0.09 75% 75% Peek item [empty] mbox
+ 67.82 67.76 68.00 0.09 75% 75% Tryget [empty] mbox
+ 1.94 1.88 2.12 0.09 75% 75% Waiting to get mbox
+ 1.47 1.41 1.65 0.09 75% 75% Waiting to put mbox
+ 75.59 75.53 75.76 0.09 75% 75% Delete mbox
+ 252.76 252.71 252.94 0.09 75% 75% Put/Get mbox
+
+ 20.24 20.24 20.24 0.00 100% 100% Init semaphore
+ 54.35 54.35 54.35 0.00 100% 100% Post [0] semaphore
+ 66.59 66.59 66.59 0.00 100% 100% Wait [1] semaphore
+ 52.24 52.24 52.24 0.00 100% 100% Trywait [0] semaphore
+ 53.41 53.41 53.41 0.00 100% 100% Trywait [1] semaphore
+ 10.65 10.59 10.82 0.09 75% 75% Peek semaphore
+ 12.65 12.47 12.71 0.09 75% 25% Destroy semaphore
+ 276.94 276.94 276.94 0.00 100% 100% Post/Wait semaphore
+
+ 14.94 14.82 15.06 0.12 100% 50% Create counter
+ 2.18 2.12 2.35 0.09 75% 75% Get counter value
+ 3.06 3.06 3.06 0.00 100% 100% Set counter value
+ 78.12 78.12 78.12 0.00 100% 100% Tick counter
+ 13.82 13.65 13.88 0.09 75% 25% Delete counter
+
+ 26.94 26.82 27.06 0.12 100% 50% Create alarm
+ 104.18 104.00 104.24 0.09 75% 25% Initialize alarm
+ 7.65 7.53 7.76 0.12 100% 50% Disable alarm
+ 104.94 104.94 104.94 0.00 100% 100% Enable alarm
+ 19.47 19.29 19.53 0.09 75% 25% Delete alarm
+ 88.53 88.47 88.71 0.09 75% 75% Tick counter [1 alarm]
+ 418.61 411.29 645.41 14.17 96% 96% Tick counter [many alarms]
+ 139.59 139.53 139.76 0.09 75% 75% Tick &#38; fire counter [1 alarm]
+ 2150.21 2096.71 2367.53 83.59 78% 78% Tick &#38; fire counters [&#62;1 together]
+ 478.15 462.35 733.41 29.61 93% 93% Tick &#38; fire counters [&#62;1 separately]
+ 219.89 218.59 369.88 2.34 99% 99% Alarm latency [0 threads]
+ 292.11 218.59 371.53 37.85 50% 25% Alarm latency [2 threads]
+ 292.96 218.59 370.59 38.12 49% 25% Alarm latency [many threads]
+ 540.90 495.76 1677.41 17.76 98% 0% Alarm -&#62; thread resume latency
+
+ 79.01 78.59 104.71 0.00 Clock/interrupt latency
+
+ 123.41 85.88 1982.82 0.00 Clock DSR latency
+
+ 522 516 536 (main stack: 1124) Thread stack used (1912 total)
+All done, main stack : stack used 1124 size 2936
+All done : Interrupt stack used 288 size 4096
+All done : Idlethread stack used 488 size 2048
+
+Timing complete - 32540 ms total
+
+</LITERALLAYOUT>
+</SECT1>
+<SECT1 id="rt-v850-cebsb1">
+<TITLE>Board: NEC V850 Cosmo Evaluation Board</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">Board: NEC V850 Cosmo Evaluation Board
+
+CPU: NEC CEB-V850/SB1 16MHz (in internal Flash)
+
+
+Startup, main stack : stack used 572 size 2936
+Startup : Interrupt stack used 132 size 4096
+Startup : Idlethread stack used 210 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 8 'ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 118.15 microseconds (472 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 7
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 113.68 111.00 116.50 1.63 42% 28% Create thread
+ 30.00 30.00 30.00 0.00 100% 100% Yield thread [all suspended]
+ 29.57 29.50 29.75 0.10 71% 71% Suspend [suspended] thread
+ 27.43 27.25 27.50 0.10 71% 28% Resume thread
+ 34.11 34.00 34.25 0.12 57% 57% Set priority
+ 1.57 1.50 1.75 0.10 71% 71% Get priority
+ 72.96 72.75 73.00 0.06 85% 14% Kill [suspended] thread
+ 30.00 30.00 30.00 0.00 100% 100% Yield [no other] thread
+ 42.75 42.75 42.75 0.00 100% 100% Resume [suspended low prio] thread
+ 27.00 27.00 27.00 0.00 100% 100% Resume [runnable low prio] thread
+ 43.64 41.25 44.25 0.68 85% 14% Suspend [runnable] thread
+ 30.00 30.00 30.00 0.00 100% 100% Yield [only low prio] thread
+ 29.57 29.50 29.75 0.10 71% 71% Suspend [runnable-&#62;not runnable]
+ 72.93 72.75 73.00 0.10 71% 28% Kill [runnable] thread
+ 44.89 44.75 45.75 0.24 85% 85% Destroy [dead] thread
+ 103.00 101.50 103.25 0.43 85% 14% Destroy [runnable] thread
+ 175.21 171.50 197.50 6.37 85% 85% Resume [high priority] thread
+ 84.11 79.50 197.25 1.77 98% 0% Thread switch
+
+ 1.00 1.00 1.00 0.00 100% 100% Scheduler lock
+ 20.06 20.00 20.25 0.09 75% 75% Scheduler unlock [0 threads]
+ 20.00 20.00 20.00 0.00 100% 100% Scheduler unlock [1 suspended]
+ 20.06 20.00 20.25 0.09 75% 75% Scheduler unlock [many suspended]
+ 20.06 20.00 20.25 0.09 75% 75% Scheduler unlock [many low prio]
+
+ 4.00 4.00 4.00 0.00 100% 100% Init mutex
+ 33.00 33.00 33.00 0.00 100% 100% Lock [unlocked] mutex
+ 36.77 36.75 37.25 0.03 96% 96% Unlock [locked] mutex
+ 28.13 28.00 28.25 0.13 100% 50% Trylock [unlocked] mutex
+ 25.13 25.00 25.25 0.13 100% 50% Trylock [locked] mutex
+ 4.88 4.75 5.00 0.13 100% 50% Destroy mutex
+ 187.00 187.00 187.00 0.00 100% 100% Unlock/Lock mutex
+
+ 10.00 10.00 10.00 0.00 100% 100% Create mbox
+ 0.69 0.50 0.75 0.09 75% 25% Peek [empty] mbox
+ 34.75 34.75 34.75 0.00 100% 100% Put [first] mbox
+ 0.69 0.50 0.75 0.09 75% 25% Peek [1 msg] mbox
+ 35.00 35.00 35.00 0.00 100% 100% Put [second] mbox
+ 0.69 0.50 0.75 0.09 75% 25% Peek [2 msgs] mbox
+ 36.00 36.00 36.00 0.00 100% 100% Get [first] mbox
+ 36.00 36.00 36.00 0.00 100% 100% Get [second] mbox
+ 31.00 31.00 31.00 0.00 100% 100% Tryput [first] mbox
+ 29.50 29.50 29.50 0.00 100% 100% Peek item [non-empty] mbox
+ 35.25 35.25 35.25 0.00 100% 100% Tryget [non-empty] mbox
+ 27.69 27.50 27.75 0.09 75% 25% Peek item [empty] mbox
+ 31.06 31.00 31.25 0.09 75% 75% Tryget [empty] mbox
+ 0.94 0.75 1.00 0.09 75% 25% Waiting to get mbox
+ 0.94 0.75 1.00 0.09 75% 25% Waiting to put mbox
+ 37.81 37.75 38.00 0.09 75% 75% Delete mbox
+ 112.00 112.00 112.00 0.00 100% 100% Put/Get mbox
+
+ 3.19 3.00 3.25 0.09 75% 25% Init semaphore
+ 25.38 25.25 25.50 0.13 100% 50% Post [0] semaphore
+ 32.63 32.50 32.75 0.13 100% 50% Wait [1] semaphore
+ 24.25 24.25 24.25 0.00 100% 100% Trywait [0] semaphore
+ 25.00 25.00 25.00 0.00 100% 100% Trywait [1] semaphore
+ 4.00 4.00 4.00 0.00 100% 100% Peek semaphore
+ 4.88 4.75 5.00 0.13 100% 50% Destroy semaphore
+ 124.50 124.50 124.50 0.00 100% 100% Post/Wait semaphore
+
+ 6.50 6.50 6.50 0.00 100% 100% Create counter
+ 1.25 1.25 1.25 0.00 100% 100% Get counter value
+ 1.44 1.25 1.50 0.09 75% 25% Set counter value
+ 36.25 36.25 36.25 0.00 100% 100% Tick counter
+ 5.25 5.25 5.25 0.00 100% 100% Delete counter
+
+ 12.25 12.25 12.25 0.00 100% 100% Create alarm
+ 49.13 49.00 49.25 0.13 100% 50% Initialize alarm
+ 2.81 2.75 3.00 0.09 75% 75% Disable alarm
+ 48.50 48.50 48.50 0.00 100% 100% Enable alarm
+ 8.25 8.25 8.25 0.00 100% 100% Delete alarm
+ 46.50 46.50 46.50 0.00 100% 100% Tick counter [1 alarm]
+ 485.42 482.25 580.00 5.91 96% 96% Tick counter [many alarms]
+ 64.00 64.00 64.00 0.00 100% 100% Tick &#38; fire counter [1 alarm]
+ 1109.76 1100.50 1198.00 16.53 90% 90% Tick &#38; fire counters [&#62;1 together]
+ 505.85 502.00 621.00 7.20 96% 96% Tick &#38; fire counters [&#62;1 separately]
+ 96.26 95.75 161.25 1.02 99% 99% Alarm latency [0 threads]
+ 159.20 95.75 160.75 2.52 97% 0% Alarm latency [2 threads]
+ 159.73 110.50 161.75 1.53 97% 0% Alarm latency [many threads]
+ 218.45 211.25 445.75 3.55 97% 1% Alarm -&#62; thread resume latency
+
+ 28.24 25.25 43.25 0.00 Clock/interrupt latency
+
+ 60.15 40.50 221.50 0.00 Clock DSR latency
+
+ 472 424 572 (main stack: 1052) Thread stack used (1912 total)
+All done, main stack : stack used 1052 size 2936
+All done : Interrupt stack used 280 size 4096
+All done : Idlethread stack used 516 size 2048
+
+Timing complete - 30590 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+
+</LITERALLAYOUT>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="rt-s3c4510-aim711">
+<TITLE>Board: ARM Industrial Module AIM711 (S3C4510)</TITLE>
+<LITERALLAYOUT CLASS="MONOSPACED">
+Board: ARM Industrial Module AIM711 (S3C4510)
+CPU : S3C4510B (ARM7TDMI core), 50MHz
+8MB RAM, 2MB Flash
+
+Startup, main stack : stack used 82 size 2400
+Startup : Interrupt stack used 134 size 4096
+Startup : Idlethread stack used 91 size 2048
+
+eCos Kernel Timings
+Notes: all times are in microseconds (.000001) unless otherwise stated
+
+Reading the hardware clock takes 33 'ticks' overhead
+... this value will be factored out of all other measurements
+Clock interrupt took 17.68 microseconds (884 raw clock ticks)
+
+Testing parameters:
+ Clock samples: 32
+ Threads: 64
+ Thread switches: 128
+ Mutexes: 32
+ Mailboxes: 32
+ Semaphores: 32
+ Scheduler operations: 128
+ Counters: 32
+ Flags: 32
+ Alarms: 32
+
+
+ Confidence
+ Ave Min Max Var Ave Min Function
+ ====== ====== ====== ====== ========== ========
+ 22.99 15.24 36.98 4.01 50% 26% Create thread
+ 2.96 2.88 8.30 0.17 98% 98% Yield thread [all suspended]
+ 3.57 3.36 8.76 0.26 93% 71% Suspend [suspended] thread
+ 3.64 3.00 8.74 0.33 65% 20% Resume thread
+ 5.44 4.78 15.10 0.42 75% 26% Set priority
+ 0.77 0.20 1.98 0.25 59% 17% Get priority
+ 14.46 12.40 33.02 1.03 85% 9% Kill [suspended] thread
+ 2.95 2.88 7.44 0.14 98% 98% Yield [no other] thread
+ 6.73 5.40 15.60 0.44 78% 6% Resume [suspended low prio] thread
+ 3.59 2.98 7.18 0.28 56% 21% Resume [runnable low prio] thread
+ 5.77 4.78 13.46 0.44 71% 18% Suspend [runnable] thread
+ 2.97 2.88 8.86 0.18 98% 98% Yield [only low prio] thread
+ 3.40 2.86 6.26 0.26 59% 17% Suspend [runnable->not runnable]
+ 14.15 12.08 30.54 1.09 78% 23% Kill [runnable] thread
+ 11.00 9.74 23.38 0.75 70% 31% Destroy [dead] thread
+ 20.35 17.72 43.00 1.26 73% 14% Destroy [runnable] thread
+ 23.77 21.02 45.38 1.59 68% 35% Resume [high priority] thread
+ 8.40 8.30 15.38 0.18 89% 89% Thread switch
+
+ 0.10 0.08 1.52 0.03 92% 92% Scheduler lock
+ 2.01 1.98 3.80 0.06 92% 92% Scheduler unlock [0 threads]
+ 2.01 1.98 3.80 0.06 92% 92% Scheduler unlock [1 suspended]
+ 2.01 1.98 4.08 0.06 92% 92% Scheduler unlock [many suspended]
+ 2.01 1.98 3.68 0.05 92% 92% Scheduler unlock [many low prio]
+
+ 0.67 0.54 3.90 0.21 96% 96% Init mutex
+ 4.55 4.14 12.40 0.53 96% 87% Lock [unlocked] mutex
+ 4.84 4.12 12.78 0.56 65% 56% Unlock [locked] mutex
+ 3.72 3.18 8.86 0.41 68% 56% Trylock [unlocked] mutex
+ 3.22 2.76 5.38 0.26 65% 28% Trylock [locked] mutex
+ 0.49 0.34 3.26 0.26 93% 84% Destroy mutex
+ 33.13 32.42 43.64 0.66 90% 81% Unlock/Lock mutex
+
+ 1.21 1.06 5.12 0.25 96% 96% Create mbox
+ 0.63 0.46 2.66 0.22 96% 71% Peek [empty] mbox
+ 4.57 3.64 11.12 0.50 75% 18% Put [first] mbox
+ 0.52 0.10 2.74 0.23 62% 18% Peek [1 msg] mbox
+ 5.39 4.46 12.00 0.56 75% 43% Put [second] mbox
+ 0.51 0.10 2.38 0.22 62% 18% Peek [2 msgs] mbox
+ 5.06 4.00 13.86 0.60 81% 18% Get [first] mbox
+ 5.01 4.36 9.20 0.38 68% 25% Get [second] mbox
+ 5.56 4.70 11.22 0.55 75% 37% Tryput [first] mbox
+ 4.25 3.14 10.64 0.49 75% 9% Peek item [non-empty] mbox
+ 5.10 3.82 14.02 0.78 78% 40% Tryget [non-empty] mbox
+ 3.86 3.12 9.72 0.47 81% 21% Peek item [empty] mbox
+ 4.13 3.28 11.20 0.54 87% 59% Tryget [empty] mbox
+ 0.60 0.14 2.34 0.22 68% 9% Waiting to get mbox
+ 0.61 0.14 2.90 0.27 78% 15% Waiting to put mbox
+ 4.51 3.66 11.20 0.53 84% 50% Delete mbox
+ 26.55 26.00 31.46 0.37 78% 40% Put/Get mbox
+
+ 0.53 0.44 2.68 0.15 96% 90% Init semaphore
+ 3.08 2.76 5.02 0.29 43% 46% Post [0] semaphore
+ 3.64 3.20 7.72 0.40 53% 50% Wait [1] semaphore
+ 3.08 2.66 7.40 0.39 50% 50% Trywait [0] semaphore
+ 2.72 2.62 5.88 0.20 96% 96% Trywait [1] semaphore
+ 0.85 0.52 3.30 0.32 50% 50% Peek semaphore
+ 0.80 0.34 3.74 0.39 46% 37% Destroy semaphore
+ 21.87 21.54 25.64 0.28 68% 65% Post/Wait semaphore
+
+ 1.18 1.04 4.92 0.24 96% 96% Create counter
+ 0.69 0.52 2.84 0.24 93% 71% Get counter value
+ 0.26 0.14 1.76 0.18 78% 78% Set counter value
+ 3.73 3.24 5.62 0.14 78% 12% Tick counter
+ 0.79 0.36 3.58 0.19 78% 15% Delete counter
+
+ 0.53 0.44 3.06 0.17 96% 90% Init flag
+ 3.49 3.02 9.28 0.45 53% 50% Destroy flag
+ 2.93 2.52 7.42 0.39 50% 46% Mask bits in flag
+ 3.58 3.12 9.38 0.46 50% 50% Set bits in flag [no waiters]
+ 7.48 7.22 12.90 0.35 96% 96% Wait for flag [AND]
+ 4.92 4.66 11.22 0.39 96% 96% Wait for flag [OR]
+ 4.58 4.30 11.66 0.44 96% 96% Wait for flag [AND/CLR]
+ 4.39 4.12 11.02 0.43 96% 96% Wait for flag [OR/CLR]
+ 0.06 0.00 1.40 0.11 87% 87% Peek on flag
+
+ 1.82 1.58 8.02 0.40 96% 96% Create alarm
+ 7.27 6.54 17.86 0.77 93% 87% Initialize alarm
+ 3.30 2.58 7.28 0.60 56% 71% Disable alarm
+ 7.60 5.82 14.72 0.84 81% 12% Enable alarm
+ 3.86 3.06 9.20 0.67 53% 65% Delete alarm
+ 4.03 3.90 7.18 0.23 96% 90% Tick counter [1 alarm]
+ 25.12 24.98 28.82 0.24 96% 93% Tick counter [many alarms]
+ 7.92 7.64 14.00 0.40 96% 96% Tick & fire counter [1 alarm]
+ 155.10 154.42 161.04 0.37 90% 6% Tick & fire counters [>1 together]
+ 29.27 29.02 35.48 0.42 96% 93% Tick & fire counters [>1 separately]
+ 17.87 17.32 49.30 0.56 98% 97% Alarm latency [0 threads]
+ 24.39 22.02 63.60 1.43 57% 19% Alarm latency [2 threads]
+ 55.33 52.72 62.44 1.11 67% 20% Alarm latency [many threads]
+ 37.98 36.54 170.56 2.17 97% 97% Alarm -> thread resume latency
+
+ 29 0 259 (main stack: 805) Thread stack used (1120 total)
+All done, main stack : stack used 805 size 2400
+All done : Interrupt stack used 163 size 4096
+All done : Idlethread stack used 239 size 2048
+
+Timing complete - 28880 ms total
+
+PASS:&lt;Basic timing OK&#62;
+EXIT:&lt;done&#62;
+</LITERALLAYOUT>
+</SECT1>
+</APPENDIX>
diff --git a/cesar/ecos/doc/sgml/user-guide/target-setup.sgml b/cesar/ecos/doc/sgml/user-guide/target-setup.sgml
new file mode 100644
index 0000000000..1a15d7ad10
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/target-setup.sgml
@@ -0,0 +1,3105 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- config-tool.sgml -->
+<!-- -->
+<!-- eCos User Guide -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+
+<appendix id="appendix-target-setup">
+<title>Target Setup</title>
+
+<para>
+The following sections detail the setup of many of the targets
+supported by eCos.
+</para>
+
+<caution>
+<para>
+This information is presented here only temporarily. It is intended
+that there will be separate documents detailing this information for
+each target in future releases. Consequently not much effort has been
+put into bringing the following documentation up to date -- much of it
+is obsolete, bogus or just plain wrong.
+</para>
+</caution>
+
+<!--
+<para>
+XXXXX Exactly which of these are really supported in 2.0. Can we
+delete some of them. I'm reluctant to waste much time fixing up text
+that is going to be largely rewritten anyway.
+XXXXX
+</para>
+-->
+
+<!-- ==================================================== -->
+
+<SECT1 id="setup-mn10300-stdeval1">
+<TITLE>MN10300 stdeval1 Hardware Setup</TITLE>
+<PARA>The eCos Developer&rsquo;s Kit package comes with a pair
+of EPROMs which provide GDB support for the Matsushita MN10300 (AM31)
+series evaluation board using CygMon, the Cygnus ROM monitor. Images
+of these EPROMs are also provided at <filename>BASE_DIR/loaders/mn10300-stdeval1/cygmon.bin</filename>.
+The LSB EPROM (LROM) is installed to socket IC8 on the board and
+the MSB EPROM (UROM) is installed to socket IC9. Attention should
+be paid to the correct orientation of these EPROMs during installation.</PARA>
+<PARA>The CygMon stubs allows communication with GDB by way of the
+serial port at connector CN2. The communication parameters are fixed
+at 38400 baud, 8 data bits, no parity bit, and 1 stop bit (8-N-1).
+No flow control is employed. Connection to the host computer should
+be made using a standard RS232C serial cable (not a null modem cable).
+A gender changer may also be required.</PARA>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="setup-mn10300-sim">
+<TITLE>MN10300 Architectural Simulator Setup</TITLE>
+<PARA>The MN10300 simulator is an architectural simulator for the
+Matsushita MN10300 that implements all features of the microprocessor
+ necessary to run eCos. The current implementation provides accurate
+simulation of the instruction set, interrupt controller, timers,
+and serial I/O.</PARA>
+<PARA>In this release, you can run the same eCos binaries in the
+simulator that can run on target hardware, if built for ROM start-up,
+with the exception of those that use the watchdog timer.</PARA>
+<PARA>However, note that AM33 devices required to run eCos are not
+simulated; therefore you cannot run eCos binaries built for the
+AM33 under the simulator. For the AM33, the simulator is effectively
+an instruction-set only simulator.</PARA>
+<PARA>To simplify connection to the simulator, you are advised to
+create a GDB macro by putting the following code in your personal
+GDB start-up file (gdb.ini on Windows and .gdbinit on UNIX).</PARA>
+<PROGRAMLISTING>define msim
+ target sim --board=stdeval1 --memory-region 0x34004000,0x8
+
+ rbreak cyg_test_exit
+ rbreak cyg_assert_fail
+end</PROGRAMLISTING>
+<PARA>You can then connect to the simulator by invoking the command <PROGRAMLISTING>msim</PROGRAMLISTING> on
+the command line:</PARA>
+<PROGRAMLISTING>(gdb) msim</PROGRAMLISTING>
+<PARA>You can achieve the same effect by typing out the macro&rsquo;s
+content on the command line if necessary.</PARA>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="setup-am33-stb">
+<TITLE>AM33 STB Hardware Setup</TITLE>
+<PARA>The Matsushita AM33 STB System Reference Board may be used
+in two modes: via a JTAG debugger, or by means of a GDB stub ROM.</PARA>
+<SECT2>
+<TITLE>Use with GDB Stub ROM</TITLE>
+<PARA>The eCos Developer&rsquo;s Kit package comes with a ROM
+image which provides GDB support for
+the Matsushita(R) AM33 STB System Reference Board. To install the
+GDB stub ROM requires the use of the JTAG debugger and the Flash ROM
+programming code available from Matsushita. An image of this ROM
+is also provided at <filename>loaders/am33-stb/gdbload.bin</filename> under
+the root of your eCos installation.</PARA>
+<PARA>Ensure that there is a Flash ROM card in MAIN MEMORY SLOT &lt;0&#62;.
+Follow the directions for programming a Flash ROM supplied with
+the programming software.</PARA>
+<PARA>The final programming of the ROM will need to be done with
+a command similar to the following:</PARA>
+<PROGRAMLISTING>fdown "gdbload.bin",0x80000000,16,1</PROGRAMLISTING>
+<PARA>Once the ROM has been programmed, close down the JTAG debugger,
+turn the STB off, and disconnect the JTAG cable. Ensure that the
+hardware switches are in the following configuration:</PARA>
+<PROGRAMLISTING>U U D D D U D D
+
+D = lower part of rocker switch pushed in
+U = upper part of rocker switch pushed in</PROGRAMLISTING>
+<PARA>This is also the configuration required by the Flash programming
+code, so it should not be necessary to change these.</PARA>
+<PARA>Restart the STB and the stub ROM will now be able to communicate
+with <PRODUCTNAME>GDB</PRODUCTNAME>. eCos programs should be built
+with RAM startup.</PARA>
+<PARA>Programs can then be downloaded via a standard RS232 null
+modem serial cable connected to the SERIAL1 connector on the STB
+front panel (the AM33&quot;s serial port 0). This line is programmed
+to run at 38400 baud, 8 data bits, no parity and 1 stop bit (8-N-1)
+with no flow control. A gender changer may also be required. Diagnostic
+output will be output to GDB using the same connection.</PARA>
+<PARA>This procedure also applies for programming ROM startup eCos
+programs into ROM, given a binary format image of the program from<PROGRAMLISTING> mn10300-elf-objcopy.</PROGRAMLISTING></PARA>
+</SECT2>
+<SECT2>
+<TITLE>Use with the JTAG debugger</TITLE>
+<PARA>To use eCos from the JTAG debugger, executables must be built
+with ROM startup and then downloaded via the JTAG debugger. For
+this to work there must be an SDRAM memory card in SUB MEMORY SLOT &lt;0&#62; and
+the hardware switches on the front panel set to the following: </PARA>
+<PROGRAMLISTING>D U D D D U D D
+
+D = lower part of rocker switch pushed in
+U = upper part of rocker switch pushed in</PROGRAMLISTING>
+<PARA>Connect the JTAG unit and run the debugger as described in
+the documentation that comes with it.</PARA>
+<PARA>eCos executables should be renamed to have a &ldquo;.out&rdquo; extension
+and may then be loaded using the debugger&quot;s &ldquo;l&rdquo; or &ldquo;lp&rdquo; commands.</PARA>
+<PARA>Diagnostic output generated by the program will be sent out
+of the AM33&quot;s serial port 0 which is connected to the SERIAL1
+connector on the STB front panel. This line is programmed to run
+at 38400 baud, 8 data bits, no parity, and one stop bit (8-N-1)
+with no flow control. Connection to the host computer should be
+using a standard RS232 null modem serial cable. A gender changer
+may also be required.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Building the GDB stub ROM image</TITLE>
+<PARA>eCos comes with a pre-built GDB stub ROM image for the AM33-STB
+platform. This can be found at <filename>loaders/am33-stb/gdbload.bin</filename> relative
+to the eCos installation directory.</PARA>
+<PARA>If necessary, the ROM image can be re-built as follows:</PARA>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA> On Windows hosts, open a Bash session using
+<EMPHASIS>Start-&#62;Programs-&#62;Red Hat eCos-&#62;eCos
+Development Environment</EMPHASIS></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Create a build directory and cd into it</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Run (all as one line):
+
+<PROGRAMLISTING>cygtclsh80 BASE_DIR/packages/pkgconf.tcl \
+ --target=mn10300_am33 --platform stb --startup rom \
+ --disable-kernel --disable-uitron --disable-libc --disable-libm \
+ --disable-io --disable-io_serial --disable-wallclock
+--disable-watchdog</PROGRAMLISTING>
+ </PARA>
+<PARA>where BASE_DIR is the path to the eCos installation
+directory.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Edit the configuration file
+<filename>pkgconf/hal.h</filename>
+ in the build directory tree by ensuring the following configuration
+options are set as follows:
+
+<PROGRAMLISTING>#define CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+#define CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
+#undef CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
+#define CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
+#define CYG_HAL_ROM_MONITOR</PROGRAMLISTING>
+ </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Run: make</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Run: make -C hal/common/current/current/src/stubrom</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>The file
+<filename>hal/common/current/src/stubrom</filename>
+ will be an ELF format executable of the ROM image. Use mn10300-elf-objcopy to
+convert this to the appropriate format for loading into the Matsushita
+FLASH ROM programmer, mode &ldquo;binary&rdquo; in this case:
+
+<PROGRAMLISTING>$ mn10300-elf-objcopy -O binary hal/common/current/src/stubrom/ \
+ stubrom stubrom.img</PROGRAMLISTING></PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT2>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="setup-tx39-jmr3904">
+<TITLE>TX39 Hardware Setup</TITLE>
+<PARA>The eCos Developer&rsquo;s Kit package comes with a pair
+of ROMs that provide GDB support for
+the Toshiba JMR-TX3904 RISC processor reference board by way of CygMon. </PARA>
+<PARA>Images of these ROMs are also provided at <filename>BASE_DIR/loaders/tx39-jmr3904/cygmon50.bin</filename> and <filename>BASE_DIR/loaders/tx39-jmr3904/cygmon66.bin</filename> for
+50 MHz and 66 MHz boards respectively. The ROMs are installed to
+sockets IC6 and IC7 on the memory daughterboard according to their
+labels. Attention should be paid to the correct orientation of these
+ROMs during installation.</PARA>
+<PARA>The GDB stub allows communication with GDB using the serial
+port (channel C) at connector PJ1. The communication parameters
+are fixed at 38400 baud, 8 data bits, no parity bit, and 1 stop
+bit (8-N-1). No handshaking is employed. Connection to the host
+computer should be made using an RS232C null modem cable.</PARA>
+<PARA>CygMon and eCos currently provide support for a 16Mbyte 60ns
+72pin DRAM SIMM fitted to the PJ21 connector. Different size DRAMs
+may require changes in the value stored in the DCCR0 register. This
+value may be found near line 211 in <filename>hal/mips/arch/<replaceable>&Version;</replaceable>/src/vectors.S</filename>
+in eCos, and near line 99 in
+ <filename>libstub/mips/tx39jmr/tx39jmr-power.S</filename> in
+CygMon. eCos does not currently use the DRAM for any purpose itself,
+so it is entirely available for application use.</PARA>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="setup-tx39-sim">
+<TITLE>TX39 Architectural Simulator Setup</TITLE>
+<PARA>The TX39 simulator is an architectural simulator which implements
+all the features of the Toshiba TX39 needed to run eCos. The current
+implementation provides accurate simulation of the instruction set,
+ interrupt controller, and timers, as well as having generic support
+for diagnostic output, serial I/O, and exceptions.</PARA>
+<PARA>In this release, you can run the same eCos binaries in the
+simulator that can run on target hardware, if it is built for ROM
+start-up.</PARA>
+<PARA>To simplify connection to the simulator, you are advised to
+create a GDB macro by putting the following code in your personal
+GDB start-up file (gdb.ini on Windows and .gdbinit on UNIX).</PARA>
+<PROGRAMLISTING>define tsim
+ target sim --board=jmr3904pal --memory-region 0xffff8000,0x900 \
+ --memory-region 0xffffe000,0x4 \
+ --memory-region 0xb2100000,0x4
+ rbreak cyg_test_exit
+ rbreak cyg_assert_fail
+end</PROGRAMLISTING>
+<PARA>You can then connect to the simulator by invoking the command <command>tsim</command> on
+the command line:</PARA>
+<PROGRAMLISTING>(gdb) tsim</PROGRAMLISTING>
+<PARA>You can achieve the same effect by typing out the macro&rsquo;s
+content on the command line if necessary.</PARA>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="setup-tx49-ref4955">
+<TITLE>TX49 Hardware Setup</TITLE>
+<PARA>The eCos installation CD contains a copy of the eCos GDB stubs
+in SREC format which must be programmed into the board&rsquo;s
+FLASH memory.</PARA>
+<SECT2>
+<TITLE>Preparing the GDB stubs</TITLE>
+<PARA>These stub preparation steps are not strictly necessary as
+the eCos distribution ships with pre-compiled stubs in the directory <filename>loaders/tx49-ref4955</filename> relative
+to the installation root.</PARA>
+<SECT3>
+<TITLE>Building the GDB stub image with the eCos Configuration Tool</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA> Start with a new document - selecting the
+<EMPHASIS>File-&#62;New</EMPHASIS>
+ menu item if necessary to do this.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Choose the
+<EMPHASIS>Build-&#62;Templates</EMPHASIS>
+ menu item, and then select the TX49 REF4955 hardware.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>While still displaying the
+<EMPHASIS>Build-&#62;Templates</EMPHASIS>
+ dialog box, select the stubs package template to build a GDB stub.
+Click
+<EMPHASIS>OK</EMPHASIS>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Build eCos stubs using
+<EMPHASIS>Build-&#62;Library</EMPHASIS>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. GDB stub
+images have the prefix gdb_module.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+<SECT3>
+<TITLE> Building the GDB stub image with ecosconfig</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA> Make an empty directory to contain the build tree,
+ and cd into it.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>To build a GDB stub ROM image, enter the command:</PARA>
+<PROGRAMLISTING>$ ecosconfig new ref4955 stubs </PROGRAMLISTING>
+</LISTITEM>
+<LISTITEM>
+<PARA>Enter the commands:</PARA>
+<PROGRAMLISTING>$ ecosconfig tree
+$ make</PROGRAMLISTING>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. GDB stub
+images have the prefix gdb_module.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+</SECT2>
+<SECT2>
+<TITLE> Installing GDB stubs into FLASH</TITLE>
+<PARA>Boot into the board&rsquo;s firmware in little-endian mode:</PARA>
+<PARA>Set the switches like this: </PARA>
+<PARA>SW1: 10000000 (first lever up, the rest down)
+SW2: 10000010</PARA>
+<PARA>Connect serial cable on the lower connector, configure terminal
+emulator for 38400, 8-N-1.</PARA>
+<PARA>When booting the board, you should get this prompt:</PARA>
+<PROGRAMLISTING>HCP5 rev 0.9B .
+HCP5?</PROGRAMLISTING>
+<PARA>Select o (option), a (FLASH) and b (boot write). You should
+see this:</PARA>
+<PROGRAMLISTING>Boot ROM Write
+ROM address-ffffffffbd000000, Boot Bus-[32bit]
+ID2 0 4 ffffffffa002ad40
+zzz SS-40000 IV-1 CS-20000 CC-2
+Flash ROM-[28F640J5], [16bit chip] * 2 * 1
+Block size-00040000 count-64
+ROM adr ffffffffbd000000-ffffffffbe000000 mask-00fc0000
+Send Srecord file sa=00000000 size=ffffffffffffffff
+ra=fffffffffe000000
+ </PROGRAMLISTING>
+<PARA>Now send the stub SREC data down to the board using the terminal
+ emulator&rsquo;s &lsquo;send ASCII&rsquo; (or similar)
+functionality. </PARA>
+<PARA>Red Hat has experienced some sensitivity to how fast the data
+is written to the board. Under Windows you should configure Minicom
+to use a line delay of 100 milliseconds. Under Linux, use the slow_cat.tcl
+ script:</PARA>
+<PROGRAMLISTING>% cd BASE_DIR/packages/hal/mips/ref4955/<replaceable>&Version;</replaceable>/misc
+% slow_cat.tcl &lt; [path]/gdb_module.srec &#62; /dev/ttyS0</PROGRAMLISTING>
+<PARA>Power off the board, and change it to boot the GDB stubs in
+big-endian mode by setting the switches like this:</PARA>
+<PARA>SW1: 00000000 (all levers down)
+SW2: 10001010</PARA>
+<PARA>The GDB stubs allow communication with GDB using the serial
+port at connector PJ7A (lower connector). The communication parameters
+are fixed at 38400 baud, 8 data bits, no parity bit and 1 stop
+bit (8-N-1). No flow control is employed. Connection to the host
+computer should be made using a straight through serial cable.</PARA>
+</SECT2>
+</SECT1>
+
+<!-- ==================================================== -->
+
+<SECT1 id="setup-vr4300-vrc4373">
+<TITLE>VR4300 Hardware Setup</TITLE>
+<PARA>The eCos Developer&rsquo;s Kit package comes with an EPROM
+which provides GDB support for the NEC
+VRC4373 evaluation board. An image of this EPROM is also provided
+at <filename>loaders/vr4300-vrc4373/gdbload.bin</filename> under
+the root of your eCos installation.</PARA>
+<PARA>The EPROM is installed to socket U12 on the board. Attention
+should be paid to the correct orientation of the EPROM during installation.
+Only replace the board&quot;s existing ROM using a proper PLCC
+extraction tool, as the socket would otherwise risk getting damaged. </PARA>
+<PARA>The GDB stub in the EPROM allows communication with GDB using
+the serial port at connector J1. The communication parameters are
+fixed at 38400 baud, 8 data bits, no parity bit and 1 stop bit (8-N-1).
+No flow control is employed. Connection to the host computer should
+be made using a straight-through serial cable. </PARA>
+</SECT1>
+<SECT1 id="setup-vr4300-vrc4375">
+<TITLE>VRC4375 Hardware Setup</TITLE>
+<PARA>For information about setting up the VRC4375 to run with RedBoot,
+consult the RedBoot User&quot;s Guide. If using serial debugging,
+the serial line runs at 38400 baud 8-N-1 and should be connected
+to the debug host using the cable supplied with the board.</PARA>
+</SECT1>
+<SECT1 id="setup-mips-atlasmalta">
+<TITLE>Atlas/Malta Hardware Setup</TITLE>
+<PARA>For information about setting up the Atlas and Malta boards to
+run with RedBoot, consult the RedBoot User&quot;s Guide.</PARA>
+</SECT1>
+<SECT1 id="setup-ppc-cogent">
+<TITLE>PowerPC Cogent Hardware Setup</TITLE>
+<PARA>The eCos Developer&rsquo;s Kit package comes with an EPROM
+which provides GDB support for the Cogent
+evaluation board. An image of this EPROM is also provided at
+ <filename>loaders/powerpc-cogent/gdbload.bin</filename> under
+the root of your eCos installation. The same EPROM and image can
+be used on all three supported daughterboards: CMA287-23 (MPC823),
+CMA287-50 (MPC850), and CMA286-60 (MPC860).</PARA>
+<PARA>The EPROM is installed to socket U4 on the board. Attention
+should be paid to the correct orientation of the EPROM during installation. </PARA>
+<PARA>If you are going to burn a new EPROM using the binary image,
+be careful to get the byte order correct. It needs to be big-endian.
+If the EPROM burner software has a hex-editor, check that the first
+few bytes of the image look like: </PARA>
+<PROGRAMLISTING>00000000: 3c60 fff0 6063 2000 7c68 03a6 4e80 0020 &lt;&grave;..&grave;c.|h..N.. </PROGRAMLISTING>
+<PARA>If the byte order is wrong you will see 603c instead of 3c60
+etc. Use the EPROM burner software to make a byte-swap before you
+burn to image to the EPROM. </PARA>
+<PARA>If the GDB stub EPROM you burn does not work, try reversing
+the byte-order, even if you think you have it the right way around.
+At least one DOS-based EPROM burner program is known to have the
+byte-order upside down.</PARA>
+<PARA>The GDB stub in the EPROM allows communication with GDB using
+the serial port at connector P12 (CMA101) or P3 (CMA102). The communication parameters
+are fixed at 38400 baud, 8 data bits, no parity bit and 1 stop bit
+(8-N-1). No flow control is employed. Connection to the host computer
+should be made using a dedicated serial cable as specified in the
+Cogent CMA manual.</PARA>
+<SECT2>
+<TITLE>Installing the Stubs into ROM</TITLE>
+<SECT3>
+<TITLE>Preparing the Binaries</TITLE>
+<PARA>These two binary preparation steps are not strictly necessary
+as the eCos distribution ships with pre-compiled binaries in the
+directory <filename>loaders/powerpc-cogent</filename> relative to the installation
+root.</PARA>
+<SECT4>
+<TITLE>Building the ROM images with the eCos Configuration Tool</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Start with a new document - selecting the
+<EMPHASIS>File-&#62;New</EMPHASIS>
+ menu item if necessary to do this.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Choose the
+<EMPHASIS>Build-&#62;Templates</EMPHASIS>
+ menu item, and then select the PowerPC CMA28x hardware.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>While still displaying the
+<EMPHASIS>Build-&#62;Templates</EMPHASIS>
+ dialog box, select the &ldquo;stubs&rdquo; package template
+to build a GDB stub. Click
+<EMPHASIS>OK</EMPHASIS>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Build eCos using
+<EMPHASIS>Build-&#62;Library</EMPHASIS>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. GDB stub
+ROM images have the prefix &ldquo;gdb_module&rdquo;.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT4>
+<SECT4>
+<TITLE>Building the ROM images with ecosconfig</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Make an empty directory to contain the build tree,
+and cd into it.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>To build a GDB stub ROM image, enter the command:
+
+<PROGRAMLISTING>$ ecosconfig new cma28x stubs </PROGRAMLISTING></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Enter the commands:
+
+<PROGRAMLISTING>$ ecosconfig tree
+$ make</PROGRAMLISTING>
+ </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. GDB stub
+ROM images have the prefix &ldquo;gdb_module&rdquo;.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT4>
+</SECT3>
+<SECT3>
+<TITLE> Installing the Stubs into ROM or FLASH</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Program the binary image file gdb_module.bin
+into ROM or FLASH referring to the instructions of your ROM programmer.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Plug the ROM/FLASH into socket U4 as described
+at the beginning of this <EMPHASIS>Hardware Setup</EMPHASIS> section.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+</SECT2>
+</SECT1>
+<SECT1 id="setup-ppc-mbx860">
+<TITLE>PowerPC MBX860 Hardware Setup</TITLE>
+<PARA>The eCos Developer&rsquo;s Kit package comes with an EPROM
+which provides GDB support for the Motorola
+PowerPC MBX860 evaluation board. An image of this EPROM is also
+provided at <filename>loaders/powerpc-mbx/gdbload.bin</filename> under
+the root of your eCos installation.</PARA>
+<PARA>The EPROM is installed to socket XU1 on the board. Attention
+should be paid to the correct orientation of the EPROM during installation.
+Only replace the board&quot;s existing ROM using a proper PLCC
+extraction tool, as the socket would otherwise risk getting damaged.</PARA>
+<PARA>The GDB stub in the EPROM allows communication with GDB using
+the serial port at connector SMC1/COM1. The communication
+parameters are fixed at 38400 baud, 8 data bits, no parity bit and
+1 stop bit (8-N-1). No flow control is employed. Connection to the
+host computer should be made using a suitable serial cable.</PARA>
+<PARA>In order to make the board execute the EPROM that you just
+installed (rather than the on-board FLASH memory), it may be necessary
+move some links on the board. Specifically, ensure that link J4
+is in position 1-2. If in doubt, refer to the MBX documentation
+from Motorola, ensuring that Boot Port Size=8 Bits/ROM
+for BOOT (CS#7), in their terminology.</PARA>
+<SECT2>
+<TITLE>Installing the Stubs into FLASH</TITLE>
+<SECT3>
+<TITLE>Preparing the Binaries</TITLE>
+<PARA>These two binary preparation steps are not strictly necessary
+as the eCos distribution ships with pre-compiled binaries in the
+directory <filename>loaders/powerpc-mbx</filename> relative to the installation
+root.</PARA>
+<SECT4>
+<TITLE>Building the ROM images with the eCos Configuration Tool</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Start with a new document - selecting the
+<EMPHASIS>File-&#62;New</EMPHASIS>
+ menu item if necessary to do this.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Choose the
+<EMPHASIS>Build-&#62;Templates</EMPHASIS>
+ menu item, and then select the PowerPC Motorola MBX860/821
+hardware.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>While still displaying the
+<EMPHASIS>Build-&#62;Templates</EMPHASIS>
+ dialog box, select the &ldquo;stubs&rdquo; package template
+to build a GDB stub. Click
+<EMPHASIS>OK</EMPHASIS>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Build eCos using
+<EMPHASIS>Build-&#62;Library</EMPHASIS>. </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. GDB stub
+ROM images have the prefix &ldquo;gdb_module&rdquo;.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT4>
+<SECT4>
+<TITLE>Building the ROM images with ecosconfig</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Make an empty directory to contain the build tree,
+and cd into it.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>To build a GDB stub ROM image, enter the command:
+
+<PROGRAMLISTING>$ ecosconfig new mbx stubs </PROGRAMLISTING></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Enter the commands:
+
+<PROGRAMLISTING>$ ecosconfig tree
+$ make </PROGRAMLISTING></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. GDB stub
+ROM images have the prefix &ldquo;gdb_module&rdquo;.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT4>
+</SECT3>
+<SECT3>
+<TITLE> Installing the Stubs into ROM</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA> Program the binary image file gdb_module.bin
+into ROM or FLASH referring to the instructions of your ROM programmer.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Plug the ROM/FLASH into socket XU1 as described
+near the beginning of this <EMPHASIS>Hardware Setup</EMPHASIS> section.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+<SECT3>
+<TITLE>Installing the Stubs into FLASH</TITLE>
+<PARA>This assumes you have EPPC-Bug in the on-board FLASH. This
+can be determined by setting up the board according to the below
+instructions and powering up the board. The EPPC-Bug prompt should
+appear on the SMC1 connector at 9600 baud, 8N1.</PARA>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Set jumper 3 to 2-3 [allow XU2 FLASH to
+be programmed]</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Set jumper 4 to 2-3 [boot EPPC-Bug]</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+<SECT4>
+<TITLE> Program FLASH</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA> Prepare EPPC-Bug for download:</PARA>
+<PROGRAMLISTING>EPPC-Bug&#62;lo 0</PROGRAMLISTING>
+<PARA>At this point the monitor is ready for input. It will not return
+the prompt until the file has been downloaded.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Use the terminal emulator&rsquo;s ASCII download feature
+(or a simple clipboard copy/paste operation) to download
+the gdb_module.srec data.
+
+Note that on Linux, Minicom&rsquo;s ASCII download feature seems
+to be broken. A workaround is to load the file into Emacs (or another
+editor) and copy the full contents to the clipboard. Then press
+the mouse paste-button (usually the middle one) over the Minicom
+window.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Program the FLASH with the downloaded data:
+
+<PROGRAMLISTING>EPPC-Bug&#62;pflash 40000 60000 fc000000</PROGRAMLISTING></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Switch off the power, and change jumper 4 to 1-2. Turn
+on the power again. The board should now boot using the newly programmed
+stubs.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT4>
+</SECT3>
+</SECT2>
+</SECT1>
+<SECT1 id="setup-ppc-sim">
+<TITLE>PowerPC Architectural Simulator Setup</TITLE>
+<PARA>The PowerPC simulator is an architectural simulator which
+implements all the features of the PowerPC needed to run eCos. The
+current implementation provides accurate simulation of the instruction
+set and timers, as well as having generic support for diagnostic
+output and exceptions.</PARA>
+<PARA>The simulator also allows devices to be simulated, but no
+device simulation support has been defined for the serial device
+drivers in this release.</PARA>
+<PARA>To simplify connection to the simulator, you are advised to
+create a GDB macro by putting the following code in your personal
+GDB start-up file (gdb.ini on Windows and .gdbinit on UNIX).</PARA>
+<PROGRAMLISTING>define psim
+ target sim -o &rsquo;/iobus/pal&commat;0xf0001000/reg 0xf0001000 32&rsquo;
+ rbreak cyg_test_exit
+ rbreak cyg_assert_fail
+end</PROGRAMLISTING>
+<PARA>You can then connect to the simulator by invoking the command <command>psim</command> on
+the command line:</PARA>
+<PROGRAMLISTING>(gdb) psim</PROGRAMLISTING>
+<PARA>You can achieve the same effect by typing out the macro&rsquo;s
+content on the command line if necessary.</PARA>
+<NOTE>
+<PARA>The PowerPC simulator cannot execute binaries built for any
+of the supported hardware targets. You must generate a configuration
+using the PowerPC simulator platform:
+<PROGRAMLISTING>$ ecosconfig new psim</PROGRAMLISTING>
+ or some such.</PARA>
+</NOTE>
+</SECT1>
+<SECT1 id="setup-sparclite-sleb">
+<TITLE>SPARClite Hardware Setup</TITLE>
+<PARA>The eCos Developer&rsquo;s Kit package comes with a ROM
+which provides GDB support for the Fujitsu SPARClite Evaluation
+Board by way of CygMon<PRODUCTNAME>. </PRODUCTNAME></PARA>
+<PARA>An image of this ROM is also provided at
+ <filename>BASE_DIR/loaders/sparclite-sleb/cygmon.bin.</filename> The
+ROM is installed in socket IC9 on the evaluation board. Attention
+should be paid to the correct orientation of the ROM during installation.</PARA>
+<PARA>The GDB stub allows communication with GDB using a TCP channel
+via the ethernet port at connector J5.</PARA>
+<SECT2>
+<TITLE><!-- <index></index> --><!-- <xref> -->Ethernet Setup</TITLE>
+<PARA>The ethernet setup is described in the board&rsquo;s manual,
+but here is a recapitulation.</PARA>
+<PARA>Set the board&rsquo;s ethernet address using SW1 on the
+motherboard:</PARA>
+<PROGRAMLISTING> SW1-4 SW1-3 SW1-2 SW1-1 Ethernet Address
+ ----- ----- ----- ----- ----------------
+ OFF OFF OFF OFF No ethernet, use serial
+ OFF OFF OFF ON 00:00:0E:31:00:01
+ OFF OFF ON OFF 00:00:0E:31:00:02
+ OFF OFF ON ON 00:00:0E:31:00:03
+ OFF ON OFF OFF 00:00:0E:31:00:04
+ OFF ON OFF ON 00:00:0E:31:00:05
+ OFF ON ON OFF 00:00:0E:31:00:06
+ OFF ON ON ON 00:00:0E:31:00:07
+ ON OFF OFF OFF 00:00:0E:31:00:08
+ ON OFF OFF ON 00:00:0E:31:00:09
+ ON OFF ON OFF 00:00:0E:31:00:0A
+ ON OFF ON ON 00:00:0E:31:00:0B
+ ON ON OFF OFF 00:00:0E:31:00:0C
+ ON ON OFF ON 00:00:0E:31:00:0D
+ ON ON ON OFF 00:00:0E:31:00:0E
+ ON ON ON ON 00:00:0E:31:00:0F</PROGRAMLISTING>
+<SECT3><!-- <index></index> -->
+<TITLE>BOOTP/DHCP service on Linux</TITLE>
+<PARA>Configure the BOOTP or DHCP server on the network to recognize
+the evaluation board&rsquo;s ethernet address so it can assign
+the board an IP address. Below is a sample DHCP server configuration
+from a Linux system (<filename>/etc/dhcpd.conf</filename>).
+It shows a setup for three evaluation boards.</PARA>
+<PROGRAMLISTING>#
+# DHCP server configuration.
+#
+allow bootp;
+
+subnet 192.168.1.0 netmask 255.255.255.0 {
+ host mb831evb {
+ hardware ethernet 00:00:0e:31:00:01;
+ fixed-address mb831evb;
+ }
+ host mb832evb {
+ hardware ethernet 00:00:0e:31:00:02;
+ fixed-address mb832evb;
+ }
+ host mb833evb {
+ hardware ethernet 00:00:0e:31:00:03;
+ fixed-address mb833evb;
+ }
+} </PROGRAMLISTING>
+</SECT3>
+<SECT3><!-- <index></index> -->
+<TITLE>BOOTP/DHCP boot process</TITLE>
+<PARA>Even when configured to use a TCP channel, CygMon will still
+print a boot message to the serial channel. If the BOOTP process
+was successful and an IP address was found, a message &ldquo;BOOTP
+found xxx.xxx.xxx.xxx&rdquo; will be printed where xxx.xxx.xxx.xxx
+is the IP address assigned by the BOOTP or DHCP server. If the BOOTP
+process fails, a message indicating failure will be printed and
+the serial port will be used as the debug channel.</PARA>
+<PARA>Once the board finds an IP address it will respond to ICMP
+echo request packets (ping). This gives a simple means to test the
+health of the board.</PARA>
+<PARA>As described in &ldquo;Ethernet Setup&rdquo; on&nbsp;page&nbsp;72,
+it should now be possible to connect to the SPARClite board from
+within GDB by using the command:</PARA>
+<PROGRAMLISTING>(gdb) target remote &lt;host&#62;:1000</PROGRAMLISTING>
+</SECT3>
+</SECT2>
+<SECT2>
+<TITLE>Serial Setup</TITLE>
+<PARA>The CygMon stubs also allow communication with GDB by way
+of the serial port at connector CON1. The communication parameters
+are fixed at 19200 baud, 8 data bits, no parity bit and 1 stop bit
+(8-N-1). No flow control is employed. Connection to the host computer
+should be made using a null modem cable. A gender changer may also
+be required.</PARA>
+</SECT2>
+</SECT1>
+<SECT1 id="setup-sparclite-sim">
+<TITLE>SPARClite Architectural Simulator Setup</TITLE>
+<PARA>The ESA SPARClite simulator is an architectural simulator
+which implements all the features of the SPARClite needed to run
+eCos. The current implementation provides accurate simulation of
+the instruction set, interrupt controller, and timers, as well as
+having generic support for diagnostic output and exceptions.</PARA>
+<PARA>Note that the ESA SPARClite simulator is unsupported, but
+is included in the release as a convenience.</PARA>
+<PARA>To simplify connection to the simulator, you are advised to
+create a GDB macro by putting the following code in your personal
+GDB start-up file (gdb.ini on Windows and .gdbinit on UNIX).</PARA>
+<PROGRAMLISTING>define ssim
+ target sim -nfp -sparclite -dumbio
+ rbreak cyg_test_exit
+ rbreak cyg_assert_fail
+end</PROGRAMLISTING>
+<PARA>You can then connect to the simulator by invoking the command <command>ssim</command> on
+the command line:</PARA>
+<PROGRAMLISTING>(gdb) ssim</PROGRAMLISTING>
+<PARA>You can achieve the same effect by typing out the macro&rsquo;s
+content on the command line if necessary.</PARA>
+</SECT1>
+<SECT1 ID="setup-arm-pid">
+<TITLE><!-- <index></index> --><!-- <xref> -->ARM PID Hardware Setup</TITLE>
+<PARA>eCos comes with two ROM images that provide GDB support for
+the ARM PID board. The first ROM image provides a port of the CygMon
+ROM monitor, which includes a command-line interface and a GDB remote
+stub. The second ROM image provides a remote GDB stub only, which
+is a minimal environment for downloading and debugging eCos programs
+solely using GDB.</PARA>
+<PARA>eCos, CygMon and the GDB stubs all support the PID fitted
+with both ARM7T and ARM9 daughterboards. CygMon and the stubs can
+be programmed into either the programmable ROM (U12) or the FLASH
+(U13). Pre-built forms of both ROM images are provided in the directory
+loaders/arm-pid under the root of your eCos installation,
+along with a tool that will program the stubs into the FLASH memory on
+the board. CygMon images are prefixed with the name 'cygmon' and
+GDB stub ROM images are given the prefix 'gdb_module'.
+Images may be provided in a number of formats including ELF (.img
+extension), binary (.bin extension) and SREC (.srec extension).
+Note that some unreliability has been experienced in downloading
+files using Angel 1.00. Angel 1.02 appears to be more robust in
+this application.</PARA>
+<SECT2>
+<TITLE>Installing the Stubs into FLASH</TITLE>
+<SECT3>
+<TITLE>Preparing the Binaries</TITLE>
+<PARA>These two binary preparation steps are not strictly necessary
+as the eCos distribution ships with pre-compiled binaries in the
+directory loaders/arm-pid relative to the installation
+root.</PARA>
+</SECT3>
+<SECT3>
+<TITLE>Building the ROM images with the eCos Configuration Tool</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Start with a new document - selecting the
+<EMPHASIS>File</EMPHASIS>-&#62;<EMPHASIS>New</EMPHASIS>
+ menu item if necessary to do this.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Choose the
+<EMPHASIS>Build</EMPHASIS>
+-&#62;
+<EMPHASIS>Templates</EMPHASIS>
+ menu item, and then select the ARM PID hardware.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>While still displaying the
+<EMPHASIS>Build</EMPHASIS>
+-&#62;
+<EMPHASIS>Templates</EMPHASIS>
+ dialog box, select either the "stubs" package template to build
+a GDB stub image, or the "cygmon" template to build the CygMon ROM
+Monitor. Click
+<EMPHASIS>OK</EMPHASIS>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Build eCos using
+<EMPHASIS>Build</EMPHASIS>
+-&#62;
+<EMPHASIS>Library</EMPHASIS></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. GDB stub
+ROM images have the prefix "gdb_module". CygMon images
+have the prefix "cygmon".</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+<SECT3>
+<TITLE>Building the ROM images with ecosconfig</TITLE>
+<!-- <PARA>(See <XREF LINKEND="USING-ECOSCONFIG-ON-UNIX">)</PARA> -->
+<ORDEREDLIST>
+<LISTITEM>
+<PARA> Make an empty directory to contain the build tree,
+and cd into it.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>To build a GDB stub ROM image, enter the command:</PARA>
+<PROGRAMLISTING>$ ecosconfig new pid stubs</PROGRAMLISTING>
+<PARA>or to build a CygMon ROM monitor image, enter the command:</PARA>
+<PROGRAMLISTING>$ ecosconfig new pid cygmon</PROGRAMLISTING>
+</LISTITEM>
+<LISTITEM>
+<PARA>Enter the commands:</PARA>
+<PROGRAMLISTING>$ ecosconfig tree
+$ make</PROGRAMLISTING>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. GDB stub
+ROM images have the prefix "gdb_module". CygMon images
+have the prefix "cygmon".</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+<SECT3>
+<TITLE>Building the FLASH Tool with the eCos Configuration Tool</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Start with a new document - selecting the
+<EMPHASIS>File</EMPHASIS>-&#62;<EMPHASIS>New</EMPHASIS>
+ menu item if necessary to do this.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Choose the
+<EMPHASIS>Build</EMPHASIS>-&#62;<EMPHASIS>Templates</EMPHASIS>
+ menu item, and then select the ARM PID hardware.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Enable the "Build flash programming tool" option in the
+ARM PID HAL (CYGBLD_BUILD_FLASH_TOOL)
+and resolve any resulting configuration conflicts.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Build eCos using
+<EMPHASIS>Build</EMPHASIS>
+-&#62;
+<EMPHASIS>Library</EMPHASIS></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the FLASH tool image file can
+be found in the bin/ subdirectory of the install tree,
+with the prefix "prog_flash"</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+<SECT3>
+<TITLE>Building the FLASH Tool with ecosconfig</TITLE>
+<!-- <PARA>(See <XREF LINKEND="USING-ECOSCONFIG-ON-UNIX">)</PARA> -->
+<ORDEREDLIST>
+<LISTITEM>
+<PARA> Make an empty directory to contain the build tree,
+and cd into it
+ </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Enter the command:</PARA>
+<PROGRAMLISTING>$ ecosconfig new pid</PROGRAMLISTING>
+</LISTITEM>
+<LISTITEM>
+<PARA>Edit the file ecos.ecc and enable the option CYGBLD_BUILD_FLASH_TOOL
+by uncommenting its user_value property and setting it
+to 1.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Enter the commands:</PARA>
+<PROGRAMLISTING>$ ecosconfig resolve</PROGRAMLISTING>
+<PARA>[there will be some output]</PARA>
+<PROGRAMLISTING>$ ecosconfig tree
+$ make</PROGRAMLISTING>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the FLASH tool image file can
+be found in the bin/ subdirectory of the install tree,
+with the prefix "prog_flash"</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+<SECT3>
+<TITLE>Prepare the Board for FLASH Programming</TITLE>
+<PARA>Each time a new image is to be programmed in the FLASH, the
+jumpers on the board must be set to allow Angel to run:</PARA>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA> Set jumper 7-8 on LK6 [using the Angel code
+in the 16 bit EPROM]</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Set jumper 5-6 on LK6 [select 8bit ROM mode]</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Set jumper LK18 [ROM remap - this is
+also required for eCos]</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Set S1 to 0-0-1-1 [20MHz operation]</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Open jumper LK4 [enable little-endian operation]
+
+Attach a serial cable from Serial A on the PID board to connector
+1 on the development system. This is the cable through which the
+binaries will be downloaded. Attach a serial cable from Serial B
+on the PID board to connector 2 on the development system (or any
+system that will work as a terminal). Through this cable, the FLASH
+tool will write its instructions (at 38400 baud).</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+<SECT3>
+<TITLE>Program the FLASH</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Download the FLASH ROM image onto the PID board. For
+example. for the GDB stubs image:
+
+<PROGRAMLISTING>bash$ arm-elf-gdb -nw gdb_module.img
+GNU gdb 4.18-DEVTOOLSVERSION
+Copyright 1998 Free Software Foundation, Inc.
+GDB is free software, covered by the GNU General Public License,
+and you are welcome to change it and/or distribute copies
+of it under certain conditions. Type "show copying" to see the conditions.
+There is absolutely no warranty for GDB. Type "show warranty" for details.
+This GDB was configured as "--host=i586-pc-cygwin32 --target=arm-elf".
+(no debugging symbols found)...
+(gdb) target rdi s=com1
+Angel Debug Monitor for PID (Built with Serial(x1), Parallel, DCC) 1.00
+(Advanced RISC Machines SDT 2.10)
+Angel Debug Monitor rebuilt on Jan 20 1997 at 02:33:43
+Connected to ARM RDI target.
+(gdb) load
+Loading section .rom_vectors, size 0x44 lma 0x60000
+Loading section .text, size 0x1f3c lma 0x60044
+Loading section .rodata, size 0x2c lma 0x61f80
+Loading section .data, size 0x124 lma 0x61fac
+Start address 0x60044 , load size 8400
+Transfer rate: 5169 bits/sec.
+(gdb) q
+The program is running. Exit anyway? (y or n) y </PROGRAMLISTING>
+
+<NOTE>
+<PARA> On a UNIX or Linux system, the serial port must be
+ /dev/ttyS0 instead of COM1.
+ You need to make sure that the /dev/ttyS0 files
+have the right permissions:
+<SCREEN>$ su
+ Password:
+ # chmod o+rw /dev/ttyS0*
+ # exit
+ </SCREEN>
+If you are programming the GDB stub image, it will now be located
+at 0x60000..0x64000. If you are programming the Cygmon ROM Monitor,
+it will be located at 0x60000..0x80000.</PARA>
+</NOTE></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Now download the FLASH programmer tool</PARA>
+<PROGRAMLISTING>bash$ arm-elf-gdb prog_flash.img
+GNU gdb 4.18-DEVTOOLSVERSION
+Copyright 1998 Free Software Foundation, Inc.
+GDB is free software, covered by the GNU General Public License,
+and you are welcome to change it and/or distribute
+copies of it under certain conditions. Type "show copying" to see
+the conditions. There is absolutely no warranty for GDB. Type "show
+warranty" for details.
+This GDB was configured as "--host=i586-pc-cygwin32 --target=arm-elf".
+(gdb) target rdi s=com1
+Angel Debug Monitor for PID (Built with Serial(x1), Parallel, DCC) 1.00
+(Advanced RISC Machines SDT 2.10)
+Angel Debug Monitor rebuilt on Jan 20 1997 at 02:33:43
+Connected to ARM RDI target.
+(gdb) load
+Loading section .rom_vectors, size 0x44 lma 0x40000
+Loading section .text, size 0x44a4 lma 0x40044
+Loading section .rodata, size 0x318 lma 0x444e8
+Loading section .data, size 0x1c8 lma 0x44800
+Start address 0x40044 , load size 18888
+Transfer rate: 5596 bits/sec.
+(gdb) c</PROGRAMLISTING>
+</LISTITEM>
+<LISTITEM>
+<PARA>The FLASH tool will output some text on the board serial
+port B at 38400 baud:</PARA>
+<PROGRAMLISTING>ARM
+eCos
+
+FLASH here!
+manuf: 8, device: 40
+Error: Wrong Manufaturer: 08
+... Please change FLASH jumper</PROGRAMLISTING>
+</LISTITEM>
+<LISTITEM>
+<PARA>This text is repeated until you remove the jumper 7-8
+on LK6. Then the output will be:</PARA>
+<PROGRAMLISTING>manuf: 1F, device: A4
+AT29C040A recognised
+About to program FLASH using data at 60000..64000
+*** Press RESET now to abort!</PROGRAMLISTING>
+</LISTITEM>
+<LISTITEM>
+<PARA> You have about 10 seconds to abort the operation by pressing
+reset. After this timeout, the FLASH programming happens:</PARA>
+<SCREEN>...Programming FLASH
+All done!</SCREEN>
+</LISTITEM>
+<LISTITEM>
+<PARA>Quit/kill the GDB process, which will hang.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Next time you reset the board, the stub will be in control,
+communicating on Serial A at 38400 baud.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+<NOTE>
+<PARA>If you do not have two serial ports available on your host
+computer, you may still verify the FLASH programming completed successfully
+by quitting/killing the GDB process after running "c" in
+step 2 above. Then switch the serial cable on the PID from Serial
+A to Serial B and run a terminal emulator on the host computer.
+In a few seconds you should see the the repeated text described
+in step 2 above and you may continue the remaining steps as normal.</PARA>
+</NOTE>
+</SECT3>
+<SECT3>
+<TITLE>Programming the FLASH for big-endian mode</TITLE>
+<PARA>The process is almost identical to the previous instructions
+which apply to a PID board running in little-endian mode only.</PARA>
+<PARA>The only adjustments to make are that if programming a <EMPHASIS>GDB</EMPHASIS> stub
+ROM image (or CygMon ROM monitor image), you must enable the option "Use
+Big-endian mode" in the <EMPHASIS>eCos Configuration Tool</EMPHASIS> (CYGHWR_HAL_ARM_BIGENDIAN
+if using ecosconfig and editing ecos.ecc).</PARA>
+<PARA>When programming the FLASH there are two options:</PARA>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Program FLASH using the little-endian FLASH tool. After
+powering off, replace the ROM controller with the special big-endian
+version which can be acquired from ARM. (This has not been tested
+by Red Hat).</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Use a special big-endian version of the FLASH tool which
+byte-swaps all the words as they are written to the FLASH.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+<PARA>Build this tool by enabling the "Build flash programming tool
+for BE images on LE boards" option (CYGBLD_BUILD_FLASH_TOOL_BE),
+resulting in a utility with the prefix "prog_flash_BE_image_LE_system"
+which should be used instead of "prog_flash".</PARA>
+<PARA>Note that there is a limitation to this method: no sub-word
+data can be read from the ROM. To work around this, the .rodata
+section is folded into the .data section and thus copied to RAM
+before the system starts.</PARA>
+<PARA>Given that Thumb instructions are 16 bit, it is not possible
+to run ROM-startup Thumb binaries on the PID board using this method.</PARA>
+<PARA>When the image has been programmed, power off the board, and
+set jumper LK4 to enable big-endian operation.</PARA>
+</SECT3>
+</SECT2>
+<SECT2>
+<TITLE>Installing the Stubs into ROM</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Program the binary image file gdb_module.bin
+into ROM referring to the instructions of your ROM programmer.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Plug the ROM into socket U12 and install jumper LK6 pins
+7-8 to enable the ROM.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT2>
+</SECT1>
+<SECT1 id="setup-arm-aeb1">
+<TITLE><!-- <index></index> -->ARM AEB-1 Hardware Setup</TITLE>
+<SECT2>
+<TITLE>Overview</TITLE>
+<PARA>The ARM AEB-1 comes with tools in ROM. These include a simple
+FLASH management tool and the Angel&reg; monitor. eCos for
+the ARM AEB-1 comes with GDB stubs suitable for programming into
+the onboard FLASH. GDB is the preferred debug environment for GDB,
+and while Angel provides a subset of the features in the eCos GDB
+stub, Angel is unsupported.</PARA>
+<PARA>Both eCos and the stubs support both Revision B and Revision
+C of the AEB-1 board. Stub ROM images for both types of board can
+be found in the loaders/arm-aeb directory under the root
+of your eCos installation. You can select which board you are using
+by selecting either the aeb or aebC platform by selecting the appropriate
+platform HAL in the <EMPHASIS>eCos Configuration Tool</EMPHASIS>.</PARA>
+<PARA>The GDB stub can be downloaded to the board for programming
+in the FLASH using the board's on-board ROM monitor:</PARA>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>talk to the AEB-1 board with a terminal emulator (or
+a real terminal!)</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>use the board's rom menu to download a UU-encoded
+version of the GDB stubs which will act as a ROM monitor</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>tell the board to use this new monitor, and then hook
+GDB up to it for real debugging</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT2>
+<SECT2>
+<TITLE>Talking to the Board</TITLE>
+<PARA>Connect a terminal or computer's serial port to the
+ARM AEB-1. On a PC with a 9-pin serial port, you can use the cable
+shipped by ARM with no modification. </PARA>
+<PARA>Set the terminal or terminal emulator to 9600N1 (9600 baud,
+no parity, 1 stop bit). </PARA>
+<PARA>Reset the board by pressing the little reset button on the
+top. You will see the following text: </PARA>
+<PROGRAMLISTING> ARM Evaluation Board Boot Monitor 0.01 (19 APR 1998)
+ Press ENTER within 2 seconds to stop autoboot</PROGRAMLISTING>
+<PARA>Press ENTER quickly, and you will get the boot prompt: </PARA>
+<PROGRAMLISTING> Boot:</PROGRAMLISTING>
+</SECT2>
+<SECT2>
+<TITLE>Downloading the Stubs via the Rom Menu</TITLE>
+<PARA>Using the AEB-1 rom menu to download the GDB stubs from the
+provided ".UU" file.</PARA>
+<NOTE>
+<PARA>This is an annotated 'terminal' session
+with the AEB-1 monitor:</PARA>
+</NOTE>
+<PROGRAMLISTING>+Boot: help
+Module is BootStrap 1.00 (14 Aug 1998)</PROGRAMLISTING>
+<PROGRAMLISTING>Help is available on:</PROGRAMLISTING>
+<PROGRAMLISTING>Help Modules ROMModules UnPlug PlugIn
+Kill SetEnv UnSetEnv PrintEnv DownLoad
+Go GoS Boot PC FlashWrite
+FlashLoad FlashErase</PROGRAMLISTING>
+<PROGRAMLISTING>Boot: download c000
+Ready to download. Use 'transmit' option on terminal
+emulator to download file.</PROGRAMLISTING>
+<PROGRAMLISTING>... at this point, download the ASCII file "loaders/arm-aeb/
+ gdb_module.img.UU". The details of this operation differ
+ depending on which terminal emulator is used. It may be
+ necessary to enter "^D" (control+D) when the download completes
+ to get the monitor to return to command mode. </PROGRAMLISTING>
+<PROGRAMLISTING>Loaded file gdb_module.img.bin at address
+0000c000, size = 19392 </PROGRAMLISTING>
+</SECT2>
+<SECT2>
+<TITLE>Activating the GDB Stubs</TITLE>
+<PARA>Commit the GDB stubs module to FLASH: </PARA>
+<PROGRAMLISTING> Boot: flashwrite 4018000 C000 8000
+ </PROGRAMLISTING>
+<PARA>Verify that the eCos/"GDB stubs" module is now added
+in the list of modules in the board: </PARA>
+<PROGRAMLISTING> Boot: rommodules
+ </PROGRAMLISTING>
+<PARA>You should see output similar to the following: </PARA>
+<PROGRAMLISTING> Header Base Limit
+ 04000004 04000000 040034a8 BootStrap 1.00 (14 Aug 1998)
+ 04003a74 04003800 04003bc0 Production Test 1.00 (13 Aug 1998)
+ 0400e4f4 04004000 0400e60f Angel 1.02 (12 MAY 1998)
+ 0401c810 04018000 0401cbc0 eCos 1.3 (27 Jan 2000)
+GDB stubs
+ </PROGRAMLISTING>
+<PARA>Now make the eCos/"GDB stubs" module be the default
+monitor: </PARA>
+<PROGRAMLISTING> Boot: plugin eCos
+ </PROGRAMLISTING>
+<NOTE>
+<PARA>Since the GDB stubs are always linked at the same address
+(0x4018000), the operation of writing to the FLASH and selecting
+the stubs as default monitor is an idempotent operation. You can
+download a new set of stubs following the same procedure - you do
+not have to unregister or delete anything.</PARA>
+</NOTE>
+</SECT2>
+<SECT2>
+<TITLE>Building the GDB Stub FLASH ROM Images</TITLE>
+<PARA>Pre-built GDB stubs images are provided in the directory loaders/arm-aeb
+relative to the root of your eCos installation, but here are instructions
+on how to rebuild them if you should ever need to.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Building the GDB Stubs with the eCos Configuration Tool</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Start with a new document - selecting the
+<EMPHASIS>File</EMPHASIS>
+-&#62;
+<EMPHASIS>New</EMPHASIS>
+ menu item if necessary to do this.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Choose the
+<EMPHASIS>Build</EMPHASIS>
+-&#62;
+<EMPHASIS>Templates</EMPHASIS>
+ menu item, and then select the ARM AEB-1 hardware.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>While still displaying the
+<EMPHASIS>Build-&#62;Templates</EMPHASIS>
+ dialog box, select the "stubs" package template to build a GDB
+stub image. Click
+<EMPHASIS>OK</EMPHASIS>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>If applicable, set the "AEB board revision" option to
+"C" from "B" depending on the board revision being used.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Build eCos using
+<EMPHASIS>Build</EMPHASIS>
+-&#62;
+<EMPHASIS>Library.</EMPHASIS></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. The GDB stub
+ROM images have the prefix "gdb_module".</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT2>
+<SECT2>
+<TITLE>Building the GDB Stub ROMs with ecosconfig</TITLE>
+<!-- <PARA>(See <XREF LINKEND="USING-ECOSCONFIG-ON-UNIX">)</PARA> -->
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Make an empty directory to contain the build tree,
+and cd into it.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>To build a GDB stub ROM image, enter the command:</PARA>
+<PROGRAMLISTING>$ ecosconfig new aeb stubs</PROGRAMLISTING>
+</LISTITEM>
+<LISTITEM>
+<PARA>If applicable, edit ecos.ecc and set the AEB board revision. (CYGHWR_HAL_ARM_AEB_REVISION)
+from the default "B" to "C" by uncommenting the user_value
+property and setting it to "C".</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Enter the commands
+
+<PROGRAMLISTING>$ ecosconfig tree
+$ make</PROGRAMLISTING></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. The GDB stub
+ROM images have the prefix "gdb_module".</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT2>
+</SECT1>
+<SECT1 id="setup-arm-cma230">
+<TITLE><!-- <index></index> -->ARM Cogent CMA230 Hardware Setup</TITLE>
+<PARA>The eCos Developer's Kit package comes with an EPROM
+which provides GDB support for the Cogent evaluation board. An image
+of this EPROM is also provided at loaders/arm-cma230/gdbload.bin
+under the root of your eCos installation. </PARA>
+<PARA>The EPROM is installed to socket U3 on the board. Attention
+should be paid to the correct orientation of the EPROM during installation.</PARA>
+<PARA>If you are going to burn a new EPROM using the binary image,
+be careful to get the byte order correct. It needs to be little-endian,
+which is usually the default in PC based programmer software.</PARA>
+<PARA>If the GDB stub EPROM you burn does not work, try reversing
+the byte-order, even if you think you have it the right way around.
+At least one DOS-based EPROM burner program is known to have the
+byte-order upside down.</PARA>
+<PARA>The GDB stub in the EPROM allows communication with GDB using
+the serial port at connector P12 (CMA101) or P3 (CMA102). The communication parameters
+are fixed at 38400 baud, 8 data bits, no parity bit and 1 stop bit
+(8-N-1). No flow control is employed. Connection to the host computer
+should be made using a dedicated serial cable as specified in the
+Cogent CMA manual.</PARA>
+<SECT2>
+<TITLE>Building the GDB Stub FLASH ROM images</TITLE>
+<PARA>Pre-built GDB stubs images are provided in the directory loaders/arm-cma230 relative
+to the root of your eCos installation, but here are instructions
+on how to rebuild them if you should ever need to.</PARA>
+<PARA>CygMon images are prefixed with the name 'cygmon' and
+GDB stub ROM images</PARA>
+<PARA>are given the prefix 'gdb_module'.
+Images may be provided in a number of formats including ELF (.img
+extension), binary (.bin extension) and SREC (.srec extension). </PARA>
+</SECT2>
+<SECT2>
+<TITLE>Building the GDB Stubs with the eCos Configuration Tool</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>1. Start with a new document - selecting the File-&#62;New
+menu item if necessary to do this.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Choose the
+<EMPHASIS>Build</EMPHASIS>-&#62;<EMPHASIS>Templates</EMPHASIS>
+ menu item, and then select the ARM CMA230 hardware.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>While still displaying the
+<EMPHASIS>Build</EMPHASIS>
+-&#62;
+<EMPHASIS>Templates</EMPHASIS>
+ dialog box, select the "stubs" package template to build a GDB
+stub image. Click
+<EMPHASIS>OK</EMPHASIS>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Build eCos using
+<EMPHASIS>Build</EMPHASIS>
+-&#62;
+<EMPHASIS>Library</EMPHASIS></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. The GDB stub
+ROM images have the prefix "gdb_module".</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT2>
+<SECT2>
+<TITLE>Building the GDB Stub ROMs with ecosconfig</TITLE>
+<!-- <PARA>(See <XREF LINKEND="USING-ECOSCONFIG-ON-UNIX">)</PARA> -->
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>1. Make an empty directory to contain the build tree,
+and cd into it.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>To build a GDB stub ROM image, enter the command:</PARA>
+<PROGRAMLISTING>$ ecosconfig new cma230 stubs</PROGRAMLISTING>
+</LISTITEM>
+<LISTITEM>
+<PARA>Enter the commands:
+
+<PROGRAMLISTING>$ ecosconfig tree
+$ make</PROGRAMLISTING></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. The GDB stub
+ROM images have the prefix "gdb_module".</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT2>
+</SECT1>
+<SECT1 id="setup-arm-ep7211">
+<TITLE><!-- <index></index> --><!-- <xref> -->Cirrus Logic ARM EP7211 Development
+Board Hardware Setup</TITLE>
+<PARA>eCos comes with two Flash ROM images that provide GDB support
+for the Cirrus Logic EP7211 Development Board (also known as the
+EDB7211).. Note that on some board revisions, the board is silk-screened
+as EDB7111-2. The first Flash ROM image provides a port of the CygMon
+ROM monitor, which includes a command-line interface and a GDB remote
+stub. The second Flash ROM image provides a remote GDB stub only.</PARA>
+<PARA>Both ROM images are provided in the directory loaders/arm-edb7211
+under the root of your eCos installation. CygMon images are prefixed
+with the name 'edb7211_cygmon' and are
+provided in a number of formats including binary (.bin extension)
+and SREC (.srec) extension. GDB stub ROM images are given the prefix 'edb7211_gdb_module'. </PARA>
+<PARA>The ROM images provided for the EP7211 Development Board must
+be programmed into the FLASH. Please refer to the section titled
+"Loading the ROM image into On-Board flash" on how to program the
+ROM onto the board.</PARA>
+<PARA>Both Cygmon and GDB Stub ROMS allow communication with GDB
+via the serial connector labelled 'UART 1'. The
+communication parameters are fixed at 38400 baud, 8 data bits, no
+parity bit and 1 stop bit (8-N-1). No flow control is employed.
+Connection to the host computer should be made using a null modem cable.
+A gender changer may also be required. Note that the GDB Configuration tool
+uses the serial port identifiers 0 and 1 to identify the EB7211
+serial ports UART1 and UART2 respectively.</PARA>
+<PARA>Both eCos and the ROM images assume the core clock is generated
+with a 3.6864 MHz PLL input. The CPU will be configured to run at
+73.728MHz.</PARA>
+<PARA>Note: The EP7211 CPU needs a two step RESET process. After
+pressing the &grave;URESET' pushbutton, the &grave;WAKEUP' pushbutton
+must be pressed to complete the process.</PARA>
+<NOTE>
+<PARA>When an eCos program is run on an EDB7211 board fitted with
+either CygMon or a GDB stub ROM, then the code in ROM loses control.
+This means that if you require the ability to remotely stop execution
+on the target, or want thread debugging capabilities, you must include
+GDB stub support when configuring eCos.</PARA>
+</NOTE>
+<SECT2>
+<TITLE>Building programs for programming into FLASH</TITLE>
+<PARA>If your application is to be run directly from FLASH, you
+must configure eCos appropriately for "ROM" startup. This can be
+done in the <EMPHASIS>eCos Configuration Tool</EMPHASIS> by setting
+the "Startup type" HAL option to "ROM". If using the ecosconfig utility,
+set the user_value of the CYG_HAL_STARTUP
+option in ecos.ecc to "ROM".</PARA>
+<PARA>When you have linked your application with eCos, you will
+then have an ELF executable. To convert this into a format appropriate
+for the Cirrus Logic FLASH download utility, or the dl_7xxx
+utility on Linux, you can use the utility arm-elf-objcopy, as in
+the following example:</PARA>
+<PROGRAMLISTING>$ arm-elf-objcopy -O binary helloworld.exe helloworld.bin</PROGRAMLISTING>
+<PARA>This will produce a binary format image helloworld.bin which
+can be downloaded into FLASH.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Building the GDB Stub FLASH ROM images</TITLE>
+<PARA>Pre-built GDB stubs images are provided in the directory loaders/arm-edb7211 relative
+to the root of your eCos installation, but here are instructions
+on how to rebuild them if you should ever need to.</PARA>
+<PARA>CygMon images are prefixed with the name 'cygmon' and
+GDB stub ROM images are given the prefix 'gdb_module'.
+Images may be provided in a number of formats including ELF (.img
+extension), binary (.bin extension) and SREC (.srec extension). </PARA>
+</SECT2>
+<SECT2>
+<TITLE>Building the ROM images with the eCos Configuration Tool</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Start with a new document - selecting the
+<EMPHASIS>File</EMPHASIS>-&#62;<EMPHASIS>New</EMPHASIS>
+ menu item if necessary to do this.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Choose the
+<EMPHASIS>Build</EMPHASIS>-&#62;<EMPHASIS>Templates</EMPHASIS>
+ menu item, and then select the "Cirrus Logic development board"
+hardware.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>While still displaying the
+<EMPHASIS>Build</EMPHASIS>
+-&#62;
+<EMPHASIS>Templates</EMPHASIS>
+ dialog box, select either the "stubs" package template to build
+a GDB stub image, or the "cygmon" template to build the CygMon ROM
+Monitor. Click
+<EMPHASIS>OK</EMPHASIS>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Build eCos using
+<EMPHASIS>Build</EMPHASIS>
+-&#62;
+<EMPHASIS>Library</EMPHASIS></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. GDB stub
+ROM images have the prefix "gdb_module". CygMon images
+have the prefix "cygmon".</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT2>
+<SECT2>
+<TITLE>Building the ROM images with ecosconfig</TITLE>
+<!-- <PARA>(See <XREF LINKEND="USING-ECOSCONFIG-ON-UNIX">)</PARA> -->
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Make an empty directory to contain the build tree,
+and cd into it.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>To build a GDB stub ROM image, enter the command:</PARA>
+<PROGRAMLISTING>$ ecosconfig new edb7xxx stubs</PROGRAMLISTING>
+<PARA>or to build a CygMon ROM monitor image, enter the command:</PARA>
+<PROGRAMLISTING>$ ecosconfig new edb7xxx cygmon</PROGRAMLISTING>
+</LISTITEM>
+<LISTITEM>
+<PARA>Enter the commands:</PARA>
+<PROGRAMLISTING>$ ecosconfig tree
+$ make</PROGRAMLISTING>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. GDB stub
+ROM images have the prefix "gdb_module". CygMon images
+have the prefix "cygmon".</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT2>
+<SECT2>
+<TITLE><!-- <xref> -->Loading the ROM Image into On-board Flash</TITLE>
+<PARA>Program images can be written into Flash memory by means of
+a bootstrap program which is built into the EDB7211. This program
+communicates with a support program on your host to download and
+program an image into the Flash memory.</PARA>
+<PARA>Cirrus Logic provides such a program for use with Windows/DOS.
+ eCos comes with a similar program which will run under Linux. The
+basic operation of both programs is the same.</PARA>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Connect a serial line to 'UART 1'.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Power off the EDB7211.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Install jumper 'PROGRAM ENABLE' which
+enables this special mode for downloading Flash images. Note that
+some board revisions have this jumper labelled &ldquo;BOOT ENABLE&rdquo;.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Power on the EDB7211.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Execute the Flash writing program on your host. On Linux,
+this would be:</PARA>
+<PROGRAMLISTING> # dl_edb7xxx &lt;PATH&#62;/gdb_module.bin</PROGRAMLISTING>
+<PARA>where '&lt;PATH&#62;' is the path to
+the binary format version of the ROM image you wish to load, either
+as built in the previous section or the "loaders/arm-edb7211/" subdirectory
+of your eCos installation. The download tool defaults to 38400 baud and
+device /dev/ttyS1 for communication. To change
+these, specify them as parameters, e.g.
+ </PARA>
+<PROGRAMLISTING># dl_edb7xxx &lt;PATH&#62;/gdb_module.bin 9600 /dev/ttyS0</PROGRAMLISTING>
+</LISTITEM>
+<LISTITEM>
+<PARA>The download program will indicate that it is waiting
+for the board to come alive. At this point, press 'RESET' and
+then 'WAKEUP' switches in order. There should be
+some indication of progress, first of the code being downloaded,
+then of the programming process.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Upon completion of the programming, power off the EDB7211.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Remove the 'PROGRAM ENABLE/BOOT ENABLE' jumper.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Power on the EDB7211, press 'RESET' and 'WAKEUP'.
+ The new ROM image should now be running on the board.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>The GDB debugger will now be able to communicate with
+the board to download and debug RAM based programs.
+
+This procedure also applies for loading ROM-startup eCos programs
+into the on-board FLASH memory, given a binary format image of the
+program from arm-elf-objcopy. Loading a ROM-startup eCos program
+into Flash will overwrite the GDB Stub ROM/CygMon in Flash,
+so you would have to reload the GDB Stub ROM/CygMon to
+return to normal RAM-startup program development.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT2>
+<SECT2>
+<TITLE>Building the Flash Downloader on Linux</TITLE>
+<PARA>eCos provides a Flash download program suitable for use with
+the EP7211 Development Board which will run on Linux. Follow these
+steps to build this program. Note: at the time of the writing of
+these instructions, the download program is built directly within
+the eCos source repository since it is
+not configuration specific.</PARA>
+<PROGRAMLISTING> # cd &lt;eCos install dir&#62;/packages/hal/arm/edb7xxx/<replaceable>&Version;</replaceable>/support</PROGRAMLISTING>
+<PROGRAMLISTING> # make</PROGRAMLISTING>
+<PARA>(where '# ' is your shell prompt)</PARA>
+<PARA>Note: this program was adapted from the Cirrus Logic original
+DOS program and still contains some vestiges of that environment.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Developing eCos Programs with the ARM Multi-ICE</TITLE>
+<PARA>The EP7211 Development Board supports use of the ARM
+ Multi-processor EmbeddedICE(tm), also known as the
+ Multi-ICE. Full instructions on how to install and use the
+ Multi-ICE in conjunction with GDB are provided in the
+ <EMPHASIS>"GNUPro Toolkit Reference for eCos
+ ARM/Thumb"</EMPHASIS> manual. However, the following
+ platform-specific details should be noted.</PARA>
+<PARA>You will need an ARM Multi-ICE Server configuration
+ file for the EP7211 Development Board. Here is a suggested
+ configuration file to use:</PARA>
+<PROGRAMLISTING>======== File "720T.cfg" ========
+;Total IR length = 4
+[TITLE]
+Multi-ICE configuration for EP7211
+
+[TAP 0]
+ARM720T
+
+[TAPINFO]
+YES
+
+[Timing]
+Low=0
+High=0
+Adaptive=OFF
+==================================</PROGRAMLISTING>
+<PARA>You must ensure that the board has the appropriate soldered
+connections. For the EP7211 this involves connecting TEST0 and TEST1
+of the EP7211 to ground. To do this you must solder a wire from
+ground at JP33 to TP8 and TP9.</PARA>
+<PARA>With respect to using multiple devices simultaneously, note
+that the EP7211 is not ID sensitive.</PARA>
+<PARA>If you wish to view diagnostic output from your program that
+was downloaded via the Multi-ICE, you will note that by default
+the output on the serial line (as viewed by a terminal such as Hyperterm
+in Windows, or cu in Unix) is in the form of GDB packets.</PARA>
+<PARA>To get legible output, the solution is to set the "GDB Serial
+port" to a different device from the "Diagnostic serial port", and
+you should use the Diagnostic serial port to view the diagnostic
+output.</PARA>
+<PARA>Warning: The multi-ice-gdb-server will fail on startup if
+the board has not been both reset and awakened before running the
+server. </PARA>
+<PARA>To resolve this, it is necessary to free up the connection
+from within the ARM Multi-ICE server itself. However when this happens,
+the next time you use GDB to load the program into the board, you
+will see lots of "Readback did not match original data" messages
+in the output of the multi-ice-gdb-server program. This indicates
+your program did not load correctly, and you should restart the
+multi-ice-gdb-server program, taking care to reset the board correctly
+before reconnecting. </PARA>
+<PARA>As a reminder, you must specify --config-dialog to the
+ multi-ice-gdb-server program to connect to the board
+ correctly. If you do not, the multi-ice-gdb-server program
+ will not be able to connect.</PARA>
+</SECT2>
+</SECT1>
+
+<SECT1 ID="setup-arm-ep7212">
+<TITLE><!-- <conditionaltext> -->Cirrus Logic ARM EP7212 Development Board
+Hardware Setup</TITLE>
+<PARA>The Cirrus Logic EP7212 Development Board is almost identical
+to the EP7211 Development Board from a hardware setup viewpoint,
+and is based on the same port of eCos. Therefore the earlier documentation
+for the EP7211 Development Board can be considered equivalent, but
+with the following changes:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>The first serial port is silk screened as "UART 1" on
+the EP7211 Development Board, but is silk screened as "Serial Port
+0" on the EP7212 Development Board. Similarly "UART 2" is silk screened
+as "Serial Port 1" on the EP7212 Development Board.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>JP2 (used to control reprogramming of the FLASH) is not
+silkscreened with "Boot Enable".</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>To setup the EP7212 Development Board for use with the
+ARM Multi-ICE JTAG debugging interface unit, it is necessary to
+connect TEST0 and TEST1 of the EP7212 to ground. On the Development
+Board, this is accomplished by placing shorting blocks on JP47 and
+JP48. When the shorting blocks are fitted, the board can only be
+operated through the Multi-ICE - debugging over a serial line is
+not possible.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA><!-- <conditionaltext> -->Pre-built GDB stubs are
+ provided in the directory
+ <FILENAME>loaders/arm-edb7212</FILENAME> relative to the
+ root of your eCos installation</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When rebuilding the GDB stub ROM image, change the "Cirrus
+Logic processor variant" option (CYGHWR_HAL_ARM_EDB7XXX_VARIANT)
+from the EP7211 to the EP7212. This can be selected in the
+<EMPHASIS>eCos Configuration Tool</EMPHASIS>
+, or if using ecosconfig, can be set by uncommenting the user_value
+property of this option in ecos.ecc and setting it to "EP7212".</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+</SECT1>
+<SECT1 ID="setup-arm-ep7312">
+<TITLE><!-- <conditionaltext> -->Cirrus Logic ARM EP7312 Development Board
+Hardware Setup</TITLE>
+<PARA>The Cirrus Logic EP7312 Development Board is similar
+to the EP7212 Development Board from a hardware setup viewpoint,
+and is based on the same port of eCos.</PARA>
+<PARA>When rebuilding the RedBoot ROM image or an eCos application,
+change the "Cirrus Logic processor variant" option
+(CYGHWR_HAL_ARM_EDB7XXX_VARIANT)
+from the EP7211 to the EP7312. This can be selected in the
+<EMPHASIS>eCos Configuration Tool</EMPHASIS>
+, or if using ecosconfig, can be set by uncommenting the user_value
+property of this option in ecos.ecc and setting it to "EP7312".
+</PARA>
+<PARA>
+See the RedBoot documentation for building and installing RedBoot for this
+target. Only RedBoot is supported as a boot image; ROMRAM startup is
+recommended.
+</PARA>
+<SECT2 ID="ep7312-90MHz-operation">
+<TITLE>90MHz Operation</TITLE>
+<PARA>
+The EP7xxx targets offer a choice of clock speeds, from 18MHz to a maximum,
+normally, of 72MHz. These are described as kHz values 18432 36864 49152
+and 73728 within the configuration tool. If you have a release which
+supports it, you will also see 90317 as an available option here, for 90MHz
+operation.
+</PARA>
+<PARA>
+This option only applies to certain EP7312 hardware, not all EP7312 boards
+support it. Do not select 90MHz when building RedBoot or your eCos
+application unless you are absolutely sure that your board supports it.
+</PARA>
+<PARA>
+If you do have a 90MHz board and wish to execute at 90MHz, it is in fact
+not necessary to build RedBoot specially, if you build your eCos
+application configured for 90MHz. RedBoot will run at 72MHz and your
+application will run at 90MHz. If you do install a 90MHz RedBoot, then you
+must build eCos for 90MHz or timing and baud rates on serial I/O will be
+wrong.
+</PARA>
+<PARA>
+In other words, code (either eCos app or RedBoot) built for 90MHz will
+&ldquo;change up a gear&rdquo; when it starts up; but code built for 72MHz,
+because it needs to run correctly on boards without the
+&ldquo;gearbox&rdquo; does not change back down, so if you mix the two,
+unexpected timing can result. To run a non-eCos application without any
+hardware initialization code at 90MHz, you must install a specially-built
+RedBoot.
+</PARA>
+</SECT2>
+</SECT1>
+<SECT1 id="setup-arm-ep7209">
+<TITLE>Cirrus Logic ARM EP7209 Development Board Hardware Setup</TITLE>
+<PARA>Note: At time of writing, no EP7209 Development Board is available,
+and consequently eCos has not been verified for use with the EP7209
+Development Board.</PARA>
+<PARA>The Cirrus Logic EP7209 Development Board is almost identical
+to the EP7212 Board in all respects, except that it is not fitted
+with DRAM, nor has it a DRAM controller.</PARA>
+<PARA>The only valid configuration for the EDB7209 is ROM based.
+The STUBS and RAM startup modes are not available as no DRAM is
+fitted.</PARA>
+</SECT1>
+<SECT1 id="setup-arm-clps7111">
+<TITLE><!-- <index></index> -->Cirrus Logic ARM CL-PS7111 Evaluation Board Hardware Setup</TITLE>
+<PARA>The implementation of the port of eCos to the Cirrus Logic
+ARM CL-PS7111 Evaluation Board (also known as EB7111) is based on
+the EP7211 Development Board port.</PARA>
+<PARA>For that reason, the setup required is identical to the EP7211
+Development Board as described above, with the following exceptions:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>The Cygmon ROM monitor is not supported</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>The ARM Multi-ICE is not supported</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA><!-- <conditionaltext> -->Pre-built GDB stubs are provided in the
+directory loaders/arm-eb7111 relative to the root of your
+eCos installation</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>If rebuilding the GDB stub ROM image, change the "Cirrus
+Logic processor variant" option (CYGHWR_HAL_ARM_EDB7XXX_VARIANT)
+from the EP7211 to the CL_PS7111. This can be selected
+in the
+<EMPHASIS>eCos Configuration Tool</EMPHASIS>
+, or if using ecosconfig, can be set by uncommenting the user_value
+property of this option in ecos.ecc and setting it to "CL_PS7111"</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+<PARA>All remote serial communication is done with the serial I/O
+connector</PARA>
+<PROGRAMLISTING>/misc
+% slow_cat.tcl &lt; [path]/gdb_module.srec &#62; /dev/ttyS0</PROGRAMLISTING>
+<PARA>Power off the board, and change it to boot the GDB stubs in
+big-endian mode by setting the switches like this:</PARA>
+<PARA>SW1: 00000000 (all levers down)
+SW2: 10001010</PARA>
+<PARA>The GDB stubs allow communication with GDB using the serial
+port at connector PJ7A (lower connector). The communication parameters
+are fixed at 38400 baud, 8 data bits, no parity bit and 1 stop
+bit (8-N-1). No flow control is employed. Connection to the host
+computer should be made using a straight through serial cable.</PARA>
+</SECT1>
+<SECT1 id="setup-arm-ebsa285">
+<TITLE>StrongARM EBSA-285 Hardware Setup</TITLE>
+<PARA>The eCos Developer&rsquo;s Kit package comes with a ROM
+image which provides GDB support for
+the Intel&reg; StrongARM&reg; Evaluation Board EBSA-285.
+ Both eCos and the Stub ROM image assume the clocks are: 3.6864
+MHz PLL input for generating the core clock, and 50MHz osc input
+for external clocks. An image of this ROM is also provided at <filename>loaders/arm-ebsa285/gdbload.bin</filename> under
+the root of your eCos installation.</PARA>
+<PARA>The ROM monitor image (an eCos GDB
+stub) provided for the EBSA-285 board must be programmed into the
+flash, replacing the Angel monitor on the board. Please refer to
+the section titled "Loading the ROM Image into On-Board flash" on how
+to program the ROM onto the board.</PARA>
+<PARA>The Stub ROM allows communication with GDB via the serial
+connector on the bulkhead mounting bracket COM0. The communication
+parameters are fixed at 38400 baud, 8 data bits, no parity bit and
+1 stop bit (8-N-1). No flow control is employed.</PARA>
+<SECT2>
+<TITLE>Building the GDB Stub FLASH ROM images</TITLE>
+<PARA>Pre-built GDB stubs images are provided in the directory loaders/arm-ebsa285 relative
+to the root of your eCos installation, but here are instructions
+on how to rebuild them if you should ever need to.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Building the GDB Stubs with the eCos Configuration Tool</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Start with a new document - selecting the
+<EMPHASIS>File</EMPHASIS>
+-&#62;
+<EMPHASIS>New</EMPHASIS>
+ menu item if necessary to do this.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Choose the
+<EMPHASIS>Build</EMPHASIS>
+-&#62;
+<EMPHASIS>Templates</EMPHASIS>
+ menu item, and then select the StrongARM EBSA285 hardware.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>While still displaying the
+<EMPHASIS>Build</EMPHASIS>
+-&#62;
+<EMPHASIS>Templates</EMPHASIS>
+ dialog box, select the "stubs" package template to build a GDB
+stub image. Click
+<EMPHASIS>OK</EMPHASIS>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Build eCos using
+<EMPHASIS>Build</EMPHASIS>
+-&#62;
+<EMPHASIS>Library</EMPHASIS></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. The GDB stub
+ROM images have the prefix "gdb_module".</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT2>
+<SECT2>
+<TITLE>Building the GDB Stub ROMs with ecosconfig</TITLE>
+<PARA>(See &ldquo;Using ecosconfig on UNIX&rdquo; on&nbsp;page&nbsp;72)</PARA>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Make an empty directory to contain the build tree,
+and cd into it.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>To build a GDB stub ROM image, enter the command:
+
+<PROGRAMLISTING>$ ecosconfig new ebsa285 stubs</PROGRAMLISTING></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Enter the commands:
+
+<PROGRAMLISTING>$ ecosconfig tree
+$ make</PROGRAMLISTING></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. The GDB stub
+ROM images have the prefix "gdb_module".</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT2>
+<SECT2>
+<TITLE>Loading the ROM Image into On-board Flash</TITLE>
+<PARA>There are several ways to install the eCos gdb stub ROM image
+in the EBSA board&rsquo;s flash memory. Once installed, the gdb
+stub ROM provides standard eCos download and debug via the EBSA
+board&quot;s serial port. The options available include the
+Linux based EBSA flash upgrade utility provided by Red Hat, direct writing
+of the flash via MultiICE (JTAG) hardware debugger, and other flash management
+utilities from Intel (these only support DOS, and proprietary ARM tools
+and image formats). Only the Red Hat flash upgrade tool is supported
+and tested in this release.</PARA>
+<PARA>The flash upgrade tool requires the EBSA board to be configured
+as a PCI slave (rather than a master, its normal operating mode)
+and plugged into a Linux host computer&quot;s PCI bus.</PARA>
+<PARA>Configuring the board for flash loading: Follow the instructions
+in the EBSA-285 Reference Manual, pages A-2 and A-3 to configure
+the board as an add-in card, and enable flash blank programming.
+ Briefly: assuming the board was in the default setting to execute
+as a bus master ("Host Bridge") make jumper 9 (J9), move jumper
+10 (J10) to external reset (PCI_RST), and move jumper 15
+(J15) link 4-6-5 to connect 5-6 instead of 4-6.</PARA>
+<PARA>Configuring the board for execution of eCos programs: Follow
+the instructions in the EBSA-285 Reference Manual, pages A-2 and
+A-3 to configure the board as a "Host Bridge" with "Central Function".
+ Briefly: unset J9, move J10 to on-board reset (BRD_RST),
+and set J15 to make 4-6 instead of 5-6 (see page A-8 also). Plug
+the card into its own PCI bus, not the Linux PC used for the flash-programming
+process.</PARA>
+<PARA>Building the Linux software: the Linux software sources are
+in directory</PARA>
+<PROGRAMLISTING> &lt;BASE_DIR&#62;/packages/hal/arm/ebsa285/v1_3/support/linux/safl_util</PROGRAMLISTING>
+<PARA>in the eCos source repository. There are two parts to the
+system: a loadable kernel module and the flash utility. The loadable
+kernel module is safl.o and the utility is sa_flash. To
+build:</PARA>
+<PARA> cd to this directory, or a copy of it.</PARA>
+<PARA> make</PARA>
+<PARA>This builds safl.o and sa_flash. The kernel module
+must be installed, and a device file created for it. Both of these
+operations require root permissions. Create the device file by: </PARA>
+<PROGRAMLISTING> % mknod /dev/safl c 10 178</PROGRAMLISTING>
+<PARA>Programming the flash: switch off the EBSA-285, and remove
+the EBSA-285 board from its PCI bus. Take appropriate anti-static
+precautions. Configure it for flash loading as above, halt your
+Linux system and turn it off. Install the EBSA-285 board in the
+PCI bus of the Linux system and boot it up. (Single user is good enough,
+assuming your image and safl_util build dir are on a local
+disc partition.) Change directory to the safl_util directory,
+then, to load the kernel module and flash an image onto the eval
+board (as root): </PARA>
+<PROGRAMLISTING> % insmod safl.o
+ % sa_flash &lt;image_file&#62;</PROGRAMLISTING>
+<PARA>Halt and turn off the Linux machine and remove the EBSA-285
+card. Take appropriate anti-static precautions. Configure it for
+execution of eCos programs as above, and plug it into its own PCI
+bus. Restart the Linux machine however you wish.</PARA>
+<PARA>This information is replicated in the README file within the
+safl_util directory and its parents, and in the EBSA-285
+Reference Manual from Intel, appendix A "Configuration Guide".
+If in doubt, please refer to those documents also.</PARA>
+<PARA>This procedure also applies for loading ROM-startup eCos programs
+into the on-board flash memory, given a binary format image of the
+program from arm-elf-objcopy. Loading a ROM-startup eCos program
+into flash will overwrite the StubROM in flash, so you would have
+to reload the StubROM to return to normal RAM-startup program development.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Running your eCos Program Using GDB and the StubROM</TITLE>
+<NOTE>
+<PARA>You must first load the StubROM image into the flash memory
+on the EBSA-285 board before doing this. See &ldquo;Loading
+the ROM Image into On-board Flash&rdquo;, page 93 for details.</PARA>
+</NOTE>
+<PARA>Connect to the StubROM in the board and run your eCos program &lt;PROGRAM&#62; as</PARA>
+<PARA>follows:</PARA>
+<PROGRAMLISTING> $ arm-elf-gdb -nw &lt;PROGRAM&#62;
+ (gdb) set remotebaud 38400
+ (gdb) target remote &lt;DEVICE&#62;</PROGRAMLISTING>
+<PARA>Where &lt;DEVICE&#62; is /dev/ttyS0
+or COM1: or similar, depending on your environment and how you connected
+your serial line to the host computer. Expect some output here,
+for example:</PARA>
+<PROGRAMLISTING> Remote debugging using /dev/ttyS0
+ 0x410026a4 in ?? ()</PROGRAMLISTING>
+<PARA>then, to load the program</PARA>
+<PROGRAMLISTING> (gdb) load
+ </PROGRAMLISTING>
+<PARA>which will report locations and sizes of sections as they
+load, then begin execution using</PARA>
+<PROGRAMLISTING> (gdb) continue</PROGRAMLISTING>
+<PARA>If you have no eCos program yet, but you want to connect to
+the board just to verify serial communications, tell gdb "set endian
+little" before anything else, so that it understands the board (GDB
+normally infers this from information within the eCos program).</PARA>
+<NOTE>
+<PARA>When an eCos program is run on the EBSA-285 board, the GDB
+stub in ROM loses control. This means that if you require the ability
+to stop execution on the target remotely, or want thread debugging
+capabilities, you must include GDB stub support when configuring
+<PRODUCTNAME>eCos</PRODUCTNAME>.</PARA>
+</NOTE>
+</SECT2>
+</SECT1>
+<SECT1 id="setup-arm-ipaq">
+<TITLE><!-- <conditionaltext> --> <!-- NOTE: could not find it --><!-- <index></index> -->Compaq iPAQ PocketPC Hardware Setup</TITLE>
+<PARA>For setting up the iPAQ to run with RedBoot, see the the <EMPHASIS>RedBoot
+User's Guide</EMPHASIS>. Connections may be made using
+the Compact Flash Ethernet interface. A serial cable may be connected
+directly, or via the cradle. Serial communication uses the parameters
+38400,8,N,1. The LCD/Touchscreen may also be used as an
+interface to RedBoot and eCos applications.</PARA>
+</SECT1>
+<SECT1 id="setup-arm-aim711">
+<TITLE>Arm Industrial Module AIM 711 Hardware Setup</TITLE>
+<PARA>The Arm Industrial Module AIM 711 comes with RedBoot installed
+as the default boot loader.</PARA>
+<PARA>For developing without having a finished custom board, a
+starter-kit with a minimally configured board is available. It offers all the
+connectors needed for development, including serial device, Ethernet, power
+supply and an extra connector for the external bus.</PARA>
+<SECT2>
+<TITLE>Setup Hardware</TITLE>
+<SECT3>
+<TITLE>Power supply</TITLE>
+<PARA>A 6V - 7.5V power supply must be connected to J2 or TB1. At
+J2 the inner pin is V+ and at TB1 it is pin 1.</PARA>
+</SECT3>
+<SECT3>
+<TITLE>Serial devices</TITLE>
+<PARA>The AIM 711 has 3 serial devices, which are the debug and
+diagnostic channel COM0 (/dev/ser0), the high performance 16550
+UART COM1 (/dev/ser1) and the second internal device COM2
+(/dev/ser2).</PARA>
+<PARA>To use the debug channel, which is also the default for
+RedBoot, the supplied DB9-male cable must be connected to
+CN4. If the also available service board is used, the above
+connector must be disabled by setting JP1.</PARA>
+<PARA>COM1 is available over the RJ45 connector CN2. This device
+can be configured as a RS232, RS422, RS485 or TTL level</PARA>
+<PARA>COM2 is only available with TTL level at CN5.</PARA>
+</SECT3>
+<SECT3>
+<TITLE>Ethernet</TITLE>
+<PARA>The RJ45 connector CN1 is for Ethernet.</PARA>
+</SECT3>
+</SECT2>
+<SECT2>
+<TITLE>Installing RedBoot into FLASH</TITLE>
+<SECT3>
+<TITLE>Using RedBoot</TITLE>
+<PARA>In order that Redboot can overwrite itself, Redboot is built as a ROMRAM image. </PARA>
+<PARA>Load the RedBoot binary to the next free space:
+<PROGRAMLISTING>RedBoot> load -m tftp -h 192.168.1.36 -r -b 0x40000 redboot.bin
+Raw file loaded 0x00040000-0x00063233, assumed entry at 0x00040000</PROGRAMLISTING>
+Store it in FLASH:
+<PROGRAMLISTING>RedBoot> fis create RedBoot
+An image named 'RedBoot' exists - continue (y/n)? y
+... Erase from 0x02000000-0x02025000: .....................................
+... Program from 0x00040000-0x00063234 at 0x02000000: ..........................
+..........
+... Erase from 0x021ff000-0x02200000: .
+... Program from 0x007ff000-0x00800000 at 0x021ff000: .</PROGRAMLISTING>
+Restart the AIM 711:
+<PROGRAMLISTING>RedBoot> reset
+... Resetting.</PROGRAMLISTING>
+</PARA>
+</SECT3>
+<SECT3>
+<TITLE>Using JTAG</TITLE>
+<PARA>To rewrite the FLASH using JTAG the service board must be
+used, which includes a JTAG connector.</PARA>
+</SECT3>
+</SECT2>
+<SECT2>
+<TITLE>More documentation</TITLE>
+<PARA>For more information please look at
+<ULINK URL="http://www.visionsystems.de/arm7.html">http://www.visionsystems.de/arm7.html</ULINK>.</PARA>
+</SECT2>
+</SECT1>
+<SECT1 id="setup-sh-edk7708">
+<TITLE>SH3/EDK7708 Hardware Setup</TITLE>
+<PARA>The eCos Developer&rsquo;s Kit package comes with a ROM
+which provides GDB support for the Hitachi EDK7708 board (a big-endian
+and a little-endian version). Images of these ROMs are also provided
+at <filename>loaders/sh-edk7708/gdbload.bin</filename> and
+ <filename>loaders/sh-edk7708le/gdbload.bin</filename> under
+the root of your eCos installation.</PARA>
+<PARA>The ROM is installed to socket U6 on the board. When using
+the big-endian ROM, jumper 9 must be set to 2-3. When using the
+little-endian ROM, jumper 9 must be set to 1-2. Attention should
+be paid to the correct orientation of the ROM during installation.
+Only replace the board&quot;s existing ROM using a proper PLCC extraction
+tool, as the socket would otherwise risk being damaged. </PARA>
+<PARA>If you are going to program a new ROM or FLASH using the binary
+image, you may have to experiment to get the right byte-order in
+the device. Depending on the programming software you use, it might
+be necessary to enable byte-swapping. If the GDB stub ROM/FLASH
+you program does not work, try reversing the byte-order.</PARA>
+<PARA>The GDB stub in the EPROM allows communication with GDB using
+the serial port at connector J1. The communication parameters are
+fixed at 38400 baud, 8 data bits, no parity bit and 1 stop bit (8-N-1).
+No flow control is employed. Connection to the host computer should
+be made using the dedicated serial cable included in the EDK package. </PARA>
+<SECT2>
+<TITLE>Installing the Stubs into FLASH</TITLE>
+<SECT3>
+<TITLE>Preparing the Binaries</TITLE>
+<PARA>These two binary preparation steps are not strictly necessary
+as the eCos distribution ships with pre-compiled binaries in the
+directory loaders/sh-edk7708 and loaders/sh-edk7708le
+relative to the installation root.</PARA>
+<SECT4>
+<TITLE>Building the ROM images with the eCos Configuration Tool</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Start with a new document - selecting the
+<EMPHASIS>File-&#62;New</EMPHASIS>
+ menu item if necessary to do this.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Choose the
+<EMPHASIS>Build-&#62;Templates</EMPHASIS>
+ menu item, and then select the SH EDK7708 hardware.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>While still displaying the
+<EMPHASIS>Build-&#62;Templates</EMPHASIS>
+ dialog box, select the &ldquo;stubs&rdquo; package template
+to build a GDB stub. Click
+<EMPHASIS>OK</EMPHASIS>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>If building a little-endian image, disable the &ldquo;Use
+big-endian mode&rdquo; option in the SH EDK7708 HAL (CYGHWR_HAL_SH_BIGENDIAN).</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Build eCos using
+<EMPHASIS>Build-&#62;Library</EMPHASIS>. </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. GDB stub
+ROM images have the prefix &ldquo;gdb_module&rdquo;.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT4>
+<SECT4>
+<TITLE>Building the ROM images with ecosconfig</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Make an empty directory to contain the build tree,
+and cd into it.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>To build a GDB stub ROM image, enter the command:
+
+<PROGRAMLISTING>$ ecosconfig new edk7708 stubs</PROGRAMLISTING>
+ </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>If building a little-endian image, uncomment the user
+value in ecos.ecc for CYGHWR_HAL_SH_BIGENDIAN
+and change it to 0. </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Enter the commands:
+
+<PROGRAMLISTING>$ ecosconfig tree
+$ make </PROGRAMLISTING></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. GDB stub
+ROM images have the prefix &ldquo;gdb_module&rdquo;.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT4>
+</SECT3>
+<SECT3>
+<TITLE> Installing the Stubs into ROM or FLASH</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Program the binary image file gdb_module.bin
+into ROM or FLASH referring to the instructions of your ROM programmer.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Plug the ROM/FLASH into socket U6. If the image
+is little-endian set jumper 9 to 1-2. If the image is big-endian
+set jumper 9 to 2-3.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+</SECT2>
+</SECT1>
+<SECT1 id="setup-sh-cq7708">
+<TITLE>SH3/CQ7708 Hardware Setup</TITLE>
+<SECT2>
+<TITLE>Preparing the board</TITLE>
+<PARA>Make sure the DIP switches on the board are set as follows:
+ </PARA>
+<PROGRAMLISTING>SW1-1 ON
+SW1-2 OFF
+SW1-3 ON
+SW1-4 OFF</PROGRAMLISTING>
+<PROGRAMLISTING>SW2-1 ON
+SW2-2 ON
+SW2-3 OFF
+SW2-4 OFF</PROGRAMLISTING>
+<PARA>If you are using a straight through serial cable which has
+flow control lines, you will also need to cut JP12 (5-6) as the
+flow control lines can cause NMIs.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>eCos GDB Stubs</TITLE>
+<PARA>The eCos installation CD contains a copy of the eCos GDB stubs
+in binary format which must be programmed into an EPROM or FLASH
+and installed on the board.</PARA>
+<SECT3>
+<TITLE> Preparing the GDB stubs</TITLE>
+<PARA>These stub preparation steps are not strictly necessary as
+the eCos distribution ships with pre-compiled stubs in the directory
+loaders/sh3-cq7708 relative to the installation root.</PARA>
+</SECT3>
+<SECT3>
+<TITLE>Building the GDB stub image with the eCos Configuration Tool</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Start with a new document - selecting the
+<EMPHASIS>File-&#62;New</EMPHASIS>
+ menu item if necessary to do this.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Choose the
+<EMPHASIS>Build-&#62;Templates</EMPHASIS>
+ menu item, and then select the SH3 cq7708 hardware.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>While still displaying the
+<EMPHASIS>Build-&#62;Templates</EMPHASIS>
+ dialog box, select the stubs package template to build a GDB stub.
+Click
+<EMPHASIS>OK</EMPHASIS>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Build eCos stubs using
+<EMPHASIS>Build-&#62;Library</EMPHASIS>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> When the build completes, the image files can be found
+in the
+<FILENAME>bin/</FILENAME>
+ subdirectory of the install tree. GDB stub images have the prefix
+<FILENAME>gdb_module</FILENAME>.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+<SECT3>
+<TITLE> Building the GDB stub image with ecosconfig</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Make an empty directory to contain the build tree,
+and cd into it.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> To build a GDB stub ROM image, enter the command:
+
+<PROGRAMLISTING>$ ecosconfig new cq7708 stubs </PROGRAMLISTING></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Enter the commands:
+
+<PROGRAMLISTING>$ ecosconfig tree
+$ make</PROGRAMLISTING></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the
+<FILENAME>bin/</FILENAME>
+ subdirectory of the install tree. GDB stub images have the prefix
+<FILENAME>gdb_module</FILENAME>. </PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+</SECT2>
+<SECT2>
+<TITLE>Programming the stubs in EPROM/FLASH</TITLE>
+<PARA>The board can use different sizes of ROMs. Use this table
+to adjust the board&rsquo;s jumpers to the ROM sizes you are
+using.</PARA>
+<PROGRAMLISTING>size(kbit) JP7 JP9 JP10 JP11
+256 2-3 2-3 open open
+512 1-2 2-3 open open
+1000 1-2 open open 2-3
+2000 1-2 1-2 open 2-3
+4000 1-2 1-2 short 2-3
+8000 1-2 1-2 short 1-2</PROGRAMLISTING>
+<PARA>There are two ways to program the stubs. We advise you to
+use method 1, since it is simpler. Method 2 is unsupported and requires
+a bit of fiddling.</PARA>
+<PARA><EMPHASIS>Method 1: </EMPHASIS> </PARA>
+<PARA>Program the binary stub image into two EPROMs, E and O. EPROM
+E should contain the even bytes, and O the odd bytes (your EPROM
+programmer should have the ability to split the image).</PARA>
+<PARA>EPROM E should be installed in socket IC8, and EPROM O should
+be installed in socket IC4.</PARA>
+<PARA>Set JP6 to 16 bit mode (1-2 soldered, 2-3 cut) Set SW1-4
+to ON and SW2-1 to OFF.</PARA>
+<PARA></PARA>
+<PARA><EMPHASIS>Method2: </EMPHASIS> </PARA>
+<PARA>Assuming that the stub binary is smaller than 32 KB, you can
+install it in a single EPROM.</PARA>
+<PARA>Compile the <FILENAME>mkcqrom.c</FILENAME> program
+found in the <FILENAME>misc</FILENAME> directory.</PARA>
+<PARA>Use it to convert the binary image to the required format.
+See the <FILENAME>mkcqrom.c</FILENAME> source for a
+description of what is done, and why it is necessary. </PARA>
+<PROGRAMLISTING> % mkcqrom gdb_module.bin gdb_mangled.bin</PROGRAMLISTING>
+<PARA>Program the <FILENAME>gdb_mangled.bin</FILENAME> file
+into an EPROM and install it in socket IC4</PARA>
+<PARA>Set JP6 to 8 bit mode (cut 1-2, solder 2-3)</PARA>
+<PARA>The GDB stubs allow communication with GDB using the serial
+port at connector CN7. The communication parameters are fixed at
+38400 baud, 8 data bits, no parity bit and 1 stop bit (8-N-1). No
+flow control is employed. Connection to the host computer should
+be made using a straight through serial cable.</PARA>
+</SECT2>
+</SECT1>
+<SECT1 id="setup-sh-hs7729pci">
+<TITLE>SH3/HS7729PCI Hardware Setup</TITLE>
+<PARA>Please see the RedBoot manual for instructions on how to prepare
+the board for use with eCos.</PARA>
+</SECT1>
+<SECT1 id="setup-sh-se77x9">
+<TITLE>SH3/SE77x9 Hardware Setup</TITLE>
+<PARA>Please see the RedBoot manual for instructions on how to prepare
+the board for use with eCos.</PARA>
+</SECT1>
+<SECT1 id="setup-sh-cq7750">
+<TITLE>SH4/CQ7750 Hardware Setup</TITLE>
+<SECT2>
+<TITLE>Preparing the board</TITLE>
+<PARA>Make sure the DIP switches on the board are set as follows:
+ </PARA>
+<PROGRAMLISTING>SW1-1 ON
+SW1-2 OFF
+SW1-3 ON
+SW1-4 OFF</PROGRAMLISTING>
+<PROGRAMLISTING>SW2-1 ON
+SW2-2 ON
+SW2-3 OFF
+SW2-4 OFF</PROGRAMLISTING>
+<PARA>If you are using a straight through serial cable which has
+flow control lines, you will also need to cut JP12 (5-6) as the
+flow control lines can cause NMIs.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>eCos GDB Stubs</TITLE>
+<PARA>The eCos installation CD contains a copy of the eCos GDB stubs
+in binary format which must be programmed into an EPROM or FLASH
+and installed on the board.</PARA>
+<SECT3>
+<TITLE> Preparing the GDB stubs</TITLE>
+<PARA>These stub preparation steps are not strictly necessary as
+the eCos distribution ships with pre-compiled stubs in the directory
+loaders/sh3-cq7708 relative to the installation root.</PARA>
+</SECT3>
+<SECT3>
+<TITLE>Building the GDB stub image with the eCos Configuration Tool</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Start with a new document - selecting the
+<EMPHASIS>File-&#62;New</EMPHASIS>
+ menu item if necessary to do this.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Choose the
+<EMPHASIS>Build-&#62;Templates</EMPHASIS>
+ menu item, and then select the SH3 cq7708 hardware.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>While still displaying the
+<EMPHASIS>Build-&#62;Templates</EMPHASIS>
+ dialog box, select the stubs package template to build a GDB stub.
+Click
+<EMPHASIS>OK</EMPHASIS>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Build eCos stubs using
+<EMPHASIS>Build-&#62;Library</EMPHASIS>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> When the build completes, the image files can be found
+in the
+<FILENAME>bin/</FILENAME>
+ subdirectory of the install tree. GDB stub images have the prefix
+<FILENAME>gdb_module</FILENAME>.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+<SECT3>
+<TITLE> Building the GDB stub image with ecosconfig</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Make an empty directory to contain the build tree,
+and cd into it.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> To build a GDB stub ROM image, enter the command:
+
+<PROGRAMLISTING>$ ecosconfig new cq7708 stubs </PROGRAMLISTING></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Enter the commands:
+
+<PROGRAMLISTING>$ ecosconfig tree
+$ make</PROGRAMLISTING></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the
+<filename>bin/</filename>
+ subdirectory of the install tree. GDB stub images have the prefix
+<filename>gdb_module</filename>. </PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+</SECT2>
+<SECT2>
+<TITLE>Programming the stubs in EPROM/FLASH</TITLE>
+<PARA>The board can use different sizes of ROMs. Use this table
+to adjust the board&rsquo;s jumpers to the ROM sizes you are
+using.</PARA>
+<PROGRAMLISTING>size(kbit) JP7 JP9 JP10 JP11
+256 2-3 2-3 open open
+512 1-2 2-3 open open
+1000 1-2 open open 2-3
+2000 1-2 1-2 open 2-3
+4000 1-2 1-2 short 2-3
+8000 1-2 1-2 short 1-2</PROGRAMLISTING>
+<PARA>There are two ways to program the stubs. We advise you to
+use method 1, since it is simpler. Method 2 is unsupported and requires
+a bit of fiddling.</PARA>
+<PARA><EMPHASIS>Method 1: </EMPHASIS> </PARA>
+<PARA>Program the binary stub image into two EPROMs, E and O. EPROM
+E should contain the even bytes, and O the odd bytes (your EPROM
+programmer should have the ability to split the image).</PARA>
+<PARA>EPROM E should be installed in socket IC8, and EPROM O should
+be installed in socket IC4.</PARA>
+<PARA>Set JP6 to 16 bit mode (1-2 soldered, 2-3 cut) Set SW1-4
+to ON and SW2-1 to OFF.</PARA>
+<PARA></PARA>
+<PARA><EMPHASIS>Method2: </EMPHASIS> </PARA>
+<PARA>Assuming that the stub binary is smaller than 32 KB, you can
+install it in a single EPROM.</PARA>
+<PARA>Compile the <filename>mkcqrom.c</filename> program
+found in the <FILENAME>misc</FILENAME> directory.</PARA>
+<PARA>Use it to convert the binary image to the required format.
+See the <FILENAME>mkcqrom.c</FILENAME> source for a
+description of what is done, and why it is necessary. </PARA>
+<PROGRAMLISTING> % mkcqrom gdb_module.bin gdb_mangled.bin</PROGRAMLISTING>
+<PARA>Program the <FILENAME>gdb_mangled.bin</FILENAME> file
+into an EPROM and install it in socket IC4</PARA>
+<PARA>Set JP6 to 8 bit mode (cut 1-2, solder 2-3)</PARA>
+<PARA>The GDB stubs allow communication with GDB using the serial
+port at connector CN7. The communication parameters are fixed at
+38400 baud, 8 data bits, no parity bit and 1 stop bit (8-N-1). No
+flow control is employed. Connection to the host computer should
+be made using a straight through serial cable.</PARA>
+</SECT2>
+</SECT1>
+<SECT1 id="setup-sh-se7751">
+<TITLE>SH4/SE7751 Hardware Setup</TITLE>
+<PARA>Please see the RedBoot manual for instructions on how to prepare
+the board for use with eCos.</PARA>
+</SECT1>
+<SECT1 id="setup-v850-cebsa1">
+<TITLE>NEC CEB-V850/SA1 Hardware Setup</TITLE>
+<PARA>The CEB-V850 board is fitted with a socketed EPROM. The internal
+Flash of the V850 supplied with the CEB-V850 boards defaults to
+vectoring into this EPROM. A GDB stub image should be programmed
+into an EPROM fitted to this board, and a pre-built image is provided
+at <FILENAME>loaders/v850-ceb_v850/v850sa1/gdb_module.bin </FILENAME>under
+the root of your eCos installation.</PARA>
+<PARA>The EPROM is installed to the socket labelled U7 on the board.
+Attention should be paid to the correct orientation of the EPROM
+during installation. </PARA>
+<PARA>When programming an EPROM using the binary image, be careful
+to get the byte order correct. It needs to be little-endian. If
+the EPROM burner software has a hex-editor, check that the first
+few bytes of the image look similar to: </PARA>
+<PROGRAMLISTING>00000000: 0018 8007 5e02 0000 0000 0000 0000 0000</PROGRAMLISTING>
+<PARA>If the byte order is wrong you will see 1800 instead of 0018
+etc. Use the EPROM burner software to make a byte-swap before you
+burn to image to the EPROM. </PARA>
+<PARA>If the GDB stub EPROM you burn does not work, try reversing
+the byte-order, even if you think you have it the right way around.
+At least one DOS-based EPROM burner program is known to have the
+byte-order upside down.</PARA>
+<PARA>The GDB stub in the EPROM allows communication with GDB using
+the serial port. The communication parameters are fixed at 38400
+baud, 8 data bits, no parity bit and 1 stop bit (8-N-1). No flow
+control is employed. Connection to the host computer should be made
+using a dedicated serial cable as specified in the CEB-V850/SA1
+manual.</PARA>
+<SECT2>
+<TITLE>Installing the Stubs into ROM</TITLE>
+<SECT3>
+<TITLE>Preparing the Binaries</TITLE>
+<PARA>These two binary preparation steps are not strictly necessary
+as the eCos distribution ships with pre-compiled binaries in the
+directory loaders/v850-ceb_v850 relative to the
+installation root.</PARA>
+<SECT4>
+<TITLE>Building the ROM images with the eCos Configuration Tool</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Start with a new document - selecting the
+<EMPHASIS>File-&#62;New</EMPHASIS>
+ menu item if necessary to do this.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Choose the
+<EMPHASIS>Build-&#62;Templates</EMPHASIS>
+ menu item, and then select the NEC CEB-V850/SA1 hardware.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>While still displaying the
+<EMPHASIS>Build-&#62;Templates</EMPHASIS>
+ dialog box, select the &ldquo;stubs&rdquo; package template
+to build a GDB stub. Click
+<EMPHASIS>OK</EMPHASIS>.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Build eCos using
+<EMPHASIS>Build-&#62;Library</EMPHASIS>. </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. GDB stub
+ROM images have the prefix &ldquo;gdb_module&rdquo;.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT4>
+<SECT4>
+<TITLE>Building the ROM images with ecosconfig</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Make an empty directory to contain the build tree,
+and cd into it. </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>To build a GDB stub ROM image, enter the command:
+
+<PROGRAMLISTING>$ ecosconfig new ceb-v850 stubs </PROGRAMLISTING></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Enter the commands:
+
+<PROGRAMLISTING>$ ecosconfig tree
+$ make</PROGRAMLISTING>
+ </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When the build completes, the image files can be found
+in the bin/ subdirectory of the install tree. GDB stub
+ROM images have the prefix &ldquo;gdb_module&rdquo;.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT4>
+</SECT3>
+<SECT3>
+<TITLE> Installing the Stubs into ROM or FLASH</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA> Program the binary image file gdb_module.bin
+into ROM or FLASH referring to the instructions of your ROM
+ programmer. </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA> Plug the ROM/FLASH into the socket as described
+at the beginning of this section.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+</SECT2>
+<SECT2>
+<TITLE>Debugging with the NEC V850 I.C.E.</TITLE>
+<PARA>eCos applications may be debugged using the NEC V850 In Circuit
+Emulator (I.C.E.) A PC running Microsoft Windows is required in
+order to run the NEC ICE software and drivers. In addition Red Hat
+have developed a &ldquo;libremote&rdquo; server application
+named v850ice.exe which is used on the PC connected to the I.C.E.
+in order to allow connections from GDB.</PARA>
+<PARA>The I.C.E. must be physically connected to a Windows NT system
+through NEC&quot;s PCI or PC Card interface. A driver, DLLs,
+and application are provided by NEC to control the I.C.E.</PARA>
+<PARA>v850ice is a Cygwin based server that runs on the NT system
+and provides an interface between the gdb client and the I.C.E.
+software. v850-elf-gdb may be run on the Windows NT system or on
+a remote system. v850-elf-gdb communicates with the libremote server
+using the gdb remote protocol over a TCP/IP socket. v850ice
+communicates with the I.C.E. by calling functions in the NECMSG.DLL provided
+by NEC.</PARA>
+<SECT3>
+<TITLE>INITIAL SETUP</TITLE>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Configure the hardware including the I.C.E., SA1 or
+SB1 Option Module, and target board. Install the interface card
+in the Windows NT system. Reference NEC&quot;s documentation
+for interface installation, jumper settings, etc.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Install the Windows NT device driver provided by NEC.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Copy the NEC DLLs, MDI application, and other support
+files to a directory on the Windows NT system. The standard location
+is C:\NecTools32. This directory will be referred to as
+the "libremote server directory" in this document. v850ice.exe must
+also be copied to this directory after being built. The required
+files are: cpu.cfg, Nec.cfg, MDI.EXE, NECMSG.DLL, EX85032.DLL,
+V850E.DLL, IE850.MON, IE850E.MON, and D3037A.800.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Make certain the file cpu.cfg contains the line:</PARA>
+<PROGRAMLISTING>CpuOption=SA1</PROGRAMLISTING>
+<PARA>if using a V850/SA1 module, or:</PARA>
+<PROGRAMLISTING>CpuOption=SB1</PROGRAMLISTING>
+<PARA>if using a V850/SB1 module.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Set the environment variable IEPATH to point to the libremote
+server</PARA>
+<PARA>directory.</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+<SECT3>
+<TITLE>BUILD PROCEDURES</TITLE>
+<PARA>A pre-built v850ice.exe executable is supplied in the loaders/v850-ceb_v850 directory
+relative to the root of the eCos installation. However the following process
+will allow the rebuilding of this executable if required:</PARA>
+<PARA>For this example assume the v850ice libremote tree has been
+copied to a directory named "server". The directory structure will
+be similar to the following diagram:</PARA>
+<PARA><PROGRAMLISTING> server
+ |
+ devo
+ / \
+ config libremote
+ / \
+ lib v850ice</PROGRAMLISTING></PARA>
+<PARA>Build the v850ice source as follows. Be sure to use the native
+Cygwin compiler tools that were supplied alongside eCos.</PARA>
+<PARA>cd server
+mkdir build
+cd build
+../devo/configure --target=v850-elf --host=i686-pc-cygwin
+make</PARA>
+<PARA>The resultant libremote server image (v850ice.exe) can be
+found in build/libremote/v850ice. Copy v850ice.exe
+to the lib remote server directory.</PARA>
+</SECT3>
+<SECT3>
+<TITLE>V850ICE.EXE EXECUTION</TITLE>
+<PARA>The v850ice command line syntax is:</PARA>
+<PARA>v850ice [-d] [-t addr] [port number]</PARA>
+<PARA>The optional -d option enables debug output. The -t option
+is associated with thread debugging - see the "eCos thread debugging"
+section below for details. By default v850ice listens on port 2345
+for an attach request from a gdb client. A different port number
+may be specified on the command line.</PARA>
+<PARA>To run the libremote server:</PARA>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA>Power on the I.C.E. and target board.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Open a Cygwin window.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Run v850ice.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>You will see the MDI interface window appear. In this
+window you should see the "Connected to In-Circuit Emulator" message.
+ In the Cygwin window, the libremote server will indicate it is
+ready to accept a gdb client connection with the message "v850ice:
+ listening on port 2345."</PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</SECT3>
+<SECT3>
+<TITLE>V850-ELF-GDB EXECUTION</TITLE>
+<PARA>Run the v850-elf-gdb client to debug the V850 target. It
+is necessary to issue certain configuration commands to the I.C.E.
+software. These commands may be issued directly in the MDI window
+or they may be issued from the gdb client through the "monitor"
+command.</PARA>
+<PARA>On the Cosmo CEB-V850 board, on-chip Flash is mapped at address
+0x0, the on-board EPROM at 0x100000 and the on-board RAM at 0xfc0000.
+Since a stand alone V850 will start executing from address 0x0 on
+reset, it is normal to load either an application or a bootstrap
+loader for Flash at this address. eCos programs may be built to
+boot from Flash or the on-board EPROM. If building for the on-board
+EPROM, it would be expected that the Flash will contain the default
+CEB-V850 flash contents. An ELF format version of the default contents
+may be found in the eCos distribution with the name v850flash.img.</PARA>
+<PARA>In stand alone operation, normally the code in this flash image
+would have been programmed into the V850 on the Cosmo board, and
+this would cause it to vector into the on-board EPROM to run the
+application located there. In the case of eCos, this application
+may be a GDB stub ROM application, allowing the further download
+to RAM over serial of actual applications to debug.</PARA>
+<PARA>As an example, we shall demonstrate how to use the I.C.E.
+to download the v850flash.img and GDB stub EPROM image using I.C.E.
+emulator memory only, and not requiring any actual programming of
+devices.</PARA>
+<PARA>v850-elf-gdb -nw
+(gdb) file v850flash.img
+(gdb) target remote localhost:2345
+(gdb) monitor reset
+(gdb) monitor cpu r=256 a=16
+(gdb) monitor map r=0x100000-L 0x80000
+(gdb) monitor map u=0xfc0000-L 0x40000
+(gdb) monitor pinmask k
+(gdb) monitor step
+(gdb) monitor step
+(gdb) monitor step
+(gdb) monitor step
+(gdb) load
+(gdb) detach
+(gdb) file gdb_module.img
+(gdb) target remote localhost:2345
+(gdb) load
+(gdb) continue</PARA>
+<PARA>NOTE: The four "monitor step" commands are only required the
+first time the board is connected to the I.C.E., otherwise the program
+will fail.</PARA>
+<PARA>This is because of a limitation of the I.C.E. hardware that
+means that the first time it is used, the "map" commands are not
+acted on and the addresses "0x100000" and "0xfc0000" are not mapped.
+This can be observed using the command "td e-20" in the MDI application&quot;s
+console to display the trace buffer, which will show that the contents
+of address 0x100000 are not valid. Subsequent runs do not require
+the "monitor step" commands.</PARA>
+<PARA>It is unusual to load two executable images to a target through
+gdb. From the example above notice that this is accomplished by
+attaching to the libremote server, loading the flash image, detaching,
+reattaching, and loading the ROM/RAM image. It is more
+normal to build an executable image that can be executed directly.
+In eCos this is achieved by selecting either the ROM or ROMRAM startup
+type, and optionally enable building for the internal FLASH. The
+I.C.E. emulator memory can emulate both the internal FLASH and the
+EPROM, so real hardware programming is not required.</PARA>
+<PARA>Upon running this example you will notice that the libremote
+server does not exit upon detecting a detach request, but simply
+begins listening for the next attach request. To cause v850ice
+to terminate, issue the "monitor quit" or "monitor exit" command
+from the gdb client. v850ice will then terminate with the next
+detach request. (You can also enter control-c in the Cygwin/DOS
+window where v850ice is running.)</PARA>
+</SECT3>
+<SECT3>
+<TITLE>MDI INTERFACE VS. GDB INTERFACE</TITLE>
+<PARA>If a filename is referenced in an MDI command, whether the
+command is entered in the MDI window or issued from the gdb client
+with the monitor command, the file must reside on the Windows NT
+libremote server system. When specifying a filename when entering
+a command in the MDI window it is obvious that a server local file
+is being referenced. When issuing an MDI command from the gdb client, the
+user must remember that the command line is simply passed to the
+I.C.E. software on the server system. The command is executed by
+the I.C.E. software as though it were entered locally.</PARA>
+<PARA>Executable images may be loaded into the V850 target by entering
+the "load" command in the MDI window or with the gdb "load" command.
+ If the MDI load command is used, the executable image must be located
+on the server system and must be in S Record format. If the gdb
+load command is used, the executable image must be located on the
+client system and must be in ELF format.</PARA>
+<PARA>Be aware that the gdb client is not aware of debugger commands
+issued from the MDI window. It is possible to cause the gdb client
+and the I.C.E. software to get out of sync by issuing commands from
+both interfaces during the same debugging session.</PARA>
+</SECT3>
+<SECT3>
+<TITLE>eCos THREAD DEBUGGING</TITLE>
+<PARA>eCos and the V850 I.C.E. libremote server have been written
+to work together to allow debugging of eCos threads. This is an
+optional feature, disabled by default because of the overheads trying
+to detect a threaded program involves.</PARA>
+<PARA>Obviously thread debugging is not possible for programs with
+"RAM" startup type, as they are expected to operate underneath a
+separate ROM monitor (such as a GDB stub ROM), that itself would
+provide its own thread debugging capabilities over the serial line.
+Thread debugging is relevant only for programs built for Flash, ROM,
+or ROMRAM startup.</PARA>
+<PARA>To configure the libremote server to support thread debugging,
+use the command:</PARA>
+<PARA><PROGRAMLISTING>(gdb) monitor syscallinfo ADDRESS</PROGRAMLISTING></PARA>
+<PARA>at the GDB console prompt, where ADDRESS is the address of
+the syscall information structure included in the applications.
+In eCos this has been designed to be located at a consistent address
+for each CPU model (V850/SA1 or V850/SB1). It
+may be determined from an eCos executable using the following command
+at a cygwin bash prompt:</PARA>
+<PARA><PROGRAMLISTING>v850-elf-nm EXECUTABLE | grep hal_v85x_ice_syscall_info</PROGRAMLISTING></PARA>
+<PARA>At the current time, this address is 0xfc0400 for a Cosmo
+board fitted with a V850/SA1, or 0xfc0540 for a Cosmo board
+fitted with a V850/SB1.</PARA>
+<PARA>So for example, the GDB command for the SB1 would be:</PARA>
+<PARA><PROGRAMLISTING>(gdb) monitor syscallinfo 0xfc0540</PROGRAMLISTING></PARA>
+<PARA>Given that the syscallinfo address is fixed over all eCos
+executables for a given target, it is possible to define it on the
+libremote command line as well using the "-t" option, for example:</PARA>
+<PARA><PROGRAMLISTING>bash$ v850ice -t 0xfc0400
+v850ice: listening on port 2345</PROGRAMLISTING></PARA>
+</SECT3>
+</SECT2>
+</SECT1>
+<SECT1 id="setup-v850-cebsb1">
+<TITLE>NEC CEB-V850/SB1 Hardware Setup</TITLE>
+<PARA>The instructions for setting up the CEB-V850/SB1
+are virtually identical to those of the CEB-V850/SA1 above.
+The only significant differences are that pre-built loaders are available
+at loaders/v850-ceb_v850/v850sb1 within
+the eCos installation. Binaries supporting boards with both 16MHz
+and 8MHz clock speeds are supplied. Also when building applications,
+or rebuilding the stubs for a V850/SB1 target, then the
+V850 CPU variant must be changed in the CEB-V850 HAL to the SB1.</PARA>
+</SECT1>
+<SECT1 id="setup-i386-pc">
+<TITLE>i386 PC Hardware Setup</TITLE>
+<para>
+eCos application on the PC can be run in three ways: via RedBoot,
+loaded directly from a floppy disk, or loaded by the GRUB bootloader.
+</para>
+<sect2>
+<title>RedBoot Support</title>
+<PARA>For information about setting up the PC to run with RedBoot,
+consult the RedBoot User&quot;s Guide. If using serial debugging,
+the serial line runs at 38400 baud 8-N-1 and should be connected
+to the debug host using a null modem cable. If ethernet debugging
+is required, an i82559 compatible network interface card, such as
+an Intel EtherExpress Pro 10/100, should be installed
+on the target PC and connected to the development PC running GDB.
+When RedBoot is configured appropriately to have an IP address set,
+then GDB will be able to debug directly over TCP/IP to the
+target PC.</PARA>
+</sect2>
+<sect2>
+<title>Floppy Disk Support</title>
+<para>
+If an application is built with a startup type of FLOPPY, then it is
+configured to be a self-booting image that must be written onto a
+formatted floppy disk. This will erase any existing file system or
+data that is already on the disk, so proceed
+with caution.
+</para>
+<para>
+To write an application to floppy disk, it must first be converted to
+a pure binary format. This is done with the following command:
+</para>
+<screen width=72>
+$ <userinput>i386-elf-objcopy -O binary app.elf app.bin</userinput>
+</screen>
+<para>
+Here <filename>app.elf</filename> is the final linked application
+executable, in ELF format (it may not have a <filename>.elf</filename>
+extension). The file <filename>app.bin</filename> is the resulting
+pure binary file. This must be written to the floppy disk with the
+following command:
+<screen width=72>
+$ <userinput>dd conv=sync if=app.bin of=/dev/fd0</userinput>
+</screen>
+</para>
+<para>For NT Cygwin users, this can be done by first ensuring that the raw
+floppy device is mounted as <filename>/dev/fd0</filename>. To check if this
+is the case, type the command <command>mount</command> at the Cygwin bash
+prompt. If the floppy drive is already mounted, it will be listed as something
+similar to the following line:</para>
+<screen> \\.\a: /dev/fd0 user binmode</screen>
+<para>If this line is not listed, then mount the floppy drive using the command:
+</para>
+<screen>$ <userinput>mount -f -b //./a: /dev/fd0</userinput></screen>
+<para>To actually install the boot image on the floppy, use the command:</para>
+<screen>
+$ <userinput>dd conv=sync if=app.bin of=/dev/fd0</userinput>
+</screen>
+<para>Insert this floppy in the A: drive of the PC to be used as a target
+and ensure that the BIOS is configured to boot from A: by default. On reset,
+the PC will boot from the floppy and the eCos application will load
+itself and execute immediately.</para>
+<note><title>NOTE</title>
+<para>Unreliable floppy media may cause the write to silently fail. This
+can be determined if the RedBoot image does not correctly
+boot. In such cases, the floppy should be (unconditionally) reformatted
+using the <command>fdformat</command> command on Linux, or
+<command>format a: /u</command> on DOS/Windows. If this fails, try a
+different disk.</para>
+</note>
+</sect2>
+<sect2>
+<title>GRUB Bootloader Support</title>
+<para>
+If an application is built with the GRUB startup type, it is
+configured to be loaded by the GRUB bootloader.
+</para>
+<para>
+GRUB is an open source boot loader that supports many different
+operating systems. It is available from
+<ulink
+url="http://www.gnu.org/software/grub">http://www.gnu.org/software/grub</ulink>.
+The latest version of GRUB should be downloaded from there and installed.
+In Red Hat Linux version 7.2 and later it is the default bootloader
+for Linux and therefore is already installed.
+</para>
+<para>
+To install GRUB on a floppy disk from Linux you need to execute the
+following commands:
+</para>
+<screen>
+$ <userinput>mformat a:</userinput>
+$ <userinput>mount /mnt/floppy</userinput>
+$ <userinput>grub-install --root-directory=/mnt/floppy '(fd0)'</userinput>
+Probing devices to guess BIOS drives. This may take a long time.
+Installation finished. No error reported.
+This is the contents of the device map /mnt/floppy/boot/grub/device.map.
+Check if this is correct or not. If any of the lines is incorrect,
+fix it and re-run the script `grub-install'.
+
+(fd0) /dev/fd0
+$ <userinput>cp $ECOS_REPOSITORY/packages/hal/i386/pc/current/misc/menu.lst /mnt/floppy/boot/grub</userinput>
+$ <userinput>umount /mnt/floppy</userinput>
+</screen>
+<para>
+The file <filename>menu.lst</filename> is an example GRUB menu
+configuration file. It contains menu items to load some of the
+standard eCos tests from floppy or from partition zero of the first
+hard disk. You should, of course, customize this file to load your own
+application. Alternatively you can use the command-line interface of
+GRUB to input commands yourself.
+</para>
+<para>
+Applications can be installed, or updated simply by copying them to
+the floppy disk at the location expected by the
+<filename>menu.lst</filename> file. For booting from floppy disks it
+is recommended that the executable be stripped of all debug and symbol
+table information before copying. This reduces the size of the file
+and can make booting faster.
+</para>
+<para>
+To install GRUB on a hard disk, refer to the GRUB documentation. Be
+warned, however, that if you get this wrong it may compromise any
+existing bootloader that exists on the hard disk and may make any
+other operating systems unbootable. Practice on floppy disks or
+sacrificial hard disks first. On machines running Red Hat Linux
+version 7.2 and later, you can just add your own menu items to the
+<filename>/boot/grub/menu.lst</filename> file that already exists.
+</para>
+</sect2>
+<sect2>
+<title>Debugging FLOPPY and GRUB Applications</title>
+<para>
+When RedBoot loads an application it also provides debugging services
+in the form of GDB remote protocol stubs. When an application is
+loaded stand-alone from a floppy disk, or by GRUB, these services are
+not present. To allow these application to be debugged, it is possible
+to include GDB stubs into the application.
+</para>
+<para>
+To do this, set the &quot;Support for GDB stubs&quot;
+(<literal>CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS</literal>) configuration
+option. Following this any application built will allow GDB to connect
+to the debug serial port (by default serial device 0, also known as
+COM1) whenever the application takes an exception, or if a Control-C
+is typed to the debug port. Ethernet debugging is not supported.
+</para>
+<para>
+The option &quot;Enable initial breakpoint&quot;
+(<literal>CYGDBG_HAL_DEBUG_GDB_INITIAL_BREAK</literal>) causes the HAL
+to take a breakpoint immediately before calling cyg_start(). This
+gives the developer a chance to set any breakpoints or inspect the
+system state before it proceeds. The configuration sets this option by
+default if GDB stubs are included, and this is not a RedBoot build. To
+make the application execute immediately either disable this option,
+or disable <literal>CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS</literal>.
+</para>
+</sect2>
+</SECT1>
+<SECT1 id="setup-synth-i386linux">
+<TITLE><!-- <conditionaltext> --><!-- <index></index> -->i386/Linux Synthetic Target Setup</TITLE>
+<PARA>When building for the synthetic Linux target, the resulting
+binaries are native Linux applications with the HAL providing suitable
+bindings between the eCos kernel and the Linux kernel.</PARA>
+<NOTE>
+<PARA>Please be aware that the current implementation of the Linux
+synthetic target does not allow thread-aware debugging.</PARA>
+</NOTE>
+<PARA>These Linux applications cannot be run on a Windows system.
+However, it is possible to write a similar HAL emulation for the
+Windows kernel if such a testing target is desired.</PARA>
+<SECT2>
+<TITLE>Tools</TITLE>
+
+<PARA>For the synthetic target, eCos relies on features not available
+in native compilers earlier than gcc-2.95.1. It also requires version
+2.9.5 or later of the GNU linker. If you have gcc-2.95.1 or later
+and ld version 2.9.5 or later, then you do not need to build new
+tools. eCos does not support earlier versions. You can check the compiler
+version using <COMMAND>gcc -v</COMMAND>
+and the linker version using <COMMAND>ld
+-v</COMMAND>.</PARA>
+
+<PARA>If you have native tools that are sufficiently recent for
+use with eCos, you should be aware that by default eCos assumes
+that the tools <COMMAND>i686-pc-linux-gnu-gcc</COMMAND>, <COMMAND>i686-pc-linux-gnu-ar</COMMAND>,
+ <COMMAND>i686-pc-linux-gnu-ld</COMMAND>, and <COMMAND>i686-pc-linux-gnu-objcopy</COMMAND> are
+on your system and are the correct versions for use with eCos. But
+instead, you can tell eCos to use your native tools by editing the
+configuration value "Global command prefix" (CYGBLD_GLOBAL_COMMAND_PREFIX)
+in your eCos configuration. If left empty (i.e. set to the empty
+string) eCos will use your native tools when building.</PARA>
+<PARA>If you have any difficulties, it is almost certainly easiest
+overall to rebuild the tools as described on: <ULINK URL="http://ecos.sourceware.org/getstart.html">http://ecos.sourceware.org/getstart.html</ULINK></PARA>
+</SECT2>
+</SECT1>
+
+
+</appendix>
diff --git a/cesar/ecos/doc/sgml/user-guide/user-guide.sgml b/cesar/ecos/doc/sgml/user-guide/user-guide.sgml
new file mode 100755
index 0000000000..2d15f6f12f
--- /dev/null
+++ b/cesar/ecos/doc/sgml/user-guide/user-guide.sgml
@@ -0,0 +1,141 @@
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
+
+<!-- Begin Document Specific Declarations -->
+
+<?Fm: Validation Off>
+
+<!ENTITY ui "&micro;ITRON">
+<!ENTITY cygnus-full "Cygnus Solutions">
+<!ENTITY cygnus-legal-notice SYSTEM "CYGNUS-TERMS">
+<!ENTITY ecos-license SYSTEM "ecos-license.sgml">
+<!ENTITY introduction SYSTEM "introduction.sgml">
+<!ENTITY installation SYSTEM "installation.sgml">
+<!ENTITY programming SYSTEM "programming.sgml">
+<!ENTITY config-tool SYSTEM "config-tool.sgml">
+<!ENTITY programming-concepts-and-techniques SYSTEM "programming-concepts-techniques.sgml">
+<!ENTITY configuration SYSTEM "configuration.sgml">
+<!ENTITY target-setup SYSTEM "target-setup.sgml">
+<!ENTITY real-time-characterization SYSTEM "real-time-characterization.sgml">
+
+<!NOTATION PNG SYSTEM "PNG">
+<!ENTITY send-pr SYSTEM "send-pr.sgml">
+<!ENTITY graphic1 SYSTEM "pix/config-f1.png" NDATA png>
+<!ENTITY graphic2 SYSTEM "pix/repos-relocate.png" NDATA png>
+<!ENTITY graphic3 SYSTEM "pix/save-as-dialog.png" NDATA png>
+<!ENTITY graphic4 SYSTEM "pix/open-dialog.png" NDATA png>
+<!ENTITY graphic5 SYSTEM "pix/html-help.png" NDATA png>
+<!ENTITY graphic6 SYSTEM "pix/settings-viewers.png" NDATA png>
+<!ENTITY graphic7 SYSTEM "pix/configwin.png" NDATA png>
+<!ENTITY graphic8 SYSTEM "pix/conflictwin.png" NDATA png>
+<!ENTITY graphic9 SYSTEM "pix/propwin.png" NDATA png>
+<!ENTITY graphic10 SYSTEM "pix/memorywin.png" NDATA png>
+<!ENTITY graphic11 SYSTEM "pix/regprops.png" NDATA png>
+<!ENTITY graphic12 SYSTEM "pix/memregions.png" NDATA png>
+<!ENTITY graphic13 SYSTEM "pix/memreloc.png" NDATA png>
+<!ENTITY graphic14 SYSTEM "pix/BuildPackages.png" NDATA png>
+<!ENTITY graphic15 SYSTEM "pix/toolsplatforms.png" NDATA png>
+<!ENTITY graphic16 SYSTEM "pix/modifyplatform.png" NDATA png>
+<!ENTITY graphic17 SYSTEM "pix/addplatform.png" NDATA png>
+<!ENTITY graphic18 SYSTEM "pix/templates.png" NDATA png>
+<!ENTITY graphic19 SYSTEM "pix/ToolsOptions.png" NDATA png>
+<!ENTITY graphic20 SYSTEM "pix/Conflicts.png" NDATA png>
+<!ENTITY graphic21 SYSTEM "pix/find-dialog.png" NDATA png>
+<!ENTITY graphic22 SYSTEM "pix/buildoptions.png" NDATA png>
+<!ENTITY graphic23 SYSTEM "pix/build-tools2.png" NDATA png>
+<!ENTITY graphic24 SYSTEM "pix/user-tools-dialog.png" NDATA png>
+<!ENTITY graphic25 SYSTEM "pix/ch-properties-dialog.png" NDATA png>
+<!ENTITY graphic26 SYSTEM "pix/connection.png" NDATA png>
+<!ENTITY graphic27 SYSTEM "pix/run-tests.png" NDATA png>
+<!ENTITY graphic28 SYSTEM "pix/addfromfolder.png" NDATA png>
+<!ENTITY graphic29 SYSTEM "pix/bash.png" NDATA png>
+<!ENTITY graphic30 SYSTEM "pix/comprepos.png" NDATA png>
+<!ENTITY graphic31 SYSTEM "pix/admin.png" NDATA png>
+<!ENTITY graphic32 SYSTEM "pix/settings-display.png" NDATA png>
+<!ENTITY graphic33 SYSTEM "pix/settings-confict.png" NDATA png>
+<!ENTITY graphic34 SYSTEM "pix/settings-runtests.png" NDATA png>
+<!ENTITY programming-graphic1 SYSTEM "pix/config-f1.png" NDATA png>
+<!ENTITY programming-graphic2 SYSTEM "pix/templates01.png" NDATA png>
+<!ENTITY programming-graphic3 SYSTEM "pix/ARMStartup01.png" NDATA png>
+<!ENTITY programming-graphic4 SYSTEM "pix/build-lib01.png" NDATA png>
+<!ENTITY programming-graphic5 SYSTEM "pix/save-as-dialog.png" NDATA png>
+<!ENTITY programming-graphic6 SYSTEM "pix/build-tools2.png" NDATA png>
+<!ENTITY programming-graphic7 SYSTEM "pix/user-tools-dialog.png" NDATA png>
+<!ENTITY programming-graphic8 SYSTEM "pix/build-tests01.png" NDATA png>
+<!ENTITY programming-graphic9 SYSTEM "pix/twothreads2.png" NDATA png>
+
+<!-- <!ENTITY version CDATA "&lt;version&gt;"> -->
+<!ENTITY Version CDATA "<version>">
+
+<!-- End Document Specific Declarations -->
+
+]>
+
+<BOOK ID="ECOS-USER-GUIDE">
+ <bookinfo>
+ <TITLE>eCos User Guide</TITLE>
+ <copyright><year>2001, 2002</year><holder>Red Hat, Inc.</holder></copyright>
+ <copyright><year>2003</year><holder>eCosCentric Ltd.</holder></copyright>
+
+ <legalnotice>
+ <title>Documentation licensing terms</title>
+<para>This material may be distributed only subject to the terms
+and conditions set forth in the Open Publication License, v1.0
+or later (the latest version is presently available at
+<ulink url="http://www.opencontent.org/openpub/">http://www.opencontent.org/openpub/</ulink>).
+</para>
+<para>
+Distribution of the work or derivative of the work in any
+standard (paper) book form is prohibited unless prior
+permission is obtained from the copyright holder.
+</para>
+ </legalnotice>
+ <legalnotice>
+ <title>Trademarks</title>
+<para>Altera&reg; and Excalibur&trade; are trademarks of Altera Corporation.</para>
+<para>AMD&reg; is a registered trademark of Advanced Micro Devices, Inc.</para>
+<para>ARM&reg;, StrongARM&reg;, Thumb&reg;, ARM7&trade;, ARM9&trade; is a registered trademark of Advanced RISC Machines, Ltd.</para>
+<para>Cirrus Logic&reg; and Maverick&trade; are registered trademarks of Cirrus Logic, Inc.</para>
+<para>Cogent&trade; is a trademark of Cogent Computer Systems, Inc.</para>
+<para>Compaq&reg; is a registered trademark of the Compaq Computer Corporation.</para>
+<para>Fujitsu&reg; is a registered trademark of Fujitsu Limited.</para>
+<para>IBM&reg;, and PowerPC&trade; are trademarks of International Business Machines Corporation.</para>
+<para>IDT&reg; is a registered trademark of Integrated Device Technology Inc.</para>
+<para>Intel&reg;, i386&trade;, Pentium&reg;, StrataFlash&reg; and XScale&trade; are trademarks of Intel Corporation.</para>
+<para>Intrinsyc&reg; and Cerf&trade; are trademarks of Intrinsyc Software, Inc.</para>
+<para>Linux&reg; is a registered trademark of Linus Torvalds. </para>
+<para>Matsushita&trade; and Panasonic&reg; are trademarks of the Matsushita Electric Industrial Corporation.</para>
+<para>Microsoft&reg;, Windows&reg;, Windows NT&reg; and Windows XP&reg; are registered trademarks of Microsoft Corporation, Inc. </para>
+<para>MIPS&reg;, MIPS32&trade; MIPS64&trade;, 4K&trade, 5K&trade; Atlas&trade; and Malta&trade; are trademarks of MIPS Technologies, Inc.</para>
+<para>Motorola&reg;, ColdFire&reg; is a trademark of Motorola, Inc.</para>
+<para>NEC&reg; V800&trade;, V850&trade;, V850/SA1&trade;, V850/SB1&trade;, VR4300&trade;, and VRC4375&trade; are trademarks of NEC Corporation.</para>
+<para>PMC-Sierra&reg; RM7000&trade; and Ocelot&trade; are trademarks of PMC-Sierra Incorporated. </para>
+<para>Red Hat, eCos&trade;, RedBoot&trade;, GNUPro&reg;, and Insight&trade; are trademarks of Red Hat, Inc. </para>
+<para>Samsung&reg; and CalmRISC&trade; are trademarks or registered trademarks of Samsung, Inc. </para>
+<para>Sharp&reg; is a registered trademark of Sharp Electronics Corp.</para>
+<para>SPARC&reg; is a registered trademark of SPARC International, Inc., and is used under license by Sun Microsystems, Inc. </para>
+<para>Sun Microsystems&reg; and Solaris&reg; are registered trademarks of Sun Microsystems, Inc. </para>
+<para>SuperH&trade; and Renesas&trade; are trademarks owned by Renesas Technology Corp.</para>
+<para>Texas Instruments&reg;, OMAP&trade; and Innovator&trade; are trademarks of Texas Instruments Incorporated.</para>
+<para>Toshiba&reg; is a registered trademark of the Toshiba Corporation.</para>
+<para>UNIX&reg; is a registered trademark of The Open Group. </para>
+<para>All other brand and product names, trademarks, and copyrights are the
+property of their respective owners. </para>
+ </legalnotice>
+ </bookinfo>
+
+
+ &introduction;
+ &installation;
+ &programming;
+ &config-tool;
+ &programming-concepts-and-techniques;
+ &configuration;
+
+ <part id="appendices">
+ <title>Appendixes</title>
+ &target-setup;
+ &real-time-characterization;
+ &ecos-license;
+ </part>
+
+</BOOK>
diff --git a/cesar/ecos/examples/ChangeLog b/cesar/ecos/examples/ChangeLog
new file mode 100644
index 0000000000..4c62ab2ca3
--- /dev/null
+++ b/cesar/ecos/examples/ChangeLog
@@ -0,0 +1,8 @@
+2003-03-03 John Dallaway <jld@ecoscentric.com>
+
+ Makefile: Rename ECOS_INSTALL -> INSTALL_DIR to match
+ documentation.
+
+2003-01-20 John Dallaway <jld@ecoscentric.com>
+
+ Makefile: Simplify by reference to ecos.mak
diff --git a/cesar/ecos/examples/Makefile b/cesar/ecos/examples/Makefile
new file mode 100644
index 0000000000..77ea85c148
--- /dev/null
+++ b/cesar/ecos/examples/Makefile
@@ -0,0 +1,55 @@
+# Mostly written by Jonathan Larmour, Red Hat, Inc.
+# Reference to ecos.mak added by John Dallaway, eCosCentric Limited, 2003-01-20
+# This file is in the public domain and may be used for any purpose
+
+# Usage: make INSTALL_DIR=/path/to/ecos/install
+
+INSTALL_DIR=$$(INSTALL_DIR) # override on make command line
+
+include $(INSTALL_DIR)/include/pkgconf/ecos.mak
+
+XCC = $(ECOS_COMMAND_PREFIX)gcc
+XCXX = $(XCC)
+XLD = $(XCC)
+
+CFLAGS = -I$(INSTALL_DIR)/include
+CXXFLAGS = $(CFLAGS)
+LDFLAGS = -nostartfiles -L$(INSTALL_DIR)/lib -Ttarget.ld
+
+# RULES
+
+.PHONY: all clean
+
+all: hello twothreads simple-alarm serial
+
+clean:
+ -rm -f hello hello.o twothreads twothreads.o
+ -rm -f simple-alarm simple-alarm.o serial serial.o
+ -rm -f instrument-test instrument-test.o
+
+%.o: %.c
+ $(XCC) -c -o $*.o $(CFLAGS) $(ECOS_GLOBAL_CFLAGS) $<
+
+%.o: %.cxx
+ $(XCXX) -c -o $*.o $(CXXFLAGS) $(ECOS_GLOBAL_CFLAGS) $<
+
+%.o: %.C
+ $(XCXX) -c -o $*.o $(CXXFLAGS) $(ECOS_GLOBAL_CFLAGS) $<
+
+%.o: %.cc
+ $(XCXX) -c -o $*.o $(CXXFLAGS) $(ECOS_GLOBAL_CFLAGS) $<
+
+hello: hello.o
+ $(XLD) $(LDFLAGS) $(ECOS_GLOBAL_LDFLAGS) -o $@ $@.o
+
+twothreads: twothreads.o
+ $(XLD) $(LDFLAGS) $(ECOS_GLOBAL_LDFLAGS) -o $@ $@.o
+
+simple-alarm: simple-alarm.o
+ $(XLD) $(LDFLAGS) $(ECOS_GLOBAL_LDFLAGS) -o $@ $@.o
+
+serial: serial.o
+ $(XLD) $(LDFLAGS) $(ECOS_GLOBAL_LDFLAGS) -o $@ $@.o
+
+instrument-test: instrument-test.o
+ $(XLD) $(LDFLAGS) $(ECOS_GLOBAL_LDFLAGS) -o $@ $@.o
diff --git a/cesar/ecos/examples/build_Make.params b/cesar/ecos/examples/build_Make.params
new file mode 100755
index 0000000000..9f2a2d76c1
--- /dev/null
+++ b/cesar/ecos/examples/build_Make.params
@@ -0,0 +1,44 @@
+#! /bin/sh
+
+# This script will set up a Makefile fragment with
+# platform specifics. This fragement can be used by
+# the automatically generated Makefile (via the script
+# 'build_Makefile')
+
+# Copied from 'makefile' in the "install" tree
+
+ECOS_BUILD_DIR=${1-`pwd`}
+ECOS_INSTALL_DIR=`echo ${ECOS_BUILD_DIR}/install`
+if [ ! -d ${ECOS_BUILD_DIR}/install ]; then
+ if [ ! -d ${ECOS_BUILD_DIR}/*_build ]; then
+ echo "Not an eCos install tree"
+ echo "usage: <eCos_repository>/build_Make.params [<eCos_install_dir>]"
+ echo "... where <eCos_install_dir> is the directory which contains"
+ echo " the *.ecc configuration file used to build the kernel"
+ exit
+ else
+ ECOS_INSTALL_DIR=`echo ${ECOS_BUILD_DIR}/*_install`
+ ECOS_BUILD_DIR=`echo ${ECOS_BUILD_DIR}/*_build`
+ fi
+fi
+
+cat <<EOF >Make.params
+
+# Copied from 'makefile' in the "install" tree
+
+EOF
+
+grep export ${ECOS_BUILD_DIR}/makefile >>Make.params
+
+cat <<EOF >>Make.params
+
+#
+# Target specific flags, etc.
+#
+
+EOF
+
+cat ${ECOS_INSTALL_DIR}/include/pkgconf/ecos.mak >>Make.params
+
+
+
diff --git a/cesar/ecos/examples/build_Makefile b/cesar/ecos/examples/build_Makefile
new file mode 100755
index 0000000000..3da18b08ca
--- /dev/null
+++ b/cesar/ecos/examples/build_Makefile
@@ -0,0 +1,39 @@
+#! /bin/sh
+
+# This script will create a generic Makefile template
+# suitable for use with an installed eCos configuration.
+
+# usage: <eCos_repository>/build_Makefile [<eCos_install_dir>]
+# env: ${SRCS} - the default list of source files
+# ${DST} - the default target
+ECOS_DIR=${1-`pwd`}
+
+cat <<EOF >Makefile
+#
+# Makefile for eCos tests
+#
+
+# Platform specific setups
+include Make.params
+
+# Simple build rules
+
+.c.o:
+ \$(CC) -c \$(ECOS_GLOBAL_CFLAGS) -I\$(PREFIX)/include \$*.c
+
+.o:
+ \$(CC) \$(ECOS_GLOBAL_LDFLAGS) -L\$(PREFIX)/lib -Ttarget.ld \$*.o -o \$@
+
+SRCS=${SRCS-source_file.c}
+OBJS=\${SRCS:%.c=%.o}
+DST=${DST-result_prog}
+
+\${DST}: \${OBJS}
+
+EOF
+
+# Create actual parameters
+
+`dirname $0`/build_Make.params ${ECOS_DIR}
+
+
diff --git a/cesar/ecos/examples/hello.c b/cesar/ecos/examples/hello.c
new file mode 100644
index 0000000000..94709d94db
--- /dev/null
+++ b/cesar/ecos/examples/hello.c
@@ -0,0 +1,8 @@
+/* this is a simple hello world program */
+#include <stdio.h>
+
+int main(void)
+{
+ printf("Hello, eCos world!\n");
+ return 0;
+}
diff --git a/cesar/ecos/examples/instrument-test.c b/cesar/ecos/examples/instrument-test.c
new file mode 100644
index 0000000000..21444d5d73
--- /dev/null
+++ b/cesar/ecos/examples/instrument-test.c
@@ -0,0 +1,50 @@
+/* this is a program which uses eCos instrumentation buffers; it needs
+ to be linked with a kernel which was compiled with support for
+ instrumentation */
+
+#include <stdio.h>
+#include <pkgconf/kernel.h>
+#include <cyg/kernel/instrmnt.h>
+#include <cyg/kernel/kapi.h>
+
+#ifndef CYGVAR_KERNEL_INSTRUMENT_EXTERNAL_BUFFER
+# error You must configure eCos with CYGVAR_KERNEL_INSTRUMENT_EXTERNAL_BUFFER
+#endif
+
+struct Instrument_Record
+{
+ CYG_WORD16 type; // record type
+ CYG_WORD16 thread; // current thread id
+ CYG_WORD timestamp; // 32 bit timestamp
+ CYG_WORD arg1; // first arg
+ CYG_WORD arg2; // second arg
+};
+
+struct Instrument_Record instrument_buffer[20];
+cyg_uint32 instrument_buffer_size = 20;
+
+int main(void)
+{
+ int i;
+
+ cyg_instrument_enable(CYG_INSTRUMENT_CLASS_CLOCK, 0);
+ cyg_instrument_enable(CYG_INSTRUMENT_CLASS_THREAD, 0);
+ cyg_instrument_enable(CYG_INSTRUMENT_CLASS_ALARM, 0);
+
+ printf("Program to play with instrumentation buffer\n");
+
+ cyg_thread_delay(2);
+
+ cyg_instrument_disable(CYG_INSTRUMENT_CLASS_CLOCK, 0);
+ cyg_instrument_disable(CYG_INSTRUMENT_CLASS_THREAD, 0);
+ cyg_instrument_disable(CYG_INSTRUMENT_CLASS_ALARM, 0);
+
+ for (i = 0; i < instrument_buffer_size; ++i) {
+ printf("Record %02d: type 0x%04x, thread %d, ",
+ i, instrument_buffer[i].type, instrument_buffer[i].thread);
+ printf("time %5d, arg1 0x%08x, arg2 0x%08x\n",
+ instrument_buffer[i].timestamp, instrument_buffer[i].arg1,
+ instrument_buffer[i].arg2);
+ }
+ return 0;
+}
diff --git a/cesar/ecos/examples/serial.c b/cesar/ecos/examples/serial.c
new file mode 100644
index 0000000000..a35155f358
--- /dev/null
+++ b/cesar/ecos/examples/serial.c
@@ -0,0 +1,83 @@
+/*
+ * Written 1999-03-19 by Jonathan Larmour, Cygnus Solutions
+ * This file is in the public domain and may be used for any purpose
+ */
+
+/* CONFIGURATION CHECKS */
+
+#include <pkgconf/system.h> /* which packages are enabled/disabled */
+#ifdef CYGPKG_KERNEL
+# include <pkgconf/kernel.h>
+#endif
+#ifdef CYGPKG_LIBC
+# include <pkgconf/libc.h>
+#endif
+#ifdef CYGPKG_IO_SERIAL
+# include <pkgconf/io_serial.h>
+#endif
+
+#ifndef CYGFUN_KERNEL_API_C
+# error Kernel API must be enabled to build this example
+#endif
+
+#ifndef CYGPKG_LIBC_STDIO
+# error C library standard I/O must be enabled to build this example
+#endif
+
+#ifndef CYGPKG_IO_SERIAL_HALDIAG
+# error I/O HALDIAG pseudo-device driver must be enabled to build this example
+#endif
+
+/* INCLUDES */
+
+#include <stdio.h> /* printf */
+#include <string.h> /* strlen */
+#include <cyg/kernel/kapi.h> /* All the kernel specific stuff */
+#include <cyg/io/io.h> /* I/O functions */
+#include <cyg/hal/hal_arch.h> /* CYGNUM_HAL_STACK_SIZE_TYPICAL */
+
+
+
+/* DEFINES */
+
+#define NTHREADS 1
+#define STACKSIZE ( CYGNUM_HAL_STACK_SIZE_TYPICAL + 4096 )
+
+/* STATICS */
+
+static cyg_handle_t thread[NTHREADS];
+static cyg_thread thread_obj[NTHREADS];
+static char stack[NTHREADS][STACKSIZE];
+
+/* FUNCTIONS */
+
+static void simple_prog(CYG_ADDRESS data)
+{
+ cyg_io_handle_t handle;
+ Cyg_ErrNo err;
+ const char test_string[] = "serial example is working correctly!\n";
+ cyg_uint32 len = strlen(test_string);
+
+ printf("Starting serial example\n");
+
+ err = cyg_io_lookup( "/dev/haldiag", &handle );
+
+ if (ENOERR == err) {
+ printf("Found /dev/haldiag. Writing string....\n");
+ err = cyg_io_write( handle, test_string, &len );
+ }
+
+ if (ENOERR == err) {
+ printf("I think I wrote the string. Did you see it?\n");
+ }
+
+ printf("Serial example finished\n");
+
+}
+
+void cyg_user_start(void)
+{
+ cyg_thread_create(4, simple_prog, (cyg_addrword_t) 0, "serial",
+ (void *)stack[0], STACKSIZE, &thread[0], &thread_obj[0]);
+ cyg_thread_resume(thread[0]);
+}
diff --git a/cesar/ecos/examples/simple-alarm.c b/cesar/ecos/examples/simple-alarm.c
new file mode 100644
index 0000000000..e99ae5d9c0
--- /dev/null
+++ b/cesar/ecos/examples/simple-alarm.c
@@ -0,0 +1,76 @@
+/* this is a very simple program meant to demonstrate
+ a basic use of time, alarms and alarm-handling functions
+ in eCos */
+
+#include <cyg/kernel/kapi.h>
+
+#include <stdio.h>
+
+#define NTHREADS 1
+#define STACKSIZE 4096
+
+static cyg_handle_t thread[NTHREADS];
+
+static cyg_thread thread_obj[NTHREADS];
+static char stack[NTHREADS][STACKSIZE];
+
+static void alarm_prog( cyg_addrword_t data );
+
+/* we install our own startup routine which sets up
+ threads and starts the scheduler */
+void cyg_user_start(void)
+{
+ cyg_thread_create(4, alarm_prog, (cyg_addrword_t) 0,
+ "alarm_thread", (void *) stack[0],
+ STACKSIZE, &thread[0], &thread_obj[0]);
+ cyg_thread_resume(thread[0]);
+}
+
+/* we need to declare the alarm handling function (which is
+ defined below), so that we can pass it to
+ cyg_alarm_initialize() */
+cyg_alarm_t test_alarm_func;
+
+/* alarm_prog() is a thread which sets up an alarm which is then
+ handled by test_alarm_func() */
+static void alarm_prog(cyg_addrword_t data)
+{
+ cyg_handle_t test_counterH, system_clockH, test_alarmH;
+ cyg_tick_count_t ticks;
+ cyg_alarm test_alarm;
+ unsigned how_many_alarms = 0, prev_alarms = 0, tmp_how_many;
+
+ system_clockH = cyg_real_time_clock();
+ cyg_clock_to_counter(system_clockH, &test_counterH);
+ cyg_alarm_create(test_counterH, test_alarm_func,
+ (cyg_addrword_t) &how_many_alarms,
+ &test_alarmH, &test_alarm);
+ cyg_alarm_initialize(test_alarmH, cyg_current_time()+200, 200);
+
+ /* get in a loop in which we read the current time and
+ print it out, just to have something scrolling by */
+ for (;;) {
+ ticks = cyg_current_time();
+ printf("Time is %llu\n", ticks);
+ /* note that we must lock access to how_many_alarms, since the
+ alarm handler might change it. this involves using the
+ annoying temporary variable tmp_how_many so that I can keep the
+ critical region short */
+ cyg_scheduler_lock();
+ tmp_how_many = how_many_alarms;
+ cyg_scheduler_unlock();
+ if (prev_alarms != tmp_how_many) {
+ printf(" ---> alarm calls so far: %u\n", tmp_how_many);
+ prev_alarms = tmp_how_many;
+ }
+ cyg_thread_delay(30);
+ }
+}
+
+/* test_alarm_func() is invoked as an alarm handler, so
+ it should be quick and simple. in this case it increments
+ the data that is passed to it. */
+void test_alarm_func(cyg_handle_t alarmH, cyg_addrword_t data)
+{
+ ++*((unsigned *) data);
+}
diff --git a/cesar/ecos/examples/twothreads.c b/cesar/ecos/examples/twothreads.c
new file mode 100644
index 0000000000..bbc7347b8a
--- /dev/null
+++ b/cesar/ecos/examples/twothreads.c
@@ -0,0 +1,62 @@
+#include <cyg/kernel/kapi.h>
+
+#include <stdio.h>
+#include <math.h>
+#include <stdlib.h>
+
+/* now declare (and allocate space for) some kernel objects,
+ like the two threads we will use */
+cyg_thread thread_s[2]; /* space for two thread objects */
+
+char stack[2][4096]; /* space for two 4K stacks */
+
+/* now the handles for the threads */
+cyg_handle_t simple_threadA, simple_threadB;
+
+/* and now variables for the procedure which is the thread */
+cyg_thread_entry_t simple_program;
+
+/* and now a mutex to protect calls to the C library */
+cyg_mutex_t cliblock;
+
+/* we install our own startup routine which sets up threads */
+void cyg_user_start(void)
+{
+ printf("Entering twothreads' cyg_user_start() function\n");
+
+ cyg_mutex_init(&cliblock);
+
+ cyg_thread_create(4, simple_program, (cyg_addrword_t) 0,
+ "Thread A", (void *) stack[0], 4096,
+ &simple_threadA, &thread_s[0]);
+ cyg_thread_create(4, simple_program, (cyg_addrword_t) 1,
+ "Thread B", (void *) stack[1], 4096,
+ &simple_threadB, &thread_s[1]);
+
+ cyg_thread_resume(simple_threadA);
+ cyg_thread_resume(simple_threadB);
+}
+
+/* this is a simple program which runs in a thread */
+void simple_program(cyg_addrword_t data)
+{
+ int message = (int) data;
+ int delay;
+
+ printf("Beginning execution; thread data is %d\n", message);
+
+ cyg_thread_delay(200);
+
+ for (;;) {
+ delay = 200 + (rand() % 50);
+
+ /* note: printf() must be protected by a
+ call to cyg_mutex_lock() */
+ cyg_mutex_lock(&cliblock); {
+ printf("Thread %d: and now a delay of %d clock ticks\n",
+ message, delay);
+ }
+ cyg_mutex_unlock(&cliblock);
+ cyg_thread_delay(delay);
+ }
+}
diff --git a/cesar/ecos/packages/ChangeLog b/cesar/ecos/packages/ChangeLog
new file mode 100644
index 0000000000..f4f12d68e6
--- /dev/null
+++ b/cesar/ecos/packages/ChangeLog
@@ -0,0 +1,2518 @@
+2005-06-28 Nick Garnett <nickg@ecoscentric.com>
+
+ * ecos.db: Added Object Loader package.
+
+2005-06-12 Brandl Harald <Harald.Brandl@fh-joanneum.at>
+
+ * ecos.db: Added a ethernet device driver for the NETARM.
+
+2005-04-17 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * ecos.db: Added support for the AT91 based PhyCore
+
+2005-03-03 Jay Foster <jay@systech.cam>
+
+ * pkgconf/rules.mak: Added removal of -Wstrict-prototypes compiler
+ option from the C++ flags (ACTUAL_CXXFLAGS). This silences a
+ warning from GCC 3.4.3.
+
+2005-02-23 Kurt Stremerch <kurt.stremerch@exys.be>
+
+ * ecos.db: Added support for Exys XSEngine (PXA255) based system.
+
+2005-01-31 Aaron Voisine <aaron@voisine.org>
+
+ * Port of exXML to eCos. Based on ezXML 0.8.1.
+ Ported by Matt Jerdonek <maj1224@yahoo.com>
+
+2004-11-25 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * pkgconf/rules.doc: If we cannot find the catalog do not pass it
+ as an option and hope jade knowns where it is.
+
+2004-11-19 Jani Monoses <jani@iv.ro>
+
+ * ecos.db: New lpc2xxx platform, Olimex LPC-MT.
+
+2004-11-14 Jani Monoses <jani@iv.ro>
+
+ * ecos.db: New packages which include a hal variant port for the
+ lpc2xxx, generic serial and watchdog drivers for the lpc2xxx and
+ ports for the Keil MCB2100 and Olimex P2106.
+
+2004-10-17 Iztok Zupet <iz@elsis.si>
+
+ * ecos.db: Added generic IDE disk driver.
+
+2004-10-5 Andrea Michelotti <amichelotti@atmel.com>
+
+ * ecos.db: Added atmel jtst watchdog support
+
+2004-10-05 Savin Zlobec <savin@elatec.si>
+
+ * ecos.db: Added Atmel AT91 SPI bus driver and AT91EB55 devices.
+
+2004-09-16 Andrea Michelotti <amichelotti@atmel.com>
+
+ * ecos.db: Added atmel jtst board support, based on atmel Diopsis
+ chip which is an at91 plus a dsp.
+
+2004-09-09 John Dallaway <jld@ecoscentric.com>
+
+ * ecos.db: Remove CYGPKG_IO_SERIAL_ARM_AIM711_S3C4510 and
+ CYGPKG_IO_SERIAL_ARM_AIM711_16X5X which are now CDL components.
+ [ patch from Roland Cassebohm ]
+
+2004-09-05 Mark Salter <msalter@redhat.com>
+
+ * ecos.db: Add new frv packages.
+
+2004-08-24 Bart Veer <bartv@ecoscentric.com>
+
+ * ecos.db: add SPI package
+
+2004-08-06 Jani Monoses <jani@iv.ro>
+
+ * ecos.db: Remove two obsolete flash drivers: INTEL_BOOTBLOCK
+ and AT91.They have better replacements and are not used anyway.
+
+2004-05-15 Roland Ca?ebohm <roland.cassebohm@VisionSystems.de>
+
+ * ecos.db: Added aim711 support
+
+2004-05-14 John Dallaway <jld@ecoscentric.com>
+
+ * ecos.db: Rationalise the i386 PC target naming scheme.
+
+2004-05-04 Jani Monoses <jani@iv.ro>
+
+ * ecos.db: Added lwip package.
+
+2004-04-21 Yoshinori Sato <ysato@users.sourceforge.jp>
+
+ * ecos.db: New Packages:
+ CYGPKG_DEVS_ETH_DREAMCAST_RLTK8139 - SEGA Dreamcast Broadband Adapter support
+
+2004-04-14 Nick Garnett <nickg@calivar.com>
+
+ * ecos.db: Added PPP package.
+
+2004-03-12 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * pkgconf/rules.mak: When linking, $LDFLAGS must be after target.ld
+ so that -nostdlib works in all cases, so place it at the end.
+ Add -finline-limit hack to preserve behaviour with newer GCC.
+ Treat -frtti like -fno-rtti.
+
+2004-02-27 Iztok Zupet <iz@elsis.si>
+
+ * ecos.db: Added the LANCEPCI packages and support for the vmWare
+ target
+
+2004-02-25 Gary Thomas <gary@mlbassoc.com>
+
+ * devs/flash/powerpc/moab/current/src/moab_nand_flash.c:
+ New board revision has larger FLASH (TC58DVG02 == 128MB)
+
+2004-02-20 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * ecos.db: Include CYGPKG_DEVS_ETH_ARM_KS32C5000 in snds100 and
+ e7t targets.
+
+2004-01-30 John Dallaway <jld@ecoscentric.com>
+
+ * ecos.db: Add 'hardware' attribute to CYGPKG_DEVS_ETH_ARM_KS32C5000.
+
+ * ecosadmin.tcl: Delete empty directories in the repository following
+ eCos package removal. Read the hardware attribute from package records
+ in ecos.db.
+
+2004-01-19 Nick Garnett <nickg@calivar.com>
+
+ * ecos.db: Added FAT12/16 filesystem packages.
+
+ * NEWS: Added line about FAT filesystem support.
+
+2003-11-22 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * ecos.db: Added libipsec package.
+
+2003-11-09 Gary Thomas <gary@mlbassoc.com>
+
+ * ecos.db: Add serial I/O package for Motorola MPC8xxx (QUICC-II)
+
+2003-11-05 Bob Koninckx <bob.koninckx@mech.kuleuven.ac.be>
+
+ * ecos.db: New packages - ethernet and watchdog for EC555
+
+2003-11-04 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * ecos.db: Modified the e7t to use the new 39VFXXX flash driver
+
+2003-11-04 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * ecos.db: Replaced the 39VF4XX flash driver with a 39VFXXX driver.
+
+2003-10-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * pkgconf/rules.mak: Remove -finit-priority and -fvtable-gc
+ from all flags.
+
+2003-10-15 Gary Thomas <gary@mlbassoc.com>
+2003-09-23 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * pkgconf/rules.mak Only pass C flags to the C compiler.
+ Workaround for BUG #1000035.
+
+2003-10-04 Savin Zlobec <savin@elatec.si>
+
+ * ecos.db: New package - Synth wall clock device
+
+2003-09-30 Gary Thomas <gary@mlbassoc.com>
+
+ * ecos.db: New package - National Semiconductor DP83816 PCI ethernet
+
+2003-09-21 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * ecos.db: Add sh4_202_md serial driver package
+ (CYGPKG_IO_SERIAL_SH_SH4_202_MD)
+
+2003-09-19 Gary Thomas <gary@mlbassoc.com>
+
+ * ecos.db:
+ New platform - TAMS MOAB (PowerPC 405GPr)
+ New NAND FLASH drivers - Toshiba 58CXXX
+ New RTC driver - Dallas DS1307
+
+2003-09-05 Nick Garnett <nickg@balti.calivar.com>
+
+ * ecos.db: Added Packages and target for SuperH SH4-202 part and
+ MicroDev CPU board.
+
+2003-08-22 Chris Garry <cgarry@sweeneydesign.co.uk>
+
+ * ecos.db: Add new VNC server package.
+
+2003-08-22 Gary Thomas <gary@mind.be>
+
+ * ecos.db: Add support for picasso - another NMI uEngine (PXA255)
+ based system.
+
+2003-08-19 Gary Thomas <gary@mlbassoc.com>
+
+ * ecos.db: New packages:
+ CYGPKG_DEVS_ETH_PHY - generic API for handling ethernet PHY devices
+ CYGPKG_DEVS_ETH_POWERPC_FCC - fast ethernet controller on MPC8xxx
+ CYGPKG_HAL_POWERPC_MPC8XXX - improved variant support for Motorola 8xxx
+ CYGPKG_HAL_POWERPC_RATTLER - Analogue & Micro Rattler (Motorola 8250)
+
+2003-08-13 Thomas Koeller <thomas.koeller@baslerweb.com>
+
+ * ecos.db: Changed alias names for AT91 flash driver to avoid
+ collision with new EB40 flash driver.
+
+2003-08-06 Michael Anburaj <embeddedeng@hotmail.com>
+
+ * ecos.db: Added support for the Samsung ARM9/SMDK2410 development
+ board.
+
+2003-08-05 Thomas Koeller <thomas.koeller@baslerweb.com>
+
+ * ecos.db: Added new package CYGPKG_DEVS_FLASH_EB40 and updated the
+ eb40 target to use it instead of the old CYGPKG_DEVS_FLASH_AT91.
+
+2003-07-23 Chris Garry <cgarry@sweeneydesign.co.uk>
+
+ * ecos.db: Added new packages CYGPKG_DEVS_FLASH_SST_39VF400 and
+ CYGPKG_DEVS_FLASH_ARM_E7T. Updated e7t target to include FLASH
+ drivers.
+
+2003-07-09 Eric Doenges <Eric.Doenges@DynaPel.com>
+
+ * ecos.db: Add Realtek 8139 (PCI) ethernet driver.
+
+2003-06-12 John Dallaway <jld@ecoscentric.com>
+
+ * ecosadmin.tcl: Add repository merge capability (undocumented and
+ unsupported at present).
+
+2003-05-21 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * pkgconf/stylesheet.dsl: No callout graphics.
+
+2003-05-14 Thomas Koeller <thomas.koeller@baslerweb.com>
+
+ * ecos.db: Changed human-readable name and description of
+ CYGPKG_IO_SERIAL_ARM_AT91 to something sensible.
+
+2003-05-12 Nick Garnett <nickg@balti.calivar.com>
+
+ * ecos.db: Added packages and targets for Atmel AT91 boards: EB40,
+ EB40A, EB42 and EB55.
+
+2003-05-05 John Dallaway <jld@ecoscentric.com>
+
+ * pkgconf/rules.doc: Build PNG images (not GIFs) for HTML docs.
+
+2003-03-23 Iztok Zupet <iz@vsr.si>
+
+ * pkgconf/rules.doc: Use three stylesheets instead of one.
+ One for HTML the other for PDF-letter and the third one for PDF-A4
+ format. (Stylesheets do not support two printable targets in
+ same stylesheet). Added copyfiles to PDF targets.
+ * pkgconf/ssletter.dsl: New file.
+ * pkgconf/ssa4.dsl: New file.
+ * pkgconf/stylesheet.dsl: remove print stylesheet.
+
+2003-04-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * ecos.db: Shorten some long target names to stop them overrunning
+ GUI boundaries.
+
+2003-03-24 Gary Thomas <gary@mlbassoc.com>
+
+ * ecos.db: New platform - Analogue & Micro AdderII (PPC852T)
+
+2003-03-18 Mark Salter <msalter@redhat.com>
+
+ * ecos.db: Add support for XScale IXP425, IXDP425, GRG.
+
+2003-03-09 Yoshinori Sato <ysato@users.sourceforge.jp>
+
+ * ecos.db: New variant H8S (H8/300 architecture)
+ New platform H8MAX (H8/300H)
+ New platform EDOSK-2674 (H8S)
+
+2003-03-05 John Dallaway <jld@ecoscentric.com>
+
+ * ecosadmin.tcl: Prevent calls to 'cygpath' with an empty
+ path argument.
+
+2003-02-25 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * ecos.db: Added the Simple Network Time Protocol (SNTP) client.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * pkgconf/rules.doc: Allow support for copying files directly from
+ source doc dir to build dir. Primarily intended for copying over
+ pre-built GIFs for the moment.
+
+2003-02-20 Gary Thomas <gary@mind.be>
+
+ * ecos.db: New platform - NMI uE250 (ARM Xscale PXA250)
+
+2003-02-14 Tim Michals <t.michals@attbi.com>
+2003-02-14 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * ecos.db: Add IDT MIPS IDT79RC32334 reference platform port,
+ including Flash, ethernet, and serial drivers.
+
+2003-02-12 Patrick Doyle <wpd@delcomsys.com>
+
+ * ecos.db: Added ethernet packages to OMAP Innovator port.
+
+2003-02-05 Patrick Doyle <wpd@delcomsys.com>
+
+ * ecos.db: Add Texas Instruments ARM9 OMAP Innovator port. Redboot
+ only for now.
+
+2003-01-29 John Dallaway <jld@ecoscentric.com>
+
+ * ecosadmin.tcl: Accommodate UNIX-style paths under Cygwin when
+ adding packages.
+
+ * pkgconf/fixhtml.tcl: Accommodate latest Cygwin Tcl shell
+ (tclsh83.exe)
+
+2003-01-24 Knud Woehler <knud.woehler@microplex.de>
+2003-01-24 Mark Salter <msalter@redhat.com>
+
+ * ecos.db: Add packages for XScale PXA2x0/MPC50.
+
+2003-01-24 John Dallaway <jld@ecoscentric.com>
+
+ * ecosadmin.tcl: Accommodate latest Cygwin Tcl shell (tclsh83.exe)
+
+2003-01-22 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * ecos.db: Add CYGPKG_LINUX_COMPAT. Not a compatibility layer
+ for Linux applications, but Linux drivers and filesystems.
+ Intended for an updated JFFS2.
+
+2002-12-24 Gary Thomas <gary@mlbassoc.com>
+
+ * ecos.db: Add port to Cogent CSB281 (PowerPC 8245)
+
+2002-12-22 Nick Garnett <nickg@ecoscentric.com>
+
+ * ecos.db: Add HTTPD package.
+
+2002-12-12 Gary Thomas <gthomas@ecoscentric.com>
+2002-12-12 Patrick Doyle <wpd@delcomsys.com>
+
+ * ecos.db: Add packages for MPC8260 based systems - VADS
+ and TS6 (Delphi Communications).
+
+2002-12-10 Gary Thomas <gthomas@ecoscentric.com>
+
+ * ecos.db: Enable serial devices for A&M 'adder' platform.
+
+2002-11-25 Gary Thomas <gthomas@ecoscentric.com>
+
+ * ecos.db: Add support for A&M "Adder" (PowerPC 850)
+ Split PowerPC QUICC ethernet driver into generic+platform.
+
+2002-11-14 Gary Thomas <gthomas@ecoscentric.com>
+
+ * ecos.db: Add application profiling package.
+
+2002-11-14 Mark Salter <msalter@redhat.com>
+
+ * ecos.db: Add flash package for AM33 ASB2303.
+
+2002-11-12 Gary Thomas <gary@mlbassoc.com>
+
+ * ecos.db: Add NPWR (Xscale from Team ASA). Reorganize Xscale
+ IOP310 based platforms (IQ80310).
+
+2002-10-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * ecosadmin.tcl (ecosadmin::process_add_package): Use gzip -d, not
+ gunzip, as the latter fails with TCL on cygwin.
+
+2002-10-18 Gary Thomas <gthomas@ecoscentric.com>
+
+ * ecos.db: Change package name for TS1000 flash part (consistency).
+
+ * NEWS: Add note about Allied Telesyn TS1000 port.
+
+2002-10-15 Iztok Zupet <iz@vsr.si>
+
+ * pkgconf/rules.doc: modified for pdf target
+
+2002-09-23 Mark Salter <msalter@redhat.com>
+
+ * ecos.db: Change XScale core dirname to "cores".
+
+2002-09-19 Mark Salter <msalter@redhat.com>
+
+ * ecos.db: Add XScale core package.
+
+2002-09-03 Gary Thomas <gary@mlbassoc.com>
+
+ * ecos.db: Adding generic FEC driver support package (Viper).
+ Add Allied Telesyn TS1000 platform.
+
+2002-08-27 Bart Veer <bartv@ecoscentric.com>
+
+ * ecos.db: remove packages SDL and SMPEG that were never released.
+
+2002-08-15 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * ecos.db: Added the CPU load measurement package.
+
+2002-08-14 Yoshinori Sato <qzb04471@nifty.ne.jp>
+
+ * ecos.db: Add H8/300H watchdog driver package.
+
+2002-08-07 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * ecos.db: Added CRC package.
+
+2002-08-07 Gary Thomas <gthomas@ecoscentric.com>
+
+ * pkgconf/rules.doc: The location of the various stylesheets, etc,
+ is quite varied. Made some changes to let it work on a Debian system,
+ but this should definitely be revisited.
+
+2002-08-06 Jonathan Larmour <jifl@ecoscentric.com>
+
+ * ecos.db: Include AT91 watchdog driver in at91 target.
+
+2002-08-06 Thomas Koeller <thomas@koeller.dyndns.org>
+
+ * ecos.db: Add AT91 watchdog driver.
+
+2002-06-20 Gary Thomas <gary@chez-thomas.org>
+
+ * ecos.db: A&M Viper now uses generic AMD FLASH drivers.
+
+2002-05-08 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Removed special SH2 SCIF driver. The changes have been
+ merged into the SH3 (now generic SH) driver.
+
+2002-04-24 Yoshinori Sato <qzb04471@nifty.ne.jp>
+
+ * ecos.db: Add H8/300 serial driver.
+
+2002-04-25 Bob Koninckx <bob.koninckx@mech.kuleuven.ac.be>
+
+ * ecos.db: Add ports to Wuerz Elektronik and Axiom Manufacturing
+ MPC555 based eval boards.
+
+2002-04-24 Yoshinori Sato <qzb04471@nifty.ne.jp>
+
+ * ecos.db: Add H8/300 port.
+
+
+2002-04-15 Nick Garnett <nickg@redhat.com>
+
+ * ecos.db: Changed integrator target to integrator_arm7. Tidied up
+ descriptions a little too.
+
+2002-04-09 Jesper Skov <jskov@redhat.com>
+
+ * pkgconf/rules.mak: Allow building of .cpp files. Not supported
+ by makefile generator yet, though.
+
+ * ecos.db: Added SDL and SMPEG packages.
+
+2002-03-26 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added microwindows package.
+
+2002-03-18 Hugo Tyson <hmt@redhat.com>
+
+ * ecos.db: Add CYGPKG_HAL_SPARC_ERC32 and target sparc_erc32 -
+ also contributed by Jiri Gaisler <jiri@gaisler.com>.
+
+2002-03-15 Hugo Tyson <hmt@redhat.com>
+
+ * ecos.db: Add CYGPKG_HAL_SPARC, CYGPKG_HAL_SPARC_LEON, target
+ sparc_leon contributed by Jiri Gaisler <jiri@gaisler.com>. See
+ <http://www.gaisler.com> for information about the TSIM simulator
+ and Leon project per se.
+
+2002-03-10 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add keyboard driver.
+
+2002-03-09 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add touch screen driver for Aglient AAED-2000.
+
+2002-03-08 Nick Garnett <nickg@redhat.com>
+
+ * ecos.db: Fix Integrator aliases.
+
+2002-03-06 Nick Garnett <nickg@redhat.com>
+
+ * ecos.db: Added new target: integrator_arm9 for ARM9 based
+ integrator boards.
+ Renamed CYGPKG_DEVS_FLASH_INTEGRATOR to
+ CYGPKG_DEVS_FLASH_ARM_INTEGRATOR for consistency with other
+ packages.
+
+2002-02-18 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added SH2 etherc package.
+
+2002-02-08 Jonathan Larmour <jlarmour@redhat.com>
+
+ * pkgconf/rules.mak: Fix the below fix which had too _few_ backslashes!
+
+2002-02-04 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add [contributed] port to CerfCube & CerfPDA.
+
+2002-02-02 Jonathan Larmour <jlarmour@redhat.com>
+
+ * pkgconf/rules.mak: Fix bug with too many backslashes in sed.
+
+2002-01-29 Nick Garnett <nickg@redhat.com>
+
+ * ecos.db: Added CYGPKG_IO_SERIAL_ARM_IQ80321.
+
+2002-01-28 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Split network support into generic and stack
+ implementations. Move BSD based stack to one implementation.
+
+ Add FreeBSD based (new) stack as another.
+2002-01-21 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos.db: Add JFFS2 package.
+
+2002-01-21 Mark Salter <msalter@redhat.com>
+
+ * ecos.db: Add Intel 82544 ethernet for iq80321.
+
+2002-01-08 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos.db: Add synthetic flash driver package, and add it to the
+ synthetic linux target.
+
+2002-01-03 Mark Salter <msalter@redhat.com>
+
+ * ecos.db: Use generic i82559 driver for iq80310.
+
+2001-12-20 Koichi Nagashima <naga@r-lab.co.jp>
+
+ * ecos.db: Add CqREEK SH7750 flash driver.
+
+2001-12-12 Mark Salter <msalter@redhat.com>
+
+ * ecos.db: Add XScale "Verde" (IOP80320) and IQ80321 packages.
+
+2001-12-06 Nick Garnett <nickg@redhat.com>
+
+ * ecos.db: Change names on i82544 package so they don't clash with
+ the i82559 package.
+
+2001-11-27 Nick Garnett <nickg@redhat.com>
+
+ * ecos.db: Added Intel i82543/82544 Gigabit ethernet card packages
+ and a pc_giga target. This latter is a temporary measure until we
+ work out how best to support targets that can have a variety of
+ different hardware configurations.
+
+2001-11-22 Jesper Skov <jskov@redhat.com>
+
+ * pkgconf/rules.mak: Added HOST_CC definition. This really belongs
+ in the top-level makefile, but requires tool changes.
+
+2001-11-21 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * pkgconf/rules.mak (tests.stamp): Be explicit about substitution
+ to avoid potential problems with trailing spaces.
+ [Bug #56239]
+
+2001-11-14 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: edb7xxx target now uses generic CS8900A driver.
+
+2001-11-07 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added generic CS8900A package to AAED2000 template.
+
+2001-11-06 Mark Salter <msalter@redhat.com>
+
+ * ecos.db: Add malta_mips64_5kc target.
+
+2001-11-02 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added CS8900A package.
+
+2001-10-30 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos.db: Added ARM Integrator target including HAL, serial driver,
+ eth driver and flash driver packages.
+
+2001-10-30 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added AAED2000 packages.
+
+2001-10-19 Lars Lindqvist <Lars.Lindqvist@combitechsystems.com>
+2001-10-19 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos.db: Add AEB-2 (E7T) serial drivers.
+
+2001-10-12 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos.db: Clarify Cirrus Logic related packages' descriptions.
+
+2001-10-12 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos.db: Remove separate CYGPKG_DEVS_FLASH_STRATA_EDB7XXX package,
+ and instead use a consolidated CYGPKG_DEVS_FLASH_EDB7XXX package.
+
+2001-09-27 Hugo Tyson <hmt@redhat.com>
+
+ * ecos.db: Add CYGPKG_DEVS_ETH_INTEL_I21143 and
+ CYGPKG_DEVS_ETH_MIPS_VRC4375, and add them to the target vrc4375.
+
+2001-09-26 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add FLASH support for Fujitsu FR-V 400.
+
+2001-09-24 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added DNS package.
+
+2001-09-25 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add support for new Cogent [Cirrus Logic] EDB7312 platform.
+
+2001-09-20 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Adding network driver for Fujitsu FR-V 400.
+
+2001-09-18 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos.db: Add i386 PC wallclock driver package, and include it
+ in the PC target.
+
+2001-09-17 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add support for Fujitsu FRV family, including initial
+ target of frv400 (MB93091 eval board).
+
+2001-09-13 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added flash support to EDK7708.
+
+2001-09-10 Nick Garnett <nickg@redhat.com>
+
+ * ecos.db:
+ Added FLASH support for VRC437X based boards.
+
+2001-09-07 Nick Garnett <nickg@redhat.com>
+
+ * ecos.db: Added VRC4375 and VRC437X packages, added vrc4375
+ target and reorganized vrc4373 target to match.
+
+2001-08-17 Jesper Skov <jskov@redhat.com>
+ [from branch]
+ * ecos.db: Added flash package for excalibur.
+ Added excalibur platform.
+
+2001-07-31 Bart Veer <bartv@redhat.com>
+
+ * pkgconf/rules.mak:
+ Fix header file dependencies for testcases.
+
+2001-07-30 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add Samsung SNDS-100 evaulation board. Mostly based
+ on contribution from Grant Edwards <grante@visi.com>
+
+2001-07-30 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added Dreamcast platform HAL, contributed by Takeshi
+ Yaegashi (t@keshi.org)
+
+2001-07-27 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos.db: Add flexanet HAL, eth driver, flash driver and target.
+ Contributed by Jordi Colomer <jco@ict.es>
+
+2001-07-27 David Howells <dhowells@redhat.com>
+
+ * ecos.db: Added ASB2305 platform, and it's serial and flash
+ support.
+
+2001-07-24 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add Atmel AT91/EB40 serial support.
+
+2001-07-18 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add Atmel AT91/EB40
+
+2001-07-16 Bart Veer <bartv@redhat.com>
+
+ * pkgconf/fixhtml.tcl:
+ Add smarttags protection to the HTML files generated from DocBook.
+ Remove spurious comment.
+
+2001-07-16 Julian Smart <julians@redhat.com>
+
+ * pkconf/rules.mak: worked around Cygwin mkdir problem
+ by introducing a HOST variable and testing for HOST=CYGWIN.
+
+2001-07-10 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added se7751.
+ Added ether package.
+
+2001-07-06 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added wallclock driver for DS12887. Moved SH3 wallclock
+ driver into SH directory.
+ Added wallclock and watchdog drivers to hs7729pci.
+
+2001-06-28 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos.db: Clarify edb7xxx description.
+
+2001-06-22 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos.db: Add CYGPKG_NET_ETH_DRIVERS alias for CYGPKG_IO_ETH_DRIVERS
+ temporarily
+
+2001-06-22 Hugo Tyson <hmt@redhat.com>
+
+ * ecos.db: Add entry for generic SMSC lan91cxx ethernet controller.
+
+2001-06-21 Jonathan Larmour <jlarmour@redhat.com>
+
+ * pkgconf/rules.mak: Use sed to process dependency files in a way
+ that will work with both new and old format gcc dependency files.
+
+ * ecos.db: Include CYGPKG_DEVS_ETH_CF and CYGPKG_DEVS_ETH_NS_DP83902A
+ packages in those targets which can use them.
+ Make CYGPKG_DEVS_ETH_CF have hardware attribute.
+
+2001-06-19 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added serial packages for SE77x9.
+
+2001-06-13 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added DP83902A driver.
+
+2001-06-12 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added SE77x9 support packages.
+
+2001-06-08 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos.db: PC target uses generic 16x5x serial driver now.
+
+2001-06-08 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added MN10300 flash drivers.
+
+2001-06-08 Nick Garnett <nickg@cygnus.co.uk>
+
+ [x86 branch]
+ * ecos.db: Added CYGPKG_HAL_I386_GENERIC and CYGPKG_HAL_I386_PCMB
+ packages. Added these to PC target.
+
+2001-06-08 Nick Garnett <nickg@cygnus.co.uk>
+
+ [x86 branch]
+ * ecos.db:
+ Added CYGPKG_DEVS_ETH_I386_PC_I82559 package to provide support
+ for Intel i82559 ethernet device. Added this to PC target.
+
+2001-05-31 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecosadmin.tcl (set_value): Only warn if packages are missing.
+
+2001-05-31 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added VIA Rhine ethernet driver. Use on HS7729PCI.
+
+2001-05-30 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added PCI package to HS7729PCI.
+
+2001-05-28 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added flash package to HS7729PCI target.
+
+2001-05-25 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added HS7729PCI target.
+
+2001-05-23 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Ocelot now uses generic AMD flash driver.
+ Removed AMD29F040B driver.
+
+2001-05-01 Mark Salter <msalter@redhat.com>
+
+ * ecos.db: Add calmrisc16
+
+2001-04-30 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos.db: Add generic 16x5x driver to iq80310 target.
+
+2001-04-24 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add missing dependency on StrataFlash driver for Assabet.
+
+2001-04-03 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos.db:
+ Include flash driver in sa1100mm target.
+
+2001-04-03 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added PCNet ethernet driver package.
+
+2001-03-29 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos.db: Add Atlas flash and ethernet drivers to target description.
+ Also PCI package.
+ Fix atlas flash package alias typo.
+
+2001-03-21 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos.db: Update ceb_v850 description - no longer V850/SA1 specific
+
+2001-03-21 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added new Intel 28Fxxx package. Only supports flash
+ file at the moment.
+ Added flash support to Malta. Also enable PCI.
+
+2001-03-20 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added Malta board.
+
+2001-03-16 Mark Salter <msalter@redhat.com>
+
+ * ecos.db: Add calmrisc32.
+
+2001-03-16 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added E7T package.
+
+2001-03-15 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add keyboard driver for iPAQ
+
+2001-03-08 Bart Veer <bartv@redhat.com>
+
+ * ecosadmin.tcl, locate_files:
+ Do not eliminate makefile, configure.in, etc. It is now valid for
+ these to be present, e.g. in a package's host or doc subdirectory.
+
+2001-03-08 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added CYGPKG_COMPRESS_ZLIB.
+
+2001-03-05 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Adding iPAQ touch screen driver.
+
+2001-02-28 Hugo Tyson <hmt@redhat.com>
+
+ * ecos.db: Add Watchdog for SA11x0 StrongARMs. Package
+ CYGPKG_DEVICES_WATCHDOG_ARM_SA11X0. Included in appropriate
+ targets - not sure whether it applies to SA1100, so SA1110 only.
+
+2001-02-24 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Import initial iPAQ support from 3G Labs.
+
+2001-02-23 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: MBX uses new generic AMD flash driver.
+
+2001-02-21 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Add packages for new-style AMD and Atmel flash
+ drivers. Add flash support to PID.
+
+2001-02-14 Hugo Tyson <hmt@redhat.com>
+
+ * ecos.db: Add generic strataFlash driver,
+ CYGPKG_DEVS_FLASH_STRATA located in devs/flash/intel/strata/...
+
+2001-02-09 Jonathan Larmour <jlarmour@redhat.com>
+
+ * pkgconf/rules.mak: Revert below change for now until we work
+ out something better.
+
+2001-02-06 Jonathan Larmour <jlarmour@redhat.com>
+
+ * pkgconf/rules.mak: When generating dependencies, accomodate
+ new gcc dependency output format (and preserve compatibility
+ with the old - it just generates a redundant dependency).
+
+2001-02-01 Julian Smart <julians@redhat.com>
+
+ * Added mips to list of directories to keep for devs/flash
+2001-01-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * ecos.db: Added MIPS64 package and atlas_mips64_5kc target.
+
+2001-01-25 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added generic i82559 ethernet driver.
+ Added PMC-Sierra Ocelot driver.
+
+2001-01-10 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Add i82559 driver.
+
+2000-12-21 Mark Salter <msalter@redhat.com>
+
+ * ecos.db: Added MIPS Atlas ether and flash packages.
+
+2000-12-07 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Include PCI driver.
+
+2000-12-05 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added AMD flash driver.
+
+2000-11-30 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added Ocelot packages.
+
+
+2000-11-28 Nick Garnett <nickg@cygnus.co.uk>
+
+ * ecos.db: Added entry for loader package.
+
+2000-11-25 Jonathan Larmour <jlarmour@redhat.com>
+
+ * pkgconf/rules.mak (mlt_headers): Rewrite to work under Solaris,
+ and without excessive rebuilds.
+
+2000-11-21 Bart Veer <bartv@redhat.com>
+
+ * ecos.db:
+ Added USB support
+
+2000-11-16 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added intel flash driver. Going to use it as a test to
+ get more generic drivers working.
+
+2000-11-14 Drew Moseley <dmoseley@redhat.com>
+
+ * pkgconf/rules.mak: Get rid of some gnu specific options to cp, find and xargs.
+
+
+2000-11-04 Mark Salter <msalter@redhat.com>
+
+ * ecos.db: Add CYGPKG_DEVS_ETH_ARM_IQ80310.
+
+2000-11-01 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added cq7750 target and SH3/SH4 variant packages. Moved
+ EDK7708 package.
+
+2000-10-26 Mark Salter <msalter@redhat.com>
+
+ * ecos.db: Add support for XScale IQ80310
+
+2000-10-25 Drew Moseley <dmoseley@redhat.com>
+
+ * ecos.db: Add support for SA1100 Multimedia
+
+2000-10-20 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add FLASH drivers for PowerPC/MBX.
+
+2000-10-20 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Include FLASH drivers for all Cirrus Logic targets.
+
+2000-09-15 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Made PID use generic 16x5x driver.
+
+2000-09-14 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added generic 16x5x driver package.
+ * ecos.db: Use generic 16x5x driver for REF4955.
+
+2000-09-06 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: SH serial driver reorg changes.
+
+2000-08-29 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * ecos.db: Include CYGPKG_IO_PCI in vrc4373 target
+
+2000-08-24 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add FLASH driver for Intel Assabet.
+
+2000-08-22 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * ecos.db: Don't use set_value for asb
+
+2000-08-18 Nick Garnett <nickg@cygnus.co.uk>
+
+ * ecos.db: Added CYGPKG_FS_RAM package.
+
+2000-08-14 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * ecos.db: Minor changes...
+ Arrange for hardware flash drivers to be "hardware" and
+ referenced in their associated targets, and for the common flash
+ code to be not-hardware and not in any target.
+ Arrange for hardware PCMCIA drivers to be "hardware" and
+ referenced in their associated targets, and for the common PCMCIA
+ code to be not-hardware and not in any target.
+ Not sure what to do about the "PCMCIA (Compact Flash) ethernet
+ drivers" CYGPKG_DEVS_ETH_CF - arguably this should be "hardware"
+ and mentioned in all targets that can use PCMCIA, right? But it
+ is not hardware specific, and you might want to use PCMCIA without
+ using the net at all. So I left it a plain package.
+
+2000-08-14 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add flash driver for EDB7xxx.
+
+2000-08-10 Drew Moseley <dmoseley@redhat.com>
+
+ * ecos.db: Added asb packages.
+
+2000-08-10 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * ecos.db (CYGPKG_IO_ETH_DRIVERS): Since this package is now
+ included in all releases, re-organize it so that it is exported
+ in ecos.db always. (Same package as change 2000-08-03)
+
+2000-08-03 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Ethernet [logical] drivers package moved to "io".
+
+2000-08-01 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db:
+ Reorg FLASH packages to have architecture layer.
+
+2000-08-01 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db:
+ Reorg PCMCIA packages to have architecture layer.
+
+2000-07-26 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Adding FLASH package - FLASH memory support.
+
+2000-07-14 Drew Moseley <dmoseley@redhat.com>
+
+ * ecos.db: Added mips3264 stuff.
+
+2000-07-14 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add RedBoot package.
+
+2000-07-07 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add PCMCIA (Compact Flash) ethernet driver.
+
+2000-07-06 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add initial PCMCIA (Compact Flash) package(s).
+
+2000-07-07 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Removed 'enable' statements from SH targets. Moved to
+ individual HAL CDL files.
+
+2000-06-23 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added CqREEK serial package.
+
+2000-06-22 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added io_wallclock alias.
+
+ 2000-06-13 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * ecos.db: Add CYGPKG_SNMPLIB and CYGPKG_SNMPAGENT.
+
+2000-06-06 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Removed REF4955 watchdog. Isn't supported on the board.
+
+2000-06-05 John Dallaway <jld@redhat.com>
+
+ * ecos.db:
+
+ Tidy CqREEK-related display strings.
+
+2000-05-31 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added CqREEK platform HAL (contributed by Haruki
+ Kashiwaya).
+
+2000-05-31 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Moved watchdog drivers around. Common code in
+ io/watchdog, low-level drivers in devs/watchdog/<arch>.
+ CYGPKG_DEVICES_WATCHDOG is now called CYGPKG_IO_WATCHDOG and
+ targets include individual hardware drivers.
+
+2000-05-26 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added dallas 1742 wallclock driver package.
+
+2000-05-26 Nick Garnett <nickg@cygnus.co.uk>
+
+ * ecos.db: Added CYGPKG_IO_FILEIO package.
+
+2000-05-25 John Dallaway <jld@redhat.com>
+
+ * ecos.db: Tidy V850-related display strings.
+
+2000-05-25 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added REF4955 serial driver package.
+ Added wallclock driver package.
+
+2000-05-16 Nick Garnett <nickg@cygnus.co.uk>
+
+ * ecos.db: Fixed naming bug in CYGPKG_LIBC_SETJMP entry.
+
+2000-05-10 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added tx49 related packages.
+
+2000-04-26 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: ceb_v850 - include serial driver.
+
+2000-04-20 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Rename hal/nec to hal/v85x for NEC/V85x architecture.
+
+2000-04-11 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * ecos.db: CYGPKG_IO_SERIAL should not be "hardware" now that it
+ lives in templates rather than targets.
+
+2000-04-07 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * ecos.db: Re-organize device packages. This is a massive change
+ involving deleting all the sources for serial and ethernet drivers
+ from where they used to live in
+ packages/io/serial/current/src/ARCH/PLATFORM.[ch]
+ packages/net/drivers/eth/PLATFORM/current/src/...
+ and reinstating them in
+ packages/devs/serial/ARCH/PLATFORM/current/src/...
+ packages/devs/eth/ARCH/PLATFORM/current/src/...
+
+ All these new packages are properly defined in ecos.db, and are
+ all of type "hardware" so that a "target" can grab them.
+
+ This directory layout is descriptive of the devices we have right
+ now, arch and platform are separate levels just to make it easier
+ to navigate in the filesystem and similar to the HAL structure in
+ the filesystem.
+
+ It is *not* prescriptive of future work; for example, the mythical
+ common highly-portable 16550 serial driver which works on many
+ targets would be called "devs/serial/s16550/current", or a serial
+ device for a particular board (cogent springs to mind) that can
+ work with different CPUs fitted is "devs/serial/cogent/current".
+
+ Changelogs have been preserved and replicated over all the new
+ packages, so that no history is lost.
+
+ The contents of individual source files are unchanged; they build
+ in just the same emvironment except for a very few cases where the
+ config file name changed in this movement.
+
+ Targets in ecos.db have been redefined to bring in all relevant
+ hardware packages including net and serial drivers (but the newly
+ included packages are only active if their desired parent is
+ available.)
+
+ The names of CDL options (and their #defines of course) stay the
+ same for the serial drivers, for backward compatibility.
+
+ * templates/*/current.ect: these have had CYGPKG_IO_SERIAL added
+ rather than it being in (almost) all target definitions.
+
+2000-04-05 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Wallclock moved.
+
+2000-03-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * ecos.db: Added POSIX package.
+
+2000-03-24 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * ecosrelease.tcl: Allow running if cygtclsh80 is the tcl shell, as
+ on cygwin, rather than tclsh.
+ * ecosdistrib.tcl: Likewise
+ * ecosadmin.tcl: Likewise
+
+2000-03-24 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * ecos.db (sparclite_sim): Add CYGPKG_IO_SERIAL to the SPARClite
+ simulator target - thus acquiring conflict-free default template,
+ and getting stdio availability in libc.
+
+2000-03-22 John Dallaway <jld@cygnus.co.uk>
+
+ * ecosadmin.tcl:
+
+ Don't invoke 'cygpath' on DOS-style paths to workaround erratic
+ behaviour when invoked from the GUI admin tool.
+
+2000-03-20 Gary Thomas <gthomas@redhat.com>
+
+ * ecos.db: Add support for NEC/V850 HAL and CEB platform.
+
+2000-03-16 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Make edk7708 target select the appropriate CPU.
+
+2000-03-10 John Dallaway <jld@cygnus.co.uk>
+
+ * ecosadmin.tcl:
+
+ Use 'cygpath' to process Cygwin-style command line arguments.
+
+2000-03-03 Bart Veer <bartv@redhat.com>
+
+ * pkgconf/makevars (CP):
+ Use install -c rather than plain install, to avoid problems under
+ FreeBSD
+
+2000-02-29 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * ecos.db: Add driver package for PowerPC QUICC (MBX) ethernet.
+
+2000-02-28 John Dallaway <jld@cygnus.co.uk>
+
+ * ecos.db:
+
+ Eliminate superfluous ebsa285 target alias.
+
+2000-02-18 John Dallaway <jld@cygnus.co.uk>
+
+ * ecos.db:
+
+ Tidy display strings.
+
+2000-02-11 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: PPC descriptions fixed.
+
+2000-02-11 John Dallaway <jld@cygnus.co.uk>
+
+ * ecos.db:
+
+ Tidy PowerPC-related display strings.
+
+2000-02-10 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * targets: Fix up some accidental reversions
+ * ecos.db: Add some extra aliases for existing targets
+
+2000-02-10 Nick Garnett <nickg@cygnus.co.uk>
+
+ * targets:
+ * packages:
+ * ecos.db:
+ Added appropriate entries for i386 PC target.
+
+2000-02-10 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Added SPARClite target.
+
+2000-02-09 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * ecos.db: EDB7xxx ethernet driver CDL file changed.
+
+2000-02-09 John Dallaway <jld@cygnus.co.uk>
+
+ * ecos.db:
+
+ Add the EBSA285 ethernet driver package to the package database.
+
+2000-02-08 John Dallaway <jld@cygnus.co.uk>
+
+ * ecos.db:
+
+ Tidy networking-related package records and remove
+ target 'edb7212_net' which is not required for .epk
+ distributions.
+
+2000-02-08 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * ecos.db: Add network enabled EDB721x target.
+
+2000-02-08 John Dallaway <jld@cygnus.co.uk>
+
+ * ecos.db:
+
+ Add the networking packages to the package database.
+
+2000-02-07 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db:
+ * targets:
+ * packages:
+ Added PPC variants.
+
+2000-01-31 Jesper Skov <jskov@redhat.com>
+
+ * ecos.db: Removed below again.
+
+2000-01-28 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * ecos.db: Add support for networking package.
+
+2000-01-20 John Dallaway <jld@cygnus.co.uk>
+
+ * ecos.db:
+
+ Add an alias for the 'cma222' target.
+
+2000-01-20 Jesper Skov <jskov@cygnus.co.uk>
+ CR 901835-CR
+ * ecos.db: Added io_serial alias to CYGPKG_IO_SERIAL.
+
+2000-01-18 Jesper Skov <jskov@cygnus.co.uk>
+
+ * ecos.db: Include serial for i386 (to get IO_SERIAL_HALDIAG
+ requirement satisfied).
+
+1999-12-21 John Dallaway <jld@cygnus.co.uk>
+
+ * ecos.db:
+
+ Fix target descriptions for consistency.
+
+1999-12-20 John Dallaway <jld@cygnus.co.uk>
+
+ * ecos.db:
+
+ Add new internal CDL targets for the test farm:
+
+ edb7209, edb7212, cl7111
+
+ * ecosadmin.tcl:
+
+ Accommodate the new 'set_value' command in the package
+ database parsing code.
+
+1999-12-17 John Dallaway <jld@cygnus.co.uk>
+
+ * ecos.db:
+
+ Eliminate template entries. Templates are now specified
+ as files in the 'templates' directory hierarchy.
+
+ * ecosadmin.tcl:
+
+ Remove obsolete 'template' proc from the package
+ database parsing code.
+
+1999-12-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * ecos.db: Add support for big-endian ARM PID target
+ Add support for ARM PID thumb target (pidT)
+ Add support for big-endian ARM PID thumb target (pidTBE)
+ Add support for ARM CMA230 thumb target (cma230T)
+ Fix a few teeny typos
+
+1999-12-08 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * ecos.db: Update for Cogent CMA222 (associated with CMA230).
+
+1999-12-08 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf/rules.mak:
+
+ Force the MLT files in the install tree to be
+ writable.
+
+1999-12-02 Mark Salter <msalter@cygnus.com>
+
+ * targets: Added cma222 platform.
+
+1999-12-03 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf/rules.mak:
+
+ Modify the 'clean' rule to avoid leaving the output of
+ custom rules in the build tree.
+
+1999-12-02 John Dallaway <jld@cygnus.co.uk>
+
+ * ecosrelease.tcl:
+
+ Eliminate creation of version directory under
+ 'prebuilt' directory.
+
+1999-11-30 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf/rules.mak:
+
+ Add 'mlt_headers' rule.
+
+1999-11-29 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf/rules.mak:
+
+ Accommodate 'make -n' by using wildcards for the
+ dependencies of test executables.
+
+1999-11-29 John Dallaway <jld@cygnus.co.uk>
+
+ * ecosrelease.tcl:
+
+ Eliminate version directory under 'prebuilt'
+ directory.
+
+1999-11-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * targets:
+ Don't support stubs startup for PIDT platform
+ nor CMA230T platform
+ The reason is that you're meant to build the stub
+ in normal mode, not thumb mode.
+
+1999-11-25 John Dallaway <jld@cygnus.co.uk>
+
+ * *.cdl:
+
+ Fix description strings for CDL options
+ CYGPKG_LIBM_CFLAGS_ADD and CYGPKG_LIBM_CFLAGS_REMOVE.
+
+1999-11-24 John Dallaway <jld@cygnus.co.uk>
+
+ * ecos.db:
+
+ Eliminate command_prefix and cflags attributes for
+ each target. This information is no longer required
+ by libCDL.
+
+ * ecosadmin.tcl:
+
+ Remove obsolete command_prefix and cflags procs from
+ the package database parsing code.
+
+1999-11-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * targets:
+ Remove -mno-sched-prolog for thumb builds
+
+1999-11-19 John Dallaway <jld@cygnus.co.uk>
+
+ * ecosadmin.tcl:
+
+ Observe the ECOS_REPOSITORY environment variable rather
+ than PKGCONF_COMPONENT_REPOSITORY.
+
+1999-11-18 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * targets: EDB7209 only has "ROM" startup.
+
+1999-11-17 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf/rules.mak:
+
+ Ignore errors during test linking if the IGNORE_LINK_ERRORS
+ environment variable is set.
+
+1999-11-16 John Dallaway <jld@cygnus.co.uk>
+
+ * ecos.db:
+
+ Tidy Cirrus Logic display strings.
+
+1999-11-16 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * targets: Add aliases for Cirrus Logic platforms.
+
+1999-11-10 Bart Veer <bartv@cygnus.co.uk>
+
+ * ecos.db
+ Try to sort out template and target packages
+
+1999-11-09 John Dallaway <jld@cygnus.co.uk>
+
+ * ecos.db:
+
+ Tidy up target and template strings.
+
+1999-11-09 John Dallaway <jld@cygnus.co.uk>
+
+ * ecos.db:
+
+ Tidy up HAL alias strings.
+
+1999-11-08 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf/rules.mak:
+
+ Use .d files are targets for the compilation of tests.
+
+ Explcitly specify a .d file as a dependency of each
+ test execuatable to avoid deletion of .d file as an
+ 'intermediate' file.
+
+1999-11-04 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgadmin.tcl:
+
+ Rename to ecosadmin.tcl and perform a global
+ substitution "pkgadmin"->"ecosadmin" throughout the
+ script.
+
+1999-11-04 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf/rules.mak:
+
+ Make all tests dependent on the eCos library and object
+ files.
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf/rules.mak:
+
+ Remove .tmp files during 'make clean'.
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf/rules.mak:
+
+ Eliminate the use of .stamp files for individual object
+ files. Use the dependency files (*.d) as stamp files.
+
+1999-11-03 Jesper Skov <jskov@cygnus.co.uk>
+
+ * ecos.db: Adding MN10300 platforms.
+ Added CYGMON package.
+
+1999-11-02 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf/rules.mak:
+
+ Generate *.d dependency files during compilation.
+
+ Generate a .deps dependency file for the tests.
+
+ Include any .deps files which may exist.
+
+1999-11-02 Jesper Skov <jskov@cygnus.co.uk>
+
+ * ecos.db: Added PowerPC platforms.
+ * ecos.db: Added some MIPS platforms. Added remaining MIPS platforms.
+
+1999-11-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * ecos.db: Added i386/linux target.
+ * ecos.db: Added sparclite/sleb target.
+
+1999-10-29 Jesper Skov <jskov@cygnus.co.uk>
+
+ * ecos.db: Added SH/EDK target.
+
+1999-10-29 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf/rules.mak:
+
+ Specify '.PHONY' rule.
+
+1999-10-28 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf/rules.mak:
+
+ Rationalise the naming of timestamp files.
+
+1999-10-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: Reenabled stubs startup for pid9.
+
+1999-10-26 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * packages: Disable CygMon by default
+
+1999-10-26 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf/rules.mak:
+
+ New file providing default rules for makefiles generated
+ from CDL data.
+
+1999-10-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: Removed stubs startup for pid9.
+ * targets: Added pidBE platform.
+ * targets: Added pidTBE platform.
+
+1999-10-20 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * packages: Add Cygmon package.
+
+1999-10-20 John Dallaway <jld@cygnus.co.uk>
+
+ * ecos.db:
+
+ Rationalize hardware template names and descriptions.
+
+ Remove thumb variant hardware templates as thumb support
+ is now controlled by a CDL option.
+
+1999-10-19 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: Added pid9 target.
+
+1999-10-18 John Dallaway <jld@cygnus.co.uk>
+
+ * ecos.db:
+
+ Enable CYGHWR_THUMB for Thumb targets.
+
+1999-10-15 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgadmin.tcl:
+
+ Accommodate and ignore new tcl commands 'enable' and
+ 'disable' in the package database file (ecos.db).
+
+1999-10-14 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl:
+ Some occurrences of $ in constant strings were not
+ backslash-quoted. With older versions of Tcl this did not cause
+ problems, but Tcl 8.2.1 appears to have been fixed and now
+ attempts variable substitution. Appropriate backslashes have been
+ added.
+
+1999-10-07 Jesper Skov <jskov@cygnus.co.uk>
+
+ * ecos.db: Removed AEB rev C again. Handled with option now.
+
+1999-10-06 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: Added AEB rev C target.
+ * ecos.db: Same.
+
+1999-10-05 Nick Garnett <nickg@cygnus.co.uk>
+
+ * targets: Switched VR4300 over to big endian.
+
+1999-10-06 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl:
+ Allow an empty command prefix string, useful for the synthetic
+ target.
+
+1999-09-16 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: Added thumb-interwork.
+
+1999-09-16 Jesper Skov <jskov@cygnus.co.uk>
+
+ * ecos.db: Added pidT target.
+
+1999-09-14 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgadmin.tcl:
+
+ No longer explicitly check for the presence of the
+ 'tar' tool on the path. This problem is now reported
+ adequately during invocation.
+
+1999-09-14 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgadmin.tcl:
+
+ Redirect the standard output of all subprocesses invoked
+ using 'exec' to avoid problems with the script freezing
+ when invoked via Tcl_EvalFile() under Windows.
+
+1999-09-13 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgadmin.tcl:
+
+ Test for presence of the 'tar' tool on the path.
+
+ Raise an exception when a fatal error occurs. Catch
+ error messages at the top level and return as the
+ result of the script if the 'gui_mode' variable is
+ set.
+
+1999-09-10 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * packages: Tidy whitespace a bit
+
+1999-09-10 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * targets: Update processor type for EB7211 board (arm7tdmi).
+
+1999-09-09 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * packages: Rename CYGPKG_HAL_MN10300_SIM to CYGPKG_HAL_MN10300_AM31_SIM
+
+1999-09-09 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgadmin.tcl:
+
+ Add new '--extract_license' switch to extract the
+ license file from a package distribution file for
+ use by the eCos admin tool GUI.
+
+1999-09-09 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: Added pidT - PID running in Thumb mode.
+
+1999-09-08 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * targets: Missing base platform for EB7211 ==> CL7211
+
+1999-09-07 Jesper Skov <jskov@cygnus.co.uk>
+
+ * NEWS: Added drivers/watchdog
+
+1999-09-07 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgadmin.tcl:
+
+ Use 'return' rather than 'exit' in case we are running in
+ the process of the caller.
+
+ Add new '--accept_license' switch avoid prompting for
+ license confirmation when invoked non-interactively.
+
+1999-09-06 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * targets: Rename Cirrus Logic platforms to match actual boards.
+
+1999-09-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * targets: Remove am33-sim platform
+
+1999-08-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * packages:
+ * targets:
+ Rename all mentions of am32 to am31
+
+1999-08-12 Nick Garnett <nickg@cygnus.co.uk>
+
+ Merged from AM33 branch:
+
+ 1999-07-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * packages:
+ Put am33 platform sim after platform stb to look more correct
+ in Configuration tool
+
+ 1999-06-30 Nick Garnett <nickg@cygnus.co.uk>
+
+ * targets: Corrected command prefix and added architecture
+ selection flags.
+
+ 1999-06-29 Nick Garnett <nickg@cygnus.co.uk>
+
+ * targets:
+ * packages:
+ reorganized MN10300 HAL into arch+variants+platforms model
+ pioneered by MIPS HAL.
+
+1999-08-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * packages: Added entry for PCI package.
+
+1999-08-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * ecos.db: Added PCI and ebsa entries.
+
+1999-08-06 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgadmin.tcl: Remove any new targets or templates
+ which have missing packages.
+
+1999-08-05 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgadmin.tcl: Handle binary files by adding a ".bin"
+ suffix to the filename in the distribution archive. The
+ suffix is removed during file extraction.
+
+1999-07-29 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: enabled SH3 code generation.
+
+1999-07-27 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgadmin.tcl: Transfer development of the eCos
+ admin tool from the ecos-bartv-19990405-cdl-branch
+ to the repository trunk.
+
+1999-07-22 Hugo Tyson <hmt@masala.cygnus.co.uk>
+
+ * targets: Change compiler for StrongARM EBSA-285 from
+ "strongarm-elf-xxx" to "arm-elf-xxx -mcpu=strongarm" now that we
+ have verified an OK toolchain for that.
+
+1999-07-14 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * packages: Add StrongARM EBSA-285 eval board support.
+ Package is CYGPKG_HAL_ARM_EBSA285.
+
+ * targets: Add StrongARM EBSA-285 eval board support.
+ Target is ebsa285.
+
+1999-06-23 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: Undid last change - introduced run time problems.
+
+1999-06-22 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: Select SH3 code generation.
+
+1999-06-10 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * packages, targets: Add support for the PowerPC target MBX860
+ platform and QUICC companion components.
+
+1999-06-09 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * pkgconf.tcl (pkgconf::produce_misc_files): MLT files need
+ actual platform name, not base platform, to be compatible with
+ the ConfigTool.
+
+1999-06-07 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * pkgconf.tcl (pkgconf::process_arguments): Fix GUI problem with
+ new 'base_platform' stuff.
+
+1999-06-04 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * pkgconf.tcl (command_prefix): Allow command_prefix to be overridden
+ on a per-platform basis.
+
+1999-06-04 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * targets: Add cma230T - CMA230 running in THUMB mode.
+
+1999-06-03 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * targets: Add 'base_platform' for CL7111, based on CL7211.
+
+ * pkgconf.tcl: Support 'base_platform' in target specification. This
+ performs the inverse of what the "platform" entry in CDL options does.
+
+1999-05-28 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets:
+ * packages:
+ Renamed SH platform package to edk7708.
+
+1999-05-28 Nick Garnett <nickg@cygnus.co.uk>
+
+ * targets: Removed stubs startup option from vrc4373
+ platform. This is now handled by a permutation file.
+
+1999-05-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * NEWS: Added Kernel/Debugging entry.
+
+1999-05-21 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: Need -ggdb instead of -g.
+
+1999-05-21 Nick Garnett <nickg@cygnus.co.uk>
+
+ * targets: Added romram and stubs startup options to vrc4373
+ platform for vr4300.
+
+1999-05-20 Jesper Skov <jskov@cygnus.co.uk>
+
+ * packages:
+ * targets: Add new architecture sh, platform edk.
+
+1999-05-20 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * packages:
+ * targets: Add Cogent CMA230 (ARM 7TDMI)
+
+1999-05-18 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * packages: Remove errant CL7111 package.
+
+1999-05-17 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * packages:
+ * targets: Add new platform CL7111 - substantially the same as
+ the CL7211 but different processor core.
+1999-05-13 Nick Garnett <nickg@cygnus.co.uk>
+
+ The following changes were made in a branch and imported to the
+ main trunk at a later date:
+
+ 1999-04-26 Nick Garnett <nickg@cygnus.co.uk>
+
+ [VR4300 branch]
+ * targets: Added -EL to ARCHFLAGS and removed "el" from
+ command_prefix.
+
+ 1999-04-22 Nick Garnett <nickg@cygnus.co.uk>
+
+ [VR4300 branch]
+ * targets: Tidied up DBGFLAGS for vr4300 target.
+
+ 1999-04-20 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * packages: Reorder IO & HAL packages to allow ConfigTool to
+ handle rearranged hierarchy.
+
+ 1999-04-14 John Dallaway <jld@cygnus.co.uk>
+
+ * packages: Place architecture package description strings in
+ alphabetic order.
+
+1999-05-13 Jesper Skov <jskov@cygnus.co.uk>
+ PR 17809
+ * targets: Use -msoft-float instead of defining _SOFT_FLOAT.
+
+1999-05-10 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl:
+ Add new #define's for the target and platform headers.
+
+1999-04-30 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl:
+ Fixed the command line used when generating extras.o (again)
+
+1999-04-28 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf/makevars:
+ Remove the -n argument to tail, it does not appear to be required
+ on any supported host and causes problems with some
+ implementations of tail.
+
+ * pkgconf/makrules.tst:
+ Remove out of date device driver rules
+
+ * pkgconf/makevars:
+ * pkgconf/makrules.src:
+ Provide general rules for updating libextras.a
+
+1999-04-27 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl:
+ Add $(ARCHFLAGS) and $(LDARCHFLAGS) to the command line when
+ generating extras.o from libextras.a
+1999-04-19 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * targets: Add Cirrus Logic CL7211 support.
+
+
+1999-04-16 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl:
+ Remove the phony target "packages". This is no longer useful and
+ was causing problems, extras.o was not always rebuilt when it
+ should because of a dependency on a phony target.
+
+ * pkgconf.tcl:
+ Simplify the rules for extras.o, based on the assumption that
+ libextras.a will always exist. This is now guaranteed via
+ hal/common/src/dummy.c
+
+1999-04-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * NEWS: Add information about available ARM ports.
+
+1999-04-15 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf/makrules.src (build):
+ Remove partial comment - I cannot remember what is was meant to
+ say.
+
+1999-04-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * pkgconf.tcl: Recreate extras.o when necessary after all other builds
+ have completed. Create a dummy one, if there's no libextras.a
+
+1999-04-14 Bart Veer <bartv@cygnus.co.uk>
+
+ * packages:
+ Move serial devices to the end of the file so that the reparenting
+ below the HAL packages works as intended.
+
+1999-03-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * packages
+ * targets
+ Don't let CYGPKG_DEVICES_WALLCLOCK and CYGPKG_DEVICES_WATCHDOG be
+ hardware-specific since they have emulation modes.
+ Instead make them ubiquitous with default state enabled
+
+ * Recursively *.h, *.hxx, *.c, *.cxx, *.inl:
+ Detabify
+
+1999-03-22 John Lane <jlane@cygnus.co.uk>
+
+ * Recursively *.h, *.hxx, *.c, *.cxx, *.inl:
+ Update all copyright messages to be copyright 1999 too
+ Strip all e-mail addresses down to user names within the DESCRIPTION header
+
+1999-03-16 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * pkgconf/makevars: Allow variables of the type 'fn-CFLAGS'
+ and 'fn-CXXFLAGS' to provide singular option override for the
+ given file name.
+
+1999-03-17 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf/makevars: Remove dependence on echo '-e' switch.
+
+1999-03-16 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * targets (sparclite, sleb): add rom startup.
+
+1999-03-09 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl:
+ The generated pkgconf/pkgconf.mak file now defines variables
+ TARGET, PLATFORM and STARTUP.
+
+1999-03-05 John Dallaway <jld@cygnus.co.uk>
+
+ * packages, targets: Replace hardware attribute due to
+ unforseen problems (undo most recent change).
+
+1999-03-05 John Dallaway <jld@cygnus.co.uk>
+
+ * packages: Remove the hardware attribute from the WALLCLOCK
+ and WATCHDOG packages.
+ * targets: Remove the dependency of each platform on the
+ WALLCLOCK and WATCHDOG packages since these are no longer
+ hardware packages.
+
+1999-03-05 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * targets: Remove old DEVICES package requirements.
+ Add WALLCLOCK, WATCHDOG for all platforms.
+
+1999-03-04 Gary Thomas <gthomas@cygnus.co.uk>
+
+ These changes merged from 'ecos-new_devs-19990216-branch'
+
+ (1999-02-18 Gary Thomas <gthomas@cygnus.co.uk>)
+
+ * packages: Change include directory paths for I/O files.
+
+ (1999-02-16 Gary Thomas <gthomas@cygnus.co.uk>)
+
+ * pkgconf/makrules.src:
+ * pkgconf/makrules.tst:
+ * packages: Rework I/O [device drivers] sub-system.
+
+1999-03-04 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl:
+ Added new command-line arguments --debug and --nodebug
+
+ * pkgconf.tcl:
+ Revert previous change. cygpath may not be available in
+ customer releases of eCos.
+
+ * pkgconf.tcl:
+ Under Windows the external cygpath utility is now used to
+ perform pathname translations. This eliminates the need for
+ pkgconf.tcl to know about or make guesses about the mount
+ table.
+
+1999-03-04 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf.tcl: Point to renamed *.ldi and *.h memory
+ layout files with unique names.
+
+1999-03-03 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf/makrules.tst:
+ Ignore test link errors only when IGNORE_LINK_ERRORS is
+ defined.
+
+1999-03-02 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl:
+ tclsh 8.0 patchlevel 0 had problems accessing a namespace
+ array variable when a command was running inside a safe
+ interpreter. Prefixing the array variable with :: avoids
+ the problem and is still legal Tcl code.
+
+1999-02-26 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * targets (sleb):
+ * packages (CYGPKG_HAL_SPARCLITE_SLEB):
+ Add SPARClite evaluation board (sleb).
+
+
+1999-02-22 Mark Galassi <rosalia@cygnus.com>
+
+ * NEWS: small addition.
+
+1999-02-19 Jesper Skov <jskov@cygnus.co.uk>
+
+ * NEWS: Added some more entries, fleshed out some.
+
+1999-02-19 Mark Galassi <rosalia@cygnus.com>
+
+ * NEWS: added the NEWS file. It's rather sparse for now.
+
+1999-02-11 John Dallaway <jld@cygnus.co.uk>
+
+ * pkgconf/makrules.tst: Ignore linker errors while building tests.
+
+1999-02-10 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * targets: Set sparclite optimization -O2, enable selective
+ linking, &c &c.
+
+1999-02-10 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * targets: Remove options now that math problems have been addressed.
+
+1999-02-08 John Dallaway <jld@cygnus.co.uk>
+
+ * packages: Define HAL and RS232 packages in alphabetical order
+ for presentation by the configuration tool.
+
+1999-02-01 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * targets: Add compiler options to work-around math code problems.
+
+1999-01-25 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * targets: be explicit about -msoft-float -mcpu=sparclite FAOD.
+
+
+1999-01-21 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets:
+ * packages:
+ Added FADS entries from Kevin Hester <KHester@opticworks.com>.
+
+1999-01-20 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * packages: Add ARM/PID serial driver
+
+1999-01-20 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: Changes ppc target 'stub' to 'stubs'.
+
+1999-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * targets: added -finit-priority to CXXLANGFLAGS for sparclite.
+
+
+1999-01-19 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: Added 'stub' startup.
+
+1999-01-19 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * targets: Add new memory layout 'stubs' for GDB/stubs layout.
+
+1999-01-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * pkgconf.tcl: Add new misc file 'system.mak' which contains
+ the same info as <pkgconf/system.h> except suitable for makefiles.
+
+1999-01-14 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * packages: add SPARClite HAL info
+ * targets: add SPARClite info
+ * hal/sparclite/*...: initial checkin.
+
+
+1999-01-14 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * pkgconf/makrules.prv: Rename 'TESTS' to 'PROGS' which makes
+ more sense based on how these rules are used.
+
+ * pkgconf.tcl: Add support for 'misc' subdirectories.
+
+1999-01-14 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: Changed x86 tools prefix to i686-pc-linux-gnu.
+
+1999-01-13 Jesper Skov <jskov@cygnus.co.uk>
+
+ * packages: Added aliases to i386 linux entry.
+
+1999-01-06 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: Cleaned up i386 entry.
+
+Mon Nov 9 15:05:30 GMT 1998 Chris Provenzano <proven@cygnus.com>
+
+ Initial i386 linux port.
+
+ * packages, targets: Added target i386 platform linux.
+
+
+1999-01-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl: Provide interim support for the MLT
+
+1998-12-17 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * targets: Make compiler options platform specific
+ for ARM (AEB-1 vs PID)
+
+1998-12-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * packages: Add new AEB-1 platform
+
+ * targets: Support new selective linking for ARM.
+ Also add AEB-1 platform.
+
+1998-10-23 Jesper Skov <jskov@cygnus.co.uk>
+ PR 17959
+
+ * targets: Add wallclock and watchdog devices to SIM and powerpc
+ default configurations.
+
+1998-10-21 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: Define _SOFT_FLOAT for PPC. Workaround for PR 17809.
+
+1998-10-16 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl:
+ Add a check for versions of Tcl older than 8.0, and produce
+ a sensible error message in those cases.
+
+Thu Oct 15 08:55:00 1998 John Dallaway <jld@cygnus.co.uk>
+
+ * customers:
+ Fix typo in prebuilts for `public' customer.
+
+Wed Oct 14 15:50:34 1998 Tim Goodwin <tgoodwin@cygnus.co.uk>
+
+ * customers:
+ Add prebuilts for `public' customer.
+
+Tue Oct 13 17:10:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * targets:
+ Add -Wl,-static to link flags, since the up-and-coming
+ toolchains after 1.1 will require it. In particular anyone
+ using the latest devo compilers needs it.
+
+Tue Oct 13 14:52:50 1998 Tim Goodwin <tgoodwin@cygnus.co.uk>
+
+ * pkgconf.tcl:
+ Fix missing package name that causes bogus error message.
+
+1998-10-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: added -ffunction-sections and -fdata-sections for
+ powerpc.
+
+Mon Oct 12 18:52:35 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * targets:
+ Add -Winline back into ERRFLAGS for tx39
+ For PR 17319
+
+1998-10-08 Gary Thomas <gthomas@penang.cygnus.co.uk>
+
+ * packages:
+ * targets:
+ Add support for new architecture.
+
+1998-10-06 John Dallaway <jld@cygnus.co.uk>
+
+ * customers:
+ Make the PowerPC architecture part of the public release.
+
+1998-09-25 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl:
+ PR 17485: as a temporary workaround header files in the install
+ tree are now always deleted. This is a sub-optimal solution since
+ it may cause unnecessary rebuilds of the system and of application
+ code, but it is safe. A correct solution would require much more
+ work.
+
+1998-09-18 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl: The argument parsing code no longer tries to be
+ clever when parsing pathnames. Any string is accepted, and if the
+ filename happens to be illegal then this should result in a
+ reasonable error message when generating the build tree.
+
+Thu Sep 17 17:33:44 1998 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: TX39 doesn't support GDB_DEVICE.
+
+Tue Sep 15 19:38:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * targets:
+ Removed -Winline for tx39 target since this toolchain produces
+ warnings specific to it about not being able to inline functions
+ that return something more than 32 bits.
+
+Tue Sep 15 19:11:20 1998 David Moore <dsm@keema.cygnus.co.uk>
+
+ * pkgconf.tcl: Cleaned up comments.
+
+Tue Sep 15 13:49:06 1998 Jesper Skov <jskov@cygnus.co.uk>
+
+ * targets: Cleaned up powerpc lines.
+
+1998-09-14 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl:
+ Fixes for PR 17286. After the earlier fixes for PR 17195 pkgconf
+ had started deleting the makefile.deps files even when it was
+ not always appropriate to do so. Now makefile.deps files only
+ get deleted if there has been a change to the configuration's
+ set of packages. Whenever there is such a change the file
+ pkgconf/pkgconf.mak gets updated, which should cause everything
+ to be rebuilt and new makefile.deps files to be generated.
+
+1998-09-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * packages:
+ Added more useful aliases for the watchdog and wallclock devices.
+
+ * pkgconf.tcl:
+ Fixes for PR 17195.
+ When it becomes necessary to clean out the build tree,
+ the generated makefile.deps files are now removed as well.
+ It was possible for these files to reference headers that
+ are no longer in the configuration.
+ When a package was disabled and then re-enabled, the
+ generated makefiles for the include directories would believe
+ incorrectly that the install/include directory was up to date
+ because of .stamp files. These generated makefiles no longer
+ rely on .stamp files for correct operation to avoid any
+ such problems.
+
+ * targets:
+ All individual device drivers are now disabled when using
+ the simulator HAL packages.
+
+1998-09-08 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl (pkgconf::produce_misc_files):
+ * pkgconf/makrules.prv:
+ * pkgconf/makrules.tst:
+ * pkgconf/makrules.src:
+ Allow per-package make rules, for use by configuration tool.
+
+Tue Sep 8 14:40:57 1998 Tim Goodwin <tgoodwin@cygnus.co.uk>
+
+ * targets:
+ Turn on selective linking for TX39. Remove `-fno-builtin'.
+
+Mon Sep 7 18:24:07 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * targets:
+ Add -finit-priority to mn10300 and tx39 for it is no longer the
+ default, with our latest lovely tools.
+
+1998-09-04 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl: pkgconf::get_current_packages { }
+ Hardware packages which were inappropriate for the current target
+ but still explicitly enabled by the user were being ignored. In
+ such cases the user should be able to override the settings.
+
+ <pkgconf/system.h> now contains #undef's for packages that are not
+ present.
+
+1998-09-03 Bart Veer <bartv@cygnus.co.uk>
+
+ * targets:
+ The tx39 simulator platform should not have the serial device
+ enabled.
+
+ * pkgconf.tcl:
+ Changed the output of --pkgdata to match the needs of the
+ configuration tool.
+
+Thu Sep 3 15:13:42 1998 Tim Goodwin <tgoodiwn@cygnus.co.uk>
+
+ * packages:
+
+ s/panx/mn10300/g
+
+1998-09-02 Bart Veer <bartv@cygnus.co.uk>
+
+ * packages:
+ Changed a few aliases, to improve consistency.
+
+ * pkgconf.tcl:
+ Added Windows-specific support for pathnames with spaces.
+
+ * pkgconf.tcl:
+ * targets:
+ * packages:
+ Changed the way HAL packages are handled. At the same time,
+ improved the handling of device driver packages.
+
+Wed Sep 2 11:38:58 1998 Tim Goodwin <tgoodwin@cygnus.co.uk
+
+ * everything: global change to update copyright notice, etc.
+
+
+Mon Aug 31 11:24:25 1998 Jesper Skov <jskov@lassi.cygnus.co.uk>
+
+ * targets: Added -finit-priority to PowerPC CXX flags.
+
+Mon Aug 31 11:21:10 1998 Jesper Skov <jskov@lassi.cygnus.co.uk>
+
+ * targets: Added -finit-priority to PowerPC CXX flags.
+
+1998-08-27 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl: Fix read_save_file() to report the filename
+ correctly.
+
+1998-08-25 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl: Fix definitions of array variables to work with Tcl
+ 8.1
+
+Mon Aug 24 17:44:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * packages:
+ Change capitalisation of error package alias
+
+1998-08-18 Nick Garnett <nickg@cygnus.co.uk>
+
+ * packages: Added "HAL Common" package.
+
+Mon Aug 17 22:31:58 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * pkgconf/makrules.tst, pkgconf/makrules.prv:
+ Remove all -ltarget and -lgcc as we now specify them in the HAL
+ linker scripts
+
+Thu Aug 13 15:35:16 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * pkgconf/makrules.prv, pkgconf/makrules.tst:
+ Add extra -ltarget as libgcc needs to have symbols resolved from
+ the C library
+
+1998-07-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * packages: Added watchdog device.
+
+Mon Jul 27 19:36:53 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * packages: Added gdb pseudo device.
+
+1998-07-23 Bart Veer <bartv@cygnus.co.uk>
+
+ * pkgconf.tcl: added new argument --pkgdata for internal use only.
+ This results in a program-friendly listing of the available
+ packages.
+
+ * Start of consistent usage of ChangeLog files throughout the
+ project
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/NEWS b/cesar/ecos/packages/NEWS
new file mode 100644
index 0000000000..958a5a2b37
--- /dev/null
+++ b/cesar/ecos/packages/NEWS
@@ -0,0 +1,454 @@
+* Support for the Ethenet device on the NETARM devices.
+* Added support for the AT91 based PhyCore.
+* Added support for Exys XSEngine (PXA255) based system.
+* Port of ezXML parser added.
+* Port to the Keil MCB2100, Olimex P2106 and Olimex LPC-MT by Jani Monoses
+* Generic support for the lpc2xxx, hal, serial and watchdog by Jani Monoses
+* Support for generic IDE disks using PIO, by Iztok Zupet.
+* Support for SPI on the eb55 by Savin Zlobec.
+* Added support for the Atmel JTST board by Andrea Michelotti.
+* Added support for the AIM711 contributed by Roland Cassebohm.
+* Added the lwIP TCP/IP stack.
+* Added PPP network support. Contributed by Nick Garnett of eCosCentric.
+* Added support for network under vmWare using the LANCE chipset. Contributed
+ by Iztok Zupet.
+* Added support for FAT12/16 filesystems. Contributed by
+ Savin Zlobec of Elatec Engineering.
+* Support for Spanning Tree Protocol in the old OpenBSD stack
+* Add support for GPS-4020 (embedded ARM7 GPS receiver/controller)
+* Basic IPSEC and libipsec support.
+* Flash driver for SST 39VFXXX devices
+* Wall clock driver for Synthetic target.
+* New port to TAMS MOAB (PowerPC 405GPr) development board
+* FLASH layer can now support NAND devices
+* RedBoot 'fconfig' data can now be stored in either FLASH or EEPROM
+* VNC server (remote access graphic system), contributed by
+ Chris Garry <cgarry@sweeneydesign.co.uk>
+* New port to Analogue & Micro Rattler (Motorola MPC8250)
+* Improved support for ethernet PHY devices.
+* Improved variant support for Motorola Power-QUICC2 systems.
+* Vastly improved networking speeds in RedBoot stack.
+* New port for Motorola PrPMC1100 (Intel XScale IXC1100)
+* SNTP client supports IPv6 multicast packets from time servers.
+* DNS client support looking up IPv6 addresses and reverse lookups
+* FTP client is IPv6 aware.
+* httpd daemon is IPv6 aware.
+* TFTP client and TFTP server now work with both IPv4 and IPv6.
+* New port for Analogue & Micro Adder-II (PPC 852T) boards
+* New ports for Intel XScale IXP425 boards (IXDP425 and Generic Residential
+ Gateway).
+* Simple Network Time Protocol (SNTP) client contributed by Andrew Lunn.
+* Added port for NMI uE250 (ARM Xscale PXA250) platform, contributed
+ by Mind, NV.
+
+*********** eCos 2.0 release ************
+
+* SNMP code now works with the FreeBSD stack
+* Port added for IDT MIPS IDT79RC32334 reference platform, including Flash,
+ ethernet, and serial drivers as well as RedBoot support. Contributed by
+ Tim Michals working for IDT.
+* Port added for Texas Instruments ARM9 OMAP Innovator board. Contributed by
+ Patrick Doyle of Delphi Communication Systems.
+* Add XScale PXA2x0 support, with Microplex Printer control 5.0 (mpc50)
+ target incorporating flash support.
+* Add support for Cogent CSB281 - PowerPC 8245 board.
+* Add support for PowerPC 8260 based systems - one from Motorola (VADS)
+ and another from Delphi Communications. Contributed by Delphi.
+* Add support for Analogue & Micro Adder (PowerPC 850) boards
+* Update MN10300 ASB2303 HAL to support RedBoot
+* New package for application level profiling (histogram only)
+* Support for NPWR Linux Engine (Xscale IOP310) from Team ASA
+* Support for Allied Telesyn TS1000 (PowerPC 855T based design)
+* Yoshinori Sato has contributed a watchdog driver for the Hitachi H8/300H.
+* Add AT91 watchdog driver. Contributed by Thomas Koeller of Basler Vision
+ Technologies.
+* SMP support added for x86.
+* Ported new networking stack from FreeBSD to eCos. Includes IPv6 support.
+* Added generic power management support, plus platform support for the iPAQ.
+* Ported Microwindows windowing graphics system. This port is still alpha.
+* Added hooks in common ethernet driver for lwIP lightweight IP stack.
+* Added RedBoot only ports to Samsung Calmrisc16 and Calmrisc32 architectures.
+ Includes board ports to Calm16 Core and Calm32 Core eval boards.
+* Added Samsung ARM KS32c5000 SNDS100 eval board port including RedBoot and
+ ethernet support. Contributed by Grant Edwards of Comtrol.
+* eCos+RedBoot port to the Altera ARM9 Excalibur board. Includes FLASH driver.
+* eCos+RedBoot port to Hitachi SH3-based HS7729PCI board, with SH 7729 CPU.
+ Includes FLASH, ethernet, watchdog and wallclock drivers. The ethernet
+ driver includes generic support for the VIA Rhine chipset.
+* eCos+RedBoot port to Hitachi SH3-based Solution Engine SE77x9 board.
+ Includes FLASH, ethernet, serial and watchdog drivers.
+* eCos+RedBoot port to Hitachi SH4-based Solution Engine SE7751 board.
+ Includes FLASH, ethernet, serial and watchdog drivers.
+* Support for the SH2 core, and SH2 on-chip etherc added.
+* Port to Matsushita AM33-2 based ASB2305 board added, including serial,
+ ethernet and FLASH support.
+* Ethernet, serial and USB drivers for NEC MIPS uPD985xx chip family added.
+* RedBoot-only port to MIPS Malta evaluation board (Mips32 4Kc and Mips64 5Kc
+ cores) added, including FLASH and ethernet support.
+* Port to NEC MIPS VRC4375-based 'Blue Nile' evaluation board. Includes
+ FLASH, serial and ethernet drivers (the latter being new support for the
+ i21143 chipset).
+* Ethernet driver for Intel i82544 Gigabit ethernet added.
+* Support for Samsung ARM KS32C5000 on-core ethernet broken out into "generic"
+ driver.
+* New architectural port to Fujitsu FR-V added. Initial board port to FR-V 400
+ development board, including RedBoot support and ethernet and FLASH drivers.
+ Currently pre-alpha quality only.
+* Support added to port remote file operations using the remote protocol for
+ newlib applications run under RedBoot.
+* eCos+RedBoot port to Intel XScale IQ80321 port added, including FLASH,
+ ethernet, and serial drivers.
+* ARM Integrator port rewritten. Now includes ARM9 support.
+* RedBoot+eCos port to the Agilent ARM9-based AAED2000 evaluation board.
+ Includes FLASH, ethernet, keyboard and touchscreen drivers.
+* eCos relicensed to be under a GPL+exception licence, instead of the RHEPL.
+* All eCos documentation now available in DocBook format, licensed under the
+ OPL.
+* CYGPKG_IO_ETH_DRIVERS now puts its headers in install/include/cyg/io/eth
+* All platforms are now expected to be using Virtual Vectors. The
+ option CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT_NOT_GUARANTEED has been
+ removed so recently built applications will fail to run on
+ boards that have old-style GDB stubs without VV support.
+* Added ELF and wider decompression support to RedBoot.
+* Added support for SuperH SH2 CPUs
+* Added port for Motorola MCF5272c3 ColdFire evaulation board from
+ Wade Jensen <Wade_Jensen@inter-tel.com>.
+* Added ports to Wuerz Elektronik and Axiom Manufacturing MPC555 based eval
+ boards. Contributed by Bob Koninckx <bob.koninckx@mech.kuleuven.ac.be>
+ from Katholieke Universiteit Leuven. Includes FLASH, serial and wallclock
+ drivers.
+* Added H8/300 port contributed by Yoshinori Sato <qzb04471@nifty.ne.jp>
+ Initially for Akizuki H8/3068 board with ethernet and serial driver support,
+ and H8/300H simulator.
+* Added RedBoot support for remote file I/O operations using the GDB remote
+ protocol.
+* Added SPARC_LEON port contributed by Jiri Gaisler <jiri@gaisler.com> -
+ see <http://www.gaisler.com> for information about the TSIM simulator
+ and Leon project per se.
+* Added port to CerfCube and CerfPDA, contributed by the manufacturer,
+ Intrinsyc. Includes ethernet drivers.
+* Added alpha of JFFS2 journalling flash file system v2 support.
+* Add synthetic target synthetic flash driver, contributed by Andrew Lunn.
+* CqREEK SH7750 FLASH driver added, contributed by Koichi Nagashima
+* EDB7xxx ethernet driver rewritten to be a generic Cirrus Logic CS8900A
+ package.
+* Incorporated FTP client code (library and test) from Andrew Lunn.
+* Incorporated ARM Development board aka INTEGRATOR port from Philippe Robin
+ at ARM. Includes FLASH, ethernet and serial drivers, along with RedBoot
+ support.
+* Added ARM E7T (AEB-2) serial device drivers contributed by
+ Lars Lindqvist at Combitech <Lars.Lindqvist@combitechsystems.com>
+* Flash driver added for the SH EDK7708 platform.
+* Added rudimentary ELF loader, including support for dynamic objects under
+ services/loader.
+* DNS lookup support added. Contributed by Andrew Lunn <andrew.lunn@ascom.ch>
+* Cogent [Cirrus Logic] EDB7312 platform added.
+* Dallas wallclock driver implemented for x86 PC.
+* AMD PCNet ethernet driver added.
+* Generic SMP support added.
+* RedBoot support added to AM33-STB port.
+* Add Atmel AT91/EB40 port, including flash and serial drivers.
+* Added HAL port to SEGA Dreamcast.
+ Contributed by Takeshi Yaegashi <t@keshi.org>
+* Added port to Bright Star Engineering SA11x0 based Flexanet handheld board,
+ including flash and ethernet support.
+ Contributed by Jordi Colomer <jco@ict.es>
+* Added support for loading files from disk. Currently supports IDE drives
+ with Linux EXT2 filesystems.
+* Added wallclock driver for DS12887
+* AM33 STB flash driver added.
+* C library now supports multiple locales with multibyte character set support,
+ and the possibility of plugging in more. Current locales supported
+ are now C, C-SJIS, C-EUCJP and C-JIS.
+* Major reorganization of x86 HAL. Support for RedBoot and PCI added, based on
+ Fabrice Gautier's patches. i82559 ethernet driver added (Intel Etherexpress).
+ Synthetic HAL redesigned and moved to separate hal/synth hierarchy.
+* Added ethernet drivers for SMSC lan91cxx
+* Added driver for Motorola PowerPC 8xxT "Fast Ethernet Controller".
+* Added support for Analogue & Micro "viper" - PowerPC 860T based
+ board. Currently this is only alpha since full test farm testing
+ has not yet been started. Includes RedBoot, Flash and FEC ethernet.
+* RedBoot and eCos ported to Bright Star Engineering nanoEngine
+ StrongARM SA1110 board, including Flash, watchdog, serial, ethernet
+ drivers and PCI support.
+* Added support for ARM Evaluator7T (e7t) board.
+* Ported to Compaq StrongARM SA1110 PocketPC (iPAQ), including keypad,
+ touch screen, watchdog, FLASH, PCMCIA and Compact Flash drivers.
+ Also includes RedBoot, with support for booting ARM Linux.
+ Derived from an initial port by Richard Panton of 3G Lab.
+ http://www.3glab.org/
+* Added flash verification checksums to RedBoot.
+* Added watchdog driver for Intel SA11x0 StrongARM.
+* Added generic Intel FlashFile 28Fxxx flash driver.
+* Added generic Intel StrataFLASH driver.
+* Support flash and ROMRAM startup for V850 HAL and Cosmo CEB board; also
+ adding support for the NEC V850/SB1 CPU variant. Also support for
+ thread debugging via ICE and gdbserv.
+* Added support for MIPS32/64 MIPS variants and Atlas platform, using both
+ the MIPS32 4Kc and MIPS64 5Kc processor modules. Includes PCI, serial,
+ ethernet and flash drivers. This is a RedBoot-only port at this time, not
+ full eCos.
+* Added simple ROM based file system support, contributed by
+ Richard Panton of 3G Lab.
+* Added support for MIPS PMC-Sierra RM7000 variant and Ocelot board, including
+ PCI, ethernet and FLASH support.
+* Added gzip/zlib decompression support to RedBoot.
+* Added zlib decompression library.
+* GDB stubs no longer reboot the board in response to a 'k' packet. Instead
+ from within GDB a "maintenance packet r" must be sent, followed by a
+ "detach". Then you can reconnect to the board.a
+* Added generic AMD AM29xxxxx flash driver based on MBX driver, and make
+ the MBX use it.
+* Added RedBoot support to PID target.
+* Added Atmel AT29C040 flash driver.
+* Added Intel XScale support with the IQ80310 Software Development and
+ Processor Evaluation Kit. Support includes flash and ethernet drivers,
+ and RedBoot support.
+* Added support for USB slave devices. This includes generic USB slave
+ support, a device driver for the SA11x0 on-chip USB device, and an
+ additional support package for developing USB-ethernet and similar
+ peripherals.
+* Added POSIX cancellation points for the sigwait family of functions,
+ pthread_join, pthread_cond_wait, pthread_cond_timedwait, sleep and
+ nanosleep
+* Virtual vectors initialization can now be configured with a finer
+ granularity. Diagnostic output should also appear on the same channel
+ (possibly ethernet) as the application was launched from.
+* Added cyg_pci_find_matching() to PCI library API to allow more generalized
+ matching on device properties.
+* ARM EBSA285 now configured to use virtual vectors all the time. Users with
+ old GDB stub ROM images should upgrade to newer GDB stub ROM images, or
+ better still to RedBoot.
+* Stack usage measurement has been added, with the functions
+ pthread_measure_stack_usage() in the POSIX thread API and
+ cyg_thread_measure_stack_usage() in the kernel C API.
+* Thread stack checking support added. See CYGFUN_KERNEL_THREADS_STACK_CHECKING
+ in the kernel CDL for information.
+* Add syscall support to RedBoot for compatibility with newlib-based BSPs
+* Bridge support added to the PCI library. Use cyg_pci_configure_bus() to
+ configure all busses.
+* Added a port to the Toshiba MIPS TX49 chip, with the REF4955 reference
+ platform. This includes serial device driver and wallclock device driver
+ support.
+* PowerPC 40x variant support added.
+* Added SH4 support. Split SH architecture HAL into variants in the process.
+* Added SH4/CQ7750 platform support [still untested]
+* Port to Intel SA1100 Multimedia evalulation board added, including serial
+ device driver, FLASH driver and RedBoot support
+* FLASH driver added for PowerPC/MBX
+* sigsetjmp() and siglongjmp() added
+* A choice of getcwd() implementations have been added
+* SH serial driver cleanup. SCIF driver added. SCI and SCIF drivers are
+ now separate packages. SCIF driver uses full FIFO and can utilize
+ DMA for transmit operations.
+* Move logical ethernet "driver" into io/eth where the interface can be shared
+ between multiple implementations, e.g. BSD TCP/IP and Red Boot's TCP/IP
+ stacks.
+* RedBoot - the Red Hat Bootstrap ROM monitor has been added, initially
+ supporting ARM-EDB7xxx, ARM-EBSA285, and ARM-Assabet boards. Provides
+ serial and ethernet GDB debugging support, flash image management and flash
+ booting, BOOTP/DHCP and TFTP boot support and a CLI interface.
+* Added PCMCIA and Compact Flash support, including drivers for the ARM-Assabet
+ board.
+* Added generic FLASH memory support
+* Added flash memory support for ARM-EBSA285 and ARM-EDB7xxx boards
+* Added Compact Flash Ethernet driver
+* Hitachi SH7707a variant support added.
+* Support added for both software and hardware flow control with an initial
+ version of the latter available only for the ARM PID board at present.
+* Loopback serial device driver added
+* POSIX termios support added for EL/IX level 1 compatibility
+* Improved dynamic memory management support in the memory allocator
+ package. Existing dynamic memory support in the kernel (fixed and variable
+ block allocators) and in libc (malloc, etc.) has been moved to this
+ package, located at services/memalloc/common. It is now possible to support
+ memory pools occupying all of remaining memory (as determined by the MLT).
+ New memory allocators can be "plugged in", and an example of Doug Lea's
+ malloc (dlmalloc) has been included.
+* Plug-in filesystem support added, with a POSIX 1003.1 compatible API, found
+ in the io/fileio package, and integrated with the C library.
+* An initial example filesystem implementation is provided in fs/ram. This
+ is a RAM filesystem that attempts to both be a useful tool in its own
+ right and an example of how to write a filesystem that plugs into the
+ fileio infrastructure.
+ The source of the filesystem is in fs/ram/VERSION/src/ramfs.c and is
+ intended to be largely self documenting. The General Description at
+ the beginning of the file gives an overview of the structure of the
+ system, and comments within the code explain specific points. This
+ code should be read in conjunction with the description of the fileio
+ infrastructure.
+* Support added for POSIX 1003.1 threads, mutexes, semaphores, message queues,
+ condition variables, clocks, timers and real-time signals in the POSIX
+ compatibility package (part of the EL/IX compatibility initiative) found at
+ compat/posix.
+* Kernel enhanced with Asynchronous Service Routines (ASRs) which are routines
+ called back at the point a thread is scheduled.
+* Added (configurably) priority ceilings for kernel mutexes
+* Support sorted thread queues in kernel, rather than LIFO, controlled by the
+ CYGIMP_KERNEL_SCHED_SORTED_QUEUES option.
+* The Kernel C API functions cyg_semaphore_wait() and cyg_cond_wait() now
+ return booleans to indicate if the wait failed.
+* Added enhanced form of kernel message queue which is more flexible at runtime
+ than mboxes - available in <cyg/kernel/mqueue.hxx>
+* Add a generic interface in <cyg/hal/hal_tables.h> to allow tables of
+ data, particularly initialization data, to be included in an application
+ image. This replaces the previous __DEVTAB__ and __NETDEVTAB__ references
+ in linker scripts.
+* Most standard top-level header files now controlled by the "isoinfra"
+ package
+* C library package split into separate packages on functional boundaries:
+ i18n, setjmp, signals, startup, stdio, stdlib, time
+* Most targets now implement a standard form of "virtual vectors" - a
+ mechanism to allow enhanced co-operation between ROM monitors and running
+ applications. This allows the application to leave to the ROM things that
+ the ROM supports rather than duplicating, including debug channels that may
+ be via serial or ethernet. To take advantage of this, new GDB stub
+ images/CygMon images should be programmed onto boards, although old images
+ will continue to work - they will just not be able to use the new facilities.
+* DHCP support has been added to the TCP/IP support, in addition to the
+ existing BOOTP support
+* CDL now supports type bool and booldata for interfaces
+* CDL now exports extra macros in header files, to indicate package version
+ numbers
+* A port of the University of California at Davis (UCD) SNMP stack has been
+ added
+* Hitachi SH7709A variant support added
+* NEC V85x architecture support added
+* NEC Cosmo CEB-V850/SA1 evaluation board platform HAL added
+* Serial device drivers added for systems based on NEC V850 SA1 (70F3017)
+ or SB1 (70F3033) processors
+* Hitachi SH3 CqREEK (cq7708) platform HAL support added
+ Contributed by Haruki Kashiwaya
+* Watchdog reworked much like wallclock.
+ Common code and API in io/watchdog, simpler (smaller) low-level drivers in
+ devs/watchdog/<arch>.
+* IO serial driver
+ The common serial driver has been extended with a configurable option for
+ a non-blocking read/write mode. It has also been given some new callbacks
+ which allow low-level drivers to transfer data in blocks instead of as
+ single characters.
+* SH HAL
+ Now provides ROMRAM startup type, copying code and data to RAM before
+ executing, improving performance at cost of memory.
+* IO serial drivers reworked by separating into distinct platform
+ packages, making it simpler to implement new drivers.
+* WallClock reworked, making it simpler to implement new drivers.
+ New drivers
+ o SH3 RTC module
+
+-------- eCos 1.3.1 public net release:
+
+* New architectures and variants
+ o ARM Thumb
+ o ARM9
+ o Hitachi SH3
+ o Cirrus Logic CL-PS7111, EP72xx
+ o Intel StrongARM
+ o Matsushita AM33
+ o NEC MIPS VR4300
+
+* New platforms
+ o ARM AEB-1 rev C
+ o ARM PID support extended: ARM9, Thumb and big-endian
+ o Cirrus Logic EDB7xxx
+ o Cogent CMA222 and CMA230 ARM boards. (CMA222 contributed by Mark Salter)
+ o Hitachi EDK7708
+ o Intel x86 PC (base port contributed by Patrick O'Grady)
+ o Intel EBSA285
+ o Matsushita STB
+ o Motorola MBX evaluation board
+ o NEC VRC4373
+
+* New hosts
+ o Windows 2000 host support (beta)
+ o Red Hat Linux 6.x (should work on other distributions, but only
+ Red Hat Linux 6.x has been used for testing).
+
+* Configuration system revised
+ o Tools based on GPL'd configuration library (only tested on
+ Windows and Red Hat Linux 6.x)
+ o Tools available for both Windows (graphical) and Linux (CLI).
+ o Target side configuration much more flexible now, even though
+ existing configuration data has not yet been changed to take full
+ advantage of the new features.
+
+* TCP/IP stack and drivers [distributed in separate package]
+ o OpenBSD based, supporting UDP, TCP and ICMP.
+ o Motorola MBX (quicc) driver.
+ o Cirrus Logic EDB7xxx driver.
+
+* PCI bus library
+ o Simple API for configuring PCI resources.
+ o Intel EBSA285 HAL implementation.
+ o NEC VRC4373 HAL implementation.
+
+* New watchdog drivers
+ o ARM AEB-1
+ o Hitachi EDK7708
+ o Intel EBSA285
+
+* Debugging
+ o Stack monitoring
+ The file <cyg/kernel/test/stackmon.h> defines some functions
+ that can be used to profile stack usage.
+
+* API changes
+ o KAPI
+ include/kapi.h (cyg_thread_delete): is now a boolean function to
+ indicate success. Failure is when the thread needs to run in
+ order to become killed.
+
+* HAL changes
+ o i386/linux
+ The eCos idle loop will not load the host system anymore (except
+ in special configurations, see linux_misc.c).
+ o MIPS
+ Split into arch/variant/platform hierarchy.
+ o MN10300
+ Split into arch/variant/platform hierarchy.
+ o PowerPC
+ Split into arch/variant/platform hierarchy.
+ Major revamp of exception handling - _not_ backwards compatible
+ (see vectors.S for the reasoning behind the change).
+ o SPARClite
+ Where supported by the targetted platform, it is now possible to
+ use Multiple Vector Trapping (MVT).
+ o ARM
+ The ARM Multi-ICE JTAG debugging interface is now supported on the
+ relevant platforms. eCos has also been extended to provide thread
+ debugging when debugging via Multi-ICE.
+
+* CygMon
+ o Integration of CygMon ROM monitor into eCos by porting it on top
+ of the eCos HAL
+
+--------- eCos 1.2.1 public net release:
+
+* Architectures and variants
+ o ARM7TDMI
+ o Fujitsu SPARClite
+ o Intel x86 [incomplete, unsupported]
+ o Matsushita MN10300
+ o Motorola PowerPC
+ o Sharp LH77790 (ARM7DI core)
+ o Toshiba TX39 (MIPS R3900 derivative)
+
+* Platforms
+ o ARM PID7T board
+ o ARM AEB-1 board (rev B)
+ o Cogent CMA287-23 (MPC823), CMA287-50 (MPC850), CMA286-60 (MPC860)
+ o Fujitsu MB8683x boards
+ o Linux/x86 Synthetic Target
+ o Matsushita standard evaluation board
+ o Matsushita standard evaluation board simulator
+ o Motorola FADS board [unsupported] (contributed by Kevin Hester)
+ o PSIM - PowerPC architectural simulator
+ o Toshiba JMR3904 evaluation board
+ o Toshiba JMR3904 evaluation board simulator
+ o SIS - SPARClite simulator [unsupported]
+
+* Hosts
+ o Redhat Linux 4.2 and later
+ o Solaris 2.5.1 and later
+ o Windows NT 4.0SP3 and later
+ o Windows 95/98 (Beta)
diff --git a/cesar/ecos/packages/compat/linux/current/ChangeLog b/cesar/ecos/packages/compat/linux/current/ChangeLog
new file mode 100644
index 0000000000..a7463da844
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/ChangeLog
@@ -0,0 +1,95 @@
+2005-03-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/linux/kernel.h (PTR_ERR): Should be an unsigned long,
+ not an intager, at least that is what Linux uses.
+
+2005-01-22 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/linux/spinlock.h (DEFINE_SPINLOCK): Added.
+ * include/linux/slab.h (vfree): Added vmalloc and vfree which map
+ to malloc and free.
+ * include/linux/rwsem.h: New file. eCos does not have read/write
+ semaphores so these are mapped to normal semaphores.
+
+2004-08-12 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/linux/spinlock.h: Add CYG_UNUSED_PARAM() calls to avoid
+ compiler warnings.
+
+2004-08-04 Gary Thomas <gary@mlbassoc.com>
+
+ * include/linux/list.h (list_for_each_entry): New macro needed for
+ latest jffs2 code.
+
+2003-11-12 Thomas Koeller <thomas.koeller@baslerweb.com>
+
+ * cdl/linux.cdl:
+ * include/asm/page.h:
+ Make page size configurable via cdl.
+
+2003-10-18 Gary Thomas <gary@mlbassoc.com>
+
+ * src/rbtree.c (rb_erase): Fix bug in red-black tree which caused
+ node corruption - merge from external sources, found by Scott
+ Wilkerson.
+
+2003-10-18 Savin Zlobec <savin@elatec.si>
+
+ * include/linux/rbtree.h:
+ Fixed 'pointer of type `void *' used in subtraction' compiler warrning.
+
+2003-07-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/linux/init.h:
+ * include/linux/vmalloc.h: New dummy files so that jffs2 will
+ compile.
+
+2003-07-27 Michael Checky <Michael_Checky@ThermoKing.com>
+ Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/linux/kernel.h: Changed the #define IS_ERR to work correctly
+ negative error values returned by the jffs2 code.
+
+2003-06-10 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/linux/stat.h: Removed #defines which has been added to
+ the main eCos sys/stat.h.
+
+2003-01-21 David Woodhouse <dwmw2@infradead.org>
+
+ * New package.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003 Red Hat.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/compat/linux/current/cdl/linux.cdl b/cesar/ecos/packages/compat/linux/current/cdl/linux.cdl
new file mode 100644
index 0000000000..d9b93aa7f7
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/cdl/linux.cdl
@@ -0,0 +1,76 @@
+# ====================================================================
+#
+# linux.cdl
+#
+# Linux compatibility layer data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): dwmw2
+# Contributors: tkoeller
+# Date: 2003-01-08
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_LINUX_COMPAT {
+ display "Linux compatibility layer"
+ include_dir ""
+ description "
+ eCos supports a basic Linux compatibility Layer providing various
+ functions, equivalents or stubs expected by Linux kernel code, for
+ assistance in porting drivers and file system code from Linux.
+ Note this does not provide Linux compatibility to applications."
+
+ compile rbtree.c
+
+ cdl_option CYGNUM_LINUX_COMPAT_PAGE_SIZE_EXPONENT {
+ display "Define page size"
+ flavor data
+ legal_values 10 to 16
+ default_value 12
+ no_define
+ define PAGE_SHIFT
+ description "
+ Define the page size. The value entered here is used as an
+ exponent X in the expression 2^^X to ensure that the page
+ size is always an integer power of two."
+ }
+}
+
+# EOF linux.cdl
diff --git a/cesar/ecos/packages/compat/linux/current/include/asm/atomic.h b/cesar/ecos/packages/compat/linux/current/include/asm/atomic.h
new file mode 100644
index 0000000000..5cb72ff8ce
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/asm/atomic.h
@@ -0,0 +1,10 @@
+#ifndef __ASM_ATOMIC_H__
+#define __ASM_ATOMIC_H__
+
+#define atomic_t int
+#define atomic_inc(atom) (*atom)++
+#define atomic_dec(atom) (*atom)--
+#define atomic_read(atom) (*atom)
+
+
+#endif /* __ASM_ATOMIC_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/asm/bug.h b/cesar/ecos/packages/compat/linux/current/include/asm/bug.h
new file mode 100644
index 0000000000..060eb27830
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/asm/bug.h
@@ -0,0 +1,6 @@
+#ifndef __ASM_BUG_H__
+#define __ASM_BUG_H__
+
+#define BUG() do { diag_printf("BUG() at %s %d\n", __FILE__, __LINE__); *(int *)0=0; } while (0)
+
+#endif /* __ASM_BUG_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/asm/page.h b/cesar/ecos/packages/compat/linux/current/include/asm/page.h
new file mode 100644
index 0000000000..d77a39ac43
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/asm/page.h
@@ -0,0 +1,11 @@
+#ifndef __ASM_PAGE_H__
+#define __ASM_PAGE_H__
+
+#include <pkgconf/linux_compat.h>
+
+/* These aren't used by much yet. If that changes, you might want
+ to make them actually correct :) */
+#define PAGE_SIZE (0x1 << PAGE_SHIFT)
+
+
+#endif /* __ASM_PAGE_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/asm/semaphore.h b/cesar/ecos/packages/compat/linux/current/include/asm/semaphore.h
new file mode 100644
index 0000000000..e816155489
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/asm/semaphore.h
@@ -0,0 +1,20 @@
+#ifndef __ASM_SEMAPHORE_H__
+#define __ASM_SEMAPHORE_H__
+
+#include <cyg/hal/drv_api.h>
+
+struct semaphore {
+ cyg_drv_mutex_t x;
+};
+
+#define DECLARE_MUTEX(x) struct semaphore x = { { 0 } };
+#define DECLARE_MUTEX_LOCKED(x) struct semaphore x = { { 1 } };
+
+#define init_MUTEX(sem) cyg_drv_mutex_init((cyg_drv_mutex_t *)sem)
+#define init_MUTEX_LOCKED(sem) do { cyg_drv_mutex_init((cyg_drv_mutex_t *)sem); cyg_drv_mutex_lock((cyg_drv_mutex_t *)sem); } while(0)
+#define down(sem) cyg_drv_mutex_lock((cyg_drv_mutex_t *)sem)
+#define down_interruptible(sem) ({ cyg_drv_mutex_lock((cyg_drv_mutex_t *)sem), 0; })
+#define down_trylock(sem) cyg_drv_mutex_trylock((cyg_drv_mutex_t *)sem)
+#define up(sem) cyg_drv_mutex_unlock((cyg_drv_mutex_t *)sem)
+
+#endif /* __ASM_SEMAPHORE_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/TODO b/cesar/ecos/packages/compat/linux/current/include/linux/TODO
new file mode 100644
index 0000000000..df8a6d1a51
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/TODO
@@ -0,0 +1,11 @@
+
+This contains a very limited set of Linux-compatibility headers, initially
+just for getting JFFS2 to build.
+
+Some things are simply stubs which don't _work_, to allow the JFFS2 code
+to compile. Note that you may need to implement these _properly_ in order
+to use these for making other Linux code work, or indeed for making the
+JFFS2 NAND support work.
+
+The non-working parts include, but are not limited to:
+ workqueue.h, wait.h, timer.h, spinlock.h, sched.h, compiler.h
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/compiler.h b/cesar/ecos/packages/compat/linux/current/include/linux/compiler.h
new file mode 100644
index 0000000000..fb253651a3
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/compiler.h
@@ -0,0 +1,7 @@
+#ifndef __LINUX_COMPILER_H__
+#define __LINUX_COMPILER_H__
+
+#define likely(x) (x)
+#define unlikely(x) (x)
+
+#endif /* __LINUX_COMPILER_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/completion.h b/cesar/ecos/packages/compat/linux/current/include/linux/completion.h
new file mode 100644
index 0000000000..f131af83f8
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/completion.h
@@ -0,0 +1,7 @@
+#ifndef __LINUX_COMPLETION_H__
+#define __LINUX_COMPLETION_H__
+
+struct completion { } ;
+
+#endif /* __LINUX_COMPLETION_H__ */
+
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/config.h b/cesar/ecos/packages/compat/linux/current/include/linux/config.h
new file mode 100644
index 0000000000..986e10b49b
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/config.h
@@ -0,0 +1,5 @@
+#ifndef __LINUX_CONFIG_H__
+#define __LINUX_CONFIG_H__
+
+
+#endif /* __LINUX_CONFIG_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/crc32.h b/cesar/ecos/packages/compat/linux/current/include/linux/crc32.h
new file mode 100644
index 0000000000..8d19a1eb62
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/crc32.h
@@ -0,0 +1,8 @@
+#ifndef CRC32_H
+#define CRC32_H
+
+#include <cyg/crc/crc.h>
+
+#define crc32(val, s, len) cyg_crc32_accumulate(val, (unsigned char *)s, len)
+
+#endif
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/errno.h b/cesar/ecos/packages/compat/linux/current/include/linux/errno.h
new file mode 100644
index 0000000000..339f4fc10c
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/errno.h
@@ -0,0 +1 @@
+#include <errno.h>
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/fs.h b/cesar/ecos/packages/compat/linux/current/include/linux/fs.h
new file mode 100644
index 0000000000..c2f173ac81
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/fs.h
@@ -0,0 +1,13 @@
+#ifndef __LINUX_FS_H__
+#define __LINUX_FS_H__
+
+#include <linux/stat.h>
+/*
+ * File types
+ */
+#define DT_UNKNOWN 0
+#define DT_DIR 4
+#define DT_REG 8
+
+
+#endif /* __LINUX_FS_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/init.h b/cesar/ecos/packages/compat/linux/current/include/linux/init.h
new file mode 100644
index 0000000000..e4c702f996
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/init.h
@@ -0,0 +1,3 @@
+#ifndef __LINUX_INIT_H__
+#define __LINUX_INIT_H__
+#endif
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/kernel.h b/cesar/ecos/packages/compat/linux/current/include/linux/kernel.h
new file mode 100644
index 0000000000..3eb52d0a9e
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/kernel.h
@@ -0,0 +1,32 @@
+#ifndef __LINUX_KERNEL_H__
+#define __LINUX_KERNEL_H__
+#include <cyg/infra/diag.h>
+
+#define jiffies 100
+
+#define ERR_PTR(err) ((void*)(err))
+#define PTR_ERR(err) ((unsigned long)(err))
+#define IS_ERR(err) ((unsigned long)err > (unsigned long)-1000L)
+
+#define CURRENT_TIME cyg_timestamp()
+
+#define KERN_EMERG "<0>" // system is unusable
+#define KERN_ALERT "<1>" // action must be taken immediately
+#define KERN_CRIT "<2>" // critical conditions
+#define KERN_ERR "<3>" // error conditions
+#define KERN_WARNING "<4>" // warning conditions
+#define KERN_NOTICE "<5>" // normal but significant condition
+#define KERN_INFO "<6>" // informational
+#define KERN_DEBUG "<7>" // debug-level messages
+#define printk diag_printf
+
+#define min(x,y) (x<y?x:y)
+#define max(x,y) (x<y?y:x)
+#define min_t(t, x,y) ((t)x<(t)y?(t)x:(t)y)
+
+
+#endif /* __LINUX_KERNEL_H__ */
+
+
+
+
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/list.h b/cesar/ecos/packages/compat/linux/current/include/linux/list.h
new file mode 100644
index 0000000000..a6b3f468d1
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/list.h
@@ -0,0 +1,141 @@
+/*
+ * JFFS2 -- Journalling Flash File System, Version 2.
+ *
+ * Copyright (C) 2002 Red Hat, Inc.
+ *
+ * Created by Jonathan Larmour <jlarmour@redhat.com>
+ *
+ *===========================================================================
+ *####ECOSGPLCOPYRIGHTBEGIN####
+ * -------------------------------------------
+ * This file is part of eCos, the Embedded Configurable Operating System.
+ * Copyright (C) 2003 Red Hat.
+ *
+ * eCos is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 or (at your option) any later version.
+ *
+ * eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with eCos; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ *
+ * As a special exception, if other files instantiate templates or use macros
+ * or inline functions from this file, or you compile this file and link it
+ * with other works to produce a work based on this file, this file does not
+ * by itself cause the resulting work to be covered by the GNU General Public
+ * License. However the source code for this file must still be made available
+ * in accordance with section (3) of the GNU General Public License.
+ *
+ * This exception does not invalidate any other reasons why a work based on
+ * this file might be covered by the GNU General Public License.
+ *
+ * Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+ * at http://sources.redhat.com/ecos/ecos-license/
+ * -------------------------------------------
+ *####ECOSGPLCOPYRIGHTEND####
+ *===========================================================================
+ *
+ */
+
+#ifndef CYGONCE_FS_JFFS2_LIST_H
+#define CYGONCE_FS_JFFS2_LIST_H
+
+
+/* -----------------------------------------------------------------------*/
+
+/* Doubly linked list implementation to replace the GPL'd one used in
+ the Linux kernel. */
+
+#include <stddef.h>
+#include <cyg/infra/cyg_type.h>
+
+/* TYPES */
+
+struct list_head {
+ struct list_head *next;
+ struct list_head *prev;
+};
+
+/* MACROS */
+
+#define LIST_HEAD_INIT(name) { &(name), &(name) }
+
+#define LIST_HEAD(name) \
+ struct list_head name = LIST_HEAD_INIT(name)
+
+#define INIT_LIST_HEAD( _list_ ) \
+CYG_MACRO_START \
+(_list_)->next = (_list_)->prev = (_list_); \
+CYG_MACRO_END
+
+/* FUNCTIONS */
+
+/* Insert an entry _after_ the specified entry */
+static __inline__ void
+list_add( struct list_head *newent, struct list_head *afterthisent )
+{
+ struct list_head *next = afterthisent->next;
+ newent->next = next;
+ newent->prev = afterthisent;
+ afterthisent->next = newent;
+ next->prev = newent;
+} /* list_add() */
+
+/* Insert an entry _before_ the specified entry */
+static __inline__ void
+list_add_tail( struct list_head *newent, struct list_head *beforethisent )
+{
+ struct list_head *prev = beforethisent->prev;
+ newent->prev = prev;
+ newent->next = beforethisent;
+ beforethisent->prev = newent;
+ prev->next = newent;
+} /* list_add_tail() */
+
+/* Delete the specified entry */
+static __inline__ void
+list_del( struct list_head *ent )
+{
+ ent->prev->next = ent->next;
+ ent->next->prev = ent->prev;
+} /* list_del() */
+
+/* Is this list empty? */
+static __inline__ int
+list_empty( struct list_head *list )
+{
+ return ( list->next == list );
+} /* list_empty() */
+
+/* list_entry - Assuming you have a struct of type _type_ that contains a
+ list which has the name _member_ in that struct type, then given the
+ address of that list in the struct, _list_, this returns the address
+ of the container structure */
+
+#define list_entry( _list_, _type_, _member_ ) \
+ ((_type_ *)((char *)(_list_)-(char *)(offsetof(_type_,_member_))))
+
+/* list_for_each - using _ent_, iterate through list _list_ */
+
+#define list_for_each( _ent_, _list_ ) \
+ for ( (_ent_) = (_list_)->next; \
+ (_ent_) != (_list_); \
+ (_ent_) = (_ent_)->next )
+
+/*
+ * list_for_each_entry - this function can be use to iterate over all
+ * items in a list* _list_ with it's head at _head_ and link _item_
+ */
+#define list_for_each_entry(_list_, _head_, _item_) \
+for ((_list_) = list_entry((_head_)->next, typeof(*_list_), _item_); \
+ &((_list_)->_item_) != (_head_); \
+ (_list_) = list_entry((_list_)->_item_.next, typeof(*_list_), _item_))
+
+/* -----------------------------------------------------------------------*/
+#endif /* #ifndef CYGONCE_FS_JFFS2_LIST_H */
+/* EOF list.h */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/mtd/compatmac.h b/cesar/ecos/packages/compat/linux/current/include/linux/mtd/compatmac.h
new file mode 100644
index 0000000000..cee3749250
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/mtd/compatmac.h
@@ -0,0 +1,5 @@
+#ifndef __LINUX_MTD_COMPATMAC_H__
+#define __LINUX_MTD_COMPATMAC_H__
+
+
+#endif /* __LINUX_MTD_COMPATMAC_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/mtd/mtd.h b/cesar/ecos/packages/compat/linux/current/include/linux/mtd/mtd.h
new file mode 100644
index 0000000000..817d31cf6f
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/mtd/mtd.h
@@ -0,0 +1,5 @@
+#ifndef __LINUX_MTD_MTD_H__
+#define __LINUX_MTD_MTD_H__
+
+
+#endif /* __LINUX_MTD_MTD_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/pagemap.h b/cesar/ecos/packages/compat/linux/current/include/linux/pagemap.h
new file mode 100644
index 0000000000..fccf9c4061
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/pagemap.h
@@ -0,0 +1,19 @@
+#ifndef __LINUX_PAGEMAP_H__
+#define __LINUX_PAGEMAP_H__
+
+#include <asm/bug.h>
+#include <asm/page.h>
+
+#define PAGE_CACHE_SHIFT PAGE_SHIFT
+#define PAGE_CACHE_SIZE PAGE_SIZE
+
+#define PageLocked(pg) 1
+#define Page_Uptodate(pg) 0
+#define UnlockPage(pg)
+#define PAGE_BUG(pg) BUG()
+#define ClearPageUptodate(pg)
+#define SetPageError(pg)
+#define ClearPageError(pg)
+#define SetPageUptodate(pg)
+
+#endif /* __LINUX_PAGEMAP_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/rbtree.h b/cesar/ecos/packages/compat/linux/current/include/linux/rbtree.h
new file mode 100644
index 0000000000..fef5f718d6
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/rbtree.h
@@ -0,0 +1,46 @@
+#ifndef _LINUX_RBTREE_H
+#define _LINUX_RBTREE_H
+
+
+struct rb_node {
+ struct rb_node *rb_left; /* left element */
+ struct rb_node *rb_right; /* right element */
+ struct rb_node *rb_parent; /* parent element */
+ int rb_color; /* node color */
+};
+
+struct rb_root {
+ struct rb_node *rb_node; /* root of the tree */
+};
+#define NULL ((void *)0)
+#define RB_ROOT ((struct rb_root){NULL})
+#define rb_entry(p, container, field) \
+ ((container *) ((char *)p - ((char *)&(((container *)0)->field))))
+
+#define RB_BLACK 0
+#define RB_RED 1
+
+
+extern void rb_insert_color(struct rb_node *, struct rb_root *);
+extern void rb_erase(struct rb_node *, struct rb_root *);
+
+/* Find logical next and previous nodes in a tree */
+extern struct rb_node *rb_next(struct rb_node *);
+extern struct rb_node *rb_prev(struct rb_node *);
+extern struct rb_node *rb_first(struct rb_root *);
+
+/* Fast replacement of a single node without remove/rebalance/add/rebalance */
+extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
+ struct rb_root *root);
+
+static inline void rb_link_node(struct rb_node * node, struct rb_node * parent,
+ struct rb_node ** rb_link)
+{
+ node->rb_parent = parent;
+ node->rb_color = RB_RED;
+ node->rb_left = node->rb_right = NULL;
+
+ *rb_link = node;
+}
+
+#endif /* _LINUX_RBTREE_H */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/rwsem.h b/cesar/ecos/packages/compat/linux/current/include/linux/rwsem.h
new file mode 100644
index 0000000000..d648a150ca
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/rwsem.h
@@ -0,0 +1,20 @@
+#ifndef __LINUX_RWSEM_H__
+#define __LINUX_RWSEM_H__
+
+// eCos does not have the concept of a read/write semaphore. So just
+// map them onto normal semaphores and hope we don't deadlock
+// somewhere.
+
+#include <asm/semaphore.h>
+
+struct rw_semaphore;
+
+#define down_read(sem) cyg_drv_mutex_lock((cyg_drv_mutex_t *)sem)
+#define down_read_trylock(sem) cyg_drv_mutex_trylock((cyg_drv_mutex_t *)sem)
+#define down_write(sem) cyg_drv_mutex_lock((cyg_drv_mutex_t *)sem)
+#define down_write_trylock(sem) cyg_drv_mutex_trylock((cyg_drv_mutex_t *)sem)
+#define up_read(sem) cyg_drv_mutex_unlock((cyg_drv_mutex_t *)sem)
+#define up_write(sem) cyg_drv_mutex_unlock((cyg_drv_mutex_t *)sem)
+#define downgrade_write(sem)
+
+#endif // __LINUX_RWSEM_H__
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/sched.h b/cesar/ecos/packages/compat/linux/current/include/linux/sched.h
new file mode 100644
index 0000000000..14a7359754
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/sched.h
@@ -0,0 +1,7 @@
+#ifndef __LINUX_SCHED_H__
+#define __LINUX_SCHED_H__
+
+#define cond_resched() do { } while(0)
+#define signal_pending(x) (0)
+
+#endif /* __LINUX_SCHED_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/slab.h b/cesar/ecos/packages/compat/linux/current/include/linux/slab.h
new file mode 100644
index 0000000000..fff3949687
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/slab.h
@@ -0,0 +1,14 @@
+#ifndef __LINUX_SLAB_H__
+#define __LINUX_SLAB_H__
+
+#include <stdlib.h>
+
+#include <asm/page.h> /* Don't ask. Linux headers are a mess. */
+
+#define kmalloc(x, y) malloc(x)
+#define kfree(x) free(x)
+#define vmalloc(x) malloc(x)
+#define vfree(x) free(x)
+
+#endif /* __LINUX_SLAB_H__ */
+
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/spinlock.h b/cesar/ecos/packages/compat/linux/current/include/linux/spinlock.h
new file mode 100644
index 0000000000..22eba0ba55
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/spinlock.h
@@ -0,0 +1,34 @@
+#ifndef __LINUX_SPINLOCK_H__
+#define __LINUX_SPINLOCK_H__
+
+
+typedef struct { } spinlock_t;
+#define SPIN_LOCK_UNLOCKED (spinlock_t) { }
+#define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED
+
+#define spin_lock_init(lock) \
+CYG_MACRO_START; \
+CYG_UNUSED_PARAM(spinlock_t *, lock); \
+CYG_MACRO_END
+
+#define spin_lock(lock) \
+CYG_MACRO_START; \
+CYG_UNUSED_PARAM(spinlock_t *, lock); \
+CYG_MACRO_END
+
+#define spin_unlock(lock) \
+CYG_MACRO_START; \
+CYG_UNUSED_PARAM(spinlock_t *, lock); \
+CYG_MACRO_END
+
+#define spin_lock_bh(lock) \
+CYG_MACRO_START; \
+CYG_UNUSED_PARAM(spinlock_t *, lock); \
+CYG_MACRO_END
+
+#define spin_unlock_bh(lock) \
+CYG_MACRO_START; \
+CYG_UNUSED_PARAM(spinlock_t *, lock); \
+CYG_MACRO_END
+
+#endif /* __LINUX_SPINLOCK_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/stat.h b/cesar/ecos/packages/compat/linux/current/include/linux/stat.h
new file mode 100644
index 0000000000..a3efd61876
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/stat.h
@@ -0,0 +1,12 @@
+#ifndef __LINUX_STAT_H__
+#define __LINUX_STAT_H__
+
+
+#include <sys/stat.h>
+
+#define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH)
+#define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH)
+#define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH)
+#define S_IRWXUGO (S_IRWXU|S_IRWXG|S_IRWXO)
+
+#endif /* __LINUX_STAT_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/string.h b/cesar/ecos/packages/compat/linux/current/include/linux/string.h
new file mode 100644
index 0000000000..fc14ba607f
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/string.h
@@ -0,0 +1,6 @@
+#ifndef __LINUX_STRING_H__
+#define __LINUX_STRING_H__
+
+#include <string.h>
+
+#endif /* __LINUX_STRING_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/timer.h b/cesar/ecos/packages/compat/linux/current/include/linux/timer.h
new file mode 100644
index 0000000000..80e9ef509c
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/timer.h
@@ -0,0 +1,10 @@
+#ifndef __LINUX_TIMER_H__
+#define __LINUX_TIMER_H__
+
+/* Not yet */
+
+struct timer_list { } ;
+
+
+#endif /* __LINUX_TIMER_H__ */
+
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/types.h b/cesar/ecos/packages/compat/linux/current/include/linux/types.h
new file mode 100644
index 0000000000..e58fc25361
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/types.h
@@ -0,0 +1,13 @@
+#ifndef __LINUX_TYPES_H__
+#define __LINUX_TYPES_H__
+
+#include "cyg/infra/cyg_type.h"
+
+#define uint8_t cyg_uint8
+#define uint16_t cyg_uint16
+#define uint32_t cyg_uint32
+#define loff_t off_t
+
+#define kvec iovec
+#endif /* __LINUX_TYPES_H__ */
+
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/version.h b/cesar/ecos/packages/compat/linux/current/include/linux/version.h
new file mode 100644
index 0000000000..cca2d731f1
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/version.h
@@ -0,0 +1,5 @@
+#ifndef __LINUX_VERSION_H__
+#define __LINUX_VERSION_H__
+
+
+#endif /* __LINUX_VERSION_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/vmalloc.h b/cesar/ecos/packages/compat/linux/current/include/linux/vmalloc.h
new file mode 100644
index 0000000000..6f18ab2255
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/vmalloc.h
@@ -0,0 +1,3 @@
+#ifndef __LINUX_VMALLOC_H__
+#define __LINUX_VMALLOC_H__
+#endif
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/wait.h b/cesar/ecos/packages/compat/linux/current/include/linux/wait.h
new file mode 100644
index 0000000000..2b422e34cb
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/wait.h
@@ -0,0 +1,15 @@
+#ifndef __LINUX_WAIT_H__
+#define __LINUX_WAIT_H__
+
+
+typedef struct { } wait_queue_head_t;
+
+#define init_waitqueue_head(wait) do{} while (0)
+#define add_wait_queue(wait,new_wait) do{} while (0)
+#define remove_wait_queue(wait,old_wait) do{} while (0)
+#define DECLARE_WAITQUEUE(wait,current) do{} while (0)
+
+static inline void wake_up(wait_queue_head_t *erase_wait)
+{ /* Only used for waking up threads blocks on erases. Not used in eCos */ }
+
+#endif /* __LINUX_WAIT_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/workqueue.h b/cesar/ecos/packages/compat/linux/current/include/linux/workqueue.h
new file mode 100644
index 0000000000..8c900a48bb
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/workqueue.h
@@ -0,0 +1,11 @@
+#ifndef __LINUX_WORKQUEUE_H__
+#define __LINUX_WORKQUEUE_H__
+
+/* We don't do this yet */
+struct work_struct { } ;
+
+#define INIT_WORK(x,y,z) /* */
+#define schedule_work(x) do { } while(0)
+#define flush_scheduled_work() do { } while(0)
+
+#endif /* __LINUX_WORKQUEUE_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/zlib.h b/cesar/ecos/packages/compat/linux/current/include/linux/zlib.h
new file mode 100644
index 0000000000..9de691e8b3
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/zlib.h
@@ -0,0 +1,14 @@
+#ifndef __LINUX_ZLIB_H__
+#define __LINUX_ZLIB_H__
+
+#include <cyg/compress/zlib.h>
+
+#define zlib_deflateInit(x,y) deflateInit(x,y)
+#define zlib_deflate(x,y) deflate(x,y)
+#define zlib_deflateEnd(x) deflateEnd(x)
+#define zlib_inflateInit(x) inflateInit(x)
+#define zlib_inflateInit2(x,y) inflateInit2(x,y)
+#define zlib_inflate(x,y) inflate(x,y)
+#define zlib_inflateEnd(x) inflateEnd(x)
+
+#endif /* __LINUX_ZLIB_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/include/linux/zutil.h b/cesar/ecos/packages/compat/linux/current/include/linux/zutil.h
new file mode 100644
index 0000000000..c3774baf9e
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/include/linux/zutil.h
@@ -0,0 +1,6 @@
+#ifndef __LINUX_ZUTIL_H__
+#define __LINUX_ZUTIL_H__
+
+#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
+
+#endif /* __LINUX_ZUTIL_H__ */
diff --git a/cesar/ecos/packages/compat/linux/current/src/rbtree.c b/cesar/ecos/packages/compat/linux/current/src/rbtree.c
new file mode 100644
index 0000000000..1ad19c8ab9
--- /dev/null
+++ b/cesar/ecos/packages/compat/linux/current/src/rbtree.c
@@ -0,0 +1,409 @@
+/*========================================================================
+//
+// rbtree.c
+//
+// Red Black tree implementation
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Niels Provos/OpenBSD
+// Contributors: dwmw2
+// Date: 2003-01-21
+// Purpose: This file provides an implementation of red-black trees.
+// Description: Derived from OpenBSD src/sys/sys/tree.h
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */
+/*
+ * Copyright 2002 Niels Provos <provos@citi.umich.edu>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* Fields renamed to match Linux ones. */
+#include <linux/rbtree.h>
+
+
+#define RB_HEAD(head) (head)->rb_node
+#define RB_LEFT(elm) (elm)->rb_left
+#define RB_RIGHT(elm) (elm)->rb_right
+#define RB_PARENT(elm) (elm)->rb_parent
+#define RB_COLOR(elm) (elm)->rb_color
+
+
+#define RB_SET(elm, parent) do { \
+ RB_PARENT(elm) = parent; \
+ RB_LEFT(elm) = RB_RIGHT(elm) = NULL; \
+ RB_COLOR(elm) = RB_RED; \
+} while (0)
+
+#define RB_SET_BLACKRED(black, red) do { \
+ RB_COLOR(black) = RB_BLACK; \
+ RB_COLOR(red) = RB_RED; \
+} while (0)
+
+#ifndef RB_AUGMENT
+#define RB_AUGMENT(x)
+#endif
+
+#define RB_ROTATE_LEFT(head, elm, tmp) do { \
+ (tmp) = RB_RIGHT(elm); \
+ if ((RB_RIGHT(elm) = RB_LEFT(tmp))) { \
+ RB_PARENT(RB_LEFT(tmp)) = (elm); \
+ } \
+ RB_AUGMENT(elm); \
+ if ((RB_PARENT(tmp) = RB_PARENT(elm))) { \
+ if ((elm) == RB_LEFT(RB_PARENT(elm))) \
+ RB_LEFT(RB_PARENT(elm)) = (tmp); \
+ else \
+ RB_RIGHT(RB_PARENT(elm)) = (tmp); \
+ } else \
+ (head)->rb_node = (tmp); \
+ RB_LEFT(tmp) = (elm); \
+ RB_PARENT(elm) = (tmp); \
+ RB_AUGMENT(tmp); \
+ if ((RB_PARENT(tmp))) \
+ RB_AUGMENT(RB_PARENT(tmp)); \
+} while (0)
+
+#define RB_ROTATE_RIGHT(head, elm, tmp) do { \
+ (tmp) = RB_LEFT(elm); \
+ if ((RB_LEFT(elm) = RB_RIGHT(tmp))) { \
+ RB_PARENT(RB_RIGHT(tmp)) = (elm); \
+ } \
+ RB_AUGMENT(elm); \
+ if ((RB_PARENT(tmp) = RB_PARENT(elm))) { \
+ if ((elm) == RB_LEFT(RB_PARENT(elm))) \
+ RB_LEFT(RB_PARENT(elm)) = (tmp); \
+ else \
+ RB_RIGHT(RB_PARENT(elm)) = (tmp); \
+ } else \
+ (head)->rb_node = (tmp); \
+ RB_RIGHT(tmp) = (elm); \
+ RB_PARENT(elm) = (tmp); \
+ RB_AUGMENT(tmp); \
+ if ((RB_PARENT(tmp))) \
+ RB_AUGMENT(RB_PARENT(tmp)); \
+} while(0)
+
+/* Note args swapped to match Linux */
+void rb_insert_color(struct rb_node *elm, struct rb_root *head)
+{
+ struct rb_node *parent, *gparent, *tmp;
+ while ((parent = RB_PARENT(elm)) &&
+ RB_COLOR(parent) == RB_RED) {
+ gparent = RB_PARENT(parent);
+ if (parent == RB_LEFT(gparent)) {
+ tmp = RB_RIGHT(gparent);
+ if (tmp && RB_COLOR(tmp) == RB_RED) {
+ RB_COLOR(tmp) = RB_BLACK;
+ RB_SET_BLACKRED(parent, gparent);
+ elm = gparent;
+ continue;
+ }
+ if (RB_RIGHT(parent) == elm) {
+ RB_ROTATE_LEFT(head, parent, tmp);
+ tmp = parent;
+ parent = elm;
+ elm = tmp;
+ }
+ RB_SET_BLACKRED(parent, gparent);
+ RB_ROTATE_RIGHT(head, gparent, tmp);
+ } else {
+ tmp = RB_LEFT(gparent);
+ if (tmp && RB_COLOR(tmp) == RB_RED) {
+ RB_COLOR(tmp) = RB_BLACK;
+ RB_SET_BLACKRED(parent, gparent);
+ elm = gparent;
+ continue;
+ }
+ if (RB_LEFT(parent) == elm) {
+ RB_ROTATE_RIGHT(head, parent, tmp);
+ tmp = parent;
+ parent = elm;
+ elm = tmp;
+ }
+ RB_SET_BLACKRED(parent, gparent);
+ RB_ROTATE_LEFT(head, gparent, tmp);
+ }
+ }
+ RB_COLOR(head->rb_node) = RB_BLACK;
+}
+
+
+static void rb_remove_color(struct rb_root *head, struct rb_node *parent,
+ struct rb_node *elm)
+{
+ struct rb_node *tmp;
+ while ((elm == NULL || RB_COLOR(elm) == RB_BLACK) &&
+ elm != RB_HEAD(head)) {
+ if (RB_LEFT(parent) == elm) {
+ tmp = RB_RIGHT(parent);
+ if (RB_COLOR(tmp) == RB_RED) {
+ RB_SET_BLACKRED(tmp, parent);
+ RB_ROTATE_LEFT(head, parent, tmp);
+ tmp = RB_RIGHT(parent);
+ }
+ if ((RB_LEFT(tmp) == NULL ||
+ RB_COLOR(RB_LEFT(tmp)) == RB_BLACK) &&
+ (RB_RIGHT(tmp) == NULL ||
+ RB_COLOR(RB_RIGHT(tmp)) == RB_BLACK)) {
+ RB_COLOR(tmp) = RB_RED;
+ elm = parent;
+ parent = RB_PARENT(elm);
+ } else {
+ if (RB_RIGHT(tmp) == NULL ||
+ RB_COLOR(RB_RIGHT(tmp)) == RB_BLACK) {
+ struct rb_node *oleft;
+ if ((oleft = RB_LEFT(tmp)))
+ RB_COLOR(oleft) = RB_BLACK;
+ RB_COLOR(tmp) = RB_RED;
+ RB_ROTATE_RIGHT(head, tmp, oleft);
+ tmp = RB_RIGHT(parent);
+ }
+ RB_COLOR(tmp) = RB_COLOR(parent);
+ RB_COLOR(parent) = RB_BLACK;
+ if (RB_RIGHT(tmp))
+ RB_COLOR(RB_RIGHT(tmp)) = RB_BLACK;
+ RB_ROTATE_LEFT(head, parent, tmp);
+ elm = RB_HEAD(head);
+ break;
+ }
+ } else {
+ tmp = RB_LEFT(parent);
+ if (RB_COLOR(tmp) == RB_RED) {
+ RB_SET_BLACKRED(tmp, parent);
+ RB_ROTATE_RIGHT(head, parent, tmp);
+ tmp = RB_LEFT(parent);
+ }
+ if ((RB_LEFT(tmp) == NULL ||
+ RB_COLOR(RB_LEFT(tmp)) == RB_BLACK) &&
+ (RB_RIGHT(tmp) == NULL ||
+ RB_COLOR(RB_RIGHT(tmp)) == RB_BLACK)) {
+ RB_COLOR(tmp) = RB_RED;
+ elm = parent;
+ parent = RB_PARENT(elm);
+ } else {
+ if (RB_LEFT(tmp) == NULL ||
+ RB_COLOR(RB_LEFT(tmp)) == RB_BLACK) {
+ struct rb_node *oright;
+ if ((oright = RB_RIGHT(tmp)))
+ RB_COLOR(oright) = RB_BLACK;
+ RB_COLOR(tmp) = RB_RED;
+ RB_ROTATE_LEFT(head, tmp, oright);
+ tmp = RB_LEFT(parent);
+ }
+ RB_COLOR(tmp) = RB_COLOR(parent);
+ RB_COLOR(parent) = RB_BLACK;
+ if (RB_LEFT(tmp))
+ RB_COLOR(RB_LEFT(tmp)) = RB_BLACK;
+ RB_ROTATE_RIGHT(head, parent, tmp);
+ elm = RB_HEAD(head);
+ break;
+ }
+ }
+ }
+ if (elm)
+ RB_COLOR(elm) = RB_BLACK;
+}
+
+/* Note name changed. Guess why :) */
+void rb_erase(struct rb_node *elm, struct rb_root *head)
+{
+ struct rb_node *child, *parent, *old = elm;
+ int color;
+ if (RB_LEFT(elm) == NULL)
+ child = RB_RIGHT(elm);
+ else if (RB_RIGHT(elm) == NULL)
+ child = RB_LEFT(elm);
+ else {
+ struct rb_node *left;
+ elm = RB_RIGHT(elm);
+ while ((left = RB_LEFT(elm)))
+ elm = left;
+ child = RB_RIGHT(elm);
+ parent = RB_PARENT(elm);
+ color = RB_COLOR(elm);
+ if (child)
+ RB_PARENT(child) = parent;
+ if (parent) {
+ if (RB_LEFT(parent) == elm)
+ RB_LEFT(parent) = child;
+ else
+ RB_RIGHT(parent) = child;
+ RB_AUGMENT(parent);
+ } else
+ RB_HEAD(head) = child;
+ if (RB_PARENT(elm) == old)
+ parent = elm;
+ *(elm) = *(old);
+ if (RB_PARENT(old)) {
+ if (RB_LEFT(RB_PARENT(old)) == old)
+ RB_LEFT(RB_PARENT(old)) = elm;
+ else
+ RB_RIGHT(RB_PARENT(old)) = elm;
+ RB_AUGMENT(RB_PARENT(old));
+ } else
+ RB_HEAD(head) = elm;
+ RB_PARENT(RB_LEFT(old)) = elm;
+ if (RB_RIGHT(old))
+ RB_PARENT(RB_RIGHT(old)) = elm;
+ if (parent) {
+ left = parent;
+ do {
+ RB_AUGMENT(left);
+ } while ((left = RB_PARENT(left)));
+ }
+ goto color;
+ }
+ parent = RB_PARENT(elm);
+ color = RB_COLOR(elm);
+ if (child)
+ RB_PARENT(child) = parent;
+ if (parent) {
+ if (RB_LEFT(parent) == elm)
+ RB_LEFT(parent) = child;
+ else
+ RB_RIGHT(parent) = child;
+ RB_AUGMENT(parent);
+ } else
+ RB_HEAD(head) = child;
+color:
+ if (color == RB_BLACK)
+ rb_remove_color(head, parent, child);
+}
+
+struct rb_node *rb_next(struct rb_node *elm)
+{
+ if (RB_RIGHT(elm)) {
+ elm = RB_RIGHT(elm);
+ while (RB_LEFT(elm))
+ elm = RB_LEFT(elm);
+ } else {
+ if (RB_PARENT(elm) &&
+ (elm == RB_LEFT(RB_PARENT(elm))))
+ elm = RB_PARENT(elm);
+ else {
+ while (RB_PARENT(elm) &&
+ (elm == RB_RIGHT(RB_PARENT(elm))))
+ elm = RB_PARENT(elm);
+ elm = RB_PARENT(elm);
+ }
+ }
+ return (elm);
+}
+
+struct rb_node *rb_prev(struct rb_node *elm)
+{
+ if (RB_LEFT(elm)) {
+ elm = RB_LEFT(elm);
+ while (RB_RIGHT(elm))
+ elm = RB_RIGHT(elm);
+ } else {
+ if (RB_PARENT(elm) &&
+ (elm == RB_RIGHT(RB_PARENT(elm))))
+ elm = RB_PARENT(elm);
+ else {
+ while (RB_PARENT(elm) &&
+ (elm == RB_LEFT(RB_PARENT(elm))))
+ elm = RB_PARENT(elm);
+ elm = RB_PARENT(elm);
+ }
+ }
+ return (elm);
+}
+
+/* These ones are lifted from Linux -- but that's OK because I
+ wrote them. dwmw2. */
+struct rb_node *rb_first(struct rb_root *root)
+{
+ struct rb_node *n;
+
+ n = root->rb_node;
+ if (!n)
+ return 0;
+ while (n->rb_left)
+ n = n->rb_left;
+ return n;
+}
+
+void rb_replace_node(struct rb_node *victim, struct rb_node *new,
+ struct rb_root *root)
+{
+ struct rb_node *parent = victim->rb_parent;
+
+ /* Set the surrounding nodes to point to the replacement */
+ if (parent) {
+ if (victim == parent->rb_left)
+ parent->rb_left = new;
+ else
+ parent->rb_right = new;
+ } else {
+ root->rb_node = new;
+ }
+ if (victim->rb_left)
+ victim->rb_left->rb_parent = new;
+ if (victim->rb_right)
+ victim->rb_right->rb_parent = new;
+
+ /* Copy the pointers/colour from the victim to the replacement */
+ *new = *victim;
+}
diff --git a/cesar/ecos/packages/compat/posix/current/ChangeLog b/cesar/ecos/packages/compat/posix/current/ChangeLog
new file mode 100644
index 0000000000..4eed209525
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/ChangeLog
@@ -0,0 +1,1094 @@
+2004-10-01 Oyvind Harboe <oyvind.harboe@zylin.com>
+
+ * src/signal.cxx: place the CYGBLD_ATTRIB_INIT_PRI such that it
+ compiles for gcc 3.4.2 which is more picky about its placement.
+
+2003-12-02 Sandeep <sandeep@codito.com>
+
+ * src/mqueue.cxx (new): define a placement new instead of using <new>
+
+2003-11-19 Rickard Westman <rickard.westman@27m.se>
+
+ * src/mqueue.cxx: Fix problem with mq_timedsend() and
+ mq_timedreceive() timing out with zero timeouts even when there is
+ room in the queue.
+
+2003-11-17 Dan Jakubiec <djakubiec@yahoo.com>
+
+ * src/pthread.cxx (pthread_exit): Added code to disable cancellation
+ requests during thread exit. This allows thread cleanup handlers
+ to issue system calls when cleaning up thread resources.
+
+2003-06-18 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/pthread.cxx (pthread_self_info): Just add some comments so
+ no-one's tempted to uncomment assert.
+ (pthread_create): Verify that self is a valid POSIX thread when
+ needed.
+
+2003-03-20 Mark Salter <msalter@redhat.com>
+
+ * include/pthread.h: Avoid conflict with recently introduced gcc
+ __thread keyword.
+
+2003-03-13 Bart Veer <bartv@ecoscentric.com>
+
+ * include/export.h: Only export signal-related functions if
+ CYGPKG_POSIX_SIGNALS is enabled.
+
+2003-03-04 Gary Thomas <gary@mlbassoc.com>
+
+ * include/pthread.h: Rework prototypes to minimize namespace problems.
+
+2003-03-03 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * tests/signal2.c (cause_illegal_access): PowerPC only generates
+ alignment exceptions in little-endian mode, so make that a special
+ case.
+
+ * tests/mutex3.c: Include POSIX headers before feature tests to
+ prevent spurious CYG_TEST_NA.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/posix.sgml: Expunge EL/IX. Dead standard.
+ * cdl/posix.cdl: Add doc link.
+
+2003-02-13 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/mutex.cxx: Include sched.hxx for scheduler lock/unlock primitives.
+ Reported by Jani Monoses.
+
+2003-02-10 Gary Thomas <gary@mlbassoc.com>
+
+ * tests/signal3.c (main): Reorg code so it builds with older GCC.
+
+2003-01-31 Nick Garnett <nickg@calivar.com>
+
+ * src/time.cxx (alarm_action): Added call to
+ cyg_posix_signal_sigwait() to wake up any sigwait()ing threads.
+
+ * src/signal.cxx (cyg_posix_signal_sigwait): Added this function
+ to export access to signal_sigwait conditional variable.
+ (sigtimedwait): Added call to cyg_posix_timer_asr() to allow timer
+ signals to be delivered here.
+
+ * src/pprivate.h: Added prototype for cyg_posix_signal_sigwait().
+
+ * cdl/posix.cdl:
+ * tests/signal3.c: Added this program to test interaction of
+ timers and signals, particularly sigwait(). Based on a test
+ program from N.Suresh <nsuresh@cdotb.ernet.in>.
+
+2003-01-20 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/signal.cxx (cyg_posix_deliver_signals): silence warning.
+
+ * src/time.cxx (cyg_timespec_to_ticks): Remove use of default arg in
+ definition.
+
+2003-01-18 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/mqueue.cxx: Fix multi-line string literal warning.
+
+2003-01-13 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/posix.sgml: Document them.
+
+ * src/mqueue.cxx (mq_timedreceive): Make fully compliant by dealing
+ with bogus timeouts.
+ (mq_timedsend): Ditto.
+
+2003-01-13 Dmitriy Korovkin <dkorovkin@rambler.ru>
+
+ * src/mqueue.cxx (mq_timedsend): New function. Implementing POSIX
+ 1003.1d draft definition.
+ (mq_timedreceive): Ditto.
+
+2002-12-10 Wade Jensen <waj4news@cox.net>
+2002-12-10 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/mutex.cxx (pthread_cond_timedwait): Initialize clock converters
+ only once ever.
+
+2002-11-26 Nick Garnett <nickg@ecoscentric.com>
+
+ * src/signal.cxx: Changed the three routines added in the last
+ change so that they can be called safely from non-POSIX threads.
+
+2002-11-10 Nick Garnett <nickg@ecoscentric.com>
+
+ * src/signal.cxx: Added three exportable routines that may be used
+ by other packages to manipulate the signal mask, test for
+ deliverable signals, and have signals delivered at controlled
+ points.
+
+ * include/export.h: Added macros to export signal mask management,
+ detection and delivery to other packages.
+
+2002-11-05 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * tests/tm_basic.cxx: Use <cyg/infra/diag.h> for diag_printf
+ prototype.
+
+2002-05-23 Jesper Skov <jskov@redhat.com>
+
+ * cdl/posix.cdl: Don't build tests using signals when posix
+ signals are disabled.
+
+2002-05-21 Jesper Skov <jskov@redhat.com>
+
+ * tests/mutex3.c: Added an NA check.
+
+2002-04-09 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/signal.cxx (cyg_deliver_signals): Don't assert here for an
+ unhandled signal (unless there's no _exit). Trace it though.
+
+2002-04-08 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/sem.cxx (sem_getvalue): return 0, and put value in *sval.
+
+2002-04-03 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/posix.cdl: Allow clocks to be configured again.
+
+2002-03-05 Jesper Skov <jskov@redhat.com>
+
+ * src/pprivate.h: Correct conditional declaration of timespec
+ functions.
+
+ * src/sched.cxx (sched_rr_get_interval): Return ENOSYS when
+ CYGPKG_POSIX_CLOCKS disabled.
+
+2002-02-27 Robin Farine <robin.farine@terminus.org>
+
+ * src/pthread.cxx (pthread_exit): While running thread static
+ storage destructors, set the thread's value associated with the
+ current key to NULL before invoking the destructor.
+
+2002-02-14 Nick Garnett <nickg@redhat.com>
+
+ * doc/posix.sgml: Generally fixed up and reformatted to make this
+ file readable by mere humans. Some omissions and outdated
+ information fixed, but not substantially changed from the
+ original.
+
+ * cdl/posix.cdl: Changed some definitions and dependencies so that
+ disabling the timers does not disable threads too. This was
+ largely a consequence of trying to document the behaviour of these
+ options.
+
+2002-02-14 Jonathan Larmour <jlarmour@redhat.com>
+
+ * doc/posix.sgml: New file, originally accompanied by this ChangeLog:
+ 2001-12-22 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos-elix.sgml: Do a minor cleanup of the function prototype
+ layouts.
+ Should be done better than this, but this is at least not
+ _completely_ wrong any more.
+ Also several more layout problems due to incorrect tags fixed.
+
+ 2001-12-07 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos-elix.sgml: Add getcwd as supported now.
+
+ 2001-12-06 Jonathan Larmour <jlarmour@redhat.com>
+
+ * ecos-elix.sgml: Created from old framemaker version.
+
+2002-01-21 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/sched.cxx (sched_get_priority_min): Don't allow idle thread
+ priority as a valid priority.
+ Case #106952.
+
+2001-12-11 Nick Garnett <nickg@redhat.com>
+
+ * tests/mqueue2.c (cyg_user_start): Added CYG_TEST_INIT() to
+ NOTAPPLICABLE variant, otherwise the order of breakpoints are all
+ wrong and the testfarm registers a failure.
+
+2001-11-06 Gary Thomas <gthomas@redhat.com>
+
+ * include/muttypes.h: Need <pkgconf/kernel.h> configuration info,
+ otherwise structures defined here could have the wrong size.
+
+2001-10-25 I-Jui Sung <ijsung@csie.nctu.edu.tw>
+
+ * src/mqueue.cxx (do_mq_unlink): Nullify table entries' mq as this
+ is used by mq_open to see if the entry is used.
+
+2001-10-11 Jesper Skov <jskov@redhat.com>
+
+ * tests/mutex3.c: Fixed warning.
+ (new_thread): Fixed allocation: increase counter
+ before starting threads which have been allocated resources.
+
+ * tests/signal2.c (cause_illegal_access): Fix warning.
+
+2001-10-10 Jesper Skov <jskov@redhat.com>
+
+ * cdl/posix.cdl: Only build sem.cxx when the semaphores component
+ is enabled.
+
+2001-10-09 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/pprivate.h (pthread_info): Conditionalize signal specific
+ members. Conditionalize declaration of
+ cyg_posix_pthread_release_thread().
+
+ * cdl/posix.cdl (CYGPKG_POSIX_CLOCKS): new option to separately
+ configure posix clocks from timers.
+ (CYGPKG_POSIX_TIMERS): require clocks and signals.
+
+ * include/time.h: Make proper ISO C. Conditionalize on
+ CYGPKG_POSIX_TIMERS correctly wrt the above change.
+
+ * src/pthread.cxx (posix_asr): Call signal and timer subsystems
+ conditionally.
+
+ * src/pthread.cxx (pthread_reap): Don't destroy signal handling
+ fields if there is no signal handling subsystem.
+ (cyg_posix_pthread_release_thread): Conditionalize on signals.
+ (pthread_create): Init signal subsys conditionally.
+
+ * src/signal.cxx (sleep): Move to...
+
+ * src/time.cxx: ...here.
+ Conditionalize throughout depending on whether it's POSIX clocks
+ or more specifically POSIX timers.
+ (nanosleep): Use PTHREAD_TESTCANCEL() not pthread_testcancel().
+ Get current thread from kernel not pthreads to remove pthread
+ dependency.
+
+2001-10-09 Jesper Skov <jskov@redhat.com>
+
+ * tests/signal2.c: Also do NA check for signals.
+
+2001-10-01 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/mqueue.cxx (mq_open): Conditionalize use of sigev correctly.
+ (mq_close): Similarly.
+
+2001-09-28 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/pthread.cdl (CYGNUM_POSIX_MAIN_DEFAULT_PRIORITY): Clarify
+ POSIX thread priority description.
+
+2001-09-28 Jesper Skov <jskov@redhat.com>
+
+ * cdl/pthread.cdl: Changed default priority of POSIX main to
+ 16. This allows service threads (such as DHCP thread) to run when
+ started from main().
+
+2001-09-10 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/pthread.h: Separate mutex and condvar API into separate
+ header file to fix configury problems.
+ * include/mutex.h: New file for the above.
+ * cdl/posix.cdl: provide the correct configury for the isoinfra
+ package to include the above file.
+ * cdl/pthread.cdl: Move _POSIX_PTHREAD_PRIO_INHERIT and
+ _POSIX_THREAD_PRIO_PROTECT to cdl/posix.cdl.
+
+2001-09-07 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/sem.cxx (sem_trywait): Actually use the return value.
+
+ * src/sched.cxx (sched_get_priority_max): Use MAX not MIN
+ (sched_get_priority_min): Use MIN not MAX.
+
+2001-09-06 Jesper Skov <jskov@redhat.com>
+
+ * cdl/posix.cdl: Moved signal implements statements to the
+ CYGPKG_POSIX_SIGNALS component.
+
+2001-08-06 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/posix.cdl: Reorganize dependencies so that signals, timers
+ and pthreads really can be disabled, and the relevant files don't
+ get built.
+ Build new mutex.cxx file.
+ Remove duplicate CYGPKG_POSIX_SCHED dependency for pthreads.
+
+ * include/limits.h: Don't include irrelevant header dependencies.
+
+ * include/muttypes.h: New type defining mutex/cond var types separately
+ from other pthread types.
+
+ * include/types.h: Remove mutex/cond var types.
+
+ * include/signal.h: Conditionalize on CYGPKG_POSIX_SIGNALS
+
+ * include/sigsetjmp.h: Don't include irrelevant header dependencies.
+ Rewrite sigsetjmp in a much more compiler friendly (and readable)
+ way with less type punning.
+
+ * src/misc.cxx: Don't include sysconf cases when pthreads or
+ CYGPKG_POSIX_TIMERS not enabled.
+
+ * src/mutex.cxx: New file, broken out of pthreads.cxx, as most
+ of it is not fixed to the pthreads implementation, and I've fixed
+ the bits that were too tied to it.
+
+ * src/pprivate.h: Conditionalize definitions that are specific
+ to CYGPKG_POSIX_PTHREAD. Ditto for prototypes for CYGPKG_POSIX_SIGNALS
+ and CYGPKG_POSIX_TIMERS. Move PTHREAD_ENTRY/RETURN etc. macros
+ here so they can be used throughout the package.
+
+ * src/pthread.cxx: Remove mutex/cond var implementation, and
+ entry/return macros, as per above.
+
+ * src/signal.cxx (cyg_sigqueue): Don't just set non-queueable signals
+ pending - also forcibly wake up any blocked threads.
+ (siglongjmp): Use new layout of sigjmp_buf.
+
+ * tests/mutex3.c:
+ * tests/pthread1.c:
+ * tests/pthread2.c:
+ * tests/pthread3.c:
+ * tests/signal1.c:
+ * tests/sigsetjmp.c:
+ * tests/timer1.c:
+ * tests/tm_basic.cxx:
+ Correct configuration dependencies, and do NA appropriately.
+
+2001-08-03 Nick Garnett <nickg@cygnus.co.uk>
+
+ Imported from a development branch:
+
+ 2001-06-27 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/pthread3.c:
+ Modified the loop that waits for the threads to get going so that
+ it will function correctly in an SMP system, where the threads
+ will run in parallel.
+
+ * tests/mutex3.c: Disabled this test for SMP systems. It depends
+ too much on predicting the priority-driven execution order of the
+ threads. In an SMP system, some threads will run in parallel and
+ falsify the assumptions.
+
+ 2001-05-25 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/signal.cxx (siglongjmp): Minor change to satisfy latest C++
+ compiler.
+
+2001-06-14 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/pthread.cxx (pthread_attr_setstacksize): Correct stack
+ size assertion.
+
+2001-06-12 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/pthread.cxx (MAIN_DEFAULT_STACK_SIZE): Define to use at
+ least PTHREAD_STACK_MIN for main_stack.
+
+2001-05-01 Nick Garnett <nickg@cygnus.co.uk>
+
+ [x86 branch]
+ * tests/signal2.c (cause_illegal_access): Added code for I386
+ architecture to provoke General Protection Fault.
+
+ * src/except.cxx: Removed some extraneous diag_printf()s.
+
+2001-04-25 Bart Veer <bartv@redhat.com>
+
+ * tests/tm_basic.cxx:
+ This test is now functional on the synthetic target.
+
+2001-04-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/time.cxx (cyg_ticks_to_timespec): Actually don't bother
+ with working out seconds using convertors. Instead just divide
+ down ns from a long long.
+
+2001-04-19 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/time.cxx (cyg_ticks_to_timespec): Clock convertors round off,
+ so adjust timespec accordingly.
+
+2001-02-14 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/pthread.h: Remove pthread_canceled() and
+ pthread_testcancel_unlock().
+
+ * src/pthread.cxx: Ditto.
+ (pthread_join): Restructure to have function exit only at function end
+ (pthread_cond_timedwait): Check for timeouts and return ETIMEDOUT
+
+ * src/signal.cxx (sigtimedwait): Restructure cancellation testing
+
+ * src/time.cxx (nanosleep): test for cancellation at the end of the
+ function to keep Nick happy ;).
+
+2001-02-11 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/pthread.h: Add new pthread_testcancel_unlock and
+ pthread_canceled functions as eCos extensions.
+ Rename existing pthread_canceled variable to pthread_cancelled_dummy_var
+
+ * src/pthread.cxx (pthread_canceled): New function to interrogate if
+ current thread has deferred cancel pending
+ (pthread_testcancel_unlock): New function. Like testcancel, but unlocks
+ a mutex before exitting the thread.
+ (checkforcancel): New internal function
+ (pthread_join): Add thread cancellation checks.
+ (pthread_cond_wait): Ditto.
+ (pthread_cond_timedwait): Ditto.
+ (pthread_testcancel): Use checkforcancel()
+
+ * src/sem.cxx (sem_wait): Add thread cancellation checks
+ * src/signal.cxx (sigtimedwait): Ditto.
+ Also make compilation of this file conditional on CYGPKG_POSIX_SIGNALS
+ * src/time.cxx (nanosleep): Ditto.
+ Also make compilation of this file conditional on CYGPKG_POSIX_TIMERS
+
+ * cdl/posix.cdl (CYGPKG_POSIX_TIMERS): Implements POSIX timer ops.
+ Add explicit kernel and pthread dependencies.
+
+ * tests/sigsetjmp.c (pthread_entry1): Fix incorrect thread no. output
+
+ * tests/pthread3.c: Add deferred cancellation test.
+
+2001-01-11 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/pthread.cxx (pthread_testcancel): Added test for self !=
+ NULL in case this gets called from a non-pthread.
+
+2000-12-22 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/pthread.cxx (pthread_measure_stack_usage): New function
+ to measure stack usage.
+
+ * include/pthread.h: Prototype it.
+
+ * cdl/pthread.cdl: remove CYGNUM_POSIX_MAIN_DEFAULT_STACK_SIZE and
+ instead implement CYGINT_LIBC_STARTUP_EXTERNAL_INVOKE_MAIN_POSSIBLE
+
+ * src/pthread.cxx: Use stack size for main from libc_startup package
+ to prevent confusion
+ (cyg_posix_pthread_start): Likewise
+
+2000-12-06 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/signal.cxx: include unistd.h for _exit
+
+2000-11-20 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/signal.cxx (cyg_deliver_signals): Added else in code to
+ handle SIG_DFL. Otherwise if the SA_SIGINFO bit is set we call the
+ signal handler twice!
+
+2000-11-07 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/signal.cxx (cyg_posix_thread_siginit): Add extra thread
+ argument so that threads can inherit parent's sigmask.
+
+ * src/pthread.cxx (pthread_create): Call with parent thread
+
+ * src/pprivate.h: Change cyg_posix_thread_siginit prototype to take
+ parent thread argument
+
+ * tests/signal1.c: Add more checking of sigwaits, and fix so that it's
+ only called when the signal is masked. Check errno values too
+ sometimes.
+
+2000-11-02 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/signal.cxx (sigtimedwait): return signal number on success,
+ not 0
+ (SIGNAL_RETURN_VALUE): New macro for returning from functions with
+ valid non-zero returns
+ (sigwaitinfo): Pass on sigtimedwait result with SIGNAL_RETURN_VALUE
+ macro as it may return the signal number.
+
+2000-11-01 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/signal.cxx (sigtimedwait): Check for SIGALRMs as a special
+ case when looping as it won't have been set pending if it was
+ masked.
+ (check_sigalarm): New function extracted from the posix signal ASR
+ (sigalrm_action): Unconditionally wake up threads waiting in sigwait
+ so that they can check for pending SIGALRMs even if they were
+ masked.
+ (cyg_deliver_signals): Handle SIG_DFL signals properly, and check
+ for bad signal handlers.
+ (cyg_posix_signal_start): Initialize default signal actions to SIG_DFL
+
+2000-10-27 Jesper Skov <jskov@redhat.com>
+
+ * tests/signal2.c (cause_illegal_access): Don't loop forever.
+
+2000-10-16 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/sigsetjmp.h (sigsetjmp): Various fixes to make portable
+ across all HALs (by avoiding CYGARC_JMP_BUF_SIZE) and remove warnings.
+ * src/signal.cxx (siglongjmp): Likewise
+
+2000-10-12 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/sigsetjmp.h: Added this header to define
+ sigjmp_buf,sigsetjmp() and siglongjmp().
+
+ * cdl/posix.cdl:
+ Added support for providing sigsetjmp implementation and header.
+ Added sigsetjmp test.
+
+ * src/signal.cxx: Added siglongjmp().
+
+ * tests/sigsetjmp.c: Added this test for sigsetjmp(), siglongjmp()
+ functionality. This is also a test for longjmping out of signal
+ handlers.
+
+ * tests/signal2.c:
+ Ifdeffed around cause_* functions to avoid compiler warnings when
+ they are not needed.
+ Changed CYG_TEST_NA() calls to CYG_TEST_INFO() and changed
+ CYG_TEST_FINISH() to CYG_TEST_PASS_FINISH(). With the _NA's there,
+ the first unsupported exception just terminates the program, and
+ does not give any subsequent supported ones a chance to run.
+
+2000-10-12 Jesper Skov <jskov@redhat.com>
+
+ * tests/timer1.c (main): Fix exit check.
+
+2000-10-11 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/pthread.cxx: Fixed cyg_posix_pthread_release_thread() to
+ work for _DETACHED threads as well as for _RUNNING ones. Also
+ fixed a bug in test to decrement counter in this routine.
+
+ * src/pprivate.h: Added note about retaining numerical order of
+ PTHREAD_STATE_* defines.
+
+ * tests/timer1.c: Fixed some bugs of the how-did-it-ever-work
+ variety.
+
+2000-10-05 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/misc.cxx:
+ Added a set of compatibility functions to aid portability and
+ improve standards compliance.
+ Added cyg_posix_function_[start|finish] to set up and terminate
+ POSIX API functionality wrt signal and cancellation behaviour.
+ (Lots more to do here).
+
+ * include/export.h:
+ Added this file to contain definitions that can be exported from
+ the POSIX package to others.
+
+ * src/pprivate.h: Added include of export.h
+
+2000-09-11 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/limits.h (OPEN_MAX): Don't define here - let FS infra do
+ that.
+ (LINK_MAX): Ditto
+ (NAME_MAX): Ditto
+ (PATH_MAX): Ditto
+
+2000-09-04 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/pthread2.c:
+ * tests/pthread3.c:
+ Fixed bug in calculation of thread stack addresses.
+
+ * src/misc.cxx (sysconf): Change zero returns to -1 when a feature
+ is not supported.
+
+2000-08-08 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/limits.h: Don't define SSIZE_MAX here, leave it to the
+ isoinfra default.
+
+2000-07-27 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * tests/signal2.c: NA if no setjmp/longjmp
+
+2000-07-26 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pthread.h:
+ * src/pthread.cxx (pthread_testcancel): Reversed addition of cyg_
+ to this symbol.
+
+2000-07-25 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/pthread.cxx: Define main_stack and main_thread as static
+ Rename pthread_canceled -> cyg_pthread_canceled - pthread_ may be
+ a reserved name space but this makes explicit it is implementation-
+ and not standard-defined
+ (PTHREAD_ENTRY_VOID): Define for funcs that take no args
+ (pthread_testcancel): Call PTHREAD_ENTRY_VOID()
+
+ * include/pthread.h: Rename pthread_canceled -> cyg_pthread_canceled
+
+2000-07-20 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/pthread.cxx: Use isoinfra to determine presence of malloc()
+ Define pthread_malloc() and pthread_free() as inlines
+
+ * cdl/posix.cdl: Shouldn't define _POSIX_MESSAGE_PASSING at all - that
+ happens in isoinfra.
+
+2000-07-20 Nick Garnett <nickg@cygnus.co.uk>
+
+ * cdl/posix.cdl: Added misc.cxx to compile list. Added option to
+ define _POSIX_MESSAGE_PASSING. Added configury for utsname
+ structure.
+
+ * include/utsname.h: Added this file to define struct utsname and
+ uname() function prototype.
+
+ * include/mqueue.h: Moved definition of _POSIX_MESSAGE_PASSING to
+ CDL.
+
+ * include/limits.h: Added NGROUPS_MAX definition.
+
+ * src/pthread.cxx:
+ Added support for malloced() thread stacks.
+ Added implementations of pthread_mutex_setprioceiling() and
+ pthread_mutex_getprioceiling().
+ Changed implementations of pthread_mutex_destroy(),
+ pthread_mutex_lock() and pthread_mutex_trylock() to conform more
+ closely to the standard.
+ Changed pthread_key_create() to assign NULL to all valid thread
+ slots that correspond to a newly allocated key.
+
+ * src/pprivate.h: Added freestack and stackmem members to manage
+ malloced thread stacks.
+
+ * src/misc.cxx: Added this file to contain functions that do not
+ belong in any other files. Currently contains uname() and
+ sysconf().
+
+2000-07-19 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/startup.cxx: Remove unnecessary includes
+ Use dummy object constructor to do initialization
+
+ * cdl/posix.cdl:
+ Don't need main.cxx any more
+ Build startup.cxx into extras.o (via libextras.a)
+
+ * cdl/pthread.cdl (CYGPKG_POSIX_MAIN_THREAD):
+ Integrate with CYGPKG_LIBC_STARTUP - tell CYGPKG_LIBC_STARTUP to
+ let pthreads set up main thread
+
+ * src/pthread.cxx: Integrate with CYGPKG_LIBC_STARTUP rather than
+ calling main() directly.
+ Track number of threads waiting to be joined, so we can tell in
+ pthread_exit() if this is the last thread, and therefore whether
+ to call exit()
+
+ * src/main.cxx: obsolete, removed
+
+2000-07-13 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/signal.cxx: Added ISO C compatibility functions signal() and
+ raise().
+
+2000-06-21 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/pthread.cxx: Added for(;;) loop to end of pthread_exit().
+ pthread_exit() is marked with the noreturn attribute, and without
+ this some compilers generate a call to abort() here in case
+ Cyg_Thread::exit() returns. The loop avoids this.
+
+2000-06-06 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/mqueue.cxx (mq_receive): Fix non-portable treatment of mode flags
+ (mq_send): Ditto
+ * tests/mqueue2.c (main): Ditto
+
+2000-05-24 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/pthread2.c: Added this program to test per-thread data
+ handling.
+
+ * tests/pthread3.c: Added this program to test execution of
+ cancellation handler.
+
+ * src/pthread.cxx: Fixed some bugs revealed by new test programs.
+
+ * cdl/posix.cdl: Added two new pthread tests.
+
+2000-05-22 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/posix.cdl (CYGPKG_POSIX): Require
+ CYGIMP_KERNEL_SCHED_SORTED_QUEUES
+
+2000-05-20 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * tests/mqueue1.c (cyg_user_start): Define correctly
+ * tests/mqueue2.c (cyg_user_start): Likewise
+
+ * src/pprivate.h (cyg_sigqueue): Make struct sigevent * arg const since
+ it is, and it prevents warnings elsewhere
+ * src/signal.cxx (cyg_sigqueue): ditto
+
+ * tests/signal2.c: Use CYG_TEST_NA, not CYG_TEST_INFO (otherwise
+ the test farm may fail the tests because there are no PASSes or NAs)
+
+ * cdl/posix.cdl (CYGPKG_POSIX): We need errno and error codes, so
+ require them
+ Move some of the package implements into the components
+ Add message queue configuration, build mqueue.cxx and the mqueue1 and
+ mqueue2 tests
+ Move some calculated options into isoinfra, implemented as interfaces
+ so that unistd.h and limits.h can get the values
+
+ * include/limits.h: Move _POSIX_* macros into isoinfra limits.h
+ since they are implementation independent
+
+ * src/mqueue.cxx: Add POSIX message queue implementation
+ * tests/mqueue1.c, tests/mqueue2.c: and tests
+
+2000-05-18 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/pprivate.h:
+ * src/pthread.cxx:
+ * src/signal.cxx:
+ * src/time.cxx:
+ Added prioritization of static kernel objects.
+
+2000-05-17 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/pthread.cxx:
+ To reduce the static memory required by this code, the
+ pthread_info structure for a pthread is now allocated in the stack
+ memory for that thread, and not in a static table. The table is
+ now just an array of pointers. The per-thread data array is now
+ also allocated onto the stack only when first required.
+
+ * include/pthread.h: Removed some redundant code.
+
+ * include/limits.h: Added PTHREAD_STACK_OVERHEAD to record
+ management overhead imposed on POSIX threads stacks. This is added
+ to the HAL minimum requirement to generate PTHREAD_STACK_MIN.
+
+ * src/pprivate.h (pthread_info):
+ * include/types.h (pthread_attr_t): Converted a number of integer
+ state and boolean fields to bitfields.
+
+ * cdl/pthread.cdl:
+ Added requirement for CYGFUN_KERNEL_THREADS_STACK_LIMIT.
+
+2000-05-16 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/types.h: Added stacksize_valid to pthread_attr_t
+ structure.
+
+ * include/signal.h:
+ Added SI_EXCEPT to mark any signals that were caused by an
+ exception. Removed conditions around SIGBUS.
+
+ * src/startup.cxx (cyg_posix_start):
+ Added call to cyg_posix_exception_start().
+
+ * src/signal.cxx:
+ Rearranged cyg_deliver_signals() so that it is possible to
+ longjmp() out of a signal handler without leaving signal handling
+ code in an inconsistent state.
+ Added handling of SIG_IGN in sigaction().
+
+ * src/pthread.cxx: Added setting and checking of stacksize_valid.
+
+ * src/pprivate.h: Added cyg_deliver_signals() as an export of
+ signal system. Added exports from except.cxx.
+
+ * src/except.cxx: Added this file to handle delivery of exceptions
+ into the POSIX signal mechanism.
+
+ * cdl/posix.cdl: Added except.cxx to compile list, added signal2
+ to tests. Added requirement on kernel exception processing.
+
+ * tests/tm_basic.cxx: Tidied up a compilation warning.
+
+ * tests/signal2.c: Added this test for exception signal generation.
+
+ * tests/mutex3.c: Fixed stupid bug.
+
+2000-05-10 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/pprivate.h: Added cyg_posix_clock_start() prototype.
+
+ * src/startup.cxx: Added call to cyg_posix_clock_start().
+
+ * src/time.cxx: Added startup routine to initialize
+ converters. Fixed error result bug in timer_delete().
+
+ * include/signal.h: Removed some configuration tests which are now
+ done in CDL.
+
+ * cdl/posix.cdl: Added configury for the signals component. Added
+ tm_basic to tests.
+
+ * tests/tm_basic.cxx:
+ Added this POSIXized version of the tm_basic test. Note that this
+ has not been entirely converted. While the code being tested is
+ POSIX, the timing infrastructure remains a mish-mash of kernel,
+ KAPI and HAL code.
+
+2000-05-04 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/time.cxx:
+ Many changes to implement the delivery of signals on timer expiry.
+ Also added timer_delete().
+
+ * src/signal.cxx:
+ cyg_sigqueue() and cyg_deliver_signals() may now only be called
+ from within the context of a POSIX thread, either from an API call
+ or an ASR.
+ cyg_deliver_signals() can now cope with a signal that has
+ SA_SIGINFO set but no signals queued. It also determines
+ dynamically whether to lock the signal_mutex.
+ cyg_deliver_signals() is no longer called implicitly from
+ cyg_sigqueue() - so a number of expicit calls have been added.
+
+ * src/sched.cxx:
+ Added this file to implement scheduling API.
+
+ * src/pthread.cxx:
+ Moved priority translation macros to pprivate.h.
+ Removed errno handling, now done in isoinfra package.
+ Added iterative calls to per-thread data destructors.
+
+ * src/pprivate.h:
+ Removed error field from pthread_info structure.
+ Moved priority translation macros here.
+ Removed prototype for cyg_deliver_signals().
+ Added prototype for cyg_posix_timer_asr().
+
+ * include/time.h: Added timer_delete() which was mysteriously
+ omitted.
+
+ * cdl/posix.cdl: Added sched.cxx to compile list and timer1.c to
+ tests.
+
+ * tests/signal1.c:
+ * tests/pthread1.c:
+ Fixed bug in use of stack sizes.
+
+ * tests/timer1.c:
+ Added test for use of timers.
+
+2000-05-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/sched.h: No longer needed - just use the default definition
+ in isoinfra
+
+ * include/errno.h: No longer needed - errno provision now comes from
+ CYGPKG_ERROR
+
+ * include/sys/types.h: Moved to include/types.h
+
+ * cdl/posix.cdl, cdl/pthread.cdl: Put include files in cyg/posix, and
+ configure CYGPKG_ISOINFRA to include the appropriate headers
+
+ * include/semaphore.h: Don't need to check kernel - including
+ pkgconf/kernel.h would already fail
+ Give SEM_FAILED a type so casting behaves in C++
+
+ * include/signal.h: This uses pid_t etc., so include <sys/types.h>
+ Add signal() and raise() prototypes (to allow libc compilation, even
+ though they aren't implemented yet)
+
+ * include/time.h: Remove unnecessary includes. Move clockid_t and
+ timer_t definitions here from sys/types.h since this is where the
+ standard says they must live.
+
+ * src/pprivate.h: Include signal.h and limits.h since their contents
+ are used later in the file.
+
+2000-04-28 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/signal.cxx:
+ Added implementations of alarm(), pause() and sleep().
+ Modified cyg_sigqueue() so that it could be called from an ASR.
+ Added cyg_posix_signal_asr() to do signal processing in ASRs.
+ Miscellaneous bug fixes.
+
+ * src/pthread.cxx:
+ Added pthread_count to count number of threads created.
+ Added call to signal ASR function in main ASR.
+ Added cyg_posix_pthread_release_thread() to seek out and kick a
+ thread to which a given set of signals may be delivered.
+
+ * src/pprivate.h:
+ Added some more functions that are shared between POSIX
+ subsystems.
+
+ * include/signal.h:
+ Added alarm(), pause() and sleep() prototypes.
+
+ * tests/signal1.c: Added this test for various aspects of signal
+ handling.
+
+ * cdl/posix.cdl: Added signal1 test.
+
+2000-04-20 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/signal.cxx: Added this file to contain signal handling code.
+
+ * src/time.cxx: Made tick<->timespec converters exported to
+ rest of POSIX subsystem. Enabled interface to signal mechanism for
+ notifying timer expiration.
+
+ * src/pthread.cxx:
+ Made pthread_mutex exported to rest of POSIX subsystem.
+ Exported pthread_info_id().
+ Added thread init and destroy functions for signal subsystem.
+
+ * src/startup.cxx: Added call to cyg_posix_signal_start().
+
+ * src/pprivate.h: Added signal handling fields support to
+ pthread_info structure. Added extra internal interfaces to support
+ signal handling code.
+
+ * include/signal.h: Added _how_ argument values for the sigmask
+ functions.
+
+ * cdl/posix.cdl: Added signal.cxx to compile list.
+
+2000-04-13 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/time.h:
+ * src/time.cxx:
+ Added implementation of clock and timer functions. These are
+ currently untested since they need working signals.
+
+2000-04-12 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/pprivate.h: Added cancellation support fields to
+ pthread_info structure. Made pthread_self_info() exported.
+
+ * include/semaphore.h: Added SEM_FAILED plus misc. tidies.
+
+ * include/pthread.h: Added PTHREAD_CANCELED.
+
+ * include/errno.h: Fixed cyg_pthread_errno_p() return type.
+
+ * src/pthread.cxx:
+ Added pthread_reap() to clean up exited threads.
+ Added support for cancellation.
+ Added cyg_posix_errno_p().
+
+ * src/time.cxx:
+ Added this file to implement time functionality. At present only
+ nanosleep() is actually implemented.
+
+ * src/sem.cxx:
+ Added this file to implement semaphore functionality.
+
+ * cdl/pthread.cdl:
+ Added some extra configuration requirements.
+
+ * cdl/posix.cdl:
+ Added some more files to compile.
+ Added semaphore configuration.
+
+ * tests/mutex3.c:
+ Added this test program. This is actually a POSIXized version of
+ Hugo's splendid kernel test of the same name. It exercises quite a
+ lot of the pthread infrastructure and is thus a good test to run.
+
+ * tests/pthread1.c:
+ Added proper comment headers and added full testing stuff.
+
+2000-04-10 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/pprivate.h:
+ * src/pthread.cxx:
+ Added per-thread data support.
+
+2000-04-06 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/pthread.cxx:
+ Filled in implementations of lots of functions.
+
+ * src/main.cxx:
+ Added this file to contain a default main. This is currenly just a
+ duplicate of the same file from the C library. Work is needed to
+ combine these.
+
+ * include/sys/types.h:
+ Modified pthread_mutex_t to conform to kernel structure.
+
+ * cdl/pthread.cdl:
+ Added support for main thread.
+
+ * cdl/posix.cdl:
+ Added main.cxx to compile list.
+
+2000-03-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * cdl/pthread.cdl:
+ * cdl/posix.cdl:
+ Added CDL files to configure POSIX subsystem.
+
+ * src/pprivate.h:
+ * src/pthread.cxx:
+ * src/startup.cxx:
+ Added these files to begin implementation of POSIX package.
+
+ * include/pthread.h:
+ * include/sched.h:
+ * include/signal.h:
+ * include/time.h:
+ * include/sys/types.h:
+ Many changes needed by implementation work.
+
+ * include/limits.h:
+ * include/errno.h:
+ Added these header files.
+
+2000-03-24 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/sys/types.h:
+ * include/time.h:
+ * include/sched.h:
+ * include/pthread.h:
+ * include/signal.h:
+ * include/semaphore.h:
+ * include/mqueue.h:
+ Roughed out (most of) the set of POSIX headers for the
+ functionality we are currently going to support. These files are
+ currently neither fully standard conformant nor implementation
+ ready. Much work is still needed to make them so. Watch this
+ space.
+
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
diff --git a/cesar/ecos/packages/compat/posix/current/cdl/posix.cdl b/cesar/ecos/packages/compat/posix/current/cdl/posix.cdl
new file mode 100644
index 0000000000..86b3aa2251
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/cdl/posix.cdl
@@ -0,0 +1,317 @@
+# ====================================================================
+#
+# posix.cdl
+#
+# POSIX layer configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): nickg
+# Contributors:
+# Date: 2000-3-28
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_POSIX {
+ display "POSIX compatibility layer"
+ description "This package enables the POSIX compatibility
+ layer that implements IEEE 1003.1."
+ doc ref/posix-compatibility.html
+ include_dir cyg/posix
+
+ requires CYGPKG_KERNEL
+ requires CYGPKG_ISOINFRA
+ requires CYGPKG_ERROR
+ requires CYGINT_ISO_ERRNO
+ requires CYGINT_ISO_ERRNO_CODES
+ requires CYGIMP_KERNEL_SCHED_SORTED_QUEUES
+
+ implements CYGINT_ISO_SCHED_IMPL
+ implements CYGINT_ISO_POSIX_LIMITS
+ implements CYGINT_ISO_PMUTEXTYPES
+ implements CYGINT_ISO_PTHREAD_MUTEX
+ requires { CYGBLD_ISO_POSIX_LIMITS_HEADER == \
+ "<cyg/posix/limits.h>" }
+ requires { CYGBLD_ISO_PMUTEXTYPES_HEADER == \
+ "<cyg/posix/muttypes.h>" }
+ requires { CYGBLD_ISO_PTHREAD_MUTEX_HEADER == \
+ "<cyg/posix/mutex.h>" }
+
+ compile mqueue.cxx mutex.cxx misc.cxx
+ compile -library=libextras.a startup.cxx
+
+ cdl_option _POSIX_THREAD_PRIO_INHERIT {
+ display "POSIX mutex priority inheritance feature test macro"
+ flavor bool
+ default_value 1
+ requires CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT
+ description "This option defines the POSIX feature test macro
+ for supporting priority inheritance protocol in
+ mutexes."
+ }
+
+ cdl_option _POSIX_THREAD_PRIO_PROTECT {
+ display "POSIX mutex priority ceiling feature test macro"
+ flavor bool
+ default_value 1
+ requires CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+ description "This option defines the POSIX feature test macro
+ for supporting priority ceiling protocol in mutexes."
+ }
+
+ # ----------------------------------------------------------------
+ # Scheduling component
+
+ cdl_component CYGPKG_POSIX_SCHED {
+ display "POSIX scheduling configuration"
+ flavor bool
+ default_value 1
+ description "This component provides controls over scheduling
+ in POSIX."
+ requires CYGPKG_POSIX_CLOCKS
+ compile sched.cxx
+
+ cdl_option _POSIX_PRIORITY_SCHEDULING {
+ display "POSIX priority scheduling feature test macro"
+ flavor bool
+ calculated 1
+ requires CYGSEM_KERNEL_SCHED_MLQUEUE
+ description "This option defines the POSIX feature test macro
+ that indicates that priority scheduling is present.
+ This should not be undefined."
+ }
+ }
+
+ # ----------------------------------------------------------------
+ # Pthreads component
+
+ cdl_component CYGPKG_POSIX_PTHREAD {
+ display "POSIX pthread configuration"
+ flavor bool
+ default_value 1
+ description "This component provides configuration controls for
+ the POSIX pthreads package."
+ compile pthread.cxx
+ script pthread.cdl
+ }
+
+ # ----------------------------------------------------------------
+ # Timers component
+
+ cdl_option CYGPKG_POSIX_CLOCKS {
+ display "POSIX clocks"
+ flavor bool
+ default_value 1
+ implements CYGINT_ISO_POSIX_CLOCK_TYPES
+ implements CYGINT_ISO_POSIX_CLOCKS
+ implements CYGINT_ISO_POSIX_SLEEP
+ requires { CYGBLD_ISO_POSIX_CLOCK_TYPES_HEADER == \
+ "<cyg/posix/time.h>" }
+ requires { CYGBLD_ISO_POSIX_CLOCKS_HEADER == \
+ "<cyg/posix/time.h>" }
+ requires CYGPKG_KERNEL
+ requires CYGVAR_KERNEL_COUNTERS_CLOCK
+ compile time.cxx
+ description "This component provides configuration controls for
+ the POSIX clocks."
+ }
+
+ # ----------------------------------------------------------------
+ # Timers component
+
+ cdl_option CYGPKG_POSIX_TIMERS {
+ display "POSIX timers"
+ flavor bool
+ default_value 1
+ implements CYGINT_ISO_POSIX_TIMER_TYPES
+ implements CYGINT_ISO_POSIX_TIMERS
+ implements CYGINT_ISO_POSIX_TIMER_OPS
+ requires { CYGBLD_ISO_POSIX_TIMER_TYPES_HEADER == \
+ "<cyg/posix/time.h>" }
+ requires { CYGBLD_ISO_POSIX_TIMERS_HEADER == \
+ "<cyg/posix/time.h>" }
+ requires CYGPKG_KERNEL
+ requires CYGVAR_KERNEL_COUNTERS_CLOCK
+ requires CYGPKG_POSIX_PTHREAD
+ requires CYGPKG_POSIX_CLOCKS
+ requires CYGPKG_POSIX_SIGNALS
+ description "This component provides configuration controls for
+ the POSIX timers."
+ }
+
+ # ----------------------------------------------------------------
+ # Semaphores component
+
+ cdl_option CYGPKG_POSIX_SEMAPHORES {
+ display "POSIX semaphores"
+ flavor bool
+ default_value 1
+ implements CYGINT_ISO_SEMAPHORES
+ requires { CYGBLD_ISO_SEMAPHORES_HEADER == \
+ "<cyg/posix/semaphore.h>" }
+ description "This component provides configuration controls for
+ POSIX semaphores."
+
+ compile sem.cxx
+ }
+
+ # ----------------------------------------------------------------
+ # Message queues component
+
+ cdl_component CYGPKG_POSIX_MQUEUES {
+ display "POSIX message queues"
+ flavor bool
+ default_value 1
+ implements CYGINT_ISO_MQUEUE
+ requires CYGPKG_KERNEL
+ requires CYGINT_ISO_MALLOC
+ requires CYGINT_ISO_ERRNO
+ requires CYGINT_ISO_STRING_STRFUNCS
+ description "This component provides configuration controls for
+ POSIX message queues."
+
+ cdl_option CYGNUM_POSIX_MQUEUE_OPEN_MAX {
+ display "Maximum number of message queues"
+ flavor data
+ default_value 8
+ legal_values 1 to 999999
+ }
+
+ cdl_option CYGIMP_POSIX_MQUEUE_VALIDATE_DESCRIPTOR {
+ display "Validate queue descriptors"
+ flavor bool
+ default_value 1
+ description "
+ This option turns on checking that message queue descriptors
+ (of type mqd_t) passed into mq_* functions are valid. If so,
+ the functions will fail with EBADF, as POSIX 1003.1 mandates.
+ If this option is disabled, if an invalid descriptor is used,
+ random corruption may occur, or the system may crash. If
+ you are confident invalid descriptors will not be used,
+ you may wish to be disable this to save some per-instance
+ memory and execution time."
+ }
+
+ cdl_option CYGFUN_POSIX_MQUEUE_NOTIFY {
+ display "Allow empty queue notification"
+ flavor bool
+ requires CYGPKG_POSIX_SIGNALS
+ default_value CYGPKG_POSIX_SIGNALS
+ description "
+ Enabling this option adds the function mq_notify() to the
+ API. Without it, some code and per-message queue descriptor
+ space is saved, as well as no longer requiring POSIX realtime
+ signal support."
+ }
+ }
+
+ # ----------------------------------------------------------------
+ # Signals component
+
+ cdl_component CYGPKG_POSIX_SIGNALS {
+ display "POSIX signals configuration"
+ flavor bool
+ default_value 1
+ requires CYGPKG_KERNEL_EXCEPTIONS
+ requires CYGPKG_POSIX_PTHREAD
+ requires CYGPKG_POSIX_TIMERS
+ implements CYGINT_POSIX_REALTIME_SIGNALS
+ implements CYGINT_ISO_SIGSETJMP
+ requires { CYGBLD_ISO_SIGSETJMP_HEADER == \
+ "<cyg/posix/sigsetjmp.h>" }
+ implements CYGINT_ISO_SIGNAL_NUMBERS
+ implements CYGINT_ISO_SIGNAL_IMPL
+ requires { CYGBLD_ISO_SIGNAL_NUMBERS_HEADER == \
+ "<cyg/posix/signal.h>" }
+ requires { CYGBLD_ISO_SIGNAL_IMPL_HEADER == \
+ "<cyg/posix/signal.h>" }
+ description "This component provides configuration controls for
+ the POSIX signals."
+ compile signal.cxx except.cxx
+ }
+
+ # ----------------------------------------------------------------
+ # uname structure component
+
+ cdl_component CYGPKG_POSIX_UTSNAME {
+ display "POSIX utsname configuration"
+ flavor bool
+ default_value 1
+ requires { CYGBLD_ISO_UTSNAME_HEADER == \
+ "<cyg/posix/utsname.h>" }
+ description "This component provides configuration controls for
+ the POSIX utsname structure and the uname() function."
+
+ cdl_option CYG_POSIX_UTSNAME_LENGTH {
+ display "Length of name strings in utsname structure"
+ flavor data
+ default_value 65
+ legal_values 1 to 99999999
+ }
+
+ cdl_option CYG_POSIX_UTSNAME_NODENAME_LENGTH {
+ display "Length of nodename string in utsname structure"
+ flavor data
+ default_value { CYG_POSIX_UTSNAME_LENGTH }
+ legal_values 1 to 99999999
+ }
+
+ }
+
+ # ----------------------------------------------------------------
+ # Tests
+
+ cdl_option CYGPKG_POSIX_TESTS {
+ display "POSIX tests"
+ flavor data
+ no_define
+ calculated {
+ "tests/pthread1 tests/pthread2 tests/pthread3 tests/mutex3 tests/mqueue2"
+ . ((CYGPKG_POSIX_SIGNALS) ? " tests/mqueue1 tests/signal1 tests/signal2 tests/signal3 tests/sigsetjmp tests/timer1 tests/tm_basic" : "")
+ }
+ description "
+ This option specifies the set of tests for the POSIX package."
+ }
+
+}
+
+# ====================================================================
+# End of posix.cdl
+
+
diff --git a/cesar/ecos/packages/compat/posix/current/cdl/pthread.cdl b/cesar/ecos/packages/compat/posix/current/cdl/pthread.cdl
new file mode 100644
index 0000000000..d170356f93
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/cdl/pthread.cdl
@@ -0,0 +1,197 @@
+# ====================================================================
+#
+# pthread.cdl
+#
+# POSIX pthread configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): nickg
+# Contributors: jlarmour
+# Date: 2000-3-28
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_option CYGPKG_POSIX_PTHREAD_REQUIREMENTS {
+ display "Generic requirements of pthread package"
+ flavor bool
+ calculated 1
+ implements CYGINT_ISO_PTHREADTYPES
+ implements CYGINT_ISO_PTHREAD_IMPL
+ requires CYGPKG_POSIX_SCHED
+ requires CYGSEM_KERNEL_SCHED_TIMESLICE_ENABLE
+ requires CYGSEM_KERNEL_SCHED_ASR_SUPPORT
+ requires CYGSEM_KERNEL_SCHED_ASR_GLOBAL
+ requires !CYGSEM_KERNEL_SCHED_ASR_DATA_GLOBAL
+ requires CYGFUN_KERNEL_THREADS_STACK_LIMIT
+ requires { CYGBLD_ISO_PTHREADTYPES_HEADER == \
+ "<cyg/posix/types.h>" }
+ requires { CYGBLD_ISO_PTHREAD_IMPL_HEADER == \
+ "<cyg/posix/pthread.h>" }
+ description "This option exists merely to carry the pthread
+ package requirements."
+
+}
+
+# ====================================================================
+
+cdl_component CYGPKG_POSIX_PTHREAD_VALUES {
+ display "Constant values used in pthread package"
+ flavor bool
+ calculated 1
+ description "These are values that are either configurable, or derived
+ from system parameters."
+
+ cdl_option CYGNUM_POSIX_PTHREAD_DESTRUCTOR_ITERATIONS {
+ display "Maximum number of iterations of key destructors"
+ flavor data
+ legal_values 4 to 100
+ default_value 4
+ description "Maximum number of iterations of key destructors allowed."
+ }
+
+ cdl_option CYGNUM_POSIX_PTHREAD_KEYS_MAX {
+ display "Maximum number of per-thread data keys allowed"
+ flavor data
+ legal_values 128 to 65535
+ default_value 128
+ description "Number of per-thread data keys supported."
+ }
+
+ cdl_option CYGNUM_POSIX_PTHREAD_THREADS_MAX {
+ display "Maximum number of threads allowed"
+ flavor data
+ legal_values 64 to 1024
+ default_value 64
+ description "Maximum number of threads supported."
+ }
+
+}
+
+# ====================================================================
+
+cdl_component CYGPKG_POSIX_PTHREAD_FEATURES {
+ display "Fixed Feature test macros for POSIX"
+ flavor bool
+ calculated 1
+ description "These options define POSIX feature test macros that
+ describe the eCos implementation of pthreads. These
+ are not changeable configuration options."
+
+ cdl_option _POSIX_THREADS {
+ display "POSIX thread support feature test macro"
+ flavor bool
+ calculated 1
+ requires CYGSEM_KERNEL_SCHED_TIMESLICE
+ requires CYGVAR_KERNEL_THREADS_DATA
+ description "This option defines the POSIX feature test macro
+ for thread support."
+ }
+
+ cdl_option _POSIX_THREAD_PRIORITY_SCHEDULING {
+ display "POSIX thread priority scheduling feature test macro"
+ flavor bool
+ calculated 1
+ requires CYGSEM_KERNEL_SCHED_MLQUEUE
+ requires _POSIX_THREADS
+ description "This option defines the POSIX feature test macro
+ for thread priority scheduling support."
+ }
+
+ cdl_option _POSIX_THREAD_ATTR_STACKADDR {
+ display "POSIX stack address attribute feature test macro"
+ flavor bool
+ calculated 1
+ description "This option defines the POSIX feature test macro
+ for supporting the thread stack address in the thread
+ attribute object."
+ }
+
+ cdl_option _POSIX_THREAD_ATTR_STACKSIZE {
+ display "POSIX stack size attribute feature test macro"
+ flavor bool
+ calculated 1
+ description "This option defines the POSIX feature test macro
+ for supporting the thread stack size in the thread
+ attribute object."
+ }
+
+ cdl_option _POSIX_THREAD_PROCESS_SHARED {
+ display "POSIX process shared attribute feature test macro"
+ flavor bool
+ calculated 0
+ description "This option defines the POSIX feature test macro
+ for supporting process shared mutexes. Since eCos
+ does not have processes, this attribute is undefined."
+ }
+
+}
+
+# ====================================================================
+
+cdl_component CYGPKG_POSIX_MAIN_THREAD {
+ display "Main thread configuration"
+ flavor bool
+ calculated 1
+ requires { 0 != CYGPKG_LIBC_STARTUP }
+ requires CYGSEM_LIBC_STARTUP_MAIN_OTHER
+ implements CYGINT_LIBC_STARTUP_EXTERNAL_INVOKE_MAIN_POSSIBLE
+ description "These options control the thread used to
+ run the main() application entry routine."
+
+ cdl_option CYGNUM_POSIX_MAIN_DEFAULT_PRIORITY {
+ display "main()'s default thread priority"
+ flavor data
+ legal_values 0 to 31
+ default_value 16
+ description "
+ POSIX compatibility requires that the application's
+ main() function be invoked in a thread.
+ This option controls the priority of that thread. This
+ priority is the POSIX priority and is NOT the same as
+ an eCos thread priority. With POSIX thread priorities,
+ lower numbers are lower priority, and higher numbers are
+ higher priority."
+ }
+}
+
+# ====================================================================
+# End of pthread.cdl
+
+
diff --git a/cesar/ecos/packages/compat/posix/current/doc/posix.sgml b/cesar/ecos/packages/compat/posix/current/doc/posix.sgml
new file mode 100644
index 0000000000..3434a81f2d
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/doc/posix.sgml
@@ -0,0 +1,1568 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- posix.sgml -->
+<!-- -->
+<!-- POSIX Compatibility -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part id="posix-compatibility">
+<title>eCos POSIX compatibility layer</title>
+
+<chapter id="posix-standard-support">
+<title>POSIX Standard Support</title>
+
+<!-- {{{ Intro -->
+
+ <para>
+ eCos contains support for the POSIX Specification (ISO&sol;IEC
+ 9945-1)&lsqb;POSIX&rsqb;.
+ </para>
+ <para>
+ POSIX support is divided between the POSIX and the FILEIO
+ packages. The POSIX package provides support for threads,
+ signals, synchronization, timers and message queues. The FILEIO
+ package provides support for file and device I&sol;O. The two
+ packages may be used together or separately, depending on
+ configuration.
+ </para>
+ <para>
+ This document takes a functional approach to the POSIX
+ library. Support for a function implies that the data types and
+ definitions necessary to support that function, and the objects
+ it manipulates, are also defined. Any exceptions to this are
+ noted, and unless otherwise noted, implemented functions behave
+ as specified in the POSIX standard.
+ </para>
+ <para>
+ This document only covers the differences between the eCos
+ implementation and the standard; it does not provide complete
+ documentation. For full information, see the POSIX standard
+ &lsqb;POSIX&rsqb;. Online, the Open Group Single Unix
+ Specification &lsqb;SUS2&rsqb; provides complete documentation
+ of a superset of POSIX. If you have access to a Unix system with
+ POSIX compatibility, then the manual pages for this will be of
+ use. There are also a number of books available.
+ &lsqb;Lewine&rsqb; covers the process, signal, file and I&sol;O
+ functions, while &lsqb;Lewis1&rsqb;, &lsqb;Lewis2&rsqb;,
+ &lsqb;Nichols&rsqb; and &lsqb;Norton&rsqb; cover Pthreads and
+ related topics (see Bibliography, xref). However, many of these
+ books are oriented toward using POSIX in non-embedded systems,
+ so care should be taken in applying them to programming under
+ eCos.
+ </para>
+ <para>
+ The remainder of this chapter broadly follows the structure
+ of the POSIX Specification. References to the appropriate
+ section of the Standard are included.
+ </para>
+ <para>
+ Omitted functions marked with &ldquo;&sol;&sol; TBA&rdquo;
+ are potential candidates for later implementation.
+ </para>
+
+<!-- }}} -->
+<!-- {{{ Process Primitives -->
+
+<sect1 id="posix-process-primitives">
+<title>Process Primitives &lsqb;POSIX Section 3&rsqb;</title>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Implemented</title>
+
+<screen>
+int kill(pid&lowbar;t pid, int sig);
+int pthread&lowbar;kill(pthread&lowbar;t thread, int sig);
+int sigaction(int sig, const struct sigaction &ast;act,
+ struct sigaction &ast;oact);
+int sigqueue(pid&lowbar;t pid, int sig, const union sigval value);
+int sigprocmask(int how, const sigset&lowbar;t &ast;set,
+ sigset&lowbar;t &ast;oset);
+int pthread&lowbar;sigmask(int how, const sigset&lowbar;t &ast;set,
+ sigset&lowbar;t &ast;oset);
+int sigpending(sigset&lowbar;t &ast;set);
+int sigsuspend(const sigset&lowbar;t &ast;set);
+int sigwait(const sigset&lowbar;t &ast;set, int &ast;sig);
+int sigwaitinfo(const sigset&lowbar;t &ast;set, siginfo&lowbar;t &ast;info);
+int sigtimedwait(const sigset&lowbar;t &ast;set, siginfo&lowbar;t &ast;info,
+ const struct timespec &ast;timeout);
+int sigemptyset(sigset&lowbar;t &ast;set);
+int sigfillset(sigset&lowbar;t &ast;set);
+int sigaddset(sigset&lowbar;t &ast;set, int signo);
+int sigdelset(sigset&lowbar;t &ast;set, int signo);
+int sigismember(const sigset&lowbar;t &ast;set, int signo);
+unsigned int alarm( unsigned int seconds );
+int pause( void );
+unsigned int sleep( unsigned int seconds );
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Omitted</title>
+
+<screen>
+pid&lowbar;t fork(void);
+int execl( const char &ast;path, const char &ast;arg, ... );
+int execv( const char &ast;path, char &ast;const argv&lsqb;&rsqb; );
+int execle( const char &ast;path, const char &ast;arg, ... );
+int execve( const char &ast;path, char &ast;const argv&lsqb;&rsqb;,
+ char &ast;const envp&lsqb;&rsqb; );
+int execlp( const char &ast;path, const char &ast;arg, ... );
+int execvp( const char &ast;path, char &ast;const argv&lsqb;&rsqb; );
+int pthread&lowbar;atfork( void(&ast;prepare)(void),
+ void (&ast;parent)(void),
+ void (&ast;child)() );
+pid&lowbar;t wait( int &ast;stat&lowbar;loc );
+pid&lowbar;t waitpid( pid&lowbar;t pid, int &ast;stat&lowbar;loc,
+ int options );
+void &lowbar;exit( int status );
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Notes</title>
+<itemizedlist>
+ <listitem>
+ <para>
+ Signal handling may be enabled or disabled with the
+ CYGPKG&lowbar;POSIX&lowbar;SIGNALS option. Since signals are used
+ by other POSIX components, such as timers, disabling signals will
+ disable those components too.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis>kill()</emphasis> and
+ <emphasis>sigqueue()</emphasis> may only take a
+ <emphasis role="strong">pid</emphasis> argument of zero,
+ which maps to the current process.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ The <emphasis>SIGEV&lowbar;THREAD</emphasis> notification type is
+ not currently implemented.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Job Control and Memory Protection signals are
+ not supported.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ An extra implementation defined
+ <emphasis>si&lowbar;code</emphasis> value,
+ <emphasis>SI&lowbar;EXCEPT</emphasis>, is defined to
+ distinguish hardware generated exceptions from
+ others.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Extra signals are defined:
+ &lowbar;SIGTRAP&lowbar;,&lowbar;SIGIOT&lowbar;,
+ &lowbar;SIGEMT&lowbar;, and &lowbar;SIGSYS&lowbar;. These are
+ largely to maintain compatibility with the signal numbers used by
+ GDB.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Signal delivery may currently occur at unexpected places in some
+ API functions. Using <emphasis>longjmp()</emphasis> to transfer
+ control out of a signal handler may result in the interrupted
+ function not being able to complete properly. This may result in
+ later function calls failing or deadlocking.
+ </para>
+ </listitem>
+</itemizedlist>
+</sect2>
+
+
+</sect1>
+
+<!-- }}} -->
+<!-- {{{ Process Environment -->
+
+<sect1 id="posix-process-environment">
+<title>Process Environment &lsqb;POSIX Section 4&rsqb;</title>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Implemented</title>
+
+<screen>
+int uname( struct utsname &ast;name );
+time&lowbar;t time( time&lowbar;t &ast;tloc );
+char &ast;getenv( const char &ast;name );
+int isatty( int fd );
+long sysconf( int name );
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Omitted</title>
+<screen>
+pid&lowbar;t getpid( void );
+pid&lowbar;t getppid( void );
+uid&lowbar;t getuid( void );
+uid&lowbar;t geteuid( void );
+gid&lowbar;t getgid( void );
+gid&lowbar;t getegid( void );
+int setuid( uid&lowbar;t uid );
+int setgid( gid&lowbar;t gid );
+int getgroups( int gidsetsize, gid&lowbar;t grouplist&lsqb;&rsqb; );
+char &ast;getlogin( void );
+int getlogin&lowbar;r( char &ast;name, size&lowbar;t namesize );
+pid&lowbar;t getpgrp( void );
+pid&lowbar;t setsid( void );
+int setpgid( pid&lowbar;t pid, pid&lowbar;t pgid );
+char &ast;ctermid( char &ast;s);
+char &ast;ttyname( int fd ); &sol;&sol; TBA
+int ttyname&lowbar;r( int fd, char &ast;name, size&lowbar;t namesize); &sol;&sol; TBA
+clock&lowbar;t times( struct tms &ast;buffer ); &sol;&sol; TBA
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Notes</title>
+ <itemizedlist>
+ <listitem>
+ <para>The fields of the <emphasis>utsname</emphasis>
+ structure are initialized as follows:
+ <screen>
+ sysname &ldquo;eCos&rdquo;
+ nodename &ldquo;&rdquo; (gethostname() is currently not available)
+
+ release Major version number of the kernel
+ version Minor version number of the kernel
+ machine &ldquo;&rdquo; (Requires some config tool changes)
+ </screen>
+ </para>
+ <para>
+ The sizes of these strings are defined by
+ CYG&lowbar;POSIX&lowbar;UTSNAME&lowbar;LENGTH and
+ CYG&lowbar;POSIX&lowbar;UTSNAME&lowbar;NODENAME&lowbar;LENGTH. The
+ latter defaults to the value of the former, but may also
+ be set independently to accommodate a longer node name.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ The <emphasis>time()</emphasis> function is currently
+ implemented in the C library.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>A set of environment strings may be defined at configuration
+ time with the CYGDAT&lowbar;LIBC&lowbar;DEFAULT&lowbar;ENVIRONMENT
+ option. The application may also define an environment by direct
+ assignment to the <emphasis role="strong">environ</emphasis>
+ variable.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ At present <emphasis>isatty()</emphasis> assumes that
+ any character device is a tty and that all other devices are not
+ ttys. Since the only kind of device that eCos currently supports
+ is serial character devices, this is an adequate
+ distinction.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ All system variables supported by sysconf will yield a
+ value. However, those that are irrelevant to eCos will
+ either return the default minimum defined in
+ <filename>&lt;limits.h&gt;</filename>,
+ or zero.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+</sect2>
+</sect1>
+
+<!-- }}} -->
+<!-- {{{ Files and Directories -->
+
+<sect1 id="posix-files-and-directories">
+<title>Files and Directories &lsqb;POSIX Section 5&rsqb;</title>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Implemented</title>
+
+<screen>
+DIR &ast;opendir( const char &ast;dirname );
+struct dirent &ast;readdir( DIR &ast;dirp );
+int readdir&lowbar;r( DIR &ast;dirp, struct dirent &ast;entry,
+ struct dirent &ast;&ast;result );
+void rewinddir( DIR &ast;dirp );
+int closedir( DIR &ast;dirp );
+int chdir( const char &ast;path );
+char &ast;getcwd( char &ast;buf, size&lowbar;t size );
+int open( const char &ast; path , int oflag , ... );
+int creat( const char &ast; path, mode&lowbar;t mode );
+int link( const char &ast;existing, const char &ast;new );
+int mkdir( const char &ast;path, mode&lowbar;t mode );
+int unlink( const char &ast;path );
+int rmdir( const char &ast;path );
+int rename( const char &ast;old, const char &ast;new );
+int stat( const char &ast;path, struct stat &ast;buf );
+int fstat( int fd, struct stat &ast;buf );
+int access( const char &ast;path, int amode );
+long pathconf(const char &ast;path, int name);
+long fpathconf(int fd, int name);
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Omitted</title>
+
+<screen>
+mode&lowbar;t umask( mode&lowbar;t cmask );
+int mkfifo( const char &ast;path, mode&lowbar;t mode );
+int chmod( const char &ast;path, mode&lowbar;t mode ); &sol;&sol; TBA
+int fchmod( int fd, mode&lowbar;t mode ); &sol;&sol; TBA
+int chown( const char &ast;path, uid&lowbar;t owner, gid&lowbar;t group );
+int utime( const char &ast;path, const struct utimbuf &ast;times ); &sol;&sol; TBA
+int ftruncate( int fd, off&lowbar;t length ); &sol;&sol; TBA
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Notes</title>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ If a call to <function>open()</function> or <function>creat()</function> supplies
+ the third &lowbar;mode&lowbar; parameter, it will
+ currently be ignored.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Most of the functionality of these functions depends on
+ the underlying filesystem.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Currently<emphasis> access()</emphasis> only checks the
+ <emphasis>F&lowbar;OK</emphasis> mode explicitly, the others are
+ all assumed to be true by default.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The maximum number of open files allowed is supplied by
+ the CYGNUM&lowbar;FILEIO&lowbar;NFILE option. The maximum number
+ of file descriptors is supplied by the CYGNUM&lowbar;FILEIO&lowbar;NFD
+ option.
+ </para>
+ </listitem>
+ </itemizedlist>
+</sect2>
+</sect1>
+
+<!-- }}} -->
+<!-- {{{ Input and Output -->
+
+<sect1 id="posix-input-and-output">
+<title>Input and Output &lsqb;POSIX Section 6&rsqb;</title>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Implemented</title>
+
+<screen>
+int dup( int fd );
+int dup2( int fd, int fd2 );
+int close(int fd);
+ssize&lowbar;t read(int fd, void &ast;buf, size&lowbar;t nbyte);
+ssize&lowbar;t write(int fd, const void &ast;buf, size&lowbar;t nbyte);
+int fcntl( int fd, int cmd, ... );
+off&lowbar;t lseek(int fd, off&lowbar;t offset, int whence);
+int fsync( int fd );
+int fdatasync( int fd );</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Omitted</title>
+<screen>
+int pipe( int fildes&lsqb;2&rsqb; );
+int aio&lowbar;read( struct aiocb &ast;aiocbp ); &sol;&sol; TBA
+int aio&lowbar;write( struct aiocb &ast;aiocbp ); &sol;&sol; TBA
+int lio&lowbar;listio( int mode, struct aiocb &ast;const list&lsqb;&rsqb;,
+ int nent, struct sigevent &ast;sig); &sol;&sol; TBA
+int aio&lowbar;error( struct aiocb &ast;aiocbp ); &sol;&sol; TBA
+int aio&lowbar;return( struct aiocb &ast;aiocbp ); &sol;&sol; TBA
+int aio&lowbar;cancel( int fd, struct aiocb &ast;aiocbp ); &sol;&sol; TBA
+int aio&lowbar;suspend( const struct aiocb &ast;const list&lsqb;&rsqb;,
+ int nent, const struct timespec &ast;timeout ); &sol;&sol; TBA
+int aio&lowbar;fsync( int op, struct aiocb &ast;aiocbp );
+&sol;&sol; TBA
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Notes</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Only the <emphasis>F&lowbar;DUPFD</emphasis> command
+ of <emphasis>fcntl()</emphasis> is currently implemented.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Most of the functionality of these functions depends on
+ the underlying filesystem.
+ </para>
+ </listitem>
+ </itemizedlist>
+</sect2>
+</sect1>
+
+<!-- }}} -->
+<!-- {{{ Device and Class Specific Functions -->
+
+<sect1 id="posix-device-and-class-specific-functions">
+<title>Device and Class Specific Functions &lsqb;POSIX Section 7&rsqb;</title>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Implemented</title>
+<screen>
+speed&lowbar;t cfgetospeed( const struct termios &ast;termios&lowbar;p );
+int cfsetospeed( struct termios &ast;termios&lowbar;p, speed&lowbar;t speed );
+speed&lowbar;t cfgetispeed( const struct termios &ast;termios&lowbar;p );
+int cfsetispeed( struct termios &ast;termios&lowbar;p, speed&lowbar;t speed );
+int tcgetattr( int fd, struct termios &ast;termios&lowbar;p );
+int tcsetattr( int fd, int optional&lowbar;actions,
+ const struct termios &ast;termios&lowbar;p );
+int tcsendbreak( int fd, int duration );
+int tcdrain( int fd );
+int tcflush( int fd, int queue&lowbar;selector );
+int tcsendbreak( int fd, int action );
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Omitted</title>
+
+<screen>
+pid&lowbar;t tcgetpgrp( int fd );
+int tcsetpgrp( int fd, pid&lowbar;t pgrp );</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Notes</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Only the functionality relevant to basic serial device
+ control is implemented. Only very limited support for
+ canonical input is provided, and then only via the
+ &ldquo;tty&rdquo; devices, not the &ldquo;serial&rdquo;
+ devices. None of the functionality relevant to job
+ control, controlling terminals and sessions is
+ implemented.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Only <emphasis>MIN</emphasis> &equals; 0 and
+ <emphasis>TIME</emphasis> &equals; 0 functionality is
+ provided.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Hardware flow control is supported if the underlying
+ device driver and serial port support it.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Support for break, framing and parity errors depends on
+ the functionality of the hardware and device driver.
+ </para>
+ </listitem>
+ </itemizedlist>
+</sect2>
+</sect1>
+
+<!-- }}} -->
+<!-- {{{ C Language Services -->
+
+<sect1 id="posix-C-language-services">
+<title>C Language Services &lsqb;POSIX Section 8&rsqb;</title>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Implemented</title>
+<screen>
+char &ast;setlocale( int category, const char &ast;locale );
+int fileno( FILE &ast;stream );
+FILE &ast;fdopen( int fd, const char &ast;type );
+int getc&lowbar;unlocked( FILE &ast;stream);
+int getchar&lowbar;unlocked( void );
+int putc&lowbar;unlocked( FILE &ast;stream );
+int putchar&lowbar;unlocked( void );
+char &ast;strtok&lowbar;r( char &ast;s, const char &ast;sep,
+ char &ast;&ast;lasts );
+char &ast;asctime&lowbar;r( const struct tm &ast;tm, char &ast;buf );
+char &ast;ctime&lowbar;r( const time&lowbar;t &ast;clock, char &ast;buf );
+struct tm &ast;gmtime&lowbar;r( const time&lowbar;t &ast;clock,
+ struct tm &ast;result );
+struct tm &ast;localtime&lowbar;r( const time&lowbar;t &ast;clock,
+ struct tm &ast;result );
+int rand&lowbar;r( unsigned int &ast;seed );
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Omitted</title>
+<screen>
+void flockfile( FILE &ast;file );
+int ftrylockfile( FILE &ast;file );
+void funlockfile( FILE &ast;file );
+int sigsetjmp( sigjmp&lowbar;buf env, int savemask ); &sol;&sol; TBA
+void siglongjmp( sigjmp&lowbar;buf env, int val ); &sol;&sol; TBA
+void tzset(void); &sol;&sol; TBA
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Notes</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>setlocale()</emphasis> is implemented in the C
+ library Internationalization package.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Functions <emphasis>fileno()</emphasis> and
+ <emphasis>fdopen()</emphasis> are implemented in the C
+ library STDIO package.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Functions <emphasis>getc&lowbar;unlocked()</emphasis>,
+ <emphasis>getchar&lowbar;unlocked()</emphasis>,
+ <emphasis>putc&lowbar;unlocked()</emphasis> and
+ <emphasis>putchar&lowbar;unlocked()</emphasis> are defined
+ but are currently identical to their non-unlocked
+ equivalents.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>strtok&lowbar;r()</emphasis>, <emphasis>asctime&lowbar;r()</emphasis>,
+ <emphasis>ctime&lowbar;r()</emphasis>, <emphasis>gmtime&lowbar;r()</emphasis>,
+ <emphasis>localtime&lowbar;r()</emphasis> and
+ <emphasis>rand&lowbar;r()</emphasis> are all currently in
+ the C library, alongside their non-reentrant versions.
+ </para>
+ </listitem>
+ </itemizedlist>
+</sect2>
+</sect1>
+
+<!-- }}} -->
+<!-- {{{ System Databases -->
+
+<sect1 id="posix-system-databases">
+<title>System Databases &lsqb;POSIX Section 9&rsqb;</title>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Implemented</title>
+
+<para>
+&lt;none&gt;
+</para>
+
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Omitted</title>
+
+<screen>
+struct group &ast;getgrgid( gid&lowbar;t gid );
+int getgrgid( gid&lowbar;t gid, struct group &ast;grp, char &ast;buffer,
+ size&lowbar;t bufsize, struct group &ast;&ast;result );
+struct group &ast;getgrname( const char &ast;name );
+int getgrname&lowbar;r( const char &ast;name, struct group &ast;grp,
+ char &ast;buffer, size&lowbar;t bufsize, struct group &ast;&ast;result );
+struct passwd &ast;getpwuid( uid&lowbar;t uid );
+int getpwuid&lowbar;r( uid&lowbar;t uid, struct passwd &ast;pwd,
+ char &ast;buffer, size&lowbar;t bufsize, struct passwd &ast;&ast;result );
+struct passwd &ast;getpwnam( const char &ast;name );
+int getpwnam&lowbar;r( const char &ast;name, struct passwd &ast;pwd,
+ char &ast;buffer, size&lowbar;t bufsize, struct passwd &ast;&ast;result );
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Notes</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ None of the functions in this section are implemented.
+ </para>
+ </listitem>
+ </itemizedlist>
+</sect2>
+</sect1>
+
+<!-- }}} -->
+<!-- {{{ Data Interchange Format -->
+
+<sect1 id="posix-data-interchange-format">
+<title>Data Interchange Format &lsqb;POSIX Section 10&rsqb;</title>
+
+<para>
+This section details <emphasis>tar</emphasis> and
+<emphasis>cpio</emphasis> formats. Neither of these is supported by
+eCos.
+</para>
+</sect1>
+
+<!-- }}} -->
+<!-- {{{ Synchronization -->
+
+<sect1 id="posix-synchronization">
+<title>Synchronization &lsqb;POSIX Section 11&rsqb;</title>
+
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Implemented</title>
+
+<screen>
+int sem&lowbar;init(sem&lowbar;t &ast;sem, int pshared, unsigned int value);
+int sem&lowbar;destroy(sem&lowbar;t &ast;sem);
+int sem&lowbar;wait(sem&lowbar;t &ast;sem);
+int sem&lowbar;trywait(sem&lowbar;t &ast;sem);
+int sem&lowbar;post(sem&lowbar;t &ast;sem);
+int sem&lowbar;getvalue(sem&lowbar;t &ast;sem, int &ast;sval);
+int pthread&lowbar;mutexattr&lowbar;init( pthread&lowbar;mutexattr&lowbar;t &ast;attr);
+int pthread&lowbar;mutexattr&lowbar;destroy( pthread&lowbar;mutexattr&lowbar;t &ast;attr);
+int pthread&lowbar;mutex&lowbar;init(pthread&lowbar;mutex&lowbar;t &ast;mutex,
+ const pthread&lowbar;mutexattr&lowbar;t &ast;mutex&lowbar;attr);
+int pthread&lowbar;mutex&lowbar;destroy(pthread&lowbar;mutex&lowbar;t &ast;mutex);
+int pthread&lowbar;mutex&lowbar;lock(pthread&lowbar;mutex&lowbar;t &ast;mutex);
+int pthread&lowbar;mutex&lowbar;trylock(pthread&lowbar;mutex&lowbar;t &ast;mutex);
+int pthread&lowbar;mutex&lowbar;unlock(pthread&lowbar;mutex&lowbar;t &ast;mutex);
+int pthread&lowbar;condattr&lowbar;init(pthread&lowbar;condattr&lowbar;t &ast;attr);
+int pthread&lowbar;condattr&lowbar;destroy(pthread&lowbar;condattr&lowbar;t &ast;attr);
+int pthread&lowbar;cond&lowbar;init(pthread&lowbar;cond&lowbar;t &ast;cond,
+ const pthread&lowbar;condattr&lowbar;t &ast;attr);
+int pthread&lowbar;cond&lowbar;destroy(pthread&lowbar;cond&lowbar;t &ast;cond);
+int pthread&lowbar;cond&lowbar;signal(pthread&lowbar;cond&lowbar;t &ast;cond);
+int pthread&lowbar;cond&lowbar;broadcast(pthread&lowbar;cond&lowbar;t &ast;cond);
+int pthread&lowbar;cond&lowbar;wait(pthread&lowbar;cond&lowbar;t &ast;cond,
+ pthread&lowbar;mutex&lowbar;t &ast;mutex);
+int pthread&lowbar;cond&lowbar;timedwait(pthread&lowbar;cond&lowbar;t &ast;cond,
+ pthread&lowbar;mutex&lowbar;t &ast;mutex,
+ const struct timespec &ast;abstime);
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Omitted</title>
+
+<screen>
+sem&lowbar;t &ast;sem&lowbar;open(const char &ast;name, int oflag, ...); &sol;&sol; TBA
+int sem&lowbar;close(sem&lowbar;t &ast;sem); &sol;&sol; TBA
+int sem&lowbar;unlink(const char &ast;name); &sol;&sol; TBA
+int pthread&lowbar;mutexattr&lowbar;getpshared( const pthread&lowbar;mutexattr&lowbar;t &ast;attr,
+ int &ast;pshared );
+int pthread&lowbar;mutexattr&lowbar;setpshared( const pthread&lowbar;mutexattr&lowbar;t &ast;attr,
+ int pshared );
+int pthread&lowbar;condattr&lowbar;getpshared( const pthread&lowbar;condattr&lowbar;t &ast;attr,
+ int &ast;pshared);
+int pthread&lowbar;condattr&lowbar;setpshared( const pthread&lowbar;condattr&lowbar;t &ast;attr,
+ int pshared);</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Notes</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The presence of semaphores is controlled by the
+ CYGPKG&lowbar;POSIX&lowbar;SEMAPHORES option. This in turn
+ causes the &lowbar;POSIX&lowbar;SEMAPHORES feature test
+ macro to be defined and the semaphore API to be made
+ available.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ The <emphasis role="strong">pshared</emphasis> argument to
+ <emphasis>sem&lowbar;init()</emphasis> is not implemented,
+ its value is ignored.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Functions <emphasis>sem&lowbar;open()</emphasis>,
+ <emphasis>sem&lowbar;close()</emphasis> and
+ <emphasis>sem&lowbar;unlink()</emphasis> are present but
+ always return an error (ENOSYS).
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ The exact priority inversion protocols supported may be
+ controlled with the
+ &lowbar;POSIX&lowbar;THREAD&lowbar;PRIO&lowbar;INHERIT and
+ &lowbar;POSIX&lowbar;THREAD&lowbar;PRIO&lowbar;PROTECT
+ configuration options.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ &lcub;&lowbar;POSIX&lowbar;THREAD&lowbar;PROCESS&lowbar;SHARED&rcub; is
+ not defined, so the
+ <emphasis role="strong">process-shared</emphasis> mutex
+ and condition variable attributes are not supported, and
+ neither are the functions
+ <emphasis>pthread&lowbar;mutexattr&lowbar;getpshared()</emphasis>,
+ <emphasis>pthread&lowbar;mutexattr&lowbar;setpshared()</emphasis>,
+ <emphasis>pthread&lowbar;condattr&lowbar;getpshared()</emphasis> and
+ <emphasis>pthread&lowbar;condattr&lowbar;setpshared()</emphasis>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Condition variables do not become bound to a particular
+ mutex when
+ <emphasis>pthread&lowbar;cond&lowbar;wait()</emphasis> is
+ called. Hence different threads may wait on a condition
+ variable with different mutexes. This is at variance with
+ the standard, which requires a condition variable to
+ become (dynamically) bound by the first waiter, and
+ unbound when the last finishes. However, this difference
+ is largely benign, and the cost of policing this feature
+ is non-trivial.
+ </para>
+ </listitem>
+ </itemizedlist>
+</sect2>
+</sect1>
+
+<!-- }}} -->
+<!-- {{{ Memory Management -->
+
+<sect1 id="posix-memory-management">
+<title>Memory Management &lsqb;POSIX Section 12&rsqb;</title>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Implemented</title>
+
+<para>
+&lt;none&gt;
+</para>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Omitted</title>
+
+<screen>
+int mlockall( int flags );
+int munlockall( void );
+int mlock( const void &ast;addr, size&lowbar;t len );
+int munlock( const void &ast;addr, size&lowbar;t len );
+void mmap( void &ast;addr, size&lowbar;t len, int prot, int flags,
+ int fd, off&lowbar;t off );
+int munmap( void &ast;addr, size&lowbar;t len );
+int mprotect( const void &ast;addr, size&lowbar;t len, int prot );
+int msync( void &ast;addr, size&lowbar;t len, int flags );
+int shm&lowbar;open( const char &ast;name, int oflag, mode&lowbar;t mode );
+int shm&lowbar;unlink( const char &ast;name );
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Notes</title>
+<para>
+None of these functions are currently provided. Some may
+be implemented in a restricted form in the future.
+</para>
+
+</sect2>
+</sect1>
+
+<!-- }}} -->
+<!-- {{{ Execution Scheduling -->
+
+<sect1 id="posix-execution-scheduling">
+<title>Execution Scheduling &lsqb;POSIX Section 13&rsqb;</title>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Implemented</title>
+
+<screen>
+int sched&lowbar;yield(void);
+int sched&lowbar;get&lowbar;priority&lowbar;max(int policy);
+int sched&lowbar;get&lowbar;priority&lowbar;min(int policy);
+int sched&lowbar;rr&lowbar;get&lowbar;interval(pid&lowbar;t pid, struct timespec &ast;t);
+int pthread&lowbar;attr&lowbar;setscope(pthread&lowbar;attr&lowbar;t &ast;attr, int scope);
+int pthread&lowbar;attr&lowbar;getscope(const pthread&lowbar;attr&lowbar;t &ast;attr, int &ast;scope);
+int pthread&lowbar;attr&lowbar;setinheritsched(pthread&lowbar;attr&lowbar;t &ast;attr, int inherit);
+int pthread&lowbar;attr&lowbar;getinheritsched(const pthread&lowbar;attr&lowbar;t &ast;attr, int &ast;inherit);
+int pthread&lowbar;attr&lowbar;setschedpolicy(pthread&lowbar;attr&lowbar;t &ast;attr, int policy);
+int pthread&lowbar;attr&lowbar;getschedpolicy(const pthread&lowbar;attr&lowbar;t &ast;attr, int &ast;policy);
+int pthread&lowbar;attr&lowbar;setschedparam( pthread&lowbar;attr&lowbar;t &ast;attr, const struct sched&lowbar;param &ast;param);
+int pthread&lowbar;attr&lowbar;getschedparam( const pthread&lowbar;attr&lowbar;t &ast;attr,
+ struct sched&lowbar;param &ast;param);
+int pthread&lowbar;setschedparam(pthread&lowbar;t thread, int policy,
+ const struct sched&lowbar;param &ast;param);
+int pthread&lowbar;getschedparam(pthread&lowbar;t thread, int &ast;policy,
+ struct sched&lowbar;param &ast;param);
+int pthread&lowbar;mutexattr&lowbar;setprotocol( pthread&lowbar;mutexattr&lowbar;t &ast;attr,
+ int protocol);
+int pthread&lowbar;mutexattr&lowbar;getprotocol( pthread&lowbar;mutexattr&lowbar;t &ast;attr,
+ int &ast;protocol);
+int pthread&lowbar;mutexattr&lowbar;setprioceiling( pthread&lowbar;mutexattr&lowbar;t &ast;attr,
+ int prioceiling);
+int pthread&lowbar;mutexattr&lowbar;getprioceiling( pthread&lowbar;mutexattr&lowbar;t &ast;attr,
+ int &ast;prioceiling);
+int pthread&lowbar;mutex&lowbar;setprioceiling( pthread&lowbar;mutex&lowbar;t &ast;mutex,
+ int prioceiling,
+ int &ast;old&lowbar;ceiling);
+int pthread&lowbar;mutex&lowbar;getprioceiling( pthread&lowbar;mutex&lowbar;t &ast;mutex,
+ int &ast;prioceiling);
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Omitted</title>
+
+<screen>
+int sched&lowbar;setparam(pid&lowbar;t pid, const struct sched&lowbar;param &ast;param);
+int sched&lowbar;getparam(pid&lowbar;t pid, struct sched&lowbar;param &ast;param);
+int sched&lowbar;setscheduler(pid&lowbar;t pid, int policy,
+ const struct sched&lowbar;param &ast;param);
+int sched&lowbar;getscheduler(pid&lowbar;t pid);
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Notes</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The functions <emphasis>sched&lowbar;setparam()</emphasis>,
+ <emphasis>sched&lowbar;getparam()</emphasis>,
+ <emphasis>sched&lowbar;setscheduler()</emphasis> and
+ <emphasis>sched&lowbar;getscheduler()</emphasis> are present
+ but always return an error.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The scheduler policy <emphasis>SCHED&lowbar;OTHER</emphasis> is
+ equivalent to <emphasis>SCHED&lowbar;RR</emphasis>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Only <emphasis>PTHREAD&lowbar;SCOPE&lowbar;SYSTEM</emphasis>
+ is supported as a
+ <emphasis role="strong">contentionscope</emphasis>
+ attribute.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The default thread scheduling attributes are:
+ <screen>
+ contentionscope PTHREAD&lowbar;SCOPE&lowbar;SYSTEM
+ inheritsched PTHREAD&lowbar;INHERIT&lowbar;SCHED
+ schedpolicy SCHED&lowbar;OTHER
+ schedparam.sched 0
+ </screen>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Mutex priority inversion protection is controlled by a
+ number of kernel configuration options.
+ If CYGSEM&lowbar;KERNEL&lowbar;SYNCH&lowbar;MUTEX&lowbar;PRIORITY&lowbar;INVERSION&lowbar;PROTOCOL&lowbar;INHERIT
+ is defined then
+ &lcub;&lowbar;POSIX&lowbar;THREAD&lowbar;PRIO&lowbar;INHERIT&rcub;
+ will be defined and PTHREAD&lowbar;PRIO&lowbar;INHERIT may
+ be set as the protocol in a
+ <emphasis>pthread&lowbar;mutexattr&lowbar;t</emphasis>
+ object.
+ If CYGSEM&lowbar;KERNEL&lowbar;SYNCH&lowbar;MUTEX&lowbar;PRIORITY&lowbar;INVERSION&lowbar;PROTOCOL&lowbar;CEILING
+ is defined then
+ &lcub;&lowbar;POSIX&lowbar;THREAD&lowbar;PRIO&lowbar;PROTECT&rcub;
+ will be defined and PTHREAD&lowbar;PRIO&lowbar;PROTECT may
+ be set as the protocol in a
+ <emphasis>pthread&lowbar;mutexattr&lowbar;t</emphasis> object.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The default attribute values set by
+ <emphasis>pthread&lowbar;mutexattr&lowbar;init()</emphasis>
+ is to set the protocol attribute to
+ PTHREAD&lowbar;PRIO&lowbar;NONE and the prioceiling
+ attribute to zero.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+</sect2>
+</sect1>
+
+<!-- }}} -->
+<!-- {{{ Clocks and Timers -->
+
+<sect1 id="posix-clocks-and-timers">
+<title>Clocks and Timers &lsqb;POSIX Section 14&rsqb;</title>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Implemented</title>
+
+<screen>
+int clock&lowbar;settime( clockid&lowbar;t clock&lowbar;id,
+const struct timespec &ast;tp);
+int clock&lowbar;gettime( clockid&lowbar;t clock&lowbar;id, struct timespec &ast;tp);
+int clock&lowbar;getres( clockid&lowbar;t clock&lowbar;id, struct timespec &ast;tp);
+int timer&lowbar;create( clockid&lowbar;t clock&lowbar;id, struct sigevent &ast;evp,
+ timer&lowbar;t &ast;timer&lowbar;id);
+int timer&lowbar;delete( timer&lowbar;t timer&lowbar;id );
+int timer&lowbar;settime( timer&lowbar;t timerid, int flags,
+ const struct itimerspec &ast;value,
+ struct itimerspec &ast;ovalue );
+int timer&lowbar;gettime( timer&lowbar;t timerid, struct itimerspec &ast;value );
+int timer&lowbar;getoverrun( timer&lowbar;t timerid );
+int nanosleep( const struct timespec &ast;rqtp, struct timespec &ast;rmtp);
+</screen>
+
+</sect2>
+
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Omitted</title>
+
+<para>
+&lt;none&gt;
+</para>
+
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Notes</title>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ Currently <emphasis>timer&lowbar;getoverrun()</emphasis> only
+ reports timer notifications that are delayed in the timer
+ subsystem. If they are delayed in the signal subsystem, due to
+ signal masks for example, this is not counted as an overrun.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ The option CYGPKG&lowbar;POSIX&lowbar;TIMERS allows the timer support to be
+ enabled or disabled, and causes &lowbar;POSIX&lowbar;TIMERS to be defined
+ appropriately. This will cause other parts of the POSIX system to
+ have limited functionality.
+ </para>
+ </listitem>
+
+</itemizedlist>
+
+</sect2>
+</sect1>
+
+<!-- }}} -->
+<!-- {{{ Message Passing -->
+
+<sect1 id="posix-message-passing">
+<title>Message Passing &lsqb;POSIX Section 15&rsqb;</title>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Implemented</title>
+
+<screen>
+mqd&lowbar;t mq&lowbar;open( const char &ast;name, int oflag, ... );
+int mq&lowbar;close( mqd&lowbar;t mqdes );
+int mq&lowbar;unlink( const char &ast;name );
+int mq&lowbar;send( mqd&lowbar;t mqdes, const char &ast;msg&lowbar;ptr,
+ size&lowbar;t msg&lowbar;len, unsigned int msg&lowbar;prio );
+ssize&lowbar;t mq&lowbar;receive( mqd&lowbar;t mqdes, char &ast;msg&lowbar;ptr,
+ size&lowbar;t msg&lowbar;len, unsigned int &ast;msg&lowbar;prio );
+int mq&lowbar;setattr( mqd&lowbar;t mqdes, const struct mq&lowbar;attr &ast;mqstat,
+ struct mq&lowbar;attr &ast;omqstat );
+int mq&lowbar;getattr( mqd&lowbar;t mqdes, struct mq&lowbar;attr &ast;mqstat );
+int mq&lowbar;notify( mqd&lowbar;t mqdes, const struct sigevent &ast;notification );
+</screen>
+<para>From POSIX 1003.1d draft: </para>
+<screen>
+int mq&lowbar;send( mqd&lowbar;t mqdes, const char &ast;msg&lowbar;ptr,
+ size&lowbar;t msg&lowbar;len, unsigned int msg&lowbar;prio,
+ const struct timespec *abs_timeout );
+ssize&lowbar;t mq&lowbar;receive( mqd&lowbar;t mqdes, char &ast;msg&lowbar;ptr,
+ size&lowbar;t msg&lowbar;len, unsigned int &ast;msg&lowbar;prio,
+ const struct timespec *abs_timeout );
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Omitted</title>
+
+<para>
+&lt;none&gt;
+</para>
+
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Notes</title>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ The presence of message queues is controlled by the
+ CYGPKG&lowbar;POSIX&lowbar;MQUEUES option. Setting this will
+ cause &lsqb;&lowbar;POSIX&lowbar;MESSAGE&lowbar;PASSING&rsqb; to
+ be defined and the message queue API to be made available.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Message queues are not currently filesystem objects. They live in
+ their own name and descriptor spaces.
+ </para>
+ </listitem>
+</itemizedlist>
+
+</sect2>
+</sect1>
+
+<!-- }}} -->
+<!-- {{{ Thread Management -->
+
+<sect1 id="posix-thread-management">
+<title>Thread Management &lsqb;POSIX Section 16&rsqb;</title>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Implemented</title>
+
+<screen>
+int pthread&lowbar;attr&lowbar;init(pthread&lowbar;attr&lowbar;t &ast;attr);
+int pthread&lowbar;attr&lowbar;destroy(pthread&lowbar;attr&lowbar;t &ast;attr);
+int pthread&lowbar;attr&lowbar;setdetachstate(pthread&lowbar;attr&lowbar;t &ast;attr,
+ int detachstate);
+int pthread&lowbar;attr&lowbar;getdetachstate(const pthread&lowbar;attr&lowbar;t &ast;attr,
+ int &ast;detachstate);
+int pthread&lowbar;attr&lowbar;setstackaddr(pthread&lowbar;attr&lowbar;t &ast;attr,
+ void &ast;stackaddr);
+int pthread&lowbar;attr&lowbar;getstackaddr(const pthread&lowbar;attr&lowbar;t &ast;attr,
+ void &ast;&ast;stackaddr);
+int pthread&lowbar;attr&lowbar;setstacksize(pthread&lowbar;attr&lowbar;t &ast;attr,
+ size&lowbar;t stacksize);
+int pthread&lowbar;attr&lowbar;getstacksize(const pthread&lowbar;attr&lowbar;t &ast;attr,
+ size&lowbar;t &ast;stacksize);
+int pthread&lowbar;create( pthread&lowbar;t &ast;thread,
+ const pthread&lowbar;attr&lowbar;t &ast;attr,
+ void &ast;(&ast;start&lowbar;routine)(void &ast;),
+ void &ast;arg);
+pthread&lowbar;t pthread&lowbar;self( void );
+int pthread&lowbar;equal(pthread&lowbar;t thread1, pthread&lowbar;t thread2);
+void pthread&lowbar;exit(void &ast;retval);
+int pthread&lowbar;join(pthread&lowbar;t thread, void &ast;&ast;thread&lowbar;return);
+int pthread&lowbar;detach(pthread&lowbar;t thread);
+int pthread&lowbar;once(pthread&lowbar;once&lowbar;t &ast;once&lowbar;control,
+ void (&ast;init&lowbar;routine)(void));
+</screen>
+
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Omitted</title>
+
+<para>
+&lt;none&gt;
+</para>
+
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Notes</title>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ The presence of thread support as a whole is controlled by the the
+ CYGPKG_POSIX_PTHREAD configuration option. Note that disabling
+ this will also disable many other features of the POSIX package,
+ since these are intimately bound up with the thread mechanism.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ The default (non-scheduling) thread attributes are:
+ </para>
+ <screen>
+ detachstate PTHREAD&lowbar;CREATE&lowbar;JOINABLE
+ stackaddr unset
+ stacksize unset
+ </screen>
+ </listitem>
+
+ <listitem>
+ <para>
+ Dynamic thread stack allocation is only provided if there is an
+ implementation of
+ <emphasis>malloc()</emphasis> configured (i.e. a package
+ implements the
+ CYGINT&lowbar;MEMALLOC&lowbar;MALLOC&lowbar;ALLOCATORS
+ interface). If there is no malloc() available, then the thread
+ creator must supply a stack. If only a stack address is supplied
+ then the stack is assumed to be PTHREAD&lowbar;STACK&lowbar;MIN
+ bytes long. This size is seldom useful for any but the most
+ trivial of threads. If a different sized stack is used, both
+ the stack address and stack size must be supplied.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ The value of PTHREAD&lowbar;THREADS&lowbar;MAX is supplied by
+ the CYGNUM&lowbar;POSIX&lowbar;PTHREAD&lowbar;THREADS&lowbar;MAX
+ option. This defines the maximum number of threads allowed. The
+ POSIX standard requires this value to be at least 64, and this
+ is the default value set.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ When the POSIX package is installed, the thread that calls
+ <emphasis>main()</emphasis> is initialized as a POSIX thread. The
+ priority of that thread is controlled by the
+ CYGNUM&lowbar;POSIX&lowbar;MAIN&lowbar;DEFAULT&lowbar;PRIORITY option.
+ </para>
+ </listitem>
+</itemizedlist>
+
+</sect2>
+</sect1>
+
+<!-- }}} -->
+<!-- {{{ Thread-Specific Data -->
+
+<sect1 id="posix-thread-specific-data">
+<title>Thread-Specific Data &lsqb;POSIX Section 17&rsqb;</title>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Implemented</title>
+
+<screen>
+int pthread&lowbar;key&lowbar;create(pthread&lowbar;key&lowbar;t &ast;key,
+ void (&ast;destructor)(void &ast;));
+int pthread&lowbar;setspecific(pthread&lowbar;key&lowbar;t key, const void &ast;pointer);
+void &ast;pthread&lowbar;getspecific(pthread&lowbar;key&lowbar;t key);
+int pthread&lowbar;key&lowbar;delete(pthread&lowbar;key&lowbar;t key);
+</screen>
+
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Omitted</title>
+<para>
+&lt;none&gt;
+</para>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Notes</title>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ The value of PTHREAD&lowbar;DESTRUCTOR&lowbar;ITERATIONS is
+ provided by the
+ CYGNUM&lowbar;POSIX&lowbar;PTHREAD&lowbar;DESTRUCTOR&lowbar;ITERATIONS
+ option. This controls the number of times that a key destructor
+ will be called while the data item remains non-NULL.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ The value of PTHREAD&lowbar;KEYS&lowbar;MAX is provided
+ by the CYGNUM&lowbar;POSIX&lowbar;PTHREAD&lowbar;KEYS&lowbar;MAX
+ option. This defines the maximum number of per-thread data items
+ supported. The POSIX standard calls for this to be a minimum of
+ 128, which is rather large for an embedded system. The default
+ value for this option is set to 128 for compatibility but it
+ should be reduced to a more usable value.
+ </para>
+ </listitem>
+</itemizedlist>
+
+</sect2>
+</sect1>
+
+<!-- }}} -->
+<!-- {{{ Thread Cancellation -->
+
+<sect1 id="posix-thread-cancellation">
+<title>Thread Cancellation &lsqb;POSIX Section 18&rsqb;</title>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Implemented</title>
+
+<screen>
+int pthread&lowbar;cancel(pthread&lowbar;t thread);
+int pthread&lowbar;setcancelstate(int state, int &ast;oldstate);
+int pthread&lowbar;setcanceltype(int type, int &ast;oldtype);
+void pthread&lowbar;testcancel(void);
+void pthread&lowbar;cleanup&lowbar;push( void (&ast;routine)(void &ast;),
+ void &ast;arg);
+void pthread&lowbar;cleanup&lowbar;pop( int execute);
+</screen>
+</sect2>
+
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Functions Omitted</title>
+<para>
+&lt;none&gt;
+</para>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Notes</title>
+<para>
+Asynchronous cancellation is only partially implemented. In
+particular, cancellation may occur in unexpected places in some
+functions. It is strongly recommended that only synchronous
+cancellation be used.
+</para>
+</sect2>
+</sect1>
+
+<!-- }}} -->
+<!-- {{{ Non-POSIX Functions -->
+
+<sect1 id="posix-non-posix-functions">
+<title>Non-POSIX Functions</title>
+
+<para>
+In addition to the standard POSIX functions defined above, the
+following non-POSIX functions are defined in the FILEIO package.
+</para>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>General I&sol;O Functions</title>
+<screen>
+int ioctl( int fd, CYG&lowbar;ADDRWORD com, CYG&lowbar;ADDRWORD data );
+int select( int nfd, fd&lowbar;set &ast;in, fd&lowbar;set &ast;out, fd&lowbar;set &ast;ex, struct timeval &ast;tv);
+</screen>
+</sect2>
+
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Socket Functions</title>
+<screen>
+int socket( int domain, int type, int protocol);
+int bind( int s, const struct sockaddr &ast;sa, unsigned int len);
+int listen( int s, int len);
+int accept( int s, struct sockaddr &ast;sa, socklen&lowbar;t &ast;addrlen);
+int connect( int s, const struct sockaddr &ast;sa, socklen&lowbar;t len);
+int getpeername( int s, struct sockaddr &ast;sa, socklen&lowbar;t &ast;len);
+int getsockname( int s, struct sockaddr &ast;sa, socklen&lowbar;t &ast;len);
+int setsockopt( int s, int level, int optname, const void &ast;optval,
+ socklen&lowbar;t optlen);
+int getsockopt( int s, int level, int optname, void &ast;optval,
+ socklen&lowbar;t &ast;optlen);
+ssize&lowbar;t recvmsg( int s, struct msghdr &ast;msg, int flags);
+ssize&lowbar;t recvfrom( int s, void &ast;buf, size&lowbar;t len, int flags,
+ struct sockaddr &ast;from, socklen&lowbar;t &ast;fromlen);
+ssize&lowbar;t recv( int s, void &ast;buf, size&lowbar;t len, int flags);
+ssize&lowbar;t sendmsg( int s, const struct msghdr &ast;msg, int flags);
+ssize&lowbar;t sendto( int s, const void &ast;buf, size&lowbar;t len, int flags,
+ const struct sockaddr &ast;to, socklen&lowbar;t tolen);
+ssize&lowbar;t send( int s, const void &ast;buf, size&lowbar;t len, int flags);
+int shutdown( int s, int how);
+</screen>
+</sect2>
+
+<!-- =================================================================== -->
+
+<sect2>
+<title>Notes</title>
+<itemizedlist>
+ <listitem>
+ <para>
+ The precise behaviour of these functions depends mainly on the
+ functionality of the underlying filesystem or network stack to
+ which they are applied.
+ </para>
+ </listitem>
+</itemizedlist>
+</sect2>
+</sect1>
+
+<!-- }}} -->
+
+</chapter>
+
+<!-- {{{ Bibliography -->
+
+<bibliography id="posix-references-and-bibliography">
+<title>References and Bibliography</title>
+
+ <bibliomixed>
+ <bibliomisc>&lsqb;Lewine&rsqb;</bibliomisc>
+ <author>
+ <firstname>Donald</firstname>
+ <othername>A.</othername>
+ <surname>Lweine</surname>
+ </author>
+ <title>Posix Programmer&rsquo;s Guide: Writing Portable Unix
+ Programs With the POSIX.1 Standard O&rsquo;Reilly &amp;
+ Associates; ISBN: 0937175730.</title></bibliomixed>
+
+ <bibliomixed>
+ <bibliomisc>&lsqb;Lewis1&rsqb;</bibliomisc>
+ <author>
+ <firstname>Bil</firstname>
+ <surname>Lewis</surname>
+ </author>
+ <author>
+ <firstname>Daniel</firstname>
+ <othername>J.</othername>
+ <surname>Berg</surname>
+ </author>
+ <title>Threads Primer: A Guide to Multithreaded Programming</title>
+ <publishername>Prentice Hall</publishername>
+ <isbn>ISBN: 013443698</isbn>
+ </bibliomixed>
+
+ <bibliomixed>
+ <bibliomisc>&lsqb;Lewis2&rsqb;</bibliomisc>
+ <author>
+ <firstname>Bil</firstname>
+ <surname>Lewis</surname>
+ </author>
+ <author>
+ <firstname>Daniel</firstname>
+ <othername>J.</othername>
+ <surname>Berg</surname>
+ </author>
+ <title>Multithreaded Programming With Pthreads</title>
+ <publisher>
+ <publishername>Prentice Hall Computer Books</publishername>
+ </publisher>
+ <isbn>ISBN: 0136807291</isbn>
+ </bibliomixed>
+
+ <bibliomixed>
+ <bibliomisc>&lsqb;Nichols&rsqb;</bibliomisc>
+ <author>
+ <firstname>Bradford</firstname>
+ <surname>Nichols</surname>
+ </author>
+ <author>
+ <firstname>Dick</firstname>
+ <surname>Buttlar</surname>
+ </author>
+ <author>
+ <firstname>Jacqueline</firstname>
+ <othername>Proulx</othername>
+ <surname>Farrell</surname>
+ </author>
+ <title>Pthreads Programming: A POSIX Standard for Better
+ Multiprocessing (O&rsquo;Reilly Nutshell)</title>
+ <publisher><publishername>O&rsquo;Reilly &amp; Associates</publishername>
+ </publisher>
+ <isbn>ISBN: 1565921151</isbn>
+ </bibliomixed>
+
+ <bibliomixed>
+ <bibliomisc>&lsqb;Norton&rsqb;</bibliomisc>
+ <author>
+ <firstname>Scott</firstname>
+ <othername>J.</othername>
+ <surname>Norton</surname>
+ </author>
+ <author>
+ <firstname>Mark</firstname>
+ <othername>D.</othername>
+ <surname>Depasquale</surname>
+ </author>
+ <title>Thread Time: The MultiThreaded Programming Guide</title>
+ <publisher><publishername>Prentice Hall</publishername>
+ </publisher>
+ <isbn>ISBN: 0131900676</isbn></bibliomixed>
+
+
+ <bibliomixed>
+ <bibliomisc>&lsqb;POSIX&rsqb;</bibliomisc>
+ <title>Portable Operating System Interface(POSIX) -
+Part 1: System Application Programming Interface (API)&lsqb;C
+Language&rsqb;</title>
+ <corpauthor>ISO&sol;IEC 9945-1:1996, IEEE</corpauthor></bibliomixed>
+
+ <bibliomixed>
+ <bibliomisc>&lsqb;SUS2&rsqb;</bibliomisc>
+ <title>Open Group; Single Unix Specification, Version 2</title>
+ <bibliomisc><ulink
+ url="http://www.opengroup.org/public/pubs/online/7908799/index.html">http://www.opengroup.org/public/pubs/online/7908799/index.html</ulink></bibliomisc>
+ </bibliomixed>
+
+ </bibliography>
+
+<!-- }}} -->
+
+</part>
diff --git a/cesar/ecos/packages/compat/posix/current/include/export.h b/cesar/ecos/packages/compat/posix/current/include/export.h
new file mode 100644
index 0000000000..36edf0d582
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/include/export.h
@@ -0,0 +1,114 @@
+#ifndef CYGONCE_POSIX_EXPORT_H
+#define CYGONCE_POSIX_EXPORT_H
+//=============================================================================
+//
+// export.h
+//
+// POSIX export header
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Nick Garnett
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-09-18
+// Purpose: POSIX export header
+// Description: This header contains definitions that the POSIX package exports
+// to other packages. These are generally interfaces that are not
+// provided by the public API.
+//
+//
+// Usage:
+// #ifdef CYGPKG_POSIX
+// #include <export.h>
+// #endif
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/posix.h>
+
+#include <cyg/infra/cyg_type.h>
+
+#include <stddef.h> // NULL, size_t
+
+#include <limits.h>
+#include <signal.h>
+
+#include <sys/types.h>
+
+#include <sched.h> // SCHED_*
+
+//=============================================================================
+// POSIX API function management.
+// These macros should be inserted near the start and all returns of
+// any function that is part of the POSIX API.
+
+__externC void cyg_posix_function_start();
+__externC void cyg_posix_function_finish();
+
+#define CYG_POSIX_FUNCTION_START() cyg_posix_function_start()
+
+#define CYG_POSIX_FUNCTION_FINISH() cyg_posix_function_finish()
+
+//-----------------------------------------------------------------------------
+// Signal mask management
+//
+// These are exported to allow functions in other packages to
+// manipulate the current threads signal mask. they are currently only
+// used in the implementation of cyg_pselect() in the FILEIO package.
+
+#ifdef CYGPKG_POSIX_SIGNALS
+__externC void cyg_pthread_sigmask_set (const sigset_t *set, sigset_t *oset);
+__externC cyg_bool cyg_posix_sigpending(void);
+__externC void cyg_posix_deliver_signals(const sigset_t *mask);
+
+#define CYG_PTHREAD_SIGMASK_SET cyg_pthread_sigmask_set
+
+#define CYG_POSIX_SIGPENDING() cyg_posix_sigpending()
+
+#define CYG_POSIX_DELIVER_SIGNALS cyg_posix_deliver_signals
+#endif
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_POSIX_EXPORT_H
+// End of export.h
diff --git a/cesar/ecos/packages/compat/posix/current/include/limits.h b/cesar/ecos/packages/compat/posix/current/include/limits.h
new file mode 100644
index 0000000000..2974ba1423
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/include/limits.h
@@ -0,0 +1,131 @@
+#ifndef CYGONCE_LIMITS_H
+#define CYGONCE_LIMITS_H
+//=============================================================================
+//
+// limits.h
+//
+// POSIX limits header
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-03-17
+// Purpose: POSIX limits header
+// Description: This file contains the compile time definitions that describe
+// the minima and current values of various values and defined
+// in POSIX.1 section 2.8.
+//
+// Usage:
+// #include <limits.h>
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/posix.h>
+
+//-----------------------------------------------------------------------------
+// Runtime invariants
+// These are all equal to or greater than the minimum values defined above.
+
+// From table 2-4
+
+#define NGROUPS_MAX _POSIX_NGROUPS_MAX
+
+// From table 2-5
+
+#define AIO_LISTIO_MAX _POSIX_AIO_LISTIO_MAX
+
+#define AIO_MAX _POSIX_AIO_MAX
+
+#define AIO_PRIO_DELTA_MAX 0
+
+#define ARG_MAX _POSIX_ARG_MAX
+
+#define CHILD_MAX _POSIX_CHILD_MAX
+
+#define DELAYTIMER_MAX _POSIX_DELAYTIMER_MAX
+
+#define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX
+
+#define PAGESIZE 1
+
+#define PTHREAD_DESTRUCTOR_ITERATIONS CYGNUM_POSIX_PTHREAD_DESTRUCTOR_ITERATIONS
+
+#define PTHREAD_KEYS_MAX CYGNUM_POSIX_PTHREAD_KEYS_MAX
+
+// Minimum size needed on a pthread stack to contain its per-thread control
+// structures and per-thread data. Since we cannot include all the headers
+// necessary to calculate this value here, the following is a generous estimate.
+#define PTHREAD_STACK_OVERHEAD (0x180+(PTHREAD_KEYS_MAX*sizeof(void *)))
+
+#define PTHREAD_STACK_MIN (CYGNUM_HAL_STACK_SIZE_MINIMUM+PTHREAD_STACK_OVERHEAD)
+
+#define PTHREAD_THREADS_MAX CYGNUM_POSIX_PTHREAD_THREADS_MAX
+
+#define RTSIG_MAX _POSIX_RTSIG_MAX
+
+#define SEM_NSEMS_MAX _POSIX_SEM_NSEMS_MAX
+
+#define SEM_VALUE_MAX _POSIX_SEM_VALUE_MAX
+
+#define SIGQUEUE_MAX _POSIX_SIGQUEUE_MAX
+
+#define STREAM_MAX _POSIX_STREAM_MAX
+
+#define TIMER_MAX _POSIX_TIMER_MAX
+
+#define TTY_NAME_MAX _POSIX_TTY_NAME_MAX
+
+#define TZNAME_MAX _POSIX_TZNAME_MAX
+
+
+// From table 2-6.
+
+#define MAX_CANON _POSIX_MAX_CANON
+
+#define MAX_INPUT _POSIX_MAX_INPUT
+
+#define PIPE_BUF _POSIX_PIPE_BUF
+
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_LIMITS_H
+// End of limits.h
diff --git a/cesar/ecos/packages/compat/posix/current/include/mutex.h b/cesar/ecos/packages/compat/posix/current/include/mutex.h
new file mode 100644
index 0000000000..687479e5b6
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/include/mutex.h
@@ -0,0 +1,172 @@
+#ifndef CYGONCE_POSIX_MUTEX_H
+#define CYGONCE_POSIX_MUTEX_H
+//=============================================================================
+//
+// mutex.h
+//
+// POSIX mutex and condition variable function definitions
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg,jlarmour
+// Contributors:
+// Date: 2001-09-10
+// Purpose: POSIX mutex and condition variable function definitions
+// Description: This header contains POSIX API definitions for mutexes
+// and cond vars.
+//
+// Usage: #include <pthread.h>
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/posix.h>
+
+#include <sys/types.h> // pthread_* types
+
+//=============================================================================
+// Mutexes
+
+//-----------------------------------------------------------------------------
+// Mutex attributes manipulation functions
+
+// Initialize attribute object
+externC int pthread_mutexattr_init ( pthread_mutexattr_t *attr);
+
+// Destroy attribute object
+externC int pthread_mutexattr_destroy ( pthread_mutexattr_t *attr);
+
+#if defined(_POSIX_THREAD_PRIO_INHERIT) || defined(_POSIX_THREAD_PRIO_PROTECT)
+
+// Set priority inversion protection protocol
+externC int pthread_mutexattr_setprotocol ( pthread_mutexattr_t *attr,
+ int protocol);
+
+// Get priority inversion protection protocol
+externC int pthread_mutexattr_getprotocol ( pthread_mutexattr_t *attr,
+ int *protocol);
+
+#if defined(_POSIX_THREAD_PRIO_PROTECT)
+
+// Set priority for priority ceiling protocol
+externC int pthread_mutexattr_setprioceiling ( pthread_mutexattr_t *attr,
+ int prioceiling);
+
+// Get priority for priority ceiling protocol
+externC int pthread_mutexattr_getprioceiling ( pthread_mutexattr_t *attr,
+ int *prioceiling);
+
+// Set priority ceiling of given thread, returning old ceiling.
+externC int pthread_mutex_setprioceiling( pthread_mutex_t *mutex,
+ int prioceiling,
+ int *old_ceiling);
+
+// Get priority ceiling of given thread
+externC int pthread_mutex_getprioceiling( pthread_mutex_t *mutex,
+ int *prioceiling);
+#endif
+
+#endif
+
+//-----------------------------------------------------------------------------
+// Mutex functions
+
+// Initialize mutex. If mutex_attr is NULL, use default attributes.
+externC int pthread_mutex_init (pthread_mutex_t *mutex,
+ const pthread_mutexattr_t *mutex_attr);
+
+// Destroy mutex.
+externC int pthread_mutex_destroy (pthread_mutex_t *mutex);
+
+// Lock mutex, waiting for it if necessary.
+externC int pthread_mutex_lock (pthread_mutex_t *mutex);
+
+// Try to lock mutex.
+externC int pthread_mutex_trylock (pthread_mutex_t *mutex);
+
+
+// Unlock mutex.
+externC int pthread_mutex_unlock (pthread_mutex_t *mutex);
+
+
+
+//=============================================================================
+// Condition Variables
+
+//-----------------------------------------------------------------------------
+// Attribute manipulation functions
+// We do not actually support any attributes at present, so these do nothing.
+
+// Initialize condition variable attributes
+externC int pthread_condattr_init (pthread_condattr_t *attr);
+
+// Destroy condition variable attributes
+externC int pthread_condattr_destroy (pthread_condattr_t *attr);
+
+//-----------------------------------------------------------------------------
+// Condition variable functions
+
+// Initialize condition variable.
+externC int pthread_cond_init (pthread_cond_t *cond,
+ const pthread_condattr_t *attr);
+
+// Destroy condition variable.
+externC int pthread_cond_destroy (pthread_cond_t *cond);
+
+// Wake up one thread waiting for condition variable
+externC int pthread_cond_signal (pthread_cond_t *cond);
+
+// Wake up all threads waiting for condition variable
+externC int pthread_cond_broadcast (pthread_cond_t *cond);
+
+// Block on condition variable until signalled. The mutex is
+// assumed to be locked before this call, will be unlocked
+// during the wait, and will be re-locked on wakeup.
+externC int pthread_cond_wait (pthread_cond_t *cond,
+ pthread_mutex_t *mutex);
+
+// Block on condition variable until signalled, or the timeout expires.
+externC int pthread_cond_timedwait (pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_POSIX_MUTEX_H
+// End of mutex.h
diff --git a/cesar/ecos/packages/compat/posix/current/include/muttypes.h b/cesar/ecos/packages/compat/posix/current/include/muttypes.h
new file mode 100644
index 0000000000..91ddc867dd
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/include/muttypes.h
@@ -0,0 +1,138 @@
+#ifndef CYGONCE_POSIX_MUTTYPES_H
+#define CYGONCE_POSIX_MUTTYPES_H
+//=============================================================================
+//
+// muttypes.h
+//
+// POSIX mutex types header
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg,jlarmour
+// Date: 2000-03-17
+// Purpose: POSIX types header
+// Description: This header contains POSIX type definitions for mutexes
+// and cond vars. These types are implementation defined.
+//
+// Usage: #include <sys/types.h>
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/posix.h>
+#include <pkgconf/kernel.h>
+
+#include <cyg/infra/cyg_type.h>
+
+//-----------------------------------------------------------------------------
+// Mutex object
+// This structure must exactly correspond in size and layout to the underlying
+// eCos C++ class that implements this object. Because we have to support
+// PTHREAD_MUTEX_INITIALIZER we cannot abstract this object very easily.
+
+typedef struct
+{
+ CYG_WORD32 locked;
+ CYG_ADDRESS owner;
+ CYG_ADDRESS queue;
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+ CYG_WORD32 protocol; // this mutex's protocol
+#endif
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+ CYG_WORD32 ceiling; // mutex priority ceiling
+#endif
+
+} pthread_mutex_t;
+
+#if defined(CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC) &&\
+ defined(CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING)
+#define PTHREAD_MUTEX_INITIALIZER { 0, 0, 0, 0, 0 }
+#elif defined(CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC) ||\
+ defined(CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING)
+#define PTHREAD_MUTEX_INITIALIZER { 0, 0, 0, 0 }
+#else
+#define PTHREAD_MUTEX_INITIALIZER { 0, 0, 0 }
+#endif
+
+//-----------------------------------------------------------------------------
+// Mutex attributes structure
+
+typedef struct
+{
+ int protocol;
+#ifdef _POSIX_THREAD_PRIO_PROTECT
+ int prioceiling;
+#endif
+} pthread_mutexattr_t;
+
+// Values for protocol
+#define PTHREAD_PRIO_NONE 1
+#if defined(_POSIX_THREAD_PRIO_INHERIT)
+#define PTHREAD_PRIO_INHERIT 2
+#endif
+#if defined(_POSIX_THREAD_PRIO_PROTECT)
+#define PTHREAD_PRIO_PROTECT 3
+#endif
+
+//-----------------------------------------------------------------------------
+// Condition Variable structure.
+// Like mutexes, this must match the underlying eCos implementation class.
+
+typedef struct
+{
+ CYG_ADDRESS mutex;
+ CYG_ADDRESS queue;
+} pthread_cond_t;
+
+#define PTHREAD_COND_INITIALIZER { 0, 0 }
+
+//-----------------------------------------------------------------------------
+// Condition variable attributes structure
+
+typedef struct
+{
+ int dummy;
+} pthread_condattr_t;
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_POSIX_MUTTYPES_H
+// End of muttypes.h
diff --git a/cesar/ecos/packages/compat/posix/current/include/pthread.h b/cesar/ecos/packages/compat/posix/current/include/pthread.h
new file mode 100644
index 0000000000..a7a5c15aa9
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/include/pthread.h
@@ -0,0 +1,320 @@
+#ifndef CYGONCE_PTHREAD_H
+#define CYGONCE_PTHREAD_H
+//=============================================================================
+//
+// pthread.h
+//
+// POSIX pthread header
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-03-17
+// Purpose: POSIX pthread header
+// Description: This header contains all the definitions needed to support
+// pthreads under eCos. The reader is referred to the POSIX
+// standard or equivalent documentation for details of the
+// functionality contained herein.
+//
+// Usage:
+// #include <pthread.h>
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/posix.h>
+
+#include <cyg/infra/cyg_type.h>
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_MINIMUM
+
+#include <stddef.h> // NULL, size_t
+
+#include <limits.h>
+
+#include <sys/types.h>
+
+#include <sched.h> // SCHED_*
+
+//=============================================================================
+// General thread operations
+
+//-----------------------------------------------------------------------------
+// Thread creation and management.
+
+// Create a thread.
+__externC int pthread_create (pthread_t *__pthread,
+ const pthread_attr_t *__attr,
+ void *(*__start_routine) (void *),
+ void *__arg);
+
+// Get current thread id.
+__externC pthread_t pthread_self (void);
+
+// Compare two thread identifiers.
+__externC int pthread_equal (pthread_t __thread1, pthread_t __thread2);
+
+// Terminate current thread.
+__externC void pthread_exit (void *__retval) CYGBLD_ATTRIB_NORET;
+
+// Wait for the thread to terminate. If thread_return is not NULL then
+// the retval from the thread's call to pthread_exit() is stored at
+// *thread_return.
+__externC int pthread_join (pthread_t __pthread, void **__thread_return);
+
+// Set the detachstate of the thread to "detached". The thread then does not
+// need to be joined and its resources will be freed when it exits.
+__externC int pthread_detach (pthread_t __pthread);
+
+//-----------------------------------------------------------------------------
+// Thread attribute handling.
+
+// Initialize attributes object with default attributes:
+// detachstate == PTHREAD_JOINABLE
+// scope == PTHREAD_SCOPE_SYSTEM
+// inheritsched == PTHREAD_EXPLICIT_SCHED
+// schedpolicy == SCHED_OTHER
+// schedparam == unset
+// stackaddr == unset
+// stacksize == 0
+//
+__externC int pthread_attr_init (pthread_attr_t *__attr);
+
+// Destroy thread attributes object
+__externC int pthread_attr_destroy (pthread_attr_t *__attr);
+
+
+// Set the detachstate attribute
+__externC int pthread_attr_setdetachstate (pthread_attr_t *__attr,
+ int __detachstate);
+
+// Get the detachstate attribute
+__externC int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
+ int *__detachstate);
+
+
+// Set scheduling contention scope
+__externC int pthread_attr_setscope (pthread_attr_t *__attr, int __scope);
+
+// Get scheduling contention scope
+__externC int pthread_attr_getscope (const pthread_attr_t *__attr, int *__scope);
+
+
+// Set scheduling inheritance attribute
+__externC int pthread_attr_setinheritsched (pthread_attr_t *__attr, int __inherit);
+
+// Get scheduling inheritance attribute
+__externC int pthread_attr_getinheritsched (const pthread_attr_t *__attr,
+ int *__inherit);
+
+
+// Set scheduling policy
+__externC int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy);
+
+// Get scheduling policy
+__externC int pthread_attr_getschedpolicy (const pthread_attr_t *__attr,
+ int *__policy);
+
+
+// Set scheduling parameters
+__externC int pthread_attr_setschedparam (pthread_attr_t *__attr,
+ const struct sched_param *__param);
+
+// Get scheduling parameters
+__externC int pthread_attr_getschedparam (const pthread_attr_t *__attr,
+ struct sched_param *__param);
+
+
+// Set starting address of stack. Whether this is at the start or end of
+// the memory block allocated for the stack depends on whether the stack
+// grows up or down.
+__externC int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr);
+
+// Get any previously set stack address.
+__externC int pthread_attr_getstackaddr (const pthread_attr_t *__attr,
+ void **__stackaddr);
+
+
+// Set minimum creation stack size.
+__externC int pthread_attr_setstacksize (pthread_attr_t *__attr,
+ size_t __stacksize);
+
+// Get current minimal stack size.
+__externC int pthread_attr_getstacksize (const pthread_attr_t *__attr,
+ size_t *__stacksize);
+
+//-----------------------------------------------------------------------------
+// Thread scheduling controls
+
+// Set scheduling policy and parameters for the thread
+__externC int pthread_setschedparam (pthread_t __pthread,
+ int __policy,
+ const struct sched_param *__param);
+
+// Get scheduling policy and parameters for the thread
+__externC int pthread_getschedparam (pthread_t __pthread,
+ int *__policy,
+ struct sched_param *__param);
+
+
+
+//=============================================================================
+// Dynamic package initialization
+
+// Initializer for pthread_once_t instances
+#define PTHREAD_ONCE_INIT 0
+
+// Call init_routine just the once per control variable.
+__externC int pthread_once (pthread_once_t *__once_control,
+ void (*__init_routine) (void));
+
+
+
+//=============================================================================
+//Thread specific data
+
+// Create a key to identify a location in the thread specific data area.
+// Each thread has its own distinct thread-specific data area but all are
+// addressed by the same keys. The destructor function is called whenever a
+// thread exits and the value associated with the key is non-NULL.
+__externC int pthread_key_create (pthread_key_t *__key,
+ void (*__destructor) (void *));
+
+// Delete key.
+__externC int pthread_key_delete (pthread_key_t __key);
+
+// Store the pointer value in the thread-specific data slot addressed
+// by the key.
+__externC int pthread_setspecific (pthread_key_t __key, const void *__pointer);
+
+// Retrieve the pointer value in the thread-specific data slot addressed
+// by the key.
+__externC void *pthread_getspecific (pthread_key_t __key);
+
+
+
+//=============================================================================
+// Thread Cancellation
+
+//-----------------------------------------------------------------------------
+// Data structure used to manage cleanup functions
+
+struct pthread_cleanup_buffer
+{
+ struct pthread_cleanup_buffer *prev; // Chain cleanup buffers
+ void (*routine) (void *); // Function to call
+ void *arg; // Arg to pass
+};
+
+//-----------------------------------------------------------------------------
+// Thread cancelled return value.
+// This is a value returned as the retval in pthread_join() of a
+// thread that has been cancelled. By making it the address of a
+// location we define we can ensure that it differs from NULL and any
+// other valid pointer (as required by the standard).
+
+__externC int pthread_canceled_dummy_var;
+
+#define PTHREAD_CANCELED ((void *)(&pthread_canceled_dummy_var))
+
+//-----------------------------------------------------------------------------
+// Cancelability enable and type
+
+#define PTHREAD_CANCEL_ENABLE 1
+#define PTHREAD_CANCEL_DISABLE 2
+
+#define PTHREAD_CANCEL_ASYNCHRONOUS 1
+#define PTHREAD_CANCEL_DEFERRED 2
+
+//-----------------------------------------------------------------------------
+// Functions
+
+// Set cancel state of current thread to ENABLE or DISABLE.
+// Returns old state in *oldstate.
+__externC int pthread_setcancelstate (int __state, int *__oldstate);
+
+// Set cancel type of current thread to ASYNCHRONOUS or DEFERRED.
+// Returns old type in *oldtype.
+__externC int pthread_setcanceltype (int __type, int *__oldtype);
+
+// Cancel the thread.
+__externC int pthread_cancel (pthread_t __pthread);
+
+// Test for a pending cancellation for the current thread and terminate
+// the thread if there is one.
+__externC void pthread_testcancel (void);
+
+// Install a cleanup routine.
+// Note that pthread_cleanup_push() and pthread_cleanup_pop() are macros that
+// must be used in matching pairs and at the same brace nesting level.
+#define pthread_cleanup_push(__routine, __arg) \
+ { \
+ struct pthread_cleanup_buffer _buffer_; \
+ pthread_cleanup_push_inner (&_buffer_, (__routine), (__arg));
+
+// Remove a cleanup handler installed by the matching pthread_cleanup_push().
+// If execute is non-zero, the handler function is called.
+#define pthread_cleanup_pop(__execute) \
+ pthread_cleanup_pop_inner (&_buffer_, (__execute)); \
+ }
+
+
+// These two functions actually implement the cleanup push and pop functionality.
+__externC void pthread_cleanup_push_inner (struct pthread_cleanup_buffer *__buffer,
+ void (*__routine) (void *),
+ void *__arg);
+
+__externC void pthread_cleanup_pop_inner (struct pthread_cleanup_buffer *__buffer,
+ int __execute);
+
+
+// -------------------------------------------------------------------------
+// eCos-specific function to measure stack usage of the supplied thread
+
+#ifdef CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT
+__externC size_t pthread_measure_stack_usage (pthread_t __pthread);
+#endif
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_PTHREAD_H
+// End of pthread.h
diff --git a/cesar/ecos/packages/compat/posix/current/include/semaphore.h b/cesar/ecos/packages/compat/posix/current/include/semaphore.h
new file mode 100644
index 0000000000..2f88a6d0bf
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/include/semaphore.h
@@ -0,0 +1,127 @@
+#ifndef CYGONCE_SEMAPHORE_H
+#define CYGONCE_SEMAPHORE_H
+//=============================================================================
+//
+// semaphore.h
+//
+// POSIX semaphore header
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-03-17
+// Purpose: POSIX semaphore header
+// Description: This header contains all the definitions needed to support
+// semaphores under eCos. The reader is referred to the POSIX
+// standard or equivalent documentation for details of the
+// functionality contained herein.
+//
+// Usage:
+// #include <semaphore.h>
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/posix.h>
+
+#include <stddef.h> // NULL, size_t
+
+#include <limits.h>
+
+#include <sys/types.h>
+
+//-----------------------------------------------------------------------------
+// Semaphore object definition
+
+// This structure must exactly correspond in size and layout to the underlying
+// eCos C++ class that implements this object.
+
+typedef struct
+{
+ CYG_WORD32 sem_value;
+ CYG_ADDRESS sem_queue;
+} sem_t;
+
+//-----------------------------------------------------------------------------
+// Semaphore functions
+
+// Initialize semaphore to value.
+// pshared is not supported under eCos.
+externC int sem_init (sem_t *sem, int pshared, unsigned int value);
+
+// Destroy the semaphore.
+externC int sem_destroy (sem_t *sem);
+
+// Decrement value if >0 or wait for a post.
+externC int sem_wait (sem_t *sem);
+
+// Decrement value if >0, return -1 if not.
+externC int sem_trywait (sem_t *sem);
+
+// Increment value and wake a waiter if one is present.
+externC int sem_post (sem_t *sem);
+
+// Get current value
+externC int sem_getvalue (sem_t *sem, int *sval);
+
+//-----------------------------------------------------------------------------
+// Named semaphore functions
+// These are an optional feature under eCos
+
+// Open an existing named semaphore, or create it.
+externC sem_t *sem_open (const char *name, int oflag, ...);
+
+// Close descriptor for semaphore.
+externC int sem_close (sem_t *sem);
+
+// Remove named semaphore
+externC int sem_unlink (const char *name);
+
+//-----------------------------------------------------------------------------
+// Special return value for sem_open()
+
+#define SEM_FAILED ((sem_t *)NULL)
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_SEMAPHORE_H
+// End of semaphore.h
diff --git a/cesar/ecos/packages/compat/posix/current/include/signal.h b/cesar/ecos/packages/compat/posix/current/include/signal.h
new file mode 100644
index 0000000000..2ccde6937a
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/include/signal.h
@@ -0,0 +1,313 @@
+#ifndef CYGONCE_SIGNAL_H
+#define CYGONCE_SIGNAL_H
+//=============================================================================
+//
+// signal.h
+//
+// POSIX signal header
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg, jlarmour
+// Contributors:
+// Date: 2000-03-17
+// Purpose: POSIX signal header
+// Description: This header contains all the definitions needed to support
+// the POSIX signal API under eCos.
+//
+// Usage: This file can either be included directly, or indirectly via
+// the C library signal.h header.
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/posix.h>
+
+#ifdef CYGPKG_POSIX_SIGNALS
+
+#include <stddef.h> // NULL, size_t
+
+#include <limits.h>
+#include <sys/types.h>
+
+//-----------------------------------------------------------------------------
+// POSIX feature test macros
+
+// We do not support job control
+#undef _POSIX_JOB_CONTROL
+
+//-----------------------------------------------------------------------------
+// Manifest constants
+
+#ifdef _POSIX_REALTIME_SIGNALS
+// For now we define the topmost 8 signals as realtime
+#define SIGRTMIN 24
+#define SIGRTMAX 31
+#endif
+
+//-----------------------------------------------------------------------------
+// forward references
+
+struct timespec;
+
+//-----------------------------------------------------------------------------
+// Sigval structure
+
+union sigval
+{
+ int sival_int; // used when application-defined value is an int
+ void *sival_ptr; // used when application-defined value is a pointer
+};
+
+//-----------------------------------------------------------------------------
+// Siginfo structure passed to an SA_SIGINFO style handler
+
+typedef struct
+{
+ int si_signo; // signal number
+ int si_code; // cause of signal
+ union sigval si_value; // signal value
+} siginfo_t;
+
+// Values for si_code
+# define SI_USER 1
+# define SI_QUEUE 2
+# define SI_TIMER 3
+# define SI_ASYNCIO 4
+# define SI_MESGQ 5
+# define SI_EXCEPT 6 // signal is result of an exception delivery
+
+//-----------------------------------------------------------------------------
+// Basic types
+
+// Integral type that can be accessed atomically - from ISO C 7.7
+typedef cyg_atomic sig_atomic_t;
+
+// Type of signal handler functions
+typedef void (*sa_sighandler_t)(int);
+
+// Type of signal handler used if SA_SIGINFO is set in sa_flags
+typedef void (*sa_siginfoaction_t)(int signo, siginfo_t *info,
+ void *context);
+
+//-----------------------------------------------------------------------------
+//Signal handlers for use with signal() and sigaction(). We avoid 0
+//because in an embedded system this may be start of ROM and thus
+//a possible function pointer for reset.
+
+#define SIG_DFL ((sa_sighandler_t) 1) // Default action
+#define SIG_IGN ((sa_sighandler_t) 2) // Ignore action
+#define SIG_ERR ((sa_sighandler_t)-1) // Error return
+
+//-----------------------------------------------------------------------------
+// Signal values
+
+#define SIGNULL 0 // Reserved signal - do not use (POSIX 3.3.1.1)
+#define SIGHUP 1 // Hangup on controlling terminal (POSIX)
+#define SIGINT 2 // Interactive attention (ISO C)
+#define SIGQUIT 3 // Interactive termination (POSIX)
+#define SIGILL 4 // Illegal instruction (not reset when caught) (ISO C)
+#define SIGTRAP 5 // Trace trap (not reset when caught)
+#define SIGIOT 6 // IOT instruction
+#define SIGABRT 6 // Abnormal termination - used by abort() (ISO C)
+#define SIGEMT 7 // EMT instruction
+#define SIGFPE 8 // Floating Point Exception e.g. div by 0 (ISO C)
+#define SIGKILL 9 // Kill (cannot be caught or ignored) (POSIX)
+#define SIGBUS 10 // Bus error (POSIX)
+#define SIGSEGV 11 // Invalid memory reference (ISO C)
+#define SIGSYS 12 // Bad argument to system call (used by anything?)
+#define SIGPIPE 13 // Write on a pipe with no one to read it (POSIX)
+#define SIGALRM 14 // Alarm timeout (POSIX)
+#define SIGTERM 15 // Software termination request (ISO C)
+#define SIGUSR1 16 // Application-defined signal 1 (POSIX)
+#define SIGUSR2 17 // Application-defined signal 2 (POSIX)
+
+
+//-----------------------------------------------------------------------------
+// Signal sets.
+// At present we define a single 32 bit integer mask. We may need, at
+// some future point, to extend this to 64 bits, or a structure
+// containing an array of masks.
+
+typedef cyg_uint32 sigset_t;
+
+//-----------------------------------------------------------------------------
+// struct sigaction describes the action to be taken when we get a signal
+
+struct sigaction
+{
+ sigset_t sa_mask; // Additional signals to be blocked
+ int sa_flags; // Special flags
+ union
+ {
+ sa_sighandler_t sa_handler; // signal handler
+ sa_siginfoaction_t sa_sigaction; // Function to call instead of
+ // sa_handler if SA_SIGINFO is
+ // set in sa_flags
+ } sa_sigactionhandler;
+#define sa_handler sa_sigactionhandler.sa_handler
+#define sa_sigaction sa_sigactionhandler.sa_sigaction
+};
+
+// sa_flag bits
+#define SA_NOCLDSTOP 1 // Don't generate SIGCHLD when children stop
+#define SA_SIGINFO 2 // Use the sa_siginfoaction_t style signal
+ // handler, instead of the single argument handler
+
+//-----------------------------------------------------------------------------
+// Sigevent structure.
+
+struct sigevent
+{
+ int sigev_notify;
+ int sigev_signo;
+ union sigval sigev_value;
+ void (*sigev_notify_function) (union sigval);
+ pthread_attr_t *sigev_notify_attributes;
+};
+
+# define SIGEV_NONE 1
+# define SIGEV_SIGNAL 2
+# define SIGEV_THREAD 3
+
+//-----------------------------------------------------------------------------
+// Functions to generate signals
+
+// Deliver sig to a process.
+// eCos only supports the value 0 for pid.
+externC int kill (pid_t pid, int sig);
+
+externC int pthread_kill (pthread_t thread, int sig);
+
+//-----------------------------------------------------------------------------
+// Functions to catch signals
+
+// Install signal handler for sig.
+externC int sigaction (int sig, const struct sigaction *act,
+ struct sigaction *oact);
+
+// Queue signal to process with value.
+externC int sigqueue (pid_t pid, int sig, const union sigval value);
+
+//-----------------------------------------------------------------------------
+// Functions to deal with current blocked and pending masks
+
+// Set process blocked signal mask
+externC int sigprocmask (int how, const sigset_t *set, sigset_t *oset);
+
+// Set calling thread's blocked signal mask
+externC int pthread_sigmask (int how, const sigset_t *set, sigset_t *oset);
+
+// Get set of pending signals for this process
+externC int sigpending (sigset_t *set);
+
+// Values for the how arguments:
+#define SIG_BLOCK 1
+#define SIG_UNBLOCK 2
+#define SIG_SETMASK 3
+
+//-----------------------------------------------------------------------------
+// Wait for or accept signals
+
+// Block signals in set and wait for a signal
+externC int sigsuspend (const sigset_t *set);
+
+// Wait for a signal in set to arrive
+externC int sigwait (const sigset_t *set, int *sig);
+
+// Do the same as sigwait() except return a siginfo_t object too.
+externC int sigwaitinfo (const sigset_t *set, siginfo_t *info);
+
+// Do the same as sigwaitinfo() but return anyway after timeout.
+externC int sigtimedwait (const sigset_t *set, siginfo_t *info,
+ const struct timespec *timeout);
+
+//-----------------------------------------------------------------------------
+// Signal sets
+
+// Clear all signals from set.
+externC int sigemptyset (sigset_t *set);
+
+// Set all signals in set.
+externC int sigfillset (sigset_t *set);
+
+// Add signo to set.
+externC int sigaddset (sigset_t *set, int signo);
+
+// Remove signo from set.
+externC int sigdelset (sigset_t *set, int signo);
+
+// Test whether signo is in set
+externC int sigismember (const sigset_t *set, int signo);
+
+//-----------------------------------------------------------------------------
+// alarm, pause and sleep
+
+// Generate SIGALRM after some number of seconds
+externC unsigned int alarm( unsigned int seconds );
+
+// Wait for a signal to be delivered.
+externC int pause( void );
+
+// Wait for a signal, or the given number of seconds
+externC unsigned int sleep( unsigned int seconds );
+
+//-----------------------------------------------------------------------------
+// signal() - ISO C 7.7.1 //
+//
+// Installs a new signal handler for the specified signal, and returns
+// the old handler
+//
+
+externC sa_sighandler_t signal(int __sig, sa_sighandler_t __handler);
+
+// raise() - ISO C 7.7.2 //
+//
+// Raises the signal, which will cause the current signal handler for
+// that signal to be called
+
+externC int raise(int __sig);
+
+#endif // ifdef CYGPKG_POSIX_SIGNALS
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_SIGNAL_H
+// End of signal.h
diff --git a/cesar/ecos/packages/compat/posix/current/include/sigsetjmp.h b/cesar/ecos/packages/compat/posix/current/include/sigsetjmp.h
new file mode 100644
index 0000000000..ff4a332d9e
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/include/sigsetjmp.h
@@ -0,0 +1,94 @@
+#ifndef CYGONCE_SIGSETJMP_H
+#define CYGONCE_SIGSETJMP_H
+//=============================================================================
+//
+// sigsetjmp.h
+//
+// POSIX sigsetjmp header
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg, jlarmour
+// Contributors:
+// Date: 2000-03-17
+// Purpose: POSIX sigsetjmp header
+// Description: This header contains all the definitions needed to support
+// the POSIX sigsetjmp/siglongjmp API under eCos.
+//
+// Usage: This file must be included indirectly via
+// the C library setjmp.h header.
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <signal.h>
+#include <cyg/hal/hal_arch.h> // hal_jmp_buf
+
+//=============================================================================
+// sigjmp_buf structure
+// The API requires this to be an array type, but this array actually
+// contains three fields:
+// 0..sizeof(hal_jmp_buf)-1 HAL jump buffer
+// sizeof(hal_jmp_buf) savemask value (an int)
+// sizeof(hal_jmp_buf)+sizeof(int)... sigset_t containing saved mask
+
+typedef struct {
+ hal_jmp_buf __jmp_buf;
+ int __savemask;
+ sigset_t __sigsavemask;
+} sigjmp_buf[1];
+
+//=============================================================================
+// sigsetjmp() macro
+
+#define sigsetjmp( _env_, _savemask_ ) \
+( \
+ ((_env_)[0].__savemask = _savemask_), \
+ ((_savemask_)?pthread_sigmask(SIG_BLOCK,NULL,&((_env_)[0].__sigsavemask)):0),\
+ hal_setjmp((_env_)[0].__jmp_buf) \
+)
+
+//=============================================================================
+// siglongjmp function
+
+__externC void siglongjmp( sigjmp_buf env, int val );
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_SIGSETJMP_H
+// End of sigsetjmp.h
diff --git a/cesar/ecos/packages/compat/posix/current/include/time.h b/cesar/ecos/packages/compat/posix/current/include/time.h
new file mode 100644
index 0000000000..67cdbdb662
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/include/time.h
@@ -0,0 +1,151 @@
+#ifndef CYGONCE_POSIX_TIME_H
+#define CYGONCE_POSIX_TIME_H
+/*=============================================================================
+//
+// time.h
+//
+// POSIX time header
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg, jlarmour
+// Date: 2000-03-17
+// Purpose: POSIX time header
+// Description: This header contains all the definitions needed to support
+// the POSIX timer and timer API under eCos.
+//
+// Usage: Do not include this file directly - instead include <time.h>
+//
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================*/
+
+#include <pkgconf/posix.h>
+#include <cyg/infra/cyg_type.h>
+
+/*---------------------------------------------------------------------------*/
+/* Types for timers and clocks */
+
+typedef int clockid_t;
+
+#ifdef CYGPKG_POSIX_TIMERS
+typedef int timer_t;
+
+/* forward declaration - if the app uses it it will have to include
+ * signal.h anyway
+ */
+struct sigevent;
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Structures */
+
+struct timespec
+{
+ time_t tv_sec;
+ long tv_nsec;
+};
+
+#ifdef CYGPKG_POSIX_TIMERS
+struct itimerspec
+{
+ struct timespec it_interval;
+ struct timespec it_value;
+};
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Manifest constants */
+
+#define CLOCK_REALTIME 0
+
+#ifdef CYGPKG_POSIX_TIMERS
+#define TIMER_ABSTIME 1
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Clock functions */
+
+/* Set the clocks current time */
+__externC int clock_settime( clockid_t clock_id, const struct timespec *tp);
+
+/* Get the clocks current time */
+__externC int clock_gettime( clockid_t clock_id, struct timespec *tp);
+
+/* Get the clocks resolution */
+__externC int clock_getres( clockid_t clock_id, struct timespec *tp);
+
+
+/*---------------------------------------------------------------------------*/
+/* Timer functions */
+
+#ifdef CYGPKG_POSIX_TIMERS
+
+/* Create a timer based on the given clock. */
+__externC int timer_create( clockid_t clock_id,
+ struct sigevent *evp,
+ timer_t *timer_id);
+
+/* Delete the timer */
+__externC int timer_delete( timer_t timer_id );
+
+/* Set the expiration time of the timer. */
+__externC int timer_settime( timer_t timerid, int flags,
+ const struct itimerspec *value,
+ struct itimerspec *ovalue );
+
+/* Get current timer values */
+__externC int timer_gettime( timer_t timerid, struct itimerspec *value );
+
+/* Get number of missed triggers */
+__externC int timer_getoverrun( timer_t timerid );
+
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Nanosleep */
+
+/* Sleep for the given time. */
+__externC int nanosleep( const struct timespec *rqtp,
+ struct timespec *rmtp);
+
+
+/*---------------------------------------------------------------------------*/
+#endif /* ifndef CYGONCE_POSIX_TIME_H */
+/* End of time.h */
diff --git a/cesar/ecos/packages/compat/posix/current/include/types.h b/cesar/ecos/packages/compat/posix/current/include/types.h
new file mode 100644
index 0000000000..dc74e0f774
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/include/types.h
@@ -0,0 +1,112 @@
+#ifndef CYGONCE_POSIX_TYPES_H
+#define CYGONCE_POSIX_TYPES_H
+//=============================================================================
+//
+// types.h
+//
+// POSIX types header
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-03-17
+// Purpose: POSIX types header
+// Description: This header contains various POSIX type definitions. These types
+// are implementation defined.
+//
+// Usage: #include <sys/types.h>
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/posix.h>
+
+#include <cyg/infra/cyg_type.h>
+
+//-----------------------------------------------------------------------------
+// Basic types.
+
+typedef cyg_uint32 pthread_t;
+typedef int pthread_key_t;
+typedef int pthread_once_t;
+
+//-----------------------------------------------------------------------------
+// Scheduling parameters. At present only the priority is defined.
+// Strictly this should be in <sched.h>, but the requirement for pthread_attr_t
+// to contain a sched_param object means that it must be here.
+
+struct sched_param
+{
+ int sched_priority;
+};
+
+//-----------------------------------------------------------------------------
+// Thread attribute structure.
+
+typedef struct pthread_attr_t
+{
+ unsigned int detachstate:2,
+ scope:2,
+ inheritsched:2,
+ schedpolicy:2,
+ stackaddr_valid:1,
+ stacksize_valid:1;
+ struct sched_param schedparam;
+ void *stackaddr;
+ size_t stacksize;
+} pthread_attr_t;
+
+// Values for detachstate
+#define PTHREAD_CREATE_JOINABLE 1
+#define PTHREAD_CREATE_DETACHED 2
+
+// Values for scope
+#define PTHREAD_SCOPE_SYSTEM 1
+#define PTHREAD_SCOPE_PROCESS 2
+
+// Values for inheritsched
+#define PTHREAD_INHERIT_SCHED 1
+#define PTHREAD_EXPLICIT_SCHED 2
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_POSIX_TYPES_H
+// End of types.h
diff --git a/cesar/ecos/packages/compat/posix/current/include/utsname.h b/cesar/ecos/packages/compat/posix/current/include/utsname.h
new file mode 100644
index 0000000000..3f0b79c961
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/include/utsname.h
@@ -0,0 +1,98 @@
+#ifndef CYGONCE_UTSNAME_H
+#define CYGONCE_UTSNAME_H
+//=============================================================================
+//
+// utsname.h
+//
+// POSIX utsname header
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-03-17
+// Purpose: POSIX utsname header
+// Description: This header contains all the definitions needed to support
+// utsnames under eCos. The reader is referred to the POSIX
+// standard or equivalent documentation for details of the
+// functionality contained herein.
+//
+// Usage:
+// #include <utsname.h>
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/posix.h>
+
+#include <cyg/infra/cyg_type.h>
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_MINIMUM
+
+#include <stddef.h> // NULL, size_t
+
+#include <limits.h>
+
+#include <sys/types.h>
+
+#include <sched.h> // SCHED_*
+
+//=============================================================================
+// UTSName structure
+
+struct utsname
+{
+ char sysname[CYG_POSIX_UTSNAME_LENGTH];
+ char nodename[CYG_POSIX_UTSNAME_NODENAME_LENGTH];
+ char release[CYG_POSIX_UTSNAME_LENGTH];
+ char version[CYG_POSIX_UTSNAME_LENGTH];
+ char machine[CYG_POSIX_UTSNAME_LENGTH];
+};
+
+//=============================================================================
+// uname() function
+
+__externC int uname( struct utsname *name );
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_UTSNAME_H
+// End of utsname.h
diff --git a/cesar/ecos/packages/compat/posix/current/src/except.cxx b/cesar/ecos/packages/compat/posix/current/src/except.cxx
new file mode 100644
index 0000000000..a82913b9ee
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/src/except.cxx
@@ -0,0 +1,343 @@
+//==========================================================================
+//
+// except.cxx
+//
+// POSIX exception translation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-03-27
+// Purpose: POSIX exception translation
+// Description: This file contains code to translate eCos hardware
+// exceptions into POSIX signals.
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/posix.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <cyg/infra/diag.h>
+
+#include "pprivate.h" // POSIX private header
+
+#include <signal.h> // our header
+
+#include <cyg/kernel/thread.inl>
+
+//==========================================================================
+// Translation table from eCos exceptions to POSIX signals.
+
+static const struct
+{
+ cyg_code exception;
+ int signal;
+} exception_signal_mapping[] =
+{
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_ACCESS
+ {CYGNUM_HAL_EXCEPTION_DATA_ACCESS, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_WRITE
+ {CYGNUM_HAL_EXCEPTION_DATA_WRITE, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_CODE_ACCESS
+ {CYGNUM_HAL_EXCEPTION_CODE_ACCESS, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_CODE_WRITE
+ {CYGNUM_HAL_EXCEPTION_CODE_WRITE, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_CODE_EXECUTE
+ {CYGNUM_HAL_EXCEPTION_CODE_EXECUTE, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_IO_ACCESS
+ {CYGNUM_HAL_EXCEPTION_IO_ACCESS, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_IO_WRITE
+ {CYGNUM_HAL_EXCEPTION_IO_ACCESS, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_TLBMISS_ACCESS
+ {CYGNUM_HAL_EXCEPTION_DATA_TLBMISS_ACCESS, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_TLBMISS_WRITE
+ {CYGNUM_HAL_EXCEPTION_DATA_TLBMISS_WRITE, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_CODE_TLBMISS_ACCESS
+ {CYGNUM_HAL_EXCEPTION_CODE_TLBMISS_ACCESS, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_CODE_TLBMISS_WRITE
+ {CYGNUM_HAL_EXCEPTION_CODE_TLBMISS_WRITE, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_TLBERROR_ACCESS
+ {CYGNUM_HAL_EXCEPTION_DATA_TLBERROR_ACCESS, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_TLBERROR_WRITE
+ {CYGNUM_HAL_EXCEPTION_DATA_TLBERROR_WRITE, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_CODE_TLBERROR_ACCESS
+ {CYGNUM_HAL_EXCEPTION_CODE_TLBERROR_ACCESS, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_CODE_TLBERROR_WRITE
+ {CYGNUM_HAL_EXCEPTION_CODE_TLBERROR_WRITE, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS
+ {CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_WRITE
+ {CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_WRITE, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_IO_UNALIGNED_ACCESS
+ {CYGNUM_HAL_EXCEPTION_IO_UNALIGNED_ACCESS, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_IO_UNALIGNED_WRITE
+ {CYGNUM_HAL_EXCEPTION_IO_UNALIGNED_WRITE, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION
+ {CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION, SIGILL},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_INTERRUPT
+ {CYGNUM_HAL_EXCEPTION_INTERRUPT, SIGINT},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_TRAP
+ {CYGNUM_HAL_EXCEPTION_TRAP, SIGTRAP},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DIV_BY_ZERO
+ {CYGNUM_HAL_EXCEPTION_DIV_BY_ZERO, SIGFPE},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_OVERFLOW
+ {CYGNUM_HAL_EXCEPTION_OVERFLOW, SIGFPE},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_BOUNDS
+ {CYGNUM_HAL_EXCEPTION_BOUNDS, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_SINGLE_STEP
+ {CYGNUM_HAL_EXCEPTION_SINGLE_STEP, SIGTRAP},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_INSTRUCTION_BP
+ {CYGNUM_HAL_EXCEPTION_INSTRUCTION_BP, SIGTRAP},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_PERIPHERAL_BP
+ {CYGNUM_HAL_EXCEPTION_PERIPHERAL_BP, SIGTRAP},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_BP
+ {CYGNUM_HAL_EXCEPTION_DATA_BP, SIGTRAP},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DEVELOPMENT_BP
+ {CYGNUM_HAL_EXCEPTION_DEVELOPMENT_BP, SIGTRAP},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_STACK_OVERFLOW
+ {CYGNUM_HAL_EXCEPTION_STACK_OVERFLOW, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_STACK_FAULT
+ {CYGNUM_HAL_EXCEPTION_STACK_FAULT, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_PARITY
+ {CYGNUM_HAL_EXCEPTION_PARITY, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU
+ {CYGNUM_HAL_EXCEPTION_FPU, SIGFPE},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU_NOT_AVAIL
+ {CYGNUM_HAL_EXCEPTION_FPU_NOT_AVAIL, SIGFPE},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU_OVERFLOW
+ {CYGNUM_HAL_EXCEPTION_FPU_OVERFLOW, SIGFPE},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU_UNDERFLOW
+ {CYGNUM_HAL_EXCEPTION_FPU_UNDERFLOW, SIGFPE},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU_DIV_BY_ZERO
+ {CYGNUM_HAL_EXCEPTION_FPU_DIV_BY_ZERO, SIGFPE},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_SYSTEM_CALL
+ {CYGNUM_HAL_EXCEPTION_SYSTEM_CALL, SIGSYS},
+#endif
+ {0, 0} // dummy value to ensure compiler is happy
+};
+
+//==========================================================================
+// POSIX exception handler
+
+static void cyg_posix_exception_handler(
+ CYG_ADDRWORD data, // user supplied data == signal number
+ cyg_code exception_number, // exception being raised
+ CYG_ADDRWORD exception_info // any exception specific info
+ )
+{
+ int signo = 0;
+
+ pthread_info *self = pthread_self_info();
+
+ if( self == NULL )
+ {
+ // Not a POSIX thread, just return
+ return;
+ }
+
+#ifdef CYGSEM_KERNEL_EXCEPTIONS_DECODE
+
+ signo = data;
+
+#else
+
+ for( int i = 0; exception_signal_mapping[i].signal != 0; i++ )
+ {
+ if( exception_signal_mapping[i].exception == exception_number )
+ {
+ signo = exception_signal_mapping[i].signal;
+ break;
+ }
+ }
+
+#endif
+
+ if( sigismember( &self->sigmask, signo ) )
+ {
+ // The signal is masked in the current thread. POSIX says that
+ // the behaviour is undefined here. We choose to ignore it.
+
+ return;
+ }
+
+ // The kernel exception handler may have disabled interrupts, so
+ // we (re-)enable them here. From this point on we are running in
+ // a context that is effectively just pushed onto the stack of the
+ // current thread. If we return we will unwind and resume
+ // execution from the excepting code. We can also, in theory,
+ // longjump out of the signal handler, and although that is
+ // deprecated, we make sure in cyg_deliver_signals() that it is
+ // possible to do it.
+
+ HAL_ENABLE_INTERRUPTS();
+
+ struct sigevent sev;
+
+ sev.sigev_notify = SIGEV_SIGNAL;
+ sev.sigev_signo = signo;
+ sev.sigev_value.sival_ptr = (void *)exception_info;
+
+ // Generate the signal
+ cyg_sigqueue( &sev, SI_EXCEPT );
+
+ // And try to deliver it
+ cyg_deliver_signals();
+}
+
+//==========================================================================
+// Install all the exception handlers
+
+static void install_handlers( Cyg_Thread *thread)
+{
+#ifdef CYGSEM_KERNEL_EXCEPTIONS_DECODE
+
+ // With decoded exceptions, we must install a separate exception
+ // handler for each supported exception.
+
+ for( int i = 0; exception_signal_mapping[i].signal != 0; i++ )
+ {
+ thread->register_exception( exception_signal_mapping[i].exception,
+ cyg_posix_exception_handler,
+ exception_signal_mapping[i].signal,,
+ NULL,
+ NULL);
+ }
+
+#else
+
+ // Otherwise there is just one exception handler for all exceptions.
+
+ thread->register_exception( CYGNUM_HAL_EXCEPTION_MIN,
+ cyg_posix_exception_handler,
+ 0,
+ NULL,
+ NULL);
+
+#endif
+
+}
+
+//==========================================================================
+// Initialization
+
+externC void cyg_posix_exception_start()
+{
+#ifdef CYGSEM_KERNEL_EXCEPTIONS_GLOBAL
+
+ // With global exceptions, we only need to install a single static
+ // set of exception handlers. Note that by this point in system
+ // initialization the idle thread should be installed as the
+ // current thread, so we pass a pointer to that to
+ // install_handlers(). The identity of the thread passed is
+ // actually irrelevant in this case and is just used as a handle
+ // into the thread class.
+
+ install_handlers( Cyg_Thread::self() );
+
+#endif
+}
+
+//==========================================================================
+// Per thread exception initialization and destruction
+
+externC void cyg_pthread_exception_init(pthread_info *thread)
+{
+#ifndef CYGSEM_KERNEL_EXCEPTIONS_GLOBAL
+
+ // With non-global exceptions we must install a new set of handlers
+ // for each thread.
+
+ install_handlers( thread->thread );
+
+#endif
+}
+
+externC void cyg_pthread_exception_destroy(pthread_info *thread)
+{
+ // Nothing to do at present.
+}
+
+// -------------------------------------------------------------------------
+// EOF except.cxx
diff --git a/cesar/ecos/packages/compat/posix/current/src/misc.cxx b/cesar/ecos/packages/compat/posix/current/src/misc.cxx
new file mode 100644
index 0000000000..d56ef915eb
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/src/misc.cxx
@@ -0,0 +1,386 @@
+//==========================================================================
+//
+// misc.cxx
+//
+// POSIX misc function implementations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-07-18
+// Purpose: POSIX misc function implementation
+// Description: This file contains the implementation of miscellaneous POSIX
+// functions that do not belong elsewhere.
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/posix.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include "pprivate.h" // POSIX private header
+
+#include <unistd.h>
+#include <sys/utsname.h> // My header
+#include <string.h> // strcpy
+#include <limits.h>
+#include <time.h>
+
+#include <cyg/kernel/sched.hxx>
+
+#include <cyg/kernel/sched.inl>
+
+// -------------------------------------------------------------------------
+// Supply some suitable values for constants that may not be present
+// in all configurations.
+
+#ifndef MQ_OPEN_MAX
+#define MQ_OPEN_MAX 0
+#endif
+#ifndef MQ_PRIO_MAX
+#define MQ_PRIO_MAX 0
+#endif
+
+// -------------------------------------------------------------------------
+
+#define __string(_x) #_x
+#define __xstring(_x) __string(_x)
+
+// -------------------------------------------------------------------------
+// uname()
+
+__externC int uname( struct utsname *name )
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+
+ strcpy( name->sysname, "eCos" );
+ strcpy( name->nodename, "" ); // should use gethostname()
+ strcpy( name->release, __xstring( CYGNUM_KERNEL_VERSION_MAJOR ) );
+ strcpy( name->version, __xstring( CYGNUM_KERNEL_VERSION_MINOR ) );
+ strcpy( name->machine, "" );
+
+ CYG_REPORT_RETVAL(0);
+ return 0;
+}
+
+// -------------------------------------------------------------------------
+// sysconf()
+
+#define SC_CASE( _name, _val ) case _name: return _val
+
+__externC long sysconf( int name )
+{
+
+ switch( name )
+ {
+ SC_CASE( _SC_AIO_LISTIO_MAX, AIO_LISTIO_MAX );
+ SC_CASE( _SC_AIO_MAX, AIO_MAX );
+ SC_CASE( _SC_AIO_PRIO_DELTA_MAX, AIO_PRIO_DELTA_MAX );
+ SC_CASE( _SC_ARG_MAX, ARG_MAX );
+ SC_CASE( _SC_CHILD_MAX, CHILD_MAX );
+ SC_CASE( _SC_DELAYTIMER_MAX, DELAYTIMER_MAX );
+ SC_CASE( _SC_GETGR_R_SIZE_MAX, 0 );
+ SC_CASE( _SC_GETPW_R_SIZE_MAX, 0 );
+ SC_CASE( _SC_LOGIN_NAME_MAX, LOGIN_NAME_MAX );
+ SC_CASE( _SC_MQ_OPEN_MAX, MQ_OPEN_MAX );
+ SC_CASE( _SC_MQ_PRIO_MAX, MQ_PRIO_MAX );
+ SC_CASE( _SC_NGROUPS_MAX, NGROUPS_MAX );
+ SC_CASE( _SC_OPEN_MAX, OPEN_MAX );
+ SC_CASE( _SC_PAGESIZE, PAGESIZE );
+ SC_CASE( _SC_RTSIG_MAX, RTSIG_MAX );
+ SC_CASE( _SC_SEM_NSEMS_MAX, SEM_NSEMS_MAX );
+ SC_CASE( _SC_SEM_VALUE_MAX, SEM_VALUE_MAX );
+ SC_CASE( _SC_SIGQUEUE_MAX, SIGQUEUE_MAX );
+ SC_CASE( _SC_STREAM_MAX, STREAM_MAX );
+#ifdef CYGPKG_POSIX_PTHREAD
+ SC_CASE( _SC_THREAD_DESTRUCTOR_ITERATIONS, PTHREAD_DESTRUCTOR_ITERATIONS );
+ SC_CASE( _SC_THREAD_KEYS_MAX, PTHREAD_KEYS_MAX );
+ SC_CASE( _SC_THREAD_STACK_MIN, PTHREAD_STACK_MIN );
+ SC_CASE( _SC_THREAD_THREADS_MAX, PTHREAD_THREADS_MAX );
+#endif
+ SC_CASE( _SC_TIMER_MAX, TIMER_MAX );
+ SC_CASE( _SC_TTY_NAME_MAX, TTY_NAME_MAX );
+ SC_CASE( _SC_TZNAME_MAX, TZNAME_MAX );
+ SC_CASE( _SC_VERSION, _POSIX_VERSION );
+
+#ifdef CYGPKG_POSIX_TIMERS
+ case _SC_CLK_TCK:
+ {
+ struct timespec ts;
+ ts.tv_sec = 1;
+ ts.tv_nsec = 0;
+ cyg_tick_count ticks = cyg_timespec_to_ticks( &ts );
+ return ticks;
+ }
+#endif
+
+ case _SC_ASYNCHRONOUS_IO:
+ #ifdef _POSIX_ASYNCHRONOUS_IO
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_FSYNC:
+ #ifdef _POSIX_FSYNC
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_JOB_CONTROL:
+ #ifdef _POSIX_JOB_CONTROL
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_MAPPED_FILES:
+ #ifdef _POSIX_MAPPED_FILES
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_MEMLOCK:
+ #ifdef _POSIX_MEMLOCK
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_MEMLOCK_RANGE:
+ #ifdef _POSIX_MEMLOCK_RANGE
+ return 1;
+ #else
+ return -1 ;
+ #endif
+
+ case _SC_MEMORY_PROTECTION:
+ #ifdef _POSIX_MEMORY_PROTECTION
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_MESSAGE_PASSING:
+ #ifdef _POSIX_MESSAGE_PASSING
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_PRIORITIZED_IO:
+ #ifdef _POSIX_PRIORITIZED_IO
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_PRIORITY_SCHEDULING:
+ #ifdef _POSIX_PRIORITY_SCHEDULING
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_REALTIME_SIGNALS:
+ #ifdef _POSIX_REALTIME_SIGNALS
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_SAVED_IDS:
+ #ifdef _POSIX_SAVED_IDS
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_SEMAPHORES:
+ #ifdef _POSIX_SEMAPHORES
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_SHARED_MEMORY_OBJECTS:
+ #ifdef _POSIX_SHARED_MEMORY_OBJECTS
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_SYNCHRONIZED_IO:
+ #ifdef _POSIX_SYNCHRONIZED_IO
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_THREADS:
+ #ifdef _POSIX_THREADS
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_THREAD_ATTR_STACKADDR:
+ #ifdef _POSIX_THREAD_ATTR_STACKADDR
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_THREAD_ATTR_STACKSIZE:
+ #ifdef _POSIX_THREAD_ATTR_STACKSIZE
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_THREAD_PRIO_INHERIT:
+ #ifdef _POSIX_THREAD_PRIO_INHERIT
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_THREAD_PRIO_PROTECT:
+ #ifdef _POSIX_THREAD_PRIO_PROTECT
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_THREAD_PRIORITY_SCHEDULING:
+ #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_THREAD_PROCESS_SHARED:
+ #ifdef _POSIX_THREAD_PROCESS_SHARED
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_THREAD_SAFE_FUNCTIONS:
+ #ifdef _POSIX_THREAD_SAFE_FUNCTIONS
+ return 1;
+ #else
+ return -1;
+ #endif
+
+ case _SC_TIMERS:
+ #ifdef _POSIX_TIMERS
+ return 1;
+ #else
+ return -1;
+ #endif
+
+
+ default:
+ errno = EINVAL;
+ return -1;
+ }
+}
+
+//==========================================================================
+// Some trivial compatibility functions.
+// These are merely present to permit existing code to be ported a little
+// more easily, and to provide adequate standards compatibility.
+
+__externC pid_t getpid ( void ) { return 42; }
+__externC pid_t getppid ( void ) { return 41; }
+__externC uid_t getuid ( void ) { return 666; }
+__externC uid_t geteuid ( void ) { return 666; }
+__externC gid_t getgid ( void ) { return 88; }
+__externC gid_t getegid ( void ) { return 88; }
+__externC int setuid ( uid_t uid ) { errno = EPERM; return -1; }
+__externC int setgid ( uid_t gid ) { errno = EPERM; return -1; }
+__externC int getgroups ( int gidsetsize, gid_t grouplist[] ) { return 0; };
+__externC pid_t getpgrp ( void ) { return 42; }
+__externC pid_t setsid ( void ) { errno = EPERM; return -1; }
+__externC int setpgid ( pid_t pid, pid_t pgid ) { errno = ENOSYS; return -1; }
+
+//==========================================================================
+// Exports to other packages
+
+// -------------------------------------------------------------------------
+// POSIX API function entry
+
+__externC void cyg_posix_function_start()
+{
+ Cyg_Thread *self = Cyg_Scheduler::get_current_thread();
+
+ // Inhibit ASR delivery in this function until it returns.
+
+ self->set_asr_inhibit();
+}
+
+// -------------------------------------------------------------------------
+
+__externC void cyg_posix_function_finish()
+{
+ Cyg_Thread *self = Cyg_Scheduler::get_current_thread();
+
+ // Re-allow ASR delivery.
+
+ self->clear_asr_inhibit();
+
+ // After clearing the inhibit flag, blip the scheduler lock
+ // to get any pending ASRs delivered.
+ Cyg_Scheduler::lock();
+ Cyg_Scheduler::unlock();
+}
+
+// -------------------------------------------------------------------------
+// EOF misc.cxx
diff --git a/cesar/ecos/packages/compat/posix/current/src/mqueue.cxx b/cesar/ecos/packages/compat/posix/current/src/mqueue.cxx
new file mode 100644
index 0000000000..350950a254
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/src/mqueue.cxx
@@ -0,0 +1,1005 @@
+/*========================================================================
+//
+// mqueue.cxx
+//
+// Message queues tests
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-05-14
+// Purpose: This file provides the implementation for POSIX message
+// queues
+// Description: It uses eCos kernel mqueues as the underlying
+// implementation
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/posix.h>
+
+#ifdef CYGPKG_POSIX_MQUEUES
+
+#include <pkgconf/kernel.h>
+
+/* INCLUDES */
+
+#include <cyg/infra/cyg_type.h> // common types etc.
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/kernel/mqueue.hxx> // eCos Mqueue Header
+#include <cyg/kernel/sched.hxx> // Cyg_Scheduler::lock()
+#include <cyg/kernel/sched.inl> // inlines for above
+#include <mqueue.h> // Standard POSIX mqueue header
+#include <sys/types.h> // mode_t, ssize_t
+#include <limits.h> // PATH_MAX
+#include <stdlib.h> // malloc, etc.
+#include <errno.h> // errno
+#include <fcntl.h> // O_*
+#include <stdarg.h> // varargs
+#include <pthread.h> // mutexes
+#include <string.h> // strncpy
+#ifdef CYGFUN_POSIX_MQUEUE_NOTIFY
+# include <signal.h>
+# include "pprivate.h" // cyg_sigqueue()
+#endif
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+# include <time.h>
+# include "pprivate.h" // cyg_timespec_to_ticks()
+#endif
+
+/* CONSTANTS */
+
+#define MQ_VALID_MAGIC 0x6db256c1
+
+/* TYPE DEFINITIONS */
+
+struct mqtabent;
+
+// this is a queue user - each one of these corresponds to a mqd_t
+struct mquser {
+ int flags; // O_RDONLY, O_WRONLY, O_RDWR, O_NONBLOCK
+ struct mqtabent *tabent; // back pointer to table entry
+ struct mquser *next;
+ bool notifieruser; // POSIX sucks so bad. It requires a mq_close
+ // to only deregister the notification if it
+ // was done via this descriptor. So we have to
+ // know if it was this one
+#ifdef CYGIMP_POSIX_MQUEUE_VALIDATE_DESCRIPTOR
+ cyg_uint32 magic; // magic number: MQ_VALID_MAGIC if valid
+#endif
+};
+
+struct mqtabent {
+ char name[ PATH_MAX ]; // ascii name - set to "" when unused
+ Cyg_Mqueue *mq; // the underlying queue object
+ long maxmsg; // as set on creation
+ long msgsize; // as set on creation
+ bool unlinkme; // unlink when final user closes?
+ struct mquser *users; // each user
+
+#ifdef CYGFUN_POSIX_MQUEUE_NOTIFY
+ const struct sigevent *sigev; // notification event
+#endif
+};
+
+/* GLOBALS */
+
+static struct mqtabent mqtab[ CYGNUM_POSIX_MQUEUE_OPEN_MAX ];
+static pthread_mutex_t mqtab_mut = PTHREAD_MUTEX_INITIALIZER;
+
+/* LOCAL FUNCTIONS */
+
+//------------------------------------------------------------------------
+
+// placement new definition
+inline void *operator new(size_t size, void *ptr)
+{
+ CYG_CHECK_DATA_PTR( ptr, "Bad pointer" );
+ return ptr;
+}
+
+// Deallocation callback from Cyg_Mqueue
+static void
+my_free( void *ptr, size_t )
+{
+ free( ptr );
+}
+
+//------------------------------------------------------------------------
+
+// Do the actual "unlink" of a queue, i.e. mark it invalid in the table.
+// The table mutex is assumed to be locked
+static void
+do_mq_unlink( struct mqtabent *tabent )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_CHECK_DATA_PTRC( tabent );
+
+ tabent->name[0] = '\0'; // won't match anything the user sends now
+ tabent->mq->~Cyg_Mqueue();
+ free( tabent->mq );
+ tabent->mq=NULL;
+
+ CYG_REPORT_RETURN();
+}
+
+//------------------------------------------------------------------------
+
+#ifdef CYGFUN_POSIX_MQUEUE_NOTIFY
+
+static void
+notifyme( Cyg_Mqueue &q, CYG_ADDRWORD data )
+{
+ CYG_REPORT_FUNCTION();
+ struct mquser *user = (struct mquser *)data;
+ CYG_CHECK_DATA_PTRC( user );
+ struct mqtabent *tabent = user->tabent;
+ CYG_CHECK_DATA_PTRC( tabent );
+
+ Cyg_Scheduler::lock();
+ // we may have been pre-empted before this, so check there's still a
+ // notification to do
+
+ if ( NULL == tabent->sigev ) {
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETURN();
+ return;
+ } // if
+
+ const struct sigevent *ev = tabent->sigev;
+
+ // first deregister
+ q.setnotify( NULL, 0 );
+ tabent->sigev = NULL;
+ user->notifieruser = false; // not any more
+
+ // now the rest of the world can go
+ Cyg_Scheduler::unlock();
+
+ // queue event. If it fails... nothing we can do :-( so ignore return code
+ cyg_sigqueue( ev, SI_MESGQ );
+
+ cyg_deliver_signals();
+
+ CYG_REPORT_RETURN();
+}
+
+#endif // ifdef CYGFUN_POSIX_MQUEUE_NOTIFY
+
+//------------------------------------------------------------------------
+
+/* EXPORTED FUNCTIONS */
+
+externC mqd_t
+mq_open( const char *name, int oflag, ... )
+{
+ CYG_REPORT_FUNCTYPE( "returning %08x" );
+ CYG_REPORT_FUNCARG2( "name=%08x, oflag=%d", name, oflag );
+ CYG_CHECK_DATA_PTRC( name );
+
+ if ( ((oflag & O_RDONLY) != O_RDONLY) &&
+ ((oflag & O_WRONLY) != O_WRONLY) &&
+ ((oflag & O_RDWR) != O_RDWR)) {
+ // user didn't specify mode
+ errno = EINVAL;
+ CYG_REPORT_RETVAL( -1 );
+ return (mqd_t)-1;
+ } // if
+
+ mqd_t retval;
+ cyg_ucount32 i;
+ struct mqtabent *qtabent=NULL;
+ int interr;
+
+ interr = pthread_mutex_lock( &mqtab_mut );
+ // should never fail
+ CYG_ASSERT( interr == 0, "internal lock failed!" );
+
+ // find if a matching entry exists first
+ // FIXME: Should check for length and return ENAMETOOLONG
+ for ( i=0; i < CYGNUM_POSIX_MQUEUE_OPEN_MAX; i++ ) {
+ if ( 0 == strncmp(name, mqtab[i].name, PATH_MAX) ) {
+ qtabent = &mqtab[i];
+ break;
+ } // if
+ } // for
+
+ if ( (NULL != qtabent) && (O_EXCL == (oflag & O_EXCL)) ) {
+ errno = EEXIST;
+ retval = (mqd_t)-1;
+ goto exit_unlock;
+ }
+
+ if ( (NULL == qtabent) && (O_CREAT != (oflag & O_CREAT)) ) {
+ errno = ENOENT;
+ retval = (mqd_t)-1;
+ goto exit_unlock;
+ }
+
+ // so if we didn't find something, we must be being asked to create it
+ if (NULL == qtabent) {
+ mode_t mode; // FIXME: mode ignored for now
+ const struct mq_attr *attr;
+ const struct mq_attr default_attr = { 0, MQ_OPEN_MAX, 128 };
+ va_list args;
+
+ va_start( args, oflag );
+ mode = va_arg( args, mode_t );
+ attr = va_arg( args, struct mq_attr * );
+ va_end( args );
+
+ // find an empty table entry
+ for ( i=0; i < CYGNUM_POSIX_MQUEUE_OPEN_MAX; i++ ) {
+ if ( NULL == mqtab[i].mq )
+ break;
+ }
+
+ // if not found, table is full
+ if ( i == CYGNUM_POSIX_MQUEUE_OPEN_MAX ) {
+ errno = ENFILE;
+ retval = (mqd_t)-1;
+ goto exit_unlock;
+ }
+
+ Cyg_Mqueue::qerr_t qerr;
+
+ // user can specify NULL attr, which means arbitrary message queue
+ // size! Duh.
+ if ( NULL == attr )
+ attr = &default_attr;
+ else {
+ // if they do supply one, POSIX says we're meant to check it
+ if (attr->mq_maxmsg <= 0 || attr->mq_msgsize <= 0) {
+ errno = EINVAL;
+ retval = (mqd_t)-1;
+ goto exit_unlock;
+ }
+ } // else
+
+ // allocate the underlying queue
+ Cyg_Mqueue *mqholder = (Cyg_Mqueue *)malloc( sizeof(Cyg_Mqueue) );
+ if ( NULL == mqholder ) {
+ errno = ENOSPC;
+ retval = (mqd_t)-1;
+ goto exit_unlock;
+ }
+
+ // construct it with placement new
+ mqtab[i].mq = new (mqholder) Cyg_Mqueue( attr->mq_maxmsg,
+ attr->mq_msgsize,
+ &malloc, &my_free, &qerr );
+
+ switch (qerr) {
+ case Cyg_Mqueue::OK:
+ break;
+ case Cyg_Mqueue::NOMEM:
+ free( mqholder );
+ errno = ENOSPC;
+ retval = (mqd_t)-1;
+ goto exit_unlock;
+ default:
+ CYG_FAIL("Unhandled Cyg_Mqueue constructor return error");
+ break;
+ } // switch
+
+ mqtab[i].users = (struct mquser *) malloc( sizeof(struct mquser) );
+ if ( NULL == mqtab[i].users ) {
+ mqtab[i].mq->~Cyg_Mqueue();
+ free( mqholder );
+ errno = ENOSPC;
+ retval = (mqd_t)-1;
+ goto exit_unlock;
+ }
+
+ // initialize mqtab[i]
+ mqtab[i].maxmsg = attr->mq_maxmsg;
+ mqtab[i].msgsize = attr->mq_msgsize;
+ mqtab[i].unlinkme = false;
+#ifdef CYGFUN_POSIX_MQUEUE_NOTIFY
+ mqtab[i].sigev = NULL;
+#endif
+ strncpy( mqtab[i].name, name, PATH_MAX );
+
+ // initialize first mqtab[i].users
+ mqtab[i].users->next = NULL;
+ // set the mode for later, but also note that O_NONBLOCK can
+ // be set in oflags *or* the attr the user passed
+ mqtab[i].users->flags = oflag | (attr->mq_flags & O_NONBLOCK);
+
+ // set back pointer so that message queue handle can find actual queue
+ mqtab[i].users->tabent = &mqtab[i];
+
+ mqtab[i].users->notifieruser = false;
+
+#ifdef CYGIMP_POSIX_MQUEUE_VALIDATE_DESCRIPTOR
+ mqtab[i].users->magic = MQ_VALID_MAGIC; // now valid
+#endif
+
+ retval=(mqd_t)mqtab[i].users;
+
+ goto exit_unlock;
+ } // if (NULL == qtabent)
+
+ // so we're not creating, and we have a valid qtabent
+
+ // But this qtabent may be being unlinked. If so, we are permitted
+ // to return an error, so we will. (see under mq_unlink() in POSIX)
+ // Which error though? EINVAL seems best, but POSIX doesn't say :-/
+
+ if (true == qtabent->unlinkme) {
+ errno = EINVAL;
+ retval = (mqd_t)-1;
+ goto exit_unlock;
+ }
+
+ // now we have a usable qtabent
+
+ struct mquser *user;
+ user = (struct mquser *) malloc( sizeof(struct mquser) );
+ if ( NULL == user ) {
+ errno = ENOSPC;
+ retval = (mqd_t)-1;
+ goto exit_unlock;
+ }
+
+ // prepend to qtab user list
+ user->next = qtabent->users;
+ qtabent->users = user;
+
+ // set back pointer so that message queue handle can find actual queue
+ user->tabent = qtabent;
+
+ user->flags = oflag;
+
+#ifdef CYGIMP_POSIX_MQUEUE_VALIDATE_DESCRIPTOR
+ user->magic = MQ_VALID_MAGIC; // now valid
+#endif
+
+ retval=(mqd_t)user;
+
+ exit_unlock:
+ interr = pthread_mutex_unlock( &mqtab_mut );
+ // should never fail
+ CYG_ASSERT( interr == 0, "internal lock failed!" );
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+} // mq_open()
+
+//------------------------------------------------------------------------
+
+// NOTE: It is the *user*'s responsibility to ensure that nothing is
+// blocked in mq_send() or mq_receive() when closing the queue with
+// that descriptor. The standard does not specify the behaviour, so that's
+// what I am assuming
+
+externC int
+mq_close( mqd_t mqdes )
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+ CYG_REPORT_FUNCARG1XV( mqdes );
+
+ struct mquser *user = (struct mquser *)mqdes;
+
+#ifdef CYGIMP_POSIX_MQUEUE_VALIDATE_DESCRIPTOR
+ if ( user->magic != MQ_VALID_MAGIC ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+#endif
+
+ int interr;
+
+ interr = pthread_mutex_lock( &mqtab_mut );
+ // should never fail
+ CYG_ASSERT( interr == 0, "internal lock failed!" );
+
+ struct mqtabent *tabent = user->tabent;
+ struct mquser *usertmp;
+
+ // perhaps should return EBADF instead of assert?
+ CYG_ASSERT( tabent->users != NULL, "Null message queue user list" );
+
+#ifdef CYGFUN_POSIX_MQUEUE_NOTIFY
+ // deregister notification iff this was the message queue descriptor
+ // that was used to register it (POSIX says)
+ if ( true == user->notifieruser ) {
+ tabent->mq->setnotify( NULL, 0 );
+ tabent->sigev = NULL;
+ // not worth clearing notifieruser
+ }
+#endif
+
+ // find in the list for this queue and remove - sucks a bit, but seems
+ // best over all - the list shouldn't be too long
+ if ( tabent->users == user ) {
+ tabent->users = user->next; // remove
+ } else {
+ for ( usertmp=tabent->users;
+ NULL != usertmp->next;
+ usertmp = usertmp->next ) {
+ if ( usertmp->next == user )
+ break;
+ } // for
+
+ // perhaps should return EBADF instead of assert?
+ CYG_ASSERT( usertmp->next != NULL, "Couldn't find message queue user" );
+
+ usertmp->next = user->next; // remove
+ } // else
+
+#ifdef CYGIMP_POSIX_MQUEUE_VALIDATE_DESCRIPTOR
+ user->magic = 0; // invalidate
+#endif
+
+ // free it up
+ free( user );
+
+ if ( (true == tabent->unlinkme) && (NULL == tabent->users) ) {
+ do_mq_unlink( tabent );
+ } // if
+
+ interr = pthread_mutex_unlock( &mqtab_mut );
+ // should never fail
+ CYG_ASSERT( interr == 0, "internal lock failed!" );
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+} // mq_close()
+
+
+//------------------------------------------------------------------------
+
+externC int
+mq_unlink( const char *name )
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+ CYG_REPORT_FUNCARG1( "name=%s", name );
+
+ int retval, interr;
+ cyg_ucount32 i;
+ struct mqtabent *qtabent=NULL;
+
+ interr = pthread_mutex_lock( &mqtab_mut );
+ // should never fail
+ CYG_ASSERT( interr == 0, "internal lock failed!" );
+
+ // find the entry first
+ // FIXME: Should check for length and return ENAMETOOLONG
+ for ( i=0; i < CYGNUM_POSIX_MQUEUE_OPEN_MAX; i++ ) {
+ if ( 0 == strncmp(name, mqtab[i].name, PATH_MAX) ) {
+ qtabent = &mqtab[i];
+ break;
+ } // if
+ } // for
+
+ if ( NULL == qtabent ) { // not found
+ errno = ENOENT;
+ retval = -1;
+ goto exit_unlock;
+ }
+
+ if ( NULL != qtabent->users ) { // still in use
+ qtabent->unlinkme = true; // so mark it as pending deletion
+ } else {
+ do_mq_unlink( qtabent );
+ } // else
+
+ retval = 0;
+
+ exit_unlock:
+ interr = pthread_mutex_unlock( &mqtab_mut );
+ // should never fail
+ CYG_ASSERT( interr == 0, "internal lock failed!" );
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+} // mq_unlink()
+
+//------------------------------------------------------------------------
+
+externC int
+mq_send( mqd_t mqdes, const char *msg_ptr, size_t msg_len,
+ unsigned int msg_prio )
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+ CYG_REPORT_FUNCARG4( "mqdes=%08x, msg_ptr=%08x, msg_len=%u, msg_prio=%u",
+ mqdes, msg_ptr, msg_len, msg_prio );
+ CYG_CHECK_DATA_PTRC( msg_ptr );
+
+ struct mquser *user = (struct mquser *)mqdes;
+ struct mqtabent *tabent = user->tabent;
+
+#ifdef CYGIMP_POSIX_MQUEUE_VALIDATE_DESCRIPTOR
+ if ( user->magic != MQ_VALID_MAGIC ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+#endif
+
+ if ( msg_len > (size_t)tabent->msgsize ) {
+ errno = EMSGSIZE;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ if ( msg_prio > MQ_PRIO_MAX ) {
+ errno = EINVAL;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ if ( (O_WRONLY != (user->flags & O_WRONLY)) &&
+ (O_RDWR != (user->flags & O_RDWR)) ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ // go for it
+ Cyg_Mqueue::qerr_t err;
+ err = tabent->mq->put( msg_ptr, msg_len, msg_prio,
+ ((user->flags & O_NONBLOCK) != O_NONBLOCK) );
+ switch (err) {
+
+ case Cyg_Mqueue::INTR:
+ errno = EINTR;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+
+ case Cyg_Mqueue::WOULDBLOCK:
+ CYG_ASSERT( (user->flags & O_NONBLOCK) == O_NONBLOCK,
+ "Message queue assumed non-blocking when blocking requested"
+ );
+ errno = EAGAIN;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+
+ case Cyg_Mqueue::OK:
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+
+ default:
+ CYG_FAIL( "unhandled message queue return code" );
+ return -1; // keep compiler happy
+ } // switch
+} // mq_send()
+
+//------------------------------------------------------------------------
+
+
+externC ssize_t
+mq_receive( mqd_t mqdes, char *msg_ptr, size_t msg_len,
+ unsigned int *msg_prio )
+{
+ CYG_REPORT_FUNCTYPE( "returning %ld" );
+ CYG_REPORT_FUNCARG4( "mqdes=%08x, msg_ptr=%08x, msg_len=%u, msg_prio=%08x",
+ mqdes, msg_ptr, msg_len, msg_prio );
+ CYG_CHECK_DATA_PTRC( msg_ptr );
+ CYG_CHECK_DATA_PTRC( msg_ptr+msg_len-1 );
+ if ( NULL != msg_prio )
+ CYG_CHECK_DATA_PTRC( msg_prio );
+
+
+ struct mquser *user = (struct mquser *)mqdes;
+ struct mqtabent *tabent = user->tabent;
+
+#ifdef CYGIMP_POSIX_MQUEUE_VALIDATE_DESCRIPTOR
+ if ( user->magic != MQ_VALID_MAGIC ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return (ssize_t)-1;
+ }
+#endif
+
+ if ( (O_RDONLY != (user->flags & O_RDONLY)) &&
+ (O_RDWR != (user->flags & O_RDWR)) ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return (ssize_t)-1;
+ }
+
+ if ( msg_len < (size_t)tabent->msgsize ) {
+ errno = EMSGSIZE;
+ CYG_REPORT_RETVAL( -1 );
+ return (ssize_t)-1;
+ }
+
+ // go for it
+ Cyg_Mqueue::qerr_t err;
+ err = tabent->mq->get( msg_ptr, &msg_len, msg_prio,
+ ((user->flags & O_NONBLOCK) != O_NONBLOCK) );
+ switch (err) {
+
+ case Cyg_Mqueue::INTR:
+ errno = EINTR;
+ CYG_REPORT_RETVAL( -1 );
+ return (ssize_t)-1;
+
+ case Cyg_Mqueue::WOULDBLOCK:
+ CYG_ASSERT( (user->flags & O_NONBLOCK) == O_NONBLOCK,
+ "Message queue assumed non-blocking when blocking requested"
+ );
+ errno = EAGAIN;
+ CYG_REPORT_RETVAL( -1 );
+ return (ssize_t)-1;
+
+ case Cyg_Mqueue::OK:
+ CYG_ASSERT( msg_len <= (size_t)tabent->msgsize,
+ "returned message too long" );
+ if ( NULL != msg_prio )
+ CYG_ASSERT( *msg_prio <= MQ_PRIO_MAX,
+ "returned message has invalid priority" );
+ CYG_REPORT_RETVAL( msg_len );
+ return (ssize_t)msg_len;
+
+ default:
+ CYG_FAIL( "unhandled message queue return code" );
+ return (ssize_t)-1; // keep compiler happy
+ } // switch
+
+} // mq_receive()
+
+
+//------------------------------------------------------------------------
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+externC int
+mq_timedsend( mqd_t mqdes, const char *msg_ptr, size_t msg_len,
+ unsigned int msg_prio, const struct timespec *abs_timeout)
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+ CYG_REPORT_FUNCARG6( "mqdes=%08x, msg_ptr=%08x, msg_len=%u, msg_prio=%u, "
+ "abs_timeout = %lu, %ld",
+ mqdes, msg_ptr, msg_len, msg_prio,
+ abs_timeout->tv_sec, abs_timeout->tv_nsec);
+ CYG_CHECK_DATA_PTRC( msg_ptr );
+
+ struct mquser *user = (struct mquser *)mqdes;
+ struct mqtabent *tabent = user->tabent;
+
+#ifdef CYGIMP_POSIX_MQUEUE_VALIDATE_DESCRIPTOR
+ if ( user->magic != MQ_VALID_MAGIC ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+#endif
+
+ if ( msg_len > (size_t)tabent->msgsize ) {
+ errno = EMSGSIZE;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ if ( msg_prio > MQ_PRIO_MAX ) {
+ errno = EINVAL;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ if ( (O_WRONLY != (user->flags & O_WRONLY)) &&
+ (O_RDWR != (user->flags & O_RDWR)) ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ // go for it
+ Cyg_Mqueue::qerr_t err;
+ bool nonblocking = ((user->flags & O_NONBLOCK) == O_NONBLOCK);
+ bool badtimespec = (abs_timeout->tv_nsec < 0) ||
+ (abs_timeout->tv_nsec > 999999999l);
+ cyg_tick_count abs_ticks = cyg_timespec_to_ticks(abs_timeout);
+
+ // We should never time out if there is room in the queue. Simplest
+ // way to ensure this is to try the non-blocking put() first.
+ err = tabent->mq->put( msg_ptr, msg_len, msg_prio, false, abs_ticks );
+
+ // If the blocking variant would have blocked and that is what's wanted
+ if ( Cyg_Mqueue::WOULDBLOCK == err && !nonblocking && !badtimespec ) {
+ err = tabent->mq->put( msg_ptr, msg_len, msg_prio, true,
+ abs_ticks );
+ }
+
+ switch (err) {
+
+ case Cyg_Mqueue::INTR:
+ errno = EINTR;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+
+ case Cyg_Mqueue::WOULDBLOCK:
+ if (badtimespec) {
+ errno = EINVAL;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+ CYG_ASSERT( (user->flags & O_NONBLOCK) == O_NONBLOCK,
+ "Message queue assumed non-blocking when blocking requested"
+ );
+ errno = EAGAIN;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+
+ case Cyg_Mqueue::TIMEOUT:
+ errno = ETIMEDOUT;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+
+ case Cyg_Mqueue::OK:
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+
+ default:
+ CYG_FAIL( "unhandled message queue return code" );
+ return -1; // keep compiler happy
+ } // switch
+} // mq_timedsend()
+
+//------------------------------------------------------------------------
+
+
+externC ssize_t
+mq_timedreceive( mqd_t mqdes, char *msg_ptr, size_t msg_len,
+ unsigned int *msg_prio, const struct timespec *abs_timeout)
+{
+ CYG_REPORT_FUNCTYPE( "returning %ld" );
+ CYG_REPORT_FUNCARG6( "mqdes=%08x, msg_ptr=%08x, msg_len=%u, msg_prio=%08x, "
+ "abs_timeout = %lu, %ld",
+ mqdes, msg_ptr, msg_len, msg_prio,
+ abs_timeout->tv_sec, abs_timeout->tv_nsec );
+ CYG_CHECK_DATA_PTRC( msg_ptr );
+ CYG_CHECK_DATA_PTRC( msg_ptr+msg_len-1 );
+ if ( NULL != msg_prio )
+ CYG_CHECK_DATA_PTRC( msg_prio );
+
+
+ struct mquser *user = (struct mquser *)mqdes;
+ struct mqtabent *tabent = user->tabent;
+
+#ifdef CYGIMP_POSIX_MQUEUE_VALIDATE_DESCRIPTOR
+ if ( user->magic != MQ_VALID_MAGIC ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return (ssize_t)-1;
+ }
+#endif
+
+ if ( (O_RDONLY != (user->flags & O_RDONLY)) &&
+ (O_RDWR != (user->flags & O_RDWR)) ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return (ssize_t)-1;
+ }
+
+ if ( msg_len < (size_t)tabent->msgsize ) {
+ errno = EMSGSIZE;
+ CYG_REPORT_RETVAL( -1 );
+ return (ssize_t)-1;
+ }
+
+ // go for it
+ Cyg_Mqueue::qerr_t err;
+ bool nonblocking = ((user->flags & O_NONBLOCK) == O_NONBLOCK);
+ bool badtimespec = (abs_timeout->tv_nsec < 0) ||
+ (abs_timeout->tv_nsec > 999999999l);
+ cyg_tick_count abs_ticks = cyg_timespec_to_ticks(abs_timeout);
+
+ // We should never time out if there is something to read. Simplest
+ // way to ensure this is to try the non-blocking get() first.
+ err = tabent->mq->get( msg_ptr, &msg_len, msg_prio, false, abs_ticks );
+
+ // If the blocking variant would have blocked and that is what's wanted
+ if ( Cyg_Mqueue::WOULDBLOCK == err && !nonblocking && !badtimespec ) {
+ err = tabent->mq->get( msg_ptr, &msg_len, msg_prio, true, abs_ticks );
+ }
+
+ switch (err) {
+
+ case Cyg_Mqueue::INTR:
+ errno = EINTR;
+ CYG_REPORT_RETVAL( -1 );
+ return (ssize_t)-1;
+
+ case Cyg_Mqueue::WOULDBLOCK:
+ if (badtimespec) {
+ errno = EINVAL;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+ CYG_ASSERT( (user->flags & O_NONBLOCK) == O_NONBLOCK,
+ "Message queue assumed non-blocking when blocking requested"
+ );
+ errno = EAGAIN;
+ CYG_REPORT_RETVAL( -1 );
+ return (ssize_t)-1;
+
+ case Cyg_Mqueue::TIMEOUT:
+ errno = ETIMEDOUT;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+
+ case Cyg_Mqueue::OK:
+ CYG_ASSERT( msg_len <= (size_t)tabent->msgsize,
+ "returned message too long" );
+ if ( NULL != msg_prio )
+ CYG_ASSERT( *msg_prio <= MQ_PRIO_MAX,
+ "returned message has invalid priority" );
+ CYG_REPORT_RETVAL( msg_len );
+ return (ssize_t)msg_len;
+
+ default:
+ CYG_FAIL( "unhandled message queue return code" );
+ return (ssize_t)-1; // keep compiler happy
+ } // switch
+
+} // mq_timedreceive()
+
+//------------------------------------------------------------------------
+#endif
+
+#ifdef CYGFUN_POSIX_MQUEUE_NOTIFY
+
+externC int
+mq_notify( mqd_t mqdes, const struct sigevent *notification )
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+ CYG_REPORT_FUNCARG2( "mqdes=%08x, notification=%08x", mqdes, notification );
+ if ( NULL != notification )
+ CYG_CHECK_DATA_PTRC( notification );
+
+ struct mquser *user = (struct mquser *)mqdes;
+ struct mqtabent *tabent = user->tabent;
+
+#ifdef CYGIMP_POSIX_MQUEUE_VALIDATE_DESCRIPTOR
+ if ( user->magic != MQ_VALID_MAGIC ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+#endif
+
+ // lock scheduler since we test and set non-atomically
+ Cyg_Scheduler::lock();
+
+ // we are being told to clear the notification function
+ if ( NULL == notification ) {
+ tabent->mq->setnotify( NULL, 0 );
+ tabent->sigev = NULL;
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+ } // if
+
+ if ( NULL != tabent->sigev ) { // already registered
+ Cyg_Scheduler::unlock();
+ errno = EBUSY;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ } // if
+
+ tabent->sigev = notification;
+ user->notifieruser = true; // Used for deciding about whether to
+ // deregister in mq_close()
+ tabent->mq->setnotify( &notifyme, (CYG_ADDRWORD) user );
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+} // mq_notify()
+
+#endif // ifdef CYGFUN_POSIX_MQUEUE_NOTIFY
+
+//------------------------------------------------------------------------
+
+externC int
+mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat,
+ struct mq_attr *omqstat )
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+ CYG_REPORT_FUNCARG3( "mqdes=%08x, mqstat=%08x, omqstat=%08x",
+ mqdes, mqstat, omqstat );
+ CYG_CHECK_DATA_PTRC( mqstat );
+
+ struct mquser *user = (struct mquser *)mqdes;
+
+#ifdef CYGIMP_POSIX_MQUEUE_VALIDATE_DESCRIPTOR
+ if ( user->magic != MQ_VALID_MAGIC ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+#endif
+
+ if ( NULL != omqstat ) {
+ CYG_CHECK_DATA_PTRC( omqstat );
+ mq_getattr( mqdes, omqstat );
+ } // if
+
+ // Two-stage update, so lock sched since it's quick
+ Cyg_Scheduler::lock();
+ user->flags &= ~O_NONBLOCK; // clear
+ if ( (mqstat->mq_flags & O_NONBLOCK) == O_NONBLOCK ) {
+ user->flags |= O_NONBLOCK;
+ } // if
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+} // mq_setattr()
+
+//------------------------------------------------------------------------
+
+externC int
+mq_getattr( mqd_t mqdes, struct mq_attr *mqstat )
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+ CYG_REPORT_FUNCARG2( "mqdes=%08x, mqstat=%08x", mqdes, mqstat );
+ CYG_CHECK_DATA_PTRC( mqstat );
+
+ struct mquser *user = (struct mquser *)mqdes;
+ struct mqtabent *tabent = user->tabent;
+
+#ifdef CYGIMP_POSIX_MQUEUE_VALIDATE_DESCRIPTOR
+ if ( user->magic != MQ_VALID_MAGIC ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+#endif
+
+ mqstat->mq_flags = user->flags;
+ mqstat->mq_maxmsg = tabent->maxmsg;
+ mqstat->mq_msgsize = tabent->msgsize;
+ mqstat->mq_curmsgs = tabent->mq->count();
+
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+} // mq_getattr()
+
+
+//------------------------------------------------------------------------
+
+#endif // ifdef CYGPKG_POSIX_MQUEUES
+
+/* EOF mqueue.cxx */
diff --git a/cesar/ecos/packages/compat/posix/current/src/mutex.cxx b/cesar/ecos/packages/compat/posix/current/src/mutex.cxx
new file mode 100644
index 0000000000..66dbf45147
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/src/mutex.cxx
@@ -0,0 +1,551 @@
+//==========================================================================
+//
+// pthread.cxx
+//
+// POSIX pthreads implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg, jlarmour, Wade Jensen
+// Date: 2000-03-27
+// Purpose: POSIX pthread implementation
+// Description: This file contains the implementation of the POSIX pthread
+// functions.
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/posix.h>
+
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include "pprivate.h" // POSIX private header
+
+#include <cyg/kernel/thread.hxx> // thread definitions
+#include <cyg/kernel/mutex.hxx> // mutex definitions
+#include <cyg/kernel/clock.hxx> // clock definitions
+#include <cyg/kernel/sched.hxx> // scheduler primitives
+#include <pthread.h>
+
+#include <cyg/kernel/thread.inl> // thread inlines
+#include <cyg/kernel/sched.inl> // scheduler inlines
+
+//-----------------------------------------------------------------------------
+// new operator to allow us to construct mutex objects
+
+inline void *operator new(size_t size, cyg_uint8 *ptr) { return (void *)ptr; };
+
+//=============================================================================
+// Mutexes
+
+//-----------------------------------------------------------------------------
+// Mutex attributes manipulation functions
+
+//-----------------------------------------------------------------------------
+// Initialize attribute object
+
+externC int pthread_mutexattr_init ( pthread_mutexattr_t *attr)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ attr->protocol = PTHREAD_PRIO_NONE;
+#ifdef _POSIX_THREAD_PRIO_PROTECT
+ attr->prioceiling = 0;
+#endif
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Destroy attribute object
+
+externC int pthread_mutexattr_destroy ( pthread_mutexattr_t *attr)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ // Nothing to do here...
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Optional functions depending on priority inversion protection options.
+
+#if defined(_POSIX_THREAD_PRIO_INHERIT) || defined(_POSIX_THREAD_PRIO_PROTECT)
+
+// Set priority inversion protection protocol
+externC int pthread_mutexattr_setprotocol ( pthread_mutexattr_t *attr,
+ int protocol)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ switch( protocol )
+ {
+ case PTHREAD_PRIO_NONE:
+#if defined(_POSIX_THREAD_PRIO_INHERIT)
+ case PTHREAD_PRIO_INHERIT:
+#endif
+#if defined(_POSIX_THREAD_PRIO_PROTECT)
+ case PTHREAD_PRIO_PROTECT:
+#endif
+ attr->protocol = protocol;
+ PTHREAD_RETURN(0);
+
+ default:
+ PTHREAD_RETURN(EINVAL);
+ }
+
+ PTHREAD_RETURN(0);
+}
+
+// Get priority inversion protection protocol
+externC int pthread_mutexattr_getprotocol ( pthread_mutexattr_t *attr,
+ int *protocol)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ if( protocol != NULL )
+ *protocol = attr->protocol;
+
+ PTHREAD_RETURN(0);
+}
+
+#if defined(_POSIX_THREAD_PRIO_PROTECT)
+
+// Set priority for priority ceiling protocol
+externC int pthread_mutexattr_setprioceiling ( pthread_mutexattr_t *attr,
+ int prioceiling)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+
+ attr->prioceiling = prioceiling;
+
+ PTHREAD_RETURN(0);
+}
+
+// Get priority for priority ceiling protocol
+externC int pthread_mutexattr_getprioceiling ( pthread_mutexattr_t *attr,
+ int *prioceiling)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ if( prioceiling != NULL )
+ *prioceiling = attr->prioceiling;
+
+ PTHREAD_RETURN(0);
+}
+
+// Set priority ceiling of given mutex, returning old ceiling.
+externC int pthread_mutex_setprioceiling( pthread_mutex_t *mutex,
+ int prioceiling,
+ int *old_ceiling)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(mutex);
+
+ pthread_mutex_lock( mutex );
+
+ Cyg_Mutex *mx = (Cyg_Mutex *)mutex;
+
+ if( old_ceiling != NULL )
+ *old_ceiling = mx->get_ceiling();
+
+ mx->set_ceiling( prioceiling );
+
+ pthread_mutex_unlock( mutex );
+
+ PTHREAD_RETURN(0);
+}
+
+// Get priority ceiling of given mutex
+externC int pthread_mutex_getprioceiling( pthread_mutex_t *mutex,
+ int *prioceiling)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(mutex);
+
+ Cyg_Mutex *mx = (Cyg_Mutex *)mutex;
+
+ if( prioceiling != NULL )
+ *prioceiling = mx->get_ceiling();
+
+ PTHREAD_RETURN(0);
+}
+
+#endif // defined(_POSIX_THREAD_PRIO_PROTECT)
+
+#endif // defined(_POSIX_THREAD_PRIO_INHERIT) || defined(_POSIX_THREAD_PRIO_PROTECT)
+
+//-----------------------------------------------------------------------------
+// Mutex functions
+
+//-----------------------------------------------------------------------------
+// Initialize mutex. If mutex_attr is NULL, use default attributes.
+
+externC int pthread_mutex_init (pthread_mutex_t *mutex,
+ const pthread_mutexattr_t *mutex_attr)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK( mutex );
+
+ pthread_mutexattr_t use_attr;
+
+ // Set up the attributes we are going to use
+ if( mutex_attr == NULL )
+ pthread_mutexattr_init( &use_attr );
+ else use_attr = *mutex_attr;
+
+ // Now translate the POSIX protocol identifier into the eCos one.
+ Cyg_Mutex::cyg_protcol protocol;
+
+ switch( use_attr.protocol )
+ {
+#if defined(_POSIX_THREAD_PRIO_PROTECT)
+ case PTHREAD_PRIO_PROTECT:
+ protocol = Cyg_Mutex::CEILING;
+ break;
+#endif
+#if defined(_POSIX_THREAD_PRIO_INHERIT)
+ case PTHREAD_PRIO_INHERIT:
+ protocol = Cyg_Mutex::INHERIT;
+ break;
+#endif
+ case PTHREAD_PRIO_NONE:
+ protocol = Cyg_Mutex::NONE;
+ break;
+
+ default:
+ PTHREAD_RETURN(EINVAL);
+ }
+
+ Cyg_Mutex *mx = new((cyg_uint8 *)mutex) Cyg_Mutex( protocol );
+
+ mx = mx; // silence compiler warning
+#if defined(_POSIX_THREAD_PRIO_PROTECT)
+ if ( protocol == Cyg_Mutex::CEILING )
+ mx->set_ceiling( use_attr.prioceiling );
+#endif
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Destroy mutex.
+
+externC int pthread_mutex_destroy (pthread_mutex_t *mutex)
+{
+ PTHREAD_ENTRY();
+
+ int err = ENOERR;
+
+ PTHREAD_CHECK( mutex );
+
+ Cyg_Mutex *mx = (Cyg_Mutex *)mutex;
+
+ if( mx->get_owner() != NULL )
+ err = EBUSY;
+ else mx->~Cyg_Mutex();
+
+ PTHREAD_RETURN(err);
+}
+
+//-----------------------------------------------------------------------------
+// Lock mutex, waiting for it if necessary.
+
+externC int pthread_mutex_lock (pthread_mutex_t *mutex)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK( mutex );
+
+ Cyg_Mutex *mx = (Cyg_Mutex *)mutex;
+
+ if( mx->get_owner() == Cyg_Thread::self() )
+ PTHREAD_RETURN(EDEADLK);
+
+ // Loop here until we acquire the mutex. Even if we are kicked out
+ // of the wait by a signal or release we must retry.
+ while( !mx->lock() )
+ continue;
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Try to lock mutex.
+
+externC int pthread_mutex_trylock (pthread_mutex_t *mutex)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK( mutex );
+
+ Cyg_Mutex *mx = (Cyg_Mutex *)mutex;
+
+ if( mx->get_owner() == Cyg_Thread::self() )
+ PTHREAD_RETURN(EDEADLK);
+
+ if( mx->trylock() )
+ PTHREAD_RETURN(0);
+
+ PTHREAD_RETURN(EBUSY);
+}
+
+
+//-----------------------------------------------------------------------------
+// Unlock mutex.
+
+externC int pthread_mutex_unlock (pthread_mutex_t *mutex)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK( mutex );
+
+ Cyg_Mutex *mx = (Cyg_Mutex *)mutex;
+
+ mx->unlock();
+
+ PTHREAD_RETURN(0);
+}
+
+
+//=============================================================================
+// Condition Variables
+
+//-----------------------------------------------------------------------------
+// Attribute manipulation functions
+// We do not actually support any attributes at present, so these do nothing.
+
+//-----------------------------------------------------------------------------
+// Initialize condition variable attributes
+
+externC int pthread_condattr_init (pthread_condattr_t *attr)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ // There are no condition variable attributes at present
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Destroy condition variable attributes
+
+externC int pthread_condattr_destroy (pthread_condattr_t *attr)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ // nothing to do here...
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Condition variable functions
+
+//-----------------------------------------------------------------------------
+// Initialize condition variable.
+
+externC int pthread_cond_init (pthread_cond_t *cond,
+ const pthread_condattr_t *attr)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK( cond );
+
+ Cyg_Condition_Variable *cv =
+ new((cyg_uint8 *)cond) Cyg_Condition_Variable();
+
+ cv = cv;
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Destroy condition variable.
+
+externC int pthread_cond_destroy (pthread_cond_t *cond)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK( cond );
+
+ ((Cyg_Condition_Variable *)cond)->~Cyg_Condition_Variable();
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Wake up one thread waiting for condition variable
+
+externC int pthread_cond_signal (pthread_cond_t *cond)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK( cond );
+
+ ((Cyg_Condition_Variable *)cond)->signal();
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Wake up all threads waiting for condition variable
+
+externC int pthread_cond_broadcast (pthread_cond_t *cond)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK( cond );
+
+ ((Cyg_Condition_Variable *)cond)->broadcast();
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Block on condition variable until signalled. The mutex is
+// assumed to be locked before this call, will be unlocked
+// during the wait, and will be re-locked on wakeup.
+
+externC int pthread_cond_wait (pthread_cond_t *cond,
+ pthread_mutex_t *mutex)
+{
+ PTHREAD_ENTRY();
+
+ // check for cancellation first.
+ PTHREAD_TESTCANCEL();
+
+ PTHREAD_CHECK( cond );
+ PTHREAD_CHECK( mutex );
+
+ ((Cyg_Condition_Variable *)cond)->wait( *(Cyg_Mutex *)mutex );
+
+ // check if we were woken because we were being cancelled
+ PTHREAD_TESTCANCEL();
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Block on condition variable until signalled, or the timeout expires.
+
+externC int pthread_cond_timedwait (pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime)
+{
+ PTHREAD_ENTRY();
+
+ // check for cancellation first.
+ PTHREAD_TESTCANCEL();
+
+ PTHREAD_CHECK( cond );
+ PTHREAD_CHECK( mutex );
+ PTHREAD_CHECK( abstime );
+
+ // Only initialize the converters once or they will consume a huge
+ // amount or runtime.
+
+ static struct Cyg_Clock::converter ns_converter;
+ static struct Cyg_Clock::converter sec_converter;
+ static volatile cyg_atomic conv_init;
+ if (!conv_init)
+ {
+
+ // Try to avoid unnecessarily locking the scheduler when we are not
+ // initializing the converters. Check the conv_init flag again to
+ // avoid race conditions.
+
+ struct Cyg_Clock::converter temp_ns_converter, temp_sec_converter;
+
+ Cyg_Clock::real_time_clock
+ ->get_other_to_clock_converter( 1, &temp_ns_converter );
+ Cyg_Clock::real_time_clock
+ ->get_other_to_clock_converter( 1000000000, &temp_sec_converter );
+
+ Cyg_Scheduler::lock();
+ if (!conv_init)
+ {
+ ns_converter = temp_ns_converter;
+ sec_converter = temp_sec_converter;
+ conv_init=1;
+ }
+ Cyg_Scheduler::unlock();
+ }
+
+ cyg_tick_count ticks;
+ ticks = Cyg_Clock::convert( abstime->tv_sec, &sec_converter );
+ ticks += Cyg_Clock::convert( abstime->tv_nsec, &ns_converter );
+
+ ((Cyg_Condition_Variable *)cond)->wait( *(Cyg_Mutex *)mutex, ticks );
+
+ // check if we were woken because we were being cancelled
+ PTHREAD_TESTCANCEL();
+
+ if ( Cyg_Thread::self()->get_wake_reason() == Cyg_Thread::TIMEOUT )
+ PTHREAD_RETURN(ETIMEDOUT);
+ else
+ PTHREAD_RETURN(0);
+}
+
+// -------------------------------------------------------------------------
+// EOF mutex.cxx
diff --git a/cesar/ecos/packages/compat/posix/current/src/pprivate.h b/cesar/ecos/packages/compat/posix/current/src/pprivate.h
new file mode 100644
index 0000000000..e76cdb0f45
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/src/pprivate.h
@@ -0,0 +1,271 @@
+#ifndef CYGONCE_PPRIVATE_H
+#define CYGONCE_PPRIVATE_H
+//=============================================================================
+//
+// pprivate.h
+//
+// POSIX types header
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-03-17
+// Purpose: POSIX private header
+// Description: This header contains various POSIX type definitions that are
+// shared between the various parts of the POSIX package.
+//
+// Usage: #include <pprivate.h>
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/posix.h>
+
+#include <stddef.h> // NULL, size_t
+
+#include <sys/types.h>
+#include <sched.h>
+#include <pthread.h>
+#include <errno.h> // error codes
+#include <signal.h> // sigset_t
+#include <limits.h> // PTHREAD_KEYS_MAX
+
+#include <cyg/posix/export.h> // POSIX exports header
+
+#include <cyg/kernel/thread.hxx> // thread definitions
+#include <cyg/kernel/mutex.hxx> // mutex definitions
+
+//=============================================================================
+// Constructor prioritization
+
+// Prioritization for POSIX library support objects
+#define CYGBLD_POSIX_INIT CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_COMPAT)
+
+// Prioritization for POSIX library startup initialization. This must
+// come after CYGBLD_POSIX_INIT constructors.
+#define CYGBLD_POSIX_START CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_COMPAT+5)
+
+//=============================================================================
+// Thread control data structure
+
+// Per-thread information needed by POSIX
+// This is pointed to by the CYGNUM_KERNEL_THREADS_DATA_POSIX entry of the
+// per-thread data.
+
+#ifdef CYGPKG_POSIX_PTHREAD
+typedef struct
+{
+ unsigned int state:4, // Thread state
+ cancelstate:2, // Cancel state of thread
+ canceltype:2, // Cancel type of thread
+ cancelpending:1, // pending cancel flag
+ freestack:1; // stack malloced, must be freed
+
+ pthread_t id; // My thread ID
+ Cyg_Thread *thread; // pointer to eCos thread object
+ pthread_attr_t attr; // Current thread attributes
+ void *retval; // return value
+ void *(*start_routine)(void *); // start routine
+ void *start_arg; // argument to start routine
+ char name[20]; // name string for debugging
+ Cyg_Condition_Variable *joiner; // joining threads wait here
+ CYG_ADDRWORD stackmem; // base of stack memory area
+ // only valid if freestack == true
+
+ struct pthread_cleanup_buffer *cancelbuffer; // stack of cleanup buffers
+
+#ifdef CYGPKG_POSIX_SIGNALS
+ sigset_t sigpending; // Set of pending signals
+ sigset_t sigmask; // Thread's signal mask
+#endif
+
+ // The following is space for the eCos thread object that underlies
+ // this POSIX thread. It is allocated like this to avoid constructing
+ // it on startup.
+ cyg_uint8 thread_obj[sizeof(Cyg_Thread)];
+
+ // And the same for the joiner condition variable.
+ cyg_uint8 joiner_obj[sizeof(Cyg_Condition_Variable)];
+
+ // Per-thread data table pointer
+ void **thread_data;
+
+} pthread_info;
+
+
+// Values for the state field. These are solely concerned with the
+// states visible to POSIX. The thread's run state is stored in the
+// eCos thread object.
+// Note: numerical order here is important, do not rearrange.
+
+#define PTHREAD_STATE_FREE 0 // This structure is free for reuse
+#define PTHREAD_STATE_DETACHED 1 // The thread is running but detached
+#define PTHREAD_STATE_RUNNING 2 // The thread is running and will wait
+ // to join when it exits
+#define PTHREAD_STATE_JOIN 3 // The thread has exited and is waiting
+ // to be joined
+#define PTHREAD_STATE_EXITED 4 // The thread has exited and is ready to
+ // be reaped
+#endif // ifdef CYGPKG_POSIX_PTHREAD
+//-----------------------------------------------------------------------------
+// Internal definitions
+
+// Handle entry to a pthread package function.
+#define PTHREAD_ENTRY() CYG_REPORT_FUNCTYPE( "returning %d" )
+
+// Handle entry to a pthread package function with no args.
+#define PTHREAD_ENTRY_VOID() CYG_REPORT_FUNCTION()
+
+// Do a pthread package defined return. This requires the error code to be
+// returned as the result of the function. This also gives us a place to
+// put any generic tidyup handling needed for things like signal delivery
+// and cancellation.
+#define PTHREAD_RETURN(err) \
+CYG_MACRO_START \
+ CYG_REPORT_RETVAL( err ); \
+ return err; \
+CYG_MACRO_END
+
+// A void variant of the above.
+#define PTHREAD_RETURN_VOID \
+CYG_MACRO_START \
+ CYG_REPORT_RETURN(); \
+ return; \
+CYG_MACRO_END
+
+// Check that a pointer passed in as an argument is valid and return
+// EINVAL if it is not. This should be used to check pointers that are
+// required to be valid. Pointers that may optionally be NULL should
+// be checked within the function.
+#define PTHREAD_CHECK(ptr) if( (ptr) == NULL ) PTHREAD_RETURN(EINVAL);
+
+#ifdef CYGPKG_POSIX_PTHREAD
+# define PTHREAD_TESTCANCEL() pthread_testcancel()
+#else
+# define PTHREAD_TESTCANCEL()
+#endif
+
+//-----------------------------------------------------------------------------
+// Priority translation.
+// eCos priorities run from 0 as the highest to 31 as the lowest. POSIX priorities
+// run in the opposite direction. The following macros translate between the two
+// priority ranges.
+
+#define PTHREAD_ECOS_PRIORITY(pri) (CYG_THREAD_MIN_PRIORITY-(pri))
+
+#define PTHREAD_POSIX_PRIORITY(pri) (CYG_THREAD_MIN_PRIORITY-(pri))
+
+//-----------------------------------------------------------------------------
+// Global data structures
+
+// Mutex for locking access to pthread_info structures
+extern Cyg_Mutex pthread_mutex;
+
+//-----------------------------------------------------------------------------
+// Functions exported by pthread.cxx to the other parts of the POSIX subsystem.
+
+#ifdef CYGPKG_POSIX_PTHREAD
+externC void cyg_posix_pthread_start( void );
+
+externC pthread_info *pthread_self_info(void);
+
+externC pthread_info *pthread_info_id( pthread_t id );
+
+# ifdef CYGPKG_POSIX_SIGNALS
+externC void cyg_posix_pthread_release_thread( sigset_t *mask );
+# endif
+#endif
+
+//-----------------------------------------------------------------------------
+// Functions exported by signal.cxx to the other parts of the POSIX subsystem.
+
+#ifdef CYGPKG_POSIX_SIGNALS
+externC void cyg_posix_signal_start();
+
+externC void cyg_posix_signal_asr(pthread_info *self);
+
+externC cyg_bool cyg_sigqueue( const struct sigevent *sev, int code,
+ pthread_info *thread = NULL );
+
+externC cyg_bool cyg_deliver_signals();
+
+externC void cyg_posix_signal_sigwait();
+
+externC void cyg_posix_thread_siginit( pthread_info *thread,
+ pthread_info *parentthread );
+
+externC void cyg_posix_thread_sigdestroy( pthread_info *thread );
+#endif
+
+//-----------------------------------------------------------------------------
+// Functions exported by time.cxx to other parts of the POSIX subsystem.
+
+#ifdef CYGPKG_POSIX_CLOCKS
+externC void cyg_posix_clock_start();
+
+externC cyg_tick_count cyg_timespec_to_ticks( const struct timespec *tp,
+ cyg_bool roundup = false);
+
+externC void cyg_ticks_to_timespec( cyg_tick_count ticks, struct timespec *tp );
+
+#endif
+
+#ifdef CYGPKG_POSIX_TIMERS
+
+externC void cyg_posix_timer_asr( pthread_info *self );
+
+#endif
+
+//-----------------------------------------------------------------------------
+// Functions exported by except.cxx
+
+#ifdef CYGPKG_POSIX_SIGNALS
+externC void cyg_posix_exception_start();
+
+externC void cyg_pthread_exception_init(pthread_info *thread);
+
+externC void cyg_pthread_exception_destroy(pthread_info *thread);
+#endif
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_PPRIVATE_H
+// End of pprivate.h
diff --git a/cesar/ecos/packages/compat/posix/current/src/pthread.cxx b/cesar/ecos/packages/compat/posix/current/src/pthread.cxx
new file mode 100644
index 0000000000..068cdf0a9a
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/src/pthread.cxx
@@ -0,0 +1,1679 @@
+//==========================================================================
+//
+// pthread.cxx
+//
+// POSIX pthreads implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg, jlarmour
+// Date: 2000-03-27
+// Purpose: POSIX pthread implementation
+// Description: This file contains the implementation of the POSIX pthread
+// functions.
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/posix.h>
+#include <pkgconf/isoinfra.h>
+#include <pkgconf/libc_startup.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include "pprivate.h" // POSIX private header
+
+#include <stdlib.h> // malloc(), free()
+
+#include <cyg/kernel/sched.hxx> // scheduler definitions
+#include <cyg/kernel/thread.hxx> // thread definitions
+#include <cyg/kernel/clock.hxx> // clock definitions
+
+#include <cyg/kernel/sched.inl> // scheduler inlines
+
+//-----------------------------------------------------------------------------
+// First check that the configuration contains the elements we need
+
+#ifndef CYGPKG_KERNEL
+#error POSIX pthread need eCos kernel
+#endif
+
+#ifndef CYGSEM_KERNEL_SCHED_MLQUEUE
+#error POSIX pthreads need MLQ scheduler
+#endif
+
+#ifndef CYGSEM_KERNEL_SCHED_TIMESLICE
+#error POSIX pthreads need timeslicing
+#endif
+
+#ifndef CYGVAR_KERNEL_THREADS_DATA
+#error POSIX pthreads need per-thread data
+#endif
+
+//=============================================================================
+// Internal data structures
+
+// Mutex for controlling access to shared data structures
+Cyg_Mutex pthread_mutex CYGBLD_POSIX_INIT;
+
+// Array of pthread control structures. A pthread_t object is
+// "just" an index into this array.
+static pthread_info *thread_table[CYGNUM_POSIX_PTHREAD_THREADS_MAX];
+
+// Count of number of threads in table.
+static int pthread_count = 0;
+
+// Count of number of threads that have exited and not been reaped.
+static int pthreads_exited;
+
+// Count of number of threads that are waiting to be joined
+static int pthreads_tobejoined;
+
+// Per-thread key allocation. This key map has a 1 bit set for each
+// key that is free, zero if it is allocated.
+#define KEY_MAP_TYPE cyg_uint32
+#define KEY_MAP_TYPE_SIZE (sizeof(KEY_MAP_TYPE)*8) // in BITS!
+static KEY_MAP_TYPE thread_key[PTHREAD_KEYS_MAX/KEY_MAP_TYPE_SIZE];
+static void (*key_destructor[PTHREAD_KEYS_MAX]) (void *);
+
+// Index of next pthread_info to allocate from thread_table array.
+static int thread_info_next = 0;
+
+// This is used to make pthread_t values unique even when reusing
+// a table slot. This allows CYGNUM_POSIX_PTHREAD_THREADS_MAX to range
+// up to 1024.
+#define THREAD_ID_COOKIE_INC 0x00000400
+#define THREAD_ID_COOKIE_MASK (THREAD_ID_COOKIE_INC-1)
+static pthread_t thread_id_cookie = THREAD_ID_COOKIE_INC;
+
+//-----------------------------------------------------------------------------
+// Main thread.
+
+#define MAIN_DEFAULT_STACK_SIZE \
+ (CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE < PTHREAD_STACK_MIN \
+ ? PTHREAD_STACK_MIN : CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE)
+
+static char main_stack[MAIN_DEFAULT_STACK_SIZE];
+
+// Thread ID of main thread.
+static pthread_t main_thread;
+
+//=============================================================================
+// Exported variables
+
+int pthread_canceled_dummy_var; // pointed to by PTHREAD_CANCELED
+
+//=============================================================================
+// Internal functions
+
+//-----------------------------------------------------------------------------
+// Private version of pthread_self() that returns a pointer to our internal
+// control structure.
+
+pthread_info *pthread_self_info(void)
+{
+ Cyg_Thread *thread = Cyg_Thread::self();
+
+ CYG_CHECK_DATA_PTR(thread, "Illegal current thread");
+
+ pthread_info *info = (pthread_info *)thread->get_data(CYGNUM_KERNEL_THREADS_DATA_POSIX);
+
+ // This assertion mustn't be enabled because sometimes we can legitimately
+ // carefully call this as long as we realise the value can be NULL.
+ // e.g. consider the use of this when inheriting sigmasks when in the
+ // context of creating the main() thread.
+// CYG_CHECK_DATA_PTR(info, "Not a POSIX thread!!!");
+
+ return info;
+}
+
+externC pthread_info *pthread_info_id( pthread_t id )
+{
+ pthread_t index = id & THREAD_ID_COOKIE_MASK;
+
+ pthread_info *info = thread_table[index];
+
+ // Check for a valid entry
+ if( info == NULL )
+ return NULL;
+
+ // Check that this is a valid entry
+ if ( info->state == PTHREAD_STATE_FREE ||
+ info->state == PTHREAD_STATE_EXITED )
+ return NULL;
+
+ // Check that the entry matches the id
+ if( info->id != id ) return NULL;
+
+ // Return the pointer
+ return info;
+}
+
+//-----------------------------------------------------------------------------
+// new operator to allow us to invoke the Cyg_Thread constructor on the
+// pthread_info.thread_obj array.
+
+inline void *operator new(size_t size, cyg_uint8 *ptr) { return (void *)ptr; };
+
+//-----------------------------------------------------------------------------
+// Optional memory allocation functions for pthread stacks.
+// If there is an implementation of malloc() available, define pthread_malloc()
+// and pthread_free() to use it. Otherwise define them to do nothing.
+// In the future we may want to add configuration here to permit thread stacks
+// to be allocated in a nominated memory pool separate from the standard malloc()
+// pool. Hence the (currently redundant) encapsulation of these functions.
+
+#if CYGINT_ISO_MALLOC
+
+static __inline__ CYG_ADDRWORD pthread_malloc( CYG_ADDRWORD size )
+{
+ return (CYG_ADDRWORD)malloc( size );
+}
+
+static __inline__ void pthread_free( CYG_ADDRWORD m )
+{
+ free( (void *)m );
+}
+
+#define PTHREAD_MALLOC
+
+#else
+
+#define pthread_malloc(_x_) (0)
+
+#define pthread_free(_x_)
+
+#endif
+
+//-----------------------------------------------------------------------------
+// pthread entry function.
+// does some housekeeping and then calls the user's start routine.
+
+static void pthread_entry(CYG_ADDRWORD data)
+{
+ pthread_info *self = (pthread_info *)data;
+
+ void *retval = self->start_routine(self->start_arg);
+
+ pthread_exit( retval );
+}
+
+//-----------------------------------------------------------------------------
+// Main entry function.
+// This is set as the start_routine of the main thread. It invokes main()
+// and if it returns, shuts down the system.
+
+externC void cyg_libc_invoke_main( void );
+
+static void *call_main( void * )
+{
+ cyg_libc_invoke_main();
+ return NULL; // placate compiler
+}
+
+//-----------------------------------------------------------------------------
+// Check whether there is a cancel pending and if so, whether
+// cancellations are enabled. We do it in this order to reduce the
+// number of tests in the common case - when no cancellations are
+// pending.
+// We make this inline so it can be called directly below for speed
+
+static __inline__ int
+checkforcancel( void )
+{
+ pthread_info *self = pthread_self_info();
+
+ if( self != NULL &&
+ self->cancelpending &&
+ self->cancelstate == PTHREAD_CANCEL_ENABLE )
+ return 1;
+ else
+ return 0;
+}
+
+
+//-----------------------------------------------------------------------------
+// POSIX ASR
+// This is installed as the ASR for all POSIX threads.
+
+static void posix_asr( CYG_ADDRWORD data )
+{
+ pthread_info *self = (pthread_info *)data;
+
+#ifdef CYGPKG_POSIX_TIMERS
+ // Call into timer subsystem to deliver any pending
+ // timer expirations.
+ cyg_posix_timer_asr(self);
+#endif
+
+#ifdef CYGPKG_POSIX_SIGNALS
+ // Call signal subsystem to deliver any signals
+ cyg_posix_signal_asr(self);
+#endif
+
+ // Check for cancellation
+ if( self->cancelpending &&
+ self->cancelstate == PTHREAD_CANCEL_ENABLE &&
+ self->canceltype == PTHREAD_CANCEL_ASYNCHRONOUS )
+ {
+ // If we have a pending cancellation, cancellations are
+ // enabled and we are in asynchronous mode, then we can do the
+ // cancellation processing. Since pthread_exit() does
+ // everything we need to do, we just call that here.
+
+ pthread_exit(PTHREAD_CANCELED);
+ }
+}
+
+//-----------------------------------------------------------------------------
+// The (Grim) Reaper.
+// This function is called to tidy up and dispose of any threads that have
+// exited. This work must be done from a thread other than the one exiting.
+// Note: this function _must_ be called with pthread_mutex locked.
+
+static void pthread_reap()
+{
+ int i;
+
+ // Loop over the thread table looking for exited threads. The
+ // pthreads_exited counter springs us out of this once we have
+ // found them all (and keeps us out if there are none to do).
+
+ for( i = 0; pthreads_exited && i < CYGNUM_POSIX_PTHREAD_THREADS_MAX ; i++ )
+ {
+ pthread_info *thread = thread_table[i];
+
+ if( thread != NULL && thread->state == PTHREAD_STATE_EXITED )
+ {
+ // The thread has exited, so it is a candidate for being
+ // reaped. We have to make sure that the eCos thread has
+ // also reached EXITED state before we can tidy it up.
+
+ while( thread->thread->get_state() != Cyg_Thread::EXITED )
+ {
+ // The eCos thread has not yet exited. This is
+ // probably because its priority is too low to allow
+ // it to complete. We fix this here by raising its
+ // priority to equal ours and then yielding. This
+ // should eventually get it into exited state.
+
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Set thread's priority to our current dispatching priority.
+ thread->thread->set_priority( self->get_current_priority() );
+
+ // Yield, yield
+ self->yield();
+
+ // and keep looping until he exits.
+ }
+
+ // At this point we have a thread that we can reap.
+
+ // destroy the eCos thread
+ thread->thread->~Cyg_Thread();
+
+ // destroy the joiner condvar
+ thread->joiner->~Cyg_Condition_Variable();
+
+#ifdef CYGPKG_POSIX_SIGNALS
+ // Destroy signal handling fields
+ cyg_posix_thread_sigdestroy( thread );
+#endif
+
+ // Free the stack if we allocated it
+ if( thread->freestack )
+ pthread_free( thread->stackmem );
+
+ // Finally, set the thread table entry to NULL so that it
+ // may be reused.
+ thread_table[i] = NULL;
+
+ pthread_count--;
+ pthreads_exited--;
+ }
+ }
+}
+
+//=============================================================================
+// Functions exported to rest of POSIX subsystem.
+
+//-----------------------------------------------------------------------------
+// Create the main() thread.
+
+externC void cyg_posix_pthread_start( void )
+{
+
+ // Initialize the per-thread data key map.
+
+ for( cyg_ucount32 i = 0; i < (PTHREAD_KEYS_MAX/KEY_MAP_TYPE_SIZE); i++ )
+ {
+ thread_key[i] = ~0;
+ }
+
+ // Create the main thread
+ pthread_attr_t attr;
+ struct sched_param schedparam;
+
+ schedparam.sched_priority = CYGNUM_POSIX_MAIN_DEFAULT_PRIORITY;
+
+ pthread_attr_init( &attr );
+ pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
+ pthread_attr_setstackaddr( &attr, &main_stack[sizeof(main_stack)] );
+ pthread_attr_setstacksize( &attr, sizeof(main_stack) );
+ pthread_attr_setschedpolicy( &attr, SCHED_RR );
+ pthread_attr_setschedparam( &attr, &schedparam );
+
+ pthread_create( &main_thread, &attr, call_main, NULL );
+}
+
+#ifdef CYGPKG_POSIX_SIGNALS
+//-----------------------------------------------------------------------------
+// Look for a thread that can accept delivery of any of the signals in
+// the mask and release it from any wait it is in. Since this may be
+// called from a DSR, it cannot use any locks internally - any locking
+// should be done before the call.
+
+externC void cyg_posix_pthread_release_thread( sigset_t *mask )
+{
+ int i;
+ int count = pthread_count;
+
+ // Loop over the thread table looking for a thread that has a
+ // signal mask that does not mask all the signals in mask.
+ // FIXME: find a more efficient way of doing this.
+
+ for( i = 0; count > 0 && i < CYGNUM_POSIX_PTHREAD_THREADS_MAX ; i++ )
+ {
+ pthread_info *thread = thread_table[i];
+
+ if( (thread != NULL) &&
+ (thread->state <= PTHREAD_STATE_RUNNING) &&
+ ((*mask & ~thread->sigmask) != 0) )
+ {
+ // This thread can service at least one of the signals in
+ // *mask. Knock it out of its wait and make its ASR pending.
+
+ thread->thread->set_asr_pending();
+ thread->thread->release();
+ break;
+ }
+
+ // Decrement count for each valid thread we find.
+ if( thread != NULL && thread->state != PTHREAD_STATE_FREE )
+ count--;
+ }
+}
+#endif
+
+//=============================================================================
+// General thread operations
+
+//-----------------------------------------------------------------------------
+// Thread creation and management.
+
+// Create a thread.
+externC int pthread_create ( pthread_t *thread,
+ const pthread_attr_t *attr,
+ void *(*start_routine) (void *),
+ void *arg)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(thread);
+ PTHREAD_CHECK(start_routine);
+
+ pthread_info *self = pthread_self_info();
+
+ pthread_attr_t use_attr;
+
+ // Set use_attr to the set of attributes we are going to
+ // actually use. Either those passed in, or the default set.
+
+ if( attr == NULL )
+ pthread_attr_init( &use_attr );
+ else use_attr = *attr;
+
+ // Adjust the attributes to cope with the setting of inheritsched.
+
+ if( use_attr.inheritsched == PTHREAD_INHERIT_SCHED )
+ {
+ CYG_ASSERT( NULL != self,
+ "Attempt to inherit sched policy from non-POSIX thread" );
+#ifdef CYGDBG_USE_ASSERTS
+ // paranoia check
+ int i;
+ for (i=(sizeof(thread_table)/sizeof(*thread_table))-1; i>=0; i--) {
+ if (thread_table[i] == self)
+ break;
+ }
+ CYG_ASSERT( i>=0, "Current pthread not found in table" );
+#endif
+ use_attr.schedpolicy = self->attr.schedpolicy;
+ use_attr.schedparam = self->attr.schedparam;
+ }
+
+ CYG_ADDRWORD stackbase, stacksize;
+ cyg_bool freestack = false;
+ CYG_ADDRWORD stackmem = 0;
+
+ // If the stack size is not valid, we can assume that it is at
+ // least PTHREAD_STACK_MIN bytes.
+
+ if( use_attr.stacksize_valid )
+ stacksize = use_attr.stacksize;
+ else stacksize = PTHREAD_STACK_MIN;
+
+ if( use_attr.stackaddr_valid )
+ {
+ // Set up stack base and size from supplied arguments.
+
+ // Calculate stack base from address and size.
+ // FIXME: Falling stack assumed in pthread_create().
+ stackmem = stackbase = (CYG_ADDRWORD)use_attr.stackaddr-stacksize;
+ }
+ else
+ {
+#ifdef PTHREAD_MALLOC
+
+ stackmem = stackbase = pthread_malloc( stacksize );
+
+ if( stackmem == 0 )
+ PTHREAD_RETURN( EAGAIN );
+
+ freestack = true;
+#else
+ PTHREAD_RETURN(EINVAL);
+#endif
+
+ }
+
+ // Get sole access to data structures
+
+ pthread_mutex.lock();
+
+ // Dispose of any dead threads
+ pthread_reap();
+
+ // Find a free slot in the thread table
+
+ pthread_info *nthread;
+ int thread_next = thread_info_next;
+
+ while( thread_table[thread_next] != NULL )
+ {
+ thread_next++;
+ if( thread_next >= CYGNUM_POSIX_PTHREAD_THREADS_MAX )
+ thread_next = 0;
+
+ // check for wrap, and return error if no slots left
+ if( thread_next == thread_info_next )
+ {
+ pthread_mutex.unlock();
+ if( freestack )
+ pthread_free( stackmem );
+ PTHREAD_RETURN(ENOMEM);
+ }
+ }
+
+ nthread = (pthread_info *)stackbase;
+
+ stackbase += sizeof(pthread_info);
+ stacksize -= sizeof(pthread_info);
+
+ thread_table[thread_next] = nthread;
+
+ // Set new next index
+ thread_info_next = thread_next;
+
+ // step the cookie
+ thread_id_cookie += THREAD_ID_COOKIE_INC;
+
+ // Initialize the table entry
+ nthread->state = use_attr.detachstate == PTHREAD_CREATE_JOINABLE ?
+ PTHREAD_STATE_RUNNING : PTHREAD_STATE_DETACHED;
+ nthread->id = thread_next+thread_id_cookie;
+ nthread->attr = use_attr;
+ nthread->retval = 0;
+ nthread->start_routine = start_routine;
+ nthread->start_arg = arg;
+
+ nthread->freestack = freestack;
+ nthread->stackmem = stackmem;
+
+ nthread->cancelstate = PTHREAD_CANCEL_ENABLE;
+ nthread->canceltype = PTHREAD_CANCEL_DEFERRED;
+ nthread->cancelbuffer = NULL;
+ nthread->cancelpending = false;
+
+ nthread->thread_data = NULL;
+
+#ifdef CYGVAR_KERNEL_THREADS_NAME
+ // generate a name for this thread
+
+ char *name = nthread->name;
+ static char *name_template = "pthread.00000000";
+ pthread_t id = nthread->id;
+
+ for( int i = 0; name_template[i]; i++ ) name[i] = name_template[i];
+
+ // dump the id, in hex into the name.
+ for( int i = 15; i >= 8; i-- )
+ {
+ name[i] = "0123456789ABCDEF"[id&0xF];
+ id >>= 4;
+ }
+
+#endif
+
+ // Initialize the joiner condition variable
+
+ nthread->joiner = new(nthread->joiner_obj) Cyg_Condition_Variable( pthread_mutex );
+
+#ifdef CYGPKG_POSIX_SIGNALS
+ // Initialize signal specific fields.
+ if (NULL != self) {
+ CYG_CHECK_DATA_PTR( self,
+ "Attempt to inherit signal mask from bogus pthread" );
+#ifdef CYGDBG_USE_ASSERTS
+ // paranoia check
+ int i;
+ for (i=(sizeof(thread_table)/sizeof(*thread_table))-1; i>=0; i--) {
+ if (thread_table[i] == self)
+ break;
+ }
+ CYG_ASSERT( i>=0, "Current pthread not found in table" );
+#endif
+ }
+ cyg_posix_thread_siginit( nthread, self );
+#endif
+
+ // create the underlying eCos thread
+
+ nthread->thread = new(&nthread->thread_obj[0])
+ Cyg_Thread ( PTHREAD_ECOS_PRIORITY(use_attr.schedparam.sched_priority),
+ pthread_entry,
+ (CYG_ADDRWORD)nthread,
+ name,
+ stackbase,
+ stacksize);
+
+ // Put pointer to pthread_info into eCos thread's per-thread data.
+ nthread->thread->set_data( CYGNUM_KERNEL_THREADS_DATA_POSIX, (CYG_ADDRWORD)nthread );
+
+ // Set timeslice enable according to scheduling policy.
+ if( use_attr.schedpolicy == SCHED_FIFO )
+ nthread->thread->timeslice_disable();
+ else nthread->thread->timeslice_enable();
+
+ // set up ASR and data
+ nthread->thread->set_asr( posix_asr, (CYG_ADDRWORD)nthread, NULL, NULL );
+
+ // return thread ID
+ *thread = nthread->id;
+
+ pthread_count++;
+
+ pthread_mutex.unlock();
+
+ // finally, set the thread going
+ nthread->thread->resume();
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Get current thread id.
+
+externC pthread_t pthread_self ( void )
+{
+ PTHREAD_ENTRY();
+
+ pthread_info *info = pthread_self_info();
+
+ CYG_CHECK_DATA_PTR(info, "Not a POSIX thread!!!");
+
+ return info->id;
+}
+
+//-----------------------------------------------------------------------------
+// Compare two thread identifiers.
+
+externC int pthread_equal (pthread_t thread1, pthread_t thread2)
+{
+ PTHREAD_ENTRY();
+
+ return thread1 == thread2;
+}
+
+//-----------------------------------------------------------------------------
+// Terminate current thread.
+
+externC void exit(int) CYGBLD_ATTRIB_NORET;
+
+externC void pthread_exit (void *retval)
+{
+ PTHREAD_ENTRY();
+
+ pthread_info *self = pthread_self_info();
+
+ // Disable cancellation requests for this thread. If cleanup
+ // handlers exist, they will generally be issuing system calls
+ // to clean up resources. We want these system calls to run
+ // without cancelling, and we also want to prevent being
+ // re-cancelled.
+ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
+
+ // Call cancellation handlers. We eat up the buffers as we go in
+ // case any of the routines calls pthread_exit() itself.
+ while( self->cancelbuffer != NULL )
+ {
+ struct pthread_cleanup_buffer *buffer = self->cancelbuffer;
+
+ self->cancelbuffer = buffer->prev;
+
+ buffer->routine(buffer->arg);
+ }
+
+ if( self->thread_data != NULL )
+ {
+ // Call per-thread key destructors.
+ // The specification of this is that we must continue to call the
+ // destructor functions until all the per-thread data values are NULL or
+ // we have done it PTHREAD_DESTRUCTOR_ITERATIONS times.
+
+ cyg_bool destructors_called;
+ int destructor_iterations = 0;
+
+ do
+ {
+ destructors_called = false;
+
+ for( cyg_ucount32 key = 0; key < PTHREAD_KEYS_MAX; key++ )
+ {
+ // Skip unallocated keys
+ if( thread_key[key/KEY_MAP_TYPE_SIZE] & 1<<(key%KEY_MAP_TYPE_SIZE) )
+ continue;
+
+ // Skip NULL destructors
+ if( key_destructor[key] == NULL ) continue;
+
+ // Skip NULL data values
+ if( self->thread_data[key] == NULL ) continue;
+
+ // If it passes all that, call the destructor.
+ // Note that NULLing the data value here is new
+ // behaviour in the 2001 POSIX standard.
+ {
+ void* value = self->thread_data[key];
+ self->thread_data[key] = NULL;
+ key_destructor[key](value);
+ }
+
+ // Record that we called a destructor
+ destructors_called = true;
+ }
+
+ // Count the iteration
+ destructor_iterations++;
+
+ } while( destructors_called &&
+ (destructor_iterations <= PTHREAD_DESTRUCTOR_ITERATIONS));
+
+ }
+
+ pthread_mutex.lock();
+
+ // Set the retval for any joiner
+ self->retval = retval;
+
+ // If we are already detached, go to EXITED state, otherwise
+ // go into JOIN state.
+
+ if ( PTHREAD_STATE_DETACHED == self->state ) {
+ self->state = PTHREAD_STATE_EXITED;
+ pthreads_exited++;
+ } else {
+ self->state = PTHREAD_STATE_JOIN;
+ pthreads_tobejoined++;
+ }
+
+ // Kick any waiting joiners
+ self->joiner->broadcast();
+
+ cyg_bool call_exit=false;
+
+ // if this is the last thread (other than threads waiting to be joined)
+ // then we need to call exit() later
+ if ( pthreads_exited + pthreads_tobejoined == pthread_count )
+ call_exit=true;
+
+ pthread_mutex.unlock();
+
+ // Finally, call the exit function; this will not return.
+ if ( call_exit )
+ ::exit(0);
+ else
+ self->thread->exit();
+
+ // This loop keeps some compilers happy. pthread_exit() is marked
+ // with the noreturn attribute, and without this they generate a
+ // call to abort() here in case Cyg_Thread::exit() returns.
+
+ for(;;) continue;
+}
+
+//-----------------------------------------------------------------------------
+// Wait for the thread to terminate. If thread_return is not NULL then
+// the retval from the thread's call to pthread_exit() is stored at
+// *thread_return.
+
+externC int pthread_join (pthread_t thread, void **thread_return)
+{
+ int err = 0;
+
+ PTHREAD_ENTRY();
+
+ // check for cancellation first.
+ pthread_testcancel();
+
+ pthread_mutex.lock();
+
+ // Dispose of any dead threads
+ pthread_reap();
+
+ pthread_info *self = pthread_self_info();
+ pthread_info *joinee = pthread_info_id( thread );
+
+ if( joinee == NULL )
+ {
+ err = ESRCH;
+ }
+
+ if( !err && joinee == self )
+ {
+ err = EDEADLK;
+ }
+
+ if ( !err ) {
+ switch ( joinee->state )
+ {
+ case PTHREAD_STATE_RUNNING:
+ // The thread is still running, we must wait for it.
+ while( joinee->state == PTHREAD_STATE_RUNNING ) {
+ if ( !joinee->joiner->wait() )
+ // check if we were woken because we were being cancelled
+ if ( checkforcancel() ) {
+ err = EAGAIN; // value unimportant, just some error
+ break;
+ }
+ }
+
+ // check that the thread is still joinable
+ if( joinee->state == PTHREAD_STATE_JOIN )
+ break;
+
+ // The thread has become unjoinable while we waited, so we
+ // fall through to complain.
+
+ case PTHREAD_STATE_FREE:
+ case PTHREAD_STATE_DETACHED:
+ case PTHREAD_STATE_EXITED:
+ // None of these may be joined.
+ err = EINVAL;
+ break;
+
+ case PTHREAD_STATE_JOIN:
+ break;
+ }
+ }
+
+ if ( !err ) {
+
+ // here, we know that joinee is a thread that has exited and is
+ // ready to be joined.
+
+ // Get the retval
+ if( thread_return != NULL )
+ *thread_return = joinee->retval;
+
+ // set state to exited.
+ joinee->state = PTHREAD_STATE_EXITED;
+ pthreads_exited++;
+ pthreads_tobejoined--;
+
+ // Dispose of any dead threads
+ pthread_reap();
+ }
+
+ pthread_mutex.unlock();
+
+ // check for cancellation before returning
+ pthread_testcancel();
+
+ PTHREAD_RETURN(err);
+}
+
+//-----------------------------------------------------------------------------
+// Set the detachstate of the thread to "detached". The thread then does not
+// need to be joined and its resources will be freed when it exits.
+
+externC int pthread_detach (pthread_t thread)
+{
+ PTHREAD_ENTRY();
+
+ int ret = 0;
+
+ pthread_mutex.lock();
+
+ pthread_info *detachee = pthread_info_id( thread );
+
+ if( detachee == NULL )
+ ret = ESRCH; // No such thread
+ else if( detachee->state == PTHREAD_STATE_DETACHED )
+ ret = EINVAL; // Already detached!
+ else
+ {
+ // Set state to detached and kick any joinees to
+ // make them return.
+ detachee->state = PTHREAD_STATE_DETACHED;
+ detachee->joiner->broadcast();
+ }
+
+ // Dispose of any dead threads
+ pthread_reap();
+
+ pthread_mutex.unlock();
+
+ PTHREAD_RETURN(ret);
+}
+
+
+//-----------------------------------------------------------------------------
+// Thread attribute handling.
+
+//-----------------------------------------------------------------------------
+// Initialize attributes object with default attributes:
+// detachstate == PTHREAD_CREATE_JOINABLE
+// scope == PTHREAD_SCOPE_SYSTEM
+// inheritsched == PTHREAD_INHERIT_SCHED
+// schedpolicy == SCHED_OTHER
+// schedparam == unset
+// stackaddr == unset
+// stacksize == 0
+//
+
+externC int pthread_attr_init (pthread_attr_t *attr)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ attr->detachstate = PTHREAD_CREATE_JOINABLE;
+ attr->scope = PTHREAD_SCOPE_SYSTEM;
+ attr->inheritsched = PTHREAD_INHERIT_SCHED;
+ attr->schedpolicy = SCHED_OTHER;
+ attr->schedparam.sched_priority = 0;
+ attr->stackaddr_valid = 0;
+ attr->stackaddr = NULL;
+ attr->stacksize_valid = 0;
+ attr->stacksize = 0;
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Destroy thread attributes object
+
+externC int pthread_attr_destroy (pthread_attr_t *attr)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ // Nothing to do here...
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Set the detachstate attribute
+
+externC int pthread_attr_setdetachstate (pthread_attr_t *attr,
+ int detachstate)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ if( detachstate == PTHREAD_CREATE_JOINABLE ||
+ detachstate == PTHREAD_CREATE_DETACHED )
+ {
+ attr->detachstate = detachstate;
+ PTHREAD_RETURN(0);
+ }
+
+ PTHREAD_RETURN(EINVAL);
+}
+
+//-----------------------------------------------------------------------------
+// Get the detachstate attribute
+externC int pthread_attr_getdetachstate (const pthread_attr_t *attr,
+ int *detachstate)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ if( detachstate != NULL )
+ *detachstate = attr->detachstate;
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Set scheduling contention scope
+
+externC int pthread_attr_setscope (pthread_attr_t *attr, int scope)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ if( scope == PTHREAD_SCOPE_SYSTEM ||
+ scope == PTHREAD_SCOPE_PROCESS )
+ {
+ if( scope == PTHREAD_SCOPE_PROCESS )
+ PTHREAD_RETURN(ENOTSUP);
+
+ attr->scope = scope;
+
+ PTHREAD_RETURN(0);
+ }
+
+ PTHREAD_RETURN(EINVAL);
+}
+
+//-----------------------------------------------------------------------------
+// Get scheduling contention scope
+
+externC int pthread_attr_getscope (const pthread_attr_t *attr, int *scope)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ if( scope != NULL )
+ *scope = attr->scope;
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Set scheduling inheritance attribute
+
+externC int pthread_attr_setinheritsched (pthread_attr_t *attr, int inherit)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ if( inherit == PTHREAD_INHERIT_SCHED ||
+ inherit == PTHREAD_EXPLICIT_SCHED )
+ {
+ attr->inheritsched = inherit;
+
+ PTHREAD_RETURN(0);
+ }
+
+ PTHREAD_RETURN(EINVAL);
+}
+
+//-----------------------------------------------------------------------------
+// Get scheduling inheritance attribute
+
+externC int pthread_attr_getinheritsched (const pthread_attr_t *attr,
+ int *inherit)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ if( inherit != NULL )
+ *inherit = attr->inheritsched;
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Set scheduling policy
+
+externC int pthread_attr_setschedpolicy (pthread_attr_t *attr, int policy)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ if( policy == SCHED_OTHER ||
+ policy == SCHED_FIFO ||
+ policy == SCHED_RR )
+ {
+ attr->schedpolicy = policy;
+
+ PTHREAD_RETURN(0);
+ }
+
+ PTHREAD_RETURN(EINVAL);
+}
+
+//-----------------------------------------------------------------------------
+// Get scheduling policy
+
+externC int pthread_attr_getschedpolicy (const pthread_attr_t *attr,
+ int *policy)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ if( policy != NULL )
+ *policy = attr->schedpolicy;
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Set scheduling parameters
+externC int pthread_attr_setschedparam (pthread_attr_t *attr,
+ const struct sched_param *param)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+ PTHREAD_CHECK(param);
+
+ attr->schedparam = *param;
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Get scheduling parameters
+
+externC int pthread_attr_getschedparam (const pthread_attr_t *attr,
+ struct sched_param *param)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ if( param != NULL )
+ *param = attr->schedparam;
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Set starting address of stack. Whether this is at the start or end of
+// the memory block allocated for the stack depends on whether the stack
+// grows up or down.
+
+externC int pthread_attr_setstackaddr (pthread_attr_t *attr, void *stackaddr)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ attr->stackaddr = stackaddr;
+ attr->stackaddr_valid = 1;
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Get any previously set stack address.
+
+externC int pthread_attr_getstackaddr (const pthread_attr_t *attr,
+ void **stackaddr)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ if( stackaddr != NULL )
+ {
+ if( attr->stackaddr_valid )
+ {
+ *stackaddr = attr->stackaddr;
+ PTHREAD_RETURN(0);
+ }
+ // Stack address not set, return EINVAL.
+ else PTHREAD_RETURN(EINVAL);
+ }
+
+ PTHREAD_RETURN(0);
+}
+
+
+//-----------------------------------------------------------------------------
+// Set minimum creation stack size.
+
+externC int pthread_attr_setstacksize (pthread_attr_t *attr,
+ size_t stacksize)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ CYG_ASSERT( stacksize >= PTHREAD_STACK_MIN, "Inadequate stack size supplied");
+
+ // Reject inadequate stack sizes
+ if( stacksize < PTHREAD_STACK_MIN )
+ PTHREAD_RETURN(EINVAL);
+
+ attr->stacksize_valid = 1;
+ attr->stacksize = stacksize;
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Get current minimal stack size.
+
+externC int pthread_attr_getstacksize (const pthread_attr_t *attr,
+ size_t *stacksize)
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK(attr);
+
+ // Reject attempts to get a stack size when one has not been set.
+ if( !attr->stacksize_valid )
+ PTHREAD_RETURN(EINVAL);
+
+ if( stacksize != NULL )
+ *stacksize = attr->stacksize;
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Thread scheduling controls
+
+//-----------------------------------------------------------------------------
+// Set scheduling policy and parameters for the thread
+
+externC int pthread_setschedparam (pthread_t thread_id,
+ int policy,
+ const struct sched_param *param)
+{
+ PTHREAD_ENTRY();
+
+ if( policy != SCHED_OTHER &&
+ policy != SCHED_FIFO &&
+ policy != SCHED_RR )
+ PTHREAD_RETURN(EINVAL);
+
+ PTHREAD_CHECK(param);
+
+ // The parameters seem OK, change the thread...
+
+ pthread_mutex.lock();
+
+ pthread_info *thread = pthread_info_id( thread_id );
+
+ if( thread == NULL )
+ {
+ pthread_mutex.unlock();
+ PTHREAD_RETURN(ESRCH);
+ }
+
+ thread->attr.schedpolicy = policy;
+ thread->attr.schedparam = *param;
+
+ if ( policy == SCHED_FIFO )
+ thread->thread->timeslice_disable();
+ else thread->thread->timeslice_enable();
+
+ thread->thread->set_priority( PTHREAD_ECOS_PRIORITY( param->sched_priority ));
+
+ pthread_mutex.unlock();
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Get scheduling policy and parameters for the thread
+
+externC int pthread_getschedparam (pthread_t thread_id,
+ int *policy,
+ struct sched_param *param)
+{
+ PTHREAD_ENTRY();
+
+ pthread_mutex.lock();
+
+ pthread_info *thread = pthread_info_id( thread_id );
+
+ if( thread == NULL )
+ {
+ pthread_mutex.unlock();
+ PTHREAD_RETURN(ESRCH);
+ }
+
+ if( policy != NULL )
+ *policy = thread->attr.schedpolicy;
+
+ if( param != NULL )
+ *param = thread->attr.schedparam;
+
+ pthread_mutex.unlock();
+
+ PTHREAD_RETURN(0);
+}
+
+
+//=============================================================================
+// Dynamic package initialization
+// Call init_routine just the once per control variable.
+
+externC int pthread_once (pthread_once_t *once_control,
+ void (*init_routine) (void))
+{
+ PTHREAD_ENTRY();
+
+ PTHREAD_CHECK( once_control );
+ PTHREAD_CHECK( init_routine );
+
+ pthread_once_t old;
+
+ // Do a test and set on the once_control object.
+ pthread_mutex.lock();
+
+ old = *once_control;
+ *once_control = 1;
+
+ pthread_mutex.unlock();
+
+ // If the once_control was zero, call the init_routine().
+ if( !old ) init_routine();
+
+ PTHREAD_RETURN(0);
+}
+
+
+//=============================================================================
+//Thread specific data
+
+//-----------------------------------------------------------------------------
+// Create a key to identify a location in the thread specific data area.
+// Each thread has its own distinct thread-specific data area but all are
+// addressed by the same keys. The destructor function is called whenever a
+// thread exits and the value associated with the key is non-NULL.
+
+externC int pthread_key_create (pthread_key_t *key,
+ void (*destructor) (void *))
+{
+ PTHREAD_ENTRY();
+
+ pthread_key_t k = -1;
+
+ pthread_mutex.lock();
+
+ // Find a key to allocate
+ for( cyg_ucount32 i = 0; i < (PTHREAD_KEYS_MAX/KEY_MAP_TYPE_SIZE); i++ )
+ {
+ if( thread_key[i] != 0 )
+ {
+ // We have a table slot with space available
+
+ // Get index of ls set bit.
+ HAL_LSBIT_INDEX( k, thread_key[i] );
+
+ // clear it
+ thread_key[i] &= ~(1<<k);
+
+ // Add index of word
+ k += i * KEY_MAP_TYPE_SIZE;
+
+ // Install destructor
+ key_destructor[k] = destructor;
+
+ // break out with key found
+ break;
+ }
+ }
+
+ if( k != -1 )
+ {
+ // plant a NULL in all the valid thread data slots for this
+ // key in case we are reusing a key we used before.
+
+ for( cyg_ucount32 i = 0; i < CYGNUM_POSIX_PTHREAD_THREADS_MAX ; i++ )
+ {
+ pthread_info *thread = thread_table[i];
+
+ if( thread != NULL && thread->thread_data != NULL )
+ thread->thread_data[k] = NULL;
+ }
+ }
+
+ pthread_mutex.unlock();
+
+ if( k == -1 ) PTHREAD_RETURN(EAGAIN);
+
+ *key = k;
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Delete key.
+
+externC int pthread_key_delete (pthread_key_t key)
+{
+ PTHREAD_ENTRY();
+
+ pthread_mutex.lock();
+
+ // Set the key bit to 1 to indicate it is free.
+ thread_key[key/KEY_MAP_TYPE_SIZE] |= 1<<(key%(KEY_MAP_TYPE_SIZE));
+
+ pthread_mutex.unlock();
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Store the pointer value in the thread-specific data slot addressed
+// by the key.
+
+externC int pthread_setspecific (pthread_key_t key, const void *pointer)
+{
+ PTHREAD_ENTRY();
+
+ if( thread_key[key/KEY_MAP_TYPE_SIZE] & 1<<(key%KEY_MAP_TYPE_SIZE) )
+ PTHREAD_RETURN(EINVAL);
+
+ pthread_info *self = pthread_self_info();
+
+ if( self->thread_data == NULL )
+ {
+ // Allocate the per-thread data table
+ self->thread_data =
+ (void **)self->thread->increment_stack_limit(
+ PTHREAD_KEYS_MAX * sizeof(void *) );
+
+ // Clear out all entries
+ for( int i = 0; i < PTHREAD_KEYS_MAX; i++ )
+ self->thread_data[i] = NULL;
+ }
+
+ self->thread_data[key] = (void *)pointer;
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Retrieve the pointer value in the thread-specific data slot addressed
+// by the key.
+
+externC void *pthread_getspecific (pthread_key_t key)
+{
+ void *val;
+ PTHREAD_ENTRY();
+
+ if( thread_key[key/KEY_MAP_TYPE_SIZE] & 1<<(key%KEY_MAP_TYPE_SIZE) )
+ PTHREAD_RETURN(NULL);
+
+ pthread_info *self = pthread_self_info();
+
+ if( self->thread_data == NULL )
+ val = NULL;
+ else val = self->thread_data[key];
+
+ PTHREAD_RETURN(val);
+}
+
+//=============================================================================
+// Thread Cancellation Functions
+
+//-----------------------------------------------------------------------------
+// Set cancel state of current thread to ENABLE or DISABLE.
+// Returns old state in *oldstate.
+
+externC int pthread_setcancelstate (int state, int *oldstate)
+{
+ PTHREAD_ENTRY();
+
+ if( state != PTHREAD_CANCEL_ENABLE &&
+ state != PTHREAD_CANCEL_DISABLE )
+ PTHREAD_RETURN(EINVAL);
+
+ pthread_mutex.lock();
+
+ pthread_info *self = pthread_self_info();
+
+ if( oldstate != NULL ) *oldstate = self->cancelstate;
+
+ self->cancelstate = state;
+
+ pthread_mutex.unlock();
+
+ // Note: This function may have made it possible for a pending
+ // cancellation to now be delivered. However the standard does not
+ // list this function as a cancellation point, so for now we do
+ // nothing. In future we might call pthread_testcancel() here.
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Set cancel type of current thread to ASYNCHRONOUS or DEFERRED.
+// Returns old type in *oldtype.
+
+externC int pthread_setcanceltype (int type, int *oldtype)
+{
+ PTHREAD_ENTRY();
+
+ if( type != PTHREAD_CANCEL_ASYNCHRONOUS &&
+ type != PTHREAD_CANCEL_DEFERRED )
+ PTHREAD_RETURN(EINVAL);
+
+ pthread_mutex.lock();
+
+ pthread_info *self = pthread_self_info();
+
+ if( oldtype != NULL ) *oldtype = self->canceltype;
+
+ self->canceltype = type;
+
+ pthread_mutex.unlock();
+
+ // Note: This function may have made it possible for a pending
+ // cancellation to now be delivered. However the standard does not
+ // list this function as a cancellation point, so for now we do
+ // nothing. In future we might call pthread_testcancel() here.
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Cancel the thread.
+
+externC int pthread_cancel (pthread_t thread)
+{
+ PTHREAD_ENTRY();
+
+ pthread_mutex.lock();
+
+ pthread_info *th = pthread_info_id(thread);
+
+ if( th == NULL )
+ {
+ pthread_mutex.unlock();
+ PTHREAD_RETURN(ESRCH);
+ }
+
+ th->cancelpending = true;
+
+ if ( th->cancelstate == PTHREAD_CANCEL_ENABLE )
+ {
+ if ( th->canceltype == PTHREAD_CANCEL_ASYNCHRONOUS )
+ {
+ // If the thread has cancellation enabled, and it is in
+ // asynchronous mode, set the eCos thread's ASR pending to
+ // deal with it when the thread wakes up. We also release the
+ // thread out of any current wait to make it wake up.
+
+ th->thread->set_asr_pending();
+ th->thread->release();
+ }
+ else if ( th->canceltype == PTHREAD_CANCEL_DEFERRED )
+ {
+ // If the thread has cancellation enabled, and it is in
+ // deferred mode, wake the thread up so that cancellation
+ // points can test for cancellation.
+ th->thread->release();
+ }
+ else
+ CYG_FAIL("Unknown cancellation type");
+ }
+
+ // Otherwise the thread has cancellation disabled, in which case
+ // it is up to the thread to enable cancellation
+
+ pthread_mutex.unlock();
+
+
+ PTHREAD_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Test for a pending cancellation for the current thread and terminate
+// the thread if there is one.
+
+externC void pthread_testcancel (void)
+{
+ PTHREAD_ENTRY_VOID();
+
+ if( checkforcancel() )
+ {
+ // If we have cancellation enabled, and there is a cancellation
+ // pending, then go ahead and do the deed.
+
+ // Exit now with special retval. pthread_exit() calls the
+ // cancellation handlers implicitly.
+ pthread_exit(PTHREAD_CANCELED);
+ }
+
+ PTHREAD_RETURN_VOID;
+}
+
+//-----------------------------------------------------------------------------
+// These two functions actually implement the cleanup push and pop functionality.
+
+externC void pthread_cleanup_push_inner (struct pthread_cleanup_buffer *buffer,
+ void (*routine) (void *),
+ void *arg)
+{
+ PTHREAD_ENTRY();
+
+ pthread_info *self = pthread_self_info();
+
+ buffer->routine = routine;
+ buffer->arg = arg;
+
+ buffer->prev = self->cancelbuffer;
+
+ self->cancelbuffer = buffer;
+
+ return;
+}
+
+externC void pthread_cleanup_pop_inner (struct pthread_cleanup_buffer *buffer,
+ int execute)
+{
+ PTHREAD_ENTRY();
+
+ pthread_info *self = pthread_self_info();
+
+ CYG_ASSERT( self->cancelbuffer == buffer, "Stacking error in cleanup buffers");
+
+ if( self->cancelbuffer == buffer )
+ {
+ // Remove the buffer from the stack
+ self->cancelbuffer = buffer->prev;
+ }
+ else
+ {
+ // If the top of the stack is not the buffer we expect, do not
+ // execute it.
+ execute = 0;
+ }
+
+ if( execute ) buffer->routine(buffer->arg);
+
+ return;
+}
+
+
+// -------------------------------------------------------------------------
+// eCos-specific function to measure stack usage of the supplied thread
+
+#ifdef CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT
+externC size_t pthread_measure_stack_usage (pthread_t thread)
+{
+ pthread_info *th = pthread_info_id(thread);
+
+ if ( NULL == th )
+ return (size_t)-1;
+
+ return (size_t)th->thread->measure_stack_usage();
+}
+#endif
+
+// -------------------------------------------------------------------------
+// EOF pthread.cxx
diff --git a/cesar/ecos/packages/compat/posix/current/src/sched.cxx b/cesar/ecos/packages/compat/posix/current/src/sched.cxx
new file mode 100644
index 0000000000..6ca47a3621
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/src/sched.cxx
@@ -0,0 +1,242 @@
+//==========================================================================
+//
+// sched.cxx
+//
+// POSIX scheduler API implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-03-27
+// Purpose: POSIX scheduler API implementation
+// Description: This file contains the implementation of the POSIX scheduler
+// functions.
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/posix.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include "pprivate.h" // POSIX private header
+
+#include <cyg/kernel/sched.hxx> // scheduler definitions
+#include <cyg/kernel/thread.hxx> // thread definitions
+
+#include <cyg/kernel/sched.inl> // scheduler inlines
+#include <cyg/kernel/thread.inl> // thread inlines
+
+//==========================================================================
+// Process scheduling functions.
+
+//--------------------------------------------------------------------------
+// Set scheduling parameters for given process.
+
+int sched_setparam (pid_t pid, const struct sched_param *param)
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+
+ if( pid != 0 )
+ {
+ errno = ESRCH;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ errno = ENOSYS;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+}
+
+//--------------------------------------------------------------------------
+// Get scheduling parameters for given process.
+
+int sched_getparam (pid_t pid, struct sched_param *param)
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+
+ if( pid != 0 )
+ {
+ errno = ESRCH;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ errno = ENOSYS;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+}
+
+//--------------------------------------------------------------------------
+// Set scheduling policy and/or parameters for given process.
+int sched_setscheduler (pid_t pid,
+ int policy,
+ const struct sched_param *param)
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+
+ if( pid != 0 )
+ {
+ errno = ESRCH;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ errno = ENOSYS;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+}
+
+
+//--------------------------------------------------------------------------
+// Get scheduling policy for given process.
+
+int sched_getscheduler (pid_t pid)
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+
+ if( pid != 0 )
+ {
+ errno = ESRCH;
+ CYG_REPORT_RETVAL( 0 );
+ return -1;
+ }
+
+ errno = ENOSYS;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+}
+
+//--------------------------------------------------------------------------
+// Force current thread to relinquish the processor.
+
+int sched_yield (void)
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+
+ Cyg_Thread::yield();
+
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+}
+
+
+//==========================================================================
+// Scheduler parameter limits.
+
+//--------------------------------------------------------------------------
+// Get maximum priority value for a policy.
+
+int sched_get_priority_max (int policy)
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+
+ if( policy != SCHED_FIFO &&
+ policy != SCHED_RR &&
+ policy != SCHED_OTHER )
+ {
+ errno = EINVAL;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ int pri = PTHREAD_POSIX_PRIORITY( CYG_THREAD_MAX_PRIORITY );
+
+ CYG_REPORT_RETVAL( pri );
+ return pri;
+}
+
+//--------------------------------------------------------------------------
+// Get minimum priority value for a policy.
+
+int sched_get_priority_min (int policy)
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+
+ if( policy != SCHED_FIFO &&
+ policy != SCHED_RR &&
+ policy != SCHED_OTHER )
+ {
+ errno = EINVAL;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ // idle thread priority isn't valid for general use, so subtract 1
+ int pri = PTHREAD_POSIX_PRIORITY( CYG_THREAD_MIN_PRIORITY-1 );
+
+ CYG_REPORT_RETVAL( pri );
+ return pri;
+}
+
+//--------------------------------------------------------------------------
+// Get the SCHED_RR interval for the given process.
+
+int sched_rr_get_interval (pid_t pid, struct timespec *t)
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+
+#ifdef CYGPKG_POSIX_CLOCKS
+ if( pid != 0 )
+ {
+ errno = ESRCH;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ cyg_ticks_to_timespec( CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS, t );
+
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+#else
+ errno = ENOSYS;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+#endif
+}
+
+// -------------------------------------------------------------------------
+// EOF sched.cxx
diff --git a/cesar/ecos/packages/compat/posix/current/src/sem.cxx b/cesar/ecos/packages/compat/posix/current/src/sem.cxx
new file mode 100644
index 0000000000..298dc66882
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/src/sem.cxx
@@ -0,0 +1,244 @@
+//==========================================================================
+//
+// sem.cxx
+//
+// POSIX semaphore implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-03-27
+// Purpose: POSIX semaphore implementation
+// Description: This file contains the implementation of the POSIX semaphore
+// functions.
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/posix.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <semaphore.h> // our header
+
+#include "pprivate.h" // POSIX private header
+
+#include <cyg/kernel/thread.hxx> // Kernel threads
+
+#include <cyg/kernel/thread.inl> // Cyg_ThreadQueue::empty()
+
+#include <cyg/kernel/sema.hxx> // Kernel semaphores
+
+// -------------------------------------------------------------------------
+// Internal definitions
+
+// Handle entry to a pthread package function.
+#define SEMA_ENTRY() CYG_REPORT_FUNCTYPE( "returning %d" );
+
+// Do a semaphore package defined return. This requires the error code
+// to be placed in errno, and if it is non-zero, -1 returned as the
+// result of the function. This also gives us a place to put any
+// generic tidyup handling needed for things like signal delivery and
+// cancellation.
+#define SEMA_RETURN(err) \
+CYG_MACRO_START \
+ int __retval = 0; \
+ if( err != 0 ) __retval = -1, errno = err; \
+ CYG_REPORT_RETVAL( __retval ); \
+ return __retval; \
+CYG_MACRO_END
+
+//-----------------------------------------------------------------------------
+// new operator to allow us to invoke the Cyg_Thread constructor on the
+// user's semaphore object.
+
+inline void *operator new(size_t size, void *ptr) { return (void *)ptr; };
+
+// -------------------------------------------------------------------------
+// Initialize semaphore to value.
+// pshared is not supported under eCos.
+
+externC int sem_init (sem_t *sem, int pshared, unsigned int value)
+{
+ SEMA_ENTRY();
+
+ if( value > SEM_VALUE_MAX )
+ SEMA_RETURN(EINVAL);
+
+ Cyg_Counting_Semaphore *sema;
+
+ sema = new((void *)sem) Cyg_Counting_Semaphore(value);
+
+ sema=sema;
+
+ SEMA_RETURN(0);
+}
+
+// -------------------------------------------------------------------------
+// Destroy the semaphore.
+
+externC int sem_destroy (sem_t *sem)
+{
+ SEMA_ENTRY();
+
+ Cyg_Counting_Semaphore *sema = (Cyg_Counting_Semaphore *)sem;
+
+ // Check that the semaphore has no waiters
+ if( sema->waiting() )
+ SEMA_RETURN(EBUSY);
+
+ // Call the destructor
+ sema->~Cyg_Counting_Semaphore();
+
+ SEMA_RETURN(0);
+}
+
+// -------------------------------------------------------------------------
+// Decrement value if >0 or wait for a post.
+
+externC int sem_wait (sem_t *sem)
+{
+ int retval = 0;
+
+ SEMA_ENTRY();
+
+#ifdef CYGPKG_POSIX_PTHREAD
+ // check for cancellation first.
+ pthread_testcancel();
+#endif
+
+ Cyg_Counting_Semaphore *sema = (Cyg_Counting_Semaphore *)sem;
+
+ if( !sema->wait() ) retval = EINTR;
+
+#ifdef CYGPKG_POSIX_PTHREAD
+ // check if we were woken because we were being cancelled
+ pthread_testcancel();
+#endif
+
+ SEMA_RETURN(retval);
+}
+
+// -------------------------------------------------------------------------
+// Decrement value if >0, return -1 if not.
+
+externC int sem_trywait (sem_t *sem)
+{
+ int retval = 0;
+
+ SEMA_ENTRY();
+
+ Cyg_Counting_Semaphore *sema = (Cyg_Counting_Semaphore *)sem;
+
+ if( !sema->trywait() ) retval = EAGAIN;
+
+ SEMA_RETURN(retval);
+}
+
+// -------------------------------------------------------------------------
+// Increment value and wake a waiter if one is present.
+
+externC int sem_post (sem_t *sem)
+{
+ SEMA_ENTRY();
+
+ Cyg_Counting_Semaphore *sema = (Cyg_Counting_Semaphore *)sem;
+
+ sema->post();
+
+ SEMA_RETURN(0);
+}
+
+
+// -------------------------------------------------------------------------
+// Get current value
+
+externC int sem_getvalue (sem_t *sem, int *sval)
+{
+ SEMA_ENTRY();
+
+ Cyg_Counting_Semaphore *sema = (Cyg_Counting_Semaphore *)sem;
+
+ *sval = sema->peek();
+
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+}
+
+// -------------------------------------------------------------------------
+// Open an existing named semaphore, or create it.
+
+externC sem_t *sem_open (const char *name, int oflag, ...)
+{
+ SEMA_ENTRY();
+
+ errno = ENOSYS;
+
+ CYG_REPORT_RETVAL( SEM_FAILED );
+ return SEM_FAILED;
+}
+
+// -------------------------------------------------------------------------
+// Close descriptor for semaphore.
+
+externC int sem_close (sem_t *sem)
+{
+ SEMA_ENTRY();
+
+ SEMA_RETURN(ENOSYS);
+}
+
+// -------------------------------------------------------------------------
+// Remove named semaphore
+
+externC int sem_unlink (const char *name)
+{
+ SEMA_ENTRY();
+
+ SEMA_RETURN(ENOSYS);
+}
+
+// -------------------------------------------------------------------------
+// EOF sem.cxx
diff --git a/cesar/ecos/packages/compat/posix/current/src/signal.cxx b/cesar/ecos/packages/compat/posix/current/src/signal.cxx
new file mode 100644
index 0000000000..80bc9c397b
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/src/signal.cxx
@@ -0,0 +1,1236 @@
+//==========================================================================
+//
+// signal.cxx
+//
+// POSIX signal functions implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Nick Garnett
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-03-27
+// Purpose: POSIX signal functions implementation
+// Description: This file contains the implementation of the POSIX signal
+// functions.
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/posix.h>
+
+#ifdef CYGPKG_POSIX_SIGNALS
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/isoinfra.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include "pprivate.h" // POSIX private header
+
+#include <signal.h> // our header
+#include <setjmp.h>
+#include <unistd.h> // _exit
+
+#include <cyg/kernel/clock.hxx>
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/clock.inl>
+#include <cyg/kernel/thread.inl>
+
+// -------------------------------------------------------------------------
+// Internal definitions
+
+// Handle entry to a signal package function.
+#define SIGNAL_ENTRY() CYG_REPORT_FUNCTYPE( "returning %d" );
+
+// Do a signal package defined return. This requires the error code
+// to be placed in errno, and if it is non-zero, -1 returned as the
+// result of the function. This also gives us a place to put any
+// generic tidyup handling needed for things like signal delivery and
+// cancellation.
+#define SIGNAL_RETURN(err) \
+CYG_MACRO_START \
+ int __retval = 0; \
+ if( err != 0 ) __retval = -1, errno = err; \
+ CYG_REPORT_RETVAL( __retval ); \
+ return __retval; \
+CYG_MACRO_END
+
+// Similarly for functions that have valid non-zero returns
+#define SIGNAL_RETURN_VALUE(val) \
+CYG_MACRO_START \
+ CYG_REPORT_RETVAL( val ); \
+ return val; \
+CYG_MACRO_END
+
+// Range check on a signal value.
+#define SIGNAL_VALID(_sig_) (((_sig_) > 0) && ((_sig_) < ((int)sizeof(sigset_t)*8)))
+
+//==========================================================================
+// Signal management structures
+
+typedef struct signal_info
+{
+ struct signal_info *next; // link in list of pending signals
+ siginfo_t si; // siginfo to pass to handler
+} signal_info;
+
+typedef struct
+{
+ struct sigaction sa; // Sigaction defining what to do
+ signal_info *pending; // List of pending signals - this is
+ // a circular list with pending pointing
+ // to the tail element (or NULL if empty).
+} signal_state;
+
+//==========================================================================
+// Signal management variables
+
+// Lock used to protect signal management structures
+Cyg_Mutex signal_mutex CYGBLD_POSIX_INIT;
+
+// Condition variable for all threads in sigsuspend() and sigwait()
+// to wait on.
+Cyg_Condition_Variable CYGBLD_POSIX_INIT signal_sigwait( signal_mutex ) ;
+
+// Global pending signal set
+sigset_t sig_pending;
+
+// Array controlling signal states
+static signal_state sigstate[sizeof(sigset_t)*8];
+
+// Array of available signal_info objects for queueing signals
+static signal_info siginfo[SIGQUEUE_MAX];
+
+// List of free signal_info objects
+static signal_info *siginfo_next = NULL;
+
+//==========================================================================
+// Variables used to support alarm()
+
+// Forward def of action function
+static void sigalrm_action( Cyg_Alarm *alarm, CYG_ADDRWORD data );
+
+// Kernel alarm object
+static Cyg_Alarm CYGBLD_POSIX_INIT sigalrm_alarm( Cyg_Clock::real_time_clock, sigalrm_action, 0 ) ;
+
+// Set true when alarm is armed
+volatile cyg_bool sigalrm_armed = false;
+
+// Set true when alarm has fired and is waiting to be delivered
+volatile cyg_bool sigalrm_pending = false;
+
+//==========================================================================
+// Implementation functions.
+// These are where the real work of the signal mechanism gets done.
+
+externC void cyg_posix_signal_start()
+{
+ // Chain all free signal_info objects together
+ for( int i = 0; i < SIGQUEUE_MAX; i++ )
+ {
+ siginfo[i].next = siginfo_next;
+ siginfo_next = &siginfo[i];
+ }
+
+ // initialize all signal actions to SIG_DFL
+ for ( unsigned int i=0; i<(sizeof(sigstate)/sizeof(signal_state)); i++ )
+ {
+ sigstate[i].sa.sa_handler = SIG_DFL;
+ }
+
+ // Clear the pending signal set
+ sigemptyset( &sig_pending );
+}
+
+// -------------------------------------------------------------------------
+// Generate a signal
+
+cyg_bool cyg_sigqueue( const struct sigevent *sev, int code,
+ pthread_info *thread )
+{
+ if( sev->sigev_notify == SIGEV_NONE )
+ {
+ // Do nothing
+ return true;
+ }
+
+ if( sev->sigev_notify == SIGEV_THREAD )
+ {
+ // create a thread to run the notification
+ // function.
+ // FIXME: implement SIGEV_THREAD
+ return true;
+ }
+
+ // Otherwise we must have a SIGEV_SIGNAL notification
+
+ // Find out whether the current thread already has the mutex
+ // locked. This is a distinct possibility if this function is
+ // called from the ASR while exiting the signal_sigwait condvar in
+ // pause() and sigtimedwait().
+
+ pthread_info *self = pthread_self_info();
+ cyg_bool locked = (self != NULL) && (signal_mutex.get_owner() == self->thread);
+
+ // Lock the mutex only if we do not already own it
+ if( !locked ) signal_mutex.lock();
+
+ int signo = sev->sigev_signo;
+ signal_state *ss = &sigstate[signo];
+
+ if( ss->sa.sa_flags & SA_SIGINFO )
+ {
+ // We have a queuable signal, allocate a signal_info
+ // object and add it to the queue.
+
+ if( siginfo_next == NULL )
+ {
+ if( !locked ) signal_mutex.unlock();
+ return false;
+ }
+
+ signal_info *si = siginfo_next;
+ siginfo_next = si->next;
+
+ si->si.si_signo = signo;
+ si->si.si_code = code;
+ si->si.si_value = sev->sigev_value;
+
+ if( ss->pending == NULL )
+ {
+ si->next = si;
+ }
+ else
+ {
+ si->next = ss->pending->next;
+ ss->pending->next = si;
+ }
+
+ ss->pending = si;
+ }
+ // else A non-queuable signal, just set it pending
+
+ if( thread != NULL )
+ {
+ sigaddset( &thread->sigpending, signo );
+ // just wake the thread up now if it's blocked somewhere
+ if ((thread->sigpending & ~thread->sigmask) != 0)
+ {
+ thread->thread->set_asr_pending();
+ thread->thread->release();
+ }
+ }
+ else
+ {
+ sigaddset( &sig_pending, signo );
+ // Wake up any threads in sigsuspend() and sigwait().
+ if (!signal_sigwait.get_queue()->empty())
+ {
+ signal_sigwait.broadcast();
+ }
+ else
+ {
+ cyg_posix_pthread_release_thread( &sig_pending );
+ }
+ }
+
+ if( !locked ) signal_mutex.unlock();
+
+ return true;
+}
+
+// -------------------------------------------------------------------------
+// Deliver any pending unblocked signals to the current thread
+// Returns true if a signal handler was called.
+
+cyg_bool cyg_deliver_signals()
+{
+ cyg_bool res = false;
+
+ pthread_info *self = pthread_self_info();
+
+ // If there is no pthread_info pointer for this thread then
+ // it is not a POSIX thread and cannot have signals delivered
+ // to it.
+
+ if( self == NULL ) return false;
+
+ // If there are no pending signals our work is done
+ if( sig_pending == 0 && self->sigpending == 0 )
+ return false;
+
+ // If there are no unmasked pending signals our
+ // work is also done
+ if( ((sig_pending | self->sigpending) & ~self->sigmask) == 0 )
+ return false;
+
+ // As with cyg_sigqueue(), this function can get called from an
+ // ASR where the signal_mutex is already locked. Check here to
+ // avoid relocking...
+
+ cyg_bool locked = signal_mutex.get_owner() == self->thread;
+
+ if( !locked ) signal_mutex.lock();
+
+ sigset_t todo;
+
+ // Since a signal handler may raise another signal, or unmask an existing
+ // signal, we loop here while there are no more unblocked signals pending.
+ while( (todo = ((sig_pending | self->sigpending) & ~self->sigmask)) != 0 )
+ {
+ // Here todo is a mask of the signals available for delivery
+
+ int signo = 0;
+
+ // This prioritizes low numbered signals
+ HAL_LSBIT_INDEX( signo, todo );
+
+ signal_state *ss = &sigstate[signo];
+ sigset_t sigbit = 1L<<signo;
+
+ if( ss->sa.sa_handler != SIG_IGN )
+ {
+ sigset_t oldmask = self->sigmask;
+ siginfo_t lsi;
+
+ if(ss->pending != NULL)
+ {
+ // There is a queued signal. Dequeue it and copy the
+ // siginfo object to a local copy.
+
+ signal_info *si = ss->pending->next;
+
+ // Make a local copy of the siginfo object
+ lsi = si->si;
+
+ // Remove the head signal_info object from the
+ // circular list.
+ if( ss->pending == si )
+ ss->pending = NULL;
+ else
+ ss->pending->next = si->next;
+
+ // Return it to the free list
+ si->next = siginfo_next;
+ siginfo_next = si;
+ }
+ else
+ {
+ // There are no signals queued. Set up the local siginfo_t
+ // object with default values.
+
+ lsi.si_signo = signo;
+ lsi.si_code = SI_USER;
+ lsi.si_value.sival_int = 0;
+ }
+
+ // Clear the bit from the pending masks. If the pending
+ // queue is not empty, leave the bits set, otherwise clear
+ // them. Do this now so that if the signal handler longjumps
+ // out, the signal subsystem is clean.
+
+ if( ss->pending == NULL )
+ {
+ // Clear the bit in both masks regardless of which
+ // one it actually came from. This is cheaper than
+ // trying to find out.
+ sig_pending &= ~sigbit;
+ self->sigpending &= ~sigbit;
+ }
+
+ // Add the mask set and the signal itself to the
+ // mask while we call the signal handler
+ self->sigmask = oldmask | ss->sa.sa_mask | sigbit;
+
+ // Unlock now so that a longjmp out of the handler
+ // does the right thing. We do this even if we did not
+ // lock the mutex since it will only recently have been
+ // relocked and thus all data is still consistent.
+
+ signal_mutex.unlock();
+
+ if( ss->sa.sa_flags & SA_SIGINFO )
+ {
+ // A sigaction delivery
+ CYG_CHECK_FUNC_PTR( ss->sa.sa_sigaction,
+ "Bad sa_sigaction signal handler" );
+ ss->sa.sa_sigaction( signo, &lsi, NULL );
+ }
+ else if ( ss->sa.sa_handler == SIG_DFL )
+ {
+ CYG_TRACE2( true,
+ "Unhandled POSIX signal: sig=%d, mask=%08x",
+ signo, oldmask );
+
+ // FIXME: should do something better here
+#if CYGINT_ISO_EXIT
+ _exit( -signo );
+#endif
+ CYG_FAIL("Unhandled POSIX signal");
+ }
+ else
+ {
+ // This is a standard signal delivery.
+ CYG_CHECK_FUNC_PTR( ss->sa.sa_handler,
+ "Bad sa_handler signal handler" );
+
+ ss->sa.sa_handler( signo );
+ }
+
+ // Relock the mutex
+ signal_mutex.lock();
+
+ // Restore original signal mask
+ self->sigmask = oldmask;
+
+ // return that we have handled a signal
+ res = true;
+ }
+ }
+
+ if( !locked ) signal_mutex.unlock();
+
+ return res;
+}
+
+// -------------------------------------------------------------------------
+// Utility routine to signal any threads waiting in sigwait*().
+
+void cyg_posix_signal_sigwait()
+{
+ signal_sigwait.broadcast();
+}
+
+// -------------------------------------------------------------------------
+// Action routine called from kernel alarm to deliver the SIGALRM signal.
+// We cannot call any signal delivery functions directly here, so we simply
+// set a flag and schedule an ASR to be called.
+
+static void sigalrm_action( Cyg_Alarm *alarm, CYG_ADDRWORD data )
+{
+ sigset_t mask;
+ sigalrm_armed = false;
+ sigalrm_pending = true;
+ sigemptyset( &mask );
+ sigaddset( &mask, SIGALRM );
+ // Wake up any threads in sigsuspend() and sigwait() in case they
+ // are waiting for an alarm, and would have SIGALRM masked
+ signal_sigwait.broadcast();
+
+ cyg_posix_pthread_release_thread( &mask );
+}
+
+// -------------------------------------------------------------------------
+// Check for SIGALRMs. This is called from the ASR and sigtimedwait()
+// as alarms need to be handled as a special case.
+
+static __inline__ void check_sigalarm(void)
+{
+ // If there is a pending SIGALRM, generate it
+ if( sigalrm_pending )
+ {
+ sigalrm_pending = false;
+
+ struct sigevent sev;
+
+ sev.sigev_notify = SIGEV_SIGNAL;
+ sev.sigev_signo = SIGALRM;
+ sev.sigev_value.sival_int = 0;
+
+ // generate the signal
+ cyg_sigqueue( &sev, SI_USER );
+ }
+}
+
+// -------------------------------------------------------------------------
+// signal ASR function. This is called from the general POSIX ASR to
+// deal with any signal related issues.
+
+externC void cyg_posix_signal_asr(pthread_info *self)
+{
+ check_sigalarm();
+
+ // Now call cyg_deliver_signals() to see if we can
+ // handle any signals now.
+
+ cyg_deliver_signals();
+}
+
+//==========================================================================
+// Per-thread initialization and destruction
+
+externC void cyg_posix_thread_siginit( pthread_info *thread,
+ pthread_info *parentthread )
+{
+ // Clear out signal masks
+ sigemptyset( &thread->sigpending );
+ // but threads inherit signal masks
+ if ( NULL == parentthread )
+ sigemptyset( &thread->sigmask );
+ else
+ thread->sigmask = parentthread->sigmask;
+
+ cyg_pthread_exception_init( thread );
+}
+
+externC void cyg_posix_thread_sigdestroy( pthread_info *thread )
+{
+ cyg_pthread_exception_destroy( thread );
+}
+
+//==========================================================================
+// Functions to generate signals
+
+// -------------------------------------------------------------------------
+// Deliver sig to a process.
+// eCos only supports the value 0 for pid.
+
+externC int kill (pid_t pid, int sig)
+{
+ SIGNAL_ENTRY();
+
+ if( !SIGNAL_VALID(sig) )
+ SIGNAL_RETURN(EINVAL);
+
+ if( pid != 0 )
+ SIGNAL_RETURN(ESRCH);
+
+ struct sigevent sev;
+
+ sev.sigev_notify = SIGEV_SIGNAL;
+ sev.sigev_signo = sig;
+ sev.sigev_value.sival_int = 0;
+
+ cyg_sigqueue( &sev, SI_USER );
+
+ cyg_deliver_signals();
+
+ SIGNAL_RETURN(0);
+}
+
+// -------------------------------------------------------------------------
+
+externC int pthread_kill (pthread_t threadid, int sig)
+{
+ SIGNAL_ENTRY();
+
+ if( !SIGNAL_VALID(sig) )
+ SIGNAL_RETURN(EINVAL);
+
+ struct sigevent sev;
+
+ pthread_info *thread = pthread_info_id(threadid);
+
+ if( thread == NULL )
+ SIGNAL_RETURN(ESRCH);
+
+ sev.sigev_notify = SIGEV_SIGNAL;
+ sev.sigev_signo = sig;
+ sev.sigev_value.sival_int = 0;
+
+ cyg_sigqueue( &sev, SI_USER, thread );
+
+ cyg_deliver_signals();
+
+ SIGNAL_RETURN(0);
+}
+
+//==========================================================================
+// Functions to catch signals
+
+// -------------------------------------------------------------------------
+// Install signal handler for sig.
+
+externC int sigaction (int sig, const struct sigaction *act,
+ struct sigaction *oact)
+{
+ SIGNAL_ENTRY();
+
+ if( !SIGNAL_VALID(sig) )
+ SIGNAL_RETURN(EINVAL);
+
+ signal_state *ss = &sigstate[sig];
+
+ signal_mutex.lock();
+
+ if( oact != NULL )
+ *oact = ss->sa;
+
+ ss->sa = *act;
+
+ if( ss->sa.sa_handler == SIG_IGN )
+ {
+ // Setting the handler to SIG_IGN causes any pending
+ // signals to be discarded and any queued values to also
+ // be removed.
+
+ pthread_info *self = pthread_self_info();
+ sigset_t sigbit = 1<<sig;
+
+ if( (sig_pending | self->sigpending) & sigbit )
+ {
+ // This signal is pending, clear it
+
+ sig_pending &= ~sigbit;
+ self->sigpending &= ~sigbit;
+
+ // Clean out any queued signal_info objects
+ while( ss->pending != NULL )
+ {
+ signal_info *si = ss->pending->next;
+
+ // Remove the head signal_info object from the
+ // circular list.
+ if( ss->pending == si )
+ ss->pending = NULL;
+ else
+ ss->pending->next = si->next;
+
+ // Return it to the free list
+ si->next = siginfo_next;
+ siginfo_next = si;
+ }
+ }
+ }
+
+ cyg_deliver_signals();
+
+ signal_mutex.unlock();
+
+ SIGNAL_RETURN(0);
+}
+
+
+// -------------------------------------------------------------------------
+// Queue signal to process with value.
+
+externC int sigqueue (pid_t pid, int sig, const union sigval value)
+{
+ SIGNAL_ENTRY();
+
+ if( !SIGNAL_VALID(sig) )
+ SIGNAL_RETURN(EINVAL);
+
+ struct sigevent sev;
+
+ sev.sigev_notify = SIGEV_SIGNAL;
+ sev.sigev_signo = sig;
+ sev.sigev_value = value;
+
+ cyg_sigqueue( &sev, SI_QUEUE );
+
+ cyg_deliver_signals();
+
+ SIGNAL_RETURN(0);
+}
+
+//==========================================================================
+// Functions to deal with current blocked and pending masks
+
+// -------------------------------------------------------------------------
+// Set process blocked signal mask
+// Map this onto pthread_sigmask().
+
+externC int sigprocmask (int how, const sigset_t *set, sigset_t *oset)
+{
+ return pthread_sigmask( how, set, oset);
+}
+
+
+// -------------------------------------------------------------------------
+// Set calling thread's blocked signal mask
+
+externC int pthread_sigmask (int how, const sigset_t *set, sigset_t *oset)
+{
+ int err = 0;
+
+ SIGNAL_ENTRY();
+
+ pthread_info *self = pthread_self_info();
+ // Save old set
+ if( oset != NULL )
+ *oset = self->sigmask;
+
+ if( set != NULL )
+ {
+ switch( how )
+ {
+ case SIG_BLOCK:
+ self->sigmask |= *set;
+ break;
+
+ case SIG_UNBLOCK:
+ self->sigmask &= ~*set;
+ break;
+
+ case SIG_SETMASK:
+ self->sigmask = *set;
+ break;
+
+ default:
+ err = EINVAL;
+ break;
+ }
+ }
+
+ // Deliver any newly unblocked signals
+ cyg_deliver_signals();
+
+ SIGNAL_RETURN(err);
+}
+
+// -------------------------------------------------------------------------
+// Exported routine to set calling thread's blocked signal mask
+//
+// Optionally set and return the current thread's signal mask. This is
+// exported to other packages so that they can manipulate the signal
+// mask without necessarily having them delivered (as calling
+// pthread_sigmask() would). Signals can be delivered by calling
+// cyg_posix_deliver_signals().
+
+externC void cyg_pthread_sigmask_set (const sigset_t *set, sigset_t *oset)
+{
+ pthread_info *self = pthread_self_info();
+
+ if( self != NULL )
+ {
+ if( oset != NULL )
+ *oset = self->sigmask;
+
+ if( set != NULL )
+ self->sigmask = *set;
+ }
+}
+
+// -------------------------------------------------------------------------
+// Exported routine to test for any pending signals.
+//
+// This routine tests for any pending undelivered, unmasked
+// signals. If there are any it returns true. This is exported to
+// other packages, such as FILEIO, so that they can detect whether to
+// abort a current API call with an EINTR result.
+
+externC cyg_bool cyg_posix_sigpending(void)
+{
+ pthread_info *self = pthread_self_info();
+
+ if( self == NULL )
+ return false;
+
+ return ( ((sig_pending | self->sigpending) & ~self->sigmask) != 0 );
+}
+
+// -------------------------------------------------------------------------
+// Exported routine to deliver selected signals
+//
+// This routine optionally sets the given mask and then tries to
+// deliver any pending signals that have been unmasked. This is
+// exported to other packages so that they can cause signals to be
+// delivered at controlled points during execution.
+
+externC void cyg_posix_deliver_signals( const sigset_t *mask )
+{
+ sigset_t oldmask;
+ pthread_info *self = pthread_self_info();
+
+ if( self != NULL )
+ {
+ if( mask != NULL )
+ {
+ oldmask = self->sigmask;
+ self->sigmask = *mask;
+ }
+ else
+ oldmask = 0; // silence warning
+
+ cyg_deliver_signals();
+
+ if( mask != NULL )
+ self->sigmask = oldmask;
+ }
+}
+
+// -------------------------------------------------------------------------
+// Get set of pending signals for this process
+
+externC int sigpending (sigset_t *set)
+{
+ SIGNAL_ENTRY();
+
+ if( set == NULL )
+ SIGNAL_RETURN(EINVAL);
+
+ pthread_info *self = pthread_self_info();
+
+ *set = self->sigpending | sig_pending;
+
+ SIGNAL_RETURN(0);
+}
+
+
+//==========================================================================
+// Wait for or accept signals
+
+// -------------------------------------------------------------------------
+// Block signals in set and wait for a signal
+
+externC int sigsuspend (const sigset_t *set)
+{
+ SIGNAL_ENTRY();
+
+ pthread_info *self = pthread_self_info();
+
+ signal_mutex.lock();
+
+ // Save the old mask and set the current mask to
+ // the one supplied.
+ sigset_t old = self->sigmask;
+ self->sigmask = *set;
+
+ // Loop until a signal gets delivered
+ while( !cyg_deliver_signals() )
+ signal_sigwait.wait();
+
+ self->sigmask = old;
+
+ signal_mutex.unlock();
+
+ SIGNAL_RETURN(EINTR);
+}
+
+
+// -------------------------------------------------------------------------
+// Wait for a signal in set to arrive
+// Implement this as a variant on sigtimedwait().
+
+externC int sigwait (const sigset_t *set, int *sig)
+{
+ SIGNAL_ENTRY();
+
+ siginfo_t info;
+
+ int ret = sigtimedwait( set, &info, NULL );
+
+ if( ret == -1 )
+ SIGNAL_RETURN(errno);
+
+ *sig = ret;
+
+ SIGNAL_RETURN(0);
+}
+
+// -------------------------------------------------------------------------
+// Do the same as sigwait() except return a siginfo_t object too.
+// Implement this as a variant on sigtimedwait().
+
+externC int sigwaitinfo (const sigset_t *set, siginfo_t *info)
+{
+ SIGNAL_ENTRY();
+
+ int ret = sigtimedwait( set, info, NULL );
+
+ SIGNAL_RETURN_VALUE(ret);
+}
+
+// -------------------------------------------------------------------------
+// Wait either for a signal in the given set to become pending, or
+// for the timeout to expire. If timeout is NULL, wait for ever.
+
+externC int sigtimedwait (const sigset_t *set, siginfo_t *info,
+ const struct timespec *timeout)
+{
+ SIGNAL_ENTRY();
+
+ // check for cancellation first.
+ pthread_testcancel();
+
+ int err = 0;
+ cyg_tick_count ticks;
+
+ if( timeout == NULL ) ticks = 0;
+ else ticks = cyg_timespec_to_ticks( timeout ) +
+ Cyg_Clock::real_time_clock->current_value();
+
+ pthread_info *self = pthread_self_info();
+
+ signal_mutex.lock();
+
+ sigset_t todo;
+
+ // Wait for a signal in the set to become pending
+ while( (todo = (*set & (sig_pending | self->sigpending))) == 0 )
+ {
+ // If timeout is not NULL, do a timed wait on the
+ // sigwait condition variable. If it is NULL - wait
+ // until we are woken.
+ if( timeout )
+ {
+ if( ticks == 0 || !signal_sigwait.wait(ticks) )
+ {
+ // If the timeout is actually zero, or we have waited and
+ // timed out, then we must quit with an error.
+ err = EAGAIN;
+ break;
+ }
+ }
+ else {
+ if ( !signal_sigwait.wait() ) {
+ // check we weren't woken up forcibly (e.g. to be cancelled)
+ // if so, pretend it's an error
+ err = EAGAIN;
+ break;
+ }
+ }
+
+ // Special case check for SIGALRM since the fact SIGALRM is masked
+ // would have prevented it being set pending in the alarm handler.
+ check_sigalarm();
+
+ cyg_posix_timer_asr(self);
+ }
+
+ if( err == 0 )
+ {
+ // There is a signal in the set that is pending: deliver
+ // it. todo contains a mask of all the signals that could be
+ // delivered now, but we only want to deliver one of them.
+
+ int signo = 0;
+
+ // Select the lowest numbered signal from the todo mask
+ HAL_LSBIT_INDEX( signo, todo );
+
+ signal_state *ss = &sigstate[signo];
+ sigset_t sigbit = 1L<<signo;
+
+ if( (ss->sa.sa_flags & SA_SIGINFO) && (ss->pending != NULL) )
+ {
+ // If the SA_SIGINFO bit is set, then there
+ // will be a signal_info object queued on the
+ // pending field.
+
+ signal_info *si = ss->pending->next;
+ *info = si->si;
+
+ // Remove the head signal_info object from the
+ // circular list.
+ if( ss->pending == si )
+ ss->pending = NULL;
+ else
+ ss->pending->next = si->next;
+
+ si->next = siginfo_next;
+ siginfo_next = si;
+
+ }
+ else
+ {
+ // Not a queued signal, or there is no signal_info object
+ // on the pending queue: fill in info structure with
+ // default values.
+ info->si_signo = signo;
+ info->si_code = SI_USER;
+ info->si_value.sival_int = 0;
+ }
+
+ // Clear the bit from the pending masks. If the pending
+ // queue is not empty, leave the bits set, otherwise clear
+ // them.
+
+ if( ss->pending == NULL )
+ {
+ // Clear the bit in both masks regardless of which
+ // one it actually came from. This is cheaper than
+ // trying to find out.
+ sig_pending &= ~sigbit;
+ self->sigpending &= ~sigbit;
+ }
+
+ // all done
+ }
+
+ signal_mutex.unlock();
+
+ pthread_testcancel();
+
+ if (err)
+ SIGNAL_RETURN(err);
+ else
+ SIGNAL_RETURN_VALUE( info->si_signo );
+}
+
+//==========================================================================
+// alarm, pause and sleep
+
+// -------------------------------------------------------------------------
+// Generate SIGALRM after some number of seconds
+
+externC unsigned int alarm( unsigned int seconds )
+{
+ int res = 0;
+ struct timespec tv;
+ cyg_tick_count trigger, interval;
+
+ SIGNAL_ENTRY();
+
+ signal_mutex.lock();
+
+ if( sigalrm_armed )
+ {
+ sigalrm_alarm.disable();
+
+ sigalrm_alarm.get_times( &trigger, &interval );
+
+ // Convert trigger time back to interval
+ trigger -= Cyg_Clock::real_time_clock->current_value();
+
+ cyg_ticks_to_timespec( trigger, &tv );
+
+ res = tv.tv_sec;
+
+ sigalrm_armed = false;
+ }
+
+ if( seconds != 0 )
+ {
+ // Here we know that the sigalrm_alarm is unarmed, set it up
+ // to trigger in the required number of seconds.
+
+ tv.tv_sec = seconds;
+ tv.tv_nsec = 0;
+
+ trigger = cyg_timespec_to_ticks( &tv );
+
+ // Convert trigger interval to absolute time
+ trigger += Cyg_Clock::real_time_clock->current_value();
+
+ sigalrm_alarm.initialize( trigger, 0 );
+
+ sigalrm_armed = true;
+ }
+
+ signal_mutex.unlock();
+
+ CYG_REPORT_RETVAL(res);
+
+ return res;
+}
+
+// -------------------------------------------------------------------------
+// Wait for a signal to be delivered.
+
+externC int pause( void )
+{
+ SIGNAL_ENTRY();
+
+ signal_mutex.lock();
+
+ // Check for any pending signals that can be delivered and
+ // if there are none, wait for a signal to be generated
+ if( !cyg_deliver_signals() )
+ signal_sigwait.wait();
+
+ // Now check again for some signals to deliver
+ cyg_deliver_signals();
+
+ signal_mutex.unlock();
+
+ SIGNAL_RETURN(EINTR);
+}
+
+//==========================================================================
+// Signal sets
+
+// -------------------------------------------------------------------------
+// Clear all signals from set.
+
+externC int sigemptyset (sigset_t *set)
+{
+ SIGNAL_ENTRY();
+
+ *set = 0;
+
+ SIGNAL_RETURN(0);
+}
+
+
+// -------------------------------------------------------------------------
+// Set all signals in set.
+
+externC int sigfillset (sigset_t *set)
+{
+ SIGNAL_ENTRY();
+
+ *set = ~0;
+
+ SIGNAL_RETURN(0);
+}
+
+
+// -------------------------------------------------------------------------
+// Add signo to set.
+
+externC int sigaddset (sigset_t *set, int signo)
+{
+ SIGNAL_ENTRY();
+
+ int err = 0;
+
+ if( !SIGNAL_VALID(signo) )
+ err = EINVAL;
+ else *set |= 1<<signo;
+
+ SIGNAL_RETURN(err);
+}
+
+
+// -------------------------------------------------------------------------
+// Remove signo from set.
+
+externC int sigdelset (sigset_t *set, int signo)
+{
+ SIGNAL_ENTRY();
+
+ int err = 0;
+
+ if( !SIGNAL_VALID(signo) )
+ err = EINVAL;
+ else *set &= ~(1<<signo);
+
+ SIGNAL_RETURN(err);
+}
+
+
+// -------------------------------------------------------------------------
+// Test whether signo is in set
+
+externC int sigismember (const sigset_t *set, int signo)
+{
+ SIGNAL_ENTRY();
+
+ int ret = 0;
+
+ if( !SIGNAL_VALID(signo) )
+ SIGNAL_RETURN(EINVAL);
+
+ if( *set & (1<<signo) ) ret = 1;
+
+ CYG_REPORT_RETVAL( ret );
+ return ret;
+}
+
+//==========================================================================
+// ISO C compatibility functions
+
+// -------------------------------------------------------------------------
+// Installs a new signal handler for the specified signal, and returns
+// the old handler
+
+externC sa_sighandler_t signal(int sig, sa_sighandler_t handler)
+{
+ SIGNAL_ENTRY();
+
+ int err;
+ sa_sighandler_t ret;
+ struct sigaction new_action;
+ struct sigaction old_action;
+
+ sigemptyset( &new_action.sa_mask );
+ new_action.sa_flags = 0;
+ new_action.sa_handler = handler;
+
+ err = sigaction( sig, &new_action, &old_action );
+
+ if( err < 0 )
+ ret = SIG_ERR;
+ else ret = old_action.sa_handler;
+
+ CYG_REPORT_RETVAL( ret );
+ return ret;
+}
+
+// -------------------------------------------------------------------------
+// raise() - ISO C 7.7.2 //
+//
+// Raises the signal, which will cause the current signal handler for
+// that signal to be called
+
+externC int raise(int sig)
+{
+ return kill( 0, sig );
+}
+
+// -------------------------------------------------------------------------
+// siglongjmp()
+// Restores signal mask and longjumps.
+
+__externC void siglongjmp( sigjmp_buf env, int val )
+{
+ CYG_REPORT_FUNCNAME( "siglongjmp" );
+ CYG_REPORT_FUNCARG2( "&env=%08x, val=%d", &env, val );
+
+ // ISO C says that if we are passed val == 0, then we change it to 1
+ if( val == 0 )
+ val = 1;
+
+ if( env[0].__savemask )
+ pthread_sigmask( SIG_SETMASK, &env[0].__sigsavemask, NULL );
+
+ HAL_REORDER_BARRIER(); // prevent any chance of optimisation re-ordering
+ hal_longjmp( env[0].__jmp_buf, val );
+ HAL_REORDER_BARRIER(); // prevent any chance of optimisation re-ordering
+
+#ifdef CYGDBG_USE_ASSERTS
+ CYG_ASSERT( 0, "siglongjmp should not have reached this point!" );
+#else
+ for (;;)
+ CYG_EMPTY_STATEMENT;
+#endif
+
+}
+
+#endif // ifdef CYGPKG_POSIX_SIGNALS
+
+// -------------------------------------------------------------------------
+// EOF signal.cxx
diff --git a/cesar/ecos/packages/compat/posix/current/src/startup.cxx b/cesar/ecos/packages/compat/posix/current/src/startup.cxx
new file mode 100644
index 0000000000..9480ab9ee8
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/src/startup.cxx
@@ -0,0 +1,87 @@
+//==========================================================================
+//
+// startup.cxx
+//
+// POSIX startup code
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg, jlarmour
+// Contributors: nickg, jlarmour
+// Date: 2000-03-27
+// Purpose: POSIX startup code
+// Description: This file contains code that must be run when the
+// POSIX subsystem is started.
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/posix.h>
+
+#include <cyg/infra/cyg_type.h>
+#include "pprivate.h" // POSIX private header
+
+// -------------------------------------------------------------------------
+
+// define an object that will automatically initialize the POSIX subsystem
+
+class cyg_posix_startup_dummy_constructor_class {
+public:
+ cyg_posix_startup_dummy_constructor_class() {
+
+#ifdef CYGPKG_POSIX_PTHREAD
+ cyg_posix_pthread_start();
+#endif
+#ifdef CYGPKG_POSIX_SIGNALS
+ cyg_posix_signal_start();
+ cyg_posix_exception_start();
+#endif
+#ifdef CYGPKG_POSIX_TIMERS
+ cyg_posix_clock_start();
+#endif
+
+ }
+};
+
+static cyg_posix_startup_dummy_constructor_class cyg_posix_startup_obj
+ CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_COMPAT);
+
+// -------------------------------------------------------------------------
+// EOF startup.cxx
diff --git a/cesar/ecos/packages/compat/posix/current/src/time.cxx b/cesar/ecos/packages/compat/posix/current/src/time.cxx
new file mode 100644
index 0000000000..c4f5d701d5
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/src/time.cxx
@@ -0,0 +1,700 @@
+//==========================================================================
+//
+// time.cxx
+//
+// POSIX time functions implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-03-27
+// Purpose: POSIX time functions implementation
+// Description: This file contains the implementation of the POSIX time
+// functions.
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/posix.h>
+
+#ifdef CYGPKG_POSIX_CLOCKS
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include "pprivate.h" // POSIX private header
+
+#include <time.h> // our header
+
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/clock.hxx>
+
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/clock.inl>
+
+// -------------------------------------------------------------------------
+// Internal definitions
+
+// Handle entry to a pthread package function.
+#define TIME_ENTRY() CYG_REPORT_FUNCTYPE( "returning %d" );
+
+// Do a time package defined return. This requires the error code
+// to be placed in errno, and if it is non-zero, -1 returned as the
+// result of the function. This also gives us a place to put any
+// generic tidyup handling needed for things like signal delivery and
+// cancellation.
+#define TIME_RETURN(err) \
+CYG_MACRO_START \
+ int __retval = 0; \
+ if( err != 0 ) __retval = -1, errno = err; \
+ CYG_REPORT_RETVAL( __retval ); \
+ return __retval; \
+CYG_MACRO_END
+
+//==========================================================================
+// Timer control structures
+
+#ifdef CYGPKG_POSIX_TIMERS
+typedef struct
+{
+ timer_t id; // id value for checking
+ Cyg_Alarm *alarm; // eCos alarm object
+ cyg_bool armed; // is alarm enabled?
+ cyg_bool pending; // is expiry pending?
+ int overrun; // Overrun count
+ struct sigevent sigev; // Sigevent to raise on expiry
+
+ // Space for alarm object
+ cyg_uint8 alarm_obj[sizeof(Cyg_Alarm)];
+
+} posix_timer;
+
+// Mutex for controlling access to shared data structures
+static Cyg_Mutex timer_mutex CYGBLD_POSIX_INIT;
+
+// Array of timer objects
+static posix_timer timer_table[_POSIX_TIMER_MAX];
+
+// Index of next timer to allocate from array
+static int timer_next = 0;
+
+// This is used to make timer_t values unique even when reusing
+// a table slot. This allows _POSIX_TIMER_MAX to range
+// up to 1024.
+#define TIMER_ID_COOKIE_INC 0x00000400
+#define TIMER_ID_COOKIE_MASK (TIMER_ID_COOKIE_INC-1)
+static timer_t timer_id_cookie = TIMER_ID_COOKIE_INC;
+
+#endif // ifdef CYGPKG_POSIX_TIMERS
+
+//-----------------------------------------------------------------------------
+// new operator to allow us to invoke the constructor on
+// posix_timer.alarm_obj.
+
+inline void *operator new(size_t size, cyg_uint8 *ptr) { return (void *)ptr; };
+
+//==========================================================================
+// Time conversion variables
+// These are used to interconvert between ticks and POSIX timespecs.
+
+// Converters from sec and ns to ticks
+static struct Cyg_Clock::converter ns_converter, sec_converter;
+
+// Converters from ticks to sec and ns
+static struct Cyg_Clock::converter ns_inverter, sec_inverter;
+
+// tickns is the number of nanoseconds per tick.
+static cyg_tick_count tickns;
+
+static cyg_bool converters_initialized = false;
+
+//==========================================================================
+// Local functions
+
+static void init_converters()
+{
+ if( !converters_initialized )
+ {
+
+ // Create the converters we need.
+ Cyg_Clock::real_time_clock->get_other_to_clock_converter( 1, &ns_converter );
+ Cyg_Clock::real_time_clock->get_other_to_clock_converter( 1000000000, &sec_converter );
+ Cyg_Clock::real_time_clock->get_clock_to_other_converter( 1, &ns_inverter );
+ Cyg_Clock::real_time_clock->get_clock_to_other_converter( 1000000000, &sec_inverter );
+
+ tickns = Cyg_Clock::convert( 1, &ns_inverter );
+
+ converters_initialized = true;
+ }
+}
+
+static cyg_bool valid_timespec( const struct timespec *tp )
+{
+ // Fail a NULL pointer
+ if( tp == NULL ) return false;
+
+ // Fail illegal nanosecond values
+ if( tp->tv_nsec < 0 || tp->tv_nsec > 1000000000 )
+ return false;
+
+ return true;
+}
+
+externC cyg_tick_count cyg_timespec_to_ticks( const struct timespec *tp,
+ cyg_bool roundup)
+{
+ init_converters();
+
+ // Short circuit zero timespecs
+ if( tp->tv_sec == 0 && tp->tv_nsec == 0 )
+ {
+ return 0;
+ }
+
+ // Convert the seconds field to ticks.
+ cyg_tick_count ticks = Cyg_Clock::convert( tp->tv_sec, &sec_converter );
+
+ if( roundup )
+ {
+ // Convert the nanoseconds. We add (tickns-1) to round the value up
+ // to the next whole tick.
+
+ ticks += Cyg_Clock::convert( (cyg_tick_count)tp->tv_nsec+tickns-1, &ns_converter );
+ }
+ else
+ {
+ // Convert the nanoseconds. This will round down to nearest whole tick.
+ ticks += Cyg_Clock::convert( (cyg_tick_count)tp->tv_nsec, &ns_converter );
+ }
+
+ return ticks;
+}
+
+externC void cyg_ticks_to_timespec( cyg_tick_count ticks, struct timespec *tp )
+{
+ init_converters();
+
+ // short circuit zero ticks values
+ if( ticks == 0 )
+ {
+ tp->tv_sec = 0;
+ tp->tv_nsec = 0;
+ return;
+ }
+
+ // Convert everything to nanoseconds with a long long. For 64-bits,
+ // this is safe for 544 years. We'll think about it more closer to
+ // the time...
+
+ unsigned long long nsecs = Cyg_Clock::convert( ticks, &ns_inverter );
+
+ tp->tv_sec = (long)(nsecs / 1000000000ll);
+ tp->tv_nsec = (long)(nsecs % 1000000000ll);
+
+ CYG_POSTCONDITION(valid_timespec(tp), "Failed to make valid timespec!");
+}
+
+//==========================================================================
+// Startup routine.
+
+externC void cyg_posix_clock_start()
+{
+ init_converters();
+}
+
+#ifdef CYGPKG_POSIX_TIMERS
+//==========================================================================
+// Alarm action routine
+// This is called each time an alarm set up by a timer expires.
+
+static void alarm_action( Cyg_Alarm *alarm, CYG_ADDRWORD data )
+{
+ posix_timer *timer = (posix_timer *)data;
+
+ if( timer->pending )
+ {
+ // If the pending flag is already set, count an overrun and
+ // do not bother to try and deliver the expiry.
+
+ timer->overrun++;
+ }
+ else
+ {
+ if( timer->sigev.sigev_notify == SIGEV_SIGNAL )
+ {
+ // Set the expiry pending and wake a thread to
+ // deliver the signal.
+
+ timer->pending = true;
+
+ sigset_t mask;
+ sigemptyset( &mask );
+ sigaddset( &mask, timer->sigev.sigev_signo );
+ cyg_posix_signal_sigwait();
+ cyg_posix_pthread_release_thread( &mask );
+ }
+ else if( timer->sigev.sigev_notify == SIGEV_THREAD )
+ {
+ // Thread style notification
+ // FIXME: implement SIGEV_THREAD
+ }
+ // else do nothing
+ }
+}
+
+//==========================================================================
+// Timer ASR routine
+
+externC void cyg_posix_timer_asr( pthread_info *self )
+{
+
+ // Loop over the timers looking for any that have an
+ // expiry pending and call cyg_sigqueue() for each.
+
+ for( int i = 0; i < _POSIX_TIMER_MAX; i++ )
+ {
+ posix_timer *timer = &timer_table[i];
+
+ if( timer->id != 0 && timer->pending )
+ {
+ timer->pending = false;
+
+ // Call into signal subsystem...
+ cyg_sigqueue( &timer->sigev, SI_TIMER );
+
+ timer->overrun = 0;
+ }
+ }
+}
+
+#endif // ifdef CYGPKG_POSIX_TIMERS
+
+//==========================================================================
+// Clock functions
+
+//-----------------------------------------------------------------------------
+// Set the clocks current time
+
+externC int clock_settime( clockid_t clock_id, const struct timespec *tp)
+{
+ TIME_ENTRY();
+
+ if( clock_id != CLOCK_REALTIME )
+ TIME_RETURN(EINVAL);
+
+ if( !valid_timespec( tp ) )
+ TIME_RETURN(EINVAL);
+
+ cyg_tick_count ticks = cyg_timespec_to_ticks( tp );
+
+ Cyg_Clock::real_time_clock->set_value( ticks );
+
+ TIME_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Get the clocks current time
+
+externC int clock_gettime( clockid_t clock_id, struct timespec *tp)
+{
+ TIME_ENTRY();
+
+ if( clock_id != CLOCK_REALTIME )
+ TIME_RETURN(EINVAL);
+
+ if( tp == NULL )
+ TIME_RETURN(EINVAL);
+
+ cyg_tick_count ticks = Cyg_Clock::real_time_clock->current_value();
+
+ cyg_ticks_to_timespec( ticks, tp );
+
+ TIME_RETURN(0);
+}
+
+
+//-----------------------------------------------------------------------------
+// Get the clocks resolution
+
+externC int clock_getres( clockid_t clock_id, struct timespec *tp)
+{
+ TIME_ENTRY();
+
+ if( clock_id != CLOCK_REALTIME )
+ TIME_RETURN(EINVAL);
+
+ if( tp == NULL )
+ TIME_RETURN(EINVAL);
+
+ // Get the resolution of 1 tick
+ cyg_ticks_to_timespec( 1, tp );
+
+ TIME_RETURN(0);
+}
+
+
+//==========================================================================
+// Timer functions
+
+#ifdef CYGPKG_POSIX_TIMERS
+
+//-----------------------------------------------------------------------------
+// Create a timer based on the given clock.
+
+externC int timer_create( clockid_t clock_id,
+ struct sigevent *evp,
+ timer_t *timer_id)
+{
+ TIME_ENTRY();
+
+ if( clock_id != CLOCK_REALTIME )
+ TIME_RETURN(EINVAL);
+
+ timer_mutex.lock();
+
+ posix_timer *timer;
+ int next = timer_next;
+
+ // Look for an unused slot in the table
+ while( timer_table[next].id != 0 )
+ {
+ next++;
+ if( next >= _POSIX_TIMER_MAX )
+ next = 0;
+
+ if( next == timer_next )
+ {
+ timer_mutex.unlock();
+ TIME_RETURN(EAGAIN);
+ }
+ }
+
+ timer = &timer_table[next];
+
+ timer_next = next;
+
+ // Make sure we never allocate a zero timer id.
+ while( timer->id == 0 )
+ {
+ timer_id_cookie += TIMER_ID_COOKIE_INC;
+ timer->id = next+timer_id_cookie;
+ }
+
+ if( evp == NULL )
+ {
+ // If no evp is supplied, set up the timer
+ // to use a default set.
+ timer->sigev.sigev_notify = SIGEV_SIGNAL;
+ timer->sigev.sigev_signo = SIGALRM;
+ timer->sigev.sigev_value.sival_int = timer->id;
+ }
+ else timer->sigev = *evp;
+
+ timer->alarm = new( timer->alarm_obj )
+ Cyg_Alarm( Cyg_Clock::real_time_clock,
+ alarm_action,
+ (CYG_ADDRWORD)timer );
+
+ timer->armed = false;
+ timer->overrun = 0;
+
+ *timer_id = timer->id;
+
+ timer_mutex.unlock();
+
+ TIME_RETURN(0);
+}
+
+//-----------------------------------------------------------------------------
+// Delete the timer
+
+externC int timer_delete( timer_t timerid )
+{
+ int err = EINVAL;
+ TIME_ENTRY();
+
+ posix_timer *timer = &timer_table[timerid & TIMER_ID_COOKIE_MASK];
+
+ timer_mutex.lock();
+
+ if( timer->id == timerid )
+ {
+ // This is a valid timer, disable the kernel
+ // alarm and delete it.
+
+ // disable alarm
+ timer->alarm->disable();
+
+ // destroy it
+ timer->alarm->~Cyg_Alarm();
+
+ // Mark POSIX timer free
+ timer->id = 0;
+
+ err = 0;
+ }
+
+ timer_mutex.unlock();
+
+ TIME_RETURN( err );
+}
+
+//-----------------------------------------------------------------------------
+// Set the expiration time of the timer.
+
+externC int timer_settime( timer_t timerid, int flags,
+ const struct itimerspec *value,
+ struct itimerspec *ovalue )
+{
+ int err = EINVAL;
+ TIME_ENTRY();
+
+ if( value == NULL )
+ TIME_RETURN(EINVAL);
+
+ // convert trigger and interval values to ticks.
+ cyg_tick_count trigger = cyg_timespec_to_ticks( &value->it_value, true );
+ cyg_tick_count interval = cyg_timespec_to_ticks( &value->it_interval, true );
+
+ posix_timer *timer = &timer_table[timerid & TIMER_ID_COOKIE_MASK];
+
+ timer_mutex.lock();
+
+ if( timer->id == timerid )
+ {
+ // disable the timer
+ timer->alarm->disable();
+
+ if( ovalue != NULL )
+ {
+ cyg_tick_count otrigger, ointerval;
+
+ timer->alarm->get_times( &otrigger, &ointerval );
+
+ if( timer->armed )
+ {
+ // convert absolute trigger time to interval until next trigger
+ otrigger -= Cyg_Clock::real_time_clock->current_value();
+ }
+ else otrigger = 0;
+
+ // convert ticks to timespecs
+ cyg_ticks_to_timespec( otrigger, &ovalue->it_value );
+ cyg_ticks_to_timespec( ointerval, &ovalue->it_interval );
+ }
+
+ if( trigger == 0 )
+ {
+ // Mark timer disarmed
+ timer->armed = false;
+ }
+ else
+ {
+ // If the ABSTIME flag is not set, add the current time
+ if( (flags & TIMER_ABSTIME) == 0 )
+ trigger += Cyg_Clock::real_time_clock->current_value();
+
+ // Set the alarm running.
+ timer->alarm->initialize( trigger, interval );
+
+ // Mark timer armed
+ timer->armed = true;
+
+ }
+
+ err = 0;
+ }
+
+ timer_mutex.unlock();
+
+ TIME_RETURN(err);
+}
+
+//-----------------------------------------------------------------------------
+// Get current timer values
+
+externC int timer_gettime( timer_t timerid, struct itimerspec *value )
+{
+ int err = EINVAL;
+
+ TIME_ENTRY();
+
+ if( value == NULL )
+ TIME_RETURN(EINVAL);
+
+ posix_timer *timer = &timer_table[timerid & TIMER_ID_COOKIE_MASK];
+
+ timer_mutex.lock();
+
+ if( timer->id == timerid )
+ {
+ cyg_tick_count trigger, interval;
+
+ timer->alarm->get_times( &trigger, &interval );
+
+ if( timer->armed )
+ {
+ // convert absolute trigger time to interval until next trigger
+ trigger -= Cyg_Clock::real_time_clock->current_value();
+ }
+ else trigger = 0;
+
+ // convert ticks to timespecs
+ cyg_ticks_to_timespec( trigger, &value->it_value );
+ cyg_ticks_to_timespec( interval, &value->it_interval );
+ err = 0;
+ }
+
+ timer_mutex.unlock();
+
+ TIME_RETURN(err);
+}
+
+//-----------------------------------------------------------------------------
+// Get number of missed triggers
+
+externC int timer_getoverrun( timer_t timerid )
+{
+ int overrun = 0;
+
+ TIME_ENTRY();
+
+ posix_timer *timer = &timer_table[timerid & TIMER_ID_COOKIE_MASK];
+
+ timer_mutex.lock();
+
+ if( timer->id == timerid )
+ {
+ overrun = timer->overrun;
+ }
+
+ timer_mutex.unlock();
+
+ CYG_REPORT_RETVAL(overrun);
+ return overrun;
+}
+
+#endif // ifdef CYGPKG_POSIX_TIMERS
+
+//==========================================================================
+// Nanosleep
+// Sleep for the given time.
+
+externC int nanosleep( const struct timespec *rqtp,
+ struct timespec *rmtp)
+{
+ cyg_tick_count ticks, now, then;
+
+ TIME_ENTRY();
+
+ // check for cancellation first.
+ PTHREAD_TESTCANCEL();
+
+ // Fail an invalid timespec
+ if( !valid_timespec( rqtp ) )
+ TIME_RETURN(EINVAL);
+
+ // Return immediately for a zero delay.
+ if( rqtp->tv_sec == 0 && rqtp->tv_nsec == 0 )
+ TIME_RETURN(0);
+
+ // Convert timespec to ticks
+ ticks = cyg_timespec_to_ticks( rqtp, true );
+
+ CYG_ASSERT( ticks != 0, "Zero tick count");
+
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Do the delay, keeping track of how long we actually slept for.
+ then = Cyg_Clock::real_time_clock->current_value();
+
+ self->delay( ticks );
+
+ now = Cyg_Clock::real_time_clock->current_value();
+
+
+ if( rmtp != NULL && (then+ticks) > now )
+ {
+ // We woke up early, return the time left.
+ // FIXME: strictly we only need to do this if we were woken
+ // by a signal.
+
+ // Calculate remaining number of ticks.
+ ticks -= (now-then);
+
+ cyg_ticks_to_timespec( ticks, rmtp );
+ }
+
+ // check if we were woken up because we were cancelled.
+ PTHREAD_TESTCANCEL();
+
+ TIME_RETURN(0);
+}
+
+// -------------------------------------------------------------------------
+// Wait for a signal, or the given number of seconds
+
+externC unsigned int sleep( unsigned int seconds )
+{
+ TIME_ENTRY();
+
+ struct timespec timeout;
+
+ timeout.tv_sec = seconds;
+ timeout.tv_nsec = 0;
+
+ if( nanosleep( &timeout, &timeout ) != 0 )
+ {
+ CYG_REPORT_RETVAL(timeout.tv_sec);
+ return timeout.tv_sec;
+ }
+
+ TIME_RETURN(0);
+}
+
+#endif // ifdef CYGPKG_POSIX_CLOCKS
+
+// -------------------------------------------------------------------------
+// EOF time.cxx
diff --git a/cesar/ecos/packages/compat/posix/current/tests/mqueue1.c b/cesar/ecos/packages/compat/posix/current/tests/mqueue1.c
new file mode 100644
index 0000000000..0c66284d89
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/tests/mqueue1.c
@@ -0,0 +1,359 @@
+/*========================================================================
+//
+// mqueue1.c
+//
+// POSIX Message queues tests
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-05-18
+// Purpose: This file provides tests for POSIX mqueues
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/posix.h>
+
+#ifndef CYGPKG_POSIX_MQUEUES
+# define NA_MSG "Message queues not configured"
+#endif
+
+#ifdef NA_MSG
+#include <cyg/infra/testcase.h> // test API
+void
+cyg_user_start(void)
+{
+ CYG_TEST_NA( NA_MSG );
+}
+
+#else
+
+/* INCLUDES */
+
+#include <fcntl.h> // O_*
+#include <errno.h> // errno
+#include <sys/stat.h> // file modes
+#include <mqueue.h> // Mqueue Header
+#include <cyg/infra/testcase.h> // test API
+
+/* FUNCTIONS */
+
+static int
+my_memcmp(const void *m1, const void *m2, size_t n)
+{
+ char *s1 = (char *)m1;
+ char *s2 = (char *)m2;
+
+ while (n--) {
+ if (*s1 != *s2)
+ return *s1 - *s2;
+ s1++;
+ s2++;
+ }
+ return 0;
+} // my_memcmp()
+
+//************************************************************************
+
+int
+main(void)
+{
+ mqd_t q1, q2;
+ char buf[20];
+ ssize_t recvlen;
+ unsigned int prio;
+ struct mq_attr attr, oattr;
+ mode_t mode;
+ int err;
+
+ CYG_TEST_INIT();
+ CYG_TEST_INFO( "Starting POSIX message test 1" );
+
+ q1 = mq_open( "/mq1", O_RDWR );
+ CYG_TEST_PASS_FAIL( q1 == (mqd_t)-1, "error for non-existent queue" );
+ CYG_TEST_PASS_FAIL( ENOENT == errno,
+ "errno correct for non-existent queue" );
+
+ attr.mq_flags = 0;
+ attr.mq_maxmsg = 4;
+ attr.mq_msgsize = 20;
+ mode = S_IRWXU|S_IRWXG|S_IRWXO; // rwx for all
+
+ q1 = mq_open( "/mq1", O_CREAT|O_NONBLOCK|O_WRONLY, mode, &attr );
+ CYG_TEST_PASS_FAIL( q1 != (mqd_t)-1, "simple mq_open (write only)" );
+
+ err = mq_getattr( q1, &attr );
+ CYG_TEST_PASS_FAIL( 0 == err, "simple mq_getattr" );
+ CYG_TEST_PASS_FAIL( (4 == attr.mq_maxmsg) &&
+ (20 == attr.mq_msgsize) &&
+ (O_NONBLOCK == (attr.mq_flags & O_NONBLOCK)) &&
+ (O_RDONLY != (attr.mq_flags & O_RDONLY)) &&
+ (O_WRONLY == (attr.mq_flags & O_WRONLY)) &&
+ (O_RDWR != (attr.mq_flags & O_RDWR)) &&
+ (0 == attr.mq_curmsgs ), "getattr attributes correct" );
+
+ err = mq_send( q1, "Vik is brill", sizeof("Vik is brill"), 10 );
+
+ CYG_TEST_PASS_FAIL( 0 == err, "simple mq_send" );
+
+ err = mq_getattr( q1, &attr );
+ CYG_TEST_PASS_FAIL( 0 == err, "simple mq_getattr after send" );
+ CYG_TEST_PASS_FAIL( (4 == attr.mq_maxmsg) &&
+ (20 == attr.mq_msgsize) &&
+ (O_NONBLOCK == (attr.mq_flags & O_NONBLOCK)) &&
+ (O_RDONLY != (attr.mq_flags & O_RDONLY)) &&
+ (O_WRONLY == (attr.mq_flags & O_WRONLY)) &&
+ (O_RDWR != (attr.mq_flags & O_RDWR)) &&
+ (1 == attr.mq_curmsgs ),
+ "getattr attributes correct #2" );
+
+ q2 = mq_open( "/mq1", O_RDONLY|O_CREAT|O_EXCL );
+ CYG_TEST_PASS_FAIL( q2 == (mqd_t)-1,
+ "error for exclusive open of existing queue" );
+ CYG_TEST_PASS_FAIL( EEXIST == errno,
+ "errno correct for exclusive open of existing queue" );
+
+ q2 = mq_open( "/mq1", O_RDONLY );
+ CYG_TEST_PASS_FAIL( q2 != (mqd_t)-1, "simple mq_open (read only)" );
+
+ err = mq_getattr( q2, &attr );
+ CYG_TEST_PASS_FAIL( 0 == err, "simple mq_getattr, different mqd_t" );
+ CYG_TEST_PASS_FAIL( (4 == attr.mq_maxmsg) &&
+ (20 == attr.mq_msgsize) &&
+ (O_NONBLOCK != (attr.mq_flags & O_NONBLOCK)) &&
+ (O_RDONLY == (attr.mq_flags & O_RDONLY)) &&
+ (O_WRONLY != (attr.mq_flags & O_WRONLY)) &&
+ (O_RDWR != (attr.mq_flags & O_RDWR)) &&
+ (1 == attr.mq_curmsgs ),
+ "getattr attributes correct #3" );
+
+ err = mq_close( q2 );
+ CYG_TEST_PASS_FAIL( 0 == err, "simple mq_close" );
+
+ q2 = mq_open( "/mq1", O_RDONLY );
+ CYG_TEST_PASS_FAIL( q2 != (mqd_t)-1, "mq_open reopen (read only)" );
+
+ err = mq_getattr( q2, &attr );
+ CYG_TEST_PASS_FAIL( 0 == err, "simple mq_getattr, different mqd_t" );
+ CYG_TEST_PASS_FAIL( (4 == attr.mq_maxmsg) &&
+ (20 == attr.mq_msgsize) &&
+ (O_NONBLOCK != (attr.mq_flags & O_NONBLOCK)) &&
+ (O_RDONLY == (attr.mq_flags & O_RDONLY)) &&
+ (O_WRONLY != (attr.mq_flags & O_WRONLY)) &&
+ (O_RDWR != (attr.mq_flags & O_RDWR)) &&
+ (1 == attr.mq_curmsgs ),
+ "getattr attributes correct #4" );
+
+ recvlen = mq_receive( q2, buf, sizeof(buf), &prio );
+ CYG_TEST_PASS_FAIL( recvlen == sizeof("Vik is brill"),
+ "receive message length" );
+ CYG_TEST_PASS_FAIL( 0 == my_memcmp( buf, "Vik is brill",
+ sizeof("Vik is brill")),
+ "received message data intact" );
+ CYG_TEST_PASS_FAIL( 10 == prio, "received at correct priority" );
+
+ err = mq_getattr( q1, &attr );
+ CYG_TEST_PASS_FAIL( 0 == err, "simple mq_getattr after send" );
+ CYG_TEST_PASS_FAIL( (4 == attr.mq_maxmsg) &&
+ (20 == attr.mq_msgsize) &&
+ (O_NONBLOCK == (attr.mq_flags & O_NONBLOCK)) &&
+ (O_RDONLY != (attr.mq_flags & O_RDONLY)) &&
+ (O_WRONLY == (attr.mq_flags & O_WRONLY)) &&
+ (O_RDWR != (attr.mq_flags & O_RDWR)) &&
+ (0 == attr.mq_curmsgs ),
+ "getattr attributes correct #5" );
+
+ attr.mq_flags |= O_NONBLOCK;
+ err = mq_setattr( q2, &attr, &oattr );
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_setattr O_NONBLOCK" );
+ CYG_TEST_PASS_FAIL( (4 == oattr.mq_maxmsg) &&
+ (20 == oattr.mq_msgsize) &&
+ (O_NONBLOCK != (oattr.mq_flags & O_NONBLOCK)) &&
+ (O_RDONLY == (oattr.mq_flags & O_RDONLY)) &&
+ (O_WRONLY != (oattr.mq_flags & O_WRONLY)) &&
+ (O_RDWR != (oattr.mq_flags & O_RDWR)) &&
+ (0 == oattr.mq_curmsgs ),
+ "old attribute correct" );
+ err = mq_getattr( q2, &attr );
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_getattr after O_NONBLOCK" );
+ CYG_TEST_PASS_FAIL( (4 == attr.mq_maxmsg) &&
+ (20 == attr.mq_msgsize) &&
+ (O_NONBLOCK == (attr.mq_flags & O_NONBLOCK)) &&
+ (O_RDONLY == (attr.mq_flags & O_RDONLY)) &&
+ (O_WRONLY != (attr.mq_flags & O_WRONLY)) &&
+ (O_RDWR != (attr.mq_flags & O_RDWR)) &&
+ (0 == attr.mq_curmsgs ),
+ "new attribute correct" );
+
+ recvlen = mq_receive( q2, buf, sizeof(buf), &prio );
+ CYG_TEST_PASS_FAIL( recvlen == (ssize_t)-1,
+ "mq_receive, empty buffer, non-blocking" );
+ CYG_TEST_PASS_FAIL( EAGAIN == errno,
+ "errno correct for non-blocking" );
+
+ err = mq_send( q2, "foo", sizeof("foo"), 1 );
+ CYG_TEST_PASS_FAIL( -1 == err, "error on mq_send on read-only descriptor" );
+ CYG_TEST_PASS_FAIL( EBADF == errno,
+ "errno correct for mq_send on r/o descriptor" );
+
+ err = mq_send( q2, "supercalifragilisticexpealidocious", 21, 2 );
+ CYG_TEST_PASS_FAIL( -1 == err, "error on mq_send (message too long)" );
+ CYG_TEST_PASS_FAIL( EMSGSIZE == errno,
+ "errno correct for mq_send (message too long)" );
+
+ err = mq_send( q1, "", sizeof(""), 5 );
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_send \"\"" );
+
+ err = mq_send( q1, "I love Vik", sizeof("I love Vik"), 7 );
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_send (different priority)" );
+
+ err = mq_send( q1, "a lot!", sizeof("a lot!"), 7 );
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_send (same priority)" );
+
+ err = mq_send( q1, "Vik is a babe", sizeof("Vik is a babe"), 6 );
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_send (middle priority)" );
+
+ err = mq_send( q1, "wibble", sizeof("wibble"), 6 );
+ CYG_TEST_PASS_FAIL( -1 == err, "error on mq_send with full queue" );
+ CYG_TEST_PASS_FAIL( EAGAIN == errno,
+ "errno correct for mq_send full queue" );
+
+ err = mq_getattr( q2, &attr );
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_getattr after sends" );
+ CYG_TEST_PASS_FAIL( (4 == attr.mq_maxmsg) &&
+ (20 == attr.mq_msgsize) &&
+ (O_NONBLOCK == (attr.mq_flags & O_NONBLOCK)) &&
+ (O_RDONLY == (attr.mq_flags & O_RDONLY)) &&
+ (O_WRONLY != (attr.mq_flags & O_WRONLY)) &&
+ (O_RDWR != (attr.mq_flags & O_RDWR)) &&
+ (4 == attr.mq_curmsgs ),
+ "getattr attributes correct #5" );
+
+ recvlen = mq_receive( q2, buf, sizeof(buf), &prio );
+ CYG_TEST_PASS_FAIL( recvlen == sizeof("I love Vik"),
+ "receive message length (prioritized) #1" );
+ CYG_TEST_PASS_FAIL( 0 == my_memcmp( buf, "I love Vik",
+ sizeof("I love Vik")),
+ "received message data intact (prioritized) #1" );
+ CYG_TEST_PASS_FAIL( 7 == prio,
+ "received at correct priority (prioritized) #1" );
+
+ recvlen = mq_receive( q2, buf, sizeof(buf), &prio );
+ CYG_TEST_PASS_FAIL( recvlen == sizeof("a lot!"),
+ "receive message length (prioritized) #2" );
+ CYG_TEST_PASS_FAIL( 0 == my_memcmp( buf, "a lot!",
+ sizeof("a lot!")),
+ "received message data intact (prioritized) #2" );
+ CYG_TEST_PASS_FAIL( 7 == prio,
+ "received at correct priority (prioritized) #2" );
+
+ recvlen = mq_receive( q2, buf, sizeof(buf), &prio );
+ CYG_TEST_PASS_FAIL( recvlen == sizeof("Vik is a babe"),
+ "receive message length (prioritized) #3" );
+ CYG_TEST_PASS_FAIL( 0 == my_memcmp( buf, "Vik is a babe",
+ sizeof("Vik is a babe")),
+ "received message data intact (prioritized) #3" );
+ CYG_TEST_PASS_FAIL( 6 == prio,
+ "received at correct priority (prioritized) #3" );
+
+ recvlen = mq_receive( q2, buf, 0, &prio );
+ CYG_TEST_PASS_FAIL( recvlen == (ssize_t)-1,
+ "mq_receive, zero-sized buffer" );
+
+ recvlen = mq_receive( q2, buf, sizeof(buf), &prio );
+ CYG_TEST_PASS_FAIL( recvlen == sizeof(""),
+ "receive message length (prioritized) #4" );
+ CYG_TEST_PASS_FAIL( 0 == my_memcmp( buf, "",
+ sizeof("")),
+ "received message data intact (prioritized) #4" );
+ CYG_TEST_PASS_FAIL( 5 == prio,
+ "received at correct priority (prioritzed) #4" );
+
+ recvlen = mq_receive( q2, buf, sizeof(buf), &prio );
+ CYG_TEST_PASS_FAIL( recvlen == (ssize_t)-1,
+ "mq_receive, empty buffer, non-blocking #2" );
+ CYG_TEST_PASS_FAIL( EAGAIN == errno,
+ "errno correct for non-blocking #2" );
+
+ err = mq_send( q1, "12345678901234567890", 20, 15 );
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_send (before closing)" );
+
+ err = mq_unlink( "/foo" );
+ CYG_TEST_PASS_FAIL( -1 == err, "mq_unlink (wrong name)" );
+ CYG_TEST_PASS_FAIL( ENOENT == errno,
+ "errno correct for mq_unlink (wrong name)" );
+
+ err = mq_unlink( "/mq1" );
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_unlink (before closing)" );
+
+ err = mq_close( q1 );
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_close (send descriptor)" );
+
+ recvlen = mq_receive( q2, buf, sizeof(buf), &prio );
+ CYG_TEST_PASS_FAIL( recvlen == 20,
+ "receive message length (mid close)" );
+ CYG_TEST_PASS_FAIL( 0 == my_memcmp( buf, "12345678901234567890", 20 ),
+ "received message data intact (mid close)" );
+ CYG_TEST_PASS_FAIL( 15 == prio,
+ "received at correct priority (mid close)" );
+
+ err = mq_close( q2 );
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_close (receive descriptor)" );
+
+ q1 = mq_open( "/mq1", O_RDONLY );
+ CYG_TEST_PASS_FAIL( q1 == (mqd_t)-1, "error for non-existent queue" );
+ CYG_TEST_PASS_FAIL( ENOENT == errno,
+ "errno correct for non-existent queue" );
+
+ CYG_TEST_EXIT("POSIX message test 1");
+
+ return 0;
+} // main()
+
+//------------------------------------------------------------------------
+
+#endif
+
+/* EOF mqueue1.c */
diff --git a/cesar/ecos/packages/compat/posix/current/tests/mqueue2.c b/cesar/ecos/packages/compat/posix/current/tests/mqueue2.c
new file mode 100644
index 0000000000..f1405504bd
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/tests/mqueue2.c
@@ -0,0 +1,276 @@
+/*========================================================================
+//
+// mqueue2.c
+//
+// POSIX Message queues tests - mq_notify
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-05-18
+// Purpose: This file provides tests for POSIX mqueue mq_notify
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/posix.h>
+
+#ifndef CYGPKG_POSIX_MQUEUES
+# define NA_MSG "Message queues not configured"
+#elif !defined(CYGPKG_POSIX_SIGNALS)
+# define NA_MSG "No POSIX signals configured"
+#endif
+
+#ifdef NA_MSG
+#include <cyg/infra/testcase.h> // test API
+void
+cyg_user_start(void)
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( NA_MSG );
+}
+
+#else
+
+/* INCLUDES */
+
+#include <fcntl.h> // O_*
+#include <errno.h> // errno
+#include <sys/stat.h> // file modes
+#include <mqueue.h> // Mqueue Header
+#include <cyg/infra/testcase.h> // test API
+#include <signal.h> // signals
+
+/* GLOBALS */
+sig_atomic_t signals=0;
+char buf[20];
+unsigned int prio;
+
+
+/* FUNCTIONS */
+
+static int
+my_memcmp(const void *m1, const void *m2, size_t n)
+{
+ char *s1 = (char *)m1;
+ char *s2 = (char *)m2;
+
+ while (n--) {
+ if (*s1 != *s2)
+ return *s1 - *s2;
+ s1++;
+ s2++;
+ }
+ return 0;
+} // my_memcmp()
+
+static char *
+my_strcpy(char *s1, const char *s2)
+{
+ char *s = s1;
+ while (*s2) {
+ *s1++ = *s2++;
+ }
+ return s;
+} // my_strcpy()
+
+static size_t
+my_strlen(const char *s)
+{
+ const char *start = s;
+ while (*s)
+ s++;
+ return (s - start);
+} // my_strcpy()
+
+
+
+//************************************************************************
+
+static void
+sigusr1_handler( int signo, siginfo_t *info, void *context )
+{
+ ssize_t recvlen;
+ char mybuf[20];
+ unsigned int myprio;
+ mqd_t *q = (mqd_t *)info->si_value.sival_ptr;
+
+ CYG_TEST_PASS_FAIL( SIGUSR1 == signo, "correct signal number #1" );
+ CYG_TEST_PASS_FAIL( SIGUSR1 == info->si_signo, "correct signal number #2" );
+ CYG_TEST_PASS_FAIL( SI_MESGQ == info->si_code, "correct signal code" );
+
+ signals++;
+
+ // retrieve message and compare with buf
+ recvlen = mq_receive( *q, mybuf, sizeof(mybuf), &myprio );
+ CYG_TEST_PASS_FAIL( recvlen == my_strlen(buf),
+ "receive message length" );
+ CYG_TEST_PASS_FAIL( 0 == my_memcmp( buf, mybuf, my_strlen(buf)),
+ "received message data intact" );
+ CYG_TEST_PASS_FAIL( prio == myprio,
+ "received at correct priority" );
+}
+
+//************************************************************************
+
+int
+main(void)
+{
+ mqd_t q1;
+ struct mq_attr attr;
+ mode_t mode;
+ int err;
+ ssize_t recvlen;
+ char mybuf[20];
+ unsigned int myprio;
+ struct sigevent ev;
+ struct sigaction act;
+
+ CYG_TEST_INIT();
+ CYG_TEST_INFO( "Starting POSIX message test 2" );
+
+#if 0
+ if ( 0 != pthread_create( &thr, NULL, &thread, NULL ) ) {
+ CYG_TEST_FAIL_FINISH( "Couldn't create a helper thread" );
+ }
+#endif
+
+ attr.mq_flags = 0;
+ attr.mq_maxmsg = 4;
+ attr.mq_msgsize = 20;
+ mode = S_IRWXU|S_IRWXG|S_IRWXO; // rwx for all
+
+ q1 = mq_open( "/mq1", O_CREAT|O_NONBLOCK|O_RDWR, mode, &attr );
+ CYG_TEST_PASS_FAIL( q1 != (mqd_t)-1, "simple mq_open (write only)" );
+
+ err = mq_getattr( q1, &attr );
+ CYG_TEST_PASS_FAIL( 0 == err, "simple mq_getattr" );
+ CYG_TEST_PASS_FAIL( (4 == attr.mq_maxmsg) &&
+ (20 == attr.mq_msgsize) &&
+ (O_NONBLOCK == (attr.mq_flags & O_NONBLOCK)) &&
+ (O_RDWR == (attr.mq_flags & O_RDWR)) &&
+ (0 == attr.mq_curmsgs ), "getattr attributes correct" );
+
+
+ act.sa_sigaction = &sigusr1_handler;
+ sigfillset( &act.sa_mask ); // enable all signals
+ act.sa_flags = SA_SIGINFO;
+
+ if ( 0 != sigaction( SIGUSR1, &act, NULL ) ) {
+ CYG_TEST_FAIL_FINISH( "Couldn't register signal handler" );
+ }
+
+ ev.sigev_notify = SIGEV_SIGNAL;
+ ev.sigev_signo = SIGUSR1;
+ ev.sigev_value.sival_ptr = (void *)&q1;
+
+ err = mq_notify( q1, &ev );
+ CYG_TEST_PASS_FAIL( 0 == err, "simple mq_notify" );
+
+ my_strcpy( buf, "Vik is the best" );
+ prio = 7;
+ err = mq_send( q1, buf, my_strlen(buf), prio );
+
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_send #1" );
+
+ CYG_TEST_PASS_FAIL( 1 == signals, "got notification" );
+
+ my_strcpy( buf, "Scrummy Vik" );
+ prio = 6;
+ err = mq_send( q1, buf, my_strlen(buf), prio );
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_send #2" );
+
+ CYG_TEST_PASS_FAIL( 1 == signals, "correctly didn't get notification" );
+
+ recvlen = mq_receive( q1, mybuf, sizeof(mybuf), &myprio );
+ CYG_TEST_PASS_FAIL( recvlen == my_strlen(buf),
+ "receive message length" );
+ CYG_TEST_PASS_FAIL( 0 == my_memcmp( buf, mybuf, my_strlen(buf)),
+ "received message data intact" );
+ CYG_TEST_PASS_FAIL( prio == myprio,
+ "received at correct priority" );
+
+ err = mq_notify( q1, &ev );
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_notify #2" );
+
+ err = mq_notify( q1, &ev );
+ CYG_TEST_PASS_FAIL( -1 == err, "second mq_notify returns error" );
+ CYG_TEST_PASS_FAIL( EBUSY == errno,
+ "errno correct for second mq_notify error" );
+
+ err = mq_notify( q1, NULL );
+ CYG_TEST_PASS_FAIL( 0 == err, "clear notification" );
+
+ my_strcpy( buf, "Vik is k3wl" );
+ prio = 8;
+ err = mq_send( q1, buf, my_strlen(buf), prio );
+
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_send #2" );
+
+ CYG_TEST_PASS_FAIL( 1 == signals, "correctly didn't get notification #2" );
+
+ recvlen = mq_receive( q1, mybuf, sizeof(mybuf), &myprio );
+ CYG_TEST_PASS_FAIL( recvlen == my_strlen(buf),
+ "receive message length" );
+ CYG_TEST_PASS_FAIL( 0 == my_memcmp( buf, mybuf, my_strlen(buf)),
+ "received message data intact" );
+ CYG_TEST_PASS_FAIL( prio == myprio,
+ "received at correct priority" );
+
+ err = mq_close( q1 );
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_close" );
+
+ err = mq_unlink( "/mq1" );
+ CYG_TEST_PASS_FAIL( 0 == err, "mq_unlink" );
+
+ CYG_TEST_EXIT("POSIX message test 2");
+
+ return 0;
+} // main()
+
+//------------------------------------------------------------------------
+
+#endif
+
+/* EOF mqueue2.c */
diff --git a/cesar/ecos/packages/compat/posix/current/tests/mutex3.c b/cesar/ecos/packages/compat/posix/current/tests/mutex3.c
new file mode 100644
index 0000000000..c35d9ef94f
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/tests/mutex3.c
@@ -0,0 +1,672 @@
+//==========================================================================
+//
+// mutex3.cxx
+//
+// Mutex test 3 - priority inheritance
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt, nickg, jlarmour
+// Date: 2000-01-06
+// Description: Tests mutex priority inheritance. This is simply a translation
+// of the similarly named kernel test to the POSIX API
+//####DESCRIPTIONEND####
+
+// ------------------------------------------------------------------------
+
+#include <cyg/infra/testcase.h>
+#include <pkgconf/posix.h>
+#include <pkgconf/system.h>
+#ifdef CYGPKG_KERNEL
+#include <pkgconf/kernel.h>
+#endif
+
+#ifdef CYGPKG_ISOINFRA
+# include <sys/types.h>
+# include <pthread.h>
+# include <semaphore.h>
+# include <time.h>
+# include <unistd.h>
+#endif
+
+#if !defined(CYGPKG_POSIX_PTHREAD)
+#define NA_MSG "POSIX threads not enabled"
+
+// ------------------------------------------------------------------------
+//
+// These checks should be enough; any other scheduler which has priorities
+// should manifest as having no priority inheritance, but otherwise fine,
+// so the test should work correctly.
+
+#elif !defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
+#define NA_MSG "No POSIX thread priority scheduling enabled"
+#elif !defined(_POSIX_THREAD_PRIO_INHERIT)
+#define NA_MSG "No POSIX thread priority inheritance enabled"
+#elif !defined(_POSIX_SEMAPHORES)
+#define NA_MSG "No POSIX sempaphore support enabled enabled"
+#elif !defined(CYGFUN_KERNEL_API_C)
+#define NA_MSG "Kernel C API not enabled"
+#elif defined(CYGPKG_KERNEL_SMP_SUPPORT)
+#define NA_MSG "Test cannot run with SMP support"
+#endif
+
+#ifdef NA_MSG
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA(NA_MSG);
+}
+#else
+
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/cyg_trac.h>
+#include <cyg/infra/diag.h> // diag_printf
+
+#include <cyg/kernel/kapi.h> // Some extras
+
+// ------------------------------------------------------------------------
+// Management functions
+//
+// Stolen from testaux.hxx and copied in here because I want to be able to
+// reset the world also.
+// ... and subsequently POSIXized out of all similarly with its progenitors.
+
+#define NTHREADS 7
+
+#define STACKSIZE (PTHREAD_STACK_MIN*2)
+
+static pthread_t thread[NTHREADS] = { 0 };
+
+typedef CYG_WORD64 CYG_ALIGNMENT_TYPE;
+
+static CYG_ALIGNMENT_TYPE stack[NTHREADS] [
+ (STACKSIZE+sizeof(CYG_ALIGNMENT_TYPE)-1)
+ / sizeof(CYG_ALIGNMENT_TYPE) ];
+
+// Semaphores to halt execution of threads
+static sem_t hold[NTHREADS];
+
+// Flag to tell all threads to exit
+static int all_exit;
+
+// Application thread data is passed here, the thread
+// argument is
+static CYG_ADDRWORD thread_data[NTHREADS];
+
+static volatile int nthreads = 0;
+
+// Sleep for 1 tick...
+static struct timespec sleeptime;
+
+
+static pthread_t new_thread( void *(*entry)(void *),
+ CYG_ADDRWORD data,
+ int priority,
+ int do_resume)
+{
+ pthread_attr_t attr;
+ int _nthreads = nthreads++;
+
+ struct sched_param schedparam;
+ schedparam.sched_priority = priority;
+
+ pthread_attr_init( &attr );
+ pthread_attr_setstackaddr( &attr, (void *)((char *)(&stack[_nthreads])+STACKSIZE) );
+ pthread_attr_setstacksize( &attr, STACKSIZE );
+ pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
+ pthread_attr_setschedpolicy( &attr, SCHED_RR );
+ pthread_attr_setschedparam( &attr, &schedparam );
+
+ CYG_ASSERT(_nthreads < NTHREADS,
+ "Attempt to create more than NTHREADS threads");
+
+ thread_data[_nthreads] = data;
+
+ sem_init( &hold[_nthreads], 0, do_resume ? 1 : 0 );
+ all_exit = 0;
+
+ pthread_create( &thread[_nthreads],
+ &attr,
+ entry,
+ (void *)_nthreads);
+
+ return thread[_nthreads];
+}
+
+
+static void kill_threads( void )
+{
+ CYG_ASSERT(nthreads <= NTHREADS,
+ "More than NTHREADS threads");
+ CYG_ASSERT( pthread_equal(pthread_self(),thread[0]),
+ "kill_threads() not called from thread 0");
+ all_exit = 1;
+ while ( nthreads > 1 ) {
+ nthreads--;
+ if ( 0 != thread[nthreads] ) {
+ sem_post( &hold[nthreads] );
+ pthread_cancel( thread[nthreads] );
+ pthread_join( thread[nthreads], NULL );
+ thread[nthreads] = 0;
+ sem_destroy( &hold[nthreads] );
+ }
+ }
+ CYG_ASSERT(nthreads == 1,
+ "No threads left");
+}
+
+// ------------------------------------------------------------------------
+
+#define DELAYFACTOR 1 // for debugging
+
+// ------------------------------------------------------------------------
+
+pthread_mutex_t mutex;
+
+// These are for reporting back to the master thread
+volatile int got_it = 0;
+volatile int t3ran = 0;
+volatile int t3ended = 0;
+volatile int extras[4] = {0,0,0,0};
+
+volatile int go_flag = 0; // but this one controls thread 3 from thread 2
+
+// ------------------------------------------------------------------------
+// 0 to 3 of these run generally to interfere with the other processing,
+// to cause multiple prio inheritances, and clashes in any orders.
+
+static void *extra_thread( void *arg )
+{
+#define XINFO( z ) \
+ do { z[13] = '0' + data; CYG_TEST_INFO( z ); } while ( 0 )
+
+ static char running[] = "Extra thread Xa running";
+ static char exiting[] = "Extra thread Xa exiting";
+ static char resumed[] = "Extra thread Xa resumed";
+ static char locked[] = "Extra thread Xa locked";
+ static char unlocked[] = "Extra thread Xa unlocked";
+
+ int id = (int)arg;
+ CYG_ADDRWORD data = thread_data[id];
+
+ CYG_ASSERT( (id >= 4 && id <= 6), "extra_thread invalid id" );
+
+ // Emulate resume behaviour
+ sem_wait( &hold[id] );
+ if( all_exit ) return 0;
+
+ XINFO( running );
+
+ sem_wait( &hold[id] );
+
+ XINFO( resumed );
+
+ pthread_mutex_lock( &mutex );
+
+ XINFO( locked );
+
+ pthread_mutex_unlock( &mutex );
+
+ XINFO( unlocked );
+
+ extras[ data ] ++;
+
+ XINFO( exiting );
+
+ return NULL;
+}
+
+// ------------------------------------------------------------------------
+
+static void *t1( void *arg )
+{
+ int id = (int)arg;
+ //CYG_ADDRWORD data = thread_data[id];
+
+ // Emulate resume behaviour
+ sem_wait( &hold[id] );
+ if( all_exit ) return 0;
+
+ CYG_TEST_INFO( "Thread 1 running" );
+
+ sem_wait( &hold[id] );
+
+ pthread_mutex_lock( &mutex );
+
+ got_it++;
+
+ CYG_TEST_CHECK( 0 == t3ended, "T3 ended prematurely [T1,1]" );
+
+ pthread_mutex_unlock( &mutex );
+
+ CYG_TEST_CHECK( 0 == t3ended, "T3 ended prematurely [T1,2]" );
+
+ // That's all.
+
+ CYG_TEST_INFO( "Thread 1 exit" );
+
+ return 0;
+}
+
+// ------------------------------------------------------------------------
+
+static void *t2( void *arg )
+{
+ int i;
+ int id = (int)arg;
+ CYG_ADDRWORD data = thread_data[id];
+ cyg_tick_count_t now, then;
+
+ // Emulate resume behaviour
+ sem_wait( &hold[id] );
+ if( all_exit ) return 0;
+
+ CYG_TEST_INFO( "Thread 2 running" );
+
+ CYG_TEST_CHECK( 0 == (data & ~0x77), "Bad T2 arg: extra bits" );
+ CYG_TEST_CHECK( 0 == (data & (data >> 4)), "Bad T2 arg: overlap" );
+
+ sem_wait( &hold[id] );
+
+ // depending on our config argument, optionally restart some of the
+ // extra threads to throw noise into the scheduler:
+ for ( i = 0; i < 3; i++ )
+ if ( (1 << i) & data ) // bits 0-2 control
+ sem_post( &hold[i+4] ); // made sure extras are thread[4-6]
+
+ // let those threads run
+ for( i = 0; i < DELAYFACTOR * 10; i++ )
+ nanosleep( &sleeptime, NULL );
+
+ cyg_scheduler_lock(); // do this next lot atomically
+
+ go_flag = 1; // unleash thread 3
+ sem_post( &hold[1] ); // resume thread 1
+
+ // depending on our config argument, optionally restart some of the
+ // extra threads to throw noise into the scheduler at this later point:
+ for ( i = 4; i < 7; i++ )
+ if ( (1 << i) & data ) // bits 4-6 control
+ sem_post( &hold[i] ); // made sure extras are thread[4-6]
+
+ cyg_scheduler_unlock(); // let scheduling proceed
+
+ // Need a delay (but not a CPU yield) to allow t3 to awaken and act on
+ // the go_flag, otherwise we check these details below too soon.
+ // Actually, waiting for the clock to tick a couple of times would be
+ // better, so that is what we will do. Must be a busy-wait.
+ then = cyg_current_time();
+ do {
+ now = cyg_current_time();
+ // Wait longer than the delay in t3 waiting on go_flag
+ } while ( now < (then + 3) );
+
+#ifdef _POSIX_THREAD_PRIO_INHERIT
+ CYG_TEST_INFO( "Checking for mutex priority inheritance" );
+ CYG_TEST_CHECK( 1 == t3ran, "Thread 3 did not run" );
+ CYG_TEST_CHECK( 1 == got_it, "Thread 1 did not get the mutex" );
+#else
+ CYG_TEST_INFO( "Checking for NO mutex priority inheritance" );
+ CYG_TEST_CHECK( 0 == t3ran, "Thread 3 DID run" );
+ CYG_TEST_CHECK( 0 == got_it, "Thread 1 DID get the mutex" );
+#endif
+
+ CYG_TEST_CHECK( 0 == t3ended, "Thread 3 ended prematurely [T2,1]" );
+
+ for( i = 0; i < DELAYFACTOR * 20; i++ )
+ nanosleep( &sleeptime, NULL ); // let those threads run
+
+ CYG_TEST_CHECK( 1 == t3ran, "Thread 3 did not run" );
+ CYG_TEST_CHECK( 1 == got_it, "Thread 1 did not get the mutex" );
+ CYG_TEST_CHECK( 1 == t3ended, "Thread 3 has not ended" );
+
+ for ( i = 0; i < 3; i++ )
+ if ( (1 << i) & (data | data >> 4) ) // bits 0-2 and 4-6 control
+ CYG_TEST_CHECK( 1 == extras[i+1], "Extra thread did not run" );
+ else
+ CYG_TEST_CHECK( 0 == extras[i+1], "Extra thread ran" );
+
+ CYG_TEST_PASS( "Thread 2 exiting, AOK" );
+ // That's all: restart the control thread.
+ sem_post( &hold[0] );
+
+ return 0;
+}
+
+// ------------------------------------------------------------------------
+
+static void *t3( void *arg )
+{
+ int i;
+ int id = (int)arg;
+ //CYG_ADDRWORD data = thread_data[id];
+
+ // Emulate resume behaviour
+ sem_wait( &hold[id] );
+ if( all_exit ) return 0;
+
+ CYG_TEST_INFO( "Thread 3 running" );
+
+ pthread_mutex_lock( &mutex );
+
+ for( i = 0; i < DELAYFACTOR * 5; i++ )
+ nanosleep( &sleeptime, NULL ); // let thread 3a run
+
+ sem_post( &hold[2] ); // resume thread 2
+
+ while ( 0 == go_flag )
+ nanosleep( &sleeptime, NULL ); // wait until we are told to go
+
+ t3ran ++; // record the fact
+
+ CYG_TEST_CHECK( 0 == got_it, "Thread 1 claims to have got my mutex" );
+
+ pthread_mutex_unlock( &mutex );
+
+ t3ended ++; // record that we came back
+
+ CYG_TEST_CHECK( 1 == got_it, "Thread 1 did not get the mutex" );
+
+ CYG_TEST_INFO( "Thread 3 exit" );
+
+ return 0;
+}
+
+// ------------------------------------------------------------------------
+
+static void *control_thread( void *arg )
+{
+ int i,z;
+ int id = (int)arg;
+ //CYG_ADDRWORD data = thread_data[id];
+
+ // Emulate resume behaviour
+ sem_wait( &hold[id] );
+ if( all_exit ) return 0;
+
+ // one tick sleep time
+ sleeptime.tv_nsec = 10000000;
+ sleeptime.tv_sec = 0;
+
+ CYG_TEST_INIT();
+ CYG_TEST_INFO( "Control Thread running" );
+
+ // Go through the 27 possibilitied of resuming the extra threads
+ // 0: not at all
+ // 1: early in the process
+ // 2: later on
+ // which are represented by bits 0-3 and 4-6 resp in the argument to
+ // thread 2 (none set means no resume at all).
+ for ( i = 0; i < 27; i++ ) {
+ static int xx[] = { 0, 1, 16 };
+ int j = i % 3;
+ int k = (i / 3) % 3;
+ int l = (i / 9) % 3;
+
+ int d = xx[j] | (xx[k]<<1) | (xx[l]<<2) ;
+
+ if ( cyg_test_is_simulator && (0 != i && 13 != i && 26 != i) )
+ continue; // 13 is 111 base 3, 26 is 222 base 3
+
+#ifdef _POSIX_THREAD_PRIO_INHERIT
+ // If the simple scheme plus relay enhancement, or any other
+ // *complete* scheme, we can run all three ancillary threads no
+ // problem, so no special action here.
+
+#else
+ // If no priority inheritance at all, running threads 1a and 2a is
+ // OK, but not thread 3a; it blocks the world.
+ if ( l ) // Cannot run thread 3a if no
+ break; // priority inheritance at all.
+#endif
+
+ // Reinitialize mutex to provide priority inheritance
+ {
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_init( &attr );
+ pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
+ pthread_mutex_init( &mutex, &attr );
+ }
+
+ got_it = 0;
+ t3ran = 0;
+ t3ended = 0;
+ for ( z = 0; z < 4; z++ ) extras[z] = 0;
+ go_flag = 0;
+
+ new_thread( t1, 0, 15, 1 ); // Slot 1
+ new_thread( t2, d, 10, 1 ); // Slot 2
+ new_thread( t3, 0, 5, 1 ); // Slot 3
+
+ new_thread( extra_thread, 1, 17, j ); // Slot 4
+ new_thread( extra_thread, 2, 12, k ); // Slot 5
+ new_thread( extra_thread, 3, 8, l ); // Slot 6
+
+ {
+ static char *a[] = { "inactive", "run early", "run late" };
+ diag_printf( "\n----- [%2d] New Cycle: 0x%02x, Threads 1a %s, 2a %s, 3a %s -----\n",
+ i, d, a[j], a[k], a[l] );
+ }
+
+ sem_wait( &hold[0] );
+
+ kill_threads();
+ pthread_mutex_destroy( &mutex );
+ }
+ CYG_TEST_EXIT( "Control Thread exit" );
+
+ return 0;
+}
+
+// ------------------------------------------------------------------------
+
+static sem_t main_sem;
+
+externC int
+main( int argc, char **argv )
+{
+ new_thread( control_thread, 0, 20, 1 );
+
+ // We have nothing for main to do here, so put it to sleep on
+ // its own semaphore. We cannot let it just exit since that
+ // will end the whole program.
+
+ sem_init( &main_sem, 0, 0 );
+
+ for(;;) sem_wait( &main_sem );
+}
+
+// ------------------------------------------------------------------------
+// Documentation: enclosed is the design of this test.
+//
+// It has been carefully constructed so that it does NOT use other kernel
+// facilities (aside from delay-task) to test that priority inheritance is
+// working, or not, as intended by the configuration.
+//
+// These notes describe the flow of control in one run of the test with the
+// ancillary tasks optionally interspersed. The details of how those extra
+// tasks are or are not allowed to run are not described.
+//
+//
+//
+// The only change in the test that depends on whether there is inheritance or
+// not is the check in thread 2 on "3-ran" and "got it" flags marked ****
+//
+//
+// volatile &c booleans:
+// "got it" = FALSE
+// "3-ran" = FALSE
+// "3-ended" = FALSE
+// "extras"[3] = FALSE
+//
+// thread 1. prio 5, self-suspend.
+//
+// thread 1a, prio 8, self-suspend.
+//
+// thread 2. prio 10, self-suspend.
+//
+// thread 2a, prio 12, self-suspend.
+//
+// thread 3. prio 15, runs, lock mutex, resume(2)
+//
+// thread 3a, prio 17, self-suspend.
+//
+// 2. runs,
+// 2. resume(3a) +++OPTIONAL
+// 2. resume(2a) +++OPTIONAL
+// 2. resume(1a) +++OPTIONAL
+// [1a lock-fail] thread 3->prio := 8
+//
+// [3. runs maybe, does the looping thing]
+//
+// 2. sleep a while...
+//
+// [2a lock-fail] thread 3->prio := 12
+//
+// [3. runs maybe, does the looping thing]
+//
+// [3a lock-fail] thread 3->prio unchanged
+//
+// [3. runs maybe, does the looping thing]
+//
+// 2. lock scheduler
+// 2. set "go-flag"
+// 2. resume(1)
+// 2. resume(1a) +++OPTIONAL
+// 2. resume(2a) +++OPTIONAL
+// 2. resume(3a) +++OPTIONAL
+// 2. unlock scheduler
+//
+// 1. runs, lock mutex - thread 3 has it locked
+//
+// 2. busy-waits a bit for thread 3 to come out of its delay() loop.
+// This must be a *busy*wait so that 3 can only run via the
+// inherited raised priority.
+//
+// [xa. all do the same: lock mutex, ]
+// [xa. unlock mutex ]
+// [xa. set a flag "extras"[x] to say we are done. ]
+// [xa. exit ]
+//
+//
+//
+// INHERIT
+// -------
+//
+// thread 3->prio := 5
+//
+// 3. runs,
+// 3. set a flag to say "3-ran",
+// 3. loop with a sleep(1) until "go-flag" is set.
+// 3. check "got it" is false,
+// 3. then unlock mutex,
+//
+// thread 3->prio := 15
+//
+// 1. runs, set a flag to say "got it",
+// 1. check "3-ended" flag is false
+// 1. unlock mutex,
+// 1. check "3-ended" flag is still false
+// 1. exit.
+//
+// [1a locks, unlocks, exits]
+//
+// 2. runs, check "3-ran" and "got it" flags are TRUE ****
+// 2. check "3-ended" flag is false
+// 2. sleeps for a while so that...
+//
+// [2a locks, unlocks, exits]
+//
+// 3. runs, set "3-ended" flag,
+// 3. check "3-ran" and "got it" flags
+// 3. exit
+//
+// [3a locks, unlocks, exits]
+//
+// 2. awakens, checks all flags true,
+// 2. check that all "extra" threads that we started have indeed run
+// 2. end of test.
+//
+//
+//
+//
+// NO-INHERIT
+// ----------
+// thread 1 is waiting on the mutex
+//
+// [1a lock-fail]
+//
+// 2. runs, checks that "3-ran" and "got it" flags are FALSE ****
+// 2. check "3-ended" flag is false
+// 2. sleeps for a while so that...
+//
+// [2a. lock-fail]
+//
+// 3. runs, set a flag to say "3-ran",
+// 3. check "got it" is false,
+// 3. then unlock mutex,
+//
+// 1. runs, set a flag to say "got it",
+// 1. check "3-ended" flag is false
+// 1. unlock mutex,
+// 1. check "3-ended" flag is still false
+// 1. exit.
+//
+// [1a locks, unlocks, exits]
+// [2a locks, unlocks, exits]
+//
+// 3. runs, set "3-ended" flag,
+// 3. check "3-ran" and "got it" flags
+// 3. exit
+//
+// [3a locks, unlocks, exits]
+//
+// 2. awakens, checks all flags true,
+// 2. check that all "extra" threads that we started have indeed run
+// 2. end of test.
+//
+//
+// (the end)
+//
+//
+// ------------------------------------------------------------------------
+
+#endif
+
+// EOF mutex3.cxx
diff --git a/cesar/ecos/packages/compat/posix/current/tests/pthread1.c b/cesar/ecos/packages/compat/posix/current/tests/pthread1.c
new file mode 100644
index 0000000000..116bfdf59b
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/tests/pthread1.c
@@ -0,0 +1,119 @@
+//==========================================================================
+//
+// pthread1.cxx
+//
+// POSIX pthread test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-04-10
+// Description: Tests POSIX join functionality.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/infra/testcase.h>
+#include <pkgconf/posix.h>
+
+#ifndef CYGPKG_POSIX_PTHREAD
+#define NA_MSG "POSIX threads not enabled"
+#endif
+
+#ifdef NA_MSG
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA(NA_MSG);
+}
+#else
+
+#include <sys/types.h>
+#include <pthread.h>
+
+//--------------------------------------------------------------------------
+// Thread stack.
+
+char thread_stack[PTHREAD_STACK_MIN*2];
+
+//--------------------------------------------------------------------------
+
+void *pthread_entry1( void *arg)
+{
+ CYG_TEST_INFO( "Thread 1 running" );
+
+ pthread_exit( (void *)((int)arg+1) );
+}
+
+//--------------------------------------------------------------------------
+
+int main(int argc, char **argv)
+{
+ pthread_t thread;
+ pthread_attr_t attr;
+ void *retval;
+
+ CYG_TEST_INIT();
+
+ // Create test thread
+ pthread_attr_init( &attr );
+
+ pthread_attr_setstackaddr( &attr, (void *)&thread_stack[sizeof(thread_stack)] );
+ pthread_attr_setstacksize( &attr, sizeof(thread_stack) );
+
+ pthread_create( &thread,
+ &attr,
+ pthread_entry1,
+ (void *)0x12345678);
+
+ // Now join with it
+ pthread_join( thread, &retval );
+
+ // check retval
+
+ if( (long)retval == 0x12345679 )
+ CYG_TEST_PASS_FINISH( "pthread1" );
+ else
+ CYG_TEST_FAIL_FINISH( "pthread1" );
+}
+
+#endif
+
+//--------------------------------------------------------------------------
+// end of pthread1.c
diff --git a/cesar/ecos/packages/compat/posix/current/tests/pthread2.c b/cesar/ecos/packages/compat/posix/current/tests/pthread2.c
new file mode 100644
index 0000000000..a501fe6592
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/tests/pthread2.c
@@ -0,0 +1,176 @@
+//==========================================================================
+//
+// pthread2.cxx
+//
+// POSIX pthread test 2 - per-thread data
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-04-10
+// Description: Tests POSIX per-thread data.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/infra/testcase.h>
+#include <pkgconf/posix.h>
+
+#ifndef CYGPKG_POSIX_PTHREAD
+#define NA_MSG "POSIX threads not enabled"
+#endif
+
+#ifdef NA_MSG
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA(NA_MSG);
+}
+#else
+
+#include <sys/types.h>
+#include <pthread.h>
+
+//--------------------------------------------------------------------------
+// Thread stack.
+
+char thread_stack[2][PTHREAD_STACK_MIN*2];
+
+pthread_t thread[2];
+
+pthread_key_t key;
+
+//--------------------------------------------------------------------------
+
+void key_destructor( void *val )
+{
+ int ret;
+
+ CYG_TEST_INFO( "key destructor called" );
+
+ if( (long)val == 0xAAAAAAAA )
+ {
+ ret = pthread_setspecific( key, NULL );
+ CYG_TEST_CHECK( ret == 0, "pthread_setspecific() returned error");
+ }
+ else
+ {
+ ret = pthread_setspecific( key, (void *)0xAAAAAAAA );
+ CYG_TEST_CHECK( ret == 0, "pthread_setspecific() returned error");
+ }
+}
+
+//--------------------------------------------------------------------------
+
+void *pthread_entry( void *arg)
+{
+ int ret;
+ int retval = 1;
+ void *val;
+
+ CYG_TEST_INFO( "Thread running" );
+
+ ret = pthread_setspecific( key, arg );
+ CYG_TEST_CHECK( ret == 0, "pthread_setspecific() returned error");
+
+ val = pthread_getspecific( key );
+ CYG_TEST_CHECK( val == arg, "pthread_getspecific() did not return expected value");
+ if( val != arg ) retval = 0;
+
+ sched_yield();
+
+ val = pthread_getspecific( key );
+ CYG_TEST_CHECK( val == arg, "pthread_getspecific() did not return expected value");
+ if( val != arg ) retval = 0;
+
+ pthread_exit( (void *)retval );
+}
+
+//--------------------------------------------------------------------------
+
+int main(int argc, char **argv)
+{
+ int i;
+ int ret;
+ void *retval[2];
+
+ CYG_TEST_INIT();
+
+ // allocate data key
+ ret = pthread_key_create( &key, key_destructor );
+ CYG_TEST_CHECK( ret == 0, "pthread_key_create() returned error");
+
+ // Create test threads
+ for( i = 0; i < 2; i++ )
+ {
+ pthread_attr_t attr;
+ pthread_attr_init( &attr );
+
+ pthread_attr_setstackaddr( &attr, (void *)&thread_stack[i][sizeof(thread_stack[i])] );
+ pthread_attr_setstacksize( &attr, sizeof(thread_stack[i]) );
+
+ ret = pthread_create( &thread[i],
+ &attr,
+ pthread_entry,
+ (void *)(0x12340000+i));
+ CYG_TEST_CHECK( ret == 0, "pthread_create() returned error");
+ }
+
+ // Now join with threads
+ for( i = 0; i < 2; i++ )
+ pthread_join( thread[i], &retval[i] );
+
+
+ ret = pthread_key_delete( key );
+ CYG_TEST_CHECK( ret == 0, "pthread_key_delete() returned error");
+
+ // check retvals
+
+ for( i = 0; i < 2; i++ )
+ if( !(long)retval[0] )
+ CYG_TEST_FAIL_FINISH( "pthread2" );
+
+ CYG_TEST_PASS_FINISH( "pthread2" );
+
+}
+
+#endif
+
+//--------------------------------------------------------------------------
+// end of pthread2.c
diff --git a/cesar/ecos/packages/compat/posix/current/tests/pthread3.c b/cesar/ecos/packages/compat/posix/current/tests/pthread3.c
new file mode 100644
index 0000000000..1f61960cde
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/tests/pthread3.c
@@ -0,0 +1,269 @@
+//==========================================================================
+//
+// pthread3.cxx
+//
+// POSIX pthread test 2 - cancellation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg, jlarmour
+// Date: 2000-04-10
+// Description: Tests POSIX cancellation.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/infra/testcase.h>
+#include <pkgconf/posix.h>
+
+#ifndef CYGPKG_POSIX_PTHREAD
+#define NA_MSG "POSIX threads not enabled"
+#endif
+
+#ifdef NA_MSG
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA(NA_MSG);
+}
+#else
+
+#include <sys/types.h>
+#include <pthread.h>
+#include <unistd.h> // sleep()
+
+//--------------------------------------------------------------------------
+// Thread info
+
+#define NTHREADS 3
+
+char thread_stack[NTHREADS][PTHREAD_STACK_MIN*2];
+
+pthread_t thread[NTHREADS];
+
+void *pthread_entry1( void *arg);
+void *pthread_entry2( void *arg);
+void *pthread_entry3( void *arg);
+
+void *(*pthread_entry[NTHREADS])(void *) =
+{
+ pthread_entry1,
+ pthread_entry2,
+ pthread_entry3
+};
+
+//--------------------------------------------------------------------------
+
+volatile cyg_bool cancel_handler1_called = false;
+volatile cyg_bool cancel_handler2_called = false;
+volatile cyg_bool cancel_handler3_called = false;
+volatile cyg_bool thread_ready[NTHREADS];
+
+//--------------------------------------------------------------------------
+
+void cancel_handler1( void * arg )
+{
+ CYG_TEST_INFO( "cancel_handler1 called" );
+
+ CYG_TEST_CHECK( (long)arg == 0x12340000, "cancel_handler1: bad arg value");
+
+ cancel_handler1_called = true;
+}
+
+//--------------------------------------------------------------------------
+
+void cancel_handler2( void * arg )
+{
+ CYG_TEST_INFO( "cancel_handler2 called" );
+
+ CYG_TEST_CHECK( (long)arg == 0xFFFF1111, "cancel_handler2: bad arg value");
+
+ cancel_handler2_called = true;
+}
+
+//--------------------------------------------------------------------------
+
+void cancel_handler3( void * arg )
+{
+ CYG_TEST_INFO( "cancel_handler3 called" );
+
+ CYG_TEST_CHECK( (long)arg == 0x12340001, "cancel_handler3: bad arg value");
+
+ cancel_handler3_called = true;
+}
+
+//--------------------------------------------------------------------------
+
+void function1(void)
+{
+
+ pthread_cleanup_push( cancel_handler2, (void *)0xFFFF1111 );
+
+ for(;;)
+ {
+ sched_yield();
+ pthread_testcancel();
+ }
+
+ pthread_cleanup_pop( 0 );
+}
+
+//--------------------------------------------------------------------------
+
+void *pthread_entry1( void *arg)
+{
+ int retval = 1;
+
+ CYG_TEST_INFO( "pthread_entry1 entered");
+
+ pthread_setcanceltype( PTHREAD_CANCEL_DEFERRED, NULL );
+
+ pthread_cleanup_push( cancel_handler1, arg );
+
+ thread_ready[0] = true;
+
+ function1();
+
+ pthread_cleanup_pop( 0 );
+
+ pthread_exit( (void *)retval );
+}
+
+//--------------------------------------------------------------------------
+
+void *pthread_entry2( void *arg)
+{
+ int retval = 1;
+
+ CYG_TEST_INFO( "pthread_entry2 entered");
+
+ pthread_setcanceltype( PTHREAD_CANCEL_ASYNCHRONOUS, NULL );
+
+ pthread_cleanup_push( cancel_handler3, arg );
+
+ thread_ready[1] = true;
+
+ for(;;) sched_yield();
+
+ pthread_cleanup_pop( 0 );
+
+ pthread_exit( (void *)retval );
+}
+
+//--------------------------------------------------------------------------
+
+void *pthread_entry3( void *arg)
+{
+ int retval = 1;
+
+ CYG_TEST_INFO( "pthread_entry3 entered");
+
+ pthread_setcanceltype( PTHREAD_CANCEL_DEFERRED, NULL );
+
+ thread_ready[2] = true;
+
+ // stop in a cancellation point
+ sleep( 99999 );
+
+ pthread_exit( (void *)retval );
+}
+
+//--------------------------------------------------------------------------
+
+int main(int argc, char **argv)
+{
+ int i, j;
+ int ret;
+ void *retval[NTHREADS];
+
+ CYG_TEST_INIT();
+
+ // Create test threads
+ for( i = 0; i < NTHREADS; i++ )
+ {
+ pthread_attr_t attr;
+ pthread_attr_init( &attr );
+
+ pthread_attr_setstackaddr( &attr, (void *)&thread_stack[i][sizeof(thread_stack[i])] );
+ pthread_attr_setstacksize( &attr, sizeof(thread_stack[i]) );
+
+ ret = pthread_create( &thread[i],
+ &attr,
+ pthread_entry[i],
+ (void *)(0x12340000+i));
+ CYG_TEST_CHECK( ret == 0, "pthread_create() returned error");
+ }
+
+ // Let the threads get going
+ for ( i = 0; i < NTHREADS ; i++ ) {
+ while ( thread_ready[i] == false )
+ sched_yield();
+ }
+
+ // Now wait a bit to be sure that the other threads have reached
+ // their cancellation points.
+ for ( j = 0; j < 20 ; j++ )
+ sched_yield();
+
+ // Now cancel them
+ for( i = 0; i < NTHREADS; i++ )
+ pthread_cancel( thread[i] );
+
+ // Now join with threads
+ for( i = 0; i < NTHREADS; i++ )
+ pthread_join( thread[i], &retval[i] );
+
+
+ // check retvals
+ for( i = 0; i < NTHREADS; i++ )
+ CYG_TEST_CHECK( retval[i] == PTHREAD_CANCELED,
+ "thread didn't exit with PTHREAD_CANCELED" );
+
+ CYG_TEST_CHECK( cancel_handler1_called, "cancel_handler1 not called" );
+ CYG_TEST_CHECK( cancel_handler2_called, "cancel_handler2 not called" );
+ CYG_TEST_CHECK( cancel_handler3_called, "cancel_handler3 not called" );
+
+ CYG_TEST_PASS_FINISH( "pthread3" );
+
+}
+
+#endif
+
+//--------------------------------------------------------------------------
+// end of pthread3.c
diff --git a/cesar/ecos/packages/compat/posix/current/tests/signal1.c b/cesar/ecos/packages/compat/posix/current/tests/signal1.c
new file mode 100644
index 0000000000..f414c28a85
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/tests/signal1.c
@@ -0,0 +1,302 @@
+//==========================================================================
+//
+// signal1.cxx
+//
+// POSIX signal test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-04-10
+// Description: Tests POSIX signal functionality.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/infra/testcase.h>
+#include <pkgconf/posix.h>
+
+#if !defined(CYGPKG_POSIX_SIGNALS)
+#define NA_MSG "POSIX signals not enabled"
+#elif !defined(CYGPKG_POSIX_PTHREAD)
+#define NA_MSG "POSIX threads not enabled"
+#endif
+
+#ifdef NA_MSG
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA(NA_MSG);
+}
+#else
+
+#include <sys/types.h>
+#include <pthread.h>
+#include <signal.h>
+#include <semaphore.h>
+#include <errno.h>
+
+//--------------------------------------------------------------------------
+// Thread stack.
+
+char thread_stack[PTHREAD_STACK_MIN*2];
+
+//--------------------------------------------------------------------------
+// Local variables
+
+// Sync semaphore
+sem_t sem;
+
+// Thread ID
+pthread_t thread1;
+
+volatile int sigusr2_called = 0;
+volatile int sigalrm_called = 0;
+
+//--------------------------------------------------------------------------
+// Signal handler functions
+
+static void sigusr2( int signo )
+{
+ CYG_TEST_INFO( "sigusr2() handler called" );
+ CYG_TEST_CHECK( signo == SIGUSR2, "Signal not SIGUSR2");
+ CYG_TEST_CHECK( pthread_equal(pthread_self(), thread1), "Not called in thread1");
+
+ sigusr2_called++;
+}
+
+static void sigalrm( int signo )
+{
+ CYG_TEST_INFO( "sigalrm() handler called" );
+ CYG_TEST_CHECK( signo == SIGALRM, "Signal not SIGALRM");
+ CYG_TEST_CHECK( pthread_equal(pthread_self(), thread1), "Not called in thread1");
+
+ sigalrm_called++;
+}
+
+//--------------------------------------------------------------------------
+
+void *pthread_entry1( void *arg)
+{
+ sigset_t mask;
+ siginfo_t info;
+ struct timespec timeout;
+ int sig, sig2, err;
+
+ CYG_TEST_INFO( "Thread 1 running" );
+
+ // Should have inherited parent's signal mask
+ pthread_sigmask( 0, NULL, &mask );
+ CYG_TEST_CHECK( sigismember( &mask, SIGALRM),
+ "SIGALRM mask inherited");
+ CYG_TEST_CHECK( sigismember( &mask, SIGUSR1),
+ "SIGUSR1 mask inherited");
+ CYG_TEST_CHECK( sigismember( &mask, SIGUSR2),
+ "SIGUSR2 mask inherited");
+ CYG_TEST_CHECK( sigismember( &mask, SIGSEGV),
+ "SIGSEGV mask inherited");
+
+ // Make a full set
+ sigfillset( &mask );
+
+ // remove USR2 and ALRM signals
+ sigdelset( &mask, SIGUSR2 );
+ sigdelset( &mask, SIGALRM );
+
+ // Set signal mask
+ pthread_sigmask( SIG_SETMASK, &mask, NULL );
+
+ // Get main thread going again
+ sem_post( &sem );
+
+ // set up timeout
+ timeout.tv_sec = 10;
+ timeout.tv_nsec = 0;
+
+ CYG_TEST_INFO( "Thread1: calling sigtimedwait()");
+
+ // Wait for a signal to be delivered
+ sig = sigtimedwait( &mask, &info, &timeout );
+
+ sig2 = info.si_signo;
+
+ CYG_TEST_CHECK( sig == sig2, "sigtimedwait return value not equal");
+ CYG_TEST_CHECK( sig == SIGUSR1, "Signal not delivered");
+
+ while( sigusr2_called != 2 )
+ {
+ CYG_TEST_INFO( "Thread1: calling pause()");
+ pause();
+ }
+
+ errno = 0; // strictly correct to reset errno first
+
+ // now wait for SIGALRM to be delivered
+ CYG_TEST_INFO( "Thread1: calling pause()");
+ err = pause();
+ CYG_TEST_CHECK( -1==err, "pause returned -1");
+ CYG_TEST_CHECK( EINTR==errno, "errno set to EINTR");
+
+ // generate another SIGALRM and wait for it to be delivered too
+ // we need to mask it first though
+
+ // Make a full set
+ sigfillset( &mask );
+
+ // Set signal mask
+ pthread_sigmask( SIG_SETMASK, &mask, NULL );
+
+ alarm(1);
+ CYG_TEST_INFO( "Thread1: calling sigwait()");
+ err = sigwait( &mask, &sig);
+ CYG_TEST_CHECK( 0==err, "sigwait returned -1");
+ CYG_TEST_CHECK( sig==SIGALRM, "sigwait caught alarm");
+
+ CYG_TEST_INFO( "Thread1: calling pthread_exit()");
+ pthread_exit( (void *)((int)arg+sig2) );
+}
+
+//--------------------------------------------------------------------------
+
+int main(int argc, char **argv)
+{
+ int ret;
+ sigset_t mask;
+ pthread_attr_t attr;
+ void *retval;
+ union sigval value;
+
+ CYG_TEST_INIT();
+
+ // Make a full signal set
+ sigfillset( &mask );
+
+
+ // Install signal handlers
+ {
+ struct sigaction sa;
+
+ sa.sa_handler = sigusr2;
+ sa.sa_mask = mask;
+ sa.sa_flags = 0;
+
+ ret = sigaction( SIGUSR2, &sa, NULL );
+
+ CYG_TEST_CHECK( ret == 0 , "sigaction returned error");
+ }
+
+ {
+ struct sigaction sa;
+
+ sa.sa_handler = sigalrm;
+ sa.sa_mask = mask;
+ sa.sa_flags = 0;
+
+ ret = sigaction( SIGALRM, &sa, NULL );
+
+ CYG_TEST_CHECK( ret == 0 , "sigaction returned error");
+ }
+
+
+ // Mask all signals
+ pthread_sigmask( SIG_SETMASK, &mask, NULL );
+
+ sem_init( &sem, 0, 0 );
+
+ // Create test thread
+ pthread_attr_init( &attr );
+
+ pthread_attr_setstackaddr( &attr, (void *)&thread_stack[sizeof(thread_stack)] );
+ pthread_attr_setstacksize( &attr, sizeof(thread_stack) );
+
+ pthread_create( &thread1,
+ &attr,
+ pthread_entry1,
+ (void *)0x12345678);
+
+ // Wait for other thread to get started
+ CYG_TEST_INFO( "Main: calling sem_wait()");
+ sem_wait( &sem );
+
+ value.sival_int = 0;
+
+ // send a signal to the other thread
+ CYG_TEST_INFO( "Main: calling sigqueue(SIGUSR1)");
+ sigqueue( 0, SIGUSR1, value );
+
+ // Send the signal via kill
+ CYG_TEST_INFO( "Main: calling kill(0, SIGUSR2)");
+ kill( 0, SIGUSR2 );
+
+ // Wait for thread1 to call pause()
+ CYG_TEST_INFO( "Main: calling sleep(1)");
+ sleep(1);
+
+ // And again
+ CYG_TEST_INFO( "Main: calling kill(0, SIGUSR2)");
+ kill( 0, SIGUSR2 );
+
+ // Set up an alarm for 1 second hence
+ CYG_TEST_INFO( "Main: calling alarm(1)");
+ alarm(1);
+
+ // Wait for alarm signal to be delivered to thread1
+ CYG_TEST_INFO( "Main: calling sleep(2)");
+ sleep(2);
+
+ // Now join with thread1
+ CYG_TEST_INFO( "Main: calling pthread_join()");
+ pthread_join( thread1, &retval );
+
+ CYG_TEST_CHECK( sigusr2_called == 2, "SIGUSR2 signal handler not called twice" );
+
+ CYG_TEST_CHECK( sigalrm_called == 1, "SIGALRM signal handler not called" );
+
+ // check retval
+
+ if( (long)retval == 0x12345678+SIGUSR1 )
+ CYG_TEST_PASS_FINISH( "signal1" );
+ else
+ CYG_TEST_FAIL_FINISH( "signal1" );
+}
+
+#endif
+
+//--------------------------------------------------------------------------
+// end of signal1.c
diff --git a/cesar/ecos/packages/compat/posix/current/tests/signal2.c b/cesar/ecos/packages/compat/posix/current/tests/signal2.c
new file mode 100644
index 0000000000..358965dcc7
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/tests/signal2.c
@@ -0,0 +1,313 @@
+//==========================================================================
+//
+// signal2.cxx
+//
+// POSIX signal test 2
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: jlarmour
+// Date: 2000-04-10
+// Description: Tests POSIX signal functionality.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <pkgconf/isoinfra.h>
+#include <cyg/hal/hal_intr.h> // For exception codes
+
+#include <sys/types.h>
+#include <pthread.h>
+#include <signal.h>
+#include <semaphore.h>
+
+#include <setjmp.h>
+
+#include <cyg/infra/testcase.h>
+
+#if CYGINT_ISO_SETJMP == 0
+# define NA_MSG "Requires setjmp/longjmp implementation"
+#elif !defined(CYGPKG_POSIX_SIGNALS)
+# define NA_MSG "POSIX signals not enabled"
+#endif
+
+#ifdef NA_MSG
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( NA_MSG );
+}
+#else
+
+//--------------------------------------------------------------------------
+// Local variables
+
+static jmp_buf jbuf;
+
+//--------------------------------------------------------------------------
+
+// PowerPC is a special case as it has the alignment exception, but it
+// doesn't trigger for this function unless in little-endian mode (although
+// the exception exists for other instructions not used by this function so
+// CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS will still be defined
+
+#if defined(CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS) && !(defined(CYGPKG_HAL_POWERPC) && (CYG_BYTEORDER==CYG_MSBFIRST))
+
+static void
+cause_unaligned_access(void)
+{
+ volatile int x;
+ volatile CYG_ADDRESS p=(CYG_ADDRESS) &jbuf;
+
+ x = *(volatile int *)(p+1);
+
+} // cause_unaligned_access()
+
+#endif
+
+//--------------------------------------------------------------------------
+
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_ACCESS
+
+static void
+cause_illegal_access(void)
+{
+#ifdef CYGPKG_HAL_I386
+
+ // In the x86 architecture, although we have the DATA_ACCESS
+ // exception available, it is not possible to provoke it using the
+ // normal code of this test. This is because the normal segments we
+ // have installed in the segment registers cover all of memory. Instead we
+ // set GS to a descriptor that does not cover 0xF0000000-0xFFFFFFFF and
+ // poke at that.
+
+ __asm__ ( "movw $0x20,%%ax\n"
+ "movw %%ax,%%gs\n"
+ "movl %%gs:0xF0000000,%%eax\n"
+ :
+ :
+ : "eax"
+ );
+
+#else
+ volatile int x;
+ volatile CYG_ADDRESS p=(CYG_ADDRESS) &jbuf;
+
+ do
+ {
+ x = *(volatile int *)(p);
+ p += (CYG_ADDRESS)0x100000;
+ } while( p != (CYG_ADDRESS)&jbuf );
+
+#endif
+} // cause_illegal_access()
+
+#endif
+
+//--------------------------------------------------------------------------
+
+#ifdef CYGNUM_HAL_EXCEPTION_FPU_DIV_BY_ZERO
+
+// num must always be 0 - do it this way in case the optimizer tries to
+// get smart
+
+static int
+cause_fpe(int num)
+{
+ double a;
+
+ a = 1.0/num; // Depending on FPU emulation and/or
+ // the FPU architecture, this may
+ // cause an exception.
+ // (float division by zero)
+
+ return ((int)a)/num; // This may cause an exception if
+ // the architecture supports it.
+ // (integer division by zero).
+} // cause_fpe()
+
+#endif
+
+//--------------------------------------------------------------------------
+// Signal handler functions
+
+static void sigsegv( int signo )
+{
+ CYG_TEST_INFO( "sigsegv() handler called" );
+ CYG_TEST_CHECK( signo == SIGSEGV, "Signal not SIGSEGV");
+
+ longjmp( jbuf, 1 );
+}
+
+static void sigbus( int signo )
+{
+ CYG_TEST_INFO( "sigbus() handler called" );
+ CYG_TEST_CHECK( signo == SIGBUS, "Signal not SIGBUS");
+
+ longjmp( jbuf, 1 );
+}
+
+static void sigfpe( int signo )
+{
+ CYG_TEST_INFO( "sigfpe() handler called" );
+ CYG_TEST_CHECK( signo == SIGFPE, "Signal not SIGFPE");
+
+ longjmp( jbuf, 1 );
+}
+
+
+//--------------------------------------------------------------------------
+
+int main(int argc, char **argv)
+{
+ int ret;
+ sigset_t mask;
+ struct sigaction sa;
+
+ CYG_TEST_INIT();
+
+ // Make a full signal set
+ sigfillset( &mask );
+
+
+ // Install signal handlers
+
+ sa.sa_mask = mask;
+ sa.sa_flags = 0;
+
+ sa.sa_handler = sigsegv;
+ ret = sigaction( SIGSEGV, &sa, NULL );
+ CYG_TEST_CHECK( ret == 0 , "sigaction returned error");
+
+ sa.sa_handler = sigbus;
+ ret = sigaction( SIGBUS, &sa, NULL );
+ CYG_TEST_CHECK( ret == 0 , "sigaction returned error");
+
+ sa.sa_handler = sigfpe;
+ ret = sigaction( SIGFPE, &sa, NULL );
+ CYG_TEST_CHECK( ret == 0 , "sigaction returned error");
+
+ // now make an empty signal set
+ sigemptyset( &mask );
+
+// Now reset the various exception handlers to eCos handlers so that we
+// have control; this is the target side equivalent of the CYG_TEST_GDBCMD
+// lines above:
+#ifdef HAL_VSR_SET_TO_ECOS_HANDLER
+ // Reclaim the VSR off CygMon possibly
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_ACCESS
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_DATA_ACCESS, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_TLBMISS_ACCESS
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_DATA_TLBMISS_ACCESS, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU_DIV_BY_ZERO
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_FPU_DIV_BY_ZERO, NULL );
+#endif
+#endif
+
+ // PowerPC is a special case as it has the alignment exception, but it
+ // doesn't trigger for this function unless in little-endian mode (although
+ // the exception exists for other instructions not used by this function so
+ // CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS will still be defined
+
+#if defined(CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS) && !(defined(CYGPKG_HAL_POWERPC) && (CYG_BYTEORDER==CYG_MSBFIRST))
+
+ CYG_TEST_INFO("Test 1 - provoke unaligned access");
+
+ if( setjmp( jbuf ) == 0 )
+ {
+ pthread_sigmask( SIG_SETMASK, &mask, NULL );
+ cause_unaligned_access();
+ CYG_TEST_FAIL("Didn't cause exception");
+ }
+
+#else
+
+ CYG_TEST_INFO("Test 1 - provoke unaligned access - not supported");
+
+#endif
+
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_ACCESS
+
+ CYG_TEST_INFO("Test 2 - provoke illegal access");
+
+ if( setjmp( jbuf ) == 0 )
+ {
+ pthread_sigmask( SIG_SETMASK, &mask, NULL );
+ cause_illegal_access();
+ CYG_TEST_FAIL("Didn't cause exception");
+ }
+
+#else
+
+ CYG_TEST_INFO("Test 1 - provoke illegal access - not supported");
+
+#endif
+
+#ifdef CYGNUM_HAL_EXCEPTION_FPU_DIV_BY_ZERO
+
+ CYG_TEST_INFO("Test 3 - provoke FP error");
+
+ if( setjmp( jbuf ) == 0 )
+ {
+ pthread_sigmask( SIG_SETMASK, &mask, NULL );
+ cause_fpe(0);
+ CYG_TEST_FAIL("Didn't cause exception");
+ }
+
+#else
+
+ CYG_TEST_INFO("Test 3 - provoke FP error - not supported");
+
+#endif
+
+ CYG_TEST_PASS_FINISH( "signal2" );
+}
+
+#endif // ifndef NA_MSG
+
+//--------------------------------------------------------------------------
+// end of signal1.c
diff --git a/cesar/ecos/packages/compat/posix/current/tests/signal3.c b/cesar/ecos/packages/compat/posix/current/tests/signal3.c
new file mode 100644
index 0000000000..58292892c2
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/tests/signal3.c
@@ -0,0 +1,174 @@
+//==========================================================================
+//
+// signal3.cxx
+//
+// POSIX signal test 3
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2003-01-30
+// Description: Tests POSIX signal functionality.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/infra/testcase.h>
+#include <pkgconf/posix.h>
+
+#if !defined(CYGPKG_POSIX_SIGNALS)
+#define NA_MSG "POSIX signals not enabled"
+#elif !defined(CYGPKG_POSIX_PTHREAD)
+#define NA_MSG "POSIX threads not enabled"
+#endif
+
+#ifdef NA_MSG
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA(NA_MSG);
+}
+#else
+
+#include <signal.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <errno.h>
+#include <cyg/infra/diag.h>
+
+volatile int sigusr1_called = 0;
+
+//--------------------------------------------------------------------------
+// Signal handler functions
+
+static void sigusr1( int signo )
+{
+ CYG_TEST_INFO( "sigusr1() handler called" );
+ CYG_TEST_CHECK( signo == SIGUSR1, "Signal not SIGUSR1");
+
+ sigusr1_called++;
+}
+
+//--------------------------------------------------------------------------
+
+int main (int argc, char **argv)
+{
+ int ret_val;
+ sigset_t set;
+ int sig;
+ struct itimerspec timerValue; // Timeout value on eCos
+ timer_t timer1; // Timer
+ struct sigevent sev;
+
+ CYG_TEST_INIT();
+
+ {
+ struct sigaction sa;
+
+ sa.sa_handler = sigusr1;
+ sigfillset( &sa.sa_mask );
+ sa.sa_flags = 0;
+
+ ret_val = sigaction( SIGUSR1, &sa, NULL );
+
+ CYG_TEST_CHECK( ret_val == 0 , "sigaction returned error");
+ }
+
+ // unblock all the signals
+ sigfillset (&set);
+ pthread_sigmask (SIG_UNBLOCK, &set, (sigset_t*)NULL);
+
+ //--------------------------------------------------------------------
+ // <start of timer initialization section>
+ //--------------------------------------------------------------------
+
+ // Notification type --- Deliver the signal
+ sev.sigev_notify = SIGEV_SIGNAL;
+ sev.sigev_signo = SIGUSR1;
+ sev.sigev_value.sival_int = 0xABCDEF01;
+
+ // Timer values --- 1 Second
+ timerValue.it_value.tv_sec = 1;
+ timerValue.it_value.tv_nsec = 0;
+ timerValue.it_interval.tv_sec = 1;
+ timerValue.it_interval.tv_nsec = 0;
+
+ ret_val = timer_create (CLOCK_REALTIME, &sev, &timer1);
+
+ CYG_TEST_CHECK( ret_val==0, "Error in creating the timer");
+
+ ret_val = timer_settime (timer1, 0, &timerValue, NULL );
+ CYG_TEST_CHECK( ret_val==0,"Error in setting the time");
+
+ //--------------------------------------------------------------------
+ // <end of timer initialization section>
+ //--------------------------------------------------------------------
+
+ CYG_TEST_INFO ("Timer initialisation is completed..");
+
+ CYG_TEST_INFO ("Calling pause()");
+ ret_val = pause();
+ CYG_TEST_CHECK( ret_val==-1, "pause() did not return -1");
+ CYG_TEST_CHECK( EINTR==errno, "errno set to EINTR");
+ CYG_TEST_CHECK( sigusr1_called==1, "Siguser1 handler not called");
+
+ // Block all the signals
+ sigfillset (&set);
+ pthread_sigmask (SIG_BLOCK, &set, (sigset_t*)NULL);
+
+ CYG_TEST_INFO ("Calling sigwait()");
+ // Wait for any signal to arrive
+ sigfillset (&set);
+ ret_val = sigwait (&set, &sig);
+
+ CYG_TEST_CHECK( ret_val==0, "sigwait returned error");
+ CYG_TEST_CHECK( sig==SIGUSR1, "sigwait returned wrong signo!");
+ CYG_TEST_CHECK( sigusr1_called==1, "Siguser1 handler called!");
+
+ CYG_TEST_INFO ("Program terminating");
+
+ CYG_TEST_PASS_FINISH( "signal3" );
+ return 0;
+}
+
+
+#endif
+
+//--------------------------------------------------------------------------
+// end of signal3.c
diff --git a/cesar/ecos/packages/compat/posix/current/tests/sigsetjmp.c b/cesar/ecos/packages/compat/posix/current/tests/sigsetjmp.c
new file mode 100644
index 0000000000..6fd0f1185b
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/tests/sigsetjmp.c
@@ -0,0 +1,383 @@
+//==========================================================================
+//
+// sigsetjmp.c
+//
+// POSIX sigsetjmp test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-04-10
+// Description: Tests POSIX sigsetjmp functionality.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/infra/testcase.h>
+#include <pkgconf/posix.h>
+
+#if !defined(CYGPKG_POSIX_SIGNALS)
+#define NA_MSG "POSIX signals not enabled"
+#elif !defined(CYGPKG_POSIX_PTHREAD)
+#define NA_MSG "POSIX threads not enabled"
+#endif
+
+#ifdef NA_MSG
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA(NA_MSG);
+}
+#else
+
+#include <sys/types.h>
+#include <pthread.h>
+#include <signal.h>
+#include <semaphore.h>
+#include <time.h>
+#include <setjmp.h>
+
+#include <cyg/infra/testcase.h>
+
+//--------------------------------------------------------------------------
+// Thread stack.
+
+char thread1_stack[PTHREAD_STACK_MIN*2];
+char thread2_stack[PTHREAD_STACK_MIN*2];
+
+//--------------------------------------------------------------------------
+// Local variables
+
+// Sync semaphore
+sem_t sem;
+
+// Thread IDs
+pthread_t thread1;
+pthread_t thread2;
+
+timer_t timer1;
+timer_t timer2;
+
+volatile int sigusr1_called = 0;
+volatile int sigusr2_called = 0;
+
+sigjmp_buf jmpbuf1;
+sigjmp_buf jmpbuf2;
+
+//--------------------------------------------------------------------------
+// Signal handler functions
+
+static void sigusr1( int signo, siginfo_t *info, void *context )
+{
+ CYG_TEST_INFO( "sigusr1() handler called" );
+ CYG_TEST_CHECK( signo == SIGUSR1, "Signal not SIGUSR1");
+ CYG_TEST_CHECK( signo == info->si_signo, "Bad signal number in siginfo" );
+ CYG_TEST_CHECK( info->si_code == SI_TIMER, "Siginfo code not SI_TIMER" );
+ CYG_TEST_CHECK( info->si_value.sival_int == 0xABCDEF01, "Siginfo value wrong");
+ CYG_TEST_CHECK( pthread_equal(pthread_self(), thread1), "Not called in thread1");
+
+ sigusr1_called++;
+
+ CYG_TEST_INFO( "sigusr1() handler calling siglongjmp()" );
+
+ siglongjmp( jmpbuf1, sigusr1_called );
+}
+
+static void sigusr2( int signo, siginfo_t *info, void *context )
+{
+ CYG_TEST_INFO( "sigusr2() handler called" );
+ CYG_TEST_CHECK( signo == SIGUSR2, "Signal not SIGUSR2");
+ CYG_TEST_CHECK( signo == info->si_signo, "Bad signal number in siginfo" );
+ CYG_TEST_CHECK( info->si_code == SI_TIMER, "Siginfo code not SI_TIMER" );
+ CYG_TEST_CHECK( info->si_value.sival_int == 0xABCDEF02, "Siginfo value wrong");
+ CYG_TEST_CHECK( pthread_equal(pthread_self(), thread2), "Not called in thread2");
+
+ sigusr2_called++;
+
+ CYG_TEST_INFO( "sigusr2() handler calling siglongjmp()" );
+ siglongjmp( jmpbuf2, sigusr2_called );
+}
+
+//--------------------------------------------------------------------------
+
+void *pthread_entry1( void *arg)
+{
+ sigset_t mask;
+
+
+ CYG_TEST_INFO( "Thread 1 running" );
+
+ // Make a full set
+ sigfillset( &mask );
+
+ // remove USR1 signal
+ sigdelset( &mask, SIGUSR1 );
+
+ // Set signal mask
+ pthread_sigmask( SIG_SETMASK, &mask, NULL );
+
+ // Get main thread going again
+ sem_post( &sem );
+
+ do
+ {
+ sigset_t curmask;
+
+ CYG_TEST_INFO( "Thread1: calling sigsetjmp()");
+ if( sigsetjmp( jmpbuf1, 1 ) != 0 )
+ CYG_TEST_INFO( "Thread1: sigsetjmp() returned non-zero");
+
+ pthread_sigmask( SIG_SETMASK, NULL, &curmask );
+ CYG_TEST_CHECK( curmask == mask, "Thread1: Signal masks not equal" );
+
+ if ( sigusr1_called >= 1 )
+ break;
+
+ CYG_TEST_INFO( "Thread1: calling pause()");
+ pause();
+
+ CYG_TEST_INFO( "Thread1: pause() returned");
+ } while(1);
+
+ CYG_TEST_INFO( "Thread1: calling pthread_exit()");
+ pthread_exit( arg );
+}
+
+//--------------------------------------------------------------------------
+
+void *pthread_entry2( void *arg)
+{
+ sigset_t mask;
+
+ CYG_TEST_INFO( "Thread 2 running" );
+
+ // Make a full set
+ sigfillset( &mask );
+
+ // remove USR2 signal
+ sigdelset( &mask, SIGUSR2 );
+
+ // Set signal mask
+ pthread_sigmask( SIG_SETMASK, &mask, NULL );
+
+ // Get main thread going again
+ sem_post( &sem );
+
+ do
+ {
+ sigset_t curmask;
+
+ CYG_TEST_INFO( "Thread2: calling sigsetjmp()");
+ if( sigsetjmp( jmpbuf2, 1 ) != 0 )
+ CYG_TEST_INFO( "Thread2: sigsetjmp() returned non-zero");
+
+ pthread_sigmask( SIG_SETMASK, NULL, &curmask );
+ CYG_TEST_CHECK( curmask == mask, "Thread2: Signal masks not equal" );
+
+ if ( sigusr2_called >= 6 )
+ break;
+
+ CYG_TEST_INFO( "Thread2: calling pause()");
+ pause();
+
+ CYG_TEST_INFO( "Thread2: pause() returned");
+ } while(1);
+
+ CYG_TEST_INFO( "Thread2: calling pthread_exit()");
+ pthread_exit( arg );
+}
+
+//--------------------------------------------------------------------------
+
+int main(int argc, char **argv)
+{
+ int ret;
+ sigset_t mask;
+ pthread_attr_t attr;
+ void *retval;
+
+ CYG_TEST_INIT();
+
+ // Make a full signal set
+ sigfillset( &mask );
+
+
+ // Install signal handlers
+ {
+ struct sigaction sa;
+
+ sa.sa_sigaction = sigusr1;
+ sa.sa_mask = mask;
+ sa.sa_flags = SA_SIGINFO;
+
+ ret = sigaction( SIGUSR1, &sa, NULL );
+
+ CYG_TEST_CHECK( ret == 0 , "sigaction returned error");
+ }
+ {
+ struct sigaction sa;
+
+ sa.sa_sigaction = sigusr2;
+ sa.sa_mask = mask;
+ sa.sa_flags = SA_SIGINFO;
+
+ ret = sigaction( SIGUSR2, &sa, NULL );
+
+ CYG_TEST_CHECK( ret == 0 , "sigaction returned error");
+ }
+
+
+ // Create the timers
+
+ {
+ struct sigevent sev;
+ struct itimerspec value;
+
+ sev.sigev_notify = SIGEV_SIGNAL;
+ sev.sigev_signo = SIGUSR1;
+ sev.sigev_value.sival_int = 0xABCDEF01;
+
+ value.it_value.tv_sec = 1;
+ value.it_value.tv_nsec = 0;
+ value.it_interval.tv_sec = 0;
+ value.it_interval.tv_nsec = 0;
+
+ ret = timer_create( CLOCK_REALTIME, &sev, &timer1 );
+
+ CYG_TEST_CHECK( ret == 0 , "timer_create returned error");
+
+ ret = timer_settime( timer1, 0, &value, NULL );
+
+ CYG_TEST_CHECK( ret == 0 , "timer_settime returned error");
+ }
+
+ {
+ struct sigevent sev;
+ struct itimerspec value;
+
+ sev.sigev_notify = SIGEV_SIGNAL;
+ sev.sigev_signo = SIGUSR2;
+ sev.sigev_value.sival_int = 0xABCDEF02;
+
+ value.it_value.tv_sec = 0;
+ value.it_value.tv_nsec = 500000000;
+ value.it_interval.tv_sec = 0;
+ value.it_interval.tv_nsec = 250000000;
+
+ ret = timer_create( CLOCK_REALTIME, &sev, &timer2 );
+
+ CYG_TEST_CHECK( ret == 0 , "timer_create returned error");
+
+ ret = timer_settime( timer2, 0, &value, NULL );
+
+ CYG_TEST_CHECK( ret == 0 , "timer_settime returned error");
+ }
+
+
+ // Mask all signals
+ pthread_sigmask( SIG_SETMASK, &mask, NULL );
+
+ sem_init( &sem, 0, 0 );
+
+ // Create test threads
+
+ {
+ pthread_attr_init( &attr );
+
+ pthread_attr_setstackaddr( &attr, (void *)&thread1_stack[sizeof(thread1_stack)] );
+ pthread_attr_setstacksize( &attr, sizeof(thread1_stack) );
+
+ pthread_create( &thread1,
+ &attr,
+ pthread_entry1,
+ (void *)0x12345671);
+ }
+
+ {
+ pthread_attr_init( &attr );
+
+ pthread_attr_setstackaddr( &attr, (void *)&thread2_stack[sizeof(thread2_stack)] );
+ pthread_attr_setstacksize( &attr, sizeof(thread2_stack) );
+
+ pthread_create( &thread2,
+ &attr,
+ pthread_entry2,
+ (void *)0x12345672);
+ }
+
+ // Wait for other thread to get started
+ CYG_TEST_INFO( "Main: calling sem_wait()");
+ sem_wait( &sem );
+ CYG_TEST_INFO( "Main: calling sem_wait() again");
+ sem_wait( &sem );
+
+ // Now join with thread1
+ CYG_TEST_INFO( "Main: calling pthread_join(thread1)");
+ pthread_join( thread1, &retval );
+
+ CYG_TEST_CHECK( retval == (void *)0x12345671, "Thread 1 retval wrong");
+
+ // And thread 2
+ CYG_TEST_INFO( "Main: calling pthread_join(thread2)");
+ pthread_join( thread2, &retval );
+
+ // now delete the timers
+ CYG_TEST_INFO( "Main: calling timer_delete(timer1)");
+ ret = timer_delete( timer1 );
+
+ CYG_TEST_CHECK( ret == 0 , "timer_delete(timer1) returned error");
+
+ CYG_TEST_INFO( "Main: calling timer_delete(timer2)");
+ ret = timer_delete( timer2 );
+
+ CYG_TEST_CHECK( ret == 0 , "timer_delete(timer2) returned error");
+
+
+ CYG_TEST_CHECK( retval == (void *)0x12345672, "Thread 2 retval wrong");
+
+ CYG_TEST_CHECK( sigusr1_called == 1, "SIGUSR1 signal handler not called once" );
+ CYG_TEST_CHECK( sigusr2_called == 6, "SIGUSR2 signal handler not called six times" );
+
+ CYG_TEST_PASS_FINISH( "sigsetjmp" );
+}
+
+#endif
+
+//--------------------------------------------------------------------------
+// end of sigsetjmp.c
diff --git a/cesar/ecos/packages/compat/posix/current/tests/timer1.c b/cesar/ecos/packages/compat/posix/current/tests/timer1.c
new file mode 100644
index 0000000000..38d22b5e6d
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/tests/timer1.c
@@ -0,0 +1,343 @@
+//==========================================================================
+//
+// timer1.cxx
+//
+// POSIX signal test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-04-10
+// Description: Tests POSIX signal functionality.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/infra/testcase.h>
+#include <pkgconf/posix.h>
+
+#ifndef CYGPKG_POSIX_SIGNALS
+#define NA_MSG "No POSIX signals"
+#elif !defined(CYGPKG_POSIX_TIMERS)
+#define NA_MSG "No POSIX timers"
+#endif
+
+#ifdef NA_MSG
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA(NA_MSG);
+}
+#else
+
+#include <sys/types.h>
+#include <pthread.h>
+#include <signal.h>
+#include <semaphore.h>
+#include <time.h>
+
+//--------------------------------------------------------------------------
+// Thread stack.
+
+char thread1_stack[PTHREAD_STACK_MIN*2];
+char thread2_stack[PTHREAD_STACK_MIN*2];
+
+//--------------------------------------------------------------------------
+// Local variables
+
+// Sync semaphore
+sem_t sem;
+
+// Thread IDs
+pthread_t thread1;
+pthread_t thread2;
+
+timer_t timer1;
+timer_t timer2;
+
+volatile int sigusr1_called = 0;
+volatile int sigusr2_called = 0;
+
+//--------------------------------------------------------------------------
+// Signal handler functions
+
+static void sigusr1( int signo, siginfo_t *info, void *context )
+{
+ CYG_TEST_INFO( "sigusr1() handler called" );
+ CYG_TEST_CHECK( signo == SIGUSR1, "Signal not SIGUSR1");
+ CYG_TEST_CHECK( signo == info->si_signo, "Bad signal number in siginfo" );
+ CYG_TEST_CHECK( info->si_code == SI_TIMER, "Siginfo code not SI_TIMER" );
+ CYG_TEST_CHECK( info->si_value.sival_int == 0xABCDEF01, "Siginfo value wrong");
+ CYG_TEST_CHECK( pthread_equal(pthread_self(), thread1), "Not called in thread1");
+
+ sigusr1_called++;
+}
+
+static void sigusr2( int signo, siginfo_t *info, void *context )
+{
+ CYG_TEST_INFO( "sigusr2() handler called" );
+ CYG_TEST_CHECK( signo == SIGUSR2, "Signal not SIGUSR2");
+ CYG_TEST_CHECK( signo == info->si_signo, "Bad signal number in siginfo" );
+ CYG_TEST_CHECK( info->si_code == SI_TIMER, "Siginfo code not SI_TIMER" );
+ CYG_TEST_CHECK( info->si_value.sival_int == 0xABCDEF02, "Siginfo value wrong");
+ CYG_TEST_CHECK( pthread_equal(pthread_self(), thread2), "Not called in thread2");
+
+ sigusr2_called++;
+}
+
+//--------------------------------------------------------------------------
+
+void *pthread_entry1( void *arg)
+{
+ sigset_t mask;
+
+
+ CYG_TEST_INFO( "Thread 1 running" );
+
+ // Make a full set
+ sigfillset( &mask );
+
+ // remove USR1 signal
+ sigdelset( &mask, SIGUSR1 );
+
+ // Set signal mask
+ pthread_sigmask( SIG_SETMASK, &mask, NULL );
+
+ // Get main thread going again
+ sem_post( &sem );
+
+ while( sigusr1_called < 1 )
+ {
+ CYG_TEST_INFO( "Thread1: calling pause()");
+ pause();
+ }
+
+ CYG_TEST_INFO( "Thread1: calling pthread_exit()");
+ pthread_exit( arg );
+}
+
+//--------------------------------------------------------------------------
+
+void *pthread_entry2( void *arg)
+{
+ sigset_t mask;
+
+ CYG_TEST_INFO( "Thread 2 running" );
+
+ // Make a full set
+ sigfillset( &mask );
+
+ // remove USR2 signal
+ sigdelset( &mask, SIGUSR2 );
+
+ // Set signal mask
+ pthread_sigmask( SIG_SETMASK, &mask, NULL );
+
+ // Get main thread going again
+ sem_post( &sem );
+
+ while( sigusr2_called < 6 )
+ {
+ CYG_TEST_INFO( "Thread2: calling pause()");
+ pause();
+ }
+
+ CYG_TEST_INFO( "Thread2: calling pthread_exit()");
+ pthread_exit( arg );
+}
+
+//--------------------------------------------------------------------------
+
+int main(int argc, char **argv)
+{
+ int ret;
+ sigset_t mask;
+ pthread_attr_t attr;
+ void *retval;
+
+ CYG_TEST_INIT();
+
+ // Make a full signal set
+ sigfillset( &mask );
+
+
+ // Install signal handlers
+ {
+ struct sigaction sa;
+
+ sa.sa_sigaction = sigusr1;
+ sa.sa_mask = mask;
+ sa.sa_flags = SA_SIGINFO;
+
+ ret = sigaction( SIGUSR1, &sa, NULL );
+
+ CYG_TEST_CHECK( ret == 0 , "sigaction returned error");
+ }
+ {
+ struct sigaction sa;
+
+ sa.sa_sigaction = sigusr2;
+ sa.sa_mask = mask;
+ sa.sa_flags = SA_SIGINFO;
+
+ ret = sigaction( SIGUSR2, &sa, NULL );
+
+ CYG_TEST_CHECK( ret == 0 , "sigaction returned error");
+ }
+
+
+ // Create the timers
+
+ {
+ struct sigevent sev;
+ struct itimerspec value;
+
+ sev.sigev_notify = SIGEV_SIGNAL;
+ sev.sigev_signo = SIGUSR1;
+ sev.sigev_value.sival_int = 0xABCDEF01;
+
+ value.it_value.tv_sec = 1;
+ value.it_value.tv_nsec = 0;
+ value.it_interval.tv_sec = 0;
+ value.it_interval.tv_nsec = 0;
+
+ ret = timer_create( CLOCK_REALTIME, &sev, &timer1 );
+
+ CYG_TEST_CHECK( ret == 0 , "timer_create returned error");
+
+ ret = timer_settime( timer1, 0, &value, NULL );
+
+ CYG_TEST_CHECK( ret == 0 , "timer_settime returned error");
+ }
+
+#if 1
+ {
+ struct sigevent sev;
+ struct itimerspec value;
+
+ sev.sigev_notify = SIGEV_SIGNAL;
+ sev.sigev_signo = SIGUSR2;
+ sev.sigev_value.sival_int = 0xABCDEF02;
+
+ value.it_value.tv_sec = 0;
+ value.it_value.tv_nsec = 500000000;
+ value.it_interval.tv_sec = 0;
+ value.it_interval.tv_nsec = 250000000;
+
+ ret = timer_create( CLOCK_REALTIME, &sev, &timer2 );
+
+ CYG_TEST_CHECK( ret == 0 , "timer_create returned error");
+
+ ret = timer_settime( timer2, 0, &value, NULL );
+
+ CYG_TEST_CHECK( ret == 0 , "timer_settime returned error");
+ }
+#endif
+
+ // Mask all signals
+ pthread_sigmask( SIG_SETMASK, &mask, NULL );
+
+ sem_init( &sem, 0, 0 );
+
+ // Create test threads
+
+ {
+ pthread_attr_init( &attr );
+
+ pthread_attr_setstackaddr( &attr, (void *)&thread1_stack[sizeof(thread1_stack)] );
+ pthread_attr_setstacksize( &attr, sizeof(thread1_stack) );
+
+ pthread_create( &thread1,
+ &attr,
+ pthread_entry1,
+ (void *)0x12345671);
+ }
+
+ {
+ pthread_attr_init( &attr );
+
+ pthread_attr_setstackaddr( &attr, (void *)&thread2_stack[sizeof(thread2_stack)] );
+ pthread_attr_setstacksize( &attr, sizeof(thread2_stack) );
+
+ pthread_create( &thread2,
+ &attr,
+ pthread_entry2,
+ (void *)0x12345672);
+ }
+
+ // Wait for other thread to get started
+ CYG_TEST_INFO( "Main: calling sem_wait()");
+ sem_wait( &sem );
+ CYG_TEST_INFO( "Main: calling sem_wait() again");
+ sem_wait( &sem );
+
+ // Now join with thread1
+ CYG_TEST_INFO( "Main: calling pthread_join(thread1)");
+ pthread_join( thread1, &retval );
+
+ CYG_TEST_CHECK( retval == (void *)0x12345671, "Thread 1 retval wrong");
+
+ // And thread 2
+ CYG_TEST_INFO( "Main: calling pthread_join(thread2)");
+ pthread_join( thread2, &retval );
+
+ // now delete the timers
+ CYG_TEST_INFO( "Main: calling timer_delete(timer1)");
+ ret = timer_delete( timer1 );
+
+ CYG_TEST_CHECK( ret == 0 , "timer_delete(timer1) returned error");
+
+ CYG_TEST_INFO( "Main: calling timer_delete(timer2)");
+ ret = timer_delete( timer2 );
+
+ CYG_TEST_CHECK( ret == 0 , "timer_delete(timer2) returned error");
+
+
+ CYG_TEST_CHECK( retval == (void *)0x12345672, "Thread 2 retval wrong");
+
+ CYG_TEST_CHECK( sigusr1_called == 1, "SIGUSR1 signal handler not called once" );
+ CYG_TEST_CHECK( sigusr2_called == 6, "SIGUSR2 signal handler not called six times" );
+
+ CYG_TEST_PASS_FINISH( "timer1" );
+}
+
+#endif
+
+//--------------------------------------------------------------------------
+// end of timer1.c
diff --git a/cesar/ecos/packages/compat/posix/current/tests/tm_basic.cxx b/cesar/ecos/packages/compat/posix/current/tests/tm_basic.cxx
new file mode 100644
index 0000000000..1f8d952140
--- /dev/null
+++ b/cesar/ecos/packages/compat/posix/current/tests/tm_basic.cxx
@@ -0,0 +1,1696 @@
+//==========================================================================
+//
+// tm_basic.cxx
+//
+// Basic timing test / scaffolding
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Jonathan Larmour
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas,nickg
+// Contributors: jlarmour
+// Date: 1998-10-19
+// Description: Very simple kernel timing test
+//####DESCRIPTIONEND####
+//==========================================================================
+
+
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h>
+#include <pkgconf/posix.h>
+#include <pkgconf/system.h>
+#ifdef CYGPKG_KERNEL
+#include <pkgconf/kernel.h>
+#endif
+
+#ifndef CYGPKG_POSIX_SIGNALS
+#define NA_MSG "No POSIX signals"
+#elif !defined(CYGPKG_POSIX_TIMERS)
+#define NA_MSG "No POSIX timers"
+#elif !defined(CYGPKG_POSIX_PTHREAD)
+#define NA_MSG "POSIX threads not enabled"
+#elif !defined(CYGFUN_KERNEL_API_C)
+#define NA_MSG "Kernel C API not enabled"
+#elif !defined(CYGSEM_KERNEL_SCHED_MLQUEUE)
+#define NA_MSG "Kernel mlqueue scheduler not enabled"
+#elif !defined(CYGVAR_KERNEL_COUNTERS_CLOCK)
+#define NA_MSG "Kernel clock not enabled"
+#elif CYGNUM_KERNEL_SCHED_PRIORITIES <= 12
+#define NA_MSG "Kernel scheduler properties <= 12"
+#endif
+
+//==========================================================================
+
+#ifdef NA_MSG
+extern "C" void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA(NA_MSG);
+}
+#else
+
+#include <pkgconf/kernel.h>
+#include <pkgconf/hal.h>
+
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/mutex.hxx>
+#include <cyg/kernel/sema.hxx>
+#include <cyg/kernel/sched.inl>
+#include <cyg/kernel/clock.hxx>
+#include <cyg/kernel/clock.inl>
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/test/stackmon.h>
+#include CYGHWR_MEMORY_LAYOUT_H
+
+
+// POSIX headers
+
+#include <sys/types.h>
+#include <pthread.h>
+#include <semaphore.h>
+#include <time.h>
+#include <signal.h>
+#include <errno.h>
+
+//==========================================================================
+// Define this to see the statistics with the first sample datum removed.
+// This can expose the effects of caches on the speed of operations.
+
+#undef STATS_WITHOUT_FIRST_SAMPLE
+
+//==========================================================================
+
+// Structure used to keep track of times
+typedef struct fun_times {
+ cyg_uint32 start;
+ cyg_uint32 end;
+} fun_times;
+
+//==========================================================================
+
+#define STACK_SIZE (PTHREAD_STACK_MIN*2)
+
+// Defaults
+#define NTEST_THREADS 16
+#define NMUTEXES 32
+#define NMBOXES 32
+#define NSEMAPHORES 32
+#define NTIMERS 32
+
+
+#define NSAMPLES 32
+#define NTHREAD_SWITCHES 128
+#define NSCHEDS 128
+
+#define NSAMPLES_SIM 2
+#define NTEST_THREADS_SIM 2
+#define NTHREAD_SWITCHES_SIM 4
+#define NMUTEXES_SIM 2
+#define NMBOXES_SIM 2
+#define NSEMAPHORES_SIM 2
+#define NSCHEDS_SIM 4
+#define NTIMERS_SIM 2
+
+//==========================================================================
+
+static int nsamples;
+static int ntest_threads;
+static int nthread_switches;
+static int nmutexes;
+static int nmboxes;
+static int nsemaphores;
+static int nscheds;
+static int ntimers;
+
+static char stacks[NTEST_THREADS][STACK_SIZE];
+static pthread_t threads[NTEST_THREADS];
+static int overhead;
+static sem_t synchro;
+static fun_times thread_ft[NTEST_THREADS];
+
+static fun_times test2_ft[NTHREAD_SWITCHES];
+
+static pthread_mutex_t test_mutexes[NMUTEXES];
+static fun_times mutex_ft[NMUTEXES];
+static pthread_t mutex_test_thread_handle;
+
+#if 0
+static cyg_mbox test_mboxes[NMBOXES];
+static cyg_handle_t test_mbox_handles[NMBOXES];
+static fun_times mbox_ft[NMBOXES];
+static cyg_thread mbox_test_thread;
+static cyg_handle_t mbox_test_thread_handle;
+#endif
+
+static sem_t test_semaphores[NSEMAPHORES];
+static fun_times semaphore_ft[NSEMAPHORES];
+static pthread_t semaphore_test_thread_handle;
+
+static fun_times sched_ft[NSCHEDS];
+
+static timer_t timers[NTIMERS];
+static fun_times timer_ft[NTIMERS];
+
+static long rtc_resolution[] = CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION;
+static long ns_per_system_clock;
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY)
+// Data kept by kernel real time clock measuring clock interrupt latency
+extern cyg_tick_count total_clock_latency, total_clock_interrupts;
+extern cyg_int32 min_clock_latency, max_clock_latency;
+extern bool measure_clock_latency;
+#endif
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY)
+extern cyg_tick_count total_clock_dsr_latency, total_clock_dsr_calls;
+extern cyg_int32 min_clock_dsr_latency, max_clock_dsr_latency;
+extern bool measure_clock_latency;
+#endif
+
+//==========================================================================
+
+void run_sched_tests(void);
+void run_thread_tests(void);
+void run_thread_switch_test(void);
+void run_mutex_tests(void);
+void run_mutex_circuit_test(void);
+void run_mbox_tests(void);
+void run_mbox_circuit_test(void);
+void run_semaphore_tests(void);
+void run_semaphore_circuit_test(void);
+void run_timer_tests(void);
+
+//==========================================================================
+
+#ifndef max
+#define max(n,m) (m > n ? n : m)
+#endif
+
+//==========================================================================
+// Wait until a clock tick [real time clock] has passed. This should keep it
+// from happening again during a measurement, thus minimizing any fluctuations
+void
+wait_for_tick(void)
+{
+ cyg_tick_count_t tv0, tv1;
+ tv0 = cyg_current_time();
+ while (true) {
+ tv1 = cyg_current_time();
+ if (tv1 != tv0) break;
+ }
+}
+
+//--------------------------------------------------------------------------
+// Display a number of ticks as microseconds
+// Note: for improved calculation significance, values are kept in ticks*1000
+void
+show_ticks_in_us(cyg_uint32 ticks)
+{
+ long long ns;
+ ns = (ns_per_system_clock * (long long)ticks) / CYGNUM_KERNEL_COUNTERS_RTC_PERIOD;
+ ns += 5; // for rounding to .01us
+ diag_printf("%5d.%02d", (int)(ns/1000), (int)((ns%1000)/10));
+}
+
+//--------------------------------------------------------------------------
+//
+// If the kernel is instrumented to measure clock interrupt latency, these
+// measurements can be drastically perturbed by printing via "diag_printf()"
+// since that code may run with interrupts disabled for long periods.
+//
+// In order to get accurate/reasonable latency figures _for the kernel
+// primitive functions beint tested_, the kernel's latency measurements
+// are suspended while the printing actually takes place.
+//
+// The measurements are reenabled after the printing, thus allowing for
+// fair measurements of the kernel primitives, which are not distorted
+// by the printing mechanisms.
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY) && defined(HAL_CLOCK_LATENCY)
+void
+disable_clock_latency_measurement(void)
+{
+ wait_for_tick();
+ measure_clock_latency = false;
+}
+
+void
+enable_clock_latency_measurement(void)
+{
+ wait_for_tick();
+ measure_clock_latency = true;
+}
+
+// Ensure that the measurements are reasonable (no startup anomalies)
+void
+reset_clock_latency_measurement(void)
+{
+ disable_clock_latency_measurement();
+ total_clock_latency = 0;
+ total_clock_interrupts = 0;
+ min_clock_latency = 0x7FFFFFFF;
+ max_clock_latency = 0;
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY)
+ total_clock_dsr_latency = 0;
+ total_clock_dsr_calls = 0;
+ min_clock_dsr_latency = 0x7FFFFFFF;
+ max_clock_dsr_latency = 0;
+#endif
+ enable_clock_latency_measurement();
+
+}
+#else
+#define disable_clock_latency_measurement()
+#define enable_clock_latency_measurement()
+#define reset_clock_latency_measurement()
+#endif
+
+//--------------------------------------------------------------------------
+
+void
+show_times_hdr(void)
+{
+ disable_clock_latency_measurement();
+ diag_printf("\n");
+ diag_printf(" Confidence\n");
+ diag_printf(" Ave Min Max Var Ave Min Function\n");
+ diag_printf(" ====== ====== ====== ====== ========== ========\n");
+ enable_clock_latency_measurement();
+}
+
+void
+show_times_detail(fun_times ft[], int nsamples, char *title, bool ignore_first)
+{
+ int i, delta, min, max, con_ave, con_min, ave_dev;
+ int start_sample, total_samples;
+ cyg_int32 total, ave;
+
+ if (ignore_first) {
+ start_sample = 1;
+ total_samples = nsamples-1;
+ } else {
+ start_sample = 0;
+ total_samples = nsamples;
+ }
+ total = 0;
+ min = 0x7FFFFFFF;
+ max = 0;
+ for (i = start_sample; i < nsamples; i++) {
+ if (ft[i].end < ft[i].start) {
+ // Clock wrapped around (timer tick)
+ delta = (ft[i].end+CYGNUM_KERNEL_COUNTERS_RTC_PERIOD) - ft[i].start;
+ } else {
+ delta = ft[i].end - ft[i].start;
+ }
+ delta -= overhead;
+ if (delta < 0) delta = 0;
+ delta *= 1000;
+ total += delta;
+ if (delta < min) min = delta;
+ if (delta > max) max = delta;
+ }
+ ave = total / total_samples;
+ total = 0;
+ ave_dev = 0;
+ for (i = start_sample; i < nsamples; i++) {
+ if (ft[i].end < ft[i].start) {
+ // Clock wrapped around (timer tick)
+ delta = (ft[i].end+CYGNUM_KERNEL_COUNTERS_RTC_PERIOD) - ft[i].start;
+ } else {
+ delta = ft[i].end - ft[i].start;
+ }
+ delta -= overhead;
+ if (delta < 0) delta = 0;
+ delta *= 1000;
+ delta = delta - ave;
+ if (delta < 0) delta = -delta;
+ ave_dev += delta;
+ }
+ ave_dev /= total_samples;
+ con_ave = 0;
+ con_min = 0;
+ for (i = start_sample; i < nsamples; i++) {
+ if (ft[i].end < ft[i].start) {
+ // Clock wrapped around (timer tick)
+ delta = (ft[i].end+CYGNUM_KERNEL_COUNTERS_RTC_PERIOD) - ft[i].start;
+ } else {
+ delta = ft[i].end - ft[i].start;
+ }
+ delta -= overhead;
+ if (delta < 0) delta = 0;
+ delta *= 1000;
+ if ((delta <= (ave+ave_dev)) && (delta >= (ave-ave_dev))) con_ave++;
+ if ((delta <= (min+ave_dev)) && (delta >= (min-ave_dev))) con_min++;
+ }
+ con_ave = (con_ave * 100) / total_samples;
+ con_min = (con_min * 100) / total_samples;
+ show_ticks_in_us(ave);
+ show_ticks_in_us(min);
+ show_ticks_in_us(max);
+ show_ticks_in_us(ave_dev);
+ disable_clock_latency_measurement();
+ diag_printf(" %3d%% %3d%%", con_ave, con_min);
+ diag_printf(" %s\n", title);
+ enable_clock_latency_measurement();
+}
+
+void
+show_times(fun_times ft[], int nsamples, char *title)
+{
+ show_times_detail(ft, nsamples, title, false);
+#ifdef STATS_WITHOUT_FIRST_SAMPLE
+ show_times_detail(ft, nsamples, "", true);
+#endif
+}
+
+//--------------------------------------------------------------------------
+
+void
+show_test_parameters(void)
+{
+ disable_clock_latency_measurement();
+ diag_printf("\nTesting parameters:\n");
+ diag_printf(" Clock samples: %5d\n", nsamples);
+ diag_printf(" Threads: %5d\n", ntest_threads);
+ diag_printf(" Thread switches: %5d\n", nthread_switches);
+ diag_printf(" Mutexes: %5d\n", nmutexes);
+ diag_printf(" Mailboxes: %5d\n", nmboxes);
+ diag_printf(" Semaphores: %5d\n", nsemaphores);
+ diag_printf(" Scheduler operations: %5d\n", nscheds);
+ diag_printf(" Timers: %5d\n", ntimers);
+ diag_printf("\n");
+ enable_clock_latency_measurement();
+}
+
+void
+end_of_test_group(void)
+{
+ disable_clock_latency_measurement();
+ diag_printf("\n");
+ enable_clock_latency_measurement();
+}
+
+//--------------------------------------------------------------------------
+// Compute a name for a thread
+
+char *
+thread_name(char *basename, int indx) {
+ return "<<NULL>>"; // Not currently used
+}
+
+//--------------------------------------------------------------------------
+// test0 - null test, just return
+
+void *
+test0(void *indx)
+{
+ return indx;
+}
+
+//--------------------------------------------------------------------------
+// test3 - loop, yeilding repeatedly and checking for cancellation
+
+void *
+test3(void *indx)
+{
+ for(;;)
+ {
+ sched_yield();
+ pthread_testcancel();
+ }
+
+ return indx;
+}
+
+//--------------------------------------------------------------------------
+// test1 - empty test, simply exit. Last thread signals parent.
+
+void *
+test1( void *indx)
+{
+ if ((cyg_uint32)indx == (cyg_uint32)(ntest_threads-1)) {
+ sem_post(&synchro); // Signal that last thread is dying
+ }
+ return indx;
+}
+
+//--------------------------------------------------------------------------
+// test2 - measure thread switch times
+
+void *
+test2(void *indx)
+{
+ int i;
+ for (i = 0; i < nthread_switches; i++) {
+ if ((int)indx == 0) {
+ HAL_CLOCK_READ(&test2_ft[i].start);
+ } else {
+ HAL_CLOCK_READ(&test2_ft[i].end);
+ }
+ sched_yield();
+ }
+ if ((int)indx == 1) {
+ sem_post(&synchro);
+ }
+
+ return indx;
+}
+
+//--------------------------------------------------------------------------
+// Full-circuit mutex unlock/lock test
+
+void *
+mutex_test(void * indx)
+{
+ int i;
+ pthread_mutex_lock(&test_mutexes[0]);
+ for (i = 0; i < nmutexes; i++) {
+ sem_wait(&synchro);
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ HAL_CLOCK_READ(&mutex_ft[i].start);
+ pthread_mutex_unlock(&test_mutexes[0]);
+ pthread_mutex_lock(&test_mutexes[0]);
+ sem_post(&synchro);
+ }
+ return indx;
+}
+
+//--------------------------------------------------------------------------
+// Full-circuit mbox put/get test
+
+#if 0
+void
+mbox_test(cyg_uint32 indx)
+{
+ void *item;
+ do {
+ item = cyg_mbox_get(test_mbox_handles[0]);
+ HAL_CLOCK_READ(&mbox_ft[(int)item].end);
+ cyg_semaphore_post(&synchro);
+ } while ((int)item != (nmboxes-1));
+ cyg_thread_exit(0);
+}
+#endif
+
+//--------------------------------------------------------------------------
+// Full-circuit semaphore post/wait test
+
+void *
+semaphore_test(void * indx)
+{
+ int i;
+ for (i = 0; i < nsemaphores; i++) {
+ sem_wait(&test_semaphores[0]);
+ HAL_CLOCK_READ(&semaphore_ft[i].end);
+ sem_post(&synchro);
+ }
+ return indx;
+}
+
+//--------------------------------------------------------------------------
+//
+// This set of tests is used to measure kernel primitives that deal with threads
+//
+
+void
+run_thread_tests(void)
+{
+
+
+ int i;
+ struct sched_param schedparam;
+ pthread_attr_t attr;
+ int policy;
+ void *retval;
+
+ // Set my priority higher than any I plan to create
+ schedparam.sched_priority = 30;
+ pthread_setschedparam( pthread_self(), SCHED_RR, &schedparam );
+
+ // Initiaize thread creation attributes
+
+ pthread_attr_init( &attr );
+ pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
+ pthread_attr_setschedpolicy( &attr, SCHED_RR );
+ schedparam.sched_priority = 10;
+ pthread_attr_setschedparam( &attr, &schedparam );
+
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+
+ pthread_attr_setstackaddr( &attr, &stacks[i][STACK_SIZE] );
+ pthread_attr_setstacksize( &attr, STACK_SIZE );
+ pthread_create( &threads[i],
+ &attr,
+ test0,
+ (void *)i
+ );
+
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Create thread");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ sched_yield();
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Yield thread [all lower priority]");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+
+ schedparam.sched_priority = 11;
+ pthread_attr_setschedparam( &attr, &schedparam );
+ pthread_setschedparam(threads[i], SCHED_RR, &schedparam);
+
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Set priority");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ pthread_getschedparam( threads[i], &policy, &schedparam );
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Get priority");
+
+ cyg_thread_delay(1); // Let the test threads run
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ pthread_join(threads[i], &retval);
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Join exited thread");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ sched_yield();
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Yield [no other] thread");
+
+
+ // Recreate the test set
+
+ schedparam.sched_priority = 10;
+ pthread_attr_setschedparam( &attr, &schedparam );
+
+ for (i = 0; i < ntest_threads; i++) {
+ pthread_attr_setstackaddr( &attr, &stacks[i][STACK_SIZE] );
+ pthread_attr_setstacksize( &attr, STACK_SIZE );
+ pthread_create( &threads[i],
+ &attr,
+ test3,
+ (void *)i
+ );
+ }
+
+ cyg_thread_delay(1); // Let the test threads run
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ pthread_cancel(threads[i]);
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Cancel [running] thread");
+
+ cyg_thread_delay(1); // Let the test threads do their cancellations
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ pthread_join(threads[i], &retval);
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Join [cancelled] thread");
+
+
+ // Set my priority lower than any I plan to create
+ schedparam.sched_priority = 5;
+ pthread_setschedparam( pthread_self(), SCHED_RR, &schedparam );
+
+ // Set up the end-of-threads synchronizer
+ sem_init(&synchro, 0, 0);
+
+ schedparam.sched_priority = 10;
+ pthread_attr_setschedparam( &attr, &schedparam );
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+
+ pthread_attr_setstackaddr( &attr, &stacks[i][STACK_SIZE] );
+ pthread_attr_setstacksize( &attr, STACK_SIZE );
+ pthread_create( &threads[i],
+ &attr,
+ test2,
+ (void *)i
+ );
+
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Create [high priority] thread");
+
+ sem_wait(&synchro); // Wait for all threads to finish
+
+ // Make sure they are all dead
+ for (i = 0; i < ntest_threads; i++) {
+ pthread_join(threads[i], &retval);
+ }
+
+ run_thread_switch_test();
+ end_of_test_group();
+
+}
+
+//--------------------------------------------------------------------------
+
+void
+run_thread_switch_test(void)
+{
+
+ int i;
+ struct sched_param schedparam;
+ pthread_attr_t attr;
+ void *retval;
+
+ // Set my priority higher than any I plan to create
+ schedparam.sched_priority = 30;
+ pthread_setschedparam( pthread_self(), SCHED_RR, &schedparam );
+
+ // Initiaize thread creation attributes
+
+ pthread_attr_init( &attr );
+ pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
+ pthread_attr_setschedpolicy( &attr, SCHED_RR );
+ schedparam.sched_priority = 10;
+ pthread_attr_setschedparam( &attr, &schedparam );
+
+ // Set up the end-of-threads synchronizer
+
+ sem_init(&synchro, 0, 0);
+
+ // Set up for thread context switch
+
+ for (i = 0; i < 2; i++) {
+ pthread_attr_setstackaddr( &attr, &stacks[i][STACK_SIZE] );
+ pthread_attr_setstacksize( &attr, STACK_SIZE );
+ pthread_create( &threads[i],
+ &attr,
+ test2,
+ (void *)i
+ );
+ }
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+
+ sem_wait(&synchro);
+
+ show_times(test2_ft, nthread_switches, "Thread switch");
+
+ // Clean up
+ for (i = 0; i < 2; i++) {
+ pthread_join(threads[i], &retval);
+ }
+
+}
+
+
+//--------------------------------------------------------------------------
+
+void
+run_mutex_tests(void)
+{
+
+ int i;
+ pthread_mutexattr_t attr;
+
+ pthread_mutexattr_init( &attr );
+
+ // Mutex primitives
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmutexes; i++) {
+ HAL_CLOCK_READ(&mutex_ft[i].start);
+ pthread_mutex_init(&test_mutexes[i], &attr);
+ HAL_CLOCK_READ(&mutex_ft[i].end);
+ }
+ show_times(mutex_ft, nmutexes, "Init mutex");
+
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmutexes; i++) {
+ HAL_CLOCK_READ(&mutex_ft[i].start);
+ pthread_mutex_lock(&test_mutexes[i]);
+ HAL_CLOCK_READ(&mutex_ft[i].end);
+ }
+ show_times(mutex_ft, nmutexes, "Lock [unlocked] mutex");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmutexes; i++) {
+ HAL_CLOCK_READ(&mutex_ft[i].start);
+ pthread_mutex_unlock(&test_mutexes[i]);
+ HAL_CLOCK_READ(&mutex_ft[i].end);
+ }
+ show_times(mutex_ft, nmutexes, "Unlock [locked] mutex");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmutexes; i++) {
+ HAL_CLOCK_READ(&mutex_ft[i].start);
+ pthread_mutex_trylock(&test_mutexes[i]);
+ HAL_CLOCK_READ(&mutex_ft[i].end);
+ }
+ show_times(mutex_ft, nmutexes, "Trylock [unlocked] mutex");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmutexes; i++) {
+ HAL_CLOCK_READ(&mutex_ft[i].start);
+ pthread_mutex_trylock(&test_mutexes[i]);
+ HAL_CLOCK_READ(&mutex_ft[i].end);
+ }
+ show_times(mutex_ft, nmutexes, "Trylock [locked] mutex");
+
+ // Must unlock mutices before destroying them.
+ for (i = 0; i < nmutexes; i++) {
+ pthread_mutex_unlock(&test_mutexes[i]);
+ }
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmutexes; i++) {
+ HAL_CLOCK_READ(&mutex_ft[i].start);
+ pthread_mutex_destroy(&test_mutexes[i]);
+ HAL_CLOCK_READ(&mutex_ft[i].end);
+ }
+ show_times(mutex_ft, nmutexes, "Destroy mutex");
+
+
+ run_mutex_circuit_test();
+ end_of_test_group();
+}
+
+//--------------------------------------------------------------------------
+
+void
+run_mutex_circuit_test(void)
+{
+ int i;
+ pthread_mutexattr_t mattr;
+ struct sched_param schedparam;
+ pthread_attr_t attr;
+ void *retval;
+
+ // Set my priority lower than any I plan to create
+ schedparam.sched_priority = 5;
+ pthread_setschedparam( pthread_self(), SCHED_RR, &schedparam );
+
+ // Initiaize thread creation attributes
+
+ pthread_attr_init( &attr );
+ pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
+ pthread_attr_setschedpolicy( &attr, SCHED_RR );
+ schedparam.sched_priority = 10;
+ pthread_attr_setschedparam( &attr, &schedparam );
+
+ // Set up for full mutex unlock/lock test
+ pthread_mutexattr_init( &mattr );
+ pthread_mutex_init(&test_mutexes[0], &mattr);
+ sem_init(&synchro, 0, 0);
+
+ pthread_attr_setstackaddr( &attr, &stacks[0][STACK_SIZE] );
+ pthread_attr_setstacksize( &attr, STACK_SIZE );
+ pthread_create( &mutex_test_thread_handle,
+ &attr,
+ mutex_test,
+ (void *)0
+ );
+
+ // Need to raise priority so that this thread will block on the "lock"
+ schedparam.sched_priority = 20;
+ pthread_setschedparam( pthread_self(), SCHED_RR, &schedparam );
+
+ for (i = 0; i < nmutexes; i++) {
+ sem_post(&synchro);
+ pthread_mutex_lock(&test_mutexes[0]);
+ HAL_CLOCK_READ(&mutex_ft[i].end);
+ pthread_mutex_unlock(&test_mutexes[0]);
+ sem_wait(&synchro);
+ }
+ pthread_join(mutex_test_thread_handle, &retval);
+ show_times(mutex_ft, nmutexes, "Unlock/Lock mutex");
+
+}
+
+
+//--------------------------------------------------------------------------
+// Message queue tests
+
+// Currently disabled, pending implementation of POSIX message queues
+
+#if 0
+void
+run_mbox_tests(void)
+{
+ int i, cnt;
+ void *item;
+ // Mailbox primitives
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cyg_mbox_create(&test_mbox_handles[i], &test_mboxes[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Create mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cnt = cyg_mbox_peek(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Peek [empty] mbox");
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cyg_mbox_put(test_mbox_handles[i], (void *)i);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Put [first] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cnt = cyg_mbox_peek(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Peek [1 msg] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cyg_mbox_put(test_mbox_handles[i], (void *)i);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Put [second] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cnt = cyg_mbox_peek(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Peek [2 msgs] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ item = cyg_mbox_get(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Get [first] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ item = cyg_mbox_get(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Get [second] mbox");
+#endif // ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cyg_mbox_tryput(test_mbox_handles[i], (void *)i);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Tryput [first] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ item = cyg_mbox_peek_item(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Peek item [non-empty] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ item = cyg_mbox_tryget(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Tryget [non-empty] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ item = cyg_mbox_peek_item(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Peek item [empty] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ item = cyg_mbox_tryget(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Tryget [empty] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cyg_mbox_waiting_to_get(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Waiting to get mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cyg_mbox_waiting_to_put(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Waiting to put mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cyg_mbox_delete(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Delete mbox");
+
+ run_mbox_circuit_test();
+ end_of_test_group();
+}
+
+//--------------------------------------------------------------------------
+
+void
+run_mbox_circuit_test(void)
+{
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ int i;
+ // Set my priority lower than any I plan to create
+ cyg_thread_set_priority(cyg_thread_self(), 3);
+ // Set up for full mbox put/get test
+ cyg_mbox_create(&test_mbox_handles[0], &test_mboxes[0]);
+ cyg_semaphore_init(&synchro, 0);
+ cyg_thread_create(2, // Priority - just a number
+ mbox_test, // entry
+ 0, // index
+ thread_name("thread", 0), // Name
+ &stacks[0][0], // Stack
+ STACK_SIZE, // Size
+ &mbox_test_thread_handle, // Handle
+ &mbox_test_thread // Thread data structure
+ );
+ cyg_thread_resume(mbox_test_thread_handle);
+ for (i = 0; i < nmboxes; i++) {
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cyg_mbox_put(test_mbox_handles[0], (void *)i);
+ cyg_semaphore_wait(&synchro);
+ }
+ cyg_thread_delete(mbox_test_thread_handle);
+ show_times(mbox_ft, nmboxes, "Put/Get mbox");
+#endif
+}
+
+#endif
+
+//--------------------------------------------------------------------------
+
+void
+run_semaphore_tests(void)
+{
+
+ int i;
+ int sem_val;
+
+ // Semaphore primitives
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nsemaphores; i++) {
+ HAL_CLOCK_READ(&semaphore_ft[i].start);
+ sem_init(&test_semaphores[i], 0, 0);
+ HAL_CLOCK_READ(&semaphore_ft[i].end);
+ }
+ show_times(semaphore_ft, nsemaphores, "Init semaphore");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nsemaphores; i++) {
+ HAL_CLOCK_READ(&semaphore_ft[i].start);
+ sem_post(&test_semaphores[i]);
+ HAL_CLOCK_READ(&semaphore_ft[i].end);
+ }
+ show_times(semaphore_ft, nsemaphores, "Post [0] semaphore");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nsemaphores; i++) {
+ HAL_CLOCK_READ(&semaphore_ft[i].start);
+ sem_wait(&test_semaphores[i]);
+ HAL_CLOCK_READ(&semaphore_ft[i].end);
+ }
+ show_times(semaphore_ft, nsemaphores, "Wait [1] semaphore");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nsemaphores; i++) {
+ HAL_CLOCK_READ(&semaphore_ft[i].start);
+ sem_trywait(&test_semaphores[i]);
+ HAL_CLOCK_READ(&semaphore_ft[i].end);
+ }
+ show_times(semaphore_ft, nsemaphores, "Trywait [0] semaphore");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nsemaphores; i++) {
+ sem_post(&test_semaphores[i]);
+ HAL_CLOCK_READ(&semaphore_ft[i].start);
+ sem_trywait(&test_semaphores[i]);
+ HAL_CLOCK_READ(&semaphore_ft[i].end);
+ }
+ show_times(semaphore_ft, nsemaphores, "Trywait [1] semaphore");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nsemaphores; i++) {
+ HAL_CLOCK_READ(&semaphore_ft[i].start);
+ sem_getvalue(&test_semaphores[i], &sem_val);
+ HAL_CLOCK_READ(&semaphore_ft[i].end);
+ }
+ show_times(semaphore_ft, nsemaphores, "Get value of semaphore");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nsemaphores; i++) {
+ HAL_CLOCK_READ(&semaphore_ft[i].start);
+ sem_destroy(&test_semaphores[i]);
+ HAL_CLOCK_READ(&semaphore_ft[i].end);
+ }
+ show_times(semaphore_ft, nsemaphores, "Destroy semaphore");
+
+ run_semaphore_circuit_test();
+ end_of_test_group();
+}
+
+//--------------------------------------------------------------------------
+
+void
+run_semaphore_circuit_test(void)
+{
+
+ int i;
+ struct sched_param schedparam;
+ pthread_attr_t attr;
+ void *retval;
+
+ // Set my priority lower than any I plan to create
+ schedparam.sched_priority = 5;
+ pthread_setschedparam( pthread_self(), SCHED_RR, &schedparam );
+
+ // Initiaize thread creation attributes
+
+ pthread_attr_init( &attr );
+ pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
+ pthread_attr_setschedpolicy( &attr, SCHED_RR );
+ schedparam.sched_priority = 10;
+ pthread_attr_setschedparam( &attr, &schedparam );
+
+ // Set up for full semaphore post/wait test
+ sem_init(&test_semaphores[0], 0, 0);
+ sem_init(&synchro, 0, 0);
+
+ pthread_attr_setstackaddr( &attr, &stacks[0][STACK_SIZE] );
+ pthread_attr_setstacksize( &attr, STACK_SIZE );
+ pthread_create( &semaphore_test_thread_handle,
+ &attr,
+ semaphore_test,
+ (void *)0
+ );
+
+
+ for (i = 0; i < nsemaphores; i++) {
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ HAL_CLOCK_READ(&semaphore_ft[i].start);
+ sem_post(&test_semaphores[0]);
+ sem_wait(&synchro);
+ }
+ pthread_join(semaphore_test_thread_handle, &retval);
+
+ show_times(semaphore_ft, nsemaphores, "Post/Wait semaphore");
+
+
+}
+
+//--------------------------------------------------------------------------
+
+// Timer callback function
+void
+sigrt0(int signo, siginfo_t *info, void *context)
+{
+ diag_printf("sigrt0 called\n");
+ // empty call back
+}
+
+// Callback used to test determinancy
+static volatile int timer_cnt;
+void
+sigrt1(int signo, siginfo_t *info, void *context)
+{
+ if (timer_cnt == nscheds) return;
+ sched_ft[timer_cnt].start = 0;
+ HAL_CLOCK_READ(&sched_ft[timer_cnt++].end);
+ if (timer_cnt == nscheds) {
+ sem_post(&synchro);
+ }
+}
+
+static sem_t timer_sem;
+
+static void
+sigrt2(int signo, siginfo_t *info, void *context)
+{
+ if (timer_cnt == nscheds) {
+ sem_post(&synchro);
+ sem_post(&timer_sem);
+ } else {
+ sched_ft[timer_cnt].start = 0;
+ sem_post(&timer_sem);
+ }
+}
+
+// Null thread, used to keep scheduler busy
+void *
+timer_test(void * id)
+{
+ while (true) {
+ cyg_thread_yield();
+ pthread_testcancel();
+ }
+
+ return id;
+}
+
+// Thread that suspends itself at the first opportunity
+void *
+timer_test2(void *id)
+{
+ while (timer_cnt != nscheds) {
+ HAL_CLOCK_READ(&sched_ft[timer_cnt++].end);
+ sem_wait(&timer_sem);
+ }
+ return id;
+}
+
+void
+run_timer_tests(void)
+{
+ int res;
+ int i;
+ struct sigaction sa;
+ struct sigevent sigev;
+ struct itimerspec tp;
+
+ // Install signal handlers
+ sigemptyset( &sa.sa_mask );
+ sa.sa_flags = SA_SIGINFO;
+
+ sa.sa_sigaction = sigrt0;
+ sigaction( SIGRTMIN, &sa, NULL );
+
+ sa.sa_sigaction = sigrt1;
+ sigaction( SIGRTMIN+1, &sa, NULL );
+
+ sa.sa_sigaction = sigrt2;
+ sigaction( SIGRTMIN+2, &sa, NULL );
+
+ // Set up common bits of sigevent
+
+ sigev.sigev_notify = SIGEV_SIGNAL;
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntimers; i++) {
+ HAL_CLOCK_READ(&timer_ft[i].start);
+ sigev.sigev_signo = SIGRTMIN;
+ sigev.sigev_value.sival_ptr = (void*)(&timers[i]);
+ res = timer_create( CLOCK_REALTIME, &sigev, &timers[i]);
+ HAL_CLOCK_READ(&timer_ft[i].end);
+ CYG_ASSERT( res == 0 , "timer_create() returned error");
+ }
+ show_times(timer_ft, ntimers, "Create timer");
+
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ tp.it_value.tv_sec = 0;
+ tp.it_value.tv_nsec = 0;
+ tp.it_interval.tv_sec = 0;
+ tp.it_interval.tv_nsec = 0;
+ for (i = 0; i < ntimers; i++) {
+ HAL_CLOCK_READ(&timer_ft[i].start);
+ res = timer_settime( timers[i], 0, &tp, NULL );
+ HAL_CLOCK_READ(&timer_ft[i].end);
+ CYG_ASSERT( res == 0 , "timer_settime() returned error");
+ }
+ show_times(timer_ft, ntimers, "Initialize timer to zero");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ tp.it_value.tv_sec = 1;
+ tp.it_value.tv_nsec = 250000000;
+ tp.it_interval.tv_sec = 0;
+ tp.it_interval.tv_nsec = 0;
+ for (i = 0; i < ntimers; i++) {
+ HAL_CLOCK_READ(&timer_ft[i].start);
+ res = timer_settime( timers[i], 0, &tp, NULL );
+ HAL_CLOCK_READ(&timer_ft[i].end);
+ CYG_ASSERT( res == 0 , "timer_settime() returned error");
+ }
+ show_times(timer_ft, ntimers, "Initialize timer to 1.25 sec");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ tp.it_value.tv_sec = 0;
+ tp.it_value.tv_nsec = 0;
+ tp.it_interval.tv_sec = 0;
+ tp.it_interval.tv_nsec = 0;
+ for (i = 0; i < ntimers; i++) {
+ HAL_CLOCK_READ(&timer_ft[i].start);
+ res = timer_settime( timers[i], 0, &tp, NULL );
+ HAL_CLOCK_READ(&timer_ft[i].end);
+ CYG_ASSERT( res == 0 , "timer_settime() returned error");
+ }
+ show_times(timer_ft, ntimers, "Disable timer");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntimers; i++) {
+ HAL_CLOCK_READ(&timer_ft[i].start);
+ res = timer_delete( timers[i] );
+ HAL_CLOCK_READ(&timer_ft[i].end);
+ CYG_ASSERT( res == 0 , "timer_settime() returned error");
+ }
+ show_times(timer_ft, ntimers, "Delete timer");
+
+
+
+ sigev.sigev_signo = SIGRTMIN+1;
+ sigev.sigev_value.sival_ptr = (void*)(&timers[i]);
+ res = timer_create( CLOCK_REALTIME, &sigev, &timers[0]);
+ CYG_ASSERT( res == 0 , "timer_create() returned error");
+ tp.it_value.tv_sec = 0;
+ tp.it_value.tv_nsec = 50000000;
+ tp.it_interval.tv_sec = 0;
+ tp.it_interval.tv_nsec = 50000000;;
+ timer_cnt = 0;
+ res = timer_settime( timers[0], 0, &tp, NULL );
+ CYG_ASSERT( res == 0 , "timer_settime() returned error");
+ sem_init(&synchro, 0, 0);
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ do
+ { res = sem_wait(&synchro);
+ } while( res == -1 && errno == EINTR );
+ CYG_ASSERT( res == 0 , "sem_wait() returned error");
+ tp.it_value.tv_sec = 0;
+ tp.it_value.tv_nsec = 0;
+ tp.it_interval.tv_sec = 0;
+ tp.it_interval.tv_nsec = 0;
+ res = timer_settime( timers[0], 0, &tp, NULL );
+ CYG_ASSERT( res == 0 , "timer_settime() returned error");
+ res = timer_delete( timers[0] );
+ CYG_ASSERT( res == 0 , "timer_delete() returned error");
+ show_times(sched_ft, nscheds, "Timer latency [0 threads]");
+
+
+
+
+ struct sched_param schedparam;
+ pthread_attr_t attr;
+ void *retval;
+
+ // Set my priority higher than any I plan to create
+ schedparam.sched_priority = 20;
+ pthread_setschedparam( pthread_self(), SCHED_RR, &schedparam );
+
+
+ // Initiaize thread creation attributes
+
+ pthread_attr_init( &attr );
+ pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
+ pthread_attr_setschedpolicy( &attr, SCHED_RR );
+ schedparam.sched_priority = 10;
+ pthread_attr_setschedparam( &attr, &schedparam );
+
+ for (i = 0; i < 2; i++) {
+ pthread_attr_setstackaddr( &attr, &stacks[i][STACK_SIZE] );
+ pthread_attr_setstacksize( &attr, STACK_SIZE );
+ res = pthread_create( &threads[i],
+ &attr,
+ timer_test,
+ (void *)i
+ );
+ CYG_ASSERT( res == 0 , "pthread_create() returned error");
+ }
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+
+ sigev.sigev_signo = SIGRTMIN+1;
+ sigev.sigev_value.sival_ptr = (void*)(&timers[i]);
+ res = timer_create( CLOCK_REALTIME, &sigev, &timers[0]);
+ CYG_ASSERT( res == 0 , "timer_create() returned error");
+ tp.it_value.tv_sec = 0;
+ tp.it_value.tv_nsec = 50000000;
+ tp.it_interval.tv_sec = 0;
+ tp.it_interval.tv_nsec = 50000000;;
+ timer_cnt = 0;
+ res = timer_settime( timers[0], 0, &tp, NULL );
+ CYG_ASSERT( res == 0 , "timer_settime() returned error");
+
+ sem_init(&synchro, 0, 0);
+ do
+ { res = sem_wait(&synchro);
+ } while( res == -1 && errno == EINTR );
+ CYG_ASSERT( res == 0 , "sem_wait() returned error");
+ res = timer_delete(timers[0]);
+ CYG_ASSERT( res == 0 , "timerdelete() returned error");
+ show_times(sched_ft, nscheds, "Timer latency [2 threads]");
+ for (i = 0; i < 2; i++) {
+ pthread_cancel(threads[i]);
+ pthread_join(threads[i], &retval);
+ }
+
+
+
+ for (i = 0; i < ntest_threads; i++) {
+ pthread_attr_setstackaddr( &attr, &stacks[i][STACK_SIZE] );
+ pthread_attr_setstacksize( &attr, STACK_SIZE );
+ res = pthread_create( &threads[i],
+ &attr,
+ timer_test,
+ (void *)i
+ );
+ CYG_ASSERT( res == 0 , "pthread_create() returned error");
+ }
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ sigev.sigev_signo = SIGRTMIN+1;
+ sigev.sigev_value.sival_ptr = (void*)(&timers[i]);
+ res = timer_create( CLOCK_REALTIME, &sigev, &timers[0]);
+ CYG_ASSERT( res == 0 , "timer_create() returned error");
+ tp.it_value.tv_sec = 0;
+ tp.it_value.tv_nsec = 50000000;
+ tp.it_interval.tv_sec = 0;
+ tp.it_interval.tv_nsec = 50000000;;
+ timer_cnt = 0;
+ res = timer_settime( timers[0], 0, &tp, NULL );
+ CYG_ASSERT( res == 0 , "timer_settime() returned error");
+
+ sem_init(&synchro, 0, 0);
+ do
+ { res = sem_wait(&synchro);
+ } while( res == -1 && errno == EINTR );
+ CYG_ASSERT( res == 0 , "sem_wait() returned error");
+ res = timer_delete(timers[0]);
+ CYG_ASSERT( res == 0 , "timerdelete() returned error");
+ show_times(sched_ft, nscheds, "Timer latency [many threads]");
+ for (i = 0; i < ntest_threads; i++) {
+ pthread_cancel(threads[i]);
+ pthread_join(threads[i], &retval);
+ }
+
+ sem_init(&synchro, 0, 0);
+ sem_init(&timer_sem, 0, 0);
+ pthread_attr_setstackaddr( &attr, &stacks[0][STACK_SIZE] );
+ pthread_attr_setstacksize( &attr, STACK_SIZE );
+ res = pthread_create( &threads[0],
+ &attr,
+ timer_test2,
+ (void *)0
+ );
+ CYG_ASSERT( res == 0 , "pthread_create() returned error");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ sigev.sigev_signo = SIGRTMIN+2;
+ sigev.sigev_value.sival_ptr = (void*)(threads[0]);
+ res = timer_create( CLOCK_REALTIME, &sigev, &timers[0]);
+ CYG_ASSERT( res == 0 , "timer_create() returned error");
+ tp.it_value.tv_sec = 0;
+ tp.it_value.tv_nsec = 50000000;
+ tp.it_interval.tv_sec = 0;
+ tp.it_interval.tv_nsec = 50000000;;
+ timer_cnt = 0;
+ res = timer_settime( timers[0], 0, &tp, NULL );
+ CYG_ASSERT( res == 0 , "timer_settime() returned error");
+
+ do
+ { res = sem_wait(&synchro);
+ } while( res == -1 && errno == EINTR );
+ CYG_ASSERT( res == 0 , "sem_wait() returned error");
+ res = timer_delete(timers[0]);
+ CYG_ASSERT( res == 0 , "timerdelete() returned error");
+ show_times(sched_ft, nscheds, "Timer -> thread post latency");
+ sem_post(&timer_sem);
+// pthread_cancel(threads[0]);
+ pthread_join(threads[0], &retval);
+
+
+ end_of_test_group();
+}
+
+
+//--------------------------------------------------------------------------
+
+void
+run_all_tests()
+{
+ int i;
+ cyg_uint32 tv[nsamples], tv0, tv1;
+// cyg_uint32 min_stack, max_stack, total_stack, actual_stack, j;
+ cyg_tick_count_t ticks, tick0, tick1;
+#ifdef CYG_SCHEDULER_LOCK_TIMINGS
+ cyg_uint32 lock_ave, lock_max;
+#endif
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY) && defined(HAL_CLOCK_LATENCY)
+ cyg_int32 clock_ave;
+#endif
+
+ disable_clock_latency_measurement();
+
+// cyg_test_dump_thread_stack_stats( "Startup, main stack", thread[0] );
+ cyg_test_dump_interrupt_stack_stats( "Startup" );
+ cyg_test_dump_idlethread_stack_stats( "Startup" );
+ cyg_test_clear_interrupt_stack();
+
+ diag_printf("\neCos Kernel Timings\n");
+ diag_printf("Notes: all times are in microseconds (.000001) unless otherwise stated\n");
+#ifdef STATS_WITHOUT_FIRST_SAMPLE
+ diag_printf(" second line of results have first sample removed\n");
+#endif
+
+ cyg_thread_delay(2); // Make sure the clock is actually running
+
+ ns_per_system_clock = 1000000/rtc_resolution[1];
+
+ for (i = 0; i < nsamples; i++) {
+ HAL_CLOCK_READ(&tv[i]);
+ }
+ tv0 = 0;
+ for (i = 1; i < nsamples; i++) {
+ tv0 += tv[i] - tv[i-1];
+ }
+ end_of_test_group();
+
+ overhead = tv0 / (nsamples-1);
+ diag_printf("Reading the hardware clock takes %d 'ticks' overhead\n", overhead);
+ diag_printf("... this value will be factored out of all other measurements\n");
+
+ // Try and measure how long the clock interrupt handling takes
+ for (i = 0; i < nsamples; i++) {
+ tick0 = cyg_current_time();
+ while (true) {
+ tick1 = cyg_current_time();
+ if (tick0 != tick1) break;
+ }
+ HAL_CLOCK_READ(&tv[i]);
+ }
+ tv1 = 0;
+ for (i = 0; i < nsamples; i++) {
+ tv1 += tv[i] * 1000;
+ }
+ tv1 = tv1 / nsamples;
+ tv1 -= overhead; // Adjust out the cost of getting the timer value
+ diag_printf("Clock interrupt took");
+ show_ticks_in_us(tv1);
+ diag_printf(" microseconds (%d raw clock ticks)\n", tv1/1000);
+ enable_clock_latency_measurement();
+
+ ticks = cyg_current_time();
+
+ show_test_parameters();
+ show_times_hdr();
+
+ reset_clock_latency_measurement();
+
+ run_thread_tests();
+ run_mutex_tests();
+// run_mbox_tests();
+ run_semaphore_tests();
+ run_timer_tests();
+
+#ifdef CYG_SCHEDULER_LOCK_TIMINGS
+ Cyg_Scheduler::get_lock_times(&lock_ave, &lock_max);
+ diag_printf("\nMax lock:");
+ show_ticks_in_us(lock_max);
+ diag_printf(", Ave lock:");
+ show_ticks_in_us(lock_ave);
+ diag_printf("\n");
+#endif
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY) && defined(HAL_CLOCK_LATENCY)
+ // Display latency figures in same format as all other numbers
+ disable_clock_latency_measurement();
+ clock_ave = (total_clock_latency*1000) / total_clock_interrupts;
+ show_ticks_in_us(clock_ave);
+ show_ticks_in_us(min_clock_latency*1000);
+ show_ticks_in_us(max_clock_latency*1000);
+ show_ticks_in_us(0);
+ diag_printf(" Clock/interrupt latency\n\n");
+ enable_clock_latency_measurement();
+#endif
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY)
+ disable_clock_latency_measurement();
+ clock_ave = (total_clock_dsr_latency*1000) / total_clock_dsr_calls;
+ show_ticks_in_us(clock_ave);
+ show_ticks_in_us(min_clock_dsr_latency*1000);
+ show_ticks_in_us(max_clock_dsr_latency*1000);
+ show_ticks_in_us(0);
+ diag_printf(" Clock DSR latency\n\n");
+ enable_clock_latency_measurement();
+#endif
+
+#if 0
+ disable_clock_latency_measurement();
+ min_stack = STACK_SIZE;
+ max_stack = 0;
+ total_stack = 0;
+ for (i = 0; i < (int)NTEST_THREADS; i++) {
+ for (j = 0; j < STACK_SIZE; j++) {
+ if (stacks[i][j]) break;
+ }
+ actual_stack = STACK_SIZE-j;
+ if (actual_stack < min_stack) min_stack = actual_stack;
+ if (actual_stack > max_stack) max_stack = actual_stack;
+ total_stack += actual_stack;
+ }
+ for (j = 0; j < STACKSIZE; j++) {
+ if (((char *)stack[0])[j]) break;
+ }
+ diag_printf("%5d %5d %5d (main stack: %5d) Thread stack used (%d total)\n",
+ total_stack/NTEST_THREADS, min_stack, max_stack,
+ STACKSIZE - j, STACK_SIZE);
+#endif
+
+// cyg_test_dump_thread_stack_stats( "All done, main stack", thread[0] );
+ cyg_test_dump_interrupt_stack_stats( "All done" );
+ cyg_test_dump_idlethread_stack_stats( "All done" );
+
+ enable_clock_latency_measurement();
+
+ ticks = cyg_current_time();
+ diag_printf("\nTiming complete - %d ms total\n\n", (int)((ticks*ns_per_system_clock)/1000));
+
+ CYG_TEST_PASS_FINISH("Basic timing OK");
+}
+
+int main( int argc, char **argv )
+{
+ CYG_TEST_INIT();
+
+ if (cyg_test_is_simulator) {
+ nsamples = NSAMPLES_SIM;
+ ntest_threads = NTEST_THREADS_SIM;
+ nthread_switches = NTHREAD_SWITCHES_SIM;
+ nmutexes = NMUTEXES_SIM;
+ nmboxes = NMBOXES_SIM;
+ nsemaphores = NSEMAPHORES_SIM;
+ nscheds = NSCHEDS_SIM;
+ ntimers = NTIMERS_SIM;
+ } else {
+ nsamples = NSAMPLES;
+ ntest_threads = NTEST_THREADS;
+ nthread_switches = NTHREAD_SWITCHES;
+ nmutexes = NMUTEXES;
+ nmboxes = NMBOXES;
+ nsemaphores = NSEMAPHORES;
+ nscheds = NSCHEDS;
+ ntimers = NTIMERS;
+ }
+
+ // Sanity
+#ifdef WORKHORSE_TEST
+ ntest_threads = max(512, ntest_threads);
+ nmutexes = max(1024, nmutexes);
+ nsemaphores = max(1024, nsemaphores);
+ nmboxes = max(1024, nmboxes);
+ ncounters = max(1024, ncounters);
+ ntimers = max(1024, ntimers);
+#else
+ ntest_threads = max(64, ntest_threads);
+ nmutexes = max(32, nmutexes);
+ nsemaphores = max(32, nsemaphores);
+ nmboxes = max(32, nmboxes);
+ ntimers = max(32, ntimers);
+#endif
+
+ run_all_tests();
+
+}
+
+#endif // CYGFUN_KERNEL_API_C, etc.
+
+// EOF tm_basic.cxx
diff --git a/cesar/ecos/packages/cygmon/current/ChangeLog b/cesar/ecos/packages/cygmon/current/ChangeLog
new file mode 100644
index 0000000000..f52afbad90
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/ChangeLog
@@ -0,0 +1,252 @@
+2000-12-04 Drew Moseley <dmoseley@redhat.com>
+
+ * misc/monitor_cmd.c (breakpoint_cmd): Fix typo in printf
+ formatting for error message.
+
+2000-11-20 Drew Moseley <dmoseley@redhat.com>
+
+ * cdl/cygmon.cdl: Make sure we don't specify vectors.o and target.ld twice.
+
+2000-11-03 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/cygmon.cdl: Improve cygmon.elf make dependencies
+
+2000-10-17 Drew Moseley <dmoseley@redhat.com>
+
+ * misc/utils.c: Fix a typo. Also make sure we are ignoring the
+ '+' characters from gdb.
+
+ * misc/monitor_cmd.c: Add a few cache flushes.
+
+ * misc/monitor.h: Use the debug port for xvprintf.
+
+2000-08-14 Drew Moseley <dmoseley@redhat.com>
+
+ * misc/ecos_bsp.c: Added some include files to fix some build
+ failures on partially unsupported systems. (ie non-cygmon, etc).
+
+2000-08-12 Drew Moseley <dmoseley@redhat.com>
+
+ * misc/bsp/common/debug-io.c (bsp_debug_write): Use
+ output_gdb_string when stub_is_active.
+
+2000-08-10 Drew Moseley <dmoseley@redhat.com>
+
+ * misc/utils.c: Removed some unused functions. Also handle
+ printing invalid registers.
+
+ * misc/monitor_cmd.c: Handle some unprintable characters better.
+ Also handle displaying of invalid memory locations better.
+ Add handling for register validity checking.
+
+ * misc/monitor.h: Add a conditional field "reg_valid" to struct
+ regstruct.
+
+ * misc/monitor.c: Added a call to a conditionally defined routine
+ INITIALIZE_MON_EACH_TIME(). This is called everytime the monitor
+ is invoked. For instance, this is used to determine which
+ registers have actually been read.
+
+ * misc/generic_mem.c: Allow Cygmon to use the Safe memory routines
+ in the HAL.
+
+ * misc/board.h: Added MN10300 basic support.
+ * misc/cpu-mon.c: Ditto.
+ * misc/cpu_info.h: Ditto.
+ * misc/bsp/cpu.h: Ditto.
+ * misc/bsp/mn10300/gdb-cpu.c: Ditto. New file.
+ * misc/bsp/mn10300/gdb-cpu.h: Ditto. New file.
+ * misc/bsp/mn10300/gdb.h: Ditto. New file.
+ * misc/bsp/mn10300/insn.h: Ditto. New file.
+ * misc/bsp/mn10300/singlestep.c: Ditto. New file.
+ * misc/mn10300/board.h: Ditto. New file.
+ * misc/mn10300/cpu.h: Ditto. New file.
+ * misc/mn10300/cpu_info.h: Ditto. New file.
+ * misc/mn10300/mn10300-mon.c: Ditto. New file.
+
+ * cdl/cygmon.cdl: Removed dependency on the kernel and Serial I/O.
+ * misc/ecos_bsp.c: Ditto.
+ * misc/ecos_dummy.c: Ditto.
+
+2000-07-21 Drew Moseley <dmoseley@redhat.com>
+
+ * misc/ecos_bsp.c: Rearrange the linkage between Cygmon and HAL so
+ that Cygmon needs HAL but not vice-versa. ie HAL no longer calls
+ any Cygmon functions.
+ * misc/monitor.c: Ditto.
+
+2000-07-14 Drew Moseley <dmoseley@redhat.com>
+
+ * misc/bsp/mips/gdb-cpu.c: New files. Mips based Cygmon now running on top of eCos HAL.
+ * misc/bsp/mips/gdb-cpu.h: Ditto.
+ * misc/bsp/mips/gdb.h: Ditto.
+ * misc/bsp/mips/insn.h: Ditto.
+ * misc/bsp/mips/singlestep.c: Ditto.
+ * misc/mips/board.h: Ditto.
+ * misc/mips/cpu.h: Ditto.
+ * misc/mips/cpu_info.h: Ditto.
+ * misc/mips/mips-mon.c: Ditto.
+
+ * misc/bsp/common/syscall.c: Added SYS_meminfo call to find out
+ how much RAM we have.
+ * misc/bsp/common/syscall.h: Ditto.
+
+ * misc/bsp/common/breakpoint.c: Added __ECOS__ support.
+
+ * misc/monitor_cmd.c: Cleanup. Added some more error handling.
+ * misc/utils.c: Ditto.
+
+ * misc/monitor.c: Added basic syscall handling to support libgloss.
+ Added support for using more features of the HAL (ie breakpoints
+ and exceptions).
+ * misc/monitor.h: Ditto.
+ * misc/tservice.h: Ditto.
+ * misc/bsp/bsp.h: Ditto.
+ * misc/arm/cpu_info.h: Ditto.
+
+ * misc/ledit.c: Cleanup.
+
+ * misc/ecos_dummy.c: Support for reset through the HAL.
+
+ * misc/ecos_bsp.c: Filled in uart_control function for setting baud rate
+ through the HAL. Also added VIRTUAL_VECTOR_SUPPORT and support of the
+ low-level HAL-based serial driver. Also added set_memsize() support.
+
+ * misc/bplist-dynamic.c: Added option for using breakpoints in the HAL.
+ Also, various cleanups of build warnings, etc.
+ * misc/breakpoints.c: Ditto.
+
+ * cdl/cygmon.cdl: Allow cygmon to be built for either Arm or Mips.
+
+ * misc/board.h: Move architecture-dependent things out.
+ * misc/cpu-mon.c: Ditto.
+ * misc/cpu_info.h: Ditto.
+ * misc/bsp/cpu.h: Ditto.
+ * misc/bsp/common/gdb-cpu.c: Ditto.
+ * misc/bsp/common/gdb-cpu.h: Ditto.
+ * misc/bsp/common/singlestep.c: Ditto.
+
+2000-01-28 Jesper Skov <jskov@redhat.com>
+
+ * misc/Notes_CygMon_PID: Added.
+
+2000-01-27 Jesper Skov <jskov@redhat.com>
+
+ * cdl/cygmon.cdl: Include hal.h config for CygMon options defined
+ by platform CDL.
+
+2000-01-26 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/cygmon.cdl: Remove CYGDAT_CYGMON_ENABLE - no longer required
+
+2000-01-25 Jesper Skov <jskov@cygnus.co.uk>
+
+ * cdl/cygmon.cdl: Moved console device config to target CDL.
+ Let target CDL handle binary conversion.
+
+1999-12-17 Bart Veer <bartv@cygnus.co.uk>
+
+ * cdl/cygmon.cdl:
+ Fix a requires property, getting the quoting right
+
+1999-12-14 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/cygmon.cdl: Add custom make rule to build CygMon.
+
+1999-12-06 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * misc/arm/arm-mon.c (machine_syscall):
+ * misc/ecos_bsp.c (_bsp_handle_exception):
+ * misc/PKGconf.mak: Adding 'syscall' support.
+
+ * misc/CygMon_PID.cfg:
+ * misc/bsp/common/syscall.h:
+ * misc/bsp/common/syscall.c: New file(s).
+
+1999-11-26 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * misc/CygMon_EDB7211.cfg: Rename to misc/CygMon/EDB7xxx.cfg
+ * misc/CygMon_EDB7xxx.cfg: New file
+
+1999-11-26 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * misc/ecos_bsp.c (_bsp_board_init): Use/define HAL symbols
+ for board/cpu information.
+ (_bsp_memory_list): Use MLT information here.
+
+ * misc/CygMon_EDB7211.cfg: Fix typo. Change startup to be
+ ROM which gives more useful RAM information.
+
+1999-11-19 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * misc/CygMon_EDB7211.cfg: Add platform parameter. Update
+ patch for latest changes.
+
+1999-11-03 Jesper Skov <jskov@cygnus.co.uk>
+
+ * cdl/cygmon.cdl: Added.
+
+1999-10-27 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * misc/PKGconf.mak: Add new targets (.bin .srec images).
+
+ * include/pkgconf/cygmon.h: Update strings to be more conformant.
+
+ * misc/CygMon_EDB7211.cfg: New file for building CygMon.
+
+ * include/pkgconf/cygmon.h: Add work-around because packages
+ can't be disabled by default.
+
+1999-10-26 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/cygmon.h: Fix typo 'CYGPKC_LIBC'=>'CYGPKG_LIBC'
+ Also, node type was wrong ('radio' instead of 'boolean')
+
+1999-10-25 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/cygmon.h: Add configuration options for
+ console device [name] and extended help. Remove duplicate
+ boilerplate.
+
+ * misc/board.h: Enable "help" via configuration option.
+
+ * misc/ecos_bsp.c: Cleanup/remove extra (debug) code.
+ Add support for console port configuration.
+
+ * misc/monitor.c:
+ * misc/monitor_cmd.c: Cleanup/remove some debug code.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/cygmon/current/cdl/cygmon.cdl b/cesar/ecos/packages/cygmon/current/cdl/cygmon.cdl
new file mode 100644
index 0000000000..04f4645a20
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/cdl/cygmon.cdl
@@ -0,0 +1,140 @@
+# ====================================================================
+#
+# cygmon.cdl
+#
+# CygMon package configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: gthomas
+# Contributors: dmoseley
+# Date: 1999-11-03
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+cdl_package CYGPKG_CYGMON {
+ display "CygMon ROM monitor"
+ requires CYGPKG_LIBC_STRING
+ include_dir cyg/cygmon
+ define_header cygmon.h
+ description "
+ This package supports the CygMon \[stand-alone debug monitor\]
+ using eCos as the underlying board support mechanism."
+
+
+ # Since the CYGDAT_CYGMON_CONSOLE_DEV setting ends up in the platform
+ # HAL header, we need to include that here (via hal.h).
+ define_proc {
+ puts $::cdl_header "#include <pkgconf/hal.h>"
+ }
+
+ cdl_option CYGDAT_CYGMON_USE_HELP {
+ display "Include detailed command help"
+ default_value 1
+ description "
+ When this option is selected, the CygMon image will include
+ detailed help information for all built-in commands. Without
+ it, only minimal help will be provided."
+ }
+
+ cdl_option CYGBLD_BUILD_CYGMON {
+ display "Build CygMon ROM ELF image"
+ default_value 0
+ requires { CYG_HAL_STARTUP == "ROM" }
+ requires CYGPKG_INFRA
+ requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+ requires ! CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
+ requires ! CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
+ requires ! CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
+ requires CYGPKG_LIBC_STRING
+ requires ! CYGFUN_LIBC_strtod
+ requires ! CYGPKG_LIBC_STDIO
+ requires ! CYGSEM_LIBC_SIGNALS_THREAD_SAFE
+ requires ! CYGIMP_LIBC_SIGNALS_RAISE_INLINE
+ requires ! CYGIMP_LIBC_SIGNALS_SIGNAL_INLINE
+ requires ! CYGSEM_LIBC_SIGNALS_RAISE_SETS_ERRNO
+ requires ! CYGSEM_LIBC_SIGNALS_SIGNAL_SETS_ERRNO
+ requires ! CYGFUN_LIBC_ATEXIT
+ requires ! CYGSEM_LIBC_EXIT_CALLS_FFLUSH
+ requires ! CYGPKG_LIBC_ENVIRONMENT
+ requires ! CYGSEM_LIBC_PER_THREAD_ERRNO
+ requires ! CYGSEM_LIBC_TIME_TIME_WORKING
+ requires ! CYGSEM_LIBC_TIME_SETTIME_WORKING
+ requires { CYGPKG_HAL_ARM || CYGPKG_HAL_MIPS || CYGPKG_HAL_MN10300 }
+
+ no_define
+ description "This option enables the building of the CygMon ELF image.
+ The image may require further relocation or symbol
+ stripping before being converted to a binary image.
+ This is handled by a rule in the target CDL."
+
+ make -priority 320 {
+ <PREFIX>/bin/cygmon.elf : $(PREFIX)/lib/target.ld $(PREFIX)/lib/vectors.o $(PREFIX)/lib/libtarget.a $(PREFIX)/lib/libextras.a <PACKAGE>/misc/ecos_bsp.c <PACKAGE>/misc/ecos_dummy.c <PACKAGE>/misc/cpu-mon.c <PACKAGE>/misc/monitor.c <PACKAGE>/misc/monitor_cmd.c <PACKAGE>/misc/ledit.c <PACKAGE>/misc/breakpoints.c <PACKAGE>/misc/bplist-dynamic.c <PACKAGE>/misc/utils.c <PACKAGE>/misc/generic_fmt32.c <PACKAGE>/misc/generic_mem.c <PACKAGE>/misc/bsp/common/bsp.c <PACKAGE>/misc/bsp/common/bsp_if.c <PACKAGE>/misc/bsp/common/shared-data.c <PACKAGE>/misc/bsp/common/sysinfo.c <PACKAGE>/misc/bsp/common/console-io.c <PACKAGE>/misc/bsp/common/debug-io.c <PACKAGE>/misc/bsp/common/sprintf.c <PACKAGE>/misc/bsp/common/syscall.c <PACKAGE>/misc/bsp/common/printf.c <PACKAGE>/misc/bsp/common/vprintf.c <PACKAGE>/misc/bsp/common/breakpoint.c <PACKAGE>/misc/bsp/common/singlestep.c <PACKAGE>/misc/bsp/common/generic-mem.c <PACKAGE>/misc/bsp/common/bsp_cache.c <PACKAGE>/misc/bsp/common/gdb-cpu.c <PACKAGE>/misc/bsp/common/hex-utils.c
+ @sh -c "mkdir -p misc/bsp/common $(dir $@)"
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/ecos_bsp.o $(REPOSITORY)/$(PACKAGE)/misc/ecos_bsp.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/ecos_dummy.o $(REPOSITORY)/$(PACKAGE)/misc/ecos_dummy.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/cpu-mon.o $(REPOSITORY)/$(PACKAGE)/misc/cpu-mon.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/monitor.o $(REPOSITORY)/$(PACKAGE)/misc/monitor.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/monitor_cmd.o $(REPOSITORY)/$(PACKAGE)/misc/monitor_cmd.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/ledit.o $(REPOSITORY)/$(PACKAGE)/misc/ledit.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/breakpoints.o $(REPOSITORY)/$(PACKAGE)/misc/breakpoints.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bplist-dynamic.o $(REPOSITORY)/$(PACKAGE)/misc/bplist-dynamic.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/utils.o $(REPOSITORY)/$(PACKAGE)/misc/utils.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/generic_fmt32.o $(REPOSITORY)/$(PACKAGE)/misc/generic_fmt32.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/generic_mem.o $(REPOSITORY)/$(PACKAGE)/misc/generic_mem.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bsp/common/bsp.o $(REPOSITORY)/$(PACKAGE)/misc/bsp/common/bsp.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bsp/common/bsp_if.o $(REPOSITORY)/$(PACKAGE)/misc/bsp/common/bsp_if.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bsp/common/shared-data.o $(REPOSITORY)/$(PACKAGE)/misc/bsp/common/shared-data.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bsp/common/sysinfo.o $(REPOSITORY)/$(PACKAGE)/misc/bsp/common/sysinfo.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bsp/common/console-io.o $(REPOSITORY)/$(PACKAGE)/misc/bsp/common/console-io.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bsp/common/debug-io.o $(REPOSITORY)/$(PACKAGE)/misc/bsp/common/debug-io.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bsp/common/sprintf.o $(REPOSITORY)/$(PACKAGE)/misc/bsp/common/sprintf.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bsp/common/syscall.o $(REPOSITORY)/$(PACKAGE)/misc/bsp/common/syscall.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bsp/common/printf.o $(REPOSITORY)/$(PACKAGE)/misc/bsp/common/printf.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bsp/common/vprintf.o $(REPOSITORY)/$(PACKAGE)/misc/bsp/common/vprintf.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bsp/common/breakpoint.o $(REPOSITORY)/$(PACKAGE)/misc/bsp/common/breakpoint.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bsp/common/singlestep.o $(REPOSITORY)/$(PACKAGE)/misc/bsp/common/singlestep.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bsp/common/generic-mem.o $(REPOSITORY)/$(PACKAGE)/misc/bsp/common/generic-mem.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bsp/common/bsp_cache.o $(REPOSITORY)/$(PACKAGE)/misc/bsp/common/bsp_cache.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bsp/common/gdb-cpu.o $(REPOSITORY)/$(PACKAGE)/misc/bsp/common/gdb-cpu.c
+ $(CC) -c -I$(REPOSITORY)/$(PACKAGE)/misc $(INCLUDE_PATH) $(CFLAGS) -DHAVE_BSP -D__ECOS__ -o misc/bsp/common/hex-utils.o $(REPOSITORY)/$(PACKAGE)/misc/bsp/common/hex-utils.c
+ $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ $(filter-out %.ld %vectors.o, $(patsubst $(REPOSITORY)/$(PACKAGE)/%.c,%.o,$^))
+ }
+ }
+}
diff --git a/cesar/ecos/packages/cygmon/current/misc/Notes_CygMon_PID b/cesar/ecos/packages/cygmon/current/misc/Notes_CygMon_PID
new file mode 100644
index 0000000000..b1fed7674b
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/Notes_CygMon_PID
@@ -0,0 +1,168 @@
+===========================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+===========================================================================
+
+28 Jan 2000
+
+How to build and install CygMon on the PID
+
+Make CygMon image
+~~~~~~~~~~~~~~~~~
+
+Configure and build using the 'cygmon' template for the PID
+target. These are the necessary CLI instructions. It can also be done
+from the Configtool by selecting the appropriate templates.
+
+ % cd /tmp
+ % mkdir cygmon
+ % cd cygmon
+ % ecosconfig new pid cygmon
+ % ecosconfig tree
+ % make
+
+This will install some files in ./install/bin:
+
+ cygmon.elf: The built CygMon image
+ cygmon.bin: The image converted to binary (suitable for burning to ROM)
+ cygmon.img: The relocated ELF image (suitable for FLASH writing, see below)
+ cygmon.srec: The image converted to srecords
+
+Make FLASH tool
+~~~~~~~~~~~~~~~
+
+Again, these are the necessary CLI instructions. It can also be done
+from the Configtool by selecting the appropriate templates, and
+enabling the option.
+
+ % cd /tmp
+ % mkdir pid-flash
+ % cd pid-flash
+ % ecosconfig new pid
+ % <edit ecos.ecc, enabling the CYGBLD_BUILD_FLASH_TOOL option:>
+ --- ecos.ecc.orig Fri Jan 28 11:21:43 2000
+ +++ ecos.ecc Fri Jan 28 11:22:01 2000
+ @@ -150,7 +150,7 @@
+ cdl_option CYGBLD_BUILD_FLASH_TOOL {
+ # Flavor: bool
+ # No user value, uncomment the following line to provide one.
+ - # user_value 0
+ + user_value 1
+ # value_source default
+ # Default value: 0
+ # Requires: CYG_HAL_STARTUP == "RAM"
+ % ecosconfig resolve
+ % ecosconfig tree
+ % make
+
+The flash tool is installed in ./install/bin
+
+Prepare board for CygMon
+~~~~~~~~~~~~~~~~~~~~~~~~
+ 1. Set jumper 7-8 on LK6 [using the Angle code in the 16 bit EPROM]
+ 2. Set jumper 5-6 on LK6 [select 8bit ROM mode]
+ 3. Set jumper LK18 [ROM remap - this is also required for eCos]
+ 4. Set S1 to 0-0-1-1 [20MHz operation]
+
+
+Program FLASH
+~~~~~~~~~~~~~
+ 1. Download the CygMon relocated image onto the PID board:
+ % cd /tmp
+ % arm-elf-gdb -nw cygmon/install/bin/cygmon.img
+
+ (gdb) target rdi s=<serial device>
+ Angel Debug Monitor V1.04 (Advanced RISC Machines SDT 2.11a) for PID
+ Built with Serial(x1), Parallel, DCC
+ Rebuilt on Apr 7 1998 at 22:20:43
+ Serial Rate: 9600
+ Connected to ARM RDI target.
+ (gdb) load
+ Loading section .rom_vectors, size 0x60 lma 0x60000
+ Loading section .text, size 0xeea8 lma 0x60060
+ Loading section .rodata, size 0x304c lma 0x6ef08
+ Loading section .data, size 0x7f8 lma 0x71f54
+ Start address 0x60060 , load size 75596
+ Transfer rate: 5548 bits/sec.
+ (gdb) quit
+
+ This will download the stubs onto the board at 0x60000..0x80000
+
+ Use /dev/ttyS0, COM1 or similar for the <serial device> name.
+
+ 2. Now download the FLASH programmer tool
+ % arm-elf-gdb -nw pid-flash/install/bin/prog_flash.img
+
+ (gdb) target rdi s=<serial device>
+ Angel Debug Monitor V1.04 (Advanced RISC Machines SDT 2.11a) for PID
+ Built with Serial(x1), Parallel, DCC
+ Rebuilt on Apr 7 1998 at 22:20:43
+ Serial Rate: 9600
+ Connected to ARM RDI target.
+ (gdb) load
+ Loading section .rom_vectors, size 0x60 lma 0x4000
+ Loading section .text, size 0x4964 lma 0x4060
+ Loading section .rodata, size 0x384 lma 0x89c4
+ Loading section .data, size 0x28c lma 0x8d48
+ Start address 0x4060 , load size 20436
+ Transfer rate: 5449 bits/sec.
+ (gdb) cont
+
+ 3. The FLASH tool will output some text on the board serial port B at
+ 38400 baud:
+
+ ARM eCos
+ FLASH here!
+ manuf: 8, device: 40
+ Error: Wrong Manufaturer: 08
+ ... Please change FLASH jumper
+
+ 4. This text is repeated until you remove the jumper 7-8 on LK6. Then
+ the output should be:
+
+ manuf: 1F, device: A4
+ AT29C040A recognised
+ About to program FLASH using data at 60000..80000
+ *** Press RESET now to abort!
+
+ 5. You have about 10 seconds to abort the operation by pressing
+ reset. After this timeout, the FLASH programming happens:
+
+ ...Programming FLASH
+ All done!
+
+ 6. Quit/kill the GDB process which will hang.
+
+ 7. Next time you reset the board, CygMon will be in control, communicating
+ on serial port A at 38400 baud. See documentation for further details
+ on how to connect with GDB.
diff --git a/cesar/ecos/packages/cygmon/current/misc/arm/arm-mon.c b/cesar/ecos/packages/cygmon/current/misc/arm/arm-mon.c
new file mode 100644
index 0000000000..30283f72b1
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/arm/arm-mon.c
@@ -0,0 +1,281 @@
+//==========================================================================
+//
+// arm-mon.c
+//
+// Support code to extend the generic monitor code to support
+// ARM(R) processors.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Support code to extend the generic monitor code to support
+// ARM(R) processors.
+// Description: Further board specific support is in other files.
+// This file contains:
+// register names lookup table
+//
+// Empty Stubs:
+// Interval timer - This should really belong to the application
+// operating system.
+//
+// Should not contain:
+// low level uart getchar and putchar functions
+// delay function to support uart
+//
+// ARM is a Registered Trademark of Advanced RISC Machines
+// Limited.
+// Other Brands and Trademarks are the property of their
+// respective owners.
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#include <setjmp.h>
+#include <bsp/bsp.h>
+#include <bsp/cpu.h>
+#ifdef DISASSEMBLER
+#include <dis-asm.h>
+#endif
+
+#include "cpu_info.h"
+#include "monitor.h"
+
+/* This module is required to provide many of the services defined
+ in tservice.h */
+
+static char *apcs_names[] = {
+ "a1", "a2", "a3", "a4",
+ "v1", "v2", "v3", "v4",
+ "v5", "v6", "sl", "fp",
+ "ip", "sp", "lr", "pc",
+#if HAVE_FLOAT_REGS
+ "f0", "f1", "f2", "f3",
+ "f4", "f5", "f6", "f7",
+ "fps",
+#endif
+ "ps"
+};
+
+static char *standard_names[] =
+{
+ "r0", "r1", "r2", "r3",
+ "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11",
+ "r12", "r13", "r14", "pc",
+#if HAVE_FLOAT_REGS
+ "f0", "f1", "f2", "f3",
+ "f4", "f5", "f6", "f7",
+ "fps",
+#endif
+ "ps",
+};
+
+
+void arm_othernames (void);
+
+struct regstruct regtab[] =
+{
+ { 0, REG_R0, REGTYPE_INT },
+ { 0, REG_R1, REGTYPE_INT },
+ { 0, REG_R2, REGTYPE_INT },
+ { 0, REG_R3, REGTYPE_INT },
+ { 0, REG_R4, REGTYPE_INT },
+ { 0, REG_R5, REGTYPE_INT },
+ { 0, REG_R6, REGTYPE_INT },
+ { 0, REG_R7, REGTYPE_INT },
+ { 0, REG_R8, REGTYPE_INT },
+ { 0, REG_R9, REGTYPE_INT },
+ { 0, REG_R10, REGTYPE_INT },
+ { 0, REG_R11, REGTYPE_INT },
+ { 0, REG_R12, REGTYPE_INT },
+ { 0, REG_SP, REGTYPE_INT },
+ { 0, REG_LR, REGTYPE_INT },
+ { 0, REG_PC, REGTYPE_INT },
+#if HAVE_FLOAT_REGS
+ { 0, REG_F0, REGTYPE_FLOAT },
+ { 0, REG_F1, REGTYPE_FLOAT },
+ { 0, REG_F2, REGTYPE_FLOAT },
+ { 0, REG_F3, REGTYPE_FLOAT },
+ { 0, REG_F4, REGTYPE_FLOAT },
+ { 0, REG_F5, REGTYPE_FLOAT },
+ { 0, REG_F6, REGTYPE_FLOAT },
+ { 0, REG_F6, REGTYPE_FLOAT },
+ { 0, REG_FPS, REGTYPE_FLOAT },
+#endif
+ { 0, REG_CPSR, REGTYPE_INT },
+ { 0, 0, 0 } /* Terminating element must be last */
+} ;
+
+void
+initialize_mon(void)
+{
+ /* FIXME: Convert ALL variable initializations to assignments
+ in order to support ROMABLE CODE.
+ This includes the register table
+ */
+
+ /*
+ * Call arm_othernames to sync up Cygmon and the disassembler
+ * and ensure they are using the same set of registernames
+ */
+ arm_othernames();
+
+ /*
+ * Call arm_othernames again to revert to the assembler
+ * default names
+ */
+ arm_othernames();
+
+} /* initialize_mon */
+
+
+/*
+ read_memory
+ write_memory
+ Defaults to generic_mem.c
+ */
+
+
+/* SET_BREAKPOINT -
+ CLEAR_BREAKPOINT
+ Defaults to generic_bp32.c
+ */
+
+
+#ifndef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+
+/* Return the currently-saved value corresponding to register "regnum". */
+target_regval_t
+get_register (int regnum)
+{
+ struct regstruct *p;
+ target_regval_t reg;
+ int offset, len;
+ char *dest = (char*)0;
+
+ for (p = regtab; p->registername && p->registernumber != regnum; ++p)
+ ;
+
+ if (p->registername) {
+ len = bsp_regsize(p->registernumber);
+ offset = bsp_regbyte(p->registernumber);
+ switch (p->registertype) {
+ case REGTYPE_INT:
+ dest = (char*)&(reg.i);
+ break;
+#if HAVE_FLOAT_REGS
+ case REGTYPE_FLOAT:
+ dest = (char*)&(reg.f);
+ break;
+#endif
+#if HAVE_DOUBLE_REGS
+ case REGTYPE_DOUBLE:
+ dest = (char*)&(reg.d);
+ break;
+#endif
+ }
+ if (dest)
+ memcpy(dest, (char *)mon_saved_regs + offset, len);
+ } else
+ reg.i = 0;
+
+ return reg;
+}
+
+
+
+/* Store VALUE in the register corresponding to REGNUM. */
+void
+put_register (int regnum, target_regval_t value)
+{
+ int offset, len;
+
+ len = bsp_regsize(regnum);
+ offset = bsp_regbyte(regnum);
+ memcpy((char *)mon_saved_regs + offset, &value, len);
+}
+
+#endif // !CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+
+/* Change to the alternate register set names */
+void
+arm_othernames (void)
+{
+ static int regset = 1;
+ char **name;
+ int i;
+
+#ifdef DISASSEMBLER
+ /* Change the disassembler */
+ regset = arm_toggle_regnames();
+#else
+ regset = (regset == 0) ? 1 : 0;
+#endif
+
+ /* Change cygmon */
+ if (regset == 1)
+ /* Disassembler is using apcs names. */
+ name = apcs_names;
+ else
+ /* Disassembler is using standard names. */
+ name = standard_names;
+
+ for (i = 0; i < (sizeof(apcs_names)/sizeof(apcs_names[0])); i++)
+ regtab[i].registername = name[i];
+}
+
+#ifdef __ECOS__
+
+#include <pkgconf/hal.h>
+#include <cyg/hal/hal_arch.h>
+#include "bsp/common/bsp_if.h"
+
+int
+machine_syscall(HAL_SavedRegisters *regs)
+{
+ int res, err;
+ err = _bsp_do_syscall(regs->d[0], // Function
+ regs->d[1], regs->d[2], regs->d[3], 0, // arguments,
+ &res);
+ regs->d[0] = res;
+ regs->pc += 4; // Advance PC
+ return err;
+}
+#endif
diff --git a/cesar/ecos/packages/cygmon/current/misc/arm/board.h b/cesar/ecos/packages/cygmon/current/misc/arm/board.h
new file mode 100644
index 0000000000..f84b8313e8
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/arm/board.h
@@ -0,0 +1,82 @@
+#ifndef __CYGMON_ARM_BOARD_H__
+#define __CYGMON_ARM_BOARD_H__
+//==========================================================================
+//
+// board.h
+//
+// Cygmon board/platform configuration file
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+// Hardware/platform/configuration specifics
+
+#include <pkgconf/hal.h>
+#include <pkgconf/cygmon.h>
+
+#define HAVE_FLOAT_REGS 0
+#define HAVE_DOUBLE_REGS 0
+#define HAVE_CACHE 0 // FIXME
+#define HAVE_USAGE 0 // FIXME
+#define USE_CYGMON_PROTOTYPES 1
+#define NOMAIN 1
+#define CYGMON_SYSTEM_SERVICES 0 // Not used, fall back to BSP support
+#ifdef CYGDAT_CYGMON_USE_HELP
+#define USE_HELP 1
+#endif
+
+// For breakpoint support
+#define NO_MALLOC 1
+#define MAX_BP_NUM 8
+#include "cpu_info.h"
+#define TRAP_SIZE 4
+#define __set_breakpoint set_breakpoint
+#define __remove_breakpoint clear_breakpoint
+#define __write_mem_safe memcpy
+#define WRITE_MEM_IS_MEMCPY
+#define _breakinst bsp_breakinsn
+
+#endif // __CYGMON_ARM_BOARD_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/arm/cpu.h b/cesar/ecos/packages/cygmon/current/misc/arm/cpu.h
new file mode 100644
index 0000000000..607f0d58a0
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/arm/cpu.h
@@ -0,0 +1,978 @@
+#ifndef __ARM_CPU_H__
+#define __ARM_CPU_H__
+//==========================================================================
+//
+// cpu.h
+//
+// ARM specific processor defines
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: ARM specific processor defines
+// Description: ARM is a Registered Trademark of Advanced RISC Machines
+// Limited.
+// Other Brands and Trademarks are the property of their
+// respective owners.
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#include <bsp/bsp.h>
+#include <bsp/defs.h>
+#ifdef __ECOS__
+#include <cyg/hal/hal_arch.h>
+#endif
+
+/*
+ * Only define __NEED_UNDERSCORE__ for arm-coff targets
+ */
+#if !defined(__ELF__)
+# define __NEED_UNDERSCORE__
+#endif
+
+/*
+ * Macros to glue together two tokens.
+ */
+# ifdef __STDC__
+# define XGLUE(a,b) a##b
+# else
+# define XGLUE(a,b) a/**/b
+# endif
+
+# define GLUE(a,b) XGLUE(a,b)
+
+/*
+ * Symbol Names with leading underscore if necessary
+ */
+# ifdef __NEED_UNDERSCORE__
+# define SYM_NAME(name) GLUE(_,name)
+# else
+# define SYM_NAME(name) name
+# endif /* __NEED_UNDERSCORE__ */
+
+/*
+ * Various macros to better handle assembler/object format differences
+ */
+#if defined(__ASSEMBLER__)
+
+/*
+ * Assembly function start definition
+ */
+#ifdef __NEED_UNDERSCORE__
+.macro FUNC_START name
+ .global _\name
+ .align 4
+ _\name:
+.endm
+#else
+.macro FUNC_START name
+ .global \name
+ .align 4
+ \name:
+.endm
+#endif
+
+/*
+ * Assembly function end definition
+ */
+#ifdef __NEED_UNDERSCORE__
+.macro FUNC_END name
+.endm
+#else
+.macro FUNC_END name
+.endm
+#endif
+
+/*
+ * Register Prefix
+ */
+# ifndef __REGISTER_PREFIX__
+# define __REGISTER_PREFIX__
+# endif /* __REGISTER_PREFIX__ */
+
+/*
+ * Immediate Prefix
+ */
+# ifndef __IMM_PREFIX__
+# define __IMM_PREFIX__ #
+# endif /* __IMM_PREFIX__ */
+
+/*
+ * use the right prefix for registers.
+ */
+# define REG(x) GLUE(__REGISTER_PREFIX__,x)
+
+/*
+ * use the right prefix for immediate values.
+ */
+# define IMM(x) GLUE(__IMM_PREFIX__,x)
+
+#endif /* defined(__ASSEMBLER__) */
+
+
+/*
+ * Setup register defines and such
+ */
+#if defined(__ASSEMBLER__)
+
+# define r0 REG (r0)
+# define r1 REG (r1)
+# define r2 REG (r2)
+# define r3 REG (r3)
+
+# define r4 REG (r4)
+# define r5 REG (r5)
+# define r6 REG (r6)
+# define r7 REG (r7)
+# define r8 REG (r8)
+# define r9 REG (r9)
+# define r10 REG (r10)
+# define r11 REG (r11)
+# define r12 REG (r12)
+# define r13 REG (r13)
+# define sp REG (sp)
+# define r14 REG (r14)
+# define lr REG (lr)
+# define pc REG (pc)
+
+# define f0 REG (f0)
+# define f1 REG (f1)
+# define f2 REG (f2)
+# define f3 REG (f3)
+# define f4 REG (f4)
+# define f5 REG (f5)
+# define f6 REG (f6)
+# define f7 REG (f7)
+# define fps REG (fps)
+
+# define cpsr REG (cpsr)
+# define spsr REG (spsr)
+
+/*
+ * Register offset definitions
+ * These numbers are offsets into the ex_regs_t struct.
+ */
+# define r0_o 0
+# define r1_o 4
+# define r2_o 8
+# define r3_o 12
+# define r4_o 16
+# define r5_o 20
+# define r6_o 24
+# define r7_o 28
+# define r8_o 32
+# define r9_o 36
+# define r10_o 40
+# define r11_o 44
+# define r12_o 48
+# define r13_o 52
+# define sp_o r13_o
+# define r14_o 56
+# define lr_o r14_o
+# define pc_o 60
+
+# define f0_o 64
+# define f1_o 76
+# define f2_o 88
+# define f3_o 100
+# define f4_o 112
+# define f5_o 124
+# define f6_o 136
+# define f7_o 148
+# define fps_o 160
+
+# define cpsr_o 164
+# define spsvc_o 168
+# define ARM_EX_REGS_T_SIZE 172
+
+#else /* !defined(__ASSEMBLER__) */
+
+ /*
+ * Register name that is used in help strings and such
+ */
+# define REGNAME_EXAMPLE "r0"
+
+ /*
+ * Register numbers. These are assumed to match the
+ * register numbers used by GDB.
+ */
+ enum __regnames {
+ REG_R0,
+ REG_R1,
+ REG_R2,
+ REG_R3,
+ REG_R4,
+ REG_R5,
+ REG_R6,
+ REG_R7,
+ REG_R8,
+ REG_R9,
+ REG_R10,
+ REG_R11,
+ REG_R12,
+ REG_R13,
+ REG_SP=REG_R13,
+ REG_R14,
+ REG_LR=REG_R14,
+ REG_PC,
+
+ REG_F0,
+ REG_F1,
+ REG_F2,
+ REG_F3,
+ REG_F4,
+ REG_F5,
+ REG_F6,
+ REG_F7,
+ REG_FPS,
+
+ REG_CPSR,
+ REG_SPSVC,
+ REG_MAX=REG_SPSVC
+ };
+
+ /*
+ * 12-byte struct for storing Floating point registers
+ */
+ typedef struct
+ {
+ unsigned long high;
+ unsigned long middle;
+ unsigned long low;
+ } fp_reg;
+
+ /*
+ * How registers are stored for exceptions.
+ */
+#ifdef __ECOS__
+#define ex_regs_t HAL_SavedRegisters
+#define _r0 d[0]
+#define _r1 d[1]
+#define _r2 d[2]
+#define _r3 d[3]
+#define _r4 d[4]
+#define _r5 d[5]
+#define _r6 d[6]
+#define _r7 d[7]
+#define _r8 d[8]
+#define _r9 d[9]
+#define _r10 d[10]
+#define _r11 fp
+#define _r12 ip
+#define _r13 sp
+#define _r14 lr
+#define _pc pc
+#define _cpsr cpsr
+#define _spsvc msr
+#else
+ typedef struct
+ {
+ unsigned long _r0;
+ unsigned long _r1;
+ unsigned long _r2;
+ unsigned long _r3;
+ unsigned long _r4;
+ unsigned long _r5;
+ unsigned long _r6;
+ unsigned long _r7;
+ unsigned long _r8;
+ unsigned long _r9;
+ unsigned long _r10;
+ unsigned long _r11;
+ unsigned long _r12;
+ unsigned long _r13;
+ unsigned long _r14;
+ unsigned long _pc;
+
+ fp_reg _f0;
+ fp_reg _f1;
+ fp_reg _f2;
+ fp_reg _f3;
+ fp_reg _f4;
+ fp_reg _f5;
+ fp_reg _f6;
+ fp_reg _f7;
+ unsigned long _fps;
+ unsigned long _cpsr;
+
+ unsigned long _spsvc; /* saved svc mode sp */
+
+ } ex_regs_t;
+#endif
+# define _sp _r13
+# define _lr _r14
+
+extern void __icache_flush(void *addr, int nbytes);
+extern void __dcache_flush(void *addr, int nbytes);
+
+#endif /* __ASSEMBLER__ */
+
+
+/*
+ * Program Status Register Definitions
+ */
+#if defined(__ASSEMBLER__)
+# define ARM_PSR_NEGATIVE 0x80000000 /* Negative Bit */
+# define ARM_PSR_ZERO 0x40000000 /* Zero Bit */
+# define ARM_PSR_CARRY 0x20000000 /* Carry Bit */
+# define ARM_PSR_OVERFLOW 0x10000000 /* Overflow Bit */
+# define ARM_PSR_IRQ 0x00000080 /* IRQ Bit */
+# define ARM_PSR_FIQ 0x00000040 /* FIQ Bit */
+# define ARM_PSR_THUMB_STATE 0x00000020 /* Thumb/ARM(R) Execution */
+# define ARM_PSR_MODE_MASK 0x0000001F /* ARM(R) Processor Mode Mask */
+#else /* ! defined(__ASSEMBLER__) */
+ struct psr_struct {
+ unsigned mode : 5;
+ unsigned t_bit : 1;
+ unsigned f_bit : 1;
+ unsigned i_bit : 1;
+ unsigned rsv1 : 20; /* == 0x00000 */
+ unsigned v_bit : 1;
+ unsigned c_bit : 1;
+ unsigned z_bit : 1;
+ unsigned n_bit : 1;
+ };
+
+ union arm_psr {
+ unsigned long word;
+ struct psr_struct psr;
+ };
+#endif /* __ASSEMBLER__ */
+
+/*
+ * PSR Mode values
+ */
+#define ARM_PSR_MODE_USER 0x00000010 /* User mode */
+#define ARM_PSR_MODE_FIQ 0x00000011 /* FIQ mode */
+#define ARM_PSR_MODE_IRQ 0x00000012 /* IRQ mode */
+#define ARM_PSR_MODE_SVC 0x00000013 /* SVC mode */
+#define ARM_PSR_MODE_ABORT 0x00000017 /* ABORT mode */
+#define ARM_PSR_MODE_UNDEF 0x0000001B /* UNDEF mode */
+#define ARM_PSR_MODE_SYSTEM 0x0000001F /* System Mode */
+#define ARM_PSR_NUM_MODES 7
+
+/*
+ * Core Exception vectors.
+ */
+#define BSP_CORE_EXC_RESET 0
+#define BSP_CORE_EXC_UNDEFINED_INSTRUCTION 1
+#define BSP_CORE_EXC_SOFTWARE_INTERRUPT 2
+#define BSP_CORE_EXC_PREFETCH_ABORT 3
+#define BSP_CORE_EXC_DATA_ABORT 4
+#define BSP_CORE_EXC_ADDRESS_ERROR_26_BIT 5
+#define BSP_CORE_EXC_IRQ 6
+#define BSP_CORE_EXC_FIQ 7
+#define BSP_MAX_EXCEPTIONS 8
+#define BSP_CORE_EXC(vec_num) (unsigned long*)(vec_num << 2)
+
+#define BREAKPOINT_INSN 0xE7FFDEFE /* Illegal inst opcode */
+#define SYSCALL_SWI 0x00180001
+
+#if defined(__ASSEMBLER__)
+ .macro BREAKPOINT
+ .word BREAKPOINT_INSN
+ .endm
+ .macro SYSCALL
+ swi IMM(SYSCALL_SWI)
+ .endm
+ .macro __CLI
+ stmfd sp!, {r0}
+ mrs r0, cpsr
+ bic r0, r0, IMM(ARM_PSR_IRQ | ARM_PSR_FIQ)
+ msr cpsr, r0
+ ldmfd sp!, {r0}
+ .endm
+ .macro __STI
+ stmfd sp!, {r0}
+ mrs r0, cpsr
+ orr r0, r0, IMM(ARM_PSR_IRQ | ARM_PSR_FIQ)
+ msr cpsr, r0
+ ldmfd sp!, {r0}
+ .endm
+
+# if 0
+ /*
+ * Use this code to verify a particular processing mode
+ */
+ mrs r0, cpsr
+ and r0, r0, IMM(ARM_PSR_MODE_MASK)
+ ldr r1, =ARM_PSR_MODE_IRQ
+ cmps r0, r1
+0: bne 0b
+ PORT_TOGGLE_DEBUG
+# endif /* 0 */
+
+#else /* !defined(__ASSEMBLER__) */
+
+# define BREAKPOINT() asm volatile(" .word 0xE7FFDEFE")
+# define SYSCALL() asm volatile(" swi %0" : /* No outputs */ : "i" (SYSCALL_SWI))
+# define __cli() asm volatile("
+ stmfd sp!, {r0}
+ mrs r0, cpsr
+ bic r0, r0, #0x000000C0
+ msr cpsr, r0
+ ldmfd sp!, {r0}")
+# define __sti() asm volatile("
+ stmfd sp!, {r0}
+ mrs r0, cpsr
+ orr r0, r0, #0x000000C0
+ msr cpsr, r0
+ ldmfd sp!, {r0}")
+# define __mcr(cp_num, opcode1, Rd, CRn, CRm, opcode2) \
+ asm volatile (" mcr " cp_num ", " \
+ opcode1 ", " \
+ "%0" ", " \
+ CRn ", " \
+ CRm ", " \
+ opcode2 : /* no outputs */ : "r" (Rd))
+# define __mrc(cp_num, opcode1, Rd, CRn, CRm, opcode2) \
+ asm volatile (" mrc " cp_num ", " \
+ opcode1 ", " \
+ "%0" ", " \
+ CRn ", " \
+ CRm ", " \
+ opcode2 : "=r" (Rd) : /* no inputs */)
+
+ static inline unsigned __get_cpsr(void)
+ {
+ unsigned long retval;
+ asm volatile (" mrs %0, cpsr" : "=r" (retval) : /* no inputs */ );
+ return retval;
+ }
+
+ static inline void __set_cpsr(unsigned val)
+ {
+ asm volatile (" msr cpsr, %0" : /* no outputs */ : "r" (val) );
+ }
+
+ static inline unsigned __get_spsr(void)
+ {
+ unsigned long retval;
+ asm volatile (" mrs %0, spsr" : "=r" (retval) : /* no inputs */ );
+ return retval;
+ }
+
+ static inline void __set_spsr(unsigned val)
+ {
+ asm volatile (" msr spsr, %0" : /* no outputs */ : "r" (val) );
+ }
+
+ static inline unsigned __get_sp(void)
+ {
+ unsigned long retval;
+ asm volatile (" mov %0, sp" : "=r" (retval) : /* no inputs */ );
+ return retval;
+ }
+
+ static inline void __set_sp(unsigned val)
+ {
+ asm volatile (" mov sp, %0" : /* no outputs */ : "r" (val) );
+ }
+
+ static inline unsigned __get_fp(void)
+ {
+ unsigned long retval;
+ asm volatile (" mov %0, fp" : "=r" (retval) : /* no inputs */ );
+ return retval;
+ }
+
+ static inline void __set_fp(unsigned val)
+ {
+ asm volatile (" mov fp, %0" : /* no outputs */ : "r" (val) );
+ }
+
+ static inline unsigned __get_pc(void)
+ {
+ unsigned long retval;
+ asm volatile (" mov %0, pc" : "=r" (retval) : /* no inputs */ );
+ return retval;
+ }
+
+ static inline void __set_pc(unsigned val)
+ {
+ asm volatile (" mov pc, %0" : /* no outputs */ : "r" (val) );
+ }
+
+ static inline unsigned __get_lr(void)
+ {
+ unsigned long retval;
+ asm volatile (" mov %0, lr" : "=r" (retval) : /* no inputs */ );
+ return retval;
+ }
+
+ static inline void __set_lr(unsigned val)
+ {
+ asm volatile (" mov lr, %0" : /* no outputs */ : "r" (val) );
+ }
+
+ static inline unsigned __get_r8(void)
+ {
+ unsigned long retval;
+ asm volatile (" mov %0, r8" : "=r" (retval) : /* no inputs */ );
+ return retval;
+ }
+
+ static inline void __set_r8(unsigned val)
+ {
+ asm volatile (" mov r8, %0" : /* no outputs */ : "r" (val) );
+ }
+
+ static inline unsigned __get_r9(void)
+ {
+ unsigned long retval;
+ asm volatile (" mov %0, r9" : "=r" (retval) : /* no inputs */ );
+ return retval;
+ }
+
+ static inline void __set_r9(unsigned val)
+ {
+ asm volatile (" mov r9, %0" : /* no outputs */ : "r" (val) );
+ }
+
+ static inline unsigned __get_r10(void)
+ {
+ unsigned long retval;
+ asm volatile (" mov %0, r10" : "=r" (retval) : /* no inputs */ );
+ return retval;
+ }
+
+ static inline void __set_r10(unsigned val)
+ {
+ asm volatile (" mov r10, %0" : /* no outputs */ : "r" (val) );
+ }
+
+ static inline unsigned __get_r11(void)
+ {
+ unsigned long retval;
+ asm volatile (" mov %0, r11" : "=r" (retval) : /* no inputs */ );
+ return retval;
+ }
+
+ static inline void __set_r11(unsigned val)
+ {
+ asm volatile (" mov r11, %0" : /* no outputs */ : "r" (val) );
+ }
+
+ static inline unsigned __get_r12(void)
+ {
+ unsigned long retval;
+ asm volatile (" mov %0, r12" : "=r" (retval) : /* no inputs */ );
+ return retval;
+ }
+
+ static inline void __set_r12(unsigned val)
+ {
+ asm volatile (" mov r12, %0" : /* no outputs */ : "r" (val) );
+ }
+
+#endif /* defined(__ASSEMBLER__) */
+
+#define GDB_BREAKPOINT_VECTOR BSP_CORE_EXC_UNDEFINED_INSTRUCTION
+#define GDB_SYSCALL_VECTOR BSP_CORE_EXC_SOFTWARE_INTERRUPT
+
+#define ARM_INST_SIZE sizeof(unsigned long)
+#define GDB_BREAKPOINT_INST_SIZE ARM_INST_SIZE
+
+#ifdef __CPU_LH77790A__
+# include <bsp/lh77790a.h>
+#endif /* __CPU_LH77790A__ */
+
+#if !defined(__ASSEMBLER__)
+/*
+ * Define the CPU specific data
+ */
+#ifdef __CPU_LH77790A__
+ typedef struct {
+ unsigned char lh77790a_port_control_shadow;
+ } arm_cpu_data;
+#endif /* __CPU_LH77790A__ */
+#endif /* !defined(__ASSEMBLER__) */
+
+#ifdef __CPU_SA110__
+#include <bsp/sa-110.h>
+#endif /* __CPU_SA110__ */
+
+#ifdef __CPU_SA1100__
+#include <bsp/sa-1100.h>
+#endif /* __CPU_SA110__ */
+
+#ifdef __CPU_710T__
+#include <bsp/arm710t.h>
+#endif /* __CPU_710T__ */
+
+#ifdef MMU
+/*
+ * ARM(R) MMU Definitions
+ */
+
+#ifndef __ASSEMBLER__
+extern void *page1;
+#endif /* __ASSEMBLER__ */
+
+/*
+ * ARM(R) Cache and MMU Control Registers
+ *
+ * Accessed through coprocessor instructions.
+ */
+#ifdef __ASSEMBLER__
+# define ARM_CACHE_COPROCESSOR_NUM p15
+# define ARM_COPROCESSOR_OPCODE_DONT_CARE 0x0
+# define ARM_COPROCESSOR_RM_DONT_CARE c0
+#else /* __ASSEMBLER__ */
+# define ARM_CACHE_COPROCESSOR_NUM "p15"
+# define ARM_COPROCESSOR_OPCODE_DONT_CARE "0x0"
+# define ARM_COPROCESSOR_RM_DONT_CARE "c0"
+#endif /* __ASSEMBLER__ */
+
+#ifdef __ASSEMBLER__
+# define ARM_ID_REGISTER c0
+# define ARM_CONTROL_REGISTER c1
+# define ARM_TRANSLATION_TABLE_BASE_REGISTER c2
+# define ARM_DOMAIN_ACCESS_CONTROL_REGISTER c3
+# define ARM_FAULT_STATUS_REGISTER c5
+# define ARM_FAULT_ADDRESS_REGISTER c6
+# define ARM_CACHE_OPERATIONS_REGISTER c7
+# define ARM_TLB_OPERATIONS_REGISTER c8
+# define ARM_READ_BUFFER_OPERATIONS_REGISTER c9
+#else /* __ASSEMBLER__ */
+# define ARM_ID_REGISTER "c0"
+# define ARM_CONTROL_REGISTER "c1"
+# define ARM_TRANSLATION_TABLE_BASE_REGISTER "c2"
+# define ARM_DOMAIN_ACCESS_CONTROL_REGISTER "c3"
+# define ARM_FAULT_STATUS_REGISTER "c5"
+# define ARM_FAULT_ADDRESS_REGISTER "c6"
+# define ARM_CACHE_OPERATIONS_REGISTER "c7"
+# define ARM_TLB_OPERATIONS_REGISTER "c8"
+# define ARM_READ_BUFFER_OPERATIONS_REGISTER "c9"
+#endif /* __ASSEMBLER__ */
+
+/*
+ * SA-1100 Cache and MMU ID Register value
+ */
+#define ARM_ID_MASK 0xFFFFFFF0
+#define ARM_ID_VALUE 0x4401a110
+
+/*
+ * SA-1100 Cache Control Register Bit Fields and Masks
+ */
+#define ARM_MMU_DISABLED 0x00000000
+#define ARM_MMU_ENABLED 0x00000001
+#define ARM_MMU_MASK 0x00000001
+#define ARM_ADDRESS_FAULT_DISABLED 0x00000000
+#define ARM_ADDRESS_FAULT_ENABLED 0x00000002
+#define ARM_ADDRESS_FAULT_MASK 0x00000002
+#define ARM_DATA_CACHE_DISABLED 0x00000000
+#define ARM_DATA_CACHE_ENABLED 0x00000004
+#define ARM_DATA_CACHE_MASK 0x00000004
+#define ARM_WRITE_BUFFER_DISABLED 0x00000000
+#define ARM_WRITE_BUFFER_ENABLED 0x00000008
+#define ARM_WRITE_BUFFER_MASK 0x00000008
+#define ARM_LITTLE_ENDIAN 0x00000000
+#define ARM_BIG_ENDIAN 0x00000080
+#define ARM_ACCESS_CHECKS_NONE 0x00000000
+#define ARM_ACCESS_CHECKS_SYSTEM 0x00000100
+#define ARM_ACCESS_CHECKS_ROM 0x00000200
+#define ARM_INSTRUCTION_CACHE_DISABLED 0x00000000
+#define ARM_INSTRUCTION_CACHE_ENABLED 0x00001000
+#define ARM_INSTRUCTION_CACHE_MASK 0x00001000
+#define ARM_VIRTUAL_IVR_BASE_00000000 0x00000000
+#define ARM_VIRTUAL_IVR_BASE_FFFF0000 0x00002000
+#define ARM_CONTROL_SBZ_MASK 0x00001FFF
+
+/*
+ * SA-1100 Translation Table Base Bit Masks
+ */
+#define ARM_TRANSLATION_TABLE_MASK 0xFFFFC000
+
+/*
+ * SA-1100 Domain Access Control Bit Masks
+ */
+#define ARM_DOMAIN_0_MASK 0x00000003
+#define ARM_DOMAIN_1_MASK 0x0000000C
+#define ARM_DOMAIN_2_MASK 0x00000030
+#define ARM_DOMAIN_3_MASK 0x000000C0
+#define ARM_DOMAIN_4_MASK 0x00000300
+#define ARM_DOMAIN_5_MASK 0x00000C00
+#define ARM_DOMAIN_6_MASK 0x00003000
+#define ARM_DOMAIN_7_MASK 0x0000C000
+#define ARM_DOMAIN_8_MASK 0x00030000
+#define ARM_DOMAIN_9_MASK 0x000C0000
+#define ARM_DOMAIN_10_MASK 0x00300000
+#define ARM_DOMAIN_11_MASK 0x00C00000
+#define ARM_DOMAIN_12_MASK 0x03000000
+#define ARM_DOMAIN_13_MASK 0x0C000000
+#define ARM_DOMAIN_14_MASK 0x30000000
+#define ARM_DOMAIN_15_MASK 0xC0000000
+
+#define ARM_ACCESS_TYPE_NO_ACCESS(domain_num) (0x0 << (domain_num))
+#define ARM_ACCESS_TYPE_CLIENT(domain_num) (0x1 << (domain_num))
+#define ARM_ACCESS_TYPE_MANAGER(domain_num) (0x3 << (domain_num))
+
+/*
+ * SA-1100 Fault Status Bit Masks
+ */
+#define ARM_FAULT_STATUS_MASK 0x0000000F
+#define ARM_DOMAIN_MASK 0x000000F0
+#define ARM_DATA_BREAKPOINT_MASK 0x00000200
+
+/*
+ * SA-1100 Cache Control Operations Definitions
+ */
+#ifdef __ASSEMBLER__
+# define ARM_FLUSH_CACHE_INST_DATA_OPCODE 0x0
+# define ARM_FLUSH_CACHE_INST_DATA_RM c7
+# define ARM_FLUSH_CACHE_INST_OPCODE 0x0
+# define ARM_FLUSH_CACHE_INST_RM c5
+# define ARM_FLUSH_CACHE_DATA_OPCODE 0x0
+# define ARM_FLUSH_CACHE_DATA_RM c6
+# define ARM_FLUSH_CACHE_DATA_SINGLE_OPCODE 0x1
+# define ARM_FLUSH_CACHE_DATA_SINGLE_RM c6
+# define ARM_CLEAN_CACHE_DATA_ENTRY_OPCODE 0x1
+# define ARM_CLEAN_CACHE_DATA_ENTRY_RM c10
+# define ARM_DRAIN_CACHE_WRITE_BUFFER_OPCODE 0x4
+# define ARM_DRAIN_CACHE_WRITE_BUFFER_RM c10
+#else /* __ASSEMBLER__ */
+# define ARM_FLUSH_CACHE_INST_DATA_OPCODE "0x0"
+# define ARM_FLUSH_CACHE_INST_DATA_RM "c7"
+# define ARM_FLUSH_CACHE_INST_OPCODE "0x0"
+# define ARM_FLUSH_CACHE_INST_RM "c5"
+# define ARM_FLUSH_CACHE_DATA_OPCODE "0x0"
+# define ARM_FLUSH_CACHE_DATA_RM "c6"
+# define ARM_FLUSH_CACHE_DATA_SINGLE_OPCODE "0x1"
+# define ARM_FLUSH_CACHE_DATA_SINGLE_RM "c6"
+# define ARM_CLEAN_CACHE_DATA_ENTRY_OPCODE "0x1"
+# define ARM_CLEAN_CACHE_DATA_ENTRY_RM "c10"
+# define ARM_DRAIN_CACHE_WRITE_BUFFER_OPCODE "0x4"
+# define ARM_DRAIN_CACHE_WRITE_BUFFER_RM "c10"
+#endif /* __ASSEMBLER__ */
+
+/*
+ * SA-1100 TLB Operations Definitions
+ */
+#ifdef __ASSEMBLER__
+# define ARM_FLUSH_INST_DATA_TLB_OPCODE 0x0
+# define ARM_FLUSH_INST_DATA_TLB_RM c7
+# define ARM_FLUSH_INST_TLB_OPCODE 0x0
+# define ARM_FLUSH_INST_TLB_RM c5
+# define ARM_FLUSH_DATA_TLB_OPCODE 0x0
+# define ARM_FLUSH_DATA_TLB_RM c6
+# define ARM_FLUSH_DATA_ENTRY_TLB_OPCODE 0x1
+# define ARM_FLUSH_DATA_ENTRY_TLB_RM c6
+#else /* __ASSEMBLER__ */
+# define ARM_FLUSH_INST_DATA_TLB_OPCODE "0x0"
+# define ARM_FLUSH_INST_DATA_TLB_RM "c7"
+# define ARM_FLUSH_INST_TLB_OPCODE "0x0"
+# define ARM_FLUSH_INST_TLB_RM "c5"
+# define ARM_FLUSH_DATA_TLB_OPCODE "0x0"
+# define ARM_FLUSH_DATA_TLB_RM "c6"
+# define ARM_FLUSH_DATA_ENTRY_TLB_OPCODE "0x1"
+# define ARM_FLUSH_DATA_ENTRY_TLB_RM "c6"
+#endif /* __ASSEMBLER__ */
+
+/*
+ * SA-1100 Read-Buffer Operations Definitions
+ */
+#ifdef __ASSEMBLER__
+# define ARM_FLUSH_ALL_BUFFERS_OPCODE 0x0
+# define ARM_FLUSH_ALL_BUFFERS_RM c0
+# define ARM_FLUSH_BUFFER_0_OPCODE 0x1
+# define ARM_FLUSH_BUFFER_0_RM c0
+# define ARM_FLUSH_BUFFER_1_OPCODE 0x1
+# define ARM_FLUSH_BUFFER_1_RM c1
+# define ARM_FLUSH_BUFFER_2_OPCODE 0x1
+# define ARM_FLUSH_BUFFER_2_RM c2
+# define ARM_FLUSH_BUFFER_3_OPCODE 0x1
+# define ARM_FLUSH_BUFFER_3_RM c3
+# define ARM_LOAD_BUFFER_0_1_WORD_OPCODE 0x2
+# define ARM_LOAD_BUFFER_0_1_WORD_RM c0
+# define ARM_LOAD_BUFFER_0_4_WORD_OPCODE 0x2
+# define ARM_LOAD_BUFFER_0_4_WORD_RM c4
+# define ARM_LOAD_BUFFER_0_8_WORD_OPCODE 0x2
+# define ARM_LOAD_BUFFER_0_8_WORD_RM c8
+# define ARM_LOAD_BUFFER_1_1_WORD_OPCODE 0x2
+# define ARM_LOAD_BUFFER_1_1_WORD_RM c1
+# define ARM_LOAD_BUFFER_1_4_WORD_OPCODE 0x2
+# define ARM_LOAD_BUFFER_1_4_WORD_RM c5
+# define ARM_LOAD_BUFFER_1_8_WORD_OPCODE 0x2
+# define ARM_LOAD_BUFFER_1_8_WORD_RM c9
+# define ARM_LOAD_BUFFER_2_1_WORD_OPCODE 0x2
+# define ARM_LOAD_BUFFER_2_1_WORD_RM c2
+# define ARM_LOAD_BUFFER_2_4_WORD_OPCODE 0x2
+# define ARM_LOAD_BUFFER_2_4_WORD_RM c6
+# define ARM_LOAD_BUFFER_2_8_WORD_OPCODE 0x2
+# define ARM_LOAD_BUFFER_2_8_WORD_RM cA
+# define ARM_LOAD_BUFFER_3_1_WORD_OPCODE 0x2
+# define ARM_LOAD_BUFFER_3_1_WORD_RM c3
+# define ARM_LOAD_BUFFER_3_4_WORD_OPCODE 0x2
+# define ARM_LOAD_BUFFER_3_4_WORD_RM c7
+# define ARM_LOAD_BUFFER_3_8_WORD_OPCODE 0x2
+# define ARM_LOAD_BUFFER_3_8_WORD_RM cB
+# define ARM_DISABLE_USER_MCR_ACCESS_OPCODE 0x4
+# define ARM_DISABLE_USER_MCR_ACCESS_RM c0
+# define ARM_ENABLE_USER_MCR_ACCESS_OPCODE 0x5
+# define ARM_ENABLE_USER_MCR_ACCESS_RM c0
+#else /* __ASSEMBLER__ */
+# define ARM_FLUSH_ALL_BUFFERS_OPCODE "0x0"
+# define ARM_FLUSH_ALL_BUFFERS_RM "c0"
+# define ARM_FLUSH_BUFFER_0_OPCODE "0x1"
+# define ARM_FLUSH_BUFFER_0_RM "c0"
+# define ARM_FLUSH_BUFFER_1_OPCODE "0x1"
+# define ARM_FLUSH_BUFFER_1_RM "c1"
+# define ARM_FLUSH_BUFFER_2_OPCODE "0x1"
+# define ARM_FLUSH_BUFFER_2_RM "c2"
+# define ARM_FLUSH_BUFFER_3_OPCODE "0x1"
+# define ARM_FLUSH_BUFFER_3_RM "c3"
+# define ARM_LOAD_BUFFER_0_1_WORD_OPCODE "0x2"
+# define ARM_LOAD_BUFFER_0_1_WORD_RM "c0"
+# define ARM_LOAD_BUFFER_0_4_WORD_OPCODE "0x2"
+# define ARM_LOAD_BUFFER_0_4_WORD_RM "c4"
+# define ARM_LOAD_BUFFER_0_8_WORD_OPCODE "0x2"
+# define ARM_LOAD_BUFFER_0_8_WORD_RM "c8"
+# define ARM_LOAD_BUFFER_1_1_WORD_OPCODE "0x2"
+# define ARM_LOAD_BUFFER_1_1_WORD_RM "c1"
+# define ARM_LOAD_BUFFER_1_4_WORD_OPCODE "0x2"
+# define ARM_LOAD_BUFFER_1_4_WORD_RM "c5"
+# define ARM_LOAD_BUFFER_1_8_WORD_OPCODE "0x2"
+# define ARM_LOAD_BUFFER_1_8_WORD_RM "c9"
+# define ARM_LOAD_BUFFER_2_1_WORD_OPCODE "0x2"
+# define ARM_LOAD_BUFFER_2_1_WORD_RM "c2"
+# define ARM_LOAD_BUFFER_2_4_WORD_OPCODE "0x2"
+# define ARM_LOAD_BUFFER_2_4_WORD_RM "c6"
+# define ARM_LOAD_BUFFER_2_8_WORD_OPCODE "0x2"
+# define ARM_LOAD_BUFFER_2_8_WORD_RM "cA"
+# define ARM_LOAD_BUFFER_3_1_WORD_OPCODE "0x2"
+# define ARM_LOAD_BUFFER_3_1_WORD_RM "c3"
+# define ARM_LOAD_BUFFER_3_4_WORD_OPCODE "0x2"
+# define ARM_LOAD_BUFFER_3_4_WORD_RM "c7"
+# define ARM_LOAD_BUFFER_3_8_WORD_OPCODE "0x2"
+# define ARM_LOAD_BUFFER_3_8_WORD_RM "cB"
+# define ARM_DISABLE_USER_MCR_ACCESS_OPCODE "0x4"
+# define ARM_DISABLE_USER_MCR_ACCESS_RM "c0"
+# define ARM_ENABLE_USER_MCR_ACCESS_OPCODE "0x5"
+# define ARM_ENABLE_USER_MCR_ACCESS_RM "c0"
+#endif /* __ASSEMBLER__ */
+
+/*
+ * ARM(R) First Level Descriptor Format Definitions
+ */
+#ifndef __ASSEMBLER__
+struct ARM_MMU_FIRST_LEVEL_FAULT {
+ int id : 2;
+ int sbz : 30;
+};
+#define ARM_MMU_FIRST_LEVEL_FAULT_ID 0x0
+
+struct ARM_MMU_FIRST_LEVEL_PAGE_TABLE {
+ int id : 2;
+ int imp : 2;
+ int domain : 4;
+ int sbz : 1;
+ int base_address : 23;
+};
+#define ARM_MMU_FIRST_LEVEL_PAGE_TABLE_ID 0x1
+
+struct ARM_MMU_FIRST_LEVEL_SECTION {
+ int id : 2;
+ int b : 1;
+ int c : 1;
+ int imp : 1;
+ int domain : 4;
+ int sbz0 : 1;
+ int ap : 2;
+ int sbz1 : 8;
+ int base_address : 12;
+};
+#define ARM_MMU_FIRST_LEVEL_SECTION_ID 0x2
+
+struct ARM_MMU_FIRST_LEVEL_RESERVED {
+ int id : 2;
+ int sbz : 30;
+};
+#define ARM_MMU_FIRST_LEVEL_RESERVED_ID 0x3
+
+#define ARM_MMU_FIRST_LEVEL_DESCRIPTOR_ADDRESS(ttb_base, table_index) \
+ (unsigned long *)((unsigned long)(ttb_base) + ((table_index) << 2))
+#define ARM_MMU_SECTION(ttb_base, actual_base, virtual_base, cacheable, bufferable, perm) \
+ { \
+ register union ARM_MMU_FIRST_LEVEL_DESCRIPTOR desc; \
+ \
+ desc.word = 0; \
+ desc.section.id = ARM_MMU_FIRST_LEVEL_SECTION_ID; \
+ desc.section.domain = 0; \
+ desc.section.c = (cacheable); \
+ desc.section.b = (bufferable); \
+ desc.section.ap = (perm); \
+ desc.section.base_address = (actual_base); \
+ *ARM_MMU_FIRST_LEVEL_DESCRIPTOR_ADDRESS(ttb_base, (virtual_base)) = desc.word; \
+ }
+
+union ARM_MMU_FIRST_LEVEL_DESCRIPTOR {
+ unsigned long word;
+ struct ARM_MMU_FIRST_LEVEL_FAULT fault;
+ struct ARM_MMU_FIRST_LEVEL_PAGE_TABLE page_table;
+ struct ARM_MMU_FIRST_LEVEL_SECTION section;
+ struct ARM_MMU_FIRST_LEVEL_RESERVED reserved;
+};
+
+#endif /* __ASSEMBLER__ */
+
+#define ARM_UNCACHEABLE 0
+#define ARM_CACHEABLE 1
+#define ARM_UNBUFFERABLE 0
+#define ARM_BUFFERABLE 1
+
+#define ARM_ACCESS_PERM_NONE_NONE 0
+#define ARM_ACCESS_PERM_RO_NONE 0
+#define ARM_ACCESS_PERM_RO_RO 0
+#define ARM_ACCESS_PERM_RW_NONE 1
+#define ARM_ACCESS_PERM_RW_RO 2
+#define ARM_ACCESS_PERM_RW_RW 3
+
+#define ARM_SECTION_SIZE SZ_1M
+#define ARM_SMALL_PAGE_SIZE SZ_4K
+#define ARM_LARGE_PAGE_SIZE SZ_64K
+
+#define ARM_FIRST_LEVEL_PAGE_TABLE_SIZE SZ_16K
+#define ARM_SECOND_LEVEL_PAGE_TABLE_SIZE SZ_1K
+
+#endif /* MMU */
+
+#endif // __ARM_CPU_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/arm/cpu_info.h b/cesar/ecos/packages/cygmon/current/misc/arm/cpu_info.h
new file mode 100644
index 0000000000..e7fff0049c
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/arm/cpu_info.h
@@ -0,0 +1,100 @@
+#ifndef __ARM_CPU_INFO_H__
+#define __ARM_CPU_INFO_H__
+//==========================================================================
+//
+// cpu_info.h
+//
+// Architecture information for ARM processors
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose:
+// Description: ARM is a Registered Trademark of Advanced RISC Machines
+// Limited.
+// Other Brands and Trademarks are the property of their
+// respective owners.
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#define IS_ARM 1
+
+#ifndef __CYGMON_TYPES
+#define __CYGMON_TYPES
+typedef unsigned int uint32;
+typedef int int32;
+#endif // __CYGMON_TYPES
+
+
+/* Temporary as long a multiple protypes are copied in multiple files */
+/* This variation does NOT clone the prototypes */
+#define NO_MALLOC 1
+#define MAX_NUM_BP 32
+#define MAX_HIST_ENTS 10
+
+/* big enuf to store a trap in the BP structure */
+
+#define BP_INST_T_DEFINED 1
+typedef unsigned long bp_inst_t ;
+
+#define MEM_ADDR_DEFINED 1
+typedef struct mem_addr {
+ unsigned long addr;
+} mem_addr_t ;
+
+#ifndef TARGET_REGISTER_T_DEFINED
+#define TARGET_REGISTER_T_DEFINED
+typedef unsigned long target_register_t;
+#endif
+
+#if defined(__ARMEB__)
+#define PRINT_INSN print_insn_big_arm
+#else
+#define PRINT_INSN print_insn_little_arm
+#endif
+
+#define OTHERNAMES_CMD arm_othernames
+extern void arm_othernames (void);
+
+#undef BFD_MACH
+#define BFD_MACH 0
+
+#endif // __ARM_CPU_INFO_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/board.h b/cesar/ecos/packages/cygmon/current/misc/board.h
new file mode 100644
index 0000000000..f843f085c8
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/board.h
@@ -0,0 +1,72 @@
+#ifndef __CYGMON_BOARD_H__
+#define __CYGMON_BOARD_H__
+//==========================================================================
+//
+// board.h
+//
+// Cygmon board/platform configuration file
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas, dmoseley
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+// Hardware/platform/configuration specifics
+
+#include <pkgconf/hal.h>
+#include <pkgconf/cygmon.h>
+
+#ifdef CYGPKG_HAL_ARM
+#include "arm/board.h"
+#endif
+
+#ifdef CYGPKG_HAL_MIPS
+#include "mips/board.h"
+#endif
+
+#ifdef CYGPKG_HAL_MN10300
+#include "mn10300/board.h"
+#endif
+
+#endif // __CYGMON_BOARD_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bplist-dynamic.c b/cesar/ecos/packages/cygmon/current/misc/bplist-dynamic.c
new file mode 100644
index 0000000000..1c9a864650
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bplist-dynamic.c
@@ -0,0 +1,234 @@
+//==========================================================================
+//
+// bplist-dynamic.c
+//
+// Breakpoint list using dynamic memory.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Breakpoint list using dynamic memory.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#include "board.h"
+
+#ifndef USE_ECOS_HAL_BREAKPOINTS
+
+#include <stdlib.h>
+
+#ifndef NO_MALLOC
+#ifndef NO_MALLOC_H
+#include "malloc.h"
+#else
+void free ();
+char *malloc ();
+#endif
+#endif
+
+#ifdef __ECOS__
+#include <cyg/hal/plf_stub.h>
+#endif /* __ECOS__ */
+
+/*
+ * A simple target breakpoint list using malloc.
+ * To use this package, you must define TRAP_SIZE to be the size
+ * in bytes of a trap instruction (max if there's more than one),
+ * and export a char array called _breakinst that contains a
+ * breakpoint trap. This package will copy trap instructions
+ * from _breakinst into the breakpoint locations.
+ */
+
+static struct breakpoint_list {
+ target_register_t addr;
+ char old_contents [TRAP_SIZE];
+ struct breakpoint_list *next;
+ char in_memory;
+} *breakpoint_list = NULL;
+
+#ifdef NO_MALLOC
+static struct breakpoint_list bp_list [MAX_BP_NUM];
+static struct breakpoint_list *free_bp_list = NULL;
+static int curr_bp_num = 0;
+#endif
+
+#ifndef BREAKINST_DEFINED
+#define BREAKINST_DEFINED
+extern unsigned char _breakinst[];
+#endif
+
+int
+__set_breakpoint (target_register_t addr)
+{
+ struct breakpoint_list **addent = &breakpoint_list;
+ struct breakpoint_list *l = breakpoint_list;
+ struct breakpoint_list *newent;
+
+ while (l != NULL && l->addr < addr)
+ {
+ addent = &l->next;
+ l = l->next;
+ }
+
+ if (l != NULL && l->addr == addr)
+ return 2;
+
+#ifdef NO_MALLOC
+ if (free_bp_list != NULL)
+ {
+ newent = free_bp_list;
+ free_bp_list = free_bp_list->next;
+ }
+ else
+ {
+ if (curr_bp_num < MAX_BP_NUM)
+ {
+ newent = &bp_list[curr_bp_num++];
+ }
+ else
+ {
+ return 1;
+ }
+ }
+#else
+ newent = (struct breakpoint_list *) malloc (sizeof (struct breakpoint_list));
+#endif
+ newent->addr = addr;
+ newent->in_memory = 0;
+ newent->next = l;
+ *addent = newent;
+ return 0;
+}
+
+int
+__remove_breakpoint (target_register_t addr)
+{
+ struct breakpoint_list *l = breakpoint_list;
+ struct breakpoint_list *prev = NULL;
+
+ while (l != NULL && l->addr < addr)
+ {
+ prev = l;
+ l = l->next;
+ }
+
+ if (l == NULL)
+ return 1;
+
+ if (l->in_memory)
+ {
+ __write_mem_safe (&l->old_contents[0],
+ (void*)l->addr,
+ sizeof (l->old_contents));
+ }
+
+ if (prev == NULL)
+ breakpoint_list = l->next;
+ else
+ prev->next = l->next;
+
+#ifdef NO_MALLOC
+ l->next = free_bp_list;
+ free_bp_list = l;
+#else
+ free (l);
+#endif
+ return 0;
+}
+
+#include <cyg/hal/generic-stub.h>
+#include <cyg/hal/hal_stub.h>
+void
+__cygmon_install_breakpoints (void)
+{
+ struct breakpoint_list *l = breakpoint_list;
+
+ while (l != NULL)
+ {
+ if (! l->in_memory)
+ {
+ int len = sizeof (l->old_contents);
+
+ if (__read_mem_safe (&l->old_contents[0], (void*)l->addr, len) == len)
+ {
+#ifdef WRITE_MEM_IS_MEMCPY
+ if (__write_mem_safe (_breakinst, (void*)l->addr, len) == (void*)l->addr)
+#else
+ if (__write_mem_safe (_breakinst, (void*)l->addr, len) == len)
+#endif
+ {
+ l->in_memory = 1;
+ }
+ }
+ }
+ l = l->next;
+ }
+ flush_i_cache ();
+}
+
+void
+__cygmon_clear_breakpoints (void)
+{
+ struct breakpoint_list *l = breakpoint_list;
+
+ while (l != NULL)
+ {
+ if (l->in_memory)
+ {
+ int len = sizeof (l->old_contents);
+
+#ifdef WRITE_MEM_IS_MEMCPY
+ if (__write_mem_safe (_breakinst, (void*)l->addr, len) == (void*)l->addr)
+#else
+ if (__write_mem_safe (&l->old_contents[0], (void*)l->addr, len) == len)
+#endif
+ {
+ l->in_memory = 0;
+ }
+ }
+ l = l->next;
+ }
+ flush_i_cache ();
+}
+
+#endif // USE_ECOS_HAL_BREAKPOINTS
diff --git a/cesar/ecos/packages/cygmon/current/misc/breakpoints.c b/cesar/ecos/packages/cygmon/current/misc/breakpoints.c
new file mode 100644
index 0000000000..0a489d3735
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/breakpoints.c
@@ -0,0 +1,220 @@
+//==========================================================================
+//
+// breakpoints.c
+//
+// Support aribtrary set of breakpoints.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#include "board.h"
+
+#ifndef USE_ECOS_HAL_BREAKPOINTS
+
+#include <stdlib.h>
+#ifdef HAVE_BSP
+#include <bsp/bsp.h>
+#include <bsp/cpu.h>
+#endif
+
+#include "monitor.h"
+#include "tservice.h"
+#include "stub-tservice.h"
+
+#include "fmt_util.h"
+
+
+static struct bp *last_bp_ptr;
+static struct bp *first_bp_ptr;
+
+#ifdef NO_MALLOC
+static struct bp *free_bp_list;
+static struct bp bp_list[MAX_NUM_BP];
+static int curr_bp_num;
+#endif
+
+int
+add_mon_breakpoint (mem_addr_t location)
+{
+ struct bp *ptr;
+ struct bp *new_bp_ptr;
+
+ for (ptr = first_bp_ptr; ptr != NULL; ptr = ptr->next)
+ {
+ if (MEM_ADDR_EQ_P (ptr->address, location))
+ return 1;
+ }
+#ifdef NO_MALLOC
+ if (free_bp_list != NULL)
+ {
+ new_bp_ptr = free_bp_list;
+ free_bp_list = new_bp_ptr->next;
+ }
+ else
+ {
+ if (curr_bp_num < MAX_NUM_BP)
+ {
+ new_bp_ptr = &bp_list[curr_bp_num++];
+ }
+ else
+ {
+ xprintf ("No more breakpoints\n");
+ return 1;
+ }
+ }
+#else
+ new_bp_ptr = (struct bp *)malloc (sizeof (struct bp));
+#endif
+
+ if (first_bp_ptr == NULL)
+ {
+ first_bp_ptr = new_bp_ptr;
+ }
+ else
+ {
+ last_bp_ptr->next = new_bp_ptr;
+ }
+ last_bp_ptr = new_bp_ptr;
+
+ last_bp_ptr->next = NULL;
+ last_bp_ptr->address = location;
+ last_bp_ptr->in_memory = 0;
+ return 0;
+}
+
+
+void
+install_breakpoints (void)
+{
+ struct bp *ptr = first_bp_ptr;
+ while (ptr != NULL)
+ {
+ set_breakpoint (ptr);
+ ptr = ptr->next;
+ }
+}
+
+
+void
+clear_breakpoints (void)
+{
+ struct bp *ptr = first_bp_ptr;
+
+ while (ptr != NULL)
+ {
+ clear_breakpoint (ptr);
+ ptr = ptr->next;
+ }
+}
+
+int
+show_breakpoints (void)
+{
+ struct bp *ptr;
+
+ for (ptr = first_bp_ptr; ptr != NULL; ptr = ptr->next)
+ {
+ char buf[20];
+
+ addr2str (&ptr->address, buf);
+ xprintf ("%s\n", buf);
+ }
+
+ return 0;
+}
+
+
+
+int
+clear_mon_breakpoint (mem_addr_t location)
+{
+ int error = 0;
+ struct bp *ptr = first_bp_ptr;
+ struct bp *prev_ptr = NULL;
+
+ /* Scan the list looking for the address to clear */
+ while (ptr != NULL && !MEM_ADDR_EQ_P (ptr->address, location))
+ {
+ /* keep a pointer one behind the current position */
+ prev_ptr = ptr;
+ ptr = ptr->next;
+ }
+ if (ptr == NULL)
+ {
+ xprintf ("That address has no breakpoint on it.\n");
+ error = 1;
+ }
+ else
+ {
+ /* Just in case it's still in memory. */
+ clear_breakpoint (ptr);
+
+ /* now we'll point the previous bp->next at the one after the one
+ we're deleting, unless there is no previous bp. */
+ if (prev_ptr != NULL)
+ {
+ prev_ptr->next = ptr->next;
+ }
+
+ if (first_bp_ptr == ptr)
+ first_bp_ptr = ptr->next;
+
+ if (last_bp_ptr == ptr)
+ last_bp_ptr = prev_ptr;
+
+ /* eliminate the offending bp struct */
+#ifdef NO_MALLOC
+ ptr->next = free_bp_list;
+ free_bp_list = ptr;
+#else
+ free (ptr);
+#endif
+ }
+ return error;
+}
+
+#endif /* USE_ECOS_HAL_BREAKPOINTS */
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/arm/gdb-cpu.c b/cesar/ecos/packages/cygmon/current/misc/bsp/arm/gdb-cpu.c
new file mode 100644
index 0000000000..0030982898
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/arm/gdb-cpu.c
@@ -0,0 +1,208 @@
+//==========================================================================
+//
+// gdb-cpu.c
+//
+// CPU specific support for GDB stub.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: CPU specific support for GDB stub.
+// Description: ARM is a Registered Trademark of Advanced RISC Machines
+// Limited.
+// Other Brands and Trademarks are the property of their
+// respective owners.
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#include <bsp/cpu.h>
+#include <bsp/bsp.h>
+#include "insn.h"
+#include "gdb.h"
+
+/*
+ * Return byte offset within the saved register area of the
+ * given register.
+ */
+int
+bsp_regbyte(int regno)
+{
+ switch(regno)
+ {
+ case REG_R0: return (int)&(((ex_regs_t*)0)->_r0); break;
+ case REG_R1: return (int)&(((ex_regs_t*)0)->_r1); break;
+ case REG_R2: return (int)&(((ex_regs_t*)0)->_r2); break;
+ case REG_R3: return (int)&(((ex_regs_t*)0)->_r3); break;
+ case REG_R4: return (int)&(((ex_regs_t*)0)->_r4); break;
+ case REG_R5: return (int)&(((ex_regs_t*)0)->_r5); break;
+ case REG_R6: return (int)&(((ex_regs_t*)0)->_r6); break;
+ case REG_R7: return (int)&(((ex_regs_t*)0)->_r7); break;
+ case REG_R8: return (int)&(((ex_regs_t*)0)->_r8); break;
+ case REG_R9: return (int)&(((ex_regs_t*)0)->_r9); break;
+ case REG_R10: return (int)&(((ex_regs_t*)0)->_r10); break;
+ case REG_R11: return (int)&(((ex_regs_t*)0)->_r11); break;
+ case REG_R12: return (int)&(((ex_regs_t*)0)->_r12); break;
+ case REG_SP: return (int)&(((ex_regs_t*)0)->_sp); break;
+ case REG_LR: return (int)&(((ex_regs_t*)0)->_lr); break;
+ case REG_PC: return (int)&(((ex_regs_t*)0)->_pc); break;
+
+#ifndef __ECOS__
+ case REG_F0: return (int)&(((ex_regs_t*)0)->_f0); break;
+ case REG_F1: return (int)&(((ex_regs_t*)0)->_f1); break;
+ case REG_F2: return (int)&(((ex_regs_t*)0)->_f2); break;
+ case REG_F3: return (int)&(((ex_regs_t*)0)->_f3); break;
+ case REG_F4: return (int)&(((ex_regs_t*)0)->_f4); break;
+ case REG_F5: return (int)&(((ex_regs_t*)0)->_f5); break;
+ case REG_F6: return (int)&(((ex_regs_t*)0)->_f6); break;
+ case REG_F7: return (int)&(((ex_regs_t*)0)->_f7); break;
+ case REG_FPS: return (int)&(((ex_regs_t*)0)->_fps); break;
+#endif
+
+ case REG_CPSR: return (int)&(((ex_regs_t*)0)->_cpsr); break;
+ case REG_SPSVC: return (int)&(((ex_regs_t*)0)->_spsvc); break;
+ }
+
+ return 0;
+}
+
+
+/*
+ * Return size in bytes of given register.
+ */
+int
+bsp_regsize(int regno)
+{
+ switch(regno)
+ {
+ case REG_R0: return (sizeof (((ex_regs_t*)0)->_r0)); break;
+ case REG_R1: return (sizeof (((ex_regs_t*)0)->_r1)); break;
+ case REG_R2: return (sizeof (((ex_regs_t*)0)->_r2)); break;
+ case REG_R3: return (sizeof (((ex_regs_t*)0)->_r3)); break;
+ case REG_R4: return (sizeof (((ex_regs_t*)0)->_r4)); break;
+ case REG_R5: return (sizeof (((ex_regs_t*)0)->_r5)); break;
+ case REG_R6: return (sizeof (((ex_regs_t*)0)->_r6)); break;
+ case REG_R7: return (sizeof (((ex_regs_t*)0)->_r7)); break;
+ case REG_R8: return (sizeof (((ex_regs_t*)0)->_r8)); break;
+ case REG_R9: return (sizeof (((ex_regs_t*)0)->_r9)); break;
+ case REG_R10: return (sizeof (((ex_regs_t*)0)->_r10)); break;
+ case REG_R11: return (sizeof (((ex_regs_t*)0)->_r11)); break;
+ case REG_R12: return (sizeof (((ex_regs_t*)0)->_r12)); break;
+ case REG_SP: return (sizeof (((ex_regs_t*)0)->_sp)); break;
+ case REG_LR: return (sizeof (((ex_regs_t*)0)->_lr)); break;
+ case REG_PC: return (sizeof (((ex_regs_t*)0)->_pc)); break;
+
+#ifndef __ECOS__
+ case REG_F0: return (sizeof (((ex_regs_t*)0)->_f0)); break;
+ case REG_F1: return (sizeof (((ex_regs_t*)0)->_f1)); break;
+ case REG_F2: return (sizeof (((ex_regs_t*)0)->_f2)); break;
+ case REG_F3: return (sizeof (((ex_regs_t*)0)->_f3)); break;
+ case REG_F4: return (sizeof (((ex_regs_t*)0)->_f4)); break;
+ case REG_F5: return (sizeof (((ex_regs_t*)0)->_f5)); break;
+ case REG_F6: return (sizeof (((ex_regs_t*)0)->_f6)); break;
+ case REG_F7: return (sizeof (((ex_regs_t*)0)->_f7)); break;
+ case REG_FPS: return (sizeof (((ex_regs_t*)0)->_fps)); break;
+#endif
+
+ case REG_CPSR: return (sizeof (((ex_regs_t*)0)->_cpsr)); break;
+ case REG_SPSVC: return (sizeof (((ex_regs_t*)0)->_spsvc)); break;
+ }
+
+ return 0;
+}
+
+
+/*
+ * Given an exception number and a pointer to saved registers,
+ * return a GDB signal value.
+ */
+int
+bsp_get_signal(int exc_nr, void *saved_regs)
+{
+ int sig = TARGET_SIGNAL_TRAP;
+ ex_regs_t *regs = (ex_regs_t *)saved_regs;
+
+ switch (exc_nr) {
+ case BSP_CORE_EXC_UNDEFINED_INSTRUCTION:
+ {
+ union arm_insn inst;
+ if (bsp_memory_read((void *)regs->_pc, 0, ARM_INST_SIZE * 8, 1, &(inst.word)) != 0)
+ {
+ /*
+ * We were able to read this address. It must be a valid address.
+ */
+ if (inst.word == BREAKPOINT_INSN)
+ sig = TARGET_SIGNAL_TRAP;
+ }
+ else
+ sig = TARGET_SIGNAL_ILL;
+ }
+ break;
+ case BSP_CORE_EXC_SOFTWARE_INTERRUPT: sig = TARGET_SIGNAL_TRAP; break;
+ case BSP_CORE_EXC_PREFETCH_ABORT: sig = TARGET_SIGNAL_BUS; break;
+ case BSP_CORE_EXC_DATA_ABORT: sig = TARGET_SIGNAL_BUS; break;
+ case BSP_CORE_EXC_ADDRESS_ERROR_26_BIT: sig = TARGET_SIGNAL_BUS; break;
+ case BSP_CORE_EXC_IRQ: sig = TARGET_SIGNAL_INT; break;
+ case BSP_CORE_EXC_FIQ: sig = TARGET_SIGNAL_INT; break;
+ default: sig = TARGET_SIGNAL_TRAP; break;
+ }
+
+ return sig;
+}
+
+
+/*
+ * Set the PC value in the saved registers.
+ */
+void
+bsp_set_pc(unsigned long pc, void *saved_regs)
+{
+ ((ex_regs_t *)saved_regs)->_pc = pc;
+}
+
+
+/*
+ * Get the PC value from the saved registers.
+ */
+unsigned long
+bsp_get_pc(void *saved_regs)
+{
+ return ((ex_regs_t *)saved_regs)->_pc;
+}
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/arm/gdb-cpu.h b/cesar/ecos/packages/cygmon/current/misc/bsp/arm/gdb-cpu.h
new file mode 100644
index 0000000000..9ee631b9ec
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/arm/gdb-cpu.h
@@ -0,0 +1,61 @@
+#ifndef __BSP_ARM_GDB_CPU_H__
+#define __BSP_ARM_GDB_CPU_H__
+//==========================================================================
+//
+// gdb-cpu.h
+//
+// CPU specific definitions for GDB stub.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: CPU specific definitions for GDB stub.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+/*
+ * Number of registers that gdb is interested in.
+ */
+#define NUMREGS 26
+
+#endif // __BSP_ARM_GDB_CPU_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/arm/gdb.h b/cesar/ecos/packages/cygmon/current/misc/bsp/arm/gdb.h
new file mode 100644
index 0000000000..37906d84e4
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/arm/gdb.h
@@ -0,0 +1,58 @@
+#ifndef __BSP_ARM_GDB_H__
+#define __BSP_ARM_GDB_H__
+//==========================================================================
+//
+// gdb.h
+//
+//
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#include "../common/gdb.h"
+
+#endif // __BSP_ARM_GDB_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/arm/insn.h b/cesar/ecos/packages/cygmon/current/misc/bsp/arm/insn.h
new file mode 100755
index 0000000000..44dc3de057
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/arm/insn.h
@@ -0,0 +1,482 @@
+#ifndef __BSP_ARM_INSN_H__
+#define __BSP_ARM_INSN_H__
+//==========================================================================
+//
+// insn.h
+//
+// ARM(R) instruction descriptions.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: ARM(R) instruction descriptions.
+// Description: ARM is a Registered Trademark of Advanced RISC Machines
+// Limited.
+// Other Brands and Trademarks are the property of their
+// respective owners.
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+/* Data Processing Immediate Type */
+struct dpi_type {
+ unsigned immediate : 8;
+ unsigned rotate : 4;
+ unsigned Rd : 4;
+ unsigned Rn : 4;
+ unsigned S_bit : 1;
+ unsigned opcode : 4;
+ unsigned rsv1 : 3; /* == 001b */
+ unsigned cond : 4;
+};
+#define DPI_RSV1_VALUE 0x1
+
+/* Data Processing Immediate Shift Type */
+struct dpis_type {
+ unsigned Rm : 4;
+ unsigned rsv2 : 1; /* == 0b */
+ unsigned shift : 2;
+ unsigned shift_immed : 5;
+ unsigned Rd : 4;
+ unsigned Rn : 4;
+ unsigned S_bit : 1;
+ unsigned opcode : 4;
+ unsigned rsv1 : 3; /* == 000b */
+ unsigned cond : 4;
+};
+#define DPIS_RSV1_VALUE 0x0
+#define DPIS_RSV2_VALUE 0x0
+
+/* Data Processing Register Shift Type */
+struct dprs_type {
+ unsigned Rm : 4;
+ unsigned rsv3 : 1; /* == 1b */
+ unsigned shift : 2;
+ unsigned rsv2 : 1; /* == 0b */
+ unsigned Rs : 4;
+ unsigned Rd : 4;
+ unsigned Rn : 4;
+ unsigned S_bit : 1;
+ unsigned opcode : 4;
+ unsigned rsv1 : 3; /* == 000b */
+ unsigned cond : 4;
+};
+#define DPRS_RSV1_VALUE 0x0
+#define DPRS_RSV2_VALUE 0x0
+#define DPRS_RSV3_VALUE 0x1
+
+/* Multiply Type */
+struct m_type {
+ unsigned Rm : 4;
+ unsigned rsv2 : 4; /* == 1001b */
+ unsigned Rs : 4;
+ unsigned Rn : 4;
+ unsigned Rd : 4;
+ unsigned S_bit : 1;
+ unsigned A_bit : 1;
+ unsigned rsv1 : 6; /* == 000000b */
+ unsigned cond : 4;
+};
+#define M_RSV1_VALUE 0x0
+#define M_RSV2_VALUE 0x9
+
+/* Multiply Long Type */
+struct ml_type {
+ unsigned Rm : 4;
+ unsigned rsv2 : 4; /* == 1001b */
+ unsigned Rs : 4;
+ unsigned RdLo : 4;
+ unsigned RdHi : 4;
+ unsigned S_bit : 1;
+ unsigned A_bit : 1;
+ unsigned U_bit : 1;
+ unsigned rsv1 : 5; /* == 00001b */
+ unsigned cond : 4;
+};
+#define ML_RSV1_VALUE 0x1
+#define ML_RSV2_VALUE 0x9
+
+/* Move from status register Type */
+struct mrs_type {
+ unsigned SBZ : 12;
+ unsigned Rd : 4;
+ unsigned SBO : 4;
+ unsigned rsv2 : 2; /* == 00b */
+ unsigned R_bit : 1;
+ unsigned rsv1 : 5; /* == 00010b */
+ unsigned cond : 4;
+};
+#define MRS_RSV1_VALUE 0x2
+#define MRS_RSV2_VALUE 0x0
+
+/* Move Immediate to status register Type */
+struct misr_type {
+ unsigned immediate : 8;
+ unsigned rotate : 4;
+ unsigned SBO : 4;
+ unsigned mask : 4;
+ unsigned rsv2 : 2; /* == 10b */
+ unsigned R_bit : 1;
+ unsigned rsv1 : 5; /* == 00110b */
+ unsigned cond : 4;
+};
+#define MISR_RSV1_VALUE 0x6
+#define MISR_RSV2_VALUE 0x2
+
+/* Move register to status register Type */
+struct mrsr_type {
+ unsigned Rm : 4;
+ unsigned rsv3 : 1; /* == 0b */
+ unsigned SBZ : 7;
+ unsigned SBO : 4;
+ unsigned mask : 4;
+ unsigned rsv2 : 2; /* == 10b */
+ unsigned R_bit : 1;
+ unsigned rsv1 : 5; /* == 00010b */
+ unsigned cond : 4;
+};
+#define MRSR_RSV1_VALUE 0x2
+#define MRSR_RSV2_VALUE 0x2
+#define MRSR_RSV3_VALUE 0x0
+
+/* Branch/Exchange Type */
+struct bx_type {
+ unsigned Rm : 4;
+ unsigned rsv2 : 4; /* == 0001b */
+ unsigned SBO3 : 4;
+ unsigned SBO2 : 4;
+ unsigned SBO1 : 4;
+ unsigned rsv1 : 8; /* == 00010010b */
+ unsigned cond : 4;
+};
+#define BX_RSV1_VALUE 0x12
+#define BX_RSV2_VALUE 0x1
+
+/* Load/Store Immediate Offset Type */
+struct lsio_type {
+ unsigned immediate : 12;
+ unsigned Rd : 4;
+ unsigned Rn : 4;
+ unsigned L_bit : 1;
+ unsigned W_bit : 1;
+ unsigned B_bit : 1;
+ unsigned U_bit : 1;
+ unsigned P_bit : 1;
+ unsigned rsv1 : 3; /* == 010b */
+ unsigned cond : 4;
+};
+#define LSIO_RSV1_VALUE 0x2
+
+/* Load/Store Register Offset Type */
+struct lsro_type {
+ unsigned Rm : 4;
+ unsigned rsv2 : 1; /* == 0b */
+ unsigned shift : 2;
+ unsigned shift_immed : 5;
+ unsigned Rd : 4;
+ unsigned Rn : 4;
+ unsigned L_bit : 1;
+ unsigned W_bit : 1;
+ unsigned B_bit : 1;
+ unsigned U_bit : 1;
+ unsigned P_bit : 1;
+ unsigned rsv1 : 3; /* == 011b */
+ unsigned cond : 4;
+};
+#define LSRO_RSV1_VALUE 0x3
+#define LSRO_RSV2_VALUE 0x0
+
+/* Load/Store halfword/signed byte Immediate Offset Type */
+struct lshwi_type {
+ unsigned Lo_Offset : 4;
+ unsigned rsv4 : 1; /* == 1b */
+ unsigned H_bit : 1;
+ unsigned S_bit : 1;
+ unsigned rsv3 : 1; /* == 1b */
+ unsigned Hi_Offset : 4;
+ unsigned Rd : 4;
+ unsigned Rn : 4;
+ unsigned L_bit : 1;
+ unsigned W_bit : 1;
+ unsigned rsv2 : 1; /* == 1b */
+ unsigned U_bit : 1;
+ unsigned P_bit : 1;
+ unsigned rsv1 : 3; /* == 000b */
+ unsigned cond : 4;
+};
+#define LSHWI_RSV1_VALUE 0x0
+#define LSHWI_RSV2_VALUE 0x1
+#define LSHWI_RSV3_VALUE 0x1
+#define LSHWI_RSV4_VALUE 0x1
+
+/* Load/Store halfword/signed byte Register Offset Type */
+struct lshwr_type {
+ unsigned Rm : 4;
+ unsigned rsv4 : 1; /* == 1b */
+ unsigned H_bit : 1;
+ unsigned S_bit : 1;
+ unsigned rsv3 : 1; /* == 1b */
+ unsigned SBZ : 4;
+ unsigned Rd : 4;
+ unsigned Rn : 4;
+ unsigned L_bit : 1;
+ unsigned W_bit : 1;
+ unsigned rsv2 : 1; /* == 0b */
+ unsigned U_bit : 1;
+ unsigned P_bit : 1;
+ unsigned rsv1 : 3; /* == 000b */
+ unsigned cond : 4;
+};
+#define LSHWR_RSV1_VALUE 0x3
+#define LSHWR_RSV2_VALUE 0x1
+#define LSHWR_RSV3_VALUE 0x1
+#define LSHWR_RSV4_VALUE 0x1
+
+/* Swap/Swap Byte Type */
+struct swap_type {
+ unsigned Rm : 4;
+ unsigned rsv3 : 4; /* == 1001b */
+ unsigned SBZ : 4;
+ unsigned Rd : 4;
+ unsigned Rn : 4;
+ unsigned rsv2 : 2; /* == 00b */
+ unsigned B_bit : 1;
+ unsigned rsv1 : 5; /* == 00010b */
+ unsigned cond : 4;
+};
+#define SWAP_RSV1_VALUE 0x2
+#define SWAP_RSV2_VALUE 0x0
+#define SWAP_RSV3_VALUE 0x9
+
+/* Load/Store Multiple Type */
+struct lsm_type {
+ unsigned Reg_List : 16 ;
+ unsigned Rn : 4;
+ unsigned L_bit : 1;
+ unsigned W_bit : 1;
+ unsigned S_bit : 1;
+ unsigned U_bit : 1;
+ unsigned P_bit : 1;
+ unsigned rsv1 : 3; /* == 100b */
+ unsigned cond : 4;
+};
+#define LSM_RSV1_VALUE 0x4
+
+/* Coprocessor Data Processing Type */
+struct cpdp_type {
+ unsigned CRm : 4;
+ unsigned rsv2 : 1; /* == 0b */
+ unsigned op2 : 3;
+ unsigned cp_num : 4;
+ unsigned CRd : 4;
+ unsigned CRn : 4;
+ unsigned op1 : 4;
+ unsigned rsv1 : 4; /* == 1110b */
+ unsigned cond : 4;
+};
+#define CPDP_RSV1_VALUE 0xE
+#define CPDP_RSV2_VALUE 0x0
+
+/* Coprocessor Register Transfer Type */
+struct cprt_type {
+ unsigned CRm : 4;
+ unsigned rsv2 : 1; /* == 1b */
+ unsigned op2 : 3;
+ unsigned cp_num : 4;
+ unsigned Rd : 4;
+ unsigned CRn : 4;
+ unsigned L_bit : 1;
+ unsigned op1 : 3;
+ unsigned rsv1 : 4; /* == 1110b */
+ unsigned cond : 4;
+};
+#define CPRT_RSV1_VALUE 0xE
+#define CPRT_RSV2_VALUE 0x1
+
+/* Coprocessor Load/Store Type */
+struct cpls_type {
+ unsigned offset : 8;
+ unsigned cp_num : 4;
+ unsigned CRd : 4;
+ unsigned Rn : 4;
+ unsigned L_bit : 1;
+ unsigned W_bit : 1;
+ unsigned N_bit : 1;
+ unsigned U_bit : 1;
+ unsigned P_bit : 1;
+ unsigned rsv1 : 3; /* == 110b */
+ unsigned cond : 4;
+};
+#define CPLS_RSV1_VALUE 0x6
+
+/* Branch/Branch w/ Link Type */
+struct bbl_type {
+ unsigned offset : 24;
+ unsigned L_bit : 1;
+ unsigned rsv1 : 3; /* == 101b */
+ unsigned cond : 4;
+};
+#define BBL_RSV1_VALUE 0x5
+
+/* SWI Type */
+struct swi_type {
+ unsigned swi_number : 24;
+ unsigned rsv1 : 4; /* == 1111b */
+ unsigned cond : 4;
+};
+#define SWI_RSV1_VALUE 0xF
+
+/* Undefined Instruction Type */
+struct undef_type {
+ unsigned pad2 : 4;
+ unsigned rsv2 : 1; /* == 1b */
+ unsigned pad1 : 20;
+ unsigned rsv1 : 3; /* == 011b */
+ unsigned cond : 4;
+};
+#define UNDEF_RSV1_VALUE 0x3
+#define UNDEF_RSV2_VALUE 0x1
+
+union arm_insn {
+ unsigned long word;
+ struct dpi_type dpi;
+ struct dpis_type dpis;
+ struct dprs_type dprs;
+ struct m_type m;
+ struct ml_type ml;
+ struct mrs_type mrs;
+ struct misr_type misr;
+ struct mrsr_type mrsr;
+ struct bx_type bx;
+ struct lsio_type lsio;
+ struct lsro_type lsro;
+ struct lshwi_type lshwi;
+ struct lshwr_type lshwr;
+ struct swap_type swap;
+ struct lsm_type lsm;
+ struct cpdp_type cpdp;
+ struct cprt_type cprt;
+ struct cpls_type cpls;
+ struct bbl_type bbl;
+ struct swi_type swi;
+ struct undef_type undef;
+};
+
+/*
+ * Conditional field values
+ */
+#define COND_EQ 0x0
+#define COND_NE 0x1
+#define COND_CS_HI 0x2
+#define COND_CC_LO 0x3
+#define COND_MI 0x4
+#define COND_PL 0x5
+#define COND_VS 0x6
+#define COND_VC 0x7
+#define COND_HI 0x8
+#define COND_LS 0x9
+#define COND_GE 0xA
+#define COND_LT 0xB
+#define COND_GT 0xC
+#define COND_LE 0xD
+#define COND_AL 0xE
+#define COND_NV 0xF
+
+/*
+ * Data Processiong Opcode field values
+ */
+#define DP_OPCODE_MOV 0xD
+#define DP_OPCODE_MVN 0xF
+#define DP_OPCODE_ADD 0x4
+#define DP_OPCODE_ADC 0x5
+#define DP_OPCODE_SUB 0x2
+#define DP_OPCODE_SBC 0x6
+#define DP_OPCODE_RSB 0x3
+#define DP_OPCODE_RSC 0x7
+#define DP_OPCODE_AND 0x0
+#define DP_OPCODE_EOR 0x1
+#define DP_OPCODE_ORR 0xC
+#define DP_OPCODE_BIC 0xE
+#define DP_OPCODE_CMP 0xA
+#define DP_OPCODE_CMN 0xB
+#define DP_OPCODE_TST 0x8
+#define DP_OPCODE_TEQ 0x9
+
+/*
+ * Shift field values
+ */
+#define SHIFT_LSL 0x0
+#define SHIFT_LSR 0x1
+#define SHIFT_ASR 0x2
+#define SHIFT_ROR 0x3
+#define SHIFT_RRX 0x3 /* Special case: ROR(0) implies RRX */
+
+/*
+ * Load/Store indexing definitions
+ */
+#define LS_INDEX_POST 0x0
+#define LS_INDEX_PRE 0x1
+
+/*
+ * Load/Store offset operation definitions
+ */
+#define LS_OFFSET_SUB 0x0
+#define LS_OFFSET_ADD 0x1
+
+/*
+ * Load/Store size definitions
+ */
+#define LS_SIZE_WORD 0x0
+#define LS_SIZE_BYTE 0x1
+
+/*
+ * Load/Store Update definitions
+ */
+#define LS_NO_UPDATE 0x0
+#define LS_UPDATE 0x1
+
+/*
+ * Load/Store Opcode definitions
+ */
+#define LS_STORE 0x0
+#define LS_LOAD 0x1
+
+#endif // __BSP_ARM_INSN_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/arm/singlestep.c b/cesar/ecos/packages/cygmon/current/misc/bsp/arm/singlestep.c
new file mode 100644
index 0000000000..76e994c200
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/arm/singlestep.c
@@ -0,0 +1,1320 @@
+//==========================================================================
+//
+// singlestep.c
+//
+// ARM(R) specific single-step support.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: ARM(R) specific single-step support.
+// Description: ARM is a Registered Trademark of Advanced RISC Machines Limited.
+// Other Brands and Trademarks are the property of their
+// respective owners.
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#include <stdlib.h>
+#include <bsp/bsp.h>
+#include <bsp/cpu.h>
+#include "insn.h"
+
+#define DEBUG_SINGLESTEP 0
+#define DEBUG_SINGLESTEP_VERBOSE 0
+
+/*
+ * Structure to hold opcodes hoisted when breakpoints are
+ * set for single-stepping or async interruption.
+ */
+struct _bp_save {
+ unsigned long *addr;
+ unsigned long opcode;
+};
+
+#define NUM_BREAKS_SAVED 2
+static struct _bp_save _breaks[NUM_BREAKS_SAVED];
+
+/*
+ * Insert a breakpoint at 'pc' using first available
+ * _bp_save struct.
+ */
+static void
+insert_ss_break(unsigned long *pc)
+{
+ struct _bp_save *p = _breaks;
+ union arm_insn inst;
+
+ if (p->addr && (++p)->addr)
+ return;
+
+ /*
+ * We can't set a breakpoint at 0
+ */
+ if (pc == 0)
+ {
+#if DEBUG_SINGLESTEP
+ bsp_printf("Setting BP at <0x%08lx>: Error\n", pc);
+#endif /* DEBUG_SINGLESTEP */
+ return;
+ }
+
+ /*
+ * Make sure we are on a long word boundary.
+ */
+ if (((unsigned long)pc & 0x3) != 0)
+ {
+ /*
+ * All ARM(R) instructions are on a word boundary.
+ * This would be invalid. Don't set a bkpt here.
+ */
+#if DEBUG_SINGLESTEP
+ bsp_printf("Setting BP at <0x%08lx>: Error\n", pc);
+#endif /* DEBUG_SINGLESTEP */
+ return;
+ }
+
+
+ /*
+ * What is the current instruction
+ */
+ if (bsp_memory_read(pc, 0, ARM_INST_SIZE * 8, 1, &(inst.word)) == 0)
+ {
+ /*
+ * Unable to read this address, probably an invalid address.
+ * Don't set a breakpoint here, as it will likely cause a bus error
+ */
+#if DEBUG_SINGLESTEP
+ bsp_printf("Setting BP at <0x%08lx>: Error\n", pc);
+#endif /* DEBUG_SINGLESTEP */
+ return;
+ }
+
+ if (inst.word != BREAKPOINT_INSN)
+ {
+ /*
+ * Only insert a breakpoint if we haven't done so already
+ *
+ * We may try to insert 2 breakpoints if we to a branch to
+ * the immediately following instruction.
+ */
+#if DEBUG_SINGLESTEP
+ bsp_printf("Setting BP at <0x%08lx>: inst <0x%08lx>\n", pc, inst.word);
+#endif /* DEBUG_SINGLESTEP */
+
+ p->addr = pc;
+ p->opcode = inst.word;
+ inst.word = BREAKPOINT_INSN;
+ if (bsp_memory_write(pc, 0, ARM_INST_SIZE * 8, 1, &(inst.word)) == 0)
+ {
+ /*
+ * Unable to write this address, probably an invalid address.
+ * Don't set a breakpoint here, as it will likely cause a bus error
+ */
+#if DEBUG_SINGLESTEP
+ bsp_printf("Setting BP at <0x%08lx>: Error\n", pc);
+#endif /* DEBUG_SINGLESTEP */
+ return;
+ }
+
+ /* flush icache and dcache, now */
+ bsp_flush_dcache((void *)pc, ARM_INST_SIZE);
+ bsp_flush_icache((void *)pc, ARM_INST_SIZE);
+
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("Done setting BP at <0x%08lx>: inst <0x%08lx>\n", pc, *pc);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ }
+}
+
+/*
+ * Cleanup after a singlestep.
+ */
+void
+bsp_singlestep_cleanup(void *registers)
+{
+ struct _bp_save *p = _breaks;
+ int i;
+
+ for (i = 0; i < NUM_BREAKS_SAVED; i++, p++)
+ {
+ if (p->addr)
+ {
+ unsigned long *old_addr = p->addr;
+
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("Remove BP at <0x%08lx>: inst <0x%08lx>\n", old_addr, *old_addr);
+#endif /* DEBUG_SINGLESTEP */
+ *(p->addr) = p->opcode;
+ p->addr = NULL;
+
+ /* flush icache and dcache, now */
+ bsp_flush_dcache((void *)old_addr, ARM_INST_SIZE);
+ bsp_flush_icache((void *)old_addr, ARM_INST_SIZE);
+
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("Done removing BP at <0x%08lx>: inst <0x%08lx>\n", old_addr, *old_addr);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ }
+ }
+}
+
+/*
+ * Rotate right a value by count
+ */
+static unsigned long ror(unsigned long value, unsigned count)
+{
+ while (count-- > 0)
+ {
+ if (value & 0x1)
+ value = (value >> 1) | 0x80000000;
+ else
+ value = (value >> 1);
+ }
+
+ return(value);
+}
+
+/*
+ * Rotate right a value by 1 with extend
+ */
+static unsigned long rrx(union arm_psr sr, unsigned long value)
+{
+ if (sr.psr.c_bit)
+ value = (value >> 1) | 0x80000000;
+ else
+ value = (value >> 1);
+
+ return(value);
+}
+
+/*
+ * Logical shift left by count
+ */
+static unsigned long lsl(unsigned long value, unsigned count)
+{
+ value <<= count;
+
+ return(value);
+}
+
+/*
+ * Logical shift right by count
+ */
+static unsigned long lsr(unsigned long value, unsigned count)
+{
+ value >>= count;
+
+ return(value);
+}
+
+/*
+ * Arithmetic shift right by count
+ */
+static unsigned long asr(unsigned long value, unsigned count)
+{
+ unsigned long sign_ext_mask = 0;
+
+ if (value & 0x80000000)
+ {
+ if (count >= sizeof(value)*8)
+ sign_ext_mask = ~0;
+ else
+ sign_ext_mask = (~0 << (sizeof(value)*8 - count));
+ }
+ value = (value >> count) | sign_ext_mask;
+
+ return(value);
+}
+
+/*
+ * Calculate an immediate shift operand based on input shift operand,
+ * shift value and register address.
+ */
+static unsigned long immediate_shift_operand(ex_regs_t *regs, unsigned shift_immediate,
+ unsigned shift, unsigned Rm)
+{
+ unsigned char *regs_array = (unsigned char *)regs;
+ unsigned char *reg_ptr = &regs_array[bsp_regbyte(Rm)];
+ unsigned long reg_value = *((unsigned long *)(reg_ptr));
+ unsigned long rc = 0;
+
+ BSP_ASSERT((shift_immediate >= 0) && (shift_immediate <= 0x1f));
+ BSP_ASSERT((shift >= 0) && (shift <= 0x3));
+ BSP_ASSERT((Rm >= 0) && (Rm <= 0xf));
+ BSP_ASSERT(bsp_regsize(Rm) == sizeof(unsigned long));
+
+ /*
+ * According to the ARM(R) Manual, if Rm is PC then,
+ * the value used is the address of the current instruction
+ * plus 8
+ */
+ if (Rm == REG_PC)
+ reg_value += 8;
+
+ switch (shift)
+ {
+ case SHIFT_LSL:
+ rc = lsl(reg_value, shift_immediate);
+ break;
+
+ case SHIFT_LSR:
+ if (shift_immediate == 0)
+ {
+ /*
+ * Special Case: LSR IMM(0) == 0
+ */
+ rc = 0;
+ } else {
+ rc = lsr(reg_value, shift_immediate);
+ }
+ break;
+
+ case SHIFT_ASR:
+ if (shift_immediate == 0)
+ {
+ /*
+ * Special Case: ASR IMM(0)
+ */
+ if (reg_value & 0x80000000)
+ {
+ rc = 0xFFFFFFFF;
+ } else {
+ rc = 0;
+ }
+ } else {
+ rc = asr(reg_value, shift_immediate);
+ }
+ break;
+
+ case SHIFT_ROR:
+ if (shift_immediate == 0)
+ {
+ /*
+ * SHIFT_RRX
+ * Special case: ROR(0) implies RRX
+ */
+ rc = rrx((union arm_psr)(unsigned long)regs->_cpsr, reg_value);
+ } else {
+ rc = ror(reg_value, shift_immediate);
+ }
+ break;
+
+ default:
+ BSP_ASSERT(0);
+ break;
+ }
+
+ return (rc);
+}
+
+/*
+ * Calculate a register shift operand based on input shift operand,
+ * and target registers.
+ */
+static unsigned long register_shift_operand(ex_regs_t *regs, unsigned Rs,
+ unsigned shift, unsigned Rm)
+{
+ unsigned char *regs_array = (unsigned char *)regs;
+ unsigned char *Rs_ptr = &regs_array[bsp_regbyte(Rs)];
+ unsigned char *Rm_ptr = &regs_array[bsp_regbyte(Rm)];
+ unsigned long Rs_val = *((unsigned long *)(Rs_ptr));
+ unsigned long Rm_val = *((unsigned long *)(Rm_ptr));
+ unsigned long rc = 0;
+
+ /*
+ * Use only the least significant byte of Rs
+ */
+ Rs_val &= 0xFF;
+
+ BSP_ASSERT((Rs >= 0) && (Rs <= 0xf));
+ BSP_ASSERT((shift >= 0) && (shift <= 0x3));
+ BSP_ASSERT((Rm >= 0) && (Rm <= 0xf));
+ BSP_ASSERT(bsp_regsize(Rs) == sizeof(unsigned long));
+ BSP_ASSERT(bsp_regsize(Rm) == sizeof(unsigned long));
+ BSP_ASSERT((Rs_val >=0) && (Rs_val <= 0xff));
+
+ /*
+ * According to the ARM(R) Manual, if Rm is PC then,
+ * the value used is the address of the current instruction
+ * plus 8
+ */
+ if (Rm == REG_PC)
+ Rm_val += 8;
+
+ switch (shift)
+ {
+ case SHIFT_LSL: rc = lsl(Rm_val, Rs_val); break;
+ case SHIFT_LSR: rc = lsr(Rm_val, Rs_val); break;
+ case SHIFT_ASR: rc = asr(Rm_val, Rs_val); break;
+ case SHIFT_ROR: rc = ror(Rm_val, Rs_val); break;
+ default: BSP_ASSERT(0); break;
+ }
+
+ return (rc);
+}
+
+/*
+ * Calculate a branch exchange operand based on input destination register
+ */
+static unsigned long branch_exchange_operand(ex_regs_t *regs, unsigned Rm)
+{
+ unsigned char *regs_array = (unsigned char *)regs;
+ unsigned char *reg_ptr = &regs_array[bsp_regbyte(Rm)];
+ unsigned long reg_value = *((unsigned long *)(reg_ptr));
+
+ BSP_ASSERT((Rm >= 0) && (Rm <= 0xf));
+ BSP_ASSERT(bsp_regsize(Rm) == sizeof(unsigned long));
+
+ /*
+ * Clear the low-order bit
+ */
+ return (reg_value & ~0x1);
+}
+
+/*
+ * Handle a load to the PC
+ */
+static void handle_pc_load(unsigned size, unsigned long operand)
+{
+ unsigned long mem_value = 0;
+
+ if (size == LS_SIZE_WORD)
+ {
+ if (bsp_memory_read((void*)(operand & ~0x3), 0, 32, 1, &mem_value) == 0)
+ {
+ /*
+ * Unable to read the memory address.
+ * Don't try any further.
+ */
+#if DEBUG_SINGLESTEP
+ bsp_printf("Setting BP at *(0x%08lx): Error\n", operand & ~0x3);
+#endif /* DEBUG_SINGLESTEP */
+ return;
+ } else {
+#if DEBUG_SINGLESTEP
+ bsp_printf("Setting BP at *(0x%08lx): data <0x%08lx>\n", operand & ~0x3, mem_value);
+#endif /* DEBUG_SINGLESTEP */
+ }
+
+ /*
+ * Handle rotations if required
+ */
+ switch (operand & 0x3)
+ {
+ case 0x0: break;
+ case 0x1: mem_value = ror(mem_value, 8); break;
+ case 0x2: mem_value = ror(mem_value, 16); break;
+ case 0x3: mem_value = ror(mem_value, 24); break;
+ }
+ } else {
+ /*
+ * Byte load of the PC
+ */
+ if (bsp_memory_read((void*)operand, 0, 8, 1, &mem_value) == 0)
+ {
+ /*
+ * Unable to read the memory address.
+ * Don't try any further.
+ */
+#if DEBUG_SINGLESTEP
+ bsp_printf("Setting BP at *(0x%08lx): Error\n", operand & ~0x3);
+#endif /* DEBUG_SINGLESTEP */
+ return;
+ } else {
+#if DEBUG_SINGLESTEP
+ bsp_printf("Setting BP at *(0x%08lx): data <0x%08lx>\n", operand & ~0x3, mem_value);
+#endif /* DEBUG_SINGLESTEP */
+ }
+ }
+
+ insert_ss_break((unsigned long *)mem_value);
+}
+
+/*
+ * Calculate a load/store w/ Immediate offset operand based on input
+ * source register, offset value, and opcode (add/sub)
+ */
+static unsigned long load_store_immediate_operand(ex_regs_t *regs,
+ unsigned p_bit,
+ unsigned u_bit,
+ unsigned Rn,
+ unsigned offset)
+{
+ unsigned char *regs_array = (unsigned char *)regs;
+ unsigned char *reg_ptr = &regs_array[bsp_regbyte(Rn)];
+ unsigned long rc = *((unsigned long *)(reg_ptr));
+
+ BSP_ASSERT((Rn >= 0) && (Rn <= 0xf));
+ BSP_ASSERT(bsp_regsize(Rn) == sizeof(unsigned long));
+ BSP_ASSERT((offset >= 0) && (offset <= 0xfff));
+ BSP_ASSERT((p_bit >= 0) && (p_bit <= 1));
+ BSP_ASSERT((u_bit >= 0) && (u_bit <= 1));
+
+ /*
+ * According to the ARM(R) Manual, if Rn is PC then,
+ * the value used is the address of the current instruction
+ * plus 8
+ */
+ if (Rn == REG_PC)
+ rc += 8;
+
+ /*
+ * Do the update pre-index update
+ */
+ if (p_bit == LS_INDEX_PRE)
+ {
+ if (u_bit == LS_OFFSET_SUB)
+ rc -= offset;
+ else /* opcode == LS_OFFSET_ADD */
+ rc += offset;
+ }
+
+ return (rc);
+}
+
+/*
+ * Calculate a load/store w/ Register offset operand based on input
+ * source register, offset value, and opcode (add/sub)
+ *
+ * This calculates the appropriate pre-indexed operand
+ */
+static unsigned long load_store_register_operand(ex_regs_t *regs,
+ unsigned p_bit,
+ unsigned u_bit,
+ unsigned Rn,
+ unsigned Rm,
+ unsigned shift,
+ unsigned shift_immed)
+{
+ unsigned char *regs_array = (unsigned char *)regs;
+ unsigned char *Rn_ptr = &regs_array[bsp_regbyte(Rn)];
+ unsigned long Rn_val = *((unsigned long *)(Rn_ptr));
+ unsigned long rc, index;
+
+ BSP_ASSERT((Rn >= 0) && (Rn <= 0xf));
+ BSP_ASSERT((Rm >= 0) && (Rm <= 0xf));
+ BSP_ASSERT(bsp_regsize(Rn) == sizeof(unsigned long));
+ BSP_ASSERT(bsp_regsize(Rm) == sizeof(unsigned long));
+ BSP_ASSERT((p_bit >= 0) && (p_bit <= 1));
+ BSP_ASSERT((u_bit >= 0) && (u_bit <= 1));
+ BSP_ASSERT((shift >= 0) && (shift <= 0x3));
+ BSP_ASSERT((shift_immed >= 0) && (shift_immed <= 0x1F));
+
+ /*
+ * According to the ARM(R) Manual, if Rn is PC then
+ * the value used is the address of the current
+ * instruction plus 8
+ */
+ if (Rn == REG_PC)
+ Rn_val += 8;
+
+ /*
+ * According to the ARM(R) Manual, if Rm is PC then
+ * the result is unpredictable. Don't do anything
+ * here. Just return.
+ */
+ if (Rm == REG_PC)
+ return 0;
+
+ index = immediate_shift_operand(regs, shift_immed, shift, Rm);
+
+ rc = Rn_val;
+
+ /*
+ * Do the update pre-index update
+ */
+ if (p_bit == LS_INDEX_PRE)
+ {
+ if (u_bit == LS_OFFSET_SUB)
+ rc = Rn_val - index;
+ else /* opcode == LS_OFFSET_ADD */
+ rc = Rn_val + index;
+ }
+
+ return (rc);
+}
+
+/*
+ * Decode all data processing immediate instructions
+ */
+static void decode_dpi_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ if (inst.dpi.Rd == REG_PC)
+ {
+ unsigned long operand = ror(inst.dpi.immediate, (inst.dpi.rotate << 1));
+ unsigned long *dest = 0;
+ unsigned carry = ((union arm_psr)(unsigned long)(regs->_cpsr)).psr.c_bit;
+ unsigned char *regs_array = (unsigned char *)regs;
+ unsigned char *Rn_ptr = &regs_array[bsp_regbyte(inst.dpi.Rn)];
+ unsigned long Rn_val = *((unsigned long *)(Rn_ptr));
+
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("Decoded an data processing immediate instruction.\n");
+ bsp_printf("inst.dpi.immediate = 0x%x\n", inst.dpi.immediate);
+ bsp_printf("inst.dpi.rotate = 0x%x\n", inst.dpi.rotate);
+ bsp_printf("inst.dpi.Rd = 0x%x\n", inst.dpi.Rd);
+ bsp_printf("inst.dpi.Rn = 0x%x\n", inst.dpi.Rn);
+ bsp_printf("inst.dpi.S_bit = 0x%x\n", inst.dpi.S_bit);
+ bsp_printf("inst.dpi.opcode = 0x%x\n", inst.dpi.opcode);
+ bsp_printf("inst.dpi.cond = 0x%x\n", inst.dpi.cond);
+ bsp_printf("operand = 0x%x\n", operand);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+
+ /*
+ * According to the ARM(R) Manual, if Rn is PC then
+ * the value used is the address of the current
+ * instruction plus 8
+ */
+ if (inst.dpi.Rn == REG_PC)
+ Rn_val += 8;
+
+ switch (inst.dpi.opcode) {
+ case DP_OPCODE_ADC: dest = (unsigned long *)(Rn_val + operand + carry); break;
+ case DP_OPCODE_ADD: dest = (unsigned long *)(Rn_val + operand); break;
+ case DP_OPCODE_AND: dest = (unsigned long *)(Rn_val & operand); break;
+ case DP_OPCODE_BIC: dest = (unsigned long *)(Rn_val & ~operand); break;
+ case DP_OPCODE_EOR: dest = (unsigned long *)(Rn_val ^ operand); break;
+ case DP_OPCODE_MOV: dest = (unsigned long *)operand; break;
+ case DP_OPCODE_MVN: dest = (unsigned long *)(~operand); break;
+ case DP_OPCODE_ORR: dest = (unsigned long *)(Rn_val | operand); break;
+ case DP_OPCODE_RSB: dest = (unsigned long *)(operand - Rn_val); break;
+ case DP_OPCODE_RSC: dest = (unsigned long *)(operand - Rn_val - !carry); break;
+ case DP_OPCODE_SBC: dest = (unsigned long *)(Rn_val - operand - !carry); break;
+ case DP_OPCODE_SUB: dest = (unsigned long *)(Rn_val - operand); break;
+ default: dest = (unsigned long *)0; break;
+ }
+ dest = (unsigned long *)((unsigned long)dest & ~0x3);
+ insert_ss_break(dest);
+ }
+}
+
+/*
+ * Decode all data processing immediate w/ shift instructions
+ */
+static void decode_dpis_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ if (inst.dpis.Rd == REG_PC)
+ {
+ unsigned long operand = immediate_shift_operand(regs, inst.dpis.shift_immed,
+ inst.dpis.shift, inst.dpis.Rm);
+ unsigned long *dest = 0;
+ unsigned carry = ((union arm_psr)(unsigned long)(regs->_cpsr)).psr.c_bit;
+ unsigned char *regs_array = (unsigned char *)regs;
+ unsigned char *Rn_ptr = &regs_array[bsp_regbyte(inst.dpis.Rn)];
+ unsigned long Rn_val = *((unsigned long *)(Rn_ptr));
+
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("Decoded an data processing immediate shift instruction.\n");
+ bsp_printf("inst.dpis.Rm = 0x%x\n", inst.dpis.Rm);
+ bsp_printf("inst.dpis.shift = 0x%x\n", inst.dpis.shift);
+ bsp_printf("inst.dpis.shift_immed = 0x%x\n", inst.dpis.shift_immed);
+ bsp_printf("inst.dpis.Rd = 0x%x\n", inst.dpis.Rd);
+ bsp_printf("inst.dpis.Rn = 0x%x\n", inst.dpis.Rn);
+ bsp_printf("inst.dpis.S_bit = 0x%x\n", inst.dpis.S_bit);
+ bsp_printf("inst.dpis.opcode = 0x%x\n", inst.dpis.opcode);
+ bsp_printf("inst.dpis.cond = 0x%x\n", inst.dpis.cond);
+ bsp_printf("operand = 0x%x\n", operand);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+
+ /*
+ * According to the ARM(R) Manual, if Rn is PC then
+ * the value used is the address of the current
+ * instruction plus 8
+ */
+ if (inst.dpis.Rn == REG_PC)
+ Rn_val += 8;
+
+ switch (inst.dpis.opcode) {
+ case DP_OPCODE_ADC: dest = (unsigned long *)(Rn_val + operand + carry); break;
+ case DP_OPCODE_ADD: dest = (unsigned long *)(Rn_val + operand); break;
+ case DP_OPCODE_AND: dest = (unsigned long *)(Rn_val & operand); break;
+ case DP_OPCODE_BIC: dest = (unsigned long *)(Rn_val & ~operand); break;
+ case DP_OPCODE_EOR: dest = (unsigned long *)(Rn_val ^ operand); break;
+ case DP_OPCODE_MOV: dest = (unsigned long *)operand; break;
+ case DP_OPCODE_MVN: dest = (unsigned long *)(~operand); break;
+ case DP_OPCODE_ORR: dest = (unsigned long *)(Rn_val | operand); break;
+ case DP_OPCODE_RSB: dest = (unsigned long *)(operand - Rn_val); break;
+ case DP_OPCODE_RSC: dest = (unsigned long *)(operand - Rn_val - !carry); break;
+ case DP_OPCODE_SBC: dest = (unsigned long *)(Rn_val - operand - !carry); break;
+ case DP_OPCODE_SUB: dest = (unsigned long *)(Rn_val - operand); break;
+ default: dest = (unsigned long *)0; break;
+ }
+ dest = (unsigned long *)((unsigned long)dest & ~0x3);
+ insert_ss_break(dest);
+ }
+}
+
+/*
+ * Decode all data processing register w/ shift instructions
+ */
+static void decode_dprs_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ if (inst.dprs.Rd == REG_PC)
+ {
+ unsigned long operand = register_shift_operand(regs, inst.dprs.Rs,
+ inst.dprs.shift, inst.dprs.Rm);
+ unsigned long *dest = 0;
+ unsigned carry = ((union arm_psr)(unsigned long)(regs->_cpsr)).psr.c_bit;
+ unsigned char *regs_array = (unsigned char *)regs;
+ unsigned char *Rn_ptr = &regs_array[bsp_regbyte(inst.dprs.Rn)];
+ unsigned long Rn_val = *((unsigned long *)(Rn_ptr));
+
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("Decoded an data processing register shift instruction.\n");
+ bsp_printf("inst.dprs.Rm = 0x%x\n", inst.dprs.Rm);
+ bsp_printf("inst.dprs.rsv3 = 0x%x\n", inst.dprs.rsv3);
+ bsp_printf("inst.dprs.shift = 0x%x\n", inst.dprs.shift);
+ bsp_printf("inst.dprs.rsv2 = 0x%x\n", inst.dprs.rsv2);
+ bsp_printf("inst.dprs.Rs = 0x%x\n", inst.dprs.Rs);
+ bsp_printf("inst.dprs.Rd = 0x%x\n", inst.dprs.Rd);
+ bsp_printf("inst.dprs.Rn = 0x%x\n", inst.dprs.Rn);
+ bsp_printf("inst.dprs.S_bit = 0x%x\n", inst.dprs.S_bit);
+ bsp_printf("inst.dprs.opcode = 0x%x\n", inst.dprs.opcode);
+ bsp_printf("inst.dprs.rsv1 = 0x%x\n", inst.dprs.rsv1);
+ bsp_printf("inst.dprs.cond = 0x%x\n", inst.dprs.cond);
+ bsp_printf("operand = 0x%x\n", operand);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+
+ /*
+ * According to the ARM(R) Manual, if Rn is PC then
+ * the value used is the address of the current
+ * instruction plus 8
+ */
+ if (inst.dprs.Rn == REG_PC)
+ Rn_val += 8;
+
+ switch (inst.dprs.opcode) {
+ case DP_OPCODE_ADC: dest = (unsigned long *)(Rn_val + operand + carry); break;
+ case DP_OPCODE_ADD: dest = (unsigned long *)(Rn_val + operand); break;
+ case DP_OPCODE_AND: dest = (unsigned long *)(Rn_val & operand); break;
+ case DP_OPCODE_BIC: dest = (unsigned long *)(Rn_val & ~operand); break;
+ case DP_OPCODE_EOR: dest = (unsigned long *)(Rn_val ^ operand); break;
+ case DP_OPCODE_MOV: dest = (unsigned long *)operand; break;
+ case DP_OPCODE_MVN: dest = (unsigned long *)(~operand); break;
+ case DP_OPCODE_ORR: dest = (unsigned long *)(Rn_val | operand); break;
+ case DP_OPCODE_RSB: dest = (unsigned long *)(operand - Rn_val); break;
+ case DP_OPCODE_RSC: dest = (unsigned long *)(operand - Rn_val - !carry); break;
+ case DP_OPCODE_SBC: dest = (unsigned long *)(Rn_val - operand - !carry); break;
+ case DP_OPCODE_SUB: dest = (unsigned long *)(Rn_val - operand); break;
+ default: dest = (unsigned long *)0; break;
+ }
+
+ dest = (unsigned long *)((unsigned long)dest & ~0x3);
+ insert_ss_break(dest);
+ }
+}
+
+/*
+ * Decode all multiply instructions
+ */
+static void decode_m_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ /*
+ * According to the ARM(R) Manual, if Rd is PC then
+ * the result is unpredictable. Don't do anything
+ * here. Just return.
+ */
+}
+
+/*
+ * Decode all multiply long instructions
+ */
+static void decode_ml_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ /*
+ * According to the ARM(R) Manual, if Rd is PC then
+ * the result is unpredictable. Don't do anything
+ * here. Just return.
+ */
+}
+
+
+/*
+ * Decode all move from status register instructions
+ */
+static void decode_mrs_inst(ex_regs_t *regs, union arm_insn inst)
+{
+#if 0
+ if (inst.mrs.Rd == REG_PC)
+ {
+ unsigned long *dest = 0;
+
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("Decoded an move from status register instruction.\n");
+ bsp_printf("inst.mrs.SBZ = 0x%x\n", inst.mrs.SBZ);
+ bsp_printf("inst.mrs.Rd = 0x%x\n", inst.mrs.Rd);
+ bsp_printf("inst.mrs.SBO = 0x%x\n", inst.mrs.SBO);
+ bsp_printf("inst.mrs.rsv2 = 0x%x\n", inst.mrs.rsv2);
+ bsp_printf("inst.mrs.R_bit = 0x%x\n", inst.mrs.R_bit);
+ bsp_printf("inst.mrs.rsv1 = 0x%x\n", inst.mrs.rsv1);
+ bsp_printf("inst.mrs.cond = 0x%x\n", inst.mrs.cond);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+
+ if (inst.mrs.R_bit == 1)
+ dest = (unsigned long *)regs->_spsr;
+ else
+ dest = (unsigned long *)regs->_cpsr;
+
+ dest = (unsigned long *)((unsigned long)dest & ~0x3);
+ insert_ss_break(dest);
+ }
+#endif
+}
+
+
+/*
+ * Decode all move immediate to status register instructions
+ */
+static void decode_misr_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ /*
+ * Can't update the PC w/ this instruction.
+ * Don't set any more breakpoints
+ */
+}
+
+
+/*
+ * Decode all move register to status registers instructions
+ */
+static void decode_mrsr_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ /*
+ * Can't update the PC w/ this instruction.
+ * Don't set any more breakpoints
+ */
+}
+
+
+/*
+ * Decode all branch/exchange instructions
+ */
+static void decode_bx_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ unsigned long operand = branch_exchange_operand(regs, inst.bx.Rm);
+
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("Decoded an branch/exchange shift instruction.\n");
+ bsp_printf("inst.bx.Rm = 0x%x\n", inst.bx.Rm);
+ bsp_printf("inst.bx.rsv2 = 0x%x\n", inst.bx.rsv2);
+ bsp_printf("inst.bx.SBO3 = 0x%x\n", inst.bx.SBO3);
+ bsp_printf("inst.bx.SBO2 = 0x%x\n", inst.bx.SBO2);
+ bsp_printf("inst.bx.SBO1 = 0x%x\n", inst.bx.SBO1);
+ bsp_printf("inst.bx.rsv1 = 0x%x\n", inst.bx.rsv1);
+ bsp_printf("inst.bx.cond = 0x%x\n", inst.bx.cond);
+ bsp_printf("operand = 0x%x\n", operand);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+
+ insert_ss_break((unsigned long *)operand);
+}
+
+
+/*
+ * Decode all load/store immediate offset instructions
+ */
+static void decode_lsio_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ /*
+ * Only support direct loads of the PC
+ *
+ * According to the ARM(R) manual, automatic updates of the PC
+ * are UNPREDICTABLE (ie implementation defined).
+ */
+ if ((inst.lsio.Rd == REG_PC) && (inst.lsio.L_bit == LS_LOAD))
+ {
+ unsigned long operand = load_store_immediate_operand(regs, inst.lsio.P_bit,
+ inst.lsio.U_bit, inst.lsio.Rn,
+ inst.lsio.immediate);
+
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("Decoded an load/store w/ immediate offset instruction.\n");
+ bsp_printf("inst.lsio.immediate = 0x%x\n", inst.lsio.immediate);
+ bsp_printf("inst.lsio.Rd = 0x%x\n", inst.lsio.Rd);
+ bsp_printf("inst.lsio.Rn = 0x%x\n", inst.lsio.Rn);
+ bsp_printf("inst.lsio.L_bit = 0x%x\n", inst.lsio.L_bit);
+ bsp_printf("inst.lsio.W_bit = 0x%x\n", inst.lsio.W_bit);
+ bsp_printf("inst.lsio.B_bit = 0x%x\n", inst.lsio.B_bit);
+ bsp_printf("inst.lsio.U_bit = 0x%x\n", inst.lsio.U_bit);
+ bsp_printf("inst.lsio.P_bit = 0x%x\n", inst.lsio.P_bit);
+ bsp_printf("inst.lsio.rsv1 = 0x%x\n", inst.lsio.rsv1);
+ bsp_printf("inst.lsio.cond = 0x%x\n", inst.lsio.cond);
+ bsp_printf("operand = 0x%x\n", operand);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+
+ handle_pc_load(inst.lsio.B_bit, operand);
+ }
+}
+
+
+/*
+ * Decode all load/store register offset instructions
+ */
+static void decode_lsro_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ /*
+ * Only support direct loads of the PC
+ *
+ * According to the ARM(R) manual, automatic updates of the PC
+ * are UNPREDICTABLE (ie implementation defined).
+ */
+ if ((inst.lsro.Rd == REG_PC) && (inst.lsro.L_bit == LS_LOAD))
+ {
+ unsigned long operand = load_store_register_operand(regs,
+ inst.lsro.P_bit,
+ inst.lsro.U_bit,
+ inst.lsro.Rn,
+ inst.lsro.Rm,
+ inst.lsro.shift,
+ inst.lsro.shift_immed);
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("Decoded an load/store w/ register offset instruction.\n");
+ bsp_printf("inst.lsro.Rm = 0x%x\n", inst.lsro.Rm);
+ bsp_printf("inst.lsro.rsv2 = 0x%x\n", inst.lsro.rsv2);
+ bsp_printf("inst.lsro.shift = 0x%x\n", inst.lsro.shift);
+ bsp_printf("inst.lsro.shift_immed = 0x%x\n", inst.lsro.shift_immed);
+ bsp_printf("inst.lsro.Rd = 0x%x\n", inst.lsro.Rd);
+ bsp_printf("inst.lsro.Rn = 0x%x\n", inst.lsro.Rn);
+ bsp_printf("inst.lsro.L_bit = 0x%x\n", inst.lsro.L_bit);
+ bsp_printf("inst.lsro.W_bit = 0x%x\n", inst.lsro.W_bit);
+ bsp_printf("inst.lsro.B_bit = 0x%x\n", inst.lsro.B_bit);
+ bsp_printf("inst.lsro.U_bit = 0x%x\n", inst.lsro.U_bit);
+ bsp_printf("inst.lsro.P_bit = 0x%x\n", inst.lsro.P_bit);
+ bsp_printf("inst.lsro.rsv1 = 0x%x\n", inst.lsro.rsv1);
+ bsp_printf("inst.lsro.cond = 0x%x\n", inst.lsro.cond);
+ bsp_printf("operand = 0x%x\n", operand);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+
+ handle_pc_load(inst.lsro.B_bit, operand);
+ }
+}
+
+
+/*
+ * Decode all load/store halfword/signed byte immediate offset instructions
+ */
+static void decode_lshwi_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ /*
+ * According to the ARM(R) Manual, if Rd is PC then
+ * the result is unpredictable. Don't do anything
+ * here. Just return.
+ */
+}
+
+
+/*
+ * Decode all load/store halfword/signed byte register offset instructions
+ */
+static void decode_lshwr_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ /*
+ * According to the ARM(R) Manual, if Rd is PC then
+ * the result is unpredictable. Don't do anything
+ * here. Just return.
+ */
+}
+
+
+/*
+ * Decode all swap/swap byte instructions
+ */
+static void decode_swap_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ /*
+ * According to the ARM(R) Manual, if Rd is PC then
+ * the result is unpredictable. Don't do anything
+ * here. Just return.
+ */
+}
+
+
+/*
+ * Decode all load/store multiple instructions
+ */
+static void decode_lsm_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ /*
+ * Only support direct load multiples where the PC is in the
+ * register list.
+ *
+ * According to the ARM(R) manual, automatic updates of the PC
+ * are UNPREDICTABLE (ie implementation defined).
+ */
+ if ((inst.lsm.L_bit == LS_LOAD) && (inst.lsm.Reg_List & (0x1 << REG_PC)))
+ {
+ unsigned char *regs_array = (unsigned char *)regs;
+ unsigned char *Rn_ptr = &regs_array[bsp_regbyte(inst.lsm.Rn)];
+ unsigned long Rn_val = *((unsigned long *)(Rn_ptr));
+ unsigned long offset_to_pc = 0;
+ int i;
+ unsigned long **dest = 0;
+
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("Decoded an load multiple instruction.\n");
+ bsp_printf("inst.lsm.Reg_List = 0x%x\n", inst.lsm.Reg_List);
+
+ bsp_printf("inst.lsm.Rn = 0x%x\n", inst.lsm.Rn);
+ bsp_printf("inst.lsm.L_bit = 0x%x\n", inst.lsm.L_bit);
+ bsp_printf("inst.lsm.W_bit = 0x%x\n", inst.lsm.W_bit);
+ bsp_printf("inst.lsm.S_bit = 0x%x\n", inst.lsm.S_bit);
+ bsp_printf("inst.lsm.U_bit = 0x%x\n", inst.lsm.U_bit);
+ bsp_printf("inst.lsm.P_bit = 0x%x\n", inst.lsm.P_bit);
+ bsp_printf("inst.lsm.rsv1 = 0x%x\n", inst.lsm.rsv1);
+ bsp_printf("inst.lsm.cond = 0x%x\n", inst.lsm.cond);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+
+ if (inst.lsm.U_bit == 0)
+ {
+ /*
+ * We are using a ascending stack.
+ * That means the PC is actually the register
+ * nearest to Rn currently.
+ */
+ if (inst.lsm.P_bit == 1)
+ /*
+ * Using a pre-decrement.
+ */
+ offset_to_pc = -bsp_regsize(REG_PC);
+ else
+ offset_to_pc = 0;
+ } else {
+ /*
+ * We are using an descending stack.
+ * That means the PC is actually the register
+ * farthest from Rn currently.
+ *
+ * Find the number of registers stored before the PC
+ */
+ for (i = 0; i < REG_PC; i++)
+ {
+ if ((inst.lsm.Reg_List & (0x1 << i)) != 0)
+ {
+ /*
+ * Bit #i is set. Increment our count.
+ */
+ offset_to_pc += bsp_regsize(i);
+ }
+ }
+
+ /*
+ * Adjust the offset if we do a decrement/increment __BEFORE__
+ * the write.
+ */
+ if (inst.lsm.P_bit == 1)
+ offset_to_pc += bsp_regsize(REG_PC);
+ }
+
+ /*
+ * Now let's calculate the real address of the stored PC
+ * making sure to mask out the two LO bits.
+ */
+ dest = (unsigned long **)((Rn_val + offset_to_pc) & ~0x3);
+
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("Rn_val = 0x%08lx\n", Rn_val);
+ bsp_printf("offset_to_pc = 0x%08lx\n", offset_to_pc);
+ bsp_printf("dest = 0x%08lx\n", dest);
+ bsp_printf("*dest = 0x%08lx\n", *dest);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+
+ insert_ss_break(*dest);
+ }
+}
+
+
+/*
+ * Decode all coprocessor data processing instructions
+ */
+static void decode_cpdp_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ /*
+ * Can't possibly predict what this instruction will do.
+ * Don't do anything here. Just return.
+ */
+}
+
+
+/*
+ * Decode all coprocessor register transfer instructions
+ */
+static void decode_cprt_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ /*
+ * Can't possibly predict what this instruction will do.
+ * Don't do anything here. Just return.
+ */
+}
+
+
+/*
+ * Decode all coprocessor load/store instructions
+ */
+static void decode_cpls_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ /*
+ * Can't possibly predict what this instruction will do.
+ * Don't do anything here. Just return.
+ */
+}
+
+
+/*
+ * Decode all branch/branch w/ link instructions
+ */
+static void decode_bbl_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ unsigned long disp = inst.bbl.offset;
+
+ /*
+ * Sign extend the 24 bit value
+ */
+ if (disp & 0x00800000)
+ disp |= 0xff000000;
+
+ /*
+ * Convert to long words
+ */
+ disp <<= 2;
+
+ /*
+ * Note: when the processor actually executes this instruction, the pc
+ * will point to the address of the current instruction + 8 because
+ * of the fetch/decode/execute cycle
+ */
+ disp += 8;
+
+ insert_ss_break((unsigned long *)(regs->_pc + disp));
+}
+
+
+/*
+ * Decode all swi instructions
+ */
+static void decode_swi_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ /*
+ * Can't possibly predict where we should set the breakpoint for this.
+ * Don't do anything here. Just return.
+ */
+}
+
+
+/*
+ * Decode all undefined instructions
+ */
+static void decode_undef_inst(ex_regs_t *regs, union arm_insn inst)
+{
+ /*
+ * Can't possibly predict what this instruction will do.
+ * Don't do anything here. Just return.
+ */
+}
+
+
+/*
+ * Set breakpoint instructions for single stepping.
+ */
+void
+bsp_singlestep_setup(void *registers)
+{
+ ex_regs_t *regs = (ex_regs_t *)registers;
+ union arm_insn inst;
+
+ if (bsp_memory_read((void*)(regs->_pc), 0, ARM_INST_SIZE * 8, 1, &(inst.word)) == 0)
+ {
+ /*
+ * Unable to read the instruction at the current address.
+ * Let's not do anything with this. We can't set breakpoints
+ * so let's get out now.
+ */
+ return;
+ }
+
+ /*
+ * Handle the simple case -- linear code
+ */
+ insert_ss_break((unsigned long *)(regs->_pc + ARM_INST_SIZE));
+
+ /*
+ * Now, we need to decode the instructions and figure out what
+ * they would do.
+ */
+ if ((inst.mrs.rsv1 == MRS_RSV1_VALUE) &&
+ (inst.mrs.rsv2 == MRS_RSV2_VALUE)) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("MRS type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_mrs_inst(regs, inst);
+ } else if ((inst.misr.rsv1 == MISR_RSV1_VALUE) &&
+ (inst.misr.rsv2 == MISR_RSV2_VALUE)) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("MISR type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_misr_inst(regs, inst);
+ } else if ((inst.mrsr.rsv1 == MRSR_RSV1_VALUE) &&
+ (inst.mrsr.rsv2 == MRSR_RSV2_VALUE) &&
+ (inst.mrsr.rsv3 == MRSR_RSV3_VALUE)) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("MRSR type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_mrsr_inst(regs, inst);
+ } else if (inst.dpi.rsv1 == DPI_RSV1_VALUE) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("DPI type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_dpi_inst(regs, inst);
+ } else if ((inst.bx.rsv1 == BX_RSV1_VALUE) &&
+ (inst.bx.rsv2 == BX_RSV2_VALUE)) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("BX type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_bx_inst(regs, inst);
+ } else if ((inst.dpis.rsv1 == DPIS_RSV1_VALUE) &&
+ (inst.dpis.rsv2 == DPIS_RSV2_VALUE)) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("DPIS type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_dpis_inst(regs, inst);
+ } else if ((inst.dprs.rsv1 == DPRS_RSV1_VALUE) &&
+ (inst.dprs.rsv2 == DPRS_RSV2_VALUE) &&
+ (inst.dprs.rsv3 == DPRS_RSV3_VALUE)) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("DPRS type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_dprs_inst(regs, inst);
+ } else if ((inst.m.rsv1 == M_RSV1_VALUE) &&
+ (inst.m.rsv2 == M_RSV2_VALUE)) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("M type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_m_inst(regs, inst);
+ } else if ((inst.ml.rsv1 == ML_RSV1_VALUE) &&
+ (inst.ml.rsv2 == ML_RSV2_VALUE)) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("ML type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_ml_inst(regs, inst);
+ } else if (inst.lsio.rsv1 == LSIO_RSV1_VALUE) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("LSIO type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_lsio_inst(regs, inst);
+ } else if ((inst.lsro.rsv1 == LSRO_RSV1_VALUE) &&
+ (inst.lsro.rsv2 == LSRO_RSV2_VALUE)) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("LSRO type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_lsro_inst(regs, inst);
+ } else if ((inst.lshwi.rsv1 == LSHWI_RSV1_VALUE) &&
+ (inst.lshwi.rsv2 == LSHWI_RSV2_VALUE) &&
+ (inst.lshwi.rsv3 == LSHWI_RSV3_VALUE) &&
+ (inst.lshwi.rsv4 == LSHWI_RSV4_VALUE)) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("LSHWI type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_lshwi_inst(regs, inst);
+ } else if ((inst.lshwr.rsv1 == LSHWR_RSV1_VALUE) &&
+ (inst.lshwr.rsv2 == LSHWR_RSV2_VALUE) &&
+ (inst.lshwr.rsv3 == LSHWR_RSV3_VALUE) &&
+ (inst.lshwr.rsv4 == LSHWR_RSV4_VALUE)) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("LSHWR type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_lshwr_inst(regs, inst);
+ } else if ((inst.swap.rsv1 == SWAP_RSV1_VALUE) &&
+ (inst.swap.rsv2 == SWAP_RSV2_VALUE) &&
+ (inst.swap.rsv3 == SWAP_RSV3_VALUE)) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("SWAP type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_swap_inst(regs, inst);
+ } else if (inst.lsm.rsv1 == LSM_RSV1_VALUE) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("LSM type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_lsm_inst(regs, inst);
+ } else if ((inst.cpdp.rsv1 == CPDP_RSV1_VALUE) &&
+ (inst.cpdp.rsv2 == CPDP_RSV2_VALUE)) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("CPDP type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_cpdp_inst(regs, inst);
+ } else if ((inst.cprt.rsv1 == CPRT_RSV1_VALUE) &&
+ (inst.cprt.rsv2 == CPRT_RSV2_VALUE)) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("CPRT type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_cprt_inst(regs, inst);
+ } else if (inst.cpls.rsv1 == CPLS_RSV1_VALUE) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("CPLS type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_cpls_inst(regs, inst);
+ } else if (inst.bbl.rsv1 == BBL_RSV1_VALUE) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("BBL type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_bbl_inst(regs, inst);
+ } else if (inst.swi.rsv1 == SWI_RSV1_VALUE) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("SWI type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_swi_inst(regs, inst);
+ } else if ((inst.undef.rsv1 == UNDEF_RSV1_VALUE) &&
+ (inst.undef.rsv2 == UNDEF_RSV2_VALUE)) {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("UNDEF type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ decode_undef_inst(regs, inst);
+ } else {
+#if DEBUG_SINGLESTEP_VERBOSE
+ bsp_printf("Unknown instruction type: 0x%08lx\n", inst.word);
+#endif /* DEBUG_SINGLESTEP_VERBOSE */
+ }
+}
+
+void
+bsp_skip_instruction(void *registers)
+{
+ ex_regs_t *regs = (ex_regs_t *)registers;
+ regs->_pc += ARM_INST_SIZE;
+}
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/bsp.h b/cesar/ecos/packages/cygmon/current/misc/bsp/bsp.h
new file mode 100644
index 0000000000..ce52e74c1f
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/bsp.h
@@ -0,0 +1,445 @@
+#ifndef __BSP_BSP_H__
+#define __BSP_BSP_H__
+//==========================================================================
+//
+// bsp.h
+//
+// Public interface to Red Hat BSP.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Public interface to Red Hat BSP.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#ifndef __ASSEMBLER__
+
+/* needed for _bsp_vsprintf() */
+#include <stdarg.h>
+
+/*
+ * Exception and interrupt handler type.
+ */
+#ifndef _BSP_HANDLER_T_DEFINED
+#define _BSP_HANDLER_T_DEFINED
+typedef int (*bsp_handler_t)(int __irq_nr, void *__regs);
+#endif // _BSP_HANDLER_T_DEFINED
+
+/*
+ * Vector descriptor. This is needed for chaining vectors. The interfaces use
+ * bsp_vec structure pointers instead of direct pointers to handlers. This
+ * puts the responsibility for allocating the bsp_vec structures on the
+ * caller, rather than the BSP code.
+ */
+typedef struct bsp_vec {
+ bsp_handler_t handler; /* pointer to actual ISR */
+ struct bsp_vec *next; /* for chaining */
+} bsp_vec_t;
+
+/*
+ * Valid op values for vector install routines.
+ */
+#define BSP_VEC_REPLACE 0
+#define BSP_VEC_CHAIN_FIRST 1
+#define BSP_VEC_CHAIN_LAST 2
+
+/*
+ * Valid kinds of vectors supported by vector install and remove
+ * routines.
+ */
+#define BSP_VEC_EXCEPTION 0
+#define BSP_VEC_INTERRUPT 1
+
+/*
+ * Routine to cause a breakpoint exception.
+ */
+extern void bsp_breakpoint(void);
+
+/*
+ * Dummy function whose address is the address of
+ * the breakpoint caused by calling bsp_breakpoint().
+ */
+extern void bsp_breakinsn(void);
+
+/*
+ * Enable given irq.
+ */
+extern void bsp_enable_irq(int __irq_nr);
+
+/*
+ * Disable given irq. Returns true if irq was enabled.
+ */
+extern int bsp_disable_irq(int __irq_nr);
+
+/*
+ * Remove given vector from vector chain.
+ */
+extern void bsp_remove_vec(int __vec_kind,
+ int __vec_nr,
+ bsp_vec_t *__vec);
+
+/*
+ * Install a vector chain.
+ *
+ * vec_kind may be BSP_VEC_EXCEPTION or BSP_VEC_INTERRUPT.
+ * vec_nr is the exception or interrupt number.
+ * op may be one of:
+ * BSP_VEC_REPLACE - replace existing chain.
+ * BSP_VEC_CHAIN_FIRST - install at head of chain.
+ * BSP_VEC_CHAIN_LAST - install at tail of chain.
+ *
+ */
+extern bsp_vec_t *bsp_install_vec(int __vec_kind,
+ int __vec_nr,
+ int __op,
+ bsp_vec_t *__vec);
+
+/*
+ * Install a debug handler.
+ * Returns old handler being replaced.
+ */
+extern bsp_handler_t bsp_install_dbg_handler(bsp_handler_t __new_handler);
+
+/*
+ * Sometimes it is desireable to call the debug handler directly. This routine
+ * accomplishes that. It is the responsibility of the caller to insure that
+ * interrupts are disabled before calling this routine.
+ */
+extern void bsp_invoke_dbg_handler(int __exc_nr, void *__regs);
+
+/*
+ * Install a 'kill' handler. This handler is called when debugger
+ * issues a kill command.
+ * Returns old handler being replaced.
+ */
+extern bsp_handler_t bsp_install_kill_handler(bsp_handler_t __new_handler);
+
+/*
+ * Architecure specific routine to prepare CPU to execute
+ * a single machine instruction.
+ */
+#ifndef USE_ECOS_HAL_SINGLESTEP
+extern void bsp_singlestep_setup(void *__saved_regs);
+#endif /* USE_ECOS_HAL_SINGLESTEP */
+
+/*
+ * Architecure specific routine to cleanup after a single-step
+ * completes.
+ */
+#ifndef USE_ECOS_HAL_SINGLESTEP
+extern void bsp_singlestep_cleanup(void *__saved_regs);
+#endif /* USE_ECOS_HAL_SINGLESTEP */
+
+/*
+ * Architecture specific routine to skip past the current machine instruction.
+ */
+#ifndef USE_ECOS_HAL_SINGLESTEP
+extern void bsp_skip_instruction(void *__saved_regs);
+#endif /* USE_ECOS_HAL_SINGLESTEP */
+
+/*
+ * Return byte offset within the saved register area of the
+ * given register.
+ */
+extern int bsp_regbyte(int __regno);
+
+/*
+ * Return size in bytes of given register.
+ */
+extern int bsp_regsize(int __regno);
+
+/*
+ * Setup the saved registered to establish the given Program Counter.
+ */
+#ifndef bsp_set_pc
+extern void bsp_set_pc(unsigned long __pc, void *__saved_regs);
+#endif
+
+/*
+ * Get the current Program Counter from the saved registers.
+ */
+#ifndef bsp_get_pc
+unsigned long bsp_get_pc(void *__saved_regs);
+#endif
+
+extern int bsp_memory_read(void *__addr, /* start addr of memory to read */
+ int __asid, /* address space id */
+ int __rsize, /* size of individual read ops */
+ int __nreads, /* number of read operations */
+ void *__buf); /* result buffer */
+
+extern int bsp_memory_write(void *__addr, /* start addr of memory to write */
+ int __asid, /* address space id */
+ int __wsize, /* size of individual write ops */
+ int __nwrites, /* number of write operations */
+ void *__buf); /* source buffer for write data */
+
+/*
+ * Architecture specific routines to read and write CPU registers.
+ */
+extern void bsp_set_register(int __regno, void *__saved_regs, void *__val);
+extern void bsp_get_register(int __regno, void *__saved_regs, void *__val);
+
+
+/*
+ * Architecture specific conversion of raw exception info into
+ * a signal value.
+ */
+#ifndef bsp_get_signal
+extern int bsp_get_signal(int __exc_nr, void *__saved_regs);
+#endif
+
+/* light-weight bsp printf to console port */
+extern void bsp_printf(const char *__fmt, ...);
+
+/* light-weight bsp printf to debug port */
+extern void bsp_dprintf(const char *__fmt, ...);
+
+/* bsp vsprintf */
+extern int bsp_vsprintf(char *__str, const char *__fmt, va_list __ap);
+
+/* bsp vprintf to console port */
+extern void bsp_vprintf(const char *__fmt, va_list __ap);
+
+/* bsp vprintf to debug port */
+extern void bsp_dvprintf(const char *__fmt, va_list __ap);
+
+/* bsp sprintf */
+extern void bsp_sprintf(char *str, const char *fmt, ...);
+
+#ifdef NDEBUG
+#define BSP_ASSERT(e) ((void)0)
+#else /* NDEBUG */
+extern void _bsp_assert(const char *, const int, const char *);
+#define BSP_ASSERT(e) ((e) ? (void)0 : _bsp_assert(__FILE__, __LINE__, #e))
+#endif /* NDEBUG */
+
+/*
+ * Functions for low-level console and debug i/o.
+ */
+extern void bsp_console_write(const char *__p, int __len);
+extern void bsp_console_putc(char __ch);
+extern int bsp_console_read(char *__p, int __len);
+extern int bsp_console_getc(void);
+extern void bsp_console_ungetc(char ch);
+extern void bsp_debug_write(const char *__p, int __len);
+extern int bsp_debug_read(char *__p, int __len);
+extern void bsp_debug_putc(char __ch);
+extern int bsp_debug_getc(void);
+extern void bsp_debug_ungetc(char ch);
+
+/*
+ * Disable interrupts for debug comm channel.
+ * Returns true if interrupts were previously enabled,
+ * false if interrupts were already disabled.
+ */
+extern int bsp_debug_irq_disable(void);
+extern void bsp_debug_irq_enable(void);
+
+/*
+ * Cache control functions. May be noops for architectures not
+ * supporting caches.
+ *
+ * The icache flush simply invalidates _at_least_ the range of
+ * addresses specified.
+ *
+ * The dcache flush writes back (if write-back cache) and invalidates
+ * _at_least_ the range of addresses specified.
+ *
+ */
+extern void bsp_flush_dcache(void *__p, int __nbytes);
+extern void bsp_flush_icache(void *__p, int __nbytes);
+
+/*
+ * Reset function. May be noops for architectures not
+ * supporting software reset.
+ */
+extern void bsp_reset(void);
+
+/*
+ * Generic data (board and CPU specific) handling
+ */
+extern void *bsp_cpu_data(void);
+extern void *bsp_board_data(void);
+
+/*
+ * List of board characteristics which can be read queried by BSP clients. These
+ * information IDs are passed to:
+ *
+ * int bsp_sysinfo(enum bsp_info_id id, ...);
+ *
+ * Some pieces of information may have more than one instance. For example, the
+ * BSP will likely have information on multiple memory regions. In those cases,
+ * a particular instance may be accessed using a small integer index argument.
+ *
+ * The following comments indicate what additional arguments are needed
+ * to access the specific information.
+ */
+enum bsp_info_id {
+ /*
+ * CPU and board names.
+ *
+ * err = bsp_sysinfo(BSP_INFO_PLATFORM,
+ * struct bsp_platform_info *result)
+ *
+ * err => zero if successful, -1 if unsupported.
+ */
+ BSP_INFO_PLATFORM,
+
+ /*
+ * Data, instruction, and secondary caches.
+ *
+ * err = bsp_sysinfo(BSP_INFO_[DIS]CACHE,
+ * struct bsp_cache_info *result)
+ *
+ * err => zero if successful, -1 if unsupported.
+ *
+ */
+ BSP_INFO_DCACHE,
+ BSP_INFO_ICACHE,
+ BSP_INFO_SCACHE,
+
+ /*
+ * Memory region info.
+ *
+ * err = bsp_sysinfo(BSP_INFO_MEMORY,
+ * int index,
+ * struct bsp_mem_info *result)
+ *
+ * err => zero if successful, -1 if invalid index.
+ *
+ * Caller should start index at zero, then increment index for subsequent
+ * calls until error return indicates no more memory regions.
+ */
+ BSP_INFO_MEMORY,
+
+ /*
+ * Communication channel info.
+ *
+ * err = bsp_sysinfo(BSP_INFO_COMM,
+ * int index,
+ * struct bsp_comm_info *result)
+ *
+ * err => zero if successful, -1 if invalid index.
+ *
+ * Caller should start index at zero, then increment index for subsequent
+ * calls until error return indicates no more comm channels.
+ */
+ BSP_INFO_COMM
+};
+
+
+/*
+ * Platform info.
+ */
+struct bsp_platform_info {
+ const char *cpu; /* CPU name*/
+ const char *board; /* board name */
+ const char *extra; /* extra info */
+};
+
+
+/*
+ * Cache size info.
+ */
+struct bsp_cachesize_info {
+ int size; /* total size in bytes */
+ short linesize; /* width of cacheline in bytes */
+ short ways; /* number of ways per line */
+};
+
+
+/*
+ * Memory region info.
+ * The BSP may describe multiple memory regions. For example,
+ * DRAM may be comprised of several non-contiguous regions.
+ * ROM and FLASH regions may also be described.
+ *
+ */
+struct bsp_mem_info {
+ void *phys_start; /* physical start address */
+ void *virt_start; /* virtual start address */
+ int virt_asid; /* some architectures also use an address space id */
+ long nbytes; /* length of region in bytes */
+ int kind; /* kind of memory */
+#define BSP_MEM_RAM 1
+#define BSP_MEM_FLASH 2
+#define BSP_MEM_ROM 3
+};
+
+
+struct bsp_comm_info {
+ char *name;
+ short kind;
+#define BSP_COMM_SERIAL 1
+#define BSP_COMM_ENET 2
+ short protocol;
+#define BSP_PROTO_NONE 0
+#define BSP_PROTO_UDP 1
+#define BSP_PROTO_TCP 2
+};
+
+
+extern int bsp_sysinfo(enum bsp_info_id __id, ...);
+
+/*
+ * Set or get active debug and console channels.
+ * Returns -1 if unsucessful.
+ * If the passed in __comm_id is -1, then the id of the current channel
+ * is returned.
+ */
+extern int bsp_set_debug_comm(int __comm_id);
+extern int bsp_set_console_comm(int __comm_id);
+
+/*
+ * Set or get the current baud rate of a serial comm channel.
+ * Returns -1 on if unsuccessful.
+ * If the given baud is -1, then the current baudrate is returned.
+ */
+extern int bsp_set_serial_baud(int __comm_id, int baud);
+
+#endif
+
+#endif // __BSP_BSP_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/breakpoint.c b/cesar/ecos/packages/cygmon/current/misc/bsp/common/breakpoint.c
new file mode 100644
index 0000000000..d893ce0b53
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/breakpoint.c
@@ -0,0 +1,97 @@
+//==========================================================================
+//
+// breakpoint.c
+//
+// Breakpoint generation.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Breakpoint generation.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#include <bsp/cpu.h>
+#include <bsp/bsp.h>
+
+#ifndef DEBUG_BREAKPOINT
+#define DEBUG_BREAKPOINT 0
+#endif
+
+#ifdef __ECOS__
+#include <cyg/hal/hal_arch.h>
+#endif /* __ECOS__ */
+
+/*
+ * Trigger a breakpoint exception.
+ */
+void
+bsp_breakpoint(void)
+{
+#if DEBUG_BREAKPOINT
+ bsp_printf("Before BP\n");
+#endif
+
+#ifdef __ECOS__
+# ifdef __NEED_UNDERSCORE__
+ HAL_BREAKPOINT(_bsp_breakinsn);
+# else
+ HAL_BREAKPOINT(bsp_breakinsn);
+# endif
+#else
+# ifdef __NEED_UNDERSCORE__
+ asm volatile (".globl _bsp_breakinsn\n"
+ "_bsp_breakinsn:\n");
+# else
+ asm volatile (".globl bsp_breakinsn\n"
+ "bsp_breakinsn:\n");
+# endif
+ BREAKPOINT();
+#endif
+
+#if DEBUG_BREAKPOINT
+ bsp_printf("After BP\n");
+#endif
+}
+
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/bsp.c b/cesar/ecos/packages/cygmon/current/misc/bsp/common/bsp.c
new file mode 100644
index 0000000000..6b77289b0e
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/bsp.c
@@ -0,0 +1,341 @@
+//==========================================================================
+//
+// bsp.c
+//
+// General BSP support.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: General BSP support.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#include <stdlib.h>
+#include <bsp/cpu.h>
+#include <bsp/bsp.h>
+#include "bsp_if.h"
+#include "gdb.h"
+
+#ifndef DEBUG_BSP_INIT
+#define DEBUG_BSP_INIT 0
+#endif
+
+struct bsp_comm_channel *_bsp_net_channel = NULL;
+
+/*
+ * This is the array of pointers to interrupt controller descriptors.
+ */
+static struct bsp_irq_controller *_bsp_ictrl_table[BSP_MAX_IRQ_CONTROLLERS];
+
+/*
+ * This is the array of second-level exception vectors.
+ */
+static bsp_vec_t *_bsp_exc_table[BSP_MAX_EXCEPTIONS];
+
+
+/*
+ * Debug (default exception) handler vector.
+ */
+bsp_handler_t _bsp_dbg_vector;
+
+
+static bsp_shared_t __bsp_shared = {
+ BSP_SHARED_DATA_VERSION, /* version */
+ (const struct bsp_irq_controller **)&_bsp_ictrl_table[0], /* __ictrl_table */
+ &_bsp_exc_table[0], /* __exc_table */
+ &_bsp_dbg_vector, /* __dbg_vector */
+ (bsp_handler_t)0, /* __kill_vector */
+ (struct bsp_comm_procs *)NULL, /* __console_procs */
+ (struct bsp_comm_procs *)NULL, /* __debug_procs */
+ (void (*)(void *, int ))NULL, /* __flush_dcache */
+ (void (*)(void *, int ))NULL, /* __flush_icache */
+ (void (*)(void ))NULL, /* __reset */
+ (void*)NULL, /* __cpu_data */
+ (void*)NULL /* __board_data */
+};
+
+
+static void
+default_cache_proc(void *p, int nbytes)
+{
+ /* do nothing */
+}
+
+
+static void
+default_reset_proc(void)
+{
+ /* do nothing */
+}
+
+
+static int
+find_comm_id(struct bsp_comm_procs *procs)
+{
+ int i;
+
+ for (i = 0; i < _bsp_num_comms; i++)
+ if (&_bsp_comm_list[i].procs == procs)
+ return i;
+
+ if (procs == &_bsp_net_channel->procs)
+ return _bsp_num_comms;
+
+ return -1;
+}
+
+
+/*
+ * Set or get active debug channel.
+ * Returns -1 if unsucessful.
+ * If the passed in comm id is -1, then the id of the current channel
+ * is returned.
+ */
+static int
+set_debug_comm(int id)
+{
+ struct bsp_comm_channel *chan;
+ struct bsp_comm_procs *procs;
+ int current_chan = find_comm_id(bsp_shared_data->__debug_procs);
+
+ if (id < 0)
+ return current_chan;
+
+ if (id > _bsp_num_comms)
+ return -1;
+
+ if (id == _bsp_num_comms && _bsp_net_channel == NULL)
+ return -1;
+
+ if (id == current_chan)
+ return 0;
+
+ /* Remove existing channel */
+ if ((procs = bsp_shared_data->__debug_procs) != NULL)
+ (*procs->__control)(procs->ch_data, COMMCTL_REMOVE_DBG_ISR);
+
+ /* Install new channel */
+ if (id == _bsp_num_comms)
+ chan = _bsp_net_channel;
+ else
+ chan = &_bsp_comm_list[id];
+ bsp_shared_data->__debug_procs = &chan->procs;
+ (*chan->procs.__control)(chan->procs.ch_data, COMMCTL_INSTALL_DBG_ISR);
+
+ return 0;
+}
+
+
+/*
+ * Set or get active console channel.
+ * Returns -1 if unsucessful.
+ * If the passed in comm id is -1, then the id of the current channel
+ * is returned.
+ */
+static int
+set_console_comm(int id)
+{
+ int current_chan = find_comm_id(bsp_shared_data->__console_procs);
+
+ if (id < 0)
+ return current_chan;
+
+ if (id > _bsp_num_comms)
+ return -1;
+
+ if (id == _bsp_num_comms && _bsp_net_channel == NULL)
+ return -1;
+
+ if (id == current_chan)
+ return 0;
+
+ /*
+ * Install new channel. If its the same as the debug channel,
+ * just clear the __console_procs and the bsp_console_*
+ * interface functions will take care of the rest.
+ */
+ if (id == _bsp_num_comms)
+ bsp_shared_data->__console_procs = &_bsp_net_channel->procs;
+ else
+ bsp_shared_data->__console_procs = &_bsp_comm_list[id].procs;
+
+ if (bsp_shared_data->__console_procs == bsp_shared_data->__debug_procs)
+ bsp_shared_data->__console_procs = NULL;
+
+ return 0;
+}
+
+
+/*
+ * Set or get the current baud rate of a serial comm channel.
+ * Returns -1 on if unsuccessful.
+ * If the given baud is -1, then the current baudrate is returned.
+ */
+int
+set_serial_baud(int id, int baud)
+{
+ struct bsp_comm_channel *chan;
+
+ if (id < 0 || id >= _bsp_num_comms)
+ return -1;
+
+ chan = &_bsp_comm_list[id];
+
+ if (chan->info.kind != BSP_COMM_SERIAL)
+ return -1;
+
+ if (baud == -1)
+ return (*chan->procs.__control)(chan->procs.ch_data,
+ COMMCTL_GETBAUD);
+
+ return (*chan->procs.__control)(chan->procs.ch_data,
+ COMMCTL_SETBAUD, baud);
+}
+
+/*
+ * Final initialization before calling main.
+ */
+void
+_bsp_init(void)
+{
+ struct bsp_comm_procs *com;
+ extern void __init_irq_controllers(void);
+
+ bsp_shared_data = &__bsp_shared;
+ _bsp_dbg_vector = (bsp_handler_t)_bsp_gdb_handler;
+ bsp_shared_data->__dbg_data = &_bsp_gdb_data;
+
+ bsp_shared_data->__flush_dcache = default_cache_proc;
+ bsp_shared_data->__flush_icache = default_cache_proc;
+
+ bsp_shared_data->__reset = default_reset_proc;
+
+ /*
+ * General BSP information access.
+ */
+ bsp_shared_data->__sysinfo = _bsp_sysinfo;
+
+ /*
+ * Setup comm port handlers.
+ */
+ bsp_shared_data->__set_debug_comm = set_debug_comm;
+ bsp_shared_data->__set_console_comm = set_console_comm;
+ bsp_shared_data->__set_serial_baud = set_serial_baud;
+
+ /*
+ * Very first thing is to initialize comm channels so
+ * we can have debug printfs working. None of this
+ * must rely on interrupts until interrupt controllers
+ * are initialized below.
+ */
+ _bsp_init_board_comm();
+
+ /*
+ * Assume first comm channel is the default.
+ */
+ bsp_shared_data->__debug_procs = &_bsp_comm_list[0].procs;
+
+ /*
+ * By default, console i/o goes through the debug channel.
+ * We indicate this by making the console i/o procs
+ * pointer NULL.
+ */
+ bsp_shared_data->__console_procs = NULL;
+
+ /*
+ * Install interrupt controllers.
+ */
+#if DEBUG_BSP_INIT
+ bsp_printf("Installing interrupt controllers...\n");
+#endif
+
+ _bsp_install_cpu_irq_controllers();
+ _bsp_install_board_irq_controllers();
+
+#if DEBUG_BSP_INIT
+ bsp_printf("Done installing interrupt controllers.\n");
+ bsp_printf("Initializing interrupt controllers...\n");
+#endif
+ /*
+ * Actually run the init routines for all installed
+ * interrupt controllers.
+ */
+ __init_irq_controllers();
+
+#if DEBUG_BSP_INIT
+ bsp_printf("Done initializing interrupt controllers.\n");
+ bsp_printf("CPU-specific initialization...\n");
+#endif
+
+ /*
+ * Final architecture specific initialization.
+ */
+ _bsp_cpu_init();
+
+#if DEBUG_BSP_INIT
+ bsp_printf("Done w/ CPU-specific initialization.\n");
+ bsp_printf("Board specific initialization...\n");
+#endif
+ /*
+ * Final board specific initialization.
+ */
+ _bsp_board_init();
+
+#if DEBUG_BSP_INIT
+ bsp_printf("Done w/ board specific initialization.\n");
+#endif
+
+ /*
+ * Now we can install the debug interrupt handler on the debug channel.
+ */
+ com = bsp_shared_data->__debug_procs;
+ (*com->__control)(com->ch_data, COMMCTL_INSTALL_DBG_ISR);
+
+
+ if (_bsp_net_channel != NULL) {
+ set_debug_comm(_bsp_num_comms);
+ set_console_comm(0);
+ }
+}
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/bsp_cache.c b/cesar/ecos/packages/cygmon/current/misc/bsp/common/bsp_cache.c
new file mode 100644
index 0000000000..c9a5907704
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/bsp_cache.c
@@ -0,0 +1,70 @@
+//==========================================================================
+//
+// bsp_cache.c
+//
+// BSP Cache Interfaces.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: BSP Cache Interfaces.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#include "bsp_if.h"
+
+void
+bsp_flush_dcache(void *p, int nbytes)
+{
+ bsp_shared_data->__flush_dcache(p, nbytes);
+}
+
+
+void
+bsp_flush_icache(void *p, int nbytes)
+{
+ bsp_shared_data->__flush_icache(p, nbytes);
+}
+
+
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/bsp_if.c b/cesar/ecos/packages/cygmon/current/misc/bsp/common/bsp_if.c
new file mode 100644
index 0000000000..9b13c824d6
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/bsp_if.c
@@ -0,0 +1,160 @@
+//==========================================================================
+//
+// bsp_if.c
+//
+// Miscellaneous BSP Interfaces.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Miscellaneous BSP Interfaces.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#include <bsp/bsp.h>
+#include "bsp_if.h"
+
+/*
+ * Install a debug handler.
+ * Returns old handler being replaced.
+ */
+bsp_handler_t
+bsp_install_dbg_handler(bsp_handler_t new_handler)
+{
+ bsp_handler_t old_handler;
+
+ old_handler = *bsp_shared_data->__dbg_vector;
+ *bsp_shared_data->__dbg_vector = new_handler;
+
+ return old_handler;
+}
+
+/*
+ * Sometimes it is desireable to call the debug handler directly. This routine
+ * accomplishes that. It is the responsibility of the caller to insure that
+ * interrupts are disabled before calling this routine.
+ */
+void
+bsp_invoke_dbg_handler(int exc_nr, void *regs)
+{
+ (*bsp_shared_data->__dbg_vector)(exc_nr, regs);
+}
+
+/*
+ * Install a 'kill' handler.
+ * Returns old handler being replaced.
+ */
+bsp_handler_t
+bsp_install_kill_handler(bsp_handler_t new_handler)
+{
+ bsp_handler_t old_handler;
+
+ old_handler = bsp_shared_data->__kill_vector;
+ bsp_shared_data->__kill_vector = new_handler;
+
+ return old_handler;
+}
+
+
+void *
+bsp_cpu_data(void)
+{
+ return bsp_shared_data->__cpu_data;
+}
+
+
+void *
+bsp_board_data(void)
+{
+ return bsp_shared_data->__board_data;
+}
+
+
+int
+bsp_sysinfo(enum bsp_info_id id, ...)
+{
+ int retval;
+ va_list ap;
+
+ va_start (ap, id);
+ retval = bsp_shared_data->__sysinfo(id, ap);
+ va_end(ap);
+ return retval;
+}
+
+int
+bsp_set_debug_comm(int id)
+{
+ return bsp_shared_data->__set_debug_comm(id);
+}
+
+int
+bsp_set_console_comm(int id)
+{
+ return bsp_shared_data->__set_console_comm(id);
+}
+
+int
+bsp_set_serial_baud(int id, int baud)
+{
+ return bsp_shared_data->__set_serial_baud(id, baud);
+}
+
+
+#if !defined(NDEBUG)
+
+void _bsp_assert(const char *file, const int line, const char *condition)
+{
+ bsp_printf("Assertion \"%s\" failed\n", condition);
+ bsp_printf("File \"%s\"\n", file);
+ bsp_printf("Line %d\n", line);
+#if defined(PORT_TOGGLE_DEBUG)
+ PORT_TOGGLE_DEBUG();
+#else
+ while(1) ;
+#endif /* defined(PORT_TOGGLE_DEBUG) */
+}
+
+#endif /* !defined(NDEBUG) */
+
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/bsp_if.h b/cesar/ecos/packages/cygmon/current/misc/bsp/common/bsp_if.h
new file mode 100644
index 0000000000..268b1965f3
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/bsp_if.h
@@ -0,0 +1,433 @@
+#ifndef __BSP_COMMON_BSP_IF_H__
+#define __BSP_COMMON_BSP_IF_H__
+//==========================================================================
+//
+// bsp_if.h
+//
+// BSP interface definitions.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: BSP interface definitions.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#include <bsp/bsp.h>
+
+/*
+ * Maximum number of interrupt controllers supported by
+ * this bsp.
+ */
+#define BSP_MAX_IRQ_CONTROLLERS 8
+
+#ifndef __ASSEMBLER__
+
+
+/*
+ * Interrupt controller abstraction.
+ * Each interrupt controller on a given board should be described using
+ * this data structure.
+ */
+struct bsp_irq_controller {
+ /*
+ * First and last irqs handled by this controller.
+ */
+ short first;
+ short last;
+
+ /*
+ * pointer to array of bsp_vec struct pointers. These are
+ * the heads of the linked list of ISRs for each irq handled
+ * by this controller.
+ */
+ bsp_vec_t **vec_list;
+
+ /*
+ * Pointer to initialization routine which is run once at boot time.
+ */
+ void (*init)(const struct bsp_irq_controller *__ic);
+
+ /*
+ * Pointer to routines used to disable and enable interrupts handled
+ * by this controller.
+ */
+ int (*disable)(const struct bsp_irq_controller *__ic,
+ int __irq_nr);
+ void (*enable)(const struct bsp_irq_controller *__ic,
+ int __irq_nr);
+};
+
+
+/*
+ * Board specific code needs to provide at least one communication channel
+ * for use as the debug and console (stdio) channel. For each channel,
+ * there must be a set of function vectors for the common BSP code to
+ * control the channel.
+ */
+struct bsp_comm_procs {
+ /*
+ * Implementation dependent data pointer passed to the following procs.
+ */
+ void *ch_data;
+
+ /*
+ * Write a buffer of the given length. All of buffer is sent before
+ * the write call returns.
+ */
+ void (*__write)(void *ch_data, const char *buf, int len);
+
+ /*
+ * Fill a buffer with up to the given length. Returns the actual number
+ * of characters read.
+ */
+ int (*__read)(void *ch_data, char *buf, int len);
+
+ /*
+ * Send a single character.
+ */
+ void (*__putc)(void *ch_data, char ch);
+
+ /*
+ * Read a single character. If no character is immediately available, will
+ * block until one becomes available.
+ */
+ int (*__getc)(void *ch_data);
+
+ /*
+ * Catchall comm port control.
+ */
+ int (*__control)(void *ch_data, int func, ...);
+
+ /*
+ * For serial ports, the control function may be used to set and get the
+ * current baud rate. Usage:
+ *
+ * err = (*__control)(COMMCTL_SETBAUD, int bits_per_second);
+ * err => Zero if successful, -1 if error.
+ *
+ * baud = (*__control)(COMMCTL_GETBAUD);
+ * baud => -1 if error, current baud otherwise.
+ */
+#define COMMCTL_SETBAUD 0
+#define COMMCTL_GETBAUD 1
+
+ /*
+ * Install and remove debugger interrupt handlers. These are the receiver
+ * interrupt routines which are used to change control from a running
+ * program to the debugger stub.
+ */
+#define COMMCTL_INSTALL_DBG_ISR 2
+#define COMMCTL_REMOVE_DBG_ISR 3
+
+ /*
+ * Disable comm port interrupt. Returns TRUE if interrupt was enabled,
+ * FALSE otherwise.
+ */
+#define COMMCTL_IRQ_DISABLE 4
+ /*
+ * Enable comm port interrupt.
+ */
+#define COMMCTL_IRQ_ENABLE 5
+};
+
+
+/*
+ * The board specific code uses this data structure to provide information
+ * about and procedure vectors for each supported communication channel.
+ * See _bsp_comm_list below.
+ */
+struct bsp_comm_channel {
+ struct bsp_comm_info info;
+ struct bsp_comm_procs procs;
+};
+
+
+/*
+ * Number to place in the version field. If structure is changed
+ * in a way which is not backwards compatible, this number should
+ * be incremented.
+ */
+#define BSP_SHARED_DATA_VERSION 2
+
+/*
+ * Clients of this BSP will need to have access to BSP functions and
+ * data structures. Because, the client and the BSP may not be linked
+ * together, a structure of vectors is used to gain this access. A
+ * pointer to this structure can be gotten via a syscall. This syscall
+ * is made automatically from within the crt0.o file.
+ */
+typedef struct {
+ int version; /* version number for future expansion */
+
+ /*
+ * Pointer to the array of pointers to interrupt controller descriptors.
+ */
+ const struct bsp_irq_controller **__ictrl_table;
+
+ /*
+ * Pointer to the array of exception vectors.
+ */
+ bsp_vec_t **__exc_table;
+
+ /*
+ * Pointer to debug handler vector.
+ */
+ bsp_handler_t *__dbg_vector;
+
+ /*
+ * User hook to catch debugger 'kill' command.
+ */
+ bsp_handler_t __kill_vector;
+
+ /*
+ * Vectored functions for console and debug i/o.
+ */
+ struct bsp_comm_procs *__console_procs;
+ struct bsp_comm_procs *__debug_procs;
+
+ /*
+ * Vectored cache control functions.
+ */
+ void (*__flush_dcache)(void *__p, int __nbytes);
+ void (*__flush_icache)(void *__p, int __nbytes);
+
+ /*
+ * Generic data pointers
+ */
+ void *__cpu_data;
+ void *__board_data;
+
+ /*
+ * General BSP information access.
+ * See bsp.h for details.
+ */
+ int (*__sysinfo)(enum bsp_info_id __id, va_list __ap);
+
+ /*
+ * Set or get active debug and console channels.
+ * Returns -1 if unsucessful.
+ * If the passed in __comm_id is -1, then the id of the current channel
+ * is returned.
+ */
+ int (*__set_debug_comm)(int __comm_id);
+ int (*__set_console_comm)(int __comm_id);
+
+ /*
+ * Set or get the current baud rate of a serial comm channel.
+ * Returns -1 on if unsuccessful.
+ * If the given baud is -1, then the current baudrate is returned.
+ */
+ int (*__set_serial_baud)(int __comm_id, int baud);
+
+ /*
+ * Debug agent data.
+ */
+ void *__dbg_data;
+
+ /*
+ * Reset function
+ * We want to avoid calling this with a trap since
+ * we may be calling it from SWI mode (in cygmon).
+ * That is problematic, as nested SWI's are not
+ * very good.
+ */
+ void (*__reset)(void);
+
+ /*
+ * TRUE if console interrupt detected during program output.
+ */
+ int __console_interrupt_flag;
+
+} bsp_shared_t;
+
+
+extern bsp_shared_t *bsp_shared_data;
+
+/*
+ * Platform info which may be overriden/modified by arch/board specific code.
+ */
+extern struct bsp_platform_info _bsp_platform_info;
+
+/*
+ * Cache info which may be overriden/modified by arch/board specific code.
+ */
+extern struct bsp_cachesize_info _bsp_dcache_info;
+extern struct bsp_cachesize_info _bsp_icache_info;
+extern struct bsp_cachesize_info _bsp_scache_info;
+
+/*
+ * Array of comm channel descriptors which must be provided by board specific
+ * code.
+ */
+extern struct bsp_comm_channel _bsp_comm_list[];
+
+/*
+ * Number of comm channel descriptors which must be provided by board specific
+ * code.
+ */
+extern int _bsp_num_comms;
+
+
+/*
+ * Array of memory region descriptors which must be provided by board specific
+ * code.
+ */
+extern struct bsp_mem_info _bsp_memory_list[];
+
+/*
+ * Number of memory region descriptors which must be provided by board specific
+ * code.
+ */
+extern int _bsp_num_mem_regions;
+
+/*
+ * In order to construct the above _bsp_memory_list, some board specific
+ * code may have to size RAM regions. To do this easily and reliably,
+ * the code needs to run from ROM before .bss and .data sections are
+ * initialized. This leads to the problem of where to store the results
+ * of the memory sizing tests. In this case, the _bsp_init_stack routine
+ * which sizes memory and sets up the stack will place the board-specific
+ * information on the stack and return with the stack pointer pointing to
+ * a pointer to the information. That is, addr_of_info = *(void **)sp.
+ * The architecture specific code will then copy that pointer to the
+ * _bsp_ram_info_ptr variable after initializing the .data and .bss sections.
+ */
+extern void *_bsp_ram_info_ptr;
+
+/*
+ * Generic bsp initialization. Called by low level startup code
+ */
+extern void _bsp_init(void);
+
+/*
+ * Initialize board communication in polling mode. This enables
+ * debugging printf for later initializations. Interrupts for
+ * comm channels may be set up later in _bsp_board_init().
+ */
+extern void _bsp_init_board_comm(void);
+
+/*
+ * Make generic BSP aware of CPU/MCU specific interrupt controllers.
+ */
+extern void _bsp_install_cpu_irq_controllers(void);
+
+/*
+ * Make generic BSP aware of board specific interrupt controllers.
+ */
+extern void _bsp_install_board_irq_controllers(void);
+
+/*
+ * Callback used by above two routines to install a single
+ * interrupt controller.
+ */
+extern void _bsp_install_irq_controller(const struct bsp_irq_controller *__ic);
+
+/*
+ * Generic exception dispatch routine. Usually called from asm-level
+ * exception handler to call vectors in vector chain for the given
+ * exception number. Stops traversing vector chain when a called
+ * vector returns a non-zero value. If no vector returns non-zero,
+ * a default error message and register dump is printed.
+ */
+extern int _bsp_exc_dispatch(int __exc_number, void *__regs);
+
+
+/*
+ * Architecture specific routine to dump register values.
+ */
+extern void _bsp_dump_regs(void *__regs);
+
+
+/*
+ * Generic syscall handler called by architecture specific handler.
+ * Returns non-zero if given 'func' number was handled by the generic
+ * code, zero otherwise. If handled, the syscall error is returned
+ * via the err_ptr.
+ */
+extern int _bsp_do_syscall(int __func,
+ long __arg1, long __arg2, long __arg3, long __arg4,
+ int *__err_ptr);
+
+
+extern void _bsp_cpu_init(void);
+extern void _bsp_board_init(void);
+
+
+/*
+ * General interface for getting certain BSP parameters.
+ * See bsp.h for details.
+ */
+extern int _bsp_sysinfo(enum bsp_info_id __id, va_list __ap);
+
+/*
+ * Called from comm channel when a connection to host is closed.
+ */
+extern void _bsp_dbg_connect_abort(void);
+
+
+/*
+ * Pointer to a network channel. NULL if no network channel
+ * exists.
+ */
+extern struct bsp_comm_channel *_bsp_net_channel;
+
+
+/*
+ * Formatted output primitive.
+ */
+extern void __vprintf(void (*putc_func)(char c), const char *fmt0, va_list ap);
+
+
+
+#endif /* !__ASSEMBLER__ */
+
+/*
+ * SYSCALL number to use to get pointer to above bsp_shared_t structure.
+ */
+#define BSP_GET_SHARED 0xbaad
+
+#endif // __BSP_COMMON_BSP_IF_H__
+
+
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/console-io.c b/cesar/ecos/packages/cygmon/current/misc/bsp/common/console-io.c
new file mode 100644
index 0000000000..ad0450a3d7
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/console-io.c
@@ -0,0 +1,140 @@
+//==========================================================================
+//
+// console-io.c
+//
+// BSP Console Channel Interfaces.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: BSP Console Channel Interfaces.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#include <stdlib.h>
+#include <bsp/bsp.h>
+#include "bsp_if.h"
+
+static unsigned char __console_ungetc;
+
+void
+bsp_console_write(const char *p, int len)
+{
+ struct bsp_comm_procs *com;
+
+ if ((com = bsp_shared_data->__console_procs) != NULL)
+ com->__write(com->ch_data, p, len);
+ else
+ bsp_debug_write(p, len);
+}
+
+
+int
+bsp_console_read(char *p, int len)
+{
+ struct bsp_comm_procs *com;
+
+ if (len <= 0)
+ return 0;
+
+ if ((com = bsp_shared_data->__console_procs) != NULL) {
+ if (__console_ungetc) {
+ *p = __console_ungetc;
+ __console_ungetc = 0;
+ return 1;
+ }
+ return com->__read(com->ch_data, p, len);
+ } else
+ return bsp_debug_read(p, len);
+}
+
+/*#define PRINTABLE_ONLY*/
+#ifdef PRINTABLE_ONLY
+#include <ctype.h>
+#endif /* PRINTABLE_ONLY */
+
+void
+bsp_console_putc(char ch)
+{
+ struct bsp_comm_procs *com;
+
+#ifdef PRINTABLE_ONLY
+ if ((!isprint(ch)) && (!isspace(ch)))
+ ch = '.';
+#endif /* PRINTABLE_ONLY */
+
+ if ((com = bsp_shared_data->__console_procs) != NULL)
+ com->__putc(com->ch_data, ch);
+ else
+ bsp_debug_putc(ch);
+}
+
+int
+bsp_console_getc(void)
+{
+ struct bsp_comm_procs *com;
+ int ch;
+
+ if ((com = bsp_shared_data->__console_procs) != NULL) {
+ if (__console_ungetc) {
+ ch = __console_ungetc;
+ __console_ungetc = 0;
+ return ch;
+ }
+ return com->__getc(com->ch_data);
+ } else
+ return bsp_debug_getc();
+}
+
+
+void
+bsp_console_ungetc(char ch)
+{
+ if (bsp_shared_data->__console_procs != NULL)
+ __console_ungetc = (unsigned char)ch;
+ else
+ bsp_debug_ungetc(ch);
+}
+
+
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/debug-io.c b/cesar/ecos/packages/cygmon/current/misc/bsp/common/debug-io.c
new file mode 100644
index 0000000000..6d66771dfe
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/debug-io.c
@@ -0,0 +1,142 @@
+//==========================================================================
+//
+// debug-io.c
+//
+// BSP Debug Channel Interfaces.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: BSP Debug Channel Interfaces.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#include <stdlib.h>
+#include <bsp/bsp.h>
+#include "bsp_if.h"
+
+static unsigned char __debug_ungetc;
+
+extern int stub_is_active;
+extern int __output_gdb_string (const char *str, int string_len);
+void
+bsp_debug_write(const char *p, int len)
+{
+ struct bsp_comm_procs *com = bsp_shared_data->__debug_procs;
+ if (stub_is_active) {
+ // We are running in 'GDB' mode
+ __output_gdb_string(p, len);
+ } else {
+ com->__write(com->ch_data, p, len);
+ }
+}
+
+
+int
+bsp_debug_read(char *p, int len)
+{
+ struct bsp_comm_procs *com = bsp_shared_data->__debug_procs;
+
+ if (len <= 0)
+ return 0;
+
+ if (__debug_ungetc) {
+ *p = __debug_ungetc;
+ __debug_ungetc = 0;
+ return 1;
+ }
+
+ return com->__read(com->ch_data, p, len);
+}
+
+
+void
+bsp_debug_putc(char ch)
+{
+ struct bsp_comm_procs *com = bsp_shared_data->__debug_procs;
+
+ com->__putc(com->ch_data, ch);
+}
+
+int
+bsp_debug_getc(void)
+{
+ struct bsp_comm_procs *com = bsp_shared_data->__debug_procs;
+ int ch;
+
+ if (__debug_ungetc) {
+ ch = __debug_ungetc;
+ __debug_ungetc = 0;
+ } else
+ ch = com->__getc(com->ch_data);
+
+ return ch;
+}
+
+
+void
+bsp_debug_ungetc(char ch)
+{
+ __debug_ungetc = (unsigned char)ch;
+}
+
+
+int
+bsp_debug_irq_disable(void)
+{
+ struct bsp_comm_procs *com = bsp_shared_data->__debug_procs;
+
+ return com->__control(com->ch_data, COMMCTL_IRQ_DISABLE);
+}
+
+
+void
+bsp_debug_irq_enable(void)
+{
+ struct bsp_comm_procs *com = bsp_shared_data->__debug_procs;
+
+ com->__control(com->ch_data, COMMCTL_IRQ_ENABLE);
+}
+
+
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/gdb-cpu.c b/cesar/ecos/packages/cygmon/current/misc/bsp/common/gdb-cpu.c
new file mode 100644
index 0000000000..610b6b5044
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/gdb-cpu.c
@@ -0,0 +1,61 @@
+//==========================================================================
+//
+// gdb-cpu.c
+//
+// Architecture specific support for GDB
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+#include <pkgconf/system.h>
+
+#ifdef CYGPKG_HAL_ARM
+#include "bsp/arm/gdb-cpu.c"
+#endif
+
+#ifdef CYGPKG_HAL_MIPS
+#include "bsp/mips/gdb-cpu.c"
+#endif
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/gdb-cpu.h b/cesar/ecos/packages/cygmon/current/misc/bsp/common/gdb-cpu.h
new file mode 100644
index 0000000000..75821cbae3
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/gdb-cpu.h
@@ -0,0 +1,65 @@
+#ifndef __BSP_COMMON_GDB_CPU_H__
+#define __BSP_COMMON_GDB_CPU_H__
+//==========================================================================
+//
+// gdb-cpu.h
+//
+// CPU specifics for GDB
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+#include <pkgconf/system.h>
+
+#ifdef CYGPKG_HAL_ARM
+#include "../arm/gdb-cpu.h"
+#endif
+
+#ifdef CYGPKG_HAL_MIPS
+#include "../mips/gdb-cpu.h"
+#endif
+
+#endif // __BSP_COMMON_GDB_CPU_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/gdb.h b/cesar/ecos/packages/cygmon/current/misc/bsp/common/gdb.h
new file mode 100644
index 0000000000..1ade0ff036
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/gdb.h
@@ -0,0 +1,103 @@
+#ifndef __BSP_COMMON_GDB_H__
+#define __BSP_COMMON_GDB_H__
+//==========================================================================
+//
+// gdb.h
+//
+// Definitions for GDB stub.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Definitions for GDB stub.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#include "gdb-cpu.h"
+#include <bsp/gdb-data.h>
+
+#ifndef DEBUG_STUB
+#define DEBUG_STUB 0
+#endif
+
+/*
+ * These need to match the same in devo/gdb/target.h
+ */
+#define TARGET_SIGNAL_INT 2
+#define TARGET_SIGNAL_ILL 4
+#define TARGET_SIGNAL_TRAP 5
+#define TARGET_SIGNAL_ABRT 6
+#define TARGET_SIGNAL_FPE 8
+#define TARGET_SIGNAL_BUS 10
+#define TARGET_SIGNAL_SEGV 11
+
+
+/*
+ * Socket to use for tcp/ip debug channel.
+ */
+#define GDB_TCP_SOCKET 1000
+
+
+#ifndef __ASSEMBLER__
+
+/* generic gdb protocol handler */
+extern void _bsp_gdb_handler(int exc_nr, void *saved_regs);
+extern gdb_data_t _bsp_gdb_data;
+
+
+/* start forming an outgoing gdb packet */
+/* if ack is true, prepend an ack character */
+extern void _gdb_pkt_start(int ack);
+
+/* Append data to packet using formatted string. */
+extern void _gdb_pkt_append(char *fmt, ...);
+
+/* Calculate checksum and append to end of packet. */
+extern void _gdb_pkt_end(void);
+
+/* Send the packet. Blocks waiting for ACK */
+extern void _gdb_pkt_send(void);
+#endif
+
+#endif //__BSP_COMMON_GDB_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/generic-mem.c b/cesar/ecos/packages/cygmon/current/misc/bsp/common/generic-mem.c
new file mode 100644
index 0000000000..53c1985aa4
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/generic-mem.c
@@ -0,0 +1,194 @@
+//==========================================================================
+//
+// generic-mem.c
+//
+// Generic support for safe memory read/write.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Generic support for safe memory read/write.
+// Description: Some targets may need to provide their own version.
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#include <stdlib.h>
+#include <setjmp.h>
+#include <bsp/bsp.h>
+
+typedef void (*moveproc_t)(void *s, void *d);
+
+static jmp_buf __errjmp;
+
+/*
+ * These are globals because we want them preserved
+ * across function calls.
+ */
+static bsp_handler_t __oldtrap;
+static int __done;
+
+
+static void
+move_8(void *src, void *dest)
+{
+ *(char *)dest = *(char *)src;
+}
+
+
+static void
+move_16(void *src, void *dest)
+{
+ *(short *)dest = *(short *)src;
+}
+
+
+static void
+move_32(void *src, void *dest)
+{
+ *(int *)dest = *(int *)src;
+}
+
+
+static int
+err_trap(int exc_nr, void *regs)
+{
+ longjmp(__errjmp, 1);
+}
+
+
+int
+bsp_memory_read(void *addr, /* start addr of memory to read */
+ int asid, /* address space id */
+ int rsize, /* size of individual read operation */
+ int nreads, /* number of read operations */
+ void *buf) /* result buffer */
+{
+ if (nreads <= 0)
+ return 0;
+
+ __oldtrap = bsp_install_dbg_handler(err_trap);
+
+ if (setjmp(__errjmp) == 0) {
+ moveproc_t move_mem;
+ int incr;
+ char *src, *dest;
+
+ switch (rsize) {
+ case 8:
+ move_mem = move_8;
+ incr = 1;
+ break;
+ case 16:
+ move_mem = move_16;
+ incr = 2;
+ break;
+ case 32:
+ move_mem = move_32;
+ incr = 4;
+ break;
+ default:
+ (void)bsp_install_dbg_handler(__oldtrap);
+ return 0;
+ }
+
+ src = addr;
+ dest = buf;
+
+ for (__done = 0; __done < nreads; __done++) {
+ move_mem(src, dest);
+ src += incr;
+ dest += incr;
+ }
+ }
+
+ (void)bsp_install_dbg_handler(__oldtrap);
+ return __done;
+}
+
+
+int bsp_memory_write(void *addr, /* start addr of memory to write */
+ int asid, /* address space id */
+ int wsize, /* size of individual write operation */
+ int nwrites, /* number of write operations */
+ void *buf) /* source buffer for write data */
+{
+ if (nwrites <= 0)
+ return 0;
+
+ __oldtrap = bsp_install_dbg_handler(err_trap);
+
+ if (setjmp(__errjmp) == 0) {
+ moveproc_t move_mem;
+ int incr;
+ char *src, *dest;
+
+ switch (wsize) {
+ case 8:
+ move_mem = move_8;
+ incr = 1;
+ break;
+ case 16:
+ move_mem = move_16;
+ incr = 2;
+ break;
+ case 32:
+ move_mem = move_32;
+ incr = 4;
+ break;
+ default:
+ (void)bsp_install_dbg_handler(__oldtrap);
+ return 0;
+ }
+
+ src = buf;
+ dest = addr;
+
+ for (__done = 0; __done < nwrites; __done++) {
+ move_mem(src, dest);
+ src += incr;
+ dest += incr;
+ }
+ }
+
+ (void)bsp_install_dbg_handler(__oldtrap);
+ return __done;
+}
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/hex-utils.c b/cesar/ecos/packages/cygmon/current/misc/bsp/common/hex-utils.c
new file mode 100644
index 0000000000..5cb2c4cb3a
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/hex-utils.c
@@ -0,0 +1,126 @@
+//==========================================================================
+//
+// hex-utils.c
+//
+// Utilities for dealing with hexadecimal strings.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#include <bsp/hex-utils.h>
+
+int
+__hex(char ch)
+{
+ if ((ch >= 'a') && (ch <= 'f')) return (ch-'a'+10);
+ if ((ch >= '0') && (ch <= '9')) return (ch-'0');
+ if ((ch >= 'A') && (ch <= 'F')) return (ch-'A'+10);
+ return (-1);
+}
+
+
+/*
+ * Convert the hex data in 'buf' into 'count' bytes to be placed in 'mem'.
+ * Returns a pointer to the character in mem AFTER the last byte written.
+ */
+char *
+__unpack_bytes_to_mem(char *buf, char *mem, int count)
+{
+ int i;
+ char ch;
+
+ for (i = 0; i < count; i++) {
+ ch = __hex(*buf++) << 4;
+ ch = ch + __hex(*buf++);
+ *mem++ = ch;
+ }
+ return(mem);
+}
+
+/*
+ * While finding valid hex chars, build an unsigned long int.
+ * Return number of hex chars processed.
+ */
+int
+__unpack_ulong(char **ptr, unsigned long *val)
+{
+ int numChars = 0;
+ int hexValue;
+
+ *val = 0;
+
+ while (**ptr) {
+ hexValue = __hex(**ptr);
+ if (hexValue >= 0) {
+ *val = (*val << 4) | hexValue;
+ numChars ++;
+ } else
+ break;
+ (*ptr)++;
+ }
+ return (numChars);
+}
+
+
+/*
+ * Unpack 'count' hex characters, forming them into a binary value.
+ * Return that value as an int. Adjust the source pointer accordingly.
+ */
+int
+__unpack_nibbles(char **ptr, int count)
+{
+ int value = 0;
+
+ while (--count >= 0) {
+ value = (value << 4) | __hex(**ptr);
+ (*ptr)++;
+ }
+ return value;
+}
+
+
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/printf.c b/cesar/ecos/packages/cygmon/current/misc/bsp/common/printf.c
new file mode 100644
index 0000000000..d8fdea131a
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/printf.c
@@ -0,0 +1,95 @@
+//==========================================================================
+//
+// printf.c
+//
+// Light-weight BSP printf.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Light-weight BSP printf.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#include <bsp/bsp.h>
+#include "bsp_if.h"
+
+
+void
+bsp_vprintf(const char *fmt, va_list ap)
+{
+ __vprintf(bsp_console_putc, fmt, ap);
+}
+
+
+void
+bsp_dvprintf(const char *fmt, va_list ap)
+{
+ __vprintf(bsp_debug_putc, fmt, ap);
+}
+
+
+void
+bsp_printf(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start (ap, fmt);
+ __vprintf(bsp_console_putc, fmt, ap);
+ va_end (ap);
+}
+
+
+void
+bsp_dprintf(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start (ap, fmt);
+ __vprintf(bsp_debug_putc, fmt, ap);
+ va_end (ap);
+}
+
+
+
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/shared-data.c b/cesar/ecos/packages/cygmon/current/misc/bsp/common/shared-data.c
new file mode 100644
index 0000000000..281a1032f0
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/shared-data.c
@@ -0,0 +1,59 @@
+//==========================================================================
+//
+// shared-data.c
+//
+// Declaration of bsp shared data pointer.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Declaration of bsp shared data pointer.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#include "bsp_if.h"
+
+bsp_shared_t *bsp_shared_data;
+
+
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/singlestep.c b/cesar/ecos/packages/cygmon/current/misc/bsp/common/singlestep.c
new file mode 100644
index 0000000000..04cbc0bec6
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/singlestep.c
@@ -0,0 +1,61 @@
+//==========================================================================
+//
+// singlestep.c
+//
+// Architecture specific single-step support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+#include <pkgconf/system.h>
+
+#ifdef CYGPKG_HAL_ARM
+#include "bsp/arm/singlestep.c"
+#endif
+
+#ifdef CYGPKG_HAL_MIPS
+#include "bsp/mips/singlestep.c"
+#endif
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/sprintf.c b/cesar/ecos/packages/cygmon/current/misc/bsp/common/sprintf.c
new file mode 100644
index 0000000000..b05645bd53
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/sprintf.c
@@ -0,0 +1,86 @@
+//==========================================================================
+//
+// sprintf.c
+//
+// Light-weight BSP sprintf.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Light-weight BSP sprintf.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#include <bsp/bsp.h>
+#include "bsp_if.h"
+
+static char *str_ptr;
+
+static void
+str_putc(char ch)
+{
+ *str_ptr++ = ch;
+}
+
+int
+bsp_vsprintf(char *str, const char *fmt, va_list ap)
+{
+ str_ptr = str;
+ __vprintf(str_putc, fmt, ap);
+ *str_ptr = '\0';
+ return str_ptr - str;
+}
+
+
+void
+bsp_sprintf(char *str, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start (ap, fmt);
+ bsp_vsprintf(str, fmt, ap);
+ va_end (ap);
+}
+
+
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/syscall.c b/cesar/ecos/packages/cygmon/current/misc/bsp/common/syscall.c
new file mode 100644
index 0000000000..120f722113
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/syscall.c
@@ -0,0 +1,218 @@
+//==========================================================================
+//
+// syscall.c
+//
+// Minimal generic syscall support.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Minimal generic syscall support.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#include <errno.h>
+#include <bsp/cpu.h>
+#include <bsp/bsp.h>
+#include "bsp_if.h"
+#include "syscall.h"
+
+/*
+ * read -- read bytes from the serial port. Ignore fd, since
+ * we only have stdin.
+ */
+static int
+sys_read(int fd, char *buf, int nbytes)
+{
+ int i = 0;
+
+ for (i = 0; i < nbytes; i++) {
+ *(buf + i) = bsp_console_getc();
+ if ((*(buf + i) == '\n') || (*(buf + i) == '\r')) {
+ (*(buf + i + 1)) = 0;
+ break;
+ }
+ }
+ return (i);
+}
+
+
+/*
+ * write -- write bytes to the serial port. Ignore fd, since
+ * stdout and stderr are the same. Since we have no filesystem,
+ * open will only return an error.
+ */
+static int
+sys_write(int fd, char *buf, int nbytes)
+{
+#define WBUFSIZE 256
+ char ch, lbuf[WBUFSIZE];
+ int i, tosend;
+
+ tosend = nbytes;
+
+ while (tosend > 0) {
+ for (i = 0; tosend > 0 && i < (WBUFSIZE-2); tosend--) {
+ ch = *buf++;
+ if (ch == '\n')
+ lbuf[i++] = '\r';
+ lbuf[i++] = ch;
+ }
+ bsp_console_write(lbuf, i);
+ }
+
+ return (nbytes);
+}
+
+
+/*
+ * open -- open a file descriptor. We don't have a filesystem, so
+ * we return an error.
+ */
+static int
+sys_open (const char *buf, int flags, int mode)
+{
+ return (-EIO);
+}
+
+
+/*
+ * close -- We don't need to do anything, but pretend we did.
+ */
+static int
+sys_close(int fd)
+{
+ return (0);
+}
+
+
+/*
+ * lseek -- Since a serial port is non-seekable, we return an error.
+ */
+static int
+sys_lseek(int fd, int offset, int whence)
+{
+#ifdef ESPIPE
+ return (-ESPIPE);
+#else
+ return (-EIO);
+#endif
+}
+
+
+/*
+ * Generic syscall handler.
+ *
+ * Returns 0 if syscall number is not handled by this
+ * module, 1 otherwise. This allows applications to
+ * extend the syscall handler by using exception chaining.
+ */
+int
+_bsp_do_syscall(int func, /* syscall function number */
+ long arg1, long arg2, /* up to four args. */
+ long arg3, long arg4,
+ int *retval) /* syscall return value */
+{
+ int err = 0;
+
+ switch (func) {
+
+ case SYS_read:
+ err = sys_read((int)arg1, (char *)arg2, (int)arg3);
+ break;
+
+ case SYS_write:
+ err = sys_write((int)arg1, (char *)arg2, (int)arg3);
+ break;
+
+ case SYS_open:
+ err = sys_open((const char *)arg1, (int)arg2, (int)arg3);
+ break;
+
+ case SYS_close:
+ err = sys_close((int)arg1);
+ break;
+
+ case SYS_lseek:
+ err = sys_lseek((int)arg1, (int)arg2, (int)arg3);
+ break;
+
+ case BSP_GET_SHARED:
+ *(bsp_shared_t **)arg1 = bsp_shared_data;
+ break;
+
+ case SYS_meminfo:
+ {
+ // Return the top and size of memory.
+ struct bsp_mem_info mem;
+ int i;
+ unsigned long u, totmem, topmem, numbanks;
+
+ i = totmem = topmem = numbanks = 0;
+ while (bsp_sysinfo(BSP_INFO_MEMORY, i++, &mem) == 0)
+ {
+ if (mem.kind == BSP_MEM_RAM)
+ {
+ numbanks++;
+ totmem += mem.nbytes;
+ u = (unsigned long)mem.virt_start + mem.nbytes;
+ if (u > topmem)
+ topmem = u;
+ }
+ }
+ *(unsigned long *)arg1 = totmem;
+ *(unsigned long *)arg2 = topmem;
+ *retval = numbanks;
+ }
+ return 1;
+ break;
+
+ default:
+ return 0;
+ }
+
+ *retval = err;
+ return 1;
+}
+
+
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/syscall.h b/cesar/ecos/packages/cygmon/current/misc/bsp/common/syscall.h
new file mode 100644
index 0000000000..00d555f559
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/syscall.h
@@ -0,0 +1,50 @@
+/* General use syscall.h file.
+ The more ports that use this file, the simpler sim/common/nltvals.def
+ remains. */
+
+#ifndef LIBGLOSS_SYSCALL_H
+#define LIBGLOSS_SYSCALL_H
+
+/* Note: This file may be included by assembler source. */
+
+/* These should be as small as possible to allow a port to use a trap type
+ instruction, which the system call # as the trap (the d10v for instance
+ supports traps 0..31). An alternative would be to define one trap for doing
+ system calls, and put the system call number in a register that is not used
+ for the normal calling sequence (so that you don't have to shift down the
+ arguments to add the system call number). Obviously, if these system call
+ numbers are ever changed, all of the simulators and potentially user code
+ will need to be updated. */
+
+/* There is no current need for the following: SYS_execv, SYS_creat, SYS_wait,
+ etc. etc. Don't add them. */
+
+/* These are required by the ANSI C part of newlib (excluding system() of
+ course). */
+#define SYS_exit 1
+#define SYS_open 2
+#define SYS_close 3
+#define SYS_read 4
+#define SYS_write 5
+#define SYS_lseek 6
+#define SYS_unlink 7
+#define SYS_getpid 8
+#define SYS_kill 9
+#define SYS_fstat 10
+/*#define SYS_sbrk 11 - not currently a system call, but reserved. */
+
+/* ARGV support. */
+#define SYS_argvlen 12
+#define SYS_argv 13
+
+/* These are extras added for one reason or another. */
+#define SYS_chdir 14
+#define SYS_stat 15
+#define SYS_chmod 16
+#define SYS_utime 17
+#define SYS_time 18
+
+#define SYS_interrupt 1000
+
+#define SYS_meminfo 1001
+#endif
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/sysinfo.c b/cesar/ecos/packages/cygmon/current/misc/bsp/common/sysinfo.c
new file mode 100644
index 0000000000..cc15801a10
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/sysinfo.c
@@ -0,0 +1,170 @@
+//==========================================================================
+//
+// sysinfo.c
+//
+// Interface for getting system information.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Interface for getting system information.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#include <stdlib.h>
+#include <bsp/bsp.h>
+#include "bsp_if.h"
+
+
+/*
+ * In order to construct the _bsp_memory_list, some board specific code
+ * may have to size RAM regions. To do this easily and reliably, the code
+ * needs to run from ROM before .bss and .data sections are initialized.
+ * This leads to the problem of where to store the results of the memory
+ * sizing tests. In this case, the _bsp_init_stack routine which sizes
+ * memory and sets up the stack will place the board-specific information
+ * on the stack and return with the stack pointer pointing to a pointer to
+ * the information. That is, addr_of_info = *(void **)sp. The architecture
+ * specific code will then copy that pointer to the _bsp_ram_info_ptr variable
+ * after initializing the .data and .bss sections.
+ */
+void *_bsp_ram_info_ptr;
+
+/*
+ * Name of CPU and board. Should be overridden by arch/board specific
+ * code.
+ */
+struct bsp_platform_info _bsp_platform_info = {
+ "Unknown", /* cpu name */
+ "Unknown", /* board name */
+ "" /* extra info */
+};
+
+
+/*
+ * Information about possible data cache. Should be overridden by
+ * by arch/board specific code.
+ */
+struct bsp_cachesize_info _bsp_dcache_info = {
+ 0, 0, 0
+};
+
+
+/*
+ * Information about possible instruction cache. Should be overridden by
+ * by arch/board specific code.
+ */
+struct bsp_cachesize_info _bsp_icache_info = {
+ 0, 0, 0
+};
+
+
+/*
+ * Information about possible secondary cache. Should be overridden by
+ * by arch/board specific code.
+ */
+struct bsp_cachesize_info _bsp_scache_info = {
+ 0, 0, 0
+};
+
+
+
+int
+_bsp_sysinfo(enum bsp_info_id id, va_list ap)
+{
+ int index, rval = 0;
+ void *p;
+
+ switch (id) {
+ case BSP_INFO_PLATFORM:
+ p = va_arg(ap, void *);
+ *(struct bsp_platform_info *)p = _bsp_platform_info;
+ break;
+
+ case BSP_INFO_DCACHE:
+ p = va_arg(ap, void *);
+ *(struct bsp_cachesize_info *)p = _bsp_dcache_info;
+ break;
+
+ case BSP_INFO_ICACHE:
+ p = va_arg(ap, void *);
+ *(struct bsp_cachesize_info *)p = _bsp_icache_info;
+ break;
+
+ case BSP_INFO_SCACHE:
+ p = va_arg(ap, void *);
+ *(struct bsp_cachesize_info *)p = _bsp_scache_info;
+ break;
+
+ case BSP_INFO_MEMORY:
+ index = va_arg(ap, int);
+ p = va_arg(ap, void *);
+
+ if (index >= 0 && index < _bsp_num_mem_regions)
+ *(struct bsp_mem_info *)p = _bsp_memory_list[index];
+ else
+ rval = -1;
+ break;
+
+ case BSP_INFO_COMM:
+ index = va_arg(ap, int);
+ p = va_arg(ap, void *);
+
+ if (index >= 0 && index < _bsp_num_comms)
+ *(struct bsp_comm_info *)p = _bsp_comm_list[index].info;
+ else if (index == _bsp_num_comms && _bsp_net_channel != NULL)
+ *(struct bsp_comm_info *)p = _bsp_net_channel->info;
+ else
+ rval = -1;
+ break;
+
+ default:
+ rval = -1;
+ }
+
+ return rval;
+}
+
+
+
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/common/vprintf.c b/cesar/ecos/packages/cygmon/current/misc/bsp/common/vprintf.c
new file mode 100644
index 0000000000..5d1a7e7d61
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/common/vprintf.c
@@ -0,0 +1,445 @@
+//==========================================================================
+//
+// vprintf.c
+//
+// Stripped down (no floating point) for debugging printf in ROMable BSP.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+/*
+ * Copyright (c) 1990, 1999 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Stripped down (no floating point) for debugging printf in ROMable BSP.
+ */
+#include <string.h>
+#include <stdarg.h>
+
+#define BUF 40
+
+#ifndef NULL
+#define NULL ((void *)0)
+#endif
+
+/*
+ * Macros for converting digits to letters and vice versa
+ */
+#define to_digit(c) ((c) - '0')
+#define is_digit(c) ((unsigned)to_digit(c) <= 9)
+#define to_char(n) ((n) + '0')
+
+/*
+ * Flags used during conversion.
+ */
+#define ALT 0x001 /* alternate form */
+#define HEXPREFIX 0x002 /* add 0x or 0X prefix */
+#define LADJUST 0x004 /* left adjustment */
+#define LONGDBL 0x008 /* long double; unimplemented */
+#define LONGINT 0x010 /* long integer */
+#define QUADINT 0x020 /* quad integer */
+#define SHORTINT 0x040 /* short integer */
+#define ZEROPAD 0x080 /* zero (as opposed to blank) pad */
+#define FPT 0x100 /* Floating point number */
+
+
+void
+__vprintf(void (*putc_func)(char c), const char *fmt0, va_list ap)
+{
+ char *fmt; /* format string */
+ int ch; /* character from fmt */
+ int n, m; /* handy integers (short term usage) */
+ char *cp; /* handy char pointer (short term usage) */
+ int flags; /* flags as above */
+ int width; /* width from format (%8d), or 0 */
+ int prec; /* precision from format (%.3d), or -1 */
+ char sign; /* sign prefix (' ', '+', '-', or \0) */
+ unsigned long _uquad;
+ enum {OCT, DEC, HEX} base; /* base for [diouxX] conversion */
+ int dprec; /* a copy of prec if [diouxX], 0 otherwise */
+ int realsz; /* field size expanded by dprec */
+ int size; /* size of converted field or string */
+ char *xdigs = NULL; /* digits for [xX] conversion */
+ char buf[BUF]; /* space for %c, %[diouxX], %[eEfgG] */
+ char ox[2]; /* space for 0x hex-prefix */
+
+#define PRINT(ptr, len) { \
+ for(n=0;n<(len);n++) { \
+ if((ptr)[n] == '\n') \
+ (*putc_func)('\r'); \
+ (*putc_func)((ptr)[n]); \
+ } \
+}
+
+#define PAD(howmany, with) { \
+ if ((n = (howmany)) > 0) { \
+ while (n--) \
+ (*putc_func)(with); \
+ } \
+}
+
+ /*
+ * To extend shorts properly, we need both signed and unsigned
+ * argument extraction methods.
+ */
+#define SARG() \
+ (flags&LONGINT ? va_arg(ap, long) : \
+ flags&SHORTINT ? (long)(short)va_arg(ap, int) : \
+ (long)va_arg(ap, int))
+
+#define UARG() \
+ (flags&LONGINT ? va_arg(ap, unsigned long) : \
+ flags&SHORTINT ? (unsigned long)(unsigned short)va_arg(ap, int) : \
+ (unsigned long)va_arg(ap, unsigned int))
+
+ fmt = (char *)fmt0;
+
+ /*
+ * Scan the format for conversions (`%' character).
+ */
+ for (;;) {
+ cp = fmt;
+ while (*fmt && *fmt != '%')
+ fmt++;
+ if ((m = fmt - cp) != 0) {
+ PRINT(cp, m);
+ }
+
+ if (*fmt)
+ fmt++; /* skip over '%' */
+ else
+ goto done;
+
+ flags = 0;
+ dprec = 0;
+ width = 0;
+ prec = -1;
+ sign = '\0';
+
+ rflag:
+ ch = *fmt++;
+ reswitch:
+ switch (ch) {
+ case ' ':
+ /*
+ * ``If the space and + flags both appear, the space
+ * flag will be ignored.''
+ * -- ANSI X3J11
+ */
+ if (!sign)
+ sign = ' ';
+ goto rflag;
+ case '#':
+ flags |= ALT;
+ goto rflag;
+ case '*':
+ /*
+ * ``A negative field width argument is taken as a
+ * - flag followed by a positive field width.''
+ * -- ANSI X3J11
+ * They don't exclude field widths read from args.
+ */
+ if ((width = va_arg(ap, int)) >= 0)
+ goto rflag;
+ width = -width;
+ /* FALLTHROUGH */
+ case '-':
+ flags |= LADJUST;
+ goto rflag;
+ case '+':
+ sign = '+';
+ goto rflag;
+ case '.':
+ if ((ch = *fmt++) == '*') {
+ n = va_arg(ap, int);
+ prec = n < 0 ? -1 : n;
+ goto rflag;
+ }
+ n = 0;
+ while (is_digit(ch)) {
+ n = 10 * n + to_digit(ch);
+ ch = *fmt++;
+ }
+ prec = n < 0 ? -1 : n;
+ goto reswitch;
+ case '0':
+ /*
+ * ``Note that 0 is taken as a flag, not as the
+ * beginning of a field width.''
+ * -- ANSI X3J11
+ */
+ flags |= ZEROPAD;
+ goto rflag;
+ case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ n = 0;
+ do {
+ n = 10 * n + to_digit(ch);
+ ch = *fmt++;
+ } while (is_digit(ch));
+ width = n;
+ goto reswitch;
+ case 'h':
+ flags |= SHORTINT;
+ goto rflag;
+ case 'l':
+ if (*fmt == 'l') {
+ fmt++;
+ flags |= QUADINT;
+ } else {
+ flags |= LONGINT;
+ }
+ goto rflag;
+ case 'c':
+ *(cp = buf) = va_arg(ap, int);
+ size = 1;
+ sign = '\0';
+ break;
+ case 'd':
+ case 'i':
+ _uquad = SARG();
+ if ((long) _uquad < 0)
+ {
+
+ _uquad = -_uquad;
+ sign = '-';
+ }
+ base = DEC;
+ goto number;
+ case 'o':
+ _uquad = UARG();
+ base = OCT;
+ goto nosign;
+ case 's':
+ if ((cp = va_arg(ap, char *)) == NULL)
+ cp = "(null)";
+ if (prec >= 0) {
+ /*
+ * can't use strlen; can only look for the
+ * NUL in the first `prec' characters, and
+ * strlen() will go further.
+ */
+ char *p = memchr(cp, 0, prec);
+
+ if (p != NULL) {
+ size = p - cp;
+ if (size > prec)
+ size = prec;
+ } else
+ size = prec;
+ } else
+ size = strlen(cp);
+ sign = '\0';
+ break;
+ case 'u':
+ _uquad = UARG();
+ base = DEC;
+ goto nosign;
+ case 'X':
+ xdigs = "0123456789ABCDEF";
+ goto hex;
+ case 'x':
+ xdigs = "0123456789abcdef";
+ hex: _uquad = UARG();
+ base = HEX;
+ /* leading 0x/X only if non-zero */
+ if (flags & ALT && _uquad != 0)
+ flags |= HEXPREFIX;
+
+ /* unsigned conversions */
+ nosign: sign = '\0';
+ /*
+ * ``... diouXx conversions ... if a precision is
+ * specified, the 0 flag will be ignored.''
+ * -- ANSI X3J11
+ */
+ number: if ((dprec = prec) >= 0)
+ flags &= ~ZEROPAD;
+
+ /*
+ * ``The result of converting a zero value with an
+ * explicit precision of zero is no characters.''
+ * -- ANSI X3J11
+ */
+ cp = buf + BUF;
+ if (_uquad != 0 || prec != 0) {
+ /*
+ * Unsigned mod is hard, and unsigned mod
+ * by a constant is easier than that by
+ * a variable; hence this switch.
+ */
+ switch (base) {
+ case OCT:
+ do {
+ *--cp = to_char(_uquad & 7);
+ _uquad >>= 3;
+ } while (_uquad);
+ /* handle octal leading 0 */
+ if (flags & ALT && *cp != '0')
+ *--cp = '0';
+ break;
+
+ case DEC:
+ /* many numbers are 1 digit */
+ while (_uquad >= 10) {
+ *--cp = to_char(_uquad % 10);
+ _uquad /= 10;
+ }
+ *--cp = to_char(_uquad);
+ break;
+
+ case HEX:
+ do {
+ *--cp = xdigs[_uquad & 15];
+ _uquad >>= 4;
+ } while (_uquad);
+ break;
+
+ default:
+ cp = "bug in vfprintf: bad base";
+ size = strlen(cp);
+ goto skipsize;
+ }
+ }
+ size = buf + BUF - cp;
+ skipsize:
+ break;
+ default: /* "%?" prints ?, unless ? is NUL */
+ if (ch == '\0')
+ goto done;
+ /* pretend it was %c with argument ch */
+ cp = buf;
+ *cp = ch;
+ size = 1;
+ sign = '\0';
+ break;
+ }
+
+ /*
+ * All reasonable formats wind up here. At this point, `cp'
+ * points to a string which (if not flags&LADJUST) should be
+ * padded out to `width' places. If flags&ZEROPAD, it should
+ * first be prefixed by any sign or other prefix; otherwise,
+ * it should be blank padded before the prefix is emitted.
+ * After any left-hand padding and prefixing, emit zeroes
+ * required by a decimal [diouxX] precision, then print the
+ * string proper, then emit zeroes required by any leftover
+ * floating precision; finally, if LADJUST, pad with blanks.
+ *
+ * Compute actual size, so we know how much to pad.
+ * size excludes decimal prec; realsz includes it.
+ */
+ realsz = dprec > size ? dprec : size;
+ if (sign)
+ realsz++;
+ else if (flags & HEXPREFIX)
+ realsz+= 2;
+
+ /* right-adjusting blank padding */
+ if ((flags & (LADJUST|ZEROPAD)) == 0)
+ PAD(width - realsz, ' ');
+
+ /* prefix */
+ if (sign) {
+ PRINT(&sign, 1);
+ } else if (flags & HEXPREFIX) {
+ ox[0] = '0';
+ ox[1] = ch;
+ PRINT(ox, 2);
+ }
+
+ /* right-adjusting zero padding */
+ if ((flags & (LADJUST|ZEROPAD)) == ZEROPAD)
+ PAD(width - realsz, '0');
+
+ /* leading zeroes from decimal precision */
+ PAD(dprec - size, '0');
+
+ /* the string or number proper */
+ PRINT(cp, size);
+
+ /* left-adjusting padding (always blank) */
+ if (flags & LADJUST)
+ PAD(width - realsz, ' ');
+ }
+ done:
+}
+
+
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/cpu.h b/cesar/ecos/packages/cygmon/current/misc/bsp/cpu.h
new file mode 100644
index 0000000000..66ea53a788
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/cpu.h
@@ -0,0 +1,71 @@
+#ifndef __BSP_CPU_H__
+#define __BSP_CPU_H__
+//==========================================================================
+//
+// cpu.h
+//
+// Architecture/processor specifics
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas, dmoseley
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+// Pick up architecture info
+
+#include <pkgconf/system.h>
+
+#ifdef CYGPKG_HAL_ARM
+#include "arm/cpu.h"
+#endif
+
+#ifdef CYGPKG_HAL_MIPS
+#include "mips/cpu.h"
+#endif
+
+#ifdef CYGPKG_HAL_MN10300
+#include "mn10300/cpu.h"
+#endif
+
+#endif // __BSP_CPU_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/dbg-threads-api.h b/cesar/ecos/packages/cygmon/current/misc/bsp/dbg-threads-api.h
new file mode 100644
index 0000000000..8eb1bd7582
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/dbg-threads-api.h
@@ -0,0 +1,148 @@
+#ifndef __BSP_DBG_THREADS_API_H__
+#define __BSP_DBG_THREADS_API_H__
+//==========================================================================
+//
+// dbg-threads-api.h
+//
+// <DESCRIPTION>
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose:
+// Description: These are the calls used to extract operating system
+// specific information used in supporting thread aware
+// debugging.
+// The Operating Environment being debugged needs to supply
+// these functions.
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#define has_thread_void 0
+#define has_thread_current 1
+#define has_thread_registers 2
+#define has_thread_reg_change 4
+#define has_thread_list 8
+#define has_thread_info 16
+
+typedef unsigned char threadref[8] ;
+
+struct dbg_capabilities
+{
+ unsigned long mask1;
+};
+
+/* fill in the list of thread aware capabilities */
+extern int dbg_thread_capabilities(struct dbg_capabilities *cbp);
+
+
+/* Fill in the identifier of the current thread */
+/* return 1 if defined, 0 if not defined */
+extern int dbg_currthread(threadref *varparm);
+
+/* get the first or next member of the list of known threads */
+extern int dbg_threadlist(int startflag,
+ threadref *lastthreadid,
+ threadref *next_thread);
+
+/* return 1 if next_threadid has been filled in with a value */
+/* return 0 if there are none or no more */
+
+/* The O.S can fill in the following information about a thread when queried.
+ The structure of thise strings is determined by the O.S.
+ It is display oriented, so figure out what the users need to see.
+ Nulls are OK but GDB will fill some not so meaningful data.
+ These pointers may be in the calles private structures, the info will
+ get copied immediatly after the call to retreive it.
+ */
+struct cygmon_thread_debug_info
+{
+ threadref thread_id ;
+ int context_exists ; /* To the point where examining its state,
+ registers and stack makes sense to GDB */
+ char * thread_display ; /* As shown in thread status window, name, state */
+ char * unique_thread_name ; /* human readable identifier, window label */
+ char * more_display ; /* more detailed info about thread.
+ priority, queuedepth, state, stack usage, statistics */
+} ;
+
+
+
+
+extern int dbg_threadinfo(threadref *threadid,
+ struct cygmon_thread_debug_info *info);
+
+/* Return 1 if threadid is defined and info copied, 0 otherwise */
+
+/* The O.S should fillin the array of registers using values from the
+saves context. The array MUST be in GDB register save order even if
+the saved context is different or smaller. Do not alter the values of
+registers which are NOT in the O.S. thread context. Their default values
+have already been assigned.
+*/
+
+extern int dbg_getthreadreg(threadref *osthreadid,
+ int regcount, /* count of registers in the array */
+ void * regval); /* fillin this array */
+
+
+/* The O.S. should scan through this list of registers which are in
+GDB order and the O.S. should replace the values of all registers
+which are defined in the saved context of thread or process identified
+by osthreadid. Return 0 if the threadis does not map to a known
+process or other error. Return 1 if the setting is successful. */
+
+extern int dbg_setthreadreg(threadref *osthreadid,
+ int regcount, /* number of registers */
+ void *regval) ;
+
+
+extern int dbg_scheduler(threadref *thread_id, int lock, int mode);
+
+/* --- EXCEPTION -
+ The O.S. does not provide this function , it calls this to specify the
+ location of the dbg_syscall vector
+ */
+extern void patch_dbg_syscalls(void * vector);
+
+#endif /* DBG_THREADS_API_INCLUDED */
+#endif // __BSP_DBG_THREADS_API_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/defs.h b/cesar/ecos/packages/cygmon/current/misc/bsp/defs.h
new file mode 100755
index 0000000000..cd39ac2455
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/defs.h
@@ -0,0 +1,112 @@
+#ifndef __BSP_DEFS_H__
+#define __BSP_DEFS_H__
+//==========================================================================
+//
+// defs.h
+//
+// Definitions of interest to Red Hat BSP.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Definitions of interest to Red Hat BSP.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#define BIT0 0x00000001
+#define BIT1 0x00000002
+#define BIT2 0x00000004
+#define BIT3 0x00000008
+#define BIT4 0x00000010
+#define BIT5 0x00000020
+#define BIT6 0x00000040
+#define BIT7 0x00000080
+#define BIT8 0x00000100
+#define BIT9 0x00000200
+#define BIT10 0x00000400
+#define BIT11 0x00000800
+#define BIT12 0x00001000
+#define BIT13 0x00002000
+#define BIT14 0x00004000
+#define BIT15 0x00008000
+#define BIT16 0x00010000
+#define BIT17 0x00020000
+#define BIT18 0x00040000
+#define BIT19 0x00080000
+#define BIT20 0x00100000
+#define BIT21 0x00200000
+#define BIT22 0x00400000
+#define BIT23 0x00800000
+#define BIT24 0x01000000
+#define BIT25 0x02000000
+#define BIT26 0x04000000
+#define BIT27 0x08000000
+#define BIT28 0x10000000
+#define BIT29 0x20000000
+#define BIT30 0x40000000
+#define BIT31 0x80000000
+
+#define SZ_1K 0x00000400
+#define SZ_2K 0x00000800
+#define SZ_4K 0x00001000
+#define SZ_8K 0x00002000
+#define SZ_16K 0x00004000
+#define SZ_32K 0x00008000
+#define SZ_64K 0x00010000
+#define SZ_128K 0x00020000
+#define SZ_256K 0x00040000
+#define SZ_512K 0x00080000
+#define SZ_1M 0x00100000
+#define SZ_2M 0x00200000
+#define SZ_4M 0x00400000
+#define SZ_8M 0x00800000
+#define SZ_16M 0x01000000
+#define SZ_32M 0x02000000
+#define SZ_64M 0x04000000
+#define SZ_128M 0x08000000
+#define SZ_256M 0x10000000
+#define SZ_512M 0x20000000
+#define SZ_1G 0x40000000
+
+#endif // __BSP_DEFS_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/gdb-data.h b/cesar/ecos/packages/cygmon/current/misc/bsp/gdb-data.h
new file mode 100644
index 0000000000..b4dce69e7c
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/gdb-data.h
@@ -0,0 +1,126 @@
+#ifndef __BSP_GDB_DATA_H__
+#define __BSP_GDB_DATA_H__
+//==========================================================================
+//
+// gdb-data.h
+//
+// Shared data specific to gdb stub.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Shared data specific to gdb stub.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#ifndef __ASSEMBLER__
+typedef int (*gdb_memproc_t)(void *__addr, /* start addr of memory to read/write */
+ int __asid, /* address space id */
+ int __size, /* size of individual read/write ops */
+ int __n, /* number of read/write operations */
+ void *__buf); /* result(read)/src(write) buffer */
+
+
+typedef void (*gdb_regproc_t)(int __regno, /* Register number */
+ void *__regs, /* pointer to saved regs */
+ void *__val); /* pointer to register value */
+
+
+typedef struct {
+ /*
+ * An application may override the standard BSP memory
+ * read and/or write routines with these hooks.
+ */
+ gdb_memproc_t __mem_read_hook;
+ gdb_memproc_t __mem_write_hook;
+
+ /*
+ * An application may override the standard BSP register
+ * access routines with these hooks.
+ */
+ gdb_regproc_t __reg_get_hook;
+ gdb_regproc_t __reg_set_hook;
+
+ /*
+ * An application may extend the gdb remote protocol by
+ * installing hooks to handle unknown general query and
+ * set packets ("q" pkts and 'Q' pkts) with these two hooks.
+ */
+ void (*__pkt_query_hook)(unsigned char *__pkt);
+ void (*__pkt_set_hook)(unsigned char *__pkt);
+
+ /*
+ * An application may also extend the gdb remote protocol
+ * by installing a hook to handle all unknown packets.
+ */
+ void (*__pkt_hook)(unsigned char *__pkt);
+
+ /*
+ * The above hooks for receiving packets will probably need
+ * a mechanism to respond. This vector is provided to allow
+ * an application to append data to the outgoing packet which
+ * will be sent after the above hooks are called.
+ *
+ * This vector uses a printf-like format string followed by
+ * some number of arguments.
+ */
+ void (*__pkt_append)(char *fmt, ...);
+
+ /*
+ * An application can read/write from/to gdb console
+ * through these vectors.
+ *
+ * NB: console read is not supported and will block forever.
+ */
+ int (*__console_read)(char *__buf, int len);
+ int (*__console_write)(char *__buf, int len);
+
+} gdb_data_t;
+
+
+extern gdb_data_t *__get_gdb_data(void);
+
+#endif /* __ASSEMBLER__ */
+
+#endif // __BSP_GDB_DATA_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/hex-utils.h b/cesar/ecos/packages/cygmon/current/misc/bsp/hex-utils.h
new file mode 100644
index 0000000000..12bf43a52c
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/hex-utils.h
@@ -0,0 +1,85 @@
+#ifndef __BSP_HEX_UTILS_H__
+#define __BSP_HEX_UTILS_H__
+//==========================================================================
+//
+// hex-utils.h
+//
+// Utilities for decoding hexadecimal encoded integers.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Utilities for decoding hexadecimal encoded integers.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#ifndef __ASSEMBLER__
+
+/*
+ * Convert a single hex character to its binary value.
+ * Returns -1 if given character is not a value hex character.
+ */
+extern int __hex(char ch);
+
+/*
+ * Convert the hex data in 'buf' into 'count' bytes to be placed in 'mem'.
+ * Returns a pointer to the character in mem AFTER the last byte written.
+ */
+extern char *__unpack_bytes_to_mem(char *buf, char *mem, int count);
+
+/*
+ * While finding valid hex chars, build an unsigned long int.
+ * Return number of hex chars processed.
+ */
+extern int __unpack_ulong(char **ptr, unsigned long *val);
+
+/*
+ * Unpack 'count' hex characters, forming them into a binary value.
+ * Return that value as an int. Adjust the source pointer accordingly.
+ */
+extern int __unpack_nibbles(char **ptr, int count);
+
+#endif
+
+#endif // __BSP_HEX_UTILS_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/mips/gdb-cpu.c b/cesar/ecos/packages/cygmon/current/misc/bsp/mips/gdb-cpu.c
new file mode 100644
index 0000000000..b539c7ee8d
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/mips/gdb-cpu.c
@@ -0,0 +1,53 @@
+//==========================================================================
+//
+// gdb-cpu.c
+//
+// CPU specific support for GDB stub.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dmoseley
+// Contributors: dmoseley
+// Date: 2000-06-07
+// Purpose: CPU specific support for GDB stub.
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+// Nothing now.
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/mips/gdb-cpu.h b/cesar/ecos/packages/cygmon/current/misc/bsp/mips/gdb-cpu.h
new file mode 100644
index 0000000000..fc68a42a52
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/mips/gdb-cpu.h
@@ -0,0 +1,58 @@
+#ifndef __BSP_MIPS_GDB_CPU_H__
+#define __BSP_MIPS_GDB_CPU_H__
+//==========================================================================
+//
+// gdb-cpu.h
+//
+// CPU specific definitions for GDB stub.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: dmoseley
+// Date: 2000-07-10
+// Purpose: CPU specific definitions for GDB stub.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+// Nothing now.
+
+#endif // __BSP_MIPS_GDB_CPU_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/mips/gdb.h b/cesar/ecos/packages/cygmon/current/misc/bsp/mips/gdb.h
new file mode 100644
index 0000000000..1218012153
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/mips/gdb.h
@@ -0,0 +1,58 @@
+#ifndef __BSP_MIPS_GDB_H__
+#define __BSP_MIPS_GDB_H__
+//==========================================================================
+//
+// gdb.h
+//
+//
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+// Nothing now.
+
+#endif // __BSP_ARM_GDB_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/mips/insn.h b/cesar/ecos/packages/cygmon/current/misc/bsp/mips/insn.h
new file mode 100755
index 0000000000..e6cedeaf94
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/mips/insn.h
@@ -0,0 +1,59 @@
+#ifndef __BSP_MIPS_INSN_H__
+#define __BSP_MIPS_INSN_H__
+//==========================================================================
+//
+// insn.h
+//
+// MIPS instruction descriptions.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dmoseley
+// Contributors: dmoseley
+// Date: 2000-07-10
+// Purpose: MIPS instruction descriptions.
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+// Nothing now.
+// We are using the eCos hal for single-stepping.
+// FIXME: this file can be removed
+
+#endif // __BSP_ARM_INSN_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/mips/singlestep.c b/cesar/ecos/packages/cygmon/current/misc/bsp/mips/singlestep.c
new file mode 100644
index 0000000000..b57e73c1d1
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/mips/singlestep.c
@@ -0,0 +1,55 @@
+//==========================================================================
+//
+// singlestep.c
+//
+// MIPS specific single-step support.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dmoseley
+// Contributors: dmoseley
+// Date: 2000-07-10
+// Purpose: MIPS specific single-step support.
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+// Nothing now.
+// We are using the eCos hal for single-stepping.
+// FIXME: this file can be removed
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/gdb-cpu.c b/cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/gdb-cpu.c
new file mode 100644
index 0000000000..ce92d11e2d
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/gdb-cpu.c
@@ -0,0 +1,53 @@
+//==========================================================================
+//
+// gdb-cpu.c
+//
+// CPU specific support for GDB stub.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dmoseley
+// Contributors: dmoseley
+// Date: 2000-08-11
+// Purpose: CPU specific support for GDB stub.
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+// Nothing now.
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/gdb-cpu.h b/cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/gdb-cpu.h
new file mode 100644
index 0000000000..87d617985d
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/gdb-cpu.h
@@ -0,0 +1,58 @@
+#ifndef __BSP_MN10300_GDB_CPU_H__
+#define __BSP_MN10300_GDB_CPU_H__
+//==========================================================================
+//
+// gdb-cpu.h
+//
+// CPU specific definitions for GDB stub.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dmoseley
+// Contributors: dmoseley
+// Date: 2000-08-11
+// Purpose: CPU specific definitions for GDB stub.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+// Nothing now.
+
+#endif // __BSP_MN10300_GDB_CPU_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/gdb.h b/cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/gdb.h
new file mode 100644
index 0000000000..6b580e9765
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/gdb.h
@@ -0,0 +1,58 @@
+#ifndef __BSP_MN10300_GDB_H__
+#define __BSP_MN10300_GDB_H__
+//==========================================================================
+//
+// gdb.h
+//
+//
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dmoseley
+// Contributors: dmoseley
+// Date: 2000-08-11
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+// Nothing now.
+
+#endif // __BSP_ARM_GDB_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/insn.h b/cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/insn.h
new file mode 100644
index 0000000000..3a29fc708c
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/insn.h
@@ -0,0 +1,59 @@
+#ifndef __BSP_MN10300_INSN_H__
+#define __BSP_MN10300_INSN_H__
+//==========================================================================
+//
+// insn.h
+//
+// MN10300 instruction descriptions.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dmoseley
+// Contributors: dmoseley
+// Date: 2000-08-11
+// Purpose: MN10300 instruction descriptions.
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+// Nothing now.
+// We are using the eCos hal for single-stepping.
+// FIXME: this file can be removed
+
+#endif // __BSP_ARM_INSN_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/singlestep.c b/cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/singlestep.c
new file mode 100644
index 0000000000..1273f5a823
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/bsp/mn10300/singlestep.c
@@ -0,0 +1,55 @@
+//==========================================================================
+//
+// singlestep.c
+//
+// MN10300 specific single-step support.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dmoseley
+// Contributors: dmoseley
+// Date: 2000-08-11
+// Purpose: MN10300 specific single-step support.
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+// Nothing now.
+// We are using the eCos hal for single-stepping.
+// FIXME: this file can be removed
diff --git a/cesar/ecos/packages/cygmon/current/misc/cpu-mon.c b/cesar/ecos/packages/cygmon/current/misc/cpu-mon.c
new file mode 100644
index 0000000000..43cbb4f002
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/cpu-mon.c
@@ -0,0 +1,61 @@
+//==========================================================================
+//
+// cpu-mon.c
+//
+// eCos BSP (for building Cygmon)
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas, dmoseley
+// Date: 1999-10-11
+// Description: Architecture support for Cygmon
+//####DESCRIPTIONEND####
+
+#include <pkgconf/system.h> // Configuration header
+
+#ifdef CYGPKG_HAL_ARM
+#include "arm/arm-mon.c"
+#endif
+
+#ifdef CYGPKG_HAL_MIPS
+#include "mips/mips-mon.c"
+#endif
+
+#ifdef CYGPKG_HAL_MN10300
+#include "mn10300/mn10300-mon.c"
+#endif
diff --git a/cesar/ecos/packages/cygmon/current/misc/cpu_info.h b/cesar/ecos/packages/cygmon/current/misc/cpu_info.h
new file mode 100644
index 0000000000..1a1700ac09
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/cpu_info.h
@@ -0,0 +1,69 @@
+#ifndef __CYGMON_CPU_INFO_H__
+#define __CYGMON_CPU_INFO_H__
+//==========================================================================
+//
+// cpu_info.h
+//
+// Architecture specific information
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas, dmoseley
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+
+#ifdef CYGPKG_HAL_ARM
+#include "arm/cpu_info.h"
+#endif
+
+#ifdef CYGPKG_HAL_MIPS
+#include "mips/cpu_info.h"
+#endif
+
+#ifdef CYGPKG_HAL_MN10300
+#include "mn10300/cpu_info.h"
+#endif
+#endif // __CYGMON_CPU_INFO_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/ecos_bsp.c b/cesar/ecos/packages/cygmon/current/misc/ecos_bsp.c
new file mode 100644
index 0000000000..f6ee0fcd2f
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/ecos_bsp.c
@@ -0,0 +1,470 @@
+//==========================================================================
+//
+// ecos_bsp.c
+//
+// eCos BSP (for building Cygmon)
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas, dmoseley
+// Date: 1999-10-11
+// Description: Wrapper functions which provide BSP environment for Cygmon
+//####DESCRIPTIONEND####
+
+#ifdef CYGPKG_KERNEL
+#include <pkgconf/kernel.h> // Configuration headers
+#endif
+#include <pkgconf/hal.h>
+#include <pkgconf/cygmon.h>
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_cache.h>
+#ifdef CYGPKG_KERNEL
+#include <cyg/kernel/kapi.h>
+#else
+#include <cyg/hal/drv_api.h>
+#include <cyg/hal/hal_intr.h>
+#endif
+#include <cyg/infra/diag.h>
+#include "bsp/common/bsp_if.h"
+#include <cyg/hal/hal_if.h>
+#include <signal.h>
+#include CYGHWR_MEMORY_LAYOUT_H
+
+#include <pkgconf/system.h>
+#ifdef CYGPKG_IO
+#include <cyg/io/io.h>
+#include <cyg/io/serialio.h>
+#endif
+
+#define STACK_SIZE CYGNUM_HAL_STACK_SIZE_MINIMUM
+static char stack[STACK_SIZE];
+#ifdef CYGPKG_KERNEL
+static cyg_thread thread_data;
+static cyg_handle_t thread_handle;
+#endif
+
+char *build_date = __DATE__;
+
+extern void monitor_main(int, char *);
+extern int stub_is_active;
+
+void ecos_bsp_set_memsize(unsigned long size);
+
+void
+cygmon_main(void)
+{
+ _bsp_init();
+ monitor_main(0, 0); // Null argument list
+}
+
+extern unsigned long cygmon_memsize;
+
+externC void
+cyg_start( void )
+{
+ // Fill in the BSP memory info
+ if (cygmon_memsize != 0)
+ ecos_bsp_set_memsize(cygmon_memsize);
+
+#ifdef CYGPKG_KERNEL
+ // Create a main thread, so we can run the scheduler and have time 'pass'
+ cyg_thread_create(10, // Priority - just a number
+ (cyg_thread_entry_t*)cygmon_main, // entry
+ 0, // entry parameter
+ "Cygmon", // Name
+ &stack[0], // Stack
+ STACK_SIZE, // Size
+ &thread_handle, // Handle
+ &thread_data // Thread data structure
+ );
+ cyg_thread_resume(thread_handle); // Start it
+ cyg_scheduler_start();
+#else
+#ifdef HAL_ARCH_FUNCALL_NEW_STACK
+ HAL_ARCH_FUNCALL_NEW_STACK(cygmon_main, &stack[0], STACK_SIZE);
+#else
+ #error Need to define HAL_ARCH_FUNCALL_NEW_STACK
+#endif
+#endif
+} // cyg_package_start()
+
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+extern void *_hal_registers; // Used by eCos GDB stubs
+extern void (*__init_vec)(void);
+extern void (*__cleanup_vec)(void);
+extern void __install_traps(void);
+#endif
+
+extern int machine_syscall(HAL_SavedRegisters *regs);
+void
+_bsp_handle_exception(cyg_addrword_t data, cyg_code_t num, cyg_addrword_t info)
+{
+ if (num == CYGNUM_HAL_EXCEPTION_INTERRUPT) {
+ if (machine_syscall((HAL_SavedRegisters*)info)) {
+ return;
+ }
+ // Fall through to "normal" exception handling if system call failed
+ }
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+ _hal_registers = (void *)info; // Used by eCos GDB stubs
+ __cleanup_vec();
+#endif
+ bsp_invoke_dbg_handler(num, (void *)info);
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+ __init_vec();
+#endif
+}
+
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+extern void __handle_exception(void);
+#else
+
+int
+unhandled_exception(int num, void *args)
+{
+ diag_printf("Unhandled exception: %d/%x\n", num, args);
+ while (1) ;
+}
+#endif
+
+void
+_bsp_cpu_init(void)
+{
+#ifdef CYGPKG_KERNEL
+ int d0;
+ cyg_exception_set_handler(CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION,
+ _bsp_handle_exception,
+ (cyg_addrword_t)&d0,
+ 0,
+ 0);
+#endif
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+ bsp_install_dbg_handler((bsp_handler_t)__handle_exception);
+ __install_traps();
+#else
+ bsp_install_dbg_handler(unhandled_exception);
+#endif
+}
+
+#define FAIL() diag_printf("fail: %s\n", __FUNCTION__); while (1) ;
+
+#ifndef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+
+struct BSP_IO {
+ char *name;
+ cyg_io_handle_t chan;
+};
+
+static void
+uart_putchar(void *base, char c)
+{
+ char buf;
+ int len;
+ struct BSP_IO *io = (struct BSP_IO *)base;
+ if (io->chan) {
+ len = 1;
+ buf = c;
+ cyg_io_write(io->chan, &buf, &len);
+ }
+}
+
+extern int __output_gdb_string (const char *str, int string_len);
+
+// This function is mostly used by the 'write()' system call
+static void
+uart_write(void *base, const char *buf, int len)
+{
+ struct BSP_IO *io = (struct BSP_IO *)base;
+ if (io->chan) {
+ if (stub_is_active) {
+ // We are running in 'GDB' mode
+ __output_gdb_string(buf, len);
+ } else {
+ cyg_io_write(io->chan, buf, &len);
+ }
+ }
+}
+
+static int
+uart_read(void *base, char *buf, int len)
+{
+ struct BSP_IO *io = (struct BSP_IO *)base;
+ if (io->chan) {
+ cyg_io_read(io->chan, buf, &len);
+ return len;
+ }
+ return 0;
+}
+
+static int
+uart_getchar(void *base)
+{
+ char buf = '\0';
+ int len;
+ struct BSP_IO *io = (struct BSP_IO *)base;
+ if (io->chan) {
+ len = 1;
+ cyg_io_read(io->chan, &buf, &len);
+ }
+ return buf;
+}
+
+static int
+uart_control(void *base, int func, ...)
+{
+ int rc = 0;
+ va_list ap;
+ int arg;
+ struct BSP_IO *io = (struct BSP_IO *)base;
+
+ va_start(ap, func);
+
+ if (func == COMMCTL_SETBAUD)
+ {
+ cyg_serial_info_t buffer = {
+ CYG_SERIAL_BAUD_DEFAULT,
+ CYG_SERIAL_STOP_DEFAULT,
+ CYG_SERIAL_PARITY_DEFAULT,
+ CYG_SERIAL_WORD_LENGTH_DEFAULT,
+ CYG_SERIAL_FLAGS_DEFAULT
+ };
+ int len = sizeof(buffer);
+ arg = va_arg(ap, int);
+
+ switch (arg)
+ {
+ case 50: buffer.baud = CYG_SERIAL_BAUD_RATE(50); break;
+ case 75: buffer.baud = CYG_SERIAL_BAUD_RATE(75); break;
+ case 110: buffer.baud = CYG_SERIAL_BAUD_RATE(110); break;
+ case 134: buffer.baud = CYG_SERIAL_BAUD_RATE(134_5); break;
+ case 135: buffer.baud = CYG_SERIAL_BAUD_RATE(134_5); break;
+ case 150: buffer.baud = CYG_SERIAL_BAUD_RATE(150); break;
+ case 200: buffer.baud = CYG_SERIAL_BAUD_RATE(200); break;
+ case 300: buffer.baud = CYG_SERIAL_BAUD_RATE(300); break;
+ case 600: buffer.baud = CYG_SERIAL_BAUD_RATE(600); break;
+ case 1200: buffer.baud = CYG_SERIAL_BAUD_RATE(1200); break;
+ case 1800: buffer.baud = CYG_SERIAL_BAUD_RATE(1800); break;
+ case 2400: buffer.baud = CYG_SERIAL_BAUD_RATE(2400); break;
+ case 3600: buffer.baud = CYG_SERIAL_BAUD_RATE(3600); break;
+ case 4800: buffer.baud = CYG_SERIAL_BAUD_RATE(4800); break;
+ case 7200: buffer.baud = CYG_SERIAL_BAUD_RATE(7200); break;
+ case 9600: buffer.baud = CYG_SERIAL_BAUD_RATE(9600); break;
+ case 14400: buffer.baud = CYG_SERIAL_BAUD_RATE(14400); break;
+ case 19200: buffer.baud = CYG_SERIAL_BAUD_RATE(19200); break;
+ case 38400: buffer.baud = CYG_SERIAL_BAUD_RATE(38400); break;
+ case 57600: buffer.baud = CYG_SERIAL_BAUD_RATE(57600); break;
+ case 115200: buffer.baud = CYG_SERIAL_BAUD_RATE(115200); break;
+ case 230400: buffer.baud = CYG_SERIAL_BAUD_RATE(230400); break;
+ default: buffer.baud = -1; rc = -1; break;
+ }
+
+ if ((io->chan) && (buffer.baud != -1)) {
+ rc = cyg_io_set_config(io->chan, CYG_IO_SET_CONFIG_SERIAL_INFO, &buffer, &len);
+ }
+ }
+
+ va_end(ap);
+ return rc;
+}
+
+/*
+ * Setup the bsp_comm_channel data structure
+ */
+struct BSP_IO bsp_comm_io[] = {
+ {CYGDAT_CYGMON_CONSOLE_DEV, 0}, // Console device
+};
+
+struct bsp_comm_channel _bsp_comm_list[] =
+{
+ {
+ { "UART 0",
+ BSP_COMM_SERIAL,
+ BSP_PROTO_NONE },
+ { (void*)&bsp_comm_io[0],
+ uart_write,
+ uart_read,
+ uart_putchar,
+ uart_getchar,
+ uart_control }
+ },
+};
+int _bsp_num_comms = sizeof(_bsp_comm_list)/sizeof(_bsp_comm_list[0]);
+
+void
+_bsp_init_board_comm(void)
+{
+ int i;
+ for (i = 0; i < _bsp_num_comms; i++) {
+ Cyg_ErrNo err;
+ struct BSP_IO *io;
+ io = (struct BSP_IO *)_bsp_comm_list[i].procs.ch_data;
+ if ((err = cyg_io_lookup(io->name, &io->chan)) != ENOERR) {
+ diag_printf("Can't open '%s'\n", io->name);
+ }
+ }
+}
+
+#else // CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+
+struct bsp_comm_channel _bsp_comm_list[1];
+int _bsp_num_comms = 1;
+
+// Yuck! Two things need doing:
+
+// FIXME: Make bsp code use pointers in the bsp_comm_channel instead
+// of sub-structures.
+
+// FIXME: Make HAL provide the bsp_comm_info structure - I missed that
+// initially because it cannot be accessed via the virtual table API.
+void
+_bsp_init_board_comm(void)
+{
+ struct bsp_comm_channel* channel;
+ hal_virtual_comm_table_t* comm;
+
+ channel = &_bsp_comm_list[0];
+ channel->info.name = "fixme";
+ channel->info.kind = BSP_COMM_SERIAL;
+ channel->info.protocol = BSP_PROTO_NONE;
+
+ comm = CYGACC_CALL_IF_DEBUG_PROCS();
+ channel->procs = *(struct bsp_comm_procs*)comm;
+}
+#endif // CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+
+/*
+ * Array of memory region descriptors. We just list RAM.
+ */
+#ifdef CYGMEM_REGION_ram
+#define RAM_VIRTUAL_BASE CYGMEM_REGION_ram
+#define RAM_TOTAL_SIZE CYGMEM_REGION_ram_SIZE
+#else
+#define RAM_VIRTUAL_BASE 0x00008000
+#define RAM_TOTAL_SIZE 0x00FF8000
+#endif
+
+struct bsp_mem_info _bsp_memory_list[] =
+{
+ { (void *)RAM_VIRTUAL_BASE,
+ (void *)RAM_VIRTUAL_BASE,
+ 0,
+ RAM_TOTAL_SIZE,
+ BSP_MEM_RAM
+ },
+};
+
+/*
+ * Number of memory region descriptors.
+ */
+int _bsp_num_mem_regions = sizeof(_bsp_memory_list)/sizeof(_bsp_memory_list[0]);
+
+void
+_bsp_install_cpu_irq_controllers(void)
+{
+}
+
+void
+_bsp_install_board_irq_controllers(void)
+{
+}
+
+void
+__init_irq_controllers(void)
+{
+}
+
+void
+_bsp_board_init(void)
+{
+ /*
+ * Define platform info.
+ */
+#ifdef HAL_PLATFORM_CPU
+ _bsp_platform_info.cpu = HAL_PLATFORM_CPU;
+#else
+ _bsp_platform_info.cpu = "Unknown CPU";
+#endif
+#ifdef HAL_PLATFORM_BOARD
+ _bsp_platform_info.board = HAL_PLATFORM_BOARD;
+#else
+ _bsp_platform_info.board = "Unknown board";
+#endif
+#ifdef HAL_PLATFORM_EXTRA
+ _bsp_platform_info.extra = HAL_PLATFORM_EXTRA;
+#else
+ _bsp_platform_info.extra = "";
+#endif
+}
+
+extern char *strchr(char *, char);
+char *
+index(char *string, char key)
+{
+ return strchr(string, key);
+}
+
+void
+flush_i_cache(void)
+{
+ HAL_ICACHE_SYNC();
+}
+
+void
+ecos_bsp_console_putc(char c)
+{
+ if (bsp_shared_data) {
+ bsp_console_putc(c);
+ }
+}
+
+char
+ecos_bsp_console_getc(void)
+{
+ if (bsp_shared_data) {
+ return bsp_console_getc();
+ } else {
+ return '?';
+ }
+}
+
+void
+ecos_bsp_set_memsize(unsigned long size)
+{
+ _bsp_memory_list[0].nbytes = size;
+}
diff --git a/cesar/ecos/packages/cygmon/current/misc/ecos_dummy.c b/cesar/ecos/packages/cygmon/current/misc/ecos_dummy.c
new file mode 100644
index 0000000000..876d527007
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/ecos_dummy.c
@@ -0,0 +1,70 @@
+//==========================================================================
+//
+// ecos_dummy.c
+//
+// eCos BSP (for building Cygmon)
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas, dmoseley
+// Date: 1999-10-11
+// Description: Wrapper functions which provide BSP environment for Cygmon
+//####DESCRIPTIONEND####
+
+#ifdef CYGPKG_KERNEL
+#include <pkgconf/kernel.h> // Configuration header
+#include <cyg/kernel/kapi.h>
+#endif
+#include <cyg/infra/diag.h>
+#include <cyg/hal/plf_stub.h>
+
+// TEMP
+
+#define FAIL(n) \
+void n(void) \
+{ \
+ diag_printf("Fail: %s\n", #n); \
+ while (1) ; \
+}
+
+#ifndef CYGHWR_HAL_RESET_DEFINED
+ FAIL(bsp_reset)
+#endif
+
+ FAIL(_bsp_gdb_handler)
+ FAIL(_bsp_gdb_data)
diff --git a/cesar/ecos/packages/cygmon/current/misc/fmt_util.h b/cesar/ecos/packages/cygmon/current/misc/fmt_util.h
new file mode 100644
index 0000000000..03a3fca22a
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/fmt_util.h
@@ -0,0 +1,65 @@
+#ifndef __FMT_UTIL_H__
+#define __FMT_UTIL_H__
+//==========================================================================
+//
+// fmt_util.g
+//
+// Interface to generic string parsing and formatting utilities.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+/* Interface to generic string parsing and formatting utilities.
+
+ It is posible that these services need to be defined in
+ a platform dependent way. These will work for the majority of
+ processors. */
+
+extern int str2addr (char *string, mem_addr_t *res);
+extern void addr2str (mem_addr_t *addr, char *dest);
+
+#endif // __FMT_UTIL_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/generic-stub.h b/cesar/ecos/packages/cygmon/current/misc/generic-stub.h
new file mode 100644
index 0000000000..d6b44ec80c
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/generic-stub.h
@@ -0,0 +1,54 @@
+//==========================================================================
+//
+// generic-stub.h
+//
+//
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+// Placeholder
diff --git a/cesar/ecos/packages/cygmon/current/misc/generic_fmt32.c b/cesar/ecos/packages/cygmon/current/misc/generic_fmt32.c
new file mode 100644
index 0000000000..26d2112208
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/generic_fmt32.c
@@ -0,0 +1,98 @@
+//==========================================================================
+//
+// generic_fmt32.c
+//
+// Generic address conversion routines
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Generic address conversion routines
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#include <string.h>
+#ifdef HAVE_BSP
+#include <bsp/bsp.h>
+#include <bsp/cpu.h>
+#endif
+#include "monitor.h"
+#include "fmt_util.h"
+
+
+int
+str2addr (char *string, mem_addr_t *res)
+{
+#ifdef HAVE_ASI
+ if (string[0] == '[')
+ {
+ char *ptr = ++string;
+ while (*ptr && *ptr != ']')
+ ptr++;
+
+ if (*ptr == 0)
+ return -1;
+
+ *(ptr++) = 0;
+ res->asi = str2int (string, 16);
+ string = ptr;
+ }
+ else
+ res->asi = ASI_DEFAULT;
+#endif
+ res->addr = str2int (string, 16);
+ return 0;
+}
+
+void
+addr2str (mem_addr_t *addr, char *dest)
+{
+#ifdef HAVE_ASI
+ if (addr->asi != ASI_DEFAULT)
+ xsprintf(dest, "[%x]", addr->asi);
+ else
+#endif
+ dest[0] = 0;
+ strcat (dest, int2str (addr->addr, 16, sizeof (void *) * 2));
+}
diff --git a/cesar/ecos/packages/cygmon/current/misc/generic_mem.c b/cesar/ecos/packages/cygmon/current/misc/generic_mem.c
new file mode 100644
index 0000000000..76c6c86636
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/generic_mem.c
@@ -0,0 +1,99 @@
+//==========================================================================
+//
+// generic_mem.c
+//
+// Routines for reading and writing memory.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas, dmoseley
+// Date: 1999-10-20
+// Purpose:
+// Description: It may be appropriate to relay directly into the stubs
+// implementation of read memory, without board specific
+// considerations such as checking the allowed ranges of
+// addresses. Perhaps there needs to be some consideration
+// of address spaces or, masking addresses.
+//
+// This file implements a default version of reading and writing
+// memory when none of this is an issue
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#ifdef HAVE_BSP
+#include <bsp/bsp.h>
+#include "cpu_info.h"
+#endif
+#include "board.h"
+#include "monitor.h"
+#include "tservice.h"
+
+#ifndef HAVE_BSP
+#include "generic-stub.h"
+#endif
+
+
+int
+read_memory (mem_addr_t *src, int size, int amt, char *dst)
+{
+#if defined(HAVE_BSP) && !defined(USE_ECOS_HAL_SAFE_MEMORY)
+ return (bsp_memory_read((unsigned char *)src->addr, MEM_ADDR_ASI(src),
+ size << 3, amt, dst) != amt);
+#else
+ int totamt = size * amt;
+ return (totamt != __read_mem_safe (dst, (void*)src->addr, totamt));
+#endif
+}
+
+int
+write_memory (mem_addr_t *dst, int size, int amt, char *src)
+{
+#if defined(HAVE_BSP) && !defined(USE_ECOS_HAL_SAFE_MEMORY)
+ return (bsp_memory_write((unsigned char *)dst->addr, MEM_ADDR_ASI(dst),
+ size << 3, amt, src) != amt);
+#else
+ int totamt = size * amt;
+ return (totamt != __write_mem_safe (src, (void*)dst->addr, totamt));
+#endif
+}
+
+
+
diff --git a/cesar/ecos/packages/cygmon/current/misc/ledit.c b/cesar/ecos/packages/cygmon/current/misc/ledit.c
new file mode 100644
index 0000000000..c2609d3883
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/ledit.c
@@ -0,0 +1,604 @@
+//==========================================================================
+//
+// ledit.c
+//
+// Utterly simple line editor
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Udderly simple line editor
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+
+#include <monitor.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef HAVE_BSP
+#include <bsp/bsp.h>
+#endif
+#include "ledit.h"
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+static char *cutBuf = NULL;
+
+#ifdef NO_MALLOC
+static char linebufArray [MAX_HIST_ENTS + 2][MAXLINELEN + 1];
+#endif
+
+static struct termcap
+{
+ char *relleft, *relright;
+ char *oneleft;
+ char *insertch;
+ char *deletech;
+ char *deleteonech;
+ char *clreol;
+ char *gobol;
+ int width;
+} terminal;
+
+static struct linepos
+{
+ char *prompt;
+ char *buffer;
+ char *ebuf;
+ int cursor;
+} linebuf;
+
+static struct history
+{
+ char *cmd;
+ struct history *next, *prev;
+} *list = NULL, *topl = NULL, *curl = NULL;
+
+static int histlen = 0;
+static int histLimit = MAX_HIST_ENTS;
+
+static struct history histEnts[MAX_HIST_ENTS + 1], *histPtr = histEnts;
+static struct history currLine = { NULL, NULL, NULL };
+
+void
+beep (void)
+{
+ xputchar ('\007');
+}
+
+void
+printHistoryList ()
+{
+ struct history *hist = list;
+ int hist_num = 1;
+
+ if (hist != NULL)
+ {
+ while (hist->prev != NULL)
+ {
+ hist = hist->prev;
+ }
+
+ while (hist != NULL)
+ {
+ if (hist->cmd != NULL)
+ xprintf(" %d %s\n", hist_num++, hist->cmd);
+ hist = hist->next;
+ }
+ }
+}
+
+static void
+outputParamStr (char *str, int val)
+{
+ char *i = strchr (str, '%');
+ char *ptr;
+ int dist = val;
+
+ if (i == NULL)
+ {
+ while (dist-- > 0)
+ xprintf (str);
+ }
+ else
+ {
+ for (ptr = str; *ptr && ptr < i; ptr++)
+ xputchar (*ptr);
+ if (dist > 99)
+ {
+ xputchar ('0' + dist / 100);
+ dist = dist % 100;
+ }
+ if (dist > 9)
+ {
+ xputchar ('0' + dist / 10);
+ dist = dist % 10;
+ }
+ xputchar ('0' + dist);
+ if (*ptr)
+ xprintf (ptr + 1);
+ }
+}
+
+static void
+absMoveCursor (int pos)
+{
+ int dist, oldpos = linebuf.cursor;
+ int absdist;
+ char *bigmove;
+
+ if (pos > (linebuf.ebuf - linebuf.buffer))
+ {
+ beep ();
+ pos = linebuf.ebuf - linebuf.buffer;
+ }
+ else if (pos < 0)
+ pos = 0;
+ dist = pos - linebuf.cursor;
+ absdist = (dist < 0 ? -dist : dist);
+ linebuf.cursor = pos;
+ if (dist == 0)
+ return;
+ if (dist < 0)
+ bigmove = terminal.relleft;
+ else
+ bigmove = terminal.relright;
+
+ if ((absdist < 4) || (bigmove == NULL))
+ {
+ int x;
+ int promptLen = strlen (linebuf.prompt);
+
+ if (pos < (absdist - promptLen))
+ {
+ xprintf (terminal.gobol);
+ xprintf (linebuf.prompt);
+ for (x = 0; x < pos; x++)
+ xputchar (linebuf.buffer[x]);
+ return;
+ }
+
+ if (dist < 0)
+ {
+ for (x = 0; x < -dist ;x++)
+ xprintf (terminal.oneleft);
+ }
+ else
+ {
+ for (x = 0; x < dist; x++)
+ xputchar (linebuf.buffer [oldpos + x]);
+ }
+ }
+ else
+ {
+ outputParamStr (bigmove, absdist);
+ }
+}
+
+static void
+clrScrToEol (void)
+{
+ int len = linebuf.ebuf - linebuf.buffer;
+
+ if (len < linebuf.cursor)
+ return;
+
+ if(terminal.clreol)
+ {
+ xprintf (terminal.clreol);
+ }
+ else if (terminal.deletech)
+ {
+ outputParamStr (terminal.deletech, len - linebuf.cursor);
+ }
+ else
+ {
+ int oldcur = linebuf.cursor;
+ while (linebuf.cursor < len)
+ {
+ xputchar (' ');
+ linebuf.cursor++;
+ }
+
+ absMoveCursor (oldcur);
+ }
+}
+
+static void
+redrawCmd (void)
+{
+ xprintf (terminal.gobol);
+ xprintf (linebuf.prompt);
+ linebuf.buffer[linebuf.cursor] = 0;
+ xprintf (linebuf.buffer);
+ clrScrToEol ();
+}
+
+static void
+instCmd (char *ncmd)
+{
+ linebuf.cursor = strlen (ncmd);
+ strcpy (linebuf.buffer, ncmd);
+ redrawCmd ();
+ linebuf.ebuf = linebuf.buffer + linebuf.cursor;
+}
+
+static void
+prevCmd (void)
+{
+ if (curl == &currLine)
+ {
+ if (list != NULL)
+ {
+ *linebuf.ebuf = 0;
+#ifdef NO_MALLOC
+ currLine.cmd = linebufArray[MAX_HIST_ENTS];
+ strcpy (currLine.cmd, linebuf.buffer);
+#else
+ if (currLine.cmd != NULL)
+ free (currLine.cmd);
+ currLine.cmd = strdup (linebuf.buffer);
+#endif
+ curl = list;
+ }
+ }
+ else
+ {
+ if (curl->prev != NULL)
+ curl = curl->prev;
+ }
+ if (curl != NULL && curl->cmd != NULL)
+ instCmd (curl->cmd);
+ else
+ beep ();
+}
+
+static void
+nextCmd (void)
+{
+ if (curl->next == NULL)
+ {
+ beep ();
+ }
+ else
+ {
+ curl = curl->next;
+ instCmd (curl->cmd);
+ }
+
+}
+
+static int initted = 0;
+
+void
+initVt100 (void)
+{
+ terminal.gobol = "\r";
+ terminal.oneleft = "\010";
+ terminal.relleft = "\033[%D";
+ terminal.relright = "\033[%C";
+ terminal.insertch = "\033[%@";
+ terminal.deletech = "\033[%P";
+ terminal.deleteonech = "\033[P";
+ terminal.clreol = "\033[K";
+ terminal.width = 80;
+ initted = 1;
+}
+
+void
+initDumb (void)
+{
+ terminal.gobol = "\r";
+ terminal.oneleft = "\010";
+ terminal.relleft = NULL;
+ terminal.relright = NULL;
+ terminal.insertch = NULL;
+ terminal.deletech = NULL;
+ terminal.deleteonech = NULL;
+ terminal.clreol = NULL;
+ terminal.width = 80;
+ initted = 1;
+}
+
+static void
+insertChar (char *chars, int num)
+{
+ int len = linebuf.ebuf - linebuf.buffer + strlen (linebuf.prompt);
+ int n = 0;
+
+ if ((len + num) >= terminal.width)
+ {
+ beep ();
+ return;
+ }
+ if ((linebuf.ebuf - linebuf.buffer) > linebuf.cursor)
+ {
+ char *ptr, *eptr = linebuf.buffer + linebuf.cursor;
+
+ for (ptr = linebuf.ebuf; ptr >= eptr; ptr--)
+ *(ptr+num) = *ptr;
+
+ if (terminal.insertch != NULL)
+ outputParamStr (terminal.insertch, num);
+ }
+ for (n = 0; n < num; n++)
+ {
+ xputchar (*chars);
+ linebuf.buffer[linebuf.cursor++] = *(chars++);
+ }
+
+ linebuf.ebuf += num;
+
+ if (terminal.insertch == NULL)
+ {
+ char *ptr = linebuf.buffer + linebuf.cursor;
+ int oldcur = linebuf.cursor;
+ for (; ptr < linebuf.ebuf; ptr++)
+ xputchar (*ptr);
+ linebuf.cursor = linebuf.ebuf - linebuf.buffer;
+ absMoveCursor (oldcur);
+ }
+}
+
+static void
+deleteEol (int putInCutBuffer)
+{
+ int len = linebuf.ebuf - linebuf.buffer;
+ if (linebuf.cursor < len)
+ {
+ clrScrToEol ();
+
+ if (putInCutBuffer)
+ {
+ *linebuf.ebuf = 0;
+#ifdef NO_MALLOC
+ cutBuf = linebufArray[MAX_HIST_ENTS + 1];
+ strcpy (cutBuf, linebuf.buffer + linebuf.cursor);
+#else
+ if (cutBuf != NULL)
+ free (cutBuf);
+ cutBuf = strdup (linebuf.buffer + linebuf.cursor);
+#endif
+ }
+ linebuf.ebuf = linebuf.buffer + linebuf.cursor;
+ }
+}
+
+static void
+deleteCurrChar (void)
+{
+ int len = linebuf.ebuf - linebuf.buffer;
+ char *ptr;
+ if (len == linebuf.cursor || len == 0)
+ return;
+ for (ptr = linebuf.buffer + linebuf.cursor; ptr < (linebuf.ebuf - 1); ptr++)
+ {
+ *ptr = *(ptr + 1);
+ if (terminal.deleteonech == NULL)
+ xputchar (*ptr);
+ }
+ linebuf.ebuf--;
+ if (terminal.deleteonech && (len - 1) != linebuf.cursor)
+ xprintf (terminal.deleteonech);
+ else
+ {
+ int oldcur = linebuf.cursor;
+ xputchar (' ');
+ linebuf.cursor = linebuf.ebuf - linebuf.buffer + 1;
+ absMoveCursor (oldcur);
+ }
+}
+
+static void
+deleteChar (void)
+{
+ if (linebuf.cursor == 0)
+ {
+ beep ();
+ return;
+ }
+ absMoveCursor (linebuf.cursor - 1);
+ deleteCurrChar ();
+}
+
+int
+lineedit (char *prompt, char *buffer, int maxLen)
+{
+ int c;
+
+ curl = &currLine;
+
+ if (!initted)
+ {
+ initted = 1;
+ /*initVt100 ();*/
+ initDumb();
+ }
+ linebuf.prompt = prompt;
+ linebuf.buffer = buffer;
+ linebuf.ebuf = buffer;
+ buffer[0] = 0;
+ linebuf.cursor = 0;
+ redrawCmd ();
+ while ((c=input_char ()) > 0)
+ {
+ switch (c)
+ {
+ case PREVCMD:
+ prevCmd ();
+ break;
+ case NEXTCMD:
+ nextCmd ();
+ break;
+ case LF:
+ case CR:
+ *linebuf.ebuf = 0;
+#ifdef NO_MALLOC
+ cutBuf = NULL;
+ currLine.cmd = NULL;
+#else
+ if (cutBuf != NULL)
+ {
+ free (cutBuf);
+ cutBuf = NULL;
+ }
+ if (currLine.cmd != NULL)
+ {
+ free (currLine.cmd);
+ currLine.cmd = NULL;
+ }
+#endif
+ return linebuf.ebuf - linebuf.buffer;
+ break;
+ case BOLCMD:
+ absMoveCursor (0);
+ break;
+ case EOLCMD:
+ absMoveCursor (linebuf.ebuf-linebuf.buffer);
+ break;
+ case FORWCMD:
+ absMoveCursor (linebuf.cursor + 1);
+ break;
+ case BACKCMD:
+ absMoveCursor (linebuf.cursor - 1);
+ break;
+ case DELBACK:
+ case '\177':
+ deleteChar ();
+ break;
+ case ERASELINE:
+ absMoveCursor (0);
+ deleteEol (0);
+ break;
+ case DELEOL:
+ deleteEol (1);
+ break;
+ case DELCURRCH:
+ deleteCurrChar ();
+ break;
+ case YANKCH:
+ if (cutBuf != NULL)
+ insertChar (cutBuf,strlen (cutBuf));
+ break;
+ default:
+ if (c >= 32 && c < 127)
+ {
+ char ch = c;
+ insertChar (&ch, 1);
+ }
+ break;
+ }
+ }
+ return -1;
+}
+
+void
+addHistoryCmd (char *cmd)
+{
+ struct history *newent = NULL;
+
+ if (histlen >= histLimit)
+ {
+ newent = topl;
+ topl = topl->next;
+ topl->prev = NULL;
+#ifdef NO_MALLOC
+ newent->prev = NULL;
+ newent->next = NULL;
+#else
+ free (newent->cmd);
+ newent->cmd = NULL;
+#endif
+ histlen = histLimit - 1;
+ }
+
+ histlen++;
+
+ if (newent == NULL)
+ {
+ newent = histPtr++;
+#ifdef NO_MALLOC
+ newent->cmd = linebufArray[histlen - 1];
+#endif
+ }
+
+ if (list == NULL)
+ {
+ list = newent;
+ list->prev = NULL;
+ topl = list;
+ }
+ else
+ {
+ list->next = newent;
+ list->next->prev = list;
+ list = list->next;
+ }
+ currLine.prev = list;
+ list->next = &currLine;
+#ifdef NO_MALLOC
+ strcpy (list->cmd, cmd);
+#else
+ list->cmd = strdup (cmd);
+#endif
+ curl = &currLine;
+}
+
+void
+set_term_name (char *name)
+{
+ if (! strcmp (name, "vt100"))
+ {
+ initVt100 ();
+ }
+ else if (! strcmp (name, "dumb"))
+ {
+ initDumb ();
+ }
+ else
+ {
+ xprintf ("Unknown terminal name %s\n", name);
+ }
+}
diff --git a/cesar/ecos/packages/cygmon/current/misc/ledit.h b/cesar/ecos/packages/cygmon/current/misc/ledit.h
new file mode 100644
index 0000000000..083eeff89e
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/ledit.h
@@ -0,0 +1,88 @@
+//==========================================================================
+//
+// ledit.h
+//
+// Header for the utterly simple line editor
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Header for the udderly simple line editor
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#ifndef LEDIT_H
+#define LEDIT_H
+
+#define LF '\n'
+#define CR '\r'
+#define BOLCMD '\001'
+#define EOLCMD '\005'
+#define FORWCMD '\006'
+#define BACKCMD '\002'
+#define DELBACK '\010'
+#define DELEOL '\013'
+#define YANKCH '\031'
+#define DELCURRCH '\004'
+#define PREVCMD '\020'
+#define ERASELINE '\025'
+#define NEXTCMD '\016'
+
+/* Prompt for one line of input using PROMPT. The input from the user
+ (up to MAXINPLEN characters) will be stored in BUFFER. The number
+ of characters read will be returned. */
+extern int lineedit(char *prompt, char *buffer, int maxInpLen);
+
+/* Add CMD to the user's command history. */
+extern void addHistoryCmd (char *cmd);
+
+/* Configure the editor to use the specified terminal. */
+extern void set_term_name (char *name);
+
+/* Beep the terminal. */
+extern void beep (void);
+
+/* Print a history list. */
+extern void printHistoryList(void);
+
+#endif
diff --git a/cesar/ecos/packages/cygmon/current/misc/mips/board.h b/cesar/ecos/packages/cygmon/current/misc/mips/board.h
new file mode 100644
index 0000000000..fff5918d0c
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/mips/board.h
@@ -0,0 +1,110 @@
+#ifndef __CYGMON_MIPS_BOARD_H__
+#define __CYGMON_MIPS_BOARD_H__
+//==========================================================================
+//
+// board.h
+//
+// Cygmon board/platform configuration file
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dmoseley
+// Contributors: dmoseley
+// Date: 2000-07-11
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+// Hardware/platform/configuration specifics
+
+// These defines are only necessary for using target_reg union in monitor.h
+// It should be possible to remove that once the HAL integration is complete.
+#define HAVE_FLOAT_REGS 0
+#define HAVE_DOUBLE_REGS 0
+
+#define HAVE_CACHE 0
+#define HAVE_USAGE 0
+#define USE_CYGMON_PROTOTYPES 1
+#define NOMAIN 1
+#define CYGMON_SYSTEM_SERVICES 0 // Not used, fall back to BSP/HAL support
+
+#ifdef CYGDAT_CYGMON_USE_HELP
+#define USE_HELP 1
+#endif
+
+#define USE_ECOS_HAL_EXCEPTIONS
+#define USE_ECOS_HAL_BREAKPOINTS
+#define USE_ECOS_HAL_SINGLESTEP
+
+#include "cpu_info.h"
+extern void bp_print (target_register_t bp_val);
+extern int __set_breakpoint (target_register_t addr);
+extern int __remove_breakpoint (target_register_t addr);
+extern void __install_breakpoint_list (void);
+extern void __clear_breakpoint_list (void);
+extern int __display_breakpoint_list (void (*print_func)(target_register_t));
+
+#define bsp_skip_instruction(regs) __skipinst()
+#define install_breakpoints() __install_breakpoints()
+#define add_mon_breakpoint(bpt) __set_breakpoint((bpt).addr)
+#define clear_mon_breakpoint(bpt) __remove_breakpoint((bpt).addr)
+#define show_breakpoints() __display_breakpoint_list(bp_print)
+#define clear_breakpoints() __clear_breakpoint_list()
+
+#define bsp_get_signal(exc_nr, regs) __computeSignal(exc_nr)
+#define bsp_get_pc(regs) get_register(PC)
+
+#define CYGARC_HAL_COMMON_EXPORT_CPU_MACROS
+#include <cyg/hal/mips-regs.h>
+#include "monitor.h"
+
+#ifdef __mips64
+#define bsp_set_pc(pc, regs) \
+ put_register(PC, pc); \
+ if (regs->_sr & SR_ERL) \
+ put_register(EPC, pc); \
+ else \
+ put_register(EEPC, pc);
+#else
+#define bsp_set_pc(pc, regs) \
+ put_register(PC, pc);
+#endif
+
+#endif // __CYGMON_MIPS_BOARD_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/mips/cpu.h b/cesar/ecos/packages/cygmon/current/misc/mips/cpu.h
new file mode 100644
index 0000000000..e746a2ace2
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/mips/cpu.h
@@ -0,0 +1,59 @@
+#ifndef __MIPS_CPU_H__
+#define __MIPS_CPU_H__
+//==========================================================================
+//
+// cpu.h
+//
+// MIPS specific processor defines
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dmoseley
+// Contributors: dmoseley
+// Date: 2000-06-07
+// Purpose: MIPS specific processor defines
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#include <cyg/hal/hal_intr.h>
+
+#define BSP_MAX_EXCEPTIONS CYGNUM_HAL_VSR_COUNT
+
+#endif // __MIPS_CPU_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/mips/cpu_info.h b/cesar/ecos/packages/cygmon/current/misc/mips/cpu_info.h
new file mode 100644
index 0000000000..adf6d705d8
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/mips/cpu_info.h
@@ -0,0 +1,90 @@
+#ifndef __MIPS_CPU_INFO_H__
+#define __MIPS_CPU_INFO_H__
+//==========================================================================
+//
+// cpu_info.h
+//
+// Architecture information for MIPS processors
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dmoseley
+// Contributors: dmoseley
+// Date: 2000-06-07
+// Purpose:
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#define IS_MIPS 1
+
+/* Temporary as long a multiple protypes are copied in multiple files */
+/* This variation does NOT clone the prototypes */
+#define NO_MALLOC 1
+
+#ifndef USE_ECOS_HAL_BREAKPOINTS
+
+/* big enuf to store a trap in the BP structure */
+
+#define BP_INST_T_DEFINED 1
+typedef unsigned int bp_inst_t ;
+
+#else /* USE_ECOS_HAL_BREAKPOINTS */
+
+#define MEM_ADDR_DEFINED 1
+typedef struct mem_addr {
+ unsigned long addr;
+} mem_addr_t ;
+
+#endif /* USE_ECOS_HAL_BREAKPOINTS */
+
+typedef unsigned long target_register_t;
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/basetype.h>
+#if CYG_BYTEORDER == CYG_MSBFIRST
+#define PRINT_INSN print_insn_big_mips
+#else
+#define PRINT_INSN print_insn_little_mips
+#endif
+
+#undef BFD_MACH
+#define BFD_MACH 0
+
+#endif // __MIPS_CPU_INFO_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/mips/mips-mon.c b/cesar/ecos/packages/cygmon/current/misc/mips/mips-mon.c
new file mode 100644
index 0000000000..ab6067caa2
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/mips/mips-mon.c
@@ -0,0 +1,183 @@
+//==========================================================================
+//
+// mips-mon.c
+//
+// Support code to extend the generic monitor code to support
+// MIPS processors.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dmoseley
+// Contributors: dmoseley
+// Date: 2000-06-07
+// Purpose: Support code to extend the generic monitor code to support
+// MIPS(R) processors.
+// Description: Further board specific support is in other files.
+// This file contains:
+// register names lookup table
+//
+// Empty Stubs:
+// Interval timer - This should really belong to the application
+// operating system.
+//
+// Should not contain:
+// low level uart getchar and putchar functions
+// delay function to support uart
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#include "monitor.h"
+
+struct regstruct regtab[] =
+{
+ { "zero", REG_ZERO },
+ { "at", REG_AT },
+ { "v0", REG_V0 },
+ { "v1", REG_V1 },
+ { "a0", REG_A0 },
+ { "a1", REG_A1 },
+ { "a2", REG_A2 },
+ { "a3", REG_A3 },
+ { "t0", REG_T0 },
+ { "t1", REG_T1 },
+ { "t2", REG_T2 },
+ { "t3", REG_T3 },
+ { "t4", REG_T4 },
+ { "t5", REG_T5 },
+ { "t6", REG_T6 },
+ { "t7", REG_T7 },
+ { "s0", REG_S0 },
+ { "s1", REG_S1 },
+ { "s2", REG_S2 },
+ { "s3", REG_S3 },
+ { "s4", REG_S4 },
+ { "s5", REG_S5 },
+ { "s6", REG_S6 },
+ { "s7", REG_S7 },
+ { "t8", REG_T8 },
+ { "t9", REG_T9 },
+ { "k0", REG_K0 },
+ { "k1", REG_K1 },
+ { "gp", REG_GP },
+ { "sp", REG_SP },
+ { "s8", REG_S8 },
+ { "ra", REG_RA },
+
+ { "sr", REG_SR },
+ { "lo", REG_LO },
+ { "hi", REG_HI },
+ { "badvr", REG_BAD },
+ { "cause", REG_CAUSE },
+ { "pc", REG_PC },
+#ifdef CYGHWR_HAL_MIPS_FPU
+ { "f0", REG_F0 },
+ { "f1", REG_F1 },
+ { "f2", REG_F2 },
+ { "f3", REG_F3 },
+ { "f4", REG_F4 },
+ { "f5", REG_F5 },
+ { "f6", REG_F6 },
+ { "f7", REG_F7 },
+ { "f8", REG_F8 },
+ { "f9", REG_F9 },
+ { "f10", REG_F10 },
+ { "f11", REG_F11 },
+ { "f12", REG_F12 },
+ { "f13", REG_F13 },
+ { "f14", REG_F14 },
+ { "f15", REG_F15 },
+ { "f16", REG_F16 },
+ { "f17", REG_F17 },
+ { "f18", REG_F18 },
+ { "f19", REG_F19 },
+ { "f20", REG_F20 },
+ { "f21", REG_F21 },
+ { "f22", REG_F22 },
+ { "f23", REG_F23 },
+ { "f24", REG_F24 },
+ { "f25", REG_F25 },
+ { "f26", REG_F26 },
+ { "f27", REG_F27 },
+ { "f28", REG_F28 },
+ { "f29", REG_F29 },
+ { "f30", REG_F30 },
+ { "f31", REG_F31 },
+ { "fcr31", REG_FCR31 },
+#endif /* CYGHWR_HAL_MIPS_FPU */
+ { 0, 0 }, /* Terminating element must be last */
+} ;
+
+void
+initialize_mon(void)
+{
+} /* initialize_mon */
+
+
+#include <cyg/hal/hal_arch.h>
+#include <bsp/common/bsp_if.h>
+int
+machine_syscall(HAL_SavedRegisters *regs)
+{
+ int res, err;
+ target_register_t a0, a1, a2, a3;
+
+ a0 = get_register(REG_A0);
+ a1 = get_register(REG_A1);
+ a2 = get_register(REG_A2);
+ a3 = get_register(REG_A3);
+
+ err = _bsp_do_syscall(a0, // Function
+ a1, a2, a3, 0, // arguments,
+ &res);
+ if (err)
+ {
+ // This was a syscall. It has now been handled, so update the registers appropriately
+ put_register(REG_V0, res);
+ bsp_skip_instruction(regs);
+ }
+
+ return err;
+}
+
+
+// Utility function for printing breakpoints
+void bp_print(target_register_t bp_val)
+{
+ bsp_printf("0x%08lx\n", (unsigned long)bp_val);
+}
diff --git a/cesar/ecos/packages/cygmon/current/misc/mn10300/board.h b/cesar/ecos/packages/cygmon/current/misc/mn10300/board.h
new file mode 100644
index 0000000000..19b6ba1221
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/mn10300/board.h
@@ -0,0 +1,103 @@
+#ifndef __CYGMON_MN10300_BOARD_H__
+#define __CYGMON_MN10300_BOARD_H__
+//==========================================================================
+//
+// board.h
+//
+// Cygmon board/platform configuration file
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dmoseley
+// Contributors: dmoseley
+// Date: 2000-08-11
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+// Hardware/platform/configuration specifics
+
+// These defines are only necessary for using target_reg union in monitor.h
+// It should be possible to remove that once the HAL integration is complete.
+#if CYGHWR_HAL_MN10300_AM33_REVISION == 2
+#define HAVE_FLOAT_REGS 1
+#else
+#define HAVE_FLOAT_REGS 0
+#endif
+#define HAVE_DOUBLE_REGS 0
+
+#define HAVE_CACHE 0
+#define HAVE_USAGE 0
+#define USE_CYGMON_PROTOTYPES 1
+#define NOMAIN 1
+#define CYGMON_SYSTEM_SERVICES 0 // Not used, fall back to BSP/HAL support
+
+#ifdef CYGDAT_CYGMON_USE_HELP
+#define USE_HELP 1
+#endif
+
+#define USE_ECOS_HAL_EXCEPTIONS
+#define USE_ECOS_HAL_BREAKPOINTS
+#define USE_ECOS_HAL_SINGLESTEP
+#define USE_ECOS_HAL_SAFE_MEMORY
+extern int __read_mem_safe (void *dst, void *src, int count);
+extern int __write_mem_safe (void *src, void *dst, int count);
+
+
+#include "cpu_info.h"
+extern void bp_print (target_register_t bp_val);
+extern int __set_breakpoint (target_register_t addr);
+extern int __remove_breakpoint (target_register_t addr);
+extern void __install_breakpoint_list (void);
+extern void __clear_breakpoint_list (void);
+extern int __display_breakpoint_list (void (*print_func)(target_register_t));
+
+#define bsp_skip_instruction(regs) __skipinst()
+#define install_breakpoints() __install_breakpoints()
+#define add_mon_breakpoint(bpt) __set_breakpoint((bpt).addr)
+#define clear_mon_breakpoint(bpt) __remove_breakpoint((bpt).addr)
+#define show_breakpoints() __display_breakpoint_list(bp_print)
+#define clear_breakpoints() __clear_breakpoint_list()
+
+#define bsp_get_signal(exc_nr, regs) __computeSignal(exc_nr)
+#define bsp_get_pc(regs) get_register(PC)
+#define bsp_set_pc(pc, regs) put_register(PC, pc);
+
+#endif // __CYGMON_MN10300_BOARD_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/mn10300/cpu.h b/cesar/ecos/packages/cygmon/current/misc/mn10300/cpu.h
new file mode 100644
index 0000000000..ae8a50d8d7
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/mn10300/cpu.h
@@ -0,0 +1,61 @@
+#ifndef __MN10300_CPU_H__
+#define __MN10300_CPU_H__
+//==========================================================================
+//
+// cpu.h
+//
+// MN10300 specific processor defines
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dmoseley
+// Contributors: dmoseley
+// Date: 2000-08-11
+// Purpose: MN10300 specific processor defines
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#include <cyg/hal/hal_intr.h>
+
+#define BSP_MAX_EXCEPTIONS CYGNUM_HAL_VSR_COUNT
+
+#define REG_PC PC
+
+#endif // __MN10300_CPU_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/mn10300/cpu_info.h b/cesar/ecos/packages/cygmon/current/misc/mn10300/cpu_info.h
new file mode 100644
index 0000000000..000c8af39c
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/mn10300/cpu_info.h
@@ -0,0 +1,91 @@
+#ifndef __MN10300_CPU_INFO_H__
+#define __MN10300_CPU_INFO_H__
+//==========================================================================
+//
+// cpu_info.h
+//
+// Architecture information for MN10300 processors
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dmoseley
+// Contributors: dmoseley
+// Date: 2000-08-11
+// Purpose:
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#define IS_MN10300 1
+
+/* Temporary as long a multiple protypes are copied in multiple files */
+/* This variation does NOT clone the prototypes */
+#define NO_MALLOC 1
+
+#ifndef USE_ECOS_HAL_BREAKPOINTS
+
+/* big enuf to store a trap in the BP structure */
+
+#define BP_INST_T_DEFINED 1
+typedef unsigned char bp_inst_t ;
+
+#else /* USE_ECOS_HAL_BREAKPOINTS */
+
+#define MEM_ADDR_DEFINED 1
+typedef struct mem_addr {
+ unsigned long addr;
+} mem_addr_t ;
+
+#endif /* USE_ECOS_HAL_BREAKPOINTS */
+
+typedef unsigned long target_register_t;
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/basetype.h>
+#define PRINT_INSN print_insn_mn10300
+
+#undef BFD_MACH
+#define BFD_MACH 0
+
+// Ensure that the reg_valid field in regstruct is used.
+#define REG_VALID_FIELD_IN_REGSTRUCT
+#define INITIALIZE_MON_EACH_TIME() initialize_mon_each_time()
+extern void initialize_mon_each_time(void);
+
+#endif // __MN10300_CPU_INFO_H__
diff --git a/cesar/ecos/packages/cygmon/current/misc/mn10300/mn10300-mon.c b/cesar/ecos/packages/cygmon/current/misc/mn10300/mn10300-mon.c
new file mode 100644
index 0000000000..205c7f6542
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/mn10300/mn10300-mon.c
@@ -0,0 +1,206 @@
+//==========================================================================
+//
+// mn10300-mon.c
+//
+// Support code to extend the generic monitor code to support
+// MN10300 processors.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dmoseley
+// Contributors: dmoseley
+// Date: 2000-08-11
+// Purpose: Support code to extend the generic monitor code to support
+// MN10300 processors.
+// Description: Further board specific support is in other files.
+// This file contains:
+// register names lookup table
+//
+// Empty Stubs:
+// Interval timer - This should really belong to the application
+// operating system.
+//
+// Should not contain:
+// low level uart getchar and putchar functions
+// delay function to support uart
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#include "monitor.h"
+
+struct regstruct regtab[] =
+{
+ {"d0", D0, 1},
+ {"d1", D1, 1},
+ {"d2", D2, 1},
+ {"d3", D3, 1},
+ {"a0", A0, 1},
+ {"a1", A1, 1},
+ {"a2", A2, 1},
+ {"a3", A3, 1},
+ {"sp", SP, 1},
+ {"pc", PC, 1},
+ {"mdr", MDR, 1},
+ {"psw", PSW, 1},
+ {"lir", LIR, 1},
+ {"lar", LAR, 1},
+#ifdef CYGPKG_HAL_MN10300_AM33
+ {"r0", R0, 1},
+ {"r1", R1, 1},
+ {"r2", R2, 1},
+ {"r3", R3, 1},
+ {"r4", R4, 1},
+ {"r5", R5, 1},
+ {"r6", R6, 1},
+ {"r7", R7, 1},
+ {"ssp", SSP, 1},
+ {"msp", MSP, 1},
+ {"usp", USP, 1},
+ {"mcrh", MCRH, 1},
+ {"mcrl", MCRL, 1},
+ {"mcvf", MCVF, 1},
+ {"mdrq", MDRQ, 1},
+#if CYGHWR_HAL_MN10300_AM33_REVISION == 2
+ {"fpcr", FPCR, 1},
+ {"fs0", FS0, 1},
+ {"fs1", FS1, 1},
+ {"fs2", FS2, 1},
+ {"fs3", FS3, 1},
+ {"fs4", FS4, 1},
+ {"fs5", FS5, 1},
+ {"fs6", FS6, 1},
+ {"fs7", FS7, 1},
+ {"fs8", FS8, 1},
+ {"fs9", FS9, 1},
+ {"fs10", FS10, 1},
+ {"fs11", FS11, 1},
+ {"fs12", FS12, 1},
+ {"fs13", FS13, 1},
+ {"fs14", FS14, 1},
+ {"fs15", FS15, 1},
+ {"fs16", FS16, 1},
+ {"fs17", FS17, 1},
+ {"fs18", FS18, 1},
+ {"fs19", FS19, 1},
+ {"fs20", FS20, 1},
+ {"fs21", FS21, 1},
+ {"fs22", FS22, 1},
+ {"fs23", FS23, 1},
+ {"fs24", FS24, 1},
+ {"fs25", FS25, 1},
+ {"fs26", FS26, 1},
+ {"fs27", FS27, 1},
+ {"fs28", FS28, 1},
+ {"fs29", FS29, 1},
+ {"fs30", FS30, 1},
+ {"fs31", FS31, 1},
+#endif
+#endif
+ { 0, 0, 1}, /* Terminating element must be last */
+} ;
+
+void
+initialize_mon(void)
+{
+} /* initialize_mon */
+
+#if CYGHWR_HAL_MN10300_AM33_REVISION == 2
+extern int fpu_regs_read;
+#endif
+
+#ifdef CYGPKG_HAL_MN10300_AM33
+extern int msp_read;
+#endif
+
+void
+initialize_mon_each_time(void)
+{
+ int i;
+#if CYGHWR_HAL_MN10300_AM33_REVISION == 2
+ // Make sure the regtab[] indicates the valid status of the FPU registers
+ for (i = 0; regtab[i].registername != NULL; i++)
+ {
+ if ((regtab[i].registernumber >= FP_START) && (regtab[i].registernumber <= FP_END))
+ regtab[i].registervalid = fpu_regs_read;
+ }
+#endif
+
+#ifdef CYGPKG_HAL_MN10300_AM33
+ // Make sure the regtab[] indicates the valid status of the MSP
+ for (i = 0; regtab[i].registername != NULL; i++)
+ {
+ if (regtab[i].registernumber == MSP)
+ regtab[i].registervalid = msp_read;
+ }
+#endif
+} /* initialize_mon_each_time */
+
+
+#include <cyg/hal/hal_arch.h>
+#include <bsp/common/bsp_if.h>
+int
+machine_syscall(HAL_SavedRegisters *regs)
+{
+ int res, err;
+ target_register_t d0, d1, d2, d3;
+
+ d0 = get_register(D0);
+ d1 = get_register(D1);
+ d2 = get_register(D2);
+ d3 = get_register(D3);
+
+ err = _bsp_do_syscall(d0, // Function
+ d1, d2, d3, 0, // arguments,
+ &res);
+ if (err)
+ {
+ // This was a syscall. It has now been handled, so update the registers appropriately
+ put_register(D0, res);
+ bsp_skip_instruction(regs);
+ }
+
+ return err;
+}
+
+
+// Utility function for printing breakpoints
+void bp_print(target_register_t bp_val)
+{
+ bsp_printf("0x%08lx\n", (unsigned long)bp_val);
+}
diff --git a/cesar/ecos/packages/cygmon/current/misc/monitor.c b/cesar/ecos/packages/cygmon/current/misc/monitor.c
new file mode 100644
index 0000000000..06c04ae93a
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/monitor.c
@@ -0,0 +1,494 @@
+//==========================================================================
+//
+// monitor.c
+//
+// Monitor shell and main routines for CygMON the Wonder Monitor
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas, dmoseley
+// Date: 1999-10-20
+// Purpose: Monitor shell and main routines for CygMON the Wonder Monitor
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+/* Platform-independent code for cygmon */
+
+#include <stdlib.h>
+#include <unistd.h>
+#ifdef HAVE_BSP
+#include <bsp/bsp.h>
+#include <bsp/cpu.h>
+#include <bsp/hex-utils.h>
+#endif
+#include <monitor.h>
+#ifdef HAVE_BSP
+#include "cpu_info.h"
+#endif
+#include <ledit.h>
+#include <signal.h>
+#include <string.h>
+#include <ctype.h>
+
+#if USE_CYGMON_PROTOTYPES
+/* Use common prototypes */
+/* Some of the composed board.h files compose these
+ prototypes redundently, but if they dont,
+ these are the common definitions */
+#include "fmt_util.h" /* Interface to string formatting utilities */
+#include "tservice.h" /* Interface to target specific services */
+#include "generic-stub.h" /* from libstub */
+#endif /* USE_CYGMON_PROTOTYPES */
+
+static int cygmon_handle_exception (int sigval);
+static void monitor_take_control (void);
+
+#if CYGMON_SYSTEM_SERVICES
+extern int process_syscall (int syscall_num);
+#elif defined (USE_ECOS_HAL_EXCEPTIONS)
+static int cygmon_process_syscall (int sigval);
+#endif
+
+int stub_is_active = 0;
+mem_addr_t last_pc;
+
+#ifdef HAVE_BSP
+
+#if !defined(USE_ECOS_HAL_EXCEPTIONS)
+static int mon_dbg_handler(int exc_nr, void *regs);
+static int mon_kill_handler(int exc_nr, void *regs);
+#endif // USE_ECOS_HAL_EXCEPTIONS
+
+#ifndef USE_ECOS_HAL_BREAKPOINTS
+#define __is_breakpoint_function() (get_pc() == (target_register_t)bsp_breakinsn)
+#endif
+
+#ifdef __ECOS__
+/*
+ * This global flag is used by generic-stub.c to communicate to us that we
+ * are processing the breakpoint function within Cygmon itself.
+ */
+extern int processing_breakpoint_function;
+#endif
+
+/* Global pointer to current set of saved registers. */
+void *mon_saved_regs;
+
+/* Original BSP debug vector replaced by monitor. */
+#if !defined(USE_ECOS_HAL_EXCEPTIONS)
+static bsp_handler_t old_dbg_vec;
+#endif // !defined(USE_ECOS_HAL_EXCEPTIONS)
+
+#else
+static int handle_signal (int signal_val);
+
+__PFI user_signal_handler = NULL;
+#endif
+
+#if defined(__ECOS__)
+#include <cyg/hal/hal_stub.h>
+#endif
+
+#if defined(__ECOS__) && !defined(PROCESS_EXCEPTION_VEC_PROTOTYPE_EXISTS)
+#define PROCESS_EXCEPTION_VEC_PROTOTYPE_EXISTS
+extern volatile __PFI (*__process_exception_vec)(int);
+#endif
+
+
+#ifdef MONITOR_CONTROL_INTERRUPTS
+/* This is set if the user wants interrupts enabled in the monitor. */
+static int monitor_interrupts_enabled;
+#endif
+
+
+#if NOMAIN
+int monitor_main (int argc, char **argv) /* Suppress default main() junk */
+#else
+int main (int argc, char **argv)
+#endif
+{
+#ifdef HAVE_BSP
+ int cur_port;
+ struct bsp_comm_info comm_info;
+#else
+ /* Set up exception handling traps */
+ initialize_stub ();
+#endif
+
+ initialize_mon ();
+
+#ifdef HAVE_BSP
+ /* get info on debug channel */
+ cur_port = bsp_set_debug_comm(-1);
+ bsp_sysinfo(BSP_INFO_COMM, cur_port, &comm_info);
+
+ /*
+ * If we're using a network interface, don't install
+ * the cygmon vectors. Currently, we only support stub
+ * mode over a network connection.
+ */
+ if (comm_info.kind != BSP_COMM_ENET)
+ {
+ xprintf("\n");
+ version ();
+
+ /* replace original BSP debug and kill handler with ours */
+#if !defined(USE_ECOS_HAL_EXCEPTIONS)
+ old_dbg_vec = bsp_install_dbg_handler(mon_dbg_handler);
+ (void)bsp_install_kill_handler(mon_kill_handler);
+#else
+ /* replace original BSP debug and kill handler with ours using eCos stuff */
+ __process_exception_vec = (__PFI)cygmon_handle_exception;
+ __process_syscall_vec = cygmon_process_syscall;
+ __process_exit_vec = monitor_take_control;
+#endif // __ECOS__
+ }
+ else
+ {
+ /* This forces the console to use the gdb channel. */
+ bsp_set_console_comm(cur_port);
+ }
+#else
+ xprintf("\n");
+ version ();
+
+ __process_exception_vec = cygmon_handle_exception;
+ __process_exit_vec = monitor_take_control;
+#if CYGMON_SYSTEM_SERVICES
+ __process_syscall_vec = process_syscall;
+#endif
+ __process_signal_vec = handle_signal;
+ __init_vec = install_breakpoints;
+ __cleanup_vec = clear_breakpoints;
+#endif
+
+#if 0
+#ifdef __ECOS__
+ __process_exception_vec = cygmon_handle_exception;
+#endif
+#endif
+
+ while (1)
+ {
+ breakpoint ();
+ if (switch_to_stub_flag)
+ {
+ xprintf("Switching to stub\n");
+ switch_to_stub_flag = 0;
+ }
+ }
+
+ /* never reached */
+ exit (0);
+}
+
+
+/* Transfer control to gdb stub */
+
+int
+transfer_to_stub ()
+{
+ /* Return back to the exception handler, but the exception handler
+ should invoke the stub's exception handler instead of ours. */
+#if defined(HAVE_BSP) && !defined(USE_ECOS_HAL_EXCEPTIONS)
+ (void)bsp_install_dbg_handler(old_dbg_vec);
+#else
+ __switch_to_stub ();
+#endif
+
+ /* The stub is now active. */
+ stub_is_active = 1;
+ return -1;
+}
+
+void
+clear_user_state (void)
+{
+#ifdef HAS_TIMER
+ if (__timer_enabled ())
+ __settimer (0, 0);
+#endif
+
+ clear_breakpoints ();
+
+#ifndef HAVE_BSP
+ user_signal_handler = NULL;
+#endif
+
+ __clear_single_step ();
+}
+
+static void
+monitor_take_control (void)
+{
+ stub_is_active = 0;
+ switch_to_stub_flag = 0;
+
+ // Flush the unget state. This is because the ecos stub and Cygmon track this
+ // stuff separately.
+ bsp_debug_ungetc('\0');
+
+#ifdef INITIALIZE_MON_EACH_TIME
+ // Call the per-stop initialization routine if it is defined.
+ INITIALIZE_MON_EACH_TIME();
+#endif
+
+#if defined(HAVE_BSP) && !defined(USE_ECOS_HAL_EXCEPTIONS)
+ /* replace original BSP debug trap handler with ours */
+ (void)bsp_install_dbg_handler(mon_dbg_handler);
+#else
+ clear_user_state ();
+ __process_exception_vec = cygmon_handle_exception;
+#endif
+}
+
+
+#ifdef MONITOR_CONTROL_INTERRUPTS
+void
+monitor_enable_interrupts (void)
+{
+ monitor_interrupts_enabled = 1;
+ enable_interrupts ();
+}
+
+void
+monitor_disable_interrupts (void)
+{
+ monitor_interrupts_enabled = 0;
+ disable_interrupts ();
+}
+
+int
+monitor_interrupt_state (void)
+{
+ return monitor_interrupts_enabled;
+}
+#endif
+
+#if defined(USE_ECOS_HAL_EXCEPTIONS)
+externC HAL_SavedRegisters *_hal_registers;
+extern int machine_syscall(HAL_SavedRegisters *regs);
+static int
+cygmon_process_syscall (int sigval)
+{
+ return machine_syscall(_hal_registers);
+}
+#endif
+
+static int
+cygmon_handle_exception (int sigval)
+{
+ target_register_t pc;
+
+#ifdef MONITOR_CONTROL_INTERRUPTS
+ if (monitor_interrupts_enabled)
+ {
+ if (! __in_interrupt)
+ enable_interrupts ();
+ }
+#endif
+
+#ifdef TARGET_EXCEPTION_CODE
+ TARGET_EXCEPTION_CODE
+#endif
+
+#ifndef HAVE_BSP
+ if (sigval != SIGKILL)
+ if (handle_signal (sigval) == 0)
+ return 0;
+#endif
+
+ clear_user_state ();
+
+ /* We may want to tweak the PC to point at the faulting instruction,
+ for example. (breakpoints on x86). */
+#ifdef TARGET_ADJUST_PC
+ TARGET_ADJUST_PC
+#endif
+
+ pc = get_pc();
+ MAKE_STD_ADDR (pc, &last_pc);
+
+#ifdef __ECOS__
+ if ((sigval == SIGTRAP) && (__is_breakpoint_function() || processing_breakpoint_function))
+#else
+ if ((sigval == SIGTRAP) && __is_breakpoint_function())
+#endif
+ {
+ /*
+ * This is the initial breakpoint inserted by the BSP
+ * Don't print anything for this as it is confusing
+ */
+ }
+ else
+ {
+ if (sigval == SIGTRAP)
+ xprintf ("Hit breakpoint");
+ else
+ xprintf ("Got signal %d", sigval);
+
+ xprintf (" at 0x%s\n", int2str (pc, 16, sizeof (target_register_t) * 2));
+
+#ifdef DISASSEMBLER
+ if (!__is_breakpoint_function ())
+ {
+ do_dis (&last_pc);
+ flush_dis ();
+ }
+#endif
+ }
+
+ monitor_take_control ();
+
+ return monitor_loop ();
+}
+
+#ifndef HAVE_BSP
+/* Returns 0 if the program should restart at the point at which the
+ signal was received, -1 otherwise. */
+static int
+handle_signal (int signal)
+{
+ if (signal == SIGKILL)
+ return -1;
+
+ if (user_signal_handler != NULL)
+ {
+ int result = user_signal_handler (signal);
+ switch (result)
+ {
+ /* Don't ignore potential hardware signals. */
+ case 3:
+ if (signal == SIGSEGV || signal == SIGBUS || signal == SIGFPE
+ || signal == SIGTRAP || signal == SIGILL)
+ return -1;
+
+ case 0:
+ return 0;
+
+ default:
+ case 1:
+ case 2:
+ return -1;
+ }
+ }
+ return -1;
+}
+#endif
+
+
+void
+version (void)
+{
+#ifdef HAVE_BSP
+ struct bsp_platform_info platform;
+ struct bsp_mem_info mem;
+ int i;
+ unsigned long u, totmem, topmem;
+#endif
+ extern char *build_date;
+
+ xprintf ("Cygmon, the Cygnus ROM monitor.\n");
+ xprintf ("Copyright(c) 1997, 1998, 1999, 2000 Red Hat\n\n");
+ xprintf ("Version: %s\nThis image was built on %s\n\n",
+ VERSION, build_date);
+
+#ifdef HAVE_BSP
+ bsp_sysinfo(BSP_INFO_PLATFORM, &platform);
+
+ totmem = topmem = 0;
+ i = 0;
+ while (bsp_sysinfo(BSP_INFO_MEMORY, i++, &mem) == 0)
+ {
+ if (mem.kind == BSP_MEM_RAM)
+ {
+ totmem += mem.nbytes;
+ u = (unsigned long)mem.virt_start + mem.nbytes;
+ if (u > topmem)
+ topmem = u;
+ }
+ }
+
+ xprintf("CPU: %s\n", platform.cpu);
+ xprintf("Board: %s\n", platform.board);
+ if (*(platform.extra))
+ xprintf("%s\n", platform.extra);
+ xprintf("Total RAM: %d bytes\n", totmem);
+ xprintf("Top of RAM: 0x%x\n", topmem);
+#endif
+}
+
+
+#ifdef HAVE_BSP
+#if !defined(USE_ECOS_HAL_EXCEPTIONS)
+static int
+mon_kill_handler(int exc_nr, void *regs)
+{
+ monitor_take_control();
+ return 1;
+}
+#endif // !defined(USE_ECOS_HAL_EXCEPTIONS)
+
+#if !defined(USE_ECOS_HAL_EXCEPTIONS)
+static int
+mon_dbg_handler(int exc_nr, void *regs)
+{
+ int sig;
+ unsigned long cur_pc;
+
+ mon_saved_regs = regs;
+ sig = bsp_get_signal(exc_nr, regs);
+
+ cygmon_handle_exception(sig);
+
+ cur_pc = bsp_get_pc(regs);
+ if (cur_pc == (unsigned long)bsp_breakinsn)
+ bsp_skip_instruction(regs);
+
+ if (!stub_is_active)
+ install_breakpoints();
+
+ return 1;
+}
+#endif // !defined(USE_ECOS_HAL_EXCEPTIONS)
+
+#endif
diff --git a/cesar/ecos/packages/cygmon/current/misc/monitor.h b/cesar/ecos/packages/cygmon/current/misc/monitor.h
new file mode 100644
index 0000000000..fe1a6192a5
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/monitor.h
@@ -0,0 +1,303 @@
+//==========================================================================
+//
+// monitor.h
+//
+// Main definitions for the CygMON ROM monitor
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas, dmoseley
+// Date: 1999-10-20
+// Purpose: Main definitions for the CygMON ROM monitor
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#ifndef MONITOR_H
+#define MONITOR_H
+
+#if !defined(__ASSEMBLER__)
+#include <stdarg.h>
+#endif
+
+#include <board.h>
+#ifdef HAVE_BSP
+#include "cpu_info.h"
+#endif
+#include <monitor_cmd.h>
+
+#ifdef __ECOS__
+#include <cyg/hal/plf_stub.h>
+#endif
+
+#ifndef ASM
+
+#ifdef HAVE_BSP
+#define xprintf bsp_dprintf
+#define xsprintf bsp_sprintf
+#define xvprintf bsp_dvprintf
+#define xputchar bsp_debug_putc
+#define xgetchar bsp_debug_getc
+#define xungetchar bsp_debug_ungetc
+#define __getTty() bsp_set_debug_comm(-1)
+#define set_pc(x) bsp_set_pc((x), mon_saved_regs)
+
+#ifndef USE_ECOS_HAL_SINGLESTEP
+#define __single_step() bsp_singlestep_setup(mon_saved_regs)
+#define __clear_single_step() bsp_singlestep_cleanup(mon_saved_regs)
+#endif /* USE_ECOS_HAL_SINGLESTEP */
+
+#ifndef USE_ECOS_HAL_BREAKPOINTS
+#define breakpoint() bsp_breakpoint()
+#endif /* USE_ECOS_HAL_BREAKPOINTS */
+
+#if defined(__ECOS__) && defined(CYGHWR_HAL_RESET_DEFINED)
+ extern void __reset(void);
+#else // defined(__ECOS__) && defined(CYGHWR_HAL_RESET_DEFINED)
+# define __reset bsp_reset
+#endif // defined(__ECOS__) && defined(CYGHWR_HAL_RESET_DEFINED)
+
+#else
+extern void xprintf(const char *fmt, ...);
+extern void xsprintf(char *str, const char *fmt, ...);
+extern void xvprintf(const char *fmt, va_list ap);
+
+#ifdef HAS_USER_IO
+#define xputchar putUserChar
+#define xgetchar getUserChar
+#else
+extern void putDebugChar(int ch);
+extern int getDebugChar(void);
+#define xputchar putDebugChar
+#define xgetchar getDebugChar
+#endif
+#define xungetchar ungetDebugChar
+#endif
+
+
+#ifndef USE_ECOS_HAL_BREAKPOINTS
+struct bp {
+ mem_addr_t address;
+ bp_inst_t old_inst;
+ char in_memory;
+ struct bp *next;
+};
+#endif // USE_ECOS_HAL_BREAKPOINTS
+
+struct regstruct
+{
+ char *registername;
+ int registernumber;
+#ifdef HAVE_BSP
+#if defined(CYGPKG_HAL_ARM) || !defined(__ECOS__)
+ int registertype;
+#endif // defined(CYGPKG_HAL_ARM) || !defined(__ECOS__)
+#endif
+#ifdef REG_VALID_FIELD_IN_REGSTRUCT
+ int registervalid;
+#endif
+};
+
+
+
+#ifdef HAVE_BSP
+#define REGTYPE_INT 1
+#define REGTYPE_FLOAT 2
+#define REGTYPE_DOUBLE 3
+
+union target_reg
+{
+ unsigned long i; /* integer register (32/64 bit) */
+#if HAVE_FLOAT_REGS
+ float f; /* float register (32bit) */
+#endif
+#if HAVE_DOUBLE_REGS
+ double d; /* double register (64bit) */
+#endif
+};
+
+typedef union target_reg target_regval_t;
+
+
+/* This is a template for what should be defined in the board specific
+ header file composed, board.h */
+#if ! defined(MEM_ADDR_DEFINED)
+#define MEM_ADDR_DEFINED 1
+typedef struct mem_addr {
+ unsigned long addr;
+} mem_addr_t;
+#endif
+
+#if !defined(BP_INST_T_DEFINED)
+#define BP_INST_T_DEFINED 1
+typedef unsigned char bp_inst_t ;
+#endif
+
+#if ! defined(MAKE_STD_ADDR)
+#define MAKE_STD_ADDR(SRC, DST) ((DST)->addr = (SRC))
+#endif
+
+
+#if ! defined(ADD_OFFSET)
+#define ADD_OFFSET(SRC,DST,OFFSET) ((DST)->addr = (SRC)->addr + (OFFSET))
+#endif
+
+#if ! defined(ADD_ALIGN)
+#define ADD_ALIGN(SRC,DST,ALIGN) \
+ ((DST)->addr = (SRC)->addr - ((SRC)->addr % (ALIGN)))
+#endif
+
+#if ! defined(MEM_ADDR_EQ_P)
+#define MEM_ADDR_EQ_P(A, B) ((A).addr == (B).addr)
+#endif
+
+#if ! defined(MEM_ADDR_DIFF)
+#define MEM_ADDR_DIFF(A, B) ((A).addr - (B).addr)
+#endif
+
+#if ! defined(MEM_ADDR_ASI)
+#define MEM_ADDR_ASI(A) -1
+#endif
+
+#endif /* HAVE_BSP */
+
+#if defined(NO_MALLOC) && ! defined(MAX_NUM_BP)
+#define MAX_NUM_BP 64
+#endif
+
+extern struct regstruct regtab[];
+
+extern char **argvect;
+
+#ifdef HAVE_BSP
+#define VERSION "release 2.0"
+#else
+#define VERSION "release 1.2"
+#endif
+
+#define MAXLINELEN 80
+#define PROMPT "cygmon> "
+#if ! defined MAX_HIST_ENTS
+#define MAX_HIST_ENTS 10
+#endif
+
+/*
+ * From monitor.c
+ */
+extern mem_addr_t last_pc;
+extern int stub_is_active;
+#ifdef HAVE_BSP
+extern void *mon_saved_regs;
+#else
+extern int (*user_signal_handler)(int);
+#endif
+
+extern void clear_user_state (void);
+extern int transfer_to_stub (void);
+extern void version (void);
+#ifdef MONITOR_CONTROL_INTERRUPTS
+/* Enable interrupts within the monitor. */
+extern void monitor_enable_interrupts (void);
+
+/* Disable interrupts within the monitor. */
+extern void monitor_disable_interrupts (void);
+
+/* Returns 1 if interrupts have been enabled within the monitor, 0
+ otherwise. */
+extern int monitor_interrupt_state (void);
+#endif /* MONITOR_CONTROL_INTERRUPTS */
+
+
+/*
+ * From utils.c
+ */
+extern int switch_to_stub_flag;
+extern int input_char (void);
+extern target_register_t str2int (char *str, int base);
+#if HAVE_DOUBLE_REGS
+extern double str2double (char *str, int base);
+#endif
+extern target_register_t str2intlen (char *str, int base, int len);
+extern int hex2bytes(char *string, char *dest, int maxsize);
+extern char *int2str (target_register_t number, int base, int numdigs);
+#ifndef NO_MALLOC
+extern char *strdup(const char *str);
+#endif
+extern target_register_t get_pc(void);
+extern char *get_register_str (regnames_t which, int detail, int valid);
+extern void store_register (regnames_t which, char *string);
+
+#ifndef USE_ECOS_HAL_BREAKPOINTS
+/*
+ * From breakpoints.c
+ */
+extern int add_mon_breakpoint (mem_addr_t location);
+extern void install_breakpoints (void);
+extern void clear_breakpoints (void);
+extern int show_breakpoints (void);
+extern int clear_mon_breakpoint (mem_addr_t location);
+#endif /* USE_ECOS_HAL_BREAKPOINTS */
+
+
+/*
+ * From do-dis.c
+ */
+extern mem_addr_t do_dis (mem_addr_t *addr);
+extern void flush_dis (void);
+
+
+/*
+ * From architecture-mon.c
+ */
+#ifdef HAVE_BSP
+extern void initialize_mon(void);
+extern target_register_t get_register(regnames_t reg);
+extern void put_register (regnames_t which, target_register_t value);
+#endif
+
+
+/* Lame. */
+#ifndef ITIMER_REAL
+#define ITIMER_REAL 0
+#endif
+
+#endif /* ASM */
+#endif
diff --git a/cesar/ecos/packages/cygmon/current/misc/monitor_cmd.c b/cesar/ecos/packages/cygmon/current/misc/monitor_cmd.c
new file mode 100644
index 0000000000..0a46fb883e
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/monitor_cmd.c
@@ -0,0 +1,2549 @@
+//==========================================================================
+//
+// monitor_cmd.c
+//
+// Monitor commands for the CygMON ROM monitor
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas, dmoseley
+// Date: 1999-10-20
+// Purpose: Monitor commands for the CygMON ROM monitor
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#ifdef HAVE_BSP
+#include "cpu_info.h"
+#include <bsp/bsp.h>
+#include <bsp/cpu.h>
+#include <bsp/hex-utils.h>
+#ifdef __BOARD_HEADER__
+#include __BOARD_HEADER__
+#endif
+#endif
+#include <board.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <monitor.h>
+#include <ledit.h>
+#include <string.h>
+#include <ctype.h>
+
+#ifdef HAVE_BSP
+#include "fmt_util.h"
+#include "tservice.h"
+#endif
+
+#ifdef __ECOS__
+#include <cyg/hal/hal_stub.h>
+#endif
+
+#if USE_CYGMON_PROTOTYPES
+/* Use common prototypes */
+/* Some of the composed board.h files compose these
+ prototypes redundently, but if they dont,
+ these are the common definitions */
+#include "fmt_util.h" /* Interface to string formatting utilities */
+#include "tservice.h" /* Interface to target specific services */
+#include "generic-stub.h" /* from libstub */
+#endif /* USE_CYGMON_PROTOTYPES */
+
+static int history_cmd(cmdmode_t mode) ;
+
+#ifndef MAXLINELEN
+#define MAXLINELEN 80
+#endif
+
+#define MAXLINES 23
+
+char inbuf[MAXLINELEN] ;
+static char cmd[MAXLINELEN];
+
+#if ! defined(PROVIDE_CRASH_CMD)
+#define PROVIDE_CRASH_CMD 0
+#endif
+
+#if PROVIDE_CRASH_CMD
+/*
+ * The crash command is used while debugging cygmon itself
+ */
+static int crash_cmd(cmdmode_t mode) ; /* Command to trap into cygmon */
+#endif
+
+struct cmdentry cmdtab[] = {
+ {NULL, "baud", set_serial_speed_cmd},
+ {"b", "break", breakpoint_cmd},
+#if HAVE_CACHE
+ {NULL, "cache", cache_cmd},
+#endif
+ {NULL, "copy", copy_cmd},
+#if PROVIDE_CRASH_CMD
+ {NULL, "crash", crash_cmd},
+#endif
+ {NULL, "crc", checksumcmd},
+ {"d", "disassemble", disassemble_cmd},
+ {NULL, "dump", dump_cmd},
+#if defined(NVRAM_ETH_ADDR)
+ {NULL, "ethaddr", ethaddr_cmd},
+#endif
+ {NULL, "fill", fill_cmd},
+ {NULL, "go", go_cmd},
+ {NULL, "help", help_cmd},
+ {"his","history", history_cmd},
+#ifdef MONITOR_CONTROL_INTERRUPTS
+ {NULL, "interrupt", int_cmd},
+#endif
+#if defined(NVRAM_IP_ADDR)
+ {NULL, "ipaddr", ipaddr_cmd},
+#endif
+ {NULL, "load", load_cmd},
+ {"m", "memory", mem_cmd},
+#ifdef OTHERNAMES_CMD
+ {"o", "othernames", othernames_cmd},
+#endif
+ {NULL, "port", set_serial_port_cmd},
+ {"r", "register", reg_cmd},
+ {NULL, "reset", reset_cmd},
+#ifndef HAVE_BSP
+ {NULL, "setargs", set_program_args_cmd},
+#endif
+ {"si", "step", step_cmd},
+ {NULL, "swapmem", swapmem_cmd},
+#if defined(NVRAM_TCP_PORT)
+ {NULL, "tcpport", tcpport_cmd},
+#endif
+ {NULL, "terminal", set_term_cmd},
+#ifdef HAS_TIMER
+ {NULL, "timer", timer_cmd},
+#endif
+#if !defined(__ECOS__) || defined(CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS)
+ {NULL, "transfer", transfer_cmd},
+#endif
+ {"u", "unbreak", clear_breakpoint_cmd},
+#if HAVE_USAGE
+ {NULL, "usage", memusage_cmd},
+#endif
+ {NULL, "version", version_cmd},
+ /* Really need to redo the way commands are done--there should be a
+ dynamic list (perhaps in addition to the static one). */
+#ifdef TARGET_COMMANDS
+ TARGET_COMMANDS
+#endif
+
+ {NULL, NULL, NULL}
+};
+
+static int
+alias_compare (char *cmd)
+{
+ int m = 0;
+ int match = -1;
+ int num_matches = 0;
+
+ while (cmdtab[m].cmd != NULL)
+ {
+ if (cmdtab[m].alias != NULL && !strcmp (cmd, cmdtab[m].alias))
+ {
+ match = m;
+ num_matches++;
+ /* We're expecting that aliases will be defined
+ uniquely, but just in case, we let the user know
+ if there is a conflict */
+ if (num_matches > 1)
+ {
+ xprintf ("Alias conflict. Executing last matching alias.\n");
+ }
+ }
+ m++;
+ }
+ return match;
+}
+
+static int
+command_compare (char *cmd)
+{
+ int m = 0;
+ int match = -1;
+ int num_matches = 0;
+ int cmdlen = strlen(cmd) ;
+ while (cmdtab[m].cmd != NULL)
+ {
+ if (!(strncmp (cmd,cmdtab[m].cmd, cmdlen)))
+ {
+ /* we found a match */
+ num_matches++;
+ if (num_matches == 2) /* we found a second match */
+ {
+ xprintf ("Ambiguous command. Possibilities are:\n%s\n%s\n",
+ cmdtab[match].cmd,
+ cmdtab[m].cmd);
+ }
+ else if (num_matches > 2) /* we found another match */
+ {
+ /* Show the new possibility we just found */
+ xprintf ("%s\n", cmdtab[m].cmd);
+ }
+ /* Point the match at the command we just looked at.
+ We have to wait until now so that the first duplicate
+ found can output the earlier match as well */
+ match = m;
+ }
+ m++;
+ }
+ return ((num_matches == 1) ? match : -1);
+}
+
+#ifdef USE_HELP
+void
+usage (char *string)
+{
+ xprintf ("Usage: %s\n", string);
+}
+
+void
+short_help (char *string)
+{
+ xprintf ("%s\n", string);
+}
+
+void
+long_help (char *string)
+{
+ int linecnt = 0;
+ int do_leave = 0;
+
+ for (; *string && !do_leave; string++)
+ {
+ xprintf ("%c", *string);
+ if (*string == '\n')
+ {
+ linecnt++;
+ if (linecnt == MAXLINES)
+ {
+ int i;
+
+ xprintf ("-More-");
+ while ((i = input_char ()) >= 0)
+ {
+ if (i == '\r' || i == '\n')
+ {
+ linecnt--;
+ break;
+ }
+ else if (i == ' ')
+ {
+ linecnt = 0;
+ break;
+ }
+ else if (i == 'q' || i == 'Q')
+ {
+ do_leave = 1;
+ break;
+ }
+ else
+ beep ();
+ }
+ }
+ }
+ }
+ xprintf ("\n");
+}
+
+void
+example (char *example)
+{
+ xprintf ("Example: %s\n", example);
+}
+
+#else
+void
+no_help (void)
+{
+ xprintf ("No help available.\n");
+}
+
+void
+no_help_usage (void)
+{
+ xprintf ("Incorrect usage.\n");
+}
+#endif
+
+int
+help_cmd (cmdmode_t mode)
+{
+ int command_number = -2;
+
+ if (mode == USAGE)
+ {
+ usage ("help [command]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("The help command");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ help_cmd (USAGE);
+ long_help ("\
+The help command without arguments shows a list of all available commands\n\
+with a short description of each one. With a command name as an argument\n\
+it shows usage for the command and a paragraph describing the command.\n\
+Usage is shown as command name followed by names of extensions or arguments.\n\
+Arguments in [brackets] are optional, plain text arguments are required.\n\
+Note that all commands can be invoked by typing enough of the command name\n\
+to uniquely specify the command. Some commands have aliases, which are one\n\
+letter abbreviations for commands which do not have unique first letters.\n\
+Aliases for all commands are shown in the help screen, which displays\n\
+commands in the format:\n\
+command name: (alias, if any) description of command \n");
+ example("\
+help foo \n\
+Shows the help screen for the command foo.");
+ return 0;
+ }
+
+ if (argvect[1] != NULL)
+ {
+ if (argvect[2] == NULL)
+ {
+ command_number = command_compare (argvect[1]);
+ if (command_number < 0)
+ {
+ xprintf ("No such command as %s\n", argvect[1]);
+ }
+ }
+
+ if (command_number < 0)
+ {
+ return help_cmd (USAGE);
+ }
+ else
+ {
+ return cmdtab[command_number].function (LONG_HELP);
+ }
+ }
+ else
+ {
+ int i;
+
+ xprintf ("Available commands are:\n");
+ for (i = 0; cmdtab[i].cmd != NULL; i++)
+ {
+ int x = strlen (cmdtab[i].cmd) + 2;
+
+ xprintf ("%s: ", cmdtab[i].cmd);
+ if (cmdtab[i].alias != NULL)
+ {
+ xprintf("(%s)", cmdtab[i].alias);
+ x += 2 + strlen(cmdtab[i].alias);
+ }
+ for (; x < 20; x++)
+ {
+ xprintf (" ");
+ }
+ cmdtab[i].function (SHORT_HELP);
+ if ((i > 0) && (i % MAXLINES) == 0)
+ {
+ xprintf ("-More-");
+ input_char ();
+ xprintf ("\n");
+ }
+ }
+ }
+ return 0;
+}
+
+#if PROVIDE_CRASH_CMD
+static int crash_cmd(cmdmode_t mode)
+{
+ switch (mode)
+ {
+ case USAGE : usage("crash") ; break ;
+ case SHORT_HELP : short_help("invoke the breakpoint function");
+ break ;
+ case LONG_HELP :
+ long_help("The crash command calls the breakpoint function() which is useful\n\
+only if you are using an additional debugger to debug this software and,\n\
+the general exception handler is hooked to the other debugger\n") ;
+ break ;
+ case INVOCATION :
+ dbg_breakpoint() ;
+ break ;
+ }
+ return 0 ;
+}
+#endif /* provide_crash_command */
+
+
+
+static int history_cmd(cmdmode_t mode)
+{
+ switch (mode)
+ {
+ case USAGE : usage("history") ; break ;
+ case SHORT_HELP : short_help("Print help about line editing features.");
+ break ;
+ case INVOCATION :
+ printHistoryList();
+ break;
+ case LONG_HELP :
+ long_help("Cygmon line editing allows you to repeat previously entered
+commands. The line editing commands are:
+ CR '\\n' Execute the currently displayed command
+ ctl-a move to Beginning of line
+ ctl-e End of line
+ ctl-f Forward char
+ ctl-b Backward char
+ ctl-k Delete to end of line
+ ctl-y yank Character (undelete)
+ ctl-d Delete current character
+ ctl-p edit previous command
+ ctl-u Erase Line
+ ctl-n Edit next command") ;
+ break ;
+ }
+ return 0 ;
+} /* history_cmd */
+
+#ifdef OTHERNAMES_CMD
+/* Switch to using the othernames (ie alternate register names) */
+int
+othernames_cmd (cmdmode_t mode)
+{
+ if (mode == USAGE)
+ {
+ usage ("othernames");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Switch between alternate register names.");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ othernames_cmd (USAGE);
+ long_help ("\
+The othernames command allows you to switch between alternate register
+names for a given target.");
+ example ("\
+othernames\n\
+Switches to the alternate register name set..");
+ return 0;
+ }
+ OTHERNAMES_CMD();
+
+ return 0;
+}
+#endif /* OTHERNAMES_CMD */
+
+
+#if defined(NVRAM_ETH_ADDR)
+int
+ethaddr_cmd (cmdmode_t mode)
+{
+ int i, n;
+ unsigned char addr[6];
+ char *p;
+
+ if (mode == USAGE)
+ {
+ usage ("ethaddr [xx:xx:xx:xx:xx:xx]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("get/set NVRAM backed ethernet address");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ ethaddr_cmd (USAGE);
+ long_help ("\
+The ethaddr command is used to view and modify the non-volatile ethernet\n\
+address. The address is specified by 6 colon-seperated 2 digit hexadecimal\n\
+numbers. If no address is specified, the current address is displayed.\n");
+ example ("ethaddr 00:00:8B:F1:36:01");
+ return 0;
+ }
+
+ if (argvect[1] != NULL)
+ {
+ if (strlen(argvect[1]) != 17 || argvect[2] != NULL)
+ {
+ return ethaddr_cmd (USAGE);
+ }
+
+ for (i = 0, p = argvect[1]; i < 6; i++, p++)
+ {
+ n = __hex(*p++);
+ if (n < 0)
+ return ethaddr_cmd (USAGE);
+ addr[i] = (n << 4);
+ n = __hex(*p++);
+ if (n < 0)
+ return ethaddr_cmd (USAGE);
+ addr[i] |= n;
+
+ if (*p != ':' && !(i == 5 && *p == '\0'))
+ return ethaddr_cmd (USAGE);
+ }
+ for (i = 0; i < 6; i++)
+ NVRAM_ETH_ADDR(i) = addr[i];
+ }
+ else
+ {
+ for (i = 0; i < 5; i++)
+ xprintf("%02x:", NVRAM_ETH_ADDR(i));
+ xprintf("%02x\n", NVRAM_ETH_ADDR(i));
+ }
+
+ return 0;
+}
+#endif /* NVRAM_ETH_ADDR */
+
+
+#if defined(NVRAM_IP_ADDR)
+int
+ipaddr_cmd (cmdmode_t mode)
+{
+ int i, j, n;
+ unsigned char addr[4];
+ char *p;
+
+ if (mode == USAGE)
+ {
+ usage ("ipaddr [n.n.n.n]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("get/set NVRAM backed ip address");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ ipaddr_cmd (USAGE);
+ long_help ("\
+The ipaddr command is used to view and modify the non-volatile internet\n\
+address. The address is specified by 4 dot-seperated 1-3 digit decimal\n\
+numbers. If no address is specified, the current address is displayed.\n");
+ example ("ipaddr 192.161.0.1");
+ return 0;
+ }
+
+ if (argvect[1] != NULL)
+ {
+ if (argvect[2] != NULL)
+ return ipaddr_cmd (USAGE);
+
+ p = argvect[1];
+
+ for (i = 0; i < 3; i++, p++)
+ {
+ for (j = n = 0; j < 3 && isdigit(*p); j++, p++)
+ n = n*10 + (*p - '0');
+ if (j == 0 || *p != '.' || n > 255)
+ return ipaddr_cmd (USAGE);
+ addr[i] = n;
+ }
+ for (j = n = 0; j < 3 && isdigit(*p); j++, p++)
+ n = n*10 + (*p - '0');
+ if (j == 0 || *p != '\0' || n > 255)
+ return ipaddr_cmd (USAGE);
+ addr[i] = n;
+
+ for (i = 0; i < 4; i++)
+ NVRAM_IP_ADDR(i) = addr[i];
+ }
+ else
+ {
+ for (i = 0; i < 3; i++)
+ xprintf("%d.", NVRAM_IP_ADDR(i));
+ xprintf("%d\n", NVRAM_IP_ADDR(i));
+ }
+
+ return 0;
+}
+#endif /* NVRAM_IP_ADDR */
+
+#if defined(NVRAM_TCP_PORT)
+int
+tcpport_cmd (cmdmode_t mode)
+{
+ int n;
+ char *p;
+
+ if (mode == USAGE)
+ {
+ usage ("ethaddr [xx:xx:xx:xx:xx:xx]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("get/set NVRAM backed tcp port number");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ tcpport_cmd (USAGE);
+ long_help ("\
+The tcpport command is used to view and modify the non-volatile tcp port\n\
+address used for debugging. The address is specified by decimal numer in\n\
+the range of 1-65535. If no port number is specified, the current port is\n\
+displayed.\n");
+ example ("tcpport 1000");
+ return 0;
+ }
+
+ if (argvect[1] != NULL)
+ {
+ if (argvect[2] != NULL)
+ return tcpport_cmd (USAGE);
+
+ p = argvect[1];
+ n = 0;
+ while (isdigit(*p))
+ {
+ n = n*10 + (*p++ - '0');
+ if (n > 65535)
+ return tcpport_cmd (USAGE);
+ }
+ if (*p != '\0')
+ return tcpport_cmd (USAGE);
+
+ NVRAM_TCP_PORT(0) = (n >> 8) & 0xff;
+ NVRAM_TCP_PORT(1) = n & 0xff;
+ }
+ else
+ xprintf("%d\n", (NVRAM_TCP_PORT(0) << 8) + NVRAM_TCP_PORT(1));
+
+ return 0;
+}
+#endif /* NVRAM_TCP_PORT */
+
+
+#ifdef __ECOS__
+# if (CYG_BYTEORDER == CYG_LSBFIRST)
+# define LITTLE_ENDIAN_TARGET
+# else
+# define BIG_ENDIAN_TARGET
+# endif
+#endif
+
+#ifdef LITTLE_ENDIAN_TARGET
+static int swap_bytes = 1;
+#else
+static int swap_bytes = 0;
+#endif
+
+int
+get_memory_display_mode (void)
+{
+ return swap_bytes;
+}
+
+void
+set_memory_display_mode (int mode)
+{
+ swap_bytes = mode;
+}
+
+
+/* Just to make DEFAULT_SIZE something usable, this may go elsewhere later.*/
+#ifndef DEFAULT_SIZE
+#define DEFAULT_SIZE 1
+#endif
+
+static int
+get_cmd_size (void)
+{
+ int size = 0;
+ char *sizestr;
+
+ sizestr = strchr (argvect[0], '.');
+
+ if (sizestr == NULL || sizestr[0] == '\0' || sizestr[1] == '\0')
+ {
+ size = DEFAULT_SIZE;
+ }
+ else
+ {
+ size = str2int (sizestr + 1, 10) / 8;
+ }
+ if (size != 1 && size != 2 && size != 4 && size != 8)
+ {
+ xprintf ("Invalid size.\n");
+ return -1;
+ }
+ return size;
+}
+
+
+void
+display_memory (char *value, int size, int littleEndian)
+{
+ int x;
+ int start = littleEndian ? size - 1 : 0 ;
+ int end = littleEndian ? -1 : size;
+ int incr = littleEndian ? -1 : 1;
+
+ if (value)
+ {
+ for (x = start; x != end; x += incr)
+ xprintf ("%02x", value[x] & 0xff);
+ }
+ else
+ {
+ for (x = start; x != end; x += incr)
+ xprintf ("..");
+ }
+}
+
+
+static int
+peek (void)
+{
+ mem_addr_t addr;
+ int size = get_cmd_size ();
+
+ if (size > 0)
+ {
+ /* We already checked to see if the command was legal when we called the
+ function, so there's no need to worry about that here. */
+
+ if (argvect[1] != 0)
+ {
+ char value[8];
+
+ str2addr (argvect[1], &addr);
+ if (read_memory (&addr, size, 1, value))
+ {
+ xprintf ("Memory read failed\n");
+ }
+ else
+ {
+ display_memory (value, size, get_memory_display_mode ());
+ xprintf ("\n");
+ }
+ }
+ else
+ {
+ xprintf ("Not enough arguments\n");
+ return mem_cmd (USAGE);
+ }
+ }
+ return 0;
+}
+
+/* Poke a single byte in memory. */
+
+static int
+poke (void)
+{
+ int size = 0;
+
+ size = get_cmd_size ();
+ if (size > 0)
+ {
+ /* We already checked to see if the command was legal when we called the
+ function, so there's no need to worry about that here. */
+
+ if ((argvect[1] != 0) && (argvect[2] != 0))
+ {
+ char value[8];
+ mem_addr_t addr;
+
+ str2addr (argvect[1], &addr);
+ hex2bytes (argvect[2], value, size);
+
+ if (get_memory_display_mode ())
+ {
+ /* Gotta swap this puppy. */
+ int x;
+
+ for (x = 0; x < (size / 2); x++)
+ {
+ char tmp = value[x];
+ value [x] = value [size - 1 - x];
+ value [size - 1 - x] = tmp;
+ }
+ }
+ if (write_memory (&addr, size, 1, value))
+ {
+ xprintf ("Memory write failed\n");
+ }
+#ifdef HAVE_BSP
+ bsp_flush_dcache((void *)addr.addr, size);
+ bsp_flush_icache((void *)addr.addr, size);
+#endif
+ }
+ else
+ {
+ xprintf ("Not enough arguments\n");
+ return mem_cmd (USAGE);
+ }
+ }
+ return 0;
+}
+
+
+/* I am cheap and easy. */
+int
+mem_cmd (cmdmode_t mode)
+{
+ if (mode == USAGE)
+ {
+ usage ("memory[.size] address [value]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("read/write memory");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ mem_cmd (USAGE);
+ long_help ("\
+The memory command is used to view and modify single locations in memory.\n\
+It can take a size extension, which follows the command name or partial\n\
+command name without a space, and is a period followed by the number of\n\
+bits to be viewed or modified. Options are 8, 16, 32, and 64. Without\n\
+a size extension, the memory command defaults to displaying or changing 8\n\
+bits at a time.\n\
+The memory command can take one or two arguments, independent of\n\
+whether a size extension is specified. With one argument, it displays the\n\
+contents of the specified location. With two arguments, it replaces the\n\
+contents of the specified location with the specified value.\n");
+ example ("\
+memory.8 45f6b2 57\n\
+Places the 8 bit value 57 at the location 45f6b2.");
+ return 0;
+ }
+
+ if (argvect[1] == NULL || (argvect[2] != NULL && argvect[3] != NULL))
+ {
+ return mem_cmd (USAGE);
+ }
+ if (argvect[1] != NULL && argvect[2] != NULL)
+ return poke ();
+ else
+ return peek ();
+}
+
+/* Memory dump function. */
+
+int
+dump_cmd (cmdmode_t mode)
+{
+ mem_addr_t addr;
+ char value[8];
+
+ if (mode == USAGE)
+ {
+ usage ("dump[.size] location [count]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Memory dump command");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ dump_cmd (USAGE);
+ long_help ("\
+The dump command displays a region of memory. If no count value is\n\
+supplied, the command displays 16 bytes. It can take a size\n\
+extension, which follows the command name or partial command name\n\
+without a space, and is a period followed by the number of bits to be\n\
+viewed or modified. Options are 8, 16, 32, and 64. Without a size\n\
+extension, the dump command defaults to displaying 8 bits at a time.\n\
+Addresses are aligned to a 16-byte boundary. Thus, dump 65 would show\n\
+all bytes from 60 through 6f.\n");
+ example ("\
+dump 44f5\n\
+Displays 16 bytes starting with 44f0 and ending with 44ff.");
+ return 0;
+ }
+
+ if (argvect[1] != 0 && (argvect[2] == NULL || argvect[3] == NULL))
+ {
+ mem_addr_t start_addr;
+ char chardumps[32];
+ int offset;
+ int count;
+ int line;
+ int size = get_cmd_size ();
+ int i;
+
+ if (size == -1)
+ /*
+ * Invalid size specified.
+ */
+ return 0;
+
+ str2addr (argvect[1], &addr);
+ if (argvect[2] != NULL)
+ {
+ count = str2int (argvect[2], 10);
+ count = (count + 15) / 16;
+ }
+ else
+ {
+ count = 1;
+ }
+ ADD_ALIGN(&addr, &start_addr, 16);
+ for (line = 0; line < count; line ++)
+ {
+ for (offset = 0; offset < 16; offset += size)
+ {
+ ADD_OFFSET(&start_addr, &addr, offset + line * 16);
+
+ if (offset == 0)
+ {
+ char buf[32];
+
+ addr2str (&addr, buf);
+ xprintf("%s: ", buf);
+ }
+ if (read_memory (&addr, size, 1, value))
+ {
+ display_memory (0, size, get_memory_display_mode ());
+ for (i = 0; i < size; i++)
+ {
+ value[i] = 0;
+ }
+ } else {
+ display_memory (value, size, get_memory_display_mode ());
+ }
+ xprintf (" ");
+ for (i = 0; i < size; i++)
+ {
+ chardumps[offset + i] = value[i] & 0x7f;
+ if (chardumps[offset + i] < 32)
+ chardumps[offset + i] = '.';
+ }
+ }
+ xprintf (" ");
+ for(i = 0; i < offset; i++)
+ {
+ xprintf ("%c", chardumps[i]);
+ }
+ xprintf ("\n");
+ }
+ }
+ else
+ {
+ dump_cmd (USAGE);
+ }
+ return 0;
+}
+
+static int scnt;
+static int (*srec_input_char) (void);
+
+static inline int
+gethexnibble(void)
+{
+ int ch;
+
+ inbuf[scnt++] = ch = srec_input_char();
+ if (ch >= '0' && ch <= '9')
+ return (ch - '0');
+ if (ch >= 'a' && ch <= 'f')
+ return (ch - 'a' + 10);
+ if (ch >= 'A' && ch <= 'F')
+ return (ch - 'A' + 10);
+
+ inbuf[scnt] = '\0';
+ xprintf("Bad hex char: %s\n", inbuf);
+ return -1;
+}
+
+
+static inline int
+gethexbyte(void)
+{
+ int nib;
+ unsigned char n;
+
+ if ((nib = gethexnibble()) < 0)
+ return -1;
+ n = nib << 4;
+ if ((nib = gethexnibble()) < 0)
+ return -1;
+ n |= nib;
+ return n;
+}
+
+static inline int
+chk_cksum(unsigned int cksum, int rval)
+{
+ int n;
+
+ if ((n = gethexbyte()) < 0)
+ return -1;
+
+ cksum = ~cksum & 0xff;
+
+ if (cksum != n)
+ {
+ inbuf[scnt] = '\0';
+ xprintf("Bad cksum[%02x]: %s\n", cksum, inbuf);
+ return -1;
+ }
+ return rval;
+}
+
+int
+load_srec(srec_input_func_t inp_func)
+{
+ int count, dcount, data, n, addr_bytes = 0, is_term, is_comment;
+ unsigned int address, cksum;
+ unsigned char data_buf[256];
+ mem_addr_t memaddr;
+
+ srec_input_char = inp_func;
+
+ is_comment = is_term = 0;
+
+ while (srec_input_char() != 'S')
+ ;
+
+ scnt = 0;
+ inbuf[scnt++] = 'S';
+
+ if ((n = gethexnibble()) < 0)
+ return -1;
+
+ switch (n)
+ {
+ case 0:
+ case 5:
+ is_comment = 1;
+ break;
+
+ case 1:
+ case 2:
+ case 3:
+ addr_bytes = n + 1;
+ break;
+
+ case 7:
+ case 8:
+ case 9:
+ is_term = 1;
+ addr_bytes = 11 - n;
+ break;
+
+ default:
+ inbuf[scnt] = '\0';
+ xprintf("Bad record type: %s\n", inbuf);
+ return -1;
+ }
+
+ if ((count = gethexbyte()) < 0)
+ return -1;
+ cksum = count;
+
+ --count; /* don't count chksum */
+
+ if (is_comment)
+ {
+ while (count > 0)
+ {
+ if ((n = gethexbyte()) < 0)
+ return -1;
+ cksum += n;
+ --count;
+ }
+ return chk_cksum(cksum, 0);
+ }
+
+ address = 0;
+ while (count > 0 && addr_bytes)
+ {
+ if ((n = gethexbyte()) < 0)
+ return -1;
+ cksum += n;
+ address = (address << 8) | n;
+ --addr_bytes;
+ --count;
+ }
+
+ if (is_term)
+ {
+ if (count || addr_bytes)
+ {
+ inbuf[scnt] = '\0';
+ xprintf("Malformed record cnt[%d] abytes[%d]: %s\n",
+ count, addr_bytes, inbuf);
+ return -1;
+ }
+ if (chk_cksum(cksum, 1) == 1)
+ {
+ set_pc (address);
+ xprintf("Setting start address: 0x%08x\n", address);
+ return 1;
+ }
+ return -1;
+ }
+
+ dcount = 0;
+
+ while (count > 0)
+ {
+ if ((data = gethexbyte()) < 0)
+ return -1;
+ cksum += data;
+ data_buf[dcount++] = data;
+ --count;
+ }
+
+ if (chk_cksum(cksum, 0))
+ return -1;
+
+ MAKE_STD_ADDR (address, &memaddr);
+ write_memory (&memaddr, 1, dcount, data_buf);
+#ifdef HAVE_BSP
+ bsp_flush_dcache((void *)memaddr.addr, dcount);
+ bsp_flush_icache((void *)memaddr.addr, dcount);
+#endif
+
+ return 0;
+}
+
+
+int
+load_cmd (cmdmode_t mode)
+{
+ if (mode == USAGE)
+ {
+ usage ("load");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Load srecords into memory");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ load_cmd (USAGE);
+ long_help ("\
+The load command switches the monitor into a state where it takes all input
+as s-records and stores them in memory. The monitor exits this mode when a
+termination record is hit, or certain errors (such as an invalid s-record)
+cause the load to fail.");
+ return 0;
+ }
+
+ if (argvect[1] != NULL)
+ {
+ return load_cmd (USAGE);
+ }
+
+ while (!load_srec(xgetchar))
+ ;
+
+ return 0;
+}
+
+#ifndef REGNAME_EXAMPLE
+# define REGNAME_EXAMPLE "a0"
+#endif
+
+#if !defined(__ECOS__) || defined(CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS)
+int
+transfer_cmd (cmdmode_t mode)
+{
+ if (mode == USAGE)
+ {
+ usage ("$");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Transfer to gdb stub");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ transfer_cmd (USAGE);
+ long_help ("\
+The transfer or $ command transfers control to the gdb stub. This function\n\
+does not actually need to be called by the user, as connecting to the board\n\
+with gdb will call it automatically. The transfer command takes no\n\
+arguments. The $ command does not wait for a return, but executes\n\
+immediately. A telnet setup in line mode will require a return when $ is\n\
+executed by the user, as the host computer does not pass any characters to\n\
+the monitor until a return is pressed. Disconnecting from the board in gdb\n\
+automatically returns control to the monitor.");
+ return 0;
+ }
+ if (argvect[1] == NULL)
+ {
+ return transfer_to_stub ();
+ }
+ else
+ {
+ transfer_cmd (USAGE);
+ }
+ return 0;
+}
+#endif
+
+static void
+display_group (int which_group)
+{
+ int len = 0;
+ int skipping_group = 0;
+ char buf[80];
+ int start_entry = 0;
+ int i;
+
+ if (which_group >= 0)
+ {
+ start_entry = which_group;
+ }
+
+ for (i = start_entry; regtab[i].registername != NULL; i++)
+ {
+ int buflen;
+
+ if (regtab[i].registernumber < 0)
+ {
+ if (which_group >= 0 && i != which_group)
+ {
+ break;
+ }
+
+ if (len > 0)
+ {
+ xprintf ("\n");
+ len = 0;
+ }
+ if (which_group < 0)
+ {
+ if (regtab[i].registernumber == -2)
+ {
+ skipping_group = 1;
+ xprintf ("[skipping %s]\n", regtab[i].registername);
+ }
+ else
+ {
+ skipping_group = 0;
+ xprintf ("[%s]\n", regtab[i].registername);
+#if 0
+ len = strlen (regtab[i].registername) + 2;
+ while (len < MAXLINES)
+ {
+ xputchar (' ');
+ len++;
+ }
+#endif
+ }
+ }
+ }
+ else
+ if (!skipping_group)
+ {
+#ifdef REG_VALID_FIELD_IN_REGSTRUCT
+#define REGVALID_VAL regtab[i].registervalid
+#else
+#define REGVALID_VAL 1
+#endif
+ xsprintf(buf, "%4s: %s",
+ regtab[i].registername,
+ get_register_str (regtab[i].registernumber, 0 , REGVALID_VAL));
+#undef REGVALID_VAL
+ buflen = strlen (buf);
+ if ((buflen + len + 3) >= 80)
+ {
+ xprintf ("\n");
+ len = 0;
+ }
+ else if(len > 0)
+ {
+ xprintf (" ");
+ len += 3;
+ }
+
+ xprintf (buf);
+ len += buflen;
+ }
+ }
+ if (len > 0)
+ {
+ xprintf ("\n");
+ }
+}
+
+static int
+getregister (void)
+{
+ int i;
+
+ if (argvect[1] == 0)
+ {
+ display_group (-1);
+ }
+ else
+ {
+ for (i = 0; regtab[i].registername != NULL; i++)
+ {
+ if (!(strcmp (argvect[1], regtab[i].registername)))
+ {
+ break;
+ }
+ }
+ if (regtab[i].registername == NULL)
+ {
+ xprintf ("No such register\n");
+ }
+ else
+ {
+ if (regtab[i].registernumber < 0)
+ {
+ display_group (i);
+ }
+ else
+ {
+#ifdef REG_VALID_FIELD_IN_REGSTRUCT
+#define REGVALID_VAL regtab[i].registervalid
+#else
+#define REGVALID_VAL 1
+#endif
+ xprintf("%s: %s\n", argvect[1],
+ get_register_str (regtab[i].registernumber, 1, REGVALID_VAL));
+#undef REGVALID_VAL
+ }
+ }
+ }
+ return 0;
+}
+
+static int
+setregister (void)
+{
+ int number = -1;
+ int i;
+ if ((argvect[1] != 0) && (argvect[2] != 0))
+ {
+ i = 0;
+ while (regtab[i].registername != NULL)
+ {
+ if (!(strcmp (argvect[1], regtab[i].registername)))
+ {
+ number = regtab[i].registernumber;
+ break;
+ }
+ i++;
+ }
+ if (number < 0)
+ xprintf ("Unknown register name %s\n", argvect[1]);
+ else
+ store_register (number, argvect[2]);
+ }
+ else
+ {
+ xprintf ("Not enough arguments\n");
+ }
+ return 0;
+}
+
+
+int
+reg_cmd (cmdmode_t mode)
+{
+ if (mode == USAGE)
+ {
+ usage ("register [register name] [value]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("View and manipulate registers");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ reg_cmd (USAGE);
+ long_help ("\
+The register command allows the viewing and manipulation of register\n\
+contents. It can take zero, one, or two arguments. When called with zero\n\
+arguments, the register command displays the values of all registers. When\n\
+called with only the register name argument, it displays the contents of\n\
+the specified register. When called with both a register name and a value,\n\
+it places that value into the specified register.\n");
+ example ("\
+register " REGNAME_EXAMPLE " 1f\n\
+Places the value 1f in the register " REGNAME_EXAMPLE);
+ return 0;
+ }
+
+ if (argvect[1] != NULL && argvect[2] != NULL)
+ {
+ if (argvect[3] != NULL)
+ {
+ return reg_cmd (USAGE);
+ }
+ return setregister ();
+ }
+ else
+ return getregister ();
+}
+
+
+/* execute the program in memory */
+int
+go_cmd (cmdmode_t mode)
+{
+#ifdef HAS_TIMER
+ extern tick_type start_tickcount;
+#endif
+
+ if (mode == USAGE)
+ {
+ usage ("go [location]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Start user program execution");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ go_cmd (USAGE);
+ long_help ("\
+The go command starts user program execution. It can take zero or one\n\
+argument. If no argument is provided, go starts execution at the current\n\
+pc. If an argument is specified, go sets the pc to that location, and then\n\
+starts execution at that location.\n");
+ example ("
+go 40020000\n\
+Sets the pc to 40020000, and starts program execution.");
+ return 0;
+ }
+
+ if (argvect[1] != NULL && argvect[2] != NULL)
+ {
+ return go_cmd (USAGE);
+ }
+ if (argvect[1] != NULL)
+ {
+ set_pc (str2int (argvect[1], 16));
+ }
+
+#ifdef HAS_TIMER
+ start_tickcount = __read_ticks ();
+#endif
+ /* We want monitor_loop to exit now. */
+ return 1;
+}
+
+#ifdef HAS_TIMER
+int
+timer_cmd (cmdmode_t mode)
+{
+ if (mode == USAGE)
+ {
+ usage ("timer [state]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Enable and disable timer");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ timer_cmd (USAGE);
+ long_help ("\
+The timer command allows control of the on board timer. It takes zero\n\
+or one argument. With zero arguments, it displays the state of the timer,\n\
+with one argument, which can start with e or d, it enables or disables the\n\
+timer, respectively.\n");
+ example ("\
+timer e\n\
+Enables the timer.");
+ return 0;
+ }
+
+ if (argvect[1] != NULL)
+ {
+ if (argvect[2] != NULL)
+ {
+ return timer_cmd (USAGE);
+ }
+ else if (argvect[1][0] == 'e')
+ {
+ __settimer (0, 0);
+ }
+ else if (argvect[1][0] == 'd')
+ {
+ __disable_timer ();
+ }
+ else
+ {
+ timer_cmd (USAGE);
+ }
+ }
+ if (__timer_enabled ())
+ {
+ xprintf ("Timer is currently enabled.\n");
+ }
+ else
+ {
+ xprintf ("Timer is currently disabled.\n");
+ }
+ return 0;
+}
+#endif
+
+int
+clear_breakpoint_cmd (cmdmode_t mode)
+{
+ if (mode == USAGE)
+ {
+ usage ("unbreak location");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Clear breakpoint");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ clear_breakpoint_cmd (USAGE);
+ long_help ("\
+The unbreak command removes breakpoints from memory. It takes one\n\
+argument, the location to remove the breakpoint from.\n");
+ example ("\
+unbreak 4ff5\n\
+Removes a previously set breakpoint at memory location 4ff5.");
+ return 0;
+ }
+
+ if (argvect[1] == NULL || argvect[2] != NULL)
+ {
+ clear_breakpoint_cmd (USAGE);
+ }
+ else
+ {
+ mem_addr_t location;
+ str2addr (argvect[1], &location);
+ if (clear_mon_breakpoint (location))
+ {
+ xprintf("Unable to remove breakpoint at 0x%08lx\n", location.addr);
+ }
+ }
+ return 0;
+}
+
+
+int
+breakpoint_cmd (cmdmode_t mode)
+{
+ if (mode == USAGE)
+ {
+ usage ("break [location]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Set or display breakpoints");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ breakpoint_cmd (USAGE);
+ long_help ("\
+The break command displays and sets breakpoints in memory. It takes zero\n\
+or one argument. With zero arguments, it displays a list of all currently\n\
+set breakpoints. With one argument it sets a new breakpoint at the\n\
+specified location.\n");
+ example ("\
+break 4ff5\n\
+Sets a breakpoint at address 4ff5.");
+ return 0;
+ }
+
+ if (argvect[1] == NULL)
+ {
+ return show_breakpoints ();
+ }
+ else if (argvect[2] != NULL)
+ {
+ breakpoint_cmd (USAGE);
+ }
+ else
+ {
+ mem_addr_t location;
+
+ str2addr (argvect[1], &location);
+ if (add_mon_breakpoint (location))
+ {
+ xprintf("Unable to set breakpoint at 0x%08lx\n", location.addr);
+ }
+ }
+ return 0;
+}
+
+
+int
+version_cmd (cmdmode_t mode)
+{
+ if (mode == USAGE)
+ {
+ usage ("version");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Display version");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ version_cmd (USAGE);
+ long_help ("\
+The version command displays the version of the monitor.");
+ return 0;
+ }
+
+ if (argvect[1] == NULL)
+ {
+ version ();
+ }
+ else
+ {
+ version_cmd (USAGE);
+ }
+ return 0;
+}
+
+int
+set_serial_port_cmd (cmdmode_t mode)
+{
+ if (mode == USAGE)
+ {
+ usage ("port [port number]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Set the active serial port");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ set_serial_port_cmd (USAGE);
+ long_help ("\
+The port command allows control over the serial port being used by the\n\
+monitor. It takes zero or one argument. Called with zero arguments it\n\
+displays the port currently in use by the monitor. Called with one\n\
+argument it switches the port in use by the monitor to the one specified.\n\
+It then prints out a message on the new port to confirm the switch.\n");
+ example ("\
+port 1\n\
+Switches the port in use by the monitor to port 1.");
+ return 0;
+ }
+ if (argvect[1] != NULL && argvect[2] != NULL)
+ {
+ set_serial_port_cmd (USAGE);
+ return 0;
+ }
+ if (argvect [1] != NULL)
+ {
+#ifdef HAVE_BSP
+ if (bsp_set_debug_comm(str2int (argvect[1], 10)) < 0)
+ xprintf("Invalid port number.\n");
+ else
+ /* Since we are using the new port, we just need to write
+ something to tell the user that this is the active port */
+ xprintf ("Cygmon I/O now on this port.\n");
+#else
+ __setTty (str2int (argvect[1], 10));
+ /* Since we are using the new port, we just need to write
+ something to tell the user that this is the active port */
+ xprintf ("Cygmon I/O now on this port.\n");
+#endif
+ }
+ else
+ {
+ xprintf ("serial port currently set to %d\n", __getTty());
+ return 0;
+ }
+ return 0;
+}
+
+int
+step_cmd (cmdmode_t mode)
+{
+ if (mode == USAGE)
+ {
+ usage ("step [location]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Single step user program");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ step_cmd (USAGE);
+ long_help ("\
+The step command causes one instruction of the user program to execute, then\n\
+returns control to the monitor. It can take zero or one argument. If no\n\
+argument is provided, step executes one instruction at the current pc. If\n\
+a location is specified, step executes one instruction at the specified\n\
+location.\n");
+ example ("
+step\n\
+Executes one instruction at the current pc.");
+ return 0;
+ }
+
+ if (argvect[1] != NULL && argvect[2] != NULL)
+ {
+ step_cmd (USAGE);
+ return 0;
+ }
+ if (argvect[1] != NULL)
+ set_pc (str2int (argvect[1], 16));
+
+ __single_step ();
+ return 1;
+
+}
+
+#if HAVE_CACHE
+/* This cache function needs to be in processor-specific files. */
+
+int
+cache_cmd (cmdmode_t mode)
+{
+ int x;
+ int cache_op = CACHE_NOOP;
+ int which_cache = -1;
+
+ if (mode == USAGE)
+ {
+ usage ("cache [type] [state]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Manipulate caches");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ cache_cmd (USAGE);
+ long_help ("\
+The cache command displays and changes the states of the caches. It takes\n\
+zero, one, or two arguments. With no arguments, it displays the state of\n\
+both the instruction cache and the data cache. With one argument, it\n\
+displays the state of the specified type of cache. With two arguments, it\n\
+changes the state of the specified cache to the specified state.\n");
+ example ("\
+cache i d\n\
+Disables the instruction cache.");
+ return 0;
+ }
+
+ if (argvect[1] != NULL && argvect[2] != NULL && argvect[3] != NULL)
+ {
+ return cache_cmd (USAGE);
+ }
+ if (argvect[1] != NULL)
+ {
+ if (argvect[1][0] == 'd')
+ which_cache = 0;
+ else if (argvect[1][0] == 'i')
+ which_cache = 1;
+ else
+ {
+ xprintf ("unknown cache type %s\n", argvect[1]);
+ return 0;
+ }
+ if (argvect[2] != NULL)
+ {
+ if (argvect[2][0] == 'e')
+ cache_op = CACHE_ENABLE;
+ else if (argvect[2][0] == 'd')
+ cache_op = CACHE_DISABLE;
+ else if (argvect[2][0] == 'f')
+ cache_op = CACHE_FLUSH;
+ else
+ {
+ xprintf ("Unknown cache op %s\n", argvect[2]);
+ return 0;
+ }
+ }
+ }
+ if (which_cache == 0 || which_cache == -1)
+ {
+ __data_cache (cache_op);
+ if (cache_op == CACHE_FLUSH)
+ {
+ xprintf ("Flushed dcache\n");
+ }
+ x = __data_cache (CACHE_NOOP);
+ xprintf ("dcache is ");
+ xprintf (x ? "enabled\n" : "disabled\n");
+ }
+ if (which_cache == 1 || which_cache == -1)
+ {
+ __instruction_cache (cache_op);
+ if (cache_op == CACHE_FLUSH)
+ {
+ xprintf ("Flushed icache\n");
+ }
+ x = __instruction_cache (CACHE_NOOP);
+ xprintf ("icache is ");
+ xprintf (x ? "enabled\n" : "disabled\n");
+ }
+ return 0;
+}
+#endif
+
+int
+set_serial_speed_cmd (cmdmode_t mode)
+{
+ if (mode == USAGE)
+ {
+ usage ("baud speed");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Set serial port baud rate");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ set_serial_speed_cmd (USAGE);
+ long_help ("\
+The baud command sets the speed of the active serial port. It takes one\n\
+argument, which specifies the speed to which the port will be set.\n");
+ example ("\
+baud 9600\n\
+Sets the speed of the active port to 9600 baud.");
+ return 0;
+ }
+
+ if (argvect[1] == NULL || argvect[2] != NULL)
+ {
+ return set_serial_speed_cmd (USAGE);
+ }
+ else
+ {
+#ifdef HAVE_BSP
+ int channel_id = bsp_set_debug_comm(-1);
+ int baud = str2int (argvect[1], 10);
+
+ xprintf("Setting serial baud rate on channel %d to %d baud\n",
+ channel_id, baud);
+
+ if (bsp_set_serial_baud(bsp_set_debug_comm(-1),
+ str2int (argvect[1], 10)) < 0)
+ xprintf("Invalid baud rate\n");
+#else
+ __set_baud_rate (str2int (argvect[1], 10));
+#endif
+ }
+ return 0;
+}
+
+
+int
+set_term_cmd (cmdmode_t mode)
+{
+ if (mode == USAGE)
+ {
+ usage ("terminal type");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Set the terminal type");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ set_term_cmd (USAGE);
+ long_help ("\
+The terminal command sets the type of the current terminal to that specified\n\
+in the type argument. The only available terminal types are vt100 and dumb.\n\
+This is used by the line editor to determine how to update the terminal\n\
+display.\n");
+ example ("\
+terminal dumb\n\
+Sets the type of the current terminal to a dumb terminal.\n");
+ return 0;
+ }
+
+ if (argvect[1] == NULL || argvect[2] != NULL)
+ set_term_cmd (USAGE);
+ else
+ set_term_name (argvect[1]);
+ return 0;
+}
+
+int
+reset_cmd (cmdmode_t mode)
+{
+ if (mode == USAGE)
+ {
+ usage ("reset");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Reset the board (not on all architectures).");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ reset_cmd (USAGE);
+ long_help ("\
+The reset command resets the board. This may not be implemented\n\
+on all architectures");
+ return 0;
+ }
+
+ if (argvect[1] != NULL)
+ {
+ reset_cmd (USAGE);
+ }
+ else
+ {
+ __reset ();
+ }
+ return 0;
+}
+
+#if HAVE_USAGE
+int
+memusage_cmd (cmdmode_t mode)
+{
+ extern int sdata, _end;
+
+ if (mode == USAGE)
+ {
+ usage ("usage");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Show monitor memory usage");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ memusage_cmd (USAGE);
+ long_help ("\
+The usage command shows the amount of memory being used by the monitor,\n\
+broken down by category. Despite its name, it has nothing to do with the\n\
+usage of any other command.\n");
+ return 0;
+ }
+
+ if (argvect[1] != NULL)
+ {
+ return memusage_cmd (USAGE);
+ }
+ else
+ {
+ xprintf ("%d bytes were allocated with sbrk\n", (char *)sbrk (0) - (char *)&_end);
+ }
+ return 0;
+}
+#endif /* HAVE_USAGE */
+
+int
+disassemble_cmd (cmdmode_t mode)
+{
+#ifdef DISASSEMBLER
+ int x;
+
+ if (mode == USAGE)
+ {
+ usage ("disassemble [location]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Disassemble memory");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ disassemble_cmd (USAGE);
+ long_help ("\
+The disassemble command disassembles the contents of memory. Because of the\n\
+way breakpoints are handled, all instructions are shown and breakpoints are\n\
+not visible in the disassembled code. The disassemble command takes zero\n\
+or one argument. When called with zero arguments, it starts disassembling\n\
+from the current (user program) pc. When called with a location, it starts\n\
+disassembling from the specified location. When called after a previous\n\
+call and with no arguments, it disassembles the next area of memory after\n\
+the one previously disassembled.\n");
+ example ("\
+disassemble 45667000\n\
+Displays disassembled code starting at location 45667000.");
+ return 0;
+ }
+ if (argvect [1] != NULL && argvect[2] != NULL)
+ {
+ return disassemble_cmd (USAGE);
+ }
+
+ if(argvect [1] != NULL)
+ str2addr (argvect [1], &last_pc);
+ for (x = 0; x < 10; x++)
+ last_pc = do_dis (&last_pc);
+ flush_dis ();
+#else
+#warning "DISASSEMBLER not implemented"
+ xprintf ("disassembler not available\n");
+#endif
+
+ return 0;
+}
+
+int
+copy_cmd (cmdmode_t mode)
+{
+ mem_addr_t src, dst;
+ target_register_t size;
+
+ if (mode == USAGE)
+ {
+ usage ("copy startaddr destaddr amount");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Copies one area of memory to another");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ copy_cmd (USAGE);
+ long_help ("\
+The copy command is used to copy 'amount' bytes of memory\n\
+from 'startaddr' to 'destaddr'\n");
+ example ("\
+copy 10000 20000 300\n\
+Copies 0x300 bytes of memory from 0x10000 to 0x20000.");
+ return 0;
+ }
+ if (argvect[1] == NULL || argvect[2] == NULL || argvect[3] == NULL
+ || argvect[4] != NULL)
+ {
+ return copy_cmd (USAGE);
+ }
+ str2addr (argvect[1], &src);
+ str2addr (argvect[2], &dst);
+ size = str2int (argvect[3], 16);
+ while (size > 0)
+ {
+ char buf[128];
+
+ int msize = (size > 128) ? 128 : size;
+ if (read_memory (&src, 1, msize, buf))
+ {
+ xprintf ("Memory read failed\n");
+ break;
+ }
+ if (write_memory (&dst, 1, msize, buf))
+ {
+ xprintf ("Memory write failed\n");
+ break;
+ }
+#ifdef HAVE_BSP
+ bsp_flush_dcache((void *)dst.addr, msize);
+ bsp_flush_icache((void *)dst.addr, msize);
+#endif
+ ADD_OFFSET (&src, &src, msize);
+ ADD_OFFSET (&dst, &dst, msize);
+ size -= msize;
+ }
+ return 0;
+}
+
+#ifndef HAVE_BSP
+int
+set_program_args_cmd (cmdmode_t mode)
+{
+ int argc;
+
+ if (mode == USAGE)
+ {
+ usage ("setargs [args]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Sets the program arguments passed to main()");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ set_program_args_cmd (SHORT_HELP);
+ return 0;
+ }
+ for (argc = 1; argvect[argc] != NULL; argc++)
+ ;
+ __set_program_args (argc - 1, argvect + 1);
+ return 0;
+}
+#endif
+
+
+int
+fill_cmd (cmdmode_t mode)
+{
+ if (mode == USAGE)
+ {
+ usage ("fill[.size] startaddress endaddress [value]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Fills memory with a specified value");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ fill_cmd (USAGE);
+ long_help("\
+The fill command is used to fill a region of memory from 'startaddress'\n\
+to 'endaddress' with the value in 'value'. If no value is specificed,\n\
+it uses zero. It can take a size extension, which follows the command\n\
+name or partial command name without a space, and is a period followed\n\
+by the size of the writes that are used, in bits. Options are 8, 16,\n\
+32, and 64. Without a size extension, the fill command defaults to\n\
+changing 8 bits at a time.\n");
+ example ("\
+fill.32 10000 20000 32\n\
+Fills the region between 0x10000 and 0x20000 with the 32 bit value 0x32.");
+ return 0;
+ }
+ if ((argvect[1] == NULL || argvect[2] == NULL)
+ || (argvect[3] != NULL && argvect[4] != NULL))
+ {
+ fill_cmd (USAGE);
+ return 0;
+ } else {
+ mem_addr_t start,end;
+ char value[8];
+ int size = get_cmd_size();
+ int amt;
+
+ if (size == -1)
+ /*
+ * Invalid size specified.
+ */
+ return 0;
+
+ if (argvect[3] != NULL)
+ {
+ hex2bytes (argvect[3], value, size);
+ }
+ else
+ {
+ hex2bytes ("0", value, size);
+ }
+ str2addr (argvect[1], &start);
+ str2addr (argvect[2], &end);
+ amt = MEM_ADDR_DIFF (end, start);
+ if (amt < 0)
+ {
+ xprintf ("Addresses in incorrect order\n");
+ }
+ else
+ {
+ int x;
+ if (get_memory_display_mode ())
+ {
+ /* Gotta swap this puppy. */
+ int x;
+
+ for (x = 0; x < (size / 2); x++)
+ {
+ char tmp = value[x];
+ value [x] = value [size - 1 - x];
+ value [size - 1 - x] = tmp;
+ }
+ }
+
+ xprintf ("Writing %d units\n", amt / size + 1);
+ for (x = amt / size; x >= 0; x--)
+ {
+ if (write_memory (&start, size, 1, value))
+ {
+ xprintf ("Memory write failed\n");
+ break;
+ }
+ ADD_OFFSET (&start, &start, size);
+ }
+ }
+ }
+ return 0;
+}
+
+
+int
+swapmem_cmd (cmdmode_t mode)
+{
+ int display_settings = 0;
+
+ if (mode == USAGE)
+ {
+ usage ("swapmem [little|big]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Sets whether or not memory values are byte-swapped");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ swapmem_cmd (USAGE);
+
+ long_help("\
+The swapmem command is used to determine whether or not memory values are\n\
+displayed and written in little or big-endian byte order. By default, values\n\
+are read and written to match the byte order of the target CPU.\n\
+This command does not alter the CPU state in any way; it only changes the\n\
+way memory values are displayed and written within the monitor.\n");
+ example("\
+swapmem \n\
+Displays the byte order that is currently in effect.");
+ return 0;
+ display_settings = 1;
+ }
+ else
+ {
+ if (argvect[1] != NULL && argvect[2] != NULL)
+ {
+ swapmem_cmd (USAGE);
+ return 0;
+ }
+ }
+ if (display_settings || argvect[1] == NULL)
+ {
+ if (get_memory_display_mode ())
+ {
+ xprintf ("Memory values are read and written in little-endian byte order.\n");
+ }
+ else
+ {
+ xprintf ("Memory values are read and written in big-endian byte order.\n");
+ }
+ return 0;
+ }
+ if (strncmp (argvect[1], "little", strlen (argvect[1])) == 0)
+ {
+ set_memory_display_mode (1);
+ xprintf ("Memory values are now read and written in little-endian order.\n");
+ }
+ else if (strncmp (argvect[1], "big", strlen (argvect[1])) == 0)
+ {
+ set_memory_display_mode (0);
+ xprintf ("Memory values are now read and written in big-endian order.\n");
+ }
+ else
+ {
+ return swapmem_cmd (USAGE);
+ }
+ return 0;
+}
+
+#ifdef MONITOR_CONTROL_INTERRUPTS
+int
+int_cmd (cmdmode_t mode)
+{
+ if (mode == USAGE)
+ {
+ usage ("interrupt [on|off]");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("Enables or disables interrupts within the monitor");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ int_cmd (USAGE);
+ long_help("\
+The interrupt command is used to enable or disable interrupts while the\n\
+monitor is running.");
+ return 0;
+ }
+ if (argvect[1] != NULL && argvect[2] != NULL)
+ {
+ int_cmd (USAGE);
+ return 0;
+ }
+ if (argvect[1] != NULL)
+ {
+ if (strcmp (argvect[1], "on") == 0)
+ {
+ monitor_enable_interrupts ();
+ }
+ else if (strcmp (argvect[1], "off") == 0)
+ {
+ monitor_disable_interrupts ();
+ }
+ else
+ {
+ int_cmd (USAGE);
+ return 0;
+ }
+ }
+ xprintf ("Interrupts ");
+ if (monitor_interrupt_state ())
+ {
+ xprintf ("enabled\n");
+ }
+ else
+ {
+ xprintf ("disabled\n");
+ }
+ return 0;
+}
+#endif
+
+
+/* Table used by the crc32 function to calcuate the checksum. */
+static uint32 crc32_table[256];
+static int crc_initted = 0;
+
+static uint32
+crc32 (unsigned char *buf, int len, uint32 crc)
+{
+ if (! crc_initted)
+ {
+ /* Initialize the CRC table and the decoding table. */
+ int i, j;
+ uint32 c;
+
+ crc_initted = 1;
+ for (i = 0; i < 256; i++)
+ {
+ for (c = i << 24, j = 8; j > 0; --j)
+ c = c & 0x80000000 ? (c << 1) ^ 0x04c11db7 : (c << 1);
+ crc32_table[i] = c;
+ }
+ }
+
+ while (len--)
+ {
+ crc = (crc << 8) ^ crc32_table[((crc >> 24) ^ *buf) & 255];
+ buf++;
+ }
+ return crc;
+}
+
+
+int
+checksumcmd (cmdmode_t mode)
+{
+ mem_addr_t start, end;
+ uint32 crc = 0xffffffff;
+
+ if (mode == USAGE)
+ {
+ usage ("crc startaddr endaddr");
+ return 0;
+ }
+ if (mode == SHORT_HELP)
+ {
+ short_help ("checksum an area of memory");
+ return 0;
+ }
+ if (mode == LONG_HELP)
+ {
+ checksumcmd (USAGE);
+ long_help ("\
+The crc command is used to calculate a standard CRC32 checksum of the\n\
+specified memory region. The checksum is printed out as a hexadecimal\n\
+value.");
+ return 0;
+ }
+ if (argvect[1] == NULL || argvect[2] == NULL || argvect[3] != NULL)
+ {
+ return checksumcmd (USAGE);
+ }
+
+ str2addr (argvect[1], &start);
+ str2addr (argvect[2], &end);
+ while (start.addr < end.addr)
+ {
+ char c[1024];
+ int len = end.addr - start.addr;
+ if (len > sizeof(c))
+ len = sizeof(c);
+
+ read_memory (&start, 1, len, c);
+ crc = crc32 (c, len, crc);
+ start.addr += len;
+ }
+ xprintf("0x%08lx is checksum\n", crc);
+ return 0;
+}
+
+char **argvect;
+static char argvect_cmd[MAXLINELEN];
+
+static char **
+buildargv (char *input)
+{
+ static char *arglist[256];
+ int numargs = 0;
+
+ while (1)
+ {
+ while (isspace ((unsigned char)*input) && *input != 0)
+ input++;
+ if (*input == 0)
+ break;
+ arglist [numargs++] = input;
+ while (!isspace ((unsigned char)*input) && *input != 0)
+ input++;
+ if (*input == 0)
+ break;
+ *(input++) = 0;
+ }
+ arglist [numargs] = NULL;
+ return arglist;
+}
+
+
+int
+monitor_loop (void)
+{
+ int state = 1, return_value = 0;
+
+ while (state == 1)
+ {
+ /* Get a line of input, putting it in the input buffer */
+ lineedit (PROMPT, inbuf, sizeof (inbuf));
+ xprintf ("\n");
+
+ if (switch_to_stub_flag)
+ {
+#ifndef HAVE_BSP
+ switch_to_stub_flag = 0;
+#endif
+ return transfer_to_stub ();
+ }
+
+ /* Separate off the command from any other stuff on the line */
+
+ strcpy (argvect_cmd, inbuf);
+ argvect = buildargv (argvect_cmd);
+
+ if (argvect[0] != NULL && argvect[0][0] != '\0')
+ {
+ char *ptr;
+ int command_number;
+
+ strcpy (cmd, argvect[0]);
+
+ /* Function to split off . delimiters. */
+ ptr = strchr (cmd, '.');
+
+ if (ptr != NULL && *ptr == '.')
+ *ptr = '\0';
+
+ /* See if it's an alias. */
+ command_number = alias_compare (cmd);
+
+ /* Compare input to command list, check for conflicts. */
+ if (command_number < 0)
+ command_number = command_compare (cmd);
+
+ /* If we found a command, just run the function */
+ if (command_number >= 0)
+ {
+ int status;
+ /* Execute the function, if the function returns a non-zero
+ value, break out of the loop and return. */
+ status = (*cmdtab[command_number].function) (INVOCATION);
+ if (status)
+ {
+ state = 0;
+ if (status < 0)
+ return_value = 1;
+ }
+ }
+ else
+ {
+ /* If none of the commands or aliases match, complain. */
+ xprintf ("Not a legal command\n");
+ }
+
+ if (inbuf[0] != '\0')
+ addHistoryCmd (inbuf);
+ }
+ }
+ return return_value;
+}
+
+
diff --git a/cesar/ecos/packages/cygmon/current/misc/monitor_cmd.h b/cesar/ecos/packages/cygmon/current/misc/monitor_cmd.h
new file mode 100644
index 0000000000..23535b688a
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/monitor_cmd.h
@@ -0,0 +1,126 @@
+//==========================================================================
+//
+// monitor_cmd.h
+//
+// Monitor command definitions for the CygMON ROM monitor
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose: Monitor command definitions for the CygMON ROM monitor
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#ifndef MONITOR_CMD_H
+#define MONITOR_CMD_H
+
+#ifndef ASM
+typedef enum {
+ INVOCATION, USAGE, SHORT_HELP, LONG_HELP
+} cmdmode_t;
+
+struct cmdentry
+{
+ char *alias;
+ char *cmd;
+ int (*function) (cmdmode_t);
+};
+
+extern struct cmdentry cmdtab [];
+
+extern int monitor_loop (void);
+
+extern char inbuf[];
+
+extern char **argvect;
+
+typedef int (*srec_input_func_t)(void);
+
+extern int load_srec(srec_input_func_t inp_func);
+
+#ifdef USE_HELP
+extern void usage (char *string);
+extern void short_help (char *string);
+extern void long_help (char *string);
+extern void example (char *string);
+#else
+#define usage(x) no_help_usage ()
+#define short_help(x) no_help()
+#define long_help(x) no_help()
+#define example(x)
+extern void no_help (void);
+extern void no_help_usage (void);
+#endif
+extern int help_cmd (cmdmode_t mode);
+extern int mem_cmd (cmdmode_t mode);
+
+extern int dump_cmd (cmdmode_t mode);
+extern int ethaddr_cmd (cmdmode_t mode);
+extern int ipaddr_cmd (cmdmode_t mode);
+extern int tcpport_cmd (cmdmode_t mode);
+extern int load_cmd (cmdmode_t mode);
+extern int reg_cmd (cmdmode_t mode);
+extern int go_cmd (cmdmode_t mode);
+extern int othernames_cmd (cmdmode_t mode);
+extern int step_cmd (cmdmode_t mode);
+extern int transfer_cmd (cmdmode_t mode);
+extern int timer_cmd (cmdmode_t mode);
+extern int disassemble_cmd (cmdmode_t mode);
+extern int breakpoint_cmd (cmdmode_t mode);
+extern int clear_breakpoint_cmd (cmdmode_t mode);
+extern int memusage_cmd (cmdmode_t mode);
+extern int set_serial_port_cmd (cmdmode_t mode);
+extern int set_serial_speed_cmd (cmdmode_t mode);
+extern int version_cmd (cmdmode_t mode);
+extern int cache_cmd (cmdmode_t mode);
+extern int set_term_cmd (cmdmode_t mode);
+extern int reset_cmd (cmdmode_t mode);
+extern int copy_cmd (cmdmode_t mode);
+extern int fill_cmd (cmdmode_t mode);
+extern int set_program_args_cmd (cmdmode_t mode);
+extern int swapmem_cmd (cmdmode_t mode);
+extern int checksumcmd (cmdmode_t mode);
+extern int int_cmd (cmdmode_t mode);
+#endif
+
+#endif
diff --git a/cesar/ecos/packages/cygmon/current/misc/stub-tservice.h b/cesar/ecos/packages/cygmon/current/misc/stub-tservice.h
new file mode 100644
index 0000000000..10aa56cb6b
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/stub-tservice.h
@@ -0,0 +1,54 @@
+//==========================================================================
+//
+// stub-tservice.h
+//
+//
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+// Placeholder
diff --git a/cesar/ecos/packages/cygmon/current/misc/tservice.h b/cesar/ecos/packages/cygmon/current/misc/tservice.h
new file mode 100644
index 0000000000..1338b37e8f
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/tservice.h
@@ -0,0 +1,84 @@
+#ifndef __TSERVICE_H__
+#define __TSERVICE_H__
+//==========================================================================
+//
+// tservice.h
+//
+// These are the core functions are expected to be provided by the
+// target dependent services.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+/* These are the core functions are expected to be provided by the
+ target dependent services. They are used by both cygmon and by
+ libstub
+*/
+
+
+extern int read_memory (mem_addr_t *src, int size, int amt, char *dst);
+
+extern int write_memory (mem_addr_t *dst, int size, int amt, char *src);
+
+
+#ifndef USE_ECOS_HAL_BREAKPOINTS
+extern void set_breakpoint (struct bp *bp);
+extern void clear_breakpoint (struct bp *bp);
+#endif // USE_ECOS_HAL_BREAKPOINTS
+
+#ifndef HAVE_BSP
+extern void set_pc (target_register_t pc);
+#endif
+
+extern target_register_t next_step_pc (void);
+
+extern void enable_interrupts (void);
+
+#endif // __TSERVICE_H__
+
+
+extern void initialize_mon(void);
diff --git a/cesar/ecos/packages/cygmon/current/misc/unistd.h b/cesar/ecos/packages/cygmon/current/misc/unistd.h
new file mode 100644
index 0000000000..6bbfe6eb11
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/unistd.h
@@ -0,0 +1,54 @@
+//==========================================================================
+//
+// unistd.h
+//
+// Standard Unix/POSIX environment
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-10-20
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+// Placeholder only
diff --git a/cesar/ecos/packages/cygmon/current/misc/utils.c b/cesar/ecos/packages/cygmon/current/misc/utils.c
new file mode 100644
index 0000000000..04b6174abd
--- /dev/null
+++ b/cesar/ecos/packages/cygmon/current/misc/utils.c
@@ -0,0 +1,376 @@
+//==========================================================================
+//
+// utils.c
+//
+// Monitor utilities.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: gthomas, dmoseley
+// Date: 1999-10-20
+// Purpose: Monitor utilities.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#ifdef HAVE_BSP
+#include <bsp/bsp.h>
+#include <bsp/cpu.h>
+#include <bsp/hex-utils.h>
+#endif
+#include "monitor.h"
+#include "tservice.h"
+
+#if USE_CYGMON_PROTOTYPES
+/* Use common prototypes */
+/* Some of the composed board.h files compose these
+ prototypes redundently, but if they dont,
+ these are the common definitions */
+#include "fmt_util.h" /* Interface to string formatting utilities */
+#include "generic-stub.h" /* from libstub */
+#endif /* USE_CYGMON_PROTOTYPES */
+
+volatile int switch_to_stub_flag = 0;
+
+/* Input routine for the line editor. */
+int
+input_char (void)
+{
+ int i;
+
+ /* We have to drop the '+' characters on the floor
+ because gdb will send a '+' as the first character
+ when connecting to the target. If we waste time
+ echoing that, slow hw might get a uart overrun. */
+ while ((i = xgetchar ()) == '+');
+
+ if (i == '$')
+ {
+ xungetchar ('$');
+ switch_to_stub_flag = 1;
+ i = '\n';
+ }
+ return i;
+}
+
+
+static char tohex_array[16] = {'0', '1', '2', '3', '4', '5', '6', '7',
+ '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
+
+#define tohex(X) (tohex_array[(X) & 15])
+
+#ifdef HAVE_BSP
+#define fromhex __hex
+#else
+static int
+fromhex (a)
+{
+ int number = -1;
+
+ if (a >= '0' && a <= '9')
+ number = a - '0';
+ else if (a >= 'a' && a <= 'f')
+ number = a - 'a' + 10;
+ else if (a >= 'A' && a <= 'F')
+ number = a - 'A' + 10;
+ else
+ xprintf ("Invalid hex digit %c", a);
+
+ return number;
+}
+#endif
+
+
+static unsigned long long
+str2ull (char *str, int base)
+{
+ unsigned long long l = 0;
+
+ if (str[0] == '0' && str[1] == 'x')
+ {
+ str += 2 ;
+ base = 16 ;
+ }
+
+ while (*str != '\0')
+ {
+ if (*str == '.')
+ str++;
+ else
+ l = (l * base) + fromhex(*str++);
+ }
+
+ return l;
+}
+
+
+/* Converts a string to a long, base is the assumed base of the string */
+
+target_register_t
+str2int (char *str, int base)
+{
+ return str2ull(str, base);
+}
+
+/* Converts a string to a double, input is a raw integer string
+ * of the given assumed base. */
+#if HAVE_DOUBLE_REGS
+static double
+str2double (char *str, int base)
+{
+ double d;
+
+ switch (sizeof(double))
+ {
+ case sizeof(unsigned int):
+ *((unsigned int *)&d) = str2ull(str, base);
+ break;
+#if __LONG_MAX__ != __INT_MAX__
+ case sizeof(unsigned long):
+ *((unsigned long *)&d) = str2ull(str, base);
+ break;
+#endif
+#if __LONG_LONG_MAX__ != __LONG_MAX__
+ case sizeof(unsigned long long):
+ *((unsigned long long *)&d) = str2ull(str, base);
+ break;
+#endif
+ default:
+ d = 0.0;
+ break;
+ }
+ return d;
+}
+#endif
+
+target_register_t
+str2intlen (char *str, int base, int len)
+{
+ target_register_t number = 0;
+
+ while ((len--) > 0 && *str != '\0')
+ number = number * base + fromhex (*(str++));
+
+ return number;
+}
+
+int
+hex2bytes (char *str, char *dest, int maxsize)
+{
+ int i;
+ char *ptr;
+
+ for (i = 0; i < maxsize; i++)
+ dest[i] = 0;
+ maxsize--;
+
+ // Don't try and convert 0x prefix
+ if ((str[0] == '0') && (str[1] == 'x'))
+ str += 2;
+
+ ptr = str + strlen(str) - 1;
+ while (maxsize >= 0 && ptr >= str)
+ {
+ dest [maxsize] = fromhex(*ptr);
+ ptr--;
+ if (ptr >= str)
+ {
+ dest [maxsize--] |= fromhex(*ptr) * 16;
+ ptr--;
+ }
+ }
+ return 0;
+}
+
+
+/* Converts an unsigned long long to an ASCII string, adding leading
+ zeroes to pad space up to numdigs. */
+static int use_dots = 1;
+
+#define MAX_NUM_DIGS 51
+
+static char *
+ull2str (unsigned long long number, int base, int numdigs)
+{
+ static char string[MAX_NUM_DIGS+1];
+ int dots, i;
+ char *ptr = string + MAX_NUM_DIGS;
+
+ dots = (use_dots && base == 16);
+
+ *(ptr--) = '\0';
+ *(ptr--) = tohex (number % base);
+ i = 1;
+ number = number / base;
+
+ while (number != 0)
+ {
+ if (dots && (i % 4) == 0)
+ *(ptr--) = '.';
+ *(ptr--) = tohex (number % base);
+ i++;
+ number = number / base;
+ }
+
+ if (numdigs == 0)
+ {
+ numdigs = i;
+ }
+ else
+ {
+ while(i < numdigs)
+ {
+ if (dots && (i % 4) == 0)
+ *(ptr--) = '.';
+ *(ptr--) = '0';
+ i++;
+ }
+ }
+ return ptr + 1;
+}
+
+
+char *
+int2str (target_register_t number, int base, int numdigs)
+{
+ return ull2str((unsigned long long)number, base, numdigs);
+}
+
+#if HAVE_DOUBLE_REGS
+static char *
+double2str(double d)
+{
+ switch(sizeof(double))
+ {
+ case sizeof(unsigned int):
+ return ull2str(*((unsigned int *)&d), 16, sizeof(double) * 2);
+ break;
+#if __LONG_MAX__ != __INT_MAX__
+ case sizeof(unsigned long):
+ return ull2str(*((unsigned long *)&d), 16, sizeof(double) * 2);
+ break;
+#endif
+#if __LONG_LONG_MAX__ != __LONG_MAX__
+ case sizeof(unsigned long long):
+ return ull2str(*((unsigned long long *)&d), 16, sizeof(double) * 2);
+ break;
+#endif
+ }
+ return "....fixme...";
+}
+#endif
+
+#ifndef NO_MALLOC
+char *
+strdup(const char *str)
+{
+ char *x = malloc (strlen (str) + 1);
+ if (x != NULL)
+ strcpy (x, str);
+ return x;
+}
+#endif
+
+
+target_register_t
+get_pc(void)
+{
+ return get_register(REG_PC);
+}
+
+
+#if defined(HAVE_BSP) && !defined(__ECOS__)
+static int
+get_register_type(regnames_t which)
+{
+ int i;
+
+ for (i = 0; regtab[i].registername != NULL; i++)
+ if (regtab[i].registernumber == which)
+ return regtab[i].registertype;
+ return REGTYPE_INT;
+}
+#endif
+
+char *get_register_str (regnames_t which, int detail, int valid)
+{
+#ifdef SPECIAL_REG_OUTPUT
+ char *res;
+
+ if ((res = SPECIAL_REG_OUTPUT (which, detail)) != NULL)
+ {
+ return res;
+ }
+#endif
+ if (valid == 0)
+ {
+ switch (sizeof (target_register_t))
+ {
+ case 1: return "...";
+ case 2: return ".....";
+ case 4: return ".........";
+ case 8: return ".................";
+ default: return ".........";
+ }
+ }
+ else
+ {
+ return int2str (get_register (which), 16, sizeof (target_register_t) * 2);
+ }
+}
+
+
+void
+store_register (regnames_t which, char *string)
+{
+#ifdef SPECIAL_REG_STORE
+ if (SPECIAL_REG_STORE(which, string))
+ return;
+#endif
+ put_register (which, str2int (string, 16));
+}
+
+
+
diff --git a/cesar/ecos/packages/devs/eth/greth/current/cdl/greth_drivers.cdl b/cesar/ecos/packages/devs/eth/greth/current/cdl/greth_drivers.cdl
new file mode 100644
index 0000000000..bc15de3347
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/greth/current/cdl/greth_drivers.cdl
@@ -0,0 +1,141 @@
+# ====================================================================
+#
+# greth_drivers.cdl
+#
+# Ethernet drivers - support for Gaisler Research's GRETH ethernet MAC
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2004 Andrew Lunn
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): Gaisler Research, (Kristoffer Carlsson <kristoffer@gaisler.com>)
+# Contributors:
+# Date: 2005-11-28
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_DEVS_ETH_GRETH {
+ display "Gaisler Research's GRETH driver"
+ description "Ethernet driver for GRETH MAC."
+
+ parent CYGPKG_IO_ETH_DRIVERS
+ active_if CYGPKG_IO_ETH_DRIVERS
+
+ active_if CYGINT_DEVS_ETH_GRETH_REQUIRED
+
+ include_dir .
+ include_files ; # none _exported_ whatsoever
+ compile -library=libextras.a if_greth.c
+
+ include_files include/if_greth.h
+
+ define_proc {
+ puts $::cdl_header "#include <pkgconf/system.h>";
+ puts $::cdl_header "#include CYGDAT_DEVS_ETH_GRETH_CFG";
+ }
+
+ cdl_option CYGNUM_DEVS_ETH_GRETH_DEV_COUNT {
+ display "Number of supported interfaces."
+ calculated { CYGINT_DEVS_ETH_GRETH_REQUIRED }
+ flavor data
+ description "
+ This option selects the number of ethernet interfaces to
+ be supported by the driver."
+ }
+
+ cdl_interface CYGINT_DEVS_ETH_GRETH_STATIC_ESA {
+ display "ESA is statically configured"
+ description "
+ If this is nonzero, then the ESA (MAC address) is statically
+ configured in the platform-specific package which instantiates
+ this driver with all its details.
+
+ Note that use of this option is deprecated in favor of a
+ CYGSEM_DEVS_ETH_..._SET_ESA option in the platform specific
+ driver."
+ }
+
+ cdl_option CYGINT_DEVS_ETH_GRETH_TxNUM {
+ display "Number of output buffers"
+ flavor data
+ legal_values 2 to 64
+ default_value 4
+ description "
+ This option specifies the number of output buffer packets
+ to be used for the GRETH ethernet mac in multiples of 2."
+ }
+
+ cdl_option CYGINT_DEVS_ETH_GRETH_RxNUM {
+ display "Number of input buffers"
+ flavor data
+ legal_values 2 to 64
+ default_value 8
+ description "
+ This option specifies the number of input buffer packets
+ to be used for the GRETH ethernet mac in multiples of 2."
+ }
+
+ cdl_component CYGPKG_DEVS_ETH_GRETH_OPTIONS {
+ display "GRETH driver build options"
+ flavor none
+ no_define
+
+ cdl_option CYGPKG_DEVS_ETH_GRETH_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "-D_KERNEL -D__ECOS" }
+ description "
+ This option modifies the set of compiler flags for
+ building the GRETH driver package.
+ These flags are used in addition
+ to the set of global flags."
+ }
+ }
+
+ cdl_component CYGPKG_DEVS_ETH_GRETH_FLUSH {
+ display "Cache flushing"
+ flavor bool
+ default_value 1
+ description "Flush cache before copying packets from/to the
+ ethermac dma transfer buffers. If you have cache snooping enabled
+ you can disable this option."
+
+ }
+
+}
diff --git a/cesar/ecos/packages/devs/eth/greth/current/include/if_greth.h b/cesar/ecos/packages/devs/eth/greth/current/include/if_greth.h
new file mode 100644
index 0000000000..f8f4330126
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/greth/current/include/if_greth.h
@@ -0,0 +1,141 @@
+#ifndef CYGONCE_DEVS_ETH_GRETH_IF_GRETH_H
+#define CYGONCE_DEVS_ETH_GRETH_IF_GRETH_H
+
+/*==========================================================================
+//
+// if_greth.h
+//
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research (Kristoffer Carlsson <kristoffer@gaisler.com>)
+// Contributors:
+// Date: 2005-11-29
+// Description:
+//
+//####DESCRIPTIONEND####
+*/
+
+#include <pkgconf/devs_eth_greth.h>
+#define GRETH_FD 0x10
+#define GRETH_RESET 0x40
+#define PHY_ADDR 0
+#define GRETH_MII_BUSY 0x8
+#define GRETH_MII_NVALID 0x10
+
+#define GRETH_BD_EN 0x800
+#define GRETH_BD_WR 0x1000
+#define GRETH_BD_IE 0x2000
+#define GRETH_BD_LEN 0x7FF
+
+#define GRETH_INT_TX 0x8
+#define GRETH_TXEN 0x1
+#define GRETH_TXI 0x4
+#define GRETH_TXBD_STATUS 0xFFFFC000
+#define GRETH_TXBD_ERR_UE 0x4000
+#define GRETH_TXBD_ERR_AL 0x8000
+#define GRETH_TXBD_NUM CYGINT_DEVS_ETH_GRETH_TxNUM
+#define GRETH_TXBD_NUM_MASK GRETH_TXBD_NUM-1
+#define GRETH_TX_BUF_SIZE 1516
+
+#define GRETH_INT_RX 0x4
+#define GRETH_RXEN 0x2
+#define GRETH_RXI 0x8
+#define GRETH_RXBD_STATUS 0xFFFFC000
+#define GRETH_RXBD_ERR_AE 0x4000
+#define GRETH_RXBD_ERR_FT 0x8000
+#define GRETH_RXBD_ERR_CRC 0x10000
+#define GRETH_RXBD_ERR_OE 0x20000
+#define GRETH_RXBD_NUM CYGINT_DEVS_ETH_GRETH_RxNUM
+#define GRETH_RXBD_NUM_MASK GRETH_RXBD_NUM-1
+#define GRETH_RX_BUF_SIZE 1516
+
+/* Ethernet configuration registers */
+typedef struct _greth_regs {
+ volatile cyg_uint32 control;
+ volatile cyg_uint32 status;
+ volatile cyg_uint32 esa_msb;
+ volatile cyg_uint32 esa_lsb;
+ volatile cyg_uint32 mdio;
+ volatile cyg_uint32 tx_desc_p;
+ volatile cyg_uint32 rx_desc_p;
+} greth_regs;
+
+/* Ethernet buffer descriptor */
+typedef struct _greth_bd {
+ cyg_uint32 stat;
+ cyg_uint32 addr; /* Buffer address */
+} greth_bd;
+
+
+/* The buffer descriptors track the ring buffers. */
+struct bd_info {
+
+ volatile greth_bd *tx_ring; /* Address of Tx BDs. */
+ cyg_uint32 tx_next; /* Next buffer to be sent */
+ cyg_uint32 tx_last; /* Next buffer to be checked if packet sent */
+ cyg_uint32 tx_free; /* Number of free tx descriptors */
+ cyg_uint32 tx_keys[GRETH_TXBD_NUM]; /* remember tx keys */
+
+ volatile greth_bd *rx_ring; /* Address of Rx BDs. */
+ cyg_uint32 rx_cur; /* Next buffer to be checked if packet received */
+};
+
+
+typedef struct _greth_info {
+ greth_regs *regs; /* Address of controller registers. */
+
+ struct bd_info bdi;
+
+ cyg_uint8 esa[6];
+ struct eth_drv_sc *sc;
+ cyg_uint32 idx;
+ cyg_uint32 active;
+
+ // Interrupt handling stuff
+ cyg_uint32 irq;
+ cyg_vector_t vector; // interrupt vector
+ cyg_handle_t interrupt_handle; // handle for int.handler
+ cyg_interrupt interrupt_object;
+
+} greth_info;
+
+
+
+#endif
+
+
diff --git a/cesar/ecos/packages/devs/eth/greth/current/src/if_greth.c b/cesar/ecos/packages/devs/eth/greth/current/src/if_greth.c
new file mode 100644
index 0000000000..ab840d0252
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/greth/current/src/if_greth.c
@@ -0,0 +1,745 @@
+//==========================================================================
+//
+// dev/if_greth.c
+//
+// Ethernet device driver for Gaisler Research's ethernet mac
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Nick Garnett
+// Copyright (C) 2004 Andrew Lunn
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research, (Kristoffer Carlsson <kristoffer@gaisler.com>)
+// Contributors:
+// Date: 2005-12-06
+// Purpose:
+// Description:
+// Notes:
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+
+#include <pkgconf/system.h>
+#ifdef CYGPKG_IO_ETH_DRIVERS
+#include <pkgconf/io_eth_drivers.h>
+#endif
+#include <pkgconf/devs_eth_greth.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_diag.h>
+#include <cyg/hal/hal_io.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/drv_api.h>
+#include <cyg/io/eth/netdev.h>
+#include <cyg/io/eth/eth_drv.h>
+#include <cyg/hal/hal_cache.h>
+
+#ifdef CYGPKG_NET
+#include <pkgconf/net.h>
+#include <cyg/kernel/kapi.h>
+#include <net/if.h>
+#endif
+
+#ifdef CYGPKG_KERNEL
+#include <cyg/kernel/kapi.h>
+#endif
+
+#if CYGNUM_DEVS_ETH_GRETH_DEV_COUNT > 1
+#error Only 1 mac at a time supported yet
+#endif
+
+//#define DEBUG_GRETH
+
+#ifdef DEBUG_GRETH
+
+#define DEBUG_RX_PACKETS 0
+#define DEBUG_TX_PACKETS 0
+#define os_printf diag_printf
+#define db_printf diag_printf
+
+#else
+
+#define DEBUG_RX_PACKETS 0
+#define DEBUG_TX_PACKETS 0
+#define os_printf(fmt,...)
+#define db_printf(fmt,...)
+
+#endif
+
+#define MACADDR0 macaddr[0]
+#define MACADDR1 macaddr[1]
+#define MACADDR2 macaddr[2]
+#define MACADDR3 macaddr[3]
+#define MACADDR4 macaddr[4]
+#define MACADDR5 macaddr[5]
+
+#include <if_greth.h>
+#include CYGDAT_DEVS_ETH_GRETH_INL
+
+cyg_uint8 macaddr[6] = CYGPKG_DEVS_ETH_GRETH_ETH0_ESA;
+
+#define LOAD(a,v) HAL_READ_UINT32(&(a),v);
+#define SAVE(a,v) HAL_WRITE_UINT32(&(a),v);
+#define REGORIN(a,v) \
+ { cyg_uint32 va; \
+ LOAD(a,va); \
+ va |= v; \
+ SAVE(a,va); \
+ }
+#define REGANDIN(a,v) \
+ { cyg_uint32 va; \
+ LOAD(a,va); \
+ va &= v; \
+ SAVE(a,va); \
+ }
+
+static void greth_start( struct eth_drv_sc *sc, unsigned char *enaddr, int flags );
+static void greth_stop( struct eth_drv_sc *sc );
+static cyg_uint32 eth_isr(cyg_vector_t vector, cyg_addrword_t data);
+static void eth_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data);
+
+static void greth_tx(struct eth_drv_sc *sc);
+static void greth_rx(struct eth_drv_sc *sc);
+
+static cyg_uint8 rxbuf[GRETH_RXBD_NUM*GRETH_RX_BUF_SIZE];
+static cyg_uint8 txbuf[GRETH_TXBD_NUM*GRETH_TX_BUF_SIZE];
+
+static char rxbufr[1024*2];
+static char txbufr[1024*2];
+
+static char *almalloc(int sz)
+{
+ char *tmp;
+ tmp = calloc(1,2*sz);
+ tmp = (char *) (((int)tmp+sz) & ~(sz -1));
+ return(tmp);
+}
+
+static void greth_print_packet(unsigned long addr, int len)
+{
+ int i;
+ diag_printf("packet: addr = %x len = %d\n", (unsigned int)addr, len);
+ for(i = 0; i < len; i++) {
+ if(!(i % 16))
+ diag_printf("\n");
+ diag_printf(" %.2x", *(((unsigned char *)addr) + i));
+ }
+ diag_printf("\n");
+ diag_printf("\n");
+}
+
+static int read_mii(int addr, volatile greth_regs *regs)
+{
+ cyg_uint32 tmp;
+
+ do {
+ LOAD(regs->mdio, tmp);
+ } while (tmp & GRETH_MII_BUSY);
+
+ tmp = (PHY_ADDR << 11) | ((addr&0x1F) << 6) | 2;
+ SAVE(regs->mdio, tmp);
+
+ do {
+ LOAD(regs->mdio, tmp);
+ } while (tmp & GRETH_MII_BUSY);
+
+ if (!(tmp & GRETH_MII_NVALID)) {
+ LOAD(regs->mdio, tmp);
+ return (tmp>>16)&0xFFFF;
+ }
+ else {
+ diag_printf("GRETH: failed to read mii\n");
+ return (0);
+ }
+}
+
+static void write_mii(int addr, int data, volatile greth_regs *regs)
+{
+ cyg_uint32 tmp;
+ do {
+ LOAD(regs->mdio, tmp);
+ } while (tmp & GRETH_MII_BUSY);
+
+ tmp = ((data&0xFFFF)<<16) | (PHY_ADDR << 11) | ((addr&0x1F) << 6) | 1;
+
+ SAVE(regs->mdio, tmp);
+
+ do {
+ LOAD(regs->mdio, tmp);
+ } while (tmp & GRETH_MII_BUSY);
+
+}
+
+#ifdef ETH_DRV_GET_MAC_ADDRESS
+static int eth_get_mac_address(struct eth_drv_sc *sc, char *addr)
+{
+ greth_info *gi = (greth_info *)sc->driver_private;
+ cyg_uint32 m0,m1;
+
+ db_printf("eth_get_mac_address\n");
+
+ LOAD(gi->regs->esa_msb, m1);
+ LOAD(gi->regs->esa_lsb, m0);
+
+ addr[0] = (m1 >> 8) & 0xff;
+ addr[1] = (m1 >> 0) & 0xff;
+ addr[2] = (m0 >>24) & 0xff;
+ addr[3] = (m0 >>16) & 0xff;
+ addr[4] = (m0 >> 8) & 0xff;
+ addr[5] = (m0 >> 0) & 0xff;
+ return 0;
+}
+#endif
+
+#ifdef ETH_DRV_SET_MAC_ADDRESS
+static int eth_set_mac_address(struct eth_drv_sc *sc, cyg_uint8 *addr)
+{
+ greth_info *gi = (greth_info *)sc->driver_private;
+
+ db_printf("eth_set_mac_address\n");
+
+ gi->esa[0] = addr[0];
+ gi->esa[1] = addr[1];
+ gi->esa[2] = addr[2];
+ gi->esa[3] = addr[3];
+ gi->esa[4] = addr[4];
+ gi->esa[5] = addr[5];
+ SAVE(gi->regs->esa_msb, addr[0] << 8 | addr[1]);
+ SAVE(gi->regs->esa_lsb, addr[2] << 24 | addr[3] << 16 | addr[4] << 8 | addr[5]);
+ return 1;
+}
+#endif
+
+/* Calls leon eth init */
+bool greth_init(struct cyg_netdevtab_entry *ndp) {
+ return CYGPKG_DEVS_ETH_GRETH_INITFN(ndp);
+}
+
+/* Called from leon eth init */
+void greth_device_init(struct eth_drv_sc *sc, cyg_uint32 idx, cyg_uint32 base, cyg_uint32 irq) {
+
+ greth_info *gi = (greth_info *)sc->driver_private;
+ struct bd_info *bdi = &greth_priv_array[idx]->bdi;
+
+ int i, tmp;
+
+ /* Set default ethernet station address. */
+ gi->esa[0] = MACADDR0;
+ gi->esa[1] = MACADDR1;
+ gi->esa[2] = MACADDR2;
+ gi->esa[3] = MACADDR3;
+ gi->esa[4] = MACADDR4;
+ gi->esa[5] = MACADDR5;
+
+ gi->sc = sc;
+ gi->idx = idx;
+
+ gi->regs = (greth_regs *) base;
+ gi->irq = irq;
+
+ /* Reset the controller. */
+ SAVE(gi->regs->control, GRETH_RESET);
+
+ do {
+ LOAD(gi->regs->control, tmp);
+ } while (tmp & GRETH_RESET);
+
+ bdi->tx_ring = (((unsigned int)&txbufr) + (1024-1)) & ~(1024-1) ;
+ bdi->rx_ring = (((unsigned int)&rxbufr) + (1024-1)) & ~(1024-1) ;
+ SAVE(gi->regs->tx_desc_p, (cyg_uint32) bdi->tx_ring);
+ SAVE(gi->regs->rx_desc_p, (cyg_uint32) bdi->rx_ring);
+
+ /* Configure PHY */
+
+ write_mii(0, 0x8000, gi->regs); /* reset phy */
+ while ( (tmp=read_mii(0, gi->regs)) & 0x8000)
+ ;
+
+ i = 0;
+ if (tmp & 0x1000) { /* augo neg */
+ while ( !(read_mii(1, regs) & 0x20 ) ) {
+ i++;
+ if (i>50000) {
+ printk("Auto-negotiation failed\n");
+ break;
+ }
+ }
+ }
+
+ tmp = read_mii(0, gi->regs);
+
+ diag_printf("GRETH(%d) Ethernet MAC at [0x%x] irq %d. Running %d Mbps %s duplex\n", idx, (unsigned int)(gi->regs), (unsigned int)(gi->irq), \
+ ((tmp&0x2040) == 0x2000) ? 100:10, (tmp&0x0100) ? "full":"half");
+ if (tmp & 0x0100) {
+ /* set full duplex */
+ SAVE(gi->regs->control, GRETH_FD);
+
+ }
+
+
+ /* Initialize descriptor buffer addresses. */
+ for(i = 0; i < GRETH_TXBD_NUM; i++) {
+ SAVE(bdi->tx_ring[i].addr , &txbuf[i*GRETH_TX_BUF_SIZE]);
+ }
+ for(i = 0; i < GRETH_RXBD_NUM; i++) {
+ SAVE(bdi->rx_ring[i].addr, &rxbuf[i*GRETH_RX_BUF_SIZE]);
+ }
+
+ SAVE(gi->regs->esa_msb , MACADDR0 << 8 | MACADDR1);
+ SAVE(gi->regs->esa_lsb , MACADDR2 << 24 | MACADDR3 << 16 | MACADDR4 << 8 | MACADDR5);
+
+
+ // Initialize upper level driver
+ (sc->funs->eth_drv->init)(sc, gi->esa);
+}
+
+static void greth_start( struct eth_drv_sc *sc, unsigned char *enaddr, int flags ) {
+
+ greth_info *gi = (greth_info *) sc->driver_private;
+ struct bd_info *bdi = (struct bd_info *) &(gi->bdi);
+
+ int i;
+
+ if ( gi->active )
+ greth_stop( sc );
+
+ db_printf("greth_start: irq %d\n",gi->irq);
+
+ bdi->rx_cur = 0;
+ bdi->tx_next = 0;
+ bdi->tx_last = 0;
+ bdi->tx_free = GRETH_TXBD_NUM;
+ SAVE(gi->regs->tx_desc_p, (cyg_uint32) bdi->tx_ring);
+ SAVE(gi->regs->rx_desc_p, (cyg_uint32) bdi->rx_ring);
+
+ for (i = 0; i < GRETH_RXBD_NUM; i++) {
+ REGORIN(bdi->rx_ring[i].stat, GRETH_BD_EN | GRETH_BD_IE);
+ }
+ REGORIN(bdi->rx_ring[GRETH_RXBD_NUM-1].stat, GRETH_BD_WR);
+
+ /* Install our interrupt handler. */
+ cyg_drv_interrupt_create(gi->irq,
+ 0, // Priority - unused
+ (CYG_ADDRWORD)sc, // Data item passed to ISR & DSR
+ eth_isr, // ISR
+#ifdef CYGPKG_DEVS_ETH_GRETH_FLUSH
+ eth_dsr, // Custom DSR which invalidates DCACHE
+#else
+ eth_drv_dsr, // Kernel DSR
+#endif
+ &gi->interrupt_handle, // handle to intr obj
+ &gi->interrupt_object ); // space for int obj
+ cyg_drv_interrupt_attach(gi->interrupt_handle);
+ cyg_drv_interrupt_acknowledge(gi->irq);
+ cyg_drv_interrupt_unmask(gi->irq);
+
+ // Enable device
+ gi->active = 1;
+
+ /* Enable receiver and transmiter and interrupts */
+ REGORIN(gi->regs->control , GRETH_RXEN | GRETH_TXEN | GRETH_TXI | GRETH_RXI);
+}
+
+
+static void greth_stop( struct eth_drv_sc *sc ) {
+
+ greth_info *gi = (greth_info *) sc->driver_private;
+ struct bd_info *bdi = (struct bd_info *) &(gi->bdi);
+ int i;
+
+ db_printf("greth_stop\n");
+
+ /* Free interrupt hadler */
+ cyg_interrupt_delete(gi->interrupt_handle);
+
+ /* Disable receiver and transmitesr */
+ REGANDIN(gi->regs->control , ~(GRETH_RXEN | GRETH_TXEN | GRETH_TXI | GRETH_RXI));
+
+ for (i = 0; i < GRETH_RXBD_NUM; i++) {
+ SAVE(bdi->rx_ring[i].stat, 0);
+ }
+
+ for (i = 0; i < GRETH_TXBD_NUM; i++) {
+ SAVE(bdi->tx_ring[i].stat, 0);
+ }
+
+ memset(bdi->tx_keys, 0, sizeof(bdi->tx_keys));
+
+ gi->active = 0;
+
+}
+
+static cyg_uint32 eth_isr(cyg_vector_t vector, cyg_addrword_t data) {
+ struct eth_drv_sc *sc = (struct eth_drv_sc *)data;
+ greth_info *gi = (greth_info *)sc->driver_private;
+
+ cyg_uint32 int_events, calldsr = 0;
+
+ cyg_drv_interrupt_acknowledge(gi->irq);
+
+ cyg_drv_interrupt_mask(gi->irq);
+
+
+ /* schedule dsr */
+ return (CYG_ISR_HANDLED|CYG_ISR_CALL_DSR);
+}
+
+/* This dsr is only used if CYGPKG_DEVS_ETH_GRETH_FLUSH is defined */
+static void eth_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data) {
+ struct eth_drv_sc *sc = (struct eth_drv_sc *)data;
+ HAL_DCACHE_INVALIDATE_ALL();
+ eth_drv_dsr( vector, count, (cyg_addrword_t)sc );
+}
+
+static void greth_deliver(struct eth_drv_sc *sc) {
+ greth_info *gi = (greth_info *)sc->driver_private;
+ volatile greth_bd *bdp;
+
+ cyg_uint32 status, pkt_len;
+
+ /* Handle received packets */
+ while (1) {
+
+ bdp = gi->bdi.rx_ring + gi->bdi.rx_cur;
+
+ LOAD(bdp->stat, status);
+
+ if ((status & GRETH_BD_EN) == 0) { /* packet received */
+
+ if (status & GRETH_RXBD_STATUS) {
+ if (status & GRETH_RXBD_ERR_AE) {
+ diag_printf("GRETH(%d): Rx alignment error.\n", gi->idx);
+ }
+ if (status & GRETH_RXBD_ERR_FT) {
+ diag_printf("GRETH(%d): Rx frame to long error.\n", gi->idx);
+ }
+ if (status & GRETH_RXBD_ERR_CRC) {
+ diag_printf("GRETH(%d): Rx crc error.\n", gi->idx);
+ }
+ if (status & GRETH_RXBD_ERR_OE) {
+ diag_printf("GRETH(%d): Rx fifo overrun error.\n", gi->idx);
+ }
+
+ /* enable descriptor for new packet */
+ REGORIN(bdp->stat, GRETH_BD_EN | GRETH_BD_IE | ((gi->bdi.rx_cur == GRETH_RXBD_NUM_MASK) ? GRETH_BD_WR : 0) );
+ REGORIN(gi->regs->control, GRETH_RXEN);
+
+ gi->bdi.rx_cur = ((gi->bdi.rx_cur + 1) & GRETH_RXBD_NUM_MASK);
+ continue;
+
+ }
+
+ pkt_len = status & GRETH_BD_LEN;
+
+ /* notify stack */
+ (sc->funs->eth_drv->recv)( sc, pkt_len );
+
+ /* clear descriptor */
+ SAVE(bdp->stat, 0);
+
+ /* enable descriptor for new packet */
+ REGORIN(bdp->stat, GRETH_BD_EN | GRETH_BD_IE | ((gi->bdi.rx_cur == GRETH_RXBD_NUM_MASK) ? GRETH_BD_WR : 0) );
+ REGORIN(gi->regs->control, GRETH_RXEN);
+
+ gi->bdi.rx_cur = ((gi->bdi.rx_cur + 1) & GRETH_RXBD_NUM_MASK);
+ }
+ else break;
+
+ }
+
+ /* handle sent packets */
+ while (gi->bdi.tx_free != GRETH_TXBD_NUM) {
+
+ bdp = gi->bdi.tx_ring + gi->bdi.tx_last;
+
+ LOAD(bdp->stat, status);
+
+ if (status & GRETH_BD_EN) break; /* packet not sent */
+
+ if (status & GRETH_TXBD_STATUS) {
+ (sc->funs->eth_drv->tx_done)( sc, gi->bdi.tx_keys[gi->bdi.tx_last], 1 ); /*indicate error */
+
+ if (status & GRETH_TXBD_ERR_UE) {
+ diag_printf("GRETH(%d): Tx fifo underrun error.\n", gi->idx);
+ }
+ if (status & GRETH_TXBD_ERR_AL) {
+ diag_printf("GRETH(%d): Tx attempt limit error.\n", gi->idx);
+ }
+ }
+ else {
+ (sc->funs->eth_drv->tx_done)( sc, gi->bdi.tx_keys[gi->bdi.tx_last], 0 );
+
+ }
+
+ gi->bdi.tx_last = ((gi->bdi.tx_last + 1) & GRETH_TXBD_NUM_MASK);
+ gi->bdi.tx_free++;
+ }
+
+ cyg_drv_interrupt_unmask(gi->irq);
+
+}
+
+
+/* /\* Notifies stack about received packets *\/ */
+/* static void greth_rx(struct eth_drv_sc *sc) { */
+
+/* greth_info *gi = (greth_info *)sc->driver_private; */
+/* volatile greth_bd *bdp; */
+
+/* cyg_uint32 status; */
+/* int pkt_len; */
+
+/* /\* Handle received packets *\/ */
+/* while (1) { */
+
+/* bdp = gi->bdi.rx_ring + gi->bdi.rx_cur; */
+
+/* LOAD(bdp->stat, status); */
+
+/* if ((status & GRETH_BD_EN) == 0) { /\* packet received *\/ */
+
+/* if (status & GRETH_RXBD_STATUS) { */
+/* if (status & GRETH_RXBD_ERR_AE) { */
+/* diag_printf("GRETH(%d): Rx alignment error.\n", gi->idx); */
+/* continue; */
+/* } */
+/* if (status & GRETH_RXBD_ERR_FT) { */
+/* diag_printf("GRETH(%d): Rx frame to long error.\n", gi->idx); */
+/* continue; */
+/* } */
+/* if (status & GRETH_RXBD_ERR_CRC) { */
+/* diag_printf("GRETH(%d): Rx crc error.\n", gi->idx); */
+/* continue; */
+/* } */
+/* if (status & GRETH_RXBD_ERR_OE) { */
+/* diag_printf("GRETH(%d): Rx fifo overrun error.\n", gi->idx); */
+/* continue; */
+/* } */
+/* } */
+
+/* pkt_len = status & GRETH_BD_LEN; */
+
+/* /\* notify stack *\/ */
+/* (sc->funs->eth_drv->recv)( sc, pkt_len ); */
+
+/* /\* clear descriptor *\/ */
+/* SAVE(bdp->stat, 0); */
+
+/* /\* enable descriptor for new packet *\/ */
+/* REGORIN(bdp->stat, GRETH_BD_EN | GRETH_BD_IE | ((gi->bdi.rx_cur == GRETH_RXBD_NUM_MASK) ? GRETH_BD_WR : 0) ); */
+/* REGORIN(gi->regs->control, GRETH_RXEN); */
+
+/* gi->bdi.rx_cur = ((gi->bdi.rx_cur + 1) & GRETH_RXBD_NUM_MASK); */
+/* } */
+/* else break; */
+
+/* } */
+/* } */
+
+
+/* /\* Checks for sent packets and passes tx-keys up the stack when packets are transmitted, called from can_send() and deliver() *\/ */
+/* static void greth_tx(struct eth_drv_sc *sc) { */
+/* greth_info *gi = (greth_info *)sc->driver_private; */
+/* volatile greth_bd *bdp; */
+/* cyg_uint32 status; */
+
+/* while (gi->bdi.tx_free != GRETH_TXBD_NUM) { */
+
+/* bdp = gi->bdi.tx_ring + gi->bdi.tx_last; */
+
+/* LOAD(bdp->stat, status); */
+
+/* if (status & GRETH_BD_EN) break; /\* packet not sent *\/ */
+
+/* if (status & GRETH_TXBD_STATUS) { */
+/* (sc->funs->eth_drv->tx_done)( sc, gi->bdi.tx_keys[gi->bdi.tx_last], 1 ); /\*indicate error *\/ */
+/* diag_printf("Error in transfer.\n"); */
+/* } */
+/* else { */
+/* (sc->funs->eth_drv->tx_done)( sc, gi->bdi.tx_keys[gi->bdi.tx_last], 0 ); */
+/* // db_printf("Descriptor %d sent successfully\n", bdi->tx_last); */
+/* } */
+
+/* gi->bdi.tx_last = ((gi->bdi.tx_last + 1) & GRETH_TXBD_NUM_MASK); */
+/* gi->bdi.tx_free++; */
+/* } */
+/* } */
+
+
+static int greth_can_send(struct eth_drv_sc *sc) {
+ greth_info *gi = (greth_info *)sc->driver_private;
+
+ db_printf("can_send - tx_free: %d\n", bdi->tx_free);
+
+ return gi->bdi.tx_free;
+}
+
+static void greth_send(struct eth_drv_sc *sc,
+ struct eth_drv_sg *sg_list, int sg_len, int total_len,
+ unsigned long key) {
+
+ greth_info *gi = (greth_info *)sc->driver_private;
+ struct bd_info *bdi = (struct bd_info *)&(gi->bdi);
+
+ cyg_uint32 status, addr;
+ int len, i;
+ cyg_uint8 *to_addr;
+
+ db_printf("greth_send(): tx_next: %d\n", bdi->tx_next);
+
+ if (bdi->tx_free == 0) {
+ diag_printf("greth_send called but no free descriptors!\n");
+ return;
+ }
+ /* Fill in a Tx key */
+ bdi->tx_keys[bdi->tx_next] = key;
+
+ if (total_len > GRETH_TX_BUF_SIZE) {
+ diag_printf("greth: tx frame too long!.\n");
+ return;
+ }
+
+ LOAD(bdi->tx_ring[bdi->tx_next].addr, addr);
+ to_addr = (cyg_uint8 *) addr;
+
+ for (i = 0; i < sg_len; i++) {
+ len = sg_list[i].len;
+ memcpy(to_addr, (void*)sg_list[i].buf, len);
+ to_addr += len;
+ }
+
+#if DEBUG_TX_PACKETS
+ diag_printf("TX\n");
+ greth_print_packet((unsigned long)addr, total_len);
+#endif
+
+ SAVE(bdi->tx_ring[bdi->tx_next].stat, GRETH_BD_IE | (total_len & GRETH_BD_LEN) | ((bdi->tx_next == GRETH_TXBD_NUM_MASK) ? GRETH_BD_WR : 0) );
+
+ REGORIN(bdi->tx_ring[bdi->tx_next].stat, GRETH_BD_EN); /* set enable */
+ REGORIN(gi->regs->control, GRETH_TXEN); /* enable transmitter */
+
+ bdi->tx_next = (bdi->tx_next + 1) & GRETH_TXBD_NUM_MASK;
+ bdi->tx_free--;
+
+ return;
+}
+
+static void greth_recv( struct eth_drv_sc *sc, struct eth_drv_sg *sg_list, int sg_len ) {
+ greth_info *gi = (greth_info *)sc->driver_private;
+ struct bd_info *bdi = (struct bd_info *) &(gi->bdi);
+
+ cyg_uint8 *from_addr;
+ cyg_uint32 from, status, i;
+ int pkt_len;
+
+ db_printf ("greth_recv() - rx_cur: %d\n", bdi->rx_cur);
+
+ LOAD(bdi->rx_ring[bdi->rx_cur].stat, status);
+ pkt_len = status & GRETH_BD_LEN;
+
+ LOAD(bdi->rx_ring[bdi->rx_cur].addr, from);
+ from_addr = (cyg_uint8 *) from;
+
+#if DEBUG_RX_PACKETS
+ greth_print_packet((unsigned long)from, pkt_len);
+#endif
+
+ for ( i = 0; i < sg_len; i++ ) {
+ cyg_uint8 *to_addr;
+ int len;
+ to_addr = (cyg_uint8 *)(sg_list[i].buf);
+ len = sg_list[i].len;
+
+ if (to_addr == 0 || len <= 0)
+ return; // out of mbufs
+
+ if ( len > pkt_len )
+ len = pkt_len;
+
+ memcpy( to_addr, (void *)from_addr, len );
+ from_addr += len;
+ pkt_len -= len;
+
+ }
+
+ if (pkt_len > 0) {
+ diag_printf("GRETH(%d): Receive sg_list to small.\n", gi->idx);
+ }
+}
+
+static void greth_poll(struct eth_drv_sc *sc) {
+ greth_info *gi = (greth_info *)sc->driver_private;
+
+ eth_isr(gi->irq, (cyg_addrword_t) sc);
+ greth_deliver(sc);
+}
+
+static int greth_int_vector(struct eth_drv_sc *sc) {
+ greth_info *gi = (greth_info *)sc->driver_private;
+ return gi->irq;
+}
+
+static int greth_control(struct eth_drv_sc *sc, unsigned long key, void *data, int data_length) {
+
+ switch ( key ) {
+#ifdef ETH_DRV_SET_MAC_ADDRESS
+ case ETH_DRV_SET_MAC_ADDRESS:
+ if ( 6 != data_length )
+ return -2;
+ return eth_set_mac_address( sc, data );
+#endif
+#ifdef ETH_DRV_GET_MAC_ADDRESS
+ case ETH_DRV_GET_MAC_ADDRESS:
+ return eth_get_mac_address( sc, data );
+#endif
+
+#ifdef ETH_DRV_SET_MC_LIST
+ case ETH_DRV_SET_MC_LIST:
+ /* Get rid of warnings about no multicast support .. doesn't do anything.
+ */
+ return 0;
+#endif
+
+ default:
+ break;
+ }
+ return -1;
+}
+
diff --git a/cesar/ecos/packages/devs/eth/opencores/ethermac/current/cdl/opencores_ethermac_drivers.cdl b/cesar/ecos/packages/devs/eth/opencores/ethermac/current/cdl/opencores_ethermac_drivers.cdl
new file mode 100644
index 0000000000..27d7ec7b68
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/opencores/ethermac/current/cdl/opencores_ethermac_drivers.cdl
@@ -0,0 +1,149 @@
+# ====================================================================
+#
+# opencores_ethermac_eth_drivers.cdl
+#
+# Ethernet drivers - support for Opencores ethermac controllers
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2004 Andrew Lunn
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): Gaisler Research, (Konrad Eisele<eiselekd@web.de>)
+# Contributors:
+# Date: 2005-01-22
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC {
+ display "Opencores ethermac driver"
+ description "Ethernet driver for Opencores ethermac driver."
+
+ parent CYGPKG_IO_ETH_DRIVERS
+ active_if CYGPKG_IO_ETH_DRIVERS
+
+ active_if CYGINT_DEVS_ETH_OPENCORES_ETHERMAC_REQUIRED
+
+ include_dir .
+ include_files ; # none _exported_ whatsoever
+ compile -library=libextras.a if_oeth.c
+
+ include_files include/oeth_info.h
+
+ define_proc {
+ puts $::cdl_header "#include <pkgconf/system.h>";
+ puts $::cdl_header "#include CYGDAT_DEVS_ETH_OPENCORES_ETHERMAC_CFG";
+ }
+
+ cdl_option CYGNUM_DEVS_ETH_OPENCORES_ETHERMAC_DEV_COUNT {
+ display "Number of supported interfaces."
+ calculated { CYGINT_DEVS_ETH_OPENCORES_ETHERMAC_REQUIRED }
+ flavor data
+ description "
+ This option selects the number of ethernet interfaces to
+ be supported by the driver."
+ }
+
+ cdl_interface CYGINT_DEVS_ETH_OPENCORES_ETHERMAC_STATIC_ESA {
+ display "ESA is statically configured"
+ description "
+ If this is nonzero, then the ESA (MAC address) is statically
+ configured in the platform-specific package which instantiates
+ this driver with all its details.
+
+ Note that use of this option is deprecated in favor of a
+ CYGSEM_DEVS_ETH_..._SET_ESA option in the platform specific
+ driver."
+ }
+
+ cdl_option CYGINT_DEVS_ETH_OPENCORES_ETHERMAC_TxNUM {
+ display "Number of output buffers"
+ flavor data
+ legal_values 2 to 64
+ default_value 4
+ description "
+ This option specifies the number of output buffer packets
+ to be used for the opencores ethernet device in multiples of 2."
+ }
+
+ cdl_option CYGINT_DEVS_ETH_OPENCORES_ETHERMAC_RxNUM {
+ display "Number of input buffers"
+ flavor data
+ legal_values 2 to 64
+ default_value 4
+ description "
+ This option specifies the number of input buffer packets
+ to be used for the opencores ethernet device in multiples of 2."
+ }
+
+ cdl_component CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC_OPTIONS {
+ display "Opencores ethermac driver build options"
+ flavor none
+ no_define
+
+ cdl_option CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "-D_KERNEL -D__ECOS" }
+ description "
+ This option modifies the set of compiler flags for
+ building the opencores ethermac driver package.
+ These flags are used in addition
+ to the set of global flags."
+ }
+ }
+
+ cdl_component CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC_FLUSH {
+ display "Cache flushing"
+ flavor bool
+ default_value 1
+ description "Flush cache before copying packets from/to the
+ ethermac dma transfer buffers. If you have cache snooping enabled
+ you can disable this option."
+
+ }
+
+ cdl_component CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC_ETH100 {
+ display "Initialize MII to 100mbit"
+ flavor bool
+ default_value 1
+ description "Issue a MII sequence that enables a 100mbit link "
+
+ }
+
+}
diff --git a/cesar/ecos/packages/devs/eth/opencores/ethermac/current/include/oeth_info.h b/cesar/ecos/packages/devs/eth/opencores/ethermac/current/include/oeth_info.h
new file mode 100644
index 0000000000..fcb8ea0ac0
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/opencores/ethermac/current/include/oeth_info.h
@@ -0,0 +1,324 @@
+#ifndef CYGONCE_DEVS_ETH_OPENCORES_ETHERMAC_INFO_H
+#define CYGONCE_DEVS_ETH_OPENCORES_ETHERMAC_INFO_H
+/*==========================================================================
+//
+// oeth_info.h
+//
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors:
+// Date: 2004-01-20
+// Description:
+//
+//####DESCRIPTIONEND####
+*/
+
+#include <pkgconf/devs_eth_opencores_ethermac.h>
+
+
+/* Ethernet configuration registers */
+typedef struct _oeth_regs {
+ cyg_uint32 moder; /* Mode Register */
+ cyg_uint32 int_src; /* Interrupt Source Register */
+ cyg_uint32 int_mask; /* Interrupt Mask Register */
+ cyg_uint32 ipgt; /* Back to Bak Inter Packet Gap Register */
+ cyg_uint32 ipgr1; /* Non Back to Back Inter Packet Gap Register 1 */
+ cyg_uint32 ipgr2; /* Non Back to Back Inter Packet Gap Register 2 */
+ cyg_uint32 packet_len; /* Packet Length Register (min. and max.) */
+ cyg_uint32 collconf; /* Collision and Retry Configuration Register */
+ cyg_uint32 tx_bd_num; /* Transmit Buffer Descriptor Number Register */
+ cyg_uint32 ctrlmoder; /* Control Module Mode Register */
+ cyg_uint32 miimoder; /* MII Mode Register */
+ cyg_uint32 miicommand; /* MII Command Register */
+ cyg_uint32 miiaddress; /* MII Address Register */
+ cyg_uint32 miitx_data; /* MII Transmit Data Register */
+ cyg_uint32 miirx_data; /* MII Receive Data Register */
+ cyg_uint32 miistatus; /* MII Status Register */
+ cyg_uint32 mac_addr0; /* MAC Individual Address Register 0 */
+ cyg_uint32 mac_addr1; /* MAC Individual Address Register 1 */
+ cyg_uint32 hash_addr0; /* Hash Register 0 */
+ cyg_uint32 hash_addr1; /* Hash Register 1 */
+} oeth_regs;
+
+/* Ethernet buffer descriptor */
+typedef struct _oeth_bd {
+ cyg_uint32 len_status;
+ cyg_uint32 addr; /* Buffer address */
+} oeth_bd;
+
+#define OETH_REG_BASE(b) (b)
+#define OETH_BD_BASE(b) ((b) + 0x400)
+#define OETH_TOTAL_BD 128
+#define OETH_MAXBUF_LEN 0x600
+
+/* Tx BD */
+#define OETH_TX_BD_READY 0x8000 /* Tx BD Ready */
+#define OETH_TX_BD_IRQ 0x4000 /* Tx BD IRQ Enable */
+#define OETH_TX_BD_WRAP 0x2000 /* Tx BD Wrap (last BD) */
+#define OETH_TX_BD_PAD 0x1000 /* Tx BD Pad Enable */
+#define OETH_TX_BD_CRC 0x0800 /* Tx BD CRC Enable */
+
+#define OETH_TX_BD_UNDERRUN 0x0100 /* Tx BD Underrun Status */
+#define OETH_TX_BD_RETRY 0x00F0 /* Tx BD Retry Status */
+#define OETH_TX_BD_RETLIM 0x0008 /* Tx BD Retransmission Limit Status */
+#define OETH_TX_BD_LATECOL 0x0004 /* Tx BD Late Collision Status */
+#define OETH_TX_BD_DEFER 0x0002 /* Tx BD Defer Status */
+#define OETH_TX_BD_CARRIER 0x0001 /* Tx BD Carrier Sense Lost Status */
+#define OETH_TX_BD_STATS (OETH_TX_BD_UNDERRUN | \
+ OETH_TX_BD_RETRY | \
+ OETH_TX_BD_RETLIM | \
+ OETH_TX_BD_LATECOL | \
+ OETH_TX_BD_DEFER | \
+ OETH_TX_BD_CARRIER)
+
+/* Rx BD */
+#define OETH_RX_BD_EMPTY 0x8000 /* Rx BD Empty */
+#define OETH_RX_BD_IRQ 0x4000 /* Rx BD IRQ Enable */
+#define OETH_RX_BD_WRAP 0x2000 /* Rx BD Wrap (last BD) */
+
+#define OETH_RX_BD_MISS 0x0080 /* Rx BD Miss Status */
+#define OETH_RX_BD_OVERRUN 0x0040 /* Rx BD Overrun Status */
+#define OETH_RX_BD_INVSIMB 0x0020 /* Rx BD Invalid Symbol Status */
+#define OETH_RX_BD_DRIBBLE 0x0010 /* Rx BD Dribble Nibble Status */
+#define OETH_RX_BD_TOOLONG 0x0008 /* Rx BD Too Long Status */
+#define OETH_RX_BD_SHORT 0x0004 /* Rx BD Too Short Frame Status */
+#define OETH_RX_BD_CRCERR 0x0002 /* Rx BD CRC Error Status */
+#define OETH_RX_BD_LATECOL 0x0001 /* Rx BD Late Collision Status */
+#define OETH_RX_BD_STATS (OETH_RX_BD_MISS | \
+ OETH_RX_BD_OVERRUN | \
+ OETH_RX_BD_INVSIMB | \
+ OETH_RX_BD_DRIBBLE | \
+ OETH_RX_BD_TOOLONG | \
+ OETH_RX_BD_SHORT | \
+ OETH_RX_BD_CRCERR | \
+ OETH_RX_BD_LATECOL)
+
+/* MODER Register */
+#define OETH_MODER_RXEN 0x00000001 /* Receive Enable */
+#define OETH_MODER_TXEN 0x00000002 /* Transmit Enable */
+#define OETH_MODER_NOPRE 0x00000004 /* No Preamble */
+#define OETH_MODER_BRO 0x00000008 /* Reject Broadcast */
+#define OETH_MODER_IAM 0x00000010 /* Use Individual Hash */
+#define OETH_MODER_PRO 0x00000020 /* Promiscuous (receive all) */
+#define OETH_MODER_IFG 0x00000040 /* Min. IFG not required */
+#define OETH_MODER_LOOPBCK 0x00000080 /* Loop Back */
+#define OETH_MODER_NOBCKOF 0x00000100 /* No Backoff */
+#define OETH_MODER_EXDFREN 0x00000200 /* Excess Defer */
+#define OETH_MODER_FULLD 0x00000400 /* Full Duplex */
+#define OETH_MODER_RST 0x00000800 /* Reset MAC */
+#define OETH_MODER_DLYCRCEN 0x00001000 /* Delayed CRC Enable */
+#define OETH_MODER_CRCEN 0x00002000 /* CRC Enable */
+#define OETH_MODER_HUGEN 0x00004000 /* Huge Enable */
+#define OETH_MODER_PAD 0x00008000 /* Pad Enable */
+#define OETH_MODER_RECSMALL 0x00010000 /* Receive Small */
+
+/* Interrupt Source Register */
+#define OETH_INT_TXB 0x00000001 /* Transmit Buffer IRQ */
+#define OETH_INT_TXE 0x00000002 /* Transmit Error IRQ */
+#define OETH_INT_RXF 0x00000004 /* Receive Frame IRQ */
+#define OETH_INT_RXE 0x00000008 /* Receive Error IRQ */
+#define OETH_INT_BUSY 0x00000010 /* Busy IRQ */
+#define OETH_INT_TXC 0x00000020 /* Transmit Control Frame IRQ */
+#define OETH_INT_RXC 0x00000040 /* Received Control Frame IRQ */
+
+/* Interrupt Mask Register */
+#define OETH_INT_MASK_TXB 0x00000001 /* Transmit Buffer IRQ Mask */
+#define OETH_INT_MASK_TXE 0x00000002 /* Transmit Error IRQ Mask */
+#define OETH_INT_MASK_RXF 0x00000004 /* Receive Frame IRQ Mask */
+#define OETH_INT_MASK_RXE 0x00000008 /* Receive Error IRQ Mask */
+#define OETH_INT_MASK_BUSY 0x00000010 /* Busy IRQ Mask */
+#define OETH_INT_MASK_TXC 0x00000020 /* Transmit Control Frame IRQ Mask */
+#define OETH_INT_MASK_RXC 0x00000040 /* Received Control Frame IRQ Mask */
+
+/* Control Module Mode Register */
+#define OETH_CTRLMODER_PASSALL 0x00000001 /* Pass Control Frames */
+#define OETH_CTRLMODER_RXFLOW 0x00000002 /* Receive Control Flow Enable */
+#define OETH_CTRLMODER_TXFLOW 0x00000004 /* Transmit Control Flow Enable */
+
+/* MII Mode Register */
+#define OETH_MIIMODER_CLKDIV 0x000000FF /* Clock Divider */
+#define OETH_MIIMODER_NOPRE 0x00000100 /* No Preamble */
+#define OETH_MIIMODER_RST 0x00000200 /* MIIM Reset */
+
+/* MII Command Register */
+#define OETH_MIICOMMAND_SCANSTAT 0x00000001 /* Scan Status */
+#define OETH_MIICOMMAND_RSTAT 0x00000002 /* Read Status */
+#define OETH_MIICOMMAND_WCTRLDATA 0x00000004 /* Write Control Data */
+
+/* MII Address Register */
+#define OETH_MIIADDRESS_FIAD 0x0000001F /* PHY Address */
+#define OETH_MIIADDRESS_RGAD 0x00001F00 /* RGAD Address */
+
+/* MII Status Register */
+#define OETH_MIISTATUS_LINKFAIL 0x00000001 /* Link Fail */
+#define OETH_MIISTATUS_BUSY 0x00000002 /* MII Busy */
+#define OETH_MIISTATUS_NVALID 0x00000004 /* Data in MII Status Register is invalid */
+
+/* Buffer number (must be 2^n) */
+#define OETH_RXBD_NUM CYGINT_DEVS_ETH_OPENCORES_ETHERMAC_RxNUM
+#define OETH_TXBD_NUM CYGINT_DEVS_ETH_OPENCORES_ETHERMAC_TxNUM
+#define OETH_RXBD_NUM_MASK (OETH_RXBD_NUM-1)
+#define OETH_TXBD_NUM_MASK (OETH_TXBD_NUM-1)
+
+/* Buffer size (if not XXBUF_PREALLOC */
+#define OETH_MAX_FRAME_SIZE ((1518 + 7) & ~7)
+
+/* Buffer size */
+#define OETH_RX_BUFF_SIZE OETH_MAX_FRAME_SIZE
+#define OETH_TX_BUFF_SIZE OETH_MAX_FRAME_SIZE
+
+struct net_device_stats
+{
+ unsigned long rx_packets; /* total packets received */
+ unsigned long tx_packets; /* total packets transmitted */
+ unsigned long rx_bytes; /* total bytes received */
+ unsigned long tx_bytes; /* total bytes transmitted */
+ unsigned long rx_errors; /* bad packets received */
+ unsigned long tx_errors; /* packet transmit problems */
+ unsigned long rx_dropped; /* no space in linux buffers */
+ unsigned long tx_dropped; /* no space available in linux */
+ unsigned long multicast; /* multicast packets received */
+ unsigned long collisions;
+
+ /* detailed rx_errors: */
+ unsigned long rx_length_errors;
+ unsigned long rx_over_errors; /* receiver ring buff overflow */
+ unsigned long rx_crc_errors; /* recved pkt with crc error */
+ unsigned long rx_frame_errors; /* recv'd frame alignment error */
+ unsigned long rx_fifo_errors; /* recv'r fifo overrun */
+ unsigned long rx_missed_errors; /* receiver missed packet */
+
+ /* detailed tx_errors */
+ unsigned long tx_aborted_errors;
+ unsigned long tx_carrier_errors;
+ unsigned long tx_fifo_errors;
+ unsigned long tx_heartbeat_errors;
+ unsigned long tx_window_errors;
+
+ /* for cslip etc */
+ unsigned long rx_compressed;
+ unsigned long tx_compressed;
+};
+
+/* The buffer descriptors track the ring buffers. */
+struct oeth_private {
+
+ cyg_uint32 tx_next; /* Next buffer to be sent */
+ cyg_uint32 tx_last; /* Next buffer to be checked if packet sent */
+ cyg_uint32 tx_full; /* Buffer ring fuul indicator */
+ cyg_uint32 rx_cur; /* Next buffer to be checked if packet received */
+
+ oeth_regs *regs; /* Address of controller registers. */
+ oeth_bd *rx_bd_base; /* Address of Rx BDs. */
+ oeth_bd *tx_bd_base; /* Address of Tx BDs. */
+ cyg_uint32 irq;
+
+ cyg_uint32 tx_keys[OETH_TXBD_NUM]; /* remember tx keys */
+
+
+ struct net_device_stats stats;
+};
+
+// ------------------------------------------------------------------------
+//
+// STATISTICAL COUNTER STRUCTURE
+//
+// ------------------------------------------------------------------------
+#ifdef KEEP_STATISTICS
+
+typedef struct {
+ cyg_uint32 interrupts;
+ cyg_uint32 rx_count;
+ cyg_uint32 rx_deliver;
+ cyg_uint32 rx_resource;
+ cyg_uint32 rx_restart;
+ cyg_uint32 tx_count;
+ cyg_uint32 tx_complete;
+ cyg_uint32 tx_dropped;
+} STATISTICS;
+
+extern STATISTICS statistics[CYGNUM_DEVS_ETH_OPENCORES_ETHERMAC_DEV_COUNT];
+
+#endif // KEEP_STATISTICS
+
+// ------------------------------------------------------------------------
+//
+// DEVICES AND PACKET QUEUES
+//
+// ------------------------------------------------------------------------
+// The system seems to work OK with as few as 8 of RX and TX descriptors.
+// It limps very painfully with only 4.
+// Performance is better with more than 8.
+// But the size of non-cached (so useless for anything else)
+// memory window is 1Mb, so we might as well use it all.
+//
+// 128 for these uses the whole 1Mb, near enough.
+
+typedef struct _oeth_info {
+ struct oeth_private cep;
+
+ cyg_uint8 found:1; // was hardware discovered?
+ cyg_uint8 mac_addr_ok:1; // can we bring up?
+ cyg_uint8 active:1; // has this if been brung up?
+
+ cyg_uint8 multicast_all:1;
+ cyg_uint8 promisc:1;
+
+
+ cyg_uint8 dev_addr[6];
+ struct eth_drv_sc *sc;
+ cyg_uint32 idx;
+
+ // Interrupt handling stuff
+ cyg_vector_t vector; // interrupt vector
+ cyg_handle_t interrupt_handle; // handle for int.handler
+ cyg_interrupt interrupt_object;
+
+#ifdef KEEP_STATISTICS
+ void *p_statistics; // pointer to statistical counters
+#endif
+
+} oeth_info;
+
+
+
+#endif
+
+/* EOF oeth_info.h */
+
diff --git a/cesar/ecos/packages/devs/eth/opencores/ethermac/current/src/if_oeth.c b/cesar/ecos/packages/devs/eth/opencores/ethermac/current/src/if_oeth.c
new file mode 100644
index 0000000000..22c1fbc3f6
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/opencores/ethermac/current/src/if_oeth.c
@@ -0,0 +1,944 @@
+//==========================================================================
+//
+// dev/if_oeth.c
+//
+// Ethernet device driver for Opencores ethermac
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Nick Garnett
+// Copyright (C) 2004 Andrew Lunn
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research, (Konrad Eisele<eiselekd@web.de>)
+// Contributors:
+// Date: 2005-01-22
+// Purpose:
+// Description:
+// Notes:
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+
+#include <pkgconf/system.h>
+#ifdef CYGPKG_IO_ETH_DRIVERS
+#include <pkgconf/io_eth_drivers.h>
+#endif
+#include <pkgconf/devs_eth_opencores_ethermac.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_diag.h>
+#include <cyg/hal/hal_io.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/drv_api.h>
+#include <cyg/io/eth/netdev.h>
+#include <cyg/io/eth/eth_drv.h>
+#include <cyg/hal/hal_cache.h>
+
+#ifdef CYGPKG_NET
+#include <pkgconf/net.h>
+#include <cyg/kernel/kapi.h>
+#include <net/if.h> /* Needed for struct ifnet */
+#endif
+
+#ifdef CYGPKG_KERNEL
+#include <cyg/kernel/kapi.h>
+#endif
+
+#if CYGNUM_DEVS_ETH_OPENCORES_ETHERMAC_DEV_COUNT > 1
+#error Only 1 ethermac at a time supported yet
+#endif
+
+//#define DEBUG_OPENETH
+
+#ifdef DEBUG_OPENETH
+#define DEBUG_RX_PACKETS 0
+#define DEBUG_TX_PACKETS 0
+#define os_printf diag_printf
+#define db_printf diag_printf
+#else
+#define DEBUG_RX_PACKETS 0
+#define DEBUG_TX_PACKETS 0
+#define os_printf(fmt,...)
+#define db_printf(fmt,...)
+#endif
+
+#define MACADDR0 macaddr[0]
+#define MACADDR1 macaddr[1]
+#define MACADDR2 macaddr[2]
+#define MACADDR3 macaddr[3]
+#define MACADDR4 macaddr[4]
+#define MACADDR5 macaddr[5]
+
+/* The transmitter timeout */
+#define TX_TIMEOUT (2*HZ)
+
+#define ETH_ALEN 6 /* Octets in one ethernet addr */
+#define ETH_HLEN 14 /* Total octets in header. */
+#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */
+
+#include <oeth_info.h>
+#include CYGDAT_DEVS_ETH_OPENCORES_ETHERMAC_INL
+
+cyg_uint8 macaddr[6] = CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC_ETH0_ESA;
+
+
+#define OETH_REGLOAD(a,v) HAL_READ_UINT32(&(a),v);
+#define OETH_REGSAVE(a,v) HAL_WRITE_UINT32(&(a),v);
+#define OETH_REGORIN(a,v) \
+ { cyg_uint32 va; \
+ OETH_REGLOAD(a,va); \
+ va |= v; \
+ OETH_REGSAVE(a,va); \
+ }
+#define OETH_REGANDIN(a,v) \
+ { cyg_uint32 va; \
+ OETH_REGLOAD(a,va); \
+ va &= v; \
+ OETH_REGSAVE(a,va); \
+ }
+
+static void openeth_start( struct eth_drv_sc *sc, unsigned char *enaddr, int flags );
+static void openeth_stop( struct eth_drv_sc *sc );
+static cyg_uint32 eth_isr(cyg_vector_t vector, cyg_addrword_t data);
+static void eth_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data);
+static void oeth_tx(struct eth_drv_sc *sc);
+static void openeth_rxready(struct eth_drv_sc *sc);
+static void oeth_txdone(struct eth_drv_sc *sc);
+
+
+
+
+static cyg_uint8 rxbuff[OETH_RXBD_NUM*OETH_RX_BUFF_SIZE];
+static cyg_uint8 txbuff[OETH_TXBD_NUM*OETH_TX_BUFF_SIZE];
+
+bool openeth_init(struct cyg_netdevtab_entry *ndp) {
+ CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC_INITFN(ndp);
+}
+
+#if !defined(DEBUG_RX_PACKETS) && !defined(DEBUG_TX_PACKETS)
+static void oeth_print_packet(unsigned long add, int len)
+{
+ int i;
+ diag_printf("ipacket: add = %x len = %d\n", (unsigned int)add, len);
+ for(i = 0; i < len; i++) {
+ if(!(i % 16))
+ diag_printf("\n");
+ diag_printf(" %.2x", *(((unsigned char *)add) + i));
+ }
+ diag_printf("\n");
+ diag_printf("\n");
+}
+#endif
+
+static void openeth_start( struct eth_drv_sc *sc, unsigned char *enaddr, int flags ) {
+
+ oeth_info *oi = (oeth_info *)sc->driver_private;
+ oeth_regs *regs = oi->cep.regs;
+ struct oeth_private *cep = (struct oeth_private *)&(oi->cep);
+ volatile oeth_bd *bdp;
+ int i;
+
+ if ( oi->active )
+ openeth_stop( sc );
+
+ db_printf("openeth_start: irq %d\n",cep ->irq);
+
+ /* Install our interrupt handler. */
+ cyg_drv_interrupt_create(cep ->irq,
+ 0, // Priority - unused
+ (CYG_ADDRWORD)sc, // Data item passed to ISR & DSR
+ eth_isr, // ISR
+ eth_dsr, // DSR
+ &oi->interrupt_handle, // handle to intr obj
+ &oi->interrupt_object ); // space for int obj
+ cyg_drv_interrupt_attach(oi->interrupt_handle);
+ cyg_drv_interrupt_acknowledge(cep->irq);
+ cyg_drv_interrupt_unmask(cep ->irq);
+
+ // Enable device
+ oi->active = 1;
+
+ /* Initialize transmit pointers. */
+ cep->rx_cur = 0;
+ cep->tx_next = 0;
+ cep->tx_last = 0;
+ cep->tx_full = 0;
+
+ bdp = cep->rx_bd_base;
+ for (i = 0; i < OETH_RXBD_NUM; i++) {
+ OETH_REGORIN(bdp->len_status , OETH_RX_BD_EMPTY); //bdp->len_status |= OETH_RX_BD_EMPTY;
+ bdp++;
+ }
+
+ /* Enable receiver and transmiter */
+ OETH_REGORIN(regs->moder , OETH_MODER_RXEN | OETH_MODER_TXEN); //regs->moder |= OETH_MODER_RXEN | OETH_MODER_TXEN;
+}
+
+
+static void openeth_stop( struct eth_drv_sc *sc ) {
+
+ oeth_info *oi = (oeth_info *)sc->driver_private;
+ oeth_regs *regs = oi->cep.regs;
+ struct oeth_private *cep = (struct oeth_private *)&(oi->cep);
+ volatile oeth_bd *bdp;
+ int i;
+
+ db_printf("openeth_stop\n");
+
+ /* Free interrupt hadler */
+ cyg_interrupt_delete(oi->interrupt_handle);
+
+ /* Disable receiver and transmitesr */
+ OETH_REGANDIN(regs->moder , ~(OETH_MODER_RXEN | OETH_MODER_TXEN)); //regs->moder &= ~(OETH_MODER_RXEN | OETH_MODER_TXEN);
+
+ bdp = cep->rx_bd_base;
+ for (i = 0; i < OETH_RXBD_NUM; i++) {
+ OETH_REGANDIN(bdp->len_status , ~(OETH_RX_BD_STATS | OETH_RX_BD_EMPTY)); //bdp->len_status &= ~(OETH_RX_BD_STATS | OETH_RX_BD_EMPTY);
+ bdp++;
+ }
+
+ bdp = cep->tx_bd_base;
+ for (i = 0; i < OETH_TXBD_NUM; i++) {
+ OETH_REGANDIN(bdp->len_status, ~(OETH_TX_BD_STATS | OETH_TX_BD_READY)); //bdp->len_status &= ~(OETH_TX_BD_STATS | OETH_TX_BD_READY);
+ bdp++;
+ }
+
+ memset(cep->tx_keys,0,sizeof(cep->tx_keys));
+
+ oi->active = 0; // stop people tormenting it
+
+}
+
+static cyg_uint32 eth_isr(cyg_vector_t vector, cyg_addrword_t data) {
+ struct eth_drv_sc *sc = (struct eth_drv_sc *)data;
+ oeth_info *oi = (oeth_info *)sc->driver_private;
+ struct oeth_private *cep = (struct oeth_private *)&(oi->cep);
+ oeth_regs *regs = oi->cep.regs;
+ cyg_uint32 int_events, calldsr = 0;
+ //cyg_uint32 cpu = sparc_leon3_get_cpuid();
+
+ /* Get the interrupt events that caused us to be here. */
+ OETH_REGLOAD(regs->int_src, int_events); //int_events = cep->regs->int_src;
+ OETH_REGSAVE(regs->int_src, int_events); //cep->regs->int_src = int_events;
+
+ /*
+ diag_printf("isr %x(cpu:%d,irq:%d)\n",int_events,cpu,cep->irq);
+ diag_printf("mask(0):0x%x\n",LEON3_IrqCtrl_Regs->mask[0]);
+ diag_printf("mask(1):0x%x\n",LEON3_IrqCtrl_Regs->mask[1]);
+ diag_printf("ipend:0x%x\n",LEON3_IrqCtrl_Regs->ipend);
+ diag_printf("force:0x%x\n",LEON3_IrqCtrl_Regs->iforce);
+ */
+
+ /* Handle receive event . */
+ if (int_events & (OETH_INT_RXF | OETH_INT_RXE)) {
+ calldsr = CYG_ISR_CALL_DSR;
+ }
+
+ /* Handle transmit event in its own function. */
+ if (int_events & (OETH_INT_TXB | OETH_INT_TXE)) {
+ calldsr = CYG_ISR_CALL_DSR;
+ }
+
+ /* Check for receive busy, i.e. packets coming but no place to put them. */
+ if (int_events & OETH_INT_BUSY) {
+ if (!(int_events & (OETH_INT_RXF | OETH_INT_RXE))) {
+ db_printf("openeth: RX buffer dumped!.\n"); /* All transmit buffers are full. Bail out.*/
+ }
+ calldsr = CYG_ISR_CALL_DSR;
+ }
+
+ cyg_drv_interrupt_acknowledge(cep ->irq);
+ if (calldsr) {
+ //cyg_drv_interrupt_mask(cep ->irq);
+ }
+
+ if (!calldsr) {
+ //diag_printf("dsr not called \n");
+ }
+
+ return (CYG_ISR_HANDLED|calldsr); // schedule DSR
+}
+
+static void eth_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data) {
+ struct eth_drv_sc *sc = (struct eth_drv_sc *)data;
+ //diag_printf("eth_dsr\n");
+#ifdef CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC_FLUSH
+ HAL_DCACHE_INVALIDATE_ALL();
+#endif
+ eth_drv_dsr( vector, count, (cyg_addrword_t)sc );
+}
+
+static void openeth_deliver(struct eth_drv_sc *sc) {
+ //oeth_info *oi = (oeth_info *)sc->driver_private;
+ //struct oeth_private *cep = (struct oeth_private *)&(oi->cep);
+ //cyg_drv_dsr_lock();
+ //cyg_drv_isr_lock();
+ openeth_rxready(sc);
+ oeth_txdone(sc);
+ //cyg_drv_isr_unlock();
+ //cyg_drv_dsr_unlock();
+ //cyg_drv_interrupt_unmask(cep->irq);
+
+}
+
+static void oeth_tx(struct eth_drv_sc *sc)
+{
+ oeth_info *oi = (oeth_info *)sc->driver_private;
+ struct oeth_private *cep = (struct oeth_private *)&(oi->cep);
+ volatile oeth_bd *bdp;
+ cyg_uint32 status;
+
+ //db_printf ("oeth_tx()\n");
+
+ for (;; cep->tx_last = (cep->tx_last + 1) & OETH_TXBD_NUM_MASK) {
+
+ bdp = cep->tx_bd_base + cep->tx_last;
+ OETH_REGLOAD(bdp->len_status,status);
+
+ if ((status & OETH_TX_BD_READY) || ((cep->tx_last == cep->tx_next) && !cep->tx_full))
+ break;
+
+ /* Check status for errors */
+ if (status & OETH_TX_BD_LATECOL)
+ cep->stats.tx_window_errors++;
+ if (status & OETH_TX_BD_RETLIM)
+ cep->stats.tx_aborted_errors++;
+ if (status & OETH_TX_BD_UNDERRUN)
+ cep->stats.tx_fifo_errors++;
+ if (status & OETH_TX_BD_CARRIER)
+ cep->stats.tx_carrier_errors++;
+ if (status & (OETH_TX_BD_LATECOL | OETH_TX_BD_RETLIM | OETH_TX_BD_UNDERRUN))
+ cep->stats.tx_errors++;
+
+ cep->stats.tx_packets++;
+ cep->stats.collisions += (status >> 4) & 0x000f;
+
+ if (cep->tx_full)
+ cep->tx_full = 0;
+ }
+}
+
+//pass tx-keys up the stack when packets are transmitted, called from can_send() and deliver()
+static void oeth_txdone(struct eth_drv_sc *sc) {
+ oeth_info *oi = (oeth_info *)sc->driver_private;
+ struct oeth_private *cep = (struct oeth_private *)&(oi->cep);
+ volatile oeth_bd *bdp;
+ cyg_uint32 status, i;
+
+ oeth_tx(sc);
+
+ //db_printf ("oeth_txdone()\n");
+ for (i = 0; i < OETH_TXBD_NUM; i++) {
+ bdp = cep->tx_bd_base + i;
+ OETH_REGLOAD(bdp->len_status,status);
+ if (cep->tx_keys[i] && !(status & OETH_TX_BD_READY)) {
+ unsigned long k = cep->tx_keys[i];
+ cep->tx_keys[i] = 0;
+ //diag_printf ("%i: key 0x%x, ready: %d\n",k ,status & OETH_TX_BD_READY ? 1 : 0);
+ //db_printf("tx=%d\n",i);
+ (sc->funs->eth_drv->tx_done)( sc, k, 0 );
+ }
+ }
+}
+
+#ifdef ETH_DRV_GET_MAC_ADDRESS
+static int eth_get_mac_address(struct eth_drv_sc *sc, char *addr)
+{
+ oeth_info *oi = (oeth_info *)sc->driver_private;
+ oeth_regs *regs = oi->cep.regs;
+ cyg_uint32 m0,m1;
+ db_printf("eth_get_mac_address\n");
+ OETH_REGLOAD(regs->mac_addr1 ,m1);
+ OETH_REGLOAD(regs->mac_addr0 ,m0);
+ addr[0] = (m1 >> 8) & 0xff;
+ addr[1] = (m1 >> 0) & 0xff;
+ addr[2] = (m0 >>24) & 0xff;
+ addr[3] = (m0 >>16) & 0xff;
+ addr[4] = (m0 >> 8) & 0xff;
+ addr[5] = (m0 >> 0) & 0xff;
+ return 0;
+}
+#endif
+
+#ifdef ETH_DRV_SET_MAC_ADDRESS
+static int eth_set_mac_address(struct eth_drv_sc *sc, cyg_uint8 *addr, int eeprom)
+{
+ oeth_info *oi = (oeth_info *)sc->driver_private;
+ oeth_regs *regs = oi->cep.regs;
+ db_printf("eth_set_mac_address\n");
+ oi->dev_addr[0] = addr[0];
+ oi->dev_addr[1] = addr[1];
+ oi->dev_addr[2] = addr[2];
+ oi->dev_addr[3] = addr[3];
+ oi->dev_addr[4] = addr[4];
+ oi->dev_addr[5] = addr[5];
+ OETH_REGSAVE(regs->mac_addr1 ,
+ addr[0] << 8 |
+ addr[1]);
+ OETH_REGSAVE(regs->mac_addr0 ,
+ addr[2] << 24 |
+ addr[3] << 16 |
+ addr[4] << 8 |
+ addr[5]);
+ return 1;
+}
+#endif
+
+static int calc_crc(unsigned char *mac_addr)
+{
+ int result = 0;
+ return (result & 0x3f);
+}
+
+static void oeth_set_multicast_list(struct eth_drv_sc *sc, struct eth_drv_mc_list *mcl)
+{
+
+
+ oeth_info *oi = (oeth_info *)sc->driver_private;
+ /* Get pointer of controller registers. */
+ volatile oeth_regs *regs = oi->cep.regs;
+ int i;
+
+ //db_printf("oeth_set_multicast_list: promisc: %d mc_all: %d (mc_list: %d)\n",oi->promisc,oi->multicast_all,mcl->len);
+
+
+ if (oi->promisc) {
+ /* Log any net taps. */
+ db_printf("Promiscuous mode enabled.\n");
+ OETH_REGORIN(regs->moder , OETH_MODER_PRO); //regs->moder |= OETH_MODER_PRO;
+ } else {
+ OETH_REGANDIN(regs->moder , ~OETH_MODER_PRO); //regs->moder &= ~OETH_MODER_PRO;
+ if (oi->multicast_all) {
+ /* Catch all multicast addresses, so set the filter to all 1's. */
+ OETH_REGSAVE(regs->hash_addr0 , 0xffffffff); //regs->hash_addr0 = 0xffffffff
+ OETH_REGSAVE(regs->hash_addr1 , 0xffffffff); //regs->hash_addr0 = 0xffffffff
+ }
+ else if (mcl && mcl->len) {
+
+ //db_printf("oeth_set_multicast_list: multicastlist \n");
+ OETH_REGORIN(regs->moder , OETH_MODER_IAM); //regs->moder |= OETH_MODER_IAM;
+
+ /* Clear filter and add the addresses in the list. */
+ OETH_REGSAVE(regs->hash_addr0 , 0x00000000); //regs->hash_addr0 = 0x00000000
+ OETH_REGSAVE(regs->hash_addr0 , 0x00000000); //regs->hash_addr0 = 0x00000000
+
+ for (i = 0; i < mcl->len; i++) {
+
+ int hash_b;
+
+ /* Only support group multicast for now. */
+ if (!(mcl->addrs[i][0] & 1))
+ continue;
+
+ //db_printf("%x %x %x %x %x %x\n",mcl->addrs[i][0],mcl->addrs[i][1],mcl->addrs[i][2],
+ //mcl->addrs[i][3],mcl->addrs[i][4],mcl->addrs[i][5]
+ //);
+
+ hash_b = calc_crc(mcl->addrs[i]);
+ if(hash_b >= 32) {
+ OETH_REGORIN(regs->hash_addr1 , 1 << (hash_b - 32)); //regs->hash_addr1 |= 1 << (hash_b - 32);
+ } else {
+ OETH_REGORIN(regs->hash_addr0 , 1 << hash_b); //regs->hash_addr0 |= 1 << hash_b;
+ }
+ }
+ }
+ }
+}
+
+static int openeth_ioctl(struct eth_drv_sc *sc, unsigned long key, void *data, int data_length) {
+ oeth_info *oi = (oeth_info *)sc->driver_private;
+
+ //db_printf("openeth_ioctl\n");
+ //db_printf( "openeth_ioctl: device eth%d at %x; key is 0x%x, data at %x[%d]\n",
+ //oi->idx, oi, key, data, data_length );
+
+ switch ( key ) {
+#ifdef ETH_DRV_SET_MC_LIST
+ case ETH_DRV_SET_MC_LIST: {
+ struct eth_drv_mc_list *mcl = (struct eth_drv_mc_list *)data;
+ oi->multicast_all = 0;
+ oeth_set_multicast_list(sc, mcl);
+ return 0;
+ }
+#endif // ETH_DRV_SET_MC_LIST
+#ifdef ETH_DRV_SET_MC_ALL
+ case ETH_DRV_SET_MC_ALL:
+ oi->multicast_all = 1;
+ oeth_set_multicast_list(sc, 0);
+ return 0;
+#endif // ETH_DRV_SET_MC_ALL
+
+#ifdef ETH_DRV_SET_MAC_ADDRESS
+ case ETH_DRV_SET_MAC_ADDRESS:
+ if ( 6 != data_length )
+ return -2;
+ return eth_set_mac_address( sc, data, 1 /* do write eeprom */ );
+#endif
+#ifdef ETH_DRV_GET_MAC_ADDRESS
+ case ETH_DRV_GET_MAC_ADDRESS:
+ return eth_get_mac_address( sc, data );
+#endif
+ default:
+ break;
+ }
+ return -1;
+}
+
+
+static int openeth_can_send(struct eth_drv_sc *sc) {
+ oeth_info *oi = (oeth_info *)sc->driver_private;
+ struct oeth_private *cep = (struct oeth_private *)&(oi->cep);
+ oeth_txdone(sc);
+ //db_printf("openeth: openeth_can_send: %d\n",!cep->tx_full);
+
+
+
+ return !cep->tx_full;
+}
+
+static void openeth_send(struct eth_drv_sc *sc,
+ struct eth_drv_sg *sg_list, int sg_len, int total_len,
+ unsigned long key) {
+
+ oeth_info *oi = (oeth_info *)sc->driver_private;
+ struct oeth_private *cep = (struct oeth_private *)&(oi->cep);
+ volatile oeth_bd *bdp;
+ cyg_uint32 status, addr;
+ int len, i, ec = 0;
+ cyg_uint8 *to_addr;
+
+ /* Fill in a Tx ring entry */
+ bdp = cep->tx_bd_base + cep->tx_next;
+ cep->tx_keys[cep->tx_next] = key;
+
+ OETH_REGLOAD(bdp->len_status,status);
+
+ if (OETH_TX_BD_READY & status) {
+ diag_printf("openeth: tx counter mismatch!.\n");
+ return;
+ }
+ if (cep->tx_full) {
+ diag_printf("openeth: tx queue full!.\n"); /* All transmit buffers are full. Bail out.*/
+ return;
+ }
+
+ /* Clear all of the status flags. */
+ OETH_REGANDIN(bdp->len_status , ~OETH_TX_BD_STATS); //bdp->len_status &= ~OETH_TX_BD_STATS;
+
+ /* If the frame is short, tell CPM to pad it. */
+ if (total_len <= ETH_ZLEN) {
+ OETH_REGORIN(bdp->len_status , OETH_TX_BD_PAD); //bdp->len_status |= OETH_TX_BD_PAD;
+ } else {
+ OETH_REGANDIN(bdp->len_status , ~OETH_TX_BD_PAD); //bdp->len_status &= ~OETH_TX_BD_PAD;
+ }
+
+ /* Copy data in preallocated buffer */
+ if (total_len > OETH_TX_BUFF_SIZE) {
+ diag_printf("openeth: tx frame too long!.\n");
+ return ;
+ }
+
+ OETH_REGLOAD(bdp->addr, addr);
+ to_addr = (cyg_uint8 *)addr;
+ for (i = 0; i < sg_len; i++) {
+ len = sg_list[i].len;
+ memcpy(to_addr, (void*)sg_list[i].buf, len);
+ to_addr += len; ec += len;
+ }
+
+ if (ec != total_len) {
+ diag_printf("openeth: packet length wrong!.\n");
+ }
+
+#if DEBUG_TX_PACKETS
+ db_printf("TX\n");
+ oeth_print_packet((unsigned long)addr, total_len);
+#endif
+
+
+ OETH_REGLOAD(bdp->len_status,status);
+ OETH_REGSAVE(bdp->len_status , (status & 0x0000ffff) | (total_len << 16)); //bdp->len_status = (bdp->len_status & 0x0000ffff) | (skb->len << 16);
+
+ cep->tx_next = (cep->tx_next + 1) & OETH_TXBD_NUM_MASK;
+
+ if (cep->tx_next == cep->tx_last)
+ cep->tx_full = 1;
+
+ /* Send it on its way. Tell controller its ready, interrupt when done, and to put the CRC on the end. */
+ OETH_REGORIN(bdp->len_status , (OETH_TX_BD_READY | OETH_TX_BD_IRQ | OETH_TX_BD_CRC)); //bdp->len_status |= (OETH_TX_BD_READY | OETH_TX_BD_IRQ | OETH_TX_BD_CRC);
+ return;
+}
+
+static void openeth_recv( struct eth_drv_sc *sc, struct eth_drv_sg *sg_list, int sg_len ) {
+ oeth_info *oi = (oeth_info *)sc->driver_private;
+ struct oeth_private *cep = (struct oeth_private *)&(oi->cep);
+ volatile oeth_bd *bdp;
+ cyg_uint8 *from_addr;
+ cyg_uint32 from, status, i;
+ int pkt_len, total_len;
+
+ //diag_printf ("-recv(%d)",cep->rx_cur);
+
+ bdp = cep->rx_bd_base + cep->rx_cur;
+ OETH_REGLOAD(bdp->len_status,status);
+ OETH_REGLOAD(bdp->addr,from);
+ from_addr = (cyg_uint8 *) from;
+
+ /* Process the incoming frame. */
+ total_len = pkt_len = status >> 16; //pkt_len = bdp->len_status >> 16;
+
+ for ( i = 0; i < sg_len; i++ ) {
+ cyg_uint8 *to_addr;
+ int len;
+ to_addr = (cyg_uint8 *)(sg_list[i].buf);
+ len = sg_list[i].len;
+
+ if (to_addr == 0 || len <= 0)
+ return; // out of mbufs
+
+ if ( len > pkt_len )
+ len = pkt_len;
+
+ //diag_printf("RX %x <- %x (%x)\n",to_addr,from_addr,len);
+ memcpy( to_addr, (void *)from_addr, len );
+ from_addr += len;
+ pkt_len -= len;
+
+ /* {
+
+ int i;
+ for(i = 0; i < len; i++) {
+ if(!(i % 16))
+ diag_printf("\n");
+ diag_printf(" %.2x", *(((unsigned char *)to_addr) + i));
+ }
+ diag_printf("\n");
+ }*/
+
+
+ }
+
+ if (pkt_len > 0) {
+ diag_printf("oeth: sglist: not all data received\n");
+ }
+
+
+#if DEBUG_RX_PACKETS
+ diag_printf("RX\n");
+ oeth_print_packet((unsigned long)from, total_len);
+#endif
+
+ cep->stats.rx_packets++;
+
+}
+
+static void openeth_rxready(struct eth_drv_sc *sc) {
+ oeth_info *oi = (oeth_info *)sc->driver_private;
+ struct oeth_private *cep = (struct oeth_private *)&(oi->cep);
+ volatile oeth_bd *bdp;
+ cyg_uint32 status;
+
+ int pkt_len;
+ int bad = 0,i = 0;
+
+ //db_printf ("openeth_rxready\n");
+
+ /* First, grab all of the stats for the incoming packet.
+ These get messed up if we get called due to a busy condition. */
+ for (;;cep->rx_cur = (cep->rx_cur + 1) & OETH_RXBD_NUM_MASK) {
+ //for (cep->rx_cur = 0;cep->rx_cur < OETH_TXBD_NUM;cep->rx_cur++) {
+
+ bdp = cep->rx_bd_base + cep->rx_cur;
+ OETH_REGLOAD(bdp->len_status,status);
+
+ if (status & OETH_RX_BD_EMPTY) {
+ for (i = (cep->rx_cur + 1) & OETH_RXBD_NUM_MASK;i != cep->rx_cur;i = (i + 1) & OETH_RXBD_NUM_MASK) {
+ bdp = cep->rx_bd_base + i;
+ OETH_REGLOAD(bdp->len_status,status);
+ if (!(status & OETH_RX_BD_EMPTY)) {
+ diag_printf("rx not synced: %d\n",i);
+ }
+ }
+ break;
+ }
+
+
+ /* Check status for errors. */
+ if (status & (OETH_RX_BD_TOOLONG | OETH_RX_BD_SHORT)) { //if (bdp->len_status & (OETH_RX_BD_TOOLONG | OETH_RX_BD_SHORT)) {
+ diag_printf ("openeth: length error\n");
+ cep->stats.rx_length_errors++;
+ bad = 1;
+ }
+ if (status & OETH_RX_BD_DRIBBLE) { //if (bdp->len_status & OETH_RX_BD_DRIBBLE) {
+ diag_printf ("openeth: dribble error\n");
+ cep->stats.rx_frame_errors++;
+ bad = 1;
+ }
+ if (status & OETH_RX_BD_CRCERR) { //if (bdp->len_status & OETH_RX_BD_CRCERR) {
+ diag_printf ("openeth: crc error\n");
+ cep->stats.rx_crc_errors++;
+ bad = 1;
+ }
+ if (status & OETH_RX_BD_OVERRUN) { //if (bdp->len_status & OETH_RX_BD_OVERRUN) {
+ diag_printf ("openeth: overrun error\n");
+ cep->stats.rx_crc_errors++;
+ bad = 1;
+ }
+ if (status & OETH_RX_BD_MISS) { //if (bdp->len_status & OETH_RX_BD_MISS) {
+ diag_printf ("openeth: miss error\n");
+ }
+ if (status & OETH_RX_BD_LATECOL) { //if (bdp->len_status & OETH_RX_BD_LATECOL) {
+ diag_printf ("openeth: latecol error\n");
+ cep->stats.rx_frame_errors++;
+ bad = 1;
+ }
+
+ if (bad) {
+ OETH_REGANDIN(bdp->len_status , ~OETH_RX_BD_STATS); //bdp->len_status &= ~OETH_RX_BD_STATS;
+ OETH_REGORIN(bdp->len_status , OETH_RX_BD_EMPTY); //bdp->len_status |= OETH_RX_BD_EMPTY;
+ continue;
+ }
+
+ /* Process the incoming frame. */
+ pkt_len = status >> 16; //pkt_len = bdp->len_status >> 16;
+
+ //call up stack
+ //diag_printf("rx packet %d\n",pkt_len);
+
+ //diag_printf("rx=%d",cep->rx_cur);
+ (sc->funs->eth_drv->recv)( sc, pkt_len );
+ //diag_printf("\n");
+
+
+ OETH_REGANDIN(bdp->len_status , ~OETH_RX_BD_STATS); //bdp->len_status &= ~OETH_RX_BD_STATS;
+ OETH_REGORIN(bdp->len_status , OETH_RX_BD_EMPTY); //bdp->len_status |= OETH_RX_BD_EMPTY;
+ }
+}
+
+
+static void openeth_poll(struct eth_drv_sc *sc) {
+ oeth_info *oi = (oeth_info *)sc->driver_private;
+ struct oeth_private *cep = (struct oeth_private *)&(oi->cep);
+ eth_isr(cep->irq,(cyg_addrword_t)sc);
+ openeth_deliver(sc);
+}
+
+static int openeth_int_vector(struct eth_drv_sc *sc) {
+ oeth_info *oi = (oeth_info *)sc->driver_private;
+ struct oeth_private *cep = (struct oeth_private *)&(oi->cep);
+ return cep->irq;
+}
+
+static int read_mii(int addr, volatile oeth_regs *regs)
+{
+ int tmp;
+
+ do {
+ OETH_REGLOAD(regs->miistatus, tmp);
+ } while (tmp & OETH_MIISTATUS_BUSY);
+
+ OETH_REGSAVE(regs->miiaddress, addr << 8);
+ OETH_REGSAVE(regs->miicommand, OETH_MIICOMMAND_RSTAT);
+
+ do {
+ OETH_REGLOAD(regs->miistatus, tmp);
+ } while (tmp & OETH_MIISTATUS_BUSY);
+
+ OETH_REGLOAD(regs->miistatus, tmp);
+ if (!(tmp & OETH_MIISTATUS_NVALID)) {
+ OETH_REGLOAD(regs->miirx_data, tmp);
+ return tmp;
+ }
+ else {
+ diag_printf("open_eth: failed to read mii\n");
+ return (0);
+ }
+}
+
+static void write_mii(int addr, int data, volatile oeth_regs *regs)
+{
+ int tmp;
+ do {
+ OETH_REGLOAD(regs->miistatus, tmp);
+ } while (tmp & OETH_MIISTATUS_BUSY);
+
+ OETH_REGSAVE(regs->miiaddress, addr << 8);
+ OETH_REGSAVE(regs->miitx_data, data);
+ OETH_REGSAVE(regs->miicommand, OETH_MIICOMMAND_WCTRLDATA);
+
+ do {
+ OETH_REGLOAD(regs->miistatus, tmp);
+ } while (tmp & OETH_MIISTATUS_BUSY);
+
+}
+
+void openeth_device_init(struct eth_drv_sc *sc, cyg_uint32 idx, cyg_uint32 base, cyg_uint32 irq) {
+
+ struct oeth_private *cep = &openeth_priv_array[idx]->cep;
+ volatile oeth_regs *regs;
+ volatile oeth_bd *tx_bd, *rx_bd;
+ int i, mii_cr;
+ unsigned long rxmem_addr = (unsigned long)&(rxbuff);
+ unsigned long txmem_addr = (unsigned long)&(txbuff);
+
+ openeth_priv_array[idx]->found = 1;
+ /* Set default ethernet station address. */
+ openeth_priv_array[idx]->dev_addr[0] = MACADDR0;
+ openeth_priv_array[idx]->dev_addr[1] = MACADDR1;
+ openeth_priv_array[idx]->dev_addr[2] = MACADDR2;
+ openeth_priv_array[idx]->dev_addr[3] = MACADDR3;
+ openeth_priv_array[idx]->dev_addr[4] = MACADDR4;
+ openeth_priv_array[idx]->dev_addr[5] = MACADDR5;
+ openeth_priv_array[idx]->sc = sc;
+ openeth_priv_array[idx]->idx = idx;
+
+ /* Get pointer ethernet controller configuration registers. */
+ cep->regs = (oeth_regs *)(OETH_REG_BASE(base));
+ regs = (oeth_regs *)(OETH_REG_BASE(base));
+ cep->irq = irq;
+
+ /* Reset the controller. */
+ //OETH_REGSAVE(regs->moder , OETH_MODER_RST); //regs->moder = OETH_MODER_RST; /* Reset ON */
+ //OETH_REGANDIN(regs->moder , ~OETH_MODER_RST); //regs->moder &= ~OETH_MODER_RST; /* Reset OFF */
+ OETH_REGSAVE(regs->ctrlmoder, 0);
+ OETH_REGSAVE(regs->moder, OETH_MODER_RST); /* Reset ON */
+ OETH_REGSAVE(regs->moder, 0);
+
+
+ /* Setting TXBD base to OETH_TXBD_NUM. */
+ OETH_REGSAVE(regs->tx_bd_num , OETH_TXBD_NUM); //regs->tx_bd_num = OETH_TXBD_NUM;
+
+ /* Initialize TXBD pointer*/
+ cep->tx_bd_base = (oeth_bd *)OETH_BD_BASE(base);
+ tx_bd = (volatile oeth_bd *)OETH_BD_BASE(base);
+
+ /* Initialize RXBD pointer*/
+ cep->rx_bd_base = ((oeth_bd *)OETH_BD_BASE(base)) + OETH_TXBD_NUM;
+ rx_bd = ((volatile oeth_bd *)OETH_BD_BASE(base)) + OETH_TXBD_NUM;
+
+ /* Initialize transmit pointers. */
+ cep->rx_cur = 0;
+ cep->tx_next = 0;
+ cep->tx_last = 0;
+ cep->tx_full = 0;
+
+ /* Set min/max packet length */
+ OETH_REGSAVE(regs->packet_len , 0x00400600); //regs->packet_len = 0x00400600;
+
+ /* Set IPGT register to recomended value */
+ OETH_REGSAVE(regs->ipgt , 0x00000012); //regs->ipgt = 0x00000012;
+
+ /* Set IPGR1 register to recomended value */
+ OETH_REGSAVE(regs->ipgr1 , 0x0000000c); //regs->ipgr1 = 0x0000000c;
+
+ /* Set IPGR2 register to recomended value */
+ OETH_REGSAVE(regs->ipgr2 , 0x00000012); //regs->ipgr2 = 0x00000012;
+
+ /* Set COLLCONF register to recomended value */
+ OETH_REGSAVE(regs->collconf , 0x000f003f); //regs->collconf = 0x000f003f;
+
+ /* Set control module mode */
+#if 0
+ OETH_REGSAVE(regs->ctrlmoder , OETH_CTRLMODER_TXFLOW | OETH_CTRLMODER_RXFLOW); //regs->ctrlmoder = OETH_CTRLMODER_TXFLOW | OETH_CTRLMODER_RXFLOW;
+#else
+ OETH_REGSAVE(regs->ctrlmoder , 0);//regs->ctrlmoder = 0;
+#endif
+
+ /* Set PHY to show Tx status, Rx status and Link status */
+ /*regs->miiaddress = 20<<8;
+ regs->miitx_data = 0x1422;
+ regs->miicommand = OETH_MIICOMMAND_WCTRLDATA;*/
+
+ // switch to 10 mbit ethernet
+#ifdef CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC_ETH100
+ OETH_REGSAVE(regs->miiaddress , 0); //regs->miiaddress = 0;
+ OETH_REGSAVE(regs->miitx_data , 0x2000); //regs->miitx_data = 0x2000;
+ OETH_REGSAVE(regs->miicommand , OETH_MIICOMMAND_WCTRLDATA); //regs->miicommand = OETH_MIICOMMAND_WCTRLDATA;
+#else
+ OETH_REGSAVE(regs->miiaddress , 0); //regs->miiaddress = 0;
+ OETH_REGSAVE(regs->miitx_data , 0); //regs->miitx_data = 0;
+ OETH_REGSAVE(regs->miicommand , OETH_MIICOMMAND_WCTRLDATA); //regs->miicommand = OETH_MIICOMMAND_WCTRLDATA;
+#endif
+
+ /* Initialize TXBDs. */
+ for(i = 0; i < OETH_TXBD_NUM; i++) {
+ OETH_REGSAVE(tx_bd[i].len_status , OETH_TX_BD_PAD | OETH_TX_BD_CRC | OETH_TX_BD_IRQ); //tx_bd[i].len_status = OETH_TX_BD_PAD | OETH_TX_BD_CRC | OETH_RX_BD_IRQ;
+ OETH_REGSAVE(tx_bd[i].addr , txmem_addr); //tx_bd[i].addr = __pa(mem_addr);
+ txmem_addr += OETH_TX_BUFF_SIZE;
+ }
+ OETH_REGORIN(tx_bd[OETH_TXBD_NUM - 1].len_status , OETH_TX_BD_WRAP); //tx_bd[OETH_TXBD_NUM - 1].len_status |= OETH_TX_BD_WRAP;
+
+ for(i = 0; i < OETH_RXBD_NUM; i++) {
+ OETH_REGSAVE(rx_bd[i].len_status , OETH_RX_BD_EMPTY | OETH_RX_BD_IRQ); //rx_bd[k].len_status = OETH_RX_BD_EMPTY | OETH_RX_BD_IRQ;
+ OETH_REGSAVE(rx_bd[i].addr , rxmem_addr); //rx_bd[k].addr = __pa(mem_addr);
+ rxmem_addr += OETH_RX_BUFF_SIZE;
+ }
+ OETH_REGORIN(rx_bd[OETH_RXBD_NUM - 1].len_status , OETH_RX_BD_WRAP); //rx_bd[OETH_RXBD_NUM - 1].len_status |= OETH_RX_BD_WRAP;
+
+
+ OETH_REGSAVE(regs->mac_addr1 , MACADDR0 << 8 | MACADDR1); //regs->mac_addr1 = MACADDR0 << 8 | MACADDR1;
+ OETH_REGSAVE(regs->mac_addr0 , MACADDR2 << 24 | MACADDR3 << 16 | MACADDR4 << 8 | MACADDR5); //regs->mac_addr0 = MACADDR2 << 24 | MACADDR3 << 16 | MACADDR4 << 8 | MACADDR5;
+
+ /* Clear all pending interrupts */
+ OETH_REGSAVE(regs->int_src , 0xffffffff); //regs->int_src = 0xffffffff;
+
+ /* Promisc, IFG, CRCEn */
+ OETH_REGORIN(regs->moder , OETH_MODER_PAD | OETH_MODER_IFG | OETH_MODER_CRCEN); //regs->moder |= OETH_MODER_PAD | OETH_MODER_IFG | OETH_MODER_CRCEN;
+ OETH_REGANDIN(regs->moder , ~OETH_MODER_FULLD); // ensure half duplex
+
+ /* Enable interrupt sources. */
+ OETH_REGSAVE(regs->int_mask ,
+ OETH_INT_MASK_TXB | /* regs->int_mask = OETH_INT_MASK_TXB | OETH_INT_MASK_TXE | OETH_INT_MASK_RXF | OETH_INT_MASK_RXE | OETH_INT_MASK_BUSY | OETH_INT_MASK_TXC | OETH_INT_MASK_RXC; */
+ OETH_INT_MASK_TXE |
+ OETH_INT_MASK_RXF |
+ OETH_INT_MASK_RXE |
+ OETH_INT_MASK_BUSY |
+ OETH_INT_MASK_TXC |
+ OETH_INT_MASK_RXC);
+
+ db_printf("%x: Open Ethernet Core Version 1.0 at [0x%x] irq %d\n", idx,(unsigned int)(cep->regs),(unsigned int)(cep->irq));
+
+ // Initialize upper level driver
+ (sc->funs->eth_drv->init)(sc, openeth_priv_array[idx]->dev_addr);
+
+
+}
+
+// EOF if_oeth.c
diff --git a/cesar/ecos/packages/devs/eth/phy/current/ChangeLog b/cesar/ecos/packages/devs/eth/phy/current/ChangeLog
new file mode 100644
index 0000000000..88f7dd7547
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/phy/current/ChangeLog
@@ -0,0 +1,77 @@
+2005-08-25 Markus Schade <marks@peppercon.de>
+
+ * src/INLXT972.c:
+ * cdl/phy_eth_drivers.cdl: Add support for Intel LXT972
+
+2004-10-04 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * cdl/phy_eth_drivers.cdl: We call the delay function via VV so we
+ require VV support.
+
+2003-11-07 Gary Thomas <gary@mlbassoc.com>
+
+ * src/DP83847.c:
+ * src/AM79C874.c:
+ * cdl/phy_eth_drivers.cdl: Make auto-negotiation timeout configurable.
+
+2003-09-11 Gary Thomas <gary@mlbassoc.com>
+
+ * include/eth_phy.h: Minor improvement in status bitfield [comments]
+
+ * doc/eth_phy.sgml: New file - add basic documentation on PHY API.
+
+2003-08-26 Gary Thomas <gary@mlbassoc.com>
+
+ * src/DP83847.c:
+ * src/AM79C874.c: New file(s) - driver(s) for PHY devices.
+
+ * src/eth_phy.c:
+ * include/eth_phy_dev.h:
+ * include/eth_phy.h:
+ * cdl/phy_eth_drivers.cdl: Add device/chip specific drivers.
+
+2003-08-19 Gary Thomas <gary@mlbassoc.com>
+
+ * src/eth_phy.c:
+ * include/eth_phy.h:
+ * cdl/phy_eth_drivers.cdl: New file(s) - generic API for dealing
+ with ethernet PHY devices, allowing network drivers more flexibility.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+
+
+
diff --git a/cesar/ecos/packages/devs/eth/phy/current/cdl/phy_eth_drivers.cdl b/cesar/ecos/packages/devs/eth/phy/current/cdl/phy_eth_drivers.cdl
new file mode 100644
index 0000000000..1143fbebd2
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/phy/current/cdl/phy_eth_drivers.cdl
@@ -0,0 +1,99 @@
+#====================================================================
+#
+# phy_eth_drivers.cdl
+#
+# API support for ethernet transceivers (PHY)
+#
+#====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 2003 Gary Thomas
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): gthomas
+# Original data: gthomas
+# Contributors: gthomas
+# Date: 2003-08-01
+#
+#####DESCRIPTIONEND####
+#
+#====================================================================
+
+cdl_package CYGPKG_DEVS_ETH_PHY {
+ display "Ethernet transciever (PHY) support"
+ description "API for ethernet PHY devices"
+
+ parent CYGPKG_IO_ETH_DRIVERS
+ active_if CYGPKG_IO_ETH_DRIVERS
+ requires CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+
+ include_dir cyg/io
+
+ compile eth_phy.c
+
+ cdl_option CYGINT_DEVS_ETH_PHY_AUTO_NEGOTIATION_TIME {
+ display "Time period (seconds) to wait for auto-negotiation"
+ flavor data
+ default_value 5
+ description "
+ The length of time to wait for auto-negotiation to complete
+ before giving up and declaring the link dead/missing."
+ }
+
+ cdl_option CYGHWR_DEVS_ETH_PHY_DP83847 {
+ display "NSDP83847"
+ flavor bool
+ default_value 0
+ compile -library=libextras.a DP83847.c
+ description "
+ Include support for National Semiconductor DP83847 DsPHYTER II"
+ }
+
+ cdl_option CYGHWR_DEVS_ETH_PHY_AM79C874 {
+ display "AMD 79C874"
+ flavor bool
+ default_value 0
+ compile -library=libextras.a AM79C874.c
+ description "
+ Include support for AMD 79C874 NetPHY"
+ }
+
+ cdl_option CYGHWR_DEVS_ETH_PHY_INLXT972 {
+ display "Intel LXT972"
+ flavor bool
+ default_value 0
+ compile -library=libextras.a INLXT972.c
+ description "
+ Include support for Intel LXT972xxx PHY"
+ }
+}
diff --git a/cesar/ecos/packages/devs/eth/phy/current/doc/eth_phy.sgml b/cesar/ecos/packages/devs/eth/phy/current/doc/eth_phy.sgml
new file mode 100644
index 0000000000..4d4c9268d4
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/phy/current/doc/eth_phy.sgml
@@ -0,0 +1,173 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- eth_phy.sgml -->
+<!-- -->
+<!-- eCos ethernet PHY device driver documentation -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part id="io-eth-phy-generic">
+<title>Ethernet PHY Device Support</title>
+<chapter id="io-eth-phy-generic1">
+<title>Ethernet PHY Device Support</title>
+<sect1 id="io-eth-phy-api">
+<title>Ethernet PHY Device API</title>
+<para>
+Modern ethernet subsystems are often separated into two pieces, the
+media access controller (sometimes known as a MAC) and the physical
+device or line interface (often refered to as a PHY). In this case,
+the MAC handles generating and parsing physical frames and the PHY
+handles how this data is actually moved to/from the wire. The MAC
+and PHY communicate via a special protocol, known as MII. This MII
+protocol can handle control over the PHY which allows for selection
+of such transmission criteria as line speed, duplex mode, etc.
+</para>
+<para>
+In most cases, etnernet drivers only need to bother with the PHY during
+system initialization. Since the details of the PHY are separate from
+the MAC, there are different drivers for each. The drivers for the PHY
+are described by a set of exported functions which are commonly used by
+by the MAC. The primary use of these functions currently is to initialize
+the PHY and determine the status of the line connection.
+</para>
+<para>
+The connection between the MAC and the PHY differs from MAC to MAC, so
+the actual routines to manipulate this data channel are a property of
+the MAC instance. Furthermore, there are many PHY devices each with their
+own internal operations. A complete MAC/PHY driver setup will be comprised
+of the MAC MII access functions and the PHY internal driver.
+</para>
+<para>
+A driver instance is contained within a
+<type>eth_phy_access_t</type>:
+<programlisting>
+
+#define PHY_BIT_LEVEL_ACCESS_TYPE 0
+#define PHY_REG_LEVEL_ACCESS_TYPE 1
+
+typedef struct {
+ int ops_type; // 0 => bit level, 1 => register level
+ bool init_done;
+ void (*init)(void);
+ void (*reset)(void);
+ union {
+ struct {
+ void (*set_data)(int);
+ int (*get_data)(void);
+ void (*set_clock)(int);
+ void (*set_dir)(int);
+ } bit_level_ops;
+ struct {
+ void (*put_reg)(int reg, int unit, unsigned short data);
+ bool (*get_reg)(int reg, int unit, unsigned short *data);
+ } reg_level_ops;
+ } ops;
+ int phy_addr;
+ struct _eth_phy_dev_entry *dev; // Chip access functions
+} eth_phy_access_t;
+
+struct _eth_phy_dev_entry {
+ char *name;
+ unsigned long id;
+ bool (*stat)(eth_phy_access_t *f, int *stat);
+};
+
+</programlisting>
+The <varname>dev</varname> element points to the PHY speficic support
+functions.
+Currently, the only function which must be defined is <function>stat()</function>.
+</para>
+<para>
+The MAC-MII-PHY interface is a narrow connection, with commands and status
+moving between the MAC and PHY using a bit-serial protocol.
+Some MAC devices contain the intelligence to run this protocol, exposing
+a mechanism to access PHY registers one at a time. Other MAC devices may only
+provide access to the MII data lines (or even still, this may be considered
+completely separate from the MAC). In these cases, the PHY support layer
+must handle the serial protocol.
+The choice between the access methods is in the
+<varname>ops_type</varname> field.
+If it has the value
+<varname>PHY_BIT_LEVEL_ACCESS_TYPE</varname>, then the PHY device layer will
+run the protocol, using the access functions
+<function>set_data()</function>,
+<function>get_data()</function>,
+<function>set_clock()</function>,
+<function>set_dir()</function> are used to control the MII signals and run
+the protocol.
+If <varname>ops_type</varname> has the value
+<varname>PHY_REG_LEVEL_ACCESS_TYPE</varname>,
+then the routines
+<function>put_reg()</function>, and
+<function>get_reg()</function>
+are used to access the PHY registers.
+</para>
+<para>
+Two additional functions may be defined.
+These are
+<function>init()</function>, and
+<function>reset()</function>.
+The purpose of these functions is for gross-level management of the
+MII interface.
+The
+<function>init()</function>
+function will be called once, at system initialization time.
+It should do whatever operations are necessary to prepare the
+MII channel.
+In the case of
+<varname>PHY_BIT_LEVEL_ACCESS_TYPE</varname> devices,
+<function>init()</function>
+should prepare the signals for use, i.e. set up the appropriate
+parallel port registers, etc.
+The
+<function>reset()</function>
+function may be called by a driver to cause the PHY device to
+be reset to a known state.
+Not all drivers will require this and this function may not even
+be possible, so it's use and behaviour is somewhat target specific.
+</para>
+<para>
+Currently, the only function required of device specific drivers is
+<function>stat()</function>.
+This routine should query appropriate registers in the PHY and return
+a status bitmap indicating the state of the physical connection.
+In the case where the PHY can auto-negotiate a line speed and condition,
+this information may be useful to the MAC to indicate what spped it should
+provide data, etc.
+The status bitmask contains these bits:
+<programlisting>
+#define ETH_PHY_STAT_LINK 0x0001 // Link up/down
+#define ETH_PHY_STAT_100MB 0x0002 // Connection is 100Mb/10Mb
+#define ETH_PHY_STAT_FDX 0x0004 // Connection is full/half duplex
+</programlisting>
+Note: the usage here is that if the bit is set, then the condition
+exists. For example, if the
+<varname>ETH_PHY_STAT_LINK</varname>
+is set, then a physical link has been established.
+</para>
+</sect1>
+</chapter>
+</part>
diff --git a/cesar/ecos/packages/devs/eth/phy/current/include/eth_phy.h b/cesar/ecos/packages/devs/eth/phy/current/include/eth_phy.h
new file mode 100644
index 0000000000..06f87fd8b9
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/phy/current/include/eth_phy.h
@@ -0,0 +1,101 @@
+#ifndef CYGONCE_DEVS_ETH_PHY_H_
+#define CYGONCE_DEVS_ETH_PHY_H_
+//==========================================================================
+//
+// eth_phy.h
+//
+// User API for ethernet transciever (PHY) support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2003-08-01
+// Purpose:
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#define PHY_BIT_LEVEL_ACCESS_TYPE 0
+#define PHY_REG_LEVEL_ACCESS_TYPE 1
+
+// Physical device access - defined by hardware instance
+typedef struct {
+ int ops_type; // 0 => bit level, 1 => register level
+ bool init_done;
+ void (*init)(void);
+ void (*reset)(void);
+ union {
+ struct {
+ void (*set_data)(int);
+ int (*get_data)(void);
+ void (*set_clock)(int);
+ void (*set_dir)(int);
+ } bit_level_ops;
+ struct {
+ void (*put_reg)(int reg, int unit, unsigned short data);
+ bool (*get_reg)(int reg, int unit, unsigned short *data);
+ } reg_level_ops;
+ } ops;
+ int phy_addr;
+ struct _eth_phy_dev_entry *dev; // Chip access functions
+} eth_phy_access_t;
+
+#define ETH_PHY_BIT_LEVEL_ACCESS_FUNS(_l,_init,_reset,_set_data,_get_data,_set_clock,_set_dir) \
+static eth_phy_access_t _l = {PHY_BIT_LEVEL_ACCESS_TYPE, false, _init, _reset, \
+ {.bit_level_ops = {_set_data, _get_data, _set_clock, _set_dir}}}
+
+#define ETH_PHY_REG_LEVEL_ACCESS_FUNS(_l,_init,_reset,_put_reg,_get_reg) \
+static eth_phy_access_t _l = {PHY_REG_LEVEL_ACCESS_TYPE, false, _init, _reset, \
+ {.reg_level_ops = {_put_reg, _get_reg}}}
+
+#define ETH_PHY_STAT_LINK 0x0001 // Link up/down
+#define ETH_PHY_STAT_100MB 0x0002 // Connection is 100Mb/10Mb
+#define ETH_PHY_STAT_FDX 0x0004 // Connection is full/half duplex
+
+externC bool _eth_phy_init(eth_phy_access_t *f);
+externC void _eth_phy_reset(eth_phy_access_t *f);
+externC int _eth_phy_state(eth_phy_access_t *f);
+externC int _eth_phy_cfg(eth_phy_access_t *f, int mode);
+// Internal routines
+externC void _eth_phy_write(eth_phy_access_t *f, int reg, int unit, unsigned short data);
+externC bool _eth_phy_read(eth_phy_access_t *f, int reg, int unit, unsigned short *val);
+
+#endif // CYGONCE_DEVS_ETH_PHY_H_
+// ------------------------------------------------------------------------
diff --git a/cesar/ecos/packages/devs/eth/phy/current/include/eth_phy_dev.h b/cesar/ecos/packages/devs/eth/phy/current/include/eth_phy_dev.h
new file mode 100644
index 0000000000..b446dedb9a
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/phy/current/include/eth_phy_dev.h
@@ -0,0 +1,91 @@
+#ifndef CYGONCE_DEVS_ETH_PHY_DEV_H_
+#define CYGONCE_DEVS_ETH_PHY_DEV_H_
+//==========================================================================
+//
+// eth_phy_dev.h
+//
+// Device API for ethernet transciever (PHY) support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2003-08-01
+// Purpose:
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+// Transceiver mode
+#define PHY_BMCR 0x00 // Register number
+#define PHY_BMCR_RESET 0x8000
+#define PHY_BMCR_LOOPBACK 0x4000
+#define PHY_BMCR_100MB 0x2000
+#define PHY_BMCR_AUTO_NEG 0x1000
+#define PHY_BMCR_POWER_DOWN 0x0800
+#define PHY_BMCR_ISOLATE 0x0400
+#define PHY_BMCR_RESTART 0x0200
+#define PHY_BMCR_FULL_DUPLEX 0x0100
+#define PHY_BMCR_COLL_TEST 0x0080
+
+#define PHY_BMSR 0x01 // Status register
+#define PHY_BMSR_100T4 0x8000
+#define PHY_BMSR_100FDX 0x4000
+#define PHY_BMSR_100HDX 0x2000
+#define PHY_BMSR_10FDX 0x1000
+#define PHY_BMSR_10HDX 0x0800
+#define PHY_BMSR_AUTO_NEG 0x0020
+#define PHY_BMSR_LINK 0x0004
+
+#define PHY_ID1 0x02 // Chip ID register (high 16 bits)
+#define PHY_ID2 0x03 // Chip ID register (low 16 bits)
+
+struct _eth_phy_dev_entry {
+ char *name;
+ unsigned long id;
+ bool (*stat)(eth_phy_access_t *f, int *stat);
+} CYG_HAL_TABLE_TYPE;
+
+#define _eth_phy_dev(_name_,_id_,_stat_) \
+struct _eth_phy_dev_entry _eth_phy_dev_##_id_ \
+ CYG_HAL_TABLE_QUALIFIED_ENTRY(_eth_phy_devs,_id_) = \
+ { _name_, _id_, _stat_ };
+
+#endif // CYGONCE_DEVS_ETH_PHY_DEV_H_
+// ------------------------------------------------------------------------
diff --git a/cesar/ecos/packages/devs/eth/phy/current/src/AM79C874.c b/cesar/ecos/packages/devs/eth/phy/current/src/AM79C874.c
new file mode 100644
index 0000000000..975999941b
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/phy/current/src/AM79C874.c
@@ -0,0 +1,103 @@
+//==========================================================================
+//
+// dev/AM79C874.c
+//
+// Ethernet transceiver (PHY) support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors:
+// Date: 2003-08-01
+// Purpose:
+// Description: Support for ethernet NS AM79C874 PHY
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/devs_eth_phy.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/diag.h>
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/drv_api.h>
+#include <cyg/hal/hal_if.h>
+#include <cyg/hal/hal_tables.h>
+
+#include <cyg/io/eth_phy.h>
+#include <cyg/io/eth_phy_dev.h>
+
+static bool am79c874_stat(eth_phy_access_t *f, int *state)
+{
+ unsigned short phy_state;
+ int tries;
+
+ // Read negotiated state
+ if (_eth_phy_read(f, 0x1, f->phy_addr, &phy_state)) {
+ if ((phy_state & 0x20) == 0) {
+ diag_printf("... waiting for auto-negotiation");
+ for (tries = 0; tries < CYGINT_DEVS_ETH_PHY_AUTO_NEGOTIATION_TIME; tries++) {
+ if (_eth_phy_read(f, 0x1, f->phy_addr, &phy_state)) {
+ if ((phy_state & 0x20) != 0) {
+ break;
+ }
+ }
+ CYGACC_CALL_IF_DELAY_US(1000000); // 1 second
+ diag_printf(".");
+ }
+ diag_printf("\n");
+ }
+ if ((phy_state & 0x20) != 0) {
+ *state = 0;
+ if ((phy_state & 0x0004) != 0) *state |= ETH_PHY_STAT_LINK;
+ if (_eth_phy_read(f, 0x5, f->phy_addr, &phy_state)) {
+ // Partner negotiated parameters
+ if ((phy_state & 0x0100) != 0) *state |= ETH_PHY_STAT_100MB | ETH_PHY_STAT_FDX;
+ if ((phy_state & 0x0080) != 0) *state |= ETH_PHY_STAT_100MB;
+ if ((phy_state & 0x0040) != 0) *state |= ETH_PHY_STAT_FDX;
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+_eth_phy_dev("AMD AM79C874", 0x0022561B, am79c874_stat)
diff --git a/cesar/ecos/packages/devs/eth/phy/current/src/DP83847.c b/cesar/ecos/packages/devs/eth/phy/current/src/DP83847.c
new file mode 100644
index 0000000000..54bd115498
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/phy/current/src/DP83847.c
@@ -0,0 +1,99 @@
+//==========================================================================
+//
+// dev/DP83847.c
+//
+// Ethernet transceiver (PHY) support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors:
+// Date: 2003-08-01
+// Purpose:
+// Description: Support for ethernet NS DP83847 PHY
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/devs_eth_phy.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/diag.h>
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/drv_api.h>
+#include <cyg/hal/hal_if.h>
+#include <cyg/hal/hal_tables.h>
+
+#include <cyg/io/eth_phy.h>
+#include <cyg/io/eth_phy_dev.h>
+
+static bool dp83847_stat(eth_phy_access_t *f, int *state)
+{
+ unsigned short phy_state;
+ int tries;
+
+ // Read negotiated state
+ if (_eth_phy_read(f, 0x10, f->phy_addr, &phy_state)) {
+ if ((phy_state & 0x10) == 0) {
+ diag_printf("... waiting for auto-negotiation");
+ for (tries = 0; tries < CYGINT_DEVS_ETH_PHY_AUTO_NEGOTIATION_TIME; tries++) {
+ if (_eth_phy_read(f, 0x10, f->phy_addr, &phy_state)) {
+ if ((phy_state & 0x10) != 0) {
+ break;
+ }
+ }
+ CYGACC_CALL_IF_DELAY_US(1000000); // 1 second
+ diag_printf(".");
+ }
+ diag_printf("\n");
+ }
+ if ((phy_state & 0x10) != 0) {
+ *state = 0;
+ if ((phy_state & 0x0001) != 0) *state |= ETH_PHY_STAT_LINK;
+ if ((phy_state & 0x0002) == 0) *state |= ETH_PHY_STAT_100MB;
+ if ((phy_state & 0x0004) != 0) *state |= ETH_PHY_STAT_FDX;
+ return true;
+ }
+ }
+ return false;
+}
+
+_eth_phy_dev("National Semiconductor DP83847", 0x20005c30, dp83847_stat)
diff --git a/cesar/ecos/packages/devs/eth/phy/current/src/INLXT972.c b/cesar/ecos/packages/devs/eth/phy/current/src/INLXT972.c
new file mode 100644
index 0000000000..e78e830d25
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/phy/current/src/INLXT972.c
@@ -0,0 +1,98 @@
+//==========================================================================
+//
+// dev/INLXT972.c
+//
+// Ethernet transceiver (PHY) support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2005 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Markus Schade <marks@peppercon.de>
+// Contributors:
+// Date: 2005-08­25
+// Purpose:
+// Description: Support for ethernet Intel LXT972xxx PHY
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/devs_eth_phy.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/diag.h>
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/drv_api.h>
+#include <cyg/hal/hal_if.h>
+#include <cyg/hal/hal_tables.h>
+
+#include <cyg/io/eth_phy.h>
+#include <cyg/io/eth_phy_dev.h>
+
+static bool inlxt972_stat(eth_phy_access_t *f, int *state)
+{
+ unsigned short phy_state;
+ int tries;
+
+ // Read negotiated state
+ if (_eth_phy_read(f, PHY_BMSR, f->phy_addr, &phy_state)) {
+ if ((phy_state & PHY_BMSR_AUTO_NEG) == 0) {
+ diag_printf("... waiting for auto-negotiation");
+ for (tries = 0; tries < CYGINT_DEVS_ETH_PHY_AUTO_NEGOTIATION_TIME; tries++) {
+ if (_eth_phy_read(f, PHY_BMSR, f->phy_addr, &phy_state)) {
+ if ((phy_state & PHY_BMSR_AUTO_NEG) != 0) {
+ break;
+ }
+ }
+ CYGACC_CALL_IF_DELAY_US(1000000); // 1 second
+ diag_printf(".");
+ }
+ diag_printf("\n");
+ }
+ if ((phy_state & PHY_BMSR_AUTO_NEG) != 0) {
+ *state = 0;
+ if ((phy_state & PHY_BMSR_LINK) != 0) *state |= ETH_PHY_STAT_LINK;
+ if ((phy_state & PHY_BMSR_100FDX) != 0) *state |= ETH_PHY_STAT_100MB | ETH_PHY_STAT_FDX;
+ return true;
+ }
+ }
+ return false;
+}
+
+_eth_phy_dev("Intel LXT972", 0x001378E2, inlxt972_stat)
diff --git a/cesar/ecos/packages/devs/eth/phy/current/src/eth_phy.c b/cesar/ecos/packages/devs/eth/phy/current/src/eth_phy.c
new file mode 100644
index 0000000000..b4d66eb044
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/phy/current/src/eth_phy.c
@@ -0,0 +1,289 @@
+//==========================================================================
+//
+// dev/eth_phy.c
+//
+// Ethernet transciever (PHY) support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003, 2004 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors:
+// Date: 2003-08-01
+// Purpose:
+// Description: API support for ethernet PHY
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/diag.h>
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/drv_api.h>
+#include <cyg/hal/hal_if.h>
+#include <cyg/hal/hal_tables.h>
+
+#include <cyg/io/eth_phy.h>
+#include <cyg/io/eth_phy_dev.h>
+
+// Define table boundaries
+CYG_HAL_TABLE_BEGIN( __ETH_PHY_TAB__, _eth_phy_devs );
+CYG_HAL_TABLE_END( __ETH_PHY_TAB_END__, _eth_phy_devs );
+extern struct _eth_phy_dev_entry __ETH_PHY_TAB__[], __ETH_PHY_TAB_END__;
+
+// MII interface
+#define MII_Start 0x40000000
+#define MII_Read 0x20000000
+#define MII_Write 0x10000000
+#define MII_Cmd 0x30000000
+#define MII_Phy(phy) (phy << 23)
+#define MII_Reg(reg) (reg << 18)
+#define MII_TA 0x00020000
+
+//
+// PHY unit access (via MII channel, using bit-level operations)
+//
+
+static cyg_uint32
+phy_cmd(eth_phy_access_t *f, cyg_uint32 cmd)
+{
+ cyg_uint32 retval;
+ int i, off;
+ bool is_read = ((cmd & MII_Cmd) == MII_Read);
+
+ // Set both bits as output
+ (f->ops.bit_level_ops.set_dir)(1);
+
+ // Preamble
+ for (i = 0; i < 32; i++) {
+ (f->ops.bit_level_ops.set_clock)(0);
+ (f->ops.bit_level_ops.set_data)(1);
+ CYGACC_CALL_IF_DELAY_US(1);
+ (f->ops.bit_level_ops.set_clock)(1);
+ CYGACC_CALL_IF_DELAY_US(1);
+ }
+
+ // Command/data
+ for (i = 0, off = 31; i < (is_read ? 14 : 32); i++, --off) {
+ (f->ops.bit_level_ops.set_clock)(0);
+ (f->ops.bit_level_ops.set_data)((cmd >> off) & 0x00000001);
+ CYGACC_CALL_IF_DELAY_US(1);
+ (f->ops.bit_level_ops.set_clock)(1);
+ CYGACC_CALL_IF_DELAY_US(1);
+ }
+
+ retval = cmd;
+
+ // If read, fetch data register
+ if (is_read) {
+ retval >>= 16;
+
+ (f->ops.bit_level_ops.set_clock)(0);
+ (f->ops.bit_level_ops.set_dir)(0);
+ CYGACC_CALL_IF_DELAY_US(1);
+ (f->ops.bit_level_ops.set_clock)(1);
+ CYGACC_CALL_IF_DELAY_US(1);
+ (f->ops.bit_level_ops.set_clock)(0);
+ CYGACC_CALL_IF_DELAY_US(1);
+
+ for (i = 0, off = 15; i < 16; i++, off--) {
+ (f->ops.bit_level_ops.set_clock)(1);
+ retval <<= 1;
+ retval |= (f->ops.bit_level_ops.get_data)();
+ CYGACC_CALL_IF_DELAY_US(1);
+ (f->ops.bit_level_ops.set_clock)(0);
+ CYGACC_CALL_IF_DELAY_US(1);
+ }
+ }
+
+ // Set both bits as output
+ (f->ops.bit_level_ops.set_dir)(1);
+
+ // Postamble
+ for (i = 0; i < 32; i++) {
+ (f->ops.bit_level_ops.set_clock)(0);
+ (f->ops.bit_level_ops.set_data)(1);
+ CYGACC_CALL_IF_DELAY_US(1);
+ (f->ops.bit_level_ops.set_clock)(1);
+ CYGACC_CALL_IF_DELAY_US(1);
+ }
+
+ return retval;
+}
+
+externC bool
+_eth_phy_init(eth_phy_access_t *f)
+{
+ int addr;
+ unsigned short state;
+ unsigned long id;
+ struct _eth_phy_dev_entry *dev;
+
+ if (f->init_done) return true;
+ (f->init)();
+ // Scan to determine PHY address
+ f->init_done = true;
+ for (addr = 0; addr < 0x20; addr++) {
+ if (_eth_phy_read(f, PHY_ID1, addr, &state)) {
+ id = state << 16;
+ if (_eth_phy_read(f, PHY_ID2, addr, &state)) {
+ id |= state;
+ f->phy_addr = addr;
+ for (dev = __ETH_PHY_TAB__; dev != &__ETH_PHY_TAB_END__; dev++) {
+ if (dev->id == id) {
+ diag_printf("PHY: %s\n", dev->name);
+ f->dev = dev;
+ return true;
+ }
+ }
+ diag_printf("Unsupported PHY device - id: %x\n", id);
+ break; // Can't handle this PHY
+ }
+ }
+ }
+ f->init_done = false;
+ return false;
+}
+
+externC void
+_eth_phy_reset(eth_phy_access_t *f)
+{
+ if (!f->init_done) {
+ diag_printf("PHY reset without init on PHY: %x\n", f);
+ return;
+ }
+ (f->init)();
+}
+
+externC void
+_eth_phy_write(eth_phy_access_t *f, int reg, int addr, unsigned short data)
+{
+ if (!f->init_done) {
+ diag_printf("PHY write without init on PHY: %x\n", f);
+ return;
+ }
+ if (f->ops_type == PHY_BIT_LEVEL_ACCESS_TYPE) {
+ phy_cmd(f, MII_Start | MII_Write | MII_Phy(addr) | MII_Reg(reg) | MII_TA | data);
+ } else {
+ (f->ops.reg_level_ops.put_reg)(reg, addr, data);
+ }
+}
+
+externC bool
+_eth_phy_read(eth_phy_access_t *f, int reg, int addr, unsigned short *val)
+{
+ cyg_uint32 ret;
+
+ if (!f->init_done) {
+ diag_printf("PHY read without init on PHY: %x\n", f);
+ return false;
+ }
+ if (f->ops_type == PHY_BIT_LEVEL_ACCESS_TYPE) {
+ ret = phy_cmd(f, MII_Start | MII_Read | MII_Phy(addr) | MII_Reg(reg) | MII_TA);
+ *val = ret;
+ return true;
+ } else {
+ return (f->ops.reg_level_ops.get_reg)(reg, addr, val);
+ }
+}
+
+externC int
+_eth_phy_cfg(eth_phy_access_t *f, int mode)
+{
+ int phy_timeout = 5*1000; // Wait 5 seconds max for link to clear
+ bool phy_ok;
+ unsigned short reset_mode, phy_state;
+ int i;
+
+ if (!f->init_done) {
+ diag_printf("PHY config without init on PHY: %x\n", f);
+ return 0;
+ }
+
+ // Reset PHY (transceiver)
+ phy_ok = false;
+ _eth_phy_reset(f);
+
+ _eth_phy_write(f, PHY_BMCR, f->phy_addr, PHY_BMCR_RESET);
+ for (i = 0; i < 5*100; i++) {
+ phy_ok = _eth_phy_read(f, PHY_BMCR, f->phy_addr, &phy_state);
+ diag_printf("PHY: %x\n", phy_state);
+ if (phy_ok && !(phy_state & PHY_BMCR_RESET)) break;
+ CYGACC_CALL_IF_DELAY_US(10000); // 10ms
+ }
+ if (!phy_ok || (phy_state & PHY_BMCR_RESET)) {
+ diag_printf("PPC405: Can't get PHY unit to soft reset: %x\n", phy_state);
+ return 0;
+ }
+
+ reset_mode = PHY_BMCR_RESTART | PHY_BMCR_AUTO_NEG;
+ _eth_phy_write(f, PHY_BMCR, f->phy_addr, reset_mode);
+ while (phy_timeout-- >= 0) {
+ phy_ok = _eth_phy_read(f, PHY_BMSR, f->phy_addr, &phy_state);
+ if (phy_ok && (phy_state & PHY_BMSR_AUTO_NEG)) {
+ break;
+ } else {
+ CYGACC_CALL_IF_DELAY_US(10000); // 10ms
+ }
+ }
+ if (phy_timeout <= 0) {
+ diag_printf("** PPC405 Warning: PHY LINK UP failed: %04x\n", phy_state);
+ return 0;
+ }
+
+ return _eth_phy_state(f);
+}
+
+externC int
+_eth_phy_state(eth_phy_access_t *f)
+{
+ int state = 0;
+
+ if (!f->init_done) {
+ diag_printf("PHY state without init on PHY: %x\n", f);
+ return 0;
+ }
+ if ((f->dev->stat)(f, &state)) {
+ return state;
+ } else {
+ return 0;
+ }
+ return state;
+}
diff --git a/cesar/ecos/packages/devs/eth/sparc/greth/leon3/current/cdl/leon3_greth_drivers.cdl b/cesar/ecos/packages/devs/eth/sparc/greth/leon3/current/cdl/leon3_greth_drivers.cdl
new file mode 100644
index 0000000000..1df730bfe6
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/sparc/greth/leon3/current/cdl/leon3_greth_drivers.cdl
@@ -0,0 +1,125 @@
+# ====================================================================
+#
+# leon_greth_drivers.cdl
+#
+# Ethernet drivers - support for Gaisler Research's ethernet mac
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): Gaisler Research, (Kristoffer Carlsson <kristoffer@gaisler.com>)
+# Contributors:
+# Date: 2005-11-29
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_DEVS_ETH_SPARC_GRETH_LEON3 {
+
+ display "LEON3 GRETH ethernet driver"
+
+ parent CYGPKG_IO_ETH_DRIVERS
+ active_if CYGPKG_IO_ETH_DRIVERS
+ active_if CYGPKG_HAL_SPARC_LEON3
+
+ requires CYGPKG_DEVS_ETH_GRETH
+ description "Ethernet driver for GRETH in a LEON3 system."
+
+ include_dir cyg/io
+ compile if_sparc_greth.c
+
+ define_proc {
+ puts $::cdl_system_header "/***** ethernet driver proc output start *****/"
+ puts $::cdl_system_header "#define CYGDAT_DEVS_ETH_GRETH_INL <cyg/io/devs_eth_sparc_greth_leon3.inl>"
+ puts $::cdl_system_header "#define CYGDAT_DEVS_ETH_GRETH_CFG <pkgconf/devs_eth_sparc_greth_leon3.h>"
+ puts $::cdl_system_header "/***** ethernet driver proc output end *****/"
+ }
+
+ # Arguably this should do in the generic package
+ # but then there is a logic loop so you can never enable it.
+
+ cdl_interface CYGINT_DEVS_ETH_GRETH_REQUIRED {
+ display "GRETH driver required"
+ }
+
+ cdl_component CYGPKG_DEVS_ETH_SPARC_GRETH_LEON3_ETH0 {
+ display "Ethernet port 0 driver"
+ flavor bool
+ default_value 1
+
+ implements CYGHWR_NET_DRIVERS
+ implements CYGHWR_NET_DRIVER_ETH0
+ implements CYGINT_DEVS_ETH_GRETH_REQUIRED
+
+ cdl_option CYGPKG_DEVS_ETH_SPARC_GRETH_LEON3_ETH0_NAME {
+ display "Device name for the ethernet driver"
+ flavor data
+ default_value {"\"eth0\""}
+ description "
+ This option sets the name of the ethernet device for the
+ ethernet port."
+ }
+
+ cdl_option CYGPKG_DEVS_ETH_SPARC_GRETH_LEON3_ETH0_ESA {
+ display "The ethernet station address (MAC)"
+ flavor data
+ default_value {"{0x00, 0x00, 0x5e, 0x00, 0x00, 0x13}"}
+ description "A static ethernet station address.
+ Caution: Booting two systems with the same MAC on the same
+ network, will cause severe conflicts."
+ }
+ }
+
+ cdl_component CYGPKG_DEVS_ETH_SPARC_GRETH_LEON3_OPTIONS {
+ display "Gaisler Research's GRETH driver build options"
+ flavor none
+ no_define
+
+ cdl_option CYGPKG_DEVS_ETH_SPARC_GRETH_LEON3_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "-D_KERNEL -D__ECOS" }
+ description "
+ This option modifies the set of compiler flags for
+ building the driver package.
+ These flags are used in addition
+ to the set of global flags."
+ }
+ }
+
+}
diff --git a/cesar/ecos/packages/devs/eth/sparc/greth/leon3/current/include/devs_eth_sparc_greth_leon3.inl b/cesar/ecos/packages/devs/eth/sparc/greth/leon3/current/include/devs_eth_sparc_greth_leon3.inl
new file mode 100644
index 0000000000..ea445c066b
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/sparc/greth/leon3/current/include/devs_eth_sparc_greth_leon3.inl
@@ -0,0 +1,91 @@
+//==========================================================================
+//
+// devs/eth/sparc/greth/leon3/../include/devs_eth_sparc_greth_leon3.inl
+//
+// GRETH I/O definitions.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research, (Kristoffer Carlsson <kristoffer@gaisler.com>)
+// Contributors:
+// Date: 2005-11-29
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <cyg/hal/hal_intr.h>
+
+bool greth_leon3_init(struct cyg_netdevtab_entry *ndp);
+#define CYGPKG_DEVS_ETH_GRETH_ETH0_ESA CYGPKG_DEVS_ETH_SPARC_GRETH_LEON3_ETH0_ESA
+#define CYGPKG_DEVS_ETH_GRETH_INITFN greth_leon3_init
+
+#ifdef CYGPKG_DEVS_ETH_SPARC_GRETH_LEON3_ETH0
+
+//structs and tables for eth0
+
+static greth_info greth_priv;
+
+ETH_DRV_SC(greth_sc,
+ &greth_priv, // Driver specific data
+ CYGPKG_DEVS_ETH_SPARC_GRETH_LEON3_ETH0_NAME, // Name for device
+ greth_start,
+ greth_stop,
+ greth_control,
+ greth_can_send,
+ greth_send,
+ greth_recv,
+ greth_deliver,
+ greth_poll,
+ greth_int_vector
+);
+
+NETDEVTAB_ENTRY(greth_netdev,
+ "greth_" CYGPKG_DEVS_ETH_SPARC_GRETH_LEON3_ETH0_NAME,
+ greth_init,
+ &greth_sc);
+#endif
+
+#if CYGNUM_DEVS_ETH_GRETH_DEV_COUNT > 1
+#error Only 1 ethermac at a time supported yet (eth0)
+#endif
+
+greth_info *greth_priv_array[CYGNUM_DEVS_ETH_GRETH_DEV_COUNT] = {
+#ifdef CYGPKG_DEVS_ETH_SPARC_GRETH_LEON3_ETH0
+ &greth_priv
+#endif
+};
+
diff --git a/cesar/ecos/packages/devs/eth/sparc/greth/leon3/current/src/if_sparc_greth.c b/cesar/ecos/packages/devs/eth/sparc/greth/leon3/current/src/if_sparc_greth.c
new file mode 100644
index 0000000000..bcf0201535
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/sparc/greth/leon3/current/src/if_sparc_greth.c
@@ -0,0 +1,117 @@
+//==========================================================================
+//
+// devs/eth/sparc/greth/leon3/../src/if_sparc_greth.c
+//
+// Ethernet device driver for GRETH ethernet mac on Leon3
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//####BSDCOPYRIGHTBEGIN####
+//
+// -------------------------------------------
+//
+// Portions of this software may have been derived from OpenBSD or other sources,
+// and are covered by the appropriate copyright disclaimers included herein.
+//
+// -------------------------------------------
+//
+//####BSDCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research, (Kristoffer Carlsson <kristoffer@gaisler.com>)
+// Contributors:
+// Date: 2005-11-29
+// Purpose:
+// Description: Driver for Gaisler Research's GRETH ethernet mac
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#ifdef CYGPKG_IO_ETH_DRIVERS
+#include <pkgconf/io_eth_drivers.h>
+#endif
+#include <pkgconf/devs_eth_greth.h>
+
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_diag.h>
+#include <cyg/hal/hal_cache.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/drv_api.h>
+#include <cyg/io/eth/netdev.h>
+#include <cyg/io/eth/eth_drv.h>
+
+#ifdef CYGPKG_NET
+#include <pkgconf/net.h>
+#include <cyg/kernel/kapi.h>
+#include <net/if.h> /* Needed for struct ifnet */
+#endif
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_leon3.h>
+
+externC void greth_device_init(struct eth_drv_sc *sc, cyg_uint32 idx, cyg_uint32 base, cyg_uint32 irq);
+
+bool greth_leon3_init(struct cyg_netdevtab_entry *ndp)
+{
+ int i,j;
+ struct eth_drv_sc *sc = (struct eth_drv_sc *)(ndp->device_instance);
+
+#if !defined(CYGPKG_DEVS_ETH_GRETH_FLUSH)
+ {
+ unsigned long cfg = sparc_leon3_get_dcachecfg();
+ if (cfg & ASI_LEON3_SYSCTRL_CFG_SNOOPING) {
+ sparc_leon3_enable_snooping();
+ } else {
+ diag_printf("You have to enable snooping in the vhdl model to use the mac without CYGPKG_DEVS_ETH_GRETH_FLUSH, otherwise enable CYGPKG_DEVS_ETH_GRETH_FLUSH\n");
+ }
+ }
+#endif
+
+ amba_apb_device adev[CYGNUM_DEVS_ETH_GRETH_DEV_COUNT];
+ j = amba_get_free_apbslv_devices (VENDOR_GAISLER, GAISLER_ETHMAC, adev, CYGNUM_DEVS_ETH_GRETH_DEV_COUNT);
+
+ for (i = 0; i < j; i++) {
+ greth_device_init(sc,i,adev[i].start, adev[i].irq);
+ }
+ return 1;
+}
diff --git a/cesar/ecos/packages/devs/eth/sparc/leon2/current/ChangeLog b/cesar/ecos/packages/devs/eth/sparc/leon2/current/ChangeLog
new file mode 100644
index 0000000000..320eae091e
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/sparc/leon2/current/ChangeLog
@@ -0,0 +1,41 @@
+2003-02-05 Patrick Doyle <wpd@delcomsys.com>
+ * cdl/innovator_eth_drivers.cdl
+ * include/devs_eth_innovator.inl
+ * src/if_innovator.c: New package - support for Texas Instruments
+ Innovator board.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+// Copyright (C) 2003 Delphi Communication Systems, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/devs/eth/sparc/leon2/current/cdl/leon2_eth_drivers.cdl b/cesar/ecos/packages/devs/eth/sparc/leon2/current/cdl/leon2_eth_drivers.cdl
new file mode 100644
index 0000000000..29808c29ec
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/sparc/leon2/current/cdl/leon2_eth_drivers.cdl
@@ -0,0 +1,140 @@
+# ====================================================================
+#
+# innovator_eth_drivers.cdl
+#
+# Ethernet drivers - support for LAN91CXX ethernet controller
+# on the BSE Innovator/SA1110 board.
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): Jiri Gaisler <jiri@gaisler.com>
+# Contributors:
+# Date: 2004-07-28
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_DEVS_ETH_SPARC_LEON {
+
+ display "LEON2 SMC91C111 ethernet driver"
+
+ parent CYGPKG_IO_ETH_DRIVERS
+ active_if CYGPKG_IO_ETH_DRIVERS
+ active_if CYGPKG_HAL_SPARC_LEON
+
+ implements CYGHWR_NET_DRIVERS
+ implements CYGHWR_NET_DRIVER_ETH0
+ implements CYGINT_DEVS_ETH_SMSC_LAN91CXX_REQUIRED
+ implements CYGINT_DEVS_ETH_SMSC_LAN91CXX_STATIC_ESA
+
+ requires CYGPKG_DEVS_ETH_SMSC_LAN91CXX
+ description "Ethernet driver for LEON2 boards."
+
+ include_dir cyg/io
+ compile if_leon2.c
+
+ define_proc {
+ puts $::cdl_system_header "/***** ethernet driver proc output start *****/"
+ puts $::cdl_system_header "#define CYGDAT_DEVS_ETH_SMSC_LAN91CXX_INL <cyg/io/devs_eth_leon2.inl>"
+ puts $::cdl_system_header "#define CYGDAT_DEVS_ETH_SMSC_LAN91CXX_CFG <pkgconf/devs_eth_sparc_leon.h>"
+ puts $::cdl_system_header "/***** ethernet driver proc output end *****/"
+ }
+
+ # Arguably this should do in the generic package
+ # but then there is a logic loop so you can never enable it.
+
+ cdl_interface CYGINT_DEVS_ETH_SMSC_LAN91CXX_REQUIRED {
+ display "SMSC LAN91CXX driver required"
+ }
+
+ cdl_option CYGDAT_DEVS_ETH_SPARC_LEON_NAME {
+ display "Device name for the ethernet driver"
+ flavor data
+ default_value {"\"eth0\""}
+ description "
+ This option sets the name of the ethernet device for the
+ ethernet port."
+ }
+
+ cdl_option CYGDAT_DEVS_ETH_SPARC_LEON_ESA {
+ display "The ethernet station address (MAC)"
+ flavor data
+ default_value {"{0x12, 0x13, 0x14, 0x15, 0x16, 0x17}"}
+ description "A static ethernet station address.
+ Caution: Booting two systems with the same MAC on the same
+ network, will cause severe conflicts."
+ active_if !CYGSEM_DEVS_ETH_SPARC_LEON_REDBOOT_ESA
+ }
+
+ cdl_option CYGNUM_DEVS_ETH_SPARC_LEON_IRQ_PIO {
+ display "LEON2 PIO port used for interrupt"
+ flavor booldata
+ legal_values 0 to 31
+ default_value 4
+ description "External interrupt from the 91CXX is routed to
+ LEON2 through one of the 32 PIO ports."
+ }
+
+ cdl_option CYGNUM_DEVS_ETH_SPARC_LEON_IRQ {
+ display "LEON2 PIO interrupt number"
+ flavor booldata
+ legal_values 4 to 7
+ default_value 4
+ description "PIO ports can generate interrupt 4 - 7."
+ }
+
+ cdl_option CYGDAT_DEVS_ETH_SPARC_LEON_ADDR {
+ display "Ethernet register's address"
+ flavor data
+ default_value {"0x20000000"}
+ description "Address to where the 91CXX control registers
+ are mapped."
+ }
+
+ cdl_option CYGSEM_DEVS_ETH_SPARC_LEON_REDBOOT_ESA {
+ display "Use the RedBoot ESA (MAC address)"
+ default_value 0
+ flavor bool
+ description "
+ Use the ESA that is stored as a RedBoot variable instead of
+ a static ESA."
+ }
+
+}
+
+# EOF innovator_eth_drivers.cdl
diff --git a/cesar/ecos/packages/devs/eth/sparc/leon2/current/include/devs_eth_leon2.inl b/cesar/ecos/packages/devs/eth/sparc/leon2/current/include/devs_eth_leon2.inl
new file mode 100644
index 0000000000..a9defee24a
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/sparc/leon2/current/include/devs_eth_leon2.inl
@@ -0,0 +1,123 @@
+//==========================================================================
+//
+// devs/eth/arm/innovator/..../include/devs_eth_innovator.inl
+//
+// Innovator ethernet I/O definitions.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Jordi Colomer <jco@ict.es>, Patrick Doyle <wpd@delcomsys.com>
+// Contributors: Patrick Doyle <wpd@delcomsys.com>
+// Date: 2001-06-18
+// Purpose: Innovator ethernet definitions
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <pkgconf/system.h>
+//#include <pkgconf/devs_eth_arm_innovator.h>
+#include <cyg/hal/hal_intr.h>
+//#include <cyg/hal/innovator.h>
+
+// #define CYGNUM_DEVS_ETH_SMSC_LAN91CXX_SHIFT_ADDR 2
+#define LAN91CXX_32BIT_RX
+#define CYGSEM_DEVS_ETH_SMSC_LAN91CXX_USE_32BIT
+#define LAN91CXX_IS_LAN91C111
+
+// MAC address is stored as a Redboot config option
+#ifdef CYGPKG_REDBOOT
+#include <pkgconf/redboot.h>
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+#include <redboot.h>
+#include <flash_config.h>
+
+RedBoot_config_option("Network hardware address [MAC]",
+ leon2_esa,
+ ALWAYS_ENABLED, true,
+ CONFIG_ESA, 0
+ );
+#endif
+#endif
+
+// ESA address fetch function
+static void leon2_get_ESA(struct lan91cxx_priv_data *cpd)
+{
+ // Fetch hardware address from RedBoot config
+#if defined(CYGSEM_DEVS_ETH_SPARC_LEON_REDBOOT_ESA)
+#if defined(CYGPKG_REDBOOT) && \
+ defined(CYGSEM_REDBOOT_FLASH_CONFIG)
+ flash_get_config("leon2_esa", cpd->enaddr, CONFIG_ESA);
+#else
+#error "No RedBoot flash configuration to store ESA"
+#endif
+#else
+ unsigned char static_esa[] = CYGDAT_DEVS_ETH_SPARC_LEON_ESA;
+ memcpy(cpd->enaddr, static_esa, 6);
+#endif
+}
+
+static lan91cxx_priv_data lan91cxx_eth0_priv_data = {
+
+ config_enaddr : leon2_get_ESA,
+#ifndef CYGSEM_DEVS_ETH_SPARC_LEON_REDBOOT_ESA
+ enaddr: CYGDAT_DEVS_ETH_SPARC_LEON_ESA,
+#endif
+ base : (unsigned short *) CYGDAT_DEVS_ETH_SPARC_LEON_ADDR,
+ interrupt : CYGNUM_DEVS_ETH_SPARC_LEON_IRQ
+};
+
+ETH_DRV_SC(lan91cxx_sc,
+ &lan91cxx_eth0_priv_data, // Driver specific data
+ CYGDAT_DEVS_ETH_SPARC_LEON_NAME, // Name for device
+ lan91cxx_start,
+ lan91cxx_stop,
+ lan91cxx_control,
+ lan91cxx_can_send,
+ lan91cxx_send,
+ lan91cxx_recv,
+ lan91cxx_deliver,
+ lan91cxx_poll,
+ lan91cxx_int_vector
+);
+
+NETDEVTAB_ENTRY(lan91cxx_netdev,
+ "lan91cxx_" CYGDAT_DEVS_ETH_SPARC_LEON_NAME,
+ smsc_lan91cxx_init,
+ &lan91cxx_sc);
+
+//EOF devs_eth_innovator.inl
+
+
diff --git a/cesar/ecos/packages/devs/eth/sparc/leon2/current/src/if_leon2.c b/cesar/ecos/packages/devs/eth/sparc/leon2/current/src/if_leon2.c
new file mode 100644
index 0000000000..19219258b5
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/sparc/leon2/current/src/if_leon2.c
@@ -0,0 +1,73 @@
+//==========================================================================
+//
+// devs/eth/arm/innovator/if_innovator.c
+//
+// Ethernet device driver for Innovator using SMSC LAN91C96
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//####BSDCOPYRIGHTBEGIN####
+//
+// -------------------------------------------
+//
+// Portions of this software may have been derived from OpenBSD or other sources,
+// and are covered by the appropriate copyright disclaimers included herein.
+//
+// -------------------------------------------
+//
+//####BSDCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Jordi Colomer <jco@ict.es>, Patrick Doyle <wpd@delcomsys.com>
+// Contributors: Patrick Doyle <wpd@delcomsys.com>
+// Date: 2001-07-01
+// Purpose:
+// Description: hardware driver for Innovator/SMSC LAN91CXX ethernet
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+//#include <pkgconf/devs_eth_leon2.h>
+#include <pkgconf/io_eth_drivers.h>
+
+#if defined(CYGPKG_REDBOOT)
+#include <pkgconf/redboot.h>
+#endif
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
diff --git a/cesar/ecos/packages/devs/eth/sparc/leon3/current/ChangeLog b/cesar/ecos/packages/devs/eth/sparc/leon3/current/ChangeLog
new file mode 100644
index 0000000000..320eae091e
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/sparc/leon3/current/ChangeLog
@@ -0,0 +1,41 @@
+2003-02-05 Patrick Doyle <wpd@delcomsys.com>
+ * cdl/innovator_eth_drivers.cdl
+ * include/devs_eth_innovator.inl
+ * src/if_innovator.c: New package - support for Texas Instruments
+ Innovator board.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+// Copyright (C) 2003 Delphi Communication Systems, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/devs/eth/sparc/leon3/current/cdl/leon3_eth_drivers.cdl b/cesar/ecos/packages/devs/eth/sparc/leon3/current/cdl/leon3_eth_drivers.cdl
new file mode 100644
index 0000000000..fb061a3532
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/sparc/leon3/current/cdl/leon3_eth_drivers.cdl
@@ -0,0 +1,140 @@
+# ====================================================================
+#
+# innovator_eth_drivers.cdl
+#
+# Ethernet drivers - support for LAN91CXX ethernet controller
+# on Leon3.
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): Jiri Gaisler <jiri@gaisler.com>
+# Contributors:
+# Date: 2004-07-28
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_DEVS_ETH_SPARC_LEON3 {
+
+ display "LEON3 SMC91C111 ethernet driver"
+
+ parent CYGPKG_IO_ETH_DRIVERS
+ active_if CYGPKG_IO_ETH_DRIVERS
+ active_if CYGPKG_HAL_SPARC_LEON3
+
+ implements CYGHWR_NET_DRIVERS
+ implements CYGHWR_NET_DRIVER_ETH0
+ implements CYGINT_DEVS_ETH_SMSC_LAN91CXX_REQUIRED
+ implements CYGINT_DEVS_ETH_SMSC_LAN91CXX_STATIC_ESA
+
+ requires CYGPKG_DEVS_ETH_SMSC_LAN91CXX
+ description "Ethernet driver for LEON3 boards."
+
+ include_dir cyg/io
+ compile if_leon3.c
+
+ define_proc {
+ puts $::cdl_system_header "/***** ethernet driver proc output start *****/"
+ puts $::cdl_system_header "#define CYGDAT_DEVS_ETH_SMSC_LAN91CXX_INL <cyg/io/devs_eth_leon3.inl>"
+ puts $::cdl_system_header "#define CYGDAT_DEVS_ETH_SMSC_LAN91CXX_CFG <pkgconf/devs_eth_sparc_leon3.h>"
+ puts $::cdl_system_header "/***** ethernet driver proc output end *****/"
+ }
+
+ # Arguably this should do in the generic package
+ # but then there is a logic loop so you can never enable it.
+
+ cdl_interface CYGINT_DEVS_ETH_SMSC_LAN91CXX_REQUIRED {
+ display "SMSC LAN91CXX driver required"
+ }
+
+ cdl_option CYGDAT_DEVS_ETH_SPARC_LEON3_NAME {
+ display "Device name for the ethernet driver"
+ flavor data
+ default_value {"\"eth0\""}
+ description "
+ This option sets the name of the ethernet device for the
+ ethernet port."
+ }
+
+ cdl_option CYGDAT_DEVS_ETH_SPARC_LEON3_ESA {
+ display "The ethernet station address (MAC)"
+ flavor data
+ default_value {"{0x12, 0x13, 0x14, 0x15, 0x16, 0x17}"}
+ description "A static ethernet station address.
+ Caution: Booting two systems with the same MAC on the same
+ network, will cause severe conflicts."
+ active_if !CYGSEM_DEVS_ETH_SPARC_LEON3_REDBOOT_ESA
+ }
+
+ cdl_option CYGNUM_DEVS_ETH_SPARC_LEON3_IRQ_PIO {
+ display "LEON3 PIO port used for interrupt"
+ flavor booldata
+ legal_values 0 to 31
+ default_value 4
+ description "External interrupt from the 91CXX is routed to
+ LEON3 through one of the 32 PIO ports."
+ }
+
+ cdl_option CYGNUM_DEVS_ETH_SPARC_LEON3_IRQ {
+ display "LEON3 PIO interrupt number"
+ flavor booldata
+ legal_values 4 to 7
+ default_value 4
+ description "PIO ports can generate interrupt 4 - 7."
+ }
+
+ cdl_option CYGDAT_DEVS_ETH_SPARC_LEON3_ADDR {
+ display "Ethernet register's address"
+ flavor data
+ default_value {"0x20000000"}
+ description "Address to where the 91CXX control registers
+ are mapped."
+ }
+
+ cdl_option CYGSEM_DEVS_ETH_SPARC_LEON3_REDBOOT_ESA {
+ display "Use the RedBoot ESA (MAC address)"
+ default_value 0
+ flavor bool
+ description "
+ Use the ESA that is stored as a RedBoot variable instead of
+ a static ESA."
+ }
+
+}
+
+# EOF leon3_eth_driver.cdl
diff --git a/cesar/ecos/packages/devs/eth/sparc/leon3/current/include/devs_eth_leon3.inl b/cesar/ecos/packages/devs/eth/sparc/leon3/current/include/devs_eth_leon3.inl
new file mode 100644
index 0000000000..a65f52634a
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/sparc/leon3/current/include/devs_eth_leon3.inl
@@ -0,0 +1,142 @@
+//==========================================================================
+//
+// devs/eth/arm/innovator/..../include/devs_eth_innovator.inl
+//
+// Innovator ethernet I/O definitions.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Jordi Colomer <jco@ict.es>, Patrick Doyle <wpd@delcomsys.com>
+// Contributors: Patrick Doyle <wpd@delcomsys.com>
+// Date: 2001-06-18
+// Purpose: Innovator ethernet definitions
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <pkgconf/system.h>
+//#include <pkgconf/devs_eth_arm_innovator.h>
+#include <cyg/hal/hal_intr.h>
+//#include <cyg/hal/innovator.h>
+
+// #define CYGNUM_DEVS_ETH_SMSC_LAN91CXX_SHIFT_ADDR 2
+#define LAN91CXX_32BIT_RX
+#define CYGSEM_DEVS_ETH_SMSC_LAN91CXX_USE_32BIT
+#define LAN91CXX_IS_LAN91C111
+
+// MAC address is stored as a Redboot config option
+#ifdef CYGPKG_REDBOOT
+#include <pkgconf/redboot.h>
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+#include <redboot.h>
+#include <flash_config.h>
+
+RedBoot_config_option("Network hardware address [MAC]",
+ leon3_esa,
+ ALWAYS_ENABLED, true,
+ CONFIG_ESA, 0
+ );
+#endif
+#endif
+
+// ESA address fetch function
+static void leon3_get_ESA(struct lan91cxx_priv_data *cpd)
+{
+ // Fetch hardware address from RedBoot config
+#if defined(CYGSEM_DEVS_ETH_SPARC_LEON3_REDBOOT_ESA)
+#if defined(CYGPKG_REDBOOT) && \
+ defined(CYGSEM_REDBOOT_FLASH_CONFIG)
+ flash_get_config("leon3_esa", cpd->enaddr, CONFIG_ESA);
+#else
+#error "No RedBoot flash configuration to store ESA"
+#endif
+#else
+ unsigned char static_esa[] = CYGDAT_DEVS_ETH_SPARC_LEON3_ESA;
+ memcpy(cpd->enaddr, static_esa, 6);
+#endif
+}
+
+static lan91cxx_priv_data lan91cxx_eth0_priv_data = {
+
+ config_enaddr : leon3_get_ESA,
+#ifndef CYGSEM_DEVS_ETH_SPARC_LEON3_REDBOOT_ESA
+ enaddr: CYGDAT_DEVS_ETH_SPARC_LEON3_ESA,
+#endif
+ base : (unsigned short *) CYGDAT_DEVS_ETH_SPARC_LEON3_ADDR,
+ interrupt : CYGNUM_DEVS_ETH_SPARC_LEON3_IRQ
+};
+
+ETH_DRV_SC(lan91cxx_sc,
+ &lan91cxx_eth0_priv_data, // Driver specific data
+ CYGDAT_DEVS_ETH_SPARC_LEON3_NAME, // Name for device
+ lan91cxx_start,
+ lan91cxx_stop,
+ lan91cxx_control,
+ lan91cxx_can_send,
+ lan91cxx_send,
+ lan91cxx_recv,
+ lan91cxx_deliver,
+ lan91cxx_poll,
+ lan91cxx_int_vector
+);
+
+NETDEVTAB_ENTRY(lan91cxx_netdev,
+ "lan91cxx_" CYGDAT_DEVS_ETH_SPARC_LEON3_NAME,
+ smsc_sparc_leon3_init,
+ &lan91cxx_sc);
+
+static bool
+smsc_lan91cxx_init(struct cyg_netdevtab_entry *tab);
+
+bool smsc_sparc_leon3_init(struct cyg_netdevtab_entry *ndp)
+{
+ int irq_pio,irq_mctrl,addr_pio,addr_mctrl;
+ if (addr_pio = amba_find_apbslv_addr(VENDOR_GAISLER, GAISLER_PIOPORT, &irq_pio)) {
+ LEON3_IOPORT_Regs_Map *io = (LEON3_IOPORT_Regs_Map *) addr_pio;
+ if (addr_mctrl = amba_find_apbslv_addr(VENDOR_ESA, ESA_MCTRL, &irq_mctrl)) {
+ diag_printf("Activating Leon3 io port for smsc_lan91cxx (pio:%x mctrl:%x)\n",addr_pio,addr_mctrl);
+ *((volatile cyg_uint32 *) addr_mctrl) |= 0x10f80000; //mctrl ctrl 1
+ io->irqmask |= (1 << CYGNUM_DEVS_ETH_SPARC_LEON3_IRQ_PIO);
+ io->irqpol |= (1 << CYGNUM_DEVS_ETH_SPARC_LEON3_IRQ_PIO);
+ io->irqedge |= (1 << CYGNUM_DEVS_ETH_SPARC_LEON3_IRQ_PIO);
+ io->iodir &= ~(1 << CYGNUM_DEVS_ETH_SPARC_LEON3_IRQ_PIO);
+ return smsc_lan91cxx_init(ndp);
+ }
+ }
+ return 0;
+}
+
+//EOF devs_eth_innovator.inl
diff --git a/cesar/ecos/packages/devs/eth/sparc/leon3/current/src/if_leon3.c b/cesar/ecos/packages/devs/eth/sparc/leon3/current/src/if_leon3.c
new file mode 100644
index 0000000000..cb515bba63
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/sparc/leon3/current/src/if_leon3.c
@@ -0,0 +1,94 @@
+//==========================================================================
+//
+// devs/eth/arm/innovator/if_innovator.c
+//
+// Ethernet device driver for Innovator using SMSC LAN91C96
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//####BSDCOPYRIGHTBEGIN####
+//
+// -------------------------------------------
+//
+// Portions of this software may have been derived from OpenBSD or other sources,
+// and are covered by the appropriate copyright disclaimers included herein.
+//
+// -------------------------------------------
+//
+//####BSDCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Jordi Colomer <jco@ict.es>, Patrick Doyle <wpd@delcomsys.com>
+// Contributors: Patrick Doyle <wpd@delcomsys.com>
+// Date: 2001-07-01
+// Purpose:
+// Description: hardware driver for Innovator/SMSC LAN91CXX ethernet
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/io_eth_drivers.h>
+#include <pkgconf/devs_eth_sparc_leon3.h>
+
+#if defined(CYGPKG_REDBOOT)
+#include <pkgconf/redboot.h>
+#endif
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+
+externC bool smsc_lan91cxx_init(struct cyg_netdevtab_entry *tab);
+
+/*
+ bool smsc_sparc_leon3_init(struct cyg_netdevtab_entry *ndp)
+{
+ int irq_pio,irq_mctrl,addr_pio,addr_mctrl;
+ if (addr_pio = amba_find_apbslv_addr(VENDOR_GAISLER, GAISLER_PIOPORT, &irq_pio)) {
+ LEON3_IOPORT_Regs_Map *io = (LEON3_IOPORT_Regs_Map *) addr_pio;
+ if (addr_mctrl = amba_find_apbslv_addr(VENDOR_ESA, ESA_MCTRL, &irq_mctrl)) {
+ diag_printf("Activating Leon3 io port for smsc_lan91cxx (pio:%x mctrl:%x)\n",addr_pio,addr_mctrl);
+ *((volatile cyg_uint32 *) addr_mctrl) |= 0x10f80000; //mctrl ctrl 1
+ io->irqmask |= (1 << CYGNUM_DEVS_ETH_SPARC_LEON3_IRQ_PIO);
+ io->irqpol |= (1 << CYGNUM_DEVS_ETH_SPARC_LEON3_IRQ_PIO);
+ io->irqedge |= (1 << CYGNUM_DEVS_ETH_SPARC_LEON3_IRQ_PIO);
+ io->iodir &= ~(1 << CYGNUM_DEVS_ETH_SPARC_LEON3_IRQ_PIO);
+ return smsc_lan91cxx_init(ndp);
+ }
+ }
+ return 0;
+}*/
diff --git a/cesar/ecos/packages/devs/eth/sparc/opencores/leon3/current/cdl/leon3_opencores_ethmac_drivers.cdl b/cesar/ecos/packages/devs/eth/sparc/opencores/leon3/current/cdl/leon3_opencores_ethmac_drivers.cdl
new file mode 100644
index 0000000000..42a6adb762
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/sparc/opencores/leon3/current/cdl/leon3_opencores_ethmac_drivers.cdl
@@ -0,0 +1,127 @@
+# ====================================================================
+#
+# leon_opencores_ethmac_drivers.cdl
+#
+# Ethernet drivers - support for Opencores ethermac controller
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): Gaisler Research, (Konrad Eisele<eiselekd@web.de>)
+# Contributors:
+# Date: 2005-01-20
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_DEVS_ETH_SPARC_OPENCORES_LEON3 {
+
+ display "LEON3 opencores ethernet driver"
+
+ parent CYGPKG_IO_ETH_DRIVERS
+ active_if CYGPKG_IO_ETH_DRIVERS
+ active_if CYGPKG_HAL_SPARC_LEON3
+
+ requires CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC
+ description "Ethernet driver for Opencores in a LEON3 system."
+
+ include_dir cyg/io
+ compile if_opencores.c
+
+ define_proc {
+ puts $::cdl_system_header "/***** ethernet driver proc output start *****/"
+ puts $::cdl_system_header "#define CYGDAT_DEVS_ETH_OPENCORES_ETHERMAC_INL <cyg/io/devs_eth_sparc_opencores_leon3.inl>"
+ puts $::cdl_system_header "#define CYGDAT_DEVS_ETH_OPENCORES_ETHERMAC_CFG <pkgconf/devs_eth_sparc_opencores_leon3.h>"
+ puts $::cdl_system_header "/***** ethernet driver proc output end *****/"
+ }
+
+ # Arguably this should do in the generic package
+ # but then there is a logic loop so you can never enable it.
+
+ cdl_interface CYGINT_DEVS_ETH_OPENCORES_ETHERMAC_REQUIRED {
+ display "opencores ethermac driver required"
+ }
+
+ cdl_component CYGPKG_DEVS_ETH_SPARC_OPENCORES_LEON3_ETH0 {
+ display "Ethernet port 0 driver"
+ flavor bool
+ default_value 1
+
+ implements CYGHWR_NET_DRIVERS
+ implements CYGHWR_NET_DRIVER_ETH0
+ implements CYGINT_DEVS_ETH_OPENCORES_ETHERMAC_REQUIRED
+
+ cdl_option CYGPKG_DEVS_ETH_SPARC_OPENCORES_LEON3_ETH0_NAME {
+ display "Device name for the ethernet driver"
+ flavor data
+ default_value {"\"eth0\""}
+ description "
+ This option sets the name of the ethernet device for the
+ ethernet port."
+ }
+
+ cdl_option CYGPKG_DEVS_ETH_SPARC_OPENCORES_LEON3_ETH0_ESA {
+ display "The ethernet station address (MAC)"
+ flavor data
+ default_value {"{0x00, 0x00, 0x5e, 0x00, 0x00, 0x12}"}
+ description "A static ethernet station address.
+ Caution: Booting two systems with the same MAC on the same
+ network, will cause severe conflicts."
+ }
+ }
+
+ cdl_component CYGPKG_DEVS_ETH_SPARC_OPENCORES_LEON3_OPTIONS {
+ display "Opencores ethermac driver build options"
+ flavor none
+ no_define
+
+ cdl_option CYGPKG_DEVS_ETH_SPARC_OPENCORES_LEON3_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "-D_KERNEL -D__ECOS" }
+ description "
+ This option modifies the set of compiler flags for
+ building the opencores ethermac driver package.
+ These flags are used in addition
+ to the set of global flags."
+ }
+ }
+
+}
+
+# EOF leon_opencores_ethmac_drivers.cdl
diff --git a/cesar/ecos/packages/devs/eth/sparc/opencores/leon3/current/include/devs_eth_sparc_opencores_leon3.inl b/cesar/ecos/packages/devs/eth/sparc/opencores/leon3/current/include/devs_eth_sparc_opencores_leon3.inl
new file mode 100644
index 0000000000..82b686ceda
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/sparc/opencores/leon3/current/include/devs_eth_sparc_opencores_leon3.inl
@@ -0,0 +1,93 @@
+//==========================================================================
+//
+// devs/eth/sparc/opencores/leon/../include/devs_eth_sparc_opencores_leon.inl
+//
+// Opencores ethermac I/O definitions.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research, (Konrad Eisele<eiselekd@web.de>)
+// Contributors:
+// Date: 2000-11-22
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <cyg/hal/hal_intr.h>
+
+bool openeth_leon3_init(struct cyg_netdevtab_entry *ndp);
+#define CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC_ETH0_ESA CYGPKG_DEVS_ETH_SPARC_OPENCORES_LEON3_ETH0_ESA
+#define CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC_INITFN openeth_leon3_init
+
+#ifdef CYGPKG_DEVS_ETH_SPARC_OPENCORES_LEON3_ETH0
+
+//structs and tables for eth0
+static oeth_info openeth_priv;
+ETH_DRV_SC(oeth_sc,
+ &openeth_priv, // Driver specific data
+ CYGPKG_DEVS_ETH_SPARC_OPENCORES_LEON3_ETH0_NAME, // Name for device
+ openeth_start,
+ openeth_stop,
+ openeth_ioctl,
+ openeth_can_send,
+ openeth_send,
+ openeth_recv,
+ openeth_deliver,
+ openeth_poll,
+ openeth_int_vector
+);
+
+NETDEVTAB_ENTRY(oeth_netdev,
+ "openeth_" CYGPKG_DEVS_ETH_SPARC_OPENCORES_LEON3_ETH0_NAME,
+ openeth_init,
+ &oeth_sc);
+#endif
+
+#if CYGNUM_DEVS_ETH_OPENCORES_ETHERMAC_DEV_COUNT > 1
+#error Only 1 ethermac at a time supported yet (eth0)
+#endif
+
+oeth_info *openeth_priv_array[CYGNUM_DEVS_ETH_OPENCORES_ETHERMAC_DEV_COUNT] = {
+#ifdef CYGPKG_DEVS_ETH_SPARC_OPENCORES_LEON3_ETH0
+ &openeth_priv
+#endif
+};
+
+
+//EOF devs_eth_sparc_opencorec_leon.inl
+
+
diff --git a/cesar/ecos/packages/devs/eth/sparc/opencores/leon3/current/src/if_opencores.c b/cesar/ecos/packages/devs/eth/sparc/opencores/leon3/current/src/if_opencores.c
new file mode 100644
index 0000000000..5f7021cfa2
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/sparc/opencores/leon3/current/src/if_opencores.c
@@ -0,0 +1,116 @@
+//==========================================================================
+//
+// devs/eth/sparc/opencores/leon/../src/if_opencores.c
+//
+// Ethernet device driver for Opencore's ethermac on Leon2/3
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//####BSDCOPYRIGHTBEGIN####
+//
+// -------------------------------------------
+//
+// Portions of this software may have been derived from OpenBSD or other sources,
+// and are covered by the appropriate copyright disclaimers included herein.
+//
+// -------------------------------------------
+//
+//####BSDCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research, (Konrad Eisele<eiselekd@web.de>)
+// Contributors:
+// Date: 2005-01-20
+// Purpose:
+// Description: hardware driver for Opencores ethernet
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#ifdef CYGPKG_IO_ETH_DRIVERS
+#include <pkgconf/io_eth_drivers.h>
+#endif
+#include <pkgconf/devs_eth_opencores_ethermac.h>
+
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_diag.h>
+#include <cyg/hal/hal_cache.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/drv_api.h>
+#include <cyg/io/eth/netdev.h>
+#include <cyg/io/eth/eth_drv.h>
+
+#ifdef CYGPKG_NET
+#include <pkgconf/net.h>
+#include <cyg/kernel/kapi.h>
+#include <net/if.h> /* Needed for struct ifnet */
+#endif
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_leon3.h>
+
+externC void openeth_device_init(struct eth_drv_sc *sc, cyg_uint32 idx, cyg_uint32 base, cyg_uint32 irq);
+
+bool openeth_leon3_init(struct cyg_netdevtab_entry *ndp)
+{
+ int i,j;
+ struct eth_drv_sc *sc = (struct eth_drv_sc *)(ndp->device_instance);
+
+#if !defined(CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC_FLUSH)
+ {
+ unsigned long cfg = sparc_leon3_get_dcachecfg();
+ if (cfg & ASI_LEON3_SYSCTRL_CFG_SNOOPING) {
+ sparc_leon3_enable_snooping();
+ } else {
+ diag_printf("You have to enable snooping in the vhdl model to use the ethermac without CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC_FLUSH, otherwise enable CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC_FLUSH\n");
+ }
+ }
+#endif
+
+ amba_ahb_device adev[CYGNUM_DEVS_ETH_OPENCORES_ETHERMAC_DEV_COUNT];
+ j = amba_get_free_ahbslv_devices (VENDOR_GAISLER, GAISLER_ETHAHB, adev, CYGNUM_DEVS_ETH_OPENCORES_ETHERMAC_DEV_COUNT);
+ for (i = 0;i < j;i++) {
+ openeth_device_init(sc,i,adev[i].start[0],adev[i].irq);
+ }
+ return 1;
+}
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/ChangeLog b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/ChangeLog
new file mode 100644
index 0000000000..914a522ed9
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/ChangeLog
@@ -0,0 +1,120 @@
+2005-07-22 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/syntheth.c (synth_eth_init): Cast to keep the compiler
+ happy.
+
+2003-07-16 Gary Thomas <gary@mlbassoc.com>
+
+ * host/rawether.c: Change error reporting to use standard 'strerror()'
+ function since the use of sys_errlist[] is depricated.
+
+2003-07-09 Bart Veer <bartv@ecoscentric.com>
+
+ * host/Makefile.am: add a dummy install-data-hook if not
+ supported.
+
+ * host/Makefile.in, host/aclocal.m4, host/configure: regenerate
+
+2003-05-06 Bart Veer <bartv@ecoscentric.com>
+
+ * host/ethernet.tcl (filters_initialize):
+ Fix typo reported by Scott Wilkinson
+
+2003-02-25 Iztok Zupet <iz@vsr.si>
+
+ * doc/syntheth.sgml: Replaced .gif with .png to get PDF
+ output.
+ * doc/overview.gif: delete.
+ * doc/overview.png: add.
+
+2003-04-08 Andrew Lunn <lunn@londo>
+
+ * host/rawether.c (tap_init): Set the persistent flag on the tap
+ device if requested by the user. This allows dhcpd and radvd to
+ keep running on the tap device between invocations of the synth
+ target.
+ * doc/syntheth.sgml: Documentation for the persistent option.
+
+2003-04-01 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/syntheth.c (synth_eth_init): Set the flag IFF_ALLMULTI when
+ the underlying device supports multicast so eth_drv correctly sets
+ mutlicast filtering.
+ * cdl/syntheth.cdl: This driver implements multicast.
+
+2003-02-25 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/syntheth.sgml: Declare as <part> not <reference> to get
+ correct TOC numbering.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/syntheth.cdl: Add doc link.
+
+ * doc/syntheth.sgml: Comment out DOCTYPE for now to allow building
+ with standard doc build.
+ Add an enclosing <reference> so it's structured better with standard
+ doc build.
+
+2003-02-13 Bart Veer <bartv@ecoscentric.com>
+
+ * src/syntheth.c, cdl/syntheth.cdl: add dependency on errno.h for
+ error codes, and avoid memset() warning
+
+2003-02-12 Bart Veer <bartv@ecoscentric.com>
+
+ * host/Makefile.in, host/configure:
+ Regenerate after toplevel acinclude.m4 update
+
+2003-02-12 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/syntheth.cdl (CYGPKG_DEVS_ETH_ECOSYNTH_CFLAGS_ADD):
+ Define -D_KERNEL -D__ECOS in line with other drivers. Fixes build
+ issue with freeBSD stack.
+
+2002-09-25 Bart Veer <bartv@ecoscentric.com>
+
+ * host/configure.in, host/rawether.c, doc/syntheth.sgml:
+ Only support the tap device if running a recent Linux kernel
+
+2002-09-22 Bart Veer <bartv@ecoscentric.com>
+
+ * host/configure.in:
+ Remove Tcl-related checks, the ethernet package only requires
+ the functionality of the architectural HAL support
+
+2002-08-07 Bart Veer <bartv@ecoscentric.com>
+
+ * synthetic target ethernet driver package created
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2002, 2003 Bart Veer
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/cdl/syntheth.cdl b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/cdl/syntheth.cdl
new file mode 100644
index 0000000000..350d8db9db
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/cdl/syntheth.cdl
@@ -0,0 +1,147 @@
+# ====================================================================
+#
+# syntheth.cdl
+#
+# Synthetic target ethernet package.
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 2002, 2003 Bart Veer
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting the
+## copyright holder(s).
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Original data: bartv
+# Contributors:
+# Date: 2002-08-07
+#
+#####DESCRIPTIONEND####
+# ====================================================================
+
+cdl_package CYGPKG_DEVS_ETH_ECOSYNTH {
+ display "Synthetic target ethernet driver"
+ description "
+ The ethernet driver for the eCos synthetic target allows applications
+ and other packages such as a TCP/IP stack to perform ethernet I/O.
+ This can involve either an unused ethernet device, or an emulated
+ ethernet device as provided by the Linux kernel's tunnel/tap
+ support. The eCos code interacts with a suitable Linux application
+ through the I/O auxiliary. Up to four ethernet devices are
+ supported, and the host-side target definition file controls how
+ each device will perform its I/O."
+ doc ref/devs-eth-synth-ecosynth.html
+
+ parent CYGPKG_IO_ETH_DRIVERS
+ active_if CYGPKG_IO_ETH_DRIVERS
+ active_if CYGPKG_HAL_SYNTH
+ implements CYGINT_IO_ETH_MULTICAST
+
+ cdl_option CYGVAR_DEVS_ETH_ECOSYNTH_ETH0 {
+ display "Provide eth0 device"
+ description "
+ The synthetic target can provide up to four ethernet devices,
+ eth0 to eth3. By default eth0 is enabled when a TCP/IP stack
+ is part of the configuration, disabled otherwise."
+ default_value CYGPKG_NET_STACK
+ implements CYGHWR_NET_DRIVERS
+ implements CYGHWR_NET_DRIVER_ETH0
+ }
+
+ cdl_option CYGVAR_DEVS_ETH_ECOSYNTH_ETH1 {
+ display "Provide eth1 device"
+ description "
+ The synthetic target can provide up to four ethernet devices,
+ eth0 to eth3. By default eth1 is always disabled, but can
+ be enabled if the eCos application needs more than one ethernet
+ device."
+ default_value 0
+ implements CYGHWR_NET_DRIVERS
+ implements CYGHWR_NET_DRIVER_ETH1
+ }
+
+ cdl_option CYGVAR_DEVS_ETH_ECOSYNTH_ETH2 {
+ display "Provide eth2 device"
+ description "
+ The synthetic target can provide up to four ethernet devices,
+ eth0 to eth3. By default eth2 is always disabled, but can
+ be enabled if the eCos application needs more than two ethernet
+ devices."
+ default_value 0
+ implements CYGHWR_NET_DRIVERS
+ }
+
+ cdl_option CYGVAR_DEVS_ETH_ECOSYNTH_ETH3 {
+ display "Provide eth3 device"
+ description "
+ The synthetic target can provide up to four ethernet devices,
+ eth0 to eth3. By default eth3 is always disabled, but can
+ be enabled if the eCos application needs more than three ethernet
+ devices."
+ default_value 0
+ implements CYGHWR_NET_DRIVERS
+ }
+
+ cdl_component CYGPKG_DEVS_ETH_ECOSYNTH_OPTIONS {
+ display "Build options"
+ active_if { CYGVAR_DEVS_ETH_ECOSYNTH_ETH0 || CYGVAR_DEVS_ETH_ECOSYNTH_ETH1 || CYGVAR_DEVS_ETH_ECOSYNTH_ETH2 || CYGVAR_DEVS_ETH_ECOSYNTH_ETH3 }
+ flavor none
+ compile -library=libextras.a syntheth.c
+ requires CYGINT_ISO_ERRNO_CODES CYGINT_ISO_STRING_MEMFUNCS
+ description "
+ Package-specific build options including control over compiler
+ flags used only in building this package."
+
+ cdl_option CYGPKG_DEVS_ETH_ECOSYNTH_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "-D_KERNEL -D__ECOS" }
+ description "
+ This option modifies the set of compiler flags for
+ building this package. These flags are used in addition
+ to the set of global flags."
+ }
+ cdl_option CYGPKG_DEVS_ETH_ECOSYNTH_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building this package. These flags are removed from
+ the set of global flags if present."
+ }
+ }
+}
+
+# EOF syntheth.cdl
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/devs-eth-synth-ecosynth.html b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/devs-eth-synth-ecosynth.html
new file mode 100644
index 0000000000..dd8fcf7aaa
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/devs-eth-synth-ecosynth.html
@@ -0,0 +1,928 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Synthetic Target Ethernet Driver</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
+"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><H1
+><A
+NAME="DEVS-ETH-SYNTH-ECOSYNTH">Synthetic Target Ethernet Driver</H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN4"
+></A
+><H2
+>Name</H2
+>Synthetic Target Ethernet Support&nbsp;--&nbsp;Allow synthetic target applications to perform ethernet I/O</DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN7"
+></A
+><H2
+>Overview</H2
+><P
+>The synthetic target ethernet package can provide up to four network
+devices, <TT
+CLASS="VARNAME"
+>eth0</TT
+> to <TT
+CLASS="VARNAME"
+>eth3</TT
+>. These can
+be used directly by the eCos application or, more commonly, by a
+TCP/IP stack that is linked with the eCos application. Each eCos
+device can be mapped on to a real Linux network device. For example,
+if the Linux PC has two ethernet cards and <TT
+CLASS="VARNAME"
+>eth1</TT
+> is
+not currently being used by Linux itself, then one of the eCos devices
+can be mapped on to this Linux device. Alternatively, it is possible
+to map some or all of the eCos devices on to the ethertap support
+provided by the Linux kernel.
+ </P
+><P
+>The ethernet package depends on the I/O auxiliary provided by the
+synthetic target architectural HAL package. During initialization the
+eCos application will attempt to instantiate the desired devices, by
+sending a request to the auxiliary. This will load a Tcl script
+<TT
+CLASS="FILENAME"
+>ethernet.tcl</TT
+> that is responsible for handling the
+instantiation request and subsequent I/O operations, for example
+transmitting an ethernet packet. However, some of the low-level I/O
+operations cannot conveniently be done by a Tcl script so
+<TT
+CLASS="FILENAME"
+>ethernet.tcl</TT
+> will actually run a separate program
+<B
+CLASS="COMMAND"
+>rawether</B
+> to interact with the Linux network device.
+ </P
+><DIV
+CLASS="INFORMALFIGURE"
+><A
+NAME="AEN17"><P
+></P
+><DIV
+CLASS="MEDIAOBJECT"
+><P
+><IMG
+SRC="overview.gif"
+ALIGN="CENTER"></P
+></DIV
+><P
+></P
+></DIV
+><P
+>On the target-side there are configuration options to control which
+network devices should be present. For many applications a single
+device will be sufficient, but if the final eCos application is
+something like a network bridge then the package can support multiple
+devices. On the host-side each eCos network device needs to be mapped
+on to a Linux one, either a real ethernet device or an ethertap
+device. This is handled by an entry in the target definition file:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device ethernet {
+ eth0 real eth1
+ eth1 ethertap tap3 00:01:02:03:FE:05
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>The ethernet package also comes with support for packet logging,
+and provides various facilities for use by user Tcl scripts.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="DEVS-ETH-ECOSYNTH-INSTALL"
+></A
+><H2
+>Installation</H2
+><P
+>Before a synthetic target eCos application can access ethernet devices
+it is necessary to build and install host-side support. The relevant
+code resides in the <TT
+CLASS="FILENAME"
+>host</TT
+>
+subdirectory of the synthetic target ethernet package, and building it
+involves the standard <B
+CLASS="COMMAND"
+>configure</B
+>,
+<B
+CLASS="COMMAND"
+>make</B
+> and <B
+CLASS="COMMAND"
+>make install</B
+> steps.
+The build involves a new executable <B
+CLASS="COMMAND"
+>rawether</B
+> which
+must be able to access a raw Linux network device. This is achieved by
+installing it suid root, so the <B
+CLASS="COMMAND"
+>make install</B
+> step
+has to be run with superuser privileges.
+ </P
+><DIV
+CLASS="CAUTION"
+><P
+></P
+><TABLE
+CLASS="CAUTION"
+BORDER="1"
+WIDTH="100%"
+><TR
+><TD
+ALIGN="CENTER"
+><B
+>Caution</B
+></TD
+></TR
+><TR
+><TD
+ALIGN="LEFT"
+><P
+>Installing <B
+CLASS="COMMAND"
+>rawether</B
+> suid root introduces a
+potential security problem. Although normally
+<B
+CLASS="COMMAND"
+>rawether</B
+> is executed only by the I/O auxiliary,
+theoretically it can be run by any program. Effectively it gives any
+user the ability to monitor all ethernet traffic and to inject
+arbitrary packets into the network. Also, as with any suid root
+programs there may be as yet undiscovered exploits. Users and system
+administrators should consider the risks before running <B
+CLASS="COMMAND"
+>make
+install</B
+>.
+ </P
+></TD
+></TR
+></TABLE
+></DIV
+><P
+>There are two main ways of building the host-side software. It is
+possible to build both the generic host-side software and all
+package-specific host-side software, including the ethernet support,
+in a single build tree. This involves using the
+<B
+CLASS="COMMAND"
+>configure</B
+> script at the toplevel of the eCos
+repository. For more information on this, see the
+<TT
+CLASS="FILENAME"
+>README.host</TT
+> file at the top of the repository.
+Note that if you have an existing build tree which does not include
+the synthetic target ethernet support then it will be necessary to
+rerun the toplevel configure script: the search for appropriate
+packages happens at configure time.
+ </P
+><P
+>The alternative is to build just the host-side for this package.
+This requires a separate build directory, building directly in the
+source tree is disallowed. The <B
+CLASS="COMMAND"
+>configure</B
+> options
+are much the same as for a build from the toplevel, and the
+<TT
+CLASS="FILENAME"
+>README.host</TT
+> file can be consulted for more
+details. It is essential that the ethernet support be configured with
+the same <TT
+CLASS="OPTION"
+>--prefix</TT
+> option as other eCos host-side
+software, especially the I/O auxiliary provided by the architectural
+synthetic target HAL package, otherwise the I/O auxiliary will be
+unable to locate the ethernet support.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="DEVS-ETH-ECOSYNTH-OPTIONS"
+></A
+><H2
+>Target-side Configuration Options</H2
+><P
+>The target-side code can be configured to support up to four ethernet
+devices, <TT
+CLASS="VARNAME"
+>eth0</TT
+> to <TT
+CLASS="VARNAME"
+>eth3</TT
+>. By
+default <TT
+CLASS="VARNAME"
+>eth0</TT
+> is enabled if the configuration
+includes a TCP/IP stack, otherwise it is disabled. The other three
+devices are always disabled by default. If any of the devices are
+enabled then there will also be the usual configuration options
+related to building this package. Other options related to network
+devices, for example whether or not to use DHCP, are provided by
+the generic network device package.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="DEVS-ETH-ECOSYNTH-REAL"
+></A
+><H2
+>Real Ethernet</H2
+><P
+>One obvious way of providing a synthetic target eCos application with
+ethernet I/O is to use a real ethernet device in the PC: transmitted
+packets go out on a real network, and packets on the network addressed
+to the right MAC address are passed on to eCos. This way synthetic
+target networking behaves just like networking on a real target with
+ethernet hardware. For example, if there is a DHCP server anywhere on
+the network then eCos will be able to contact it during networking
+startup and get hold of IP address information.
+ </P
+><P
+>Configuring the ethernet support to use a real ethernet device
+requires a simple entry in the target definition file:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device ethernet {
+ &lt;eCos device&gt; real &lt;linux device&gt;
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>For example, to map the eCos network device <TT
+CLASS="VARNAME"
+>eth0</TT
+> to
+the Linux device <TT
+CLASS="VARNAME"
+>eth1</TT
+>:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device ethernet {
+ eth0 real eth1
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>It is not possible for an ethernet device to be shared by both the
+eCos TCP/IP stack and the Linux one: there would be no simple way to
+work out which stack incoming packets are intended for. In theory
+it might be possible to do some demultiplexing using distinct IP
+addresses, but it would be impossible to support some functionality
+such as DHCP. Therefore the <B
+CLASS="COMMAND"
+>rawether</B
+> program will
+refuse to access any ethernet device already in use. On a typical
+Linux system <TT
+CLASS="VARNAME"
+>eth0</TT
+> will be used for Linux
+networking, and the PC will have to be equipped with additional
+ethernet devices for use by eCos.
+ </P
+><P
+>The <B
+CLASS="COMMAND"
+>rawether</B
+> program will access the hardware via
+the appropriate Linux device driver, so it is important that the
+system is set up such that the relevant module will be automatically
+loaded or is already loaded. The details of this will depend on the
+installed distribution and version, but typically it will involve an
+entry in <TT
+CLASS="FILENAME"
+>/etc/modules.conf</TT
+>.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="DEVS-ETH-ECOSYNTH-ETHERTAP"
+></A
+><H2
+>Ethertap</H2
+><P
+>The Linux kernel's ethertap facility provides a virtual network
+interface. A Linux application, for example the
+<B
+CLASS="COMMAND"
+>rawether</B
+> program, can open a special character
+device <TT
+CLASS="FILENAME"
+>/dev/net/tun</TT
+>, perform various
+<TT
+CLASS="FUNCTION"
+>ioctl</TT
+> calls, and then <TT
+CLASS="FILENAME"
+>write</TT
+>
+and <TT
+CLASS="FILENAME"
+>read</TT
+> ethernet packets. When the device is
+opened the Linux kernel automatically creates a new network interface,
+for example <TT
+CLASS="VARNAME"
+>tap0</TT
+>. The Linux TCP/IP stack can be
+made to use this network interface like any other interface, receiving
+and transmitting ethernet packets. The net effect is a virtual network
+connecting just the Linux and eCos TCP/IP stacks, with no other nodes
+attached. By default all traffic remains inside this virtual network
+and is never forwarded to a real network.
+ </P
+><P
+>Support for the ethertap facility may or may not be provided
+automatically, depending on your Linux distribution and version. If
+your system does not have a device <TT
+CLASS="FILENAME"
+>/dev/net/tun</TT
+>
+or a module <TT
+CLASS="FILENAME"
+>tun.o</TT
+> then the appropriate kernel
+documentation should be consulted, for example
+<TT
+CLASS="FILENAME"
+>/usr/src/linux-2.4/Documentation/networking/tuntap.txt</TT
+>.
+If you are using an old Linux kernel then the ethertap functionality
+may be missing completely. When the <B
+CLASS="COMMAND"
+>rawether</B
+>
+program is configured and built, the <B
+CLASS="COMMAND"
+>configure</B
+>
+script will check for a file <TT
+CLASS="FILENAME"
+>/usr/include/linux/if_tun.h</TT
+>. If that
+file is missing then <B
+CLASS="COMMAND"
+>rawether</B
+> will be built without
+ethertap functionality, and only real ethernet interfaces will be
+supported.
+ </P
+><P
+>The target definition file is used to map eCos network devices on to
+ethertap devices. The simplest usage is:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device ethernet {
+ eth0 ethertap
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>The Linux kernel will automatically allocate the next available tap
+network interface. Usually this will be <TT
+CLASS="VARNAME"
+>tap0</TT
+> but if
+other software is using the ethertap facility, for example to
+implement a VPN, then a different number may be allocated. Usually it
+will be better to specify the particular tap device that should be
+used for each eCos device, for example:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device ethernet {
+ eth0 ethertap tap3
+ eth1 ethertap tap4
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>The user now knows exactly which eCos device is mapped onto which
+Linux device, avoiding much potential confusion. Because the virtual
+devices are emulated ethernet devices, they require MAC addresses.
+There is no physical hardware to provide these addresses, so normally
+MAC addresses will be invented. That means that each time the eCos
+application is run it will have different MAC addresses, which makes
+it more difficult to compare the results of different runs. To get
+more deterministic behaviour it is possible to specify the MAC
+addresses in the target definition file:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device ethernet {
+ eth0 ethertap tap3 00:01:02:03:FE:05
+ eth1 ethertap tap4 00:01:02:03:FE:06
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>During the initialization phase the eCos application will instantiate
+the various network devices. This will cause the I/O auxiliary to load
+the <TT
+CLASS="FILENAME"
+>ethernet.tcl</TT
+> script and spawn
+<B
+CLASS="COMMAND"
+>rawether</B
+> processes, which in turn will
+<TT
+CLASS="FUNCTION"
+>open</TT
+> <TT
+CLASS="FILENAME"
+>/dev/net/tun</TT
+> and
+perform the appropriate <TT
+CLASS="FILENAME"
+>ioctl</TT
+> calls. On the Linux
+side there will now be new network interfaces such as
+<TT
+CLASS="VARNAME"
+>tap3</TT
+>, and these can be configured like any other
+network interface using commands such as <B
+CLASS="COMMAND"
+>ifconfig</B
+>.
+In addition, if the Linux system is set up with hotplug support then
+it may be possible to arrange for the network interface to become
+active automatically. On a Red Hat Linux system this would require
+files such as
+<TT
+CLASS="FILENAME"
+>/etc/sysconfig/network-scripts/ifcfg-tap3</TT
+>,
+containing data like:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>DEVICE="tap3"
+BOOTPROTO="none"
+BROADCAST=10.2.2.255
+IPADDR="10.2.2.1"
+NETMASK="255.255.255.0"
+NETWORK=10.2.2.0
+ONBOOT="no"</PRE
+></TD
+></TR
+></TABLE
+><P
+>This gives the Linux interface the address <TT
+CLASS="LITERAL"
+>10.2.2.1</TT
+>
+on the network <TT
+CLASS="LITERAL"
+>10.2.2.0</TT
+>. The eCos network device
+should be configured with a compatible address. One way of doing this
+would be to enable <TT
+CLASS="VARNAME"
+>CYGHWR_NET_DRIVER_ETH0_ADDRS</TT
+>,
+set <TT
+CLASS="VARNAME"
+>CYGHWR_NET_DRIVER_ETH0_ADDRS_IP</TT
+> to
+<TT
+CLASS="LITERAL"
+>10.2.2.2</TT
+>, and similarly update the
+<TT
+CLASS="VARNAME"
+>NETMASK</TT
+>, <TT
+CLASS="VARNAME"
+>BROADCAST</TT
+>,
+<TT
+CLASS="VARNAME"
+>GATEWAY</TT
+> and <TT
+CLASS="VARNAME"
+>SERVER</TT
+> configuration
+options.
+ </P
+><P
+>It should be noted that the ethertap facility provides a virtual
+network, and any packets transmitted by the eCos application will
+not appear on a real network. Therefore usually there will no
+accessible DHCP server, and eCos cannot use DHCP or BOOTP to obtain IP
+address information. Instead the eCos configuration should use manual
+or static addresses.
+ </P
+><P
+>An alternative approach would be to set up the Linux box as a network
+bridge, using commands like <B
+CLASS="COMMAND"
+>brctl</B
+> to connect the
+virtual network interface <TT
+CLASS="VARNAME"
+>tap3</TT
+> to a physical
+network interface such as <TT
+CLASS="VARNAME"
+>eth0</TT
+>. Any packets sent by
+the eCos application will get forwarded automatically to the real
+network, and some packets on the real network will get forwarded over
+the virtual network to the eCos application. Note that the eCos
+application might also get some packets that were not intended for it,
+but usually those will just be discarded by the eCos TCP/IP stack. The
+exact details of setting up a network bridge are left as an exercise
+to the reader.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="DEVS-ETH-ECOSYNTH-LOGGING"
+></A
+><H2
+>Packet Logging</H2
+><P
+>The ethernet support comes with support for logging the various
+packets that are transferred, including a simple protocol analyser.
+This generates simple text output using the filter mechanisms provided
+by the I/O auxiliary, so it is possible to control the appearance and
+visibility of different types of output. For example the user might
+want to see IPv4 headers and all ICMPv4 and ARP operations, but not
+TCP headers or any of the packet data.
+ </P
+><P
+>The protocol analyser is not intended to be a fully functional
+analyser with knowledge of many different TCP/IP protocols, advanced
+search facilities, graphical traffic displays, and so on.
+Functionality like that is already provided by other tools such as
+<SPAN
+CLASS="APPLICATION"
+>ethereal</SPAN
+> and
+<SPAN
+CLASS="APPLICATION"
+>tcpdump</SPAN
+>. Achieving similar levels of
+functionality would require a lot of work, for very little gain. It is
+still useful to have some protocol analysis functionality available
+because the output will be interleaved with other output, for example
+<TT
+CLASS="FILENAME"
+>printf</TT
+> calls from the application. That may make
+it easier to understand the sequence of events.
+ </P
+><P
+>One problem with logging ethernet traffic is that it can involve very
+large amounts of data. If the application is expected to run for a
+long time or is very I/O intensive then it is easy to end up with many
+megabytes. When running in graphical mode all the logging data will be
+held in memory, even data that is not currently visible. At some point
+the system will begin to run low on memory and performance will
+suffer. To avoid problems, the ethernet script maintains a flag that
+controls whether or not packet logging is active. The default is to
+run with logging disabled, but this can be changed in the target
+definition file:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device ethernet {
+ &#8230;
+ logging 1
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>The ethernet script will add a toolbar button that allows this flag to
+be changed at run-time, allowing the user to capture traffic for
+certain periods of time while the application continues running.
+ </P
+><P
+>The target definition file can contain the following entries for the
+various packet logging filters:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device ethernet {
+ &#8230;
+ filter ether -hide 0 -background LightBlue -foreground "#000080"
+ filter arp -hide 0 -background LightBlue -foreground "#000050"
+ filter ipv4 -hide 0 -background LightBlue -foreground "#000040"
+ filter ipv6 -hide 1 -background LightBlue -foreground "#000040"
+ filter icmpv4 -hide 0 -background LightBlue -foreground "#000070"
+ filter icmpv6 -hide 1 -background LightBlue -foreground "#000070"
+ filter udp -hide 0 -background LightBlue -foreground "#000030"
+ filter tcp -hide 0 -background LightBlue -foreground "#000020"
+ filter hexdata -hide 1 -background LightBlue -foreground "#000080"
+ filter asciidata -hide 1 -background LightBlue -foreground "#000080"
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>All output will show the eCos network device, for example
+<TT
+CLASS="LITERAL"
+>eth0</TT
+>, and the direction relative to the eCos
+application. Some of the filters will show packet headers, for example
+<TT
+CLASS="LITERAL"
+>ether</TT
+> gives details of the ethernet packet header
+and <TT
+CLASS="LITERAL"
+>tcp</TT
+> gives information about TCP headers such as
+whether or not the SYN flag is set. The TCP and UDP filters will also
+show source and destination addresses, using numerical addresses and
+if possible host names. However, host names will only be shown if the
+host appears in <TT
+CLASS="FILENAME"
+>/etc/hosts</TT
+>: doing full DNS
+lookups while the data is being captured would add significantly to
+complexity and overhead. The <TT
+CLASS="LITERAL"
+>hexdata</TT
+> and
+<TT
+CLASS="LITERAL"
+>asciidata</TT
+> filters show the remainder of the packets
+after the ethernet, IP and TCP or UDP headers have been stripped.
+ </P
+><P
+>Some of the filters will provide raw dumps of some of the packet data.
+Showing up to 1500 bytes of data for each packet would be expensive,
+and often the most interesting information is near the start of the
+packet. Therefore it is possible to set a limit on the number of bytes
+that will be shown using the target definition file. The default limit
+is 64 bytes.
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device ethernet {
+ &#8230;
+ max_show 128
+}</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="DEVS-ETH-ECOSYNTH-GUI"
+></A
+><H2
+>User Interface Additions</H2
+><P
+>When running in graphical mode the ethernet script extends the user
+interface in two ways: a button is added to the toolbar so that users
+can enable or disable packet logging; and an entry is added to the
+<SPAN
+CLASS="GUIMENU"
+>Help</SPAN
+> menu for the ethernet-specific documentation.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="DEVS-ETH-ECOSYNTH-ARGS"
+></A
+><H2
+>Command Line Arguments</H2
+><P
+>The synthetic target ethernet support does not use any command line
+arguments. All configuration is handled through the target definition
+file.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="DEVS-ETH-ECOSYNTH-HOOKS"
+></A
+><H2
+>Hooks</H2
+><P
+>The ethernet support defines two hooks that can be used by other
+scripts, especially user scripts: <TT
+CLASS="LITERAL"
+>ethernet_tx</TT
+> and
+<TT
+CLASS="LITERAL"
+>ethernet_rx</TT
+>. The tx hook is called whenever eCos
+tries to transmit a packet. The rx hook is called whenever an incoming
+packet is passed to the eCos application. Note that this may be a
+little bit after the packet was actually received by the I/O auxiliary
+since it can buffer some packets. Both hooks are called with two
+arguments, the name of the network device and the packet being
+transferred. Typical usage might look like:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> proc my_tx_hook { arg_list } {
+ set dev [lindex $arg_list 0]
+ incr ::my_ethernet_tx_packets($dev)
+ incr ::my_ethernet_tx_bytes($dev) [string length [lindex $arg_list 1]]
+ }
+ proc my_rx_hook { arg_list } {
+ set dev [lindex $arg_list 0]
+ incr ::my_ethernet_rx_packets($dev)
+ incr ::my_ethernet_rx_bytes($dev) [string length [lindex $arg_list 1]]
+ }
+ synth::hook_add "ethernet_tx" my_tx_hook
+ synth::hook_add "ethernet_rx" my_rx_hook</PRE
+></TD
+></TR
+></TABLE
+><P
+>The global arrays <TT
+CLASS="VARNAME"
+>my_ethernet_tx_packets</TT
+> etc. will
+now be updated whenever there is ethernet traffic. Other code,
+probably running at regular intervals by use of the Tcl
+<B
+CLASS="COMMAND"
+>after</B
+> procedure, can then use this information to
+update a graphical monitor of some sort.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="DEVS-ETH-ECOSYNTH-TCL"
+></A
+><H2
+>Additional Tcl Procedures</H2
+><P
+>The ethernet support provides one additional Tcl procedure that can be
+used by other scripts;
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>ethernet::devices_get_list </PRE
+></TD
+></TR
+></TABLE
+><P
+>This procedure returns a list of the ethernet devices that have been
+instantiated, for example <TT
+CLASS="LITERAL"
+>{eth0 eth1}</TT
+>.
+ </P
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/makefile b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/makefile
new file mode 100644
index 0000000000..84263df02f
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/makefile
@@ -0,0 +1,34 @@
+#=============================================================================
+#
+# makefile
+#
+# For building the synthetic target ethernet package documentation
+#
+#=============================================================================
+#####COPYRIGHTBEGIN####
+#
+# ===============================================================
+# Copyright (C) 2002 Bart Veer
+# This material may be distributed only subject to the terms
+# and conditions set forth in the Open Publication License, v1.0
+# or later (the latest version is presently available at
+# http://www.opencontent.org/openpub/)
+# ===============================================================
+#
+#####COPYRIGHTEND####
+#=============================================================================
+#####DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Date: 2002-08-20
+#####DESCRIPTIONEND####
+#=============================================================================
+
+TOPLEVEL := ../../../../../..
+MAIN_SGML := syntheth.sgml
+MAIN_HTML := devs-eth-synth.html
+MAIN_PDF := devs-eth-synth.pdf
+OTHER_SGML :=
+PICTURES :=
+
+include $(TOPLEVEL)/pkgconf/rules.doc
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/overview.fig b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/overview.fig
new file mode 100644
index 0000000000..3753ea0577
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/overview.fig
@@ -0,0 +1,54 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+ 1500 300 1500 1500
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+ 2400 300 2400 1500
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 300 300 3000 300 3000 1500 300 1500 300 300
+2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+ 3600 300 6000 300 6000 1500 3600 1500 3600 300
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+ 4800 300 4800 1500
+2 1 0 1 0 7 50 0 -1 4.000 0 0 7 1 1 2
+ 1 1 1.00 60.00 120.00
+ 1 1 1.00 60.00 120.00
+ 3000 900 3600 900
+2 1 0 1 0 7 50 0 -1 4.000 0 0 7 1 1 2
+ 1 1 1.00 60.00 120.00
+ 1 1 1.00 60.00 120.00
+ 6000 1050 6600 1050
+2 1 0 1 0 7 50 0 -1 4.000 0 0 7 1 1 2
+ 1 1 1.00 60.00 120.00
+ 1 1 1.00 60.00 120.00
+ 7500 450 8100 450
+2 1 0 1 0 7 50 0 -1 4.000 0 0 7 1 1 2
+ 1 1 1.00 60.00 120.00
+ 1 1 1.00 60.00 120.00
+ 7500 1050 8100 1050
+2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+ 6600 900 7500 900 7500 1200 6600 1200 6600 900
+2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+ 6600 300 7500 300 7500 600 6600 600 6600 300
+2 1 0 1 0 7 50 0 -1 4.000 0 0 7 1 1 2
+ 1 1 1.00 60.00 120.00
+ 1 1 1.00 60.00 120.00
+ 6000 450 6600 450
+4 0 0 50 0 0 12 0.0000 4 180 825 375 1200 application\001
+4 0 0 50 0 0 12 0.0000 4 135 390 600 900 eCos\001
+4 0 0 50 0 0 12 0.0000 4 135 540 1650 900 TCP/IP\001
+4 0 0 50 0 0 12 0.0000 4 135 330 2550 675 eth0\001
+4 0 0 50 0 0 12 0.0000 4 135 330 2550 1200 eth1\001
+4 0 0 50 0 0 12 0.0000 4 180 975 3675 900 I/O Auxiliary\001
+4 0 0 50 0 0 12 0.0000 4 135 870 4950 900 ethernet.tcl\001
+4 0 0 50 0 0 12 0.0000 4 135 330 8175 525 eth1\001
+4 0 0 50 0 0 12 0.0000 4 180 330 8175 1125 tap3\001
+4 0 0 50 0 0 12 0.0000 4 135 675 6675 1125 rawether\001
+4 0 0 50 0 0 12 0.0000 4 135 675 6675 525 rawether\001
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/overview.png b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/overview.png
new file mode 100644
index 0000000000..00f5c4e6c7
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/overview.png
Binary files differ
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/syntheth.sgml b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/syntheth.sgml
new file mode 100644
index 0000000000..1466be59fb
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/doc/syntheth.sgml
@@ -0,0 +1,553 @@
+<!-- DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" -->
+
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- syntheth.sgml -->
+<!-- -->
+<!-- Synthetic target ethernet support package. -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 2002 Bart Veer -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- Author(s): bartv -->
+<!-- Contact(s): bartv -->
+<!-- Date: 2002/08/20 -->
+<!-- Version: 0.01 -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part id="devs-eth-synth-ecosynth-ref">
+<!-- reference id="devs-eth-synth-ecosynth-ref" -->
+ <title>Synthetic Target Ethernet Driver</title>
+
+<refentry id="devs-eth-synth-ecosynth">
+ <refmeta>
+ <refentrytitle>Synthetic Target Ethernet Driver</refentrytitle>
+ </refmeta>
+ <refnamediv>
+ <refname>Synthetic Target Ethernet Support</refname>
+ <refpurpose>Allow synthetic target applications to perform ethernet I/O</refpurpose>
+ </refnamediv>
+
+ <refsect1><title>Overview</title>
+ <para>
+The synthetic target ethernet package can provide up to four network
+devices, <varname>eth0</varname> to <varname>eth3</varname>. These can
+be used directly by the eCos application or, more commonly, by a
+TCP/IP stack that is linked with the eCos application. Each eCos
+device can be mapped on to a real Linux network device. For example,
+if the Linux PC has two ethernet cards and <varname>eth1</varname> is
+not currently being used by Linux itself, then one of the eCos devices
+can be mapped on to this Linux device. Alternatively, it is possible
+to map some or all of the eCos devices on to the ethertap support
+provided by the Linux kernel.
+ </para>
+ <para>
+The ethernet package depends on the I/O auxiliary provided by the
+synthetic target architectural HAL package. During initialization the
+eCos application will attempt to instantiate the desired devices, by
+sending a request to the auxiliary. This will load a Tcl script
+<filename>ethernet.tcl</filename> that is responsible for handling the
+instantiation request and subsequent I/O operations, for example
+transmitting an ethernet packet. However, some of the low-level I/O
+operations cannot conveniently be done by a Tcl script so
+<filename>ethernet.tcl</filename> will actually run a separate program
+<command>rawether</command> to interact with the Linux network device.
+ </para>
+ <informalfigure PgWide=1>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="overview.png" Scalefit=1 Align="Center">
+ </imageobject>
+ </mediaobject>
+ </informalfigure>
+ <para>
+On the target-side there are configuration options to control which
+network devices should be present. For many applications a single
+device will be sufficient, but if the final eCos application is
+something like a network bridge then the package can support multiple
+devices. On the host-side each eCos network device needs to be mapped
+on to a Linux one, either a real ethernet device or an ethertap
+device. This is handled by an entry in the target definition file:
+ </para>
+ <programlisting>
+synth_device ethernet {
+ eth0 real eth1
+ eth1 ethertap tap3 00:01:02:03:FE:05
+ &hellip;
+}
+</programlisting>
+ <para>
+The ethernet package also comes with support for packet logging,
+and provides various facilities for use by user Tcl scripts.
+ </para>
+ </refsect1>
+
+ <refsect1 id="devs-eth-ecosynth-install"><title>Installation</title>
+ <para>
+Before a synthetic target eCos application can access ethernet devices
+it is necessary to build and install host-side support. The relevant
+code resides in the <filename class="directory">host</filename>
+subdirectory of the synthetic target ethernet package, and building it
+involves the standard <command>configure</command>,
+<command>make</command> and <command>make install</command> steps.
+The build involves a new executable <command>rawether</command> which
+must be able to access a raw Linux network device. This is achieved by
+installing it suid root, so the <command>make install</command> step
+has to be run with superuser privileges.
+ </para>
+ <caution><para>
+Installing <command>rawether</command> suid root introduces a
+potential security problem. Although normally
+<command>rawether</command> is executed only by the I/O auxiliary,
+theoretically it can be run by any program. Effectively it gives any
+user the ability to monitor all ethernet traffic and to inject
+arbitrary packets into the network. Also, as with any suid root
+programs there may be as yet undiscovered exploits. Users and system
+administrators should consider the risks before running <command>make
+install</command>.
+ </para></caution>
+ <para>
+There are two main ways of building the host-side software. It is
+possible to build both the generic host-side software and all
+package-specific host-side software, including the ethernet support,
+in a single build tree. This involves using the
+<command>configure</command> script at the toplevel of the eCos
+repository. For more information on this, see the
+<filename>README.host</filename> file at the top of the repository.
+Note that if you have an existing build tree which does not include
+the synthetic target ethernet support then it will be necessary to
+rerun the toplevel configure script: the search for appropriate
+packages happens at configure time.
+ </para>
+ <para>
+The alternative is to build just the host-side for this package.
+This requires a separate build directory, building directly in the
+source tree is disallowed. The <command>configure</command> options
+are much the same as for a build from the toplevel, and the
+<filename>README.host</filename> file can be consulted for more
+details. It is essential that the ethernet support be configured with
+the same <option>--prefix</option> option as other eCos host-side
+software, especially the I/O auxiliary provided by the architectural
+synthetic target HAL package, otherwise the I/O auxiliary will be
+unable to locate the ethernet support.
+ </para>
+ </refsect1>
+
+ <refsect1 id="devs-eth-ecosynth-options"><title>Target-side Configuration Options</title>
+ <para>
+The target-side code can be configured to support up to four ethernet
+devices, <varname>eth0</varname> to <varname>eth3</varname>. By
+default <varname>eth0</varname> is enabled if the configuration
+includes a TCP/IP stack, otherwise it is disabled. The other three
+devices are always disabled by default. If any of the devices are
+enabled then there will also be the usual configuration options
+related to building this package. Other options related to network
+devices, for example whether or not to use DHCP, are provided by
+the generic network device package.
+ </para>
+ </refsect1>
+
+ <refsect1 id="devs-eth-ecosynth-real"><title>Real Ethernet</title>
+ <para>
+One obvious way of providing a synthetic target eCos application with
+ethernet I/O is to use a real ethernet device in the PC: transmitted
+packets go out on a real network, and packets on the network addressed
+to the right MAC address are passed on to eCos. This way synthetic
+target networking behaves just like networking on a real target with
+ethernet hardware. For example, if there is a DHCP server anywhere on
+the network then eCos will be able to contact it during networking
+startup and get hold of IP address information.
+ </para>
+ <para>
+Configuring the ethernet support to use a real ethernet device
+requires a simple entry in the target definition file:
+ </para>
+ <programlisting>
+synth_device ethernet {
+ &lt;eCos device&gt; real &lt;linux device&gt;
+ &hellip;
+}
+</programlisting>
+ <para>
+For example, to map the eCos network device <varname>eth0</varname> to
+the Linux device <varname>eth1</varname>:
+ </para>
+ <programlisting>
+synth_device ethernet {
+ eth0 real eth1
+ &hellip;
+}
+</programlisting>
+ <para>
+It is not possible for an ethernet device to be shared by both the
+eCos TCP/IP stack and the Linux one: there would be no simple way to
+work out which stack incoming packets are intended for. In theory
+it might be possible to do some demultiplexing using distinct IP
+addresses, but it would be impossible to support some functionality
+such as DHCP. Therefore the <command>rawether</command> program will
+refuse to access any ethernet device already in use. On a typical
+Linux system <varname>eth0</varname> will be used for Linux
+networking, and the PC will have to be equipped with additional
+ethernet devices for use by eCos.
+ </para>
+ <para>
+The <command>rawether</command> program will access the hardware via
+the appropriate Linux device driver, so it is important that the
+system is set up such that the relevant module will be automatically
+loaded or is already loaded. The details of this will depend on the
+installed distribution and version, but typically it will involve an
+entry in <filename>/etc/modules.conf</filename>.
+ </para>
+ </refsect1>
+
+ <refsect1 id="devs-eth-ecosynth-ethertap"><title>Ethertap</title>
+ <para>
+The Linux kernel's ethertap facility provides a virtual network
+interface. A Linux application, for example the
+<command>rawether</command> program, can open a special character
+device <filename>/dev/net/tun</filename>, perform various
+<function>ioctl</function> calls, and then <filename>write</filename>
+and <filename>read</filename> ethernet packets. When the device is
+opened the Linux kernel automatically creates a new network interface,
+for example <varname>tap0</varname>. The Linux TCP/IP stack can be
+made to use this network interface like any other interface, receiving
+and transmitting ethernet packets. The net effect is a virtual network
+connecting just the Linux and eCos TCP/IP stacks, with no other nodes
+attached. By default all traffic remains inside this virtual network
+and is never forwarded to a real network.
+ </para>
+ <para>
+Support for the ethertap facility may or may not be provided
+automatically, depending on your Linux distribution and version. If
+your system does not have a device <filename>/dev/net/tun</filename>
+or a module <filename>tun.o</filename> then the appropriate kernel
+documentation should be consulted, for example
+<filename>/usr/src/linux-2.4/Documentation/networking/tuntap.txt</filename>.
+If you are using an old Linux kernel then the ethertap functionality
+may be missing completely. When the <command>rawether</command>
+program is configured and built, the <command>configure</command>
+script will check for a file <filename
+class="headerfile">/usr/include/linux/if_tun.h</filename>. If that
+file is missing then <command>rawether</command> will be built without
+ethertap functionality, and only real ethernet interfaces will be
+supported.
+ </para>
+ <para>
+The target definition file is used to map eCos network devices on to
+ethertap devices. The simplest usage is:
+ </para>
+ <programlisting>
+synth_device ethernet {
+ eth0 ethertap
+ &hellip;
+}
+</programlisting>
+ <para>
+The Linux kernel will automatically allocate the next available tap
+network interface. Usually this will be <varname>tap0</varname> but if
+other software is using the ethertap facility, for example to
+implement a VPN, then a different number may be allocated. Usually it
+will be better to specify the particular tap device that should be
+used for each eCos device, for example:
+ </para>
+ <programlisting>
+synth_device ethernet {
+ eth0 ethertap tap3
+ eth1 ethertap tap4
+ &hellip;
+}
+</programlisting>
+ <para>
+The user now knows exactly which eCos device is mapped onto which
+Linux device, avoiding much potential confusion. Because the virtual
+devices are emulated ethernet devices, they require MAC addresses.
+There is no physical hardware to provide these addresses, so normally
+MAC addresses will be invented. That means that each time the eCos
+application is run it will have different MAC addresses, which makes
+it more difficult to compare the results of different runs. To get
+more deterministic behaviour it is possible to specify the MAC
+addresses in the target definition file:
+ </para>
+ <programlisting>
+synth_device ethernet {
+ eth0 ethertap tap3 00:01:02:03:FE:05
+ eth1 ethertap tap4 00:01:02:03:FE:06
+ &hellip;
+}
+</programlisting>
+ <para>
+During the initialization phase the eCos application will instantiate
+the various network devices. This will cause the I/O auxiliary to load
+the <filename>ethernet.tcl</filename> script and spawn
+<command>rawether</command> processes, which in turn will
+<function>open</function> <filename>/dev/net/tun</filename> and
+perform the appropriate <filename>ioctl</filename> calls. On the Linux
+side there will now be new network interfaces such as
+<varname>tap3</varname>, and these can be configured like any other
+network interface using commands such as <command>ifconfig</command>.
+In addition, if the Linux system is set up with hotplug support then
+it may be possible to arrange for the network interface to become
+active automatically. On a Red Hat Linux system this would require
+files such as
+<filename>/etc/sysconfig/network-scripts/ifcfg-tap3</filename>,
+containing data like:
+ </para>
+ <programlisting>
+DEVICE="tap3"
+BOOTPROTO="none"
+BROADCAST=10.2.2.255
+IPADDR="10.2.2.1"
+NETMASK="255.255.255.0"
+NETWORK=10.2.2.0
+ONBOOT="no"
+</programlisting>
+ <para>
+This gives the Linux interface the address <literal>10.2.2.1</literal>
+on the network <literal>10.2.2.0</literal>. The eCos network device
+should be configured with a compatible address. One way of doing this
+would be to enable <varname>CYGHWR_NET_DRIVER_ETH0_ADDRS</varname>,
+set <varname>CYGHWR_NET_DRIVER_ETH0_ADDRS_IP</varname> to
+<literal>10.2.2.2</literal>, and similarly update the
+<varname>NETMASK</varname>, <varname>BROADCAST</varname>,
+<varname>GATEWAY</varname> and <varname>SERVER</varname> configuration
+options.
+ </para>
+ <para>
+It should be noted that the ethertap facility provides a virtual
+network, and any packets transmitted by the eCos application will
+not appear on a real network. Therefore usually there will no
+accessible DHCP server, and eCos cannot use DHCP or BOOTP to obtain IP
+address information. Instead the eCos configuration should use manual
+or static addresses.
+ </para>
+ <para>
+When <command>rawether</command> exits, the tap interface is removed
+by the kernel. By adding the parameter persistent
+<command>rawether</command> will set the persistent flag on the tap
+device.
+ </para>
+ <programlisting>
+synth_device ethernet {
+ eth0 ethertap tap3 00:01:02:03:FE:05
+ eth1 ethertap tap4 00:01:02:03:FE:06 persistent
+ &hellip;
+}
+</programlisting>
+ <para>
+With this flag set the kernel will not remove the interface when
+<command>rawether</command> exits. This means applications such as
+<command>dhcpd</command>, <command>radvd</command>, and
+<command>tcpdump</command> will continue to run on the interface
+between invocations of synthetic targets. As a result the target can
+dynamically obtain its IP addresses from these daemons. Note it is a
+good idea to specify a MAC address otherwise a different random MAC
+address will be used each time and the dhcpd daemon will not be able
+to reissue the same IP address.
+ </para>
+ <para>
+Host daemons like dhcpd, ntpd, radvd etc are started at boot
+time. Since the tap device does not exists at this point in time it is
+not possible for these daemons to bind to the tap device. A simple
+solution is to use the program
+<command>install/bin/mktap</command>. This takes one parameter, the
+name of the tap device it should create. eg,
+<literal>tap3</literal>.
+ </para>
+ <para>
+An alternative approach would be to set up the Linux box as a network
+bridge, using commands like <command>brctl</command> to connect the
+virtual network interface <varname>tap3</varname> to a physical
+network interface such as <varname>eth0</varname>. Any packets sent by
+the eCos application will get forwarded automatically to the real
+network, and some packets on the real network will get forwarded over
+the virtual network to the eCos application. Note that the eCos
+application might also get some packets that were not intended for it,
+but usually those will just be discarded by the eCos TCP/IP stack. The
+exact details of setting up a network bridge are left as an exercise
+to the reader.
+ </para>
+ </refsect1>
+
+ <refsect1 id="devs-eth-ecosynth-logging"><title>Packet Logging</title>
+ <para>
+The ethernet support comes with support for logging the various
+packets that are transferred, including a simple protocol analyser.
+This generates simple text output using the filter mechanisms provided
+by the I/O auxiliary, so it is possible to control the appearance and
+visibility of different types of output. For example the user might
+want to see IPv4 headers and all ICMPv4 and ARP operations, but not
+TCP headers or any of the packet data.
+ </para>
+ <para>
+The protocol analyser is not intended to be a fully functional
+analyser with knowledge of many different TCP/IP protocols, advanced
+search facilities, graphical traffic displays, and so on.
+Functionality like that is already provided by other tools such as
+<application>ethereal</application> and
+<application>tcpdump</application>. Achieving similar levels of
+functionality would require a lot of work, for very little gain. It is
+still useful to have some protocol analysis functionality available
+because the output will be interleaved with other output, for example
+<filename>printf</filename> calls from the application. That may make
+it easier to understand the sequence of events.
+ </para>
+ <para>
+One problem with logging ethernet traffic is that it can involve very
+large amounts of data. If the application is expected to run for a
+long time or is very I/O intensive then it is easy to end up with many
+megabytes. When running in graphical mode all the logging data will be
+held in memory, even data that is not currently visible. At some point
+the system will begin to run low on memory and performance will
+suffer. To avoid problems, the ethernet script maintains a flag that
+controls whether or not packet logging is active. The default is to
+run with logging disabled, but this can be changed in the target
+definition file:
+ </para>
+ <programlisting>
+synth_device ethernet {
+ &hellip;
+ logging 1
+}
+</programlisting>
+ <para>
+The ethernet script will add a toolbar button that allows this flag to
+be changed at run-time, allowing the user to capture traffic for
+certain periods of time while the application continues running.
+ </para>
+ <para>
+The target definition file can contain the following entries for the
+various packet logging filters:
+ </para>
+ <programlisting width=72>
+synth_device ethernet {
+ &hellip;
+ filter ether -hide 0 -background LightBlue -foreground "#000080"
+ filter arp -hide 0 -background LightBlue -foreground "#000050"
+ filter ipv4 -hide 0 -background LightBlue -foreground "#000040"
+ filter ipv6 -hide 1 -background LightBlue -foreground "#000040"
+ filter icmpv4 -hide 0 -background LightBlue -foreground "#000070"
+ filter icmpv6 -hide 1 -background LightBlue -foreground "#000070"
+ filter udp -hide 0 -background LightBlue -foreground "#000030"
+ filter tcp -hide 0 -background LightBlue -foreground "#000020"
+ filter hexdata -hide 1 -background LightBlue -foreground "#000080"
+ filter asciidata -hide 1 -background LightBlue -foreground "#000080"
+}
+</programlisting>
+ <para>
+All output will show the eCos network device, for example
+<literal>eth0</literal>, and the direction relative to the eCos
+application. Some of the filters will show packet headers, for example
+<literal>ether</literal> gives details of the ethernet packet header
+and <literal>tcp</literal> gives information about TCP headers such as
+whether or not the SYN flag is set. The TCP and UDP filters will also
+show source and destination addresses, using numerical addresses and
+if possible host names. However, host names will only be shown if the
+host appears in <filename>/etc/hosts</filename>: doing full DNS
+lookups while the data is being captured would add significantly to
+complexity and overhead. The <literal>hexdata</literal> and
+<literal>asciidata</literal> filters show the remainder of the packets
+after the ethernet, IP and TCP or UDP headers have been stripped.
+ </para>
+ <para>
+Some of the filters will provide raw dumps of some of the packet data.
+Showing up to 1500 bytes of data for each packet would be expensive,
+and often the most interesting information is near the start of the
+packet. Therefore it is possible to set a limit on the number of bytes
+that will be shown using the target definition file. The default limit
+is 64 bytes.
+ </para>
+ <programlisting width=72>
+synth_device ethernet {
+ &hellip;
+ max_show 128
+}
+</programlisting>
+ </refsect1>
+
+ <refsect1 id="devs-eth-ecosynth-gui"><title>User Interface Additions</title>
+ <para>
+When running in graphical mode the ethernet script extends the user
+interface in two ways: a button is added to the toolbar so that users
+can enable or disable packet logging; and an entry is added to the
+<guimenu>Help</guimenu> menu for the ethernet-specific documentation.
+ </para>
+ </refsect1>
+
+ <refsect1 id="devs-eth-ecosynth-args"><title>Command Line Arguments</title>
+ <para>
+The synthetic target ethernet support does not use any command line
+arguments. All configuration is handled through the target definition
+file.
+ </para>
+ </refsect1>
+
+ <refsect1 id="devs-eth-ecosynth-hooks"><title>Hooks</title>
+ <para>
+The ethernet support defines two hooks that can be used by other
+scripts, especially user scripts: <literal>ethernet_tx</literal> and
+<literal>ethernet_rx</literal>. The tx hook is called whenever eCos
+tries to transmit a packet. The rx hook is called whenever an incoming
+packet is passed to the eCos application. Note that this may be a
+little bit after the packet was actually received by the I/O auxiliary
+since it can buffer some packets. Both hooks are called with two
+arguments, the name of the network device and the packet being
+transferred. Typical usage might look like:
+ </para>
+ <programlisting>
+ proc my_tx_hook { arg_list } {
+ set dev [lindex $arg_list 0]
+ incr ::my_ethernet_tx_packets($dev)
+ incr ::my_ethernet_tx_bytes($dev) [string length [lindex $arg_list 1]]
+ }
+ proc my_rx_hook { arg_list } {
+ set dev [lindex $arg_list 0]
+ incr ::my_ethernet_rx_packets($dev)
+ incr ::my_ethernet_rx_bytes($dev) [string length [lindex $arg_list 1]]
+ }
+ synth::hook_add "ethernet_tx" my_tx_hook
+ synth::hook_add "ethernet_rx" my_rx_hook
+</programlisting>
+ <para>
+The global arrays <varname>my_ethernet_tx_packets</varname> etc. will
+now be updated whenever there is ethernet traffic. Other code,
+probably running at regular intervals by use of the Tcl
+<command>after</command> procedure, can then use this information to
+update a graphical monitor of some sort.
+ </para>
+ </refsect1>
+
+ <refsect1 id="devs-eth-ecosynth-tcl"><title>Additional Tcl Procedures</title>
+ <para>
+The ethernet support provides one additional Tcl procedure that can be
+used by other scripts;
+ </para>
+ <programlisting>
+ethernet::devices_get_list
+</programlisting>
+ <para>
+This procedure returns a list of the ethernet devices that have been
+instantiated, for example <literal>{eth0 eth1}</literal>.
+ </para>
+ </refsect1>
+
+</refentry>
+</part>
+<!-- /reference -->
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/Makefile.am b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/Makefile.am
new file mode 100644
index 0000000000..67fed50d59
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/Makefile.am
@@ -0,0 +1,97 @@
+## Process this file with automake to produce Makefile.in
+## =====================================================================
+##
+## Makefile.am
+##
+## Build support for the host-side synthetic target support,
+## the ethernetpackage.
+##
+## =====================================================================
+######COPYRIGHTBEGIN####
+#
+# ----------------------------------------------------------------------------
+# Copyright (C) 2002, 2003 Bart Veer
+#
+# This file is part of the eCos synthetic target ethernet support.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# ----------------------------------------------------------------------------
+#
+######COPYRIGHTEND####
+## =====================================================================
+#######DESCRIPTIONBEGIN####
+##
+## Author(s): bartv
+## Contact(s): bartv
+## Date: 2002/08/07
+## Version: 0.01
+##
+######DESCRIPTIONEND####
+## =====================================================================
+
+AUTOMAKE_OPTIONS = 1.3 foreign
+
+## Only some platforms are supported. Having the configure script throw
+## an error when attempting to configure on an unsupported platform
+## would be a mistake, since that would prevent any configury from
+## the toplevel on unsupported platforms. Instead an automake conditional
+## is used, leading to null makefiles on unsupported platforms.
+
+if SUPPORTED
+
+AM_CFLAGS = @ecos_CFLAGS@ -DECOSYNTH_VERSION=\"@VERSION@\" \
+ -DECOS_REPOSITORY=\"@ECOS_REPOSITORY@\" \
+ -DLIBEXECDIR=\"$(libexecdir)\" \
+ -DPACKAGE_DIR=\"@PACKAGE_DIR@\" \
+ -DPACKAGE_VERSION=\"@PACKAGE_VERSION@\" \
+ -DPACKAGE_INSTALL=\"@PACKAGE_INSTALL@\"
+AM_CXXFLAGS = @ecos_CXXFLAGS@
+INCLUDES = @ecos_INCLUDES@
+LIBS = @ecos_LIBS@ @ecos_LDADD@
+
+## The synthetic target support consists of a single program rawether,
+## a number of Tcl scripts, and some additional data files. These are
+## all installed in a single directory $(libexec)/ecos/<package>_<version>/
+## Neither the rawether executable nor any of the scripts are directly
+## executable, instead rawether gets fork()'d/execve()'d by the Tcl
+## script so $(libexec) is appropriate. Strictly speaking the
+## Tcl scripts and data files are architecture-independent so should
+## probably be installed in an analogous directory below $(datadir),
+## but that would add more directories for little real gain. The scripts
+## are treated as data files since they should not be executed directly,
+## i.e. they should not be installed with the execute bit set.
+
+etherdir = $(libexecdir)/ecos/@PACKAGE_INSTALL@
+ether_PROGRAMS = rawether
+ether_DATA = ethernet.tcl ethernet.tdf netrecord.xbm
+
+rawether_SOURCES = rawether.c
+
+## Manual dependencies
+rawether.$(OBJEXT) : Makefile ../src/protocol.h
+
+## The rawether program needs to run with root privileges, or it will
+## be unable to access the ethernet hardware.
+install-data-hook:
+ chown root $(etherdir)/rawether
+ chmod u+s $(etherdir)/rawether
+
+else
+## When automake scans for hooks it does not take conditionals fully
+## into account. If the conditional is not satisfied the generated
+## makefile will still try to invoke the hook, so dummy hooks are needed.
+install-data-hook:
+ echo Nothing to be done for this platform
+endif
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/Makefile.in b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/Makefile.in
new file mode 100644
index 0000000000..c29748989a
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/Makefile.in
@@ -0,0 +1,454 @@
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+######COPYRIGHTBEGIN####
+#
+# ----------------------------------------------------------------------------
+# Copyright (C) 2002, 2003 Bart Veer
+#
+# This file is part of the eCos synthetic target ethernet support.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# ----------------------------------------------------------------------------
+#
+######COPYRIGHTEND####
+#######DESCRIPTIONBEGIN####
+######DESCRIPTIONEND####
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+CC = @CC@
+CXX = @CXX@
+ECOS_REPOSITORY = @ECOS_REPOSITORY@
+EXEEXT = @EXEEXT@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MSVC_SRCDIR = @MSVC_SRCDIR@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_DIR = @PACKAGE_DIR@
+PACKAGE_INSTALL = @PACKAGE_INSTALL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+VERSION = @VERSION@
+ecos_CFLAGS = @ecos_CFLAGS@
+ecos_CXXFLAGS = @ecos_CXXFLAGS@
+ecos_INCLUDES = @ecos_INCLUDES@
+ecos_LDADD = @ecos_LDADD@
+ecos_LIBS = @ecos_LIBS@
+ecos_infra_incdir = @ecos_infra_incdir@
+ecos_infra_libdir = @ecos_infra_libdir@
+ecos_libcdl_incdir = @ecos_libcdl_incdir@
+ecos_libcdl_libdir = @ecos_libcdl_libdir@
+ecos_tk_includes = @ecos_tk_includes@
+ecos_tk_libs = @ecos_tk_libs@
+
+AUTOMAKE_OPTIONS = 1.3 foreign
+
+@SUPPORTED_TRUE@AM_CFLAGS = @SUPPORTED_TRUE@@ecos_CFLAGS@ -DECOSYNTH_VERSION=\"@VERSION@\" \
+@SUPPORTED_TRUE@ -DECOS_REPOSITORY=\"@ECOS_REPOSITORY@\" \
+@SUPPORTED_TRUE@ -DLIBEXECDIR=\"$(libexecdir)\" \
+@SUPPORTED_TRUE@ -DPACKAGE_DIR=\"@PACKAGE_DIR@\" \
+@SUPPORTED_TRUE@ -DPACKAGE_VERSION=\"@PACKAGE_VERSION@\" \
+@SUPPORTED_TRUE@ -DPACKAGE_INSTALL=\"@PACKAGE_INSTALL@\"
+@SUPPORTED_TRUE@AM_CXXFLAGS = @SUPPORTED_TRUE@@ecos_CXXFLAGS@
+@SUPPORTED_TRUE@INCLUDES = @SUPPORTED_TRUE@@ecos_INCLUDES@
+@SUPPORTED_TRUE@LIBS = @SUPPORTED_TRUE@@ecos_LIBS@ @ecos_LDADD@
+
+@SUPPORTED_TRUE@etherdir = @SUPPORTED_TRUE@$(libexecdir)/ecos/@PACKAGE_INSTALL@
+@SUPPORTED_TRUE@ether_PROGRAMS = @SUPPORTED_TRUE@rawether
+@SUPPORTED_TRUE@ether_DATA = @SUPPORTED_TRUE@ethernet.tcl ethernet.tdf netrecord.xbm
+
+@SUPPORTED_TRUE@rawether_SOURCES = @SUPPORTED_TRUE@rawether.c
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../../acsupport/mkinstalldirs
+CONFIG_CLEAN_FILES =
+@SUPPORTED_TRUE@ether_PROGRAMS = rawether$(EXEEXT)
+PROGRAMS = $(ether_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir)
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+@SUPPORTED_TRUE@rawether_OBJECTS = rawether.$(OBJEXT)
+rawether_LDADD = $(LDADD)
+rawether_DEPENDENCIES =
+rawether_LDFLAGS =
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DATA = $(ether_DATA)
+
+DIST_COMMON = Makefile.am Makefile.in acinclude.m4 aclocal.m4 configure \
+configure.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+DEP_FILES = .deps/rawether.P
+SOURCES = $(rawether_SOURCES)
+OBJECTS = $(rawether_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .o .obj .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
+ cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+mostlyclean-etherPROGRAMS:
+
+clean-etherPROGRAMS:
+ -test -z "$(ether_PROGRAMS)" || rm -f $(ether_PROGRAMS)
+
+distclean-etherPROGRAMS:
+
+maintainer-clean-etherPROGRAMS:
+
+install-etherPROGRAMS: $(ether_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(etherdir)
+ @list='$(ether_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(etherdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(etherdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+
+uninstall-etherPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ list='$(ether_PROGRAMS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(etherdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ done
+
+# FIXME: We should only use cygpath when building on Windows,
+# and only if it is available.
+.c.obj:
+ $(COMPILE) -c `cygpath -w $<`
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+ -rm -f *.$(OBJEXT)
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+rawether$(EXEEXT): $(rawether_OBJECTS) $(rawether_DEPENDENCIES)
+ @rm -f rawether$(EXEEXT)
+ $(LINK) $(rawether_LDFLAGS) $(rawether_OBJECTS) $(rawether_LDADD) $(LIBS)
+
+install-etherDATA: $(ether_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(etherdir)
+ @list='$(ether_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(etherdir)/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(etherdir)/$$p; \
+ else if test -f $$p; then \
+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(etherdir)/$$p"; \
+ $(INSTALL_DATA) $$p $(DESTDIR)$(etherdir)/$$p; \
+ fi; fi; \
+ done
+
+uninstall-etherDATA:
+ @$(NORMAL_UNINSTALL)
+ list='$(ether_DATA)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(etherdir)/$$p; \
+ done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ -rm -rf $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ dc_install_base=`cd $(distdir)/=inst && pwd`; \
+ cd $(distdir)/=build \
+ && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) dist
+ -rm -rf $(distdir)
+ @banner="$(distdir).tar.gz is ready for distribution"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"
+dist: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+dist-all: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+distdir: $(DISTFILES)
+ -rm -rf $(distdir)
+ mkdir $(distdir)
+ -chmod 777 $(distdir)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+
+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-include $(DEP_FILES)
+
+mostlyclean-depend:
+
+clean-depend:
+
+distclean-depend:
+ -rm -rf .deps
+
+maintainer-clean-depend:
+
+%.o: %.c
+ @echo '$(COMPILE) -c $<'; \
+ $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-cp .deps/$(*F).pp .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm .deps/$(*F).pp
+
+%.lo: %.c
+ @echo '$(LTCOMPILE) -c $<'; \
+ $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
+ < .deps/$(*F).pp > .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm -f .deps/$(*F).pp
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-etherPROGRAMS install-etherDATA
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-etherPROGRAMS uninstall-etherDATA
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(etherdir) $(DESTDIR)$(etherdir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-etherPROGRAMS mostlyclean-compile \
+ mostlyclean-tags mostlyclean-depend mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-etherPROGRAMS clean-compile clean-tags clean-depend \
+ clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-etherPROGRAMS distclean-compile distclean-tags \
+ distclean-depend distclean-generic clean-am
+
+distclean: distclean-am
+ -rm -f config.status
+
+maintainer-clean-am: maintainer-clean-etherPROGRAMS \
+ maintainer-clean-compile maintainer-clean-tags \
+ maintainer-clean-depend maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+ -rm -f config.status
+
+.PHONY: mostlyclean-etherPROGRAMS distclean-etherPROGRAMS \
+clean-etherPROGRAMS maintainer-clean-etherPROGRAMS \
+uninstall-etherPROGRAMS install-etherPROGRAMS mostlyclean-compile \
+distclean-compile clean-compile maintainer-clean-compile \
+uninstall-etherDATA install-etherDATA tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir \
+mostlyclean-depend distclean-depend clean-depend \
+maintainer-clean-depend info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+@SUPPORTED_TRUE@rawether.$(OBJEXT) : Makefile ../src/protocol.h
+
+@SUPPORTED_TRUE@install-data-hook:
+@SUPPORTED_TRUE@ chown root $(etherdir)/rawether
+@SUPPORTED_TRUE@ chmod u+s $(etherdir)/rawether
+
+@SUPPORTED_FALSE@install-data-hook:
+@SUPPORTED_FALSE@ echo Nothing to be done for this platform
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/acinclude.m4 b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/acinclude.m4
new file mode 100644
index 0000000000..f30c474825
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/acinclude.m4
@@ -0,0 +1,45 @@
+dnl Process this file with aclocal to get an aclocal.m4 file. Then
+dnl process that with autoconf.
+dnl ====================================================================
+dnl
+dnl acinclude.m4
+dnl
+dnl ====================================================================
+dnl####COPYRIGHTBEGIN####
+dnl
+dnl ----------------------------------------------------------------------------
+dnl Copyright (C) 2002 Bart Veer
+dnl
+dnl This file is part of the eCos host tools.
+dnl
+dnl This program is free software; you can redistribute it and/or modify it
+dnl under the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 of the License, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but WITHOUT
+dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+dnl more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along with
+dnl this program; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+dnl ----------------------------------------------------------------------------
+dnl
+dnl####COPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s): bartv
+dnl Contact(s): bartv
+dnl Date: 2002/08/07
+dnl Version: 0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+dnl Access shared macros.
+dnl AM_CONDITIONAL needs to be mentioned here or else aclocal does not
+dnl incorporate the macro into aclocal.m4
+sinclude(../../../../../../../acsupport/acinclude.m4)
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/aclocal.m4 b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/aclocal.m4
new file mode 100644
index 0000000000..af11c0c85f
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/aclocal.m4
@@ -0,0 +1,213 @@
+dnl aclocal.m4 generated automatically by aclocal 1.4-p6
+
+dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+dnl Process this file with aclocal to get an aclocal.m4 file. Then
+dnl process that with autoconf.
+dnl ====================================================================
+dnl
+dnl acinclude.m4
+dnl
+dnl ====================================================================
+dnl####COPYRIGHTBEGIN####
+dnl
+dnl ----------------------------------------------------------------------------
+dnl Copyright (C) 2002 Bart Veer
+dnl
+dnl This file is part of the eCos host tools.
+dnl
+dnl This program is free software; you can redistribute it and/or modify it
+dnl under the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 of the License, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but WITHOUT
+dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+dnl more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along with
+dnl this program; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+dnl ----------------------------------------------------------------------------
+dnl
+dnl####COPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s): bartv
+dnl Contact(s): bartv
+dnl Date: 2002/08/07
+dnl Version: 0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+dnl Access shared macros.
+dnl AM_CONDITIONAL needs to be mentioned here or else aclocal does not
+dnl incorporate the macro into aclocal.m4
+sinclude(../../../../../../../acsupport/acinclude.m4)
+
+# Define a conditional.
+
+AC_DEFUN([AM_CONDITIONAL],
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi])
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+# Copyright 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.4-p6])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "[$]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "[$]*" != "X $srcdir/configure conftestfile" \
+ && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "[$]2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN([AM_MISSING_PROG],
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+ $1=$2
+ AC_MSG_RESULT(found)
+else
+ $1="$3/missing $2"
+ AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
+
+# serial 1
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT($USE_MAINTAINER_MODE)
+ AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST(MAINT)dnl
+]
+)
+
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/configure b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/configure
new file mode 100755
index 0000000000..ef59e82c30
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/configure
@@ -0,0 +1,1994 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer"
+ac_help="$ac_help
+ --enable-debug do a debug rather than a release build"
+ac_help="$ac_help
+ --enable-ansi do an ANSI rather than a unicode build"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=rawether.c
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../../../../../acsupport $srcdir/../../../../../../../acsupport; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in ../../../../../../../acsupport $srcdir/../../../../../../../acsupport" 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+
+ echo $ac_n "checking that a separate build tree is being used""... $ac_c" 1>&6
+echo "configure:555: checking that a separate build tree is being used" >&5
+ ecos_cwd=`/bin/pwd`
+ if test "${srcdir}" = "." ; then
+ srcdir=${ecos_cwd}
+ fi
+ if test "${ecos_cwd}" = "${srcdir}" ; then
+ echo "$ac_t""no" 1>&6
+ { echo "configure: error: This configure script should not be run inside the source tree. Instead please use a separate build tree" 1>&2; exit 1; }
+ else
+ echo "$ac_t""yes" 1>&6
+ fi
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:574: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+am__api_version="1.4"
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:607: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:660: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "$*" != "X $srcdir/configure conftestfile" \
+ && test "$*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+ fi
+
+ test "$2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+else
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:717: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+PACKAGE=eCos_synthetic_target_ethernet
+
+VERSION=0.1
+
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
+
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
+echo "configure:756: checking for working aclocal-${am__api_version}" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
+ ACLOCAL=aclocal-${am__api_version}
+ echo "$ac_t""found" 1>&6
+else
+ ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:769: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+ AUTOCONF=autoconf
+ echo "$ac_t""found" 1>&6
+else
+ AUTOCONF="$missing_dir/missing autoconf"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
+echo "configure:782: checking for working automake-${am__api_version}" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
+ AUTOMAKE=automake-${am__api_version}
+ echo "$ac_t""found" 1>&6
+else
+ AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:795: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+ AUTOHEADER=autoheader
+ echo "$ac_t""found" 1>&6
+else
+ AUTOHEADER="$missing_dir/missing autoheader"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:808: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+ MAKEINFO=makeinfo
+ echo "$ac_t""found" 1>&6
+else
+ MAKEINFO="$missing_dir/missing makeinfo"
+ echo "$ac_t""missing" 1>&6
+fi
+
+
+echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
+echo "configure:822: checking whether to enable maintainer-specific portions of Makefiles" >&5
+ # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+ enableval="$enable_maintainer_mode"
+ USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
+
+
+if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+case "${host}" in
+ i[34567]86-*-linux-gnu* ) SUPPORTED="yes";;
+ * ) SUPPORTED="no"
+esac
+if test "${SUPPORTED}" = "no" ; then
+ echo "configure: warning: Synthetic target ethernet support is only available on x86 Linux hosts" 1>&2
+fi
+
+if test "${SUPPORTED}" = "yes" ; then
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:857: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:887: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:938: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:970: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 981 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1012: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1017: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1045: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
+ for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1081: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CXX="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CXX="$ac_cv_prog_CXX"
+if test -n "$CXX"; then
+ echo "$ac_t""$CXX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$CXX" && break
+done
+test -n "$CXX" || CXX="gcc"
+
+
+echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1113: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 1124 "configure"
+#include "confdefs.h"
+
+int main(){return(0);}
+EOF
+if { (eval echo configure:1129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cxx_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cxx_cross=no
+ else
+ ac_cv_prog_cxx_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cxx_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
+if test $ac_cv_prog_cxx_works = no; then
+ { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1155: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
+cross_compiling=$ac_cv_prog_cxx_cross
+
+echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
+echo "configure:1160: checking whether we are using GNU C++" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.C <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gxx=yes
+else
+ ac_cv_prog_gxx=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gxx" 1>&6
+
+if test $ac_cv_prog_gxx = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+
+ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ac_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS=
+echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
+echo "configure:1188: checking whether ${CXX-g++} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.cc
+if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
+ ac_cv_prog_cxx_g=yes
+else
+ ac_cv_prog_cxx_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS="$ac_save_CXXFLAGS"
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+
+for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat > conftest.$ac_ext <<EOF
+#line 1229 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+int main() {
+exit (42);
+; return 0; }
+EOF
+if { (eval echo configure:1237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ continue
+fi
+rm -f conftest*
+ cat > conftest.$ac_ext <<EOF
+#line 1247 "configure"
+#include "confdefs.h"
+$ac_declaration
+int main() {
+exit (42);
+; return 0; }
+EOF
+if { (eval echo configure:1254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+
+ echo $ac_n "checking for object suffix""... $ac_c" 1>&6
+echo "configure:1271: checking for object suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftest*
+echo 'int i = 1;' > conftest.$ac_ext
+if { (eval echo configure:1277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ for ac_file in conftest.*; do
+ case $ac_file in
+ *.c) ;;
+ *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
+ esac
+ done
+else
+ { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_objext" 1>&6
+OBJEXT=$ac_cv_objext
+ac_objext=$ac_cv_objext
+
+ echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:1295: checking for Cygwin environment" >&5
+if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1300 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
+; return 0; }
+EOF
+if { (eval echo configure:1311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_cygwin=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_cygwin=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_cygwin" 1>&6
+CYGWIN=
+test "$ac_cv_cygwin" = yes && CYGWIN=yes
+echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
+echo "configure:1328: checking for mingw32 environment" >&5
+if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1333 "configure"
+#include "confdefs.h"
+
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:1340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_mingw32=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_mingw32=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_mingw32" 1>&6
+MINGW32=
+test "$ac_cv_mingw32" = yes && MINGW32=yes
+
+
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:1359: checking for executable suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
+ ac_cv_exeext=.exe
+else
+ rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.$ac_ext
+ ac_cv_exeext=
+ if { (eval echo configure:1369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj) ;;
+ *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ else
+ { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ rm -f conftest*
+ test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
+
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
+
+
+ ecos_CFLAGS=""
+ ecos_CXXFLAGS=""
+ ecos_LDADD=""
+ ecos_INCLUDES=""
+ ecos_LIBS=""
+
+
+
+
+
+
+
+
+
+
+
+ echo $ac_n "checking "for Visual C++"""... $ac_c" 1>&6
+echo "configure:1407: checking "for Visual C++"" >&5
+ MSVC="no";
+ if test "${CC}" = "cl" ; then
+ MSVC="yes"
+ CXX="cl"
+ MSVC_SRCDIR=${srcdir}
+
+
+
+ if test "${MSVC}" = "yes" ; then
+ MSVC_SRCDIR=`cygpath -w ${MSVC_SRCDIR} | tr \\\\\\\\ /`
+ fi
+
+
+ ecos_INCLUDES="${ecos_INCLUDES} \"-I${MSVC_SRCDIR}\""
+ ecos_LDADD="-link"
+ ecos_LIBS="advapi32.lib"
+ fi
+
+
+if test "${MSVC}" = "yes"; then
+ MSVC_TRUE=
+ MSVC_FALSE='#'
+else
+ MSVC_TRUE='#'
+ MSVC_FALSE=
+fi
+ if test "${MSVC}" = "yes" ; then
+ echo "$ac_t""unfortunately yes" 1>&6
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+
+
+
+
+
+
+
+ echo $ac_n "checking "the default compiler flags"""... $ac_c" 1>&6
+echo "configure:1447: checking "the default compiler flags"" >&5
+
+ ecosflags_enable_debug="no"
+ # Check whether --enable-debug or --disable-debug was given.
+if test "${enable_debug+set}" = set; then
+ enableval="$enable_debug"
+ case "${enableval}" in
+ yes) ecosflags_enable_debug="yes" ;;
+ *) ecosflags_enable_debug="no" ;;
+ esac
+fi
+
+
+ ecosflags_enable_ansi="no"
+ if test "${MSVC}" = "yes" ; then
+ # Check whether --enable-ansi or --disable-ansi was given.
+if test "${enable_ansi+set}" = set; then
+ enableval="$enable_ansi"
+ case "${enableval}" in
+ yes) ecosflags_enable_ansi="yes" ;;
+ *) ecosflags_enable_ansi="no" ;;
+ esac
+fi
+
+ fi
+
+ if test "${GCC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -pipe -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -pipe -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Woverloaded-virtual"
+ elif test "${MSVC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -nologo -W3"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -nologo -W3 -GR -GX"
+ else
+ { echo "configure: error: "default flags for ${CC} are not known"" 1>&2; exit 1; }
+ fi
+
+ if test "${ecosflags_enable_debug}" = "yes" ; then
+ if test "${GCC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -g -O0"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -g -O0"
+ elif test "${MSVC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -MDd -Zi"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -MDd -Zi"
+ fi
+ else
+ if test "${GCC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -O0"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -O0"
+ elif test "${MSVC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -MD -O2"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -MD -O2"
+ fi
+ fi
+
+ CFLAGS="${ac_save_CFLAGS}"
+ CXXFLAGS="${ac_save_CXXFLAGS}"
+
+ echo "$ac_t""done" 1>&6
+
+
+
+ package_dir=`cd ${srcdir} && /bin/pwd`
+ PACKAGE_VERSION=`dirname ${package_dir}`
+ PACKAGE_VERSION=`basename ${PACKAGE_VERSION}`
+
+ package_dir=`dirname ${package_dir}`
+ package_dir=`dirname ${package_dir}`
+
+ possibles="${package_dir}/.. ${package_dir}/../.. ${package_dir}/../../.. ${package_dir}/../../../.."
+ possibles="${possibles} ${package_dir}/../../../../.. ${package_dir}/../../../../../.."
+
+ repository_root=""
+ for i in ${possibles}; do
+ if test -d "$i/"acsupport""; then
+ repository_root=$i
+ break
+ fi
+ done
+
+ if test "${repository_root}" = "" ; then
+ { echo "configure: error: Failed to identify this package's position within the eCos repository" 1>&2; exit 1; }
+ fi
+ ECOS_REPOSITORY=`cd "${repository_root}/packages/pkgconf/.." && /bin/pwd`
+
+ PACKAGE_DIR=`echo ${package_dir} | sed -e "s:${ECOS_REPOSITORY}/::"`
+
+ PACKAGE_INSTALL="${PACKAGE_DIR}/${PACKAGE_VERSION}"
+
+
+
+
+
+
+
+ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1542: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 1557 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1574 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 1591 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+for ac_hdr in "linux/if_tun.h"
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1625: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1630 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ TAP_SUPPORTED="yes"
+else
+ echo "$ac_t""no" 1>&6
+TAP_SUPPORTED="no"
+fi
+done
+
+ if test "${TAP_SUPPORTED}" = "no" ; then
+ echo "configure: warning: No <linux/if_tun.h> header, ethertap support disabled." 1>&2
+ fi
+fi
+
+if test "${SUPPORTED}" = "no" ; then
+ echo "configure: warning: The synthetic ethernet support cannot be built on this platform." 1>&2
+fi
+
+
+
+if test "${SUPPORTED}" = "yes"; then
+ SUPPORTED_TRUE=
+ SUPPORTED_FALSE='#'
+else
+ SUPPORTED_TRUE='#'
+ SUPPORTED_FALSE=
+fi
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "Makefile:Makefile.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
+s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
+s%@MAINT@%$MAINT%g
+s%@CC@%$CC%g
+s%@CXX@%$CXX%g
+s%@OBJEXT@%$OBJEXT%g
+s%@EXEEXT@%$EXEEXT%g
+s%@ecos_CFLAGS@%$ecos_CFLAGS%g
+s%@ecos_CXXFLAGS@%$ecos_CXXFLAGS%g
+s%@ecos_LDADD@%$ecos_LDADD%g
+s%@ecos_INCLUDES@%$ecos_INCLUDES%g
+s%@ecos_LIBS@%$ecos_LIBS%g
+s%@MSVC_SRCDIR@%$MSVC_SRCDIR%g
+s%@MSVC_TRUE@%$MSVC_TRUE%g
+s%@MSVC_FALSE@%$MSVC_FALSE%g
+s%@ECOS_REPOSITORY@%$ECOS_REPOSITORY%g
+s%@PACKAGE_DIR@%$PACKAGE_DIR%g
+s%@PACKAGE_VERSION@%$PACKAGE_VERSION%g
+s%@PACKAGE_INSTALL@%$PACKAGE_INSTALL%g
+s%@CPP@%$CPP%g
+s%@SUPPORTED_TRUE@%$SUPPORTED_TRUE%g
+s%@SUPPORTED_FALSE@%$SUPPORTED_FALSE%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile:Makefile.in"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/configure.in b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/configure.in
new file mode 100644
index 0000000000..ab25a7f61c
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/configure.in
@@ -0,0 +1,96 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl ====================================================================
+dnl
+dnl configure.in
+dnl
+dnl configure script for eCos synthetic target ethernet
+dnl host-side support
+dnl
+dnl ====================================================================
+dnl####COPYRIGHTBEGIN####
+dnl
+dnl ----------------------------------------------------------------------------
+dnl Copyright (C) 2002 Bart Veer
+dnl
+dnl This file is part of the eCos synthetic target support.
+dnl
+dnl This program is free software; you can redistribute it and/or modify it
+dnl under the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 of the License, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but WITHOUT
+dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+dnl more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along with
+dnl this program; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+dnl ----------------------------------------------------------------------------
+dnl
+dnl####COPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s): bartv
+dnl Contact(s): bartv
+dnl Date: 2002/08/07
+dnl Version: 0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+
+AC_INIT(rawether.c)
+
+dnl Pick up the support files from the top-level acsupport directory.
+AC_CONFIG_AUX_DIR(../../../../../../../acsupport)
+
+ECOS_CHECK_BUILD_ne_SRC
+AC_CANONICAL_HOST
+AM_INIT_AUTOMAKE(eCos_synthetic_target_ethernet,0.1,0)
+AM_MAINTAINER_MODE
+
+dnl The current version of the synthetic target is implemented only for
+dnl x86 Linux platforms, so a test is appropriate here. However
+dnl it is not a good idea for the configure script to report an error:
+dnl that would prevent any top-level configury working for other
+dnl platforms. Instead an automake conditional is used to suppress adding
+dnl targets to the build.
+case "${host}" in
+ i[[34567]]86-*-linux-gnu* ) SUPPORTED="yes";;
+ * ) SUPPORTED="no"
+esac
+if test "${SUPPORTED}" = "no" ; then
+ AC_MSG_WARN([Synthetic target ethernet support is only available on x86 Linux hosts])
+fi
+
+if test "${SUPPORTED}" = "yes" ; then
+ AC_PROG_CC
+ AC_PROG_CXX
+ AC_OBJEXT
+ AC_EXEEXT
+ ECOS_PROG_MSVC
+ ECOS_PROG_STANDARD_COMPILER_FLAGS
+ ECOS_PACKAGE_DIRS
+
+ dnl Old kernels may not have tun/tap support. rawether can
+ dnl still operate via a spare ethernet interface.
+ AC_CHECK_HEADERS("linux/if_tun.h",TAP_SUPPORTED="yes",TAP_SUPPORTED="no")
+ if test "${TAP_SUPPORTED}" = "no" ; then
+ AC_MSG_WARN([No <linux/if_tun.h> header, ethertap support disabled.])
+ fi
+fi
+
+if test "${SUPPORTED}" = "no" ; then
+ AC_MSG_WARN([The synthetic ethernet support cannot be built on this platform.])
+fi
+
+AM_CONDITIONAL(SUPPORTED, test "${SUPPORTED}" = "yes")
+
+dnl There is no real need for a config.h file at this time, since the code
+dnl is specific to x86 Linux. This may change in future.
+dnl AM_CONFIG_HEADER(config.h:config.h.in)
+
+AC_OUTPUT(Makefile:Makefile.in)
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/ethernet.tcl b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/ethernet.tcl
new file mode 100644
index 0000000000..991c816230
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/ethernet.tcl
@@ -0,0 +1,1226 @@
+# {{{ Banner
+
+# ============================================================================
+#
+# ethernet.tcl
+#
+# Ethernet support for the eCos synthetic target I/O auxiliary
+#
+# ============================================================================
+# ####COPYRIGHTBEGIN####
+#
+# ----------------------------------------------------------------------------
+# Copyright (C) 2002 Bart Veer
+#
+# This file is part of the eCos host tools.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# ----------------------------------------------------------------------------
+#
+# ####COPYRIGHTEND####
+# ============================================================================
+# #####DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Contact(s): bartv
+# Date: 2002/08/07
+# Version: 0.01
+# Description:
+# Implementation of the ethernet device. This script should only ever
+# be run from inside the ecosynth auxiliary.
+#
+# ####DESCRIPTIONEND####
+# ============================================================================
+
+# }}}
+
+# Overview.
+#
+# Linux provides a number of different ways of performing low-level
+# ethernet I/O from user space, including accessing an otherwise
+# unused ethernet card via a PF_PACKET socket, and the tap facility.
+# The necessary functionality is not readily accessible from Tcl,
+# and performing this low-level I/O generally requires special
+# privileges. Therefore the actual I/O happens in a C program
+# rawether, installed suid root,
+#
+# The synthetic ethernet package supports up to four ethernet devices,
+# eth0 to eth3. The target definition file maps these onto the
+# underlying I/O facility. Instantiation requires spawning a rawether
+# process with appropriate arguments, and then waiting for a message
+# from that process indicating whether or not the instantiation
+# succeeded. That message includes the MAC address. A file event
+# handler is installed to handle data detected by raw ether.
+#
+# eCos can send a number of requests: transmit a packet, start the
+# interface (possibly in promiscuous mode), stop the interface,
+# or get the various parameters such as the MAC address. All those
+# requests can just be passed on to the rawether process. Incoming
+# ethernet packets are slightly more complicated: rawether will
+# immediately pass these up to this Tcl script, which will buffer
+# the packets until they are requested by eCos; in addition an
+# interrupt will be raised.
+
+namespace eval ethernet {
+ # The protocol between eCos and this script.
+ variable SYNTH_ETH_TX 0x01
+ variable SYNTH_ETH_RX 0x02
+ variable SYNTH_ETH_START 0x03
+ variable SYNTH_ETH_STOP 0x04
+ variable SYNTH_ETH_GETPARAMS 0x05
+ variable SYNTH_ETH_MULTIALL 0x06
+
+ # This array holds all the interesting data for all the
+ # interfaces, indexed by the instance id. It is also useful
+ # to keep track of the instance id's associated with ethernet
+ # devices.
+ array set data [list]
+ set ids [list]
+
+ # One-off initialization, for example loading images. If this fails
+ # then all attempts at instantiation will fail as well.
+ variable init_ok 1
+ variable install_dir $synth::device_install_dir
+ variable rawether_executable [file join $ethernet::install_dir "rawether"]
+
+ if { ![file exists $rawether_executable] } {
+ synth::report_error "Ethernet device, rawether executable has not been installed in $ethernet::install_dir.\n"
+ set init_ok 0
+ } elseif { ![file executable $rawether_executable] } {
+ synth::report_error "Ethernet device, installed program $rawether_executable is not executable.\n"
+ set init_ok 0
+ }
+
+ if { $synth::flag_gui } {
+ foreach _image [list "netrecord.xbm"] {
+ variable image_[file rootname $_image]
+ if { ! [synth::load_image "ethernet::image_[file rootname $_image]" [file join $ethernet::install_dir $_image]] } {
+ set init_ok 0
+ }
+ }
+ unset _image
+ }
+
+ # Maximum number of packets that should be buffered per interface.
+ # This can be changed in the target definition
+ variable max_buffered_packets 16
+
+ if { [synth::tdf_has_option "ethernet" "max_buffer"] } {
+ set ethernet::max_buffered_packets [synth::tdf_get_option "ethernet" "max_buffer"]
+ if { ![string is integer -strict $ethernet::max_buffered_packets] } {
+ synth::report_error "Ethernet device, invalid value in target definition file $synth::target_definition\n \
+ Entry max_buffer should be a simple integer, not $ethernet::max_buffered_packets\n"
+ set init_ok 0
+ }
+ }
+
+ # Define hooks for tx and rx packets
+ synth::hook_define "ethernet_tx"
+ synth::hook_define "ethernet_rx"
+
+ # Get a list of known ethernet devices
+ proc devices_get_list { } {
+ set result [list]
+ foreach id $ids {
+ lappend result $::ethernet::data($id,name)
+ }
+ return $result
+ }
+
+ # ----------------------------------------------------------------------------
+ proc instantiate { id name data } {
+ if { ! $ethernet::init_ok } {
+ synth::report_warning "Cannot instantiate ethernet device $name, initialization failed.\n"
+ return ""
+ }
+
+ # id is a small number that uniquely identifies this device. It will
+ # be used as an array index.
+ # name is something like eth0 or eth1
+ # There should be no device-specific data
+
+ # The hard work is done by an auxiliary process which needs to be
+ # spawned off. It requires some additional information to map the
+ # eCos device name on to a suitable Linux network device such
+ # as tap0. That information has to come from the config file.
+ if { ![synth::tdf_has_option "ethernet" $name] } {
+ synth::report_error "Cannot instantiate ethernet device $name\n \
+ No entry in target definition file $synth::target_definition\n"
+ return ""
+ }
+ set use [synth::tdf_get_option "ethernet" $name]
+
+ # Do some validation here, before the rawether process is started.
+ # Typical entries would look like
+ # eth0 real eth1
+ # eth1 ethertap [[tap-device] [MAC] [persistent]]
+ set junk ""
+ set optional ""
+ set mac ""
+ if { [regexp -- {^\s*real\s*[a-zA-z0-9_]+$} $use] } {
+ # Real ethernet.
+ } elseif { [regexp -- {^\s*ethertap\s*(.*)$} $use junk optional ] } {
+ if { "" != $optional } {
+ if { ! [regexp -- {^tap[0-9]+\s*(.*)$} $optional junk mac ] } {
+ synth::report_error "Cannot instantiate ethernet device $name\n \
+ Invalid entry \"$use\" in target definition file $synth::target_definition\n \
+ Should be \"ethertap \[<tap-device> \[<MAC address>\]\] [persistent]\"\n"
+ return ""
+ }
+ if { "" != $mac } {
+ if { ! [regexp -- {^\s*([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}\s*} $mac ] } {
+ synth::report_error "Cannot instantiate ethernet device $name\n \
+ Invalid entry \"$use\" in target definition file $synth::target_definition\n \
+ MAC address should be of the form xx:xx:xx:xx:xx:xx, all hexadecimal digits.\n"
+ return ""
+ }
+ }
+ }
+ } else {
+ synth::report_error "Cannot instantiate ethernet device $name\n \
+ Invalid entry \"$use\" in target definition file $synth::target_definition\n \
+ Should be \"real <Linux ethernet device>\" or \"ethertap \[<tap-device> \[<MAC address>\]\]\"\n"
+ return ""
+ }
+
+ # Now spawn the rawether process. Its stdin and stdout are
+ # pipes connected to ecosynth. Its stderr is redirected to
+ # the current tty to avoid confusion between incoming ethernet
+ # packets and diagnostics.
+ if { [catch { set rawether [open "|$ethernet::rawether_executable $use 2>/dev/tty" w+] } message ] } {
+ synth::report_error "Failed to spawn rawether process for device $name\n $message"
+ return ""
+ }
+
+ # No translation on this pipe please.
+ fconfigure $rawether -translation binary -encoding binary -buffering none
+
+ # Now wait for the rawether device to initialize. It should send back a single
+ # byte, '0' for failure or '1' for success. Failure is followed by a text
+ # message which should be reported. Success is followed by a six-byte MAC
+ # address.
+ set reply [read $rawether 1]
+ if { "" == $reply } {
+ synth::report_error "rawether process for device $name exited unexpectedly.\n"
+ catch { close $rawether }
+ return ""
+ }
+
+ if { "1" != $reply } {
+ set message [read $rawether 1024]
+ synth::report_error "rawether process was unable to initialize eCos device $name ($use)\n $message"
+ catch { close $rawether }
+ return ""
+ }
+
+ set reply [read $rawether 7]
+ if { [string length $reply] != 7 } {
+ synth::report_error "rawether process for eCos device $name ($use) failed to provide the initialization response.\n"
+ catch { close $rawether }
+ return ""
+ }
+ set mac [string range $reply 0 5]
+ set multi [string index $reply 6]
+
+ # Finally allocate an interrupt vector
+ set vector [synth::interrupt_allocate $name]
+ if { -1 == $vector } {
+ # No more interrupts left. An error will have been reported already.
+ catch { close $rawether }
+ return ""
+ }
+
+ # The device is up and running. Fill in the array entries
+ lappend ethernet::ids $id
+ set ethernet::data($id,alive) 1
+ set ethernet::data($id,name) $name
+ set ethernet::data($id,rawether) $rawether
+ set ethernet::data($id,packets) [list]
+ set ethernet::data($id,packet_count) 0
+ set ethernet::data($id,up) 0
+ set ethernet::data($id,interrupt_vector) $vector
+ set ethernet::data($id,MAC) $mac
+ set ethernet::data($id,multi) $multi
+
+ # Set up the event handler to handle incoming packets. There should
+ # not be any until the interface is brought up
+ fileevent $rawether readable [list ethernet::handle_packet $name $id $rawether]
+
+ # Finally return the request handler. The eCos device driver will
+ # automatically get back an ack.
+ return ethernet::handle_request
+ }
+
+ # ----------------------------------------------------------------------------
+ # eCos has sent a request to a device instance. Most of these requests should
+ # just be forwarded to rawether. Some care has to be taken to preserve
+ # packet boundaries and avoid confusion. It is also necessary to worry
+ # about the rawether process exiting unexpectedly, which may cause
+ # puts operations to raise an error (subject to buffering).
+ #
+ # Note: it might actually be more efficient to always send a header plus
+ # 1514 bytes of data, reducing the number of system calls at the cost of
+ # some extra data copying, but with at least two process switches per
+ # ethernet transfer efficiency is not going to be particularly good
+ # anyway.
+
+ proc send_rawether { id packet } {
+ if { $ethernet::data($id,alive) } {
+ set chan $ethernet::data($id,rawether)
+ if { [catch { puts -nonewline $chan $packet } ] } {
+ set ethernet::data($id,alive) 0
+ # No further action is needed here, instead the read handler
+ # will detect EOF and report abnormal termination.
+ }
+ }
+ }
+
+ proc handle_request { id reqcode arg1 arg2 reqdata reqlen reply_len } {
+
+ if { $reqcode == $ethernet::SYNTH_ETH_TX } {
+ # Transmit a single packet. To preserve packet boundaries
+ # this involves a four-byte header containing opcode and
+ # size, followed by the data itself.
+ set header [binary format "ccs" $reqcode 0 [string length $reqdata]]
+ ethernet::send_rawether $id $header
+ ethernet::send_rawether $id $reqdata
+ if { $ethernet::logging_enabled } {
+ ethernet::log_packet $ethernet::data($id,name) "tx" $reqdata
+ }
+ synth::hook_call "ethernet_tx" $ethernet::data($id,name) $reqdata
+
+ } elseif { $reqcode == $ethernet::SYNTH_ETH_RX } {
+ # Return a single packet to eCos, plus a count of the number
+ # of remaining packets. All packets are buffered here, not
+ # in rawether.
+ if { $ethernet::data($id,packet_count) == 0 } {
+ synth::send_reply 0 0 ""
+ } else {
+ incr ethernet::data($id,packet_count) -1
+ set packet [lindex $ethernet::data($id,packets) 0]
+ set ethernet::data($id,packets) [lrange $ethernet::data($id,packets) 1 end]
+ synth::send_reply $ethernet::data($id,packet_count) [string length $packet] $packet
+ if { $ethernet::logging_enabled } {
+ ethernet::log_packet $ethernet::data($id,name) "rx" $packet
+ }
+ synth::hook_call "ethernet_rx" $ethernet::data($id,name) $packet
+ }
+ } elseif { $reqcode == $ethernet::SYNTH_ETH_START } {
+ # Start the interface in either normal or promiscuous
+ # mode, depending on arg1. No reply is expected. Also
+ # mark the interface as up so that any packets transmitted
+ # by rawether will not be discarded
+ set ethernet::data($id,up) 1
+ set header [binary format "ccs" $reqcode $arg1 0]
+ ethernet::send_rawether $id $header
+ } elseif { $reqcode == $ethernet::SYNTH_ETH_STOP } {
+ # Stop the interface. All pending packets should be
+ # discarded and no new packets should be accepted.
+ # No reply is expected so just pass this on to rawether
+ set ethernet::data($id,up) 0
+ set ethernet::data($id,packets) [list]
+ set ethernet::data($id,packet_count) 0
+ set header [binary format "ccs" $reqcode 0 0]
+ ethernet::send_rawether $id $header
+ } elseif { $reqcode == $ethernet::SYNTH_ETH_GETPARAMS } {
+ # Retrieve the interrupt number, the MAC address,
+ # and the multicast flag for this interface. eCos should be
+ # expecting back 6 bytes of data for the MAC, plus an
+ # extra byte for the multi flag, and the interrupt
+ # number as the return code. This is all known locally.
+ set reply "$ethernet::data($id,MAC)$ethernet::data($id,multi)"
+ synth::send_reply $ethernet::data($id,interrupt_vector) 7 $reply
+ } elseif { $reqcode == $ethernet::SYNTH_ETH_MULTIALL } {
+ set header [binary format "ccs" $reqcode $arg1 0]
+ ethernet::send_rawether $id $header
+ } else {
+ synth::report_error "Received unexpected request $reqcode for ethernet device"
+ }
+ }
+
+ # ----------------------------------------------------------------------------
+ # Incoming data.
+ #
+ # The rawether process continually reads packets from the low-level device
+ # and tries to forward them on to this script, where they will be received
+ # by an event handler. The packet consists of a four-byte header containing
+ # the size, followed by the ethernet data itself. This ensures that
+ # packet boundaries are preserved. Incoming packets are buffered inside
+ # the auxiliary until eCos sends an RX request, and an interrupt is
+ # generated.
+ #
+ # If eCos stops accepting data or if it cannot process the ethernet packets
+ # quickly enough then the auxiliary could end up buffering an unbounded
+ # amount of data. That is a bad idea, so there is an upper bound on the
+ # number of buffered packets. Any excess packets get dropped.
+ #
+ # Error conditions or EOF indicate that rawether has terminated. This
+ # should not happen during normal operation. rawether should only exit
+ # because of an ecos_exit hook when the channel gets closed, and the
+ # event handler gets removed first.
+ #
+ # Incoming packets are logged when they are received by eCos, not when
+ # they are received from the rawether device. That gives a somewhat more
+ # accurate view of what is happening inside eCos - a packet stuck in
+ # a fifo has little impact.
+ proc _handle_packet_error { msg id } {
+ append msg " No further I/O will happen on this interface.\n"
+ synth::report_warning $msg
+ set ethernet::data($id,alive) 0
+ fileevent $ethernet::data($id,rawether) readable ""
+ catch { close $ethernet::data($id,rawether) }
+ }
+
+ proc handle_packet { name id chan } {
+ set header [read $chan 4]
+ if { 4 != [string length $header] } {
+ ethernet::_handle_packet_error "rawether process for $name has terminated unexpectedly.\n" $id
+ return
+ }
+
+ binary scan $header "ccs" code arg1 len
+ if { $ethernet::SYNTH_ETH_RX != $code } {
+ set msg "protocol mismatch from rawether process for $name\n"
+ append msg " Function code $code not recognised.\n"
+ ethernet::_handle_packet_error $msg $id
+ return
+ }
+ if { ($len < 14) || ($len > 1514) } {
+ set msg "protocol mismatch from rawether process for $name\n"
+ append msg " Invalid transfer length $len\n"
+ ethernet::_handle_packet_error $msg $id
+ return
+ }
+
+ set data [read $chan $len]
+ if { $len != [string length $data] } {
+ set msg "protocol mismatch from rawether process for $name\n"
+ append msg " Expected $len byte ethernet packet, received [string length $data] bytes\n"
+ ethernet::_handle_packet_error $msg $id
+ return
+ }
+
+ # The data has been received correctly. Should it be buffered?
+ if { !$ethernet::data($id,up) } {
+ return
+ }
+ if { $ethernet::data($id,packet_count) >= $ethernet::max_buffered_packets } {
+ return
+ }
+
+ # Store the packet, and inform eCos there is work to be done
+ lappend ethernet::data($id,packets) $data
+ incr ethernet::data($id,packet_count)
+ synth::interrupt_raise $ethernet::data($id,interrupt_vector)
+
+ }
+
+ # ----------------------------------------------------------------------------
+ # When eCos has exited, the rawether processes can and should be
+ # shut down immediately.
+ proc ecos_exited { arg_list } {
+ foreach id $ethernet::ids {
+ if { $ethernet::data($id,alive) } {
+ set ethernet::data($id,alive) 0
+ fileevent $ethernet::data($id,rawether) readable ""
+ catch { close $ethernet::data($id,rawether) }
+ }
+ }
+ }
+ synth::hook_add "ecos_exit" ethernet::ecos_exited
+
+ # ----------------------------------------------------------------------------
+ # Read in various data files for use by the filters
+ #
+ # Other possible sources of information include arp, ypcat, and
+ # dns. Those are avoided for now because they involve running
+ # additional processes that might hang for a while. Also arp
+ # would only give useful information for very recently accessed
+ # machines, NIS might not be running, and dns could involve an
+ # expensive lookup while the system is running .
+
+ array set services [list]
+ array set hosts [list]
+ array set protocols [list]
+
+ proc read_services { } {
+ catch {
+ set fd [open "/etc/services" "r"]
+ while { -1 != [gets $fd line] } {
+ set junk ""
+ set name ""
+ set number ""
+ set protocol ""
+ if { [regexp -- {^([-a-zA-Z0-9_]+)\s*([0-9]+)/((?:tcp)|(?:udp)).*$} $line junk name number protocol] } {
+ set ethernet::services($number,$protocol) $name
+ }
+ }
+ close $fd
+ }
+ }
+
+ proc read_protocols { } {
+ catch {
+ set fd [open "/etc/protocols" "r"]
+ while { -1 != [gets $fd line] } {
+ set junk ""
+ set name ""
+ set number ""
+ if { [regexp -- {^([-a-zA-Z0-9_]+)\s*([0-9]+)\s.*} $line junk name number] } {
+ set ethernet::protocols($number) $name
+ }
+ }
+ close $fd
+ }
+ }
+
+ proc read_hosts { } {
+ catch {
+ set fd [open "/etc/hosts" "r"]
+ while { -1 != [gets $fd line] } {
+ set junk ""
+ set name ""
+ set number ""
+
+ # Deliberately ignore parts of the name after the first .
+ if { [regexp -- {^([0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3})\s*([a-zA-Z0-9]+)(\.|\s|$)} $line junk number name] } {
+ # The number should be naturalized if it is going to match reliably
+ scan $line "%d.%d.%d.%d" a b c d
+ set index [expr (($a & 0x0FF) << 24) | (($b & 0x0FF) << 16) | (($c & 0x0FF) << 8) | ($d & 0x0FF)]
+ set ethernet::hosts($index) $name
+ }
+ }
+ close $fd
+ }
+ }
+
+ # ----------------------------------------------------------------------------
+ # Filtering support. This is only really used when running in GUI mode.
+ # However all the relevant options are still extracted and validated,
+ # to avoid warnings about unrecognised options.
+
+ variable logging_enabled 0
+ variable max_show 64
+
+ # Construct a string for the data, either all of it or up to max_show bytes.
+ # This is just hex in chunks of four bytes.
+ proc format_hex_data { data } {
+ set result ""
+
+ set len [string length $data]
+ if { $len > $ethernet::max_show } {
+ set len $ethernet::max_show
+ }
+ binary scan $data "H[expr 2 * $len]" hex
+ for { set i 0 } { $i < $len } { incr i 4 } {
+ append result "[string range $hex [expr $i * 2] [expr ($i * 2) + 7]] "
+ }
+ set result [string trimright $result]
+ return $result
+ }
+
+ # Given an IPv4 network address, turn it into a.b.c.d and the
+ # host name as well (if known). The argument should be a 32-bit
+ # integer.
+ proc inet_ipv4_ntoa { number } {
+ set result [format "%d.%d.%d.%d" [expr ($number >> 24) & 0x0FF] [expr ($number >> 16) & 0x0FF] \
+ [expr ($number >> 8) & 0x0FF] [expr $number & 0x0FF]]
+ if { [info exists ethernet::hosts($number) ] } {
+ append result "($ethernet::hosts($number))"
+ }
+ return $result
+ }
+
+ # Given an ipv4 address encapsulated in an IPv6 address, do the necessary
+ # conversion. We have something like 123:4567, we want a.b.c.d plus
+ # a host address.
+ proc inet_ipv4_in_ipv6_ntoa { top bottom } {
+ if { "" == $top } {
+ set top 0
+ }
+ if { "" == $bottom } {
+ set bottom 0
+ }
+ set top "0x$top"
+ set bottom "0x$bottom"
+
+ set ipv4 [expr ($top << 16) | $bottom]
+ return inet_ipv4_ntoa $ipv4
+ }
+
+ # Ditto for IPv6. The argument should be a 32-digit hexadecimal string.
+ # For now there is no simple way of mapping these onto host names,
+ # unless the address is an IPv4-mapped or compatible one, or one of
+ # special cases such as loopback.
+ proc inet_ipv6_ntoa { number } {
+ # We have something like 12345678abcdef. Start by inserting the appropriate
+ # colons.
+ set result [format "%s:%s:%s:%s:%s:%s:%s:%s" [string range $number 0 3] [string range $number 4 7] \
+ [string range $number 8 11] [string range $number 12 15] [string range $number 16 19] \
+ [string range $number 20 23] [string range $number 24 27] [string range $number 28 31]]
+ # Now eliminate unwanted 0's at the start of each range.
+ regsub {^0+} $result {} result
+ regsub -all {:0+} $result {:} result
+
+ # If we have ended up with sequences of colons, abbreviate
+ # them into pairs.
+ regsub -all {::+} $result {::} result
+
+ # There are a couple of special addresses
+ if { "::1" == $result } {
+ return "::1(loopback)"
+ } elseif { "::" == $result } {
+ return "::(IN6ADDR_ANY)"
+ }
+
+ # Look for IPv4-mapped addresses.
+ set junk ""
+ set ipv4_1 ""
+ set ipv4_2 ""
+ if { [regexp -nocase -- {::ffff:([0-9a-f]{0,3}):([0-9a-f]{0,3})$} $result junk ipv4_1 ipv4_2] } {
+ set result [inet_ipv4_in_ipv6_nto $ipv4_1 $ipv4_2]
+ return "::FFFF:$result"
+ } elseif { [regexp -nocase -- {::([0-9a-f]{0,3}):([0-9a-f]{0,3})$} $result junk ipv4_1 ipv4_2] } {
+ set result [inet_ipv4_in_ipv6_nto $ipv4_1 $ipv4_2]
+ return "::$result"
+ } else {
+ # Could still be aggregatable global unicast, link-local, site-local or multicast.
+ # But not decoded further for now.
+ return $result
+ }
+ }
+
+ proc log_packet { device direction packet } {
+ if { [string length $packet] < 14 } {
+ return
+ }
+ binary scan $packet {H2H2H2H2H2H2 H2H2H2H2H2H2 S} dest5 dest4 dest3 dest2 dest1 dest0 src5 src4 src3 src2 src1 src0 eth_protocol
+ set packet [string range $packet 14 end]
+
+ set ether_msg "$device $direction: [string length $packet] bytes, "
+ append ether_msg [format ">%s:%s:%s:%s:%s:%s <%s:%s:%s:%s:%s:%s" $dest5 $dest4 $dest3 $dest2 $dest1 $dest0 $src5 $src4 $src3 $src2 $src1 $src0]
+ set eth_protocol [expr $eth_protocol & 0x0FFFF]
+ if { $eth_protocol <= 1536 } {
+ append ether_msg " 802.3 "
+ if { [string length $packet] < 8 } {
+ return
+ }
+ binary scan $packet {a6 S} junk eth_protocol
+ set packet [string range $packet 8 end]
+ }
+ append ether_msg [format " %04x" $eth_protocol]
+ if { $eth_protocol == 0x0800 } {
+ append ether_msg "(ip)"
+ } elseif { $eth_protocol == 0x00806 } {
+ append ether_msg "(arp)"
+ } elseif { $eth_protocol == 0x08035 } {
+ append ether_msg "(rarp)"
+ }
+ append ether_msg " [ethernet::format_hex_data $packet]\n"
+ synth::output $ether_msg "eth_ether"
+
+ if { 0x0806 == $eth_protocol } {
+ # An ARP request. This should always be 28 bytes.
+ if { [string length $packet] < 28 } {
+ return
+ }
+ binary scan $packet {SSccS H2H2H2H2H2H2 I H2H2H2H2H2H2 I} hard_type prot_type hard_size prot_size op \
+ sender5 sender4 sender3 sender2 sender1 sender0 sender_ip \
+ target5 target4 target3 target2 target1 target0 target_ip
+ set hard_type [expr $hard_type & 0x0FFFF]
+ set prot_type [expr $prot_type & 0x0FFFF]
+ set hard_size [expr $hard_size & 0x0FF]
+ set prot_size [expr $prot_size & 0x0FF]
+ set op [expr $op & 0x0FFFF]
+ set sender_ip [expr $sender_ip & 0x0FFFFFFFF]
+ set target_ip [expr $target_ip & 0x0FFFFFFFF]
+
+ set arp_msg "$device $direction: ARP "
+ if { $op == 1 } {
+ append arp_msg "request "
+ } elseif { $op == 2 } {
+ append arp_msg "reply "
+ } else {
+ append_arp_msg "<unknown opcode> "
+ }
+ if { $hard_type != 1 } {
+ append arp_msg "(unexpected hard_type field $hard_type, should be 1) "
+ }
+ if { $prot_type != 0x0800 } {
+ append arp_msg "(unexpected prot_type field $prot_type, should be 0x0800) "
+ }
+ if { $hard_size != 6 } {
+ append arp_msg "(unexpected hard_size field $hard_size, should be 6) "
+ }
+ if { $prot_size != 4 } {
+ append arp_msg "(unexpected prot_size field $prot_size, should be 4) "
+ }
+ append arp_msg [format ", sender %s:%s:%s:%s:%s:%s " $sender5 $sender4 $sender3 $sender2 $sender1 $sender0]
+ append arp_msg [ethernet::inet_ipv4_ntoa $sender_ip]
+ append arp_msg [format ", target %s:%s:%s:%s:%s:%s " $target5 $target4 $target3 $target2 $target1 $target0]
+ append arp_msg [ethernet::inet_ipv4_ntoa $target_ip]
+ append arp_msg "\n"
+
+ synth::output $arp_msg "eth_arp"
+ return
+ }
+
+ if { 0x0800 != $eth_protocol } {
+ return
+ }
+
+ # We have an IP packet. Is this IPv4 or IPv6? The first byte contains
+ # the version and the overall length of the IP header in 32-bit words
+ if { [string length $packet] < 20 } {
+ return
+ }
+ binary scan $packet {c} tmp
+ set ip_version [expr ($tmp >> 4) & 0x0F]
+ set ip_hdrsize [expr $tmp & 0x0F]
+ if { 4 == $ip_version } {
+ binary scan $packet {ccSSSccSII} tmp tos len id frag ttl ip_protocol checksum source_ip dest_ip
+ set ipv4_msg "$device $direction: IPv4"
+ if { 0 != $tos } {
+ append ipv4_msg [format " tos %02x," [expr $tos & 0x0FF]]
+ }
+ append ipv4_msg [format " len %d, id %d," [expr $len & 0x0FFFF] [expr $id & 0x0FFFF]]
+ if { 0 != $frag } {
+ append ipv4_msg [format " frag %u" [expr 8 * ($frag & 0x01FFF)]]
+ if { 0 != ($frag & 0x04000) } {
+ append ipv4_msg " DF"
+ }
+ if { 0 != ($frag & 0x02000) } {
+ append ipv4_msg " MF"
+ }
+ append ipv4_msg ","
+ }
+ append ipv4_msg [format " ttl %d," $ttl]
+ set ip_protocol [expr $ip_protocol & 0x0FF]
+ if { [info exists ethernet::protocols($ip_protocol)] } {
+ append ipv4_msg " $ethernet::protocols($ip_protocol),"
+ } else {
+ append ipv4_msg [format " protocol %d" $ip_protocol]
+ }
+
+ set source_name [ethernet::inet_ipv4_ntoa $source_ip]
+ set dest_name [ethernet::inet_ipv4_ntoa $dest_ip]
+ append ipv4_msg " >${dest_name}, <${source_name}\n"
+
+ synth::output $ipv4_msg "eth_ipv4"
+
+ # If this packet is a fragment other than the first, do not try to decode
+ # subsequent packets. The header information will not be present.
+ if { 0 != ($frag & 0x01FFF)} {
+ return
+ }
+ set packet [string range $packet [expr 4 * $ip_hdrsize] end]
+
+ } elseif { 6 == $ip_version } {
+ if { [string length $packet] < 40 } {
+ return
+ }
+ binary scan $packet {ISccH16H16} flow payload_length next_header hop_limit source_ip dest_ip
+ set ipv6_msg "$device $direction: IPv6"
+ set prio [expr ($flow & 0x0F000000) >> 24]
+ set flow [expr $flow & 0x00FFFFFF]
+ if { 0 != $flow } {
+ append ipv6_msg [format " flow %04x prio %x," $flow $prio]
+ }
+ append ipv6_msg " payload [expr $payload bytes & 0x0FFFF],"
+ append ipv6_msg " hop limit [expr $hop_limit & 0x0FF],"
+ set next_header [expr $next_header & 0x0FF]
+ if { [info exists ethernet::protocols($next_header)] } {
+ append ipv6_msg " $ethernet::protocols($next_header),"
+ } else {
+ append ipv6_msg [format " protocol %d," $next_header]
+ }
+
+ set source_name [ethernet::inet_ipv6_ntoa $source_ip]
+ set dest_name [ethernet::inet_ipv6_ntoa $dest_ip]
+ append ipv6_msg " >${dest_name}, <${source_name}\n"
+
+ synth::output $ipv6_msg "eth_ipv6"
+
+ set packet [string range $packet 40 end]
+
+ } else {
+ synth::output "$device $direction: unknown IP version $ip_version\n" "eth_ipv4"
+ return
+ }
+
+
+ # Now for some known protocols, icmp, tcp, udp and icmpv6
+ # Possible ipv6-frag should be handled here as well. The
+ # fragment header should be followed by another header such
+ # as tcp or udp.
+ if { 1 == $ip_protocol } {
+ # ipv4 ICMP
+ if { [string length $packet] < 4 } {
+ return
+ }
+ binary scan $packet {ccS} code type checksum
+
+ set icmpv4_msg "$device $direction: ICMPv4 "
+ set error 0
+ set data 0
+ switch -- $code {
+ 0 {
+ append icmpv4_msg "ping reply"
+ if { [string length $packet] >= 8 } {
+ # The id and seq are in the sender's format, not network format.
+ # We have to assume either little or bigendian, so go for the former
+ binary scan $packet {iss} junk id seq
+ append icmpv4_msg [format " id %u, seq %u" [expr $id & 0x0FFFF] [expr $seq & 0x0FFFF]]
+ set data 1
+ set packet [string range $packet 8 end]
+ }
+ }
+ 3 {
+ append icmpv4_msg "unreachable/"
+ switch -- $type {
+ 0 { append icmpv4_msg "network" }
+ 1 { append icmpv4_msg "host" }
+ 2 { append icmpv4_msg "protocol" }
+ 3 { append icmpv4_msg "port" }
+ 4 { append icmpv4_msg "frag needed but don't frag set" }
+ 5 { append icmpv4_msg "source route failed" }
+ 6 { append icmpv4_msg "destination network unknown" }
+ 7 { append icmpv4_msg "destination host unknown" }
+ 8 { append icmpv4_msg "source host isolated" }
+ 9 { append icmpv4_msg "destination network prohibited" }
+ 10 { append icmpv4_msg "destination host prohibited" }
+ 11 { append icmpv4_msg "network for TOS" }
+ 12 { append icmpv4_msg "host for TOS" }
+ 13 { append icmpv4_msg "communication prohibited" }
+ 14 { append icmpv4_msg "host precedence violation" }
+ 15 { append icmpv4_msg "precedence cutoff" }
+ default { append icmpv4_msg "unknown" }
+ }
+ set error 1
+ }
+ 4 {
+ append icmpv4_msg "source quench"
+ set error 1
+ }
+ 5 {
+ append icmpv4_msg "redirect/"
+ switch -- $type {
+ 0 { append icmpv4_msg "network" }
+ 1 { append icmpv4_msg "host" }
+ 2 { append icmpv4_msg "tos & network" }
+ 3 { append icmpv4_msg "tos & host" }
+ default { append icmpv4_msg "unknown" }
+ }
+ set error 1
+ }
+ 8 {
+ append icmpv4_msg "ping request"
+ if { [string length $packet] >= 8 } {
+ binary scan $packet {iss} junk id seq
+ append icmpv4_msg [format " id %u, seq %u" [expr $id & 0x0FFFF] [expr $seq & 0x0FFFF]]
+ set data 1
+ set packet [string range $packet 8 end]
+ }
+ }
+ 9 {
+ append icmpv4_msg "router advertisement"
+ }
+ 10 {
+ append icmpv4_msg "router solicitation"
+ }
+ 11 {
+ append icmpv4_msg "time exceeded/"
+ switch -- $type {
+ 0 { append icmpv4_msg "transit" }
+ 1 { append icmpv4_msg "reassembly" }
+ default { append icmpv4_msg "unknown" }
+ }
+ set error 1
+ }
+ 12 {
+ append icmpv4_msg "parameter problem/"
+ switch -- $type {
+ 0 { append icmpv4_msg "IP header bad" }
+ 1 { append icmpv4_msg "required option missing" }
+ default { append icmpv4_msg "unknown" }
+ }
+ set error 1
+ }
+ 13 {
+ append icmpv4_msg "timestamp request"
+ }
+ 14 {
+ append icmpv4_msg "timestamp reply"
+ }
+ 15 {
+ append icmpv4_msg "information request"
+ }
+ 16 {
+ append icmpv4_msg "information reply"
+ }
+ 17 {
+ append icmpv4_msg "address mask request"
+ }
+ 18 {
+ append icmpv4_msg "address mask reply"
+ }
+ default {
+ append icmpv4_msg "unknown"
+ }
+ }
+ if { $error && ([string length $packet] >= 36) } {
+ # The ICMP message contains an IP header and hopefully the TCP or UDP ports as well
+ # Only deal with the simple cases.
+ binary scan $packet {iiccSiccSIISS} icmp_junk1 icmp_junk2 ip_lenver ip_junk1 ip_junk2 ip_junk3 ip_junk4 ip_protocol ip_junk5 \
+ ip_source ip_dest ip_source_port ip_dest_port
+ if { (5 == ($ip_lenver & 0x0F)) && ((6 == $ip_protocol) || (17 == $ip_protocol)) } {
+ if { 6 == $ip_protocol } {
+ append icmpv4_msg ", tcp"
+ } else {
+ append icmpv4_msg ", udp"
+ }
+ append icmpv4_msg " >[ethernet::inet_ipv4_ntoa $ip_dest]:$ip_dest_port <[ethernet::inet_ipv4_ntoa $ip_source]:$ip_source_port"
+ }
+ }
+
+ append icmpv4_msg "\n"
+ synth::output $icmpv4_msg "eth_icmpv4"
+
+ # Only some of the requests contain additional data that should be displayed
+ if { !$data } {
+ return
+ }
+
+ } elseif { 58 == $ip_protocol } {
+ # ipv6 ICMP
+ if { [string length $packet] < 4 } {
+ return
+ }
+ binary scan $packet {ccS} code type checksum
+
+ set icmpv6_msg "$device $direction: ICMPv6 "
+ set error 0
+ set data 0
+ switch -- $code {
+ 1 {
+ append icmpv6_msg "unreachable/"
+ switch -- $type {
+ 0 { append icmpv6_msg "no route" }
+ 1 { append icmpv6_msg "prohibited" }
+ 2 { append icmpv6_msg "not a neighbour" }
+ 3 { append icmpv6_msg "any other reason" }
+ 4 { append icmpv6_msg "UDP port unreachable" }
+ default { append icmpv6_msg "unknown" }
+ }
+ set error 1
+ }
+ 2 {
+ append icmpv6_msg "packet too big"
+ set error 1
+ }
+ 3 {
+ append icmpv6_msg "time exceeded/"
+ switch -- $type {
+ 0 { append icmpv6_msg "hop limit" }
+ 1 { append icmpv6_msg "fragment reassembly" }
+ default { append icmpv6_msg "unknown" }
+ }
+ set error 1
+ }
+ 4 {
+ append icmpv6_msg "parameter problem"
+ switch -- $type {
+ 0 { append icmpv6_msg "erroneous header" }
+ 1 { append icmpv6_msg "unrecognized next header" }
+ 2 { append icmpv6_msg "unrecognized option" }
+ default { append icmpv6_msg "unknown" }
+ }
+ set error 1
+ }
+ 128 {
+ append icmpv6_msg "ping request"
+ # FIXME: is this the same format as for icmpv4?
+ }
+ 129 {
+ append icmpv6_msg "ping reply"
+ # FIXME: is this the same format as for icmpv4?
+ }
+ 130 {
+ append icmpv6_msg "group membership query"
+ }
+ 131 {
+ append icmpv6_msg "group membership report"
+ }
+ 132 {
+ append icmpv6_msg "group membership reduction"
+ }
+ 133 {
+ append icmpv6_msg "router solicitation"
+ }
+ 134 {
+ append icmpv6_msg "router advertisement"
+ }
+ 135 {
+ append icmpv6_msg "neighbour solicitation"
+ }
+ 136 {
+ append icmpv6_msg "neighbour advertisement"
+ }
+ 137 {
+ append icmpv6_msg "redirect"
+ }
+ }
+
+ if { $error && ([string length $packet] >= 44) } {
+ # The ICMP message contains an IPv6 header and hopefully the TCP or UDP ports as well
+ binary scan $packet {isccH16H16SS} icmp_junk1 icmp_junk2 ip_protocol icmp_junk3 ip_source ip_dest ip_source_port ip_dest_port
+ if { 6 == $ip_protocol } {
+ append icmpv6_msg ", tcp"
+ } elseif { 17 == $ip_protocol } {
+ append icmpv6_msg ", udp"
+ }
+ append icmpv6_msg " >[ethernet::inet_ipv4_ntoa $ip_dest]:$ip_dest_port <[ethernet::inet_ipv6_ntoa $ip_source]:$ip_source_port"
+ }
+ append icmpv6_msg "\n"
+ synth::output $icmpv6_msg "eth_icmpv6"
+
+ if { !$data } {
+ return
+ }
+
+ } elseif { 6 == $ip_protocol } {
+ # TCP
+ if { [string length $packet] < 20 } {
+ return
+ }
+ binary scan $packet {SSIIccSSS} source_port dest_port seq ack hdrsize flags winsize checksum urg
+ set source_port [expr $source_port & 0x0FFFF]
+ set dest_port [expr $dest_port & 0x0FFFF]
+ set hdrsize [expr ($hdrsize >> 4) & 0x0F]
+ set winsize [expr $winsize & 0x0FFFF]
+ set urg [expr $urg & 0x0FFFF]
+
+ set tcp_msg "$device $direction tcp: "
+ append tcp_msg " >${dest_name}:${dest_port}"
+ if { [info exists ethernet::services($dest_port,udp)] } {
+ append tcp_msg "($ethernet::services($dest_port,udp))"
+ }
+ append tcp_msg "<${source_name}:$source_port"
+ if { [info exists ethernet::services($source_port,udp)] } {
+ append tcp_msg "($ethernet::services($source_port,udp))"
+ }
+
+ append tcp_msg ", "
+ if { $flags & 0x08 } {
+ append tcp_msg "PSH "
+ }
+ if { $flags & 0x04 } {
+ append tcp_msg "RST "
+ }
+ if { $flags & 0x02 } {
+ append tcp_msg "SYN "
+ }
+ if { $flags & 0x01 } {
+ append tcp_msg "FIN "
+ }
+ append tcp_msg [format "seq %u" $seq]
+
+ if { 0 != ($flags & 0x010) } {
+ append tcp_msg [format ", ACK %u" $ack]
+ }
+ append tcp_msg ", win $winsize"
+ if { 0 != ($flags & 0x020) } {
+ append tcp_msg ", URG $urg"
+ }
+ append tcp_msg "\n"
+ synth::output $tcp_msg "eth_tcp"
+
+ set packet [string range $packet [expr 4 * $hdrsize] end]
+ } elseif { 17 == $ip_protocol } {
+ # UDP
+ if { [string length $packet] < 8 } {
+ return
+ }
+ set udp_msg "$device $direction: udp "
+ binary scan $packet {SSSS} source_port dest_port len checksum
+ set source_port [expr $source_port & 0x0FFFF]
+ set dest_port [expr $dest_port & 0x0FFFF]
+ append udp_msg [format "%d bytes, " [expr $len & 0x0FFFF]]
+ append udp_msg " >${dest_name}:$dest_port"
+ if { [info exists ethernet::services($dest_port,udp)] } {
+ append udp_msg "($ethernet::services($dest_port,udp))"
+ }
+ append udp_msg "<${source_name}:$source_port"
+ if { [info exists ethernet::services($source_port,udp)] } {
+ append udp_msg "($ethernet::services($source_port,udp))"
+ }
+ append udp_msg "\n"
+ synth::output $udp_msg "eth_udp"
+ set packet [string range $packet 8 end]
+ } else {
+ # Unknown protocol, so no way of knowing where the data starts.
+ return
+ }
+
+ # At this point we may have a payload. This should be
+ # dumped in both hex and ascii. The code tries to preserve
+ # alignment.
+ if { [string length $packet] == 0 } {
+ return
+ }
+ set hexdata_msg "$device $direction: data [format_hex_data $packet]\n"
+ set asciidata_msg "$device $direction: data "
+ set len [string length $packet]
+ if { $len > $ethernet::max_show } {
+ set len $ethernet::max_show
+ }
+ for { set i 0 } { $i < $len } { incr i } {
+ set char [string index $packet $i]
+ if { "\r" == $char } {
+ append asciidata_msg "\\r"
+ } elseif { "\n" == $char } {
+ append asciidata_msg "\\n"
+ } elseif { "\t" == $char } {
+ append asciidata_msg "\\t"
+ } elseif { [string is print -strict $char] } {
+ append asciidata_msg " $char"
+ } else {
+ append asciidata_msg "??"
+ }
+ if { 3 == ($i % 4) } {
+ append asciidata_msg " "
+ }
+ }
+ append asciidata_msg "\n"
+ synth::output $hexdata_msg "eth_hexdata"
+ synth::output $asciidata_msg "eth_asciidata"
+
+ return
+ }
+
+ # A utility for handling the ethernet record button on the toolbar
+ proc logging_button_toggle { } {
+ if { $ethernet::logging_enabled } {
+ set ethernet::logging_enabled 0
+ .toolbar.ethernet_logging configure -relief flat
+ } else {
+ set ethernet::logging_enabled 1
+ .toolbar.ethernet_logging configure -relief sunken
+ }
+ }
+
+ # A dummy procedure for initialization. All of this could execute at
+ # the toplevel, but there are lots of locals.
+ proc filters_initialize { } {
+ ethernet::read_services
+ ethernet::read_protocols
+ ethernet::read_hosts
+
+ # Add a button on the toolbar for enabling/disabling logging.
+ # Also add an entry to the help menu
+ if { $synth::flag_gui } {
+ button .toolbar.ethernet_logging -image $ethernet::image_netrecord -borderwidth 2 -relief flat -command ethernet::logging_button_toggle
+ pack .toolbar.ethernet_logging -side left -padx 2
+ synth::register_balloon_help .toolbar.ethernet_logging "Record ethernet traffic"
+
+ if { [synth::tdf_has_option "ethernet" "logging"] } {
+ set ethernet::logging_enabled [synth::tdf_get_option "ethernet" "logging"]
+ } else {
+ # Default to logging ethernet traffic. This may not be the right thing to do
+ # because users may see too much output by default, but it is easy enough
+ # to disable.
+ set ethernet::logging_enabled 1
+ }
+ if { $ethernet::logging_enabled } {
+ .toolbar.ethernet_logging configure -relief sunken
+ }
+
+ set ethernet_help [file join $synth::device_src_dir "doc" "devs-eth-synth-ecosynth.html"]
+ if { ![file readable $ethernet_help] } {
+ synth::report_warning "Failed to locate synthetic ethernet documentation $ethernet_help\n \
+ Help->Ethernet target menu option disabled.\n"
+ set ethernet_help ""
+ }
+ if { "" == $ethernet_help } {
+ .menubar.help add command -label "Ethernet" -state disabled
+ } else {
+ .menubar.help add command -label "Ethernet" -command [list synth::handle_help "file://$ethernet_help"]
+ }
+ }
+
+ if { [synth::tdf_has_option "ethernet" "max_show"] } {
+ set ethernet::max_show [synth::tdf_get_option "ethernet" "max_show"]
+ if { ! [string is integer -strict $ethernet::max_show] } {
+ synth::report_error "Ethernet device, invalid value in target definition file $synth::target_definition\n \
+ Entry max_show should be a simple integer, not $ethernet::max_show\n"
+ set ethernet::init_ok 0
+ }
+ }
+
+ # Filters. First, perform some validation.
+ set known_filters [list "ether" "arp" "ipv4" "ipv6" "icmpv4" "icmpv6" "udp" "tcp" "hexdata" "asciidata"]
+ set tdf_filters [synth::tdf_get_options "ethernet" "filter"]
+ array set filter_options [list]
+
+ foreach filter $tdf_filters {
+ if { 0 == [llength $filter] } {
+ synth::report_error "Ethernet device, invalid value in target definition file $synth::target_definition\n \
+ Option \"filter\" requires the name of a known filters.\n"
+ set ethernet::init_ok 0
+ continue
+ }
+ set name [lindex $filter 0]
+ if { [info exists filter_options($name)] } {
+ synth::report_error "Ethernet device, invalid value in target definition file $synth::target_definition\n \
+ \"filter $name\" should be defined only once.\n"
+ set ethernet::init_ok 0
+ continue
+ }
+ if { -1 == [lsearch -exact $known_filters $name] } {
+ synth::report_error "Ethernet device, invalid value in target definition file $synth::target_definition\n \
+ Unknown filter \"$name\".\n \
+ Known filters are $known_filters\n"
+ set ethernet::init_ok 0
+ continue
+ }
+ set filter_options($name) [lrange $filter 1 end]
+ }
+
+ # We now know about all the filter entries in the target definition file.
+ # Time to create the filters themselves, provided we are running in GUI mode.
+ if { $synth::flag_gui } {
+ foreach filter $known_filters {
+ if { ! [info exists filter_options($filter)] } {
+ synth::filter_add "eth_$filter" -text "ethernet $filter"
+ } else {
+ array set parsed_options [list]
+ set message ""
+ if { ![synth::filter_parse_options $filter_options($filter) parsed_options message] } {
+ synth::report_error \
+ "Invalid entry in target definition file $synth::target_definition\n \
+ Ethernet filter $filter\n $message"
+ set ethernet::init_ok 0
+ } else {
+ set parsed_options("-text") "ethernet $filter"
+ synth::filter_add_parsed "eth_$filter" parsed_options
+ }
+ }
+ }
+ }
+ }
+ ethernet::filters_initialize
+}
+
+return ethernet::instantiate
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/ethernet.tdf b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/ethernet.tdf
new file mode 100644
index 0000000000..46efa69d0f
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/ethernet.tdf
@@ -0,0 +1,117 @@
+# Target definition file fragment for ethernet devices.
+#
+# The target-side can instantiate up to four ethernet devices,
+# eth0 to eth3. Each instance requires an entry in the
+# target definition file specifying what underlying Linux
+# kernel facility should be used to implement the I/O. This
+# can take the following forms:
+#
+# 1) an existing ethernet device, e.g.
+# eth0 real eth1
+# thus mapping the eCos device eth0 on to the Linux device eth1.
+# The latter network interface must not currently be in use
+# by Linux. Traffic will flow to and from the real ethernet, and
+# communication is possible with any machine on the LAN.
+#
+# 2) the Linux kernel's tap facility.
+# eth0 ethertap
+# This will result in a Linux ethernet interface such as
+# tap3 appearing. The interface can be configured like any
+# other network device, for example by using the ifconfig
+# command or by creating a configuration file
+# /etc/sysconfig/network-scripts/ifcfg-tap3
+# The result is a virtual ethernet segment visible only
+# to the Linux host and eCos. Bridge software inside the
+# Linux host can be used to connect eCos to a larger network.
+#
+# Optionally a specific tap device can be configured,
+# eth0 ethertap tap3
+# By default the code will pick up the next free tap device,
+# usually tap0. If the Linux interface should come up automatically
+# then this can be achieved with an ifcfg-tap?? configuration
+# file. Explicitly specifying the tap device can avoid some
+# confusion.
+#
+# Both the eCos and the Linux network interface need a unique
+# MAC address. There is no real ethernet hardware involved to
+# supply these addresses, so they have to be invented. The
+# Linux kernel will automatically invent one for its interface.
+# By default a random MAC address will also be generated for
+# the eCos interface, but to make the system more deterministic
+# it is possible to specify the MAC address to be used. This
+# facility is only available in conjunction with an explicit
+# tap device, e.g.:
+# eth0 ethertap tap3 00:01:02:03:04:05
+# The MAC address should be in the usual format: six 2-digit
+# hexadecimal numbers separated by colons. It is the user's
+# responsibility to make sure that the address specified
+# does not match any other real or invented address visible
+# on the local network.
+#
+# It is possible that bursts of ethernet traffic occur, causing
+# packets to arrive faster than they can be forwarded to and
+# processed by eCos. It is desirable that some number of packets
+# be buffered, matching the behaviour of many ethernet devices
+# with built-in fifos. However the number of these packets should
+# be restricted: if eCos stops accepting ethernet packets or
+# cannot handle the data quickly enough, then it is possible that
+# an unlimited number of packets could accumulate in the I/O
+# auxiliary until all available memory and swap space is exhausted.
+# By default up to 16 packets will be buffered per device, but
+# this can be changes with the max_buffer option.
+#
+# The ethernet emulation code can perform logging and limited
+# analysis of each ethernet packet. For example if a particular
+# packet is an IPv4 ICMP request then details of the request
+# will be logged to the main text window. The appearance of the
+# various filters can be controlled here, using the usual
+# options such as -foreground, -background, and -hide.
+#
+# This logging of each ethernet frame can be somewhat time-consuming
+# and, for a long run, require a lot of memory. Logging can be
+# disabled by default if desired, and a button on the toolbar allows
+# this setting to be toggled.
+#
+# Ethernet packets can be up to 1514 bytes, so showing entire packets
+# on a single line can mean very wide lines. In practice the interesting
+# data is usually at the start, so the output can be truncated to a
+# maximum number of bytes. The data is displayed in hex so each byte
+# requires two columns, and some spacing will be added as well to
+# improve legibility.
+
+synth_device ethernet {
+ ## Map eCos devices on to Linux ones.
+
+ # eth0 real eth1
+ # eth0 ethertap
+ # eth0 ethertap tap3
+ eth0 ethertap tap3 00:FE:42:63:84:A5
+
+ # eth1 ethertap tap4 00:FE:12:34:56:78
+ # eth2 ethertap tap5 00:FE:9A:BC:DE:F0
+ # eth3 real eth2
+
+ ## Maximum number of packets that should be buffered per interface.
+ ## Default 16
+ max_buffer 32
+
+ ## Should packets be logged? The default is yes.
+ # logging 0
+
+ ## Maximum number of data bytes to be shown.
+ ## Default 64
+ # max_show 128
+
+ ## Filters for the various recognised protocols.
+ ## By default all filters are visible and use standard colours.
+ # filter ether -hide 0
+ # filter arp -hide 1
+ # filter ipv4 -hide 1
+ # filter ipv6 -hide 1
+ # filter icmpv4 -hide 1
+ # filter icmpv6 -hide 1
+ # filter udp -hide 1
+ # filter tcp -hide 1
+ # filter hexdata -hide 0
+ # filter asciidata -hide 0
+}
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/fromnet.xbm b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/fromnet.xbm
new file mode 100644
index 0000000000..74c0cd0442
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/fromnet.xbm
@@ -0,0 +1,4 @@
+#define fromnet_width 8
+#define fromnet_height 8
+static unsigned char fromnet_bits[] = {
+ 0x00, 0x87, 0xa5, 0x95, 0xfd, 0x95, 0xa5, 0x87};
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/netrecord.xbm b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/netrecord.xbm
new file mode 100644
index 0000000000..706c05a44c
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/netrecord.xbm
@@ -0,0 +1,6 @@
+#define netrecord_width 16
+#define netrecord_height 15
+static unsigned char netrecord_bits[] = {
+ 0x00, 0x00, 0xce, 0x39, 0x4a, 0x08, 0xce, 0x09, 0x46, 0x08, 0xca, 0x39,
+ 0x00, 0x00, 0x0e, 0x20, 0x4a, 0x24, 0x2a, 0x28, 0xfa, 0x3f, 0x2a, 0x28,
+ 0x4a, 0x24, 0x0e, 0x20, 0x00, 0x00};
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/rawether.c b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/rawether.c
new file mode 100644
index 0000000000..ba1811742a
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/rawether.c
@@ -0,0 +1,795 @@
+//============================================================================
+//
+// rawether.c
+//
+// A utility program to perform low-level ethernet operations
+//
+//============================================================================
+//####COPYRIGHTBEGIN####
+//
+// ----------------------------------------------------------------------------
+// Copyright (C) 2002 Bart Veer
+//
+// This file is part of the eCos host tools.
+//
+// This program is free software; you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 of the License, or (at your option)
+// any later version.
+//
+// This program is distributed in the hope that it will be useful, but WITHOUT
+// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+// more details.
+//
+// You should have received a copy of the GNU General Public License along with
+// this program; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// ----------------------------------------------------------------------------
+//
+//####COPYRIGHTEND####
+//============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contact(s): bartv, andrew.lunn@ascom.ch
+// Date: 2002/08/07
+// Version: 0.01
+// Description:
+//
+// This program is fork'ed by the ethernet.tcl script running inside
+// the synthetic target auxiliary. It is responsible for performing
+// low-level ethernet I/O.
+//
+//####DESCRIPTIONEND####
+//============================================================================
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <signal.h>
+#include <limits.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <net/if_arp.h>
+#include <netinet/in.h>
+#include <netinet/if_ether.h>
+#include <linux/if_packet.h>
+#include <linux/if_ether.h>
+#ifdef HAVE_LINUX_IF_TUN_H
+# include <linux/if_tun.h>
+#endif
+
+// The protocol between host and target is defined by a private
+// target-side header.
+#include "../src/protocol.h"
+
+// Allow debug builds. Set this flag to 0, 1 or 2
+#define DEBUG 0
+
+// ----------------------------------------------------------------------------
+// Statics.
+
+// Are we using a real ethernet device or ethertap?
+static int real_ether = 0;
+static int ethertap = 0;
+
+// The six-byte MAC address, which must be returned to eCos
+static unsigned char MAC[6];
+
+// Does the driver support multicasting?
+static int multicast_supported = 0;
+
+// The file descriptor for incoming data ethernet packets.
+// Used for select() together with fd 0 corresponding to ecosynth
+static int ether_fd = -1;
+
+// Is the interface up?
+static int up = 0;
+
+// Space for incoming and outgoing packets. In the case of rx_buffer
+// there are an extra four bytes at the front for the protocol header.
+#define MTU 1514
+static unsigned char tx_buffer[MTU];
+static unsigned char rx_buffer[MTU+4];
+
+// Indirect to get to the actual implementation functions.
+static void (*tx_fn)(unsigned char*, int);
+static void (*rx_fn)(void);
+static void (*start_fn)(int);
+static void (*stop_fn)(void);
+static void (*multicast_fn)(int);
+
+
+// ----------------------------------------------------------------------------
+// A utility buffer for messages.
+#define MSG_SIZE 256
+static unsigned char msg[MSG_SIZE];
+
+// Report an error to ecosynth during initialization. This means a
+// single byte 0, followed by a string.
+static void
+report_error(char* msg)
+{
+ write(1, "0", 1);
+ write(1, msg, strlen(msg));
+ close(1);
+ exit(0);
+}
+
+// Report success to ecosynth. This means a byte 1 followed by
+// the MAC address.
+static void
+report_success(void)
+{
+ write(1, "1", 1);
+ memcpy(msg, MAC, 6);
+ msg[6] = multicast_supported;
+ write(1, msg, 7);
+}
+
+
+// ----------------------------------------------------------------------------
+// Real ethernet. This involves creating a SOCK_RAW socket and binding it
+// to the appropriate interface. Relevant documentation can be found in
+// the man pages (packet(7) and netdevice(7)).
+
+// The device name. Needed for various ioctl()'s.
+static char real_devname[IFNAMSIZ];
+
+// The interface index.
+static int real_ifindex = -1;
+
+// Transmit a single ethernet frame. The socket should be set up so a
+// simple send() operation should do the trick. Errors such as EAGAIN,
+// indicating that the network device is still busy, are ignored.
+// Ethernet is not a reliable communication medium.
+static void
+real_handle_tx(unsigned char* buffer, int size)
+{
+ int result;
+
+ result = send(ether_fd, buffer, size, MSG_DONTWAIT);
+ if (result < 0) {
+ // It appears that one retry is worthwhile, to clear pending
+ // errors or something.
+ result = send(ether_fd, buffer, size, MSG_DONTWAIT);
+ }
+#if (DEBUG > 0)
+ fprintf(stderr, "rawether dbg: tx %d bytes -> %d\n", size, result);
+#endif
+#if (DEBUG > 1)
+ fprintf(stderr, " %x:%x:%x:%x:%x:%x %x:%x:%x:%x:%x:%x %x:%x\n",
+ buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], buffer[5],
+ buffer[6], buffer[7], buffer[8], buffer[9], buffer[10], buffer[11],
+ buffer[12], buffer[13]);
+#endif
+}
+
+// Receive a single ethernet frame, using the static rxbuffer. If the
+// interface is not currently up discard it. Otherwise forward it on
+// to ecosynth.
+
+static void
+real_handle_rx(void)
+{
+ int size;
+ int result;
+
+ size = recv(ether_fd, rx_buffer + 4, MTU, MSG_TRUNC);
+
+#if (DEBUG > 0)
+ fprintf(stderr, "rawether dbg: rx returned %d, errno %s (%d)\n", size, strerror(errno), errno);
+#endif
+
+ if (size < 0) {
+ return; // Ignore errors, just go around the main loop again.
+ }
+ if ((size < 14) || (size > MTU)) {
+ return; // Invalid packet size. Discard the packet.
+ }
+
+#if (DEBUG > 1)
+ fprintf(stderr, " %x:%x:%x:%x:%x:%x %x:%x:%x:%x:%x:%x %x:%x\n",
+ rx_buffer[4], rx_buffer[5], rx_buffer[6], rx_buffer[7], rx_buffer[8], rx_buffer[9],
+ rx_buffer[10], rx_buffer[11], rx_buffer[12], rx_buffer[13], rx_buffer[14], rx_buffer[15],
+ rx_buffer[16], rx_buffer[17]);
+#endif
+
+ if (!up) {
+ // eCos is not currently expecting packets, so discard them.
+ // This may not actually be necessary because the interface
+ // is only up when eCos wants it to be up.
+ return;
+ }
+
+ // It looks this packet should get forwarded to eCos.
+ rx_buffer[0] = SYNTH_ETH_RX;
+ rx_buffer[1] = 0;
+ rx_buffer[2] = size & 0x00FF;
+ rx_buffer[3] = (size >> 8) & 0x00FF;
+ do {
+ result = write(1, rx_buffer, 4 + size);
+ } while ((-1 == result) && (EINTR == errno));
+
+ if (result != (size + 4)) {
+ fprintf(stderr, "rawether(%s): failed to send ethernet packet to I/O auxiliary, exiting.\n", real_devname);
+ exit(1);
+ }
+}
+
+// Utility to manipulate interface flags. This involves retrieving the
+// current flags, or'ing in some bits, and'ing out others, and updating.
+static void
+real_update_ifflags(int set_bits, int clear_bits)
+{
+ struct ifreq request;
+ int flags;
+
+ strncpy(request.ifr_name, real_devname, IFNAMSIZ);
+ if (ioctl(ether_fd, SIOCGIFFLAGS, &request) < 0) {
+ fprintf(stderr, "rawether (%s): failed to get interface flags, exiting\n", real_devname);
+ exit(1);
+ }
+
+ flags = request.ifr_flags;
+
+ flags |= set_bits;
+ flags &= ~clear_bits;
+
+ if (flags == request.ifr_flags) {
+ // Nothing is changing.
+ return;
+ }
+
+ strncpy(request.ifr_name, real_devname, IFNAMSIZ);
+ request.ifr_flags = flags;
+ if (ioctl(ether_fd, SIOCSIFFLAGS, &request) < 0) {
+ fprintf(stderr, "rawether (%s): failed to update interface flags, exiting\n", real_devname);
+ exit(1);
+ }
+}
+
+
+// Starting an interface. This involves bringing the interface up,
+// and optionally setting promiscuous mode.
+// NOTE: is UP really the right thing here? There is no IP address
+// for this interface. In theory this should not matter because
+// we have a bound socket which should receive all packets for
+// this interface.
+
+static void
+real_handle_start(int promiscuous)
+{
+ if (promiscuous) {
+ real_update_ifflags(IFF_UP | IFF_PROMISC, 0);
+ } else {
+ real_update_ifflags(IFF_UP, IFF_PROMISC);
+ }
+ up = 1;
+}
+
+// Stopping an interface means clearing the UP flag
+static void
+real_handle_stop(void)
+{
+ up = 0;
+ real_update_ifflags(0, IFF_UP | IFF_PROMISC);
+}
+
+// Enabling/disabling multicast support.
+static void
+real_handle_multiall(int on)
+{
+ struct packet_mreq req;
+
+ req.mr_ifindex = real_ifindex;
+ req.mr_type = PACKET_MR_ALLMULTI;
+ req.mr_alen = 0;
+ if (setsockopt(ether_fd, SOL_PACKET, on ? PACKET_ADD_MEMBERSHIP : PACKET_DROP_MEMBERSHIP, (void*)&req, sizeof(req)) < 0) {
+ fprintf(stderr, "rawether (%s): failed to manipulate multicast-all flag, exiting\n", real_devname);
+ exit(1);
+ }
+}
+
+// When the application exists make sure that the interface goes down again.
+
+static void
+real_atexit(void)
+{
+ if (up) {
+ real_update_ifflags(0, IFF_UP | IFF_PROMISC);
+ }
+}
+
+static void
+real_init(char* devname)
+{
+ struct sockaddr_ll addr;
+ struct ifreq request;
+
+ tx_fn = &real_handle_tx;
+ rx_fn = &real_handle_rx;
+ start_fn = &real_handle_start;
+ stop_fn = &real_handle_stop;
+ multicast_fn = &real_handle_multiall;
+
+ if (strlen(devname) >= IFNAMSIZ) {
+ snprintf(msg, MSG_SIZE, "Invalid real network device name \"%s\", too long.\n", devname);
+ report_error(msg);
+ }
+ strcpy(real_devname, devname);
+
+ // All ioctl() operations need a socket. We might as well create the
+ // raw socket immediately and use that.
+ ether_fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
+ if (ether_fd < 0) {
+ snprintf(msg, MSG_SIZE, "Unable to create a raw socket for accessing network device\n"
+ " Error %s (errno %d)\n", strerror(errno), errno);
+ report_error(msg);
+ }
+
+ strncpy(request.ifr_name, real_devname, IFNAMSIZ);
+ if (ioctl(ether_fd, SIOCGIFINDEX, &request) < 0) {
+ snprintf(msg, MSG_SIZE, "Device %s does not correspond to a valid interface.\n"
+ " Error %s (errno %d)\n", real_devname, strerror(errno), errno);
+ report_error(msg);
+ }
+ real_ifindex = request.ifr_ifindex;
+
+ // The interface exists. Now check that it is usable.
+ strncpy(request.ifr_name, real_devname, IFNAMSIZ);
+ if (ioctl(ether_fd, SIOCGIFFLAGS, &request) < 0) {
+ snprintf(msg, MSG_SIZE, "Failed to get current interface flags for %s\n"
+ " Error %s (errno %d)\n", real_devname, strerror(errno), errno);
+ report_error(msg);
+ }
+
+ if (request.ifr_flags & (IFF_UP | IFF_RUNNING)) {
+ snprintf(msg, MSG_SIZE, "Network device %s is already up and running.\n"
+ " Exclusive access is required\n", real_devname);
+ report_error(msg);
+ }
+ if (request.ifr_flags & IFF_LOOPBACK) {
+ report_error("Loopback devices cannot be used for synthetic target ethernet emulation.\n");
+ }
+ if (request.ifr_flags & IFF_POINTOPOINT) {
+ report_error("Point-to-point devices cannot be used for synthetic target ethernet emulation.\n");
+ }
+ if (request.ifr_flags & IFF_MULTICAST) {
+ multicast_supported = 1;
+ }
+
+ // Make sure the interface is down. There is no point in receiving packets just yet.
+ real_update_ifflags(0, IFF_UP | IFF_PROMISC);
+
+ // The flags look ok. Now get hold of the hardware address.
+ strncpy(request.ifr_name, real_devname, IFNAMSIZ);
+ if (ioctl(ether_fd, SIOCGIFHWADDR, &request) < 0) {
+ snprintf(msg, MSG_SIZE, "Failed to get hardware address for %s\n"
+ " Error %s (errno %d)\n", real_devname, strerror(errno), errno);
+ report_error(msg);
+ }
+ if (ARPHRD_ETHER != request.ifr_hwaddr.sa_family) {
+ snprintf(msg, MSG_SIZE, "Device %s is not an ethernet device.\n", real_devname);
+ report_error(msg);
+ }
+ memcpy(MAC, request.ifr_hwaddr.sa_data, 6);
+
+ // The device is useable. Now just bind the socket to the appropriate address.
+ addr.sll_family = AF_PACKET;
+ addr.sll_protocol = htons(ETH_P_ALL);
+ addr.sll_ifindex = real_ifindex;
+ if (bind(ether_fd, (struct sockaddr*) &addr, sizeof(addr)) < 0) {
+ snprintf(msg, MSG_SIZE, "Failed to bind socket for direct hardware address to %s\n"
+ " Error %s (errno %d)\n", real_devname, strerror(errno), errno);
+ report_error(msg);
+ }
+
+ // Make sure the interface gets shut down when rawether exits.
+ atexit(real_atexit);
+
+ // And that should be it.
+}
+
+// ----------------------------------------------------------------------------
+// Ethertap device.
+//
+// See /usr/src/linux-2.x.y/Documentation/networking/tuntap.txt for more
+// information on the tun/tap driver.
+//
+// Basically during initialization this code opens /dev/net/tun, then
+// performs a TUNSETIFF ioctl() to initialize it. This causes a
+// new network device tap?? to appear. Any ethernet frames written
+// by the Linux kernel to this device can be read from the
+// dev/net/tun file descriptor, and ethernet frames can be written to
+// the same descriptor. The net effect is a virtual ethernet segment
+// with one interface managed by the Linux kernel and another
+// interface (or, theoretically, several) accessible via the file
+// descriptor.
+//
+// The Linux kernel will invent a MAC address for its interface. An
+// additional one is needed for eCos. This is either invented or
+// specified in the target definition file.
+//
+// Old Linux kernels may not have the required support. This is detected
+// by an autoconf test for <linux/if_tun.h>
+#ifdef HAVE_LINUX_IF_TUN_H
+
+static void
+tap_handle_tx(unsigned char* buffer, int size)
+{
+ int result;
+
+ result = write(ether_fd, buffer, size);
+#if (DEBUG > 0)
+ fprintf(stderr, "rawether dbg: tx %d bytes -> %d\n", size, result);
+#endif
+#if (DEBUG > 1)
+ fprintf(stderr, " %x:%x:%x:%x:%x:%x %x:%x:%x:%x:%x:%x %x:%x\n",
+ buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], buffer[5],
+ buffer[6], buffer[7], buffer[8], buffer[9], buffer[10], buffer[11],
+ buffer[12], buffer[13]);
+#endif
+}
+
+// Receive a single packet from the socket. It is assumed that the
+// tuntap code inside the kernel will preserve packet boundaries.
+//
+// For now it is assumed that all incoming packets are intended for
+// eCos. That may not be accurate, and additional filtering in
+// software might be appropriate. In promiscuous mode all packets
+// should be accepted, obviously. Otherwise all broadcasts should
+// be accepted, as should all messages intended for this specific
+// interface's MAC address. Multicasts should be accepted only if
+// enabled.
+static void
+tap_handle_rx(void)
+{
+ int size;
+ int result;
+
+ // select() has succeeded so this read() should never block.
+ size = read(ether_fd, rx_buffer + 4, MTU);
+#if (DEBUG > 0)
+ fprintf(stderr, "rawether dbg: rx returned %d, errno %s (%d)\n", size, strerror(errno), errno);
+#endif
+
+ if (size < 0) {
+ return; // Ignore errors, just go around the main loop again.
+ }
+ if ((size < 14) || (size > MTU)) {
+ return; // Invalid packet size. Discard the packet.
+ }
+
+#if (DEBUG > 1)
+ fprintf(stderr, " %x:%x:%x:%x:%x:%x %x:%x:%x:%x:%x:%x %x:%x\n",
+ rx_buffer[4], rx_buffer[5], rx_buffer[6], rx_buffer[7], rx_buffer[8], rx_buffer[9],
+ rx_buffer[10], rx_buffer[11], rx_buffer[12], rx_buffer[13], rx_buffer[14], rx_buffer[15],
+ rx_buffer[16], rx_buffer[17]);
+#endif
+
+ if (!up) {
+ // eCos is not currently expecting packets, so discard them.
+ return;
+ }
+
+ // It looks this packet should get forwarded to eCos.
+ rx_buffer[0] = SYNTH_ETH_RX;
+ rx_buffer[1] = 0;
+ rx_buffer[2] = size & 0x00FF;
+ rx_buffer[3] = (size >> 8) & 0x00FF;
+ do {
+ result = write(1, rx_buffer, 4 + size);
+ } while ((-1 == result) && (EINTR == errno));
+
+ if (result != (size + 4)) {
+ fprintf(stderr, "rawether(%s): failed to send ethernet packet to I/O auxiliary, exiting.\n", real_devname);
+ exit(1);
+ }
+}
+
+// Nothing much can be done for start or stop. Just set the flag and
+// let the rx and tx code discard packets when appropriate.
+//
+// For now the device is implicitly promiscuous and accepts all
+// multicasts. Given the nature of a tap device it is unlikely that
+// any packets will arrive which are not destined here.
+// FIXME: this may have to change if bridging is enabled.
+static void
+tap_handle_start(int promiscuous)
+{
+ up = 1;
+}
+
+static void
+tap_handle_stop(void)
+{
+ up = 0;
+}
+
+static void
+tap_handle_multiall(int on)
+{
+}
+
+static void
+tap_init(int argc, char** argv)
+{
+ char* devname = NULL;
+ struct ifreq ifr;
+ int persistent = 0;
+ int have_mac = 0;
+
+ tx_fn = &tap_handle_tx;
+ rx_fn = &tap_handle_rx;
+ start_fn = &tap_handle_start;
+ stop_fn = &tap_handle_stop;
+ multicast_fn = &tap_handle_multiall;
+
+ // Which device? By default let the system pick one, but the user
+ // can override this.
+ if (0 != argc) {
+ devname = argv[0];
+ }
+
+ // Work out the MAC address. By default a random one is generated,
+ // but the user can specify one to avoid a source of randomness.
+ // This MAC address is not actually needed by any of the code here,
+ // but should be returned to eCos.
+ if (2 <= argc) {
+ unsigned int mac_data[6]; // sscanf() needs unsigned ints
+ int result = sscanf(argv[1], "%x:%x:%x:%x:%x:%x",
+ &(mac_data[0]), &(mac_data[1]), &(mac_data[2]),
+ &(mac_data[3]), &(mac_data[4]), &(mac_data[5]));
+ if (6 != result) {
+ if (strncmp(argv[1], "persistent", 10)) {
+ snprintf(msg, MSG_SIZE, "Invalid MAC address %s\n", argv[1]);
+ report_error(msg);
+ }
+ } else {
+ MAC[0] = mac_data[0];
+ MAC[1] = mac_data[1];
+ MAC[2] = mac_data[2];
+ MAC[3] = mac_data[3];
+ MAC[4] = mac_data[4];
+ MAC[5] = mac_data[5];
+ argv += 1;
+ argc -= 1;
+ have_mac = 1;
+ }
+ }
+ if ( 1 != have_mac) {
+ srand(time(NULL));
+ MAC[0] = 0;
+ MAC[1] = 0x0FF;
+ MAC[2] = rand() & 0x0FF;
+ MAC[3] = rand() & 0x0FF;
+ MAC[4] = rand() & 0x0FF;
+ MAC[5] = rand() & 0x0FF;
+ }
+
+ // Should we make the TAP device persistent. When persistence is
+ // enabled, the tap device is not removed when rawether
+ // exits. This makes daemons happier. They can keep running
+ // between invocations of rawether.
+ if (2 <= argc ) {
+ persistent = !strncmp(argv[1], "persistent", 10);
+ }
+
+ ether_fd = open("/dev/net/tun", O_RDWR);
+ if (ether_fd < 0) {
+ snprintf(msg, MSG_SIZE, "Failed to open /dev/net/tun, errno %s (%d)\n", strerror(errno), errno);
+ report_error(msg);
+ }
+
+ memset(&ifr, 0, sizeof(ifr));
+ ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
+ if (NULL != devname) {
+ strncpy(ifr.ifr_name, devname, IFNAMSIZ - 1);
+ }
+ if (ioctl(ether_fd, TUNSETIFF, (void*)&ifr) < 0) {
+ snprintf(msg, MSG_SIZE, "Failed to initialize /dev/net/tun, errno %s (%d)\n", strerror(errno), errno);
+ report_error(msg);
+ }
+
+ // Supporting multicasts is a no-op
+ multicast_supported = 1;
+
+ if (persistent) {
+ if (ioctl(ether_fd, TUNSETPERSIST, 1) < 0) {
+ snprintf(msg, MSG_SIZE, "Failed to set persistent flag, errno %s (%d)\n",
+ strerror(errno), errno);
+ report_error(msg);
+ }
+ }
+ // All done.
+}
+#else
+static void
+tap_init(int argc, char** argv)
+{
+ snprintf(msg, MSG_SIZE, "Ethertap support was not available when the host-side support was built\n");
+ report_error(msg);
+}
+#endif // HAVE_LINUX_IF_TUN_H
+
+// ----------------------------------------------------------------------------
+// Receive a single request from ecosynth. This consists of a four-byte
+// header, optionally followed by a tx packet. EOF indicates that
+// ecosynth has exited, so this process should just exit immediately
+// as well. Any problems should be reported to stderr, followed by
+// termination.
+//
+// Currently rawether is single-threaded. Theoretically this could
+// cause a deadlock situation where the I/O auxiliary is trying to send
+// rawether a request and is blocked on the write, while rawether is trying
+// to send data to the I/O auxiliary. In practice the pipes should do
+// enough buffering to avoid complications, especially since rawether
+// gives priority to requests from the auxiliary.
+
+static void
+handle_ecosynth_request(void)
+{
+ unsigned char req[4];
+ int result;
+ int code, arg, size;
+
+ result = read(0, req, 4);
+ if (result == 0) {
+ // select() succeeded but no data. EOF. So exit
+ exit(0);
+ }
+ if (result < 0) {
+ // EINTR? EAGAIN? The latter should not happen since the pipe
+ // has not been put into non-blocking mode.
+ if ((EINTR == errno) || (EAGAIN == errno)) {
+ return;
+ } else {
+ fprintf(stderr, "rawether: unexpected error reading request from ecosynth\n");
+ fprintf(stderr, " %s\n", strerror(errno));
+ exit(1);
+ }
+ }
+ if (result < 4) {
+ fprintf(stderr, "rawether: unexpected error reading request from ecosynth\n Expected 4 bytes, only received %d\n", result);
+ exit(1);
+ }
+
+ code = req[0];
+ arg = req[1];
+ size = req[2] + (req[3] << 8);
+
+#if (DEBUG > 1)
+ fprintf(stderr, "rawether dbg: request %x from auxiliary\n", code);
+#endif
+
+ switch(code) {
+ case SYNTH_ETH_TX:
+ {
+ if (size < 14) {
+ fprintf(stderr, "rawether: attempt to send invalid ethernet packet of only %d bytes\n"
+ "Ethernet packets should be at least 14 bytes.\n", size);
+ exit(1);
+ }
+ if (size > MTU) {
+ fprintf(stderr, "rawether: attempt to send invalid ethernet packet of %d bytes\n"
+ "Only packets of up to %d bytes are supported.\n", size, MTU);
+ exit(1);
+ }
+ do {
+ result = read(0, tx_buffer, size);
+ } while ((-1 == result) && (EINTR == errno));
+ if (0 == result) {
+ // EOF, at an inopportune moment
+ exit(0);
+ }
+ if (result < size) {
+ fprintf(stderr, "rawether: error reading ethernet packet from I/O auxiliary\n"
+ "Expected %d bytes but only read %d\n", size, result);
+ exit(1);
+ }
+
+ (*tx_fn)(tx_buffer, size);
+ break;
+ }
+ case SYNTH_ETH_START:
+ {
+ (*start_fn)(arg);
+ break;
+ }
+
+ case SYNTH_ETH_STOP:
+ {
+ (*stop_fn)();
+ break;
+ }
+
+ case SYNTH_ETH_MULTIALL:
+ {
+ (*multicast_fn)(arg);
+ break;
+ }
+
+ // SYNTH_ETH_RX and SYNTH_ETH_GETPARAMS are handled inside ethernet.tcl
+
+ default:
+ fprintf(stderr, "rawether: protocol violation, received unknown request %d\n", code);
+ exit(1);
+ }
+}
+
+// The main loop. This waits for an event either from ecosynth or from
+// the underlying ethernet device, using select. Requests from
+// ecosynth are handled, and take priority to prevent the connecting
+// pipe from filling up and ecosynth blocking. Incoming ethernet
+// frames are forwarded to ecosynth.
+
+static void
+mainloop(void)
+{
+ fd_set read_set;
+ struct timeval timeout;
+ int result;
+
+ for ( ; ; ) {
+ FD_ZERO(&read_set);
+ FD_SET(0, &read_set);
+ FD_SET(ether_fd, &read_set);
+ timeout.tv_sec = 24 * 60 * 60;
+ timeout.tv_usec = 0;
+
+ result = select(ether_fd + 1, &read_set, NULL, NULL, &timeout);
+ if (result <= 0) {
+ continue;
+ }
+
+ if (FD_ISSET(0, &read_set)) {
+ handle_ecosynth_request();
+ } else if (FD_ISSET(ether_fd, &read_set)) {
+ (*rx_fn)();
+ }
+ }
+}
+
+// ----------------------------------------------------------------------------
+
+int
+main(int argc, char**argv)
+{
+ // Ignore incoming ctrl-C's. We are in the same process group as the
+ // eCos application which may sensibly be ctrl-C'd, but that should
+ // result in the auxiliary detecting EOF and closing the pipe to
+ // this process, which in turn causes this process to exit completely.
+ signal(SIGINT, SIG_IGN);
+
+ if (2 > argc ) {
+ report_error("Expected at least one argument, \"real\" or \"ethertap\"\n");
+ }
+ if (0 == strcmp("real", argv[1])) {
+ real_ether = 1;
+ real_init(argv[2]);
+ } else if (0 == strcmp("ethertap", argv[1])) {
+ ethertap = 1;
+ tap_init(argc - 2, argv + 2);
+ } else {
+ snprintf(msg, MSG_SIZE, "Invalid argument %s, expected \"real\" or \"ethertap\"\n", argv[1]);
+ report_error(msg);
+ }
+
+ // If the device-specific initialization succeeded we must be set.
+ report_success();
+
+ mainloop();
+
+ return 0;
+}
+
+
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/tonet.xbm b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/tonet.xbm
new file mode 100644
index 0000000000..e7f1f8b71e
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/host/tonet.xbm
@@ -0,0 +1,4 @@
+#define tonet_width 8
+#define tonet_height 8
+static unsigned char tonet_bits[] = {
+ 0x00, 0x87, 0x95, 0xa5, 0xfd, 0xa5, 0x95, 0x87};
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/src/protocol.h b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/src/protocol.h
new file mode 100644
index 0000000000..2da35fc13a
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/src/protocol.h
@@ -0,0 +1,72 @@
+#ifndef CYGONCE_DEVS_ETH_ECOSYNTH_PROTOCOL_H
+#define CYGONCE_DEVS_ETH_ECOSYNTH_PROTOCOL_H
+
+//=============================================================================
+//
+// protocol.h
+//
+// Protocol between target-side and host-side ethernet support.
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2002 Bart Veer
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting the
+// copyright holder(s).
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors:bartv
+// Date: 2002-08-08
+// Purpose: Protocol definitions.
+// Usage: #include "protocol.h"
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+// Transmit: no arguments, up to 1514 bytes of outgoing data, no reply expected.
+#define SYNTH_ETH_TX 0x01
+// Receive: no arguments or data, the return code indicates whether or not
+// there are more packets to follow, and the return data is up to 1514 bytes.
+#define SYNTH_ETH_RX 0x02
+// Start: one argument, non-zero -> promiscuous mode. No reply.
+#define SYNTH_ETH_START 0x03
+// Stop: no arguments or reply.
+#define SYNTH_ETH_STOP 0x04
+// Settings: no arguments or data. The return code holds the interrupt vector.
+// The return data is six bytes of MAC address, plus a single byte indicating
+// whether or not multicasting is supported.
+#define SYNTH_ETH_GETPARAMS 0x05
+// Enable/disable multicasting. One argument, enable/disable.
+#define SYNTH_ETH_MULTIALL 0x06
+
+#endif // CYGONCE_DEVS_ETH_ECOSYNTH_PROTOCOL.H
diff --git a/cesar/ecos/packages/devs/eth/synth/ecosynth/current/src/syntheth.c b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/src/syntheth.c
new file mode 100644
index 0000000000..fd442f1540
--- /dev/null
+++ b/cesar/ecos/packages/devs/eth/synth/ecosynth/current/src/syntheth.c
@@ -0,0 +1,461 @@
+//==========================================================================
+//
+// syntheth.c
+//
+// Network device driver for the synthetic target
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2002, 2003 Bart Veer
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting the
+// copyright holder(s).
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 2002-08-07
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <pkgconf/devs_eth_ecosynth.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/drv_api.h>
+#include <errno.h>
+#include <string.h>
+
+#define __ECOS 1
+#include <sys/types.h>
+#include <cyg/io/eth/netdev.h>
+#include <cyg/io/eth/eth_drv.h>
+#include <cyg/io/eth/eth_drv_stats.h>
+
+#ifdef CYGPKG_NET
+# include <net/if.h>
+#else
+# define IFF_PROMISC 0
+#endif
+
+#include <cyg/hal/hal_io.h>
+#include "protocol.h"
+
+// ----------------------------------------------------------------------------
+// Device instances. The synthetic target ethernet package can support
+// up to four ethernet devices, eth0 to eth3. A synth_eth structure
+// holds the data that is specific to a given device. Each device
+// needs an instance of this structure, followed by ETH_DRV_SC and
+// NETDEVTAB_ENTRY macros. Another macro SYNTH_ETH_INSTANCE takes
+// care of all that, to avoid unnecessary duplication of code here.
+//
+// NOTE: unfortunately this involves duplicating the eth_hwr_funs
+// structure. This could be eliminated but it would require bypassing
+// the ETH_DRV_SC macro.
+
+#define ETHERNET_MINTU 14
+#define ETHERNET_MAXTU 1514
+
+
+typedef struct synth_eth {
+ int synth_id; // Device id within the auxiliary
+ int up; // Has there been a call to start()?
+ int in_send; // Detect recursive calls
+ int tx_done;
+ unsigned long tx_key; // Allow mbuf's to be freed
+ volatile int rx_pending; // There is pending data.
+ int rx_len; // Length of buffered data.
+ unsigned char MAC[6]; // Obtained from the underlying ethernet device
+ cyg_vector_t interrupt; // Interrupt number allocated by the auxiliary
+ int multi_supported; // Does the driver support multicasting?
+ cyg_handle_t interrupt_handle; // Allow the ISR and DSR to be installed.
+ cyg_interrupt interrupt_data;
+ unsigned char tx_data[ETHERNET_MAXTU];
+ unsigned char rx_data[ETHERNET_MAXTU];
+} synth_eth;
+
+#define SYNTH_ETH_INSTANCE( _number_) \
+static synth_eth synth_eth##_number_ = { \
+ synth_id: -1, \
+ up: 1, \
+ in_send: 0, \
+ tx_done: 0, \
+ tx_key: 0L, \
+ rx_pending: 0, \
+ rx_len: 0, \
+ MAC: { 0, 0, 0, 0, 0, 0 }, \
+ interrupt: 0, \
+ interrupt_handle: 0 \
+}; \
+ETH_DRV_SC(synth_eth_sc##_number_, \
+ (void*) &synth_eth##_number_, \
+ "eth" #_number_, \
+ synth_eth_start, \
+ synth_eth_stop, \
+ synth_eth_ioctl, \
+ synth_eth_can_send, \
+ synth_eth_send, \
+ synth_eth_recv, \
+ synth_eth_deliver, \
+ synth_eth_poll, \
+ synth_eth_intvector); \
+NETDEVTAB_ENTRY(synth_eth_netdev##_number_, \
+ "synth_eth" #_number_, \
+ synth_eth_init, \
+ &synth_eth_sc##_number_);
+
+#ifdef CYGVAR_DEVS_ETH_ECOSYNTH_ETH0
+SYNTH_ETH_INSTANCE(0);
+#endif
+#ifdef CYGVAR_DEVS_ETH_ECOSYNTH_ETH1
+SYNTH_ETH_INSTANCE(1);
+#endif
+#ifdef CYGVAR_DEVS_ETH_ECOSYNTH_ETH2
+SYNTH_ETH_INSTANCE(2);
+#endif
+#ifdef CYGVAR_DEVS_ETH_ECOSYNTH_ETH3
+SYNTH_ETH_INSTANCE(3);
+#endif
+
+// ----------------------------------------------------------------------------
+// Data transmits.
+//
+// The eCos application will just send the data to the auxiliary,
+// which will in turn pass it on to the rawether utility. There is no
+// need for any response. Flow control is implicit: if the eCos
+// application tries to send ethernet packets too quickly then those
+// get passed on to the auxiliary, which in turn will pass them on to
+// the rawether process. If rawether is still busy with the previous
+// packet then the auxiliary will block on a pipe write, and in turn
+// the eCos application will block. As long as rawether manages to
+// complete its operations reasonably quickly these blocks should not
+// be noticeable to the user.
+//
+// So can_send() should always return true for an interface that is up
+// and running. The send operation needs to take the sg list, turn it
+// into a single buffer, and transmit it to the auxiliary. At that
+// point the transmission is already complete so eth_drv_dsr() should
+// be called to call deliver() and release the buffer.
+//
+// However there are some complications. The first is polled operation,
+// where eth_drv_dsr() is a no-op and should not really be called at
+// all because there are no interrupts going off. The second is that
+// calling eth_drv_dsr() directly will cause recursive operation:
+// send() -> dsr -> can_send()/send() -> ...
+// This is a bad idea, so can_send() has to check that we are not
+// already inside a send(). Data transmission will proceed merrily
+// once the send has returned.
+
+static int
+synth_eth_can_send(struct eth_drv_sc* sc)
+{
+ synth_eth* eth = (synth_eth*)(sc->driver_private);
+ return synth_auxiliary_running && eth->up && !eth->in_send && !eth->tx_done;
+}
+
+static void
+synth_eth_send(struct eth_drv_sc* sc,
+ struct eth_drv_sg* sg_list, int sg_len, int total_len,
+ unsigned long key)
+{
+ synth_eth* eth = (synth_eth*)(sc->driver_private);
+
+ CYG_PRECONDITION((total_len >= ETHERNET_MINTU) && (total_len <= ETHERNET_MAXTU), "Only normal-sized ethernet packets are supported");
+ CYG_PRECONDITION(!eth->in_send && !eth->tx_done, "Ethernet device must not still be in use for transmits");
+
+ eth->in_send = 1;
+ eth->tx_key = key;
+ if (synth_auxiliary_running && eth->up) {
+ int i;
+ unsigned char* buf = eth->tx_data;
+ for (i = 0; i < sg_len; i++) {
+ memcpy(buf, (void*) sg_list[i].buf, sg_list[i].len);
+ buf += sg_list[i].len;
+ CYG_LOOP_INVARIANT(buf <= &(eth->tx_data[ETHERNET_MAXTU]), "sg list must not exceed ethernet MTU");
+ }
+ CYG_POSTCONDITION(buf == &(eth->tx_data[total_len]), "sg list lengths should match total_len");
+
+ synth_auxiliary_xchgmsg(eth->synth_id, SYNTH_ETH_TX, 0, 0, eth->tx_data, total_len,
+ (void*) 0, (unsigned char*)0, (int*)0, 0);
+ }
+
+ // The transfer has now completed, one way or another, so inform
+ // the higher-level code immediately.
+ eth->tx_done = 1;
+ eth_drv_dsr(eth->interrupt, 0, (cyg_addrword_t) sc);
+ eth->in_send = 0;
+}
+
+// ----------------------------------------------------------------------------
+// Receives.
+//
+// These are rather more complicated because there are real interrupts
+// involved, and polling needs to be supported as well. The actual
+// transfer of data from auxiliary to eCos happens inside deliver(),
+// and the data is buffered up in the synth_eth structure. All that
+// needs to be done here is scatter the existing data into the
+// sg_list. If higher-level code has run out of space then the
+// sg_list may contain null pointers.
+
+static void
+synth_eth_recv(struct eth_drv_sc* sc, struct eth_drv_sg* sg_list, int sg_len)
+{
+ synth_eth* eth = (synth_eth*)(sc->driver_private);
+ unsigned char* buf = eth->rx_data;
+ int len = eth->rx_len;
+ int i;
+
+ for (i = 0; i < sg_len; i++) {
+ if (0 == sg_list[i].buf) {
+ break;
+ } else if (len <= sg_list[i].len) {
+ memcpy((void*)sg_list[i].buf, buf, len);
+ break;
+ } else {
+ memcpy((void*)sg_list[i].buf, buf, sg_list[i].len);
+ buf += sg_list[i].len;
+ len -= sg_list[i].len;
+ }
+ }
+}
+
+// The ISR does not have to do anything, the DSR does the real work.
+static cyg_uint32
+synth_eth_isr(cyg_vector_t vector, cyg_addrword_t data)
+{
+ cyg_drv_interrupt_acknowledge(vector);
+ return CYG_ISR_CALL_DSR;
+}
+
+// The DSR also does not have to do very much. The data argument is
+// actually the eth_drv_sc structure, which must match the vector.
+// Interrupts only go off when there are pending receives, so set the
+// rx_pending flag and call the generic DSR to do the real work.
+static void
+synth_eth_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data)
+{
+ struct eth_drv_sc* sc = (struct eth_drv_sc*) data;
+ synth_eth* eth = (synth_eth*)(sc->driver_private);
+ CYG_ASSERT(eth->interrupt == vector, "Interrupt vectors cannot change during a run");
+
+ eth->rx_pending = 1;
+ eth_drv_dsr(vector, count, data);
+}
+
+// ----------------------------------------------------------------------------
+// Delivery. This is invoked by a thread inside the TCP/IP stack, or by
+// the poll function.
+static void
+synth_eth_deliver(struct eth_drv_sc* sc)
+{
+ synth_eth* eth = (synth_eth*)(sc->driver_private);
+
+ if (eth->tx_done) {
+ eth->tx_done = 0;
+ (*sc->funs->eth_drv->tx_done)(sc, eth->tx_key, 1);
+ }
+ while (eth->rx_pending) {
+ int more = 1;
+ eth->rx_pending = 0;
+
+ while (more && eth->up && synth_auxiliary_running) {
+ synth_auxiliary_xchgmsg(eth->synth_id, SYNTH_ETH_RX, 0, 0, (void*) 0, 0,
+ &more, eth->rx_data, &(eth->rx_len), ETHERNET_MAXTU);
+ CYG_LOOP_INVARIANT(!more || (0 != eth->rx_len), "Auxiliary must send at least one packet if several are available");
+ if (eth->rx_len > 0) {
+ CYG_ASSERT((eth->rx_len >= ETHERNET_MINTU) && (eth->rx_len <= ETHERNET_MAXTU), "Only normal-sized ethernet packets are supported");
+ // Inform higher-level code that data is available.
+ // This should result in a call to recv() with a
+ // suitable sg_list. If out of memory, recv()
+ // will see a null pointer.
+ (*sc->funs->eth_drv->recv)(sc, eth->rx_len);
+ }
+ };
+ }
+}
+
+
+// ----------------------------------------------------------------------------
+// Polling support. Transmits are relatively straightforward because
+// all the hard work is handled by send(). Receives are rather more
+// complicated because interrupts are disabled so we never know when
+// there is really pending data. However deliver() will do the right
+// thing even if there is no data, so simply faking up an interrupt
+// is enough. This does mean extra traffic between application and
+// auxiliary, but polling does rather imply that.
+static void
+synth_eth_poll(struct eth_drv_sc* sc)
+{
+ synth_eth* eth = (synth_eth*)(sc->driver_private);
+ if (synth_auxiliary_running && eth->up) {
+ eth->rx_pending = 1;
+ }
+ synth_eth_deliver(sc);
+}
+
+static int
+synth_eth_intvector(struct eth_drv_sc* sc)
+{
+ synth_eth* eth = (synth_eth*)(sc->driver_private);
+ return eth->interrupt;
+}
+
+// ----------------------------------------------------------------------------
+// ioctl()'s.
+//
+// SET_MAC_ADDRESS is not currently implemented, and probably should
+// not be implemented because the underlying ethernet device may not
+// support it.
+//
+// SET_MC_ALL is supported if the underlying hardware does. This is
+// needed for IPV6 support. More selective multicasting via
+// SET_MC_LIST is not supported, because it imposes too heavy a
+// requirement on the underlying Linux device. SET_MC_LIST can be
+// used to disable multicast support.
+//
+// GET_IF_STATS_UD and GET_IF_STATS are not currently implemented
+static int
+synth_eth_ioctl(struct eth_drv_sc* sc, unsigned long key, void* data, int data_length)
+{
+ synth_eth* eth = (synth_eth*)(sc->driver_private);
+ int result = EINVAL;
+
+ switch(key) {
+ case ETH_DRV_SET_MC_ALL:
+ {
+ if (eth->multi_supported) {
+ synth_auxiliary_xchgmsg(eth->synth_id, SYNTH_ETH_MULTIALL, 1, 0, (unsigned char*) 0, 0,
+ (void*)0, (unsigned char*)0, (int*)0, 0);
+ result = 0;
+ }
+ break;
+ }
+ case ETH_DRV_SET_MC_LIST:
+ {
+ struct eth_drv_mc_list* mcl = (struct eth_drv_mc_list*) data;
+ if (eth->multi_supported && (0 == mcl->len)) {
+ synth_auxiliary_xchgmsg(eth->synth_id, SYNTH_ETH_MULTIALL, 0, 0, (unsigned char*) 0, 0,
+ (void*)0, (unsigned char*)0, (int*)0, 0);
+ result = 0;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+
+ return result;
+}
+
+// ----------------------------------------------------------------------------
+// Starting and stopping an interface. This includes restarting in
+// promiscuous mode.
+static void
+synth_eth_start(struct eth_drv_sc* sc, unsigned char* enaddr, int flags)
+{
+ synth_eth* eth = (synth_eth*)(sc->driver_private);
+
+ eth->up = 0;
+ eth->rx_pending = 0;
+
+ if ((-1 != eth->synth_id) && synth_auxiliary_running) {
+ synth_auxiliary_xchgmsg(eth->synth_id, SYNTH_ETH_START, flags & IFF_PROMISC, 0, (void*) 0, 0,
+ (int*)0, (void*) 0, (int*) 0, 0);
+ }
+ eth->up = 1;
+ if (enaddr != (unsigned char*)0) {
+ memcpy(enaddr, eth->MAC, 6);
+ }
+}
+
+static void
+synth_eth_stop(struct eth_drv_sc* sc)
+{
+ synth_eth* eth = (synth_eth*)(sc->driver_private);
+
+ eth->up = 0;
+ if ((-1 != eth->synth_id) && synth_auxiliary_running) {
+ synth_auxiliary_xchgmsg(eth->synth_id, SYNTH_ETH_STOP, 0, 0, (void*) 0, 0,
+ (int*) 0, (void*) 0, (int*) 0, 0);
+ }
+ eth->rx_pending = 0;
+}
+
+
+// ----------------------------------------------------------------------------
+// Initialization.
+//
+// This requires instantiating a device of class ethernet with a specific
+// device name held in the eth_drv_sc structure. No additional device data
+// is needed. If a device can be instantiated then the interrupt vector
+// and the MAC address can be obtained, and an interrupt handler can be
+// installed.
+static bool
+synth_eth_init(struct cyg_netdevtab_entry* ndp)
+{
+ bool result = false;
+ struct eth_drv_sc* sc = (struct eth_drv_sc*)(ndp->device_instance);
+ struct synth_eth* eth = (struct synth_eth*)(sc->driver_private);
+
+ if (synth_auxiliary_running) {
+ eth->synth_id = synth_auxiliary_instantiate("devs/eth/synth/ecosynth", SYNTH_MAKESTRING(CYGPKG_DEVS_ETH_ECOSYNTH), "ethernet",
+ sc->dev_name, (const char*) 0);
+
+ if (-1 != eth->synth_id) {
+ unsigned char data[7];
+ result = true;
+ synth_auxiliary_xchgmsg(eth->synth_id, SYNTH_ETH_GETPARAMS, 0, 0, (const unsigned char*) 0, 0,
+ (int *)&(eth->interrupt), data, 0, 7);
+ memcpy(eth->MAC, data, 6);
+ eth->multi_supported = data[6];
+ cyg_drv_interrupt_create(eth->interrupt,
+ 0,
+ (CYG_ADDRWORD) sc,
+ &synth_eth_isr,
+ &synth_eth_dsr,
+ &(eth->interrupt_handle),
+ &(eth->interrupt_data));
+ cyg_drv_interrupt_attach(eth->interrupt_handle);
+ cyg_drv_interrupt_unmask(eth->interrupt);
+ }
+ }
+ (*sc->funs->eth_drv->init)(sc, eth->MAC);
+
+#ifdef CYGPKG_NET
+ if (eth->multi_supported) {
+ sc->sc_arpcom.ac_if.if_flags |= IFF_ALLMULTI;
+ }
+#endif
+ return result;
+}
diff --git a/cesar/ecos/packages/devs/flash/sst/39vf400/current/ChangeLog b/cesar/ecos/packages/devs/flash/sst/39vf400/current/ChangeLog
new file mode 100644
index 0000000000..6332db4258
--- /dev/null
+++ b/cesar/ecos/packages/devs/flash/sst/39vf400/current/ChangeLog
@@ -0,0 +1,39 @@
+2003-07-24 Chris Garry <cgarry@sweeneydesign.co.uk>
+
+ * include/flash_sst_39vf400.inl:
+ * cdl/flash_sst_39vf400.cdl: New package/file(s).
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/devs/flash/sst/39vf400/current/cdl/flash_sst_39vf400.cdl b/cesar/ecos/packages/devs/flash/sst/39vf400/current/cdl/flash_sst_39vf400.cdl
new file mode 100755
index 0000000000..58d71be1ae
--- /dev/null
+++ b/cesar/ecos/packages/devs/flash/sst/39vf400/current/cdl/flash_sst_39vf400.cdl
@@ -0,0 +1,64 @@
+# ====================================================================
+#
+# flash_sst_39vf400.cdl
+#
+# FLASH memory - Hardware support for SST SST39vf400 device
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2002 Gary Thomas
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): Chris Garry <cgarry@sweeneydesign.co.uk>
+# Contributors:
+# Date: 2003-04-21
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_DEVS_FLASH_SST_39VF400 {
+ display "SST 39VF400 FLASH memory support"
+ description "FLASH memory device support for SST 39VF400"
+ parent CYGPKG_IO_FLASH
+ active_if CYGPKG_IO_FLASH
+ active_if CYGINT_DEVS_FLASH_SST_39VF400_REQUIRED
+
+ implements CYGHWR_IO_FLASH_DEVICE
+
+ include_dir cyg/io
+}
+
+# EOF flash_sst_39vf400.cdl \ No newline at end of file
diff --git a/cesar/ecos/packages/devs/flash/sst/39vf400/current/include/flash_sst_39vf400.inl b/cesar/ecos/packages/devs/flash/sst/39vf400/current/include/flash_sst_39vf400.inl
new file mode 100755
index 0000000000..03bde70ea4
--- /dev/null
+++ b/cesar/ecos/packages/devs/flash/sst/39vf400/current/include/flash_sst_39vf400.inl
@@ -0,0 +1,390 @@
+#ifndef CYGONCE_DEVS_FLASH_SST_39VF400_INL
+#define CYGONCE_DEVS_FLASH_SST_39VF400_INL
+//==========================================================================
+//
+// flash_sst_39vf4000.inl
+//
+// SST SST39VF400 FLASH driver
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Chris Garry <cgarry@sweeneydesign.co.uk>
+// Contributors:
+// Date: 2003-04-21
+// Purpose:
+// Description: SST SST39VF400 flash driver
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/devs_flash_sst_39vf400.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_cache.h>
+#include <cyg/hal/hal_diag.h> /* HAL_DELAY_US */
+#include <cyg/infra/diag.h> /* Required for diag_printf */
+#include CYGHWR_MEMORY_LAYOUT_H
+
+#define _FLASH_PRIVATE_
+#include <cyg/io/flash.h>
+
+//----------------------------------------------------------------------------
+// Platform code must define the below
+// #define CYGNUM_FLASH_INTERLEAVE : Number of interleaved devices (in parallel)
+// #define CYGNUM_FLASH_SERIES : Number of devices in series
+// #define CYGNUM_FLASH_BASE : Base address of the FLASH
+//
+// Note:
+// Currently the driver only supports CYGNUM_FLASH_INTERLEAVE = 1 and
+// CYGNUM_FLASH_SERIES = 1
+
+
+// Definitions for the SST 39VF400A part
+#define SST_ID 0x00BF /* SST Manufacturer's ID code */
+#define SST_39VF400A 0x2780 /* SST39VF400/SST39VF400A device code */
+#define CYGNUM_FLASH_SECTOR_SIZE (0x1000) /* Size of physical sectors */
+#define CYGNUM_FLASH_BLOCK_SIZE (0x1000) /* Driver 'blocks' may be a multiple of physical sectors */
+#define CYGNUM_FLASH_BLOCK_NUM (0x80000/CYGNUM_FLASH_BLOCK_SIZE) /* Number of blocks */
+#define CYGNUM_FLASH_WIDTH (16) /* This part is always 16 bits wide */
+#define CYGNUM_FLASH_BLANK (1)
+
+
+#ifndef FLASH_P2V
+# define FLASH_P2V( _a_ ) ((volatile flash_data_t *)((CYG_ADDRWORD)(_a_)))
+#endif
+#ifndef CYGHWR_FLASH_AM29XXXXX_PLF_INIT
+# define CYGHWR_FLASH_AM29XXXXX_PLF_INIT()
+#endif
+
+// Structure to hold device ID
+typedef struct
+{
+ cyg_uint16 man_id;
+ cyg_uint16 dev_id;
+} device_id_t;
+
+// FLASH registers
+volatile cyg_uint16 *flash_data_add0 = (cyg_uint16 *)(CYGNUM_FLASH_BASE);
+volatile cyg_uint16 *flash_data_add1 = (cyg_uint16 *)(CYGNUM_FLASH_BASE + (0x0001 << 1));
+volatile cyg_uint16 *flash_cmd_add1 = (cyg_uint16 *)(CYGNUM_FLASH_BASE + (0x5555 << 1));
+volatile cyg_uint16 *flash_cmd_add2 = (cyg_uint16 *)(CYGNUM_FLASH_BASE + (0x2AAA << 1));
+volatile cyg_uint16 *flash_cmd_add3 = (cyg_uint16 *)(CYGNUM_FLASH_BASE + (0x5555 << 1));
+volatile cyg_uint16 *flash_cmd_add4 = (cyg_uint16 *)(CYGNUM_FLASH_BASE + (0x5555 << 1));
+volatile cyg_uint16 *flash_cmd_add5 = (cyg_uint16 *)(CYGNUM_FLASH_BASE + (0x2AAA << 1));
+
+
+//----------------------------------------------------------------------------
+// Now that device properties are defined, include magic for defining
+// accessor type and constants.
+#include <cyg/io/flash_dev.h>
+
+//----------------------------------------------------------------------------
+// Functions that put the flash device into non-read mode must reside
+// in RAM.
+static device_id_t get_device_id(void) __attribute__ ((section (".2ram.get_device_id")));
+int flash_erase_block(void* block, unsigned int size)
+ __attribute__ ((section (".2ram.flash_erase_block")));
+int flash_program_buf(void* addr, void* data, int len)
+ __attribute__ ((section (".2ram.flash_program_buf")));
+
+//----------------------------------------------------------------------------
+// Get Device ID
+//
+// Reads the manufacturer and part number codes for the device
+//
+static device_id_t get_device_id(void)
+{
+ device_id_t device_id;
+ int i;
+
+ /* Issue the Software ID command */
+ *flash_cmd_add1 = 0xAAAA;
+ *flash_cmd_add2 = 0x5555;
+ *flash_cmd_add3 = 0x9090;
+
+ /* Tida delay time, Tida = 150 ns */
+ /* Can use any function that is in ROM */
+ for (i = 0; i < 100; i++)
+ {
+ /* Do nothing */
+ }
+
+ /* Read the product ID */
+ device_id.man_id = *flash_data_add0 & 0xFF;
+ device_id.dev_id = *flash_data_add1;
+
+ /* Issue the Software ID EXIT command */
+ *flash_data_add0 = 0xF0F0;
+
+ /* Tida delay time, Tida = 150 ns */
+ /* Can use any function that is in ROM */
+ for (i = 0; i < 100; i++)
+ {
+ /* Do nothing */
+ }
+
+ return(device_id);
+}
+
+
+//----------------------------------------------------------------------------
+// Initialize driver details
+//
+int flash_hwr_init(void)
+{
+ device_id_t device_id;
+
+ /* Call the function to get the device ID */
+ device_id = get_device_id();
+
+ /* Determine whether there is a SST39VF400A installed or not */
+ if ((device_id.man_id != SST_ID) || (device_id.dev_id != SST_39VF400A))
+ {
+ return FLASH_ERR_DRV_WRONG_PART;
+ }
+
+ // Hard wired for now
+ flash_info.block_size = CYGNUM_FLASH_BLOCK_SIZE;
+ flash_info.blocks = CYGNUM_FLASH_BLOCK_NUM;
+ flash_info.start = (void *)CYGNUM_FLASH_BASE;
+ flash_info.end = (void *)(CYGNUM_FLASH_BASE + (flash_info.block_size * flash_info.blocks));
+
+ return FLASH_ERR_OK;
+}
+
+//----------------------------------------------------------------------------
+// Map a hardware status to a package error
+int flash_hwr_map_error(int e)
+{
+ return e;
+}
+
+
+//----------------------------------------------------------------------------
+// See if a range of FLASH addresses overlaps currently running code
+bool flash_code_overlaps(void *start, void *end)
+{
+ extern unsigned char _stext[], _etext[];
+
+ return ((((unsigned long)&_stext >= (unsigned long)start) &&
+ ((unsigned long)&_stext < (unsigned long)end)) ||
+ (((unsigned long)&_etext >= (unsigned long)start) &&
+ ((unsigned long)&_etext < (unsigned long)end)));
+}
+
+//----------------------------------------------------------------------------
+// Erase Block
+// This function actually uses the sector erase command instead of the block
+// erase command. this allows for the effective block size to be smaller
+// than 64K (as small as the 4K sector size)
+int flash_erase_block(void* block, unsigned int size)
+{
+
+ volatile cyg_uint16 *block_addr;
+ volatile cyg_uint16 *verify_addr;
+ int verify_failed;
+ cyg_uint32 i, timeout;
+ int j;
+ int retry;
+
+ block_addr = block;
+
+ for (j = 0; j < (size / CYGNUM_FLASH_SECTOR_SIZE); j++)
+ {
+ retry = 0;
+ while (retry < 16)
+ {
+ /* Issue the Sector-Erase command */
+ *flash_cmd_add1 = 0xAAAA;
+ *flash_cmd_add2 = 0x5555;
+ *flash_cmd_add3 = 0x8080;
+ *flash_cmd_add4 = 0xAAAA;
+ *flash_cmd_add5 = 0x5555;
+ *block_addr = 0x3030; /* Sector Erase command */
+
+ /* Wait for the Erase operation to complete */
+ /* With a timeout to stop the board locking up with a H/W error*/
+ timeout = 0;
+ i = 0;
+ while (i < 5)
+ {
+ if (*block_addr == 0xFFFF)
+ {
+ i++;
+ }
+ else
+ {
+ i = 0;
+ }
+
+ if (++timeout > 0x01000000)
+ {
+ /* Timeout - return with ERROR status */
+ return (FLASH_ERR_DRV_TIMEOUT);
+ }
+ }
+
+ /* Verify this sector has been erased */
+ verify_addr = block_addr;
+ verify_failed = 0;
+ while ((cyg_uint32)(verify_addr) < ((cyg_uint32)block_addr + (cyg_uint32)CYGNUM_FLASH_SECTOR_SIZE))
+ {
+ if (*verify_addr != 0xFFFF)
+ {
+ /* Error verifying segment data */
+ retry++;
+ verify_failed = 1;
+ break;
+ }
+ ++verify_addr;
+ }
+
+ if (verify_failed == 0)
+ {
+ /* Sector erase verified */
+ break;
+ }
+ }
+
+ /* Increment the block address by 1 sector */
+ (cyg_uint32)block_addr += CYGNUM_FLASH_SECTOR_SIZE;
+ }
+
+ /* Verify the entire block has been set to all 0xFFFFs */
+ block_addr = block;
+ while ((cyg_uint32)(block_addr) < ((cyg_uint32)block + (cyg_uint32)size))
+ {
+ if (*block_addr != 0xFFFF)
+ {
+ /* Error verifying data */
+ return (FLASH_ERR_DRV_VERIFY);
+ }
+
+ ++block_addr;
+ }
+
+ return (FLASH_ERR_OK);
+}
+
+
+//----------------------------------------------------------------------------
+// Program Buffer
+int
+flash_program_buf(void* addr, void* data, int len)
+{
+ volatile cyg_uint16 *write_ptr;
+ volatile cyg_uint16 *data_ptr;
+ int i;
+ cyg_uint32 timeout;
+ cyg_uint16 read_data1, read_data2;
+
+ write_ptr = addr; /* Initialise local pointers */
+ data_ptr = data;
+
+ /* Loop for writing the data */
+ while ((cyg_uint32)write_ptr < ((cyg_uint32)addr + (cyg_uint32)len))
+ {
+ /* Write word of data to FLASH */
+ /* Issue the Word-Program command */
+ *flash_cmd_add1 = 0xAAAA;
+ *flash_cmd_add2 = 0x5555;
+ *flash_cmd_add3 = 0xA0A0;
+ /* Write data word to FLASH */
+ *write_ptr = *data_ptr;
+
+ /* Wait for the operation to complete */
+ /* Wait for the Erase operation to complete */
+ /* With a timeout to stop the board locking up with a H/W error*/
+ timeout = 0;
+ i = 0;
+ while (i < 5)
+ {
+ read_data1 = *write_ptr;
+ read_data2 = *write_ptr;
+ if (read_data1 == read_data2)
+ {
+ /* Bit 6 can no longer be toggling */
+ i++;
+ }
+ else
+ {
+ i = 0;
+ }
+
+ if (++timeout > 0x01000000)
+ {
+ /* Timeout - return with ERROR status */
+ return (FLASH_ERR_DRV_TIMEOUT);
+ }
+ }
+
+ /* Increment pointers to next words */
+ ++write_ptr;
+ ++data_ptr;
+ }
+
+ /* Data write complete - verify the data */
+ write_ptr = addr; /* Re-initialise local pointers */
+ data_ptr = data;
+
+ /* Loop for verifying the data */
+ while ((cyg_uint32)write_ptr < ((cyg_uint32)addr + (cyg_uint32)len))
+ {
+ if (*write_ptr != *data_ptr)
+ {
+ /* Error verifying data */
+ return (FLASH_ERR_DRV_VERIFY);
+ }
+
+ /* Increment pointers to next words */
+ ++write_ptr;
+ ++data_ptr;
+ }
+
+ return (FLASH_ERR_OK);
+}
+
+#endif // CYGONCE_DEVS_FLASH_SST_39VF400_INL
+
+
+
+
+
+
+
diff --git a/cesar/ecos/packages/devs/flash/synth/current/ChangeLog b/cesar/ecos/packages/devs/flash/synth/current/ChangeLog
new file mode 100644
index 0000000000..9dd8956da1
--- /dev/null
+++ b/cesar/ecos/packages/devs/flash/synth/current/ChangeLog
@@ -0,0 +1,83 @@
+2005-08-02 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * tests/flash1.c (cyg_user_start): Fix a compiler warning about
+ signedness of pointers.
+
+2005-07-30 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/synth.c (flash_hwr_init): Cast to keep the compiler happy.
+
+2005-03-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * tests/flash1.c: gcc 3.x does not like string continuing
+ over lines with the " open.
+
+2004-12-15 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/synth.c: Moved cyg_hal_sys_mmap into the HAL.
+
+2003-11-20 Jani Monoses <jani@iv.ro>
+
+ tests/flash1.c: Update flash_init() call to reflect
+ new prototype.
+
+2002-01-23 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/flash_synth.cdl: Add CYGMEM_FLASH_SYNTH_BASE to allow
+ imposition of base address.
+ Add CYGSEM_FLASH_SYNTH_FILE_WRITEBACK to allow changes to be
+ reflected in the underlying file.
+ * src/synth.c (flash_hwr_init): Implement CYGMEM_FLASH_SYNTH_BASE and
+ CYGSEM_FLASH_SYNTH_FILE_WRITEBACK using appropriate args to mmap().
+ Include <string.h> to avoid warning.
+
+2002-01-11 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/synth.c (flash_hwr_init): Initialize to 0xff if the file
+ needs creating.
+ * cdl/flash_synth.cdl: requires errno codes.
+
+2002-01-08 Jonathan Larmour <jlarmour@redhat.com>
+2001-11-1 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * First version. Implements synthetic flash for the synthetic
+ target.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+
+
+
+
diff --git a/cesar/ecos/packages/devs/flash/synth/current/cdl/flash_synth.cdl b/cesar/ecos/packages/devs/flash/synth/current/cdl/flash_synth.cdl
new file mode 100644
index 0000000000..481f1831fd
--- /dev/null
+++ b/cesar/ecos/packages/devs/flash/synth/current/cdl/flash_synth.cdl
@@ -0,0 +1,130 @@
+# ====================================================================
+#
+# flash_synth.cdl
+#
+# FLASH memory - Synthetic flash driver for Synthetic target
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): andrew.lunn@ascom.ch
+# Contributors: jlarmour
+# Date: 2000-10-30
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_DEVS_FLASH_SYNTH {
+ display "Synthetic FLASH memory support"
+
+ parent CYGPKG_IO_FLASH
+ active_if CYGPKG_IO_FLASH
+ requires CYGINT_ISO_ERRNO_CODES
+
+ implements CYGHWR_IO_FLASH_DEVICE
+
+ include_dir .
+ include_files ; # none _exported_ whatsoever
+ description "FLASH memory device support for Synthetic target"
+ compile synth.c flash_erase_block.c flash_program_buf.c flash_query.c
+
+ cdl_option CYGMEM_FLASH_SYNTH_BASE {
+ display "Base address of flash"
+ flavor booldata
+ default_value 0
+ description "
+ If enabled, controls where in the synth target memory map the
+ flash is mapped. WARNING: This must be somewhere
+ the host Linux kernel is prepaired to mmap a file. It
+ must be page aligned. For hosts with recent x86 Linux kernels,
+ a value of 0x40000000 is likely appropriate. When disabled,
+ the driver will automatically use whatever address the kernel
+ provides it with."
+ }
+
+ cdl_option CYGSEM_FLASH_SYNTH_FILE_WRITEBACK {
+ display "FLASH changes modify the underlying file"
+ flavor booldata
+ default_value 0
+ description "
+ If enabled, changes made to the contents of the emulated
+ FLASH are reflected in the underlying file. Otherwise,
+ the file will be left unaffected by any changes the program
+ makes to FLASH contents."
+ }
+
+ cdl_option CYGNUM_FLASH_SYNTH_BLOCKSIZE {
+ display "Size of one block of synth flash"
+ flavor data
+ default_value 65536
+ legal_values 4096 to 999999
+ requires { (CYGNUM_FLASH_SYNTH_BLOCKSIZE % 4096) == 0 }
+ description "
+ This controls the size of one block of flash. This is
+ the minimum size that can be erased."
+ }
+
+ cdl_option CYGNUM_FLASH_SYNTH_NUMBLOCKS {
+ display "Number of blocks in the synth flash"
+ flavor data
+ default_value 16
+ description "
+ This controls how many blocks there are in the flash"
+ }
+
+ cdl_option CYGDAT_FLASH_SYNTH_FILENAME {
+ display "Name of file emulating synth flash"
+ flavor data
+ default_value { "\"synth.flash\"" }
+ description "
+ This is the name of the file which holds the contents of
+ the flash. It is mmap'ed into memory and written for flash
+ program & erase operations. It will be created if it does
+ not exist."
+ }
+
+ cdl_option CYGPKG_DEVS_FLASH_SYNTH_TESTS {
+ display "Synth flash tests"
+ flavor data
+ no_define
+ calculated { "tests/flash1.c"}
+ description "
+ This option specifies the set of tests for the synth flash package."
+ }
+}
+
+# EOF flash_synth.cdl
diff --git a/cesar/ecos/packages/devs/flash/synth/current/src/flash_erase_block.c b/cesar/ecos/packages/devs/flash/synth/current/src/flash_erase_block.c
new file mode 100644
index 0000000000..e9fc88576c
--- /dev/null
+++ b/cesar/ecos/packages/devs/flash/synth/current/src/flash_erase_block.c
@@ -0,0 +1,90 @@
+//==========================================================================
+//
+// flash_erase_block.c
+//
+// Flash programming
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): andrew.lunn@ascom.ch
+// Contributors: andrew.lunn
+// Date: 2001-10-30
+// Purpose:
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include "synth.h"
+
+#include <cyg/hal/hal_io.h>
+#include <pkgconf/devs_flash_synth.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/io/flash.h>
+#include <string.h> // memset
+
+/* This helps speed up the erase. */
+static char empty[4096];
+static cyg_bool empty_inited = false;
+
+int flash_erase_block(volatile flash_t *block, unsigned int block_size)
+{
+ int i;
+ int offset = (int)block;
+ offset -= (int)cyg_dev_flash_synth_base;
+
+ cyg_hal_sys_lseek(cyg_dev_flash_synth_flashfd, offset,
+ CYG_HAL_SYS_SEEK_SET);
+
+ if (!empty_inited) {
+ memset(empty, 0xff, sizeof(empty));
+ empty_inited = true;
+ }
+
+ CYG_ASSERT(sizeof(empty) < block_size,
+ "Eckk! Can't work with such small blocks");
+ CYG_ASSERT((block_size % sizeof(empty)) == 0,
+ "Eckk! Can't work with that odd size block");
+
+ for (i=0; (i * sizeof(empty)) < block_size; i++) {
+ cyg_hal_sys_write(cyg_dev_flash_synth_flashfd, empty, sizeof(empty));
+ }
+ return FLASH_ERR_OK;
+}
+
+
diff --git a/cesar/ecos/packages/devs/flash/synth/current/src/flash_program_buf.c b/cesar/ecos/packages/devs/flash/synth/current/src/flash_program_buf.c
new file mode 100644
index 0000000000..1af0ed00a6
--- /dev/null
+++ b/cesar/ecos/packages/devs/flash/synth/current/src/flash_program_buf.c
@@ -0,0 +1,71 @@
+//==========================================================================
+//
+// flash_program_buf.c
+//
+// Flash programming
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Andrew.Lunn@ascom.ch
+// Contributors: andrew.lunn
+// Date: 2001-10-30
+// Purpose:
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include "synth.h"
+
+#include <pkgconf/devs_flash_synth.h>
+#include <cyg/hal/hal_io.h>
+#include <cyg/io/flash.h>
+
+int
+flash_program_buf(volatile flash_t *addr, flash_t *data, int len,
+ unsigned long block_mask, int buffer_size)
+{
+
+ int offset = (int)addr;
+ offset -= (int)cyg_dev_flash_synth_base;
+
+ cyg_hal_sys_lseek(cyg_dev_flash_synth_flashfd, offset, CYG_HAL_SYS_SEEK_SET);
+ cyg_hal_sys_write(cyg_dev_flash_synth_flashfd, data, len);
+
+ return FLASH_ERR_OK;
+}
diff --git a/cesar/ecos/packages/devs/flash/synth/current/src/flash_query.c b/cesar/ecos/packages/devs/flash/synth/current/src/flash_query.c
new file mode 100644
index 0000000000..3211819400
--- /dev/null
+++ b/cesar/ecos/packages/devs/flash/synth/current/src/flash_query.c
@@ -0,0 +1,62 @@
+//==========================================================================
+//
+// flash_query.c
+//
+// Flash programming - query device
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): andrew.lunn@ascom.ch
+// Contributors: andrew.lunn
+// Date: 2001-10-30
+// Purpose:
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#define QUERY "Linux Synthetic Flash"
+
+#include <string.h> // memcpy
+
+int
+flash_query(unsigned char *data)
+{
+ memcpy(data,QUERY,sizeof(QUERY));
+ return 0;
+}
diff --git a/cesar/ecos/packages/devs/flash/synth/current/src/synth.c b/cesar/ecos/packages/devs/flash/synth/current/src/synth.c
new file mode 100644
index 0000000000..454e781fd1
--- /dev/null
+++ b/cesar/ecos/packages/devs/flash/synth/current/src/synth.c
@@ -0,0 +1,158 @@
+//==========================================================================
+//
+// synth.c
+//
+// Flash programming
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): andrew.lunn@ascom.ch
+// Contributors: jlarmour
+// Date: 2001-10-30
+// Purpose:
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/devs_flash_synth.h>
+
+#include <cyg/hal/hal_io.h>
+#include <cyg/infra/cyg_ass.h>
+#include <errno.h>
+#include <string.h>
+
+#define _FLASH_PRIVATE_
+#include <cyg/io/flash.h>
+
+#include "synth.h"
+
+/* Holds the fd for the flash file */
+int cyg_dev_flash_synth_flashfd;
+
+/* Holds the base address of the mmap'd region */
+flash_t *cyg_dev_flash_synth_base;
+
+int
+flash_hwr_init(void)
+{
+ flash_info.block_size = CYGNUM_FLASH_SYNTH_BLOCKSIZE;
+ flash_info.buffer_size = 0;
+ flash_info.blocks = CYGNUM_FLASH_SYNTH_NUMBLOCKS;
+
+ cyg_dev_flash_synth_flashfd = cyg_hal_sys_open(CYGDAT_FLASH_SYNTH_FILENAME,
+ CYG_HAL_SYS_O_RDWR,
+ CYG_HAL_SYS_S_IRWXU|CYG_HAL_SYS_S_IRWXG|CYG_HAL_SYS_S_IRWXO);
+ if (cyg_dev_flash_synth_flashfd == -ENOENT) {
+ long w, bytesleft;
+ char buf[128];
+
+ cyg_dev_flash_synth_flashfd = cyg_hal_sys_open(
+ CYGDAT_FLASH_SYNTH_FILENAME,
+ CYG_HAL_SYS_O_RDWR|CYG_HAL_SYS_O_CREAT,
+ CYG_HAL_SYS_S_IRWXU|CYG_HAL_SYS_S_IRWXG|CYG_HAL_SYS_S_IRWXO);
+ CYG_ASSERT( cyg_dev_flash_synth_flashfd >= 0,
+ "Opening of the file for the synth flash failed!");
+ // fill with 0xff
+ memset( buf, 0xff, sizeof(buf) );
+ bytesleft = CYGNUM_FLASH_SYNTH_BLOCKSIZE * CYGNUM_FLASH_SYNTH_NUMBLOCKS;
+ while (bytesleft > 0)
+ {
+ int bytesneeded;
+ bytesneeded = bytesleft < sizeof(buf) ? bytesleft : sizeof(buf);
+
+ w = cyg_hal_sys_write( cyg_dev_flash_synth_flashfd, buf,
+ bytesneeded );
+ CYG_ASSERT(w == bytesneeded, "initialization of flash file failed");
+ bytesleft -= bytesneeded;
+ } // while
+ }
+ CYG_ASSERT( cyg_dev_flash_synth_flashfd >= 0,
+ "Opening of the file for the synth flash failed!");
+ if ( cyg_dev_flash_synth_flashfd <= 0 ) {
+ return FLASH_ERR_HWR;
+ }
+ cyg_dev_flash_synth_base = (flash_t *)cyg_hal_sys_mmap(
+#ifdef CYGMEM_FLASH_SYNTH_BASE
+ (void *)CYGMEM_FLASH_SYNTH_BASE,
+#else
+ NULL,
+#endif
+ (CYGNUM_FLASH_SYNTH_BLOCKSIZE * CYGNUM_FLASH_SYNTH_NUMBLOCKS),
+ CYG_HAL_SYS_PROT_READ,
+#ifdef CYGSEM_FLASH_SYNTH_FILE_WRITEBACK
+ CYG_HAL_SYS_MAP_SHARED
+#else
+ CYG_HAL_SYS_MAP_PRIVATE
+#endif
+#ifdef CYGMEM_FLASH_SYNTH_BASE
+ |CYG_HAL_SYS_MAP_FIXED
+#endif
+ , cyg_dev_flash_synth_flashfd, 0 );
+ CYG_ASSERT( cyg_dev_flash_synth_base > 0, "mmap of flash file failed!" );
+
+ if (cyg_dev_flash_synth_base <= 0) {
+ return FLASH_ERR_HWR;
+ }
+ flash_info.start = cyg_dev_flash_synth_base;
+ flash_info.end = (void *)(((char *)cyg_dev_flash_synth_base) +
+ (CYGNUM_FLASH_SYNTH_BLOCKSIZE * CYGNUM_FLASH_SYNTH_NUMBLOCKS));
+
+ return FLASH_ERR_OK;
+}
+
+// Map a hardware status to a package error
+int
+flash_hwr_map_error(int err)
+{
+ return err;
+}
+
+// See if a range of FLASH addresses overlaps currently running code
+bool
+flash_code_overlaps(void *start, void *end)
+{
+ extern char _stext[], _etext[];
+
+ return ((((unsigned long)&_stext >= (unsigned long)start) &&
+ ((unsigned long)&_stext < (unsigned long)end)) ||
+ (((unsigned long)&_etext >= (unsigned long)start) &&
+ ((unsigned long)&_etext < (unsigned long)end)));
+}
+
+// EOF synth.c
diff --git a/cesar/ecos/packages/devs/flash/synth/current/src/synth.h b/cesar/ecos/packages/devs/flash/synth/current/src/synth.h
new file mode 100644
index 0000000000..046a8a104f
--- /dev/null
+++ b/cesar/ecos/packages/devs/flash/synth/current/src/synth.h
@@ -0,0 +1,64 @@
+#ifndef CYGONCE_DEVS_FLASH_SYNTH_SYNTH_H
+#define CYGONCE_DEVS_FLASH_SYNTH_SYNTH_H
+//==========================================================================
+//
+// synth.h
+//
+// synth Flash programming - device constants, etc.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): andrew.lunn@ascom.ch
+// Contributors: andrew.lunn
+// Date: 2001-10-30
+// Purpose:
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <cyg/infra/cyg_type.h>
+
+typedef unsigned long flash_t;
+__externC int cyg_dev_flash_synth_flashfd;
+__externC flash_t *cyg_dev_flash_synth_base;
+
+#endif // CYGONCE_DEVS_FLASH_SYNTH_SYNTH_H
+// ------------------------------------------------------------------------
+// EOF synth.h
diff --git a/cesar/ecos/packages/devs/flash/synth/current/tests/flash1.c b/cesar/ecos/packages/devs/flash/synth/current/tests/flash1.c
new file mode 100644
index 0000000000..dd8f875b5b
--- /dev/null
+++ b/cesar/ecos/packages/devs/flash/synth/current/tests/flash1.c
@@ -0,0 +1,188 @@
+/* Hay, the copyright is usefull for something! */
+
+static char copyright[] =
+"//=========================================================================="
+"//"
+"// flash1.c"
+"//"
+"// Test flash operations for the synth target synth flash driver"
+"//"
+"//=========================================================================="
+"//####ECOSGPLCOPYRIGHTBEGIN####"
+"// -------------------------------------------"
+"// This file is part of eCos, the Embedded Configurable Operating System."
+"// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc."
+"//"
+"// eCos is free software; you can redistribute it and/or modify it under"
+"// the terms of the GNU General Public License as published by the Free"
+"// Software Foundation; either version 2 or (at your option) any later version."
+"//"
+"// eCos is distributed in the hope that it will be useful, but WITHOUT ANY"
+"// WARRANTY; without even the implied warranty of MERCHANTABILITY or"
+"// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License"
+"// for more details."
+"//"
+"// You should have received a copy of the GNU General Public License along"
+"// with eCos; if not, write to the Free Software Foundation, Inc.,"
+"// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA."
+"//"
+"// As a special exception, if other files instantiate templates or use macros"
+"// or inline functions from this file, or you compile this file and link it"
+"// with other works to produce a work based on this file, this file does not"
+"// by itself cause the resulting work to be covered by the GNU General Public"
+"// License. However the source code for this file must still be made available"
+"// in accordance with section (3) of the GNU General Public License."
+"//"
+"// This exception does not invalidate any other reasons why a work based on"
+"// this file might be covered by the GNU General Public License."
+"//"
+"// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc."
+"// at http://sources.redhat.com/ecos/ecos-license/"
+"// -------------------------------------------"
+"//####ECOSGPLCOPYRIGHTEND####"
+"//=========================================================================="
+"//#####DESCRIPTIONBEGIN####"
+"//"
+"// Author(s): andrew.lunn@ascom.ch"
+"// Contributors: andrew.lunn"
+"// Date: 2000-10-31"
+"// Purpose: Test a flash driver"
+"// Description: Try out a number of flash operations and make sure"
+"// what is in the flash is what we expeect."
+"// "
+"//####DESCRIPTIONEND####"
+"//"
+"//=========================================================================="
+;
+
+#include <cyg/io/flash.h>
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h>
+
+#include <string.h>
+
+#ifndef CYGINT_ISO_STRING_STRFUNCS
+# define NA_MSG "Need string functions for test"
+#endif
+
+#ifdef NA_MSG
+void cyg_user_start(void)
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( NA_MSG );
+}
+#else
+
+//==========================================================================
+// main
+
+void cyg_user_start(void)
+{
+ int ret;
+ char data[1024];
+ void *flash_start, *flash_end;
+ int block_size, blocks;
+ char *prog_start;
+ unsigned char * ptr;
+
+ CYG_TEST_INIT();
+
+ ret=flash_init((_printf *)diag_printf);
+
+ CYG_TEST_PASS_FAIL((ret == FLASH_ERR_OK),"flash_init");
+
+ flash_dev_query(data);
+ CYG_TEST_PASS_FAIL(!strncmp(data,"Linux Synthetic Flash",sizeof(data)),
+ "flash_query");
+
+ ret = flash_get_limits(NULL,&flash_start,&flash_end);
+ CYG_TEST_PASS_FAIL((ret == FLASH_ERR_OK),"flash_get_limits");
+
+ ret = flash_get_block_info(&block_size, &blocks);
+ CYG_TEST_PASS_FAIL((ret == FLASH_ERR_OK),"flash_get_block_info");
+
+ /* Erase the whole flash. Not recommended on real hardware since this
+ will probably erase the bootloader etc!!! */
+ ret=flash_erase(flash_start,block_size * blocks,NULL);
+ CYG_TEST_PASS_FAIL((ret == FLASH_ERR_OK),"flash_erase1");
+
+ /* check that its actually been erased, and test the mmap area */
+ for (ptr=flash_start,ret=0; ptr < (unsigned char *)flash_end; ptr++) {
+ if (*ptr != 0xff) {
+ ret++;
+ }
+ }
+
+ CYG_TEST_PASS_FAIL((ret == 0),"flash empty check");
+
+ ret = flash_program(flash_start,&copyright,sizeof(copyright),NULL);
+ CYG_TEST_PASS_FAIL((ret == FLASH_ERR_OK),"flash_program1");
+
+ /* Check the contents made it into the flash */
+ CYG_TEST_PASS_FAIL(!strncmp(flash_start,copyright,sizeof(copyright)),
+ "flash program contents");
+
+ /* .. and check nothing else changed */
+ for (ptr=(unsigned char *)flash_start+sizeof(copyright),ret=0;
+ ptr < (unsigned char *)flash_end; ptr++) {
+ if (*ptr != 0xff) {
+ ret++;
+ }
+ }
+
+ CYG_TEST_PASS_FAIL((ret == 0),"flash program overrun check");
+
+ /* Program over a block boundary */
+ prog_start = (char *)flash_start + block_size - sizeof(copyright)/2;
+ ret = flash_program(prog_start,&copyright,sizeof(copyright),NULL);
+ CYG_TEST_PASS_FAIL((ret == FLASH_ERR_OK),"flash_program2");
+
+ /* Check the first version is still OK */
+ CYG_TEST_PASS_FAIL(!strncmp(flash_start,copyright,sizeof(copyright)),
+ "Original contents");
+
+ CYG_TEST_PASS_FAIL(!strncmp(prog_start,copyright,sizeof(copyright)),
+ "New program contents");
+
+ /* Check the bit in between is still erased */
+ for (ptr=(unsigned char *)flash_start+sizeof(copyright),ret=0;
+ ptr < (unsigned char *)prog_start; ptr++) {
+ if (*ptr != 0xff) {
+ ret++;
+ }
+ }
+ CYG_TEST_PASS_FAIL((ret == 0),"flash erase check1");
+
+ /* Erase the second block and make sure the first is not erased */
+ ret=flash_erase((void *)((unsigned)flash_start+block_size),
+ block_size,NULL);
+ CYG_TEST_PASS_FAIL((ret == FLASH_ERR_OK),"flash_erase2");
+
+ /* Check the erase worked */
+ for (ptr=(unsigned char *)flash_start+block_size,ret=0;
+ ptr < (unsigned char *)flash_start+block_size*2; ptr++) {
+ if (*ptr != 0xff) {
+ ret++;
+ }
+ }
+
+ CYG_TEST_PASS_FAIL((ret == 0), "flash erase check2");
+
+ /* Lastly check the first half of the copyright message is still there */
+ CYG_TEST_PASS_FAIL(!strncmp(prog_start,copyright,sizeof(copyright)/2),
+ "Block 1 OK");
+
+#if 0
+ /* This test it fatal! Its not run by default!
+ Check the flash is read only, by trying to write to it. We expect
+ to get an exception */
+
+ *(char *)flash_start = 'a';
+#endif
+
+ CYG_TEST_PASS_FINISH("flash1");
+}
+
+#endif /* ifndef NA_MSG */
+
+/* EOF flash1.c */
diff --git a/cesar/ecos/packages/devs/serial/generic/16x5x/current/ChangeLog b/cesar/ecos/packages/devs/serial/generic/16x5x/current/ChangeLog
new file mode 100644
index 0000000000..86f8354cfb
--- /dev/null
+++ b/cesar/ecos/packages/devs/serial/generic/16x5x/current/ChangeLog
@@ -0,0 +1,306 @@
+2003-09-19 Gary Thomas <gary@mlbassoc.com>
+
+ * src/ser_16x5x.c (pc_serial_init):
+ Allow platform to define CYG_IO_SERIAL_GENERIC_16X5X_BAUD_GENERATOR if the
+ baud rate clock (values) cannot be known at compile time. In this case,
+ the baud rate generator values are provided by platform specific code,
+ computed when the device is first initialized.
+
+2003-07-16 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/ser_16x5x.c (CYG_IO_SERIAL_GENERIC_16X5X_INT_PRIORITY): Add
+ so that the calling hardware-specific drivers can override priorities.
+ Clarify flow control comment.
+
+2003-03-18 Gary Thomas <gary@mlbassoc.com>
+
+ * src/ser_16x5x.c (pc_serial_set_config):
+ Flag for CYG_IO_SET_CONFIG_SERIAL_HW_RX_FLOW_THROTTLE is 32 bits.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/ser_generic_16x5x.cdl: Remove irrelevant doc link.
+
+2001-06-19 Jesper Skov <jskov@redhat.com>
+
+ * cdl/ser_generic_16x5x.cdl: Only define
+ CYGDAT_IO_SERIAL_DEVICE_HEADER when necessary.
+
+2001-06-18 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/ser_16x5x.c (pc_serial_set_config): Fix length check typo
+
+2001-06-18 Jesper Skov <jskov@masala.cambridge.redhat.com>
+
+ * src/ser_16x5x.c (LCR_PE): Set correct bits (from Boris V. Guzhov)
+
+2001-06-08 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/ser_16x5x.c: Support FIFOs better by detecting what we've got,
+ and only acting if we have a _working_ FIFO.
+ Assert on unhandled serial interrupt type.
+
+2001-03-13 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/ser_generic_16x5x.cdl: Rename
+ CYGPKG_IO_SERIAL_GENERIC_16X5X_FIFO_OPTIONS to
+ CYGPKG_IO_SERIAL_GENERIC_16X5X_FIFO and make it a boolean. Clarify
+ descriptions a little.
+
+ * src/ser_16x5x.c (serial_config_port): Only program FCR if FIFO
+ support requested.
+ Don't bother with intermediate _fifo_thresh.
+ Detabify.
+
+2001-03-13 Jesper Skov <jskov@redhat.com>
+
+ * cdl/ser_generic_16x5x.cdl: Removed the default value.
+
+2001-03-09 Julian Smart <julians@redhat.com>
+ Removed default value for flavor none in
+ CYGPKG_IO_SERIAL_GENERIC_16X5X_FIFO_OPTIONS since it
+ causes an assert in libcdl
+
+2001-03-05 Jesper Skov <jskov@redhat.com>
+ 2001-02-15 Dave Airlie <airlied@parthus.com>
+
+ * src/ser_16x5x.c (serial_config_port): Add support for setting
+ a FIFO RX Threshold via CDL
+
+ * cdl/ser_generic_16x5x.cdl: Add support for setting a FIFO
+ RX threshold via CDL
+
+2001-01-24 Dave Airlie <airlied@parthus.com>
+
+ * src/ser_16x5x.c (pc_serial_DSR): Allow RX timeouts to be interpreted
+ as RXs.
+
+2000-12-19 Dave Airlie <airlied@parthus.com>
+
+ * src/ser_16x5x.c: Add defines for FIFO control register
+ (serial_config_port): Use these defines.
+
+2000-12-07 Jesper Skov <jskov@redhat.com>
+
+ * src/ser_16x5x.c (ISR_LS): Corrected value. Spotted by Dave Airlie.
+
+2000-09-18 Jesper Skov <jskov@redhat.com>
+
+ * src/ser_16x5x.c: Allow clients to specify register
+ stepping. Rename a type. Fix compile error.
+
+2000-09-14 Jesper Skov <jskov@redhat.com>
+
+ * src/ser_16x5x.c: Moved ARM/PID driver to provide generic 16x5x
+ driver. Rewritten to use HAL IO macros. Still needs some polish
+ and configury to properly support all the various target
+ controllers that may only have a partial set of the features.
+ * cdl/ser_generic_16x5x.cdl: Same.
+
+ * Removed non-PID related ChangeLog entries.
+
+----------------------------------------------------------------------------
+2000-08-24 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/pid_serial_with_ints.c (pid_serial_DSR): Remove accidental
+ OVERRUNERR check duplication
+
+2000-08-01 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/pid_serial_with_ints.c: Throughout, add support for line status
+ and modem status callbacks, hardware RTS/CTS and DSR/DTR flow control
+ (pid_serial_set_config): Now use keys to make
+ more flexible.
+
+ * src/pid_serial.h: Add more line status, interrupt status and modem
+ status register definitions
+
+ * cdl/ser_arm_pid.cdl: Implements flow control and line status
+ interfaces
+
+2000-06-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/<yournamehere>.cdl: Remove the comment on the empty
+ include_files directive; the tools now support this correctly.
+ This keeps internal include files internal.
+
+2000-06-09 Jesper Skov <jskov@redhat.com>
+
+ * src/pid_serial_with_ints.c:
+ * src/pid_serial.h:
+ Cleaned up defines and made DSR handle all received characters.
+ (Dave Airlie (airlied at parthus dot com))
+
+2000-04-11 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/ser_arm_pid.cdl: Change the parent from CYGPKG_IO_SERIAL
+ (which is enabled most of the time) to CYGPKG_IO_SERIAL_DEVICES
+ (which is not...) thus allowing convenient control independent of
+ platform. Also enable all individual devices by default, now, so
+ that they can be enabled simply by enabling the above new parent.
+
+2000-04-07 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * ecos.db: Re-organize device packages. This is a massive change
+ involving deleting all the sources for serial and ethernet drivers
+ from where they used to live in
+ packages/io/serial/current/src/ARCH/PLATFORM.[ch]
+ packages/net/drivers/eth/PLATFORM/current/src/...
+ and reinstating them in
+ packages/devs/serial/ARCH/PLATFORM/current/src/...
+ packages/devs/eth/ARCH/PLATFORM/current/src/...
+
+ All these new packages are properly defined in ecos.db, and are
+ all of type "hardware" so that a "target" can grab them.
+
+ This directory layout is descriptive of the devices we have right
+ now, arch and platform are separate levels just to make it easier
+ to navigate in the filesystem and similar to the HAL structure in
+ the filesystem.
+
+ It is *not* prescriptive of future work; for example, the mythical
+ common highly-portable 16550 serial driver which works on many
+ targets would be called "devs/serial/s16550/current", or a serial
+ device for a particular board (cogent springs to mind) that can
+ work with different CPUs fitted is "devs/serial/cogent/current".
+
+ Changelogs have been preserved and replicated over all the new
+ packages, so that no history is lost.
+
+ The contents of individual source files are unchanged; they build
+ in just the same emvironment except for a very few cases where the
+ config file name changed in this movement.
+
+ Targets in ecos.db have been redefined to bring in all relevant
+ hardware packages including net and serial drivers (but the newly
+ included packages are only active if their desired parent is
+ available.)
+
+ The names of CDL options (and their #defines of course) stay the
+ same for the serial drivers, for backward compatibility.
+
+ * templates/*/current.ect: these have had CYGPKG_IO_SERIAL added
+ rather than it being in (almost) all target definitions.
+
+2000-01-03 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/pid_serial_with_ints.c: Fix namespace pollution -
+ serial_devio => cyg_io_serial_devio
+
+1999-12-06 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/pid_serial_with_ints.c (pid_serial_DSR): Add loop to handle
+ case where an interrupt represents multiple events.
+
+1999-10-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/arm/pid_serial.h: Added BE support.
+
+1999-10-25 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/pid_serial.h (ISR_RxTO): Define - character received but
+ not handled "promptly".
+
+ * src/arm/pid_serial_with_ints.c (pid_serial_DSR): Handle rcv
+ interrupts properly (can't ignore them even with TO bit set).
+
+1999-06-20 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/pid_serial_with_ints.c: Use #include to get 'diag_printf()'
+ prototypes.
+
+1999-05-14 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/arm/pid_serial_with_ints.c:
+ * src/arm/pid_serial.h:
+ Check for receive interrupt before reading.
+
+1999-04-20 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/pid_serial_with_ints.c: Fix default baud rate if unbuffered.
+
+1999-03-25 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/pid_serial_with_ints.c:
+ Update CDL to follow naming conventions.
+
+ * src/arm/pid_serial_with_ints.c (pid_serial_config_port): Change
+ so that the physical port is not modified unless the provided
+ configuration is valid.
+
+ * src/arm/pid_serial_with_ints.c:
+ Add configury for baud rate and buffer size.
+
+1999-03-24 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/pid_serial_with_ints.c (pid_serial_stop_xmit): Fix typo
+ in comment.
+
+1999-03-22 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/pid_serial_with_ints.c: Use CDL configured device names.
+
+1999-03-19 Jesper Skov <jskov@lassi.cygnus.co.uk>
+
+ * src/arm/pid_serial_with_ints.c:
+ Moved include statement to avoid warnings.
+
+1999-03-18 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/pid_serial_with_ints.c:
+ Update device names to match CDL.
+
+1999-03-17 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/pid_serial_with_ints.c: Conditionalize based on CDL.
+
+1999-03-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/pid_serial_with_ints.c: Add 'CYGDBG_IO_INIT' for control
+ of init messages.
+
+ * src/arm/pid_serial_with_ints.c: Don't include <cyg/kernel/kapi.h>
+
+1999-03-05 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/pid_serial_with_ints.c: Fix interrupt vectors.
+
+1999-03-03 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * serial/current/src/arm/pid_serial_with_ints.c:
+ New [somewhat] configurable drivers for PID.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/devs/serial/generic/16x5x/current/cdl/ser_generic_16x5x.cdl b/cesar/ecos/packages/devs/serial/generic/16x5x/current/cdl/ser_generic_16x5x.cdl
new file mode 100644
index 0000000000..03ff3e18a6
--- /dev/null
+++ b/cesar/ecos/packages/devs/serial/generic/16x5x/current/cdl/ser_generic_16x5x.cdl
@@ -0,0 +1,133 @@
+# ====================================================================
+#
+# ser_generic_16x5x.cdl
+#
+# eCos serial 16x5x configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: gthomas
+# Contributors:
+# Date: 1999-07-07
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+
+cdl_package CYGPKG_IO_SERIAL_GENERIC_16X5X {
+ display "16x5x generic serial device drivers"
+
+ parent CYGPKG_IO_SERIAL_DEVICES
+ active_if CYGPKG_IO_SERIAL
+
+ active_if CYGINT_IO_SERIAL_GENERIC_16X5X_REQUIRED
+
+ requires CYGPKG_ERROR
+ include_dir cyg/io
+ include_files ; # none _exported_ whatsoever
+ description "
+ This option enables the serial device drivers for the
+ 16x5x compatiple controllers."
+
+ compile -library=libextras.a ser_16x5x.c
+
+ define_proc {
+ puts $::cdl_system_header "/***** serial driver proc output start *****/"
+ puts $::cdl_system_header "#ifndef CYGDAT_IO_SERIAL_DEVICE_HEADER"
+ puts $::cdl_system_header "#define CYGDAT_IO_SERIAL_DEVICE_HEADER <pkgconf/io_serial_generic_16x5x.h>"
+ puts $::cdl_system_header "#endif"
+ puts $::cdl_system_header "/***** serial driver proc output end *****/"
+ puts $::cdl_header "#include <pkgconf/system.h>";
+ puts $::cdl_header "#include CYGDAT_IO_SERIAL_GENERIC_16X5X_CFG";
+ }
+
+ cdl_component CYGPKG_IO_SERIAL_GENERIC_16X5X_FIFO {
+ display "16x5x FIFO support"
+ flavor bool
+ default_value 1
+ description "
+ Options to configure the FIFO on a 16550 (or above) variant."
+
+ cdl_option CYGPKG_IO_SERIAL_GENERIC_16X5X_FIFO_RX_THRESHOLD {
+ display "Threshold for RX interrupt on 16550 FIFO"
+ flavor data
+ legal_values { 14 8 4 1 }
+ default_value 1
+ description "
+ This options configures the threshold value at which
+ the RX interrupt occurs when a FIFO is used. (16550 and
+ above only), this may be after 1, 4, 8 or 14 characters."
+ }
+ }
+
+ cdl_component CYGPKG_IO_SERIAL_GENERIC_16X5X_OPTIONS {
+ display "Serial device driver build options"
+ flavor none
+
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_IO_SERIAL_GENERIC_16X5X_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building these serial device drivers. These flags are
+ used in addition to the set of global flags."
+ }
+
+ cdl_option CYGPKG_IO_SERIAL_GENERIC_16X5X_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building these serial device drivers. These flags are
+ removed from the set of global flags if present."
+ }
+ }
+}
+
+# EOF ser_generic_16x5x.cdl
diff --git a/cesar/ecos/packages/devs/serial/generic/16x5x/current/src/ser_16x5x.c b/cesar/ecos/packages/devs/serial/generic/16x5x/current/src/ser_16x5x.c
new file mode 100644
index 0000000000..243083fff6
--- /dev/null
+++ b/cesar/ecos/packages/devs/serial/generic/16x5x/current/src/ser_16x5x.c
@@ -0,0 +1,636 @@
+//==========================================================================
+//
+// io/serial/generic/16x5x/ser_16x5x.c
+//
+// Generic 16x5x serial driver
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas, jlarmour, jskov
+// Date: 1999-02-04
+// Purpose: 16x5x generic serial driver
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/io_serial.h>
+#include <pkgconf/io.h>
+
+#include <cyg/io/io.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/io/devtab.h>
+#include <cyg/io/serial.h>
+#include <cyg/infra/diag.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/hal/hal_io.h>
+
+// Only compile driver if an inline file with driver details was selected.
+#ifdef CYGDAT_IO_SERIAL_GENERIC_16X5X_INL
+
+#ifndef CYGPRI_IO_SERIAL_GENERIC_16X5X_STEP
+#define CYGPRI_IO_SERIAL_GENERIC_16X5X_STEP 1
+#endif
+
+#define SER_REG(_x_) ((_x_)*CYGPRI_IO_SERIAL_GENERIC_16X5X_STEP)
+
+// Receive control Registers
+#define REG_rhr SER_REG(0) // Receive holding register
+#define REG_isr SER_REG(2) // Interrupt status register
+#define REG_lsr SER_REG(5) // Line status register
+#define REG_msr SER_REG(6) // Modem status register
+#define REG_scr SER_REG(7) // Scratch register
+
+// Transmit control Registers
+#define REG_thr SER_REG(0) // Transmit holding register
+#define REG_ier SER_REG(1) // Interrupt enable register
+#define REG_fcr SER_REG(2) // FIFO control register
+#define REG_lcr SER_REG(3) // Line control register
+#define REG_mcr SER_REG(4) // Modem control register
+#define REG_ldl SER_REG(0) // LSB of baud rate
+#define REG_mdl SER_REG(1) // MSB of baud rate
+
+// Interrupt Enable Register
+#define IER_RCV 0x01
+#define IER_XMT 0x02
+#define IER_LS 0x04
+#define IER_MS 0x08
+
+// Line Control Register
+#define LCR_WL5 0x00 // Word length
+#define LCR_WL6 0x01
+#define LCR_WL7 0x02
+#define LCR_WL8 0x03
+#define LCR_SB1 0x00 // Number of stop bits
+#define LCR_SB1_5 0x04 // 1.5 -> only valid with 5 bit words
+#define LCR_SB2 0x04
+#define LCR_PN 0x00 // Parity mode - none
+#define LCR_PE 0x18 // Parity mode - even
+#define LCR_PO 0x08 // Parity mode - odd
+#define LCR_PM 0x28 // Forced "mark" parity
+#define LCR_PS 0x38 // Forced "space" parity
+#define LCR_DL 0x80 // Enable baud rate latch
+
+// Line Status Register
+#define LSR_RSR 0x01
+#define LSR_OE 0x02
+#define LSR_PE 0x04
+#define LSR_FE 0x08
+#define LSR_BI 0x10
+#define LSR_THE 0x20
+#define LSR_TEMT 0x40
+#define LSR_FIE 0x80
+
+// Modem Control Register
+#define MCR_DTR 0x01
+#define MCR_RTS 0x02
+#define MCR_INT 0x08 // Enable interrupts
+#define MCR_LOOP 0x10 // Loopback mode
+
+// Interrupt status Register
+#define ISR_MS 0x00
+#define ISR_nIP 0x01
+#define ISR_Tx 0x02
+#define ISR_Rx 0x04
+#define ISR_LS 0x06
+#define ISR_RxTO 0x0C
+#define ISR_64BFIFO 0x20
+#define ISR_FIFOworks 0x40
+#define ISR_FIFOen 0x80
+
+// Modem Status Register
+#define MSR_DCTS 0x01
+#define MSR_DDSR 0x02
+#define MSR_TERI 0x04
+#define MSR_DDCD 0x08
+#define MSR_CTS 0x10
+#define MSR_DSR 0x20
+#define MSR_RI 0x40
+#define MSR_CD 0x80
+
+// FIFO Control Register
+#define FCR_FE 0x01 // FIFO enable
+#define FCR_CRF 0x02 // Clear receive FIFO
+#define FCR_CTF 0x04 // Clear transmit FIFO
+#define FCR_DMA 0x08 // DMA mode select
+#define FCR_F64 0x20 // Enable 64 byte fifo (16750+)
+#define FCR_RT14 0xC0 // Set Rx trigger at 14
+#define FCR_RT8 0x80 // Set Rx trigger at 8
+#define FCR_RT4 0x40 // Set Rx trigger at 4
+#define FCR_RT1 0x00 // Set Rx trigger at 1
+
+static unsigned char select_word_length[] = {
+ LCR_WL5, // 5 bits / word (char)
+ LCR_WL6,
+ LCR_WL7,
+ LCR_WL8
+};
+
+static unsigned char select_stop_bits[] = {
+ 0,
+ LCR_SB1, // 1 stop bit
+ LCR_SB1_5, // 1.5 stop bit
+ LCR_SB2 // 2 stop bits
+};
+
+static unsigned char select_parity[] = {
+ LCR_PN, // No parity
+ LCR_PE, // Even parity
+ LCR_PO, // Odd parity
+ LCR_PM, // Mark parity
+ LCR_PS, // Space parity
+};
+
+// selec_baud[] must be define by the client
+
+typedef struct pc_serial_info {
+ cyg_addrword_t base;
+ int int_num;
+ cyg_interrupt serial_interrupt;
+ cyg_handle_t serial_interrupt_handle;
+#ifdef CYGPKG_IO_SERIAL_GENERIC_16X5X_FIFO
+ enum {
+ sNone = 0,
+ s8250,
+ s16450,
+ s16550,
+ s16550a
+ } deviceType;
+#endif
+} pc_serial_info;
+
+static bool pc_serial_init(struct cyg_devtab_entry *tab);
+static bool pc_serial_putc(serial_channel *chan, unsigned char c);
+static Cyg_ErrNo pc_serial_lookup(struct cyg_devtab_entry **tab,
+ struct cyg_devtab_entry *sub_tab,
+ const char *name);
+static unsigned char pc_serial_getc(serial_channel *chan);
+static Cyg_ErrNo pc_serial_set_config(serial_channel *chan, cyg_uint32 key,
+ const void *xbuf, cyg_uint32 *len);
+static void pc_serial_start_xmit(serial_channel *chan);
+static void pc_serial_stop_xmit(serial_channel *chan);
+
+static cyg_uint32 pc_serial_ISR(cyg_vector_t vector, cyg_addrword_t data);
+static void pc_serial_DSR(cyg_vector_t vector, cyg_ucount32 count,
+ cyg_addrword_t data);
+
+static SERIAL_FUNS(pc_serial_funs,
+ pc_serial_putc,
+ pc_serial_getc,
+ pc_serial_set_config,
+ pc_serial_start_xmit,
+ pc_serial_stop_xmit
+ );
+
+#include CYGDAT_IO_SERIAL_GENERIC_16X5X_INL
+
+#ifndef CYG_IO_SERIAL_GENERIC_16X5X_INT_PRIORITY
+# define CYG_IO_SERIAL_GENERIC_16X5X_INT_PRIORITY 4
+#endif
+
+
+// Internal function to actually configure the hardware to desired
+// baud rate, etc.
+static bool
+serial_config_port(serial_channel *chan,
+ cyg_serial_info_t *new_config, bool init)
+{
+ pc_serial_info *ser_chan = (pc_serial_info *)chan->dev_priv;
+ cyg_addrword_t base = ser_chan->base;
+ unsigned short baud_divisor = select_baud[new_config->baud];
+ unsigned char _lcr, _ier;
+ if (baud_divisor == 0) return false; // Invalid configuration
+
+ // Disable port interrupts while changing hardware
+ HAL_READ_UINT8(base+REG_ier, _ier);
+ HAL_WRITE_UINT8(base+REG_ier, 0);
+
+ _lcr = select_word_length[new_config->word_length - CYGNUM_SERIAL_WORD_LENGTH_5] |
+ select_stop_bits[new_config->stop] |
+ select_parity[new_config->parity];
+ HAL_WRITE_UINT8(base+REG_lcr, _lcr | LCR_DL);
+ HAL_WRITE_UINT8(base+REG_mdl, baud_divisor >> 8);
+ HAL_WRITE_UINT8(base+REG_ldl, baud_divisor & 0xFF);
+ HAL_WRITE_UINT8(base+REG_lcr, _lcr);
+ if (init) {
+#ifdef CYGPKG_IO_SERIAL_GENERIC_16X5X_FIFO
+ unsigned char _fcr_thresh;
+ cyg_uint8 b;
+
+ /* First, find out what kind of device it is. */
+ ser_chan->deviceType = sNone;
+ HAL_WRITE_UINT8(base+REG_mcr, MCR_LOOP); // enable loopback mode
+ HAL_READ_UINT8(base+REG_msr, b);
+ if (0 == (b & 0xF0)) { // see if MSR had CD, RI, DSR or CTS set
+ HAL_WRITE_UINT8(base+REG_mcr, MCR_LOOP|MCR_DTR|MCR_RTS);
+ HAL_READ_UINT8(base+REG_msr, b);
+ if (0xF0 != (b & 0xF0)) // check that all of CD,RI,DSR and CTS set
+ ser_chan->deviceType = s8250;
+ }
+ HAL_WRITE_UINT8(base+REG_mcr, 0); // disable loopback mode
+
+ if (ser_chan->deviceType == s8250) {
+ // Check for a scratch register; scratch register
+ // indicates 16450 or above.
+ HAL_WRITE_UINT8(base+REG_scr, 0x55);
+ HAL_READ_UINT8(base+REG_scr, b);
+ if (b == 0x55) {
+ HAL_WRITE_UINT8(base+REG_scr, 0xAA);
+ HAL_READ_UINT8(base+REG_scr, b);
+ if (b == 0xAA)
+ ser_chan->deviceType = s16450;
+ }
+ }
+
+ if (ser_chan->deviceType == s16450) {
+ // Check for a FIFO
+ HAL_WRITE_UINT8(base+REG_fcr, FCR_FE);
+ HAL_READ_UINT8(base+REG_isr, b);
+ if (b & ISR_FIFOen)
+ ser_chan->deviceType = s16550; // but FIFO doesn't
+ // necessarily work
+ if (b & ISR_FIFOworks)
+ ser_chan->deviceType = s16550a; // 16550a FIFOs work
+ }
+
+ if (ser_chan->deviceType == s16550a) {
+ switch(CYGPKG_IO_SERIAL_GENERIC_16X5X_FIFO_RX_THRESHOLD) {
+ default:
+ case 1:
+ _fcr_thresh=FCR_RT1; break;
+ case 4:
+ _fcr_thresh=FCR_RT4; break;
+ case 8:
+ _fcr_thresh=FCR_RT8; break;
+ case 14:
+ _fcr_thresh=FCR_RT14; break;
+ }
+ _fcr_thresh|=FCR_FE|FCR_CRF|FCR_CTF;
+ HAL_WRITE_UINT8(base+REG_fcr, _fcr_thresh); // Enable and clear FIFO
+ }
+ else
+ HAL_WRITE_UINT8(base+REG_fcr, 0); // make sure it's disabled
+#endif
+ if (chan->out_cbuf.len != 0) {
+ _ier = IER_RCV;
+ } else {
+ _ier = 0;
+ }
+ // Master interrupt enable
+ HAL_WRITE_UINT8(base+REG_mcr, MCR_INT|MCR_DTR|MCR_RTS);
+ }
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
+ _ier |= (IER_LS|IER_MS);
+#endif
+ HAL_WRITE_UINT8(base+REG_ier, _ier);
+
+ if (new_config != &chan->config) {
+ chan->config = *new_config;
+ }
+ return true;
+}
+
+// Function to initialize the device. Called at bootstrap time.
+static bool
+pc_serial_init(struct cyg_devtab_entry *tab)
+{
+ serial_channel *chan = (serial_channel *)tab->priv;
+ pc_serial_info *ser_chan = (pc_serial_info *)chan->dev_priv;
+
+#ifdef CYG_IO_SERIAL_GENERIC_16X5X_BAUD_GENERATOR
+ // Fill in baud rate table - used for platforms where this cannot
+ // be determined statically
+ int baud_idx, baud_val;
+ if (select_baud[0] == 9999) {
+ // Table not yet initialized
+ // Assumes that 'select_baud' looks like this:
+ // static int select_baud[] = {
+ // 9999, -- marker
+ // 50, -- first baud rate
+ // 110, -- second baud rate
+ // etc.
+ for (baud_idx = 1; baud_idx < sizeof(select_baud)/sizeof(select_baud[0]); baud_idx++) {
+ baud_val = CYG_IO_SERIAL_GENERIC_16X5X_BAUD_GENERATOR(select_baud[baud_idx]);
+ select_baud[baud_idx] = baud_val;
+ }
+ select_baud[0] = 0;
+ }
+#endif
+
+#ifdef CYGDBG_IO_INIT
+ diag_printf("16x5x SERIAL init - dev: %x.%d\n",
+ ser_chan->base, ser_chan->int_num);
+#endif
+ // Really only required for interrupt driven devices
+ (chan->callbacks->serial_init)(chan);
+
+ if (chan->out_cbuf.len != 0) {
+ cyg_drv_interrupt_create(ser_chan->int_num,
+ CYG_IO_SERIAL_GENERIC_16X5X_INT_PRIORITY,
+ (cyg_addrword_t)chan,
+ pc_serial_ISR,
+ pc_serial_DSR,
+ &ser_chan->serial_interrupt_handle,
+ &ser_chan->serial_interrupt);
+ cyg_drv_interrupt_attach(ser_chan->serial_interrupt_handle);
+ cyg_drv_interrupt_unmask(ser_chan->int_num);
+ }
+ serial_config_port(chan, &chan->config, true);
+ return true;
+}
+
+// This routine is called when the device is "looked" up (i.e. attached)
+static Cyg_ErrNo
+pc_serial_lookup(struct cyg_devtab_entry **tab,
+ struct cyg_devtab_entry *sub_tab,
+ const char *name)
+{
+ serial_channel *chan = (serial_channel *)(*tab)->priv;
+
+ // Really only required for interrupt driven devices
+ (chan->callbacks->serial_init)(chan);
+ return ENOERR;
+}
+
+// Send a character to the device output buffer.
+// Return 'true' if character is sent to device
+static bool
+pc_serial_putc(serial_channel *chan, unsigned char c)
+{
+ cyg_uint8 _lsr;
+ pc_serial_info *ser_chan = (pc_serial_info *)chan->dev_priv;
+ cyg_addrword_t base = ser_chan->base;
+
+ HAL_READ_UINT8(base+REG_lsr, _lsr);
+ if (_lsr & LSR_THE) {
+ // Transmit buffer is empty
+ HAL_WRITE_UINT8(base+REG_thr, c);
+ return true;
+ }
+ // No space
+ return false;
+}
+
+// Fetch a character from the device input buffer, waiting if necessary
+static unsigned char
+pc_serial_getc(serial_channel *chan)
+{
+ unsigned char c;
+ cyg_uint8 _lsr;
+ pc_serial_info *ser_chan = (pc_serial_info *)chan->dev_priv;
+ cyg_addrword_t base = ser_chan->base;
+
+ // Wait for char
+ do {
+ HAL_READ_UINT8(base+REG_lsr, _lsr);
+ } while ((_lsr & LSR_RSR) == 0);
+
+ HAL_READ_UINT8(base+REG_rhr, c);
+ return c;
+}
+
+// Set up the device characteristics; baud rate, etc.
+static Cyg_ErrNo
+pc_serial_set_config(serial_channel *chan, cyg_uint32 key, const void *xbuf,
+ cyg_uint32 *len)
+{
+ switch (key) {
+ case CYG_IO_SET_CONFIG_SERIAL_INFO:
+ {
+ cyg_serial_info_t *config = (cyg_serial_info_t *)xbuf;
+ if ( *len < sizeof(cyg_serial_info_t) ) {
+ return -EINVAL;
+ }
+ *len = sizeof(cyg_serial_info_t);
+ if ( true != serial_config_port(chan, config, false) )
+ return -EINVAL;
+ }
+ break;
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_HW
+ case CYG_IO_SET_CONFIG_SERIAL_HW_RX_FLOW_THROTTLE:
+ {
+ cyg_uint8 _mcr;
+ pc_serial_info *ser_chan = (pc_serial_info *)chan->dev_priv;
+ cyg_addrword_t base = ser_chan->base;
+ cyg_uint32 *f = (cyg_uint32 *)xbuf;
+ unsigned char mask=0;
+ if ( *len < sizeof(*f) )
+ return -EINVAL;
+
+ if ( chan->config.flags & CYGNUM_SERIAL_FLOW_RTSCTS_RX )
+ mask = MCR_RTS;
+ if ( chan->config.flags & CYGNUM_SERIAL_FLOW_DSRDTR_RX )
+ mask |= MCR_DTR;
+ HAL_READ_UINT8(base+REG_mcr, _mcr);
+ if (*f) // we should throttle
+ _mcr &= ~mask;
+ else // we should no longer throttle
+ _mcr |= mask;
+ HAL_WRITE_UINT8(base+REG_mcr, _mcr);
+ }
+ break;
+ case CYG_IO_SET_CONFIG_SERIAL_HW_FLOW_CONFIG:
+ // Nothing to do because we do support both RTSCTS and DSRDTR flow
+ // control.
+ // Other targets would clear any unsupported flags here and
+ // would then return -ENOSUPP - the higher layer can then query
+ // what flags are set and decide what to do. This is optimised for
+ // the most common case - i.e. that authors know what their hardware
+ // is capable of.
+ // We just return ENOERR.
+ break;
+#endif
+ default:
+ return -EINVAL;
+ }
+ return ENOERR;
+}
+
+// Enable the transmitter on the device
+static void
+pc_serial_start_xmit(serial_channel *chan)
+{
+ pc_serial_info *ser_chan = (pc_serial_info *)chan->dev_priv;
+ cyg_addrword_t base = ser_chan->base;
+ cyg_uint8 _ier;
+
+ HAL_READ_UINT8(base+REG_ier, _ier);
+ _ier |= IER_XMT; // Enable xmit interrupt
+ HAL_WRITE_UINT8(base+REG_ier, _ier);
+}
+
+// Disable the transmitter on the device
+static void
+pc_serial_stop_xmit(serial_channel *chan)
+{
+ pc_serial_info *ser_chan = (pc_serial_info *)chan->dev_priv;
+ cyg_addrword_t base = ser_chan->base;
+ cyg_uint8 _ier;
+
+ HAL_READ_UINT8(base+REG_ier, _ier);
+ _ier &= ~IER_XMT; // Disable xmit interrupt
+ HAL_WRITE_UINT8(base+REG_ier, _ier);
+}
+
+// Serial I/O - low level interrupt handler (ISR)
+static cyg_uint32
+pc_serial_ISR(cyg_vector_t vector, cyg_addrword_t data)
+{
+ serial_channel *chan = (serial_channel *)data;
+ pc_serial_info *ser_chan = (pc_serial_info *)chan->dev_priv;
+ cyg_drv_interrupt_mask(ser_chan->int_num);
+ cyg_drv_interrupt_acknowledge(ser_chan->int_num);
+ return CYG_ISR_CALL_DSR; // Cause DSR to be run
+}
+
+// Serial I/O - high level interrupt handler (DSR)
+static void
+pc_serial_DSR(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data)
+{
+ serial_channel *chan = (serial_channel *)data;
+ pc_serial_info *ser_chan = (pc_serial_info *)chan->dev_priv;
+ cyg_addrword_t base = ser_chan->base;
+ cyg_uint8 _isr;
+
+ // Check if we have an interrupt pending - note that the interrupt
+ // is pending of the low bit of the isr is *0*, not 1.
+ HAL_READ_UINT8(base+REG_isr, _isr);
+ while ((_isr & ISR_nIP) == 0) {
+ switch (_isr&0xE) {
+ case ISR_Rx:
+ case ISR_RxTO:
+ {
+ cyg_uint8 _lsr;
+ unsigned char c;
+ HAL_READ_UINT8(base+REG_lsr, _lsr);
+ while(_lsr & LSR_RSR) {
+ HAL_READ_UINT8(base+REG_rhr, c);
+ (chan->callbacks->rcv_char)(chan, c);
+ HAL_READ_UINT8(base+REG_lsr, _lsr);
+ }
+ break;
+ }
+ case ISR_Tx:
+ (chan->callbacks->xmt_char)(chan);
+ break;
+
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
+ case ISR_LS:
+ {
+ cyg_serial_line_status_t stat;
+ cyg_uint8 _lsr;
+ HAL_READ_UINT8(base+REG_lsr, _lsr);
+
+ // this might look expensive, but it is rarely the case that
+ // more than one of these is set
+ stat.value = 1;
+ if ( _lsr & LSR_OE ) {
+ stat.which = CYGNUM_SERIAL_STATUS_OVERRUNERR;
+ (chan->callbacks->indicate_status)(chan, &stat );
+ }
+ if ( _lsr & LSR_PE ) {
+ stat.which = CYGNUM_SERIAL_STATUS_PARITYERR;
+ (chan->callbacks->indicate_status)(chan, &stat );
+ }
+ if ( _lsr & LSR_FE ) {
+ stat.which = CYGNUM_SERIAL_STATUS_FRAMEERR;
+ (chan->callbacks->indicate_status)(chan, &stat );
+ }
+ if ( _lsr & LSR_BI ) {
+ stat.which = CYGNUM_SERIAL_STATUS_BREAK;
+ (chan->callbacks->indicate_status)(chan, &stat );
+ }
+ }
+ break;
+
+ case ISR_MS:
+ {
+ cyg_serial_line_status_t stat;
+ cyg_uint8 _msr;
+
+ HAL_READ_UINT8(base+REG_msr, _msr);
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_HW
+ if ( _msr & MSR_DDSR )
+ if ( chan->config.flags & CYGNUM_SERIAL_FLOW_DSRDTR_TX ) {
+ stat.which = CYGNUM_SERIAL_STATUS_FLOW;
+ stat.value = (0 != (_msr & MSR_DSR));
+ (chan->callbacks->indicate_status)(chan, &stat );
+ }
+ if ( _msr & MSR_DCTS )
+ if ( chan->config.flags & CYGNUM_SERIAL_FLOW_RTSCTS_TX ) {
+ stat.which = CYGNUM_SERIAL_STATUS_FLOW;
+ stat.value = (0 != (_msr & MSR_CTS));
+ (chan->callbacks->indicate_status)(chan, &stat );
+ }
+#endif
+ if ( _msr & MSR_DDCD ) {
+ stat.which = CYGNUM_SERIAL_STATUS_CARRIERDETECT;
+ stat.value = (0 != (_msr & MSR_CD));
+ (chan->callbacks->indicate_status)(chan, &stat );
+ }
+ if ( _msr & MSR_RI ) {
+ stat.which = CYGNUM_SERIAL_STATUS_RINGINDICATOR;
+ stat.value = 1;
+ (chan->callbacks->indicate_status)(chan, &stat );
+ }
+ if ( _msr & MSR_TERI ) {
+ stat.which = CYGNUM_SERIAL_STATUS_RINGINDICATOR;
+ stat.value = 0;
+ (chan->callbacks->indicate_status)(chan, &stat );
+ }
+ }
+ break;
+#endif
+ default:
+ // Yes, this assertion may well not be visible. *But*
+ // if debugging, we may still successfully hit a breakpoint
+ // on cyg_assert_fail, which _is_ useful
+ CYG_FAIL("unhandled serial interrupt state");
+ }
+
+ HAL_READ_UINT8(base+REG_isr, _isr);
+ } // while
+
+ cyg_drv_interrupt_unmask(ser_chan->int_num);
+}
+#endif
+
+// EOF ser_16x5x.c
diff --git a/cesar/ecos/packages/devs/usb/nec_upd985xx/current/ChangeLog b/cesar/ecos/packages/devs/usb/nec_upd985xx/current/ChangeLog
new file mode 100644
index 0000000000..1cc1ef172b
--- /dev/null
+++ b/cesar/ecos/packages/devs/usb/nec_upd985xx/current/ChangeLog
@@ -0,0 +1,136 @@
+2003-02-25 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/usbs_upd985xx.sgml: Declare as <part> not <reference> to get
+ correct TOC numbering.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/usbs_upd985xx.cdl: Fix doc link.
+
+ * doc/usbs_upd985xx.sgml: Comment out DOCTYPE for now to allow building
+ with standard doc build.
+ Add an enclosing <reference> so it's structured better with standard
+ doc build.
+
+2003-01-22 Anssi Pulkkinen <anssi.pulkkinen@ascom.ch>
+
+ * src/usbs_upd985xx.c (ep0_rx_dsr): After sending a stall response
+ on ep0, start a new receive process for the next control message.
+
+2002-12-01 Bart Veer <bartv@ecoscentric.com>
+
+ * src/usbs_upd985xx.c, cdl/usbs_upd985xx.cdl:
+ Make the control packet size configurable, to work around a
+ problem detected by USB compliance testing. Based on work
+ by Clark Williams and Andrew Lunn.
+
+2002-10-26 Bart Veer <bartv@ecoscentric.com>
+
+ * src/usbs_upd985xx.c (ep0_rx_dsr):
+ Fix typo in expression, reported by Andrew Lunn. The system's
+ behaviour should not be affected.
+
+2001-09-20 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_upd985xx.c (ep0_init):
+ During a reset, also reset the tx_in_progress and
+ tx_pending locks. Otherwise if there are ongoing
+ transmits while the host is issuing a reset no
+ further transmits would be possible.
+
+2001-09-14 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_upd985xx.c:
+ Various changes related to USB testing. Also include
+ potential work-arounds for some unconfirmed hardware
+ problems, but these are disabled for now.
+
+ * src/usbs_upd985xx.c:
+ Change how the reset signal interrupt bit gets masked, to
+ cope with the way Windows initializes a new USB device.
+
+2001-08-09 Bart Veer <bartv@redhat.com>
+
+ * doc/usbs_upd985xx.sgml, doc/*.html:
+ Updated to describe the driver's current behaviour.
+
+ * src/usbs_upd985xx.c, cdl/usbs_upd985xx.cdl:
+ Implement workaround for some hardware problems,
+ by serializing transmit operations.
+
+2001-08-08 Bart Veer <bartv@redhat.com>
+
+ * cdl/usbs_upd985xx.cdl, include/usbs_upd985xx.h,
+ src/usbs_upd985xx.c, src/usbs_upd985xx.cxx:
+ Implement workarounds for some hardware problems.
+ 1) flush the ibus after every write operation.
+ 2) implement support for endpoint 5 transfers, and
+ optionally for emulating bulk transfers over this
+ endpoint (normally this endpoint is used for interrupt
+ transfers).
+ All under the control of suitable configuration options,
+ which by default are set to work around the hardware problems.
+
+2001-08-06 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_upd985xx.c:
+ Add initial support for USB testing.
+
+2001-07-02 Bart Veer <bartv@redhat.com>
+
+ * doc/usbs_upd985xx.sgml:
+ Document alignment restrictions for receive buffers, and
+ the optional platform-specific INIT macro.
+
+ * doc/devs-usb-nec-upd985xx.html
+ Regenerate following above change.
+
+ * src/usbs_upd985xx.c:
+ Remove FIXME related to cacheline alignment, not an issue
+ for MIPS.
+ Remove FIXME related to platform-specific USB startup,
+ now implemented.
+
+2001-06-28 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_upd985xx.c, cdl/usbs_upd985xx.cdl:
+ Device driver now functional.
+
+2001-05-22 Bart Veer <bartv@redhat.com>
+
+ * USB device driver work started.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/devs/usb/nec_upd985xx/current/cdl/usbs_upd985xx.cdl b/cesar/ecos/packages/devs/usb/nec_upd985xx/current/cdl/usbs_upd985xx.cdl
new file mode 100644
index 0000000000..dc216aad6c
--- /dev/null
+++ b/cesar/ecos/packages/devs/usb/nec_upd985xx/current/cdl/usbs_upd985xx.cdl
@@ -0,0 +1,293 @@
+# ====================================================================
+#
+# usbs_upd985xx.cdl
+#
+# USB device driver for the NEC uPD985xx family of processors.
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 2002 Bart Veer
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Original data: bartv
+# Contributors:
+# Date: 2001-05-22
+#
+#####DESCRIPTIONEND####
+# ====================================================================
+
+cdl_package CYGPKG_DEVS_USB_UPD985XX {
+ display "NEC uPD985xx USB Device Driver"
+ include_dir "cyg/io/usb"
+ parent CYGPKG_USB
+ implements CYGHWR_IO_USB_SLAVE
+ doc ref/devs-usb-nec-upd985xx.html
+
+ # Make sure that we are running on the right hardware.
+ requires CYGPKG_HAL_MIPS
+ requires CYGPKG_HAL_MIPS_UPD985XX
+
+ description "
+ The NEC uPD985xx family of processors implements an
+ on-chip USB device controller, facilitating the use of this
+ processor in USB peripherals. This package provides a
+ suitable eCos device driver."
+
+ cdl_component CYGFUN_DEVS_USB_UPD985XX_EP0 {
+ display "Support the control endpoint 0"
+ default_value CYGINT_IO_USB_SLAVE_CLIENTS
+ requires CYGPKG_IO_USB CYGPKG_IO_USB_SLAVE
+ compile usbs_upd985xx.c
+ compile -library=libextras.a usbs_upd985xx_data.cxx
+ description "
+ Enable support for endpoint 0. If this support is disabled
+ then the entire USB port is unusable."
+
+ cdl_option CYGVAR_DEVS_USB_UPD985XX_EP0_DEVTAB_ENTRY {
+ display "Provide a devtab entry for endpoint 0"
+ default_value CYGGLO_IO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES
+ requires CYGPKG_IO
+ description "
+ If endpoint 0 will only be accessed via the low-level
+ USB-specific calls then there is no need for an entry
+ in the device table, saving some memory. If the
+ application intends to access the endpoint by means
+ of open and ioctl calls then a devtab entry is needed.
+ "
+ }
+
+ cdl_option CYGNUM_DEVS_USB_UPD985XX_EP0_PKTSIZE {
+ display "Size of endpoint 0 control packets"
+ flavor data
+ default_value 8
+ legal_values { 8 16 32 64 }
+ description "
+ Control messages on endpoint 0 are split into packets of
+ 8, 16, 32 or 64 bytes - these are the values permitted by the
+ USB specification. The same packet size is used for both
+ receives and transmits. This value must also be used for the
+ max_packet_size field of the device descriptor in the
+ application's USB enumeration data.
+
+ According to section 5.5.5 of the USB specification, if a new
+ control message is received before the previous transaction
+ has completed then the previous transaction must be aborted.
+ If that transaction involved transferring data to the host
+ then there is a problem: that data may still be queued for
+ transmission and the NEC USB device appears to provide no way
+ of aborting that transmit. The problem is unlikely to arise
+ with normal usage, but may be detected by compliance
+ testsuites. Increasing the packet size to its maximum value
+ of 64 reduces the probability of failure.
+ "
+ }
+
+ cdl_option CYGNUM_DEVS_USB_UPD985XX_EP0_TXBUFSIZE {
+ display "Size of statically-allocated endpoint 0 transmit buffer"
+ flavor data
+ default_value 256
+ requires { CYGNUM_DEVS_USB_UPD985XX_EP0_TXBUFSIZE >= CYGNUM_DEVS_USB_UPD985XX_EP0_PKTSIZE }
+ description "
+ The implementation of the support for endpoint 0 uses
+ a single static buffer to hold the response to the
+ current control message. Typically this buffer can be
+ fairly small since replies to control messages tend to
+ be small: typically some tens of bytes for the enumeration
+ data, perhaps a bit more for unicode-encoded string
+ descriptors. However if some application-specific protocol
+ depends on larger control messages then this buffer
+ size may need to be increased.
+ "
+ }
+
+ cdl_option CYGNUM_DEVS_USB_UPD985XX_EP0_RXBUFSIZE {
+ display "Size of statically-allocated endpoint 0 transmit buffer"
+ flavor data
+ default_value 64
+ requires { CYGNUM_DEVS_USB_UPD985XX_EP0_RXBUFSIZE >= CYGNUM_DEVS_USB_UPD985XX_EP0_PKTSIZE }
+ description "
+ The implementation of the support for endpoint 0 uses
+ a single static buffer to hold incoming control messages.
+ Typically this buffer can be small: standard control messages
+ involve an initial eight-byte header, sometimes followed by
+ a small amount of additional data. However if some
+ application-specific protocol depends on larger control
+ messages then this buffer size may need to be increased.
+ "
+ }
+ }
+ cdl_component CYGPKG_DEVS_USB_UPD985XX_EP3 {
+ display "Support endpoint 3, used for slave->host IN bulk transfers"
+ implements CYGHWR_IO_USB_SLAVE_IN_ENDPOINTS
+ requires CYGFUN_DEVS_USB_UPD985XX_EP0
+ default_value 0
+ description "
+ In the uPD985xx USB implementation endpoint 3 can only be
+ used for slave->host IN bulk transfers. If the intended application
+ only involves host->slave transfers then this endpoint is
+ not relevant.
+
+ By default this endpoint is disabled: according to NEC erratum
+ U3 there may be problems when doing transfers of 192 bytes or
+ greater. Instead the interrupt endpoint 5 is used, with
+ software emulation of the bulk protocol. If the application
+ involves only transfers of less than 192 bytes then endpoint
+ 3 can be enabled.
+ "
+
+ cdl_option CYGVAR_DEVS_USB_UPD985XX_EP3_DEVTAB_ENTRY {
+ display "Provide a devtab entry for endpoint 3"
+ default_value CYGGLO_IO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES
+ requires CYGPKG_IO
+ description "
+ If endpoint 3 will only be accessed via the low-level
+ USB-specific calls then there is no need for an entry
+ in the device table, saving some memory. If the
+ application intends to access the endpoint by means
+ of open and read calls then a devtab entry is needed.
+ "
+ }
+ }
+
+ cdl_component CYGPKG_DEVS_USB_UPD985XX_EP4 {
+ display "Support endpoint 4, used for slave->host OUT bulk transfers"
+ implements CYGHWR_IO_USB_SLAVE_OUT_ENDPOINTS
+ requires CYGFUN_DEVS_USB_UPD985XX_EP0
+ default_value CYGFUN_DEVS_USB_UPD985XX_EP0
+ description "
+ In the uPD985xx USB implementation endpoint 4 can only be
+ used for host->slave OUT bulk transfers. If the intended application
+ only involves slave->host transfers then the support for
+ endpoint 4 can be disabled. Note that this does not affect
+ control messages which always go via endpoint 0."
+
+ cdl_option CYGVAR_DEVS_USB_UPD985XX_EP4_DEVTAB_ENTRY {
+ display "Provide a devtab entry for endpoint 4"
+ default_value CYGGLO_IO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES
+ requires CYGPKG_IO
+ description "
+ If endpoint 4 will only be accessed via the low-level
+ USB-specific calls then there is no need for an entry
+ in the device table, saving some memory. If the
+ application intends to access the endpoint by means
+ of open and write calls then a devtab entry is needed."
+ }
+ }
+
+ cdl_component CYGPKG_DEVS_USB_UPD985XX_EP5 {
+ display "Support endpoint 5, used for slave->host IN transfers"
+ implements CYGHWR_IO_USB_SLAVE_IN_ENDPOINTS
+ requires CYGFUN_DEVS_USB_UPD985XX_EP0
+ default_value CYGFUN_DEVS_USB_UPD985XX_EP0
+ description "
+ In the uPD985xx USB implementation endpoint 5 can only be
+ used for slave->host communication. This endpoint is
+ intended primarily for interrupt transfers, but can be
+ used for bulk transfers given a small amount of additional
+ software support."
+
+ cdl_option CYGIMP_DEVS_USB_UPD985XX_EP5_BULK {
+ display "Implement bulk transfers rather than interrupt transfers"
+ default_value 1
+ description "
+ Endpoint 5 is normally used for interrupt transfers, which
+ are limited to 64 bytes. However with a little bit of software
+ support it is possible to implement bulk transfers instead.
+ With some revisions of the silicon this provides a workaround
+ for problems with endpoint 3 - NEC erratum U3 should be consulted
+ for additional information."
+ }
+
+ cdl_option CYGVAR_DEVS_USB_UPD985XX_EP5_DEVTAB_ENTRY {
+ display "Provide a devtab entry for endpoint 5"
+ default_value CYGGLO_IO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES
+ requires CYGPKG_IO
+ description "
+ If endpoint 5 will only be accessed via the low-level
+ USB-specific calls then there is no need for an entry
+ in the device table, saving some memory. If the
+ application intends to access the endpoint by means
+ of open and write calls then a devtab entry is needed.
+ "
+ }
+ }
+
+ cdl_option CYGDAT_DEVS_USB_UPD985XX_DEVTAB_BASENAME {
+ display "Base name for devtab entries"
+ flavor data
+ active_if { CYGVAR_DEVS_USB_UPD985XX_EP0_DEVTAB_ENTRY ||
+ CYGVAR_DEVS_USB_UPD985XX_EP3_DEVTAB_ENTRY ||
+ CYGVAR_DEVS_USB_UPD985XX_EP4_DEVTAB_ENTRY
+ }
+ default_value { "\"/dev/usbs\"" }
+ description "
+ If the uPD985xx USB device driver package provides devtab
+ entries for any of the endpoints then this option gives
+ control over the names of these entries. By default the
+ endpoints will be called \"/dev/usbs0c\", \"/dev/usbs3w\"
+ and \"/dev/usbs4r\" (assuming all three endpoints are
+ enabled. The common part \"/dev/usbs\" is determined
+ by this configuration option. It may be necessary to
+ change this if there are multiple USB slave-side
+ devices on the target hardware to prevent a name clash.
+ "
+ }
+
+ cdl_option CYGIMP_DEVS_USB_UPD985XX_IBUS_WRITE_LIMIT {
+ display "Work around potential hardware problem with IBUS writes"
+ default_value 1
+ description "
+ With some revisions of the silicon there may be problems if
+ a device driver performs multiple writes to the IBUS in
+ quick succession. By default this driver avoids such problems,
+ at the cost of some cpu cycles and a small amount of extra code.
+ NEC erratum S1 should be consulted for more details."
+ }
+
+ cdl_option CYGIMP_DEVS_USB_UPD985XX_SERIALIZE_TRANSMITS {
+ display "Work around potential hardware problem with concurrent transmits"
+ default_value 1
+ description "
+ With some revisions of the silicon there may be problems if
+ the device driver is asked to perform concurrent slave->host
+ transmissions on different endpoints, for example sending
+ a reply to a control message while there is a bulk transfer
+ in progress. This option enables a workaround for the
+ problem by ensuring that only one transmit operation is in
+ progress at any one time. NEC errata U3 and U4 should be
+ consulted for more details."
+ }
+}
diff --git a/cesar/ecos/packages/devs/usb/nec_upd985xx/current/doc/devs-usb-nec-upd985xx.html b/cesar/ecos/packages/devs/usb/nec_upd985xx/current/doc/devs-usb-nec-upd985xx.html
new file mode 100644
index 0000000000..9bb8aa8a22
--- /dev/null
+++ b/cesar/ecos/packages/devs/usb/nec_upd985xx/current/doc/devs-usb-nec-upd985xx.html
@@ -0,0 +1,372 @@
+<!-- Copyright (C) 2001 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>NEC uPD985xx USB Device Driver</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><H1
+><A
+NAME="DEVS-USB-NEC-UPD985XX"
+>NEC uPD985xx USB Device Driver</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN4"
+></A
+><H2
+>Name</H2
+>NEC uPD985xx USB Support&nbsp;--&nbsp;Device driver for the on-chip NEC uPD985xx USB device</DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN7"
+></A
+><H2
+>NEC uPD985xx USB Hardware</H2
+><P
+>The NEC uPD985xx family of processors is supplied with an on-chip USB
+slave device, the UDC (USB Device Controller). This supports seven
+endpoints. Endpoint 0 can only be used for control messages. Endpoints
+1 and 2 are for isochronous transmits and receives respectively.
+Endpoints 3 and 4 support bulk transmits and receives. Endpoints 5 and
+6 normally support interrupt transmits and receives,but endpoint 5 can
+also be configured to support bulk transmits. At this time only the
+control endpoint 0, the bulk endpoints 3 and 4, and the interrupt
+endpoint 5 are supported.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN10"
+></A
+><H2
+>Endpoint Data Structures</H2
+><P
+>The uPD985xx USB device driver can provide up to four data structures
+corresponding to the four supported endpoints: a
+<SPAN
+CLASS="STRUCTNAME"
+>usbs_control_endpoint</SPAN
+> structure
+<TT
+CLASS="VARNAME"
+>usbs_upd985xx_ep0</TT
+>;
+<SPAN
+CLASS="STRUCTNAME"
+>usbs_tx_endpoint</SPAN
+> structures
+<TT
+CLASS="VARNAME"
+>usbs_upd985xx_ep3</TT
+> and
+<TT
+CLASS="VARNAME"
+>usbs_upd985xx_ep5</TT
+>; and a
+<SPAN
+CLASS="STRUCTNAME"
+>usbs_rx_endpoint</SPAN
+>
+<TT
+CLASS="VARNAME"
+>usbs_upd985xx_ep4</TT
+>. The header file
+<TT
+CLASS="FILENAME"
+>cyg/io/usb/usbs_nec_upd985xx.h</TT
+>
+provides declarations for these.</P
+><P
+>Not all applications will require support for all the endpoints. For
+example, if the intended use of the UDC only involves peripheral to
+host transfers then <TT
+CLASS="LITERAL"
+>usbs_upd985xx_ep4</TT
+> is redundant.
+The device driver provides configuration options to control the
+presence of each endpoint:</P
+><P
+></P
+><OL
+TYPE="1"
+><LI
+><P
+>Endpoint 0 is controlled by
+<TT
+CLASS="LITERAL"
+>CYGFUN_DEVS_USB_UPD985XX_EP0</TT
+>. This defaults to
+enabled if there are any higher-level packages that require USB
+hardware or if the global preference
+<TT
+CLASS="LITERAL"
+>CYGGLO_IO_USB_SLAVE_APPLICATION</TT
+> is enabled,
+otherwise it is disabled. Usually this has the desired effect. It may
+be necessary to override this in special circumstances, for example if
+the target board uses an external USB chip in preference to the UDC
+and it is that external chip's device driver that should be used
+rather than the on-chip UDC. It is not possible to disable endpoint 0
+and at the same time enable one or both of the other endpoints, since
+a USB device is only usable if it can process the standard control
+messages.</P
+></LI
+><LI
+><P
+>Endpoint 3 is controlled by
+<TT
+CLASS="LITERAL"
+>CYGPKG_DEVS_USB_UPD985XX_EP3</TT
+>. By default this
+endpoint is disabled: according to NEC erratum U3 there may be
+problems when attempting bulk transfers of 192 bytes or greater. As an
+alternative the device driver provides endpoint 5 configured to
+support bulk transfers. Endpoint 3 can be enabled if the application
+only requires bulk transfers of less than 192 bytes, or if this
+erratum is not applicable to the system being developed for other
+reasons.</P
+></LI
+><LI
+><P
+>Similarly endpoint 4 is controlled by
+<TT
+CLASS="LITERAL"
+>CYGPKG_DEVS_USB_UPD985XX_EP4</TT
+>. This is enabled by
+default whenever endpoint 0 is enabled, but it can be disabled
+manually.</P
+></LI
+><LI
+><P
+>Endpoint 5 is controlled by
+<TT
+CLASS="LITERAL"
+>CYGPKG_DEVS_USB_UPD985XX_EP5</TT
+>. This is enabled by
+default whenever endpoint 0 is enabled, but it can be disabled
+manually. There is also a configuration option
+<TT
+CLASS="LITERAL"
+>CYGIMP_DEVS_USB_UPD985XX_EP5_BULK</TT
+>, enabled by
+default. This option allows the endpoint to be used for bulk
+transfers rather than interrupt transfers.</P
+></LI
+></OL
+><P
+>The uPD985xx USB device driver implements the interface specified by the
+common eCos USB Slave Support package. The documentation for that
+package should be consulted for further details. </P
+><P
+>The device driver assumes a bulk packet size of 64 bytes, so this
+value should be used in the endpoint descriptors in the enumeration
+data provided by application code. The device driver also assumes
+a control packet size of eight bytes, and again this should be
+reflected in the enumeration data. If endpoint 5 is configured for
+interrupt rather than bulk transfers then the maximum packet size is
+limited to 64 bytes by the USB standard.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN40"
+></A
+><H2
+>Devtab Entries</H2
+><P
+>In addition to the endpoint data structures the uPD985xx USB device
+driver can also provide devtab entries for each endpoint. This allows
+higher-level code to use traditional I/O operations such as
+<TT
+CLASS="FUNCTION"
+>open</TT
+>/<TT
+CLASS="FUNCTION"
+>read</TT
+>/<TT
+CLASS="FUNCTION"
+>write</TT
+>
+rather than the USB-specific non-blocking functions like
+<TT
+CLASS="FUNCTION"
+>usbs_start_rx_buffer</TT
+>. These devtab entries are
+optional since they are not always required. The relevant
+configuration options are
+<TT
+CLASS="LITERAL"
+>CYGVAR_DEVS_USB_UPD985XX_EP0_DEVTAB_ENTRY</TT
+>,
+<TT
+CLASS="LITERAL"
+>CYGVAR_DEVS_USB_UPD985XX_EP3_DEVTAB_ENTRY</TT
+>,
+<TT
+CLASS="LITERAL"
+>CYGVAR_DEVS_USB_UPD985XX_EP4_DEVTAB_ENTRY</TT
+>, and
+<TT
+CLASS="LITERAL"
+>CYGVAR_DEVS_USB_UPD985XX_EP5_DEVTAB_ENTRY</TT
+>. By
+default these devtab entries are provided if the global preference
+<TT
+CLASS="LITERAL"
+>CYGGLO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES</TT
+> is enabled,
+which is usually the case. Obviously a devtab entry for a given
+endpoint will only be provided if the underlying endpoint is enabled.
+For example, there will not be a devtab entry for endpoint 4 if
+<TT
+CLASS="LITERAL"
+>CYGPKG_DEVS_USB_UPD985XX_EP4</TT
+> is disabled.</P
+><P
+>The names for the devtab entries are determined by using a
+configurable base name and appending <TT
+CLASS="LITERAL"
+>0c</TT
+>,
+<TT
+CLASS="LITERAL"
+>3w</TT
+>, <TT
+CLASS="LITERAL"
+>4r</TT
+> or <TT
+CLASS="LITERAL"
+>5w</TT
+>.
+The base name is determined by the configuration option
+<TT
+CLASS="LITERAL"
+>CYGDAT_DEVS_USB_UPD985XX_DEVTAB_BASENAME</TT
+> and has a
+default value of <TT
+CLASS="LITERAL"
+>/dev/usbs</TT
+>, so the devtab entry for
+endpoint 4 would default to <TT
+CLASS="LITERAL"
+>/dev/usbs4r</TT
+>. If the
+target hardware involves multiple USB devices then application
+developers may have to change the base name to prevent a name clash
+with other USB device drivers.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN61"
+></A
+><H2
+>Restrictions</H2
+><P
+>The current device driver imposes a restriction on certain bulk
+receives on endpoint 4. If the protocol being used involves
+variable-length transfers, in other words if the host is allowed to
+send less data than a maximum-sized transfer, then the buffer passed
+to the device driver for receives must be aligned to a 16-byte
+cacheline boundary and it must be a multiple of this 16-byte cacheline
+size. This restriction does not apply if the protocol only involves
+fixed-size transfers.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN64"
+></A
+><H2
+>Optional Hardware Workarounds</H2
+><P
+>The NEC errata list a number of other problems that affect the
+USB device driver. The device driver contains workarounds for these,
+which are enabled by default but can be disabled if the application
+developer knows that the relevant errata are not relevant to the
+system being developed.</P
+><P
+>Erratum S1 lists a possible problem if the device driver attempts
+multiple writes to the USB hardware. This is circumvented by a
+dummy read operation after every write. If this workaround is not
+required then the configuration option
+<TT
+CLASS="LITERAL"
+>CYGIMP_DEVS_USB_UPD985XX_IBUS_WRITE_LIMIT</TT
+> can be disabled.</P
+><P
+>Errata U3 and U4 describe various problems related to concurrent
+transmissions on different endpoints. By default the device driver
+works around this by serializing all transmit operations. For example
+if the device driver needs to send a response to a control message on
+endpoint 0 while there is an ongoing bulk transfer on endpoint 5, the
+response is delayed until the bulk transfer has completed. Under
+typical operating conditions this does not cause any problems:
+endpoint 0 traffic usually happens only during initialization, when
+the target is connected to the host, while endpoint 5 traffic only
+happens after initialization. However if transmit serialization is
+inappropriate for the system being developed then it can be disabled
+using the configuration option
+<TT
+CLASS="LITERAL"
+>CYGIMP_DEVS_USB_UPD985XX_SERIALIZE_TRANSMITS</TT
+>. </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN71"
+></A
+><H2
+>Platform Dependencies</H2
+><P
+>On some platforms it is necessary for the low-level USB device driver
+to perform some additional operations during start-up. For example it
+may be necessary to manipulate one of the processor's GPIO lines
+before the host can detect a new USB peripheral and attempt to
+communicate with it. This avoids problems if the target involves a
+significant amount of work prior to device driver initialization, for
+example a power-on self-test sequence. If the USB host attempted to
+contact the target before the USB device driver had been initialized,
+it would fail to get the expected responses and conclude that the
+target was not a functional USB peripheral.</P
+><P
+>Platform-specific initialization code can be provided via a macro
+<TT
+CLASS="FUNCTION"
+>UPD985XX_USB_PLATFORM_INIT</TT
+>. Typically this macro
+would be defined in the platform HAL's header file
+<TT
+CLASS="FILENAME"
+>cyg/hal/plf_io.h</TT
+>. If the
+current platform defines such a macro, the USB device driver will
+invoke it during the endpoint 0 start-up operation.</P
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/devs/usb/nec_upd985xx/current/doc/makefile b/cesar/ecos/packages/devs/usb/nec_upd985xx/current/doc/makefile
new file mode 100644
index 0000000000..d8db352490
--- /dev/null
+++ b/cesar/ecos/packages/devs/usb/nec_upd985xx/current/doc/makefile
@@ -0,0 +1,55 @@
+#=============================================================================
+#
+# makefile
+#
+# For building the NEC uPD985xx USB device driver documentation
+#
+#=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#=============================================================================
+#####DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Date: 2001-01-11
+#####DESCRIPTIONEND####
+#=============================================================================
+
+TOPLEVEL := ../../../../..
+MAIN_SGML := usbs_upd985xx.sgml
+MAIN_HTML := devs-usb-upd985xx.html
+MAIN_PDF := devs-usb-upd985xx.pdf
+OTHER_SGML :=
+PICTURES :=
+
+include $(TOPLEVEL)/pkgconf/rules.doc
diff --git a/cesar/ecos/packages/devs/usb/nec_upd985xx/current/doc/usbs_upd985xx.sgml b/cesar/ecos/packages/devs/usb/nec_upd985xx/current/doc/usbs_upd985xx.sgml
new file mode 100644
index 0000000000..05d2b66b0f
--- /dev/null
+++ b/cesar/ecos/packages/devs/usb/nec_upd985xx/current/doc/usbs_upd985xx.sgml
@@ -0,0 +1,259 @@
+<!-- DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" -->
+
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- usbs_nec_upd9850x.sgml -->
+<!-- -->
+<!-- Documentation for the NEC uPD9850x USB Device Driver. -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- Author(s): bartv -->
+<!-- Contact(s): bartv -->
+<!-- Date: 2001/05/22 -->
+<!-- Version: 0.01 -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part id="devs-usb-nec-upd985xx-ref">
+<!-- reference id="devs-usb-nec-upd985xx-ref" -->
+ <title>NEC uPD985xx USB Device Driver</title>
+
+<refentry id="devs-usb-nec-upd985xx">
+<refmeta>
+<refentrytitle>NEC uPD985xx USB Device Driver</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>NEC uPD985xx USB Support</refname>
+<refpurpose>Device driver for the on-chip NEC uPD985xx USB device</refpurpose>
+</refnamediv>
+
+<refsect1><title>NEC uPD985xx USB Hardware</title>
+<para>
+The NEC uPD985xx family of processors is supplied with an on-chip USB
+slave device, the UDC (USB Device Controller). This supports seven
+endpoints. Endpoint 0 can only be used for control messages. Endpoints
+1 and 2 are for isochronous transmits and receives respectively.
+Endpoints 3 and 4 support bulk transmits and receives. Endpoints 5 and
+6 normally support interrupt transmits and receives, but endpoint 5 can
+also be configured to support bulk transmits. At this time only the
+control endpoint 0, the bulk endpoints 3 and 4, and the interrupt
+endpoint 5 are supported.
+</para>
+</refsect1>
+
+<refsect1><title>Endpoint Data Structures</title>
+<para>
+The uPD985xx USB device driver can provide up to four data structures
+corresponding to the four supported endpoints: a
+<structname>usbs_control_endpoint</structname> structure
+<varname>usbs_upd985xx_ep0</varname>;
+<structname>usbs_tx_endpoint</structname> structures
+<varname>usbs_upd985xx_ep3</varname> and
+<varname>usbs_upd985xx_ep5</varname>; and a
+<structname>usbs_rx_endpoint</structname>
+<varname>usbs_upd985xx_ep4</varname>. The header file
+<filename class="headerfile">cyg/io/usb/usbs_nec_upd985xx.h</filename>
+provides declarations for these.
+</para>
+<para>
+Not all applications will require support for all the endpoints. For
+example, if the intended use of the UDC only involves peripheral to
+host transfers then <literal>usbs_upd985xx_ep4</literal> is redundant.
+The device driver provides configuration options to control the
+presence of each endpoint:
+</para>
+<orderedlist>
+<listitem>
+<para>
+Endpoint 0 is controlled by
+<literal>CYGFUN_DEVS_USB_UPD985XX_EP0</literal>. This defaults to
+enabled if there are any higher-level packages that require USB
+hardware or if the global preference
+<literal>CYGGLO_IO_USB_SLAVE_APPLICATION</literal> is enabled,
+otherwise it is disabled. Usually this has the desired effect. It may
+be necessary to override this in special circumstances, for example if
+the target board uses an external USB chip in preference to the UDC
+and it is that external chip's device driver that should be used
+rather than the on-chip UDC. It is not possible to disable endpoint 0
+and at the same time enable one or both of the other endpoints, since
+a USB device is only usable if it can process the standard control
+messages.
+</para>
+</listitem>
+<listitem>
+<para>
+Endpoint 3 is controlled by
+<literal>CYGPKG_DEVS_USB_UPD985XX_EP3</literal>. By default this
+endpoint is disabled: according to NEC erratum U3 there may be
+problems when attempting bulk transfers of 192 bytes or greater. As an
+alternative the device driver provides support for endpoint 5,
+configured to allow bulk transfers. Endpoint 3 can be enabled if the
+application only requires bulk transfers of less than 192 bytes, or if
+this erratum is not applicable to the system being developed for other
+reasons.
+</para>
+</listitem>
+<listitem>
+<para>
+Endpoint 4 is controlled by
+<literal>CYGPKG_DEVS_USB_UPD985XX_EP4</literal>. This is enabled by
+default whenever endpoint 0 is enabled, but it can be disabled
+manually.
+</para>
+</listitem>
+<listitem>
+<para>
+Endpoint 5 is controlled by
+<literal>CYGPKG_DEVS_USB_UPD985XX_EP5</literal>. This is enabled by
+default whenever endpoint 0 is enabled, but it can be disabled
+manually. There is also a configuration option
+<literal>CYGIMP_DEVS_USB_UPD985XX_EP5_BULK</literal>, enabled by
+default. This option allows the endpoint to be used for bulk
+transfers rather than interrupt transfers.
+</para>
+</listitem>
+</orderedlist>
+<para>
+The uPD985xx USB device driver implements the interface specified by the
+common eCos USB Slave Support package. The documentation for that
+package should be consulted for further details.
+</para>
+<para>
+The device driver assumes a bulk packet size of 64 bytes, so this
+value should be used in the endpoint descriptors in the enumeration
+data provided by application code. The device driver also assumes
+a control packet size of eight bytes, and again this should be
+reflected in the enumeration data. If endpoint 5 is configured for
+interrupt rather than bulk transfers then the maximum packet size is
+limited to 64 bytes by the USB standard.
+</para>
+</refsect1>
+
+<refsect1><title>Devtab Entries</title>
+<para>
+In addition to the endpoint data structures the uPD985xx USB device
+driver can also provide devtab entries for each endpoint. This allows
+higher-level code to use traditional I/O operations such as
+<function>open</function>/<function>read</function>/<function>write</function>
+rather than the USB-specific non-blocking functions like
+<function>usbs_start_rx_buffer</function>. These devtab entries are
+optional since they are not always required. The relevant
+configuration options are
+<literal>CYGVAR_DEVS_USB_UPD985XX_EP0_DEVTAB_ENTRY</literal>,
+<literal>CYGVAR_DEVS_USB_UPD985XX_EP3_DEVTAB_ENTRY</literal>,
+<literal>CYGVAR_DEVS_USB_UPD985XX_EP4_DEVTAB_ENTRY</literal>, and
+<literal>CYGVAR_DEVS_USB_UPD985XX_EP5_DEVTAB_ENTRY</literal>. By
+default these devtab entries are provided if the global preference
+<literal>CYGGLO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES</literal> is enabled,
+which is usually the case. Obviously a devtab entry for a given
+endpoint will only be provided if the underlying endpoint is enabled.
+For example, there will not be a devtab entry for endpoint 4 if
+<literal>CYGPKG_DEVS_USB_UPD985XX_EP4</literal> is disabled.
+</para>
+<para>
+The names for the devtab entries are determined by using a
+configurable base name and appending <literal>0c</literal>,
+<literal>3w</literal>, <literal>4r</literal> or <literal>5w</literal>.
+The base name is determined by the configuration option
+<literal>CYGDAT_DEVS_USB_UPD985XX_DEVTAB_BASENAME</literal> and has a
+default value of <literal>/dev/usbs</literal>, so the devtab entry for
+endpoint 4 would default to <literal>/dev/usbs4r</literal>. If the
+target hardware involves multiple USB devices then application
+developers may have to change the base name to prevent a name clash
+with other USB device drivers.
+</para>
+</refsect1>
+
+<refsect1><title>Restrictions</title>
+<para>
+The current device driver imposes a restriction on certain bulk
+receives on endpoint 4. If the protocol being used involves
+variable-length transfers, in other words if the host is allowed to
+send less data than a maximum-sized transfer, then the buffer passed
+to the device driver for receives must be aligned to a 16-byte
+cacheline boundary and it must be a multiple of this 16-byte cacheline
+size. This restriction does not apply if the protocol only involves
+fixed-size transfers.
+</para>
+</refsect1>
+
+<refsect1><title>Optional Hardware Workarounds</title>
+<para>
+The NEC errata list a number of other problems that affect the USB
+device driver. The device driver contains workarounds for these, which
+are enabled by default but can be disabled if the application
+developer knows that the errata are not relevant to the system being
+developed.
+</para>
+<para>
+Erratum S1 lists a possible problem if the device driver attempts
+multiple writes to the USB hardware. This is circumvented by a
+dummy read operation after every write. If the workaround is not
+required then the configuration option
+<literal>CYGIMP_DEVS_USB_UPD985XX_IBUS_WRITE_LIMIT</literal> can be disabled.
+</para>
+<para>
+Errata U3 and U4 describe various problems related to concurrent
+transmissions on different endpoints. By default the device driver
+works around this by serializing all transmit operations. For example
+if the device driver needs to send a response to a control message on
+endpoint 0 while there is an ongoing bulk transfer on endpoint 5, the
+response is delayed until the bulk transfer has completed. Under
+typical operating conditions this does not cause any problems:
+endpoint 0 traffic usually happens only during initialization, when
+the target is connected to the host, while endpoint 5 traffic only
+happens after initialization. However if transmit serialization is
+inappropriate for the system being developed then it can be disabled
+using the configuration option
+<literal>CYGIMP_DEVS_USB_UPD985XX_SERIALIZE_TRANSMITS</literal>.
+</para>
+</refsect1>
+
+<refsect1><title>Platform Dependencies</title>
+<para>
+On some platforms it is necessary for the low-level USB device driver
+to perform some additional operations during start-up. For example it
+may be necessary to manipulate one of the processor's GPIO lines
+before the host can detect a new USB peripheral and attempt to
+communicate with it. This avoids problems if the target involves a
+significant amount of work prior to device driver initialization, for
+example a power-on self-test sequence. If the USB host attempted to
+contact the target before the USB device driver had been initialized,
+it would fail to get the expected responses and conclude that the
+target was not a functional USB peripheral.
+</para>
+<para>
+Platform-specific initialization code can be provided via a macro
+<function>UPD985XX_USB_PLATFORM_INIT</function>. Typically this macro
+would be defined in the platform HAL's header file
+<filename class="headerfile">cyg/hal/plf_io.h</filename>. If the
+current platform defines such a macro, the USB device driver will
+invoke it during the endpoint 0 start-up operation.
+</para>
+</refsect1>
+
+</refentry>
+</part>
+<!-- /reference -->
diff --git a/cesar/ecos/packages/devs/usb/nec_upd985xx/current/include/usbs_upd985xx.h b/cesar/ecos/packages/devs/usb/nec_upd985xx/current/include/usbs_upd985xx.h
new file mode 100644
index 0000000000..9a091e3d8f
--- /dev/null
+++ b/cesar/ecos/packages/devs/usb/nec_upd985xx/current/include/usbs_upd985xx.h
@@ -0,0 +1,79 @@
+#ifndef CYGONCE_USBS_UPD985XX_H
+# define CYGONCE_USBS_UPD985XX_H
+//==========================================================================
+//
+// include/usbs_upd985xx.h
+//
+// The interface exported by the NEC uPD985xx USB device driver
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 2000-05-22
+// Purpose:
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/io/usb/usbs.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The NEC UPD985xx family comes with on-chip USB slave support. This
+ * provides seven endpoints. Endpoint 0 can only be used for control
+ * messages. Endpoints 1 and 2 can only be used for isochronous
+ * transfers, and are not supported at this time. Endpoints 3 and 4
+ * are for bulk transfers, although endpoint 3 is normally disabled
+ * and endpoint 5 is used for bulk transfers instead. Endpoints 5
+ * and 6 are normally used for interrupt transfers, but endpoint 5 can
+ * also be used bulk transfers. Endpoint 6 is not currently supported.
+ */
+extern usbs_control_endpoint usbs_upd985xx_ep0;
+extern usbs_tx_endpoint usbs_upd985xx_ep3;
+extern usbs_rx_endpoint usbs_upd985xx_ep4;
+extern usbs_tx_endpoint usbs_upd985xx_ep5;
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif
+
+
+#endif /* CYGONCE_USBS_UPD985XX_H */
diff --git a/cesar/ecos/packages/devs/usb/nec_upd985xx/current/src/usbs_upd985xx.c b/cesar/ecos/packages/devs/usb/nec_upd985xx/current/src/usbs_upd985xx.c
new file mode 100644
index 0000000000..36d90eeecc
--- /dev/null
+++ b/cesar/ecos/packages/devs/usb/nec_upd985xx/current/src/usbs_upd985xx.c
@@ -0,0 +1,2689 @@
+//==========================================================================
+//
+// usbs_upd985xx.c
+//
+// Driver for the NEC uPD985xx USB device
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2002 Bart Veer
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 2001-05-22
+//
+// This code implements support for the on-chip USB port on the NEC
+// uPD985xx family of processors. The code has been developed on the
+// uPD98503 and may or may not work on other members of the uPD985xx
+// family.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/cyg_trac.h>
+#include <cyg/infra/diag.h>
+
+#include <pkgconf/hal_mips_upd985xx.h>
+#include <pkgconf/devs_usb_upd985xx.h>
+
+#include <cyg/hal/drv_api.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_io.h>
+#include <cyg/hal/hal_cache.h>
+#include <cyg/error/codes.h>
+
+#include <cyg/io/usb/usb.h>
+#include <cyg/io/usb/usbs.h>
+
+// For memcpy()
+#include <string.h>
+
+// ----------------------------------------------------------------------------
+// Toplevel FIXME's.
+//
+// The device supports remote wakeups, but this driver does not. Note that
+// the device GET_STATUS, SET_FEATURE and CLEAR_FEATURE operations are
+// affected by remote wakeup support.
+
+// ----------------------------------------------------------------------------
+// Debugging-related odds and ends.
+#if 0
+# define DBG(a) diag_printf a
+#else
+# define DBG(a)
+#endif
+
+// ----------------------------------------------------------------------------
+// Hardware definitions.
+//
+// The NEC uPD985Xx on-chip USB device provides the following:
+//
+// endpoint 0 - control messages only
+// endpoint 1 - isochronous transmits
+// endpoint 2 - isochronous receives
+// endpoint 3 - bulk transmits
+// endpoint 4 - bulk receives
+// endpoint 5 - interrupt transmits
+// endpoint 6 - interrupt receives
+
+// All acess to the USB controller registers goes via the IBUS, which
+// always runs little-endian. Hence when the CPU is running
+// little-endian no extra work is needed, but when running big-endian
+// all register updates involve swapping.
+#ifdef CYGPKG_HAL_MIPS_LSBFIRST
+# define IBUS_SWAP32(_a_) (_a_)
+# define IBUS_SWAPPTR(_type_, _a_) (_a_)
+#else
+# error IBUS_SWAP32() needs to be defined and tested
+#endif
+
+// Move an address to kseg1. Or'ing in the relevant bits means
+// that this macro will work even if the specified address is
+// already in kseg1
+#define MIPS_TO_UNCACHED(_a_) ((void*)(((cyg_uint32)(_a_)) | MIPS_KSEG1_BASE))
+
+// For now access the various registers directly. A structure might
+// be marginally more inefficient in that if a function accesses
+// several registers this could be handled by a single base plus
+// offsets, rather than by separate addresses.
+#define USBS_REGISTER(_a_) ((volatile cyg_uint32*)(MIPS_IO_BASE + UPD985XX_SYSUSB_OFF + (_a_)))
+#define USBS_ADDRREG(_type_, _a_) ((_type_* volatile*)(MIPS_IO_BASE + UPD985XX_SYSUSB_OFF + (_a_)))
+
+#define USBS_GMR USBS_REGISTER(0x0000)
+#define USBS_VER USBS_REGISTER(0x0004)
+#define USBS_GSR1 USBS_REGISTER(0x0010)
+#define USBS_IMR1 USBS_REGISTER(0x0014)
+#define USBS_GSR2 USBS_REGISTER(0x0018)
+#define USBS_IMR2 USBS_REGISTER(0x001C)
+#define EP0_CR USBS_REGISTER(0x0020)
+#define EP1_CR USBS_REGISTER(0x0024)
+#define EP2_CR USBS_REGISTER(0x0028)
+#define EP3_CR USBS_REGISTER(0x002C)
+#define EP4_CR USBS_REGISTER(0x0030)
+#define EP5_CR USBS_REGISTER(0x0034)
+#define EP6_CR USBS_REGISTER(0x0038)
+#define USBS_CMR USBS_REGISTER(0x0040)
+#define USBS_CA USBS_ADDRREG(void, 0x0044)
+#define USBS_TEPSR USBS_REGISTER(0x0048)
+#define USBS_RP0IR USBS_REGISTER(0x0050)
+#define USBS_RP0AR USBS_ADDRREG(RxBufferDescriptor, 0x0054)
+#define USBS_RP1IR USBS_REGISTER(0x0058)
+#define USBS_RP1AR USBS_ADDRREG(RxBufferDescriptor, 0x005C)
+#define USBS_RP2IR USBS_REGISTER(0x0060)
+#define USBS_RP2AR USBS_ADDRREG(RxBufferDescriptor, 0x0064)
+#define USBS_TMSA USBS_ADDRREG(TxMailbox, 0x0070)
+#define USBS_TMBA USBS_ADDRREG(TxMailbox, 0x0074)
+#define USBS_TMRA USBS_ADDRREG(TxMailbox, 0x0078)
+#define USBS_TMWA USBS_ADDRREG(TxMailbox, 0x007C)
+#define USBS_RMSA USBS_ADDRREG(RxMailbox, 0x0080)
+#define USBS_RMBA USBS_ADDRREG(RxMailbox, 0x0084)
+#define USBS_RMRA USBS_ADDRREG(RxMailbox, 0x0088)
+#define USBS_RMWA USBS_ADDRREG(RxMailbox, 0x008C)
+
+// There are additional counter registers from offset 0x100 onwards.
+// These registers are not used by the driver, and anyway may not be
+// available on all hardware.
+
+// The General Mode register USBS_GMR
+#define USBS_GMR_VT (0x01 << 23)
+#define USBS_GMR_FA_MASK (0x7F << 16)
+#define USBS_GMR_FA_SHIFT 16
+#define USBS_GMR_SOFINTVL_MASK (0x00FF << 8)
+#define USBS_GMR_SOFINTVL_SHIFT 8
+#define USBS_GMR_SOFINTVL_DEFAULT_VALUE (0x18 << 8)
+#define USBS_GMR_AU (0x01 << 2)
+#define USBS_GMR_LE (0x01 << 1)
+#define USBS_GMR_RR (0x01 << 0)
+
+// The Frame Number/Version register
+#define USBS_VER_UVER_MASK (0x0FFFF << 16)
+#define USBS_VER_UVER_SHIFT 16
+#define USBS_VER_UFNR_MASK (0x03FF << 0)
+#define USBS_VER_UFNR_SHIFT 0
+
+// General status register 1
+#define USBS_GSR1_GSR2 (0x01 << 31)
+#define USBS_GSR1_TMF (0x01 << 23)
+#define USBS_GSR1_RMF (0x01 << 22)
+#define USBS_GSR1_RPE2 (0x01 << 21)
+#define USBS_GSR1_RPE1 (0x01 << 20)
+#define USBS_GSR1_RPE0 (0x01 << 19)
+#define USBS_GSR1_RPA2 (0x01 << 18)
+#define USBS_GSR1_RPA1 (0x01 << 17)
+#define USBS_GSR1_RPA0 (0x01 << 16)
+#define USBS_GSR1_DER (0x01 << 10)
+#define USBS_GSR1_EP2FO (0x01 << 9)
+#define USBS_GSR1_EP1FU (0x01 << 8)
+#define USBS_GSR1_EP6RF (0x01 << 7)
+#define USBS_GSR1_EP5TF (0x01 << 6)
+#define USBS_GSR1_EP4RF (0x01 << 5)
+#define USBS_GSR1_EP3TF (0x01 << 4)
+#define USBS_GSR1_EP2RF (0x01 << 3)
+#define USBS_GSR1_EP1TF (0x01 << 2)
+#define USBS_GSR1_EP0RF (0x01 << 1)
+#define USBS_GSR1_EP0TF (0x01 << 0)
+
+// The Interrupt mask 1 bits correspond to the GSR1 bits above
+
+// General status register 2
+#define USBS_GSR2_FW (0x01 << 21)
+#define USBS_GSR2_IFN (0x01 << 20)
+#define USBS_GSR2_IEA (0x01 << 19)
+#define USBS_GSR2_URSM (0x01 << 18)
+#define USBS_GSR2_URST (0x01 << 17)
+#define USBS_GSR2_USPD (0x01 << 16)
+#define USBS_GSR2_EP2OS (0x01 << 7)
+#define USBS_GSR2_EP2ED (0x01 << 6)
+#define USBS_GSR2_EP2ND (0x01 << 5)
+#define USBS_GSR2_EP1NT (0x01 << 4)
+#define USBS_GSR2_EP1ET (0x01 << 3)
+#define USBS_GSR2_EP1ND (0x01 << 2)
+#define USBS_GSR2_ES (0x01 << 1)
+#define USBS_GSR2_SL (0x01 << 0)
+
+// Interrupt mask 2 bits correspond to GSR2
+
+// Endpoint control registers.
+// EP0 - control messages
+#define EP0_CR_EP0EN (0x01 << 31)
+#define EP0_CR_ISS (0x01 << 20)
+#define EP0_CR_INAK (0x01 << 19)
+#define EP0_CR_OSS (0x01 << 18)
+#define EP0_CR_NHSK0 (0x01 << 17)
+#define EP0_CR_ONAK (0x01 << 16)
+#define EP0_CR_MAXP0_MASK (0x7F << 0)
+#define EP0_CR_MAXP0_SHIFT 0
+
+// EP1 - isochronous transmits
+#define EP1_CR_EP1EN (0x01 << 31)
+#define EP1_CR_TM1 (0x01 << 19)
+#define EP1_CR_TM1_MASK (0x01 << 19)
+#define EP1_CR_TM1_SZLP (0x00 << 19)
+#define EP1_CR_TM1_NZLP (0x01 << 19)
+#define EP1_CR_MAXP1_MASK (0x3FF << 0)
+#define EP1_CR_MAXP1_SHIFT 0
+
+// EP2 - isochronous receives
+#define EP2_CR_EP2EN (0x01 << 31)
+#define EP2_CR_RM2_MASK (0x03 << 19)
+#define EP2_CR_RM2_NORMAL (0x00 << 19)
+#define EP2_CR_RM2_ASSEMBLE (0x02 << 19)
+#define EP2_CR_RM2_SEPARATE (0x03 << 19)
+#define EP2_CR_MAXP2_MASK (0x3FF << 0)
+#define EP2_CR_MAXP2_SHIFT 0
+
+// EP3 - bulk transmits
+#define EP3_CR_EP3EN (0x01 << 31)
+#define EP3_CR_TM3 (0x01 << 19)
+#define EP3_CR_TM3_MASK (0x01 << 19)
+#define EP3_CR_TM3_SZLP (0x00 << 19)
+#define EP3_CR_TM3_NZLP (0x01 << 19)
+#define EP3_CR_SS3 (0x01 << 18)
+#define EP3_CR_NAK3 (0x01 << 16)
+#define EP3_CR_MAXP3_MASK (0x7F << 0)
+#define EP3_CR_MAXP3_SHIFT 0
+
+// EP4 - bulk receives
+#define EP4_CR_EP4EN (0x01 << 31)
+#define EP4_CR_RM4_MASK (0x03 << 19)
+#define EP4_CR_RM4_NORMAL (0x00 << 19)
+#define EP4_CR_RM4_ASSEMBLE (0x02 << 19)
+#define EP4_CR_RM4_SEPARATE (0x03 << 19)
+#define EP4_CR_SS4 (0x01 << 18)
+#define EP4_CR_NHSK4 (0x01 << 17)
+#define EP4_CR_NAK4 (0x01 << 16)
+#define EP4_CR_MAXP4_MASK (0x7F << 0)
+#define EP4_CR_MAXP4_SHIFT 0
+
+// EP5 - interrupt transmits
+#define EP5_CR_EP5EN (0x01 << 31)
+#define EP5_CR_FM (0x01 << 19)
+#define EP5_CR_SS5 (0x01 << 18)
+#define EP5_CR_NAK5 (0x01 << 16)
+#define EP5_CR_MAXP5_MASK (0x7F << 0)
+#define EP5_CR_MAXP5_SHIFT 0
+
+// EP6 - interrupt receives
+#define EP6_CR_EP6EN (0x01 << 31)
+#define EP6_CR_SS6 (0x01 << 18)
+#define EP6_CR_NHSK6 (0x01 << 17)
+#define EP6_CR_NAK6 (0x01 << 16)
+#define EP6_CR_MAXP6_MASK (0x7F << 0)
+#define EP6_CR_MAXP6_SHIFT 0
+
+// Some bits which can be applied to multiple transmit or receive
+// endpoint control registers, thus avoiding unnecessary code
+// duplication. These will not work for the isochronous endpoints
+// because those are just too special.
+#define EPtx_CR_EpxEN (0x01 << 31)
+#define EPtx_CR_SSx (0x01 << 18)
+#define EPtx_CR_NAKx (0x01 << 16)
+#define EPtx_CR_MAXPx_MASK (0x7F << 0)
+#define EPtx_CR_MAXPx_SHIFT 0
+
+#define EPrx_CR_EPxEN (0x01 << 31)
+#define EPrx_CR_SSx (0x01 << 18)
+#define EPrx_CR_NHSKx (0x01 << 17)
+#define EPrx_CR_NAKx (0x01 << 16)
+#define EPrx_CR_MAXPx_MASK (0x7F << 0)
+#define EPrx_CR_MAXPx_SHIFT 0
+
+// USB command register
+#define USBS_CMR_BUSY (0x01 << 31)
+#define USBS_CMR_COMMAND_MASK (0x07 << 24)
+#define USBS_CMR_COMMAND_SHIFT 24
+#define USBS_CMR_COMMAND_TX_EP0 (0x00 << 24)
+#define USBS_CMR_COMMAND_TX_EP1 (0x01 << 24)
+#define USBS_CMR_COMMAND_TX_EP3 (0x02 << 24)
+#define USBS_CMR_COMMAND_TX_EP5 (0x03 << 24)
+#define USBS_CMR_COMMAND_ADD_POOL0 (0x04 << 24)
+#define USBS_CMR_COMMAND_ADD_POOL1 (0x05 << 24)
+#define USBS_CMR_COMMAND_ADD_POOL2 (0x06 << 24)
+#define USBS_CMR_SIZE_MASK (0x0FFFF << 0)
+#define USBS_CMR_SIZE_SHIFT 0
+
+// TX Endpoint status
+#define USBS_TEPSR_EP5TS_MASK (0x03 << 24)
+#define USBS_TEPSR_EP5TS_SHIFT 24
+#define USBS_TEPSR_EP5TS_IDLE (0x00 << 24)
+#define USBS_TEPSR_EP5TS_ONE (0x01 << 24)
+#define USBS_TEPSR_EP5TS_TWO (0x02 << 24)
+#define USBS_TEPSR_EP3TS_MASK (0x03 << 16)
+#define USBS_TEPSR_EP3TS_SHIFT 16
+#define USBS_TEPSR_EP3TS_IDLE (0x00 << 16)
+#define USBS_TEPSR_EP3TS_ONE (0x01 << 16)
+#define USBS_TEPSR_EP3TS_TWO (0x02 << 16)
+#define USBS_TEPSR_EP1TS_MASK (0x03 << 8)
+#define USBS_TEPSR_EP1TS_SHIFT 8
+#define USBS_TEPSR_EP1TS_IDLE (0x00 << 8)
+#define USBS_TEPSR_EP1TS_ONE (0x01 << 8)
+#define USBS_TEPSR_EP1TS_TWO (0x02 << 8)
+#define USBS_TEPSR_EP0TS_MASK (0x03 << 0)
+#define USBS_TEPSR_EP0TS_SHIFT 0
+#define USBS_TEPSR_EP0TS_IDLE (0x00 << 0)
+#define USBS_TEPSR_EP0TS_ONE (0x01 << 0)
+#define USBS_TEPSR_EP0TS_TWO (0x02 << 0)
+
+// Receive pools. The RP0IR, RP1IR and RP2IR registers
+// all use the same bits.
+#define USBS_RPxIR_AL_MASK (0x07 << 28)
+#define USBS_RPxIR_AL_SHIFT 28
+#define USBS_RPxIR_AL_NONE (0 << 28)
+#define USBS_RPxIR_RNOD_MASK (0x0FFFF << 0)
+#define USBS_RPxIR_RNOD_SHIFT 0
+
+// The other registers do not have special bits.
+
+// Data transfers involve buffer descriptors and mailboxes. The
+// relevant data structures and fields need to be defined. For now
+// assume 32-bit mode of operation, i.e. there will be no padding
+// between two successive 32-bit entities
+
+// A transmit packet directory consists of up to 255 buffer
+// descriptors. Each buffer descriptor specifies a buffer and a size
+// of up to 64K.
+
+typedef struct TxBufferDescriptor {
+ cyg_uint32 control;
+ void* buffer;
+} TxBufferDescriptor;
+
+#define TXBUFDESC_CTRL_LAST (0x01 << 31)
+#define TXBUFDESC_CTRL_BUFDESC_MASK (0x01 << 30)
+#define TXBUFDESC_CTRL_BUFDESC_SHIFT 30
+#define TXBUFDESC_CTRL_BUFDESC_LINK (0x00 << 30)
+#define TXBUFDESC_CTRL_BUFDESC_BUFDESC (0x01 << 30)
+#define TXBUFDESC_CTRL_SIZE_MASK (0x0FFFF << 0)
+#define TXBUFDESC_CTRL_SIZE_SHIFT 0
+
+// The result of a transmit operation gets written to a mailbox
+// structure in memory.
+typedef struct TxMailbox {
+ cyg_uint32 status;
+} TxMailbox;
+
+#define TXMBOX_STATUS_IBUS_ERROR (0x01 << 10)
+#define TXMBOX_STATUS_UNDERRUN (0x01 << 9)
+#define TXMBOX_STATUS_MODE_MASK (0x01 << 8)
+#define TXMBOX_STATUS_MODE_SHIFT 8
+#define TXMBOX_STATUS_MODE_SZLP (0x00 << 8)
+#define TXMBOX_STATUS_MODE_NZLP (0x01 << 8)
+#define TXMBOX_STATUS_EPN_MASK (0x07 << 0)
+#define TXMBOX_STATUS_EPN_SHIFT 0
+#define TXMBOX_STATUS_EPN_EP0 (0x00 << 0)
+#define TXMBOX_STATUS_EPN_EP1 (0x02 << 0)
+#define TXMBOX_STATUS_EPN_EP3 (0x04 << 0)
+#define TXMBOX_STATUS_EPN_EP5 (0x06 << 0)
+
+// Now for receive operations. This involves adding buffer descriptors
+// to one of three pools. The pools are managed by registers.
+typedef struct RxBufferDescriptor {
+ cyg_uint32 control;
+ void* buffer;
+} RxBufferDescriptor;
+
+#define RXBUFDESC_CTRL_LAST (0x01 << 31)
+#define RXBUFDESC_CTRL_BUFDESC_MASK (0x01 << 30)
+#define RXBUFDESC_CTRL_BUFDESC_SHIFT 30
+#define RXBUFDESC_CTRL_BUFDESC_LINK (0x00 << 30)
+#define RXBUFDESC_CTRL_BUFDESC_BUFDESC (0x01 << 30)
+#define RXBUFDESC_CTRL_SIZE_MASK (0x0FFFF << 0)
+#define RXBUFDESC_CTRL_SIZE_SHIFT 0
+
+typedef struct RxMailbox {
+ cyg_uint32 status;
+ void* address;
+} RxMailbox;
+
+#define RXMBOX_STATUS_EPN_MASK (0x07 << 29)
+#define RXMBOX_STATUS_EPN_SHIFT 29
+#define RXMBOX_STATUS_EPN_EP0 (0x01 << 29)
+#define RXMBOX_STATUS_EPN_EP2 (0x03 << 29)
+#define RXMBOX_STATUS_EPN_EP4 (0x05 << 29)
+#define RXMBOX_STATUS_EPN_EP6 (0x07 << 29)
+#define RXMBOX_STATUS_CORRUPTION (0x01 << 25)
+#define RXMBOX_STATUS_IBUS_ERROR (0x01 << 24)
+#define RXMBOX_STATUS_SETUP_MASK (0x01 << 23)
+#define RXMBOX_STATUS_SETUP_SHIFT 23
+#define RXMBOX_STATUS_SETUP_NORMAL (0x00 << 23)
+#define RXMBOX_STATUS_SETUP_SETUP (0x01 << 23)
+#define RXMBOX_STATUS_OVERRUN (0x01 << 22)
+#define RXMBOX_STATUS_DATA_TOGGLE (0x01 << 21)
+#define RXMBOX_STATUS_CRC (0x01 << 20)
+#define RXMBOX_STATUS_BIT_STUFFING (0x01 << 19)
+#define RXMBOX_STATUS_64K (0x01 << 18)
+#define RXMBOX_STATUS_MODE_MASK (0x03 << 16)
+#define RXMBOX_STATUS_MODE_SHIFT 16
+#define RXMBOX_STATUS_MODE_NORMAL (0x00 << 16)
+#define RXMBOX_STATUS_MODE_NORMAL2 (0x01 << 16)
+#define RXMBOX_STATUS_MODE_ASSEMBLE (0x02 << 16)
+#define RXMBOX_STATUS_MODE_SEPARATE (0x03 << 16)
+#define RXMBOX_STATUS_SIZE_MASK (0x0FFFF << 0)
+#define RXMBOX_STATUS_SIZE_SHIFT 0
+
+
+// ----------------------------------------------------------------------------
+// Hardware work around - see NEC erratum S1, CPU to IBUS write restriction.
+// Reading back from the USB device after every write prevents any problems.
+// Strictly speaking it is only necessary to do this after every three
+// writes, but if there is concurrent ethernet activity then doing it
+// after eveyr write is safer. The frame number/version register seems
+// like a good one to read back from.
+
+#ifdef CYGIMP_DEVS_USB_UPD985XX_IBUS_WRITE_LIMIT
+# define FLUSH_IBUS() \
+ CYG_MACRO_START \
+ (void)*USBS_VER; \
+ CYG_MACRO_END
+
+#else
+# define FLUSH_IBUS() CYG_EMPTY_STATEMENT
+#endif
+
+// ----------------------------------------------------------------------------
+// Static data. There is a data structure for each endpoint. The
+// implementation is essentially a private class that inherits from
+// common classes for control and data endpoints, but device drivers
+// are supposed to be written in C so some ugliness is required.
+//
+// Devtab entries are defined in usbs_upd985xx_data.cxx to make sure
+// that the linker does not garbage-collect them.
+
+// Support for the interrupt handling code.
+static cyg_interrupt usbs_upd985xx_intr_data;
+static cyg_handle_t usbs_upd985xx_intr_handle;
+
+// The various bits in the two interrupt status registers are read-once,
+// i.e. reading the register clears the bits. Since much of the processing
+// is deferred to DSR level, it is necessary to keep track of pending
+// interrupts in separate variables. If another interrupt happens during
+// DSR processing, these variables will be updated. The main DSR loops
+// until there are no interesting bits left. Interrupts have to be
+// disabled briefly when clearing bits.
+static volatile cyg_uint32 usbs_upd985xx_gsr1 = 0;
+static volatile cyg_uint32 usbs_upd985xx_gsr2 = 0;
+
+// Many of the interrupt bits are of no interest and it is convenient
+// to mask them out in the ISR, thus avoiding unnecessary dsr
+// invocations.
+static cyg_uint32 usbs_upd985xx_gsr1_mask = 0;
+static cyg_uint32 usbs_upd985xx_gsr2_mask = 0;
+
+// Sizes for the receive and transmit mboxes.
+// NOTE: it is not clear what the optimal size for these
+// mailboxes is. For receives maybe one per rx endpoint,
+// plus a spare. For transmits maybe just two, since only
+// one transmit at a time is supported. Mailboxes are
+// relatively small, so for now four each should be ok.
+#define RXMBOX_COUNT 4
+#define TXMBOX_COUNT 4
+
+// There is one instance of this data structure. It is allocated
+// in kseg0 cached memory, but during initialization a separate
+// pointer value is set to the kseg1 uncached equivalent. This
+// makes it easier to point the hardware at uncached memory without
+// having to worry about cache line boundaries everywhere.
+
+typedef struct uncached_data {
+ // This partial cacheline does not actually store any data.
+ // However it ensures that the data does not share a cacheline
+ // with some other static, with updates to that other static
+ // causing funny side effects on the uncached data. There is a
+ // memory optimisation of subtracting sizeof(RxMailbox.status),
+ // i.e. exploit knowledge of alignment.
+ unsigned char cacheline_start[HAL_DCACHE_LINE_SIZE - sizeof(cyg_uint32)];
+
+ RxMailbox rx_mboxes[RXMBOX_COUNT];
+ TxMailbox tx_mboxes[TXMBOX_COUNT];
+
+ // For transmits a single buffer descriptor per endpoint suffices.
+ // If transmit locking is enabled then actually a single buffer
+ // descriptor for the whole system would suffice.
+ TxBufferDescriptor ep0_tx_bufdesc;
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP3
+ TxBufferDescriptor ep3_tx_bufdesc;
+#endif
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP5
+ TxBufferDescriptor ep5_tx_bufdesc;
+#endif
+
+
+ // More buffer descriptors are needed than might be expected, see
+ // the start_rx routines.
+ RxBufferDescriptor ep0_rx_bufdescs[4];
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP4
+ RxBufferDescriptor ep4_rx_bufdescs[8];
+#endif
+
+
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP4
+ // Space for the start and end of a transfer, avoiding problems
+ // with invalidating partial cache lines.
+ unsigned char ep4_head[HAL_DCACHE_LINE_SIZE];
+ unsigned char ep4_tail[HAL_DCACHE_LINE_SIZE];
+#endif
+
+ // The "big" buffers come last, reducing the offsets for the previous
+ // structures. It is not clear this really matters for MIPS.
+ //
+ // Endpoint 0 receive and transmit buffers. A transmit buffer is
+ // convenient because the hardware pretty much expects all of the
+ // data to be in contiguous memory, as opposed to the normal eCos
+ // USB driver model with refill buffers etc. An alternative
+ // implementation would keep the data in separate areas but would
+ // require lots of TxBufferDescriptors, so in memory terms the
+ // overheads of a single transmit buffer are not as big as might
+ // seem. It might be possible to get things working eight bytes
+ // at a time since the hardware appears to depend on zero-byte
+ // terminating packets in places, but that has not been attempted.
+ //
+ // A separate receive buffer is useful because it can be placed in
+ // uncached memory, avoiding the need for invalidation and
+ // worrying about other data in the cache lines. Note that this
+ // buffer may also get used for endpoint 6 interrupt receives
+ // because the two endpoints share a single pool.
+ unsigned char ep0_rx_buffer[CYGNUM_DEVS_USB_UPD985XX_EP0_RXBUFSIZE];
+ unsigned char ep0_tx_buffer[CYGNUM_DEVS_USB_UPD985XX_EP0_TXBUFSIZE];
+
+ // Another cacheline to prevent overlap with other statics.
+ // This has to be full-sized since the previous field is only byte-aligned.
+ unsigned char cacheline_end[HAL_DCACHE_LINE_SIZE];
+} uncached_data;
+
+// This data structure is quite large so making it all uninitialized
+// means a potentially big saving in ROM-booting systems. This
+// requires additional effort by the endpoint initialization routines.
+static uncached_data cached_copy;
+
+static uncached_data* uncached = (uncached_data*)0;
+
+// Endpoint 0. See the description below.
+
+static void usbs_upd985xx_ep0_start(usbs_control_endpoint*);
+static void usbs_upd985xx_poll(usbs_control_endpoint*);
+
+typedef struct ep0_impl {
+ usbs_control_endpoint common;
+ cyg_bool rx_expecting_data;
+ cyg_bool rx_indicator_valid;
+ RxMailbox rx_indicator;
+ cyg_bool tx_indicator_valid;
+ TxMailbox tx_indicator;
+ cyg_bool tx_needs_zero_transfer;
+ cyg_uint32 tx_size;
+} ep0_impl;
+
+static ep0_impl ep0 = {
+ common:
+ {
+ state: USBS_STATE_POWERED, // The hardware does not distinguish between detached, attached and powered.
+ enumeration_data: (usbs_enumeration_data*) 0,
+ start_fn: &usbs_upd985xx_ep0_start,
+ poll_fn: &usbs_upd985xx_poll,
+ interrupt_vector: CYGNUM_HAL_INTERRUPT_USB,
+ control_buffer: { 0, 0, 0, 0, 0, 0, 0, 0 },
+ state_change_fn: (void (*)(usbs_control_endpoint*, void*, usbs_state_change, int)) 0,
+ state_change_data: (void*) 0,
+ standard_control_fn: (usbs_control_return (*)(usbs_control_endpoint*, void*)) 0,
+ standard_control_data: (void*) 0,
+ class_control_fn: (usbs_control_return (*)(usbs_control_endpoint*, void*)) 0,
+ class_control_data: (void*) 0,
+ vendor_control_fn: (usbs_control_return (*)(usbs_control_endpoint*, void*)) 0,
+ vendor_control_data: (void*) 0,
+ reserved_control_fn: (usbs_control_return (*)(usbs_control_endpoint*, void*)) 0,
+ reserved_control_data: (void*) 0,
+ buffer: (unsigned char*) 0,
+ buffer_size: 0,
+ fill_buffer_fn: (void (*)(usbs_control_endpoint*)) 0,
+ fill_data: (void*) 0,
+ fill_index: 0,
+ complete_fn: (usbs_control_return (*)(usbs_control_endpoint*, int)) 0
+ },
+ rx_expecting_data: false,
+ rx_indicator_valid: false,
+ rx_indicator: { 0, (void*) 0 },
+ tx_indicator_valid: false,
+ tx_indicator: { 0 },
+ tx_needs_zero_transfer: 0
+};
+
+extern usbs_control_endpoint usbs_upd985xx_ep0 __attribute__((alias ("ep0")));
+
+// Endpoint 1, isochronous transmits. This endpoint is not yet
+// supported. Although the interface for bulk transmits should be
+// mostly re-usable, there are some additional error conditions if
+// either the host or the target fails to achieve the desired
+// throughput.
+
+// Endpoint 2, isochronous receives. Not yet supported for now, just
+// like endpoint 1.
+
+// Endpoints 3 and 5 can share some code.
+#if defined(CYGPKG_DEVS_USB_UPD985XX_EP3) || defined(CYGPKG_DEVS_USB_UPD985XX_EP5)
+// Endpoint 3, bulk transmits, and endpoint 5, either interrupt transmits
+// or emulation of bulk transmits. The hardware does most
+// of the work.
+typedef struct ep35_impl {
+ usbs_tx_endpoint common;
+ cyg_bool tx_indicator_valid;
+ TxMailbox tx_indicator;
+ int send_command;
+ volatile cyg_uint32* cr;
+ TxBufferDescriptor* tx_bufdesc;
+} ep35_impl;
+
+# ifdef CYGPKG_DEVS_USB_UPD985XX_EP3
+static void ep3_start_tx(usbs_tx_endpoint*);
+static void ep3_set_halted(usbs_tx_endpoint*, cyg_bool);
+
+static ep35_impl ep3 = {
+ common: {
+ start_tx_fn: &ep3_start_tx,
+ set_halted_fn: &ep3_set_halted,
+ complete_fn: (void (*)(void*, int)) 0,
+ complete_data: (void*) 0,
+ buffer: (const unsigned char*) 0,
+ buffer_size: 0,
+ halted: 0,
+ },
+ tx_indicator_valid: false,
+ tx_indicator: { 0 },
+ send_command: USBS_CMR_COMMAND_TX_EP3,
+ cr: EP3_CR,
+ tx_bufdesc: 0 // Needs run-time initialization
+};
+
+extern usbs_tx_endpoint usbs_upd985xx_ep3 __attribute__ ((alias ("ep3")));
+# endif
+
+# ifdef CYGPKG_DEVS_USB_UPD985XX_EP5
+static void ep5_start_tx(usbs_tx_endpoint*);
+static void ep5_set_halted(usbs_tx_endpoint*, cyg_bool);
+
+static ep35_impl ep5 = {
+ common: {
+ start_tx_fn: &ep5_start_tx,
+ set_halted_fn: &ep5_set_halted,
+ complete_fn: (void (*)(void*, int)) 0,
+ complete_data: (void*) 0,
+ buffer: (const unsigned char*) 0,
+ buffer_size: 0,
+ halted: 0,
+ },
+ tx_indicator_valid: false,
+ tx_indicator: { 0 },
+ send_command: USBS_CMR_COMMAND_TX_EP5,
+ cr: EP5_CR,
+ tx_bufdesc: 0 // Needs run-time initialization
+};
+
+extern usbs_tx_endpoint usbs_upd985xx_ep5 __attribute__ ((alias ("ep5")));
+# endif
+#endif
+
+
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP4
+// Endpoint 4, bulk receives. Again the hardware does the hard work.
+// Receive pool 2 is reserved for this endpoint.
+
+typedef struct ep4_impl {
+ usbs_rx_endpoint common;
+ cyg_uint32 head_size;
+ cyg_uint32 direct_size;
+ cyg_uint32 tail_size;
+ cyg_bool rx_indicator_valid;
+ RxMailbox rx_indicator;
+ cyg_int32 tail_index;
+} ep4_impl;
+
+static void ep4_start_rx(usbs_rx_endpoint*);
+static void ep4_set_halted(usbs_rx_endpoint*, cyg_bool);
+
+static ep4_impl ep4 = {
+ common: {
+ start_rx_fn: &ep4_start_rx,
+ set_halted_fn: &ep4_set_halted,
+ complete_fn: (void (*)(void*, int)) 0,
+ complete_data: (void*) 0,
+ buffer: (unsigned char*) 0,
+ buffer_size: 0,
+ halted: 0,
+ },
+ rx_indicator_valid: false,
+ rx_indicator: { 0, (void*) 0 },
+ tail_index: -1
+};
+
+extern usbs_rx_endpoint usbs_upd985xx_ep4 __attribute__((alias ("ep4")));
+#endif
+
+// Endpoint 6, interrupt receives. Not yet implemented. There may
+// be conflicts because the hardware is shared with endpoint 0.
+
+// ----------------------------------------------------------------------------
+// Mailbox support.
+//
+// The transmit and receive mailboxes are shared between the
+// appropriate endpoints. This causes some complications if e.g.
+// transmits on several endpoints complete at the same time. For
+// example the tx mailbox might contain send indicators for endpoints
+// 3 and 0, but the DSR code will process endpoint 0 before endpoint
+// 3.
+//
+// This device driver works on the basis that there can be only one
+// transmit and/or receive in progress for any given endpoint, so the
+// relevant information can be extracted from the mailbox and put into
+// the per-endpoint structures. The routines below can be used to
+// move data from the mailboxes. They will be called in DSR context
+// so there is no need to worry about locking.
+
+static void
+drain_tx_mailbox(void)
+{
+ TxMailbox* tmra = IBUS_SWAPPTR(TxMailbox, *USBS_TMRA);
+ TxMailbox* tmwa = IBUS_SWAPPTR(TxMailbox, *USBS_TMWA);
+ if (tmra != tmwa) {
+ do {
+ TxMailbox mbox = *tmra;
+ tmra++;
+ if (tmra == &(uncached->tx_mboxes[TXMBOX_COUNT])) {
+ tmra = &(uncached->tx_mboxes[0]);
+ }
+
+ switch(mbox.status & TXMBOX_STATUS_EPN_MASK) {
+ case TXMBOX_STATUS_EPN_EP0:
+ CYG_ASSERT(false == ep0.tx_indicator_valid, "Only one ep0 transmit should be in progress at a time");
+ ep0.tx_indicator = mbox;
+ ep0.tx_indicator_valid = true;
+ break;
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP3
+ case TXMBOX_STATUS_EPN_EP3:
+ CYG_ASSERT(false == ep3.tx_indicator_valid, "Only one ep3 transmit should be in progress at a time");
+ ep3.tx_indicator = mbox;
+ ep3.tx_indicator_valid = true;
+ break;
+#endif
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP5
+ case TXMBOX_STATUS_EPN_EP5:
+ CYG_ASSERT(false == ep5.tx_indicator_valid, "Only one ep5 transmit should be in progress at a time");
+ ep5.tx_indicator = mbox;
+ ep5.tx_indicator_valid = true;
+ break;
+#endif
+ default:
+ break;
+ }
+ } while (tmra != tmwa);
+ *USBS_TMRA = IBUS_SWAPPTR(TxMailbox, tmra); FLUSH_IBUS();
+ }
+}
+
+static void
+drain_rx_mailbox(void)
+{
+ RxMailbox* rmra = IBUS_SWAPPTR(RxMailbox, *USBS_RMRA);
+ RxMailbox* rmwa = IBUS_SWAPPTR(RxMailbox, *USBS_RMWA);
+
+ if (rmra != rmwa) {
+ do {
+ RxMailbox mbox = *rmra;
+ rmra++;
+ if (rmra == &(uncached->rx_mboxes[RXMBOX_COUNT])) {
+ rmra = &(uncached->rx_mboxes[0]);
+ }
+
+ switch(mbox.status & RXMBOX_STATUS_EPN_MASK) {
+ case RXMBOX_STATUS_EPN_EP0:
+ // Ignore zero-byte transfers. It is not clear why
+ // these happen, but they have been observed.
+ if (0 != (mbox.status & RXMBOX_STATUS_SIZE_MASK)) {
+ CYG_ASSERT(false == ep0.rx_indicator_valid, "Only one ep0 receive should be in progress at a time");
+ ep0.rx_indicator = mbox;
+ ep0.rx_indicator_valid = true;
+ }
+ break;
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP4
+ case RXMBOX_STATUS_EPN_EP4:
+ // If an error occurs then the hardware may report
+ // multiple rx completions, each with an IBUS error
+ // indicator. For now only the last rx indicator is
+ // taken into account, which means we could lose
+ // a successful receive that happens to be followed
+ // by an error.
+ // NOTE: any possibility of improving on this?
+#if 1
+ CYG_ASSERT(false == ep4.rx_indicator_valid, "Only one ep4 receive should be in progress at a time");
+#endif
+ ep4.rx_indicator = mbox;
+ ep4.rx_indicator_valid = true;
+ break;
+#endif
+ default:
+ break;
+ }
+ } while (rmra != rmwa);
+ *USBS_RMRA = IBUS_SWAPPTR(RxMailbox, rmra); FLUSH_IBUS();
+ }
+}
+
+// ----------------------------------------------------------------------------
+// Transmit locking.
+//
+// According to NEC errata U3 and U4 the hardware may exhibit
+// undesirable behaviour if there are concurrent transmissions. There
+// are various ways of resolving this, but the simplest is to perform
+// locking in software so that at most one transmit endpoint is in use
+// at any one time. This approach works fine if transmissions only
+// involve one tx endpoint plus the control endpoint because the
+// control endpoint generally only gets used during initialization and
+// the other endpoint only gets used after initialization. If multiple
+// transmit endpoints are used then locking in software becomes less
+// acceptable, especially if isochronous transfers are used because
+// timing is important for those.
+//
+// There is a theoretical problem if e.g. there is a very large bulk
+// transfer on a busy bus and it is necessary to respond to a control
+// message. The control reply would be delayed, possibly causing a
+// violation of the USB standard and a timeout on the host.
+
+#ifdef CYGIMP_DEVS_USB_UPD985XX_SERIALIZE_TRANSMITS
+static void ep0_start_tx(void);
+# if defined(CYGPKG_DEVS_USB_UPD985XX_EP3) || defined(CYGPKG_DEVS_USB_UPD985XX_EP5)
+static void ep35_start_tx(ep35_impl*);
+# endif
+
+static cyg_bool tx_in_progress = false;
+static cyg_bool ep0_tx_pending = false;
+# ifdef CYGPKG_DEVS_USB_UPD985XX_EP3
+static cyg_bool ep3_tx_pending = false;
+# endif
+# ifdef CYGPKG_DEVS_USB_UPD985XX_EP5
+static cyg_bool ep5_tx_pending = false;
+# endif
+
+// Invoked from ep?_start_tx(). Scheduling may or may not be locked.
+static cyg_bool
+tx_try_lock(cyg_bool* which)
+{
+ cyg_bool result;
+ cyg_drv_dsr_lock();
+ if (tx_in_progress) {
+ result = false;
+ *which = true;
+ } else {
+ result = true;
+ tx_in_progress = true;
+ }
+ cyg_drv_dsr_unlock();
+ return result;
+}
+
+// Invoked only from dsr context.
+static void
+tx_unlock(void)
+{
+ tx_in_progress = false;
+ if (ep0_tx_pending) {
+ ep0_tx_pending = false;
+ ep0_start_tx();
+ return;
+ }
+# ifdef CYGPKG_DEVS_USB_UPD985XX_EP3
+ if (ep3_tx_pending) {
+ ep3_tx_pending = false;
+ ep35_start_tx(&ep3);
+ return;
+ }
+# endif
+# ifdef CYGPKG_DEVS_USB_UPD985XX_EP5
+ if (ep5_tx_pending) {
+ ep5_tx_pending = false;
+ ep35_start_tx(&ep5);
+ return;
+ }
+# endif
+}
+
+# define TX_TRY_LOCK(_x_) tx_try_lock(_x_)
+# define TX_UNLOCK() tx_unlock()
+
+#else
+
+# define TX_TRY_LOCK(_x_) 1
+# define TX_UNLOCK() CYG_EMPTY_STATEMENT
+
+#endif
+
+
+// ----------------------------------------------------------------------------
+// Endpoint 0
+//
+// As usual, control messages are more complicated than the rest.
+//
+// 1) during initialization a receive is initiated into the common
+// eight-byte buffer, used for the standard header of the control
+// packet. Until that header has been received and analysed,
+// there is no way of knowing whether or not the host will be
+// sending any more data.
+//
+// 2) the control packet may indicate that the host will be sending
+// more data. A higher-level handler for the control message should
+// have provided a suitable buffer, so a receive can be started
+// into that buffer. A flag indicates whether we are currently
+// receiving a new control packet or additional data.
+//
+// 3) the host may decide to cancel that extra data and send a new
+// control message instead. There is a flag to indicate that
+// the transfer included a SETUP token.
+//
+// 4) transmits only happen when the control packet involves returning
+// data. Unfortunately there is a problem in that, with eCos, the
+// return data will generally not be in a single contiguous buffer.
+// Discontinuous data could be handled by having a separate buffer
+// descriptor for each bit of data, but it is not known in advance
+// how many buffer descriptors might be needed so allocating
+// those statically presents a problem as well. Instead a single
+// static buffer is used, and data from higher-level code is copied
+// there. This introduces a new problem: how big should that buffer
+// be? A configuration option is used for that.
+//
+// If endpoint 6 is in use as well then things get more complicated
+// because a single receive pool will be shared between endpoints 0
+// and 6, and when adding a buffer to a pool there is no way of
+// specifying the endpoint. Hence it will be necessary to receive
+// into a static buffer and then copy into either an endpoint 0 or
+// and endpoint 6 buffer.
+
+// Fill the transmit buffer by repeatedly invoking the refill function
+// and copying into the ep0 tx buffer. The relevant fields in the
+// ep0 structure are cleared immediately and the completion function
+// is called, even though the data has not actually gone out. That avoids
+// a possible race condition where the host sends a new control packet
+// immediately, before the transmit-complete has been processed
+// (unlikely in practice, not least because ep0_tx_dsr() will get called
+// before ep0_rx_dsr()).
+static int
+ep0_fill_txbuffer(void)
+{
+ int filled = 0;
+ while (filled < CYGNUM_DEVS_USB_UPD985XX_EP0_TXBUFSIZE) {
+ if (0 != ep0.common.buffer_size) {
+ if ((filled + ep0.common.buffer_size) < CYGNUM_DEVS_USB_UPD985XX_EP0_TXBUFSIZE) {
+ memcpy(&(uncached->ep0_tx_buffer[filled]), ep0.common.buffer, ep0.common.buffer_size);
+ filled += ep0.common.buffer_size;
+ ep0.common.buffer_size = 0;
+ } else {
+ break;
+ }
+ } else if ((void (*)(usbs_control_endpoint*))0 != ep0.common.fill_buffer_fn) {
+ (*ep0.common.fill_buffer_fn)(&ep0.common);
+ } else {
+ break;
+ }
+ }
+ CYG_ASSERT((0 == ep0.common.buffer_size) && ((void (*)(usbs_control_endpoint*))0 == ep0.common.fill_buffer_fn), \
+ "Endpoint 0 transmit buffer overflow");
+
+ if ((usbs_control_return (*)(usbs_control_endpoint*, int))0 != ep0.common.complete_fn) {
+ (*ep0.common.complete_fn)(&ep0.common, 0);
+ }
+ ep0.common.buffer = (unsigned char*) 0;
+ ep0.common.buffer_size = 0;
+ ep0.common.fill_buffer_fn = 0;
+ ep0.common.complete_fn = 0;
+
+ return filled;
+}
+
+// Start a new receive operation on endpoint 0. This needs to happen
+// from a number of places, including from initialization.
+//
+// IMHO the hardware is somewhat overengineered here. All that is
+// needed is to receive a single eight-byte control packet, or a
+// small amount of additional control data. That could be achieved
+// by using a single buffer descriptor in the uncached structure,
+// plus a suitably-sized static uncached ep0_rx_buffer.
+//
+// But no, buffer descriptors must be linked and new buffers must
+// be added to the end. When a control packet arrives, the
+// receive pool continues to point at the old buffer descriptor.
+// So we need two buffer descriptors plus two links, switching
+// between them as appropriate.
+//
+// It is not at all clear what would happen if another packet
+// started to happen while things were being updated. There is
+// also potential confusion between endpoint 0 and endpoint 6
+// receives.
+
+static void
+ep0_start_rx(cyg_uint32 size)
+{
+ // The buffer descriptor to be added. This will be either
+ // ep0_rxbufdescs[0] or ep0_rxbufdescs[2];
+ RxBufferDescriptor* desc = &(uncached->ep0_rx_bufdescs[0]);
+
+ CYG_ASSERTC(size > 0);
+
+ // Block interrupts for the duration. This does not prevent
+ // problems if the hardware sees another packet and starts
+ // doing things, but should prevent some software race
+ // conditions.
+ cyg_drv_isr_lock();
+
+ // We are about to start a new rx operation, so the
+ // current indicator may get invalidated.
+ ep0.rx_indicator_valid = false;
+
+ // Start by looking at the current pool0 status. There are
+ // three possibilities: during init or after reset, the pool
+ // will be empty; otherwise the pool should point at either
+ // rx_bufdescs[0] or rx_bufdescs[2], corresponding to the
+ // last received packet.
+ if (0 == (*USBS_RP0IR & USBS_RPxIR_RNOD_MASK)) {
+ // Nothing currently in the pool. Use ep0_rx_bufdescs[0],
+ // and no need to update a link.
+ } else if (desc == *USBS_RP0AR) {
+ // The pool already points at bufdescs[0], switch to bufdescs[2],
+ // and link from bufdescs[1].
+ desc = &(uncached->ep0_rx_bufdescs[2]);
+ uncached->ep0_rx_bufdescs[1].buffer = (void*) desc;
+ } else {
+ // The pool should point at bufdescs[2], stick with bufdescs[0]
+ CYG_ASSERT(&(uncached->ep0_rx_bufdescs[2]) == *USBS_RP0AR, "Endpoint 0 rx buffer confusion");
+ uncached->ep0_rx_bufdescs[3].buffer = (void*) desc;
+ }
+
+ // Now fill in the buffer directory being added
+ desc[0].control = RXBUFDESC_CTRL_LAST | RXBUFDESC_CTRL_BUFDESC_BUFDESC | size;
+ desc[0].buffer = (void*) uncached->ep0_rx_buffer;
+ desc[1].control = RXBUFDESC_CTRL_BUFDESC_LINK;
+ desc[1].buffer = 0;
+
+ while (0 != (*USBS_CMR & IBUS_SWAP32(USBS_CMR_BUSY))) {
+ // Do nothing: this situation should be short-lived.
+ }
+ *USBS_CA = IBUS_SWAPPTR(void, desc); FLUSH_IBUS();
+ *USBS_CMR = IBUS_SWAP32(USBS_CMR_COMMAND_ADD_POOL0 | 1); FLUSH_IBUS();
+ cyg_drv_isr_unlock();
+}
+
+// Ditto for transmits. The data is assumed to be in
+// uncached->ep0_tx_buffer already. A size of 0 indicates
+// a need to send a terminating packet explicitly.
+static void
+ep0_start_tx(void)
+{
+ if (!TX_TRY_LOCK(&ep0_tx_pending)) {
+ return;
+ }
+
+ uncached->ep0_tx_bufdesc.buffer = uncached->ep0_tx_buffer;
+ uncached->ep0_tx_bufdesc.control = TXBUFDESC_CTRL_LAST | TXBUFDESC_CTRL_BUFDESC_BUFDESC | ep0.tx_size;
+
+ cyg_drv_isr_lock();
+ while (0 != (*USBS_CMR & IBUS_SWAP32(USBS_CMR_BUSY))) {
+ // Do nothing: this situation should be short-lived.
+ }
+ *USBS_CA = IBUS_SWAPPTR(void, &(uncached->ep0_tx_bufdesc)); FLUSH_IBUS();
+ *USBS_CMR = IBUS_SWAP32(USBS_CMR_COMMAND_TX_EP0 | ep0.tx_size); FLUSH_IBUS();
+ cyg_drv_isr_unlock();
+}
+
+// An endpoint 0 transmission has completed. Usually the only action
+// that is needed is to drain the tx mailbox entry, otherwise it is
+// possible that we could end up with ep0 transmits using up all
+// available slots. The endpoint 0 hardware requires no further
+// attention, and as far as higher-level code is concerned the
+// transmission completed a long time ago when ep0_fill_txbuffer()
+// called the completion function.
+//
+// There is one special case. If the host asked for e.g. a string
+// descriptor and asked for 255 bytes, but the string was only
+// e.g. 32 bytes, then there is a problem. With a default value
+// for CYGNUM_DEVS_USB_UPD985XX_EP0_PKTSIZE, the data will be
+// transferred as four 8-byte packets, but it is necessary to
+// terminate the transfer with a 0-byte packet. Endpoint 0 always
+// operates in NZLP mode so the hardware will never generate
+// this last packet. Instead it is necessary to set up an
+// additional transfer of zero bytes. That could be done at the
+// same time as the main data transfer, but then it would be
+// necessary to poll the hardware and wait until it has finished
+// processing that initial transfer.
+static void
+ep0_tx_dsr(void)
+{
+ if (!ep0.tx_indicator_valid) {
+ drain_tx_mailbox();
+ if (!ep0.tx_indicator_valid) {
+ // A transmit interrupt when there does not appear to be
+ // any data?
+ CYG_FAIL("EP0 tx DSR invoked when there is no valid tx indicator");
+ return;
+ }
+ }
+ // There is not actually anything worth looking at in the status.
+ ep0.tx_indicator_valid = false;
+
+ if (ep0.tx_needs_zero_transfer) {
+ ep0.tx_needs_zero_transfer = false;
+ uncached->ep0_tx_bufdesc.buffer = uncached->ep0_tx_buffer;
+ uncached->ep0_tx_bufdesc.control = TXBUFDESC_CTRL_LAST | TXBUFDESC_CTRL_BUFDESC_BUFDESC | 0;
+
+ cyg_drv_isr_lock();
+ while (0 != (*USBS_CMR & IBUS_SWAP32(USBS_CMR_BUSY))) {
+ // Do nothing: this situation should be short-lived.
+ }
+ *USBS_CA = IBUS_SWAPPTR(void, &(uncached->ep0_tx_bufdesc)); FLUSH_IBUS();
+ *USBS_CMR = IBUS_SWAP32(USBS_CMR_COMMAND_TX_EP0 | 0); FLUSH_IBUS();
+ cyg_drv_isr_unlock();
+
+ } else {
+ TX_UNLOCK();
+ }
+}
+
+// An endpoint 0 receive has completed. This could be a new control
+// message. Or it could be the data for a previous control message. Or
+// it could be a new control message when expecting the data from
+// a previous one. The ep0.rx_expecting_data field indicates
+// whether or not a new control message is expected.
+//
+// At times an interrupt triggers and there is an rx indication for a
+// zero-byte transfer. Such a transfer may be followed immediately by
+// a real transfer. It is not understood why the zero-byte transfer
+// occurs. They are ignored by the drain_rx_mailbox() code, to make
+// sure that there is at most one valid rx indicator at a time.
+static void
+ep0_rx_dsr(void)
+{
+ // Start by checking the rx indicator to make sure that a packet
+ // really has been received.
+ if (!ep0.rx_indicator_valid) {
+ drain_rx_mailbox();
+ if (!ep0.rx_indicator_valid) {
+ // Do not assert, in case of a spurious interrupt for a
+ // zero-byte transfer.
+ return;
+ }
+ }
+
+ // We have a valid receive, with the data held in uncached->ep0_rx_buffer.
+ // Are we expecting the remaining data of a control transfer?
+ if (ep0.rx_expecting_data) {
+ // Was this data interrupted by a new setup packet?
+ if (0 != (ep0.rx_indicator.status & RXMBOX_STATUS_SETUP_SETUP)) {
+ // NOTE: it is not clear from the documentation exactly what
+ // happens here, e.g. is it guaranteed that the new control
+ // packet appears at the start of the buffer rather than
+ // after any data previously received? Given typical
+ // USB host-side implementations this scenario is considered
+ // sufficiently unlikely that no further investigation has
+ // been carried out.
+
+ // Inform higher-level code that the receive has been aborted.
+ if ((usbs_control_return (*)(usbs_control_endpoint*, int)) 0 != ep0.common.complete_fn) {
+ (*ep0.common.complete_fn)(&ep0.common, -EIO);
+ }
+ ep0.rx_expecting_data = false;
+ ep0.common.buffer = (unsigned char*) 0;
+ ep0.common.buffer_size = 0;
+ ep0.common.fill_buffer_fn = 0;
+ ep0.common.complete_fn = (usbs_control_return (*)(usbs_control_endpoint*, int)) 0;
+ // Fall through the main control message handling code below.
+ } else {
+ // Data was expected and received. Transfer the data to the
+ // user's buffer, and perform completion.
+ usbs_control_return result;
+ cyg_uint32 size = ep0.rx_indicator.status & RXMBOX_STATUS_SIZE_MASK;
+
+ CYG_ASSERT( (usbs_control_return (*)(usbs_control_endpoint*, int))0 != ep0.common.complete_fn, \
+ "A completion function should be provided for OUT control messages");
+ CYG_ASSERT(size == ep0.common.buffer_size, "Inconsistency between buffer and transfer sizes");
+ memcpy(ep0.common.buffer, uncached->ep0_rx_buffer, size);
+ result = (*ep0.common.complete_fn)(&ep0.common, 0);
+ ep0.common.buffer = (unsigned char*) 0;
+ ep0.common.buffer_size = 0;
+ ep0.common.complete_fn = (usbs_control_return (*)(usbs_control_endpoint*, int)) 0;
+ ep0.rx_expecting_data = false;
+
+ // Start another receive for the next control message.
+ // Note that there has been a window where there was no receive
+ // in progress for endpoint 0, even though according to the
+ // USB spec a device must always be able to accept new
+ // control messages.
+ ep0_start_rx(8);
+ return;
+ }
+ }
+
+ // When we get here we should have an eight-byte control message
+ // in uncached->ep0_rx_buffer. This should get moved into
+ // the ep0.common.control_buffer so that higher-level code sees
+ // it in the appropriate location.
+ CYG_ASSERT((ep0.rx_indicator.address == &(uncached->ep0_rx_bufdescs[0])) || \
+ (ep0.rx_indicator.address == &(uncached->ep0_rx_bufdescs[2])), \
+ "Received ep0 data should involve the ep0 rx buffer descriptor");
+
+ CYG_ASSERT(8 == (ep0.rx_indicator.status & RXMBOX_STATUS_SIZE_MASK), "Control messages should be 8 bytes");
+ memcpy(ep0.common.control_buffer, uncached->ep0_rx_buffer, 8);
+
+ // If we have received a control packet then any reset signals really
+ // will have come from the host and must be processed normally.
+ // Make sure that reset interrupts are no longer masked off.
+ if (0 == (*USBS_IMR2 & IBUS_SWAP32(USBS_GSR2_URST))) {
+ *USBS_IMR2 |= IBUS_SWAP32(USBS_GSR2_URST); FLUSH_IBUS();
+ usbs_upd985xx_gsr2_mask |= USBS_GSR2_URST;
+ }
+
+ {
+ usbs_control_return result = USBS_CONTROL_RETURN_UNKNOWN;
+ usb_devreq* req = (usb_devreq*) ep0.common.control_buffer;
+ int length, direction, protocol, recipient;
+
+ // Now we need to do some decoding of the data. A non-zero
+ // length field indicates that there will be a subsequent
+ // IN or OUT phase. The direction is controlled by the
+ // top bit of the first byte. The protocol is determined
+ // by other bits of the top byte.
+ length = (req->length_hi << 8) | req->length_lo;
+ direction = req->type & USB_DEVREQ_DIRECTION_MASK;
+ protocol = req->type & USB_DEVREQ_TYPE_MASK;
+ recipient = req->type & USB_DEVREQ_RECIPIENT_MASK;
+
+ DBG(("ep0, new control request: type %x, code %x\n", req->type, req->request));
+ DBG((" %s, length %d, value hi %x lo %x, index hi %x lo %x\n",
+ (USB_DEVREQ_DIRECTION_OUT == direction) ? "out" : "in",
+ length, req->value_hi, req->value_lo, req->index_hi, req->index_lo));
+
+ if (USB_DEVREQ_TYPE_STANDARD == protocol) {
+
+ // First see if the request can be handled entirely in
+ // this module.
+ if (USB_DEVREQ_SET_ADDRESS == req->request) {
+ // The USB device address should be in value_lo.
+ // No more data is expected.
+ int old_state = ep0.common.state;
+ int address = req->value_lo;
+ if ((0 != length) || (address > 127)) {
+ result = USBS_CONTROL_RETURN_STALL;
+ } else {
+ *USBS_GMR = (*USBS_GMR & ~(USBS_GMR_FA_MASK | USBS_GMR_VT)) | (address << USBS_GMR_FA_SHIFT); FLUSH_IBUS();
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+ // Switch to addressed state, informing higher-level
+ // code of this.
+ if (USBS_STATE_ADDRESSED != (old_state & USBS_STATE_MASK)) {
+ ep0.common.state = USBS_STATE_ADDRESSED;
+ if ((void (*)(usbs_control_endpoint*, void*, usbs_state_change, int))0 != ep0.common.state_change_fn) {
+ (*ep0.common.state_change_fn)(&ep0.common, ep0.common.state_change_data,
+ USBS_STATE_CHANGE_ADDRESSED, old_state);
+ }
+ }
+ // End of SET_ADDRESS handling
+ } else if (USB_DEVREQ_GET_STATUS == req->request) {
+ // GET_STATUS on the device as a whole is used to
+ // check the remote-wakeup and self-powered bits.
+ // GET_STATUS on an endpoint is used to determine
+ // the halted condition.
+ // GET_STATUS on anything else has to be left to
+ // other code.
+ if (USB_DEVREQ_RECIPIENT_DEVICE == recipient) {
+ // The host should expect two bytes back.
+ if ((2 == length) && (USB_DEVREQ_DIRECTION_IN == direction)) {
+ ep0.common.control_buffer[0] = 0; // Not self-powered, no remote wakeup
+ ep0.common.control_buffer[1] = 0;
+ ep0.common.buffer = ep0.common.control_buffer;
+ ep0.common.buffer_size = 2;
+ result = USBS_CONTROL_RETURN_HANDLED;
+ } else {
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+
+ } else if (USB_DEVREQ_RECIPIENT_ENDPOINT == recipient) {
+ if ((2 == length) && (USB_DEVREQ_DIRECTION_IN == direction)) {
+ int endpoint = req->index_lo;
+ if (0 == endpoint) {
+ // get-status on endpoint 0 is either undefined or always valid.
+ // endpoint 0 is always up.
+ ep0.common.control_buffer[0] = 0;
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP3
+ else if (((USB_DEVREQ_INDEX_DIRECTION_IN | 3) == endpoint) &&
+ (USBS_STATE_CONFIGURED == (ep0.common.state & USBS_STATE_MASK))) {
+ ep0.common.control_buffer[0] = ep3.common.halted;
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+#endif
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP4
+ else if (((USB_DEVREQ_INDEX_DIRECTION_OUT | 4) == endpoint) &&
+ (USBS_STATE_CONFIGURED == (ep0.common.state & USBS_STATE_MASK))) {
+ ep0.common.control_buffer[0] = ep4.common.halted;
+ result = USBS_CONTROL_RETURN_HANDLED;
+
+ }
+#endif
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP5
+ else if (((USB_DEVREQ_INDEX_DIRECTION_IN | 5) == endpoint) &&
+ (USBS_STATE_CONFIGURED == (ep0.common.state & USBS_STATE_MASK))) {
+ ep0.common.control_buffer[0] = ep5.common.halted;
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+#endif
+ else {
+ // An invalid endpoint has been specified or the
+ // endpoint can only be examined in configured state.
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+ if (USBS_CONTROL_RETURN_HANDLED == result) {
+ ep0.common.control_buffer[1] = 0;
+ ep0.common.buffer = ep0.common.control_buffer;
+ ep0.common.buffer_size = 2;
+ }
+ } else {
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+ } // Endpoint or device get-status
+
+ } else if (USB_DEVREQ_CLEAR_FEATURE == req->request) {
+
+ // CLEAR_FEATURE operates in much the same way as
+ // GET_STATUS
+ if (USB_DEVREQ_RECIPIENT_DEVICE == recipient) {
+
+ // No data should be transferred, and only remote-wakeup can be cleared.
+ if ((0 != length) || (USB_DEVREQ_FEATURE_DEVICE_REMOTE_WAKEUP != req->value_lo)) {
+ result = USBS_CONTROL_RETURN_STALL;
+ } else {
+ // Clearing remote-wakeup is a no-op.
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+
+ } else if (USB_DEVREQ_RECIPIENT_ENDPOINT == recipient) {
+ // The only feature that can be cleared is endpoint-halt, no data should be transferred.
+ if ((0 != length) || (USB_DEVREQ_FEATURE_ENDPOINT_HALT != req->value_lo)) {
+ result = USBS_CONTROL_RETURN_STALL;
+ } else {
+ int endpoint = req->index_lo;
+ if (0 == endpoint) {
+ // Clearing halt on endpoint 0 is always a no-op since that endpoint cannot be halted
+ }
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP3
+ else if (((USB_DEVREQ_INDEX_DIRECTION_IN | 3) == endpoint) &&
+ (USBS_STATE_CONFIGURED == (ep0.common.state & USBS_STATE_MASK))) {
+ ep3_set_halted(&ep3.common, false);
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+#endif
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP4
+ else if (((USB_DEVREQ_INDEX_DIRECTION_OUT | 4) == endpoint) &&
+ (USBS_STATE_CONFIGURED == (ep0.common.state & USBS_STATE_MASK))) {
+ ep4_set_halted(&ep4.common, false);
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+#endif
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP5
+ else if (((USB_DEVREQ_INDEX_DIRECTION_IN | 5) == endpoint) &&
+ (USBS_STATE_CONFIGURED == (ep0.common.state & USBS_STATE_MASK))) {
+ ep5_set_halted(&ep5.common, false);
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+#endif
+ else {
+ // Invalid endpoint or not in configured state.
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+ }
+ } // Endpoing or device clear-feature
+
+ } else if (USB_DEVREQ_SET_FEATURE == req->request) {
+
+ // SET_FEATURE also operates in much the same way as
+ // GET_STATUS
+ if (USB_DEVREQ_RECIPIENT_DEVICE == recipient) {
+ // The only valid feature that can be set is remote-wakeup,
+ // which is not supported by this driver.
+ result = USBS_CONTROL_RETURN_STALL;
+
+ } else if (USB_DEVREQ_RECIPIENT_ENDPOINT == recipient) {
+
+ // Only the halt condition can be set, and no data should be transferred.
+ // Halting endpoint 0 should probably be disallowed although the
+ // standard does not explicitly say so.
+ if ((0 != length) ||
+ (USB_DEVREQ_FEATURE_ENDPOINT_HALT != req->value_lo) ||
+ (USBS_STATE_CONFIGURED != (ep0.common.state & USBS_STATE_MASK))) {
+
+ result = USBS_CONTROL_RETURN_STALL;
+
+ } else {
+ int endpoint = req->index_lo;
+ if (0) {
+ }
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP3
+ else if ((USB_DEVREQ_INDEX_DIRECTION_IN | 3) == endpoint) {
+ ep3_set_halted(&ep3.common, true);
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+#endif
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP4
+ else if ((USB_DEVREQ_INDEX_DIRECTION_OUT | 4) == endpoint) {
+ ep4_set_halted(&ep4.common, true);
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+#endif
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP5
+ else if ((USB_DEVREQ_INDEX_DIRECTION_IN | 5) == endpoint) {
+ ep5_set_halted(&ep5.common, true);
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+#endif
+ else {
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+ }
+ } // Endpoint or device set-feature
+ }
+
+ // If the result has not been handled yet, pass it to
+ // the installed callback function (if any).
+ if (USBS_CONTROL_RETURN_UNKNOWN == result) {
+ if ((usbs_control_return (*)(usbs_control_endpoint*, void*))0 != ep0.common.standard_control_fn) {
+ result = (*ep0.common.standard_control_fn)(&ep0.common, ep0.common.standard_control_data);
+ }
+ }
+
+ // If the result has still not been handled, leave it to
+ // the default implementation in the USB slave common place.
+ if (USBS_CONTROL_RETURN_UNKNOWN == result) {
+ result = usbs_handle_standard_control(&ep0.common);
+ }
+ } else {
+ // The other three types of control message can be
+ // handled by similar code.
+ usbs_control_return (*callback_fn)(usbs_control_endpoint*, void*);
+ void* callback_arg;
+
+ if (USB_DEVREQ_TYPE_CLASS == protocol) {
+ callback_fn = ep0.common.class_control_fn;
+ callback_arg = ep0.common.class_control_data;
+ } else if (USB_DEVREQ_TYPE_VENDOR == protocol) {
+ callback_fn = ep0.common.vendor_control_fn;
+ callback_arg = ep0.common.vendor_control_data;
+ } else {
+ callback_fn = ep0.common.reserved_control_fn;
+ callback_arg = ep0.common.reserved_control_data;
+ }
+
+ if ((usbs_control_return (*)(usbs_control_endpoint*, void*)) 0 == callback_fn) {
+ result = USBS_CONTROL_RETURN_STALL;
+ } else {
+ result = (*callback_fn)(&ep0.common, callback_arg);
+ }
+ }
+
+ if (USBS_CONTROL_RETURN_HANDLED != result) {
+ // This control request cannot be handled. Generate a stall.
+ // These stalls will be cleared automaticaly by the next
+ // setup packet.
+ *EP0_CR |= (EP0_CR_ISS | EP0_CR_OSS); FLUSH_IBUS();
+ // Start a receive for the next control message
+ ep0_start_rx(8);
+ } else {
+ // The control request has been handled. Is there any more
+ // data to be transferred?
+ if (0 == length) {
+ // Definitely start a receive for another control message
+ ep0_start_rx(8);
+
+ // This operation is complete so we need to ack. It
+ // appears that the way to achieve this is to send a
+ // zero-byte packet.
+ ep0.tx_size = 0;
+ ep0_start_tx();
+
+ } else {
+ // Time to check the direction.
+
+ if (USB_DEVREQ_DIRECTION_OUT == direction) {
+ // The host expects to send more data. Higher-level code
+ // should have provided an appropriate buffer.
+ CYG_ASSERT( (unsigned char*) 0 != ep0.common.buffer, "A receive buffer should have been provided");
+ CYG_ASSERT( (usbs_control_return (*)(usbs_control_endpoint*, int))0 != ep0.common.complete_fn, \
+ "A completion function should be provided for OUT control messages");
+ CYG_ASSERT(length <= CYGNUM_DEVS_USB_UPD985XX_EP0_RXBUFSIZE, "Insufficient buffer space configured");
+
+ ep0.rx_expecting_data = true;
+ ep0_start_rx(length);
+ } else {
+ // The host expects to be able to read some data.
+ // This needs to go into a single contiguous
+ // buffer, and then the transfer can be started.
+ // Care has to be taken with various boundary conditions.
+ int actual_length = ep0_fill_txbuffer();
+ if (actual_length > length) {
+ actual_length = length;
+ }
+ if ((length != actual_length) && (0 == (actual_length % CYGNUM_DEVS_USB_UPD985XX_EP0_PKTSIZE))) {
+ ep0.tx_needs_zero_transfer = true;
+ } else {
+ ep0.tx_needs_zero_transfer = false;
+ }
+ ep0.tx_size = actual_length;
+ ep0_start_tx();
+
+ // And make sure that there is another receive in progress
+ // for the next setup packet.
+ ep0_start_rx(8);
+ }
+ }
+ } // Control message handled
+ }
+}
+
+// Endpoint 0 initialization also takes care of initializing generic bits
+// of the USB controller, for example letting through resume and suspend
+// interrupts and setting up the mailboxes. Also, it is necessary to
+// start a receive operation so that the first control message can
+// be processed. This code gets called during device driver initialization
+// and after a reset from the host.
+static void
+ep0_init(void)
+{
+ // Reset the various fields in the ep0 structure.
+ ep0.common.buffer = (unsigned char*) 0;
+ ep0.common.buffer_size = 0;
+ ep0.common.fill_buffer_fn = (void (*)(usbs_control_endpoint*)) 0;
+ ep0.common.fill_data = (void*) 0;
+ ep0.common.fill_index = 0;
+ ep0.common.complete_fn = (usbs_control_return (*)(usbs_control_endpoint*, int)) 0;
+ ep0.rx_expecting_data = false;
+ ep0.tx_indicator_valid = false;
+ ep0.rx_indicator_valid = false;
+ ep0.tx_needs_zero_transfer = false;
+
+#ifdef CYGIMP_DEVS_USB_UPD985XX_SERIALIZE_TRANSMITS
+ tx_in_progress = false;
+ ep0_tx_pending = false;
+# ifdef CYGPKG_DEVS_USB_UPD985XX_EP3
+ ep3_tx_pending = false;
+# endif
+# ifdef CYGPKG_DEVS_USB_UPD985XX_EP5
+ ep5_tx_pending = false;
+# endif
+#endif
+
+ // The general mode register. We do not have an address yet. The
+ // SOFINTVL field needs to be set to its default value. The other
+ // bits should be zero for now.
+ *USBS_GMR = USBS_GMR_SOFINTVL_DEFAULT_VALUE; FLUSH_IBUS();
+
+ // The version register and the status registers are read-only.
+
+ // Interrupt masks. Endpoint 0 transmits and receives both have
+ // to be detected, as do the control operations. There should
+ // be no need to worry about full mailboxes or empty receive
+ // pools. DMA errors might be of interest, but it is not clear
+ // what to do about them since there does not appear to be
+ // a way of figuring out which transfer is affected. Frame number
+ // and addressing problems are ignored, there is nothing obvious
+ // that can be done about these. The other endpoints have their
+ // own initialization routines.
+ //
+ // Care has to be taken with reset interrupts. With some hardware
+ // the usb lines may be left floating during initialization, so
+ // the chip believes it sees continuous reset interrupts. There
+ // also appear to be problems if the host does generate a real
+ // reset signal, with interrupt storms lasting 10 or more
+ // milliseconds and preventing any other activity from taking
+ // place. What is done here is that reset interrupts are enabled
+ // if in the initial POWERED state. When a reset is detected,
+ // either a spurious one or a real reset from the host,
+ // handle_reset() will move the target to DEFAULT state, call
+ // ep0_init() again, and reset interrupts will be masked out.
+ // When a real control request is received from the host we
+ // know we have a good connection and the reset interrupt will
+ // be unmasked in ep0_rx_dsr(), so further resets from the
+ // host will be processed correctly. If the target is disconnected
+ // then we may again get a spurious reset interrupt, so we end
+ // up back in DEFAULT state and the reset interrupt would be
+ // masked again.
+ *USBS_IMR1 = IBUS_SWAP32(USBS_GSR1_GSR2 | USBS_GSR1_EP0TF | USBS_GSR1_EP0RF); FLUSH_IBUS();
+ usbs_upd985xx_gsr1_mask = (USBS_GSR1_EP0TF | USBS_GSR1_EP0RF);
+ if (USBS_STATE_DEFAULT == (ep0.common.state & USBS_STATE_MASK)) {
+ *USBS_IMR2 = IBUS_SWAP32(USBS_GSR2_URSM | USBS_GSR2_USPD); FLUSH_IBUS();
+ usbs_upd985xx_gsr2_mask = (USBS_GSR2_URSM | USBS_GSR2_USPD);
+ } else {
+ *USBS_IMR2 = IBUS_SWAP32(USBS_GSR2_URSM | USBS_GSR2_URST | USBS_GSR2_USPD); FLUSH_IBUS();
+ usbs_upd985xx_gsr2_mask = (USBS_GSR2_URSM | USBS_GSR2_URST | USBS_GSR2_USPD);
+ }
+
+ // Writing to the command register is a bad idea, because even
+ // writing 0 constitutes a command. Similarly there is no point
+ // in writing to the command address register.
+
+ // The endpoint status register is read-only.
+
+ // Set the rx pool information registers to disable alerts.
+ *USBS_RP0IR = IBUS_SWAP32(USBS_RPxIR_AL_NONE); FLUSH_IBUS();
+ *USBS_RP1IR = IBUS_SWAP32(USBS_RPxIR_AL_NONE); FLUSH_IBUS();
+ *USBS_RP2IR = IBUS_SWAP32(USBS_RPxIR_AL_NONE); FLUSH_IBUS();
+
+ // The pool address registers are read-only. The documentation
+ // that describes initialization says that these registers need to
+ // be filled in, but that seems wrong: providing receive buffers
+ // involves the command register. Presumably on early revisions it
+ // was necessary to fill in the address register.
+
+ // Sort out the mailboxes.
+ *USBS_TMSA = IBUS_SWAPPTR(TxMailbox, &(uncached->tx_mboxes[0])); FLUSH_IBUS();
+ *USBS_TMBA = IBUS_SWAPPTR(TxMailbox, &(uncached->tx_mboxes[TXMBOX_COUNT])); FLUSH_IBUS();
+ *USBS_RMSA = IBUS_SWAPPTR(RxMailbox, &(uncached->rx_mboxes[0])); FLUSH_IBUS();
+ *USBS_RMBA = IBUS_SWAPPTR(RxMailbox, &(uncached->rx_mboxes[RXMBOX_COUNT])); FLUSH_IBUS();
+ // It is not clear whether these registers actually need to be initialized.
+ // The documentation suggests that they do, unlike TMWA and RMWA which
+ // are taken care of by the hardware.
+#if 0
+ *USBS_TMRA = IBUS_SWAPPTR(TxMailbox, &(uncached->tx_mboxes[0])); FLUSH_IBUS();
+ *USBS_RMRA = IBUS_SWAPPTR(RxMailbox, &(uncached->rx_mboxes[0])); FLUSH_IBUS();
+#endif
+
+ // Start a receive operation for a control message.
+ ep0_start_rx(8);
+
+ // The endpoint 0 control register. The control packet size is
+ // configurable, with a default value of 8. Setting the
+ // enabled bit here affects the state as seen by the host.
+ *EP0_CR = IBUS_SWAP32(EP0_CR_EP0EN | CYGNUM_DEVS_USB_UPD985XX_EP0_PKTSIZE); FLUSH_IBUS();
+
+ // The other endpoint registers will be initialized by the appropriate
+ // _init() functions. Note that those other _init() functions should
+ // probably be called before the ep0-enabled bit is set.
+}
+
+// ----------------------------------------------------------------------------
+// Endpoint 1 - isochronous transmits.
+#if 0
+// A real implementation
+#else
+static inline void
+ep1_init(void)
+{
+ *EP1_CR = IBUS_SWAP32(0); // Clear EP1EN bit, thus disabling the endpoint
+ FLUSH_IBUS();
+}
+#endif
+
+// ----------------------------------------------------------------------------
+// Endpoint 2 - isochronous receives
+#if 0
+// A real implementation
+#else
+static inline void
+ep2_init(void)
+{
+ *EP2_CR = IBUS_SWAP32(0); // Clear EP2EN bit, thus disabling the endpoint
+ FLUSH_IBUS();
+}
+#endif
+
+// ----------------------------------------------------------------------------
+// Generic transmit support. This is intended for use with both endpoints
+// 3 and 5. For now the endpoint 0 code is too different.
+
+#if defined(CYGPKG_DEVS_USB_UPD985XX_EP3) || defined(CYGPKG_DEVS_USB_UPD985XX_EP5)
+
+// A utility routine for completing a transfer. This takes care of the
+// callback as well as resetting the buffer.
+static void
+ep35_tx_complete(ep35_impl* ep, int result)
+{
+ void (*complete_fn)(void*, int) = ep->common.complete_fn;
+ void* complete_data = ep->common.complete_data;
+
+ ep->common.buffer = (unsigned char*) 0;
+ ep->common.buffer_size = 0;
+ ep->common.complete_fn = (void (*)(void*, int)) 0;
+ ep->common.complete_data = (void*) 0;
+
+ if ((void (*)(void*, int))0 != complete_fn) {
+ (*complete_fn)(complete_data, result);
+ }
+}
+
+static void
+ep35_start_tx(ep35_impl* ep)
+{
+ // Is this endpoint currently stalled? If so then a size of 0 can
+ // be used to block until the stall condition is clear, anything
+ // else should result in an immediate callback.
+ if (ep->common.halted) {
+ if (0 != ep->common.buffer_size) {
+ ep35_tx_complete(ep, -EAGAIN);
+ }
+ } else if (0 == ep->common.buffer_size) {
+ // A check to see if the endpoint is halted. It isn't.
+ ep35_tx_complete(ep, 0);
+ } else {
+ cyg_uint32 send_command;
+#if 0
+ diag_printf("Tx: %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ ep->common.buffer[0], ep->common.buffer[1], ep->common.buffer[2], ep->common.buffer[3],
+ ep->common.buffer[4], ep->common.buffer[5], ep->common.buffer[6], ep->common.buffer[7]);
+ diag_printf(" %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ ep->common.buffer[8], ep->common.buffer[9], ep->common.buffer[10], ep->common.buffer[11],
+ ep->common.buffer[12], ep->common.buffer[13], ep->common.buffer[14], ep->common.buffer[15]);
+ diag_printf(" %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ ep->common.buffer[16], ep->common.buffer[17], ep->common.buffer[18], ep->common.buffer[19],
+ ep->common.buffer[20], ep->common.buffer[21], ep->common.buffer[22], ep->common.buffer[23]);
+ diag_printf(" %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ ep->common.buffer[24], ep->common.buffer[25], ep->common.buffer[26], ep->common.buffer[27],
+ ep->common.buffer[28], ep->common.buffer[29], ep->common.buffer[30], ep->common.buffer[31]);
+ diag_printf(" %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ ep->common.buffer[32], ep->common.buffer[33], ep->common.buffer[34], ep->common.buffer[35],
+ ep->common.buffer[36], ep->common.buffer[37], ep->common.buffer[38], ep->common.buffer[39]);
+ diag_printf(" %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ ep->common.buffer[40], ep->common.buffer[41], ep->common.buffer[42], ep->common.buffer[43],
+ ep->common.buffer[44], ep->common.buffer[45], ep->common.buffer[46], ep->common.buffer[47]);
+#endif
+
+ // Update the static buffer descriptor.
+ ep->tx_bufdesc->buffer = MIPS_TO_UNCACHED(ep->common.buffer);
+ ep->tx_bufdesc->control = ep->common.buffer_size | TXBUFDESC_CTRL_LAST | TXBUFDESC_CTRL_BUFDESC_BUFDESC;
+
+ // Make sure that the entire transmit buffer is flushed to
+ // memory.
+ HAL_DCACHE_STORE(ep->common.buffer, ep->common.buffer_size);
+
+ // Issue the send command. It is known that no transmits are
+ // in progress for this endpoint so the upper bound of 2
+ // pending transmits can be ignored. The send command involves
+ // writing to two registers in succession, so interrupts had
+ // better be disabled while doing this.
+ send_command = ep->send_command | ep->common.buffer_size;
+ cyg_drv_isr_lock();
+ while (0 != (*USBS_CMR & IBUS_SWAP32(USBS_CMR_BUSY))) {
+ // Do nothing: this situation should be short-lived.
+ }
+ *USBS_CA = IBUS_SWAPPTR(void, (void*)ep->tx_bufdesc); FLUSH_IBUS();
+ *USBS_CMR = IBUS_SWAP32(send_command); FLUSH_IBUS();
+ cyg_drv_isr_unlock();
+ }
+}
+
+// The stalled state is controlled by a single bit in the appropriate
+// control register. However there is a problem in that it is not
+// possible to abort a transmission that is already going out.
+// Furthermore there is no way of detecting whether or not any
+// packets have already gone out for this transfer: setting the halt
+// bit before any data has gone out is reasonably ok, doing so
+// in the middle of a transfer could be confusing.
+//
+// The approach taken here is to check whether or not there is a
+// current tx buffer. If not then the stall bit can be set immediately.
+// Otherwise the halted flag is set here, and it is left to the dsr
+// to set the stall bit when the transfer completes. This may not
+// be totally standards-compliant, but is probably the best solution
+// for now.
+static void
+ep35_set_halted(ep35_impl* ep, cyg_bool new_value)
+{
+ if (ep->common.halted == new_value) {
+ return;
+ }
+
+ // Avoid race conditions with the DSR updating the buffer fields.
+ cyg_drv_dsr_lock();
+
+ if (new_value ){
+ // Set the halted flag to prevent further transmits, and if
+ // there is no transmission currently in progress then set
+ // the stalled bit immediately.
+ ep->common.halted = true;
+ if ((void*)0 == ep->common.buffer) {
+ *(ep->cr) |= IBUS_SWAP32(EPtx_CR_SSx); FLUSH_IBUS();
+ }
+ } else {
+ // Update the hardware (that may be a no-op if the stalled bit
+ // never got set by the DSR), and clear the halted flag.
+ *(ep->cr) &= IBUS_SWAP32(~EPtx_CR_SSx); FLUSH_IBUS();
+ ep->common.halted = false;
+
+ // If there is a pending request to wait until the endpoint stall
+ // condition is clear, inform higher-level code. This test may
+ // give false positives but those would be harmless.
+ if (0 == ep->common.buffer_size) {
+ ep35_tx_complete(ep, 0);
+ }
+ }
+
+ cyg_drv_dsr_unlock();
+}
+
+// An interrupt has occured related to endpoint 3 or 5 - i.e. the EP3TF
+// or EP5TF interrupts, nothing else seems especially relevant. It is
+// necessary to extract the appropriate send indicator from the tx
+// mailbox to determine whether or not the transmission was successful
+// and report status to higher-level code.
+static void
+ep35_dsr(ep35_impl* ep)
+{
+ TxMailbox mbox;
+
+ // Extract the transmit indicator if that has not happened
+ // already courtesy of another DSR.
+ if (!ep->tx_indicator_valid) {
+ drain_tx_mailbox();
+ if (!ep->tx_indicator_valid) {
+ // A transmit interrupt when there does not appear to be
+ // any data?
+ CYG_FAIL("ep35_dsr invoked when there is no valid tx indicator");
+ return;
+ }
+ }
+ mbox = ep->tx_indicator;
+ ep->tx_indicator_valid = false;
+
+#ifdef CYGIMP_DEVS_USB_UPD985XX_EP5_BULK
+ // If emulating bulk transfers over the interrupt endpoint, and
+ // the transfer is an exact multiple of 64 bytes, then an extra
+ // zero-byte terminating packet needs to be sent. Care has to be
+ // taken to do this only once.
+ if ( (ep == &ep5) && (0 == (ep5.common.buffer_size % 64)) ) {
+ static cyg_bool sending_zero = false;
+ if (!sending_zero) {
+ sending_zero = true;
+ uncached->ep5_tx_bufdesc.buffer = uncached->ep0_tx_buffer;
+ uncached->ep5_tx_bufdesc.control = 0 | TXBUFDESC_CTRL_LAST | TXBUFDESC_CTRL_BUFDESC_BUFDESC;
+ cyg_drv_isr_lock();
+ while (0 != (*USBS_CMR & IBUS_SWAP32(USBS_CMR_BUSY))) {
+ // Do nothing: this situation should be short-lived.
+ }
+ *USBS_CA = IBUS_SWAPPTR(void, (void*) &(uncached->ep5_tx_bufdesc)); FLUSH_IBUS();
+ *USBS_CMR = IBUS_SWAP32(USBS_CMR_COMMAND_TX_EP5 | 0); FLUSH_IBUS();
+ cyg_drv_isr_unlock();
+
+ // Do not complete the transfer. Instead completion has to
+ // wait for another interrupt.
+ return;
+ } else {
+ // This interrupt was for the zero-byte packet, so drop through
+ sending_zero = false;
+ }
+ }
+#endif
+
+ // If the endpoint should be halted but there was a transmit
+ // in progress, update the hardware now.
+ if (ep->common.halted) {
+ *(ep->cr) |= IBUS_SWAP32(EPtx_CR_SSx); FLUSH_IBUS();
+ }
+
+ // Allow any blocked transmits to proceed.
+ TX_UNLOCK();
+
+ if (0 != (mbox.status & TXMBOX_STATUS_IBUS_ERROR)) {
+ // This appears to be the only type of error that can be
+ // detected. Possibly the transmit should be retried here
+ // rather than reported.
+ ep35_tx_complete(ep, -EPIPE);
+ } else {
+ ep35_tx_complete(ep, ep->common.buffer_size);
+ }
+}
+#endif // Endpoints 3 or 5
+
+// ----------------------------------------------------------------------------
+// Endpoint 3 - bulk transmits.
+
+# ifdef CYGPKG_DEVS_USB_UPD985XX_EP3
+static void
+ep3_start_tx(usbs_tx_endpoint* endpoint)
+{
+ CYG_ASSERT( endpoint == &ep3.common, "USB data transfer involves the wrong endpoint");
+ CYG_ASSERT( ep3.common.buffer_size < (64 * 1024), "Specified transfer size too large for current implementation");
+ if (TX_TRY_LOCK(&ep3_tx_pending)) {
+ ep35_start_tx(&ep3);
+ }
+}
+
+static void
+ep3_set_halted(usbs_tx_endpoint* endpoint, cyg_bool new_value)
+{
+ CYG_ASSERT(endpoint = &ep3.common, "USB set-stall operation involves the wrong endpoint");
+ ep35_set_halted(&ep3, new_value);
+}
+
+// Initialization. This gets called during the device driver
+// initialization and after a reset. The main job is to initialize the
+// EP3 control register, but the relevant bits of the interrupt mask
+// are set here as well. The tx mailboxes are shared with other
+// endpoints, so that is handled by ep0_init(). Any traffic that
+// happened before the reset needs to be cleaned up.
+static void
+ep3_init(void)
+{
+ // Assume 64 byte packets, terminate transfers with a zero-byte packet
+ // if necessary since this endpoint is used for bulk transfers.
+ *EP3_CR = IBUS_SWAP32(EP3_CR_EP3EN | EP3_CR_TM3_SZLP | 64); FLUSH_IBUS();
+ *USBS_IMR1 |= IBUS_SWAP32(USBS_GSR1_EP3TF); FLUSH_IBUS();
+ usbs_upd985xx_gsr1_mask |= IBUS_SWAP32(USBS_GSR1_EP3TF);
+ ep3.common.halted = false;
+ ep3.tx_indicator_valid = false;
+ ep3.tx_bufdesc = &(uncached->ep3_tx_bufdesc);
+ ep35_tx_complete(&ep3, -EPIPE);
+}
+#else
+static inline void
+ep3_init(void)
+{
+ *EP3_CR = 0; // Clear EP3EN bit, thus disabling the endpoint
+ FLUSH_IBUS();
+}
+# endif // Endpoint 3 configured in
+
+// ----------------------------------------------------------------------------
+// Repeat for endpoint 5
+# ifdef CYGPKG_DEVS_USB_UPD985XX_EP5
+
+static void
+ep5_start_tx(usbs_tx_endpoint* endpoint)
+{
+ CYG_ASSERT( endpoint == &ep5.common, "USB data transfer involves the wrong endpoint");
+#ifdef CYGIMP_DEVS_USB_UPD985XX_EP5_BULK
+ CYG_ASSERT( ep5.common.buffer_size < (64 * 1024), "Specified transfer size too large for current implementation");
+#else
+ CYG_ASSERT( ep5.common.buffer_size <= 64, "Specified transfer size too large for current implementation");
+#endif
+ if (TX_TRY_LOCK(&ep5_tx_pending)) {
+ ep35_start_tx(&ep5);
+ }
+}
+
+static void
+ep5_set_halted(usbs_tx_endpoint* endpoint, cyg_bool new_value)
+{
+ CYG_ASSERT(endpoint = &ep5.common, "USB set-stall operation involves the wrong endpoint");
+ ep35_set_halted(&ep5, new_value);
+}
+
+// Initialization. This gets called during the device driver
+// initialization and after a reset. The main job is to initialize the
+// EP5 control register, but the relevant bits of the interrupt mask
+// are set here as well. The tx mailboxes are shared with other
+// endpoints, so that is handled by ep0_init(). Any traffic that
+// happened before the reset needs to be cleaned up.
+static void
+ep5_init(void)
+{
+ // Assume 64 byte packets, terminate transfers with a zero-byte packet
+ // if necessary since this endpoint is used for bulk transfers.
+ *EP5_CR = IBUS_SWAP32(EP5_CR_EP5EN | 64); FLUSH_IBUS();
+ *USBS_IMR1 |= IBUS_SWAP32(USBS_GSR1_EP5TF); FLUSH_IBUS();
+ usbs_upd985xx_gsr1_mask |= IBUS_SWAP32(USBS_GSR1_EP5TF);
+ ep5.common.halted = false;
+ ep5.tx_indicator_valid = false;
+ ep5.tx_bufdesc = &(uncached->ep5_tx_bufdesc);
+ ep35_tx_complete(&ep5, -EPIPE);
+}
+#else
+static inline void
+ep5_init(void)
+{
+ *EP5_CR = 0; // Clear EP5EN bit, thus disabling the endpoint
+ FLUSH_IBUS();
+}
+#endif // Endpoint 5 configured in
+
+
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP4
+// ----------------------------------------------------------------------------
+// Endpoint 4 - bulk receives.
+//
+// Bulk receives are mostly straightforward, but the cache does involve
+// a complication. The assumption is that the receive buffer will be in
+// cached memory, and is unlikely to be cacheline-aligned. Clearly the bulk
+// of the buffer has to be invalidated. However the receive buffer may share
+// some cache lines with other data at the head and tail, and invalidating
+// those would be wrong.
+//
+// The solution here is to split up a receive in to up to three areas,
+// head, main, and tail, where the head and tail are statically
+// allocated in uncached memory. Any one or two of these areas may be
+// unused, depending on alignment and transfer size. The main area
+// corresponds to the central section of the supplied receive buffer,
+// will be cacheline-aligned, and invalidated at the start of a receive.
+// Data will be copied from the head and tail areas into the receive
+// buffer by the dsr on completion of the transfer.
+//
+// There are additional complications caused by the hardware's need for
+// linked buffers.
+
+static void
+ep4_rx_complete(int result)
+{
+ void (*complete_fn)(void*, int) = ep4.common.complete_fn;
+ void* complete_data = ep4.common.complete_data;
+
+#if 0
+ *EP4_CR = IBUS_SWAP32(EP4_CR_EP4EN | EP4_CR_RM4_ASSEMBLE | EP4_CR_NAK4 | 64); FLUSH_IBUS();
+#endif
+
+#if 0
+ if (result > 0) {
+ diag_printf("Rx: %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ ep4.common.buffer[0], ep4.common.buffer[1], ep4.common.buffer[2], ep4.common.buffer[3],
+ ep4.common.buffer[4], ep4.common.buffer[5], ep4.common.buffer[6], ep4.common.buffer[7]);
+ diag_printf(" %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ ep4.common.buffer[8], ep4.common.buffer[9], ep4.common.buffer[10], ep4.common.buffer[11],
+ ep4.common.buffer[12], ep4.common.buffer[13], ep4.common.buffer[14], ep4.common.buffer[15]);
+ diag_printf(" %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ ep4.common.buffer[16], ep4.common.buffer[17], ep4.common.buffer[18], ep4.common.buffer[19],
+ ep4.common.buffer[20], ep4.common.buffer[21], ep4.common.buffer[22], ep4.common.buffer[23]);
+ diag_printf(" %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ ep4.common.buffer[24], ep4.common.buffer[25], ep4.common.buffer[26], ep4.common.buffer[27],
+ ep4.common.buffer[28], ep4.common.buffer[29], ep4.common.buffer[30], ep4.common.buffer[31]);
+ diag_printf(" %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ ep4.common.buffer[32], ep4.common.buffer[33], ep4.common.buffer[34], ep4.common.buffer[35],
+ ep4.common.buffer[36], ep4.common.buffer[37], ep4.common.buffer[38], ep4.common.buffer[39]);
+ diag_printf(" %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ ep4.common.buffer[40], ep4.common.buffer[41], ep4.common.buffer[42], ep4.common.buffer[43],
+ ep4.common.buffer[44], ep4.common.buffer[45], ep4.common.buffer[46], ep4.common.buffer[47]);
+ }
+#endif
+
+ ep4.common.buffer = (unsigned char*) 0;
+ ep4.common.buffer_size = 0;
+ ep4.common.complete_fn = (void (*)(void*, int)) 0;
+ ep4.common.complete_data = (void*) 0;
+
+ if ((void (*)(void*, int))0 != complete_fn) {
+ (*complete_fn)(complete_data, result);
+ }
+}
+
+static void
+ep4_start_rx(usbs_rx_endpoint* ep)
+{
+ CYG_ASSERT( ep == &ep4.common, "USB data transfer involves the wrong endpoint");
+
+ // Is this endpoint currently stalled? If so then a size of 0 can
+ // be used to block until the stall condition is clear, anything
+ // else should result in an immediate callback.
+ if (ep4.common.halted) {
+ if (0 != ep4.common.buffer_size) {
+ ep4_rx_complete(-EAGAIN);
+ }
+ } else if (0 == ep4.common.buffer_size) {
+ // A check to see if the endpoint is halted. It isn't.
+ ep4_rx_complete(0);
+ } else {
+
+ // Time to work out how much data should go into the uncached
+ // head and tail buffers, how much can go directly into the
+ // receive buffer, how much memory needs to be invalidated, and so on.
+ cyg_uint32 buffer_arith;
+
+ // Where to start filling in buffer descriptors.
+ cyg_uint32 first_bufdesc;
+
+ // And the current buffer descriptor.
+ cyg_uint32 current_bufdesc;
+
+ CYG_ASSERT( ep4.common.buffer_size < (64 * 1024), "Specified transfer size too large for current implementation");
+
+ // If there has not been a receive operation, tail_index
+ // will still be set to -1. Otherwise it will be somewhere
+ // between 1 and 3, or between 5 and 7, depending on
+ // whether the previous receive operation used the
+ // first four buffer descriptors or the last four.
+ if (ep4.tail_index < 4) {
+ first_bufdesc = 4;
+ } else {
+ first_bufdesc = 0;
+ }
+ current_bufdesc = first_bufdesc;
+
+ // Arithmetic, especially remainder operators, requires
+ // integers rather than a pointer.
+ buffer_arith = (cyg_uint32) ep4.common.buffer;
+
+ // The size of the "head" area. This involves up to
+ // (cacheline-1) bytes, so that the main receive buffer
+ // is suitably aligned.
+ ep4.head_size = ((buffer_arith + HAL_DCACHE_LINE_SIZE - 1) & ~(HAL_DCACHE_LINE_SIZE - 1)) - buffer_arith;
+ if (ep4.head_size > ep4.common.buffer_size) {
+ ep4.head_size = ep4.common.buffer_size;
+ }
+ if (0 < ep4.head_size) {
+ // It is necessary to receive some data into the uncached head area.
+ uncached->ep4_rx_bufdescs[current_bufdesc].buffer = uncached->ep4_head;
+ uncached->ep4_rx_bufdescs[current_bufdesc].control = RXBUFDESC_CTRL_BUFDESC_BUFDESC | ep4.head_size;
+ current_bufdesc++;
+ }
+
+ // Now for the size of the main area. This is the rest of the
+ // transfer size, minus the tail area.
+ ep4.direct_size = ep4.common.buffer_size - ep4.head_size;
+ ep4.direct_size &= ~(HAL_DCACHE_LINE_SIZE - 1);
+ if (ep4.direct_size > 0) {
+ uncached->ep4_rx_bufdescs[current_bufdesc].buffer = MIPS_TO_UNCACHED(ep4.common.buffer + ep4.head_size);
+ uncached->ep4_rx_bufdescs[current_bufdesc].control = RXBUFDESC_CTRL_BUFDESC_BUFDESC | ep4.direct_size;
+ current_bufdesc++;
+ HAL_DCACHE_INVALIDATE(ep4.common.buffer + ep4.head_size, ep4.direct_size);
+ }
+
+ // And the size of the tail. This is the transfer size minus what we have accumulated so far.
+ ep4.tail_size = ep4.common.buffer_size - (ep4.head_size + ep4.direct_size);
+ if (ep4.tail_size > 0) {
+ uncached->ep4_rx_bufdescs[current_bufdesc].buffer = uncached->ep4_tail;
+ uncached->ep4_rx_bufdescs[current_bufdesc].control = RXBUFDESC_CTRL_BUFDESC_BUFDESC | ep4.tail_size;
+ current_bufdesc++;
+ }
+
+ // Or the LAST bit into the last of these buffer descriptors.
+ uncached->ep4_rx_bufdescs[current_bufdesc - 1].control |= RXBUFDESC_CTRL_LAST;
+
+ // Turn the current one into a link descriptor.
+ uncached->ep4_rx_bufdescs[current_bufdesc].control = RXBUFDESC_CTRL_BUFDESC_LINK;
+ uncached->ep4_rx_bufdescs[current_bufdesc].buffer = 0;
+
+ // The buffer descriptors have now been sorted out. Time to
+ // add this receive buffer to the pool. Atomicity becomes
+ // important for some of these steps.
+ cyg_drv_isr_lock();
+
+ // Update the link pointer used for the last receive operation
+ // to point at the new set of buffer descriptors.
+ if (-1 != ep4.tail_index) {
+ uncached->ep4_rx_bufdescs[ep4.tail_index].buffer = (void*) &(uncached->ep4_rx_bufdescs[first_bufdesc]);
+ }
+
+ // Keep track of the link pointer used for the last receive
+ // operation.
+ ep4.tail_index = current_bufdesc;
+
+ while (0 != (*USBS_CMR & IBUS_SWAP32(USBS_CMR_BUSY))) {
+ // Do nothing: this situation should be short-lived.
+ }
+ *USBS_CA = IBUS_SWAPPTR(void, (void*)&(uncached->ep4_rx_bufdescs[first_bufdesc])); FLUSH_IBUS();
+ *USBS_CMR = IBUS_SWAP32(USBS_CMR_COMMAND_ADD_POOL2 | 1); FLUSH_IBUS();
+#if 0
+ *EP4_CR = IBUS_SWAP32(EP4_CR_EP4EN | EP4_CR_RM4_ASSEMBLE | 64); FLUSH_IBUS();
+#endif
+ cyg_drv_isr_unlock();
+ }
+}
+
+// The stalled state is controlled by a single bit in the appropriate
+// control register. When it comes to ongoing receives, the reasoning
+// here is much the same as for ep3_set_halted(). Arguably this is not
+// quite right. set_halted() is most likely to be called in response
+// to a control request from the host, and the host is unlikely to
+// transmit any data at the same time as making this request. Hence the
+// host will see the wrong behaviour: it can still make one transfer
+// after asking for the stalled bit to be set. Since there does not
+// appear to be any way to cancel a supplied receive, this behaviour
+// still seems the most sensible.
+static void
+ep4_set_halted(usbs_rx_endpoint* ep, cyg_bool new_state)
+{
+ CYG_ASSERT(ep == &ep4.common, "USB set-stall operation involves the wrong endpoint");
+
+ if (ep4.common.halted == new_state) {
+ return;
+ }
+
+ // Avoid race conditions with the DSR updating the buffer fields.
+ cyg_drv_dsr_lock();
+
+ if (new_state){
+ // Set the halted flag to prevent further transmits, and if
+ // there is no receive currently in progress then set
+ // the stalled bit immediately.
+ ep4.common.halted = true;
+ if ((void*)0 == ep4.common.buffer) {
+ *EP4_CR |= IBUS_SWAP32(EP4_CR_SS4); FLUSH_IBUS();
+ }
+ } else {
+ // Update the hardware (that may be a no-op if the stalled bit
+ // never got set by the DSR), and clear the halted flag.
+ *EP4_CR &= IBUS_SWAP32(~EP4_CR_SS4); FLUSH_IBUS();
+ ep4.common.halted = false;
+
+ // If there is a pending request to wait until the endpoint stall
+ // condition is clear, inform higher-level code. This test may
+ // give false positives but those would be harmless.
+ if (0 == ep4.common.buffer_size) {
+ ep4_rx_complete(0);
+ }
+ }
+
+ cyg_drv_dsr_unlock();
+}
+
+// An interrupt has occured related to endpoint 4 - i.e. the EP4RF
+// interrupt, nothing else seems especially relevant. The ISR will
+// have set the NAK bit in the control register. It is necessary to
+// extract the appropriate receive indicator from the rx mailbox to
+// determine whether or not the transmission was successful and how
+// much data was actually received, clear the interrupt bit, and
+// report status to higher-level code.
+static void
+ep4_dsr(void)
+{
+ // Extract the transmit indicator if that has not happened
+ // already courtesy of another DSR.
+ if (!ep4.rx_indicator_valid) {
+ drain_rx_mailbox();
+ if (!ep4.rx_indicator_valid) {
+ // A receive interrupt when there does not appear to be
+ // any data? It appears that this can happen when there
+ // are error conditions.
+#if 1
+ CYG_FAIL("EP4_DSR invoked when there is no valid rx indicator");
+#endif
+ return;
+ }
+ }
+ ep4.rx_indicator_valid = false;
+
+ // If the endpoint should be halted but there was a transmit
+ // in progress, update the hardware now.
+ if (ep4.common.halted) {
+ *EP4_CR |= IBUS_SWAP32(EP4_CR_SS4); FLUSH_IBUS();
+ }
+ if (0 != (ep4.rx_indicator.status & (RXMBOX_STATUS_IBUS_ERROR | 0))) {
+ // This appears to be the only type of error that can be
+ // detected. Everything else gets retried by the hardware,
+ // except when using the isochronous endpoint.
+ ep4_rx_complete(-EPIPE);
+ } else {
+ cyg_uint32 actual_size = ep4.rx_indicator.status & RXMBOX_STATUS_SIZE_MASK;
+
+ // Either the transfer size must match the requested size, or the
+ // supplied buffer should have been aligned to cacheline boundaries.
+ // Anything else risks leaving the receive pool in a confused
+ // state and there is no way of cleaning things up.
+ CYG_ASSERT((actual_size == ep4.common.buffer_size) || ((0 == ep4.head_size) && (0 == ep4.tail_size)), \
+ "Buffers should be cacheline aligned if the protocol involves partial transfers");
+
+ // If there was some data in the head, move it from uncached
+ // to cached. Ditto for tail. Note that these copies may be
+ // for data that has not actually been transferred if the
+ // actual transfer is less than expected, but overwriting bits
+ // of the receive buffer in such circumstances should be
+ // harmless.
+ if (ep4.head_size > 0) {
+ memcpy(ep4.common.buffer, uncached->ep4_head, ep4.head_size);
+ }
+ if (ep4.tail_size > 0) {
+ memcpy(ep4.common.buffer + ep4.head_size + ep4.direct_size, uncached->ep4_tail, ep4.tail_size);
+ }
+ ep4_rx_complete(actual_size);
+ }
+}
+
+// Initialization. This gets called during the device driver
+// initialization and after a reset. The main job is to initialize the
+// EP4 control register, but the relevant bits of the interrupt mask
+// are set here as well. The rx mailboxes are shared with other
+// endpoints, so that is handled by ep0_init(). Any traffic that
+// happened before the reset needs to be cleaned up.
+static void
+ep4_init(void)
+{
+ // Assume 64 byte packets, and use assemble mode so that we get a
+ // single rx indication per transfer. In practice the buffer
+ // directory will only ever contain one entry so there should be
+ // no discernible difference between normal, assemble, or separate
+ // mode.
+#if 0
+ *EP4_CR = IBUS_SWAP32(EP4_CR_EP4EN | EP4_CR_RM4_ASSEMBLE | EP4_CR_NAK4 | 64); FLUSH_IBUS();
+#else
+ *EP4_CR = IBUS_SWAP32(EP4_CR_EP4EN | EP4_CR_RM4_ASSEMBLE | 64); FLUSH_IBUS();
+#endif
+
+ *USBS_IMR1 |= IBUS_SWAP32(USBS_GSR1_EP4RF); FLUSH_IBUS();
+ usbs_upd985xx_gsr1_mask |= USBS_GSR1_EP4RF;
+ ep4.common.halted = false;
+ ep4.rx_indicator_valid = false;
+ ep4.tail_index = -1;
+ ep4_rx_complete(-EPIPE);
+}
+#else
+static inline void
+ep4_init(void)
+{
+ *EP4_CR = 0; // Clear EP4EN bit, thus disabling the endpoint
+ FLUSH_IBUS();
+}
+#endif // Endpoint 4 configured in
+
+// ----------------------------------------------------------------------------
+// Endpoint 6 - interrupt receives
+#if 0
+// A real implementation
+#else
+static inline void
+ep6_init(void)
+{
+ *EP6_CR = 0; // Clear EP6EN bit, thus disabling the endpoint
+ FLUSH_IBUS();
+}
+#endif
+
+// ----------------------------------------------------------------------------
+// Make sure the hardware is in a known state by completely resetting
+// the USB controller. This gets called during device driver
+// initialization, and again whenever the host issues a reset signal.
+// The previous state is unknown. Even during eCos initialization
+// RedBoot may have involved USB I/O, or some POST code may have
+// performed loopback tests. The various endpoint init routines will
+// also perform software resets as appropriate.
+
+static void
+usbs_upd985xx_handle_reset(void)
+{
+ // Reset the USB hardware. This involves poking the warm reset
+ // register and then polling the matching status register. It is
+ // assumed that this poll will take a short time, and in practice
+ // the loop appears to terminate immediately.
+ *S_WRCR = S_WRCR_USBWR; FLUSH_IBUS();
+ while (0 == (*S_WRSR & S_WRCR_USBWR)) {
+ // Do nothing.
+ }
+
+ // Get all the endpoints into a known state - for disabled
+ // endpoints these init calls are inlined and just disable the
+ // relevant hardware.
+ ep0_init();
+ ep1_init();
+ ep2_init();
+ ep3_init();
+ ep4_init();
+ ep5_init();
+ ep6_init();
+}
+
+// ----------------------------------------------------------------------------
+// Start(). This is typically called by the application itself once
+// everything else has been initialized, i.e. when the host should be
+// able to start talking to this device. There is no actual bit in the
+// chip itself to switch the USB pins from tri-state, so instead the
+// platform HAL has to supply appropriate functionality. In the absence
+// of such functionality things will only work if you start up eCos
+// with the USB cable disconnected, then plug in the cable once
+// start() has been called.
+//
+// The device driver initialization will have already set up the
+// hardware, and the first action from the host should be a reset
+// signal which will cause a re-initialization. There is no need
+// to do anything else here.
+
+static void
+usbs_upd985xx_ep0_start(usbs_control_endpoint* endpoint)
+{
+ CYG_ASSERT( endpoint == &ep0.common, "USB startup involves the wrong endpoint");
+
+ // If there is additional platform-specific initialization to
+ // perform, do it now. This macro can come from the platform HAL,
+ // but may not be available on all platforms.
+#ifdef UPD985XX_USB_PLATFORM_INIT
+ UPD985XX_USB_PLATFORM_INIT();
+#endif
+}
+
+// ----------------------------------------------------------------------------
+// The main DSR
+//
+// This gets called by the interrupt system or by the polling code
+// when one or more USB-related events have occurred. The ISR code
+// will have updated globals usbs_upd985xx_gsr1 and usbs_upd98x0x_gsr2
+// to indicate which events are pending. When running in interrupt
+// mode it is possible that further interrupts will occur while the
+// DSR is running, and hence that these globals will be updated
+// while the DSR is running. This is handled by a loop. A side effect
+// is that the DSR may get called when all the work has already
+// been done by a previous DSR, but that is harmless.
+
+static void
+usbs_upd985xx_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data)
+{
+ CYG_ASSERT(CYGNUM_HAL_INTERRUPT_USB == vector, "USB DSR should only be invoked for USB interrupts" );
+ CYG_ASSERT(0 == data, "The USB DSR needs no global data pointer");
+
+ while ((0 != usbs_upd985xx_gsr1) || (0 != usbs_upd985xx_gsr2)) {
+ // Only update the globals in one place since it involves
+ // the overhead of two function calls.
+ cyg_uint32 gsr1, gsr2;
+ cyg_drv_isr_lock();
+ gsr1 = usbs_upd985xx_gsr1;
+ gsr2 = usbs_upd985xx_gsr2;
+ usbs_upd985xx_gsr1 = 0;
+ usbs_upd985xx_gsr2 = 0;
+ cyg_drv_isr_unlock();
+
+ if (0 != gsr2) {
+ // Treat reset specially. If there has been a reset then none of
+ // the other bits are of any interest.
+ if (0 != (USBS_GSR2_URST & gsr2)) {
+ int old_state = ep0.common.state;
+ // Update the state. ep0_init() detects this state change and
+ // updates imr2 appropriate, preventing a continuous storm
+ // of reset interrupts.
+ ep0.common.state = USBS_STATE_DEFAULT;
+ usbs_upd985xx_handle_reset();
+ // This state change must be reported to higher-level code
+ if ((void (*)(usbs_control_endpoint*, void*, usbs_state_change, int))0 != ep0.common.state_change_fn) {
+ (*ep0.common.state_change_fn)(&ep0.common, ep0.common.state_change_data,
+ USBS_STATE_CHANGE_RESET, old_state);
+ }
+ break;
+ }
+ // There is possible confusion if both suspend and resume
+ // bits are set. Was there a suspend, quickly followed by
+ // a resume? Were we already suspended, then resumed, now
+ // suspended again? For now this complication is ignored and
+ // resume is given priority over suspend.
+ if (0 != (USBS_GSR2_URSM & gsr2)) {
+ int old_state = ep0.common.state;
+ if (0 != (old_state & USBS_STATE_SUSPENDED)) {
+ ep0.common.state &= ~USBS_STATE_SUSPENDED;
+ if ((void (*)(usbs_control_endpoint*, void*, usbs_state_change, int))0 != ep0.common.state_change_fn) {
+ (*ep0.common.state_change_fn)(&ep0.common, ep0.common.state_change_data,
+ USBS_STATE_CHANGE_RESUMED, old_state);
+ }
+ }
+ } else if (0 != (USBS_GSR2_USPD & gsr2)) {
+ int old_state = ep0.common.state;
+ if (0 == (old_state & USBS_STATE_SUSPENDED)) {
+ ep0.common.state |= USBS_STATE_SUSPENDED;
+ if ((void (*)(usbs_control_endpoint*, void*, usbs_state_change, int))0 != ep0.common.state_change_fn) {
+ (*ep0.common.state_change_fn)(&ep0.common, ep0.common.state_change_data,
+ USBS_STATE_CHANGE_SUSPENDED, old_state);
+ }
+ }
+ } else {
+ // Handle error conditions on the isochronous endpoints?
+ }
+ }
+ if (0 != gsr1) {
+
+ if (0 != (USBS_GSR1_EP0TF & gsr1)) {
+ ep0_tx_dsr();
+ }
+ if (0 != (USBS_GSR1_EP0RF & gsr1)) {
+ ep0_rx_dsr();
+ }
+#if 0
+ // EP1FU?
+ if (0 != (USBS_GSR1_EP1TF & gsr1)) {
+ ep1_dsr();
+ }
+#endif
+#if 0
+ // EP2FO?
+ if (0 != (USBS_GSR1_EP2RF & gsr1)) {
+ ep1_dsr();
+ }
+#endif
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP3
+ if (0 != (USBS_GSR1_EP3TF & gsr1)) {
+ ep35_dsr(&ep3);
+ }
+#endif
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP4
+ if (0 != (USBS_GSR1_EP4RF & gsr1)) {
+ ep4_dsr();
+ }
+#endif
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP5
+ if (0 != (USBS_GSR1_EP5TF & gsr1)) {
+ ep35_dsr(&ep5);
+ }
+#endif
+#if 0
+ if (0 != (USBS_GSR1_EP6RF & gsr1)) {
+ ep6_dsr();
+ }
+#endif
+ }
+ } // while there are unprocessed interrupts
+}
+
+// ----------------------------------------------------------------------------
+// Interrupt handling.
+//
+// There are two status registers to look at. These are read-once
+// registers, i.e. reading the register causes all bits to be cleared,
+// so the relevant state has to be preserved in volatile globals which
+// can then be examined by the DSR. In theory the top bit of the first
+// status register can be used to check whether or not there is
+// anything of interest in the second one, but it seems quicker to
+// just read both registers. After masking out interrupts that are of
+// no interest, some global flags are updated. If this leaves a
+// non-zero value then the DSR must be invoked.
+
+static cyg_uint32
+usbs_upd985xx_isr(cyg_vector_t vector, cyg_addrword_t data)
+{
+ CYG_ASSERT(CYGNUM_HAL_INTERRUPT_USB == vector, "USB ISR should only be invoked for USB interrupts");
+ CYG_ASSERT(0 == data, "The UPD985xx ISR needs no global data pointer");
+
+ usbs_upd985xx_gsr1 |= IBUS_SWAP32(*USBS_GSR1) & usbs_upd985xx_gsr1_mask;
+ usbs_upd985xx_gsr2 |= IBUS_SWAP32(*USBS_GSR2) & usbs_upd985xx_gsr2_mask;
+
+ cyg_drv_interrupt_acknowledge(vector);
+ return ((0 == usbs_upd985xx_gsr1) && (0 == usbs_upd985xx_gsr2)) ?
+ CYG_ISR_HANDLED : CYG_ISR_CALL_DSR;
+}
+
+// ----------------------------------------------------------------------------
+// Polling support. It is not clear that this is going to work particularly
+// well since according to the documentation the hardware does not generate
+// NAKs automatically - instead the ISR has to set the appropriate bits
+// sufficiently quickly to avoid confusing the host.
+//
+// Calling the isr directly avoids duplicating code, but means that
+// cyg_drv_interrupt_acknowledge() will get called when not inside a
+// real interrupt handler. This should be harmless.
+
+static void
+usbs_upd985xx_poll(usbs_control_endpoint* endpoint)
+{
+ CYG_ASSERT(endpoint == &ep0.common, "USB poll involves the wrong endpoint");
+ if (CYG_ISR_CALL_DSR == usbs_upd985xx_isr(CYGNUM_HAL_INTERRUPT_USB, 0)) {
+ usbs_upd985xx_dsr(CYGNUM_HAL_INTERRUPT_USB, 0, 0);
+ }
+}
+
+// ----------------------------------------------------------------------------
+// Initialization
+//
+// This routine gets called from a prioritized static constructor during
+// eCos startup.
+void
+usbs_upd985xx_init(void)
+{
+ // Make sure the uncached data structure is accessed through
+ // kseg1.
+ uncached = (uncached_data*) MIPS_TO_UNCACHED(&cached_copy);
+
+ // Perform a full hardware reset.
+ usbs_upd985xx_handle_reset();
+
+ // It is possible and desirable to install the interrupt handler
+ // here, even though there will be no interrupts for a while yet.
+ // FIXME: is 99 a sensible interrupt priority :-?
+ cyg_drv_interrupt_create(CYGNUM_HAL_INTERRUPT_USB,
+ 99, // priority
+ 0, // data
+ &usbs_upd985xx_isr,
+ &usbs_upd985xx_dsr,
+ &usbs_upd985xx_intr_handle,
+ &usbs_upd985xx_intr_data);
+
+ cyg_drv_interrupt_attach(usbs_upd985xx_intr_handle);
+ cyg_drv_interrupt_unmask(CYGNUM_HAL_INTERRUPT_USB);
+}
+
+// ----------------------------------------------------------------------------
+// Testing support.
+
+usbs_testing_endpoint usbs_testing_endpoints[] = {
+ {
+ endpoint_type : USB_ENDPOINT_DESCRIPTOR_ATTR_CONTROL,
+ endpoint_number : 0,
+ endpoint_direction : USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN,
+ endpoint : (void*) &ep0.common,
+#ifdef CYGVAR_DEVS_USB_UPD985XX_EP0_DEVTAB_ENTRY
+ devtab_entry : CYGDAT_DEVS_USB_UPD985XX_DEVTAB_BASENAME "0c",
+#else
+ devtab_entry : (const char*) 0,
+#endif
+ min_size : 1, // zero-byte control transfers are meaningless
+#if (CYGNUM_DEVS_USB_UPD985XX_EP0_RXBUFSIZE < CYGNUM_DEVS_USB_UPD985XX_EP0_TXBUFSIZE)
+ max_size : CYGNUM_DEVS_USB_UPD985XX_EP0_RXBUFSIZE,
+#else
+ max_size : CYGNUM_DEVS_USB_UPD985XX_EP0_TXBUFSIZE,
+#endif
+ max_in_padding : 0,
+ alignment : 0
+ },
+
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP3
+ {
+ endpoint_type : USB_ENDPOINT_DESCRIPTOR_ATTR_BULK,
+ endpoint_number : 3,
+ endpoint_direction : USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN,
+ endpoint : (void*) &ep3.common,
+# ifdef CYGVAR_DEVS_USB_UPD985XX_EP3_DEVTAB_ENTRY
+ devtab_entry : CYGDAT_DEVS_USB_UPD985XX_DEVTAB_BASENAME "3w",
+# else
+ devtab_entry : (const char*) 0,
+# endif
+ min_size : 0,
+ max_size : 0x0FFFF, // Driver limitation, only a single buffer descriptor is used
+ max_in_padding : 0,
+ alignment : HAL_DCACHE_LINE_SIZE
+ },
+#endif
+
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP4
+ {
+ endpoint_type : USB_ENDPOINT_DESCRIPTOR_ATTR_BULK,
+ endpoint_number : 4,
+ endpoint_direction : USB_ENDPOINT_DESCRIPTOR_ENDPOINT_OUT,
+ endpoint : (void*) &ep4.common,
+# ifdef CYGVAR_DEVS_USB_UPD985XX_EP4_DEVTAB_ENTRY
+ devtab_entry : CYGDAT_DEVS_USB_UPD985XX_DEVTAB_BASENAME "4r",
+# else
+ devtab_entry : (const char*) 0,
+# endif
+ min_size : 1,
+ max_size : 0x0FFFF, // Driver limitation
+ max_in_padding : 0,
+ alignment : HAL_DCACHE_LINE_SIZE
+ },
+#endif
+
+#ifdef CYGPKG_DEVS_USB_UPD985XX_EP5
+ {
+# ifdef CYGIMP_DEVS_USB_UPD985XX_EP5_BULK
+ endpoint_type : USB_ENDPOINT_DESCRIPTOR_ATTR_BULK,
+# else
+ endpoint_type : USB_ENDPOINT_DESCRIPTOR_ATTR_INTERRUPT,
+# endif
+ endpoint_number : 5,
+ endpoint_direction : USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN,
+ endpoint : (void*) &ep5.common,
+# ifdef CYGVAR_DEVS_USB_UPD985XX_EP5_DEVTAB_ENTRY
+ devtab_entry : CYGDAT_DEVS_USB_UPD985XX_DEVTAB_BASENAME "5w",
+# else
+ devtab_entry : (const char*) 0,
+# endif
+ min_size : 1,
+ max_size : 0x0FFFF, // Driver limitation, only a single buffer descriptor is used
+ max_in_padding : 0,
+ alignment : HAL_DCACHE_LINE_SIZE
+ },
+#endif
+
+ USBS_TESTING_ENDPOINTS_TERMINATOR
+};
diff --git a/cesar/ecos/packages/devs/usb/nec_upd985xx/current/src/usbs_upd985xx_data.cxx b/cesar/ecos/packages/devs/usb/nec_upd985xx/current/src/usbs_upd985xx_data.cxx
new file mode 100644
index 0000000000..ee2ec5e17f
--- /dev/null
+++ b/cesar/ecos/packages/devs/usb/nec_upd985xx/current/src/usbs_upd985xx_data.cxx
@@ -0,0 +1,190 @@
+//==========================================================================
+//
+// usbs_nec_upd9850x.c
+//
+// Static data for the NEC uPD9850x USB device driver
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 2001-05-22
+//
+// This file contains various objects that should go into extras.o
+// rather than libtarget.a, e.g. devtab entries that would normally
+// be eliminated by the selective linking.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/infra/diag.h>
+#include <cyg/io/devtab.h>
+#include <cyg/io/usb/usbs_upd985xx.h>
+#include <pkgconf/devs_usb_upd985xx.h>
+
+// ----------------------------------------------------------------------------
+// Initialization. The goal here is to call usbs_upd985xx_init()
+// early on during system startup, to take care of things like
+// registering interrupt handlers etc. which are best done
+// during system init.
+//
+// If the endpoint 0 devtab entry is available then its init()
+// function can be used to take care of this. However the devtab
+// entries are optional so an alternative mechanism must be
+// provided. Unfortunately although it is possible to give
+// a C function the constructor attribute, it cannot be given
+// an initpri attribute. Instead it is necessary to define a
+// dummy C++ class.
+
+extern "C" void usbs_upd985xx_init(void);
+
+#ifndef CYGVAR_DEVS_USB_UPD985XX_EP0_DEVTAB_ENTRY
+class usbs_upd985xx_initialization {
+ public:
+ usbs_upd985xx_initialization() {
+ usbs_upd985xx_init();
+ }
+};
+
+static usbs_upd985xx_initialization usbs_upd985xx_init_object CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO);
+#endif
+
+// ----------------------------------------------------------------------------
+// The devtab entries. Each of these is optional, many applications
+// will want to use the lower-level API rather than go via
+// open/read/write/ioctl.
+
+#ifdef CYGVAR_DEVS_USB_UPD985XX_EP0_DEVTAB_ENTRY
+
+// For endpoint 0 the only legal operations are get_config() and
+// set_config(), and these are provided by the common package.
+
+static bool
+usbs_upd985xx_devtab_ep0_init(struct cyg_devtab_entry* tab)
+{
+ CYG_UNUSED_PARAM(struct cyg_devtab_entry*, tab);
+ usbs_upd985xx_init();
+ return true;
+}
+
+static CHAR_DEVIO_TABLE(usbs_upd985xx_ep0_devtab_functions,
+ &cyg_devio_cwrite,
+ &cyg_devio_cread,
+ &cyg_devio_select,
+ &usbs_devtab_get_config,
+ &usbs_devtab_set_config);
+
+static CHAR_DEVTAB_ENTRY(usbs_upd985xx_ep0_devtab_entry,
+ CYGDAT_DEVS_USB_UPD985XX_DEVTAB_BASENAME "0c",
+ 0,
+ &usbs_upd985xx_ep0_devtab_functions,
+ &usbs_upd985xx_devtab_ep0_init,
+ 0,
+ (void*) &usbs_upd985xx_ep0);
+#endif
+
+// ----------------------------------------------------------------------------
+// Common routines for ep3, ep4 and ep5
+#if defined(CYGVAR_DEVS_USB_UPD985XX_EP3_DEVTAB_ENTRY) || \
+ defined(CYGVAR_DEVS_USB_UPD985XX_EP4_DEVTAB_ENTRY) || \
+ defined(CYGVAR_DEVS_USB_UPD985XX_EP5_DEVTAB_ENTRY)
+static bool
+usbs_upd985xx_devtab_dummy_init(struct cyg_devtab_entry* tab)
+{
+ CYG_UNUSED_PARAM(struct cyg_devtab_entry*, tab);
+ return true;
+}
+#endif
+
+// ----------------------------------------------------------------------------
+// ep3 devtab entry. This can only be used for slave->host, so only
+// the cwrite() function makes sense. The same function table can be
+// used for ep5.
+
+#if defined(CYGVAR_DEVS_USB_UPD985XX_EP3_DEVTAB_ENTRY) || \
+ defined(CYGVAR_DEVS_USB_UPD985XX_EP5_DEVTAB_ENTRY)
+static CHAR_DEVIO_TABLE(usbs_upd985xx_ep35_devtab_functions,
+ &usbs_devtab_cwrite,
+ &cyg_devio_cread,
+ &cyg_devio_select,
+ &usbs_devtab_get_config,
+ &usbs_devtab_set_config);
+
+# if defined(CYGVAR_DEVS_USB_UPD985XX_EP3_DEVTAB_ENTRY)
+static CHAR_DEVTAB_ENTRY(usbs_upd985xx_ep3_devtab_entry,
+ CYGDAT_DEVS_USB_UPD985XX_DEVTAB_BASENAME "3w",
+ 0,
+ &usbs_upd985xx_ep35_devtab_functions,
+ &usbs_upd985xx_devtab_dummy_init,
+ 0,
+ (void*) &usbs_upd985xx_ep3);
+
+# endif
+
+# if defined(CYGVAR_DEVS_USB_UPD985XX_EP5_DEVTAB_ENTRY)
+static CHAR_DEVTAB_ENTRY(usbs_upd985xx_ep5_devtab_entry,
+ CYGDAT_DEVS_USB_UPD985XX_DEVTAB_BASENAME "5w",
+ 0,
+ &usbs_upd985xx_ep35_devtab_functions,
+ &usbs_upd985xx_devtab_dummy_init,
+ 0,
+ (void*) &usbs_upd985xx_ep5);
+# endif
+#endif
+
+// ----------------------------------------------------------------------------
+// ep4 devtab entry. This can only be used for host->slave, so only the
+// cread() function makes sense.
+
+#ifdef CYGVAR_DEVS_USB_UPD985XX_EP4_DEVTAB_ENTRY
+
+static CHAR_DEVIO_TABLE(usbs_upd985xx_ep4_devtab_functions,
+ &cyg_devio_cwrite,
+ &usbs_devtab_cread,
+ &cyg_devio_select,
+ &usbs_devtab_get_config,
+ &usbs_devtab_set_config);
+
+static CHAR_DEVTAB_ENTRY(usbs_upd985xx_ep4_devtab_entry,
+ CYGDAT_DEVS_USB_UPD985XX_DEVTAB_BASENAME "4r",
+ 0,
+ &usbs_upd985xx_ep4_devtab_functions,
+ &usbs_upd985xx_devtab_dummy_init,
+ 0,
+ (void*) &usbs_upd985xx_ep4);
+#endif
+
diff --git a/cesar/ecos/packages/devs/usb/sa11x0/current/ChangeLog b/cesar/ecos/packages/devs/usb/sa11x0/current/ChangeLog
new file mode 100644
index 0000000000..080feb9501
--- /dev/null
+++ b/cesar/ecos/packages/devs/usb/sa11x0/current/ChangeLog
@@ -0,0 +1,196 @@
+2003-02-25 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/usbs_sa11x0.sgml: Declare as <part> not <reference> to get
+ correct TOC numbering.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/usbs_sa11x0.cdl: Fix doc link.
+
+ * doc/usbs_sa11x0.sgml: Comment out DOCTYPE for now to allow building
+ with standard doc build.
+ Add an enclosing <reference> so it's structured better with standard
+ doc build.
+
+2002-02-11 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_sa11x0.c:
+ Add a handler for the SET_INTERFACE standard control message.
+ This should not be needed, but appears to avoid hardware problems
+ when a compliance testing program sends certain requests. Also
+ improve the handling of halted endpoints since the hardware
+ does not allow transfers to be aborted.
+
+2002-01-23 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_sa11x0.c:
+ Add missing assertions for non-NULL buffers
+ Try to improve the behaviour when the host sends data before
+ the target is ready. The hardware is not capable of handling
+ this situation, but some recovery is possible some of the time.
+
+2001-09-14 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_sa11x0.c:
+ Update support for USB testing
+
+2001-08-06 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_sa11x0.c:
+ Add initial support for USB testing.
+
+2001-05-21 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_sa11x0.c (usbs_sa11x0_ep2_dsr):
+ Fix the boundary condition where the transmission is an exact
+ multiple of 64 bytes. ep2_process_packet() already did the
+ right thing but was not getting called.
+ Also, some cosmetic changes to the receive code for the
+ same boundary condition. These actually have no effect
+ because of the hardware, but may be useful for other
+ people writing USB device drivers.
+
+2001-04-05 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_sa11x0.c (usbs_sa11x0_ep0_fill_fifo):
+ Set the DATA_END and IN_READY bits in one operation.
+ This seems to avoid problems when the target needs to send
+ back a zero-length control packet.
+
+2001-02-02 Bart Veer <bartv@redhat.com>
+
+ * cdl/usbs_sa11x0.cdl:
+ Add doc property to the html
+
+ * doc/usbs_sa11x0.sgml, devs-usbs-sa11x0.html:
+ Incorporate changes from docs department, regenerate html
+
+2001-01-25 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_sa11x0_data.cxx:
+ * cdl/usbs_sa11x0.cdl:
+ Devtab entries were never actually being built - and did not
+ build...
+
+ * cdl/usbs_sa11x0.cdl:
+ Sort out the dependencies for minimal environments such as
+ RedBoot.
+
+2001-01-24 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_sa11x0.c:
+ Invoke additional platform-specific initialization, if defined
+ via <cyg/hal/hal_io.h> and CYGBLD_HAL_PLATFORM_IO_H
+
+2001-01-22 Bart Veer <bartv@redhat.com>
+
+ * doc/usbs_sa11x0.sgml, doc/makefile:
+ Added documentation.
+
+2001-01-16 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_sa11x0.c:
+ Make sure that the resume interrupt source is enabled,
+ even when the USB bus is not suspended. For some reason
+ this makes it possible to disconnect and reconnect.
+
+2001-01-16 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_sa11x0.c:
+ Use the HAL macros for virtual->physical address translation
+ Update poll() and start() to match the documentation
+ Fix the handling of control messages affecting endpoints 1 and 2
+ if those endpoints are not currently configured.
+
+
+2001-01-02 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_sa11x0.c:
+ Change ep2_tx_packet() to start the DMA operation after the
+ UDC packet-complete bit has been set. This avoids a very high
+ error rate. Add some scheduler locking to eliminate a resulting
+ race condition, and sort out the error handling to match.
+ Comment out some assertions relating to spurious interrupts, which
+ have been observed. Instead the code now recovers from these.
+
+2000-12-15 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_sa11x0.c:
+ Add debug code for tracking stats and simulating failures.
+ Change the EP1 code to switch between DMA channels A and B as
+ required, rather than always using channel A. This is more robust
+ and was needed for the failure simulation.
+
+ Make the ep1 packet processing code robust in case an unexpected
+ failure occurs during its invocation. It is not clear how this
+ can ever happen, but on a couple of occasions it did and caused an
+ infinite loop.
+
+2000-11-30 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_sa11x0.c:
+ Fix DMA_CONTROL_CLEAR_ALL constant, it was ignoring START_B
+ In ep2_init(), separate out the fifo write and the IN_SIZE
+ write to avoid a hardware problem.
+
+2000-11-29 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_sa11x0.c:
+ Disable some debugging features and add retries when manipulating
+ certain DMA registers - needed with some Silicon revisions.
+
+2000-11-28 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_sa11x0.c:
+ More rewriting, plus implementing the endpoint halt support.
+
+2000-11-24 Bart Veer <bartv@redhat.com>
+
+ * src/usbs_sa11x0.c:
+ Clean up some of the debugging.
+ Largely rewrite the endpoint 2 support to try and get it working
+ Transmit a runt packet during initialization to work around
+ hardware problem.
+
+2000-11-22 Bart Veer <bartv@redhat.com>
+
+ * include/usbs_sa11x0.h: Fix nested #include protection
+
+2000-11-21 Bart Veer <bartv@redhat.com>
+
+ * First check-in of eCos USB support.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/devs/usb/sa11x0/current/cdl/usbs_sa11x0.cdl b/cesar/ecos/packages/devs/usb/sa11x0/current/cdl/usbs_sa11x0.cdl
new file mode 100644
index 0000000000..3fcedeb663
--- /dev/null
+++ b/cesar/ecos/packages/devs/usb/sa11x0/current/cdl/usbs_sa11x0.cdl
@@ -0,0 +1,203 @@
+# ====================================================================
+#
+# usbs_sa11x0.cdl
+#
+# SA11X0 USB support.
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Original data: bartv
+# Contributors:
+# Date: 2000-10-04
+#
+#####DESCRIPTIONEND####
+# ====================================================================
+
+cdl_package CYGPKG_DEVS_USB_SA11X0 {
+ display "SA11X0 USB Device Driver"
+ include_dir "cyg/io/usb"
+ parent CYGPKG_USB
+ implements CYGHWR_IO_USB_SLAVE
+ doc ref/devs-usb-sa11x0.html
+
+ # Make sure that we are running on the right hardware.
+ requires CYGPKG_HAL_ARM
+ requires CYGPKG_HAL_ARM_SA11X0
+
+
+ description "
+ The on-chip serial port 0 on the SA11X0 implements a USB
+ device controller, facilitating the use of this processor
+ in USB peripherals. This package provides a suitable eCos
+ device driver."
+
+
+ cdl_option CYGFUN_DEVS_USB_SA11X0_EP0 {
+ display "Support the control endpoint 0"
+ default_value CYGINT_IO_USB_SLAVE_CLIENTS
+ # And the USB support packages
+ requires CYGPKG_IO_USB CYGPKG_IO_USB_SLAVE
+ compile usbs_sa11x0.c
+ compile -library=libextras.a usbs_sa11x0_data.cxx
+ description "
+ Enable support for endpoint 0. If this support is disabled
+ then the entire USB port is unusable."
+ }
+
+ cdl_option CYGVAR_DEVS_USB_SA11X0_EP0_DEVTAB_ENTRY {
+ display "Provide a devtab entry for endpoint 0"
+ default_value CYGGLO_IO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES
+ requires CYGPKG_IO
+ description "
+ If endpoint 0 will only be accessed via the low-level
+ USB-specific calls then there is no need for an entry
+ in the device table, saving some memory. If the
+ application intends to access the endpoint by means
+ of open and ioctl calls then a devtab entry is needed.
+ "
+ }
+
+ cdl_component CYGPKG_DEVS_USB_SA11X0_EP1 {
+ display "Support endpoint 1, used for host->slave communications"
+ implements CYGHWR_IO_USB_SLAVE_OUT_ENDPOINTS
+ requires CYGFUN_DEVS_USB_SA11X0_EP0
+ default_value CYGFUN_DEVS_USB_SA11X0_EP0
+ description "
+ In the SA11X0 USB implementation endpoint 1 can only be
+ used for host->slave communication. If the intended application
+ only involves slave->host transfers then the support for
+ endpoint 1 can be disabled. Note that this does not affect
+ control messages which always go via endpoint 0."
+
+ cdl_option CYGNUM_DEVS_USB_SA11X0_EP1_DMA_CHANNEL {
+ display "Control DMA usage for endpoint 1"
+ flavor booldata
+ legal_values 0 to 5
+ default_value 4
+ description "
+ In the SA11X0 USB implementation endpoint 1 only has
+ a 20-byte fifo. If the application only involves
+ small transfers then this may prove sufficient, but
+ for larger transfers the use of a DMA engine is
+ mandated. This configuration option allows the
+ use of DMA engine to be disabled or enabled, and the
+ specific DMA channel to be selected. The SA11X0
+ supports 6 DMA channels numbered 0 to 5. If DMA
+ is enabled for endpoint 1 then the selected channel
+ cannot be used by any other code."
+ }
+
+ cdl_option CYGVAR_DEVS_USB_SA11X0_EP1_DEVTAB_ENTRY {
+ display "Provide a devtab entry for endpoint 1"
+ default_value CYGGLO_IO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES
+ requires CYGPKG_IO
+ description "
+ If endpoint 1 will only be accessed via the low-level
+ USB-specific calls then there is no need for an entry
+ in the device table, saving some memory. If the
+ application intends to access the endpoint by means
+ of open and read calls then a devtab entry is needed.
+ "
+ }
+ }
+
+ cdl_component CYGPKG_DEVS_USB_SA11X0_EP2 {
+ display "Support endpoint 2, used for slave->host communications"
+ implements CYGHWR_IO_USB_SLAVE_IN_ENDPOINTS
+ requires CYGFUN_DEVS_USB_SA11X0_EP0
+ default_value CYGFUN_DEVS_USB_SA11X0_EP0
+ description "
+ In the SA11X0 USB implementation endpoint 2 can only be
+ used for slave->host communication. If the intended application
+ only involves host->slave transfers then the support for
+ endpoint 2 can be disabled. Note that this does not affect
+ control messages which always go via endpoint 0."
+
+ cdl_option CYGNUM_DEVS_USB_SA11X0_EP2_DMA_CHANNEL {
+ display "Control DMA usage for endpoint 2"
+ flavor booldata
+ legal_values 0 to 5
+ default_value 5
+ description "
+ In the SA11X0 USB implementation endpoint 2 only has
+ a 16-byte fifo. If the application only involves
+ small transfers then this may prove sufficient, but
+ for larger transfers the use of a DMA engine is
+ mandated. This configuration option allows the
+ use of DMA engine to be disabled or enabled, and the
+ specific DMA channel to be selected. The SA11X0
+ supports 6 DMA channels numbered 0 to 5. If DMA
+ is enabled for endpoint 2 then the selected channel
+ cannot be used by any other code."
+ }
+
+ cdl_option CYGVAR_DEVS_USB_SA11X0_EP2_DEVTAB_ENTRY {
+ display "Provide a devtab entry for endpoint 2"
+ default_value CYGGLO_IO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES
+ requires CYGPKG_IO
+ description "
+ If endpoint 2 will only be accessed via the low-level
+ USB-specific calls then there is no need for an entry
+ in the device table, saving some memory. If the
+ application intends to access the endpoint by means
+ of open and write calls then a devtab entry is needed.
+ "
+ }
+ }
+
+ cdl_option CYGDAT_DEVS_USB_SA11X0_DEVTAB_BASENAME {
+ display "Base name for devtab entries"
+ flavor data
+ active_if { CYGVAR_DEVS_USB_SA11X0_EP0_DEVTAB_ENTRY ||
+ CYGVAR_DEVS_USB_SA11X0_EP1_DEVTAB_ENTRY ||
+ CYGVAR_DEVS_USB_SA11X0_EP2_DEVTAB_ENTRY
+ }
+ default_value { "\"/dev/usbs\"" }
+ description "
+ If the SA11X0 USB device driver package provides devtab
+ entries for any of the endpoints then this option gives
+ control over the names of these entries. By default the
+ endpoints will be called \"/dev/usbs0c\", \"/dev/usbs1r\"
+ and \"/dev/usbs2w\" (assuming all three endpoints are
+ enabled. The common part \"/dev/usbs\" is determined
+ by this configuration option. It may be necessary to
+ change this if there are multiple USB slave-side
+ devices on the target hardware to prevent a name clash.
+ "
+ }
+}
diff --git a/cesar/ecos/packages/devs/usb/sa11x0/current/doc/devs-usb-sa11x0.html b/cesar/ecos/packages/devs/usb/sa11x0/current/doc/devs-usb-sa11x0.html
new file mode 100644
index 0000000000..fc30c7750b
--- /dev/null
+++ b/cesar/ecos/packages/devs/usb/sa11x0/current/doc/devs-usb-sa11x0.html
@@ -0,0 +1,341 @@
+<!-- Copyright (C) 2001 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<HTML>
+<HEAD>
+<TITLE>
+SA11X0 USB Device Driver</TITLE>
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.54"></HEAD>
+<BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF">
+<H1>
+<A
+NAME="DEVS-USB-SA11X0">
+SA11X0 USB Device Driver</A>
+</H1>
+<DIV
+CLASS="REFNAMEDIV">
+<A
+NAME="AEN4">
+</A>
+<H2>
+Name</H2>
+SA11X0 USB Support&nbsp;--&nbsp;Device driver for the on-chip SA11X0 USB device</DIV>
+<DIV
+CLASS="REFSECT1">
+<A
+NAME="AEN7">
+</A>
+<H2>
+SA11X0 USB Hardware</H2>
+<P>
+The Intel StrongARM SA11x0 family of processors is supplied with an
+on-chip USB slave device, the UDC (USB Device Controller). This
+supports three endpoints. Endpoint 0 can only be used for control
+messages. Endpoint 1 can only be used for bulk transfers from host to
+peripheral. Endpoint 2 can only be used for bulk transfers from
+peripheral to host. Isochronous and interrupt transfers are not
+supported.</P>
+<DIV
+CLASS="CAUTION">
+<P>
+</P>
+<TABLE
+CLASS="CAUTION"
+BORDER="1"
+WIDTH="100%">
+<TR>
+<TD
+ALIGN="CENTER">
+<B>
+Caution</B>
+</TD>
+</TR>
+<TR>
+<TD
+ALIGN="LEFT">
+<P>
+Different revisions of the SA11x0 silicon have had various problems
+with the USB support. The device driver has been tested primarily
+against stepping B4 of the SA1110 processor, and may not function as
+expected with other revisions. Application developers should obtain
+the manufacturer's current errata sheets and specification updates.
+The B4 stepping still has a number of problems, but the device driver
+can work around these. However there is a penalty in terms of extra
+code, extra cpu cycles, and increased dispatch latency because extra
+processing is needed at DSR level. Interrupt latency should not be
+affected.</P>
+<P>
+There is one specific problem inherent in the UDC design of which
+application developers should be aware: the hardware cannot fully
+implement the USB standard for bulk transfers. A bulk transfer
+typically consists of some number of full-size 64-byte packets and is
+terminated by a packet less than the full size. If the amount of data
+transferred is an exact multiple of 64 bytes then this requires a
+terminating packet of 0 bytes of data (plus header and checksum). The
+SA11x0 USB hardware does not allow a 0-byte packet to be transmitted,
+so the device driver is forced to substitute a 1-byte packet and the
+host receives more data than expected. Protocol support is needed so
+that the appropriate host-side device driver can allow buffer space
+for the extra byte, detect when it gets sent, and discard it.
+Consequently certain standard USB class protocols cannot be
+implemented using the SA11x0, and therefore custom host-side device
+drivers will generally have to be provided, rather than re-using
+existing ones that understand the standard protocol.</P>
+</TD>
+</TR>
+</TABLE>
+</DIV>
+</DIV>
+<DIV
+CLASS="REFSECT1">
+<A
+NAME="AEN13">
+</A>
+<H2>
+Endpoint Data Structures</H2>
+<P>
+The SA11x0 USB device driver can provide up to three data structures
+corresponding to the three endpoints: a
+<SPAN
+CLASS="STRUCTNAME">
+usbs_control_endpoint</SPAN>
+ structure
+<TT
+CLASS="LITERAL">
+usbs_sa11x0_ep0</TT>
+; a
+<SPAN
+CLASS="STRUCTNAME">
+usbs_rx_endpoint</SPAN>
+
+<TT
+CLASS="LITERAL">
+usbs_sa11x0_ep1</TT>
+; and a
+<SPAN
+CLASS="STRUCTNAME">
+usbs_tx_endpoint</SPAN>
+
+<TT
+CLASS="LITERAL">
+usbs_sa11x0_ep2</TT>
+. The header file
+<TT
+CLASS="FILENAME">
+cyg/io/usb/usbs_sa11x0.h</TT>
+
+provides declarations for these.</P>
+<P>
+Not all applications will require support for all the endpoints. For
+example, if the intended use of the UDC only involves peripheral to
+host transfers then <TT
+CLASS="LITERAL">
+usbs_sa11x0_ep1</TT>
+ is redundant.
+The device driver provides configuration options to control the
+presence of each endpoint:</P>
+<P>
+</P>
+<OL
+TYPE="1">
+<LI>
+<P>
+Endpoint 0 is controlled by
+<TT
+CLASS="LITERAL">
+CYGFUN_DEVS_USB_SA11X0_EP0</TT>
+. This defaults to
+enabled if there are any higher-level packages that require USB
+hardware or if the global preference
+<TT
+CLASS="LITERAL">
+CYGGLO_IO_USB_SLAVE_APPLICATION</TT>
+ is enabled,
+otherwise it is disabled. Usually this has the desired effect. It may
+be necessary to override this in special circumstances, for example if
+the target board uses an external USB chip in preference to the UDC
+and it is that external chip's device driver that should be used
+rather than the on-chip UDC. It is not possible to disable endpoint 0
+and at the same time enable one or both of the other endpoints, since
+a USB device is only usable if it can process the standard control
+messages.</P>
+</LI>
+<LI>
+<P>
+Endpoint 1 is controlled by
+<TT
+CLASS="LITERAL">
+CYGPKG_DEVS_USB_SA11X0_EP1</TT>
+. By default it is
+enabled whenever endpoint 0 is enabled, but it can be disabled
+manually when not required.</P>
+</LI>
+<LI>
+<P>
+Similarly endpoint 2 is controlled by
+<TT
+CLASS="LITERAL">
+CYGPKG_DEVS_USB_SA11X0_EP2</TT>
+. This is also enabled by
+default whenever endpoint 0 is enabled, but it can be disabled manually.</P>
+</LI>
+</OL>
+<P>
+The SA11X0 USB device driver implements the interface specified by the
+common eCos USB Slave Support package. The documentation for that
+package should be consulted for further details. There is only one
+major deviation: when there is a peripheral to host transfer on
+endpoint 2 which is an exact multiple of the bulk transfer packet size
+(usually 64 bytes) the device driver has to pad the transfer with one
+extra byte. This is because of a hardware limitation: the UDC is
+incapable of transmitting 0-byte packets as required by the USB
+specification. Higher-level code, including the host-side device
+driver, needs to be aware of this and adapt accordingly.</P>
+<P>
+The device driver assumes a bulk packet size of 64 bytes, so this
+value should be used in the endpoint descriptors in the enumeration
+data provided by application code. There is experimental code
+for running with <A
+HREF="devs-usb-sa11x0.html#AEN58">
+DMA disabled</A>
+,
+in which case the packet size will be 16 bytes rather than 64.</P>
+</DIV>
+<DIV
+CLASS="REFSECT1">
+<A
+NAME="AEN39">
+</A>
+<H2>
+Devtab Entries</H2>
+<P>
+In addition to the endpoint data structures the SA11X0 USB device
+driver can also provide devtab entries for each endpoint. This allows
+higher-level code to use traditional I/O operations such as
+<TT
+CLASS="FUNCTION">
+open</TT>
+/<TT
+CLASS="FUNCTION">
+read</TT>
+/<TT
+CLASS="FUNCTION">
+write</TT>
+
+rather than the USB-specific non-blocking functions like
+<TT
+CLASS="FUNCTION">
+usbs_start_rx_buffer</TT>
+. These devtab entries are
+optional since they are not always required. The relevant
+configuration options are
+<TT
+CLASS="LITERAL">
+CYGVAR_DEVS_USB_SA11X0_EP0_DEVTAB_ENTRY</TT>
+,
+<TT
+CLASS="LITERAL">
+CYGVAR_DEVS_USB_SA11X0_EP1_DEVTAB_ENTRY</TT>
+ and
+<TT
+CLASS="LITERAL">
+CYGVAR_DEVS_USB_SA11X0_EP2_DEVTAB_ENTRY</TT>
+. By default
+these devtab entries are provided if the global preference
+<TT
+CLASS="LITERAL">
+CYGGLO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES</TT>
+ is enabled,
+which is usually the case. Obviously a devtab entry for a given
+endpoint will only be provided if the underlying endpoint is enabled.
+For example, there will not be a devtab entry for endpoint 1 if
+<TT
+CLASS="LITERAL">
+CYGPKG_DEVS_USB_SA11X0_EP1</TT>
+ is disabled.</P>
+<P>
+The names for the three devtab entries are determined by using a
+configurable base name and appending <TT
+CLASS="LITERAL">
+0c</TT>
+,
+<TT
+CLASS="LITERAL">
+1r</TT>
+ or <TT
+CLASS="LITERAL">
+2w</TT>
+. The base name is
+determined by the configuration option
+<TT
+CLASS="LITERAL">
+CYGDAT_DEVS_USB_SA11X0_DEVTAB_BASENAME</TT>
+ and has a
+default value of <TT
+CLASS="LITERAL">
+/dev/usbs</TT>
+, so the devtab entry for
+endpoint 1 would default to <TT
+CLASS="LITERAL">
+/dev/usbs1r</TT>
+. If the
+target hardware involves multiple USB devices then application
+developers may have to change the base name to prevent a name clash.</P>
+</DIV>
+<DIV
+CLASS="REFSECT1">
+<A
+NAME="AEN58">
+</A>
+<H2>
+DMA Engines</H2>
+<P>
+The SA11X0 UDC provides only limited fifos for bulk transfers on
+endpoints 1 and 2; smaller than the normal 64-byte bulk packet size.
+Therefore a typical transfer requires the use of DMA engines. The
+SA11x0 provides six DMA engines that can be used for this, and the
+endpoints require one each (assuming both endpoints are enabled). At
+the time of writing there is no arbitration mechanism to control
+access to the DMA engines. By default the device driver will use
+DMA engine 4 for endpoint 1 and DMA engine 5 for endpoint 2, and it
+assumes that no other code uses these particular engines.</P>
+<P>
+The exact DMA engines that will be used are determined by the
+configuration options
+<TT
+CLASS="LITERAL">
+CYGNUM_DEVS_USB_SA11X0_EP1_DMA_CHANNEL</TT>
+ and
+<TT
+CLASS="LITERAL">
+CYGNUM_DEVS_USB_SA11X0_EP2_DMA_CHANNEL</TT>
+. These
+options have the booldata flavor, allowing the use of DMA to be
+disabled completely in addition to controlling which DMA engines are
+used. If DMA is disabled then the device driver will attempt to
+work purely using the fifos, and the packet size will be limited to
+only 16 bytes. This limit should be reflected in the appropriate
+endpoint descriptors in the enumeration data. The code for driving the
+endpoints without DMA should be considered experimental. At best it
+will be suitable only for applications where the amount of data
+transferred is relatively small, because four times as many interrupts
+will be raised and performance will suffer accordingly.</P>
+</DIV>
+</BODY>
+</HTML>
diff --git a/cesar/ecos/packages/devs/usb/sa11x0/current/doc/makefile b/cesar/ecos/packages/devs/usb/sa11x0/current/doc/makefile
new file mode 100644
index 0000000000..182c891a65
--- /dev/null
+++ b/cesar/ecos/packages/devs/usb/sa11x0/current/doc/makefile
@@ -0,0 +1,55 @@
+#=============================================================================
+#
+# makefile
+#
+# For building the SA11x0 USB device driver documentation
+#
+#=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#=============================================================================
+#####DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Date: 2001-01-11
+#####DESCRIPTIONEND####
+#=============================================================================
+
+TOPLEVEL := ../../../../..
+MAIN_SGML := usbs_sa11x0.sgml
+MAIN_HTML := devs-usb-sa11x0.html
+MAIN_PDF := devs-usb-sa11x0.pdf
+OTHER_SGML :=
+PICTURES :=
+
+include $(TOPLEVEL)/pkgconf/rules.doc
diff --git a/cesar/ecos/packages/devs/usb/sa11x0/current/doc/usbs_sa11x0.sgml b/cesar/ecos/packages/devs/usb/sa11x0/current/doc/usbs_sa11x0.sgml
new file mode 100644
index 0000000000..a2115d9105
--- /dev/null
+++ b/cesar/ecos/packages/devs/usb/sa11x0/current/doc/usbs_sa11x0.sgml
@@ -0,0 +1,236 @@
+<!-- DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" -->
+
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- usbs_sa11x0.sgml -->
+<!-- -->
+<!-- Documentation for the SA11x0 USB Device Driver. -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- Author(s): bartv -->
+<!-- Contact(s): bartv -->
+<!-- Date: 2001/01/11 -->
+<!-- Version: 0.01 -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part id="devs-usb-sa11x0-ref">
+<!-- reference id="devs-usb-sa11x0-ref" -->
+ <title>SA11X0 USB Device Driver</title>
+
+<refentry id="devs-usb-sa11x0">
+<refmeta>
+<refentrytitle>SA11X0 USB Device Driver</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>SA11X0 USB Support</refname>
+<refpurpose>Device driver for the on-chip SA11X0 USB device</refpurpose>
+</refnamediv>
+
+<refsect1><title>SA11X0 USB Hardware</title>
+<para>
+The Intel StrongARM SA11x0 family of processors is supplied with an
+on-chip USB slave device, the UDC (USB Device Controller). This
+supports three endpoints. Endpoint 0 can only be used for control
+messages. Endpoint 1 can only be used for bulk transfers from host to
+peripheral. Endpoint 2 can only be used for bulk transfers from
+peripheral to host. Isochronous and interrupt transfers are not
+supported.
+</para>
+<caution>
+<para>
+Different revisions of the SA11x0 silicon have had various problems
+with the USB support. The device driver has been tested primarily
+against stepping B4 of the SA1110 processor, and may not function as
+expected with other revisions. Application developers should obtain
+the manufacturer's current errata sheets and specification updates.
+The B4 stepping still has a number of problems, but the device driver
+can work around these. However there is a penalty in terms of extra
+code, extra cpu cycles, and increased dispatch latency because extra
+processing is needed at DSR level. Interrupt latency should not be
+affected.
+</para>
+<para>
+There is one specific problem inherent in the UDC design of which
+application developers should be aware: the hardware cannot fully
+implement the USB standard for bulk transfers. A bulk transfer
+typically consists of some number of full-size 64-byte packets and is
+terminated by a packet less than the full size. If the amount of data
+transferred is an exact multiple of 64 bytes then this requires a
+terminating packet of 0 bytes of data (plus header and checksum). The
+SA11x0 USB hardware does not allow a 0-byte packet to be transmitted,
+so the device driver is forced to substitute a 1-byte packet and the
+host receives more data than expected. Protocol support is needed so
+that the appropriate host-side device driver can allow buffer space
+for the extra byte, detect when it gets sent, and discard it.
+Consequently certain standard USB class protocols cannot be
+implemented using the SA11x0, and therefore custom host-side device
+drivers will generally have to be provided, rather than re-using
+existing ones that understand the standard protocol.
+</para>
+</caution>
+</refsect1>
+
+<refsect1><title>Endpoint Data Structures</title>
+<para>
+The SA11x0 USB device driver can provide up to three data structures
+corresponding to the three endpoints: a
+<structname>usbs_control_endpoint</structname> structure
+<literal>usbs_sa11x0_ep0</literal>; a
+<structname>usbs_rx_endpoint</structname>
+<literal>usbs_sa11x0_ep1</literal>; and a
+<structname>usbs_tx_endpoint</structname>
+<literal>usbs_sa11x0_ep2</literal>. The header file
+<filename class="headerfile">cyg/io/usb/usbs_sa11x0.h</filename>
+provides declarations for these.
+</para>
+<para>
+Not all applications will require support for all the endpoints. For
+example, if the intended use of the UDC only involves peripheral to
+host transfers then <literal>usbs_sa11x0_ep1</literal> is redundant.
+The device driver provides configuration options to control the
+presence of each endpoint:
+</para>
+<orderedlist>
+<listitem>
+<para>
+Endpoint 0 is controlled by
+<literal>CYGFUN_DEVS_USB_SA11X0_EP0</literal>. This defaults to
+enabled if there are any higher-level packages that require USB
+hardware or if the global preference
+<literal>CYGGLO_IO_USB_SLAVE_APPLICATION</literal> is enabled,
+otherwise it is disabled. Usually this has the desired effect. It may
+be necessary to override this in special circumstances, for example if
+the target board uses an external USB chip in preference to the UDC
+and it is that external chip's device driver that should be used
+rather than the on-chip UDC. It is not possible to disable endpoint 0
+and at the same time enable one or both of the other endpoints, since
+a USB device is only usable if it can process the standard control
+messages.
+</para>
+</listitem>
+<listitem>
+<para>
+Endpoint 1 is controlled by
+<literal>CYGPKG_DEVS_USB_SA11X0_EP1</literal>. By default it is
+enabled whenever endpoint 0 is enabled, but it can be disabled
+manually when not required.
+</para>
+</listitem>
+<listitem>
+<para>
+Similarly endpoint 2 is controlled by
+<literal>CYGPKG_DEVS_USB_SA11X0_EP2</literal>. This is also enabled by
+default whenever endpoint 0 is enabled, but it can be disabled manually.
+</para>
+</listitem>
+</orderedlist>
+<para>
+The SA11X0 USB device driver implements the interface specified by the
+common eCos USB Slave Support package. The documentation for that
+package should be consulted for further details. There is only one
+major deviation: when there is a peripheral to host transfer on
+endpoint 2 which is an exact multiple of the bulk transfer packet size
+(usually 64 bytes) the device driver has to pad the transfer with one
+extra byte. This is because of a hardware limitation: the UDC is
+incapable of transmitting 0-byte packets as required by the USB
+specification. Higher-level code, including the host-side device
+driver, needs to be aware of this and adapt accordingly.
+</para>
+<para>
+The device driver assumes a bulk packet size of 64 bytes, so this
+value should be used in the endpoint descriptors in the enumeration
+data provided by application code. There is experimental code
+for running with <link linkend="usbs-sa11x0-dma">DMA disabled</link>,
+in which case the packet size will be 16 bytes rather than 64.
+</para>
+</refsect1>
+
+<refsect1><title>Devtab Entries</title>
+<para>
+In addition to the endpoint data structures the SA11X0 USB device
+driver can also provide devtab entries for each endpoint. This allows
+higher-level code to use traditional I/O operations such as
+<function>open</function>/<function>read</function>/<function>write</function>
+rather than the USB-specific non-blocking functions like
+<function>usbs_start_rx_buffer</function>. These devtab entries are
+optional since they are not always required. The relevant
+configuration options are
+<literal>CYGVAR_DEVS_USB_SA11X0_EP0_DEVTAB_ENTRY</literal>,
+<literal>CYGVAR_DEVS_USB_SA11X0_EP1_DEVTAB_ENTRY</literal> and
+<literal>CYGVAR_DEVS_USB_SA11X0_EP2_DEVTAB_ENTRY</literal>. By default
+these devtab entries are provided if the global preference
+<literal>CYGGLO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES</literal> is enabled,
+which is usually the case. Obviously a devtab entry for a given
+endpoint will only be provided if the underlying endpoint is enabled.
+For example, there will not be a devtab entry for endpoint 1 if
+<literal>CYGPKG_DEVS_USB_SA11X0_EP1</literal> is disabled.
+</para>
+<para>
+The names for the three devtab entries are determined by using a
+configurable base name and appending <literal>0c</literal>,
+<literal>1r</literal> or <literal>2w</literal>. The base name is
+determined by the configuration option
+<literal>CYGDAT_DEVS_USB_SA11X0_DEVTAB_BASENAME</literal> and has a
+default value of <literal>/dev/usbs</literal>, so the devtab entry for
+endpoint 1 would default to <literal>/dev/usbs1r</literal>. If the
+target hardware involves multiple USB devices then application
+developers may have to change the base name to prevent a name clash.
+</para>
+</refsect1>
+
+<refsect1><title id="usbs-sa11x0-dma">DMA Engines</title>
+<para>
+The SA11X0 UDC provides only limited fifos for bulk transfers on
+endpoints 1 and 2; smaller than the normal 64-byte bulk packet size.
+Therefore a typical transfer requires the use of DMA engines. The
+SA11x0 provides six DMA engines that can be used for this, and the
+endpoints require one each (assuming both endpoints are enabled). At
+the time of writing there is no arbitration mechanism to control
+access to the DMA engines. By default the device driver will use
+DMA engine 4 for endpoint 1 and DMA engine 5 for endpoint 2, and it
+assumes that no other code uses these particular engines.
+</para>
+<para>
+The exact DMA engines that will be used are determined by the
+configuration options
+<literal>CYGNUM_DEVS_USB_SA11X0_EP1_DMA_CHANNEL</literal> and
+<literal>CYGNUM_DEVS_USB_SA11X0_EP2_DMA_CHANNEL</literal>. These
+options have the booldata flavor, allowing the use of DMA to be
+disabled completely in addition to controlling which DMA engines are
+used. If DMA is disabled then the device driver will attempt to
+work purely using the fifos, and the packet size will be limited to
+only 16 bytes. This limit should be reflected in the appropriate
+endpoint descriptors in the enumeration data. The code for driving the
+endpoints without DMA should be considered experimental. At best it
+will be suitable only for applications where the amount of data
+transferred is relatively small, because four times as many interrupts
+will be raised and performance will suffer accordingly.
+</para>
+</refsect1>
+
+</refentry>
+</part>
+<!-- /reference -->
diff --git a/cesar/ecos/packages/devs/usb/sa11x0/current/include/usbs_sa11x0.h b/cesar/ecos/packages/devs/usb/sa11x0/current/include/usbs_sa11x0.h
new file mode 100644
index 0000000000..9b085a4ad9
--- /dev/null
+++ b/cesar/ecos/packages/devs/usb/sa11x0/current/include/usbs_sa11x0.h
@@ -0,0 +1,74 @@
+#ifndef CYGONCE_USBS_SA11X0_H
+# define CYGONCE_USBS_SA11X0_H
+//==========================================================================
+//
+// include/usbs_sa11x0.h
+//
+// The interface exported by the SA11X0 USB device driver
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 2000-10-04
+// Purpose:
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/io/usb/usbs.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The SA11x0 family comes with on-chip USB slave support. This
+ * provides three endpoints. Endpoint 0 can only be used for control
+ * messages. Endpoints 1 and 2 can only be used for bulk transfers,
+ * host->slave for endpoint 1 and slave->host for endpoint 2.
+ */
+extern usbs_control_endpoint usbs_sa11x0_ep0;
+extern usbs_rx_endpoint usbs_sa11x0_ep1;
+extern usbs_tx_endpoint usbs_sa11x0_ep2;
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif
+
+
+#endif /* CYGONCE_USBS_SA11X0_H */
diff --git a/cesar/ecos/packages/devs/usb/sa11x0/current/src/usbs_sa11x0.c b/cesar/ecos/packages/devs/usb/sa11x0/current/src/usbs_sa11x0.c
new file mode 100644
index 0000000000..4d14a3e09b
--- /dev/null
+++ b/cesar/ecos/packages/devs/usb/sa11x0/current/src/usbs_sa11x0.c
@@ -0,0 +1,2551 @@
+//==========================================================================
+//
+// usbs_sa11x0.c
+//
+// Device driver for the SA11x0 USB port.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 2000-10-04
+//
+// This code implements support for the on-chip USB port on the SA11x0
+// family of processors. The code has been developed on the SA1110 and
+// may or may not work on other members of the SA11x0 family. There
+// have problems with the USB support on certain revisions of the silicon,
+// so the errata sheet appropriate to the specific processor being used
+// should be consulted. There also appear to be problems which do not
+// appear on any errata, which this code attempts to work around.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/cyg_trac.h>
+#include <cyg/infra/diag.h>
+
+#include <pkgconf/hal_arm.h>
+#include <pkgconf/devs_usb_sa11x0.h>
+
+#include <cyg/hal/drv_api.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_io.h>
+#include <cyg/hal/hal_cache.h>
+#include <cyg/hal/hal_sa11x0.h>
+#include <cyg/error/codes.h>
+
+#include <cyg/io/usb/usb.h>
+#include <cyg/io/usb/usbs.h>
+
+// Debugging support. By default this driver operates mostly at
+// DSR level, with the ISR doing a minimal amount of processing.
+// However is also possible to run most of the code at thread-level,
+// This is subject to some restrictions because the USB standard
+// imposes timing constraints, e.g. some control operations such
+// as SET-ADDRESS have to complete within 50ms. However it is
+// very useful for debugging, specifically it allows you to put
+// printf()'s in various places.
+//
+// Right now these configuration options are not exported to the
+// user because running at DSR level is likely to be good enough
+// for everybody not actively debugging this code. The options
+// could be exported if necessary.
+//#define CYGPKG_DEVS_USB_SA11X0_THREAD
+#undef CYGPKG_DEVS_USB_SA11X0_THREAD
+#ifdef CYGPKG_DEVS_USB_SA11X0_THREAD
+ // Default stack size should be CYGNUM_HAL_STACK_SIZE_TYPICAL
+# define CYGNUM_DEVS_USB_SA11X0_THREAD_STACK_SIZE 4096
+# define CYGNUM_DEVS_USB_SA11X0_THREAD_PRIORITY 7
+# include <cyg/kernel/kapi.h>
+#endif
+
+#if 0
+# define DBG(a) diag_printf a
+#else
+# define DBG(a)
+#endif
+
+#undef FAILURES
+#ifdef FAILURES
+static volatile int ep1_failure = 7;
+#endif
+
+#undef STATS
+#ifdef STATS
+int ep1_receives = 0;
+int ep1_errors = 0;
+int ep2_transmits = 0;
+int ep2_errors = 0;
+# define INCR_STAT(a) (a) += 1
+# define SET_STAT(a, b) (a) = (b)
+#else
+# define INCR_STAT(a)
+# define SET_STAT(a, b)
+#endif
+
+// ----------------------------------------------------------------------------
+// Serial port 0 on the SA11x0 provides a USB slave connection (aka a
+// USB device controller or UDC). The functionality is somewhat
+// limited, there are just three endpoints.
+//
+// Endpoint 0 can only be used for control messages. It has an 8 byte
+// fifo which cannot be connected to a DMA engine. Hence incoming
+// control packets have to be limited to 8 bytes by the enumeration
+// data. The endpoint has to be managed at a low-level, i.e. the
+// incoming request has to be extracted from the fifo, processed, and
+// any response put back into the fifo within the permitted USB
+// response times.
+//
+// Endpoint 1 can only be used for host->slave bulk OUT transfers. It
+// has a 20 byte receive fifo, and it can be hooked up to any of the
+// six DMA engines. Since bulk transfers will typically involve 64
+// byte packets, most applications will require the use of DMA.
+//
+// Endpoint 2 can only be used for slave-host bulk IN transfers. There
+// is a 16 byte transmit fifo so small messages can be transferred in
+// software. The fifo can also be hooked up to DMA, which is a more
+// likely scenario.
+//
+// Start with definitions of the hardware. The use of a structure and
+// a const base pointer should allow the compiler to do base/offset
+// addressing and keep the hardware base address in a register. This
+// is better than defining each hardware register via a separate
+// address. Although the registers are only a byte wide, the peripheral
+// bus only supports word accesses.
+//
+// The USBS_CONTROL etc. macros allow for an alternative way of
+// accessing the hardware if a better approach is presented, without
+// having to rewrite all the code. Macros that correspond to registers
+// are actually addresses, making it easier in the code to distinguish
+// them from bit values: the & and * operators will just cancel out.
+
+typedef struct usbs_sa11x0_hardware {
+ volatile int control;
+ volatile int address;
+ volatile int out_size;
+ volatile int in_size;
+ volatile int ep0_control;
+ volatile int ep1_control;
+ volatile int ep2_control;
+ volatile int ep0_data;
+ volatile int ep0_write_count;
+ int dummy1;
+ volatile int fifo;
+ int dummy2;
+ volatile int status;
+} usbs_sa11x0_hardware;
+
+static usbs_sa11x0_hardware* const usbs_sa11x0_base = (usbs_sa11x0_hardware* const) 0x80000000;
+#define USBS_CONTROL (&(usbs_sa11x0_base->control))
+#define USBS_ADDRESS (&(usbs_sa11x0_base->address))
+#define USBS_OUT_SIZE (&(usbs_sa11x0_base->out_size))
+#define USBS_IN_SIZE (&(usbs_sa11x0_base->in_size))
+#define EP0_CONTROL (&(usbs_sa11x0_base->ep0_control))
+#define EP1_CONTROL (&(usbs_sa11x0_base->ep1_control))
+#define EP2_CONTROL (&(usbs_sa11x0_base->ep2_control))
+#define EP0_DATA (&(usbs_sa11x0_base->ep0_data))
+#define EP0_WRITE_COUNT (&(usbs_sa11x0_base->ep0_write_count))
+#define EP1_DATA (&(usbs_sa11x0_base->fifo))
+#define EP2_DATA (&(usbs_sa11x0_base->fifo))
+#define USBS_STATUS (&(usbs_sa11x0_base->status))
+
+#define CONTROL_DISABLE (1 << 0)
+#define CONTROL_ACTIVE (1 << 1)
+// The meaning of bit 2 changed, see errata
+#define CONTROL_RESUME_INTR (1 << 2)
+#define CONTROL_EP0_INTR (1 << 3)
+#define CONTROL_EP1_INTR (1 << 4)
+#define CONTROL_EP2_INTR (1 << 5)
+// The meaning of bit 6 also changed, see errata
+#define CONTROL_SUSPEND_INTR (1 << 6)
+#define CONTROL_RESET_INTR (1 << 7)
+
+// Getting the control register settings right is a little bit tricky.
+// Bit 0 is the disable bit so touching that is dangerous, and the
+// other bits have inverted meanings i.e. 0 enables interrupts. The
+// following macro encapsulates this.
+#define CONTROL_ALL_INTR 0x00FC
+#define CONTROL_INTR_ENABLE(bits) ((~(bits)) & CONTROL_ALL_INTR)
+#define CONTROL_INTR_CLEAR(bits) ((bits) & CONTROL_ALL_INTR)
+
+// All the endpoint interrupt numbers can be handled en masse,
+// but some of the endpoints may be disabled.
+#if defined(CYGPKG_DEVS_USB_SA11X0_EP1) && defined(CYGPKG_DEVS_USB_SA11X0_EP2)
+# define CONTROL_EP_INTR_BITS (CONTROL_EP0_INTR | CONTROL_EP1_INTR | CONTROL_EP2_INTR)
+#elif defined(CYGPKG_DEVS_USB_SA11X0_EP1)
+# define CONTROL_EP_INTR_BITS (CONTROL_EP0_INTR | CONTROL_EP1_INTR)
+#elif defined(CYGPKG_DEVS_USB_SA11X0_EP2)
+# define CONTROL_EP_INTR_BITS (CONTROL_EP0_INTR | CONTROL_EP2_INTR)
+#else
+# define CONTROL_EP_INTR_BITS (CONTROL_EP0_INTR)
+#endif
+
+#define EP0_OUT_READY (1 << 0)
+#define EP0_IN_READY (1 << 1)
+#define EP0_SENT_STALL (1 << 2)
+#define EP0_FORCE_STALL (1 << 3)
+#define EP0_DATA_END (1 << 4)
+#define EP0_SETUP_END (1 << 5)
+#define EP0_SERVICED_OPR (1 << 6)
+#define EP0_SERVICED_SETUP_END (1 << 7)
+
+#define EP1_FIFO_SERVICE (1 << 0)
+#define EP1_PACKET_COMPLETE (1 << 1)
+#define EP1_PACKET_ERROR (1 << 2)
+#define EP1_SENT_STALL (1 << 3)
+#define EP1_FORCE_STALL (1 << 4)
+#define EP1_FIFO_NOT_EMPTY (1 << 5)
+
+#define EP2_FIFO_SERVICE (1 << 0)
+#define EP2_PACKET_COMPLETE (1 << 1)
+#define EP2_PACKET_ERROR (1 << 2)
+#define EP2_PACKET_UNDERRUN (1 << 3)
+#define EP2_SENT_STALL (1 << 4)
+#define EP2_FORCE_STALL (1 << 5)
+
+#define STATUS_EP0_INTR (1 << 0)
+#define STATUS_EP1_INTR (1 << 1)
+#define STATUS_EP2_INTR (1 << 2)
+#define STATUS_SUSPEND_INTR (1 << 3)
+#define STATUS_RESUME_INTR (1 << 4)
+#define STATUS_RESET_INTR (1 << 5)
+
+#define EP0_FIFO_SIZE 8
+#define EP0_MTU 8
+
+#define EP1_FIFO_SIZE 20
+#ifdef CYGNUM_DEVS_USB_SA11X0_EP1_DMA_CHANNEL
+# define EP1_MTU 64
+#else
+# define EP1_MTU 16
+#endif
+
+#define EP2_FIFO_SIZE 16
+#ifdef CYGNUM_DEVS_USB_SA11X0_EP2_DMA_CHANNEL
+# define EP2_MTU 64
+#else
+# define EP2_MTU 16
+#endif
+
+#if defined(CYGNUM_DEVS_USB_SA11X0_EP1_DMA_CHANNEL) || defined(CYGNUM_DEVS_USB_SA11X0_EP2_DMA_CHANNEL)
+typedef struct usbs_sa11x0_dma {
+ volatile int address;
+ volatile int control_set;
+ volatile int control_clear;
+ volatile int status;
+ volatile int buf_a_address; // Absolute, not remapped
+ volatile int buf_a_size;
+ volatile int buf_b_address; // Absolute, not remapped
+ volatile int buf_b_size;
+} usbs_sa11x0_dma;
+
+#define DMA_CONTROL_RUN (1 << 0)
+#define DMA_CONTROL_INTR_ENABLE (1 << 1)
+#define DMA_STATUS_ERROR (1 << 2)
+#define DMA_STATUS_DONE_A (1 << 3)
+#define DMA_CONTROL_START_A (1 << 4)
+#define DMA_STATUS_DONE_B (1 << 5)
+#define DMA_CONTROL_START_B (1 << 6)
+#define DMA_STATUS_BUFFER_IN_USE (1 << 7)
+// All the bits that are useful to clear. BUFFER_IN_USE is read-only.
+#define DMA_CONTROL_CLEAR_ALL (DMA_CONTROL_RUN | DMA_CONTROL_INTR_ENABLE | DMA_STATUS_ERROR | \
+ DMA_STATUS_DONE_A | DMA_CONTROL_START_A | DMA_STATUS_DONE_B | DMA_CONTROL_START_B)
+
+// The DMA engines operate eight-bytes at a time. This affects issues
+// such as alignment.
+#define DMA_BURST_SIZE 8
+
+// The DMA engines bypass the cache and MMU, accessing physical
+// memory directly. Newer HALS should provide appropriate macros.
+#ifndef HAL_VIRT_TO_PHYS_ADDRESS
+# error HAL macros for translating between virtual and physical memory are required.
+#endif
+
+// Make absolutely sure that the two endpoints use different
+// DMA channels. Right now this check cannot be done easily
+// at the CDL level.
+# if defined(CYGNUM_DEVS_USB_SA11X0_EP1_DMA_CHANNEL) && defined(CYGNUM_DEVS_USB_SA11X0_EP2_DMA_CHANNEL)
+# if (CYGNUM_DEVS_USB_SA11X0_EP1_DMA_CHANNEL == CYGNUM_DEVS_USB_SA11X0_EP2_DMA_CHANNEL)
+# error Different DMA channels must be selected for the two endpoints.
+# endif
+# endif
+
+# ifdef CYGNUM_DEVS_USB_SA11X0_EP1_DMA_CHANNEL
+static usbs_sa11x0_dma* const ep1_dma_base = (usbs_sa11x0_dma* const)(0xB0000000 | (0x20 * CYGNUM_DEVS_USB_SA11X0_EP1_DMA_CHANNEL));
+# define EP1_DMA_ADDRESS (&(ep1_dma_base->address))
+# define EP1_DMA_CONTROL_SET (&(ep1_dma_base->control_set))
+# define EP1_DMA_CONTROL_CLEAR (&(ep1_dma_base->control_clear))
+# define EP1_DMA_STATUS (&(ep1_dma_base->status))
+# define EP1_DMA_BUF_A_ADDRESS (&(ep1_dma_base->buf_a_address))
+# define EP1_DMA_BUF_A_SIZE (&(ep1_dma_base->buf_a_size))
+# define EP1_DMA_BUF_B_ADDRESS (&(ep1_dma_base->buf_b_address))
+# define EP1_DMA_BUF_B_SIZE (&(ep1_dma_base->buf_b_size))
+
+// The correct value for the DMA address register is fixed for USB transfers
+// See table 11.6 of the SA1110 Advanced Developer's Manual
+// Device datum width == 1 byte
+// Device burst size == 8 bytes
+// Device transfer direction == read (device->memory)
+// Endianness is controlled by the ARM architectural HAL package
+# ifdef CYGHWR_HAL_ARM_BIGENDIAN
+# define EP1_DMA_ADDRESS_VALUE (0x80000A00 | 0x10 | 0x0 | 0x4 | 0x2 | 0x1)
+# else
+# define EP1_DMA_ADDRESS_VALUE (0x80000A00 | 0x10 | 0x0 | 0x4 | 0x0 | 0x1)
+# endif
+# endif // EP1_DMA
+
+# ifdef CYGNUM_DEVS_USB_SA11X0_EP2_DMA_CHANNEL
+
+static usbs_sa11x0_dma* const ep2_dma_base = (usbs_sa11x0_dma* const)(0xB0000000 | (0x20 * CYGNUM_DEVS_USB_SA11X0_EP2_DMA_CHANNEL));
+# define EP2_DMA_ADDRESS (&(ep2_dma_base->address))
+# define EP2_DMA_CONTROL_SET (&(ep2_dma_base->control_set))
+# define EP2_DMA_CONTROL_CLEAR (&(ep2_dma_base->control_clear))
+# define EP2_DMA_STATUS (&(ep2_dma_base->status))
+# define EP2_DMA_BUF_A_ADDRESS (&(ep2_dma_base->buf_a_address))
+# define EP2_DMA_BUF_A_SIZE (&(ep2_dma_base->buf_a_size))
+# define EP2_DMA_BUF_B_ADDRESS (&(ep2_dma_base->buf_b_address))
+# define EP2_DMA_BUF_B_SIZE (&(ep2_dma_base->buf_b_size))
+
+# ifdef CYGHWR_HAL_ARM_BIGENDIAN
+# define EP2_DMA_ADDRESS_VALUE (0x80000A00 | 0x00 | 0x0 | 0x4 | 0x2 | 0x0)
+# else
+# define EP2_DMA_ADDRESS_VALUE (0x80000A00 | 0x00 | 0x0 | 0x4 | 0x0 | 0x0)
+# endif
+# endif // EP2_DMA
+
+#endif // EP1_DMA || EP2_DMA
+
+// ----------------------------------------------------------------------------
+// Static data. There is a data structure for each endpoint. The
+// implementation is essentially a private class that inherits from
+// common classes for control and data endpoints, but device drivers
+// are supposed to be written in C so some ugliness is required.
+//
+// Devtab entries are defined in usbs_sa11x0_data.cxx to make sure
+// that the linker does not garbage-collect them.
+
+// Support for the interrupt handling code.
+static cyg_interrupt usbs_sa11x0_intr_data;
+static cyg_handle_t usbs_sa11x0_intr_handle;
+static volatile int isr_status_bits = 0;
+
+// Endpoint 0 is always present, this module would not get compiled
+// otherwise.
+static void usbs_sa11x0_ep0_start(usbs_control_endpoint*);
+static void usbs_sa11x0_poll(usbs_control_endpoint*);
+
+typedef enum ep0_state {
+ EP0_STATE_IDLE = 0,
+ EP0_STATE_IN = 1,
+ EP0_STATE_OUT = 2
+} ep0_state;
+
+typedef struct ep0_impl {
+ usbs_control_endpoint common;
+ ep0_state ep_state;
+ int length;
+ int transmitted;
+} ep0_impl;
+
+static ep0_impl ep0 = {
+ common:
+ {
+ state: USBS_STATE_POWERED, // The hardware does not distinguish between detached, attached and powered.
+ enumeration_data: (usbs_enumeration_data*) 0,
+ start_fn: &usbs_sa11x0_ep0_start,
+ poll_fn: &usbs_sa11x0_poll,
+ interrupt_vector: SA11X0_IRQ_USB_SERVICE_REQUEST,
+ control_buffer: { 0, 0, 0, 0, 0, 0, 0, 0 },
+ state_change_fn: (void (*)(usbs_control_endpoint*, void*, usbs_state_change, int)) 0,
+ state_change_data: (void*) 0,
+ standard_control_fn: (usbs_control_return (*)(usbs_control_endpoint*, void*)) 0,
+ standard_control_data: (void*) 0,
+ class_control_fn: (usbs_control_return (*)(usbs_control_endpoint*, void*)) 0,
+ class_control_data: (void*) 0,
+ vendor_control_fn: (usbs_control_return (*)(usbs_control_endpoint*, void*)) 0,
+ vendor_control_data: (void*) 0,
+ reserved_control_fn: (usbs_control_return (*)(usbs_control_endpoint*, void*)) 0,
+ reserved_control_data: (void*) 0,
+ buffer: (unsigned char*) 0,
+ buffer_size: 0,
+ fill_buffer_fn: (void (*)(usbs_control_endpoint*)) 0,
+ fill_data: (void*) 0,
+ fill_index: 0,
+ complete_fn: (usbs_control_return (*)(usbs_control_endpoint*, int)) 0
+ },
+ ep_state: EP0_STATE_IDLE,
+ length: 0,
+ transmitted: 0
+};
+
+extern usbs_control_endpoint usbs_sa11x0_ep0 __attribute__((alias ("ep0")));
+
+// Endpoint 1 is optional. If the application only involves control
+// messages or only slave->host transfers then the endpoint 1
+// support can be disabled.
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP1
+
+typedef struct ep1_impl {
+ usbs_rx_endpoint common;
+ int fetched;
+ cyg_bool using_buf_a;
+} ep1_impl;
+
+static void ep1_start_rx(usbs_rx_endpoint*);
+static void ep1_set_halted(usbs_rx_endpoint*, cyg_bool);
+
+static ep1_impl ep1 = {
+ common: {
+ start_rx_fn: &ep1_start_rx,
+ set_halted_fn: &ep1_set_halted,
+ complete_fn: (void (*)(void*, int)) 0,
+ complete_data: (void*) 0,
+ buffer: (unsigned char*) 0,
+ buffer_size: 0,
+ halted: 0,
+ },
+ fetched: 0,
+ using_buf_a: 0
+};
+
+extern usbs_rx_endpoint usbs_sa11x0_ep1 __attribute__((alias ("ep1")));
+#endif
+
+// Endpoint 2 is optional. If the application only involves control
+// messages or only host->slave transfers then the endpoint 2 support
+// can be disabled.
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP2
+
+typedef struct ep2_impl {
+ usbs_tx_endpoint common;
+ int transmitted;
+ int pkt_size;
+} ep2_impl;
+
+static void ep2_start_tx(usbs_tx_endpoint*);
+static void ep2_set_halted(usbs_tx_endpoint*, cyg_bool);
+
+static ep2_impl ep2 = {
+ common: {
+ start_tx_fn: &ep2_start_tx,
+ set_halted_fn: &ep2_set_halted,
+ complete_fn: (void (*)(void*, int)) 0,
+ complete_data: (void*) 0,
+ buffer: (const unsigned char*) 0,
+ buffer_size: 0,
+ halted: 0,
+ },
+ transmitted: 0,
+ pkt_size: 0
+};
+
+extern usbs_tx_endpoint usbs_sa11x0_ep2 __attribute__ ((alias ("ep2")));
+
+#endif
+
+// ----------------------------------------------------------------------------
+// Hardware problem: experiments indicate that manipulating the USB
+// controller registers does not always work as expected. The control
+// fifo is especially badly affected, with e.g. writes just being lost
+// completely. It is necessary to work around these problems using
+// retry loops. MAX_RETRIES controls the total number of attempts to
+// access a register. MAX_CHECKS controls the number of times a
+// register is checked to determine whether or not the attempt has
+// been succesful. These constants are used to access the data fifo,
+// so MAX_RETRIES has to be > 20 bytes.
+#define MAX_RETRIES 32
+#define MAX_CHECKS 8
+
+// Write one or more bits to a register. This should result in some
+// bits ending up set and other bits ending up clear. Some register
+// bits are write-1-to-clear or may have side effects.
+static cyg_bool
+usbs_sa11x0_poke(volatile int* addr, int value, int should_be_set, int should_be_clear)
+{
+ cyg_bool result = false;
+ int retries, checks;
+
+ for (retries = 0; !result && (retries < MAX_RETRIES); retries++) {
+ *addr = value;
+ (void) *addr; // The first read is always invalid.
+ for (checks = 0; !result && (checks < MAX_CHECKS); checks++) {
+ int current_value = *addr;
+ if (should_be_set != (should_be_set & current_value)) {
+ continue;
+ }
+ if ((0 != should_be_clear) && (0 != (should_be_clear & current_value))) {
+ continue;
+ }
+ result = true;
+ }
+ }
+ if (!result) {
+ DBG(("usbs_sa11x0_poke failed: addr %x, value %x, should_be_set %x, should_be_clear %x, actual %x\n", \
+ (int) addr, value, should_be_set, should_be_clear, *addr));
+ }
+ return result;
+}
+
+// Write a whole value to a register, rather than just manipulating
+// individual bits.
+static cyg_bool
+usbs_sa11x0_poke_value(volatile int* addr, int value)
+{
+ cyg_bool result = false;
+ int retries, checks;
+
+ for (retries = 0; !result && (retries < MAX_RETRIES); retries++) {
+ *addr = value;
+ (void) *addr; // The first read is always invalid.
+ for (checks = 0; !result && (checks < MAX_CHECKS); checks++) {
+ if (value == *addr) {
+ result = true;
+ }
+ }
+ }
+ if (!result) {
+ DBG(("usbs_sa11x0_poke_value failed: addr %x, value %x, actual %x\n", (int) addr, value, *addr));
+ }
+ return result;
+}
+
+
+// ----------------------------------------------------------------------------
+// Control transfers
+//
+// Endpoint 0 is rather more complicated than the others. This is
+// partly due to the nature of the control protocol, for example it is
+// bidirectional and transfer sizes are unpredictable.
+//
+// The USB standard imposes some timing constraints on endpoint 0, see
+// section 9.2.6 of the spec. For example the set-address operation is
+// supposed to take at most 50ms. In general the timings are reasonably
+// generous so no special action is taken here. There could be problems
+// when debugging, but that is pretty much inevitable.
+//
+// It is necessary to maintain a state for the control endpoint, the
+// default state being idle. Control operations involve roughly the
+// following sequence of events:
+//
+// 1) the host transmits a special setup token, indicating the start
+// of a control operation and possibly cancelling any existing control
+// operation that may be in progress. USB peripherals cannot NAK this
+// even if they are busy.
+//
+// 2) the setup operation is followed by an eight-byte packet from the host
+// that describes the specific control operation. This fits into the
+// SA11X0's eight-byte control fifo. There will be an endpoint 0
+// interrupt with the out-packet-ready bit set. If the setup token
+// was sent while a previous control operation was also in progress
+// then the setup-end bit will be set as well.
+//
+// 3) the eight-byte packet is described in section 9.3 of the USB spec.
+// The first byte holds three fields, with the top bit indicating the
+// direction of subsequent data transfer. There are also two bytes
+// specifying the size of the subsequent transfer. Obviously the
+// packet also contains information such as the request type.
+//
+// If the specified size is zero then the endpoint will remain in
+// its idle state. Otherwise the endpoint will switch to either
+// IN or OUT state, depending on the direction of subsequent
+// transfers.
+//
+// 4) some standard control operations can be handled by the code
+// here. Set-address involves poking the address register and
+// a change of state. Set-feature and clear-feature on the
+// data endpoints can be used in conjunction with endpoint-halt.
+// Get-status on the data endpoints tests the halt condition.
+// It is also possible for the hardware-specific code to
+// implement set-feature, clear-feature and get-status
+// for the device as a whole since the SA11x0 always has to
+// be self-powered and is incapable of initiating a remote
+// wakeup.
+//
+// Other standard control operations will be handled by the
+// application-specific installed handler, if any, or by the
+// default handler usbs_handle_standard_control(). Class-specific
+// and vendor-specific functions require appropriate handlers to be
+// installed as well, If a particular request is not recognized
+// then a stall condition should be raised. This will not prevent
+// subsequent control operations, just the current one.
+//
+// Data transfers on endpoint 0 involve at most eight bytes at
+// a time. More data will only be accepted if the out-packet-ready
+// bit has been cleared via the serviced-opr bit, with the
+// hardware nak'ing OUT requests. To send data back to the host
+// the FIFO should be filled and then the in-packet-ready bit
+// should be set.
+//
+// It looks like processing all control packets at DSR level should be
+// sufficient. During the data phase the hardware will NAK IN and
+// OUT requests if the fifo is still empty/full, so timing is not
+// an issue. Timing after receipt of the initial control message
+// may be more important, e.g. the 50ms upper limit on processing
+// the set-address control message, but this should still be ok.
+// This decision may have to be re-examined in the light of
+// experience.
+
+// Init may get called during system startup or following a reset.
+// During startup no work is needed since the hardware will
+// have been reset and everything should be fine. After a reset
+// the hardware will also be ok but there may be state information
+// in ep0 that needs to be reset.
+static void
+usbs_sa11x0_ep0_init(void)
+{
+ if ((EP0_STATE_IDLE != ep0.ep_state) &&
+ ((usbs_control_return (*)(usbs_control_endpoint*, int)) 0 != ep0.common.complete_fn)) {
+ (*ep0.common.complete_fn)(&ep0.common, -EPIPE);
+ }
+ ep0.common.state = USBS_STATE_POWERED;
+ memset(ep0.common.control_buffer, 0, 8);
+ ep0.common.buffer = (unsigned char*) 0;
+ ep0.common.buffer_size = 0;
+ ep0.common.fill_buffer_fn = (void (*)(usbs_control_endpoint*)) 0;
+ ep0.common.fill_data = (void*) 0;
+ ep0.common.fill_index = 0;
+ ep0.common.complete_fn = (usbs_control_return (*)(usbs_control_endpoint*, int)) 0;
+ ep0.ep_state = EP0_STATE_IDLE;
+ ep0.length = 0;
+ ep0.transmitted = 0;
+}
+
+// The start function is called by higher-level code when things have
+// been set up, i.e. the enumeration data is available, appropriate
+// handlers have been installed for the different types of control
+// messages, and communication with the host is allowed to start. The
+// next event that should happen is a reset operation from the host,
+// so all other interrupts should be blocked. However it is likely
+// that the hardware will detect a suspend state before the reset
+// arrives, and hence the reset will act as a resume as well as a
+// reset.
+static void
+usbs_sa11x0_ep0_start(usbs_control_endpoint* endpoint)
+{
+ CYG_ASSERT( endpoint == &ep0.common, "USB startup involves the wrong endpoint");
+
+ // Activate the hardware. Write a 0 to the enable/disable bit 0.
+ // Bit 1 is read-only. The other bits are set to 1 to disable
+ // the corresponding interrupt source.
+ usbs_sa11x0_poke(USBS_CONTROL, CONTROL_ALL_INTR, CONTROL_ALL_INTR, 0);
+
+ // If there is additional platform-specific initialization to
+ // perform, do it now. This macro can come from the platform HAL.
+#ifdef SA11X0_USB_PLATFORM_INIT
+ SA11X0_USB_PLATFORM_INIT;
+#endif
+
+ // Clear any pending interrupts. There should not be any, but just
+ // in case. Note: passing 0x00FF as the should_be_clear argument
+ // is a race condition, an external event can happen at any time,
+ // so we may loop unnecessarily and lose an interrupt. However
+ // the initial reset should last for 10ms.
+ usbs_sa11x0_poke(USBS_STATUS, 0x00FF, 0x00, 0x00FF);
+
+ // The only interrupt really of interest right now is reset, but
+ // it is likely to be preceded by a resume.
+ usbs_sa11x0_poke(USBS_CONTROL,
+ CONTROL_INTR_ENABLE(CONTROL_RESET_INTR | CONTROL_RESUME_INTR),
+ 0,
+ CONTROL_INTR_CLEAR(CONTROL_RESET_INTR | CONTROL_RESUME_INTR));
+}
+
+
+// Filling the fifo with a reply to the host. This can be called
+// immediately at the end of a control message, to prepare for
+// the next IN token. It will also get called after each subsequent
+// IN operation when the fifo has been emptied.
+//
+// Experiments have indicated serious problems with the control fifo:
+// some writes to the fifo just get lost completely. The failure rate
+// is sufficiently high that more often than not the host will be
+// unable to read all the enumeration data. However, the write-count
+// register appears to give a valid indication of the current fifo
+// contents. This means the code can retry stuffing a particular byte
+// into the fifo until the write-count goes up.
+
+static void
+usbs_sa11x0_ep0_fill_fifo(void)
+{
+ cyg_bool ok = true;
+ int filled = 0;
+ int max;
+ int fifo_count = *EP0_WRITE_COUNT;
+ int bits_to_set = 0;
+
+ // The host can interrupt the current control message at any time
+ // with a new one. In practice this is unlikely, things could get
+ // rather confused on the host side. However if a control message
+ // has been received then the fifo should obviously not be filled.
+ // A new control message is indicated by the SETUP_END bit.
+ //
+ // The hardware design means that there is a race condition: the
+ // new control message can come in at any time, even in the middle
+ // of filling the fifo. Checking the SETUP_END more often would
+ // reduce the probability of things getting messed up, but not
+ // eliminate it.
+ //
+ // There is a check for SETUP_END at the start of the DSR, so
+ // the setting of this bit should have resulted in another ISR
+ // and another DSR being scheduled. Hence there is no need for
+ // special action here.
+ if (0 != (*EP0_CONTROL & EP0_SETUP_END)) {
+ DBG(("EP0_fill_fifo(), interrupted by SETUP_END\n"));
+ return;
+ }
+
+ // There should never be any data in the fifo. Any such data could
+ // be the remnant of a previous transfer to the host, but that
+ // should all have gone out already. Alternatively it could be
+ // incoming data, but that means a new control message.
+ if (0 != fifo_count) {
+ DBG(("EP0_fill_fifo(), fifo already contains %d bytes", fifo_count));
+ return;
+ }
+
+ // The IN_READY bit should never be set on entry. It can only get
+ // set by a previous call to fill_fifo(), and the data should
+ // have gone out before we get back here.
+ if (0 != (*EP0_CONTROL & EP0_IN_READY)) {
+ DBG(("EP0 fill_fifo(), in-packet-ready bit already set, state %x\n", *EP0_CONTROL));
+ return;
+ }
+
+ // Now put up to another eight bytes into the fifo.
+ max = ((ep0.length - ep0.transmitted) > EP0_FIFO_SIZE) ? EP0_FIFO_SIZE : (ep0.length - ep0.transmitted);
+ while (ok && (filled < max)) {
+ if (0 != ep0.common.buffer_size) {
+ int datum;
+ int retries, checks;
+ cyg_bool written;
+
+ datum = *ep0.common.buffer++;
+ ep0.common.buffer_size--;
+ written = false;
+
+ for (retries = 0; ok && !written && (retries < MAX_RETRIES); retries++) {
+ if (filled != *EP0_WRITE_COUNT) {
+ DBG(("EP0 fill_fifo, inconsistency, written %d but write count %d\n", filled, *EP0_WRITE_COUNT));
+ ok = false;
+ }
+ *EP0_DATA = datum;
+ // The write-count may take a few cycles to settle down.
+ for (checks = 0; !written && (checks < MAX_CHECKS); checks++) {
+ if (filled < *EP0_WRITE_COUNT) {
+ filled++;
+ written = true;
+ // DBG(("Transferred %d byte (%x) after %d checks, %d retries\n", filled - 1, datum, checks, retries));
+ }
+ }
+ }
+ } else if ((void (*)(usbs_control_endpoint*))0 != ep0.common.fill_buffer_fn) {
+ (*ep0.common.fill_buffer_fn)(&ep0.common);
+ } else {
+ break;
+ }
+ }
+
+ // At this point either it has proved impossible to fill the fifo,
+ // e.g. because of a new control message, or up to another eight
+ // bytes have been sent.
+ if (!ok) {
+ if (0 == (EP0_SETUP_END & *EP0_CONTROL)) {
+ // There is something seriously wrong.
+ DBG(("ep0_fill_fifo(), failed, only filled %d bytes, status %x\n", filled, *EP0_CONTROL));
+ usbs_sa11x0_poke(EP0_CONTROL, EP0_FORCE_STALL, EP0_FORCE_STALL, 0);
+ }
+ return;
+ }
+
+ // The following conditions are possible:
+ // 1) amount transferred == amount requested, transfer complete.
+ // 2) amount transferred < amount requested, this fill involved
+ // <eight bytes, transfer complete by definition of the protocol.
+ // 3) amount transferred < amount requested but exactly eight
+ // bytes were sent this time. It will be necessary to send
+ // another packet of zero bytes to complete the transfer.
+ ep0.transmitted += filled;
+ if ((ep0.transmitted == ep0.length) || (filled < EP0_FIFO_SIZE)) {
+
+ ep0.ep_state = EP0_STATE_IDLE;
+ if ((usbs_control_return (*)(usbs_control_endpoint*, int))0 != ep0.common.complete_fn) {
+ (void) (*ep0.common.complete_fn)(&ep0.common, 0);
+ }
+ ep0.common.buffer = (unsigned char*) 0;
+ ep0.common.buffer_size = 0;
+ ep0.common.fill_buffer_fn = (void (*)(usbs_control_endpoint*)) 0;
+
+ // This informs the hardware that the control message has been
+ // handled.
+ bits_to_set = EP0_DATA_END;
+ }
+
+ // This allows another IN operation to empty the fifo.
+ bits_to_set |= EP0_IN_READY;
+ usbs_sa11x0_poke(EP0_CONTROL, bits_to_set, bits_to_set, 0);
+}
+
+// Another utility function to empty the fifo. This involves similar
+// hardware problems to writing, it is possible to read a byte without
+// changing the fifo state so that next time the same byte would be
+// read again. Again there is a possible race condition if another
+// control message arrives while emptying the fifo.
+static int
+usbs_sa11x0_ep0_empty_fifo(unsigned char* buf)
+{
+ int count = *EP0_WRITE_COUNT & 0x00FF;
+ int emptied = 0;
+ cyg_bool ok = true;
+
+ CYG_ASSERT( (count >= 0) & (count <= 8), "EP0 write count must be in range");
+
+ while (ok && (emptied < count)) {
+ int retries, checks;
+ cyg_bool read = false;
+
+ for (retries = 0; !read && (retries < MAX_RETRIES); retries++) {
+ if ((count - emptied) != *EP0_WRITE_COUNT) {
+ DBG(("EP0_empty_fifo, inconsistency, read %d bytes of %d, but fifo count %d\n", emptied, count, *EP0_WRITE_COUNT));
+ ok = false;
+ } else {
+ buf[emptied] = *EP0_DATA;
+ for (checks = 0; !read && (checks < MAX_CHECKS); checks++) {
+ if ((count - emptied) > *EP0_WRITE_COUNT) {
+ //DBG(("Read %d byte (%x) after %d checks, %d retries\n", emptied, buf[emptied], checks, retries));
+ read = true;
+ emptied++;
+ }
+ }
+ }
+ }
+ if (ok && !read) {
+ DBG(("EP0 empty fifo, failed to read byte from fifo\n"));
+ ok = false;
+ }
+ }
+
+ return emptied;
+}
+
+// This is where all the hard work happens. It is a very large routine
+// for a DSR, but in practice nearly all of it is nested if's and very
+// little code actually gets executed. Note that there may be
+// invocations of callback functions and the driver has no control
+// over how much time those will take, but those callbacks should be
+// simple.
+static void
+usbs_sa11x0_ep0_dsr(void)
+{
+ int hw_state = *EP0_CONTROL;
+
+ // Handle the stall bits.
+ //
+ // Force-stall should not be a problem. It is set by the code here
+ // if the host needs to be told that the control message was
+ // unacceptable and is cleared automatically by the hardware after
+ // the stall is sent.
+ // NOTE: it is not clear the hardware actually works in this
+ // respect. The FORCE_STALL bit has been observed still set during
+ // the next interrupt, and the host appears to receive spurious
+ // data back in response to the next control packet.
+ //
+ // Sent-stall is set by the hardware following a protocol
+ // violation, e.g. if there is an IN token when a new control
+ // message is expected. There is nothing the software can do about
+ // this. However if we are in the middle of an IN or OUT transfer
+ // then those are not going to complete successfully.
+ if (0 != (hw_state & EP0_SENT_STALL)) {
+ if (EP0_STATE_IDLE != ep0.ep_state) {
+ if ((usbs_control_return (*)(usbs_control_endpoint*, int))0 != ep0.common.complete_fn) {
+ (*ep0.common.complete_fn)(&ep0.common, -EIO);
+ }
+ ep0.ep_state = EP0_STATE_IDLE;
+ ep0.common.buffer = (unsigned char*) 0;
+ ep0.common.buffer_size = 0;
+ ep0.common.fill_buffer_fn = 0;
+ ep0.common.complete_fn = (usbs_control_return (*)(usbs_control_endpoint*, int)) 0;
+ }
+ usbs_sa11x0_poke(EP0_CONTROL, EP0_SENT_STALL, 0, EP0_SENT_STALL);
+ } // STALL condition
+
+ // Next, check whether we have received a new control message
+ // while still busy processing an old one.
+ if (0 != (hw_state & EP0_SETUP_END)) {
+ if (EP0_STATE_IDLE != ep0.ep_state) {
+ if ((usbs_control_return (*)(usbs_control_endpoint*, int)) 0 != ep0.common.complete_fn) {
+ (*ep0.common.complete_fn)(&ep0.common, -EIO);
+ }
+ ep0.ep_state = EP0_STATE_IDLE;
+ ep0.common.buffer = (unsigned char*) 0;
+ ep0.common.buffer_size = 0;
+ ep0.common.fill_buffer_fn = 0;
+ ep0.common.complete_fn = (usbs_control_return (*)(usbs_control_endpoint*, int)) 0;
+ }
+ // We are now back in idle state so the control message will be
+ // extracted and processed.
+ usbs_sa11x0_poke(EP0_CONTROL, EP0_SERVICED_SETUP_END, 0, EP0_SETUP_END);
+ } // Interrupted control transaction
+
+ // The endpoint can be in one of three states: IN, OUT, or IDLE.
+ // For the first two it should mean that there is more data to be
+ // transferred, which is pretty straightforward. IDLE means
+ // that a new control message has arrived.
+ if ((EP0_STATE_IN == ep0.ep_state) && (0 == (EP0_IN_READY & hw_state))) {
+
+ usbs_sa11x0_ep0_fill_fifo();
+
+ } else if ((EP0_STATE_OUT == ep0.ep_state) && (0 != (EP0_OUT_READY & hw_state))) {
+
+ // A host->device transfer. Higher level code must have
+ // provided a suitable buffer.
+ CYG_ASSERT( (unsigned char*)0 != ep0.common.buffer, "A receive buffer should have been provided" );
+
+ ep0.transmitted += usbs_sa11x0_ep0_empty_fifo(ep0.common.buffer + ep0.transmitted);
+
+ if (ep0.transmitted != ep0.length) {
+ // The host is not allowed to send more data than it
+ // indicated in the original control message, and all
+ // messages until the last one should be full size.
+ CYG_ASSERT( ep0.transmitted < ep0.length, "The host must not send more data than expected");
+ CYG_ASSERT( 0 == (ep0.transmitted % EP0_FIFO_SIZE), "All OUT packets until the last one should be full-size");
+
+ usbs_sa11x0_poke(EP0_CONTROL, EP0_SERVICED_OPR, 0, EP0_OUT_READY);
+ } else {
+ // The whole transfer is now complete. Invoke the
+ // completion function, and based on its return value
+ // either generate a stall or complete the message.
+ usbs_control_return result;
+
+ CYG_ASSERT( (usbs_control_return (*)(usbs_control_endpoint*, int))0 != ep0.common.complete_fn, \
+ "A completion function should be provided for OUT control messages");
+
+ result = (*ep0.common.complete_fn)(&ep0.common, 0);
+ ep0.common.buffer = (unsigned char*) 0;
+ ep0.common.buffer_size = 0;
+ ep0.common.complete_fn = (usbs_control_return (*)(usbs_control_endpoint*, int)) 0;
+
+ if (USBS_CONTROL_RETURN_HANDLED == result) {
+ usbs_sa11x0_poke(EP0_CONTROL,
+ EP0_SERVICED_OPR | EP0_DATA_END,
+ EP0_DATA_END,
+ EP0_OUT_READY);
+ } else {
+ usbs_sa11x0_poke(EP0_CONTROL,
+ EP0_SERVICED_OPR | EP0_DATA_END | EP0_FORCE_STALL,
+ EP0_FORCE_STALL,
+ EP0_OUT_READY);
+ }
+ // Also remember to switch back to IDLE state
+ ep0.ep_state = EP0_STATE_IDLE;
+ }
+
+ } else if (0 != (EP0_OUT_READY & hw_state)) {
+
+ int emptied = usbs_sa11x0_ep0_empty_fifo(ep0.common.control_buffer);
+
+ if (8 != emptied) {
+ // This indicates a serious problem somewhere. Respond by
+ // stalling. Hopefully the host will take some action that
+ // sorts out the mess.
+ usbs_sa11x0_poke(EP0_CONTROL,
+ EP0_SERVICED_OPR | EP0_DATA_END | EP0_FORCE_STALL,
+ EP0_FORCE_STALL,
+ EP0_OUT_READY);
+
+ } else {
+ usbs_control_return result = USBS_CONTROL_RETURN_UNKNOWN;
+ usb_devreq* req = (usb_devreq*) ep0.common.control_buffer;
+ int length, direction, protocol, recipient;
+
+ // Now we need to do some decoding of the data. A non-zero
+ // length field indicates that there will be a subsequent
+ // IN or OUT phase. The direction is controlled by the
+ // top bit of the first byte. The protocol is determined
+ // by other bits of the top byte.
+ length = (req->length_hi << 8) | req->length_lo;
+ direction = req->type & USB_DEVREQ_DIRECTION_MASK;
+ protocol = req->type & USB_DEVREQ_TYPE_MASK;
+ recipient = req->type & USB_DEVREQ_RECIPIENT_MASK;
+
+#if 0
+ DBG(("ep0, new control request: type %x, code %x\n", req->type, req->request));
+ DBG((" %s, length %d, value hi %x lo %x, index hi %x lo %x\n",
+ (USB_DEVREQ_DIRECTION_OUT == direction) ? "out" : "in",
+ length, req->value_hi, req->value_lo, req->index_hi, req->index_lo));
+#endif
+ if (0 != length){
+ // Clear the fifo straightaway. There is no harm in
+ // doing this here. It may or may not do some good.
+ usbs_sa11x0_poke(EP0_CONTROL, EP0_SERVICED_OPR, 0, EP0_OUT_READY);
+ }
+
+ if (USB_DEVREQ_TYPE_STANDARD == protocol) {
+
+ // First see if the request can be handled entirely in
+ // this module.
+ if (USB_DEVREQ_SET_ADDRESS == req->request) {
+ // The USB device address should be in value_lo.
+ // No more data is expected.
+ int address = req->value_lo;
+ if ((0 != length) || (address > 127)) {
+ result = USBS_CONTROL_RETURN_STALL;
+ } else {
+ // poke_value() cannot be used here because
+ // setting the address does not take effect
+ // until the status phase.
+ *USBS_ADDRESS = address;
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+ } else if (USB_DEVREQ_GET_STATUS == req->request) {
+ // GET_STATUS on the device as a whole is used to
+ // check the remote-wakeup and self-powered bits.
+ // GET_STATUS on an endpoint is used to determine
+ // the halted condition.
+ // GET_STATUS on anything else has to be left to
+ // other code.
+ if (USB_DEVREQ_RECIPIENT_DEVICE == recipient) {
+ // The host should expect two bytes back.
+ if ((2 == length) && (USB_DEVREQ_DIRECTION_IN == direction)) {
+ ep0.common.control_buffer[0] = 0; // Not self-powered, no remote wakeup
+ ep0.common.control_buffer[1] = 0;
+ ep0.common.buffer = ep0.common.control_buffer;
+ ep0.common.buffer_size = 2;
+ result = USBS_CONTROL_RETURN_HANDLED;
+ } else {
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+
+ } else if (USB_DEVREQ_RECIPIENT_ENDPOINT == recipient) {
+ if ((2 == length) && (USB_DEVREQ_DIRECTION_IN == direction)) {
+ int endpoint = req->index_lo;
+ if (0 == endpoint) {
+ // get-status on endpoint 0 is either undefined or always valid.
+ // endpoint 0 is always up.
+ ep0.common.control_buffer[0] = 0;
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP1
+ else if (((USB_DEVREQ_INDEX_DIRECTION_OUT | 1) == endpoint) &&
+ (USBS_STATE_CONFIGURED == (ep0.common.state & USBS_STATE_MASK))) {
+
+ ep0.common.control_buffer[0] = ep1.common.halted;
+ result = USBS_CONTROL_RETURN_HANDLED;
+
+ }
+#endif
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP2
+ else if (((USB_DEVREQ_INDEX_DIRECTION_IN | 2) == endpoint) &&
+ (USBS_STATE_CONFIGURED == (ep0.common.state & USBS_STATE_MASK))) {
+
+ ep0.common.control_buffer[0] = ep2.common.halted;
+ result = USBS_CONTROL_RETURN_HANDLED;
+
+ }
+#endif
+ else {
+ // An invalid endpoint has been specified or the
+ // endpoint can only be examined in configured state.
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+ if (USBS_CONTROL_RETURN_HANDLED == result) {
+ ep0.common.control_buffer[1] = 0;
+ ep0.common.buffer = ep0.common.control_buffer;
+ ep0.common.buffer_size = 2;
+ }
+ } else {
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+ } // Endpoint or device get-status
+
+ } else if (USB_DEVREQ_CLEAR_FEATURE == req->request) {
+
+ // CLEAR_FEATURE operates in much the same way as
+ // GET_STATUS
+ if (USB_DEVREQ_RECIPIENT_DEVICE == recipient) {
+
+ // No data should be transferred, and only remote-wakeup can be cleared.
+ if ((0 != length) || (USB_DEVREQ_FEATURE_DEVICE_REMOTE_WAKEUP != req->value_lo)) {
+ result = USBS_CONTROL_RETURN_STALL;
+ } else {
+ // Clearing remote-wakeup is a no-op.
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+
+ } else if (USB_DEVREQ_RECIPIENT_ENDPOINT == recipient) {
+ // The only feature that can be cleared is endpoint-halt, no data should be transferred.
+ if ((0 != length) || (USB_DEVREQ_FEATURE_ENDPOINT_HALT != req->value_lo)) {
+ result = USBS_CONTROL_RETURN_STALL;
+ } else {
+ int endpoint = req->index_lo;
+ if (0 == endpoint) {
+ // Clearing halt on endpoint 0 is always a no-op since that endpoint cannot be halted
+ }
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP1
+ else if (((USB_DEVREQ_INDEX_DIRECTION_OUT | 1) == endpoint) &&
+ (USBS_STATE_CONFIGURED == (ep0.common.state & USBS_STATE_MASK))) {
+ ep1_set_halted(&ep1.common, false);
+ result = USBS_CONTROL_RETURN_HANDLED;
+
+ }
+#endif
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP2
+ else if (((USB_DEVREQ_INDEX_DIRECTION_IN | 2) == endpoint) &&
+ (USBS_STATE_CONFIGURED == (ep0.common.state & USBS_STATE_MASK))) {
+ ep2_set_halted(&ep2.common, false);
+ result = USBS_CONTROL_RETURN_HANDLED;
+
+ }
+#endif
+ else {
+ // Invalid endpoint or not in configured state.
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+ }
+ } // Endpoing or device clear-feature
+
+ } else if (USB_DEVREQ_SET_FEATURE == req->request) {
+
+ // SET_FEATURE also operates in much the same way as
+ // GET_STATUS
+ if (USB_DEVREQ_RECIPIENT_DEVICE == recipient) {
+
+ // The only valid feature that can be set is remote-wakeup,
+ // which is not supported by the hardware.
+ result = USBS_CONTROL_RETURN_STALL;
+
+ } else if (USB_DEVREQ_RECIPIENT_ENDPOINT == recipient) {
+
+ // Only the halt condition can be set, and no data should be transferred.
+ // Halting endpoint 0 should probably be disallowed although the
+ // standard does not explicitly say so.
+ if ((0 != length) ||
+ (USB_DEVREQ_FEATURE_ENDPOINT_HALT != req->value_lo) ||
+ (USBS_STATE_CONFIGURED != (ep0.common.state & USBS_STATE_MASK))) {
+
+ result = USBS_CONTROL_RETURN_STALL;
+
+ } else {
+ int endpoint = req->index_lo;
+ if (0) {
+ }
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP1
+ else if ((USB_DEVREQ_INDEX_DIRECTION_OUT | 1) == endpoint) {
+ ep1_set_halted(&ep1.common, true);
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+#endif
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP2
+ else if ((USB_DEVREQ_INDEX_DIRECTION_IN | 2) == endpoint) {
+ ep2_set_halted(&ep2.common, true);
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+#endif
+ else {
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+ }
+ } // Endpoint or device set-feature
+ }
+
+ // If the result has not been handled yet, pass it to
+ // the installed callback function (if any).
+ if (USBS_CONTROL_RETURN_UNKNOWN == result) {
+ if ((usbs_control_return (*)(usbs_control_endpoint*, void*))0 != ep0.common.standard_control_fn) {
+ result = (*ep0.common.standard_control_fn)(&ep0.common, ep0.common.standard_control_data);
+ }
+ }
+
+#if 1
+ if ((USBS_CONTROL_RETURN_UNKNOWN == result) &&
+ (USB_DEVREQ_SET_INTERFACE == req->request)) {
+
+ // This code should not be necessary. For
+ // non-trivial applications which involve
+ // alternate interfaces and the like, this request
+ // should be handled by the application itself.
+ // For other applications, the default handler
+ // will ignore this request so we end up falling
+ // through without actually handling the request
+ // and hence returning a stall condition. That
+ // is legitimate behaviour according to the standard.
+ //
+ // However, there are appear to be problems with
+ // the SA1110 USB hardware when it comes to stall
+ // conditions: they appear to affect some
+ // subsequent messages from target to host as
+ // well. Hence rather than returning a stall
+ // condition this code instead generates a dummy
+ // reply, which is also valid according to the
+ // standard. This avoids complications with certain
+ // USB compliance testers.
+ if ((0 != length) ||
+ (0 != req->value_hi) || (0 != req->index_hi) ||
+ (USBS_STATE_CONFIGURED != (ep0.common.state & USBS_STATE_MASK))) {
+
+ result = USBS_CONTROL_RETURN_STALL;
+ } else {
+ int interface_id;
+ int alternate;
+
+ CYG_ASSERT( (1 == ep0.common.enumeration_data->device.number_configurations) && \
+ (1 == ep0.common.enumeration_data->total_number_interfaces), \
+ "Higher level code should have handled this request");
+
+ interface_id = req->index_lo;
+ alternate = req->value_lo;
+ if ((interface_id != ep0.common.enumeration_data->interfaces[0].interface_id) ||
+ (alternate != ep0.common.enumeration_data->interfaces[0].alternate_setting)) {
+
+ result = USBS_CONTROL_RETURN_STALL;
+ } else {
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+
+ }
+ }
+#endif
+
+ // If the result has still not been handled, leave it to
+ // the default implementation in the USB slave common package
+ if (USBS_CONTROL_RETURN_UNKNOWN == result) {
+ result = usbs_handle_standard_control(&ep0.common);
+ }
+
+ } else {
+ // The other three types of control message can be
+ // handled by similar code.
+ usbs_control_return (*callback_fn)(usbs_control_endpoint*, void*);
+ void* callback_arg;
+ //DBG(("non-standard control request %x", req->request));
+
+ if (USB_DEVREQ_TYPE_CLASS == protocol) {
+ callback_fn = ep0.common.class_control_fn;
+ callback_arg = ep0.common.class_control_data;
+ } else if (USB_DEVREQ_TYPE_VENDOR == protocol) {
+ callback_fn = ep0.common.vendor_control_fn;
+ callback_arg = ep0.common.vendor_control_data;
+ } else {
+ callback_fn = ep0.common.reserved_control_fn;
+ callback_arg = ep0.common.reserved_control_data;
+ }
+
+ if ((usbs_control_return (*)(usbs_control_endpoint*, void*)) 0 == callback_fn) {
+ result = USBS_CONTROL_RETURN_STALL;
+ } else {
+ result = (*callback_fn)(&ep0.common, callback_arg);
+ }
+ }
+ //DBG(("Control request done, %d\n", result));
+
+ if (USBS_CONTROL_RETURN_HANDLED != result) {
+ // This control request cannot be handled. Generate a stall.
+ usbs_sa11x0_poke(EP0_CONTROL,
+ EP0_FORCE_STALL | EP0_SERVICED_OPR | EP0_DATA_END,
+ EP0_FORCE_STALL,
+ EP0_OUT_READY);
+ } else {
+ // The control request has been handled. Is there any more
+ // data to be transferred?
+ if (0 == length) {
+ usbs_sa11x0_poke(EP0_CONTROL,
+ EP0_SERVICED_OPR | EP0_DATA_END,
+ EP0_DATA_END,
+ EP0_OUT_READY);
+ } else {
+ // The endpoint should now go into IN or OUT mode while the
+ // remaining data is transferred.
+ ep0.transmitted = 0;
+ ep0.length = length;
+ if (USB_DEVREQ_DIRECTION_OUT == direction) {
+ // Wait for the next packet from the host.
+ ep0.ep_state = EP0_STATE_OUT;
+ CYG_ASSERT( (unsigned char*) 0 != ep0.common.buffer, "A receive buffer should have been provided");
+ CYG_ASSERT( (usbs_control_return (*)(usbs_control_endpoint*, int))0 != ep0.common.complete_fn, \
+ "A completion function should be provided for OUT control messages");
+ } else {
+ ep0.ep_state = EP0_STATE_IN;
+ usbs_sa11x0_ep0_fill_fifo();
+ }
+ }
+ } // Control message handled
+ } // Received 8-byte control message
+ } // Idle state, i.e. control message
+} // ep0_dsr
+
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP1
+// ----------------------------------------------------------------------------
+// Endpoint 1 is used for OUT transfers, i.e. receive operations. Only
+// the bulk protocol is supported by the hardware. The semantics allow
+// for two different modes of operation: higher-level code can ask for
+// exactly one or more bulk packets of 64 bytes each, allowing buffer
+// requirements to be determined from a header; alternatively the
+// rx request can just supply a large buffer. Processing the first
+// packet of a larger transfer separately does not introduce any
+// special problems at the protocol level.
+//
+// It is not legal to receive just part of a packet and expect the
+// hardware or the driver to buffer the rest. Not all hardware will
+// be capable of doing this buffering, and there should not be
+// a driver design requirement to provide buffering space.
+//
+//
+// The hardware design for endpoint 1 is flawed in a number of
+// respects. The receive fifo is only 20 bytes, less than the packet
+// size, so it is essential to use DMA (there is a configuration
+// option to allow for communication protocols where packets will
+// never exceed 16 bytes, but that is not the normal case). The DMA
+// engine is triggered by a receive-fifo-service high-water mark
+// bit. DMA transfers operate in bursts of eight bytes. Therefore
+// it would make sense if the high-water mark was set when the
+// receive fifo contained eight bytes or more.
+//
+// Instead the high-water mark is set when the fifo contains twelve
+// bytes or more. Worse, there is no way of measuring how many bytes
+// there are left in the fifo without actually extracting those bytes.
+//
+// For a full-size 64-byte packet, the first 56 bytes will be
+// transferred by DMA and the remainder will remain in the fifo. For a
+// partial packet of between 56 and 63 bytes, the first 56 bytes will
+// be transferred by DMA and the remainder will remain in the fifo. There
+// is no way to distinguish between these scenarios without emptying
+// the fifo.
+//
+// The result is that there is never any point in attempting a DMA
+// transfer of more than 56 bytes, and for every endpoint 1 interrupt
+// it is necessary to read the remainder from the fifo. This adds
+// a lot of software overhead, and it is not clear that DMA is
+// particularly useful. It is still necessary because of the limited
+// fifo size.
+//
+//
+// Because DMA involves the use of physical rather than virtual
+// memory, there are also cache interaction problems. Specifically it
+// would be necessary to invalidate cache lines after a DMA transfer
+// has completed, but that only works sensibly if the buffer is
+// aligned to a cache-line boundary and is a multiple of the
+// cache-line size. Imposing such restrictions on higher-level code
+// is undesirable. Also the DMA engines have an apparently undocumented
+// restriction that the buffer must be eight-byte aligned.
+//
+// To work around all these problems, the receive code works in terms
+// of a small private buffer. After a packet has been received, data
+// will be copied from this private buffer to the destination. Obviously
+// this copy operation is overhead and, because the code is expected
+// to run at DSR level, However the copy operation is limited to at
+// most 64 bytes, which is not good but not disastrous either.
+//
+// For data transfers the entry points are:
+//
+// 1) ep1_start_rx_packet() - prepare to receive another packet from
+// the host.
+// 2) ep1_clear_error() - an error condition has occurred (CRC,
+// bit-stuffing, fifo overrun). It appears that the only way
+// to clear this is to clear the receive-packet-complete bit,
+// which unfortunately allows in another packet from the host
+// before we are ready for it. Doing anything else while
+// the error bit is set does not work, for example it is not
+// possible to empty the fifo by hand.
+// 3) ep1_process_packet() - a whole packet has been received
+// and now needs to be moved into application space.
+//
+// These three routines are called by the start_rx() routine and
+// by the DSR. There are different implementations for DMA and
+// non-DMA.
+//
+// There is another hardware problem: the receive-packet-complete bit
+// comes up with the wrong default value, allowing the host to start
+// transmitting before the target is ready to receive. Unfortunately
+// there is not much that can be done about this: the
+// receive-packet-complete bit cannot be set by software and the OUT
+// max register has a minimum size of eight bytes. Fortunately for
+// many protocols the target-side code has a chance to start a receive
+// before the host is allowed to send, so this problem is mostly
+// ignored for now.
+//
+// Another potential problem arises if the host sends more data than
+// is expected for a given transfer. It would be possible to address
+// this by manipulating the OUT max packet register and getting the
+// hardware to generate protocol violation stalls. This would also
+// eliminate the need to test for buffer overflows. For now it is
+// left to higher-level code to sort it all out.
+
+#ifdef CYGNUM_DEVS_USB_SA11X0_EP1_DMA_CHANNEL
+
+// DMA needs an area of physical memory. To avoid conflicts with
+// the cached shadow of this memory, this area needs to start at
+// a cache line boundary and there must be padding at the end
+// to the next cache line boundary, thus ensuring that the
+// processor will not accidentally overwrite the physical
+// memory because it is manipulating some other variable.
+//
+// NOTE: at the time of writing the toolchain has a problem with
+// the aligned attribute, so instead the start alignment has
+// to be handled in software.
+
+# define EP1_DMA_MTU 56
+# define EP1_DMA_BUFSIZE ((EP1_DMA_MTU + HAL_DCACHE_LINE_SIZE - 1) - \
+ ((EP1_DMA_MTU + HAL_DCACHE_LINE_SIZE - 1) % HAL_DCACHE_LINE_SIZE))
+# define EP1_DMA_ALLOCSIZE (EP1_DMA_BUFSIZE + HAL_DCACHE_LINE_SIZE - 1)
+
+static unsigned char ep1_dma_data[EP1_DMA_ALLOCSIZE];
+
+// This variable cannot be initialized statically, instead it is
+// set by ep1_init(). It corresponds to the physical address
+// for the buffer.
+static unsigned char* ep1_dma_buf;
+
+static void
+ep1_start_rx_packet(void)
+{
+ int dma_size = EP1_DMA_MTU;
+
+ // This assertion does not always hold: clearing an error condition
+ // involves the packet-complete bit so another message may have
+ // started to arrive.
+ // CYG_ASSERT( 0 == (EP1_FIFO_NOT_EMPTY & *EP1_CONTROL), "The receive fifo should be empty");
+
+ CYG_ASSERT( 0 == ((DMA_CONTROL_RUN | DMA_CONTROL_START_A) & *EP1_DMA_STATUS), "EP1 DMA should be inactive");
+
+#ifdef FAILURES
+ ep1_failure = (ep1_failure + 1) % 32;
+ if (0 == ep1_failure) {
+ dma_size = 8;
+ }
+#endif
+
+ // The full flexibility of the DMA engines is not required here,
+ // specifically the automatic chaining between buffers A and B.
+ // Instead always using buffer A is sufficient. To avoid the
+ // However the hardware still requires the software to alternate
+ // between A and B. To avoid switching between buffers during a
+ // transfer an excessive size field is used, EP1_MTU rather than
+ // EP1_DMA_MTU, and hence the DMA transfer will never complete.
+ //
+ // With some silicon revisions writing to the DMA registers does
+ // not always work either, so a retry is in order. Possibly
+ // some short delays immediately after the clear and before the
+ // set would be sufficient.
+ *EP1_DMA_CONTROL_CLEAR = DMA_CONTROL_CLEAR_ALL;
+ if (0 == (DMA_STATUS_BUFFER_IN_USE & *EP1_DMA_STATUS)) {
+ ep1.using_buf_a = true;
+ usbs_sa11x0_poke_value(EP1_DMA_BUF_A_ADDRESS, (unsigned int) ep1_dma_buf);
+ usbs_sa11x0_poke_value(EP1_DMA_BUF_A_SIZE, dma_size);
+ *EP1_DMA_CONTROL_SET = DMA_CONTROL_RUN | DMA_CONTROL_START_A;
+ } else {
+ ep1.using_buf_a = false;
+ usbs_sa11x0_poke_value(EP1_DMA_BUF_B_ADDRESS, (unsigned int) ep1_dma_buf);
+ usbs_sa11x0_poke_value(EP1_DMA_BUF_B_SIZE, dma_size);
+ *EP1_DMA_CONTROL_SET = DMA_CONTROL_RUN | DMA_CONTROL_START_B;
+ }
+
+ // This should not be necessary, but occasionally the equivalent
+ // operation during ep1_init() fails. Strictly speaking it should
+ // be calling poke_value(), but the added overheads for that are
+ // not worthwhile.
+ *USBS_OUT_SIZE = EP1_MTU - 1;
+
+ // Now allow the host to send the packet.
+ usbs_sa11x0_poke(EP1_CONTROL, EP1_PACKET_COMPLETE | EP1_SENT_STALL, 0,
+ EP1_PACKET_COMPLETE | EP1_SENT_STALL | EP1_FORCE_STALL);
+}
+
+// Clear an error condition following a CRC, bit stuffing or overrun
+// error. The only reliable way to do this is to halt DMA and clear
+// the packet-complete bit. Unfortunately this allows the host to send
+// another packet immediately, before start_rx_packet can be called,
+// introducing another race condition. The hardware does not appear
+// to offer any alternatives.
+static void
+ep1_clear_error(void)
+{
+ *EP1_DMA_CONTROL_CLEAR = DMA_CONTROL_CLEAR_ALL;
+ usbs_sa11x0_poke(EP1_CONTROL, EP1_PACKET_COMPLETE | EP1_SENT_STALL, 0,
+ EP1_PACKET_COMPLETE | EP1_PACKET_ERROR | EP1_SENT_STALL | EP1_FORCE_STALL | EP1_FIFO_NOT_EMPTY);
+
+ // Clearing the packet-complete bit may cause the host to send
+ // another packet, immediately causing another error, so this
+ // assertion does not hold.
+ // CYG_ASSERT( 0 == (*EP1_CONTROL & (EP1_PACKET_ERROR | EP1_FIFO_NOT_EMPTY)), "Receive error should have been cleared");
+}
+
+// A packet has been received. Some of it may still be in the fifo
+// and must be extracted by hand. The data then has to copied to
+// a higher-level buffer.
+static int
+ep1_process_packet(void)
+{
+ int pkt_size;
+
+ // First, work out how much data has been processed by the DMA
+ // engine. This is the amount originally poked into the size
+ // register minus its current value.
+ *EP1_DMA_CONTROL_CLEAR = DMA_CONTROL_CLEAR_ALL;
+ if (ep1.using_buf_a) {
+ pkt_size = EP1_DMA_MTU - *EP1_DMA_BUF_A_SIZE;
+ } else {
+ pkt_size = EP1_DMA_MTU - *EP1_DMA_BUF_B_SIZE;
+ }
+ CYG_ASSERT( 0 == (pkt_size % DMA_BURST_SIZE), "DMA transfers must be in multiples of the burst size");
+
+ // Move these bytes from physical memory to the target buffer.
+ if ((pkt_size > 0) && ((ep1.fetched + pkt_size) < ep1.common.buffer_size)) {
+ memcpy(ep1.common.buffer + ep1.fetched, ep1_dma_buf, pkt_size);
+ }
+
+ // Copy remaining bytes into the target buffer directly.
+ // The DMA buffer could be used instead, moving the memcpy()
+ // down and avoiding the need for a buffer overflow check
+ // inside the loop, but at the cost of accessing physical
+ // memory every time. That cost is too high.
+ while (1) {
+ int status = *EP1_CONTROL;
+ if ((EP1_PACKET_COMPLETE | EP1_PACKET_ERROR) == ((EP1_PACKET_COMPLETE | EP1_PACKET_ERROR) & status)) {
+ break;
+ } else if (0 == (EP1_FIFO_NOT_EMPTY & status)) {
+ break;
+ } else {
+ int datum = *EP1_DATA;
+ if (ep1.fetched < ep1.common.buffer_size) {
+ ep1.common.buffer[ep1.fetched + pkt_size] = datum;
+ }
+ pkt_size++;
+ }
+ }
+ ep1.fetched += pkt_size;
+ return pkt_size;
+}
+
+#else
+
+// Transfers not involving DMA. Obviously these are much simpler
+// but restricted to packets of 16 bytes.
+static void
+ep1_start_rx_packet(void)
+{
+ // Nothing to be done, just let the host send a packet and it will
+ // end up in the fifo.
+ usbs_sa11x0_poke(EP1_CONTROL, EP1_PACKET_COMPLETE | EP1_SENT_STALL, 0,
+ EP1_PACKET_COMPLETE | EP1_SENT_STALL | EP1_FORCE_STALL);
+}
+
+static void
+ep1_clear_error(void)
+{
+ usbs_sa11x0_poke(EP1_CONTROL, EP1_PACKET_COMPLETE | EP1_SENT_STALL, 0,
+ EP1_PACKET_COMPLETE | EP1_SENT_STALL | EP1_FORCE_STALL);
+}
+
+static int
+ep1_process_packet(void)
+{
+ int pkt_size = 0;
+ while (0 != (*EP1_CONTROL & EP1_FIFO_NOT_EMPTY)) {
+ int datum = *EP1_DATA;
+ pkt_size++;
+ if (ep1.fetched < ep1.common.buffer_size) {
+ ep1.common.buffer[ep1.fetched + pkt_size] = datum;
+ }
+ }
+ return pkt_size;
+}
+#endif
+
+// Complete a transfer. This takes care of invoking the completion
+// callback and resetting the buffer.
+static void
+ep1_rx_complete(int result)
+{
+ void (*complete_fn)(void*, int) = ep1.common.complete_fn;
+ void* complete_data = ep1.common.complete_data;
+
+ ep1.common.buffer = (unsigned char*) 0;
+ ep1.common.buffer_size = 0;
+ ep1.common.complete_fn = (void (*)(void*, int)) 0;
+ ep1.common.complete_data = (void*) 0;
+
+ if ((void (*)(void*, int))0 != complete_fn) {
+ (*complete_fn)(complete_data, result);
+ }
+}
+
+// Start a transmission. This functionality is overloaded to cope with
+// waiting for stalls to complete.
+static void
+ep1_start_rx(usbs_rx_endpoint* endpoint)
+{
+ CYG_ASSERT( endpoint == &ep1.common, "USB data transfer involves the wrong endpoint");
+
+ // Is this endpoint currently stalled? If so then a size of 0 can
+ // be used to block until the stall condition is clear, anything
+ // else should result in an immediate callback.
+ if (ep1.common.halted) {
+ if (0 != ep1.common.buffer_size) {
+ ep1_rx_complete(-EAGAIN);
+ }
+ } else if (0 == ep1.common.buffer_size) {
+ // A check to see if the endpoint is halted. It isn't.
+ ep1_rx_complete(0);
+ } else {
+ int status = *EP1_CONTROL;
+
+ CYG_ASSERT((void*) 0 != ep1.common.buffer, "USB receives should not override the interrupt vectors");
+
+ // This indicates the start of a transfer.
+ ep1.fetched = 0;
+
+ // The sent-stall bit may get set by hardware because of
+ // a protocol violation. If so it must be cleared here.
+ if (0 != (status & EP1_SENT_STALL)) {
+ usbs_sa11x0_poke(EP1_CONTROL, EP1_SENT_STALL, 0, EP1_SENT_STALL | EP1_FORCE_STALL);
+ status = *EP1_CONTROL;
+ }
+
+ // The bogus initial value for the receive-packet-complete
+ // bit means that we may start off with an error condition.
+ if ((EP1_PACKET_COMPLETE | EP1_PACKET_ERROR) == (status & (EP1_PACKET_COMPLETE | EP1_PACKET_ERROR))) {
+ ep1_clear_error();
+ ep1_start_rx_packet();
+ } else if (0 != (status & EP1_FIFO_NOT_EMPTY)) {
+ // No error but data in the fifo. This implies a small
+ // initial packet, all held in the fifo.
+#ifdef CYGNUM_DEVS_USB_SA11X0_EP1_DMA_CHANNEL
+ *EP1_DMA_BUF_A_SIZE = EP1_MTU;
+ ep1.using_buf_a = true;
+#endif
+ (void) ep1_process_packet();
+ ep1_rx_complete(ep1.fetched);
+ } else {
+ // Start a new transfer.
+ ep1_start_rx_packet();
+ }
+ }
+}
+
+static void
+ep1_set_halted(usbs_rx_endpoint* endpoint, cyg_bool new_value)
+{
+ CYG_ASSERT( endpoint == &ep1.common, "USB set-stall operation involves the wrong endpoint");
+
+ if (ep1.common.halted == new_value) {
+ return;
+ }
+ if (new_value) {
+ // The endpoint should be stalled. There is a potential race
+ // condition here with a current transfer. Updating the
+ // stalled flag means that the dsr will do nothing.
+ ep1.common.halted = true;
+ HAL_REORDER_BARRIER();
+
+ // Now perform the actual stall. If we are in the middle of a
+ // transfer then the stall bit may not get set for a while, so
+ // poke() is inappropriate.
+ *EP1_CONTROL = EP1_FORCE_STALL;
+ } else {
+ // The stall condition should be cleared. First take care of
+ // things at the hardware level so that a new transfer is
+ // allowed.
+ usbs_sa11x0_poke(EP1_CONTROL, EP1_SENT_STALL, 0, EP1_SENT_STALL | EP1_FORCE_STALL);
+
+ // Now allow new transfers to begin.
+ ep1.common.halted = false;
+ }
+}
+
+// The DSR is invoked following an interrupt. According to the docs an
+// endpoint 1 interrupt can only happen if the receive-packet-complete
+// bit is set.
+static void
+usbs_sa11x0_ep1_dsr(void)
+{
+ int status = *EP1_CONTROL;
+
+ // This assertion does not always hold. During long runs
+ // spurious interrupts have been observed.
+ // CYG_ASSERT( 0 != (status & EP1_PACKET_COMPLETE), "ep1 dsr should only be invoked when there is data");
+ if (0 == (status & EP1_PACKET_COMPLETE)) {
+ return;
+ }
+
+ if (ep1.common.halted) {
+ // Do nothing. What may have happened is that a transfer
+ // was in progress when the stall bit was set. The
+ // set_halted() call above will have taken care of things.
+ return;
+ }
+
+ // The sent-stall bit should never get set, since we always
+ // accept full-size 64-byte packets. Just in case...
+ if (0 != (status & EP1_SENT_STALL)) {
+ DBG(("ep1_dsr(), sent-stall bit\n"));
+ usbs_sa11x0_poke(EP1_CONTROL, EP1_SENT_STALL, 0, EP1_SENT_STALL | EP1_FORCE_STALL);
+ }
+
+ // Was there a receive error (CRC, bit-stuffing, fifo-overrun?).
+ // Whichever bits of the current packet have been received must be
+ // discarded, and the current packet must be retried.
+ if (0 != (status & EP1_PACKET_ERROR)) {
+ INCR_STAT(ep1_errors);
+ ep1_clear_error();
+ ep1_start_rx_packet();
+ } else {
+ // Another packet has been received. Process it, which may
+ // complete the transfer or it may leave more to be done.
+ //
+ // The hardware starts with the wrong default value for
+ // the receive-packet-complete bit, so a packet may arrive
+ // even though no rx operation has started yet. The
+ // packets must be ignored for now. start_rx_packet()
+ // will detect data in the fifo and do the right thing.
+ int pkt_size;
+
+ if ((unsigned char*)0 != ep1.common.buffer) {
+
+ pkt_size = ep1_process_packet();
+ INCR_STAT(ep1_receives);
+ if (0 != (EP1_PACKET_ERROR & *EP1_CONTROL)) {
+ CYG_ASSERT( 0, "an error has occurred inside ep1_process_packet()\n");
+
+ } else if ((ep1.fetched != ep1.common.buffer_size) && (0 != pkt_size) && (0 == (ep1.fetched % EP1_MTU))) {
+ ep1_start_rx_packet();
+ } else if (ep1.fetched > ep1.common.buffer_size) {
+ // The host has sent too much data.
+ ep1_rx_complete(-EMSGSIZE);
+ } else {
+#if 0
+ int i;
+ diag_printf("------------------------------------------------------\n");
+ diag_printf("rx: buf %x, total size %d\n", ep1.common.buffer, ep1.fetched);
+ for (i = 0; (i < ep1.fetched) && (i < 128); i+= 8) {
+ diag_printf("rx %x %x %x %x %x %x %x %x\n",
+ ep1.common.buffer[i+0], ep1.common.buffer[i+1], ep1.common.buffer[i+2], ep1.common.buffer[i+3],
+ ep1.common.buffer[i+4], ep1.common.buffer[i+5], ep1.common.buffer[i+6], ep1.common.buffer[i+7]);
+ }
+ diag_printf("------------------------------------------------------\n");
+#endif
+ ep1_rx_complete(ep1.fetched);
+ }
+ }
+ }
+}
+
+// Initialization.
+//
+// This may get called during system start-up or following a reset
+// from the host.
+static void
+usbs_sa11x0_ep1_init(void)
+{
+#ifdef CYGNUM_DEVS_USB_SA11X0_EP1_DMA_CHANNEL
+ // What is the physical address that should be used for
+ // transfers?
+ unsigned int phys;
+ HAL_VIRT_TO_PHYS_ADDRESS( ep1_dma_data, phys);
+ phys += (HAL_DCACHE_LINE_SIZE - 1);
+ phys -= (phys % HAL_DCACHE_LINE_SIZE);
+ CYG_ASSERT( 0 == (phys % HAL_DCACHE_LINE_SIZE), "DMA buffer must be aligned to a cache-line boundary");
+ ep1_dma_buf = (unsigned char*)phys;
+
+ // Clear the DMA channel and fix the DMA address register. The
+ // value is determined above.
+ *EP1_DMA_CONTROL_CLEAR = DMA_CONTROL_CLEAR_ALL;
+ *EP1_DMA_ADDRESS = EP1_DMA_ADDRESS_VALUE;
+#endif
+
+ // Always allow the host to send full-size packets. If there is a
+ // protocol problem and the host sends packets that are too large,
+ // it will have to be handled at a level above the device driver.
+ //
+ // With some silicon revisions reading back the register does not
+ // work, so poke_value() is not applicable. This may be an issue
+ // with reset timing.
+ *USBS_OUT_SIZE = EP1_MTU - 1;
+
+ // Endpoints should never be halted during a start-up.
+ ep1.common.halted = false;
+
+ // If there has been a reset and there was a receive in progress,
+ // abort it. This also takes care of sorting out the endpoint
+ // fields ready for the next rx.
+ ep1_rx_complete(-EPIPE);
+}
+
+#endif // CYGPKG_DEVS_USB_SA11X0_EP1
+
+
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP2
+// ----------------------------------------------------------------------------
+// Endpoint 2 is used for IN transfers, i.e. transmitting data to the
+// host. The code is mostly similar to that for endpoint 1, although
+// a little bit simpler (e.g. there is no need to worry about
+// buffer overflow, that is the host's problem).
+//
+// There is a flaw in the hardware design. If the transfer involves an
+// exact multiple of 64 bytes then according to the USB spec there
+// should be a terminating packet of 0 bytes. However the size of the
+// current outgoing packet is determined by the IN_SIZE register and
+// that only allows for packets between 1 and 256 bytes - even though
+// USB bulk transfers can only go up to 64 bytes. This can be worked
+// around at this level by transmitting an extra byte, at the risk of
+// upsetting host-side device drivers. Both higher-level and host-side
+// code need to be aware of this problem.
+//
+// Again there appear to be problems with the DMA engine. This time it
+// appears that the transmit-fifo-service bit does not always work
+// correctly. If you set up a DMA transfer for more than the packet
+// size than once the packet has gone out the fifo-service bit just
+// remains set, the DMA engine continues to fill the fifo, and the
+// data gets lost. Instead DMA can only happen one packet at a time.
+// The same issues regarding cache line alignment etc. arise, so
+// using a small buffer here is convenient.
+//
+// 1) process_packet moves a packet from the main transmit buffer
+// into the dma buffer.
+// 2) start_tx_packet() starts a transfer to the host
+// 3) clear_error() copes with error conditions.
+
+#ifdef CYGNUM_DEVS_USB_SA11X0_EP2_DMA_CHANNEL
+// See the equivalent EP1 DMA definitions.
+# define EP2_DMA_MTU 64
+# define EP2_DMA_BUFSIZE ((EP2_DMA_MTU + HAL_DCACHE_LINE_SIZE - 1) - \
+ ((EP2_DMA_MTU + HAL_DCACHE_LINE_SIZE - 1) % HAL_DCACHE_LINE_SIZE))
+# define EP2_DMA_ALLOCSIZE (EP2_DMA_BUFSIZE + HAL_DCACHE_LINE_SIZE - 1)
+
+static unsigned char ep2_dma_data[EP2_DMA_ALLOCSIZE];
+static unsigned char* ep2_dma_buf;
+
+static void
+ep2_process_packet(void)
+{
+ ep2.pkt_size = ep2.common.buffer_size - ep2.transmitted;
+ if (ep2.pkt_size > EP2_MTU) {
+ ep2.pkt_size = EP2_MTU;
+ }
+ // Work around the hardware's inability to send a zero-byte packet.
+ if (0 == ep2.pkt_size) {
+ ep2.pkt_size = 1;
+ ep2_dma_buf[0] = 0;
+ } else {
+ memcpy(ep2_dma_buf, ep2.common.buffer + ep2.transmitted, ep2.pkt_size);
+ }
+}
+
+static void
+ep2_tx_packet(void)
+{
+ int dma_size, dma_control_settings;
+
+ // CYG_ASSERT( 0 != (*EP2_CONTROL & EP2_FIFO_SERVICE), "Fifo should be empty");
+
+ // Halt any DMA that may still be going on (there should not
+ // be any). Then work out the desired DMA settings for the
+ // current packet. The DMA engine needs to transfer a multiple
+ // of the burst size. If the packet size is not a multiple of
+ // the burst size, this presents a minor problem. The chances
+ // of an interrupt handler running in time to put the
+ // remaining bytes into the fifo by hand are not good, so
+ // instead more data is DMA'd in then is absolutely necessary
+ // and the surplus bytes will be cleared out during the next
+ // tx_packet.
+ //
+ // A possible optimisation is to detect small packets of
+ // less than the fifo size and byte-stuff those, bypassing
+ // DMA. It is not clear that would give any performance benefits.
+ *EP2_DMA_CONTROL_CLEAR = DMA_CONTROL_CLEAR_ALL;
+
+ dma_size = ep2.pkt_size + DMA_BURST_SIZE - 1;
+ dma_size -= (dma_size % DMA_BURST_SIZE);
+
+ CYG_ASSERT(dma_size > 0, "DMA calculations should result in a transfer of at least 8 bytes");
+
+ // Now clear the fifo, after DMA has stopped.
+ usbs_sa11x0_poke(EP2_CONTROL, EP2_SENT_STALL, 0, EP2_SENT_STALL);
+
+ // Should we be using buf_a or buf_b for this transfer?
+ // Getting this wrong means that the DMA engine just idles.
+ if (0 == (*EP2_DMA_STATUS & DMA_STATUS_BUFFER_IN_USE)) {
+ usbs_sa11x0_poke_value(EP2_DMA_BUF_A_ADDRESS, (int) ep2_dma_buf);
+ usbs_sa11x0_poke_value(EP2_DMA_BUF_A_SIZE, dma_size);
+ dma_control_settings = DMA_CONTROL_RUN | DMA_CONTROL_START_A;
+ } else {
+ usbs_sa11x0_poke_value(EP2_DMA_BUF_B_ADDRESS, (int) ep2_dma_buf);
+ usbs_sa11x0_poke_value(EP2_DMA_BUF_B_SIZE, dma_size);
+ dma_control_settings = DMA_CONTROL_RUN | DMA_CONTROL_START_B;
+ }
+
+ // Poke the tx size register while the fifo is clearing.
+ // This operation must be reliable or the host will get
+ // confused by funny-sized packets.
+ usbs_sa11x0_poke_value(USBS_IN_SIZE, ep2.pkt_size - 1);
+
+ // The USB hardware must be updated before the DMA engine
+ // starts filling the fifo. Otherwise ~48% of outgoing
+ // packets fail with a DMA underrun. When called from
+ // start_tx() there is a race condition: if the host
+ // request comes in before the DMA starts then an
+ // error interrupt will be raised, to be processed by
+ // the DSR, and then the DMA engine gets updated again.
+ // Locking the scheduler eliminates this race.
+ cyg_drv_dsr_lock();
+ usbs_sa11x0_poke(EP2_CONTROL, EP2_PACKET_COMPLETE, 0, EP2_PACKET_COMPLETE | EP2_PACKET_ERROR | EP2_PACKET_UNDERRUN);
+ *EP2_DMA_CONTROL_SET = dma_control_settings;
+ cyg_drv_dsr_unlock();
+
+ // CYG_ASSERT(0 == (*EP2_CONTROL & EP2_FIFO_SERVICE), "DMA engine should have filled up the fifo by now");
+}
+
+// Clearing an error should be a no-op when DMA is involved.
+// In practice clearing the packet-complete bit appears to
+// have some desirable effects, at the risk of the host
+// getting bogus data. This should only happen when there
+// is a real transfer in progress: an error early on is
+// likely because the PACKET_COMPLETE bit has a bogus initial
+// value.
+static void
+ep2_clear_error(void)
+{
+ usbs_sa11x0_poke(EP2_CONTROL, EP2_PACKET_COMPLETE, 0, EP2_PACKET_COMPLETE | EP2_PACKET_ERROR | EP2_PACKET_UNDERRUN);
+}
+
+#else // EP2_DMA
+
+// When not using DMA, process_packet() is responsible for filling the
+// fifo and keeping a shadow copy in a static buffer. clear_error()
+// refills the fifo using the shadow copy. tx_packet() starts the
+// actual transfer.
+static unsigned char ep2_tx_buf[EP2_MTU];
+
+static void
+ep2_process_packet()
+{
+ int i;
+
+ // Clear the fifo, just in case.
+ usbs_sa11x0_poke(EP2_CONTROL, EP2_SENT_STALL, 0, EP2_SENT_STALL);
+
+ ep2.pkt_size = ep2.common.buffer_size - ep2.transmitted;
+ if (ep2.pkt_size > EP2_MTU) {
+ ep2.pkt_size = EP2_MTU;
+ }
+ if (0 == ep2.pkt_size) {
+ ep2.pkt_size = 1;
+ ep2_tx_buf[i] = 0;
+ *EP2_DATA = 0;
+ } else {
+ for (i = 0; i < ep2.pkt_size; i++) {
+ unsigned int datum = ep2.common.buffer[ep2.transmitted + i];
+ ep2_tx_buf[i] = datum;
+ *EP2_DATA = datum;
+ }
+ }
+}
+
+static void
+ep2_tx_packet()
+{
+ usbs_sa11x0_poke_value(USBS_IN_SIZE, ep2.pkt_size - 1);
+ usbs_sa11x0_poke(EP2_CONTROL, EP2_PACKET_COMPLETE, 0, EP2_PACKET_COMPLETE | EP2_PACKET_ERROR | EP2_PACKET_UNDERRUN);
+}
+
+static void
+ep2_clear_error()
+{
+ int i;
+ // Clear the fifo, just in case.
+ usbs_sa11x0_poke(EP2_CONTROL, EP2_SENT_STALL, 0, EP2_SENT_STALL);
+ for (i = 0; i < ep2.pkt_size; i++) {
+ *EP2_DATA = ep2_tx_buf[i];
+ }
+}
+
+#endif // !EP2_DMA
+
+// A utility routine for completing a transfer. This takes care of the
+// callback as well as resetting the buffer.
+static void
+ep2_tx_complete(int result)
+{
+ void (*complete_fn)(void*, int) = ep2.common.complete_fn;
+ void* complete_data = ep2.common.complete_data;
+
+ ep2.common.buffer = (unsigned char*) 0;
+ ep2.common.buffer_size = 0;
+ ep2.common.complete_fn = (void (*)(void*, int)) 0;
+ ep2.common.complete_data = (void*) 0;
+
+ if ((void (*)(void*, int))0 != complete_fn) {
+ (*complete_fn)(complete_data, result);
+ }
+}
+
+
+// The exported interface to start a transmission.
+static void
+ep2_start_tx(usbs_tx_endpoint* endpoint)
+{
+ CYG_ASSERT( endpoint == &ep2.common, "USB data transfer involves the wrong endpoint");
+
+ // Is this endpoint currently stalled? If so then a size of 0 can
+ // be used to block until the stall condition is clear, anything
+ // else should result in an immediate callback.
+ if (ep2.common.halted) {
+ if (0 != ep2.common.buffer_size) {
+ ep2_tx_complete(-EAGAIN);
+ }
+ } else if (0 == ep2.common.buffer_size) {
+ // A check to see if the endpoint is halted. It isn't.
+ ep2_tx_complete(0);
+ } else {
+ // There should not be any errors at the start of a
+ // transmission, but if there is one then there is no safe way
+ // to recover. process_packet() and tx_packet() will hopefully
+ // do the right thing.
+ CYG_ASSERT((void*) 0 != ep2.common.buffer, "Transmitting the interrupt vectors is unlikely to be useful");
+#if 0
+ {
+ int i;
+ diag_printf("----------------------------------------------\n");
+ diag_printf("ep2_start_tx: buf %x, %d bytes\n", ep2.common.buffer, ep2.common.buffer_size);
+ for (i = 0; (i < ep2.common.buffer_size) && (i < 128); i+= 8) {
+ diag_printf("tx: %x %x %x %x %x %x %x %x\n",
+ ep2.common.buffer[i+0], ep2.common.buffer[i+1], ep2.common.buffer[i+2], ep2.common.buffer[i+3],
+ ep2.common.buffer[i+4], ep2.common.buffer[i+5], ep2.common.buffer[i+6], ep2.common.buffer[i+7]);
+ }
+ diag_printf("----------------------------------------------\n");
+ }
+#endif
+
+ // Prepare the first packet for transmission, then send it.
+ ep2.transmitted = 0;
+ ep2_process_packet();
+ ep2_tx_packet();
+ }
+}
+
+static void
+ep2_set_halted(usbs_tx_endpoint* endpoint, cyg_bool new_value)
+{
+ CYG_ASSERT(endpoint == &ep2.common, "USB set-stall operation involves the wrong endpoint");
+
+ if (ep2.common.halted == new_value) {
+ return;
+ }
+ if (new_value) {
+ // The endpoint should be stalled. There is a potential race
+ // condition here with the current transfer and DSR invocation.
+ // Updating the stalled flag means that the DSR will do nothing.
+ ep2.common.halted = true;
+ HAL_REORDER_BARRIER();
+
+ // Now perform the actual stall. This may be delayed by the hardware
+ // so poke() cannot be used.
+ *EP2_CONTROL = EP2_FORCE_STALL;
+
+ // If in the middle of a transfer then that cannot be aborted,
+ // the DMA engines etc. would get very confused.
+ } else {
+ // Take care of the hardware so that a new transfer is allowed.
+ usbs_sa11x0_poke(EP2_CONTROL, EP2_SENT_STALL, 0, EP2_SENT_STALL | EP2_FORCE_STALL);
+ ep2.common.halted = false;
+ }
+}
+
+// The dsr will be invoked when the transmit-packet-complete bit is
+// set. Typically this happens when a packet has been completed
+// (surprise surprise) but it can also happen for error conditions.
+static void
+usbs_sa11x0_ep2_dsr(void)
+{
+ int status = *EP2_CONTROL;
+ // This assertion does not always hold - spurious interrupts have
+ // been observed if you run for a few hours.
+ // CYG_ASSERT( 0 != (status & EP2_PACKET_COMPLETE), "ep2 dsr should only be invoked when the packet-complete bit is set");
+
+ if (0 == (status & EP2_PACKET_COMPLETE)) {
+ // Spurious interrupt, do nothing.
+ } else if (ep2.common.halted) {
+ // There is a possible race condition between a packet
+ // completing and the stalled condition being set.
+ // set_halted() above does everything that is needed.
+ } else if (0 == ep2.pkt_size) {
+ // This can happen because of the initial value for the
+ // packet-complete bit, allowing the host to retrieve data
+ // before the target is ready. The correct action is to do
+ // nothing.
+ } else if (0 != (status & (EP2_PACKET_ERROR | EP2_PACKET_UNDERRUN))) {
+ // A transmit error occurred, the details are not important.
+ INCR_STAT(ep2_errors);
+ ep2_clear_error();
+ ep2_tx_packet();
+ } else {
+ // Another packet has gone out.
+ INCR_STAT(ep2_transmits);
+ ep2.transmitted += ep2.pkt_size;
+ if ((ep2.transmitted < ep2.common.buffer_size) ||
+ ((ep2.transmitted == ep2.common.buffer_size) && (0 == (ep2.common.buffer_size % EP2_MTU)))) {
+ ep2_process_packet();
+ ep2_tx_packet();
+ } else {
+ ep2_tx_complete(ep2.transmitted);
+ }
+ }
+}
+
+// Endpoint 2 initialization.
+//
+// This may be called during system start-up or following a reset
+// from the host.
+static void
+usbs_sa11x0_ep2_init(void)
+{
+#ifdef CYGNUM_DEVS_USB_SA11X0_EP2_DMA_CHANNEL
+ // What is the physical address that should be used for
+ // transfers?
+ unsigned int phys;
+ HAL_VIRT_TO_PHYS_ADDRESS(ep2_dma_data, phys);
+ phys += (HAL_DCACHE_LINE_SIZE - 1);
+ phys -= (phys % HAL_DCACHE_LINE_SIZE);
+ CYG_ASSERT(0 == (phys % HAL_DCACHE_LINE_SIZE), "DMA buffer must be aligned to a cache-line boundary");
+ ep2_dma_buf = (unsigned char*) phys;
+
+ // Clear the DMA channel completely, otherwise it may not be
+ // possible to write the ADDRESS register. Then set the DMA
+ // address register. The value is determined above.
+ *EP2_DMA_CONTROL_CLEAR = DMA_CONTROL_CLEAR_ALL;
+ *EP2_DMA_ADDRESS = EP2_DMA_ADDRESS_VALUE;
+#endif
+
+ // Endpoints should never be halted after a reset
+ ep2.common.halted = false;
+
+ // If there has been a reset and there was a receive in progress,
+ // abort it. This also takes care of clearing the endpoint
+ // structure fields.
+ ep2_tx_complete(-EPIPE);
+}
+
+#endif // CYGPKG_DEVS_USB_SA11X0_EP2
+
+// ----------------------------------------------------------------------------
+// Interrupt handling
+//
+// As much work as possible is deferred to the DSR (or to the debug
+// thread). Interrupts for the endpoints are never a problem: the
+// variuos packet-complete etc. bits ensure that the endpoints
+// remain quiescent until the relevant interrupt has been serviced.
+// Suspend and resume are more complicated. A suspend means that
+// there has been no activity for 3ms, which should be enough
+// time for the whole thing to be handled. A resume means that there
+// has been bus activity after a suspend, and again it is infrequent.
+//
+// Reset appears to be much more complicated. A reset means that the
+// host is holding the USB lines to a specific state for 10ms. This is
+// detected by the hardware, causing the USB controller to be reset
+// (i.e. any pending transfers are discarded, etc.). The reset bit in
+// the status register will be set, and an interrupt will be raised.
+// Now, in theory the correct thing to do is to process this
+// interrupt, block reset interrupts for the duration of these 10ms,
+// and wait for further activity such as the control message to set
+// the address.
+//
+// In practice this does not seem to work. Possibly the USB controller
+// gets reset continuously while the external reset signal is applied,
+// but I have not been able to confirm this. Messing about with the
+// reset interrupt control bit causes the system to go off into
+// never-never land. 10ms is too short a time to allow for manual
+// debugging of what happens. So for now the interrupt source is
+// blocked at the interrupt mask level and the dsr will do the
+// right thing. This causes a significant number of spurious interrupts
+// for the duration of the reset signal and not a lot else can happen.
+
+
+// Perform reset operations on all endpoints that have been
+// configured in. It is convenient to keep this in a separate
+// routine to allow for polling, where manipulating the
+// interrupt controller mask is a bad idea.
+static void
+usbs_sa11x0_handle_reset(void)
+{
+ int old_state = ep0.common.state;
+
+ // Any state change must be reported to higher-level code
+ ep0.common.state = USBS_STATE_DEFAULT;
+ if ((void (*)(usbs_control_endpoint*, void*, usbs_state_change, int))0 != ep0.common.state_change_fn) {
+ (*ep0.common.state_change_fn)(&ep0.common, ep0.common.state_change_data,
+ USBS_STATE_CHANGE_RESET, old_state);
+ }
+
+ // Reinitialize all the endpoints that have been configured in.
+ usbs_sa11x0_ep0_init();
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP1
+ usbs_sa11x0_ep1_init();
+#endif
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP2
+ usbs_sa11x0_ep2_init();
+#endif
+
+ // After a reset we need to handle endpoint interrupts, reset
+ // interrupts, and suspend interrupts. There should not be a
+ // resume since we have not suspended, but leaving resume
+ // interrupts enabled appears to be desirable with some hardware.
+ //
+ // With some silicon revisions it appears that a longer delay
+ // is needed after reset, so this poke() may not work.
+ if (!usbs_sa11x0_poke(USBS_CONTROL,
+ CONTROL_INTR_ENABLE(CONTROL_EP_INTR_BITS|CONTROL_RESET_INTR|CONTROL_SUSPEND_INTR|CONTROL_RESUME_INTR),
+ 0,
+ CONTROL_INTR_CLEAR(CONTROL_EP_INTR_BITS|CONTROL_RESET_INTR|CONTROL_SUSPEND_INTR|CONTROL_RESUME_INTR))) {
+ // DBG(("usbs_sa11x0_handle_reset(), update of control register failed, status %x\n", *USBS_STATUS));
+ }
+}
+
+// The DSR. This can be invoked directly by poll(), or via the usual
+// interrupt subsystem. It acts as per the current value of
+// isr_status_bits. If another interrupt goes off while this
+// DSR is running, there will be another invocation of the DSR and
+// the status bits will be updated.
+static void
+usbs_sa11x0_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data)
+{
+ int status = 0;
+
+ CYG_ASSERT(SA11X0_IRQ_USB_SERVICE_REQUEST == vector, "USB DSR should only be invoked for USB interrupts" );
+ CYG_ASSERT(0 == data, "The SA11X0 USB DSR needs no global data pointer");
+
+ // There is no atomic swap support, so interrupts have to be
+ // blocked. It might be possible to do this via the USBS_CONTROL
+ // register, but at the risk of messing up the status register
+ // if another interrupt comes in. Blocking interrupts at the
+ // processor level is less intrusive on the USB code.
+
+ cyg_drv_isr_lock();
+ status = isr_status_bits;
+ isr_status_bits = 0;
+ cyg_drv_isr_unlock();
+
+ // Reset is special, since it invalidates everything else.
+ // If the reset is still ongoing then do not attempt any
+ // further processing, there will just be another interrupt.
+ // Otherwise handle_reset() does the hard work. Unmasking
+ // the interrupt means that another interrupt will occur
+ // immediately if reset is still asserted, i.e. no threads
+ // will run, but there is no easy way of triggering action
+ // at the end of reset.
+ if (0 != (status & STATUS_RESET_INTR)) {
+
+ int new_status = *USBS_STATUS;
+ if (0 == (new_status & STATUS_RESET_INTR)) {
+ usbs_sa11x0_handle_reset();
+ }
+ // This unmask is likely to cause another interrupt immediately
+ cyg_drv_interrupt_unmask(SA11X0_IRQ_USB_SERVICE_REQUEST);
+
+ } else {
+ // Process resume first. Ignore any resumes when we are not
+ // actually suspended yet, this happens mainly during system
+ // startup. If there has been a state change to suspended
+ // then we need a matching state change to resumed.
+ if (0 != (status & STATUS_RESUME_INTR)) {
+ int old_state = ep0.common.state;
+ if (0 != (old_state & USBS_STATE_SUSPENDED)) {
+ ep0.common.state &= ~USBS_STATE_SUSPENDED;
+ if ((void (*)(usbs_control_endpoint*, void*, usbs_state_change, int))0 != ep0.common.state_change_fn) {
+ (*ep0.common.state_change_fn)(&ep0.common, ep0.common.state_change_data,
+ USBS_STATE_CHANGE_RESUMED, old_state);
+ }
+ // After a resume, all interrupts should be enabled.
+ // In theory there is no need to worry about further
+ // resume interrupts, but strange hardware behaviour
+ // has been observed if resume interrupts are left
+ // disabled.
+ usbs_sa11x0_poke(USBS_CONTROL,
+ CONTROL_INTR_ENABLE(CONTROL_EP_INTR_BITS|CONTROL_RESET_INTR|CONTROL_SUSPEND_INTR|CONTROL_RESUME_INTR),
+ 0,
+ CONTROL_INTR_CLEAR(CONTROL_EP_INTR_BITS|CONTROL_RESET_INTR|CONTROL_SUSPEND_INTR|CONTROL_RESUME_INTR));
+ }
+ }
+
+ // Now process endpoint interrupts. Control operations on
+ // endpoint 0 may have side effects on the other endpoints
+ // so it is better to leave them until last.
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP1
+ if (0 != (status & STATUS_EP1_INTR)) {
+ usbs_sa11x0_ep1_dsr();
+ }
+#endif
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP2
+ if (0 != (status & STATUS_EP2_INTR)) {
+ usbs_sa11x0_ep2_dsr();
+ }
+#endif
+ if (0 != (status & STATUS_EP0_INTR)) {
+ usbs_sa11x0_ep0_dsr();
+ }
+
+ // Process suspend last, but only if there has not also been
+ // a resume. A suspend immediately followed by a resume should
+ // be ignored. A resume immediately followed by a suspend
+ // would be unfortunate, but suspend means that there has been
+ // at least 3ms of inactivity so the DSR latency would have
+ // to be pretty bad.
+ //
+ // Total robustness is possible but requires more work in the ISR.
+ if ((0 != (status & STATUS_SUSPEND_INTR)) && (0 == (status & STATUS_RESUME_INTR))) {
+ int old_state = ep0.common.state;
+ ep0.common.state |= USBS_STATE_SUSPENDED;
+ if ((void (*)(usbs_control_endpoint*, void*, usbs_state_change, int))0 != ep0.common.state_change_fn) {
+ (*ep0.common.state_change_fn)(&ep0.common, ep0.common.state_change_data,
+ USBS_STATE_CHANGE_SUSPENDED, old_state);
+ }
+ // We are no longer interested in further suspend interrupts,
+ // which could happen every 3 ms, but resume has become
+ // very interesting.
+ usbs_sa11x0_poke(USBS_CONTROL,
+ CONTROL_INTR_ENABLE(CONTROL_EP_INTR_BITS | CONTROL_RESET_INTR | CONTROL_RESUME_INTR),
+ 0,
+ CONTROL_INTR_CLEAR(CONTROL_EP_INTR_BITS | CONTROL_RESET_INTR | CONTROL_RESUME_INTR));
+ }
+ }
+}
+
+// ----------------------------------------------------------------------------
+// Optionally the USB code can do most of its processing in a thread
+// rather than in a DSR.
+#ifdef CYGPKG_DEVS_USB_SA11X0_THREAD
+static unsigned char usbs_sa11x0_thread_stack[CYGNUM_DEVS_USB_SA11X0_THREAD_STACK_SIZE];
+static cyg_thread usbs_sa11x0_thread;
+static cyg_handle_t usbs_sa11x0_thread_handle;
+static cyg_sem_t usbs_sa11x0_sem;
+
+
+static void
+usbs_sa11x0_thread_fn(cyg_addrword_t param)
+{
+ for (;;) {
+ cyg_semaphore_wait(&usbs_sa11x0_sem);
+ usbs_sa11x0_dsr(SA11X0_IRQ_USB_SERVICE_REQUEST, 0, 0);
+ }
+ CYG_UNUSED_PARAM(cyg_addrword_t, param);
+}
+
+static void
+usbs_sa11x0_thread_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data)
+{
+ CYG_ASSERT( 0 != isr_status_bits, "DSR's should only be scheduled when there is work to do");
+ cyg_semaphore_post(&usbs_sa11x0_sem);
+
+ CYG_UNUSED_PARAM(cyg_vector_t, vector);
+ CYG_UNUSED_PARAM(cyg_ucount32, count);
+ CYG_UNUSED_PARAM(cyg_addrword_t, data);
+}
+
+#endif
+
+// ----------------------------------------------------------------------------
+// The interrupt handler. This does as little as possible.
+static cyg_uint32
+usbs_sa11x0_isr(cyg_vector_t vector, cyg_addrword_t data)
+{
+ int old_status_bits = isr_status_bits;
+ int status_bits;
+
+ CYG_ASSERT(SA11X0_IRQ_USB_SERVICE_REQUEST == vector, "USB ISR should only be invoked for USB interrupts" );
+ CYG_ASSERT(0 == data, "The SA11X0 USB ISR needs no global data pointer" );
+
+ // Read the current status. Reset is special, it means that the
+ // whole chip has been reset apart from the one bit in the status
+ // register. Nothing should be done about this until the DSR sets
+ // the endpoints back to a consistent state and re-enables
+ // interrupts in the control register.
+ status_bits = *USBS_STATUS;
+
+ if (0 != (status_bits & STATUS_RESET_INTR)) {
+ isr_status_bits = STATUS_RESET_INTR;
+ *USBS_STATUS = status_bits;
+ cyg_drv_interrupt_mask(SA11X0_IRQ_USB_SERVICE_REQUEST);
+ } else {
+ *USBS_STATUS = status_bits;
+ isr_status_bits |= status_bits;
+ }
+
+ // Now keep the rest of the system happy.
+ cyg_drv_interrupt_acknowledge(vector);
+ return (old_status_bits != isr_status_bits) ? CYG_ISR_CALL_DSR : CYG_ISR_HANDLED;
+}
+
+// ----------------------------------------------------------------------------
+// Polling support. This acts mostly like the interrupt handler: it
+// sets the isr status bits and causes the dsr to run. Reset has to be
+// handled specially: polling does nothing as long as reset is asserted.
+
+static void
+usbs_sa11x0_poll(usbs_control_endpoint* endpoint)
+{
+ CYG_ASSERT( endpoint == &ep0.common, "USB poll involves the wrong endpoint");
+
+ if (0 != (isr_status_bits & STATUS_RESET_INTR)) {
+ // Reset was detected the last time poll() was invoked. If
+ // reset is still active, do nothing. Once the reset has
+ // completed things can continue.
+ if (0 == (STATUS_RESET_INTR & *USBS_STATUS)) {
+ isr_status_bits = 0;
+ usbs_sa11x0_handle_reset();
+ }
+ } else {
+ isr_status_bits = *USBS_STATUS;
+ if (0 != (STATUS_RESET_INTR & isr_status_bits)) {
+ // Reset has just been asserted. Do nothing, just continue
+ // polling for the duration of the reset signal.
+ } else if (0 != isr_status_bits) {
+ usbs_sa11x0_dsr(SA11X0_IRQ_USB_SERVICE_REQUEST, 0, (cyg_addrword_t) 0);
+ }
+ }
+}
+
+
+// ----------------------------------------------------------------------------
+// Initialization.
+
+void
+usbs_sa11x0_init(void)
+{
+ // Start by disabling/resetting the hardware. This is easy.
+ *USBS_CONTROL = CONTROL_DISABLE;
+ *USBS_CONTROL = CONTROL_DISABLE;
+ *USBS_CONTROL = CONTROL_DISABLE;
+
+ // The USB bus is now tristated, preventing any communications.
+ // This is a good thing, the situation should change only when
+ // higher-level code has provided the enumeration data and done an
+ // explicit start.
+ usbs_sa11x0_ep0_init();
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP1
+ usbs_sa11x0_ep1_init();
+#endif
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP2
+ usbs_sa11x0_ep2_init();
+#endif
+
+ // If processing is supposed to happen in a thread rather
+ // than in DSR, initialize the threads.
+#ifdef CYGPKG_DEVS_USB_SA11X0_THREAD
+ cyg_semaphore_init(&usbs_sa11x0_sem, 0);
+ cyg_thread_create(CYGNUM_DEVS_USB_SA11X0_THREAD_PRIORITY,
+ &usbs_sa11x0_thread_fn,
+ 0,
+ "SA11X0 USB support",
+ usbs_sa11x0_thread_stack,
+ CYGNUM_DEVS_USB_SA11X0_THREAD_STACK_SIZE,
+ &usbs_sa11x0_thread_handle,
+ &usbs_sa11x0_thread
+ );
+ cyg_thread_resume(usbs_sa11x0_thread_handle);
+#endif
+
+ // It is also possible and desirable to install the interrupt
+ // handler here, even though there will be no interrupts for a
+ // while yet.
+ cyg_drv_interrupt_create(SA11X0_IRQ_USB_SERVICE_REQUEST,
+ 99, // priority
+ 0, // data
+ &usbs_sa11x0_isr,
+#ifdef CYGPKG_DEVS_USB_SA11X0_THREAD
+ &usbs_sa11x0_thread_dsr,
+#else
+ &usbs_sa11x0_dsr,
+#endif
+ &usbs_sa11x0_intr_handle,
+ &usbs_sa11x0_intr_data);
+ cyg_drv_interrupt_attach(usbs_sa11x0_intr_handle);
+ cyg_drv_interrupt_unmask(SA11X0_IRQ_USB_SERVICE_REQUEST);
+}
+
+// ----------------------------------------------------------------------------
+// Testing support.
+usbs_testing_endpoint usbs_testing_endpoints[] = {
+ {
+ endpoint_type : USB_ENDPOINT_DESCRIPTOR_ATTR_CONTROL,
+ endpoint_number : 0,
+ endpoint_direction : USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN,
+ endpoint : (void*) &ep0.common,
+#ifdef CYGVAR_DEVS_USB_SA11X0_EP0_DEVTAB_ENTRY
+ devtab_entry : CYGDAT_DEVS_USB_SA11X0_DEVTAB_BASENAME "0c",
+#else
+ devtab_entry : (const char*) 0,
+#endif
+ min_size : 1, // zero-byte control transfers are meaningless
+ max_size : 0x0FFFF, // limit imposed by protocol
+ max_in_padding : 0,
+ alignment : 0
+ },
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP1
+ {
+ endpoint_type : USB_ENDPOINT_DESCRIPTOR_ATTR_BULK,
+ endpoint_number : 1,
+ endpoint_direction : USB_ENDPOINT_DESCRIPTOR_ENDPOINT_OUT,
+ endpoint : (void*) &ep1.common,
+#ifdef CYGVAR_DEVS_USB_SA11X0_EP1_DEVTAB_ENTRY
+ devtab_entry : CYGDAT_DEVS_USB_SA11X0_DEVTAB_BASENAME "1r",
+#else
+ devtab_entry : (const char*) 0,
+#endif
+ min_size : 1,
+ max_size : -1, // No hardware or driver limitation
+ max_in_padding : 0,
+ alignment : 0
+ },
+#endif
+#ifdef CYGPKG_DEVS_USB_SA11X0_EP2
+ {
+ endpoint_type : USB_ENDPOINT_DESCRIPTOR_ATTR_BULK,
+ endpoint_number : 2,
+ endpoint_direction : USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN,
+ endpoint : (void*) &ep2.common,
+#ifdef CYGVAR_DEVS_USB_SA11X0_EP2_DEVTAB_ENTRY
+ devtab_entry : CYGDAT_DEVS_USB_SA11X0_DEVTAB_BASENAME "2w",
+#else
+ devtab_entry : (const char*) 0,
+#endif
+ min_size : 1,
+ max_size : -1, // No hardware or driver limitation
+ max_in_padding : 1, // hardware limitation
+ alignment : 0
+ },
+#endif
+ USBS_TESTING_ENDPOINTS_TERMINATOR
+};
diff --git a/cesar/ecos/packages/devs/usb/sa11x0/current/src/usbs_sa11x0_data.cxx b/cesar/ecos/packages/devs/usb/sa11x0/current/src/usbs_sa11x0_data.cxx
new file mode 100644
index 0000000000..a3f45d748c
--- /dev/null
+++ b/cesar/ecos/packages/devs/usb/sa11x0/current/src/usbs_sa11x0_data.cxx
@@ -0,0 +1,174 @@
+//==========================================================================
+//
+// usbs_sa11x0.c
+//
+// Static data for the SA11x0 USB device driver
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 2000-10-04
+//
+// This file contains various objects that should go into extras.o
+// rather than libtarget.a, e.g. devtab entries that would normally
+// be eliminated by the selective linking.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/io/devtab.h>
+#include <cyg/io/usb/usbs_sa11x0.h>
+#include <pkgconf/devs_usb_sa11x0.h>
+
+// ----------------------------------------------------------------------------
+// Initialization. The goal here is to call usbs_sa11x0_init()
+// early on during system startup, to take care of things like
+// registering interrupt handlers etc. which are best done
+// during system init.
+//
+// If the endpoint 0 devtab entry is available then its init()
+// function can be used to take care of this. However the devtab
+// entries are optional so an alternative mechanism must be
+// provided. Unfortunately although it is possible to give
+// a C function the constructor attribute, it cannot be given
+// an initpri attribute. Instead it is necessary to define a
+// dummy C++ class.
+
+extern "C" void usbs_sa11x0_init(void);
+
+#ifndef CYGVAR_DEVS_USB_SA11X0_EP0_DEVTAB_ENTRY
+class usbs_sa11x0_initialization {
+ public:
+ usbs_sa11x0_initialization() {
+ usbs_sa11x0_init();
+ }
+};
+
+static usbs_sa11x0_initialization usbs_sa11x0_init_object CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO);
+#endif
+
+// ----------------------------------------------------------------------------
+// The devtab entries. Each of these is optional, many applications
+// will want to use the lower-level API rather than go via
+// open/read/write/ioctl.
+
+#ifdef CYGVAR_DEVS_USB_SA11X0_EP0_DEVTAB_ENTRY
+
+// For endpoint 0 the only legal operations are get_config() and
+// set_config(), and these are provided by the common package.
+
+static bool
+usbs_sa11x0_devtab_ep0_init(struct cyg_devtab_entry* tab)
+{
+ CYG_UNUSED_PARAM(struct cyg_devtab_entry*, tab);
+ usbs_sa11x0_init();
+ return true;
+}
+
+static CHAR_DEVIO_TABLE(usbs_sa11x0_ep0_devtab_functions,
+ &cyg_devio_cwrite,
+ &cyg_devio_cread,
+ &cyg_devio_select,
+ &usbs_devtab_get_config,
+ &usbs_devtab_set_config);
+
+static CHAR_DEVTAB_ENTRY(usbs_sa11x0_ep0_devtab_entry,
+ CYGDAT_DEVS_USB_SA11X0_DEVTAB_BASENAME "0c",
+ 0,
+ &usbs_sa11x0_ep0_devtab_functions,
+ &usbs_sa11x0_devtab_ep0_init,
+ 0,
+ (void*) &usbs_sa11x0_ep0);
+#endif
+
+// ----------------------------------------------------------------------------
+// Common routines for ep1 and ep2.
+#if defined(CYGVAR_DEVS_USB_SA11X0_EP1_DEVTAB_ENTRY) || defined(CYGVAR_DEVS_USB_SA11X0_EP2_DEVTAB_ENTRY)
+static bool
+usbs_sa11x0_devtab_dummy_init(struct cyg_devtab_entry* tab)
+{
+ CYG_UNUSED_PARAM(struct cyg_devtab_entry*, tab);
+ return true;
+}
+#endif
+
+// ----------------------------------------------------------------------------
+// ep1 devtab entry. This can only be used for host->slave, so only the
+// cread() function makes sense.
+
+#ifdef CYGVAR_DEVS_USB_SA11X0_EP1_DEVTAB_ENTRY
+
+static CHAR_DEVIO_TABLE(usbs_sa11x0_ep1_devtab_functions,
+ &cyg_devio_cwrite,
+ &usbs_devtab_cread,
+ &cyg_devio_select,
+ &usbs_devtab_get_config,
+ &usbs_devtab_set_config);
+
+static CHAR_DEVTAB_ENTRY(usbs_sa11x0_ep1_devtab_entry,
+ CYGDAT_DEVS_USB_SA11X0_DEVTAB_BASENAME "1r",
+ 0,
+ &usbs_sa11x0_ep1_devtab_functions,
+ &usbs_sa11x0_devtab_dummy_init,
+ 0,
+ (void*) &usbs_sa11x0_ep1);
+#endif
+
+// ----------------------------------------------------------------------------
+// ep2 devtab entry. This can only be used for slave->host, so only
+// the cwrite() function makes sense.
+
+#ifdef CYGVAR_DEVS_USB_SA11X0_EP2_DEVTAB_ENTRY
+
+static CHAR_DEVIO_TABLE(usbs_sa11x0_ep2_devtab_functions,
+ &usbs_devtab_cwrite,
+ &cyg_devio_cread,
+ &cyg_devio_select,
+ &usbs_devtab_get_config,
+ &usbs_devtab_set_config);
+
+static DEVTAB_ENTRY(usbs_sa11x0_ep2_devtab_entry,
+ CYGDAT_DEVS_USB_SA11X0_DEVTAB_BASENAME "2w",
+ 0,
+ &usbs_sa11x0_ep2_devtab_functions,
+ &usbs_sa11x0_devtab_dummy_init,
+ 0,
+ (void*) &usbs_sa11x0_ep2);
+
+#endif
+
diff --git a/cesar/ecos/packages/devs/wallclock/synth/current/ChangeLog b/cesar/ecos/packages/devs/wallclock/synth/current/ChangeLog
new file mode 100644
index 0000000000..2b9fcf0d05
--- /dev/null
+++ b/cesar/ecos/packages/devs/wallclock/synth/current/ChangeLog
@@ -0,0 +1,46 @@
+2003-10-06 Savin Zlobec <savin@elatec.si>
+
+ * cdl/wallclock_synth.cdl:
+ * src/wallclock_synth.cxx:
+ Implemented set_get mode.
+
+2003-10-02 Savin Zlobec <savin@elatec.si>
+
+ * cdl/wallclock_synth.cdl:
+ * src/wallclock_synth.cxx:
+ Created wallclock driver for synthetic target.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/devs/wallclock/synth/current/cdl/wallclock_synth.cdl b/cesar/ecos/packages/devs/wallclock/synth/current/cdl/wallclock_synth.cdl
new file mode 100644
index 0000000000..f98611111d
--- /dev/null
+++ b/cesar/ecos/packages/devs/wallclock/synth/current/cdl/wallclock_synth.cdl
@@ -0,0 +1,113 @@
+# ====================================================================
+#
+# wallclock_synth.cdl
+#
+# eCos synthetic wallclock
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): Savin Zlobec <savin@elatec.si>
+# Original data: nickg, jskov
+# Contributors:
+# Date: 2003-10-02
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_DEVS_WALLCLOCK_SYNTH {
+ parent CYGPKG_IO_WALLCLOCK
+ active_if CYGPKG_IO_WALLCLOCK
+ display "Synthetic wallclock driver"
+ requires CYGPKG_HAL_SYNTH
+ hardware
+ compile wallclock_synth.cxx
+ implements CYGINT_WALLCLOCK_HW_IMPLEMENTATIONS
+ implements CYGINT_WALLCLOCK_SET_GET_MODE_SUPPORTED
+ active_if CYGIMP_WALLCLOCK_HARDWARE
+
+ cdl_option CYGIMP_WALLCLOCK_HARDWARE {
+ parent CYGPKG_IO_WALLCLOCK_IMPLEMENTATION
+ display "Hardware wallclock"
+ default_value 0
+ implements CYGINT_WALLCLOCK_IMPLEMENTATIONS
+ }
+
+ cdl_option CYGDAT_DEVS_WALLCLOCK_SYNTH_FILENAME {
+ display "Name of file wich holds system-eCos wallclock offset"
+ flavor data
+ default_value { "\"synth.wallclock\"" }
+ active_if CYGSEM_WALLCLOCK_SET_GET_MODE
+ description "
+ This is the name of the file which holds the difference
+ between system and eCos wallclock. It is read at initialization
+ and written to each time the wallclock it set."
+ }
+
+ cdl_component CYGPKG_DEVS_WALLCLOCK_SYNTH_OPTIONS {
+ display "Synthetic wallclock build options"
+ flavor none
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+ cdl_option CYGPKG_DEVS_WALLCLOCK_SYNTH_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the wallclock device. These flags are used in addition
+ to the set of global flags."
+ }
+
+ cdl_option CYGPKG_DEVS_WALLCLOCK_SYNTH_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the wallclock device. These flags are removed from
+ the set of global flags if present."
+ }
+ }
+}
+
+# EOF wallclock_synth.cdl
diff --git a/cesar/ecos/packages/devs/wallclock/synth/current/src/wallclock_synth.cxx b/cesar/ecos/packages/devs/wallclock/synth/current/src/wallclock_synth.cxx
new file mode 100644
index 0000000000..50452ac209
--- /dev/null
+++ b/cesar/ecos/packages/devs/wallclock/synth/current/src/wallclock_synth.cxx
@@ -0,0 +1,146 @@
+//==========================================================================
+//
+// wallclock_synth.cxx
+//
+// eCos synthetic wallclock driver.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Savin Zlobec <savin@elatec.si>
+// Contributors:
+// Date: 2003-10-02
+// Purpose:
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/wallclock.h>
+#include <pkgconf/devs_wallclock_synth.h>
+
+#include <cyg/hal/hal_io.h>
+#include <cyg/hal/hal_arch.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/diag.h>
+
+#include <cyg/io/wallclock.hxx>
+
+//-----------------------------------------------------------------------------
+
+#ifdef CYGSEM_WALLCLOCK_SET_GET_MODE
+// Difference between system and eCos wallclock
+static cyg_uint32 epoch_ticks;
+static cyg_uint32 epoch_time_stamp;
+#endif
+
+//-----------------------------------------------------------------------------
+// Functions required for the hardware-driver API.
+
+// Initializes the clock
+void
+Cyg_WallClock::init_hw_seconds(void)
+{
+#ifdef CYGSEM_WALLCLOCK_SET_GET_MODE
+ int fd;
+
+ // Read difference between system and eCos wallclock from file
+ fd = cyg_hal_sys_open(CYGDAT_DEVS_WALLCLOCK_SYNTH_FILENAME,
+ CYG_HAL_SYS_O_RDONLY, 0);
+
+ if (fd > 0)
+ {
+ cyg_hal_sys_read(fd, &epoch_time_stamp, sizeof(epoch_time_stamp));
+ cyg_hal_sys_read(fd, &epoch_ticks, sizeof(epoch_ticks));
+ cyg_hal_sys_close(fd);
+ }
+#endif
+}
+
+// Returns the number of seconds elapsed since 1970-01-01 00:00:00
+cyg_uint32
+Cyg_WallClock::get_hw_seconds(void)
+{
+ cyg_uint32 res;
+ struct cyg_hal_sys_timeval ctv;
+ struct cyg_hal_sys_timezone ctz;
+
+ cyg_hal_sys_gettimeofday(&ctv, &ctz);
+
+#ifdef CYGSEM_WALLCLOCK_SET_GET_MODE
+ res = epoch_time_stamp + ctv.hal_tv_sec - epoch_ticks;
+#else
+ res = ctv.hal_tv_sec;
+#endif
+
+ return res;
+}
+
+#ifdef CYGSEM_WALLCLOCK_SET_GET_MODE
+
+// Sets the clock. Argument is seconds elapsed since 1970-01-01 00:00:00
+void
+Cyg_WallClock::set_hw_seconds(cyg_uint32 secs)
+{
+ int fd;
+ struct cyg_hal_sys_timeval ctv;
+ struct cyg_hal_sys_timezone ctz;
+
+ // System wallclock time
+ cyg_hal_sys_gettimeofday(&ctv, &ctz);
+
+ // Set the difference between the system and eCos wallclock
+ epoch_time_stamp = secs;
+ epoch_ticks = ctv.hal_tv_sec;
+
+ // Write difference to file
+ fd = cyg_hal_sys_open(CYGDAT_DEVS_WALLCLOCK_SYNTH_FILENAME,
+ CYG_HAL_SYS_O_WRONLY | CYG_HAL_SYS_O_CREAT,
+ CYG_HAL_SYS_S_IRWXU | CYG_HAL_SYS_S_IRWXG | CYG_HAL_SYS_S_IRWXO);
+
+ if (fd > 0)
+ {
+ cyg_hal_sys_write(fd, &epoch_time_stamp, sizeof(epoch_time_stamp));
+ cyg_hal_sys_write(fd, &epoch_ticks, sizeof(epoch_ticks));
+ cyg_hal_sys_close(fd);
+ }
+}
+
+#endif // CYGSEM_WALLCLOCK_SET_GET_MODE
+
+//-----------------------------------------------------------------------------
+// EOF wallclock_synth.cxx
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/ChangeLog b/cesar/ecos/packages/devs/watchdog/synth/current/ChangeLog
new file mode 100644
index 0000000000..1346942e49
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/ChangeLog
@@ -0,0 +1,69 @@
+2003-03-23 Iztok Zupet<iz@vsr.si>
+
+ * doc/synth_watchdog.sgml: Replaced .gif with .png to allow for
+ PDF build.
+
+ * doc/asleep.gif, doc/awake.gif: Converted to *.png and deleted.
+ * doc/asleep.png, doc/awake.png: New files.
+
+2003-02-25 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/synth_watchdog.sgml: Declare as <part> not <reference> to get
+ correct TOC numbering.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/synth_watchdog.cdl: Add doc link.
+
+ * doc/synth_watchdog.sgml: Comment out DOCTYPE for now to allow
+ building with standard doc build.
+ Add an enclosing <reference> so it's structured better with standard
+ doc build.
+
+2003-02-12 Bart Veer <bartv@ecoscentric.com>
+
+ * host/Makefile.in:
+ Regenerate after toplevel acinclude.m4 update
+
+2002-09-16 Bart Veer <bartv@ecoscentric.com>
+
+ * cdl/synth_watchdog.cdl:
+ Synthetic watchdog device should only be active if the
+ generic watchdog support is present
+
+2002-09-04 Bart Veer <bartv@ecoscentric.com>
+
+ * Synthetic target watchdog package created
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2002, 2003 Bart Veer
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/cdl/synth_watchdog.cdl b/cesar/ecos/packages/devs/watchdog/synth/current/cdl/synth_watchdog.cdl
new file mode 100644
index 0000000000..53d190675d
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/cdl/synth_watchdog.cdl
@@ -0,0 +1,110 @@
+# ====================================================================
+#
+# synth_watchdog.cdl
+#
+# Synthetic target watchdog package.
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 2002 Bart Veer
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting the
+## copyright holder(s).
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Original data: bartv
+# Contributors:
+# Date: 2002-08-07
+#
+#####DESCRIPTIONEND####
+# ====================================================================
+
+cdl_package CYGPKG_DEVS_WATCHDOG_SYNTH {
+ display "Synthetic target watchdog support"
+ description "
+ The watchdog driver for the eCos synthetic target provides
+ emulation of a watchdog device: if the eCos application starts
+ the watchdog and fails to reset it regularly then the host-side
+ support will detect this and kill the eCos application with a
+ SIGPWR signal."
+ doc ref/devs-watchdog-synth.html
+
+ parent CYGPKG_IO_WATCHDOG
+ active_if CYGPKG_IO_WATCHDOG
+ implements CYGINT_WATCHDOG_HW_IMPLEMENTATIONS
+ implements CYGINT_WATCHDOG_RESETS_ON_TIMEOUT
+
+ cdl_option CYGIMP_WATCHDOG_HARDWARE {
+ parent CYGPKG_IO_WATCHDOG_IMPLEMENTATION
+ display "use \"hardware\" watchdog"
+ default_value 1
+ implements CYGINT_WATCHDOG_IMPLEMENTATIONS
+ compile synth_watchdog.cxx
+ description "
+ eCos provides several implementations of a watchdog device.
+ The default is to use the \"hardware\" implementation, which
+ for the synthetic target involves interacting with a
+ watchdog.tcl script running inside the I/O auxiliary."
+ }
+
+ cdl_component CYGPKG_DEVS_WATCHDOG_SYNTH_OPTIONS {
+ display "Build options"
+ active_if CYGIMP_WATCHDOG_HARDWARE
+ flavor none
+
+ description "
+ Package-specific build options including control over compiler
+ flags used only in building this package."
+
+ cdl_option CYGPKG_DEVS_WATCHDOG_SYNTH_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building this package. These flags are used in addition
+ to the set of global flags."
+ }
+ cdl_option CYGPKG_DEVS_WATCHDOG_SYNTH_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building this package. These flags are removed from
+ the set of global flags if present."
+ }
+ }
+}
+
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/doc/asleep.png b/cesar/ecos/packages/devs/watchdog/synth/current/doc/asleep.png
new file mode 100644
index 0000000000..c127379303
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/doc/asleep.png
Binary files differ
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/doc/awake.png b/cesar/ecos/packages/devs/watchdog/synth/current/doc/awake.png
new file mode 100644
index 0000000000..c3504dcd53
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/doc/awake.png
Binary files differ
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/doc/devs-watchdog-synth.html b/cesar/ecos/packages/devs/watchdog/synth/current/doc/devs-watchdog-synth.html
new file mode 100644
index 0000000000..0a66d7be31
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/doc/devs-watchdog-synth.html
@@ -0,0 +1,526 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Synthetic Target Watchdog Device</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
+"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><H1
+><A
+NAME="DEVS-WATCHDOG-SYNTH">Synthetic Target Watchdog Device</H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN4"
+></A
+><H2
+>Name</H2
+>Synthetic Target Watchdog Device&nbsp;--&nbsp;Emulate watchdog hardware in the synthetic target</DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN7"
+></A
+><H2
+>Overview</H2
+><P
+>Some target hardware comes equipped with a watchdog timer. Application
+code can start this timer and after a certain period of time,
+typically a second, the watchdog will trigger. Usually this causes the
+hardware to reboot. The application can prevent this by regularly
+resetting the watchdog. An automatic reboot can be very useful when
+deploying hardware in the field: a hardware glitch could cause the
+unit to hang; or the software could receive an unexpected sequence of
+inputs, never seen in the laboratory, causing the system to lock up.
+Often the hardware is still functional, and a reboot sorts out the
+problem with only a brief interruption in service.
+ </P
+><P
+>The synthetic target watchdog package emulates watchdog hardware.
+During system initialization watchdog device will be instantiated,
+and the <TT
+CLASS="FILENAME"
+>watchdog.tcl</TT
+> script will be loaded by the
+I/O auxiliary. When the eCos application starts the watchdog device,
+the <TT
+CLASS="FILENAME"
+>watchdog.tcl</TT
+> script will start checking the
+state of the eCos application at one second intervals. A watchdog
+reset call simply involves a message to the I/O auxiliary. If the
+<TT
+CLASS="FILENAME"
+>watchdog.tcl</TT
+> script detects that a second has
+<A
+HREF="devs-watchdog-synth.html#SYNTH-WATCHDOG-WALLCLOCK-ELAPSED"
+>elapsed</A
+>
+without a reset then it will send a <TT
+CLASS="LITERAL"
+>SIGPWR</TT
+> signal
+to the eCos application, causing the latter to terminate. If gdb is
+being used to run the application, the user will get a chance to
+investigate what is happening. This behaviour is different from real
+hardware in that there is no automatic reboot, but the synthetic
+target is used only for development purposes, not deployment in the
+field: if a reboot is desired then this can be achieved very easily
+by using gdb commands to run another instance of the application.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="DEVS-WATCHDOG-SYNTH-INSTALL"
+></A
+><H2
+>Installation</H2
+><P
+>Before a synthetic target eCos application can use a watchdog device
+it is necessary to build and install host-side support. The relevant
+code resides in the <TT
+CLASS="FILENAME"
+>host</TT
+>
+subdirectory of the synthetic target watchdog package, and building it
+involves the standard <B
+CLASS="COMMAND"
+>configure</B
+>,
+<B
+CLASS="COMMAND"
+>make</B
+> and <B
+CLASS="COMMAND"
+>make install</B
+> steps. The
+implementation of the watchdog support does not require any
+executables, just a Tcl script <TT
+CLASS="FILENAME"
+>watchdog.tcl</TT
+> and
+some support files, so the <B
+CLASS="COMMAND"
+>make</B
+> step is a no-op.
+ </P
+><P
+>There are two main ways of building the host-side software. It is
+possible to build both the generic host-side software and all
+package-specific host-side software, including the watchdog support,
+in a single build tree. This involves using the
+<B
+CLASS="COMMAND"
+>configure</B
+> script at the toplevel of the eCos
+repository. For more information on this, see the
+<TT
+CLASS="FILENAME"
+>README.host</TT
+> file at the top of the repository.
+Note that if you have an existing build tree which does not include
+the synthetic target watchdog support then it will be necessary to
+rerun the toplevel configure script: the search for appropriate
+packages happens at configure time.
+ </P
+><P
+>The alternative is to build just the host-side for this package.
+This requires a separate build directory, building directly in the
+source tree is disallowed. The <B
+CLASS="COMMAND"
+>configure</B
+> options
+are much the same as for a build from the toplevel, and the
+<TT
+CLASS="FILENAME"
+>README.host</TT
+> file can be consulted for more
+details. It is essential that the watchdog support be configured with
+the same <TT
+CLASS="OPTION"
+>--prefix</TT
+> option as other eCos host-side
+software, especially the I/O auxiliary provided by the architectural
+synthetic target HAL package, otherwise the I/O auxiliary will be
+unable to locate the watchdog support.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-WATCHDOG-TARGET-CONFIG"
+></A
+><H2
+>Target-side
+Configuration</H2
+><P
+>The watchdog device depends on the generic watchdog support,
+<TT
+CLASS="VARNAME"
+>CYGPKG_IO_WATCHDOG</TT
+>: if the generic support is
+absent then the watchdog device will be inactive. Some templates
+include this generic package by default, but not all. If the
+configuration does not include the generic package then it can be
+added using the eCos configuration tools, for example:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+>$ ecosconfig add CYGPKG_IO_WATCHDOG</PRE
+></TD
+></TR
+></TABLE
+><P
+>By default the configuration will use the hardware-specific support,
+i.e. this package. However the generic watchdog package contains an
+alternative implementation using the kernel alarm facility, and that
+implementation can be selected if desired. However usually it will be
+better to rely on an external watchdog facility as provided by the I/O
+auxiliary and the <TT
+CLASS="FILENAME"
+>watchdog.tcl</TT
+> script: if there
+are serious problems within the application, for example memory
+corruption, then an internal software-only implementation will not be
+reliable.
+ </P
+><P
+>The watchdog resolution is currently fixed to one second: if the
+device does not receive a reset signal at least once a second then
+the watchdog will trigger and the eCos application will be terminated
+with a <TT
+CLASS="LITERAL"
+>SIGPWR</TT
+> signal. The current implementation
+does not allow this resolution to be changed.
+ </P
+><P
+>On some targets the watchdog device does not perform a hard reset.
+Instead the device works more or less via the interrupt subsystem,
+allowing application code to install action routines that will be
+called when the watchdog triggers. The synthetic target watchdog
+support effectively does perform a hard reset, by sending a
+<TT
+CLASS="LITERAL"
+>SIGPWR</TT
+> signal to the eCos application, and there is
+no support for action routines.
+ </P
+><P
+>The synthetic target watchdog package provides some configuration
+options for manipulating the compiler flags used for building the
+target-side code. That code is fairly simple, so for nearly all
+applications the default flags will suffice.
+ </P
+><P
+>It should be noted that the watchdog device is subject to selective
+linking. Unless some code explicitly references the device, for
+example by calling the start and reset functions, the watchdog support
+will not appear in the final executable. This is desirable because a
+watchdog device has no effect until started.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-WATCHDOG-WALLCLOCK-ELAPSED"
+></A
+><H2
+>Wallclock versus Elapsed Time</H2
+><P
+>On real hardware the watchdog device uses wallclock time: if the
+device does not receive a reset signal within a set period of time
+then the watchdog will trigger. When developing for the synthetic
+target this is not always appropriate. There may be other processes
+running, using up some or most of the cpu time. For example, the
+application may be written such that it will issue a reset after some
+calculations which are known to complete within half a second, well
+within the one-second resolution of the watchdog device. However if
+other Linux processes are running then the synthetic target
+application may get timesliced, and half a second of computation may
+take several seconds of wallclock time.
+ </P
+><P
+>Another problem with using wallclock time is that it interferes with
+debugging: if the application hits a breakpoint then it is unlikely
+that the user will manage to restart it in less than a second, and the
+watchdog will not get reset in time.
+ </P
+><P
+>To avoid these problems the synthetic target watchdog normally uses
+consumed cpu time rather than wallclock time. If the application is
+timesliced or if it is halted inside gdb then it does not consume any
+cpu time. The application actually has to spend a whole second's worth
+of cpu cycles without issuing a reset before the watchdog triggers.
+ </P
+><P
+>However using consumed cpu time is not a perfect solution either. If
+the application makes blocking system calls then it is not using cpu
+time. Interaction with the I/O auxiliary involves system calls, but
+these should take only a short amount of time so their effects can be
+ignored. If the application makes direct system calls such as
+<TT
+CLASS="FUNCTION"
+>cyg_hal_sys_read</TT
+> then the system behaviour
+becomes undefined. In addition by default the idle thread will make
+blocking <TT
+CLASS="FUNCTION"
+>select</TT
+> system calls, effectively waiting
+until an interrupt occurs. If an application spends much of its time
+idle then the watchdog device may take much longer to trigger than
+expected. It may be desirable to enable the synthetic target HAL
+configuration option <TT
+CLASS="VARNAME"
+>CYGIMP_HAL_IDLE_THREAD_SPIN</TT
+>,
+causing the idle thread to spin rather than block, at the cost of
+wasted cpu cycles.
+ </P
+><P
+>The default is to use consumed cpu time, but this can be changed in
+the target definition file:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device watchdog {
+ use wallclock_time
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-WATCHDOG-GUI"
+></A
+><H2
+>User Interface</H2
+><P
+>When the synthetic target is run in graphical mode the watchdog device
+extends the user interface in two ways. The <SPAN
+CLASS="GUIMENU"
+>Help</SPAN
+>
+menu is extended with an entry for the watchdog-specific
+documentation. There is also a graphical display of the current state
+of the watchdog. Initially the watchdog is asleep:
+ </P
+><DIV
+CLASS="INFORMALFIGURE"
+><A
+NAME="AEN60"><P
+></P
+><DIV
+CLASS="MEDIAOBJECT"
+><P
+><IMG
+SRC="asleep.gif"
+ALIGN="CENTER"></P
+></DIV
+><P
+></P
+></DIV
+><P
+>When application code starts the device the watchdog will begin to
+keep an eye on things (or occasionally both eyes).
+ </P
+><DIV
+CLASS="INFORMALFIGURE"
+><A
+NAME="AEN65"><P
+></P
+><DIV
+CLASS="MEDIAOBJECT"
+><P
+><IMG
+SRC="awake.gif"
+ALIGN="CENTER"></P
+></DIV
+><P
+></P
+></DIV
+><P
+>If the watchdog triggers the display will change again, and optionally
+the user can receive an audible alert. The location of the watchdog
+display within the I/O auxiliary's window can be controlled via
+a <B
+CLASS="COMMAND"
+>watchdog_pack</B
+> entry in the target definition
+file. For example the following can be used to put the watchdog
+display to the right of the central text window:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device watchdog {
+ watchdog_pack -in .main.e -side top
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>The user interface section of the generic synthetic target HAL
+documentation can be consulted for more information on window packing.
+ </P
+><P
+>By default the watchdog support will not generate an audible alert
+when the watchdog triggers, to avoid annoying colleagues. Sound can be
+enabled in the target definition file, and two suitable files
+<TT
+CLASS="FILENAME"
+>sound1.au</TT
+> and <TT
+CLASS="FILENAME"
+>sound2.au</TT
+> are
+supplied as standard:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device watchdog {
+ sound sound1.au
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>An absolute path can be specified if desired:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device watchdog {
+ sound /usr/share/emacs/site-lisp/emacspeak/sounds/default-8k/alarm.au
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>Sound facilities are not built into the I/O auxiliary itself, instead
+an external program is used. The default player is
+<B
+CLASS="COMMAND"
+>play</B
+>, a front-end to the
+<SPAN
+CLASS="APPLICATION"
+>sox</SPAN
+> application shipped with some Linux
+distributions. If another player should be used then this can be
+specified in the target definition file:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device watchdog {
+ &#8230;
+ sound_player my_sound_player</PRE
+></TD
+></TR
+></TABLE
+><P
+>The specified program will be run in the background with a single
+argument, the sound file.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="DEVS-WATCHDOG-SYNTH-ARGS"
+></A
+><H2
+>Command Line Arguments</H2
+><P
+>The watchdog support does not use any command line arguments. All
+configuration is handled through the target definition file.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="DEVS-WATCHDOG-SYNTH-HOOKS"
+></A
+><H2
+>Hooks</H2
+><P
+>The watchdog support does not provide any hooks for use by other
+scripts. There is rarely any need for customizing the system's
+behaviour when a watchdog triggers because those should be rare
+events, even during application development.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="DEVS-WATCHDOG-SYNTH-TCL"
+></A
+><H2
+>Additional Tcl Procedures</H2
+><P
+>The watchdog support does not provide any additional Tcl procedures or
+variables for use by other scripts.
+ </P
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/doc/makefile b/cesar/ecos/packages/devs/watchdog/synth/current/doc/makefile
new file mode 100644
index 0000000000..9a36d555cc
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/doc/makefile
@@ -0,0 +1,34 @@
+#=============================================================================
+#
+# makefile
+#
+# For building the synthetic target watchdog package documentation
+#
+#=============================================================================
+#####COPYRIGHTBEGIN####
+#
+# ===============================================================
+# Copyright (C) 2002 Bart Veer
+# This material may be distributed only subject to the terms
+# and conditions set forth in the Open Publication License, v1.0
+# or later (the latest version is presently available at
+# http://www.opencontent.org/openpub/)
+# ===============================================================
+#
+#####COPYRIGHTEND####
+#=============================================================================
+#####DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Date: 2002-09-09
+#####DESCRIPTIONEND####
+#=============================================================================
+
+TOPLEVEL := ../../../../..
+MAIN_SGML := synth_watchdog.sgml
+MAIN_HTML := devs-watchdog-synth.html
+MAIN_PDF := devs-watchdog-synth.pdf
+OTHER_SGML :=
+PICTURES :=
+
+include $(TOPLEVEL)/pkgconf/rules.doc
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/doc/synth_watchdog.sgml b/cesar/ecos/packages/devs/watchdog/synth/current/doc/synth_watchdog.sgml
new file mode 100644
index 0000000000..c4b8594d98
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/doc/synth_watchdog.sgml
@@ -0,0 +1,342 @@
+<!-- DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" -->
+
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- synth_watchdog.sgml -->
+<!-- -->
+<!-- Synthetic target watchdog device -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 2002 Bart Veer -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- Author(s): bartv -->
+<!-- Contact(s): bartv -->
+<!-- Date: 2002/09/09 -->
+<!-- Version: 0.01 -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part id="devs-watchdog-synth-ref">
+<!-- reference id="devs-watchdog-synth-ref" -->
+ <title>Synthetic Target Watchdog Device</title>
+
+<refentry id="devs-watchdog-synth">
+ <refmeta>
+ <refentrytitle>Synthetic Target Watchdog Device</refentrytitle>
+ </refmeta>
+ <refnamediv>
+ <refname>Synthetic Target Watchdog Device</refname>
+ <refpurpose>Emulate watchdog hardware in the synthetic target</refpurpose>
+ </refnamediv>
+
+ <refsect1><title>Overview</title>
+ <para>
+Some target hardware comes equipped with a watchdog timer. Application
+code can start this timer and after a certain period of time,
+typically a second, the watchdog will trigger. Usually this causes the
+hardware to reboot. The application can prevent this by regularly
+resetting the watchdog. An automatic reboot can be very useful when
+deploying hardware in the field: a hardware glitch could cause the
+unit to hang; or the software could receive an unexpected sequence of
+inputs, never seen in the laboratory, causing the system to lock up.
+Often the hardware is still functional, and a reboot sorts out the
+problem with only a brief interruption in service.
+ </para>
+ <para>
+The synthetic target watchdog package emulates watchdog hardware.
+During system initialization watchdog device will be instantiated,
+and the <filename>watchdog.tcl</filename> script will be loaded by the
+I/O auxiliary. When the eCos application starts the watchdog device,
+the <filename>watchdog.tcl</filename> script will start checking the
+state of the eCos application at one second intervals. A watchdog
+reset call simply involves a message to the I/O auxiliary. If the
+<filename>watchdog.tcl</filename> script detects that a second has
+<link linkend="synth-watchdog-wallclock-elapsed">elapsed</link>
+without a reset then it will send a <literal>SIGPWR</literal> signal
+to the eCos application, causing the latter to terminate. If gdb is
+being used to run the application, the user will get a chance to
+investigate what is happening. This behaviour is different from real
+hardware in that there is no automatic reboot, but the synthetic
+target is used only for development purposes, not deployment in the
+field: if a reboot is desired then this can be achieved very easily
+by using gdb commands to run another instance of the application.
+ </para>
+ </refsect1>
+
+ <refsect1 id="devs-watchdog-synth-install"><title>Installation</title>
+ <para>
+Before a synthetic target eCos application can use a watchdog device
+it is necessary to build and install host-side support. The relevant
+code resides in the <filename class="directory">host</filename>
+subdirectory of the synthetic target watchdog package, and building it
+involves the standard <command>configure</command>,
+<command>make</command> and <command>make install</command> steps. The
+implementation of the watchdog support does not require any
+executables, just a Tcl script <filename>watchdog.tcl</filename> and
+some support files, so the <command>make</command> step is a no-op.
+ </para>
+ <para>
+There are two main ways of building the host-side software. It is
+possible to build both the generic host-side software and all
+package-specific host-side software, including the watchdog support,
+in a single build tree. This involves using the
+<command>configure</command> script at the toplevel of the eCos
+repository. For more information on this, see the
+<filename>README.host</filename> file at the top of the repository.
+Note that if you have an existing build tree which does not include
+the synthetic target watchdog support then it will be necessary to
+rerun the toplevel configure script: the search for appropriate
+packages happens at configure time.
+ </para>
+ <para>
+The alternative is to build just the host-side for this package.
+This requires a separate build directory, building directly in the
+source tree is disallowed. The <command>configure</command> options
+are much the same as for a build from the toplevel, and the
+<filename>README.host</filename> file can be consulted for more
+details. It is essential that the watchdog support be configured with
+the same <option>--prefix</option> option as other eCos host-side
+software, especially the I/O auxiliary provided by the architectural
+synthetic target HAL package, otherwise the I/O auxiliary will be
+unable to locate the watchdog support.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-watchdog-target-config"><title>Target-side
+Configuration</title>
+ <para>
+The watchdog device depends on the generic watchdog support,
+<varname>CYGPKG_IO_WATCHDOG</varname>: if the generic support is
+absent then the watchdog device will be inactive. Some templates
+include this generic package by default, but not all. If the
+configuration does not include the generic package then it can be
+added using the eCos configuration tools, for example:
+ </para>
+ <screen>
+$ ecosconfig add CYGPKG_IO_WATCHDOG
+</screen>
+ <para>
+By default the configuration will use the hardware-specific support,
+i.e. this package. However the generic watchdog package contains an
+alternative implementation using the kernel alarm facility, and that
+implementation can be selected if desired. However usually it will be
+better to rely on an external watchdog facility as provided by the I/O
+auxiliary and the <filename>watchdog.tcl</filename> script: if there
+are serious problems within the application, for example memory
+corruption, then an internal software-only implementation will not be
+reliable.
+ </para>
+ <para>
+The watchdog resolution is currently fixed to one second: if the
+device does not receive a reset signal at least once a second then
+the watchdog will trigger and the eCos application will be terminated
+with a <literal>SIGPWR</literal> signal. The current implementation
+does not allow this resolution to be changed.
+ </para>
+ <para>
+On some targets the watchdog device does not perform a hard reset.
+Instead the device works more or less via the interrupt subsystem,
+allowing application code to install action routines that will be
+called when the watchdog triggers. The synthetic target watchdog
+support effectively does perform a hard reset, by sending a
+<literal>SIGPWR</literal> signal to the eCos application, and there is
+no support for action routines.
+ </para>
+ <para>
+The synthetic target watchdog package provides some configuration
+options for manipulating the compiler flags used for building the
+target-side code. That code is fairly simple, so for nearly all
+applications the default flags will suffice.
+ </para>
+ <para>
+It should be noted that the watchdog device is subject to selective
+linking. Unless some code explicitly references the device, for
+example by calling the start and reset functions, the watchdog support
+will not appear in the final executable. This is desirable because a
+watchdog device has no effect until started.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-watchdog-wallclock-elapsed"><title>Wallclock versus Elapsed Time</title>
+ <para>
+On real hardware the watchdog device uses wallclock time: if the
+device does not receive a reset signal within a set period of time
+then the watchdog will trigger. When developing for the synthetic
+target this is not always appropriate. There may be other processes
+running, using up some or most of the cpu time. For example, the
+application may be written such that it will issue a reset after some
+calculations which are known to complete within half a second, well
+within the one-second resolution of the watchdog device. However if
+other Linux processes are running then the synthetic target
+application may get timesliced, and half a second of computation may
+take several seconds of wallclock time.
+ </para>
+ <para>
+Another problem with using wallclock time is that it interferes with
+debugging: if the application hits a breakpoint then it is unlikely
+that the user will manage to restart it in less than a second, and the
+watchdog will not get reset in time.
+ </para>
+ <para>
+To avoid these problems the synthetic target watchdog normally uses
+consumed cpu time rather than wallclock time. If the application is
+timesliced or if it is halted inside gdb then it does not consume any
+cpu time. The application actually has to spend a whole second's worth
+of cpu cycles without issuing a reset before the watchdog triggers.
+ </para>
+ <para>
+However using consumed cpu time is not a perfect solution either. If
+the application makes blocking system calls then it is not using cpu
+time. Interaction with the I/O auxiliary involves system calls, but
+these should take only a short amount of time so their effects can be
+ignored. If the application makes direct system calls such as
+<function>cyg_hal_sys_read</function> then the system behaviour
+becomes undefined. In addition by default the idle thread will make
+blocking <function>select</function> system calls, effectively waiting
+until an interrupt occurs. If an application spends much of its time
+idle then the watchdog device may take much longer to trigger than
+expected. It may be desirable to enable the synthetic target HAL
+configuration option <varname>CYGIMP_HAL_IDLE_THREAD_SPIN</varname>,
+causing the idle thread to spin rather than block, at the cost of
+wasted cpu cycles.
+ </para>
+ <para>
+The default is to use consumed cpu time, but this can be changed in
+the target definition file:
+ </para>
+ <programlisting>
+synth_device watchdog {
+ use wallclock_time
+ &hellip;
+}
+</programlisting>
+ </refsect1>
+
+ <refsect1 id="synth-watchdog-gui"><title>User Interface</title>
+ <para>
+When the synthetic target is run in graphical mode the watchdog device
+extends the user interface in two ways. The <guimenu>Help</guimenu>
+menu is extended with an entry for the watchdog-specific
+documentation. There is also a graphical display of the current state
+of the watchdog. Initially the watchdog is asleep:
+ </para>
+ <informalfigure PgWide=1>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="asleep.png" Scalefit=1 Align="Center">
+ </imageobject>
+ </mediaobject>
+ </informalfigure>
+ <para>
+When application code starts the device the watchdog will begin to
+keep an eye on things (or occasionally both eyes).
+ </para>
+ <informalfigure PgWide=1>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="awake.png" Scalefit=1 Align="Center">
+ </imageobject>
+ </mediaobject>
+ </informalfigure>
+ <para>
+If the watchdog triggers the display will change again, and optionally
+the user can receive an audible alert. The location of the watchdog
+display within the I/O auxiliary's window can be controlled via
+a <command>watchdog_pack</command> entry in the target definition
+file. For example the following can be used to put the watchdog
+display to the right of the central text window:
+ </para>
+ <programlisting>
+synth_device watchdog {
+ watchdog_pack -in .main.e -side top
+ &hellip;
+}
+</programlisting>
+ <para>
+The user interface section of the generic synthetic target HAL
+documentation can be consulted for more information on window packing.
+ </para>
+ <para>
+By default the watchdog support will not generate an audible alert
+when the watchdog triggers, to avoid annoying colleagues. Sound can be
+enabled in the target definition file, and two suitable files
+<filename>sound1.au</filename> and <filename>sound2.au</filename> are
+supplied as standard:
+ </para>
+ <programlisting>
+synth_device watchdog {
+ sound sound1.au
+ &hellip;
+}
+</programlisting>
+ <para>
+An absolute path can be specified if desired:
+ </para>
+ <programlisting>
+synth_device watchdog {
+ sound /usr/share/emacs/site-lisp/emacspeak/sounds/default-8k/alarm.au
+ &hellip;
+}
+</programlisting>
+ <para>
+Sound facilities are not built into the I/O auxiliary itself, instead
+an external program is used. The default player is
+<command>play</command>, a front-end to the
+<application>sox</application> application shipped with some Linux
+distributions. If another player should be used then this can be
+specified in the target definition file:
+ </para>
+ <programlisting>
+synth_device watchdog {
+ &hellip;
+ sound_player my_sound_player
+</programlisting>
+ <para>
+The specified program will be run in the background with a single
+argument, the sound file.
+ </para>
+ </refsect1>
+
+ <refsect1 id="devs-watchdog-synth-args"><title>Command Line Arguments</title>
+ <para>
+The watchdog support does not use any command line arguments. All
+configuration is handled through the target definition file.
+ </para>
+ </refsect1>
+
+ <refsect1 id="devs-watchdog-synth-hooks"><title>Hooks</title>
+ <para>
+The watchdog support does not provide any hooks for use by other
+scripts. There is rarely any need for customizing the system's
+behaviour when a watchdog triggers because those should be rare
+events, even during application development.
+ </para>
+ </refsect1>
+
+ <refsect1 id="devs-watchdog-synth-tcl"><title>Additional Tcl Procedures</title>
+ <para>
+The watchdog support does not provide any additional Tcl procedures or
+variables for use by other scripts.
+ </para>
+ </refsect1>
+
+</refentry>
+</part>
+<!-- /reference -->
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/host/Makefile.am b/cesar/ecos/packages/devs/watchdog/synth/current/host/Makefile.am
new file mode 100644
index 0000000000..946224f305
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/host/Makefile.am
@@ -0,0 +1,61 @@
+## Process this file with automake to produce Makefile.in
+## =====================================================================
+##
+## Makefile.am
+##
+## Build support for the host-side synthetic target support,
+## the watchdog package
+##
+## =====================================================================
+######COPYRIGHTBEGIN####
+#
+# ----------------------------------------------------------------------------
+# Copyright (C) 2002 Bart Veer
+#
+# This file is part of the eCos synthetic target ethernet support.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# ----------------------------------------------------------------------------
+#
+######COPYRIGHTEND####
+## =====================================================================
+#######DESCRIPTIONBEGIN####
+##
+## Author(s): bartv
+## Contact(s): bartv
+## Date: 2002/09/04
+## Version: 0.01
+##
+######DESCRIPTIONEND####
+## =====================================================================
+
+AUTOMAKE_OPTIONS = 1.3 foreign
+
+## Only some platforms are supported. Having the configure script throw
+## an error when attempting to configure on an unsupported platform
+## would be a mistake, since that would prevent any configury from
+## the toplevel on unsupported platforms. Instead an automake conditional
+## is used, leading to null makefiles on unsupported platforms.
+
+if SUPPORTED
+
+## The only thing that needs to be installed is a Tcl script and some
+## data files.
+watchdogdir = $(libexecdir)/ecos/@PACKAGE_INSTALL@
+watchdog_DATA = watchdog.tcl \
+ watchdog.tdf \
+ alarm.gif doghouse.gif eye.gif asleep.gif \
+ sound1.au sound2.au
+endif
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/host/Makefile.in b/cesar/ecos/packages/devs/watchdog/synth/current/host/Makefile.in
new file mode 100644
index 0000000000..f37b7f831b
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/host/Makefile.in
@@ -0,0 +1,289 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+######COPYRIGHTBEGIN####
+#
+# ----------------------------------------------------------------------------
+# Copyright (C) 2002 Bart Veer
+#
+# This file is part of the eCos synthetic target ethernet support.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# ----------------------------------------------------------------------------
+#
+######COPYRIGHTEND####
+#######DESCRIPTIONBEGIN####
+######DESCRIPTIONEND####
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+CC = @CC@
+CXX = @CXX@
+ECOS_REPOSITORY = @ECOS_REPOSITORY@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MSVC_SRCDIR = @MSVC_SRCDIR@
+PACKAGE = @PACKAGE@
+PACKAGE_DIR = @PACKAGE_DIR@
+PACKAGE_INSTALL = @PACKAGE_INSTALL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+VERSION = @VERSION@
+ecos_CFLAGS = @ecos_CFLAGS@
+ecos_CXXFLAGS = @ecos_CXXFLAGS@
+ecos_INCLUDES = @ecos_INCLUDES@
+ecos_LDADD = @ecos_LDADD@
+ecos_LIBS = @ecos_LIBS@
+ecos_infra_incdir = @ecos_infra_incdir@
+ecos_infra_libdir = @ecos_infra_libdir@
+ecos_libcdl_incdir = @ecos_libcdl_incdir@
+ecos_libcdl_libdir = @ecos_libcdl_libdir@
+ecos_tk_includes = @ecos_tk_includes@
+ecos_tk_libs = @ecos_tk_libs@
+
+AUTOMAKE_OPTIONS = 1.3 foreign
+
+@SUPPORTED_TRUE@watchdogdir = @SUPPORTED_TRUE@$(libexecdir)/ecos/@PACKAGE_INSTALL@
+@SUPPORTED_TRUE@watchdog_DATA = @SUPPORTED_TRUE@watchdog.tcl \
+@SUPPORTED_TRUE@ watchdog.tdf \
+@SUPPORTED_TRUE@ alarm.gif doghouse.gif eye.gif asleep.gif \
+@SUPPORTED_TRUE@ sound1.au sound2.au
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../acsupport/mkinstalldirs
+CONFIG_CLEAN_FILES =
+DATA = $(watchdog_DATA)
+
+DIST_COMMON = Makefile.am Makefile.in acinclude.m4 aclocal.m4 configure \
+configure.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
+ cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+install-watchdogDATA: $(watchdog_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(watchdogdir)
+ @list='$(watchdog_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(watchdogdir)/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(watchdogdir)/$$p; \
+ else if test -f $$p; then \
+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(watchdogdir)/$$p"; \
+ $(INSTALL_DATA) $$p $(DESTDIR)$(watchdogdir)/$$p; \
+ fi; fi; \
+ done
+
+uninstall-watchdogDATA:
+ @$(NORMAL_UNINSTALL)
+ list='$(watchdog_DATA)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(watchdogdir)/$$p; \
+ done
+tags: TAGS
+TAGS:
+
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ -rm -rf $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ dc_install_base=`cd $(distdir)/=inst && pwd`; \
+ cd $(distdir)/=build \
+ && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) dist
+ -rm -rf $(distdir)
+ @banner="$(distdir).tar.gz is ready for distribution"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"
+dist: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+dist-all: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+distdir: $(DISTFILES)
+ -rm -rf $(distdir)
+ mkdir $(distdir)
+ -chmod 777 $(distdir)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-watchdogDATA
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-watchdogDATA
+uninstall: uninstall-am
+all-am: Makefile $(DATA)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(watchdogdir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-generic clean-am
+
+distclean: distclean-am
+ -rm -f config.status
+
+maintainer-clean-am: maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+ -rm -f config.status
+
+.PHONY: uninstall-watchdogDATA install-watchdogDATA tags distdir info-am \
+info dvi-am dvi check check-am installcheck-am installcheck \
+install-exec-am install-exec install-data-am install-data install-am \
+install uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/host/acinclude.m4 b/cesar/ecos/packages/devs/watchdog/synth/current/host/acinclude.m4
new file mode 100644
index 0000000000..f63e99273e
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/host/acinclude.m4
@@ -0,0 +1,45 @@
+dnl Process this file with aclocal to get an aclocal.m4 file. Then
+dnl process that with autoconf.
+dnl ====================================================================
+dnl
+dnl acinclude.m4
+dnl
+dnl ====================================================================
+dnl####COPYRIGHTBEGIN####
+dnl
+dnl ----------------------------------------------------------------------------
+dnl Copyright (C) 2002 Bart Veer
+dnl
+dnl This file is part of the eCos host tools.
+dnl
+dnl This program is free software; you can redistribute it and/or modify it
+dnl under the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 of the License, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but WITHOUT
+dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+dnl more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along with
+dnl this program; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+dnl ----------------------------------------------------------------------------
+dnl
+dnl####COPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s): bartv
+dnl Contact(s): bartv
+dnl Date: 2002/09/04
+dnl Version: 0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+dnl Access shared macros.
+dnl AM_CONDITIONAL needs to be mentioned here or else aclocal does not
+dnl incorporate the macro into aclocal.m4
+sinclude(../../../../../../acsupport/acinclude.m4)
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/host/aclocal.m4 b/cesar/ecos/packages/devs/watchdog/synth/current/host/aclocal.m4
new file mode 100644
index 0000000000..43f850e558
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/host/aclocal.m4
@@ -0,0 +1,183 @@
+dnl aclocal.m4 generated automatically by aclocal 1.4-p5
+
+dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+dnl Process this file with aclocal to get an aclocal.m4 file. Then
+dnl process that with autoconf.
+dnl ====================================================================
+dnl
+dnl acinclude.m4
+dnl
+dnl ====================================================================
+dnl####COPYRIGHTBEGIN####
+dnl
+dnl ----------------------------------------------------------------------------
+dnl Copyright (C) 2002 Bart Veer
+dnl
+dnl This file is part of the eCos host tools.
+dnl
+dnl This program is free software; you can redistribute it and/or modify it
+dnl under the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 of the License, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but WITHOUT
+dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+dnl more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along with
+dnl this program; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+dnl ----------------------------------------------------------------------------
+dnl
+dnl####COPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s): bartv
+dnl Contact(s): bartv
+dnl Date: 2002/09/04
+dnl Version: 0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+dnl Access shared macros.
+dnl AM_CONDITIONAL needs to be mentioned here or else aclocal does not
+dnl incorporate the macro into aclocal.m4
+sinclude(../../../../../../acsupport/acinclude.m4)
+
+# Define a conditional.
+
+AC_DEFUN([AM_CONDITIONAL],
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi])
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AC_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "[$]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "[$]*" != "X $srcdir/configure conftestfile" \
+ && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "[$]2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN([AM_MISSING_PROG],
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+ $1=$2
+ AC_MSG_RESULT(found)
+else
+ $1="$3/missing $2"
+ AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
+
+# serial 1
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT($USE_MAINTAINER_MODE)
+ AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST(MAINT)dnl
+]
+)
+
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/host/alarm.gif b/cesar/ecos/packages/devs/watchdog/synth/current/host/alarm.gif
new file mode 100644
index 0000000000..2c8c318b2c
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/host/alarm.gif
Binary files differ
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/host/asleep.gif b/cesar/ecos/packages/devs/watchdog/synth/current/host/asleep.gif
new file mode 100644
index 0000000000..24f4382d3b
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/host/asleep.gif
Binary files differ
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/host/configure b/cesar/ecos/packages/devs/watchdog/synth/current/host/configure
new file mode 100755
index 0000000000..006c9f222e
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/host/configure
@@ -0,0 +1,1171 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=watchdog.tcl
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../../../../acsupport $srcdir/../../../../../../acsupport; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in ../../../../../../acsupport $srcdir/../../../../../../acsupport" 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+
+ echo $ac_n "checking that a separate build tree is being used""... $ac_c" 1>&6
+echo "configure:551: checking that a separate build tree is being used" >&5
+ ecos_cwd=`/bin/pwd`
+ if test "${srcdir}" = "." ; then
+ srcdir=${ecos_cwd}
+ fi
+ if test "${ecos_cwd}" = "${srcdir}" ; then
+ echo "$ac_t""no" 1>&6
+ { echo "configure: error: This configure script should not be run inside the source tree. Instead please use a separate build tree" 1>&2; exit 1; }
+ else
+ echo "$ac_t""yes" 1>&6
+ fi
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:570: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:602: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:655: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "$*" != "X $srcdir/configure conftestfile" \
+ && test "$*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+ fi
+
+ test "$2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+else
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:712: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+PACKAGE=eCos_synthetic_target_watchdog
+
+VERSION=0.1
+
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
+
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
+echo "configure:751: checking for working aclocal" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+ ACLOCAL=aclocal
+ echo "$ac_t""found" 1>&6
+else
+ ACLOCAL="$missing_dir/missing aclocal"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:764: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+ AUTOCONF=autoconf
+ echo "$ac_t""found" 1>&6
+else
+ AUTOCONF="$missing_dir/missing autoconf"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake""... $ac_c" 1>&6
+echo "configure:777: checking for working automake" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (automake --version) < /dev/null > /dev/null 2>&1; then
+ AUTOMAKE=automake
+ echo "$ac_t""found" 1>&6
+else
+ AUTOMAKE="$missing_dir/missing automake"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:790: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+ AUTOHEADER=autoheader
+ echo "$ac_t""found" 1>&6
+else
+ AUTOHEADER="$missing_dir/missing autoheader"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:803: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+ MAKEINFO=makeinfo
+ echo "$ac_t""found" 1>&6
+else
+ MAKEINFO="$missing_dir/missing makeinfo"
+ echo "$ac_t""missing" 1>&6
+fi
+
+
+echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
+echo "configure:817: checking whether to enable maintainer-specific portions of Makefiles" >&5
+ # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+ enableval="$enable_maintainer_mode"
+ USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
+
+
+if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+case "${host}" in
+ i[34567]86-*-linux-gnu* ) SUPPORTED="yes";;
+ * ) SUPPORTED="no"
+esac
+
+
+if test "${SUPPORTED}" = "yes"; then
+ SUPPORTED_TRUE=
+ SUPPORTED_FALSE='#'
+else
+ SUPPORTED_TRUE='#'
+ SUPPORTED_FALSE=
+fi
+
+if test "${SUPPORTED}" = "yes" ; then
+
+
+ package_dir=`cd ${srcdir} && /bin/pwd`
+ PACKAGE_VERSION=`dirname ${package_dir}`
+ PACKAGE_VERSION=`basename ${PACKAGE_VERSION}`
+
+ package_dir=`dirname ${package_dir}`
+ package_dir=`dirname ${package_dir}`
+
+ possibles="${package_dir}/.. ${package_dir}/../.. ${package_dir}/../../.. ${package_dir}/../../../.."
+ possibles="${possibles} ${package_dir}/../../../../.. ${package_dir}/../../../../../.."
+
+ repository_root=""
+ for i in ${possibles}; do
+ if test -d "$i/"acsupport""; then
+ repository_root=$i
+ break
+ fi
+ done
+
+ if test "${repository_root}" = "" ; then
+ { echo "configure: error: Failed to identify this package's position within the eCos repository" 1>&2; exit 1; }
+ fi
+ ECOS_REPOSITORY=`cd "${repository_root}/packages/pkgconf/.." && /bin/pwd`
+
+ PACKAGE_DIR=`echo ${package_dir} | sed -e "s:${ECOS_REPOSITORY}/::"`
+
+ PACKAGE_INSTALL="${PACKAGE_DIR}/${PACKAGE_VERSION}"
+
+
+
+
+
+
+fi
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "Makefile:Makefile.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
+s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
+s%@MAINT@%$MAINT%g
+s%@SUPPORTED_TRUE@%$SUPPORTED_TRUE%g
+s%@SUPPORTED_FALSE@%$SUPPORTED_FALSE%g
+s%@ECOS_REPOSITORY@%$ECOS_REPOSITORY%g
+s%@PACKAGE_DIR@%$PACKAGE_DIR%g
+s%@PACKAGE_VERSION@%$PACKAGE_VERSION%g
+s%@PACKAGE_INSTALL@%$PACKAGE_INSTALL%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile:Makefile.in"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/host/configure.in b/cesar/ecos/packages/devs/watchdog/synth/current/host/configure.in
new file mode 100644
index 0000000000..466341ead5
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/host/configure.in
@@ -0,0 +1,73 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl ====================================================================
+dnl
+dnl configure.in
+dnl
+dnl configure script for eCos synthetic target watchdog
+dnl host-side support
+dnl
+dnl ====================================================================
+dnl####COPYRIGHTBEGIN####
+dnl
+dnl ----------------------------------------------------------------------------
+dnl Copyright (C) 2002 Bart Veer
+dnl
+dnl This file is part of the eCos synthetic target support.
+dnl
+dnl This program is free software; you can redistribute it and/or modify it
+dnl under the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 of the License, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but WITHOUT
+dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+dnl more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along with
+dnl this program; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+dnl ----------------------------------------------------------------------------
+dnl
+dnl####COPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s): bartv
+dnl Contact(s): bartv
+dnl Date: 2002/09/04
+dnl Version: 0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+
+AC_INIT(watchdog.tcl)
+
+dnl Pick up the support files from the top-level acsupport directory.
+AC_CONFIG_AUX_DIR(../../../../../../acsupport)
+
+ECOS_CHECK_BUILD_ne_SRC
+AC_CANONICAL_HOST
+AM_INIT_AUTOMAKE(eCos_synthetic_target_watchdog,0.1,0)
+AM_MAINTAINER_MODE
+
+dnl The current version of the synthetic target is implemented only for
+dnl x86 Linux platforms, so a test is appropriate here. However
+dnl it is not a good idea for the configure script to report an error:
+dnl that would prevent any top-level configury working for other
+dnl platforms. Instead an automake conditional is used to suppress adding
+dnl targets to the build.
+case "${host}" in
+ i[[34567]]86-*-linux-gnu* ) SUPPORTED="yes";;
+ * ) SUPPORTED="no"
+esac
+AM_CONDITIONAL(SUPPORTED, test "${SUPPORTED}" = "yes")
+
+dnl The watchdog host-side support only involves a Tcl
+dnl script and data files, so nothing needs to be compiled
+if test "${SUPPORTED}" = "yes" ; then
+ ECOS_PACKAGE_DIRS
+fi
+
+AC_OUTPUT(Makefile:Makefile.in)
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/host/doghouse.gif b/cesar/ecos/packages/devs/watchdog/synth/current/host/doghouse.gif
new file mode 100644
index 0000000000..a9ba8a6ef4
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/host/doghouse.gif
Binary files differ
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/host/doghouse.pov b/cesar/ecos/packages/devs/watchdog/synth/current/host/doghouse.pov
new file mode 100644
index 0000000000..e353a6f6dd
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/host/doghouse.pov
@@ -0,0 +1,161 @@
+// A simple "doghouse" picture, used for the synthetic target
+// watchdog device host-side.
+//
+// This file is normally built using the following command line:
+//
+// x-povray +Idoghouse.pov +W128 +H128 +D +Q9 +AM2 +A0.9 +FP
+
+#include "consts.inc"
+#include "colors.inc"
+#include "shapes.inc"
+#include "textures.inc"
+#include "skies.inc"
+#include "woods.inc"
+
+camera {
+ location <4.5, 2.2, -5>
+ look_at <2, 2, 2>
+}
+
+light_source {
+ <7, 4, -1.5>
+ color White
+}
+
+sky_sphere { S_Cloud2 scale 2 }
+background { colour LightBlue }
+
+plane {
+ y 0
+ texture {
+ pigment { color red 0.5 green 0.98 blue 0 turbulence 0.5}
+ normal { bumps 0.4 scale 0.1 }
+ }
+}
+
+fog {
+ distance 40
+ fog_type Ground_Fog
+ fog_offset 1
+ fog_alt 1
+ colour rgbf<0, 0.2, 0.2, 0.3>
+ turbulence 0.2
+}
+
+// A plank is a 1x1x0.1 block with a corner at the origin. The edges are
+// slightly rounded, to make sure that the plank boundaries are just
+// about visible.
+#declare Plank =
+ superellipsoid { <0.03,0.03> scale <0.5,0.5,0.05> translate <0.5,0.5,0.05> texture { T_Wood10 } }
+
+// A variant, for the roof
+#declare RoofPlank =
+ superellipsoid { <0.05,0.05> scale <0.5,0.5,0.05> translate <0.5,0.5,0.05> texture { T_Wood14 } }
+
+// The front and back, a rectangle with a triangle on top.
+// Going clockwise from the bottom left, the coordinates are:
+// <0,0> <0,3.2>, <2.4.5>, <4,3.2>, <4.0>
+// Each is made from five horizontal planks.
+//
+// Note: this doghouse is not intended to be an example of good
+// woodworking. For example, butt joints for the walls are a bad idea.
+// Most importantly the roof should involve lapped joints with a
+// sensible ridge, the current construction is not going to keep the
+// rain out.
+#declare RoofAngle = degrees(atan2(1.3,2));
+#declare RoofAngleR = atan2(1.3,2);
+
+#declare FrontBack =
+ difference {
+ union {
+ object { Plank scale <4,1,1> translate <0,0,0> }
+ object { Plank scale <4,1,1> translate <0,1,0> }
+ object { Plank scale <4,1,1> translate <0,2,0> }
+ object { Plank scale <4,1,1> translate <0,3,0> }
+ object { Plank scale <4,1,1> translate <0,4,0> }
+ }
+ union {
+ box { <0,0,0> <4,4,1> rotate <0,0,RoofAngle> translate <0,3.2,-0.5> }
+ box { <0,0,0> <4,4,1> rotate <0,0, -1 * RoofAngle> translate <2,4.5,-0.5> }
+ pigment { Black }
+ }
+ }
+
+// The front also has some text to name the dog, and a
+// cutout for the opening.
+object {
+ difference {
+ object { FrontBack }
+ union {
+ text {
+ ttf "cyrvetic.ttf" "FIFI" 0.1 0
+ translate <1.2, 2.8, -0.05>
+ }
+ box { <1,0,-0.5> <3,2.2,0.5> }
+ object {
+ cylinder { <0,0,0> <0,0,1> 1 }
+ scale <1,0.33,1>
+ translate <2,2.2,-0.5>
+ }
+ pigment { Black }
+ }
+ }
+}
+
+// The back, nothing fancy needed here. The doghouse is twice
+// as deep as it is wide.
+object { FrontBack translate <0,0,8> }
+
+// A floor, to prevent any bright grass showing inside
+box { <0.05,0,0.05> <3.95,0.05,7.95> texture { T_Wood3 } }
+
+// LHS
+object { Plank scale <8,1,1> rotate <0,-90,0> translate <0,0,0.1> }
+object { Plank scale <8,1,1> rotate <0,-90,0> translate <0,1,0.1> }
+object { Plank scale <8,1,1> rotate <0,-90,0> translate <0,2,0.1> }
+
+// RHS
+object { Plank scale <8,1,1> rotate <0,-90,0> translate <4,0,0.1> }
+object { Plank scale <8,1,1> rotate <0,-90,0> translate <4,1,0.1> }
+object { Plank scale <8,1,1> rotate <0,-90,0> translate <4,2,0.1> }
+
+// Now for the roof. The top of the roof is at <2,4.5,0>, and the
+// corners are at <0,3.2,0> and <4,3.2,0>. The planks are 0.1 units
+// thick.
+
+#declare RoofPlank =
+ superellipsoid { <0.05,0.05> scale <0.5,0.5,0.05> translate <0.5,0.5,0.05> texture { T_Wood14 } }
+
+#declare RoofPlank_L = object {
+ RoofPlank
+ rotate <0, -90, RoofAngle - 90>
+ scale<1,1,8.5>
+}
+
+#declare RoofPlank_R = object {
+ RoofPlank
+ rotate <0, -90, -90 - RoofAngle>
+ scale<1,1,8.5>
+}
+
+object { RoofPlank_L translate<2 - (1 * cos(RoofAngleR)), 4.5 - (1 * sin(RoofAngleR)), -0.25> }
+object { RoofPlank_L translate<2 - (2 * cos(RoofAngleR)), 4.5 - (2 * sin(RoofAngleR)), -0.25> }
+object { RoofPlank_L translate<2 - (3 * cos(RoofAngleR)), 4.5 - (3 * sin(RoofAngleR)), -0.25> }
+
+object { RoofPlank_R translate<2 + (-0.1 * cos(RoofAngleR)), 4.5 - (-0.1 * sin(RoofAngleR)), -0.25> }
+object { RoofPlank_R translate<2 + (0.9 * cos(RoofAngleR)), 4.5 - (0.9 * sin(RoofAngleR)), -0.25> }
+object { RoofPlank_R translate<2 + (1.9 * cos(RoofAngleR)), 4.5 - (1.9 * sin(RoofAngleR)), -0.25> }
+
+// And just for fun, a dog bowl.
+object {
+ merge {
+ difference {
+ torus { 1.0 0.5 }
+ box { <-1,-1,-1> <1,0,1> pigment { Black } }
+ }
+ cylinder { <0,0,0> <0,0.2,0> 0.9 }
+ }
+ scale <0.5,0.5,0.5>
+ translate <-0.5,0,-0.7>
+ pigment { Yellow }
+}
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/host/eye.gif b/cesar/ecos/packages/devs/watchdog/synth/current/host/eye.gif
new file mode 100644
index 0000000000..520f5eabc4
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/host/eye.gif
Binary files differ
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/host/sound1.au b/cesar/ecos/packages/devs/watchdog/synth/current/host/sound1.au
new file mode 100644
index 0000000000..156af9a52f
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/host/sound1.au
Binary files differ
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/host/sound2.au b/cesar/ecos/packages/devs/watchdog/synth/current/host/sound2.au
new file mode 100644
index 0000000000..f188581937
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/host/sound2.au
Binary files differ
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/host/watchdog.tcl b/cesar/ecos/packages/devs/watchdog/synth/current/host/watchdog.tcl
new file mode 100644
index 0000000000..1b89c67f3c
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/host/watchdog.tcl
@@ -0,0 +1,425 @@
+# {{{ Banner
+
+# ============================================================================
+#
+# watchdog.tcl
+#
+# Watchdog support for the eCos synthetic target I/O auxiliary
+#
+# ============================================================================
+# ####COPYRIGHTBEGIN####
+#
+# ----------------------------------------------------------------------------
+# Copyright (C) 2002 Bart Veer
+#
+# This file is part of the eCos host tools.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# ----------------------------------------------------------------------------
+#
+# ####COPYRIGHTEND####
+# ============================================================================
+# #####DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Contact(s): bartv
+# Date: 2002/09/04
+# Version: 0.01
+# Description:
+# Implementation of the watchdog device. This script should only ever
+# be run from inside the ecosynth auxiliary.
+#
+# ####DESCRIPTIONEND####
+# ============================================================================
+
+# }}}
+
+namespace eval watchdog {
+
+ # Was initialization successful?
+ variable init_ok 1
+
+ # Has the alarm triggered?
+ variable alarm_triggered 0
+
+ # The eCos application process id. This is needed to send a SIGPWR signal
+ # if the watchdog triggers, and to access /proc/<pid>/stat to obtain
+ # timing information. Strictly speaking _ppid is not exported by
+ # the I/O auxiliary.
+ if { ! [info exists synth::_ppid] } {
+ synth::report_error "Watchdog initialization failed, _ppid variable required"
+ return ""
+ }
+ variable ecos_pid $synth::_ppid
+
+ # Resolution, i.e. how long to go between checks. Currently this is hard-wired
+ # to one second, or 1000 ms. This may become configurable, either on the
+ # target-side via CDL or on the host-side via the target definition file.
+ # Note that currently the watchdog device and the GUI get updated via the
+ # same timer. If the resolution is changed to e.g. 10 seconds then it might
+ # be a good idea to update the GUI more frequently, although there are
+ # arguments for keeping the animation in step with the real work.
+ variable resolution 1000
+
+ # Options from the target definition file
+ variable use_wallclock 0
+ variable window_pack "-in .main.n -side right"
+ variable sound_file ""
+ variable sound_player "play"
+
+ if { [synth::tdf_has_device "watchdog"] } {
+ if { [synth::tdf_has_option "watchdog" "use"] } {
+ set _use [synth::tdf_get_option "watchdog" "use"]
+ if { "wallclock_time" == $_use } {
+ set watchdog::use_wallclock 1
+ } elseif { "consumed_cpu_time" == $_use } {
+ set watchdog::use_wallclock 0
+ } else {
+ synth::report_error "Invalid entry in target definition file $synth::target_definition\n\
+ \ Device watchdog, option \"use\" should be \"wallclock_time\" or \"consumed_cpu_time\"\n"
+ }
+ unset _use
+ }
+ if { [synth::tdf_has_option "watchdog" "watchdog_pack"] } {
+ set watchdog::window_pack [synth::tdf_get_option "watchdog" "watchdog_pack"]
+ # Too complicated to validate here, instead leave it to a catch statement
+ # when the window actually gets packed
+ }
+ if { [synth::tdf_has_option "watchdog" "sound"] } {
+ set _sound_file [synth::tdf_get_option "watchdog" "sound"]
+ # Look for this sound file in the install tree first, then absolute or relative
+ if { [file exists [file join $synth::device_install_dir $_sound_file] ] } {
+ set _sound_file [file join $synth::device_install_dir $_sound_file]
+ }
+ if { ![file exists $_sound_file] } {
+ synth::report_error "Invalid entry in target definition file $synth::target_definition\n\
+ \ Device watchdog, option \"sound\", failed to find $_sound_file\n"
+ } elseif { ! [file readable $_sound_file] } {
+ synth::report_error "Invalid entry in target definition file $synth::target_definition\n\
+ \ Device watchdog, option \"sound\", no read access to file $_sound_file\n"
+ } else {
+ set watchdog::sound_file $_sound_file
+ }
+ unset _sound_file
+ }
+ if { [synth::tdf_has_option "watchdog" "sound_player"] } {
+ set watchdog::sound_player [synth::tdf_get_option "watchdog" "sound_player"]
+ }
+ }
+
+ # There is no point in creating the watchdog window if any of the image files are missing
+ if { $synth::flag_gui } {
+ foreach _image [list "doghouse.gif" "alarm.gif" "eye.gif" "asleep.gif"] {
+ variable image_[file rootname $_image]
+ if { ! [synth::load_image "watchdog::image_[file rootname $_image]" [file join $synth::device_install_dir $_image]] } {
+ synth::report_error "Watchdog device, unable to load image $_image\n\
+ \ This file should have been installed in $synth::device_install_dir\n"
+ set watchdog::init_ok 0
+ }
+ }
+ }
+ if { $synth::flag_gui && $watchdog::init_ok } {
+ canvas .watchdog -width [image width $image_doghouse] -height [image height $image_doghouse] \
+ -borderwidth 0
+ variable background [.watchdog create image 0 0 -anchor nw -image $image_doghouse]
+
+ # Eye positions inside the doghouse. The eye is an 8x10 gif,
+ # mostly white but transparent around the corners
+ variable left_eye_x 48
+ variable left_eye_y 70
+ variable right_eye_x 58
+ variable right_eye_y 70
+
+ # Pupil positions relative to the eye. The pupils are 3x3 rectangles.
+ # The dog can look in one of nine different directions, with both eyes
+ # looking in the same direction (if visible)
+ variable pupil_positions { { 1 6 } { 1 5 } { 1 3 } { 3 1 } { 3 4 } { 3 6 } { 4 3 } { 4 5 } { 4 6 } }
+
+ # Which eyes are currently visible: none, left, right or both
+ variable eyes "none"
+ # What is the current pupil position?
+ variable pupils 4
+
+ variable left_eye [.watchdog create image $left_eye_x $left_eye_y -anchor nw -image $image_eye]
+ variable right_eye [.watchdog create image $right_eye_x $right_eye_y -anchor nw -image $image_eye]
+
+ variable left_pupil \
+ [.watchdog create rectangle \
+ [expr $left_eye_x + [lindex [lindex $pupil_positions $pupils] 0]] \
+ [expr $left_eye_y + [lindex [lindex $pupil_positions $pupils] 1]] \
+ [expr $left_eye_x + [lindex [lindex $pupil_positions $pupils] 0] + 2] \
+ [expr $left_eye_y + [lindex [lindex $pupil_positions $pupils] 1] + 2] \
+ -fill black]
+ variable right_pupil \
+ [.watchdog create rectangle \
+ [expr $right_eye_x + [lindex [lindex $pupil_positions $pupils] 0]] \
+ [expr $right_eye_y + [lindex [lindex $pupil_positions $pupils] 1]] \
+ [expr $right_eye_x + [lindex [lindex $pupil_positions $pupils] 0] + 2] \
+ [expr $right_eye_y + [lindex [lindex $pupil_positions $pupils] 1] + 2] \
+ -fill black]
+
+
+ # The dog is asleep until the eCos application activates the watchdog device
+ .watchdog lower $left_eye $background
+ .watchdog lower $right_eye $background
+ .watchdog lower $left_pupil $background
+ .watchdog lower $right_pupil $background
+
+ # Prepare for an alarm, but obviously the alarm picture should be hidden for now.
+ variable alarm [.watchdog create image 30 56 -anchor nw -image $image_alarm]
+ .watchdog lower $alarm $background
+
+ # Start asleep
+ variable asleep [.watchdog create image 48 70 -anchor nw -image $image_asleep]
+
+ # Now try to pack the watchdog window using the option provided by the
+ # user. If that fails, report the error and pack in a default window.
+ if { [catch { eval pack .watchdog $watchdog::window_pack } message] } {
+ synth::report_error "Watchdog device, failed to pack window in $watchdog::window_pack\n $message"
+ pack .watchdog -in .main.n -side right
+ }
+
+ # Updating the display. This happens once a second.
+ # If neither eye is visible, choose randomly between
+ # left-only, right-only or both. Otherwise there is
+ # a one in eight chance of blinking, probably switching
+ # to one of the other eye modes
+ #
+ # Also, the visible pupil(s) will move every second, to one
+ # of nine positions
+ proc gui_update { } {
+
+ if { "none" == $watchdog::eyes} {
+ set rand [expr int(3 * rand())]
+ if { 0 == $rand } {
+ set watchdog::eyes "left"
+ .watchdog raise $watchdog::left_eye $watchdog::background
+ .watchdog raise $watchdog::left_pupil $watchdog::left_eye
+ } elseif { 1 == $rand } {
+ set watchdog::eyes "right"
+ .watchdog raise $watchdog::right_eye $watchdog::background
+ .watchdog raise $watchdog::right_pupil $watchdog::right_eye
+ } else {
+ set watchdog::eyes "both"
+ .watchdog raise $watchdog::left_eye $watchdog::background
+ .watchdog raise $watchdog::left_pupil $watchdog::left_eye
+ .watchdog raise $watchdog::right_eye $watchdog::background
+ .watchdog raise $watchdog::right_pupil $watchdog::right_eye
+ }
+ } else {
+ if { 0 == [expr int(8 * rand())] } {
+ set watchdog::eyes "none"
+ .watchdog lower $watchdog::left_eye $watchdog::background
+ .watchdog lower $watchdog::right_eye $watchdog::background
+ .watchdog lower $watchdog::left_pupil $watchdog::background
+ .watchdog lower $watchdog::right_pupil $watchdog::background
+
+ # There is no point in moving the pupils if both eyes are shut
+ return
+ }
+ }
+
+ set watchdog::pupils [expr int(9 * rand())]
+ set new_pupil_x [lindex [lindex $watchdog::pupil_positions $watchdog::pupils] 0]
+ set new_pupil_y [lindex [lindex $watchdog::pupil_positions $watchdog::pupils] 1]
+
+ if { ("left" == $watchdog::eyes) || ("both" == $watchdog::eyes) } {
+ .watchdog coords $watchdog::left_pupil \
+ [expr $watchdog::left_eye_x + $new_pupil_x] \
+ [expr $watchdog::left_eye_y + $new_pupil_y] \
+ [expr $watchdog::left_eye_x + $new_pupil_x + 2] \
+ [expr $watchdog::left_eye_y + $new_pupil_y + 2]
+ }
+ if { ("right" == $watchdog::eyes) || ("both" == $watchdog::eyes) } {
+ .watchdog coords $watchdog::right_pupil \
+ [expr $watchdog::right_eye_x + $new_pupil_x] \
+ [expr $watchdog::right_eye_y + $new_pupil_y] \
+ [expr $watchdog::right_eye_x + $new_pupil_x + 2] \
+ [expr $watchdog::right_eye_y + $new_pupil_y + 2]
+ }
+ }
+
+ # Cancel the gui display when the eCos application has exited.
+ # The watchdog is allowed to go back to sleep. If the application
+ # exited because of the watchdog then of course the alarm picture
+ # should remain visible, otherwise it would be just a flash.
+ proc gui_cancel { } {
+ .watchdog lower $watchdog::left_eye $watchdog::background
+ .watchdog lower $watchdog::right_eye $watchdog::background
+ .watchdog lower $watchdog::left_pupil $watchdog::background
+ .watchdog lower $watchdog::right_pupil $watchdog::background
+ if { ! $watchdog::alarm_triggered } {
+ .watchdog raise $watchdog::asleep $watchdog::background
+ }
+ }
+
+ # Raise the alarm. This involves hiding the eyes and raising
+ # the alarm picture. If sound is enabled, the sound player
+ # should be invoked
+ proc gui_alarm { } {
+ .watchdog lower $watchdog::asleep $watchdog::background
+ .watchdog lower $watchdog::left_eye $watchdog::background
+ .watchdog lower $watchdog::right_eye $watchdog::background
+ .watchdog lower $watchdog::left_pupil $watchdog::background
+ .watchdog lower $watchdog::right_pupil $watchdog::background
+ .watchdog raise $watchdog::alarm $watchdog::background
+
+ if { "" != $watchdog::sound_file } {
+ # Catch errors on the actual exec, e.g. if the sound player is
+ # invalid, but play the sound in the background. If there are
+ # problems actually playing the sound then the user should
+ # still see a message on stderr. Blocking the entire auxiliary
+ # for a few seconds is not acceptable.
+ if { [catch { eval exec -- $watchdog::sound_player $watchdog::sound_file & } message] } {
+ synth::report_warning "Watchdog device, failed to play alarm sound file\n $message\n"
+ }
+ }
+ }
+
+ set _watchdog_help [file join $synth::device_src_dir "doc" "devs-watchdog-synth.html"]
+ if { ![file readable $_watchdog_help] } {
+ synth::report_warning "Failed to locate synthetic watchdog documentation $_watchdog_help\n\
+ \ Help->Watchdog target menu option disabled.\n"
+ set _watchdog_help ""
+ }
+ if { "" == $_watchdog_help } {
+ .menubar.help add command -label "Watchdog" -state disabled
+ } else {
+ .menubar.help add command -label "Watchdog" -command [list synth::handle_help "file://$_watchdog_help"]
+ }
+ }
+
+ # Now for the real work. By default the watchdog is asleep. The eCos
+ # application can activate it with a start message, which results
+ # in an "after" timer. That runs once a second to check whether or not
+ # the watchdog should trigger, and also updates the GUI.
+ #
+ # The target-side code should perform a watchdog reset at least once
+ # a second, which involves another message to this script and the
+ # setting of the reset_received flag.
+ #
+ # The update handler gets information about the eCos application using
+ # /proc/<pid>/stat (see man 5 proc). The "state" field is important:
+ # a state of T indicates that the application is stopped, probably
+ # inside gdb, so cannot reset the watchdog. The other important field
+ # is utime, the total number of jiffies (0.01 seconds) executed in
+ # user space. The code maintains an open file handle to the /proc file.
+
+ variable reset_received 0
+ variable after_id ""
+ variable proc_stat ""
+ variable last_jiffies 0
+
+ set _filename "/proc/[set watchdog::ecos_pid]/stat"
+ if { [catch { open $_filename "r" } proc_stat ] } {
+ synth::report_error "Watchdog device, failed to open $_filename\n $proc_stat\n"
+ set watchdog::init_ok 0
+ }
+ unset _filename
+
+ proc update { } {
+ set watchdog::after_id [after $watchdog::resolution watchdog::update]
+ if { $synth::flag_gui } {
+ watchdog::gui_update
+ }
+ seek $watchdog::proc_stat 0 "start"
+ set line [gets $watchdog::proc_stat]
+ scan $line "%*d %*s %s %*d %*d %*d %*d %*d %*lu %*lu %*lu %*lu %*lu %lu" state jiffies
+
+ # In theory it is possible to examine the state field (the third argument).
+ # If set to T then that indicates the eCos application is traced or
+ # stopped, probably inside gdb, and it would make sense to act as if
+ # the application had sent a reset. Unfortunately the state also appears
+ # to be set to T if the application is blocked in a system call while
+ # being debugged - including the idle select(), making the test useless.
+ # FIXME: figure out how to distinguish between being blocked inside gdb
+ # and being in a system call.
+ #if { "T" == $state } {
+ # set watchdog::reset_received 1
+ # return
+ #}
+
+ # If there has been a recent reset the eCos application can continue to run for a bit longer.
+ if { $watchdog::reset_received } {
+ set watchdog::last_jiffies $jiffies
+ set watchdog::reset_received 0
+ return
+ }
+
+ # We have not received a reset. If the watchdog is using wallclock time then
+ # that is serious. If the watchdog is using elapsed cpu time then the eCos
+ # application may not actually have consumed a whole second of cpu time yet.
+ if { $watchdog::use_wallclock || (($jiffies - $watchdog::last_jiffies) > ($watchdog::resolution / 10)) } {
+ set watchdog::alarm_triggered 1
+ # Report the situation via the main text window
+ synth::report "Watchdog device: the eCos application has not sent a recent reset\n Raising SIGPWR signal.\n"
+ # Then kill off the eCos application
+ exec kill -PWR $watchdog::ecos_pid
+ # There is no point in another run of the timer
+ after cancel $watchdog::after_id
+ # And if the GUI is running, raise the alarm visually
+ if { $synth::flag_gui } {
+ watchdog::gui_alarm
+ }
+ }
+ }
+
+ # When the eCos application has exited, cancel the timer and
+ # clean-up the GUI. Also get rid of the open file since the
+ # /proc/<pid>/stat file is no longer meaningful
+ proc exit_hook { arg_list } {
+ if { "" != $watchdog::after_id } {
+ after cancel $watchdog::after_id
+ }
+ if { $synth::flag_gui } {
+ watchdog::gui_cancel
+ }
+ close $watchdog::proc_stat
+ }
+ synth::hook_add "ecos_exit" watchdog::exit_hook
+
+ proc handle_request { id reqcode arg1 arg2 reqdata reqlen reply_len } {
+ if { 0x01 == $reqcode } {
+ # A "start" request. If the watchdog has already started,
+ # this request is a no-op. Otherwise a timer is enabled.
+ # This is made to run almost immediately, so that the
+ # GUI gets a quick update. Setting the reset_received flag
+ # ensures that the watchdog will not trigger immediately
+ set watchdog::reset_received 1
+ if { "" == $watchdog::after_id } {
+ set watchdog::after_id [after 1 watchdog::update]
+ }
+ if { $synth::flag_gui } {
+ .watchdog lower $watchdog::asleep $watchdog::background
+ }
+ } elseif { 0x02 == $reqcode } {
+ # A "reset" request. Just set a flag, the update handler
+ # will detect this next time it runs.
+ set watchdog::reset_received 1
+ }
+ }
+
+ proc instantiate { id name data } {
+ return watchdog::handle_request
+ }
+}
+
+if { $watchdog::init_ok } {
+ return watchdog::instantiate
+} else {
+ synth::report "Watchdog cannot be instantiated, initialization failed.\n"
+ return ""
+}
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/host/watchdog.tdf b/cesar/ecos/packages/devs/watchdog/synth/current/host/watchdog.tdf
new file mode 100644
index 0000000000..6a1677da2c
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/host/watchdog.tdf
@@ -0,0 +1,63 @@
+synth_device watchdog {
+
+ ## How should the watchdog device decide that the watchdog has
+ ## triggered, assuming the eCos application has failed to
+ ## reset the device in time. There are two options: wallclock
+ ## time, where the watchdog will trigger after a second
+ ## irrespective of what the eCos application has been doing;
+ ## or consumed cpu time, where the watchdog will only trigger
+ ## if the eCos application has actually run for a whole second.
+ ##
+ ## Using wallclock time matches most real hardware,
+ ## but can give spurious results if there are other processes
+ ## running and consuming cpu cycles. Also, if the user has
+ ## halted the application in gdb then the watchdog will trigger
+ ## even though the application has no chance to reset the
+ ## watchdog.
+ ##
+ ## Using consumed cpu cycles avoids these problems.
+ ## However the default implementation of the idle thread action
+ ## is to block in a select() system call, so if the eCos
+ ## application spends most of its time idling but not resetting
+ ## the watchdog then the device will not trigger. The
+ ## configuration option CYGIMP_HAL_IDLE_THREAD_SPIN can be used
+ ## to change the synthetic target HAL's implementation of the
+ ## idle thread action.
+ ##
+ ## The default is to use consumed_cpu_time. Wallclock time can
+ ## be selected by uncommenting the next line.
+ # use wallclock_time
+ # use consumed_cpu_time
+
+ ## When running in GUI mode there will be a small window showing
+ ## the current state of the watchdog: asleep, watching, or giving
+ ## the alarm. This window can be packed as desired, using one
+ ## of the container frames .main.nw .main.n .main.ne .main.w
+ ## .main.e .main.sw .main.s or .main.se, and with a position of
+ ## left, right, top or bottom. The default is to pack inside the
+ ## .main.n frame, on the right, thus causing the watchdog to
+ ## appear above the central text window.
+ # watchdog_pack -in .main.n -side right
+
+ ## If running in GUI mode, when the watchdog triggers and resets
+ ## the eCos application this will be shown in the display.
+ ## Optionally the watchdog device can also give an audible alert
+ ## when this happens. This is disabled by default to avoid
+ ## annoying co-workers, but can be enabled by specifying a suitable
+ ## sound file. Two such files, sound1.au and sound2.au, are supplied
+ ## with the watchdog device itself. Alternatively the user can
+ ## specify a different sound file using a suitable path
+ # sound sound1.au
+ # sound sound2.au
+ # sound ~/sounds/my_watchdog_alert.au
+
+ ## If sound is enabled then the watchdog device needs some way to
+ ## access the host's sound hardware. Rather than accessing
+ ## /dev/audio or /dev/dsp directly the watchdog.tcl script will
+ ## run an external program. This can avoid complications with
+ ## different sound file formats etc. The default program is
+ ## "play", a front-end to the sox utility, but a different
+ ## program or script can be specified if desired. It will be run
+ ## simply as "<program> <sound file> &"
+ # sound_player play
+}
diff --git a/cesar/ecos/packages/devs/watchdog/synth/current/src/synth_watchdog.cxx b/cesar/ecos/packages/devs/watchdog/synth/current/src/synth_watchdog.cxx
new file mode 100644
index 0000000000..9aac5e4e91
--- /dev/null
+++ b/cesar/ecos/packages/devs/watchdog/synth/current/src/synth_watchdog.cxx
@@ -0,0 +1,159 @@
+//==========================================================================
+//
+// synth_watchdog.cxx
+//
+// Watchdog driver for the synthetic target
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2002 Bart Veer
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting the
+// copyright holder(s).
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 2002-09-04
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/devs_watchdog_synth.h>
+
+#ifdef CYGIMP_WATCHDOG_HARDWARE
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_io.h>
+
+// FIXME: right now the generic watchdog header depends on the
+// kernel. That should be fixed in the watchdog code, but will
+// affect some device drivers as well
+#include <pkgconf/kernel.h>
+#include <cyg/io/watchdog.hxx>
+
+// Protocol between host and target
+#define SYNTH_WATCHDOG_START 0x01
+#define SYNTH_WATCHDOG_RESET 0x02
+
+// The synthetic target's watchdog implementation involves interaction
+// with a watchdog.tcl script running in the I/O auxiliary. The device
+// must be instantiated during system initialization, preferably via
+// a prioritized C++ static constructor. The generic watchdog package
+// does have a static object, but it is not prioritized. If
+// CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG is enabled then that object's
+// constructor would get called too late.
+//
+// Instead a private class is defined here, and once instance is created.
+// That instance gets referenced by the Cyg_Watchdog members, so
+// selective linking does not get in the way. Instantiation happens inside
+// the constructor, and the main Cyg_Watchdog::start() and reset() functions
+// involve passing a message to the host-side.
+//
+// There is an open issue re. resolution. Usually the hardware imposes
+// limits on what resolutions are valid, in fact there may be only one.
+// With the synthetic target it would be possible to configure the
+// desired resolution either on the target-side using a CDL option, or
+// on the host-side using the target definition file. The resolution
+// would have to be fairly coarse, probably at least 0.1 seconds,
+// to allow for communication overheads. It is not clear whether
+// target-side or host-side configuration is more appropriate, so for
+// now a fixed resolution of one second is used.
+
+class _Synth_Watchdog {
+ public:
+ _Synth_Watchdog();
+ ~_Synth_Watchdog() { }
+
+ cyg_uint64 resolution;
+};
+
+// A static instance of the _Synth_Watchdog class, whose constructor will
+// be called at the right time to instantiate host-side support.
+static _Synth_Watchdog _synth_watchdog_object CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_DRIVERS);
+
+// Id for communicating with the watchdog instance in the auxiliary
+static int aux_id = -1;
+
+_Synth_Watchdog::_Synth_Watchdog()
+{
+ // SIGPWR is disabled by default. It has to be reenabled.
+ struct cyg_hal_sys_sigset_t blocked;
+ CYG_HAL_SYS_SIGEMPTYSET(&blocked);
+ CYG_HAL_SYS_SIGADDSET(&blocked, CYG_HAL_SYS_SIGPWR);
+ cyg_hal_sys_sigprocmask(CYG_HAL_SYS_SIG_UNBLOCK, &blocked, (cyg_hal_sys_sigset_t*) 0);
+
+ resolution = 1000000000LL;
+ if (synth_auxiliary_running) {
+ aux_id = synth_auxiliary_instantiate("devs/watchdog/synth",
+ SYNTH_MAKESTRING(CYGPKG_DEVS_WATCHDOG_SYNTH),
+ "watchdog",
+ (const char*) 0,
+ (const char*) 0);
+ }
+}
+
+// Hardware initialization. This has already happened in the
+// _Synth_Watchdog constructor, all that is needed here is to
+// propagate the resolution.
+void
+Cyg_Watchdog::init_hw(void)
+{
+ resolution = _synth_watchdog_object.resolution;
+}
+
+void
+Cyg_Watchdog::start(void)
+{
+ if (synth_auxiliary_running && (-1 != aux_id)) {
+ synth_auxiliary_xchgmsg(aux_id, SYNTH_WATCHDOG_START, 0, 0,
+ (const unsigned char*)0, 0,
+ (int *) 0,
+ (unsigned char*) 0, (int*) 0, 0);
+ }
+}
+
+void
+Cyg_Watchdog::reset()
+{
+ if (synth_auxiliary_running && (-1 != aux_id)) {
+ synth_auxiliary_xchgmsg(aux_id, SYNTH_WATCHDOG_RESET, 0, 0,
+ (const unsigned char*)0, 0,
+ (int *) 0,
+ (unsigned char*) 0, (int*) 0, 0);
+ }
+}
+
+#endif // CYGIMP_WATCHDOG_HARDWARE
diff --git a/cesar/ecos/packages/ecos.db b/cesar/ecos/packages/ecos.db
new file mode 100644
index 0000000000..12ba51acbd
--- /dev/null
+++ b/cesar/ecos/packages/ecos.db
@@ -0,0 +1,674 @@
+package CYGPKG_HAL {
+ alias { "eCos common HAL" hal hal_common }
+ directory hal/common
+ script hal.cdl
+ description "
+The eCos HAL package provide a porting layer for higher-level parts of
+the system such as the kernel and the C library. Each installation
+should have HAL packages for one or more architectures, and for each
+architecture there may be one or more supported platforms. It is
+necessary to select one target architecture and one platform for that
+architecture. There are also a number of configuration options that
+are common to all HAL packages."
+}
+
+package CYGPKG_INFRA {
+ alias { Infrastructure infra }
+ directory infra
+ script infra.cdl
+ description "
+Common types and useful macros.
+Tracing and assertion facilities.
+Package startup options."
+}
+
+package CYGPKG_IO {
+ alias { "I/O sub-system" io }
+ directory io/common
+ script io.cdl
+ description "
+ The eCos system is supplied with a number of different
+ device drivers. This package contains the basic I/O system
+ support which is the basis for all drivers."
+}
+
+package CYGPKG_IO_SERIAL {
+ alias { "Serial device drivers" serial io_serial }
+ directory io/serial
+ script io_serial.cdl
+ description "
+ This package contains drivers for basic I/O services on
+ serial devices."
+}
+
+package CYGPKG_DEVS_FLASH_SYNTH {
+ alias { "Synthetic FLASH memory support" synth_flash flash_synth }
+ directory devs/flash/synth
+ script flash_synth.cdl
+ hardware
+ description "
+ FLASH memory device support for Synthetic target"
+}
+
+package CYGPKG_IO_SERIAL_GENERIC_16X5X {
+ alias { "16x5x compatible serial device drivers"
+ devs_serial_generic_16x5x 16x5x_serial_driver }
+ hardware
+ directory devs/serial/generic/16x5x
+ script ser_generic_16x5x.cdl
+ description "16x5x compatible serial device drivers"
+}
+
+package CYGPKG_DEVS_ETH_PHY {
+ alias { "Generic PHY support" eth_phy_support }
+ hardware
+ directory devs/eth/phy
+ script phy_eth_drivers.cdl
+ description "PHY (ethernet physical transciever) API."
+}
+
+package CYGPKG_IO_FILEIO {
+ alias { "File IO" fileio io_file }
+ directory io/fileio
+ script fileio.cdl
+ description "
+ This package contains the infrastructure for doing POSIX compliant
+ file IO."
+}
+
+package CYGPKG_FS_RAM {
+ alias { "RAM Filesystem" ramfs ram_fs fs_ram }
+ directory fs/ram
+ script ramfs.cdl
+ description "
+ This package contains a RAM resident filesystem."
+}
+
+package CYGPKG_FS_ROM {
+ alias { "ROM Filesystem" romfs rom_fs fs_rom }
+ directory fs/rom
+ script romfs.cdl
+ description "
+ This package contains a ROM resident filesystem."
+}
+
+package CYGPKG_LINUX_COMPAT {
+ alias { "Linux compatibility" linux_compat linuxcompat }
+ directory compat/linux
+ script linux.cdl
+ description "
+eCos supports a basic Linux compatibility Layer providing various
+functions, equivalents or stubs expected by Linux kernel code, for
+assistance in porting drivers and file system code from Linux.
+Note this does not provide Linux compatibility to applications."
+}
+
+package CYGPKG_IO_ETH_DRIVERS {
+ alias { "Common ethernet support" net_drivers eth_drivers CYGPKG_NET_ETH_DRIVERS }
+ directory io/eth
+ script eth_drivers.cdl
+ description "Platform independent ethernet support."
+}
+
+package CYGPKG_IO_USB {
+ alias { "Generic USB support" usb }
+ hardware
+ directory io/usb/common
+ script usb.cdl
+ description "Generic USB support"
+}
+
+package CYGPKG_IO_USB_SLAVE {
+ alias { "Generic USB slave-side support" usbs }
+ hardware
+ directory io/usb/slave
+ script usbs.cdl
+ description "Generic USB slave-side support"
+}
+
+package CYGPKG_IO_USB_SLAVE_ETH {
+ alias { "USB slave-side ethernet class drivers" usbs_eth }
+ directory io/usb/eth/slave
+ script usbs_eth.cdl
+ description "Support for USB peripherals that provide an ethernet-class function"
+}
+
+package CYGPKG_DEVS_USB_SA11X0 {
+ alias { "Device-driver for the SA11X0 on-chip USB support" usb_sa11x0 }
+ hardware
+ directory devs/usb/sa11x0
+ script usbs_sa11x0.cdl
+ description "A device driver for the SA11X0 on-chip USB slave port"
+}
+
+package CYGPKG_DEVS_USB_UPD985XX {
+ alias { usb_upd985xx }
+ hardware
+ directory devs/usb/nec_upd985xx
+ script usbs_upd985xx.cdl
+ description "A device driver for the NEC uPD985xx on-chip USB device"
+}
+
+package CYGPKG_DEVS_ETH_ECOSYNTH {
+ alias { "Synthetic target ethernet driver" ecosyntheth ecosynth_eth_driver }
+ directory devs/eth/synth/ecosynth
+ script syntheth.cdl
+ hardware
+ description "Ethernet driver for the synthetic target"
+}
+
+package CYGPKG_DEVS_ETH_SPARC_LEON {
+ alias { "LEON2 91C111 ethernet support" devs_eth_sparc_leon }
+ hardware
+ directory devs/eth/sparc/leon2
+ script leon2_eth_drivers.cdl
+ description "This package contains hardware support for SMC91C111
+ ethernet device on various LEON2 boards."
+}
+
+package CYGPKG_DEVS_ETH_SPARC_LEON3 {
+ alias { "LEON3 91C111 ethernet support" devs_eth_sparc_leo3n }
+ hardware
+ directory devs/eth/sparc/leon3
+ script leon3_eth_drivers.cdl
+ description "This package contains hardware support for SMC91C111
+ ethernet device running on a LEON3 Soc."
+}
+
+package CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC {
+ alias { "opencore's ethermac support" devs_eth_opencores_ethermac }
+ hardware
+ directory devs/eth/opencores/ethermac
+ script opencores_ethermac_drivers.cdl
+ description "This package contains hardware support for Opencores
+ ethermac."
+}
+
+package CYGPKG_DEVS_ETH_SPARC_OPENCORES_LEON3 {
+ alias { "ethernet support for opencores on Leon3 Soc" devs_eth_sparc_opencores_leon3 }
+ hardware
+ directory devs/eth/sparc/opencores/leon3
+ script leon3_opencores_ethmac_drivers.cdl
+ description "This package contains hardware support for Opencores Ethermac
+ ethernet device on Leon3."
+}
+
+package CYGPKG_DEVS_ETH_GRETH {
+ alias { "Gaisler Research's ethernet mac support" devs_eth_greth }
+ hardware
+ directory devs/eth/greth/
+ script greth_drivers.cdl
+ description "This package contains hardware support for Gaisler Research's GRETH ethernet mac."
+}
+
+package CYGPKG_DEVS_ETH_SPARC_GRETH_LEON3 {
+ alias { "ethernet support for GRETH on Leon3 Soc" devs_eth_sparc_greth_leon3 }
+ hardware
+ directory devs/eth/sparc/greth/leon3
+ script leon3_greth_drivers.cdl
+ description "This package contains hardware support for Gaisler Research's ethernet mac for Leon3."
+}
+
+package CYGPKG_IO_PCI {
+ alias { "PCI configuration library" io_pci }
+ directory io/pci
+ script io_pci.cdl
+ hardware
+ description "
+ This package contains the PCI configuration library."
+}
+
+package CYGPKG_IO_WALLCLOCK {
+ alias { "Wallclock device framework" wallclock io_wallclock devices_wallclock device_wallclock }
+ directory io/wallclock
+ script wallclock.cdl
+ description "
+ This package provides a wallclock device framework. It is
+ also necessary to select an actual driver implementation."
+}
+
+package CYGPKG_DEVS_WALLCLOCK_SYNTH {
+ alias { "Wallclock driver for synthetic target" devs_wallclock_synth wallclock_synth }
+ directory devs/wallclock/synth
+ script wallclock_synth.cdl
+ hardware
+ description "
+ This package provides a wallclock driver implementation for the
+ synthetic target."
+}
+
+package CYGPKG_DEVS_WATCHDOG_SYNTH {
+ alias { "Watchdog driver for the synthetic target" devices_watchdog_synth device_watchdog_synth }
+ directory devs/watchdog/synth
+ script synth_watchdog.cdl
+ hardware
+ description "
+ This package provides a watchdog driver for the eCos
+ synthetic target."
+}
+
+package CYGPKG_IO_WATCHDOG {
+ alias { "Watchdog IO device" watchdog io_watchdog }
+ directory io/watchdog
+ script watchdog.cdl
+ description "
+ This package provides a watchdog device."
+}
+
+package CYGPKG_KERNEL {
+ alias { "eCos kernel" kernel }
+ directory kernel
+ script kernel.cdl
+ description "
+This package contains the core functionality of the eCos kernel. It
+relies on functionality provided by various HAL packages and by the
+eCos infrastructure. In turn the eCos kernel provides support for
+other packages such as the device drivers and the uITRON compatibility
+layer."
+}
+
+package CYGPKG_MEMALLOC {
+ alias { "Dynamic memory allocation" memalloc malloc }
+ directory services/memalloc/common
+ script memalloc.cdl
+ description "
+This package provides memory allocator infrastructure required for
+dynamic memory allocators, including the ISO standard malloc
+interface. It also contains some sample implementations."
+}
+
+package CYGPKG_LOADER {
+ alias { "Dynamic loader" loader dload }
+ directory services/loader
+ script loader.cdl
+ description "
+This package provides support for the dynamic executable and
+library loader."
+}
+
+package CYGPKG_OBJLOADER {
+ alias { "Object file loader" objloader }
+ directory services/objloader
+ script objloader.cdl
+ description "
+This package provides support for the object file loader and relocator."
+}
+
+package CYGPKG_COMPRESS_ZLIB {
+ alias { "Zlib compress/decompress" zlib_compress compress_zlib zlib }
+ directory services/compress/zlib
+ script compress_zlib.cdl
+ description "
+This package provides zlib compression and decompression support."
+}
+
+package CYGPKG_POWER {
+ alias { "Power Management support" power }
+ directory services/power/common
+ script power.cdl
+ description "
+This package provides some generic support for power management."
+}
+
+package CYGPKG_CRC {
+ alias { "CRC support" crc }
+ directory services/crc
+ script crc.cdl
+ description "
+This package provides support for CRC functions, including the
+POSIX 1003 defined CRC algorithm."
+}
+
+package CYGPKG_CPULOAD {
+ alias { "cpuload support" cpuload }
+ directory services/cpuload
+ script cpuload.cdl
+ description "
+This package measures the CPU load over the last 100ms, 1second
+and 10 second. All loads are returned as a percentage, ie 0-100.
+This is only a rough measure."
+}
+
+package CYGPKG_PROFILE_GPROF {
+ alias { "Application profile support" profile_gprof gprof_profile }
+ directory services/profile/gprof
+ script profile_gprof.cdl
+ description "
+This package instruments applications to collect profiling data,
+using a methodology compatible with the gprof utility."
+}
+
+package CYGPKG_EZXML {
+ alias { "ezXML" XML ezxml }
+ directory services/ezxml
+ script ezxml.cdl
+ description "ezXML, Simple XML Parser"
+}
+
+package CYGPKG_ISOINFRA {
+ alias { "ISO C and POSIX infrastructure" isoinfra }
+ directory isoinfra
+ script isoinfra.cdl
+ description "
+eCos supports implementations of ISO C libraries and POSIX implementations.
+This package provides infrastructure used by all such implementations."
+}
+
+package CYGPKG_POSIX {
+ alias { "POSIX compatibility" posix }
+ directory compat/posix
+ script posix.cdl
+ description "
+This package enables compatibility with the ISO/IEEE 1003.1 POSIX
+standard. This allows the user application to use a well known
+standard API, and starts a thread to invoke the user function
+main()"
+}
+
+package CYGPKG_LIBC {
+ alias { "C library" libc clib clibrary }
+ directory language/c/libc/common
+ script libc.cdl
+ description "
+The packages under this package enable compatibility with the ISO C
+standard - ISO/IEC 9899:1990. This allows the user application to use
+well known standard C library functions, and in eCos starts a thread
+to invoke the user function main(). This package is a top-level placeholder
+to contain the implementations."
+}
+
+package CYGPKG_LIBC_I18N {
+ alias { "ISO C library internationalization" libc_i18n }
+ directory language/c/libc/i18n
+ script i18n.cdl
+ description "
+This package provides internationalization functions specified by the
+ISO C standard - ISO/IEC 9899:1990."
+}
+
+package CYGPKG_LIBC_SETJMP {
+ alias { "ISO C library non-local jumps" libc_setjmp }
+ directory language/c/libc/setjmp
+ script setjmp.cdl
+ description "
+This package provides non-local jump functionality specified by the
+ISO C standard - ISO/IEC 9899:1990."
+}
+
+package CYGPKG_LIBC_SIGNALS {
+ alias { "ISO C library signals" libc_signals }
+ directory language/c/libc/signals
+ script signals.cdl
+ description "
+This component controls signal functionality, as implemented in
+ISO/IEC 9899:1990 chapter 7.7 with the signal() and raise() functions.
+As well as allowing a program to send itself signals, it is also
+possible to cause hardware exceptions to be signalled to the program
+in a similar way."
+}
+
+package CYGPKG_LIBC_STARTUP {
+ alias { "ISO environment startup/termination" libc_startup }
+ directory language/c/libc/startup
+ script startup.cdl
+ description "
+ This package manages the control of the
+ environment (in the general sense) that an
+ application would require for full ISO C / POSIX
+ compatibility, including a main() entry point
+ supplied with arguments and an environment
+ (as retrievable by the getenv() function).
+ It also includes at the other end of things,
+ what happens when main() returns or exit() is
+ called."
+}
+
+package CYGPKG_LIBC_STDIO {
+ alias { "ISO C library standard input/output functions" libc_stdio }
+ directory language/c/libc/stdio
+ script stdio.cdl
+ description "
+This package provides standard input/output functions associated
+with the header file <stdio.h> as specified by the
+ISO C standard - ISO/IEC 9899:1990."
+}
+
+package CYGPKG_LIBC_STDLIB {
+ alias { "ISO C library general utility functions" libc_stdlib }
+ directory language/c/libc/stdlib
+ script stdlib.cdl
+ description "
+This package provides general utility functions associated
+with the header file <stdlib.h> as specified by the
+ISO C standard - ISO/IEC 9899:1990."
+}
+
+package CYGPKG_LIBC_STRING {
+ alias { "ISO C library string functions" libc_string }
+ directory language/c/libc/string
+ script string.cdl
+ description "
+This package provides string functions specified by the ISO C standard
+- ISO/IEC 9899:1990."
+}
+
+package CYGPKG_LIBC_TIME {
+ alias { "ISO C library date/time functions" libc_time }
+ directory language/c/libc/time
+ script time.cdl
+ description "
+This package provides date and time manipulation functionality specified
+by the ISO C standard - ISO/IEC 9899:1990."
+}
+
+package CYGPKG_LIBM {
+ alias { "Math library" libm mathlib mathlibrary }
+ directory language/c/libm
+ script libm.cdl
+ description "
+ISO standard floating point mathematical library containing many
+useful functions for mathematical calculations."
+}
+
+package CYGPKG_ERROR {
+ alias { "Common error code support" error errors }
+ directory error
+ script error.cdl
+ description "
+This package contains the common list of error and status codes. It is
+held centrally to allow packages to interchange error codes and status
+codes in a common way, rather than each package having its own
+conventions for error/status reporting. The error codes are modelled
+on the POSIX style naming e.g. EINVAL etc. This package also provides
+the standard strerror() function to convert error codes to textual
+representation, as well as an implementation of the errno idiom."
+}
+
+package CYGPKG_CYGMON {
+ alias { "CygMon support via eCos" cygmon }
+ directory cygmon
+ script cygmon.cdl
+ description "
+ This package supports the CygMon \[stand-alone debug monitor\]
+ using eCos as the underlying board support mechanism."
+}
+
+package CYGPKG_REDBOOT {
+ alias { "RedBoot, the Red Hat bootstrap" cygmon }
+ directory redboot
+ script redboot.cdl
+ description "
+ This package creates the RedBoot \[stand-alone bootstrap & debug monitor\]
+ using eCos as the underlying board support mechanism."
+}
+
+package CYGPKG_HAL_SYNTH {
+ alias { "Linux synthetic target" linux }
+ directory hal/synth/arch
+ script hal_synth.cdl
+ hardware
+ description "
+ The Linux Synthetic Target HAL package provides the
+ support needed to run eCos binaries on top of the i386
+ Linux kernel."
+}
+
+package CYGPKG_HAL_SYNTH_I386 {
+ alias { "Linux/i386 synthetic target" i386_linux }
+ directory hal/synth/i386linux
+ script hal_synth_i386.cdl
+ hardware
+ description "
+ i386 processor-specific support for the Linux synthetic target"
+}
+
+# --------------------------------------------------------------------------
+# Maximus target.
+package CYGPKG_HAL_MAXIMUS {
+ alias { "Linux Maximus target" maximus }
+ directory hal/maximus/arch
+ script hal_maximus.cdl
+ hardware
+ description "
+ The Linux Maximus Target HAL package provides the
+ support needed to communicate with Maximus simulator
+ and to run eCos binaries on top of the i386 Linux kernel."
+}
+
+package CYGPKG_HAL_MAXIMUS_I386 {
+ alias { "Linux/i386 Maximus target" i386_linux_maximus }
+ directory hal/maximus/i386linux
+ script hal_maximus_i386.cdl
+ hardware
+ description "
+ i386 processor-specific support for the Linux Maximus target"
+}
+
+package CYGPKG_HAL_SPARC {
+ alias { "SPARC V7/V8 common HAL" hal_sparc sparc_hal sparc_arch_hal }
+ directory hal/sparc/arch
+ script hal_sparc.cdl
+ hardware
+ description "
+ The SPARC V7/V8 architecture HAL package provides generic support
+ for this processor architecture. It is also necessary to select
+ a specific target platform HAL package."
+}
+
+package CYGPKG_HAL_SPARC_LEON {
+ alias { "LEON processor" hal_sparc_leon sparc_leon_hal }
+ directory hal/sparc/leon
+ script hal_sparc_leon.cdl
+ hardware
+ description "
+ The LEON processor HAL package is provided for use
+ with both real hardware and the TSIM/LEON simulator."
+}
+
+package CYGPKG_HAL_SPARC_LEON3 {
+ alias { "LEON3 processor" hal_sparc_leon3 sparc_leon3_hal }
+ directory hal/sparc/leon3
+ script hal_sparc_leon3.cdl
+ hardware
+ description "
+ Grlib's LEON3 processor HAL package is provided for use
+ with both real hardware and the Grmon simulator."
+}
+
+target linux {
+ alias { "Linux synthetic target" i386linux }
+ packages { CYGPKG_HAL_SYNTH
+ CYGPKG_HAL_SYNTH_I386
+ CYGPKG_DEVS_FLASH_SYNTH
+ CYGPKG_DEVS_ETH_ECOSYNTH
+ CYGPKG_DEVS_WATCHDOG_SYNTH
+ CYGPKG_DEVS_WALLCLOCK_SYNTH
+ }
+ description "
+ The linux target provides the
+ packages needed to run eCos binaries on top of the i386
+ Linux kernel."
+}
+
+# --------------------------------------------------------------------------
+# Maximus targets.
+target maximus {
+ alias { "Linux Maximus target" i386linuxmaximus }
+ packages { CYGPKG_HAL_MAXIMUS
+ CYGPKG_HAL_MAXIMUS_I386
+ CYGPKG_DEVS_FLASH_SYNTH
+ CYGPKG_DEVS_ETH_ECOSYNTH
+ CYGPKG_DEVS_WATCHDOG_SYNTH
+ CYGPKG_DEVS_WALLCLOCK_SYNTH
+ }
+ description "
+ The linux target provides the
+ packages needed to communicate with Maximus simulator
+ and to run eCos binaries on top of the i386 Linux kernel."
+}
+
+
+target sparc_leon {
+ alias { "LEON processor" leon }
+ packages { CYGPKG_HAL_SPARC
+ CYGPKG_HAL_SPARC_LEON
+ }
+ description "
+ The sparc_leon target provides the packages need to run eCos
+ on the LEON processor or TSIM/LEON simulator."
+}
+
+target sparc_leon3 {
+ alias { "LEON3 processor" leon }
+ packages { CYGPKG_HAL_SPARC
+ CYGPKG_HAL_SPARC_LEON3
+ }
+ description "
+ The sparc_leon3 target provides the packages need to run eCos
+ on Grlib's LEON3 processor or the tsim-leon3 simulator."
+}
+
+target sparc_leon3_greth {
+ alias { "LEON3 processor with GRETH ethermac" leon }
+ packages {
+ CYGPKG_HAL_SPARC
+ CYGPKG_HAL_SPARC_LEON3
+ CYGPKG_DEVS_ETH_GRETH
+ CYGPKG_DEVS_ETH_SPARC_GRETH_LEON3
+ }
+ description "
+ The sparc_leon3_net target provides the packages need to run eCos
+ on Grlib's LEON3 processor or the tsim-leon3 simulator. It also adds
+ the driver for the GRETH ethermac. It should be used together with the net template that is: ecosconfig new sparc_leon3_greth net"
+}
+
+target sparc_leon3_openeth {
+ alias { "LEON3 processor with OPENETH ethermac" leon }
+ packages {
+ CYGPKG_HAL_SPARC
+ CYGPKG_HAL_SPARC_LEON3
+ CYGPKG_DEVS_ETH_OPENCORES_ETHERMAC
+ CYGPKG_DEVS_ETH_SPARC_OPENCORES_LEON3
+ }
+ description "
+ The sparc_leon3_net target provides the packages need to run eCos
+ on Grlib's LEON3 processor or the tsim-leon3 simulator. It also adds
+ the driver for the Opencores ethermac. It should be used together with the net template that is: ecosconfig new sparc_leon3_openeth net"
+}
+
+package CYGPKG_BLOCK_LIB {
+ alias { "Block cache and access library" blib block_lib }
+ directory services/blib
+ script blib.cdl
+ description "
+ This package contains the block cache and access library."
+}
+
+
+package CYGPKG_GCOV {
+ alias { "Gcov for ECOS" gcov }
+ directory services/gcov/
+ script services_gcov.cdl
+ description "
+ This package contains the gcov source to use with ecos."
+}
diff --git a/cesar/ecos/packages/ecosadmin.tcl b/cesar/ecos/packages/ecosadmin.tcl
new file mode 100644
index 0000000000..50cbc7c898
--- /dev/null
+++ b/cesar/ecos/packages/ecosadmin.tcl
@@ -0,0 +1,1369 @@
+#!/bin/bash
+# restart using a Tcl shell \
+ exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \
+ ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \
+ done ; \
+ echo "ecosadmin.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@"
+
+# {{{ Banner
+
+#===============================================================================
+#
+# ecosadmin.tcl
+#
+# A package install/uninstall tool.
+#
+#===============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2003 John Dallaway
+## Copyright (C) 2004 eCosCentric Limited
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#===============================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jld
+# Contributors: bartv
+# Date: 1999-06-18
+# Purpose: To install and uninstall packages from an eCos component
+# repository
+# Description:
+# Usage:
+#
+#####DESCRIPTIONEND####
+#===============================================================================
+#
+
+# }}}
+# {{{ Version check
+
+# ----------------------------------------------------------------------------
+# ecosadmin.tcl requires at least version 8.0 of Tcl, since it makes use of
+# namespaces. It is possible that some users still have older versions.
+
+if { [info tclversion] < 8.0 } {
+ puts "This script requires Tcl 8.0 or later. You are running Tcl [info patchlevel]."
+ return
+}
+
+# }}}
+# {{{ Namespace definition
+
+# ----------------------------------------------------------------------------
+# Namespaces. All code and variables in this script are kept in the namespace
+# "ecosadmin". This is not really necessary for stand-alone operation, but if it
+# ever becomes desirable to embed this script in a larger application then
+# using a namespace is a lot easier.
+#
+# As a fringe benefit, all global variables can be declared inside this
+# namespace and initialised.
+#
+
+namespace eval ecosadmin {
+
+ # Is this program running under Windows ?
+ variable windows_host [expr {$tcl_platform(platform) == "windows"}]
+ variable null_device ""
+ if { $windows_host != 0 } {
+ set ecosadmin::null_device "nul"
+ } else {
+ set ecosadmin::null_device "/dev/null"
+ }
+
+
+ # Where is the component repository ? The following input sources
+ # are available:
+ # 1) the environment variable ECOS_REPOSITORY.
+ # 2) $argv0 should correspond to the location of the ecosadmin.tcl
+ # script.
+ #
+ variable component_repository ""
+ if { [info exists ::env(ECOS_REPOSITORY)] } {
+ # override the calculation of the repository location using the
+ # (undocumented) ECOS_REPOSITORY environment variable
+ set component_repository $::env(ECOS_REPOSITORY)
+ } else {
+ set component_repository [pwd]
+ if { [file dirname $argv0] != "." } {
+ set component_repository [file join $component_repository [file dirname $argv0]]
+ }
+ }
+
+ # Details of the command line arguments, if any.
+ variable list_packages_arg 0; # list
+ variable accept_license_arg 0; # --accept_license
+ variable extract_license_arg 0; # --extract_license
+ variable add_package ""; # add FILE
+ variable remove_package ""; # remove PACKAGE
+ variable merge_repository ""; # merge REPOSITORY
+ variable version_arg ""; # --version VER
+
+ # Details of all known packages, targets and templates
+ # read from the ecos.db file
+ variable known_packages ""
+ variable known_targets ""
+ variable known_templates ""
+ array set package_data {};
+ array set target_data {};
+ array set template_data {};
+
+ # List of packages merged from another repository
+ variable merge_packages ""
+
+ # What routines should be invoked for outputting fatal errors and
+ # for warning messages ?
+ variable fatal_error_handler ecosadmin::cli_fatal_error
+ variable warning_handler ecosadmin::cli_warning
+ variable report_handler ecosadmin::cli_report
+
+ # Keep or remove the CVS directories?
+ variable keep_cvs 0
+}
+
+# }}}
+# {{{ Infrastructure
+
+# ----------------------------------------------------------------------------
+# Minimal infrastructure support.
+#
+# There must be some way of reporting fatal errors, of outputting warnings,
+# and of generating report messages. The implementation of these things
+# obviously depends on whether or not TK is present. In addition, if this
+# script is being run inside a larger application then that larger
+# application must be able to install its own versions of the routines.
+#
+# Once it is possible to report fatal errors, an assertion facility becomes
+# feasible.
+#
+# These routines output fatal errors, warnings or miscellaneous messages.
+# Their implementations depend on the mode in which this script is operating.
+#
+proc ecosadmin::fatal_error { msg } {
+ $ecosadmin::fatal_error_handler "$msg"
+}
+
+proc ecosadmin::warning { msg } {
+ $ecosadmin::warning_handler "$msg"
+}
+
+proc ecosadmin::report { msg } {
+ $ecosadmin::report_handler "$msg"
+}
+
+#
+# Command line versions.
+# NOTE: some formatting so that there are linebreaks at ~72 columns would be
+# a good idea.
+#
+proc ecosadmin::cli_fatal_error_handler { msg } {
+ error "$msg"
+}
+
+proc ecosadmin::cli_warning_handler { msg } {
+ puts "ecosadmin warning: $msg"
+}
+
+proc ecosadmin::cli_report_handler { msg } {
+ puts "$msg"
+}
+
+#
+# Determine the default destination for warnings and for fatal errors.
+# After the first call to this function it is possible to use assertions.
+#
+proc ecosadmin::initialise_error_handling { } {
+ set ecosadmin::fatal_error_handler ecosadmin::cli_fatal_error_handler
+ set ecosadmin::warning_handler ecosadmin::cli_warning_handler
+ set ecosadmin::report_handler ecosadmin::cli_report_handler
+}
+
+#
+# These routines can be used by containing programs to provide their
+# own error handling.
+#
+proc ecosadmin::set_fatal_error_handler { fn } {
+ ASSERT { $fn != "" }
+ set ecosadmin::fatal_error_handler $fn
+}
+
+proc ecosadmin::set_warning_handler { fn } {
+ ASSERT { $fn != "" }
+ set ecosadmin::warning_handler $fn
+}
+
+proc ecosadmin::set_report_handler { fn } {
+ ASSERT { $fn != "" }
+ set ecosadmin::report_handler $fn
+}
+
+#
+# A very simple assertion facility. It takes a single argument, an expression
+# that should be evaluated in the calling function's scope, and on failure it
+# should generate a fatal error.
+#
+proc ecosadmin::ASSERT { condition } {
+ set result [uplevel 1 [list expr $condition]]
+
+ if { $result == 0 } {
+ fatal_error "assertion predicate \"$condition\"\nin \"[info level -1]\""
+ }
+}
+
+# }}}
+# {{{ Utilities
+
+# ----------------------------------------------------------------------------
+# cdl_compare_version. This is a partial implementation of the full
+# cdl_compare_version facility defined in the product specification. Its
+# purpose is to order the various versions of a given package with
+# the most recent version first. As a special case, "current" is
+# always considered the most recent.
+#
+# There are similarities between cdl_compare_version and with Tcl's
+# package vcompare, but cdl_compare_version is more general.
+#
+
+proc ecosadmin::cdl_compare_version { arg1 arg2 } {
+
+ if { $arg1 == $arg2 } {
+ return 0
+ }
+ if { $arg1 == "current"} {
+ return -1
+ }
+ if { $arg2 == "current" } {
+ return 1
+ }
+
+ set index1 0
+ set index2 0
+ set ch1 ""
+ set ch2 ""
+ set num1 ""
+ set num2 ""
+
+ while { 1 } {
+
+ set ch1 [string index $arg1 $index1]
+ set ch2 [string index $arg2 $index2]
+ set num1 ""
+ set num2 ""
+
+ if { ($ch1 == "") && ($ch2 == "") } {
+
+ # Both strings have terminated at the same time. There may have
+ # been some spurious leading zeroes in numbers.
+ return 0
+
+ } elseif { $ch1 == "" } {
+
+ # The first string has ended first. If ch2 is a separator then
+ # arg2 is a derived version, e.g. v0.3.p1 and hence newer. Otherwise ch2
+ # is an experimental version v0.3beta and hence older.
+ if { [string match \[-._\] $ch2] } {
+ return 1
+ } else {
+ return -1
+ }
+ } elseif { $ch2 == "" } {
+
+ # Equivalent to the above.
+ if { [string match \[-._\] $ch1] } {
+ return -1
+ } else {
+ return 1
+ }
+ }
+
+ # There is still data to be processed.
+ # Check for both strings containing numbers at the current index.
+ if { ( [string match \[0-9\] $ch1] ) && ( [string match \[0-9\] $ch2] ) } {
+
+ # Extract the entire numbers from the version string.
+ while { [string match \[0-9\] $ch1] } {
+ set num1 "$num1$ch1"
+ incr index1
+ set ch1 [string index $arg1 $index1]
+ }
+ while { [string match \[0-9\] $ch2] } {
+ set num2 "$num2$ch2"
+ incr index2
+ set ch2 [string index $arg2 $index2]
+ }
+
+ if { $num1 < $num2 } {
+ return 1
+ } elseif { $num1 > $num2 } {
+ return -1
+ }
+ continue
+ }
+
+ # This is not numerical data. If the two characters are the same then
+ # move on.
+ if { $ch1 == $ch2 } {
+ incr index1
+ incr index2
+ continue
+ }
+
+ # Next check if both strings are at a separator. All separators can be
+ # used interchangeably.
+ if { ( [string match \[-._\] $ch1] ) && ( [string match \[-._\] $ch2] ) } {
+ incr index1
+ incr index2
+ continue
+ }
+
+ # There are differences in the characters and they are not interchangeable.
+ # Just return a standard string comparison.
+ return [string compare $ch1 $ch2]
+ }
+}
+
+# }}}
+# {{{ Argument parsing
+
+# ----------------------------------------------------------------------------
+# The argv0 argument should be the name of this script. It can be used
+# to get at the component repository location. If this script has been
+# run incorrectly then currently it will fail: in future it may be
+# desirable to check an environment variable instead.
+#
+# The argv argument is a string containing the rest of the arguments.
+# If any of the arguments contain spaces then this argument will be
+# surrounded by braces. If any of the arguments contain braces then
+# things will break.
+#
+
+proc ecosadmin::parse_arguments { argv0 argv } {
+
+ if { $argv != "" } {
+
+ # There are arguments. If any of the arguments contained
+ # spaces then these arguments will have been surrounded
+ # by braces, which is a nuisance. So start by turning the
+ # arguments into a numerically indexed array.
+
+ set argc 0
+ array set args { }
+ foreach arg $argv {
+ set args([incr argc]) $arg
+ }
+
+ # Now examine each argument with regular expressions. It is
+ # useful to have some variables filled in by the regexp
+ # matching.
+ set dummy ""
+ set match1 ""
+ set match2 ""
+ for { set i 1 } { $i <= $argc } { incr i } {
+
+ # Check for --list and the other simple ones.
+ if { [regexp -- {^-?-?list$} $args($i)] == 1 } {
+ set ecosadmin::list_packages_arg 1
+ continue
+ }
+
+ # check for --version
+ if { [regexp -- {^-?-version=?(.*)$} $args($i) dummy match1] == 1 } {
+ if { $match1 != "" } {
+ set ecosadmin::version_arg $match1
+ } else {
+ if { $i == $argc } {
+ fatal_error "missing argument after --version"
+ } else {
+ set ecosadmin::version_arg $args([incr i])
+ }
+ }
+ continue
+ }
+
+ # check for --accept_license
+ if { [regexp -- {^-?-accept_license$} $args($i)] == 1 } {
+ set ecosadmin::accept_license_arg 1
+ continue
+ }
+
+ # check for --extract_license
+ if { [regexp -- {^-?-extract_license$} $args($i)] == 1 } {
+ set ecosadmin::extract_license_arg 1
+ continue
+ }
+
+ # check for the add command
+ if { [regexp -- {^-?-?add=?(.*)$} $args($i) dummy match1] == 1 } {
+ if { $match1 != "" } {
+ set ecosadmin::add_package $match1
+ } else {
+ if { $i == $argc } {
+ fatal_error "missing argument after add"
+ } else {
+ set ecosadmin::add_package $args([incr i])
+ }
+ }
+ continue
+ }
+
+ # check for the merge command
+ if { [regexp -- {^-?-?merge=?(.*)$} $args($i) dummy match1] == 1 } {
+ if { $match1 != "" } {
+ set ecosadmin::merge_repository $match1
+ } else {
+ if { $i == $argc } {
+ fatal_error "missing argument after merge"
+ } else {
+ set ecosadmin::merge_repository $args([incr i])
+ }
+ }
+ continue
+ }
+
+ # check for the remove command
+ if { [regexp -- {^-?-?remove=?(.*)$} $args($i) dummy match1] == 1 } {
+ if { $match1 != "" } {
+ set ecosadmin::remove_package $match1
+ } else {
+ if { $i == $argc } {
+ fatal_error "missing argument after remove"
+ } else {
+ set ecosadmin::remove_package $args([incr i])
+ }
+ }
+ continue
+ }
+
+ # Check for --srcdir
+ if { [regexp -- {^-?-srcdir=?([ \.\\/:_a-zA-Z0-9-]*)$} $args($i) dummy match1] == 1 } {
+ if { $match1 == "" } {
+ if { $i == $argc } {
+ puts "ecosrelease: missing argument after --srcdir"
+ exit 1
+ } else {
+ set match1 $args([incr i])
+ }
+ }
+ set ecosadmin::component_repository $match1
+ continue
+ }
+
+ # An unrecognised argument.
+ fatal_error "invalid argument $args($i)"
+ }
+ }
+
+ # Convert user-specified UNIX-style Cygwin pathnames to Windows Tcl-style as necessary
+ set ecosadmin::component_repository [get_pathname_for_tcl $ecosadmin::component_repository]
+ set ecosadmin::add_package [get_pathname_for_tcl $ecosadmin::add_package]
+ set ecosadmin::merge_repository [get_pathname_for_tcl $ecosadmin::merge_repository]
+}
+
+#
+# Display help information if the user has typed --help, -H, --H, or -help.
+# The help text uses two hyphens for consistency with configure.
+# Arguably this should change.
+
+proc ecosadmin::argument_help { } {
+
+ puts "Usage: ecosadmin \[ command \]"
+ puts " commands are:"
+ puts " list : list packages"
+ puts " add FILE : add packages"
+ puts " remove PACKAGE \[ --version VER \] : remove a package"
+}
+
+# }}}
+# {{{ Packages file
+
+proc ecosadmin::read_data { silentflag } {
+
+ ASSERT { $ecosadmin::component_repository != "" }
+
+ set ecosadmin::known_packages ""
+ set ecosadmin::known_targets ""
+ set ecosadmin::known_templates ""
+
+ # A safe interpreter is used to process the packages file.
+ # This is somewhat overcautious, but it is also harmless.
+ # The following two commands are made accessible to the slave
+ # interpreter and are responsible for updating the actual data.
+ proc add_known_package { name } {
+ lappend ::ecosadmin::known_packages $name
+ }
+ proc add_known_target { name } {
+ lappend ::ecosadmin::known_targets $name
+ }
+ proc add_known_template { name } {
+ lappend ::ecosadmin::known_templates $name
+ }
+ proc set_package_data { name value } {
+ set ::ecosadmin::package_data($name) $value
+ }
+ proc set_target_data { name value } {
+ set ::ecosadmin::target_data($name) $value
+ }
+ proc set_template_data { name value } {
+ set ::ecosadmin::template_data($name) $value
+ }
+
+ # Create the parser, add the aliased commands, and then define
+ # the routines that do the real work.
+ set parser [interp create -safe]
+ $parser alias add_known_package ecosadmin::add_known_package
+ $parser alias add_known_target ecosadmin::add_known_target
+ $parser alias add_known_template ecosadmin::add_known_template
+ $parser alias set_package_data ecosadmin::set_package_data
+ $parser alias set_target_data ecosadmin::set_target_data
+ $parser alias set_template_data ecosadmin::set_template_data
+
+ $parser eval {
+
+ set current_package ""
+ set current_target ""
+ set current_template ""
+
+ proc package { name body } {
+ add_known_package $name
+ set_package_data "$name,alias" ""
+ set_package_data "$name,versions" ""
+ set_package_data "$name,dir" ""
+ set_package_data "$name,hardware" 0
+ set ::current_package $name
+ eval $body
+ set ::current_package ""
+ }
+
+ proc target { name body } {
+ add_known_target $name
+ set_target_data "$name,packages" ""
+ set ::current_target $name
+ eval $body
+ set ::current_target ""
+ }
+
+#if 0
+ # templates are no longer specified in the package database
+ proc template { name body } {
+ add_known_template $name
+ set_template_data "$name,packages" ""
+ set ::current_template $name
+ eval $body
+ set ::current_template ""
+ }
+#endif
+
+ proc packages { str } {
+ if { $::current_template != "" } {
+ set_template_data "$::current_template,packages" $str
+ } elseif { $::current_target != "" } {
+ set_target_data "$::current_target,packages" $str
+ } else {
+ ASSERT 0
+ }
+ }
+
+ proc directory { dir } {
+ set_package_data "$::current_package,dir" $dir
+ }
+
+ proc alias { str } {
+ if { $::current_package != "" } {
+ set_package_data "$::current_package,alias" $str
+ }
+ }
+
+ proc hardware { } {
+ set_package_data "$::current_package,hardware" 1
+ }
+
+ proc description { str } { }
+ proc disable { str } { }
+ proc enable { str } { }
+ proc script { str } { }
+ proc set_value { str1 str2 } { }
+ }
+
+ # The parser is ready to evaluate the script. To avoid having to give the
+ # safe interpreter file I/O capabilities, the file is actually read in
+ # here and then evaluated.
+ set filename [file join $ecosadmin::component_repository "ecos.db"]
+ set status [ catch {
+ set fd [open $filename r]
+ set script [read $fd]
+ close $fd
+ $parser eval $script
+} message ]
+
+ if { $status != 0 } {
+ ecosadmin::fatal_error "parsing $filename:\n$message"
+ }
+
+ # The interpreter and the aliased commands are no longer required.
+ rename set_package_data {}
+ rename set_target_data {}
+ rename set_template_data {}
+ rename add_known_package {}
+ interp delete $parser
+
+ # At this stage the packages file has been read in. It is a good idea to
+ # check that all of these packages are present and correct, and incidentally
+ # figure out which versions are present.
+ foreach pkg $ecosadmin::known_packages {
+
+ set pkgdir [file join $ecosadmin::component_repository $ecosadmin::package_data($pkg,dir)]
+ if { ![file exists $pkgdir] || ![file isdir $pkgdir] } {
+ if { "" == $silentflag } {
+ warning "package $pkg at $pkgdir missing"
+ }
+ } else {
+ # Each subdirectory should correspond to a release. A utility routine
+ # is available for this.
+ set ecosadmin::package_data($pkg,versions) [locate_subdirs $pkgdir]
+ if { $ecosadmin::package_data($pkg,versions) == "" } {
+ fatal_error "package $pkg has no version directories"
+ }
+ }
+ # Sort all the versions using a version-aware comparison version
+ set ecosadmin::package_data($pkg,versions) [
+ lsort -command ecosadmin::cdl_compare_version $ecosadmin::package_data($pkg,versions)
+ ]
+ }
+}
+
+#
+# Given a package name as supplied by the user, return the internal package name.
+# This involves searching through the list of aliases.
+#
+proc ecosadmin::find_package { name } {
+
+ foreach pkg $ecosadmin::known_packages {
+ if { [string toupper $pkg] == [string toupper $name] } {
+ return $pkg
+ }
+
+ foreach alias $ecosadmin::package_data($pkg,alias) {
+ if { [string toupper $alias] == [string toupper $name] } {
+ return $pkg
+ }
+ }
+ }
+
+ return ""
+}
+
+# }}}
+# {{{ Directory and file utilities
+
+# ----------------------------------------------------------------------------
+# Start with a number of utility routines to access all files in
+# a directory, stripping out well-known files such as makefile.am.
+# The routines take an optional pattern argument if only certain
+# files are of interest.
+#
+# Note that symbolic links are returned as well as files.
+#
+proc ecosadmin::locate_files { dir { pattern "*"} } {
+
+ ASSERT { $dir != "" }
+
+ # Start by getting a list of all the files.
+ set filelist [glob -nocomplain -- [file join $dir $pattern]]
+
+ if { $pattern == "*" } {
+ # For "everything", include ".*" files, but excluding .
+ # and .. directories
+ lappend filelist [glob -nocomplain -- [file join $dir ".\[a-zA-Z0-9\]*"]]
+ }
+
+ # Eliminate the pathnames from all of these files
+ set filenames ""
+ foreach file $filelist {
+ if { [string range $file end end] != "~" } {
+ lappend filenames [file tail $file]
+ }
+ }
+
+ # Eliminate any subdirectories.
+ set subdirs ""
+ foreach name $filenames {
+ if { [file isdir [file join $dir $name]] } {
+ lappend subdirs $name
+ }
+ }
+ foreach subdir $subdirs {
+ set index [lsearch -exact $filenames $subdir]
+ set filenames [lreplace $filenames $index $index]
+ }
+
+ return $filenames
+}
+
+#
+# This utility returns all sub-directories, as opposed to all files.
+# A variant glob pattern is used here. This version is not recursive.
+proc ecosadmin::locate_subdirs { dir { pattern "*" }} {
+
+ ASSERT { $dir != "" }
+
+ set dirlist [glob -nocomplain -- [file join $dir $pattern "."]]
+
+ # Eliminate the pathnames and the spurious /. at the end of each entry
+ set dirnames ""
+ foreach dir $dirlist {
+ lappend dirnames [file tail [file dirname $dir]]
+ }
+
+ # Get rid of the CVS directory, if any
+ if { $ecosadmin::keep_cvs == 0 } {
+ set index [lsearch -exact $dirnames "CVS"]
+ if { $index != -1 } {
+ set dirnames [lreplace $dirnames $index $index]
+ }
+ }
+
+ # That should be it.
+ return $dirnames
+}
+
+#
+# A variant which is recursive. This one does not support a pattern.
+#
+proc ecosadmin::locate_all_subdirs { dir } {
+
+ ASSERT { $dir != "" }
+
+ set result ""
+ foreach subdir [locate_subdirs $dir] {
+ lappend result $subdir
+ foreach x [locate_all_subdirs [file join $dir $subdir]] {
+ lappend result [file join $subdir $x]
+ }
+ }
+ return $result
+}
+
+#
+# This routine returns a list of all the files in a given directory and in
+# all subdirectories, preserving the subdirectory name.
+#
+proc ecosadmin::locate_all_files { dir { pattern "*" } } {
+
+ ASSERT { $dir != "" }
+
+ set files [locate_files $dir $pattern]
+ set subdirs [locate_subdirs $dir]
+
+ foreach subdir $subdirs {
+ set subfiles [locate_all_files [file join $dir $subdir] $pattern]
+ foreach file $subfiles {
+ lappend files [file join $subdir $file]
+ }
+ }
+
+ return $files
+}
+
+#
+# Sometimes a directory may be empty, or contain just a CVS subdirectory,
+# in which case there is no point in copying it across.
+#
+proc ecosadmin::is_empty_directory { dir } {
+
+ ASSERT { $dir != "" }
+
+ set contents [glob -nocomplain -- [file join $dir "*"]]
+ if { [llength $contents] == 0 } {
+ return 1
+ }
+ if { ([llength $contents] == 1) && [string match {*CVS} $contents] } {
+ return 1
+ }
+ return 0
+}
+
+#
+# ----------------------------------------------------------------------------
+# Take a cygwin32 filename such as //d/tmp/pkgobj and turn it into something
+# acceptable to Tcl, i.e. d:/tmp/pkgobj. There are a few other complications...
+
+proc ecosadmin::get_pathname_for_tcl { name } {
+
+ if { ( $ecosadmin::windows_host ) && ( $name != "" ) } {
+
+ # If there is no logical drive letter specified
+ if { [ string match "?:*" $name ] == 0 } {
+
+ # Invoke cygpath to resolve the POSIX-style path
+ if { [ catch { exec cygpath -w $name } result ] != 0 } {
+ fatal_error "processing filepath $name:\n$result"
+ }
+ } else {
+ set result $name
+ }
+
+ # Convert backslashes to forward slashes
+ regsub -all -- {\\} $result "/" name
+ }
+
+ return $name
+}
+
+# ----------------------------------------------------------------------------
+# Make sure that a newly created or copied file is writable. This operation
+# is platform-specific. Under Unix at most the current user is given
+# permission, since there does not seem to be any easy way to get hold
+# of the real umask.
+
+proc ecosadmin::make_writable { name } {
+
+ ASSERT { $name != "" }
+ ASSERT { [file isfile $name] }
+
+ if { [file writable $name] == 0 } {
+ if { $ecosadmin::windows_host != 0 } {
+ file attributes $name -readonly 0
+ } else {
+ set mask [file attributes $name -permissions]
+ set mask [expr $mask | 0200]
+ file attributes $name -permissions $mask
+ }
+ }
+}
+
+# }}}
+# {{{ main()
+
+#-----------------------------------------------------------------------
+# Procedure target_requires_missing_package determines whether a
+# target entry is dependent on missing packages. It is called when
+# filtering templates out of the database
+
+proc ecosadmin::target_requires_missing_package { target } {
+ foreach package $ecosadmin::target_data($target,packages) {
+ if { [ lsearch $ecosadmin::known_packages $package ] == -1 } {
+ return 1
+ }
+ }
+ return 0
+}
+
+#-----------------------------------------------------------------------
+# Procedure template_requires_missing_package determines whether a
+# template entry is dependent on missing packages. It is called when
+# filtering templates out of the database
+
+proc ecosadmin::template_requires_missing_package { template } {
+ foreach package $ecosadmin::template_data($template,packages) {
+ if { [ lsearch $ecosadmin::known_packages $package ] == -1 } {
+ return 1
+ }
+ }
+ return 0
+}
+
+#-----------------------------------------------------------------------
+# Procedure target_requires_any_package determines whether a target entry
+# is dependent on specified packages. It is called when removing packages
+# to determine whether a target should also be removed
+
+proc ecosadmin::target_requires_any_package { target packages } {
+ foreach package $packages {
+ if { [ lsearch $ecosadmin::target_data($target,packages) $package ] != -1 } {
+ return 1
+ }
+ }
+ return 0
+}
+
+#-----------------------------------------------------------------------
+# Procedure template_requires_any_package determines whether a template entry
+# is dependent on specified packages. It is called when removing packages
+# to determine whether a template should also be removed
+
+proc ecosadmin::template_requires_any_package { template packages } {
+ foreach package $packages {
+ if { [ lsearch $ecosadmin::template_data($template,packages) $package ] != -1 } {
+ return 1
+ }
+ }
+ return 0
+}
+
+#-----------------------------------------------------------------------
+# Procedure merge_new_packages adds any entries in the specified data
+# file to the eCos repository database iff they are not already present
+
+proc ecosadmin::merge_new_packages { datafile } {
+
+ # open the eCos database file for appending
+ set ecosfile [ file join $ecosadmin::component_repository "ecos.db" ]
+ variable outfile [ open $ecosfile a+ ]
+
+ # initialize the list of merged packages
+ set ecosadmin::merge_packages ""
+
+ # this procedure is called when the interpreter encounters a
+ # package command in the datafile
+ proc merge { command name body } {
+ ecosadmin::report "processing $command $name"
+ # append the new package/target/template only if it is not already known
+ if { ( ( $command == "package" ) && ( [ lsearch -exact $ecosadmin::known_packages $name ] == -1 ) ) ||
+ ( ( $command == "target" ) && ( [ lsearch -exact $ecosadmin::known_targets $name ] == -1 ) ) ||
+ ( ( $command == "template" ) && ( [ lsearch -exact $ecosadmin::known_templates $name ] == -1 ) ) } {
+ puts $ecosadmin::outfile "$command $name {$body}\n"
+ }
+
+ # add new packages to the list of merged packages
+ if { ( "package" == $command ) } {
+ lappend ecosadmin::merge_packages $name
+ }
+ }
+
+ # Create the parser, add the aliased commands, and then define
+ # the routines that do the real work.
+ set parser [ interp create -safe ]
+ $parser alias merge ecosadmin::merge
+ $parser eval {
+ proc package { name body } {
+ merge "package" $name $body
+ }
+
+ proc template { name body } {
+ merge "template" $name $body
+ }
+
+ proc target { name body } {
+ merge "target" $name $body
+ }
+ }
+
+ # The parser is ready to evaluate the script. To avoid having to give the
+ # safe interpreter file I/O capabilities, the file is actually read in
+ # here and then evaluated.
+ set status [ catch {
+ set fd [ open $datafile r ]
+ set script [ read $fd ]
+ close $fd
+ $parser eval $script
+ } message ]
+
+ # The interpreter and the aliased commands are no longer required.
+ rename merge {}
+ interp delete $parser
+
+ # close the eCos database file
+ close $outfile
+
+ # report errors
+ if { $status != 0 } {
+ ecosadmin::fatal_error "parsing $datafile:\n$message"
+ }
+}
+
+#-----------------------------------------------------------------------
+# Procedure filter_old_packages removes the specified packages/versions
+# from the eCos repository database. Any targets and templates dependent
+# on the removed packages are also removed.
+
+proc ecosadmin::filter_old_packages { old_packages } {
+
+ # open the new eCos database file for writing
+ set ecosfile [ file join $ecosadmin::component_repository "ecos.db.new" ]
+ variable outfile [ open $ecosfile w ]
+ variable filter_list $old_packages
+ variable removed_packages ""
+
+ # this procedure is called when the interpreter encounters a command in the datafile on the first pass
+ # it generates a list of packages which will be removed on the second pass
+ proc removelist { command name body } {
+ if { [ lsearch $ecosadmin::filter_list $name ] != -1 } {
+ # the package is in the filter list
+ if { ( $ecosadmin::version_arg == "" ) || ( [ llength $ecosadmin::package_data($name,versions) ] == 1 ) } {
+ # there is no version argument or only one version so add the package to the remove list
+ set ::ecosadmin::removed_packages [ lappend ::ecosadmin::removed_packages $name ]
+ }
+ }
+ }
+
+ # this procedure is called when the interpreter encounters a command in the datafile on the second pass
+ proc filter { command name body } {
+ if { ( $command == "target" ) && ( ( [ target_requires_any_package $name $ecosadmin::removed_packages ] != 0 ) || ( [ target_requires_missing_package $name ] != 0 ) ) } {
+ # the target requires a package which has been removed so remove the target
+ ecosadmin::report "removing target $name"
+ } elseif { ( $command == "template" ) && ( ( [ template_requires_any_package $name $ecosadmin::removed_packages ] != 0 ) || ( [ template_requires_missing_package $name ] != 0 ) ) } {
+ # the template requires a package which has been removed so remove the template
+ ecosadmin::report "removing template $name"
+ } elseif { [ lsearch $ecosadmin::filter_list $name ] == -1 } {
+ # the package is not in the filter list so copy the data to the new database
+ puts $ecosadmin::outfile "$command $name {$body}\n"
+ } else {
+ # the package is in the filter list
+ set package_dir [ file join $ecosadmin::component_repository $ecosadmin::package_data($name,dir) ]
+ if { ( $ecosadmin::version_arg != "" ) && ( [ llength $ecosadmin::package_data($name,versions) ] > 1 ) } {
+ # there are multiple versions and only one version will be removed
+ # so copy the data to the new database and only remove one version directory
+ set package_dir [ file join $package_dir $ecosadmin::version_arg ]
+ ecosadmin::report "removing package $name $ecosadmin::version_arg"
+ puts $ecosadmin::outfile "$command $name {$body}\n"
+ } else {
+ # there is no version argument or only one version so delete the package directory
+ ecosadmin::report "removing package $name"
+ }
+ if { [ catch { file delete -force -- $package_dir } message ] != 0 } {
+ # issue a warning if package deletion failed - this is not fatal
+ ecosadmin::warning $message
+ }
+ set dir [ file dirname $package_dir ]
+ while { [ llength [ glob -nocomplain -- [ file join $dir "*" ] ] ] == 0 } {
+ # the parent of the deleted directory is now empty so delete it
+ if { [ catch { file delete -- $dir } message ] != 0 } {
+ # issue a warning if empty directory deletion failed - this is not fatal
+ ecosadmin::warning $message
+ }
+ set dir [ file dirname $dir ]
+ }
+ }
+ }
+
+ # Create the parser, add the aliased commands, and then define
+ # the routines that do the real work.
+ set parser [ interp create -safe ]
+ $parser eval {
+ proc package { name body } {
+ filter "package" $name $body
+ }
+
+ proc template { name body } {
+ filter "template" $name $body
+ }
+
+ proc target { name body } {
+ filter "target" $name $body
+ }
+ }
+
+ # The parser is ready to evaluate the script. To avoid having to give the
+ # safe interpreter file I/O capabilities, the file is actually read in
+ # here and then evaluated.
+ set filename [ file join $ecosadmin::component_repository "ecos.db" ]
+ set status [ catch {
+ set fd [ open $filename r ]
+ set script [ read $fd ]
+ close $fd
+
+ # first pass to generate a list of packages which will be removed
+ $parser alias filter ecosadmin::removelist
+ $parser eval $script
+
+ # second pass to remove the packages, targets and templates
+ $parser alias filter ecosadmin::filter
+ $parser eval $script
+ } message ]
+
+ # The interpreter and the aliased commands are no longer required.
+ rename filter {}
+ interp delete $parser
+
+ # close the new eCos database file
+ close $outfile
+
+ # report errors
+ if { $status != 0 } {
+ ecosadmin::fatal_error "parsing $filename:\n$message"
+ }
+
+ # replace the old eCos database file with the new one
+ file rename -force $ecosfile $filename
+}
+
+# ----------------------------------------------------------------------------
+# Process_add_packages. This routine is responsible for installing packages
+# into the eCos repository using the gzip and tar tools which must be on
+# the path
+#
+
+proc ecosadmin::process_add_package { } {
+ ASSERT { $ecosadmin::add_package != "" }
+ ASSERT { $ecosadmin::component_repository != "" }
+
+ # calculate the absolute path of the specified package archive
+ # since we must change directory before extracting files
+ # note that we cannot use "tar -C" to avoid changing directory
+ # since "tar -C" only accepts relative paths
+ set abs_package [ file join [ pwd ] $ecosadmin::add_package ]
+ set datafile "pkgadd.db"
+ set licensefile "pkgadd.txt"
+ set logfile "pkgadd.log"
+ cd $ecosadmin::component_repository
+
+ # check for --extract_license on command line
+ if { $ecosadmin::extract_license_arg == 1 } {
+ # extract the license file (if any) from the specified gzipped tar archive
+ file delete $licensefile
+ catch { exec > $ecosadmin::null_device gzip -d < $abs_package | tar xf - $licensefile }
+ return
+ }
+
+ # extract the package data file from the specified gzipped tar archive
+ if { [ catch { exec > $ecosadmin::null_device gzip -d < $abs_package | tar xf - $datafile } message ] != 0 } {
+ fatal_error "extracting $datafile:\n$message"
+ }
+
+ # obtain license acceptance
+ if { [ ecosadmin::accept_license $abs_package $licensefile ] != "y" } {
+ file delete $datafile
+ file delete $licensefile
+ fatal_error "license agreement not accepted"
+ }
+
+ # extract the remaining package contents and generate a list of extracted files
+ if { [ catch { exec gzip -d < $abs_package | tar xvf - > $logfile } message ] != 0 } {
+ file delete $logfile
+ fatal_error "extracting files:\n$message"
+ }
+
+ # read the list of extracted files from the log file
+ set fd [ open $logfile r ]
+ set message [ read $fd ]
+ close $fd
+ file delete $logfile
+
+ # convert extracted text files to use the line-ending convention of the host
+ set filelist [ split $message "\n" ]
+ set binary_extension ".bin"
+ foreach filename $filelist {
+ if { [ file isfile $filename ] != 0 } {
+ if { [ file extension $filename ] == $binary_extension } {
+ # a binary file - so remove the binary extension
+ file rename -force -- $filename [ file rootname $filename ]
+ } else {
+ # a text file - so convert file to use native line-endings
+ # read in the file (line-ending conversion is implicit)
+ set fd [ open $filename "r" ]
+ set filetext [ read $fd ]
+ close $fd
+
+ # write the file out again
+ set fd [ open $filename "w" ]
+ puts -nonewline $fd $filetext
+ close $fd
+ }
+ }
+ }
+
+ # merge the new package information into the eCos database file as necessary
+ ecosadmin::merge_new_packages [ file join $ecosadmin::component_repository $datafile ]
+
+ # delete the database and license files
+ file delete $datafile
+ file delete $licensefile
+
+ # read the revised database back in and remove any
+ # targets and templates with missing packages
+ read_data ""
+ filter_old_packages ""
+}
+
+# ----------------------------------------------------------------------------
+# Process_remove_package. This routine is responsible for uninstalling a
+# package from the eCos repository
+#
+
+proc ecosadmin::process_remove_package { } {
+ ASSERT { $ecosadmin::remove_package != "" }
+
+ # get the formal package name
+ set package_name [ ecosadmin::find_package $ecosadmin::remove_package ]
+ if { $package_name == "" } {
+ # package not found
+ fatal_error "package not found"
+ } elseif { $ecosadmin::version_arg == "" } {
+ # version not specified
+# if { [ llength $ecosadmin::package_data($package_name,versions) ] > 1 } {
+# fatal_error "multiple versions, use --version"
+# }
+ } elseif { [ lsearch $ecosadmin::package_data($package_name,versions) $ecosadmin::version_arg ] == -1 } {
+ # specified version not found
+ fatal_error "version not found"
+ }
+
+ # filter out the old package from the eCos database file
+ filter_old_packages $package_name
+}
+
+# ----------------------------------------------------------------------------
+# Process_merge_repository. This routine is responsible for merging packages
+# from another repository into the eCos repository
+#
+
+proc ecosadmin::process_merge_repository { } {
+ ASSERT { $ecosadmin::merge_repository != "" }
+ ASSERT { $ecosadmin::component_repository != "" }
+
+ # merge new package and target information into the eCos database file as necessary
+ # names of packages to be merged are placed in $ecosadmin::merge_packages
+ ecosadmin::merge_new_packages [ file join $ecosadmin::merge_repository "ecos.db" ]
+
+ # read the revised database back in to pick up new package paths, but ignore missing package directories
+ read_data "silent"
+
+ # copy package directories into the repository as necessary
+ # existing packages are never replaced but a another version may be added
+ foreach pkg $ecosadmin::merge_packages {
+ set newpkgdir [file join $ecosadmin::merge_repository $ecosadmin::package_data($pkg,dir)]
+ foreach newpkgver [locate_subdirs $newpkgdir] {
+ if { [lsearch $ecosadmin::package_data($pkg,versions) $newpkgver] == -1 } {
+ ecosadmin::report "copying $pkg $newpkgver"
+ file mkdir [ file join $ecosadmin::component_repository $ecosadmin::package_data($pkg,dir) ]
+ file copy [ file join $newpkgdir $newpkgver ] [ file join $ecosadmin::component_repository $ecosadmin::package_data($pkg,dir) $newpkgver ]
+ }
+ }
+ }
+
+ # read the revised database again to deliver warnings of missing package directories if necessary
+ read_data ""
+
+ # copy new files from the pkgconf and templates directory hierarchies into the repository as necessary
+ foreach topdir { pkgconf templates } {
+ set repository_files [ ecosadmin::locate_all_files [ file join $ecosadmin::component_repository $topdir ] ]
+ set merge_files [ ecosadmin::locate_all_files [ file join $ecosadmin::merge_repository $topdir ] ]
+ foreach filename $merge_files {
+ if { [lsearch $repository_files $filename] == -1 } {
+ ecosadmin::report "copying $topdir file $filename"
+ file mkdir [ file join $ecosadmin::component_repository $topdir [ file dirname $filename ] ]
+ file copy [ file join $ecosadmin::merge_repository $topdir $filename ] [ file join $ecosadmin::component_repository $topdir $filename ]
+ }
+ }
+ }
+
+ # copy files from the top level packages directory into the repository as necessary
+ foreach filename [ glob -nocomplain -directory $ecosadmin::merge_repository -type f * ] {
+ set destination [ file join $ecosadmin::component_repository [ file tail $filename ] ]
+ if { 0 == [ file exists $destination ] } {
+ ecosadmin::report "copying file [file tail $filename]"
+ file copy $filename $destination
+ }
+ }
+}
+
+# ----------------------------------------------------------------------------
+# Accept_license. This routine is responsible for displaying the package
+# license and obtaining user acceptance. It returns "y" if the license is
+# accepted.
+#
+
+proc ecosadmin::accept_license { archivename filename } {
+ ASSERT { $ecosadmin::add_package != "" }
+
+ # check for --accept_license on command line
+ if { $ecosadmin::accept_license_arg == 1 } {
+ # --accept_license specified so do not prompt for acceptance
+ return "y"
+ }
+
+ # extract the specified license file from the specified gzipped tar archive
+ if { [ catch { exec > $ecosadmin::null_device gzip -d < $archivename | tar xf - $filename } message ] != 0 } {
+ # no license file
+ return "y"
+ }
+
+ # read in the file and output to the user
+ set fd [ open $filename "r" ]
+ set filetext [ read $fd ]
+ close $fd
+ puts $filetext
+
+ # prompt for acceptance
+ puts -nonewline "Do you accept all the terms of the preceding license agreement? (y/n) "
+ flush "stdout"
+ gets "stdin" response
+
+ # return the first character of the response in lowercase
+ return [ string tolower [ string index $response 0 ] ]
+}
+
+# ----------------------------------------------------------------------------
+# Main(). This code only runs if the script is being run stand-alone rather
+# than as part of a larger application. The controlling predicate is the
+# existence of the variable ecosadmin_not_standalone which can be set by
+# the containing program if any.
+#
+
+if { ! [info exists ecosadmin_not_standalone] } {
+
+ # Decide where warnings and fatal errors should go.
+ ecosadmin::initialise_error_handling
+
+ # First, check for --help or any of the variants. If this script
+ # is running in a larger program then it is assumed that the
+ # containing program will not pass --help as an argument.
+ if { ( $argv == "--help" ) || ( $argv == "-help" ) ||
+ ( $argv == "--H" ) || ( $argv == "-H" ) || ($argv == "" ) } {
+
+ ecosadmin::argument_help
+ return
+ }
+
+ # catch any errors while processing the specified command
+ if { [ catch {
+
+ # Parse the arguments and set the global variables appropriately.
+ ecosadmin::parse_arguments $argv0 $argv
+
+ # Read in the eCos repository database.
+ ecosadmin::read_data ""
+
+ # Process the ecosadmin command
+ if { $ecosadmin::list_packages_arg != 0 } {
+ foreach pkg $ecosadmin::known_packages {
+ ecosadmin::report "$pkg: $ecosadmin::package_data($pkg,versions)"
+ }
+ } elseif { $ecosadmin::add_package != "" } {
+ ecosadmin::process_add_package
+ } elseif { $ecosadmin::remove_package != "" } {
+ ecosadmin::process_remove_package
+ } elseif { $ecosadmin::merge_repository != "" } {
+ ecosadmin::process_merge_repository
+ }
+
+ } error_message ] != 0 } {
+
+ # handle error message
+ if { [ info exists gui_mode ] } {
+ return $error_message
+ }
+ puts "ecosadmin error: $error_message"
+ }
+ return
+}
+
+# }}}
diff --git a/cesar/ecos/packages/error/current/ChangeLog b/cesar/ecos/packages/error/current/ChangeLog
new file mode 100644
index 0000000000..a94ca1d0ad
--- /dev/null
+++ b/cesar/ecos/packages/error/current/ChangeLog
@@ -0,0 +1,111 @@
+2003-06-24 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/codes.h (ENOTEMPTY): Needed by the sysctl call in the
+ freeBSD stack.
+
+2001-11-29 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/errno.h: Don't use 'const' type qualifier any more. It
+ gives warnings in new compilers now.
+ * src/errno.cxx (cyg_error_get_errno_p): Ditto.
+
+2000-06-19 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/errno.h (errno): Added extern modifier to non-per-thread
+ instance of errno.
+
+2000-06-07 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/strerror.cxx:
+ * include/codes.h: Added ESPIPE.
+
+2000-06-02 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/codes.h:
+ * src/strerror.cxx: Added some more codes.
+
+2000-05-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/strerror.cxx:
+ * include/codes.h: Added EXDEV.
+
+2000-05-20 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/codes.h: Add EDEADLOCK synonym for EDEADLK
+ Add ENFILE
+ * src/strerror.cxx: Add blurb for ENFILE, ENOSPC, EDEADLK and ENOTSUP
+
+2000-05-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/codes.h: No need to conditionalize codes on CYGPKG_NET
+ Tidy a bit.
+ * src/errno.cxx: Move here from libc. Use kernel constant
+ per-thread data slot, not a dynamic one. Generally tidy.
+ * src/strerror.cxx: No need to conditionalize codes on CYGPKG_NET.
+ Tidy a bit.
+
+2000-03-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/codes.h: Added some further codes.
+
+2000-01-11 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/strerror.cxx (_strerror):
+ * include/codes.h: Add in additional errors require to support
+ networking.
+
+1999-04-14 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/error.h: Add cdl_package doc attribute.
+
+1998-09-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/error.h:
+ Sorting out dependencies for error package.
+
+Mon Aug 24 17:51:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/error.h:
+ Add CDL for this package, for the configuration system.
+
+Wed Aug 12 11:04:27 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * Changelog: Initial ChangeLog entry.
+ * include/codes.h: #include <cyg/infra/cyg_type.h> for define
+ of externC.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+
diff --git a/cesar/ecos/packages/error/current/cdl/error.cdl b/cesar/ecos/packages/error/current/cdl/error.cdl
new file mode 100644
index 0000000000..a706b65991
--- /dev/null
+++ b/cesar/ecos/packages/error/current/cdl/error.cdl
@@ -0,0 +1,157 @@
+# ====================================================================
+#
+# error.cdl
+#
+# Error package configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv,jlarmour
+# Original data: jlarmour
+# Contributors:
+# Date: 2000-04-14
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_ERROR {
+ display "Common error code support"
+ compile strerror.cxx errno.cxx
+ include_dir cyg/error
+ implements CYGINT_ISO_ERRNO_CODES
+ requires { CYGBLD_ISO_ERRNO_CODES_HEADER == "<cyg/error/codes.h>" }
+ description "
+ This package contains the common list of error and
+ status codes. It is held centrally to allow
+ packages to interchange error codes and status
+ codes in a common way, rather than each package
+ having its own conventions for error/status
+ reporting. The error codes are modelled on the
+ POSIX style naming e.g. EINVAL etc. This package
+ also provides the standard strerror() function to
+ convert error codes to textual representation, as
+ well as an implementation of the errno idiom."
+
+# ====================================================================
+# ERRNO OPTIONS
+
+ cdl_component CYGPKG_ERROR_ERRNO {
+ display "errno variable"
+ flavor bool
+ implements CYGINT_ISO_ERRNO
+ requires { CYGBLD_ISO_ERRNO_HEADER == "<cyg/error/errno.h>" }
+ default_value 1
+ description "
+ This package controls the behaviour of the
+ errno variable (or more strictly, expression)
+ from <errno.h>."
+
+ cdl_option CYGSEM_ERROR_PER_THREAD_ERRNO {
+ display "Per-thread errno"
+ requires CYGVAR_KERNEL_THREADS_DATA
+ default_value 1
+ description "
+ This option controls whether the standard error
+ code reporting variable errno is a per-thread
+ variable, rather than global."
+ }
+
+ cdl_option CYGNUM_ERROR_ERRNO_TRACE_LEVEL {
+ display "Tracing level"
+ flavor data
+ legal_values 0 to 1
+ default_value 0
+ description "
+ Trace verbosity level for debugging the errno
+ retrieval mechanism in errno.cxx. Increase this
+ value to get additional trace output."
+ }
+ }
+
+# ====================================================================
+# STRERROR OPTIONS
+
+ cdl_option CYGPKG_ERROR_STRERROR {
+ display "strerror function"
+ flavor bool
+ implements CYGINT_ISO_STRERROR
+ requires { CYGBLD_ISO_STRERROR_HEADER == "<cyg/error/strerror.h>" }
+ default_value 1
+ description "
+ This package controls the presence and behaviour of the
+ strerror() function from <string.h>"
+ }
+
+# ====================================================================
+# BUILD OPTIONS
+ cdl_component CYGPKG_ERROR_OPTIONS {
+ display "Error package build options"
+ flavor none
+ no_define
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_ERROR_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the error package. These flags are used in addition
+ to the set of global flags."
+ }
+
+ cdl_option CYGPKG_ERROR_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the error package. These flags are removed from
+ the set of global flags if present."
+ }
+ }
+}
+
+# ====================================================================
+# EOF error.cdl
diff --git a/cesar/ecos/packages/error/current/include/codes.h b/cesar/ecos/packages/error/current/include/codes.h
new file mode 100644
index 0000000000..25d5f8c182
--- /dev/null
+++ b/cesar/ecos/packages/error/current/include/codes.h
@@ -0,0 +1,186 @@
+#ifndef CYGONCE_ERROR_CODES_H
+#define CYGONCE_ERROR_CODES_H
+/*===========================================================================
+//
+// codes.h
+//
+// Common error code definitions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 2000-04-14
+// Purpose: To provide a common set of error codes
+// Description: This provides a common set of error codes that all
+// packages can agree on. It doesn't preclude them defining
+// their own error return system, but this is a preferable
+// system to use to help error support be as general as
+// possible.
+//
+// We try and conform to the ANSI/POSIX error code format,
+// namely starting with the character 'E'
+//
+// Usage: #include <cyg/error/codes.h>
+//
+// Example:
+//
+// err=myfun();
+// if (err != ENOERR)
+// {
+// str=strerror(err);
+// printf("myfun returned error: %s\n", str);
+// }
+// else ....
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/error.h> // Configuration header
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* TYPE DEFINITIONS */
+
+/* A type for error codes which may be useful to explain the purpose of
+ * a variable or return code. It shows that it contains an error code
+ * of the type defined below */
+
+typedef int Cyg_ErrNo;
+
+
+/* CONSTANT DEFINITIONS */
+
+/* If adding to this list, you must also update strerror() with its text
+ * If there is a common error of the same purpose on Unix, try and use its
+ * name and number. If not, use one above 200 to prevent future conflicts
+ *
+ * Do not use negative numbers, so that functions can return positive on
+ * success and -ESOMETHING on error, and it all works consistently.
+*/
+
+#define ENOERR 0 /* No error */
+#define EPERM 1 /* Not permitted */
+#define ENOENT 2 /* No such entity */
+#define ESRCH 3 /* No such process */
+#define EINTR 4 /* Operation interrupted */
+#define EIO 5 /* I/O error */
+#define EBADF 9 /* Bad file handle */
+#define EAGAIN 11 /* Try again later */
+#define EWOULDBLOCK EAGAIN
+#define ENOMEM 12 /* Out of memory */
+#define EBUSY 16 /* Resource busy */
+#define EXDEV 18 /* Cross-device link */
+#define ENODEV 19 /* No such device */
+#define ENOTDIR 20 /* Not a directory */
+#define EISDIR 21 /* Is a directory */
+#define EINVAL 22 /* Invalid argument */
+#define ENFILE 23 /* Too many open files in system */
+#define EMFILE 24 /* Too many open files */
+#define EFBIG 27 /* File too large */
+#define ENOSPC 28 /* No space left on device */
+#define ESPIPE 29 /* Illegal seek */
+#define EROFS 30 /* Read-only file system */
+#define EDOM 33 /* Argument to math function outside valid */
+ /* domain */
+#define ERANGE 34 /* Math result cannot be represented */
+#define EDEADLK 35 /* Resource deadlock would occur */
+#define EDEADLOCK EDEADLK
+#define ENOSYS 38 /* Function not implemented */
+#define ENAMETOOLONG 60 /* File name too long */
+#define ENOTEMPTY 66 /* Directory not empty */
+#define EPROTO 71 /* Protocol error */
+#define ENOTSUP 95 /* Not supported error */
+#define EEOF 200 /* End of file reached */
+#define ENOSUPP 201 /* Operation not supported */
+#define EDEVNOSUPP 202 /* Device does not support this operation */
+
+/* Additional errors used by networking */
+#define ENXIO 300 /* Device not configured */
+#define EACCES 301 /* Permission denied */
+#define EEXIST 302 /* File exists */
+#define ENOTTY 303 /* Inappropriate ioctl for device */
+#define EPIPE 304 /* Broken pipe */
+
+/* non-blocking and interrupt i/o */
+#define EINPROGRESS 310 /* Operation now in progress */
+#define EALREADY 311 /* Operation already in progress */
+
+/* ipc/network software -- argument errors */
+#define ENOTSOCK 320 /* Socket operation on non-socket */
+#define EDESTADDRREQ 321 /* Destination address required */
+#define EMSGSIZE 322 /* Message too long */
+#define EPROTOTYPE 323 /* Protocol wrong type for socket */
+#define ENOPROTOOPT 324 /* Protocol not available */
+#define EPROTONOSUPPORT 325 /* Protocol not supported */
+#define ESOCKTNOSUPPORT 326 /* Socket type not supported */
+#define EOPNOTSUPP 327 /* Operation not supported */
+#define EPFNOSUPPORT 328 /* Protocol family not supported */
+#define EAFNOSUPPORT 329 /* Address family not supported by */
+ /* protocol family */
+#define EADDRINUSE 330 /* Address already in use */
+#define EADDRNOTAVAIL 331 /* Can't assign requested address */
+
+/* ipc/network software -- operational errors */
+#define ENETDOWN 350 /* Network is down */
+#define ENETUNREACH 351 /* Network is unreachable */
+#define ENETRESET 352 /* Network dropped connection on reset */
+#define ECONNABORTED 353 /* Software caused connection abort */
+#define ECONNRESET 354 /* Connection reset by peer */
+#define ENOBUFS 355 /* No buffer space available */
+#define EISCONN 356 /* Socket is already connected */
+#define ENOTCONN 357 /* Socket is not connected */
+#define ESHUTDOWN 358 /* Can't send after socket shutdown */
+#define ETOOMANYREFS 359 /* Too many references: can't splice */
+#define ETIMEDOUT 360 /* Operation timed out */
+#define ECONNREFUSED 361 /* Connection refused */
+
+#define EHOSTDOWN 364 /* Host is down */
+#define EHOSTUNREACH 365 /* No route to host */
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* CYGONCE_ERROR_CODES_H multiple inclusion protection */
+
+/* EOF codes.h */
diff --git a/cesar/ecos/packages/error/current/include/errno.h b/cesar/ecos/packages/error/current/include/errno.h
new file mode 100644
index 0000000000..80896a99fe
--- /dev/null
+++ b/cesar/ecos/packages/error/current/include/errno.h
@@ -0,0 +1,98 @@
+#ifndef CYGONCE_ERROR_ERRNO_H
+#define CYGONCE_ERROR_ERRNO_H
+/*========================================================================
+//
+// errno.h
+//
+// ISO C errno variable and constants
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 2000-04-14
+// Purpose: This file provides the errno variable (or more strictly
+// expression) required by ISO C and POSIX 1003.1
+// Description:
+// Usage: Do not include this file directly - use #include <errno.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/error.h> /* Configuration header */
+
+#ifdef CYGPKG_ERROR_ERRNO
+
+/* INCLUDES */
+
+#include <cyg/error/codes.h> /* for Cyg_ErrNo */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* FUNCTION PROTOTYPES */
+
+
+#ifdef CYGSEM_ERROR_PER_THREAD_ERRNO
+
+extern Cyg_ErrNo *
+cyg_error_get_errno_p( void ) __attribute__((const));
+
+#endif /* ifdef CYGSEM_ERROR_PER_THREAD_ERRNO */
+
+
+/* VARIABLES */
+
+#ifdef CYGSEM_ERROR_PER_THREAD_ERRNO
+# define errno (*cyg_error_get_errno_p()) /* Per-thread error status */
+#else
+extern Cyg_ErrNo errno; /* Global error status */
+#endif /* ifdef CYGSEM_ERROR_PER_THREAD_ERRNO */
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* ifdef CYGPKG_ERROR_ERRNO */
+
+#endif /* CYGONCE_ERROR_ERRNO_H multiple inclusion protection */
+
+/* EOF errno.h */
diff --git a/cesar/ecos/packages/error/current/include/strerror.h b/cesar/ecos/packages/error/current/include/strerror.h
new file mode 100644
index 0000000000..32b1a4e5c8
--- /dev/null
+++ b/cesar/ecos/packages/error/current/include/strerror.h
@@ -0,0 +1,91 @@
+#ifndef CYGONCE_ERROR_STRERROR_H
+#define CYGONCE_ERROR_STRERROR_H
+/*========================================================================
+//
+// strerror.h
+//
+// ISO C strerror function
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 2000-04-14
+// Purpose: This file provides the strerror() function
+// required by ISO C and POSIX 1003.1
+// Description:
+// Usage: Do not include this file directly - use #include <string.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/error.h> /* Configuration header */
+
+/* INCLUDES */
+
+#include <cyg/error/codes.h> /* for Cyg_ErrNo */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* FUNCTION PROTOTYPES */
+
+/* Standard strerror() function as described by ISO C 1990 chap. 7.11.6.2.
+ * This is normally provided by <string.h>
+ */
+
+extern char *
+strerror( Cyg_ErrNo );
+
+/* prototype for the actual implementation. Equivalent to the above, but
+ * used internally by this product in preference
+ */
+
+extern char *
+__strerror( Cyg_ErrNo );
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* CYGONCE_ERROR_STRERROR_H multiple inclusion protection */
+
+/* EOF strerror.h */
diff --git a/cesar/ecos/packages/error/current/src/errno.cxx b/cesar/ecos/packages/error/current/src/errno.cxx
new file mode 100644
index 0000000000..fbe969f329
--- /dev/null
+++ b/cesar/ecos/packages/error/current/src/errno.cxx
@@ -0,0 +1,121 @@
+//===========================================================================
+//
+// errno.cxx
+//
+// ISO C and POSIX error code
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 2000-04-14
+// Purpose: Provide the errno variable
+// Description: This file either provides the errno variable directly,
+// or if thread-safe, using a kernel per-thread data
+// access function
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/system.h>
+#include <pkgconf/error.h> // Configuration header
+
+#ifdef CYGPKG_ERROR_ERRNO
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <cyg/infra/cyg_trac.h> // Common tracing functions
+#include <cyg/error/errno.h> // Header for this file
+
+#ifdef CYGSEM_ERROR_PER_THREAD_ERRNO
+# include <pkgconf/kernel.h> // kernel configuration
+# include <cyg/kernel/thread.hxx> // per-thread data
+# include <cyg/kernel/thread.inl> // per-thread data
+# include <cyg/kernel/mutex.hxx> // mutexes
+#endif
+
+// GLOBAL VARIABLES
+
+#ifndef CYGSEM_ERROR_PER_THREAD_ERRNO
+
+// errno is initialised to 0 at program startup - ANSI 7.1.4
+Cyg_ErrNo errno = 0;
+
+#else // ifndef CYGSEM_ERROR_PER_THREAD_ERRNO
+
+# if defined(CYGDBG_USE_TRACING) && defined(CYGNUM_ERROR_ERRNO_TRACE_LEVEL)
+static int errno_trace = CYGNUM_ERROR_ERRNO_TRACE_LEVEL;
+# define TL1 (0 < errno_trace)
+# else
+# define TL1 (0)
+# endif
+
+// FUNCTIONS
+
+Cyg_ErrNo *
+cyg_error_get_errno_p( void )
+{
+ Cyg_ErrNo *errno_p;
+
+ CYG_REPORT_FUNCNAMETYPE( "cyg_error_get_errno_p", "&errno is %d");
+
+ // set up the thread data, allocating if necessary (even though the
+ // user _shouldn't_ read errno before its set, we can't stop them - and
+ // ANSI prescribes it has a sensible value (0) before its set too anyway.
+
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ errno_p = (Cyg_ErrNo *)self->get_data_ptr(CYGNUM_KERNEL_THREADS_DATA_ERRNO);
+
+ CYG_TRACE1( TL1, "errno is %d", *errno_p );
+
+ CYG_REPORT_RETVAL( errno_p );
+
+ // return the internal data's errno
+ return errno_p;
+} // cyg_error_get_errno_p()
+
+#endif // ifdef CYGSEM_ERROR_PER_THREAD_ERRNO
+
+#endif // ifdef CYGPKG_ERROR_ERRNO
+
+// EOF errno.cxx
diff --git a/cesar/ecos/packages/error/current/src/strerror.cxx b/cesar/ecos/packages/error/current/src/strerror.cxx
new file mode 100644
index 0000000000..19fcbb6f78
--- /dev/null
+++ b/cesar/ecos/packages/error/current/src/strerror.cxx
@@ -0,0 +1,441 @@
+//===========================================================================
+//
+// strerror.cxx
+//
+// ANSI error code string routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: To provide the strerror() implementation
+// Description: This implements strerror() as described in ANSI chap 7.11.6.2
+// Usage: See <cyg/error/codes.h>
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/error.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/error/codes.h> // Error code definitions and header for this
+ // file
+
+// EXPORTED SYMBOLS
+
+externC char *
+strerror( int errnum ) __attribute__ ((weak, alias("__strerror") ));
+
+// FUNCTIONS
+
+externC char *
+__strerror( int errnum )
+{
+ register char *s;
+
+ CYG_REPORT_FUNCNAMETYPE( "__strerror", "String form of error is \"%s\"" );
+
+ switch (errnum)
+ {
+
+#ifdef ENOERR
+ case ENOERR:
+ s = "No error";
+ break;
+#endif
+
+#ifdef EPERM
+ case EPERM:
+ s = "Not permitted";
+ break;
+#endif
+
+#ifdef ENOENT
+ case ENOENT:
+ s = "No such entity";
+ break;
+#endif
+
+#ifdef ESRCH
+ case ESRCH:
+ s = "No such process";
+ break;
+#endif
+
+#ifdef EINTR
+ case EINTR:
+ s = "Operation interrupted";
+ break;
+#endif
+
+#ifdef EIO
+ case EIO:
+ s = "I/O error";
+ break;
+#endif
+
+#ifdef EBADF
+ case EBADF:
+ s = "Bad file handle";
+ break;
+#endif
+
+#ifdef EAGAIN
+ case EAGAIN:
+ s = "Try again later";
+ break;
+#endif
+
+#ifdef ENOMEM
+ case ENOMEM:
+ s = "Out of memory";
+ break;
+#endif
+
+#ifdef EBUSY
+ case EBUSY:
+ s = "Resource busy";
+ break;
+#endif
+
+#ifdef ENODEV
+ case ENODEV:
+ s = "No such device";
+ break;
+#endif
+
+#ifdef ENOTDIR
+ case ENOTDIR:
+ s = "Not a directory";
+ break;
+#endif
+
+#ifdef EISDIR
+ case EISDIR:
+ s = "Is a directory";
+ break;
+#endif
+
+#ifdef EINVAL
+ case EINVAL:
+ s = "Invalid argument";
+ break;
+#endif
+
+#ifdef ENFILE
+ case ENFILE:
+ s = "Too many open files in system";
+ break;
+#endif
+
+#ifdef EMFILE
+ case EMFILE:
+ s = "Too many open files";
+ break;
+#endif
+
+#ifdef EFBIG
+ case EFBIG:
+ s = "File too large";
+ break;
+#endif
+
+#ifdef ENOSPC
+ case ENOSPC:
+ s = "No space left on device";
+ break;
+#endif
+
+#ifdef ESPIPE
+ case ESPIPE:
+ s = "Illegal seek";
+ break;
+#endif
+
+#ifdef EROFS
+ case EROFS:
+ s = "Read-only file system";
+ break;
+#endif
+
+#ifdef EDOM
+ case EDOM:
+ s = "Argument to math function outside valid domain";
+ break;
+#endif
+
+#ifdef ERANGE
+ case ERANGE:
+ s = "Math result cannot be represented";
+ break;
+#endif
+
+#ifdef EDEADLK
+ case EDEADLK:
+ s = "Resource deadlock would occur";
+ break;
+#endif
+
+#ifdef ENOSYS
+ case ENOSYS:
+ s = "Function not implemented";
+ break;
+#endif
+
+#ifdef ENAMETOOLONG
+ case ENAMETOOLONG:
+ s = "File name too long";
+ break;
+#endif
+
+#ifdef ENOTSUP
+ case ENOTSUP:
+ s = "Not supported";
+ break;
+#endif
+
+#ifdef EEOF
+ case EEOF:
+ s = "End of file reached";
+ break;
+#endif
+
+#ifdef ENOSUPP
+ case ENOSUPP:
+ s = "Operation not supported";
+ break;
+#endif
+
+#ifdef EDEVNOSUPP
+ case EDEVNOSUPP:
+ s = "Device does not support this operation";
+ break;
+#endif
+
+#ifdef EXDEV
+ case EXDEV:
+ s = "Improper link";
+ break;
+#endif
+
+// Additional errors used by networking
+#ifdef ENXIO
+ case ENXIO:
+ s = "Device not configured";
+ break;
+#endif
+#ifdef EACCES
+ case EACCES:
+ s = "Permission denied";
+ break;
+#endif
+#ifdef EEXIST
+ case EEXIST:
+ s = "File exists";
+ break;
+#endif
+#ifdef ENOTTY
+ case ENOTTY:
+ s = "Inappropriate ioctl for device";
+ break;
+#endif
+#ifdef EPIPE
+ case EPIPE:
+ s = "Broken pipe";
+ break;
+#endif
+#ifdef EINPROGRESS
+ case EINPROGRESS:
+ s = "Operation now in progress";
+ break;
+#endif
+#ifdef EALREADY
+ case EALREADY:
+ s = "Operation already in progress";
+ break;
+#endif
+#ifdef ENOTSOCK
+ case ENOTSOCK:
+ s = "Socket operation on non-socket";
+ break;
+#endif
+#ifdef EDESTADDRREQ
+ case EDESTADDRREQ:
+ s = "Destination address required";
+ break;
+#endif
+#ifdef EMSGSIZE
+ case EMSGSIZE:
+ s = "Message too long";
+ break;
+#endif
+#ifdef EPROTOTYPE
+ case EPROTOTYPE:
+ s = "Protocol wrong type for socket";
+ break;
+#endif
+#ifdef ENOPROTOOPT
+ case ENOPROTOOPT:
+ s = "Protocol not available";
+ break;
+#endif
+#ifdef EPROTONOSUPPORT
+ case EPROTONOSUPPORT:
+ s = "Protocol not supported";
+ break;
+#endif
+#ifdef ESOCKTNOSUPPORT
+ case ESOCKTNOSUPPORT:
+ s = "Socket type not supported";
+ break;
+#endif
+#ifdef EOPNOTSUPP
+ case EOPNOTSUPP:
+ s = "Operation not supported";
+ break;
+#endif
+#ifdef EPFNOSUPPORT
+ case EPFNOSUPPORT:
+ s = "Protocol family not supported";
+ break;
+#endif
+#ifdef EAFNOSUPPORT
+ case EAFNOSUPPORT:
+ s = "Address family not supported by protocol family";
+ break;
+#endif
+#ifdef EADDRINUSE
+ case EADDRINUSE:
+ s = "Address already in use";
+ break;
+#endif
+#ifdef EADDRNOTAVAIL
+ case EADDRNOTAVAIL:
+ s = "Can't assign requested address";
+ break;
+#endif
+#ifdef ENETDOWN
+ case ENETDOWN:
+ s = "Network is down";
+ break;
+#endif
+#ifdef ENETUNREACH
+ case ENETUNREACH:
+ s = "Network is unreachable";
+ break;
+#endif
+#ifdef ENETRESET
+ case ENETRESET:
+ s = "Network dropped connection on reset";
+ break;
+#endif
+#ifdef ECONNABORTED
+ case ECONNABORTED:
+ s = "Software caused connection abort";
+ break;
+#endif
+#ifdef ECONNRESET
+ case ECONNRESET:
+ s = "Connection reset by peer";
+ break;
+#endif
+#ifdef ENOBUFS
+ case ENOBUFS:
+ s = "No buffer space available";
+ break;
+#endif
+#ifdef EISCONN
+ case EISCONN:
+ s = "Socket is already connected";
+ break;
+#endif
+#ifdef ENOTCONN
+ case ENOTCONN:
+ s = "Socket is not connected";
+ break;
+#endif
+#ifdef ESHUTDOWN
+ case ESHUTDOWN:
+ s = "Can't send after socket shutdown";
+ break;
+#endif
+#ifdef ETOOMANYREFS
+ case ETOOMANYREFS:
+ s = "Too many references: can't splice";
+ break;
+#endif
+#ifdef ETIMEDOUT
+ case ETIMEDOUT:
+ s = "Operation timed out";
+ break;
+#endif
+#ifdef ECONNREFUSED
+ case ECONNREFUSED:
+ s = "Connection refused";
+ break;
+#endif
+#ifdef EHOSTDOWN
+ case EHOSTDOWN:
+ s = "Host is down";
+ break;
+#endif
+#ifdef EHOSTUNREACH
+ case EHOSTUNREACH:
+ s = "No route to host";
+ break;
+#endif
+
+ default:
+ s = "Unknown error";
+ break;
+
+ } // switch
+
+ CYG_REPORT_RETVAL(s);
+
+ return s;
+} // __strerror()
+
+// EOF strerror.cxx
diff --git a/cesar/ecos/packages/fs/ram/current/ChangeLog b/cesar/ecos/packages/fs/ram/current/ChangeLog
new file mode 100644
index 0000000000..c32390010d
--- /dev/null
+++ b/cesar/ecos/packages/fs/ram/current/ChangeLog
@@ -0,0 +1,118 @@
+2005-03-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * tests/ramfs1.c (SHOW_RESULT): Fixed compiler warning about format
+ not matching type.
+
+2004-12-13 John Dallaway <jld@ecoscentric.com>
+
+ * tests/fileio1.c: Rename to ramfs1.c. eCos test names should be
+ unique.
+ * tests/fseek1.c: Rename to ramfs2.c:
+ * cdl/ramfs.cdl: Build the renamed tests.
+
+2004-03-29 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * test/fseek1.c: Test the fseek/ftell functions
+ * cdl/ramfs.cdl: Added a fseek1 test to the build
+
+2004-03-15 Sebastien Couret <sebastien.couret@elios-informatique.fr>
+
+ * src/ramfs.c (block_init): Fixed compiler warning.
+
+2004-02-20 Vincent Catros <Vincent.Catros@elios-informatique.fr>
+
+ * src/ramfs.c :
+ (ramfs_find) Policy to skip path separator is no longer
+ "if '/' then skip" but "while '/' then skip" allowing
+ multi '/' separators (i.e : /tmp////foo).
+ (find_entry) Policy to detect end of path is no longer
+ "if '\0' then end_of_path"
+ but "while '/' skip it and then if '\0' then end_of_path"
+ allowing path terminated with any number of '/'
+ (i.e : chdir(/tmp///)).
+
+2004-02-25 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/ramfs.c (findbuffer_node): If pos larger than even INDIRECT2_MAX
+ then return ENOSPC, not EINVAL. Thanks to Vincent Catros for spotting
+ this.
+
+2004-01-08 Vincent Catros <Vincent.Catros@elios-informatique.fr>
+
+ * src/ramfs.c (ramfs_fo_write): Return ENOSPC when the filesystem
+ is full.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/ramfs.cdl: Fix doc link.
+
+2002-12-06 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * cdl/ramfs.cdl: Implements the CYGINT_IO_FILEIO_FS interface
+
+2002-01-25 Jonathan Larmour <jlarmour@redhat.com>
+
+ * tests/fileio1.c (main): Check in listdir that the number of
+ dirents is correct.
+
+2001-07-26 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/ramfs.c (findbuffer_indirect1): Determine correct offset in
+ indirect block list.
+ (findbuffer_indirect2): Ditto.
+ (findbuffer_direct): Compare block index with number of blocks
+ correctly.
+
+2000-10-05 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/fileio1.c:
+ Extended to check getcwd() and chdir() functionality more fully.
+
+2000-08-18 Nick Garnett <nickg@cygnus.co.uk>
+
+ * cdl/ramfs.cdl:
+ * src/ramfs.c:
+ * tests/fileio1.c:
+ Created this example RAM filesystem both as a usable filesystem
+ and as an example of how to build filesystems for the fileio
+ infrastructure.
+
+
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2004 eCosCentric Limited
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+
+
diff --git a/cesar/ecos/packages/fs/ram/current/cdl/ramfs.cdl b/cesar/ecos/packages/fs/ram/current/cdl/ramfs.cdl
new file mode 100644
index 0000000000..be6a00e915
--- /dev/null
+++ b/cesar/ecos/packages/fs/ram/current/cdl/ramfs.cdl
@@ -0,0 +1,193 @@
+# ====================================================================
+#
+# ramfs.cdl
+#
+# RAM Filesystem configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2004 eCosCentric Limited
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): nickg
+# Original data: nickg
+# Contributors:
+# Date: 2000-08-01
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_FS_RAM {
+ display "RAM filesystem"
+ doc ref/fileio.html
+ include_dir cyg/ramfs
+
+ requires CYGPKG_IO_FILEIO
+
+ requires CYGPKG_ISOINFRA
+ requires CYGPKG_ERROR
+ requires CYGINT_ISO_ERRNO
+ requires CYGINT_ISO_ERRNO_CODES
+
+ implements CYGINT_IO_FILEIO_FS
+
+ compile -library=libextras.a ramfs.c
+
+ # ----------------------------------------------------------------------
+ # Simple allocation mechanism using malloc()
+
+ cdl_component CYGPKG_FS_RAM_SIMPLE {
+ display "Simple, malloc() based, implementation"
+ requires { CYGINT_ISO_MALLOC != 0 }
+ default_value 1
+ active_if !CYGPKG_FS_RAM_BLOCKS
+
+ cdl_option CYGNUM_RAMFS_REALLOC_INCREMENT {
+ display "Size of file data storage increment"
+ flavor data
+ default_value 256
+ legal_values 64 to 32768
+ description "This option controls the size of the increment to a file data
+ storage block."
+ }
+
+ }
+
+ # ----------------------------------------------------------------------
+ # Block based allocation, using either malloc() or a private block
+ # pool.
+
+ cdl_component CYGPKG_FS_RAM_BLOCKS {
+ display "Block-based RAM filesystem allocation"
+ default_value 0
+ active_if !CYGPKG_FS_RAM_SIMPLE
+
+
+ cdl_option CYGNUM_RAMFS_BLOCK_SIZE {
+ display "Size of file data storage block"
+ flavor data
+ default_value 256
+ legal_values 64 to 32768
+ description "This option controls the size of a data storage block."
+ }
+
+ cdl_option CYGNUM_RAMFS_BLOCKS_DIRECT {
+ display "Directly referenced data storage blocks"
+ flavor data
+ default_value 8
+ legal_values 0 to 32
+ description "This option controls the number of data storage blocks that
+ are referenced directly from a file or directory node."
+ }
+
+ cdl_option CYGNUM_RAMFS_BLOCKS_INDIRECT1 {
+ display "Single level indirect data storage blocks"
+ flavor data
+ default_value 1
+ legal_values 0 to 32
+ description "This option controls the number of single level indirect storage
+ blocks that are referenced from a file or directory node."
+ }
+
+ cdl_option CYGNUM_RAMFS_BLOCKS_INDIRECT2 {
+ display "Two level indirect data storage blocks"
+ flavor data
+ default_value 1
+ legal_values 0 to 32
+ description "This option controls the number of two level indirect storage
+ blocks that are referenced from a file or directory node."
+ }
+
+ cdl_component CYGPKG_FS_RAM_BLOCKS_ARRAY {
+ display "Use block array rather than malloc()"
+ default_value 0
+ description "This option controls whether the blocks are allocated from
+ an array of blocks rather from the heap using malloc()."
+
+ cdl_option CYGPKG_FS_RAM_BLOCKS_ARRAY_EXTERN {
+ display "Block array is external"
+ default_value 0
+ description "This option controls whether the block array is
+ defined by the RAMFS package or whether it is provided
+ by an external component. The latter option may be
+ useful when the RAM file system is to be put into a
+ special memory area."
+ }
+
+ cdl_option CYGPKG_FS_RAM_BLOCKS_ARRAY_NAME {
+ display "Name of external block array"
+ active_if CYGPKG_FS_RAM_BLOCKS_ARRAY_EXTERN
+ flavor data
+ default_value "cyg_ramfs_block_array"
+ description "This option controls what the symbol name of the external
+ block array will be."
+ }
+
+ cdl_option CYGNUM_FS_RAM_BLOCKS_ARRAY_SIZE {
+ display "Size of blocks array"
+ flavor data
+ default_value 128
+ legal_values 1 to 9999999999
+ description "The number of blocks in the array. The total size of
+ the array will be this value times the block size."
+ }
+ }
+ }
+
+ cdl_option CYGNUM_RAMFS_DIRENT_SIZE {
+ display "Directory entry size"
+ flavor data
+ default_value 32
+ legal_values 16 to { CYGNUM_RAMFS_BLOCK_SIZE ? CYGNUM_RAMFS_BLOCK_SIZE : 128 }
+ description "This option controls the number of two level indirect storage
+ blocks that are referenced from a file or directory node."
+ }
+
+ # ----------------------------------------------------------------
+ # Tests
+
+ cdl_option CYGPKG_FS_RAM_TESTS {
+ display "RAM FS tests"
+ flavor data
+ no_define
+ calculated { "tests/ramfs1 tests/ramfs2" }
+ description "
+ This option specifies the set of tests for the RAM FS package."
+ }
+
+}
+
+# End of ramfs.cdl
diff --git a/cesar/ecos/packages/fs/ram/current/src/ramfs.c b/cesar/ecos/packages/fs/ram/current/src/ramfs.c
new file mode 100644
index 0000000000..b1d456f747
--- /dev/null
+++ b/cesar/ecos/packages/fs/ram/current/src/ramfs.c
@@ -0,0 +1,2396 @@
+//==========================================================================
+//
+// ramfs.c
+//
+// RAM file system
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-07-25
+// Purpose: RAM file system
+// Description: This is a RAM filesystem for eCos. It attempts to
+// provide full POSIX-compatible filesystem behaviour
+// while at the same time being efficient in terms of
+// time and space used.
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+//
+// General Description
+// ===================
+//
+// This is an implementation of a RAM filesystem for eCos. Its goal is
+// to provide a working example of a filesystem that provides most of
+// the required POSIX functionality. And obviously it may also be
+// useful in its own right.
+//
+//
+// Nodes
+// -----
+//
+// All files and directories are represented by node objects. Each
+// ramfs_node structure contains the following fields:
+//
+// mode - Node type, file or directory.
+// refcnt - Number of references to this node. For files each open counts as
+// a reference and for directories a node is referenced when it is made
+// current directory, or is opened for reading.
+// nlink - Number of links to this node. Each directory entry that references
+// this node is a link.
+// size - Size of the data in this node in bytes.
+// atime - Last time this node was accessed.
+// mtime - Last time the data in this node was modified.
+// ctime - Last time the status information in this node was changed.
+//
+// The data storage in a node is controlled by the configuration and
+// can take two forms. These will be described later.
+//
+// Directories
+// -----------
+//
+// A directory is a node whose data is a list of directory entries. To
+// simplify management of these, long directory entries are split into
+// a chain of fixed size ramfs_dirent structures. These contain the
+// following fields:
+//
+// node - Pointer to node referenced by this entry. This is present in
+// every directory entry fragment
+// inuse - Set to 1 if this entry is in use, zero if it is free.
+// first - Set to 1 if this is the first fragment of a directory entry.
+// last - Set to 1 if this is the last fragment of a directory entry.
+// namelen - The size of the whole file name.
+// fraglen - The number of bytes of the file name that are stored in this
+// fragment.
+// next - The offset of the next fragment of this directory entry.
+// name - The characters of the fragment of the file name stored in this
+// entry.
+//
+// Small file names are stored in a single fragment. Longer names are
+// stored in a chain of fragments.
+//
+// Data Storage
+// ------------
+//
+// Two data storage mechanisms may be configured, the SIMPLE and the
+// BLOCKS mechanisms.
+//
+// SIMPLE Data Storage
+// ~~~~~~~~~~~~~~~~~~~
+//
+// This mechanism simply uses malloc() and free() to allocate the
+// memory for both nodes and file data. File data is stored in a
+// single malloced vector that is realloced as necessary to acquire
+// more space.
+//
+// The advantage of this approach is that the RAM filesystem only uses
+// as much memory as it needs, the rest is available for use by other
+// components. It also requires much simpler data structures and code
+// in the filesystem to manage. However, if any files get to be a
+// significant proportion of the size of the heap, there is the danger
+// that fragmentation will prevent any further extension of some
+// files, even if there is enough memory in total. It also requires an
+// implementation of malloc() to be present. If this needs to be
+// present for other components,then this is not a significant
+// overhead, but including it just for use by this filesystem
+// represents a major addition of code and data structures.
+//
+//
+// BLOCKS Data Storage
+// ~~~~~~~~~~~~~~~~~~~
+//
+// This mechanism divides the memory used for file storage into fixed
+// sized blocks. These blocks may either be allocated using
+// malloc()/free(), or may be obtained from a array of blocks reserved
+// for the purpose. Configuration allows the block size to be
+// selected, as well as the allocation mechanism, and in the case of a
+// block array, whether it is defined here or by an external
+// component.
+//
+// Data storage in nodes is arranges in three arrays of pointers to
+// blocks. The first array points directly to data blocks, the second
+// to blocks which themselves contain pointers to data blocks, and the
+// third to blocks which contain pointers to blocks which contain
+// pointers to data blocks. In the default configuration These last
+// two arrays have only one element each.
+//
+// The following shows how the data is arranged in a fully populated
+// file with a 256 byte block size using the default configuration.
+//
+// Node
+// ~ ~
+// | |
+// | |
+// +------------+
+// | *------+--------> data block 0
+// +------------+
+// | *------+--------> data block 1
+// +------------+
+// | *------+--------> data block 2
+// +------------+
+// | *------+--------> data block 3
+// +------------+
+// | *------+--------> data block 4
+// +------------+
+// | *------+--------> data block 5
+// +------------+
+// | *------+--------> data block 6
+// +------------+
+// | *------+--------> data block 7
+// +------------+
+// | *------+--------> +------------+
+// +------------+ | *------+--------> data block 8
+// | *------+----+ +------------+
+// +------------+ | | |
+// | ~ ~
+// | | |
+// | +------------+
+// | | *------+--------> data block 71
+// | +------------+
+// |
+// +---->+------------+ +------------+
+// | *------+-------->| *------+---->data block 72
+// +------------+ +------------+
+// | | | |
+// ~ ~ ~ ~
+// | | | |
+// +------------+ +------------+
+// | *------+---+ | *------+----> data block 135
+// +------------+ | +------------+
+// |
+// | +------------+
+// +---->| *------+----> data block 4104
+// +------------+
+// | |
+// ~ ~
+// | |
+// +------------+
+// | *------+----> data block 4167
+// +------------+
+//
+//
+//
+// The advantages of this approach are that, first, memory usage is
+// divided into discreet fixed size blocks which are easier to
+// manage. When using malloc() to allocate them, they will fit into
+// any free memory of at least the right size. Using the block array
+// option removes the need to have a malloc() implementation at all.
+//
+// The disadvantages of this mechanism are that, first, when using
+// malloc() to allocate blocks, the per-block memory allocator
+// overhead is paid for each block, rather than per file. This may
+// result in less memory overall being available for data
+// storage. When using the block array, it is permanently reserved for
+// use by the ram filesystem, and is not available for use by other
+// components.
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/io_fileio.h>
+#include <pkgconf/fs_ram.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <unistd.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <dirent.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <cyg/fileio/fileio.h>
+
+#include <cyg/kernel/kapi.h>
+#include <cyg/infra/diag.h>
+
+//==========================================================================
+// Sizes derived from configuration
+
+// -------------------------------------------------------------------------
+// Simple malloc based allocator parameters
+
+#ifdef CYGPKG_FS_RAM_SIMPLE
+
+#define RAMFS_FILESIZE_MAX UINT_MAX
+
+#else
+
+// -------------------------------------------------------------------------
+// Block allocator parameters
+
+// The number of nodes per block
+#define RAMFS_NODES_PER_BLOCK (CYGNUM_RAMFS_BLOCK_SIZE/sizeof(ramfs_node))
+
+// The number of indirect pointers that can be stored in a single data block
+#define RAMFS_INDIRECT_PER_BLOCK (CYGNUM_RAMFS_BLOCK_SIZE/sizeof(ramfs_block *))
+
+// The number of directory entries that can be stored in a single data block
+#define RAMFS_DIRENT_PER_BLOCK (CYGNUM_RAMFS_BLOCK_SIZE/sizeof(ramfs_dirent))
+
+// Number of bytes contained in a one level indirect block
+#define RAMFS_INDIRECT1_BLOCK_EXTENT (RAMFS_INDIRECT_PER_BLOCK* \
+ CYGNUM_RAMFS_BLOCK_SIZE)
+
+// number of bytes contained in a two level indirect block
+#define RAMFS_INDIRECT2_BLOCK_EXTENT (RAMFS_INDIRECT_PER_BLOCK* \
+ RAMFS_INDIRECT_PER_BLOCK* \
+ CYGNUM_RAMFS_BLOCK_SIZE)
+
+// The maximum data offset for data directly accessed from the node
+#define RAMFS_DIRECT_MAX (CYGNUM_RAMFS_BLOCKS_DIRECT*CYGNUM_RAMFS_BLOCK_SIZE)
+
+// The maximum data offset for data accessed from the single level indirect blocks
+#define RAMFS_INDIRECT1_MAX (RAMFS_DIRECT_MAX+ \
+ (CYGNUM_RAMFS_BLOCKS_INDIRECT1* \
+ RAMFS_INDIRECT1_BLOCK_EXTENT))
+
+// The maximum data offset for data accessed from the two level indirect blocks
+#define RAMFS_INDIRECT2_MAX (RAMFS_INDIRECT1_MAX+ \
+ (CYGNUM_RAMFS_BLOCKS_INDIRECT2* \
+ RAMFS_INDIRECT2_BLOCK_EXTENT))
+
+// The maximum size of a file
+#define RAMFS_FILESIZE_MAX RAMFS_INDIRECT2_MAX
+
+#endif
+
+//==========================================================================
+// Forward definitions
+
+// Filesystem operations
+static int ramfs_mount ( cyg_fstab_entry *fste, cyg_mtab_entry *mte );
+static int ramfs_umount ( cyg_mtab_entry *mte );
+static int ramfs_open ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int mode, cyg_file *fte );
+static int ramfs_unlink ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+static int ramfs_mkdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+static int ramfs_rmdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+static int ramfs_rename ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2 );
+static int ramfs_link ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2, int type );
+static int ramfs_opendir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_file *fte );
+static int ramfs_chdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_dir *dir_out );
+static int ramfs_stat ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ struct stat *buf);
+static int ramfs_getinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len );
+static int ramfs_setinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len );
+
+// File operations
+static int ramfs_fo_read (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+static int ramfs_fo_write (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+static int ramfs_fo_lseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence );
+static int ramfs_fo_ioctl (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com,
+ CYG_ADDRWORD data);
+static int ramfs_fo_fsync (struct CYG_FILE_TAG *fp, int mode );
+static int ramfs_fo_close (struct CYG_FILE_TAG *fp);
+static int ramfs_fo_fstat (struct CYG_FILE_TAG *fp, struct stat *buf );
+static int ramfs_fo_getinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
+static int ramfs_fo_setinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
+
+// Directory operations
+static int ramfs_fo_dirread (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+static int ramfs_fo_dirlseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence );
+
+
+//==========================================================================
+// Filesystem table entries
+
+// -------------------------------------------------------------------------
+// Fstab entry.
+// This defines the entry in the filesystem table.
+// For simplicity we use _FILESYSTEM synchronization for all accesses since
+// we should never block in any filesystem operations.
+
+FSTAB_ENTRY( ramfs_fste, "ramfs", 0,
+ CYG_SYNCMODE_FILE_FILESYSTEM|CYG_SYNCMODE_IO_FILESYSTEM,
+ ramfs_mount,
+ ramfs_umount,
+ ramfs_open,
+ ramfs_unlink,
+ ramfs_mkdir,
+ ramfs_rmdir,
+ ramfs_rename,
+ ramfs_link,
+ ramfs_opendir,
+ ramfs_chdir,
+ ramfs_stat,
+ ramfs_getinfo,
+ ramfs_setinfo);
+
+// -------------------------------------------------------------------------
+// File operations.
+// This set of file operations are used for normal open files.
+
+static cyg_fileops ramfs_fileops =
+{
+ ramfs_fo_read,
+ ramfs_fo_write,
+ ramfs_fo_lseek,
+ ramfs_fo_ioctl,
+ cyg_fileio_seltrue,
+ ramfs_fo_fsync,
+ ramfs_fo_close,
+ ramfs_fo_fstat,
+ ramfs_fo_getinfo,
+ ramfs_fo_setinfo
+};
+
+// -------------------------------------------------------------------------
+// Directory file operations.
+// This set of operations are used for open directories. Most entries
+// point to error-returning stub functions. Only the read, lseek and
+// close entries are functional.
+
+static cyg_fileops ramfs_dirops =
+{
+ ramfs_fo_dirread,
+ (cyg_fileop_write *)cyg_fileio_enosys,
+ ramfs_fo_dirlseek,
+ (cyg_fileop_ioctl *)cyg_fileio_enosys,
+ cyg_fileio_seltrue,
+ (cyg_fileop_fsync *)cyg_fileio_enosys,
+ ramfs_fo_close,
+ (cyg_fileop_fstat *)cyg_fileio_enosys,
+ (cyg_fileop_getinfo *)cyg_fileio_enosys,
+ (cyg_fileop_setinfo *)cyg_fileio_enosys
+};
+
+//==========================================================================
+// Data typedefs
+// Some forward typedefs for the main data structures.
+
+struct ramfs_node;
+typedef struct ramfs_node ramfs_node;
+
+struct ramfs_dirent;
+typedef struct ramfs_dirent ramfs_dirent;
+
+#ifndef CYGPKG_FS_RAM_SIMPLE
+
+typedef cyg_uint8 ramfs_block[CYGNUM_RAMFS_BLOCK_SIZE];
+
+#endif
+
+//==========================================================================
+// File and directory node
+// This data structure represents a file or directory.
+
+struct ramfs_node
+{
+ mode_t mode; // node type
+ cyg_ucount32 refcnt; // open file/current dir references
+ nlink_t nlink; // number of links to this node
+ size_t size; // size of file in bytes
+ time_t atime; // last access time
+ time_t mtime; // last modified time
+ time_t ctime; // last changed status time
+
+#ifdef CYGPKG_FS_RAM_SIMPLE
+
+ // The data storage in this case consists of a single
+ // malloced memory block, together with its size.
+
+ size_t datasize; // size of data block
+ cyg_uint8 *data; // malloced data buffer
+
+#else
+
+ // The data storage in this case consists of arrays of pointers
+ // to data blocks.
+
+#if CYGNUM_RAMFS_BLOCKS_DIRECT > 0
+ // Directly accessible blocks from the inode.
+ ramfs_block *direct[CYGNUM_RAMFS_BLOCKS_DIRECT];
+#endif
+#if CYGNUM_RAMFS_BLOCKS_INDIRECT1 > 0
+ // Single level indirection
+ ramfs_block **indirect1[CYGNUM_RAMFS_BLOCKS_INDIRECT1];
+#endif
+#if CYGNUM_RAMFS_BLOCKS_INDIRECT2 > 0
+ // Two level indirection
+ ramfs_block ***indirect2[CYGNUM_RAMFS_BLOCKS_INDIRECT2];
+#endif
+
+#endif
+
+};
+
+//==========================================================================
+// Directory entry.
+// Fixed sized entry containing a fragment of the name of a file/directory.
+
+struct ramfs_dirent
+{
+ ramfs_node *node; // pointer to node
+ unsigned int inuse:1, // entry in use?
+ first:1, // first directory entry fragment?
+ last:1, // last directory entry fragment?
+ namelen:8, // bytes in whole name
+ fraglen:8; // bytes in name fragment
+ off_t next; // offset of next dirent
+
+ // Name fragment, fills rest of entry.
+ char name[CYGNUM_RAMFS_DIRENT_SIZE-
+ sizeof(ramfs_node *)-
+ sizeof( cyg_uint32)-
+ sizeof(off_t)];
+};
+
+//==========================================================================
+// Directory search data
+// Parameters for a directory search. The fields of this structure are
+// updated as we follow a pathname through the directory tree.
+
+struct ramfs_dirsearch
+{
+ ramfs_node *dir; // directory to search
+ const char *path; // path to follow
+ ramfs_node *node; // Node found
+ const char *name; // last name fragment used
+ int namelen; // name fragment length
+ cyg_bool last; // last name in path?
+};
+
+typedef struct ramfs_dirsearch ramfs_dirsearch;
+
+//==========================================================================
+// Forward defs
+
+static int del_direntry( ramfs_node *dir, const char *name, int namelen );
+
+
+//==========================================================================
+// Block array
+// This is used for block allocation when malloc is not being used.
+
+#ifdef CYGPKG_FS_RAM_BLOCKS_ARRAY
+
+# ifdef CYGPKG_FS_RAM_BLOCKS_ARRAY_EXTERN
+
+// Array is defined externally with a user-supplied name
+
+__externC ramfs_block CYGPKG_FS_RAM_BLOCKS_ARRAY_NAME[CYGNUM_FS_RAM_BLOCKS_ARRAY_SIZE];
+
+// Translate into a usable common name
+#define ramfs_block_array CYGPKG_FS_RAM_BLOCKS_ARRAY_NAME
+
+# else
+
+// Array is defined here
+
+static ramfs_block cyg_ramfs_block_array[CYGNUM_FS_RAM_BLOCKS_ARRAY_SIZE];
+
+#define ramfs_block_array cyg_ramfs_block_array
+
+# endif
+
+// Pointer to list of free blocks
+static ramfs_block *block_free_list = NULL;
+
+#endif
+
+//==========================================================================
+// Block allocation
+
+#ifndef CYGPKG_FS_RAM_SIMPLE
+
+// -------------------------------------------------------------------------
+// block_init()
+// Initialize the block allocator by chaining them all together on
+// block_free_list.
+
+#ifdef CYGPKG_FS_RAM_BLOCKS_ARRAY
+
+static void block_init(void)
+{
+ static cyg_bool initialized = false;
+ int i;
+
+ if( !initialized )
+ {
+ for( i = 0; i < CYGNUM_FS_RAM_BLOCKS_ARRAY_SIZE; i++ )
+ {
+ ramfs_block *b = &ramfs_block_array[i];
+ *(ramfs_block **)b = block_free_list;
+ block_free_list = b;
+ }
+ initialized = true;
+ }
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// block_alloc()
+// Allocate a block for data storage.
+// If we have a block array, just pick the first off the free list.
+// If we are mallocing, call malloc() to get it.
+
+static ramfs_block *block_alloc(void)
+{
+ ramfs_block *b;
+
+#ifdef CYGPKG_FS_RAM_BLOCKS_ARRAY
+
+ block_init(); // Check blocks are initialized
+
+ // pick first block off free list.
+ b = block_free_list;
+
+ // and advance list
+ if( b != NULL )
+ block_free_list = *(ramfs_block **)b;
+
+#else
+
+ b = malloc(CYGNUM_RAMFS_BLOCK_SIZE);
+
+#endif
+
+ // Clear the block to zero if it was allocated
+ if( b != NULL )
+ memset( b, 0, CYGNUM_RAMFS_BLOCK_SIZE );
+
+ return b;
+
+}
+
+// -------------------------------------------------------------------------
+// block_free()
+// Free a block. Depending on the configuration send it back to the
+// heap or put it back on free list.
+
+static void block_free( ramfs_block *b )
+{
+#ifdef CYGPKG_FS_RAM_BLOCKS_ARRAY
+
+ // Put the block back on the free list
+
+ *(ramfs_block **)b = block_free_list;
+ block_free_list = b;
+
+#else
+
+ // Call free() to return it to the memory pool
+
+ free( b );
+
+#endif
+}
+
+#endif
+
+//==========================================================================
+// Node buffer management
+// There are two versions of this, one for the _SIMPLE variant and one for
+// the _BLOCKS variant. In both cases the interface to this code is via the
+// findbuffer_node() and freebuffer_node() functions.
+
+#ifdef CYGPKG_FS_RAM_SIMPLE
+
+//==========================================================================
+// SIMPLE buffer management.
+// Each node has a data buffer pointer and a size. This buffer is
+// realloc()ed as needed.
+
+// -------------------------------------------------------------------------
+// findbuffer_node()
+// return a pointer to the data at the indicated file position, extending
+// the buffer if required.
+
+static int findbuffer_node( ramfs_node *node, // node pointer
+ off_t pos, // data position to get
+ cyg_uint8 **buffer, // returned buffer pointer
+ size_t *size, // returned buffer size
+ cyg_bool alloc) // extend allocation?
+{
+ if( alloc && (pos == node->datasize || node->datasize == 0) )
+ {
+ // If we are allowed to alloc new data, and we are at the end of the
+ // current data allocation, or there is no data present, allocate or
+ // extend the data buffer.
+
+ cyg_uint8 *newdata;
+
+ if( node->data == NULL )
+ newdata = malloc( CYGNUM_RAMFS_REALLOC_INCREMENT );
+ else
+ newdata = realloc( node->data, pos+CYGNUM_RAMFS_REALLOC_INCREMENT );
+
+ if( newdata == NULL ) return ENOSPC;
+ else memset( newdata+pos, 0, CYGNUM_RAMFS_REALLOC_INCREMENT );
+
+ node->data = newdata;
+ node->datasize = pos+CYGNUM_RAMFS_REALLOC_INCREMENT;
+ }
+ else if( pos > node->datasize )
+ {
+ // Indicate end of data.
+ *size = 0;
+ return ENOERR;
+ }
+
+ *buffer = node->data+pos;
+ *size = node->datasize-pos;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// freebuffer_node()
+// Empty out the data storage from the node.
+
+static int freebuffer_node( ramfs_node *node )
+{
+ if( node->data != NULL )
+ {
+ free( node->data );
+ }
+
+ node->data = NULL;
+ node->datasize = 0;
+
+ return ENOERR;
+}
+
+//==========================================================================
+
+#else
+
+//==========================================================================
+// _BLOCKS storage management.
+// Data storage in the node is by means of a set of arrays of pointers to
+// blocks. The first array points directly to the data blocks. Subsequent
+// arrays point to single and double indirect blocks respectively.
+
+// -------------------------------------------------------------------------
+// findbuffer_direct()
+// Indexes into an array of block pointers and extracts a pointer to the
+// data at offset _pos_, allocating new blocks if required.
+
+static int findbuffer_direct( off_t pos,
+ ramfs_block **blocks,
+ int nblocks,
+ cyg_uint8 **buffer,
+ size_t *size,
+ cyg_bool alloc)
+{
+ int bi = pos / CYGNUM_RAMFS_BLOCK_SIZE;
+ int bpos = pos % CYGNUM_RAMFS_BLOCK_SIZE;
+ ramfs_block *b;
+
+ *buffer = NULL;
+ *size = 0;
+
+ if( bi >= nblocks )
+ return ENOERR;
+
+ b = blocks[bi];
+
+ if( b == NULL )
+ {
+ // There is no block there. If _alloc_ is true we can fill the
+ // slot in with a new block. If it is false, we indicate end of
+ // data with a zero size result.
+ if( alloc )
+ {
+ b = block_alloc();
+ if( b == NULL )
+ return ENOSPC;
+ blocks[bi] = b;
+ }
+ else return ENOERR;
+ }
+
+ *buffer = &((*b)[bpos]);
+ *size = CYGNUM_RAMFS_BLOCK_SIZE - bpos;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// findbuffer_indirect1()
+// Indexes into an array of pointers to blocks containing pointers to
+// blocks and extracts a pointer to the data at offset _pos_,
+// allocating new blocks if required.
+
+#if CYGNUM_RAMFS_BLOCKS_INDIRECT1 > 0
+
+static int findbuffer_indirect1( off_t pos,
+ ramfs_block ***blocks,
+ int nblocks,
+ cyg_uint8 **buffer,
+ size_t *size,
+ cyg_bool alloc)
+{
+
+ int bi = pos / RAMFS_INDIRECT1_BLOCK_EXTENT;
+ int bpos = pos % RAMFS_INDIRECT1_BLOCK_EXTENT;
+ int err;
+ cyg_uint8 *b;
+ size_t sz;
+
+ // Use findbuffer_direct() to index and allocate
+ // the first level indirect block.
+
+ err = findbuffer_direct( bi*CYGNUM_RAMFS_BLOCK_SIZE,
+ (ramfs_block **)blocks,
+ nblocks,
+ &b,
+ &sz,
+ alloc);
+
+ if( err != ENOERR )
+ return err;
+
+ if( sz == 0 )
+ {
+ *size = 0;
+ return ENOERR;
+ }
+
+ // Use findbuffer_direct() on the first level indirect
+ // block to allocate and return the data pointer.
+
+ return findbuffer_direct( bpos,
+ blocks[bi],
+ RAMFS_INDIRECT_PER_BLOCK,
+ buffer,
+ size,
+ alloc);
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// findbuffer_indirect1()
+// Indexes into an array of pointers to blocks containing pointers to
+// blocks containing pointers to blocks (!) and extracts a pointer to
+// the data at offset _pos_, allocating new blocks if required.
+
+#if CYGNUM_RAMFS_BLOCKS_INDIRECT2 > 0
+
+static int findbuffer_indirect2( off_t pos,
+ ramfs_block ****blocks,
+ int nblocks,
+ cyg_uint8 **buffer,
+ size_t *size,
+ cyg_bool alloc)
+{
+ int bi = pos / RAMFS_INDIRECT2_BLOCK_EXTENT;
+ int bpos = pos % RAMFS_INDIRECT2_BLOCK_EXTENT;
+ int err;
+ cyg_uint8 *b;
+ size_t sz;
+
+ // Use findbuffer_direct() to index and allocate
+ // the first level indirect block.
+
+ err = findbuffer_direct( bi*CYGNUM_RAMFS_BLOCK_SIZE,
+ (ramfs_block **)blocks,
+ nblocks,
+ &b,
+ &sz,
+ alloc);
+
+ if( err != ENOERR )
+ return err;
+
+ if( sz == 0 )
+ {
+ *size = 0;
+ return ENOERR;
+ }
+
+ // Use findbuffer_indirect1() on the first level indirect block to
+ // index and allocate the next level indirect block and the data
+ // block.
+
+ return findbuffer_indirect1( bpos,
+ blocks[bi],
+ RAMFS_INDIRECT_PER_BLOCK,
+ buffer,
+ size,
+ alloc);
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// findbuffer_node()
+// Depending on the offset and configuration, call the appropriate
+// function to get the buffer pointer.
+
+static int findbuffer_node( ramfs_node *node,
+ off_t pos,
+ cyg_uint8 **buffer,
+ size_t *size,
+ cyg_bool alloc)
+{
+#if CYGNUM_RAMFS_BLOCKS_DIRECT > 0
+ if( pos < RAMFS_DIRECT_MAX )
+ return findbuffer_direct( pos,
+ node->direct,
+ CYGNUM_RAMFS_BLOCKS_DIRECT,
+ buffer,
+ size,
+ alloc);
+#endif
+#if CYGNUM_RAMFS_BLOCKS_INDIRECT1 > 0
+ if( pos < RAMFS_INDIRECT1_MAX )
+ return findbuffer_indirect1( pos - RAMFS_DIRECT_MAX,
+ node->indirect1,
+ CYGNUM_RAMFS_BLOCKS_INDIRECT1,
+ buffer,
+ size,
+ alloc);
+#endif
+#if CYGNUM_RAMFS_BLOCKS_INDIRECT2 > 0
+ if( pos < RAMFS_INDIRECT2_MAX )
+ return findbuffer_indirect2( pos - RAMFS_INDIRECT1_MAX,
+ node->indirect2,
+ CYGNUM_RAMFS_BLOCKS_INDIRECT2,
+ buffer,
+ size,
+ alloc);
+#endif
+
+ return ENOSPC;
+}
+
+// -------------------------------------------------------------------------
+// freeblock_list()
+// Free a list of data blocks.
+
+static void freeblock_list( ramfs_block *blocks[],int nblocks )
+{
+ int i;
+ for( i = 0; i < nblocks ; i++ )
+ {
+ if( blocks[i] != NULL )
+ {
+ block_free( blocks[i] );
+ blocks[i] = NULL;
+ }
+ }
+}
+
+// -------------------------------------------------------------------------
+// freebuffer_node()
+// Free all the data blocks in the node and clear the pointers.
+
+static int freebuffer_node( ramfs_node *node )
+{
+#if CYGNUM_RAMFS_BLOCKS_DIRECT > 0
+ freeblock_list( node->direct, CYGNUM_RAMFS_BLOCKS_DIRECT );
+#endif
+
+#if CYGNUM_RAMFS_BLOCKS_INDIRECT1 > 0
+ {
+ int i;
+ for( i = 0; i < CYGNUM_RAMFS_BLOCKS_INDIRECT1 ; i++ )
+ {
+ if( node->indirect1[i] != NULL )
+ {
+ freeblock_list( (ramfs_block **)node->indirect1[i], RAMFS_INDIRECT_PER_BLOCK );
+ block_free( (ramfs_block *)node->indirect1[i] );
+ node->indirect1[i] = NULL;
+ }
+ }
+ }
+#endif
+
+#if CYGNUM_RAMFS_BLOCKS_INDIRECT2 > 0
+ {
+ int i;
+ for( i = 0; i < CYGNUM_RAMFS_BLOCKS_INDIRECT2 ; i++ )
+ {
+ if( node->indirect2[i] != NULL )
+ {
+ ramfs_block ***b = node->indirect2[i];
+ int j;
+ for( j = 0; j < RAMFS_INDIRECT_PER_BLOCK ; j++ )
+ {
+ if( b[j] != NULL )
+ {
+ freeblock_list( (ramfs_block **)b[j], RAMFS_INDIRECT_PER_BLOCK );
+ block_free( (ramfs_block *)b[j] );
+ b[j] = NULL;
+ }
+ }
+ block_free( (ramfs_block *)node->indirect2[i] );
+ node->indirect2[i] = NULL;
+ }
+ }
+ }
+#endif
+
+ return ENOERR;
+}
+
+//==========================================================================
+
+#endif
+
+//==========================================================================
+// Node allocation
+
+// -------------------------------------------------------------------------
+// alloc_node()
+// Allocate a node and initialize it.
+// For the _SIMPLE allocation option, we just malloc it. For the
+// _BLOCKS option we allocate a block and use that. In theory we could
+// pack several nodes into a single block, but we don't at present due
+// to sheer lazyness.
+
+static ramfs_node *alloc_node( mode_t mode )
+{
+#ifdef CYGPKG_FS_RAM_SIMPLE
+ ramfs_node *node = malloc( sizeof( ramfs_node ) );
+
+ if( node == NULL )
+ return NULL;
+
+#else
+ ramfs_block *b = block_alloc();
+ ramfs_node *node;
+
+ if( b == NULL )
+ return NULL;
+
+ node = (ramfs_node *)b;
+
+#endif
+
+ memset( node, 0, sizeof(ramfs_node) );
+
+ node->mode = mode;
+ node->refcnt = 0;
+ node->nlink = 0;
+ node->size = 0;
+ node->atime =
+ node->mtime =
+ node->ctime = cyg_timestamp();
+
+#ifdef CYGPKG_FS_RAM_SIMPLE
+ node->datasize = 0;
+ node->data = NULL;
+#else
+
+ // The node is already all zero
+
+#endif
+ return node;
+}
+
+// -------------------------------------------------------------------------
+// free_node()
+// Release a node either back to the free pool or back into the block
+// pool.
+
+static void free_node( ramfs_node *node )
+{
+#ifdef CYGPKG_FS_RAM_SIMPLE
+
+ free( node );
+
+#else
+
+ block_free( (ramfs_block *)node );
+
+#endif
+
+}
+
+
+//==========================================================================
+// Ref count and nlink management
+
+// -------------------------------------------------------------------------
+// dec_refcnt()
+// Decrment the reference count on a node. If this makes the ref count
+// zero, and the number of links is either zero for a file or one for
+// a node, then this node is detached from the directory tree and can
+// be freed.
+
+static int dec_refcnt( ramfs_node *node )
+{
+ int err = ENOERR;
+ node->refcnt--;
+
+ if( node->refcnt == 0 &&
+ ((S_ISREG(node->mode) && node->nlink == 0 ) ||
+ (S_ISDIR(node->mode) && node->nlink == 1) )
+ )
+ {
+ // This node it now totally detached from the directory tree,
+ // so delete it.
+
+ if( S_ISDIR(node->mode) )
+ {
+ del_direntry( node, ".", 1 );
+ del_direntry( node, "..", 2 );
+ }
+
+ err = freebuffer_node( node );
+
+ if( err == ENOERR )
+ free_node( node );
+ }
+
+ return err;
+}
+
+// -------------------------------------------------------------------------
+// dec_nlink()
+// Decrement a node's link count. Since this has to do all the same
+// work as dec_refcnt() we implement this using that function by
+// essentially transferring the count to refcnt and then decrement
+// that.
+
+static int dec_nlink( ramfs_node *node )
+{
+ node->refcnt++;
+
+ node->nlink--;
+
+ return dec_refcnt( node );
+}
+
+//==========================================================================
+// Directory operations
+
+// -------------------------------------------------------------------------
+// add_direntry()
+// Add an entry to a directory. This is added as a chain of entry
+// fragments until the name is exhausted.
+
+static int add_direntry( ramfs_node *dir, // dir to add to
+ const char *name, // name to add
+ int namelen, // length of name
+ ramfs_node *node // node to reference
+ )
+{
+ off_t pos = 0;
+ ramfs_dirent *d = NULL, *dp = NULL;
+ cyg_bool isfirst = true;
+
+ // Loop inserting fragments of the name into the directory until we
+ // have found a home for them all.
+
+ while( namelen > 0 )
+ {
+ int fraglen = namelen;
+
+ if( fraglen > sizeof(d->name) )
+ fraglen = sizeof(d->name);
+
+ // Find a free fragment
+ for(;;)
+ {
+ cyg_uint8 *buf;
+ size_t size;
+ int err = findbuffer_node( dir, pos, &buf, &size, true );
+ if( err != ENOERR ) return err;
+
+ d = (ramfs_dirent *)buf;
+
+ if( size < sizeof(ramfs_dirent) || d->inuse )
+ {
+ pos += sizeof(ramfs_dirent);
+ continue;
+ }
+
+ break;
+ }
+
+ // d now points to a free dirent structure
+
+ d->node = node;
+ d->inuse = 1;
+ d->first = isfirst;
+ d->namelen = namelen;
+ d->fraglen = fraglen;
+ if( dp ) dp->next = pos;
+
+ memcpy( d->name, name, fraglen );
+
+ name += fraglen;
+ namelen -= fraglen;
+ pos += sizeof(ramfs_dirent);
+ dp = d;
+ isfirst = false;
+
+ }
+
+
+ d->last = 1; // Mark last fragment
+
+ // Update directory times
+ dir->mtime =
+ dir->ctime = cyg_timestamp();
+
+ // Extend dir size if necessary
+ if( pos > dir->size )
+ dir->size = pos;
+
+ // Count the new link
+ node->nlink++;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// find_direntry()
+// Find a directory entry for the name and return a pointer to the first
+// entry fragment.
+
+static ramfs_dirent *find_direntry( ramfs_node *dir, const char *name, int namelen )
+{
+ ramfs_dirent *first = NULL;
+ off_t pos = 0;
+ int err;
+
+ // Loop over all the entries until a match is found or we run out
+ // of data.
+ while( pos < dir->size )
+ {
+ const char *frag = name;
+ ramfs_dirent *d;
+ cyg_uint8 *buf;
+ size_t size;
+
+ // look for a first name fragment
+ for(;;)
+ {
+ err = findbuffer_node( dir, pos, &buf, &size, false );
+ if( err != ENOERR || size == 0)
+ return NULL;
+
+ d = (ramfs_dirent *)buf;
+
+ if( size < sizeof(ramfs_dirent) || !d->inuse || !d->first )
+ {
+ pos += sizeof(ramfs_dirent);
+ continue;
+ }
+
+ break;
+ }
+
+ // Here we have got a first fragment of a name, check it
+ // against the name we are looking for. First check that they
+ // are the same length.
+
+ if( d->namelen == namelen )
+ {
+ // We have a potential candidate here...
+
+ first = d; // Save it for later
+
+ // Now check that all the name fragments match
+ for(;;)
+ {
+ int fraglen = namelen-(frag-name);
+
+ if( fraglen > d->fraglen )
+ fraglen = d->fraglen;
+
+ // compare strings, if different, look for another
+ if( memcmp( frag, d->name, fraglen ) != 0 )
+ break;
+
+ frag += fraglen;
+
+ // If we are at the last fragment, then the whole name string
+ // has matched and we have a successful search.
+
+ if( d->last )
+ return first;
+
+ // Otherwise move on to next entry in chain
+ err = findbuffer_node( dir, d->next, &buf, &size, false );
+ if( err != ENOERR )
+ return NULL;
+
+ d = (ramfs_dirent *)buf;
+
+ }
+ }
+
+ pos += sizeof(ramfs_dirent);
+ }
+
+ return NULL;
+}
+
+// -------------------------------------------------------------------------
+// del_direntry()
+// Delete a named directory entry. Find it and then follow the chain
+// deleting the fragments as we go.
+
+static int del_direntry( ramfs_node *dir, const char *name, int namelen )
+{
+ ramfs_dirent *d = find_direntry( dir, name, namelen );
+
+ if( d == NULL )
+ return ENOENT;
+
+ for(;;)
+ {
+ int err;
+ cyg_uint8 *buf;
+ size_t size;
+
+ d->inuse = 0;
+ if( d->last ) break;
+
+ err = findbuffer_node( dir, d->next, &buf, &size, false );
+ if( err != ENOERR )
+ return ENOENT;
+
+ d = (ramfs_dirent *)buf;
+ }
+
+ dec_nlink( d->node );
+
+ return ENOERR;
+}
+
+//==========================================================================
+// Directory search
+
+// -------------------------------------------------------------------------
+// init_dirsearch()
+// Initialize a dirsearch object to start a search
+
+static void init_dirsearch( ramfs_dirsearch *ds,
+ ramfs_node *dir,
+ const char *name)
+{
+ ds->dir = dir;
+ ds->path = name;
+ ds->node = dir;
+ ds->name = name;
+ ds->namelen = 0;
+ ds->last = false;
+}
+
+// -------------------------------------------------------------------------
+// find_entry()
+// Search a single directory for the next name in a path and update the
+// dirsearch object appropriately.
+
+static int find_entry( ramfs_dirsearch *ds )
+{
+ ramfs_node *dir = ds->dir;
+ const char *name = ds->path;
+ const char *n = name;
+ char namelen = 0;
+ ramfs_dirent *d;
+
+ // check that we really have a directory
+ if( !S_ISDIR(dir->mode) )
+ return ENOTDIR;
+
+ // Isolate the next element of the path name.
+ while( *n != '\0' && *n != '/' )
+ n++, namelen++;
+
+ // Check if this is the last path element.
+ while( *n == '/') n++;
+ if( *n == '\0' )
+ ds->last = true;
+
+ // update name in dirsearch object
+ ds->name = name;
+ ds->namelen = namelen;
+
+ // Here we have the name and its length set up.
+ // Search the directory for a matching entry
+
+ d = find_direntry( dir, name, namelen );
+
+ if( d == NULL )
+ return ENOENT;
+
+ // pass back the node we have found
+ ds->node = d->node;
+
+ return ENOERR;
+
+}
+
+// -------------------------------------------------------------------------
+// ramfs_find()
+// Main interface to directory search code. This is used in all file
+// level operations to locate the object named by the pathname.
+
+static int ramfs_find( ramfs_dirsearch *d )
+{
+ int err;
+
+ // Short circuit empty paths
+ if( *(d->path) == '\0' )
+ return ENOERR;
+
+ // iterate down directory tree until we find the object
+ // we want.
+ for(;;)
+ {
+ err = find_entry( d );
+
+ if( err != ENOERR )
+ return err;
+
+ if( d->last )
+ return ENOERR;
+
+ // Update dirsearch object to search next directory.
+ d->dir = d->node;
+ d->path += d->namelen;
+ while( *(d->path) == '/' ) d->path++; // skip dirname separators
+ }
+}
+
+//==========================================================================
+// Pathconf support
+// This function provides support for pathconf() and fpathconf().
+
+static int ramfs_pathconf( ramfs_node *node, struct cyg_pathconf_info *info )
+{
+ int err = ENOERR;
+
+ switch( info->name )
+ {
+ case _PC_LINK_MAX:
+ info->value = LINK_MAX;
+ break;
+
+ case _PC_MAX_CANON:
+ info->value = -1; // not supported
+ err = EINVAL;
+ break;
+
+ case _PC_MAX_INPUT:
+ info->value = -1; // not supported
+ err = EINVAL;
+ break;
+
+ case _PC_NAME_MAX:
+ info->value = NAME_MAX;
+ break;
+
+ case _PC_PATH_MAX:
+ info->value = PATH_MAX;
+ break;
+
+ case _PC_PIPE_BUF:
+ info->value = -1; // not supported
+ err = EINVAL;
+ break;
+
+
+ case _PC_ASYNC_IO:
+ info->value = -1; // not supported
+ err = EINVAL;
+ break;
+
+ case _PC_CHOWN_RESTRICTED:
+ info->value = -1; // not supported
+ err = EINVAL;
+ break;
+
+ case _PC_NO_TRUNC:
+ info->value = 0;
+ break;
+
+ case _PC_PRIO_IO:
+ info->value = 0;
+ break;
+
+ case _PC_SYNC_IO:
+ info->value = 0;
+ break;
+
+ case _PC_VDISABLE:
+ info->value = -1; // not supported
+ err = EINVAL;
+ break;
+
+ default:
+ err = EINVAL;
+ break;
+ }
+
+ return err;
+}
+
+//==========================================================================
+// Filesystem operations
+
+// -------------------------------------------------------------------------
+// ramfs_mount()
+// Process a mount request. This mainly creates a root for the
+// filesystem.
+
+static int ramfs_mount ( cyg_fstab_entry *fste, cyg_mtab_entry *mte )
+{
+ ramfs_node *root;
+ int err;
+
+ // Allocate a node to be the root of this filesystem and initialize it.
+
+ root = alloc_node(__stat_mode_DIR);
+
+ if( root == NULL )
+ return ENOSPC;
+
+ // Add . and .. entries back to self.
+
+ err = add_direntry( root, ".", 1, root );
+ if( err == ENOERR )
+ err = add_direntry( root, "..", 2, root );
+
+ if( err != ENOERR )
+ {
+ free_node( root );
+ return err;
+ }
+
+ mte->root = (cyg_dir)root;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_umount()
+// Unmount the filesystem. This will currently only succeed if the
+// filesystem is empty.
+
+static int ramfs_umount ( cyg_mtab_entry *mte )
+{
+ ramfs_node *root = (ramfs_node *)mte->root;
+
+ // Check for open/inuse root
+ if( root->refcnt != 0 )
+ return EBUSY;
+
+ // Check that root directory is clear of extra links.
+ if( root->nlink != 2 )
+ return EBUSY;
+
+ // Just return it to free pool
+ free_node( root );
+
+ // Clear root pointer
+ mte->root = CYG_DIR_NULL;
+
+ // That's all folks.
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_open()
+// Open a file for reading or writing.
+
+static int ramfs_open ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int mode, cyg_file *file )
+{
+
+ ramfs_dirsearch ds;
+ ramfs_node *node = NULL;
+ int err;
+
+ init_dirsearch( &ds, (ramfs_node *)dir, name );
+
+ err = ramfs_find( &ds );
+
+ if( err == ENOENT )
+ {
+ if( ds.last && (mode & O_CREAT) )
+ {
+ // No node there, if the O_CREAT bit is set then we must
+ // create a new one. The dir and name fields of the dirsearch
+ // object will have been updated so we know where to put it.
+
+ node = alloc_node( __stat_mode_REG );
+
+ if( node == NULL )
+ return ENOSPC;
+
+ err = add_direntry( ds.dir, ds.name, ds.namelen, node );
+
+ if( err != ENOERR )
+ {
+ free_node( node );
+ return err;
+ }
+
+ err = ENOERR;
+ }
+ }
+ else if( err == ENOERR )
+ {
+ // The node exists. If the O_CREAT and O_EXCL bits are set, we
+ // must fail the open.
+
+ if( (mode & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL) )
+ err = EEXIST;
+ else node = ds.node;
+ }
+
+ if( err == ENOERR && (mode & O_TRUNC ) )
+ {
+ // If the O_TRUNC bit is set we must clean out the file data.
+
+ err = freebuffer_node( node );
+ node->size = 0;
+
+ // Update file times
+ node->ctime =
+ node->mtime = cyg_timestamp();
+ }
+
+ if( err != ENOERR ) return err;
+
+ // Check that we actually have a file here
+ if( S_ISDIR(node->mode) ) return EISDIR;
+
+ node->refcnt++; // Count successful open
+
+ // Initialize the file object
+
+ file->f_flag |= mode & CYG_FILE_MODE_MASK;
+ file->f_type = CYG_FILE_TYPE_FILE;
+ file->f_ops = &ramfs_fileops;
+ file->f_offset = (mode&O_APPEND) ? node->size : 0;
+ file->f_data = (CYG_ADDRWORD)node;
+ file->f_xops = 0;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_unlink()
+// Remove a file link from its directory.
+
+static int ramfs_unlink ( cyg_mtab_entry *mte, cyg_dir dir, const char *name )
+{
+ ramfs_dirsearch ds;
+ int err;
+
+ init_dirsearch( &ds, (ramfs_node *)dir, name );
+
+ err = ramfs_find( &ds );
+
+ if( err != ENOERR ) return err;
+
+ // Cannot unlink directories, use rmdir() instead
+ if( S_ISDIR(ds.node->mode) )
+ return EPERM;
+
+ // Delete it from its directory
+ err = del_direntry( ds.dir, ds.name, ds.namelen );
+
+ return err;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_mkdir()
+// Create a new directory.
+
+static int ramfs_mkdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name )
+{
+ ramfs_dirsearch ds;
+ ramfs_node *node = NULL;
+ int err;
+
+ init_dirsearch( &ds, (ramfs_node *)dir, name );
+
+ err = ramfs_find( &ds );
+
+ if( err == ENOENT )
+ {
+ if( ds.last )
+ {
+ // The entry does not exist, and it is the last element in
+ // the pathname, so we can create it here.
+ int doterr, dotdoterr, direrr;
+
+ node = alloc_node( __stat_mode_DIR );
+
+ if( node == NULL )
+ return ENOSPC;
+
+ // Add "." and ".." entries.
+ doterr = add_direntry( node, ".", 1, node );
+ dotdoterr = add_direntry( node, "..", 2, ds.dir );
+
+ // And add to parent directory.
+ direrr = add_direntry( ds.dir, ds.name, ds.namelen, node );
+
+ // check for any errors in that...
+ if( doterr+dotdoterr+direrr != ENOERR )
+ {
+ // For each of the add_direntry() calls that succeeded,
+ // we must now undo it.
+
+ if( doterr == ENOERR )
+ del_direntry( node, ".", 1 );
+ else err = doterr;
+
+ if( dotdoterr == ENOERR )
+ del_direntry( node, "..", 2 );
+ else err = dotdoterr;
+
+ if( direrr == ENOERR )
+ del_direntry( ds.dir, ds.name, ds.namelen );
+ else err = direrr;
+
+ // Free the data and the node itself.
+ freebuffer_node( node );
+ free_node( node );
+ }
+ else err = ENOERR;
+ }
+ // If this was not the last element, then and intermediate
+ // directory does not exist.
+ }
+ else
+ {
+ // If there we no error, something already exists with that
+ // name, so we cannot create another one.
+
+ if( err == ENOERR )
+ err = EEXIST;
+ }
+
+ return err;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_rmdir()
+// Remove a directory.
+
+static int ramfs_rmdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name )
+{
+ ramfs_dirsearch ds;
+ int err;
+
+ init_dirsearch( &ds, (ramfs_node *)dir, name );
+
+ err = ramfs_find( &ds );
+
+ if( err != ENOERR ) return err;
+
+ // Check that this is actually a directory.
+ if( !S_ISDIR(ds.node->mode) )
+ return EPERM;
+
+ // Delete the entry. This will adjust the link values
+ // accordingly and if the directory is now unreferenced,
+ // will cause it to be deleted.
+
+ err = del_direntry( ds.dir, ds.name, ds.namelen );
+
+ return err;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_rename()
+// Rename a file/dir.
+
+static int ramfs_rename ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2 )
+{
+ ramfs_dirsearch ds1, ds2;
+ int err;
+
+ init_dirsearch( &ds1, (ramfs_node *)dir1, name1 );
+
+ err = ramfs_find( &ds1 );
+
+ if( err != ENOERR ) return err;
+
+ init_dirsearch( &ds2, (ramfs_node *)dir2, name2 );
+
+ err = ramfs_find( &ds2 );
+
+ // Allow through renames to non-existent objects.
+ if( ds2.last && err == ENOENT )
+ ds2.node = NULL, err = ENOERR;
+
+ if( err != ENOERR ) return err;
+
+ // Null rename, just return
+ if( ds1.node == ds2.node )
+ return ENOERR;
+
+ // First deal with any entry that is at the destination
+ if( ds2.node )
+ {
+ // Check that we are renaming like-for-like
+
+ if( !S_ISDIR(ds1.node->mode) && S_ISDIR(ds2.node->mode) )
+ return EISDIR;
+
+ if( S_ISDIR(ds1.node->mode) && !S_ISDIR(ds2.node->mode) )
+ return ENOTDIR;
+
+ // Now delete the destination directory entry
+
+ err = del_direntry( ds2.dir, ds2.name, ds2.namelen );
+
+ if( err != ENOERR ) return err;
+
+ }
+
+ // Now we know that there is no clashing node at the destination,
+ // make a new direntry at the destination and delete the old entry
+ // at the source.
+
+ err = add_direntry( ds2.dir, ds2.name, ds2.namelen, ds1.node );
+
+ if( err == ENOERR )
+ err = del_direntry( ds1.dir, ds1.name, ds1.namelen );
+
+ // Update directory times
+ if( err == ENOERR )
+ ds1.dir->ctime =
+ ds1.dir->mtime =
+ ds2.dir->ctime =
+ ds2.dir->mtime = cyg_timestamp();
+
+ return err;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_link()
+// Make a new directory entry for a file.
+
+static int ramfs_link ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2, int type )
+{
+ ramfs_dirsearch ds1, ds2;
+ int err;
+
+ // Only do hard links for now in this filesystem
+ if( type != CYG_FSLINK_HARD )
+ return EINVAL;
+
+ init_dirsearch( &ds1, (ramfs_node *)dir1, name1 );
+
+ err = ramfs_find( &ds1 );
+
+ if( err != ENOERR ) return err;
+
+ init_dirsearch( &ds2, (ramfs_node *)dir2, name2 );
+
+ err = ramfs_find( &ds2 );
+
+ // Don't allow links to existing objects
+ if( err == ENOERR ) return EEXIST;
+
+ // Allow through links to non-existing terminal objects
+ if( ds2.last && err == ENOENT )
+ ds2.node = NULL, err = ENOERR;
+
+ if( err != ENOERR ) return err;
+
+ // Now we know that there is no existing node at the destination,
+ // make a new direntry at the destination.
+
+ err = add_direntry( ds2.dir, ds2.name, ds2.namelen, ds1.node );
+
+ if( err == ENOERR )
+ ds1.node->ctime =
+ ds2.dir->ctime =
+ ds2.dir->mtime = cyg_timestamp();
+
+ return err;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_opendir()
+// Open a directory for reading.
+
+static int ramfs_opendir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_file *file )
+{
+ ramfs_dirsearch ds;
+ int err;
+
+ init_dirsearch( &ds, (ramfs_node *)dir, name );
+
+ err = ramfs_find( &ds );
+
+ if( err != ENOERR ) return err;
+
+ // check it is really a directory.
+ if( !S_ISDIR(ds.node->mode) ) return ENOTDIR;
+
+ ds.node->refcnt++; // Count successful open
+
+ // Initialize the file object, setting the f_ops field to a
+ // special set of file ops.
+
+ file->f_type = CYG_FILE_TYPE_FILE;
+ file->f_ops = &ramfs_dirops;
+ file->f_offset = 0;
+ file->f_data = (CYG_ADDRWORD)ds.node;
+ file->f_xops = 0;
+
+ return ENOERR;
+
+}
+
+// -------------------------------------------------------------------------
+// ramfs_chdir()
+// Change directory support.
+
+static int ramfs_chdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_dir *dir_out )
+{
+ if( dir_out != NULL )
+ {
+ // This is a request to get a new directory pointer in
+ // *dir_out.
+
+ ramfs_dirsearch ds;
+ int err;
+
+ init_dirsearch( &ds, (ramfs_node *)dir, name );
+
+ err = ramfs_find( &ds );
+
+ if( err != ENOERR ) return err;
+
+ // check it is a directory
+ if( !S_ISDIR(ds.node->mode) )
+ return ENOTDIR;
+
+ // Increment ref count to keep this directory in existent
+ // while it is the current cdir.
+ ds.node->refcnt++;
+
+ // Pass it out
+ *dir_out = (cyg_dir)ds.node;
+ }
+ else
+ {
+ // If no output dir is required, this means that the mte and
+ // dir arguments are the current cdir setting and we should
+ // forget this fact.
+
+ ramfs_node *node = (ramfs_node *)dir;
+
+ // Just decrement directory reference count.
+ dec_refcnt( node );
+ }
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_stat()
+// Get struct stat info for named object.
+
+static int ramfs_stat ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ struct stat *buf)
+{
+ ramfs_dirsearch ds;
+ int err;
+
+ init_dirsearch( &ds, (ramfs_node *)dir, name );
+
+ err = ramfs_find( &ds );
+
+ if( err != ENOERR ) return err;
+
+ // Fill in the status
+ buf->st_mode = ds.node->mode;
+ buf->st_ino = (ino_t)ds.node;
+ buf->st_dev = 0;
+ buf->st_nlink = ds.node->nlink;
+ buf->st_uid = 0;
+ buf->st_gid = 0;
+ buf->st_size = ds.node->size;
+ buf->st_atime = ds.node->atime;
+ buf->st_mtime = ds.node->mtime;
+ buf->st_ctime = ds.node->ctime;
+
+ return err;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_getinfo()
+// Getinfo. Currently only support pathconf().
+
+static int ramfs_getinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len )
+{
+ ramfs_dirsearch ds;
+ int err;
+
+ init_dirsearch( &ds, (ramfs_node *)dir, name );
+
+ err = ramfs_find( &ds );
+
+ if( err != ENOERR ) return err;
+
+ switch( key )
+ {
+ case FS_INFO_CONF:
+ err = ramfs_pathconf( ds.node, (struct cyg_pathconf_info *)buf );
+ break;
+
+ default:
+ err = EINVAL;
+ }
+ return err;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_setinfo()
+// Setinfo. Nothing to support here at present.
+
+static int ramfs_setinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len )
+{
+ // No setinfo keys supported at present
+
+ return EINVAL;
+}
+
+
+//==========================================================================
+// File operations
+
+// -------------------------------------------------------------------------
+// ramfs_fo_read()
+// Read data from the file.
+
+static int ramfs_fo_read (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio)
+{
+ ramfs_node *node = (ramfs_node *)fp->f_data;
+ int i;
+ off_t pos = fp->f_offset;
+ ssize_t resid = uio->uio_resid;
+
+ // Loop over the io vectors until there are none left
+ for( i = 0; i < uio->uio_iovcnt; i++ )
+ {
+ cyg_iovec *iov = &uio->uio_iov[i];
+ char *buf = (char *)iov->iov_base;
+ off_t len = iov->iov_len;
+
+ // Loop over each vector filling it with data from the file.
+ while( len > 0 && pos < node->size )
+ {
+ cyg_uint8 *fbuf;
+ size_t bsize;
+ off_t l = len;
+ int err;
+
+ // Get a pointer to the data at offset _pos_.
+ err = findbuffer_node( node, pos, &fbuf, &bsize, false );
+
+ if( err != ENOERR )
+ return err;
+
+ // adjust size to end of file if necessary
+ if( l > node->size-pos )
+ l = node->size-pos;
+
+ // adjust size to the amount of contiguous data we can see
+ // at present.
+ if( l > bsize )
+ l = bsize;
+
+ // copy data out
+ memcpy( buf, fbuf, l );
+
+ // Update working vars
+ len -= l;
+ buf += l;
+ pos += l;
+ resid -= l;
+ }
+ }
+
+ // We successfully read some data, update the node's access time
+ // and update the file offset and transfer residue.
+
+ node->atime = cyg_timestamp();
+
+ uio->uio_resid = resid;
+ fp->f_offset = pos;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_fo_write()
+// Write data to file.
+
+static int ramfs_fo_write (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio)
+{
+ ramfs_node *node = (ramfs_node *)fp->f_data;
+ off_t pos = fp->f_offset;
+ ssize_t resid = uio->uio_resid;
+ int err = ENOERR;
+ int i;
+
+ // If the APPEND mode bit was supplied, force all writes to
+ // the end of the file.
+ if( fp->f_flag & CYG_FAPPEND )
+ pos = fp->f_offset = node->size;
+
+ // Check that pos is within current file size, or at the very end.
+ if( pos < 0 || pos > node->size )
+ return EINVAL;
+
+ // Now loop over the iovecs until they are all done, or
+ // we get an error.
+ for( i = 0; i < uio->uio_iovcnt; i++ )
+ {
+ cyg_iovec *iov = &uio->uio_iov[i];
+ char *buf = (char *)iov->iov_base;
+ off_t len = iov->iov_len;
+
+ // loop over the vector writing it to the file until it has
+ // all been done.
+ while( len > 0 )
+ {
+ cyg_uint8 *fbuf;
+ size_t bsize;
+ off_t l = len;
+
+ err = findbuffer_node( node, pos, &fbuf, &bsize, true );
+
+ // Stop writing if there is no more space in the file and
+ // indicate end of data.
+ if( err == ENOSPC )
+ break;
+
+ if( err != ENOERR )
+ return err;
+
+ // adjust size to this block
+ if( l > bsize )
+ l = bsize;
+
+ // copy data in
+ memcpy( fbuf, buf, l );
+
+ // Update working vars
+ len -= l;
+ buf += l;
+ pos += l;
+ resid -= l;
+ }
+ }
+
+ // We wrote some data successfully, update the modified and access
+ // times of the node, increase its size appropriately, and update
+ // the file offset and transfer residue.
+ node->mtime =
+ node->ctime = cyg_timestamp();
+ if( pos > node->size )
+ node->size = pos;
+
+ uio->uio_resid = resid;
+ fp->f_offset = pos;
+
+ return err;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_fo_lseek()
+// Seek to a new file position.
+
+static int ramfs_fo_lseek (struct CYG_FILE_TAG *fp, off_t *apos, int whence )
+{
+ ramfs_node *node = (ramfs_node *)fp->f_data;
+ off_t pos = *apos;
+
+ switch( whence )
+ {
+ case SEEK_SET:
+ // Pos is already where we want to be.
+ break;
+
+ case SEEK_CUR:
+ // Add pos to current offset.
+ pos += fp->f_offset;
+ break;
+
+ case SEEK_END:
+ // Add pos to file size.
+ pos += node->size;
+ break;
+
+ default:
+ return EINVAL;
+ }
+
+ // Check that pos is still within current file size, or at the
+ // very end.
+ if( pos < 0 || pos > node->size )
+ return EINVAL;
+
+ // All OK, set fp offset and return new position.
+ *apos = fp->f_offset = pos;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_fo_ioctl()
+// Handle ioctls. Currently none are defined.
+
+static int ramfs_fo_ioctl (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com,
+ CYG_ADDRWORD data)
+{
+ // No Ioctls currenly defined.
+
+ return EINVAL;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_fo_fsync().
+// Force the file out to data storage.
+
+static int ramfs_fo_fsync (struct CYG_FILE_TAG *fp, int mode )
+{
+ // Data is always permanently where it belongs, nothing to do
+ // here.
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_fo_close()
+// Close a file. We just decrement the refcnt and let it go away if
+// that is all that is keeping it here.
+
+static int ramfs_fo_close (struct CYG_FILE_TAG *fp)
+{
+ ramfs_node *node = (ramfs_node *)fp->f_data;
+
+ dec_refcnt( node );
+
+ fp->f_data = 0; // zero data pointer
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+//ramfs_fo_fstat()
+// Get file status.
+
+static int ramfs_fo_fstat (struct CYG_FILE_TAG *fp, struct stat *buf )
+{
+ ramfs_node *node = (ramfs_node *)fp->f_data;
+
+ // Fill in the status
+ buf->st_mode = node->mode;
+ buf->st_ino = (ino_t)node;
+ buf->st_dev = 0;
+ buf->st_nlink = node->nlink;
+ buf->st_uid = 0;
+ buf->st_gid = 0;
+ buf->st_size = node->size;
+ buf->st_atime = node->atime;
+ buf->st_mtime = node->mtime;
+ buf->st_ctime = node->ctime;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_fo_getinfo()
+// Get info. Currently only supports fpathconf().
+
+static int ramfs_fo_getinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len )
+{
+ ramfs_node *node = (ramfs_node *)fp->f_data;
+ int err;
+
+ switch( key )
+ {
+ case FS_INFO_CONF:
+ err = ramfs_pathconf( node, (struct cyg_pathconf_info *)buf );
+ break;
+
+ default:
+ err = EINVAL;
+ }
+ return err;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_fo_setinfo()
+// Set info. Nothing supported here.
+
+static int ramfs_fo_setinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len )
+{
+ // No setinfo key supported at present
+
+ return ENOERR;
+}
+
+
+//==========================================================================
+// Directory operations
+
+// -------------------------------------------------------------------------
+// ramfs_fo_dirread()
+// Read a single directory entry from a file.
+
+static int ramfs_fo_dirread (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio)
+{
+ ramfs_node *dir = (ramfs_node *)fp->f_data;
+ off_t pos = fp->f_offset;
+ int err = ENOERR;
+ struct dirent *ent = (struct dirent *)uio->uio_iov[0].iov_base;
+ char *nbuf = ent->d_name;
+ int nlen = sizeof(ent->d_name)-1;
+ off_t len = uio->uio_iov[0].iov_len;
+ ramfs_dirent *d = NULL;
+ cyg_uint8 *buf;
+ size_t size;
+
+ if( len < sizeof(struct dirent) )
+ return EINVAL;
+
+ // look for a first name fragment
+
+ while( pos < dir->size )
+ {
+ err = findbuffer_node( dir, pos, &buf, &size, false );
+ if( err != ENOERR || size == 0)
+ break;
+
+ d = (ramfs_dirent *)buf;
+
+ if( size < sizeof(ramfs_dirent) || !d->inuse || !d->first )
+ {
+ pos += sizeof(ramfs_dirent);
+ continue;
+ }
+
+ break;
+ }
+
+ // Check we have not exceeded the size of the directory.
+ if( pos == dir->size )
+ return err;
+
+ // Here we have the first fragment of a directory entry.
+
+ for(;;)
+ {
+ int fraglen = d->fraglen;
+
+ // adjust to allow for remaining space in dirent struct
+ if( fraglen > nlen )
+ fraglen = nlen;
+
+ memcpy( nbuf, d->name, fraglen);
+ nbuf += fraglen;
+ nlen -= fraglen;
+
+ // if we hit the last entry, we have a successful transfer
+ if( d->last || nlen == 0)
+ break;
+
+ // Otherwise move on to next entry in chain
+ err = findbuffer_node( dir, d->next, &buf, &size, false );
+ if( err != ENOERR )
+ return err;
+
+ d = (ramfs_dirent *)buf;
+ }
+
+ // A successful read. Terminate the entry name with a NUL, set the
+ // residue and set the file offset to restart at the next
+ // directory entry.
+
+ *nbuf = '\0';
+ uio->uio_resid -= sizeof(struct dirent);
+ fp->f_offset = pos+sizeof(ramfs_dirent);
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// ramfs_fo_dirlseek()
+// Seek directory to start.
+
+static int ramfs_fo_dirlseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence )
+{
+ // Only allow SEEK_SET to zero
+
+ if( whence != SEEK_SET || *pos != 0)
+ return EINVAL;
+
+ *pos = fp->f_offset = 0;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// EOF ramfs.c
diff --git a/cesar/ecos/packages/fs/ram/current/tests/ramfs1.c b/cesar/ecos/packages/fs/ram/current/tests/ramfs1.c
new file mode 100644
index 0000000000..42fdbc1cd2
--- /dev/null
+++ b/cesar/ecos/packages/fs/ram/current/tests/ramfs1.c
@@ -0,0 +1,654 @@
+//==========================================================================
+//
+// ramfs1.c
+//
+// Test fileio system
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2004 eCosCentric Limited
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-05-25
+// Purpose: Test fileio system
+// Description: This test uses the testfs to check out the initialization
+// and basic operation of the fileio system
+//
+//
+//
+//
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/io_fileio.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <string.h>
+#include <dirent.h>
+
+#include <cyg/fileio/fileio.h>
+
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h> // HAL polled output
+
+//==========================================================================
+
+#if 0
+MTAB_ENTRY( ramfs_mte1,
+ "/",
+ "ramfs",
+ "",
+ 0);
+#endif
+
+//==========================================================================
+
+#define SHOW_RESULT( _fn, _res ) \
+diag_printf("<FAIL>: " #_fn "() returned %ld %s\n", (long)_res, _res<0?strerror(errno):"");
+
+//==========================================================================
+
+#define IOSIZE 100
+
+#define LONGNAME1 "long_file_name_that_should_take_up_more_than_one_directory_entry_1"
+#define LONGNAME2 "long_file_name_that_should_take_up_more_than_one_directory_entry_2"
+
+
+//==========================================================================
+
+#ifndef CYGPKG_LIBC_STRING
+
+char *strcat( char *s1, const char *s2 )
+{
+ char *s = s1;
+ while( *s1 ) s1++;
+ while( (*s1++ = *s2++) != 0);
+ return s;
+}
+
+#endif
+
+//==========================================================================
+
+static void listdir( char *name, int statp, int numexpected, int *numgot )
+{
+ int err;
+ DIR *dirp;
+ int num=0;
+
+ diag_printf("<INFO>: reading directory %s\n",name);
+
+ dirp = opendir( name );
+ if( dirp == NULL ) SHOW_RESULT( opendir, -1 );
+
+ for(;;)
+ {
+ struct dirent *entry = readdir( dirp );
+
+ if( entry == NULL )
+ break;
+ num++;
+ diag_printf("<INFO>: entry %14s",entry->d_name);
+ if( statp )
+ {
+ char fullname[PATH_MAX];
+ struct stat sbuf;
+
+ if( name[0] )
+ {
+ strcpy(fullname, name );
+ if( !(name[0] == '/' && name[1] == 0 ) )
+ strcat(fullname, "/" );
+ }
+ else fullname[0] = 0;
+
+ strcat(fullname, entry->d_name );
+
+ err = stat( fullname, &sbuf );
+ if( err < 0 )
+ {
+ if( errno == ENOSYS )
+ diag_printf(" <no status available>");
+ else SHOW_RESULT( stat, err );
+ }
+ else
+ {
+ diag_printf(" [mode %08x ino %08x nlink %d size %ld]",
+ sbuf.st_mode,sbuf.st_ino,sbuf.st_nlink,
+ (unsigned long) sbuf.st_size);
+ }
+ }
+
+ diag_printf("\n");
+ }
+
+ err = closedir( dirp );
+ if( err < 0 ) SHOW_RESULT( stat, err );
+ if (numexpected >= 0 && num != numexpected)
+ CYG_TEST_FAIL("Wrong number of dir entries\n");
+ if ( numgot != NULL )
+ *numgot = num;
+}
+
+//==========================================================================
+
+static void createfile( char *name, size_t size )
+{
+ char buf[IOSIZE];
+ int fd;
+ ssize_t wrote;
+ int i;
+ int err;
+
+ diag_printf("<INFO>: create file %s size %d\n",name,size);
+
+ err = access( name, F_OK );
+ if( err < 0 && errno != EACCES ) SHOW_RESULT( access, err );
+
+ for( i = 0; i < IOSIZE; i++ ) buf[i] = i%256;
+
+ fd = open( name, O_WRONLY|O_CREAT );
+ if( fd < 0 ) SHOW_RESULT( open, fd );
+
+ while( size > 0 )
+ {
+ ssize_t len = size;
+ if ( len > IOSIZE ) len = IOSIZE;
+
+ wrote = write( fd, buf, len );
+ if( wrote != len ) SHOW_RESULT( write, wrote );
+
+ size -= wrote;
+ }
+
+ err = close( fd );
+ if( err < 0 ) SHOW_RESULT( close, err );
+}
+
+//==========================================================================
+
+#if 0
+static void maxfile( char *name )
+{
+ char buf[IOSIZE];
+ int fd;
+ ssize_t wrote;
+ int i;
+ int err;
+ size_t size = 0;
+
+ diag_printf("<INFO>: create maximal file %s\n",name);
+
+ err = access( name, F_OK );
+ if( err < 0 && errno != EACCES ) SHOW_RESULT( access, err );
+
+ for( i = 0; i < IOSIZE; i++ ) buf[i] = i%256;
+
+ fd = open( name, O_WRONLY|O_CREAT );
+ if( fd < 0 ) SHOW_RESULT( open, fd );
+
+ do
+ {
+ wrote = write( fd, buf, IOSIZE );
+ if( wrote < 0 ) SHOW_RESULT( write, wrote );
+
+ size += wrote;
+
+ } while( wrote == IOSIZE );
+
+ diag_printf("<INFO>: file size == %d\n",size);
+
+ err = close( fd );
+ if( err < 0 ) SHOW_RESULT( close, err );
+}
+#endif
+
+//==========================================================================
+
+static void checkfile( char *name )
+{
+ char buf[IOSIZE];
+ int fd;
+ ssize_t done;
+ int i;
+ int err;
+ off_t pos = 0;
+
+ diag_printf("<INFO>: check file %s\n",name);
+
+ err = access( name, F_OK );
+ if( err != 0 ) SHOW_RESULT( access, err );
+
+ fd = open( name, O_RDONLY );
+ if( fd < 0 ) SHOW_RESULT( open, fd );
+
+ for(;;)
+ {
+ done = read( fd, buf, IOSIZE );
+ if( done < 0 ) SHOW_RESULT( read, done );
+
+ if( done == 0 ) break;
+
+ for( i = 0; i < done; i++ )
+ if( buf[i] != i%256 )
+ {
+ diag_printf("buf[%ld+%d](%02x) != %02x\n",
+ (unsigned long)pos,i,buf[i],i%256);
+ CYG_TEST_FAIL("Data read not equal to data written\n");
+ }
+
+ pos += done;
+ }
+
+ err = close( fd );
+ if( err < 0 ) SHOW_RESULT( close, err );
+}
+
+//==========================================================================
+
+static void copyfile( char *name2, char *name1 )
+{
+
+ int err;
+ char buf[IOSIZE];
+ int fd1, fd2;
+ ssize_t done, wrote;
+
+ diag_printf("<INFO>: copy file %s -> %s\n",name2,name1);
+
+ err = access( name1, F_OK );
+ if( err < 0 && errno != EACCES ) SHOW_RESULT( access, err );
+
+ err = access( name2, F_OK );
+ if( err != 0 ) SHOW_RESULT( access, err );
+
+ fd1 = open( name1, O_WRONLY|O_CREAT );
+ if( fd1 < 0 ) SHOW_RESULT( open, fd1 );
+
+ fd2 = open( name2, O_RDONLY );
+ if( fd2 < 0 ) SHOW_RESULT( open, fd2 );
+
+ for(;;)
+ {
+ done = read( fd2, buf, IOSIZE );
+ if( done < 0 ) SHOW_RESULT( read, done );
+
+ if( done == 0 ) break;
+
+ wrote = write( fd1, buf, done );
+ if( wrote != done ) SHOW_RESULT( write, wrote );
+
+ if( wrote != done ) break;
+ }
+
+ err = close( fd1 );
+ if( err < 0 ) SHOW_RESULT( close, err );
+
+ err = close( fd2 );
+ if( err < 0 ) SHOW_RESULT( close, err );
+
+}
+
+//==========================================================================
+
+static void comparefiles( char *name2, char *name1 )
+{
+ int err;
+ char buf1[IOSIZE];
+ char buf2[IOSIZE];
+ int fd1, fd2;
+ ssize_t done1, done2;
+ int i;
+
+ diag_printf("<INFO>: compare files %s == %s\n",name2,name1);
+
+ err = access( name1, F_OK );
+ if( err != 0 ) SHOW_RESULT( access, err );
+
+ err = access( name1, F_OK );
+ if( err != 0 ) SHOW_RESULT( access, err );
+
+ fd1 = open( name1, O_RDONLY );
+ if( fd1 < 0 ) SHOW_RESULT( open, fd1 );
+
+ fd2 = open( name2, O_RDONLY );
+ if( fd2 < 0 ) SHOW_RESULT( open, fd2 );
+
+ for(;;)
+ {
+ done1 = read( fd1, buf1, IOSIZE );
+ if( done1 < 0 ) SHOW_RESULT( read, done1 );
+
+ done2 = read( fd2, buf2, IOSIZE );
+ if( done2 < 0 ) SHOW_RESULT( read, done2 );
+
+ if( done1 != done2 )
+ diag_printf("Files different sizes\n");
+
+ if( done1 == 0 ) break;
+
+ for( i = 0; i < done1; i++ )
+ if( buf1[i] != buf2[i] )
+ {
+ diag_printf("buf1[%d](%02x) != buf1[%d](%02x)\n",i,buf1[i],i,buf2[i]);
+ CYG_TEST_FAIL("Data in files not equal\n");
+ }
+ }
+
+ err = close( fd1 );
+ if( err < 0 ) SHOW_RESULT( close, err );
+
+ err = close( fd2 );
+ if( err < 0 ) SHOW_RESULT( close, err );
+
+}
+
+//==========================================================================
+
+void checkcwd( const char *cwd )
+{
+ static char cwdbuf[PATH_MAX];
+ char *ret;
+
+ ret = getcwd( cwdbuf, sizeof(cwdbuf));
+ if( ret == NULL ) SHOW_RESULT( getcwd, ret );
+
+ if( strcmp( cwdbuf, cwd ) != 0 )
+ {
+ diag_printf( "cwdbuf %s cwd %s\n",cwdbuf, cwd );
+ CYG_TEST_FAIL( "Current directory mismatch");
+ }
+}
+
+//==========================================================================
+// main
+
+int main( int argc, char **argv )
+{
+ int err;
+ int existingdirents=-1;
+
+ CYG_TEST_INIT();
+
+ // --------------------------------------------------------------
+
+ err = mount( "", "/", "ramfs" );
+ if( err < 0 ) SHOW_RESULT( mount, err );
+
+ err = chdir( "/" );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+
+ checkcwd( "/" );
+
+ listdir( "/", true, -1, &existingdirents );
+ if ( existingdirents < 2 )
+ CYG_TEST_FAIL("Not enough dir entries\n");
+
+ // --------------------------------------------------------------
+
+ createfile( "/foo", 202 );
+ checkfile( "foo" );
+ copyfile( "foo", "fee");
+ checkfile( "fee" );
+ comparefiles( "foo", "/fee" );
+ diag_printf("<INFO>: mkdir bar\n");
+ err = mkdir( "/bar", 0 );
+ if( err < 0 ) SHOW_RESULT( mkdir, err );
+
+ listdir( "/" , true, existingdirents+3, NULL );
+
+ copyfile( "fee", "/bar/fum" );
+ checkfile( "bar/fum" );
+ comparefiles( "/fee", "bar/fum" );
+
+ diag_printf("<INFO>: cd bar\n");
+ err = chdir( "bar" );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+
+ checkcwd( "/bar" );
+
+ diag_printf("<INFO>: rename /foo bundy\n");
+ err = rename( "/foo", "bundy" );
+ if( err < 0 ) SHOW_RESULT( rename, err );
+
+ listdir( "/", true, existingdirents+2, NULL );
+ listdir( "" , true, 4, NULL );
+
+ checkfile( "/bar/bundy" );
+ comparefiles("/fee", "bundy" );
+
+ // --------------------------------------------------------------
+
+ createfile( LONGNAME1, 123 );
+ checkfile( LONGNAME1 );
+ copyfile( LONGNAME1, LONGNAME2 );
+
+ listdir( "", false, 6, NULL );
+
+ diag_printf("<INFO>: unlink " LONGNAME1 "\n");
+ err = unlink( LONGNAME1 );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+ diag_printf("<INFO>: unlink " LONGNAME2 "\n");
+ err = unlink( LONGNAME2 );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+
+ // --------------------------------------------------------------
+
+ diag_printf("<INFO>: unlink fee\n");
+ err = unlink( "/fee" );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+ diag_printf("<INFO>: unlink fum\n");
+ err = unlink( "fum" );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+ diag_printf("<INFO>: unlink /bar/bundy\n");
+ err = unlink( "/bar/bundy" );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+ diag_printf("<INFO>: cd /\n");
+ err = chdir( "/" );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+
+ checkcwd( "/" );
+
+ diag_printf("<INFO>: rmdir /bar\n");
+ err = rmdir( "/bar" );
+ if( err < 0 ) SHOW_RESULT( rmdir, err );
+
+ listdir( "/", false, existingdirents, NULL );
+
+ // --------------------------------------------------------------
+
+ diag_printf("<INFO>: mount /ram \n");
+ err = mount( "", "/ram", "ramfs" );
+ if( err < 0 ) SHOW_RESULT( mount, err );
+
+ createfile( "/ram/tinky", 456 );
+ copyfile( "/ram/tinky", "/ram/laalaa" );
+ checkfile( "/ram/tinky");
+ checkfile( "/ram/laalaa");
+ comparefiles( "/ram/tinky", "/ram/laalaa" );
+
+ diag_printf("<INFO>: cd /ram\n");
+ err = chdir( "/ram" );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+
+ checkcwd( "/ram" );
+
+ diag_printf("<INFO>: mkdir noonoo\n");
+ err = mkdir( "noonoo", 0 );
+ if( err < 0 ) SHOW_RESULT( mkdir, err );
+
+ listdir( "." , true, existingdirents+3, NULL);
+
+ diag_printf("<INFO>: cd noonoo\n");
+ err = chdir( "noonoo" );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+
+ checkcwd( "/ram/noonoo" );
+
+ createfile( "tinky", 678 );
+ checkfile( "tinky" );
+
+ createfile( "dipsy", 3456 );
+ checkfile( "dipsy" );
+ copyfile( "dipsy", "po" );
+ checkfile( "po" );
+ comparefiles( "dipsy", "po" );
+
+ listdir( ".", true, 5, NULL );
+ listdir( "", true, 5, NULL );
+ listdir( "..", true, existingdirents+3, NULL );
+
+ // --------------------------------------------------------------
+
+ diag_printf("<INFO>: unlink tinky\n");
+ err = unlink( "tinky" );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+ diag_printf("<INFO>: unlink dipsy\n");
+ err = unlink( "dipsy" );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+ diag_printf("<INFO>: unlink po\n");
+ err = unlink( "po" );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+ diag_printf("<INFO>: cd ..\n");
+ err = chdir( ".." );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+ checkcwd( "/ram" );
+
+ diag_printf("<INFO>: rmdir noonoo\n");
+ err = rmdir( "noonoo" );
+ if( err < 0 ) SHOW_RESULT( rmdir, err );
+
+ // --------------------------------------------------------------
+
+ err = mkdir( "x", 0 );
+ if( err < 0 ) SHOW_RESULT( mkdir, err );
+
+ err = mkdir( "x/y", 0 );
+ if( err < 0 ) SHOW_RESULT( mkdir, err );
+
+ err = mkdir( "x/y/z", 0 );
+ if( err < 0 ) SHOW_RESULT( mkdir, err );
+
+ err = mkdir( "x/y/z/w", 0 );
+ if( err < 0 ) SHOW_RESULT( mkdir, err );
+
+ diag_printf("<INFO>: cd /ram/x/y/z/w\n");
+ err = chdir( "/ram/x/y/z/w" );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+ checkcwd( "/ram/x/y/z/w" );
+
+ diag_printf("<INFO>: cd ..\n");
+ err = chdir( ".." );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+ checkcwd( "/ram/x/y/z" );
+
+ diag_printf("<INFO>: cd .\n");
+ err = chdir( "." );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+ checkcwd( "/ram/x/y/z" );
+
+ diag_printf("<INFO>: cd ../../y\n");
+ err = chdir( "../../y" );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+ checkcwd( "/ram/x/y" );
+
+ diag_printf("<INFO>: cd ../..\n");
+ err = chdir( "../.." );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+ checkcwd( "/ram" );
+
+ diag_printf("<INFO>: rmdir x/y/z/w\n");
+ err = rmdir( "x/y/z/w" );
+ if( err < 0 ) SHOW_RESULT( rmdir, err );
+
+ diag_printf("<INFO>: rmdir x/y/z\n");
+ err = rmdir( "x/y/z" );
+ if( err < 0 ) SHOW_RESULT( rmdir, err );
+
+ diag_printf("<INFO>: rmdir x/y\n");
+ err = rmdir( "x/y" );
+ if( err < 0 ) SHOW_RESULT( rmdir, err );
+
+ diag_printf("<INFO>: rmdir x\n");
+ err = rmdir( "x" );
+ if( err < 0 ) SHOW_RESULT( rmdir, err );
+
+ // --------------------------------------------------------------
+
+ diag_printf("<INFO>: unlink tinky\n");
+ err = unlink( "tinky" );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+ diag_printf("<INFO>: unlink laalaa\n");
+ err = unlink( "laalaa" );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+ diag_printf("<INFO>: cd /\n");
+ err = chdir( "/" );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+ checkcwd( "/" );
+
+ diag_printf("<INFO>: umount /ram\n");
+ err = umount( "/ram" );
+ if( err < 0 ) SHOW_RESULT( umount, err );
+
+ CYG_TEST_PASS_FINISH("ramfs1");
+}
+
+// -------------------------------------------------------------------------
+// EOF ramfs1.c
diff --git a/cesar/ecos/packages/fs/ram/current/tests/ramfs2.c b/cesar/ecos/packages/fs/ram/current/tests/ramfs2.c
new file mode 100644
index 0000000000..d287b08533
--- /dev/null
+++ b/cesar/ecos/packages/fs/ram/current/tests/ramfs2.c
@@ -0,0 +1,174 @@
+//==========================================================================
+//
+// ramfs2.c
+//
+// Test fseek on a filesystem
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2004 Andrew Lunn
+// Copyright (C) 2004 eCosCentric Limited
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): asl
+// Contributors: asl
+// Date: 2004-03-29
+// Purpose: Test fseek on a filesystem
+// Description: This test uses the ramfs to check out the fseek
+// operation on a filesystem.
+//
+//
+//
+//
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+#include <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <string.h>
+
+#include <cyg/fileio/fileio.h>
+
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h> // HAL polled output
+//==========================================================================
+
+#define SHOW_RESULT( _fn, _res ) \
+diag_printf("FAIL: " #_fn "() returned %ld %s\n", (long)_res, _res<0?strerror(errno):"");
+
+//==========================================================================
+
+char buf[1024];
+char buf1[1024];
+
+//==========================================================================
+// main
+
+int main( int argc, char **argv )
+{
+ int err;
+ FILE *stream;
+ long pos;
+ int i;
+
+ CYG_TEST_INIT();
+
+ // --------------------------------------------------------------
+
+ CYG_TEST_INFO("mount /");
+ err = mount( "", "/", "ramfs" );
+ if( err < 0 ) SHOW_RESULT( mount, err );
+
+ CYG_TEST_INFO("creating /fseek");
+ stream = fopen("/fseek","w+");
+ if (!stream) {
+ diag_printf("FAIL: fopen() returned NULL, %s\n", strerror(errno));
+ CYG_TEST_FINISH("done"); \
+ }
+
+ /* Write a buffer full of cyclic numbers */
+ for (i = 0; i < sizeof(buf); i++) {
+ buf[i] = i % 256;
+ }
+
+ CYG_TEST_INFO("writing test pattern");
+ err=fwrite(buf,sizeof(buf), 1, stream);
+ if ( err < 0 ) SHOW_RESULT( fwrite, err );
+
+ /* The current position should be the same size as the buffer */
+ pos = ftell(stream);
+
+ if (pos < 0) SHOW_RESULT( ftell, pos );
+ if (pos != sizeof(buf))
+ diag_printf("<FAIL>: ftell is not telling the truth.");
+
+ CYG_TEST_INFO("fseek()ing to beginning and writing");
+
+ /* Seek back to the beginning of the file */
+ err = fseek(stream, 0, SEEK_SET);
+ if ( err < 0 ) SHOW_RESULT( fwrite, err );
+
+ pos = ftell(stream);
+
+ if (pos < 0) SHOW_RESULT( ftell, pos );
+ if (pos != 0) CYG_TEST_FAIL("ftell is not telling the truth");
+
+ /* Write 4 zeros to the beginning of the file */
+ for (i = 0; i < 4; i++) {
+ buf[i] = 0;
+ }
+
+ err = fwrite(buf, 4, 1, stream);
+ if ( err < 0 ) SHOW_RESULT( fwrite, err );
+
+ /* Check the pointer is at 4 */
+ pos = ftell(stream);
+
+ if (pos < 0) SHOW_RESULT( ftell, pos );
+ if (pos != 4) CYG_TEST_FAIL("ftell is not telling the truth");
+
+ CYG_TEST_INFO("closing file");
+
+ /* Close the file, open it up again and read it back */
+ err = fclose(stream);
+ if (err != 0) SHOW_RESULT( fclose, err );
+
+ CYG_TEST_INFO("open file /fseek");
+ stream = fopen("/fseek", "r+");
+ if (!stream) {
+ diag_printf("<FAIL>: fopen() returned NULL, %s\n", strerror(errno));
+ }
+
+ err = fread(buf1,sizeof(buf1),1, stream);
+ if (err != 1) SHOW_RESULT( fread, err );
+
+ CYG_TEST_INFO("Comparing contents");
+ if (memcmp(buf, buf1, sizeof(buf1))) {
+ CYG_TEST_FAIL("File contents inconsistent");
+ }
+
+ err = fclose(stream);
+ if (err != 0) SHOW_RESULT( fclose, err );
+
+ CYG_TEST_INFO("umount /");
+ err = umount( "/" );
+ if( err < 0 ) SHOW_RESULT( umount, err );
+
+ CYG_TEST_PASS_FINISH("ramfs2");
+}
diff --git a/cesar/ecos/packages/fs/rom/current/ChangeLog b/cesar/ecos/packages/fs/rom/current/ChangeLog
new file mode 100644
index 0000000000..349ce2d935
--- /dev/null
+++ b/cesar/ecos/packages/fs/rom/current/ChangeLog
@@ -0,0 +1,165 @@
+2005-07-08 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * cdl/romfs.cdl: Allow mk_romfs to be build even when the tests
+ are disabled. It is generally useful and other tests programs may
+ want it.
+
+2004-12-13 John Dallaway <jld@ecoscentric.com>
+
+ * tests/fileio1.c: Rename to romfs1.c. eCos test names should be
+ unique.
+ * cdl/romfs.cdl: Build the romfs1 test.
+
+2004-10-04 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/romfs.c (romfs_mount): Avoid a compiler warning about punned
+ types.
+
+2004-08-08 Bart Veer <bartv@ecoscentric.com>
+
+ * cdl/romfs.cdl: generate both little-endian and big-endian image
+ files.
+
+ * tests/fileio1.c: include either a little-endian or a big-endian
+ image. Totally fail the test early on if the file system cannot be
+ mounted.
+
+2004-06-14 John Dallaway <jld@ecoscentric.com>
+
+ * cdl/romfs.cdl: Specify the test executable file name for
+ compatibility with the eCos Configuration Tool.
+
+2004-02-20 Vincent Catros <Vincent.Catros@elios-informatique.fr>
+
+ * src/fs-ecos.c :
+ (jffs2_find) Policy to skip path separator is no longer
+ "if '/' then skip" but "while '/' then skip" allowing
+ multi '/' separators (i.e : /tmp////foo).
+ (find_entry) Policy to detect end of path is no longer
+ "if '\0' then end_of_path"
+ but "while '/' skip it and then if '\0' then end_of_path"
+ allowing path terminated with any number of '/'
+ (i.e : chdir(/tmp///)).
+
+2003-12-11 Sandeep Kumar <sandeep@codito.com>
+
+ * src/romfs.c (romfs_mount) : function wrongly returns ENOENT even
+ if fste->data isn't NULL.
+
+2003-09-25 Oyvind Harboe <oyvind.harboe@zylin.com>
+
+ * src/romfs.c (romfs_mount): If a mount fails, make sure we leave
+ all state information in such a way we can try again.
+
+2003-07-10 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * support/mk_romfs.c: S_I[RWX]{USR|GRP|OTH} etc changed to match
+ the changes in sys/stat.h
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/romfs.cdl: Fix doc link.
+
+2003-01-30 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * cdl/romfs.cdl: Implements the CYGINT_IO_FILEIO_FS interface.
+
+2003-01-29 John Dallaway <jld@ecoscentric.com>
+
+ * support/file2c.tcl: Accommodate latest Cygwin Tcl shell
+ (tclsh83.exe)
+
+2002-04-15 Bart Veer <bartv@redhat.com>
+
+ * support/file2c.tcl:
+ Do not use an alignment attribute, since it is not honoured on
+ all targets.
+
+ * src/romfs.c:
+ Remove alignment restrictions, since they are not actually needed
+ yet and alignment is hard to guarantee on all targets.
+
+2002-01-21 Jonathan Larmour <jlarmour@redhat.com>
+
+ * support/mk_romfs.c: Open image file in binary mode (for cygwin).
+ Spotted by Warren Jasper.
+
+2001-11-23 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/romfs.cdl (CYGTST_ROMFS_BUILD_TESTS): Try gcc and cc if $HOST_CC
+ doesn't exist or has a problem.
+
+2001-11-22 Jesper Skov <jskov@redhat.com>
+
+ * cdl/romfs.cdl: Use HOST_CC instead of 'cc'.
+
+2001-10-17 Drew Moseley <dmoseley@redhat.com>
+2001-10-17 Jonathan Larmour <jlarmour@redhat.com>
+
+ * support/mk_romfs.c: Open input files in binary mode (for cygwin).
+ * cdl/romfs.cdl: Work around cygwin path problems by copying files
+ into build tree.
+
+2001-07-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * tests/fileio1.c (main): Get this to actually pass! Remove
+ kernel dependency.
+ * cdl/fileio.cdl: Get CDL dependencies better. Don't use
+ fixed base address. Make test building an option. Build mk_romfs
+ and use it to construct a test romfs.
+ * support/mk_romfs.c: fix trivial typo
+ * tests/testromfs: Directory hierarchy added for constructing test
+ ROMFS.
+
+2001-07-13 Richard Panton (richard.panton@3glab.com)
+
+ * support/mk_romfs.c: Convert between host FS file modes and eCos
+ ones.
+
+2000-10-25 Richard Panton (richard.panton@3glab.com)
+
+ * cdl/romfs.cdl:
+ * src/romfs.c:
+ * support/mk_romfs.c:
+ * tests/fileio1.c:
+ A sample ROM filesystem implementation
+
+
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2004 eCosCentric Limited
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+
+
diff --git a/cesar/ecos/packages/fs/rom/current/cdl/romfs.cdl b/cesar/ecos/packages/fs/rom/current/cdl/romfs.cdl
new file mode 100644
index 0000000000..f65991aa27
--- /dev/null
+++ b/cesar/ecos/packages/fs/rom/current/cdl/romfs.cdl
@@ -0,0 +1,133 @@
+# ====================================================================
+#
+# romfs.cdl
+#
+# ROM Filesystem configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2004 eCosCentric Limited
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): nickg
+# Original data: nickg
+# Contributors: richard.panton@3glab.com
+# Date: 2000-08-01
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_FS_ROM {
+ display "ROM filesystem"
+ doc ref/fileio.html
+ include_dir cyg/romfs
+
+ requires CYGPKG_IO_FILEIO
+
+ requires CYGPKG_ISOINFRA
+ requires CYGINT_ISO_ERRNO
+ requires CYGINT_ISO_ERRNO_CODES
+
+ implements CYGINT_IO_FILEIO_FS
+
+ compile -library=libextras.a romfs.c
+
+ cdl_option CYGBLD_FS_ROMFS_MK_ROMFS {
+ display "Build the tool used to build filesystems"
+ flavor bool
+ default_value 1
+
+ # FIXME: host compiler/flags should be provided by config system
+ make -priority 100 {
+ <PREFIX>/bin/mk_romfs: <PACKAGE>/support/mk_romfs.c <PREFIX>/bin/file2c.tcl
+ @mkdir -p "$(dir $@)"
+ @$(HOST_CC) -g -O2 -o $@ $< || cc -g -O2 -o $@ $< || gcc -g -O2 -o $@ $<
+ @cp $(REPOSITORY)/$(PACKAGE)/support/file2c.tcl $(PREFIX)/bin
+ }
+
+ description "
+ When enabled this option will build a host tool which can be
+ used to create a rom filesystem image."
+ }
+
+ # ----------------------------------------------------------------
+ # Tests
+
+ cdl_component CYGTST_ROMFS_BUILD_TESTS {
+ display "Build ROM filesystem tests"
+ flavor bool
+ no_define
+ default_value 0
+ requires CYGINT_LIBC_STARTUP_CONTEXT
+ requires CYGINT_ISO_STDIO_FORMATTED_IO
+ requires CYGINT_ISO_STRERROR
+ requires CYGBLD_FS_ROMFS_MK_ROMFS
+ description "
+ This option enables the building of the ROM filesystem tests."
+
+ make -priority 100 {
+ <PREFIX>/include/cyg/romfs/testromfs_le.h : $(PREFIX)/bin/mk_romfs <PACKAGE>/support/file2c.tcl
+ $(PREFIX)/bin/mk_romfs $(REPOSITORY)/$(PACKAGE)/tests/testromfs testromfs_le.bin
+ @mkdir -p "$(dir $@)"
+ # work around cygwin path problems by copying to build dir
+ @cp $(REPOSITORY)/$(PACKAGE)/support/file2c.tcl .
+ sh file2c.tcl testromfs_le.bin testromfs_le.h
+ @rm -f $@ file2c.tcl
+ @cp testromfs_le.h $@
+ }
+
+ make -priority 100 {
+ <PREFIX>/include/cyg/romfs/testromfs_be.h : $(PREFIX)/bin/mk_romfs <PACKAGE>/support/file2c.tcl
+ $(PREFIX)/bin/mk_romfs -b $(REPOSITORY)/$(PACKAGE)/tests/testromfs testromfs_be.bin
+ @mkdir -p "$(dir $@)"
+ # work around cygwin path problems by copying to bin dir
+ @cp $(REPOSITORY)/$(PACKAGE)/support/file2c.tcl $(PREFIX)/bin/
+ sh $(PREFIX)/bin/file2c.tcl testromfs_be.bin testromfs_be.h
+ @cp testromfs_be.h $@
+ }
+
+ cdl_option CYGPKG_FS_ROM_TESTS {
+ display "ROM filesystem tests"
+ flavor data
+ no_define
+ calculated { "tests/romfs1" }
+ description "
+ This option specifies the set of tests for the ROM filesystem package."
+ }
+ }
+}
+
+# End of romfs.cdl
diff --git a/cesar/ecos/packages/fs/rom/current/doc/mk_romfs.txt b/cesar/ecos/packages/fs/rom/current/doc/mk_romfs.txt
new file mode 100644
index 0000000000..3671bbcb60
--- /dev/null
+++ b/cesar/ecos/packages/fs/rom/current/doc/mk_romfs.txt
@@ -0,0 +1,94 @@
+MK_ROMFS - Make a ROMFS image
+=============================
+
+This program creates a ROMFS image that can be read by eCos.
+
+mk_romfs - Create an eCos ROMFS disk image from the files
+ contained under a specified directory
+
+Usage: ../support/mk_romfs [options] <fs_root> <fs_file>
+ fs_root is the directory containing the files to package into the ROMFS image
+ fs_file is the name of the ROMFS image file to create
+ Options include:
+ -v / -q increase / decrease verbosity
+ -n do everything EXCEPT creating the output file
+ -b write a big-endian image (default is little endian)
+ -l collapse hard links to a single node
+
+-----------
+How to use.
+-----------
+
+For example, suppose you wish to access the following directories and files:
+ /
+ /etc passwd, group
+ /dev
+ /mnt
+ /tmp (for a RAMFS)
+ /var (for a RAMFS)
+
+1. Create the required directories and files under a suitable root, eg. under
+ ~/rom:
+ $ mkdir ~/rom
+ $ cd ~/rom
+ $ mkdir etc dev mnt tmp var
+ $ cp /etc/passwd /etc/group etc/
+ ( remembering to edit these files....;-)
+
+2. Make the romfs image in a suitable place, eg /tftpboot for direct upload to
+ the RedBoot monitor.
+ $ mk_romfs -v . /tftpboot/romfs.img
+ mk_romfs: Verbosity 2 little endian
+ Phase 1 - Build file list
+ Phase 2 - Calculate space allocation
+ Phase 2a - * Directories
+ Phase 2b - * Regular files
+ Phase 2c - * Executable files
+ Phase 3 - Construct ROMFS image file (3 kb)
+ Phase 3a - * Node table
+ Phase 3b - * Data blocks
+ /tftpboot/romfs.img completed
+
+3. Connect to your target RedBoot monitor, and load the romfs image. You will
+ need to determine a suitable place in RAM to load the image into.
+ $ telnet xxx.xxx.xxx.xxx 1000
+ Trying xxx.xxx.xxx.xxx...
+ Connected to xxx.xxx.xxx.xxx.
+ Escape character is '^]'.
+ RedBoot> load romfs.img -r -v -b 0x1000000
+ Raw file loaded 0x01000000-0x0100093e
+ RedBoot>
+
+4. Determine where to load the romfs image in the ROM. See what's there...
+ RedBoot> fis list
+ Name FLASH addr Mem addr Length Entry point
+ RedBoot 0x50000000 0x50000000 0x020000 0x00000000
+ RedBoot[backup] 0x50020000 0x50020000 0x020000 0x00000000
+ RedBoot config 0x503C0000 0x503C0000 0x020000 0x00000000
+ FIS directory 0x503E0000 0x503E0000 0x020000 0x00000000
+ RedBoot> fis free
+ 0x50040000 .. 0x503C0000
+ RedBoot>
+ We can see that a suitable place would be 0x50040000.
+ Alternatively, you can let RedBoot determine the address itself...
+
+5. Copy the image from RAM to ROM...
+ RedBoot> fis create -b 0x1000000 -l 0x940 RomFs
+ ... Erase from 0x50040000-0x50040940: .
+ ... Program from 0x01000000-0x01000940 at 0x50040000: .
+ ... Erase from 0x503e0000-0x50400000: .
+ ... Program from 0x01fd0000-0x01ff0000 at 0x503e0000: .
+ RedBoot> fis list
+ Name FLASH addr Mem addr Length Entry point
+ RedBoot 0x50000000 0x50000000 0x020000 0x00000000
+ RedBoot[backup] 0x50020000 0x50020000 0x020000 0x00000000
+ RedBoot config 0x503C0000 0x503C0000 0x020000 0x00000000
+ FIS directory 0x503E0000 0x503E0000 0x020000 0x00000000
+ RomFs 0x50040000 0x01000000 0x000940 0x00000000
+ RedBoot>
+
+6. MAKE A NOTE OF THE ADDRESS IN FLASH THAT THE IMAGE IS LOADED AT.
+ The ROMFS option 'CYGNUM_FS_ROM_BASE_ADDRESS' needs to be set to this
+ value in order to access the filesystem.
+
+
diff --git a/cesar/ecos/packages/fs/rom/current/doc/romfs.txt b/cesar/ecos/packages/fs/rom/current/doc/romfs.txt
new file mode 100644
index 0000000000..7b34a13398
--- /dev/null
+++ b/cesar/ecos/packages/fs/rom/current/doc/romfs.txt
@@ -0,0 +1,12 @@
+ROMFS - A rom filesystem plug-in module for eCos
+================================================
+
+You can use this module if you have flash ROM available to install the
+filesystem into. Instructions are given for creating and installing a
+rom filesystem into a RedBoot monitor.
+
+See mk_romfs for instructions for making the filesystem.
+
+See romfs.c for comments about the filesystem structure.
+
+
diff --git a/cesar/ecos/packages/fs/rom/current/src/romfs.c b/cesar/ecos/packages/fs/rom/current/src/romfs.c
new file mode 100644
index 0000000000..0c8599516b
--- /dev/null
+++ b/cesar/ecos/packages/fs/rom/current/src/romfs.c
@@ -0,0 +1,1100 @@
+//==========================================================================
+//
+// romfs.c
+//
+// ROM file system
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg, richard.panton@3glab.com
+// Date: 2000-07-25
+// Purpose: ROM file system
+// Description: This is a ROM filesystem for eCos. It attempts to
+// provide full POSIX-compatible filesystem behaviour
+// while at the same time being efficient in terms of
+// time and space used.
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+//
+// General Description
+// ===================
+//
+// This is an implementation of a ROM filesystem for eCos. Its goal is
+// to provide a working example of a filesystem that provides most of
+// the required POSIX functionality. And obviously it may also be
+// useful in its own right.
+//
+//
+// Header
+// ------
+//
+// There is a single header that describes the overall format of the ROMFS
+// disk. The address of this header is used as the base for all offsets used
+// in the node and directory structures. It contains the following fields:
+//
+// label - A human readable label for various purposes
+// fssize - The size in bytes of the entire ROMFS disk
+// nodes - A count of the nodes in the disk
+//
+// Immediately following thisin memory is the node table, consisting of
+// 'nodes' repetitions of the node object.
+//
+// Nodes
+// -----
+//
+// All files and directories are represented by node objects. Each
+// romfs_node structure contains the following fields:
+//
+// mode - Node type, file or directory.
+// nlink - Number of links to this node. Each directory entry that references
+// this node is a link.
+// size - Size of the data in this node in bytes.
+// ctime - Creation time of the file (NOT the ROMFS)
+// data - Offset of the first data byte for this node from the header
+//
+// Directories
+// -----------
+//
+// A directory is a node whose data is a list of directory entries.
+// These contain the
+// following fields:
+//
+// node - Index of the node in the romfs_disk table that is referenced by
+// this entry. This is present in every directory entry fragment.
+// next - Offset of the next name entry.
+// name - The filename associated with this link to the node.
+//
+// Data Storage
+// ------------
+//
+// Each file has its data stored in a single contiguous memory block
+// referenced by the offset in the node.
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/io_fileio.h>
+#include <pkgconf/fs_rom.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <unistd.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <dirent.h>
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <cyg/fileio/fileio.h>
+
+#include <cyg/kernel/kapi.h>
+#include <cyg/infra/diag.h>
+
+//==========================================================================
+// Eventually we want to eXecute In Place from the ROM in a protected
+// environment, so we'll need executables to be aligned to a boundary
+// suitable for MMU protection. A suitable boundary would be the 4k
+// boundary in all the CPU architectures I am currently aware of.
+
+// Forward definitions
+
+// Filesystem operations
+static int romfs_mount ( cyg_fstab_entry *fste, cyg_mtab_entry *mte );
+static int romfs_umount ( cyg_mtab_entry *mte );
+static int romfs_open ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int mode, cyg_file *fte );
+static int romfs_opendir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_file *fte );
+static int romfs_chdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_dir *dir_out );
+static int romfs_stat ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ struct stat *buf);
+static int romfs_getinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len );
+static int romfs_setinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len );
+
+// File operations
+static int romfs_fo_read (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+static int romfs_fo_lseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence );
+static int romfs_fo_ioctl (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com,
+ CYG_ADDRWORD data);
+static int romfs_fo_fsync (struct CYG_FILE_TAG *fp, int mode );
+static int romfs_fo_close (struct CYG_FILE_TAG *fp);
+static int romfs_fo_fstat (struct CYG_FILE_TAG *fp, struct stat *buf );
+static int romfs_fo_getinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
+static int romfs_fo_setinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
+
+// Directory operations
+static int romfs_fo_dirread (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+static int romfs_fo_dirlseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence );
+
+
+//==========================================================================
+// Filesystem table entries
+
+// -------------------------------------------------------------------------
+// Fstab entry.
+// This defines the entry in the filesystem table.
+// For simplicity we use _FILESYSTEM synchronization for all accesses since
+// we should never block in any filesystem operations.
+
+FSTAB_ENTRY( romfs_fste, "romfs", 0,
+ CYG_SYNCMODE_FILE_FILESYSTEM|CYG_SYNCMODE_IO_FILESYSTEM,
+ romfs_mount,
+ romfs_umount,
+ romfs_open,
+ (cyg_fsop_unlink *)cyg_fileio_erofs,
+ (cyg_fsop_mkdir *)cyg_fileio_erofs,
+ (cyg_fsop_rmdir *)cyg_fileio_erofs,
+ (cyg_fsop_rename *)cyg_fileio_erofs,
+ (cyg_fsop_link *)cyg_fileio_erofs,
+ romfs_opendir,
+ romfs_chdir,
+ romfs_stat,
+ romfs_getinfo,
+ romfs_setinfo);
+
+// -------------------------------------------------------------------------
+// mtab entry.
+// This defines a single ROMFS loaded into ROM at the configured address
+//
+// MTAB_ENTRY( rom_mte, // structure name
+// "/rom", // mount point
+// "romfs", // FIlesystem type
+// "", // hardware device
+// (CYG_ADDRWORD) CYGNUM_FS_ROM_BASE_ADDRESS // Address in ROM
+// );
+
+
+// -------------------------------------------------------------------------
+// File operations.
+// This set of file operations are used for normal open files.
+
+static cyg_fileops romfs_fileops =
+{
+ romfs_fo_read,
+ (cyg_fileop_write *)cyg_fileio_erofs,
+ romfs_fo_lseek,
+ romfs_fo_ioctl,
+ cyg_fileio_seltrue,
+ romfs_fo_fsync,
+ romfs_fo_close,
+ romfs_fo_fstat,
+ romfs_fo_getinfo,
+ romfs_fo_setinfo
+};
+
+// -------------------------------------------------------------------------
+// Directory file operations.
+// This set of operations are used for open directories. Most entries
+// point to error-returning stub functions. Only the read, lseek and
+// close entries are functional.
+
+static cyg_fileops romfs_dirops =
+{
+ romfs_fo_dirread,
+ (cyg_fileop_write *)cyg_fileio_enosys,
+ romfs_fo_dirlseek,
+ (cyg_fileop_ioctl *)cyg_fileio_enosys,
+ cyg_fileio_seltrue,
+ (cyg_fileop_fsync *)cyg_fileio_enosys,
+ romfs_fo_close,
+ (cyg_fileop_fstat *)cyg_fileio_enosys,
+ (cyg_fileop_getinfo *)cyg_fileio_enosys,
+ (cyg_fileop_setinfo *)cyg_fileio_enosys
+};
+
+//==========================================================================
+// Data typedefs
+// Some forward typedefs for the main data structures.
+
+struct romfs_disk;
+typedef struct romfs_disk romfs_disk;
+
+struct romfs_node;
+typedef struct romfs_node romfs_node;
+
+struct romfs_dirent;
+typedef struct romfs_dirent romfs_dirent;
+
+//==========================================================================
+// File and directory node
+// This data structure represents a file or directory.
+
+struct romfs_node
+{
+ cyg_uint32 mode; // 0-3 node type
+ cyg_ucount32 nlink; // 4-7 number of links to this node
+ cyg_uint16 uid; // 8-9 Owner id
+ cyg_uint16 gid; // 10-11 Group id
+ cyg_uint32 size; // 12-15 size of file in bytes
+ cyg_uint32 ctime; // 16-19 creation status time
+ cyg_uint32 offset; // 20-23 offset of data from start of ROMFS
+ cyg_uint32 pad[2]; // 24-31 padding to align to 32byte boundary
+};
+
+//==========================================================================
+// Directory entry.
+// Variable sized entry containing the name and node of a directory entry
+
+struct romfs_dirent
+{
+ cyg_ucount32 node; // Index of node in romfs_disk structure
+ cyg_uint32 next; // Offset from start of directory of
+ // a) the next entry, or
+ // b) the end of the directory data
+ char name[0]; // The name, NUL terminated
+};
+
+//==========================================================================
+// ROMFS header
+// This data structure contains overall information on the ROMFS
+
+struct romfs_disk
+{
+ cyg_uint32 magic; // 0-3 Marks a valid ROMFS entry
+ cyg_ucount32 nodecount; // 4-7 Count of nodes in this filesystem
+ cyg_ucount32 disksize; // 8-11 Count of bytes in this filesystem
+ cyg_uint32 dev_id; // 12-15 ID of disk (put into stat.st_dev)
+ char name[16]; // 16-31 Name - pads to 32 bytes
+ romfs_node node[0];
+};
+
+#define ROMFS_MAGIC 0x526f6d2e // The magic signature word for a romfs
+#define ROMFS_CIGAM 0x2e6d6f52 // The byte sex is wrong if you see this
+
+//==========================================================================
+// Directory search data
+// Parameters for a directory search. The fields of this structure are
+// updated as we follow a pathname through the directory tree.
+
+struct romfs_dirsearch
+{
+ romfs_disk *disk; // disk structure
+ romfs_node *dir; // directory to search
+ const char *path; // path to follow
+ romfs_node *node; // Node found
+ const char *name; // last name used
+ int namelen; // name fragment length
+ cyg_bool last; // last name in path?
+};
+
+typedef struct romfs_dirsearch romfs_dirsearch;
+
+//==========================================================================
+// This seems to be the only string function referenced. Define as static
+// here to avoid having to load the string library
+
+static bool match( const char *a, const char *b, int len )
+{
+ for ( ; len > 0 && *a && *b && *a == *b ; a++, b++, len-- )
+ ;
+ return ( len == 0 );
+}
+
+
+//==========================================================================
+// SIMPLE buffer management.
+// Each node has a data buffer pointer and a size.
+
+// -------------------------------------------------------------------------
+// findbuffer_node()
+// return a pointer to the data at the indicated file position.
+
+static int findbuffer_node( romfs_disk *disk, // header pointer
+ romfs_node *node, // node pointer
+ off_t pos, // data position to get
+ cyg_uint8 **buffer, // returned buffer pointer
+ size_t *size) // returned buffer size
+{
+ if ( pos >= node->size || node->size == 0 )
+ {
+ // Indicate end of data.
+ *size = 0;
+ } else {
+
+ // Calculate the buffer position
+ *buffer = (cyg_uint8*)disk + node->offset + pos;
+ *size = node->size-pos;
+ }
+
+ return ENOERR;
+}
+
+//==========================================================================
+// Directory operations
+
+
+// -------------------------------------------------------------------------
+// find_direntry()
+// Find a directory entry for the name and return a pointer to the first
+// entry fragment.
+
+static romfs_dirent *find_direntry( romfs_disk *disk, romfs_node *dir, const char *name, int namelen )
+{
+ off_t pos = 0;
+ int err;
+
+ // Loop over all the entries until a match is found or we run out
+ // of data.
+ while( pos < dir->size )
+ {
+ romfs_dirent *d;
+ cyg_uint8 *buf;
+ size_t size;
+
+ err = findbuffer_node( disk, dir, pos, &buf, &size );
+ if( err != ENOERR || size == 0)
+ return NULL;
+
+ d = (romfs_dirent *)buf;
+
+ // Is this the directory entry we're looking for?
+ if ( match( d->name, name, namelen ) )
+ return d;
+
+ // Otherwise move on to next entry in chain
+ pos = d->next;
+ }
+
+ return NULL;
+}
+
+//==========================================================================
+// Directory search
+
+// -------------------------------------------------------------------------
+// init_dirsearch()
+// Initialize a dirsearch object to start a search
+
+static void init_dirsearch( romfs_dirsearch *ds,
+ romfs_disk *disk,
+ romfs_node *dir,
+ const char *name)
+{
+ ds->disk = disk;
+ ds->dir = dir;
+ ds->path = name;
+ ds->node = dir;
+ ds->name = name;
+ ds->namelen = 0;
+ ds->last = false;
+}
+
+// -------------------------------------------------------------------------
+// find_entry()
+// Search a single directory for the next name in a path and update the
+// dirsearch object appropriately.
+
+static int find_entry( romfs_dirsearch *ds )
+{
+ romfs_node *dir = ds->dir;
+ const char *name = ds->path;
+ const char *n = name;
+ int namelen = 0;
+ romfs_dirent *d;
+
+ // check that we really have a directory
+ if( !S_ISDIR(dir->mode) )
+ return ENOTDIR;
+
+ // Isolate the next element of the path name.
+ while( *n != '\0' && *n != '/' )
+ n++, namelen++;
+
+ // Check if this is the last path element.
+ while( *n == '/') n++;
+ if( *n == '\0' )
+ ds->last = true;
+
+ // update name in dirsearch object
+ ds->name = name;
+ ds->namelen = namelen;
+
+ // Here we have the name and its length set up.
+ // Search the directory for a matching entry
+
+ d = find_direntry( ds->disk, dir, name, namelen );
+
+ if( d == NULL )
+ return ENOENT;
+
+ // pass back the node we have found
+ ds->node = &ds->disk->node[d->node];
+
+ return ENOERR;
+
+}
+
+// -------------------------------------------------------------------------
+// romfs_find()
+// Main interface to directory search code. This is used in all file
+// level operations to locate the object named by the pathname.
+
+static int romfs_find( romfs_dirsearch *d )
+{
+ int err;
+
+ // Short circuit empty paths
+ if( *(d->path) == '\0' )
+ return ENOERR;
+
+ // iterate down directory tree until we find the object
+ // we want.
+ for(;;)
+ {
+ err = find_entry( d );
+
+ if( err != ENOERR )
+ return err;
+
+ if( d->last )
+ return ENOERR;
+
+ // Update dirsearch object to search next directory.
+ d->dir = d->node;
+ d->path += d->namelen;
+ while( *(d->path) == '/' ) d->path++; // skip dirname separators
+ }
+}
+
+//==========================================================================
+// Pathconf support
+// This function provides support for pathconf() and fpathconf().
+
+static int romfs_pathconf( romfs_node *node, struct cyg_pathconf_info *info )
+{
+ int err = ENOERR;
+
+ switch( info->name )
+ {
+ case _PC_LINK_MAX:
+ info->value = LINK_MAX;
+ break;
+
+ case _PC_MAX_CANON:
+ info->value = -1; // not supported
+ err = EINVAL;
+ break;
+
+ case _PC_MAX_INPUT:
+ info->value = -1; // not supported
+ err = EINVAL;
+ break;
+
+ case _PC_NAME_MAX:
+ info->value = NAME_MAX;
+ break;
+
+ case _PC_PATH_MAX:
+ info->value = PATH_MAX;
+ break;
+
+ case _PC_PIPE_BUF:
+ info->value = -1; // not supported
+ err = EINVAL;
+ break;
+
+
+ case _PC_ASYNC_IO:
+ info->value = -1; // not supported
+ err = EINVAL;
+ break;
+
+ case _PC_CHOWN_RESTRICTED:
+ info->value = -1; // not supported
+ err = EINVAL;
+ break;
+
+ case _PC_NO_TRUNC:
+ info->value = 0;
+ break;
+
+ case _PC_PRIO_IO:
+ info->value = 0;
+ break;
+
+ case _PC_SYNC_IO:
+ info->value = 0;
+ break;
+
+ case _PC_VDISABLE:
+ info->value = -1; // not supported
+ err = EINVAL;
+ break;
+
+ default:
+ err = EINVAL;
+ break;
+ }
+
+ return err;
+}
+
+//==========================================================================
+// Filesystem operations
+
+// -------------------------------------------------------------------------
+// romfs_mount()
+// Process a mount request. This mainly finds root for the
+// filesystem.
+
+static int romfs_mount ( cyg_fstab_entry *fste, cyg_mtab_entry *mte )
+{
+ romfs_disk *disk=NULL;
+
+ if ( !mte->data ) {
+ // If the image address was not in the MTE data word,
+ if ( mte->devname && mte->devname[0] ) {
+ char *addr;
+ // And there's something in the 'hardware device' field,
+ // then read the address from there.
+ sscanf( mte->devname, "%p", &addr );
+ disk = (romfs_disk *) addr;
+ }
+ } else {
+ disk = (romfs_disk *)mte->data;
+ }
+
+ if ( !disk ) {
+ // If still no address, try the FSTAB entry data word
+ disk = (romfs_disk *)fste->data;
+ }
+
+ if ( !disk ) {
+ // If still no address, give up...
+ return ENOENT;
+ }
+
+
+
+ // Check the ROMFS magic number to ensure that there's really an fs.
+ if ( disk->magic == ROMFS_CIGAM ) {
+ // The disk image has the wrong byte sex!!!
+ return EIO;
+ } else if ( disk->magic != ROMFS_MAGIC || disk->nodecount == 0 ) {
+ // No image found
+ return ENOENT;
+ }
+
+ mte->root = (cyg_dir)&disk->node[0];
+
+ mte->data = (CYG_ADDRWORD)disk;
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// romfs_umount()
+// Unmount the filesystem. This will currently always succeed.
+
+static int romfs_umount ( cyg_mtab_entry *mte )
+{
+ // Clear root pointer
+ mte->root = CYG_DIR_NULL;
+
+ // That's all folks.
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// romfs_open()
+// Open a file for reading
+
+static int romfs_open ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int mode, cyg_file *file )
+{
+
+ romfs_dirsearch ds;
+ romfs_node *node = NULL;
+ int err;
+
+ init_dirsearch( &ds, (romfs_disk *)mte->data, (romfs_node *)dir, name );
+
+ err = romfs_find( &ds );
+
+ if( err == ENOENT )
+ {
+ return ENOENT;
+ }
+ else if( err == ENOERR )
+ {
+ // The node exists. If the O_CREAT and O_EXCL bits are set, we
+ // must fail the open.
+
+ if( (mode & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL) )
+ err = EEXIST;
+ else node = ds.node;
+ }
+
+ if( err == ENOERR && (mode & O_TRUNC ) )
+ {
+ // If the O_TRUNC bit is set we must fail the open
+
+ err = EPERM;
+ }
+
+ if( err != ENOERR ) return err;
+
+ // Check that we actually have a file here
+ if( S_ISDIR(node->mode) ) return EISDIR;
+
+ // Initialize the file object
+
+ file->f_flag |= mode & CYG_FILE_MODE_MASK;
+ file->f_type = CYG_FILE_TYPE_FILE;
+ file->f_ops = &romfs_fileops;
+ file->f_offset = 0;
+ file->f_data = (CYG_ADDRWORD)node;
+ file->f_xops = 0;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// romfs_opendir()
+// Open a directory for reading.
+
+static int romfs_opendir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_file *file )
+{
+ romfs_dirsearch ds;
+ int err;
+
+ init_dirsearch( &ds, (romfs_disk *)mte->data, (romfs_node *)dir, name );
+
+ err = romfs_find( &ds );
+
+ if( err != ENOERR ) return err;
+
+ // check it is really a directory.
+ if( !S_ISDIR(ds.node->mode) ) return ENOTDIR;
+
+ // Initialize the file object, setting the f_ops field to a
+ // special set of file ops.
+
+ file->f_type = CYG_FILE_TYPE_FILE;
+ file->f_ops = &romfs_dirops;
+ file->f_offset = 0;
+ file->f_data = (CYG_ADDRWORD)ds.node;
+ file->f_xops = 0;
+
+ return ENOERR;
+
+}
+
+// -------------------------------------------------------------------------
+// romfs_chdir()
+// Change directory support.
+
+static int romfs_chdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_dir *dir_out )
+{
+ if( dir_out != NULL )
+ {
+ // This is a request to get a new directory pointer in
+ // *dir_out.
+
+ romfs_dirsearch ds;
+ int err;
+
+ init_dirsearch( &ds, (romfs_disk *)mte->data, (romfs_node *)dir, name );
+
+ err = romfs_find( &ds );
+
+ if( err != ENOERR ) return err;
+
+ // check it is a directory
+ if( !S_ISDIR(ds.node->mode) )
+ return ENOTDIR;
+
+ // Pass it out
+ *dir_out = (cyg_dir)ds.node;
+ }
+ // If no output dir is required, this means that the mte and
+ // dir arguments are the current cdir setting and we should
+ // forget this fact. Do nothing in ROMFS.
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// romfs_stat()
+// Get struct stat info for named object.
+
+static int romfs_stat ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ struct stat *buf)
+{
+ romfs_dirsearch ds;
+ int err;
+ romfs_disk *disk = (romfs_disk *)mte->data;
+
+ init_dirsearch( &ds, disk, (romfs_node *)dir, name );
+
+ err = romfs_find( &ds );
+
+ if( err != ENOERR ) return err;
+
+ // Fill in the status
+ buf->st_mode = ds.node->mode;
+ buf->st_ino = (ino_t)(ds.node - &disk->node[0]);
+ buf->st_dev = (dev_t)disk->dev_id;
+ buf->st_nlink = ds.node->nlink;
+ buf->st_uid = ds.node->uid;
+ buf->st_gid = ds.node->gid;
+ buf->st_size = ds.node->size;
+ buf->st_atime = ds.node->ctime;
+ buf->st_mtime = ds.node->ctime;
+ buf->st_ctime = ds.node->ctime;
+
+ return err;
+}
+
+// -------------------------------------------------------------------------
+// romfs_getinfo()
+// Getinfo. Currently only support pathconf().
+
+static int romfs_getinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len )
+{
+ romfs_dirsearch ds;
+ int err;
+
+ init_dirsearch( &ds, (romfs_disk *)mte->data, (romfs_node *)dir, name );
+
+ err = romfs_find( &ds );
+
+ if( err != ENOERR ) return err;
+
+ switch( key )
+ {
+ case FS_INFO_CONF:
+ err = romfs_pathconf( ds.node, (struct cyg_pathconf_info *)buf );
+ break;
+
+ default:
+ err = EINVAL;
+ }
+ return err;
+}
+
+// -------------------------------------------------------------------------
+// romfs_setinfo()
+// Setinfo. Nothing to support here at present.
+
+static int romfs_setinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len )
+{
+ // No setinfo keys supported at present
+
+ return EINVAL;
+}
+
+
+//==========================================================================
+// File operations
+
+// -------------------------------------------------------------------------
+// romfs_fo_read()
+// Read data from the file.
+
+static int romfs_fo_read (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio)
+{
+ romfs_node *node = (romfs_node *)fp->f_data;
+ int i;
+ off_t pos = fp->f_offset;
+ ssize_t resid = uio->uio_resid;
+
+ // Loop over the io vectors until there are none left
+ for( i = 0; i < uio->uio_iovcnt; i++ )
+ {
+ cyg_iovec *iov = &uio->uio_iov[i];
+ char *buf = (char *)iov->iov_base;
+ off_t len = iov->iov_len;
+
+ // Loop over each vector filling it with data from the file.
+ while( len > 0 && pos < node->size )
+ {
+ cyg_uint8 *fbuf;
+ size_t bsize;
+ off_t l = len;
+ int err;
+
+ // Get a pointer to the data at offset _pos_.
+ err = findbuffer_node( (romfs_disk *)fp->f_mte->data, node, pos, &fbuf, &bsize );
+
+ if( err != ENOERR )
+ return err;
+
+ // adjust size to end of file if necessary
+ if( l > node->size-pos )
+ l = node->size-pos;
+
+ // adjust size to the amount of contiguous data we can see
+ // at present.
+ if( l > bsize )
+ l = bsize;
+
+ // copy data out
+ memcpy( buf, fbuf, l );
+
+ // Update working vars
+ len -= l;
+ buf += l;
+ pos += l;
+ resid -= l;
+ }
+ }
+
+ // We successfully read some data
+ // Update the file offset and transfer residue.
+
+ uio->uio_resid = resid;
+ fp->f_offset = pos;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// romfs_fo_lseek()
+// Seek to a new file position.
+
+static int romfs_fo_lseek (struct CYG_FILE_TAG *fp, off_t *apos, int whence )
+{
+ romfs_node *node = (romfs_node *)fp->f_data;
+ off_t pos = *apos;
+
+ switch( whence )
+ {
+ case SEEK_SET:
+ // Pos is already where we want to be.
+ break;
+
+ case SEEK_CUR:
+ // Add pos to current offset.
+ pos += fp->f_offset;
+ break;
+
+ case SEEK_END:
+ // Add pos to file size.
+ pos += node->size;
+ break;
+
+ default:
+ return EINVAL;
+ }
+
+ // Check that pos is still within current file size, or at the
+ // very end.
+ if( pos < 0 || pos > node->size )
+ return EINVAL;
+
+ // All OK, set fp offset and return new position.
+ *apos = fp->f_offset = pos;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// romfs_fo_ioctl()
+// Handle ioctls. Currently none are defined.
+
+static int romfs_fo_ioctl (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com,
+ CYG_ADDRWORD data)
+{
+ // No Ioctls currenly defined.
+
+ return EINVAL;
+}
+
+// -------------------------------------------------------------------------
+// romfs_fo_fsync().
+// Force the file out to data storage.
+
+static int romfs_fo_fsync (struct CYG_FILE_TAG *fp, int mode )
+{
+ // Data is always permanently where it belongs, nothing to do
+ // here.
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// romfs_fo_close()
+// Close a file. We just clear out the data pointer.
+
+static int romfs_fo_close (struct CYG_FILE_TAG *fp)
+{
+ fp->f_data = 0; // zero data pointer
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+//romfs_fo_fstat()
+// Get file status.
+
+static int romfs_fo_fstat (struct CYG_FILE_TAG *fp, struct stat *buf )
+{
+ romfs_node *node = (romfs_node *)fp->f_data;
+ romfs_disk *disk = (romfs_disk*)(fp->f_mte->data);
+
+ // Fill in the status
+ buf->st_mode = node->mode;
+ buf->st_ino = (ino_t)(node - &disk->node[0]);
+ buf->st_dev = disk->dev_id;
+ buf->st_nlink = node->nlink;
+ buf->st_uid = node->uid;
+ buf->st_gid = node->gid;
+ buf->st_size = node->size;
+ buf->st_atime = node->ctime;
+ buf->st_mtime = node->ctime;
+ buf->st_ctime = node->ctime;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// romfs_fo_getinfo()
+// Get info. Currently only supports fpathconf().
+
+static int romfs_fo_getinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len )
+{
+ romfs_node *node = (romfs_node *)fp->f_data;
+ int err;
+
+ switch( key )
+ {
+ case FS_INFO_CONF:
+ err = romfs_pathconf( node, (struct cyg_pathconf_info *)buf );
+ break;
+
+ default:
+ err = EINVAL;
+ }
+ return err;
+}
+
+// -------------------------------------------------------------------------
+// romfs_fo_setinfo()
+// Set info. Nothing supported here.
+
+static int romfs_fo_setinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len )
+{
+ // No setinfo key supported at present
+
+ return ENOERR;
+}
+
+
+//==========================================================================
+// Directory operations
+
+// -------------------------------------------------------------------------
+// romfs_fo_dirread()
+// Read a single directory entry from a file.
+
+static int romfs_fo_dirread (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio)
+{
+ romfs_node *dir = (romfs_node *)fp->f_data;
+ off_t pos = fp->f_offset;
+ int err = ENOERR;
+ struct dirent *ent = (struct dirent *)uio->uio_iov[0].iov_base;
+ char *nbuf = ent->d_name;
+ int nlen = sizeof(ent->d_name)-1;
+ off_t len = uio->uio_iov[0].iov_len;
+ romfs_dirent *d = NULL;
+ cyg_uint8 *buf;
+ size_t size;
+ int i;
+
+ if( len < sizeof(struct dirent) )
+ return EINVAL;
+
+ // Get the next entry
+ err = findbuffer_node( (romfs_disk *)fp->f_mte->data, dir, pos, &buf, &size );
+ if( err != ENOERR || size == 0 || pos >= dir->size )
+ return err;
+
+ d = (romfs_dirent *)buf;
+
+ for ( i = 0 ; i < nlen && d->name[i] ; i++, nbuf++ )
+ *nbuf = d->name[i];
+
+ // A successful read. Terminate the entry name with a NUL, set the
+ // residue and set the file offset to restart at the next
+ // directory entry.
+
+ *nbuf = '\0';
+ uio->uio_resid -= sizeof(struct dirent);
+ fp->f_offset = d->next;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// romfs_fo_dirlseek()
+// Seek directory to start.
+
+static int romfs_fo_dirlseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence )
+{
+ // Only allow SEEK_SET to zero
+
+ if( whence != SEEK_SET || *pos != 0)
+ return EINVAL;
+
+ *pos = fp->f_offset = 0;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// EOF romfs.c
diff --git a/cesar/ecos/packages/fs/rom/current/support/Makefile b/cesar/ecos/packages/fs/rom/current/support/Makefile
new file mode 100644
index 0000000000..e61080ef70
--- /dev/null
+++ b/cesar/ecos/packages/fs/rom/current/support/Makefile
@@ -0,0 +1,39 @@
+#==========================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#==========================================================================
+
+CC = gcc
+CFLAGS = -ggdb -Wall
+
+mk_romfs:
diff --git a/cesar/ecos/packages/fs/rom/current/support/file2c.tcl b/cesar/ecos/packages/fs/rom/current/support/file2c.tcl
new file mode 100755
index 0000000000..f40b4a0da1
--- /dev/null
+++ b/cesar/ecos/packages/fs/rom/current/support/file2c.tcl
@@ -0,0 +1,124 @@
+#!/bin/bash
+# restart using a Tcl shell \
+ exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \
+ ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \
+ done ; \
+ echo "file2c.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@"
+
+#===============================================================================
+#
+# file2c.tcl
+#
+# Convert a file into a header that can be #included from C.
+#
+#===============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#===============================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jlarmour,bartv
+# Contact(s):
+# Date: 2001-07-20
+# Purpose:
+# Description:
+# Usage: file2c.tcl <file to encode> <output C header file>
+#
+#####DESCRIPTIONEND####
+#===============================================================================
+
+
+
+if { $argc != 2 } {
+ puts "Usage: file2c.tcl <file to encode> <output C header file>"
+ exit 1
+}
+set infile [lindex $argv 0]
+set outfile [lindex $argv 1]
+
+set status [ catch {
+ set infilefd [open $infile "r"]
+ fconfigure $infilefd -translation binary
+ set data [read $infilefd]
+ close $infilefd
+} message]
+
+if { $status != 0 } {
+ error "Unable to read file $infile: $message"
+}
+
+set result ""
+
+set status [ catch {
+ set outfilefd [ open $outfile "w" ]
+} message ]
+
+if { $status != 0 } {
+ error "Unable to create file $outfile: $message"
+}
+
+append result "/* This is a generated file. Do not edit. */\n\n"
+append result "static const unsigned char filedata\[\] = {\n"
+
+set datalength [ string length $data ]
+
+set aligned_datalength [expr $datalength - ($datalength % 8)]
+
+for { set i 0 } {$i < $aligned_datalength} {incr i 8} {
+ binary scan $data "@[set i]H16" var0
+ append result [format " 0x%2s, 0x%2s, 0x%2s, 0x%2s, 0x%2s, 0x%2s, 0x%2s, 0x%2s,\n" \
+ [string range $var0 0 1] \
+ [string range $var0 2 3] \
+ [string range $var0 4 5] \
+ [string range $var0 6 7] \
+ [string range $var0 8 9] \
+ [string range $var0 10 11] \
+ [string range $var0 12 13] \
+ [string range $var0 14 15]]
+}
+
+if { $aligned_datalength != $datalength } {
+ append result " "
+ for { set i $aligned_datalength } {$i < $datalength} {incr i} {
+ binary scan $data "@[set i]H2" var0
+ append result [format "0x%2s, " $var0]
+ }
+}
+
+# Remove either comma+newline or comma+space from the end
+set result [string range $result 0 [expr [string length $result] - 3]]
+
+append result "\n};"
+
+puts $outfilefd $result
+close $outfilefd
diff --git a/cesar/ecos/packages/fs/rom/current/support/mk_romfs.c b/cesar/ecos/packages/fs/rom/current/support/mk_romfs.c
new file mode 100644
index 0000000000..45921a7d2a
--- /dev/null
+++ b/cesar/ecos/packages/fs/rom/current/support/mk_romfs.c
@@ -0,0 +1,734 @@
+//==========================================================================
+//
+// mk_romfs.c
+//
+// Create ROM file system image
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): richard.panton@3glab.com
+// Contributors: richard.panton@3glab.com
+// Date: 2000-07-25
+// Purpose: ROM file system
+// Description: This program creates a ROM file system image, suitable
+// for use with the sample ROM file system implemented by
+// this package.
+// * CAUTION! * This is host code and can only be built
+// in a host, e.g. Linux, environment.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+
+//==========================================================================
+//
+// CONFIGURABLE ITEMS HERE
+//
+//==========================================================================
+
+// define LONG to be a four byte unsigned integer on the host
+#define LONG unsigned long
+
+// define SHORT to be a two byte unsigned integer on the host
+#define SHORT unsigned short
+
+// All data files should be aligned to this sized boundary (minimum probably 32)
+#define DATA_ALIGN 32
+
+// The data stored in a directory should be aligned to this size boundary
+#define DIRECTORY_ALIGN 32
+
+// All executable files should be aligned to this sized boundary (minimum probably 32)
+#define EXEC_ALIGN 32
+
+// Undefine this if the host filesystem does not support lstat()
+#define HAS_LSTAT
+
+//==========================================================================
+
+// Return (n) aligned to the next (b) byte boundary
+#define ALIGN_TO( n, b ) (( (n) + (b)-1 ) & ~((b)-1))
+
+// Set the stat call to use
+#ifdef HAS_LSTAT
+#define get_status( p, b ) lstat( (p), (b) )
+#else
+#define get_status( p, b ) stat( (p), (b) )
+#endif
+
+// This is how we identify a directory from its mode
+#define IS_DIRECTORY( m ) (S_ISDIR(m))
+
+// This is how we identify a data file from its mode
+#define IS_DATAFILE( m ) (S_ISREG(m) && ((m)&S_IXUSR) == 0 )
+
+// This is how we identify an executable from its mode
+#define IS_EXECUTABLE( m ) (S_ISREG(m) && ((m)&S_IXUSR) != 0 )
+
+// This is how we identify a symbolic link from its mode
+#define IS_SYMLINK( m ) (S_ISLNK(m))
+
+#define ROMFS_MAGIC 0x526f6d2e
+
+//=========================================================================
+// EXIT CODES
+#define EXIT_SUCCESS 0
+#define EXIT_ARGS 1
+#define EXIT_MALLOC 2
+#define EXIT_FILESYS 3
+#define EXIT_WRITE 4
+#define EXIT_SEEK 5
+#define EXIT_COMPILE 6
+#define EXIT_BUG 7
+
+
+
+// These are the structures we will build into the ROMFS image.
+// The sizes of these structures should be fixed for all architectures
+typedef struct romfs_dirent {
+ LONG node; // 4
+ LONG next; // 8
+ char name[0]; // 8 + strlen(name) + 1
+} romfs_dirent; // Aligns to next 32 byte boundary
+
+typedef struct romfs_node {
+ LONG mode; // 4
+ LONG nlink; // 8
+ SHORT uid; // 10
+ SHORT gid; // 12
+ LONG size; // 16
+ LONG ctime; // 20
+ LONG data_offset; // 24
+ char pad[8]; // 32
+} romfs_node; // Next node begins here
+
+typedef struct romfs_disk {
+ LONG magic; // 4
+ LONG nodecount; // 8
+ LONG disksize; // 12
+ LONG dev_id; // 16
+ char name[16]; // 32
+} romfs_disk; // Nodes start here
+
+// This is the holding structure for a node
+typedef struct node {
+ const char *path; // Filename (inc. path) of a link to this node
+ size_t size; // Size of file/directory/link
+ mode_t st_mode; // Type and permissions
+ uid_t uid; // Owner id
+ gid_t gid; // Group id
+ time_t ctime; // File creation time
+ int nodenum; // Nodenumber of this node in the ROMFS image
+ dev_t device; // Device (for hardlink check)
+ ino_t inode; // Inode (for hardlink check)
+ int nlink; // [DIRECTORIES] Number of sub-directories [FILES] hard links
+ romfs_dirent *entry; // [DIRECTORIES] Points to an array of directory entries
+ int entry_size; // Size to be allocated to file (includes alignment bytes)
+ unsigned long offset; // Offset within ROMFS image of data
+ struct node *sibling; // Points to the next entry in this directory
+ struct node *child; // [DIRECTORIES] Points to any subdirectories
+ struct node *next_in_rom; // Next in ROMFS write order
+ struct node *next_multilink;// Next node that is multilinked
+} node;
+
+static int nodes = 0;
+static char *prog;
+static int verbose = 1;
+static int dowrite = 1;
+static int bigendian = 0;
+static int hardlinks = 0;
+static unsigned long coffset = 0;
+static node * first = NULL;
+static node ** last_p = &first;
+static node * first_multilink = NULL;
+static node ** last_multilink_p = &first_multilink;
+static int fd = -1;
+
+#define VERB_NONE 0
+#define VERB_MINIMUM 1
+#define VERB_SUB 2
+#define VERB_MAX 3
+#define VERB_EXCESSIVE 4
+
+// Use gcc format argument checking on this function, which cannot return
+static void fatal_error( int exitcode, const char *fmt, ... ) \
+ __attribute__ (( noreturn,format (printf, 2, 3) ));
+
+// Use gcc format argument checking on this function
+static void verb_printf( int level, const char *fmt, ... ) \
+ __attribute__ ((format (printf, 2, 3) ));
+
+static void fatal_error( int exitcode, const char *fmt, ... ) {
+ va_list v;
+
+ va_start( v, fmt );
+ vfprintf( stderr, fmt, v );
+
+ exit(exitcode);
+}
+
+static void verb_printf( int level, const char *fmt, ... ){
+ if ( level <= verbose ) {
+ va_list v;
+ va_start( v,fmt );
+ vprintf(fmt, v);
+ }
+}
+
+static void *mymalloc( size_t size ) {
+ void *p = malloc(size);
+ if ( !p ) {
+ fatal_error( EXIT_MALLOC, "Out of memory allocating %d bytes\n", size );
+ }
+ return p;
+}
+
+static void myrealloc( void **o, size_t newsize ) {
+ if ( *o == NULL )
+ *o = mymalloc( newsize );
+ else if ( !(*o = realloc( *o, newsize )) ) {
+ fatal_error( EXIT_MALLOC, "Out of memory re-allocating %d bytes\n", newsize );
+ }
+}
+
+static void outputlong( unsigned char *b, unsigned long w ) {
+ if ( bigendian ) {
+ b[0] = (w>>24) & 0xff;
+ b[1] = (w>>16) & 0xff;
+ b[2] = (w>> 8) & 0xff;
+ b[3] = (w ) & 0xff;
+ } else {
+ b[3] = (w>>24) & 0xff;
+ b[2] = (w>>16) & 0xff;
+ b[1] = (w>> 8) & 0xff;
+ b[0] = (w ) & 0xff;
+ }
+}
+
+static void outputshort( unsigned char *b, unsigned short w ) {
+ if ( bigendian ) {
+ b[0] = (w>> 8) & 0xff;
+ b[1] = (w ) & 0xff;
+ } else {
+ b[1] = (w>> 8) & 0xff;
+ b[0] = (w ) & 0xff;
+ }
+}
+
+static unsigned long ConvertMode( unsigned long posix_mode ) {
+ unsigned long result = 0;
+ if ( S_ISDIR( posix_mode ) ) result |= 1<<0;
+ if ( S_ISCHR( posix_mode ) ) result |= 1<<1;
+ if ( S_ISBLK( posix_mode ) ) result |= 1<<2;
+ if ( S_ISREG( posix_mode ) ) result |= 1<<3;
+ if ( S_ISFIFO(posix_mode ) ) result |= 1<<4;
+ // We cannot create MQ, SEM, or SHM entries here
+ if ( posix_mode & S_IRUSR ) result |= 1<<16;
+ if ( posix_mode & S_IWUSR ) result |= 1<<17;
+ if ( posix_mode & S_IXUSR ) result |= 1<<18;
+ if ( posix_mode & S_IRGRP ) result |= 1<<19;
+ if ( posix_mode & S_IWGRP ) result |= 1<<20;
+ if ( posix_mode & S_IXGRP ) result |= 1<<21;
+ if ( posix_mode & S_IROTH ) result |= 1<<22;
+ if ( posix_mode & S_IWOTH ) result |= 1<<23;
+ if ( posix_mode & S_IXOTH ) result |= 1<<24;
+ if ( posix_mode & S_ISUID ) result |= 1<<25;
+ if ( posix_mode & S_ISGID ) result |= 1<<26;
+ return result;
+}
+
+static const char *AddDirEntry( const char *name, node *parent_node, int node_num ) {
+ int this_size = ((strlen(name) + 4 + 4 + 1) + 31) & ~31;
+ int start = parent_node->size;
+ romfs_dirent *g;
+ myrealloc( (void**)&parent_node->entry, (parent_node->size += this_size) );
+ g = (romfs_dirent *)((unsigned char *)parent_node->entry + start);
+ memset( (void*)g, '\0', this_size );
+ outputlong( (char*)&g->node, node_num);
+ outputlong( (char*)&g->next, parent_node->size);
+ strcpy(g->name,name);
+ verb_printf( VERB_MAX, "\t%s --> node %d\n", name, node_num );
+ return (const char *)g->name;
+}
+
+extern int errno;
+
+static node * FindLink( dev_t d, ino_t i ) {
+ // See if the node has been previously included by checking the device/inode
+ // combinations of all known multi-linked nodes
+ node *np = first_multilink;
+
+ for ( ; np ; np = np->next_multilink ) {
+ if ( np->device == d && np->inode == i )
+ return np;
+ }
+ return NULL;
+}
+
+static node * GetNodeInfo( const char *path, const char *name, int *hlink ) {
+ char newpath[1024];
+ node *node, *lnode;
+ struct stat stbuff;
+
+ sprintf(newpath,"%s/%s",path,name);
+ if ( (get_status(newpath,&stbuff)) < 0 ) {
+ fatal_error(EXIT_FILESYS, "stat(%s) failed: %s\n", newpath, strerror(errno));
+ }
+ if ( !(stbuff.st_mode & S_IRUSR) ) {
+ fatal_error(EXIT_FILESYS, "\"%s\" is not readable\n", newpath );
+ }
+ if ( hardlinks && S_ISREG( stbuff.st_mode ) && stbuff.st_nlink > 1 ) {
+
+ // See if this node has already been loaded
+ lnode = FindLink( stbuff.st_dev, stbuff.st_ino );
+
+ if ( lnode ) {
+ lnode->nlink++;
+ *hlink = 1;
+ return lnode; // Return the found link instead
+ }
+
+ // Create a new node
+ node = mymalloc( sizeof(struct node) );
+
+ // Incorporate the new link into the 'multi-linked' node list
+ *last_multilink_p = node;
+ last_multilink_p = &node->next_multilink;
+ } else {
+ // Create a new node
+ node = mymalloc( sizeof(struct node) );
+ }
+ node->path = strdup( newpath );
+ // We re-calculate the size for directories
+ node->size = IS_DIRECTORY( stbuff.st_mode ) ? 0 : stbuff.st_size;
+ node->st_mode = stbuff.st_mode;
+ node->uid = stbuff.st_uid;
+ node->gid = stbuff.st_gid;
+ node->ctime = stbuff.st_ctime;
+ node->nodenum = nodes++;
+ node->device = stbuff.st_dev;
+ node->inode = stbuff.st_ino;
+ // We always re-calculate the number of links
+ node->nlink = IS_DIRECTORY( stbuff.st_mode ) ? 2 : 1;
+ node->entry = NULL;
+ node->entry_size = 0;
+ node->offset = 0;
+ node->sibling = NULL;
+ node->child = NULL;
+ node->next_in_rom = NULL;
+ node->next_multilink = NULL;
+ *hlink = 0;
+ return node;
+}
+
+static void ScanDirectory(node *mynode, int p_node) {
+
+ DIR *dh;
+ struct dirent *e;
+ node **last_p = &mynode->child;
+ node *th;
+ int was_hardlinked;
+
+ if ( (dh = opendir( mynode->path )) == NULL ) {
+ perror(mynode->path);
+ return;
+ }
+
+ verb_printf(VERB_EXCESSIVE, "Construct directory '%s'(%d):\n",
+ mynode->path, mynode->nodenum );
+
+ // Add . & .. here because they MUST be present in the image
+ AddDirEntry( ".", mynode, mynode->nodenum );
+ AddDirEntry( "..", mynode, p_node );
+
+ while ( (e = readdir( dh )) ) {
+ // Ignore . & .. here because they MAY NOT be in the host filesystem
+ if ( strcmp(e->d_name,".") && strcmp(e->d_name,"..") ) {
+
+
+ th = GetNodeInfo( mynode->path, e->d_name, &was_hardlinked );
+ AddDirEntry( e->d_name, mynode, th->nodenum );
+
+ if ( !was_hardlinked ) {
+ verb_printf( VERB_EXCESSIVE, "\t\tNew node %d for entry '%s'\n", th->nodenum, e->d_name);
+ *last_p = th;
+ last_p = &th->sibling;
+ } else {
+ verb_printf( VERB_EXCESSIVE, "\t\tRe-used node %d for entry '%s'\n", th->nodenum, e->d_name);
+ }
+ }
+ }
+ closedir( dh );
+ verb_printf(VERB_EXCESSIVE,"Completed '%s'. Checking for child directories...\n", mynode->path);
+
+ for ( th = mynode->child ; th ; th = th->sibling ) {
+ if ( IS_DIRECTORY( th->st_mode ) ) {
+ mynode->nlink++;
+ ScanDirectory( th, mynode->nodenum );
+ }
+ }
+}
+
+static void AllocateSpaceToDirectories( node *first ) {
+ node *np;
+
+ for ( np = first ; np ; np = np->sibling ) {
+ if ( IS_DIRECTORY( np->st_mode ) ) {
+ // The first node is a directory. Add its data
+ np->offset = coffset;
+ np->entry_size = ALIGN_TO( np->size, DIRECTORY_ALIGN );
+ coffset += np->entry_size;
+
+ verb_printf( VERB_MAX, "\t\tnode %5d : 0x%06lX (+0x%05X)\n",
+ np->nodenum, np->offset, np->entry_size );
+
+ // Link this node into the write order chain.
+ // For node 0 (the root), this will overwrite the first pointer with itself
+ *last_p = np;
+ last_p = &np->next_in_rom;
+ }
+ }
+
+ // Now add any child directories
+ for ( np = first ; np ; np = np->sibling ) {
+ if ( IS_DIRECTORY( np->st_mode ) && np->child )
+ AllocateSpaceToDirectories( np->child );
+ }
+}
+
+static void AllocateSpaceToDataFiles( node *first ) {
+ node *np;
+
+ // There are two loops below. It CAN be done in just one, but this re-orders
+ // the file positions in relation to their inode numbers. To keep it simple
+ // to check, allocation takes place in the first loop, recursion in the second
+
+ // Search for child data files
+ for ( np = first->child ; np ; np = np->sibling ) {
+ if ( IS_DATAFILE( np->st_mode ) || IS_SYMLINK( np->st_mode ) ) {
+ np->offset = coffset;
+ np->entry_size = ALIGN_TO( np->size, DATA_ALIGN );
+ coffset += np->entry_size;
+
+ // Link in to the rom write order list
+ *last_p = np;
+ last_p = &np->next_in_rom;
+
+ verb_printf( VERB_MAX, "\t\tnode %5d : 0x%06lX (+0x%05X)\n",
+ np->nodenum, np->offset, np->entry_size );
+ }
+ }
+
+ // Recurse into sub-directories
+ for ( np = first->child ; np ; np = np->sibling ) {
+ if ( IS_DIRECTORY( np->st_mode ) ) {
+ AllocateSpaceToDataFiles( np );
+ }
+ }
+}
+
+static void AllocateSpaceToExecutables( node *first ) {
+ node *np;
+
+ // The first node is a directory. Don't bother with that...
+
+ // Search for child executables
+ for ( np = first->child ; np ; np = np->sibling ) {
+ if ( IS_EXECUTABLE( np->st_mode ) ) {
+ np->offset = coffset;
+ np->entry_size = ALIGN_TO( np->size, EXEC_ALIGN );
+ coffset += np->entry_size;
+
+ // Link in to the rom write order list
+ *last_p = np;
+ last_p = &np->next_in_rom;
+
+ verb_printf( VERB_MAX, "\t\tnode %5d : 0x%06lX (+0x%05X)\n",
+ np->nodenum, np->offset, np->entry_size );
+ }
+ }
+
+ // Recurse into sub-directories
+ for ( np = first->child ; np ; np = np->sibling ) {
+ if ( IS_DIRECTORY( np->st_mode ) ) {
+ AllocateSpaceToExecutables( np );
+ }
+ }
+}
+
+static void WriteNode( int fd, node *np ) {
+ romfs_node anode;
+ char padhere[9];
+ outputlong( (char*) &anode.mode, ConvertMode( np->st_mode ) );
+ outputlong( (char*) &anode.nlink, np->nlink );
+ outputshort((char*) &anode.uid, np->uid );
+ outputshort((char*) &anode.gid, np->gid );
+ outputlong( (char*) &anode.size, np->size );
+ outputlong( (char*) &anode.ctime, np->ctime );
+ outputlong( (char*) &anode.data_offset, np->offset );
+ sprintf( padhere, "<%6d>", np->nodenum );
+ memcpy( anode.pad, padhere, 8 );
+ if ( dowrite && write( fd, (void*)&anode, sizeof(anode) ) != sizeof(anode) )
+ fatal_error(EXIT_WRITE, "Error writing node %d (%s): %s\n", np->nodenum, np->path, strerror(errno) );
+}
+
+static int WriteNodeAndSiblings( int fd, int nodenum, node *first ) {
+ node *np;
+
+ for ( np = first ; np ; np = np->sibling ) {
+ if ( np->nodenum != nodenum++ ) {
+ fatal_error(EXIT_BUG, "BUG: Out of sequence node number; got %d, expected %d\n", np->nodenum, nodenum-1);
+ }
+ WriteNode( fd, np );
+ }
+
+ for ( np = first ; np ; np = np->sibling ) {
+ if ( IS_DIRECTORY( np->st_mode ) && np->child ) {
+ nodenum = WriteNodeAndSiblings( fd, nodenum, np->child );
+ }
+ }
+ return nodenum;
+}
+
+static void WriteNodeTable( int fd ) {
+ romfs_disk header;
+ int wnodes;
+
+ outputlong( (char*) &header.magic, ROMFS_MAGIC );
+ outputlong( (char*) &header.nodecount, nodes );
+ outputlong( (char*) &header.disksize, coffset );
+ outputlong( (char*) &header.dev_id, 0x01020304 );
+ strcpy( header.name, "ROMFS v1.0" );
+ if ( dowrite && write( fd, (void*)&header, sizeof(header) ) != sizeof(header) )
+ fatal_error(EXIT_WRITE, "Error writing ROMFS header: %s\n", strerror(errno) );
+
+ if ( (wnodes = WriteNodeAndSiblings( fd, 0, first )) != nodes ) {
+ fatal_error(EXIT_BUG, "BUG: Lost/gained some nodes; wrote %d, expected %d\n", wnodes, nodes );
+ }
+}
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+static void WriteData( int fd, node *np ) {
+ char newpath[1024];
+ int ffd;
+ unsigned long todo;
+
+ if ( IS_SYMLINK( np->st_mode ) ) {
+ if ( (ffd = readlink( np->path, newpath, sizeof(newpath) )) < 0 )
+ fatal_error(EXIT_FILESYS, "Error reading symlink \"%s\": %s\n", np->path, strerror(errno) );
+
+ if ( !dowrite ) return;
+
+ if ( lseek( fd, np->offset, SEEK_SET ) != np->offset )
+ fatal_error(EXIT_SEEK, "Error seeking to offset 0x%lX: %s\n", np->offset, strerror(errno) );
+
+ if ( write( fd, newpath, ffd ) != ffd )
+ fatal_error(EXIT_WRITE, "Write error: %s\n", strerror(errno) );
+
+ return;
+ }
+
+ if ( (ffd=open(np->path, O_RDONLY | O_BINARY )) < 0 )
+ fatal_error(EXIT_FILESYS, "Error opening \"%s\": %s\n", np->path, strerror(errno) );
+
+ if ( dowrite && lseek( fd, np->offset, SEEK_SET ) != np->offset )
+ fatal_error(EXIT_SEEK, "Error seeking to offset 0x%lX: %s\n", np->offset, strerror(errno) );
+
+ todo = np->size;
+ while ( todo >= 1024 ) {
+ if ( read( ffd, newpath, 1024 ) != 1024 )
+ fatal_error(EXIT_FILESYS, "Error reading file \"%s\" at offset 0x%lX: %s\n", np->path, np->size - todo, strerror(errno) );
+ if ( dowrite && write( fd, newpath, 1024 ) != 1024 )
+ fatal_error(EXIT_WRITE, "Write error: %s\n", strerror(errno) );
+ todo -= 1024;
+ }
+
+ if ( todo ) {
+ if ( read( ffd, newpath, todo ) != todo )
+ fatal_error(EXIT_FILESYS, "Error reading file \"%s\" at offset 0x%lX: %s\n", np->path, np->size - todo, strerror(errno) );
+ if ( dowrite && write( fd, newpath, todo ) != todo )
+ fatal_error(EXIT_WRITE, "Write error: %s\n", strerror(errno) );
+ }
+
+ close(ffd);
+
+}
+
+static void WriteDataBlocks( int fd, node *first ) {
+ for ( ; first ; first = first->next_in_rom ) {
+ if ( dowrite && lseek( fd, first->offset, SEEK_SET ) != first->offset )
+ fatal_error(EXIT_SEEK, "Error seeking to offset 0x%lX: %s\n", first->offset, strerror(errno) );
+ if ( IS_DIRECTORY( first->st_mode ) ) {
+ if ( dowrite && write( fd, first->entry, first->size ) != first->size )
+ fatal_error(EXIT_WRITE, "Write error: %s\n", strerror(errno) );
+ } else {
+ WriteData( fd, first );
+ }
+ }
+}
+
+static void usage(void) {
+ fprintf(stderr,"\n%s - Create an eCos ROMFS disk image from the files\n",prog);
+ fprintf(stderr,"%*s contained under a specified directory\n\n", strlen(prog), "");
+ fprintf(stderr,"Usage: %s [options] <fs_root> <fs_file>\n", prog);
+ fprintf(stderr," fs_root is the directory containing the files to package into the ROMFS image\n");
+ fprintf(stderr," fs_file is the name of the ROMFS image file to create\n");
+ fprintf(stderr," Options include:\n");
+ fprintf(stderr," -v / -q increase / decrease verbosity\n");
+ fprintf(stderr," -n do everything EXCEPT creating the output file\n");
+ fprintf(stderr," -b write a big-endian image (default is little endian)\n");
+ fprintf(stderr," -l collapse hard links to a single node\n");
+ fprintf(stderr,"\n");
+ exit(EXIT_ARGS);
+}
+
+int main(int ac, char *av[]) {
+ int dummy;
+
+ prog = av[0];
+
+ // Check structure sizes
+ if (sizeof(romfs_node) != 32) {
+ fatal_error(EXIT_COMPILE , "Size of romfs_node is %d, NOT 32\n", sizeof(romfs_node) );
+ } else if (sizeof(romfs_dirent) != 8) {
+ fatal_error(EXIT_COMPILE , "Size of romfs_dirent is %d, NOT 8\n", sizeof(romfs_dirent) );
+ } else if (sizeof(romfs_disk) != 32) {
+ fatal_error(EXIT_COMPILE , "Size of romfs_disk is %d, NOT 32\n", sizeof(romfs_disk) );
+ }
+
+ // Parse option arguments
+ while ( ac > 1 && av[1][0] == '-' ) {
+ char *o = &av[1][1];
+ for ( ; *o ; o++ ) {
+ switch ( *o ) {
+ case 'q' :
+ verbose--;
+ break;
+ case 'v' :
+ verbose++;
+ break;
+ case 'n' :
+ dowrite = 0;
+ break;
+ case 'b' :
+ bigendian = 1;
+ break;
+ case 'l' :
+ hardlinks = 1;
+ break;
+ default :
+ fprintf(stderr,"%s: Invalid flag -%c\n", prog, *o );
+ usage();
+ }
+ }
+ av++; ac--;
+ }
+
+ // Check remaining arguments
+ if ( ac != 3 ) usage();
+
+
+ verb_printf( VERB_MINIMUM, "%s: Verbosity %d %s%s endian\n",
+ prog, verbose,
+ dowrite ? "" : "no write, ",
+ bigendian ? "big" : "little" );
+
+ // Phase 1. Recursively scan the root directory for files and directories.
+ verb_printf(VERB_MINIMUM, "Phase 1 - Build file list\n");
+
+ first = GetNodeInfo( av[1], ".", &dummy ); // Initialize the root node entry.
+ ScanDirectory( first, 0 );
+
+ // Phase 2. Work out space allocations for filesystem
+ verb_printf(VERB_MINIMUM, "Phase 2 - Calculate space allocation\n");
+ coffset = sizeof(romfs_disk) + nodes * sizeof(romfs_node);
+ verb_printf(VERB_MAX,"\t\tnode table : 0x000000 (+0x%05lX) %d nodes\n", coffset, nodes );
+
+ // Phase 2a. Work out space allocations for the directories of the filesystem
+ verb_printf(VERB_SUB,"Phase 2a - * Directories\n");
+ coffset = ALIGN_TO( coffset, DIRECTORY_ALIGN );
+ AllocateSpaceToDirectories( first );
+
+ // Phase 2b. Work out space allocations for the data files of the filesystem
+ verb_printf(VERB_SUB,"Phase 2b - * Regular files\n");
+ coffset = ALIGN_TO( coffset, DATA_ALIGN );
+ AllocateSpaceToDataFiles( first );
+
+ // Phase 2c. Work out space allocations for the executable files of the filesystem
+ verb_printf(VERB_SUB,"Phase 2c - * Executable files\n");
+ coffset = ALIGN_TO( coffset, EXEC_ALIGN );
+ AllocateSpaceToExecutables( first );
+
+ // Round off the image size...
+ coffset = ALIGN_TO( coffset, EXEC_ALIGN );
+
+ // Phase 3. Write out the image file
+ verb_printf(VERB_MINIMUM, "Phase 3 - Construct ROMFS image file (%ld kb)\n", ALIGN_TO( coffset, 1024 )/1024);
+
+ if ( dowrite ) {
+ if ( (fd = open( av[2], O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0666 )) < 0 ) {
+ fatal_error(EXIT_WRITE,"Failed to open output file '%s', errno=%d\n", av[2], errno );
+ }
+ } else {
+ verb_printf(VERB_NONE," (No image is being written)\n");
+ }
+
+ verb_printf(VERB_SUB,"Phase 3a - * Node table\n");
+ WriteNodeTable( fd );
+
+ verb_printf(VERB_SUB,"Phase 3b - * Data blocks\n");
+ WriteDataBlocks( fd, first );
+
+ if ( fd >= 0 ) close(fd);
+
+ verb_printf(VERB_MINIMUM, "%s completed\n", av[2] );
+
+ return 0;
+}
diff --git a/cesar/ecos/packages/fs/rom/current/tests/romfs1.c b/cesar/ecos/packages/fs/rom/current/tests/romfs1.c
new file mode 100644
index 0000000000..1d32bb0421
--- /dev/null
+++ b/cesar/ecos/packages/fs/rom/current/tests/romfs1.c
@@ -0,0 +1,388 @@
+//==========================================================================
+//
+// romfs1.c
+//
+// Test fileio system
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2004 eCosCentric Limited
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg, richard.panton@3glab.com, jlarmour
+// Date: 2000-05-25
+// Purpose: Test fileio system
+// Description: This test uses the testfs to check out the initialization
+// and basic operation of the fileio system
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/io_fileio.h>
+#include <pkgconf/isoinfra.h>
+#include <pkgconf/system.h>
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <string.h>
+#include <dirent.h>
+#include <stdio.h>
+
+#include <cyg/fileio/fileio.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h> // HAL polled output
+
+// Test ROMFS data. Two example data files are generated so that
+// the test will work on both big-endian and little-endian targets.
+#if (CYG_BYTEORDER == CYG_LSBFIRST)
+# include <cyg/romfs/testromfs_le.h>
+#else
+# include <cyg/romfs/testromfs_be.h>
+#endif
+
+//==========================================================================
+
+MTAB_ENTRY( romfs_mte1,
+ "/",
+ "romfs",
+ "",
+ (CYG_ADDRWORD) &filedata[0] );
+
+
+//==========================================================================
+
+#define SHOW_RESULT( _fn, _res ) \
+diag_printf("<FAIL>: " #_fn "() returned %d %s\n", _res, _res<0?strerror(errno):"");
+
+#define CHKFAIL_TYPE( _fn, _res, _type ) { \
+if ( _res != -1 ) \
+ diag_printf("<FAIL>: " #_fn "() returned %d (expected -1)\n", _res); \
+else if ( errno != _type ) \
+ diag_printf("<FAIL>: " #_fn "() failed with errno %d (%s),\n expected %d (%s)\n", errno, strerror(errno), _type, strerror(_type) ); \
+}
+
+//==========================================================================
+
+#define IOSIZE 100
+
+#define LONGNAME1 "long_file_name_that_should_take_up_more_than_one_directory_entry_1"
+#define LONGNAME2 "long_file_name_that_should_take_up_more_than_one_directory_entry_2"
+
+
+//==========================================================================
+
+#ifndef CYGINT_ISO_STRING_STRFUNCS
+
+char *strcat( char *s1, const char *s2 )
+{
+ char *s = s1;
+ while( *s1 ) s1++;
+ while( (*s1++ = *s2++) != 0);
+ return s;
+}
+
+#endif
+
+//==========================================================================
+
+static void listdir( char *name, int statp )
+{
+ int err;
+ DIR *dirp;
+
+ diag_printf("<INFO>: reading directory %s\n",name);
+
+ dirp = opendir( name );
+ if( dirp == NULL ) SHOW_RESULT( opendir, -1 );
+
+ for(;;)
+ {
+ struct dirent *entry = readdir( dirp );
+
+ if( entry == NULL )
+ break;
+
+ diag_printf("<INFO>: entry %14s",entry->d_name);
+ if( statp )
+ {
+ char fullname[PATH_MAX];
+ struct stat sbuf;
+
+ if( name[0] )
+ {
+ strcpy(fullname, name );
+ if( !(name[0] == '/' && name[1] == 0 ) )
+ strcat(fullname, "/" );
+ }
+ else fullname[0] = 0;
+
+ strcat(fullname, entry->d_name );
+
+ err = stat( fullname, &sbuf );
+ if( err < 0 )
+ {
+ if( errno == ENOSYS )
+ diag_printf(" <no status available>");
+ else SHOW_RESULT( stat, err );
+ }
+ else
+ {
+ diag_printf(" [mode %08x ino %08x nlink %d size %d]",
+ sbuf.st_mode,sbuf.st_ino,sbuf.st_nlink,sbuf.st_size);
+ }
+ }
+
+ diag_printf("\n");
+ }
+
+ err = closedir( dirp );
+ if( err < 0 ) SHOW_RESULT( stat, err );
+}
+
+//==========================================================================
+
+#ifdef CYGPKG_FS_RAM
+static void copyfile( char *name2, char *name1 )
+{
+
+ int err;
+ char buf[IOSIZE];
+ int fd1, fd2;
+ ssize_t done, wrote;
+
+ diag_printf("<INFO>: copy file %s -> %s\n",name2,name1);
+
+ err = access( name1, F_OK );
+ if( err < 0 && errno != EACCES ) SHOW_RESULT( access, err );
+
+ err = access( name2, F_OK );
+ if( err != 0 ) SHOW_RESULT( access, err );
+
+ fd1 = open( name1, O_WRONLY|O_CREAT );
+ if( fd1 < 0 ) SHOW_RESULT( open, fd1 );
+
+ fd2 = open( name2, O_RDONLY );
+ if( fd2 < 0 ) SHOW_RESULT( open, fd2 );
+
+ for(;;)
+ {
+ done = read( fd2, buf, IOSIZE );
+ if( done < 0 ) SHOW_RESULT( read, done );
+
+ if( done == 0 ) break;
+
+ wrote = write( fd1, buf, done );
+ if( wrote != done ) SHOW_RESULT( write, wrote );
+
+ if( wrote != done ) break;
+ }
+
+ err = close( fd1 );
+ if( err < 0 ) SHOW_RESULT( close, err );
+
+ err = close( fd2 );
+ if( err < 0 ) SHOW_RESULT( close, err );
+
+}
+#endif
+
+//==========================================================================
+
+static void comparefiles( char *name2, char *name1 )
+{
+ int err;
+ char buf1[IOSIZE];
+ char buf2[IOSIZE];
+ int fd1, fd2;
+ ssize_t done1, done2;
+ int i;
+
+ diag_printf("<INFO>: compare files %s == %s\n",name2,name1);
+
+ err = access( name1, F_OK );
+ if( err != 0 ) SHOW_RESULT( access, err );
+
+ err = access( name1, F_OK );
+ if( err != 0 ) SHOW_RESULT( access, err );
+
+ fd1 = open( name1, O_RDONLY );
+ if( fd1 < 0 ) SHOW_RESULT( open, fd1 );
+
+ fd2 = open( name2, O_RDONLY );
+ if( fd2 < 0 ) SHOW_RESULT( open, fd2 );
+
+ for(;;)
+ {
+ done1 = read( fd1, buf1, IOSIZE );
+ if( done1 < 0 ) SHOW_RESULT( read, done1 );
+
+ done2 = read( fd2, buf2, IOSIZE );
+ if( done2 < 0 ) SHOW_RESULT( read, done2 );
+
+ if( done1 != done2 )
+ diag_printf("Files different sizes\n");
+
+ if( done1 == 0 ) break;
+
+ for( i = 0; i < done1; i++ )
+ if( buf1[i] != buf2[i] )
+ {
+ diag_printf("buf1[%d](%02x) != buf1[%d](%02x)\n",i,buf1[i],i,buf2[i]);
+ CYG_TEST_FAIL("Data in files not equal\n");
+ }
+ }
+
+ err = close( fd1 );
+ if( err < 0 ) SHOW_RESULT( close, err );
+
+ err = close( fd2 );
+ if( err < 0 ) SHOW_RESULT( close, err );
+
+}
+
+//==========================================================================
+// main
+
+int main( int argc, char **argv )
+{
+ int err;
+ char address[16];
+
+ CYG_TEST_INIT();
+
+ // --------------------------------------------------------------
+
+ diag_printf("<INFO>: ROMFS root follows\n");
+ listdir( "/", true );
+
+ diag_printf("<INFO>: cd /etc\n" );
+ err = chdir( "/etc" );
+ if ( err < 0 ) {
+ SHOW_RESULT( chdir, err );
+ CYG_TEST_FAIL_FINISH("romfs1");
+ }
+
+ diag_printf("<INFO>: ROMFS list of '' follows\n");
+ listdir( "", true );
+
+ diag_printf("<INFO>: ROMFS list of /etc follows\n");
+ listdir( "/etc", true );
+
+ diag_printf("<INFO>: ROMFS list of . follows\n");
+ listdir( ".", true );
+
+#ifdef CYGPKG_FS_RAM
+ err = mount( "", "/var", "ramfs" );
+ if( err < 0 ) SHOW_RESULT( mount, err );
+
+ copyfile( "/etc/passwd", "/var/passwd_copy" );
+
+ comparefiles( "/etc/passwd", "/var/passwd_copy" );
+#endif
+
+ diag_printf("<INFO>: ROMFS list of / follows\n");
+#ifdef CYGPKG_FS_RAM
+ diag_printf("<INFO>: Note that /var now gives stat() info for RAMFS\n");
+#endif
+ listdir( "/", true );
+
+ diag_printf("<INFO>: Mount ROMFS again onto /mnt\n");
+ sprintf( address, "%p", (void*)&filedata[0] );
+ err = mount( address, "/mnt", "romfs" );
+ if( err < 0 ) SHOW_RESULT( mount, err );
+
+ comparefiles( "/etc/passwd", "/mnt/etc/passwd" );
+
+
+ err = mkdir( "/foo", 0 );
+ CHKFAIL_TYPE( mkdir, err, EROFS );
+
+ err = rename( "/var", "/tmp" ); // RAMFS is mounted here
+#ifdef CYGPKG_FS_RAM
+ CHKFAIL_TYPE( rename, err, EXDEV );
+#else
+ CHKFAIL_TYPE( rename, err, EROFS );
+#endif
+
+ err = rename( "/var/passwd_copy", "/mnt/etc/passwd_copy" );
+ CHKFAIL_TYPE( rename, err, EXDEV );
+
+ err = rename( "/etc", "/tmp" );
+ CHKFAIL_TYPE( rename, err, EROFS );
+
+ diag_printf("<INFO>: cd /etc\n");
+ err = chdir( "/etc" );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+
+ err = chdir( "/mnt/etc" );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+
+ listdir( ".", true );
+
+ diag_printf("<INFO>: unlink /tmp\n");
+ err = unlink( "/tmp" );
+ CHKFAIL_TYPE( unlink, err, EROFS );
+
+ diag_printf("<INFO>: mount random area\n");
+ sprintf(address, "%p", (void*)(&filedata[0] + 0x100));
+ err = mount( address, "/tmp", "romfs" );
+ CHKFAIL_TYPE( mount, err, ENOENT );
+
+ err = umount( "/mnt" );
+ if( err < 0 ) SHOW_RESULT( umount, err );
+
+ err = umount( "/var" );
+#ifdef CYGPKG_FS_RAM
+ if( err < 0 ) SHOW_RESULT( umount, err );
+#else
+ CHKFAIL_TYPE( umount, err, EINVAL );
+#endif
+
+ err = umount( "/" );
+ if( err < 0 ) SHOW_RESULT( umount, err );
+
+
+ CYG_TEST_PASS_FINISH("romfs1");
+}
+
+// -------------------------------------------------------------------------
+// EOF romfs1.c
diff --git a/cesar/ecos/packages/fs/rom/current/tests/testromfs/etc/hosts b/cesar/ecos/packages/fs/rom/current/tests/testromfs/etc/hosts
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/cesar/ecos/packages/fs/rom/current/tests/testromfs/etc/hosts
diff --git a/cesar/ecos/packages/fs/rom/current/tests/testromfs/etc/inetd b/cesar/ecos/packages/fs/rom/current/tests/testromfs/etc/inetd
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/cesar/ecos/packages/fs/rom/current/tests/testromfs/etc/inetd
diff --git a/cesar/ecos/packages/fs/rom/current/tests/testromfs/etc/passwd b/cesar/ecos/packages/fs/rom/current/tests/testromfs/etc/passwd
new file mode 100644
index 0000000000..85aa954e56
--- /dev/null
+++ b/cesar/ecos/packages/fs/rom/current/tests/testromfs/etc/passwd
@@ -0,0 +1,32 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:100:sync:/bin:/bin/sync
+games:x:5:100:games:/usr/games:/bin/sh
+man:x:6:100:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/spool/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+majordom:x:30:31:Majordomo:/usr/lib/majordomo:/bin/sh
+postgres:x:31:32:postgres:/var/lib/postgres:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+msql:x:36:36:Mini SQL Database Manager:/var/lib/msql:/bin/sh
+operator:x:37:37:Operator:/var:/bin/sh
+list:x:38:38:SmartList:/var/list:/bin/sh
+irc:x:39:39:ircd:/var:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats/gnats-db:/bin/sh
+alias:x:70:65534:qmail alias:/var/qmail/alias:/bin/sh
+qmaild:x:71:65534:qmail daemon:/var/qmail:/bin/sh
+qmails:x:72:70:qmail send:/var/qmail:/bin/sh
+qmailr:x:73:70:qmail remote:/var/qmail:/bin/sh
+qmailq:x:74:70:qmail queue:/var/qmail:/bin/sh
+qmaill:x:75:65534:qmail log:/var/qmail:/bin/sh
+qmailp:x:76:65534:qmail pw:/var/qmail:/bin/sh
+ftp:x:60000:65534::/lhome/ftp:/bin/false
+nobody:x:65534:65534:nobody:/home:/bin/sh
+identd:x:60001:65534::/var/run/identd:/bin/false
+telnetd:x:60002:60002::/usr/lib/telnetd:/bin/false
diff --git a/cesar/ecos/packages/fs/rom/current/tests/testromfs/mnt/thing b/cesar/ecos/packages/fs/rom/current/tests/testromfs/mnt/thing
new file mode 100644
index 0000000000..45b983be36
--- /dev/null
+++ b/cesar/ecos/packages/fs/rom/current/tests/testromfs/mnt/thing
@@ -0,0 +1 @@
+hi
diff --git a/cesar/ecos/packages/fs/rom/current/tests/testromfs/var/foobar b/cesar/ecos/packages/fs/rom/current/tests/testromfs/var/foobar
new file mode 100644
index 0000000000..9cbcf6fc1a
--- /dev/null
+++ b/cesar/ecos/packages/fs/rom/current/tests/testromfs/var/foobar
@@ -0,0 +1 @@
+flibble
diff --git a/cesar/ecos/packages/hal/common/current/ChangeLog b/cesar/ecos/packages/hal/common/current/ChangeLog
new file mode 100644
index 0000000000..1d2ca270d5
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/ChangeLog
@@ -0,0 +1,2314 @@
+2005-06-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/hal_tables.h (CYG_HAL_TABLE_{QUALIFIED_}ENTRY): added
+ CYGBLD_ATTRIB_USED so that gcc 3.4.4 does not discard entries
+ which are not refereced explicitly. Problem reported by
+ Oliver Munz.
+
+2005-06-26 Bart Veer <bartv@ecoscentric.com>
+
+ * doc/hal.sgml: make HAL_DELAY_US() mandatory and define it to be
+ thread-safe.
+
+2005-05-19 Peter Korsgaard <jacmet@sunsite.dk>
+
+ * doc/porting.sgml: Changed dead sourceware.cygnus.com links to
+ ecos.sourceware.org.
+
+2005-04-27 Enrico Piria <epiria@libero.it>
+
+ * src/hal_if.c Added missing declarations of tries when compiling
+ with CYGNUM_HAL_DEBUG_GDB_PROTOCOL_RETRIES != 0.
+
+2004-11-20 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * tests/intr.c: Make the ISR call the DSR to make sure this works
+ correctly.
+
+2004-08-22 Gary Thomas <gary@mlbassoc.com>
+
+ * doc/porting.sgml: Replace [very misleading dated] comments
+ about CygMon and platforms which use/need GDB stubs.
+
+2004-08-12 Jani Monoses <jani@iv.ro>
+
+ * include/hal_if.h: Make monitor locking work with CYGPKG_LWIP.
+
+2004-05-19 John Newlin <jnewlin@stretchinc.com>
+
+ * src/hal_stub.c:
+ (cyg_hal_gdb_interrupt)
+ (cyg_hal_gdb_remove_break): Changed both to use
+ _read_mem_safe/__write_mem_safe for inserting a breakpoint, and
+ restoring the original instruction.
+ The Xtensa architecture (and others maybe?) can have unaligned
+ instructions, which caused unaligned load/store exception.
+
+2004-04-22 Jani Monoses <jani@iv.ro>
+
+ * cdl/hal.cdl :
+ Invoke tail with stricter syntax that works in latest coreutils.
+
+2004-02-23 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/debugging.cdl (CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS): Included
+ stubs should always mean saving full context both on interrupts
+ and context swaps, so make it explicit.
+
+2004-01-05 Gary Thomas <gary@mlbassoc.com>
+
+ * include/hal_if.h: Minor fixup - new 'fconfig' functions broke
+ existing uses of CYGACC_CALL_IF_FLASH_CFG_OP. Added a new macro
+ CYGACC_CALL_IF_FLASH_CFG_OP2 which handles new API and a wrapper
+ to handle the old way (backwards compatability).
+
+2003-12-21 Gary Thomas <gary@mlbassoc.com>
+
+ * src/hal_if.c (flash_config_op):
+ * include/hal_if.h: New expanded functions for RedBoot 'fconfig'
+ database.
+
+2003-09-04 Patrick Doyle <wpd@dtccom.com>
+
+ * include/hal_if.h:
+ * src/hal_if.c (flash_fis_op): Added support for the rest of the
+ FIS operations.
+
+2003-08-06 Bob Koninckx <bob.koninckx@mech.kuleuven.ac.be>
+
+ * src/drv_api.c: Added definition of cyg_interrupt_post_dsr() for
+ use in those HALs that need it.
+
+ * include/hal_arbiter.h (hal_call_isr): Removed ifdef on
+ CYGFUN_HAL_COMMON_KERNEL_SUPPORT around test and call to
+ cyg_interrupt_post_dsr().
+
+2003-07-21 Nick Garnett <nickg@balti.calivar.com>
+
+ * doc/hal.sgml: Reorganized description of clock and timer related
+ stuff into their own section and added a piece about how to change
+ the clock frequency.
+
+2003-06-25 Nick Garnett <nickg@balti.calivar.com>
+
+ * src/hal_if.c (delay_us): The first test against
+ CYGNUM_KERNEL_COUNTERS_RTC_PERIOD is now against the period
+ divided by two. By the time we get to this test we know that usecs
+ can never be > usec_per_period/2 so we can double the range of
+ period values that we can handle without overflow and use the more
+ efficient approximation. The second test is not changed since we
+ cannot make the same assumptions about the elapsed count.
+
+2003-06-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/generic-stub.c (crc32): Fix crctable option name typo.
+
+ * src/hal_if.c (hal_if_init): Remove kill_by_reset.
+ (kill_by_reset): Remove, unused.
+ (reset): ifdef test on HAL_PLATFORM_RESET and assert on reset failure.
+
+ * cdl/interrupts.cdl (CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE): No
+ reason to forbid people setting this quite small.
+
+2003-06-19 Nick Garnett <nickg@balti.calivar.com>
+
+ * src/hal_if.c (delay_us): Reorganized to cope with high frequency
+ timers by eliminating a source of arithmetic overflow.
+
+2003-05-06 Mark Salter <msalter@redhat.com>
+
+ * src/hal_stub.c (handle_exception_exit): Call sys_profile_reset from
+ here. Setup to return through return_from_stub() when appropriate.
+ (return_from_stub): New function to call CYGACC_CALL_IF_MONITOR_RETURN
+ from thread context.
+
+ * src/generic-stub.c (__handle_exception): Call exit_vec if
+ hal_syscall_handler returns negative number.
+
+2003-04-08 Mark Salter <msalter@redhat.com>
+
+ * src/hal_misc.c (hal_default_isr): Allow HAL to override default
+ GDB vector matching test.
+
+2003-04-08 Yoshinori Sato <qzb04471@nifty.ne.jp>
+2003-04-08 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/debugging.cdl: Allow CRC to be allocated in ROM as well as RAM.
+ * src/generic-stub.c: as above.
+
+2003-04-02 Gary Thomas <gary@mlbassoc.com>
+
+ * src/generic-stub.c:
+ * include/generic-stub.h: Cleanup when program args are not
+ supported (remove some unused static storage).
+
+2003-03-03 Knud Woehler <knud.woehler@microplex.de>
+
+ * src/hal_if.c:
+ * include/hal_if.h: Add CYGNUM_CALL_IF_FLASH_FIS_OP. FIS read
+ via the virtual vector table.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/hal.cdl: Fix doc links.
+
+ * doc/hal.sgml: hal-common-current-doc-porting-sgml entity ->
+ hal-common-porting-sgml in line with other docs.
+
+2003-02-13 Mark Salter <msalter@redhat.com>
+
+ * src/gdb-fileio.h (FILEIO_O_BINARY): New flag.
+ (FILEIO_O_TEXT): New flag.
+
+2003-01-31 Mark Salter <msalter@redhat.com>
+
+ * include/hal_if.h: Add CYGNUM_CALL_IF_MONITOR_RETURN.
+
+2002-12-04 Gary Thomas <gthomas@ecoscentric.com>
+
+ * cdl/hal.cdl: RAM applications should not claim (reset) version
+ string by default.
+
+2002-12-03 Gary Thomas <gthomas@ecoscentric.com>
+
+ * src/hal_if.c (hal_if_init):
+ * include/hal_if.h:
+ * cdl/hal.cdl: Allow monitor (RedBoot) version string to be exported
+ via the virtual vector table.
+
+2002-11-13 Gary Thomas <gthomas@ecoscentric.com>
+
+ * cdl/hal.cdl: Add CDL control over DATA cache startup mode.
+
+2002-09-11 Mark Salter <msalter@redhat.com>
+
+ * include/hal_if.h: Add __COMMCTL_ENABLE_LINE_FLUSH and
+ __COMMCTL_DISABLE_LINE_FLUSH.
+
+2002-08-29 Mark Salter <msalter@redhat.com>
+
+ * include/generic-stub.h: Add defines for Z packet types.
+ * src/bplist-dynamic.c: Add support for deferred hardware breakpoint
+ and watchpoint insertion/deletion. This gets around gdb problem where
+ gdb tries accessing watched memory before removing watchpoint.
+ * src/generic-stub.c (__process_packet): Ditto.
+ * include/hal_stub.h: Ditto.
+
+2002-05-23 Jesper Skov <jskov@redhat.com>
+
+ * cdl/hal.cdl: Don't build tests that are not applicable with the
+ current configuration.
+ Added CYGINT_HAL_TESTS_NO_CACHES which allows cache tests to be
+ suppressed.
+
+2002-05-13 Jesper Skov <jskov@redhat.com>
+
+ * cdl/hal.cdl: Removed
+ CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT_NOT_GUARANTEED option and its
+ dependencies.
+
+2002-05-02 Nick Garnett <nickg@redhat.com>
+
+ * doc/hal.sgml: Added description of HAL_DELAY_US().
+
+ * doc/porting.sgml: Expanded section on architecture porting.
+
+2002-04-30 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/gdb-fileio.c (cyg_hal_gdbfileio_process_F_packet): Reset
+ retcode/errno/ctrlc status every F packet.
+
+2002-04-23 Jesper Skov <jskov@redhat.com>
+
+ * doc/porting.sgml: Fix some typos.
+
+2002-04-22 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/generic-stub.h: Prototype __getpacket().
+ * src/generic-stub.c: Rename getpacket() -> __getpacket(),
+ remcomInBuffer -> __remcomInBuffer, and
+ remcomOutBuffer -> __remcomOutBuffer throughout file, and export
+ them (i.e. not file local).
+ (__process_packet): Handle $F packets file I/O protocol responses.
+
+ * src/gdb-fileio.c: New file to implement file I/O operations over
+ the GDB remote protocol.
+ * src/gdb-fileio.h: New file. Header for above.
+
+2002-03-15 Nick Garnett <nickg@redhat.com>
+
+ * doc/porting.sgml: Platform HAL porting guide tidied up and
+ expanded somewhat. Some work also done on variant
+ guide. Architecture guided needs a lot more work.
+
+ * doc/hal.sgml: Changed explicit section tags to recursive section
+ tags to make any future restructuring easier.
+
+2002-03-14 Nick Garnett <nickg@redhat.com>
+
+ * src/hal_stub.c: Add calls to HAL memory access check macros in
+ memory access functions.
+
+ * include/hal_stub.h: Added default definitions for HAL memory access
+ check macros.
+
+2002-03-06 Nick Garnett <nickg@redhat.com>
+
+ * tests/cache.c: Changed tests so that zero sized caches and HALs
+ that define HAL_DCACHE_PURGE_ALL() don't cause this test to throw
+ a compilation error.
+
+2002-02-28 Jesper Skov <jskov@redhat.com>
+
+ * src/generic-stub.c (__handle_exception): Pay attention to return
+ value from hal_syscall_handler.
+
+2002-02-21 Mark Salter <msalter@redhat.com>
+
+ * src/hal_if.c (cyg_hal_diag_mangler_gdb_flush): Don't do anything
+ if buffer is empty.
+
+2002-02-20 Nick Garnett <nickg@redhat.com>
+
+ * doc/hal.sgml: Updated and tidied. Now includes porting guide
+ from a separate file.
+
+ * doc/porting.sgml: Added this file to contain the porting guide
+ section of the HAL document. This is currently largely a
+ conversion of Jesper's porting guide from the website.
+ Unfortunately I have had no time to do much more than include it
+ wholesale, with only minor edits. There are some notes at the end
+ of the file describing what I would like to do.
+
+2002-02-18 Nick Garnett <nickg@redhat.com>
+
+ * doc/hal.sgml: Restructured most of this document and rewrote
+ large chunks of the basic HAL description stuff. Only the skeleton
+ of the porting guided is currently done. This checkin in mostly
+ for safety and to let others read the current state.
+
+2002-02-06 Mark Salter <msalter@redhat.com>
+
+ * src/hal_if.c (cyg_hal_diag_mangler_gdb_control): Add flush support.
+ (cyg_hal_diag_mangler_gdb_flush): New function to flush mangler output.
+ (cyg_hal_diag_mangler_gdb_putc): Use new function to flush output.
+
+2002-01-30 Hugo Tyson <hmt@redhat.com>
+
+ * include/hal_if.h (CYGNUM_FLASH_CFG_OP_CONFIG_INT): New defines for
+ getting Flash Config options out of RedBoot using VV call
+ CYGACC_CALL_IF_FLASH_CFG_OP(). These need to be kept uptodate
+ with (or must override) those in RedBoot's flash_config.h
+ Previously only used for getting an ESA.
+
+2002-01-25 Hugo Tyson <hmt@redhat.com>
+
+ * src/generic-stub.c (__process_packet): If detach or kill, call
+ sys_profile_reset() if BSP_SYSCALLS_GPROF are enabled, to clear
+ out any dangerous state there. Such as a callback function
+ pointer into application code.
+
+2002-01-23 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/drv_api.h: Add cyg_drv_interrupt_mask/unmask_intunsafe
+ * src/drv_api.c: Ditto. And modify
+ cyg_drv_interrupt_mask/unmask to be interrupt safe.
+
+2002-01-21 Mark Salter <msalter@redhat.com>
+
+ * include/hal_spd.h: New file. Definitions for SDRAM module SPD.
+
+2002-01-18 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_stub.c (__build_t_packet): don't declare extend_val
+ twice.
+
+2001-12-12 Jesper Skov <jskov@redhat.com>
+
+ * include/hal_stub.h: Add goto to the used label.
+ * src/hal_misc.c: Added (dummy) got for label used in
+ CYGARC_HAL_GET_RETURN_ADDRESS_BACKUP.
+
+2001-12-05 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/dbg-threads-syscall.c (dbg_thread_syscall): Don't bother to
+ deref a func ptr. The opcode could theoretically be 0x0!
+
+2001-12-04 Richard Sandiford <rsandifo@redhat.com>
+
+ * src/generic-stub.c (__add_char_to_packet): Reverse check for
+ end of buffer and end of packet to fix potential buffer overrun.
+
+2001-12-01 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/dbg-threads-syscall.c (dbg_thread_syscall): check for
+ NULL dbg_syscall_ptr.
+
+ * cdl/hal.cdl: require CYGPKG_INFRA since all HALs do!
+
+2001-11-29 Hugo Tyson <hmt@redhat.com>
+
+ * src/hal_stub.c: Enable HAL_STUB_HW_SEND_STOP_REASON_TEXT for
+ XScale architectures per Mark's request; XScale GDB needs to know
+ what's happening with watchpoints (= work around previous change)
+
+2001-11-29 Hugo Tyson <hmt@redhat.com>
+
+ * src/hal_stub.c: Condition out sending the reason for hardware
+ watchpoint stop in the stop packet as $T05watch:01234568;... most
+ GDBs do not understand it and in fact object to it.
+
+2001-11-23 Nick Garnett <nickg@redhat.com>
+
+ * src/generic-stub.c (__process_packet): Fixed bogosity in
+ handling of 'r' packet. It tried to send two replies, messing up
+ the protocol and confusing GDB.
+
+2001-11-02 Hugo Tyson <hmt@redhat.com>
+
+ * include/hal_stub.h (CYG_HAL_GDB_LEAVE_CRITICAL_IO_REGION):
+ Permit this too to be defined externally ie. in a platform HAL.
+
+2001-10-25 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/hal.cdl:
+ * cdl/debugging.cdl: Reorg CDL a little so that GDB stub routines
+ are only compiled when needed (instead of being compiled "empty").
+
+2001-10-24 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/hal.cdl: Add 'basic' test.
+
+ * tests/basic.c: New test of some minimal HAL functionality.
+
+2001-10-18 Gary Thomas <gthomas@redhat.com>
+
+ * src/hal_if.c (cyg_hal_diag_mangler_gdb_putc):
+ * cdl/debugging.cdl: CYGNUM_HAL_DEBUG_GDB_PROTOCOL_RETRIES is now
+ defined as CDL 'data' flavor (tested via #if vs. #ifdef)
+
+2001-10-17 Jesper Skov <jskov@redhat.com>
+
+ * src/generic-stub.c: Prefixed local version of memcpy and memset
+ with _.
+
+2001-10-17 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/debugging.cdl:
+ * src/hal_if.c (cyg_hal_diag_mangler_gdb_putc): Make retry/abort optional,
+ only attemped if CYGNUM_HAL_DEBUG_GDB_PROTOCOL_RETRIES is configured to
+ be non-zero (default now 0).
+
+2001-10-16 Jesper Skov <jskov@redhat.com>
+
+ * include/hal_stub.h: Allow ISOINFRA/LIBC to provide string
+ functions.
+
+2001-10-16 Gary Thomas <gthomas@redhat.com>
+
+ * include/generic-stub.h: Add prototypes for breakpoint_list functions.
+
+2001-10-15 David Howells <dhowells@redhat.com>
+
+ * include/hal_stub.h: put semicolon between goto-label and close curly.
+
+2001-10-12 Mark Salter <msalter@redhat.com>
+
+ * src/thread-packets.c: Don't specify array sizes in extern decls.
+
+ * src/hal_stub.c: Use HAL_STUB_REGISTERS_SIZE to set number of elements
+ in register save areas. Default to NUMREGS if not defined by HAL.
+ Allow HALs to provide specialized get_register()/put_register().
+
+ * src/generic-stub.c (stub_format_registers): Support 'p' packet.
+ (__process_packet): Rearrange ifdefs so error is sent for unsupported
+ Z packet types.
+ (process_query): Add hook for HAL specific queries.
+ (process_set): Add hook for HAL specific sets.
+
+ * include/generic-stub.h: Add extern decls to quiet compiler warnings.
+
+2001-10-11 Gary Thomas <gthomas@redhat.com>
+
+ * include/generic-stub.h:
+ * src/generic-stub.c: Improve error handling more. Make sure that
+ packets are consumed, even if they are going to be tossed (overflow).
+ This keeps TCP based connections going, even when the data is bad.
+ (getpacket): Only send NAK in case of overflow.
+
+2001-10-09 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_if.c (flash_config_op): Protect with
+ CYGARC_HAL_SAVE_GP.
+
+2001-10-04 Jesper Skov <jskov@redhat.com>
+
+ * include/hal_endian.h: Added.
+ Fix typo.
+
+2001-10-03 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/hal_tables.h (CYG_HAL_TABLE_BEGIN): Use plain "object"
+ because some (only some though) MIPS tools complain with %object.
+ (CYG_HAL_TABLE_END): Ditto.
+
+2001-10-02 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/hal_tables.h (CYG_HAL_TABLE_BEGIN): Use %object syntax
+ rather than @object since @ is a comment character on ARM. gas
+ accepts either syntax.
+ (CYG_HAL_TABLE_END): Ditto.
+
+2001-10-01 Gary Thomas <gthomas@redhat.com>
+
+ * src/generic-stub.c (getpacket): Send back error response (E01) if
+ packet received which overflows buffers. GDB doesn't always do much
+ with this error, but at least it keeps the protocol moving.
+
+2001-09-26 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/common.cdl: New interface CYGINT_HAL_SUPPORTS_MMU_TABLES which
+ indicates if the HAL supports MMU tables (few do).
+
+2001-09-25 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/common.cdl (CYGSEM_HAL_INSTALL_MMU_TABLES): Change to be
+ default for ROM startup.
+
+2001-09-20 Jesper Skov <jskov@redhat.com>
+
+ * tests/vaargs.c (cyg_start): Call CYG_TEST_INIT.
+
+2001-09-10 Nick Garnett <nickg@redhat.com>
+
+ * include/hal_stub.h (strlen): Changed return type to size_t from
+ int so it matches <string.h>. For some reason the compiler has
+ suddenly started complaining about the type mismatch. Strange.
+
+2001-09-07 Nick Garnett <nickg@redhat.com>
+
+ * src/hal_stub.c (put_register): Added kludge for VR4300 targets
+ to sign extent the PC when it is being set. This is due to the
+ age of the VR4300 toolchain and the fact that the VR4300 is the
+ only target to do full 64bit register saves/restores.
+
+2001-09-07 Jesper Skov <jskov@redhat.com>
+
+ * include/hal_if.h: Fix typo in below change.
+
+2001-09-07 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/hal_if.h (CYGACC_CALL_IF_DBG_SYSCALL): Define and call
+ with correct arguments.
+
+2001-08-24 Mark Salter <msalter@redhat.com>
+
+ * src/generic-stub.c (__process_packet): Add support for 'D' packet.
+ (__process_packet): Check for impossible mem write length.
+
+2001-08-17 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/hal.cdl: Add CYGINT_HAL_VIRTUAL_VECTOR_COMM_BAUD_SUPPORT
+ interface.
+
+2001-08-16 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/hal.cdl: Add CDL options to control GDB protocol retries.
+
+2001-08-14 Gary Thomas <gthomas@redhat.com>
+
+ * src/hal_if.c (cyg_hal_diag_mangler_gdb_putc): Use timeout
+ functions to allow for retries. This should improve the case
+ where [for whatever reason] the host GDB misses or ignores
+ a $O packet - it will get resent after a reasonable timeout.
+
+2001-08-03 Gary Thomas <gthomas@redhat.com>
+2001-08-03 Jesper Skov <jskov@redhat.com>
+
+ * include/hal_if.h: Use inline functions for calls - allowing
+ interrupts to be disabled while services are called
+ [CYGACC_COMM_IF_CONTROL is an exception since it's using variable
+ arguments - so it's still a macro].
+ Pruned unused IF vectors: ICTRL_TABLE, EXC_TABLE, DBG_VECTOR,
+ CPU_DATA, BOARD_DATA, SYSINFO, SET_SERIAL_BAUD.
+ Note: this should fix bug CR 902745-CR.
+
+ * cdl/hal.cdl: Removed CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_ICTRL.
+ * src/hal_if.c (hal_if_init): Removed initialization of
+ ICTRL_TABLE, EXC_TABLE, CPU_DATA and BOARD_DATA entries.
+
+2001-08-03 Nick Garnett <nickg@redhat.com>
+
+ Imported from a development branch:
+
+ 2001-07-11 Nick Garnett <nickg@redhat.com>
+
+ * include/drv_api.h:
+ * src/drv_api.c:
+ Added API for controlling routing of interrupts to CPUs in SMP
+ configurations.
+
+ 2001-06-29 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/drv_api.h:
+ * src/drv_api.c:
+ Added API for using spinlocks.
+
+2001-08-03 Jesper Skov <jskov@redhat.com>
+
+ * tests/vaargs.c: Added.
+ * cdl/hal.cdl: Added CYGPKG_HAL_BUILD_COMPILER_TESTS to allow cpp1
+ and vaargs tests to be compiled conditionally.
+
+2001-07-27 Jesper Skov <jskov@redhat.com>
+
+ * tests/intr.c: Set up interrupt ISR using driver API so it works
+ properly in chained mode in the presence of arbiters.
+
+ * src/drv_api.c (chain_isr): Call default ISR when
+ appropriate. Return ISR return value.
+
+ * include/hal_arbiter.h (hal_call_isr): Added version to be used
+ with interrupt chaining.
+
+2001-07-24 Mark Salter <msalter@redhat.com>
+
+ * cdl/hal.cdl (CYGINT_HAL_PLF_IF_IDE): New interface which
+ indicates platform supports IDE controller I/F macros.
+
+2001-06-29 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/hal.cdl (CYGPKG_HAL_TESTS): Remove redundant .c extension
+
+2001-06-29 Jesper Skov <jskov@redhat.com>
+
+ * include/hal_misc.h: Moved arbiter helper to
+ * include/hal_arbiter.h: this file to avoid header file inclusion
+ order problems.
+
+2001-06-28 Jesper Skov <jskov@redhat.com>
+
+ * include/hal_misc.h (hal_call_isr): Added. Used by ISR arbiters.
+
+2001-06-22 Gary Thomas <gthomas@redhat.com>
+
+ * src/generic-stub.c (BUFMAX): Define as platform specific, thus
+ reducing memory requirements.
+ (__process_packet): Eliminate program arguments support until eCos
+ makes use of them (more memory savings).
+
+2001-06-22 Mark Salter <msalter@redhat.com>
+
+ * src/hal_stub.c (__do_copy_mem): Add goto statement to prevent
+ compiler from moving instructions across 'err' label.
+
+2001-06-14 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/generic-stub.c (__process_packet): Don't reset the board
+ straight away with a 'r' packet. Let a 'k' packet do it instead.
+
+ * src/hal_stub.c (__install_traps): Remove redundant comment.
+
+2001-06-11 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/hal_if.c (delay_us): Revert below change of 2001-05-17
+
+2001-06-05 Hugo Tyson <hmt@redhat.com>
+
+ * src/hal_if.c (cyg_hal_diag_mangler_gdb_putc): The nesting of
+ CYGARC_HAL_SAVE_GP() and the instant-out if sending a carriage
+ return "\r" was wrong - it scrambled the gp for the caller! Since
+ the return-test is trivial, I simply re-ordered rather than making
+ the exit clause complex with a restore in it.
+
+2001-05-17 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/hal_if.c (delay_us): Warn if using default
+
+2001-05-14 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/interrupts.cdl (CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE):
+ Default stack size to 32K for non-kernel configs, and describe
+ why.
+
+2001-05-07 Gary Thomas <gthomas@redhat.com>
+
+ * src/hal_if.c (hal_ctrlc_check): Only return 'true' if the ISR/DSR
+ actually processes a ^C. Otherwise, interrupts/date can be lost on
+ a shared channel (like an ethernet device).
+
+2001-04-30 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/hal.cdl: Add configury to control initial cache behaviour.
+
+2001-04-30 Hugo Tyson <hmt@redhat.com>
+
+ * cdl/hal.cdl: Add tests/cpp1.c to the tests list.
+
+ * tests/cpp1.c: New test, to test for regressions in the tools.
+ This one is for a CPP bug in the XScale tools where '+' binds too
+ strongly following a ')' because it is mistaken for unary plus.
+
+2001-04-25 Bart Veer <bartv@redhat.com>
+
+ * tests/cache.c:
+ Fix test for cache presence.
+
+ * src/drv_api.c (cyg_drv_interrupt_detach):
+ Added missing indirection.
+
+2001-03-28 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/dbg-threads-api.h: Add dbg_thread_id() function prototype.
+
+2001-03-21 Mark Salter <msalter@redhat.com>
+
+ * src/hal_if.c (hal_if_init): Add explicit typecast when setting
+ version. Needed when sizeof(int) < sizeof(CYG_ADDRWORD).
+
+2001-03-21 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_if.c (hal_if_init): Added warning about debugging.
+
+2001-03-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/hal_if.h: Add argument names to __call_if_flash_cfg_op_fn_t
+
+2001-03-16 Mark Salter <msalter@redhat.com>
+
+ * src/hal_stub.c (__build_t_packet): Add hook for adding arch-specific
+ registers to T packet.
+ (handle_exception_cleanup): Skip orig_registers past breakpoint so we
+ return to original context rather than hit breakpoint again.
+
+2001-03-16 Hugo Tyson <hmt@redhat.com>
+
+ * include/hal_if.h: Define types and slots and macros themed with
+ the phrase CALL_IF_FLASH_CFG_OP following the pattern of what's
+ there for the other slots. Thus CYGNUM_CALL_IF_FLASH_CFG_OP,
+ CYGACC_CALL_IF_FLASH_CFG_OP(...) and __call_if_flash_cfg_op_fn_t
+ are all newly defined. Also CYGNUM_CALL_IF_FLASH_CFG_GET which is
+ the only operation supported in this initial version.
+
+ Also changed many typedef'd function pointers to not include the
+ pointerness; that way the type can be used to validate the
+ correctness of arguments in the called function.
+
+ * src/hal_stub.c (__reset): Minor change to reset function
+ handling; pointerness of typedef removed.
+
+ * src/hal_if.c (flash_config_op): New function to call flash ops
+ in RedBoot. This is so that RedBoot can manage ethernet addresses
+ for you, and the application can get at the data "cleanly".
+ (hal_if_init): Install flash_config_op() in the table if defined.
+
+2001-03-12 Mark Salter <msalter@redhat.com>
+
+ * src/hal_misc.c (cyg_hal_user_break): Use macro to find PC
+ in saved regs.
+
+ * src/generic-stub.c: Add support for harvard memories.
+ * src/bplist-dynamic.c: Ditto.
+ * include/generic-stub.h: Ditto.
+ * include/hal_stub.h: Add dummy harvard memory macros for
+ princeton memory systems.
+
+2001-03-12 Jesper Skov <jskov@redhat.com>
+
+ * src/drv_api.c (cyg_drv_interrupt_detach): Fix missing intr->
+ change.
+
+2001-03-08 Jesper Skov <jskov@redhat.com>
+
+ * cdl/hal.cdl: Change sense of
+ CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT_GUARANTEED to new
+ CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT_NOT_GUARANTEED.
+
+2001-03-07 Jesper Skov <jskov@redhat.com>
+
+ * src/drv_api.c: Use macro to provide symbol alias.
+
+2001-03-05 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_if.c (hal_if_diag_init): Ensure the function only
+ executes once.
+
+2001-03-02 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/hal.cdl:
+ * include/hal_if.h:
+ * src/hal_if.c (hal_if_init):
+ Support platform specific initializations.
+
+2001-02-26 Mark Salter <msalter@redhat.com>
+
+ * src/generic-stub.c (__process_packet): Change 'k' packet to cause
+ return to original context. Change 'r' packet to respond with empty
+ packet before resetting board.
+
+ * src/hal_stub.c (handle_exception_exit): New function. Restores
+ original context saved when stub was entered for the first time.
+ (handle_exception_cleanup): Save original context.
+ (__install_traps): Set __process_exit_vec to handle_exception_exit.
+
+2001-02-09 Jesper Skov <jskov@redhat.com>
+
+ * cdl/debugging.cdl: Make CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT and
+ CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT options have sensible defaults.
+
+2001-02-08 Jesper Skov <jskov@redhat.com>
+
+ * cdl/hal.cdl: Added CYGSEM_HAL_VIRTUAL_VECTOR_INHERIT_CONSOLE and
+ CHANNEL_CONFIGURABLE options.
+ * cdl/common.cdl: Added CYGDBG_HAL_DIAG_TO_DEBUG_CHAN option.
+ * src/hal_if.c: Changes to respect new options. Always do platform
+ driver init from CLAIM_COMMS code.
+ * src/hal_stub.c: Leave channel setup to CLAIM_COMMS code.
+
+ * src/hal_if.c: Added null mangler that gets called via the
+ virtual vector console comms entry and just forwards IO to the
+ debug comms entries. This differs from setting the console
+ channel to the same as the debug channel in that console output
+ will go to the debug channel even if the debug channel is changed.
+
+2001-02-07 Jesper Skov <jskov@redhat.com>
+
+ * include/hal_if.h: Allow architecture to override COMM and CALL
+ accessor macros.
+
+2001-02-03 Gary Thomas <gthomas@redhat.com>
+
+ * src/bplist-dynamic.c (__set_breakpoint, __remove_breakpoint):
+ Fix error introduced below when no breakpoint list defined.
+
+2001-02-02 Mark Salter <msalter@redhat.com>
+
+ * src/generic-stub.c: __set_breakpoint and __remove_breakpoint now
+ take a length argument.
+
+ * src/bplist-dynamic.c: Support breakpoint length. Use
+ HAL_BREAKINST_ADDR macro (if defined) to get actual breakpoint based
+ on breakpoint length.
+
+ * include/hal_stub.h: Add len argument to __set_breakpoint and
+ __remove_breakpoint.
+
+2001-02-01 Jesper Skov <jskov@redhat.com>
+
+ * src/drv_api.c: Make it build with chaining.
+
+ * include/hal_if.h: Introduce macros for legal version range and
+ special hacked version number used by ctrlc magic.
+ * src/hal_if.c (hal_ctrlc_isr_init): Be more careful with how the
+ version number is checked (and trashed) by the ctrlc init code.
+ * src/hal_misc.c (hal_default_isr): Same.
+
+ * src/hal_stub.c: Moved mangling code to hal_if.c
+ * src/hal_if.c: New policies for when and how to initialize the
+ IO channels. Mangler code now set up by diag_init to allow for
+ mangling when no stub is included.
+
+ * include/hal_if.h: Added COMM version in upper 16 bits of version
+ word. Removed CYGPRI_HAL_IMPLEMENTS_IF_SERVICES.
+ * src/hal_misc.c: Use masks when checking vv versions.
+
+ * cdl/hal.cdl: Add new options for selecting which parts of the
+ virtual vector table to initialize.
+ * src/hal_if.c: Matching granularity in initialization code.
+ Extra checking of services before using these.
+
+ * cdl/debugging.cdl: Require channel initialization when enabling
+ stubs.
+
+2001-01-31 Jesper Skov <jskov@redhat.com>
+
+ * cdl/common.cdl: Get rid of CYGDBG_HAL_DIAG_DISABLE_GDB_PROTOCOL
+ options. They are replaced by the CYGSEM_HAL_DIAG_MANGLER option.
+
+2001-01-31 Hugo Tyson <hmt@redhat.com>
+
+ * include/hal_if.h: Make it possible to build logical ether driver
+ even without virtual vectors present, by defining a dummy
+ HAL_CTRLC_CHECK in that case; other code invokes it if debugging
+ per se is enabled.
+
+2001-01-26 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_stub.c (__reset): Rename HAL_STUB_PLATFORM_RESETx macros
+ to HAL_PLATFORM_RESETx.
+ * src/hal_if.c (reset): Same.
+
+2001-01-15 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/drv_api.c: Initialized isr_disable_counter to 1 so that it
+ indicates that interrupts are initially disabled.
+
+2000-12-15 Gary Thomas <gthomas@redhat.com>
+
+ * src/generic-stub.c: Define 'version' string to be a weak
+ symbol that can be easily overridden (e.g. by RedBoot).
+
+2000-12-11 Gary Thomas <gthomas@redhat.com>
+
+ * src/hal_if.c: Remove unnecessary (polluting) include file.
+
+ * include/hal_stub.h: Support platform/variant supplied
+ include files. <cyg/hal/plf_XXX.h> can now be layered
+ as <cyg/hal/var_XXX.h> which includes <cyg/hal/plf_XXX.h>.
+
+2000-12-06 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_if.c (delay_us): Ensure proper _GP save/restore.
+ Reduce number of loops in fall-back code.
+
+2000-12-05 Drew Moseley <dmoseley@redhat.com>
+
+ * src/hal_stub.c (__build_t_packet): Handle
+ CYGARC_REGSIZE_DIFFERS_FROM_TARGET_REGISTER_T with Little Endian
+ target.
+
+ * include/hal_misc.h: Added BIT and SZ_ defines.
+
+2000-11-22 Mark Salter <msalter@redhat.com>
+
+ * src/hal_misc.c (hal_default_isr): Version check only when
+ CYGSEM_HAL_ROM_MONITOR not defined.
+
+2000-11-20 Mark Salter <msalter@redhat.com>
+
+ * src/hal_stub.c (hal_flush_output): New function to flush debug
+ comm interface.
+
+ * src/generic-stub.c (__process_packet): Use hal_flush_output when
+ killing or continuing.
+
+ * include/hal_stub.h: Add declaration for hal_flush_output().
+
+ * include/hal_if.h (__COMMCTL_FLUSH_OUTPUT): New comm control cmd.
+
+2000-11-17 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_if.c (delay_us): Add dummy loop.
+ Duh! Take usecs argment into account.
+
+2000-11-06 Mark Salter <msalter@redhat.com>
+
+ * src/generic-stub.c (__handle_exception): Add support for GNUPro bsp
+ syscall handling.
+
+ * src/board.h: Include pkgconf/redboot.h for CYGSEM_REDBOOT_BSP_SYSCALLS.
+
+2000-11-06 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_if.c (hal_if_diag_write_char): Clear interrupt flag before
+ setting breakpoint.
+
+2000-11-04 Mark Salter <msalter@redhat.com>
+
+ * src/hal_stub.c (__build_t_packet): Report reason and data
+ address if stopped by hw watchpoint.
+
+ * src/generic-stub.c (__process_packet): Remove experimental
+ support for type 5 Z packet.
+
+ * include/hal_stub.h: Define HAL_STUB_STOP_* reasons returned
+ by HAL_IS_STOPPED_BY_HARDWARE.
+
+2000-10-27 Mark Salter <msalter@redhat.com>
+
+ * src/generic-stub.c: Fixed preprocessor warning.
+
+2000-10-27 Gary Thomas <gthomas@redhat.com>
+
+ * src/generic-stub.c (__process_packet): Remove warnings when
+ hardware breakpoint support (Z packet) not enabled.
+
+2000-10-26 Mark Salter <msalter@redhat.com>
+
+ * src/generic-stub.c (__process_packet): Add Z packet support.
+
+ * src/bplist-dynamic.c: Include <pkgconf/hal.h> to pick up
+ CYGNUM_HAL_BREAKPOINT_LIST_SIZE.
+
+2000-10-24 Jesper Skov <jskov@redhat.com>
+
+ * src/generic-stub.c (__process_packet): Disable buffer size
+ z-packet.
+
+2000-10-23 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_stub.c: Made __mem_fault_handler pointer volatile.
+
+2000-10-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/drv_api.h (cyg_interrupt): Make dsr_count volatile to
+ prevent compilers optimizing accesses in the wrong place.
+
+2000-10-20 Jesper Skov <jskov@redhat.com>
+
+ * include/drv_api.h: Correct location of volatile keyword.
+ * src/drv_api.c: Same.
+
+2000-10-19 Gary Thomas <gthomas@redhat.com>
+
+ * src/generic-stub.c (__process_packet): Add RedBoot identifier
+ in maintenance 'd' packet reply.
+
+2000-10-18 Jesper Skov <jskov@redhat.com>
+
+ * include/hal_if.h (CYGPRI_HAL_IMPLEMENTS_IF_SERVICES): Set for
+ all non-RAM startup types.
+
+2000-10-13 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/stubrom/stubrom.c (cyg_start): Remove unnecessary call to
+ initialize_stub()
+
+2000-09-11 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/hal_tables.h (CYG_HAL_TABLE_EXTRA): Use new definition of
+ CYGBLD_ATTRIB_SECTION, and fix the string name up better.
+ (CYG_HAL_TABLE_ENTRY): Ditto
+ (CYG_HAL_TABLE_QUALIFIED_ENTRY): Ditto
+
+2000-09-07 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/hal_tables.h: Fix non-standard use of paste operator to
+ remove warnings with recent gcc
+
+2000-09-04 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/hal_tables.h (CYG_HAL_TABLE_END): Use CYGARC_P2ALIGNMENT
+ to align label
+ (CYG_HAL_TABLE_TYPE): Define
+
+2000-09-01 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/hal_stub.c (__build_t_packet): Ensure sign extension applies
+ in the higher word, not the lower.
+ (__build_t_packet): Don't need to conditionalize on
+ CYGARC_REGSIZE_DIFFERS_FROM_TARGET_REGISTER_T as there should be no
+ problems with the current code.
+ * src/generic-stub.c (stub_format_registers): Likewise
+
+ * include/hal_if.h (CYGACC_COMM_IF_CONTROL): Remove warning due to
+ unnecessary use of cpp paste operator
+
+2000-08-28 Gary Thomas <gthomas@redhat.com>
+
+ * src/hal_if.c:
+ * include/hal_if.h (hal_ctrlc_check): Define new routine to be
+ called by interrupt handlers (DSRs) which may be using hardware
+ shared with a debug channel. In particular, network adaptors
+ need to call this function to see if a ^C has occurred on the
+ network debug connection.
+
+2000-08-24 Gary Thomas <gthomas@redhat.com>
+
+ * include/hal_tables.h: Need descriminated tables (for proper sorting).
+
+2000-08-14 Drew Moseley <dmoseley@redhat.com>
+
+ * src/hal_if.c: Added an extern declaration for
+ cyg_hal_plf_comms_init.
+
+ * src/bplist-dynamic.c: Only use breakpoint lists when building
+ stubs.
+
+2000-08-10 Drew Moseley <dmoseley@redhat.com>
+
+ * include/generic-stub.h: Added support for register validity
+ checking.
+ * src/generic-stub.c: Ditto.
+ * src/hal_stub.c: Ditto.
+
+ * include/drv_api.h: Added cyg_code_t.
+
+2000-08-03 Gary Thomas <gthomas@redhat.com>
+
+ * include/hal_if.h (CYGNUM_CALL_IF_DBG_DATA): Move to avoid
+ conflict.
+
+2000-07-26 Gary Thomas <gthomas@redhat.com>
+
+ * src/hal_stub.c (cyg_hal_gdb_diag_putc): Ignore any characters
+ other than the protocol chars of ACK/NAK/^C.
+
+ * src/hal_if.c (hal_if_diag_init): Only reset console channel
+ if user has configured a non-default choice.
+
+2000-07-24 Drew Moseley <dmoseley@redhat.com>
+
+ * src/bplist-dynamic.c (__install_breakpoint_list): Call
+ HAL_ICACHE_SYNC() rather than HAL_ICACHE_INVALIDATE_ALL().
+
+2000-07-21 Drew Moseley <dmoseley@cygnus.com>
+
+ * src/hal_stub.c: Cleanup of #define's.
+
+ * src/generic-stub.c: Rearrange the linkage between Cygmon and HAL so
+ that Cygmon needs HAL but not vice-versa. ie HAL no longer calls
+ any Cygmon functions.
+ * src/hal_misc.c: Ditto.
+
+ * src/bplist-dynamic.c: Use HAL macros rather than Cygmon
+ functions for flushing the cache.
+ Also handle the case where target_register_t is not defined.
+
+2000-07-21 Gary Thomas <gthomas@redhat.com>
+
+ * src/hal_if.c (CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS): Define to allow
+ the number of channels to be extended by "AUX" packages.
+
+2000-07-20 Drew Moseley <dmoseley@redhat.com>
+
+ * src/generic-stub.c (stub_format_registers): Make the previous patch
+ effective only if CYGARC_REGSIZE_DIFFERS_FROM_TARGET_REGISTER_T is
+ defined so as to not affect any other targets.
+ * src/hal_stub.c: Ditto.
+
+2000-07-19 Drew Moseley <dmoseley@redhat.com>
+
+ * src/generic-stub.c (stub_format_registers): Handle the case
+ where GDB is expecting registers larger than we are storing. ie
+ MIPS gdb expects 64 bit registers even if we are on a 32 bit
+ architecture. Also, handle the sign-extension correctly if
+ necessary.
+ * src/hal_stub.c (__build_t_packet): Ditto.
+
+2000-07-18 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_misc.c (hal_default_isr):
+ Version gets hacked by hal_if_init - check for the hacked value.
+
+2000-07-18 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_stub.c (__mem_fault_handler): Made volatile.
+
+2000-07-14 Drew Moseley <dmoseley@redhat.com>
+
+ * src/generic-stub.c: Cleanups for better coexistence with Cygmon.
+ * include/generic-stub.h: Ditto.
+ * include/hal_if.h: Ditto.
+ * include/hal_stub.h: Ditto.
+ * src/hal_stub.c: Ditto.
+
+ * cdl/hal.cdl: Compile bplist-dynamic.c.
+
+ * src/bplist-dynamic.c: New file for supporting breakpoints in the HAL.
+
+2000-07-14 Gary Thomas <gthomas@redhat.com>
+
+ * src/hal_if.c (delay_us): Use HAL_DELAY_US() if defined.
+
+2000-07-07 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_stub.c (initHardware): Fix #endif location.
+
+ * src/hal_if.c (hal_ctrlc_isr_init): Added hack to work around a
+ silly but critical problem.
+
+ * src/hal_stub.c: Removed some CygMon conditional exclusions.
+
+ * src/hal_if.c (hal_ctrlc_isr_init): Don't enable interrupts when
+ configured as ROM monitor.
+
+2000-07-05 Jesper Skov <jskov@redhat.com>
+
+ * cdl/debugging.cdl: Only allow CTRLC support if there's stubs or
+ a ROM monitor to handle it. (Haruki Kashiwaya (kashiwaya at redhat
+ dot com)).
+
+2000-06-30 Jesper Skov <jskov@redhat.com>
+
+ * include/hal_if.h: Make CYGACC macros call functions. May have to
+ add some _GET macros at some time if anyone needs to access the
+ function pointers.
+
+ * src/hal_stub.c:
+ * src/hal_misc.c:
+ * src/hal_if.c:
+ Matching changes of CYGACC clients.
+
+2000-06-29 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_stub.c (cyg_hal_gdb_diag_putc): Check console interrupt
+ flag and breakpoint if set.
+
+2000-06-28 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_stub.c (cyg_hal_gdb_diag_putc): Don't try to set
+ breakpoints in ROM startup - just disable interrupts. Also, use
+ procs table function to disable device interrupts.
+
+ * include/hal_if.h: Mark vector/comms arrays volatile to avoid
+ compiler confusion.
+
+ * include/dbg-threads-api.h: Fix C/C++ declaration issues.
+
+ * src/hal_stub.c: Moved stub platform init call below vector table
+ setup.
+
+ * src/hal_misc.c:
+ * src/hal_if.c:
+ * include/hal_if.h: DBG_ISR_VECTOR and SET_TIMEOUT functions added
+ to comms table. Added DELAY_US function to vector table. Made
+ switching of debug channel dis/enable Ctrl-c interrupts as
+ well. Made ctrlc_isr code use new vector entries. All this amounts
+ to a properly switchable debug channel.
+
+2000-06-21 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_stub.c: Fixed clients of vector procs tables to pass
+ in the correct arguments. Hook O-packetizer up on procs slot
+ reserved for IO mangler. Install mangler when necessary.
+
+ * src/hal_if.c: Extended set procs functions to allow temporarily
+ switching console procs in a safe manner. Removed debug and
+ console wrappers - all IO happens via drivers hooked up in tables
+ rather than through hardwired macros. Proper initialization of
+ console proc entry. Fixed clients of vector procs tables to pass
+ in the correct arguments. Stub now does its own vector table
+ initialization. Added special procs slot for IO manglers.
+
+ * include/hal_if.h: Define special IDs used by the set procs
+ functions. PROCS_HANDLED removed since the procs table will now
+ always service any port.
+
+2000-06-21 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/hal_stub.h: Added underscore to breakinst().
+
+ * include/hal_tables.h:
+ Added this file to contain macros for defining datatables in a
+ systematic and extensible way.
+
+2000-06-19 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/hal.cdl: Revert change below - GUARANTEED can exist
+ with STUBS defined.
+
+2000-06-18 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/hal.cdl: Use of virtual vector functions for diagnostic
+ output must be disabled when building with stubs. Note: this
+ lets stubs be built for platforms with guaranteed virtual
+ vector support.
+
+2000-06-16 Jesper Skov <jskov@redhat.com>
+
+ * include/hal_if.h: All vector-dependant features hidden when
+ config option not enabled.
+
+ * src/hal_if.c (hal_if_init): Fix warning.
+
+2000-06-15 Jesper Skov <jskov@redhat.com>
+
+ * include/hal_if.h: Added console-include decision logic.
+
+2000-06-15 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/drv_api.c:
+ * include/drv_api.h: Added boolean result to cyg_drv_cond_wait()
+ to match change to the kernel and KAPI functionality.
+
+2000-06-14 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_stub.c: Added O-packetizer used by GDB stubs for virtual
+ vector table configs.
+
+ * src/hal_misc.c (hal_default_isr): Check Ctrlc for both CTRLC
+ or BREAK options.
+
+ * src/hal_if.c:
+ * include/hal_if.h:
+ Define console wrappers when necessary. Platform HALs can use
+ these by providing raw IO functions and some config data.
+
+2000-06-09 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_if.c: Implemented most of the remaining services. Some
+ just don't have an eCos equivalent at the moment.
+
+ * cdl/hal.cdl: Allow virtual_vector options to have sensible
+ default values depending on when the platform HAL port was
+ written.
+
+ * src/hal_misc.c (cyg_hal_user_break): Also expect CygMon to
+ provide the breakpoint service.
+
+ * src/stubrom/stubrom.c (cyg_start): Reverted change. Now handled
+ by hal_if_init.
+
+ * cdl/hal.cdl: Added option for controlling use of diag services
+ in the virtual vector table.
+
+2000-06-08 Jesper Skov <jskov@redhat.com>
+
+ * src/stubrom/stubrom.c: Call hal_diag_init to ensure IF table
+ entries related to diag IO get initialized.
+
+ * src/hal_stub.c (cyg_hal_gdb_interrupt): save/restore GP so it
+ can be used by MIPS platforms.
+ Use reset function in ROM if available.
+
+ * src/hal_misc.c:
+ * include/hal_misc.h: Functions shared between HALs. More
+ functions are likely to be moved here if appropriate.
+
+ * src/hal_if.c: Interfacing related functions: table init code and
+ function wrappers.
+
+ * include/hal_if.h: ROM/RAM calling interface table
+ definitions. The layout is a combination of libbsp and vectors
+ already in use by some eCos platforms.
+
+
+ * cdl/hal.cdl: Added CYGxxx_HAL_VIRTUAL_VECTOR_SUPPORT
+ options. These are used to control whether a platform uses the new
+ ROM/RAM calling interface. All platforms will be converted to use
+ this, but piecemeal over a period of time, thus the requirement
+ for selecting behavior.
+
+2000-06-04 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/hal.cdl: Support variant 'pkgconf' headers. This will allow
+ [variant] common symbols to be defined, rather than duplicating
+ them over all platforms using that variant.
+
+2000-05-25 Jesper Skov <jskov@redhat.com>
+
+ * cdl/debugging.cdl: Allow thread support to included for ROM
+ monitor builds.
+
+2000-05-22 Jesper Skov <jskov@redhat.com>
+
+ * cdl/debugging.cdl: Allow platform to prevent CTRLC inclusion.
+
+2000-04-12 Jesper Skov <jskov@redhat.com>
+
+ * cdl/debugging.cdl: Don't let interfaces define anything.
+
+2000-04-07 Jesper Skov <jskov@redhat.com>
+
+ * cdl/hal.cdl: Fix dependencies for stub.
+
+2000-03-28 Jesper Skov <jskov@redhat.com>
+
+ * src/generic-stub.c (__process_packet): Added 'z' packet reply.
+
+2000-03-28 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/hal.cdl:
+
+ Adjust documentation URLs.
+
+2000-03-24 Jesper Skov <jskov@redhat.com>
+
+ * include/hal_stub.h: Fixed a bad function name. Made it opssible
+ for archs to define CYG_HAL_GDB_ENTER_CRITICAL_IO_REGION.
+
+2000-03-20 Jesper Skov <jskov@redhat.com>
+
+ * cdl/debugging.cdl: Preclude USE_MONITOR when including stubs.
+
+2000-03-01 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * cdl/common.cdl:
+ Define CYGINT_HAL_DIAG_DISABLE_GDB_PROTOCOL_SUPPORTED as an
+ 'interface' so implementations can be properly specified.
+
+2000-02-29 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * cdl/common.cdl: Option to disable GDB protocol now supported
+ by QUICC based PowerPC systems.
+
+2000-02-29 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/generic-stub.h: Make header C++ safe
+
+2000-02-16 Jesper Skov <jskov@redhat.com>
+
+ * include/hal_stub.h: fixed endian definitions.
+
+2000-02-10 Jesper Skov <jskov@redhat.com>
+
+ * include/pkgconf/hal.h: Added CYGSEM_HAL_ROM_MONITOR
+ * src/hal_stub.c (initHardware): CYG_HAL_STARTUP_STUBS ->
+ CYGSEM_HAL_ROM_MONITOR.
+ Removed HAL_STUB_PLATFORM_STUBS_INIT.
+
+2000-02-09 Jesper Skov <jskov@redhat.com>
+
+ * cdl/hal.cdl: Added remaining build dependencies.
+
+2000-02-04 Jesper Skov <jskov@redhat.com>
+
+ * cdl/hal.cdl: Fix test list display.
+
+2000-02-03 Jesper Skov <jskov@redhat.com>
+
+ * include/pkgconf/hal.h: CYG_HAL_POWERPC_x->CYGPKG_...
+
+2000-02-03 Jesper Skov <jskov@redhat.com>
+
+ * cdl/debugging.cdl: Use interfaces for stub capabilities instead
+ of exclude list.
+ * cdl/hal.cdl: Add extra dependencies to common stub build rule.
+
+2000-02-02 Jesper Skov <jskov@redhat.com>
+
+ * cdl/hal.cdl: Added HAL tests.
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/hal.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/hal.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-27 Jesper Skov <jskov@redhat.com>
+
+ * cdl/hal.cdl: Added simple build rules for common stub.
+
+2000-01-26 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/hal_stub.c (__reset): Replace CYGDAT_CYGMON_ENABLE
+ dependency with just CYGPKG_CYGMON
+ (initHardware): Likewise
+ (__set_baud_rate): Likewise
+ (putDebugChar): Likewise
+
+2000-01-17 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/common.cdl,
+ cdl/debugging.cdl:
+
+ Modify the default_value attribute for
+ CYGFUN_HAL_COMMON_KERNEL_SUPPORT, CYGPKG_HAL_EXCEPTIONS
+ and CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT to do the right
+ thing in the absence of the eCos kernel package.
+
+1999-12-22 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/hal.cdl:
+
+ Add CFLAGS to the custom rule for extras.o to accommodate
+ arm big-endian targets.
+
+1999-12-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Rename all CYG_HAL_USE_ROM_MONITOR_GDB_STUBS
+ -> CYGSEM_HAL_USE_ROM_MONITOR_GDB_stubs
+ Rename all CYG_HAL_USE_ROM_MONITOR_CYGMON ->
+ CYGSEM_HAL_USE_ROM_MONITOR_CygMon
+ Rename all CYG_HAL_USE_ROM_MONITOR -> CYGSEM_HAL_USE_ROM_MONITOR
+ Don't need to define CYG_HAL_SH_SH7708 any more
+
+ * cdl/hal.cdl: Add CYGPKG_HAL_ROM_MONITOR container package for
+ platforms to put ROM-monitor related options into
+ Move all ROM-monitor related options into individual platform CDL
+
+1999-12-02 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/hal.cdl:
+
+ Use '$<' to reference custom rule dependency.
+
+1999-12-01 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/hal.cdl:
+
+ Use the <PREFIX> token in custom rules.
+
+1999-11-29 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/hal.cdl:
+
+ Use wildcard in the custom rule for extras.o to
+ accommodate 'make -n'.
+
+1999-11-23 Simon Fitzmaurice <sdf@cygnus.co.uk>
+ * cdl\common.cdl: Correct example of illiteracy
+
+1999-11-20 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * cdl/common.cdl: Add MMU tables options.
+
+ * include/pkgconf/hal.h (CYGSEM_HAL_INSTALL_MMU_TABLES):
+ (CYGSEM_HAL_STATIC_MMU_TABLES): New options to control MMU table
+ flavour and placement.
+
+1999-11-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/dbg-threads-api.h, include/generic-stub.h,
+ include/hal_stub.h: Add comments to explain these header files should
+ not be included by user programs
+
+1999-11-09 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * cdl/common.cdl: Add CYGDBG_HAL_DIAG_DISABLE_GDB_PROTOCOL.
+
+ * include/pkgconf/hal.h (CYGDBG_HAL_DIAG_DISABLE_GDB_PROTOCOL):
+ New option which [explicitly] controls use of GDB protocol
+ for diagnostic I/O.
+
+1999-11-03 Jesper Skov <jskov@cygnus.co.uk>
+
+ * cdl/hal.cdl: More crud out + mn10300 fixes.
+
+1999-11-02 Jesper Skov <jskov@cygnus.co.uk>
+
+ * cdl/hal.cdl: Cleaned out some of the CPU config entries.
+
+1999-10-29 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/PKGconf.mak: Add cache tests for Cirrus Logic boards.
+
+1999-10-29 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/cache.c: Made safe for targets with no cache.
+
+ * tests/PKGconf.mak: Don't build cache test for ARM unless
+ explicitly enabled.
+
+1999-10-28 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/cache.c: Fix array size.
+
+1999-10-27 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/hal_stub.c: Fix typo (CYGDAT_CYGMON_ENABLE). Also need
+ to include <pkgconf/cygmon.h>
+
+1999-10-27 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/hal_stub.c: Add explicit enable for CygMon package.
+
+1999-10-27 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/hal_stub.c (cyg_hal_gdb_interrupt): Bugfix to previous: ^Cs
+ were being ignored when received by the diag output code, because
+ there was already a break in place. Solution is to let
+ cyg_hal_gdb_interrupt() override any previous break, and tidy up
+ state of course.
+
+1999-10-26 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/hal_stub.h (CYG_HAL_GDB_ENTER_CRITICAL_IO_REGION): Place
+ the break at the address of a label within the calling context
+ [normally hal_diag_write_char()]; this is neater and more
+ portable; it's supported for more targets. Also use
+ cyg_hal_place_break() to place it, define that, &c.
+
+ * src/hal_stub.c (cyg_hal_gdb_place_break): New routine to
+ specially handle the inline breakpoint. It basically does the
+ same as cyg_hal_gdb_interrupt(), except on some platforms where
+ you must do different things to set a bp from a non-interrupt
+ context.
+
+1999-10-25 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/hal_stub.c (putDebugChar, getDebugChar): When building with
+ CygMon, these functions are defined by CygMon.
+
+1999-10-26 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/hal.cdl:
+
+ Modify custom make rule to specify file paths relative
+ to the package version directory.
+
+1999-10-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/hal_stub.h (CYG_HAL_GDB_ENTER_CRITICAL_IO_REGION):
+ (CYG_HAL_GDB_LEAVE_CRITICAL_IO_REGION): new macros to be invoked
+ in hal_diag routines to make atomic the code that outputs a
+ complete GDB $O packet. This is required so that watching
+ variables (which is implemented by stepping) and stepping itself
+ does not try to ss through that $O output code. CASE 102327.
+
+ * src/hal_stub.c (cyg_hal_gdb_break_is_set): new routine to query
+ whether a break is set: used by step in the stubs to decide to
+ continue instead, because we are in a critical region.
+ (cyg_hal_gdb_running_step): communication between generic stub and
+ here: if set, a step has been converted into a continue, so we do
+ NOT obey cyg_hal_gdb_remove_break until it is cleared, in
+ handle_exception_cleanup().
+
+ * src/generic-stub.c (__process_packet): If there is a break set
+ by the hal_stub.c, convert a step to continue, and set
+ cyg_hal_gdb_running_step to say we did so.
+
+1999-10-22 Jesper Skov <jskov@cygnus.co.uk>
+ Case 102379
+ * src/generic-stub.c (__handle_exception): Flush and clear caches
+ after cleaning up after single-stepping.
+
+ (memcpy, memset): Added to prevent stub hanging if user puts
+ breakpoints in either function.
+
+1999-10-19 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Added monitor configury for Brother
+ board.
+
+1999-10-10 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/thread-packets.c (stub_pkt_currthread): Fix typo in comment.
+
+ * src/generic-stub.c: Reorg to expose register get/set functions.
+
+1999-10-08 Simon Fitzmaurice <sdf@cygnus.co.uk>
+ * cdl\interrupts.cdl: Quoted '[' and ']' (significant in TCL and thus CDL)
+
+1999-10-08 Jesper Skov <jskov@cygnus.co.uk>
+
+ * cdl/interrupts.cdl: Added
+ CYGIMP_HAL_COMMON_INTERRUPTS_IGNORE_SPURIOUS.
+
+1999-09-22 Simon FitzMaurice <sdf@cygnus.co.uk>
+
+ * cdl\hal.cdl : add priority field to "extras.o" rule
+
+1999-09-21 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/thread-packets.c: Fix some typos in comments.
+
+1999-09-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_stub.c: Override generic GDB interrupt functions for
+ ARM. Need them to be thumb aware.
+
+1999-09-13 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Add new config option to allow spurious
+ interrupts to be ignored by the HAL.
+
+ * src/generic-stub.c (__process_packet): Build in version string
+ (date/time) for stubs in ROM to be returned via 'd' packet.
+
+1999-09-09 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/hal.h (CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS): Rename
+ CYGPKG_HAL_MN10300_SIM to CYGPKG_HAL_MN10300_AM31_SIM
+
+1999-09-07 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/dbg-threads-syscall.c (dbg_currthread_id): Fixed to return
+ zero if dbg_currthread() returns false. Previously it could have
+ returned a random value which would have made GDB think there had
+ been a thread switch when there hadn't. It was particularly prone
+ to do this in configurations where the kernel was absent.
+
+1999-09-01 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Always include target and platform package
+ include (pkgconf) files.
+
+1999-08-26 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/generic-stub.c (__hex2mem_helper):
+ Use target_register_t when casting to address type, rather than long
+ Since the compiler can choose arbitrary alignment of unions, force
+ to use byte array only
+ Restore use of loop termination test for *hexMemSrc, just in case
+ since that's how it used to be
+ Increment destination, not source at end of loop
+
+ (__mem2hex_helper):
+ Use target_register_t when casting to address type, rather than long.
+ Since the compiler can choose arbitrary alignment of unions, force
+ to use byte array only. Therefore use single __read_mem_safe() call
+
+ * src/hal_stub.c (__do_copy_mem): Reassign back from dst/src at start
+ of each "if" clause in case we go round the loop again.
+
+1999-08-24 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/hal_stub.c (__do_copy_mem): Move temp variables to top of
+ function - potentially safer if there is an error.
+
+1999-08-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/generic-stub.c (__process_packet): For 'g' and 'G' packets,
+ when the register size differs from sizeof(target_register_t) we must
+ adjust according to the endianness
+
+ * include/hal_stub.h: Ensure __LITTLE_ENDIAN__ is defined on
+ little-endian targets
+
+ * src/hal_stub.c (__build_t_packet): Use the correct register sizes
+ for PC and SP rather than assuming they are the same as target_register_t
+
+1999-08-23 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/generic-stub.h: Change prototypes for internal functions.
+
+ * src/hal_stub.c (__do_copy_mem):
+ * src/generic-stub.c (__mem2hex_helper): Rework to perform aligned,
+ multi-byte operations when conditions allow. This should handle
+ most "hardware register" access cases. Note: there currently is
+ no good way to force GDB to require/use such accesses.
+
+1999-08-17 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/intr.c (cyg_start): Use CYG_TEST_NA rather than a pass saying
+ it's inapplicable
+
+1999-08-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Rename CYG_HAL_MN10300_AM32_STDEVAL1 to
+ CYG_HAL_MN10300_AM31_STDEVAL1
+
+1999-08-13 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/hal_stub.c: Removed superfluous trace() extern.
+
+1999-08-12 Nick Garnett <nickg@cygnus.co.uk>
+
+ Imported following changes from AM33 branch:
+
+ 1999-07-27 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/hal_stub.c: Added support for 1 byte breakpoints.
+ Removed invalidates for cache flushes - I am not entirely sure why
+ we have these here, since HAL_DCACHE_SYNC() should do what we
+ need, and these invalidates are causing a problem on the MIPS and
+ MN10300 targets.
+
+ * include/pkgconf/hal.h: Added Monitor selection for AM33.
+
+ 1999-06-29 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Modified to match new MN10300 HAL
+ organization.
+
+1999-08-06 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/generic-stub.c (__process_packet): FLush and clear caches
+ after call to __single_step.
+
+1999-07-05 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/intr.c: Don't use kernel's RTC definitions.
+
+1999-07-02 Jesper Skov <jskov@cygnus.co.uk>
+ PR20157
+ * tests/cache.c: Print stride values, preventing timeout on slow
+ targets.
+
+1999-06-28 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h (CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT):
+ Fixed parent.
+
+1999-06-24 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Clarify descriptions of
+ CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT and
+ CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT.
+
+1999-06-17 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Added CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
+ to enable inclusion of ^C interrupt handler. Added CDL to control
+ it.
+
+1999-06-10 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Add support for the PowerPC target MBX860
+ platform, CYG_HAL_POWERPC_MBX.
+
+1999-06-10 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/hal_stub.c: Need to init register pointer.
+
+1999-06-08 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Added CYG_HAL_ROM_MONITOR for EDK7708.
+
+1999-05-31 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_stub.c: Respect HAL_BREAKINST_SIZE setting.
+
+1999-05-28 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Renamed SH platform package to edk7708.
+
+1999-05-28 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/hal_stub.c (initHardware): Added call to
+ HAL_STUB_PLATFORM_INIT if it is defined.
+
+ * include/pkgconf/hal.h: Added a #undef for CYG_HAL_ROM_MONITOR,
+ largely so that a stubrom permutation can define it.
+
+1999-05-27 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/hal_stub.c: Do not call HAL_ICACHE_INVALIDATE_ALL() and
+ HAL_DCACHE_INVALIDATE_ALL() in __instruction_cache() and
+ __data_cache() for MIPS targets. These macros are simply
+ duplicates.
+
+1999-05-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/cache.c: Added handling of unified caches.
+
+1999-05-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/cache.c: Use HAL_DCACHE_SYNC if available
+
+1999-05-24 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Added CPU specifier for EDK board.
+
+1999-05-21 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_stub.c (__install_traps): Set exit vector to __reset.
+
+1999-05-21 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Switched VR4300 over to using GDB STUBS
+ monitor from PMON.
+
+1999-05-21 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/intr.c: Get RTC values from CYGBLD_HAL_PLATFORM_H.
+ Ensure there are fallback definitions.
+
+ * src/hal_stub.c (handle_exception_cleanup): Added optional call
+ of HAL_STUB_PLATFORM_STUBS_FIXUP macro.
+
+1999-05-18 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_stub.c (hal_output_gdb_string): Added missing ;
+
+1999-05-13 Nick Garnett <nickg@cygnus.co.uk>
+
+ The following changes were all made on a branch and imported into
+ the main trunk later.
+
+ 1999-05-11 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ tidied up all MIPS targets to include CYGBLD_HAL_TARGET_H. This
+ will eventually apply to all configurations.
+
+ 1999-05-06 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/PKGconf.mak (COMPILE): Added dbg-threads-syscall.c.
+
+ * include/dbg-thread-syscall.h:
+ * src/dbg-threads-syscall.c:
+ Files added to enable support for thread-awareness in GDB stub
+ ROMs. The .h file has been moved from kernel/src/debug.
+
+ 1999-04-28 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/hal_stub.c (__build_t_packet): Changed sp variable to a
+ non-pointer type to force it to be installed in the T packet with
+ the right size.
+
+ * src/drv_api.c: Added cyg_interrupt_call_pending_DSRs() to keep
+ HAL happy in non-kernel configurations.
+
+ 1999-04-21 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Added VR4300 configury for ROM monitor use and inclusion of
+ variant-specific configuration header. This needs some further
+ tidying up.
+
+1999-04-28 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/PKGconf.mak:
+ Use the new rules for generating libextras.a
+
+1999-04-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: GDB_BREAK support now available for ARM
+ targets.
+
+1999-04-16 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/PKGconf.mak:
+ * src/dummy.c:
+ New file that can always be added to libextras.a without
+ affecting image sizes.
+
+1999-04-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/hal_stub.h:
+ Make sure all functions have C linkage even in C++
+
+1999-04-14 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19845
+ * src/generic-stub.c (__process_packet): Reset _register pointer
+ to the exception state before attempting to set up single-step
+ magic.
+
+1999-04-14 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/hal_stub.h: Added declaration for __stub_copy_registers.
+
+1999-04-14 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_stub.c: Use HAL_xCACHE_IS_ENABLED if defined.
+
+1999-04-09 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_stub.c:
+ Moved get_register and put_register here. Made them access the
+ currently selected register set.
+
+1999-03-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/dbg-threads-api.h: Update copyright
+
+ * src/generic-stub.c: Change Cygnus Support->Cygnus Solutions
+
+ * src/thread-packets.c: Update copyright
+
+ * src/thread-pkts.h: Update copyright
+
+1999-03-19 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/cache.c: Added interrupt disable and enable to cache state
+ change blocks, in line with similar changes to kcache1.
+
+1999-03-17 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_stub.c (hal_output_gdb_string): Use disable/restore
+ macros to make sure it works even when interruptible() is a NOP
+ function.
+
+1999-03-10 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Changed include of hal_tx39_jmr3904.h to hal_tx39.h.
+
+1999-03-05 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/drv_api.h:
+ * src/drv_api.c:
+ Fixed some typos in non-kernel configuration support.
+
+1999-03-04 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19367
+ * include/pkgconf/hal.h: Exclude GDB stubs on sparc.
+
+1999-02-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/generic-stub.c:
+ * include/generic-stub.h:
+ Added binary download patches from libstub.
+
+1999-02-25 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/drv_api.h:
+ * src/drv_api.c:
+ Added these files to define driver API.
+
+1999-02-23 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Added include of <pkgconf/hal_tx39_jmr3904.h> to get TX39 speed
+ configuration options.
+
+1999-02-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/intr.c:
+ Rename CYGNUM_VECTOR_RTC -> CYGNUM_HAL_INTERRUPT_RTC in line with
+ HAL changes
+
+1999-02-17 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_stub.c:
+ * src/generic-stub.c (__handle_exception):
+ Only include cyg_hal_gdb_break magic when stub is configured to
+ handle GDB BREAK signals.
+
+1999-02-17 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/generic-stub.c (__handle_exception): Moved special signal
+ handling here to avoid duplication for all architectures.
+
+1999-02-16 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stubrom/stubrom.c: Changed set_debug_traps to initialize_stub.
+
+ * include/hal_stub.h: [added]
+ * include/generic-stub.h:
+ * src/hal_stub.c: [added]
+ * src/board.h: [added]
+ * src/thread-pkts.h:
+ * src/thread-packets.c:
+ * src/generic-stub.c:
+ * src/PKGconf.mak:
+ Merged in latest libstub changes. Moved most eCos specific changes
+ into hal_stub.[ch], reducing effort required for further
+ merging/integration.
+
+1999-02-05 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Cleaned up the MPC8xx configuration.
+
+1999-01-29 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Added simple MPC8xx configuration.
+
+1999-01-26 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/cache.c (time0): Waste much less time if running in a
+ simulator. Do only 40 loops instead of 4000.
+ In consequence the nasty meddling with MAX_STRIDE depending on
+ HAL_xxx_SIM package definitions can go.
+
+1999-01-22 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Renamed CYG_HAL_POWERPC_FADS to
+ CYGPKG_HAL_POWERPC_FADS.
+
+1999-01-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Tidy up and update description
+ Add new CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG option to allow default
+ priority static constructors to be deferred
+ Remove all traces of non-CYG_KERNEL_USE_INIT_PRIORITY code
+
+1999-01-21 Jesper Skov <jskov@cygnus.co.uk>
+ Merge with FADS branch.
+
+ 1998-12-17 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Don't allow GDB BREAK support on FADS.
+ Define _MPC860, not _MP860.
+
+ 1998-12-17 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Added FADS entry from Kevin Hester <KHester@opticworks.com>.
+
+ 1999-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Add CYG_KERNEL_USE_INIT_PRIORITY for SPARCLITE.
+
+1999-01-18 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18823
+ * include/pkgconf/hal.h: Don't allow GDB stubs to be configured
+ for Linux target.
+
+1999-01-18 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18822
+ * include/pkgconf/hal.h: GDB_BREAK support not available for ARM
+ targets.
+
+1999-01-14 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/stubrom/PKGconf.mak: Rename 'TESTS' to 'PROGS' due to
+ changes in 'makrules.prv'.
+
+1999-01-14 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stubrom/stubrom.c (cyg_start): Fix compiler warning.
+
+ * include/dbg-threads-api.h: Include cyg_type.h to get externC
+ definition.
+
+1999-01-14 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/dbg-threads-api.h: Added prototype for dbg_scheduler().
+
+1999-01-13 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/generic-stub.c (__output_hex_value): Change buffer size
+ [2048 was rather large] and make stack based. Also don't
+ allow for string to exceed buffer.
+
+1999-01-13 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/generic-stub.c (strcpy): Terminate copied string.
+
+1999-01-11 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/intr.c (CYGNUM_KERNEL_COUNTERS_RTC_PERIOD): Added RTC data
+ for Linux.
+
+Wed Dec 9 14:07:30 GMT 1998 Chris Provenzano <proven@cygnus.com>
+
+ * include/pkgconf/hal.h: Compile the i386 linux target with
+ CYG_KERNEL_USE_INIT_PRIORITY defined.
+
+1999-01-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/generic-stub.c (interruptible): Cleaned up a bit.
+
+1999-01-04 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18572
+
+ * tests/cache.c: Purge data cache before invalidating it.
+
+1998-12-09 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/generic-stub.c: Better handling of errors while stubs
+ are accessing memory on behalf of GDB. Requires support for
+ GCC 'computed goto label' in top-level exception handler.
+
+1998-12-09 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Removed the
+ CYGARC_HAL_COMMON_EXPORT_CPU_MACROS option. Causing failures in
+ permutation tests.
+
+1998-12-07 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/generic-stub.c (process_exception): Send an acknowledge char
+ on first entry so GDB doesn't timeout before resending its initial
+ packet.
+
+1998-11-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Added
+ CYGARC_HAL_COMMON_EXPORT_CPU_MACROS.
+
+1998-11-23 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/cache.c: Only run with stride 1 on SIMs.
+
+1998-11-23 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Define SIM as a 603 CPU.
+
+1998-11-19 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/intr.c:
+ Make the test do nothing if kernel real-time clock is enabled.
+ Added different timer constants for PPC SIM and HW.
+
+1998-11-17 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/intr.c:
+ * include/pkgconf/hal.h:
+ Renamed CYG_HAL_POWERPC_MP860 to CYG_HAL_POWERPC_MPC860.
+
+1998-11-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Made CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT a
+ sub-option of CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS.
+
+1998-11-16 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Allow GDB stubs to be configured for
+ MN10300 HW. Allow GDB_BREAK for all but tx39.
+
+1998-11-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Made CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT a
+ sub-option of CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS.
+
+1998-11-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/generic-stub.c (process_packet): Flush D cache before
+ invalidating I cache.
+
+1998-11-02 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/generic-stub.c (__handle_exception): Check for breakpoints
+ set by GDB interrupt handler.
+
+1998-10-25 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/thread-packets.c: Fixed closing #endif comment.
+
+ * src/generic-stub.c: Fixed closing #endif comment.
+
+1998-10-23 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_common.c: Removed. We can't use weak default functions
+ when they may conflict with strong functions in the library.
+
+1998-10-23 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/generic-stub.h: Added __interruptible_control.
+
+1998-10-23 Jesper Skov <jskov@cygnus.co.uk>
+ PR 17460, PR 17913
+
+ * include/pkgconf/hal.h: Let HAL exception support require Kernel
+ exception support.
+
+1998-10-21 Jesper Skov <jskov@cygnus.co.uk>
+ PR 17842
+
+ * include/pkgconf/hal.h: Let HAL GDB thread support require Kernel
+ GDB thread support.
+
+1998-10-20 Jesper Skov <jskov@lassi.cygnus.co.uk>
+ PR 17460
+
+ * src/hal_common.c: Added. Includes a weak handle_exception
+ definition.
+
+1998-10-20 Jesper Skov <jskov@cygnus.co.uk>
+ PR 17885, 17880, 17841
+
+ * include/pkgconf/hal.h: Don't allow GDB stubs to be configured
+ for SIMs or MN10300.
+
+1998-10-19 Jesper Skov <jskov@lassi.cygnus.co.uk>
+
+ * src/thread-packets.c: Sync'd with libstub source.
+
+1998-10-16 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/hal.h (CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE):
+ Added new configuration option for interrupt stack size.
+
+Thu Oct 15 21:25:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Make CYGFUN_HAL_COMMON_KERNEL_SUPPORT require the kernel, as it
+ is enabling this is eCos-kernel specific, and relies on
+ configuration options defined only in the kernel
+ Required for PR 17229
+
+1998-10-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h (CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT):
+ Added config option.
+
+1998-10-14 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Move some configury from kernel.h to here. Particularly the
+ support for GDB stubs.
+
+ * tests/cache.c:
+ * tests/context.c:
+ * tests/intr.c:
+ * tests/PKGconf.mak:
+ New directory of HAL-only test programs. Currently contains some
+ very basic test programs.
+
+ * include/generic-stub.h:
+ * include/dbg-threads-api.h:
+ * src/generic-stub.c:
+ * src/thread-packets.c:
+ * src/thread-pkts.h:
+ * src/stubrom/PKGconf.mak:
+ * src/stubrom/stubrom.c:
+ Moved these files here from kernel.
+
+1998-10-08 Gary Thomas <gthomas@penang.cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Add support for new architecture.
+
+1998-09-23 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Switched TX39 over to using CYGMON from GDB stubs.
+
+Tue Sep 15 19:13:04 1998 David Moore <dsm@keema.cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Cleaned up comments.
+
+Mon Sep 14 11:08:26 1998 Jesper Skov <jskov@lassi.cygnus.co.uk>
+ PR 17230
+
+ * include/pkgconf/hal.h: Added IMP_HAL_COMMON_INTERRUPTS_CHAIN
+ option.
+
+1998-09-14 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Fixed typo in description.
+
+1998-09-12 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Sort out exception handling options (PR 16953)
+ Added missing descriptions (PR 17184)
+
+Tue Sep 8 17:16:39 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Elide some spurious redefines of CYG_HAL_MN10300_STDEVAL1 and
+ CYG_HAL_MN10300_SIM within ifdefs conditioned on same.
+
+1998-09-03 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ CYGPKG_HAL_COMMON is now a component, not a package.
+
+1998-09-02 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Moved target and platform specific configuration data to
+ the appropriate packages.
+
+ Symbols identifying the target hardware should be just defined,
+ not given a value, as per the coding standards.
+
+Mon Aug 31 09:16:08 1998 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal.h: Added INIT_PRIORITY default setting for
+ powerpc.
+
+1998-08-28 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Added configuration data.
+
+1998-08-20 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Moved definition of CYG_KERNEL_USE_INIT_PRIORITY here from
+ kernel.h.
+
+1998-08-18 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/hal.h:
+ Created this file to contain HAL config options.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Jonathan Larmour
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/hal/common/current/cdl/common.cdl b/cesar/ecos/packages/hal/common/current/cdl/common.cdl
new file mode 100644
index 0000000000..71c505e855
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/cdl/common.cdl
@@ -0,0 +1,152 @@
+# ====================================================================
+#
+# common.cdl
+#
+# HAL common configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: nickg,jskov,jlarmour
+# Contributors:
+# Date: 1999-07-02
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_option CYGFUN_HAL_COMMON_KERNEL_SUPPORT {
+ display "Provide eCos kernel support"
+ requires CYGPKG_KERNEL
+ default_value CYGPKG_KERNEL
+ description "
+ The HAL can be configured to either support the full eCos
+ kernel, or to support only very simple applications which do
+ not require a full kernel. If kernel support is not required
+ then some of the startup, exception, and interrupt handling
+ code can be eliminated."
+}
+
+# NOTE: The requirement for kernel exception support is bogus in that
+# the user can supply a deliver_exception function herself. In that
+# case, however, it is easy to force the kernel option off while leaving
+# this one on. Having the requirement prevents accidental invalid
+# configurations of the kernel.
+cdl_option CYGPKG_HAL_EXCEPTIONS {
+ display "HAL exception support"
+ requires CYGPKG_KERNEL_EXCEPTIONS
+ default_value CYGPKG_KERNEL_EXCEPTIONS
+ description "
+ When a processor exception occurs, for example an attempt to
+ execute an illegal instruction or to perform a divide by
+ zero, this exception may be handled in a number of different
+ ways. If the target system has gdb support then typically
+ the exception will be handled by gdb code. Otherwise if the
+ HAL exception support is enabled then the HAL will invoke a
+ routine deliver_exception(). Typically this routine will be
+ provided by the eCos kernel, but it is possible for
+ application code to provide its own implementation. If the
+ HAL exception support is not enabled and a processor
+ exception occurs then the behaviour of the system is
+ undefined."
+}
+
+cdl_option CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG {
+ display "Stop calling constructors early"
+ requires CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS
+ default_value 0
+ description "
+ This option supports environments where some constructors
+ must be run in the context of a thread rather than at
+ simple system startup time. A boolean flag named
+ cyg_hal_stop_constructors is set to 1 when constructors
+ should no longer be invoked. It is up to some other
+ package to deal with the rest of the constructors.
+ In the current version this is only possible with the
+ C library."
+}
+
+cdl_interface CYGINT_HAL_SUPPORTS_MMU_TABLES {
+ display "HAL uses the MMU and allows for CDL manipulation of it's use"
+}
+
+cdl_option CYGSEM_HAL_INSTALL_MMU_TABLES {
+ display "Install MMU tables."
+ default_value { CYG_HAL_STARTUP != "RAM" }
+ active_if CYGINT_HAL_SUPPORTS_MMU_TABLES
+ description "This option controls whether this application installs
+ its own Memory Management Unit (MMU) tables, or relies on the
+ existing environment to run."
+}
+
+cdl_option CYGSEM_HAL_STATIC_MMU_TABLES {
+ display "Use static MMU tables."
+ default_value 0
+ requires CYGSEM_HAL_INSTALL_MMU_TABLES
+ description "This option defines an environment where any Memory
+ Management Unit (MMU) tables are constant. Normally used by ROM
+ based environments, this provides a way to save RAM usage which
+ would otherwise be required for these tables."
+}
+
+cdl_component CYGDBG_HAL_DIAG_TO_DEBUG_CHAN {
+ display "Route diagnostic output to debug channel"
+ default_value { (CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS \
+ || CYG_HAL_STARTUP == "RAM") ? 1 : 0}
+ active_if !CYGSEM_HAL_VIRTUAL_VECTOR_INHERIT_CONSOLE
+ active_if { CYGPKG_HAL_ARM || CYGPKG_HAL_POWERPC_MPC8xx \
+ || CYGPKG_HAL_V85X_V850 || CYGSEM_HAL_VIRTUAL_VECTOR_DIAG }
+ description "
+ If not inheriting the console setup from the ROM monitor,
+ it is possible to redirect diagnostic output to the debug
+ channel by enabling this option. Depending on the debugger
+ used it may also be necessary to select a mangler for the
+ output to be displayed by the debugger."
+
+ cdl_option CYGSEM_HAL_DIAG_MANGLER {
+ display "Mangler used on diag output"
+ flavor data
+ legal_values {"GDB" "None"}
+ default_value { "GDB" }
+ description "
+ It is sometimes necessary to mangle (encode) the
+ diag ASCII text output in order for it to show up at the
+ other end. In particular, GDB may silently ignore raw
+ ASCII text."
+ }
+}
+
diff --git a/cesar/ecos/packages/hal/common/current/cdl/debugging.cdl b/cesar/ecos/packages/hal/common/current/cdl/debugging.cdl
new file mode 100644
index 0000000000..997b24f587
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/cdl/debugging.cdl
@@ -0,0 +1,169 @@
+# ====================================================================
+#
+# debugging.cdl
+#
+# HAL debugging configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2003 Jonathan Larmour
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: nickg,jskov,jlarmour
+# Contributors:
+# Date: 1999-07-02
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_interface CYGINT_HAL_DEBUG_GDB_STUBS {
+ display "Support for GDB stubs"
+ no_define
+ description "
+ The HAL implements GDB stubs for the target."
+}
+
+cdl_option CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS {
+ display "Include GDB stubs in HAL"
+ active_if CYGINT_HAL_DEBUG_GDB_STUBS
+ default_value 0
+ requires ! CYGSEM_HAL_USE_ROM_MONITOR
+ requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
+ requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
+ requires { !CYGSEM_HAL_VIRTUAL_VECTOR_DIAG \
+ || CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS }
+ description "
+ This option causes a set of GDB stubs to be included into the
+ system. On some target systems the GDB support will be
+ provided by other means, for example by a ROM monitor. On
+ other targets, especially when building a ROM-booting system,
+ the necessary support has to go into the target library
+ itself. When GDB stubs are include in a configuration, HAL
+ serial drivers must also be included."
+
+ compile generic-stub.c thread-packets.c hal_stub.c drv_api.c bplist-dynamic.c
+}
+
+cdl_interface CYGINT_HAL_DEBUG_GDB_STUBS_BREAK {
+ display "Support for external break support in GDB stubs"
+ no_define
+ description "
+ The HAL implements external break (or asynchronous interrupt)
+ in the GDB stubs for the target."
+}
+
+cdl_option CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT {
+ display "Include GDB external break support for stubs"
+ active_if CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
+ requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+ default_value CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+ description "
+ This option causes the GDB stub to add a serial interrupt handler
+ which will listen for GDB break packets. This lets you stop the
+ target asynchronously when using GDB, usually by hitting Control+C
+ or pressing the STOP button. This option differs from
+ CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT in that it is used when
+ GDB stubs are present."
+}
+
+cdl_interface CYGINT_HAL_DEBUG_GDB_CTRLC_UNSUPPORTED {
+ display "Platform does not support CTRLC"
+ no_define
+}
+
+cdl_option CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT {
+ display "Include GDB external break support when no stubs"
+ requires !CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
+ active_if { CYGSEM_HAL_USE_ROM_MONITOR || CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS }
+ active_if { CYGINT_HAL_DEBUG_GDB_CTRLC_UNSUPPORTED == 0 }
+ default_value { !CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS }
+ description "
+ This option adds an interrupt handler for the GDB serial line
+ which will listen for GDB break packets. This lets you stop the
+ target asynchronously when using GDB, usually by hitting Control+C
+ or pressing the STOP button. This option differs from
+ CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT in that it is used when the GDB
+ stubs are NOT present."
+}
+
+cdl_option CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT {
+ display "Include GDB multi-threading debug support"
+ active_if { CYGSEM_HAL_ROM_MONITOR || CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT }
+ default_value 1
+ description "
+ This option enables some extra HAL code which is needed
+ to support multi-threaded source level debugging."
+
+ compile dbg-threads-syscall.c
+}
+
+cdl_option CYGNUM_HAL_DEBUG_GDB_PROTOCOL_RETRIES {
+ display "Number of times to retry sending a \$O packet"
+ default_value 0
+ flavor data
+ description "
+ This option controls the number of attempts that eCos programs
+ will make to send a \$O packet to a host GDB process. If it is
+ set non-zero, then the target process will attempt to resend the
+ \$O packet data up to this number of retries. Caution: use of
+ this option is not recommended as it can thoroughly confuse the
+ host GDB process."
+}
+
+cdl_option CYGNUM_HAL_DEBUG_GDB_PROTOCOL_TIMEOUT {
+ display "Timeout period for GDB packets"
+ default_value 500
+ flavor data
+ description "
+ This option controls the time (in milliseconds) that eCos programs
+ will wait for a response when sending packets to a host GDB process.
+ If this time elapses, then the packet will be resent, up to some
+ maximum number of times (CYGNUM_HAL_DEBUG_GDB_PROTOCOL_RETRIES)."
+}
+
+cdl_option CYGDBG_HAL_CRCTABLE_LOCATION {
+ display "Location of CRC32 table"
+ flavor data
+ legal_values {"ROM" "RAM"}
+ default_value {"RAM"}
+ description "
+ The stubs use a 1 kilobyte CRC table that can either be pregenerated
+ and placed in ROM, or generated at runtime in RAM. Depending on
+ your memory constraints, one of these options may be better."
+}
+
+# EOF debugging.cdl
diff --git a/cesar/ecos/packages/hal/common/current/cdl/hal.cdl b/cesar/ecos/packages/hal/common/current/cdl/hal.cdl
new file mode 100644
index 0000000000..4932b02052
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/cdl/hal.cdl
@@ -0,0 +1,473 @@
+# ====================================================================
+#
+# hal.cdl
+#
+# HAL configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2002 Gary Thomas
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Original data: nickg,jskov,jlarmour
+# Contributors: dmoseley
+# Date: 1999-06-13
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_HAL {
+ display "eCos HAL"
+ include_dir cyg/hal
+ description "
+ The eCos HAL package provide a porting layer for
+ higher-level parts of the system such as the kernel and the
+ C library. Each installation should have HAL packages for
+ one or more architectures, and for each architecture there
+ may be one or more supported platforms. It is necessary to
+ select one target architecture and one platform for that
+ architecture. There are also a number of configuration
+ options that are common to all HAL packages."
+ doc ref/the-ecos-hardware-abstraction-layer.html
+
+ compile drv_api.c
+ compile -library=libextras.a dummy.c
+
+ requires CYGPKG_INFRA
+
+ make -priority 250 {
+ <PREFIX>/lib/extras.o: <PREFIX>/lib/libextras.a
+ $(CC) $(CFLAGS) -nostdlib -Wl,-r -Wl,--whole-archive -o $@ $<
+ }
+
+
+ cdl_component CYGPKG_HAL_COMMON {
+ display "Platform-independent HAL options"
+ flavor none
+ description "
+ A number of configuration options are common to most or all
+ HAL packages, for example options controlling how much state
+ should be saved during a context switch. The implementations
+ of these options will vary from architecture to architecture."
+
+ script common.cdl
+ }
+
+ cdl_component CYGPKG_HAL_COMMON_INTERRUPTS {
+ display "HAL interrupt handling"
+ flavor none
+ description "
+ A number of configuration options related to interrupt
+ handling are common to most or all HAL packages, even though
+ the implementations will vary from architecture to
+ architecture."
+
+ script interrupts.cdl
+ }
+
+ cdl_component CYGPKG_HAL_COMMON_CONTEXT {
+ display "HAL context switch support"
+ flavor none
+ description "
+ A number of configuration options related to thread contexts
+ are common to most or all HAL packages, even though the
+ implementations will vary from architecture to architecture."
+
+ cdl_option CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM {
+ display "Use minimum thread context"
+ parent CYGPKG_HAL_COMMON_CONTEXT
+ default_value 1
+ description "
+ The thread context switch code can exploit the calling
+ conventions defined for a given architecture to reduce the
+ amount of state that has to be saved during a context
+ switch. Generally this improves performance and reduces
+ code size. However it can make source-level debugging more
+ difficult."
+ }
+ }
+
+ cdl_component CYGPKG_HAL_CACHE_CONTROL {
+ display "Explicit control over cache behaviour"
+ flavor none
+ no_define
+ description "
+ These options let the default behaviour of the caches
+ be easily configurable."
+
+ cdl_component CYGSEM_HAL_ENABLE_DCACHE_ON_STARTUP {
+ display "Enable DATA cache on startup"
+ default_value 1
+ description "
+ Enabling this option will cause the data cache to be enabled
+ as soon as practicable when eCos starts up. One would choose
+ to disable this if the data cache cannot safely be turned on,
+ such as a case where the cache(s) require additional platform
+ specific setup."
+ cdl_option CYGSEM_HAL_DCACHE_STARTUP_MODE {
+ display "DATA cache mode on startup"
+ flavor data
+ legal_values { "COPYBACK" "WRITETHRU" }
+ default_value { "COPYBACK" }
+ description "
+ This option controls the mode the cache will be set to
+ when enabled on startup."
+ }
+ }
+
+ cdl_option CYGSEM_HAL_ENABLE_ICACHE_ON_STARTUP {
+ display "Enable INSTRUCTION cache on startup"
+ default_value 1
+ description "
+ Enabling this option will cause the instruction cache to be enabled
+ as soon as practicable when eCos starts up. One would choose
+ to disable this if the instruction cache cannot safely be turned on,
+ such as a case where the cache(s) require additional platform
+ specific setup."
+ }
+ }
+
+ cdl_component CYGPKG_HAL_DEBUG {
+ display "Source-level debugging support"
+ flavor none
+ description "
+ If the source level debugger gdb is to be used for debugging
+ application code then it may be necessary to configure in support
+ for this in the HAL."
+
+ script debugging.cdl
+ }
+
+ cdl_component CYGPKG_HAL_ROM_MONITOR {
+ display "ROM monitor support"
+ flavor none
+ no_define
+ description "
+ Support for ROM monitors can be built in to your application.
+ It may also be relevant to build your application as a ROM monitor
+ itself. Such options are contained here if relevant for your chosen
+ platform. The options and ROM monitors available to choose are
+ platform-dependent."
+
+
+
+ cdl_interface CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT {
+ display "Target has virtual vector support"
+ no_define
+ }
+
+
+ cdl_interface CYGINT_HAL_VIRTUAL_VECTOR_COMM_BAUD_SUPPORT {
+ display "Target supports baud rate control via vectors"
+ no_define
+ description "
+ Whether this target supports the __COMMCTL_GETBAUD
+ and __COMMCTL_SETBAUD virtual vector comm control operations."
+ }
+
+ cdl_component CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT {
+ display "Enable use of virtual vector calling interface"
+ active_if CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
+ calculated 1
+ description "
+ Virtual vector support allows the HAL to let the ROM
+ monitor handle certain operations. The virtual vector table
+ defines a calling interface between applications running in
+ RAM and the ROM monitor."
+ compile hal_if.c hal_misc.c
+
+
+ cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_INHERIT_CONSOLE {
+ display "Inherit console settings from ROM monitor"
+ active_if CYGSEM_HAL_USE_ROM_MONITOR
+ default_value { !CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS }
+ description "
+ When this option is set, the application will inherit
+ the console as set up by the ROM monitor. This means
+ that the application will use whatever channel and
+ mangling style was used by the ROM monitor when
+ the application was launched."
+ }
+
+ cdl_option CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE {
+ display "Debug channel is configurable"
+ calculated { CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS }
+ description "
+ This option is a configuration hint - it is enabled
+ when the HAL initialization code will make use
+ of the debug channel configuration option."
+ }
+
+ cdl_option CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE {
+ display "Console channel is configurable"
+ calculated { !CYGSEM_HAL_VIRTUAL_VECTOR_INHERIT_CONSOLE \
+ && !CYGDBG_HAL_DIAG_TO_DEBUG_CHAN }
+ description "
+ This option is a configuration hint - it is enabled
+ when the HAL initialization code will make use
+ of the console channel configuration option."
+ }
+
+
+ cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE {
+ display "Initialize whole of virtual vector table"
+ default_value { CYG_HAL_STARTUP != "RAM" || !CYGSEM_HAL_USE_ROM_MONITOR }
+ requires CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_RESET
+ requires CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DELAY_US
+ requires CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_CACHE
+ requires CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DATA
+ requires CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS
+ description "
+ This option will cause the whole of the virtual
+ vector table to be initialized with dummy values on
+ startup. When this option is enabled, all the
+ options below must also be enabled - or the
+ table would be empty when the application
+ launches.
+
+ On targets where older ROM monitors without
+ virtual vector support may still be in use, it is
+ necessary for RAM applictions to initialize the
+ table (since all HAL diagnostics and debug IO
+ happens via the table)."
+ }
+
+ cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DEFAULT {
+ display "Claim virtual vector table entries by default"
+ active_if !CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE
+ default_value 1
+ description "
+ By default most virtual vectors will be claimed by
+ RAM startup configurations, meaning that the RAM
+ application will provide the services. The
+ exception is COMMS support (HAL
+ diagnostics/debugging IO) which is left in the
+ control of the ROM monitor.
+
+ The reasoning behind this is to get as much of the
+ code exercised during regular development so it
+ is known to be working the few times a new ROM
+ monitor or a ROM production configuration is used
+ - COMMS are excluded only by necessity in order to
+ avoid breaking an existing debugger connections
+ (there may be ways around this).
+
+ For production RAM configurations this option can
+ be switched off, causing the appliction to rely on
+ the ROM monitor for these services, thus
+ saving some space.
+
+ Individual vectors may also be left unclaimed,
+ controlled by the below options (meaning that the
+ associated service provided by the ROM monitor
+ will be used)."
+ }
+
+ cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_RESET {
+ display "Claim reset virtual vectors"
+ default_value { CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE \
+ || CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DEFAULT }
+ description "
+ This option will cause the reset and kill_by_reset
+ virtual vectors to be claimed."
+ }
+
+ cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_VERSION {
+ display "Claim version virtual vectors"
+ default_value { CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE }
+ description "
+ This option will cause the version
+ virtual vectors to be claimed."
+ }
+
+ cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DELAY_US {
+ display "Claim delay_us virtual vector"
+ default_value { CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE \
+ || CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DEFAULT }
+ description "
+ This option will cause the delay_us
+ virtual vector to be claimed."
+ }
+
+ cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_CACHE {
+ display "Claim cache virtual vectors"
+ default_value { CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE \
+ || CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DEFAULT }
+ description "
+ This option will cause the cache virtual vectors
+ to be claimed."
+ }
+
+ cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DATA {
+ display "Claim data virtual vectors"
+ default_value { CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE \
+ || CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DEFAULT }
+ description "
+ This option will cause the data virtual vectors
+ to be claimed. At present there is only one, used
+ by the RedBoot ethernet driver to share diag output."
+ }
+
+ cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS {
+ display "Claim comms virtual vectors"
+ default_value { CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE \
+ || CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS }
+ description "
+ This option will cause the communication tables
+ that are part of the virtual vectors mechanism to
+ be claimed. Note that doing this may cause an
+ existing ROM monitor communication connection to
+ be closed. For this reason, the option is disabled
+ per default for normal application
+ configurations."
+ }
+
+ cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_DIAG {
+ display "Do diagnostic IO via virtual vector table"
+ calculated 1
+ description "
+ All HAL IO happens via the virtual vector table / comm
+ tables when those tables are supported by the HAL.
+
+ If so desired, the low-level IO functions can
+ still be provided by the RAM application by
+ enabling the CLAIM_COMMS option."
+ }
+ }
+
+ cdl_option CYGBLD_BUILD_COMMON_GDB_STUBS {
+ display "Build common GDB stub ROM image"
+ default_value 0
+ parent CYGBLD_GLOBAL_OPTIONS
+ requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+ no_define
+ description "
+ Unless a target board has specific requirements to the
+ stub implementation, it can use a simple common stub.
+ This option, which gets enabled by platform HALs as
+ appropriate, controls the building of the common stub."
+
+ make -priority 315 {
+ <PREFIX>/bin/gdb_module.img : <PACKAGE>/src/stubrom/stubrom.c <PREFIX>/lib/extras.o <PREFIX>/lib/libtarget.a <PREFIX>/lib/target.ld <PREFIX>/lib/vectors.o
+ @sh -c "mkdir -p src/stubrom $(dir $@)"
+ $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o src/stubrom/gdb_module.o $<
+ @echo $@ ": \\" > $(notdir $@).deps
+ @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
+ @tail -n +2 deps.tmp >> $(notdir $@).deps
+ @echo >> $(notdir $@).deps
+ @rm deps.tmp
+ $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ src/stubrom/gdb_module.o
+ }
+ }
+
+
+ }
+
+ # Does platform need special I/O initializations?
+ cdl_interface CYGINT_HAL_PLF_IF_INIT {
+ display "Platform defined I/O channels."
+ description "
+ Platforms which provide additional I/O channels can implement
+ this interface, indicating that the function plf_if_init()
+ needs to be called."
+ }
+
+ # Does platform provide IDE I/O macros?
+ cdl_interface CYGINT_HAL_PLF_IF_IDE {
+ display "Platform IDE I/O support."
+ description "
+ Platforms which provide IDE controllers can implement
+ this interface, indicating that IDE I/O macros are
+ available."
+ }
+ cdl_option CYGPKG_HAL_GDB_FILEIO {
+ display "File I/O operations via GDB"
+ default_value 0
+ active_if CYGSEM_REDBOOT_BSP_SYSCALLS
+ requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+ compile gdb-fileio.c
+ description "This option enables support for various file I/O
+ operations using the GDB remote protocol to communicate
+ with GDB. The operations are then performed on the
+ debugging host by proxy. These operations are only
+ currently available by using a system call interface
+ to RedBoot. This may change in the future."
+ }
+
+ define_proc {
+ puts $::cdl_header "/***** proc output start *****/"
+ puts $::cdl_header "#include <pkgconf/system.h>"
+
+ puts $::cdl_header "#include CYGBLD_HAL_TARGET_H"
+ puts $::cdl_header "#ifdef CYGBLD_HAL_VARIANT_H"
+ puts $::cdl_header "#include CYGBLD_HAL_VARIANT_H"
+ puts $::cdl_header "#endif"
+ puts $::cdl_header "#include CYGBLD_HAL_PLATFORM_H"
+
+ puts $::cdl_header "/****** proc output end ******/"
+
+ }
+
+ cdl_option CYGPKG_HAL_BUILD_COMPILER_TESTS {
+ display "Build Compiler sanity checking tests"
+ description "
+ Enabling this option causes compiler tests to be built."
+ }
+
+ cdl_component CYGPKG_HAL_TESTS {
+ display "Common HAL tests"
+ flavor data
+ no_define
+ calculated { "tests/context tests/basic"
+ . ((!CYGINT_HAL_TESTS_NO_CACHES) ? " tests/cache" : "")
+ . ((CYGPKG_HAL_BUILD_COMPILER_TESTS) ? " tests/cpp1 tests/vaargs" : "")
+ . ((!CYGVAR_KERNEL_COUNTERS_CLOCK) ? " tests/intr" : "") }
+ description "
+ This option specifies the set of tests for the common HAL."
+
+
+ cdl_interface CYGINT_HAL_TESTS_NO_CACHES {
+ display "Interface for cache presence"
+ flavor booldata
+ description "
+ Some architectures and/or platforms do not have caches. By
+ implementing this interface, these can disable the various
+ cache-related tests."
+ }
+
+ }
+}
diff --git a/cesar/ecos/packages/hal/common/current/cdl/interrupts.cdl b/cesar/ecos/packages/hal/common/current/cdl/interrupts.cdl
new file mode 100644
index 0000000000..4e5feeeb1e
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/cdl/interrupts.cdl
@@ -0,0 +1,143 @@
+# ====================================================================
+#
+# interrupts.cdl
+#
+# HAL interrupt configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: nickg,jskov,jlarmour
+# Contributors:
+# Date: 1999-07-02
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_option CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK {
+ display "Use separate stack for interrupts"
+ default_value 1
+ description "
+ When an interrupt occurs this interrupt can be handled either
+ on the current stack or on a separate stack maintained by the
+ HAL. Using a separate stack requires a small number of extra
+ instructions in the interrupt handling code, but it has the
+ advantage that it is no longer necessary to allow extra space
+ in every thread stack for the interrupt handlers. The amount
+ of extra space required depends on the interrupt handlers
+ that are being used."
+}
+
+# NOTE: various parts of the system such as device drivers should
+# impose lower bounds on this. The actual lower bound depends on a
+# platform-specific value for startup overheads, and the minimum
+# sizes specified by the various device drivers. If interrupts are
+# not handled on a separate stack then only the startup overheads
+# are significant. If nested interrupts are disabled then the
+# lower bound is the maximum of the individual sizes, otherwise
+# it is the sum of these sizes. It is not currently possible to
+# express a relationship like this.
+cdl_option CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE {
+ display "Interrupt stack size"
+ flavor data
+ default_value { CYGPKG_KERNEL ? 4096 : 32768 }
+ legal_values 128 to 1048576
+ description "
+ This configuration option specifies the stack size in bytes
+ for the interrupt stack. Typically this should be a multiple
+ of 16, but the exact requirements will vary from architecture
+ to architecture. The interrupt stack serves two separate
+ purposes. It is used as the stack during system
+ initialization. In addition, if the interrupt system is
+ configured to use a separate stack then all interrupts will
+ be processed on this stack. The exact memory requirements
+ will vary from application to application, and will depend
+ heavily on whether or not other interrupt-related options,
+ for example nested interrupts, are enabled. On most targets,
+ in a configuration with no kernel this stack will also be
+ the stack used to invoke the application, and must obviously
+ be appropriately large in that case."
+}
+
+cdl_option CYGSEM_HAL_COMMON_INTERRUPTS_ALLOW_NESTING {
+ display "Allow nested interrupts"
+ default_value 0
+ description "
+ When an interrupt occurs the HAL interrupt handling code can
+ either leave interrupts disabled for the duration of the
+ interrupt handling code, or by doing some extra work it can
+ reenable interrupts before invoking the interrupt handler and
+ thus allow nested interrupts to happen. If all the interrupt
+ handlers being used are small and do not involve any loops
+ then it is usually better to disallow nested interrupts.
+ However if any of the interrupt handlers are more complicated
+ than nested interrupts will usually be required."
+}
+
+cdl_option CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT {
+ display "Save minimum context on interrupt"
+ default_value 1
+ description "
+ The HAL interrupt handling code can exploit the calling conventions
+ defined for a given architecture to reduce the amount of state
+ that has to be saved. Generally this improves performance and
+ reduces code size. However it can make source-level debugging
+ more difficult."
+}
+
+cdl_option CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN {
+ display "Chain all interrupts together"
+ default_value 0
+ description "
+ Interrupts can be attached to vectors either singly, or be
+ chained together. The latter is necessary if there is no way
+ of discovering which device has interrupted without
+ inspecting the device itself. It can also reduce the amount
+ of RAM needed for interrupt decoding tables and code."
+}
+
+cdl_option CYGIMP_HAL_COMMON_INTERRUPTS_IGNORE_SPURIOUS {
+ display "Ignore spurious \[fleeting\] interrupts"
+ default_value 0
+ description "
+ On some hardware, interrupt sources may not be de-bounced or
+ de-glitched. Rather than try to handle these interrupts (no
+ handling may be possible), this option allows the HAL to simply
+ ignore them. In most cases, if the interrupt is real it will
+ reoccur in a detectable form."
+}
diff --git a/cesar/ecos/packages/hal/common/current/doc/hal.sgml b/cesar/ecos/packages/hal/common/current/doc/hal.sgml
new file mode 100644
index 0000000000..9ada0d0be5
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/doc/hal.sgml
@@ -0,0 +1,3161 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- HAL.sgml -->
+<!-- -->
+<!-- eCos common HAL documentation -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part id="the-ecos-hardware-abstraction-layer">
+<title>The eCos Hardware Abstraction Layer (HAL)</title>
+
+<!-- {{{ Intro -->
+
+<chapter id=hal-introduction>
+<title>Introduction</title>
+<PARA>
+This is an initial specification of the <EMPHASIS>eCos</EMPHASIS> <!--
+<index></index> -->Hardware Abstraction Layer (HAL). The HAL abstracts
+the underlying hardware of a processor architecture and/or the
+platform to a level sufficient for the eCos kernel to be ported onto
+that platform.
+</PARA>
+
+<note>
+<title>Caveat</title>
+<PARA>
+This document is an informal description of the HAL capabilities and
+is not intended to be full documentation, although it may be used as a
+source for such. It also describes the HAL as it is currently
+implemented for the architectures targeted in this release. It most
+closely describes the HALs for the MIPS, I386 and PowerPC HALs. Other
+architectures are similar but may not be organized precisely as
+described here.
+</PARA>
+</note>
+
+</chapter>
+
+<!-- }}} -->
+<!-- {{{ Architecture, Variant and Platform -->
+
+<CHAPTER id="hal-architecture-variant-and-platform">
+<TITLE>Architecture, Variant and Platform</TITLE>
+
+<para>
+We have identified three levels at which the HAL must operate.
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ The <!-- <index></index> --><firstterm>architecture
+ HAL</firstterm> abstracts the basic CPU architecture and includes
+ things like interrupt delivery, context switching, CPU startup
+ etc.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ The <!-- <index></index> --> <firstterm>variant HAL</firstterm>
+ encapsulates features of the CPU variant such as caches, MMU and
+ FPU features. It also deals with any on-chip peripherals such as
+ memory and interrupt controllers. For architectural variations,
+ the actual implementation of the variation is often in the
+ architectural HAL, and the variant HAL simply provides the correct
+ configuration definitions.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ The <!-- <index></index> --><firstterm>platform HAL</firstterm>
+ abstracts the properties of the current platform and includes
+ things like platform startup, timer devices, I/O register access
+ and interrupt controllers.
+ </para>
+ </listitem>
+
+</itemizedlist>
+
+<para>
+The boundaries between these three HAL levels are necessarily blurred
+since functionality shifts between levels on a target-by-target basis.
+For example caches and MMU may be either an architecture feature or a
+variant feature. Similarly, memory and interrupt controllers may be
+on-chip and in the variant HAL, or off-chip and in the platform HAL.
+</para>
+<para>
+Generally there is a separate package for each of the architecture,
+variant and package HALs for a target. For some of the older targets,
+or where it would be essentially empty, the variant HAL is omitted.
+</para>
+</CHAPTER>
+
+<!-- }}} -->
+<!-- {{{ General Principles -->
+
+<CHAPTER id="hal-general-principles">
+<TITLE>General principles</TITLE>
+
+<PARA>
+The HAL has been implemented according to the following general
+principles:
+</PARA>
+<ORDEREDLIST>
+<LISTITEM>
+<PARA> The HAL is implemented in C and assembler, although the
+ eCos kernel is largely implemented in C&plus;&plus;.
+ This is to permit the HAL the widest possible
+ applicability.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>All interfaces to the HAL are implemented by
+ CPP macros. This allows them to be implemented as inline
+ C code, inline assembler or function calls to external C
+ or assembler code. This allows the most efficient
+ implementation to be selected without affecting the
+ interface. It also allows them to be redefined if the
+ platform or variant HAL needs to replace or enhance a definition
+ from the architecture HAL.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>The HAL provides simple, portable mechanisms for dealing
+with the hardware of a wide range of architectures and platforms.
+It is always possible to bypass the HAL and program the hardware
+directly, but this may lead to a loss of portability. </PARA>
+</LISTITEM>
+</ORDEREDLIST>
+</CHAPTER>
+
+<!-- }}} -->
+<!-- {{{ HAL Interfaces -->
+
+<CHAPTER id="hal-interfaces">
+<TITLE><!-- <index></index> --><!-- <xref> -->HAL Interfaces</TITLE>
+
+<para>
+This section describes the main HAL interfaces.
+</para>
+
+<!-- {{{ Base Definitions -->
+
+<SECTION id="hal-base-definitions">
+<TITLE>Base Definitions</TITLE>
+
+<para>
+These are definitions that characterize the properties of the base
+architecture that are used to compile the portable parts of the
+kernel. They are concerned with such things a portable type
+definitions, endianness, and labeling.
+</para>
+
+<PARA>
+These definitions are supplied by the
+<filename>cyg/hal/basetype.h</filename> header file which is supplied
+by the architecture HAL. It is included automatically by
+<FILENAME>cyg/infra/cyg_type.h</FILENAME>.
+</PARA>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Byte order</TITLE>
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM><VARNAME>CYG_BYTEORDER</VARNAME></TERM>
+ <LISTITEM>
+ <PARA>
+ This defines the byte order of the target and must be set to either
+ <varname>CYG_LSBFIRST</varname> or <varname>CYG_MSBFIRST</varname>.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+</SECTION>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Label Translation</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM><FUNCTION>CYG_LABEL_NAME(name)</FUNCTION></TERM>
+ <LISTITEM>
+
+ <PARA>
+ This is a wrapper used in some C and C&plus;&plus; files which
+ use labels defined in assembly code or the linker script.
+ It need only be defined if the default implementation in
+ <filename>cyg/infra/cyg_type.h</filename>, which passes the name
+ argument unaltered, is inadequate. It should be paired with
+ <function>CYG_LABEL_DEFN()</function>.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM><FUNCTION>CYG_LABEL_DEFN(name)</FUNCTION></TERM>
+ <LISTITEM>
+
+ <PARA>
+ This is a wrapper used in assembler sources and linker scripts
+ which define labels. It need only be defined if the default
+ implementation in
+ <filename>cyg/infra/cyg_type.h</filename>, which passes the name
+ argument unaltered, is inadequate. The most usual alternative
+ definition of this macro prepends an underscore to the label
+ name.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+</SECTION>
+
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Base types</TITLE>
+<PROGRAMLISTING>
+ cyg_halint8
+ cyg_halint16
+ cyg_halint32
+ cyg_halint64
+ cyg_halcount8
+ cyg_halcount16
+ cyg_halcount32
+ cyg_halcount64
+ cyg_halbool
+</PROGRAMLISTING>
+<PARA>
+These macros define the C base types that should be used to define
+variables of the given size. They only need to be defined if the
+default types specified in <filename>cyg/infra/cyg_type.h</filename>
+cannot be used. Note that these are only the base types, they will be
+composed with <literal>signed</literal> and
+<literal>unsigned</literal> to form full type specifications.
+</PARA>
+</SECTION>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Atomic types</TITLE>
+<PROGRAMLISTING>
+ cyg_halatomic CYG_ATOMIC
+</PROGRAMLISTING>
+<PARA>
+These types are guaranteed to be read or written in a single
+uninterruptible operation. It is architecture defined what size this
+type is, but it will be at least a byte.
+</PARA>
+</SECTION>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ Architecture Characterization -->
+
+<SECTION id="hal-architecture-characterization">
+<TITLE>Architecture Characterization</TITLE>
+
+<para>
+These are definition that are related to the basic architecture of the
+CPU. These include the CPU context save format, context switching, bit
+twiddling, breakpoints, stack sizes and address translation.
+</para>
+
+<PARA>
+Most of these definition are found in
+<filename>cyg/hal/hal_arch.h</filename>. This file is supplied by the
+architecture HAL. If there are variant or platform specific
+definitions then these will be found in
+<filename>cyg/hal/var_arch.h</filename> or
+<filename>cyg/hal/plf_arch.h</filename>. These files are include
+automatically by this header, so need not be included explicitly.
+</PARA>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Register Save Format</TITLE>
+<PROGRAMLISTING>
+typedef struct HAL_SavedRegisters
+{
+ /* architecture-dependent list of registers to be saved */
+} HAL_SavedRegisters;
+</PROGRAMLISTING>
+<PARA>
+This structure describes the layout of a saved machine state on the
+stack. Such states are saved during thread context switches,
+interrupts and exceptions. Different quantities of state may be saved
+during each of these, but usually a thread context state is a subset
+of the interrupt state which is itself a subset of an exception state.
+For debugging purposes, the same structure is used for all three
+purposes, but where these states are significantly different, this
+structure may contain a union of the three states.
+</PARA>
+</SECTION>
+
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Thread Context Initialization</TITLE>
+
+<PROGRAMLISTING>
+HAL_THREAD_INIT_CONTEXT( sp, arg, entry, id )
+</PROGRAMLISTING>
+
+<PARA>
+This macro initializes a thread's context so that
+it may be switched to by <FUNCTION>HAL_THREAD_SWITCH_CONTEXT()</FUNCTION>.
+The arguments are:
+</PARA>
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>sp</TERM>
+ <LISTITEM>
+ <PARA>
+ A location containing the current value of the thread's stack
+ pointer. This should be a variable or a structure field. The SP
+ value will be read out of here and an adjusted value written
+ back.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>arg</TERM>
+ <LISTITEM>
+ <PARA>
+ A value that is passed as the first argument to the entry
+ point function.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>entry</TERM>
+ <LISTITEM>
+ <PARA>
+ The address of an entry point function. This will be called
+ according the C calling conventions, and the value of
+ <parameter>arg</parameter> will be passed as the first
+ argument. This function should have the following type signature
+ <function>void entry(CYG_ADDRWORD arg)</function>.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>id</TERM>
+ <LISTITEM>
+ <PARA>
+ A thread id value. This is only used for debugging purposes,
+ it is ORed into the initialization pattern for unused registers
+ and may be used to help identify the thread from its register dump.
+ The least significant 16 bits of this value should be zero to allow
+ space for a register identifier.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+</SECTION>
+
+<!-- =================================================================== -->
+
+<SECTION id="hal-context-switch">
+<TITLE>Thread Context Switching</TITLE>
+
+<PROGRAMLISTING>
+HAL_THREAD_LOAD_CONTEXT( to )
+HAL_THREAD_SWITCH_CONTEXT( from, to )
+</PROGRAMLISTING>
+<PARA>
+These macros implement the thread switch code. The arguments are:
+</PARA>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>from</TERM>
+ <LISTITEM>
+ <PARA>
+ A pointer to a location where the stack pointer of the current
+ thread will be stored.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>to</TERM>
+ <LISTITEM>
+ <PARA>
+ A pointer to a location from where the stack pointer of the next
+ thread will be read.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+<para>
+For <function>HAL_THREAD_LOAD_CONTEXT()</function> the current CPU
+state is discarded and the state of the destination thread is
+loaded. This is only used once, to load the first thread when the
+scheduler is started.
+</para>
+
+<PARA>
+For <function>HAL_THREAD_SWITCH_CONTEXT()</function> the state of the
+current thread is saved onto its stack, using the current value of the
+stack pointer, and the address of the saved state placed in
+<parameter>*from</parameter>. The value in
+<parameter>*to</parameter> is then read and the state of the new
+thread is loaded from it.
+</PARA>
+
+<para>
+While these two operations may be implemented with inline assembler,
+they are normally implemented as calls to assembly code functions in
+the HAL. There are two advantages to doing it this way. First, the
+return link of the call provides a convenient PC value to be used in
+the saved context. Second, the calling conventions mean that the
+compiler will have already saved the caller-saved registers before the
+call, so the HAL need only save the callee-saved registers.
+</para>
+
+<para>
+The implementation of <function>HAL_THREAD_SWITCH_CONTEXT()</function>
+saves the current CPU state on the stack, including the current
+interrupt state (or at least the register that contains it). For
+debugging purposes it is useful to save the entire register set, but
+for performance only the ABI-defined callee-saved registers need be
+saved. If it is implemented, the option
+<literal>CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM</literal> controls
+how many registers are saved.
+</para>
+
+<para>
+The implementation of <function>HAL_THREAD_LOAD_CONTEXT()</function>
+loads a thread context, destroying the current context. With a little
+care this can be implemented by sharing code with
+<function>HAL_THREAD_SWITCH_CONTEXT()</function>. To load a thread
+context simply requires the saved registers to be restored from the
+stack and a jump or return made back to the saved PC.
+</para>
+
+<PARA>
+Note that interrupts are not disabled during this process, any
+interrupts that occur will be delivered onto the stack to which the
+current CPU stack pointer points. Hence the stack pointer
+should never be invalid, or loaded with a value that might cause the
+saved state to become corrupted by an interrupt. However, the current
+interrupt state is saved and restored as part of the thread
+context. If a thread disables interrupts and does something to cause a
+context switch, interrupts may be re-enabled on switching to another
+thread. Interrupts will be disabled again when the original thread
+regains control.
+</PARA>
+
+</SECTION>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Bit indexing</TITLE>
+
+<PROGRAMLISTING>
+HAL_LSBIT_INDEX( index, mask )
+HAL_MSBIT_INDEX( index, mask )
+</PROGRAMLISTING>
+
+<PARA>
+These macros place in <parameter>index</parameter> the bit index of
+the least significant bit in <parameter>mask</parameter>. Some
+architectures have instruction level support for one or other of these
+operations. If no architectural support is available, then these
+macros may call C functions to do the job.
+</PARA>
+</SECTION>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Idle thread activity</TITLE>
+
+<PROGRAMLISTING>
+HAL_IDLE_THREAD_ACTION( count )
+</PROGRAMLISTING>
+
+<PARA>
+It may be necessary under some circumstances for the HAL to execute
+code in the kernel idle thread's loop. An example might be to execute
+a processor halt instruction. This macro provides a portable way of
+doing this. The argument is a copy of the idle thread's loop counter,
+and may be used to trigger actions at longer intervals than every
+loop.
+</PARA>
+</SECTION>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Reorder barrier</TITLE>
+
+<PROGRAMLISTING>
+HAL_REORDER_BARRIER()
+</PROGRAMLISTING>
+
+<PARA>
+When optimizing the compiler can reorder code. In some parts of
+multi-threaded systems, where the order of actions is vital, this can
+sometimes cause problems. This macro may be inserted into places where
+reordering should not happen and prevents code being migrated across
+it by the compiler optimizer. It should be placed between statements
+that must be executed in the order written in the code.
+</PARA>
+</SECTION>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Breakpoint support</TITLE>
+
+<PROGRAMLISTING>
+HAL_BREAKPOINT( label )
+HAL_BREAKINST
+HAL_BREAKINST_SIZE
+</PROGRAMLISTING>
+
+<PARA>
+These macros provide support for breakpoints.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_BREAKPOINT()</FUNCTION> executes a breakpoint
+instruction. The label is defined at the breakpoint instruction so
+that exception code can detect which breakpoint was executed.
+</PARA>
+
+<PARA>
+<literal>HAL_BREAKINST</literal> contains the breakpoint instruction
+code as an integer value. <literal>HAL_BREAKINST_SIZE</literal> is
+the size of that breakpoint instruction in bytes. Together these
+may be used to place a breakpoint in any code.
+</PARA>
+</SECTION>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>GDB support</TITLE>
+
+<PROGRAMLISTING>
+HAL_THREAD_GET_SAVED_REGISTERS( sp, regs )
+HAL_GET_GDB_REGISTERS( regval, regs )
+HAL_SET_GDB_REGISTERS( regs, regval )
+</PROGRAMLISTING>
+
+<PARA>
+These macros provide support for interfacing GDB to the HAL.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_THREAD_GET_SAVED_REGISTERS()</FUNCTION> extracts a
+pointer to a <STRUCTNAME>HAL_SavedRegisters</STRUCTNAME> structure
+from a stack pointer value. The stack pointer passed in should be the
+value saved by the thread context macros. The macro will assign a
+pointer to the <STRUCTNAME>HAL_SavedRegisters</STRUCTNAME> structure
+to the variable passed as the second argument.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_GET_GDB_REGISTERS()</FUNCTION> translates a register
+state as saved by the HAL and into a register dump in the format
+expected by GDB. It takes a pointer to a
+<STRUCTNAME>HAL_SavedRegisters</STRUCTNAME> structure in the
+<parameter>regs</parameter> argument and a pointer to the memory to
+contain the GDB register dump in the <parameter>regval</parameter>
+argument.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_SET_GDB_REGISTERS()</FUNCTION> translates a GDB format
+register dump into a the format expected by the HAL. It takes a
+pointer to the memory containing the GDB register dump in the
+<parameter>regval</parameter> argument and a pointer to a
+<STRUCTNAME>HAL_SavedRegisters</STRUCTNAME> structure
+in the <parameter>regs</parameter> argument.
+</PARA>
+</SECTION>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Setjmp and longjmp support</TITLE>
+
+<PROGRAMLISTING>
+CYGARC_JMP_BUF_SIZE
+hal_jmp_buf[CYGARC_JMP_BUF_SIZE]
+hal_setjmp( hal_jmp_buf env )
+hal_longjmp( hal_jmp_buf env, int val )
+</PROGRAMLISTING>
+
+<PARA>
+These functions provide support for the C
+<FUNCTION>setjmp()</FUNCTION> and <FUNCTION>longjmp()</FUNCTION>
+functions. Refer to the C library for further information.
+</PARA>
+
+</SECTION>
+
+<!-- =================================================================== -->
+
+<section>
+<title>Stack Sizes</title>
+<programlisting>
+CYGNUM_HAL_STACK_SIZE_MINIMUM
+CYGNUM_HAL_STACK_SIZE_TYPICAL
+</programlisting>
+
+<para>
+The values of these macros define the minimum and typical sizes of
+thread stacks.
+</para>
+
+<para>
+<literal>CYGNUM_HAL_STACK_SIZE_MINIMUM</literal> defines the minimum
+size of a thread stack. This is enough for the thread to function
+correctly within eCos and allows it to take interrupts and context
+switches. There should also be enough space for a simple thread entry
+function to execute and call basic kernel operations on objects like
+mutexes and semaphores. However there will not be enough room for much
+more than this. When creating stacks for their own threads,
+applications should determine the stack usage needed for application
+purposes and then add
+<literal>CYGNUM_HAL_STACK_SIZE_MINIMUM</literal>.
+</para>
+
+<para>
+<literal>CYGNUM_HAL_STACK_SIZE_TYPICAL</literal> is a reasonable increment over
+<literal>CYGNUM_HAL_STACK_SIZE_MINIMUM</literal>, usually about 1kB. This should be
+adequate for most modest thread needs. Only threads that need to
+define significant amounts of local data, or have very deep call trees
+should need to use a larger stack size.
+</para>
+
+</section>
+
+
+<!-- =================================================================== -->
+
+<section>
+<title>Address Translation</title>
+
+<programlisting>
+CYGARC_CACHED_ADDRESS(addr)
+CYGARC_UNCACHED_ADDRESS(addr)
+CYGARC_PHYSICAL_ADDRESS(addr)
+</programlisting>
+
+<para>
+These macros provide address translation between different views of
+memory. In many architectures a given memory location may be visible
+at different addresses in both cached and uncached forms. It is also
+possible that the MMU or some other address translation unit in the
+CPU presents memory to the program at a different virtual address to
+its physical address on the bus.
+</para>
+
+<para>
+<function>CYGARC_CACHED_ADDRESS()</function> translates the given
+address to its location in cached memory. This is typically where the
+application will access the memory.
+</para>
+
+<para>
+<function>CYGARC_UNCACHED_ADDRESS()</function> translates the given
+address to its location in uncached memory. This is typically where
+device drivers will access the memory to avoid cache problems. It may
+additionally be necessary for the cache to be flushed before the
+contents of this location is fully valid.
+</para>
+
+<para>
+<function>CYGARC_PHYSICAL_ADDRESS()</function> translates the given
+address to its location in the physical address space. This is
+typically the address that needs to be passed to device hardware such
+as a DMA engine, ethernet device or PCI bus bridge. The physical
+address may not be directly accessible to the program, it may be
+re-mapped by address translation.
+</para>
+
+</section>
+
+
+<!-- =================================================================== -->
+
+<section>
+<title>Global Pointer</title>
+
+<programlisting>
+CYGARC_HAL_SAVE_GP()
+CYGARC_HAL_RESTORE_GP()
+</programlisting>
+
+<para>
+These macros insert code to save and restore any global data pointer
+that the ABI uses. These are necessary when switching context between
+two eCos instances - for example between an eCos application and
+RedBoot.
+</para>
+
+</section>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ Interrupt Handling -->
+
+<SECTION id="hal-interrupt-handling">
+<TITLE>Interrupt Handling</TITLE>
+
+<para>
+These interfaces contain definitions related to interrupt
+handling. They include definitions of exception and interrupt numbers,
+interrupt enabling and masking.
+</para>
+
+<PARA>
+These definitions are normally found in
+<FILENAME>cyg/hal/hal_intr.h</FILENAME>. This file is supplied by the
+architecture HAL. Any variant or platform specific definitions will
+be found in <filename>cyg/hal/var_intr.h</filename>,
+<filename>cyg/hal/plf_intr.h</filename> or
+<filename>cyg/hal/hal_platform_ints.h</filename> in the variant or platform
+HAL, depending on the exact target. These files are include
+automatically by this header, so need not be included explicitly.
+</PARA>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Vector numbers</TITLE>
+
+<PROGRAMLISTING>
+CYGNUM_HAL_VECTOR_XXXX
+CYGNUM_HAL_VSR_MIN
+CYGNUM_HAL_VSR_MAX
+CYGNUM_HAL_VSR_COUNT
+
+CYGNUM_HAL_INTERRUPT_XXXX
+CYGNUM_HAL_ISR_MIN
+CYGNUM_HAL_ISR_MAX
+CYGNUM_HAL_ISR_COUNT
+
+CYGNUM_HAL_EXCEPTION_XXXX
+CYGNUM_HAL_EXCEPTION_MIN
+CYGNUM_HAL_EXCEPTION_MAX
+CYGNUM_HAL_EXCEPTION_COUNT
+</PROGRAMLISTING>
+
+<PARA>
+All possible VSR, interrupt and exception vectors are specified here,
+together with maximum and minimum values for range checking. While the
+VSR and exception numbers will be defined in this file, the interrupt
+numbers will normally be defined in the variant or platform HAL file
+that is included by this header.
+</PARA>
+
+<PARA>
+There are two ranges of numbers, those for the vector service
+routines and those for the interrupt service routines. The relationship
+between these two ranges is undefined, and no equivalence should
+be assumed if vectors from the two ranges coincide.
+</PARA>
+
+<PARA>
+The VSR vectors correspond to the set of exception vectors that can be
+delivered by the CPU architecture, many of these will be internal
+exception traps. The ISR vectors correspond to the set of external
+interrupts that can be delivered and are usually determined by extra
+decoding of the interrupt controller by the interrupt VSR.
+</PARA>
+
+<PARA>
+Where a CPU supports synchronous exceptions, the range of such
+exceptions allowed are defined by <literal>CYGNUM_HAL_EXCEPTION_MIN</literal> and
+<literal>CYGNUM_HAL_EXCEPTION_MAX</literal>. The
+<literal>CYGNUM_HAL_EXCEPTION_XXXX</literal> definitions are
+standard names used by target independent code to test for the
+presence of particular exceptions in the architecture. The actual
+exception numbers will normally correspond to the VSR exception
+range. In future other exceptions generated by the system software
+(such as stack overflow) may be added.
+</PARA>
+
+<PARA>
+<literal>CYGNUM_HAL_ISR_COUNT</literal>, <literal>CYGNUM_HAL_VSR_COUNT</literal> and
+<literal>CYGNUM_HAL_EXCEPTION_COUNT</literal> define the number of
+ISRs, VSRs and EXCEPTIONs respectively for the purposes of defining
+arrays etc. There might be a translation from the supplied vector
+numbers into array offsets. Hence
+<literal>CYGNUM_HAL_XXX_COUNT</literal> may not simply be
+<literal>CYGNUM_HAL_XXX_MAX</literal> - <literal>CYGNUM_HAL_XXX_MIN</literal> or <literal>CYGNUM_HAL_XXX_MAX</literal>&plus;1.
+</PARA>
+
+</SECTION>
+
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Interrupt state control</TITLE>
+
+<PROGRAMLISTING>
+CYG_INTERRUPT_STATE
+HAL_DISABLE_INTERRUPTS( old )
+HAL_RESTORE_INTERRUPTS( old )
+HAL_ENABLE_INTERRUPTS()
+HAL_QUERY_INTERRUPTS( state )
+</PROGRAMLISTING>
+
+<PARA>
+These macros provide control over the state of the CPUs interrupt mask
+mechanism. They should normally manipulate a CPU status register to
+enable and disable interrupt delivery. They should not access an
+interrupt controller.
+</PARA>
+
+
+<para>
+<literal>CYG_INTERRUPT_STATE</literal> is a data type that should be
+used to store the interrupt state returned by
+<function>HAL_DISABLE_INTERRUPTS()</function> and
+<function>HAL_QUERY_INTERRUPTS()</function> and passed to
+<function>HAL_RESTORE_INTERRUPTS()</function>.
+</para>
+
+<PARA>
+<FUNCTION>HAL_DISABLE_INTERRUPTS()</FUNCTION> disables the delivery of
+interrupts and stores the original state of the interrupt mask in the
+variable passed in the <parameter>old</parameter> argument.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_RESTORE_INTERRUPTS()</FUNCTION> restores the state of
+the interrupt mask to that recorded in <parameter>old</parameter>.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_ENABLE_INTERRUPTS()</FUNCTION> simply enables interrupts
+regardless of the current state of the mask.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_QUERY_INTERRUPTS()</FUNCTION> stores the state of the
+interrupt mask in the variable passed in the <parameter>
+state</parameter> argument. The state stored here should also be
+capable of being passed to
+<function>HAL_RESTORE_INTERRUPTS()</function> at a later point.
+</PARA>
+
+<PARA>
+It is at the HAL implementer&rsquo;s discretion exactly
+which interrupts are masked by this mechanism. Where a CPU has more
+than one interrupt type that may be masked separately (e.g. the
+ARM's IRQ and FIQ) only those that can raise DSRs need
+to be masked here. A separate architecture specific mechanism may
+then be used to control the other interrupt types.
+</PARA>
+
+</SECTION>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>ISR and VSR management</TITLE>
+
+<PROGRAMLISTING>
+HAL_INTERRUPT_IN_USE( vector, state )
+HAL_INTERRUPT_ATTACH( vector, isr, data, object )
+HAL_INTERRUPT_DETACH( vector, isr )
+HAL_VSR_SET( vector, vsr, poldvsr )
+HAL_VSR_GET( vector, pvsr )
+HAL_VSR_SET_TO_ECOS_HANDLER( vector, poldvsr )
+</PROGRAMLISTING>
+
+<PARA>
+These macros manage the attachment of interrupt and vector service
+routines to interrupt and exception vectors respectively.
+</PARA>
+
+<para>
+<function>HAL_INTERRUPT_IN_USE()</function> tests the state of the
+supplied interrupt vector and sets the value of the state parameter to
+either 1 or 0 depending on whether there is already an ISR attached to
+the vector. The HAL will only allow one ISR to be attached to each
+vector, so it is a good idea to use this function before using
+<function>HAL_INTERRUPT_ATTACH()</function>.
+</para>
+
+<PARA>
+<FUNCTION>HAL_INTERRUPT_ATTACH()</FUNCTION> attaches
+the ISR, data pointer and object pointer to the given
+<parameter>vector</parameter>. When an interrupt occurs on this
+vector the ISR is called using the C calling convention and the vector
+number and data pointer are passed to it as the first and second
+arguments respectively.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_INTERRUPT_DETACH()</FUNCTION> detaches the ISR from the
+vector.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_VSR_SET()</FUNCTION> replaces the VSR attached to the
+<parameter>vector</parameter> with the replacement supplied in
+<parameter>vsr</parameter>. The old VSR is returned in the location
+pointed to by <parameter>pvsr</parameter>.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_VSR_GET()</FUNCTION> assigns
+a copy of the VSR to the location pointed to by <parameter>pvsr</parameter>.
+</PARA>
+
+<para>
+<function>HAL_VSR_SET_TO_ECOS_HANDLER()</function> ensures that the
+VSR for a specific exception is pointing at the eCos exception VSR and
+not one for RedBoot or some other ROM monitor. The default when
+running under RedBoot is for exceptions to be handled by RedBoot and
+passed to GDB. This macro diverts the exception to eCos so that it may
+be handled by application code. The arguments are the VSR vector to be
+replaces, and a location in which to store the old VSR pointer, so
+that it may be replaced at a later point.
+</para>
+
+</SECTION>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Interrupt controller management</TITLE>
+
+<PROGRAMLISTING>
+HAL_INTERRUPT_MASK( vector )
+HAL_INTERRUPT_UNMASK( vector )
+HAL_INTERRUPT_ACKNOWLEDGE( vector )
+HAL_INTERRUPT_CONFIGURE( vector, level, up )
+HAL_INTERRUPT_SET_LEVEL( vector, level )
+</PROGRAMLISTING>
+
+<PARA>
+These macros exert control over any prioritized interrupt
+controller that is present. If no priority controller exists, then
+these macros should be empty.
+</para>
+
+<note>
+ <para>
+ These macros may not be reentrant, so care should be taken to
+ prevent them being called while interrupts are enabled. This means
+ that they can be safely used in initialization code before
+ interrupts are enabled, and in ISRs. In DSRs, ASRs and thread code,
+ however, interrupts must be disabled before these macros are
+ called. Here is an example for use in a DSR where the interrupt
+ source is unmasked after data processing:
+ </para>
+<PROGRAMLISTING>
+ ...
+ HAL_DISABLE_INTERRUPTS(old);
+ HAL_INTERRUPT_UNMASK(CYGNUM_HAL_INTERRUPT_ETH);
+ HAL_RESTORE_INTERRUPTS(old);
+ ...
+</PROGRAMLISTING>
+</note>
+
+<PARA>
+<FUNCTION>HAL_INTERRUPT_MASK()</FUNCTION> causes the interrupt
+associated with the given vector to be blocked.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_INTERRUPT_UNMASK()</FUNCTION> causes the interrupt
+associated with the given vector to be unblocked.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_INTERRUPT_ACKNOWLEDGE()</FUNCTION> acknowledges the
+current interrupt from the given vector. This is usually executed from
+the ISR for this vector when it is prepared to allow further
+interrupts. Most interrupt controllers need some form of acknowledge
+action before the next interrupt is allowed through. Executing this
+macro may cause another interrupt to be delivered. Whether this
+interrupts the current code depends on the state of the CPU interrupt
+mask.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_INTERRUPT_CONFIGURE()</FUNCTION> provides
+control over how an interrupt signal is detected. The arguments
+are:
+</PARA>
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>vector</TERM>
+ <LISTITEM>
+ <PARA>The interrupt vector to be configured.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>level</TERM>
+ <LISTITEM>
+ <PARA>
+ Set to <varname>true</varname> if the interrupt is detected by
+ level, and <varname>false</varname> if it is edge triggered.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>up</TERM>
+ <LISTITEM>
+ <PARA>
+ If the interrupt is set to level detect, then if this is
+ <VARNAME>true</VARNAME> it is detected by a high signal level,
+ and if <VARNAME>false</VARNAME> by a low signal level. If the
+ interrupt is set to edge triggered, then if this is
+ <VARNAME>true</VARNAME> it is triggered by a rising edge and if
+ <VARNAME>false</VARNAME> by a falling edge.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+<PARA>
+<FUNCTION>HAL_INTERRUPT_SET_LEVEL()</FUNCTION> provides control over
+the hardware priority of the interrupt. The arguments are:
+</PARA>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>vector</TERM>
+ <LISTITEM>
+ <PARA>The interrupt whose level is to be set.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>level</TERM>
+ <LISTITEM>
+ <PARA>
+ The priority level to which the interrupt is to set. In some
+ architectures the masking of an interrupt is achieved by
+ changing its priority level. Hence this function,
+ <FUNCTION>HAL_INTERRUPT_MASK()</FUNCTION> and
+ <FUNCTION>HAL_INTERRUPT_UNMASK()</FUNCTION> may interfere with
+ each other.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ Clocks and Timers -->
+
+<SECTION id="hal-clocks-and-timers">
+<TITLE>Clocks and Timers</TITLE>
+
+<para>
+These interfaces contain definitions related to clock and timer
+handling. They include interfaces to initialize and read a clock for
+generating regular interrupts, definitions for setting the frequency of
+the clock, and support for short timed delays.
+</para>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Clock Control</TITLE>
+
+<PROGRAMLISTING>
+HAL_CLOCK_INITIALIZE( period )
+HAL_CLOCK_RESET( vector, period )
+HAL_CLOCK_READ( pvalue )
+</PROGRAMLISTING>
+
+<PARA>
+These macros provide control over a clock or timer device that may be
+used by the kernel to provide time-out, delay and scheduling
+services. The clock is assumed to be implemented by some form of
+counter that is incremented or decremented by some external source and
+which raises an interrupt when it reaches a predetermined value.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_CLOCK_INITIALIZE()</FUNCTION> initializes the timer
+device to interrupt at the given period. The period is essentially the
+value used to initialize the timer counter and must be calculated from
+the timer frequency and the desired interrupt rate. The timer device
+should generate an interrupt every <varname>period</varname> cycles.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_CLOCK_RESET()</FUNCTION> re-initializes the timer to
+provoke the next interrupt. This macro is only really necessary when
+the timer device needs to be reset in some way after each interrupt.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_CLOCK_READ()</FUNCTION> reads the current value of the
+timer counter and puts the value in the location pointed to by
+<parameter>pvalue</parameter>. The value stored will always be the
+number of timer cycles since the last interrupt, and hence ranges
+between zero and the initial period value. If this is a count-down
+cyclic timer, some arithmetic may be necessary to generate this value.
+</PARA>
+
+</SECTION>
+
+<!-- =================================================================== -->
+
+<section>
+<title>Microsecond Delay</title>
+
+<programlisting width=72>
+HAL_DELAY_US(us)
+</programlisting>
+
+<para>
+This macro provides a busy loop delay for the given number of
+microseconds. It is intended mainly for controlling hardware that
+needs short delays between operations. Code which needs longer delays,
+of the order of milliseconds, should instead use higher-level
+functions such as <function>cyg_thread_delay</function>. The macro
+implementation should be thread-safe. It can also be used in ISRs or
+DSRs, although such usage is undesirable because of the impact on
+interrupt and dispatch latency.
+</para>
+
+<para>
+The macro should never delay for less than the specified amount of
+time. It may delay for somewhat longer, although since the macro uses
+a busy loop this is a waste of cpu cycles. Of course the code invoking
+<function>HAL_DELAY_US</function> may get interrupted or timesliced,
+in which case the delay may be much longer than intended. If this is
+unacceptable then the calling code must take preventative action
+such as disabling interrupts or locking the scheduler.
+</para>
+
+<para>
+There are three main ways of implementating the macro:
+</para>
+
+<orderedlist>
+ <listitem><para>
+a counting loop, typically written in inline assembler, using an outer
+loop for the microseconds and an inner loop that consumes
+approximately 1us. This implementation is automatically thread-safe
+and does not impose any dependencies on the rest of the system, for
+example it does not depend on the system clock having been started.
+However it assumes that the cpu clock speed is known at compile-time
+or can be easily determined at run-time.
+ </para></listitem>
+ <listitem><para>
+monitor one of the hardware clocks, usually the system clock. Usually
+this clock ticks at a rate independent of the cpu so calibration is
+easier. However the implementation relies on the system clock having
+been started, and assumes that no other code is manipulating the clock
+hardware. There can also be complications when the system clock wraps
+around.
+ </para></listitem>
+ <listitem><para>
+a combination of the previous two. The system clock is used during
+system initialization to determine the cpu clock speed, and the result
+is then used to calibrate a counting loop. This has the disadvantage
+of significantly increasing the system startup time, which may be
+unacceptable to some applications. There are also complications if the
+system startup code normally runs with the cache disabled because the
+instruction cache will greatly affect any calibration loop.
+ </para></listitem>
+</orderedlist>
+
+</section>
+
+<!-- =================================================================== -->
+
+<section>
+<title>Clock Frequency Definition</title>
+
+<programlisting width=72>
+CYGNUM_HAL_RTC_NUMERATOR
+CYGNUM_HAL_RTC_DENOMINATOR
+CYGNUM_HAL_RTC_PERIOD
+</programlisting>
+
+<para>
+These macros are defined in the CDL for each platform and supply the
+necessary parameters to specify the frequency at which the clock
+interrupts. These parameters are usually found in the CDL definitions
+for the target platform, or in some cases the CPU variant.
+</para>
+
+<para>
+<literal>CYGNUM_HAL_RTC_NUMERATOR</literal> and
+<literal>CYGNUM_HAL_RTC_DENOMINATOR</literal> specify the resolution
+of the clock interrupt. This resolution involves two separate values,
+the numerator and the denominator. The result of dividing the
+numerator by the denominator should correspond to the number of
+nanoseconds between clock interrupts. For example a numerator of
+1000000000 and a denominator of 100 means that there are 10000000
+nanoseconds (or 10 milliseconds) between clock interrupts. Expressing
+the resolution as a fraction minimizes clock drift even for
+frequencies that cannot be expressed as a simple integer. For example
+a frequency of 60Hz corresponds to a clock resolution of
+16666666.66... nanoseconds. This can be expressed accurately as
+1000000000 over 60.
+</para>
+
+<para>
+<literal>CYGNUM_HAL_RTC_PERIOD</literal> specifies the exact value
+used to initialize the clock hardware, it is the value passed as a
+parameter to <literal>HAL_CLOCK_INITIALIZE()</literal> and
+<literal>HAL_CLOCK_RESET()</literal>. The exact meaning of the value
+and the range of legal values therefore depends on the target
+hardware, and the hardware documentation should be consulted for
+further details.
+</para>
+
+<para>
+The default values for these macros in all HALs are calculated to give
+a clock interrupt frequency of 100Hz, or 10ms between interrupts. To
+change the clock frequency, the period needs to be changed, and the
+resolution needs to be adjusted accordingly. As an example consider
+the i386 PC target. The default values for these macros are:
+</para>
+
+<programlisting width=72>
+CYGNUM_HAL_RTC_NUMERATOR 1000000000
+CYGNUM_HAL_RTC_DENOMINATOR 100
+CYGNUM_HAL_RTC_PERIOD 11932
+</programlisting>
+
+<para>
+To change to, say, a 200Hz clock the period needs to be halved to
+5966, and to compensate the denominator needs to be doubled to 200. To
+change to a 1KHz interrupt rate change the period to 1193 and the
+denominator to 1000.
+</para>
+
+<para>
+Some HALs make this process a little easier by deriving the period
+arithmetically from the denominator. This calculation may also involve
+the CPU clock frequency and possibly other factors. For example in the
+ARM AT91 variant HAL the period is defined by the following
+expression:
+</para>
+
+<programlisting width=72>
+((CYGNUM_HAL_ARM_AT91_CLOCK_SPEED/32) / CYGNUM_HAL_RTC_DENOMINATOR)
+</programlisting>
+
+<para>
+In this case it is not necessary to change the period at all, just
+change the denominator to select the desired clock frequency. However,
+note that for certain choices of frequency, rounding errors in this
+calculation may result in a small clock drift over time. This is
+usually negligible, but if perfect accuracy is required, it may be
+necessary to adjust the frequency or period by hand.
+</para>
+
+</section>
+
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Input and Output -->
+
+<SECTION id="hal-input-and-output">
+<TITLE>HAL I/O</TITLE>
+
+<PARA>
+This section contains definitions for supporting access
+to device control registers in an architecture neutral
+fashion.
+</PARA>
+
+<para>
+These definitions are normally found in the header file
+<FILENAME>cyg/hal/hal_io.h</FILENAME>. This file itself contains
+macros that are generic to the architecture. If there are variant or
+platform specific IO access macros then these will be found in
+<filename>cyg/hal/var_io.h</filename> and
+<filename>cyg/hal/plf_io.h</filename> in the variant or platform HALs
+respectively. These files are include automatically by this header, so
+need not be included explicitly.
+</para>
+
+<para>
+This header (or more likely <filename>cyg/hal/plf_io.h</filename>) also
+defines the PCI access macros. For more information on these see <xref
+linkend="pci-library-reference">.
+</para>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Register address</TITLE>
+
+<PROGRAMLISTING>
+HAL_IO_REGISTER
+</PROGRAMLISTING>
+
+<PARA>
+This type is used to store the address of an I/O register. It will
+normally be a memory address, an integer port address or an offset
+into an I/O space. More complex architectures may need to code an
+address space plus offset pair into a single word, or may represent it
+as a structure.
+</PARA>
+
+<PARA>
+Values of variables and constants of this type will usually be
+supplied by configuration mechanisms or in target specific headers.
+</PARA>
+
+</SECTION>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Register read</TITLE>
+
+<PROGRAMLISTING>
+HAL_READ_XXX( register, value )
+HAL_READ_XXX_VECTOR( register, buffer, count, stride )
+</PROGRAMLISTING>
+
+<PARA>
+These macros support the reading of I/O registers in various
+sizes. The <replaceable>XXX</replaceable> component of the name may be
+<literal>UINT8</literal>, <literal>UINT16</literal>,
+<literal>UINT32</literal>.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_READ_XXX()</FUNCTION> reads the appropriately sized
+value from the register and stores it in the variable passed as the
+second argument.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_READ_XXX_VECTOR()</FUNCTION> reads
+<parameter>count</parameter> values of the appropriate size into
+<parameter>buffer</parameter>. The <parameter>stride</parameter>
+controls how the pointer advances through the register space. A stride
+of zero will read the same register repeatedly, and a stride of one
+will read adjacent registers of the given size. Greater strides will
+step by larger amounts, to allow for sparsely mapped registers for
+example.</PARA>
+</SECTION>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Register write</TITLE>
+
+<PROGRAMLISTING>
+HAL_WRITE_XXX( register, value )
+HAL_WRITE_XXX_VECTOR( register, buffer,count, stride )
+</PROGRAMLISTING>
+
+<PARA>
+These macros support the writing of I/O registers in various
+sizes. The <replaceable>XXX</replaceable> component of the name may be
+<LITERAL>UINT8</LITERAL>, <LITERAL>UINT16</LITERAL>,
+<LITERAL>UINT32</LITERAL>.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_WRITE_XXX()</FUNCTION> writes
+the appropriately sized value from the variable passed as the second argument
+stored it in the register.</PARA>
+<PARA><FUNCTION>HAL_WRITE_XXX_VECTOR()</FUNCTION> writes
+<parameter>count</parameter> values of the appropriate size from <parameter>
+buffer</parameter>. The <parameter>stride</parameter> controls
+how the pointer advances through the register space. A stride of
+zero will write the same register repeatedly, and a stride of one
+will write adjacent registers of the given size. Greater strides
+will step by larger amounts, to allow for sparsely mapped registers
+for example.</PARA>
+</SECTION>
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ Cache Control -->
+
+<SECTION id="hal-cache-control">
+<TITLE>Cache Control</TITLE>
+
+<PARA>This section contains definitions for supporting control
+of the caches on the CPU.
+</PARA>
+
+<para>
+These definitions are usually found in the header file
+<FILENAME>cyg/hal/hal_cache.h</FILENAME>. This file may be defined in
+the architecture, variant or platform HAL, depending on where the
+caches are implemented for the target. Often there will be a generic
+implementation of the cache control macros in the architecture HAL
+with the ability to override or undefine them in the variant or
+platform HAL. Even when the implementation of the cache macros is in
+the architecture HAL, the cache dimensions will be defined in the
+variant or platform HAL. As with other files, the variant or platform
+specific definitions are usually found in
+<filename>cyg/hal/var_cache.h</filename> and
+<filename>cyg/hal/plf_cache.h</filename> respectively. These files
+are include automatically by this header, so need not be included
+explicitly.
+</para>
+
+<PARA>
+There are versions of the macros defined here for both the Data and
+Instruction caches. these are distinguished by the use of either
+<literal>DCACHE</literal> or <literal>ICACHE</literal> in the macro
+names. Some architectures have a unified cache, where both data and
+instruction share the same cache. In these cases the control macros
+use <literal>UCACHE</literal> and the <literal>DCACHE</literal> and
+<literal>ICACHE</literal> macros will just be calls to the
+<literal>UCACHE</literal> version. In the following descriptions,
+<literal>XCACHE</literal> is used to stand for any of these. Where
+there are issues specific to a particular cache, this will be
+explained in the text.
+</PARA>
+
+<PARA>
+There might be target specific restrictions on the use of some of the
+macros which it is the user's responsibility to comply with. Such
+restrictions are documented in the header file with the macro
+definition.
+</PARA>
+
+<PARA>
+Note that destructive cache macros should be used with caution.
+Preceding a cache invalidation with a cache synchronization is not
+safe in itself since an interrupt may happen after the synchronization
+but before the invalidation. This might cause the state of dirty data
+lines created during the interrupt to be lost.
+</PARA>
+
+<PARA>
+Depending on the architecture's capabilities, it may be possible to
+temporarily disable the cache while doing the synchronization and
+invalidation which solves the problem (no new data would be cached
+during an interrupt). Otherwise it is necessary to disable interrupts
+while manipulating the cache which may take a long time.
+</PARA>
+
+<PARA>
+Some platform HALs now support a pair of cache state query
+macros: <function>HAL_ICACHE_IS_ENABLED( x )</function> and
+<function>HAL_DCACHE_IS_ENABLED( x )</function> which set the argument
+to true if the instruction or data cache is enabled,
+respectively. Like most cache control macros, these are optional,
+because the capabilities of different targets and boards can vary
+considerably. Code which uses them, if it is to be considered
+portable, should test for their existence first by means of
+<literal>#ifdef</literal>. Be sure to include
+<filename>&lt;cyg/hal/hal_cache.h&gt;</filename> in order to do this
+test and (maybe) use the macros.
+</PARA>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Cache Dimensions</TITLE>
+
+<PROGRAMLISTING>
+HAL_XCACHE_SIZE
+HAL_XCACHE_LINE_SIZE
+HAL_XCACHE_WAYS
+HAL_XCACHE_SETS
+</PROGRAMLISTING>
+<PARA>
+These macros define the size and dimensions of the Instruction
+and Data caches.
+</PARA>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>HAL_XCACHE_SIZE </TERM>
+ <LISTITEM>
+ <PARA>Defines the total size of the cache in bytes.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>HAL_XCACHE_LINE_SIZE </TERM>
+ <LISTITEM>
+ <PARA>Defines the cache line size in bytes.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>HAL_XCACHE_WAYS </TERM>
+ <LISTITEM>
+ <PARA>
+ Defines the number of ways in each set and defines its level
+ of associativity. This would be 1 for a direct mapped
+ cache, 2 for a 2-way cache, 4 for 4-way and so on.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>HAL_XCACHE_SETS </TERM>
+ <LISTITEM>
+ <PARA>
+ Defines the number of sets in the cache, and is calculated from
+ the previous values.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Global Cache Control</TITLE>
+
+<PROGRAMLISTING>
+HAL_XCACHE_ENABLE()
+HAL_XCACHE_DISABLE()
+HAL_XCACHE_INVALIDATE_ALL()
+HAL_XCACHE_SYNC()
+HAL_XCACHE_BURST_SIZE( size )
+HAL_DCACHE_WRITE_MODE( mode )
+HAL_XCACHE_LOCK( base, size )
+HAL_XCACHE_UNLOCK( base, size )
+HAL_XCACHE_UNLOCK_ALL()
+</PROGRAMLISTING>
+
+<PARA>
+These macros affect the state of the entire cache, or a large part of
+it.
+</PARA>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>HAL_XCACHE_ENABLE() and HAL_XCACHE_DISABLE()</TERM>
+ <LISTITEM>
+ <PARA>Enable and disable the cache.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>HAL_XCACHE_INVALIDATE_ALL()</TERM>
+ <LISTITEM>
+ <PARA>
+ Causes the entire contents of the cache to be invalidated.
+ Depending on the hardware, this may require the cache to be disabled
+ during the invalidation process. If so, the implementation must
+ use <function>HAL_XCACHE_IS_ENABLED()</function> to save and
+ restore the previous state.
+ </PARA>
+ <note>
+ <para>
+ If this macro is called after
+ <function>HAL_XCACHE_SYNC()</function> with the intention of clearing
+ the cache (invalidating the cache after writing dirty data back to
+ memory), you must prevent interrupts from happening between the two
+ calls:
+ </para>
+<PROGRAMLISTING>
+ ...
+ HAL_DISABLE_INTERRUPTS(old);
+ HAL_XCACHE_SYNC();
+ HAL_XCACHE_INVALIDATE_ALL();
+ HAL_RESTORE_INTERRUPTS(old);
+ ...
+</PROGRAMLISTING>
+ <para>
+ Since the operation may take a very long time, real-time
+ responsiveness could be affected, so only do this when it is
+ absolutely required and you know the delay will not interfere
+ with the operation of drivers or the application.
+ </para>
+ </note>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>HAL_XCACHE_SYNC()</TERM>
+ <LISTITEM>
+ <PARA>
+ Causes the contents of the cache to be brought into synchronization
+ with the contents of memory. In some implementations this may be
+ equivalent to <function>HAL_XCACHE_INVALIDATE_ALL()</function>.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>HAL_XCACHE_BURST_SIZE()</TERM>
+ <LISTITEM>
+ <PARA>
+ Allows the size of cache to/from memory bursts to
+ be controlled. This macro will only be defined if this functionality
+ is available.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>HAL_DCACHE_WRITE_MODE()</TERM>
+ <LISTITEM>
+ <PARA>
+ Controls the way in which data cache lines are written back to
+ memory. There will be definitions for the possible
+ modes. Typical definitions are
+ <literal>HAL_DCACHE_WRITEBACK_MODE</literal> and
+ <literal>HAL_DCACHE_WRITETHRU_MODE</literal>. This macro will
+ only be defined if this functionality is available.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>HAL_XCACHE_LOCK()</TERM>
+ <LISTITEM>
+ <PARA>
+ Causes data to be locked into the cache. The base and size
+ arguments define the memory region that will be locked into the
+ cache. It is architecture dependent whether more than one locked
+ region is allowed at any one time, and whether this operation
+ causes the cache to cease acting as a cache for addresses
+ outside the region during the duration of the lock. This macro
+ will only be defined if this functionality is available.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>HAL_XCACHE_UNLOCK()</TERM>
+ <LISTITEM>
+ <PARA>
+ Cancels the locking of the memory region given. This should
+ normally correspond to a region supplied in a matching lock
+ call. This macro will only be defined if this functionality is
+ available.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>HAL_XCACHE_UNLOCK_ALL()</TERM>
+ <LISTITEM>
+ <PARA>
+ Cancels all existing locked memory regions. This may be required
+ as part of the cache initialization on some architectures. This
+ macro will only be defined if this functionality is available.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- =================================================================== -->
+
+<SECTION>
+<TITLE>Cache Line Control</TITLE>
+
+<PROGRAMLISTING>
+HAL_DCACHE_ALLOCATE( base , size )
+HAL_DCACHE_FLUSH( base , size )
+HAL_XCACHE_INVALIDATE( base , size )
+HAL_DCACHE_STORE( base , size )
+HAL_DCACHE_READ_HINT( base , size )
+HAL_DCACHE_WRITE_HINT( base , size )
+HAL_DCACHE_ZERO( base , size )
+</PROGRAMLISTING>
+
+<PARA>
+All of these macros apply a cache operation to all cache lines that
+match the memory address region defined by the base and size
+arguments. These macros will only be defined if the described
+functionality is available. Also, it is not guaranteed that the cache
+function will only be applied to just the described regions, in some
+architectures it may be applied to the whole cache.
+</PARA>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>HAL_DCACHE_ALLOCATE()</TERM>
+ <LISTITEM>
+ <PARA>
+ Allocates lines in the cache for the given region without
+ reading their contents from memory, hence the contents of the lines
+ is undefined. This is useful for preallocating lines which are to
+ be completely overwritten, for example in a block copy
+ operation.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>HAL_DCACHE_FLUSH()</TERM>
+ <LISTITEM>
+ <PARA>
+ Invalidates all cache lines in the region after writing any
+ dirty lines to memory.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>HAL_XCACHE_INVALIDATE() </TERM>
+ <LISTITEM>
+ <PARA>
+ Invalidates all cache lines in the region. Any dirty lines
+ are invalidated without being written to memory.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>HAL_DCACHE_STORE() </TERM>
+ <LISTITEM>
+ <PARA>
+ Writes all dirty lines in the region to memory, but does not
+ invalidate any lines.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>HAL_DCACHE_READ_HINT() </TERM>
+ <LISTITEM>
+ <PARA>
+ Hints to the cache that the region is going to be read from
+ in the near future. This may cause the region to be speculatively
+ read into the cache.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>HAL_DCACHE_WRITE_HINT() </TERM>
+ <LISTITEM>
+ <PARA>
+ Hints to the cache that the region is going to be written
+ to in the near future. This may have the identical behavior to
+ HAL_DCACHE_READ_HINT().
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>HAL_DCACHE_ZERO()</TERM>
+ <LISTITEM>
+ <PARA>
+ Allocates and zeroes lines in the cache for the given
+ region without reading memory. This is useful if a large area of
+ memory is to be cleared.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ Linker Scripts -->
+
+<SECTION id="hal-linker-scripts">
+<TITLE><!-- <xref> -->Linker Scripts</TITLE>
+
+<para>
+When an eCos application is linked it must be done under the control
+of a linker script. This script defines the memory areas, addresses
+and sized, into which the code and data are to be put, and allocates
+the various sections generated by the compiler to these.
+</para>
+
+<para>
+The linker script actually used is in
+<filename>lib/target.ld</filename> in the install directory. This is
+actually manufactured out of two other files: a base linker script and
+an <literal>.ldi</literal> file that was generated by the memory
+layout tool.
+</para>
+
+<para>
+The base linker script is usually supplied either by the architecture
+HAL or the variant HAL. It consists of a set of linker script
+fragments, in the form of C preprocessor macros, that define the major
+output sections to be generated by the link operation. The
+<literal>.ldi</literal> file, which is <literal>#include'ed</literal>
+by the base linker script, uses these macro definitions to assign the
+output sections to the required memory areas and link addresses.
+</para>
+
+<para>
+The <literal>.ldi</literal> file is supplied by the platform HAL, and
+contains knowledge of the memory layout of the target platform. These
+files generally conform to a standard naming convention, each file
+being of the form:
+</para>
+<para>
+<filename>pkgconf/mlt_&lt;architecture&gt;_&lt;variant&gt;_&lt;platform&gt;_&lt;startup&gt;.ldi</filename>
+</para>
+<para>
+where <literal>&lt;architecture&gt;</literal>,
+<literal>&lt;variant&gt;</literal> and
+<literal>&lt;platform&gt;</literal> are the respective HAL package
+names and <literal>&lt;startup&gt;</literal> is the startup type which
+is usually one of <literal>ROM</literal>, <literal>RAM</literal> or
+<literal>ROMRAM</literal>.
+</para>
+
+<para>
+In addition to the <literal>.ldi</literal> file, there is also a
+congruously name <literal>.h</literal> file. This may be used by the
+application to access information defined in the
+<literal>.ldi</literal> file. Specifically it contains the memory
+layout defined there, together with any additional section names
+defined by the user. Examples of the latter are heap areas or PCI bus
+memory access windows.
+</para>
+
+<para>
+The <literal>.ldi</literal> is manufactured by the <application>Memory
+Layout Tool</application> (MLT). The <application>MLT</application> saves the memory
+configuration into a file named
+</para>
+<para>
+<filename>include/pkgconf/mlt_&lt;architecture&gt;_&lt;variant&gt;_&lt;platform&gt;_&lt;startup&gt;.mlt</filename>
+</para>
+<para>
+in the platform HAL. This file is used by the
+<application>MLT</application> to manufacture both the
+<literal>.ldi</literal> and <literal>.h</literal> files. Users should
+beware that direct edits the either of these files may be overwritten
+if the <application>MLT</application> is run and regenerates them from the
+<literal>.mlt</literal> file.
+</para>
+
+<para>
+The names of the <literal>.ldi</literal> and <literal>.h</literal>
+files are defined by macro definitions in
+<FILENAME>pkgconf/system.h</FILENAME>. These are
+<literal>CYGHWR_MEMORY_LAYOUT_LDI</literal> and
+<literal>CYGHWR_MEMORY_LAYOUT_H</literal> respectively. While there
+will be little need for the application to refer to the
+<literal>.ldi</literal> file directly, it may include the
+<literal>.h</literal> file as follows:
+</para>
+
+<programlisting>
+#include CYGHWR_MEMORY_LAYOUT_H
+</programlisting>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ Diagnostic Support -->
+
+<SECTION id="hal-diagnostic-support">
+<TITLE>Diagnostic Support</TITLE>
+
+<para>
+The HAL provides support for low level diagnostic IO. This is
+particularly useful during early development as an aid to bringing up
+a new platform. Usually this diagnostic channel is a UART or some
+other serial IO device, but it may equally be a a memory
+buffer, a simulator supported output channel, a ROM emulator virtual
+UART, and LCD panel, a memory mapped video buffer or any other output
+device.
+</para>
+
+<PARA>
+<FUNCTION>HAL_DIAG_INIT()</FUNCTION> performs any initialization
+required on the device being used to generate diagnostic output. This
+may include, for a UART, setting baud rate, and stop, parity and
+character bits. For other devices it may include initializing a
+controller or establishing contact with a remote device.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_DIAG_WRITE_CHAR(c)</FUNCTION> writes
+the character supplied to the diagnostic output device.
+</PARA>
+
+<PARA>
+<FUNCTION>HAL_DIAG_READ_CHAR(c)</FUNCTION> reads a character from the
+diagnostic device into the supplied variable. This is not supported
+for all diagnostic devices.
+</PARA>
+
+<para>
+These macros are defined in the header file
+<filename>cyg/hal/hal_diag.h</filename>. This file is usually supplied
+by the variant or platform HAL, depending on where the IO device being
+used is located. For example for on-chip UARTs it would be in the
+variant HAL, but for a board-level LCD panel it would be in the
+platform HAL.
+</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ SMP Support -->
+
+<section id="hal-smp-support">
+<TITLE>SMP Support</TITLE>
+
+<para>
+eCos contains support for limited Symmetric Multi-Processing
+(SMP). This is only available on selected architectures and platforms.
+</para>
+
+<section>
+<title>Target Hardware Limitations</title>
+
+<para>
+To allow a reasonable implementation of SMP, and to reduce the
+disruption to the existing source base, a number of assumptions have
+been made about the features of the target hardware.
+</para>
+
+<itemizedlist>
+<listitem>
+<para>
+Modest multiprocessing. The typical number of CPUs supported is two
+to four, with an upper limit around eight. While there are no
+inherent limits in the code, hardware and algorithmic limitations
+will probably become significant beyond this point.
+</para>
+</listitem>
+
+<listitem>
+<para>
+SMP synchronization support. The hardware must supply a mechanism to
+allow software on two CPUs to synchronize. This is normally provided
+as part of the instruction set in the form of test-and-set,
+compare-and-swap or load-link/store-conditional instructions. An
+alternative approach is the provision of hardware semaphore
+registers which can be used to serialize implementations of these
+operations. Whatever hardware facilities are available, they are
+used in eCos to implement spinlocks.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Coherent caches. It is assumed that no extra effort will be required
+to access shared memory from any processor. This means that either
+there are no caches, they are shared by all processors, or are
+maintained in a coherent state by the hardware. It would be too
+disruptive to the eCos sources if every memory access had to be
+bracketed by cache load/flush operations. Any hardware that requires
+this is not supported.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Uniform addressing. It is assumed that all memory that is
+shared between CPUs is addressed at the same location from all
+CPUs. Like non-coherent caches, dealing with CPU-specific address
+translation is considered too disruptive to the eCos source
+base. This does not, however, preclude systems with non-uniform
+access costs for different CPUs.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Uniform device addressing. As with access to memory, it is assumed
+that all devices are equally accessible to all CPUs. Since device
+access is often made from thread contexts, it is not possible to
+restrict access to device control registers to certain CPUs, since
+there is currently no support for binding or migrating threads to CPUs.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Interrupt routing. The target hardware must have an interrupt
+controller that can route interrupts to specific CPUs. It is
+acceptable for all interrupts to be delivered to just one CPU, or
+for some interrupts to be bound to specific CPUs, or for some
+interrupts to be local to each CPU. At present dynamic routing,
+where a different CPU may be chosen each time an interrupt is
+delivered, is not supported. ECos cannot support hardware where all
+interrupts are delivered to all CPUs simultaneously with the
+expectation that software will resolve any conflicts.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Inter-CPU interrupts. A mechanism to allow one CPU to interrupt
+another is needed. This is necessary so that events on one CPU can
+cause rescheduling on other CPUs.
+</para>
+</listitem>
+
+<listitem>
+<para>
+CPU Identifiers. Code running on a CPU must be able to determine
+which CPU it is running on. The CPU Id is usually provided either in
+a CPU status register, or in a register associated with the
+inter-CPU interrupt delivery subsystem. ECos expects CPU Ids to be
+small positive integers, although alternative representations, such
+as bitmaps, can be converted relatively easily. Complex mechanisms
+for getting the CPU Id cannot be supported. Getting the CPU Id must
+be a cheap operation, since it is done often, and in performance
+critical places such as interrupt handlers and the scheduler.
+</para>
+</listitem>
+</itemizedlist>
+
+</section>
+
+<section>
+<title>HAL Support</title>
+
+<para>
+SMP support in any platform depends on the HAL supplying the
+appropriate operations. All HAL SMP support is defined in the
+<filename>cyg/hal/hal_smp.h</filename> header. Variant and platform
+specific definitions will be in <filename>cyg/hal/var_smp.h</filename>
+and <filename>cyg/hal/plf_smp.h</filename> respectively. These files
+are include automatically by this header, so need not be included
+explicitly.
+</para>
+
+<para>
+SMP support falls into a number of functional groups.
+</para>
+
+<section>
+<title>CPU Control</title>
+
+<para>
+This group consists of descriptive and control macros for managing the
+CPUs in an SMP system.
+</para>
+
+<variablelist>
+<varlistentry>
+<term><literal>HAL_SMP_CPU_TYPE</literal></term>
+<listitem>
+<para>
+A type that can contain a CPU id. A CPU id is
+usually a small integer that is used to index
+arrays of variables that are managed on an
+per-CPU basis.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SMP_CPU_MAX</literal></term>
+<listitem>
+<para>
+The maximum number of CPUs that can be
+supported. This is used to provide the size of
+any arrays that have an element per CPU.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SMP_CPU_COUNT()</literal></term>
+<listitem>
+<para>
+Returns the number of CPUs currently
+operational. This may differ from
+HAL_SMP_CPU_MAX depending on the runtime
+environment.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SMP_CPU_THIS()</literal></term>
+<listitem>
+<para>
+Returns the CPU id of the current CPU.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SMP_CPU_NONE</literal></term>
+<listitem>
+<para>
+A value that does not match any real CPU
+id. This is uses where a CPU type variable
+must be set to a null value.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SMP_CPU_START( cpu )</literal></term>
+<listitem>
+<para>
+Starts the given CPU executing at a defined
+HAL entry point. After performing any HAL
+level initialization, the CPU calls up into
+the kernel at <function>cyg_kernel_cpu_startup()</function>.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SMP_CPU_RESCHEDULE_INTERRUPT( cpu, wait )</literal></term>
+<listitem>
+<para>
+Sends the CPU a reschedule interrupt, and if
+<parameter>wait</parameter> is non-zero, waits for an
+acknowledgment. The interrupted CPU should call
+<function>cyg_scheduler_set_need_reschedule()</function> in its DSR to
+cause the reschedule to occur.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SMP_CPU_TIMESLICE_INTERRUPT( cpu, wait )</literal></term>
+<listitem>
+<para>
+Sends the CPU a timeslice interrupt, and if
+<parameter>wait</parameter> is non-zero, waits for an
+acknowledgment. The interrupted CPU should call
+<function>cyg_scheduler_timeslice_cpu()</function> to cause the
+timeslice event to be processed.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</section>
+
+
+<section>
+<title>Test-and-set Support</title>
+
+<para>
+Test-and-set is the foundation of the SMP synchronization
+mechanisms.
+</para>
+
+<variablelist>
+<varlistentry>
+<term><literal>HAL_TAS_TYPE</literal></term>
+<listitem>
+<para>
+The type for all test-and-set variables. The
+test-and-set macros only support operations on
+a single bit (usually the least significant
+bit) of this location. This allows for maximum
+flexibility in the implementation.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_TAS_SET( tas, oldb )</literal></term>
+<listitem>
+<para>
+Performs a test and set operation on the
+location <parameter>tas</parameter>. <parameter>oldb</parameter> will contain <literal>true</literal> if
+the location was already set, and <literal>false</literal> if
+it was clear.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_TAS_CLEAR( tas, oldb )</literal></term>
+<listitem>
+<para>
+Performs a test and clear operation on the
+location <parameter>tas</parameter>. <parameter>oldb</parameter> will contain <literal>true</literal> if
+the location was already set, and <literal>false</literal> if
+it was clear.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</section>
+<section>
+
+<title>Spinlocks</title>
+
+<para>
+Spinlocks provide inter-CPU locking. Normally they will be implemented
+on top of the test-and-set mechanism above, but may also be
+implemented by other means if, for example, the hardware has more
+direct support for spinlocks.
+</para>
+
+<variablelist>
+<varlistentry>
+<term><literal>HAL_SPINLOCK_TYPE</literal></term>
+<listitem>
+<para>
+The type for all spinlock variables.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SPINLOCK_INIT_CLEAR</literal></term>
+<listitem>
+<para>
+A value that may be assigned to a spinlock
+variable to initialize it to clear.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SPINLOCK_INIT_SET</literal></term>
+<listitem>
+<para>
+A value that may be assigned to a spinlock
+variable to initialize it to set.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SPINLOCK_SPIN( lock )</literal></term>
+<listitem>
+<para>
+The caller spins in a busy loop waiting for
+the lock to become clear. It then sets it and
+continues. This is all handled atomically, so
+that there are no race conditions between CPUs.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SPINLOCK_CLEAR( lock )</literal></term>
+<listitem>
+<para>
+The caller clears the lock. One of any waiting
+spinners will then be able to proceed.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SPINLOCK_TRY( lock, val )</literal></term>
+<listitem>
+<para>
+Attempts to set the lock. The value put in
+<parameter>val</parameter> will be <literal>true</literal> if the lock was
+claimed successfully, and <literal>false</literal> if it was
+not.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SPINLOCK_TEST( lock, val )</literal></term>
+<listitem>
+<para>
+Tests the current value of the lock. The value
+put in <parameter>val</parameter> will be <literal>true</literal> if the lock is
+claimed and <literal>false</literal> of it is clear.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</section>
+<section>
+
+<title>Scheduler Lock</title>
+
+<para>
+The scheduler lock is the main protection for all kernel data
+structures. By default the kernel implements the scheduler lock itself
+using a spinlock. However, if spinlocks cannot be supported by the
+hardware, or there is a more efficient implementation available, the
+HAL may provide macros to implement the scheduler lock.
+</para>
+
+<variablelist>
+<varlistentry>
+<term><literal>HAL_SMP_SCHEDLOCK_DATA_TYPE</literal></term>
+<listitem>
+<para>
+A data type, possibly a structure, that
+contains any data items needed by the
+scheduler lock implementation. A variable of
+this type will be instantiated as a static
+member of the Cyg_Scheduler_SchedLock class
+and passed to all the following macros.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SMP_SCHEDLOCK_INIT( lock, data )</literal></term>
+<listitem>
+<para>
+Initialize the scheduler lock. The <parameter>lock</parameter>
+argument is the scheduler lock counter and the
+<parameter>data</parameter> argument is a variable of
+HAL_SMP_SCHEDLOCK_DATA_TYPE type.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SMP_SCHEDLOCK_INC( lock, data )</literal></term>
+<listitem>
+<para>
+Increment the scheduler lock. The first
+increment of the lock from zero to one for any
+CPU may cause it to wait until the lock is
+zeroed by another CPU. Subsequent increments
+should be less expensive since this CPU
+already holds the lock.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SMP_SCHEDLOCK_ZERO( lock, data )</literal></term>
+<listitem>
+<para>
+Zero the scheduler lock. This operation will
+also clear the lock so that other CPUs may
+claim it.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_SMP_SCHEDLOCK_SET( lock, data, new )</literal></term>
+<listitem>
+<para>
+Set the lock to a different value, in
+<parameter>new</parameter>. This is only called when the lock is
+already known to be owned by the current CPU. It is never called to
+zero the lock, or to increment it from zero.
+</para>
+</listitem>
+</varlistentry>
+
+</variablelist>
+</section>
+<section>
+
+<title>Interrupt Routing</title>
+
+<para>
+The routing of interrupts to different CPUs is supported by two new
+interfaces in hal_intr.h.
+</para>
+
+<para>
+Once an interrupt has been routed to a new CPU, the existing vector
+masking and configuration operations should take account of the CPU
+routing. For example, if the operation is not invoked on the
+destination CPU itself, then the HAL may need to arrange to transfer
+the operation to the destination CPU for correct application.
+</para>
+
+<variablelist>
+<varlistentry>
+<term><literal>HAL_INTERRUPT_SET_CPU( vector, cpu )</literal></term>
+<listitem>
+<para>
+Route the interrupt for the given <parameter>vector</parameter> to
+the given <parameter>cpu</parameter>.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>HAL_INTERRUPT_GET_CPU( vector, cpu )</literal></term>
+<listitem>
+<para>
+Set <parameter>cpu</parameter> to the id of the CPU to which this
+vector is routed.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+</section>
+
+</section>
+
+
+</section>
+
+<!-- }}} -->
+
+</CHAPTER>
+
+<!-- }}} -->
+<!-- {{{ Exception Handling -->
+
+<CHAPTER id="hal-exception-handling">
+<TITLE>Exception Handling</TITLE>
+
+<!-- {{{ Intro -->
+
+<para>
+Most of the HAL consists of simple macros or functions that are
+called via the interfaces described in the previous section. These
+just perform whatever operation is required by accessing the hardware
+and then return. The exception to this is the handling of exceptions:
+either synchronous hardware traps or asynchronous device
+interrupts. Here control is passed first to the HAL, which then passed
+it on to eCos or the application. After eCos has finished with it,
+control is then passed back to the HAL for it to tidy up the CPU state
+and resume processing from the point at which the exception occurred.
+</para>
+
+<PARA>
+The HAL exceptions handling code is usually found in the file
+<FILENAME>vectors.S</FILENAME> in the architecture HAL. Since the
+reset entry point is usually implemented as one of these it also deals
+with system startup.
+</PARA>
+
+<PARA>
+The exact implementation of this code is under the control of the HAL
+implementer. So long as it interacts correctly with the interfaces
+defined previously it may take any form. However, all current
+implementation follow the same pattern, and there should be a very
+good reason to break with this. The rest of this section describes
+these operate.
+</PARA>
+
+<para>
+Exception handling normally deals with the following broad areas of
+functionality:
+</para>
+
+<ITEMIZEDLIST>
+ <LISTITEM>
+ <PARA>Startup and initialization.</PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>Hardware exception delivery.</PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>Default handling of synchronous exceptions.</PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>Default handling of asynchronous interrupts.</PARA>
+ </LISTITEM>
+</ITEMIZEDLIST>
+
+<!-- }}} -->
+<!-- {{{ HAL Startup -->
+
+<SECTION id="hal-startup">
+<TITLE><!-- <index></index> --><!-- <xref> -->HAL Startup</TITLE>
+
+<PARA>
+Execution normally begins at the reset vector with
+the machine in a minimal startup state. From here the HAL needs to get
+the machine running, set up the execution environment for the
+application, and finally invoke its entry point.
+</PARA>
+
+<PARA>
+The following is a list of the jobs that need to be done in
+approximately the order in which they should be accomplished. Many
+of these will not be needed in some configurations.
+</PARA>
+
+<ITEMIZEDLIST>
+ <listitem>
+ <para>
+ Initialize the hardware. This may involve initializing several
+ subsystems in both the architecture, variant and platform
+ HALs. These include:
+ </para>
+ <itemizedlist>
+ <LISTITEM>
+ <PARA>
+ Initialize various CPU status registers. Most importantly, the CPU
+ interrupt mask should be set to disable interrupts.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Initialize the MMU, if it is used. On many platforms it is
+ only possible to control the cacheability of address ranges
+ via the MMU. Also, it may be necessary to remap RAM and device
+ registers to locations other than their defaults. However, for
+ simplicity, the mapping should be kept as close to one-to-one
+ physical-to-virtual as possible.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Set up the memory controller to access RAM, ROM and I/O devices
+ correctly. Until this is done it may not be possible to access
+ RAM. If this is a ROMRAM startup then the program code can
+ now be copied to its RAM address and control transferred to it.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Set up any bus bridges and support chips. Often access to
+ device registers needs to go through various bus bridges and
+ other intermediary devices. In many systems these are combined
+ with the memory controller, so it makes sense to set these up
+ together. This is particularly important if early diagnostic
+ output needs to go through one of these devices.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Set up diagnostic mechanisms. If the platform includes an LED or
+ LCD output device, it often makes sense to output progress
+ indications on this during startup. This helps with diagnosing
+ hardware and software errors.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Initialize floating point and other extensions such as SIMD
+ and multimedia engines. It is usually necessary to enable
+ these and maybe initialize control and exception registers for
+ these extensions.
+ </PARA>
+ </LISTITEM>
+
+
+ <LISTITEM>
+ <PARA>
+ Initialize interrupt controller. At the very least, it should
+ be configured to mask all interrupts. It may also be necessary
+ to set up the mapping from the interrupt controller's vector
+ number space to the CPU's exception number space. Similar
+ mappings may need to be set up between primary and secondary
+ interrupt controllers.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Disable and initialize the caches. The caches should not
+ normally be enabled at this point, but it may be necessary to
+ clear or initialize them so that they can be enabled
+ later. Some architectures require that the caches be
+ explicitly reinitialized after a power-on reset.
+ </PARA>
+ </LISTITEM>
+
+
+ <LISTITEM>
+ <PARA>
+ Initialize the timer, clock etc. While the timer used for RTC
+ interrupts will be initialized later, it may be necessary to
+ set up the clocks that drive it here.
+ </PARA>
+ </LISTITEM>
+
+ </itemizedlist>
+ <para>
+ The exact order in which these initializations is done is
+ architecture or variant specific. It is also often not necessary
+ to do anything at all for some of these options. These fragments
+ of code should concentrate on getting the target up and running so
+ that C function calls can be made and code can be run. More
+ complex initializations that cannot be done in assembly code may
+ be postponed until calls to
+ <function>hal_variant_init()</function> or
+ <function>hal_platform_init()</function> are made.
+ </para>
+
+ <para>
+ Not all of these initializations need to be done for all startup
+ types. In particular, RAM startups can reasonably assume that the
+ ROM monitor or loader has already done most of this work.
+ </para>
+
+ </listitem>
+
+ <LISTITEM>
+ <PARA>
+ Set up the stack pointer, this allows subsequent initialization
+ code to make proper procedure calls. Usually the interrupt stack
+ is used for this purpose since it is available, large enough, and
+ will be reused for other purposes later.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Initialize any global pointer register needed for access to
+ globally defined variables. This allows subsequent initialization
+ code to access global variables.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ If the system is starting from ROM, copy the ROM template of the
+ <filename>.data</filename> section out to its correct position in
+ RAM. (<xref linkend="hal-linker-scripts">).
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Zero the <filename>.bss</filename> section.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Create a suitable C call stack frame. This may involve making
+ stack space for call frames, and arguments, and initializing the
+ back pointers to halt a GDB backtrace operation.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Call <function>hal_variant_init()</function> and
+ <function>hal_platform_init()</function>. These will perform any
+ additional initialization needed by the variant and platform. This
+ typically includes further initialization of the interrupt
+ controller, PCI bus bridges, basic IO devices and enabling the
+ caches.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Call <FUNCTION>cyg_hal_invoke_constructors()</FUNCTION> to run any
+ static constructors.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Call <FUNCTION>cyg_start()</FUNCTION>. If
+ <FUNCTION>cyg_start()</FUNCTION> returns, drop into an infinite
+ loop.
+ </PARA>
+ </LISTITEM>
+</ITEMIZEDLIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ Vectors and VSRs -->
+
+<SECTION id="hal-vectors-and-vsrs"><!-- <index></index> -->
+<TITLE>Vectors and VSRs</TITLE>
+
+<PARA>
+The CPU delivers all <!-- <index></index> --> exceptions, whether
+synchronous faults or asynchronous interrupts, to a set of hardware
+defined vectors. Depending on the architecture, these may be
+implemented in a number of different ways. Examples of existing
+mechanisms are:
+</PARA>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>PowerPC</TERM>
+ <LISTITEM>
+ <PARA>
+ Exceptions are vectored to locations 256 bytes apart starting at
+ either zero or <literal>0xFFF00000</literal>. There are 16 such
+ vectors defined by the basic architecture and extra vectors may
+ be defined by specific variants. One of the base vectors is for
+ all external interrupts, and another is for the architecture
+ defined timer.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>MIPS</TERM>
+ <LISTITEM>
+ <PARA>
+ Most exceptions and all interrupts are vectored to a single
+ address at either <literal>0x80000000</literal> or
+ <literal>0xBFC00180</literal>. Software is responsible for
+ reading the exception code from the CPU <literal>cause</literal>
+ register to discover its true source. Some TLB and debug
+ exceptions are delivered to different vector addresses, but
+ these are not used currently by eCos. One of the exception codes
+ in the <literal>cause</literal> register indicates an external
+ interrupt. Additional bits in the <literal>cause</literal>
+ register provide a first-level decode for the interrupt source,
+ one of which represents an architecture defined timer.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>IA32</TERM>
+ <LISTITEM>
+ <PARA>
+ Exceptions are delivered via an Interrupt Descriptor Table (IDT)
+ which is essentially an indirection table indexed by exception
+ number. The IDT may be placed anywhere in memory. In PC hardware
+ the standard interrupt controller can be programmed to deliver
+ the external interrupts to a block of 16 vectors at any offset
+ in the IDT. There is no hardware supplied mechanism for
+ determining the vector taken, other than from the address jumped
+ to.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>ARM</TERM>
+ <LISTITEM>
+ <PARA>
+ All exceptions, including the FIQ and IRQ interrupts, are
+ vectored to locations four bytes apart starting at zero. There
+ is only room for one instruction here, which must immediately
+ jump out to handling code higher in memory. Interrupt sources
+ have to be decoded entirely from the interrupt controller.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+
+<para>
+With such a wide variety of hardware approaches, it is not possible to
+provide a generic mechanism for the substitution of exception vectors
+directly. Therefore, eCos translates all of these mechanisms in to a
+common approach that can be used by portable code on all platforms.
+</para>
+
+<para>
+The mechanism implemented is to attach to each hardware vector a short
+piece of trampoline code that makes an indirect jump via a table to
+the actual handler for the exception. This handler is called the
+Vector Service Routine (VSR) and the table is called the VSR table.
+</para>
+
+<para>
+The trampoline code performs the absolute minimum processing necessary
+to identify the exception source, and jump to the VSR. The VSR is then
+responsible for saving the CPU state and taking the necessary actions
+to handle the exception or interrupt. The entry conditions for the VSR
+are as close to the raw hardware exception entry state as possible -
+although on some platforms the trampoline will have had to move or
+reorganize some registers to do its job.
+</para>
+
+<para>
+To make this more concrete, consider how the trampoline code operates
+in each of the architectures described above:
+</para>
+
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>PowerPC</TERM>
+ <LISTITEM>
+ <PARA>
+ A separate trampoline is contained in each of the vector
+ locations. This code saves a few work registers away to the
+ special purposes registers available, loads the exception number
+ into a register and then uses that to index the VSR table and
+ jump to the VSR. The VSR is entered with some registers move to
+ the SPRs, and one of the data register containing the number of
+ the vector taken.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>MIPS</TERM>
+ <LISTITEM>
+ <PARA>
+ A single trampoline routine attached to the common vector reads
+ the exception code out of the <literal>cause</literal> register
+ and uses that value to index the VSR table and jump to the VSR.
+ The trampoline uses the two registers defined in the ABI for
+ kernel use to do this, one of these will contain the exception
+ vector number for the VSR.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>IA32</TERM>
+ <LISTITEM>
+ <PARA>
+ There is a separate 3 or 4 instruction trampoline pointed to by
+ each active IDT table entry. The trampoline for exceptions that
+ also have an error code pop it from the stack and put it into a
+ memory location. Trampolines for non-error-code exceptions just
+ zero the memory location. Then all trampolines push an
+ interrupt/exception number onto the stack, and take an indirect
+ jump through a precalculated offset in the VSR table. This is
+ all done without saving any registers, using memory-only
+ operations. The VSR is entered with the vector number pushed
+ onto the stack on top of the standard hardware saved state.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>ARM</TERM>
+ <LISTITEM>
+ <PARA>
+ The trampoline consists solely of the single instruction at the
+ exception entry point. This is an indirect jump via a location
+ 32 bytes higher in memory. These locations, from
+ <literal>0x20</literal> up, form the VSR table. Since each VSR
+ is entered in a different CPU mode
+ (<literal>SVC,UNDEF,ABORT,IRQ or FIQ</literal>) there has to be a
+ different VSR for each exception that knows how to save the CPU
+ state correctly.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Synchronous Exception Handling -->
+
+<SECTION id="hal-default-synchronous-exception-handling">
+<TITLE><!-- <index></index> -->Default Synchronous Exception Handling</TITLE>
+
+<PARA>
+Most synchronous exception VSR table entries will point to a default
+exception VSR which is responsible for handling all exceptions in a
+generic manner. The default VSR simply saves the CPU state, makes any
+adjustments to the CPU state that is necessary, and calls
+<function>cyg_hal_exception_handler()</function>.
+</PARA>
+
+<PARA>
+<function>cyg_hal_exception_handler()</function> needs to pass the
+exception on to some handling code. There are two basic destinations:
+enter GDB or pass the exception up to eCos. Exactly which
+destination is taken depends on the configuration. When the GDB stubs are
+included then the exception is passed to them, otherwise it is passed
+to eCos.
+</PARA>
+
+<para>
+If an eCos application has been loaded by RedBoot then the VSR table
+entries will all point into RedBoot's exception VSR, and will
+therefore enter GDB if an exception occurs. If the eCos application
+wants to handle an exception itself, it needs to replace the the VSR
+table entry with one pointing to its own VSR. It can do this with the
+<function>HAL_VSR_SET_TO_ECOS_HANDLER()</function> macro.
+</para>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ Interrupt Handling -->
+
+<SECTION id="hal-default-interrupt-handling">
+<TITLE><!-- <index></index> -->Default Interrupt Handling</TITLE>
+
+<PARA>
+Most asynchronous external interrupt vectors will point to a default
+interrupt VSR which decodes the actual interrupt being delivered from
+the interrupt controller and invokes the appropriate ISR.
+</PARA>
+
+<PARA>
+The default interrupt VSR has a number of responsibilities if it is
+going to interact with the Kernel cleanly and allow interrupts to
+cause thread preemption.
+</PARA>
+
+<PARA>
+To support this VSR an ISR vector table is needed. For each valid
+vector three pointers need to be stored: the ISR, its data pointer and
+an opaque (to the HAL) interrupt object pointer needed by the
+kernel. It is implementation defined whether these are stored in a
+single table of triples, or in three separate tables.
+</PARA>
+
+<PARA>
+The VSR follows the following approximate plan:
+</PARA>
+
+<ORDEREDLIST>
+ <LISTITEM>
+ <PARA>
+ Save the CPU state. In non-debug configurations, it may be
+ possible to get away with saving less than the entire machine
+ state. The option
+ <literal>CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT</literal>
+ is supported in some targets to do this.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Increment the kernel scheduler lock. This is a static member of
+ the Cyg_Scheduler class, however it has also been aliased to
+ <literal>cyg_scheduler_sched_lock</literal> so that it can be
+ accessed from assembly code.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ (Optional) Switch to an interrupt stack if not already running on
+ it. This allows nested interrupts to be delivered without needing
+ every thread to have a stack large enough to take the maximum
+ possible nesting. It is implementation defined how to detect
+ whether this is a nested interrupt but there are two basic
+ techniques. The first is to inspect the stack pointer and switch
+ only if it is not currently within the interrupt stack range; the
+ second is to maintain a counter of the interrupt nesting level and
+ switch only if it is zero. The option
+ <literal>CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK</literal>
+ controls whether this happens.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Decode the actual external interrupt being delivered from
+ the interrupt controller. This will yield the ISR vector
+ number. The code to do this usually needs to come from the
+ variant or platform HAL, so is usually present in the form of a
+ macro or procedure callout.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ (Optional) Re-enable interrupts to permit nesting. At this point
+ we can potentially allow higher priority interrupts to occur. It
+ depends on the interrupt architecture of the CPU and platform
+ whether more interrupts will occur at this point, or whether they
+ will only be delivered after the current interrupt has been
+ acknowledged (by a call to
+ <function>HAL_INTERRUPT_ACKNOWLEDGE()</function> in the ISR).
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Using the ISR vector number as an index, retrieve the
+ ISR pointer and its data pointer from the ISR vector table.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Construct a C call stack frame. This may involve making stack
+ space for call frames, and arguments, and initializing the back
+ pointers to halt a GDB backtrace operation.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Call the ISR, passing the vector number and data pointer. The
+ vector number and a pointer to the saved state should be preserved
+ across this call, preferably by storing them in registers that are
+ defined to be callee-saved by the calling conventions.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ If this is an un-nested interrupt and a separate interrupt
+ stack is being used, switch back to the interrupted thread's
+ own stack.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Use the saved ISR vector number to get the interrupt object
+ pointer from the ISR vector table.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Call <FUNCTION>interrupt_end()</FUNCTION> passing it the return
+ value from the ISR, the interrupt object pointer and a pointer to
+ the saved CPU state. This function is implemented by the Kernel
+ and is responsible for finishing off the interrupt
+ handling. Specifically, it may post a DSR depending on the ISR
+ return value, and will decrement the scheduler lock. If the lock
+ is zeroed by this operation then any posted DSRs may be called and
+ may in turn result in a thread context switch.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ The return from <FUNCTION>interrupt_end()</FUNCTION> may occur
+ some time after the call. Many other threads may have executed in
+ the meantime. So here all we may do is restore the machine state
+ and resume execution of the interrupted thread. Depending on the
+ architecture, it may be necessary to disable interrupts again for
+ part of this.
+ </PARA>
+ </LISTITEM>
+
+</ORDEREDLIST>
+
+<PARA>
+The detailed order of these steps may vary slightly depending on the
+architecture, in particular where interrupts are enabled and disabled.
+</PARA>
+
+</SECTION>
+
+<!-- }}} -->
+
+</CHAPTER>
+
+<!-- }}} -->
+<!-- {{{ Porting Guide -->
+
+&hal-common-porting-sgml;
+
+<!-- }}} -->
+<!-- {{{ Future Developments -->
+
+<CHAPTER id="hal-future-developments">
+<TITLE><!-- <index></index> --><!-- <xref> -->Future developments</TITLE>
+
+<PARA>
+The HAL is not complete, and will evolve and increase over
+time. Among the intended developments are:
+</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>Common macros for interpreting the contents of a saved
+machine context. These would allow portable code, such as debug
+stubs, to extract such values as the program counter and stack pointer
+from a state without having to interpret a <STRUCTNAME>HAL_SavedRegisters</STRUCTNAME> structure
+directly.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Debugging support. Macros to set and clear hardware and
+software breakpoints. Access to other areas of machine state may
+also be supported.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Static initialization support. The current HAL provides a
+dynamic interface to things like thread context initialization and ISR
+attachment. We also need to be able to define the system entirely
+statically so that it is ready to go on restart, without needing to
+run code. This will require extra macros to define these
+initializations. Such support may have a consequential effect on the
+current HAL specification.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>CPU state control. Many CPUs have both kernel and user
+states. Although it is not intended to run any code in user state
+for the foreseeable future, it is possible that this may happen
+eventually. If this is the case, then some minor changes may be needed
+to the current HAL API to accommodate this. These should mostly
+be extensions, but minor changes in semantics may also be required.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Physical memory management. Many embedded systems have
+multiple memory areas with varying properties such as base address,
+size, speed, bus width, cacheability and persistence. An API is
+needed to support the discovery of this information about the machine's
+physical memory map.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Memory management control. Some embedded processors have
+a memory management unit. In some cases this must be enabled to
+allow the cache to be controlled, particularly if different regions
+of memory must have different caching properties. For some purposes,
+in some systems, it will be useful to manipulate the MMU settings
+dynamically.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Power management. Macros to access and control any power
+management mechanisms available on the CPU implementation. These
+would provide a substrate for a more general power management system
+that also involved device drivers and other hardware components.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Generic serial line macros. Most serial line devices operate
+in the same way, the only real differences being exactly which bits
+in which registers perform the standard functions. It should be
+possible to develop a set of HAL macros that provide basic serial
+line services such as baud rate setting, enabling interrupts, polling
+for transmit or receive ready, transmitting and receiving data etc.
+Given these it should be possible to create a generic serial line
+device driver that will allow rapid bootstrapping on any new platform.
+It may be possible to extend this mechanism to other device types.</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+</CHAPTER>
+
+<!-- }}} -->
+
+</part>
diff --git a/cesar/ecos/packages/hal/common/current/doc/porting.sgml b/cesar/ecos/packages/hal/common/current/doc/porting.sgml
new file mode 100644
index 0000000000..6d31be33a8
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/doc/porting.sgml
@@ -0,0 +1,4383 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- porting.sgml -->
+<!-- -->
+<!-- eCos common HAL documentation -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<CHAPTER id="hal-porting-guide">
+<TITLE><!-- <index></index> --> Porting Guide</TITLE>
+
+<!-- {{{ Intro -->
+
+<section id="hal-porting-intro">
+<title>Introduction</title>
+
+<para>
+eCos has been designed to be fairly easy to port to new targets. A
+target is a specific platform (board) using a given architecture (CPU
+type). The porting is facilitated by the hierarchical layering of the
+eCos sources - all architecture and platform specific code is
+implemented in a HAL (hardware abstraction layer).
+</para>
+
+<para>
+By porting the eCos HAL to a new target the core functionality of eCos
+(infra, kernel, uITRON, etc) will be able to run on the target. It may
+be necessary to add further platform specific code such as serial
+drivers, display drivers, ethernet drivers, etc. to get a fully
+capable system.
+</para>
+
+<para>
+This document is intended as a help to the HAL porting process. Due to
+the nature of a porting job, it is impossible to give a complete
+description of what has to be done for each and every potential
+target. This should not be considered a clear-cut recipe - you will
+probably need to make some implementation decisions, tweak a few
+things, and just plain have to rely on common sense.
+</para>
+
+<para>
+However, what is covered here should be a large part of the
+process. If you get stuck, you are advised to read the
+<ulink url="http://ecos.sourceware.org/ml/ecos-discuss/">
+ecos-discuss archive
+</ulink>
+where you may find discussions which apply to the problem at
+hand. You are also invited to ask questions on the
+<ulink url="http://ecos.sourceware.org/intouch.html">
+ecos-discuss mailing list
+</ulink>
+to help you resolve problems - but as is always the case
+with community lists, do not consider it an oracle for any and all
+questions. Use common sense - if you ask too many questions which
+could have been answered by reading the
+<ulink
+url="http://ecos.sourceware.org/ecos/docs-latest/">documentation</ulink>,
+<ulink url="http://ecos.sourceware.org/fom/ecos">FAQ</ulink> or
+<ulink url="http://ecos.sourceware.org/cgi-bin/cvsweb.cgi/ecos/packages/?cvsroot=ecos">
+source code
+</ulink>, you are likely to be ignored.
+</para>
+
+<para>
+This document will be continually improved by Red Hat engineers as
+time allows. Feedback and help with improving the document is sought,
+so if you have any comments at all, please do not hesitate to post
+them on
+<ulink url="mailto:ecos-discuss@ecos.sourceware.org?subject=[porting]<subject>">
+ecos-discuss
+</ulink>
+(please prefix the subject with [porting]).
+</para>
+
+<para>
+At the moment this document is mostly an outline. There are many
+details to fill in before it becomes complete. Many places you'll just
+find a list of keywords / concepts that should be described (please
+post on ecos-discuss if there are areas you think are not covered).
+</para>
+
+<para>
+All pages or sections where the caption ends in [TBD] contain little
+more than key words and/or random thoughts - there has been no work
+done as such on the content. The word FIXME may appear in the text to
+highlight places where information is missing.
+</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ HAL Structure -->
+
+<section id="hal-porting-structure">
+<title>HAL Structure</title>
+
+<para>
+In order to write an eCos HAL it's a good idea to have at least a
+passing understanding of how the HAL interacts with the rest of the
+system.
+</para>
+
+<!-- {{{ HAL Classes -->
+
+<section>
+<title>HAL Classes</title>
+
+<para>
+The eCos HAL consists of four HAL sub-classes. This table gives a
+brief description of each class and partly reiterates the description
+in <xref linkend="hal-architecture-variant-and-platform">. The links
+refer to the on-line CVS tree (specifically to the sub-HALs used by
+the PowerPC MBX target).
+</para>
+
+<informaltable frame=all>
+<tgroup cols=3 align=left colsep=1 rowsep=1>
+<thead>
+<row>
+<entry>HAL type</entry>
+<entry>Description</entry>
+<entry>Functionality Overview</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>
+Common HAL <ulink url="http://ecos.sourceware.org/cgi-bin/cvsweb.cgi/ecos/packages/hal/common/current?cvsroot=ecos">(hal/common)</ulink>
+</entry>
+<entry>Configuration options and functionality shared by all HALs.</entry>
+<entry>Generic debugging functionality, driver API, eCos/ROM monitor
+ calling interface, and tests.</entry>
+</row>
+<row>
+ <entry>Architecture HAL <ulink url="http://ecos.sourceware.org/cgi-bin/cvsweb.cgi/ecos/packages/hal/powerpc/arch/current?cvsroot=ecos">(hal/&lt;architecture&gt;/arch)</ulink></entry>
+ <entry>Functionality specific to the given architecture. Also default
+ implementations of some functionality which can be overridden by
+ variant or platform HALs.</entry>
+ <entry>Architecture specific debugger functionality (handles single
+ stepping, exception-to-signal conversion, etc.),
+ exception/interrupt vector definitions and handlers, cache
+ definition and control macros, context switching code, assembler
+ functions for early system initialization, configuration options,
+ and possibly tests. </entry>
+</row>
+<row>
+ <entry>Variant HAL <ulink url="http://ecos.sourceware.org/cgi-bin/cvsweb.cgi/ecos/packages/hal/powerpc/mpc8xx/current?cvsroot=ecos">(hal/&lt;architecture&gt;/&lt;variant&gt;)</ulink></entry>
+ <entry>Some CPU architectures consist of a number variants, for example
+ MIPS CPUs come in both 32 and 64 bit versions, and some variants
+ have embedded features additional to the CPU core.
+</entry>
+ <entry>Variant extensions to the architecture code (cache,
+ exception/interrupt), configuration options, possibly drivers for
+ variant on-core devices, and possibly tests.</entry>
+</row>
+<row>
+ <entry>Platform HAL <ulink url="http://ecos.sourceware.org/cgi-bin/cvsweb.cgi/ecos/packages/hal/powerpc/mbx/current?cvsroot=ecos">(hal/&lt;architecture&gt;/&lt;platform&gt;)</ulink></entry>
+ <entry>Contains functionality and configuration options specific to the
+ platform.
+</entry>
+ <entry>Early platform initialization code, platform memory layout
+ specification, configuration options (processor speed, compiler
+ options), diagnostic IO functions, debugger IO functions,
+ platform specific extensions to architecture or variant code
+ (off-core interrupt controller), and possibly tests.</entry>
+</row>
+<row>
+ <entry>Auxiliary HAL <ulink url="http://ecos.sourceware.org/cgi-bin/cvsweb.cgi/ecos/packages/hal/powerpc/quicc/current?cvsroot=ecos">(hal/&lt;architecture&gt;/&lt;module&gt;)</ulink></entry>
+ <entry>Some variants share common modules on the core. Motorola's PowerPC
+ QUICC is an example of such a module.
+</entry>
+ <entry>Module specific functionality (interrupt controller, simple
+ device drivers), possibly tests.
+</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ File Descriptions -->
+
+<section>
+<title>File Descriptions</title>
+
+<para>
+Listed below are the files found in various HALs, with a short
+description of what each file contains. When looking in existing HALs
+beware that they do not necessarily follow this naming scheme.
+If you are writing a new HAL, please try to follow it as
+closely as possible. Still, no two targets are the same, so sometimes
+it makes sense to use additional files.
+</para>
+
+<!-- {{{ Common HAL -->
+
+<section>
+<title>Common HAL</title>
+
+<informaltable frame=all>
+<tgroup cols=2 align=left colsep=1 rowsep=1>
+<thead>
+<row>
+<entry>File</entry>
+<entry>Description</entry>
+</row>
+</thead>
+<tbody>
+
+<row>
+<entry><filename>include/dbg-thread-syscall.h</filename></entry>
+ <entry>Defines the thread debugging syscall function. This is used by
+ the ROM monitor to access the thread debugging API in the RAM
+ application. <!-- FIXME: link thread debug description -->.</entry>
+</row>
+<row>
+<entry><filename>include/dbg-threads-api.h</filename></entry>
+ <entry>Defines the thread debugging API. <!-- FIXME: link thread
+ debug description -->.</entry>
+</row>
+<row>
+<entry><filename>include/drv_api.h</filename></entry>
+ <entry>Defines the driver API.</entry>
+</row>
+<row>
+<entry><filename>include/generic-stub.h</filename></entry>
+ <entry>Defines the generic stub features.</entry>
+</row>
+<row>
+<entry><filename>include/hal_if.h</filename></entry>
+ <entry>Defines the ROM/RAM calling interface API.</entry>
+</row>
+<row>
+<entry><filename>include/hal_misc.h</filename></entry>
+ <entry>Defines miscellaneous helper functions shared by all HALs.</entry>
+</row>
+<row>
+<entry><filename>include/hal_stub.h</filename></entry>
+ <entry>Defines eCos mappings of GDB stub features.</entry>
+</row>
+<row>
+<entry><filename>src/dbg-threads-syscall.c</filename></entry>
+ <entry>Thread debugging implementation.</entry>
+</row>
+<row>
+<entry><filename>src/drv_api.c</filename></entry>
+ <entry>Driver API implementation. Depending on configuration this
+ provides either wrappers for the kernel API, or a minimal
+ implementation of these features. This allows drivers to be written
+ relying only on HAL features.</entry>
+</row>
+<row>
+<entry><filename>src/dummy.c</filename></entry>
+ <entry>Empty dummy file ensuring creation of libtarget.a.</entry>
+</row>
+<row>
+<entry><filename>src/generic-stub.c</filename></entry>
+ <entry>Generic GDB stub implementation. This provides the
+ communication protocol used to communicate with GDB over a serial
+ device or via the network.</entry>
+</row>
+<row>
+<entry><filename>src/hal_if.c</filename></entry>
+ <entry>ROM/RAM calling interface implementation. Provides wrappers from
+ the calling interface API to the eCos features used for the
+ implementation.</entry>
+</row>
+<row>
+<entry><filename>src/hal_misc.c</filename></entry>
+ <entry>Various helper functions shared by all platforms and
+ architectures.</entry>
+</row>
+<row>
+<entry><filename>src/hal_stub.c</filename></entry>
+ <entry>Wrappers from eCos HAL features to the features required by the
+ generic GDB stub.</entry>
+</row>
+<row>
+<entry><filename>src/stubrom/stubrom.c</filename></entry>
+ <entry>The file used to build eCos GDB stub images. Basically a
+ cyg_start function with a hard coded breakpoint.</entry>
+</row>
+<row>
+<entry><filename>src/thread-packets.c</filename></entry>
+ <entry>More thread debugging related functions.</entry>
+</row>
+<row>
+<entry><filename>src/thread-pkts.h</filename></entry>
+ <entry>Defines more thread debugging related function.</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Architecture HAL -->
+
+<section>
+<title>Architecture HAL</title>
+
+<para>Some architecture HALs may add extra files for architecture
+specific serial drivers, or for handling interrupts and exceptions if it
+makes sense.</para>
+
+<para>Note that many of the definitions in these files are only
+conditionally defined - if the equivalent variant or platform headers
+provide the definitions, those override the generic architecture
+definitions.</para>
+
+<informaltable frame=all>
+<tgroup cols=2 align=left colsep=1 rowsep=1>
+<thead>
+<row>
+<entry>File</entry>
+<entry>Description</entry>
+</row>
+</thead>
+<tbody>
+
+<row>
+<entry><filename>include/arch.inc</filename></entry>
+ <entry>Various assembly macros used during system initialization.</entry>
+</row>
+<row>
+<entry><filename>include/basetype.h</filename></entry>
+ <entry>Endian, label, alignment, and type size definitions. These
+ override common defaults in CYGPKG_INFRA.</entry>
+</row>
+<row>
+<entry><filename>include/hal_arch.h</filename></entry>
+ <entry>Saved register frame format, various thread, register and stack
+ related macros.</entry>
+</row>
+<row>
+<entry><filename>include/hal_cache.h</filename></entry>
+ <entry>Cache definitions and cache control macros.</entry>
+</row>
+<row>
+<entry><filename>include/hal_intr.h</filename></entry>
+ <entry>Exception and interrupt definitions. Macros for configuring and
+ controlling interrupts. eCos real-time clock control macros.</entry>
+</row>
+<row>
+<entry><filename>include/hal_io.h</filename></entry>
+ <entry>Macros for accessing IO devices.</entry>
+</row>
+<row>
+<entry><filename>include/&lt;arch&gt;_regs.h</filename></entry>
+ <entry>Architecture register definitions.</entry>
+</row>
+<row>
+<entry><filename>include/&lt;arch&gt;_stub.h</filename></entry>
+ <entry>Architecture stub definitions. In particular the register frame
+ layout used by GDB. This may differ from the one used by eCos.</entry>
+</row>
+<row>
+<entry><filename>include/&lt;arch&gt;.inc</filename></entry>
+ <entry>Architecture convenience assembly macros.</entry>
+</row>
+<row>
+<entry><filename>src/&lt;arch&gt;.ld</filename></entry>
+ <entry>Linker macros.</entry>
+</row>
+<row>
+<entry><filename>src/context.S</filename></entry>
+ <entry>Functions handling context switching and setjmp/longjmp.</entry>
+</row>
+<row>
+<entry><filename>src/hal_misc.c</filename></entry>
+ <entry>Exception and interrupt handlers in C. Various other utility
+ functions.</entry>
+</row>
+<row>
+<entry><filename>src/hal_mk_defs.c</filename></entry>
+ <entry>Used to export definitions from C header files to assembler
+ header files.</entry>
+</row>
+<row>
+<entry><filename>src/hal_intr.c</filename></entry>
+ <entry>Any necessary interrupt handling functions.</entry>
+</row>
+<row>
+<entry><filename>src/&lt;arch&gt;stub.c</filename></entry>
+ <entry>Architecture stub code. Contains functions for translating eCos
+ exceptions to UNIX signals and functions for single-stepping.</entry>
+</row>
+<row>
+<entry><filename>src/vectors.S</filename></entry>
+ <entry>Exception, interrupt and early initialization code.</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Variant HAL -->
+
+<section>
+<title>Variant HAL</title>
+
+<para>Some variant HALs may add extra files for variant specific serial
+drivers, or for handling interrupts/exceptions if it makes sense.</para>
+
+<para>Note that these files may be mostly empty if the CPU variant can be
+controlled by the generic architecture macros. The definitions present
+are only conditionally defined - if the equivalent platform headers
+provide the definitions, those override the variant definitions.</para>
+
+<informaltable frame=all>
+<tgroup cols=2 align=left colsep=1 rowsep=1>
+<thead>
+<row>
+<entry>File</entry>
+<entry>Description</entry>
+</row>
+</thead>
+<tbody>
+
+<row>
+<entry><filename>include/var_arch.h</filename></entry>
+ <entry>Saved register frame format, various thread, register and stack
+ related macros.</entry>
+</row>
+<row>
+<entry><filename>include/var_cache.h</filename></entry>
+ <entry>Cache related macros.</entry>
+</row>
+<row>
+<entry><filename>include/var_intr.h</filename></entry>
+ <entry>Interrupt related macros.</entry>
+</row>
+<row>
+<entry><filename>include/var_regs.h</filename></entry>
+ <entry>Extra register definitions for the CPU variant.</entry>
+</row>
+<row>
+<entry><filename>include/variant.inc</filename></entry>
+ <entry>Various assembly macros used during system initialization.</entry>
+</row>
+<row>
+<entry><filename>src/var_intr.c</filename></entry>
+ <entry>Interrupt functions if necessary.</entry>
+</row>
+<row>
+<entry><filename>src/var_misc.c</filename></entry>
+ <entry>hal_variant_init function and any necessary extra functions.</entry>
+</row>
+<row>
+<entry><filename>src/variant.S</filename></entry>
+ <entry>Interrupt handler table definition.</entry>
+</row>
+<row>
+<entry><filename>src/&lt;arch&gt;_&lt;variant&gt;.ld</filename></entry>
+ <entry>Linker macros.</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Platform HAL -->
+
+<section>
+<title>Platform HAL</title>
+
+<para>Extras files may be added for platform specific serial
+drivers. Extra files for handling interrupts and exceptions will be
+present if it makes sense.</para>
+
+<informaltable frame=all>
+<tgroup cols=2 align=left colsep=1 rowsep=1>
+<thead>
+<row>
+<entry>File</entry>
+<entry>Description</entry>
+</row>
+</thead>
+<tbody>
+
+<row>
+<entry><filename>include/hal_diag.h</filename></entry>
+ <entry>Defines functions used for HAL diagnostics output. This would
+ normally be the ROM calling interface wrappers, but may also be the
+ low-level IO functions themselves, saving a little overhead.</entry>
+</row>
+<row>
+<entry><filename>include/platform.inc</filename></entry>
+
+ <entry>Platform initialization code. This includes memory controller,
+ vectors, and monitor initialization. Depending on the architecture,
+ other things may need defining here as well: interrupt decoding,
+ status register initialization value, etc.</entry>
+
+</row>
+<row>
+<entry><filename>include/plf_cache.h</filename></entry>
+ <entry>Platform specific cache handling.</entry>
+</row>
+<row>
+<entry><filename>include/plf_intr.h</filename></entry>
+ <entry>Platform specific interrupt handling.</entry>
+</row>
+<row>
+<entry><filename>include/plf_io.h</filename></entry>
+ <entry>PCI IO definitions and macros. May also be used to override
+ generic HAL IO macros if the platform endianness differs from that of
+ the CPU.</entry>
+</row>
+<row>
+<entry><filename>include/plf_stub.h</filename></entry>
+ <entry>Defines stub initializer and board reset details.</entry>
+</row>
+<row>
+<entry><filename>src/hal_diag.c</filename></entry>
+ <entry>May contain the low-level device drivers. But these may also
+ reside in plf_stub.c</entry>
+</row>
+<row>
+<entry><filename>src/platform.S</filename></entry>
+ <entry>Memory controller setup macro, and if necessary interrupt
+ springboard code.</entry>
+</row>
+<row>
+<entry><filename>src/plf_misc.c</filename></entry>
+ <entry>Platform initialization code.</entry>
+</row>
+<row>
+<entry><filename>src/plf_mk_defs.c</filename></entry>
+ <entry>Used to export definitions from C header files to assembler
+ header files.</entry>
+</row>
+<row>
+<entry><filename>src/plf_stub.c</filename></entry>
+ <entry>Platform specific stub initialization and possibly the low-level
+ device driver.</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>The platform HAL also contains files specifying the platform's
+memory layout. These files are located in
+<filename>include/pkgconf</filename>.</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Auxiliary HAL -->
+
+<section>
+<title>Auxiliary HAL</title>
+
+<para>Auxiliary HALs contain whatever files are necessary to provide the
+required functionality. There are no predefined set of files required
+in an auxiliary HAL.</para>
+
+</section>
+
+<!-- }}} -->
+
+</section>
+
+<!-- }}} -->
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ ROM Monitor Calling Interface -->
+
+<section id="hal-calling-if">
+<TITLE>Virtual Vectors (eCos/ROM Monitor Calling Interface)</TITLE>
+
+<para>
+Virtually all eCos platforms provide full debugging capabilities
+via RedBoot. This enviroment contains not only debug stubs based
+on GDB, but also rich I/O support which can be exported to loaded
+programs. Such programs can take advantage of the I/O capabilities
+using a special ROM/RAM calling interface
+(also referred to as virtual vector table).
+eCos programs make use of the virtual vector mechanism implicitly.
+Non-eCos programs can access these functions using the support from
+the <emphasis>newlib</emphasis> library.
+</para>
+
+<!-- {{{ Virtual Vectors -->
+
+<section id="hal-porting-virtual-vectors">
+<title>Virtual Vectors</title>
+
+<para>What are virtual vectors, what do they do, and why are they
+needed?
+</para>
+
+<para>
+"Virtual vectors" is the name of a table located at a static
+location in the target address space. This table contains 64 vectors
+that point to <emphasis>service</emphasis> functions or data.
+</para>
+
+<para>The fact that the vectors are always placed at the same location in
+the address space means that both ROM and RAM startup configurations
+can access these and thus the services pointed to.</para>
+
+<para>The primary goal is to allow services to be provided by ROM
+configurations (ROM monitors such as RedBoot in particular) with
+<emphasis>clients</emphasis> in RAM configurations being able to use these
+services.</para>
+
+<para>Without the table of pointers this would be impossible since the
+ROM and RAM applications would be linked separately - in effect having
+separate name spaces - preventing direct references from one to the
+other.</para>
+
+<para>This decoupling of service from client is needed by RedBoot,
+allowing among other things debugging of applications which do not
+contain debugging client code (stubs).</para>
+
+<!-- {{{ Initialization -->
+
+<section>
+<title>Initialization (or Mechanism vs. Policy)</title>
+
+<para>Virtual vectors are a <emphasis>mechanism</emphasis> for decoupling services
+from clients in the address space.</para>
+
+<para>The mechanism allows services to be implemented by a ROM
+monitor, a RAM application, to be switched out at run-time, to be
+disabled by installing pointers to dummy functions, etc.</para>
+
+<para>The appropriate use of the mechanism is specified loosely by a
+<emphasis>policy</emphasis>. The general policy dictates that the vectors are
+initialized in whole by ROM monitors (built for ROM or RAM), or by
+stand-alone applications.</para>
+
+<para>For configurations relying on a ROM monitor environment, the policy
+is to allow initialization on a service by service basis. The default
+is to initialize all services, except COMMS services since these are
+presumed to already be carrying a communication session to the
+debugger / console which was used for launching the application. This
+means that the bulk of the code gets tested in normal builds, and not
+just once in a blue moon when building new stubs or a ROM
+configuration.</para>
+
+<para>The configuration options are written to comply with this policy by
+default, but can be overridden by the user if desired. Defaults
+are:</para>
+
+<itemizedlist>
+<listitem><para>For application development: the ROM monitor provides
+debugging and diagnostic IO services, the RAM application relies
+on these by default.</para>
+</listitem>
+<listitem>
+<para>For production systems: the application contains all the
+necessary services.</para>
+</listitem>
+
+</itemizedlist>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Pros and Cons -->
+
+<section>
+<title>Pros and Cons of Virtual Vectors</title>
+
+<para>
+There are pros and cons associated with the use of virtual
+vectors. We do believe that the pros generally outweigh the cons by a
+great margin, but there may be situations where the opposite is
+true.
+</para>
+
+<para>
+The use of the services are implemented by way of macros, meaning
+that it is possible to circumvent the virtual vectors if
+desired. There is (as yet) no implementation for doing this, but it is
+possible.
+</para>
+
+<para>Here is a list of pros and cons:</para>
+
+<variablelist>
+<varlistentry><term>Pro: Allows debugging without including stubs</term>
+
+ <listitem><para>This is the primary reason for using virtual vectors. It
+ allows the ROM monitor to provide most of the debugging
+ infrastructure, requiring only the application to provide
+ hooks for asynchronous debugger interrupts and for accessing
+ kernel thread information.</para></listitem></varlistentry>
+
+<varlistentry><term>Pro: Allows debugging to be initiated from arbitrary
+ channel</term>
+
+ <listitem><para> While this is only true where the application does not
+ actively override the debugging channel setup, it is a very
+ nice feature during development. In particular it makes it
+ possible to launch (and/or debug) applications via Ethernet
+ even though the application configuration does not contain
+ networking support.</para></listitem></varlistentry>
+
+<varlistentry><term>Pro: Image smaller due to services being provided by ROM
+ monitor</term>
+
+ <listitem><para>All service functions except HAL IO are included in the
+ default configuration. But if these are all disabled the
+ image for download will be a little smaller. Probably
+ doesn't matter much for regular development, but it is a
+ worthwhile saving for the 20000 daily tests run in the Red
+ Hat eCos test farm.</para></listitem></varlistentry>
+
+<varlistentry><term>Con: The vectors add a layer of indirection, increasing application
+ size and reducing performance.</term>
+
+ <listitem><para>The size increase is a fraction of what is required to
+ implement the services. So for RAM configurations there is
+ a net saving, while for ROM configurations there is a small
+ overhead.</para>
+
+ <para>The performance loss means little for most of the
+ services (of which the most commonly used is diagnostic IO
+ which happens via polled routines
+ anyway).</para></listitem>
+</varlistentry>
+
+<varlistentry><term>Con: The layer of indirection is another point of
+ failure.</term>
+
+ <listitem><para> The concern primarily being that of vectors being
+ trashed by rogue writes from bad code, causing a complete
+ loss of the service and possibly a crash. But this does
+ not differ much from a rogue write to anywhere else in the
+ address space which could cause the same amount of
+ mayhem. But it is arguably an additional point of failure
+ for the service in question.</para></listitem></varlistentry>
+
+<varlistentry><term>Con: All the indirection stuff makes it harder to bring a HAL
+ up</term>
+
+ <listitem><para> This is a valid concern. However, seeing as most of the
+ code in question is shared between all HALs and should
+ remain unchanged over time, the risk of it being broken
+ when a new HAL is being worked on should be
+ minimal.</para>
+
+ <para> When starting a new port, be sure to implement the HAL
+ IO drivers according to the scheme used in other drivers,
+ and there should be no problem.</para>
+
+ <para> However, it is still possible to circumvent the vectors
+ if they are suspect of causing problems: simply change the
+ HAL_DIAG_INIT and HAL_DIAG_WRITE_CHAR macros to use the raw
+ IO functions.</para></listitem></varlistentry>
+</variablelist>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Available Services -->
+
+<section>
+<title>Available services</title>
+
+<para>
+The <filename>hal_if.h</filename> file in the common HAL defines the
+complete list of available services. A few worth mentioning in
+particular:</para>
+
+<itemizedlist>
+<listitem> <para>COMMS services. All HAL IO happens via the communication
+ channels.</para>
+</listitem>
+<listitem> <para>uS delay. Fine granularity (busy wait) delay function.</para>
+</listitem>
+<listitem> <para>Reset. Allows a software initiated reset of the board.</para>
+</listitem>
+</itemizedlist>
+
+</section>
+
+<!-- }}} -->
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ The COMMS Channels -->
+
+<section>
+<title>The COMMS channels</title>
+
+<para>As all HAL IO happens via the COMMS channels these deserve to be
+described in a little more detail. In particular the controls of where
+diagnostic output is routed and how it is treated to allow for display
+in debuggers.</para>
+
+<!-- {{{ Console and Debuggers Channels -->
+
+<section>
+<title>Console and Debugging Channels</title>
+
+<para>There are two COMMS channels - one for console IO and one for
+debugging IO. They can be individually configured to use any of the
+actual IO ports (serial or Ethernet) available on the platform.</para>
+
+<para>The console channel is used for any IO initiated by calling the
+<function>diag_*()</function> functions. Note that these should only be used during
+development for debugging, assertion and possibly tracing
+messages. All proper IO should happen via proper devices. This means
+it should be possible to remove the HAL device drivers from production
+configurations where assertions are disabled.</para>
+
+<para>The debugging channel is used for communication between the
+debugger and the stub which remotely controls the target for the
+debugger (the stub runs on the target). This usually happens via some
+protocol, encoding commands and replies in some suitable form.</para>
+
+<para>Having two separate channels allows, e.g., for simple logging
+without conflicts with the debugger or interactive IO which some
+debuggers do not allow.</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Mangling -->
+
+<section>
+<title>Mangling</title>
+
+<para>As debuggers usually have a protocol using specialized commands
+when communicating with the stub on the target, sending out text as
+raw ASCII from the target on the same channel will either result in
+protocol errors (with loss of control over the target) or the text may
+just be ignored as junk by the debugger.</para>
+
+<para>To get around this, some debuggers have a special command for text
+output. Mangling is the process of encoding diagnostic ASCII text
+output in the form specified by the debugger protocol.</para>
+
+<para>When it is necessary to use mangling, i.e. when writing console
+output to the same port used for debugging, a mangler function is
+installed on the console channel which mangles the text and passes it
+on to the debugger channel.</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Controlling the Console Channel -->
+
+<section>
+<title>Controlling the Console Channel</title>
+
+<para>Console output configuration is either inherited from the ROM
+monitor launching the application, or it is specified by the
+application. This is controlled by the new option
+<literal>CYGSEM_HAL_VIRTUAL_VECTOR_INHERIT_CONSOLE</literal> which
+defaults to enabled when the configuration is set to use a ROM
+monitor.</para>
+
+<para>If the user wants to specify the console configuration in the
+application image, there are two new options that are used for
+this.</para>
+
+<para>Defaults are to direct diagnostic output via a mangler to the
+debugging channel (<literal>CYGDBG_HAL_DIAG_TO_DEBUG_CHAN</literal>
+enabled). The mangler type is controlled by the option
+<literal>CYGSEM_HAL_DIAG_MANGLER</literal>. At present there are only
+two mangler types:</para>
+
+<variablelist>
+<varlistentry><term><acronym>GDB</acronym></term>
+
+ <listitem><para> This causes a mangler appropriate for debugging with GDB to be
+ installed on the console channel.</para></listitem></varlistentry>
+
+<varlistentry><term>None</term>
+
+ <listitem><para> This causes a NULL mangler to be installed on the console
+ channel. It will redirect the IO to/from the debug channel
+ without mangling of the data. This option differs from setting
+ the console channel to the same IO port as the debugging
+ channel in that it will keep redirecting data to the debugging
+ channel even if that is changed to some other port.</para></listitem></varlistentry>
+
+</variablelist>
+
+<para>Finally, by disabling <literal>CYGDBG_HAL_DIAG_TO_DEBUG_CHAN</literal>, the diagnostic
+output is directed in raw form to the specified console IO port.</para>
+
+<para>In summary this results in the following common configuration
+scenarios for RAM startup configurations:</para>
+
+<itemizedlist>
+<listitem><para> For regular debugging with diagnostic output appearing in the
+ debugger, mangling is enabled and stubs disabled.</para>
+
+ <para>Diagnostic output appears via the debugging channel as
+ initiated by the ROM monitor, allowing for correct behavior
+ whether the application was launched via serial or Ethernet, from
+ the RedBoot command line or from a debugger.</para>
+</listitem>
+
+<listitem><para> For debugging with raw diagnostic output, mangling is
+ disabled.</para>
+
+ <para> Debugging session continues as initiated by the ROM monitor,
+ whether the application was launched via serial or
+ Ethernet. Diagnostic output is directed at the IO port configured
+ in the application configuration.</para>
+
+ <note>
+ <title>Note:</title>
+ <para> There is one caveat to be aware of. If the
+ application uses proper devices (be it serial or Ethernet) on
+ the same ports as those used by the ROM monitor, the
+ connections initiated by the ROM monitor will be
+ terminated.</para>
+ </note>
+</listitem>
+
+</itemizedlist>
+
+<para>And for ROM startup configurations:</para>
+
+<itemizedlist>
+<listitem><para> Production configuration with raw output and no debugging
+ features (configured for RAM or ROM), mangling is disabled, no
+ stubs are included.</para>
+
+ <para>Diagnostic output appears (in unmangled form) on the specified
+ IO port.</para>
+</listitem>
+
+<listitem><para> RedBoot configuration, includes debugging features and necessary
+ mangling.</para>
+
+ <para>Diagnostic and debugging output port is auto-selected by the
+ first connection to any of the supported IO ports. Can change
+ from interactive mode to debugging mode when a debugger is
+ detected - when this happens a mangler will be installed as
+ required.</para>
+</listitem>
+
+<listitem><para> GDB stubs configuration (obsoleted by RedBoot configuration),
+ includes debugging features, mangling is hardwired to GDB
+ protocol.</para>
+
+ <para>Diagnostic and debugging output is hardwired to configured IO
+ ports, mangling is hardwired.</para>
+</listitem>
+
+</itemizedlist>
+</section>
+
+<!-- }}} -->
+<!-- {{{ Footnote: Design Reasoning -->
+
+<section>
+<title>Footnote: Design Reasoning for Control of Console Channel</title>
+
+<para>The current code for controlling the console channel is a
+replacement for an older implementation which had some shortcomings
+which addressed by the new implementation.</para>
+
+<para>This is what the old implementation did: on initialization it would
+check if the CDL configured console channel differed from the active
+debug channel - and if so, set the console channel, thereby disabling
+mangling.</para>
+
+<para>The idea was that whatever channel was configured to be used for
+console (i.e., diagnostic output) in the application was what should
+be used. Also, it meant that if debug and console channels were
+normally the same, a changed console channel would imply a request for
+unmangled output.</para>
+
+<para>But this prevented at least two things:</para>
+
+<itemizedlist>
+<listitem><para> It was impossible to inherit the existing connection by which
+ the application was launched (either by RedBoot commands via
+ telnet, or by via a debugger).</para>
+
+ <para>This was mostly a problem on targets supporting Ethernet
+ access since the diagnostic output would not be returned via the
+ Ethernet connection, but on the configured serial port.</para>
+
+ <para>The problem also occurred on any targets with multiple serial
+ ports where the ROM monitor was configured to use a different
+ port than the CDL defaults.</para>
+</listitem>
+
+<listitem><para> Proper control of when to mangle or just write out raw ASCII
+ text.</para>
+
+ <para>Sometimes it's desirable to disable mangling, even if the
+ channel specified is the same as that used for debugging. This
+ usually happens if GDB is used to download the application, but
+ direct interaction with the application on the same channel is
+ desired (GDB protocol only allows output from the target, no
+ input).</para>
+</listitem>
+</itemizedlist>
+
+</section>
+
+<!-- }}} -->
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ The Calling Interface API -->
+
+<section>
+<title>The calling Interface API</title>
+
+<para>The calling interface API is defined by hal_if.h and hal_if.c in
+hal/common.</para>
+
+<para>The API provides a set of services. Different platforms, or
+different versions of the ROM monitor for a single platform, may
+implement fewer or extra service. The table has room for growth, and
+any entries which are not supported map to a NOP-service (when called
+it returns 0 (<literal>false</literal>)).
+</para>
+
+<para>A client of a service should either be selected by configuration,
+or have suitable fall back alternatives in case the feature is not
+implemented by the ROM monitor.
+</para>
+
+<note>
+<title>Note:</title>
+<para>
+Checking for unimplemented service when this may be a data
+field/pointer instead of a function: suggest reserving the last entry
+in the table as the NOP-service pointer. Then clients can compare a
+service entry with this pointer to determine whether it's initialized
+or not.
+</para>
+</note>
+
+<para>The header file <filename>cyg/hal/hal_if.h</filename> defines
+ the table layout and accessor macros (allowing primitive type
+ checking and alternative implementations should it become necessary).
+</para>
+
+<para>The source file <filename>hal_if.c</filename> defines the table
+ initialization function. All HALs should call this during platform
+ initialization - the table will get initialized according to
+ configuration. Also defined here are wrapper functions which map
+ between the calling interface API and the API of the used eCos
+ functions.
+</para>
+
+<!-- {{{ Implemented Services -->
+
+<section>
+<title>Implemented Services</title>
+
+<para>This is a brief description of the services, some of which are
+described in further detail below.</para>
+
+<variablelist>
+<varlistentry><term><literal>VERSION</literal></term>
+ <listitem><para>Version of table. Serves as a way to check for how many
+ features are available in the table. This is the index of the
+ last service in the table.</para></listitem></varlistentry>
+<varlistentry><term><literal>KILL_VECTOR</literal></term>
+ <listitem><para>[Presently unused by the stub code, but initialized] This
+ vector defines a function to execute when the system receives
+ a kill signal from the debugger. It is initialized with the
+ reset function (see below), but the application (or eCos) can
+ override it if necessary.</para></listitem></varlistentry>
+<varlistentry><term><literal>CONSOLE_PROCS</literal></term>
+ <listitem><para>The communication procedure table used for console IO
+ (see <xref linkend="hal-porting-io-channels">.</para></listitem></varlistentry>
+<varlistentry><term><literal>DEBUG_PROCS</literal></term>
+ <listitem><para>The communication procedure table used for debugger IO
+ (see <xref linkend="hal-porting-io-channels">).</para></listitem></varlistentry>
+<varlistentry><term><literal>FLUSH_DCACHE</literal></term>
+ <listitem><para>Flushes the data cache for the specified
+ region. Some implementations may flush the entire data cache.</para></listitem></varlistentry>
+<varlistentry><term><literal>FLUSH_ICACHE</literal></term>
+ <listitem><para>Flushes (invalidates) the instruction cache
+ for the specified region. Some implementations may flush the
+ entire instruction cache.</para></listitem></varlistentry>
+<varlistentry><term><literal>SET_DEBUG_COMM</literal></term>
+ <listitem><para>Change debugging communication channel.</para></listitem></varlistentry>
+<varlistentry><term><literal>SET_CONSOLE_COMM</literal></term>
+ <listitem><para>Change console communication channel.</para></listitem></varlistentry>
+<varlistentry><term><literal>DBG_SYSCALL</literal></term>
+ <listitem><para>Vector used to communication between debugger functions in
+ ROM and in RAM. RAM eCos configurations may install a function
+ pointer here which the ROM monitor uses to get thread
+ information from the kernel running in RAM.</para></listitem></varlistentry>
+<varlistentry><term><literal>RESET</literal></term>
+ <listitem><para>Resets the board on call. If it is not possible to reset
+ the board from software, it will jump to the ROM entry point
+ which will perform a "software" reset of the board.</para></listitem></varlistentry>
+<varlistentry><term><literal>CONSOLE_INTERRUPT_FLAG</literal></term>
+ <listitem><para>Set if a debugger interrupt request was detected while
+ processing console IO. Allows the actual breakpoint action to
+ be handled after return to RAM, ensuring proper backtraces
+ etc.</para></listitem></varlistentry>
+<varlistentry><term><literal>DELAY_US</literal></term>
+ <listitem><para>Will delay the specified number of microseconds. The
+ precision is platform dependent to some extend - a small value
+ (<100us) is likely to cause bigger delays than requested.</para></listitem></varlistentry>
+<varlistentry><term><literal>FLASH_CFG_OP</literal></term>
+ <listitem><para>For accessing configuration settings kept in flash memory.</para></listitem></varlistentry>
+<varlistentry><term><literal>INSTALL_BPT_FN</literal></term>
+ <listitem><para>Installs a breakpoint at the specified address. This is
+ used by the asynchronous breakpoint support
+ (see <!-- <xref linkend="hal-stubs-async-bps"> -->).</para></listitem></varlistentry>
+</variablelist>
+</section>
+
+<!-- }}} -->
+<!-- {{{ Compatibility -->
+
+<section>
+<title>Compatibility</title>
+
+<para>When a platform is changed to support the calling interface,
+applications will use it if so configured. That means that if an
+application is run on a platform with an older ROM monitor, the
+service is almost guaranteed to fail.
+</para>
+
+<para>For this reason, applications should only use Console Comm for HAL
+diagnostics output if explicitly configured to do so
+(<literal>CYGSEM_HAL_VIRTUAL_VECTOR_DIAG</literal>).
+</para>
+
+<para>As for asynchronous GDB interrupts, the service will always be
+used. This is likely to cause a crash under older ROM monitors, but
+this crash may be caught by the debugger. The old workaround still
+applies: if you need asynchronous breakpoints or thread debugging
+under older ROM monitors, you may have to include the debugging
+support when configuring eCos.
+</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Implementation Details -->
+
+<section>
+<title>Implementation details</title>
+
+<para>During the startup of a ROM monitor, the calling table will be
+initialized. This also happens if eCos is configured <emphasis>not</emphasis> to rely on
+a ROM monitor.
+</para>
+
+<note>
+<title>Note:</title>
+<para> There is reserved space (256 bytes) for the vector
+table whether it gets used or not. This may be something that we want
+to change if we ever have to shave off every last byte for a given
+target.
+</para>
+</note>
+
+<para>If thread debugging features are enabled, the function for accessing
+the thread information gets registered in the table during startup of
+a RAM startup configuration.
+</para>
+
+<para>Further implementation details are described where the service itself
+is described.</para>
+
+<!--
+FIXME: Need to describe the CYGARC_HAL_SAVE_GP() and
+CYGARC_HAL_RESTORE_GP() macros.
+-->
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ New Platform Ports -->
+
+<section>
+<title>New Platform Ports</title>
+
+<para>The <function>hal_platform_init()</function> function must call
+<function>hal_if_init()</function>.
+</para>
+
+<para>The HAL serial driver must, when called via
+<function>cyg_hal_plf_comms_init()</function> must initialize the
+communication channels.
+</para>
+
+<para>The <function>reset()</function> function defined in
+<filename>hal_if.c</filename> will attempt to do a hardware reset, but
+if this fails it will fall back to simply jumping to the reset
+entry-point. On most platforms the startup initialization will go a
+long way to reset the target to a sane state (there will be
+exceptions, of course). For this reason, make sure to define
+<literal>HAL_STUB_PLATFORM_RESET_ENTRY</literal> in plf_stub.h.
+</para>
+
+<para>All debugging features must be in place in order for the debugging
+services to be functional. See general platform porting notes.
+</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ New Architecture Ports -->
+
+<section>
+<title>New architecture ports</title>
+
+<para>There are no specific requirements for a new architecture port in
+order to support the calling interface, but the basic debugging
+features must be in place. See general architecture porting notes.
+</para>
+</section>
+
+<!-- }}} -->
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ IO Channels -->
+
+<section id="hal-porting-io-channels">
+<title>IO channels</title>
+
+
+<para>The calling interface provides procedure tables for all IO channels on
+the platform. These are used for console (diagnostic) and debugger IO,
+allowing a ROM monitor to provided all the needed IO routines. At
+the same time, this makes it easy to switch console/debugger channels
+at run-time (the old implementation had hardwired drivers for console
+and debugger IO, preventing these to change at run-time).
+</para>
+
+<para>The hal_if provides wrappers which interface these services to the
+eCos infrastructure diagnostics routines. This is done in a way which
+ensures proper string mangling of the diagnostics output when required
+(e.g. O-packetization when using a GDB compatible ROM monitor).
+</para>
+
+<!-- {{{ Available Procedures -->
+
+<section>
+<title>Available Procedures</title>
+
+<para>This is a brief description of the procedures</para>
+
+<variablelist>
+<varlistentry><term><literal>CH_DATA</literal></term>
+<listitem><para>Pointer to the controller IO base (or a pointer to a per-device
+ structure if more data than the IO base is required). All the
+ procedures below are called with this data item as the first
+ argument.</para></listitem></varlistentry>
+
+<varlistentry><term><literal>WRITE</literal></term>
+ <listitem><para>Writes the buffer to the device.</para></listitem></varlistentry>
+<varlistentry><term><literal>READ</literal></term>
+ <listitem><para>Fills a buffer from the device.</para></listitem></varlistentry>
+<varlistentry><term><literal>PUTC</literal></term>
+ <listitem><para>Write a character to the device.</para></listitem></varlistentry>
+<varlistentry><term><literal>GETC</literal></term>
+ <listitem><para>Read a character from the device.</para></listitem></varlistentry>
+<varlistentry><term><literal>CONTROL</literal></term>
+ <listitem><para>Device feature control. Second argument specifies function:</para>
+ <variablelist>
+ <varlistentry><term><literal>SETBAUD</literal></term>
+ <listitem><para>Changes baud rate.</para></listitem></varlistentry>
+ <varlistentry><term><literal>GETBAUD</literal></term>
+ <listitem><para>Returns the current baud rate.</para></listitem></varlistentry>
+ <varlistentry><term><literal>INSTALL_DBG_ISR</literal></term>
+ <listitem><para>[Unused]</para></listitem></varlistentry>
+ <varlistentry><term><literal>REMOVE_DBG_ISR</literal></term>
+ <listitem><para>[Unused]</para></listitem></varlistentry>
+ <varlistentry><term><literal>IRQ_DISABLE</literal></term>
+ <listitem><para>Disable debugging receive interrupts on the device.</para></listitem></varlistentry>
+ <varlistentry><term><literal>IRQ_ENABLE</literal></term>
+ <listitem><para>Enable debugging receive interrupts on the device.</para></listitem></varlistentry>
+ <varlistentry><term><literal>DBG_ISR_VECTOR</literal></term>
+ <listitem><para>Returns the ISR vector used by the device for debugging
+ receive interrupts.</para></listitem></varlistentry>
+ <varlistentry><term><literal>SET_TIMEOUT</literal></term>
+ <listitem><para>Set GETC timeout in milliseconds.</para></listitem></varlistentry>
+ <varlistentry><term><literal>FLUSH_OUTPUT</literal></term>
+ <listitem><para>Forces driver to flush data in its buffers. Note
+ that this may not affect hardware buffers
+ (e.g. FIFOs).</para></listitem></varlistentry>
+ </variablelist>
+ </listitem></varlistentry>
+
+<varlistentry><term><literal>DBG_ISR</literal></term>
+ <listitem><para>ISR used to handle receive interrupts from the
+ device (see <!-- <xref linkend="hal-stubs-async-bps"> -->).</para></listitem></varlistentry>
+<varlistentry><term><literal>GETC_TIMEOUT</literal></term>
+ <listitem><para>Read a character from the device with timeout.</para></listitem></varlistentry>
+</variablelist>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Usage -->
+
+<section><title>Usage</title>
+
+<para>The standard eCos diagnostics IO functions use the channel
+procedure table when <literal>CYGSEM_HAL_VIRTUAL_VECTOR_DIAG</literal> is enabled. That
+means that when you use diag_printf (or the libc printf function) the
+stream goes through the selected console procedure table. If you use
+the virtual vector function SET_CONSOLE_COMM you can change the device
+which the diagnostics output goes to at run-time.</para>
+
+<para>You can also use the table functions directly if desired
+(regardless of the <literal>CYGSEM_HAL_VIRTUAL_VECTOR_DIAG</literal> setting - assuming
+the ROM monitor provides the services). Here is a small example which
+changes the console to use channel 2, fetches the comm procs pointer
+and calls the write function from that table, then restores the
+console to the original channel:</para>
+
+<programlisting>
+#define T "Hello World!\n"
+
+int
+main(void)
+{
+ hal_virtual_comm_table_t* comm;
+ int cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(2);
+
+ comm = CYGACC_CALL_IF_CONSOLE_PROCS();
+ CYGACC_COMM_IF_WRITE(*comm, T, strlen(T));
+
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
+}
+</programlisting>
+
+<para>Beware that if doing something like the above, you should only do
+it to a channel which does not have GDB at the other end: GDB ignores
+raw data, so you would not see the output.</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Compatibility -->
+
+<section>
+<title>Compatibility</title>
+
+<para>The use of this service is controlled by the option
+<literal>CYGSEM_HAL_VIRTUAL_VECTOR_DIAG</literal> which is disabled per default on most
+older platforms (thus preserving backwards compatibility with older
+stubs). On newer ports, this option should always be set.
+</para>
+</section>
+
+<!-- }}} -->
+<!-- {{{ Implementation Details -->
+
+<section><title>Implementation Details</title>
+
+<para>There is an array of procedure tables (raw comm channels) for each
+IO device of the platform which get initialized by the ROM monitor, or
+optionally by a RAM startup configuration (allowing the RAM
+configuration to take full control of the target). In addition to
+this, there's a special table which is used to hold mangler
+procedures.</para>
+
+<para>The vector table defines which of these channels are selected for
+console and debugging IO respectively: console entry can be empty,
+point to mangler channel, or point to a raw channel. The debugger
+entry should always point to a raw channel.</para>
+
+<para>During normal console output (i.e., diagnostic output) the console
+table will be used to handle IO if defined. If not defined, the debug
+table will be used.</para>
+
+<para>This means that debuggers (such as GDB) which require text streams
+to be mangled (O-packetized in the case of GDB), can rely on the ROM
+monitor install mangling IO routines in the special mangler table and
+select this for console output. The mangler will pass the mangled data
+on to the selected debugging channel.</para>
+
+<para>If the eCos configuration specifies a different console channel
+from that used by the debugger, the console entry will point to the
+selected raw channel, thus overriding any mangler provided by the ROM
+monitor.</para>
+
+<para>See hal_if_diag_* routines in hal_if.c for more details of the stream
+path of diagnostic output. See <function>cyg_hal_gdb_diag_*()</function> routines in
+<filename>hal_stub.c</filename> for the mangler used for GDB communication.</para>
+
+<!--
+FIXME: Other special channels are reserved for ethernet communication.
+-->
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ New Platform Ports -->
+
+<section>
+<title>New Platform Ports</title>
+
+<para>Define CDL options <literal>CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS</literal>,
+<literal>CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL</literal>, and
+<literal>CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL</literal>.
+</para>
+
+<para>If <literal>CYGSEM_HAL_VIRTUAL_VECTOR_DIAG</literal> is set, make sure the infra diag
+code uses the hal_if diag functions:</para>
+
+<programlisting>
+ #define HAL_DIAG_INIT() hal_if_diag_init()
+ #define HAL_DIAG_WRITE_CHAR(_c_) hal_if_diag_write_char(_c_)
+ #define HAL_DIAG_READ_CHAR(_c_) hal_if_diag_read_char(&_c_)
+</programlisting>
+
+<para>In addition to the above functions, the platform HAL must also
+provide a function cyg_hal_plf_comms_init which initializes the
+drivers and the channel procedure tables.
+</para>
+
+<para>Most of the other functionality in the table is more or less
+possible to copy unchanged from existing ports. Some care is necessary
+though to ensure the proper handling of interrupt vectors and timeouts
+for various devices handled by the same driver. See PowerPC/Cogent
+platform HAL for an example implementation.</para>
+
+<note>
+<title>Note:</title>
+<para> When vector table console code is <emphasis>not</emphasis> used,
+the platform HAL must map the HAL_DIAG_INIT, HAL_DIAG_WRITE_CHAR and
+HAL_DIAG_READ_CHAR macros directly to the low-level IO functions,
+hardwired to use a compile-time configured channel.</para>
+</note>
+
+<note>
+<title>Note:</title>
+<para> On old ports the hardwired <literal>HAL_DIAG_INIT</literal>,
+<literal>HAL_DIAG_WRITE_CHAR</literal> and
+<literal>HAL_DIAG_READ_CHAR</literal> implementations will also
+contain code to O-packetize the output for GDB. This should
+<emphasis>not</emphasis> be adopted for new ports! On new ports the
+ROM monitor is guaranteed to provide the necessary mangling via the
+vector table. The hardwired configuration should be reserved for ROM
+startups where achieving minimal image size is crucial.
+</para>
+</note>
+
+</section>
+
+<!-- }}} -->
+
+</section>
+
+<!-- }}} -->
+
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Coding Conventions -->
+
+<section id="hal-porting-coding-conventions">
+<TITLE>HAL Coding Conventions</TITLE>
+
+
+<para>
+To get changes and larger submissions included into the eCos source
+repository, we ask that you adhere to a set of coding conventions.
+The conventions are defined as an attempt to make a consistent
+tree. Consistency makes it easier for people to read, understand and
+maintain the code, which is important when many people work on the
+same project.
+</para>
+
+<para>
+The below is only a brief, and probably incomplete, summary of the
+rules. Please look through files in the area where you are making
+changes to get a feel for any additional conventions. Also feel free
+to ask on the list if you have specific questions.
+</para>
+
+
+<section>
+<title>Implementation issues</title>
+
+<para>
+There are a few implementation issues that should be kept in mind:
+</para>
+
+<variablelist>
+<varlistentry><term>HALs</term>
+ <listitem><para>HALs must be written in C and assembly only. C++ must not
+ be used. This is in part to keep the HALs simple since this is
+ usually the first part of eCos a newcomer will see, and in
+ part to maintain the existing de facto standard.</para></listitem></varlistentry>
+
+<varlistentry><term>IO access</term>
+ <listitem><para>Use HAL IO access macros for code that might be reused on
+ different platforms than the one you are writing it for.</para></listitem></varlistentry>
+
+<varlistentry><term>MMU</term>
+ <listitem><para>If it is necessary to use the MMU (e.g., to prevent
+ caching of IO areas), use a simple 1-1 mapping of memory if
+ possible. On most platforms where using the MMU is necessary,
+ it will be possible to achieve the 1-1 mapping using the MMU's
+ provision for mapping large continuous areas (hardwired TLBs or
+ BATs). This reduces the footprint (no MMU table) and avoids
+ execution overhead (no MMU-related exceptions).</para></listitem></varlistentry>
+
+<varlistentry><term>Assertions</term>
+ <listitem><para>The code should contain assertions to validate argument
+ values, state information and any assumptions the code may be
+ making. Assertions are not enabled in production builds, so
+ liberally sprinkling assertions throughout the code is
+ good.</para></listitem></varlistentry>
+
+<varlistentry><term>Testing</term>
+ <listitem><para>The ability to test your code is very important. In
+ general, do not add new code to the eCos runtime unless you
+ also add a new test to exercise that code. The test also
+ serves as an example of how to use the new code.</para></listitem></varlistentry>
+
+</variablelist>
+
+</section>
+
+<section>
+<title>Source code details</title>
+
+<variablelist>
+<varlistentry><term>Line length</term>
+ <listitem><para>Keep line length below 78 columns whenever possible.</para></listitem></varlistentry>
+
+<varlistentry><term>Comments</term>
+ <listitem><para>Whenever possible, use // comments instead of /**/.</para></listitem></varlistentry>
+
+<varlistentry><term>Indentation</term>
+ <listitem><para>Use spaces instead of TABs. Indentation level is 4. Braces
+ start on the same line as the expression. See below for emacs
+ mode details.</para>
+
+<programlisting>
+;;=================================================================
+;; eCos C/C++ mode Setup.
+;;
+;; bsd mode: indent = 4
+;; tail comments are at col 40.
+;; uses spaces not tabs in C
+
+(defun ecos-c-mode ()
+ "C mode with adjusted defaults for use with the eCos sources."
+ (interactive)
+ (c++-mode)
+ (c-set-style "bsd")
+ (setq comment-column 40)
+ (setq indent-tabs-mode nil)
+ (show-paren-mode 1)
+ (setq c-basic-offset 4)
+
+ (set-variable 'add-log-full-name "Your Name")
+ (set-variable 'add-log-mailing-address "Your email address"))
+
+(defun ecos-asm-mode ()
+ "ASM mode with adjusted defaults for use with the eCos sources."
+ (interactive)
+ (setq comment-column 40)
+ (setq indent-tabs-mode nil)
+ (asm-mode)
+ (setq c-basic-offset 4)
+
+ (set-variable 'add-log-full-name "Your Name")
+ (set-variable 'add-log-mailing-address "Your email address"))
+
+(setq auto-mode-alist
+ (append '(("/local/ecc/.*\\.C$" . ecos-c-mode)
+ ("/local/ecc/.*\\.cc$" . ecos-c-mode)
+ ("/local/ecc/.*\\.cpp$" . ecos-c-mode)
+ ("/local/ecc/.*\\.inl$" . ecos-c-mode)
+ ("/local/ecc/.*\\.c$" . ecos-c-mode)
+ ("/local/ecc/.*\\.h$" . ecos-c-mode)
+ ("/local/ecc/.*\\.S$" . ecos-asm-mode)
+ ("/local/ecc/.*\\.inc$" . ecos-asm-mode)
+ ("/local/ecc/.*\\.cdl$" . tcl-mode)
+ ) auto-mode-alist))
+</programlisting>
+</listitem>
+</varlistentry>
+</variablelist>
+</section>
+
+<section>
+
+<title>Nested Headers</title>
+
+<para>In order to allow platforms to define all necessary details, while
+still maintaining the ability to share code between common platforms,
+all HAL headers are included in a nested fashion.</para>
+
+<para>The architecture header (usually <filename>hal_XXX.h</filename>) includes the
+variant equivalent of the header (<filename>var_XXX.h</filename>) which in turn
+includes the platform equivalent of the header
+(<filename>plf_XXX.h</filename>).</para>
+
+<para>All definitions that may need to be overridden by a platform are
+then only conditionally defined, depending on whether a lower layer
+has already made the definition:</para>
+
+<programlisting>
+hal_intr.h: #include &lt;var_intr.h&gt;
+
+ #ifndef MACRO_DEFINED
+ # define MACRO ...
+ # define MACRO_DEFINED
+ #endif
+
+
+
+var_intr.h: #include &lt;plf_intr.h&gt;
+
+ #ifndef MACRO_DEFINED
+ # define MACRO ...
+ # define MACRO_DEFINED
+ #endif
+
+
+plf_intr.h:
+
+ # define MACRO ...
+ # define MACRO_DEFINED
+</programlisting>
+
+<para>This means a platform can opt to rely on the variant or
+architecture implementation of a feature, or implement it itself.</para>
+
+</section>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Platform HAL Porting -->
+
+<section id="hal-porting-platform">
+<title>Platform HAL Porting</title>
+
+<para>
+This is the type of port that takes the least effort. It basically
+consists of describing the platform (board) for the HAL: memory
+layout, early platform initialization, interrupt controllers, and a
+simple serial device driver.
+</para>
+
+<para>
+Doing a platform port requires a preexisting architecture and
+possibly a variant HAL port.
+</para>
+
+<!-- {{{ Porting Process -->
+
+<section>
+<TITLE>HAL Platform Porting Process</TITLE>
+
+<!-- {{{ Brief Overview -->
+
+<section>
+<title>Brief overview</title>
+
+<para>The easiest way to make a new platform HAL is simply to copy an
+existing platform HAL of the same architecture/variant and change all
+the files to match the new one. In case this is the first platform for
+the architecture/variant, a platform HAL from another architecture
+should be used as a template.
+</para>
+
+<para>
+The best way to start a platform port is to concentrate on getting
+RedBoot to run. RedBoot is a simpler environment than full eCos, it
+does not use interrupts or threads, but covers most of the
+basic startup requirements.
+</para>
+
+<para>
+RedBoot normally runs out of FLASH or ROM and provides program loading
+and debugging facilities. This allows further HAL development to
+happen using RAM startup configurations, which is desirable for the
+simple reason that downloading an image which you need to test is
+often many times faster than either updating a flash part, or indeed,
+erasing and reprogramming an EPROM.
+</para>
+
+<para>There are two approaches to getting to this first goal:
+</para>
+
+<orderedlist>
+<listitem>
+<para>
+The board is equipped with a ROM monitor which allows "load and go" of
+ELF, binary, S-record or some other image type which can be created
+using <application>objcopy</application>. This allows you to develop
+RedBoot by downloading and running the code (saving time).
+</para>
+
+<para>
+When the stub is running it is a good idea to examine the various
+hardware registers to help you write the platform initialization code.
+</para>
+
+<para>
+Then you may have to fiddle a bit going through step two (getting it
+to run from ROM startup). If at all possible, preserve the original
+ROM monitor so you can revert to it if necessary.
+</para>
+</listitem>
+
+<listitem>
+<para>
+The board has no ROM monitor. You need to get the platform
+initialization and stub working by repeatedly making changes, updating
+flash or EPROM and testing the changes. If you are lucky, you have a
+JTAG or similar CPU debugger to help you. If not, you will probably
+learn to appreciate LEDs. This approach may also be needed during the
+initial phase of moving RedBoot from RAM startup to ROM, since it is
+very unlikely to work first time.
+</para>
+</listitem>
+</orderedlist>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Step-by-step -->
+
+<section>
+<title>Step-by-step</title>
+
+<para>Given that no two platforms are exactly the same, you may have to
+deviate from the below. Also, you should expect a fair amount of
+fiddling - things almost never go right the first time. See the hints
+section below for some suggestions that might help debugging.
+</para>
+
+<para>The description below is based on the HAL layout used in the MIPS,
+PC and MN10300 HALs. Eventually all HALs should be converted to look like
+these - but in a transition period there will be other HALs which look
+substantially different. Please try to adhere to the following as much is
+possible without causing yourself too much grief integrating with a
+HAL which does not follow this layout.
+</para>
+
+<!-- ====================================================================== -->
+
+<section>
+<title>Minimal requirements</title>
+
+<para>
+These are the changes you must make before you attempt to build
+RedBoot. You are advised to read all the sources though.
+</para>
+
+<orderedlist>
+<listitem><para>Copy an existing platform HAL from the same or another
+ architecture. Rename the files as necessary to follow the
+ standard: CDL and MLT related files should contain the
+ &lt;arch&gt;_&lt;variant&gt;_&lt;platform&gt; triplet.</para>
+</listitem>
+
+<listitem><para>Adjust CDL options. Primarily option naming, real-time
+ clock/counter, and CYGHWR_MEMORY_LAYOUT variables, but also other
+ options may need editing. Look through the architecture/variant
+ CDL files to see if there are any requirements/features which
+ where not used on the platform you copied. If so, add appropriate
+ ones. See <xref linkend="hal-porting-cdl-requirements"> for more
+ details.</para>
+</listitem>
+
+<listitem><para>Add the necessary packages and target descriptions to the
+ top-level <filename>ecos.db</filename> file. See <xref
+ linkend="hal-porting-ecos-database">. Initially, the target entry
+ should only contain the HAL packages. Other hardware support
+ packages will be added later.</para>
+</listitem>
+
+<listitem><para>Adjust the MLT files in
+ <filename>include/pkgconf</filename> to match the memory layout on
+ the platform. For initial testing it should be enough to just hand
+ edit .h and .ldi files, but eventually you should generate all
+ files using the memory layout editor in the configuration
+ tool. See <xref linkend="hal-porting-platform-memory-layout"> for
+ more details.</para>
+</listitem>
+
+<listitem>
+ <para>
+ Edit the <filename>misc/redboot_&lt;STARTUP&gt;.ecm</filename> for
+ the startup type you have chosen to begin with. Rename any
+ platform specific options and remove any that do not apply. In the
+ <literal>cdl_configuration</literal> section, comment out any
+ extra packages that are added, particularly packages such as
+ <literal>CYGPKG_IO_FLASH</literal> and
+ <literal>CYGPKG_IO_ETH_DRIVERS</literal>. These are not needed for
+ initial porting and will be added back later.
+ </para>
+</listitem>
+
+<listitem><para>If the default IO macros are not correct, override them in
+ plf_io.h. This may be necessary if the platform uses a different
+ endianness from the default for the CPU.</para>
+</listitem>
+
+<listitem><para>Leave out/comment out code that enables caches and/or MMU if
+ possible. Execution speed will not be a concern until the port is
+ feature complete.</para>
+</listitem>
+
+<listitem><para>Implement a simple serial driver (polled mode only). Make sure the
+ initialization function properly hooks the procedures up in the
+ virtual vector IO channel tables. RedBoot will call the serial
+ driver via these tables.</para>
+ <para>
+ By copying an existing platform HAL most of this code will be
+ already done, and will only need the platform specific hardware
+ access code to be written.
+ </para>
+</listitem>
+
+<listitem><para>Adjust/implement necessary platform
+ initialization. This can be found in
+ <filename>platform.inc</filename> and
+ <filename>platform.S</filename> files (ARM:
+ <filename>hal_platform_setup.h</filename> and
+ <filename>&lt;platform&gt;_misc.c</filename>, PowerPC:
+ <filename>&lt;platform&gt;.S</filename>). This step can be
+ postponed if you are doing a RAM startup RedBoot first and the
+ existing ROM monitor handles board initialization.</para>
+</listitem>
+
+<listitem><para>Define <literal>HAL_STUB_PLATFORM_RESET</literal>
+ (optionally empty) and
+ <literal>HAL_STUB_PLATFORM_RESET_ENTRY</literal> so that RedBoot
+ can reset-on-detach - this is very handy, often removing the need
+ for physically resetting the board between downloads.</para>
+</listitem>
+
+</orderedlist>
+
+<para>You should now be able to build RedBoot. For ROM startup:
+</para>
+
+<programlisting width=72>
+% ecosconfig new &lt;target_name&gt; redboot
+% ecosconfig import $(ECOS_REPOSITORY)/hal/&lt;architecture&gt;/&lt;platform&gt;/&lt;version&gt;/misc/redboot_ROM.ecm
+% ecosconfig tree
+% make
+</programlisting>
+
+<para>You may have to make further changes than suggested above to get
+the make command to succeed. But when it does, you should find a
+RedBoot image in install/bin. To program this image into flash or
+EPROM, you may need to convert to some other file type, and possibly
+adjust the start address. When you have the correct
+<application>objcopy</application> command to do this, add it to the
+<literal>CYGBLD_BUILD_GDB_STUBS</literal> custom build rule in the
+platform CDL file.
+</para>
+
+<para>Having updated the flash/EPROM on the board, you should see output
+on the serial port looking like this when powering on the board:
+</para>
+
+<programlisting>
+RedBoot(tm) bootstrap and debug environment [ROMRAM]
+Non-certified release, version UNKNOWN - built 15:42:24, Mar 14 2002
+
+Platform: &lt;PLATFORM&gt; (&lt;ARCHITECTURE&gt; &lt;VARIANT&gt;)
+Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
+
+RAM: 0x00000000-0x01000000, 0x000293e8-0x00ed1000 available
+FLASH: 0x24000000 - 0x26000000, 256 blocks of 0x00020000 bytes each.
+RedBoot>
+</programlisting>
+
+<para>If you do not see this output, you need to go through all your
+changes and figure out what's wrong. If there's a user programmable
+LED or LCD on the board it may help you figure out how far RedBoot
+gets before it hangs. Unfortunately there's no good way to describe
+what to do in this situation - other than that you have to play with
+the code and the board.
+</para>
+
+</section>
+
+<!-- ====================================================================== -->
+
+<section>
+<title>Adding features</title>
+
+<para>Now you should have a basic RedBoot running on the board. This
+means you have a the correct board initialization and a working serial
+driver. It's time to flesh out the remaining HAL features.
+</para>
+
+<orderedlist>
+<listitem><para>Reset. As mentioned above it is desirable to get the board to
+reset when GDB disconnects. When GDB disconnects it sends RedBoot
+a kill-packet, and RedBoot first calls <literal>HAL_STUB_PLATFORM_RESET()</literal>,
+attempting to perform a software-invoked reset. Most embedded
+CPUs/boards have a watchdog which is capable of triggering a reset.
+If your target does not have a watchdog, leave
+<literal>HAL_STUB_PLATFORM_RESET()</literal> empty and rely on the fallback approach.
+</para>
+
+<para>If <literal>HAL_STUB_PLATFORM_RESET()</literal> did not cause a reset, RedBoot will
+jump to <literal>HAL_STUB_PLATFORM_RESET_ENTRY</literal> - this should be the address
+where the CPU will start execution after a reset. Re-initializing the
+board and drivers will <emphasis>usually</emphasis> be good enough to make a
+hardware reset unnecessary.
+</para>
+
+<para>After the reset caused by the kill-packet, the target will be ready
+for GDB to connect again. During a days work, this will save you from
+pressing the reset button many times.
+</para>
+
+<para>Note that it is possible to disconnect from the board without
+causing it to reset by using the GDB command &quot;detach&quot;.</para>
+</listitem>
+
+<listitem>
+<para>Single-stepping is necessary for both instruction-level debugging
+and for breakpoint support. Single-stepping support should already be
+in place as part of the architecture/variant HAL, but you want to give
+it a quick test since you will come to rely on it.</para>
+</listitem>
+
+<listitem>
+<para>Real-time clock interrupts drive the eCos scheduler clock. Many
+embedded CPUs have an on-core timer (e.g. SH) or decrementer
+(e.g. MIPS, PPC) that can be used, and in this case it will already be
+supported by the architecture/variant HAL. You only have to calculate
+and enter the proper <literal>CYGNUM_HAL_RTC_CONSTANTS</literal>
+definitions in the platform CDL file.
+</para>
+
+<para>On some targets it may be necessary to use a platform-specific
+timer source for driving the real-time clock. In this case you also
+have to enter the proper CDL definitions, but must also define
+suitable versions of the <literal>HAL_CLOCK_XXXX</literal> macros.</para>
+</listitem>
+
+<listitem>
+<para>Interrupt decoding usually differs between platforms because the
+number and type of devices on the board differ. In
+<filename>plf_intr.h</filename> (ARM:
+<filename>hal_platform_ints.h</filename>) you must either extend or
+replace the default vector definitions provided by the architecture
+or variant interrupt headers. You may also have to define
+<literal>HAL_INTERRUPT_XXXX</literal> control macros.</para>
+</listitem>
+
+<listitem>
+<para>Caching may also differ from architecture/variant definitions.
+This maybe just the cache sizes, but there can also be bigger
+differences for example if the platform supports 2nd level caches.
+</para>
+
+<para>When cache definitions are in place, enable the caches on
+startup. First verify that the system is stable for RAM startups, then
+build a new RedBoot and install it. This will test if caching, and in
+particular the cache sync/flush operations, also work for ROM startup.</para>
+</listitem>
+
+<listitem>
+<para>Asynchronous breakpoints allow you to stop application execution
+and enter the debugger. Asynchronous breakpoint details are described
+in <!-- <xref linkend="hal-stubs-async-bps"> -->.</para>
+</listitem>
+
+</orderedlist>
+
+<para>You should now have a completed platform HAL port. Verify its
+stability and completeness by running all the eCos tests and fix any
+problems that show up (you have a working RedBoot now, remember! That
+means you can debug the code to see why it fails).
+</para>
+
+<para>Given the many configuration options in eCos, there may be hidden
+bugs or missing features that do not show up even if you run all the
+tests successfully with a default configuration. A comprehensive test
+of the entire system will take many configuration permutations and
+many many thousands of tests executed.
+</para>
+
+</section>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Hints -->
+
+<section>
+<title>Hints</title>
+
+<itemizedlist>
+
+<listitem>
+ <para>JTAG or similar CPU debugging hardware can greatly reduce the time
+ it takes to write a HAL port since you always have full visibility
+ of what the CPU is doing.
+ </para>
+</listitem>
+
+<listitem>
+ <para>LEDs can be your friends if you don't have a JTAG
+ device. Especially in the start of the porting effort if you don't
+ already have a working ROM monitor on the target. Then you have to
+ get a basic RedBoot working while basically being blindfolded. The
+ LED can make it little easier, as you'll be able to do limited
+ tracking of program flow and behavior by switching the LED on and
+ off. If the board has multiple LEDs you can show a number (using
+ binary notation with the LEDs) and sprinkle code which sets
+ different numbers throughout the code.</para>
+</listitem>
+
+<listitem>
+ <para>Debugging the interrupt processing is possible if you are
+ careful with the way you program the very early interrupt entry
+ handling. Write it so that as soon as possible in the interrupt
+ path, taking a trap (exception) does not harm execution. See the
+ SH vectors.S code for an example. Look for
+ <literal>cyg_hal_default_interrupt_vsr</literal> and the label
+ <literal>cyg_hal_default_interrupt_vsr_bp_safe</literal>, which
+ marks the point after which traps/single-stepping is safe.
+ </para>
+
+ <para>Being able to display memory content, CPU registers,
+ interrupt controller details at the time of an interrupt can save
+ a lot of time.</para>
+</listitem>
+
+<listitem>
+ <para>Using assertions is a good idea. They can sometimes reveal subtle
+ bugs or missing features long before you would otherwise have
+ found them, let alone notice them.
+ </para>
+
+ <para>The default eCos configuration does not use assertions, so you
+ have to enable them by switching on the option <literal>CYGPKG_INFRA_DEBUG</literal>
+ in the infra package.</para>
+</listitem>
+
+<listitem>
+ <para>The idle loop can be used to help debug the system.
+ </para>
+
+ <para>Triggering clock from the idle loop is a neat trick for
+ examining system behavior either before interrupts are fully
+ working, or to speed up &quot;the clock&quot;.
+ </para>
+
+ <para>Use the idle loop to monitor and/or print out variables or
+ hardware registers.</para>
+</listitem>
+
+<listitem>
+<para><application>hal_mk_defs</application> is used in some of the
+HALs (ARM, SH) as a way to generate assembler symbol definitions from
+C header files without imposing an assembler/C syntax separation in
+the C header files.</para>
+</listitem>
+
+<!--
+<listitem><para>Tracing using buffers [FIXME:TBD]</para>
+</listitem>
+-->
+
+</itemizedlist>
+
+</section>
+
+<!-- }}} -->
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ CDL Requirements -->
+
+<section id="hal-porting-cdl-requirements">
+<TITLE>HAL Platform CDL</TITLE>
+
+<para>The platform CDL both contains details necessary for the building
+of eCos, and platform-specific configuration options. For this reason
+the options differ between platforms, and the below is just a brief
+description of the most common options.</para>
+
+<para> See <!-- <xref linkend="???"> --> Components Writers Guide
+for more details on CDL. Also have a quick look around in
+existing platform CDL files to get an idea of what is possible and how
+various configuration issues can be represented with CDL.</para>
+
+<!-- {{{ eCos Database -->
+
+<section id="hal-porting-ecos-database">
+<title>eCos Database</title>
+
+<para>
+The eCos configuration system is made aware of a package by
+adding a package description in <filename>ecos.db</filename>. As an
+example we use the <literal>TX39/JMR3904</literal> platform:
+</para>
+
+<programlisting>
+package CYGPKG_HAL_MIPS_TX39_JMR3904 {
+ alias { "Toshiba JMR-TX3904 board" hal_tx39_jmr3904 tx39_jmr3904_hal }
+ directory hal/mips/jmr3904
+ script hal_mips_tx39_jmr3904.cdl
+ hardware
+ description "
+ The JMR3904 HAL package should be used when targeting the
+ actual hardware. The same package can also be used when
+ running on the full simulator, since this provides an
+ accurate simulation of the hardware including I/O devices.
+ To use the simulator in this mode the command
+ `target sim --board=jmr3904' should be used from inside gdb."
+}
+</programlisting>
+
+<para>This contains the title and description presented in the
+Configuration Tool when the package is selected. It also specifies
+where in the tree the package files can be found (<literal>directory</literal>)
+and the name of the CDL file which contains the package details
+(<literal>script</literal>).
+</para>
+
+<para>
+To be able to build and test a configuration for the new target, there
+also needs to be a <literal>target</literal> entry in the
+<filename>ecos.db</filename> file.
+</para>
+
+<programlisting>
+target jmr3904 {
+ alias { "Toshiba JMR-TX3904 board" jmr tx39 }
+ packages { CYGPKG_HAL_MIPS
+ CYGPKG_HAL_MIPS_TX39
+ CYGPKG_HAL_MIPS_TX39_JMR3904
+ }
+ description "
+ The jmr3904 target provides the packages needed to run
+ eCos on a Toshiba JMR-TX3904 board. This target can also
+ be used when running in the full simulator, since the simulator provides an
+ accurate simulation of the hardware including I/O devices.
+ To use the simulator in this mode the command
+ `target sim --board=jmr3904' should be used from inside gdb."
+}
+</programlisting>
+
+
+<para>
+The important part here is the <literal>packages</literal> section
+which defines the various hardware specific packages that contribute
+to support for this target. In this case the MIPS architecture
+package, the TX39 variant package, and the JMR-TX3904 platform
+packages are selected. Other packages, for serial drivers, ethernet
+drivers and FLASH memory drivers may also appear here.
+</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ CDL File Layout -->
+
+<section>
+<title>CDL File Layout</title>
+
+<para>
+All the platform options are contained in a CDL package named
+<literal>CYGPKG_HAL_&lt;architecture&gt;_&lt;variant&gt;_&lt;platform&gt;</literal>.
+They all share more or less the same <literal>cdl_package</literal>
+details:
+</para>
+
+<programlisting>
+cdl_package CYGPKG_HAL_MIPS_TX39_JMR3904 {
+ display "JMR3904 evaluation board"
+ parent CYGPKG_HAL_MIPS
+ requires CYGPKG_HAL_MIPS_TX39
+ define_header hal_mips_tx39_jmr3904.h
+ include_dir cyg/hal
+ description "
+ The JMR3904 HAL package should be used when targeting the
+ actual hardware. The same package can also be used when
+ running on the full simulator, since this provides an
+ accurate simulation of the hardware including I/O devices.
+ To use the simulator in this mode the command
+ `target sim --board=jmr3904' should be used from inside gdb."
+
+ compile platform.S plf_misc.c plf_stub.c
+
+ define_proc {
+ puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H &lt;pkgconf/hal_mips_tx39.h&gt;"
+ puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H &lt;pkgconf/hal_mips_tx39_jmr3904.h&gt;"
+ }
+
+ ...
+}
+</programlisting>
+
+<para>This specifies that the platform package should be parented under
+the MIPS packages, requires the TX39 variant HAL and all configuration
+settings should be saved in
+<filename>cyg/hal/hal_mips_tx39_jmt3904.h</filename>.
+</para>
+
+<para>The <literal>compile</literal> line specifies which files should be built
+when this package is enabled, and the <literal>define_proc</literal> defines
+some macros that are used to access the variant or architecture (the
+<literal>_TARGET_</literal> name is a bit of a misnomer) and platform
+configuration options. </para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Startup Type -->
+
+<section>
+<title>Startup Type</title>
+
+<para>eCos uses an option to select between a set of valid startup
+configurations. These are normally RAM, ROM and possibly ROMRAM. This
+setting is used to select which linker map to use (i.e., where to link
+eCos and the application in the memory space), and how the startup
+code should behave.</para>
+
+<programlisting>
+cdl_component CYG_HAL_STARTUP {
+ display "Startup type"
+ flavor data
+ legal_values {"RAM" "ROM"}
+ default_value {"RAM"}
+ no_define
+ define -file system.h CYG_HAL_STARTUP
+ description "
+ When targeting the JMR3904 board it is possible to build
+ the system for either RAM bootstrap, ROM bootstrap, or STUB
+ bootstrap. RAM bootstrap generally requires that the board
+ is equipped with ROMs containing a suitable ROM monitor or
+ equivalent software that allows GDB to download the eCos
+ application on to the board. The ROM bootstrap typically
+ requires that the eCos application be blown into EPROMs or
+ equivalent technology."
+}
+</programlisting>
+
+<para>The <literal>no_define</literal> and <literal>define</literal>
+pair is used to make the setting of this option appear in the file
+<filename>system.h</filename> instead of the default specified in the
+header.</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Build Options -->
+
+<section>
+<title>Build options</title>
+
+<para>
+A set of options under the components
+<literal>CYGBLD_GLOBAL_OPTIONS</literal> and
+<literal>CYGHWR_MEMORY_LAYOUT</literal> specify how eCos should be
+built: what tools and compiler options should be used, and which
+linker fragments should be used.
+</para>
+
+<programlisting>
+
+cdl_component CYGBLD_GLOBAL_OPTIONS {
+ display "Global build options"
+ flavor none
+ parent CYGPKG_NONE
+ description "
+ Global build options including control over
+ compiler flags, linker flags and choice of toolchain."
+
+
+ cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
+ display "Global command prefix"
+ flavor data
+ no_define
+ default_value { "mips-tx39-elf" }
+ description "
+ This option specifies the command prefix used when
+ invoking the build tools."
+ }
+
+ cdl_option CYGBLD_GLOBAL_CFLAGS {
+ display "Global compiler flags"
+ flavor data
+ no_define
+ default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
+ description "
+ This option controls the global compiler flags which
+ are used to compile all packages by
+ default. Individual packages may define
+ options which override these global flags."
+ }
+
+ cdl_option CYGBLD_GLOBAL_LDFLAGS {
+ display "Global linker flags"
+ flavor data
+ no_define
+ default_value { "-g -nostdlib -Wl,--gc-sections -Wl,-static" }
+ description "
+ This option controls the global linker flags. Individual
+ packages may define options which override these global flags."
+ }
+}
+
+cdl_component CYGHWR_MEMORY_LAYOUT {
+ display "Memory layout"
+ flavor data
+ no_define
+ calculated { CYG_HAL_STARTUP == "RAM" ? "mips_tx39_jmr3904_ram" : \
+ "mips_tx39_jmr3904_rom" }
+
+ cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
+ display "Memory layout linker script fragment"
+ flavor data
+ no_define
+ define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
+ calculated { CYG_HAL_STARTUP == "RAM" ? "&lt;pkgconf/mlt_mips_tx39_jmr3904_ram.ldi&gt;" : \
+ "&lt;pkgconf/mlt_mips_tx39_jmr3904_rom.ldi&gt;" }
+ }
+
+ cdl_option CYGHWR_MEMORY_LAYOUT_H {
+ display "Memory layout header file"
+ flavor data
+ no_define
+ define -file system.h CYGHWR_MEMORY_LAYOUT_H
+ calculated { CYG_HAL_STARTUP == "RAM" ? "&lt;pkgconf/mlt_mips_tx39_jmr3904_ram.h&gt;" : \
+ "&lt;pkgconf/mlt_mips_tx39_jmr3904_rom.h&gt;" }
+ }
+}
+
+</programlisting>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Common Target Options -->
+
+<section>
+<title>Common Target Options</title>
+
+<para>All platforms also specify real-time clock details:</para>
+
+<programlisting>
+# Real-time clock/counter specifics
+cdl_component CYGNUM_HAL_RTC_CONSTANTS {
+ display "Real-time clock constants."
+ flavor none
+
+ cdl_option CYGNUM_HAL_RTC_NUMERATOR {
+ display "Real-time clock numerator"
+ flavor data
+ calculated 1000000000
+ }
+ cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
+ display "Real-time clock denominator"
+ flavor data
+ calculated 100
+ }
+ # Isn't a nice way to handle freq requirement!
+ cdl_option CYGNUM_HAL_RTC_PERIOD {
+ display "Real-time clock period"
+ flavor data
+ legal_values { 15360 20736 }
+ calculated { CYGHWR_HAL_MIPS_CPU_FREQ == 50 ? 15360 : \
+ CYGHWR_HAL_MIPS_CPU_FREQ == 66 ? 20736 : 0 }
+ }
+}
+</programlisting>
+
+<para> The <literal>NUMERATOR</literal> divided by the
+<literal>DENOMINATOR</literal> gives the number of nanoseconds per
+tick. The <literal>PERIOD</literal> is the divider to be programmed
+into a hardware timer that is driven from an appropriate hardware
+clock, such that the timer overflows once per tick (normally
+generating a CPU interrupt to mark the end of a tick). The tick
+default rate is typically 100Hz.</para>
+
+
+<para>Platforms that make use of the virtual vector
+ROM calling interface (see <xref linkend="hal-calling-if">) will also
+specify details necessary to define configuration channels (these
+options are from the SH/EDK7707 HAL) :</para>
+
+<programlisting>
+cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
+ display "Number of communication channels on the board"
+ flavor data
+ calculated 1
+}
+
+cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
+ display "Debug serial port"
+ flavor data
+ legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
+ default_value 0
+ description "
+ The EDK/7708 board has only one serial port. This option
+ chooses which port will be used to connect to a host
+ running GDB."
+}
+
+cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
+ display "Diagnostic serial port"
+ flavor data
+ legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
+ default_value 0
+ description "
+ The EDK/7708 board has only one serial port. This option
+ chooses which port will be used for diagnostic output."
+}
+</programlisting>
+
+<para>The platform usually also specify an option controlling the ability
+ to co-exist with a ROM monitor:</para>
+
+<programlisting>
+cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
+ display "Work with a ROM monitor"
+ flavor booldata
+ legal_values { "Generic" "CygMon" "GDB_stubs" }
+ default_value { CYG_HAL_STARTUP == "RAM" ? "CygMon" : 0 }
+ parent CYGPKG_HAL_ROM_MONITOR
+ requires { CYG_HAL_STARTUP == "RAM" }
+ description "
+ Support can be enabled for three different varieties of ROM monitor.
+ This support changes various eCos semantics such as the encoding
+ of diagnostic output, or the overriding of hardware interrupt
+ vectors.
+ Firstly there is \"Generic\" support which prevents the HAL
+ from overriding the hardware vectors that it does not use, to
+ instead allow an installed ROM monitor to handle them. This is
+ the most basic support which is likely to be common to most
+ implementations of ROM monitor.
+ \"CygMon\" provides support for the Cygnus ROM Monitor.
+ And finally, \"GDB_stubs\" provides support when GDB stubs are
+ included in the ROM monitor or boot ROM."
+}
+</programlisting>
+
+<para>Or the ability to be configured as a ROM monitor:</para>
+
+<programlisting>
+cdl_option CYGSEM_HAL_ROM_MONITOR {
+ display "Behave as a ROM monitor"
+ flavor bool
+ default_value 0
+ parent CYGPKG_HAL_ROM_MONITOR
+ requires { CYG_HAL_STARTUP == "ROM" }
+ description "
+ Enable this option if this program is to be used as a ROM monitor,
+ i.e. applications will be loaded into RAM on the board, and this
+ ROM monitor may process exceptions or interrupts generated from the
+ application. This enables features such as utilizing a separate
+ interrupt stack when exceptions are generated."
+}
+</programlisting>
+
+<para>The latter option is accompanied by a special build rule that
+extends the generic ROM monitor build rule in the common HAL:</para>
+
+<programlisting>
+cdl_option CYGBLD_BUILD_GDB_STUBS {
+ display "Build GDB stub ROM image"
+ default_value 0
+ requires { CYG_HAL_STARTUP == "ROM" }
+ requires CYGSEM_HAL_ROM_MONITOR
+ requires CYGBLD_BUILD_COMMON_GDB_STUBS
+ requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+ requires ! CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
+ requires ! CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
+ requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
+ requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
+ no_define
+ description "
+ This option enables the building of the GDB stubs for the
+ board. The common HAL controls takes care of most of the
+ build process, but the final conversion from ELF image to
+ binary data is handled by the platform CDL, allowing
+ relocation of the data if necessary."
+
+ make -priority 320 {
+ &lt;PREFIX&gt;/bin/gdb_module.bin : &lt;PREFIX&gt;/bin/gdb_module.img
+ $(OBJCOPY) -O binary $< $@
+ }
+}
+</programlisting>
+
+<para>
+Most platforms support RedBoot, and some options are needed to
+configure for RedBoot.
+</para>
+
+<programlisting width=72>
+ cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
+ display "Redboot HAL options"
+ flavor none
+ no_define
+ parent CYGPKG_REDBOOT
+ active_if CYGPKG_REDBOOT
+ description "
+ This option lists the target's requirements for a valid Redboot
+ configuration."
+
+ cdl_option CYGBLD_BUILD_REDBOOT_BIN {
+ display "Build Redboot ROM binary image"
+ active_if CYGBLD_BUILD_REDBOOT
+ default_value 1
+ no_define
+ description "This option enables the conversion of the Redboot ELF
+ image to a binary image suitable for ROM programming."
+
+ make -priority 325 {
+ &lt;PREFIX&gt;/bin/redboot.bin : &lt;PREFIX&gt;/bin/redboot.elf
+ $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
+ $(OBJCOPY) -O srec $< $(@:.bin=.srec)
+ $(OBJCOPY) -O binary $< $@
+ }
+ }
+ }
+</programlisting>
+
+<para>
+The important part here is the <literal>make</literal> command in the
+<literal>CYGBLD_BUILD_REDBOOT_BIN</literal> option which emits
+makefile commands to translate the <filename>.elf</filename> file
+generated by the link phase into both a binary file and an S-Record
+file. If a different format is required by a PROM programmer or ROM
+monitor, then different output formats would need to be generated here.
+</para>
+
+</section>
+
+<!-- }}} -->
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Platform Memory Layout -->
+
+<section id="hal-porting-platform-memory-layout">
+<TITLE>Platform Memory Layout</TITLE>
+
+<para>The platform memory layout is defined using the Memory
+Configuration Window <!-- [FIXME: ref] --> in the Configuration Tool.</para>
+
+<note>
+<para>If you do not have access to a Windows machine, you can
+hand edit the <filename>.h</filename> and <filename>.ldi</filename> files to match the
+properties of your platform. If you want to contribute your port back
+to the eCos community, ask someone on the list to make proper memory
+map files for you.</para>
+</note>
+
+<section>
+<title>Layout Files</title>
+
+<para>The memory configuration details are saved in three files:</para>
+
+<variablelist>
+<varlistentry>
+<term><filename>.mlt</filename></term>
+ <listitem><para>This is the Configuration Tool save-file. It is only used
+ by the Configuration Tool.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term><filename>.ldi</filename></term>
+ <listitem><para>This is the linker script fragment. It defines the memory
+ and location of sections by way of macros defined in the
+ architecture or variant linker script.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term><filename>.h</filename></term>
+ <listitem><para>This file describes some of the memory region details as C
+ macros, allowing eCos or the application adapt the memory
+ layout of a specific configuration.</para></listitem>
+</varlistentry>
+</variablelist>
+
+<para>These three files are generated for each startup-type, since the
+memory details usually differ.</para>
+
+</section>
+
+<section>
+<title>Reserved Regions</title>
+
+<para>Some areas of the memory space are reserved for specific
+purposes, making room for exception vectors and various tables. RAM
+startup configurations also need to reserve some space at the bottom
+of the memory map for the ROM monitor.</para>
+
+<para>These reserved areas are named with the prefix "reserved_" which is
+handled specially by the Configuration Tool: instead of referring to a
+linker macro, the start of the area is labeled and a gap left in the
+memory map.</para>
+
+</section>
+
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Platform Serial Device Support -->
+
+<section>
+<title>Platform Serial Device Support</title>
+
+<para>
+The first step is to set up the CDL definitions. The configuration
+options that need to be set are the following:
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term><literal>CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS</literal></term>
+ <listitem><para>The number of channels, usually 0, 1 or 2.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL</literal></term>
+ <listitem><para>The channel to use for GDB.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD</literal></term>
+ <listitem><para>Initial baud rate for debug channel.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL</literal></term>
+ <listitem><para>The channel to use for the
+ console.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD</literal></term>
+ <listitem><para>The initial baud rate for the console
+ channel.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT</literal></term>
+ <listitem><para>The default console channel.</para></listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The code in <filename>hal_diag.c</filename> need to be converted to
+support the new serial device.
+If this the same as a device already supported, copy that.
+</para>
+
+<para>
+The following functions and types need to be rewritten to support a new serial
+device.
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term><literal>struct channel_data_t;</literal></term>
+ <listitem>
+ <para>
+ Structure containing base address, timeout and ISR vector number
+ for each serial device supported. Extra fields my be added if
+ necessary for the device. For example some devices have
+ write-only control registers, so keeping a shadow of the last
+ value written here can be useful.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>xxxx_ser_channels[];</literal></term>
+ <listitem>
+ <para>
+ Array of <literal>channel_data_t</literal>, initialized with parameters of each
+ channel. The index into this array is the channel number used
+ in the CDL options above and is used by the virtual vector
+ mechanism to refer to each channel.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>void cyg_hal_plf_serial_init_channel(void
+ *__ch_data)</literal></term>
+ <listitem>
+ <para>
+ Initialize the serial device. The parameter is actually a pointer to a
+ <literal>channel_data_t</literal> and should be cast back to
+ this type before use. This function should use the CDL
+ definition for the baud rate for the channel it is initializing.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>void cyg_hal_plf_serial_putc(void * __ch_data,
+ char *c)</literal></term>
+ <listitem>
+ <para>
+ Send a character to the serial device. This function should
+ poll for the device being ready to send and then write the character.
+ Since this is intended to be a diagnostic/debug channel, it is
+ often also a good idea to poll for end of transmission
+ too. This ensures that as much data gets out of the system as
+ possible.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>bool cyg_hal_plf_serial_getc_nonblock(void*
+ __ch_data, cyg_uint8* ch)</literal></term>
+ <listitem>
+ <para>
+ This function tests the device and if a character is
+ available, places it in <parameter>*ch</parameter> and returns
+ <literal>TRUE</literal>. If no character is available, then
+ the function returns <literal>FALSE</literal> immediately.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>int cyg_hal_plf_serial_control(void *__ch_data,
+ __comm_control_cmd_t __func,
+ ...)</literal></term>
+ <listitem>
+ <para>
+ This is an IOCTL-like function for controlling various aspects
+ of the serial device. The only part in which you may need to
+ do some work initially is in the
+ <literal>__COMMCTL_IRQ_ENABLE</literal> and
+ <literal>__COMMCTL_IRQ_DISABLE</literal> cases to
+ enable/disable interrupts.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>int cyg_hal_plf_serial_isr(void *__ch_data, int* __ctrlc,
+ CYG_ADDRWORD __vector, CYG_ADDRWORD
+ __data)</literal></term>
+ <listitem>
+ <para>
+ This interrupt handler, called from the spurious interrupt
+ vector, is specifically for dealing with
+ <literal>Ctrl-C</literal> interrupts from GDB. When called
+ this function should do the following:
+ <orderedlist>
+ <listitem>
+ <para>Check for an incoming character. The code here is very
+ similar to that in
+ <function>cyg_hal_plf_serial_getc_nonblock()</function>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Read the character and call
+ <function>cyg_hal_is_break()</function>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ If result is true, set <parameter>*__ctrlc</parameter> to
+ <literal>1</literal>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Return <literal>CYG_ISR_HANDLED</literal>.
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>void cyg_hal_plf_serial_init()</literal></term>
+ <listitem>
+ <para>
+ Initialize each of the serial channels.
+ First call <function>cyg_hal_plf_serial_init_channel()</function> for each channel.
+ Then call the <literal>CYGACC_COMM_IF_*</literal> macros for
+ each channel. This latter set of calls are identical for all
+ channels, so the best way to do this is to copy and edit an
+ existing example.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</section>
+
+<!-- }}} -->
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Variant HAL Porting -->
+
+<section id="hal-porting-variant">
+<title>Variant HAL Porting</title>
+
+<para>
+A variant port can be a fairly limited job, but can also
+require quite a lot of work. A variant HAL describes how a specific
+CPU variant differs from the generic CPU architecture. The variant HAL
+can re-define cache, MMU, interrupt, and other features which override
+the default implementation provided by the architecture HAL.
+</para>
+
+<para>
+Doing a variant port requires a preexisting architecture HAL port. It
+is also likely that a platform port will have to be done at the same
+time if it is to be tested.
+</para>
+
+<!-- {{{ Porting Process -->
+
+<section>
+<TITLE>HAL Variant Porting Process</TITLE>
+
+<para>The easiest way to make a new variant HAL is simply to copy an
+existing variant HAL and change all the files to match the new
+variant. If this is the first variant for an architecture, it may be
+hard to decide which parts should be put in the variant - knowledge of
+other variants of the architecture is required.</para>
+
+<para>Looking at existing variant HALs (e.g., MIPS tx39, tx49) may be a
+help - usually things such as caching, interrupt and exception
+handling differ between variants. Initialization code, and code for
+handling various core components (FPU, DSP, MMU, etc.) may also differ
+or be missing altogether on some variants. Linker scripts may also require
+specific variant versions.</para>
+
+<note>
+<title>Note</title>
+<para>Some CPU variants may require specific compiler
+support. That support must be in place before you can undertake the
+eCos variant port.</para>
+</note>
+
+
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ CDL Requirements -->
+
+<section>
+<TITLE>HAL Variant CDL</TITLE>
+
+<para>
+The CDL in a variant HAL tends to depend on the exact functionality
+supported by the variant. If it implements some of the devices
+described in the platform HAL, then the CDL for those will be here
+rather than there (for example the real-time clock).
+</para>
+
+<para>
+There may also be CDL to select options in the architecture HAL to
+configure it to a particular architectural variant.
+</para>
+
+<para>
+Each variant needs an entry in the <filename>ecos.db</filename>
+file. This is the one for the SH3:
+</para>
+
+<programlisting width=72>
+package CYGPKG_HAL_SH_SH3 {
+ alias { "SH3 architecture" hal_sh_sh3 }
+ directory hal/sh/sh3
+ script hal_sh_sh3.cdl
+ hardware
+ description "
+ The SH3 (SuperH 3) variant HAL package provides generic
+ support for SH3 variant CPUs."
+}
+</programlisting>
+
+<para>
+As you can see, it is very similar to the platform entry.
+</para>
+
+<para>
+The variant CDL file will contain a package entry named for the
+architecture and variant, matching the package name in the
+<filename>ecos.db</filename> file. Here is the initial part of the
+MIPS VR4300 CDL file:
+</para>
+
+<programlisting width=72>
+cdl_package CYGPKG_HAL_MIPS_VR4300 {
+ display "VR4300 variant"
+ parent CYGPKG_HAL_MIPS
+ implements CYGINT_HAL_MIPS_VARIANT
+ hardware
+ include_dir cyg/hal
+ define_header hal_mips_vr4300.h
+ description "
+ The VR4300 variant HAL package provides generic support
+ for this processor architecture. It is also necessary to
+ select a specific target platform HAL package."
+</programlisting>
+
+<para>
+This defines the package, placing it under the MIPS architecture
+package in the hierarchy. The <literal>implements</literal> line
+indicates that this is a MIPS variant. The architecture package uses
+this to check that exactly one variant is configured in.
+</para>
+
+<para>
+The variant defines some options that cause the architecture HAL to
+configure itself to support this variant.
+</para>
+
+<programlisting width=72>
+ cdl_option CYGHWR_HAL_MIPS_64BIT {
+ display "Variant 64 bit architecture support"
+ calculated 1
+ }
+
+ cdl_option CYGHWR_HAL_MIPS_FPU {
+ display "Variant FPU support"
+ calculated 1
+ }
+
+ cdl_option CYGHWR_HAL_MIPS_FPU_64BIT {
+ display "Variant 64 bit FPU support"
+ calculated 1
+ }
+</programlisting>
+
+<para>
+These tell the architecture that this is a 64 bit MIPS architecture,
+that it has a floating point unit, and that we are going to use it in
+64 bit mode rather than 32 bit mode.
+</para>
+
+<para>
+The CDL file finishes off with some build options.
+</para>
+
+<programlisting width=72>
+ define_proc {
+ puts $::cdl_header "#include &lt;pkgconf/hal_mips.h&gt;"
+ }
+
+ compile var_misc.c
+
+ make {
+ &lt;PREFIX&gt;/lib/target.ld: &lt;PACKAGE&gt;/src/mips_vr4300.ld
+ $(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) $(CFLAGS) -o $@ $&lt;
+ @echo $@ ": \\" &gt; $(notdir $@).deps
+ @tail +2 target.tmp &gt;&gt; $(notdir $@).deps
+ @echo &gt;&gt; $(notdir $@).deps
+ @rm target.tmp
+ }
+
+ cdl_option CYGBLD_LINKER_SCRIPT {
+ display "Linker script"
+ flavor data
+ no_define
+ calculated { "src/mips_vr4300.ld" }
+ }
+
+}
+</programlisting>
+
+<para>
+The <literal>define_proc</literal> causes the architecture
+configuration file to be included into the configuration file for the
+variant. The <literal>compile</literal> causes the single source file
+for this variant, <filename>var_misc.c</filename> to be compiled. The
+<literal>make</literal> command emits makefile rules to combine the
+linker script with the <filename>.ldi</filename> file to generate
+<literal>target.ld</literal>. Finally, in the MIPS HALs, the main
+linker script is defined in the variant, rather than the architecture,
+so <literal>CYGBLD_LINKER_SCRIPT</literal> is defined here.
+</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Cache Support -->
+
+<section>
+<title>Cache Support</title>
+
+<para>
+The main area where the variant is likely to be involved is in cache
+support. Often the only thing that distinguishes one CPU variant from
+another is the size of its caches.
+</para>
+
+<para>
+In architectures such as the MIPS and PowerPC where cache instructions
+are part of the ISA, most of the actual cache operations are
+implemented in the architecture HAL. In this case the variant HAL only
+needs to define the cache dimensions. The following are the cache
+dimensions defined in the MIPS VR4300 variant
+<filename>var_cache.h</filename>.
+</para>
+
+<programlisting width=72>
+// Data cache
+#define HAL_DCACHE_SIZE (8*1024) // Size of data cache in bytes
+#define HAL_DCACHE_LINE_SIZE 16 // Size of a data cache line
+#define HAL_DCACHE_WAYS 1 // Associativity of the cache
+
+// Instruction cache
+#define HAL_ICACHE_SIZE (16*1024) // Size of cache in bytes
+#define HAL_ICACHE_LINE_SIZE 32 // Size of a cache line
+#define HAL_ICACHE_WAYS 1 // Associativity of the cache
+
+#define HAL_DCACHE_SETS (HAL_DCACHE_SIZE/(HAL_DCACHE_LINE_SIZE*HAL_DCACHE_WAYS))
+#define HAL_ICACHE_SETS (HAL_ICACHE_SIZE/(HAL_ICACHE_LINE_SIZE*HAL_ICACHE_WAYS))
+</programlisting>
+
+<para>
+Additional cache macros, or overrides for the defaults, may also
+appear in here. While some architectures have instructions for
+managing cache lines, overall enable/disable operations may be handled
+via variant specific registers. If so then
+<filename>var_cache.h</filename> should also define the
+<literal>HAL_XCACHE_ENABLE()</literal> and
+<literal>HAL_XCACHE_DISABLE()</literal> macros.
+</para>
+
+<para>
+If there are any generic features that the variant does not support
+(cache locking is a typical example) then
+<literal>var_cache.h</literal> may need to disable definitions of
+certain operations. It is architecture dependent exactly how this is
+done.
+</para>
+
+
+</section>
+
+<!-- }}} -->
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Architecture HAL Porting -->
+
+<section id="hal-porting-architecture">
+
+<title>Architecture HAL Porting</title>
+
+<para>
+A new architecture HAL is the most complex HAL to write, and it the
+least easily described. Hence this section is presently nothing more
+than a place holder for the future.
+</para>
+
+<!-- {{{ Porting Process -->
+
+<section>
+<TITLE>HAL Architecture Porting Process</TITLE>
+
+<para>The easiest way to make a new architecture HAL is simply to copy an
+existing architecture HAL of an, if possible, closely matching
+architecture and change all the files to match the new
+architecture. The MIPS architecture HAL should be used if possible, as
+it has the appropriate layout and coding conventions. Other HALs
+may deviate from that norm in various ways.</para>
+
+<note>
+<title>Note</title>
+<para> eCos is written for GCC. It requires C and C++
+compiler support as well as a few compiler features introduced during
+eCos development - so compilers older than eCos may not provide these
+features. Note that there is no C++ support for any 8 or 16 bit
+CPUs. Before you can undertake an eCos port, you need the required
+compiler support.
+</para>
+</note>
+
+<para>
+The following gives a rough outline of the steps needed to create a
+new architecture HAL. The exact order and set of steps needed will
+vary greatly from architecture to architecture, so a lot of
+flexibility is required. And of course, if the architecture HAL is to
+be tested, it is necessary to do variant and platform ports for the
+initial target simultaneously.
+</para>
+
+<orderedlist>
+
+<listitem>
+<para>
+Make a new directory for the new architecture under the
+<filename>hal</filename> directory in the source repository. Make an
+<filename>arch</filename> directory under this and populate this with
+the standard set of package directories.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Copy the CDL file from an example HAL changing its name to match the
+new HAL. Edit the file, changing option names as appropriate. Delete
+any options that are specific to the original HAL, and and any new
+options that are necessary for the new architecture. This is likely to
+be a continuing process during the development of the HAL. See <xref
+linkend="hal-porting-architecture-cdl"> for more details.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Copy the <filename>hal_arch.h</filename> file from an example
+HAL. Within this file you need to change or define the following:
+</para>
+<itemizedlist>
+
+<listitem>
+<para>
+Define the <structname>HAL_SavedRegisters</structname> structure. This
+may need to reflect the save order of any group register save/restore
+instructions, the interrupt and exception save and restore formats,
+and the procedure calling conventions. It may also need to cater for
+optional FPUs and other functional units. It can be quite difficult to
+develop a layout that copes with all requirements.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Define the bit manipulation routines,
+<literal>HAL_LSBIT_INDEX()</literal> and
+<literal>HAL_MSBIT_INDEX()</literal>. If the architecture contains
+instructions to perform these, or related, operations, then these
+should be defined as inline assembler fragments. Otherwise make them
+calls to functions.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Define <literal>HAL_THREAD_INIT_CONTEXT()</literal>. This initializes
+a restorable CPU context onto a stack pointer so that a later call to
+<literal>HAL_THREAD_LOAD_CONTEXT()</literal> or
+<literal>HAL_THREAD_SWITCH_CONTEXT()</literal> will execute it
+correctly. This macro needs to take account of the same optional
+features of the architecture as the definition of
+<structname>HAL_SavedRegisters</structname>.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Define <literal>HAL_THREAD_LOAD_CONTEXT()</literal> and
+<literal>HAL_THREAD_SWITCH_CONTEXT()</literal>. These should just be
+calls to functions in <filename>context.S</filename>.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Define <literal>HAL_REORDER_BARRIER()</literal>. This prevents code
+being moved by the compiler and is necessary in some order-sensitive
+code. This macro is actually defined identically in all architecture,
+so it can just be copied.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Define breakpoint support. The macro
+<literal>HAL_BREAKPOINT(label)</literal> needs to be an inline assembly
+fragment that invokes a breakpoint. The breakpoint instruction should
+be labeled with the <parameter>label</parameter>
+argument. <literal>HAL_BREAKINST</literal> and
+<literal>HAL_BREAKINST_SIZE</literal> define the breakpoint
+instruction for debugging purposes.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Define GDB support. GDB views the registers of the target as a linear
+array, with each register having a well defined offset. This array may
+differ from the ordering defined in
+<structname>HAL_SavedRegisters</structname>. The macros
+<literal>HAL_GET_GDB_REGISTERS()</literal> and
+<literal>HAL_SET_GDB_REGISTERS()</literal> translate between the GDB
+array and the <structname>HAL_SavedRegisters</structname> structure.
+The <literal>HAL_THREAD_GET_SAVED_REGISTERS()</literal> translates a
+stack pointer saved by the context switch macros into a pointer to a
+<structname>HAL_SavedRegisters</structname> structure. Usually this is
+a one-to-one translation, but this macro allows it to differ if
+necessary.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Define long jump support. The type <type>hal_jmp_buf</type> and the
+functions <function>hal_setjmp()</function> and
+<literal>hal_longjmp()</literal> provide the underlying implementation
+of the C library <function>setjmp()</function> and
+<function>longjmp()</function>.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Define idle thread action. Generally the macro
+<literal>HAL_IDLE_THREAD_ACTION()</literal> is defined to call a
+function in <filename>hal_misc.c</filename>.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Define stack sizes. The macros
+<literal>CYGNUM_HAL_STACK_SIZE_MINIMUM</literal> and
+<literal>CYGNUM_HAL_STACK_SIZE_TYPICAL</literal> should be defined to
+the minimum size for any thread stack and a reasonable default for
+most threads respectively. It is usually best to construct these out
+of component sizes for the CPU save state and procedure call stack
+usage. These definitions should not use anything other than numerical
+values since they can be used from assembly code in some HALs.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Define memory access macros. These macros provide translation between
+cached and uncached and physical memory spaces. They usually consist
+of masking out bits of the supplied address and ORing in alternative
+address bits.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Define global pointer save/restore macros. These really only need
+defining if the calling conventions of the architecture require a
+global pointer (as does the MIPS architecture), they may be empty
+otherwise. If it is necessary to define these, then take a look at the
+MIPS implementation for an example.
+</para>
+</listitem>
+
+</itemizedlist>
+
+</listitem>
+
+<listitem>
+<para>
+Copy <filename>hal_intr.h</filename> from an example HAL. Within this
+file you should change or define the following:
+</para>
+
+
+<itemizedlist>
+<listitem>
+<para>
+Define the exception vectors. These should be detailed in the
+architecture specification. Essentially for each exception entry point
+defined by the architecture there should be an entry in the VSR
+table. The offsets of these VSR table entries should be defined here
+by <literal>CYGNUM_HAL_VECTOR_*</literal> definitions. The size of the
+VSR table also needs to be defined here.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Map any hardware exceptions to standard names. There is a group of
+exception vector name of the form
+<literal>CYGNUM_HAL_EXCEPTION_*</literal> that define a wide variety
+of possible exceptions that many architectures raise. Generic code
+detects whether the architecture can raise a given exception by
+testing whether a given <literal>CYGNUM_HAL_EXCEPTION_*</literal>
+definition is present. If it is present then its value is the vector
+that raises that exception. This does not need to be a one-to-one
+correspondence, and several <literal>CYGNUM_HAL_EXCEPTION_*</literal>
+definitions may have the same value.
+</para>
+
+<para>
+Interrupt vectors are usually defined in the variant or platform
+HALs. The interrupt number space may either be continuous with the VSR
+number space, where they share a vector table (as in the i386) or may
+be a separate space where a separate decode stage is used (as in MIPS
+or PowerPC).
+</para>
+
+</listitem>
+
+<listitem>
+<para>
+Declare any static data used by the HAL to handle interrupts and
+exceptions. This is usually three vectors for interrupts:
+<literal>hal_interrupt_handlers[]</literal>,
+<literal>hal_interrupt_data[]</literal> and
+<literal>hal_interrupt_objects[]</literal>, which are sized according
+to the interrupt vector definitions. In addition a definition for the
+VSR table, <literal>hal_vsr_table[]</literal> should be made. These
+vectors are normally defined in either <filename>vectors.S</filename>
+or <filename>hal_misc.c</filename>.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Define interrupt enable/disable macros. These are normally inline
+assembly fragments to execute the instructions, or manipulate the CPU
+register, that contains the CPU interrupt enable bit.
+</para>
+</listitem>
+
+<listitem>
+<para>
+A feature that many HALs support is the ability to execute DSRs on the
+interrupt stack. This is not an essential feature, and is better left
+unimplemented in the initial porting effort. If this is required, then
+the macro <literal>HAL_INTERRUPT_STACK_CALL_PENDING_DSRS()</literal>
+should be defined to call a function in
+<filename>vectors.S</filename>.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Define the interrupt and VSR attachment macros. If the same arrays as
+for other HALs have been used for VSR and interrupt vectors, then
+these macro can be copied across unchanged.
+</para>
+</listitem>
+
+</itemizedlist>
+
+</listitem>
+
+<listitem>
+<para>
+A number of other header files also need to be filled in:
+</para>
+<itemizedlist>
+<listitem>
+<para>
+<filename>basetype.h</filename>. This file defines the basic types
+used by eCos, together with the endianness and some other
+characteristics. This file only really needs to contain definitions
+if the architecture differs significantly from the defaults defined
+in <filename>cyg_type.h</filename>
+</para>
+</listitem>
+
+<listitem>
+<para>
+<filename>hal_io.h</filename>. This file contains macros for accessing
+device IO registers. If the architecture uses memory mapped IO, then
+these can be copied unchanged from an existing HAL such as MIPS. If
+the architecture uses special IO instructions, then these macros must
+be defined as inline assembler fragments. See the I386 HAL for an
+example. PCI bus access macros are usually defined in the variant or
+platform HALs.
+</para>
+</listitem>
+
+<listitem>
+<para>
+<filename>hal_cache.h</filename>. This file contains cache access
+macros. If the architecture defines cache instructions, or control
+registers, then the access macros should be defined here. Otherwise
+they must be defined in the variant or platform HAL. Usually the cache
+dimensions (total size, line size, ways etc.) are defined in the
+variant HAL.
+</para>
+</listitem>
+
+<listitem>
+<para>
+<filename>arch.inc</filename> and
+<filename>&lt;architecture&gt;.inc</filename>. These files are
+assembler headers used by <filename>vectors.S</filename> and
+<filename>context.S</filename>.
+<filename>&lt;architecture&gt;.inc</filename> is a general purpose
+header that should contain things like register aliases, ABI
+definitions and macros useful to general assembly
+code. If there are no such definitions, then this file need not be
+provided. <filename>arch.inc</filename> contains macros for performing
+various eCos related operations such as initializing the CPU, caches,
+FPU etc. The definitions here may often be configured or overridden by
+definitions in the variant or platform HALs. See the MIPS HAL for an
+example of this.
+</para>
+</listitem>
+
+</itemizedlist>
+
+</listitem>
+
+<listitem>
+<para>
+Write <filename>vectors.S</filename>. This is the most important file
+in the HAL. It contains the CPU initialization code, exception and
+interrupt handlers. While other HALs should be consulted for
+structures and techniques, there is very little here that can be
+copied over without major edits.
+</para>
+
+<para>
+The main pieces of code that need to be defined here are:
+</para>
+
+<itemizedlist>
+<listitem>
+<para>
+Reset vector. This usually need to be positioned at the start of the
+ROM or FLASH, so should be in a linker section of its own. It can then be
+placed correctly by the linker script. Normally this code is little
+more than a jump to the label <literal>_start</literal>.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Exception vectors. These are the trampoline routines connected to the
+hardware exception entry points that vector through the VSR table. In
+many architectures these are adjacent to the reset vector, and should
+occupy the same linker section. If the architecture allow the vectors
+to be moved then it may be necessary for these trampolines to be
+position independent so they can be relocated at runtime.
+</para>
+
+<para>
+The trampolines should do the minimum necessary to transfer control
+from the hardware vector to the VSR pointed to by the matching table
+entry. Exactly how this is done depends on the architecture. Usually
+the trampoline needs to get some working registers by either saving
+them to CPU special registers (e.g. PowerPC SPRs), using reserved
+general registers (MIPS K0 and K1), using only memory based
+operations (IA32), or just jumping directly (ARM). The VSR table index
+to be used is either implicit in the entry point taken (PowerPC, IA32,
+ARM), or must be determined from a CPU register (MIPS).
+</para>
+</listitem>
+
+<listitem>
+<para>
+Write kernel startup code. This is the location the reset vector jumps
+to, and can be in the main text section of the executable, rather than
+a special section. The code here should first initialize the CPU and other
+hardware subsystems. The best approach is to use a set of macro
+calls that are defined either in <filename>arch.inc</filename> or
+overridden in the variant or platform HALs. Other jobs that this code
+should do are: initialize stack pointer; copy the data section from
+ROM to RAM if necessary; zero the BSS; call variant and platform
+initializers; call <function>cyg_hal_invoke_constructors()</function>;
+call <function>initialize_stub()</function> if necessary. Finally it
+should call <function>cyg_start()</function>. See <xref
+linkend="hal-startup"> for details.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Write the default exception VSR. This VSR is installed in the VSR
+table for all synchronous exception vectors. See <xref
+linkend="hal-default-synchronous-exception-handling"> for details of
+what this VSR does.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Write the default interrupt VSR. This is installed in all VSR table
+entries that correspond to external interrupts. See <xref
+linkend="hal-default-synchronous-exception-handling"> for details of
+what this VSR does.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Write
+<function>hal_interrupt_stack_call_pending_dsrs()</function>. If this
+function is defined in <filename>hal_arch.h</filename> then it should
+appear here. The purpose of this function is to call DSRs on the
+interrupt stack rather than the current thread's stack. This is not an
+essential feature, and may be left until later. However it interacts
+with the stack switching that goes on in the interrupt VSR, so it may
+make sense to write these pieces of code at the same time to ensure
+consistency.
+</para>
+
+<para>
+When this function is implemented it should do the following:
+</para>
+
+<itemizedlist>
+<listitem>
+<para>
+Take a copy of the current SP and then switch to the interrupt stack.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Save the old SP, together with the CPU status register (or whatever
+register contains the interrupt enable status) and any other
+registers that may be corrupted by a function call (such as any link
+register) to locations in the interrupt stack.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Enable interrupts.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Call <function>cyg_interrupt_call_pending_DSRs()</function>. This is a
+kernel functions that actually calls any pending DSRs.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Retrieve saved registers from the interrupt stack and switch back to
+the current thread stack.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Merge the interrupt enable state recorded in the save CPU status
+register with the current value of the status register to restore the
+previous enable state. If the status register does not contain any
+other persistent state then this can be a simple restore of the
+register. However if the register contains other state bits that might
+have been changed by a DSR, then care must be taken not to disturb
+these.
+</para>
+</listitem>
+
+</itemizedlist>
+
+</listitem>
+
+
+<listitem>
+<para>
+Define any data items needed. Typically <filename>vectors.S</filename>
+may contain definitions for the VSR table, the interrupt tables and the
+interrupt stack. Sometimes these are only default definitions that may
+be overridden by the variant or platform HALs.
+</para>
+</listitem>
+
+</itemizedlist>
+
+</listitem>
+
+<listitem>
+<para>
+Write <filename>context.S</filename>. This file contains the context
+switch code. See <xref linkend="hal-context-switch"> for details of
+how these functions operate. This file may also contain the
+implementation of <function>hal_setjmp()</function> and
+<function>hal_longjmp()</function>.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Write <filename>hal_misc.c</filename>. This file contains any C
+data and functions needed by the HAL. These might include:
+</para>
+
+<itemizedlist>
+<listitem>
+<para>
+<varname>hal_interrupt_*[]</varname>. In some HALs, if these arrays
+are not defined in <filename>vectors.S</filename> then they must be
+defined here.
+</para>
+</listitem>
+
+<listitem>
+<para>
+<function>cyg_hal_exception_handler()</function>. This function is
+called from the exception VSR. It usually does extra decoding of the
+exception and invokes any special handlers for things like FPU traps,
+bus errors or memory exceptions. If there is nothing special to be
+done for an exception, then it either calls into the GDB stubs, by
+calling <function>__handle_exception()</function>, or
+invokes the kernel by calling
+<function>cyg_hal_deliver_exception()</function>.
+</para>
+</listitem>
+
+<listitem>
+<para>
+<function>hal_arch_default_isr()</function>. The
+<varname>hal_interrupt_handlers[]</varname> array is usually
+initialized with pointers to <filename>hal_default_isr()</filename>,
+which is defined in the common HAL. This function handles things like
+Ctrl-C processing, but if that is not relevant, then it will call
+<function>hal_arch_default_isr()</function>. Normally this function
+should just return zero.
+</para>
+</listitem>
+
+<listitem>
+<para>
+<function>cyg_hal_invoke_constructors()</function>. This calls the
+constructors for all static objects before the program starts. eCos
+relies on these being called in the correct order for it to function
+correctly. The exact way in which constructors are handled may differ
+between architectures, although most use a simple table of function
+pointers between labels <literal>__CTOR_LIST__</literal> and
+<literal>__CTOR_END__</literal> which must called in order from the
+top down. Generally, this function can be copied directly from an
+existing architecture HAL.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Bit indexing functions. If the macros
+<literal>HAL_LSBIT_INDEX()</literal> and
+<literal>HAL_MSBIT_INDEX()</literal> are defined as function calls,
+then the functions should appear here. The main reason for doing this
+is that the architecture does not have support for bit indexing and
+these functions must provide the functionality by conventional
+means. While the trivial implementation is a simple for loop, it is
+expensive and non-deterministic. Better, constant time,
+implementations can be found in several HALs (MIPS for example).
+</para>
+</listitem>
+
+<listitem>
+<para>
+<function>hal_delay_us()</function>. If the macro
+<literal>HAL_DELAY_US()</literal> is defined in <filename
+class="headerfile">hal_intr.h</filename> then it should be defined to
+call this function. While most of the time this function is called
+with very small values, occasionally (particularly in some ethernet
+drivers) it is called with values of several seconds. Hence the
+function should take care to avoid overflow in any calculations.
+</para>
+</listitem>
+
+<listitem>
+<para>
+<function>hal_idle_thread_action()</function>. This function is called
+from the idle thread via the
+<literal>HAL_IDLE_THREAD_ACTION()</literal> macro, if so
+defined. While normally this function does nothing, during development
+this is often a good place to report various important system
+parameters on LCDs, LED or other displays. This function can also
+monitor system state and report any anomalies. If the architecture
+supports a <literal>halt</literal> instruction then this is a good
+place to put an inline assembly fragment to execute it. It is also a
+good place to handle any power saving activity.
+</para>
+</listitem>
+
+</itemizedlist>
+</listitem>
+
+<listitem>
+<para>
+Create the <filename>&lt;architecture&gt;.ld</filename> file. While
+this file may need to be moved to the variant HAL in the future, it
+should initially be defined here, and only moved if necessary.
+</para>
+<para>
+This file defines a set of macros that are used by the platform
+<literal>.ldi</literal> files to generate linker scripts. Most GCC
+toolchains are very similar so the correct approach is to copy the
+file from an existing architecture and edit it. The main things that
+will need editing are the <literal>OUTPUT_FORMAT()</literal> directive
+and maybe the creation or allocation of extra sections to various
+macros. Running the target linker with just the
+<literal>--verbose</literal> argument will cause it to output its
+default linker script. This can be compared with the
+<literal>.ld</literal> file and appropriate edits made.
+</para>
+</listitem>
+
+<listitem>
+<para>
+If GDB stubs are to be supported in RedBoot or eCos, then support must
+be included for these. The most important of these are <filename
+class="headerfile">include/&lt;architecture&gt;-stub.h</filename> and
+<filename>src/&lt;architecture&gt;-stub.c</filename>. In all existing
+architecture HALs these files, and any support files they need, have
+been derived from files supplied in <literal>libgloss</literal>, as
+part of the GDB toolchain package. If this is a totally new
+architecture, this may not have been done, and they must be created
+from scratch.
+</para>
+
+<para>
+<filename
+class="headerfile">include/&lt;architecture&gt;-stub.h</filename>
+contains definitions that are used by the GDB stubs to describe the
+size, type, number and names of CPU registers. This information is
+usually found in the GDB support files for the architecture. It also
+contains prototypes for the functions exported by
+<filename>src/&lt;architecture&gt;-stub.c</filename>; however, since
+this is common to all architectures, it can be copied from some other
+HAL.
+</para>
+
+<para>
+<filename>src/&lt;architecture&gt;-stub.c</filename> implements the
+functions exported by the header. Most of this is fairly straight
+forward: the implementation in existing HALs should show exactly what
+needs to be done. The only complex part is the support for
+single-stepping. This is used a lot by GDB, so it cannot be
+avoided. If the architecture has support for a trace or single-step
+trap then that can be used for this purpose. If it does not then this
+must be simulated by planting a breakpoint in the next
+instruction. This can be quite involved since it requires some
+analysis of the current instruction plus the state of the CPU to
+determine where execution is going to go next.
+</para>
+
+</listitem>
+
+</orderedlist>
+
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ CDL Requirements -->
+
+<section id="hal-porting-architecture-cdl">
+<title>CDL Requirements</title>
+
+<para>
+The CDL needed for any particular architecture HAL depends to a large
+extent on the needs of that architecture. This includes issues such as
+support for different variants, use of FPUs, MMUs and caches. The
+exact split between the architecture, variant and platform HALs for
+various features is also somewhat fluid.
+</para>
+
+<para>
+To give a rough idea about how the CDL for an architecture is
+structured, we will take as an example the I386 CDL.
+</para>
+
+<para>
+This first section introduces the CDL package and placed it under the
+main HAL package. Include files from this package will be put in the
+<filename>include/cyg/hal</filename> directory, and definitions from
+this file will be placed in
+<filename>include/pkgconf/hal_i386.h</filename>. The
+<literal>compile</literal> line specifies the files in the
+<filename>src</filename> directory that are to be compiled as part of
+this package.
+</para>
+
+<programlisting width=72>
+cdl_package CYGPKG_HAL_I386 {
+ display "i386 architecture"
+ parent CYGPKG_HAL
+ hardware
+ include_dir cyg/hal
+ define_header hal_i386.h
+ description "
+ The i386 architecture HAL package provides generic
+ support for this processor architecture. It is also
+ necessary to select a specific target platform HAL
+ package."
+
+ compile hal_misc.c context.S i386_stub.c hal_syscall.c
+</programlisting>
+
+<para>
+Next we need to generate some files using non-standard make rules. The
+first is <filename>vectors.S</filename>, which is not put into the
+library, but linked explicitly with all applications. The second is
+the generation of the <filename>target.ld</filename> file from
+<filename>i386.ld</filename> and the startup-selected
+<filename>.ldi</filename> file. Both of these are essentially
+boilerplate code that can be copied and edited.
+</para>
+
+<programlisting width=72>
+
+ make {
+ &lt;PREFIX&gt;/lib/vectors.o : &lt;PACKAGE&gt;/src/vectors.S
+ $(CC) -Wp,-MD,vectors.tmp $(INCLUDE_PATH) $(CFLAGS) -c -o $@ $&lt;
+ @echo $@ ": \\" &gt; $(notdir $@).deps
+ @tail +2 vectors.tmp &gt;&gt; $(notdir $@).deps
+ @echo &gt;&gt; $(notdir $@).deps
+ @rm vectors.tmp
+ }
+
+ make {
+ &lt;PREFIX&gt;/lib/target.ld: &lt;PACKAGE&gt;/src/i386.ld
+ $(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) $(CFLAGS) -o $@ $&lt;
+ @echo $@ ": \\" &gt; $(notdir $@).deps
+ @tail +2 target.tmp &gt;&gt; $(notdir $@).deps
+ @echo &gt;&gt; $(notdir $@).deps
+ @rm target.tmp
+ }
+</programlisting>
+
+<para>
+The i386 is currently the only architecture that supports SMP. The
+following CDL simply enabled the HAL SMP support if
+required. Generally this will get enabled as a result of a
+<literal>requires</literal> statement in the kernel. The
+<literal>requires</literal> statement here turns off lazy FPU
+switching in the FPU support code, since it is inconsistent with SMP
+operation.
+</para>
+
+<programlisting width=72>
+
+ cdl_component CYGPKG_HAL_SMP_SUPPORT {
+ display "SMP support"
+ default_value 0
+ requires { CYGHWR_HAL_I386_FPU_SWITCH_LAZY == 0 }
+
+ cdl_option CYGPKG_HAL_SMP_CPU_MAX {
+ display "Max number of CPUs supported"
+ flavor data
+ default_value 2
+ }
+ }
+</programlisting>
+
+<para>
+The i386 HAL has optional FPU support, which is enabled by default. It
+can be disabled to improve system performance. There are two FPU
+support options: either to save and restore the FPU state on every
+context switch, or to only switch the FPU state when necessary.
+</para>
+
+<programlisting width=72>
+
+ cdl_component CYGHWR_HAL_I386_FPU {
+ display "Enable I386 FPU support"
+ default_value 1
+ description "This component enables support for the
+ I386 floating point unit."
+
+ cdl_option CYGHWR_HAL_I386_FPU_SWITCH_LAZY {
+ display "Use lazy FPU state switching"
+ flavor bool
+ default_value 1
+
+ description "
+ This option enables lazy FPU state switching.
+ The default behaviour for eCos is to save and
+ restore FPU state on every thread switch, interrupt
+ and exception. While simple and deterministic, this
+ approach can be expensive if the FPU is not used by
+ all threads. The alternative, enabled by this option,
+ is to use hardware features that allow the FPU state
+ of a thread to be left in the FPU after it has been
+ descheduled, and to allow the state to be switched to
+ a new thread only if it actually uses the FPU. Where
+ only one or two threads use the FPU this can avoid a
+ lot of unnecessary state switching."
+ }
+ }
+</programlisting>
+
+<para>
+The i386 HAL also has support for different classes of CPU. In
+particular, Pentium class CPUs have extra functional units, and some
+variants of GDB expect more registers to be reported. These options
+enable these features. Generally these are enabled by
+<literal>requires</literal> statements in variant or platform
+packages, or in <literal>.ecm</literal> files.
+</para>
+
+<programlisting width=72>
+
+ cdl_component CYGHWR_HAL_I386_PENTIUM {
+ display "Enable Pentium class CPU features"
+ default_value 0
+ description "This component enables support for various
+ features of Pentium class CPUs."
+
+ cdl_option CYGHWR_HAL_I386_PENTIUM_SSE {
+ display "Save/Restore SSE registers on context switch"
+ flavor bool
+ default_value 0
+
+ description "
+ This option enables SSE state switching. The default
+ behaviour for eCos is to ignore the SSE registers.
+ Enabling this option adds SSE state information to
+ every thread context."
+ }
+
+ cdl_option CYGHWR_HAL_I386_PENTIUM_GDB_REGS {
+ display "Support extra Pentium registers in GDB stub"
+ flavor bool
+ default_value 0
+
+ description "
+ This option enables support for extra Pentium registers
+ in the GDB stub. These are registers such as CR0-CR4, and
+ all MSRs. Not all GDBs support these registers, so the
+ default behaviour for eCos is to not include them in the
+ GDB stub support code."
+ }
+ }
+</programlisting>
+
+<para>
+In the i386 HALs, the linker script is provided by the architecture
+HAL. In other HALs, for example MIPS, it is provided in the variant
+HAL. The following option provides the name of the linker script to
+other elements in the configuration system.
+</para>
+
+<programlisting width=72>
+ cdl_option CYGBLD_LINKER_SCRIPT {
+ display "Linker script"
+ flavor data
+ no_define
+ calculated { "src/i386.ld" }
+ }
+</programlisting>
+
+<para>
+Finally, this interface indicates whether the platform supplied an
+implementation of the
+<function>hal_i386_mem_real_region_top()</function> function. If it
+does then it will contain a line of the form: <literal>implements
+CYGINT_HAL_I386_MEM_REAL_REGION_TOP</literal>. This allows packages
+such as RedBoot to detect the presence of this function so that they
+may call it.
+</para>
+
+<programlisting width=72>
+
+ cdl_interface CYGINT_HAL_I386_MEM_REAL_REGION_TOP {
+ display "Implementations of hal_i386_mem_real_region_top()"
+ }
+
+}
+</programlisting>
+
+</section>
+
+<!-- }}} -->
+
+<!--
+<para><a href="hal-arch-process.html">Porting process</a>
+<para><a href="hal-cache.html">HAL Cache Controls</a>
+<para><a href="hal-linking.html">Linker Script Macros</a>
+<para><a href="hal-arch-cdl.html">CDL requirements</a>
+
+-->
+
+</section>
+
+<!-- }}} -->
+
+</CHAPTER>
+
+<!--
+
+Notes added by Nickg:
+
+The following are my notes from the HAL Porting course I did at
+Agilent in Feb 2002. It was my intention to incorporate some stuff
+from here into the Platform Porting section and to include some of
+the things I learned while doing the course. The main things I wanted
+to do were: to change the porting process to concentrate on getting
+RedBoot to run rather than the GDB stubs ROM; update the descriptions
+to match current practice - some of it is now quite old; remove all
+the TBDs and FIXMEs; mend the worst of Jesper's danglish :-)
+
+Also the variant and architecture porting guides are still in the
+incomplete state that Jesper left them; and there are some other bits
+and pieces in the original HTML porting guide that I have not yet
+moved over.
+
+The ridiculous demands of management to sacrifice quality to
+expediency mean that this is not now possible and this document has to
+be abandoned in mid-flux. So I'm just dumping this stuff here. Maybe
+one day someone will get around to doing it properly.
+
+
+
+
+Porting Principals
+==================
+
+Copy an existing HAL.
+ - choose a HAL with which you are familiar and/or which is
+ similar to the intended target.
+ - copy the files
+ - rename them appropriately
+ - rename configuration variables
+ - empty/reimplement platform specific code.
+ - old code is a good indicator of what you need to do.
+ - concentrate on getting it all to compile, so just commenting
+ out the platform specific bits is often a good idea.
+
+Follow execution order.
+ - gives a good indication of what to do next.
+
+Concentrate on RedBoot first.
+ - simpler environment - no interrupts, no threads.
+
+
+CDL
+===
+
+CDL changes made as part of the copy/edit above should be done.
+
+Need to add entries to ecos.db for the new packages.
+
+Platform:
+
+package CYGPKG_HAL_ARM_ARM9_XXXXXXXX {
+ alias { "XXXXXXXX unit" hal_arm_arm9_xxxxxxxx xxxxxxxx }
+ directory hal/arm/arm9/xxxxxxxx
+ script hal_arm_arm9_xxxxxxxx.cdl
+ hardware
+ description "
+ The XXXXXXXX HAL package provides the support needed to run
+ eCos on an XXXXXXXX board."
+}
+
+Target:
+
+target xxxxxxxx {
+ alias { "XXXXXXXX unit" aaed }
+ packages { CYGPKG_HAL_ARM
+ CYGPKG_HAL_ARM_ARM9
+ CYGPKG_HAL_ARM_ARM9_XXXXXXXX
+ }
+ description "
+ The XXXXXXXX target provides the packages needed to run
+ eCos on an XXXXXXXX board."
+}
+
+==================================================================
+
+Getting RedBoot Going
+=====================
+
+Startup
+=======
+
+1. Reset entry point. At location 0.
+ Transfer control to ROM entry point: reset_vector.
+
+2. Here we call invoke PLATFORM_SETUP1 macro. This does the following:
+ - disable interrupts
+ - disable and clear caches
+ - Init memory controllers. may involve discovery of what RAM is
+ present.
+ - Set up clock frequencies.
+ - Init MMU table
+ - sets up TTBR and DACR to default values
+ - fills in MMU table to map
+ - DRAM at 0x00000000 cacheable/buffered
+ - Device registers elsewhere uncacheable/unbuffered usually 1-1
+ - DRAM at 0xF0000000 uncacheable/unbuffered (1-1 in aaed2000)
+ - remap ROM at 0 elsewhere
+ - Enable MMU
+ - Relocate image to RAM for ROMRAM startup
+ - Any other CPU setup required
+
+3. Jump to HAL startup.
+ - Plant vector intructions at 0+
+ - copy .data section to RAM
+ - Init CPSR and SPSR
+ - Set SP
+ - Clear .bss
+ - Call hal_hardware_init()
+ - call initialize_stub() if GDB stubs included
+ - call hal_ctrlc_isr_init()
+ - call cyg_hal_invoke_constructors()
+ - call cyg_start()
+
+
+HAL Serial support
+==================
+
+Set up CDL in platform CDL file.
+ CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS
+ number of channels usually 0, 1 or 2
+ CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL
+ channel to use for GDB
+ CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD
+ initial baud rate
+ CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL
+ channel to use for console
+ CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD
+ initial baud rate
+ CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
+ default console channel
+
+The code in hal_diag.c need to be converted to the new serial device.
+If this the same as a device already supported, copy that.
+
+Things that need to be written:
+
+struct channel_data_t;
+ Structure containing base address, timeout and ISR vector
+ number for each serial device.
+
+xxxx_ser_channels[];
+ Array of channel_data_t, initialized with parameters of each
+ channel.
+
+void cyg_hal_plf_serial_init_channel(void *__ch_data)
+ Initialize the serial device. parameter is a pointer to a
+ channel_data_t.
+
+void cyg_hal_plf_serial_putc(void * __ch_data, char *c)
+ Send a character to the serial device.
+ Poll for ready, write the char.
+ Maybe poll for char sent.
+
+bool cyg_hal_plf_serial_getc_nonblock(void* __ch_data, cyg_uint8* ch)
+ Look for a character and return it if available.
+ If none available, return false.
+
+int cyg_hal_plf_serial_control(void *__ch_data, __comm_control_cmd_t
+__func, ...)
+ An IOCTL-like function for controlling various aspects of the
+ serial device.
+ May need to do some work in __COMMCTL_IRQ_ENABLE and
+ __COMMCTL_IRQ_DISABLE cases to enable/disable interrupts.
+
+int cyg_hal_plf_serial_isr(void *__ch_data, int* __ctrlc,
+ CYG_ADDRWORD __vector, CYG_ADDRWORD __data)
+ Interrupt handler, specifically for dealing with Ctrl-C.
+ - Check for an incoming character.
+ - Read the character and call cyg_hal_is_break().
+ - If result is true, set *__ctrlc to 1.
+ - return CYG_ISR_HANDLED;
+
+void cyg_hal_plf_serial_init()
+ Initialize each of the serial channels.
+ - call cyg_hal_plf_serial_init_channel() for each channel.
+ - call CYGACC_COMM_IF_* macros for each channel -
+ cut/paste/edit these.
+
+
+Interrupt Controller
+====================
+
+ARM platforms have interrupt controller access in functions in variant
+or platform source file.
+
+void hal_interrupt_mask(int vector)
+ Manipulate interrupt controller to mask the interrupt.
+
+void hal_interrupt_unmask(int vector)
+ Manipulate interrupt controller to unmask the interrupt.
+
+void hal_interrupt_acknowledge(int vector)
+ Manipulate interrupt controller to acknowledge the interrupt.
+ May not be needed in some platforms.
+
+void hal_interrupt_configure(int vector, int level, int up)
+ Set interrupt detection: level vs. edge; high/low
+ rising/falling.
+ Leave empty where not implemented.
+
+void hal_interrupt_set_level(int vector, int level)
+ Set interrupt priority level.
+ Leave empty where not implemented.
+
+
+Redboot Configuration
+=====================
+
+Having done all of the above, you should be in a position to get
+RedBoot running.
+
+If the platform you copied has redboot, there should be some .ecm
+files in the misc directory. Named redboot_<startup>.ecm.
+
+Choose a startup and edit the .ecm file.
+ - remove any options that are not relevant
+ - comment out FLASH, ETH and COMPRESS packages
+
+Configure for redboot:
+
+% setenv ECOS_REPOSITORY <path to source repository>
+% ecosconfig new xxxxxxxx redboot
+% ecosconfig import $ECOS_REPOSITORY/hal/arm/arm9/xxxxxxxx/current/misc/redboot_ROM.ecm
+% ecosconfig tree
+% make
+
+Repeat until successful.
+
+Load into hardware by either programming FLASH from existing ROM
+monitor, via JTAG or whatever.
+
+Run. Debug. Edit. Repeat.
+
+==================================================================
+
+Getting eCos Going
+==================
+
+Once RedBoot is up and running, it should be possible to configure and
+build eCos.
+
+Use the kernel template to start with.
+
+
+Clock Support
+=============
+
+We will use the RTC to test that interrupts are working. First step is
+to get RTC working.
+
+void hal_clock_initialize(cyg_uint32 period)
+ Initialize the RTC device to interrupt every period ticks. The
+ CDL should have defined period according to the frequency
+ required.
+ This should start the clock going.
+
+void hal_clock_reset(cyg_uint32 vector, cyg_uint32 period)
+ Perform any work to cause the clock to start another timing
+ period. On many platforms this can be empty. On others the
+ counter or compare register may need to be reloaded.
+
+void hal_clock_read(cyg_uint32 *pvalue)
+ Returns the number of hardware ticks since the last interrupt.
+ For count-up timers this is just the value of the timer.
+ For count-down timers the result needs to be subtracted from the
+ initial period.
+
+void hal_delay_us(cyg_int32 usecs)
+ Busy delay for the given number of microseconds.
+ Normally this works by polling the timer device until the
+ required number of usecs has passed.
+ Beware of timer wrap-around, resets, and arithmetic overflows.
+ This function does not have to be very accurate - it's used
+ mostly to provide short timing delays during hardware access.
+
+Interrupt Handling
+==================
+
+Quick overview of interrupt handling:
+
+
+1. Hardware interrupts are delivered to either the IRQ or FIQ vectors at
+ 0x18 and 0x1c respectively.
+
+2. These contain single instructions that load the contents of the memory
+ location 0x20 later in memory and jump there.
+
+3. The code called is a VSR - Vector Service Routine. FIQ VSR fakes
+ CPU state to make it look like an IRQ, then drops into IRQ.
+
+4. Switch back to supervisor mode. Save CPU state onto current stack.
+
+5. Switch to interrupt stack if not already there.
+
+6. Lock scheduler.
+
+7. Call hal_IRQ_handler(). This function inspects the interrupt
+ controller and returns the number of the highest priority pending,
+ unmasked interrupt.
+
+8. Use vector number to index hal_interrupt_handlers[] and
+ hal_interrupt_data[] to get ISR and data.
+
+9. Call ISR. keep the return value.
+
+10. Switch back to original stack.
+
+11. Index hal_interrupt_objects[] with vector number to get interrupt
+ object pointer.
+
+12. Call interrupt_end(isr_ret, *object, *save_regs).
+ This will:
+ - post the onterrupt object's DSR if CYG_ISR_CALL_DSR is set in
+ return code.
+ - Unlock scheduler. During this the following may happen:
+ - Any pending DSRs may be called
+ - The current thread may be preempted, either by a higher
+ priority thread scheduled by a DSR, or it may be timesliced.
+
+13. The return from interrupt_end() may occur some time after the
+ call: lots of threads may have run in the meantime.
+
+14. Restore CPU state and resume interrupted code.
+
+
+The only thing that needs doing in a platform port is to write
+hal_IRQ_handler().
+
+
+
+Once the clock and IRQ code is done, eCos should be able to run all of
+the kernel tests. The best all-round test is tm_basic. Other tests
+that should be run are:
+ clocktruth - tests accuracy of timer setup
+ except1 - checks exception handling works
+ timeslice - checks timeslicing works
+
+Run. Debug. Edit. Repeat.
+
+
+
+
+-->
+
+
diff --git a/cesar/ecos/packages/hal/common/current/include/dbg-thread-syscall.h b/cesar/ecos/packages/hal/common/current/include/dbg-thread-syscall.h
new file mode 100644
index 0000000000..9e93e05105
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/include/dbg-thread-syscall.h
@@ -0,0 +1,111 @@
+//========================================================================
+//
+// dbg-thread-syscall.h
+//
+// Supports thread-aware debugging
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Red Hat, nickg
+// Contributors: Red Hat, nickg
+// Date: 1998-08-25
+// Purpose:
+// Description: Supports thread-aware debugging
+// Usage: This header is not to be included by user code.
+// This file should be included only by
+// thread-syscall-relay.c and dbg-thread-demux.c
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+
+enum dbg_syscall_ids
+ {
+ dbg_null_func ,
+ dbg_capabilities_func,
+ dbg_currthread_func,
+ dbg_threadlist_func,
+ dbg_threadinfo_func,
+ dbg_getthreadreg_func,
+ dbg_setthreadreg_func,
+ dbg_scheduler_func,
+ } ;
+
+
+union dbg_thread_syscall_parms
+{
+ struct
+ {
+ struct dbg_capabilities * abilities ;
+ } cap_parms ;
+
+ struct
+ {
+ threadref * ref ;
+ } currthread_parms ;
+
+ struct
+ {
+ int startflag ;
+ threadref * lastid ;
+ threadref * nextthreadid ;
+ } threadlist_parms ;
+
+ struct
+ {
+ threadref * ref ;
+ struct cygmon_thread_debug_info * info ;
+ } info_parms ;
+
+ struct
+ {
+ threadref * thread ;
+ int regcount ;
+ void * registers ;
+ } reg_parms ;
+ struct
+ {
+ threadref * thread ; /* 64-bit thread identifier */
+ int lock; /* 0 == unlock, 1 == lock */
+ int mode; /* 0 == short (step), 1 == continue */
+ } scheduler_parms ;
+} ;
+
+
+typedef int (*dbg_syscall_func) (enum dbg_syscall_ids id,
+ union dbg_thread_syscall_parms * p ) ;
diff --git a/cesar/ecos/packages/hal/common/current/include/dbg-threads-api.h b/cesar/ecos/packages/hal/common/current/include/dbg-threads-api.h
new file mode 100644
index 0000000000..94fffeb790
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/include/dbg-threads-api.h
@@ -0,0 +1,161 @@
+//========================================================================
+//
+// dbg-threads-api.h
+//
+// Supports thread-aware debugging
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Red Hat, nickg
+// Contributors: Red Hat, nickg
+// Date: 1998-08-25
+// Purpose:
+// Description: These are the calls used to extract operating system
+// specific information used in supporting thread aware
+// debugging. The Operating Environment being debugged
+// needs to supply these functions.
+// Usage: This header is not to be included by user code.
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+#if !defined(DBG_THREADS_API_INCLUDED)
+#define DBG_THREADS_API_INCLUDED 1
+
+#include <cyg/infra/cyg_type.h> /* externC */
+
+#define has_thread_void 0
+#define has_thread_current 1
+#define has_thread_registers 2
+#define has_thread_reg_change 4
+#define has_thread_list 8
+#define has_thread_info 16
+
+typedef unsigned char threadref[8] ;
+
+struct dbg_capabilities
+{
+ unsigned long mask1 ;
+} ;
+
+
+/* fill in the list of thread aware capabilities */
+externC int dbg_thread_capabilities(struct dbg_capabilities * cbp) ;
+
+
+/* Fillin the identifier of the current thread */
+/* return 1 if defined, 0 if not defined */
+externC int dbg_currthread(threadref * varparm) ;
+
+/* Return the unique ID number of a given thread. */
+/* Return 0 if not valid. */
+externC int dbg_thread_id(threadref *threadid);
+
+/* Return the unique ID number of the current thread. */
+externC int dbg_currthread_id(void);
+
+/* get the first or next member of the list of known threads */
+externC int dbg_threadlist(int startflag,
+ threadref * lastthreadid,
+ threadref * next_thread
+ ) ;
+
+/* return 1 if next_threadid has been filled in with a value */
+/* return 0 if there are none or no more */
+
+/* The O.S can fill in the following information about a thread when queried.
+ The structure of thise strings is determined by the O.S.
+ It is display oriented, so figure out what the users need to see.
+ Nulls are OK but GDB will fill some not so meaningful data.
+ These pointers may be in the calles private structures, the info will
+ get copied immediatly after the call to retreive it.
+ */
+struct cygmon_thread_debug_info
+{
+ threadref thread_id ;
+ int context_exists ; /* To the point where examining its state,
+ registers and stack makes sense to GDB */
+ char * thread_display ; /* As shown in thread status window, name, state */
+ char * unique_thread_name ; /* human readable identifier, window label */
+ char * more_display ; /* more detailed info about thread.
+ priority, queuedepth, state, stack usage, statistics */
+} ;
+
+
+
+
+externC int dbg_threadinfo(
+ threadref * threadid,
+ struct cygmon_thread_debug_info * info) ;
+
+/* Return 1 if threadid is defined and info copied, 0 otherwise */
+
+/* The O.S should fillin the array of registers using values from the
+saves context. The array MUST be in GDB register save order even if
+the saved context is different or smaller. Do not alter the values of
+registers which are NOT in the O.S. thread context. Their default values
+have already been assigned.
+*/
+
+externC int dbg_getthreadreg(
+ threadref * osthreadid,
+ int regcount, /* count of registers in the array */
+ void * regval) ; /* fillin this array */
+
+
+/* The O.S. should scan through this list of registers which are in
+GDB order and the O.S. should replace the values of all registers
+which are defined in the saved context of thread or process identified
+by osthreadid. Return 0 if the threadis does not map to a known
+process or other error. Return 1 if the setting is successful. */
+
+externC int dbg_setthreadreg(
+ threadref * osthreadid,
+ int regcount , /* number of registers */
+ void * regval) ;
+
+/* Control over OS scheduler. With the scheduler locked it should not
+ perform any rescheduling in response to interrupts. */
+externC int dbg_scheduler(
+ threadref * osthreadid,
+ int lock, /* 0 == unlock, 1 == lock */
+ int mode); /* 0 == step, 1 == continue */
+
+
+
+#endif /* DBG_THREADS_API_INCLUDED */
diff --git a/cesar/ecos/packages/hal/common/current/include/drv_api.h b/cesar/ecos/packages/hal/common/current/include/drv_api.h
new file mode 100644
index 0000000000..75a55470cc
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/include/drv_api.h
@@ -0,0 +1,251 @@
+#ifndef CYGONCE_HAL_DRV_API_H
+#define CYGONCE_HAL_DRV_API_H
+
+/*==========================================================================
+//
+// drv_api.h
+//
+// Native API for Kernel
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Date: 1999-02-24
+// Purpose: Driver API
+// Description: This file defines the API used by device drivers to access
+// system services. When the kernel is present it maps directly
+// to the Kernel C API. When the kernel is absent, it is provided
+// by a set of HAL functions.
+//
+// Usage: #include <cyg/kernel/kapi.h>
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================*/
+
+#include <pkgconf/hal.h>
+#include <cyg/infra/cyg_type.h>
+
+#ifdef CYGPKG_KERNEL
+
+/*------------------------------------------------------------------------*/
+/* Kernel co-resident version of API */
+
+#include <pkgconf/kernel.h>
+
+#ifndef CYGFUN_KERNEL_API_C
+#error Driver API requres Kernel API to be present
+#endif
+
+#include <cyg/kernel/kapi.h>
+
+#define cyg_drv_isr_lock cyg_interrupt_disable
+#define cyg_drv_isr_unlock cyg_interrupt_enable
+
+#define cyg_drv_dsr_lock cyg_scheduler_lock
+#define cyg_drv_dsr_unlock cyg_scheduler_unlock
+
+#define cyg_drv_mutex_t cyg_mutex_t
+#define cyg_drv_mutex_init cyg_mutex_init
+#define cyg_drv_mutex_destroy cyg_mutex_destroy
+#define cyg_drv_mutex_lock cyg_mutex_lock
+#define cyg_drv_mutex_trylock cyg_mutex_trylock
+#define cyg_drv_mutex_unlock cyg_mutex_unlock
+#define cyg_drv_mutex_release cyg_mutex_release
+
+#define cyg_drv_cond_t cyg_cond_t
+#define cyg_drv_cond_init cyg_cond_init
+#define cyg_drv_cond_destroy cyg_cond_destroy
+#define cyg_drv_cond_wait cyg_cond_wait
+#define cyg_drv_cond_signal cyg_cond_signal
+#define cyg_drv_cond_broadcast cyg_cond_broadcast
+
+#define cyg_drv_interrupt_create cyg_interrupt_create
+#define cyg_drv_interrupt_delete cyg_interrupt_delete
+#define cyg_drv_interrupt_attach cyg_interrupt_attach
+#define cyg_drv_interrupt_detach cyg_interrupt_detach
+#define cyg_drv_interrupt_mask cyg_interrupt_mask
+#define cyg_drv_interrupt_unmask cyg_interrupt_unmask
+#define cyg_drv_interrupt_mask_intunsafe cyg_interrupt_mask_intunsafe
+#define cyg_drv_interrupt_unmask_intunsafe cyg_interrupt_unmask_intunsafe
+#define cyg_drv_interrupt_acknowledge cyg_interrupt_acknowledge
+#define cyg_drv_interrupt_configure cyg_interrupt_configure
+#define cyg_drv_interrupt_level cyg_interrupt_level
+#define cyg_drv_interrupt_set_cpu cyg_interrupt_set_cpu
+#define cyg_drv_interrupt_get_cpu cyg_interrupt_get_cpu
+
+#define cyg_drv_spinlock_t cyg_spinlock_t
+#define cyg_drv_spinlock_init cyg_spinlock_init
+#define cyg_drv_spinlock_spin cyg_spinlock_spin
+#define cyg_drv_spinlock_clear cyg_spinlock_clear
+#define cyg_drv_spinlock_try cyg_spinlock_try
+#define cyg_drv_spinlock_test cyg_spinlock_test
+#define cyg_drv_spinlock_spin_intsave cyg_spinlock_spin_intsave
+#define cyg_drv_spinlock_clear_intsave cyg_spinlock_clear_intsave
+
+#else /* CYGPKG_KERNEL */
+
+/*------------------------------------------------------------------------*/
+/* Non-kernel version of API */
+
+typedef CYG_ADDRWORD cyg_addrword_t; /* May hold pointer or word */
+typedef cyg_addrword_t cyg_handle_t; /* Object handle */
+typedef cyg_uint32 cyg_priority_t; /* type for priorities */
+typedef cyg_uint32 cyg_vector_t; /* Interrupt vector id */
+typedef cyg_uint32 cyg_cpu_t; /* CPU id */
+typedef int cyg_bool_t;
+typedef cyg_int32 cyg_code_t; /* type for various codes */
+
+typedef cyg_uint32 cyg_ISR_t( cyg_vector_t vector, cyg_addrword_t data);
+typedef void cyg_DSR_t(cyg_vector_t vector,
+ cyg_ucount32 count,
+ cyg_addrword_t data);
+
+
+externC void cyg_drv_isr_lock(void);
+externC void cyg_drv_isr_unlock(void);
+
+externC void cyg_drv_dsr_lock(void);
+externC void cyg_drv_dsr_unlock(void);
+
+typedef struct
+{
+ cyg_atomic lock;
+} cyg_drv_mutex_t;
+
+externC void cyg_drv_mutex_init( cyg_drv_mutex_t *mutex );
+externC void cyg_drv_mutex_destroy( cyg_drv_mutex_t *mutex );
+externC cyg_bool_t cyg_drv_mutex_lock( cyg_drv_mutex_t *mutex );
+externC cyg_bool_t cyg_drv_mutex_trylock( cyg_drv_mutex_t *mutex );
+externC void cyg_drv_mutex_unlock( cyg_drv_mutex_t *mutex );
+externC void cyg_drv_mutex_release( cyg_drv_mutex_t *mutex );
+
+typedef struct
+{
+ cyg_atomic wait;
+ cyg_drv_mutex_t *mutex;
+} cyg_drv_cond_t;
+
+externC void cyg_drv_cond_init( cyg_drv_cond_t *cond, cyg_drv_mutex_t *mutex );
+externC void cyg_drv_cond_destroy( cyg_drv_cond_t *cond );
+externC cyg_bool_t cyg_drv_cond_wait( cyg_drv_cond_t *cond );
+externC void cyg_drv_cond_signal( cyg_drv_cond_t *cond );
+externC void cyg_drv_cond_broadcast( cyg_drv_cond_t *cond );
+
+typedef struct cyg_interrupt
+{
+ cyg_vector_t vector;
+ cyg_priority_t priority;
+ cyg_ISR_t *isr;
+ cyg_DSR_t *dsr;
+ CYG_ADDRWORD data;
+
+ struct cyg_interrupt* volatile next_dsr;
+ volatile cyg_int32 dsr_count;
+
+#ifdef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
+ struct cyg_interrupt *next;
+#endif
+
+} cyg_interrupt;
+
+externC void cyg_drv_interrupt_create(
+ cyg_vector_t vector,
+ cyg_priority_t priority,
+ cyg_addrword_t data,
+ cyg_ISR_t *isr,
+ cyg_DSR_t *dsr,
+ cyg_handle_t *handle,
+ cyg_interrupt *intr
+ );
+externC void cyg_drv_interrupt_delete( cyg_handle_t interrupt );
+externC void cyg_drv_interrupt_attach( cyg_handle_t interrupt );
+externC void cyg_drv_interrupt_detach( cyg_handle_t interrupt );
+
+externC void cyg_drv_interrupt_mask( cyg_vector_t vector );
+externC void cyg_drv_interrupt_mask_intunsafe( cyg_vector_t vector );
+externC void cyg_drv_interrupt_unmask( cyg_vector_t vector );
+externC void cyg_drv_interrupt_unmask_intunsafe( cyg_vector_t vector );
+externC void cyg_drv_interrupt_acknowledge( cyg_vector_t vector );
+externC void cyg_drv_interrupt_configure(
+ cyg_vector_t vector,
+ cyg_bool_t level,
+ cyg_bool_t up
+ );
+externC void cyg_drv_interrupt_level( cyg_vector_t vector, cyg_priority_t level );
+externC void cyg_drv_interrupt_set_cpu( cyg_vector_t vector, cyg_cpu_t cpu );
+externC cyg_cpu_t cyg_drv_interrupt_get_cpu( cyg_vector_t vector );
+
+
+enum cyg_ISR_results
+{
+ CYG_ISR_HANDLED = 1, /* Interrupt was handled */
+ CYG_ISR_CALL_DSR = 2 /* Schedule DSR */
+};
+
+
+typedef struct
+{
+ cyg_atomic lock;
+} cyg_drv_spinlock_t;
+
+void cyg_drv_spinlock_init(
+ cyg_drv_spinlock_t *lock, /* spinlock to initialize */
+ cyg_bool_t locked /* init locked or unlocked */
+);
+
+void cyg_drv_spinlock_destroy( cyg_drv_spinlock_t *lock );
+
+void cyg_drv_spinlock_spin( cyg_drv_spinlock_t *lock );
+
+void cyg_drv_spinlock_clear( cyg_drv_spinlock_t *lock );
+
+cyg_bool_t cyg_drv_spinlock_try( cyg_drv_spinlock_t *lock );
+
+cyg_bool_t cyg_drv_spinlock_test( cyg_drv_spinlock_t *lock );
+
+void cyg_drv_spinlock_spin_intsave( cyg_drv_spinlock_t *lock,
+ cyg_addrword_t *istate );
+
+void cyg_drv_spinlock_clear_intsave( cyg_drv_spinlock_t *lock,
+ cyg_addrword_t istate );
+
+#endif /* CYGPKG_KERNEL */
+
+/*------------------------------------------------------------------------*/
+/* EOF drv_api.h */
+#endif // CYGONCE_HAL_DRV_API_H
diff --git a/cesar/ecos/packages/hal/common/current/include/generic-stub.h b/cesar/ecos/packages/hal/common/current/include/generic-stub.h
new file mode 100644
index 0000000000..d90b0af559
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/include/generic-stub.h
@@ -0,0 +1,366 @@
+//========================================================================
+//
+// generic-stub.h
+//
+// Definitions for the generic GDB remote stub
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Red Hat, nickg
+// Contributors: Red Hat, nickg, dmoseley
+// Date: 1998-06-08
+// Purpose:
+// Description: Definitions for the generic GDB remote stub
+// Usage: This header is not to be included by user code, and is
+// only placed in a publically accessible directory so
+// that platform stub packages are able to include it
+// if required.
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+
+#ifndef GENERIC_STUB_H
+#define GENERIC_STUB_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Three typedefs must be provided before including this file.
+ target_register_t should correspond to the largest register value on
+ this target processor.
+ regnames_t corresponds to a type representing a register number.
+ uint32 must correspond to at least a 32-bit unsigned integer type
+ (it may be larger). */
+
+#ifndef ASM
+
+#ifndef __ECOS__
+#include "dbg-serial.h"
+#endif // __ECOS__
+
+struct gdb_packet
+{
+ /* The checksum calculated so far. */
+ uint32 checksum;
+ /* The checksum we've received from the remote side. */
+ uint32 xmitcsum;
+ /* Contents of the accumulated packet. */
+ char *contents;
+ /* Number of characters received. */
+ uint32 length;
+ /*
+ * state is the current state:
+ * 0 = looking for start of packet
+ * 1 = got start of packet, looking for # terminator
+ * 2 = looking for first byte of checksum
+ * 3 = looking for second byte of checksum (indicating end of packet)
+ */
+ char state;
+ char err; // This is set if the packet should be tossed because of overflow
+};
+
+/* Return the currently-saved value corresponding to register REG. */
+extern target_register_t get_register (regnames_t reg);
+
+/* Write the contents of register WHICH into VALUE as raw bytes */
+extern int get_register_as_bytes (regnames_t which, char *value);
+
+#ifdef CYGHWR_REGISTER_VALIDITY_CHECKING
+// Return the validity of register REG.
+extern int get_register_valid (regnames_t reg);
+#endif
+
+/* Store VALUE in the register corresponding to WHICH. */
+extern void put_register (regnames_t which, target_register_t value);
+
+extern int put_register_as_bytes (regnames_t which, char *value);
+
+/* Set the next instruction to be executed when the user program resumes
+ execution to PC. */
+#if !defined(SET_PC_PROTOTYPE_EXISTS) && !defined(set_pc)
+#define SET_PC_PROTOTYPE_EXISTS
+extern void set_pc (target_register_t pc);
+#endif
+
+/* Set the return value of the currently-pending syscall to VALUE. */
+extern void set_syscall_value (target_register_t value);
+
+/* Return the Nth argument to the currently-pending syscall (starting from
+ 0). */
+extern target_register_t get_syscall_arg (int n);
+
+/* Initialize the stub. This will also install any trap handlers needed by
+ the stub. */
+extern void initialize_stub (void);
+
+/* Initialize the hardware. */
+extern void initHardware (void);
+
+/* Skip the current instruction. */
+extern void __skipinst (void);
+
+/* If the address in the PC register corresponds to the breakpoint()
+ instruction, return a non-zero value. */
+#ifndef __is_breakpoint_function
+extern int __is_breakpoint_function (void);
+#endif
+
+/* Execute a breakpoint instruction. Restarting will cause the instruction
+ to be skipped. */
+#ifndef breakpoint
+extern void breakpoint (void);
+#endif
+
+/* Return the syscall # corresponding to this system call. */
+extern int __get_syscall_num (void);
+
+/* Transfer exception event processing to the stub. */
+extern void __switch_to_stub (void);
+
+/* Send an exit packet containing the specified status. */
+extern void __send_exit_status (int status);
+
+/* Copy COUNT bytes of memory from ADDR to BUF.
+ ADDR is assumed to live in the user program's space.
+ Returns number of bytes successfully read
+ (caller must check to see if less than requested). */
+extern int __read_mem_safe (void *buf,
+ void *addr,
+ int count);
+
+extern int __read_progmem_safe (void *buf,
+ void *addr,
+ int count);
+
+/* Copy COUNT bytes of memory from BUF to ADDR.
+ ADDR is assumed to live in the user program's space.
+ Returns number of bytes successfully read
+ (caller must check to see if less than requested). */
+#ifndef __write_mem_safe
+extern int __write_mem_safe (void *buf,
+ void *addr,
+ int count);
+#endif
+
+extern int __write_progmem_safe (void *buf,
+ void *addr,
+ int count);
+
+/* Set to a non-zero value if a memory fault occurs while
+ __set_mem_fault_trap () is running. */
+extern volatile int __mem_fault;
+
+#ifndef __ECOS__
+#if 1
+#include "stub-tservice.h" /* target dependent stub services */
+#else
+/* Flush the instruction cache. */
+extern void flush_i_cache (void);
+
+/* Flush the data cache. */
+extern void __flush_d_cache (void);
+
+typedef enum {
+ CACHE_NOOP, CACHE_ENABLE, CACHE_DISABLE, CACHE_FLUSH
+} cache_control_t;
+
+/* Perform the specified operation on the instruction cache.
+ Returns 1 if the cache is enabled, 0 otherwise. */
+extern int __instruction_cache (cache_control_t request);
+/* Perform the specified operation on the data cache.
+ Returns 1 if the cache is enabled, 0 otherwise. */
+extern int __data_cache (cache_control_t request);
+#endif
+#endif // __ECOS__
+
+/* Write the 'T' packet in BUFFER. SIGVAL is the signal the program
+ received. */
+extern void __build_t_packet (int sigval, char *buffer);
+
+/* Return 1 when a complete packet has been received, 0 if the packet
+ is not yet complete, or -1 if an erroneous packet was NAKed. */
+int __add_char_to_packet (unsigned character, struct gdb_packet *packet);
+
+typedef int (*__PFI)(int);
+typedef void (*__PFV)(void);
+
+/* When an exception occurs, __process_exception_vec will be invoked with
+ the signal number corresponding to the trap/exception. The function
+ should return zero if it wishes execution to resume from the saved
+ register values; a non-zero value indicates that the exception handler
+ should be reinvoked. */
+#if !defined(PROCESS_EXCEPTION_VEC_PROTOTYPE_EXISTS)
+#define PROCESS_EXCEPTION_VEC_PROTOTYPE_EXISTS
+extern volatile __PFI __process_exception_vec;
+#endif
+
+/* __process_exit_vec is invoked when a 'k' kill packet is received
+ from GDB. */
+extern volatile __PFV __process_exit_vec;
+
+/* If SIGSYSCALL is defined, and such a signal value is returned from
+ __computeSignal (), the function pointed to by this vector will
+ be invoked.
+
+ If the return value is negative, the user program is assumed to
+ have received the corresponding positive signal value, and an
+ exception will be processed. Otherwise, the user program is
+ restarted from the next instruction. */
+extern volatile __PFI __process_syscall_vec;
+
+/* A continue packet was received from GDB with a signal value. The function
+ pointed to by __process_signal_vec will be invoked with this signal
+ value.
+
+ If a zero value is returned, we will ignore the signal, and proceed
+ with the continue request. Otherwise, the program will be killed
+ with the signal. */
+extern volatile __PFI __process_signal_vec;
+
+/* If non-NULL, __init_vec is called right before the user program is
+ resumed. */
+extern volatile __PFV __init_vec;
+/* if non-NULL, __cleanup_vec is called after the user program takes
+ an exception. */
+extern volatile __PFV __cleanup_vec;
+
+/* Send an 'O' packet to GDB containing STR. */
+extern int __output_gdb_string (target_register_t addr, int string_len);
+
+/* Request MAXLEN bytes of input from GDB to be stored in DEST. If BLOCK
+ is set, GDB should block until MAXLEN bytes are available to be
+ read; otherwise, it will return immediately with whatever data is
+ available.
+ The return value is the number of bytes written into DEST. */
+extern int __get_gdb_input (target_register_t dest, int maxlen, int block);
+
+/* Return the ASCII equivalent of C (C>=0 && C<=15). The result will be
+ lower-case. */
+extern char __tohex (int c);
+
+/* Convert COUNT bytes of the memory region in MEM to a hexadecimal
+ string in DEST.
+ The resulting string will contain 2*COUNT characters.
+ If MAY_FAULT is non-zero, memory faults are trapped; if a fault occurs,
+ a NULL value will be returned.
+ The value returned is one byte past the end of the string written. */
+extern char *__mem2hex (char *mem, char *dest, int count, int may_fault);
+
+/* Given a hexadecimal string in MEM, write the equivalent bytes to DEST.
+ The string is assumed to contain 2*COUNT characters.
+ If MAY_FAULT is non-zero, memory faults are trapped; if a fault occurs,
+ a NULL value will be returned.
+ Otherwise, the value returned is one byte past the last byte written. */
+extern char *__hex2mem (char *buf, char *mem, int count, int may_fault);
+
+#ifdef CYGSEM_ECOS_SUPPORTS_PROGRAM_ARGS
+/* Set the program arguments passed into the user program's main */
+extern void __set_program_args (int argc, char **argv);
+
+/* Return the user program arguments passed in from GDB (via an 'A'
+ packet). argcPtr is a pointer into the user program, which will hold
+ the number of arguments; the strings are returned. */
+extern char **__get_program_args (target_register_t argcPtr);
+#endif
+
+/* Encode PACKET as a remote protocol packet and send it to GDB; this takes
+ care of sending the initial '$' character, as well as the trailing '#'
+ and checksum, and also waits for an ACK from the remote side, resending
+ as necessary. */
+extern void __putpacket (char *packet);
+
+/* Retrieve the next remote protocol packet from GDB, taking care of verifying
+ the checksum and sending an ACK when necessary. */
+extern void __getpacket (char *buffer);
+
+/* Convert the hexadecimal string pointed to by *PTR into an integer,
+ and store it in the value pointed to by INTVALUE. The number of
+ characters read from *PTR will be returned; *PTR will point to the first
+ non-hexadecmial character encountered. */
+extern unsigned int __hexToInt (char **ptr, target_register_t *intValue);
+
+/* Convert the value in INTVALUE into a string of hexadecimal
+ characters stored in PTR. NUMBITS are the number of bits to use
+ in INTVALUE. The number of characters written to PTR will be returned. */
+extern unsigned int __intToHex (char *ptr,
+ target_register_t intValue,
+ int numBits);
+
+/* Handle an exception, usually some sort of hardware or software trap.
+ This is responsible for communicating the exception to GDB. */
+extern void __handle_exception (void);
+
+/* Send a 'X' packet with signal SIGVAL to GDB. */
+extern void __kill_program (int sigval);
+
+/* Given a packet pointed to by PACKETCONTENTS, decode it and respond to
+ GDB appropriately. */
+extern int __process_packet (char *packetContents);
+
+/* Write the C-style string pointed to by STR to the GDB comm port.
+ Used for printing debug messages. */
+extern void __putDebugStr (char *str);
+
+#if defined(NO_MALLOC) && !defined(MAX_BP_NUM)
+#define MAX_BP_NUM 64 /* Maximum allowed # of breakpoints */
+#endif
+
+extern int hal_syscall_handler(void);
+extern int __is_bsp_syscall(void);
+
+extern void __install_breakpoint_list (void);
+extern void __clear_breakpoint_list (void);
+extern int __display_breakpoint_list (void (*print_func)(target_register_t));
+
+/* 'Z' packet types */
+#define ZTYPE_SW_BREAKPOINT 0
+#define ZTYPE_HW_BREAKPOINT 1
+#define ZTYPE_HW_WATCHPOINT_WRITE 2
+#define ZTYPE_HW_WATCHPOINT_READ 3
+#define ZTYPE_HW_WATCHPOINT_ACCESS 4
+
+#endif /* ASM */
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* GENERIC_STUB_H */
diff --git a/cesar/ecos/packages/hal/common/current/include/hal_arbiter.h b/cesar/ecos/packages/hal/common/current/include/hal_arbiter.h
new file mode 100644
index 0000000000..650a6a6238
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/include/hal_arbiter.h
@@ -0,0 +1,140 @@
+#ifndef CYGONCE_HAL_HAL_ARBITER_H
+#define CYGONCE_HAL_HAL_ARBITER_H
+
+//=============================================================================
+//
+// hal_arbiter.h
+//
+// Functionality used by ISR arbiters
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors:jskov
+// Date: 2001-06-29
+// Purpose: Functionality used by ISR arbiters
+// Usage: #include <cyg/hal/hal_arbiter.h>
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/hal/hal_intr.h> // hal_interrupt_x tables
+#include <cyg/hal/drv_api.h> // CYG_ISR_HANDLED
+
+//=============================================================================
+// Function used to call ISRs from ISR arbiters
+// An arbiter is hooked on the shared interrupt vector and looks like this:
+//
+// cyg_uint32 _arbitration_isr(CYG_ADDRWORD vector, CYG_ADDRWORD data)
+// {
+// cyg_uint32 isr_ret;
+// // decode interrupt source and for each active source call the ISR
+// if (source_A_active) {
+// isr_ret = hal_call_isr (CYGNUM_HAL_INTERRUPT_SOURCE_A);
+// #ifdef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
+// if (isr_ret & CYG_ISR_HANDLED)
+// #endif
+// return isr_ret;
+// }
+// if (source_B_active) {
+// isr_ret = hal_call_isr (CYGNUM_HAL_INTERRUPT_SOURCE_B);
+// #ifdef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
+// if (isr_ret & CYG_ISR_HANDLED)
+// #endif
+// return isr_ret;
+// }
+// ...
+// return 0;
+// }
+//
+// Remember to attach and enable the arbiter source:
+// HAL_INTERRUPT_ATTACH(CYGNUM_HAL_INTERRUPT_ARBITER, &_arbitration_isr, 0, 0);
+// HAL_INTERRUPT_SET_LEVEL(CYGNUM_HAL_INTERRUPT_ARBITER, 1);
+// HAL_INTERRUPT_UNMASK(CYGNUM_HAL_INTERRUPT_ARBITER);
+//
+
+typedef cyg_uint32 cyg_ISR(cyg_uint32 vector, CYG_ADDRWORD data);
+
+extern void cyg_interrupt_post_dsr( CYG_ADDRWORD intr_obj );
+
+#ifndef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
+
+static inline cyg_uint32
+hal_call_isr (cyg_uint32 vector)
+{
+ cyg_ISR *isr;
+ CYG_ADDRWORD data;
+ cyg_uint32 isr_ret;
+
+ isr = (cyg_ISR*) hal_interrupt_handlers[vector];
+ data = hal_interrupt_data[vector];
+
+ isr_ret = (*isr) (vector, data);
+
+ if (isr_ret & CYG_ISR_CALL_DSR) {
+ cyg_interrupt_post_dsr (hal_interrupt_objects[vector]);
+ }
+
+ return isr_ret & ~CYG_ISR_CALL_DSR;
+}
+
+#else
+
+// In chained mode, assume vector 0 points to the chain
+// handler. Simply call it with the vector number and let it find the
+// ISR to call - it will also post DSRs as required.
+static inline cyg_uint32
+hal_call_isr (cyg_uint32 vector)
+{
+ cyg_ISR *isr;
+ CYG_ADDRWORD data;
+ cyg_uint32 isr_ret;
+
+ isr = (cyg_ISR*) hal_interrupt_handlers[0];
+ data = hal_interrupt_data[0];
+
+ isr_ret = (*isr) (vector, data);
+
+ return isr_ret;
+}
+
+#endif
+
+//-----------------------------------------------------------------------------
+#endif // CYGONCE_HAL_HAL_ARBITER_H
+// End of hal_arbiter.h
diff --git a/cesar/ecos/packages/hal/common/current/include/hal_endian.h b/cesar/ecos/packages/hal/common/current/include/hal_endian.h
new file mode 100644
index 0000000000..4b550cfc84
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/include/hal_endian.h
@@ -0,0 +1,110 @@
+#ifndef CYGONCE_HAL_HAL_ENDIAN_H
+#define CYGONCE_HAL_HAL_ENDIAN_H
+
+//=============================================================================
+//
+// hal_endian.h
+//
+// Endian conversion macros
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors:jskov
+// Date: 2001-10-04
+// Purpose: Endian conversion macros
+// Usage: #include <cyg/hal/hal_endian.h>
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h> // CYGBLD_HAL_ENDIAN_H
+#include <cyg/infra/cyg_type.h> // endian setting
+
+// Allow HALs to override the generic implementation of swap macros
+#ifdef CYGBLD_HAL_ENDIAN_H
+# include CYGBLD_HAL_ENDIAN_H
+#endif
+
+#ifndef CYG_SWAP16
+# define CYG_SWAP16(_x_) \
+ ({ cyg_uint16 _x = (_x_); ((_x << 8) | (_x >> 8)); })
+#endif
+
+#ifndef CYG_SWAP32
+# define CYG_SWAP32(_x_) \
+ ({ cyg_uint32 _x = (_x_); \
+ ((_x << 24) | \
+ ((0x0000FF00UL & _x) << 8) | \
+ ((0x00FF0000UL & _x) >> 8) | \
+ (_x >> 24)); })
+#endif
+
+
+#if (CYG_BYTEORDER == CYG_LSBFIRST)
+# define CYG_CPU_TO_BE16(_x_) CYG_SWAP16((_x_))
+# define CYG_CPU_TO_BE32(_x_) CYG_SWAP32((_x_))
+# define CYG_BE16_TO_CPU(_x_) CYG_SWAP16((_x_))
+# define CYG_BE32_TO_CPU(_x_) CYG_SWAP32((_x_))
+
+# define CYG_CPU_TO_LE16(_x_) (_x_)
+# define CYG_CPU_TO_LE32(_x_) (_x_)
+# define CYG_LE16_TO_CPU(_x_) (_x_)
+# define CYG_LE32_TO_CPU(_x_) (_x_)
+
+#elif (CYG_BYTEORDER == CYG_MSBFIRST)
+
+# define CYG_CPU_TO_BE16(_x_) (_x_)
+# define CYG_CPU_TO_BE32(_x_) (_x_)
+# define CYG_BE16_TO_CPU(_x_) (_x_)
+# define CYG_BE32_TO_CPU(_x_) (_x_)
+
+# define CYG_CPU_TO_LE16(_x_) CYG_SWAP16((_x_))
+# define CYG_CPU_TO_LE32(_x_) CYG_SWAP32((_x_))
+# define CYG_LE16_TO_CPU(_x_) CYG_SWAP16((_x_))
+# define CYG_LE32_TO_CPU(_x_) CYG_SWAP32((_x_))
+
+#else
+
+# error "Endian mode not selected"
+
+#endif
+
+//-----------------------------------------------------------------------------
+#endif // CYGONCE_HAL_HAL_ENDIAN_H
+// End of hal_endian.h
diff --git a/cesar/ecos/packages/hal/common/current/include/hal_if.h b/cesar/ecos/packages/hal/common/current/include/hal_if.h
new file mode 100644
index 0000000000..29fcaaf704
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/include/hal_if.h
@@ -0,0 +1,739 @@
+#ifndef CYGONCE_HAL_HAL_IF_H
+#define CYGONCE_HAL_HAL_IF_H
+
+//=============================================================================
+//
+// hal_if.h
+//
+// HAL header for ROM/RAM calling interface.
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors:jskov, woehler
+// Date: 2000-06-07
+// Purpose: HAL RAM/ROM calling interface
+// Description: ROM/RAM calling interface table definitions. The layout is a
+// combination of libbsp and vectors already in use by some
+// eCos platforms.
+// Usage: #include <cyg/hal/hal_if.h>
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/infra/cyg_type.h> // types & externC
+#include <cyg/hal/dbg-threads-api.h>
+#include <cyg/hal/dbg-thread-syscall.h>
+
+#include <stdarg.h>
+
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+
+// Architecture/var/platform may override the accessor macros.
+#include <cyg/hal/hal_arch.h>
+
+// Special monitor locking procedures. These are necessary when the monitor
+// and eCos share facilities, e.g. the network hardware.
+#if defined (CYGPKG_NET) || defined (CYGPKG_NET_LWIP)
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/drv_api.h> // cyg_drv_dsr_lock(), etc
+#define _ENTER_MONITOR() \
+ cyg_uint32 ints; \
+ HAL_DISABLE_INTERRUPTS(ints); \
+ cyg_drv_dsr_lock()
+
+#define _EXIT_MONITOR() \
+ cyg_drv_dsr_unlock(); \
+ HAL_RESTORE_INTERRUPTS(ints)
+#else // !CYGPKG_NET && !CYGPKG_NET_LWIP
+#define _ENTER_MONITOR() CYG_EMPTY_STATEMENT
+#define _EXIT_MONITOR() CYG_EMPTY_STATEMENT
+#endif
+
+//--------------------------------------------------------------------------
+#ifndef _BSP_HANDLER_T_DEFINED
+#define _BSP_HANDLER_T_DEFINED
+typedef int (*bsp_handler_t)(int __irq_nr, void *__regs);
+#endif // _BSP_HANDLER_T_DEFINED
+
+//--------------------------------------------------------------------------
+// Communication interface table. CYGNUM_CALL_IF_CONSOLE_PROCS and
+// CYGNUM_CALL_IF_DEBUG_PROCS point to instances (possibly the same)
+// of this table.
+
+typedef enum {
+ /*
+ * For serial ports, the control function may be used to set and get the
+ * current baud rate. Usage:
+ *
+ * err = (*__control)(COMMCTL_SETBAUD, int bits_per_second);
+ * err => Zero if successful, -1 if error.
+ *
+ * baud = (*__control)(COMMCTL_GETBAUD);
+ * baud => -1 if error, current baud otherwise.
+ */
+ __COMMCTL_SETBAUD=0,
+ __COMMCTL_GETBAUD,
+
+ /*
+ * Install and remove debugger interrupt handlers. These are the receiver
+ * interrupt routines which are used to change control from a running
+ * program to the debugger stub.
+ */
+ __COMMCTL_INSTALL_DBG_ISR,
+ __COMMCTL_REMOVE_DBG_ISR,
+
+ /*
+ * Disable comm port interrupt. Returns TRUE if interrupt was enabled,
+ * FALSE otherwise.
+ */
+ __COMMCTL_IRQ_DISABLE,
+
+ /*
+ * Enable comm port interrupt.
+ */
+ __COMMCTL_IRQ_ENABLE,
+
+ /*
+ * Returns the number of the interrupt vector used by the debug
+ * interrupt handler.
+ */
+ __COMMCTL_DBG_ISR_VECTOR,
+
+ /*
+ * Returns the current timeout value and sets a new timeout.
+ * Timeout resolution is in milliseconds.
+ * old_timeout = (*__control)(__COMMCTL_SET_TIMEOUT,
+ * cyg_int32 new_timeout);
+ */
+ __COMMCTL_SET_TIMEOUT,
+
+ /*
+ * Forces driver to send all characters which may be buffered in
+ * the driver. This only flushes the driver buffers, not necessarily
+ * any hardware FIFO, etc.
+ */
+ __COMMCTL_FLUSH_OUTPUT,
+
+ /*
+ * Forces driver to enable or disable flushes when a newline is
+ * seen in the output stream. Flushing at line boundaries occurs
+ * in the driver, not necessarily any hardware FIFO, etc. Line
+ * buffering is optional and may only be available in some drivers.
+ */
+ __COMMCTL_ENABLE_LINE_FLUSH,
+ __COMMCTL_DISABLE_LINE_FLUSH,
+
+} __comm_control_cmd_t;
+
+
+#define CYGNUM_COMM_IF_CH_DATA 0
+#define CYGNUM_COMM_IF_WRITE 1
+#define CYGNUM_COMM_IF_READ 2
+#define CYGNUM_COMM_IF_PUTC 3
+#define CYGNUM_COMM_IF_GETC 4
+#define CYGNUM_COMM_IF_CONTROL 5
+#define CYGNUM_COMM_IF_DBG_ISR 6
+#define CYGNUM_COMM_IF_GETC_TIMEOUT 7
+
+#define CYGNUM_COMM_IF_TABLE_SIZE 8
+
+typedef volatile CYG_ADDRWORD hal_virtual_comm_table_t[CYGNUM_COMM_IF_TABLE_SIZE];
+
+// The below is a (messy) attempt at adding some type safety to the
+// above array. At the same time, the accessors allow the
+// implementation to be easily changed in the future (both tag->data
+// table and structure implementations have been suggested).
+
+typedef void* __comm_if_ch_data_t;
+typedef void (*__comm_if_write_t)(void* __ch_data, const cyg_uint8* __buf,
+ cyg_uint32 __len);
+typedef int (*__comm_if_read_t)(void* __ch_data, cyg_uint8* __buf,
+ cyg_uint32 __len);
+typedef void (*__comm_if_putc_t)(void* __ch_data, cyg_uint8 __ch);
+typedef cyg_uint8 (*__comm_if_getc_t)(void* __ch_data);
+typedef int (*__comm_if_control_t)(void *__ch_data,
+ __comm_control_cmd_t __func, ...);
+typedef int (*__comm_if_dbg_isr_t)(void *__ch_data,
+ int* __ctrlc, CYG_ADDRWORD __vector,
+ CYG_ADDRWORD __data);
+typedef cyg_bool (*__comm_if_getc_timeout_t)(void* __ch_data, cyg_uint8* __ch);
+
+#define __call_COMM0(_n_,_rt_,_t_) \
+static __inline__ _rt_ \
+__call_COMM_##_n_(hal_virtual_comm_table_t t) \
+{ \
+ _rt_ res; \
+ void *dp = (__comm_if_ch_data_t)t[CYGNUM_COMM_IF_CH_DATA]; \
+ _ENTER_MONITOR(); \
+ res = ((_t_)(t[CYGNUM_COMM_##_n_]))(dp); \
+ _EXIT_MONITOR(); \
+ return res; \
+}
+
+#define __call_voidCOMM(_n_,_rt_,_t_) \
+static __inline__ _rt_ \
+__call_COMM_##_n_(hal_virtual_comm_table_t t) \
+{ \
+ void *dp = (__comm_if_ch_data_t)t[CYGNUM_COMM_IF_CH_DATA]; \
+ _ENTER_MONITOR(); \
+ ((_t_)(t[CYGNUM_COMM_##_n_]))(dp); \
+ _EXIT_MONITOR(); \
+}
+
+#define __call_COMM1(_n_,_rt_,_t_,_t1_) \
+static __inline__ _rt_ \
+__call_COMM_##_n_(hal_virtual_comm_table_t t, _t1_ _p1_) \
+{ \
+ _rt_ res; \
+ void *dp = (__comm_if_ch_data_t)t[CYGNUM_COMM_IF_CH_DATA]; \
+ _ENTER_MONITOR(); \
+ res = ((_t_)(t[CYGNUM_COMM_##_n_]))(dp, _p1_); \
+ _EXIT_MONITOR(); \
+ return res; \
+}
+
+#define __call_voidCOMM1(_n_,_rt_,_t_,_t1_) \
+static __inline__ _rt_ \
+__call_COMM_##_n_(hal_virtual_comm_table_t t, _t1_ _p1_) \
+{ \
+ void *dp = (__comm_if_ch_data_t)t[CYGNUM_COMM_IF_CH_DATA]; \
+ _ENTER_MONITOR(); \
+ ((_t_)(t[CYGNUM_COMM_##_n_]))(dp, _p1_); \
+ _EXIT_MONITOR(); \
+}
+
+#define __call_COMM2(_n_,_rt_,_t_,_t1_,_t2_) \
+static __inline__ _rt_ \
+__call_COMM_##_n_(hal_virtual_comm_table_t t, _t1_ _p1_, _t2_ _p2_) \
+{ \
+ _rt_ res; \
+ void *dp = (__comm_if_ch_data_t)t[CYGNUM_COMM_IF_CH_DATA]; \
+ _ENTER_MONITOR(); \
+ res = ((_t_)(t[CYGNUM_COMM_##_n_]))(dp, _p1_, _p2_); \
+ _EXIT_MONITOR(); \
+ return res; \
+}
+
+#define __call_voidCOMM2(_n_,_rt_,_t_,_t1_,_t2_) \
+static __inline__ _rt_ \
+__call_COMM_##_n_(hal_virtual_comm_table_t t, _t1_ _p1_, _t2_ _p2_) \
+{ \
+ void *dp = (__comm_if_ch_data_t)t[CYGNUM_COMM_IF_CH_DATA]; \
+ _ENTER_MONITOR(); \
+ ((_t_)(t[CYGNUM_COMM_##_n_]))(dp, _p1_, _p2_); \
+ _EXIT_MONITOR(); \
+}
+
+#define __call_COMM3(_n_,_rt_,_t_,_t1_,_t2_,_t3_) \
+static __inline__ _rt_ \
+__call_COMM_##_n_(hal_virtual_comm_table_t t, _t1_ _p1_, _t2_ _p2_, _t3_ _p3_) \
+{ \
+ _rt_ res; \
+ void *dp = (__comm_if_ch_data_t)t[CYGNUM_COMM_IF_CH_DATA]; \
+ _ENTER_MONITOR(); \
+ res = ((_t_)(t[CYGNUM_COMM_##_n_]))(dp, _p1_, _p2_, _p3_); \
+ _EXIT_MONITOR(); \
+ return res; \
+}
+
+#define __call_voidCOMM3(_n_,_rt_,_t_,_t1_,_t2_,_t3_) \
+static __inline__ _rt_ \
+__call_COMM_##_n_(hal_virtual_comm_table_t t, _t1_ _p1_, _t2_ _p2_, _t3_ _p3_) \
+{ \
+ void *dp = (__comm_if_ch_data_t)t[CYGNUM_COMM_IF_CH_DATA]; \
+ _ENTER_MONITOR(); \
+ ((_t_)(t[CYGNUM_COMM_##_n_]))(dp, _p1_, _p2_, _p3_); \
+ _EXIT_MONITOR(); \
+}
+
+#ifndef CYGACC_COMM_IF_DEFINED
+
+#define CYGACC_COMM_IF_CH_DATA(_t_) \
+ ((__comm_if_ch_data_t)((_t_)[CYGNUM_COMM_IF_CH_DATA]))
+#define CYGACC_COMM_IF_CH_DATA_SET(_t_, _x_) \
+ (_t_)[CYGNUM_COMM_IF_CH_DATA]=(CYG_ADDRWORD)(_x_)
+
+__call_voidCOMM2(IF_WRITE, void, __comm_if_write_t, const cyg_uint8 *, cyg_uint32)
+#define CYGACC_COMM_IF_WRITE(_t_, _b_, _l_) \
+ __call_COMM_IF_WRITE(_t_, _b_, _l_)
+#define CYGACC_COMM_IF_WRITE_SET(_t_, _x_) \
+ (_t_)[CYGNUM_COMM_IF_WRITE]=(CYG_ADDRWORD)(_x_)
+
+__call_voidCOMM2(IF_READ, void, __comm_if_read_t, cyg_uint8 *, cyg_uint32)
+#define CYGACC_COMM_IF_READ(_t_, _b_, _l_) \
+ __call_COMM_IF_READ(_t_, _b_, _l_)
+#define CYGACC_COMM_IF_READ_SET(_t_, _x_) \
+ (_t_)[CYGNUM_COMM_IF_READ]=(CYG_ADDRWORD)(_x_)
+
+__call_voidCOMM1(IF_PUTC, void, __comm_if_putc_t, cyg_uint8)
+#define CYGACC_COMM_IF_PUTC(_t_, _c_) \
+ __call_COMM_IF_PUTC(_t_,_c_)
+#define CYGACC_COMM_IF_PUTC_SET(_t_, _x_) \
+ (_t_)[CYGNUM_COMM_IF_PUTC]=(CYG_ADDRWORD)(_x_)
+
+__call_COMM0(IF_GETC, cyg_uint8, __comm_if_getc_t)
+#define CYGACC_COMM_IF_GETC(_t_) \
+ __call_COMM_IF_GETC(_t_)
+#define CYGACC_COMM_IF_GETC_SET(_t_, _x_) \
+ (_t_)[CYGNUM_COMM_IF_GETC]=(CYG_ADDRWORD)(_x_)
+
+// This macro has not been changed to use inline functions like the
+// others, simply because it uses variable arguments, and the change
+// would break binary compatibility.
+#define CYGACC_COMM_IF_CONTROL(_t_, args...) \
+ ({ int res; \
+ _ENTER_MONITOR(); \
+ res = ((__comm_if_control_t)((_t_)[CYGNUM_COMM_IF_CONTROL]))(CYGACC_COMM_IF_CH_DATA(_t_), args); \
+ _EXIT_MONITOR(); \
+ res;})
+#define CYGACC_COMM_IF_CONTROL_SET(_t_, _x_) \
+ (_t_)[CYGNUM_COMM_IF_CONTROL]=(CYG_ADDRWORD)(_x_)
+
+__call_COMM3(IF_DBG_ISR, int, __comm_if_dbg_isr_t, int *, CYG_ADDRWORD, CYG_ADDRWORD)
+#define CYGACC_COMM_IF_DBG_ISR(_t_, _c_, _v_, _d_) \
+ __call_COMM_IF_DBG_ISR(_t_, _c_, _v_, _d_)
+#define CYGACC_COMM_IF_DBG_ISR_SET(_t_, _x_) \
+ (_t_)[CYGNUM_COMM_IF_DBG_ISR]=(CYG_ADDRWORD)(_x_)
+
+__call_COMM1(IF_GETC_TIMEOUT, cyg_bool, __comm_if_getc_timeout_t, cyg_uint8 *)
+#define CYGACC_COMM_IF_GETC_TIMEOUT(_t_, _c_) \
+ __call_COMM_IF_GETC_TIMEOUT(_t_, _c_)
+#define CYGACC_COMM_IF_GETC_TIMEOUT_SET(_t_, _x_) \
+ (_t_)[CYGNUM_COMM_IF_GETC_TIMEOUT]=(CYG_ADDRWORD)(_x_)
+
+#endif // CYGACC_COMM_IF_DEFINED
+
+//--------------------------------------------------------------------------
+// Main calling interface table. Will be assigned a location by the
+// linker script. Both ROM and RAM startup applications will know about
+// the location.
+#define CYGNUM_CALL_IF_VERSION 0
+#define CYGNUM_CALL_IF_available_1 1
+#define CYGNUM_CALL_IF_available_2 2
+#define CYGNUM_CALL_IF_available_3 3
+#define CYGNUM_CALL_IF_KILL_VECTOR 4
+#define CYGNUM_CALL_IF_CONSOLE_PROCS 5
+#define CYGNUM_CALL_IF_DEBUG_PROCS 6
+#define CYGNUM_CALL_IF_FLUSH_DCACHE 7
+#define CYGNUM_CALL_IF_FLUSH_ICACHE 8
+#define CYGNUM_CALL_IF_available_9 9
+#define CYGNUM_CALL_IF_available_10 10
+#define CYGNUM_CALL_IF_available_11 11
+#define CYGNUM_CALL_IF_SET_DEBUG_COMM 12
+#define CYGNUM_CALL_IF_SET_CONSOLE_COMM 13
+#define CYGNUM_CALL_IF_MONITOR_VERSION 14
+#define CYGNUM_CALL_IF_DBG_SYSCALL 15
+#define CYGNUM_CALL_IF_RESET 16
+#define CYGNUM_CALL_IF_CONSOLE_INTERRUPT_FLAG 17
+#define CYGNUM_CALL_IF_DELAY_US 18
+#define CYGNUM_CALL_IF_DBG_DATA 19
+#define CYGNUM_CALL_IF_FLASH_CFG_OP 20
+#define CYGNUM_CALL_IF_MONITOR_RETURN 21
+#define CYGNUM_CALL_IF_FLASH_FIS_OP 22
+
+#define CYGNUM_CALL_IF_LAST_ENTRY CYGNUM_CALL_IF_FLASH_FIS_OP
+
+#define CYGNUM_CALL_IF_INSTALL_BPT_FN 35
+
+#define CYGNUM_CALL_IF_TABLE_SIZE 64
+
+externC volatile CYG_ADDRWORD hal_virtual_vector_table[CYGNUM_CALL_IF_TABLE_SIZE];
+
+// Table version contains version information for both the CALL table
+// itself (the number of the last active entry in the table), and the
+// COMM table (the size of the table).
+#define CYGNUM_CALL_IF_TABLE_VERSION_CALL CYGNUM_CALL_IF_LAST_ENTRY
+#define CYGNUM_CALL_IF_TABLE_VERSION_CALL_HACK (CYGNUM_CALL_IF_TABLE_SIZE+1)
+#define CYGNUM_CALL_IF_TABLE_VERSION_CALL_MAX CYGNUM_CALL_IF_TABLE_SIZE
+#define CYGNUM_CALL_IF_TABLE_VERSION_COMM CYGNUM_COMM_IF_TABLE_SIZE
+#define CYGNUM_CALL_IF_TABLE_VERSION_CALL_MASK 0x0000ffff
+#define CYGNUM_CALL_IF_TABLE_VERSION_COMM_MASK 0xffff0000
+#define CYGNUM_CALL_IF_TABLE_VERSION_COMM_shift 16
+
+
+// These are special debug/console procs IDs
+// QUERY_CURRENT will cause the ID of the currently selected proc ID to be
+// returned.
+// EMPTY this is the ID used for an empty procs table (i.e, NULL
+// pointer)
+// MANGLER selects the procs space reserved for the console mangler
+// allowing the application to temporarily disable mangling
+// or temporarily switch in different console procs.
+#define CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT -1
+#define CYGNUM_CALL_IF_SET_COMM_ID_EMPTY -2
+#define CYGNUM_CALL_IF_SET_COMM_ID_MANGLER -3
+
+// The below is a (messy) attempt at adding some type safety to the
+// above array. At the same time, the accessors allow the
+// implementation to be easily changed in the future (both tag->data
+// table and structure implementations have been suggested).
+
+typedef int __call_if_version_t;
+typedef void* __call_if_ictrl_table_t;
+typedef void* __call_if_exc_table_t;
+typedef bsp_handler_t *__call_if_dbg_vector_t;
+typedef bsp_handler_t __call_if_kill_vector_t;
+typedef hal_virtual_comm_table_t *__call_if_console_procs_t;
+typedef hal_virtual_comm_table_t *__call_if_debug_procs_t;
+typedef void (__call_if_flush_dcache_t)(void *__p, int __nbytes);
+typedef void (__call_if_flush_icache_t)(void *__p, int __nbytes);
+typedef int (__call_if_set_debug_comm_t)(int __comm_id);
+typedef int (__call_if_set_console_comm_t)(int __comm_id);
+typedef void* __call_if_dbg_data_t;
+typedef int (__call_if_dbg_syscall_t) (enum dbg_syscall_ids id,
+ union dbg_thread_syscall_parms *p );
+typedef void (__call_if_reset_t)(void);
+typedef int __call_if_console_interrupt_flag_t;
+typedef void (__call_if_delay_us_t)(cyg_int32 usecs);
+typedef void (__call_if_install_bpt_fn_t)(void *__epc);
+typedef char *__call_if_monitor_version_t;
+typedef void (__call_if_monitor_return_t)(int status);
+typedef cyg_bool (__call_if_flash_fis_op_fn_t)(int __oper, char *__name, void *__val);
+//
+// This structure is used to pass parameters to/from the fconfig routines.
+// This allows a single virtual vector interface, with widely varying functionality
+//
+struct cyg_fconfig {
+ char *key; // Datum 'key'
+ int keylen; // Length of key
+ void *val; // Pointer to data
+ int type; // Type of datum
+ int offset; // Offset within data (used by _NEXT)
+};
+typedef cyg_bool (__call_if_flash_cfg_op_fn_t)(int __oper, struct cyg_fconfig *__data);
+
+#ifndef CYGACC_CALL_IF_DEFINED
+
+#define __data_VV(_n_,_tt_) \
+static __inline__ _tt_ \
+__call_vv_##_n_(void) \
+{ \
+ return ((_tt_)hal_virtual_vector_table[_n_]); \
+}
+
+#define __call_VV0(_n_,_tt_,_rt_) \
+static __inline__ _rt_ \
+__call_vv_##_n_(void) \
+{ \
+ _rt_ res; \
+ _ENTER_MONITOR(); \
+ res = ((_tt_ *)hal_virtual_vector_table[_n_])(); \
+ _EXIT_MONITOR(); \
+ return res; \
+}
+
+#define __call_voidVV0(_n_,_tt_,_rt_) \
+static __inline__ _rt_ \
+__call_vv_##_n_(void) \
+{ \
+ _ENTER_MONITOR(); \
+ ((_tt_ *)hal_virtual_vector_table[_n_])(); \
+ _EXIT_MONITOR(); \
+}
+
+#define __call_VV1(_n_,_tt_,_rt_,_t1_) \
+static __inline__ _rt_ \
+__call_vv_##_n_(_t1_ _p1_) \
+{ \
+ _rt_ res; \
+ _ENTER_MONITOR(); \
+ res = ((_tt_ *)hal_virtual_vector_table[_n_])(_p1_); \
+ _EXIT_MONITOR(); \
+ return res; \
+}
+
+#define __call_voidVV1(_n_,_tt_,_rt_,_t1_) \
+static __inline__ _rt_ \
+__call_vv_##_n_(_t1_ _p1_) \
+{ \
+ _ENTER_MONITOR(); \
+ ((_tt_ *)hal_virtual_vector_table[_n_])(_p1_); \
+ _EXIT_MONITOR(); \
+}
+
+#define __call_VV2(_n_,_tt_,_rt_,_t1_,_t2_) \
+static __inline__ _rt_ \
+__call_vv_##_n_(_t1_ _p1_, _t2_ _p2_) \
+{ \
+ _rt_ res; \
+ _ENTER_MONITOR(); \
+ res = ((_tt_ *)hal_virtual_vector_table[_n_])(_p1_,_p2_); \
+ _EXIT_MONITOR(); \
+ return res; \
+}
+
+#define __call_voidVV2(_n_,_tt_,_rt_,_t1_,_t2_) \
+static __inline__ _rt_ \
+__call_vv_##_n_(_t1_ _p1_, _t2_ _p2_) \
+{ \
+ _ENTER_MONITOR(); \
+ ((_tt_ *)hal_virtual_vector_table[_n_])(_p1_,_p2_); \
+ _EXIT_MONITOR(); \
+}
+
+#define __call_VV3(_n_,_tt_,_rt_,_t1_,_t2_,_t3_) \
+static __inline__ _rt_ \
+__call_vv_##_n_(_t1_ _p1_, _t2_ _p2_, _t3_ _p3_) \
+{ \
+ _rt_ res; \
+ _ENTER_MONITOR(); \
+ res = ((_tt_ *)hal_virtual_vector_table[_n_])(_p1_,_p2_,_p3_); \
+ _EXIT_MONITOR(); \
+ return res; \
+}
+
+#define __call_voidVV3(_n_,_tt_,_rt_,_t1_,_t2_,_t3_) \
+static __inline__ _rt_ \
+__call_vv_##_n_(_t1_ _p1_, _t2_ _p2_, _t3_ _p3_) \
+{ \
+ _ENTER_MONITOR(); \
+ ((_tt_ *)hal_virtual_vector_table[_n_])(_p1_,_p2_,_p3_); \
+ _EXIT_MONITOR(); \
+}
+
+#define __call_VV4(_n_,_tt_,_rt_,_t1_,_t2_,_t3_,_t4_) \
+static __inline__ _rt_ \
+__call_vv_##_n_(_t1_ _p1_, _t2_ _p2_, _t3_ _p3_, _t4_ _p4_) \
+{ \
+ _rt_ res; \
+ _ENTER_MONITOR(); \
+ res = ((_tt_ *)hal_virtual_vector_table[_n_])(_p1_,_p2_,_p3_,_p4_); \
+ _EXIT_MONITOR(); \
+ return res; \
+}
+
+#define __call_voidVV4(_n_,_tt_,_rt_,_t1_,_t2_,_t3_,_t4_) \
+static __inline__ _rt_ \
+__call_vv_##_n_(_t1_ _p1_, _t2_ _p2_, _t3_ _p3_, _t4_ _p4_) \
+{ \
+ _ENTER_MONITOR(); \
+ ((_tt_ *)hal_virtual_vector_table[_n_])(_p1_,_p2_,_p3_,_p4_); \
+ _EXIT_MONITOR(); \
+}
+
+
+#define CYGACC_DATA_VV(t,e) __call_vv_##e()
+#define CYGACC_CALL_VV0(t,e) __call_vv_##e
+#define CYGACC_CALL_VV1(t,e,p1) __call_vv_##e((p1))
+#define CYGACC_CALL_VV2(t,e,p1,p2) __call_vv_##e((p1),(p2))
+#define CYGACC_CALL_VV3(t,e,p1,p2,p3) __call_vv_##e((p1),(p2),(p3))
+#define CYGACC_CALL_VV4(t,e,p1,p2,p3,p4) __call_vv_##e((p1),(p2),(p3),(p4))
+
+#define CYGACC_CALL_IF_VERSION() \
+ CYGACC_DATA_VV(__call_if_version_t, CYGNUM_CALL_IF_VERSION)
+__data_VV(CYGNUM_CALL_IF_VERSION, __call_if_version_t)
+#define CYGACC_CALL_IF_VERSION_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_VERSION]=(CYG_ADDRWORD)(_x_)
+
+#define CYGACC_CALL_IF_KILL_VECTOR() \
+ CYGACC_DATA_VV(__call_if_kill_vector_t, CYGNUM_CALL_IF_KILL_VECTOR)
+__data_VV(CYGNUM_CALL_IF_KILL_VECTOR, __call_if_kill_vector_t)
+#define CYGACC_CALL_IF_KILL_VECTOR_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_KILL_VECTOR]=(CYG_ADDRWORD)(_x_)
+
+#define CYGACC_CALL_IF_CONSOLE_PROCS() \
+ CYGACC_DATA_VV(__call_if_console_procs_t, CYGNUM_CALL_IF_CONSOLE_PROCS)
+__data_VV(CYGNUM_CALL_IF_CONSOLE_PROCS, __call_if_console_procs_t)
+#define CYGACC_CALL_IF_CONSOLE_PROCS_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_CONSOLE_PROCS]=(CYG_ADDRWORD)(_x_)
+
+#define CYGACC_CALL_IF_FLUSH_DCACHE(_p_, _n_) \
+ ((__call_if_flush_dcache_t*)hal_virtual_vector_table[CYGNUM_CALL_IF_FLUSH_DCACHE])((_p_), (_n_))
+#define CYGACC_CALL_IF_FLUSH_DCACHE_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_FLUSH_DCACHE]=(CYG_ADDRWORD)(_x_)
+
+#define CYGACC_CALL_IF_FLUSH_ICACHE(_p_, _n_) \
+ ((__call_if_flush_icache_t*)hal_virtual_vector_table[CYGNUM_CALL_IF_FLUSH_ICACHE])((_p_), (_n_))
+#define CYGACC_CALL_IF_FLUSH_ICACHE_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_FLUSH_ICACHE]=(CYG_ADDRWORD)(_x_)
+
+#define CYGACC_CALL_IF_DEBUG_PROCS() \
+ CYGACC_DATA_VV(__call_if_debug_procs_t, CYGNUM_CALL_IF_DEBUG_PROCS)
+__data_VV(CYGNUM_CALL_IF_DEBUG_PROCS, __call_if_debug_procs_t)
+#define CYGACC_CALL_IF_DEBUG_PROCS_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_DEBUG_PROCS]=(CYG_ADDRWORD)(_x_)
+
+#define CYGACC_CALL_IF_SET_DEBUG_COMM(_i_) \
+ CYGACC_CALL_VV1(__call_if_set_debug_comm_t*, CYGNUM_CALL_IF_SET_DEBUG_COMM, (_i_))
+__call_VV1(CYGNUM_CALL_IF_SET_DEBUG_COMM, __call_if_set_debug_comm_t, int, int)
+#define CYGACC_CALL_IF_SET_DEBUG_COMM_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_SET_DEBUG_COMM]=(CYG_ADDRWORD)(_x_)
+
+#define CYGACC_CALL_IF_SET_CONSOLE_COMM(_i_) \
+ CYGACC_CALL_VV1(__call_if_set_console_comm_t*, CYGNUM_CALL_IF_SET_CONSOLE_COMM, (_i_))
+__call_VV1(CYGNUM_CALL_IF_SET_CONSOLE_COMM, __call_if_set_console_comm_t, int, int)
+#define CYGACC_CALL_IF_SET_CONSOLE_COMM_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_SET_CONSOLE_COMM]=(CYG_ADDRWORD)(_x_)
+
+#define CYGACC_CALL_IF_DBG_DATA() \
+ CYGACC_DATA_VV(__call_if_dbg_data_t, CYGNUM_CALL_IF_DBG_DATA)
+__data_VV(CYGNUM_CALL_IF_DBG_DATA, __call_if_dbg_data_t)
+#define CYGACC_CALL_IF_DBG_DATA_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_DBG_DATA]=(CYG_ADDRWORD)(_x_)
+
+#define CYGACC_CALL_IF_DBG_SYSCALL(_id_,_p_) \
+ CYGACC_CALL_VV2(__call_if_dbg_syscall_t, CYGNUM_CALL_IF_DBG_SYSCALL, _id_, _p_)
+__call_VV2(CYGNUM_CALL_IF_DBG_SYSCALL, __call_if_dbg_syscall_t, int, enum dbg_syscall_ids , union dbg_thread_syscall_parms *)
+#define CYGACC_CALL_IF_DBG_SYSCALL_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_DBG_SYSCALL]=(CYG_ADDRWORD)(_x_)
+
+#define CYGACC_CALL_IF_RESET() \
+ CYGACC_CALL_VV0(__call_if_reset_t*, CYGNUM_CALL_IF_RESET)()
+__call_voidVV0(CYGNUM_CALL_IF_RESET, __call_if_reset_t, void)
+#define CYGACC_CALL_IF_RESET_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_RESET]=(CYG_ADDRWORD)(_x_)
+#define CYGACC_CALL_IF_RESET_GET() \
+ ((__call_if_reset_t*)hal_virtual_vector_table[CYGNUM_CALL_IF_RESET])
+
+#define CYGACC_CALL_IF_MONITOR_VERSION() \
+ CYGACC_DATA_VV(__call_if_monitor_version_t, CYGNUM_CALL_IF_MONITOR_VERSION)
+__data_VV(CYGNUM_CALL_IF_MONITOR_VERSION, __call_if_monitor_version_t)
+#define CYGACC_CALL_IF_MONITOR_VERSION_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_MONITOR_VERSION]=(CYG_ADDRWORD)(_x_)
+
+#define CYGACC_CALL_IF_CONSOLE_INTERRUPT_FLAG() \
+ CYGACC_DATA_VV(__call_if_console_interrupt_flag_t, CYGNUM_CALL_IF_CONSOLE_INTERRUPT_FLAG)
+__data_VV(CYGNUM_CALL_IF_CONSOLE_INTERRUPT_FLAG, __call_if_console_interrupt_flag_t)
+#define CYGACC_CALL_IF_CONSOLE_INTERRUPT_FLAG_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_CONSOLE_INTERRUPT_FLAG]=(CYG_ADDRWORD)(_x_)
+
+#define CYGACC_CALL_IF_DELAY_US(_u_) \
+ CYGACC_CALL_VV1(__call_if_delay_us_t*, CYGNUM_CALL_IF_DELAY_US, (_u_))
+__call_voidVV1(CYGNUM_CALL_IF_DELAY_US, __call_if_delay_us_t, void, cyg_int32)
+#define CYGACC_CALL_IF_DELAY_US_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_DELAY_US]=(CYG_ADDRWORD)(_x_)
+
+#define CYGACC_CALL_IF_INSTALL_BPT_FN(_e_) \
+ CYGACC_CALL_VV1(__call_if_install_bpt_fn_t*, CYGNUM_CALL_IF_INSTALL_BPT_FN, (_e_))
+__call_voidVV1(CYGNUM_CALL_IF_INSTALL_BPT_FN, __call_if_install_bpt_fn_t, void, void *)
+#define CYGACC_CALL_IF_INSTALL_BPT_FN_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_INSTALL_BPT_FN]=(CYG_ADDRWORD)(_x_)
+
+//
+// Access persistent data store - kept in FLASH or EEPROM by RedBoot
+//
+#define CYGNUM_CALL_IF_FLASH_CFG_GET (0) // Get a particular fconfig key
+#define CYGNUM_CALL_IF_FLASH_CFG_NEXT (1) // Enumerate keys (get the next one)
+#define CYGNUM_CALL_IF_FLASH_CFG_SET (2) // Update particular fconfig key
+#define CYGACC_CALL_IF_FLASH_CFG_OP2(_o_,_d_) \
+ CYGACC_CALL_VV2(__call_if_flash_cfg_op_fn_t*, CYGNUM_CALL_IF_FLASH_CFG_OP, (_o_),(_d_))
+__call_VV2(CYGNUM_CALL_IF_FLASH_CFG_OP, __call_if_flash_cfg_op_fn_t, cyg_bool, int, struct cyg_fconfig *)
+
+static __inline__ cyg_bool
+__call_if_flash_cfg_op(int op, char *key, void *data, int type)
+{
+ struct cyg_fconfig info;
+ info.key = key;
+ info.val = data;
+ info.type = type;
+ info.offset = 0;
+ return CYGACC_CALL_IF_FLASH_CFG_OP2(op, &info);
+}
+#define CYGACC_CALL_IF_FLASH_CFG_OP(_o_,_k_,_d_,_t_) \
+ __call_if_flash_cfg_op(_o_,_k_,_d_,_t_)
+#define CYGACC_CALL_IF_FLASH_CFG_OP_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_FLASH_CFG_OP]=(CYG_ADDRWORD)(_x_)
+
+#define CYGACC_CALL_IF_MONITOR_RETURN(_u_) \
+ CYGACC_CALL_VV1(__call_if_monitor_return_t*, CYGNUM_CALL_IF_MONITOR_RETURN, (_u_))
+__call_voidVV1(CYGNUM_CALL_IF_MONITOR_RETURN, __call_if_monitor_return_t, void, int)
+#define CYGACC_CALL_IF_MONITOR_RETURN_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_MONITOR_RETURN]=(CYG_ADDRWORD)(_x_)
+
+#define CYGACC_CALL_IF_FLASH_FIS_OP(_o_,_k_,_d_) \
+ CYGACC_CALL_VV3(__call_if_flash_fis_op_fn_t*, CYGNUM_CALL_IF_FLASH_FIS_OP, (_o_),(_k_),(_d_))
+__call_VV3(CYGNUM_CALL_IF_FLASH_FIS_OP, __call_if_flash_fis_op_fn_t, cyg_bool, int, char *, void *)
+#define CYGACC_CALL_IF_FLASH_FIS_OP_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_FLASH_FIS_OP]=(CYG_ADDRWORD)(_x_)
+#define CYGNUM_CALL_IF_FLASH_FIS_GET_FLASH_BASE (0)
+#define CYGNUM_CALL_IF_FLASH_FIS_GET_SIZE (1)
+#define CYGNUM_CALL_IF_FLASH_FIS_GET_MEM_BASE (2)
+#define CYGNUM_CALL_IF_FLASH_FIS_GET_ENTRY_POINT (3)
+#define CYGNUM_CALL_IF_FLASH_FIS_GET_DATA_LENGTH (4)
+#define CYGNUM_CALL_IF_FLASH_FIS_GET_DESC_CKSUM (5)
+#define CYGNUM_CALL_IF_FLASH_FIS_GET_FILE_CKSUM (6)
+
+
+// These need to be kept uptodate with the (unadorned) masters
+// in RedBoot's flash_config.h:
+#define CYGNUM_FLASH_CFG_TYPE_CONFIG_EMPTY 0
+#define CYGNUM_FLASH_CFG_TYPE_CONFIG_BOOL 1
+#define CYGNUM_FLASH_CFG_TYPE_CONFIG_INT 2
+#define CYGNUM_FLASH_CFG_TYPE_CONFIG_STRING 3
+#define CYGNUM_FLASH_CFG_TYPE_CONFIG_SCRIPT 4
+#define CYGNUM_FLASH_CFG_TYPE_CONFIG_IP 5
+#define CYGNUM_FLASH_CFG_TYPE_CONFIG_ESA 6
+
+#endif // CYGACC_CALL_IF_DEFINED
+
+//--------------------------------------------------------------------------
+// Diag wrappers.
+externC void hal_if_diag_init(void);
+externC void hal_if_diag_write_char(char c);
+externC void hal_if_diag_read_char(char *c);
+
+//--------------------------------------------------------------------------
+// Ctrl-c support.
+externC cyg_uint32 hal_ctrlc_isr(CYG_ADDRWORD vector, CYG_ADDRWORD data);
+externC cyg_bool hal_ctrlc_check(CYG_ADDRWORD vector, CYG_ADDRWORD data);
+
+#define HAL_CTRLC_ISR hal_ctrlc_isr
+#define HAL_CTRLC_CHECK hal_ctrlc_check
+
+#else
+
+#if defined(CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT) \
+ || defined(CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT)
+// Then other code might invoke this macro
+#define HAL_CTRLC_CHECK(a1,a2) (0) // Nothing, no CTRLC here
+#endif
+
+#endif // CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+
+//--------------------------------------------------------------------------
+// Functions provided by the HAL interface.
+externC void hal_if_init(void);
+#if 0 != CYGINT_HAL_PLF_IF_INIT
+externC void plf_if_init(void);
+#endif
+
+//-----------------------------------------------------------------------------
+#endif // CYGONCE_HAL_HAL_IF_H
+// End of hal_if.h
diff --git a/cesar/ecos/packages/hal/common/current/include/hal_misc.h b/cesar/ecos/packages/hal/common/current/include/hal_misc.h
new file mode 100644
index 0000000000..77b0644c89
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/include/hal_misc.h
@@ -0,0 +1,123 @@
+#ifndef CYGONCE_HAL_HAL_MISC_H
+#define CYGONCE_HAL_HAL_MISC_H
+
+//=============================================================================
+//
+// hal_misc.h
+//
+// HAL header for miscellaneous helper routines
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors:jskov
+// Date: 2000-06-08
+// Purpose: Miscellaneous routines shared between HALs
+// Usage: #include <cyg/hal/hal_misc.h>
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#ifndef __ASSEMBLER__
+#include <cyg/infra/cyg_type.h> // types & externC
+
+//=============================================================================
+externC cyg_bool cyg_hal_is_break(char *buf, int size);
+externC void cyg_hal_user_break( CYG_ADDRWORD *regs );
+#endif
+
+//=============================================================================
+
+#define BIT0 0x00000001
+#define BIT1 0x00000002
+#define BIT2 0x00000004
+#define BIT3 0x00000008
+#define BIT4 0x00000010
+#define BIT5 0x00000020
+#define BIT6 0x00000040
+#define BIT7 0x00000080
+#define BIT8 0x00000100
+#define BIT9 0x00000200
+#define BIT10 0x00000400
+#define BIT11 0x00000800
+#define BIT12 0x00001000
+#define BIT13 0x00002000
+#define BIT14 0x00004000
+#define BIT15 0x00008000
+#define BIT16 0x00010000
+#define BIT17 0x00020000
+#define BIT18 0x00040000
+#define BIT19 0x00080000
+#define BIT20 0x00100000
+#define BIT21 0x00200000
+#define BIT22 0x00400000
+#define BIT23 0x00800000
+#define BIT24 0x01000000
+#define BIT25 0x02000000
+#define BIT26 0x04000000
+#define BIT27 0x08000000
+#define BIT28 0x10000000
+#define BIT29 0x20000000
+#define BIT30 0x40000000
+#define BIT31 0x80000000
+
+#define SZ_1K 0x00000400
+#define SZ_2K 0x00000800
+#define SZ_4K 0x00001000
+#define SZ_8K 0x00002000
+#define SZ_16K 0x00004000
+#define SZ_32K 0x00008000
+#define SZ_64K 0x00010000
+#define SZ_128K 0x00020000
+#define SZ_256K 0x00040000
+#define SZ_512K 0x00080000
+#define SZ_1M 0x00100000
+#define SZ_2M 0x00200000
+#define SZ_4M 0x00400000
+#define SZ_8M 0x00800000
+#define SZ_16M 0x01000000
+#define SZ_32M 0x02000000
+#define SZ_64M 0x04000000
+#define SZ_128M 0x08000000
+#define SZ_256M 0x10000000
+#define SZ_512M 0x20000000
+#define SZ_1G 0x40000000
+
+//-----------------------------------------------------------------------------
+#endif // CYGONCE_HAL_HAL_MISC_H
+// End of hal_misc.h
diff --git a/cesar/ecos/packages/hal/common/current/include/hal_spd.h b/cesar/ecos/packages/hal/common/current/include/hal_spd.h
new file mode 100644
index 0000000000..1b73f87b64
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/include/hal_spd.h
@@ -0,0 +1,78 @@
+#ifndef CYGONCE_HAL_HAL_SPD_H
+#define CYGONCE_HAL_HAL_SPD_H
+
+//=============================================================================
+//
+// hal_spd.h
+//
+// HAL header for SDRAM Serial Presence Detect support.
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): msalter
+// Contributors:msalter
+// Date: 2002-01-17
+// Purpose: Generic HAL SPD header.
+// Usage: #include <cyg/hal/hal_spd.h>
+// Description: This header provides byte numbers and bit definitions for
+// serial EEPROM containing SDRAM module information.
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+// Commonly used bytes
+#define SPD_BANKCNT 5 // number of module banks
+#define SPD_CONFIG 11 // DIMM configuration type (Parity or not, EEC)
+#define SPD_REFRESH 12 // Referesh rate
+#define SPD_SDRAM_WIDTH 13 // DRAM width
+#define SPD_MOD_ATTRIB 21 // DRAM module attribute
+#define SPD_BANKSZ 31 // module bank density
+#define SPD_CHECKSUM 63 // checksum for bytes 0-62
+
+// SPD_MOD_ATTRIB bits
+#define SPD_ATTRIB_BUF_CTL 0x01 // Buffered Addr/Control inputs
+#define SPD_ATTRIB_REG_CTL 0x02 // Registered Addr/Control inputs
+#define SPD_ATTRIB_PLL 0x04 // On-card PLL
+#define SPD_ATTRIB_BUF_DQ 0x08 // Buffered DQMB inputs
+#define SPD_ATTRIB_REG_DQ 0x10 // Registered DQMB inputs
+#define SPD_ATTRIB_DIFF 0x20 // Differential clock input
+#define SPD_ATTRIB_RRA 0x40 // Redundant Row Address
+
+//-----------------------------------------------------------------------------
+#endif // CYGONCE_HAL_HAL_SPD_H
+// End of hal_spd.h
diff --git a/cesar/ecos/packages/hal/common/current/include/hal_stub.h b/cesar/ecos/packages/hal/common/current/include/hal_stub.h
new file mode 100644
index 0000000000..d3ee490cc2
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/include/hal_stub.h
@@ -0,0 +1,390 @@
+#ifndef CYGONCE_HAL_HAL_STUB_H
+#define CYGONCE_HAL_HAL_STUB_H
+
+//=============================================================================
+//
+// hal_stub.h
+//
+// HAL header for GDB stub support.
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors:jskov
+// Date: 1999-02-12
+// Purpose: Generic HAL stub header.
+// Usage: #include <cyg/hal/hal_stub.h>
+// Description: This header is included by generic-stub.c to provide an
+// interface to the eCos-specific stub implementation. It is
+// not to be included by user code, and is only placed in a
+// publically accessible directory so that platform stub packages
+// are able to include it if required.
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+#define USE_GDBSTUB_PROTOTYPES 0 // avoid stub-tservice.h atm
+#ifndef __ECOS__
+#define __ECOS__ // use to mark eCos hacks
+#endif
+
+#include <cyg/hal/basetype.h> // HAL_LABEL_NAME
+#include <cyg/hal/hal_arch.h> // HAL header
+#include <cyg/infra/cyg_type.h> // cyg_uint32 and CYG_BYTEORDER
+
+#ifndef __CYGMON_TYPES
+#define __CYGMON_TYPES
+typedef cyg_uint32 uint32;
+typedef cyg_int32 int32;
+#endif // __CYGMON_TYPES
+
+#ifdef CYGBLD_HAL_PLATFORM_STUB_H
+#include CYGBLD_HAL_PLATFORM_STUB_H
+#else
+#include <cyg/hal/plf_stub.h>
+#endif
+#include <cyg/hal/generic-stub.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+} // to make below format correctly.
+#endif
+
+//-----------------------------------------------------------------------------
+// Definitions for generic-stub.c
+
+#define __set_mem_fault_trap(x) ({__mem_fault = 0; x(); __mem_fault;})
+
+#if (CYG_BYTEORDER==CYG_LSBFIRST)
+# if !defined(__LITTLE_ENDIAN__)
+# define __LITTLE_ENDIAN__
+# endif
+# if !defined(_LITTLE_ENDIAN)
+# define _LITTLE_ENDIAN
+# endif
+#endif
+
+//-----------------------------------------------------------------------------
+// Dummy definitions for harvard memory support for princeton memory systems.
+#ifndef TARGET_HAS_HARVARD_MEMORY
+typedef target_register_t target_addr_t;
+#define TARGET_ADDR_IS_PROGMEM(x) 0
+#define TARGET_ADDR_TO_PTR(x) ((char *) (x))
+#endif
+
+//----------------------------------------------------------------------------
+// Signal definitions to avoid 'signal.h'/
+#define SIGHUP 1 /* hangup */
+#define SIGINT 2 /* interrupt */
+#define SIGQUIT 3 /* quit */
+#define SIGILL 4 /* illegal instruction (not reset when caught) */
+#define SIGTRAP 5 /* trace trap (not reset when caught) */
+#define SIGIOT 6 /* IOT instruction */
+#define SIGABRT 6 /* used by abort, replace SIGIOT in the future */
+#define SIGEMT 7 /* EMT instruction */
+#define SIGFPE 8 /* floating point exception */
+#define SIGKILL 9 /* kill (cannot be caught or ignored) */
+#define SIGBUS 10 /* bus error */
+#define SIGSEGV 11 /* segmentation violation */
+#define SIGSYS 12 /* bad argument to system call */
+#define SIGPIPE 13 /* write on a pipe with no one to read it */
+#define SIGALRM 14 /* alarm clock */
+#define SIGTERM 15 /* software termination signal from kill */
+
+//----------------------------------------------------------------------------
+// Thread support. This setting is used in thread-pkts.h
+#ifdef CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
+#define DEBUG_THREADS 1
+#else
+#define DEBUG_THREADS 0
+#endif
+
+// The function stub_copy_registers() is statically defined in
+// thread-packets.c, but in eCos this external stub is defined as it
+// is used in dbg_gdb.cxx.
+externC void __stub_copy_registers(target_register_t *dest,
+ target_register_t *src);
+
+//----------------------------------------------------------------------------
+// Hardware Watch/Breakpoint support. These are the possible return values
+// of HAL_STUB_IS_STOPPED_BY_HARDWARE().
+#define HAL_STUB_HW_STOP_NONE 0 // target did not stop for hw watch/break
+#define HAL_STUB_HW_STOP_BREAK 1 // target stopped for hw breakpoint
+#define HAL_STUB_HW_STOP_WATCH 2 // target stopped for write-only watchpoint
+#define HAL_STUB_HW_STOP_RWATCH 3 // target stopped for read-only watchpoint
+#define HAL_STUB_HW_STOP_AWATCH 4 // target stopped for access watchpoint
+
+//----------------------------------------------------------------------------
+// Memory accessor functions.
+#define TARGET_HAS_OWN_MEM_FUNCS
+
+//----------------------------------------------------------------------------
+// Memory access checks.
+
+#ifndef CYG_HAL_STUB_PERMIT_DATA_READ
+#define CYG_HAL_STUB_PERMIT_DATA_READ(_addr_, __count_) (1)
+#endif
+
+#ifndef CYG_HAL_STUB_PERMIT_DATA_WRITE
+#define CYG_HAL_STUB_PERMIT_DATA_WRITE(_addr_, __count_) (1)
+#endif
+
+#ifdef TARGET_HAS_HARVARD_MEMORY
+
+#ifndef CYG_HAL_STUB_PERMIT_CODE_READ
+#define CYG_HAL_STUB_PERMIT_CODE_READ(_addr_, __count_) (1)
+#endif
+
+#ifndef CYG_HAL_STUB_PERMIT_CODE_WRITE
+#define CYG_HAL_STUB_PERMIT_CODE_WRITE(_addr_, __count_) (1)
+#endif
+
+#endif
+
+//----------------------------------------------------------------------------
+// Target extras?!
+extern int __process_target_query(char * pkt, char * out, int maxOut);
+extern int __process_target_set(char * pkt, char * out, int maxout);
+extern int __process_target_packet(char * pkt, char * out, int maxout);
+
+//---------------------------------------------------------------------------
+// Declarations to avoid compiler warnings.
+
+// Set the baud rate for the current serial port.
+extern void __set_baud_rate (int baud);
+
+// Write C to the current serial port.
+extern void putDebugChar (int c);
+
+// Read one character from the current serial port.
+extern int getDebugChar (void);
+
+// Push CH back onto the debug stream.
+extern void ungetDebugChar (int ch);
+
+// Reset the board.
+extern void __reset (void);
+
+// Multi-bp support.
+#ifndef __set_breakpoint
+extern int __set_breakpoint (target_register_t addr, target_register_t len);
+#endif
+#ifndef __remove_breakpoint
+extern int __remove_breakpoint (target_register_t addr, target_register_t len);
+#endif
+#ifndef __set_hw_breakpoint
+extern int __set_hw_breakpoint (target_register_t addr, target_register_t len);
+#endif
+#ifndef __remove_hw_breakpoint
+extern int __remove_hw_breakpoint (target_register_t addr, target_register_t len);
+#endif
+#ifndef __set_hw_watchpoint
+extern int __set_hw_watchpoint (target_register_t addr, target_register_t len, int ztype);
+#endif
+#ifndef __remove_hw_watchpoint
+extern int __remove_hw_watchpoint (target_register_t addr, target_register_t len, int ztype);
+#endif
+
+/* Install the standard set of trap handlers for the stub. */
+extern void __install_traps (void);
+
+/* Address in text section of a breakpoint instruction. */
+
+#ifndef BREAKINST_DEFINED
+#define BREAKINST_DEFINED
+extern void _breakinst (void);
+#endif
+
+/* The opcode for a breakpoint instruction. */
+
+extern unsigned long __break_opcode (void);
+
+/* Function to flush output buffers */
+extern void hal_flush_output(void);
+
+#ifdef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
+// This one may assume a valid saved interrupt context on some platforms
+extern void cyg_hal_gdb_interrupt (target_register_t pc);
+// This one does not; use from CRITICAL_IO_REGION macros below.
+extern void cyg_hal_gdb_place_break (target_register_t pc);
+// Remove a break from either above - or not if cyg_hal_gdb_running_step
+extern int cyg_hal_gdb_remove_break (target_register_t pc);
+// Bool: is such a breakpoint set?
+extern int cyg_hal_gdb_break_is_set (void);
+
+/* This is used so that the generic stub can tell
+ * cyg_hal_gdb_remove_break() not to bother when we are avoiding stepping
+ * through a critical region ie. hal_diag_write_char() usually - that
+ * shares the GDB IO device.
+ */
+extern volatile int cyg_hal_gdb_running_step;
+
+// Use these in hal_diag.c when about to write a whole $O packet to GDB.
+// NB they require __builtin_return_address() to work: if your platform
+// does not support this, use HAL_DISABLE_INTERRUPTS &c instead.
+
+#if 1 // Can use the address of a label: this is more portable
+
+// This macro may already have been defined by the architecture HAL
+#ifndef CYG_HAL_GDB_ENTER_CRITICAL_IO_REGION
+#define CYG_HAL_GDB_ENTER_CRITICAL_IO_REGION( _old_ ) \
+do { \
+ HAL_DISABLE_INTERRUPTS(_old_); \
+ cyg_hal_gdb_place_break( (target_register_t)&&cyg_hal_gdb_break_place ); \
+} while ( 0 )
+#endif
+
+// This macro may already have been defined by the architecture HAL
+// Notice the trick to *use* the label - sometimes the tools want to
+// move the label if unused, which is bad.
+#ifndef CYG_HAL_GDB_LEAVE_CRITICAL_IO_REGION
+#define CYG_HAL_GDB_LEAVE_CRITICAL_IO_REGION( _old_ ) \
+do { \
+ cyg_hal_gdb_remove_break( (target_register_t)&&cyg_hal_gdb_break_place ); \
+ HAL_RESTORE_INTERRUPTS(_old_); \
+ _old_ = 1; /* actually use the label as a label... */ \
+cyg_hal_gdb_break_place:; \
+ if ( (_old_)-- > 0 ) /* ...or the compiler might move it! */ \
+ goto cyg_hal_gdb_break_place; \
+} while ( 0 )
+#endif
+
+#else // use __builtin_return_address instead.
+
+#define CYG_HAL_GDB_ENTER_CRITICAL_IO_REGION( _old_ ) \
+do { \
+ HAL_DISABLE_INTERRUPTS(_old_); \
+ cyg_hal_gdb_place_break((target_register_t)__builtin_return_address(0)); \
+} while ( 0 )
+
+#define CYG_HAL_GDB_LEAVE_CRITICAL_IO_REGION( _old_ ) \
+do { \
+ cyg_hal_gdb_remove_break((target_register_t)__builtin_return_address(0)); \
+ HAL_RESTORE_INTERRUPTS(_old_); \
+} while ( 0 )
+
+#endif
+
+#else // NO debug_gdb_break_support
+
+// so define these just to do interrupts:
+#define CYG_HAL_GDB_ENTER_CRITICAL_IO_REGION( _old_ ) \
+do { \
+ HAL_DISABLE_INTERRUPTS(_old_); \
+} while (0);
+
+#define CYG_HAL_GDB_LEAVE_CRITICAL_IO_REGION( _old_ ) \
+do { \
+ HAL_RESTORE_INTERRUPTS(_old_); \
+} while (0);
+
+#endif
+
+//----------------------------------------------------------------------------
+// eCos extensions to the stub
+
+extern void hal_output_gdb_string(target_register_t str, int string_len);
+
+extern target_register_t registers[]; // The current saved registers.
+extern target_register_t * _registers ;
+extern HAL_SavedRegisters *_hal_registers;
+
+extern int cyg_hal_gdb_break;
+
+#ifdef CYGPKG_ISOINFRA
+# include <pkgconf/isoinfra.h>
+#endif
+#ifdef CYGINT_ISO_STRING_STRFUNCS
+# include <string.h>
+#else
+//-----------------------------------------------------------------------------
+// String helpers. These really should come from ISOINFRA
+static inline char *strcpy( char *s, const char *t)
+{
+ char *r = s;
+
+ while( *t ) *s++ = *t++;
+
+ // Terminate the copied string.
+ *s = 0;
+
+ return r;
+}
+
+static inline size_t strlen( const char *s )
+{
+ int r = 0;
+ while( *s++ ) r++;
+ return r;
+}
+#endif
+
+//-----------------------------------------------------------------------------
+// Repeat the cache definitions here to avoid too much hackery in
+// generic-stub.h
+/* Flush the instruction cache. */
+extern void flush_i_cache (void);
+
+/* Flush the data cache. */
+extern void __flush_d_cache (void);
+
+typedef enum {
+ CACHE_NOOP, CACHE_ENABLE, CACHE_DISABLE, CACHE_FLUSH
+} cache_control_t;
+
+/* Perform the specified operation on the instruction cache.
+ Returns 1 if the cache is enabled, 0 otherwise. */
+extern int __instruction_cache (cache_control_t request);
+/* Perform the specified operation on the data cache.
+ Returns 1 if the cache is enabled, 0 otherwise. */
+extern int __data_cache (cache_control_t request);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+
+//-----------------------------------------------------------------------------
+#endif // CYGONCE_HAL_HAL_STUB_H
+// End of hal_stub.h
diff --git a/cesar/ecos/packages/hal/common/current/include/hal_tables.h b/cesar/ecos/packages/hal/common/current/include/hal_tables.h
new file mode 100644
index 0000000000..3a1a05a7b0
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/include/hal_tables.h
@@ -0,0 +1,117 @@
+#ifndef CYGONCE_HAL_TABLES_H
+#define CYGONCE_HAL_TABLES_H
+
+/*==========================================================================
+//
+// hal_tables.h
+//
+// Data table management
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Date: 2000-09-04
+// Purpose: Provide HAL tables
+// Description: This file defines a mechanism to include "tables" of objects
+// that are always included in the image no matter what, and are
+// constrained between labels.
+//
+// Usage: #include <cyg/hal/hal_tables.h>
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================*/
+
+#include <pkgconf/hal.h>
+#include <cyg/infra/cyg_type.h>
+
+#include <cyg/hal/hal_arch.h>
+
+/*------------------------------------------------------------------------*/
+
+#define __string(_x) #_x
+#define __xstring(_x) __string(_x)
+
+#ifndef CYG_HAL_TABLE_BEGIN
+#define CYG_HAL_TABLE_BEGIN( _label, _name ) \
+__asm__(".section \".ecos.table." __xstring(_name) ".begin\",\"aw\"\n" \
+ ".globl " __xstring(CYG_LABEL_DEFN(_label)) "\n" \
+ ".type " __xstring(CYG_LABEL_DEFN(_label)) ",object\n" \
+ ".p2align " __xstring(CYGARC_P2ALIGNMENT) "\n" \
+__xstring(CYG_LABEL_DEFN(_label)) ":\n" \
+ ".previous\n" \
+ )
+#endif
+
+#ifndef CYG_HAL_TABLE_END
+#define CYG_HAL_TABLE_END( _label, _name ) \
+__asm__(".section \".ecos.table." __xstring(_name) ".finish\",\"aw\"\n" \
+ ".globl " __xstring(CYG_LABEL_DEFN(_label)) "\n" \
+ ".type " __xstring(CYG_LABEL_DEFN(_label)) ",object\n" \
+ ".p2align " __xstring(CYGARC_P2ALIGNMENT) "\n" \
+__xstring(CYG_LABEL_DEFN(_label)) ":\n" \
+ ".previous\n" \
+ )
+#endif
+
+// This macro must be applied to any types whose objects are to be placed in
+// tables
+#ifndef CYG_HAL_TABLE_TYPE
+#define CYG_HAL_TABLE_TYPE CYGBLD_ATTRIB_ALIGN( CYGARC_ALIGNMENT )
+#endif
+
+#ifndef CYG_HAL_TABLE_EXTRA
+#define CYG_HAL_TABLE_EXTRA( _name ) \
+ CYGBLD_ATTRIB_SECTION(".ecos.table." __xstring(_name) ".extra")
+#endif
+
+#ifndef CYG_HAL_TABLE_ENTRY
+#define CYG_HAL_TABLE_ENTRY( _name ) \
+ CYGBLD_ATTRIB_SECTION(".ecos.table." __xstring(_name) ".data") \
+ CYGBLD_ATTRIB_USED
+#endif
+
+#ifndef CYG_HAL_TABLE_QUALIFIED_ENTRY
+#define CYG_HAL_TABLE_QUALIFIED_ENTRY( _name, _qual ) \
+ CYGBLD_ATTRIB_SECTION(".ecos.table." __xstring(_name) ".data." \
+ __xstring(_qual)) \
+ CYGBLD_ATTRIB_USED
+#endif
+
+/*------------------------------------------------------------------------*/
+/* EOF hal_tables.h */
+#endif // CYGONCE_HAL_TABLES_H
diff --git a/cesar/ecos/packages/hal/common/current/src/board.h b/cesar/ecos/packages/hal/common/current/src/board.h
new file mode 100644
index 0000000000..c29b0014e4
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/src/board.h
@@ -0,0 +1,70 @@
+#ifndef CYGONCE_HAL_BOARD_H
+#define CYGONCE_HAL_BOARD_H
+
+//=============================================================================
+//
+// board.h
+//
+// libstub board.h file for eCos HAL
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors:jskov
+// Date: 1999-02-12
+// Purpose: libstub board.h file for eCos HAL
+// Description: This file simplifies libstub integration. The board.h file
+// for eCos simply includes the hal_stub.h file which defines
+// the necessary architecture and platform information for
+// any of the possible eCos target configurations.
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+// Define __ECOS__; allows all eCos specific additions to be easily identified.
+#define __ECOS__
+
+#include <cyg/hal/hal_stub.h>
+
+#ifdef CYGPKG_REDBOOT
+#include <pkgconf/redboot.h>
+#endif
+
+//-----------------------------------------------------------------------------
+#endif // CYGONCE_HAL_BOARD_H
+// End of board.h
diff --git a/cesar/ecos/packages/hal/common/current/src/bplist-dynamic.c b/cesar/ecos/packages/hal/common/current/src/bplist-dynamic.c
new file mode 100644
index 0000000000..710c0b7bd7
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/src/bplist-dynamic.c
@@ -0,0 +1,450 @@
+//==========================================================================
+//
+// bplist-dynamic.c
+//
+// Dynamic breakpoint list.
+// Currently only statically allocated. (ie NO_MALLOC is assumed)
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors: dmoseley
+// Date: 2000-07-11
+// Purpose: Dynamic breakpoint list.
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+
+#if defined(CYGNUM_HAL_BREAKPOINT_LIST_SIZE) && (CYGNUM_HAL_BREAKPOINT_LIST_SIZE > 0) && defined(CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS)
+
+#define CYGARC_HAL_COMMON_EXPORT_CPU_MACROS
+#include <cyg/hal/hal_stub.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_cache.h>
+
+#ifdef TARGET_HAS_HARVARD_MEMORY
+#define __read_mem_safe __read_progmem_safe
+#define __write_mem_safe __write_progmem_safe
+#endif
+
+/*
+ * A simple target breakpoint list without using malloc.
+ * To use this package, you must define HAL_BREAKINST_SIZE to be the size
+ * in bytes of a trap instruction (max if there's more than one),
+ * HAL_BREAKINST to the opcode value of the instruction, and
+ * HAL_BREAKINST_TYPE to be the type necessary to hold the opcode value.
+ */
+
+struct breakpoint_list {
+ target_register_t addr;
+ char old_contents [HAL_BREAKINST_SIZE];
+ struct breakpoint_list *next;
+ char in_memory;
+ char length;
+} *breakpoint_list = NULL;
+
+#ifndef HAL_BREAKINST_ADDR
+static HAL_BREAKINST_TYPE break_inst = HAL_BREAKINST;
+#define HAL_BREAKINST_ADDR(x) ((void*)&break_inst)
+#endif
+
+static struct breakpoint_list bp_list [CYGNUM_HAL_BREAKPOINT_LIST_SIZE];
+static struct breakpoint_list *free_bp_list = NULL;
+static int curr_bp_num = 0;
+
+int
+__set_breakpoint (target_register_t addr, target_register_t len)
+{
+ struct breakpoint_list **addent = &breakpoint_list;
+ struct breakpoint_list *l = breakpoint_list;
+ struct breakpoint_list *newent;
+
+ while (l != NULL && l->addr < addr)
+ {
+ addent = &l->next;
+ l = l->next;
+ }
+
+ if (l != NULL && l->addr == addr)
+ return 2;
+
+ if (free_bp_list != NULL)
+ {
+ newent = free_bp_list;
+ free_bp_list = free_bp_list->next;
+ }
+ else
+ {
+ if (curr_bp_num < CYGNUM_HAL_BREAKPOINT_LIST_SIZE)
+ {
+ newent = &bp_list[curr_bp_num++];
+ }
+ else
+ {
+ return 1;
+ }
+ }
+
+ newent->addr = addr;
+ newent->in_memory = 0;
+ newent->next = l;
+ newent->length = len;
+ *addent = newent;
+
+ return 0;
+}
+
+int
+__remove_breakpoint (target_register_t addr, target_register_t len)
+{
+ struct breakpoint_list *l = breakpoint_list;
+ struct breakpoint_list *prev = NULL;
+
+ while (l != NULL && l->addr < addr)
+ {
+ prev = l;
+ l = l->next;
+ }
+
+ if ((l == NULL) || (l->addr != addr))
+ return 1;
+
+ if (l->in_memory)
+ {
+ __write_mem_safe (&l->old_contents[0],
+ (void*)l->addr,
+ sizeof (l->old_contents));
+ }
+
+ if (prev == NULL)
+ breakpoint_list = l->next;
+ else
+ prev->next = l->next;
+
+ l->next = free_bp_list;
+ free_bp_list = l;
+
+ return 0;
+}
+
+#if defined(HAL_STUB_HW_BREAKPOINT_LIST_SIZE) && (HAL_STUB_HW_BREAKPOINT_LIST_SIZE > 0)
+#ifndef HAL_STUB_HW_BREAKPOINT
+#error "Must define HAL_STUB_HW_BREAKPOINT"
+#endif
+struct hw_breakpoint_list {
+ target_register_t addr;
+ target_register_t len;
+ char used;
+ char installed;
+};
+static struct hw_breakpoint_list hw_bp_list [HAL_STUB_HW_BREAKPOINT_LIST_SIZE];
+
+int
+__set_hw_breakpoint (target_register_t addr, target_register_t len)
+{
+ int i;
+
+ for (i = 0; i < HAL_STUB_HW_BREAKPOINT_LIST_SIZE; i++)
+ {
+ if (hw_bp_list[i].used == 0)
+ {
+ hw_bp_list[i].addr = addr;
+ hw_bp_list[i].len = len;
+ hw_bp_list[i].used = 1;
+ hw_bp_list[i].installed = 0;
+ return 0;
+ }
+ }
+ return -1;
+}
+
+int
+__remove_hw_breakpoint (target_register_t addr, target_register_t len)
+{
+ int i;
+
+ for (i = 0; i < HAL_STUB_HW_BREAKPOINT_LIST_SIZE; i++)
+ {
+ if (hw_bp_list[i].used && hw_bp_list[i].addr == addr
+ && hw_bp_list[i].len == len)
+ {
+ if (hw_bp_list[i].installed)
+ HAL_STUB_HW_BREAKPOINT(0, (void *)addr, (int)len);
+ hw_bp_list[i].used = 0;
+ return 0;
+ }
+ }
+ return -1;
+}
+
+static void
+__install_hw_breakpoint_list (void)
+{
+ int i;
+
+ for (i = 0; i < HAL_STUB_HW_BREAKPOINT_LIST_SIZE; i++)
+ {
+ if (hw_bp_list[i].used && hw_bp_list[i].installed == 0)
+ {
+ HAL_STUB_HW_BREAKPOINT(1, (void *)hw_bp_list[i].addr,
+ (int)hw_bp_list[i].len);
+ hw_bp_list[i].installed = 1;
+ }
+ }
+}
+
+static void
+__clear_hw_breakpoint_list (void)
+{
+ int i;
+
+ for (i = 0; i < HAL_STUB_HW_BREAKPOINT_LIST_SIZE; i++)
+ {
+ if (hw_bp_list[i].used && hw_bp_list[i].installed)
+ {
+ HAL_STUB_HW_BREAKPOINT(0, (void *)hw_bp_list[i].addr,
+ (int)hw_bp_list[i].len);
+ hw_bp_list[i].installed = 0;
+ }
+ }
+}
+#endif // HAL_STUB_HW_BREAKPOINT_LIST_SIZE
+
+#if defined(HAL_STUB_HW_WATCHPOINT_LIST_SIZE) && (HAL_STUB_HW_WATCHPOINT_LIST_SIZE > 0)
+#ifndef HAL_STUB_HW_WATCHPOINT
+#error "Must define HAL_STUB_HW_WATCHPOINT"
+#endif
+struct hw_watchpoint_list {
+ target_register_t addr;
+ target_register_t len;
+ int ztype;
+ char used;
+ char installed;
+};
+static struct hw_watchpoint_list hw_wp_list [HAL_STUB_HW_WATCHPOINT_LIST_SIZE];
+
+int
+__set_hw_watchpoint (target_register_t addr, target_register_t len, int ztype)
+{
+ int i;
+
+ for (i = 0; i < HAL_STUB_HW_WATCHPOINT_LIST_SIZE; i++)
+ {
+ if (hw_wp_list[i].used == 0)
+ {
+ hw_wp_list[i].addr = addr;
+ hw_wp_list[i].len = len;
+ hw_wp_list[i].ztype = ztype;
+ hw_wp_list[i].used = 1;
+ hw_wp_list[i].installed = 0;
+ return 0;
+ }
+ }
+ return -1;
+}
+
+int
+__remove_hw_watchpoint (target_register_t addr, target_register_t len, int ztype)
+{
+ int i;
+
+ for (i = 0; i < HAL_STUB_HW_WATCHPOINT_LIST_SIZE; i++)
+ {
+ if (hw_wp_list[i].used && hw_wp_list[i].addr == addr
+ && hw_wp_list[i].len == len && hw_wp_list[i].ztype == ztype )
+ {
+ if (hw_wp_list[i].installed)
+ HAL_STUB_HW_WATCHPOINT(0, (void *)addr, (int)len, ztype);
+ hw_wp_list[i].used = 0;
+ return 0;
+ }
+ }
+ return -1;
+}
+
+static void
+__install_hw_watchpoint_list (void)
+{
+ int i;
+
+ for (i = 0; i < HAL_STUB_HW_WATCHPOINT_LIST_SIZE; i++)
+ {
+ if (hw_wp_list[i].used && hw_wp_list[i].installed == 0)
+ {
+ HAL_STUB_HW_WATCHPOINT(1, (void *)hw_wp_list[i].addr,
+ (int)hw_wp_list[i].len, hw_wp_list[i].ztype);
+ hw_wp_list[i].installed = 1;
+ }
+ }
+}
+
+static void
+__clear_hw_watchpoint_list (void)
+{
+ int i;
+
+ for (i = 0; i < HAL_STUB_HW_WATCHPOINT_LIST_SIZE; i++)
+ {
+ if (hw_wp_list[i].used && hw_wp_list[i].installed)
+ {
+ HAL_STUB_HW_WATCHPOINT(0, (void *)hw_wp_list[i].addr,
+ (int)hw_wp_list[i].len, hw_wp_list[i].ztype);
+ hw_wp_list[i].installed = 0;
+ }
+ }
+}
+#endif // HAL_STUB_HW_WATCHPOINT_LIST_SIZE
+
+
+
+void
+__install_breakpoint_list (void)
+{
+ struct breakpoint_list *l = breakpoint_list;
+
+ while (l != NULL)
+ {
+ if (! l->in_memory)
+ {
+ int len = sizeof (l->old_contents);
+ if (__read_mem_safe (&l->old_contents[0], (void*)l->addr, len) == len)
+ {
+ if (__write_mem_safe (HAL_BREAKINST_ADDR(l->length),
+ (void*)l->addr, l->length) == l->length)
+ {
+ l->in_memory = 1;
+ }
+ }
+ }
+ l = l->next;
+ }
+#if defined(HAL_STUB_HW_BREAKPOINT_LIST_SIZE) && (HAL_STUB_HW_BREAKPOINT_LIST_SIZE > 0)
+ __install_hw_breakpoint_list();
+#endif
+#if defined(HAL_STUB_HW_WATCHPOINT_LIST_SIZE) && (HAL_STUB_HW_WATCHPOINT_LIST_SIZE > 0)
+ __install_hw_watchpoint_list();
+#endif
+ HAL_ICACHE_SYNC();
+}
+
+void
+__clear_breakpoint_list (void)
+{
+ struct breakpoint_list *l = breakpoint_list;
+
+ while (l != NULL)
+ {
+ if (l->in_memory)
+ {
+ int len = sizeof (l->old_contents);
+ if (__write_mem_safe (&l->old_contents[0], (void*)l->addr, len) == len)
+ {
+ l->in_memory = 0;
+ }
+ }
+ l = l->next;
+ }
+#if defined(HAL_STUB_HW_BREAKPOINT_LIST_SIZE) && (HAL_STUB_HW_BREAKPOINT_LIST_SIZE > 0)
+ __clear_hw_breakpoint_list();
+#endif
+#if defined(HAL_STUB_HW_WATCHPOINT_LIST_SIZE) && (HAL_STUB_HW_WATCHPOINT_LIST_SIZE > 0)
+ __clear_hw_watchpoint_list();
+#endif
+ HAL_ICACHE_INVALIDATE_ALL();
+}
+
+int
+__display_breakpoint_list (void (*print_func)(target_register_t))
+{
+ struct breakpoint_list *l = breakpoint_list;
+
+ while (l != NULL)
+ {
+ print_func(l->addr);
+ l = l->next;
+ }
+
+ return 0;
+}
+#else // (CYGNUM_HAL_BREAKPOINT_LIST_SIZE == 0) or UNDEFINED
+
+#include <cyg/hal/hal_stub.h> // Our header
+
+#ifndef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+// We don't know that type target_register_t is yet.
+// Let's just pick a type so we can compile. Since
+// these versions of the functions don't actually do
+// anything with the parameters, the actualy types
+// don't matter.
+typedef unsigned long target_register_t;
+#endif
+
+int
+__set_breakpoint (target_register_t addr, target_register_t len)
+{
+ return 1;
+}
+
+int
+__remove_breakpoint (target_register_t addr, target_register_t len)
+{
+ return 1;
+}
+
+void
+__install_breakpoint_list (void)
+{
+}
+
+void
+__clear_breakpoint_list (void)
+{
+}
+
+int
+__display_breakpoint_list (void (*print_func)(target_register_t))
+{
+ return 0;
+}
+#endif // (CYGNUM_HAL_BREAKPOINT_LIST_SIZE > 0)
+
diff --git a/cesar/ecos/packages/hal/common/current/src/dbg-threads-syscall.c b/cesar/ecos/packages/hal/common/current/src/dbg-threads-syscall.c
new file mode 100644
index 0000000000..f870a6b57f
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/src/dbg-threads-syscall.c
@@ -0,0 +1,217 @@
+//========================================================================
+//
+// dbg-threads-syscall.c
+//
+// Pseudo system calls for multi-threaded debug support
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Red Hat, nickg
+// Contributors: Red Hat, nickg
+// Date: 1998-08-25
+// Purpose:
+// Description: Pseudo system calls to bind system specific multithread
+// debug support with a ROM monitor, cygmon. We call it
+// Cygmon, but the feature lives in libstub.
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+
+#if !defined(CYGPKG_KERNEL) && defined(CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT)
+
+/* Only include this code if we do not have a kernel. Otherwise the kernel
+ * supplies these functions for the app we are linked with.
+ */
+
+#include <cyg/hal/dbg-threads-api.h>
+#include <cyg/hal/dbg-thread-syscall.h>
+
+
+static dbg_syscall_func * dbg_syscall_ptr ;
+
+static union dbg_thread_syscall_parms tcall ;
+
+/* ----- INIT_THREADS_SYSCALL --------------------------------------- */
+/* Some external bing and configuration logic knows how to setup
+ the ststem calls. In the first implementation, we have used a vector
+ in the secondary vector table. This functions allows us to isolate that
+ sort of system specific detail. Similarly, we do not export the
+ specific detail of a dbg_syscall_func.
+ */
+
+
+void init_threads_syscall(void * vector)
+{
+ dbg_syscall_ptr = vector ; /* AH, the easy compatability of the
+ void pointer*/
+} /* init_threads_syscall */
+
+/* All forms of failure return 0 */
+/* Whether non support, incomplete initialization, unknown thread */
+static __inline__ int dbg_thread_syscall(
+ enum dbg_syscall_ids id)
+{
+ dbg_syscall_func f ; /* double indirect via */
+ if (0 == dbg_syscall_ptr) return 0; /* dbg_syscall_ptr never init'd */
+ if (0 ==(f = *dbg_syscall_ptr)) return 0 ; /* vector not initialized */
+ return (*f)(id,&tcall);
+}
+
+
+
+
+/* ------- INIT_THREAD_SYSCALL ------------------------------------------- */
+/* Received the address of the entry in the secondary interrupt vector table */
+/* This table is the interchange between the O.S. and Cygmon/libstub */
+/* This could get more complex so, I am doing it with a function
+ rather than exposing the internals.
+ */
+void init_thread_syscall(void * vector)
+{
+ dbg_syscall_ptr = vector ;
+}
+
+int dbg_thread_capabilities(struct dbg_capabilities * cbp)
+{
+#if 0
+ tcall.cap_parms.abilities = cbp ;
+ return dbg_thread_syscall(dbg_capabilities_func) ;
+#else
+ cbp->mask1 = has_thread_current |
+ has_thread_registers |
+ has_thread_reg_change |
+ has_thread_list |
+ has_thread_info ;
+ return 1 ;
+#endif
+}
+
+int dbg_currthread(threadref * varparm)
+{
+ tcall.currthread_parms.ref = varparm ;
+ return dbg_thread_syscall(dbg_currthread_func) ;
+}
+
+
+int dbg_threadlist(
+ int startflag,
+ threadref * lastthreadid,
+ threadref * next_thread
+ )
+{
+ tcall.threadlist_parms.startflag = startflag ;
+ tcall.threadlist_parms.lastid = lastthreadid ;
+ tcall.threadlist_parms.nextthreadid = next_thread ;
+ return dbg_thread_syscall(dbg_threadlist_func) ;
+}
+
+int dbg_threadinfo(
+ threadref * threadid,
+ struct cygmon_thread_debug_info * info)
+{
+ tcall.info_parms.ref = threadid ;
+ tcall.info_parms.info = info ;
+ return dbg_thread_syscall(dbg_threadinfo_func) ;
+}
+
+int dbg_getthreadreg(
+ threadref * osthreadid,
+ int regcount, /* count of registers in the array */
+ void * regval) /* fillin this array */
+{
+ tcall.reg_parms.thread = osthreadid ;
+ tcall.reg_parms.regcount = regcount ;
+ tcall.reg_parms.registers = regval ;
+ return dbg_thread_syscall(dbg_getthreadreg_func) ;
+}
+
+int dbg_setthreadreg(
+ threadref * osthreadid,
+ int regcount , /* number of registers */
+ void * regval)
+{
+ tcall.reg_parms.thread = osthreadid ;
+ tcall.reg_parms.regcount = regcount ;
+ tcall.reg_parms.registers = regval ;
+ return dbg_thread_syscall(dbg_setthreadreg_func) ;
+} /* dbg_setthreadreg */
+
+int dbg_scheduler(threadref *thread_id, int lock, int mode)
+{
+ tcall.scheduler_parms.thread = thread_id;
+ tcall.scheduler_parms.lock = lock ;
+ tcall.scheduler_parms.mode = mode ;
+
+ return dbg_thread_syscall(dbg_scheduler_func) ;
+}
+
+
+
+#if (CYG_BYTEORDER == CYG_LSBFIRST)
+
+unsigned long swap32(unsigned long x)
+{
+ unsigned long r = 0;
+
+ r |= (x>>24)&0xFF;
+ r |= ((x>>16)&0xFF)<<8;
+ r |= ((x>>8)&0xFF)<<16;
+ r |= ((x)&0xFF)<<24;
+
+ return r;
+}
+
+#else
+
+#define swap32(x) ((unsigned long)(x))
+
+#endif
+
+int dbg_currthread_id(void)
+{
+ threadref ref;
+ if( dbg_currthread( &ref ) )
+ return (cyg_uint16)swap32(((unsigned long *)ref)[1]);
+ else return 0;
+}
+
+#endif
diff --git a/cesar/ecos/packages/hal/common/current/src/drv_api.c b/cesar/ecos/packages/hal/common/current/src/drv_api.c
new file mode 100644
index 0000000000..57d0ceb6cf
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/src/drv_api.c
@@ -0,0 +1,944 @@
+//==========================================================================
+//
+// drv_api.c
+//
+// Driver API for non-kernel configurations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Nick Garnett
+// Date: 1999-02-24
+// Purpose: Driver API for non-kernel configurations
+// Description: These functions are used to support drivers when the kernel
+// is not present.
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+
+#ifndef CYGPKG_KERNEL
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/cyg_trac.h>
+#include <cyg/infra/cyg_ass.h>
+
+#include <pkgconf/hal.h>
+#include <cyg/hal/drv_api.h>
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+
+//--------------------------------------------------------------------------
+// Statics
+
+static volatile cyg_int32 isr_disable_counter = 1; // ISR disable counter
+
+static CYG_INTERRUPT_STATE isr_disable_state;
+
+volatile cyg_int32 dsr_disable_counter // DSR disable counter
+ CYGBLD_ATTRIB_ASM_ALIAS( cyg_scheduler_sched_lock );
+
+static cyg_interrupt* volatile dsr_list; // List of pending DSRs
+
+#ifdef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
+
+cyg_interrupt *chain_list[CYGNUM_HAL_ISR_COUNT];
+
+#endif
+
+//--------------------------------------------------------------------------
+// DSR handling functions.
+// post_dsr() places a DSR on the list of DSRs to be called.
+// call_dsrs() calls the DSRs.
+
+static void post_dsr( cyg_interrupt *intr )
+{
+ CYG_INTERRUPT_STATE old_intr;
+
+ CYG_REPORT_FUNCTION();
+
+ HAL_DISABLE_INTERRUPTS(old_intr);
+
+ if( intr->dsr_count++ == 0 )
+ {
+ intr->next_dsr = dsr_list;
+ dsr_list = intr;
+ }
+
+ HAL_RESTORE_INTERRUPTS(old_intr);
+
+ CYG_REPORT_RETURN();
+}
+
+static void call_dsrs(void)
+{
+ CYG_REPORT_FUNCTION();
+
+ while( dsr_list != NULL )
+ {
+ cyg_interrupt *intr;
+ cyg_int32 count;
+ CYG_INTERRUPT_STATE old_intr;
+
+ HAL_DISABLE_INTERRUPTS(old_intr);
+
+ intr = dsr_list;
+ dsr_list = intr->next_dsr;
+ count = intr->dsr_count;
+ intr->dsr_count = 0;
+
+ HAL_RESTORE_INTERRUPTS(old_intr);
+
+ intr->dsr( intr->vector, count, (CYG_ADDRWORD)intr->data );
+ }
+
+ CYG_REPORT_RETURN();
+
+}
+
+//--------------------------------------------------------------------------
+// This is referenced from the HAL, although it does not actually get called.
+
+externC void
+cyg_interrupt_call_pending_DSRs(void)
+{
+ call_dsrs();
+}
+
+//--------------------------------------------------------------------------
+// This is called from springboard ISRs in some HALs.
+
+externC void
+cyg_interrupt_post_dsr(CYG_ADDRWORD data)
+{
+ cyg_interrupt * intr = (cyg_interrupt *)data;
+ post_dsr(intr);
+}
+
+//--------------------------------------------------------------------------
+// Interrupt end function called from HAL VSR to tidy up. This is where
+// DSRs will be called if necessary.
+
+externC void
+interrupt_end(
+ cyg_uint32 isr_ret,
+ cyg_interrupt *intr,
+ HAL_SavedRegisters *regs
+ )
+{
+ CYG_REPORT_FUNCTION();
+
+#ifndef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
+
+ // Only do this if we are in a non-chained configuration.
+ // If we are chained, then chain_isr will do the DSR
+ // posting.
+
+ if( isr_ret & CYG_ISR_CALL_DSR && intr != NULL ) post_dsr(intr);
+
+#endif
+
+ if( dsr_disable_counter == 0 ) call_dsrs();
+
+ CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+// ISR for handling chained interrupts.
+
+#ifdef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
+
+cyg_uint32 chain_isr(cyg_vector_t vector, CYG_ADDRWORD data)
+{
+ cyg_interrupt *p = *(cyg_interrupt **)data;
+ register cyg_uint32 isr_ret = 0;
+ register cyg_uint32 isr_chain_ret = 0;
+
+ CYG_REPORT_FUNCTION();
+
+ while( p != NULL )
+ {
+ if( p->vector == vector )
+ {
+ isr_ret = p->isr(vector, p->data);
+
+ isr_chain_ret |= isr_ret;
+
+ if( isr_ret & CYG_ISR_CALL_DSR ) post_dsr(p);
+
+ if( isr_ret & CYG_ISR_HANDLED ) break;
+ }
+
+ p = p->next;
+ }
+
+#ifdef HAL_DEFAULT_ISR
+ if( (isr_chain_ret & (CYG_ISR_CALL_DSR|CYG_ISR_HANDLED)) == 0 )
+ {
+ // If we finished the loop for some reason other than that an
+ // ISR has handled the interrupt, call any default ISR to either
+ // report the spurious interrupt, or do some other HAL level processing
+ // such as GDB interrupt detection etc.
+
+ HAL_DEFAULT_ISR( vector, 0 );
+ }
+#endif
+
+ CYG_REPORT_RETURN();
+
+ return isr_ret & CYG_ISR_CALL_DSR;
+}
+
+#endif
+
+//--------------------------------------------------------------------------
+// ISR lock. This disables interrupts and keeps a count of the number
+// times it has been called.
+
+externC void cyg_drv_isr_lock()
+{
+ CYG_REPORT_FUNCTION();
+
+ if( isr_disable_counter == 0 )
+ HAL_DISABLE_INTERRUPTS(isr_disable_state);
+
+ CYG_ASSERT( isr_disable_counter >= 0 , "Disable counter negative");
+
+ isr_disable_counter++;
+
+ CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+// Unlock ISRs. This decrements the count and re-enables interrupts if it
+// goes zero.
+
+externC void cyg_drv_isr_unlock()
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( isr_disable_counter > 0 , "Disable counter not greater than zero");
+
+ isr_disable_counter--;
+
+ if ( isr_disable_counter == 0 )
+ {
+ HAL_RESTORE_INTERRUPTS(isr_disable_state);
+ }
+
+ CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+// Lock DSR lock. Simply increment the counter.
+
+externC void cyg_drv_dsr_lock()
+{
+ CYG_REPORT_FUNCTION();
+
+ dsr_disable_counter++;
+
+ CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+// Unlock DSR lock. If the counter is about to go zero, call any pending
+// DSRs and then zero the counter.
+
+externC void cyg_drv_dsr_unlock()
+{
+ CYG_REPORT_FUNCTION();
+
+ do
+ {
+ if( dsr_disable_counter == 1 )
+ {
+ call_dsrs();
+ }
+
+ HAL_REORDER_BARRIER();
+
+ dsr_disable_counter = 0;
+
+ HAL_REORDER_BARRIER();
+
+ // Check that no DSRs have been posted between calling
+ // call_dsrs() and zeroing dsr_disable_counter. If so,
+ // loop back and call them.
+
+ if( dsr_list != NULL )
+ {
+ dsr_disable_counter = 1;
+ continue;
+ }
+
+ CYG_REPORT_RETURN();
+
+ return;
+
+ } while(1);
+
+ CYG_FAIL( "Should not be executed" );
+}
+
+//--------------------------------------------------------------------------
+// Initialize a mutex.
+
+externC void cyg_drv_mutex_init( cyg_drv_mutex_t *mutex )
+{
+ CYG_REPORT_FUNCTION();
+
+ mutex->lock = 0;
+
+ CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+// Destroy a mutex.
+
+externC void cyg_drv_mutex_destroy( cyg_drv_mutex_t *mutex )
+{
+ CYG_REPORT_FUNCTION();
+
+ mutex->lock = -1;
+
+ CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+// Lock a mutex. We check that we are not trying to lock a locked or
+// destroyed mutex and if not, set it locked.
+
+externC cyg_bool_t cyg_drv_mutex_lock( cyg_drv_mutex_t *mutex )
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( mutex->lock == 0 , "Trying to lock locked mutex");
+
+ mutex->lock = 1;
+
+ CYG_REPORT_RETURN();
+
+ return true;
+}
+
+//--------------------------------------------------------------------------
+// Attempt to claim a mutex, and return if it cannot be.
+
+externC cyg_bool_t cyg_drv_mutex_trylock( cyg_drv_mutex_t *mutex )
+{
+ cyg_bool_t result = true;
+
+ CYG_REPORT_FUNCTION();
+
+ if( mutex->lock == 1 ) result = false;
+
+ mutex->lock = 1;
+
+ CYG_REPORT_RETURN();
+
+ return result;
+}
+
+//--------------------------------------------------------------------------
+// Unlock a mutex. We check that the mutex is actually locked before doing
+// this.
+
+externC void cyg_drv_mutex_unlock( cyg_drv_mutex_t *mutex )
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( mutex->lock == 1 , "Trying to unlock unlocked mutex");
+
+ mutex->lock = 0;
+
+ CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+// Release all threads waiting for the mutex.
+// This is really for threads, so we do nothing here.
+
+externC void cyg_drv_mutex_release( cyg_drv_mutex_t *mutex )
+{
+ CYG_REPORT_FUNCTION();
+
+
+
+ CYG_REPORT_RETURN();
+}
+
+
+//--------------------------------------------------------------------------
+// Initialized a condition variable.
+
+externC void cyg_drv_cond_init( cyg_drv_cond_t *cond, cyg_drv_mutex_t *mutex )
+{
+ CYG_REPORT_FUNCTION();
+
+ cond->wait = 0;
+ cond->mutex = mutex;
+
+ CYG_REPORT_RETURN();
+}
+
+
+//--------------------------------------------------------------------------
+// Destroy a condition variable.
+
+externC void cyg_drv_cond_destroy( cyg_drv_cond_t *cond )
+{
+ CYG_REPORT_FUNCTION();
+
+ cond->wait = -1;
+ cond->mutex = NULL;
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Wait for a condition variable to be signalled. We simply busy wait
+// polling the condition variable's wait member until a DSR sets it to
+// 0. Note that the semantics of condition variables means that the
+// wakeup only happens if there is a thread actually waiting on the CV
+// when the signal is sent.
+
+externC cyg_bool cyg_drv_cond_wait( cyg_drv_cond_t *cond )
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( cond->mutex != NULL, "Uninitialized condition variable");
+ CYG_ASSERT( cond->mutex->lock, "Mutex not locked");
+
+ cyg_drv_dsr_lock();
+
+ cond->wait = 1;
+
+ while( cond->wait == 1 )
+ {
+ // While looping we call call_dsrs() to service any DSRs that
+ // get posted. One of these will make the call to cond_signal
+ // to break us out of this loop. If we do not have the DSR
+ // lock claimed, then a race condition could occur and keep us
+ // stuck here forever.
+
+ call_dsrs();
+ }
+
+ cyg_drv_dsr_unlock();
+
+ CYG_REPORT_RETURN();
+
+ return true;
+}
+
+//--------------------------------------------------------------------------
+// Signal a condition variable. This sets the wait member to zero, which
+// has no effect when there is no waiter, but will wake up any waiting
+// thread.
+
+externC void cyg_drv_cond_signal( cyg_drv_cond_t *cond )
+{
+ CYG_REPORT_FUNCTION();
+
+ cond->wait = 0;
+
+ CYG_REPORT_RETURN();
+}
+
+
+//--------------------------------------------------------------------------
+// Broadcast to condition variable. This is exactly the same a signal since
+// there can only be one waiter.
+
+externC void cyg_drv_cond_broadcast( cyg_drv_cond_t *cond )
+{
+ CYG_REPORT_FUNCTION();
+
+ cond->wait = 0;
+
+ CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+// Spinlock support.
+// Since we can only support a single CPU in this version of the API, we only
+// set and clear the lock variable to keep track of what's happening.
+
+void cyg_drv_spinlock_init(
+ cyg_drv_spinlock_t *lock, /* spinlock to initialize */
+ cyg_bool_t locked /* init locked or unlocked */
+)
+{
+ CYG_REPORT_FUNCTION();
+
+ lock->lock = locked;
+
+ CYG_REPORT_RETURN();
+}
+
+void cyg_drv_spinlock_destroy( cyg_drv_spinlock_t *lock )
+{
+ CYG_REPORT_FUNCTION();
+
+ lock->lock = -1;
+
+ CYG_REPORT_RETURN();
+}
+
+void cyg_drv_spinlock_spin( cyg_drv_spinlock_t *lock )
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( lock->lock == 0 , "Trying to lock locked spinlock");
+
+ lock->lock = 1;
+
+ CYG_REPORT_RETURN();
+}
+
+void cyg_drv_spinlock_clear( cyg_drv_spinlock_t *lock )
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( lock->lock == 1 , "Trying to clear cleared spinlock");
+
+ lock->lock = 0;
+
+ CYG_REPORT_RETURN();
+}
+
+cyg_bool_t cyg_drv_spinlock_try( cyg_drv_spinlock_t *lock )
+{
+ cyg_bool_t result = true;
+
+ CYG_REPORT_FUNCTION();
+
+ if( lock->lock == 1 ) result = false;
+
+ lock->lock = 1;
+
+ CYG_REPORT_RETURN();
+
+ return result;
+}
+
+cyg_bool_t cyg_drv_spinlock_test( cyg_drv_spinlock_t *lock )
+{
+ cyg_bool_t result = true;
+
+ CYG_REPORT_FUNCTION();
+
+ if( lock->lock == 1 ) result = false;
+
+ CYG_REPORT_RETURN();
+
+ return result;
+}
+
+void cyg_drv_spinlock_spin_intsave( cyg_drv_spinlock_t *lock,
+ cyg_addrword_t *istate )
+{
+ CYG_REPORT_FUNCTION();
+
+ HAL_DISABLE_INTERRUPTS( *istate );
+
+ lock->lock = 1;
+
+ CYG_REPORT_RETURN();
+}
+
+
+void cyg_drv_spinlock_clear_intsave( cyg_drv_spinlock_t *lock,
+ cyg_addrword_t istate )
+{
+ CYG_REPORT_FUNCTION();
+
+ lock->lock = 0;
+
+ HAL_RESTORE_INTERRUPTS( istate );
+
+ CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+// Create an interrupt object.
+
+externC void cyg_drv_interrupt_create(
+ cyg_vector_t vector,
+ cyg_priority_t priority,
+ cyg_addrword_t data,
+ cyg_ISR_t *isr,
+ cyg_DSR_t *dsr,
+ cyg_handle_t *handle,
+ cyg_interrupt *intr
+ )
+{
+ CYG_REPORT_FUNCTION();
+
+ intr->vector = vector;
+ intr->priority = priority;
+ intr->isr = isr;
+ intr->dsr = dsr;
+ intr->data = data;
+ intr->next_dsr = NULL;
+ intr->dsr_count = 0;
+
+#ifdef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
+
+ intr->next = NULL;
+
+#endif
+
+ *handle = (cyg_handle_t)intr;
+
+ CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+// Delete an interrupt object. This merely ensures that it is detached from
+// the vector.
+
+externC void cyg_drv_interrupt_delete( cyg_handle_t interrupt )
+{
+ CYG_REPORT_FUNCTION();
+
+ cyg_drv_interrupt_detach( interrupt );
+
+ CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+//
+
+externC void cyg_drv_interrupt_attach( cyg_handle_t interrupt )
+{
+ cyg_interrupt *intr = (cyg_interrupt *)interrupt;
+
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( intr->vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( intr->vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ HAL_INTERRUPT_SET_LEVEL( intr->vector, intr->priority );
+
+#ifdef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
+
+ CYG_ASSERT( intr->next == NULL , "cyg_interrupt already on a list");
+
+ {
+ cyg_uint32 index;
+
+ HAL_TRANSLATE_VECTOR( intr->vector, index );
+
+ if( chain_list[index] == NULL )
+ {
+ // First Interrupt on this chain, just assign it and
+ // register the chain_isr with the HAL.
+
+ chain_list[index] = intr;
+
+ HAL_INTERRUPT_ATTACH( intr->vector, chain_isr,
+ &chain_list[index], NULL );
+ }
+ else
+ {
+ // There are already interrupts chained, add this one into
+ // the chain in priority order.
+
+ cyg_interrupt **p = &chain_list[index];
+
+ while( *p != NULL )
+ {
+ cyg_interrupt *n = *p;
+
+ if( n->priority < intr->priority ) break;
+
+ p = &n->next;
+ }
+ intr->next = *p;
+ *p = intr;
+ }
+ }
+
+#else
+
+ HAL_INTERRUPT_ATTACH( intr->vector, intr->isr, intr->data, intr );
+
+#endif
+
+ CYG_REPORT_RETURN();
+}
+
+
+//--------------------------------------------------------------------------
+// Detach an interrupt from its vector.
+
+externC void cyg_drv_interrupt_detach( cyg_handle_t interrupt )
+{
+ cyg_interrupt *intr = (cyg_interrupt *)interrupt;
+
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( intr->vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( intr->vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+#ifdef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
+
+ // Remove the interrupt object from the vector chain.
+
+ {
+ cyg_uint32 index;
+ cyg_interrupt **p;
+
+ HAL_TRANSLATE_VECTOR( intr->vector, index );
+
+ p = &chain_list[index];
+
+ while( *p != NULL )
+ {
+ cyg_interrupt *n = *p;
+
+ if( n == intr )
+ {
+ *p = intr->next;
+ break;
+ }
+
+ p = &n->next;
+ }
+
+ // If this was the last one, detach the vector.
+
+ if( chain_list[index] == NULL )
+ HAL_INTERRUPT_DETACH( intr->vector, chain_isr );
+ }
+
+#else
+
+ HAL_INTERRUPT_DETACH( intr->vector, intr->isr );
+
+#endif
+
+ CYG_REPORT_RETURN();
+}
+
+
+//--------------------------------------------------------------------------
+// Mask delivery of an interrupt at the interrupt controller.
+// (Interrupt safe)
+
+externC void cyg_drv_interrupt_mask( cyg_vector_t vector )
+{
+ CYG_INTERRUPT_STATE old_ints;
+
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("vector=%d", vector);
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ HAL_INTERRUPT_MASK( vector );
+ HAL_RESTORE_INTERRUPTS(old_ints);
+
+ CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+// Mask delivery of an interrupt at the interrupt controller.
+// (Not interrupt safe)
+
+externC void cyg_drv_interrupt_mask_intunsafe( cyg_vector_t vector )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("vector=%d", vector);
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ HAL_INTERRUPT_MASK( vector );
+
+ CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+// Unmask delivery of an interrupt at the interrupt controller.
+// (Interrupt safe)
+
+externC void cyg_drv_interrupt_unmask( cyg_vector_t vector )
+{
+ CYG_INTERRUPT_STATE old_ints;
+
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("vector=%d", vector);
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ HAL_INTERRUPT_UNMASK( vector );
+ HAL_RESTORE_INTERRUPTS(old_ints);
+
+ CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+// Unmask delivery of an interrupt at the interrupt controller.
+// (Not interrupt safe)
+
+externC void cyg_drv_interrupt_unmask_intunsafe( cyg_vector_t vector )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("vector=%d", vector);
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ HAL_INTERRUPT_UNMASK( vector );
+
+ CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+// Acknowledge an interrupt at the controller to allow another interrupt
+// to be delivered.
+
+externC void cyg_drv_interrupt_acknowledge( cyg_vector_t vector )
+{
+// CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ HAL_INTERRUPT_ACKNOWLEDGE( vector );
+
+// CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+// Configure interrupt detection parameters.
+
+externC void cyg_drv_interrupt_configure(
+ cyg_vector_t vector,
+ cyg_bool_t level,
+ cyg_bool_t up
+ )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG3("vector = %d, level = %d, up = %d", vector, level,
+ up);
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ HAL_INTERRUPT_CONFIGURE( vector, level, up );
+
+ CYG_REPORT_RETURN();
+}
+
+//--------------------------------------------------------------------------
+// Configure interrupt priority level.
+
+externC void cyg_drv_interrupt_level( cyg_vector_t vector, cyg_priority_t level )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG2("vector = %d, level = %d", vector, level);
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ HAL_INTERRUPT_SET_LEVEL( vector, level );
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// CPU interrupt routing
+
+externC void cyg_drv_interrupt_set_cpu( cyg_vector_t vector, cyg_cpu_t cpu )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG2("vector = %d, cpu = %d", vector, cpu);
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+#ifdef CYGPKG_HAL_SMP_SUPPORT
+ HAL_INTERRUPT_SET_CPU( vector, cpu );
+#endif
+
+ CYG_REPORT_RETURN();
+}
+
+externC cyg_cpu_t cyg_drv_interrupt_get_cpu( cyg_vector_t vector )
+{
+ cyg_cpu_t cpu = 0;
+
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("vector = %d", vector);
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+#ifdef CYGPKG_HAL_SMP_SUPPORT
+ HAL_INTERRUPT_GET_CPU( vector, cpu );
+#endif
+
+ CYG_REPORT_RETURN();
+
+ return cpu;
+}
+
+// -------------------------------------------------------------------------
+// Exception delivery function called from the HAL as a result of a
+// hardware exception being raised.
+
+externC void cyg_hal_deliver_exception( CYG_WORD code, CYG_ADDRWORD data )
+{
+ CYG_FAIL(" !!! Exception !!! ");
+}
+
+
+#endif
+
+//--------------------------------------------------------------------------
+// EOF drv_api.c
diff --git a/cesar/ecos/packages/hal/common/current/src/dummy.c b/cesar/ecos/packages/hal/common/current/src/dummy.c
new file mode 100644
index 0000000000..dfbebfadb1
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/src/dummy.c
@@ -0,0 +1,54 @@
+//==========================================================================
+//
+// dummy.c
+//
+// Guarantee the existence of libextras.a
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 1999-04-16
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+
+// This file should contain no code or data. Its sole purpose is to
+// be compiled to an empty object file and placed into libtarget.a,
+// thus ensuring that that file actually exists. This simplifies
+// life elsewhere.
diff --git a/cesar/ecos/packages/hal/common/current/src/gdb-fileio.c b/cesar/ecos/packages/hal/common/current/src/gdb-fileio.c
new file mode 100644
index 0000000000..7888edaf2d
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/src/gdb-fileio.c
@@ -0,0 +1,729 @@
+/*==========================================================================
+//
+// gdb-fileio.c
+//
+// Implementation of File I/O using the GDB remote protocol
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2002-04-09
+// Purpose: Implementation of File I/O using the GDB remote
+// protocol
+// Description: 'F' packet requests are of the form:
+// F<name>[,<parameter>]...
+// where name is the ASCII syscall name, and the
+// parameters are generally included as hex ints,
+// in ASCII.
+//
+//####DESCRIPTIONEND####
+//========================================================================*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/hal.h>
+
+/* HEADERS */
+
+#include <stddef.h> // size_t
+#include <cyg/infra/cyg_type.h>
+#ifdef CYGPKG_ISOINFRA
+# include <pkgconf/isoinfra.h>
+# include <string.h>
+#endif
+#include "board.h" // sets correct definitions for generic stub header
+#include <cyg/hal/generic-stub.h>
+#include "gdb-fileio.h"
+
+/* TYPES */
+
+// this is used by newlib's mode_t so we should match it
+#ifdef __GNUC__
+#define _ST_INT32 __attribute__ ((__mode__ (__SI__)))
+#else
+#define _ST_INT32
+#endif
+
+typedef int newlib_int_t;
+typedef unsigned int newlib_uint_t;
+typedef long newlib_long_t;
+typedef long newlib_time_t;
+typedef unsigned int newlib_mode_t _ST_INT32;
+typedef short newlib_dev_t;
+typedef unsigned short newlib_uid_t;
+typedef unsigned short newlib_gid_t;
+typedef unsigned short newlib_ino_t;
+typedef unsigned short newlib_nlink_t;
+typedef long newlib_off_t;
+
+struct newlib_timeval {
+ newlib_time_t tv_sec;
+ newlib_long_t tv_usec;
+};
+
+struct newlib_stat
+{
+ newlib_dev_t st_dev;
+ newlib_ino_t st_ino;
+ newlib_mode_t st_mode;
+ newlib_nlink_t st_nlink;
+ newlib_uid_t st_uid;
+ newlib_gid_t st_gid;
+ newlib_dev_t st_rdev;
+ newlib_off_t st_size;
+ // We assume we've been compiled with the same flags as newlib here
+#if defined(__svr4__) && !defined(__PPC__) && !defined(__sun__)
+ newlib_time_t st_atime;
+ newlib_time_t st_mtime;
+ newlib_time_t st_ctime;
+#else
+ newlib_time_t st_atime;
+ newlib_long_t st_spare1;
+ newlib_time_t st_mtime;
+ newlib_long_t st_spare2;
+ newlib_time_t st_ctime;
+ newlib_long_t st_spare3;
+ newlib_long_t st_blksize;
+ newlib_long_t st_blocks;
+ newlib_long_t st_spare4[2];
+#endif
+};
+
+/* EXTERNS */
+
+__externC char __remcomInBuffer[]; // from generic-stub.c, for packet data
+__externC char __remcomOutBuffer[]; // ditto
+
+/* STATICS/GLOBALS */
+
+static int __fileio_retcode, __fileio_errno;
+static cyg_bool __fileio_retcode_set, __fileio_errno_set, __fileio_ctrlc_set;
+
+/* MACROS */
+
+// endian independent conversion functions from big endian protocol types
+// to newlib types
+
+#define GDBFILEIO_FIO_TO_NEWLIB( _f, _n, _ftype ) \
+CYG_MACRO_START \
+ char *_cf = (char *)(_f); \
+ int _i; \
+ char _sign = 0; \
+ if (*_cf == '-') { \
+ _sign = 1; \
+ _cf++; \
+ } \
+ (_n) = 0; \
+ for (_i=0; _i<sizeof(_ftype); _i++) { \
+ (_n) = ((_n) << 8) | _cf[_i]; \
+ } \
+ if (_sign) \
+ (_n) = -(_n); \
+CYG_MACRO_END
+
+#define GDBABS(_x_) (((_x_) < 0) ? (-(_x_)) : (_x_))
+
+#define GDBFILEIO_NEWLIB_TO_FIO( _f, _n, _ftype ) \
+CYG_MACRO_START \
+ char *_cf = (char *)(_f); \
+ int _i = 0; \
+ if ((_n) < 0) \
+ _cf[_i++] = '-'; \
+ for (; _i<sizeof(_ftype); _i++) { \
+ _cf[_i] = ((GDBABS(_n)) >> 8*(sizeof(_ftype)-_i-1)) & 0xff; \
+ } \
+CYG_MACRO_END
+
+
+/* FUNCTIONS */
+
+#ifndef CYGINT_ISO_STRING_STRFUNCS
+static size_t strlen( const char *s )
+{
+ size_t retval;
+ const char *start = s;
+ while (*s)
+ s++;
+ retval = s - start;
+ return retval;
+}
+#endif
+
+static int
+chars_to_hex( char *charsin, char *hexout, int bytes )
+{
+ int numChars = 0;
+ int allzero = true;
+
+ while (bytes--) {
+ if (0 != *charsin)
+ allzero = false;
+ *hexout++ = __tohex( (*charsin / 16) & 15 );
+ *hexout++ = __tohex( (*charsin++) & 15 );
+ numChars += 2;
+ }
+ if (allzero) // doesn't matter if we actually set more than needed above
+ return (numChars > 2 ? 2 : numChars);
+ return numChars;
+}
+
+static void
+gdbfileio_fio_to_newlib_time_t( fio_time_t *f, newlib_time_t *n )
+{
+ GDBFILEIO_FIO_TO_NEWLIB( f, *n, fio_time_t );
+} // gdbfileio_fio_to_newlib_time_t()
+
+static void
+gdbfileio_newlib_to_fio_int_t( newlib_int_t *n, fio_int_t *f )
+{
+ GDBFILEIO_NEWLIB_TO_FIO( f, *n, fio_int_t );
+} // gdbfileio_newlib_to_fio_int_t()
+
+static void
+gdbfileio_newlib_to_fio_uint_t( newlib_uint_t *n, fio_uint_t *f )
+{
+ GDBFILEIO_NEWLIB_TO_FIO( f, *n, fio_uint_t );
+} // gdbfileio_newlib_to_fio_uint_t()
+
+static void
+gdbfileio_fio_to_newlib_long_t( fio_long_t *f, newlib_long_t *n )
+{
+ GDBFILEIO_FIO_TO_NEWLIB( f, *n, fio_long_t );
+} // gdbfileio_fio_to_newlib_long_t()
+
+static void
+gdbfileio_newlib_to_fio_long_t( newlib_long_t *n, fio_long_t *f )
+{
+ GDBFILEIO_NEWLIB_TO_FIO( f, *n, fio_long_t );
+} // gdbfileio_newlib_to_fio_long_t()
+
+static void
+gdbfileio_fio_to_newlib_mode_t( fio_mode_t *f, newlib_mode_t *n )
+{
+ GDBFILEIO_FIO_TO_NEWLIB( f, *n, fio_mode_t );
+} // gdbfileio_fio_to_newlib_mode_t()
+
+static void
+gdbfileio_newlib_to_fio_mode_t( newlib_mode_t *n, fio_mode_t *f )
+{
+ GDBFILEIO_NEWLIB_TO_FIO( f, *n, fio_mode_t );
+} // gdbfileio_newlib_to_fio_mode_t()
+
+static void
+gdbfileio_fio_to_newlib_dev_t( fio_uint_t *f, newlib_dev_t *n )
+{
+ GDBFILEIO_FIO_TO_NEWLIB( f, *n, fio_uint_t );
+} // gdbfileio_fio_to_newlib_dev_t()
+
+static void
+gdbfileio_fio_to_newlib_ino_t( fio_uint_t *f, newlib_ino_t *n )
+{
+ GDBFILEIO_FIO_TO_NEWLIB( f, *n, fio_uint_t );
+} // gdbfileio_fio_to_newlib_ino_t()
+
+// these defines are good enough for now (to save code size) as they
+// are the same functions in practice
+#define gdbfileio_fio_to_newlib_nlink_t gdbfileio_fio_to_newlib_ino_t
+#define gdbfileio_fio_to_newlib_uid_t gdbfileio_fio_to_newlib_ino_t
+#define gdbfileio_fio_to_newlib_gid_t gdbfileio_fio_to_newlib_ino_t
+#define gdbfileio_fio_to_newlib_off_t gdbfileio_fio_to_newlib_long_t
+
+
+// this function is commonly used by most functions to handle everything
+// once the packet has been constructed. It doesn't have to be used - it's
+// just nice to keep this in one place for maintenance reasons.
+static int
+gdbfileio_common_sendpkt( char *buf, int *sig )
+{
+ int status;
+
+ __putpacket( buf );
+
+ do {
+ __getpacket( __remcomInBuffer );
+ status = __process_packet( __remcomInBuffer );
+ } while ( status == 0 );
+
+ if ( __fileio_ctrlc_set )
+ *sig = SIGINT;
+ if ( !__fileio_retcode_set ) // deal with protocol failure
+ return -FILEIO_EINVAL;
+ if ( __fileio_retcode < 0 && __fileio_errno_set )
+ return -__fileio_errno;
+ else
+ return __fileio_retcode;
+} // gdbfileio_common_sendpkt()
+
+// deal with a received F packet. This is called from __process_packet in
+// generic-stub.c
+__externC void
+cyg_hal_gdbfileio_process_F_packet( char *packet,
+ char *__remcomOutBuffer )
+{
+ // Reply packet structure:
+ // F<retcode>[,<errno>[,<Ctrl-C flag>]][;<call specific attachment>]
+
+ char *p = &packet[1];
+ cyg_bool minus = false;
+ target_register_t temptrt;
+
+ __fileio_retcode_set = __fileio_errno_set = __fileio_ctrlc_set = false;
+
+ if (*p == '-') {
+ minus = true;
+ p++;
+ }
+
+ __hexToInt( &p, &temptrt );
+ __fileio_retcode = minus ? -(int)temptrt : (int)temptrt;
+ __fileio_retcode_set = true;
+
+ if ( *p++ == ',' ) {
+ // get errno
+ __hexToInt( &p, &temptrt );
+ __fileio_errno = (int)temptrt;
+ __fileio_errno_set = true;
+ if ( *p++ == ',' ) {
+ if ( *p == 'C' ) {
+ __fileio_ctrlc_set = true;
+ }
+ }
+ }
+ // ignore anything afterwards (e.g. call specific attachment) for now
+
+} // cyg_hal_gdbfileio_process_F_packet()
+
+__externC int
+cyg_hal_gdbfileio_open( const char *name, int flags, int mode, int *sig )
+{
+ size_t namelen;
+ unsigned int i=0;
+ fio_mode_t fmode;
+ fio_int_t fflags;
+
+ // clear out unsupported flags/modes, as per the spec
+ flags &= FILEIO_O_SUPPORTED;
+ mode &= FILEIO_S_SUPPORTED;
+
+ gdbfileio_newlib_to_fio_int_t( &flags, &fflags );
+ gdbfileio_newlib_to_fio_mode_t( &mode, &fmode );
+
+ __remcomOutBuffer[i++] = 'F';
+ __remcomOutBuffer[i++] = 'o';
+ __remcomOutBuffer[i++] = 'p';
+ __remcomOutBuffer[i++] = 'e';
+ __remcomOutBuffer[i++] = 'n';
+ __remcomOutBuffer[i++] = ',';
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)name,
+ sizeof(name)*8 );
+ // i now points after the parameter
+ __remcomOutBuffer[i++] = '/';
+ namelen = strlen( name )+1; // includes '\0'
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)namelen,
+ sizeof(namelen)*8 );
+ __remcomOutBuffer[i++] = ',';
+ i += chars_to_hex( (char *)&fflags, &__remcomOutBuffer[i], sizeof(fflags) );
+ __remcomOutBuffer[i++] = ',';
+ i += chars_to_hex( (char *)&fmode, &__remcomOutBuffer[i], sizeof(fmode) );
+ __remcomOutBuffer[i] = 0;
+
+ return gdbfileio_common_sendpkt( __remcomOutBuffer, sig );
+} // cyg_hal_gdbfileio_open()
+
+__externC int
+cyg_hal_gdbfileio_close( int fd, int *sig )
+{
+ unsigned int i=0;
+ fio_int_t ffd;
+
+ gdbfileio_newlib_to_fio_int_t( &fd, &ffd );
+ __remcomOutBuffer[i++] = 'F';
+ __remcomOutBuffer[i++] = 'c';
+ __remcomOutBuffer[i++] = 'l';
+ __remcomOutBuffer[i++] = 'o';
+ __remcomOutBuffer[i++] = 's';
+ __remcomOutBuffer[i++] = 'e';
+ __remcomOutBuffer[i++] = ',';
+ i += chars_to_hex( (char *)&ffd, &__remcomOutBuffer[i], sizeof(ffd) );
+ // i now points after the parameter
+ __remcomOutBuffer[i] = 0;
+
+ return gdbfileio_common_sendpkt( __remcomOutBuffer, sig );
+} // cyg_hal_gdbfileio_close()
+
+__externC int
+cyg_hal_gdbfileio_read( int fd, void *buf, size_t count, int *sig )
+{
+ unsigned int i=0;
+ fio_int_t ffd;
+ fio_uint_t fcount;
+ unsigned int uicount = (unsigned int)count;
+
+ gdbfileio_newlib_to_fio_int_t( &fd, &ffd );
+ gdbfileio_newlib_to_fio_uint_t( &uicount, &fcount );
+
+ __remcomOutBuffer[i++] = 'F';
+ __remcomOutBuffer[i++] = 'r';
+ __remcomOutBuffer[i++] = 'e';
+ __remcomOutBuffer[i++] = 'a';
+ __remcomOutBuffer[i++] = 'd';
+ __remcomOutBuffer[i++] = ',';
+ i += chars_to_hex( (char *)&ffd, &__remcomOutBuffer[i], sizeof(ffd) );
+ // i now points after the parameter
+ __remcomOutBuffer[i++] = ',';
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)buf,
+ sizeof(buf)*8 );
+ __remcomOutBuffer[i++] = ',';
+ i += chars_to_hex( (char *)&fcount, &__remcomOutBuffer[i], sizeof(fcount) );
+ __remcomOutBuffer[i] = 0;
+
+ return gdbfileio_common_sendpkt( __remcomOutBuffer, sig );
+} // cyg_hal_gdbfileio_read()
+
+__externC int
+cyg_hal_gdbfileio_write( int fd, const void *buf, size_t count, int *sig )
+{
+ unsigned int i=0;
+ fio_int_t ffd;
+ fio_uint_t fcount;
+ unsigned int uicount = (unsigned int)count;
+
+ gdbfileio_newlib_to_fio_int_t( &fd, &ffd );
+ gdbfileio_newlib_to_fio_uint_t( &uicount, &fcount );
+
+ __remcomOutBuffer[i++] = 'F';
+ __remcomOutBuffer[i++] = 'w';
+ __remcomOutBuffer[i++] = 'r';
+ __remcomOutBuffer[i++] = 'i';
+ __remcomOutBuffer[i++] = 't';
+ __remcomOutBuffer[i++] = 'e';
+ __remcomOutBuffer[i++] = ',';
+ i += chars_to_hex( (char *)&ffd, &__remcomOutBuffer[i], sizeof(ffd) );
+ // i now points after the parameter
+ __remcomOutBuffer[i++] = ',';
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)buf,
+ sizeof(buf)*8 );
+ __remcomOutBuffer[i++] = ',';
+ i += chars_to_hex( (char *)&fcount, &__remcomOutBuffer[i], sizeof(fcount) );
+ __remcomOutBuffer[i] = 0;
+
+ return gdbfileio_common_sendpkt( __remcomOutBuffer, sig );
+} // cyg_hal_gdbfileio_write()
+
+__externC int
+cyg_hal_gdbfileio_lseek( int fd, /* off_t */ long offset, int whence, int *sig )
+{
+ unsigned int i=0;
+ fio_int_t ffd;
+ fio_long_t foffset;
+ fio_int_t fwhence;
+
+ gdbfileio_newlib_to_fio_int_t( &fd, &ffd );
+ gdbfileio_newlib_to_fio_long_t( &offset, &foffset );
+ gdbfileio_newlib_to_fio_int_t( &whence, &fwhence );
+
+ __remcomOutBuffer[i++] = 'F';
+ __remcomOutBuffer[i++] = 'l';
+ __remcomOutBuffer[i++] = 's';
+ __remcomOutBuffer[i++] = 'e';
+ __remcomOutBuffer[i++] = 'e';
+ __remcomOutBuffer[i++] = 'k';
+ __remcomOutBuffer[i++] = ',';
+ i += chars_to_hex( (char *)&ffd, &__remcomOutBuffer[i], sizeof(ffd) );
+ // i now points after the parameter
+ __remcomOutBuffer[i++] = ',';
+ i += chars_to_hex( (char *)&foffset, &__remcomOutBuffer[i],
+ sizeof(foffset) );
+ __remcomOutBuffer[i++] = ',';
+ i += chars_to_hex( (char *)&fwhence, &__remcomOutBuffer[i],
+ sizeof(fwhence) );
+ __remcomOutBuffer[i] = 0;
+
+ return gdbfileio_common_sendpkt( __remcomOutBuffer, sig );
+} // cyg_hal_gdbfileio_lseek()
+
+__externC int
+cyg_hal_gdbfileio_rename( const char *oldpath, const char *newpath, int *sig )
+{
+ unsigned int i=0;
+ size_t namelen;
+
+ __remcomOutBuffer[i++] = 'F';
+ __remcomOutBuffer[i++] = 'r';
+ __remcomOutBuffer[i++] = 'e';
+ __remcomOutBuffer[i++] = 'n';
+ __remcomOutBuffer[i++] = 'a';
+ __remcomOutBuffer[i++] = 'm';
+ __remcomOutBuffer[i++] = 'e';
+ __remcomOutBuffer[i++] = ',';
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)oldpath,
+ sizeof(oldpath)*8 );
+ // i now points after the parameter
+ __remcomOutBuffer[i++] = '/';
+ namelen = strlen( oldpath )+1; // includes '\0'
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)namelen,
+ sizeof(namelen)*8 );
+ __remcomOutBuffer[i++] = ',';
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)newpath,
+ sizeof(newpath)*8 );
+ // i now points after the parameter
+ __remcomOutBuffer[i++] = '/';
+ namelen = strlen( newpath )+1; // includes '\0'
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)namelen,
+ sizeof(namelen)*8 );
+ __remcomOutBuffer[i] = 0;
+
+ return gdbfileio_common_sendpkt( __remcomOutBuffer, sig );
+} // cyg_hal_gdbfileio_rename()
+
+__externC int
+cyg_hal_gdbfileio_unlink( const char *pathname, int *sig )
+{
+ unsigned int i=0;
+ size_t namelen;
+
+ __remcomOutBuffer[i++] = 'F';
+ __remcomOutBuffer[i++] = 'u';
+ __remcomOutBuffer[i++] = 'n';
+ __remcomOutBuffer[i++] = 'l';
+ __remcomOutBuffer[i++] = 'i';
+ __remcomOutBuffer[i++] = 'n';
+ __remcomOutBuffer[i++] = 'k';
+ __remcomOutBuffer[i++] = ',';
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)pathname,
+ sizeof(pathname)*8 );
+ // i now points after the parameter
+ __remcomOutBuffer[i++] = '/';
+ namelen = strlen( pathname )+1; // includes '\0'
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)namelen,
+ sizeof(namelen)*8 );
+ __remcomOutBuffer[i] = 0;
+
+ return gdbfileio_common_sendpkt( __remcomOutBuffer, sig );
+} // cyg_hal_gdbfileio_unlink()
+
+__externC int
+cyg_hal_gdbfileio_isatty( int fd, int *sig )
+{
+ unsigned int i=0;
+ fio_int_t ffd;
+
+ gdbfileio_newlib_to_fio_int_t( &fd, &ffd );
+
+ __remcomOutBuffer[i++] = 'F';
+ __remcomOutBuffer[i++] = 'i';
+ __remcomOutBuffer[i++] = 's';
+ __remcomOutBuffer[i++] = 'a';
+ __remcomOutBuffer[i++] = 't';
+ __remcomOutBuffer[i++] = 't';
+ __remcomOutBuffer[i++] = 'y';
+ __remcomOutBuffer[i++] = ',';
+ i += chars_to_hex( (char *)&ffd, &__remcomOutBuffer[i], sizeof(ffd) );
+ // i now points after the parameter
+ __remcomOutBuffer[i] = 0;
+
+ return gdbfileio_common_sendpkt( __remcomOutBuffer, sig );
+} // cyg_hal_gdbfileio_isatty()
+
+__externC int
+cyg_hal_gdbfileio_system( const char *command, int *sig )
+{
+ unsigned int i=0;
+ size_t namelen;
+
+ __remcomOutBuffer[i++] = 'F';
+ __remcomOutBuffer[i++] = 's';
+ __remcomOutBuffer[i++] = 'y';
+ __remcomOutBuffer[i++] = 's';
+ __remcomOutBuffer[i++] = 't';
+ __remcomOutBuffer[i++] = 'e';
+ __remcomOutBuffer[i++] = 'm';
+ __remcomOutBuffer[i++] = ',';
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)command,
+ sizeof(command)*8 );
+ // i now points after the parameter
+ __remcomOutBuffer[i++] = '/';
+ namelen = strlen( command )+1; // includes '\0'
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)namelen,
+ sizeof(namelen)*8 );
+ __remcomOutBuffer[i] = 0;
+
+ return gdbfileio_common_sendpkt( __remcomOutBuffer, sig );
+} // cyg_hal_gdbfileio_system()
+
+__externC int
+cyg_hal_gdbfileio_gettimeofday( void *tv, void *tz, int *sig )
+{
+ unsigned int i=0;
+ struct newlib_timeval *ntv = (struct newlib_timeval *)tv;
+ struct fio_timeval ftv;
+ int rc;
+
+ // protocol doesn't support non-null timezone. Just enforce it here.
+ if (NULL != tz)
+ return -FILEIO_EINVAL;
+
+ __remcomOutBuffer[i++] = 'F';
+ __remcomOutBuffer[i++] = 'g';
+ __remcomOutBuffer[i++] = 'e';
+ __remcomOutBuffer[i++] = 't';
+ __remcomOutBuffer[i++] = 't';
+ __remcomOutBuffer[i++] = 'i';
+ __remcomOutBuffer[i++] = 'm';
+ __remcomOutBuffer[i++] = 'e';
+ __remcomOutBuffer[i++] = 'o';
+ __remcomOutBuffer[i++] = 'f';
+ __remcomOutBuffer[i++] = 'd';
+ __remcomOutBuffer[i++] = 'a';
+ __remcomOutBuffer[i++] = 'y';
+ __remcomOutBuffer[i++] = ',';
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)&ftv,
+ sizeof(&ftv)*8 );
+ __remcomOutBuffer[i++] = ',';
+ __remcomOutBuffer[i++] = '0'; // tzptr
+ __remcomOutBuffer[i] = 0;
+
+ rc = gdbfileio_common_sendpkt( __remcomOutBuffer, sig );
+
+ // now ftv should have its contents filled
+ gdbfileio_fio_to_newlib_time_t( &ftv.tv_sec, &ntv->tv_sec );
+ gdbfileio_fio_to_newlib_long_t( &ftv.tv_usec, &ntv->tv_usec );
+
+ return rc;
+} // cyg_hal_gdbfileio_gettimeofday()
+
+__externC int
+cyg_hal_gdbfileio_stat( const char *pathname, struct newlib_stat *buf,
+ int *sig )
+{
+ unsigned int i=0;
+ int rc;
+ size_t namelen;
+ struct fio_stat fbuf;
+
+ __remcomOutBuffer[i++] = 'F';
+ __remcomOutBuffer[i++] = 's';
+ __remcomOutBuffer[i++] = 't';
+ __remcomOutBuffer[i++] = 'a';
+ __remcomOutBuffer[i++] = 't';
+ __remcomOutBuffer[i++] = ',';
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)pathname,
+ sizeof(pathname)*8 );
+ // i now points after the parameter
+ __remcomOutBuffer[i++] = '/';
+ namelen = strlen( pathname )+1; // includes '\0'
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)namelen,
+ sizeof(namelen)*8 );
+ __remcomOutBuffer[i++] = ',';
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)&fbuf,
+ sizeof(&fbuf)*8 );
+ __remcomOutBuffer[i] = 0;
+
+ rc = gdbfileio_common_sendpkt( __remcomOutBuffer, sig );
+
+ // now fbuf should have its contents filled
+ gdbfileio_fio_to_newlib_dev_t( &fbuf.st_dev, &buf->st_dev );
+ gdbfileio_fio_to_newlib_ino_t( &fbuf.st_ino, &buf->st_ino );
+ gdbfileio_fio_to_newlib_mode_t( &fbuf.st_mode, &buf->st_mode );
+ gdbfileio_fio_to_newlib_nlink_t( &fbuf.st_nlink, &buf->st_nlink );
+ gdbfileio_fio_to_newlib_uid_t( &fbuf.st_uid, &buf->st_uid );
+ gdbfileio_fio_to_newlib_gid_t( &fbuf.st_gid, &buf->st_gid );
+ gdbfileio_fio_to_newlib_dev_t( &fbuf.st_rdev, &buf->st_rdev );
+ gdbfileio_fio_to_newlib_off_t( &fbuf.st_size, &buf->st_size );
+ gdbfileio_fio_to_newlib_off_t( &fbuf.st_size, &buf->st_size );
+ gdbfileio_fio_to_newlib_off_t( &fbuf.st_size, &buf->st_size );
+ gdbfileio_fio_to_newlib_off_t( &fbuf.st_size, &buf->st_size );
+#if !defined(__svr4__) || defined(__PPC__) || defined(__sun__)
+ gdbfileio_fio_to_newlib_long_t( &fbuf.st_blksize, &buf->st_blksize );
+ gdbfileio_fio_to_newlib_long_t( &fbuf.st_blocks, &buf->st_blocks );
+#endif
+ gdbfileio_fio_to_newlib_time_t( &fbuf.st_atime, &buf->st_atime );
+ gdbfileio_fio_to_newlib_time_t( &fbuf.st_mtime, &buf->st_mtime );
+ gdbfileio_fio_to_newlib_time_t( &fbuf.st_ctime, &buf->st_ctime );
+
+ return rc;
+} // cyg_hal_gdbfileio_stat()
+
+__externC int
+cyg_hal_gdbfileio_fstat( int fd, struct newlib_stat *buf, int *sig )
+{
+ unsigned int i=0;
+ int rc;
+ struct fio_stat fbuf;
+
+ __remcomOutBuffer[i++] = 'F';
+ __remcomOutBuffer[i++] = 'f';
+ __remcomOutBuffer[i++] = 's';
+ __remcomOutBuffer[i++] = 't';
+ __remcomOutBuffer[i++] = 'a';
+ __remcomOutBuffer[i++] = 't';
+ __remcomOutBuffer[i++] = ',';
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)fd,
+ sizeof(fd)*8 );
+ // i now points after the parameter
+ __remcomOutBuffer[i++] = ',';
+ i += __intToHex( &__remcomOutBuffer[i], (target_register_t)&fbuf,
+ sizeof(&fbuf)*8 );
+ __remcomOutBuffer[i] = 0;
+
+ rc = gdbfileio_common_sendpkt( __remcomOutBuffer, sig );
+
+ // now fbuf should have its contents filled
+ gdbfileio_fio_to_newlib_dev_t( &fbuf.st_dev, &buf->st_dev );
+ gdbfileio_fio_to_newlib_ino_t( &fbuf.st_ino, &buf->st_ino );
+ gdbfileio_fio_to_newlib_mode_t( &fbuf.st_mode, &buf->st_mode );
+ gdbfileio_fio_to_newlib_nlink_t( &fbuf.st_nlink, &buf->st_nlink );
+ gdbfileio_fio_to_newlib_uid_t( &fbuf.st_uid, &buf->st_uid );
+ gdbfileio_fio_to_newlib_gid_t( &fbuf.st_gid, &buf->st_gid );
+ gdbfileio_fio_to_newlib_dev_t( &fbuf.st_rdev, &buf->st_rdev );
+ gdbfileio_fio_to_newlib_off_t( &fbuf.st_size, &buf->st_size );
+ gdbfileio_fio_to_newlib_off_t( &fbuf.st_size, &buf->st_size );
+ gdbfileio_fio_to_newlib_off_t( &fbuf.st_size, &buf->st_size );
+ gdbfileio_fio_to_newlib_off_t( &fbuf.st_size, &buf->st_size );
+#if !defined(__svr4__) || defined(__PPC__) || defined(__sun__)
+ gdbfileio_fio_to_newlib_long_t( &fbuf.st_blksize, &buf->st_blksize );
+ gdbfileio_fio_to_newlib_long_t( &fbuf.st_blocks, &buf->st_blocks );
+#endif
+ gdbfileio_fio_to_newlib_time_t( &fbuf.st_atime, &buf->st_atime );
+ gdbfileio_fio_to_newlib_time_t( &fbuf.st_mtime, &buf->st_mtime );
+ gdbfileio_fio_to_newlib_time_t( &fbuf.st_ctime, &buf->st_ctime );
+
+ return rc;
+} // cyg_hal_gdbfileio_fstat()
+
+/* EOF gdb-fileio.c */
diff --git a/cesar/ecos/packages/hal/common/current/src/gdb-fileio.h b/cesar/ecos/packages/hal/common/current/src/gdb-fileio.h
new file mode 100644
index 0000000000..e5d0042bdb
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/src/gdb-fileio.h
@@ -0,0 +1,139 @@
+/* gdb-fileio.h.
+ Contains definitions used inside of the File I/O facility.
+
+ Copyright 2002 Red Hat, Inc.
+
+*/
+
+#ifndef _GDB_FILEIO_H_
+#define _GDB_FILEIO_H_
+
+#include <sys/types.h>
+
+/* The following flags are defined to be independent of the host
+ as well as the target side implementation of these constants.
+ All constants are defined with a leading FILEIO_ in the name
+ to allow the usage of these constants together with the
+ corresponding implementation dependent constants in one module. */
+
+/* open(2) flags */
+#define FILEIO_O_RDONLY 0x0
+#define FILEIO_O_WRONLY 0x1
+#define FILEIO_O_RDWR 0x2
+#define FILEIO_O_APPEND 0x8
+#define FILEIO_O_CREAT 0x200
+#define FILEIO_O_TRUNC 0x400
+#define FILEIO_O_EXCL 0x800
+#define FILEIO_O_BINARY 0x10000
+#define FILEIO_O_TEXT 0x20000
+#define FILEIO_O_SUPPORTED (FILEIO_O_RDONLY | FILEIO_O_WRONLY| \
+ FILEIO_O_RDWR | FILEIO_O_APPEND| \
+ FILEIO_O_CREAT | FILEIO_O_TRUNC| \
+ FILEIO_O_EXCL | FILEIO_O_BINARY | \
+ FILEIO_O_TEXT )
+
+/* mode_t bits */
+#define FILEIO_S_IFREG 0100000
+#define FILEIO_S_IFDIR 040000
+#define FILEIO_S_IFCHR 020000
+#define FILEIO_S_IRUSR 0400
+#define FILEIO_S_IWUSR 0200
+#define FILEIO_S_IXUSR 0100
+#define FILEIO_S_IRWXU 0700
+#define FILEIO_S_IRGRP 040
+#define FILEIO_S_IWGRP 020
+#define FILEIO_S_IXGRP 010
+#define FILEIO_S_IRWXG 070
+#define FILEIO_S_IROTH 04
+#define FILEIO_S_IWOTH 02
+#define FILEIO_S_IXOTH 01
+#define FILEIO_S_IRWXO 07
+#define FILEIO_S_SUPPORTED (FILEIO_S_IFREG|FILEIO_S_IFDIR| \
+ FILEIO_S_IRWXU|FILEIO_S_IRWXG| \
+ FILEIO_S_IRWXO)
+
+/* lseek(2) flags */
+#define FILEIO_SEEK_SET 0
+#define FILEIO_SEEK_CUR 1
+#define FILEIO_SEEK_END 2
+
+/* errno values */
+#define FILEIO_EPERM 1
+#define FILEIO_ENOENT 2
+#define FILEIO_EINTR 4
+#define FILEIO_EIO 5
+#define FILEIO_EBADF 9
+#define FILEIO_EACCES 13
+#define FILEIO_EFAULT 14
+#define FILEIO_EBUSY 16
+#define FILEIO_EEXIST 17
+#define FILEIO_ENODEV 19
+#define FILEIO_ENOTDIR 20
+#define FILEIO_EISDIR 21
+#define FILEIO_EINVAL 22
+#define FILEIO_ENFILE 23
+#define FILEIO_EMFILE 24
+#define FILEIO_EFBIG 27
+#define FILEIO_ENOSPC 28
+#define FILEIO_ESPIPE 29
+#define FILEIO_EROFS 30
+#define FILEIO_ENOSYS 88
+#define FILEIO_ENAMETOOLONG 91
+#define FILEIO_EUNKNOWN 9999
+
+/* limits */
+#define FILEIO_INT_MIN -2147483648L
+#define FILEIO_INT_MAX 2147483647L
+#define FILEIO_UINT_MAX 4294967295UL
+#define FILEIO_LONG_MIN -9223372036854775808LL
+#define FILEIO_LONG_MAX 9223372036854775807LL
+#define FILEIO_ULONG_MAX 18446744073709551615ULL
+
+/* Integral types as used in protocol. */
+#if 0
+typedef __int32_t fio_int_t;
+typedef __uint32_t fio_uint_t, fio_mode_t, fio_time_t;
+typedef __int64_t fio_long_t;
+typedef __uint64_t fio_ulong_t;
+#endif
+
+#define FIO_INT_LEN 4
+#define FIO_UINT_LEN 4
+#define FIO_MODE_LEN 4
+#define FIO_TIME_LEN 4
+#define FIO_LONG_LEN 8
+#define FIO_ULONG_LEN 8
+
+typedef char fio_int_t[FIO_INT_LEN];
+typedef char fio_uint_t[FIO_UINT_LEN];
+typedef char fio_mode_t[FIO_MODE_LEN];
+typedef char fio_time_t[FIO_TIME_LEN];
+typedef char fio_long_t[FIO_LONG_LEN];
+typedef char fio_ulong_t[FIO_ULONG_LEN];
+
+/* Struct stat as used in protocol. For complete independence
+ of host/target systems, it's defined as an array with offsets
+ to the members. */
+
+struct fio_stat {
+ fio_uint_t st_dev;
+ fio_uint_t st_ino;
+ fio_mode_t st_mode;
+ fio_uint_t st_nlink;
+ fio_uint_t st_uid;
+ fio_uint_t st_gid;
+ fio_uint_t st_rdev;
+ fio_ulong_t st_size;
+ fio_ulong_t st_blksize;
+ fio_ulong_t st_blocks;
+ fio_time_t st_atime;
+ fio_time_t st_mtime;
+ fio_time_t st_ctime;
+};
+
+struct fio_timeval {
+ fio_time_t tv_sec;
+ fio_long_t tv_usec;
+};
+
+#endif /* _GDB_FILEIO_H_ */
diff --git a/cesar/ecos/packages/hal/common/current/src/generic-stub.c b/cesar/ecos/packages/hal/common/current/src/generic-stub.c
new file mode 100644
index 0000000000..e0fb8da901
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/src/generic-stub.c
@@ -0,0 +1,2057 @@
+#include "board.h"
+
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+
+/* Eventually, this should default to ON */
+#if USE_GDBSTUB_PROTOTYPES
+#include "stub-tservice.h"
+#include "generic-stub.h"
+#else
+// Function declarations (prevents compiler warnings)
+int stubhex (unsigned char ch);
+static void unlock_thread_scheduler (void);
+static uint32 crc32 (target_addr_t mem, int len, uint32 crc);
+#endif
+
+#include "thread-pkts.h"
+ /* Defines function macros if thread support is not selected in board.h */
+
+#ifdef __ECOS__
+char GDB_stubs_version[] CYGBLD_ATTRIB_WEAK =
+ "eCos GDB stubs - built " __DATE__ " / " __TIME__;
+#endif
+
+/****************************************************************************
+
+ THIS SOFTWARE IS NOT COPYRIGHTED
+
+ HP offers the following for use in the public domain. HP makes no
+ warranty with regard to the software or it's performance and the
+ user accepts the software "AS IS" with all faults.
+
+ HP DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD
+ TO THIS SOFTWARE INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+****************************************************************************/
+
+/****************************************************************************
+ * Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $
+ *
+ * Module name: remcom.c $
+ * Revision: 1.34 $
+ * Date: 91/03/09 12:29:49 $
+ * Contributor: Lake Stevens Instrument Division$
+ *
+ * Description: low level support for gdb debugger. $
+ *
+ * Considerations: only works on target hardware $
+ *
+ * Written by: Glenn Engel $
+ * ModuleState: Experimental $
+ *
+ * NOTES: See Below $
+ *
+ * Modified for SPARC by Stu Grossman, Red Hat.
+ * Modified for generic CygMON stub support by Bob Manson, Red Hat.
+ *
+ * To enable debugger support, two things need to happen. One, a
+ * call to set_debug_traps () is necessary in order to allow any breakpoints
+ * or error conditions to be properly intercepted and reported to gdb.
+ * Two, a breakpoint needs to be generated to begin communication. This
+ * is most easily accomplished by a call to breakpoint (). Breakpoint ()
+ * simulates a breakpoint by executing a trap #1.
+ *
+ *************
+ *
+ * The following gdb commands are supported:
+ *
+ * command function Return value
+ *
+ * g return the value of the CPU registers hex data or ENN
+ * G set the value of the CPU registers OK or ENN
+ *
+ * mAA..AA,LLLL Read LLLL bytes at address AA..AA hex data or ENN
+ * MAA..AA,LLLL: Write LLLL bytes at address AA.AA OK or ENN
+ *
+ * c Resume at current address SNN ( signal NN)
+ * cAA..AA Continue at address AA..AA SNN
+ *
+ * s Step one instruction SNN
+ * sAA..AA Step one instruction from AA..AA SNN
+ *
+ * k kill
+ *
+ * ? What was the last sigval ? SNN (signal NN)
+ *
+ * bBB..BB Set baud rate to BB..BB OK or BNN, then sets
+ * baud rate
+ *
+ * All commands and responses are sent with a packet which includes a
+ * checksum. A packet consists of
+ *
+ * $<packet info>#<checksum>.
+ *
+ * where
+ * <packet info> :: <characters representing the command or response>
+ * <checksum> :: < two hex digits computed as modulo 256 sum of <packetinfo>>
+ *
+ * When a packet is received, it is first acknowledged with either '+' or '-'.
+ * '+' indicates a successful transfer. '-' indicates a failed transfer.
+ *
+ * Example:
+ *
+ * Host: Reply:
+ * $m0,10#2a +$00010203040506070809101112131415#42
+ *
+ ****************************************************************************/
+
+#ifdef __ECOS__
+
+// We cannot share memcpy and memset with the rest of the system since
+// the user may want to step through it.
+static inline void*
+_memcpy(void* dest, void* src, int size)
+{
+ unsigned char* __d = (unsigned char*) dest;
+ unsigned char* __s = (unsigned char*) src;
+
+ while(size--)
+ *__d++ = *__s++;
+
+ return dest;
+}
+
+static inline void*
+_memset(void* s, int c, int size)
+{
+ unsigned char* __s = (unsigned char*) s;
+ unsigned char __c = (unsigned char) c;
+
+ while(size--)
+ *__s++ = __c;
+
+ return s;
+}
+
+#else
+#include <string.h>
+#include <signal.h>
+#define _memcpy memcpy
+#define _memset memset
+#endif // __ECOS__
+
+/************************************************************************/
+/* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/
+/* at least NUMREGBYTES*2 are needed for register packets */
+#ifdef __ECOS__
+#ifdef NUMREGBYTES
+#define BUFMAX (32 + (NUMREGBYTES*2))
+#else
+#define BUFMAX 2048
+#endif
+#else
+#define BUFMAX 2048
+#endif
+
+static int initialized = 0; /* !0 means we've been initialized */
+
+static int process_exception (int sigval);
+static void do_nothing (void); /* and do it gracefully */
+static int syscall_do_nothing (int);
+
+#ifdef CYGSEM_ECOS_SUPPORTS_PROGRAM_ARGS
+void __free_program_args (void);
+static char *__add_program_arg (int argnum, uint32 arglen);
+#endif
+
+volatile __PFI __process_exception_vec = process_exception;
+volatile __PFV __process_exit_vec = do_nothing;
+volatile __PFI __process_syscall_vec = syscall_do_nothing;
+volatile __PFI __process_signal_vec = NULL;
+volatile __PFV __init_vec = NULL;
+volatile __PFV __cleanup_vec = NULL;
+
+static const char hexchars[] = "0123456789abcdef";
+
+static void process_query (char *pkt);
+static void process_set (char *pkt);
+
+char
+__tohex (int c)
+{
+ return hexchars [c & 15];
+}
+
+#define __tohex(c) hexchars[(c) & 15]
+
+#ifndef NUMREGS_GDB
+#define NUMREGS_GDB NUMREGS
+#endif
+
+/* One pushback character. */
+int ungot_char = -1;
+
+static int
+readDebugChar (void)
+{
+ if (ungot_char > 0)
+ {
+ int result = ungot_char;
+ ungot_char = -1;
+ return result;
+ }
+ else
+ return getDebugChar ();
+}
+
+/* Convert ch from a hex digit to an int. */
+
+int
+stubhex (ch)
+ unsigned char ch;
+{
+ if (ch >= 'a' && ch <= 'f')
+ return ch-'a'+10;
+ if (ch >= '0' && ch <= '9')
+ return ch-'0';
+ if (ch >= 'A' && ch <= 'F')
+ return ch-'A'+10;
+ return -1;
+}
+
+void
+__getpacket (buffer)
+ char *buffer;
+{
+ struct gdb_packet packet;
+ int res;
+
+ packet.state = 0;
+ packet.contents = buffer;
+ packet.err = 0;
+ while ((res = __add_char_to_packet (readDebugChar () & 0xff, &packet)) != 1) {
+ if (res == -2) {
+ putDebugChar ('-'); // Tell host packet was not processed
+ // Reset for the next packet
+ packet.state = 0;
+ packet.err = 0;
+ }
+ }
+}
+
+int
+__add_char_to_packet (ch, packet)
+ unsigned int ch;
+ struct gdb_packet *packet;
+{
+ if (packet->state == 0)
+ {
+ if (ch == '$')
+ {
+ packet->state = 1;
+ packet->length = 0;
+ packet->checksum = 0;
+ packet->xmitcsum = -1;
+ }
+ return 0;
+ }
+
+ if (packet->state == 1)
+ {
+ if (packet->length == BUFMAX)
+ {
+ packet->state = 0;
+ packet->err = 1;
+ }
+ else if (ch == '#')
+ {
+ packet->contents[packet->length] = 0;
+ packet->state = 2;
+ }
+ else
+ {
+ packet->checksum += ch;
+ packet->contents[packet->length++] = ch;
+ }
+ return 0;
+ }
+
+ if (packet->state == 2)
+ {
+ packet->xmitcsum = stubhex (ch) << 4;
+ packet->state = 3;
+ return 0;
+ }
+
+ if (packet->state == 3)
+ {
+ packet->xmitcsum |= stubhex (ch);
+ if (packet->err) {
+ // Packet was too long - just tell the consumer
+ return -2;
+ }
+ if ((packet->checksum & 255) != packet->xmitcsum)
+ {
+ putDebugChar ('-'); /* failed checksum */
+ packet->state = 0;
+ return -1;
+ }
+ else
+ {
+ putDebugChar ('+'); /* successful transfer */
+ /* if a sequence char is present, reply the sequence ID */
+ if (packet->contents[2] == ':')
+ {
+ uint32 count = packet->length;
+ uint32 i;
+ putDebugChar (packet->contents[0]);
+ putDebugChar (packet->contents[1]);
+ /* remove sequence chars from buffer */
+ for (i=3; i <= count; i++)
+ packet->contents[i-3] = packet->contents[i];
+ }
+ return 1;
+ }
+ }
+ /* We should never get here. */
+ packet->state = 0;
+ return -1;
+}
+
+/* send the packet in buffer. */
+
+void
+__putpacket (buffer)
+ char *buffer;
+{
+ unsigned char checksum;
+ uint32 count;
+ unsigned char ch;
+
+ /* $<packet info>#<checksum>. */
+ do
+ {
+ putDebugChar ('$');
+ checksum = 0;
+ count = 0;
+
+ while ((ch = buffer[count]))
+ {
+ putDebugChar (ch);
+ checksum += ch;
+ count += 1;
+ }
+
+ putDebugChar ('#');
+ putDebugChar (hexchars[(checksum >> 4) & 0xf]);
+ putDebugChar (hexchars[checksum & 0xf]);
+
+ }
+ while ((readDebugChar () & 0x7f) != '+');
+}
+
+char __remcomInBuffer[BUFMAX];
+char __remcomOutBuffer[BUFMAX];
+
+/* Indicate to caller of mem2hex or hex2mem that there has been an
+ error. */
+volatile int __mem_fault = 0;
+
+
+#ifndef TARGET_HAS_OWN_MEM_FUNCS
+/*
+ * _target_readmem_hook / _target_writemem_hook:
+ * Allow target to get involved in reading/writing memory.
+ *
+ * If these hooks are defined by the target, they will be
+ * called for each user program memory access. Otherwise, the stub
+ * will simply dereference a pointer to access user program memory.
+ */
+
+unsigned char (*_target_readmem_hook) (unsigned char* addr);
+void (*_target_writemem_hook) (unsigned char* addr,
+ unsigned char value);
+
+static unsigned char
+get_target_byte (volatile unsigned char *address)
+{
+ if (_target_readmem_hook) /* target needs to control memory access */
+ return _target_readmem_hook ((unsigned char *) address);
+ else
+ return *address;
+}
+
+static void
+put_target_byte (volatile unsigned char *address, unsigned char value)
+{
+ if (_target_writemem_hook) /* target needs to control memory access */
+ _target_writemem_hook ((unsigned char *) address, value);
+ else
+ *address = value;
+}
+
+/* These are the "arguments" to __do_read_mem and __do_write_mem,
+ which are passed as globals to avoid squeezing them thru
+ __set_mem_fault_trap. */
+
+static volatile target_register_t memCount;
+static volatile unsigned char *memSrc, *memDst;
+
+/*
+ * __do_read_mem:
+ * Copy from target memory to trusted memory.
+ */
+
+static void
+__do_read_mem (void)
+{
+ __mem_fault = 0;
+ while (memCount)
+ {
+ unsigned char ch = get_target_byte (memSrc++);
+
+ if (__mem_fault)
+ return;
+ *memDst++ = ch;
+ memCount--;
+ }
+}
+
+/*
+ * __do_write_mem:
+ * Copy from trusted memory to target memory.
+ */
+
+static void
+__do_write_mem (void)
+{
+ __mem_fault = 0;
+ while (memCount)
+ {
+ unsigned char ch = *memSrc++;
+
+ put_target_byte (memDst++, ch);
+ if (__mem_fault)
+ return;
+ memCount--;
+ }
+}
+
+/*
+ * __read_mem_safe:
+ * Get contents of target memory, abort on error.
+ */
+
+int
+__read_mem_safe (void *dst, target_register_t src, int count)
+{
+ memCount = count;
+ memSrc = (unsigned char *) src;
+ memDst = (unsigned char *) dst;
+ __set_mem_fault_trap (__do_read_mem);
+ return count - memCount; /* return number of bytes successfully read */
+}
+
+/*
+ * __write_mem_safe:
+ * Set contents of target memory, abort on error.
+ */
+
+int
+__write_mem_safe (unsigned char *src, target_register_t dst, int count)
+{
+ memCount = count;
+ memSrc = (unsigned char *) src;
+ memDst = (unsigned char *) dst;
+ __set_mem_fault_trap (__do_write_mem);
+ return count - memCount; /* return number of bytes successfully read */
+}
+
+#endif /* TARGET_HAS_OWN_MEM_FUNCS */
+
+/* These are the "arguments" to __mem2hex_helper and __hex2mem_helper,
+ which are passed as globals to avoid squeezing them thru
+ __set_mem_fault_trap. */
+
+static int hexMemCount;
+static char *hexMemSrc, *hexMemDst;
+static int may_fault_mode;
+#ifdef TARGET_HAS_HARVARD_MEMORY
+static int progMem;
+#endif
+
+/* Hamburger helper? */
+static void
+__mem2hex_helper (void)
+{
+ union {
+ unsigned long long_val;
+ unsigned char bytes[sizeof(long)];
+ } val;
+ int len, i;
+ unsigned char ch;
+ __mem_fault = 0;
+ while (hexMemCount > 0) {
+ if (may_fault_mode) {
+ if ((hexMemCount >= sizeof(long)) &&
+ (((target_register_t)hexMemSrc & (sizeof(long)-1)) == 0)) {
+ // Should be safe to access via a long
+ len = sizeof(long);
+ } else if ((hexMemCount >= sizeof(short)) &&
+ (((target_register_t)hexMemSrc & (sizeof(short)-1)) == 0)) {
+ // Should be safe to access via a short
+ len = sizeof(short);
+ } else {
+ len = 1;
+ }
+#ifdef TARGET_HAS_HARVARD_MEMORY
+ if (progMem)
+ __read_progmem_safe(&val.bytes[0], hexMemSrc, len);
+ else
+#endif
+ __read_mem_safe(&val.bytes[0], hexMemSrc, len);
+ } else {
+ len = 1;
+ val.bytes[0] = *hexMemSrc;
+ }
+ if (__mem_fault)
+ return;
+
+ for (i = 0; i < len; i++) {
+ ch = val.bytes[i];
+ *(hexMemDst++) = hexchars[(ch >> 4) & 0xf];
+ if (__mem_fault)
+ return;
+ *(hexMemDst++) = hexchars[ch & 0xf];
+ if (__mem_fault)
+ return;
+ }
+ hexMemCount -= len;
+ hexMemSrc += len;
+ }
+}
+
+/* Convert the memory pointed to by MEM into HEX, placing result in BUF.
+ * Return a pointer to the last char put in buf (NUL). In case of a memory
+ * fault, return 0.
+ * If MAY_FAULT is non-zero, then we will handle memory faults by returning
+ * a 0 (and assume that MEM is a pointer into the user program), else we
+ * treat a fault like any other fault in the stub (and assume that MEM is
+ * a pointer into the stub's memory).
+ */
+
+char *
+__mem2hex (mem, buf, count, may_fault)
+ char *mem;
+ char *buf;
+ int count;
+ int may_fault;
+{
+ hexMemDst = (unsigned char *) buf;
+ hexMemSrc = (unsigned char *) mem;
+ hexMemCount = count;
+ may_fault_mode = may_fault;
+#ifdef TARGET_HAS_HARVARD_MEMORY
+ progMem = 0;
+#endif
+
+ if (may_fault)
+ {
+ if (__set_mem_fault_trap (__mem2hex_helper))
+ return 0;
+ }
+ else
+ __mem2hex_helper ();
+
+ *hexMemDst = 0;
+
+ return (char *) hexMemDst;
+}
+
+/* Convert the target memory identified by MEM into HEX, placing result in BUF.
+ * Return a pointer to the last char put in buf (NUL). In case of a memory
+ * fault, return 0.
+ */
+
+static char *
+__mem2hex_safe (target_addr_t mem, char *buf, int count)
+{
+ hexMemDst = (unsigned char *) buf;
+ hexMemSrc = (unsigned char *) TARGET_ADDR_TO_PTR(mem);
+ hexMemCount = count;
+ may_fault_mode = 1;
+#ifdef TARGET_HAS_HARVARD_MEMORY
+ progMem = TARGET_ADDR_IS_PROGMEM(mem);
+#endif
+
+ if (__set_mem_fault_trap (__mem2hex_helper))
+ return 0;
+
+ *hexMemDst = 0;
+
+ return (char *) hexMemDst;
+}
+
+
+
+static void
+__hex2mem_helper (void)
+{
+ union {
+ unsigned long long_val;
+ unsigned char bytes[sizeof(long)];
+ } val;
+ int len, i;
+ unsigned char ch = '\0';
+
+ __mem_fault = 0;
+ while (hexMemCount > 0 && *hexMemSrc) {
+ if (may_fault_mode) {
+ if ((hexMemCount >= sizeof(long)) &&
+ (((target_register_t)hexMemDst & (sizeof(long)-1)) == 0)) {
+ len = sizeof(long);
+ } else if ((hexMemCount >= sizeof(short)) &&
+ (((target_register_t)hexMemDst & (sizeof(short)-1)) == 0)) {
+ len = sizeof(short);
+ } else {
+ len = 1;
+ }
+ } else {
+ len = 1;
+ }
+
+ for (i = 0; i < len; i++) {
+ // Check for short data?
+ ch = stubhex (*(hexMemSrc++)) << 4;
+ if (__mem_fault)
+ return;
+ ch |= stubhex (*(hexMemSrc++));
+ if (__mem_fault)
+ return;
+ val.bytes[i] = ch;
+ }
+
+ if (may_fault_mode) {
+#ifdef TARGET_HAS_HARVARD_MEMORY
+ if (progMem)
+ __write_progmem_safe (&val.bytes[0], hexMemDst, len);
+ else
+#endif
+ __write_mem_safe (&val.bytes[0], hexMemDst, len);
+ } else
+ *hexMemDst = ch;
+
+ if (__mem_fault)
+ return;
+ hexMemCount -= len;
+ hexMemDst += len;
+ }
+}
+
+/* Convert COUNT bytes of the hex array pointed to by BUF into binary
+ to be placed in MEM. Return a pointer to the character AFTER the
+ last byte written.
+
+ If MAY_FAULT is set, we will return a non-zero value if a memory
+ fault occurs (and we assume that MEM is a pointer into the user
+ program). Otherwise, we will take a trap just like any other memory
+ fault (and assume that MEM points into the stub's memory). */
+
+char *
+__hex2mem (buf, mem, count, may_fault)
+ char *buf;
+ char *mem;
+ int count;
+ int may_fault;
+{
+ hexMemSrc = (unsigned char *) buf;
+ hexMemDst = (unsigned char *) mem;
+ hexMemCount = count;
+ may_fault_mode = may_fault;
+#ifdef TARGET_HAS_HARVARD_MEMORY
+ progMem = 0;
+#endif
+
+ if (may_fault)
+ {
+ if (__set_mem_fault_trap (__hex2mem_helper))
+ return 0;
+ }
+ else
+ __hex2mem_helper ();
+
+ return (char *) hexMemDst;
+}
+
+/* Convert COUNT bytes of the hex array pointed to by BUF into binary
+ to be placed in target MEM. Return a pointer to the character AFTER
+ the last byte written.
+*/
+char *
+__hex2mem_safe (char *buf, target_addr_t mem, int count)
+{
+ hexMemSrc = (unsigned char *) buf;
+ hexMemDst = (unsigned char *) TARGET_ADDR_TO_PTR(mem);
+ hexMemCount = count;
+ may_fault_mode = 1;
+#ifdef TARGET_HAS_HARVARD_MEMORY
+ progMem = TARGET_ADDR_IS_PROGMEM(mem);
+#endif
+
+ if (__set_mem_fault_trap (__hex2mem_helper))
+ return 0;
+
+ return (char *) hexMemDst;
+}
+
+
+void
+set_debug_traps (void)
+{
+ __install_traps ();
+ initialized = 1; /* FIXME: Change this to dbg_stub_initialized */
+}
+
+/*
+ * While we find nice hex chars, build an int.
+ * Return number of chars processed.
+ */
+
+unsigned int
+__hexToInt (char **ptr, target_register_t *intValue)
+{
+ int numChars = 0;
+ int hexValue;
+
+ *intValue = 0;
+
+ while (**ptr)
+ {
+ hexValue = stubhex (**ptr);
+ if (hexValue < 0)
+ break;
+
+ *intValue = (*intValue << 4) | hexValue;
+ numChars ++;
+
+ (*ptr)++;
+ }
+
+ return (numChars);
+}
+
+/*
+ * While we find nice hex chars, build a target memory address.
+ * Return number of chars processed.
+ */
+
+unsigned int
+__hexToAddr (char **ptr, target_addr_t *val)
+{
+ int numChars = 0;
+ int hexValue;
+
+ *val = 0;
+
+ while (**ptr)
+ {
+ hexValue = stubhex (**ptr);
+ if (hexValue < 0)
+ break;
+
+ *val = (*val << 4) | hexValue;
+ numChars ++;
+
+ (*ptr)++;
+ }
+
+ return (numChars);
+}
+
+
+/*
+ * Complement of __hexToInt: take an int of size "numBits",
+ * convert it to a hex string. Return length of (unterminated) output.
+ */
+
+unsigned int
+__intToHex (char *ptr, target_register_t intValue, int numBits)
+{
+ int numChars = 0;
+
+ if (intValue == 0)
+ {
+ *(ptr++) = '0';
+ *(ptr++) = '0';
+ return 2;
+ }
+
+ numBits = (numBits + 7) / 8;
+ while (numBits)
+ {
+ int v = (intValue >> ((numBits - 1) * 8));
+ if (v || (numBits == 1))
+ {
+ v = v & 255;
+ *(ptr++) = __tohex ((v / 16) & 15);
+ *(ptr++) = __tohex (v & 15);
+ numChars += 2;
+ }
+ numBits--;
+ }
+
+ return (numChars);
+}
+
+#if DEBUG_THREADS
+/*
+ * Kernel Thread Control
+ *
+ * If the current thread is set to other than zero (or minus one),
+ * then ask the kernel to lock it's scheduler so that only that thread
+ * can run.
+ */
+
+static unsigned char did_lock_scheduler = 0;
+static unsigned char did_disable_interrupts = 0;
+
+/* Pointer to "kernel call" for scheduler control */
+static int (*schedlock_fn) (int, int, long) = stub_lock_scheduler;
+
+/* Pointer to target stub call for disabling interrupts.
+ Target stub will initialize this if it can. */
+int (*__disable_interrupts_hook) (int); /* don't initialize here! */
+#endif
+
+static void
+lock_thread_scheduler (int kind) /* "step" or "continue" */
+{
+#if DEBUG_THREADS
+ int ret = 0;
+
+ /* GDB will signal its desire to run a single thread
+ by setting _gdb_cont_thread to non-zero / non-negative. */
+ if (_gdb_cont_thread <= 0)
+ return;
+
+ if (schedlock_fn) /* kernel call */
+ ret = (*schedlock_fn) (1, kind, _gdb_cont_thread);
+
+ if (ret == 1)
+ {
+ did_lock_scheduler = 1;
+ return;
+ }
+
+ if (schedlock_fn == 0 || /* no kernel scheduler call */
+ ret == -1) /* kernel asks stub to handle it */
+ if (__disable_interrupts_hook) /* target stub has capability */
+ if ((*__disable_interrupts_hook) (1))
+ {
+ did_disable_interrupts = 1;
+ return;
+ }
+#endif /* DEBUG_THREADS */
+}
+
+static void
+unlock_thread_scheduler ()
+{
+#if DEBUG_THREADS
+ if (did_lock_scheduler)
+ if (schedlock_fn) /* kernel call */
+ {
+ (*schedlock_fn) (0, 0, _gdb_cont_thread);
+ /* I could check the return value, but
+ what would I do if it failed??? */
+ did_lock_scheduler = 0;
+ }
+ if (did_disable_interrupts)
+ if (__disable_interrupts_hook) /* target stub call */
+ {
+ (*__disable_interrupts_hook) (0);
+ /* Again, I could check the return value, but
+ what would I do if it failed??? */
+ did_disable_interrupts = 0;
+ }
+#endif /* DEBUG_THREADS */
+}
+
+#ifdef CYGPKG_CYGMON
+int processing_breakpoint_function = 0;
+#endif
+
+void
+__handle_exception (void)
+{
+ int sigval = 0;
+
+#ifdef TARGET_HAS_NEXT_STEP
+ if (! __next_step_done ())
+ {
+ __clear_breakpoints ();
+ __install_breakpoints ();
+ __single_step ();
+ return;
+ }
+#endif
+
+#ifdef __ECOS__
+ // We need to unpack the registers before they are accessed.
+ if (__cleanup_vec != NULL)
+ __cleanup_vec ();
+
+#if defined(CYGSEM_REDBOOT_BSP_SYSCALLS)
+ // Temporary support for gnupro bsp SWIs
+ if (__is_bsp_syscall())
+ {
+ sigval = hal_syscall_handler();
+ if (sigval <= 0)
+ {
+ if (sigval < 0)
+ __process_exit_vec ();
+
+ if (__init_vec != NULL)
+ __init_vec ();
+ return;
+ }
+ }
+#endif
+
+#ifdef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
+ // Special case for GDB BREAKs. This flag is set by cyg_stub_cleanup.
+ if (cyg_hal_gdb_break) {
+ cyg_hal_gdb_break = 0;
+ sigval = SIGINT;
+ }
+#endif
+
+ // Only compute sigval if it wasn't already computed (in
+ // hal_syscall_handler or as a result of a GDB async break)
+ if (0 == sigval)
+ sigval = __computeSignal (__get_trap_number ());
+
+#else // __ECOS__
+ /* reply to host that an exception has occurred */
+ sigval = __computeSignal (__get_trap_number ());
+#endif // __ECOS__
+
+ if (__is_breakpoint_function ())
+ {
+#ifdef CYGPKG_CYGMON
+ processing_breakpoint_function = 1;
+#endif
+ __skipinst ();
+ } else {
+#ifdef CYGPKG_CYGMON
+ processing_breakpoint_function = 0;
+#endif
+ }
+
+#ifndef __ECOS__
+ if (__cleanup_vec != NULL)
+ __cleanup_vec ();
+#endif // !__ECOS__
+
+ __clear_breakpoints ();
+
+ /* Undo effect of previous single step. */
+ unlock_thread_scheduler ();
+ __clear_single_step ();
+
+#ifdef __ECOS__
+ /* Need to flush the data and instruction cache here, as we may have
+ removed a breakpoint in __single_step - and we may be sharing
+ some code with the application! */
+
+ __data_cache (CACHE_FLUSH) ;
+ __instruction_cache (CACHE_FLUSH) ;
+#endif
+
+#ifdef SIGSYSCALL
+ if (sigval == SIGSYSCALL)
+ {
+ int val;
+ /* Do the skipinst FIRST. */
+#ifndef SYSCALL_PC_AFTER_INST
+ __skipinst ();
+#endif
+ val = __process_syscall_vec (__get_syscall_num ());
+ if (val < 0)
+ sigval = -val;
+ else
+ sigval = 0;
+ }
+
+#endif
+
+ /* Indirect function call to stub, cygmon monitor or other */
+ if (sigval != 0)
+ {
+ while (__process_exception_vec (sigval))
+ {
+ /* Empty! */
+ }
+ }
+
+ __install_breakpoints ();
+
+ if (__init_vec != NULL)
+ __init_vec ();
+}
+
+/*
+ * _get_trace_register_hook:
+ * This function pointer will be non-zero if the trace component
+ * wants to intercept requests for register values.
+ *
+ * FIXME: evidently I need a new hook for large registers...
+ */
+
+int (*_get_trace_register_hook) (regnames_t, target_register_t *);
+
+void
+stub_format_registers(char *packet, char *ptr)
+{
+ int regnum;
+ int sr = 0, er = NUMREGS_GDB;
+
+ if (packet[0] == 'p')
+ {
+ target_register_t regno;
+ char *p = &packet[1];
+ if (__hexToInt (&p, &regno))
+ {
+ sr = regno;
+ er = regno + 1;
+ }
+ else
+ {
+ strcpy (ptr, "INVALID");
+ return;
+ }
+ }
+
+ for (regnum = sr; regnum < er; regnum++)
+ {
+ /* We need to compensate for the value offset within the
+ register. */
+ char dummyDat[32];
+ target_register_t addr;
+ char *vptr;
+ int reg_valid = 1;
+
+#ifdef TARGET_HAS_LARGE_REGISTERS
+ if (sizeof (target_register_t) < REGSIZE (regnum)) {
+ get_register_as_bytes (regnum, dummyDat);
+ vptr = dummyDat;
+ } else
+#endif
+ {
+ if (_get_trace_register_hook)
+ reg_valid = _get_trace_register_hook (regnum, &addr);
+ else
+ {
+ addr = get_register (regnum);
+#ifdef CYGHWR_REGISTER_VALIDITY_CHECKING
+ reg_valid = get_register_valid (regnum);
+#endif
+ }
+ vptr = ((char *) &addr);
+ if (sizeof (addr) > REGSIZE(regnum)) {
+ /* May need to cope with endian-ness */
+
+#if !defined(__LITTLE_ENDIAN__) && !defined(_LITTLE_ENDIAN)
+ vptr += sizeof (addr) - REGSIZE (regnum);
+#endif
+ } else if (sizeof (addr) < REGSIZE (regnum)) {
+ int off = REGSIZE (regnum) - sizeof (addr);
+ int x;
+ char extend_val = 0;
+
+#ifdef CYGARC_SIGN_EXTEND_REGISTERS
+ {
+ unsigned long bits_in_addr = (sizeof(addr) << 3); // ie Size in bytes * 8
+ target_register_t sign_bit_mask = (1 << (bits_in_addr - 1));
+ if ((addr & sign_bit_mask) == sign_bit_mask)
+ extend_val = ~0;
+ }
+#endif
+
+#if defined(__LITTLE_ENDIAN__) || defined(_LITTLE_ENDIAN)
+ for (x = 0; x < off; x++)
+ dummyDat[x + sizeof(addr)] = extend_val;
+ _memcpy (dummyDat, &addr, sizeof (addr));
+#else
+ for (x = 0; x < off; x++)
+ dummyDat[x] = extend_val;
+ _memcpy (dummyDat + off, &addr, sizeof (addr));
+#endif
+ vptr = dummyDat;
+ }
+ }
+ if (reg_valid) { /* we have a valid reg value */
+ ptr = __mem2hex (vptr, ptr, REGSIZE (regnum), 0);
+ } else {
+ /* Trace component returned a failure code.
+ This means that the register value is not available.
+ We'll fill it with 'x's, and GDB will understand. */
+ _memset (ptr, 'x', 2 * REGSIZE (regnum));
+ ptr += 2 * REGSIZE (regnum);
+ }
+ }
+}
+
+void
+stub_update_registers(char *in_ptr, char *out_ptr)
+{
+ char *ptr = &in_ptr[1];
+ int x;
+ int sr = 0, er = NUMREGS_GDB;
+
+ if (*in_ptr == 'P') {
+ target_register_t regno;
+
+ if (__hexToInt (&ptr, &regno) && (*ptr++ == '=')) {
+
+ sr = regno;
+ er = regno + 1;
+ } else {
+ strcpy (out_ptr, "P01");
+ return;
+ }
+ }
+
+ for (x = sr; x < er; x++) {
+ target_register_t value = 0;
+ char *vptr;
+
+#ifdef TARGET_HAS_LARGE_REGISTERS
+ if (sizeof (target_register_t) < REGSIZE (x)) {
+ char dummyDat [32];
+
+ __hex2mem (ptr, dummyDat, REGSIZE (x), 0);
+ put_register_as_bytes (x, dummyDat);
+ } else
+#endif
+ {
+ vptr = ((char *) &value);
+#if !defined(__LITTLE_ENDIAN__) && !defined(_LITTLE_ENDIAN)
+ vptr += sizeof (value) - REGSIZE (x);
+#endif
+ __hex2mem (ptr, vptr, REGSIZE (x), 0);
+ put_register (x, value);
+ }
+ ptr += REGSIZE (x) * 2;
+ }
+
+ strcpy (out_ptr, "OK");
+}
+
+int
+__process_packet (char *packet)
+{
+ int is_binary = 0;
+#if defined(CYGNUM_HAL_BREAKPOINT_LIST_SIZE)
+ int is_Z = 0;
+#endif
+
+ __remcomOutBuffer[0] = 0;
+ switch (packet[0])
+ {
+ case '?':
+ {
+ int sigval = __computeSignal (__get_trap_number ());
+ __remcomOutBuffer[0] = 'S';
+ __remcomOutBuffer[1] = hexchars[(sigval >> 4) & 0xf];
+ __remcomOutBuffer[2] = hexchars[sigval & 0xf];
+ __remcomOutBuffer[3] = 0;
+ break;
+ }
+
+#ifdef __ECOS__
+#if !defined(CYG_HAL_STARTUP_RAM) // Only for ROM based stubs
+#if 0 // Disable to avoid conflict with stub-breakpoint z/Z-packets
+ case 'z':
+ /* report IO buffer sizes so download can achieve optimal
+ download speed */
+ {
+ int i;
+ i = __intToHex (__remcomOutBuffer, BUFMAX, 32);
+ __remcomOutBuffer[i] = 0;
+ break;
+ }
+#endif
+ case 'd':
+ /* toggle debug flag */
+ strcpy(__remcomOutBuffer, GDB_stubs_version);
+ break;
+#endif
+#endif // __ECOS__
+
+ case 'q':
+ /* general query packet */
+ process_query (&packet[1]);
+ break;
+
+ case 'Q':
+ /* general set packet */
+ process_set (&packet[1]);
+ break;
+
+ case 'p': /* return the value of a single CPU register */
+ case 'g': /* return the value of the CPU registers */
+ {
+ stub_format_registers(&packet[0], __remcomOutBuffer);
+ break;
+ }
+
+ case 'A': /* set program arguments */
+ {
+#ifdef CYGSEM_ECOS_SUPPORTS_PROGRAM_ARGS
+ if (packet[1] == '\0')
+ {
+ __free_program_args ();
+ strcpy (__remcomOutBuffer, "OK");
+ }
+ else
+ {
+ target_register_t arglen, argnum;
+ char *ptr = &packet[1];
+
+ while (1)
+ {
+ if (__hexToInt (&ptr, &arglen)
+ && (*ptr++ == ',')
+ && __hexToInt (&ptr, &argnum)
+ && (*ptr++ == ','))
+ {
+ if (arglen > 0)
+ {
+ char *s = __add_program_arg (argnum, arglen);
+ if (s != NULL)
+ {
+ __hex2mem (ptr, s, arglen, 0);
+ }
+ ptr += arglen * 2;
+ }
+
+ if (*ptr == ',')
+ ptr++;
+ else
+ break;
+ }
+ else
+ break;
+ }
+ if (*ptr == '\0')
+ strcpy (__remcomOutBuffer, "OK");
+ else
+ strcpy (__remcomOutBuffer, "E01");
+ }
+#else
+ strcpy (__remcomOutBuffer, "E01");
+#endif
+ }
+ break;
+
+ case 'P':
+ case 'G': /* set the value of the CPU registers - return OK */
+ {
+ char *in_ptr = &packet[0];
+ char *out_ptr = __remcomOutBuffer;
+ stub_update_registers(in_ptr, out_ptr);
+ break;
+ }
+
+ case 'm': /* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
+ /* Try to read %x,%x. */
+ {
+ target_register_t length;
+ char *ptr = &packet[1];
+ target_addr_t addr;
+
+ if (__hexToAddr (&ptr, &addr)
+ && *ptr++ == ','
+ && __hexToInt (&ptr, &length))
+ {
+ if (__mem2hex_safe (addr, __remcomOutBuffer, length))
+ break;
+
+ strcpy (__remcomOutBuffer, "E03");
+ }
+ else
+ strcpy (__remcomOutBuffer, "E01");
+ break;
+ }
+
+ case 'X':
+ /* XAA..AA,LLLL: Write LLLL escaped binary bytes at address AA.AA */
+ is_binary = 1;
+ /* fall through */
+ case 'M': /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
+ /* Try to read '%x,%x:'. */
+ {
+ target_register_t length;
+ char *ptr = &packet[1], buf[128];
+ int i;
+ target_addr_t addr;
+
+ if (__hexToAddr (&ptr, &addr)
+ && *ptr++ == ','
+ && __hexToInt (&ptr, &length)
+ && *ptr++ == ':')
+ {
+ /* GDB sometimes sends an impossible length */
+ if (length < 0 || length >= BUFMAX)
+ strcpy (__remcomOutBuffer, "E01");
+
+ else if (is_binary)
+ {
+ while (length > 0)
+ {
+ for (i = 0; i < sizeof(buf) && i < length; i++)
+ if ((buf[i] = *ptr++) == 0x7d)
+ buf[i] = 0x20 | (*ptr++ & 0xff);
+
+#ifdef TARGET_HAS_HARVARD_MEMORY
+ if (TARGET_ADDR_IS_PROGMEM(addr)) {
+ if (__write_progmem_safe (buf, (void *)TARGET_ADDR_TO_PTR(addr), i) != i)
+ break;
+ } else
+#endif
+ if (__write_mem_safe (buf, (void *)TARGET_ADDR_TO_PTR(addr), i) != i)
+ break;
+
+
+ length -= i;
+ addr += i;
+ }
+ if (length <= 0)
+ strcpy (__remcomOutBuffer, "OK");
+ else
+ strcpy (__remcomOutBuffer, "E03");
+ }
+ else
+ {
+ if (__hex2mem_safe (ptr, addr, length) != NULL)
+ strcpy (__remcomOutBuffer, "OK");
+ else
+ strcpy (__remcomOutBuffer, "E03");
+ }
+ }
+ else
+ strcpy (__remcomOutBuffer, "E02");
+ break;
+ }
+
+ case 'S':
+ case 's': /* sAA..AA Step from address AA..AA (optional) */
+ case 'C':
+ case 'c': /* cAA..AA Continue at address AA..AA (optional) */
+ /* try to read optional parameter, pc unchanged if no parm */
+
+ {
+ char *ptr = &packet[1];
+ target_addr_t addr;
+ target_register_t sigval = 0;
+
+ if (packet[0] == 'C' || packet[0] == 'S')
+ {
+ __hexToInt (&ptr, &sigval);
+ if (*ptr == ';')
+ ptr++;
+ }
+
+ if (__hexToAddr (&ptr, &addr))
+ set_pc ((target_register_t)TARGET_ADDR_TO_PTR(addr));
+
+ /* Need to flush the instruction cache here, as we may have
+ deposited a breakpoint, and the icache probably has no way of
+ knowing that a data ref to some location may have changed
+ something that is in the instruction cache. */
+
+#ifdef __ECOS__
+ __data_cache (CACHE_FLUSH) ;
+#endif
+ __instruction_cache (CACHE_FLUSH) ;
+
+ /* If we have a function to handle signals, call it. */
+ if (sigval != 0 && __process_signal_vec != NULL)
+ {
+ /* If 0 is returned, we either ignored the signal or invoked a user
+ handler. Otherwise, the user program should die. */
+ if (! __process_signal_vec (sigval))
+ sigval = 0;
+ }
+
+ if (sigval != 0)
+ {
+ sigval = SIGKILL; /* Always nuke the program */
+ __kill_program (sigval);
+ return 0;
+ }
+
+#ifdef __ECOS__
+ // CASE 102327 - watchpoints fight with output, so do not step
+ // through $O packet output routines.
+#ifdef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
+ if ( cyg_hal_gdb_break_is_set() ) {
+ packet[0] = 'c'; // Force it to be a "continue" instead of step.
+ cyg_hal_gdb_running_step = 1; // And tell the hal_stub...
+ }
+#endif
+#endif
+
+ /* Set machine state to force a single step. */
+ if (packet[0] == 's' || packet[0] == 'S')
+ {
+ lock_thread_scheduler (0); /* 0 == single-step */
+#ifdef __ECOS__
+ // PR 19845 workaround:
+ // Make sure the single-step magic affects the correct registers.
+ _registers = &registers[0];
+#endif
+ __single_step ();
+ }
+ else
+ {
+ lock_thread_scheduler (1); /* 1 == continue */
+ }
+
+#ifdef __ECOS__
+ /* Need to flush the data and instruction cache here, as we may have
+ deposited a breakpoint in __single_step. */
+
+ __data_cache (CACHE_FLUSH) ;
+ __instruction_cache (CACHE_FLUSH) ;
+ hal_flush_output();
+#endif
+
+ return -1;
+ }
+
+ case 'D' : /* detach */
+ __putpacket (__remcomOutBuffer);
+ /* fall through */
+ case 'k' : /* kill the program */
+#ifdef __ECOS__
+ hal_flush_output();
+#endif
+ __process_exit_vec ();
+ return -1;
+
+ case 'r': /* Reset */
+ /* With the next 'k' packet, reset the board */
+ __process_exit_vec = &__reset;
+ break;
+
+ case 'H':
+ STUB_PKT_CHANGETHREAD (packet+1, __remcomOutBuffer, 300) ;
+ break ;
+ case 'T' :
+ STUB_PKT_THREAD_ALIVE (packet+1, __remcomOutBuffer, 300) ;
+ break ;
+ case 'B':
+ /* breakpoint */
+ {
+ target_register_t addr;
+ char mode;
+ char *ptr = &packet[1];
+ if (__hexToInt (&ptr, &addr) && *(ptr++) == ',')
+ {
+ mode = *(ptr++);
+ if (mode == 'C')
+ __remove_breakpoint (addr,0);
+ else
+ __set_breakpoint (addr,0);
+ strcpy (__remcomOutBuffer, "OK");
+ }
+ else
+ {
+ strcpy (__remcomOutBuffer, "E01");
+ }
+ break;
+ }
+
+ case 'b': /* bBB... Set baud rate to BB... */
+ {
+ target_register_t baudrate;
+
+ char *ptr = &packet[1];
+ if (!__hexToInt (&ptr, &baudrate))
+ {
+ strcpy (__remcomOutBuffer, "B01");
+ break;
+ }
+
+ __putpacket ("OK"); /* Ack before changing speed */
+ __set_baud_rate (baudrate);
+ break;
+ }
+
+#if defined(CYGNUM_HAL_BREAKPOINT_LIST_SIZE) && (CYGNUM_HAL_BREAKPOINT_LIST_SIZE > 0)
+ case 'Z':
+ is_Z = 1;
+ case 'z':
+ {
+ char *ptr = &packet[1];
+ target_register_t ztype, addr, length;
+ int err;
+ target_addr_t taddr;
+
+ if (__hexToInt (&ptr, &ztype) && *(ptr++) == ',')
+ {
+ if (__hexToAddr (&ptr, &taddr))
+ {
+ if (*(ptr++) == ',')
+ {
+ /* When there is a comma, there must be a length */
+ if (!__hexToInt (&ptr, &length))
+ {
+ strcpy (__remcomOutBuffer, "E02");
+ break;
+ }
+ }
+ else
+ length = 0;
+
+ addr = (target_register_t)TARGET_ADDR_TO_PTR(taddr);
+
+ switch (ztype)
+ {
+ case ZTYPE_SW_BREAKPOINT:
+ /* sw breakpoint */
+ if (is_Z)
+ err = __set_breakpoint(addr,length);
+ else
+ err = __remove_breakpoint(addr,length);
+ if (!err)
+ strcpy (__remcomOutBuffer, "OK");
+ else
+ strcpy (__remcomOutBuffer, "E02");
+ break;
+ case ZTYPE_HW_BREAKPOINT:
+#if defined(HAL_STUB_HW_BREAKPOINT_LIST_SIZE) && (HAL_STUB_HW_BREAKPOINT_LIST_SIZE > 0)
+ if (is_Z)
+ err = __set_hw_breakpoint(addr, length);
+ else
+ err = __remove_hw_breakpoint(addr, length);
+ if (!err)
+ strcpy (__remcomOutBuffer, "OK");
+ else
+#endif
+ strcpy (__remcomOutBuffer, "E02");
+ break;
+ case ZTYPE_HW_WATCHPOINT_WRITE:
+ case ZTYPE_HW_WATCHPOINT_READ:
+ case ZTYPE_HW_WATCHPOINT_ACCESS:
+#if defined(HAL_STUB_HW_WATCHPOINT_LIST_SIZE) && (HAL_STUB_HW_WATCHPOINT_LIST_SIZE > 0)
+ if (is_Z)
+ err = __set_hw_watchpoint(addr, length, ztype);
+ else
+ err = __remove_hw_watchpoint(addr, length, ztype);
+ if (!err)
+ strcpy (__remcomOutBuffer, "OK");
+ else
+#endif
+ strcpy (__remcomOutBuffer, "E02");
+ break;
+ }
+ }
+ }
+ break;
+ }
+#endif // Z packet support
+#ifdef CYGPKG_HAL_GDB_FILEIO // File I/O over the GDB remote protocol
+ case 'F':
+ {
+ extern void cyg_hal_gdbfileio_process_F_packet( char *, char *);
+ cyg_hal_gdbfileio_process_F_packet( packet, __remcomOutBuffer );
+ return -1;
+ }
+#endif
+ default:
+ __process_target_packet (packet, __remcomOutBuffer, 300);
+ break;
+ }
+
+ /* reply to the request */
+ __putpacket (__remcomOutBuffer);
+ return 0;
+}
+
+static void
+send_t_packet (int sigval)
+{
+ __build_t_packet (sigval, __remcomOutBuffer);
+ __putpacket (__remcomOutBuffer);
+}
+
+/*
+ * This function does all command procesing for interfacing to gdb.
+ */
+
+static int
+process_exception (int sigval)
+{
+ int status;
+
+ /* Nasty. */
+ if (ungot_char < 0)
+ send_t_packet (sigval);
+
+ do {
+ __getpacket (__remcomInBuffer);
+ status = __process_packet (__remcomInBuffer);
+ } while (status == 0);
+
+ if (status < 0)
+ return 0;
+ else
+ return 1;
+}
+
+void
+__send_exit_status (int status)
+{
+ __remcomOutBuffer[0] = 'W';
+ __remcomOutBuffer[1] = hexchars[(status >> 4) & 0xf];
+ __remcomOutBuffer[2] = hexchars[status & 0xf];
+ __remcomOutBuffer[3] = 0;
+ __putpacket (__remcomOutBuffer);
+}
+
+/* Read up to MAXLEN bytes from the remote GDB client, and store in DEST
+ (which is a pointer in the user program). BLOCK indicates what mode
+ is being used; if it is set, we will wait for MAXLEN bytes to be
+ entered. Otherwise, the function will return immediately with whatever
+ bytes are waiting to be read.
+
+ The value returned is the number of bytes read. A -1 indicates that an
+ error of some sort occurred. */
+
+int
+__get_gdb_input (target_register_t dest, int maxlen, int block)
+{
+ char buf[4];
+ int len, i;
+ char d;
+
+ buf[0] = 'I';
+ buf[1] = '0';
+ buf[2] = block ? '0' : '1';
+ buf[3] = 0;
+ __putpacket (buf);
+ __getpacket (__remcomInBuffer);
+ if (__remcomInBuffer[0] != 'I')
+ return -1;
+ len = stubhex (__remcomInBuffer[1]) * 16 + stubhex (__remcomInBuffer[2]);
+ for (i = 0; i < len; i++)
+ {
+ d = stubhex (__remcomInBuffer[3 + i * 2]) * 16;
+ d |= stubhex (__remcomInBuffer[3 + i * 2 + 1]);
+ __write_mem_safe (&d, (void *)(dest + i), 1);
+ }
+ /* Write the trailing \0. */
+ d = '\0';
+ __write_mem_safe (&d, (void *)(dest + i), 1);
+ return len;
+}
+
+void
+__output_hex_value (target_register_t i)
+{
+ char buf[32], *ptr=buf+31;
+ unsigned int x;
+
+ *ptr = 0;
+ for (x = 0; x < (sizeof (i) * 2); x++)
+ {
+ *(--ptr) = hexchars[i & 15];
+ i = i >> 4;
+ }
+ while (*ptr)
+ {
+ putDebugChar (*(ptr++));
+ }
+}
+
+/* Write the C-style string pointed to by STR to the GDB comm port. */
+void
+__putDebugStr (char *str)
+{
+ while (*str)
+ {
+ putDebugChar (*str);
+ str++;
+ }
+}
+
+/* Send STRING_LEN bytes of STR to GDB, using 'O' packets.
+ STR is assumed to be in the program being debugged. */
+
+int
+__output_gdb_string (target_register_t str, int string_len)
+{
+ /* We will arbitrarily limit output packets to less than 400 bytes. */
+ static char buf[400];
+ int x;
+ int len;
+
+ if (string_len == 0)
+ {
+ /* We can't do strlen on a user pointer. */
+ return -1;
+ }
+
+ len = string_len;
+ while (len > 0)
+ {
+ int packetlen = ((len < 175) ? len : 175);
+ buf[0] = 'O';
+ for (x = 0; x < packetlen; x++)
+ {
+ char c;
+
+ __read_mem_safe (&c, (void *)(str + x), 1);
+ buf[x*2+1] = hexchars[(c >> 4) & 0xf];
+ buf[x*2+2] = hexchars[c % 16];
+ }
+ str += x;
+ len -= x;
+ buf[x*2+1] = 0;
+ __putpacket (buf);
+ }
+ return string_len;
+}
+
+static void
+do_nothing (void)
+{
+ /* mmmm */
+}
+
+static int
+syscall_do_nothing (int junk)
+{
+ return 0;
+}
+
+/* Start the stub running. */
+void
+__switch_to_stub (void)
+{
+ __process_exception_vec = process_exception;
+#ifdef CYGPKG_CYGMON
+ // Cygmon will have consumed the '$' character for this packet.
+ // Let's put one in the unget buffer.
+ // Actually, Cygmon does an unget, but since it uses different
+ // unget handling, we need to do this here.
+ ungetDebugChar('$');
+#endif
+}
+
+#if ! defined(BOARD_SPECIFIC_STUB_INIT)
+void
+initialize_stub (void)
+{
+ set_debug_traps ();
+ /* FIXME: This function should be renamed to specifically init the
+ hardware required by debug operations. If initHardware is implemented at
+ all, it should be called before main ().
+ */
+ initHardware () ;
+ /* This acks any stale packets , NOT an effective solution */
+ putDebugChar ('+');
+}
+#endif
+
+void
+ungetDebugChar (int c)
+{
+ ungot_char = c;
+}
+
+void
+__kill_program (int sigval)
+{
+ __remcomOutBuffer[0] = 'X';
+ __remcomOutBuffer[1] = hexchars[(sigval >> 4) & 15];
+ __remcomOutBuffer[2] = hexchars[sigval & 15];
+ __remcomOutBuffer[3] = 0;
+ __putpacket (__remcomOutBuffer);
+}
+
+#ifdef CYGSEM_ECOS_SUPPORTS_PROGRAM_ARGS
+#define MAX_ARG_COUNT 20
+#define MAX_ARGDATA 128
+
+static char *program_argv [MAX_ARG_COUNT];
+static int program_argc;
+static int last_program_arg;
+static char program_argstr [MAX_ARGDATA], *argptr;
+static int args_initted = 0;
+
+void
+__free_program_args (void)
+{
+ last_program_arg = -1;
+ program_argc = 0;
+ program_argv [0] = NULL;
+ argptr = program_argstr;
+ args_initted = 1;
+}
+
+static char *
+__add_program_arg (int argc, uint32 len)
+{
+ char *res;
+
+ if (! args_initted)
+ {
+ __free_program_args ();
+ }
+
+ if ((argc >= (MAX_ARG_COUNT - 1))
+ || ((argptr - program_argstr + len) > MAX_ARGDATA))
+ {
+ return NULL;
+ }
+
+ if (argc != last_program_arg)
+ {
+ if (argc >= program_argc)
+ {
+ program_argc = argc + 1;
+ program_argv [program_argc] = NULL;
+ }
+ program_argv [argc] = argptr;
+ last_program_arg = argc;
+ }
+
+ res = argptr;
+ argptr += len;
+
+ return res;
+}
+
+void
+__set_program_args (int argc, char **argv)
+{
+ int x;
+
+ __free_program_args ();
+ if (argc)
+ {
+ for (x = 0; x < argc; x++)
+ {
+ uint32 len = strlen (argv[x])+1;
+ char *s = __add_program_arg (x, len);
+
+ if (s == NULL)
+ return;
+
+ _memcpy (s, argv[x], len);
+ }
+ }
+}
+
+char **
+__get_program_args (target_register_t argcPtr)
+{
+ if (!args_initted)
+ {
+ __free_program_args ();
+ }
+ __write_mem_safe ((char *) &program_argc, (void *)argcPtr, sizeof (program_argc));
+ return program_argv;
+}
+#endif
+
+/* Table used by the crc32 function to calcuate the checksum. */
+#ifdef CYGDBG_HAL_CRCTABLE_LOCATION_RAM
+static uint32 crc32_table[256];
+static int tableInit = 0;
+#else
+static const uint32 crc32_table[256]={
+ 0x00000000,0x04c11db7,0x09823b6e,0x0d4326d9,0x130476dc,0x17c56b6b,0x1a864db2,0x1e475005,
+ 0x2608edb8,0x22c9f00f,0x2f8ad6d6,0x2b4bcb61,0x350c9b64,0x31cd86d3,0x3c8ea00a,0x384fbdbd,
+ 0x4c11db70,0x48d0c6c7,0x4593e01e,0x4152fda9,0x5f15adac,0x5bd4b01b,0x569796c2,0x52568b75,
+ 0x6a1936c8,0x6ed82b7f,0x639b0da6,0x675a1011,0x791d4014,0x7ddc5da3,0x709f7b7a,0x745e66cd,
+ 0x9823b6e0,0x9ce2ab57,0x91a18d8e,0x95609039,0x8b27c03c,0x8fe6dd8b,0x82a5fb52,0x8664e6e5,
+ 0xbe2b5b58,0xbaea46ef,0xb7a96036,0xb3687d81,0xad2f2d84,0xa9ee3033,0xa4ad16ea,0xa06c0b5d,
+ 0xd4326d90,0xd0f37027,0xddb056fe,0xd9714b49,0xc7361b4c,0xc3f706fb,0xceb42022,0xca753d95,
+ 0xf23a8028,0xf6fb9d9f,0xfbb8bb46,0xff79a6f1,0xe13ef6f4,0xe5ffeb43,0xe8bccd9a,0xec7dd02d,
+ 0x34867077,0x30476dc0,0x3d044b19,0x39c556ae,0x278206ab,0x23431b1c,0x2e003dc5,0x2ac12072,
+ 0x128e9dcf,0x164f8078,0x1b0ca6a1,0x1fcdbb16,0x018aeb13,0x054bf6a4,0x0808d07d,0x0cc9cdca,
+ 0x7897ab07,0x7c56b6b0,0x71159069,0x75d48dde,0x6b93dddb,0x6f52c06c,0x6211e6b5,0x66d0fb02,
+ 0x5e9f46bf,0x5a5e5b08,0x571d7dd1,0x53dc6066,0x4d9b3063,0x495a2dd4,0x44190b0d,0x40d816ba,
+ 0xaca5c697,0xa864db20,0xa527fdf9,0xa1e6e04e,0xbfa1b04b,0xbb60adfc,0xb6238b25,0xb2e29692,
+ 0x8aad2b2f,0x8e6c3698,0x832f1041,0x87ee0df6,0x99a95df3,0x9d684044,0x902b669d,0x94ea7b2a,
+ 0xe0b41de7,0xe4750050,0xe9362689,0xedf73b3e,0xf3b06b3b,0xf771768c,0xfa325055,0xfef34de2,
+ 0xc6bcf05f,0xc27dede8,0xcf3ecb31,0xcbffd686,0xd5b88683,0xd1799b34,0xdc3abded,0xd8fba05a,
+ 0x690ce0ee,0x6dcdfd59,0x608edb80,0x644fc637,0x7a089632,0x7ec98b85,0x738aad5c,0x774bb0eb,
+ 0x4f040d56,0x4bc510e1,0x46863638,0x42472b8f,0x5c007b8a,0x58c1663d,0x558240e4,0x51435d53,
+ 0x251d3b9e,0x21dc2629,0x2c9f00f0,0x285e1d47,0x36194d42,0x32d850f5,0x3f9b762c,0x3b5a6b9b,
+ 0x0315d626,0x07d4cb91,0x0a97ed48,0x0e56f0ff,0x1011a0fa,0x14d0bd4d,0x19939b94,0x1d528623,
+ 0xf12f560e,0xf5ee4bb9,0xf8ad6d60,0xfc6c70d7,0xe22b20d2,0xe6ea3d65,0xeba91bbc,0xef68060b,
+ 0xd727bbb6,0xd3e6a601,0xdea580d8,0xda649d6f,0xc423cd6a,0xc0e2d0dd,0xcda1f604,0xc960ebb3,
+ 0xbd3e8d7e,0xb9ff90c9,0xb4bcb610,0xb07daba7,0xae3afba2,0xaafbe615,0xa7b8c0cc,0xa379dd7b,
+ 0x9b3660c6,0x9ff77d71,0x92b45ba8,0x9675461f,0x8832161a,0x8cf30bad,0x81b02d74,0x857130c3,
+ 0x5d8a9099,0x594b8d2e,0x5408abf7,0x50c9b640,0x4e8ee645,0x4a4ffbf2,0x470cdd2b,0x43cdc09c,
+ 0x7b827d21,0x7f436096,0x7200464f,0x76c15bf8,0x68860bfd,0x6c47164a,0x61043093,0x65c52d24,
+ 0x119b4be9,0x155a565e,0x18197087,0x1cd86d30,0x029f3d35,0x065e2082,0x0b1d065b,0x0fdc1bec,
+ 0x3793a651,0x3352bbe6,0x3e119d3f,0x3ad08088,0x2497d08d,0x2056cd3a,0x2d15ebe3,0x29d4f654,
+ 0xc5a92679,0xc1683bce,0xcc2b1d17,0xc8ea00a0,0xd6ad50a5,0xd26c4d12,0xdf2f6bcb,0xdbee767c,
+ 0xe3a1cbc1,0xe760d676,0xea23f0af,0xeee2ed18,0xf0a5bd1d,0xf464a0aa,0xf9278673,0xfde69bc4,
+ 0x89b8fd09,0x8d79e0be,0x803ac667,0x84fbdbd0,0x9abc8bd5,0x9e7d9662,0x933eb0bb,0x97ffad0c,
+ 0xafb010b1,0xab710d06,0xa6322bdf,0xa2f33668,0xbcb4666d,0xb8757bda,0xb5365d03,0xb1f740b4,
+};
+#endif
+
+/*
+ Calculate a CRC-32 using LEN bytes of PTR. CRC is the initial CRC
+ value.
+ PTR is assumed to be a pointer in the user program. */
+
+static uint32
+crc32 (target_addr_t mem, int len, uint32 crc)
+{
+ unsigned char *ptr = (unsigned char *)TARGET_ADDR_TO_PTR(mem);
+#ifdef TARGET_HAS_HARVARD_MEMORY
+ int is_progmem = TARGET_ADDR_IS_PROGMEM(mem);
+#endif
+
+#ifdef CYGDBG_HAL_CRCTABLE_LOCATION_RAM
+ if (! tableInit)
+ {
+ /* Initialize the CRC table and the decoding table. */
+ uint32 i, j;
+ uint32 c;
+
+ tableInit = 1;
+ for (i = 0; i < 256; i++)
+ {
+ for (c = i << 24, j = 8; j > 0; --j)
+ c = c & 0x80000000 ? (c << 1) ^ 0x04c11db7 : (c << 1);
+ crc32_table[i] = c;
+ }
+ }
+#endif
+
+ __mem_fault = 0;
+ while (len--)
+ {
+ unsigned char ch;
+
+#ifdef TARGET_HAS_HARVARD_MEMORY
+ if (is_progmem)
+ __read_progmem_safe (&ch, (void *)ptr, 1);
+ else
+#endif
+ __read_mem_safe (&ch, (void *)ptr, 1);
+ if (__mem_fault)
+ {
+ break;
+ }
+ crc = (crc << 8) ^ crc32_table[((crc >> 24) ^ ch) & 255];
+ ptr++;
+ }
+ return crc;
+}
+
+/* Handle the 'q' request */
+
+static void
+process_query (char *pkt)
+{
+ __remcomOutBuffer[0] = '\0';
+#ifdef __ECOS__
+ if ('C' == pkt[0] &&
+ 'R' == pkt[1] &&
+ 'C' == pkt[2] &&
+ ':' == pkt[3])
+#else // __ECOS__
+ if (strncmp (pkt, "CRC:", 4) == 0)
+#endif // __ECOS__
+ {
+ target_addr_t startmem;
+ target_register_t length;
+ uint32 our_crc;
+
+ pkt += 4;
+ if (__hexToAddr (&pkt, &startmem)
+ && *(pkt++) == ','
+ && __hexToInt (&pkt, &length))
+ {
+ our_crc = crc32 (startmem, length, 0xffffffff);
+ if (__mem_fault)
+ {
+ strcpy (__remcomOutBuffer, "E01");
+ }
+ else
+ {
+ int numb = __intToHex (__remcomOutBuffer + 1, our_crc, 32);
+ __remcomOutBuffer[0] = 'C';
+ __remcomOutBuffer[numb + 1] = 0;
+ }
+ }
+ return;
+ }
+#ifdef CYG_HAL_STUB_PROCESS_QUERY
+ else if (CYG_HAL_STUB_PROCESS_QUERY (pkt, __remcomOutBuffer, sizeof(__remcomOutBuffer)))
+ return;
+#endif
+ else
+ {
+ char ch ;
+ char * subpkt ;
+ ch = *pkt ;
+ subpkt = pkt + 1 ;
+ switch (ch)
+ {
+ case 'L' : /* threadlistquery */
+ STUB_PKT_GETTHREADLIST (subpkt, __remcomOutBuffer, 300);
+ break ;
+ case 'P' : /* Thread or process information request */
+ STUB_PKT_GETTHREADINFO (subpkt, __remcomOutBuffer, 300);
+ break ;
+ case 'C' : /* current thread query */
+ STUB_PKT_CURRTHREAD(subpkt, __remcomOutBuffer, sizeof(__remcomOutBuffer));
+ break;
+ default:
+ __process_target_query (pkt, __remcomOutBuffer, 300);
+ break ;
+ }
+ }
+}
+
+/* Handle the 'Q' request */
+
+static void
+process_set (char *pkt)
+{
+ char ch ;
+
+#ifdef CYG_HAL_STUB_PROCESS_SET
+ if (CYG_HAL_STUB_PROCESS_SET (pkt, __remcomOutBuffer, sizeof(__remcomOutBuffer)))
+ return;
+#endif
+
+ ch = *pkt ;
+ switch (ch)
+ {
+ case 'p' : /* Set current process or thread */
+ /* reserve the packet id even if support is not present */
+ /* Dont strip the 'p' off the header, there are several variations of
+ this packet */
+ STUB_PKT_CHANGETHREAD (pkt, __remcomOutBuffer, 300) ;
+ break ;
+ default:
+ __process_target_set (pkt, __remcomOutBuffer, 300);
+ break ;
+ }
+}
+#endif // CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
diff --git a/cesar/ecos/packages/hal/common/current/src/hal_if.c b/cesar/ecos/packages/hal/common/current/src/hal_if.c
new file mode 100644
index 0000000000..b5de0d7fa4
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/src/hal_if.c
@@ -0,0 +1,1062 @@
+//=============================================================================
+//
+// hal_if.c
+//
+// ROM/RAM interfacing functions
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003 Gary Thomas
+// Copyright (C) 2003 Nick Garnett <nickg@calivar.com>
+// Copyright (C) 2003 Jonathan Larmour <jlarmour@eCosCentric.com>
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting the copyright
+// holders.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors:jskov, woehler
+// Date: 2000-06-07
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+
+#ifdef CYGPKG_KERNEL
+# include <pkgconf/kernel.h>
+#endif
+
+#include <cyg/infra/cyg_ass.h> // assertions
+
+#include <cyg/hal/hal_arch.h> // set/restore GP
+
+#include <cyg/hal/hal_io.h> // IO macros
+#include <cyg/hal/hal_if.h> // our interface
+
+#include <cyg/hal/hal_diag.h> // Diag IO
+#include <cyg/hal/hal_misc.h> // User break
+
+#include <cyg/hal/hal_stub.h> // stub functionality
+
+#include <cyg/hal/hal_intr.h> // hal_vsr_table and others
+
+#ifdef CYGPKG_REDBOOT
+#include <pkgconf/redboot.h>
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+#include <redboot.h>
+#include <flash_config.h>
+#endif
+#ifdef CYGOPT_REDBOOT_FIS
+#include <fis.h>
+#endif
+#endif
+
+//--------------------------------------------------------------------------
+
+externC void patch_dbg_syscalls(void * vector);
+externC void init_thread_syscall(void * vector);
+
+//--------------------------------------------------------------------------
+// Implementations and function wrappers for monitor services
+
+// flash config state queries
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+
+static __call_if_flash_cfg_op_fn_t flash_config_op;
+
+static cyg_bool
+flash_config_op(int op, struct cyg_fconfig *fc)
+{
+ cyg_bool res = false;
+
+ CYGARC_HAL_SAVE_GP();
+
+ switch (op) {
+ case CYGNUM_CALL_IF_FLASH_CFG_GET:
+ res = flash_get_config(fc->key, fc->val, fc->type);
+ break;
+ case CYGNUM_CALL_IF_FLASH_CFG_NEXT:
+ res = flash_next_key(fc->key, fc->keylen, &fc->type, &fc->offset);
+ break;
+ case CYGNUM_CALL_IF_FLASH_CFG_SET:
+ res = flash_set_config(fc->key, fc->val, fc->type);
+ break;
+ default:
+ // nothing else supported yet - though it is expected that "set"
+ // will fit the same set of arguments, potentially.
+ break;
+ }
+
+ CYGARC_HAL_RESTORE_GP();
+ return res;
+}
+#endif
+
+#ifdef CYGOPT_REDBOOT_FIS
+
+static __call_if_flash_fis_op_fn_t flash_fis_op;
+
+static cyg_bool
+flash_fis_op( int op, char *name, void *val)
+{
+ cyg_bool res = false;
+ struct fis_image_desc *fis;
+ int num;
+
+ CYGARC_HAL_SAVE_GP();
+ fis = fis_lookup(name, &num);
+ if(fis != NULL)
+ {
+ switch ( op ) {
+ case CYGNUM_CALL_IF_FLASH_FIS_GET_FLASH_BASE:
+ *(CYG_ADDRESS *)val = fis->flash_base;
+ res = true;
+ break;
+ case CYGNUM_CALL_IF_FLASH_FIS_GET_SIZE:
+ *(unsigned long *)val = fis->size;
+ res = true;
+ break;
+ case CYGNUM_CALL_IF_FLASH_FIS_GET_MEM_BASE:
+ *(CYG_ADDRESS *)val = fis->mem_base;
+ res = true;
+ break;
+ case CYGNUM_CALL_IF_FLASH_FIS_GET_ENTRY_POINT:
+ *(CYG_ADDRESS *)val = fis->entry_point;
+ res = true;
+ break;
+ case CYGNUM_CALL_IF_FLASH_FIS_GET_DATA_LENGTH:
+ *(unsigned long *)val = fis->data_length;
+ res = true;
+ break;
+ case CYGNUM_CALL_IF_FLASH_FIS_GET_DESC_CKSUM:
+ *(unsigned long *)val = fis->desc_cksum;
+ res = true;
+ break;
+ case CYGNUM_CALL_IF_FLASH_FIS_GET_FILE_CKSUM:
+ *(unsigned long *)val = fis->file_cksum;
+ res = true;
+ break;
+ default:
+ break;
+ }
+ }
+ CYGARC_HAL_RESTORE_GP();
+ return res;
+}
+#endif
+
+//----------------------------
+// Delay uS
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DELAY_US
+
+static __call_if_delay_us_t delay_us;
+
+static void
+delay_us(cyg_int32 usecs)
+{
+ CYGARC_HAL_SAVE_GP();
+#ifdef CYGPKG_KERNEL
+ {
+ cyg_int32 start, elapsed, elapsed_usec;
+ cyg_int32 slice;
+ cyg_int32 usec_per_period = CYGNUM_HAL_RTC_NUMERATOR/CYGNUM_HAL_RTC_DENOMINATOR/1000;
+ cyg_int32 ticks_per_usec = CYGNUM_KERNEL_COUNTERS_RTC_PERIOD/usec_per_period;
+
+ do {
+ // Spin in slices of 1/2 the RTC period. Allows interrupts
+ // time to run without messing up the algorithm. If we
+ // spun for 1 period (or more) of the RTC, there would also
+ // be problems figuring out when the timer wrapped. We
+ // may lose a tick or two for each cycle but it shouldn't
+ // matter much.
+
+ // The tests against CYGNUM_KERNEL_COUNTERS_RTC_PERIOD
+ // check for a value that would cause a 32 bit signed
+ // multiply to overflow. But this also implies that just
+ // multiplying by ticks_per_usec will yield a good
+ // approximation. Otherwise we need to do the full
+ // multiply+divide to get sufficient accuracy. Note that
+ // this test is actually constant, so the compiler will
+ // eliminate it and only compile the branch that is
+ // selected.
+
+ if( usecs > usec_per_period/2 )
+ slice = CYGNUM_KERNEL_COUNTERS_RTC_PERIOD/2;
+ else if( CYGNUM_KERNEL_COUNTERS_RTC_PERIOD/2 >= 0x7FFFFFFF/usec_per_period )
+ slice = usecs * ticks_per_usec;
+ else
+ {
+ slice = usecs*CYGNUM_KERNEL_COUNTERS_RTC_PERIOD;
+ slice /= usec_per_period;
+ }
+
+ HAL_CLOCK_READ(&start);
+ do {
+ HAL_CLOCK_READ(&elapsed);
+ elapsed = (elapsed - start); // counts up!
+ if (elapsed < 0)
+ elapsed += CYGNUM_KERNEL_COUNTERS_RTC_PERIOD;
+ } while (elapsed < slice);
+
+ // Adjust by elapsed, not slice, since an interrupt may
+ // have been stalling us for some time.
+
+ if( CYGNUM_KERNEL_COUNTERS_RTC_PERIOD >= 0x7FFFFFFF/usec_per_period )
+ elapsed_usec = elapsed / ticks_per_usec;
+ else
+ {
+ elapsed_usec = elapsed * usec_per_period;
+ elapsed_usec = elapsed_usec / CYGNUM_KERNEL_COUNTERS_RTC_PERIOD;
+ }
+
+ // It is possible for elapsed_usec to end up zero in some
+ // circumstances and we could end up looping indefinitely.
+ // Avoid that by ensuring that we always decrement usec by
+ // at least 1 each time.
+
+ usecs -= elapsed_usec ? elapsed_usec : 1;
+
+ } while (usecs > 0);
+ }
+#else // CYGPKG_KERNEL
+#ifdef HAL_DELAY_US
+ // Use a HAL feature if defined
+ HAL_DELAY_US(usecs);
+#else
+ // If no accurate delay mechanism, just spin for a while. Having
+ // an inaccurate delay is much better than no delay at all. The
+ // count of 10 should mean the loop takes something resembling
+ // 1us on most CPUs running between 30-100MHz [depends on how many
+ // instructions this compiles to, how many dispatch units can be
+ // used for the simple loop, actual CPU frequency, etc]
+ while (usecs-- > 0) {
+ int i;
+ for (i = 0; i < 10; i++);
+ }
+#endif // HAL_DELAY_US
+#endif // CYGPKG_KERNEL
+ CYGARC_HAL_RESTORE_GP();
+}
+#endif // CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DELAY_US
+
+// Reset functions
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_RESET
+
+static __call_if_reset_t reset;
+
+static void
+reset(void)
+{
+ CYGARC_HAL_SAVE_GP();
+ // With luck, the platform defines some magic that will cause a hardware
+ // reset.
+#ifdef HAL_PLATFORM_RESET
+ HAL_PLATFORM_RESET();
+#endif
+
+#ifdef HAL_PLATFORM_RESET_ENTRY
+ // If that's not the case (above is an empty statement) there may
+ // be defined an address we can jump to - and effectively
+ // reinitialize the system. Not quite as good as a reset, but it
+ // is often enough.
+ goto *HAL_PLATFORM_RESET_ENTRY;
+
+#else
+#error " no RESET_ENTRY"
+#endif
+ CYG_FAIL("Reset failed");
+ CYGARC_HAL_RESTORE_GP();
+}
+
+#endif
+
+//------------------------------------
+// NOP service
+#if defined(CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE) || \
+ defined(CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS)
+static int
+nop_service(void)
+{
+ // This is the default service. It always returns false (0), and
+ // _does not_ trigger any assertions. Clients must either cope
+ // with the service failure or assert.
+ return 0;
+}
+#endif
+
+//----------------------------------
+// Comm controls
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS
+
+#ifdef CYGNUM_HAL_VIRTUAL_VECTOR_AUX_CHANNELS
+#define CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS \
+ (CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS+CYGNUM_HAL_VIRTUAL_VECTOR_AUX_CHANNELS)
+#else
+#define CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS \
+ CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS
+#endif
+
+static hal_virtual_comm_table_t comm_channels[CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS+1];
+
+static int
+set_debug_comm(int __comm_id)
+{
+ static int __selected_id = CYGNUM_CALL_IF_SET_COMM_ID_EMPTY;
+ hal_virtual_comm_table_t* __chan;
+ int interrupt_state = 0;
+ int res = 1, update = 0;
+ CYGARC_HAL_SAVE_GP();
+
+ CYG_ASSERT(__comm_id >= CYGNUM_CALL_IF_SET_COMM_ID_MANGLER
+ && __comm_id < CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS,
+ "Invalid channel");
+
+ switch (__comm_id) {
+ case CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT:
+ if (__selected_id > 0)
+ res = __selected_id-1;
+ else if (__selected_id == 0)
+ res = CYGNUM_CALL_IF_SET_COMM_ID_MANGLER;
+ else
+ res = __selected_id;
+ break;
+
+ case CYGNUM_CALL_IF_SET_COMM_ID_EMPTY:
+ CYGACC_CALL_IF_DEBUG_PROCS_SET(0);
+ __selected_id = __comm_id;
+ break;
+
+ case CYGNUM_CALL_IF_SET_COMM_ID_MANGLER:
+ __comm_id = 0;
+ update = 1;
+ break;
+
+ default:
+ __comm_id++; // skip mangler entry
+ update = 1;
+ break;
+ }
+
+ if (update) {
+ // Find the interrupt state of the channel.
+ __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+ if (__chan)
+ interrupt_state = CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_IRQ_DISABLE);
+
+ __selected_id = __comm_id;
+ CYGACC_CALL_IF_DEBUG_PROCS_SET(comm_channels[__comm_id]);
+
+ // Set interrupt state on the new channel.
+ __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+ if (interrupt_state)
+ CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_IRQ_ENABLE);
+ else
+ CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_IRQ_DISABLE);
+ }
+
+ CYGARC_HAL_RESTORE_GP();
+ return res;
+}
+
+static int
+set_console_comm(int __comm_id)
+{
+ static int __selected_id = CYGNUM_CALL_IF_SET_COMM_ID_EMPTY;
+ int res = 1, update = 0;
+ CYGARC_HAL_SAVE_GP();
+
+ CYG_ASSERT(__comm_id >= CYGNUM_CALL_IF_SET_COMM_ID_MANGLER
+ && __comm_id < CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS,
+ "Invalid channel");
+
+ switch (__comm_id) {
+ case CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT:
+ if (__selected_id > 0)
+ res = __selected_id-1;
+ else if (__selected_id == 0)
+ res = CYGNUM_CALL_IF_SET_COMM_ID_MANGLER;
+ else
+ res = __selected_id;
+ break;
+
+ case CYGNUM_CALL_IF_SET_COMM_ID_EMPTY:
+ CYGACC_CALL_IF_CONSOLE_PROCS_SET(0);
+ __selected_id = __comm_id;
+ break;
+
+ case CYGNUM_CALL_IF_SET_COMM_ID_MANGLER:
+ __comm_id = 0;
+ update = 1;
+ break;
+
+ default:
+ __comm_id++; // skip mangler entry
+ update = 1;
+ break;
+ }
+
+ if (update) {
+ __selected_id = __comm_id;
+
+ CYGACC_CALL_IF_CONSOLE_PROCS_SET(comm_channels[__comm_id]);
+ }
+
+ CYGARC_HAL_RESTORE_GP();
+ return res;
+}
+#endif
+
+//----------------------------------
+// Cache functions
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_CACHE
+
+static void
+flush_icache(void *__p, int __nbytes)
+{
+ CYGARC_HAL_SAVE_GP();
+#ifdef HAL_ICACHE_FLUSH
+ HAL_ICACHE_FLUSH( __p , __nbytes );
+#elif defined(HAL_ICACHE_INVALIDATE)
+ HAL_ICACHE_INVALIDATE();
+#endif
+ CYGARC_HAL_RESTORE_GP();
+}
+
+static void
+flush_dcache(void *__p, int __nbytes)
+{
+ CYGARC_HAL_SAVE_GP();
+#ifdef HAL_DCACHE_FLUSH
+ HAL_DCACHE_FLUSH( __p , __nbytes );
+#elif defined(HAL_DCACHE_INVALIDATE)
+ HAL_DCACHE_INVALIDATE();
+#endif
+ CYGARC_HAL_RESTORE_GP();
+}
+#endif
+
+#if defined(CYGSEM_HAL_VIRTUAL_VECTOR_DIAG)
+//-----------------------------------------------------------------------------
+// GDB console output mangler (O-packetizer)
+// COMMS init function at end.
+
+// This gets called via the virtual vector console comms entry and
+// handles O-packetization. The debug comms entries are used for the
+// actual device IO.
+static cyg_uint8
+cyg_hal_diag_mangler_gdb_getc(void* __ch_data)
+{
+ cyg_uint8 __ch;
+ hal_virtual_comm_table_t* __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+ CYGARC_HAL_SAVE_GP();
+
+ __ch = CYGACC_COMM_IF_GETC(*__chan);
+
+ CYGARC_HAL_RESTORE_GP();
+
+ return __ch;
+}
+
+static char __mangler_line[100];
+static int __mangler_pos = 0;
+
+static void
+cyg_hal_diag_mangler_gdb_flush(void* __ch_data)
+{
+ CYG_INTERRUPT_STATE old;
+ hal_virtual_comm_table_t* __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+#if CYGNUM_HAL_DEBUG_GDB_PROTOCOL_RETRIES != 0
+ int tries = CYGNUM_HAL_DEBUG_GDB_PROTOCOL_RETRIES;
+#endif
+
+
+ // Nothing to do if mangler buffer is empty.
+ if (__mangler_pos == 0)
+ return;
+
+ // Disable interrupts. This prevents GDB trying to interrupt us
+ // while we are in the middle of sending a packet. The serial
+ // receive interrupt will be seen when we re-enable interrupts
+ // later.
+#if defined(CYG_HAL_STARTUP_ROM) \
+ || !defined(CYG_HAL_GDB_ENTER_CRITICAL_IO_REGION)
+ HAL_DISABLE_INTERRUPTS(old);
+#else
+ CYG_HAL_GDB_ENTER_CRITICAL_IO_REGION(old);
+#endif
+
+#if CYGNUM_HAL_DEBUG_GDB_PROTOCOL_RETRIES != 0
+ // Only wait 500ms for data to arrive - avoid "stuck" connections
+ CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_SET_TIMEOUT, CYGNUM_HAL_DEBUG_GDB_PROTOCOL_TIMEOUT);
+#endif
+
+ while(1)
+ {
+ static const char hex[] = "0123456789ABCDEF";
+ cyg_uint8 csum = 0, c1;
+ int i;
+
+ CYGACC_COMM_IF_PUTC(*__chan, '$');
+ CYGACC_COMM_IF_PUTC(*__chan, 'O');
+ csum += 'O';
+ for( i = 0; i < __mangler_pos; i++ )
+ {
+ char ch = __mangler_line[i];
+ char h = hex[(ch>>4)&0xF];
+ char l = hex[ch&0xF];
+ CYGACC_COMM_IF_PUTC(*__chan, h);
+ CYGACC_COMM_IF_PUTC(*__chan, l);
+ csum += h;
+ csum += l;
+ }
+ CYGACC_COMM_IF_PUTC(*__chan, '#');
+ CYGACC_COMM_IF_PUTC(*__chan, hex[(csum>>4)&0xF]);
+ CYGACC_COMM_IF_PUTC(*__chan, hex[csum&0xF]);
+
+ nak:
+#if CYGNUM_HAL_DEBUG_GDB_PROTOCOL_RETRIES != 0
+ if (CYGACC_COMM_IF_GETC_TIMEOUT(*__chan, &c1) == 0) {
+ c1 = '-';
+ if (tries && (--tries == 0)) c1 = '+';
+ }
+#else
+ c1 = CYGACC_COMM_IF_GETC(*__chan);
+#endif
+
+ if( c1 == '+' ) break;
+
+ if( cyg_hal_is_break( &c1 , 1 ) ) {
+ // Caller's responsibility to react on this.
+ CYGACC_CALL_IF_CONSOLE_INTERRUPT_FLAG_SET(1);
+ break;
+ }
+ if( c1 != '-' ) goto nak;
+ }
+
+ __mangler_pos = 0;
+ // And re-enable interrupts
+#if defined(CYG_HAL_STARTUP_ROM) \
+ || !defined(CYG_HAL_GDB_ENTER_CRITICAL_IO_REGION)
+ HAL_RESTORE_INTERRUPTS(old);
+#else
+ CYG_HAL_GDB_LEAVE_CRITICAL_IO_REGION(old);
+#endif
+}
+
+static void
+cyg_hal_diag_mangler_gdb_putc(void* __ch_data, cyg_uint8 c)
+{
+ // No need to send CRs
+ if( c == '\r' ) return;
+
+ CYGARC_HAL_SAVE_GP();
+
+ __mangler_line[__mangler_pos++] = c;
+
+ if( c == '\n' || __mangler_pos == sizeof(__mangler_line) )
+ cyg_hal_diag_mangler_gdb_flush(__ch_data);
+
+ CYGARC_HAL_RESTORE_GP();
+}
+
+static void
+cyg_hal_diag_mangler_gdb_write(void* __ch_data,
+ const cyg_uint8* __buf, cyg_uint32 __len)
+{
+ CYGARC_HAL_SAVE_GP();
+
+ while(__len-- > 0)
+ cyg_hal_diag_mangler_gdb_putc(__ch_data, *__buf++);
+
+ CYGARC_HAL_RESTORE_GP();
+}
+
+static void
+cyg_hal_diag_mangler_gdb_read(void* __ch_data,
+ cyg_uint8* __buf, cyg_uint32 __len)
+{
+ CYGARC_HAL_SAVE_GP();
+
+ while(__len-- > 0)
+ *__buf++ = cyg_hal_diag_mangler_gdb_getc(__ch_data);
+
+ CYGARC_HAL_RESTORE_GP();
+}
+
+static int
+cyg_hal_diag_mangler_gdb_control(void *__ch_data,
+ __comm_control_cmd_t __func, ...)
+{
+ CYGARC_HAL_SAVE_GP();
+
+ if (__func == __COMMCTL_FLUSH_OUTPUT)
+ cyg_hal_diag_mangler_gdb_flush(__ch_data);
+
+ CYGARC_HAL_RESTORE_GP();
+ return 0;
+}
+
+// This is the COMMS init function. It gets called both by the stubs
+// and diag init code to initialize the COMMS mangler channel table -
+// that's all. The callers have to decide whether to actually use this
+// channel.
+void
+cyg_hal_diag_mangler_gdb_init(void)
+{
+ hal_virtual_comm_table_t* comm;
+ int cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+
+ // Initialize mangler procs
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_MANGLER);
+ comm = CYGACC_CALL_IF_CONSOLE_PROCS();
+ CYGACC_COMM_IF_WRITE_SET(*comm, cyg_hal_diag_mangler_gdb_write);
+ CYGACC_COMM_IF_READ_SET(*comm, cyg_hal_diag_mangler_gdb_read);
+ CYGACC_COMM_IF_PUTC_SET(*comm, cyg_hal_diag_mangler_gdb_putc);
+ CYGACC_COMM_IF_GETC_SET(*comm, cyg_hal_diag_mangler_gdb_getc);
+ CYGACC_COMM_IF_CONTROL_SET(*comm, cyg_hal_diag_mangler_gdb_control);
+
+ // Restore the original console channel.
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
+}
+
+//-----------------------------------------------------------------------------
+// Null console output mangler
+// COMMS init function at end.
+
+// This gets called via the virtual vector console comms entry and
+// just forwards IO to the debug comms entries.
+// This differs from setting the console channel to the same as the
+// debug channel in that console output will go to the debug channel
+// even if the debug channel is changed.
+static cyg_uint8
+cyg_hal_diag_mangler_null_getc(void* __ch_data)
+{
+ cyg_uint8 __ch;
+ hal_virtual_comm_table_t* __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+ CYGARC_HAL_SAVE_GP();
+
+ __ch = CYGACC_COMM_IF_GETC(*__chan);
+
+ CYGARC_HAL_RESTORE_GP();
+
+ return __ch;
+}
+
+
+static void
+cyg_hal_diag_mangler_null_putc(void* __ch_data, cyg_uint8 c)
+{
+ hal_virtual_comm_table_t* __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+
+ CYGARC_HAL_SAVE_GP();
+
+ CYGACC_COMM_IF_PUTC(*__chan, c);
+
+ CYGARC_HAL_RESTORE_GP();
+}
+
+static void
+cyg_hal_diag_mangler_null_write(void* __ch_data,
+ const cyg_uint8* __buf, cyg_uint32 __len)
+{
+ CYGARC_HAL_SAVE_GP();
+
+ while(__len-- > 0)
+ cyg_hal_diag_mangler_null_putc(__ch_data, *__buf++);
+
+ CYGARC_HAL_RESTORE_GP();
+}
+
+static void
+cyg_hal_diag_mangler_null_read(void* __ch_data,
+ cyg_uint8* __buf, cyg_uint32 __len)
+{
+ CYGARC_HAL_SAVE_GP();
+
+ while(__len-- > 0)
+ *__buf++ = cyg_hal_diag_mangler_null_getc(__ch_data);
+
+ CYGARC_HAL_RESTORE_GP();
+}
+
+static int
+cyg_hal_diag_mangler_null_control(void *__ch_data,
+ __comm_control_cmd_t __func, ...)
+{
+ // Do nothing (yet).
+ return 0;
+}
+
+// This is the COMMS init function. It gets called both by the stubs
+// and diag init code to initialize the COMMS mangler channel table -
+// that's all. The callers have to decide whether to actually use this
+// channel.
+void
+cyg_hal_diag_mangler_null_init(void)
+{
+ hal_virtual_comm_table_t* comm;
+ int cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+
+ // Initialize mangler procs
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_MANGLER);
+ comm = CYGACC_CALL_IF_CONSOLE_PROCS();
+ CYGACC_COMM_IF_WRITE_SET(*comm, cyg_hal_diag_mangler_null_write);
+ CYGACC_COMM_IF_READ_SET(*comm, cyg_hal_diag_mangler_null_read);
+ CYGACC_COMM_IF_PUTC_SET(*comm, cyg_hal_diag_mangler_null_putc);
+ CYGACC_COMM_IF_GETC_SET(*comm, cyg_hal_diag_mangler_null_getc);
+ CYGACC_COMM_IF_CONTROL_SET(*comm, cyg_hal_diag_mangler_null_control);
+
+ // Restore the original console channel.
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
+}
+
+//-----------------------------------------------------------------------------
+// Console IO functions that adhere to the virtual vector table semantics in
+// order to ensure proper debug agent mangling when required.
+//
+externC void cyg_hal_plf_comms_init(void);
+
+void
+hal_if_diag_init(void)
+{
+ // This function may be called from various places and the code
+ // should only run once.
+ static cyg_uint8 called = 0;
+ if (called) return;
+ called = 1;
+
+#ifndef CYGSEM_HAL_VIRTUAL_VECTOR_INHERIT_CONSOLE
+
+#if defined(CYGDBG_HAL_DIAG_TO_DEBUG_CHAN)
+ // Use the mangler channel, which in turn uses the debug channel.
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_MANGLER);
+
+ // Initialize the mangler channel.
+#if defined(CYGSEM_HAL_DIAG_MANGLER_GDB)
+ cyg_hal_diag_mangler_gdb_init();
+#elif defined(CYGSEM_HAL_DIAG_MANGLER_None)
+ cyg_hal_diag_mangler_null_init();
+#endif
+
+#else // CYGDBG_HAL_DIAG_TO_DEBUG_CHAN
+
+ // Use an actual (raw) IO channel
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL);
+
+#endif // CYGDBG_HAL_DIAG_TO_DEBUG_CHAN
+
+#endif // CYGSEM_HAL_VIRTUAL_VECTOR_INHERIT_CONSOLE
+}
+
+void
+hal_if_diag_write_char(char c)
+{
+ hal_virtual_comm_table_t* __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+
+ if (__chan)
+ CYGACC_COMM_IF_PUTC(*__chan, c);
+ else {
+ __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+
+ // FIXME: What should be done if assertions are not enabled?
+ // This is a bad bad situation - we have no means for diag
+ // output; we want to hit a breakpoint to alert the developer
+ // or something like that.
+ CYG_ASSERT(__chan, "No valid channel set");
+
+ CYGACC_COMM_IF_PUTC(*__chan, c);
+ }
+
+ // Check interrupt flag
+ if (CYGACC_CALL_IF_CONSOLE_INTERRUPT_FLAG()) {
+ CYGACC_CALL_IF_CONSOLE_INTERRUPT_FLAG_SET(0);
+ cyg_hal_user_break(0);
+ }
+}
+
+void
+hal_if_diag_read_char(char *c)
+{
+ hal_virtual_comm_table_t* __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+
+ if (__chan)
+ *c = CYGACC_COMM_IF_GETC(*__chan);
+ else {
+ __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+
+ // FIXME: What should be done if assertions are not enabled?
+ // This is a bad bad situation - we have no means for diag
+ // output; we want to hit a breakpoint to alert the developer
+ // or something like that.
+ CYG_ASSERT(__chan, "No valid channel set");
+
+ *c = CYGACC_COMM_IF_GETC(*__chan);
+ }
+}
+#endif // CYGSEM_HAL_VIRTUAL_VECTOR_DIAG
+
+//=============================================================================
+// CtrlC support
+//=============================================================================
+
+#if defined(CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT) \
+ || defined(CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT)
+
+struct Hal_SavedRegisters *hal_saved_interrupt_state;
+
+void
+hal_ctrlc_isr_init(void)
+{
+ // A ROM monitor never enables the interrupt itself. This is left
+ // to the (RAM) application.
+#ifndef CYGSEM_HAL_ROM_MONITOR
+ hal_virtual_comm_table_t* __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+
+#if 1 // Prevents crash on older stubs
+ int v_m;
+ // Allow only ctrl-c interrupt enabling when version in table is
+ // below legal max and above the necessary service, and _not_
+ // the value we set it to below.
+ v_m = CYGACC_CALL_IF_VERSION() & CYGNUM_CALL_IF_TABLE_VERSION_CALL_MASK;
+ if (v_m >= CYGNUM_CALL_IF_TABLE_VERSION_CALL_MAX
+ || v_m < CYGNUM_CALL_IF_SET_DEBUG_COMM
+ || v_m == CYGNUM_CALL_IF_TABLE_VERSION_CALL_HACK)
+ return;
+
+ // Now trash that value - otherwise downloading an image with
+ // builtin stubs on a board with older stubs (which will cause the
+ // version to be set to VERSION_CALL) may cause all subsequent
+ // runs to (wrongly) fall through to the below code. If there is
+ // a new stub on the board, it will reinitialize the version field
+ // on reset. Yes, this is a gross hack!
+ CYGACC_CALL_IF_VERSION_SET(CYGNUM_CALL_IF_TABLE_VERSION_CALL_HACK);
+#endif
+
+ // We can only enable interrupts on a valid debug channel.
+ if (__chan)
+ CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_IRQ_ENABLE);
+#endif
+}
+
+cyg_uint32
+hal_ctrlc_isr(CYG_ADDRWORD vector, CYG_ADDRWORD data)
+{
+ hal_virtual_comm_table_t* __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+ int isr_ret = 0, ctrlc = 0;
+
+ if (__chan) {
+ isr_ret = CYGACC_COMM_IF_DBG_ISR(*__chan, &ctrlc, vector, data);
+ if (ctrlc)
+ cyg_hal_user_break( (CYG_ADDRWORD *)hal_saved_interrupt_state );
+ }
+ return isr_ret;
+}
+
+cyg_bool
+hal_ctrlc_check(CYG_ADDRWORD vector, CYG_ADDRWORD data)
+{
+ hal_virtual_comm_table_t* __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+ int gdb_vector = vector-1;
+ int isr_ret, ctrlc = 0;
+
+ // This check only to avoid crash on older stubs in case of unhandled
+ // interrupts. It is a bit messy, but required in a transition period.
+ if (__chan &&
+ (CYGNUM_CALL_IF_TABLE_VERSION_CALL_HACK ==
+ (CYGACC_CALL_IF_VERSION() & CYGNUM_CALL_IF_TABLE_VERSION_CALL_MASK))){
+ gdb_vector = CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_DBG_ISR_VECTOR);
+ }
+ if (vector == gdb_vector) {
+ isr_ret = CYGACC_COMM_IF_DBG_ISR(*__chan, &ctrlc, vector, data);
+ if (ctrlc) {
+ cyg_hal_user_break( (CYG_ADDRWORD *)hal_saved_interrupt_state );
+ return true;
+ }
+ }
+ return false;
+}
+#endif // CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT || CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
+
+//--------------------------------------------------------------------------
+// Init function. It should be called from the platform initialization code.
+// For monitor configurations it will initialize the calling interface table,
+// for client configurations it will patch the existing table as per
+// configuration.
+void
+hal_if_init(void)
+{
+ //**********************************************************************
+ //
+ // Note that if your RAM application is configured to initialize
+ // the whole table _or_ the communication channels, you _cannot_
+ // step through this function with the debugger. If your channel
+ // configurations are set to the default, you should be able to
+ // simply step over this function though (or use 'finish' once you
+ // have entered this function if that GDB command works).
+ //
+ // If you really do need to debug this code, the best approach is
+ // to have a working RedBoot / GDB stub in ROM and then change the
+ // hal_virtual_vector_table to reside at some other address in the
+ // RAM configuration than that used by the ROM monitor. Then
+ // you'll be able to use the ROM monitor to debug the below code
+ // and check that it does the right thing.
+ //
+ // Note that if you have a ROM monitor in ROM/flash which does
+ // support virtual vectors, you should be able to disable the
+ // option CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE. On some
+ // targets (which predate the introduction of virtual vectors)
+ // that option is enabled per default and needs to be explicitly
+ // disabled when you have an updated ROM monitor.
+ //
+ //**********************************************************************
+
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE
+ {
+ int i;
+
+ // Initialize tables with the NOP service.
+ // This should only be done for service routine entries - data
+ // pointers should be NULLed.
+ for (i = 0; i < CYGNUM_CALL_IF_TABLE_SIZE; i++)
+ hal_virtual_vector_table[i] = (CYG_ADDRWORD) &nop_service;
+
+ // Version number
+ CYGACC_CALL_IF_VERSION_SET(CYGNUM_CALL_IF_TABLE_VERSION_CALL
+ |((CYG_ADDRWORD)CYGNUM_CALL_IF_TABLE_VERSION_COMM<<CYGNUM_CALL_IF_TABLE_VERSION_COMM_shift));
+ }
+#endif
+
+ // Miscellaneous services with wrappers in this file.
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_RESET
+ CYGACC_CALL_IF_RESET_SET(reset);
+#endif
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DELAY_US
+ CYGACC_CALL_IF_DELAY_US_SET(delay_us);
+#endif
+
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_CACHE
+ // Cache functions
+ CYGACC_CALL_IF_FLUSH_ICACHE_SET(flush_icache);
+ CYGACC_CALL_IF_FLUSH_DCACHE_SET(flush_dcache);
+#endif
+
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+ CYGACC_CALL_IF_FLASH_CFG_OP_SET(flash_config_op);
+#endif
+
+#ifdef CYGOPT_REDBOOT_FIS
+ CYGACC_CALL_IF_FLASH_FIS_OP_SET(flash_fis_op);
+#endif
+
+ // Data entries not currently supported in eCos
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DATA
+ CYGACC_CALL_IF_DBG_DATA_SET(0);
+#endif
+
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_VERSION
+ CYGACC_CALL_IF_MONITOR_VERSION_SET(0);
+#endif
+
+ // Comm controls
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS
+ {
+ int i, j;
+
+ // Clear out tables with safe dummy function.
+ for (j = 0; j < CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS+1; j++)
+ for (i = 0; i < CYGNUM_COMM_IF_TABLE_SIZE; i++)
+ comm_channels[j][i] = (CYG_ADDRWORD) &nop_service;
+
+ // Set accessor functions
+ CYGACC_CALL_IF_SET_DEBUG_COMM_SET(set_debug_comm);
+ CYGACC_CALL_IF_SET_CONSOLE_COMM_SET(set_console_comm);
+
+ // Initialize console/debug procs. Note that these _must_
+ // be set to empty before the comms init call.
+ set_debug_comm(CYGNUM_CALL_IF_SET_COMM_ID_EMPTY);
+ set_console_comm(CYGNUM_CALL_IF_SET_COMM_ID_EMPTY);
+
+ // Initialize channels. This used to be done in
+ // hal_diag_init() and the stub initHardware() functions, but
+ // it makes more sense to have here.
+ cyg_hal_plf_comms_init();
+
+ // Always set the debug channel. If stubs are included, it is
+ // necessary. If no stubs are included it does not hurt and is
+ // likely to be required by the hal_if_diag_init code anyway
+ // as it may rely on it if using a mangler.
+ set_debug_comm(CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL);
+ // Set console channel to a safe default. hal_if_diag_init
+ // will override with console channel or mangler if necessary.
+ set_console_comm(CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL);
+ }
+
+ // Reset console interrupt flag.
+ CYGACC_CALL_IF_CONSOLE_INTERRUPT_FLAG_SET(0);
+#endif
+
+ // Set up services provided by clients
+#if defined(CYGFUN_HAL_COMMON_KERNEL_SUPPORT) && \
+ ( defined(CYGSEM_HAL_USE_ROM_MONITOR_GDB_stubs) \
+ || defined(CYGSEM_HAL_USE_ROM_MONITOR_CygMon))
+
+ patch_dbg_syscalls( (void *)(hal_virtual_vector_table) );
+#endif
+
+ // Init client services
+#if !defined(CYGPKG_KERNEL) && defined(CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT)
+ // Only include this code if we do not have a kernel. Otherwise
+ // the kernel supplies the functionality for the app we are linked
+ // with.
+
+ // Prepare for application installation of thread info function in
+ // vector table.
+ init_thread_syscall( (void *)&hal_virtual_vector_table[CYGNUM_CALL_IF_DBG_SYSCALL] );
+#endif
+
+ // Finally, install async breakpoint handler if it is configured in.
+ // FIXME: this should probably check for STUBS instead (but code is
+ // conditional on BREAK for now)
+#if defined(CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT)
+ // Install async breakpoint handler into vector table.
+ CYGACC_CALL_IF_INSTALL_BPT_FN_SET(&cyg_hal_gdb_interrupt);
+#endif
+
+#if 0 != CYGINT_HAL_PLF_IF_INIT
+ // Call platform specific initializations - should only be used
+ // to augment what has already been set up, etc.
+ plf_if_init();
+#endif
+}
+
diff --git a/cesar/ecos/packages/hal/common/current/src/hal_misc.c b/cesar/ecos/packages/hal/common/current/src/hal_misc.c
new file mode 100644
index 0000000000..d8c37faafa
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/src/hal_misc.c
@@ -0,0 +1,201 @@
+//==========================================================================
+//
+// hal_misc.c
+//
+// Common HAL miscellaneous functions
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg, jskov
+// Date: 2000-06-08
+// Purpose: HAL miscellaneous functions
+// Description: This file contains miscellaneous functions provided by the
+// HAL.
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================*/
+
+#include <pkgconf/hal.h>
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_if.h>
+
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_misc.h> // our header
+
+#include <cyg/infra/cyg_type.h> // Base types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+//--------------------------------------------------------------------------
+
+//--------------------------------------------------------------------------
+// Macro for finding return address.
+#ifndef CYGARC_HAL_GET_RETURN_ADDRESS
+
+#define CYGARC_HAL_GET_RETURN_ADDRESS(_x_, _dummy_) \
+ CYG_MACRO_START \
+ (_dummy_) = 1; \
+ (_x_) = (CYG_ADDRWORD)&&__backup_return_address; \
+ CYG_MACRO_END
+
+#define CYGARC_HAL_GET_RETURN_ADDRESS_BACKUP(_dummy_) \
+ CYG_MACRO_START \
+__backup_return_address: \
+ if ((_dummy_)-- > 0) \
+ goto __backup_return_address; \
+ CYG_MACRO_END
+#endif
+
+//--------------------------------------------------------------------------
+// Macro for finding PC in saved regs
+#ifndef CYGARC_HAL_GET_PC_REG
+#define CYGARC_HAL_GET_PC_REG(_regs_,_val_) ((_val_) = (_regs_)->pc)
+#endif
+
+//--------------------------------------------------------------------------
+// Macro for matching interrupt vector to GDB comm channel.
+#ifndef CYGHWR_HAL_GDB_PORT_VECTORS_MATCH
+#define CYGHWR_HAL_GDB_PORT_VECTORS_MATCH(_v_,_gv_) ((_v_)==(_gv_))
+#endif
+
+#if defined(CYGPKG_CYGMON)
+unsigned long cygmon_memsize = 0;
+#endif
+
+//--------------------------------------------------------------------------
+// Functions to support the detection and execution of a user provoked
+// program break. These are usually called from interrupt routines.
+
+cyg_bool
+cyg_hal_is_break(char *buf, int size)
+{
+ while( size )
+ if( buf[--size] == 0x03 ) return true;
+
+ return false;
+}
+
+// Keep this variable global, to prevent the compiler removing it (and
+// the goto-reference) due to being local to the function where it is
+// used. Yes, it's ugly.
+int _cyg_hal_compiler_dummy;
+
+void
+cyg_hal_user_break( CYG_ADDRWORD *regs )
+{
+#if defined(CYGSEM_HAL_USE_ROM_MONITOR_GDB_stubs) \
+ || defined(CYGSEM_HAL_USE_ROM_MONITOR_CygMon) \
+ || defined(CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS)
+
+ CYG_ADDRWORD __ra;
+ CYG_WORD32 __pc;
+ HAL_SavedRegisters *sreg = (HAL_SavedRegisters *)regs;
+
+ CYGARC_HAL_GET_RETURN_ADDRESS(__ra, _cyg_hal_compiler_dummy);
+
+ if( regs == NULL ) __pc = __ra;
+ else CYGARC_HAL_GET_PC_REG(sreg, __pc);
+
+ CYGACC_CALL_IF_INSTALL_BPT_FN((void *)__pc);
+
+ CYGARC_HAL_GET_RETURN_ADDRESS_BACKUP(_cyg_hal_compiler_dummy);
+
+#else
+
+ HAL_BREAKPOINT(breakinst);
+
+#endif
+}
+
+
+//--------------------------------------------------------------------------
+// The system default interrupt ISR. It calls the architecture default
+// ISR as well if necessary.
+externC cyg_uint32 hal_arch_default_isr(CYG_ADDRWORD vector,
+ CYG_ADDRWORD data);
+
+cyg_uint32
+hal_default_isr(CYG_ADDRWORD vector, CYG_ADDRWORD data)
+{
+ cyg_uint32 result;
+
+#if (defined(CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT) \
+ || defined(CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT)) && \
+ (defined(CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT) || \
+ defined(CYGHWR_HAL_GDB_PORT_VECTOR) && \
+ defined(HAL_CTRLC_ISR))
+
+#ifndef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
+#if CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+ int gdb_vector = -1;
+ // This check only to avoid crash on older stubs in case of unhandled
+ // interrupts. It is a bit messy, but required in a transition period.
+#ifndef CYGSEM_HAL_ROM_MONITOR
+ if (CYGNUM_CALL_IF_TABLE_VERSION_CALL_HACK ==
+ (CYGACC_CALL_IF_VERSION() & CYGNUM_CALL_IF_TABLE_VERSION_CALL_MASK))
+#endif
+ {
+ hal_virtual_comm_table_t* __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+ if (__chan)
+ gdb_vector = CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_DBG_ISR_VECTOR);
+ }
+ if( CYGHWR_HAL_GDB_PORT_VECTORS_MATCH(vector, gdb_vector) )
+#else
+ // Old code using hardwired channels. This should go away eventually.
+ if( vector == CYGHWR_HAL_GDB_PORT_VECTOR )
+#endif
+#endif
+ {
+ result = HAL_CTRLC_ISR( vector, data );
+ if( 0 != result ) return result;
+ }
+#endif
+
+ result = hal_arch_default_isr (vector, data);
+ if( 0 != result) return result;
+
+ CYG_TRACE2(true, "Interrupt: %d, Data: 0x%08x", vector, data);
+ CYG_FAIL("Spurious Interrupt!!!");
+ return 0;
+}
+
+
+//--------------------------------------------------------------------------
+// End of hal_misc.c
diff --git a/cesar/ecos/packages/hal/common/current/src/hal_stub.c b/cesar/ecos/packages/hal/common/current/src/hal_stub.c
new file mode 100644
index 0000000000..84f22f6236
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/src/hal_stub.c
@@ -0,0 +1,1046 @@
+//=============================================================================
+//
+// hal_stub.c
+//
+// Helper functions for stub, specific to eCos HAL
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov (based on powerpc/cogent hal_stub.c)
+// Contributors:jskov, dmoseley
+// Date: 1999-02-12
+// Purpose: Helper functions for stub, specific to eCos HAL
+// Description: Parts of the GDB stub requirements are provided by
+// the eCos HAL, rather than target and/or board specific
+// code.
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+#ifdef CYGPKG_CYGMON
+#include <pkgconf/cygmon.h>
+#endif
+
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+
+#include <cyg/hal/hal_stub.h> // Our header
+
+#include <cyg/hal/hal_arch.h> // HAL_BREAKINST
+#include <cyg/hal/hal_cache.h> // HAL_xCACHE_x
+#include <cyg/hal/hal_intr.h> // interrupt disable/restore
+
+#include <cyg/hal/hal_if.h> // ROM calling interface
+#include <cyg/hal/hal_misc.h> // Helper functions
+
+#ifdef CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
+#include <cyg/hal/dbg-threads-api.h> // dbg_currthread_id
+#endif
+
+#ifdef USE_LONG_NAMES_FOR_ENUM_REGNAMES
+#ifndef PC
+#define PC REG_PC
+#endif
+#ifndef SP
+#define SP REG_SP
+#endif
+#endif
+
+//-----------------------------------------------------------------------------
+// Extra eCos data.
+
+// Some architectures use registers of different sizes, so NUMREGS
+// alone is not suffucient to size the register save area. For those
+// architectures, HAL_STUB_REGISTERS_SIZE is defined as the number
+// of target_register_t sized elements in the register save area.
+#ifndef HAL_STUB_REGISTERS_SIZE
+#define HAL_STUB_REGISTERS_SIZE NUMREGS
+#endif
+
+// Saved registers.
+HAL_SavedRegisters *_hal_registers;
+target_register_t registers[HAL_STUB_REGISTERS_SIZE];
+target_register_t alt_registers[HAL_STUB_REGISTERS_SIZE] ; // Thread or saved process state
+target_register_t * _registers = registers; // Pointer to current set of registers
+#ifndef CYGPKG_REDBOOT
+target_register_t orig_registers[HAL_STUB_REGISTERS_SIZE]; // Registers to get back to original state
+#endif
+
+#if defined(HAL_STUB_HW_WATCHPOINT) || defined(HAL_STUB_HW_BREAKPOINT)
+static int _hw_stop_reason; // Reason we were stopped by hw.
+
+//#define HAL_STUB_HW_SEND_STOP_REASON_TEXT
+#ifdef CYGINT_HAL_ARM_ARCH_XSCALE
+#define HAL_STUB_HW_SEND_STOP_REASON_TEXT
+#endif
+
+#ifdef HAL_STUB_HW_SEND_STOP_REASON_TEXT
+// strings indexed by hw stop reasons defined in hal_stub.h
+
+// Not all GDBs understand this.
+static const char * const _hw_stop_str[] = {
+ "",
+ "hbreak",
+ "watch",
+ "rwatch",
+ "awatch"
+};
+#endif // HAL_STUB_HW_SEND_STOP_REASON_TEXT
+
+static void *_watch_data_addr; // The data address if stopped by watchpoint
+#endif // defined(HAL_STUB_HW_WATCHPOINT) || defined(HAL_STUB_HW_BREAKPOINT)
+
+// Register validity checking
+#ifdef CYGHWR_REGISTER_VALIDITY_CHECKING
+int registers_valid[NUMREGS];
+int *_registers_valid = registers_valid;
+#endif
+
+#ifndef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT // this should go away
+// Interrupt control.
+static volatile __PFI __interruptible_control;
+#endif
+
+// Some architectures need extras regs reported in T packet
+#ifndef HAL_STUB_ARCH_T_PACKET_EXTRAS
+#define HAL_STUB_ARCH_T_PACKET_EXTRAS(x)
+#endif
+
+//-----------------------------------------------------------------------------
+// Register access
+
+#ifndef CYGARC_STUB_REGISTER_ACCESS_DEFINED
+// Return the currently-saved value corresponding to register REG of
+// the exception context.
+target_register_t
+get_register (regnames_t reg)
+{
+ return _registers[reg];
+}
+#endif
+
+#ifdef CYGHWR_REGISTER_VALIDITY_CHECKING
+// Return the validity of register REG.
+int
+get_register_valid (regnames_t reg)
+{
+ return _registers_valid[reg];
+}
+#endif
+
+#ifndef CYGARC_STUB_REGISTER_ACCESS_DEFINED
+// Store VALUE in the register corresponding to WHICH in the exception
+// context.
+void
+put_register (regnames_t which, target_register_t value)
+{
+#ifdef CYGPKG_HAL_MIPS_VR4300
+ // This is a rather nasty kludge to compensate for the fact that
+ // the VR4300 GDB is rather old and does not support proper 64 bit
+ // registers. The only time this really matters is when setting
+ // the PC after loading an executable. So here we detect this case
+ // and artificially sign extend it.
+
+ if( which == PC && (value & 0x0000000080000000ULL ) )
+ {
+ value |= 0xFFFFFFFF00000000ULL;
+ }
+#endif
+ _registers[which] = value;
+}
+#endif // CYGARC_STUB_REGISTER_ACCESS_DEFINED
+
+//-----------------------------------------------------------------------------
+// Serial stuff
+#ifdef CYGPKG_CYGMON
+extern void ecos_bsp_console_putc(char);
+extern char ecos_bsp_console_getc(void);
+#endif
+
+// Write C to the current serial port.
+void
+putDebugChar (int c)
+{
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+ __call_if_debug_procs_t __debug_procs = CYGACC_CALL_IF_DEBUG_PROCS();
+ CYGACC_COMM_IF_PUTC(*__debug_procs, c);
+#elif defined(CYGPKG_CYGMON)
+ ecos_bsp_console_putc(c);
+#else
+ HAL_STUB_PLATFORM_PUT_CHAR(c);
+#endif
+}
+
+// Read one character from the current serial port.
+int
+getDebugChar (void)
+{
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+ __call_if_debug_procs_t __debug_procs = CYGACC_CALL_IF_DEBUG_PROCS();
+ return CYGACC_COMM_IF_GETC(*__debug_procs);
+#elif defined(CYGPKG_CYGMON)
+ return ecos_bsp_console_getc();
+#else
+ return HAL_STUB_PLATFORM_GET_CHAR();
+#endif
+}
+
+// Flush output channel
+void
+hal_flush_output(void)
+{
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+ __call_if_debug_procs_t __debug_procs = CYGACC_CALL_IF_DEBUG_PROCS();
+ CYGACC_COMM_IF_CONTROL(*__debug_procs, __COMMCTL_FLUSH_OUTPUT);
+#endif
+}
+
+
+// Set the baud rate for the current serial port.
+void
+__set_baud_rate (int baud)
+{
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+ __call_if_debug_procs_t __debug_procs = CYGACC_CALL_IF_DEBUG_PROCS();
+ CYGACC_COMM_IF_CONTROL(*__debug_procs, __COMMCTL_SETBAUD, baud);
+#elif defined(CYGPKG_CYGMON)
+ // FIXME!
+#else
+ HAL_STUB_PLATFORM_SET_BAUD_RATE(baud);
+#endif
+}
+
+//-----------------------------------------------------------------------------
+// GDB interrupt (BREAK) support.
+
+#ifdef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
+
+#ifndef CYGPKG_HAL_ARM
+
+#if (HAL_BREAKINST_SIZE == 1)
+typedef cyg_uint8 t_inst;
+#elif (HAL_BREAKINST_SIZE == 2)
+typedef cyg_uint16 t_inst;
+#elif (HAL_BREAKINST_SIZE == 4)
+typedef cyg_uint32 t_inst;
+#else
+#error "Don't know how to handle that size"
+#endif
+
+typedef struct
+{
+ t_inst *targetAddr;
+ t_inst savedInstr;
+} instrBuffer;
+
+static instrBuffer break_buffer;
+
+volatile int cyg_hal_gdb_running_step = 0;
+
+void
+cyg_hal_gdb_place_break (target_register_t pc)
+{
+ cyg_hal_gdb_interrupt( pc ); // Let's hope this becomes a drop-through:
+}
+
+void
+cyg_hal_gdb_interrupt (target_register_t pc)
+{
+ t_inst break_inst = HAL_BREAKINST;
+
+ CYGARC_HAL_SAVE_GP();
+
+ // Clear flag that we Continued instead of Stepping
+ cyg_hal_gdb_running_step = 0;
+ // and override existing break? So that a ^C takes effect...
+ if (NULL != break_buffer.targetAddr)
+ cyg_hal_gdb_remove_break( (target_register_t)break_buffer.targetAddr );
+
+ if (NULL == break_buffer.targetAddr) {
+ // Not always safe to read/write directly to program
+ // memory due to possibly unaligned instruction, use the
+ // provided memory functions instead.
+ __read_mem_safe(&break_buffer.savedInstr, (t_inst*)pc, HAL_BREAKINST_SIZE);
+ __write_mem_safe(&break_inst, (t_inst*)pc, HAL_BREAKINST_SIZE);
+
+ // Save the PC where we put the break, so we can remove
+ // it after the target takes the break.
+ break_buffer.targetAddr = (t_inst*)pc;
+
+ __data_cache(CACHE_FLUSH);
+ __instruction_cache(CACHE_FLUSH);
+ }
+
+ CYGARC_HAL_RESTORE_GP();
+}
+
+int
+cyg_hal_gdb_remove_break (target_register_t pc)
+{
+ if ( cyg_hal_gdb_running_step )
+ return 0;
+
+ if ((t_inst*)pc == break_buffer.targetAddr) {
+
+ __write_mem_safe(&break_buffer.savedInstr, (t_inst*)pc, HAL_BREAKINST_SIZE);
+ break_buffer.targetAddr = NULL;
+
+ __data_cache(CACHE_FLUSH);
+ __instruction_cache(CACHE_FLUSH);
+ return 1;
+ }
+ return 0;
+}
+
+int
+cyg_hal_gdb_break_is_set (void)
+{
+ if (NULL != break_buffer.targetAddr) {
+ return 1;
+ }
+ return 0;
+}
+
+#endif // CYGPKG_HAL_ARM
+
+#endif // CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
+
+// Use this function to disable serial interrupts whenever reply
+// characters are expected from GDB. The reason we want to control
+// whether the target can be interrupted or not is simply that GDB on
+// the host will be sending acknowledge characters/commands while the
+// stub is running - if serial interrupts were still active, the
+// characters would never reach the (polling) getDebugChar.
+static void
+interruptible(int state)
+{
+ static int __interrupts_suspended = 0;
+
+ if (state) {
+ __interrupts_suspended--;
+ if (0 >= __interrupts_suspended) {
+ __interrupts_suspended = 0;
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT // this _check_ should go away
+ {
+ hal_virtual_comm_table_t* __chan;
+ __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+ CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_IRQ_ENABLE);
+ }
+#else
+ if (__interruptible_control)
+ __interruptible_control(1);
+#endif
+ }
+ } else {
+ __interrupts_suspended++;
+ if (1 == __interrupts_suspended)
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT // this _check_ should go away
+ {
+ hal_virtual_comm_table_t* __chan;
+ __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+ CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_IRQ_DISABLE);
+ }
+#else
+ if (__interruptible_control)
+ __interruptible_control(0);
+#endif
+ }
+}
+
+//-----------------------------------------------------------------------------
+// eCos stub entry and exit magic.
+
+#ifdef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
+int cyg_hal_gdb_break;
+#endif
+
+#ifdef CYGPKG_REDBOOT
+// Trampoline for returning to RedBoot from exception/stub code
+static void
+return_from_stub(int exit_status)
+{
+ CYGACC_CALL_IF_MONITOR_RETURN(exit_status);
+}
+#endif
+
+// Called at stub *kill*
+static void
+handle_exception_exit( void )
+{
+#ifdef CYGPKG_REDBOOT
+#ifdef CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+ { // Reset the timer to default and cancel any callback
+ extern void sys_profile_reset(void);
+ sys_profile_reset();
+ }
+#endif // CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+ set_pc((target_register_t)return_from_stub);
+#else
+ int i;
+
+ for (i = 0; i < (sizeof(registers)/sizeof(registers[0])); i++)
+ registers[i] = orig_registers[i];
+#endif
+}
+
+// Called at stub *entry*
+static void
+handle_exception_cleanup( void )
+{
+#ifndef CYGPKG_REDBOOT
+ static int orig_registers_set = 0;
+#endif
+
+ interruptible(0);
+
+ // Expand the HAL_SavedRegisters structure into the GDB register
+ // array format.
+ HAL_GET_GDB_REGISTERS(&registers[0], _hal_registers);
+ _registers = &registers[0];
+
+#ifndef CYGPKG_REDBOOT
+ if (!orig_registers_set) {
+ int i;
+ for (i = 0; i < (sizeof(registers)/sizeof(registers[0])); i++)
+ orig_registers[i] = registers[i];
+ _registers = &orig_registers[0];
+ if (__is_breakpoint_function ())
+ __skipinst ();
+ _registers = &registers[0];
+ orig_registers_set = 1;
+ }
+#endif
+
+#ifdef HAL_STUB_PLATFORM_STUBS_FIXUP
+ // Some architectures may need to fix the PC in case of a partial
+ // or fully executed trap instruction. GDB only takes correct action
+ // when the PC is pointing to the breakpoint instruction it set.
+ //
+ // Most architectures would leave PC pointing at the trap
+ // instruction itself though, and so do not need to do anything
+ // special.
+ HAL_STUB_PLATFORM_STUBS_FIXUP();
+#endif
+
+#ifdef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
+ // If we continued instead of stepping, when there was a break set
+ // ie. we were stepping within a critical region, clear the break, and
+ // that flag. If we stopped for some other reason, this has no effect.
+ if ( cyg_hal_gdb_running_step ) {
+ cyg_hal_gdb_running_step = 0;
+ cyg_hal_gdb_remove_break(get_register (PC));
+ }
+
+ // FIXME: (there may be a better way to do this)
+ // If we hit a breakpoint set by the gdb interrupt stub, make it
+ // seem like an interrupt rather than having hit a breakpoint.
+ cyg_hal_gdb_break = cyg_hal_gdb_remove_break(get_register (PC));
+#endif
+
+#if defined(HAL_STUB_HW_WATCHPOINT) || defined(HAL_STUB_HW_BREAKPOINT)
+ // For HW watchpoint/breakpoint support, we need to know if we
+ // stopped because of watchpoint or hw break. We do that here
+ // before GDB has a chance to remove the watchpoints and save
+ // the information for later use in building response packets.
+ _hw_stop_reason = HAL_STUB_IS_STOPPED_BY_HARDWARE(_watch_data_addr);
+#endif
+}
+
+// Called at stub *exit*
+static void
+handle_exception_init( void )
+{
+ // Compact register array again.
+ HAL_SET_GDB_REGISTERS(_hal_registers, &registers[0]);
+
+ interruptible(1);
+}
+
+
+//-----------------------------------------------------------------------------
+// Initialization.
+
+// Signal handler.
+int
+cyg_hal_process_signal (int signal)
+{
+ // We don't care about the signal (atm).
+ return 0;
+}
+
+// Install the standard set of trap handlers for the stub.
+void
+__install_traps (void)
+{
+ // Set signal handling vector so we can treat 'C<signum>' as 'c'.
+ __process_signal_vec = &cyg_hal_process_signal;
+ __process_exit_vec = &handle_exception_exit;
+
+ __cleanup_vec = &handle_exception_cleanup;
+ __init_vec = &handle_exception_init;
+
+#ifndef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT // this should go away
+#ifdef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
+ // Control of GDB interrupts.
+ __interruptible_control = HAL_STUB_PLATFORM_INTERRUPTIBLE;
+#endif
+#endif
+
+ // Nothing further to do, handle_exception will be called when an
+ // exception occurs.
+}
+
+// Initialize the hardware.
+void
+initHardware (void)
+{
+ static int initialized = 0;
+
+ if (initialized)
+ return;
+ initialized = 1;
+
+ // Get serial port initialized.
+ HAL_STUB_PLATFORM_INIT_SERIAL();
+
+#ifdef HAL_STUB_PLATFORM_INIT
+ // If the platform defines any initialization code, call it here.
+ HAL_STUB_PLATFORM_INIT();
+#endif
+
+#ifndef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT // this should go away
+#ifdef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
+ // Get interrupt handler initialized.
+ HAL_STUB_PLATFORM_INIT_BREAK_IRQ();
+#endif
+#endif // !CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+}
+
+// Reset the board.
+void
+__reset (void)
+{
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+ __call_if_reset_t *__rom_reset = CYGACC_CALL_IF_RESET_GET();
+ if (__rom_reset)
+ (*__rom_reset)();
+#else
+ HAL_PLATFORM_RESET();
+#endif
+}
+
+//-----------------------------------------------------------------------------
+// Breakpoint support.
+
+#ifndef CYGPKG_HAL_ARM
+// This function will generate a breakpoint exception. It is used at
+// the beginning of a program to sync up with a debugger and can be
+// used otherwise as a quick means to stop program execution and
+// "break" into the debugger.
+void
+breakpoint()
+{
+ HAL_BREAKPOINT(_breakinst);
+}
+
+// This function returns the opcode for a 'trap' instruction.
+unsigned long
+__break_opcode ()
+{
+ return HAL_BREAKINST;
+}
+#endif
+
+//-----------------------------------------------------------------------------
+// Write the 'T' packet in BUFFER. SIGVAL is the signal the program received.
+void
+__build_t_packet (int sigval, char *buf)
+{
+ target_register_t addr;
+ char *ptr = buf;
+ target_register_t extend_val = 0;
+
+ *ptr++ = 'T';
+ *ptr++ = __tohex (sigval >> 4);
+ *ptr++ = __tohex (sigval);
+
+#ifdef CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
+ // Include thread ID if thread manipulation is required.
+ {
+ int id = dbg_currthread_id ();
+
+ if (id != 0) {
+ *ptr++ = 't';
+ *ptr++ = 'h';
+ *ptr++ = 'r';
+ *ptr++ = 'e';
+ *ptr++ = 'a';
+ *ptr++ = 'd';
+ *ptr++ = ':';
+
+#if (CYG_BYTEORDER == CYG_LSBFIRST)
+ // FIXME: Temporary workaround for PR 18903. Thread ID must be
+ // big-endian in the T packet.
+ {
+ unsigned char* bep = (unsigned char*)&id;
+ int be_id;
+
+ be_id = id;
+ *bep++ = (be_id >> 24) & 0xff ;
+ *bep++ = (be_id >> 16) & 0xff ;
+ *bep++ = (be_id >> 8) & 0xff ;
+ *bep++ = (be_id & 0xff) ;
+ }
+#endif
+ ptr = __mem2hex((char *)&id, ptr, sizeof(id), 0);
+ *ptr++ = ';';
+ }
+ }
+#endif
+
+#ifdef HAL_STUB_HW_WATCHPOINT
+ switch(_hw_stop_reason) {
+ case HAL_STUB_HW_STOP_WATCH:
+ case HAL_STUB_HW_STOP_RWATCH:
+ case HAL_STUB_HW_STOP_AWATCH:
+#ifdef HAL_STUB_HW_SEND_STOP_REASON_TEXT
+ // Not all GDBs understand this.
+ strcpy(ptr, _hw_stop_str[_hw_stop_reason]);
+ ptr += strlen(_hw_stop_str[_hw_stop_reason]);
+#endif
+ *ptr++ = ':';
+ // Send address MSB first
+ ptr += __intToHex(ptr, (target_register_t)_watch_data_addr,
+ sizeof(_watch_data_addr) * 8);
+ *ptr++ = ';';
+ break;
+ default:
+ break;
+ }
+#endif
+
+ *ptr++ = __tohex (PC >> 4);
+ *ptr++ = __tohex (PC);
+ *ptr++ = ':';
+ addr = get_register (PC);
+ if (sizeof(addr) < REGSIZE(PC))
+ {
+ // GDB is expecting REGSIZE(PC) number of bytes.
+ // We only have sizeof(addr) number. Let's fill
+ // the appropriate number of bytes intelligently.
+#ifdef CYGARC_SIGN_EXTEND_REGISTERS
+ {
+ unsigned long bits_in_addr = (sizeof(addr) << 3); // ie Size in bytes * 8
+ target_register_t sign_bit_mask = (1 << (bits_in_addr - 1));
+ if ((addr & sign_bit_mask) == sign_bit_mask)
+ extend_val = ~0;
+ }
+#endif
+ }
+#if (CYG_BYTEORDER == CYG_MSBFIRST)
+ ptr = __mem2hex((char *)&extend_val, ptr, REGSIZE(PC) - sizeof(addr), 0);
+#endif
+ ptr = __mem2hex((char *)&addr, ptr, sizeof(addr), 0);
+#if (CYG_BYTEORDER == CYG_LSBFIRST)
+ ptr = __mem2hex((char *)&extend_val, ptr, REGSIZE(PC) - sizeof(addr), 0);
+#endif
+ *ptr++ = ';';
+
+ *ptr++ = __tohex (SP >> 4);
+ *ptr++ = __tohex (SP);
+ *ptr++ = ':';
+ addr = (target_register_t) get_register (SP);
+ if (sizeof(addr) < REGSIZE(SP))
+ {
+ // GDB is expecting REGSIZE(SP) number of bytes.
+ // We only have sizeof(addr) number. Let's fill
+ // the appropriate number of bytes intelligently.
+ extend_val = 0;
+#ifdef CYGARC_SIGN_EXTEND_REGISTERS
+ {
+ unsigned long bits_in_addr = (sizeof(addr) << 3); // ie Size in bytes * 8
+ target_register_t sign_bit_mask = (1 << (bits_in_addr - 1));
+ if ((addr & sign_bit_mask) == sign_bit_mask)
+ extend_val = ~0;
+ }
+#endif
+ ptr = __mem2hex((char *)&extend_val, ptr, REGSIZE(SP) - sizeof(addr), 0);
+ }
+ ptr = __mem2hex((char *)&addr, ptr, sizeof(addr), 0);
+ *ptr++ = ';';
+
+ HAL_STUB_ARCH_T_PACKET_EXTRAS(ptr);
+
+ *ptr++ = 0;
+}
+
+
+//-----------------------------------------------------------------------------
+// Cache functions.
+
+// Perform the specified operation on the instruction cache.
+// Returns 1 if the cache is enabled, 0 otherwise.
+int
+__instruction_cache (cache_control_t request)
+{
+ int state = 1;
+
+ switch (request) {
+ case CACHE_ENABLE:
+ HAL_ICACHE_ENABLE();
+ break;
+ case CACHE_DISABLE:
+ HAL_ICACHE_DISABLE();
+ state = 0;
+ break;
+ case CACHE_FLUSH:
+ HAL_ICACHE_SYNC();
+ break;
+ case CACHE_NOOP:
+ /* fall through */
+ default:
+ break;
+ }
+
+#ifdef HAL_ICACHE_IS_ENABLED
+ HAL_ICACHE_IS_ENABLED(state);
+#endif
+
+ return state;
+}
+
+// Perform the specified operation on the data cache.
+// Returns 1 if the cache is enabled, 0 otherwise.
+int
+__data_cache (cache_control_t request)
+{
+ int state = 1;
+
+ switch (request) {
+ case CACHE_ENABLE:
+ HAL_DCACHE_ENABLE();
+ break;
+ case CACHE_DISABLE:
+ HAL_DCACHE_DISABLE();
+ state = 0;
+ break;
+ case CACHE_FLUSH:
+ HAL_DCACHE_SYNC();
+ break;
+ case CACHE_NOOP:
+ /* fall through */
+ default:
+ break;
+ }
+#ifdef HAL_DCACHE_IS_ENABLED
+ HAL_DCACHE_IS_ENABLED(state);
+#endif
+
+ return state;
+}
+
+//-----------------------------------------------------------------------------
+// Memory accessor functions.
+
+// The __mem_fault_handler pointer is volatile since it is only
+// set/cleared by the function below - which does not rely on any
+// other functions, so the compiler may decide to not bother updating
+// the pointer at all. If any of the memory accesses cause an
+// exception, the pointer must be set to ensure the exception handler
+// can make use of it.
+
+void* volatile __mem_fault_handler = (void *)0;
+
+/* These are the "arguments" to __do_read_mem and __do_write_mem,
+ which are passed as globals to avoid squeezing them thru
+ __set_mem_fault_trap. */
+
+static volatile target_register_t memCount;
+
+static void
+__do_copy_mem (unsigned char* src, unsigned char* dst)
+{
+ unsigned long *long_dst;
+ unsigned long *long_src;
+ unsigned short *short_dst;
+ unsigned short *short_src;
+
+ // Zero memCount is not really an error, but the goto is necessary to
+ // keep some compilers from reordering stuff across the 'err' label.
+ if (memCount == 0) goto err;
+
+ __mem_fault = 1; /* Defaults to 'fail'. Is cleared */
+ /* when the copy loop completes. */
+ __mem_fault_handler = &&err;
+
+ // See if it's safe to do multi-byte, aligned operations
+ while (memCount) {
+ if ((memCount >= sizeof(long)) &&
+ (((target_register_t)dst & (sizeof(long)-1)) == 0) &&
+ (((target_register_t)src & (sizeof(long)-1)) == 0)) {
+
+ long_dst = (unsigned long *)dst;
+ long_src = (unsigned long *)src;
+
+ *long_dst++ = *long_src++;
+ memCount -= sizeof(long);
+
+ dst = (unsigned char *)long_dst;
+ src = (unsigned char *)long_src;
+ } else if ((memCount >= sizeof(short)) &&
+ (((target_register_t)dst & (sizeof(short)-1)) == 0) &&
+ (((target_register_t)src & (sizeof(short)-1)) == 0)) {
+
+ short_dst = (unsigned short *)dst;
+ short_src = (unsigned short *)src;
+
+ *short_dst++ = *short_src++;
+ memCount -= sizeof(short);
+
+ dst = (unsigned char *)short_dst;
+ src = (unsigned char *)short_src;
+ } else {
+ *dst++ = *src++;
+ memCount--;
+ }
+ }
+
+ __mem_fault = 0;
+
+ err:
+ __mem_fault_handler = (void *)0;
+}
+
+/*
+ * __read_mem_safe:
+ * Get contents of target memory, abort on error.
+ */
+
+int
+__read_mem_safe (void *dst, void *src, int count)
+{
+ if( !CYG_HAL_STUB_PERMIT_DATA_READ( src, count ) )
+ return 0;
+
+ memCount = count;
+ __do_copy_mem((unsigned char*) src, (unsigned char*) dst);
+ return count - memCount; // return number of bytes successfully read
+}
+
+/*
+ * __write_mem_safe:
+ * Set contents of target memory, abort on error.
+ */
+
+int
+__write_mem_safe (void *src, void *dst, int count)
+{
+ if( !CYG_HAL_STUB_PERMIT_DATA_READ( dst, count ) )
+ return 0;
+
+ memCount = count;
+ __do_copy_mem((unsigned char*) src, (unsigned char*) dst);
+ return count - memCount; // return number of bytes successfully written
+}
+
+#ifdef TARGET_HAS_HARVARD_MEMORY
+static void
+__do_copy_from_progmem (unsigned char* src, unsigned char* dst)
+{
+ unsigned long *long_dst;
+ unsigned long *long_src;
+ unsigned short *short_dst;
+ unsigned short *short_src;
+
+ // Zero memCount is not really an error, but the goto is necessary to
+ // keep some compilers from reordering stuff across the 'err' label.
+ if (memCount == 0) goto err;
+
+ __mem_fault = 1; /* Defaults to 'fail'. Is cleared */
+ /* when the copy loop completes. */
+ __mem_fault_handler = &&err;
+
+ // See if it's safe to do multi-byte, aligned operations
+ while (memCount) {
+ if ((memCount >= sizeof(long)) &&
+ (((target_register_t)dst & (sizeof(long)-1)) == 0) &&
+ (((target_register_t)src & (sizeof(long)-1)) == 0)) {
+
+ long_dst = (unsigned long *)dst;
+ long_src = (unsigned long *)src;
+
+ *long_dst++ = __read_prog_uint32(long_src++);
+ memCount -= sizeof(long);
+
+ dst = (unsigned char *)long_dst;
+ src = (unsigned char *)long_src;
+ } else if ((memCount >= sizeof(short)) &&
+ (((target_register_t)dst & (sizeof(short)-1)) == 0) &&
+ (((target_register_t)src & (sizeof(short)-1)) == 0)) {
+
+ short_dst = (unsigned short *)dst;
+ short_src = (unsigned short *)src;
+
+ *short_dst++ = __read_prog_uint16(short_src++);
+ memCount -= sizeof(short);
+
+ dst = (unsigned char *)short_dst;
+ src = (unsigned char *)short_src;
+ } else {
+ *dst++ = __read_prog_uint8(src++);
+ memCount--;
+ }
+ }
+
+ __mem_fault = 0;
+
+ err:
+ __mem_fault_handler = (void *)0;
+}
+
+static void
+__do_copy_to_progmem (unsigned char* src, unsigned char* dst)
+{
+ unsigned long *long_dst;
+ unsigned long *long_src;
+ unsigned short *short_dst;
+ unsigned short *short_src;
+
+ // Zero memCount is not really an error, but the goto is necessary to
+ // keep some compilers from reordering stuff across the 'err' label.
+ if (memCount == 0) goto err;
+
+ __mem_fault = 1; /* Defaults to 'fail'. Is cleared */
+ /* when the copy loop completes. */
+ __mem_fault_handler = &&err;
+
+ // See if it's safe to do multi-byte, aligned operations
+ while (memCount) {
+ if ((memCount >= sizeof(long)) &&
+ (((target_register_t)dst & (sizeof(long)-1)) == 0) &&
+ (((target_register_t)src & (sizeof(long)-1)) == 0)) {
+
+ long_dst = (unsigned long *)dst;
+ long_src = (unsigned long *)src;
+
+ __write_prog_uint32(long_dst++, *long_src++);
+ memCount -= sizeof(long);
+
+ dst = (unsigned char *)long_dst;
+ src = (unsigned char *)long_src;
+ } else if ((memCount >= sizeof(short)) &&
+ (((target_register_t)dst & (sizeof(short)-1)) == 0) &&
+ (((target_register_t)src & (sizeof(short)-1)) == 0)) {
+
+ short_dst = (unsigned short *)dst;
+ short_src = (unsigned short *)src;
+
+ __write_prog_uint16(short_dst++, *short_src++);
+ memCount -= sizeof(short);
+
+ dst = (unsigned char *)short_dst;
+ src = (unsigned char *)short_src;
+ } else {
+ __write_prog_uint8(dst++, *src++);
+ memCount--;
+ }
+ }
+
+ __mem_fault = 0;
+
+ err:
+ __mem_fault_handler = (void *)0;
+}
+
+/*
+ * __read_progmem_safe:
+ * Get contents of target memory, abort on error.
+ */
+
+int
+__read_progmem_safe (void *dst, void *src, int count)
+{
+ if( !CYG_HAL_STUB_PERMIT_CODE_READ( src, count ) )
+ return 0;
+
+ memCount = count;
+ __do_copy_from_progmem((unsigned char*) src, (unsigned char*) dst);
+ return count - memCount; // return number of bytes successfully read
+}
+
+/*
+ * __write_progmem_safe:
+ * Set contents of target memory, abort on error.
+ */
+
+int
+__write_progmem_safe (void *src, void *dst, int count)
+{
+ if( !CYG_HAL_STUB_PERMIT_CODE_WRITE( dst, count ) )
+ return 0;
+
+ memCount = count;
+ __do_copy_to_progmem((unsigned char*) src, (unsigned char*) dst);
+ return count - memCount; // return number of bytes successfully written
+}
+#endif
+
+//-----------------------------------------------------------------------------
+// Target extras?!
+int
+__process_target_query(char * pkt, char * out, int maxOut)
+{ return 0 ; }
+int
+__process_target_set(char * pkt, char * out, int maxout)
+{ return 0 ; }
+int
+__process_target_packet(char * pkt, char * out, int maxout)
+{ return 0 ; }
+
+// GDB string output, making sure interrupts are disabled.
+// This function gets used by some diag output functions.
+void
+hal_output_gdb_string(target_register_t str, int string_len)
+{
+ unsigned long __state;
+ HAL_DISABLE_INTERRUPTS(__state);
+ __output_gdb_string(str, string_len);
+ HAL_RESTORE_INTERRUPTS(__state);
+}
+
+#endif // CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
diff --git a/cesar/ecos/packages/hal/common/current/src/stubrom/stubrom.c b/cesar/ecos/packages/hal/common/current/src/stubrom/stubrom.c
new file mode 100644
index 0000000000..1b42cba4c0
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/src/stubrom/stubrom.c
@@ -0,0 +1,61 @@
+/*==========================================================================
+//
+// stubrom.c
+//
+// GDB Stub ROM main
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1998-06-02
+// Purpose: GDB Stub ROM main
+// Description: Main program for GDB stub ROM. It simply set the debug
+// traps and then breakpoints so we can talk to GDB.
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================*/
+
+#include <cyg/hal/hal_stub.h>
+
+void cyg_start (void)
+{
+ for(;;) breakpoint();
+}
+
+// End of stubrom.c
diff --git a/cesar/ecos/packages/hal/common/current/src/thread-packets.c b/cesar/ecos/packages/hal/common/current/src/thread-packets.c
new file mode 100644
index 0000000000..012360d506
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/src/thread-packets.c
@@ -0,0 +1,1414 @@
+//========================================================================
+//
+// thread-packets.c
+//
+// Provides multi-threaded debug support
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Red Hat, nickg
+// Contributors: Red Hat, nickg
+// Date: 1998-08-25
+// Purpose:
+// Description: Provides multi-threaded debug support
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// Define __ECOS__; allows all eCos specific additions to be easily identified.
+#define __ECOS__
+
+
+// #ifdef __ECOS__
+#include <pkgconf/hal.h>
+
+#if defined(CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT) \
+ && defined(CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS)
+// #endif // __ECOS__
+
+/* FIXME: Scan this module for correct sizes of fields in packets */
+
+#ifdef __ECOS__
+#include <cyg/hal/dbg-threads-api.h>
+#else // __ECOS__
+#include "dbg-threads-api.h"
+#endif // __ECOS__
+
+/* This file should ALWAYS define debug thread support */
+/* Dont include the object in the link if you dont need the support */
+/* This is NOT the internal unit debug flag, it is a feature control */
+#if defined(DEBUG_THREADS)
+#undef DEBUG_THREADS
+#endif
+
+#define DEBUG_THREADS 1
+#define UNIT_TEST 0
+#define GDB_MOCKUP 0
+
+
+#define STUB_BUF_MAX 300 /* for range checking of packet lengths */
+
+#include "thread-pkts.h"
+
+#ifdef __ECOS__
+// Use HAL rather than board.h in eCos
+#include <cyg/hal/hal_stub.h>
+#else // __ECOS__
+#include "board.h"
+#endif // __ECOS__
+
+/*
+ * Export the continue and "general" (context) thread IDs from GDB.
+ */
+int _gdb_cont_thread ;
+int _gdb_general_thread ;
+
+#if !defined(PKT_DEBUG)
+#define PKT_DEBUG 0
+#endif
+extern void output_string(char * message) ;
+
+#if PKT_DEBUG
+void output_threadid(char * title,threadref * ref) ;
+#warning "PKT_DEBUG macros engaged"
+#define PKT_TRACE(title,packet) \
+{ output_string(title) ; output_string(packet) ; output_string("\n") ;}
+#else
+#define PKT_TRACE(title,packet) {}
+#endif
+
+
+/* This is going to be irregular because the various implementations
+ have adopted different names for registers.
+ It would be nice to fix them to have a common convention
+ _stub_registers
+ stub_registers
+ alt_stub_registers
+ */
+
+extern target_register_t * _registers ;
+ /* A pointer to the current set of registers */
+extern target_register_t registers[]; /* The current saved registers */
+extern target_register_t alt_registers[] ;
+ /* Thread or saved process state */
+
+
+static void stub_copy_registers(
+ target_register_t * dest,
+ target_register_t *src
+ )
+{
+ target_register_t * limit ;
+ limit = dest + NUMREGS ;
+
+ while (dest < limit) *dest++ = *src++ ;
+}
+
+#ifdef __ECOS__
+void __stub_copy_registers(target_register_t * dest,
+ target_register_t *src)
+{
+ stub_copy_registers(dest, src);
+}
+#endif // __ECOS__
+
+extern int stubhex(char ch) ;
+
+/* ----- STUB_PACK_NAK ----------------------------------- */
+/* Pack an error response into the response packet */
+
+char * stub_pack_nak(char * outbuf)
+{
+ *outbuf++ = 'E' ;
+ *outbuf++ = '0' ;
+ *outbuf++ = '2' ;
+ return outbuf ;
+} /* stub_pack_nak */
+
+/* ----- STUB_PACK_ACK -------------------------- */
+/* Pack an OK achnowledgement */
+char * stub_pack_ack(char * outbuf)
+{
+ *outbuf++ = 'O' ;
+ *outbuf++ = 'K' ;
+ return outbuf ;
+} /* stub_pack_ack */
+
+/* ------- STUB_UNPACK_INT ------------------------------- */
+/* Unpack a few bytes and return its integer value */
+/* This is where I wish functions could return several values
+ I would also advance the buffer pointer */
+
+int stub_unpack_int(char * buff,int fieldlength)
+{
+ int retval = 0 ;
+ int nibble ;
+ while (fieldlength)
+ { nibble = stubhex(*buff++) ;
+ retval |= nibble ;
+ fieldlength-- ;
+ if (fieldlength) retval = retval << 4 ;
+ }
+ return retval ;
+} /* stub_unpack_int */
+
+static char * unpack_byte(char * buf, int * value)
+{
+ *value = stub_unpack_int(buf,2) ;
+ return buf + 2 ;
+}
+
+static char * unpack_int(char * buf, int * value)
+{
+ *value = stub_unpack_int(buf,8) ;
+ return buf + 8 ;
+}
+
+/* We are NOT depending upon extensive libraries */
+static int ishex(char ch,int *val)
+{
+ if ((ch >= 'a') && (ch <= 'f'))
+ { *val =ch - 'a' + 10 ; return 1 ; }
+ if ((ch >= 'A') && (ch <= 'F'))
+ { *val = ch - 'A' + 10 ; return 1 ;}
+ if ((ch >= '0') && (ch <= '9'))
+ { *val = ch - '0' ; return 1 ; }
+ return 0 ;
+} /* ishex */
+
+static char * unpack_nibble(char * buf,int * val)
+{
+ ishex(*buf++,val) ;
+ return buf ;
+}
+
+
+static const char hexchars[] = "0123456789abcdef";
+
+static char * pack_hex_byte(char * pkt, unsigned char byte)
+{
+ *pkt++ = hexchars[(byte >> 4) & 0xf] ;
+ *pkt++ = hexchars[(byte & 0xf)] ;
+ return pkt ;
+} /* pack_hex_byte */
+
+#ifndef __ECOS__
+/* ---- STUB_PACK_VARLEN_HEX ------------------------------------- */
+/* Format a variable length stream of hex bytes */
+
+static char * pack_varlen_hex(
+ char * pkt,
+ unsigned int value)
+{
+ int i ;
+ static unsigned char n[8] ;
+ if (value == 0)
+ {
+ *pkt++ = '0' ;
+ return pkt ;
+ }
+ else
+ {
+ i = 8 ;
+ while (i-- >= 0 ) /* unpack nibbles into a char array */
+ {
+ n[i] = value & 0x0f ;
+ value = value >> 4 ;
+ }
+ i = 0 ; /* we had decrmented it to -1 */
+ while (n[i] == 0 ) i++ ; /* drop leading zeroes */
+ while (i++ < 8) *pkt++ = hexchars[n[i]] ; /* pack the number */
+ }
+ return pkt ;
+} /* pack_varlen_hex */
+#endif // !__ECOS__
+
+
+/* ------ STUB_UNPACK_VARLEN_HEX -------------------------------- */
+/* Parse a stream of hex bytes which may be of variable length */
+/* return the pointer to the next char */
+/* modify a varparm containing the result */
+/* A failure would look like a non-increment of the buffer pointer */
+
+/* This unpacks hex strings that may have been packed using sprintf(%x) */
+/* We assume some non-hex delimits them */
+
+char * unpack_varlen_hex(
+ char * buff, /* packet to parse */
+ int * result)
+{
+ int nibble ;
+ int retval ;
+ retval = 0 ;
+
+ while (ishex(*buff,&nibble))
+ {
+ buff++ ;
+ retval = retval << 4 ;
+ retval |= nibble & 0x0f ;
+ }
+ *result = retval ;
+ return buff ;
+} /* stub_unpack_varlen_int */
+
+
+/* ------ UNPACK_THREADID ------------------------------- */
+/* A threadid is a 64 bit quantity */
+
+#define BUFTHREADIDSIZ 16 /* encode 64 bits in 16 chars of hex */
+
+static char * unpack_threadid(char * inbuf, threadref * id)
+{
+ char * altref ;
+ char * limit = inbuf + BUFTHREADIDSIZ ;
+ int x,y ;
+ altref = (char *) id ;
+
+ while (inbuf < limit)
+ {
+ x = stubhex(*inbuf++) ;
+ y = stubhex(*inbuf++) ;
+ *altref++ = (x << 4) | y ;
+ }
+ return inbuf ;
+} /* unpack_threadid */
+
+
+
+/* Pack an integer use leading zeroes */
+static char * pack_int(char * buf,int value)
+{
+ buf = pack_hex_byte(buf,(value>> 24)& 0xff) ;
+ buf = pack_hex_byte(buf,(value >>16)& 0xff) ;
+ buf = pack_hex_byte(buf,(value >>8) & 0x0ff) ;
+ buf = pack_hex_byte(buf,(value & 0xff)) ;
+ return buf ;
+} /* pack_int */
+
+
+/* -------- PACK_STRING ---------------------------------------------- */
+/* This stupid string better not contain any funny characters */
+/* Also, the GDB protocol will not cope with NULLs in the
+ string or at the end of it.
+ While is is posable to encapsulate the protocol in ays that
+ preclude filtering for # I am assuming this is a constraint.
+*/
+
+static char * pack_raw_string(char * pkt,char * string)
+{
+ char ch ;
+ while (0 != (ch = *string++)) *pkt++ = ch ;
+ return pkt ;
+}
+
+static char * pack_string(
+ char * pkt,
+ char * string)
+{
+ char ch ;
+#ifdef __ECOS__
+ int len = 0;
+ char *s = string;
+ while( *s++ ) len++;
+#else // __ECOS__
+ int len ;
+ len = strlen(string) ;
+#endif // __ECOS
+ if (len > 200 ) len = 200 ; /* Bigger than most GDB packets, junk??? */
+ pkt = pack_hex_byte(pkt,len) ;
+ while (len-- > 0)
+ {
+ ch = *string++ ;
+ if ((ch == '\0') || (ch == '#')) ch = '*' ; /* Protect encapsulation */
+ *pkt++ = ch ;
+ }
+ return pkt ;
+} /* pack_string */
+
+
+/* ----- STUB_PACK_THREADID --------------------------------------------- */
+/* Convert a binary 64 bit threadid and pack it into a xmit buffer */
+/* Return the advanced buffer pointer */
+
+static char * pack_threadid(char * pkt, threadref * id)
+{
+ char * limit ;
+ unsigned char * altid ;
+ altid = (unsigned char *) id ;
+ limit = pkt + BUFTHREADIDSIZ ;
+ while (pkt < limit) pkt = pack_hex_byte(pkt,*altid++) ;
+ return pkt ;
+} /* stub_pack_threadid */
+
+/* UNFORTUNATELY, not all of the extended debugging system has yet been
+ converted to 64 but thread references and process identifiers.
+ These routines do the conversion.
+ An array of bytes is the correct treatment of an opaque identifier.
+ ints have endian issues.
+ */
+
+static void int_to_threadref(threadref * id, int value)
+{
+ unsigned char * scan ;
+ scan = (unsigned char *) id ;
+ {
+ int i = 4 ;
+ while (i--) *scan++ = 0 ;
+ }
+ *scan++ = (value >> 24) & 0xff ;
+ *scan++ = (value >> 16) & 0xff ;
+ *scan++ = (value >> 8) & 0xff ;
+ *scan++ = (value & 0xff) ;
+}
+
+static int threadref_to_int(threadref * ref)
+{
+ int value = 0 ;
+ unsigned char * scan ;
+ int i ;
+
+ scan = (char *) ref ;
+ scan += 4 ;
+ i = 4 ;
+ while (i-- > 0) value = (value << 8) | ((*scan++) & 0xff) ;
+ return value ;
+} /* threadref_to_int */
+
+void copy_threadref(threadref * dest, threadref * src)
+{
+ int i ;
+ unsigned char * csrc, * cdest ;
+ csrc = (unsigned char *) src ;
+ cdest = (unsigned char *) dest ;
+ i = 8 ;
+ while (i--) *cdest++ = *csrc++ ;
+}
+
+
+int threadmatch(
+ threadref * dest ,
+ threadref * src
+ )
+{
+ unsigned char * srcp, * destp ;
+ int i , result ;
+ srcp = (char *) src ;
+ destp = (char *) dest ;
+ i = 8 ;
+ result = 1 ;
+ while (i-- > 0 ) result &= (*srcp++ == *destp++) ? 1 : 0 ;
+ return result ;
+} /* threadmatch */
+
+
+
+static char * Tpkt_threadtag = "thread:" ;
+
+/* ----- STUB_PACK_TPKT_THREADID ------------------------------------ */
+/* retreive, tag and insert a thread identifier into a T packet. */
+/* Insert nothing if the thread identifier is not available */
+
+char * stub_pack_Tpkt_threadid(char * pkt)
+{
+ static threadref thread ;
+ int fmt = 0 ; /* old format */
+ PKT_TRACE("Tpkt-id","---") ;
+ if (dbg_currthread(&thread))
+ {
+ pkt = pack_raw_string(pkt,Tpkt_threadtag) ;
+ if (fmt)
+ pkt = pack_threadid(pkt,&thread) ;
+ else
+ /* Until GDB lengthens its thread ids, we have to MASH
+ the threadid into somthing shorter. PLEASE FIX GDB */
+ pkt = pack_int(pkt,threadref_to_int(&thread)) ;
+ *pkt++ = ';' ; /* terminate variable length int */
+ *pkt = '\0' ; /* Null terminate to allow string to be printed, no++ */
+ }
+ PKT_TRACE("packedTpkt","--") ;
+ return pkt ;
+} /* stub_pack_Tpkt_threadid */
+
+long stub_get_currthread (void)
+{
+ threadref thread ;
+
+ if (dbg_currthread(&thread))
+ return threadref_to_int(&thread) ;
+ else
+ return 0 ;
+}
+
+void stub_pkt_currthread(
+ char * inbuf,
+ char * outbuf,
+ int bufmax)
+{
+ threadref thread ;
+ char * base_out ;
+ base_out = outbuf ;
+
+ if (dbg_currthread(&thread))
+ {
+ *outbuf++ = 'Q' ;
+ *outbuf++ = 'C' ; /* FIXME: Is this a reasonable code */
+ outbuf = pack_int(outbuf, threadref_to_int(&thread)) ; /* Short form */
+ }
+ else outbuf = stub_pack_nak(outbuf) ;
+ *outbuf = '\0' ; /* terminate response packet */
+ PKT_TRACE("stub_pkt_currthread(resp) ",base_out) ;
+} /* stub_pkt_currthread */
+
+/* ----- STUB_PKT_THREAD_ALIVE --------------------------------- */
+/* Answer the thread alive query */
+
+static int thread_alive (int id)
+{
+ threadref thread ;
+ struct cygmon_thread_debug_info info ;
+
+ int_to_threadref(&thread, id) ;
+ if (dbg_threadinfo(&thread, &info) &&
+ info.context_exists)
+ return 1 ;
+ else
+ return 0 ;
+}
+
+void stub_pkt_thread_alive(char * inbuf,
+ char * outbuf,
+ int bufmax)
+{
+ char * prebuf = inbuf ;
+ int result ;
+
+ if (prebuf != (inbuf = unpack_varlen_hex(inbuf,&result)))
+ {
+ if (thread_alive(result))
+ {
+ outbuf = stub_pack_ack(outbuf) ;
+ *outbuf = '\0' ;
+ return ;
+ }
+ }
+ outbuf = stub_pack_nak(outbuf) ;
+ *outbuf = '\0' ; /* terminate the response message */
+} /* stub_pkt_thread_alive */
+
+
+
+/* ----- STUB_PKT_CHANGETHREAD ------------------------------- */
+/* Switch the display of registers to that of a saved context */
+
+/* Changing the context makes NO sense, although the packets define the
+ capability. Therefore, the option to change the context back does
+ call the function to change registers. Also, there is no
+ forced context switch.
+ 'p' - New format, long long threadid, no special cases
+ 'c' - Old format, id for continue, 32 bit threadid max, possably less
+ -1 means continue all threads
+ 'g' - Old Format, id for general use (other than continue)
+
+ replies:
+ OK for success
+ ENN for error
+ */
+
+void stub_pkt_changethread(
+ char * inbuf,
+ char * outbuf,
+ int bufmax)
+{
+ threadref id ;
+ int idefined = -1 ;
+ char ch ;
+ PKT_TRACE("setthread-pkt ",inbuf) ;
+
+ /* Parse the incoming packet for a thread identifier */
+ switch (ch = *inbuf++ ) /* handle various packet formats */
+ {
+ case 'p' : /* New format: mode:8,threadid:64 */
+ inbuf = unpack_nibble(inbuf,&idefined) ;
+ inbuf = unpack_threadid(inbuf,&id) ; /* even if startflag */
+ break ;
+ case 'c' : /* old format , specify thread for continue */
+ if (inbuf[0] == '-' && inbuf[1] == '1') /* Hc-1 */
+ _gdb_cont_thread = 0 ;
+ else
+ inbuf = unpack_varlen_hex(inbuf, &_gdb_cont_thread) ;
+
+ if (_gdb_cont_thread == 0 || /* revert to any old thread */
+ thread_alive(_gdb_cont_thread)) /* specified thread is alive */
+ outbuf = stub_pack_ack(outbuf) ;
+ else
+ outbuf = stub_pack_nak(outbuf) ;
+ break ;
+ case 'g' : /* old format, specify thread for general operations */
+ /* OLD format: parse a variable length hex string */
+ /* OLD format consider special thread ids */
+ {
+ inbuf = unpack_varlen_hex(inbuf, &_gdb_general_thread) ;
+ int_to_threadref(&id, _gdb_general_thread) ;
+ switch (_gdb_general_thread)
+ {
+ case 0 : /* pick a thread, any thread */
+ idefined = 2 ; /* select original interrupted context */
+ break ;
+ case -1 : /* all threads */
+ idefined = 2 ;
+ break ;
+ default :
+ idefined = 1 ; /* select the specified thread */
+ break ;
+ }
+ }
+ break ;
+ default:
+ outbuf = stub_pack_nak(outbuf) ;
+ break ;
+ } /* handle various packet formats */
+
+ switch (idefined)
+ {
+ case -1 :
+ /* Packet not supported, already NAKed, no further action */
+ break ;
+ case 0 :
+ /* Switch back to interrupted context */
+ _registers = &registers[0] ;
+ break ;
+ case 1 :
+ /* copy the saved registers into the backup registers */
+ stub_copy_registers(alt_registers,registers) ;
+ /* The OS will now update the values it has in a saved process context*/
+ if (dbg_getthreadreg(&id,NUMREGS,&alt_registers[0]))
+ {
+ /* switch the registers pointer */
+ _registers = &alt_registers[0] ;
+ outbuf = stub_pack_ack(outbuf) ;
+ }
+ else
+ outbuf = stub_pack_nak(outbuf) ;
+ break ;
+ case 2 :
+ /* switch to interrupted context */
+ outbuf = stub_pack_ack(outbuf) ;
+ break ;
+ default:
+ outbuf = stub_pack_nak(outbuf) ;
+ break ;
+ }
+ *outbuf = '\0' ; /* Terminate response pkt */
+} /* stub_pkt_changethread */
+
+
+/* ---- STUB_PKT_GETTHREADLIST ------------------------------- */
+/* Get a portion of the threadlist or process list */
+/* This may be part of a multipacket transaction */
+/* It would be hard to tell in the response packet the difference
+ between the end of list and an error in threadid encoding.
+ */
+
+void stub_pkt_getthreadlist(char * inbuf,
+ char * outbuf,
+ int bufmax)
+{
+ char * count_ptr ;
+ char * done_ptr ;
+ char * limit ;
+ int start_flag , batchsize , result , count ;
+ static threadref lastthread, nextthread ;
+
+#if PKT_DEBUG
+ char * r_base = outbuf ;
+#endif
+ PKT_TRACE("pkt_getthreadlist: ",inbuf) ;
+
+ count = 0 ;
+ inbuf = unpack_nibble(inbuf,&start_flag) ;
+ inbuf = unpack_byte(inbuf,&batchsize) ;
+ inbuf = unpack_threadid(inbuf,&lastthread) ; /* even if startflag */
+
+ /* Start building response packet */
+ limit = outbuf + (bufmax - BUFTHREADIDSIZ - 10) ; /* id output packing limit */
+ *outbuf++ = 'Q' ;
+ *outbuf++ = 'M' ;
+
+ /* Default values for count and done fields, save ptr to repatch */
+ count_ptr = outbuf ; /* save to repatch count */
+ outbuf = pack_hex_byte(outbuf,0) ;
+ done_ptr = outbuf ; /* Backpatched later */
+ *outbuf++ = '0' ; /* Done = 0 by default */
+ outbuf = pack_threadid(outbuf,&lastthread) ;
+
+ /* Loop through the threadid packing */
+ while ((outbuf < limit) && (count < batchsize))
+ {
+ result = dbg_threadlist(start_flag,&lastthread,&nextthread) ;
+ start_flag = 0 ; /* redundant but effective */
+ if (!result)
+ { *done_ptr = '1' ; /* pack the done flag */
+ break ;
+ }
+#if 0 /* DEBUG */
+ if (threadmatch(&lastthread,&nextthread))
+ {
+ output_string("FAIL: Threadlist, not incrementing\n") ;
+ *done_ptr = '1' ;
+ break ;
+ }
+#endif
+ count++ ;
+ outbuf = pack_threadid(outbuf,&nextthread) ;
+ copy_threadref(&lastthread,&nextthread) ;
+ }
+ pack_hex_byte(count_ptr,count) ;/* backpatch, Pack the count field */
+ *outbuf = '\0' ;
+ PKT_TRACE("pkt_getthreadlist(resp) ",r_base) ;
+} /* pkt_getthreadlist */
+
+
+
+
+/* ----- STUB_PKT_GETTHREADINFO ---------------------------------------- */
+/* Get the detailed information about a specific thread or process */
+
+/*
+Encoding:
+ 'Q':8,'P':8,mask:16
+
+ Mask Fields
+ threadid:1, # always request threadid
+ context_exists:2,
+ display:4,
+ unique_name:8,
+ more_display:16
+ */
+
+void stub_pkt_getthreadinfo(
+ char * inbuf,
+ char * outbuf,
+ int bufmax)
+{
+ int mask ;
+ int result ;
+ threadref thread ;
+ struct cygmon_thread_debug_info info ;
+
+ info.context_exists = 0 ;
+ info.thread_display = 0 ;
+ info.unique_thread_name = 0 ;
+ info.more_display = 0 ;
+
+ /* Assume the packet identification chars have already been
+ discarded by the packet demultiples routines */
+ PKT_TRACE("PKT getthreadinfo",inbuf) ;
+
+ inbuf = unpack_int(inbuf,&mask) ;
+ inbuf = unpack_threadid(inbuf,&thread) ;
+
+ result = dbg_threadinfo(&thread,&info) ; /* Make system call */
+
+ if (result)
+ {
+ *outbuf++ = 'q' ;
+ *outbuf++ = 'p' ;
+ outbuf = pack_int(outbuf,mask) ;
+ outbuf = pack_threadid(outbuf,&info.thread_id) ; /* echo threadid */
+ if (mask & 2) /* context-exists */
+ {
+ outbuf = pack_int(outbuf,2) ; /* tag */
+ outbuf = pack_hex_byte(outbuf,2) ; /* length */
+ outbuf = pack_hex_byte(outbuf,info.context_exists) ;
+ }
+ if ((mask & 4) && info.thread_display)/* display */
+ {
+ outbuf = pack_int(outbuf,4) ; /* tag */
+ outbuf = pack_string(outbuf,info.thread_display) ;
+ }
+ if ((mask & 8) && info.unique_thread_name) /* unique_name */
+ {
+ outbuf = pack_int(outbuf,8) ;
+ outbuf = pack_string(outbuf,info.unique_thread_name) ;
+ }
+ if ((mask & 16) && info.more_display) /* more display */
+ {
+ outbuf = pack_int(outbuf,16) ; /* tag 16 */
+ outbuf = pack_string(outbuf,info.more_display) ;
+ }
+ }
+ else
+ {
+ PKT_TRACE("FAIL: dbg_threadinfo\n", "") ;
+ outbuf = stub_pack_nak(outbuf) ;
+ }
+ *outbuf = '\0' ;
+} /* stub_pkt_getthreadinfo */
+
+int stub_lock_scheduler(int lock, /* 0 to unlock, 1 to lock */
+ int mode, /* 0 for step, 1 for continue */
+ long id) /* current thread */
+{
+ threadref thread;
+
+ int_to_threadref(&thread, id) ;
+ return dbg_scheduler(&thread, lock, mode) ;
+}
+
+
+#if GDB_MOCKUP
+/* ------ MATCHED GDB SIDE PACKET ENCODING AND PARSING ----------------- */
+
+char * pack_nibble(char * buf, int nibble)
+{
+ *buf++ = hexchars[(nibble & 0x0f)] ;
+ return buf ;
+} /* pack_nibble */
+
+#if 0
+static char * unpack_short(char * buf,int * value)
+{
+ *value = stub_unpack_int(buf,4) ;
+ return buf + 4 ;
+}
+
+static char * pack_short(
+ char * buf,
+ unsigned int value)
+{
+ buf = pack_hex_byte(buf,(value >> 8) & 0xff) ;
+ buf = pack_hex_byte(buf,(value & 0xff)) ;
+ return buf ;
+} /* pack_short */
+#endif
+
+
+/* Generally, I dont bury xmit and receive calls inside packet formatters
+ and parsers
+ */
+
+
+
+
+/* ----- PACK_SETTHREAD_REQUEST ------------------------------------- */
+/* Encoding: ??? decode gdb/remote.c
+ 'Q':8,'p':8,idefined:8,threadid:32 ;
+ */
+
+char * pack_setthread_request(
+ char * buf,
+ char fmt, /* c,g or, p */
+ int idformat ,
+ threadref * threadid )
+{
+ *buf++ = fmt ;
+
+ if (fmt == 'p')
+ { /* pack the long form */
+ buf = pack_nibble(buf,idformat) ;
+ buf = pack_threadid(buf,threadid) ;
+ }
+ else
+ { /* pack the shorter form - Serious truncation */
+ /* There are reserved identifieds 0 , -1 */
+ int quickref = threadref_to_int(threadid) ;
+ buf = pack_varlen_hex(buf,quickref) ;
+ }
+ *buf++ = '\0' ; /* end_of_packet */
+ return buf ;
+} /* pack_setthread_request */
+
+
+
+/* -------- PACK_THREADLIST-REQUEST --------------------------------- */
+/* Format: i'Q':8,i"L":8,initflag:8,batchsize:16,lastthreadid:32 */
+
+
+char * pack_threadlist_request(
+ char * pkt,
+ int startflag,
+ int threadcount,
+ threadref * nextthread
+ )
+{
+ *pkt++ = 'q' ;
+ *pkt++ = 'L' ;
+ pkt = pack_nibble(pkt,startflag) ; /* initflag 1 bytes */
+ pkt = pack_hex_byte(pkt,threadcount) ; /* threadcount 2 bytes */
+ pkt = pack_threadid(pkt,nextthread) ; /* 64 bit thread identifier */
+ *pkt = '\0' ;
+ return pkt ;
+} /* remote_threadlist_request */
+
+
+
+
+/* ---------- PARSE_THREADLIST_RESPONSE ------------------------------------ */
+/* Encoding: 'q':8,'M':8,count:16,done:8,argthreadid:64,(threadid:64)* */
+
+int parse_threadlist_response(
+ char * pkt,
+ threadref * original_echo,
+ threadref * resultlist,
+ int * doneflag)
+{
+ char * limit ;
+ int count, resultcount , done ;
+ resultcount = 0 ;
+
+ /* assume the 'q' and 'M chars have been stripped */
+ PKT_TRACE("parse-threadlist-response ",pkt) ;
+ limit = pkt + (STUB_BUF_MAX - BUFTHREADIDSIZ) ; /* done parse past here */
+ pkt = unpack_byte(pkt,&count) ; /* count field */
+ pkt = unpack_nibble(pkt,&done) ;
+ /* The first threadid is the argument threadid */
+ pkt = unpack_threadid(pkt,original_echo) ; /* should match query packet */
+ while ((count-- > 0) && (pkt < limit))
+ {
+ pkt = unpack_threadid(pkt,resultlist++) ;
+ resultcount++ ;
+ }
+ if (doneflag) *doneflag = done ;
+ return resultcount ; /* successvalue */
+} /* parse_threadlist_response */
+
+struct gdb_ext_thread_info
+{
+ threadref threadid ;
+ int active ;
+ char display[256] ;
+ char shortname[32] ;
+ char more_display[256] ;
+} ;
+
+
+/* ----- PACK_THREAD_INFO_REQUEST -------------------------------- */
+
+/*
+ threadid:1, # always request threadid
+ context_exists:2,
+ display:4,
+ unique_name:8,
+ more_display:16
+ */
+
+/* Encoding: 'Q':8,'P':8,mask:32,threadid:64 */
+
+char * pack_threadinfo_request(char * pkt,
+ int mode,
+ threadref * id
+ )
+{
+ *pkt++ = 'Q' ;
+ *pkt++ = 'P' ;
+ pkt = pack_int(pkt,mode) ; /* mode */
+ pkt = pack_threadid(pkt,id) ; /* threadid */
+ *pkt = '\0' ; /* terminate */
+ return pkt ;
+} /* pack_thread_info_request */
+
+
+
+static char * unpack_string(
+ char * src,
+ char * dest,
+ int length)
+{
+ while (length--) *dest++ = *src++ ;
+ *dest = '\0' ;
+ return src ;
+} /* unpack_string */
+
+
+void output_threadid(char * title,threadref * ref)
+{
+ char hexid[20] ;
+ pack_threadid(&hexid[0],ref) ; /* Convert threead id into hex */
+ hexid[16] = 0 ;
+ output_string(title) ;
+ output_string(&hexid[0]) ;
+ output_string("\n") ;
+}
+
+/* ------ REMOTE_UPK_THREAD_INFO_RESPONSE ------------------------------- */
+/* Unpack the response of a detailed thread info packet */
+/* Encoding: i'Q':8,i'R':8,argmask:16,threadid:64,(tag:8,length:16,data:x)* */
+
+#define TAG_THREADID 1
+#define TAG_EXISTS 2
+#define TAG_DISPLAY 4
+#define TAG_THREADNAME 8
+#define TAG_MOREDISPLAY 16
+
+
+int remote_upk_thread_info_response(
+ char * pkt,
+ threadref * expectedref ,
+ struct gdb_ext_thread_info * info)
+{
+ int mask, length ;
+ unsigned int tag ;
+ threadref ref ;
+ char * limit = pkt + 500 ; /* plausable parsing limit */
+ int retval = 1 ;
+
+ PKT_TRACE("upk-threadinfo ",pkt) ;
+
+ /* info->threadid = 0 ; FIXME: implement zero_threadref */
+ info->active = 0 ;
+ info->display[0] = '\0' ;
+ info->shortname[0] = '\0' ;
+ info->more_display[0] = '\0' ;
+
+ /* Assume the characters indicating the packet type have been stripped */
+ pkt = unpack_int(pkt,&mask) ; /* arg mask */
+ pkt = unpack_threadid(pkt , &ref) ;
+
+ if (! threadmatch(&ref,expectedref))
+ { /* This is an answer to a different request */
+ output_string("FAIL Thread mismatch\n") ;
+ output_threadid("ref ",&ref) ;
+ output_threadid("expected ",expectedref) ;
+ return 0 ;
+ }
+ copy_threadref(&info->threadid,&ref) ;
+
+ /* Loop on tagged fields , try to bail if somthing goes wrong */
+ if (mask==0) output_string("OOPS NO MASK \n") ;
+
+ while ((pkt < limit) && mask && *pkt) /* packets are terminated with nulls */
+ {
+ pkt = unpack_int(pkt,&tag) ; /* tag */
+ pkt = unpack_byte(pkt,&length) ; /* length */
+ if (! (tag & mask)) /* tags out of synch with mask */
+ {
+ output_string("FAIL: threadinfo tag mismatch\n") ;
+ retval = 0 ;
+ break ;
+ }
+ if (tag == TAG_THREADID)
+ {
+ output_string("unpack THREADID\n") ;
+ if (length != 16)
+ {
+ output_string("FAIL: length of threadid is not 16\n") ;
+ retval = 0 ;
+ break ;
+ }
+ pkt = unpack_threadid(pkt,&ref) ;
+ mask = mask & ~ TAG_THREADID ;
+ continue ;
+ }
+ if (tag == TAG_EXISTS)
+ {
+ info->active = stub_unpack_int(pkt,length) ;
+ pkt += length ;
+ mask = mask & ~(TAG_EXISTS) ;
+ if (length > 8)
+ {
+ output_string("FAIL: 'exists' length too long\n") ;
+ retval = 0 ;
+ break ;
+ }
+ continue ;
+ }
+ if (tag == TAG_THREADNAME)
+ {
+ pkt = unpack_string(pkt,&info->shortname[0],length) ;
+ mask = mask & ~TAG_THREADNAME ;
+ continue ;
+ }
+ if (tag == TAG_DISPLAY)
+ {
+ pkt = unpack_string(pkt,&info->display[0],length) ;
+ mask = mask & ~TAG_DISPLAY ;
+ continue ;
+ }
+ if (tag == TAG_MOREDISPLAY)
+ {
+ pkt = unpack_string(pkt,&info->more_display[0],length) ;
+ mask = mask & ~TAG_MOREDISPLAY ;
+ continue ;
+ }
+ output_string("FAIL: unknown info tag\n") ;
+ break ; /* Not a tag we know about */
+ }
+ return retval ;
+} /* parse-thread_info_response */
+
+
+/* ---- REMOTE_PACK_CURRTHREAD_REQUEST ---------------------------- */
+/* This is a request to emit the T packet */
+
+/* FORMAT: 'q':8,'C' */
+
+char * remote_pack_currthread_request(char * pkt )
+{
+ *pkt++ = 'q' ;
+ *pkt++ = 'C' ;
+ *pkt = '\0' ;
+ return pkt ;
+} /* remote_pack_currthread_request */
+
+
+/* ------- REMOTE_UPK_CURTHREAD_RESPONSE ----------------------- */
+/* Unpack the interesting part of a T packet */
+
+
+int remote_upk_currthread_response(
+ char * pkt,
+ int *thr ) /* Parse a T packet */
+{
+ int retval = 0 ;
+ PKT_TRACE("upk-currthreadresp ",pkt) ;
+
+#if 0
+ {
+ static char threadtag[8] = "thread" ;
+ int retval = 0 ;
+ int i , found ;
+ char ch ;
+ int quickid ;
+
+ /* Unpack as a t packet */
+ while (((ch = *pkt++) != ':') /* scan for : thread */
+ && (ch != '\0')) /* stop at end of packet */
+
+ {
+ found = 0 ;
+ i = 0 ;
+ while ((ch = *pkt++) == threadtag[i++]) ;
+ if (i == 8) /* string match "thread" */
+ {
+ pkt = unpack_varlen_hex(pkt,&quickid) ;
+ retval = 1;
+ break ;
+ }
+ retval = 0 ;
+ }
+ }
+#else
+ pkt = unpack_threadid(pkt, thr) ;
+ retval = 1 ;
+#endif
+ return retval ;
+} /* remote_upk_currthread_response */
+
+
+/* -------- REMOTE_UPK-SIMPLE_ACK --------------------------------- */
+/* Decode a response which is eother "OK" or "Enn"
+ fillin error code, fillin pkfag-1== undef, 0==nak, 1 == ack ;
+ return advanced packet pointer */
+
+
+char * remote_upk_simple_ack(
+ char * buf,
+ int * pkflag,
+ int * errcode)
+{
+ int lclerr = 0 ;
+ char ch = *buf++ ;
+ int retval = -1 ; /* Undefined ACK , a protocol error */
+ if (ch == 'E') /* NAK */
+ {
+ buf = unpack_byte(buf,&lclerr) ;
+ retval = 0 ; /* transaction failed, explicitly */
+ }
+ else
+ if ((ch == 'O') && (*buf++ == 'K')) /* ACK */
+ retval = 1 ; /* transaction succeeded */
+ *pkflag = retval ;
+ *errcode = lclerr ;
+ return buf ;
+} /* remote-upk_simple_ack */
+
+
+/* -------- PACK_THREADALIVE_REQUEST ------------------------------- */
+
+char * pack_threadalive_request(
+ char * buf,
+ threadref * threadid)
+{
+ *buf++ = 'T' ;
+ buf = pack_threadid(buf,threadid) ;
+ *buf = '\0' ;
+ return buf ;
+} /* pack_threadalive_request */
+
+#endif /* GDB_MOCKUP */
+
+/* ---------------------------------------------------------------------- */
+/* UNIT_TESTS SUBSECTION */
+/* ---------------------------------------------------------------------- */
+
+
+#if UNIT_TEST
+extern void output_string(char * message) ;
+static char test_req[400] ;
+static char t_response[400] ;
+
+
+
+/* ----- DISPLAY_THREAD_INFO ---------------------------------------------- */
+/* Use local cygmon string output utiities */
+
+void display_thread_info(struct gdb_ext_thread_info * info)
+{
+
+ output_threadid("Threadid: ",&info->threadid) ;
+ /* short name */
+ output_string("Name: ") ; output_string(info->shortname) ; output_string("\n");
+ /* format display state */
+ output_string("State: ") ; output_string(info->display) ; output_string("\n") ;
+ /* additional data */
+ output_string("other: ");output_string(info->more_display);
+ output_string("\n\n");
+} /* display_thread_info */
+
+
+/* --- CURRTHREAD-TEST -------------------------------------------- */
+static int currthread_test(threadref * thread)
+{
+ int result ;
+ int threadid ;
+ output_string("TEST: currthread\n") ;
+ remote_pack_currthread_request(test_req) ;
+ stub_pkt_currthread(test_req+2,t_response,STUB_BUF_MAX) ;
+ result = remote_upk_currthread_response(t_response+2, &threadid) ;
+ if (result)
+ {
+ output_string("PASS getcurthread\n") ;
+ /* FIXME: print the thread */
+ }
+ else
+ output_string("FAIL getcurrthread\n") ;
+ return result ;
+} /* currthread_test */
+
+/* ------ SETTHREAD_TEST ------------------------------------------- */
+ /* use a known thread from previous test */
+
+static int setthread_test(threadref * thread)
+{
+ int result, errcode ;
+ output_string("TEST: setthread\n") ;
+
+ pack_setthread_request(test_req,'p',1,thread) ;
+ stub_pkt_changethread(test_req,t_response,STUB_BUF_MAX) ;
+ remote_upk_simple_ack(t_response,&result,&errcode) ;
+ switch (result)
+ {
+ case 0 :
+ output_string("FAIL setthread\n") ;
+ break ;
+ case 1 :
+ output_string("PASS setthread\n") ;
+ break ;
+ default :
+ output_string("FAIL setthread -unrecognized response\n") ;
+ break ;
+ }
+ return result ;
+} /* setthread_test */
+
+
+/* ------ THREADACTIVE_TEST ---------------------- */
+ /* use known thread */
+ /* pack threadactive packet */
+ /* process threadactive packet */
+ /* parse threadactive response */
+ /* check results */
+
+
+int threadactive_test(threadref * thread)
+{
+ int result ;
+ int errcode ;
+ output_string("TEST: threadactive\n") ;
+ pack_threadalive_request(test_req,thread) ;
+ stub_pkt_thread_alive(test_req+1,t_response,STUB_BUF_MAX);
+ remote_upk_simple_ack(t_response,&result,&errcode) ;
+ switch (result)
+ {
+ case 0 :
+ output_string("FAIL threadalive\n") ;
+ break ;
+ case 1 :
+ output_string("PASS threadalive\n") ;
+ break ;
+ default :
+ output_string("FAIL threadalive -unrecognized response\n") ;
+ break ;
+ }
+ return result ;
+} /* threadactive_test */
+
+/* ------ REMOTE_GET_THREADINFO -------------------------------------- */
+int remote_get_threadinfo(
+ threadref * threadid,
+ int fieldset , /* TAG mask */
+ struct gdb_ext_thread_info * info
+ )
+{
+ int result ;
+ pack_threadinfo_request(test_req,fieldset,threadid) ;
+ stub_pkt_getthreadinfo(test_req+2,t_response,STUB_BUF_MAX) ;
+ result = remote_upk_thread_info_response(t_response+2,threadid,info) ;
+ return result ;
+} /* remote_get-thrreadinfo */
+
+
+static struct gdb_ext_thread_info test_info ;
+
+static int get_and_display_threadinfo(threadref * thread)
+{
+ int mode ;
+ int result ;
+ /* output_string("TEST: get and display threadinfo\n") ; */
+
+ mode = TAG_THREADID | TAG_EXISTS | TAG_THREADNAME
+ | TAG_MOREDISPLAY | TAG_DISPLAY ;
+ result = remote_get_threadinfo(thread,mode,&test_info) ;
+ if (result) display_thread_info(&test_info) ;
+#if 0 /* silent subtest */
+ if (result)
+ output_string("PASS: get_and_display threadinfo\n") ;
+ else
+ output_string("FAIL: get_and_display threadinfo\n") ;
+#endif
+ return result ;
+} /* get-and-display-threadinfo */
+
+
+
+/* ----- THREADLIST_TEST ------------------------------------------ */
+#define TESTLISTSIZE 16
+#define TLRSIZ 2
+static threadref test_threadlist[TESTLISTSIZE] ;
+
+static int threadlist_test(void)
+{
+ int done, i , result_count ;
+ int startflag = 1 ;
+ int result = 1 ;
+ int loopcount = 0 ;
+ static threadref nextthread ;
+ static threadref echo_nextthread ;
+
+ output_string("TEST: threadlist\n") ;
+
+ done = 0 ;
+ while (! done)
+ {
+ if (loopcount++ > 10)
+ {
+ result = 0 ;
+ output_string("FAIL: Threadlist test -infinite loop-\n") ;
+ break ;
+ }
+ pack_threadlist_request(test_req,startflag,TLRSIZ,&nextthread) ;
+ startflag = 0 ; /* clear for later iterations */
+ stub_pkt_getthreadlist(test_req+2,t_response,STUB_BUF_MAX);
+ result_count = parse_threadlist_response(t_response+2,
+ &echo_nextthread,
+ &test_threadlist[0],&done) ;
+ if (! threadmatch(&echo_nextthread,&nextthread))
+ {
+ output_string("FAIL: threadlist did not echo arg thread\n");
+ result = 0 ;
+ break ;
+ }
+ if (result_count <= 0)
+ {
+ if (done != 0)
+ { output_string("FAIL threadlist_test, failed to get list");
+ result = 0 ;
+ }
+ break ;
+ }
+ if (result_count > TLRSIZ)
+ {
+ output_string("FAIL: threadlist response longer than requested\n") ;
+ result = 0 ;
+ break ;
+ }
+ /* Setup to resume next batch of thread references , set nestthread */
+ copy_threadref(&nextthread,&test_threadlist[result_count-1]) ;
+ /* output_threadid("last-of-batch",&nextthread) ; */
+ i = 0 ;
+ while (result_count--)
+ {
+ if (0) /* two display alternatives */
+ output_threadid("truncatedisplay",&test_threadlist[i++]) ;
+ else
+ get_and_display_threadinfo(&test_threadlist[i++]) ;
+ }
+
+ }
+ if (!result)
+ output_string("FAIL: threadlist test\n") ;
+ else output_string("PASS: Threadlist test\n") ;
+ return result ;
+} /* threadlist_test */
+
+
+static threadref testthread ;
+
+
+int test_thread_support(void)
+{
+ int result = 1 ;
+ output_string("TESTING Thread support infrastructure\n") ;
+ stub_pack_Tpkt_threadid(test_req) ;
+ PKT_TRACE("packing the threadid -> ",test_req) ;
+ result &= currthread_test(&testthread) ;
+ result &= get_and_display_threadinfo(&testthread) ;
+ result &= threadlist_test() ;
+ result &= setthread_test(&testthread) ;
+ if (result)
+ output_string("PASS: UNITTEST Thread support\n") ;
+ else
+ output_string("FAIL: UNITTEST Thread support\n") ;
+ return result ;
+} /* test-thread_support */
+#endif /* UNIT_TEST */
+
+// #ifdef __ECOS__
+#endif // ifdef CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT...
+// #endif // __ECOS__
diff --git a/cesar/ecos/packages/hal/common/current/src/thread-pkts.h b/cesar/ecos/packages/hal/common/current/src/thread-pkts.h
new file mode 100644
index 0000000000..e6e0ee697e
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/src/thread-pkts.h
@@ -0,0 +1,106 @@
+//========================================================================
+//
+// thread-pkts.h
+//
+// Optional packet processing for thread aware debugging.
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Red Hat, nickg
+// Contributors: Red Hat, nickg
+// Date: 1998-08-25
+// Purpose:
+// Description: Optional packet processing for thread aware debugging.
+// Externs as called by central packet switch routine
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+
+/* The DEBUG_THREADS flag is usually set in board.h */
+
+#if DEBUG_THREADS /* activate this in board.h */
+
+/* export the thread id's sent by gdb: */
+extern int _gdb_cont_thread, _gdb_general_thread ;
+
+extern char * stub_pack_Tpkt_threadid(char * pkt) ;
+
+extern long stub_get_currthread(void) ;
+extern int stub_lock_scheduler(int lock, int kind, long id) ;
+
+extern void stub_pkt_changethread(char * inbuf,
+ char * outbuf,
+ int bufmax) ;
+
+
+extern void stub_pkt_getthreadlist(char * inbuf,
+ char * outbuf,
+ int bufmax) ;
+
+
+extern void stub_pkt_getthreadinfo(
+ char * inbuf,
+ char * outbuf,
+ int bufmax) ;
+
+extern void stub_pkt_thread_alive(
+ char * inbuf,
+ char * outbuf,
+ int bufmax) ;
+
+extern void stub_pkt_currthread(
+ char * inbuf,
+ char * outbuf,
+ int bufmax) ;
+
+#define STUB_PKT_GETTHREADLIST(A,B,C) { stub_pkt_getthreadlist(A,B,C); }
+#define STUB_PKT_GETTHREADINFO(A,B,C) { stub_pkt_getthreadinfo(A,B,C); }
+#define STUB_PKT_CHANGETHREAD(A,B,C) { stub_pkt_changethread(A,B,C); }
+#define STUB_PKT_THREAD_ALIVE(A,B,C) { stub_pkt_thread_alive(A,B,C); }
+#define STUB_PKT_CURRTHREAD(A,B,C) { stub_pkt_currthread(A,B,C); }
+#define PACK_THREAD_ID(PTR) { PTR = stub_pack_Tpkt_threadid (PTR); }
+#else
+#define STUB_PKT_GETTHREADLIST(A,B,C) {}
+#define STUB_PKT_GETTHREADINFO(A,B,C) {}
+#define STUB_PKT_CHANGETHREAD(A,B,C) {}
+#define STUB_PKT_THREAD_ALIVE(A,B,C) {}
+#define STUB_PKT_CURRTHREAD(A,B,C) {}
+#define PACK_THREAD_ID(PTR) {}
+#endif
diff --git a/cesar/ecos/packages/hal/common/current/tests/basic.c b/cesar/ecos/packages/hal/common/current/tests/basic.c
new file mode 100644
index 0000000000..f65c67d9a8
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/tests/basic.c
@@ -0,0 +1,110 @@
+//=================================================================
+//
+// basic.c
+//
+// HAL basic functions test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2001-10-24
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/infra/testcase.h> // test case macros
+#include <cyg/infra/diag.h> // diag_printf
+#include <cyg/infra/cyg_ass.h> // assertions
+
+#include <cyg/hal/hal_arch.h> // context macros
+
+// -------------------------------------------------------------------------
+
+#define BITS(t) (sizeof(t)*8)
+
+void
+entry(void)
+{
+ int res;
+ int i, mask, ndx;
+ hal_jmp_buf jmpbuf;
+
+ res = 1;
+
+ // Check HAL_MSBIT_NDEX() functions
+ mask = 1; // One bits set
+ for (i = 0; i < BITS(int); i++) {
+ HAL_MSBIT_INDEX(ndx, mask);
+ res &= (ndx == i);
+ HAL_LSBIT_INDEX(ndx, mask);
+ res &= (ndx == i);
+ mask <<= 1;
+ }
+
+ mask = 3; // Two bits set
+ for (i = 0; i < BITS(int)-1; i++) {
+ HAL_MSBIT_INDEX(ndx, mask);
+ res &= (ndx == (i+1));
+ HAL_LSBIT_INDEX(ndx, mask);
+ res &= (ndx == i);
+ mask <<= 1;
+ }
+ CYG_TEST_PASS_FAIL(res, "HAL_xSBIT_INDEX() basic functions");
+
+ res = 0;
+ if (hal_setjmp(jmpbuf)) {
+ res = 1;
+ } else {
+ hal_longjmp(jmpbuf, 1);
+ }
+ CYG_TEST_PASS_FAIL(res, "hal_setjmp()/hal_longjmp() basic functions");
+
+ CYG_TEST_FINISH("HAL basic functions test");
+}
+
+// -------------------------------------------------------------------------
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+
+ entry();
+}
+
+// -------------------------------------------------------------------------
+// EOF basic.c
diff --git a/cesar/ecos/packages/hal/common/current/tests/cache.c b/cesar/ecos/packages/hal/common/current/tests/cache.c
new file mode 100644
index 0000000000..29e97af4cf
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/tests/cache.c
@@ -0,0 +1,241 @@
+/*=================================================================
+//
+// cache.c
+//
+// HAL Cache timing test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm, nickg
+// Date: 1998-06-18
+//####DESCRIPTIONEND####
+*/
+
+#include <pkgconf/hal.h>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/hal/hal_cache.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/infra/diag.h>
+
+#if defined(HAL_DCACHE_SIZE) && HAL_DCACHE_SIZE != 0
+
+// -------------------------------------------------------------------------
+// If the HAL does not supply this, we supply our own version
+
+#ifndef HAL_DCACHE_PURGE_ALL
+
+#ifdef HAL_DCACHE_SYNC
+
+# define HAL_DCACHE_PURGE_ALL() HAL_DCACHE_SYNC()
+
+#else
+
+static cyg_uint8 dca[HAL_DCACHE_SIZE + HAL_DCACHE_LINE_SIZE*2];
+
+#define HAL_DCACHE_PURGE_ALL() \
+CYG_MACRO_START \
+ volatile cyg_uint8 *addr = &dca[HAL_DCACHE_LINE_SIZE]; \
+ volatile cyg_uint8 tmp = 0; \
+ int i; \
+ for( i = 0; i < HAL_DCACHE_SIZE; i += HAL_DCACHE_LINE_SIZE ) \
+ { \
+ tmp = addr[i]; \
+ } \
+CYG_MACRO_END
+
+#endif // HAL_DCACHE_SYNC
+
+#endif // HAL_DCACHE_PURGE_ALL
+
+// -------------------------------------------------------------------------
+
+#ifndef MAX_STRIDE
+#define MAX_STRIDE 64
+#endif
+
+volatile char m[(HAL_DCACHE_SIZE/HAL_DCACHE_LINE_SIZE)*MAX_STRIDE];
+
+// -------------------------------------------------------------------------
+
+static void time0(register cyg_uint32 stride)
+{
+ register cyg_uint32 j,k;
+ register char c;
+
+ diag_printf("stride=%d\n", stride);
+
+ k = 0;
+ if ( cyg_test_is_simulator )
+ k = 3960;
+
+ for(; k<4000;k++) {
+ for(j=0; j<(HAL_DCACHE_SIZE/HAL_DCACHE_LINE_SIZE); j++) {
+ c=m[stride*j];
+ }
+ }
+}
+
+// -------------------------------------------------------------------------
+
+void time1(void)
+{
+ cyg_uint32 i;
+
+ for(i=1; i<=MAX_STRIDE; i+=i) {
+ time0(i);
+ }
+}
+
+// -------------------------------------------------------------------------
+// This test could be improved by counting number of passes possible
+// in a given number of ticks.
+
+static void entry0( void )
+{
+ register CYG_INTERRUPT_STATE oldints;
+
+#ifdef HAL_CACHE_UNIFIED
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL(); // rely on above definition
+ HAL_UCACHE_INVALIDATE_ALL();
+ HAL_UCACHE_DISABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Cache off");
+ time1();
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL(); // rely on above definition
+ HAL_UCACHE_INVALIDATE_ALL();
+ HAL_UCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Cache on");
+ time1();
+
+#else // HAL_CACHE_UNIFIED
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL();
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_ICACHE_DISABLE();
+ HAL_DCACHE_DISABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Dcache off Icache off");
+ time1();
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL();
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_ICACHE_DISABLE();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Dcache on Icache off");
+ time1();
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL();
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_ICACHE_ENABLE();
+ HAL_DCACHE_DISABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Dcache off Icache on");
+ time1();
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL();
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_ICACHE_ENABLE();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Dcache on Icache on");
+ time1();
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL();
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_ICACHE_DISABLE();
+ HAL_DCACHE_DISABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Dcache off Icache off");
+ time1();
+
+#endif // HAL_CACHE_UNIFIED
+
+ CYG_TEST_PASS_FINISH("End of test");
+}
+
+// -------------------------------------------------------------------------
+
+void cache_main( void )
+{
+ CYG_TEST_INIT();
+
+ entry0();
+
+}
+
+// -------------------------------------------------------------------------
+
+externC void
+cyg_start( void )
+{
+ cache_main();
+}
+
+#else // HAL_DCACHE_SIZE
+#define N_A_MSG "No cache"
+#endif // HAL_DCACHE_SIZE
+
+#ifdef N_A_MSG
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG );
+}
+#endif // N_A_MSG
+
+// -------------------------------------------------------------------------
+/* EOF cache.c */
diff --git a/cesar/ecos/packages/hal/common/current/tests/context.c b/cesar/ecos/packages/hal/common/current/tests/context.c
new file mode 100644
index 0000000000..ecead64a03
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/tests/context.c
@@ -0,0 +1,121 @@
+/*=================================================================
+//
+// context.c
+//
+// HAL Thread context handling test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1998-10-07
+//####DESCRIPTIONEND####
+*/
+
+#include <pkgconf/hal.h>
+
+#include <pkgconf/infra.h>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/infra/cyg_trac.h>
+#include <cyg/hal/hal_arch.h>
+
+#define CYG_TRACE_USER_BOOL 1
+
+// -------------------------------------------------------------------------
+
+#define THREADS 4
+#define STACKSIZE (2*1024)
+
+char stack[THREADS][STACKSIZE];
+
+CYG_ADDRWORD sp[THREADS];
+
+cyg_count32 switches = 0;
+
+// -------------------------------------------------------------------------
+
+void entry0( CYG_ADDRWORD arg )
+{
+ CYG_TRACE1B("Thread %d started\n", arg );
+
+ while( switches < 1000 )
+ {
+ HAL_THREAD_SWITCH_CONTEXT( &sp[arg], &sp[(arg+1) % THREADS] );
+
+ CYG_TRACE1B("Thread %d resumed\n", arg );
+
+ switches++;
+ }
+
+ CYG_TEST_PASS_FINISH("HAL Context test");
+
+}
+
+// -------------------------------------------------------------------------
+
+void context_main(void)
+{
+ int i;
+
+ CYG_TEST_INIT();
+
+ // Init all thread contexts:
+
+ for( i = 0 ; i < THREADS; i++ )
+ {
+ sp[i] = (CYG_ADDRWORD)stack[i]+STACKSIZE;
+
+ HAL_THREAD_INIT_CONTEXT( sp[i], i, entry0, i*0x01010000 );
+ }
+
+ // Load the first thread.
+
+ HAL_THREAD_LOAD_CONTEXT( &sp[0] );
+}
+
+// -------------------------------------------------------------------------
+
+externC void
+cyg_start( void )
+{
+ context_main();
+}
+
+// -------------------------------------------------------------------------
+/* EOF context.c */
diff --git a/cesar/ecos/packages/hal/common/current/tests/cpp1.c b/cesar/ecos/packages/hal/common/current/tests/cpp1.c
new file mode 100644
index 0000000000..a8eb2f84db
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/tests/cpp1.c
@@ -0,0 +1,109 @@
+/*=================================================================
+//
+// cpp1.c
+//
+// cpp arithmetic bug regression test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 2001-04-30
+//####DESCRIPTIONEND####
+*/
+
+#include <pkgconf/hal.h>
+
+#include <pkgconf/infra.h>
+
+#include <cyg/infra/testcase.h>
+
+// -----------------------------------------------------------------
+// This is smaller than 2048.
+// Unless the parser binds '+' too strongly because it is after a ket, so
+// it is mistaken for unary plus, when (4 * 20 + 2) * 4 * 20 is larger.
+#define CYGNUM_HAL_STACK_SIZE_MINIMUM ((4 * 20) + 2 * 4 * 20)
+
+#define CYGNUM_UITRON_STACK_SIZE (2048)
+
+#ifdef CYGNUM_HAL_STACK_SIZE_MINIMUM
+# ifdef CYGNUM_UITRON_STACK_SIZE
+# if CYGNUM_UITRON_STACK_SIZE < CYGNUM_HAL_STACK_SIZE_MINIMUM
+
+// then override the configured stack size
+# undef CYGNUM_UITRON_STACK_SIZE
+# define CYGNUM_UITRON_STACK_SIZE CYGNUM_HAL_STACK_SIZE_MINIMUM
+
+# endif // CYGNUM_UITRON_STACK_SIZE < CYGNUM_HAL_STACK_SIZE_MINIMUM
+# endif // CYGNUM_UITRON_STACK_SIZE
+#endif // CYGNUM_HAL_STACK_SIZE_MINIMUM
+
+
+// This tests for the bug per se:
+int i = CYGNUM_UITRON_STACK_SIZE;
+
+// This tests the workaround independently of more complex context:
+#define MAX(_x_,_y_) ((_x_) > (_y_) ? (_x_) : (_y_))
+
+static char stack1[
+ MAX(
+ CYGNUM_HAL_STACK_SIZE_MINIMUM,
+ 2048)
+ ];
+
+// Better to report a fully-fledged failure and test the workaround than
+// fail early.
+#if 0
+# if CYGNUM_UITRON_STACK_SIZE != 2048
+# error FAIL: CPP '+' binding bug detected
+# endif
+#endif
+
+// -------------------------------------------------------------------------
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_PASS("CPP '+' binding test compiled OK");
+ CYG_TEST_PASS_FAIL( 2048 == i, "initialized i should be 2048" );
+ CYG_TEST_PASS_FAIL( 2048 == sizeof( stack1 ),
+ "workaround: sizeof( stack1 ) should be 2048" );
+ CYG_TEST_EXIT("All done");
+}
+
+// -------------------------------------------------------------------------
+/* EOF cpp1.c */
diff --git a/cesar/ecos/packages/hal/common/current/tests/intr.c b/cesar/ecos/packages/hal/common/current/tests/intr.c
new file mode 100644
index 0000000000..61332b5182
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/tests/intr.c
@@ -0,0 +1,157 @@
+/*=================================================================
+//
+// intr.c
+//
+// HAL Interrupt API test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1998-10-08
+//####DESCRIPTIONEND####
+*/
+
+#include <pkgconf/hal.h>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/drv_api.h>
+
+// Include HAL/Platform specifics
+#include CYGBLD_HAL_PLATFORM_H
+
+#ifdef CYGPKG_KERNEL
+#include <pkgconf/kernel.h> // Need to look for the RTC config.
+#endif
+
+// Fallback defaults (in case HAL didn't define these)
+#ifndef CYGNUM_HAL_RTC_NUMERATOR
+#define CYGNUM_HAL_RTC_NUMERATOR 1000000000
+#define CYGNUM_HAL_RTC_DENOMINATOR 100
+#define CYGNUM_HAL_RTC_PERIOD 9999
+#endif
+
+// -------------------------------------------------------------------------
+
+#define ISR_DATA 0xAAAA1234
+
+// -------------------------------------------------------------------------
+
+volatile cyg_count32 ticks = 0;
+volatile cyg_count32 dsr_ticks = 0;
+static cyg_interrupt intr;
+static cyg_handle_t intr_handle;
+
+// -------------------------------------------------------------------------
+
+cyg_uint32 isr( cyg_uint32 vector, CYG_ADDRWORD data )
+{
+ CYG_TEST_CHECK( ISR_DATA == data , "Bad data passed to ISR");
+ CYG_TEST_CHECK( CYGNUM_HAL_INTERRUPT_RTC == vector ,
+ "Bad vector passed to ISR");
+
+ HAL_CLOCK_RESET( vector, CYGNUM_HAL_RTC_PERIOD );
+
+ HAL_INTERRUPT_ACKNOWLEDGE( vector );
+
+ ticks++;
+
+ return CYG_ISR_CALL_DSR;
+}
+
+// -------------------------------------------------------------------------
+
+void dsr( cyg_uint32 vector, cyg_ucount32 count, CYG_ADDRWORD data )
+{
+ CYG_TEST_CHECK( ISR_DATA == data , "Bad data passed to DSR");
+ CYG_TEST_CHECK( CYGNUM_HAL_INTERRUPT_RTC == vector ,
+ "Bad vector passed to DSR");
+
+ dsr_ticks += count;
+}
+
+void intr_main( void )
+{
+ CYG_INTERRUPT_STATE oldints;
+
+ cyg_drv_interrupt_create(CYGNUM_HAL_INTERRUPT_RTC, 1,
+ ISR_DATA, isr, dsr, &intr_handle, &intr);
+ cyg_drv_interrupt_attach(intr_handle);
+ HAL_CLOCK_INITIALIZE( CYGNUM_HAL_RTC_PERIOD );
+ cyg_drv_interrupt_unmask(CYGNUM_HAL_INTERRUPT_RTC);
+
+ HAL_ENABLE_INTERRUPTS();
+
+ while( ticks < 10 )
+ {
+
+ }
+
+
+ CYG_TEST_CHECK( dsr_ticks == 10, "DSR not called sufficient times");
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+
+ CYG_TEST_PASS_FINISH("HAL interrupt test");
+}
+
+
+// -------------------------------------------------------------------------
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+
+ // Attaching the ISR will not succeed if the kernel real-time
+ // clock has been configured in.
+#ifndef CYGVAR_KERNEL_COUNTERS_CLOCK
+
+ intr_main();
+
+#else
+
+ CYG_TEST_NA("Cannot override kernel real-time clock.");
+
+#endif
+}
+
+
+// -------------------------------------------------------------------------
+// EOF intr.c
diff --git a/cesar/ecos/packages/hal/common/current/tests/vaargs.c b/cesar/ecos/packages/hal/common/current/tests/vaargs.c
new file mode 100644
index 0000000000..7abf675b5b
--- /dev/null
+++ b/cesar/ecos/packages/hal/common/current/tests/vaargs.c
@@ -0,0 +1,157 @@
+//=================================================================
+//
+// vaargs.c
+//
+// HAL variable argument calls test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov
+// Date: 2001-08-03
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/infra/testcase.h> // test case macros
+#include <cyg/infra/diag.h> // diag_printf
+#include <cyg/infra/cyg_ass.h> // assertions
+
+#include <cyg/hal/hal_arch.h> // context macros
+
+#include <stdarg.h> // vaargs magic
+
+// -------------------------------------------------------------------------
+
+int
+function(int n, ...)
+{
+ va_list args;
+ int c = 11 * n;
+ int i = 1;
+ int res = 1;
+
+ CYG_ASSERT(n >= 0 && n < 8, "Invalid count argument");
+
+ va_start(args, n);
+
+ for (i = 1; i <= n; c++, i++) {
+ int v = va_arg(args, int);
+ if (v != c) {
+ diag_printf("FAIL:<Bad argument: index %d expected %d got %d>\n", i, c, v);
+ res = 0;
+ }
+ }
+
+ va_end(args);
+
+ return res;
+}
+
+int
+function_proxy(int n, va_list args)
+{
+ int c = 11 * n;
+ int i = 1;
+ int res = 1;
+
+ CYG_ASSERT(n >= 0 && n < 8, "Invalid count argument");
+
+ for (i = 1; i <= n; c++, i++) {
+ int v = va_arg(args, int);
+ if (v != c) {
+ diag_printf("FAIL:<Bad argument: index %d expected %d got %d>\n", i, c, v);
+ res = 0;
+ }
+ }
+
+ return res;
+}
+
+int
+proxy(int n, ...)
+{
+ int res;
+ va_list args;
+
+ va_start(args, n);
+ res = function_proxy(n, args);
+ va_end(args);
+
+ return res;
+}
+
+
+void
+entry(void)
+{
+ int res;
+
+ res = function(0);
+ res &= function(1, 11);
+ res &= function(2, 22, 23);
+ res &= function(3, 33, 34, 35);
+ res &= function(4, 44, 45, 46, 47);
+ res &= function(5, 55, 56, 57, 58, 59);
+ res &= function(6, 66, 67, 68, 69, 70, 71);
+ res &= function(7, 77, 78, 79, 80, 81, 82, 83);
+ CYG_TEST_PASS_FAIL(res, "Direct vaargs calls");
+
+ res = proxy(0);
+ res &= proxy(1, 11);
+ res &= proxy(2, 22, 23);
+ res &= proxy(3, 33, 34, 35);
+ res &= proxy(4, 44, 45, 46, 47);
+ res &= proxy(5, 55, 56, 57, 58, 59);
+ res &= proxy(6, 66, 67, 68, 69, 70, 71);
+ res &= proxy(7, 77, 78, 79, 80, 81, 82, 83);
+ CYG_TEST_PASS_FAIL(res, "Proxy vaargs calls");
+
+ CYG_TEST_FINISH("HAL vaargs test");
+}
+
+// -------------------------------------------------------------------------
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+
+ entry();
+}
+
+// -------------------------------------------------------------------------
+// EOF vaargs.c
diff --git a/cesar/ecos/packages/hal/maximus/arch/current/cdl/hal_maximus.cdl b/cesar/ecos/packages/hal/maximus/arch/current/cdl/hal_maximus.cdl
new file mode 100644
index 0000000000..816bfb3e86
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/arch/current/cdl/hal_maximus.cdl
@@ -0,0 +1,138 @@
+# ====================================================================
+#
+# hal_maximus.cdl
+#
+# Maximus target architectural configuration data
+#
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jpSave
+# Original data: jpSave
+# Contributors: SPiDCOM
+# Date: 2007-04-19
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_HAL_MAXIMUS {
+ display "Linux Maximus target"
+ parent CYGPKG_HAL_I386
+ define_header hal_maximus.h
+ include_dir cyg/hal
+ requires { !CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT && \
+ !CYGSEM_ERROR_PER_THREAD_ERRNO }
+
+ description "
+ The Linux Maximus Target HAL package provides the
+ support needed to run eCos binaries on top of a
+ Linux kernel and to communicate with Maximus simulator"
+
+ implements CYGINT_HAL_TESTS_NO_CACHES
+
+ make {
+ <PREFIX>/lib/target.ld: <PACKAGE>/src/maximus.ld
+ $(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) $(CFLAGS) -o $@ $<
+ @echo $@ ": \\" > $(notdir $@).deps
+ @tail -n +2 target.tmp >> $(notdir $@).deps
+ @echo >> $(notdir $@).deps
+ @rm target.tmp
+ }
+
+ compile maximus_entry.c maximus_diag.c maximus_intr.c maximus_syscalls.c
+
+ define_proc {
+ puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_maximus.h>"
+ }
+
+ # Real-time clock/counter specifics
+ cdl_component CYGNUM_HAL_RTC_CONSTANTS {
+ display "Real-time clock constants."
+ description "
+ In the Maximus target the system clock is implemented using
+ the simulator. The PERIOD value is the number of microseconds
+ between signals, the usec field of an itimerval structure.
+ It should be a multiple of 10000 because Linux will not generate
+ signals at a finer grain than that. The NUMERATOR and DENOMINATOR
+ are derived from the period."
+ flavor none
+
+ cdl_option CYGNUM_HAL_RTC_PERIOD {
+ display "Real-time clock period"
+ flavor data
+ default_value 10000
+ requires { 0 == (CYGNUM_HAL_RTC_PERIOD % 10000) }
+ description "
+ This option corresponds to the number of microseconds between
+ clock interrupts."
+ }
+ cdl_option CYGNUM_HAL_RTC_NUMERATOR {
+ display "Real-time clock numerator"
+ flavor data
+ calculated CYGNUM_HAL_RTC_DENOMINATOR * 1000 * CYGNUM_HAL_RTC_PERIOD
+ }
+ cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
+ display "Real-time clock denominator"
+ flavor data
+ default_value 100
+ }
+ }
+ # What to do when idling
+ cdl_option CYGIMP_HAL_IDLE_THREAD_SPIN {
+ display "Spin when idle"
+ default_value CYGIMP_IDLE_THREAD_YIELD
+ description "
+ By default, whenever the eCos application enters the idle thread
+ the synthetic target HAL will make a select() system call. Effectively
+ this causes the application to block until an interrupt occurs,
+ without consuming any cpu resources, as if the hardware supported
+ some sort of IDLE instruction. Usually this behaviour is desirable.
+ However it interferes with the emulation of some hardware. For
+ example the synthetic watchdog timer device can use consumed cpu time
+ rather than wallclock time to determine whether or not the watchdog
+ has triggered, and if the process is spending nearly all its time
+ blocked in select() then the watchdog will not trigger when it should.
+ There are also some kernel configurations which require that the idle
+ thread does not block."
+ }
+ requires { CYGIMP_IDLE_THREAD_YIELD implies CYGIMP_HAL_IDLE_THREAD_SPIN }
+
+ cdl_option CYGBLD_LINKER_SCRIPT {
+ display "Linker script"
+ flavor data
+ no_define
+ calculated { "src/maximus.ld" }
+ }
+
+ cdl_component CYGPKG_HAL_MAXIMUS_OPTIONS {
+ display "HAL Maximus build options"
+ flavor none
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package."
+
+
+ cdl_option CYGPKG_HAL_MAXIMUS_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "-I\$(BASE) -I\$(OBJ_DIR)/inc" }
+ description "
+ This option modifies the set of compiler flags for
+ building the eCos HAL package. These flags are used
+ in addition to the set of global flags."
+ }
+
+ cdl_option CYGPKG_HAL_MAXIMUS_LDFLAGS_ADD {
+ display "Additional linker flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of linker flags for
+ building the eCos HAL package tests. These flags are added to
+ the set of global flags if present."
+ }
+ }
+}
diff --git a/cesar/ecos/packages/hal/maximus/arch/current/include/hal_arch.h b/cesar/ecos/packages/hal/maximus/arch/current/include/hal_arch.h
new file mode 100644
index 0000000000..941db1269c
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/arch/current/include/hal_arch.h
@@ -0,0 +1,56 @@
+#ifndef CYGONCE_HAL_HAL_ARCH_H
+#define CYGONCE_HAL_HAL_ARCH_H
+
+//=============================================================================
+//
+// hal_arch.h
+//
+// Architecture specific abstractions for maximus target.
+//
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jpSave
+// Contributors:SPiDCOM
+// Date: 2007-05-30
+// Purpose: Define architecture abstractions
+// Usage: #include <cyg/hal/hal_arch.h>
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+// ----------------------------------------------------------------------------
+// Architectural definitions such as processor save state information.
+// For the maximus target most of this information has to be
+// provided by the variant HALs.
+
+#include <cyg/hal/var_arch.h>
+
+//-----------------------------------------------------------------------------
+// Exception handling function.
+// This function is provided by the kernel to
+// deliver an exception to the current thread.
+externC void cyg_hal_deliver_exception( CYG_WORD code, CYG_ADDRWORD data );
+
+//-----------------------------------------------------------------------------
+// Execution reorder barrier.
+// When optimizing the compiler can reorder code. In multithreaded systems
+// where the order of actions is vital, this can sometimes cause problems.
+// This macro may be inserted into places where reordering should not happen.
+
+#define HAL_REORDER_BARRIER() asm volatile ( "" : : : "memory" )
+
+//-----------------------------------------------------------------------------
+// Idle thread code.
+// This macro is called in the idle thread loop, and gives the HAL the
+// chance to insert code. In the maximus target it involves blocking
+// until there is an Interrupt given by the SCI Layer.
+// Function implemented in maximus_intr.c
+externC void hal_idle_thread_action(cyg_uint32 loop_count);
+
+#define HAL_IDLE_THREAD_ACTION(_count_) hal_idle_thread_action(_count_)
+
+//--------------------------------------------------------------------------
+#endif // CYGONCE_HAL_HAL_ARCH_H
+// End of hal_arch.h
diff --git a/cesar/ecos/packages/hal/maximus/arch/current/include/hal_cache.h b/cesar/ecos/packages/hal/maximus/arch/current/include/hal_cache.h
new file mode 100644
index 0000000000..98150d4a8d
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/arch/current/include/hal_cache.h
@@ -0,0 +1,55 @@
+#ifndef CYGONCE_HAL_CACHE_H
+#define CYGONCE_HAL_CACHE_H
+
+//=============================================================================
+//
+// hal_cache.h
+//
+// HAL cache control API
+//
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jpSave
+// Contributors:SPiDCOM
+// Date: 2007-04-24
+// Purpose: Cache control API
+// Description: The macros defined here provide the HAL APIs for handling
+// cache control operations.
+// Usage:
+// #include <cyg/hal/hal_cache.h>
+// ...
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+// ----------------------------------------------------------------------------
+// The maximus target does not have a cache. The underlying hardware
+// is quite likely to have a cache, but the maximus target code has
+// no way of manipulating it. A minimal set of no-op #define's is
+// required.
+
+#include <cyg/infra/cyg_type.h>
+
+#define HAL_ICACHE_ENABLE()
+#define HAL_ICACHE_DISABLE()
+#define HAL_ICACHE_SYNC()
+#define HAL_ICACHE_INVALIDATE_ALL()
+#define HAL_ICACHE_IS_ENABLED(_state_) \
+ CYG_MACRO_START \
+ (_state_) = 0; \
+ CYG_MACRO_END
+
+#define HAL_DCACHE_ENABLE()
+#define HAL_DCACHE_DISABLE()
+#define HAL_DCACHE_SYNC()
+#define HAL_DCACHE_INVALIDATE_ALL()
+#define HAL_DCACHE_IS_ENABLED(_state_) \
+ CYG_MACRO_START \
+ (_state_) = 0; \
+ CYG_MACRO_END
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_HAL_CACHE_H
+// End of hal_cache.h
diff --git a/cesar/ecos/packages/hal/maximus/arch/current/include/hal_diag.h b/cesar/ecos/packages/hal/maximus/arch/current/include/hal_diag.h
new file mode 100644
index 0000000000..a00063ef98
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/arch/current/include/hal_diag.h
@@ -0,0 +1,45 @@
+#ifndef CYGONCE_HAL_HAL_DIAG_H
+#define CYGONCE_HAL_HAL_DIAG_H
+
+//=============================================================================
+//
+// hal_diag.h
+//
+// Maximus target HAL Support for Kernel Diagnostic Routines
+//
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jpSave
+// Contributors:SPiDCOM
+// Date: 2007-05-30
+// Purpose: HAL Support for Kernel Diagnostic Routines
+// Description: Diagnostic routines for use during kernel development.
+// Usage: #include "cyg/hal/hal_diag.h"
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/infra/cyg_type.h>
+
+//-----------------------------------------------------------------------------
+// functions implemented in hal_diag.c
+
+externC void hal_diag_init( void );
+
+externC void hal_diag_read_char(char *c);
+
+externC void hal_diag_write_char(char c);
+
+//-----------------------------------------------------------------------------
+
+#define HAL_DIAG_INIT() hal_diag_init()
+
+#define HAL_DIAG_READ_CHAR(_c_) hal_diag_read_char(&_c_)
+
+#define HAL_DIAG_WRITE_CHAR(_c_) hal_diag_write_char(_c_)
+
+//-----------------------------------------------------------------------------
+// end of hal_diag.h
+#endif // CYGONCE_HAL_HAL_DIAG_H
diff --git a/cesar/ecos/packages/hal/maximus/arch/current/include/hal_host_intr.h b/cesar/ecos/packages/hal/maximus/arch/current/include/hal_host_intr.h
new file mode 100644
index 0000000000..72727c9a3b
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/arch/current/include/hal_host_intr.h
@@ -0,0 +1,10 @@
+#ifndef CYGONCE_HAL_HAL_HOST_INTR_H
+#define CYGONCE_HAL_HAL_HOST_INTR_H
+
+#define CYGNUM_HAL_INTERRUPT_RTC 0
+
+// WARNING maximus_pending_isrs is normally a cyg_uint32
+extern volatile unsigned int maximus_pending_isrs;
+
+#endif // ifndef CYGONCE_HAL_HAL_HOST_INTR_H
+// End of hal_host_intr.h
diff --git a/cesar/ecos/packages/hal/maximus/arch/current/include/hal_intr.h b/cesar/ecos/packages/hal/maximus/arch/current/include/hal_intr.h
new file mode 100644
index 0000000000..246ba2bede
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/arch/current/include/hal_intr.h
@@ -0,0 +1,249 @@
+#ifndef CYGONCE_HAL_HAL_INTR_H
+#define CYGONCE_HAL_HAL_INTR_H
+
+//==========================================================================
+//
+// hal_intr.h
+//
+// HAL Interrupt and clock support
+//
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jpSave
+// Contributors: SPiDCOM
+// Date: 2007-05-30
+// Purpose: Define Interrupt support
+// Description: The macros defined here provide the HAL APIs for handling
+// interrupts and the clock.
+//
+// Usage:
+// #include <cyg/hal/hal_intr.h>
+// ...
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+// Additional data exported by the maximus target interrupt handling
+// subsystem. These two variables correspond to typical interrupt
+// status and mask registers.
+// maximus_pending_isrs is now defined into hal_host_intr.h
+// because it's used by the station and SCI layer.
+#include <cyg/hal/hal_host_intr.h>
+//extern volatile cyg_uint32 maximus_pending_isrs;
+extern volatile cyg_uint32 maximus_masked_isrs;
+
+// In the Maximus target exception handling is very much tied up with
+// POSIX signal handling.
+//
+// There are two interrupt sources to consider. The system clock as all
+// other interrupts are handled by communication with the SCI Layer
+// during the IDLE thread state. The model that is actually presented to
+// higher-level code is a single VSR, and 32 ISRs. ISR 0 is
+// arbitrarily assigned to the clock. The remaining 31 ISRs correspond
+// to devices managed through the SCI Layer and hal_idle_thread_action,
+// effectively providing an interrupt controller.
+//
+// Exceptions correspond to signals, but are not handled through
+// the VSR: slightly different processing is needed. The exceptions of
+// interest are SIGILL, SIGBUS, SIGFPE, and SIGSEGV. SIGBUS and SIGSEGV
+// are treated as a single exception. Obviously there are other signals
+// but they do not have obvious meanings in the context of the maximus
+// target.
+
+// WARNING CYGNUM_HAL_INTERRUPT_RTC define in hal_host_int.h because it's used
+// by host station part
+//#define CYGNUM_HAL_INTERRUPT_RTC 0
+#define CYGNUM_HAL_ISR_MIN 0
+#define CYGNUM_HAL_ISR_MAX 31
+#define CYGNUM_HAL_ISR_COUNT (CYGNUM_HAL_ISR_MAX + 1)
+
+#define CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION 0
+#define CYGNUM_HAL_EXCEPTION_DATA_ACCESS 1
+#define CYGNUM_HAL_EXCEPTION_FPU 2
+
+#define CYGNUM_HAL_EXCEPTION_MIN 0
+#define CYGNUM_HAL_EXCEPTION_MAX CYGNUM_HAL_EXCEPTION_FPU
+#define CYGNUM_HAL_EXCEPTION_COUNT (CYGNUM_HAL_EXCEPTION_MAX + 1)
+
+#define CYGNUM_HAL_VECTOR_SIGNAL 0
+#define CYGNUM_HAL_VSR_MIN 0
+#define CYGNUM_HAL_VSR_MAX CYGNUM_HAL_VECTOR_SIGNAL
+#define CYGNUM_HAL_VSR_COUNT (CYGNUM_HAL_VSR_MAX + 1)
+
+// These #include's cannot happen until after the above are defined.
+// There are dependencies on e.g. CYGNUM_HAL_EXCEPTION_COUNT.
+// Basic data types
+#include <cyg/infra/cyg_type.h>
+
+// cyg_vector_t etc., supplied either by the kernel or the common HAL
+#include <cyg/hal/drv_api.h>
+
+// Nearly all interrupt state control happens via functions. This
+// facilitates debugging, for example it is easier to set breakpoints
+// that way, at the cost of performance. However performance is not a
+// critical issue for the maximus target, Instead it is intended to
+// facilitate application development, and hence debugability has a
+// higher priority. There is one exception: the sequence
+// disable_interrupts() followed by restore_interrupts() occurs
+// frequently and is worth some inlining.
+//
+// Note: some of the details such as the existence of a global
+// variable hal_interrupts_enabled are known to the context switch
+// code in the variant HAL (i386Linux).
+typedef cyg_bool_t CYG_INTERRUPT_STATE;
+externC volatile cyg_bool_t hal_interrupts_enabled;
+externC void hal_enable_interrupts(void);
+externC cyg_bool_t hal_interrupt_in_use(cyg_vector_t);
+externC void hal_interrupt_attach(cyg_vector_t, cyg_ISR_t*, CYG_ADDRWORD, CYG_ADDRESS);
+externC void hal_interrupt_detach(cyg_vector_t, cyg_ISR_t*);
+externC void (*hal_vsr_get(cyg_vector_t))(void);
+externC void hal_vsr_set(cyg_vector_t, void (*)(void), void (**)(void));
+externC void hal_interrupt_mask(cyg_vector_t);
+externC void hal_interrupt_unmask(cyg_vector_t);
+externC void hal_interrupt_acknowledge(cyg_vector_t);
+externC void hal_interrupt_configure(cyg_vector_t, cyg_bool_t, cyg_bool_t);
+externC void hal_interrupt_set_level(cyg_vector_t, cyg_priority_t);
+
+
+#define HAL_ENABLE_INTERRUPTS() \
+ CYG_MACRO_START \
+ hal_enable_interrupts(); \
+ CYG_MACRO_END
+
+#define HAL_DISABLE_INTERRUPTS(_old_) \
+ CYG_MACRO_START \
+ _old_ = hal_interrupts_enabled; \
+ hal_interrupts_enabled = false; \
+ CYG_MACRO_END
+
+#define HAL_RESTORE_INTERRUPTS(_old_) \
+ CYG_MACRO_START \
+ if (!_old_) { \
+ hal_interrupts_enabled = false; \
+ } else if (!hal_interrupts_enabled) { \
+ hal_enable_interrupts(); \
+ } \
+ CYG_MACRO_END
+
+#define HAL_QUERY_INTERRUPTS(_old_) \
+ CYG_MACRO_START \
+ _old_ = hal_interrupts_enabled; \
+ CYG_MACRO_END
+
+#define HAL_TRANSLATE_VECTOR(_vector_, _index_) \
+ CYG_MACRO_START \
+ (_index_) = (_vector_); \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_IN_USE(_vector_, _state_) \
+ CYG_MACRO_START \
+ (_state_) = hal_interrupt_in_use(_vector_); \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_ATTACH(_vector_, _isr_, _data_, _object_ ) \
+ CYG_MACRO_START \
+ hal_interrupt_attach(_vector_, _isr_, (CYG_ADDRWORD) _data_, (CYG_ADDRESS) _object_); \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_DETACH(_vector_, _isr_) \
+ CYG_MACRO_START \
+ hal_interrupt_detach(_vector_, _isr_); \
+ CYG_MACRO_END
+
+#define HAL_VSR_GET(_vector_, _vsr_) \
+ CYG_MACRO_START \
+ (*_vsr_) = hal_vsr_get(_vector_); \
+ CYG_MACRO_END
+
+#define HAL_VSR_SET(_vector_, _vsr_, _poldvsr_) \
+ CYG_MACRO_START \
+ hal_vsr_set(_vector_, _vsr_, _poldvsr_); \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_MASK(_vector_) \
+ CYG_MACRO_START \
+ hal_interrupt_mask(_vector_); \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_UNMASK(_vector_) \
+ CYG_MACRO_START \
+ hal_interrupt_unmask(_vector_); \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_ACKNOWLEDGE(_vector_) \
+ CYG_MACRO_START \
+ hal_interrupt_acknowledge(_vector_); \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_CONFIGURE(_vector_, _level_, _up_) \
+ CYG_MACRO_START \
+ hal_interrupt_configure(_vector_, _level_, _up_); \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_SET_LEVEL(_vector_, _level_) \
+ CYG_MACRO_START \
+ hal_interrupt_set_level(_vector_, _level_); \
+ CYG_MACRO_END
+
+// ----------------------------------------------------------------------------
+// The clock support
+externC void hal_clock_initialize(cyg_uint32);
+externC cyg_uint32 hal_clock_read(void);
+
+#define HAL_CLOCK_INITIALIZE( _period_ ) \
+ CYG_MACRO_START \
+ hal_clock_initialize(_period_); \
+ CYG_MACRO_END
+
+// No special action is needed for reset.
+#define HAL_CLOCK_RESET( _vector_, _period_ ) \
+ CYG_EMPTY_STATEMENT
+
+#define HAL_CLOCK_READ(_pvalue_) \
+ CYG_MACRO_START \
+ *(_pvalue_) = hal_clock_read(); \
+ CYG_MACRO_END
+
+// ----------------------------------------------------------------------------
+// no accurate delay mechanism is possible in maximus target because time is
+// relative, so we just spin for a while.
+// Having an inaccurate delay is much better than no delay at all.
+// The count of 10 should mean the loop takes something resembling
+// 1us on most CPUs running between 30-100MHz [depends on how many
+// instructions this compiles to, how many dispatch units can be
+// used for the simple loop, actual CPU frequency, etc]
+#define HAL_DELAY_US(_us_) \
+ CYG_MACRO_START \
+ while (_us_-- > 0) { \
+ int __i; \
+ for (__i = 0; __i < 10; __i++); \
+ } \
+ CYG_MACRO_END
+
+// ----------------------------------------------------------------------------
+// Resetting the Maximus target is not possible, but existing the process is.
+externC void cyg_hal_sys_exit(int);
+#define HAL_PLATFORM_RESET() \
+ CYG_MACRO_START \
+ cyg_hal_sys_exit(0); \
+ CYG_MACRO_END
+
+extern void (*maximus_atexit_handler)(void);
+#define HAL_PLATFORM_EXIT(x) \
+ CYG_MACRO_START \
+ if(maximus_atexit_handler !=NULL) \
+ (*maximus_atexit_handler)(); \
+ cyg_hal_sys_exit(x); \
+ CYG_MACRO_END
+
+// ----------------------------------------------------------------------------
+// Test case exit support.
+#define CYGHWR_TEST_PROGRAM_EXIT() \
+ CYG_MACRO_START \
+ cyg_hal_sys_exit(0); \
+ CYG_MACRO_END
+//---------------------------------------------------------------------------
+#endif // ifndef CYGONCE_HAL_HAL_INTR_H
+// End of hal_intr.h
diff --git a/cesar/ecos/packages/hal/maximus/arch/current/include/hal_io.h b/cesar/ecos/packages/hal/maximus/arch/current/include/hal_io.h
new file mode 100644
index 0000000000..a755d6930d
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/arch/current/include/hal_io.h
@@ -0,0 +1,170 @@
+#ifndef CYGONCE_HAL_HAL_IO_H
+#define CYGONCE_HAL_HAL_IO_H
+
+//=============================================================================
+//
+// hal_io.h
+//
+// HAL device IO register support.
+//
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jpSave
+// Contributors:SPiDCOM
+// Date: 2007-05-30
+// Purpose: Define IO register support
+// Description: The macros defined here provide the HAL APIs for handling
+// device IO control registers.
+//
+// For the maximus target these macros should never
+// actually be used since the application will run as an
+// ordinary user application and should not have
+// permission to access any real hardware. Instead
+// hardware access should go via the SCI Layer. Possibly
+// the macros should be #pragma poison'd, but some people
+// may want to run the maximus target in a way that
+// does involve accessing real hardware.
+//
+// The maximus target provides some additional I/O
+// facilities in the form of Linux system calls. A useful
+// subset of these are prototyped here, together with
+// associated constants. There are also I/O operations to
+// interact with the SCI Layer.
+//
+// Usage:
+// #include <cyg/hal/hal_io.h>
+// ...
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/infra/cyg_type.h>
+
+//-----------------------------------------------------------------------------
+// IO Register address.
+// This type is for recording the address of an IO register.
+
+typedef volatile CYG_ADDRWORD HAL_IO_REGISTER;
+
+//-----------------------------------------------------------------------------
+// BYTE Register access.
+// Individual and vectorized access to 8 bit registers.
+
+#define HAL_READ_UINT8( _register_, _value_ ) \
+ CYG_MACRO_START \
+ ((_value_) = *((volatile CYG_BYTE *)(_register_))); \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT8( _register_, _value_ ) \
+ CYG_MACRO_START \
+ (*((volatile CYG_BYTE *)(_register_)) = (_value_)); \
+ CYG_MACRO_END
+
+#define HAL_READ_UINT8_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ (_buf_)[_i_] = ((volatile CYG_BYTE *)(_register_))[_j_]; \
+ } \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT8_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ ((volatile CYG_BYTE *)(_register_))[_j_] = (_buf_)[_i_]; \
+ } \
+ CYG_MACRO_END
+
+
+//-----------------------------------------------------------------------------
+// 16 bit access.
+// Individual and vectorized access to 16 bit registers.
+
+#define HAL_READ_UINT16( _register_, _value_ ) \
+ CYG_MACRO_START \
+ ((_value_) = *((volatile CYG_WORD16 *)(_register_))); \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT16( _register_, _value_ ) \
+ CYG_MACRO_START \
+ (*((volatile CYG_WORD16 *)(_register_)) = (_value_)); \
+ CYG_MACRO_END
+
+#define HAL_READ_UINT16_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ (_buf_)[_i_] = ((volatile CYG_WORD16 *)(_register_))[_j_]; \
+ } \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT16_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ ((volatile CYG_WORD16 *)(_register_))[_j_] = (_buf_)[_i_]; \
+ } \
+ CYG_MACRO_END
+
+//-----------------------------------------------------------------------------
+// 32 bit access.
+// Individual and vectorized access to 32 bit registers.
+
+#define HAL_READ_UINT32( _register_, _value_ ) \
+ CYG_MACRO_START \
+ ((_value_) = *((volatile CYG_WORD32 *)(_register_))); \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT32( _register_, _value_ ) \
+ CYG_MACRO_START \
+ (*((volatile CYG_WORD32 *)(_register_)) = (_value_)); \
+ CYG_MACRO_END
+
+#define HAL_READ_UINT32_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ (_buf_)[_i_] = ((volatile CYG_WORD32 *)(_register_))[_j_]; \
+ } \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT32_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ ((volatile CYG_WORD32 *)(_register_))[_j_] = (_buf_)[_i_]; \
+ } \
+ CYG_MACRO_END
+
+
+
+
+
+
+
+// ----------------------------------------------------------------------------
+// Linux system calls and associated structures and constants. This is
+// by no means a complete list, but there is enough information for
+// the needs of the relevant HAL packages. The information needs to be
+// kept in synch with the Linux header files, but in practice
+// divergence will be rare because that would imply incompatible
+// changes in the Linux kernel API.
+//
+// It may seem tempting to import the Linux header files directly, but
+// that would prevent cross-compilation and introduce all kinds of
+// namespace pollution.
+//
+// The actual implementation lives in variant HAL packages since
+// typically they involve direct system calls via bits of assembler.
+// Note that only a subset of system calls are actually implemented,
+// so the variant HALs may need to be updated if this list needs to
+// be extended.
+#include <cyg/hal/hal_syscall.h>
+
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_HAL_HAL_IO_H
+// End of hal_io.h
diff --git a/cesar/ecos/packages/hal/maximus/arch/current/include/hal_syscall.h b/cesar/ecos/packages/hal/maximus/arch/current/include/hal_syscall.h
new file mode 100644
index 0000000000..557838e252
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/arch/current/include/hal_syscall.h
@@ -0,0 +1,410 @@
+#ifndef CYGONCE_HAL_HAL_SYSCALL_H
+#define CYGONCE_HAL_HAL_SYSCALL_H
+
+//=============================================================================
+//
+// hal_syscall.h
+//
+// HAL Linux System Call support.
+//
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jpSave
+// Contributors:SPiDCOM
+// Date: 2007-06-12
+// Purpose: Define Linux System Call
+// Description: Linux system calls and associated structures and constants. This is
+// by no means a complete list, but there is enough information for
+// the needs of the relevant HAL packages. The information needs to be
+// kept in synch with the Linux header files, but in practice
+// divergence will be rare because that would imply incompatible
+// changes in the Linux kernel API.
+//
+// It may seem tempting to import the Linux header files directly, but
+// that would prevent cross-compilation and introduce all kinds of
+// namespace pollution.
+//
+// The actual implementation lives in variant HAL packages since
+// typically they involve direct system calls via bits of assembler.
+// Note that only a subset of system calls are actually implemented,
+// so the variant HALs may need to be updated if this list needs to
+// be extended.
+
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+// when it's included by host station part only
+#ifndef externC
+#define externC extern
+#endif
+
+
+// Error codes.
+#define CYG_HAL_SYS_EINTR 4
+#define CYG_HAL_SYS_EAGAIN 11
+
+// Signal-related information
+#define CYG_HAL_SYS_SIGHUP 1
+#define CYG_HAL_SYS_SIGINT 2
+#define CYG_HAL_SYS_SIGQUIT 3
+#define CYG_HAL_SYS_SIGILL 4
+#define CYG_HAL_SYS_SIGTRAP 5
+#define CYG_HAL_SYS_SIGABRT 6
+#define CYG_HAL_SYS_SIGBUS 7
+#define CYG_HAL_SYS_SIGFPE 8
+#define CYG_HAL_SYS_SIGKILL 9
+#define CYG_HAL_SYS_SIGUSR1 10
+#define CYG_HAL_SYS_SIGSEGV 11
+#define CYG_HAL_SYS_SIGUSR2 12
+#define CYG_HAL_SYS_SIGPIPE 13
+#define CYG_HAL_SYS_SIGALRM 14
+#define CYG_HAL_SYS_SIGTERM 15
+#define CYG_HAL_SYS_SIGSTKFLT 16
+#define CYG_HAL_SYS_SIGCHLD 17
+#define CYG_HAL_SYS_SIGCONT 18
+#define CYG_HAL_SYS_SIGSTOP 19
+#define CYG_HAL_SYS_SIGTSTP 20
+#define CYG_HAL_SYS_SIGTTIN 21
+#define CYG_HAL_SYS_SIGTTOU 22
+#define CYG_HAL_SYS_SIGURG 23
+#define CYG_HAL_SYS_SIGXCPU 24
+#define CYG_HAL_SYS_SIGXFSZ 25
+#define CYG_HAL_SYS_SIGVTALRM 26
+#define CYG_HAL_SYS_SIGPROF 27
+#define CYG_HAL_SYS_SIGWINCH 28
+#define CYG_HAL_SYS_SIGIO 29
+#define CYG_HAL_SYS_SIGPWR 30
+#define CYG_HAL_SYS_SIGSYS 31
+
+#define CYG_HAL_SYS_SA_NOCLDSTOP 0x00000001
+#define CYG_HAL_SYS_SA_NOCLDWAIT 0x00000002
+#define CYG_HAL_SYS_SA_SIGINFO 0x00000004
+#define CYG_HAL_SYS_SA_RESTORER 0x04000000
+#define CYG_HAL_SYS_SA_RESTART 0x10000000
+#define CYG_HAL_SYS_SA_NODEFER 0x40000000
+
+#define CYG_HAL_SYS_SIG_BLOCK 0
+#define CYG_HAL_SYS_SIG_UNBLOCK 1
+#define CYG_HAL_SYS_SIG_SETMASK 2
+
+#define CYG_HAL_SYS__NSIG 64
+#define CYG_HAL_SYS__SIGBITS (8 * sizeof(unsigned long))
+#define CYG_HAL_SYS__SIGELT(_d_) ((_d_) / CYG_HAL_SYS__SIGBITS)
+#define CYG_HAL_SYS__SIGMASK(_d_) ((unsigned long)1 << ((_d_) % CYG_HAL_SYS__SIGBITS))
+
+typedef struct cyg_hal_sys_sigset_t {
+ unsigned long hal_sig_bits[CYG_HAL_SYS__NSIG / CYG_HAL_SYS__SIGBITS];
+} cyg_hal_sys_sigset_t;
+
+#define CYG_HAL_SYS_SIGFILLSET(_set_) \
+ CYG_MACRO_START \
+ unsigned int __i; \
+ for (__i = 0; __i < (CYG_HAL_SYS__NSIG / CYG_HAL_SYS__SIGBITS); __i++) { \
+ (_set_)->hal_sig_bits[__i] = ~0; \
+ } \
+ CYG_MACRO_END
+
+#define CYG_HAL_SYS_SIGEMPTYSET(_set_) \
+ CYG_MACRO_START \
+ unsigned int __i; \
+ for (__i = 0; __i < (CYG_HAL_SYS__NSIG / CYG_HAL_SYS__SIGBITS); __i++) { \
+ (_set_)->hal_sig_bits[__i] = 0; \
+ } \
+ CYG_MACRO_END
+
+#define CYG_HAL_SYS_SIGADDSET(_set_, _bit_) \
+ CYG_MACRO_START \
+ (_set_)->hal_sig_bits[CYG_HAL_SYS__SIGELT(_bit_ - 1)] |= CYG_HAL_SYS__SIGMASK(_bit_ - 1); \
+ CYG_MACRO_END
+
+#define CYG_HAL_SYS_SIGDELSET(_set_, _bit_) \
+ CYG_MACRO_START \
+ (_set_)->hal_sig_bits[CYG_HAL_SYS__SIGELT(_bit_ - 1)] &= ~CYG_HAL_SYS__SIGMASK(_bit_ - 1); \
+ CYG_MACRO_END
+
+#define CYG_HAL_SYS_SIGISMEMBER(_set_, _bit_) \
+ (0 != ((_set_)->hal_sig_bits[CYG_HAL_SYS__SIGELT(_bit_ - 1)] & CYG_HAL_SYS__SIGMASK(_bit_ - 1)))
+
+// The kernel sigaction structure has changed, to allow for >32
+// signals. This is the old version, i.e. a struct old_sigaction, for
+// use with the sigaction() system call rather than rt_sigaction(). It
+// is preferred to the more modern version because gdb knows about
+// rt_sigaction() and will start intercepting signals, but it seems to
+// ignore sigaction().
+struct cyg_hal_sys_sigaction {
+ void (*hal_handler)(int);
+ long hal_mask;
+ int hal_flags;
+ void (*hal_restorer)(void);
+};
+
+// Time support.
+struct cyg_hal_sys_timeval {
+ long tv_sec;
+ long tv_usec;
+};
+
+struct cyg_hal_sys_timezone {
+ int tz_minuteswest;
+ int tz_dsttime;
+};
+
+// Select support. Initially this is used only by the idle handler.
+#define CYG_HAL_SYS_FD_SETSIZE 1024
+#define CYG_HAL_SYS__NFDBITS (8 * sizeof(unsigned long))
+#define CYG_HAL_SYS__FDELT(_d_) ((_d_) / CYG_HAL_SYS__NFDBITS)
+#define CYG_HAL_SYS__FDMASK(_d_) ((unsigned long)1 << ((_d_) % CYG_HAL_SYS__NFDBITS))
+
+struct cyg_hal_sys_fd_set {
+ unsigned long hal_fds_bits[CYG_HAL_SYS_FD_SETSIZE / CYG_HAL_SYS__NFDBITS];
+};
+#define CYG_HAL_SYS_FD_ZERO(_fdsp_) \
+ do { \
+ unsigned int __i; \
+ for (__i = 0; \
+ __i < (CYG_HAL_SYS_FD_SETSIZE / CYG_HAL_SYS__NFDBITS); \
+ __i++) { \
+ (_fdsp_)->hal_fds_bits[__i] = 0; \
+ } \
+ } while (0);
+
+#define CYG_HAL_SYS_FD_SET(_fd_, _fdsp_) \
+ CYG_MACRO_START \
+ (_fdsp_)->hal_fds_bits[CYG_HAL_SYS__FDELT(_fd_)] |= CYG_HAL_SYS__FDMASK(_fd_); \
+ CYG_MACRO_END
+
+#define CYG_HAL_SYS_FD_CLR(_fd_, _fdsp_) \
+ CYG_MACRO_START \
+ (_fdsp_)->hal_fds_bits[CYG_HAL_SYS__FDELT(_fd_)] &= ~CYG_HAL_SYS__FDMASK(_fd_); \
+ CYG_MACRO_END
+
+#define CYG_HAL_SYS_FD_ISSET(_fd_, _fdsp_) \
+ (0 != ((_fdsp_)->hal_fds_bits[CYG_HAL_SYS__FDELT(_fd_)] & CYG_HAL_SYS__FDMASK(_fd_)))
+
+// Interval timer support, needed for the clock.
+#define CYG_HAL_SYS_ITIMER_REAL 0
+#define CYG_HAL_SYS_ITIMER_VIRTUAL 1
+#define CYG_HAL_SYS_ITIMER_PROF 2
+
+struct cyg_hal_sys_itimerval {
+ struct cyg_hal_sys_timeval it_interval;
+ struct cyg_hal_sys_timeval it_value;
+};
+
+// System calls and related constants, or rather the subset that is
+// needed internally.
+#define CYG_HAL_SYS_R_OK 0x04
+#define CYG_HAL_SYS_W_OK 0x02
+#define CYG_HAL_SYS_X_OK 0x01
+#define CYG_HAL_SYS_F_OK 0x00
+
+/* lseek whence flags */
+#define CYG_HAL_SYS_SEEK_SET 0 /* Seek from beginning of file. */
+#define CYG_HAL_SYS_SEEK_CUR 1 /* Seek from current position. */
+#define CYG_HAL_SYS_SEEK_END 2 /* Seek from end of file. */
+
+/* open/fcntl flags */
+
+#define CYG_HAL_SYS_O_RDONLY 0
+#define CYG_HAL_SYS_O_WRONLY 01
+#define CYG_HAL_SYS_O_RDWR 02
+#define CYG_HAL_SYS_O_CREAT 0100
+#define CYG_HAL_SYS_O_EXCL 0200
+#define CYG_HAL_SYS_O_NOCTTY 0400
+#define CYG_HAL_SYS_O_TRUNC 01000
+#define CYG_HAL_SYS_O_APPEND 02000
+#define CYG_HAL_SYS_O_NONBLOCK 04000
+#define CYG_HAL_SYS_O_NDELAY CYG_HAL_SYS_O_NONBLOCK
+#define CYG_HAL_SYS_O_SYNC 010000
+#define CYG_HAL_SYS_O_FSYNC CYG_HAL_SYS_O_SYNC
+#define CYG_HAL_SYS_O_ASYNC 020000
+
+/* open mode flags */
+#define CYG_HAL_SYS_S_IRUSR 0400
+#define CYG_HAL_SYS_S_IREAD CYG_HAL_SYS_S_IRUSR
+#define CYG_HAL_SYS_S_IWUSR 0200
+#define CYG_HAL_SYS_S_IWRITE CYG_HAL_SYS_S_IWUSR
+#define CYG_HAL_SYS_S_IXUSR 0100
+#define CYG_HAL_SYS_S_IEXEC CYG_HAL_SYS_S_IXUSR
+#define CYG_HAL_SYS_S_IRWXU \
+ (CYG_HAL_SYS_S_IREAD|CYG_HAL_SYS_S_IWRITE|CYG_HAL_SYS_S_IEXEC)
+#define CYG_HAL_SYS_S_IRWXG (CYG_HAL_SYS_S_IRWXU>>3)
+#define CYG_HAL_SYS_S_IRGRP (CYG_HAL_SYS_S_IRUSR>>3)
+#define CYG_HAL_SYS_S_IWGRP (CYG_HAL_SYS_S_IWUSR>>3)
+#define CYG_HAL_SYS_S_IXGRP (CYG_HAL_SYS_S_IXUSR>>3)
+#define CYG_HAL_SYS_S_IRWXO (CYG_HAL_SYS_S_IRWXG>>3)
+#define CYG_HAL_SYS_S_IROTH (CYG_HAL_SYS_S_IRGRP>>3)
+#define CYG_HAL_SYS_S_IWOTH (CYG_HAL_SYS_S_IWGRP>>3)
+#define CYG_HAL_SYS_S_IXOTH (CYG_HAL_SYS_S_IXGRP>>3)
+
+/* stat flags */
+#define CYG_HAL_SYS_S_IFMT 0170000 /*bitmask for the file type bitfields*/
+#define CYG_HAL_SYS_S_IFSOCK 0140000 /*socket*/
+#define CYG_HAL_SYS_S_IFLNK 0120000 /*symbolic link*/
+#define CYG_HAL_SYS_S_IFREG 0100000 /*regular file*/
+#define CYG_HAL_SYS_S_IFBLK 0060000 /*block device*/
+#define CYG_HAL_SYS_S_IFDIR 0040000 /*directory*/
+#define CYG_HAL_SYS_S_IFCHR 0020000 /*character device*/
+#define CYG_HAL_SYS_S_IFIFO 0010000 /*fifo*/
+#define CYG_HAL_SYS_S_ISUID 0004000 /*set UID bit*/
+#define CYG_HAL_SYS_S_ISGID 0002000 /*set GID bit (see below)*/
+#define CYG_HAL_SYS_S_ISVTX 0001000 /*sticky bit (see below)*/
+
+struct cyg_hal_sys_mmap_args {
+ unsigned long addr;
+ unsigned long len;
+ unsigned long prot;
+ unsigned long flags;
+ unsigned long fd;
+ unsigned long offset;
+};
+
+/* Protection flags for mmap */
+#define CYG_HAL_SYS_PROT_READ 0x1 /* page can be read */
+#define CYG_HAL_SYS_PROT_WRITE 0x2 /* page can be written */
+#define CYG_HAL_SYS_PROT_EXEC 0x4 /* page can be executed */
+#define CYG_HAL_SYS_PROT_NONE 0x0 /* page can not be accessed */
+
+/* Sharing types and other flags */
+#define CYG_HAL_SYS_MAP_SHARED 0x01 /* Share changes. */
+#define CYG_HAL_SYS_MAP_PRIVATE 0x02 /* Changes are private. */
+#define CYG_HAL_SYS_MAP_FIXED 0x10 /* Interpret addr exactly. */
+
+struct cyg_hal_sys_dirent
+{
+ unsigned long d_ino;
+ unsigned long d_off;
+ unsigned short int d_reclen;
+ char d_name[256];
+};
+
+struct cyg_hal_sys_timespec
+{
+ unsigned int tv_sec;
+ unsigned int tv_nsec;
+};
+
+struct cyg_hal_sys_stat
+{
+ unsigned int dev; /* inode */
+ unsigned long ino; /* device */
+ unsigned short mode; /* protection */
+ unsigned short nlink; /* number of hard links */
+ unsigned short uid; /* user ID of owner */
+ unsigned short gid; /* group ID of owner */
+ unsigned long rdev; /* device type (if inode device) */
+ unsigned long size; /* total size, in bytes */
+ unsigned int blksize; /* blocksize for filesystem I/O */
+ unsigned int blocks; /* number of blocks allocated */
+ struct cyg_hal_sys_timespec atime; /* time of last access */
+ struct cyg_hal_sys_timespec mtime; /* time of last modification */
+ struct cyg_hal_sys_timespec ctime; /* time of last change */
+};
+
+// System calls, or rather the subset that is needed internally or by
+// applications which want to access the host OS.
+
+externC int cyg_hal_sys_mknod(const char *, unsigned int, short);
+externC unsigned long cyg_hal_sys_write(int, const void*, long);
+externC unsigned long cyg_hal_sys_read(int, void*, long);
+externC int cyg_hal_sys_lseek(int, int, int);
+externC int cyg_hal_sys_open(const char *,int,int);
+externC int cyg_hal_sys_fdatasync(int);
+externC int cyg_hal_sys_ioctl(int, int, char*);
+externC int cyg_hal_sys_sigaction(int,
+ const struct cyg_hal_sys_sigaction*,
+ struct cyg_hal_sys_sigaction*);
+externC int cyg_hal_sys_sigprocmask(int,
+ const cyg_hal_sys_sigset_t*,
+ cyg_hal_sys_sigset_t*);
+externC int cyg_hal_sys__newselect(int,
+ struct cyg_hal_sys_fd_set*,
+ struct cyg_hal_sys_fd_set*,
+ struct cyg_hal_sys_fd_set*,
+ struct cyg_hal_sys_timeval*);
+externC int cyg_hal_sys_select(int,
+ struct cyg_hal_sys_fd_set*,
+ struct cyg_hal_sys_fd_set*,
+ struct cyg_hal_sys_fd_set*,
+ struct cyg_hal_sys_timeval*);
+externC int cyg_hal_sys_setitimer(int,
+ const struct cyg_hal_sys_itimerval*,
+ struct cyg_hal_sys_itimerval*);
+externC int cyg_hal_sys_gettimeofday(struct cyg_hal_sys_timeval*,
+ struct cyg_hal_sys_timezone*);
+
+externC int cyg_hal_sys_access(const char*, int);
+externC int cyg_hal_sys_fork(void);
+externC int cyg_hal_sys_execve(const char*, const char* [], const char* []);
+externC int cyg_hal_sys_pipe(int []);
+externC int cyg_hal_sys_close(int);
+externC int cyg_hal_sys_dup2(int, int);
+externC int cyg_hal_sys_unlink(const char*);
+externC int cyg_hal_sys_getpid(void);
+
+#define CYG_HAL_SYS_IPCOP_semop 1
+#define CYG_HAL_SYS_IPCOP_semget 2
+#define CYG_HAL_SYS_IPCOP_semctl 3
+#define CYG_HAL_SYS_IPCOP_msgsnd 11
+#define CYG_HAL_SYS_IPCOP_msgrcv 12
+#define CYG_HAL_SYS_IPCOP_msgget 13
+#define CYG_HAL_SYS_IPCOP_msgctl 14
+#define CYG_HAL_SYS_IPCOP_shmat 21
+#define CYG_HAL_SYS_IPCOP_shmdt 22
+#define CYG_HAL_SYS_IPCOP_shmget 23
+#define CYG_HAL_SYS_IPCOP_shmctl 24
+
+/*The ipc system call, which is used by the following shmem
+ functions. These may be unportable*/
+
+// Generic system call. Depending on the value of call, it will
+// perform the following functions.
+externC int cyg_hal_sys_ipc(int call, int first, int second,
+ int third, void* ptr);
+//get an identifier for a shared memory segment
+externC int cyg_hal_sys_shmget (int key, int size, int shmflg);
+//attach to an shared memory segment
+externC void * cyg_hal_sys_shmat (int shmid, const void* shmaddr,
+ int shmflg);
+//detach from it again
+externC int cyg_hal_sys_shmdt (const void* shmaddr);
+
+// The actual implementation appears to return the new brk() value.
+externC void* cyg_hal_sys_brk(void*);
+
+// Returns the number of characters placed in the buffer or <0 for error,
+// not a char*.
+externC int cyg_hal_sys_getcwd(char*, int);
+
+// mmap on the "host" system - this may be unportable. This is the
+// really system call into the kernel which passes one structure
+// containing all the arguments.
+externC int cyg_hal_sys_mmapx(struct cyg_hal_sys_mmap_args *);
+
+// This is the mmap call that users are used to.
+externC int cyg_hal_sys_mmap(void *addr,
+ unsigned long length,
+ unsigned long prot,
+ unsigned long flags,
+ unsigned long fd,
+ unsigned long off);
+
+externC int cyg_hal_sys_readdir(unsigned int fd,
+ struct cyg_hal_sys_dirent *dp,
+ unsigned int count);
+externC int cyg_hal_sys_lstat(const char* name, struct cyg_hal_sys_stat *buf);
+externC int cyg_hal_sys_fstat(int fd, struct cyg_hal_sys_stat *buf);
+externC int cyg_hal_sys_mkdir(const char* path, int mode);
+
+externC int cyg_hal_sys_atexit_handler(void (*fct_atexit)(void));
+
+externC int cyg_hal_sys_socketcall(int call, unsigned long *args);
+
+// Access to environmental data
+extern int cyg_hal_sys_argc;
+extern const char** cyg_hal_sys_argv;
+extern const char** cyg_hal_sys_environ;
+
+#endif // ifndef CYGONCE_HAL_HAL_SYSCALL_H
+// End of hal_syscall.h
diff --git a/cesar/ecos/packages/hal/maximus/arch/current/src/maximus.ld b/cesar/ecos/packages/hal/maximus/arch/current/src/maximus.ld
new file mode 100644
index 0000000000..2960e2b33a
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/arch/current/src/maximus.ld
@@ -0,0 +1,186 @@
+//==========================================================================
+//
+// maximus.ld
+//
+// Linker script for the maximus target
+//
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors:jskov, bartv
+// Date: 1999-01-18
+// Purpose: maximus target linker script
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+STARTUP(vectors.o)
+ENTRY(_start)
+#ifdef EXTRAS
+INPUT(extras.o)
+#endif
+#if (__GNUC__ >= 3)
+GROUP(libtarget.a libgcc.a libsupc++.a libgcc_eh.a)
+#else
+GROUP(libtarget.a libgcc.a)
+#endif
+
+#define ALIGN_LMA 8
+#define FOLLOWING(_section_) AT ((LOADADDR (_section_) + SIZEOF (_section_) + ALIGN_LMA - 1) & ~ (ALIGN_LMA - 1))
+#define LMA_EQ_VMA
+#define FORCE_OUTPUT . = .
+
+
+#define SECTIONS_BEGIN
+
+#define SECTION_vectors(_region_, _vma_, _lma_) \
+ .vectors _vma_ : _lma_ \
+ { FORCE_OUTPUT; KEEP(*(.vectors)) } \
+ > _region_
+
+#define SECTION_text(_region_, _vma_, _lma_) \
+ .text _vma_ : _lma_ \
+ { _stext = .; \
+ *(.text*) *(.gnu.warning) *(.gnu.linkonce.t.*) *(.init) } \
+ > _region_ \
+ _etext = .; PROVIDE (etext = .);
+
+#define SECTION_fini(_region_, _vma_, _lma_) \
+ .fini _vma_ : _lma_ \
+ { FORCE_OUTPUT; *(.fini) } \
+ > _region_
+
+#define SECTION_rodata1(_region_, _vma_, _lma_) \
+ .rodata1 _vma_ : _lma_ \
+ { FORCE_OUTPUT; *(.rodata1) } \
+ > _region_
+
+#define SECTION_rodata(_region_, _vma_, _lma_) \
+ .rodata _vma_ : _lma_ \
+ { FORCE_OUTPUT; *(.rodata*) *(.gnu.linkonce.r.*) } \
+ > _region_
+
+#define SECTION_fixup(_region_, _vma_, _lma_) \
+ .fixup _vma_ : _lma_ \
+ { _FIXUP_START_ = ABSOLUTE(.); *(.fixup) _FIXUP_END_ = ABSOLUTE(.);} \
+ > _region_
+
+#define SECTION_gcc_except_table(_region_, _vma_, _lma_) \
+ .gcc_except_table _vma_ : _lma_ \
+ { _EXCEPT_START_ = ABSOLUTE(.); *(.gcc_except_table) \
+ _EXCEPT_END_ = ABSOLUTE(.);} \
+ > _region_
+
+#define SECTION_eh_frame(_region_, _vma_, _lma_) \
+ .eh_frame_hdr : { *(.eh_frame_hdr) } > _region_ \
+ .eh_frame _vma_ : _lma_ \
+ { \
+ FORCE_OUTPUT; __EH_FRAME_BEGIN__ = .; \
+ KEEP(*(.eh_frame)) \
+ __FRAME_END__ = .; \
+ . = . + 8; \
+ } > _region_ = 0
+
+#define SECTION_RELOCS(_region_, _vma_, _lma_) \
+ .rel.text : \
+ { \
+ *(.rel.text) \
+ *(.rel.text.*) \
+ *(.rel.gnu.linkonce.t*) \
+ } > _region_ \
+ .rela.text : \
+ { \
+ *(.rela.text) \
+ *(.rela.text.*) \
+ *(.rela.gnu.linkonce.t*) \
+ } > _region_ \
+ .rel.data : \
+ { \
+ *(.rel.data) \
+ *(.rel.data.*) \
+ *(.rel.gnu.linkonce.d*) \
+ } > _region_ \
+ .rela.data : \
+ { \
+ *(.rela.data) \
+ *(.rela.data.*) \
+ *(.rela.gnu.linkonce.d*) \
+ } > _region_ \
+ .rel.rodata : \
+ { \
+ *(.rel.rodata) \
+ *(.rel.rodata.*) \
+ *(.rel.gnu.linkonce.r*) \
+ } > _region_ \
+ .rela.rodata : \
+ { \
+ *(.rela.rodata) \
+ *(.rela.rodata.*) \
+ *(.rela.gnu.linkonce.r*) \
+ } > _region_ \
+ .rel.got : { *(.rel.got) } > _region_ \
+ .rela.got : { *(.rela.got) } > _region_ \
+ .rel.ctors : { *(.rel.ctors) } > _region_ \
+ .rela.ctors : { *(.rela.ctors) } > _region_ \
+ .rel.dtors : { *(.rel.dtors) } > _region_ \
+ .rela.dtors : { *(.rela.dtors) } > _region_ \
+ .rel.init : { *(.rel.init) } > _region_ \
+ .rela.init : { *(.rela.init) } > _region_ \
+ .rel.fini : { *(.rel.fini) } > _region_ \
+ .rela.fini : { *(.rela.fini) } > _region_ \
+ .rel.bss : { *(.rel.bss) } > _region_ \
+ .rela.bss : { *(.rela.bss) } > _region_ \
+ .rel.plt : { *(.rel.plt) } > _region_ \
+ .rela.plt : { *(.rela.plt) } > _region_ \
+ .rel.dyn : { *(.rel.dyn) } > _region_
+
+// Note: The __ in the name is an encoding of the .
+#define SECTION_rel__got(_region_, _vma_, _lma_) \
+ .rel.got _vma_ : _lma_ \
+ { *(.rel.got) } \
+ > _region_
+
+#define SECTION_data(_region_, _vma_, _lma_) \
+ .data _vma_ : _lma_ \
+ { __ram_data_start = ABSOLUTE(.); *(.data*) *(.gnu.linkonce.d.*) \
+ _GOT1_START_ = ABSOLUTE(.); *(.got1) _GOT1_END_ = ABSOLUTE(.); \
+ /* Put .ctors and .dtors next to the .got2 section, so that */ \
+ /* the pointers get relocated with -mrelocatable. */ \
+ . = ALIGN(8); __CTOR_LIST__ = ABSOLUTE(.); \
+ KEEP(*(SORT(.ctors*))) __CTOR_END__ = ABSOLUTE(.); \
+ __DTOR_LIST__ = ABSOLUTE(.); \
+ KEEP(*(SORT(.dtors*))) __DTOR_END__ = ABSOLUTE(.); \
+ . = ALIGN(32); \
+ KEEP(*( SORT (.ecos.table.*))); \
+ _GOT2_START_ = ABSOLUTE(.); *(.got2) _GOT2_END_ = ABSOLUTE(.); \
+ _GOT_START_ = ABSOLUTE(.); _GLOBAL_OFFSET_TABLE_ = ABSOLUTE(. + 32768); \
+ _SDA_BASE_ = ABSOLUTE(.); *(.got.plt) *(.got) \
+ _GOT_END_ = ABSOLUTE(.); *(.dynamic) \
+ /* We want the small data sections together, so single-instruction */ \
+ /* offsets can access them all, and initialized data all before */ \
+ /* uninitialized, so we can shorten the on-disk segment size. */ \
+ _SDATA_START_ = ABSOLUTE(.); *(.sdata*) *(.gnu.linkonce.s.*) } \
+ > _region_ \
+ __rom_data_start = LOADADDR(.data); \
+ __ram_data_end = .; PROVIDE(__ram_data_end = .); \
+ _edata = .; PROVIDE (edata = .);
+
+#define SECTION_sbss(_region_, _vma_, _lma_) \
+ .sbss _vma_ : _lma_ \
+ { __bss_start = ABSOLUTE (.); \
+ _SBSS_START_ = ABSOLUTE(.); *(.sbss*) *(.gnu.linkonce.sb.*) \
+ _SBSS_END_ = ABSOLUTE(.); \
+ *(.scommon*) } \
+ > _region_
+
+#define SECTION_bss(_region_, _vma_, _lma_) \
+ .bss _vma_ : _lma_ \
+ { FORCE_OUTPUT; *(.dynbss*) *(.bss*) *(COMMON) *(.gnu.linkonce.b.*) } \
+ > _region_ \
+ __bss_end = .;
+
+#define SECTIONS_END . = ALIGN(4); _end = .; PROVIDE (end = .);
+
+#include <pkgconf/system.h>
+#include CYGHWR_MEMORY_LAYOUT_LDI
diff --git a/cesar/ecos/packages/hal/maximus/arch/current/src/maximus_diag.c b/cesar/ecos/packages/hal/maximus/arch/current/src/maximus_diag.c
new file mode 100644
index 0000000000..b63f5c1e61
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/arch/current/src/maximus_diag.c
@@ -0,0 +1,107 @@
+//=============================================================================
+//
+// maximus_diag.c
+//
+// Maximus target diagnostic output code
+//
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jpSave
+// Contributors:SPiDCOM
+// Date: 2007-05-30
+// Purpose: HAL diagnostic output
+// Description: Implementations of HAL diagnostic output support.
+//
+// There are two possible ways of performing I/O. The first
+// involves simply writing to stdout. This is robust, but
+// has some disadvantages such as the output getting mixed up
+// with gdb output. The second involves sending the data on
+// to the SCI Layer, less robust but much more flexible.
+//
+// Currently, only the second way is provided for writing
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_diag.h>
+#include <cyg/hal/hal_io.h>
+#include <cyg/infra/cyg_ass.h>
+
+#include "common/std.h"
+#include "host/station.h"
+
+extern station_ctx_t my_station;
+
+//-----------------------------------------------------------------------------
+// hal_diag_init() nothing to do because the specific pipe (pipe_out) given
+// by the SCI Layer is open during the init procedure (station_init).
+
+void hal_diag_init( void )
+{
+}
+
+// Output a single character.
+//
+// The calling code will output one character at a time. Output
+// involves at least one system call, and this is expensive for
+// a single character (especially when used in conjunction with
+// I/O intensive facilities like unbuffered tracing). Therefore
+// this code will buffer lines up to 128 characters before
+// doing the I/O.
+//
+// NOTE: one problem is that there is no support for flushing buffers
+// at this level. Therefore if say C library stdio ends up mapped to
+// HAL diagnostics I/O then functions like fflush() and setvbuf() will
+// not behave the way they should. There is no simple workaround at
+// this level, the required information is not available.
+
+void hal_diag_write_char(char c)
+{
+ static int diag_index = 0;
+ static unsigned char diag_buffer[128];
+
+ CYG_ASSERT(diag_index < 128, "Diagnostic buffer overflow");
+
+ diag_buffer[diag_index++] = (unsigned char) c;
+
+ if (('\n' == c) || (128 == diag_index)) {
+ int written;
+ unsigned char* next = diag_buffer;
+
+ while (diag_index > 0) {
+#ifdef DIAG_WITH_STDIN
+ written = cyg_hal_sys_write(1, next, diag_index);
+#else
+ written = cyg_hal_sys_write(my_station.pipe_log_fd, next, diag_index);
+#endif
+ if (written > 0) {
+ diag_index -= written;
+ next += written;
+ }
+ else if ((-CYG_HAL_SYS_EINTR != written) && (-CYG_HAL_SYS_EAGAIN != written)) {
+ CYG_FAIL("Unexpected error writing to stdout.");
+ diag_index = 0;
+ break;
+ }
+ }
+ CYG_ASSERT(0 == diag_index, "All data should have been written out");
+ diag_index = 0;
+#ifdef DIAG_WITH_STDIN
+ cyg_hal_sys_fdatasync(1);
+#else
+ cyg_hal_sys_fdatasync(my_station.pipe_log_fd);
+#endif
+ }
+}
+
+// Diagnostic input. It is not clear that this is actually useful,
+// input would normally go to gdb rather than to the Maximus Simulator.
+void hal_diag_read_char(char *c)
+{
+}
+
+//-----------------------------------------------------------------------------
+// End of hal_diag.c
diff --git a/cesar/ecos/packages/hal/maximus/arch/current/src/maximus_entry.c b/cesar/ecos/packages/hal/maximus/arch/current/src/maximus_entry.c
new file mode 100644
index 0000000000..9a21ef22f6
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/arch/current/src/maximus_entry.c
@@ -0,0 +1,197 @@
+//==========================================================================
+//
+// maximus_entry.c
+//
+// Entry code for Linux maximus target.
+//
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jpSave
+// Contributors:SPiDCOM
+// Date: 2007-06-04
+// Purpose: Entry point for Linux Maximus Target.
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_io.h>
+#include CYGHWR_MEMORY_LAYOUT_H
+
+/*------------------------------------------------------------------------*/
+/* C++ support - run initial constructors */
+
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+cyg_bool cyg_hal_stop_constructors;
+#endif
+
+typedef void (*pfunc) (void);
+extern pfunc __CTOR_LIST__[];
+extern pfunc __CTOR_END__[];
+
+void
+cyg_hal_invoke_constructors (void)
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ static pfunc *p = &__CTOR_END__[-1];
+
+ cyg_hal_stop_constructors = 0;
+ for (; p >= __CTOR_LIST__; p--) {
+ (*p) ();
+ if (cyg_hal_stop_constructors) {
+ p--;
+ break;
+ }
+ }
+#else
+ pfunc *p;
+
+ for (p = &__CTOR_END__[-1]; p >= __CTOR_LIST__; p--)
+ (*p) ();
+#endif
+}
+
+// ----------------------------------------------------------------------------
+// The low-level entry point is platform-specific, typically in the
+// assember file vectors.S. However that entry point simply jumps
+// directly here, with no further processing or stack manipulation.
+// The HAL specification defines clearly what should happen during
+// startup.
+
+externC void cyg_start( void );
+externC void maximus_hardware_init(void);
+externC void maximus_hardware_init2(int argc, const char **argv);
+
+void _linux_entry( void )
+{
+ void* new_top = (void*) 0;
+
+ // "Initialize various cpu status registers, including disabling interrupts."
+ // That is a no-op for the Maximus target, in particular interrupts are
+ // already disabled.
+
+ // "Set up any CPU memory controller to access ROM, RAM, and I/O devices
+ // correctly".
+ //
+ // This involves using the brk() system call to allocate the RAM used
+ // for the heaps. There are no variables mapped there so the system
+ // will not have done this for us. Note that the implementation of
+ // brk() (mm/mmap.c) differs from the documentation - the return
+ // value is the new brk value, not an error code.
+ new_top = (void*) (CYGMEM_REGION_ram + CYGMEM_REGION_ram_SIZE);
+ if (new_top != cyg_hal_sys_brk(new_top)) {
+ CYG_FAIL("Failed to initialize memory");
+ HAL_PLATFORM_EXIT(1);
+ }
+
+ // "Enable the cache". Effectively the Maximus target has no cache,
+ // anything provided by the hardware is not readily accessible.
+
+ // "Set up the stack pointer". The system starts up a program with a
+ // suitable stack.
+
+ // "Initialize any global pointer register". There is no such register.
+
+ // Perform platform-specific initialization. Actually, all Linux
+ // platforms can share this. It involves setting up signal handlers,
+ // starting communications with SCI layer, and so on.
+ maximus_hardware_init();
+
+ // This is not a ROM startup, so no need to worry about copying the
+ // .data section.
+
+ // "Zero the .bss section". Linux will have done this for us.
+
+ // "Create a suitable C stack frame". Already done.
+
+ // Invoke the C++ constructors.
+ cyg_hal_invoke_constructors();
+
+ // Once the C++ constructors have been invoked, a second stage
+ // of hardware initialization is desirable. At this point all
+ // eCos device drivers should have been initialized so the
+ // I/O auxiliary will have loaded the appropriate support
+ // scripts, and the auxiliary can now map the window(s) on to
+ // the display and generally operate normally.
+ maximus_hardware_init2(cyg_hal_sys_argc, cyg_hal_sys_argv);
+
+ // "Call cyg_start()". OK.
+ cyg_start();
+
+ // "Drop into an infinite loop". Not a good idea for the Maximus
+ // target. Instead, exit.
+ HAL_PLATFORM_EXIT(0);
+}
+
+// ----------------------------------------------------------------------------
+// Stub functions needed for linking with various versions of gcc
+// configured for Linux rather than i386-elf.
+
+#if (__GNUC__ < 3)
+// 2.95.x libgcc.a __pure_virtual() calls __write().
+int __write(void)
+{
+ return -1;
+}
+#endif
+
+#if (__GNUC__ >= 3)
+// Versions of gcc/g++ after 3.0 (approx.), when configured for Linux
+// native development (specifically, --with-__cxa_enable), have
+// additional dependencies related to the destructors for static
+// objects. When compiling C++ code with static objects the compiler
+// inserts a call to __cxa_atexit() with __dso_handle as one of the
+// arguments. __cxa_atexit() would normally be provided by glibc, and
+// __dso_handle is part of crtstuff.c. Synthetic target applications
+// are linked rather differently, so either a differently-configured
+// compiler is needed or dummy versions of these symbols should be
+// provided. If these symbols are not actually used then providing
+// them is still harmless, linker garbage collection will remove them.
+
+void
+__cxa_atexit(void (*arg1)(void*), void* arg2, void* arg3)
+{
+}
+void* __dso_handle = (void*) &__dso_handle;
+
+// gcc 3.2.2 (approx). The libsupc++ version of the new operator pulls
+// in exception handling code, even when using the nothrow version and
+// building with -fno-exceptions. libgcc_eh.a provides the necessary
+// functions, but requires a dl_iterate_phdr() function. That is related
+// to handling dynamically loaded code so is not applicable to eCos.
+int
+dl_iterate_phdr(void* arg1, void* arg2)
+{
+ return -1;
+}
+#endif
+
+#if (__GNUC__ >= 4)
+// First noticed with gcc 4.1.1. There is now code to detect stack
+// smashing.
+void __attribute__ ((noreturn))
+__stack_chk_fail(void)
+{
+ CYG_FAIL("Stack smashing detected, aborting");
+ diag_printf("Application error: stack smashing detected.\n");
+ HAL_PLATFORM_EXIT(1);
+ for (;;);
+}
+
+void __attribute__ ((noreturn))
+__stack_chk_fail_local(void)
+{
+ __stack_chk_fail();
+}
+#endif
+
+//-----------------------------------------------------------------------------
+// End of entry.c
diff --git a/cesar/ecos/packages/hal/maximus/arch/current/src/maximus_intr.c b/cesar/ecos/packages/hal/maximus/arch/current/src/maximus_intr.c
new file mode 100644
index 0000000000..f96ad9003a
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/arch/current/src/maximus_intr.c
@@ -0,0 +1,465 @@
+//=============================================================================
+//
+// maximus_intr.c
+//
+// Interrupt and clock code for the Linux maximus target.
+//
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jpSave
+// Contributors: SPiDCOM
+// Date: 2001-03-30
+// Purpose: Implement the interrupt subsystem for the maximus target
+//####DESCRIPTIONEND####
+//=============================================================================
+
+// ----------------------------------------------------------------------------
+#include <pkgconf/hal.h>
+#include <pkgconf/hal_maximus.h>
+
+// There are various dependencies on the kernel, e.g. how exceptions
+// should be handled.
+#include <pkgconf/system.h>
+#ifdef CYGPKG_KERNEL
+# include <pkgconf/kernel.h>
+#endif
+
+#include <cyg/infra/cyg_type.h> // base types
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_io.h>
+#include <cyg/infra/cyg_ass.h> // Assertions are safe in the maximus target
+
+#include "common/std.h"
+#include "host/station.h"
+#include "lib/atox.h"
+
+// global variable to communicate with SCI Layer
+station_ctx_t my_station = {0};
+
+// Are interrupts currently enabled?
+volatile cyg_bool_t hal_interrupts_enabled = false;
+
+// ----------------------------------------------------------------------------
+// Statics.
+
+// The current VSR, to be invoked by the signal handler. This allows
+// application code to install an alternative VSR, without that VSR
+// having to check for interrupts being disabled and updating the
+// pending flags. Effectively, the VSR is only invoked when interrupts
+// are enabled.
+static void (*maximus_VSR)(void) = (void (*)(void)) 0;
+
+// The current ISR status and mask registers, or rather software
+// emulations thereof. These are not static since application-specific
+// VSRs may want to examine/manipulate these.
+volatile cyg_uint32 maximus_pending_isrs = 0;
+
+// RTC isr (0) is not masked : tick can arrive just after the init procedure
+volatile cyg_uint32 maximus_masked_isrs = 0xFFFFFFFE;
+
+// The vector of interrupt handlers.
+typedef struct maximus_isr_handler {
+ cyg_ISR_t* isr;
+ CYG_ADDRWORD data;
+ CYG_ADDRESS obj;
+ cyg_priority_t pri;
+} maximus_isr_handler;
+static maximus_isr_handler maximus_isr_handlers[CYGNUM_HAL_ISR_COUNT];
+
+// ----------------------------------------------------------------------------
+// Basic ISR and VSR handling.
+
+// The default ISR handler. The system should never receive an interrupt it
+// does not know how to handle.
+static cyg_uint32
+maximus_default_isr(cyg_vector_t vector, cyg_addrword_t data)
+{
+ CYG_UNUSED_PARAM(cyg_vector_t, vector);
+ CYG_UNUSED_PARAM(cyg_addrword_t, data);
+ CYG_FAIL("Default isr handler should never get invoked");
+ return CYG_ISR_HANDLED;
+}
+
+// The VSR is invoked
+// 1) directly by the IDLE Thread action function, if interrupts
+// were enabled.
+// 2) indirectly by hal_enable_interrupts(), if the IRQ Status Register
+// (maximus_pending_isrs) moved while interrupts were disabled.
+// hal_enable_interrupts() will have re-invoked the signal handler.
+//
+// Be careful,there should be one or more pending ISRs which are not
+// masked off.
+
+static void
+maximus_default_vsr(void)
+{
+ int isr_vector;
+ cyg_uint32 isr_result;
+
+ CYG_ASSERT(!hal_interrupts_enabled, "VSRs should only be invoked when interrupts are disabled");
+ CYG_ASSERT(0 != (maximus_pending_isrs & ~maximus_masked_isrs), "VSRs should only be invoked when an interrupt is pending");
+
+ // No need to save the cpu state. Either we are in the IDLE thread
+ // action and we don't really switch to an interruption context,
+ // or we are called synchronously via enable_interrupts.
+
+ // Increment the kernel scheduler lock, if the kernel is present.
+ // This prevents context switching while interrupt handling is in
+ // progress.
+#ifdef CYGFUN_HAL_COMMON_KERNEL_SUPPORT
+ cyg_scheduler_lock();
+#endif
+
+ // Do not switch to an interrupt stack - functionality is not
+ // implemented
+
+ // Do not allow nested interrupts - functionality is not
+ // implemented.
+
+ // Decode the actual external interrupt being delivered. This is
+ // determined from the pending and masked variables. Only one isr
+ // source can be handled here, since interrupt_end must be invoked
+ // with details of that interrupt. Multiple pending interrupts
+ // will be handled by a recursive call
+ HAL_LSBIT_INDEX(isr_vector, (maximus_pending_isrs & ~maximus_masked_isrs));
+ CYG_ASSERT((CYGNUM_HAL_ISR_MIN <= isr_vector) && (isr_vector <= CYGNUM_HAL_ISR_MAX), "ISR vector must be valid");
+
+ isr_result = (*maximus_isr_handlers[isr_vector].isr)(isr_vector, maximus_isr_handlers[isr_vector].data);
+
+ // Do not switch back from the interrupt stack, there isn't one.
+
+ // Interrupts were not enabled before, so they must be enabled
+ // now. This may result in a recursive invocation if other IRQs
+ // are still pending. The ISR should have either acknowledged or
+ // masked the current interrupt source, to prevent a recursive
+ // call for the current interrupt.
+ hal_enable_interrupts();
+
+ // Now call interrupt_end() with the result of the isr and the
+ // ISR's object This may return straightaway, or it may result in
+ // a context switch to another thread. In the latter case, when
+ // the current thread is reactivated we end up back here. The
+ // third argument should be a pointer to the saved state, but that
+ // is only relevant for thread-aware debugging which is not
+ // supported by the maximus target.
+ {
+ extern void interrupt_end(cyg_uint32, CYG_ADDRESS, HAL_SavedRegisters*);
+ interrupt_end(isr_result, maximus_isr_handlers[isr_vector].obj, (HAL_SavedRegisters*) 0);
+ }
+
+ // Restore machine state and return to the interrupted thread.
+ // That requires no effort here.
+}
+
+// Enabling interrupts. Use during to cases :
+// 1) If the interrupt pending "register" moved at an inconvenient time.
+// This cases should not arrived because with Maximus target an interrupt can
+// arrived only when we are in the IDLE Thread Action),
+// 2) it's an easy way to process several ISRs when we are into the VSR
+// function.
+void
+hal_enable_interrupts(void)
+{
+ hal_interrupts_enabled = true;
+
+ // The interrupt pending "register" may have been modified while
+ // interrupts were disabled. If there are pending interrupts,
+ // invoke the VSR. The VSR must be invoked with interrupts
+ // disabled, and will return with interrupts enabled.
+ if ((maximus_pending_isrs & ~maximus_masked_isrs) != 0) {
+ hal_interrupts_enabled = false;
+ (*maximus_VSR)();
+ CYG_ASSERT( hal_interrupts_enabled, "Interrupts should still be enabled on return from the VSR");
+ }
+}
+
+// ----------------------------------------------------------------------------
+// Other interrupt-related routines. Mostly these just involve
+// updating some of the statics, but they may be called while
+// interrupts are still enabled so care has to be taken.
+
+cyg_bool_t
+hal_interrupt_in_use(cyg_vector_t vec)
+{
+ CYG_ASSERT( (CYGNUM_HAL_ISR_MIN <= vec) && (vec <= CYGNUM_HAL_ISR_MAX), "Can only attach to valid ISR vectors");
+ return maximus_default_isr != maximus_isr_handlers[vec].isr;
+}
+
+void
+hal_interrupt_attach(cyg_vector_t vec, cyg_ISR_t* isr, CYG_ADDRWORD data, CYG_ADDRESS obj)
+{
+ CYG_ASSERT( (CYGNUM_HAL_ISR_MIN <= vec) && (vec <= CYGNUM_HAL_ISR_MAX), "Can only attach to valid ISR vectors");
+ CYG_CHECK_FUNC_PTR( isr, "A valid ISR must be supplied");
+ // The object cannot be validated, it may be NULL if chained
+ // interrupts are enabled.
+ CYG_ASSERT( maximus_isr_handlers[vec].isr == &maximus_default_isr, "Only one ISR can be attached to a vector at the HAL level");
+ CYG_ASSERT( (false == hal_interrupts_enabled) || (0 != (maximus_masked_isrs & (0x01 << vec))), "ISRs should only be attached when it is safe");
+
+ // The priority will have been installed shortly before this call.
+ maximus_isr_handlers[vec].isr = isr;
+ maximus_isr_handlers[vec].data = data;
+ maximus_isr_handlers[vec].obj = obj;
+}
+
+void
+hal_interrupt_detach(cyg_vector_t vec, cyg_ISR_t* isr)
+{
+ CYG_ASSERT( (CYGNUM_HAL_ISR_MIN <= vec) && (vec <= CYGNUM_HAL_ISR_MAX), "Can only detach from valid ISR vectors");
+ CYG_CHECK_FUNC_PTR( isr, "A valid ISR must be supplied");
+ CYG_ASSERT( isr != &maximus_default_isr, "An ISR must be attached before it can be detached");
+ CYG_ASSERT( (false == hal_interrupts_enabled) || (0 != (maximus_masked_isrs & (0x01 << vec))), "ISRs should only be detached when it is safe");
+
+ // The Cyg_Interrupt destructor does an unconditional detach, even if the
+ // isr is not currently attached.
+ if (isr == maximus_isr_handlers[vec].isr) {
+ maximus_isr_handlers[vec].isr = &maximus_default_isr;
+ maximus_isr_handlers[vec].data = (CYG_ADDRWORD) 0;
+ maximus_isr_handlers[vec].obj = (CYG_ADDRESS) 0;
+ }
+
+ // The priority is not updated here. This should be ok, if another
+ // isr is attached then the appropriate priority will be installed
+ // first.
+}
+
+void (*hal_vsr_get(cyg_vector_t vec))(void)
+{
+ CYG_ASSERT( (CYGNUM_HAL_VSR_MIN <= vec) && (vec <= CYGNUM_HAL_VSR_MAX), "Can only get valid VSR vectors");
+ return maximus_VSR;
+}
+
+void
+hal_vsr_set(cyg_vector_t vec, void (*new_vsr)(void), void (**old_vsrp)(void))
+{
+ cyg_bool_t old;
+
+ CYG_ASSERT( (CYGNUM_HAL_VSR_MIN <= vec) && (vec <= CYGNUM_HAL_VSR_MAX), "Can only get valid VSR vectors");
+ CYG_CHECK_FUNC_PTR( new_vsr, "A valid VSR must be supplied");
+
+ // There is a theoretical possibility of two hal_vsr_set calls at
+ // the same time. The old and new VSRs must be kept in synch.
+ HAL_DISABLE_INTERRUPTS(old);
+ if (0 != old_vsrp) {
+ *old_vsrp = maximus_VSR;
+ }
+ maximus_VSR = new_vsr;
+ HAL_RESTORE_INTERRUPTS(old);
+}
+
+void
+hal_interrupt_mask(cyg_vector_t which)
+{
+ CYG_PRECONDITION( !hal_interrupts_enabled, "Interrupts should be disabled on entry to hal_interrupt_mask");
+ CYG_ASSERT((CYGNUM_HAL_ISR_MIN <= which) && (which <= CYGNUM_HAL_ISR_MAX), "A valid ISR vector must be supplied");
+ maximus_masked_isrs |= (0x01 << which);
+}
+
+void
+hal_interrupt_unmask(cyg_vector_t which)
+{
+ CYG_PRECONDITION( !hal_interrupts_enabled, "Interrupts should be disabled on entry to hal_interrupt_unmask");
+ CYG_ASSERT((CYGNUM_HAL_ISR_MIN <= which) && (which <= CYGNUM_HAL_ISR_MAX), "A valid ISR vector must be supplied");
+ maximus_masked_isrs &= ~(0x01 << which);
+}
+
+void
+hal_interrupt_acknowledge(cyg_vector_t which)
+{
+ cyg_bool_t old;
+ CYG_ASSERT((CYGNUM_HAL_ISR_MIN <= which) && (which <= CYGNUM_HAL_ISR_MAX), "A valid ISR vector must be supplied");
+
+ // Acknowledging an interrupt means clearing the bit in the
+ // interrupt pending "register".
+ HAL_DISABLE_INTERRUPTS(old);
+ maximus_pending_isrs &= ~(0x01 << which);
+ HAL_RESTORE_INTERRUPTS(old);
+}
+
+void
+hal_interrupt_configure(cyg_vector_t which, cyg_bool_t level, cyg_bool_t up)
+{
+ CYG_ASSERT((CYGNUM_HAL_ISR_MIN <= which) && (which <= CYGNUM_HAL_ISR_MAX), "A valid ISR vector must be supplied");
+ // The maximus target does not currently distinguish between
+ // level and edge interrupts. Possibly this information will have
+ // to be passed on to the SCI Layer in future.
+ CYG_UNUSED_PARAM(cyg_vector_t, which);
+ CYG_UNUSED_PARAM(cyg_bool_t, level);
+ CYG_UNUSED_PARAM(cyg_bool_t, up);
+}
+
+void
+hal_interrupt_set_level(cyg_vector_t which, cyg_priority_t level)
+{
+ CYG_ASSERT((CYGNUM_HAL_ISR_MIN <= which) && (which <= CYGNUM_HAL_ISR_MAX), "A valid ISR vector must be supplied");
+ // The legal values for priorities are not defined at this time.
+ // Manipulating the interrupt priority level currently has no
+ // effect. The information is stored anyway, for future use.
+ maximus_isr_handlers[which].pri = level;
+}
+
+static void
+maximus_terminate_sighandler(int sig)
+{
+ cyg_bool_t old;
+
+ // Disable interrupts.
+ HAL_DISABLE_INTERRUPTS(old);
+ station_down(&my_station);
+ HAL_PLATFORM_EXIT(0);
+}
+// ----------------------------------------------------------------------------
+// The clock support. This can be implemented using the SCI Layercalls.
+// The kernel will install a suitable interrupt handler for
+// CYGNUM_HAL_INTERRUPT_RTC, but it depends on the HAL for low-level
+// manipulation of the clock hardware.
+
+static tick_t maximus_clock_tick = 0;
+static cyg_uint32 last_period = 0;
+
+// convert maximus_sci_tick into microseconds
+static cyg_uint32 tick_to_us(tick_t tick)
+{
+ return (cyg_uint32)(((cyg_uint64)(tick * 1000000)) / TICK_HZ);
+}
+// convert microseconds into maximus_sci_tick
+static tick_t us_to_tick(cyg_uint32 us)
+{
+ return (tick_t)(us * (TICK_HZ / 1000000));
+}
+
+// Configure the timer which will start the RTC INTERRUPT on the period end
+void
+hal_clock_initialize(cyg_uint32 period)
+{
+ tick_t next_tick;
+
+ // Needed for hal_clock_read(), if HAL_CLOCK_READ() is used before
+ // the first clock interrupt.
+ maximus_clock_tick = my_station.current_tick_tck;
+
+ // The maximus target clock resolution is in microseconds. A typical
+ // value for the period will be 10000, corresponding to one timer
+ // interrupt after 10ms. Set up a timer to interrupt in period us.
+ CYG_ASSERT( period < 1000000, "Clock interrupts should happen at least once per second");
+ last_period = period;
+
+ // convert microseconds into maximus_sci_tick
+ next_tick = maximus_clock_tick + (us_to_tick(period));
+
+ // send this prescaler timer value to the SCI Layer
+ station_ecos_set_itimer(&my_station, next_tick);
+}
+
+// Implementing hal_clock_read(). the current maximus tick in conjunction with
+// the maximus tick saved during the hal_clock_initialize gives the time since
+// the last clock tick in microseconds, the correct unit for the maximus target.
+cyg_uint32
+hal_clock_read(void)
+{
+ return tick_to_us(my_station.current_tick_tck - maximus_clock_tick);
+}
+
+// ----------------------------------------------------------------------------
+// Here we define an action to do in the idle thread. For the
+// maximus target it makes no sense to spin eating processor time
+// that other processes could make use of. Instead we call the SCI Layer to
+// tell it that we are ok to advance time
+void
+hal_idle_thread_action(cyg_uint32 loop_count)
+{
+ uint32_t old_isr_register;
+
+ // save IRQ Register
+ old_isr_register = maximus_pending_isrs;
+ // call SCI Layer to tell us that we are in IDLE state
+ if (0 != station_idle(&my_station))
+ {
+ station_log(&my_station,
+ STATION_LOG_ERROR,
+ STATION_LOGTYPE_STATION,
+ "%s: SCI message has not been correctly received and/or processed",
+ __FUNCTION__);
+ station_down(&my_station);
+ }
+ // An IRQ can occur only when we leave the station_idle function because
+ // it's the SCI Layer which inform the HALPhy layer that an IRQ can occur
+ // and this layer will update our "IRQ Status Register" (variable
+ // maximus_pending_isrs)
+ if((maximus_pending_isrs != old_isr_register) &&
+ ((maximus_pending_isrs & ~maximus_masked_isrs) != 0)) {
+ hal_interrupts_enabled = false;
+ //additionnal specific process for the clock IT (IRQ 0)
+ if((maximus_pending_isrs & (0x01<<CYGNUM_HAL_INTERRUPT_RTC)) != 0) {
+ // start the VSR to process IRQ
+ (*maximus_VSR)();
+ // re-start the timer clock
+ hal_clock_initialize(last_period);
+ } else {
+ // start the VSR to process IRQ
+ (*maximus_VSR)();
+ }
+ // The VSR will have invoked interrupt_end() with interrupts
+ // enabled, and they should still be enabled.
+ CYG_ASSERT( hal_interrupts_enabled, "Interrupts should still be enabled on return from the VSR");
+ }
+
+ CYG_UNUSED_PARAM(cyg_uint32, loop_count);
+}
+
+// ----------------------------------------------------------------------------
+// Initialization
+
+void
+maximus_hardware_init(void)
+{
+ struct cyg_hal_sys_sigaction action;
+ int i;
+
+ // Set up the VSR and ISR statics
+ maximus_VSR = &maximus_default_vsr;
+ for (i = 0; i < CYGNUM_HAL_ISR_COUNT; i++) {
+ maximus_isr_handlers[i].isr = &maximus_default_isr;
+ maximus_isr_handlers[i].data = (CYG_ADDRWORD) 0;
+ maximus_isr_handlers[i].obj = (CYG_ADDRESS) 0;
+ maximus_isr_handlers[i].pri = CYGNUM_HAL_ISR_COUNT;
+ }
+
+ // Install signal handlers for Exceptions, SA_NODEFER is important:
+ // it means that the current signal will not be blocked while the
+ // signal handler is running. Combined with a mask of 0, it means
+ // that the sigprocmask does not change when a signal handler is
+ // invoked, giving eCos the flexibility to switch to other threads
+ // instead of having the signal handler return immediately.
+ action.hal_mask = 0;
+ action.hal_flags = CYG_HAL_SYS_SA_NODEFER;
+ action.hal_handler = &maximus_terminate_sighandler;
+ action.hal_restorer = (void (*)(void)) 0;
+ // Needed to close us when we receive a SIGTERM signal given by the
+ // Simulator
+ if (0 != cyg_hal_sys_sigaction(CYG_HAL_SYS_SIGTERM, &action, (struct cyg_hal_sys_sigaction*) 0)) {
+ CYG_FAIL("Failed to install signal handler for SIGTERM");
+ }
+
+ // All done. At this stage interrupts are still disabled, no ISRs
+ // have been installed, and the clock is not yet ticking.
+ // Exceptions can come in and will be processed normally. SIGIO
+ // could come in, but nothing has yet been done to make that happen.
+}
+
+// Second-stage hardware init. This is called after all C++ static
+// constructors have been run, which should mean that all device
+// drivers have been initialized and will have performed appropriate
+// interactions with the SCI layer.
+void
+maximus_hardware_init2(int argc, const char **argv)
+{
+ station_init(&my_station);
+ if(argc > 1)
+ {
+ my_station.current_tick_tck = atoull(argv[1]);
+ hal_clock_initialize(tick_to_us(TICK_HZ / 100));
+ }
+}
diff --git a/cesar/ecos/packages/hal/maximus/arch/current/src/maximus_syscalls.c b/cesar/ecos/packages/hal/maximus/arch/current/src/maximus_syscalls.c
new file mode 100644
index 0000000000..e249c07ba1
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/arch/current/src/maximus_syscalls.c
@@ -0,0 +1,80 @@
+//=============================================================================
+//
+// maximus_syscalls.c
+//
+// Maximus target access to more complex system calls
+//
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jpSave
+// Contributors:SPiDCOM
+// Date: 2007-06-08
+// Purpose: Access to more complex system calls which require marshalling.
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_io.h>
+
+void * cyg_hal_sys_shmat(int shmid, const void* shmaddr, int shmflg)
+{
+ void * result;
+ void * raddr;
+
+ result = (void *) cyg_hal_sys_ipc(CYG_HAL_SYS_IPCOP_shmat,
+ shmid,
+ shmflg,
+ (int) (&raddr),
+ (void*)shmaddr);
+ return raddr;
+}
+
+int cyg_hal_sys_shmget(int key, int size, int shmflg)
+{
+ return cyg_hal_sys_ipc(CYG_HAL_SYS_IPCOP_shmget, key, size, shmflg, NULL);
+}
+
+int cyg_hal_sys_shmdt(const void* shmaddr)
+{
+ return cyg_hal_sys_ipc(CYG_HAL_SYS_IPCOP_shmdt, 0, 0, 0,
+ ((void *) shmaddr));
+}
+
+int
+cyg_hal_sys_mmap(void *addr, unsigned long length, unsigned long prot,
+ unsigned long flags, unsigned long fd, unsigned long off)
+{
+
+ struct cyg_hal_sys_mmap_args args;
+
+ args.addr = (unsigned long) addr;
+ args.len = length;
+ args.prot = prot = prot;
+ args.flags = flags;
+ args.fd = fd;
+ args.offset = off;
+
+ return (cyg_hal_sys_mmapx(&args));
+}
+
+
+void (*maximus_atexit_handler)(void) = (void (*)(void)) 0;
+
+int
+cyg_hal_sys_atexit_handler(void (*fct_atexit)(void))
+{
+ if(maximus_atexit_handler == NULL) {
+ maximus_atexit_handler = fct_atexit;
+ return 0;
+ }
+ else {
+ diag_write_string("ERROR an atexit handler already exist\n");
+ return -1;
+ }
+}
+
diff --git a/cesar/ecos/packages/hal/maximus/i386linux/current/cdl/hal_maximus_i386.cdl b/cesar/ecos/packages/hal/maximus/i386linux/current/cdl/hal_maximus_i386.cdl
new file mode 100644
index 0000000000..b561984960
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/i386linux/current/cdl/hal_maximus_i386.cdl
@@ -0,0 +1,133 @@
+# ====================================================================
+#
+# hal_maximus_i386.cdl
+#
+# i386-specific Maximus target configuration data
+#
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jpSave
+# Original data: jpSave
+# Contributors: SPiDCOM
+# Date: 2007-04-19
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_HAL_MAXIMUS_I386 {
+ parent CYGPKG_HAL_MAXIMUS
+ display "Linux/i386 maximus target"
+ description "
+ The Linux/i386 Maximus Target HAL package provides the
+ support needed to run eCos binaries on top of the i386
+ Linux kernel and to communicate with maximus simulator."
+
+ include_dir cyg/hal
+ requires !CYGSEM_ERROR_PER_THREAD_ERRNO
+ define_header hal_maximus_i386.h
+ define_proc {
+ puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_maximus_i386.h>"
+ }
+ # On the maximus target the default main stack size is smaller than
+ # the recommended minimum from var_arch.h
+ requires { !CYGPKG_LIBC_STARTUP || CYGINT_LIBC_STARTUP_MAIN_NO_STACK_SIZE || (CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE >= (16 * 1024)) }
+
+ implements CYGINT_PROFILE_HAL_TIMER
+ implements CYGINT_PROFILE_HAL_MCOUNT
+
+ make {
+ <PREFIX>/lib/vectors.o : <PACKAGE>/src/vectors.S
+ $(CC) -Wp,-MD,vectors.tmp $(INCLUDE_PATH) $(CFLAGS) -c -o $@ $<
+ @echo $@ ": \\" > $(notdir $@).deps
+ @tail -n +2 vectors.tmp >> $(notdir $@).deps
+ @echo >> $(notdir $@).deps
+ @rm vectors.tmp
+ }
+ compile context.S syscall-i386-linux-1.0.S
+
+ cdl_component CYG_HAL_STARTUP {
+ display "Startup type"
+ flavor data
+ legal_values {"ROM"}
+ default_value {"ROM"}
+ no_define
+ define -file system.h CYG_HAL_STARTUP
+ description "
+ At the moment only ROM startup is supported. In the context
+ of the maximus target this means a read-only region for
+ code and a read-write region for data."
+ }
+
+ cdl_component CYGBLD_GLOBAL_OPTIONS {
+ display "Global build options"
+ flavor none
+ parent CYGPKG_NONE
+ description "
+ Global build options including control over
+ compiler flags, linker flags and choice of toolchain."
+
+
+ cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
+ display "Global command prefix"
+ flavor data
+ no_define
+ if { ($tcl_platform(os) == "Linux") && [string match "i*86" $tcl_platform(machine)] } {
+ default_value { "" }
+ } else {
+ default_value { "i686-pc-linux-gnu" }
+ }
+ description "
+ This option specifies the command prefix used when
+ invoking the build tools. You must be using gcc-2.95.2 or
+ later, and \"ld -v\" must report a version more recent than
+ 2.9.1."
+ }
+
+ cdl_option CYGBLD_GLOBAL_CFLAGS {
+ display "Global compiler flags"
+ flavor data
+ no_define
+ default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
+ description "
+ This option controls the global compiler flags which
+ are used to compile all packages by
+ default. Individual packages may define
+ options which override these global flags."
+ }
+
+ cdl_option CYGBLD_GLOBAL_LDFLAGS {
+ display "Global linker flags"
+ flavor data
+ no_define
+ default_value { "-g -nostdlib -Wl,--gc-sections -Wl,-static" }
+ description "
+ This option controls the global linker flags. Individual
+ packages may define options which override these global flags."
+ }
+ }
+
+ cdl_component CYGHWR_MEMORY_LAYOUT {
+ display "Memory layout"
+ flavor data
+ no_define
+ calculated { "mlt_maximus_i386_rom" }
+
+ cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
+ display "Memory layout linker script fragment"
+ flavor data
+ no_define
+ define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
+ calculated { "<pkgconf/mlt_maximus_i386_rom.ldi>" }
+ }
+
+ cdl_option CYGHWR_MEMORY_LAYOUT_H {
+ display "Memory layout header file"
+ flavor data
+ no_define
+ define -file system.h CYGHWR_MEMORY_LAYOUT_H
+ calculated { "<pkgconf/mlt_maximus_i386_rom.h>" }
+ }
+ }
+}
diff --git a/cesar/ecos/packages/hal/maximus/i386linux/current/include/arch.inc b/cesar/ecos/packages/hal/maximus/i386linux/current/include/arch.inc
new file mode 100644
index 0000000000..93fdc9a9ad
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/i386linux/current/include/arch.inc
@@ -0,0 +1,44 @@
+##=============================================================================
+##
+## arch.inc
+##
+## i386 assembler header file for the maximus target
+##
+##=============================================================================
+#######DESCRIPTIONBEGIN####
+##
+## Author(s): jpSave
+## Contributors:SPiDCOM
+## Date: 2007-06-04
+## Purpose: i386 definitions.
+## Description: This file contains various definitions and macros that are
+## useful for writing assembly code for the i386
+## Usage:
+## #include <cyg/hal/arch.inc>
+## ...
+##
+##
+######DESCRIPTIONEND####
+##
+##=============================================================================
+
+#------------------------------------------------------------------------------
+# Exception, interrupt and thread context save area layout
+# The layout of this structure is also defined in "hal_arch.h", for C
+# code. Do not change this without changing that (or vice versa).
+
+ # See SYSV ABI4, i386 supplement (page 37-38)
+ # http://www.sco.com/products/layered/develop/devspecs/abi386-4.pdf
+
+ # Callee save registers (eax, ecx, and edx are scratch registers)
+ .equ i386reg_esp, 0
+ .equ i386reg_next_context, 4 # only used when dropping through...
+ .equ i386reg_ebp, 8 # ...from switch_ to load_context.
+ .equ i386reg_ebx, 12
+ .equ i386reg_esi, 16
+ .equ i386reg_edi, 20
+ .equ i386reg_interrupts, 24
+ .equ i386reg_context_size, 28
+
+#------------------------------------------------------------------------------
+# end of arch.inc
diff --git a/cesar/ecos/packages/hal/maximus/i386linux/current/include/basetype.h b/cesar/ecos/packages/hal/maximus/i386linux/current/include/basetype.h
new file mode 100644
index 0000000000..ca40a33fa2
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/i386linux/current/include/basetype.h
@@ -0,0 +1,49 @@
+#ifndef CYGONCE_HAL_BASETYPE_H
+#define CYGONCE_HAL_BASETYPE_H
+
+//=============================================================================
+//
+// basetype.h
+//
+// Standard types for x86 maximus target.
+//
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jpSave
+// Contributors:SPiDCOm
+// Date: 2007-06-04
+// Purpose: Define architecture base types.
+// Usage: Included by "cyg_type.h", do not use directly
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+//-----------------------------------------------------------------------------
+// Characterize the architecture
+
+#define CYG_BYTEORDER CYG_LSBFIRST // Little endian
+
+//-----------------------------------------------------------------------------
+// I386 does not usually use labels with underscores.
+
+//#define CYG_LABEL_NAME(_name_) _name_
+
+//-----------------------------------------------------------------------------
+// Override the alignment definitions from cyg_type.h. x86 requires
+// 32 *byte* alignment because gcc sometimes tries to be clever with
+// aligning things on cache lines.
+
+#define CYGARC_ALIGNMENT 32
+#define CYGARC_P2ALIGNMENT 5
+
+//-----------------------------------------------------------------------------
+// Define the standard variable sizes
+
+// The ix86 architecture uses the default definitions of the base types,
+// so we do not need to define any here.
+
+//-----------------------------------------------------------------------------
+#endif // CYGONCE_HAL_BASETYPE_H
+// End of basetype.h
diff --git a/cesar/ecos/packages/hal/maximus/i386linux/current/include/pkgconf/mlt_maximus_i386_rom.h b/cesar/ecos/packages/hal/maximus/i386linux/current/include/pkgconf/mlt_maximus_i386_rom.h
new file mode 100644
index 0000000000..1fe0c751c4
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/i386linux/current/include/pkgconf/mlt_maximus_i386_rom.h
@@ -0,0 +1,20 @@
+// eCos memory layout - Fri Oct 20 08:40:39 2000
+
+// This is a generated file - do not edit
+
+#ifndef __ASSEMBLER__
+#include <cyg/infra/cyg_type.h>
+#include <stddef.h>
+
+#endif
+#define CYGMEM_REGION_rom (0x1000000)
+#define CYGMEM_REGION_rom_SIZE (0x800000)
+#define CYGMEM_REGION_rom_ATTR (CYGMEM_REGION_ATTR_R)
+#define CYGMEM_REGION_ram (0x2000000)
+#define CYGMEM_REGION_ram_SIZE (0x800000)
+#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
+#ifndef __ASSEMBLER__
+extern char CYG_LABEL_NAME (__heap1) [];
+#endif
+#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
+#define CYGMEM_SECTION_heap1_SIZE (0x2800000 - (size_t) CYG_LABEL_NAME (__heap1))
diff --git a/cesar/ecos/packages/hal/maximus/i386linux/current/include/pkgconf/mlt_maximus_i386_rom.ldi b/cesar/ecos/packages/hal/maximus/i386linux/current/include/pkgconf/mlt_maximus_i386_rom.ldi
new file mode 100644
index 0000000000..57ce1f999f
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/i386linux/current/include/pkgconf/mlt_maximus_i386_rom.ldi
@@ -0,0 +1,31 @@
+// eCos memory layout - Fri Oct 20 08:40:39 2000
+
+// This is a generated file - do not edit
+
+#include <cyg/infra/cyg_type.inc>
+
+MEMORY
+{
+ rom : ORIGIN = 0x1000000, LENGTH = 0x800000
+ ram : ORIGIN = 0x2000000, LENGTH = 0x800000
+}
+
+SECTIONS
+{
+ SECTIONS_BEGIN
+ SECTION_vectors (rom, 0x1000000, LMA_EQ_VMA)
+ SECTION_text (rom, ALIGN (0x4), LMA_EQ_VMA)
+ SECTION_fini (rom, ALIGN (0x4), LMA_EQ_VMA)
+ SECTION_rodata1 (rom, ALIGN (0x8), LMA_EQ_VMA)
+ SECTION_rodata (rom, ALIGN (0x8), LMA_EQ_VMA)
+ SECTION_fixup (rom, ALIGN (0x4), LMA_EQ_VMA)
+ SECTION_RELOCS (rom, ALIGN (0x4), LMA_EQ_VMA)
+ SECTION_eh_frame (rom, ALIGN (0x4), LMA_EQ_VMA)
+ SECTION_rel__got (rom, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_gcc_except_table (rom, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_data (ram, 0x2000000, LMA_EQ_VMA)
+ SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA)
+ SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA)
+ CYG_LABEL_DEFN(__heap1) = ALIGN (0x10);
+ SECTIONS_END
+}
diff --git a/cesar/ecos/packages/hal/maximus/i386linux/current/include/var_arch.h b/cesar/ecos/packages/hal/maximus/i386linux/current/include/var_arch.h
new file mode 100644
index 0000000000..a1ed03c4b2
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/i386linux/current/include/var_arch.h
@@ -0,0 +1,179 @@
+#ifndef CYGONCE_HAL_VAR_ARCH_H
+#define CYGONCE_HAL_VAR_ARCH_H
+
+//=============================================================================
+//
+// var_arch.h
+//
+// Per-processor information such as processor save states.
+//
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jpSave
+// Contributors:SPiDCOM
+// Date: 2007-06-04
+// Purpose: Define architecture abstractions
+// Usage: #include <cyg/hal/hal_arch.h>
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+
+#include <cyg/infra/cyg_type.h>
+
+//-----------------------------------------------------------------------------
+// Processor saved states. This structure is also defined in arch.inc for
+// assembly code. Do not change this without changing that (or vice versa).
+// Note: there is no need to worry about floating point contexts, see context.S
+
+typedef struct
+{
+ cyg_uint32 esp;
+ cyg_uint32 next_context; // only used when dropping through...
+ cyg_uint32 ebp; // ...from switch_ to load_context
+ cyg_uint32 ebx;
+ cyg_uint32 esi;
+ cyg_uint32 edi;
+ cyg_bool interrupts; // Are interrupts enabled for this thread?
+} HAL_SavedRegisters;
+
+
+//-----------------------------------------------------------------------------
+// Bit manipulation routines. These are provided by the processor variant
+// HAL to allow for processor-specific implementations.
+
+#define HAL_LSBIT_INDEX(index, mask) \
+CYG_MACRO_START \
+ asm volatile( "bsfl %1,%0\n" \
+ : "=r" (index) \
+ : "r" (mask) \
+ ); \
+CYG_MACRO_END
+
+#define HAL_MSBIT_INDEX(index, mask) \
+CYG_MACRO_START \
+ asm volatile( "bsrl %1,%0\n" \
+ : "=r" (index) \
+ : "r" (mask) \
+ ); \
+CYG_MACRO_END
+
+//-----------------------------------------------------------------------------
+// Context Initialization
+// Initialize the context of a thread.
+// Arguments:
+// _sp_ name of variable containing current sp, will be written with new sp
+// _thread_ thread object address, passed as argument to entry point
+// _entry_ entry point address.
+// _id_ bit pattern used in initializing registers, for debugging.
+
+#define HAL_THREAD_INIT_CONTEXT( _sparg_, _thread_, _entry_, _id_ ) \
+ CYG_MACRO_START \
+ register CYG_WORD* _sp_ = ((CYG_WORD*)((_sparg_) &~15)); \
+ register HAL_SavedRegisters *_regs_; \
+ \
+ /* The 'ret' executed at the end of hal_thread_load_context will */ \
+ /* use the last entry on the stack as a return pointer (_entry_). */ \
+ /* Cyg_HardwareThread::thread_entry expects one argument at stack */ \
+ /* offset 4 (_thread_). The (0xDEADBEEF) entry is the return addr */ \
+ /* for thread_entry (which is never used). */ \
+ *(--_sp_) = (CYG_WORD)(0); \
+ *(--_sp_) = (CYG_WORD)(0); \
+ *(--_sp_) = (CYG_WORD)(0); \
+ *(--_sp_) = (CYG_WORD)(0); \
+ *(--_sp_) = (CYG_WORD)(_thread_); \
+ *(--_sp_) = (CYG_WORD)(0); \
+ *(--_sp_) = (CYG_WORD)(_entry_); \
+ \
+ _regs_ = (HAL_SavedRegisters *) \
+ ((unsigned long)_sp_ - sizeof(HAL_SavedRegisters)); \
+ _regs_->esp = (CYG_WORD) _sp_; \
+ _regs_->ebx = (CYG_WORD)(_id_); \
+ _regs_->ebp = (CYG_WORD)(_id_); \
+ _regs_->esi = (CYG_WORD)(_id_); \
+ _regs_->edi = (CYG_WORD)(_id_); \
+ _regs_->interrupts = true; \
+ (_sparg_) = (CYG_ADDRESS) _regs_; \
+ CYG_MACRO_END
+
+//-----------------------------------------------------------------------------
+// Context switch macros.
+// The arguments are pointers to locations where the stack pointer
+// of the current thread is to be stored, and from where the sp of the
+// next thread is to be fetched.
+
+externC void hal_thread_switch_context( CYG_ADDRESS _to_, CYG_ADDRESS _from_ );
+externC void hal_thread_load_context( CYG_ADDRESS _to_ )
+ __attribute__ ((noreturn));
+
+#define HAL_THREAD_SWITCH_CONTEXT(_fspptr_,_tspptr_) \
+ hal_thread_switch_context((CYG_ADDRESS)_tspptr_,(CYG_ADDRESS)_fspptr_);
+
+#define HAL_THREAD_LOAD_CONTEXT(_tspptr_) \
+ hal_thread_load_context( (CYG_ADDRESS)_tspptr_ );
+
+//-----------------------------------------------------------------------------
+// HAL setjmp
+
+#define CYGARC_JMP_BUF_SP 0
+#define CYGARC_JMP_BUF_EBP 1
+#define CYGARC_JMP_BUF_EBX 2
+#define CYGARC_JMP_BUF_ESI 3
+#define CYGARC_JMP_BUF_EDI 4
+#define CYGARC_JMP_BUF_PC 5
+
+#define CYGARC_JMP_BUF_SIZE 6
+
+typedef cyg_uint32 hal_jmp_buf[CYGARC_JMP_BUF_SIZE];
+
+externC int hal_setjmp(hal_jmp_buf env);
+externC void hal_longjmp(hal_jmp_buf env, int val);
+
+//-----------------------------------------------------------------------------
+// Minimal and sensible stack sizes: the intention is that applications
+// will use these to provide a stack size in the first instance prior to
+// proper analysis. Idle thread stack should be this big.
+
+// THESE ARE NOT INTENDED TO BE MICROMETRICALLY ACCURATE FIGURES.
+// THEY ARE HOWEVER ENOUGH TO START PROGRAMMING.
+// YOU MUST MAKE YOUR STACKS LARGER IF YOU HAVE LARGE "AUTO" VARIABLES!
+
+// This is not a config option because it should not be adjusted except
+// under "enough rope" sort of disclaimers.
+
+// Stack frame overhead per call. 3 local registers (edi, esi, ebx) and
+// return address.
+#define CYGNUM_HAL_STACK_FRAME_SIZE (4 * 4)
+
+// Stack needed for a context switch (i386reg_context_size from i386.inc)
+#define CYGNUM_HAL_STACK_CONTEXT_SIZE (4 * 24)
+
+// Interrupt stack size. Interrupts are handled by signals so the relevant
+// data is MINSIGSTKSIZE (see man sigaltstack) or 2048. Given the
+// multiplier *15 for STACK_SIZE_MINIMUM, this should be adequate.
+#define CYGNUM_HAL_STACK_INTERRUPT_SIZE 2048
+
+// We define a minimum stack size as the minimum any thread could ever
+// legitimately get away with. We can throw asserts if users ask for less
+// than this. Allow enough for three interrupt sources - clock, serial and
+// one other
+//
+// On the maximus target memory is cheap so comparatively large stacks
+// are possible. This avoids stack overflow problems when working with
+// the maximus target, although arguably the problem is now deferred to
+// when the application is moved to real hardware where it will be more
+// difficult to track down.
+#define CYGNUM_HAL_STACK_SIZE_MINIMUM (16 * 1024)
+#define CYGNUM_HAL_STACK_SIZE_TYPICAL (32 * 1024)
+
+//--------------------------------------------------------------------------
+// Macros for switching context between two eCos instances (jump from
+// code in ROM to code in RAM or vice versa).
+#define CYGARC_HAL_SAVE_GP()
+#define CYGARC_HAL_RESTORE_GP()
+
+//--------------------------------------------------------------------------
+#endif // CYGONCE_HAL_VAR_ARCH_H
+// End of var_arch.h
diff --git a/cesar/ecos/packages/hal/maximus/i386linux/current/src/context.S b/cesar/ecos/packages/hal/maximus/i386linux/current/src/context.S
new file mode 100644
index 0000000000..20bcae11a7
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/i386linux/current/src/context.S
@@ -0,0 +1,191 @@
+##=============================================================================
+##
+## context.S
+##
+## x86 thread context manipulation.
+##
+##=============================================================================
+#######DESCRIPTIONBEGIN####
+##
+## Author(s): jpSave
+## Contributors:SPiDCOM
+## Date: 2007-06-03
+## Purpose: CPU-specific code
+## Description: This file contains the code needed to manage the
+## CPU on an i386/Linux Maximus target.
+##
+######DESCRIPTIONEND####
+##
+##=============================================================================
+
+#include <cyg/hal/arch.inc>
+
+#------------------------------------------------------------------------------
+# function declaration macro
+
+#define FUNC_START(name) \
+ .globl name; \
+name:
+
+#------------------------------------------------------------------------------
+# Context switch and setjmp/longjmp support.
+# Based on PowerPC context.S, using data from SYSV ABI4, i386
+# supplement (page 37-38)
+# http://www.sco.com/products/layered/develop/devspecs/abi386-4.pdf
+#
+# There is no need to worry about saving floating point context. If
+# a switch occurs because of an interrupt/signal, the system will have
+# saved the fpu state already before the signal handler was invoked,
+# and the state will be returned when the signal handler returns i.e.
+# when the interrupted thread is reactivated. If a context switch is
+# voluntary, for example a call to cyg_thread_yield(), then according
+# to the calling conventions all fpu registers are CALL_USED_REGISTERS
+# (gcc/config/i386/i386.h) and will have been saved by the calling
+# code.
+#
+# FIXME: it may be appropriate to match eCos thread contexts
+# more closely onto Linux sigcontexts - that might facilitate
+# thread-aware debugging.
+
+# hal_thread_switch_context
+# Switch thread contexts
+# : 0(%esp) : return address
+# : 4(%esp) : address of sp of next thread to execute
+# : 8(%esp) : address of sp save location of current thread
+#
+# %eax, %ecx, and %edx are ours to abuse.
+
+ .extern hal_interrupts_enabled
+ .extern hal_enable_interrupts
+
+FUNC_START(hal_thread_switch_context)
+ movl 4(%esp),%eax # next context ptr
+ movl 8(%esp),%edx # this context ptr
+
+ # Make room on the stack for the context
+ movl %esp,%ecx # keep original SP
+ sub $i386reg_context_size,%esp
+
+ # Save next context ptr in this context. Necessary because
+ # hal_thread_load_context expects to find the ptr on the stack,
+ # not in a register as on PPC.
+ movl %eax,i386reg_next_context(%esp)
+
+ # Save registers
+ movl %ecx,i386reg_esp(%esp) # original esp
+ movl %ebp,i386reg_ebp(%esp)
+ movl %ebx,i386reg_ebx(%esp)
+ movl %esi,i386reg_esi(%esp)
+ movl %edi,i386reg_edi(%esp)
+
+ # And interrupt state
+ movl hal_interrupts_enabled,%eax
+ movl %eax,i386reg_interrupts(%esp)
+
+ # Store the context ptr
+ movl %esp,(%edx)
+
+ # Now fall through to hal_thread_load_context
+
+
+#------------------------------------------------------------------------------
+# hal_thread_load_context
+# Load thread context
+# : 4(%esp) = i386reg_next_context(%esp) = address of sp of thread to execute
+# Note that this function is also the second half of hal_thread_switch_context
+# and is simply dropped into from it.
+#
+# %eax, %ecx, and %edx are ours to abuse.
+
+FUNC_START(hal_thread_load_context)
+
+ movl i386reg_next_context(%esp),%eax # get new context ptr
+ movl (%eax),%eax
+
+ # Restore registers
+ movl i386reg_ebp(%eax),%ebp
+ movl i386reg_ebx(%eax),%ebx
+ movl i386reg_esi(%eax),%esi
+ movl i386reg_edi(%eax),%edi
+ movl i386reg_esp(%eax),%esp
+
+ # And see what needs to happen about interrupts
+ movl i386reg_interrupts(%eax),%eax
+ cmpl hal_interrupts_enabled,%eax
+ je interrupts_ok
+
+ # The saved interrupt state differs from the current one.
+ # If interrupts are supposed to be enabled then invoke
+ # hal_enable_interrupts. That can be done as a tail call.
+ # If interrupts are supposed to be disabled then just
+ # update the global variable.
+ cmpl $0,%eax
+ jne hal_enable_interrupts
+ movl %eax,hal_interrupts_enabled
+
+interrupts_ok:
+ ret
+
+
+#------------------------------------------------------------------------------
+# HAL longjmp, setjmp implementations
+# hal_setjmp saves only to callee save registers ebp, ebx, esi, edi and
+# and esp+pc into buffer supplied in 4(esp)
+# Note: These definitions are repeated in hal_arch.h. If changes are required
+# remember to update both sets.
+
+#define CYGARC_JMP_BUF_SP 0
+#define CYGARC_JMP_BUF_EBP 1
+#define CYGARC_JMP_BUF_EBX 2
+#define CYGARC_JMP_BUF_ESI 3
+#define CYGARC_JMP_BUF_EDI 4
+#define CYGARC_JMP_BUF_PC 5
+
+#define CYGARC_JMP_BUF_SIZE 6
+
+FUNC_START(hal_setjmp)
+ # Get jmpbuf pointer
+ movl 4(%esp),%eax
+
+ # Save regular registers
+ movl %ebp,CYGARC_JMP_BUF_EBP*4(%eax)
+ movl %ebx,CYGARC_JMP_BUF_EBX*4(%eax)
+ movl %esi,CYGARC_JMP_BUF_ESI*4(%eax)
+ movl %edi,CYGARC_JMP_BUF_EDI*4(%eax)
+
+ # Stack and PC
+ movl %esp,CYGARC_JMP_BUF_SP*4(%eax)
+ movl 0(%esp),%edx
+ movl %edx,CYGARC_JMP_BUF_PC*4(%eax)
+
+ # Return 0
+ xor %eax,%eax
+ ret
+
+
+# hal_longjmp loads state from 4(esp) and returns to PC stored in state
+
+FUNC_START(hal_longjmp)
+ # Get return value
+ movl 8(%esp),%eax
+
+ # Get jmpbuf pointer
+ movl 4(%esp),%ecx
+
+ # Restore regular registers
+ movl CYGARC_JMP_BUF_EBP*4(%ecx),%ebp
+ movl CYGARC_JMP_BUF_EBX*4(%ecx),%ebx
+ movl CYGARC_JMP_BUF_ESI*4(%ecx),%esi
+ movl CYGARC_JMP_BUF_EDI*4(%ecx),%edi
+
+ # Restore stack pointer
+ movl CYGARC_JMP_BUF_SP*4(%ecx),%esp
+
+ # Put return address on stack
+ movl CYGARC_JMP_BUF_PC*4(%ecx),%edx
+ movl %edx,0(%esp)
+
+ ret
+
+#------------------------------------------------------------------------------
+# end of linux.S
diff --git a/cesar/ecos/packages/hal/maximus/i386linux/current/src/syscall-i386-linux-1.0.S b/cesar/ecos/packages/hal/maximus/i386linux/current/src/syscall-i386-linux-1.0.S
new file mode 100644
index 0000000000..d87b01ea52
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/i386linux/current/src/syscall-i386-linux-1.0.S
@@ -0,0 +1,437 @@
+//=============================================================================
+//
+// syscall-i386-linux-1.0.S
+//
+// Linux system call interface functions for i386.
+//
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jpSave
+// Contributors:SPiDCOM
+// Date: 2007-06-08
+// Description: Machine dependent syscalls for i386/i486/i586
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+// The numbers come from <asm/unistd.h>
+#define SYS_setup 0 // Used only by init, to get system going.
+#define SYS_exit 1
+#define SYS_fork 2
+#define SYS_read 3
+#define SYS_write 4
+#define SYS_open 5
+#define SYS_close 6
+#define SYS_waitpid 7
+#define SYS_creat 8
+#define SYS_link 9
+#define SYS_unlink 10
+#define SYS_execve 11
+#define SYS_chdir 12
+#define SYS_time 13
+#define SYS_mknod 14
+#define SYS_chmod 15
+#define SYS_lchown 16
+#define SYS_break 17
+#define SYS_oldstat 18
+#define SYS_lseek 19
+#define SYS_getpid 20
+#define SYS_mount 21
+#define SYS_umount 22
+#define SYS_setuid 23
+#define SYS_getuid 24
+#define SYS_stime 25
+#define SYS_ptrace 26
+#define SYS_alarm 27
+#define SYS_oldfstat 28
+#define SYS_pause 29
+#define SYS_utime 30
+#define SYS_stty 31
+#define SYS_gtty 32
+#define SYS_access 33
+#define SYS_nice 34
+#define SYS_ftime 35
+#define SYS_sync 36
+#define SYS_kill 37
+#define SYS_rename 38
+#define SYS_mkdir 39
+#define SYS_rmdir 40
+#define SYS_dup 41
+#define SYS_pipe 42
+#define SYS_times 43
+#define SYS_prof 44
+#define SYS_brk 45
+#define SYS_setgid 46
+#define SYS_getgid 47
+#define SYS_signal 48
+#define SYS_geteuid 49
+#define SYS_getegid 50
+#define SYS_acct 51
+#define SYS_phys 52
+#define SYS_lock 53
+#define SYS_ioctl 54
+#define SYS_fcntl 55
+#define SYS_mpx 56
+#define SYS_setpgid 57
+#define SYS_ulimit 58
+#define SYS_oldolduname 59
+#define SYS_umask 60
+#define SYS_chroot 61
+#define SYS_prev_ustat 62
+#define SYS_dup2 63
+#define SYS_getppid 64
+#define SYS_getpgrp 65
+#define SYS_setsid 66
+#define SYS_sigaction 67
+#define SYS_siggetmask 68
+#define SYS_sigsetmask 69
+#define SYS_setreuid 70
+#define SYS_setregid 71
+#define SYS_sigsuspend 72
+#define SYS_sigpending 73
+#define SYS_sethostname 74
+#define SYS_setrlimit 75
+#define SYS_getrlimit 76
+#define SYS_getrusage 77
+#define SYS_gettimeofday 78
+#define SYS_settimeofday 79
+#define SYS_getgroups 80
+#define SYS_setgroups 81
+#define SYS_select 142 //select is unused prefer _newselect
+#define SYS_symlink 83
+#define SYS_oldlstat 84
+#define SYS_readlink 85
+#define SYS_uselib 86
+#define SYS_swapon 87
+#define SYS_reboot 88
+#define SYS_readdir 89
+#define SYS_mmapx 90
+#define SYS_munmap 91
+#define SYS_truncate 92
+#define SYS_ftruncate 93
+#define SYS_fchmod 94
+#define SYS_fchown 95
+#define SYS_getpriority 96
+#define SYS_setpriority 97
+#define SYS_profil 98
+#define SYS_statfs 99
+#define SYS_fstatfs 100
+#define SYS_ioperm 101
+#define SYS_socketcall 102
+#define SYS_klog 103
+#define SYS_setitimer 104
+#define SYS_getitimer 105
+#define SYS_prev_stat 106
+#define SYS_prev_lstat 107
+#define SYS_prev_fstat 108
+#define SYS_olduname 109
+#define SYS_iopl 110
+#define SYS_vhangup 111
+#define SYS_idle 112
+#define SYS_vm86old 113
+#define SYS_wait4 114
+#define SYS_swapoff 115
+#define SYS_sysinfo 116
+#define SYS_ipc 117
+#define SYS_fsync 118
+#define SYS_sigreturn 119
+#define SYS_clone 120
+#define SYS_setdomainname 121
+#define SYS_uname 122
+#define SYS_modify_ldt 123
+#define SYS_adjtimex 124
+#define SYS_mprotect 125
+#define SYS_sigprocmask 126
+#define SYS_create_module 127
+#define SYS_init_module 128
+#define SYS_delete_module 129
+#define SYS_get_kernel_syms 130
+#define SYS_quotactl 131
+#define SYS_getpgid 132
+#define SYS_fchdir 133
+#define SYS_bdflush 134
+#define SYS_sysfs 135
+#define SYS_personality 136
+#define SYS_afs_syscall 137 // Syscall for Andrew File System
+#define SYS_setfsuid 138
+#define SYS_setfsgid 139
+#define SYS__llseek 140
+#define SYS_getdents 141
+#define SYS__newselect 142
+#define SYS_flock 143
+#define SYS_syscall_flock 143
+#define SYS_msync 144
+#define SYS_readv 145
+#define SYS_syscall_readv 145
+#define SYS_writev 146
+#define SYS_syscall_writev 146
+#define SYS_getsid 147
+#define SYS_fdatasync 148
+#define SYS__sysctl 149
+#define SYS_mlock 150
+#define SYS_munlock 151
+#define SYS_mlockall 152
+#define SYS_munlockall 153
+#define SYS_sched_setparam 154
+#define SYS_sched_getparam 155
+#define SYS_sched_setscheduler 156
+#define SYS_sched_getscheduler 157
+#define SYS_sched_yield 158
+#define SYS_sched_get_priority_max 159
+#define SYS_sched_get_priority_min 160
+#define SYS_sched_rr_get_interval 161
+#define SYS_nanosleep 162
+#define SYS_mremap 163
+#define SYS_setresuid 164
+#define SYS_getresuid 165
+#define SYS_vm86 166
+#define SYS_query_module 167
+#define SYS_poll 168
+#define SYS_nfsservctl 169
+#define SYS_setresgid 170
+#define SYS_getresgid 171
+#define SYS_prctl 172
+#define SYS_rt_sigreturn 173
+#define SYS_rt_sigaction 174
+#define SYS_rt_sigprocmask 175
+#define SYS_rt_sigpending 176
+#define SYS_rt_sigtimedwait 177
+#define SYS_rt_sigqueueinfo 178
+#define SYS_rt_sigsuspend 179
+#define SYS_pread 180
+#define SYS_pwrite 181
+#define SYS_chown 182
+#define SYS_getcwd 183
+#define SYS_capget 184
+#define SYS_capset 185
+#define SYS_sigaltstack 186
+#define SYS_sendfile 187
+#define SYS_getpmsg 188
+#define SYS_putpmsg 189
+#define SYS_vfork 190
+#define SYS_ugetrlimit 191
+#define SYS_mmap2 192
+#define SYS_truncate64 193
+#define SYS_ftruncate64 194
+#define SYS_stat64 195
+#define SYS_lstat64 196
+#define SYS_fstat64 197
+#define SYS_lchown32 198
+#define SYS_getuid32 199
+#define SYS_getgid32 200
+#define SYS_geteuid32 201
+#define SYS_getegid32 202
+#define SYS_setreuid32 203
+#define SYS_setregid32 204
+#define SYS_getgroups32 205
+#define SYS_setgroups32 206
+#define SYS_fchown32 207
+#define SYS_setresuid32 208
+#define SYS_getresuid32 209
+#define SYS_setresgid32 210
+#define SYS_getresgid32 211
+#define SYS_chown32 212
+#define SYS_setuid32 213
+#define SYS_setgid32 214
+#define SYS_setfsuid32 215
+#define SYS_setfsgid32 216
+#define SYS_pivot_root 217
+#define SYS_mincore 218
+#define SYS_madvise 219
+#define SYS_madvise1 219
+#define SYS_getdents64 220
+#define SYS_fcntl64 221
+
+
+#define NAME(X) cyg_hal_sys_##X
+#define END(X) 1: ; .type NAME(X),@function ; .size NAME(X),1b - NAME(X)
+
+#define SYSCALL0(x) \
+ .globl NAME(x) ; \
+ \
+NAME(x): \
+ \
+ push %ebx; \
+ lea SYS_##x, %eax; \
+ int $0x80; \
+ pop %ebx; \
+ ret; \
+ \
+ END(x)
+
+#define SYSCALL1(x) \
+ .globl NAME(x) ; \
+ \
+NAME(x): \
+ \
+ push %ebx; \
+ mov 8(%esp), %ebx; \
+ lea SYS_##x, %eax; \
+ int $0x80; \
+ pop %ebx; \
+ ret; \
+ \
+ END(x)
+
+#define SYSCALL2(x) \
+ .globl NAME(x) ; \
+ \
+NAME(x): \
+ \
+ push %ebx; \
+ mov 8(%esp), %ebx; \
+ mov 12(%esp), %ecx; \
+ lea SYS_##x, %eax; \
+ int $0x80; \
+ pop %ebx; \
+ ret; \
+ \
+ END(x)
+
+#define STATCALL2(x) \
+ .globl NAME(x) ; \
+ \
+NAME(x): \
+ \
+ push %ebx; \
+ mov 8(%esp), %ebx; \
+ mov 12(%esp), %ecx; \
+ lea SYS_prev_##x, %eax; \
+ int $0x80; \
+ pop %ebx; \
+ ret; \
+ END(x)
+
+#define SYSCALL3(x) \
+ .globl NAME(x) ; \
+ \
+NAME(x): \
+ \
+ push %ebx; \
+ mov 8(%esp), %ebx; \
+ mov 12(%esp), %ecx; \
+ mov 16(%esp), %edx; \
+ lea SYS_##x, %eax; \
+ int $0x80; \
+ pop %ebx; \
+ ret; \
+ END(x)
+
+
+#define SYSCALL4(x) \
+ .globl NAME(x) ; \
+ \
+NAME(x): \
+ \
+ push %ebx; \
+ push %esi; \
+ mov 12(%esp), %ebx; \
+ mov 16(%esp), %ecx; \
+ mov 20(%esp), %edx; \
+ mov 24(%esp), %esi; \
+ lea SYS_##x, %eax; \
+ int $0x80; \
+ pop %esi; \
+ pop %ebx; \
+ ret; \
+ END(x)
+
+#define SYSCALL5(x) \
+ .globl NAME(x) ; \
+ \
+NAME(x): \
+ \
+ push %ebx; \
+ push %esi; \
+ push %edi; \
+ mov 16(%esp), %ebx; \
+ mov 20(%esp), %ecx; \
+ mov 24(%esp), %edx; \
+ mov 28(%esp), %esi; \
+ mov 32(%esp), %edi; \
+ lea SYS_##x, %eax; \
+ int $0x80; \
+ pop %edi; \
+ pop %esi; \
+ pop %ebx; \
+ ret; \
+ END(x)
+
+
+//==========================================================================
+// Initial asm stuff for all functions.
+ .text
+ .align 2
+
+SYSCALL1(exit)
+SYSCALL0(fork)
+SYSCALL3(read)
+SYSCALL3(write)
+SYSCALL3(open)
+SYSCALL1(close)
+SYSCALL3(waitpid)
+SYSCALL2(creat)
+SYSCALL2(link)
+SYSCALL1(unlink)
+SYSCALL3(execve)
+SYSCALL1(chdir)
+SYSCALL1(time)
+SYSCALL2(chmod)
+SYSCALL3(lseek)
+SYSCALL0(getpid)
+SYSCALL0(getuid)
+SYSCALL1(nice)
+SYSCALL2(kill)
+SYSCALL1(dup)
+SYSCALL1(pipe)
+SYSCALL1(brk)
+SYSCALL3(ioctl)
+SYSCALL3(fcntl)
+SYSCALL1(chroot)
+SYSCALL2(dup2)
+SYSCALL3(sigaction)
+SYSCALL2(gettimeofday)
+SYSCALL1(mmapx)
+SYSCALL2(socketcall)
+SYSCALL3(setitimer)
+SYSCALL3(sigprocmask)
+SYSCALL5(_newselect)
+SYSCALL5(select)
+SYSCALL3(readv)
+SYSCALL3(writev)
+SYSCALL1(fdatasync)
+SYSCALL2(getcwd)
+SYSCALL2(access)
+SYSCALL3(readdir)
+STATCALL2(lstat)
+STATCALL2(fstat)
+SYSCALL2(mkdir)
+SYSCALL5(ipc)
+SYSCALL3(mknod) // 2007-06-06 JLe
+
+// ----------------------------------------------------------------------------
+// Special support for returning from a signal handler. In theory no special
+// action is needed, but with some versions of the kernel on some
+// architectures that is not good enough. Instead returning has to happen
+// via another system call.
+
+ .align 16
+ .global cyg_hal_sys_restore_rt
+cyg_hal_sys_restore_rt:
+ movl $SYS_rt_sigreturn, %eax
+ int $0x80
+1:
+ .type __restore_rt,@function
+ .size __restore_rt,1b - __restore_rt
+
+ .align 8
+ .global cyg_hal_sys_restore
+cyg_hal_sys_restore:
+ popl %eax
+ movl $SYS_sigreturn, %eax
+ int $0x80
+1:
+ .type __restore,@function
+ .size __restore,1b - __restore
diff --git a/cesar/ecos/packages/hal/maximus/i386linux/current/src/vectors.S b/cesar/ecos/packages/hal/maximus/i386linux/current/src/vectors.S
new file mode 100644
index 0000000000..db64be4dee
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/i386linux/current/src/vectors.S
@@ -0,0 +1,69 @@
+##=============================================================================
+##
+## vectors.S
+##
+## x86 exception vectors
+##
+##=============================================================================
+#######DESCRIPTIONBEGIN####
+##
+## Author(s): JPSave
+## Contributors:SPiDCOM
+## Date: 2007-04-20
+## Purpose: Maximus target startup
+## Description: When running on real hardware vectors.S contains
+## initialization code and usually the low-level interrupt and
+## exception support. On the maximus target the latter is
+## handled by C code. The main initialization that is needed is
+## to jump into the C startup.
+##
+######DESCRIPTIONEND####
+##
+##=============================================================================
+
+# According the SVR4/i386 ABI, most registers are undefined. However
+# there is some interesting information on the stack:
+# %esp argc
+# %esp+4 argv[0]
+# ... argv[1 onwards]
+# %esp + (argc*4) NULL
+# ... environ[0]
+# ... ...
+# ... NULL
+#
+# There are some other things that could be done, for example aligning
+# the stack to a 16-byte boundary for SSE, but it is not clear which of
+# those things are actually useful. The glibc source file
+# sysdeps/i386/elf/start.S contains some relevant information.
+
+#==============================================================================
+
+ .file "vectors.S"
+
+ .extern _linux_entry
+
+ .data
+ .global cyg_hal_sys_argc
+cyg_hal_sys_argc:
+ .long 0
+ .global cyg_hal_sys_argv
+cyg_hal_sys_argv:
+ .long 0
+ .global cyg_hal_sys_environ
+cyg_hal_sys_environ:
+ .long 0
+
+ .text
+ .globl _start
+_start:
+ popl %eax
+ movl %eax, cyg_hal_sys_argc
+ movl %esp, %ebx
+ movl %ebx, cyg_hal_sys_argv
+ inc %eax
+ addl %eax, %eax
+ addl %eax, %eax
+ addl %eax, %ebx
+ movl %ebx, cyg_hal_sys_environ
+
+ jmp _linux_entry
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/ChangeLog b/cesar/ecos/packages/hal/sparc/arch/current/ChangeLog
new file mode 100644
index 0000000000..a6e7cd9229
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/ChangeLog
@@ -0,0 +1,74 @@
+2004-04-22 Jani Monoses <jani@iv.ro>
+
+ * cdl/hal_sparc.cdl :
+ Invoke tail with stricter syntax that works in latest coreutils.
+
+2003-04-10 Nick Garnett <nickg@balti.calivar.com>
+
+ * src/sparc.ld:
+ Added libsupc++.a to GROUP() directive for GCC versions later than
+ 3.0.
+
+2002-10-19 Jonathan Larmour <jifl@eCosCentric.com>
+
+ Patch from Jiri Gaisler:
+ * src/context.S (hal_thread_load_context): Wait a little after writing
+ psr.
+ (hal_setjmp): Ditto.
+ * src/vectors.S (genuine_reset): Reorder window setup writes to
+ streamline.
+
+
+2002-04-29 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/vectors.S:
+ * src/vec_xvsr.S:
+ * src/vec_ivsr.S:
+ Don't use .file as it can confuse debugging since the .file
+ doesn't contain the path and therefore the debugger will never
+ know where it lives! This conflicts with using -Wa,--gstabs.
+
+2002-03-18 Hugo Tyson <hmt@redhat.com>
+
+ * src/vectors.S: Add CYGPKG_HAL_SPARC_ERC32 to list of ifdefs.
+
+2002-03-14 Jiri Gaisler <jiri@gaisler.com>
+
+ * Initial version based on the SPARClite HAL.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+
+//EOF ChangeLog
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/cdl/hal_sparc.cdl b/cesar/ecos/packages/hal/sparc/arch/current/cdl/hal_sparc.cdl
new file mode 100644
index 0000000000..f59c7844d6
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/cdl/hal_sparc.cdl
@@ -0,0 +1,180 @@
+# ====================================================================
+#
+# hal_sparc.cdl
+#
+# SPARC architectural HAL package configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: hmt
+# Contributors:
+# Date: 1999-11-01, 2002-03-08
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_HAL_SPARC {
+ display "SPARC architecture"
+ parent CYGPKG_HAL
+ hardware
+ include_dir cyg/hal
+ define_header hal_sparc.h
+ description "
+ The SPARC architecture HAL package provides generic support
+ for this processor architecture. It is also necessary to select
+ a specific target platform HAL package."
+
+ compile vectors.S vec_ivsr.S vec_xvsr.S context.S icontext.c
+ compile hal_intr.c hal_boot.c callcons.S
+
+ make {
+ <PREFIX>/lib/vectors.o : <PACKAGE>/src/vectors.S
+ $(CC) -Wp,-MD,vectors.tmp $(INCLUDE_PATH) $(CFLAGS) -c -o $@ $<
+ @echo $@ ": \\" > $(notdir $@).deps
+ @tail -n +2 vectors.tmp >> $(notdir $@).deps
+ @echo >> $(notdir $@).deps
+ @rm vectors.tmp
+ }
+
+ make {
+ <PREFIX>/lib/target.ld: <PACKAGE>/src/sparc.ld
+ $(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) $(CFLAGS) -o $@ $<
+ @echo $@ ": \\" > $(notdir $@).deps
+ @tail -n +2 target.tmp >> $(notdir $@).deps
+ @echo >> $(notdir $@).deps
+ @rm target.tmp
+ }
+
+ cdl_component CYGPKG_HAL_SPARC_OPTIONS {
+ display "SPARC build options"
+ flavor none
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_HAL_SPARC_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the SPARC HAL. These flags are used in addition
+ to the set of global flags."
+ }
+
+ cdl_option CYGPKG_HAL_SPARC_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the SPARC HAL. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_HAL_SPARC_TESTS {
+ display "SPARC tests"
+ flavor data
+ no_define
+ calculated { "tests/sparc_ex" }
+ description "
+ This option specifies the set of tests for the SPARC HAL."
+ }
+ }
+
+ cdl_component CYGHWR_HAL_SPARC_FPU {
+ display "FPU support"
+ default_value 0
+ description "This component enables support for the
+ Sparc floating point unit. If disabled -msoft-float issued
+ floating point emulation is used instead."
+
+
+ cdl_option CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH {
+ display "Use lazy FPU state switching"
+ flavor bool
+ default_value 0
+ requires { CYGHWR_HAL_SPARC_FPU == 1 }
+
+ description "
+ This option enables lazy FPU state switching.
+ When this feature is enabled an FPU context switch
+ is performed only if the new thread
+ uses the FPU. This feature can avoid unnecessary FPU
+ context switching if only few threads are using the FPU.
+ Must be disabled in an SMP system."
+ }
+ }
+
+ cdl_component CYGHWR_HAL_SPARC_FLAT {
+ display "Use -mflat gcc mode"
+ default_value 1
+ description "This will add the -mflat switch to the gcc command line."
+ }
+
+ cdl_component CYGPKG_HAL_SPARC_REGISTER_WINDOWS {
+ display "Number of register windows (2 - 32)."
+ flavor data
+ default_value 2
+ description "Configure the number of register windows your hardware has. Default is 2."
+ }
+
+ cdl_component CYGPKG_HAL_SMP_SUPPORT {
+ display "SMP support"
+ default_value 0
+ requires { CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH == 0 }
+
+ cdl_option CYGPKG_HAL_SMP_CPU_MAX {
+ display "Max number of CPUs supported"
+ flavor data
+ default_value 2
+ }
+ }
+
+ cdl_option CYGBLD_LINKER_SCRIPT {
+ display "Linker script"
+ flavor data
+ no_define
+ calculated { "src/sparc.ld" }
+ }
+}
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/include/arch.inc b/cesar/ecos/packages/hal/sparc/arch/current/include/arch.inc
new file mode 100644
index 0000000000..b18b7e7281
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/include/arch.inc
@@ -0,0 +1,85 @@
+#ifndef CYGONCE_HAL_ARCH_INC
+#define CYGONCE_HAL_ARCH_INC
+##=============================================================================
+##
+## arch.inc
+##
+## sparc assembler header file
+##
+##=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+##=============================================================================
+#######DESCRIPTIONBEGIN####
+##
+## Author(s): Gaisler Research (Konrad Eisele<eiselekd@web.de>)
+## Contributors:
+## Date:
+## Purpose: Architecture definitions.
+## Description: This file contains definitions and macros that are
+## useful for writing assembly code for the sparc CPU family.
+## Usage:
+## #include <cyg/hal/arch.inc>
+## ...
+##
+##
+######DESCRIPTIONEND####
+##
+##=============================================================================
+
+#define SPARC_PSR_ET_MASK 0x00000020 /* bit 5 */
+#define SPARC_PSR_PS_MASK 0x00000040 /* bit 6 */
+#define SPARC_PSR_S_MASK 0x00000080 /* bit 7 */
+#define SPARC_PSR_PIL_MASK 0x00000F00 /* bits 8 - 11 */
+#define SPARC_PSR_EF_MASK 0x00001000 /* bit 12 */
+#define SPARC_PSR_EC_MASK 0x00002000 /* bit 13 */
+#define SPARC_PSR_ICC_MASK 0x00F00000 /* bits 20 - 23 */
+#define SPARC_PSR_VER_MASK 0x0F000000 /* bits 24 - 27 */
+#define SPARC_PSR_IMPL_MASK 0xF0000000 /* bits 28 - 31 */
+
+#ifdef CYGPKG_HAL_SMP_SUPPORT
+
+#ifndef CYGPKG_HAL_SPARC_LEON3_OPTIONS
+#error SMP only supported for Leon3
+#endif
+#include <cyg/hal/leon3_arch.inc>
+
+#else
+
+ .macro hal_smp_cpu reg
+ or %g0,%g0,\reg
+ .endm
+
+#endif
+
+#endif // ifndef CYGONCE_HAL_ARCH_INC
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/include/basetype.h b/cesar/ecos/packages/hal/sparc/arch/current/include/basetype.h
new file mode 100644
index 0000000000..168910d5b7
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/include/basetype.h
@@ -0,0 +1,74 @@
+#ifndef CYGONCE_HAL_BASETYPE_H
+#define CYGONCE_HAL_BASETYPE_H
+
+//=============================================================================
+//
+// basetype.h
+//
+// Standard types for this architecture.
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg, gthomas, hmt
+// Contributors: nickg, gthomas, hmt
+// Date: 1998-12-10
+// Purpose: Define architecture base types.
+// Usage: Included by "cyg_type.h", do not use directly
+
+//
+//####DESCRIPTIONEND####
+//
+
+//-----------------------------------------------------------------------------
+// Characterize the architecture
+
+#define CYG_BYTEORDER CYG_MSBFIRST // Big endian
+
+//-----------------------------------------------------------------------------
+// SPARC does not usually use labels with underscores.
+
+//#define CYG_LABEL_NAME(_name_) _name_
+
+//-----------------------------------------------------------------------------
+// Define the standard variable sizes
+
+// The SPARC architecture uses the default definitions of the base
+// types, so we do not need to define any here.
+
+//-----------------------------------------------------------------------------
+#endif // CYGONCE_HAL_BASETYPE_H
+// End of basetype.h
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/include/hal_arch.h b/cesar/ecos/packages/hal/sparc/arch/current/include/hal_arch.h
new file mode 100644
index 0000000000..80d88ce875
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/include/hal_arch.h
@@ -0,0 +1,392 @@
+#ifndef CYGONCE_HAL_ARCH_H
+#define CYGONCE_HAL_ARCH_H
+
+//==========================================================================
+//
+// hal_arch.h
+//
+// Architecture specific abstractions
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg, gthomas, hmt
+// Contributors: nickg, gthomas, hmt
+// Date: 1999-02-20
+// Purpose: Define architecture abstractions
+// Usage: #include <cyg/hal/hal_arch.h>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/hal_sparc.h>
+
+#include <cyg/infra/cyg_type.h>
+
+#include <cyg/hal/hal_intr.h> // HAL_DISABLE_INTERRUPTS
+
+//--------------------------------------------------------------------------
+// Processor saved states:
+//
+// All these structures must be doubleword (64 bit) aligned.
+// The code that creates them on the stack will ensure this is so.
+
+typedef struct
+{
+ cyg_uint32 f[32];
+ cyg_uint32 fsr,_dummy;
+} HAL_FPU_Context;
+
+#define HAL_THREAD_CONTEXT_GLOBAL_BASE 0
+#define HAL_THREAD_CONTEXT_OUT_BASE 8
+#define HAL_THREAD_CONTEXT_LOCAL_BASE 16
+#define HAL_THREAD_CONTEXT_IN_BASE 24
+
+typedef struct
+{
+ // this is the save structure found at *(stack_ptr) always, note that
+ // i[6] is the frame pointer is the previous stack pointer, and
+ // o[6] is the stack pointer is the next frame pointer,
+ // so they form a linked list back up the call stack.
+ cyg_uint32 l[8]; /* Locals r16-r23 */
+ cyg_uint32 i[8]; /* Ins r24-r31 */
+} HAL_SavedWindow;
+
+typedef struct
+{
+ // Window save at stack pointer
+ HAL_SavedWindow li;
+//16
+ // This is the rest of the save state:
+ // NOTE: g[0] is used for the CWP, for %g0 == 0. Also note that the
+ // assembler routines must load/store it in the right order.
+ cyg_uint32 g[8] ; /* Globals r0- r7 */
+ cyg_uint32 o[8] ; /* Outs r8-r15 */
+//32 words in size
+
+#ifdef CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH
+ HAL_FPU_Context *fpucontext;
+ cyg_uint32 _dummy;
+//32+2 words in size
+#elif defined(CYGHWR_HAL_SPARC_FPU)
+ cyg_uint32 f[32];
+ cyg_uint32 fsr;
+ cyg_uint32 fdummy;
+// 32+32+2 words in size
+#endif
+
+// There is no need to save any other state; for example, condition codes,
+// the PC and NextPC, and Y, are preserved in local registers in the trap
+// handling window and so preserved in the caller stack frame as viewed
+// from an ISR. Note that the VSR is jumped to with those locals being set
+// up (and Y in situ), and it must preserve them itself before calling any
+// subsequent handlers (ISRs).
+
+} HAL_SavedRegisters;
+
+
+typedef struct
+{
+ // Window save at stack pointer
+ HAL_SavedWindow li;
+ cyg_uint32 composite_return_ptr; /* structure returns */
+ cyg_uint32 spill_args[6]; /* for callee to store */
+ cyg_uint32 spare; /* keep this 64-bits */
+} HAL_FrameStructure;
+
+
+//--------------------------------------------------------------------------
+// Exception handling function.
+// This function is defined by the kernel according to this prototype. It is
+// invoked from the HAL to deal with any CPU exceptions that the HAL does
+// not want to deal with itself. It usually invokes the kernel's exception
+// delivery mechanism.
+
+externC void cyg_hal_deliver_exception( CYG_WORD code, CYG_ADDRWORD data );
+
+//--------------------------------------------------------------------------
+// Bit manipulation macros
+#ifndef CYGPKG_HAL_SPARC_SCAN
+/* Most sparc's does not have 'scan' instruction */
+externC cyg_uint32 hal_lsbit_index(cyg_uint32 mask);
+externC cyg_uint32 hal_msbit_index(cyg_uint32 mask);
+#define HAL_LSBIT_INDEX(index, mask) index = hal_lsbit_index(mask);
+#define HAL_MSBIT_INDEX(index, mask) index = hal_msbit_index(mask);
+#else
+#define HAL_LSBIT_INDEX(index, mask) \
+ CYG_MACRO_START \
+ asm volatile ( \
+ "scan %1, 0, %%l7;" \
+ "mov 31, %0;" \
+ "sub %0, %%l7, %0" \
+ : "=r"(index) \
+ : "r"(mask & ~(mask-1)) \
+ : "l7" \
+ ); \
+CYG_MACRO_END
+
+#define HAL_MSBIT_INDEX(index, mask) \
+ CYG_MACRO_START \
+ asm volatile ( \
+ "scan %1, 0, %%l7;" \
+ "mov 31, %0;" \
+ "sub %0, %%l7, %0" \
+ : "=r"(index) \
+ : "r"(mask) \
+ : "l7" \
+ ); \
+CYG_MACRO_END
+#endif
+
+//--------------------------------------------------------------------------
+// Context Initialization
+// Initialize the context of a thread.
+// Arguments:
+// _sparg_ name of variable containing current sp, will be written with new sp
+// _thread_ thread object address, passed as argument to entry point
+// _entry_ entry point address.
+// _id_ bit pattern used in initializing registers, for debugging.
+
+externC CYG_ADDRESS
+hal_thread_init_context( CYG_WORD sparg,
+ CYG_WORD thread,
+ CYG_WORD entry,
+ CYG_WORD id );
+
+#define HAL_THREAD_INIT_CONTEXT( _sparg_, _thread_, _entry_, _id_ ) \
+CYG_MACRO_START \
+ _sparg_ = hal_thread_init_context( (CYG_WORD)(_sparg_), \
+ (CYG_WORD)(_thread_), \
+ (CYG_WORD)(_entry_), \
+ (CYG_WORD)(_id_) ); \
+CYG_MACRO_END
+
+//---------------------------------------------------------------------------
+// Context switch macros.
+// The arguments are pointers to locations where the stack pointer
+// of the current thread is to be stored, and from where the sp of the
+// next thread is to be fetched.
+
+externC void hal_thread_switch_context( CYG_ADDRESS to, CYG_ADDRESS from );
+externC void hal_thread_load_context( CYG_ADDRESS to )
+ __attribute__ ((noreturn));
+
+#define HAL_THREAD_SWITCH_CONTEXT(_fspptr_,_tspptr_) \
+ hal_thread_switch_context((CYG_ADDRESS)_tspptr_, \
+ (CYG_ADDRESS)_fspptr_);
+
+#define HAL_THREAD_LOAD_CONTEXT(_tspptr_) \
+ hal_thread_load_context( (CYG_ADDRESS)_tspptr_ );
+
+
+//---------------------------------------------------------------------------
+// Execution reorder barrier.
+// When optimizing the compiler can reorder code. In multithreaded systems
+// where the order of actions is vital, this can sometimes cause problems.
+// This macro may be inserted into places where reordering should not happen.
+
+#define HAL_REORDER_BARRIER() asm volatile ( "" : : : "memory" )
+
+//---------------------------------------------------------------------------
+// Breakpoint support
+// HAL_BREAKPOINT() is a code sequence that will cause a breakpoint to happen
+// if executed.
+// HAL_BREAKINST is the value of the breakpoint instruction and
+// HAL_BREAKINST_SIZE is its size in bytes.
+
+#define HAL_BREAKPOINT(_label_) \
+asm volatile (" .globl " #_label_ ";" \
+ #_label_":" \
+ "ta 1" \
+ );
+
+#define HAL_BREAKINST {0x91,0xd0,0x20,0x01}
+#define HAL_BREAKINST_SIZE 4
+
+//---------------------------------------------------------------------------
+// Thread register state manipulation for GDB support.
+
+// Translate a stack pointer as saved by the thread context macros above into
+// a pointer to a HAL_SavedRegisters structure.
+#define HAL_THREAD_GET_SAVED_REGISTERS( _sp_, _regs_ ) \
+ (_regs_) = (HAL_SavedRegisters *)(_sp_)
+
+// Routines in icontext.c used here because they're quite large for
+// the SPARC (note param order):
+externC void
+cyg_hal_sparc_get_gdb_regs( void *gdb_regset,
+ HAL_SavedRegisters *eCos_regset );
+
+externC void
+cyg_hal_sparc_set_gdb_regs( HAL_SavedRegisters *eCos_regset,
+ void *gdb_regset );
+
+
+// Copy a set of registers from a HAL_SavedRegisters structure into a GDB
+// ordered array.
+#define HAL_GET_GDB_REGISTERS( _aregval_, _regs_ ) \
+ CYG_MACRO_START \
+ cyg_hal_sparc_get_gdb_regs( (_aregval_), (_regs_) ); \
+CYG_MACRO_END
+
+// Copy a GDB ordered array into a HAL_SavedRegisters structure.
+#define HAL_SET_GDB_REGISTERS( _regs_ , _aregval_ ) \
+ CYG_MACRO_START \
+ cyg_hal_sparc_set_gdb_regs( (_regs_), (_aregval_) ); \
+CYG_MACRO_END
+
+//---------------------------------------------------------------------------
+// HAL setjmp
+
+#define CYGARC_JMP_BUF_SIZE 32 // (words)
+
+// this too must be doubleword aligned (64 bit)
+
+typedef cyg_uint64 hal_jmp_buf[ CYGARC_JMP_BUF_SIZE / 2 ];
+
+externC int hal_setjmp(hal_jmp_buf env);
+externC void hal_longjmp(hal_jmp_buf env, int val);
+
+//---------------------------------------------------------------------------
+// Flush Register Windows
+//
+// This is implemented as trap 3 in some SPARC systems.
+// This macro is only for use from normal, foreground code.
+// (including exception handlers and the like)
+
+#define HAL_FLUSH_REGISTERS_TO_STACK() \
+ CYG_MACRO_START \
+ cyg_uint32 _saveintr_; \
+ HAL_DISABLE_INTERRUPTS( _saveintr_ ); /* leave traps on */ \
+ asm volatile ( \
+ /* force out all our callers register sets onto the stack */ \
+ /* if necessary: the system will handily take care of this for */ \
+ /* us as follows: */ \
+ "save %%sp, -16 * 4, %%sp;" /* need all these to preserve */ \
+ "save %%sp, -16 * 4, %%sp;" /* the linked list property... */ \
+ "save %%sp, -16 * 4, %%sp;" \
+ "save %%sp, -16 * 4, %%sp;" \
+ "save %%sp, -16 * 4, %%sp;" \
+ "save %%sp, -16 * 4, %%sp;" \
+ "restore;" \
+ "restore;" \
+ "restore;" \
+ "restore;" \
+ "restore;" \
+ "restore" \
+ /* six of these is correct; a seventh would force out the */ \
+ /* current set that we are using right now. Note that minimal */ \
+ /* space is allowed on stack for locals and ins in case this */ \
+ /* sequence itself gets interrupted and recurses too deep. */ \
+ : \
+ : \
+ : "memory" \
+ ); \
+ HAL_RESTORE_INTERRUPTS( _saveintr_ ); \
+CYG_MACRO_END
+
+//---------------------------------------------------------------------------
+// Idle thread code.
+// This macro is called in the idle thread loop, and gives the HAL the
+// chance to insert code. Typical idle thread behaviour might be to halt the
+// processor.
+
+externC void hal_idle_thread_action(cyg_uint32 loop_count);
+
+#ifndef HAL_IDLE_THREAD_ACTION
+#define HAL_IDLE_THREAD_ACTION(_count_) \
+ /* Cyg_Clock::real_time_clock->tick() */
+#endif
+
+//---------------------------------------------------------------------------
+
+// Minimal and sensible stack sizes: the intention is that applications
+// will use these to provide a stack size in the first instance prior to
+// proper analysis. Idle thread stack should be this big.
+
+// THESE ARE NOT INTENDED TO BE MICROMETRICALLY ACCURATE FIGURES.
+// THEY ARE HOWEVER ENOUGH TO START PROGRAMMING.
+// YOU MUST MAKE YOUR STACKS LARGER IF YOU HAVE LARGE "AUTO" VARIABLES!
+
+// We define quite large stack needs for SPARC, for it requires 576
+// bytes (144 words) to process an interrupt and thread-switch, and
+// momentarily, but needed in case of recursive interrupts, it needs 208
+// words - if a sequence of saves to push out other regsets is interrupted.
+
+// This is not a config option because it should not be adjusted except
+// under "enough rope" sort of disclaimers.
+
+// A minimal, optimized stack frame is 24 words, but even -O2 code seems to
+// place a few locals in the locals area: round this up to provide a
+// sensible overestimate:
+#define CYGNUM_HAL_STACK_FRAME_SIZE (4 * 32)
+
+// Stack needed for a context switch: this is implicit in the estimate for
+// interrupts so not explicitly used below:
+#define CYGNUM_HAL_STACK_CONTEXT_SIZE (4 * 32)
+
+// Interrupt + call to ISR, interrupt_end() and the DSR
+#define CYGNUM_HAL_STACK_INTERRUPT_SIZE \
+ ((208 * 4) + 2 * CYGNUM_HAL_STACK_FRAME_SIZE)
+
+// And we have lots of registers so no particular amount is added in for
+// typical local variable usage.
+
+// Typically we have 4 nestable interrupt sources, clock, serialin,
+// serialout, (and NMI button, but you want it to not destroy context):
+
+#define CYGNUM_HAL_STACK_SIZE_MINIMUM \
+ (4 * CYGNUM_HAL_STACK_INTERRUPT_SIZE + 2 * CYGNUM_HAL_STACK_FRAME_SIZE)
+
+#define CYGNUM_HAL_STACK_SIZE_TYPICAL \
+ (CYGNUM_HAL_STACK_SIZE_MINIMUM + 60 * CYGNUM_HAL_STACK_FRAME_SIZE)
+
+//--------------------------------------------------------------------------
+// Macros for switching context between two eCos instances (jump from
+// code in ROM to code in RAM or vice versa).
+#define CYGARC_HAL_SAVE_GP()
+#define CYGARC_HAL_RESTORE_GP()
+
+
+//-----------------------------------------------------------------------------
+
+#define __GET_FP(fp) __asm__ __volatile__("mov %%i6, %0" : "=r" (fp))
+#define __GET_SP(sp) __asm__ __volatile__("mov %%o6, %0" : "=r" (sp))
+
+#endif // CYGONCE_HAL_ARCH_H
+// End of hal_arch.h
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/include/hal_intr.h b/cesar/ecos/packages/hal/sparc/arch/current/include/hal_intr.h
new file mode 100644
index 0000000000..a7ffecc910
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/include/hal_intr.h
@@ -0,0 +1,399 @@
+#ifndef CYGONCE_HAL_INTR_H
+#define CYGONCE_HAL_INTR_H
+
+//===========================================================================
+//
+// hal_intr.h
+//
+// HAL Interrupt and clock support
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg, gthomas, hmt
+// Contributors: nickg, gthomas, hmt,
+// jlarmour
+// Date: 1999-02-20, 2002-03-08
+// Purpose: Define Interrupt support
+// Description: The macros defined here provide the HAL APIs for handling
+// interrupts and the clock.
+//
+// Usage:
+// #include <cyg/hal/hal_intr.h>
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/hal_sparc.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/vectors.h>
+
+//---------------------------------------------------------------------------
+// SPARC exception vectors.
+//
+// A note on nomenclature:
+//
+// SPARC has traps: interrupts are traps, and so are exceptions.
+// There are 255 of them in the hardware: this HAL's trampoline code decodes
+// them into the 27 listed below as CYGNUM_HAL_VECTOR_xxx.
+// They are handled uniformly in the trampoline code in the sense that
+// each vector has a VSR which is called in the same way.
+// Interrupts (vectors 1-15) have one VSR by default, exceptions (vectors
+// 16-26) another.
+// The interrupt VSR sets up a C stack and calls the corresponding ISR with
+// the required arguments; this ABI is mandated by the kernel.
+// The exception VSR sets up a C stack and calls the corresponding XSR
+// (just an entry in the ISR[sic] table) with similar arguments, such that
+// it (by default) can call the kernel's cyg_hal_deliver_exception().
+//
+// So:
+// CYGNUM_HAL_VSR_MAX/MIN/COUNT describe the number of VSR entries *and*
+// the number of ISR (and associated data) entries (including those which
+// are XSRs, just a special case of ISRs).
+// CYGNUM_HAL_ISR_MAX/MIN/COUNT describe the number of interrupt sources
+// and is used for bounds checking in kernel interrupt objects.
+// CYGNUM_HAL_EXCEPTION_MAX/MIN/COUNT describe vector numbers which have
+// by default the exception VSR and default XSR installed.
+
+
+// These correspond to VSRs and the values are the ones to use for
+// HAL_VSR_GET/SET
+
+#define CYGNUM_HAL_VECTOR_RESERVED_0 0
+#define CYGNUM_HAL_VECTOR_INTERRUPT_1 1 // NB: least important
+#define CYGNUM_HAL_VECTOR_INTERRUPT_2 2 // (lowest priority)
+#define CYGNUM_HAL_VECTOR_INTERRUPT_3 3
+#define CYGNUM_HAL_VECTOR_INTERRUPT_4 4
+#define CYGNUM_HAL_VECTOR_INTERRUPT_5 5
+#define CYGNUM_HAL_VECTOR_INTERRUPT_6 6
+#define CYGNUM_HAL_VECTOR_INTERRUPT_7 7
+#define CYGNUM_HAL_VECTOR_INTERRUPT_8 8
+#define CYGNUM_HAL_VECTOR_INTERRUPT_9 9
+#define CYGNUM_HAL_VECTOR_INTERRUPT_10 10
+#define CYGNUM_HAL_VECTOR_INTERRUPT_11 11
+#define CYGNUM_HAL_VECTOR_INTERRUPT_12 12
+#define CYGNUM_HAL_VECTOR_INTERRUPT_13 13
+#define CYGNUM_HAL_VECTOR_INTERRUPT_14 14 // (highest priority)
+#define CYGNUM_HAL_VECTOR_INTERRUPT_15 15 // NB: most important (NMI)
+
+#define CYG_VECTOR_IS_INTERRUPT(v) (15 >= (v))
+
+#define CYGNUM_HAL_VECTOR_USER_TRAP 16 // Ticc instructions
+#define CYGNUM_HAL_VECTOR_FETCH_ABORT 17 // trap type 1
+#define CYGNUM_HAL_VECTOR_ILLEGAL_OP 18 // trap type 2
+#define CYGNUM_HAL_VECTOR_PRIV_OP 19 // tt 3: privileged op
+#define CYGNUM_HAL_VECTOR_NOFPCP 20 // tt 4,36: FP or coproc
+#define CYGNUM_HAL_VECTOR_RESERVED_1 21 // (not used)
+#define CYGNUM_HAL_VECTOR_RESERVED_2 22 // (not used)
+#define CYGNUM_HAL_VECTOR_UNALIGNED 23 // tt 7: unaligned memory access
+#define CYGNUM_HAL_VECTOR_TT_EIGHT 24 // tt 8: not defined
+#define CYGNUM_HAL_VECTOR_DATA_ABORT 25 // tt 9: read/write failed
+
+#define CYGNUM_HAL_VECTOR_OTHERS 26 // any others
+
+#define CYGNUM_HAL_VSR_MIN 0
+#define CYGNUM_HAL_VSR_MAX 26
+#define CYGNUM_HAL_VSR_COUNT 27
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// Interrupt vectors. These are the values used with HAL_INTERRUPT_ATTACH()
+// et al
+
+#define CYGNUM_HAL_INTERRUPT_RESERVED_0 CYGNUM_HAL_VECTOR_RESERVED_0
+#define CYGNUM_HAL_INTERRUPT_1 CYGNUM_HAL_VECTOR_INTERRUPT_1
+#define CYGNUM_HAL_INTERRUPT_2 CYGNUM_HAL_VECTOR_INTERRUPT_2
+#define CYGNUM_HAL_INTERRUPT_3 CYGNUM_HAL_VECTOR_INTERRUPT_3
+#define CYGNUM_HAL_INTERRUPT_4 CYGNUM_HAL_VECTOR_INTERRUPT_4
+#define CYGNUM_HAL_INTERRUPT_5 CYGNUM_HAL_VECTOR_INTERRUPT_5
+#define CYGNUM_HAL_INTERRUPT_6 CYGNUM_HAL_VECTOR_INTERRUPT_6
+#define CYGNUM_HAL_INTERRUPT_7 CYGNUM_HAL_VECTOR_INTERRUPT_7
+#define CYGNUM_HAL_INTERRUPT_8 CYGNUM_HAL_VECTOR_INTERRUPT_8
+#define CYGNUM_HAL_INTERRUPT_9 CYGNUM_HAL_VECTOR_INTERRUPT_9
+#define CYGNUM_HAL_INTERRUPT_10 CYGNUM_HAL_VECTOR_INTERRUPT_10
+#define CYGNUM_HAL_INTERRUPT_11 CYGNUM_HAL_VECTOR_INTERRUPT_11
+#define CYGNUM_HAL_INTERRUPT_12 CYGNUM_HAL_VECTOR_INTERRUPT_12
+#define CYGNUM_HAL_INTERRUPT_13 CYGNUM_HAL_VECTOR_INTERRUPT_13
+#define CYGNUM_HAL_INTERRUPT_14 CYGNUM_HAL_VECTOR_INTERRUPT_14
+#define CYGNUM_HAL_INTERRUPT_15 CYGNUM_HAL_VECTOR_INTERRUPT_15
+
+#define CYGNUM_HAL_ISR_MIN 0
+#define CYGNUM_HAL_ISR_MAX 15
+#define CYGNUM_HAL_ISR_COUNT 16
+
+#ifdef CYGPKG_HAL_SMP_SUPPORT
+#define CYGNUM_HAL_SMP_CPU_INTERRUPT_VECTOR(_n_) 14
+#endif
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// Exception vectors. These are the values used when passed out to an
+// external exception handler using cyg_hal_deliver_exception()
+// They can also be used with HAL_INTERRUPT_ATTACH() et al to install
+// different XSRs.
+
+#define CYGNUM_HAL_EXCEPTION_TRAP CYGNUM_HAL_VECTOR_USER_TRAP
+#define CYGNUM_HAL_EXCEPTION_CODE_ACCESS CYGNUM_HAL_VECTOR_FETCH_ABORT
+#define CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION \
+ CYGNUM_HAL_VECTOR_ILLEGAL_OP
+#define CYGNUM_HAL_EXCEPTION_PRIVILEGED_INSTRUCTION \
+ CYGNUM_HAL_VECTOR_PRIV_OP
+#define CYGNUM_HAL_EXCEPTION_FPU_NOT_AVAIL CYGNUM_HAL_VECTOR_NOFPCP
+#define CYGNUM_HAL_EXCEPTION_RESERVED1 CYGNUM_HAL_VECTOR_RESERVED1
+#define CYGNUM_HAL_EXCEPTION_RESERVED2 CYGNUM_HAL_VECTOR_RESERVED2
+#define CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS \
+ CYGNUM_HAL_VECTOR_UNALIGNED
+#define CYGNUM_HAL_EXCEPTION_TT_EIGHT CYGNUM_HAL_VECTOR_TT_EIGHT
+#define CYGNUM_HAL_EXCEPTION_DATA_ACCESS CYGNUM_HAL_VECTOR_DATA_ABORT
+#define CYGNUM_HAL_EXCEPTION_OTHERS CYGNUM_HAL_VECTOR_OTHERS
+
+
+#define CYGNUM_HAL_EXCEPTION_MIN 16
+#define CYGNUM_HAL_EXCEPTION_MAX (16 + 10)
+#define CYGNUM_HAL_EXCEPTION_COUNT (1 + CYGNUM_HAL_EXCEPTION_MAX - \
+ CYGNUM_HAL_EXCEPTION_MIN)
+
+//---------------------------------------------------------------------------
+// (Null) Translation from a wider space of interrupt sources:
+
+#define HAL_TRANSLATE_VECTOR(_vector_,_index_) _index_ = (_vector_)
+
+//---------------------------------------------------------------------------
+// Routine to execute DSRs using separate interrupt stack
+
+#ifdef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
+
+externC void hal_interrupt_stack_call_pending_DSRs(void);
+#define HAL_INTERRUPT_STACK_CALL_PENDING_DSRS() \
+ hal_interrupt_stack_call_pending_DSRs()
+
+// these are offered solely for stack usage testing
+// if they are not defined, then there is no interrupt stack.
+#define HAL_INTERRUPT_STACK_BASE cyg_interrupt_stack_base
+#define HAL_INTERRUPT_STACK_TOP cyg_interrupt_stack
+// use them to declare these extern however you want:
+// extern char HAL_INTERRUPT_STACK_BASE[];
+// extern char HAL_INTERRUPT_STACK_TOP[];
+// is recommended
+#endif
+
+//---------------------------------------------------------------------------
+// Static data used by HAL
+
+// VSR table
+externC volatile CYG_ADDRESS hal_vsr_table[CYGNUM_HAL_VSR_COUNT];
+
+// ISR + XSR tables - so VSR count.
+externC volatile CYG_ADDRESS hal_interrupt_handlers[CYGNUM_HAL_VSR_COUNT];
+externC volatile CYG_ADDRWORD hal_interrupt_data[CYGNUM_HAL_VSR_COUNT];
+externC volatile CYG_ADDRESS hal_interrupt_objects[CYGNUM_HAL_VSR_COUNT];
+// (interrupt_objects only used in the interrupt case _but_ the interrupt
+// attach &co macros write it, so keep it full-sized)
+
+//---------------------------------------------------------------------------
+// Default ISRs for exception/interrupt handing.
+
+// note that these have the same ABI apart from the extra SP parameter
+// for exceptions.
+
+externC cyg_uint32 hal_default_isr(CYG_ADDRWORD vector, CYG_ADDRWORD data);
+// return code from ISR is passed to interrupt_end() in the kernel.
+
+externC void cyg_hal_exception_handler(CYG_ADDRWORD vector,
+ CYG_ADDRWORD data,
+ CYG_ADDRWORD stackpointer);
+
+//---------------------------------------------------------------------------
+// Default VSRs for exception/interrupt handing.
+
+// note that these do not have a C ABI as such; they are *vector* service
+// routines and are written in assembler.
+
+externC void hal_default_exception_vsr( void );
+externC void hal_default_interrupt_vsr( void );
+
+//---------------------------------------------------------------------------
+// Interrupt state storage
+
+typedef cyg_uint32 CYG_INTERRUPT_STATE;
+
+//---------------------------------------------------------------------------
+// Interrupt control macros
+
+// THIS ONE IS NOT A STANDARD HAL ENTRY (HAL_QUERY_TRAPS)
+// (so should be unused externally)
+#define HAL_QUERY_TRAPS(_old_) \
+ asm volatile ( \
+ "rd %%psr, %%l7;" \
+ "and %%l7, 0x020, %0" \
+ : "=r"(_old_) \
+ : \
+ : "l7" \
+ );
+
+
+//atomical psr set (inside a syscall trap)
+externC inline unsigned long sparc_disable_interrupts(void) {
+ unsigned long _old_;
+ asm volatile (
+ "mov %1, %%o0\n\t"
+ "ta 0\n\t"
+ "mov %%o0,%0\n\t"
+ : "=r"(_old_)
+ : "i" (SYS_irqdis)
+ : "o0", "cc"
+ );
+ return _old_;
+}
+
+//atomical psr set (inside a syscall trap)
+externC inline void sparc_enable_interrupts(unsigned long old) {
+
+ asm volatile (
+ "mov %1,%%o0\n\t"
+ "mov %0,%%o1\n\t"
+ "ta 0\n\t"
+ :
+ : "r"(old), "i" (SYS_irqen)
+ : "o0","o1", "cc"
+ );
+
+};
+
+#define HAL_DISABLE_INTERRUPTS(_old_) _old_ = sparc_disable_interrupts();
+#define HAL_ENABLE_INTERRUPTS() sparc_enable_interrupts(0);
+#define HAL_RESTORE_INTERRUPTS(_old_) sparc_enable_interrupts(_old_);
+
+#define HAL_QUERY_INTERRUPTS(_old_) \
+ asm volatile ( \
+ "rd %%psr, %%l7;" \
+ "and %%l7, 0xf00, %%l7;" \
+ "xor %%l7, 0xf00, %0" \
+ : "=r"(_old_) \
+ : \
+ : "l7" \
+ );
+
+
+//---------------------------------------------------------------------------
+// Interrupt and VSR attachment macros
+
+#define HAL_INTERRUPT_IN_USE( _vector_, _state_) \
+ CYG_MACRO_START \
+ cyg_uint32 _index_; \
+ HAL_TRANSLATE_VECTOR ((_vector_), _index_); \
+ \
+ if( (CYG_ADDRESS)hal_default_isr == hal_interrupt_handlers[_vector_] || \
+ (CYG_ADDRESS)cyg_hal_exception_handler == \
+ hal_interrupt_handlers[_vector_] ) { \
+ (_state_) = 0; \
+ } else { \
+ (_state_) = 1; \
+ } \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_ATTACH( _vector_, _isr_, _data_, _object_ ) \
+ CYG_MACRO_START \
+ if( (CYG_ADDRESS)hal_default_isr == hal_interrupt_handlers[_vector_] ||\
+ (CYG_ADDRESS)cyg_hal_exception_handler == \
+ hal_interrupt_handlers[_vector_] ) \
+ { \
+ hal_interrupt_handlers[_vector_] = (CYG_ADDRESS)_isr_; \
+ hal_interrupt_data[_vector_] = (CYG_ADDRWORD) _data_; \
+ hal_interrupt_objects[_vector_] = (CYG_ADDRESS)_object_; \
+ } \
+CYG_MACRO_END
+
+#define HAL_INTERRUPT_DETACH( _vector_, _isr_ ) CYG_MACRO_START \
+ if( hal_interrupt_handlers[_vector_] == (CYG_ADDRESS)_isr_ ) \
+ { \
+ hal_interrupt_handlers[_vector_] = \
+ (CYG_VECTOR_IS_INTERRUPT( _vector_ ) \
+ ? (CYG_ADDRESS)hal_default_isr \
+ : (CYG_ADDRESS)cyg_hal_exception_handler); \
+ hal_interrupt_data[_vector_] = 0; \
+ hal_interrupt_objects[_vector_] = 0; \
+ } \
+CYG_MACRO_END
+
+#define HAL_VSR_GET( _vector_, _pvsr_ ) \
+ *(CYG_ADDRESS *)(_pvsr_) = hal_vsr_table[_vector_];
+
+
+#define HAL_VSR_SET( _vector_, _vsr_, _poldvsr_ ) CYG_MACRO_START \
+ if( _poldvsr_ != NULL ) \
+ *(CYG_ADDRESS *)_poldvsr_ = hal_vsr_table[_vector_]; \
+ hal_vsr_table[_vector_] = (CYG_ADDRESS)_vsr_; \
+CYG_MACRO_END
+
+// This is an ugly name, but what it means is: grab the VSR back to eCos
+// internal handling, or if you like, the default handler. But if
+// cooperating with GDB and CygMon, the default behaviour is to pass most
+// exceptions to CygMon. This macro undoes that so that eCos handles the
+// exception. So use it with care.
+
+#define HAL_VSR_SET_TO_ECOS_HANDLER( _vector_, _poldvsr_ ) CYG_MACRO_START \
+ if( _poldvsr_ != NULL ) \
+ *(CYG_ADDRESS *)_poldvsr_ = hal_vsr_table[_vector_]; \
+ hal_vsr_table[_vector_] = ( CYG_VECTOR_IS_INTERRUPT( _vector_ ) \
+ ? (CYG_ADDRESS)hal_default_interrupt_vsr \
+ : (CYG_ADDRESS)hal_default_exception_vsr ); \
+CYG_MACRO_END
+
+
+
+//---------------------------------------------------------------------------
+
+// Which PIC (if any) is available is dependent on the board.
+// This sets up that stuff:
+
+#include <cyg/hal/hal_xpic.h>
+
+// Ditto the clock(s)
+// This defines all the clock macros the kernel requires:
+
+#include <cyg/hal/hal_clock.h>
+
+#define HAL_DELAY_US(n) hal_delay_us(n)
+
+//---------------------------------------------------------------------------
+#endif // ifndef CYGONCE_HAL_INTR_H
+// End of hal_intr.h
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/include/hal_io.h b/cesar/ecos/packages/hal/sparc/arch/current/include/hal_io.h
new file mode 100644
index 0000000000..0efa562cbd
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/include/hal_io.h
@@ -0,0 +1,183 @@
+#ifndef CYGONCE_HAL_IO_H
+#define CYGONCE_HAL_IO_H
+
+//=============================================================================
+//
+// hal_io.h
+//
+// HAL device IO register support.
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg, hmt
+// Contributors: nickg, hmt
+// Date: 1998-02-17
+// Purpose: Define IO register support
+// Description: The macros defined here provide the HAL APIs for handling
+// device IO control registers.
+//
+// Usage:
+// #include <cyg/hal/hal_io.h>
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/system.h>
+
+#include <cyg/infra/cyg_type.h>
+
+//-----------------------------------------------------------------------------
+// Enforce in-order IO for all HAL reads/writes using this macro.
+#define HAL_IO_BARRIER() \
+ asm volatile ( "" : : : "memory" )
+
+//-----------------------------------------------------------------------------
+// IO Register address.
+// This type is for recording the address of an IO register.
+
+typedef volatile CYG_ADDRWORD HAL_IO_REGISTER;
+
+//-----------------------------------------------------------------------------
+// BYTE Register access.
+// Individual and vectorized access to 8 bit registers.
+
+#define HAL_READ_UINT8( _register_, _value_ ) \
+ CYG_MACRO_START \
+ ((_value_) = *((volatile CYG_BYTE *)(_register_))); \
+ HAL_IO_BARRIER (); \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT8( _register_, _value_ ) \
+ CYG_MACRO_START \
+ (*((volatile CYG_BYTE *)(_register_)) = (_value_)); \
+ HAL_IO_BARRIER (); \
+ CYG_MACRO_END
+
+#define HAL_READ_UINT8_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ (_buf_)[_i_] = ((volatile CYG_BYTE *)(_register_))[_j_]; \
+ HAL_IO_BARRIER (); \
+ } \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT8_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ ((volatile CYG_BYTE *)(_register_))[_j_] = (_buf_)[_i_]; \
+ HAL_IO_BARRIER (); \
+ } \
+ CYG_MACRO_END
+
+
+//-----------------------------------------------------------------------------
+// 16 bit access.
+// Individual and vectorized access to 16 bit registers.
+
+#define HAL_READ_UINT16( _register_, _value_ ) \
+ CYG_MACRO_START \
+ ((_value_) = *((volatile CYG_WORD16 *)(_register_))); \
+ HAL_IO_BARRIER (); \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT16( _register_, _value_ ) \
+ CYG_MACRO_START \
+ (*((volatile CYG_WORD16 *)(_register_)) = (_value_)); \
+ HAL_IO_BARRIER (); \
+ CYG_MACRO_END
+
+#define HAL_READ_UINT16_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ (_buf_)[_i_] = ((volatile CYG_WORD16 *)(_register_))[_j_]; \
+ HAL_IO_BARRIER (); \
+ } \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT16_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ ((volatile CYG_WORD16 *)(_register_))[_j_] = (_buf_)[_i_]; \
+ HAL_IO_BARRIER (); \
+ } \
+ CYG_MACRO_END
+
+//-----------------------------------------------------------------------------
+// 32 bit access.
+// Individual and vectorized access to 32 bit registers.
+
+#define HAL_READ_UINT32( _register_, _value_ ) \
+ CYG_MACRO_START \
+ ((_value_) = *((volatile CYG_WORD32 *)(_register_))); \
+ HAL_IO_BARRIER (); \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT32( _register_, _value_ ) \
+ CYG_MACRO_START \
+ (*((volatile CYG_WORD32 *)(_register_)) = (_value_)); \
+ HAL_IO_BARRIER (); \
+ CYG_MACRO_END
+
+#define HAL_READ_UINT32_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ (_buf_)[_i_] = ((volatile CYG_WORD32 *)(_register_))[_j_]; \
+ HAL_IO_BARRIER (); \
+ } \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT32_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ ((volatile CYG_WORD32 *)(_register_))[_j_] = (_buf_)[_i_]; \
+ HAL_IO_BARRIER (); \
+ } \
+ CYG_MACRO_END
+
+//-----------------------------------------------------------------------------
+
+#endif // ifndef CYGONCE_HAL_IO_H
+// End of hal_io.h
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/include/hal_smp.h b/cesar/ecos/packages/hal/sparc/arch/current/include/hal_smp.h
new file mode 100644
index 0000000000..d0b1f13bb1
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/include/hal_smp.h
@@ -0,0 +1,77 @@
+#ifndef SPARC_HAL_SMP_H
+#define SPARC_HAL_SMP_H
+
+//===========================================================================
+//
+// hal_smp.h
+//
+// HAL SMP support
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: Gaisler Research,(Konrad Eisele<eislelekd@web.de>)
+// Date: 2004
+// Purpose: Define SMP support abstractions
+// Description:
+// Usage:
+// #include <cyg/hal/hal_smp.h>
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+#include <pkgconf/hal.h>
+
+#ifdef CYGPKG_HAL_SMP_SUPPORT
+
+#include <pkgconf/hal_sparc.h>
+#include <cyg/infra/cyg_type.h>
+
+#ifndef CYGPKG_HAL_SPARC_LEON3
+#error SMP only supported for Leon3
+#else
+#include <cyg/hal/hal_leon3_smp.h>
+#endif
+
+#endif // CYGPKG_HAL_SMP_SUPPORT
+
+//---------------------------------------------------------------------------
+#endif // ifndef SPARC_HAL_SMP_H
+// End of hal_smp.h
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/include/vectors.h b/cesar/ecos/packages/hal/sparc/arch/current/include/vectors.h
new file mode 100644
index 0000000000..347c1b323f
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/include/vectors.h
@@ -0,0 +1,153 @@
+#ifndef CYGONCE_HAL_VECTORS_H
+#define CYGONCE_HAL_VECTORS_H
+
+//=============================================================================
+//
+// vectors.h
+//
+// SPARC Architecture specific vector numbers &c
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors:hmt
+// Date: 1998-12-10
+// Purpose: Define architecture abstractions and some shared info;
+// this file is included by assembler files as well as C/C++.
+// Usage: #include <cyg/hal/vectors.h>
+
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal_sparc.h>
+
+#define __WINSIZE CYGPKG_HAL_SPARC_REGISTER_WINDOWS
+
+#if (__WINSIZE < 2 || __WINSIZE > 32)
+# error CYGPKG_HAL_SPARC_REGISTER_WINDOWS not supported
+#endif
+#if (__WINSIZE == 2 && !defined(CYGHWR_HAL_SPARC_FLAT) )
+# error window size of 2 only works with -mflat option
+#endif
+
+#if (__WINSIZE == 2 || __WINSIZE == 4 || __WINSIZE == 8 || __WINSIZE == 16 || __WINSIZE == 32)
+#define CYGPKG_HAL_SPARC_REGISTER_WINDOWS_POW2 1
+#endif
+
+#if (__WINSIZE <= 2)
+#define __WINBITS (2-1)
+#else
+# if (__WINSIZE <= 4)
+# define __WINBITS (4-1)
+# else
+# if (__WINSIZE <= 8)
+# define __WINBITS (8-1)
+# else
+# if (__WINSIZE <= 16)
+# define __WINBITS (16-1)
+# else
+# define __WINBITS (32-1)
+# endif
+# endif
+# endif
+#endif
+
+// These should be generic to all SPARCs:
+
+#define __WINBITS_MAXIMAL 0x1f
+
+#define __WIN_INIT (__WINSIZE - 1)
+
+#define __WIM_INIT (1 << __WIN_INIT)
+
+// ------------------------------------------------------------------------
+
+#define TRAP_WUNDER 6 // Window Underflow trap number
+#define TRAP_WOVER 5 // Window Overflow trap number
+#define TRAP_FPDIS 4 // FPU Disabled trap number
+
+#define TRAP_INTR_MIN 17 // smallest interrupt trap number
+#define TRAP_INTR_MAX 31 // largest interrupt trap number
+
+#define TT_MASK 0xff0 // trap type mask from tbr
+#define TT_SHL 4 // shift to get a tbr value
+
+// Alternatively, detect an interrupt by testing tbr for being in the range
+// 16-31 by masking &c:
+#define TT_IS_INTR_MASK 0xf00
+#define TT_IS_INTR_VALUE 0x100
+
+#if TT_IS_INTR_VALUE != ((TRAP_INTR_MIN << TT_SHL) & TT_IS_INTR_MASK)
+#error "Bad *_INTR_* symbol definition (1)"
+#endif
+
+#if TT_IS_INTR_VALUE != ((TRAP_INTR_MAX << TT_SHL) & TT_IS_INTR_MASK)
+#error "Bad *_INTR_* symbol definition (2)"
+#endif
+
+#if TT_IS_INTR_VALUE != (((TRAP_INTR_MIN+1) << TT_SHL) & TT_IS_INTR_MASK)
+#error "Bad *_INTR_* symbol definition (3)"
+#endif
+
+#if TT_IS_INTR_VALUE != (((TRAP_INTR_MAX-1) << TT_SHL) & TT_IS_INTR_MASK)
+#error "Bad *_INTR_* symbol definition (4)"
+#endif
+
+
+
+//#define SCHED_LOCK_MANGLED_NAME _18Cyg_Scheduler_Base.sched_lock
+#define SCHED_LOCK_MANGLED_NAME cyg_scheduler_sched_lock
+
+
+#ifdef CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH
+#define SAVE_REGS_SIZE (4 * (32+2)) // 32 words of 4 bytes each + fpu ctx + align
+#define SAVE_FPUSTATE_SIZE (4 * (32+2)) // 32 fregs + fsr + _dummy
+#elif defined(CYGHWR_HAL_SPARC_FPU)
+#define SAVE_REGS_SIZE (4 * (32+32+2)) // 32 words of 4 bytes each + 32 FP + FSR + align
+#else
+#define SAVE_REGS_SIZE (4 * 32) // 32 words of 4 bytes each
+#endif
+
+
+#define SYS_exit 1
+#define SYS_irqdis 2
+#define SYS_irqen 3
+
+#endif // CYGONCE_HAL_VECTORS_H
+// EOF vectors.h
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/src/callcons.S b/cesar/ecos/packages/hal/sparc/arch/current/src/callcons.S
new file mode 100644
index 0000000000..1822109c76
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/src/callcons.S
@@ -0,0 +1,99 @@
+/*===========================================================================
+//
+// callcons.S
+//
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt,
+// Gaisler Research (Konrad Eisele<eiselekd@web.de>) (fpu support)
+// Date: 1999-02-20
+// Purpose:
+// Description: callcons.S
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+! special treatment for CYGHWR_HAL_SPARC_FLAT case, otherwise hal_zero_bss will clear return address
+
+ .section ".data"
+ .balign 4
+save_i7: !avoid .bss (clear)
+ .long 0x100000
+save_o7: !avoid .bss (clear)
+ .long 0x100000
+
+ .text
+ .global cyg_hal_start
+ .extern hal_board_prestart
+ .extern hal_zero_bss
+ .extern cyg_hal_invoke_constructors
+ .extern hal_board_poststart
+ .extern hal_copy_data
+
+cyg_hal_start:
+ add %sp, -112, %sp
+ set save_i7,%g1
+ st %i7,[%g1]
+ set save_o7,%g1
+ st %o7,[%g1]
+
+ call hal_board_prestart
+ nop
+#ifdef CYG_HAL_STARTUP_ROM
+ ! Copy data from ROM to RAM
+ call hal_copy_data
+ nop
+#endif
+ call hal_zero_bss
+ nop
+ call cyg_hal_invoke_constructors
+ nop
+ call hal_board_poststart
+ nop
+
+ set save_i7,%g1
+ ld [%g1],%i7
+ set save_o7,%g1
+ ld [%g1],%o7
+ retl
+ add %sp, 0x70, %sp
+
+
+// EOF callcons.S
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/src/context.S b/cesar/ecos/packages/hal/sparc/arch/current/src/context.S
new file mode 100644
index 0000000000..89e7805a3c
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/src/context.S
@@ -0,0 +1,479 @@
+/*=============================================================================
+//
+// context.S
+//
+// SPARC context switch code
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg, gthomas, hmt
+// Contributors: nickg, gthomas, hmt
+// Date: 1998-12-15
+// Purpose: SPARC context switch code
+// Description: This file contains implementations of the thread context
+// switch routines. It also contains the longjmp() and setjmp()
+// routines.
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================*/
+
+#include <pkgconf/hal.h>
+
+#include <cyg/hal/vectors.h>
+
+#include <cyg/hal/arch.inc>
+
+#define DELAYS_AFTER_WRPSR_SAME_WINDOW
+#define DELAYS_AFTER_WRWIM
+
+ .extern cyg_hal_fpustate_owner
+ .extern cyg_hal_fpustate_current
+
+ .text
+
+! ------------------------------------------------------------------------------
+! hal_thread_switch_context
+! Switch thread contexts
+! %o0 = address of sp of next thread to execute
+! %o1 = address of sp save location of current thread
+
+ .global hal_thread_switch_context
+hal_thread_switch_context:
+
+ ! First take the stack down to make room for the saved register
+ ! state, including a window save area at the base. Leave the
+ ! current window save area undisturbed. It is unused within the
+ ! save but will become current again when we continue in this
+ ! context. This lets us do this whole piece of work without
+ ! diabling interrupts for too long, since, for example, we can
+ ! lower the stack atomically with one instruction:
+
+ sub %sp, SAVE_REGS_SIZE, %sp
+
+ st %sp, [ %o1 ] ! return SP for this thread
+ std %l0, [%sp + 0 * 4] ! save L & I registers
+ std %l2, [%sp + 2 * 4]
+ std %l4, [%sp + 4 * 4]
+ std %l6, [%sp + 6 * 4]
+
+ std %i0, [%sp + 8 * 4]
+ std %i2, [%sp + 10 * 4]
+ std %i4, [%sp + 12 * 4]
+ std %i6, [%sp + 14 * 4]
+
+#ifdef CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
+ st %o7, [%sp + 31 * 4] ! save only the return address
+ ! and no need to preserve %o0 even though it is restored
+#else // save a maximal context
+ st %g1, [%sp + 17 * 4] ! save G & O registers
+ std %g2, [%sp + 18 * 4]
+ std %g4, [%sp + 20 * 4]
+ std %g6, [%sp + 22 * 4]
+
+ std %o0, [%sp + 24 * 4]
+ std %o2, [%sp + 26 * 4]
+ std %o4, [%sp + 28 * 4]
+ std %o6, [%sp + 30 * 4]
+#endif // !CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
+ ! and save the CWP in %g0 save place
+ rd %psr, %g7
+
+#ifdef CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH
+ set 0x1000,%g6
+ andn %g7,%g6,%g7 !disable floating point
+#endif
+ st %g7, [%sp + 16 * 4]
+
+ ! push current fpu ctx
+#ifdef CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH
+ set cyg_hal_fpustate_current,%g6 ! current state table
+ ld [%g6],%g6
+ st %g6,[%sp + 32 * 4]
+#elif defined(CYGHWR_HAL_SPARC_FPU)
+ std %f0, [%sp + 32 * 4]
+ std %f2, [%sp + 34 * 4]
+ std %f4, [%sp + 36 * 4]
+ std %f6, [%sp + 38 * 4]
+ std %f8, [%sp + 40 * 4]
+ std %f10, [%sp + 42 * 4]
+ std %f12, [%sp + 44 * 4]
+ std %f14, [%sp + 46 * 4]
+ std %f16, [%sp + 48 * 4]
+ std %f18, [%sp + 50 * 4]
+ std %f20, [%sp + 52 * 4]
+ std %f22, [%sp + 54 * 4]
+ std %f24, [%sp + 56 * 4]
+ std %f26, [%sp + 58 * 4]
+ std %f28, [%sp + 60 * 4]
+ std %f30, [%sp + 62 * 4]
+ st %fsr, [%sp + 64 * 4]
+#endif
+
+ ! Now load the destination thread by dropping through
+ ! to hal_thread_load_context
+
+! ------------------------------------------------------------------------------
+! hal_thread_load_context
+! Load thread context
+! %o0 = address of sp of next thread to execute
+! Note that this function is also the second half of hal_thread_switch_context
+! and is simply dropped into from it.
+
+ .global hal_thread_load_context
+hal_thread_load_context:
+
+ ! Here, we are a leaf routine but with slightly odd properties.
+ ! The stack is still the callers at this point but the register
+ ! set is up for grabs. So we can use globals:
+
+ !mov %o0,%l0
+ !
+ !mov %1, %o0
+ !ta 0
+ !mov %o0,%g6
+ !ld [ %l0 ], %g7 ! Get the next saved SP
+
+ ld [ %o0 ], %g7 ! Get the next saved SP
+
+ ! DISABLE INTERRUPTS *ONLY* NOT TRAPS
+ rd %psr, %g6
+ or %g6, 0xfe0, %g5 ! PIL up to 15 leave traps enabled
+ wr %g5, %psr
+ nop; nop; nop
+
+ ! force out all our callers register sets onto the stack
+ ! if necessary: the system will handily take care of this for
+ ! us as follows:
+ ! need all these to preserve
+ ! the linked list property...
+#if !defined(CYGHWR_HAL_SPARC_FLAT)
+ .rept __WINSIZE-2
+ save %sp, -16 * 4, %sp
+ .endr
+#endif
+
+ ! Fewer saves if fewer register windows. For 8 register windows,
+ ! six of these is correct; a seventh would force out the current
+ ! set that was already saved manually above. Note that minimal
+ ! space is allowed on stack for locals and ins in case this
+ ! sequence itself gets interrupted and recurses too deep.
+
+ ! now select the new window with traps disabled...
+
+ ! get the new PSR and CWP that we will ultimately restore
+ ! from the %g0 save place...
+ ld [%g7 + 16 * 4], %g6 ! %g7 holds the new stack pointer
+ andn %g6, 0x20, %g5 ! clear ET into %g5
+#if (!defined(CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH)) && defined(CYGHWR_HAL_SPARC_FPU)
+ set 0x01000, %g4
+ or %g5, %g4, %g5
+#endif
+ and %g6, __WINBITS, %g4 ! CWP bits only in %g4
+
+ ! calculate a new WIM...
+ add %g4, 1, %g3 ! required invalid window number
+#if CYGPKG_HAL_SPARC_REGISTER_WINDOWS_POW2
+ and %g3, __WINBITS, %g3 ! modulo rw pow2
+#else // except for rw != pow2
+ cmp %g3, __WINSIZE
+ bge,a 567f ! taken: do delay slot, handle overflow
+ mov 0, %g3 ! only if .ge. above
+567:
+#endif
+ mov 1, %g2
+ sll %g2, %g3, %g2 ! converted to a mask for the WIM
+
+ ! DISABLE INTERRUPTS (TRAPS)
+ wr %g5, %psr ! set CWP to new window, disable traps
+#if (__WINSIZE == 2) && defined(CYGHWR_HAL_SPARC_FLAT)
+ wr %g0, %wim
+#else
+ wr %g2, %wim ! and WIM to new value
+#endif
+ nop
+ nop
+ nop
+
+ ! Must do this atomically so that the registers match the stack.
+ ! After locals and ins are loaded, we are conformant to the PCS
+ ! so can re-enable interrupts.
+ mov %g7, %sp ! target sp in situ (%sp = %o6)
+
+ ldd [%sp + 0 * 4], %l0 ! restore L & I registers
+ ldd [%sp + 2 * 4], %l2
+ ldd [%sp + 4 * 4], %l4
+ ldd [%sp + 6 * 4], %l6
+
+ ldd [%sp + 8 * 4], %i0
+ ldd [%sp + 10 * 4], %i2
+ ldd [%sp + 12 * 4], %i4
+ ldd [%sp + 14 * 4], %i6
+
+ ! set new current fpu ctx
+#ifdef CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH
+ ld [%sp + 32 * 4],%g1
+ set cyg_hal_fpustate_current,%g2 ! current state table
+ st %g1,[%g2]
+#elif defined(CYGHWR_HAL_SPARC_FPU)
+ ldd [%sp + 32 * 4], %f0
+ ldd [%sp + 34 * 4], %f2
+ ldd [%sp + 36 * 4], %f4
+ ldd [%sp + 38 * 4], %f6
+ ldd [%sp + 40 * 4], %f8
+ ldd [%sp + 42 * 4], %f10
+ ldd [%sp + 44 * 4], %f12
+ ldd [%sp + 46 * 4], %f14
+ ldd [%sp + 48 * 4], %f16
+ ldd [%sp + 50 * 4], %f18
+ ldd [%sp + 52 * 4], %f20
+ ldd [%sp + 54 * 4], %f22
+ ldd [%sp + 56 * 4], %f24
+ ldd [%sp + 58 * 4], %f26
+ ldd [%sp + 60 * 4], %f28
+ ldd [%sp + 62 * 4], %f30
+ ld [%sp + 64 * 4], %fsr
+#endif
+
+
+ ! RESTORE INTERRUPTS to saved state
+ wr %g6, %psr ! set new CWP and old ET and PIL
+ nop
+ nop
+ nop
+
+ ! now load the rest of the context; we can be interrupted here
+ ! (if the saved context was a voluntary yield or threadstart)
+ ! but that is OK, other state will be preserved in that case...
+
+#ifdef CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
+ ld [%sp + 24 * 4], %o0 ! must load the initial argument
+#else // restore a maximal context
+ ld [%sp + 17 * 4], %g1
+ ldd [%sp + 18 * 4], %g2
+ ldd [%sp + 20 * 4], %g4
+ ldd [%sp + 22 * 4], %g6
+
+ ldd [%sp + 24 * 4], %o0
+ ldd [%sp + 26 * 4], %o2
+ ldd [%sp + 28 * 4], %o4
+#endif // !CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
+ ! %o6 = %sp, already set up
+ ld [%sp + 31 * 4], %o7 ! "return" address
+
+ retl
+ add %sp, SAVE_REGS_SIZE, %sp ! and set the stack back
+ ! to its entrant value
+
+
+! ------------------------------------------------------------------------------
+! HAL longjmp, setjmp implementations
+
+!FUNC_START(hal_setjmp)
+ .global hal_setjmp
+hal_setjmp:
+ ! Treat this as a leaf routine, may as well.
+ ! %o0 is the address of the buffer.
+
+ std %l0, [%o0 + 0 * 4] ! save L & I registers
+ std %l2, [%o0 + 2 * 4]
+ std %l4, [%o0 + 4 * 4]
+ std %l6, [%o0 + 6 * 4]
+
+ std %i0, [%o0 + 8 * 4]
+ std %i2, [%o0 + 10 * 4]
+ std %i4, [%o0 + 12 * 4]
+ std %i6, [%o0 + 14 * 4]
+
+#ifdef CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
+ std %o6, [%o0 + 30 * 4] ! just save %sp and return address
+#else // save a maximal context
+ st %g1, [%o0 + 17 * 4] ! save G & O registers
+ std %g2, [%o0 + 18 * 4]
+ std %g4, [%o0 + 20 * 4]
+ std %g6, [%o0 + 22 * 4]
+
+ std %o0, [%o0 + 24 * 4]
+ std %o2, [%o0 + 26 * 4]
+ std %o4, [%o0 + 28 * 4]
+ std %o6, [%o0 + 30 * 4]
+#endif // !CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
+
+ ! and save the CWP in %g0 save place
+ rd %psr, %g7
+ st %g7, [%o0 + 16 * 4]
+
+ ! DISABLE INTERRUPTS *ONLY* NOT TRAPS
+ or %g7, 0xfe0, %g6 ! PIL up to 15 leave traps enabled
+ wr %g6, %psr
+ nop; nop; nop
+
+ ! force out all our callers register sets onto the stack
+ ! if necessary: the system will handily take care of this for
+ ! us as follows:
+#if !defined(CYGHWR_HAL_SPARC_FLAT)
+ .rept __WINSIZE-2
+ save %sp, -16 * 4, %sp
+ .endr
+#endif
+
+ ! Fewer saves if fewer register windows. For 8 register windows,
+ ! six of these is correct; a seventh would force out the current
+ ! set that was already saved manually above. Note that minimal
+ ! space is allowed on stack for locals and ins in case this
+ ! sequence itself gets interrupted and recurses too deep.
+
+ ! (after all, we are about to call deeper not shallower, otherwise
+ ! using setjmp is inappropriate)
+
+ ! ENABLE INTERRUPTS
+ wr %g7, %psr ! set CWP back to as-was
+ nop
+ nop
+ nop
+
+#ifndef CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
+ ldd [%o0 + 22 * 4], %g6 ! preserve %g7 and %g6
+#endif
+
+ retl ! ret and return zero to indicate
+ mov 0, %o0 ! not longjumped-to
+
+! hal_longjmp loads state from arg0 and returns arg1
+!FUNC_START(hal_longjmp)
+ .global hal_longjmp
+hal_longjmp:
+ ! This is kind of a leaf routine, it returns elsewhere
+ ! %o0 is the address of the buffer.
+ ! %o1 is the value to return in %o0 (since we are a leaf)
+
+ mov %o0, %g7 ! keep the pointer handy
+ mov %o1, %g1 ! and the return value
+ ! now select the new window with traps disabled...
+ rd %psr, %g6
+ ! preserve ET, clear CWP
+ andn %g6, __WINBITS_MAXIMAL, %g6
+ andn %g6, 0x20, %g5 ! clear ET also into %g5
+
+ ! get new CWP from %g0 save place...
+ ld [%g7 + 16 * 4], %g4 ! %g7 holds the new stack pointer
+ and %g4, __WINBITS, %g4 ! preserve CWP bits
+
+ ! calculate a new WIM...
+ add %g4, 1, %g3 ! required invalid window number
+#if CYGPKG_HAL_SPARC_REGISTER_WINDOWS_POW2
+ and %g3, __WINBITS, %g3 ! modulo rw pow2
+#else // except for rw != pow2
+ cmp %g3, __WINSIZE
+ bge,a 567f ! taken: do delay slot, handle overflow
+ mov 0, %g3 ! only if .ge. above
+567:
+#endif
+ mov 1, %g2
+ sll %g2, %g3, %g2 ! converted to a mask for the WIM
+
+ ! DISABLE INTERRUPTS
+ wr %g5, %g4, %psr ! set CWP to new window, disable traps
+#if (__WINSIZE == 2) && defined(CYGHWR_HAL_SPARC_FLAT)
+ wr %g0, %wim
+#else
+ wr %g2, %wim ! and WIM to new value
+#endif
+ nop
+ nop
+ nop
+
+ ! Must do this atomically so that the registers match the stack.
+ ! After locals and ins are loaded, we are conformant to the PCS
+ ! so can re-enable interrupts.
+
+ ldd [%g7 + 0 * 4], %l0 ! restore L & I registers
+ ldd [%g7 + 2 * 4], %l2
+ ldd [%g7 + 4 * 4], %l4
+ ldd [%g7 + 6 * 4], %l6
+
+ ldd [%g7 + 8 * 4], %i0
+ ldd [%g7 + 10 * 4], %i2
+ ldd [%g7 + 12 * 4], %i4
+ ldd [%g7 + 14 * 4], %i6
+
+ ld [%g7 + 30 * 4], %sp ! %o6 = %sp, set up now so as to conform
+ ! to PCS and so be interruptible
+ ! ENABLE INTERRUPTS
+ wr %g6, %g4, %psr ! set new CWP and old ET
+ nop
+ nop
+ nop
+
+ ! now load the rest of the context; we can be interrupted here, but
+ ! that is OK, other state will be preserved in that case...
+#ifdef CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
+ ! we are not preserving globals...
+ ! %o6 = %sp, already set up
+ ld [%g7 + 31 * 4], %o7 ! "return" address
+ retl ! %g1 still holds the return value
+ mov %g1, %o0
+
+#else // load a maximal context
+ mov %g7, %o0 ! original pointer was in %o0 anyway
+
+ ldd [%o0 + 18 * 4], %g2
+ ldd [%o0 + 20 * 4], %g4
+ ldd [%o0 + 22 * 4], %g6
+
+ ld [%o0 + 25 * 4], %o1 ! %o0 = original pointer
+ ldd [%o0 + 26 * 4], %o2
+ ldd [%o0 + 28 * 4], %o4
+ ! %o6 = %sp, already set up
+ ld [%o0 + 31 * 4], %o7 ! "return" address
+
+ ! %g1 still holds the return value; want to get this into %o0
+ ! and restore %g1 from the saved state; %o0 is the state pointer:
+ ! g1 = R, o0 = P
+ xor %o0, %g1, %g1 ! g1 = R^P, o0 = P
+ xor %o0, %g1, %o0 ! g1 = R^P, o0 = R
+ xor %o0, %g1, %g1 ! g1 = P, o0 = R all done
+
+ retl
+ ld [%g1 + 17 * 4], %g1 ! and finally restore %g1
+#endif // !CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
+
+! ------------------------------------------------------------------------------
+! end of context.S
+
+
+
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/src/hal_boot.c b/cesar/ecos/packages/hal/sparc/arch/current/src/hal_boot.c
new file mode 100644
index 0000000000..384e94dce5
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/src/hal_boot.c
@@ -0,0 +1,166 @@
+//==========================================================================
+//
+// hal_boot.c
+//
+// SPARC Architecture specific interrupt dispatch tables
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1998-12-10
+// Purpose: Interrupt handler tables for SPARC.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <cyg/infra/cyg_type.h>
+
+/*------------------------------------------------------------------------*/
+/* calling this is our raison d'etre: */
+extern void cyg_start( void );
+
+/*------------------------------------------------------------------------*/
+/* data copy and bss zero functions */
+
+typedef void (CYG_ROM_ADDRESS)(void);
+
+#ifdef CYG_HAL_STARTUP_ROM
+void hal_copy_data(void)
+{
+ extern char __ram_data_start;
+ extern char __ram_data_end;
+ extern CYG_ROM_ADDRESS __rom_data_start;
+ long *p = (long *)&__ram_data_start;
+ long *q = (long *)&__rom_data_start;
+
+ while( p <= (long *)&__ram_data_end )
+ *p++ = *q++;
+}
+#endif
+
+//note: when compiling with -mflat (CYGHWR_HAL_SPARC_FLAT) this routine
+//has to be a leaf routine, otherwise it will clear it's own stack.
+void hal_zero_bss(void)
+{
+ extern CYG_ROM_ADDRESS __bss_start;
+ extern CYG_ROM_ADDRESS __bss_end;
+
+ register long long zero = 0;
+ register long long *end = (long long *)&__bss_end;
+ register long long *p = (long long *)&__bss_start;
+
+ while( p <= end )
+ *p++ = zero;
+}
+
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+cyg_bool cyg_hal_stop_constructors;
+#endif
+
+void
+cyg_hal_invoke_constructors (void)
+{
+ typedef void (*pfunc) (void);
+ extern pfunc __CTOR_LIST__[];
+ extern pfunc __CTOR_END__[];
+
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ static pfunc *p = &__CTOR_END__[-1];
+
+ cyg_hal_stop_constructors = 0;
+ for (; p >= __CTOR_LIST__; p--) {
+ (*p) ();
+ if (cyg_hal_stop_constructors) {
+ p--;
+ break;
+ }
+ }
+#else
+ pfunc *p;
+
+ for (p = &__CTOR_END__[-1]; p >= __CTOR_LIST__; p--)
+ (*p) ();
+#endif
+}
+
+// Override any __gccmain the compiler might generate. We don't want
+// constructors to be called twice.
+void __gccmain(void) {}
+
+/*------------------------------------------------------------------------*/
+/* CYG_HAL_START - pre-main-entrypoint */
+
+#ifdef CYGPKG_HAL_SPARCLITE_SLEB
+#define SLEB_LED (*(volatile char *)(0x02000003))
+#define LED( _x_ ) SLEB_LED = (char)(0xff & ~(_x_))
+#else
+#define LED( _x_ ) CYG_EMPTY_STATEMENT
+#endif
+
+extern void hal_board_prestart( void );
+extern void hal_board_poststart( void );
+
+// This is called with traps enabled, but interrupts masked out:
+// Be sure to enable them in hal_board_poststart() at the latest.
+
+/*
+void cyg_hal_start( void )
+{
+ // Board specific prestart that's best done in C
+ hal_board_prestart();
+
+#ifdef CYG_HAL_STARTUP_ROM
+ // Copy data from ROM to RAM
+ hal_copy_data();
+#endif
+
+ // Zero BSS
+ hal_zero_bss();
+
+ // Call constructors
+ cyg_hal_invoke_constructors();
+
+ // Board specific late startup that's best done in C
+ hal_board_poststart();
+
+}*/
+
+
+// EOF hal_boot.c
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/src/hal_intr.c b/cesar/ecos/packages/hal/sparc/arch/current/src/hal_intr.c
new file mode 100644
index 0000000000..8988347971
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/src/hal_intr.c
@@ -0,0 +1,209 @@
+//==========================================================================
+//
+// hal_intr.c
+//
+// SPARC Architecture specific interrupt dispatch tables
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1999-02-20
+// Purpose: Interrupt handler tables for SPARC.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_arch.h>
+
+#include <cyg/infra/cyg_ass.h> // for CYG_FAIL() below
+
+// ------------------------------------------------------------------------
+// First level C default interrupt handler.
+
+//static int count = 0;
+
+cyg_uint32 hal_default_isr(CYG_ADDRWORD vector, CYG_ADDRWORD data)
+{
+ return 0; // 0x1def0000 + vector + (count += 0x0100);
+}
+
+// ------------------------------------------------------------------------
+// First level C exception handler.
+
+externC void __handle_exception (void);
+
+externC HAL_SavedRegisters *_hal_registers;
+
+void cyg_hal_exception_handler(CYG_ADDRWORD vector, CYG_ADDRWORD data,
+ CYG_ADDRWORD stackpointer )
+{
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+ // Set the pointer to the registers of the current exception
+ // context. At entry the GDB stub will expand the
+ // HAL_SavedRegisters structure into a (bigger) register array.
+ _hal_registers = (HAL_SavedRegisters *)stackpointer;
+
+ __handle_exception();
+
+#elif defined(CYGFUN_HAL_COMMON_KERNEL_SUPPORT) && \
+ defined(CYGPKG_HAL_EXCEPTIONS)
+ // We should decode the vector and pass a more appropriate
+ // value as the second argument. For now we simply pass a
+ // pointer to the saved registers. We should also divert
+ // breakpoint and other debug vectors into the debug stubs.
+
+ cyg_hal_deliver_exception( vector, stackpointer );
+
+#else
+ CYG_FAIL("Exception!!!");
+#endif
+ return;
+}
+
+// ISR tables
+volatile
+CYG_ADDRESS hal_interrupt_handlers[CYGNUM_HAL_VSR_COUNT] = {
+ (CYG_ADDRESS)hal_default_isr,
+ (CYG_ADDRESS)hal_default_isr,
+ (CYG_ADDRESS)hal_default_isr,
+ (CYG_ADDRESS)hal_default_isr,
+
+ (CYG_ADDRESS)hal_default_isr,
+ (CYG_ADDRESS)hal_default_isr,
+ (CYG_ADDRESS)hal_default_isr,
+ (CYG_ADDRESS)hal_default_isr,
+
+ (CYG_ADDRESS)hal_default_isr,
+ (CYG_ADDRESS)hal_default_isr,
+ (CYG_ADDRESS)hal_default_isr,
+ (CYG_ADDRESS)hal_default_isr,
+
+ (CYG_ADDRESS)hal_default_isr,
+ (CYG_ADDRESS)hal_default_isr,
+ (CYG_ADDRESS)hal_default_isr,
+ (CYG_ADDRESS)hal_default_isr, /* 16 of these */
+
+ (CYG_ADDRESS)cyg_hal_exception_handler,
+ (CYG_ADDRESS)cyg_hal_exception_handler,
+ (CYG_ADDRESS)cyg_hal_exception_handler,
+ (CYG_ADDRESS)cyg_hal_exception_handler,
+ (CYG_ADDRESS)cyg_hal_exception_handler,
+
+ (CYG_ADDRESS)cyg_hal_exception_handler,
+ (CYG_ADDRESS)cyg_hal_exception_handler,
+ (CYG_ADDRESS)cyg_hal_exception_handler,
+ (CYG_ADDRESS)cyg_hal_exception_handler,
+ (CYG_ADDRESS)cyg_hal_exception_handler,
+
+ (CYG_ADDRESS)cyg_hal_exception_handler, /* 11 of these */
+};
+
+volatile
+CYG_ADDRWORD hal_interrupt_data[CYGNUM_HAL_VSR_COUNT] = {
+ 0x11da1a00, 0x11da1a01, 0x11da1a02, 0x11da1a03,
+ 0x11da1a04, 0x11da1a05, 0x11da1a06, 0x11da1a07,
+ 0x11da1a08, 0x11da1a09, 0x11da1a0a, 0x11da1a0b,
+ 0x11da1a0c, 0x11da1a0d, 0x11da1a0e, 0x11da1a0f,
+ 0xeeda1a00, 0xeeda1a01, 0xeeda1a02, 0xeeda1a03, 0xeeda1a04,
+ 0xeeda1a05, 0xeeda1a06, 0xeeda1a07, 0xeeda1a08, 0xeeda1a09,
+ 0xeeda1a0A
+};
+
+volatile
+CYG_ADDRESS hal_interrupt_objects[CYGNUM_HAL_VSR_COUNT] = {
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,
+ 0,
+};
+
+
+
+/*------------------------------------------------------------------------*/
+/* Delay for some number of useconds. */
+void
+hal_delay_us(int us)
+{
+ cyg_uint32 val1, val2;
+ int diff;
+ long usticks;
+ long ticks;
+
+ // Calculate the number of counter register ticks per microsecond.
+
+ usticks = (CYGNUM_HAL_RTC_PERIOD * CYGNUM_HAL_RTC_DENOMINATOR) / 1000000;
+
+ // Make sure that the value is not zero. This will only happen if the
+ // CPU is running at < 2MHz.
+ if( usticks == 0 ) usticks = 1;
+
+ while( us > 0 )
+ {
+ int us1 = us;
+
+ // Wait in bursts of less than 10000us to avoid any overflow
+ // problems in the multiply.
+ if( us1 > 10000 )
+ us1 = 10000;
+
+ us -= us1;
+
+ ticks = us1 * usticks;
+
+ HAL_CLOCK_READ(&val1);
+ while (ticks > 0) {
+ do {
+ HAL_CLOCK_READ(&val2);
+ } while (val1 == val2);
+ diff = val2 - val1;
+ if (diff < 0) diff += CYGNUM_HAL_RTC_PERIOD;
+ ticks -= diff;
+ val1 = val2;
+ }
+ }
+}
+
+
+// EOF hal_intr.c
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/src/icontext.c b/cesar/ecos/packages/hal/sparc/arch/current/src/icontext.c
new file mode 100644
index 0000000000..443eb53fc9
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/src/icontext.c
@@ -0,0 +1,524 @@
+/*=============================================================================
+//
+// icontext.c
+//
+// SPARC HAL context init function
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Gaisler Research (Konrad Eisele<eiselekd@web.de>) (fpu support)
+// Date: 1998-12-14
+// Purpose: HAL context initialization function
+// Description: Initialize a HAL context for SPARC; this is in C and out
+// of line because there is too much of it for a simple macro.
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================*/
+
+#include <pkgconf/hal.h>
+
+#include <cyg/hal/hal_arch.h> // HAL header
+
+#include <cyg/infra/cyg_type.h>
+
+#include <cyg/hal/vectors.h> // SAVE_REGS_SIZE, __WINSIZE, ...
+
+/*---------------------------------------------------------------------------*/
+
+/* We lay out the stack in the manner that the PCS demands:
+ * fpucontext -----> Allocate fpu spilling region
+ * frame pointer -----> [top of stack]
+ * Argument spill area (6 words)
+ * Return Arg pointer
+ * Initial saved register window (i[8], l[8])
+ * for use by program when it starts
+ * [rest of] saved register object (various)
+ * stack pointer -----> saved register window (i[8], l[8])
+ * to allow us to be interrupted.
+ *
+ * ie. frame pointer ->
+ * struct HAL_FrameStructure
+ * stack pointer -> struct HAL_SavedRegisters
+ *
+ * and when the context "resumes" sp is incremented by 40 * 4, the size of
+ * a _struct HAL_SavedRegisters_ which points it at the extant but unused
+ * _struct HAL_FrameStructure_ as the PCS requires. The frame pointer is
+ * left pointing off the top of stack.
+ *
+ *
+ * Thus the stack is the same if created from an already executing context:
+ *
+ * frame pointer ----->
+ * [temporaries and locals]
+ * [more arguments]
+ * Argument spill area (6 words)
+ * Return Arg pointer
+ * [sp at entry]------> Previous saved register window (i[8], l[8])
+ * for use by program when it starts
+ * [rest of] saved register object (various)
+ * stack pointer -----> saved register window (i[8], l[8])
+ * to allow us to be interrupted.
+ */
+
+CYG_ADDRESS
+hal_thread_init_context( CYG_WORD sparg,
+ CYG_WORD thread,
+ CYG_WORD entry,
+ CYG_WORD id )
+{
+ register CYG_WORD fp = 0;
+ register CYG_WORD sp = 0;
+ register HAL_SavedRegisters *regs;
+ register HAL_FrameStructure *frame;
+#ifdef CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH
+ register HAL_FPU_Context *fpucontext = (HAL_FPU_Context *)((sparg) & ~15); // round down to double alignment
+#endif
+
+ int i;
+
+ if ( 0 == (id & 0xffff0000) )
+ id <<= 16;
+
+#ifdef CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH
+ fpucontext = (HAL_FPU_Context *) // allocate fpu spilling region
+ (((CYG_WORD)fpucontext) - sizeof(HAL_FPU_Context));
+ fp = (CYG_WORD)fpucontext;
+#else
+ fp = sparg & ~15;
+#endif
+
+ frame = (HAL_FrameStructure *)(
+ fp - sizeof( HAL_FrameStructure ) );
+
+ regs = (HAL_SavedRegisters *)(
+ ((CYG_WORD)frame) - sizeof(HAL_SavedRegisters) );
+#ifdef CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH
+ regs ->fpucontext = fpucontext;
+#endif
+
+ sp = (CYG_WORD)regs;
+
+ for ( i = 0; i < 6; i++ ) {
+ frame->spill_args[i] = id | 0xa0 | i;
+ }
+ frame->composite_return_ptr = 0;
+
+ for ( i = 0; i < 8; i++ ) {
+ frame->li.i[i] = id | ( 56 + i );
+ frame->li.l[i] = id | ( 48 + i );
+ regs ->li.i[i] = id | ( 24 + i );
+ regs ->li.l[i] = id | ( 16 + i );
+ regs ->o[i] = id | ( 8 + i );
+ regs ->g[i] = id | ( i );
+ }
+
+
+ // first terminate the linked list on the stack in the initial
+ // (already saved) register window:
+ frame->li.i[6] = regs->li.i[6] = (cyg_uint32)fp; // frame pointer
+ frame->li.i[7] = regs->li.i[7] = (cyg_uint32)0; // no ret addr here
+
+ // and set up other saved regs as if called from just before
+ // the entry point:
+ regs->o[7] = (entry - 8);
+ regs->o[6] = sp;
+
+ // this is the argument that the entry point is called with
+ regs->o[0] = thread;
+
+ // this is the initial CWP and interrupt state; CWP is quite arbitrary
+ // really, the WIM is set up accordingly in hal_thread_load_context().
+
+#if defined(CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH) || (!defined(CYGHWR_HAL_SPARC_FPU))
+ regs->g[0] = 0x0e0 + __WIN_INIT; // PIL zero, ET, S, PS and CWP set.
+#else
+ regs->g[0] = 0x010e0 + __WIN_INIT; // PIL zero, ET, S, PS, EF and CWP set.
+#endif
+
+#if defined(CYGHWR_HAL_SPARC_FPU) && (!defined(CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH))
+ for (i = 0; i < 32; i++) {regs->f[i] = 0;}
+ regs->fsr = 0;
+ regs->fdummy = 0;
+#endif
+
+ return (CYG_ADDRESS)sp;
+}
+
+// ---------------------------------------------------------------------------
+
+//#define THREAD_DEBUG_SERIAL_VERBOSE
+
+#ifdef THREAD_DEBUG_SERIAL_VERBOSE // NOT INCLUDED
+
+// This is unpleasant to try to debug, because these routines are called
+// WHEN THE PROGRAM IS NOT RUNNING from the CygMon's GDB stubs - so you
+// can't use any normal output: these little routines use the serial
+// line directly, so are best used when debugging via Ethernet, so you
+// just have a separate output stream to read. Nasty...
+
+#include <cyg/hal/hal_diag.h>
+
+#undef HAL_DIAG_WRITE_CHAR
+#define HAL_DIAG_WRITE_CHAR(_c_) CYG_MACRO_START \
+ SLEB_LED = (_c_); \
+ HAL_DIAG_WRITE_CHAR_DIRECT( _c_ ); \
+CYG_MACRO_END
+
+static void swritec( char c )
+{
+ HAL_DIAG_WRITE_CHAR( c );
+}
+
+static void swrites( char *s )
+{
+ char c;
+ while ( 0 != (c = *s++) )
+ HAL_DIAG_WRITE_CHAR( c );
+}
+
+static void swritex( cyg_uint32 x )
+{
+ int i;
+ swrites( "0x" );
+ for ( i = 28; i >= 0; i-= 4 ) {
+ char c = "0123456789abcdef"[ 0xf & (x >> i) ];
+ HAL_DIAG_WRITE_CHAR( c );
+ }
+}
+
+#define newline() swrites( "\n\r" )
+
+static void x8( char *s, unsigned long *xp )
+{
+ int i;
+ for ( i = 0; i < 8; i++ ) {
+ swrites( s );
+ swritec( '0' + i );
+ swrites( " = " );
+ swritex( xp[i] );
+ if ( 3 == (i & 3) )
+ newline();
+ else
+ swrites( " " );
+ }
+}
+
+#endif // THREAD_DEBUG_SERIAL_VERBOSE ... NOT INCLUDED
+
+// ---------------------------------------------------------------------------
+// Routines in icontext.c used here because they're quite large for
+// the SPARC (note param order); these are used in talking to GDB.
+
+enum regnames {G0 = 0, G1, G2, G3, G4, G5, G6, G7,
+ O0, O1, O2, O3, O4, O5, SP, O7,
+ L0, L1, L2, L3, L4, L5, L6, L7,
+ I0, I1, I2, I3, I4, I5, FP, I7,
+
+ F0, F1, F2, F3, F4, F5, F6, F7,
+ F8, F9, F10, F11, F12, F13, F14, F15,
+ F16, F17, F18, F19, F20, F21, F22, F23,
+ F24, F25, F26, F27, F28, F29, F30, F31,
+ Y, PSR, WIM, TBR, PC, NPC, FPSR, CPSR};
+
+typedef unsigned long target_register_t;
+
+void
+cyg_hal_sparc_get_gdb_regs( void *gdb_regset,
+ HAL_SavedRegisters *eCos_regset )
+{
+ target_register_t *gdb = (target_register_t *)gdb_regset;
+ int reg;
+ cyg_uint32 scratch = 0;
+ cyg_uint32 *sptrap;
+ HAL_SavedWindow *trapli, *ctxli;
+
+ if ( 0 == eCos_regset->g[0] ||
+ 0xc0 == (0xe0 & eCos_regset->g[0]) ) {
+ // Then it's an interrupt stack saved state:
+ // (either minimal, or a saved PSR with traps disabled)
+ // The saved register set is pretty minimal, so we have to grub
+ // around in the stack to find out some truth...
+ sptrap = (cyg_uint32 *)eCos_regset; // point to the IL save area for
+ sptrap -= 24; // the trap handler, for PC, NPC
+ trapli = (HAL_SavedWindow *)sptrap; // Get at those regs
+
+ ctxli = (HAL_SavedWindow *)(trapli->i[6]); // (the frame pointer)
+ // and get at the interruptee's regs
+
+ // Pick up interruptee's registers from all over the stack:
+ for ( reg = 0; reg < 8 ; reg++ ) {
+ gdb[ G0 + reg ] = eCos_regset->g[reg];
+ gdb[ O0 + reg ] = trapli->i[reg];
+ gdb[ L0 + reg ] = ctxli->l[reg];
+ gdb[ I0 + reg ] = ctxli->i[reg];
+ }
+
+ // Clear out G0 which is always 0 (but abused in eCos_regset)
+ // and the FP regs which we do not have:
+ gdb[ G0 ] = 0;
+ for ( reg = F0; reg <= F31; reg++ )
+ gdb[ reg ] = 0;
+
+ // In the save context _of the trap handler_ registers are as follows:
+ // %l0 = psr (with this CWP/window-level in it)
+ // %l1 = pc
+ // %l2 = npc
+ // %l3 = vector number (1-15 for interrupts)
+ // %l4 = Y register preserved
+ gdb[ Y ] = trapli->l[4];
+
+ scratch = trapli->l[0]; // the PSR in the trap handler
+#if CYGPKG_HAL_SPARC_REGISTER_WINDOWS_POW2
+ scratch++; // back to interupted thread's window
+ scratch &=~ 0x38; // clear ET and any __WINSIZE overflow
+ gdb[ PSR ] = scratch;
+ gdb[ WIM ] = 1 << ((__WINBITS & (1 + scratch)));
+#else // 6 or 7 windows only
+ reg = (int)(scratch & __WINBITS);
+ scratch &=~ (__WINBITS_MAXIMAL | 0x20); // clear ET and CWP
+ if ( __WINSIZE <= ++reg ) reg = 0; // back to intr'd window
+ gdb[ PSR ] = scratch | reg;
+ if ( __WINSIZE <= ++reg ) reg = 0; // good index for WIM
+ gdb[ WIM ] = 1 << reg;
+#endif // __WINSIZE
+
+ // Read _a_ TBR value and ignore the current trap details:
+ asm volatile ( "rd %%tbr, %0" : "=r"(scratch) : );
+ gdb[ TBR ] = (scratch &~ 0xfff);
+
+ gdb[ PC ] = trapli->l[1];
+ gdb[ NPC ] = trapli->l[2];
+
+ gdb[ FPSR ] = 0;
+ gdb[ CPSR ] = 0;
+
+#ifdef THREAD_DEBUG_SERIAL_VERBOSE
+ newline();
+ swrites( "-----------------------------------------------------" ); newline();
+ swrites( "-------------- INTERRUPT STACK GET ------------------" ); newline();
+ swrites( "eCos regset at " ); swritex( eCos_regset ); newline();
+ swrites( " trapli " ); swritex( trapli ); newline();
+ swrites( " ctxli " ); swritex( ctxli ); newline();
+ x8( "global ", &(gdb[G0]) );
+ x8( " in ", &(gdb[I0]) );
+ x8( " local ", &(gdb[L0]) );
+ x8( " out ", &(gdb[O0]) );
+ swrites( "gdb PC = " ); swritex( gdb[ PC ] ); newline();
+ swrites( "gdb NPC = " ); swritex( gdb[ NPC ] ); newline();
+ swrites( "gdb PSR = " ); swritex( gdb[ PSR ] ); newline();
+#endif
+
+ }
+ else {
+ // It's a synchronous context switch that led to this object.
+ // Pick up interruptee's registers from the saved context:
+ for ( reg = 0; reg < 8 ; reg++ ) {
+#ifdef CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
+ gdb[ G0 + reg ] = 0;
+ gdb[ O0 + reg ] = 0;
+#else
+ gdb[ G0 + reg ] = eCos_regset->g[reg];
+ gdb[ O0 + reg ] = eCos_regset->o[reg];
+#endif
+ gdb[ L0 + reg ] = eCos_regset->li.l[reg];
+ gdb[ I0 + reg ] = eCos_regset->li.i[reg];
+ }
+
+#ifdef CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
+ // Set up the stack pointer by arithmetic and the return address
+ gdb[ SP ] = ((cyg_uint32)(eCos_regset));
+ gdb[ O7 ] = eCos_regset->o[ 7 ];
+#else
+ // Clear out G0 which is always 0 (but abused in eCos_regset)
+ gdb[ G0 ] = 0;
+#endif
+ // and clear the FP regs which we do not have:
+ for ( reg = F0; reg <= F31; reg++ )
+ gdb[ reg ] = 0;
+
+ gdb[ Y ] = 0; // it's not preserved.
+
+ scratch = eCos_regset->g[ 0 ]; // the PSR in the saved context
+ gdb[ PSR ] = scratch; // return it verbatim.
+#if CYGPKG_HAL_SPARC_REGISTER_WINDOWS_POW2
+ gdb[ WIM ] = 1 << ((__WINBITS & (1 + scratch)));
+#else // 6 or 7 windows only
+ reg = (int)(scratch & __WINBITS);
+ if ( __WINSIZE <= ++reg ) reg = 0; // good index for WIM
+ gdb[ WIM ] = 1 << reg;
+#endif // __WINSIZE
+
+ // Read _a_ TBR value and ignore the current trap details:
+ asm volatile ( "rd %%tbr, %0" : "=r"(scratch) : );
+ gdb[ TBR ] = (scratch &~ 0xfff);
+
+ gdb[ PC ] = eCos_regset->o[ 7 ]; // the return address
+ gdb[ NPC ] = 4 + gdb[ PC ];
+
+ gdb[ FPSR ] = 0;
+ gdb[ CPSR ] = 0;
+
+#ifdef THREAD_DEBUG_SERIAL_VERBOSE
+ newline();
+ swrites( "-----------------------------------------------------" ); newline();
+ swrites( "-------------- SYNCHRONOUS SWITCH GET----------------" ); newline();
+ swrites( "eCos regset at " ); swritex( eCos_regset ); newline();
+ x8( "global ", &(gdb[G0]) );
+ x8( " in ", &(gdb[I0]) );
+ x8( " local ", &(gdb[L0]) );
+ x8( " out ", &(gdb[O0]) );
+ swrites( "gdb PC = " ); swritex( gdb[ PC ] ); newline();
+ swrites( "gdb NPC = " ); swritex( gdb[ NPC ] ); newline();
+ swrites( "gdb PSR = " ); swritex( gdb[ PSR ] ); newline();
+#endif
+ }
+
+}
+
+// ---------------------------------------------------------------------------
+
+void
+cyg_hal_sparc_set_gdb_regs( HAL_SavedRegisters *eCos_regset,
+ void *gdb_regset )
+{
+ target_register_t *gdb = (target_register_t *)gdb_regset;
+ int reg;
+ cyg_uint32 scratch = 0;
+ cyg_uint32 *sptrap;
+ HAL_SavedWindow *trapli, *ctxli;
+
+ // Guess where the eCos register set really is:
+ if ( 0 == eCos_regset->g[0] ||
+ 0xc0 == (0xe0 & eCos_regset->g[0]) ) {
+ // Then it's an interrupt stack saved state:
+ // (either minimal, or a saved PSR with traps disabled)
+ // The saved register set is pretty minimal, so we have to grub
+ // around in the stack to find out some truth...
+ sptrap = (cyg_uint32 *)eCos_regset; // point to the IL save area for
+ sptrap -= 24; // the trap handler, for PC, NPC
+ trapli = (HAL_SavedWindow *)sptrap; // Get at those regs
+
+ ctxli = (HAL_SavedWindow *)(trapli->i[6]); // (the frame pointer)
+ // and get at the interruptee's regs
+
+ scratch = eCos_regset->g[0];
+
+ // Put back interruptee's registers all over the stack:
+ for ( reg = 0; reg < 8 ; reg++ ) {
+ eCos_regset->g[reg] = gdb[ G0 + reg ] ;
+ trapli->i[reg] = gdb[ O0 + reg ] ;
+ ctxli->l[reg] = gdb[ L0 + reg ] ;
+ ctxli->i[reg] = gdb[ I0 + reg ] ;
+ }
+
+ // Put back the eCos G0 which is always 0 (but abused in eCos_regset)
+ eCos_regset->g[0] = scratch;
+
+ // In the save context _of the trap handler_ registers are as follows:
+ // %l0 = psr (with this CWP/window-level in it)
+ // %l1 = pc
+ // %l2 = npc
+ // %l3 = vector number (1-15 for interrupts)
+ // %l4 = Y register preserved
+ trapli->l[4] = gdb[ Y ];
+
+ // I am *not* interfering with the saved PSR, nor the TBR nor WIM.
+
+ // put back return PC and NPC
+ trapli->l[1] = gdb[ PC ] ;
+ trapli->l[2] = gdb[ NPC ];
+
+#ifdef THREAD_DEBUG_SERIAL_VERBOSE
+ newline();
+ swrites( "-----------------------------------------------------" ); newline();
+ swrites( "-------------- INTERRUPT STACK SET ------------------" ); newline();
+ swrites( "eCos regset at " ); swritex( eCos_regset ); newline();
+ swrites( " trapli " ); swritex( trapli ); newline();
+ swrites( " ctxli " ); swritex( ctxli ); newline();
+ x8( "global ", &(gdb[G0]) );
+ x8( " in ", &(gdb[I0]) );
+ x8( " local ", &(gdb[L0]) );
+ x8( " out ", &(gdb[O0]) );
+ swrites( "gdb PC = " ); swritex( gdb[ PC ] ); newline();
+ swrites( "gdb NPC = " ); swritex( gdb[ NPC ] ); newline();
+ swrites( "gdb PSR = " ); swritex( gdb[ PSR ] ); newline();
+#endif
+
+ }
+ else {
+ // It's a synchronous context switch that led to this object.
+ // Pick up interruptee's registers from the saved context:
+
+ scratch = eCos_regset->g[0];
+
+ for ( reg = 0; reg < 8 ; reg++ ) {
+ eCos_regset->g[reg] = gdb[ G0 + reg ];
+ eCos_regset->o[reg] = gdb[ O0 + reg ];
+ eCos_regset->li.l[reg] = gdb[ L0 + reg ];
+ eCos_regset->li.i[reg] = gdb[ I0 + reg ];
+ }
+
+ // Put back the eCos G0 which is always 0 (but abused in eCos_regset)
+ eCos_regset->g[0] = scratch;
+
+ // I am *not* interfering with the saved PSR, nor the TBR nor WIM.
+
+ // The PC is in o7, altering it via GDB's PC is not on.
+ // Setting the NPC in a voluntary context is meaningless.
+
+#ifdef THREAD_DEBUG_SERIAL_VERBOSE
+ newline();
+ swrites( "-----------------------------------------------------" ); newline();
+ swrites( "-------------- SYNCHRONOUS SWITCH SET ---------------" ); newline();
+ swrites( "eCos regset at " ); swritex( eCos_regset ); newline();
+ x8( "global ", &(gdb[G0]) );
+ x8( " in ", &(gdb[I0]) );
+ x8( " local ", &(gdb[L0]) );
+ x8( " out ", &(gdb[O0]) );
+ swrites( "gdb PC = " ); swritex( gdb[ PC ] ); newline();
+ swrites( "gdb NPC = " ); swritex( gdb[ NPC ] ); newline();
+ swrites( "gdb PSR = " ); swritex( gdb[ PSR ] ); newline();
+#endif
+ }
+
+}
+
+/*---------------------------------------------------------------------------*/
+// EOF icontext.c
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/src/sparc.ld b/cesar/ecos/packages/hal/sparc/arch/current/src/sparc.ld
new file mode 100644
index 0000000000..a3e6a17a5c
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/src/sparc.ld
@@ -0,0 +1,152 @@
+//===========================================================================
+//
+// MLT linker script for SPARC
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+
+STARTUP(vectors.o)
+ENTRY(reset_vector)
+#ifdef EXTRAS
+INPUT(extras.o)
+#endif
+#if (__GNUC__ >= 3)
+GROUP(libtarget.a libgcc.a libsupc++.a)
+#else
+GROUP(libtarget.a libgcc.a)
+#endif
+
+#define ALIGN_LMA 8
+#define FOLLOWING(_section_) AT ((LOADADDR (_section_) + SIZEOF (_section_) + ALIGN_LMA - 1) & ~ (ALIGN_LMA - 1))
+#define LMA_EQ_VMA
+#define FORCE_OUTPUT . = .
+
+#define SECTIONS_BEGIN
+
+#define SECTION_rom_vectors(_region_, _vma_, _lma_) \
+ .rom_vectors _vma_ : _lma_ \
+ { FORCE_OUTPUT; KEEP (*(.vectors)) } \
+ > _region_
+
+#define SECTION_text(_region_, _vma_, _lma_) \
+ .text _vma_ : _lma_ \
+ { _stext = ABSOLUTE(.); \
+ *(.text*) *(.gnu.warning) *(.gnu.linkonce*) *(.init) } \
+ > _region_ \
+ _etext = .; PROVIDE (etext = .);
+
+#define SECTION_fini(_region_, _vma_, _lma_) \
+ .fini _vma_ : _lma_ \
+ { FORCE_OUTPUT; *(.fini) } \
+ > _region_
+
+#define SECTION_rodata(_region_, _vma_, _lma_) \
+ .rodata _vma_ : _lma_ \
+ { FORCE_OUTPUT; *(.rodata*) } \
+ > _region_
+
+#define SECTION_rodata1(_region_, _vma_, _lma_) \
+ .rodata1 _vma_ : _lma_ \
+ { FORCE_OUTPUT; *(.rodata1) } \
+ > _region_
+
+#define SECTION_fixup(_region_, _vma_, _lma_) \
+ .fixup _vma_ : _lma_ \
+ { FORCE_OUTPUT; *(.fixup) } \
+ > _region_
+
+#define SECTION_gcc_except_table(_region_, _vma_, _lma_) \
+ .gcc_except_table _vma_ : _lma_ \
+ { FORCE_OUTPUT; *(.gcc_except_table) } \
+ > _region_
+
+#define SECTION_ram_vectors(_region_, _vma_, _lma_) \
+ .ram_vectors _vma_ : _lma_ \
+ { __ram_vectors_start = ABSOLUTE(.); \
+ KEEP (*(.ram_vectors)) \
+ __ram_vectors_end = ABSOLUTE(.); } \
+ > _region_
+
+#define SECTION_data(_region_, _vma_, _lma_) \
+ .data _vma_ : _lma_ \
+ { __ram_data_start = ABSOLUTE (.); \
+ *(.data*) *(.data1) \
+ _GOT1_START_ = ABSOLUTE (.); *(.got1) _GOT1_END_ = ABSOLUTE (.); \
+ _GOT2_START_ = ABSOLUTE (.); *(.got2) _GOT2_END_ = ABSOLUTE (.); \
+ . = ALIGN (4); \
+ KEEP(*( SORT (.ecos.table.*))) ; \
+ __CTOR_LIST__ = ABSOLUTE (.); \
+ KEEP(*(SORT(.ctors*))) \
+ __CTOR_END__ = ABSOLUTE (.); \
+ __DTOR_LIST__ = ABSOLUTE (.); \
+ KEEP(*(SORT(.dtors*))) \
+ __DTOR_END__ = ABSOLUTE (.); \
+ _GOT_START = ABSOLUTE (.); _GLOBAL_OFFSET_TABLE_ = ABSOLUTE (.) + 32768; \
+ _SDA_BASE_ = ABSOLUTE (.); \
+ *(.got.plt) *(.got) _GOT_END_ = ABSOLUTE (.); \
+ *(.dynamic) *(.sdata*) *(.sbss*) *(.eh_frame) } \
+ > _region_ \
+ __rom_data_start = LOADADDR (.data); \
+ . = ALIGN (8); \
+ __ram_data_end = .; PROVIDE (__ram_data_end = .); _edata = .; PROVIDE (edata = .);
+
+#define SECTION_bss(_region_, _vma_, _lma_) \
+ .bss _vma_ : _lma_ \
+ { __bss_start = ABSOLUTE (.); \
+ *(.scommon) *(.dynbss) *(.bss) *(.bss.*) *(COMMON) \
+ __bss_end = ABSOLUTE (.); } \
+ > _region_
+
+#define SECTIONS_END . = ALIGN(8); _end = .; PROVIDE (end = .); \
+ .debug 0 : { *(.debug) } \
+ .line 0 : { *(.line) } \
+ .debug_srcinfo 0 : { *(.debug_srcinfo) } \
+ .debug_sfnames 0 : { *(.debug_sfnames) } \
+ .debug_aranges 0 : { *(.debug_aranges) } \
+ .debug_pubnames 0 : { *(.debug_pubnames) } \
+ .debug_info 0 : { *(.debug_info) } \
+ .debug_abbrev 0 : { *(.debug_abbrev) } \
+ .debug_line 0 : { *(.debug_line) } \
+ .debug_frame 0 : { *(.debug_frame) } \
+ .debug_str 0 : { *(.debug_str) } \
+ .debug_loc 0 : { *(.debug_loc) } \
+ .debug_macinfo 0 : { *(.debug_macinfo) } \
+ .debug_weaknames 0 : { *(.debug_weaknames) } \
+ .debug_funcnames 0 : { *(.debug_funcnames) } \
+ .debug_typenames 0 : { *(.debug_typenames) } \
+ .debug_varnames 0 : { *(.debug_varnames) }
+
+#include <pkgconf/system.h>
+#include CYGHWR_MEMORY_LAYOUT_LDI
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/src/vec_ivsr.S b/cesar/ecos/packages/hal/sparc/arch/current/src/vec_ivsr.S
new file mode 100644
index 0000000000..181b9c3936
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/src/vec_ivsr.S
@@ -0,0 +1,611 @@
+/*===========================================================================
+//
+// vec_ivsr.S
+//
+// SPARC vectors: interrupt vector service routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt,
+// Gaisler Research (Konrad Eisele<eiselekd@web.de>) (fpu support)
+// Date: 1999-02-20
+// Purpose: SPARC vector code
+// Description: see vectors.S; this is the default vector service routine
+// for interrupts.
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+!----------------------------------------------------------------------------
+
+// .file "vec_ivsr.S"
+
+!----------------------------------------------------------------------------
+
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+
+#ifdef CYGPKG_KERNEL
+# include <pkgconf/kernel.h>
+#else
+# undef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
+# undef CYGFUN_HAL_COMMON_KERNEL_SUPPORT
+#endif
+
+#include <cyg/hal/arch.inc>
+
+!------------------------------------------------------------------------
+
+#include <cyg/hal/vectors.h>
+
+#define DELAYS_AFTER_WRPSR_SAME_WINDOW
+#define DELAYS_AFTER_WRWIM
+
+! Macro to mark the stack as we descend, for debugging, because it is likely
+! that actually running the ISR won~t touch the stack, but the memory needs
+! to be there. Normally blank.
+//#define MARKSTACKUSED st %sp, [ %sp ]
+#define MARKSTACKUSED
+
+!------------------------------------------------------------------------
+
+ .text
+
+!---------------------------------------------------------------------------
+! default interrupt VSR, which calls the appropriate ISR after scheduler
+! lock and interrupt masking, then interrupt_end(). interrupt_end() must be
+! called with interrupts enabled, on the original thread stack (no separate
+! interrupt stack) or with interrupts masked, on the original stack (when
+! separate interrupt stack is supported).
+
+ .global hal_default_interrupt_vsr
+hal_default_interrupt_vsr:
+ ! here,locals have been set up as follows:
+ ! %l0 = psr (with this CWP/window-level in it)
+ ! %l1 = pc
+ ! %l2 = npc
+ ! %l3 = vector number (1-15 for interrupts)
+ ! and we are in our own register window, though it is likely that
+ ! the next one will need to be saved before we can use it:
+ ! ie. this one is the invalid register window.
+
+ set 0x1000,%l7
+#if defined(CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH) && defined(CYGHWR_HAL_SPARC_FPU)
+ andn %l0, %l7, %l0 ! fpu off
+#endif
+
+ ! must establish a safe stack before re-enabling interrupts + traps
+ and %l0, __WINBITS, %l7 ! CWP extracted
+ ! no inc/dec here, so no need for special measures for not-8-windows
+ mov 1, %l6
+ sll %l6, %l7, %l6 ! 1 << CWP
+ rd %wim, %l5
+
+#if (__WINSIZE == 2) && defined(CYGHWR_HAL_SPARC_FLAT)
+ ! ----------------------- 2 window case -------------------
+ restore
+ std %l0, [%sp + 0 * 4] ! save L & I registers
+ std %l2, [%sp + 2 * 4]
+ std %l4, [%sp + 4 * 4]
+ std %l6, [%sp + 6 * 4]
+
+ std %i0, [%sp + 8 * 4]
+ std %i2, [%sp + 10 * 4]
+ std %i4, [%sp + 12 * 4]
+ std %i6, [%sp + 14 * 4]
+ save
+ ! ----------------------- /2 window case -------------------
+#else
+ ! -----------------------normal case -----------------------
+ cmp %l5, %l6 ! are they the same?
+ bne 1f ! No, so the stack is OK as is.
+
+ ! now do by hand an overflow trap, effectively
+ mov %g1, %l7 ! (DELAY SLOT)
+ srl %l5, 1, %l5
+ sll %l6, __WINSIZE-1, %l6
+ or %l6, %l5, %g1 ! new WIM in %g1 so we can get it
+ ! within the save:
+ save ! Slip into next window
+ mov %g1, %wim ! Install the new wim
+ ! (invalidates current window!)
+#ifdef DELAYS_AFTER_WRWIM
+ nop
+ nop
+ nop
+#endif
+
+ std %l0, [%sp + 0 * 4] ! save L & I registers
+ std %l2, [%sp + 2 * 4]
+ std %l4, [%sp + 4 * 4]
+ std %l6, [%sp + 6 * 4]
+
+ std %i0, [%sp + 8 * 4]
+ std %i2, [%sp + 10 * 4]
+ std %i4, [%sp + 12 * 4]
+ std %i6, [%sp + 14 * 4]
+
+ restore ! Go back to trap window.
+ mov %l7, %g1 ! Restore %g1
+#endif
+ ! -----------------------/normal case -----------------------
+
+1: ! now save away the regs we must preserve
+ sub %fp, SAVE_REGS_SIZE, %sp
+#ifdef CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
+ std %g0, [%sp + 16 * 4] ! save G registers
+ std %g2, [%sp + 18 * 4] ! (set %g0 place to 0 to flag special context)
+ std %g4, [%sp + 20 * 4]
+ std %g6, [%sp + 22 * 4]
+#else // not CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
+ std %l0, [%sp + 0 * 4] ! save L & I registers
+ std %l2, [%sp + 2 * 4]
+ std %l4, [%sp + 4 * 4]
+ std %l6, [%sp + 6 * 4]
+
+ std %i0, [%sp + 8 * 4]
+ std %i2, [%sp + 10 * 4]
+ std %i4, [%sp + 12 * 4]
+ std %i6, [%sp + 14 * 4]
+
+ st %g1, [%sp + 17 * 4] ! save G registers
+ std %g2, [%sp + 18 * 4]
+ std %g4, [%sp + 20 * 4]
+ std %g6, [%sp + 22 * 4]
+
+ ! no point whatsoever in saving O registers
+
+ ! and save the CWP in %g0 save place
+ st %l0, [%sp + 16 * 4]
+#endif // ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
+
+ ! push fpu ctx
+#ifdef CYGHWR_HAL_SPARC_FPU
+#ifdef CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH
+ set cyg_hal_fpustate_current,%g6 ! current state table
+ ld [%g6],%g6
+ st %g6,[%sp + 32 * 4]
+
+ sub %sp,SAVE_FPUSTATE_SIZE,%sp ! allocate fpu flush for irq
+
+ set cyg_hal_fpustate_current,%g2 ! current state table
+ st %sp,[%g2]
+#else
+ std %f0, [%sp + 32 * 4]
+ std %f2, [%sp + 34 * 4]
+ std %f4, [%sp + 36 * 4]
+ std %f6, [%sp + 38 * 4]
+ std %f8, [%sp + 40 * 4]
+ std %f10, [%sp + 42 * 4]
+ std %f12, [%sp + 44 * 4]
+ std %f14, [%sp + 46 * 4]
+ std %f16, [%sp + 48 * 4]
+ std %f18, [%sp + 50 * 4]
+ std %f20, [%sp + 52 * 4]
+ std %f22, [%sp + 54 * 4]
+ std %f24, [%sp + 56 * 4]
+ std %f26, [%sp + 58 * 4]
+ std %f28, [%sp + 60 * 4]
+ std %f30, [%sp + 62 * 4]
+ st %fsr, [%sp + 64 * 4]
+#endif
+#endif
+ sub %sp, 24 * 4, %sp ! fresh frame including
+ ! arg spill area for callees
+ MARKSTACKUSED ! kilroy was here
+
+#ifdef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
+ ! we will switch to the interrupt stack unless already running on it
+
+#if !defined(CYGPKG_HAL_SMP_SUPPORT)
+ .extern cyg_interrupt_stack
+ .extern cyg_interrupt_stack_base
+ set cyg_interrupt_stack, %g1
+ set cyg_interrupt_stack_base, %g2
+#else
+ .extern __interrupt_stack_vector
+ hal_smp_cpu %g1
+ sll %g1,2,%g1
+ set __interrupt_stack_vector,%l7
+ ld [%l7+%g1], %g1
+ set CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE,%l7
+ sub %g1,%l7,%g2
+#endif
+
+ cmp %sp, %g2 ! below base?
+ blu 1f ! if so, switch.
+ cmp %sp, %g1 ! below top? (DELAY SLOT)
+ blu 2f ! if so, DON~T switch.
+ nop ! (DELAY SLOT)
+1: ! switch to the interrupt stack
+ st %sp, [ %g1 ] ! there is spare above stack
+ sub %g1, 24 * 4, %sp ! fresh frame including
+ ! arg spill area for callees
+ MARKSTACKUSED ! kilroy was here
+2:
+ ! continue as before, already in the interrupt stack.
+#endif // CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
+
+#if defined(CYGFUN_HAL_COMMON_KERNEL_SUPPORT) && \
+ !defined(CYGPKG_HAL_SMP_SUPPORT)
+ ! Lock the scheduler
+ .extern SCHED_LOCK_MANGLED_NAME
+ sethi %hi(SCHED_LOCK_MANGLED_NAME), %l7
+ ld [ %l7 + %lo(SCHED_LOCK_MANGLED_NAME) ], %l6
+ add %l6, 1, %l6
+ st %l6, [ %l7 + %lo(SCHED_LOCK_MANGLED_NAME) ]
+#endif
+
+ ! HELP_GDB_WITH_BACKTRACE
+ mov %i7, %l5 ! preserve it in l5
+ mov %l1, %i7 ! bogus return link here
+
+ ! and we must preserve the Y register (multiply/divide auxiliary)
+ ! over these calls; we will keep it in %l4 which is otherwise unused.
+ rd %y, %l4
+
+ ! Now we can reenable traps and mask off only lower prio interrupts:
+#if defined(CYGPKG_HAL_SMP_SUPPORT)
+ or %l0, 0xf00, %l7 ! disable irq
+#if (!defined(CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH)) && defined(CYGHWR_HAL_SPARC_FPU)
+ or %l7, 0x10e0, %l7 ! and ET (+S,PS,EF)
+#else
+ or %l7, 0x0e0, %l7 ! and ET (+S,PS)
+#endif
+ wr %l7, %psr ! and enable!
+#else
+ andn %l0, 0xf00, %l7 ! clear PIL field
+ or %l7, 0x0e0, %l7 ! and ET (+S,PS)
+ sll %l3, 8, %l6 ! trap number (1-15) into PIL bitfield
+ wr %l7, %l6, %psr ! and enable!
+#endif
+#ifdef DELAYS_AFTER_WRPSR_SAME_WINDOW
+ nop
+ nop
+ nop
+#endif
+ ! now call the ISR and so on with the appropriate args:
+ ! ie.
+ ! isr_retcode = (*(hal_interrupt_handlers[ vector ]))
+ ! ( vector, hal_interrupt_data[ vector ] );
+
+ ! from hal_arch.h
+ !// ISR tables
+ !CYG_ADDRESS hal_interrupt_handlers[CYGNUM_HAL_ISR_COUNT];
+ !CYG_ADDRWORD hal_interrupt_data[CYGNUM_HAL_ISR_COUNT];
+ !CYG_ADDRESS hal_interrupt_objects[CYGNUM_HAL_ISR_COUNT];
+
+ mov %l3, %o0
+ sll %l3, 2, %l3 ! %l3 to a word offset
+ sethi %hi(hal_interrupt_data), %l7
+ or %l7, %lo(hal_interrupt_data), %l7
+ ld [ %l7 + %l3 ], %o1
+
+ sethi %hi(hal_interrupt_handlers), %l7
+ or %l7, %lo(hal_interrupt_handlers), %l7
+ ld [ %l7 + %l3 ], %l6
+ call %l6
+ nop
+
+#ifdef CYGFUN_HAL_COMMON_KERNEL_SUPPORT
+ ! We only need to call _interrupt_end() when there is a kernel
+ ! present to do any tidying up.
+
+#ifdef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
+ ! now we switch back to the user stack (if we~re at the top
+ ! of the interrupt stack).
+
+ or %l0, 0xfe0, %l7
+ wr %l7, %psr ! Interrupts all masked, ET
+#ifdef DELAYS_AFTER_WRPSR_SAME_WINDOW
+ nop
+ nop
+ nop
+#endif
+
+#if !defined(CYGPKG_HAL_SMP_SUPPORT)
+ .extern cyg_interrupt_stack
+ set cyg_interrupt_stack - (24 * 4), %g1
+#else
+ .extern __interrupt_stack_vector
+ hal_smp_cpu %g1
+ sll %g1,2,%g1
+ set __interrupt_stack_vector,%l7
+ ld [%l7+%g1], %g1
+ sub %g1,(24 * 4),%g1
+#endif
+
+ cmp %sp, %g1 ! is SP less?
+ blu 1f ! if so, do not change back
+ nop
+ ! switch to the thread stack
+ ld [ %g1 + (24 * 4) ], %sp ! there is spare above stack
+1:
+
+#else // CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
+ ! First restore the processor interrupt level to that interrupted
+ ! (otherwise a task-switch runs at the current PIL) on the assumption
+ ! that the ISR dealt with the interrupt source per se, so it is safe
+ ! to unmask it, effectively:
+ or %l0, 0x0e0, %l7 ! original PSR and ET (+S,PS)
+ wr %l7, %psr ! and enable!
+#ifdef DELAYS_AFTER_WRPSR_SAME_WINDOW
+ nop
+ nop
+ nop
+#endif
+#endif // CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
+
+ ! then call interrupt_end( isr_retcode, &intr_object, &regsave )
+ ! to unlock the scheduler and do any rescheduling that~s needed.
+ ! argument 0 (isr_retcode) is already in place in %o0
+ sethi %hi(hal_interrupt_objects), %l7
+ or %l7, %lo(hal_interrupt_objects), %l7
+ ld [ %l7 + %l3 ], %o1
+ add %sp, 24 * 4, %o2 ! saved regset (maybe tiny)
+
+ .extern interrupt_end
+ call interrupt_end
+ nop
+#endif
+
+ ! restore the Y register having done our callouts to C
+ wr %l4, %y
+
+ ! We can reinstall the original CWP here; even if interrupt_end()
+ ! performed a reschedule (ie. yield/resume pair) we will be in the
+ ! same window. The window is preserved by reschedule precisely
+ ! because it is impossible atomically to disable traps here without
+ ! involving a CWP living in a register for a time when other
+ ! interrupts may occur.
+
+ ! disable traps (using the saved psr is fastest way)
+ wr %l0, %psr ! restores flags, disables traps, and old PIL
+#ifdef DELAYS_AFTER_WRPSR_SAME_WINDOW
+ nop
+ nop
+ nop
+#endif
+
+ ! HELP_GDB_WITH_BACKTRACE
+ mov %l5, %i7 ! restore (unused) return link
+
+#ifdef CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH
+ add %sp,SAVE_FPUSTATE_SIZE,%sp ! undo fpu flush area
+#endif
+
+ ! and restore other saved regs
+ ! (see CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT)
+ add %sp, 24 * 4, %sp ! undo fresh frame
+
+ ! pop fpu ctx
+#ifdef CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH
+ ld [%sp + 32 * 4],%g5
+ set cyg_hal_fpustate_current,%g6 ! current state table
+ st %g5,[%g6]
+#elif defined(CYGHWR_HAL_SPARC_FPU)
+ ldd [%sp + 32 * 4], %f0
+ ldd [%sp + 34 * 4], %f2
+ ldd [%sp + 36 * 4], %f4
+ ldd [%sp + 38 * 4], %f6
+ ldd [%sp + 40 * 4], %f8
+ ldd [%sp + 42 * 4], %f10
+ ldd [%sp + 44 * 4], %f12
+ ldd [%sp + 46 * 4], %f14
+ ldd [%sp + 48 * 4], %f16
+ ldd [%sp + 50 * 4], %f18
+ ldd [%sp + 52 * 4], %f20
+ ldd [%sp + 54 * 4], %f22
+ ldd [%sp + 56 * 4], %f24
+ ldd [%sp + 58 * 4], %f26
+ ldd [%sp + 60 * 4], %f28
+ ldd [%sp + 62 * 4], %f30
+ ld [%sp + 64 * 4], %fsr
+#endif
+
+ ld [%sp + 17 * 4], %g1 ! restore G registers
+ ldd [%sp + 18 * 4], %g2
+ ldd [%sp + 20 * 4], %g4
+ ldd [%sp + 22 * 4], %g6
+
+ ! and do NOT restore any other registers L, I or O
+
+ ! Now test for window underflow here and fix up if needs be.
+ !
+ ! Why? interrupt_end() might have yielded us, when only
+ ! its own frame was restored; its own return to us caused a
+ ! window underflow trap, as would our return to interruptee
+ ! unless we deal with it now.
+
+ add %l0, 1, %l7 ! interruptee~s CWP plus noise
+ and %l7, __WINBITS, %l7 ! CWP only
+#ifdef CYGPKG_HAL_SPARC_REGISTER_WINDOWS_POW2
+ ! it is in range already
+#else // expect 5 or 6 or 7 windows
+ cmp %l7, __WINSIZE
+ bge,a 567f ! taken: do delay slot, handle overflow
+ mov 0, %l7 ! only if .ge. above
+567:
+#endif
+ mov 1, %l6
+ sll %l6, %l7, %l6 ! 1 << CWP
+ rd %wim, %l5
+
+#if (__WINSIZE == 2) && defined(CYGHWR_HAL_SPARC_FLAT)
+ ! ----------------------- 2 window case -------------------
+ restore ! Interruptee~s window
+ ldd [%sp + 0 * 4], %l0 ! restore L & I registers
+ ldd [%sp + 2 * 4], %l2
+ ldd [%sp + 4 * 4], %l4
+ ldd [%sp + 6 * 4], %l6
+
+ ldd [%sp + 8 * 4], %i0
+ ldd [%sp + 10 * 4], %i2
+ ldd [%sp + 12 * 4], %i4
+ ldd [%sp + 14 * 4], %i6
+ save ! Back to trap window
+ ! ----------------------- /2 window case -------------------
+#else
+ ! -----------------------normal case -----------------------
+ cmp %l5, %l6 ! are they the same?
+ bne 2f ! No, so the stack is OK as is.
+
+ ! now do by hand an underflow trap, effectively
+ sll %l5, 1, %l5 ! Rotate wim left
+ srl %l6, __WINSIZE-1, %l6
+ wr %l5, %l6, %wim
+#ifdef DELAYS_AFTER_WRWIM
+ nop ! are these delays needed?
+ nop ! (following restore uses wim)
+ nop
+#endif
+ restore ! Interruptee~s window
+ ldd [%sp + 0 * 4], %l0 ! restore L & I registers
+ ldd [%sp + 2 * 4], %l2
+ ldd [%sp + 4 * 4], %l4
+ ldd [%sp + 6 * 4], %l6
+
+ ldd [%sp + 8 * 4], %i0
+ ldd [%sp + 10 * 4], %i2
+ ldd [%sp + 12 * 4], %i4
+ ldd [%sp + 14 * 4], %i6
+ save ! Back to trap window
+
+ ! -----------------------/normal case -----------------------
+#endif
+2: ! restore the condition codes, PSR and PIL and return from trap.
+ wr %l0, %psr ! restores flags, disables traps, and old PIL
+#ifdef DELAYS_AFTER_WRPSR_SAME_WINDOW
+ nop
+ nop
+ nop
+#endif
+ jmpl %l1, %g0
+ rett %l2
+
+!----------------------------------------------------------------------------
+
+#ifdef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
+
+! This routine can only be called from a thread stack, maybe
+! with interrupts (but not traps) disabled.
+! It switches to the interrupt stack then calls back to the
+! kernel to execute DSRs.
+
+ .global hal_interrupt_stack_call_pending_DSRs
+hal_interrupt_stack_call_pending_DSRs:
+#if !defined(CYGHWR_HAL_SPARC_FLAT)
+ save %sp, -24 * 4, %sp
+#else
+ add %sp, -24 * 4, %sp
+ st %i7, [ %sp + 0x0 ]
+ sub %sp, -24 * 4, %i7
+ st %o7, [ %sp + 0x4 ]
+ std %l0, [ %sp + 0x8 ]
+ std %l2, [ %sp + 0x10 ]
+ std %l4, [ %sp + 0x18 ]
+ std %l6, [ %sp + 0x20 ]
+ std %i0, [ %sp + 0x28 ]
+ std %i2, [ %sp + 0x30 ]
+ std %i4, [ %sp + 0x38 ]
+#endif
+
+ MARKSTACKUSED ! kilroy was here
+
+ mov %psr,%l0
+
+ set SYS_irqdis,%o0
+ ta 0
+
+ mov %sp, %l7 ! save calling stack location
+
+ ! now switch stack to the interrupt stack, plus some headroom
+ ! for saving a register set if we are interrupted
+#if !defined(CYGPKG_HAL_SMP_SUPPORT)
+ .extern cyg_interrupt_stack
+ set cyg_interrupt_stack - 4 * 24, %sp
+#else
+ .extern __interrupt_stack_vector
+ hal_smp_cpu %l2
+ sll %l2,2,%l2
+ set __interrupt_stack_vector,%l3
+ ld [%l2+%l3], %l2
+ sub %l2,(24 * 4),%sp
+#endif
+
+ MARKSTACKUSED ! kilroy was here
+
+ ! enable interrupts unconditionally to call the DSRs
+ set SYS_irqen,%o0
+ mov %g0,%o1
+ ta 0
+
+ .extern cyg_interrupt_call_pending_DSRs
+ call cyg_interrupt_call_pending_DSRs
+ nop
+
+ mov %l7, %sp ! restore calling stack
+ wr %l0, %psr ! restore interrupt status
+ nop
+ nop
+ nop
+
+#if !defined(CYGHWR_HAL_SPARC_FLAT)
+ ret
+ restore
+#else
+ sub %i7, 24 * 4, %sp
+ ld [ %sp + 0x0 ], %i7
+ ld [ %sp + 0x4 ], %o7
+ ldd [ %sp + 0x8 ], %l0
+ ldd [ %sp + 0x10 ], %l2
+ ldd [ %sp + 0x18 ], %l4
+ ldd [ %sp + 0x20 ], %l6
+ ldd [ %sp + 0x28 ], %i0
+ ldd [ %sp + 0x30 ], %i2
+ ldd [ %sp + 0x38 ], %i4
+ retl
+ add %sp, 24 * 4, %sp
+#endif
+
+#endif // CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
+
+!----------------------------------------------------------------------------
+
+! end of vec_ivsr.S
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/src/vec_xvsr.S b/cesar/ecos/packages/hal/sparc/arch/current/src/vec_xvsr.S
new file mode 100644
index 0000000000..76220bb4ab
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/src/vec_xvsr.S
@@ -0,0 +1,396 @@
+/*===========================================================================
+//
+// vec_xvsr.S
+//
+// SPARC vectors: exception vector service routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1999-02-20
+// Purpose: SPARC vector code
+// Gaisler Research (Konrad Eisele<eiselekd@web.de>) (fpu support)
+// Description: see vectors.S; this is the default vector service routine
+// for exceptions.
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+!-----------------------------------------------------------------------------
+
+// .file "vec_xvsr.S"
+
+!----------------------------------------------------------------------------
+
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+
+#ifdef CYGPKG_KERNEL
+# include <pkgconf/kernel.h>
+#endif
+
+#include <cyg/hal/arch.inc>
+
+!------------------------------------------------------------------------
+
+#include <cyg/hal/vectors.h>
+
+#define DELAYS_AFTER_WRPSR_SAME_WINDOW
+#define DELAYS_AFTER_WRWIM
+
+!------------------------------------------------------------------------
+
+ .text
+
+!---------------------------------------------------------------------------
+! default exception handler VSR, which calls the appropriate ISR after
+! interrupt masking - much the same as the interrupt VSR but does not lock
+! scheduler or call interrupt_end().
+
+ .global hal_default_exception_vsr
+hal_default_exception_vsr:
+ ! here,locals have been set up as follows:
+ ! %l0 = psr (with this CWP/window-level in it)
+ ! %l1 = pc
+ ! %l2 = npc
+ ! %l3 = vector number (16-25 for traps)
+ ! and we are in our own register window, though it is likely that
+ ! the next one will need to be saved before we can use it:
+ ! ie. this one is the invalid register window.
+
+ set 0x1000,%l7
+ andn %l0, %l7, %l0 ! fpu off
+
+ ! must establish a safe stack before re-enabling interrupts + traps
+ and %l0, __WINBITS, %l7 ! CWP extracted
+ ! no inc/dec here, so no need for special measures for not-8-windows
+ mov 1, %l6
+ sll %l6, %l7, %l6 ! 1 << CWP
+ rd %wim, %l5
+
+#if (__WINSIZE == 2) && defined(CYGHWR_HAL_SPARC_FLAT)
+ ! ----------------------- 2 window case -------------------
+ restore
+ std %l0, [%sp + 0 * 4] ! save L & I registers
+ std %l2, [%sp + 2 * 4]
+ std %l4, [%sp + 4 * 4]
+ std %l6, [%sp + 6 * 4]
+
+ std %i0, [%sp + 8 * 4]
+ std %i2, [%sp + 10 * 4]
+ std %i4, [%sp + 12 * 4]
+ std %i6, [%sp + 14 * 4]
+ save
+ ! ----------------------- /2 window case -------------------
+#else
+ ! -----------------------normal case -----------------------
+ cmp %l5, %l6 ! are they the same?
+ bne 1f ! No, so the stack is OK as is.
+
+ ! now do by hand an overflow trap, effectively
+ mov %g1, %l7 ! (DELAY SLOT)
+ srl %l5, 1, %l5
+ sll %l6, __WINSIZE-1, %l6
+ or %l6, %l5, %g1 ! new WIM in %g1 so we can get it
+ ! within the save:
+ save ! Slip into next window
+ mov %g1, %wim ! Install the new wim
+ ! (invalidates current window!)
+#ifdef DELAYS_AFTER_WRWIM
+ nop
+ nop
+ nop
+#endif
+
+ std %l0, [%sp + 0 * 4] ! save L & I registers
+ std %l2, [%sp + 2 * 4]
+ std %l4, [%sp + 4 * 4]
+ std %l6, [%sp + 6 * 4]
+
+ std %i0, [%sp + 8 * 4]
+ std %i2, [%sp + 10 * 4]
+ std %i4, [%sp + 12 * 4]
+ std %i6, [%sp + 14 * 4]
+
+ restore ! Go back to trap window.
+ mov %l7, %g1 ! Restore %g1
+ ! -----------------------/normal case -----------------------
+#endif
+
+1: ! now save away the regs we must preserve
+
+ sub %fp, SAVE_REGS_SIZE, %sp
+
+ ! save a maximal context regardless: see also
+ ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
+ std %l0, [%sp + 0 * 4] ! save L & I registers
+ std %l2, [%sp + 2 * 4]
+ std %l4, [%sp + 4 * 4]
+ std %l6, [%sp + 6 * 4]
+
+ std %i0, [%sp + 8 * 4]
+ std %i2, [%sp + 10 * 4]
+ std %i4, [%sp + 12 * 4]
+ std %i6, [%sp + 14 * 4]
+
+ st %g1, [%sp + 17 * 4] ! save G registers
+ std %g2, [%sp + 18 * 4]
+ std %g4, [%sp + 20 * 4]
+ std %g6, [%sp + 22 * 4]
+
+ ! push fpu ctx
+#ifdef CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH
+ set cyg_hal_fpustate_current,%g6 ! current state table
+ ld [%g6],%g6
+ st %g6,[%sp + 32 * 4]
+#elif defined(CYGHWR_HAL_SPARC_FPU)
+ std %f0, [%sp + 32 * 4]
+ std %f2, [%sp + 34 * 4]
+ std %f4, [%sp + 36 * 4]
+ std %f6, [%sp + 38 * 4]
+ std %f8, [%sp + 40 * 4]
+ std %f10, [%sp + 42 * 4]
+ std %f12, [%sp + 44 * 4]
+ std %f14, [%sp + 46 * 4]
+ std %f16, [%sp + 48 * 4]
+ std %f18, [%sp + 50 * 4]
+ std %f20, [%sp + 52 * 4]
+ std %f22, [%sp + 54 * 4]
+ std %f24, [%sp + 56 * 4]
+ std %f26, [%sp + 58 * 4]
+ std %f28, [%sp + 60 * 4]
+ std %f30, [%sp + 62 * 4]
+ st %fsr, [%sp + 64 * 4]
+#endif
+
+
+ ! no point whatsoever in saving O registers
+
+ ! and save the CWP in %g0 save place
+ st %l0, [%sp + 16 * 4]
+
+ sub %sp, 24 * 4, %sp ! fresh frame including
+ ! arg spill area for callees
+
+ ! do not lock the scheduler
+
+ ! HELP_GDB_WITH_BACKTRACE
+ mov %i7, %l5 ! preserve it JIC
+ mov %l1, %i7 ! bogus return link here
+
+ ! and we must preserve the Y register (multiply/divide auxiliary)
+ ! over these calls; we will keep it in %l4 which is otherwise unused.
+ rd %y, %l4
+
+ ! Now we can reenable traps (preserving interrupt level)
+ or %l0, 0x0e0, %l7 ! set ET (+S,PS), preserve PIL
+ wr %l7, %psr ! and enable!
+#ifdef DELAYS_AFTER_WRPSR_SAME_WINDOW
+ nop
+ nop
+ nop
+#endif
+ ! now call the XSR and so on with the appropriate args:
+ ! ie.
+ ! isr_retcode = (*(hal_interrupt_handlers[ vector ]))
+ ! ( vector, hal_interrupt_data[ vector ], stackp );
+
+ ! from hal_arch.h
+ !// ISR tables
+ !CYG_ADDRESS hal_interrupt_handlers[CYGNUM_HAL_ISR_COUNT];
+ !CYG_ADDRWORD hal_interrupt_data[CYGNUM_HAL_ISR_COUNT];
+ !CYG_ADDRESS hal_interrupt_objects[CYGNUM_HAL_ISR_COUNT];
+
+ mov %l3, %o0
+ sll %l3, 2, %l3 ! %l3 to a word offset
+ sethi %hi(hal_interrupt_data), %l7
+ or %l7, %lo(hal_interrupt_data), %l7
+ ld [ %l7 + %l3 ], %o1 ! data
+ add %sp, 24 * 4, %o2 ! stackpointer of saved regset
+
+ sethi %hi(hal_interrupt_handlers), %l7
+ or %l7, %lo(hal_interrupt_handlers), %l7
+ ld [ %l7 + %l3 ], %l6
+ call %l6
+ nop
+
+ ! do not call _interrupt_end()
+
+ ! restore the Y register having done our callouts to C
+ wr %l4, %y
+
+ ! We can reinstall the original CWP here; even if interrupt_end()
+ ! performed a reschedule (ie. yield/resume pair) we will be in the
+ ! same window. The window is preserved by reschedule precisely
+ ! because it is impossible atomically to disable traps here without
+ ! involving a CWP living in a register for a time when other
+ ! interrupts may occur.
+
+ ! disable traps (using the saved psr is fastest way)
+ wr %l0, %psr ! restores flags, disables traps, same PIL.
+#ifdef DELAYS_AFTER_WRPSR_SAME_WINDOW
+ nop
+ nop
+ nop
+#endif
+ ! HELP_GDB_WITH_BACKTRACE
+ mov %l5, %i7 ! restore (unused) return link
+
+ ! and restore other saved regs
+ add %sp, 24 * 4, %sp ! undo fresh frame
+
+ ! pop fpu ctx
+#ifdef CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH
+ ld [%sp + 32 * 4],%g5
+ set cyg_hal_fpustate_current,%g6 ! current state table
+ st %g5,[%g6]
+#elif defined(CYGHWR_HAL_SPARC_FPU)
+ !ld [%sp + 32 * 4], %g2
+ ldd [%sp + 32 * 4], %f0
+ ldd [%sp + 34 * 4], %f2
+ ldd [%sp + 36 * 4], %f4
+ ldd [%sp + 38 * 4], %f6
+ ldd [%sp + 40 * 4], %f8
+ ldd [%sp + 42 * 4], %f10
+ ldd [%sp + 44 * 4], %f12
+ ldd [%sp + 46 * 4], %f14
+ ldd [%sp + 48 * 4], %f16
+ ldd [%sp + 50 * 4], %f18
+ ldd [%sp + 52 * 4], %f20
+ ldd [%sp + 54 * 4], %f22
+ ldd [%sp + 56 * 4], %f24
+ ldd [%sp + 58 * 4], %f26
+ ldd [%sp + 60 * 4], %f28
+ ldd [%sp + 62 * 4], %f30
+ ld [%sp + 64 * 4], %fsr
+#endif
+
+ ! restore a maximal context regardless: see also
+ ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
+ ldd [%sp + 0 * 4], %l0 ! restore L & I registers
+ ldd [%sp + 2 * 4], %l2 ! to support the handler
+ ldd [%sp + 4 * 4], %l4 ! having messed with them.
+ ldd [%sp + 6 * 4], %l6
+
+ ldd [%sp + 8 * 4], %i0
+ ldd [%sp + 10 * 4], %i2
+ ldd [%sp + 12 * 4], %i4
+ ldd [%sp + 14 * 4], %i6
+
+ ld [%sp + 17 * 4], %g1 ! and G registers
+ ldd [%sp + 18 * 4], %g2
+ ldd [%sp + 20 * 4], %g4
+ ldd [%sp + 22 * 4], %g6
+ ! no point whatsoever in loading back O registers.
+
+ ! Now test for window underflow here and fix up if needs be.
+ !
+ ! Why? interrupt_end() might have yielded us, when only
+ ! its own frame was restored; its own return to us caused a
+ ! window underflow trap, as would our return to interruptee
+ ! unless we deal with it now.
+
+ add %l0, 1, %l7 ! interruptee~s CWP plus noise
+ and %l7, __WINBITS, %l7 ! CWP only
+#ifdef CYGPKG_HAL_SPARC_REGISTER_WINDOWS_POW2
+ ! it is in range already
+#else // expect 5 or 6 or 7 windows
+ cmp %l7, __WINSIZE
+ bge,a 567f ! taken: do delay slot, handle overflow
+ mov 0, %l7 ! only if .ge. above
+567:
+#endif
+ mov 1, %l6
+ sll %l6, %l7, %l6 ! 1 << CWP
+ rd %wim, %l5
+
+#if (__WINSIZE == 2) && defined(CYGHWR_HAL_SPARC_FLAT)
+ ! ----------------------- 2 window case -------------------
+ restore ! Interruptee~s window
+ ldd [%sp + 0 * 4], %l0 ! restore L & I registers
+ ldd [%sp + 2 * 4], %l2
+ ldd [%sp + 4 * 4], %l4
+ ldd [%sp + 6 * 4], %l6
+
+ ldd [%sp + 8 * 4], %i0
+ ldd [%sp + 10 * 4], %i2
+ ldd [%sp + 12 * 4], %i4
+ ldd [%sp + 14 * 4], %i6
+ save ! Back to trap window
+ ! ----------------------- /2 window case -------------------
+#else
+ ! -----------------------normal case -----------------------
+ cmp %l5, %l6 ! are they the same?
+ bne 2f ! No, so the stack is OK as is.
+
+ ! now do by hand an underflow trap, effectively
+ sll %l5, 1, %l5 ! Rotate wim left
+ srl %l6, __WINSIZE-1, %l6
+ wr %l5, %l6, %wim
+#ifdef DELAYS_AFTER_WRWIM
+ nop ! are these delays needed?
+ nop ! (following restore uses wim)
+ nop
+#endif
+ restore ! Interruptee~s window
+ ldd [%sp + 0 * 4], %l0 ! restore L & I registers
+ ldd [%sp + 2 * 4], %l2
+ ldd [%sp + 4 * 4], %l4
+ ldd [%sp + 6 * 4], %l6
+
+ ldd [%sp + 8 * 4], %i0
+ ldd [%sp + 10 * 4], %i2
+ ldd [%sp + 12 * 4], %i4
+ ldd [%sp + 14 * 4], %i6
+ save ! Back to trap window
+
+ ! -----------------------/normal case -----------------------
+#endif
+2: ! restore the condition codes, PSR and PIL and return from trap.
+ wr %l0, %psr ! restores flags, disables traps, and old PIL
+#ifdef DELAYS_AFTER_WRPSR_SAME_WINDOW
+ nop
+ nop
+ nop
+#endif
+ jmpl %l1, %g0
+ rett %l2
+
+
+! end of vec_xvsr.S
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/src/vectors.S b/cesar/ecos/packages/hal/sparc/arch/current/src/vectors.S
new file mode 100644
index 0000000000..29378aa2a6
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/src/vectors.S
@@ -0,0 +1,964 @@
+/*=============================================================================
+//
+// vectors.S
+//
+// SPARC vectors and bootup code
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors:hmt,
+// Gaisler Research (Konrad Eisele<eiselekd@web.de>) (fpu support)
+// Date: 1998-12-15
+// Purpose: SPARC vector code
+// Description: This file contains the code which hangs off SPARC vectors
+// including reset; it handles register under/overflow as well
+// as bootup, anything else is deferred to the default interrupt
+// or exception vsrs respectively. See vec_[ix]vsr.S ...
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================*/
+
+!-----------------------------------------------------------------------------
+
+// .file "vectors.S"
+
+!-----------------------------------------------------------------------------
+
+
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+
+#include <pkgconf/hal_sparc.h>
+#include CYGBLD_HAL_PLATFORM_H // Platform config file
+
+#ifdef CYGPKG_KERNEL
+# include <pkgconf/kernel.h>
+#else
+# undef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
+# undef CYGFUN_HAL_COMMON_KERNEL_SUPPORT
+#endif
+
+#include <cyg/hal/arch.inc>
+
+#if defined( CYGPKG_HAL_SPARCLITE_SIM ) || \
+ defined( CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK ) || \
+ defined( CYGPKG_HAL_SPARC_LEON ) || \
+ defined( CYGPKG_HAL_SPARC_LEON3 ) || \
+ defined( CYGPKG_HAL_SPARC_ERC32 )
+#define BOOTUPSTACK_IS_INTERRUPTSTACK
+#endif
+
+//#define CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+
+#ifndef CYGHWR_HAL_SPARC_HAS_ASR17
+#ifndef CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+#error Single Vector Trapping (SVT) demands ASR17
+#endif
+#endif
+
+#if !defined(CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING) && !defined(CYGPKG_HAL_SPARC_LEON3)
+#error Single Vector Trapping (SVT) demands Leon3 model
+#endif
+
+#ifdef CYG_HAL_STARTUP_ROM
+# ifndef CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+
+! ROM startup and Single Vector Trapping demands a copy to RAM.
+! Otherwise it may be configured in, but it is not required.
+
+# ifndef CYGIMP_HAL_SPARC_COPY_VECTORS_TO_RAM
+# define CYGIMP_HAL_SPARC_COPY_VECTORS_TO_RAM
+# endif
+
+# endif
+#endif
+
+!------------------------------------------------------------------------
+
+#include <cyg/hal/vectors.h>
+
+#define DELAYS_AFTER_WRPSR_SAME_WINDOW
+#define DELAYS_AFTER_WRWIM
+
+!------------------------------------------------------------------------
+
+#ifdef CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+
+ .macro VECTOR_SYSCALL _vector _handler
+ .p2align 4
+ mov %psr, %l0
+ sethi %hi(\_handler), %l4
+ jmp %l4+%lo(\_handler)
+ mov \_vector, %l3
+ .endm
+
+ .macro VECTOR_DUMMY
+ .p2align 4
+ jmp %l1
+ rett %l2
+ nop
+ nop
+ .endm
+
+ .macro VECTOR_EXCEPTION
+ .p2align 4
+ rd %tbr, %l3
+ rd %psr, %l0
+ ba __entry_exception
+ and %l3, TT_MASK, %l4
+ .endm
+
+ .macro VECTOR_INTERRUPT level
+ .p2align 4
+ rd %psr, %l0
+ mov \level << 2, %l5
+ ba __entry_interrupt
+ mov \level << 4, %l4
+ .endm
+
+ .macro VECTOR_CODE_WIM name
+ .p2align 4
+ ba __entry_\name
+ rd %wim, %l0
+ .endm
+
+ .macro VECTOR_FPDIS
+ .p2align 4
+ ba __entry_fpdis
+ rd %psr, %l0
+ .endm
+
+#endif // CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+
+!------------------------------------------------------------------------
+! The start of the code; this is the entry point:
+
+ .section ".vectors","ax"
+
+ .global rom_vectors
+rom_vectors:
+trap_table:
+#ifdef CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+ ! this code goes to the real reset handler, it will be
+ ! overwritten by the start of vectoring handler...
+ b genuine_reset
+ nop
+ ! usually drop through to:
+ ba __entry_exception ! reset becomes an exception
+ and %l3, TT_MASK, %l4 ! once we are running
+
+ VECTOR_EXCEPTION ! 1
+ VECTOR_EXCEPTION ! 2
+ VECTOR_EXCEPTION ! 3
+ VECTOR_FPDIS ! 4 fp disabled
+
+ VECTOR_CODE_WIM wover ! 5 window overflow
+ VECTOR_CODE_WIM wunder ! 6 window underflow
+ VECTOR_EXCEPTION ! 7
+ VECTOR_EXCEPTION ! 8
+ VECTOR_EXCEPTION ! 9
+
+ VECTOR_EXCEPTION ! 10
+ VECTOR_EXCEPTION ! 11
+ VECTOR_EXCEPTION ! 12
+ VECTOR_EXCEPTION ! 13
+ VECTOR_EXCEPTION ! 14
+
+ VECTOR_EXCEPTION ! 15
+ VECTOR_EXCEPTION ! 16
+ VECTOR_INTERRUPT 1 ! 17 interrupt_level_1
+ VECTOR_INTERRUPT 2 ! 18 interrupt_level_2
+ VECTOR_INTERRUPT 3 ! 19 interrupt_level_3
+
+ VECTOR_INTERRUPT 4 ! 20 interrupt_level_4
+ VECTOR_INTERRUPT 5 ! 21 interrupt_level_5
+ VECTOR_INTERRUPT 6 ! 22 interrupt_level_6
+ VECTOR_INTERRUPT 7 ! 23 interrupt_level_7
+ VECTOR_INTERRUPT 8 ! 24 interrupt_level_8
+
+ VECTOR_INTERRUPT 9 ! 25 interrupt_level_9
+ VECTOR_INTERRUPT 10 ! 26 interrupt_level_10
+ VECTOR_INTERRUPT 11 ! 27 interrupt_level_11
+ VECTOR_INTERRUPT 12 ! 28 interrupt_level_12
+ VECTOR_INTERRUPT 13 ! 29 interrupt_level_13
+
+ VECTOR_INTERRUPT 14 ! 30 interrupt_level_14
+ VECTOR_INTERRUPT 15 ! 31 interrupt_level_15
+ VECTOR_EXCEPTION ! 32
+ VECTOR_EXCEPTION ! 33
+ VECTOR_EXCEPTION ! 34
+
+ VECTOR_EXCEPTION ! 35
+ VECTOR_EXCEPTION ! 36 cp disabled
+ VECTOR_EXCEPTION ! 37
+ VECTOR_EXCEPTION ! 38
+ VECTOR_EXCEPTION ! 39
+
+ .rept 88 ! 40-127 is 88 of them
+ VECTOR_EXCEPTION ! whichever
+ .endr
+
+ VECTOR_SYSCALL 0x80 syscall ! 128 syscall
+
+ .rept 127 ! 129-255 is 127 of them
+ VECTOR_EXCEPTION ! whichever
+ .endr
+
+
+#endif // CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+
+//_______________________________________________
+#ifndef CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+real_vector:
+ rd %tbr, %l3
+real_vector_reset:
+ rd %psr, %l0
+ ! here,locals have been set up as follows:
+ ! %l0 = psr
+ ! %l1 = pc
+ ! %l2 = npc
+ ! %l3 = tbr
+ and %l3, TT_IS_INTR_MASK, %l4
+ cmp %l4, TT_IS_INTR_VALUE
+ bne not_an_interrupt ! delay slot does not matter
+ ! here be the pre-vector interrupt handler
+interrupt:
+ and %l3, 0x0f0, %l4 ! get an interrupt number out
+ srl %l4, 2, %l5 ! to a word address offset
+#endif // !CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+//''''''''''''''''''''''''''''''''''''''''''''''''''
+
+__entry_interrupt:
+ sethi %hi(hal_vsr_table), %l6
+ or %l6, %lo(hal_vsr_table), %l6
+ ld [ %l6 + %l5 ], %l6 ! get vector in %l6
+ jmp %l6 ! and go there
+ srl %l4, 4, %l3 ! vector number into %l3: so that
+ ! interrupts and exceptions/traps
+ ! have the same API to VSRs
+
+//_______________________________________________
+#ifndef CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+not_an_interrupt:
+ and %l3, TT_MASK, %l4
+ cmp %l4, (TRAP_WUNDER << TT_SHL)
+
+ bne,a not_window_underflow
+ cmp %l4, (TRAP_WOVER << TT_SHL) ! (if taken)
+
+ ! here be the window underflow handler:
+window_underflow:
+ ! CWP is trap handler
+ ! CWP + 1 is trapped RESTORE instruction
+ ! CWP + 2 is invalid context which must be restored
+ ! CWP + 3 is next invalid context
+
+ wr %l0, %psr ! restore the condition flags
+ ! (CWP is unchanged)
+ ! the following instructions delay enough; no need for NOPs
+ rd %wim, %l0 ! get the wim
+#endif // !CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+//''''''''''''''''''''''''''''''''''''''''''''''''''
+
+__entry_wunder:
+ sll %l0, 1, %l3 ! Rotate wim left
+ srl %l0, __WINSIZE-1, %l0
+#if __WINSIZE > 3
+ wr %l0, %l3, %wim ! Install the new wim
+#else
+ wr %g0, %g0, %wim ! we need 2 windows for save,save
+#endif
+
+#ifdef DELAYS_AFTER_WRWIM
+ nop ! are these delays needed?
+ nop ! (following restore uses wim)
+ nop
+#endif
+ restore ! Users window
+ restore ! Her callers window (now valid)
+
+ ldd [%sp + 0 * 4], %l0 ! restore L & I registers
+ ldd [%sp + 2 * 4], %l2
+ ldd [%sp + 4 * 4], %l4
+ ldd [%sp + 6 * 4], %l6
+
+ ldd [%sp + 8 * 4], %i0
+ ldd [%sp + 10 * 4], %i2
+ ldd [%sp + 12 * 4], %i4
+ ldd [%sp + 14 * 4], %i6
+
+ save ! Back to trap window
+ save
+
+#if __WINSIZE <= 3
+ wr %l0, %l3, %wim ! Install the new wim (current)
+#ifdef DELAYS_AFTER_WRWIM
+ nop ! are these delays needed?
+ nop !
+ nop
+#endif
+#endif
+
+ jmp %l1
+ rett %l2
+
+//_______________________________________________
+#ifndef CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+ .global not_window_underflow
+not_window_underflow:
+ bne,a not_window_overflow
+ cmp %l4, (TRAP_FPDIS << TT_SHL) ! (if taken)
+
+ ! here be the window overflow handler:
+window_overflow:
+ ! CWP + 1 is caller whose SAVE bounced
+ ! CWP is trap handler = invalid window
+ ! CWP - 1 is next invalid window which needs to be saved
+
+ wr %l0, %psr ! restore the condition flags
+ ! (CWP is unchanged)
+ ! the following instructions delay enough; no need for NOPs
+ rd %wim, %l0
+#endif // !CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+//''''''''''''''''''''''''''''''''''''''''''''''''''
+
+__entry_wover:
+ mov %g1, %l3 ! Save g1, we use it to hold the wim
+ srl %l0, 1, %g1 ! Rotate wim right
+ sll %l0, __WINSIZE-1, %l0
+ or %l0, %g1, %g1
+
+ save ! Slip into next window
+ mov %g1, %wim ! Install the new wim
+ ! (invalidates current window!)
+
+ std %l0, [%sp + 0 * 4] ! save L & I registers
+ std %l2, [%sp + 2 * 4]
+ std %l4, [%sp + 4 * 4]
+ std %l6, [%sp + 6 * 4]
+
+ std %i0, [%sp + 8 * 4]
+ std %i2, [%sp + 10 * 4]
+ std %i4, [%sp + 12 * 4]
+ std %i6, [%sp + 14 * 4]
+
+ restore ! Go back to trap window.
+ mov %l3, %g1 ! Restore %g1
+
+ jmpl %l1, %g0
+ rett %l2
+
+//_______________________________________________
+#ifndef CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+ .global not_window_overflow
+not_window_overflow:
+ bne,a not_fpdis
+ cmp %l4, (0x80 << TT_SHL) ! (if taken)
+
+ ! here be the entryfpdis handler:
+entryfpdis:
+ wr %l0, %psr
+ nop
+ nop
+ nop
+ ba __entry_fpdis
+ nop
+#endif // !CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+//''''''''''''''''''''''''''''''''''''''''''''''''''
+
+#ifndef CYGPKG_HAL_SMP_CPU_MAX
+#define CYGPKG_HAL_SMP_CPU_MAX 1
+#endif
+
+ .data
+ .global cyg_hal_fpustate_owner
+cyg_hal_fpustate_owner:
+ .long 0 ! pointer to FPU owning context
+ .global cyg_hal_fpustate_current
+cyg_hal_fpustate_current:
+ .long 0 ! pointer to current threads FPU context
+
+ .section ".vectors","ax"
+
+ .global __entry_fpdis
+__entry_fpdis:
+
+#ifndef CYGHWR_HAL_SPARC_FPU
+ ta 0
+ nop
+#else
+#ifndef CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH
+ set 0x1000,%l3
+ or %l0,%l3,%l0
+ wr %l3,0, %psr ! restore the condition flags, enable fpu
+ nop
+ nop
+ nop
+ jmpl %l1, %g0
+ rett %l2
+#else
+ set 0x1000,%l3
+ or %l0,%l3,%l0
+ or %l0,0xf00, %l3 ! PIL up to 15, enable fpu
+ wr %l3,0, %psr ! restore the condition flags, enable fpu
+ nop
+ nop
+ nop
+
+ set cyg_hal_fpustate_current,%l4
+ ld [%l4],%l4
+ set cyg_hal_fpustate_owner,%l5
+ ld [%l5],%l5
+ cmp %l4,%l5
+ beq mpfnostore
+ nop
+ cmp %g0,%l5
+ beq mpfstore
+ nop
+
+ std %f0, [%l5 + 0x00]
+ std %f2, [%l5 + 0x08]
+ std %f4, [%l5 + 0x10]
+ std %f6, [%l5 + 0x18]
+ std %f8, [%l5 + 0x20]
+ std %f10, [%l5 + 0x28]
+ std %f12, [%l5 + 0x30]
+ std %f14, [%l5 + 0x38]
+ std %f16, [%l5 + 0x40]
+ std %f18, [%l5 + 0x48]
+ std %f20, [%l5 + 0x50]
+ std %f22, [%l5 + 0x58]
+ std %f24, [%l5 + 0x60]
+ std %f26, [%l5 + 0x68]
+ std %f28, [%l5 + 0x70]
+ std %f30, [%l5 + 0x78]
+
+ st %fsr, [%l5 + 0x80]
+
+mpfstore:
+ set cyg_hal_fpustate_owner,%l6
+ st %l4,[%l6]
+ cmp %g0,%l4
+ beq mpfnostore
+ nop
+
+ ldd [%l4 + 0x00], %f0
+ ldd [%l4 + 0x08], %f2
+ ldd [%l4 + 0x10], %f4
+ ldd [%l4 + 0x18], %f6
+ ldd [%l4 + 0x20], %f8
+ ldd [%l4 + 0x28], %f10
+ ldd [%l4 + 0x30], %f12
+ ldd [%l4 + 0x38], %f14
+ ldd [%l4 + 0x40], %f16
+ ldd [%l4 + 0x48], %f18
+ ldd [%l4 + 0x50], %f20
+ ldd [%l4 + 0x58], %f22
+ ldd [%l4 + 0x60], %f24
+ ldd [%l4 + 0x68], %f26
+ ldd [%l4 + 0x70], %f28
+ ldd [%l4 + 0x78], %f30
+
+ !ld [%l4 + 0x80], %fsr
+#ifdef GRFPU_NON_STD
+ ld [%l4 + 0x80], %l5
+ set 0x00400000, %l6
+ or %l5, %l6, %l5
+ st %l5, [%l4 + 0x80]
+#endif
+ ld [%l4 + 0x80], %fsr
+
+mpfnostore:
+ wr %l0,0, %psr ! restore the condition flags, enable fpu
+ nop
+ nop
+ nop
+
+ jmpl %l1, %g0
+ rett %l2
+#endif
+#endif
+
+//_______________________________________________
+#ifndef CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+ .global not_fpdis
+not_fpdis:
+ beq,a syscall
+ srl %l4,TT_SHL, %l3 ! (if taken)
+
+ cmp %l4, (0x0 << TT_SHL)
+ beq genuine_reset
+
+ srl %l4, 4, %l4
+#endif // CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+//''''''''''''''''''''''''''''''''''''''''''''''''''
+
+#ifdef CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+ // ADDITIONAL code to provide an entry point:
+__entry_exception:
+ srl %l4, 4, %l4
+#endif // CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+not_exception:
+ ! from here on in, %l4 is the trap number in clear
+ cmp %l4, 128
+ bge 1f
+ mov 0, %l5 ! offset 0 for user traps
+
+ cmp %l4, 36 ! coprocessor special case
+ beq 1f
+ mov 4, %l5 ! ...treated as FP, code 4
+
+ cmp %l4, 10
+ bge 1f
+ mov 10, %l5 ! offset 10 for "others"
+
+ ! if we are here, the trap number is 1-9 inclusive
+ ! so put it in %l5 and drop through...
+ mov %l4, %l5
+1:
+ or %l5, 16, %l5 ! offset into table is 16... for traps.
+ sll %l5, 2, %l5 ! to a word address offset
+ sethi %hi(hal_vsr_table), %l6
+ or %l6, %lo(hal_vsr_table), %l6
+ ld [ %l6 + %l5 ], %l6 ! get vector in %l6
+ jmp %l6 ! and go there
+ srl %l5, 2, %l3 ! vector number into %l3: so that
+ ! interrupts and exceptions/traps
+ ! have the same API to VSRs
+ ! NB that~s eCos vector number not TRAP number above.
+
+ ! and that is the end of the pre-vector trap handler
+
+ .global rom_vectors_end, real_vector_instructions
+rom_vectors_end:
+
+ ! these instructions are copied into the reset vector
+ ! after startup to _not_ branch to the genuine_reset code below
+real_vector_instructions:
+ rd %tbr, %l3
+ rd %psr, %l0
+
+
+ .global reset_vector
+reset_vector:
+
+ ! .global start
+ .global start_ecos
+ /* ------- */
+ .weak start
+ .set start,start_ecos
+
+start_ecos:
+#ifndef CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+ mov %g0,%l3
+ b real_vector_reset
+ nop
+#else
+ b trap_table
+ nop
+#endif
+
+ ! genuine reset code called from time zero:
+genuine_reset: ! set psr, mask interrupts & traps
+ sub %sp, 24 * 4, %fp ! fresh frame including
+ ! arg spill area for callees
+ mov %fp,%g5 ! save sp,fp
+ mov %sp,%g6
+ sethi %hi(trap_table), %g1
+ andn %g1, 0xfff, %g1 ! should not be needed
+ wr %g1, %tbr ! Traps are at trap_table
+#ifdef CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH
+ set 0x01fc0 + __WIN_INIT, %g1
+#else
+ set 0x0fc0 + __WIN_INIT, %g1
+#endif
+ wr %g0, %g1, %psr ! mode = prevMode = S, CWP=7
+ !wr %g0, 0xfc0 + __WIN_INIT, %psr ! mode = prevMode = S, CWP=7
+ wr %g0, 0, %wim ! No invalid windows (yet)
+ nop
+ nop
+ nop
+ mov %g5,%fp ! restore sp,fp after psr write
+ mov %g6,%sp
+
+#ifdef CYGPKG_HAL_SPARC_LEON3
+/*__sparc_leon3_cache_flush:*/
+#define ASI_LEON3_IFLUSH 0x11
+#define ASI_LEON3_DFLUSH 0x11
+ sta %g0, [%g0] ASI_LEON3_IFLUSH
+ sta %g0, [%g0] ASI_LEON3_DFLUSH
+#else
+/*__sparc_leon2_cache_flush:*/
+#define ASI_LEON2_IFLUSH 0x05
+#define ASI_LEON2_DFLUSH 0x06
+ sta %g0, [%g0] ASI_LEON2_IFLUSH
+ sta %g0, [%g0] ASI_LEON2_DFLUSH
+#endif
+
+#ifndef CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+ set 1<<13,%g1 ! Single vector trapping, Leon3: asr17.bit13==1
+ rd %asr17,%g2
+ or %g1,%g2,%g2
+ wr %g2,%asr17
+ nop
+ nop
+ nop
+ .global single_vector_trapping_not_active
+single_vector_trapping_not_active:
+ rd %asr17,%g2 !you have to enable Single Vector Trapping in the vhdl model
+ andcc %g2,%g1,%g2 !you have to enable Single Vector Trapping in the vhdl model
+ be single_vector_trapping_not_active !you have to enable Single Vector Trapping in the vhdl model
+ nop
+#endif // !CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+
+// INCLUDE PLATFORM BOOT
+
+#ifdef CYGPKG_HAL_SMP_SUPPORT
+
+ !smp dbg
+ !set 0x800000, %g2
+ lda [%g0] 2, %g1 ! cache cfg
+ set 0x800000, %g2 ! snoop enable
+ or %g2,%g1,%g2
+
+ !set 0x800000, %g2 ! snooping,disable cache for test
+
+ sta %g2, [%g0] 2 ! cache cfg
+
+ rd %asr17,%g2
+ srl %g2,28,%g2
+
+ ! trap all cpu's except cpu nr 0
+haltsmp:
+ cmp %g2,%g0
+ beq mastergo
+ nop
+
+
+ ! slaves cpus will idle until master cpu (0) will issue a
+ ! mctrl->mpstatus write to wake them up. They will here branch to
+ ! cyg_hal_smp_start then
+
+cyg_hal_smp_start:
+ ! master called
+
+ sethi %hi(trap_table), %g1
+ wr %g1, %tbr ! Traps are at reset_vector
+ nop
+ nop
+ nop
+
+ hal_smp_cpu %fp
+ sll %fp,2,%fp
+ set __interrupt_stack_vector,%i0
+ ld [%i0+%fp], %fp
+
+ sub %fp, 16 * 4, %sp ! Stack pointer
+
+#if (__WINSIZE == 2)
+ wr %g0, 0, %wim ! 2 windows
+#else
+ wr %g0, __WIM_INIT, %wim ! Window 7 (current) is invalid
+#endif
+
+ nop
+ nop
+ nop
+ wr %g0, 0xfe0 + __WIN_INIT, %psr
+ nop ! Enable traps:
+ nop ! set psr, _do_ mask interrupts
+ nop ! mode = prevMode = S, CWP=7
+
+
+ call cyg_hal_smp_startup
+ nop
+
+
+mastergo:
+
+#endif
+
+// This should set up RAM and caches, and calm down any external interrupt
+// sources. Also copy two instructions from real_vector_instructions
+// into reset_vector, then invalidate the instruction cache.
+
+#include <cyg/hal/halboot.si>
+
+// halboot.si returns with %sp all set, in sleb versions.
+// (though we override if there is an interrupt stack)
+
+ ! now set up a stack and initial frame linkage
+ ! so as to be able to make C function calls:
+ ! current window is 7, the highest, so we store a
+ ! saved frame thingy that refers to itself in the stack,
+ ! then another which is valid and drop into main from there.
+
+ set cyg_hal_stack_top,%i0
+ st %fp,[%i0]
+
+ set cyg_interrupt_stack,%fp
+#ifdef CYGPKG_HAL_SMP_SUPPORT
+ set __interrupt_stack_vector,%i0
+ st %fp,[%i0]
+#endif
+
+ andn %i6, 7, %i6 ! round fp down to double alignment
+ mov 0, %i7 ! null return address
+ sethi %hi(0xb51ac000), %i0 ! "BStac" pattern
+ or %i0, 24, %i0
+ or %i0, 1, %i1
+ or %i0, 2, %i2
+ or %i0, 3, %i3
+ or %i0, 4, %i4
+ or %i0, 5, %i5
+
+ sethi %hi(0xb51ac000), %l0 ! "BStac" pattern
+ or %l0, 16, %l0
+ or %l0, 1, %l1
+ or %l0, 2, %l2
+ or %l0, 3, %l3
+ or %l0, 4, %l4
+ or %l0, 5, %l5
+ or %l0, 6, %l6
+ or %l0, 7, %l7
+
+ sub %fp, 16 * 4, %sp ! Stack pointer
+
+ std %l0, [%sp + 0 * 4] ! save L & I registers
+ std %l2, [%sp + 2 * 4] ! into new stack frame
+ std %l4, [%sp + 4 * 4]
+ std %l6, [%sp + 6 * 4]
+
+ std %i0, [%sp + 8 * 4]
+ std %i2, [%sp + 10 * 4]
+ std %i4, [%sp + 12 * 4]
+ std %i6, [%sp + 14 * 4]
+
+ sethi %hi(0xb0010000), %o0 ! "Boot" pattern
+ or %o0, 8, %o0
+ or %o0, 1, %o1
+ or %o0, 2, %o2
+ or %o0, 3, %o3
+ or %o0, 4, %o4
+ or %o0, 5, %o5
+
+#if (__WINSIZE == 2)
+ wr %g0, 0, %wim ! 2 windows
+#else
+ wr %g0, __WIM_INIT, %wim ! Window 7 (current) is invalid
+#endif
+ nop
+ nop
+ nop
+
+ sethi %hi(0xb0010000), %g1 ! "Boot" pattern
+ or %g1, 2, %g2
+ or %g1, 3, %g3
+ or %g1, 4, %g4
+ or %g1, 5, %g5
+ or %g1, 6, %g6
+ or %g1, 7, %g7
+ or %g1, 1, %g1
+
+#ifdef CYGPKG_HAL_SPARC_LAZY_FPU_SWITCH
+ set 0x0fe0 + __WIN_INIT, %g2
+#else
+ set 0x1fe0 + __WIN_INIT, %g2
+#endif
+ wr %g0, %g2, %psr
+ or %g1, 2, %g2
+ !wr %g0, 0x1fe0 + __WIN_INIT, %psr
+ nop ! Enable traps:
+ nop ! set psr, _do_ mask interrupts
+ nop ! mode = prevMode = S, CWP=7
+
+
+#if defined(CYGHWR_HAL_SPARC_FLAT)
+ save %sp, -24 * 4, %sp ! get valid window
+#endif
+
+ ! now we can start calling out and running C code!
+ .extern cyg_hal_start
+ call cyg_hal_start ! puts return address in %o7
+ or %g1, 1, %g1
+
+#ifdef CYGPKG_HAL_SMP_SUPPORT
+ .extern cyg_hal_smp_init
+ call cyg_hal_smp_init
+ nop
+#endif
+
+ call cyg_start /* does not return */
+ nop
+
+
+loop_forever:
+ ta 1
+ b loop_forever ! if it returns
+ nop
+
+#define SYM(n) n
+#define PUBLIC(n) .globl SYM(n)
+
+ /*
+ * system call
+ *
+ * On entry:
+ *
+ * l0 = psr (from trap table)
+ * l1 = pc
+ * l2 = npc
+ * i0 = system call id
+ */
+
+ PUBLIC(syscall)
+
+SYM(syscall):
+
+ subcc %i0, 2, %g0 ! syscall 2, disable interrupts
+ bne 3f
+ or %l0, 0x0f00, %l4 ! set PIL=15
+ mov %l4, %psr
+ or %l0, SPARC_PSR_ET_MASK, %i0 ! return old psr with ET=1
+ ba,a 9f
+3:
+ subcc %i0, 3, %g0 ! syscall 3, enable interrupts
+ bne 1f
+ and %i1, SPARC_PSR_PIL_MASK, %l4
+ andn %l0, SPARC_PSR_PIL_MASK, %l5
+ or %l5, %l4, %l4
+ mov %l4, %psr
+ ba,a 9f
+
+1:
+ ta 0 ! halt
+9: ! leave
+ jmpl %l2, %g0
+ rett %l2 + 4
+
+
+
+!---------------------------------------------------------------------------
+! hal_vsr_table...
+
+ .section ".data"
+
+ .balign 4
+ .global cyg_hal_stack_top
+cyg_hal_stack_top: !avoid .bss (clear)
+ .long 0x100000
+
+ .balign 4
+ .global hal_vsr_table
+hal_vsr_table:
+ .rept 16
+ .word hal_default_interrupt_vsr
+ .endr
+ .rept 11
+ .word hal_default_exception_vsr
+ .endr
+
+!---------------------------------------------------------------------------
+! Bootup stack (only needed explicitly in sim)
+
+#if defined(BOOTUPSTACK_IS_INTERRUPTSTACK) || \
+ defined(CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK)
+
+ .section ".bss"
+
+
+#ifndef CYGPKG_HAL_SMP_SUPPORT
+
+#ifndef CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE
+#define CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE 4096
+#endif
+
+ .balign 16
+ .global cyg_interrupt_stack_base
+cyg_interrupt_stack_base:
+ .rept CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE
+ .byte 0
+ .endr
+ .balign 16
+ .global cyg_interrupt_stack
+cyg_interrupt_stack:
+ .long 0,0,0,0,0,0,0,0 ! here be secret state stored
+
+#else
+ .global __interrupt_stack_vector
+__interrupt_stack_vector:
+ .rept CYGPKG_HAL_SMP_CPU_MAX
+ .long 0
+ .endr
+
+ .balign 16
+ .global cyg_interrupt_stack_base, __interrupt_stack_first
+cyg_interrupt_stack_base:
+__interrupt_stack_base:
+__interrupt_stack_first:
+ .rept CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE
+ .byte 0
+ .endr
+ .balign 16
+ .global cyg_interrupt_stack
+cyg_interrupt_stack:
+__interrupt_stack:
+ .rept CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE*(CYGPKG_HAL_SMP_CPU_MAX-1)
+ .byte 0
+ .endr
+ .long 0,0,0,0,0,0,0,0 ! here be secret state stored
+
+#endif
+
+#endif
+
+!------------------------------------------------------------------------
+! Define a section that reserves space at the start of RAM for the
+! vectors to be copied into, for ROM start only.
+
+#ifdef CYGIMP_HAL_SPARC_COPY_VECTORS_TO_RAM
+ .section ".ram_vectors","awx",@nobits
+ ! need a space at base of RAM for copied vector/trampoline code
+ .align 0x1000
+ .space 8 ! for fencepost errors
+ .space (rom_vectors_end - rom_vectors)
+#endif // CYGIMP_HAL_SPARC_COPY_VECTORS_TO_RAM
+
+!------------------------------------------------------------------------
+! end of vectors.S
diff --git a/cesar/ecos/packages/hal/sparc/arch/current/tests/sparc_ex.c b/cesar/ecos/packages/hal/sparc/arch/current/tests/sparc_ex.c
new file mode 100644
index 0000000000..227edbfab4
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/arch/current/tests/sparc_ex.c
@@ -0,0 +1,437 @@
+/*=================================================================
+//
+// sparc_ex.c
+//
+// SPARC HAL exception and register manipulation test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm, nickg
+// Date: 1998-06-18
+//####DESCRIPTIONEND####
+*/
+
+#include <pkgconf/system.h>
+
+#include <pkgconf/hal.h>
+
+#include <cyg/infra/cyg_type.h>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+
+#include <pkgconf/infra.h>
+
+#ifdef CYGDBG_USE_TRACING
+#define OUTER_REPEATS 1
+#define SIM_REPEATS 10
+#define HW_REPEATS 1000
+#else
+#define OUTER_REPEATS 10
+#define SIM_REPEATS 100
+#define HW_REPEATS 10000
+#endif // using tracing to slow everything down
+
+// -------------------------------------------------------------------------
+// These routines are used to cause an alignment trap; the compiler is too
+// darned clever by half, if you try to inline this stuff as macros it uses
+// different instruction sequences and register pairs. This makes for a
+// less thorough test, but there's no option other than writing a LOT of
+// assembler code.
+
+// Further, with -O3, the compiler inlines these anyway and so makes
+// non-trapping code. So they are now at the end, to prevent this.
+
+extern cyg_uint64 get_ll( cyg_uint64 *p );
+
+extern cyg_uint64 get_llplus( cyg_uint64 *p );
+
+extern cyg_uint32 get_i( cyg_uint32 *p );
+
+extern cyg_uint32 get_iplus( cyg_uint32 *p );
+
+extern cyg_uint16 get_s( cyg_uint16 *p );
+
+extern cyg_uint16 get_splus( cyg_uint16 *p );
+
+// -------------------------------------------------------------------------
+// Some memory to read in more-or-less aligned manners.
+
+#define L1 (0x123456789abcdef0ll)
+#define L2 (0xfedcba9876543210ll)
+static cyg_uint64 a[ 2 ] = {
+ L1,
+ L2
+};
+
+#define M32 (0x00000000ffffffffl)
+#define M16 (0x000000000000ffffl)
+#define M8 (0x00000000000000ffl)
+
+volatile cyg_uint32 trap = 0;
+volatile cyg_uint32 same = 0;
+volatile cyg_uint32 tcount = 0;
+
+// -------------------------------------------------------------------------
+// This macro invokes a routine then checks that a suitable trap occurred.
+// It expects the instruction simply to be skipped, rather than the trap
+// _handled_ or the unaligned access to be _emulated_ in any way. This
+// test is just a proof that we could write such a handler.
+
+#define TRAPPROC( _var_, _type_, _align_, _proc_ ) \
+CYG_MACRO_START \
+ otrap = trap; \
+ otcount = tcount; \
+ _var_ = _proc_( (_type_ *)(cp + (_align_)) ); \
+ CYG_TEST_CHECK( trap != otrap || same > 0, \
+ "No trap [" #_type_ ":" #_align_ "," #_proc_ "]" ); \
+ CYG_TEST_CHECK( same < 20, \
+ "Undetected trap loop[" #_type_ ":" #_align_ "," #_proc_ "]" ); \
+ CYG_TEST_CHECK( tcount > otcount, \
+ "No trap counted [" #_type_ ":" #_align_ "," #_proc_ "]" ); \
+ CYG_TEST_CHECK( (tcount - 1) <= otcount, \
+ "Tcount overinc [" #_type_ ":" #_align_ "," #_proc_ "]" ); \
+CYG_MACRO_END
+
+// and this one expects no trap to occur:
+#define SAFEPROC( _var_, _type_, _align_, _proc_ ) \
+CYG_MACRO_START \
+ trap = 0; \
+ otcount = tcount; \
+ _var_ = _proc_( (_type_ *)(cp + (_align_)) ); \
+ CYG_TEST_CHECK( 0 == trap, \
+ "Trap [" #_type_ ":" #_align_ "," #_proc_ "]" ); \
+ CYG_TEST_CHECK( tcount == otcount, \
+ "Trap counted [" #_type_ ":" #_align_ "," #_proc_ "]" ); \
+CYG_MACRO_END
+
+static void do_test( void )
+{
+ cyg_uint32 *ip = (cyg_uint32 *)a;
+ cyg_uint16 *sp = (cyg_uint16 *)a;
+ cyg_uint8 *cp = (cyg_uint8 *)a;
+
+ cyg_uint64 l;
+ cyg_uint32 i;
+ cyg_uint16 s;
+ cyg_uint8 c;
+
+ cyg_int32 z, repeats;
+
+ cyg_uint32 otrap;
+ cyg_uint32 otcount;
+
+ otrap = trap = 0;
+ otcount = tcount;
+
+ // First test interestingly aligned accesses that are legal.
+
+ l = a[0]; CYG_TEST_CHECK( L1 == l, "a[0] read bad" );
+ l = a[1]; CYG_TEST_CHECK( L2 == l, "a[1] read bad" );
+
+ i = ip[0]; CYG_TEST_CHECK( ((L1 >> 32) & M32) == i, "ip[0]" );
+ i = ip[1]; CYG_TEST_CHECK( ((L1 ) & M32) == i, "ip[1]" );
+ i = ip[2]; CYG_TEST_CHECK( ((L2 >> 32) & M32) == i, "ip[2]" );
+ i = ip[3]; CYG_TEST_CHECK( ((L2 ) & M32) == i, "ip[3]" );
+
+ s = sp[0]; CYG_TEST_CHECK( ((L1 >> 48) & M16) == s, "sp[0]" );
+ s = sp[1]; CYG_TEST_CHECK( ((L1 >> 32) & M16) == s, "sp[1]" );
+ s = sp[2]; CYG_TEST_CHECK( ((L1 >> 16) & M16) == s, "sp[2]" );
+ s = sp[3]; CYG_TEST_CHECK( ((L1 ) & M16) == s, "sp[3]" );
+ s = sp[4]; CYG_TEST_CHECK( ((L2 >> 48) & M16) == s, "sp[4]" );
+ s = sp[5]; CYG_TEST_CHECK( ((L2 >> 32) & M16) == s, "sp[5]" );
+ s = sp[6]; CYG_TEST_CHECK( ((L2 >> 16) & M16) == s, "sp[6]" );
+ s = sp[7]; CYG_TEST_CHECK( ((L2 ) & M16) == s, "sp[7]" );
+
+ c = cp[0]; CYG_TEST_CHECK( ((L1 >> 56) & M8) == c, "cp[0]" );
+ c = cp[1]; CYG_TEST_CHECK( ((L1 >> 48) & M8) == c, "cp[1]" );
+ c = cp[2]; CYG_TEST_CHECK( ((L1 >> 40) & M8) == c, "cp[2]" );
+ c = cp[3]; CYG_TEST_CHECK( ((L1 >> 32) & M8) == c, "cp[3]" );
+ c = cp[4]; CYG_TEST_CHECK( ((L1 >> 24) & M8) == c, "cp[4]" );
+ c = cp[5]; CYG_TEST_CHECK( ((L1 >> 16) & M8) == c, "cp[5]" );
+ c = cp[6]; CYG_TEST_CHECK( ((L1 >> 8) & M8) == c, "cp[6]" );
+ c = cp[7]; CYG_TEST_CHECK( ((L1 ) & M8) == c, "cp[7]" );
+ c = cp[8]; CYG_TEST_CHECK( ((L2 >> 56) & M8) == c, "cp[8]" );
+ c = cp[9]; CYG_TEST_CHECK( ((L2 >> 48) & M8) == c, "cp[9]" );
+ c = cp[10]; CYG_TEST_CHECK( ((L2 >> 40) & M8) == c, "cp[10]" );
+ c = cp[11]; CYG_TEST_CHECK( ((L2 >> 32) & M8) == c, "cp[11]" );
+ c = cp[12]; CYG_TEST_CHECK( ((L2 >> 24) & M8) == c, "cp[12]" );
+ c = cp[13]; CYG_TEST_CHECK( ((L2 >> 16) & M8) == c, "cp[13]" );
+ c = cp[14]; CYG_TEST_CHECK( ((L2 >> 8) & M8) == c, "cp[14]" );
+ c = cp[15]; CYG_TEST_CHECK( ((L2 ) & M8) == c, "cp[15]" );
+
+ CYG_TEST_CHECK( 0 == trap, "Traps occurred (legal accesses)" );
+ CYG_TEST_CHECK( tcount == otcount, "Traps counted (legal accesses)" );
+
+ CYG_TEST_PASS( "Aligned accesses OK" );
+
+ for ( z = OUTER_REPEATS; z > 0; z-- ) {
+
+ for ( repeats = (cyg_test_is_simulator ? SIM_REPEATS : HW_REPEATS) ;
+ repeats > 0 ; repeats-- ) {
+
+ TRAPPROC( l, cyg_uint64, 4, get_llplus );
+ TRAPPROC( l, cyg_uint64, 5, get_llplus );
+ TRAPPROC( l, cyg_uint64, 6, get_llplus );
+ TRAPPROC( l, cyg_uint64, 7, get_llplus );
+
+ TRAPPROC( l, cyg_uint64, 4, get_ll );
+ TRAPPROC( l, cyg_uint64, 1, get_ll );
+ TRAPPROC( l, cyg_uint64, 2, get_ll );
+ TRAPPROC( l, cyg_uint64, 3, get_ll );
+
+ TRAPPROC( i, cyg_uint32, 1, get_iplus );
+ TRAPPROC( i, cyg_uint32, 2, get_iplus );
+ TRAPPROC( i, cyg_uint32, 3, get_iplus );
+
+ TRAPPROC( i, cyg_uint32, 5, get_i );
+ TRAPPROC( i, cyg_uint32, 6, get_i );
+ TRAPPROC( i, cyg_uint32, 7, get_i );
+
+ TRAPPROC( s, cyg_uint16, 1, get_splus );
+ TRAPPROC( s, cyg_uint16, 3, get_splus );
+
+ TRAPPROC( s, cyg_uint16, 5, get_s );
+ TRAPPROC( s, cyg_uint16, 7, get_s );
+ }
+
+ CYG_TEST_PASS( "Unaligned accesses OK" );
+
+ // Now test some legal and illegal accesses intermingled.
+
+ for ( repeats = (cyg_test_is_simulator ? SIM_REPEATS : HW_REPEATS) ;
+ repeats > 0 ; repeats-- ) {
+
+ SAFEPROC( l, cyg_uint64, 0, get_llplus );
+ TRAPPROC( l, cyg_uint64, 5, get_llplus );
+ TRAPPROC( l, cyg_uint64, 6, get_llplus );
+ SAFEPROC( l, cyg_uint64, 8, get_llplus );
+
+ TRAPPROC( i, cyg_uint32, 1, get_iplus );
+ SAFEPROC( i, cyg_uint32, 4, get_iplus );
+ TRAPPROC( i, cyg_uint32, 2, get_iplus );
+ SAFEPROC( i, cyg_uint32, 8, get_iplus );
+ SAFEPROC( i, cyg_uint32, 12, get_iplus );
+ SAFEPROC( i, cyg_uint32, 16, get_iplus );
+ TRAPPROC( i, cyg_uint32, 3, get_iplus );
+
+ TRAPPROC( s, cyg_uint16, 5, get_s );
+ SAFEPROC( s, cyg_uint16, 6, get_s );
+ TRAPPROC( s, cyg_uint16, 7, get_s );
+ SAFEPROC( s, cyg_uint16, 8, get_s );
+
+ TRAPPROC( i, cyg_uint32, 5, get_i );
+ SAFEPROC( i, cyg_uint32, 4, get_i );
+ TRAPPROC( i, cyg_uint32, 6, get_i );
+ TRAPPROC( i, cyg_uint32, 7, get_i );
+ SAFEPROC( i, cyg_uint32, 0, get_i );
+
+ TRAPPROC( l, cyg_uint64, 4, get_ll );
+ SAFEPROC( l, cyg_uint64, 0, get_ll );
+ TRAPPROC( l, cyg_uint64, 1, get_ll );
+ SAFEPROC( l, cyg_uint64, 8, get_ll );
+
+ TRAPPROC( s, cyg_uint16, 1, get_splus );
+ SAFEPROC( s, cyg_uint16, 2, get_splus );
+ TRAPPROC( s, cyg_uint16, 3, get_splus );
+ SAFEPROC( s, cyg_uint16, 4, get_splus );
+ }
+
+ CYG_TEST_PASS( "Mixture of accesses OK" );
+ }
+}
+
+// -------------------------------------------------------------------------
+
+externC void
+skip_exception_handler(CYG_ADDRWORD vector, CYG_ADDRWORD data,
+ CYG_ADDRWORD stackpointer);
+
+externC void
+fail_exception_handler(CYG_ADDRWORD vector, CYG_ADDRWORD data,
+ CYG_ADDRWORD stackpointer);
+
+// -------------------------------------------------------------------------
+
+void sparc_ex_main( void )
+{
+ int i;
+
+ CYG_TEST_INIT();
+
+ for ( i = CYGNUM_HAL_EXCEPTION_MIN; i <= CYGNUM_HAL_EXCEPTION_MAX; i++ ){
+ int j;
+ HAL_TRANSLATE_VECTOR( i, j );
+ HAL_INTERRUPT_ATTACH( j, &fail_exception_handler, j, 0 );
+ // we must also ensure that eCos handles the exception;
+ // do not drop into CygMon or equivalent.
+ // Leave USER_TRAP undisturbed so that breakpoints work.
+ if ( CYGNUM_HAL_VECTOR_USER_TRAP != i ) {
+ extern void hal_default_exception_vsr( void );
+ HAL_VSR_SET( i, (CYG_ADDRESS)hal_default_exception_vsr, NULL );
+ }
+ }
+
+ HAL_TRANSLATE_VECTOR( CYGNUM_HAL_VECTOR_UNALIGNED, i );
+ HAL_INTERRUPT_DETACH( i, &fail_exception_handler );
+ HAL_INTERRUPT_ATTACH( i, &skip_exception_handler, i, 0 );
+
+ CYG_TEST_INFO( "Vectors attached OK; calling do_test" );
+
+ do_test();
+
+ CYG_TEST_EXIT( "Done" );
+}
+
+// -------------------------------------------------------------------------
+externC void
+skip_exception_handler(CYG_ADDRWORD vector, CYG_ADDRWORD data,
+ CYG_ADDRWORD stackpointer)
+{
+ HAL_SavedRegisters *save;
+ HAL_FrameStructure *frame;
+
+ HAL_FLUSH_REGISTERS_TO_STACK();
+
+ save = (HAL_SavedRegisters *) stackpointer;
+ frame = (HAL_FrameStructure *) (save + 1); // immediately after
+
+ // now, this is the invokation environment when this saved regset
+ // was created (copied from hal_xvsr.S):
+ // ! here,locals have been set up as follows:
+ // ! %l0 = psr (with this CWP/window-level in it)
+ // ! %l1 = pc
+ // ! %l2 = npc
+ // ! %l3 = vector number (16-25 for traps)
+ // ! and we are in our own register window, though it is likely that
+ // ! the next one will need to be saved before we can use it:
+ // ! ie. this one is the invalid register window.
+ // and the intention is that we can mess therewith:
+
+ // Check we're not in a trap loop
+ if ( trap == save->li.l[1] ) {
+ same++;
+ if ( 10 < same )
+ CYG_TEST_FAIL_EXIT( "Repeated trap" );
+ }
+ else // restart the count
+ same = 0;
+
+ // and record it
+ trap = save->li.l[1];
+ tcount++;
+
+ // now step on so that we return to the instruction after:
+ save->li.l[1] = save->li.l[2]; // PC := NPC
+ save->li.l[2] += 4; // NPC += 4
+
+ // that's all.
+}
+
+externC void
+fail_exception_handler(CYG_ADDRWORD vector, CYG_ADDRWORD data,
+ CYG_ADDRWORD stackpointer)
+{
+ HAL_FLUSH_REGISTERS_TO_STACK();
+ CYG_TEST_FAIL_EXIT( "Other exception handler called" );
+}
+
+// -------------------------------------------------------------------------
+
+externC void
+#ifdef CYGPKG_KERNEL
+cyg_user_start( void )
+#else
+cyg_start( void )
+#endif
+{
+ sparc_ex_main();
+}
+
+// -------------------------------------------------------------------------
+
+cyg_uint64 get_ll( cyg_uint64 *p )
+{
+ return *p;
+}
+
+cyg_uint64 get_llplus( cyg_uint64 *p )
+{
+ cyg_uint64 ll = 0l, v;
+ ll = (cyg_uint32)p;
+ ll++;
+ v = *p;
+ v^= ll;
+ return v;
+}
+
+cyg_uint32 get_i( cyg_uint32 *p )
+{
+ return *p;
+}
+
+cyg_uint32 get_iplus( cyg_uint32 *p )
+{
+ cyg_uint32 i = 0, v;
+ i = (cyg_uint32)p;
+ i++;
+ v = *p;
+ v^= i;
+ return v;
+}
+
+cyg_uint16 get_s( cyg_uint16 *p )
+{
+ return *p;
+}
+
+cyg_uint16 get_splus( cyg_uint16 *p )
+{
+ cyg_uint16 s = 0, v;
+ s = (cyg_uint16)(0xffff & (cyg_uint32)p);
+ s++;
+ v = *p;
+ v^= s;
+ return v;
+}
+
+// -------------------------------------------------------------------------
+
+/* EOF sparc_ex.c */
diff --git a/cesar/ecos/packages/hal/sparc/leon/current/ChangeLog b/cesar/ecos/packages/hal/sparc/leon/current/ChangeLog
new file mode 100644
index 0000000000..a59e553d5e
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon/current/ChangeLog
@@ -0,0 +1,62 @@
+2003-07-18 Nick Garnett <nickg@balti.calivar.com>
+
+ * cdl/hal_sparc_leon.cdl:
+ Changed values for CYGNUM_HAL_RTC_NUMERATOR,
+ CYGNUM_HAL_RTC_DENOMINATOR and CYGNUM_HAL_RTC_PERIOD to
+ "default_value" from "calculated". This makes it easier
+ to change these values globally.
+
+2002-10-19 Jonathan Larmour <jifl@eCosCentric.com>
+
+ Patch from Jiri Gaisler:
+ * cdl/hal_sparc_leon.cdl: -msoft-float needn't be used in local package
+ since it's defined globally.
+ * include/hal_diag.h: Fix UART TX mask.
+
+2002-03-15 Hugo Tyson <hmt@redhat.com>
+
+ * cdl/hal_sparc_leon.cdl: Add -msoft-cloat to CYGBLD_GLOBAL_CFLAGS
+ (as well as LDFLAGS) - this gives perfect test coverage in minimal
+ build with the sim. NB pro tem the tools are called
+ sparc-rtems-gcc et al, but sparc-elf-gcc et al should be OK.
+
+2002-03-14 Jiri Gaisler <jiri@gaisler.com>
+
+ * Initial version based on the SPARClite SIM HAL.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+
+//EOF ChangeLog
diff --git a/cesar/ecos/packages/hal/sparc/leon/current/cdl/hal_sparc_leon.cdl b/cesar/ecos/packages/hal/sparc/leon/current/cdl/hal_sparc_leon.cdl
new file mode 100644
index 0000000000..9699246759
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon/current/cdl/hal_sparc_leon.cdl
@@ -0,0 +1,228 @@
+# ====================================================================
+#
+# hal_sparc_leon.cdl
+#
+# SPARC LEON target HAL package configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: hmt
+# Contributors:
+# Date: 2000-02-10
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_HAL_SPARC_LEON {
+ display "LEON processor"
+ parent CYGPKG_HAL_SPARC
+ define_header hal_sparc_leon.h
+ include_dir cyg/hal
+ description "
+ The LEON HAL package is provided for both simulator (TSIM)
+ and real hardware use"
+
+ compile hal_priv.c
+
+ define_proc {
+ puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_sparc.h>"
+ puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_sparc_leon.h>"
+ puts $::cdl_header "#define CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING /* true for LEON */"
+ puts $::cdl_header "#define HAL_IDLE_THREAD_ACTION hal_idle_thread_action /* true for LEON */"
+ }
+
+ cdl_component CYG_HAL_STARTUP {
+ display "Startup type"
+ flavor data
+ legal_values {"RAM"}
+ default_value {"RAM"}
+ no_define
+ define -file system.h CYG_HAL_STARTUP
+ description "
+ When targetting the LEON processor only the RAM startup type
+ is usable."
+ }
+
+ # Real-time clock/counter specifics
+ cdl_component CYGNUM_HAL_RTC_CONSTANTS {
+ display "Real-time clock constants."
+ flavor none
+
+ cdl_option CYGNUM_HAL_RTC_NUMERATOR {
+ display "Real-time clock numerator"
+ flavor data
+ default_value 1000000000
+ }
+ cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
+ display "Real-time clock denominator"
+ flavor data
+ default_value 100
+ }
+ cdl_option CYGNUM_HAL_RTC_PERIOD {
+ display "Real-time clock period"
+ flavor data
+ default_value 9999
+ }
+ }
+
+
+ cdl_component CYGBLD_GLOBAL_OPTIONS {
+ display "Global build options"
+ flavor none
+ description "
+ Global build options including control over
+ compiler flags, linker flags and choice of toolchain."
+
+
+ parent CYGPKG_NONE
+
+ cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
+ display "Global command prefix"
+ flavor data
+ no_define
+ default_value { "sparc-elf" }
+ description "
+ This option specifies the command prefix used when
+ invoking the build tools."
+ }
+
+ cdl_option CYGBLD_GLOBAL_CFLAGS_PRE {
+ display "Global compiler flags"
+ flavor data
+ no_define
+ default_value { "-mflat -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -g -O2 -ffunction-sections -fdata-sections -fno-exceptions -fvtable-gc -finit-priority" }
+ description "
+ This option controls the global compiler flags which
+ are used to compile all packages by
+ default. Individual packages may define
+ options which override these global flags."
+ }
+
+ cdl_option CYGBLD_GLOBAL_CFLAGS {
+ display "Final Global compiler flags"
+ flavor data
+ no_define
+ calculated {
+ CYGHWR_HAL_SPARC_FPU ?
+ get_data(CYGBLD_GLOBAL_CFLAGS_PRE) :
+ "-msoft-float ".get_data(CYGBLD_GLOBAL_CFLAGS_PRE)}
+ description "
+ This option append -msoft-float to CFLAGS if no
+ fpu is present "
+ }
+
+ cdl_option CYGBLD_GLOBAL_LDFLAGS_PRE {
+ display "Global linker flags"
+ flavor data
+ no_define
+ default_value { "-g -nostdlib -fvtable-gc -Wl,--gc-sections -Wl,-static" }
+ description "
+ This option controls the global linker flags. Individual
+ packages may define options which override these global flags."
+ }
+
+ cdl_option CYGBLD_GLOBAL_LDFLAGS {
+ display "Final Global linker flags"
+ flavor data
+ no_define
+ calculated {
+ CYGHWR_HAL_SPARC_FPU ?
+ get_data(CYGBLD_GLOBAL_LDFLAGS_PRE) :
+ "-msoft-float ".get_data(CYGBLD_GLOBAL_LDFLAGS_PRE)}
+ description "
+ This option append -msoft-float to LDFLAGS if no
+ fpu is present "
+ }
+ }
+
+ cdl_component CYGPKG_HAL_SPARC_LEON_OPTIONS {
+ display "LEON processor build options"
+ flavor none
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_HAL_SPARC_LEON_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the LEON processor HAL. These flags are
+ used in addition to the set of global flags."
+ }
+
+ cdl_option CYGPKG_HAL_SPARC_LEON_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the LEON processor HAL. These flags are
+ removed from the set of global flags if present."
+ }
+ }
+
+ cdl_component CYGHWR_MEMORY_LAYOUT {
+ display "Memory layout"
+ flavor data
+ no_define
+ calculated { "sparc_leon_ram" }
+
+ cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
+ display "Memory layout linker script fragment"
+ flavor data
+ no_define
+ define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
+ calculated { "<pkgconf/mlt_sparc_leon_ram.ldi>" }
+ }
+
+ cdl_option CYGHWR_MEMORY_LAYOUT_H {
+ display "Memory layout header file"
+ flavor data
+ no_define
+ define -file system.h CYGHWR_MEMORY_LAYOUT_H
+ calculated { "<pkgconf/mlt_sparc_leon_ram.h>" }
+ }
+ }
+}
diff --git a/cesar/ecos/packages/hal/sparc/leon/current/include/hal_cache.h b/cesar/ecos/packages/hal/sparc/leon/current/include/hal_cache.h
new file mode 100644
index 0000000000..704ad121b1
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon/current/include/hal_cache.h
@@ -0,0 +1,182 @@
+#ifndef CYGONCE_HAL_CACHE_H
+#define CYGONCE_HAL_CACHE_H
+
+//=============================================================================
+//
+// hal_cache.h
+//
+// HAL Cache control support (such as it is in the simulator)
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg, gthomas, hmt
+// Contributors: nickg, gthomas, hmt
+// Date: 1999-01-28
+// Purpose: Define Interrupt support
+// Description: The macros defined here provide the HAL APIs for handling
+// the caches.
+//
+// Usage:
+// #include <cyg/hal/hal_cache.h>
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/hal_sparc.h>
+
+#include <cyg/infra/cyg_type.h>
+
+//-----------------------------------------------------------------------------
+// LEON cache macros
+
+//-----------------------------------------------------------------------------
+// Cache dimensions
+
+// Data cache
+#define HAL_DCACHE_SIZE 0x4000 // Size of data cache in bytes
+#define HAL_DCACHE_LINE_SIZE 16 // Size of a data cache line
+#define HAL_DCACHE_WAYS 1 // Associativity of the cache
+
+// Instruction cache
+#define HAL_ICACHE_SIZE 0x4000 // Size of cache in bytes
+#define HAL_ICACHE_LINE_SIZE 16 // Size of a cache line
+#define HAL_ICACHE_WAYS 1 // Associativity of the cache
+
+#define HAL_DCACHE_SETS (HAL_DCACHE_SIZE/(HAL_DCACHE_LINE_SIZE*HAL_DCACHE_WAYS))
+#define HAL_ICACHE_SETS (HAL_ICACHE_SIZE/(HAL_ICACHE_LINE_SIZE*HAL_ICACHE_WAYS))
+
+//-----------------------------------------------------------------------------
+// Global control of data cache
+
+// Enable the data cache
+#define HAL_DCACHE_ENABLE() //*((int *)0x80000014) |= (int)0x0000000c
+// Disable the data cache
+#define HAL_DCACHE_DISABLE() //*((int *)0x80000014) &= ~(int)0x0000000c
+// Invalidate the entire cache
+#define HAL_DCACHE_INVALIDATE_ALL() //*((int *)0x80000014) |= (int)0x00400000
+// Synchronize the contents of the cache with memory.
+#define HAL_DCACHE_SYNC()
+
+// Set the data cache refill burst size
+//#define HAL_DCACHE_BURST_SIZE(_size_)
+
+// Set the data cache write mode
+//#define HAL_DCACHE_WRITE_MODE( _mode_ )
+
+//#define HAL_DCACHE_WRITETHRU_MODE 0
+//#define HAL_DCACHE_WRITEBACK_MODE 1
+
+// Load the contents of the given address range into the data cache
+// and then lock the cache so that it stays there.
+//#define HAL_DCACHE_LOCK(_base_, _size_)
+
+// Undo a previous lock operation
+//#define HAL_DCACHE_UNLOCK(_base_, _size_)
+
+// Unlock entire cache
+//#define HAL_DCACHE_UNLOCK_ALL()
+
+//-----------------------------------------------------------------------------
+// Data cache line control
+
+// Allocate cache lines for the given address range without reading its
+// contents from memory.
+//#define HAL_DCACHE_ALLOCATE( _base_ , _size_ )
+
+// Write dirty cache lines to memory and invalidate the cache entries
+// for the given address range.
+//#define HAL_DCACHE_FLUSH( _base_ , _size_ )
+
+// Invalidate cache lines in the given range without writing to memory.
+//#define HAL_DCACHE_INVALIDATE( _base_ , _size_ )
+
+// Write dirty cache lines to memory for the given address range.
+//#define HAL_DCACHE_STORE( _base_ , _size_ )
+
+// Preread the given range into the cache with the intention of reading
+// from it later.
+//#define HAL_DCACHE_READ_HINT( _base_ , _size_ )
+
+// Preread the given range into the cache with the intention of writing
+// to it later.
+//#define HAL_DCACHE_WRITE_HINT( _base_ , _size_ )
+
+// Allocate and zero the cache lines associated with the given range.
+//#define HAL_DCACHE_ZERO( _base_ , _size_ )
+
+//-----------------------------------------------------------------------------
+// Global control of Instruction cache - use Data cache controls since they
+// are not separatable.
+
+// Enable the instruction cache
+#define HAL_ICACHE_ENABLE() HAL_DCACHE_ENABLE()
+
+// Disable the instruction cache
+#define HAL_ICACHE_DISABLE() HAL_DCACHE_DISABLE()
+
+// Invalidate the entire cache
+#define HAL_ICACHE_INVALIDATE_ALL() HAL_DCACHE_SYNC(); HAL_DCACHE_INVALIDATE_ALL()
+
+// Synchronize the contents of the cache with memory.
+#define HAL_ICACHE_SYNC()
+
+// Set the instruction cache refill burst size
+//#define HAL_ICACHE_BURST_SIZE(_size_)
+
+// Load the contents of the given address range into the instruction cache
+// and then lock the cache so that it stays there.
+//#define HAL_ICACHE_LOCK(_base_, _size_)
+
+// Undo a previous lock operation
+//#define HAL_ICACHE_UNLOCK(_base_, _size_)
+
+// Unlock entire cache
+//#define HAL_ICACHE_UNLOCK_ALL()
+
+//-----------------------------------------------------------------------------
+// Instruction cache line control
+
+// Invalidate cache lines in the given range without writing to memory.
+//#define HAL_ICACHE_INVALIDATE( _base_ , _size_ )
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_HAL_CACHE_H
+// End of hal_cache.h
diff --git a/cesar/ecos/packages/hal/sparc/leon/current/include/hal_clock.h b/cesar/ecos/packages/hal/sparc/leon/current/include/hal_clock.h
new file mode 100644
index 0000000000..cc686403ad
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon/current/include/hal_clock.h
@@ -0,0 +1,128 @@
+#ifndef CYGONCE_HAL_CLOCK_H
+#define CYGONCE_HAL_CLOCK_H
+
+//=============================================================================
+//
+// hal_clock.h
+//
+// HAL clock support
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg, gthomas, hmt
+// Contributors: nickg, gthomas, hmt
+// Date: 1999-01-28
+// Purpose: Define clock support
+// Description: The macros defined here provide the HAL APIs for handling
+// the clock.
+//
+// Usage:
+// #include <cyg/hal/hal_intr.h> // which includes this file
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/hal/hal_io.h>
+
+//-----------------------------------------------------------------------------
+// Clock control
+
+// in erc32 simulator:
+// 4 = UART A
+// 5 = UART B
+// 7 = UART error
+// 12 = GPT (general purpose timer)
+// 13 = TI1 (realtime clock)
+// 15 = watchdog
+
+// in erc32 simulator:
+
+// The vector used by the Real time clock is defined in hal_xpic.h
+
+// We could place conditional code here to choose one clock or the other
+// depending on the selected interrupt vector... but pro tem: (pun intended)
+
+#define SPARC_LEON_TIMER_SCALE (24)
+
+/* These must be accessed word-wide to work! */
+
+#define SPARC_LEON_REG (0x80000000)
+
+#define SPARC_LEON_TI1_COUNTER (SPARC_LEON_REG + 0x40)
+#define SPARC_LEON_TI1_CRELOAD (SPARC_LEON_REG + 0x44)
+#define SPARC_LEON_SCALER (SPARC_LEON_REG + 0x60)
+#define SPARC_LEON_SRELOAD (SPARC_LEON_REG + 0x64)
+
+/* LEON timer control register bits */
+#define SPARC_LEON_TI1_EN 1 /* System Enable */
+#define SPARC_LEON_TI1_RL 2 /* Continuous Running */
+#define SPARC_LEON_TI1_LD 4 /* Counter Load */
+
+#define SPARC_LEON_TI1_CONTROL (SPARC_LEON_REG + 0x48)
+
+externC cyg_int32 cyg_hal_sparc_clock_period;
+
+#define HAL_CLOCK_INITIALIZE( _period_ ) CYG_MACRO_START \
+ cyg_hal_sparc_clock_period = (_period_); \
+ HAL_WRITE_UINT32( SPARC_LEON_TI1_CRELOAD, (_period_) ); \
+ HAL_WRITE_UINT32( SPARC_LEON_TI1_COUNTER, (_period_) ); \
+ HAL_WRITE_UINT32( SPARC_LEON_TI1_CONTROL, \
+ (SPARC_LEON_TI1_EN | \
+ SPARC_LEON_TI1_RL | \
+ SPARC_LEON_TI1_LD) ); \
+CYG_MACRO_END
+
+#define HAL_CLOCK_RESET( _vector_, _period_ ) /* nowt, it is freerunning */
+
+#define HAL_CLOCK_READ( _pvalue_ ) CYG_MACRO_START \
+ cyg_uint32 _read_; \
+ HAL_READ_UINT32( SPARC_LEON_TI1_COUNTER, _read_ ); \
+ *((cyg_uint32 *)(_pvalue_)) = \
+ (cyg_hal_sparc_clock_period - _read_ ); \
+CYG_MACRO_END
+
+
+#ifdef CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY
+#define HAL_CLOCK_LATENCY( _pvalue_ ) HAL_CLOCK_READ( _pvalue_ )
+#endif
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_HAL_CLOCK_H
+// End of hal_clock.h
diff --git a/cesar/ecos/packages/hal/sparc/leon/current/include/hal_diag.h b/cesar/ecos/packages/hal/sparc/leon/current/include/hal_diag.h
new file mode 100644
index 0000000000..43b1f455ec
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon/current/include/hal_diag.h
@@ -0,0 +1,132 @@
+#ifndef CYGONCE_HAL_HAL_DIAG_H
+#define CYGONCE_HAL_HAL_DIAG_H
+
+/*=============================================================================
+//
+// hal_diag.h
+//
+// HAL Support for Kernel Diagnostic Routines
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1999-01-11
+// Purpose: HAL Support for Kernel Diagnostic Routines
+// Description: Diagnostic routines for use during kernel development.
+// Usage: #include <cyg/hal/hal_diag.h>
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================*/
+
+#include <pkgconf/hal.h>
+
+#include <cyg/infra/cyg_type.h>
+
+/*---------------------------------------------------------------------------*/
+
+#define CYG_DIAG_USE_LEON
+
+/*---------------------------------------------------------------------------*/
+
+#ifdef CYG_DIAG_USE_LEON
+
+/*---------------------------------------------------------------------------*/
+/* Register addresses */
+
+#define SPARC_LEON_REG (0x80000000)
+
+/* These must be accessed word-wide to work! */
+#define SPARC_LEON_UART_IO( x ) ((cyg_uint32)(x))
+
+#define SPARC_LEON_UART_A_RX ((volatile cyg_uint32 *)(SPARC_LEON_REG + 0x70))
+#define SPARC_LEON_UART_A_TX ((volatile cyg_uint32 *)(SPARC_LEON_REG + 0x70))
+#define SPARC_LEON_UART_STATUS ((volatile cyg_uint32 *)(SPARC_LEON_REG + 0x74))
+#define SPARC_LEON_UART_RXAMASK (0x00001)
+#define SPARC_LEON_UART_TXAMASK (0x00004)
+
+
+/*---------------------------------------------------------------------------*/
+
+#define HAL_DIAG_INIT()
+
+#define HAL_DIAG_WRITE_CHAR(_c_) \
+{ \
+ if( 1 || _c_ != '\r' ) \
+ { \
+ while( (SPARC_LEON_UART_TXAMASK & *SPARC_LEON_UART_STATUS) == 0 ) \
+ continue; \
+ *SPARC_LEON_UART_A_TX = SPARC_LEON_UART_IO(_c_); \
+ } \
+}
+
+#define HAL_DIAG_READ_CHAR(_c_) \
+{ \
+ while( (SPARC_LEON_UART_RXAMASK & *SPARC_LEON_UART_STATUS) == 0 ) \
+ continue; \
+ _c_ = (char)*SPARC_LEON_UART_A_TX; \
+}
+
+#define XHAL_DIAG_WRITE_CHAR(_c_) \
+{ \
+ if( _c_ != '\r' ) \
+ { \
+ *SPARC_LEON_UART_A_TX = SPARC_LEON_UART_IO(_c_); \
+ } \
+}
+
+#define XHAL_DIAG_READ_CHAR(_c_) \
+{ \
+ _c_ = (char)*SPARC_LEON_UART_A_TX; \
+}
+
+#else
+/*---------------------------------------------------------------------------*/
+/* There is no diagnostic output on LEON processor */
+
+#define HAL_DIAG_INIT()
+
+#define HAL_DIAG_WRITE_CHAR(_c_)
+
+#define HAL_DIAG_READ_CHAR(_c_) (_c_) = 0
+
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* end of hal_diag.h */
+#endif /* CYGONCE_HAL_HAL_DIAG_H */
diff --git a/cesar/ecos/packages/hal/sparc/leon/current/include/hal_xpic.h b/cesar/ecos/packages/hal/sparc/leon/current/include/hal_xpic.h
new file mode 100644
index 0000000000..3757b387e8
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon/current/include/hal_xpic.h
@@ -0,0 +1,122 @@
+#ifndef CYGONCE_HAL_XPIC_H
+#define CYGONCE_HAL_XPIC_H
+
+//=============================================================================
+//
+// hal_xpic.h
+//
+// HAL eXternal Programmable Interrupt Controller support
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg, gthomas, hmt
+// Contributors: nickg, gthomas, hmt
+// Date: 1999-01-28
+// Purpose: Define Interrupt support
+// Description: The macros defined here provide the HAL APIs for handling
+// an external interrupt controller, and which interrupt is
+// used for what.
+//
+// Usage:
+// #include <cyg/hal/hal_intr.h> // which includes this file
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/hal/hal_io.h>
+
+//-----------------------------------------------------------------------------
+// Interrupt controller access
+
+// in leon simulator:
+// 2 = UART B
+// 3 = UART A
+// 1 = AHB error
+// 9 = TI2 (general purpose timer)
+// 8 = TI1 (realtime clock)
+
+// The vector used by the Real time clock
+#define CYGNUM_HAL_INTERRUPT_RTC CYGNUM_HAL_INTERRUPT_8
+
+
+/* These must be accessed word-wide to work! */
+#define SPARC_LEON_REG (0x80000000)
+
+#define SPARC_LEON_INTCON_PENDING (SPARC_LEON_REG + 0x94)
+#define SPARC_LEON_INTCON_MASK (SPARC_LEON_REG + 0x90)
+#define SPARC_LEON_INTCON_CLEAR (SPARC_LEON_REG + 0x9C)
+#define SPARC_LEON_INTCON_FORCE (SPARC_LEON_REG + 0x98)
+
+
+#define HAL_INTERRUPT_MASK( _vector_ ) CYG_MACRO_START \
+ cyg_uint32 _traps_, _mask_; \
+ HAL_DISABLE_INTERRUPTS( _traps_ ); \
+ HAL_READ_UINT32( SPARC_LEON_INTCON_MASK, _mask_ ); \
+ _mask_ &= ~( 1 << (_vector_) ); \
+ HAL_WRITE_UINT32(SPARC_LEON_INTCON_MASK, _mask_ ); \
+ HAL_RESTORE_INTERRUPTS( _traps_ ); \
+CYG_MACRO_END
+
+#define HAL_INTERRUPT_UNMASK( _vector_ ) CYG_MACRO_START \
+ cyg_uint32 _traps_, _mask_; \
+ HAL_DISABLE_INTERRUPTS( _traps_ ); \
+ HAL_READ_UINT32( SPARC_LEON_INTCON_MASK, _mask_ ); \
+ _mask_ |= ( 1 << (_vector_) ); \
+ HAL_WRITE_UINT32( SPARC_LEON_INTCON_MASK, _mask_ ); \
+ HAL_RESTORE_INTERRUPTS( _traps_ ); \
+CYG_MACRO_END
+
+#define HAL_INTERRUPT_ACKNOWLEDGE( _vector_ )
+/* Interrupts are automatically acknowledged by hardware, not needed ...
+#define HAL_INTERRUPT_ACKNOWLEDGE( _vector_ ) CYG_MACRO_START \
+ cyg_uint32 _traps_; \
+ HAL_DISABLE_INTERRUPTS( _traps_ ); \
+ HAL_WRITE_UINT32( SPARC_LEON_INTCON_CLEAR, ( 1 << (_vector_) ) ); \
+ HAL_RESTORE_INTERRUPTS( _traps_ ); \
+CYG_MACRO_END
+*/
+
+#define HAL_INTERRUPT_CONFIGURE( _vector_, _level_, _up_ ) /* nothing */
+
+#define HAL_INTERRUPT_SET_LEVEL( _vector_, _level_ ) /* nothing */
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_HAL_XPIC_H
+// End of hal_xpic.h
diff --git a/cesar/ecos/packages/hal/sparc/leon/current/include/halboot.si b/cesar/ecos/packages/hal/sparc/leon/current/include/halboot.si
new file mode 100644
index 0000000000..b8864b2792
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon/current/include/halboot.si
@@ -0,0 +1,151 @@
+#ifndef CYGONCE_HAL_HALBOOT_SI /* -*-asm-*- */
+#define CYGONCE_HAL_HALBOOT_SI
+// ====================================================================
+//
+// <platform>/halboot.si
+//
+// HAL bootup platform-oriented code (assembler)
+//
+// ====================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+// ====================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1999-02-01
+// Purpose: Bootup code, platform oriented.
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+// ====================================================================
+
+// External Platform Initial Setup
+//
+// This should set up RAM and caches, and calm down any external
+// interrupt sources.
+//
+// It is just plain included in vectors.S
+//
+// RAM has not yet been touched at all; in fact all you have is a
+// register window selected.
+
+
+ ! Empty macro for debugging vectors.S
+ .macro led val
+ .endm
+
+ ! Set memory according to simulator config
+
+ set 0x80000000, %l0 ! LEON register base address
+
+ ld [%l0 + 0x14], %l1 ! chech if we have been initialized
+ andcc %l1, 0x1, %g0
+ bne 4f
+ nop
+
+ flush ! if we are here, we are running on
+ set 0x1000f, %l1 ! the simulator....
+
+ st %l1, [%l0 + 0x14] ! enable caches
+
+ st %g0, [%l0 + 0x1c] ! clear LEON registers
+ st %g0, [%l0 + 0x20] !
+ st %g0, [%l0 + 0x90] !
+ st %g0, [%l0 + 0x94] !
+ st %g0, [%l0 + 0x98] !
+ st %g0, [%l0 + 0x9C] !
+ st %g0, [%l0 + 0xA0] !
+ st %g0, [%l0 + 0xA4] !
+ st %g0, [%l0 + 0xA4] !
+ st %g0, [%l0 + 0x78] !
+ st %g0, [%l0 + 0x88] !
+
+ ld [%l0 + 0xF8], %g1 ! load simulator rom size
+ clr %l2
+ subcc %g1, 0, %g0
+ be 3f
+ srl %g1, 13, %g1 ! calculate appropriate rom size
+1:
+ srl %g1, 1, %g1
+ tst %g1
+ bne,a 1b
+ inc %l2
+ sll %l2, 14, %l2
+ st %l2, [%l0 + 0x00] ! set prom size in memcfg1
+
+ set 0, %l2
+ ld [%l0 + 0xF4], %g2 ! load simulator ram size
+ srl %g2, 13, %g1 ! calculate appropriate ram size
+1:
+ srl %g1, 1, %g1
+ tst %g1
+ bne,a 1b
+ inc %l2
+ sll %l2, 9, %l2
+ or %l2, 0x20, %l2
+ st %l2, [%l0 + 0x04] ! set ram size in memcfg2
+ set 0x40000000, %l2
+ add %g2, %l2, %fp
+ sub %fp, 96*4, %sp
+3:
+ st %g0, [%sp] !probe for FPU
+! ld [%sp], %fsr
+ set 49, %l1
+ st %l1, [%l0 + 0x64] ! scaler = 49
+ st %l1, [%l0 + 0x60] ! scaler = 49
+
+2:
+
+ set -1, %l1
+ st %l1, [%l0 + 0x44] ! timer 1 = 0xffffff
+ set 7, %l1
+ st %l1, [%l0 + 0x48] ! start timer 1
+ st %l1, [%l0 + 0x78] ! enable UARTS
+ st %l1, [%l0 + 0x88]
+
+4:
+ ! then copy the branch instructions into the vector
+ rd %tbr, %g1
+ andn %g1, 0xfff, %g1 ! clear non-address bits
+ sethi %hi(real_vector_instructions), %l0
+ or %l0, %lo(real_vector_instructions), %l0
+ ld [ %l0 ], %l1
+ st %l1, [ %g1 ] ! into the vector
+ ld [ %l0 + 4 ], %l1
+ st %l1, [ %g1 + 4 ] ! into the vector
+
+#endif /* CYGONCE_HAL_HALBOOT_SI */
+/* EOF halboot.si */
diff --git a/cesar/ecos/packages/hal/sparc/leon/current/include/pkgconf/mlt_sparc_leon_ram.h b/cesar/ecos/packages/hal/sparc/leon/current/include/pkgconf/mlt_sparc_leon_ram.h
new file mode 100644
index 0000000000..c5f6424d26
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon/current/include/pkgconf/mlt_sparc_leon_ram.h
@@ -0,0 +1,19 @@
+// eCos memory layout - Fri Oct 20 08:18:20 2000
+
+// This is a generated file - do not edit
+
+#ifndef __ASSEMBLER__
+#include <cyg/infra/cyg_type.h>
+#include <stddef.h>
+
+#endif
+#define CYGMEM_REGION_ram (0x00000000)
+#define CYGMEM_REGION_ram_SIZE (0x100000)
+#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
+#ifndef __ASSEMBLER__
+extern char CYG_LABEL_NAME (__heap1) [];
+#endif
+#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
+#define CYGMEM_SECTION_heap1_SIZE (0x00100000 - (size_t) CYG_LABEL_NAME (__heap1))
+
+#define CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
diff --git a/cesar/ecos/packages/hal/sparc/leon/current/include/pkgconf/mlt_sparc_leon_ram.ldi b/cesar/ecos/packages/hal/sparc/leon/current/include/pkgconf/mlt_sparc_leon_ram.ldi
new file mode 100644
index 0000000000..2a8a004c1d
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon/current/include/pkgconf/mlt_sparc_leon_ram.ldi
@@ -0,0 +1,26 @@
+// eCos memory layout - Fri Oct 20 08:18:20 2000
+
+// This is a generated file - do not edit
+
+#include <cyg/infra/cyg_type.inc>
+
+MEMORY
+{
+ ram : ORIGIN = 0x00000000, LENGTH = 0x4000000
+}
+
+SECTIONS
+{
+ SECTIONS_BEGIN
+ SECTION_rom_vectors (ram, 0x00000000, LMA_EQ_VMA)
+ SECTION_text (ram, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_fini (ram, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_rodata (ram, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_rodata1 (ram, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_fixup (ram, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_gcc_except_table (ram, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_data (ram, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_bss (ram, ALIGN (0x8) (NOLOAD), LMA_EQ_VMA)
+ CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
+ SECTIONS_END
+}
diff --git a/cesar/ecos/packages/hal/sparc/leon/current/include/pkgconf/mlt_sparc_leon_ram.mlt b/cesar/ecos/packages/hal/sparc/leon/current/include/pkgconf/mlt_sparc_leon_ram.mlt
new file mode 100644
index 0000000000..60f264aa63
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon/current/include/pkgconf/mlt_sparc_leon_ram.mlt
@@ -0,0 +1,12 @@
+version 0
+region ram 00000000 4000000 0 !
+section rom_vectors 0 1 0 1 1 1 1 1 00000000 4000000 text text !
+section text 0 1 0 1 0 1 0 1 fini fini !
+section fini 0 1 0 1 0 1 0 1 rodata rodata !
+section rodata 0 1 0 1 0 1 0 1 rodata1 rodata1 !
+section rodata1 0 1 0 1 0 1 0 1 fixup fixup !
+section fixup 0 1 0 1 0 1 0 1 gcc_except_table gcc_except_table !
+section gcc_except_table 0 1 0 1 0 1 0 1 data data !
+section data 0 1 0 1 0 1 0 1 bss bss !
+section bss 0 8 0 1 0 1 0 1 heap1 heap1 !
+section heap1 0 8 0 0 0 0 0 0 !
diff --git a/cesar/ecos/packages/hal/sparc/leon/current/src/hal_priv.c b/cesar/ecos/packages/hal/sparc/leon/current/src/hal_priv.c
new file mode 100644
index 0000000000..cd254b15f2
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon/current/src/hal_priv.c
@@ -0,0 +1,114 @@
+//===========================================================================
+//
+// hal_priv.c
+//
+// SPARC Architecture LEON-specific private variables
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1999-02-20
+// Purpose: private vars for LEON processor.
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_arch.h>
+
+// ------------------------------------------------------------------------
+// Clock static to keep period recorded.
+cyg_int32 cyg_hal_sparc_clock_period = 0;
+
+// ------------------------------------------------------------------------
+// Board specific startups.
+
+extern void hal_board_prestart( void );
+extern void hal_board_poststart( void );
+
+static void leon2_eth_init(void)
+{
+ *((volatile cyg_uint32 *) 0x80000000) |= 0x10f80000;
+ *((volatile cyg_uint32 *) 0x800000A8) |=
+// (0xe0 | CYGNUM_DEVS_ETH_SPARC_LEON_IRQ_PIO) << (8*(CYGNUM_DEVS_ETH_SPARC_LEON_IRQ-4));
+ (0xe0 | 4) << (8*(4-4));
+}
+
+
+void hal_board_prestart( void )
+{
+//#ifdef CYGPKG_DEVS_ETH_SPARC_LEON
+ leon2_eth_init();
+//#endif
+}
+
+void hal_board_poststart( void )
+{
+ HAL_ENABLE_INTERRUPTS();
+ // OK to do this post constructors, and good for testing.
+}
+
+cyg_uint32
+hal_lsbit_index(cyg_uint32 mask)
+{
+ int i;
+ for (i = 0; i < 32; i++) {
+ if (mask & (1<<i)) return ((cyg_uint32)i);
+ }
+ return ((cyg_uint32)-1);
+}
+
+cyg_uint32
+hal_msbit_index(cyg_uint32 mask)
+{
+ int i;
+ for (i = 31; i >= 0; i--) {
+ if (mask & (1<<i)) return ((cyg_uint32)i);
+ }
+ return ((cyg_uint32)-1);
+}
+
+void
+hal_idle_thread_action(cyg_uint32 loop_count)
+{
+ *((volatile cyg_uint32 *) 0x80000018) = 0;
+}
+
+// EOF hal_priv.c
diff --git a/cesar/ecos/packages/hal/sparc/leon/current/support/README b/cesar/ecos/packages/hal/sparc/leon/current/support/README
new file mode 100644
index 0000000000..b4872d842e
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon/current/support/README
@@ -0,0 +1,32 @@
+
+LEON/TSIM Support
+=================
+
+See <http://www.gaisler.com> for information about the TSIM
+simulator and Leon project per se.
+
+The simulator TSIM can be run "as one" with GDB by using the
+script do-gdb-sim in this directory. The script can be used in
+automated testing systems to run as if it were embedded within
+GDB. It contains:
+
+----------------------------------------------------------------
+#! /bin/csh
+tsim-leon -nfp -gdb >& /dev/stdout &
+sparc-rtems-gdb -nw -nx $*:q
+----------------------------------------------------------------
+
+which simply runs tsim in background, directing its output to the
+common stdout.
+
+The command to connect to the simulator target will be
+
+ (gdb) target remote localhost:1234
+
+This fully described in the TSIM documentation from
+ (home) <http://www.gaisler.com/tsim.html>
+ (flyer) <http://www.gaisler.com/doc/tsim-erc32.pdf>
+ (doc) <http://www.gaisler.com/doc/tsim-1.0.18.pdf>
+
+
+
diff --git a/cesar/ecos/packages/hal/sparc/leon/current/support/do-gdb-sim b/cesar/ecos/packages/hal/sparc/leon/current/support/do-gdb-sim
new file mode 100644
index 0000000000..75085ce6f3
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon/current/support/do-gdb-sim
@@ -0,0 +1,3 @@
+#! /bin/csh
+tsim-leon -nfp -gdb >& /dev/stdout &
+sparc-rtems-gdb -nw -nx $*:q
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/ChangeLog b/cesar/ecos/packages/hal/sparc/leon3/current/ChangeLog
new file mode 100644
index 0000000000..48eba8b2d3
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/ChangeLog
@@ -0,0 +1,54 @@
+2002-10-19 Jonathan Larmour <jifl@eCosCentric.com>
+
+ Patch from Jiri Gaisler:
+ * cdl/hal_sparc_leon.cdl: -msoft-float needn't be used in local package
+ since it's defined globally.
+ * include/hal_diag.h: Fix UART TX mask.
+
+2002-03-15 Hugo Tyson <hmt@redhat.com>
+
+ * cdl/hal_sparc_leon.cdl: Add -msoft-cloat to CYGBLD_GLOBAL_CFLAGS
+ (as well as LDFLAGS) - this gives perfect test coverage in minimal
+ build with the sim. NB pro tem the tools are called
+ sparc-rtems-gcc et al, but sparc-elf-gcc et al should be OK.
+
+2002-03-14 Jiri Gaisler <jiri@gaisler.com>
+
+ * Initial version based on the SPARClite SIM HAL.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+
+//EOF ChangeLog
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/cdl/hal_sparc_leon3.cdl b/cesar/ecos/packages/hal/sparc/leon3/current/cdl/hal_sparc_leon3.cdl
new file mode 100644
index 0000000000..59d18288c7
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/cdl/hal_sparc_leon3.cdl
@@ -0,0 +1,242 @@
+# ====================================================================
+#
+# hal_sparc_leon.cdl
+#
+# SPARC LEON target HAL package configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: hmt
+# Contributors:
+# Date: 2000-02-10
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_HAL_SPARC_LEON3 {
+ display "Grlib's LEON3 processor"
+ parent CYGPKG_HAL_SPARC
+ define_header hal_sparc_leon3.h
+ include_dir cyg/hal
+ description "
+ Grlib's LEON3 processor HAL package is provided for use
+ with both real hardware and the Grmon simulator."
+
+ compile hal_priv.c boot.S hal_amba.c hal_amba_driver.c hal_diag.c hal_clock.c hal_irq.c
+ compile leon3_smp.c boot_smp.S hal_help.cxx
+
+ define_proc {
+ puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_sparc.h>"
+ puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_sparc_leon3.h>"
+ puts $::cdl_header "//#define CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING /* true for LEON3 */"
+ puts $::cdl_header "#define CYGHWR_HAL_SPARC_HAS_ASR17 /* true for LEON3 */"
+ puts $::cdl_header "#define HAL_IDLE_THREAD_ACTION hal_idle_thread_action /* true for LEON3 */"
+ }
+
+ cdl_component CYG_HAL_STARTUP {
+ display "Startup type"
+ flavor data
+ legal_values {"RAM"}
+ default_value {"RAM"}
+ no_define
+ define -file system.h CYG_HAL_STARTUP
+ description "
+ When targetting the LEON3 processor only the RAM startup type
+ is usable."
+ }
+
+ # Real-time clock/counter specifics
+ cdl_component CYGNUM_HAL_RTC_CONSTANTS {
+ display "Real-time clock constants."
+ flavor none
+
+ cdl_option CYGNUM_HAL_RTC_NUMERATOR {
+ display "Real-time clock numerator"
+ flavor data
+ calculated 1000000000
+ }
+ cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
+ display "Real-time clock denominator"
+ flavor data
+ calculated 100
+ }
+ cdl_option CYGNUM_HAL_RTC_PERIOD {
+ display "Real-time clock period"
+ flavor data
+ calculated 9999
+ }
+ }
+
+ cdl_component CYGBLD_GLOBAL_OPTIONS {
+ display "Global build options"
+ flavor none
+ description "
+ Global build options including control over
+ compiler flags, linker flags and choice of toolchain."
+
+
+ parent CYGPKG_NONE
+
+ cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
+ display "Global command prefix"
+ flavor data
+ no_define
+ default_value { "sparc-elf" }
+ description "
+ This option specifies the command prefix used when
+ invoking the build tools."
+ }
+
+ cdl_option CYGBLD_GLOBAL_CFLAGS_PRE {
+ display "Global compiler flags"
+ flavor data
+ no_define
+ default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
+ description "
+ This option controls the global compiler flags which
+ are used to compile all packages by
+ default. Individual packages may define
+ options which override these global flags."
+ }
+
+ cdl_option CYGBLD_GLOBAL_CFLAGS {
+ display "Final Global compiler flags"
+ flavor data
+ no_define
+ calculated {
+ (CYGHWR_HAL_SPARC_FLAT ? " -mflat " : " ") .
+ (CYGHWR_HAL_SPARC_FPU ? get_data(CYGBLD_GLOBAL_CFLAGS_PRE) : "-msoft-float ".get_data(CYGBLD_GLOBAL_CFLAGS_PRE) ) }
+ description "
+ This option append -msoft-float to CFLAGS if no
+ fpu is present "
+ }
+
+ cdl_option CYGBLD_GLOBAL_LDFLAGS_PRE {
+ display "Global linker flags"
+ flavor data
+ no_define
+ default_value { "-g -nostdlib -fvtable-gc -Wl,--gc-sections -Wl,-static" }
+ description "
+ This option controls the global linker flags. Individual
+ packages may define options which override these global flags."
+ }
+
+ cdl_option CYGBLD_GLOBAL_LDFLAGS {
+ display "Final Global linker flags"
+ flavor data
+ no_define
+ calculated {
+ (CYGHWR_HAL_SPARC_FLAT ? " -mflat " : " ") .
+ (CYGHWR_HAL_SPARC_FPU ? get_data(CYGBLD_GLOBAL_LDFLAGS_PRE) : "-msoft-float ".get_data(CYGBLD_GLOBAL_LDFLAGS_PRE)) }
+ description "
+ This option append -msoft-float to LDFLAGS if no
+ fpu is present "
+ }
+ }
+
+ cdl_option CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING {
+ display "Multiple vector trapping (MVT)"
+ default_value 1
+ description "
+ Use Multiple Vector Trapping (MVT) rather than Single Vector
+ Trapping (SVT); SVT is a feature of SPARClite CPUs which saves
+ code RAM at a cost of perhaps slower interrupt and trap dispatch
+ time, depending on cache behavior. This includes speed of
+ handling register window underflow and overflow, a feature of
+ deep function call stacks on SPARC. MVT requires 4kB of code
+ space for trap vectors; in contrast SVT uses fewer than 20
+ instructions for trap decoding."
+ }
+
+
+ cdl_component CYGPKG_HAL_SPARC_LEON3_OPTIONS {
+ display "LEON processor build options"
+ flavor none
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_HAL_SPARC_LEON3_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the LEON processor HAL. These flags are
+ used in addition to the set of global flags."
+ }
+
+ cdl_option CYGPKG_HAL_SPARC_LEON3_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the LEON processor HAL. These flags are
+ removed from the set of global flags if present."
+ }
+ }
+
+ cdl_component CYGHWR_MEMORY_LAYOUT {
+ display "Memory layout"
+ flavor data
+ no_define
+ calculated { "sparc_leon3_ram" }
+
+ cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
+ display "Memory layout linker script fragment"
+ flavor data
+ no_define
+ define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
+ calculated { "<pkgconf/mlt_sparc_leon3_ram.ldi>" }
+ }
+
+ cdl_option CYGHWR_MEMORY_LAYOUT_H {
+ display "Memory layout header file"
+ flavor data
+ no_define
+ define -file system.h CYGHWR_MEMORY_LAYOUT_H
+ calculated { "<pkgconf/mlt_sparc_leon3_ram.h>" }
+ }
+ }
+}
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_amba.h b/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_amba.h
new file mode 100644
index 0000000000..9705937076
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_amba.h
@@ -0,0 +1,235 @@
+#ifndef CYGONCE_HAL_AMBA_H
+#define CYGONCE_HAL_AMBA_H
+
+//=============================================================================
+//
+// hal_amba.h
+//
+// HAL AMBA defined
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research (Konrad Eisele <eiselekd@web.de>)
+// Contributors:
+// Date: 2004-01-12
+// Purpose: Define Interrupt support
+// Description:
+// Usage:
+// #include <cyg/hal/hal_amba.h>
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#define LEON3_IO_AREA 0xfff00000
+#define LEON3_CONF_AREA 0xff000
+#define LEON3_AHB_SLAVE_CONF_AREA (1 << 11)
+
+#define LEON3_AHB_CONF_WORDS 8
+#define LEON3_APB_CONF_WORDS 2
+#define LEON3_AHB_MASTERS 64
+#define LEON3_AHB_SLAVES 64
+#define LEON3_APB_SLAVES 16
+#define LEON3_APBUARTS 8
+
+/* Vendor codes */
+#define VENDOR_GAISLER 1
+#define VENDOR_PENDER 2
+#define VENDOR_ESA 4
+#define VENDOR_OPENCORES 8
+
+/* Gaisler Research device id's */
+#define GAISLER_LEON3 0x003
+#define GAISLER_LEON3DSU 0x004
+#define GAISLER_ETHAHB 0x005
+#define GAISLER_APBMST 0x006
+#define GAISLER_AHBUART 0x007
+#define GAISLER_SRCTRL 0x008
+#define GAISLER_SDCTRL 0x009
+#define GAISLER_APBUART 0x00C
+#define GAISLER_IRQMP 0x00D
+#define GAISLER_AHBRAM 0x00E
+#define GAISLER_GPTIMER 0x011
+#define GAISLER_PCITRG 0x012
+#define GAISLER_PCISBRG 0x013
+#define GAISLER_PCIFBRG 0x014
+#define GAISLER_PCITRACE 0x015
+#define GAISLER_PCIDMA 0x016
+#define GAISLER_AHBTRACE 0x017
+#define GAISLER_ETHDSU 0x018
+#define GAISLER_PIOPORT 0x01A
+#define GAISLER_ETHMAC 0x01D
+#define GAISLER_L2TIME 0xffd /* internal device: leon2 timer */
+#define GAISLER_L2C 0xffe /* internal device: leon2compat */
+#define GAISLER_PLUGPLAY 0xfff /* internal device: plug & play configarea */
+
+
+#ifndef __ASSEMBLER__
+
+extern inline char *gaisler_device_str(int id) {
+ switch(id) {
+ case GAISLER_LEON3: return "GAISLER_LEON3";
+ case GAISLER_LEON3DSU: return "GAISLER_LEON3DSU";
+ case GAISLER_ETHAHB: return "GAISLER_ETHAHB";
+ case GAISLER_ETHMAC: return "GAISLER_ETHMAC";
+ case GAISLER_APBMST: return "GAISLER_APBMST";
+ case GAISLER_AHBUART: return "GAISLER_AHBUART";
+ case GAISLER_SRCTRL: return "GAISLER_SRCTRL";
+ case GAISLER_SDCTRL: return "GAISLER_SDCTRL";
+ case GAISLER_APBUART: return "GAISLER_APBUART";
+ case GAISLER_IRQMP: return "GAISLER_IRQMP";
+ case GAISLER_AHBRAM: return "GAISLER_AHBRAM";
+ case GAISLER_GPTIMER: return "GAISLER_GPTIMER";
+ case GAISLER_PCITRG: return "GAISLER_PCITRG";
+ case GAISLER_PCISBRG: return "GAISLER_PCISBRG";
+ case GAISLER_PCIFBRG: return "GAISLER_PCIFBRG";
+ case GAISLER_PCITRACE: return "GAISLER_PCITRACE";
+ case GAISLER_AHBTRACE: return "GAISLER_AHBTRACE";
+ case GAISLER_ETHDSU: return "GAISLER_ETHDSU";
+ case GAISLER_PIOPORT: return "GAISLER_PIOPORT";
+
+ case GAISLER_L2TIME: return "GAISLER_L2TIME";
+ case GAISLER_L2C: return "GAISLER_L2C";
+ case GAISLER_PLUGPLAY: return "GAISLER_PLUGPLAY";
+
+ default: break;
+ }
+ return 0;
+}
+
+#endif
+
+/* European Space Agency device id's */
+#define ESA_LEON2 0x2
+#define ESA_MCTRL 0xF
+
+
+#ifndef __ASSEMBLER__
+
+extern inline char *esa_device_str(int id) {
+ switch(id) {
+ case ESA_LEON2: return "ESA_LEON2";
+ case ESA_MCTRL: return "ESA_MCTRL";
+ default: break;
+ }
+ return 0;
+}
+
+#endif
+
+/* Opencores device id's */
+#define OPENCORES_PCIBR 0x4
+#define OPENCORES_ETHMAC 0x5
+
+
+#ifndef __ASSEMBLER__
+
+extern inline char *opencores_device_str(int id) {
+ switch(id) {
+ case OPENCORES_PCIBR: return "OPENCORES_PCIBR";
+ case OPENCORES_ETHMAC: return "OPENCORES_ETHMAC";
+ default: break;
+ }
+ return 0;
+}
+
+extern inline char *device_id2str(int vendor, int id) {
+ switch(vendor) {
+ case VENDOR_GAISLER: return gaisler_device_str(id);
+ case VENDOR_ESA: return esa_device_str(id);
+ case VENDOR_OPENCORES: return opencores_device_str(id);
+ case VENDOR_PENDER:
+ default: break;
+ }
+ return 0;
+}
+
+extern inline char *vendor_id2str(int vendor) {
+ switch(vendor) {
+ case VENDOR_GAISLER: return "VENDOR_GAISLER";
+ case VENDOR_ESA: return "VENDOR_ESA";
+ case VENDOR_OPENCORES: return "VENDOR_OPENCORES";
+ case VENDOR_PENDER: return "VENDOR_PENDER";
+ default: break;
+ }
+ return 0;
+}
+
+#endif
+
+/* Vendor codes */
+
+
+
+/*
+ *
+ * Macros for manipulating Configuration registers
+ *
+ */
+
+#define LEON3_BYPASS_LOAD_PA(x) ((unsigned long)*((volatile unsigned long*)(x)))
+#define LEON3_BYPASS_STORE_PA(x,v) (*((volatile unsigned long*)(x)) = (unsigned long)(v))
+
+#define amba_get_confword(tab, index, word) (LEON3_BYPASS_LOAD_PA((tab).addr[(index)]+(word)))
+
+#define amba_vendor(x) (((x) >> 24) & 0xff)
+
+#define amba_device(x) (((x) >> 12) & 0xfff)
+
+#define amba_ahb_get_membar(tab, index, nr) (LEON3_BYPASS_LOAD_PA((tab).addr[(index)]+4+(nr)))
+
+#define amba_apb_get_membar(tab, index) (LEON3_BYPASS_LOAD_PA((tab).addr[(index)]+1))
+
+#define amba_membar_start(mbar) (((mbar) & 0xfff00000) & (((mbar) & 0xfff0) << 16))
+
+#define amba_iobar_start(base, iobar) ((base) | ((((iobar) & 0xfff00000)>>12) & (((iobar) & 0xfff0)<<4)) )
+
+#define amba_irq(conf) ((conf) & 0xf)
+
+#define amba_membar_type(mbar) ((mbar) & 0xf)
+
+#define AMBA_TYPE_APBIO 0x1
+#define AMBA_TYPE_MEM 0x2
+#define AMBA_TYPE_AHBIO 0x3
+
+#define AMBA_TYPE_AHBIO_ADDR(addr) (LEON3_IO_AREA | ((addr) >> 12))
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_HAL_AMBA_H
+// End of hal_amba.h
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_cache.h b/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_cache.h
new file mode 100644
index 0000000000..10f37cde41
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_cache.h
@@ -0,0 +1,214 @@
+#ifndef CYGONCE_HAL_CACHE_H
+#define CYGONCE_HAL_CACHE_H
+
+//=============================================================================
+//
+// hal_cache.h
+//
+// HAL Cache control support (such as it is in the simulator)
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg, gthomas, hmt
+// Contributors: nickg, gthomas, hmt
+// Date: 1999-01-28
+// Purpose: Define Interrupt support
+// Description: The macros defined here provide the HAL APIs for handling
+// the caches.
+//
+// Usage:
+// #include <cyg/hal/hal_cache.h>
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/hal_sparc.h>
+#include <cyg/hal/hal_leon3.h>
+
+#include <cyg/infra/cyg_type.h>
+
+//-----------------------------------------------------------------------------
+// LEON cache macros
+
+//-----------------------------------------------------------------------------
+// Cache dimensions
+
+// Data cache
+#define HAL_DCACHE_SIZE 0x4000 // Size of data cache in bytes
+#define HAL_DCACHE_LINE_SIZE 16 // Size of a data cache line
+#define HAL_DCACHE_WAYS 1 // Associativity of the cache
+
+// Instruction cache
+#define HAL_ICACHE_SIZE 0x4000 // Size of cache in bytes
+#define HAL_ICACHE_LINE_SIZE 16 // Size of a cache line
+#define HAL_ICACHE_WAYS 1 // Associativity of the cache
+
+#define HAL_DCACHE_SETS (HAL_DCACHE_SIZE/(HAL_DCACHE_LINE_SIZE*HAL_DCACHE_WAYS))
+#define HAL_ICACHE_SETS (HAL_ICACHE_SIZE/(HAL_ICACHE_LINE_SIZE*HAL_ICACHE_WAYS))
+
+//-----------------------------------------------------------------------------
+// Global control of data cache
+
+// Enable the data cache
+#define HAL_DCACHE_ENABLE()
+// Disable the data cache
+#define HAL_DCACHE_DISABLE()
+// Invalidate the entire cache
+#define HAL_DCACHE_INVALIDATE_ALL() __asm__ __volatile__(" flush "); \
+ __asm__ __volatile__("sta %%g0, [%%g0] %0\n\t": : \
+ "i" (ASI_LEON3_DFLUSH) : "memory");
+// Synchronize the contents of the cache with memory.
+#define HAL_DCACHE_SYNC()
+
+// Set the data cache refill burst size
+//#define HAL_DCACHE_BURST_SIZE(_size_)
+
+// Set the data cache write mode
+//#define HAL_DCACHE_WRITE_MODE( _mode_ )
+
+//#define HAL_DCACHE_WRITETHRU_MODE 0
+//#define HAL_DCACHE_WRITEBACK_MODE 1
+
+// Load the contents of the given address range into the data cache
+// and then lock the cache so that it stays there.
+//#define HAL_DCACHE_LOCK(_base_, _size_)
+
+// Undo a previous lock operation
+//#define HAL_DCACHE_UNLOCK(_base_, _size_)
+
+// Unlock entire cache
+//#define HAL_DCACHE_UNLOCK_ALL()
+
+//-----------------------------------------------------------------------------
+// Data cache line control
+
+// Allocate cache lines for the given address range without reading its
+// contents from memory.
+//#define HAL_DCACHE_ALLOCATE( _base_ , _size_ )
+
+// Write dirty cache lines to memory and invalidate the cache entries
+// for the given address range.
+//#define HAL_DCACHE_FLUSH( _base_ , _size_ )
+
+// Invalidate cache lines in the given range without writing to memory.
+//#define HAL_DCACHE_INVALIDATE( _base_ , _size_ )
+
+// Write dirty cache lines to memory for the given address range.
+//#define HAL_DCACHE_STORE( _base_ , _size_ )
+
+// Preread the given range into the cache with the intention of reading
+// from it later.
+//#define HAL_DCACHE_READ_HINT( _base_ , _size_ )
+
+// Preread the given range into the cache with the intention of writing
+// to it later.
+//#define HAL_DCACHE_WRITE_HINT( _base_ , _size_ )
+
+// Allocate and zero the cache lines associated with the given range.
+//#define HAL_DCACHE_ZERO( _base_ , _size_ )
+
+//-----------------------------------------------------------------------------
+// Global control of Instruction cache - use Data cache controls since they
+// are not separatable.
+
+// Enable the instruction cache
+#define HAL_ICACHE_ENABLE() HAL_DCACHE_ENABLE()
+
+// Disable the instruction cache
+#define HAL_ICACHE_DISABLE() HAL_DCACHE_DISABLE()
+
+// Invalidate the entire cache
+#define HAL_ICACHE_INVALIDATE_ALL() HAL_DCACHE_SYNC(); HAL_DCACHE_INVALIDATE_ALL()
+
+// Synchronize the contents of the cache with memory.
+#define HAL_ICACHE_SYNC()
+
+// Set the instruction cache refill burst size
+//#define HAL_ICACHE_BURST_SIZE(_size_)
+
+// Load the contents of the given address range into the instruction cache
+// and then lock the cache so that it stays there.
+//#define HAL_ICACHE_LOCK(_base_, _size_)
+
+// Undo a previous lock operation
+//#define HAL_ICACHE_UNLOCK(_base_, _size_)
+
+// Unlock entire cache
+//#define HAL_ICACHE_UNLOCK_ALL()
+
+//-----------------------------------------------------------------------------
+// Instruction cache line control
+
+// Invalidate cache lines in the given range without writing to memory.
+//#define HAL_ICACHE_INVALIDATE( _base_ , _size_ )
+
+//-----------------------------------------------------------------------------
+
+externC inline unsigned long sparc_leon3_get_dcachecfg(void) {
+ unsigned int retval;
+ __asm__ __volatile__("lda [%1] %2, %0\n\t" :
+ "=r" (retval) :
+ "r" (ASI_LEON3_SYSCTRL_DCFG),
+ "i" (ASI_LEON3_SYSCTRL));
+ return (retval);
+}
+
+externC inline void sparc_leon3_enable_snooping(void) {
+ //enable snooping
+ __asm__ volatile ("lda [%%g0] 2, %%l1\n\t" \
+ "set 0x800000, %%l2\n\t" \
+ "or %%l2, %%l1, %%l2\n\t" \
+ "sta %%l2, [%%g0] 2\n\t" \
+ : : : "l1", "l2");
+};
+
+externC inline void sparc_leon3_disable_cache(void) {
+ __asm__ volatile ("lda [%%g0] 2, %%l1\n\t" \
+ "set 0x00000f, %%l2\n\t" \
+ "andn %%l2, %%l1, %%l2\n\t" \
+ "sta %%l2, [%%g0] 2\n\t" \
+ : : : "l1", "l2");
+};
+
+
+
+#endif // ifndef CYGONCE_HAL_CACHE_H
+// End of hal_cache.h
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_clock.h b/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_clock.h
new file mode 100644
index 0000000000..6ac1b9f7e5
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_clock.h
@@ -0,0 +1,86 @@
+#ifndef CYGONCE_HAL_CLOCK_H
+#define CYGONCE_HAL_CLOCK_H
+
+//=============================================================================
+//
+// hal_clock.h
+//
+// HAL clock support
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg, gthomas, hmt
+// Contributors: nickg, gthomas, hmt
+// Date: 1999-01-28
+// Purpose: Define clock support
+// Description: The macros defined here provide the HAL APIs for handling
+// the clock.
+//
+// Usage:
+// #include <cyg/hal/hal_clock.h> // which includes this file
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/hal/hal_io.h>
+
+
+//-----------------------------------------------------------------------------
+// Clock control
+
+externC cyg_int32 cyg_hal_sparc_clock_period;
+externC void hal_sparc_leon3_clock_init(cyg_uint32 period);
+externC cyg_uint32 hal_sparc_leon3_clock_read(void);
+
+#define HAL_CLOCK_INITIALIZE( _period_ ) hal_sparc_leon3_clock_init(_period_);
+#define HAL_CLOCK_RESET( _vector_, _period_ )
+#define HAL_CLOCK_READ( _pvalue_ ) { \
+ cyg_uint32 _read_; \
+ _read_ = hal_sparc_leon3_clock_read(); \
+ *((cyg_uint32 *)(_pvalue_)) = \
+ (cyg_hal_sparc_clock_period - _read_ ); }
+
+#ifdef CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY
+#define HAL_CLOCK_LATENCY( _pvalue_ ) HAL_CLOCK_READ( _pvalue_ )
+#endif
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_HAL_CLOCK_H
+// End of hal_clock.h
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_diag.h b/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_diag.h
new file mode 100644
index 0000000000..49abd9ab44
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_diag.h
@@ -0,0 +1,93 @@
+#ifndef CYGONCE_HAL_HAL_DIAG_H
+#define CYGONCE_HAL_HAL_DIAG_H
+
+/*=============================================================================
+//
+// hal_diag.h
+//
+// HAL Support for Kernel Diagnostic Routines
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1999-01-11
+// Purpose: HAL Support for Kernel Diagnostic Routines
+// Description: Diagnostic routines for use during kernel development.
+// Usage: #include <cyg/hal/hal_diag.h>
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================*/
+
+#include <pkgconf/hal.h>
+
+#include <cyg/infra/cyg_type.h>
+
+/*---------------------------------------------------------------------------*/
+
+#define CYG_DIAG_USE_LEON
+
+/*---------------------------------------------------------------------------*/
+
+#ifdef CYG_DIAG_USE_LEON
+
+#define HAL_DIAG_INIT()
+
+externC void hal_sparc_leon3_write_char(char c, int wait);
+#define HAL_DIAG_WRITE_CHAR(_c_) hal_sparc_leon3_write_char(_c_,1);
+#define XHAL_DIAG_WRITE_CHAR(_c_) hal_sparc_leon3_write_char(_c_,0);
+
+externC char hal_sparc_leon3_read_char(int wait);
+#define HAL_DIAG_READ_CHAR(_c_) _c_ = hal_sparc_leon3_read_char(1);
+#define XHAL_DIAG_READ_CHAR(_c_) _c_ = = hal_sparc_leon3_read_char(0);
+
+#else
+/*---------------------------------------------------------------------------*/
+/* There is no diagnostic output on LEON processor */
+
+#define HAL_DIAG_INIT()
+
+#define HAL_DIAG_WRITE_CHAR(_c_)
+
+#define HAL_DIAG_READ_CHAR(_c_) (_c_) = 0
+
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* end of hal_diag.h */
+#endif /* CYGONCE_HAL_HAL_DIAG_H */
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_leon3.h b/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_leon3.h
new file mode 100644
index 0000000000..b587f19bbc
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_leon3.h
@@ -0,0 +1,229 @@
+#ifndef CYGONCE_HAL_LEON3_H
+#define CYGONCE_HAL_LEON3_H
+
+//=============================================================================
+//
+// hal_leon3.h
+//
+// HAL AMBA defined
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research (Konrad Eisele <eiselekd@web.de>)
+// Contributors:
+// Date: 2004-01-12
+// Purpose: Define Interrupt support
+// Description:
+// Usage:
+// #include <cyg/hal/hal_leon3.h>
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+
+#include <cyg/infra/cyg_type.h> // Base types
+#include <pkgconf/hal_sparc.h>
+#include <cyg/hal/hal_amba.h>
+
+/* ASI codes */
+#define ASI_LEON_CACHEMISS 0x01
+#define ASI_LEON_PCI 0x04
+#define ASI_LEON_IFLUSH 0x05
+#define ASI_LEON_DFLUSH 0x06
+#define ASI_LEON_ITAG 0x0c
+#define ASI_LEON_IDATA 0x0d
+#define ASI_LEON_DTAG 0x0e
+#define ASI_LEON_DDATA 0x0f
+#define ASI_LEON_MMUFLUSH 0x18
+#define ASI_LEON_MMUREGS 0x19
+#define ASI_LEON_BYPASS 0x1c
+#define ASI_LEON_FLUSH_PAGE 0x10
+/*
+#define ASI_LEON_FLUSH_SEGMENT 0x11
+#define ASI_LEON_FLUSH_REGION 0x12
+*/
+#define ASI_LEON_FLUSH_CTX 0x13
+#define ASI_LEON_DCTX 0x14
+#define ASI_LEON_ICTX 0x15
+#define ASI_MMU_DIAG 0x1d
+
+#define ASI_LEON3_IFLUSH 0x10
+#define ASI_LEON3_DFLUSH 0x11
+
+#define ASI_LEON3_SYSCTRL 0x02
+
+#define ASI_LEON3_SYSCTRL_ICFG 0x08
+#define ASI_LEON3_SYSCTRL_DCFG 0x0c
+#define ASI_LEON3_SYSCTRL_CFG_SNOOPING (1<<27)
+
+/*
+ * The following defines the bits in the LEON UART Status Registers.
+ */
+
+#define LEON_REG_UART_STATUS_DR 0x00000001 /* Data Ready */
+#define LEON_REG_UART_STATUS_TSE 0x00000002 /* TX Send Register Empty */
+#define LEON_REG_UART_STATUS_THE 0x00000004 /* TX Hold Register Empty */
+#define LEON_REG_UART_STATUS_BR 0x00000008 /* Break Error */
+#define LEON_REG_UART_STATUS_OE 0x00000010 /* RX Overrun Error */
+#define LEON_REG_UART_STATUS_PE 0x00000020 /* RX Parity Error */
+#define LEON_REG_UART_STATUS_FE 0x00000040 /* RX Framing Error */
+#define LEON_REG_UART_STATUS_ERR 0x00000078 /* Error Mask */
+
+
+/*
+ * The following defines the bits in the LEON UART Ctrl Registers.
+ */
+
+#define LEON_REG_UART_CTRL_RE 0x00000001 /* Receiver enable */
+#define LEON_REG_UART_CTRL_TE 0x00000002 /* Transmitter enable */
+#define LEON_REG_UART_CTRL_RI 0x00000004 /* Receiver interrupt enable */
+#define LEON_REG_UART_CTRL_TI 0x00000008 /* Transmitter interrupt enable */
+#define LEON_REG_UART_CTRL_PS 0x00000010 /* Parity select */
+#define LEON_REG_UART_CTRL_PE 0x00000020 /* Parity enable */
+#define LEON_REG_UART_CTRL_FL 0x00000040 /* Flow control enable */
+#define LEON_REG_UART_CTRL_LB 0x00000080 /* Loop Back enable */
+
+#define LEON3_GPTIMER_EN 1
+#define LEON3_GPTIMER_RL 2
+#define LEON3_GPTIMER_LD 4
+#define LEON3_GPTIMER_IRQEN 8
+
+
+/* irq masks */
+#define LEON_HARD_INT(x) (1 << (x)) /* irq 0-15 */
+#define LEON_IRQMASK_R 0x0000fffe /* bit 15- 1 */
+
+#define LEON3_IRQMPSTATUS_CPUNR 28
+
+#ifndef __ASSEMBLER__
+
+typedef struct {
+ volatile unsigned int ilevel;
+ volatile unsigned int ipend;
+ volatile unsigned int iforce;
+ volatile unsigned int iclear;
+ volatile unsigned int mpstatus;
+ volatile unsigned int notused01;
+ volatile unsigned int notused02;
+ volatile unsigned int notused03;
+ volatile unsigned int notused10;
+ volatile unsigned int notused11;
+ volatile unsigned int notused12;
+ volatile unsigned int notused13;
+ volatile unsigned int notused20;
+ volatile unsigned int notused21;
+ volatile unsigned int notused22;
+ volatile unsigned int notused23;
+ volatile unsigned int mask[16];
+ volatile unsigned int force[16];
+} LEON3_IrqCtrl_Regs_Map;
+externC volatile LEON3_IrqCtrl_Regs_Map *LEON3_IrqCtrl_Regs;
+
+typedef struct {
+ volatile unsigned int data;
+ volatile unsigned int status;
+ volatile unsigned int ctrl;
+ volatile unsigned int scaler;
+} LEON3_APBUART_Regs_Map;
+
+
+typedef struct {
+ volatile unsigned int val;
+ volatile unsigned int rld;
+ volatile unsigned int ctrl;
+ volatile unsigned int unused;
+} LEON3_GpTimerElem_Regs_Map;
+
+typedef struct {
+ volatile unsigned int scalar;
+ volatile unsigned int scalar_reload;
+ volatile unsigned int config;
+ volatile unsigned int unused;
+ volatile LEON3_GpTimerElem_Regs_Map e[8];
+} LEON3_GpTimer_Regs_Map;
+
+typedef struct {
+ volatile unsigned int iodata;
+ volatile unsigned int ioout;
+ volatile unsigned int iodir;
+ volatile unsigned int irqmask;
+ volatile unsigned int irqpol;
+ volatile unsigned int irqedge;
+} LEON3_IOPORT_Regs_Map;
+
+/*
+ * Types and structure used for AMBA Plug & Play bus scanning
+ */
+
+typedef struct amba_device_table {
+ int devnr; /* numbrer of devices on AHB or APB bus */
+ unsigned int *addr[16]; /* addresses to the devices configuration tables */
+ unsigned int allocbits[1]; /* 0=unallocated, 1=allocated driver */
+} amba_device_table;
+
+typedef struct amba_confarea_type {
+ amba_device_table ahbmst;
+ amba_device_table ahbslv;
+ amba_device_table apbslv;
+ unsigned int apbmst;
+} amba_confarea_type;
+
+extern unsigned long amba_find_apbslv_addr(unsigned long vendor, unsigned long device, unsigned long *irq);
+
+// collect apb slaves
+typedef struct amba_apb_device {
+ unsigned int start, irq;
+} amba_apb_device;
+extern int amba_get_free_apbslv_devices (int vendor, int device, amba_apb_device *dev,int nr);
+
+// collect ahb slaves
+typedef struct amba_ahb_device {
+ unsigned int start[4], irq;
+} amba_ahb_device;
+extern int amba_get_free_ahbslv_devices (int vendor, int device, amba_ahb_device *dev,int nr);
+extern void amba_init(void);
+
+#endif //!__ASSEMBLER__
+
+
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_HAL_LEON3_H
+// End of hal_leon3.h
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_leon3_smp.h b/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_leon3_smp.h
new file mode 100644
index 0000000000..84c65dad7d
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_leon3_smp.h
@@ -0,0 +1,240 @@
+#ifndef CYGONCE_HAL_LEON3_SMP_H
+#define CYGONCE_HAL_LEON3_SMP_H
+
+//=============================================================================
+//
+// hal_leon3_cmp.h
+//
+// HAL smp defined
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research (Konrad Eisele <eiselekd@web.de>)
+// Contributors:
+// Date: 2004-01-12
+// Purpose: Define Interrupt support
+// Description:
+// Usage:
+// #include <cyg/hal/hal_leon3.h>
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+
+#include <cyg/infra/cyg_type.h> // Base types
+#include <pkgconf/hal_sparc.h>
+#include <cyg/hal/hal_leon3.h>
+
+#ifdef CYGPKG_HAL_SMP_SUPPORT
+
+//-----------------------------------------------------------------------------
+// CPU numbering macros
+
+externC cyg_uint32 cyg_hal_smp_cpu_running_count;
+
+#define HAL_SMP_CPU_TYPE cyg_uint32
+
+#define HAL_SMP_CPU_MAX CYGPKG_HAL_SMP_CPU_MAX
+
+#define HAL_SMP_CPU_COUNT() cyg_hal_smp_cpu_running_count
+
+#define HAL_SMP_CPU_START_COUNT() HAL_SMP_CPU_MAX
+
+
+externC cyg_uint32 cyg_hal_smp_cpu_count2idx(cyg_uint32 n);
+externC cyg_uint32 cyg_hal_smp_cpu_idx2count(cyg_uint32 n);
+#define HAL_SMP_CPU_COUNT2IDX(n) cyg_hal_smp_cpu_count2idx(n)
+#define HAL_SMP_CPU_IDX2COUNT(n) cyg_hal_smp_cpu_idx2count(n)
+
+externC cyg_uint32 sparc_leon3_get_cpuid(void);
+
+#define HAL_SMP_CPU_THIS() \
+({ \
+ HAL_SMP_CPU_TYPE __id; \
+ __asm__ __volatile__( \
+ "rd %%asr17,%0\n\t" \
+ : "=r" (__id) : ); \
+ ((__id >> 28) & 0xff); \
+})
+
+#define HAL_SMP_CPU_NONE (CYGPKG_HAL_SMP_CPU_MAX+1)
+
+//-----------------------------------------------------------------------------
+// CPU startup
+
+__externC void cyg_hal_cpu_reset(HAL_SMP_CPU_TYPE cpu);
+
+#define HAL_SMP_CPU_START( __cpu ) cyg_hal_cpu_reset( __cpu );
+
+#define HAL_SMP_CPU_RESCHEDULE_INTERRUPT( __cpu, __wait ) \
+ cyg_hal_cpu_message( __cpu, HAL_SMP_MESSAGE_RESCHEDULE, 0, __wait);
+
+#define HAL_SMP_CPU_TIMESLICE_INTERRUPT( __cpu, __wait ) \
+ cyg_hal_cpu_message( __cpu, HAL_SMP_MESSAGE_TIMESLICE, 0, __wait);
+
+//-----------------------------------------------------------------------------
+// CPU message exchange
+
+__externC void cyg_hal_cpu_message( HAL_SMP_CPU_TYPE cpu,
+ CYG_WORD32 msg,
+ CYG_WORD32 arg,
+ CYG_WORD32 wait);
+
+#define HAL_SMP_MESSAGE_TYPE 0xF0000000
+#define HAL_SMP_MESSAGE_ARG (~HAL_SMP_MESSAGE_TYPE)
+
+#define HAL_SMP_MESSAGE_RESCHEDULE 0x10000000
+#define HAL_SMP_MESSAGE_MASK 0x20000000
+#define HAL_SMP_MESSAGE_UNMASK 0x30000000
+#define HAL_SMP_MESSAGE_REVECTOR 0x40000000
+#define HAL_SMP_MESSAGE_TIMESLICE 0x50000000
+
+
+//-----------------------------------------------------------------------------
+// Test-and-set support
+// These macros provide test-and-set support for the least significant bit
+// in a word.
+
+#define HAL_TAS_TYPE volatile CYG_WORD32
+
+#define HAL_TAS_SET( _tas_, _oldb_ ) \
+CYG_MACRO_START \
+{ \
+ register CYG_WORD32 __old = 1; \
+ __asm__ volatile ("swapa [%2] %3, %0" : \
+ "=r" (__old) : \
+ "0" (__old), \
+ "r" (&_tas_), \
+ "i" (1)); \
+ _oldb_ = ( __old & 1 ) != 0; \
+} \
+CYG_MACRO_END
+
+#define HAL_TAS_CLEAR( _tas_, _oldb_ ) \
+CYG_MACRO_START \
+{ \
+ register CYG_WORD32 __old = 0; \
+ __asm__ volatile ("swapa [%2] %3, %0" : \
+ "=r" (__old) : \
+ "0" (__old), \
+ "r" (&_tas_), \
+ "i" (1)); \
+ _oldb_ = ( __old & 1 ) != 0; \
+} \
+CYG_MACRO_END
+
+
+
+//-----------------------------------------------------------------------------
+// Spinlock support.
+// Built on top of test-and-set code.
+
+#define HAL_SPINLOCK_TYPE volatile CYG_WORD32
+
+#define HAL_SPINLOCK_INIT_CLEAR 0
+
+#define HAL_SPINLOCK_INIT_SET 1
+
+#define HAL_SPINLOCK_SPIN( _lock_ ) \
+CYG_MACRO_START \
+{ \
+ cyg_bool _val_; \
+ do \
+ { \
+ HAL_TAS_SET( _lock_, _val_ ); \
+ } while( _val_ ); \
+} \
+CYG_MACRO_END
+
+#define HAL_SPINLOCK_CLEAR( _lock_ ) \
+CYG_MACRO_START \
+{ \
+ cyg_bool _val_; \
+ HAL_TAS_CLEAR( _lock_ , _val_ ); \
+} \
+CYG_MACRO_END
+
+#define HAL_SPINLOCK_TRY( _lock_, _val_ ) \
+ HAL_TAS_SET( _lock_, _val_ ); \
+ (_val_) = (((_val_) & 1) == 0)
+
+#define HAL_SPINLOCK_TEST( _lock_, _val_ ) \
+ (_val_) = (((_lock_) & 1) != 0)
+
+//-----------------------------------------------------------------------------
+// Diagnostic output serialization
+
+__externC HAL_SPINLOCK_TYPE cyg_hal_smp_diag_lock;
+
+#define CYG_HAL_DIAG_LOCK_DATA_DEFN \
+ HAL_SPINLOCK_TYPE cyg_hal_smp_diag_lock = HAL_SPINLOCK_INIT_CLEAR
+
+#define CYG_HAL_DIAG_LOCK() HAL_SPINLOCK_SPIN( cyg_hal_smp_diag_lock )
+
+#define CYG_HAL_DIAG_UNLOCK() HAL_SPINLOCK_CLEAR( cyg_hal_smp_diag_lock )
+
+#define leon3smp_diag_printf(fmt,arg...) \
+ CYG_HAL_DIAG_LOCK(); \
+ diag_printf(fmt,##arg); \
+ CYG_HAL_DIAG_UNLOCK();
+
+//-----------------------------------------------------------------------------
+// Some extra definitions
+
+__externC HAL_SPINLOCK_TYPE cyg_hal_ioapic_lock;
+
+//-----------------------------------------------------------------------------
+
+//--------------------------------------------------------------------------
+// irqmp interrupt configuration
+// Additional SMP interrupt configuration support.
+
+externC void leon3_interrupt_set_cpu( CYG_WORD32 vector, HAL_SMP_CPU_TYPE cpu );
+externC void leon3_interrupt_get_cpu( CYG_WORD32 vector, HAL_SMP_CPU_TYPE *cpu );
+externC void leon3_smpirq_raise(CYG_WORD32 cpu);
+
+#define HAL_INTERRUPT_SET_CPU( _vector_, _cpu_ ) leon3_interrupt_set_cpu( _vector_, _cpu_ );
+#define HAL_INTERRUPT_GET_CPU( _vector_, _cpu_ ) leon3_interrupt_get_cpu( _vector_, &(_cpu_) );
+
+#endif // CYGPKG_HAL_SMP_SUPPORT
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_HAL_LEON3_SMP_H
+// End of hal_leon3_smp.h
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_xpic.h b/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_xpic.h
new file mode 100644
index 0000000000..a28c3f49ec
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/include/hal_xpic.h
@@ -0,0 +1,101 @@
+#ifndef CYGONCE_HAL_XPIC_H
+#define CYGONCE_HAL_XPIC_H
+
+//=============================================================================
+//
+// hal_xpic.h
+//
+// HAL eXternal Programmable Interrupt Controller support
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg, gthomas, hmt
+// Contributors: nickg, gthomas, hmt
+// Date: 1999-01-28
+// Purpose: Define Interrupt support
+// Description: The macros defined here provide the HAL APIs for handling
+// an external interrupt controller, and which interrupt is
+// used for what.
+//
+// Usage:
+// #include <cyg/hal/hal_intr.h> // which includes this file
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/hal/hal_io.h>
+#include <cyg/hal/hal_smp.h>
+#include <cyg/hal/hal_leon3.h>
+
+//-----------------------------------------------------------------------------
+// Interrupt controller access
+
+// The vector used by the Real time clock
+externC cyg_uint32 hal_sparc_leon3_clock_irqnr(void);
+#define CYGNUM_HAL_INTERRUPT_RTC hal_sparc_leon3_clock_irqnr()
+
+
+externC void leon3_disable_irq(unsigned int irq_nr);
+externC void leon3_enable_irq(unsigned int irq_nr);
+
+#define HAL_INTERRUPT_MASK( _vector_ ) CYG_MACRO_START \
+ cyg_uint32 _traps_, _mask_; \
+ HAL_DISABLE_INTERRUPTS( _traps_ ); \
+ leon3_disable_irq(_vector_); \
+ HAL_RESTORE_INTERRUPTS( _traps_ ); \
+CYG_MACRO_END
+
+#define HAL_INTERRUPT_UNMASK( _vector_ ) CYG_MACRO_START \
+ cyg_uint32 _traps_, _mask_; \
+ HAL_DISABLE_INTERRUPTS( _traps_ ); \
+ leon3_enable_irq(_vector_); \
+ HAL_RESTORE_INTERRUPTS( _traps_ ); \
+CYG_MACRO_END
+
+#define HAL_INTERRUPT_ACKNOWLEDGE( _vector_ ) /* nothing */
+
+#define HAL_INTERRUPT_CONFIGURE( _vector_, _level_, _up_ ) /* nothing */
+
+#define HAL_INTERRUPT_SET_LEVEL( _vector_, _level_ ) /* nothing */
+
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_HAL_XPIC_H
+// End of hal_xpic.h
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/include/halboot.si b/cesar/ecos/packages/hal/sparc/leon3/current/include/halboot.si
new file mode 100644
index 0000000000..737b0b073b
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/include/halboot.si
@@ -0,0 +1,75 @@
+#ifndef CYGONCE_HAL_HALBOOT_SI /* -*-asm-*- */
+#define CYGONCE_HAL_HALBOOT_SI
+// ====================================================================
+//
+// <platform>/halboot.si
+//
+// HAL bootup platform-oriented code (assembler)
+//
+// ====================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+// ====================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1999-02-01
+// Purpose: Bootup code, platform oriented.
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+// ====================================================================
+
+// External Platform Initial Setup
+//
+// This should set up RAM and caches, and calm down any external
+// interrupt sources.
+//
+// It is just plain included in vectors.S
+//
+// RAM has not yet been touched at all; in fact all you have is a
+// register window selected.
+
+
+ ! Empty macro for debugging vectors.S
+ .macro led val
+ .endm
+
+ call hal_sparc_leon_init
+ nop
+
+
+#endif /* CYGONCE_HAL_HALBOOT_SI */
+/* EOF halboot.si */
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/include/leon3_arch.inc b/cesar/ecos/packages/hal/sparc/leon3/current/include/leon3_arch.inc
new file mode 100644
index 0000000000..d7a63dcc6e
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/include/leon3_arch.inc
@@ -0,0 +1,70 @@
+#ifndef CYGONCE_HAL_LEON3_ARCH_INC
+#define CYGONCE_HAL_LEON3_ARCH_INC
+##=============================================================================
+##
+## arch.inc
+##
+## sparc assembler header file
+##
+##=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+##=============================================================================
+#######DESCRIPTIONBEGIN####
+##
+## Author(s): Gaisler Research (Konrad Eisele<eiselekd@web.de>)
+## Contributors:
+## Date:
+## Purpose: Architecture definitions.
+## Description: This file contains definitions and macros that are
+## useful for writing assembly code for the sparc CPU family.
+## Usage:
+## #include <cyg/hal/arch.inc>
+## ...
+##
+##
+######DESCRIPTIONEND####
+##
+##=============================================================================
+
+#ifdef CYGPKG_HAL_SMP_SUPPORT
+
+ // Put CPU number in register
+ .macro hal_smp_cpu reg
+ rd %asr17,\reg
+ srl \reg,28,\reg
+ .endm
+
+#endif
+
+#endif // ifndef CYGONCE_HAL_LEON3_ARCH_INC
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/include/pkgconf/mlt_sparc_leon3_ram.h b/cesar/ecos/packages/hal/sparc/leon3/current/include/pkgconf/mlt_sparc_leon3_ram.h
new file mode 100644
index 0000000000..1e57573868
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/include/pkgconf/mlt_sparc_leon3_ram.h
@@ -0,0 +1,21 @@
+// eCos memory layout - Fri Oct 20 08:18:20 2000
+
+// This is a generated file - do not edit
+
+#ifndef __ASSEMBLER__
+#include <cyg/infra/cyg_type.h>
+#include <stddef.h>
+#endif
+
+externC unsigned int cyg_hal_stack_top;
+#define CYGHAL_DSUSUPPLIED_STACK_TOP cyg_hal_stack_top
+
+#define CYGMEM_REGION_ram (0x40000000)
+#define CYGMEM_REGION_ram_SIZE (CYGHAL_DSUSUPPLIED_STACK_TOP-CYGMEM_REGION_ram)
+#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
+#ifndef __ASSEMBLER__
+extern char CYG_LABEL_NAME (__heap1) [];
+#endif
+#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
+#define CYGMEM_SECTION_heap1_SIZE (CYGHAL_DSUSUPPLIED_STACK_TOP - (size_t) CYG_LABEL_NAME (__heap1))
+
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/include/pkgconf/mlt_sparc_leon3_ram.h.bck b/cesar/ecos/packages/hal/sparc/leon3/current/include/pkgconf/mlt_sparc_leon3_ram.h.bck
new file mode 100644
index 0000000000..142bb485fd
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/include/pkgconf/mlt_sparc_leon3_ram.h.bck
@@ -0,0 +1,19 @@
+// eCos memory layout - Fri Oct 20 08:18:20 2000
+
+// This is a generated file - do not edit
+
+#ifndef __ASSEMBLER__
+#include <cyg/infra/cyg_type.h>
+#include <stddef.h>
+
+#endif
+#define CYGMEM_REGION_ram (0x40000000)
+#define CYGMEM_REGION_ram_SIZE (0x100000)
+#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
+#ifndef __ASSEMBLER__
+extern char CYG_LABEL_NAME (__heap1) [];
+#endif
+#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
+#define CYGMEM_SECTION_heap1_SIZE (0x40100000 - (size_t) CYG_LABEL_NAME (__heap1))
+
+#define CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/include/pkgconf/mlt_sparc_leon3_ram.ldi b/cesar/ecos/packages/hal/sparc/leon3/current/include/pkgconf/mlt_sparc_leon3_ram.ldi
new file mode 100644
index 0000000000..c6df5cbe59
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/include/pkgconf/mlt_sparc_leon3_ram.ldi
@@ -0,0 +1,26 @@
+// eCos memory layout - Fri Oct 20 08:18:20 2000
+
+// This is a generated file - do not edit
+
+#include <cyg/infra/cyg_type.inc>
+
+MEMORY
+{
+ ram : ORIGIN = 0x40000000, LENGTH = 0x40000000
+}
+
+SECTIONS
+{
+ SECTIONS_BEGIN
+ SECTION_rom_vectors (ram, 0x40000000, LMA_EQ_VMA)
+ SECTION_text (ram, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_fini (ram, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_rodata (ram, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_rodata1 (ram, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_fixup (ram, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_gcc_except_table (ram, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_data (ram, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_bss (ram, ALIGN (0x8) (NOLOAD), LMA_EQ_VMA)
+ CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
+ SECTIONS_END
+}
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/include/pkgconf/mlt_sparc_leon3_ram.mlt b/cesar/ecos/packages/hal/sparc/leon3/current/include/pkgconf/mlt_sparc_leon3_ram.mlt
new file mode 100644
index 0000000000..173485c807
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/include/pkgconf/mlt_sparc_leon3_ram.mlt
@@ -0,0 +1,12 @@
+version 0
+region ram 40000000 40000000 0 !
+section rom_vectors 0 1 0 1 1 1 1 1 40000000 40000000 text text !
+section text 0 1 0 1 0 1 0 1 fini fini !
+section fini 0 1 0 1 0 1 0 1 rodata rodata !
+section rodata 0 1 0 1 0 1 0 1 rodata1 rodata1 !
+section rodata1 0 1 0 1 0 1 0 1 fixup fixup !
+section fixup 0 1 0 1 0 1 0 1 gcc_except_table gcc_except_table !
+section gcc_except_table 0 1 0 1 0 1 0 1 data data !
+section data 0 1 0 1 0 1 0 1 bss bss !
+section bss 0 8 0 1 0 1 0 1 heap1 heap1 !
+section heap1 0 8 0 0 0 0 0 0 !
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/src/boot.S b/cesar/ecos/packages/hal/sparc/leon3/current/src/boot.S
new file mode 100644
index 0000000000..659be92f1d
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/src/boot.S
@@ -0,0 +1,430 @@
+// ====================================================================
+//
+// HAL bootup platform-oriented code (assembler)
+//
+// ====================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+// ====================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research, (Konrad Eisele<eiselekd@web.de>)
+// Contributors:
+// Date: 1999-02-01
+// Purpose: Bootup code, platform oriented.
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+// ====================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+#include <cyg/hal/hal_amba.h>
+#include <pkgconf/hal_sparc_leon3.h>
+
+!unsigned int ahbslv_scan(register unsigned int vendor,register unsigned int driver) {
+! register unsigned int conf, mbar,i, *confp;
+! register unsigned int cfg_area = (unsigned int ) (LEON3_IO_AREA | LEON3_CONF_AREA | LEON3_AHB_SLAVE_CONF_AREA);
+! for (i = 0; i < LEON3_AHB_SLAVES; i++)
+! {
+! confp = (unsigned int*)(cfg_area + (i * LEON3_AHB_CONF_WORDS * 4));
+! conf = *confp;
+! //mbar = *(unsigned int*)(i * LEON3_AHB_CONF_WORDS+ (4 * 4));
+! if ((amba_vendor(conf) == vendor) && (amba_device(conf) == driver)) {
+! return (unsigned int)confp;
+! }
+! }
+! return 0;
+!}
+
+ .section ".text"
+ .align 4
+ahbslv_scan:
+ mov %o0, %g1
+ mov -2048, %o5
+ mov 0, %o3
+ sll %o3, 5, %o0
+.LL11:
+ add %o5, %o0, %o4
+ ld [%o5+%o0], %o2
+ srl %o2, 24, %o0
+ cmp %o0, %g1
+ bne,a .LL10
+ add %o3, 1, %o3
+ srl %o2, 12, %o0
+ and %o0, 4095, %o0
+ cmp %o0, %o1
+ be .LL1
+ mov %o4, %o2
+ add %o3, 1, %o3
+.LL10:
+ cmp %o3, 63
+ bleu,a .LL11
+ sll %o3, 5, %o0
+ mov 0, %o2
+.LL1:
+ retl
+ mov %o2, %o0
+
+
+!unsigned int apbslv_scan(register unsigned int base,register unsigned int vendor, register unsigned int driver) {
+! register unsigned int conf, mbar,i, *confp;
+! for (i = 0; i < LEON3_APB_SLAVES; i++)
+! {
+! confp = (unsigned int*)(base + (i * LEON3_APB_CONF_WORDS * 4));
+! conf = *confp;
+! //mbar = *(unsigned int*)(i * LEON3_AHB_CONF_WORDS+ (4 * 4));
+! if ((amba_vendor(conf) == vendor) && (amba_device(conf) == driver)) {
+! return (unsigned int)confp;
+! }
+! }
+! return 0;
+!}
+
+
+
+ .section ".text"
+ .align 4
+
+apbslv_scan:
+ mov %o0, %g1
+ mov 0, %o4
+ sll %o4, 3, %o0
+.LL22:
+ add %g1, %o0, %o5
+ ld [%g1+%o0], %o3
+ srl %o3, 24, %o0
+ cmp %o0, %o1
+ bne,a .LL21
+ add %o4, 1, %o4
+ srl %o3, 12, %o0
+ and %o0, 4095, %o0
+ cmp %o0, %o2
+ be .LL12
+ mov %o5, %o3
+ add %o4, 1, %o4
+.LL21:
+ cmp %o4, 15
+ bleu,a .LL22
+ sll %o4, 3, %o0
+ mov 0, %o3
+.LL12:
+ retl
+ mov %o3, %o0
+
+
+
+!unsigned int getbase(register unsigned int *mbar,register unsigned int iobase) {
+! register unsigned int conf = mbar[1];
+! return ((iobase & 0xfff00000) |
+! ((conf & 0xfff00000)>> 12)) & (((conf & 0x0000fff0) <<4) | 0xfff00000);
+!
+!}
+
+
+ .section ".text"
+ .align 4
+
+getbase:
+ ld [%o0+4], %o2
+ sethi %hi(-1048576), %o3
+ and %o1, %o3, %o1
+ and %o2, %o3, %o0
+ srl %o0, 12, %o0
+ or %o1, %o0, %o1
+ sethi %hi(64512), %o0
+ or %o0, 1008, %o0
+ and %o2, %o0, %o2
+ sll %o2, 4, %o2
+ or %o2, %o3, %o2
+ and %o1, %o2, %o1
+ retl
+ mov %o1, %o0
+
+
+#define BOOTLOADER_FREQ_KHZ 40000
+#define BOOTLOADER_SRAMSZ_KB 4096
+#define BOOTLOADER_SDRAMSZ_MB 0
+#define BOOTLOADER_BAUD 38400
+
+#define BOOTLOADER_memcfg1 0x28022
+#define BOOTLOADER_memcfg2 0x4201220
+#define BOOTLOADER_uart 0xa2
+#define BOOTLOADER_loopback 0x0
+#define BOOTLOADER_flow 0x0
+#define BOOTLOADER_ftreg 0x0
+
+#define BOOTLOADER_grlib_sdram 0x420013b
+
+#define BOOTLOADER_freq 40500000
+
+#define BOOTLOADER_ramsize 0x3ff000
+#define BOOTLOADER_romsize 0x800000
+#define BOOTLOADER_stack 0x403fefe0
+
+#define START_USING_DSU
+
+
+
+
+ .global hal_sparc_leon_init
+ .global LEON3_IrqCtrl_Regs, LEON3_GpTimer_Regs, LEON3_APBUART_Regs
+hal_sparc_leon_init:
+
+ flush
+
+#ifdef CYGPKG_HAL_SMP_SUPPORT
+ !lda [%g0] 2, %g1 ! init cache
+ !set 0x800000, %g2 ! snooping enable
+ !or %g2, %g1, %g2
+
+ !set 0x800000, %g2 ! snooping,disable cache for test
+
+ !sta %g2, [%g0] 2 ! init cache
+
+ !set 0x81000f, %g2 ! snooping enable
+ !set 0x800000, %g2 ! snooping enable
+#else
+ !set 0x01000f, %g2
+ !set 0x000000, %g2
+ !sta %g2, [%g0] 2 ! init cache
+#endif
+
+ clr %g1
+ clr %g2
+ clr %g3
+ clr %g4
+ clr %g5
+ clr %g6
+ mov %o7,%g7
+
+ set VENDOR_GAISLER, %o0
+ set GAISLER_APBMST, %o1
+ call ahbslv_scan
+ nop
+
+ cmp %g0,%o0
+ be .goonhardreset
+ nop
+
+ ld [%o0+16],%g1
+ set LEON3_IO_AREA,%o0
+ and %g1,%o0,%g1 !g1: apb base
+
+ set LEON3_CONF_AREA,%o0
+ or %g1,%o0,%g2 !g2: apb conf base
+
+ ! *********** irq *****************
+ mov %g2,%o0
+ set VENDOR_GAISLER, %o1
+ set GAISLER_IRQMP,%o2
+ call apbslv_scan
+ nop
+ cmp %g0,%o0
+ be .goonhardreset
+ nop
+
+ call getbase
+ mov %g1,%o1
+
+ st %g0, [%o1 + 0x0] !irq pri
+ st %g0, [%o1 + 0x4] !irq pend
+ st %g0, [%o1 + 0x8] !irq force
+ st %g0, [%o1 + 0xC] !irq clear
+ st %g0, [%o1 + 0x40] !irq mask
+
+ set LEON3_IrqCtrl_Regs,%o0
+ st %o1,[%o0]
+
+ ! *********** timer *****************
+
+ mov %g2,%o0
+ set VENDOR_GAISLER, %o1
+ set GAISLER_GPTIMER,%o2
+ call apbslv_scan
+ nop
+ cmp %g0,%o0
+ be .goonhardreset
+ nop
+
+ call getbase
+ mov %g1,%o1
+
+ set (BOOTLOADER_FREQ_KHZ+500)/1000, %o0 ! Load timer scaler register
+ sub %o0, 1, %o0
+ st %o0, [%o1 + 0x00] ! scaler
+ st %o0, [%o1 + 0x04] ! scaler reload
+
+ set LEON3_GpTimer_Regs,%o0
+ st %o1,[%o0]
+
+#ifndef START_USING_DSU
+
+ ! ************ mctrl ************
+
+ mov %g2,%o0
+ set VENDOR_ESA, %o1
+ set ESA_MCTRL,%o2
+ call apbslv_scan
+ nop
+ cmp %g0,%o0
+ be .LL1mctlsdram
+ nop
+
+ call getbase
+ mov %g1,%o1
+
+#define MCTRLBASE %g4
+ mov %o1,MCTRLBASE !mctrl base address
+
+ set BOOTLOADER_memcfg1, %o0 ! Load memory config register 1
+ ld [%o1+0x00], %o2 !
+ and %o2, 0x300, %o2
+ or %o0, %o2, %o0
+ st %o0, [%o1 + 0x00]
+
+ set BOOTLOADER_memcfg2, %o0 ! Load memory config register 2
+#if !( defined(TSIM) || !defined(BZIMAGE))
+ st %o0, [%o1 + 0x04] ! only for prom version, else done by "dumon -i"
+#endif
+ set BOOTLOADER_ftreg, %o0 ! Init FT register
+ st %o0, [%o1 + 0x08]
+ ld [%o1 + 0x08], %o0
+ srl %o0, 30, %o0
+ andcc %o0, 3, %g6
+ bne,a 1f
+ mov %g0, %asr16 ! clear err_reg
+1:
+ ba .LL1mctlok
+ nop
+
+
+ ! ************ gaisler sdram mctrl ************
+
+.LL1mctlsdram:
+
+ set VENDOR_GAISLER, %o0
+ set GAISLER_SDCTRL, %o1
+ call ahbslv_scan
+ nop
+
+ cmp %g0,%o0
+ be .LL1mctlok ! assuming sram/prom ctrl
+ nop
+
+ ld [%o0+16+4],%g1 ! get io bar
+ set LEON3_IO_AREA,%o0
+ and %g1,%o0,%g1
+ srl %g1,12,%g1
+ or %g1,%o0,%g1
+
+
+ set BOOTLOADER_grlib_sdram, %o0
+ st %o0, [%g1 + 0x100]
+
+ ! ************ uart ************
+
+#endif //!START_USING_DSU
+
+.LL1mctlok:
+ mov %g2,%o0
+ set VENDOR_GAISLER, %o1
+ set GAISLER_APBUART,%o2
+ call apbslv_scan
+ nop
+ cmp %g0,%o0
+ be .goonhardreset
+ nop
+
+ call getbase
+ mov %g1,%o1
+
+#define UARTBASE %g5
+ mov %o1,UARTBASE !uart base address
+
+
+ !########################################################
+ ! initialization: protect g5 (uartbase)
+
+ !set BOOTLOADER_uart, %g2 ! Load UART scaler register
+ !st %g2, [UARTBASE + 0x0c] ! uart scalar !st %g2, [%g1 + 0x0c]
+
+ ld [UARTBASE + 0x08], %o0
+ or %o0,0x3,%o0
+#if defined(CONFIG_UARTLOOPBACK) || (BOOTLOADER_loopback==1)
+ !set 0x83|(BOOTLOADER_flow<<6), %g2 ! Enable uarts, (flow ctrl), loopback
+#else
+ !set 0x03|(BOOTLOADER_flow<<6), %g2 ! Enable uarts, (flow ctrl)
+#endif
+ st %o0, [UARTBASE + 0x08]
+
+ !set 0xc3|(BOOTLOADER_flow<<6), %g2 ! Enable uarts, (flow ctrl)
+ !st %g2, [UARTBASE + 0x08]
+
+ set LEON3_APBUART_Regs,%o0
+ st UARTBASE,[%o0]
+
+
+ !#######################################################
+ ! end
+
+ ! then copy the branch instructions into the vector
+
+ rd %tbr, %g1
+ andn %g1, 0xfff, %g1 ! clear non-address bits
+ sethi %hi(real_vector_instructions), %l0
+ or %l0, %lo(real_vector_instructions), %l0
+
+#if CYGHWR_HAL_SPARC_MULTIPLE_VECTOR_TRAPPING
+#if !defined(CYGPKG_HAL_SMP_SUPPORT)
+ ld [ %l0 ], %l1
+ st %l1, [ %g1 ] ! into the vector
+ ld [ %l0 + 4 ], %l1
+ st %l1, [ %g1 + 4 ] ! into the vector
+#endif
+#endif
+
+.goonhardreset:
+
+#ifndef START_USING_DSU
+ set BOOTLOADER_stack, %fp
+ andn %fp, 0x0f, %fp
+ sub %fp, 64, %sp
+#endif
+
+ mov %g7,%o7
+ retl
+ nop
+
+
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/src/boot_smp.S b/cesar/ecos/packages/hal/sparc/leon3/current/src/boot_smp.S
new file mode 100644
index 0000000000..503b26da64
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/src/boot_smp.S
@@ -0,0 +1,68 @@
+// ====================================================================
+//
+// <platform>/halboot.si
+//
+// HAL bootup platform-oriented code (assembler)
+//
+// ====================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+// ====================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research, (Konrad Eisele<eiselekd@web.de>)
+// Contributors:
+// Date: 1999-02-01
+// Purpose: Bootup code, platform oriented.
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+// ====================================================================
+
+#include <cyg/hal/hal_amba.h>
+
+ .global hal_sparc_leon_smpinit
+
+hal_sparc_leon_smpinit:
+
+ rd %asr17,%g2
+ srl %g2,28,%g2
+
+ ! trap all cpu's except cpu nr 0
+1: cmp %g2,%g0
+ bne .1b
+ nop
+
+
+
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_amba.c b/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_amba.c
new file mode 100644
index 0000000000..d49390d58f
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_amba.c
@@ -0,0 +1,233 @@
+//===========================================================================
+//
+// hal_amba.c
+//
+// SPARC Architecture LEON3-specific private variables
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research (Konrad Eisele<eiselekd@web.de>)
+// Contributors:
+// Date: 2004
+// Purpose: private amba for LEON3 processor.
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <cyg/hal/hal_leon3.h>
+#include <cyg/infra/diag.h>
+
+//#define DEBUG_CONFIG
+
+/* Structure containing address to devices found on the Amba Plug&Play bus */
+amba_confarea_type amba_conf;
+
+/* Pointers to Interrupt Controller configuration registers */
+volatile LEON3_IrqCtrl_Regs_Map *LEON3_IrqCtrl_Regs = 0;
+volatile LEON3_GpTimer_Regs_Map *LEON3_GpTimer_Regs = 0;
+volatile LEON3_APBUART_Regs_Map *LEON3_APBUART_Regs = 0;
+unsigned long LEON3_GpTimer_Irq = 0;
+
+static void vendor_dev_string(unsigned long conf, char *vendorbuf,char *devbuf) {
+ int vendor = amba_vendor(conf); int dev = amba_device(conf);
+ char *devstr; char *vendorstr;
+ sprintf(vendorbuf, "Unknown vendor %2x",vendor);
+ sprintf(devbuf, "Unknown device %2x",dev);
+ vendorstr = vendor_id2str(vendor);
+ if (vendorstr) {
+ sprintf(vendorbuf, "%s",vendorstr);
+ }
+ devstr = device_id2str(vendor,dev);
+ if (devstr) {
+ sprintf(devbuf, "%s",devstr);
+ }
+}
+
+void amba_prinf_config(void)
+{
+ char devbuf[128]; char vendorbuf[128]; unsigned int conf;
+ int i = 0; int j = 0;
+ unsigned int addr; unsigned int m;
+ diag_printf(" Vendors Slaves\n");
+ diag_printf("Ahb masters:\n");
+ i = 0;
+ while (i < amba_conf.ahbmst.devnr)
+ {
+ conf = amba_get_confword(amba_conf.ahbmst, i, 0);
+ vendor_dev_string(conf,vendorbuf,devbuf);
+ diag_printf("%2i(%2x:%3x|%2i): %16s %16s \n", i, amba_vendor(conf), amba_device(conf), amba_irq(conf), vendorbuf, devbuf);
+ for (j = 0;j < 4;j++) {
+ m = amba_ahb_get_membar(amba_conf.ahbmst,i,j);
+ if (m) {
+ addr = amba_membar_start(m);
+ diag_printf(" +%i: 0x%x \n", j, addr);
+ }
+ }
+ i++;
+ }
+ diag_printf("Ahb slaves:\n");
+ i = 0;
+ while (i < amba_conf.ahbslv.devnr)
+ {
+ conf = amba_get_confword(amba_conf.ahbslv, i, 0);
+ vendor_dev_string(conf,vendorbuf,devbuf);
+ diag_printf("%2i(%2x:%3x|%2i): %16s %16s \n", i, amba_vendor(conf), amba_device(conf), amba_irq(conf), vendorbuf, devbuf);
+ for (j = 0;j < 4;j++) {
+ m = amba_ahb_get_membar(amba_conf.ahbslv,i,j);
+ if (m) {
+ addr = amba_membar_start(m);
+ if (amba_membar_type(m) == AMBA_TYPE_AHBIO) {
+ addr = AMBA_TYPE_AHBIO_ADDR(addr);
+ } else if (amba_membar_type(m) == AMBA_TYPE_APBIO) {
+ diag_printf("Warning: apbio membar\n");
+ }
+ diag_printf(" +%i: 0x%x (raw:0x%x)\n", j, addr, m);
+ }
+ }
+ i++;
+ }
+ diag_printf("Apb slaves:\n");
+ i = 0;
+ while (i < amba_conf.apbslv.devnr)
+ {
+
+ conf = amba_get_confword(amba_conf.apbslv, i, 0);
+ vendor_dev_string(conf,vendorbuf,devbuf);
+ diag_printf("%2i(%2x:%3x|%2i): %16s %16s \n", i, amba_vendor(conf), amba_device(conf), amba_irq(conf), vendorbuf, devbuf);
+
+ m = amba_apb_get_membar(amba_conf.apbslv, i);
+ addr = amba_iobar_start(amba_conf.apbmst, m);
+ diag_printf(" +%2i: 0x%x (raw:0x%x) \n", 0, addr, m);
+
+ i++;
+
+ }
+
+}
+
+#define amba_insert_device(tab, address) \
+{ \
+ if (LEON3_BYPASS_LOAD_PA(address)) \
+ { \
+ (tab)->addr[(tab)->devnr] = (address); \
+ (tab)->devnr ++; \
+ } \
+} while(0)
+
+/*
+ * Used to scan system bus. Probes for AHB masters, AHB slaves and
+ * APB slaves. Addresses to configuration areas of the AHB masters,
+ * AHB slaves, APB slaves and APB master are storeds in
+ * amba_ahb_masters, amba_ahb_slaves and amba.
+ */
+
+void amba_init(void)
+{
+ unsigned int *cfg_area; /* address to configuration area */
+ unsigned int mbar, conf;
+ int i, j;
+
+#ifdef DEBUG_CONFIG
+ diag_printf("Reading AMBA Plug&Play configuration area\n");
+#endif
+
+ memset(&amba_conf,0,sizeof(amba_conf));
+ //amba_conf.ahbmst.devnr = 0; amba_conf.ahbslv.devnr = 0; amba_conf.apbslv.devnr = 0;
+
+ cfg_area = (unsigned int *) (LEON3_IO_AREA | LEON3_CONF_AREA);
+
+ for (i = 0; i < LEON3_AHB_MASTERS; i++)
+ {
+ amba_insert_device(&amba_conf.ahbmst, cfg_area);
+ cfg_area += LEON3_AHB_CONF_WORDS;
+ }
+
+ cfg_area = (unsigned int *) (LEON3_IO_AREA | LEON3_CONF_AREA | LEON3_AHB_SLAVE_CONF_AREA);
+ for (i = 0; i < LEON3_AHB_SLAVES; i++)
+ {
+ amba_insert_device(&amba_conf.ahbslv, cfg_area);
+ cfg_area += LEON3_AHB_CONF_WORDS;
+ }
+
+ for (i = 0; i < amba_conf.ahbslv.devnr; i ++)
+ {
+ conf = amba_get_confword(amba_conf.ahbslv, i, 0);
+ mbar = amba_ahb_get_membar(amba_conf.ahbslv, i, 0);
+ if ((amba_vendor(conf) == VENDOR_GAISLER) && (amba_device(conf) == GAISLER_APBMST))
+ {
+ amba_conf.apbmst = amba_membar_start(mbar);
+ cfg_area = (unsigned int *) (amba_conf.apbmst | LEON3_CONF_AREA);
+
+ //diag_printf("Found apbmst, cfg: 0x%x\n",(unsigned int)cfg_area);
+
+ for (j = amba_conf.apbslv.devnr; j < LEON3_APB_SLAVES; j++)
+ {
+ amba_insert_device(&amba_conf.apbslv, cfg_area);
+ cfg_area += LEON3_APB_CONF_WORDS;
+ }
+ break;
+ }
+ }
+
+ /* Find LEON3 Interrupt controler */
+ LEON3_IrqCtrl_Regs = (volatile LEON3_IrqCtrl_Regs_Map *) amba_find_apbslv_addr(VENDOR_GAISLER, GAISLER_IRQMP, 0);
+ LEON3_GpTimer_Regs = (volatile LEON3_GpTimer_Regs_Map *) amba_find_apbslv_addr(VENDOR_GAISLER, GAISLER_GPTIMER, &LEON3_GpTimer_Irq);
+ if (LEON3_IrqCtrl_Regs) {
+ //LEON3_BYPASS_STORE_PA(&(LEON3_IrqCtrl_Regs ->mask[0]),0);
+ }
+}
+
+unsigned long amba_find_apbslv_addr(unsigned long vendor, unsigned long device, unsigned long *irq) {
+ unsigned int i,conf,iobar;
+ for (i = 0; i < amba_conf.apbslv.devnr; i++) {
+ conf = amba_get_confword(amba_conf.apbslv, i, 0);
+ if ((amba_vendor(conf) == vendor) && (amba_device(conf) == device))
+ {
+ if (irq) {
+ *irq = amba_irq(conf);
+ }
+ iobar = amba_apb_get_membar(amba_conf.apbslv, i);
+ return amba_iobar_start(amba_conf.apbmst, iobar);
+ }
+ }
+ return 0;
+}
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_amba_driver.c b/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_amba_driver.c
new file mode 100644
index 0000000000..6fde9e0701
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_amba_driver.c
@@ -0,0 +1,124 @@
+//===========================================================================
+//
+// hal_amba_driver.c
+//
+// SPARC Architecture LEON3-specific private variables
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research (Konrad Eisele<eiselekd@web.de>)
+// Contributors:
+// Date: 2004
+// Purpose: private amba for LEON3 processor.
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+#include <cyg/hal/hal_leon3.h>
+#include <cyg/infra/cyg_ass.h>
+
+//#define DEBUG_CONFIG
+
+/* Structure containing address to devices found on the Amba Plug&Play bus */
+extern amba_confarea_type amba_conf;
+
+//collect apb slaves
+int amba_get_free_apbslv_devices (int vendor, int device, amba_apb_device *dev,int nr) {
+ unsigned int i,conf,iobar,j = 0;
+#ifdef DEBUG_CONFIG
+ diag_printf("Apbslv: search for apdslv devices\n");
+#endif
+ for (i = 0; i < amba_conf.apbslv.devnr && j < nr; i++) {
+ conf = amba_get_confword(amba_conf.apbslv, i, 0);
+#ifdef DEBUG_CONFIG
+ diag_printf("Apbslv: check(%x:%x)==(%x:%x)\n",vendor,device,amba_vendor(conf),amba_device(conf));
+#endif
+ if ((amba_vendor(conf) == vendor) && (amba_device(conf) == device)) {
+ if (!(amba_conf.apbslv.allocbits[i / 32] & (1 << (i & (32-1))))) {
+#ifdef DEBUG_CONFIG
+ diag_printf("Apbslv: alloc device idx %i (%x:%x)\n",j,vendor,device);
+#endif
+ amba_conf.apbslv.allocbits[i / 32] |= (1 << (i & (32-1)));
+ dev[j].irq = amba_irq(conf);
+ iobar = amba_apb_get_membar(amba_conf.apbslv, i);
+ dev[j].start = amba_iobar_start(amba_conf.apbmst, iobar);
+#ifdef DEBUG_CONFIG
+ // diag_printf(" +bar: 0x%x \n", k, dev[j].start);
+#endif
+ j++;
+ }
+ }
+ }
+ return j;
+}
+
+//collect ahb slaves
+int amba_get_free_ahbslv_devices (int vendor, int device, amba_ahb_device *dev,int nr) {
+ unsigned int addr, i,conf,iobar,j = 0,k;
+#ifdef DEBUG_CONFIG
+ diag_printf("Ahbslv: search for ahdslv devices\n");
+#endif
+ for (i = 0; i < amba_conf.ahbslv.devnr && j < nr; i++) {
+ conf = amba_get_confword(amba_conf.ahbslv, i, 0);
+#ifdef DEBUG_CONFIG
+ diag_printf("Ahbslv: check(%x:%x)==(%x:%x)\n",vendor,device,amba_vendor(conf),amba_device(conf));
+#endif
+ if ((amba_vendor(conf) == vendor) && (amba_device(conf) == device)) {
+ if (!(amba_conf.ahbslv.allocbits[i / 32] & (1 << (i & (32-1))))) {
+#ifdef DEBUG_CONFIG
+ diag_printf("Ahbslv: alloc device idx %i (%x:%x)\n",j,vendor,device);
+#endif
+ amba_conf.ahbslv.allocbits[i / 32] |= (1 << (i & (32-1)));
+ dev[j].irq = amba_irq(conf);
+ for (k = 0; k < 4; k ++) {
+ iobar = amba_ahb_get_membar(amba_conf.ahbslv, i, k);
+ addr = amba_membar_start(iobar);
+ if (amba_membar_type(iobar) == AMBA_TYPE_AHBIO) {
+ addr = AMBA_TYPE_AHBIO_ADDR(addr);
+ }
+ dev[j].start[k] = addr;
+#ifdef DEBUG_CONFIG
+ diag_printf(" +%i: 0x%x \n", k, dev[j].start[k]);
+#endif
+ }
+ j++;
+ }
+ }
+ }
+ return j;
+}
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_clock.c b/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_clock.c
new file mode 100644
index 0000000000..4b5ffe816c
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_clock.c
@@ -0,0 +1,96 @@
+//===========================================================================
+//
+// hal_amba.c
+//
+// SPARC Architecture LEON3-specific private variables
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research (Konrad Eisele<eiselekd@web.de>)
+// Contributors:
+// Date: 2004
+// Purpose: private amba for LEON3 processor.
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <cyg/hal/hal_leon3.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_amba.h>
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/hal/hal_clock.h> // which includes this file
+
+extern volatile LEON3_GpTimer_Regs_Map *LEON3_GpTimer_Regs;
+
+void hal_sparc_leon3_clock_init(cyg_uint32 period) {
+ cyg_hal_sparc_clock_period = (period); \
+
+ if (LEON3_GpTimer_Regs) {
+
+ LEON3_BYPASS_STORE_PA(&LEON3_GpTimer_Regs ->e[0].val,(period));
+ LEON3_BYPASS_STORE_PA(&LEON3_GpTimer_Regs ->e[0].rld,(period));
+ LEON3_BYPASS_STORE_PA(&LEON3_GpTimer_Regs ->e[0].ctrl,0);
+
+ LEON3_BYPASS_STORE_PA(&LEON3_GpTimer_Regs ->e[0].ctrl,
+ LEON3_GPTIMER_EN |
+ LEON3_GPTIMER_RL |
+ LEON3_GPTIMER_IRQEN |
+ LEON3_GPTIMER_LD);
+ } else {
+ diag_printf("Clock init failed");
+ }
+}
+
+cyg_uint32 hal_sparc_leon3_clock_read(void) {
+ if (LEON3_GpTimer_Regs) {
+ return LEON3_BYPASS_LOAD_PA(&LEON3_GpTimer_Regs ->e[0].val);
+ }
+ return 1;
+}
+
+extern unsigned long LEON3_GpTimer_Irq;
+cyg_uint32 hal_sparc_leon3_clock_irqnr(void) {
+ if (!LEON3_GpTimer_Irq) {
+ amba_init();
+ }
+ return LEON3_GpTimer_Irq;
+}
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_diag.c b/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_diag.c
new file mode 100644
index 0000000000..39789a0e81
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_diag.c
@@ -0,0 +1,90 @@
+//===========================================================================
+//
+// hal_amba.c
+//
+// SPARC Architecture LEON3-specific private variables
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research (Konrad Eisele<eiselekd@web.de>)
+// Contributors:
+// Date: 2004
+// Purpose: private amba for LEON3 processor.
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <cyg/hal/hal_leon3.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_io.h>
+
+extern volatile LEON3_APBUART_Regs_Map *LEON3_APBUART_Regs;
+
+void hal_sparc_leon3_write_char(char c, int wait) {
+ //if( c != '\r' ) {
+ if (LEON3_APBUART_Regs) {
+ if (wait) {
+ unsigned int status;
+ do {
+ HAL_READ_UINT32( &(LEON3_APBUART_Regs->status), status );
+ } while (!(status & LEON_REG_UART_STATUS_THE));
+ }
+ HAL_WRITE_UINT32(&(LEON3_APBUART_Regs->data),c);
+ }
+ //}
+}
+
+char hal_sparc_leon3_read_char(int wait) {
+ char c = 0;
+ if (LEON3_APBUART_Regs) {
+ if (wait) {
+ unsigned int status;
+ do {
+ HAL_READ_UINT32( &(LEON3_APBUART_Regs->status), status );
+ } while (!(status & LEON_REG_UART_STATUS_DR));
+ }
+ HAL_READ_UINT32(&(LEON3_APBUART_Regs->data),c);
+ }
+ return c;
+}
+
+
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_help.cxx b/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_help.cxx
new file mode 100644
index 0000000000..6c3fff5e3b
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_help.cxx
@@ -0,0 +1,94 @@
+//==========================================================================
+//
+// access some c++ values
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Nick Garnett
+// Copyright (C) 2003 Jonathan Larmour
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors:
+// Date:
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/instrmnt.h> // instrumentation
+#include <cyg/kernel/diag.h>
+
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/thread.inl> // thread inlines
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/intr.hxx>
+#include <cyg/kernel/clock.hxx>
+
+#include <cyg/kernel/sema.hxx>
+#include <cyg/kernel/flag.hxx>
+#include <cyg/kernel/mutex.hxx>
+#include <cyg/kernel/mbox.hxx>
+
+#include <cyg/kernel/sched.inl> // scheduler inlines
+#include <cyg/kernel/clock.inl> // clock inlines
+
+#include <cyg/kernel/kapi.h> // C API
+
+externC int cyg_hal_get_current_threadid()
+{
+ Cyg_Thread *current = Cyg_Scheduler_Base::get_current_thread();
+ return current ->get_unique_id();
+}
+
+externC int cyg_hal_get_current_cpuid()
+{
+ return CYG_KERNEL_CPU_THIS();
+}
+
+
+
+
+#endif //CYGFUN_KERNEL_API_C
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_irq.c b/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_irq.c
new file mode 100644
index 0000000000..c0b67e0d62
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_irq.c
@@ -0,0 +1,234 @@
+//===========================================================================
+//
+// hal_irq.c
+//
+// SPARC Architecture LEON3-specific private variables
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research (Konrad Eisele<eiselekd@web.de>)
+// Contributors:
+// Date: 2004
+// Purpose: private amba for LEON3 processor.
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+#ifdef CYGPKG_KERNEL
+#include <pkgconf/kernel.h>
+#endif
+
+#include <cyg/infra/cyg_type.h> // Base types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/infra/diag.h>
+
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_io.h>
+#include <cyg/hal/hal_leon3.h>
+#include <cyg/hal/hal_smp.h>
+
+#define LEON_HARD_INT(x) (1 << (x))
+externC volatile LEON3_IrqCtrl_Regs_Map *LEON3_IrqCtrl_Regs;
+#define LEON_IMASK(i) ((&LEON3_IrqCtrl_Regs ->mask[i]))
+#define LEON_IFORCE(i) ((&LEON3_IrqCtrl_Regs ->force[i]))
+
+#define get_irqmask(irq) LEON_HARD_INT(irq)
+
+/*static inline unsigned long get_irqmask(unsigned int irq)
+{
+ unsigned long mask;
+ if (!irq || irq > 0xf) {
+ //diag_printf("leon_get_irqmask: false irq number\n");
+ mask = 0;
+ } else {
+ mask = LEON_HARD_INT(irq);
+ }
+ return mask;
+}*/
+
+#ifndef CYGPKG_HAL_SMP_SUPPORT
+
+void leon3_disable_irq(unsigned int irq_nr)
+{
+ unsigned long mask, v;
+ mask = get_irqmask(irq_nr) & LEON_IRQMASK_R;
+ HAL_READ_UINT32(LEON_IMASK(0),v);
+ HAL_WRITE_UINT32(LEON_IMASK(0), (v & ~(mask)));
+
+}
+
+void leon3_enable_irq(unsigned int irq_nr)
+{
+ unsigned long mask,v;
+ mask = get_irqmask(irq_nr) & LEON_IRQMASK_R;
+ HAL_READ_UINT32(LEON_IMASK(0),v);
+ HAL_WRITE_UINT32(LEON_IMASK(0), (v | (mask)));
+}
+
+#else
+
+unsigned long irq_mask;
+unsigned long cpu_route_mask[CYGPKG_HAL_SMP_CPU_MAX];
+HAL_SPINLOCK_TYPE cyg_hal_smp_smpirq_lock = HAL_SPINLOCK_INIT_CLEAR;
+
+/* route all irq to 0 */
+void leon3_smpirq_init(void) {
+ int i;
+ /*
+ for (i=0; i<CYGPKG_HAL_SMP_CPU_MAX; i++)
+ cpu_route_mask[i] = -1;
+ */
+ cpu_route_mask[0] = -1;
+}
+
+void leon3_disable_irq(unsigned int irq_nr)
+{
+ unsigned long mask, cpu;
+
+ //diag_printf("disable %d\n",irq_nr);
+
+ mask = get_irqmask(irq_nr) & LEON_IRQMASK_R;
+ irq_mask &= ~mask;
+ HAL_SPINLOCK_SPIN( cyg_hal_smp_smpirq_lock );
+ for (cpu = 0; cpu < HAL_SMP_CPU_COUNT(); cpu++) {
+ mask = cpu_route_mask[cpu] & irq_mask;
+ HAL_WRITE_UINT32(LEON_IMASK(cpu), mask);
+ }
+ HAL_SPINLOCK_CLEAR( cyg_hal_smp_smpirq_lock );
+}
+
+void leon3_enable_irq(unsigned int irq_nr)
+{
+ unsigned long mask, cpu, v = 0;
+ mask = get_irqmask(irq_nr) & LEON_IRQMASK_R;
+
+ //diag_printf("enable %d\n",irq_nr);
+
+
+ for (cpu = 0; cpu < HAL_SMP_CPU_MAX; cpu++) {
+ v |= cpu_route_mask[cpu] & mask;
+ }
+ if (!v) {
+ cpu_route_mask[0] |= mask;
+ }
+
+ irq_mask |= mask;
+ HAL_SPINLOCK_SPIN( cyg_hal_smp_smpirq_lock );
+ for (cpu = 0; cpu < HAL_SMP_CPU_MAX; cpu++) {
+ mask = (cpu_route_mask[cpu] | 0x04000) & irq_mask;
+ //mask = cpu_route_mask[cpu] & irq_mask;
+ //mask = mask | 0x04000;
+ HAL_WRITE_UINT32(LEON_IMASK(cpu), mask);
+ }
+ HAL_SPINLOCK_CLEAR( cyg_hal_smp_smpirq_lock );
+}
+
+void leon3_interrupt_set_cpu( CYG_WORD32 vector, HAL_SMP_CPU_TYPE cpu ) {
+ unsigned long mask, i;
+
+ HAL_SPINLOCK_SPIN( cyg_hal_smp_smpirq_lock );
+ mask = get_irqmask(vector) & LEON_IRQMASK_R;
+ for (i = 0; i < HAL_SMP_CPU_COUNT(); i++) {
+ if ( i == cpu) {
+ cpu_route_mask[i] |= mask;
+ } else {
+ cpu_route_mask[i] &= ~mask;
+ }
+ //mask = cpu_route_mask[i] & irq_mask;
+ HAL_WRITE_UINT32(LEON_IMASK(i), cpu_route_mask[i] & irq_mask);
+ }
+ HAL_SPINLOCK_CLEAR( cyg_hal_smp_smpirq_lock );
+}
+
+void leon3_interrupt_get_cpu( CYG_WORD32 vector, HAL_SMP_CPU_TYPE *cpu ){
+ unsigned long mask, i;
+
+ mask = get_irqmask(vector) & LEON_IRQMASK_R;
+ *cpu = 0;
+ for (i = 0; i < HAL_SMP_CPU_COUNT(); i++) {
+ if (cpu_route_mask[i] & mask) {
+ *cpu = i;
+ }
+ }
+}
+
+
+void leon3_smpirq_raise(CYG_WORD32 cpu) {
+ unsigned long mask = get_irqmask(CYGNUM_HAL_SMP_CPU_INTERRUPT_VECTOR(cpu)) & LEON_IRQMASK_R;
+ unsigned long i, v;
+ unsigned long masksaved[HAL_SMP_CPU_MAX];
+ HAL_SMP_CPU_TYPE me = HAL_SMP_CPU_THIS();
+ CYG_INTERRUPT_STATE istate = 0;
+
+ HAL_DISABLE_INTERRUPTS( istate );
+
+ /*if (cpu == me) {
+ while(1);
+ }*/
+
+ HAL_SPINLOCK_SPIN( cyg_hal_smp_smpirq_lock );
+
+ HAL_WRITE_UINT32(LEON_IFORCE(cpu), (mask));
+
+
+ /* for (i = 0; i < HAL_SMP_CPU_COUNT(); i++) { */
+/* HAL_READ_UINT32(LEON_IMASK(i),v); */
+/* masksaved[i] = v; */
+/* HAL_WRITE_UINT32(LEON_IMASK(i), (v & ~(mask))); */
+/* } */
+
+/* HAL_READ_UINT32(LEON_IMASK(cpu),v); */
+/* HAL_WRITE_UINT32(LEON_IMASK(cpu), (v | (mask))); */
+/* HAL_READ_UINT32(LEON_IFORCE(cpu),v); */
+/* HAL_WRITE_UINT32(LEON_IFORCE(cpu), (v | (mask))); */
+
+/* /\*do { */
+/* HAL_READ_UINT32(LEON_IFORCE(cpu),force); */
+/* } while( (force & mask) != 0 ); *\/ */
+
+/* for (i = 0; i < HAL_SMP_CPU_COUNT(); i++) { */
+/* HAL_WRITE_UINT32(LEON_IMASK(i), (masksaved[i])); */
+/* } */
+
+ HAL_SPINLOCK_CLEAR( cyg_hal_smp_smpirq_lock );
+
+ HAL_RESTORE_INTERRUPTS( istate );
+}
+
+#endif
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_priv.c b/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_priv.c
new file mode 100644
index 0000000000..c51a62e222
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/src/hal_priv.c
@@ -0,0 +1,117 @@
+//===========================================================================
+//
+// hal_priv.c
+//
+// SPARC Architecture LEON3-specific private variables
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1999-02-20
+// Purpose: private vars for LEON3 processor.
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_leon3.h>
+#include <cyg/hal/hal_smp.h>
+
+// ------------------------------------------------------------------------
+// Clock static to keep period recorded.
+cyg_int32 cyg_hal_sparc_clock_period = 0;
+
+// ------------------------------------------------------------------------
+// Board specific startups.
+
+extern void hal_board_prestart( void );
+extern void hal_board_poststart( void );
+
+static void leon2_eth_init(void)
+{
+
+}
+
+void hal_board_prestart( void )
+{
+
+//#ifdef CYGPKG_DEVS_ETH_SPARC_LEON
+ leon2_eth_init();
+//#endif
+}
+
+void hal_board_poststart( void )
+{
+
+ amba_init();
+
+ HAL_ENABLE_INTERRUPTS();
+}
+
+cyg_uint32
+hal_lsbit_index(cyg_uint32 mask)
+{
+ int i;
+ for (i = 0; i < 32; i++) {
+ if (mask & (1<<i)) return ((cyg_uint32)i);
+ }
+ return ((cyg_uint32)-1);
+}
+
+cyg_uint32
+hal_msbit_index(cyg_uint32 mask)
+{
+ int i;
+ for (i = 31; i >= 0; i--) {
+ if (mask & (1<<i)) return ((cyg_uint32)i);
+ }
+ return ((cyg_uint32)-1);
+}
+
+void
+hal_idle_thread_action(cyg_uint32 loop_count)
+{
+ __asm__ volatile ("mov %g0, %asr19");
+
+ //*((volatile cyg_uint32 *) 0x80000018) = 0;
+}
+
+// EOF hal_priv.c
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/src/leon3_smp.c b/cesar/ecos/packages/hal/sparc/leon3/current/src/leon3_smp.c
new file mode 100644
index 0000000000..93c8bd31d5
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/src/leon3_smp.c
@@ -0,0 +1,447 @@
+//===========================================================================
+//
+// hal_amba.c
+//
+// SPARC Architecture LEON3-specific private variables
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gaisler Research (Konrad Eisele<eiselekd@web.de>)
+// Contributors:
+// Date: 2004
+// Purpose: private amba for LEON3 processor.
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+#ifdef CYGPKG_KERNEL
+#include <pkgconf/kernel.h>
+#endif
+
+#include <cyg/infra/cyg_type.h> // Base types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/infra/diag.h>
+
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_io.h>
+#include <cyg/hal/hal_smp.h>
+#include <cyg/hal/hal_cache.h>
+
+#ifndef BUG
+#define BUG() do { diag_printf("BUG() at %s %d\n", __FILE__, __LINE__); while(1); } while (1)
+#endif
+
+__externC void cyg_scheduler_set_need_reschedule(void);
+__externC void cyg_scheduler_timeslice_cpu(void);
+
+cyg_uint32 sparc_leon3_get_cpuid(void)
+{
+ unsigned int id;
+ __asm__ __volatile__(
+ "rd %%asr17,%0\n\t"
+ : "=r" (id) : );
+
+ return ((id >> 28) & 0xff);
+}
+
+
+extern __inline__ void __delay(unsigned long loops)
+{
+ __asm__ __volatile__("cmp %0, 0\n\t"
+ "1: bne 1b\n\t"
+ "subcc %0, 1, %0\n" :
+ "=&r" (loops) :
+ "0" (loops) :
+ "cc");
+}
+
+#ifdef CYGPKG_HAL_SMP_SUPPORT
+
+volatile unsigned int cyg_hal_smp_cpu_running = 0;
+CYG_WORD32 cyg_hal_smp_cpu_running_count;
+externC CYG_WORD32 *__interrupt_stack_vector[HAL_SMP_CPU_MAX];
+externC CYG_WORD32 __interrupt_stack_first;
+
+volatile int slavesem = 0;
+
+#define CYG_HAL_CPU_MARKRUNNING(c) cyg_hal_smp_cpu_running |= (1 << c);
+#define CYG_HAL_CPU_ISRUNNING(c) (cyg_hal_smp_cpu_running & (1 << c))
+
+/* master(cpu 0) coming up from arch/vector.S: after locore init, before cyg_start(). */
+__externC void cyg_hal_smp_init(void) {
+ volatile int slavesemold[32];
+ HAL_SMP_CPU_TYPE cpu;
+
+ do {
+ HAL_TAS_SET(slavesem, slavesemold[HAL_SMP_CPU_THIS()]);
+ } while (slavesemold[HAL_SMP_CPU_THIS()] == 1);
+
+
+ unsigned long cfg = sparc_leon3_get_dcachecfg();
+ //cyg_hal_smp_cpu_running = 0;
+
+
+
+ //leon3smp_diag_printf("Master Cpu %d came up\n",HAL_SMP_CPU_THIS());
+
+ if (cfg & ASI_LEON3_SYSCTRL_CFG_SNOOPING) {
+ sparc_leon3_enable_snooping();
+ }
+ else {
+ leon3smp_diag_printf("Caches disabled due to lack snooping\n");
+ sparc_leon3_disable_cache();
+ }
+
+
+ for( cpu = 0; cpu < HAL_SMP_CPU_MAX; cpu++ ) {
+ /*
+ if( cpu == HAL_SMP_CPU_THIS() ) {
+ CYG_HAL_CPU_MARKRUNNING(cpu);
+ cyg_hal_smp_cpu_running_count++;
+ }
+ */
+ __interrupt_stack_vector[cpu] = (((unsigned int)(&__interrupt_stack_first)) +
+ (CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE * cpu) +
+ CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE);
+ diag_printf("Interrupt stack(%d): 0x%x-0x%x\n",cpu,
+ __interrupt_stack_vector[cpu],
+ ((unsigned int)__interrupt_stack_vector[cpu])+CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE);
+
+ }
+ CYG_HAL_CPU_MARKRUNNING(0);
+ cyg_hal_smp_cpu_running_count++;
+
+ slavesem = 0;
+
+}
+
+/* release the slaves that are idling , they'll come up at cyg_hal_smp_startup() */
+void cyg_hal_cpu_reset(HAL_SMP_CPU_TYPE cpu) {
+ int i, maxcpus;
+ unsigned int tmp;
+
+ //leon3smp_diag_printf("Try to bring Cpu %d up, running: %d\n",cpu, CYG_HAL_CPU_ISRUNNING(cpu));
+
+
+ if (!CYG_HAL_CPU_ISRUNNING(cpu)) {
+ //reset cpu
+ LEON3_IrqCtrl_Regs->mpstatus = 1<<cpu;
+ //while(cyg_hal_smp_cpu_running[cpu] == 0) {
+ // continue;
+ //}
+ }
+
+/* if (sparc_leon3_get_cpuid() == 0) */
+/* { */
+/* maxcpus = (((LEON3_IrqCtrl_Regs->mpstatus) >> 28) & 0xf) + 1; */
+/* tmp = 0; */
+/* //for (i = HAL_SMP_CPU_MAX; i < maxcpus; i++) */
+/* for (i = 0; i < maxcpus; i++) */
+/* tmp |= (1 << i); */
+/* LEON3_IrqCtrl_Regs->mpstatus = tmp; */
+/* } */
+
+
+ /*
+ maxcpus = (((LEON3_IrqCtrl_Regs->mpstatus) >> 28) & 0xf) + 1;
+ for (i = HAL_SMP_CPU_MAX; i < maxcpus; i++)
+ {
+ LEON3_IrqCtrl_Regs->mpstatus = 1<<i;
+ }
+ */
+
+}
+
+cyg_uint32 cyg_hal_smp_cpu_count2idx(cyg_uint32 n) {
+ int idx = -1;
+ if (n >= cyg_hal_smp_cpu_running_count) {
+ BUG();
+ }
+ do {
+ idx++;
+ while(! CYG_HAL_CPU_ISRUNNING(idx)) {
+ idx++;
+ }
+ } while (n--);
+ if (idx >= HAL_SMP_CPU_MAX) {
+ diag_printf("idx(%d)>=HAL_SMP_CPU_MAX(%d)\n",idx,HAL_SMP_CPU_MAX);
+ BUG();
+ }
+ return idx;
+}
+
+cyg_uint32 cyg_hal_smp_cpu_idx2count(cyg_uint32 n) {
+ int i, c = 0;
+ if (n >= HAL_SMP_CPU_MAX || !CYG_HAL_CPU_ISRUNNING(n)) {
+ diag_printf("n(%d)>=HAL_SMP_CPU_MAX(%d) || !CYG_HAL_CPU_ISRUNNING(n)\n",n,HAL_SMP_CPU_MAX);
+ BUG();
+ }
+ for (i = 0; i < n;i++) {
+ if (CYG_HAL_CPU_ISRUNNING(i)) {
+ c++;
+ }
+ }
+ if (c >= cyg_hal_smp_cpu_running_count) {
+ diag_printf("c(%d)>=cyg_hal_smp_cpu_running_count(%d)\n",c,cyg_hal_smp_cpu_running_count);
+ BUG(); }
+ return c;
+}
+
+int cyg_hal_smp_cpu_count(void) {
+ int i = 0,cpu = 0;
+ for( cpu = 0; cpu < HAL_SMP_CPU_MAX; cpu++ ) {
+ if (CYG_HAL_CPU_ISRUNNING(cpu)) {
+ i++;
+ };
+ }
+ return i;
+}
+
+unsigned int rmask[4] = {0, 1, 3, 7};
+
+
+externC void cyg_kernel_smp_startup(void);
+
+/* slave cpus coming from vector.S:wakeup write to mpirq->mpstatus */
+__externC void cyg_hal_smp_startup(void)
+{
+ volatile int slavesemold[32];
+
+ do {
+ HAL_TAS_SET(slavesem, slavesemold[HAL_SMP_CPU_THIS()]);
+ } while (slavesemold[HAL_SMP_CPU_THIS()] == 1);
+
+
+ HAL_SMP_CPU_TYPE cpu = HAL_SMP_CPU_THIS();
+
+/* do { */
+/* //HAL_TAS_SET(slavesem, slavesemold); */
+/* //} while ((slavesemold == 1) && (cyg_hal_smp_cpu_running != rmask)); */
+ //do {} while (cyg_hal_smp_cpu_running != rmask[cpu]);
+
+
+ CYG_HAL_CPU_MARKRUNNING(cpu);
+ unsigned long cfg = sparc_leon3_get_dcachecfg();
+
+ //leon3smp_diag_printf("Slave Cpu %d came up\n",cpu);
+
+ if (cfg & ASI_LEON3_SYSCTRL_CFG_SNOOPING) {
+ sparc_leon3_enable_snooping();
+ } else {
+ leon3smp_diag_printf("You have to enable snooping in the vhdl model or disable caches\n");
+ sparc_leon3_disable_cache();
+ }
+
+ cyg_hal_smp_cpu_running_count++;
+ slavesem = 0;
+ cyg_kernel_smp_startup();
+
+
+}
+
+
+/*------------------------------------------------------------------------*/
+// SMP message buffers.
+// SMP CPUs pass messages to eachother via a small circular buffer
+// protected by a spinlock. Each message is a single 32 bit word with
+// a type code in the top 4 bits and any argument in the remaining
+// 28 bits.
+
+#define SMP_MSGBUF_SIZE 4
+
+static struct smp_msg_t
+{
+ HAL_SPINLOCK_TYPE lock; // protecting spinlock
+ volatile CYG_WORD32 msgs[SMP_MSGBUF_SIZE]; // message buffer
+ volatile CYG_WORD32 head; // head of list
+ volatile CYG_WORD32 tail; // tail of list
+ volatile CYG_WORD32 reschedule; // reschedule request
+ volatile CYG_WORD32 timeslice; // timeslice request
+} smp_msg[HAL_SMP_CPU_MAX];
+
+void cyg_hal_cpu_message( HAL_SMP_CPU_TYPE cpu,
+ CYG_WORD32 msg,
+ CYG_WORD32 arg,
+ CYG_WORD32 wait) {
+ CYG_INTERRUPT_STATE istate;
+ struct smp_msg_t *m = &smp_msg[cpu];
+ int i;
+ //HAL_SMP_CPU_TYPE me = HAL_SMP_CPU_THIS();
+
+ //leon3smp_diag_printf("Cpu %d send to %d: %x \n",HAL_SMP_CPU_THIS(),cpu,msg);
+
+
+ HAL_DISABLE_INTERRUPTS( istate );
+
+ // Get access to the message buffer for the selected CPU
+ HAL_SPINLOCK_SPIN( m->lock );
+
+ if( msg == HAL_SMP_MESSAGE_RESCHEDULE )
+ m->reschedule = true;
+ else if( msg == HAL_SMP_MESSAGE_TIMESLICE )
+ m->timeslice = true;
+ else
+ {
+ CYG_WORD32 next = (m->tail + 1) & (SMP_MSGBUF_SIZE-1);
+ // If the buffer is full, wait for space to appear in it.
+ // This should only need to be done very rarely.
+ while( next == m->head ) {
+ HAL_SPINLOCK_CLEAR( m->lock );
+ for( i = 0; i < 1000; i++ );
+ HAL_SPINLOCK_SPIN( m->lock );
+ }
+ m->msgs[m->tail] = msg | arg;
+ m->tail = next;
+ }
+
+ // Now send an interrupt to the CPU.
+ //if( cyg_hal_smp_cpu_running[cpu] ) {
+ leon3_smpirq_raise(cpu);
+ //}
+
+ HAL_SPINLOCK_CLEAR( m->lock );
+
+ // If we are expected to wait for the command to complete, then
+ // spin here until it does. We actually wait for the destination
+ // CPU to empty its input buffer. So we might wait for messages
+ // from other CPUs as well. But this is benign.
+
+ while(wait) {
+ for( i = 0; i < 1000; i++ );
+ HAL_SPINLOCK_SPIN( m->lock );
+ if( m->head == m->tail )
+ wait = false;
+ HAL_SPINLOCK_CLEAR( m->lock );
+ }
+
+ HAL_RESTORE_INTERRUPTS( istate );
+
+}
+
+
+/*------------------------------------------------------------------------*/
+__externC CYG_WORD32 cyg_hal_cpu_message_isr( CYG_WORD32 vector, CYG_ADDRWORD data )
+{
+ HAL_SMP_CPU_TYPE me = HAL_SMP_CPU_THIS();
+ struct smp_msg_t *m = &smp_msg[me];
+ CYG_WORD32 ret = 1;
+ CYG_INTERRUPT_STATE istate;
+
+ HAL_DISABLE_INTERRUPTS( istate );
+
+ HAL_SPINLOCK_SPIN( m->lock );
+
+ // First, acknowledge the interrupt.
+
+ HAL_INTERRUPT_ACKNOWLEDGE( vector );
+
+ if( m->reschedule || m->timeslice )
+ ret |= 2; // Ask for the DSR to be called.
+
+ // Now pick messages out of the buffer and handle them
+
+ while( m->head != m->tail )
+ {
+ CYG_WORD32 msg = m->msgs[m->head];
+
+ switch( msg & HAL_SMP_MESSAGE_TYPE )
+ {
+ case HAL_SMP_MESSAGE_RESCHEDULE:
+ ret |= 2; // Ask for the DSR to be called.
+ break;
+ case HAL_SMP_MESSAGE_MASK:
+ break;
+ case HAL_SMP_MESSAGE_UNMASK:
+ break;
+ case HAL_SMP_MESSAGE_REVECTOR:
+ break;
+ }
+
+ // Update the head pointer after handling the message, so that
+ // the wait in cyg_hal_cpu_message() completes after the action
+ // requested.
+ m->head = (m->head + 1) & (SMP_MSGBUF_SIZE-1);
+ }
+
+ HAL_SPINLOCK_CLEAR( m->lock );
+
+ HAL_RESTORE_INTERRUPTS( istate );
+
+ return ret;
+}
+
+
+/*------------------------------------------------------------------------*/
+// CPU message DSR.
+// This is only executed if the message was
+// HAL_SMP_MESSAGE_RESCHEDULE. It calls up into the kernel to effect a
+// reschedule.
+
+__externC CYG_WORD32 cyg_hal_cpu_message_dsr( CYG_WORD32 vector, CYG_ADDRWORD data )
+{
+ HAL_SMP_CPU_TYPE me = HAL_SMP_CPU_THIS();
+ struct smp_msg_t *m = &smp_msg[me];
+ CYG_INTERRUPT_STATE istate;
+ CYG_WORD32 reschedule, timeslice;
+
+ HAL_DISABLE_INTERRUPTS( istate );
+ HAL_SPINLOCK_SPIN( m->lock );
+
+ reschedule = m->reschedule;
+ timeslice = m->timeslice;
+ m->reschedule = m->timeslice = false;
+
+ HAL_SPINLOCK_CLEAR( m->lock );
+ HAL_RESTORE_INTERRUPTS( istate );
+
+ if( reschedule )
+ {
+ //leon3smp_diag_printf("Cpu %d received reshedule\n",HAL_SMP_CPU_THIS());
+ cyg_scheduler_set_need_reschedule();
+ }
+ if( timeslice )
+ {
+ //leon3smp_diag_printf("Cpu %d received timeslice\n",HAL_SMP_CPU_THIS());
+ cyg_scheduler_timeslice_cpu();
+ }
+
+ return 0;
+}
+
+#endif //CYGPKG_HAL_SMP_SUPPORT
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/support/README b/cesar/ecos/packages/hal/sparc/leon3/current/support/README
new file mode 100644
index 0000000000..b4872d842e
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/support/README
@@ -0,0 +1,32 @@
+
+LEON/TSIM Support
+=================
+
+See <http://www.gaisler.com> for information about the TSIM
+simulator and Leon project per se.
+
+The simulator TSIM can be run "as one" with GDB by using the
+script do-gdb-sim in this directory. The script can be used in
+automated testing systems to run as if it were embedded within
+GDB. It contains:
+
+----------------------------------------------------------------
+#! /bin/csh
+tsim-leon -nfp -gdb >& /dev/stdout &
+sparc-rtems-gdb -nw -nx $*:q
+----------------------------------------------------------------
+
+which simply runs tsim in background, directing its output to the
+common stdout.
+
+The command to connect to the simulator target will be
+
+ (gdb) target remote localhost:1234
+
+This fully described in the TSIM documentation from
+ (home) <http://www.gaisler.com/tsim.html>
+ (flyer) <http://www.gaisler.com/doc/tsim-erc32.pdf>
+ (doc) <http://www.gaisler.com/doc/tsim-1.0.18.pdf>
+
+
+
diff --git a/cesar/ecos/packages/hal/sparc/leon3/current/support/do-gdb-sim b/cesar/ecos/packages/hal/sparc/leon3/current/support/do-gdb-sim
new file mode 100644
index 0000000000..75085ce6f3
--- /dev/null
+++ b/cesar/ecos/packages/hal/sparc/leon3/current/support/do-gdb-sim
@@ -0,0 +1,3 @@
+#! /bin/csh
+tsim-leon -nfp -gdb >& /dev/stdout &
+sparc-rtems-gdb -nw -nx $*:q
diff --git a/cesar/ecos/packages/hal/synth/arch/current/ChangeLog b/cesar/ecos/packages/hal/synth/arch/current/ChangeLog
new file mode 100644
index 0000000000..7fb1c7d883
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/ChangeLog
@@ -0,0 +1,550 @@
+2005-07-30 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/synth_diag.c (hal_diag_write_char): Compiler warning fix.
+ * src/synth_intr.c (synth_auxiliary_instantiate): Ditto
+
+2005-06-26 Bart Veer <bartv@ecoscentric.com>
+
+ * src/synth_intr.c (synth_hardware_init): extract bogomips rating
+ for use by HAL_DELAY_US()
+
+ * include/hal_intr.h: add #include of <cyg/hal/var_intr.h> for
+ HAL_DELAY_US().
+
+2005-03-11 Bart Veer <bartv@ecoscentric.com>
+
+ * src/synth_intr.c (synth_hardware_init): allow the platform to
+ customize the sigaction structures.
+
+ * include/hal_io.h: add more signal-related definitions
+
+ * cdl/hal_synth.cdl: change the clock calculations, so that users
+ only need to specify RTC_PERIOD
+
+2004-12-14 Alexander Neundorf <neundorf@kde.org>
+ Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/hal_io.h: Add cyg_hal_sys_shmget(), cyg_hal_sys_shmat()
+ and cyg_hal_sys_shmdt() system calls
+ * src/synth_syscalls.c: Implementations of cyg_hal_sys_shmget(),
+ cyg_hal_sys_shmat() and cyg_hal_sys_shmdt(). Moved
+ cyg_hal_sys_mmap() from the flash driver to here.
+
+2004-08-09 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/hal_intr.h (HAL_PLATFORM_RESET): Added missing ;
+
+2004-08-04 Alexander Neundorf <alexander.neundorf@jenoptik.com>
+
+ * include/hal_io.h: Add cyg_hal_sys_mkdir() system call
+ * include/hal_intr.h: Add HAL_PLATFORM_RESET() macro
+
+2004-07-04 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/synth.ld: Added the 2ram section needed for flash devices
+
+2004-06-21 Alexander Neundorf <alexander.neundorf@jenoptik.com>
+
+ * include/hal_io.h:
+ Add cyg_hal_sys_readdir(), cyg_hal_sys_lstat(),
+ cyg_hal_sys_fstat() system call toegther with their
+ accompanying data structures and file mode bits
+
+2004-06-18 William Donahue <WDonahue@siriusradio.com>
+
+ * include/hal_io.h (CYG_HAL_SYS_FD_ZERO): Added misisng }
+
+2004-05-27 Alexander Neundorf <alexander.neundorf@jenoptik.com>
+
+ * include/hal_io.h:
+ Fix the open/fcntl flags by prepending a leading 0 so that they
+ are interpreted correctly as octal instead of decimal.
+
+2004-04-22 Jani Monoses <jani@iv.ro>
+
+ * cdl/hal_synth.cdl :
+ Invoke tail with stricter syntax that works in latest coreutils.
+
+2003-07-18 Nick Garnett <nickg@balti.calivar.com>
+
+ * cdl/hal_synth.cdl:
+ Changed values for CYGNUM_HAL_RTC_NUMERATOR,
+ CYGNUM_HAL_RTC_DENOMINATOR and CYGNUM_HAL_RTC_PERIOD to
+ "default_value" from "calculated". This makes it easier
+ to change these values globally.
+
+2003-07-05 Bart Veer <bartv@ecoscentric.com>
+
+ * src/synth_entry.c:
+ Add more dummy functions to cope with dependencies introduced by
+ various versions of g++.
+
+2003-06-27 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/synth.ld: Synthetic linux at least needs libgcc_eh.a in the
+ GROUP() to resolve exception handling symbols.
+
+2003-02-25 Iztok Zupet <iz@vsr.si>
+
+ * doc/synth.sgml: Replaced .gif with .png to get PDF
+ output.
+ * doc/*.gif: Delete.
+ * doc/*.png: Replacements for .gifs added.
+
+2003-04-10 Nick Garnett <nickg@balti.calivar.com>
+
+ * src/synth.ld:
+ Added libsupc++.a to GROUP() directive for GCC versions later than
+ 3.0.
+
+2003-03-30 Bart Veer <bartv@ecoscentric.com>
+
+ * src/synth_intr.c (synth_auxiliary_xchgmsg): fix typo reported
+ by Savin Zlobec
+
+2003-03-26 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/synth_intr.c (synth_start_auxiliary): When an empty string
+ is found on the PATH, remember to move onto the next entry
+ otherwise we loop forever.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/overview.gif, doc/overview.fig: renamed to
+ synth-io-overview.gif and synth-io-overview.fig.
+ * doc/synth.sgml: Add some missing "&gt;"s to header file names.
+ Comment out DOCTYPE for now to allow building with standard doc build.
+ overview.gif renamed as per above.
+
+2003-02-12 Bart Veer <bartv@ecoscentric.com>
+
+ * host/Makefile.am, host/Makefile.in, configure:
+ Regenerate after acinclude.m4 update
+
+2002-12-03 Bart Veer <bartv@ecoscentric.com>
+
+ * src/synth_entry.c:
+ Provide dummy versions of __cxa_atexit() and __dso_handle, to
+ satisfy requirements of recent versions of the compiler configured
+ for native Linux development.
+
+2002-09-22 Bart Veer <bartv@ecoscentric.com>
+
+ * host/configure.in:
+ If the installed version of Tcl is too old, issue a warning and
+ suppress the build, rather than fail. Other bits of the system,
+ e.g. the generic host-side tools, can still be built.
+
+2002-09-21 Bart Veer <bartv@ecoscentric.com>
+
+ * host/ecosynth.c:
+ Avoid const compatibility problems with Tcl 8.4
+
+2002-09-15 Bart Veer <bartv@ecoscentric.com>
+
+ * include/hal_io.h
+ cdl/hal_synth.cdl
+ src/synth_entry.c, src/synth_intr.c, src/synth_diag.c,
+ src/synth_protocol.h
+ doc/*
+ host/*
+ Add support for I/O via an I/O auxiliary
+
+2002-08-04 Bart Veer <bartv@tymora.demon.co.uk>
+
+ * include/hal_io.h: added argv/argv/environ definitions
+
+2002-05-23 Jesper Skov <jskov@redhat.com>
+
+ * cdl/hal_synth.cdl: Don't run cache tests.
+
+2002-04-10 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/synth.ld: Add RELOCS "section" and eh_frame section, plus
+ correct use of .gnu.linkonce sections.
+
+2002-02-28 Bart Veer <bartv@redhat.com>
+
+ * doc/synth.sgml, doc/makefile, doc/*.html:
+ Documentation for the synthetic target HAL.
+
+2002-01-25 Bart Veer <bartv@redhat.com>
+
+ * src/synth_intr.c (hal_interrupt_mask/unmask):
+ Add preconditions that interrupts are disabled on entry, rather
+ than disabling and reenabling the interrupts, since the
+ specification requires the former.
+
+2002-01-08 Jonathan Larmour <jlarmour@redhat.com>
+2001-11-01 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/hal_io.h: Support for mmap, lseek and open syscalls.
+ * include/hal_cache.h: Add HAL_ICACHE_IS_ENABLED and
+ HAL_DCACHE_IS_ENABLED.
+
+2001-12-07 Bart Veer <bartv@redhat.com>
+
+ * include/hal_io.h: Added cyg_hal_sys_getcwd()
+
+2001-08-02 Bart Veer <bartv@redhat.com>
+
+ * include/hal_intr.h:
+ Note a subtle interaction between the interrupt handling
+ and the context switch handling, which are in the
+ architectural and variant HAL packages respectively.
+
+2001-04-27 Bart Veer <bartv@redhat.com>
+
+ * All files
+ Major reorganization and clean-up of the synthetic target.
+
+2000-11-02 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/entry.c (_linux_entry): Extend memory using brk() syscall to
+ match memory layout
+
+ * src/syscall-i386-linux-1.0.S: Add brk syscall
+
+2000-10-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/pkgconf/mlt_i386_linux_ram.mlt:
+ Add heap1 section
+
+ * include/pkgconf/mlt_i386_linux_ram.h:
+ * include/pkgconf/mlt_i386_linux_ram.ldi:
+ Regenerated
+
+2000-10-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/hal_i386_linux.cdl: Correct memory layout file name
+
+2000-03-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/hal_i386_linux.cdl (CYGBLD_GLOBAL_COMMAND_PREFIX):
+
+ Revert most recent change for now to avoid breaking the
+ release system.
+
+2000-03-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/hal_i386_linux.cdl (CYGBLD_GLOBAL_COMMAND_PREFIX): Use native
+ toolchain by default, and describe versions to be used
+
+2000-02-29 Jesper Skov <jskov@redhat.com>
+
+ * include/plf_intr.h: Don't include kernel headers.
+
+2000-02-16 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_diag.c (hal_diag_write_char): Check that write call is
+ successful.
+
+2000-02-16 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/variant.inc: Added missed copyright notice.
+
+2000-02-15 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/variant.inc:
+ * include/var_intr.h:
+ * include/plf_intr.h:
+ These files added to make this HAL consistent with PC
+ version. They also contains some code moved out of the
+ architecture HAL.
+
+2000-01-24 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/*.cdl:
+
+ Remove obsolete option CYGTST_TESTING_IDENTIFIER.
+
+2000-01-21 Jesper Skov <jskov@cygnus.co.uk>
+ CR 902062-CR
+ * src/hal_diag.c:
+ * src/syscall-i386-linux-1.0.S:
+ Sync after write.
+
+ * src/hal_startup.c: Make signals NODEFER.
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+
+1999-12-20 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * cdl/hal_i386_linux.cdl: Add -Wl for linker options.
+
+1999-11-25 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/mlt_i386_linux_ram.h: New file(s).
+
+1999-11-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * cdl/hal_i386_linux.cdl: Added.
+ Use define_proc for const header defs.
+1999-10-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/linux_misc.c: Fix some really minor spelling typos
+
+ * src/hal_diag.c (hal_diag_read_char): Check if we were woken up by
+ the itimer alarm (which is used for rescheduling) - in which case
+ just read again.
+
+
+1999-10-05 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal_i386_linux.h: Changed to use REAL TIME as
+ default.
+
+ From Andrew Lunn (lunn@ma.tech.ascom.ch)
+ * src/PKGconf.mak:
+ * src/linux_misc.c: [added]
+ * src/syscall-i386-linux-1.0.S:
+ Added idle thread action, reducing host load when eCos is idle.
+
+1999-08-16 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/hal_i386_linux.h:
+
+ Proper case package display string.
+
+1999-05-20 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/hal_i386_linux.h: Move RTC setup here.
+
+1999-05-14 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18956
+ * include/pkgconf/mlt_i386_linux_ram.mlt:
+ * include/pkgconf/mlt_i386_linux_ram.ldi:
+ Fixed problem with rel_got.
+ Encode . in section name as __.
+
+1999-04-08 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/mlt_*.*: Use double underscore substitution
+ for period character in SECTION_* macro names (PR 19787)
+
+1999-04-08 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/*.ldi: Revised SECTION_* macro arguments to
+ avoid padded output sections (PR 19787)
+
+1999-03-22 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/linux.S: Added comment.
+ Doh! Managed to break compilation with a comment...
+
+1999-03-16 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19483
+ * src/linux.S (cyg_hal_hardware_init): Fiddled some more with the
+ bits to no avail.
+
+ * src/hal_startup.c:
+ Renamed hal_ to cyg_hal_.
+ Added exception handling.
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_startup.c (cyg_hal_isr_init): Initialize ISR table with
+ pointers to default ISR routine.
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19486
+ * src/linux.S (cyg_hal_hardware_init): Only enable zero divide
+ exceptions.
+
+1999-03-11 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_startup.c:
+ * src/entry.c:
+ Renamed hal_isr_init to cyg_hal_isr_init.
+
+ * src/hal_startup.c: Also catch SIGFPE.
+
+ * src/entry.c: Call cyg_hal_hardware_init.
+
+ * src/linux.S: [added]
+ * src/PKGconf.mak:
+ Added file to hold startup assembly code.
+
+1999-03-11 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/*.ldi: add copyright notices
+
+1999-03-04 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/*.ldi: give all LDI files unique names so
+ that they can co-exist in an eCos build tree (PR 19184)
+ * include/pkgconf/*.mlt: give all MLT files unique names so
+ that they can co-exist in an eCos build tree (PR 19184)
+
+1999-02-25 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/hal_startup.c:
+ Changed label used to access scheduler lock to one that is not
+ mangled by C++. This is intended to make support for interrupt
+ handling in non-kernel configurations easier.
+
+1999-02-22 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/syscall-i386-linux-1.0.S: Added copyright header.
+
+1999-02-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/hal_startup.c:
+ Rename hal_interrupts_deffered -> hal_interrupts_deferred
+ Rename CYG_ISR/VSR_* -> CYGNUM_HAL_ISR/VSR_* in line with HAL changes
+ Rename CYG_VECTOR_RTC -> CYGNUM_HAL_INTERRUPT_RTC
+
+ * src/syscall-i386-linux-1.0.S:
+ Add a FIX ME
+
+1999-02-08 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/ram.mlt: New memory layout save file
+
+1999-02-05 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/*.ldi: Remove LMA_EQ_VMA macro definition.
+
+1999-01-29 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal_i386_linux.h: Changed CDL type back to radio
+ to get consistent ConfigTool output.
+
+1999-01-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/ram.ldi: Commented out the rel_got change.
+
+1999-01-25 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/ram.ldi: Added rel.got section.
+
+1999-01-22 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_startup.c: Moved external declarations into top-level
+ scope to avoid compiler warning.
+
+1999-01-19 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal_i386_linux.h: Removed startup
+ config. Changed linux entry to dummy instead of bool.
+
+1999-01-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal_i386_linux.h: Added config for real-time
+ timer.
+
+1999-01-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_diag.c: Removed hal_diag_write_line.
+
+ * src/entry.c: Removed main/argv stuff.
+
+1999-01-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal_i386_linux.h: Added.
+
+1999-01-11 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_startup.c (hal_default_vsr):
+ * src/linux.ld (cyg_hal_sched_lock):
+ Added C-symbol reference to the scheduler lock.
+
+1999-01-11 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_startup.c (hal_default_vsr): Allow interrupt disable
+ count to be bigger than 1.
+
+1999-01-11 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/linux.ld: Added fix me. Remember to clean up.
+
+ * src/hal_startup.c: Removed bogus include statement.
+ Added CYGPKG_KERNEL config handling.
+
+ * src/hal_diag.c: Removed bogus include statements and functions.
+
+1999-01-07 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_startup.c (hal_isr_init): Use CYG_VECTOR_RTC rather than
+ hardcoded value.
+
+1999-01-07 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/syscall-i386-linux-1.0.S:
+ * src/hal_diag.c:
+ * src/PKGconf.mak:
+ Removed tabs & fixed comment style.
+
+1999-01-07 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/PKGconf.mak: Cleaned up.
+
+ * src/entry.c: Added (from proven's crtbegin.c).
+
+ * src/linux.ld: Added.
+
+ * src/hal_startup.cxx: (Deleted)
+ * src/hal_startup.c: (Added)
+ Changed code to C, cleaned up.
+
+1999-01-06 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_diag.c: Fixed warnings. Output chars in batches to avoid
+ problems with pkgtest - also improves performance.
+
+1999-01-06 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/syscall-i386-linux-1.0.S: Set behavior to match __ELF__.
+
+1998-12-18 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/syscall-i386-linux-1.0.S:
+ * src/hal_startup.cxx:
+ Fixed compiler warnings.
+
+Fri Dec 4 13:49:03 GMT 1998
+
+ * src/syscall-i386-linux-1.0.S: Fix to work with Bart's latest tools.
+ For some reason it doesn't define __ELF__ but, we really don't care.
+
+Mon Nov 9 15:18:11 GMT 1998 Chris Provenzano <proven@cygnus.com>
+
+ Initial i386 linux port.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/hal/synth/arch/current/cdl/hal_synth.cdl b/cesar/ecos/packages/hal/synth/arch/current/cdl/hal_synth.cdl
new file mode 100644
index 0000000000..538115c6d6
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/cdl/hal_synth.cdl
@@ -0,0 +1,139 @@
+# ====================================================================
+#
+# hal_synth.cdl
+#
+# Synthetic target architectural configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: jskov
+# Contributors: bartv
+# Date: 1999-11-01
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_HAL_SYNTH {
+ display "Linux Synthetic target"
+ parent CYGPKG_HAL_I386
+ define_header hal_synth.h
+ include_dir cyg/hal
+ requires !CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+
+ description "
+ The Linux Synthetic Target HAL package provides the
+ support needed to run eCos binaries on top of a
+ Linux kernel."
+
+ implements CYGINT_HAL_TESTS_NO_CACHES
+
+ make {
+ <PREFIX>/lib/target.ld: <PACKAGE>/src/synth.ld
+ $(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) $(CFLAGS) -o $@ $<
+ @echo $@ ": \\" > $(notdir $@).deps
+ @tail -n +2 target.tmp >> $(notdir $@).deps
+ @echo >> $(notdir $@).deps
+ @rm target.tmp
+ }
+ compile synth_entry.c synth_diag.c synth_intr.c synth_syscalls.c
+
+ define_proc {
+ puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_synth.h>"
+ }
+
+ # Real-time clock/counter specifics
+ cdl_component CYGNUM_HAL_RTC_CONSTANTS {
+ display "Real-time clock constants."
+ description "
+ In the synthetic target the system clock is implemented using
+ Linux setitimer() and a SIGALRM signal. The PERIOD value is the
+ number of microseconds between signals, the usec field of an
+ itimerval structure. It should be a multiple of 10000 because
+ Linux will not generate signals at a finer grain than that.
+ The NUMERATOR and DENOMINATOR are derived from the period."
+ flavor none
+
+ cdl_option CYGNUM_HAL_RTC_PERIOD {
+ display "Real-time clock period"
+ flavor data
+ default_value 10000
+ requires { 0 == (CYGNUM_HAL_RTC_PERIOD % 10000) }
+ description "
+ This option corresponds to the number of microseconds between
+ clock interrupts."
+ }
+ cdl_option CYGNUM_HAL_RTC_NUMERATOR {
+ display "Real-time clock numerator"
+ flavor data
+ calculated CYGNUM_HAL_RTC_DENOMINATOR * 1000 * CYGNUM_HAL_RTC_PERIOD
+ }
+ cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
+ display "Real-time clock denominator"
+ flavor data
+ default_value 100
+ }
+ }
+ # What to do when idling
+ cdl_option CYGIMP_HAL_IDLE_THREAD_SPIN {
+ display "Spin when idle"
+ default_value CYGIMP_IDLE_THREAD_YIELD
+ description "
+ By default, whenever the eCos application enters the idle thread
+ the synthetic target HAL will make a select() system call. Effectively
+ this causes the application to block until an interrupt occurs,
+ without consuming any cpu resources, as if the hardware supported
+ some sort of IDLE instruction. Usually this behaviour is desirable.
+ However it interferes with the emulation of some hardware. For
+ example the synthetic watchdog timer device can use consumed cpu time
+ rather than wallclock time to determine whether or not the watchdog
+ has triggered, and if the process is spending nearly all its time
+ blocked in select() then the watchdog will not trigger when it should.
+ There are also some kernel configurations which require that the idle
+ thread does not block."
+ }
+ requires { CYGIMP_IDLE_THREAD_YIELD implies CYGIMP_HAL_IDLE_THREAD_SPIN }
+
+ cdl_option CYGBLD_LINKER_SCRIPT {
+ display "Linker script"
+ flavor data
+ no_define
+ calculated { "src/synth.ld" }
+ }
+
+}
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/filters.png b/cesar/ecos/packages/hal/synth/arch/current/doc/filters.png
new file mode 100644
index 0000000000..ed89b28491
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/filters.png
Binary files differ
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/hal-synth-arch.html b/cesar/ecos/packages/hal/synth/arch/current/doc/hal-synth-arch.html
new file mode 100644
index 0000000000..29ec326b91
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/hal-synth-arch.html
@@ -0,0 +1,177 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>eCos Synthetic Target</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
+"><LINK
+REL="NEXT"
+TITLE="Overview"
+HREF="synth.html"></HEAD
+><BODY
+CLASS="PART"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+SUMMARY="Header navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+>&nbsp;</TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="synth.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><DIV
+CLASS="PART"
+><A
+NAME="HAL-SYNTH-ARCH"><DIV
+CLASS="TITLEPAGE"
+><H1
+CLASS="TITLE"
+>I. eCos Synthetic Target</H1
+><DIV
+CLASS="TOC"
+><DL
+><DT
+><B
+>Table of Contents</B
+></DT
+><DT
+><A
+HREF="synth.html"
+>Overview</A
+>&nbsp;--&nbsp;Overview</DT
+><DT
+><A
+HREF="synth-install.html"
+>Installation</A
+>&nbsp;--&nbsp;Preparing to use the synthetic target</DT
+><DT
+><A
+HREF="synth-running.html"
+>Running a Synthetic Target Application</A
+>&nbsp;--&nbsp;Arguments and configuration files</DT
+><DT
+><A
+HREF="synth-gui.html"
+>The I/O Auxiliary's User Interface</A
+>&nbsp;--&nbsp;Controlling the I/O Auxiliary</DT
+><DT
+><A
+HREF="synth-console.html"
+>The Console Device</A
+>&nbsp;--&nbsp;Show output from the eCos application</DT
+><DT
+><A
+HREF="synth-syscalls.html"
+>System Calls</A
+>&nbsp;--&nbsp;Access Linux system facilities</DT
+><DT
+><A
+HREF="synth-new-target.html"
+>Writing New Devices - target</A
+>&nbsp;--&nbsp;extending the synthetic target, target-side</DT
+><DT
+><A
+HREF="synth-new-host.html"
+>Writing New Devices - host</A
+>&nbsp;--&nbsp;extending the synthetic target, host-side</DT
+><DT
+><A
+HREF="synth-porting.html"
+>Porting</A
+>&nbsp;--&nbsp;Adding support for other hosts</DT
+></DL
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+SUMMARY="Footer navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="synth.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Overview</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/layout.fig b/cesar/ecos/packages/hal/synth/arch/current/doc/layout.fig
new file mode 100644
index 0000000000..cd1113dce0
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/layout.fig
@@ -0,0 +1,57 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 0 600 8100 600
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 0 900 8100 900
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 0 1800 8100 1800
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 0 3900 8100 3900
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 600 4800 600 5100
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 0 0 8100 0 8100 5100 0 5100 0 0
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 5400 300 5400 600
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 3600 300 3600 600
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 1800 300 1800 600
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 6300 900 6300 4800
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 6300 300 6300 600
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 1800 4800 1800 900
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 6000 1800 6000 3900
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 1800 3600 6300 3600
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 2100 4800 2100 5100
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 0 4800 8100 4800
+4 0 0 50 0 0 16 0.0000 4 165 810 6825 4425 .main.se\001
+4 0 0 50 0 0 16 0.0000 4 165 720 6825 2700 .main.e\001
+4 0 0 50 0 0 16 0.0000 4 165 840 6825 1425 .main.ne\001
+4 0 0 50 0 0 16 0.0000 4 225 1395 6375 525 .menubar.help\001
+4 0 0 50 0 0 16 0.0000 4 165 915 3450 225 .menubar\001
+4 0 0 50 0 0 16 0.0000 4 165 1455 3600 525 .menubar.view\001
+4 0 0 50 0 0 16 0.0000 4 165 765 3525 825 .toolbar\001
+4 0 0 50 0 0 16 0.0000 4 165 735 3525 1350 .main.n\001
+4 0 0 50 0 0 16 0.0000 4 165 1650 3150 2700 .main.centre.text\001
+4 0 0 50 0 0 16 0.0000 4 165 705 3525 4425 .main.s\001
+4 0 0 50 0 0 16 0.0000 4 150 1050 3300 5025 .status.text\001
+4 0 0 50 0 0 16 0.0000 4 165 885 150 4425 .main.sw\001
+4 0 0 50 0 0 16 0.0000 4 165 795 150 2700 .main.w\001
+4 0 0 50 0 0 16 0.0000 4 165 915 150 1425 .main.nw\001
+4 0 0 50 0 0 16 0.0000 4 165 1320 0 525 .menubar.file\001
+4 0 0 50 0 0 16 0.0000 4 165 1350 1875 525 .menubar.edit\001
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/layout.png b/cesar/ecos/packages/hal/synth/arch/current/doc/layout.png
new file mode 100644
index 0000000000..257935a6ab
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/layout.png
Binary files differ
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/makefile b/cesar/ecos/packages/hal/synth/arch/current/doc/makefile
new file mode 100644
index 0000000000..2e54c10439
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/makefile
@@ -0,0 +1,55 @@
+#=============================================================================
+#
+# makefile
+#
+# For building the synthetic target documentation.
+#
+#=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#=============================================================================
+#####DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Date: 2001-01-11
+#####DESCRIPTIONEND####
+#=============================================================================
+
+TOPLEVEL := ../../../../..
+MAIN_SGML := synth.sgml
+MAIN_HTML := hal-synth-arch.html
+MAIN_PDF := hal-synth-arch.pdf
+OTHER_SGML :=
+PICTURES :=
+
+include $(TOPLEVEL)/pkgconf/rules.doc
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/menu_edit.png b/cesar/ecos/packages/hal/synth/arch/current/doc/menu_edit.png
new file mode 100644
index 0000000000..7923bf7152
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/menu_edit.png
Binary files differ
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/menu_file.png b/cesar/ecos/packages/hal/synth/arch/current/doc/menu_file.png
new file mode 100644
index 0000000000..8002debb85
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/menu_file.png
Binary files differ
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/menu_help.png b/cesar/ecos/packages/hal/synth/arch/current/doc/menu_help.png
new file mode 100644
index 0000000000..ef16dfaec8
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/menu_help.png
Binary files differ
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/menu_view.png b/cesar/ecos/packages/hal/synth/arch/current/doc/menu_view.png
new file mode 100644
index 0000000000..199a80bc27
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/menu_view.png
Binary files differ
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/preferences.png b/cesar/ecos/packages/hal/synth/arch/current/doc/preferences.png
new file mode 100644
index 0000000000..7b2a677542
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/preferences.png
Binary files differ
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/screen_main.png b/cesar/ecos/packages/hal/synth/arch/current/doc/screen_main.png
new file mode 100644
index 0000000000..7be3651f63
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/screen_main.png
Binary files differ
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/synth-console.html b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-console.html
new file mode 100644
index 0000000000..ce409974c2
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-console.html
@@ -0,0 +1,373 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>The Console Device</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
+"><LINK
+REL="HOME"
+TITLE="eCos Synthetic Target"
+HREF="hal-synth-arch.html"><LINK
+REL="PREVIOUS"
+TITLE="The I/O Auxiliary's User Interface"
+HREF="synth-gui.html"><LINK
+REL="NEXT"
+TITLE="System Calls"
+HREF="synth-syscalls.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+SUMMARY="Header navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos Synthetic Target</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="synth-gui.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="synth-syscalls.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="SYNTH-CONSOLE">The Console Device</H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN435"
+></A
+><H2
+>Name</H2
+>The console device &nbsp;--&nbsp;Show output from the eCos application</DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-CONSOLE-DESCRIPTION"
+></A
+><H2
+>Description</H2
+><P
+>The eCos application can generate text output in a variety of ways,
+including calling <TT
+CLASS="FUNCTION"
+>printf</TT
+> or
+<TT
+CLASS="FUNCTION"
+>diag_printf</TT
+>. When the I/O auxiliary is enabled
+the eCos startup code will instantiate a console device to process all
+such output. If operating in text mode the output will simply go to
+standard output, or to a logfile if the <TT
+CLASS="OPTION"
+>-l</TT
+> command
+line option is specified. If operating in graphical mode the output
+will go to the central text window, and optionally to a logfile as
+well. In addition it is possible to control the appearance of the main
+text via the target definition file, and to install extra filters for
+certain types of text.
+ </P
+><P
+>It should be noted that the console device is line-oriented, not
+character-oriented. This means that outputting partial lines is not
+supported, and some functions such as <TT
+CLASS="FUNCTION"
+>fflush</TT
+> and
+<TT
+CLASS="FUNCTION"
+>setvbuf</TT
+> will not operate as expected. This
+limitation prevents much possible confusion when using filters to
+control the appearance of the text window, and has some performance
+benefits - especially when the eCos application generates a great deal
+of output such as when tracing is enabled. For most applications this
+is not a problem, but it is something that developers should be aware
+of.
+ </P
+><P
+>The console device is output-only, it does not provide any support for
+keyboard input. If the application requires keyboard input then that
+should be handled by a separate eCos device package and matching
+host-side code.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-CONSOLE-INSTALL"
+></A
+><H2
+>Installation</H2
+><P
+>The eCos side of the console device is implemented by the
+architectural HAL itself, in the source file
+<TT
+CLASS="FILENAME"
+>synth_diag.c</TT
+>, rather than in a separate device
+package. Similarly the host-side implementation,
+<TT
+CLASS="FUNCTION"
+>console.tcl</TT
+>, is part of the architectural HAL's
+host-side support. It gets installed automatically alongside the I/O
+auxiliary itself, so no separate installation procedure is required.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-CONSOLE-TDF"
+></A
+><H2
+>Target Definition File</H2
+><P
+>The <A
+HREF="synth-running.html#SYNTH-RUNNING-TDF"
+>target definition file</A
+>
+can contain a number of entries related to the console device. These
+are all optional, they only control the appearance of text output. If
+such control is desired then the relevant options should appear in the
+body of a <B
+CLASS="COMMAND"
+>synth_device</B
+> entry:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device console {
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>The first option is <B
+CLASS="COMMAND"
+>appearance</B
+>, used to control the
+appearance of any text generated by the eCos application that does not
+match one of the installed filters. This option takes the same
+argument as any other filter, for example:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device console {
+ appearance -foreground white -background black
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>Any number of additional filters can be created with a
+<B
+CLASS="COMMAND"
+>filter</B
+> option, for example:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device console {
+ &#8230;
+ filter trace {^TRACE:.*} -foreground HotPink1 -hide 1
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>The first argument gives the new filter a name which will be used in
+the <A
+HREF="synth-gui.html#SYNTH-GUI-TEXT"
+>filters dialog</A
+>. Filter names
+should be unique. The second argument is a Tcl regular expression. The
+console support will match each line of eCos output against this
+regular expression, and if a match is found then the filter will be
+used for this line of text. The above example matches any line of
+output that begins with <TT
+CLASS="LITERAL"
+>TRACE:</TT
+>, which corresponds
+to the eCos infrastructure's tracing facilities. The remaining options
+control the desired appearance for matched text. If some eCos output
+matches the regular expressions for several different filters then
+only the first match will be used.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-CONSOLE-TARGET-CONFIG"
+></A
+><H2
+>Target-side
+ Configuration Options</H2
+><P
+>There are no target-side configuration options related to the console
+device.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-CONSOLE-ARGUMENTS"
+></A
+><H2
+>Command Line Arguments</H2
+><P
+>The console device does not use any command-line arguments.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-CONSOLE-HOOKS"
+></A
+><H2
+>Hooks</H2
+><P
+>The console device does not provide any hooks.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN477"
+></A
+><H2
+>Additional Tcl Procedures</H2
+><P
+>The console device does not provide any additional Tcl procedures that
+can be used by other scripts.
+ </P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+SUMMARY="Footer navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="synth-gui.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="hal-synth-arch.html"
+ACCESSKEY="H"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="synth-syscalls.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>The I/O Auxiliary's User Interface</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>System Calls</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/synth-gui.html b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-gui.html
new file mode 100644
index 0000000000..7d1d719f59
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-gui.html
@@ -0,0 +1,738 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>The I/O Auxiliary's User Interface</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
+"><LINK
+REL="HOME"
+TITLE="eCos Synthetic Target"
+HREF="hal-synth-arch.html"><LINK
+REL="PREVIOUS"
+TITLE="Running a Synthetic Target Application"
+HREF="synth-running.html"><LINK
+REL="NEXT"
+TITLE="The Console Device"
+HREF="synth-console.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+SUMMARY="Header navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos Synthetic Target</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="synth-running.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="synth-console.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="SYNTH-GUI">The I/O Auxiliary's User Interface</H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN304"
+></A
+><H2
+>Name</H2
+>User Interface&nbsp;--&nbsp;Controlling the I/O Auxiliary</DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-GUI-DESCRIPTION"
+></A
+><H2
+>Description</H2
+><P
+>The synthetic target auxiliary is designed to support both extensions
+and user customization. Support for the desired devices is dynamically
+loaded, and each device can extend the user interface. For example it
+is possible for a device to add menu options, place new buttons on the
+toolbar, create its own sub-window within the overall layout, or even
+create entire new toplevel windows. These subwindows or toplevels
+could show graphs of activity such as interrupts or packets being
+transferred. They could also allow users to interact with the eCos
+application, for example by showing a number of buttons which will be
+mapped on to digital inputs in the eCos application. Different
+applications will have their own I/O requirements, changing the
+host-side support files that get loaded and that may modify the user
+interface. The I/O auxiliary also reads in user configuration scripts
+which can enhance the interface in the same way. Therefore the exact
+user interface will depend on the user and on the eCos application
+being run. However the overall layout is likely to remain the same.
+ </P
+><DIV
+CLASS="INFORMALFIGURE"
+><A
+NAME="AEN310"><P
+></P
+><DIV
+CLASS="MEDIAOBJECT"
+><P
+><IMG
+SRC="screen_main.gif"
+ALIGN="CENTER"></P
+></DIV
+><P
+></P
+></DIV
+><P
+>The title bar identifies the window as belonging to an eCos synthetic
+target application and lists both the application name and its process
+id. The latter is especially useful if the application was started
+directly from a shell prompt and the user now wants to attach a gdb
+session. The window has a conventional menu bar with the usual
+entries, plus a toolbar with buttons for common operations such as cut
+and paste. Balloon help is supported.
+ </P
+><P
+>There is a central <A
+HREF="synth-gui.html#SYNTH-GUI-TEXT"
+>text window</A
+>,
+possibly surrounded by various sub-windows for various devices. For
+example there could be a row of emulated LED's above the text window,
+and monitors of ethernet traffic and interrupt activity on the right.
+At the bottom of the window is a status line, including a small
+animation that shows whether or not the eCos application is still
+running.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-GUI-MENUS"
+></A
+><H2
+>Menus and the Toolbar</H2
+><P
+>Usually there will be four menus on the menu bar:
+<SPAN
+CLASS="GUIMENU"
+>File</SPAN
+>, <SPAN
+CLASS="GUIMENU"
+>Edit</SPAN
+>,
+<SPAN
+CLASS="GUIMENU"
+>View</SPAN
+> and <SPAN
+CLASS="GUIMENU"
+>Help</SPAN
+>.
+ </P
+><DIV
+CLASS="INFORMALFIGURE"
+><A
+NAME="AEN324"><P
+></P
+><DIV
+CLASS="MEDIAOBJECT"
+><P
+><IMG
+SRC="menu_file.gif"
+ALIGN="CENTER"></P
+></DIV
+><P
+></P
+></DIV
+><P
+>On the <SPAN
+CLASS="GUIMENU"
+>File</SPAN
+> menu there are three entries related to
+saving the current contents of the central text window.
+<SPAN
+CLASS="GUIMENUITEM"
+>Save</SPAN
+> is used to save the currently visible
+contents of the text window. Any text that is hidden because of
+filters will not be written to the savefile. If there has been a
+previous <SPAN
+CLASS="GUIMENUITEM"
+>Save</SPAN
+> or <SPAN
+CLASS="GUIMENUITEM"
+>Save
+As</SPAN
+> operation then the existing savefile will be re-used,
+otherwise the user will be asked to select a suitable file.
+<SPAN
+CLASS="GUIMENUITEM"
+>Save As</SPAN
+> also saves just the currently
+visible contents but will always prompt the user for a filename.
+<SPAN
+CLASS="GUIMENUITEM"
+>Save All</SPAN
+> can be used to save the full
+contents of the text window, including any text that is currently
+hidden. It will always prompt for a new filename, to avoid confusion
+with partial savefiles.
+ </P
+><P
+>Usually the eCos application will be run from inside gdb or from a
+shell prompt. Killing off the application while it is being debugged
+in a gdb session is not a good idea, it would be better to use gdb's
+own <B
+CLASS="COMMAND"
+>kill</B
+> command. Alternatively the eCos
+application itself can use the <TT
+CLASS="FUNCTION"
+>CYG_TEST_EXIT</TT
+> or
+<TT
+CLASS="FILENAME"
+>cyg_hal_sys_exit</TT
+> functionality. However it is
+possible to terminate the application from the I/O auxiliary using
+<SPAN
+CLASS="GUIMENUITEM"
+>Kill eCos</SPAN
+>. A clean shutdown will be
+attempted, but that can fail if the application is currently halted
+inside gdb or if it has crashed completely. As a last resort
+<TT
+CLASS="CONSTANT"
+>SIGKILL</TT
+> will be used.
+ </P
+><P
+>When operating in graphical mode the I/O auxiliary will normally
+continue to run even after the eCos application has exited. This
+allows the user to examine the last few lines of output, and perhaps
+perform actions such as saving the output to a file. The
+<SPAN
+CLASS="GUIMENUITEM"
+>Exit</SPAN
+> menu item can be used to shut down the
+auxiliary. Note that this behaviour can be changed with command line
+arguments <A
+HREF="synth-running.html#SYNTH-RUNNING-ARGUMENTS"
+><TT
+CLASS="OPTION"
+>--exit</TT
+></A
+> and
+<A
+HREF="synth-running.html#SYNTH-RUNNING-ARGUMENTS"
+><TT
+CLASS="OPTION"
+>--no-exit</TT
+></A
+>.
+ </P
+><P
+>If <SPAN
+CLASS="GUIMENUITEM"
+>Exit</SPAN
+> is used while the eCos application
+is still running then the I/O auxiliary will first attempt to
+terminate the application cleanly, and then exit.
+ </P
+><DIV
+CLASS="INFORMALFIGURE"
+><A
+NAME="AEN349"><P
+></P
+><DIV
+CLASS="MEDIAOBJECT"
+><P
+><IMG
+SRC="menu_edit.gif"
+ALIGN="CENTER"></P
+></DIV
+><P
+></P
+></DIV
+><P
+>The <SPAN
+CLASS="GUIMENU"
+>Edit</SPAN
+> menu contains the usual entries for
+text manipulation: <SPAN
+CLASS="GUIMENUITEM"
+>Cut</SPAN
+>,
+<SPAN
+CLASS="GUIMENUITEM"
+>Copy</SPAN
+>, <SPAN
+CLASS="GUIMENUITEM"
+>Paste</SPAN
+>,
+<SPAN
+CLASS="GUIMENUITEM"
+>Clear</SPAN
+> and <SPAN
+CLASS="GUIMENUITEM"
+>Select
+All</SPAN
+>. These all operate on the central text window. By
+default this window cannot be edited so the cut, paste and clear
+operations are disabled. If the user wants to edit the contents of the
+text window then the <SPAN
+CLASS="GUIMENUITEM"
+>Read Only</SPAN
+> checkbutton
+should be toggled.
+ </P
+><P
+>The <SPAN
+CLASS="GUIMENUITEM"
+>Preferences</SPAN
+> menu item brings up a
+miscellaneous preferences dialog. One of the preferences relates to
+online help: the I/O auxiliary does not currently have a built-in html
+viewer; instead it will execute an external browser of some sort. With
+the example settings shown, the I/O auxiliary will first attempt to
+interact with an existing mozilla session. If that fails it will try
+to run a new mozilla instance, or as a last result use the Gnome help
+viewer.
+ </P
+><DIV
+CLASS="INFORMALFIGURE"
+><A
+NAME="AEN363"><P
+></P
+><DIV
+CLASS="MEDIAOBJECT"
+><P
+><IMG
+SRC="preferences.gif"
+ALIGN="CENTER"></P
+></DIV
+><P
+></P
+></DIV
+><P
+>The <SPAN
+CLASS="GUIMENU"
+>View</SPAN
+> menu contains the <SPAN
+CLASS="GUIMENUITEM"
+>System
+Filters</SPAN
+> entry, used to edit the settings for the current
+<A
+HREF="synth-gui.html#SYNTH-GUI-TEXT"
+>filters</A
+>.
+ </P
+><DIV
+CLASS="INFORMALFIGURE"
+><A
+NAME="AEN371"><P
+></P
+><DIV
+CLASS="MEDIAOBJECT"
+><P
+><IMG
+SRC="menu_view.gif"
+ALIGN="CENTER"></P
+></DIV
+><P
+></P
+></DIV
+><P
+>The <SPAN
+CLASS="GUIMENU"
+>Help</SPAN
+> menu can be used to activate online help
+for eCos generally, for the synthetic target as a whole, and for
+specific devices supported by the generic target. The Preferences
+dialog can be used to select the browser that will be used.
+ </P
+><DIV
+CLASS="INFORMALFIGURE"
+><A
+NAME="AEN377"><P
+></P
+><DIV
+CLASS="MEDIAOBJECT"
+><P
+><IMG
+SRC="menu_help.gif"
+ALIGN="CENTER"></P
+></DIV
+><P
+></P
+></DIV
+><DIV
+CLASS="NOTE"
+><BLOCKQUOTE
+CLASS="NOTE"
+><P
+><B
+>Note: </B
+>At the time of writing there is no well-defined toplevel index file
+for all eCos documentation. Hence the relevant menu item is disabled.
+Documentation for the synthetic target and the supported devices
+is stored as part of the package itself so can usually be found fairly
+easily. It may be necessary to set the <TT
+CLASS="ENVAR"
+>ECOS_REPOSITORY</TT
+>
+environment variable.
+ </P
+></BLOCKQUOTE
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-GUI-TEXT"
+></A
+><H2
+>The Main Text Window</H2
+><P
+>The central text window holds the console output from the eCos
+application: the screen shot above shows DHCP initialization data from
+the TCP/IP stack, and some output from the <TT
+CLASS="FUNCTION"
+>main</TT
+>
+thread at the bottom. Some devices can insert text of their own, for
+example the ethernet device support can be configured to show details
+of incoming and outgoing packets. Mixing the output from the eCos
+application and the various devices can make it easier to understand
+the order in which events occur.
+ </P
+><P
+>The appearance of text from different sources can be controlled by
+means of filters, and it is also possible to hide some of the text.
+For example, if tracing is enabled in the eCos configuration then the
+trace output can be given its own colour scheme, making it stand out
+from the rest of the output. In addition the trace output is generally
+voluminous so it can be hidden by default, made visible only to find
+out more about what was happening when a particular problem occurred.
+Similarly the ethernet device support can output details of the
+various packets being transferred, and using a different background
+colour for this output again makes it easier to distinguish from
+console output.
+ </P
+><P
+>The default appearance for most filters is controlled via the
+<A
+HREF="synth-running.html#SYNTH-RUNNING-TDF"
+>target definition file</A
+>. An
+example entry might be:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> filter trace {^TRACE:.*} -foreground HotPink1 -hide 1</PRE
+></TD
+></TR
+></TABLE
+><P
+>The various colours and the hide flag for each filter can be changed
+at run-time, using the <SPAN
+CLASS="GUIMENUITEM"
+>System Filters</SPAN
+> item
+on the <SPAN
+CLASS="GUIMENU"
+>View</SPAN
+> menu. This will bring up a dialog like
+the following:
+ </P
+><DIV
+CLASS="INFORMALFIGURE"
+><A
+NAME="AEN395"><P
+></P
+><DIV
+CLASS="MEDIAOBJECT"
+><P
+><IMG
+SRC="filters.gif"
+ALIGN="CENTER"></P
+></DIV
+><P
+></P
+></DIV
+><P
+>It should be noted that the text window is line-oriented, not
+character-oriented. If an eCos application sends a partial line of
+text then that will remain buffered until a newline character is
+received, rather than being displayed immediately. This avoids
+confusion when there is concurrent output from several sources.
+ </P
+><P
+>By default the text window is read-only. This means it will not allow
+cut, paste and clear operations, and keyboard input will be ignored.
+The <SPAN
+CLASS="GUIMENU"
+>Edit</SPAN
+> menu has a checkbutton <SPAN
+CLASS="GUIMENUITEM"
+>Read
+Only</SPAN
+> which can be toggled to allow write operations. For
+example, a user could type in a reminder of what was happening at this
+time, or paste in part of a gdb session. Such keyboard input does not
+get forwarded to the eCos application: if the latter requires keyboard
+input then that should happen via a separate keyboard device.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-GUI-LAYOUT"
+></A
+><H2
+>Positioning Optional Windows</H2
+><P
+>Some devices may create their own subwindows, for example to monitor
+ethernet traffic or to provide additional I/O facilities such as
+emulated LED's or buttons. Usually the target definition file can be
+used to control the <A
+HREF="synth-gui.html#SYNTH-GUI-LAYOUT"
+>layout</A
+> of
+these windows. This requires an understanding of the overall layout of
+the display.
+ </P
+><DIV
+CLASS="INFORMALFIGURE"
+><A
+NAME="AEN407"><P
+></P
+><DIV
+CLASS="MEDIAOBJECT"
+><P
+><IMG
+SRC="layout.gif"
+ALIGN="CENTER"></P
+></DIV
+><P
+></P
+></DIV
+><P
+>Subwindows are generally packed in one of eight frames surrounding the
+central text window: <TT
+CLASS="VARNAME"
+>.main.nw</TT
+>,
+<TT
+CLASS="VARNAME"
+>.main.n</TT
+>, <TT
+CLASS="VARNAME"
+>.main.ne</TT
+>,
+<TT
+CLASS="VARNAME"
+>.main.w</TT
+>, <TT
+CLASS="VARNAME"
+>.main.e</TT
+>,
+<TT
+CLASS="VARNAME"
+>.main.sw</TT
+>, <TT
+CLASS="VARNAME"
+>.main.s</TT
+>, and
+<TT
+CLASS="VARNAME"
+>.main.se</TT
+>. To position a row of LED's above the text
+window and towards the left, a target definition file could contain an
+entry such as:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device led {
+ pack -in .main.n -side left
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>Similarly, to put a traffic monitor window on the right of the text
+window would involve something like:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> &#8230;
+ monitor_pack -in .main.e -side bottom
+ &#8230;</PRE
+></TD
+></TR
+></TABLE
+><P
+>Often it will be sufficient to specify a container frame and one of
+<TT
+CLASS="CONSTANT"
+>left</TT
+>, <TT
+CLASS="CONSTANT"
+>right</TT
+>,
+<TT
+CLASS="CONSTANT"
+>top</TT
+> or <TT
+CLASS="CONSTANT"
+>bottom</TT
+>. Full control
+over the positioning requires an understanding of Tcl/Tk and in
+particular the packing algorithm, and an appropriate reference work
+should be consulted.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-GUI-GLOBAL-CONFIG"
+></A
+><H2
+>Global Settings</H2
+><DIV
+CLASS="NOTE"
+><BLOCKQUOTE
+CLASS="NOTE"
+><P
+><B
+>Note: </B
+>This section still to be written - it should document the interaction
+between X resources and ecosynth, and how users can control settings
+such as the main foreground and background colours.
+ </P
+></BLOCKQUOTE
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+SUMMARY="Footer navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="synth-running.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="hal-synth-arch.html"
+ACCESSKEY="H"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="synth-console.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Running a Synthetic Target Application</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>The Console Device</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/synth-install.html b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-install.html
new file mode 100644
index 0000000000..dc5db60c11
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-install.html
@@ -0,0 +1,404 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Installation</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
+"><LINK
+REL="HOME"
+TITLE="eCos Synthetic Target"
+HREF="hal-synth-arch.html"><LINK
+REL="PREVIOUS"
+TITLE="Overview"
+HREF="synth.html"><LINK
+REL="NEXT"
+TITLE="Running a Synthetic Target Application"
+HREF="synth-running.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+SUMMARY="Header navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos Synthetic Target</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="synth.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="synth-running.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="SYNTH-INSTALL">Installation</H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN45"
+></A
+><H2
+>Name</H2
+>Installation&nbsp;--&nbsp;Preparing to use the synthetic target</DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-INSTALL-HOST"
+></A
+><H2
+>Host-side Software</H2
+><P
+>To get the full functionality of the synthetic target, users must
+build and install the I/O auxiliary ecosynth and various support
+files. It is possible to develop applications for the synthetic target
+without the auxiliary, but only limited I/O facilities will be
+available. The relevant code resides in the <TT
+CLASS="FILENAME"
+>host</TT
+> subdirectory of the synthetic target
+architectural HAL package, and building it involves the standard
+<B
+CLASS="COMMAND"
+>configure</B
+>, <B
+CLASS="COMMAND"
+>make</B
+>, and
+<B
+CLASS="COMMAND"
+>make install</B
+> steps.
+ </P
+><P
+>There are two main ways of building the host-side software. It is
+possible to build both the generic host-side software and all
+package-specific host-side software, including the I/O auxiliary. in a
+single build tree. This involves using the
+<B
+CLASS="COMMAND"
+>configure</B
+> script at the toplevel of the eCos
+repository, which will automatically search the <TT
+CLASS="FILENAME"
+>packages</TT
+> hierarchy for host-side
+software. For more information on this, see the
+<TT
+CLASS="FILENAME"
+>README.host</TT
+> file at the top of the repository.
+Note that if you have an existing build tree which does not include
+the synthetic target architectural HAL package then it will be
+necessary to rerun the toplevel configure script: the search for
+appropriate packages happens at configure time.
+ </P
+><P
+>The alternative is to build just the host-side for this package.
+This involves creating a suitable build directory and running the
+<B
+CLASS="COMMAND"
+>configure</B
+> script. Note that building directly in
+the source tree is not allowed.
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+>$ cd &lt;somewhere suitable&gt;
+$ mkdir synth_build
+$ cd synth_build
+$ &lt;repo&lt;&gt;/packages/hal/synth/arch/&lt;version&gt;/host/configure &lt;options&gt;
+$ make
+$ make install</PRE
+></TD
+></TR
+></TABLE
+><P
+>The code makes extensive use of Tcl/TK and requires version 8.3 or
+later. This is checked by the <B
+CLASS="COMMAND"
+>configure</B
+> script. By
+default it will use the system's Tcl installation in <TT
+CLASS="FILENAME"
+>/usr</TT
+>. If a different, more recent Tcl
+installation should be used then its location can be specified using
+the options <TT
+CLASS="OPTION"
+>--with-tcl=&lt;path&gt;</TT
+>,
+<TT
+CLASS="OPTION"
+>--with-tcl-header=&lt;path&gt;</TT
+> and
+<TT
+CLASS="OPTION"
+>--with-tcl-lib=&lt;path&gt;</TT
+>. For more information on these options
+see the <TT
+CLASS="FILENAME"
+>README.host</TT
+> file at the toplevel of the
+eCos repository.
+ </P
+><P
+>Some users may also want to specify the install location using a
+<TT
+CLASS="OPTION"
+>--prefix=&lt;path&gt;</TT
+> option. The default install
+location is <TT
+CLASS="FILENAME"
+>/usr/local</TT
+>. It is
+essential that the <TT
+CLASS="FILENAME"
+>bin</TT
+>
+subdirectory of the install location is on the user's search
+<TT
+CLASS="ENVAR"
+>PATH</TT
+>, otherwise the eCos application will be unable to
+locate and execute the I/O auxiliary ecosynth.
+ </P
+><P
+>Because ecosynth is run automatically by an eCos application rather
+than explicitly by the user, it is not installed in the <TT
+CLASS="FILENAME"
+>bin</TT
+> subdirectory itself. Instead it is
+installed below <TT
+CLASS="FILENAME"
+>libexec</TT
+>,
+together with various support files such as images. At configure time
+it is usually possible to specify an alternative location for
+<TT
+CLASS="FILENAME"
+>libexec</TT
+> using
+<TT
+CLASS="OPTION"
+>--exec-prefix=&lt;path&gt;</TT
+> or
+<TT
+CLASS="OPTION"
+>--libexecdir=&lt;path&gt;</TT
+>. These options should not
+be used for this package because the eCos application is built
+completely separately and does not know how the host-side was
+configured.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-TOOLS"
+></A
+><H2
+>Toolchain</H2
+><P
+>When developing eCos applications for a normal embedded target it is
+necessary to use a suitable cross-compiler and related tools such as
+the linker. Developing for the synthetic target is easier because you
+can just use the standard GNU tools (gcc, g++, ld, &#8230;) which
+were provided with your Linux distribution, or which you used to build
+your own Linux setup. Any reasonably recent version of the tools, for
+example gcc 2.96(Red Hat) as shipped with Red Hat Linux 7, should be
+sufficient.
+ </P
+><P
+>There is one important limitation when using these tools: current gdb
+will not support debugging of eCos threads on the synthetic target. As
+far as gdb is concerned a synthetic target application is
+indistinguishable from a normal Linux application, so it assumes that
+any threads will be created by calls to the Linux
+<TT
+CLASS="FUNCTION"
+>pthread_create</TT
+> function provided by the C
+library. Obviously this is not the case since the application is never
+linked with that library. Therefore gdb never notices the eCos thread
+mechanisms and assumes the application is single-threaded. Fixing this
+is possible but would involve non-trivial changes to gdb.
+ </P
+><P
+>Theoretically it is possible to develop synthetic target applications
+on, for example, a PC running Windows and then run the resulting
+executables on another machine that runs Linux. This is rarely useful:
+if a Linux machine is available then usually that machine will also be
+used for building ecos and the application. However, if for some
+reason it is necessary or desirable to build on another machine then
+this requires a suitable cross-compiler and related tools. If the
+application will be running on a typical PC with an x86 processor then
+a suitable configure triplet would be
+<TT
+CLASS="USERINPUT"
+><B
+>i686-pc-linux-gnu</B
+></TT
+>. The installation
+instructions for the various GNU tools should be consulted for further
+information.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-HARDWARE"
+></A
+><H2
+>Hardware Preparation</H2
+><P
+>Preparing a real embedded target for eCos development can be tricky.
+Often the first step is to install suitable firmware, usually RedBoot.
+This means creating and building a special configuration for eCos with
+the RedBoot template, then somehow updating the target's flash chips
+with the resulting RedBoot image. Typically it will also be necessary
+to get a working serial connection, and possibly set up ethernet as
+well. Although usually none of the individual steps are particularly
+complicated, there are plenty of ways in which things can go wrong and
+it can be hard to figure out what is actually happening. Of course
+some board manufacturers make life easier for their developers by
+shipping hardware with RedBoot preinstalled, but even then it is still
+necessary to set up communication between host and target.
+ </P
+><P
+>None of this is applicable to the synthetic target. Instead you can
+just build a normal eCos configuration, link your application with the
+resulting libraries, and you end up with an executable that you can
+run directly on your Linux machine or via gdb. A useful side effect of
+this is that application development can start before any real
+embedded hardware is actually available.
+ </P
+><P
+>Typically the memory map for a synthetic target application will be
+set up such that there is a read-only ROM region containing all the
+code and constant data, and a read-write RAM region for the data. The
+default locations and sizes of these regions depend on the specific
+platform being used for development. Note that the application always
+executes out of ROM: on a real embedded target much of the development
+would involve running RedBoot firmware there, with application code
+and data loaded into RAM; usually this would change for the final
+system; the firmware would be replaced by the eCos application itself,
+configured for ROM bootstrap, and it would perform the appropriate
+hardware initialization. Therefore the synthetic target actually
+emulates the behaviour of a final system, not of a development
+environment. In practice this is rarely significant, although having
+the code in read-only memory can help catch some problems in
+application code.
+ </P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+SUMMARY="Footer navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="synth.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="hal-synth-arch.html"
+ACCESSKEY="H"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="synth-running.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Overview</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Running a Synthetic Target Application</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/synth-io-overview.fig b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-io-overview.fig
new file mode 100644
index 0000000000..59ec99fc63
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-io-overview.fig
@@ -0,0 +1,57 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 300 300 3300 300 3300 1800 300 1800 300 300
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+ 2700 300 2700 1800
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+ 1800 300 1800 1800
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+ 1800 750 2700 750
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+ 1800 1350 2700 1350
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+ 5400 300 5400 1800
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+ 5400 750 6900 750
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+ 5400 1350 6900 1350
+2 2 0 1 0 7 50 0 -1 4.000 0 0 7 0 0 5
+ 4200 300 6900 300 6900 1800 4200 1800 4200 300
+2 1 0 2 0 7 50 0 -1 6.000 0 0 7 1 1 2
+ 1 1 2.00 120.00 240.00
+ 1 1 2.00 120.00 240.00
+ 3300 1050 4200 1050
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 1 2
+ 1 1 1.00 60.00 120.00
+ 1 1 1.00 60.00 120.00
+ 6900 600 7500 600
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 1 2
+ 1 1 1.00 60.00 120.00
+ 1 1 1.00 60.00 120.00
+ 6900 1125 7500 1125
+2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 1 2
+ 1 1 1.00 60.00 120.00
+ 1 1 1.00 60.00 120.00
+ 6900 1650 7500 1650
+4 0 0 50 0 0 12 0.0000 4 135 375 2850 1200 HAL\001
+4 0 0 50 0 0 12 0.0000 4 135 585 1950 1650 console\001
+4 0 0 50 0 0 12 0.0000 4 135 690 1875 1200 /dev/ser0\001
+4 0 0 50 0 0 12 0.0000 4 135 330 2100 600 eth0\001
+4 0 0 50 0 0 12 0.0000 4 135 390 750 825 eCos\001
+4 0 0 50 0 0 12 0.0000 4 180 825 600 1200 application\001
+4 0 0 50 0 0 12 0.0000 4 180 975 4350 1200 I/O Auxiliary\001
+4 0 0 50 0 0 12 0.0000 4 180 690 4500 825 ecosynth\001
+4 0 0 50 0 0 12 0.0000 4 135 870 5775 675 ethernet.tcl\001
+4 0 0 50 0 0 12 0.0000 4 135 660 5775 1200 serial.tcl\001
+4 0 0 50 0 0 12 0.0000 4 135 825 5775 1725 console.tcl\001
+4 0 0 50 0 0 12 0.0000 4 180 795 7575 675 Linux tap3\001
+4 0 0 50 0 0 12 0.0000 4 180 765 7575 1200 /dev/ttyS1\001
+4 0 0 50 0 0 12 0.0000 4 135 135 7575 1725 X\001
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/synth-io-overview.png b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-io-overview.png
new file mode 100644
index 0000000000..342a1a784e
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-io-overview.png
Binary files differ
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/synth-new-host.html b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-new-host.html
new file mode 100644
index 0000000000..c31be134b8
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-new-host.html
@@ -0,0 +1,1734 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Writing New Devices - host</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
+"><LINK
+REL="HOME"
+TITLE="eCos Synthetic Target"
+HREF="hal-synth-arch.html"><LINK
+REL="PREVIOUS"
+TITLE="Writing New Devices - target"
+HREF="synth-new-target.html"><LINK
+REL="NEXT"
+TITLE="Porting"
+HREF="synth-porting.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+SUMMARY="Header navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos Synthetic Target</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="synth-new-target.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="synth-porting.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="SYNTH-NEW-HOST">Writing New Devices - host</H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN726"
+></A
+><H2
+>Name</H2
+>Writing New Devices&nbsp;--&nbsp;extending the synthetic target, host-side</DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-NEW-HOST-DESCRIPTION"
+></A
+><H2
+>Description</H2
+><P
+>On the host-side adding a new device means writing a Tcl/Tk script
+that will handle instantiation and subsequent requests from the
+target-side. These scripts all run in the same full interpreter,
+extended with various commands provided by the main I/O auxiliary
+code, and running in an overall GUI framework. Some knowledge of
+programming with Tcl/Tk is required to implement host-side device
+support.
+ </P
+><P
+>Some devices can be implemented entirely using a Tcl/Tk script. For
+example, if the final system will have some buttons then those can be
+emulated in the synthetic target using a few Tk widgets. A simple
+emulation could just have the right number of buttons in a row. A more
+advanced emulation could organize the buttons with the right layout,
+perhaps even matching the colour scheme, the shapes, and the relative
+sizes. With other devices it may be necessary for the Tcl script to
+interact with an external program, because the required functionality
+cannot easily be accessed from a Tcl script. For example interacting
+with a raw ethernet device involves some <TT
+CLASS="FUNCTION"
+>ioctl</TT
+>
+calls, which is easier to do in a C program. Therefore the
+<TT
+CLASS="FILENAME"
+>ethernet.tcl</TT
+> script which implements the
+host-side ethernet support spawns a separate program
+<TT
+CLASS="FILENAME"
+>rawether</TT
+>, written in C, that performs the
+low-level I/O. Raw ethernet access usually also requires root
+privileges, and running a small program <TT
+CLASS="FILENAME"
+>rawether</TT
+>
+with such privileges is somewhat less of a security risk than the
+whole eCos application, the I/O auxiliary, and various dynamically
+loaded Tcl scripts.
+ </P
+><P
+>Because all scripts run in a single interpreter, some care has
+to be taken to avoid accidental sharing of global variables. The best
+way to avoid problems is to have each script create its own Tcl
+namespace, so for example the <TT
+CLASS="FILENAME"
+>ethernet.tcl</TT
+> script
+creates a namespace <TT
+CLASS="VARNAME"
+>ethernet::</TT
+> and all variables
+and procedures reside in this namespace. Similarly the I/O auxiliary
+itself makes use of a <TT
+CLASS="VARNAME"
+>synth::</TT
+> namespace.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-NEW-HOST-BUILD"
+></A
+><H2
+>Building and Installation</H2
+><P
+>When an eCos device driver or application code instantiates a device,
+the I/O auxiliary will attempt to load a matching Tcl script. The
+third argument to <TT
+CLASS="FUNCTION"
+>synth_auxiliary_instantiate</TT
+>
+specifies the type of device, for example <TT
+CLASS="LITERAL"
+>ethernet</TT
+>,
+and the I/O auxiliary will append a <TT
+CLASS="FILENAME"
+>.tcl</TT
+> suffix
+and look for a script <TT
+CLASS="FILENAME"
+>ethernet.tcl</TT
+>.
+ </P
+><P
+>If the device being instantiated is application-specific rather than
+part of an eCos package, the I/O auxiliary will look first in the
+current directory, then in <TT
+CLASS="FILENAME"
+>~/.ecos/synth</TT
+>. If it is part of an eCos
+package then the auxiliary will expect to find the Tcl script and any
+support files below <TT
+CLASS="FILENAME"
+>libexec/ecos</TT
+> in the install tree - note
+that the same install tree must be used for the I/O auxiliary itself
+and for any device driver support. The directory hierarchy below
+<TT
+CLASS="FILENAME"
+>libexec/ecos</TT
+> matches the
+structure of the eCos repository, allowing multiple versions of a
+package to be installed to allow for incompatible protocol changes.
+ </P
+><P
+>The preferred way to build host-side software is to use
+<B
+CLASS="COMMAND"
+>autoconf</B
+> and <B
+CLASS="COMMAND"
+>automake</B
+>. Usually
+this involves little more than copying the
+<TT
+CLASS="FILENAME"
+>acinclude.m4</TT
+>, <TT
+CLASS="FILENAME"
+>configure.in</TT
+>
+and <TT
+CLASS="FILENAME"
+>Makefile.am</TT
+> files from an existing package,
+for example the synthetic target ethernet driver, and then making
+minor edits. In <TT
+CLASS="FILENAME"
+>acinclude.m4</TT
+> it may be necessary
+to adjust the path to the root of the repository.
+<TT
+CLASS="FILENAME"
+>configure.in</TT
+> may require a similar change, and
+the <TT
+CLASS="FUNCTION"
+>AC_INIT</TT
+> macro invocation will have to be
+changed to match one of the files in the new package. A critical macro
+in this file is <TT
+CLASS="FILENAME"
+>ECOS_PACKAGE_DIRS</TT
+> which will set
+up the correct install directory. <TT
+CLASS="FILENAME"
+>Makefile.am</TT
+> may
+require some more changes, for example to specify the data files that
+should be installed (including the Tcl script). These files should
+then be processed using <B
+CLASS="COMMAND"
+>aclocal</B
+>,
+<B
+CLASS="COMMAND"
+>autoconf</B
+> and <B
+CLASS="COMMAND"
+>automake</B
+> in that
+order. Actually building the software then just involves
+<B
+CLASS="COMMAND"
+>configure</B
+>, <B
+CLASS="COMMAND"
+>make</B
+> and
+<B
+CLASS="COMMAND"
+>make install</B
+>, as per the instructions in the
+toplevel <TT
+CLASS="FILENAME"
+>README.host</TT
+> file.
+ </P
+><P
+>To assist developers, if the environment variable
+<TT
+CLASS="ENVAR"
+>ECOSYNTH_DEVEL</TT
+> is set then a slightly different
+algorithm is used for locating device Tcl scripts. Instead of looking
+only in the install tree the I/O auxiliary will also look in the
+source tree, and if the script there is more recent than the installed
+version it will be used in preference. This allows developers to
+modify the master copy without having to run <B
+CLASS="COMMAND"
+>make
+install</B
+> all the time.
+ </P
+><P
+>If a script needs to know where it has been installed it can examine
+the Tcl variable <TT
+CLASS="VARNAME"
+>synth::device_install_dir</TT
+> . This
+variable gets updated whenever a script is loaded, so if the
+value may be needed later it should be saved away in a device-specific
+variable.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-NEW-HOST-INSTANTIATION"
+></A
+><H2
+>Instantiation</H2
+><P
+>The I/O auxiliary will <B
+CLASS="COMMAND"
+>source</B
+> the device-specific
+Tcl script when the eCos application first attempts to instantiate a
+device of that type. The script should return a procedure that will be
+invoked to instantiate a device.
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>namespace eval ethernet {
+ &#8230;
+ proc instantiate { id instance data } {
+ &#8230;
+ return ethernet::handle_request
+ }
+}
+return ethernet::instantiate</PRE
+></TD
+></TR
+></TABLE
+><P
+>The <TT
+CLASS="VARNAME"
+>id</TT
+> argument is a unique identifier for this
+device instance. It will also be supplied on subsequent calls to the
+request handler, and will match the return value of
+<TT
+CLASS="FUNCTION"
+>synth_auxiliary_instantiate</TT
+> on the target side. A
+common use for this value is as an array index to support multiple
+instances of this types of device. The <TT
+CLASS="VARNAME"
+>instance</TT
+> and
+<TT
+CLASS="VARNAME"
+>data</TT
+> arguments match the corresponding arguments to
+<TT
+CLASS="FUNCTION"
+>synth_auxiliary_instantiate</TT
+> on the target side, so
+a typical value for <TT
+CLASS="VARNAME"
+>instance</TT
+> would be
+<TT
+CLASS="LITERAL"
+>eth0</TT
+>, and <TT
+CLASS="VARNAME"
+>data</TT
+> is used to pass
+arbitrary initialization parameters from target to host.
+ </P
+><P
+>The actual work done by the instantiation procedure is obviously
+device-specific. It may involve allocating an <A
+HREF="synth-new-host.html#SYNTH-NEW-HOST-INTERRUPTS"
+>interrupt vector</A
+>, adding a
+device-specific subwindow to the display, opening a real Linux device,
+establishing a socket connection to some server, spawning a separate
+process to handle the actual I/O, or a combination of some or all of
+the above.
+ </P
+><P
+>If the device is successfully instantiated then the return value
+should be a handler for subsequent I/O requests. Otherwise the return
+value should be an empty string, and on the target-side the
+<TT
+CLASS="FUNCTION"
+>synth_auxiliary_instantiate</TT
+> call will return
+<TT
+CLASS="LITERAL"
+>-1</TT
+>. The script is responsible for providing
+<A
+HREF="synth-new-host.html#SYNTH-NEW-HOST-OUTPUT"
+>diagnostics</A
+> explaining
+why the device could not be instantiated.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-NEW-HOST-REQUESTS"
+></A
+><H2
+>Handling Requests</H2
+><P
+>When the target-side calls
+<TT
+CLASS="FUNCTION"
+>synth_auxiliary_xchgmsg</TT
+>, the I/O auxiliary will
+end up calling the request handler for the appropriate device instance
+returned during instantiation:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>namespace eval ethernet {
+ &#8230;
+ proc handle_request { id request arg1 arg2 txdata txlen max_rxlen } {
+ &#8230;
+ if { &lt;some condition&gt; } {
+ synth::send_reply &lt;error code&gt; 0 ""
+ return
+ }
+ &#8230;
+ synth::send_reply &lt;reply code&gt; $packet_len $packet
+ }
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>The <TT
+CLASS="VARNAME"
+>id</TT
+> argument is the same device id that was
+passed to the instantiate function, and is typically used as an array
+index to access per-device data. The <TT
+CLASS="VARNAME"
+>request</TT
+>,
+<TT
+CLASS="VARNAME"
+>arg1</TT
+>, <TT
+CLASS="VARNAME"
+>arg2</TT
+>, and
+<TT
+CLASS="VARNAME"
+>max_rxlen</TT
+> are the same values that were passed to
+<TT
+CLASS="FUNCTION"
+>synth_auxiliary_xchgmsg</TT
+> on the target-side,
+although since this is a Tcl script obviously the numbers have been
+converted to strings. The <TT
+CLASS="VARNAME"
+>txdata</TT
+> buffer is raw data
+as transmitted by the target, or an empty string if the I/O operation
+does not involve any additional data. The Tcl procedures
+<B
+CLASS="COMMAND"
+>binary scan</B
+>, <B
+CLASS="COMMAND"
+>string index</B
+> and
+<B
+CLASS="COMMAND"
+>string range</B
+> may be found especially useful when
+manipulating this buffer. <TT
+CLASS="VARNAME"
+>txlen</TT
+> is provided for
+convenience, although <B
+CLASS="COMMAND"
+>string length $txdata</B
+> would
+give the same information.
+ </P
+><P
+>The code for actually processing the request is of course device
+specific. If the target does not expect a reply then the request
+handler should just return when finished. If a reply is expected then
+there should be a call to <B
+CLASS="COMMAND"
+>synth::send_reply</B
+>. The
+first argument is the reply code, and will be turned into a 32-bit
+integer on the target side. The second argument specifies the length
+of the reply data, and the third argument is the reply data itself.
+For some devices the Tcl procedure <B
+CLASS="COMMAND"
+>binary format</B
+>
+may prove useful. If the reply involves just a code and no additional
+data, the second and third arguments should be <TT
+CLASS="LITERAL"
+>0</TT
+>
+and an empty string respectively.
+ </P
+><P
+>Attempts to send a reply when none is expected, fail to send a reply
+when one is expected, or send a reply that is larger than the
+target-side expects, will all be detected by the I/O auxiliary and
+result in run-time error messages.
+ </P
+><P
+>It is not possible for the host-side code to send unsolicited messages
+to the target. If host-side code needs attention from the target, for
+example because some I/O operation has completed, then an interrupt
+should be raised.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-NEW-HOST-INTERRUPTS"
+></A
+><H2
+>Interrupts</H2
+><P
+>The I/O auxiliary provides a number of procedures for interrupt
+handling.
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth::interrupt_allocate &lt;name&gt;
+synth::interrupt_get_max
+synth::interrupt_get_devicename &lt;vector&gt;
+synth::interrupt_raise &lt;vector&gt;</PRE
+></TD
+></TR
+></TABLE
+><P
+><B
+CLASS="COMMAND"
+>synth::interrupt_allocate</B
+> is normally called during
+device instantiation, and returns the next free interrupt vector. This
+can be passed on to the target-side device driver in response to a
+suitable request, and it can then install an interrupt handler on that
+vector. Interrupt vector <TT
+CLASS="LITERAL"
+>0</TT
+> is used within the
+target-side code for the real-time clock, so the allocated vectors
+will start at <TT
+CLASS="LITERAL"
+>1</TT
+>. The argument identifies the
+device, for example <TT
+CLASS="LITERAL"
+>eth0</TT
+>. This is not actually used
+internally, but can be accessed by user-initialization scripts that
+provide some sort of interrupt monitoring facility (typically via the
+<TT
+CLASS="LITERAL"
+>interrupt</TT
+> <A
+HREF="synth-new-host.html#SYNTH-NEW-HOST-HOOKS"
+>hook</A
+>). It is possible for a
+single device to allocate multiple interrupt vectors, but the
+synthetic target supports a maximum of 32 such vectors.
+ </P
+><P
+><B
+CLASS="COMMAND"
+>synth::interrupt_get_max</B
+> returns the highest
+interrupt vector that has been allocated, or <TT
+CLASS="LITERAL"
+>0</TT
+> if
+there have been no calls to
+<B
+CLASS="COMMAND"
+>synth::interrupt_allocate</B
+>.
+<B
+CLASS="COMMAND"
+>synth::interrupt_get_devicename</B
+> returns the string
+that was passed to <B
+CLASS="COMMAND"
+>synth::interrupt_allocate</B
+> when
+the vector was allocated.
+ </P
+><P
+><B
+CLASS="COMMAND"
+>synth::interrupt_raise</B
+> can be called any time after
+initialization. The argument should be the vector returned by
+<B
+CLASS="COMMAND"
+>synth::interrupt_allocate</B
+> for this device. It will
+activate the normal eCos interrupt handling mechanism so, subject to
+interrupts being enabled and this particular interrupt not being
+masked out, the appropriate ISR will run.
+ </P
+><DIV
+CLASS="NOTE"
+><BLOCKQUOTE
+CLASS="NOTE"
+><P
+><B
+>Note: </B
+>At this time it is not possible for a device to allocate a specific
+interrupt vector. The order in which interrupt vectors are assigned to
+devices effectively depends on the order in which the eCos devices get
+initialized, and that may change if the eCos application is rebuilt. A
+future extension may allow devices to allocate specific vectors, thus
+making things more deterministic. However that will introduce new
+problems, in particular the code will have to start worrying about
+requests for vectors that have already been allocated.
+ </P
+></BLOCKQUOTE
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-NEW-HOST-ARGS"
+></A
+><H2
+>Flags and Command Line Arguments</H2
+><P
+>The generic I/O auxiliary code will process the standard command line
+arguments, and will set various flag variables accordingly. Some of
+these should be checked by device-specific scripts.
+ </P
+><P
+></P
+><DIV
+CLASS="VARIABLELIST"
+><DL
+><DT
+><TT
+CLASS="VARNAME"
+>synth::flag_gui</TT
+></DT
+><DD
+><P
+>This is set when the I/O auxiliary is operating in graphical mode
+rather than text mode. Some functionality such as filters and the GUI
+layout are only available in graphical mode.
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> if { $synth::flag_gui } {
+ &#8230;
+ }</PRE
+></TD
+></TR
+></TABLE
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>synth::flag_verbose</TT
+></DT
+><DD
+><P
+>The user has requested additional information during startup. Each
+device driver can decide how much additional information, if any,
+should be produced.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>synth::flag_keep_going</TT
+></DT
+><DD
+><P
+>The user has specified <TT
+CLASS="OPTION"
+>-k</TT
+> or
+<TT
+CLASS="OPTION"
+>--keep-going</TT
+>, so even if an error occurs the I/O
+auxiliary and the various device driver scripts should continue running
+if at all possible. Diagnostics should still be generated.
+ </P
+></DD
+></DL
+></DIV
+><P
+>Some scripts may want to support additional command line arguments.
+This facility should be used with care since there is no way to
+prevent two different scripts from trying to use the same argument.
+The following Tcl procedures are available:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth::argv_defined &lt;name&gt;
+synth::argv_get_value &lt;name&gt;</PRE
+></TD
+></TR
+></TABLE
+><P
+><B
+CLASS="COMMAND"
+>synth::argv_defined</B
+> returns a boolean to indicate
+whether or not a particular argument is present. If the argument is
+the name part of a name/value pair, an <TT
+CLASS="LITERAL"
+>=</TT
+> character
+should be appended. Typical uses might be:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> if { [synth::argv_defined "-o13"] } {
+ &#8230;
+ }
+
+ if { [synth::argv_defined "-mark="] } {
+ &#8230;
+ }</PRE
+></TD
+></TR
+></TABLE
+><P
+>The first call checks for a flag <TT
+CLASS="LITERAL"
+>-o13</TT
+> or
+<TT
+CLASS="LITERAL"
+>--o13</TT
+> - the code treats options with single and
+double hyphens interchangeably. The second call checks for an argument
+of the form <TT
+CLASS="LITERAL"
+>-mark=&lt;value&gt;</TT
+> or a pair of
+arguments <TT
+CLASS="LITERAL"
+>-mark &lt;value&gt;</TT
+>. The value part of a
+name/value pair can be obtained using
+<B
+CLASS="COMMAND"
+>synth::argv_get_value</B
+>;
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> variable speed 1
+ if { [synth::argv_defined "-mark="] } {
+ set mark [synth::argv_get_value "-mark="]
+ if { ![string is integer $mark] || ($mark &#60; 1) || ($mark &#62; 9) } {
+ &lt;issue diagnostic&gt;
+ } else {
+ set speed $mark
+ }
+ }</PRE
+></TD
+></TR
+></TABLE
+><P
+><B
+CLASS="COMMAND"
+>synth::argv_get_value</B
+> should only be used after a
+successful call to <B
+CLASS="COMMAND"
+>synth::argv_defined</B
+>.
+At present there is no support for some advanced forms of command line
+argument processing. For example it is not possible to repeat a
+certain option such as <TT
+CLASS="OPTION"
+>-v</TT
+> or
+<TT
+CLASS="OPTION"
+>--verbose</TT
+>, with each occurrence increasing the level
+of verbosity.
+ </P
+><P
+>If a script is going to have its own set of command-line arguments
+then it should give appropriate details if the user specifies
+<TT
+CLASS="OPTION"
+>--help</TT
+>. This involves a hook function:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>namespace eval my_device {
+ proc help_hook { } {
+ puts " -o13 : activate the omega 13 device"
+ puts " -mark &lt;speed&gt; : set speed. Valid values are 1 to 9."
+ }
+
+ synth::hook_add "help" my_device::help_hook
+}</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-NEW-HOST-TDF"
+></A
+><H2
+>The Target Definition File</H2
+><P
+>Most device scripts will want to check entries in the target
+definition file for run-time configuration information. The Tcl
+procedures for this are as follows:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth::tdf_has_device &lt;name&gt;
+synth::tdf_get_devices
+synth::tdf_has_option &lt;devname&gt; &lt;option&gt;
+synth::tdf_get_option &lt;devname&gt; &lt;option&gt;
+synth::tdf_get_options &lt;devname&gt; &lt;option&gt;
+synth::tdf_get_all_options &lt;devname&gt;</PRE
+></TD
+></TR
+></TABLE
+><P
+><B
+CLASS="COMMAND"
+>synth::tdf_has_device</B
+> can be used to check whether
+or not the target definition file had an entry
+<TT
+CLASS="LITERAL"
+>synth_device&nbsp;&lt;name&gt;</TT
+>. Usually the name
+will match the type of device, so the
+<TT
+CLASS="FILENAME"
+>console.tcl</TT
+> script will look for a target
+definition file entry <TT
+CLASS="LITERAL"
+>console</TT
+>.
+<B
+CLASS="COMMAND"
+>synth::tdf_get_devices</B
+> returns a list of all
+device entries in the target definition file.
+ </P
+><P
+>Once it is known that the target definition file has an entry for a
+certain device, it is possible to check for options within the entry.
+<B
+CLASS="COMMAND"
+>synth::tdf_has_option</B
+> just checks for the presence,
+returning a boolean:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> if { [synth::tdf_has_option "console" "appearance"] } {
+ &#8230;
+ }</PRE
+></TD
+></TR
+></TABLE
+><P
+><B
+CLASS="COMMAND"
+>synth::tdf_get_option</B
+> returns a list of all the
+arguments for a given option. For example, if the target definition
+file contains an entry:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device console {
+ appearance -foreground white -background black
+ filter trace {^TRACE:.*} -foreground HotPink1 -hide 1
+ filter xyzzy {.*xyzzy.*} -foreground PapayaWhip
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>A call
+<B
+CLASS="COMMAND"
+>synth::tdf_get_option&nbsp;console&nbsp;appearance</B
+>
+will return the list <TT
+CLASS="LITERAL"
+>{-foreground white -background
+black}</TT
+>. This list can be manipulated using standard Tcl routines
+such as <B
+CLASS="COMMAND"
+>llength</B
+> and <B
+CLASS="COMMAND"
+>lindex</B
+>. Some
+options can occur multiple times in one entry, for example
+<TT
+CLASS="OPTION"
+>filter</TT
+> in the <TT
+CLASS="LITERAL"
+>console</TT
+> entry.
+<B
+CLASS="COMMAND"
+>synth::tdf_get_options</B
+> returns a list of lists,
+with one entry for each option occurrence.
+<B
+CLASS="COMMAND"
+>synth::tdf_get_all_options</B
+> returns a list of lists
+of all options. This time each entry will include the option name as
+well.
+ </P
+><P
+>The I/O auxiliary will not issue warnings about entries in the target
+definition file for devices which were not loaded, unless the
+<TT
+CLASS="OPTION"
+>-v</TT
+> or <TT
+CLASS="OPTION"
+>--verbose</TT
+> command line
+argument was used. This makes it easier to use a single target
+definition file for different applications. However the auxiliary will
+issue warnings about options within an entry that were ignored,
+because often these indicate a typing mistake of some sort. Hence a
+script should always call <B
+CLASS="COMMAND"
+>synth::tdf_has_option</B
+>,
+<B
+CLASS="COMMAND"
+>synth:;tdf_get_option</B
+> or
+<B
+CLASS="COMMAND"
+>synth::tdf_get_options</B
+> for all valid options, even
+if some of the options preclude the use of others.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-NEW-HOST-HOOKS"
+></A
+><H2
+>Hooks</H2
+><P
+>Some scripts may want to take action when particular events occur, for
+example when the eCos application has exited and there is no need for
+further I/O. This is supported using hooks:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>namespace eval my_device {
+ &#8230;
+ proc handle_ecos_exit { arg_list } {
+ &#8230;
+ }
+ synth::hook_add "ecos_exit" my_device::handle_ecos_exit
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>It is possible for device scripts to add their own hooks and call all
+functions registered for those hooks. A typical use for this is by
+user initialization scripts that want to monitor some types of I/O.
+The available Tcl procedures for manipulating hooks are:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth::hook_define &lt;name&gt;
+synth::hook_defined &lt;name&gt;
+synth::hook_add &lt;name&gt; &lt;function&gt;
+synth::hook_call &lt;name&gt; &lt;args&gt;</PRE
+></TD
+></TR
+></TABLE
+><P
+><B
+CLASS="COMMAND"
+>synth::hook_define</B
+> creates a new hook with the
+specified name. This hook must not already exist.
+<B
+CLASS="COMMAND"
+>synth::hook_defined</B
+> can be used to check for the
+existence of a hook. <B
+CLASS="COMMAND"
+>synth::hook_add</B
+> allows other
+scripts to register a callback function for this hook, and
+<B
+CLASS="COMMAND"
+>synth::hook_call</B
+> allows the owner script to invoke
+all such callback functions. A hook must already be defined before a
+callback can be attached. Therefore typically device scripts will only
+use standard hooks and their own hooks, not hooks created by some
+other device, because the order of device initialization is not
+sufficiently defined. User scripts run from
+<TT
+CLASS="FILENAME"
+>mainrc.tcl</TT
+> can use any hooks that have been
+defined.
+ </P
+><P
+><B
+CLASS="COMMAND"
+>synth::hook_call</B
+> takes an arbitrary list of
+arguments, for example:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> synth::hook_call "ethernet_rx" "eth0" $packet</PRE
+></TD
+></TR
+></TABLE
+><P
+>The callback function will always be invoked with a single argument,
+a list of the arguments that were passed to
+<B
+CLASS="COMMAND"
+>synth::hook_call</B
+>:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> proc rx_callback { arg_list } {
+ set device [lindex $arg_list 0]
+ set packet [lindex $arg_list 1]
+ }</PRE
+></TD
+></TR
+></TABLE
+><P
+>Although it might seem more appropriate to use Tcl's
+<B
+CLASS="COMMAND"
+>eval</B
+> procedure and have the callback functions
+invoked with the right number of arguments rather than a single list,
+that would cause serious problems if any of the data contained special
+characters such as <TT
+CLASS="LITERAL"
+>[</TT
+> or <TT
+CLASS="LITERAL"
+>$</TT
+>. The
+current implementation of hooks avoids such problems, at the cost of
+minor inconvenience when writing callbacks.
+ </P
+><P
+>A number of hooks are defined as standard. Some devices will add
+additional hooks, and the device-specific documentation should be
+consulted for those. User scripts can add their own hooks if desired.
+ </P
+><P
+></P
+><DIV
+CLASS="VARIABLELIST"
+><DL
+><DT
+><TT
+CLASS="LITERAL"
+>exit</TT
+></DT
+><DD
+><P
+>This hook is called just before the I/O auxiliary exits. Hence it
+provides much the same functionality as <TT
+CLASS="FUNCTION"
+>atexit</TT
+> in
+C programs. The argument list passed to the callback function will be
+empty.
+ </P
+></DD
+><DT
+><TT
+CLASS="LITERAL"
+>ecos_exit</TT
+></DT
+><DD
+><P
+>This hook is called when the eCos application has exited. It is used
+mainly to shut down I/O operations: if the application is no longer
+running then there is no point in raising interrupts or storing
+incoming packets. The callback argument list will be empty.
+ </P
+></DD
+><DT
+><TT
+CLASS="LITERAL"
+>ecos_initialized</TT
+></DT
+><DD
+><P
+>The synthetic target HAL will send a request to the I/O auxiliary once
+the static constructors have been run. All devices should now have been
+instantiated. A script could now check how many instances there are of
+a given type of device, for example ethernet devices, and create a
+little monitor window showing traffic on all the devices. The
+<TT
+CLASS="LITERAL"
+>ecos_initialized</TT
+> callbacks will be run just before
+the user's <TT
+CLASS="FILENAME"
+>mainrc.tcl</TT
+> script. The callback
+argument list will be empty.
+ </P
+></DD
+><DT
+><TT
+CLASS="LITERAL"
+>help</TT
+></DT
+><DD
+><P
+>This hook is also invoked once static constructors have been run, but
+only if the user specified <TT
+CLASS="OPTION"
+>-h</TT
+> or
+<TT
+CLASS="OPTION"
+>--help</TT
+>. Any scripts that add their own command line
+arguments should add a callback to this hook which outputs details of
+the additional arguments. The callback argument list will be empty.
+ </P
+></DD
+><DT
+><TT
+CLASS="LITERAL"
+>interrupt</TT
+></DT
+><DD
+><P
+>Whenever a device calls <B
+CLASS="COMMAND"
+>synth::interrupt_raise</B
+> the
+<TT
+CLASS="LITERAL"
+>interrupt</TT
+> hook will be called with a single
+argument, the interrupt vector. The main use for this is to allow
+user scripts to monitor interrupt traffic.
+ </P
+></DD
+></DL
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-NEW-HOST-OUTPUT"
+></A
+><H2
+>Output and Filters</H2
+><P
+>Scripts can use conventional facilities for sending text output to the
+user, for example calling <B
+CLASS="COMMAND"
+>puts</B
+> or directly
+manipulating the central text widget
+<TT
+CLASS="VARNAME"
+>.main.centre.text</TT
+>. However in nearly all cases it
+is better to use output facilities provided by the I/O auxiliary
+itself:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth::report &lt;msg&gt;
+synth::report_warning &lt;msg&gt;
+synth::report_error &lt;msg&gt;
+synth::internal_error &lt;msg&gt;
+synth::output &lt;msg&gt; &lt;filter&gt;</PRE
+></TD
+></TR
+></TABLE
+><P
+><B
+CLASS="COMMAND"
+>synth::report</B
+> is intended for messages related to
+the operation of the I/O auxiliary itself, especially additional
+output resulting from <TT
+CLASS="OPTION"
+>-v</TT
+> or
+<TT
+CLASS="OPTION"
+>--verbose</TT
+>. If running in text mode the output will go
+to standard output. If running in graphical mode the output will go to
+the central text window. In both modes, use of <TT
+CLASS="OPTION"
+>-l</TT
+> or
+<TT
+CLASS="OPTION"
+>--logfile</TT
+> will modify the behaviour.
+ </P
+><P
+><B
+CLASS="COMMAND"
+>synth::report_warning</B
+>,
+<B
+CLASS="COMMAND"
+>synth::report_error</B
+> and
+<B
+CLASS="COMMAND"
+>synth::internal_error</B
+> have the obvious meaning,
+including prepending strings such as <TT
+CLASS="LITERAL"
+>Warning:</TT
+> and
+<TT
+CLASS="LITERAL"
+>Error:</TT
+>. When the eCos application informs the I/O
+auxiliary that all static constructors have run, if at that point
+there have been any calls to <B
+CLASS="COMMAND"
+>synth::error</B
+> then the
+I/O auxiliary will exit. This can be suppressed with command line
+arguments <TT
+CLASS="OPTION"
+>-k</TT
+> or <TT
+CLASS="OPTION"
+>--keep-going</TT
+>.
+<B
+CLASS="COMMAND"
+>synth::internal_error</B
+> will output some information
+about the current state of the I/O auxiliary and then exit
+immediately. Of course it should never be necessary to call this
+function.
+ </P
+><P
+><B
+CLASS="COMMAND"
+>synth::output</B
+> is the main routine for outputting
+text. The second argument identifies a filter. If running in text mode
+the filter is ignored, but if running in graphical mode the filter can
+be used to control the appearance of this output. A typical use would
+be:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> synth::output $line "console"</PRE
+></TD
+></TR
+></TABLE
+><P
+>This outputs a single line of text using the
+<TT
+CLASS="LITERAL"
+>console</TT
+> filter. If running in graphical mode the
+default appearance of this text can be modified with the
+<TT
+CLASS="OPTION"
+>appearance</TT
+> option in the
+<B
+CLASS="COMMAND"
+>synth_device&nbsp;console</B
+> entry of the target
+definition file. The <SPAN
+CLASS="GUIMENUITEM"
+>System filters</SPAN
+> menu
+option can be used to change the appearance at run-time.
+ </P
+><P
+>Filters should be created before they are used. The procedures
+available for this are:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth::filter_exists &lt;name&gt;
+synth::filter_get_list
+synth::filter_add &lt;name&gt; [options]
+synth::filter_parse_options &lt;options&gt; &lt;parsed_options&gt; &lt;message&gt;
+synth::filter_add_parsed &lt;name&gt; &lt;parsed_options&gt;</PRE
+></TD
+></TR
+></TABLE
+><P
+><B
+CLASS="COMMAND"
+>synth::filter_exists</B
+> can be used to check whether
+or not a particular filter already exists: creating two filters with
+the same name is not allowed.
+<B
+CLASS="COMMAND"
+>synth::filter_get_list</B
+> returns a list of the
+current known filters. <B
+CLASS="COMMAND"
+>synth::filter_add</B
+> can be
+used to create a new filter. The first argument names the new filter,
+and the remaining arguments control the initial appearance. A typical
+use might be:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> synth::filter_add "my_device_tx" -foreground yellow -hide 1</PRE
+></TD
+></TR
+></TABLE
+><P
+>It is assumed that the supplied arguments are valid, which typically
+means that they are hard-wired in the script. If instead the data
+comes out of a configuration file and hence may be invalid, the
+I/O auxiliary provides a parsing utility. Typical usage would be:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> array set parsed_options [list]
+ set message ""
+ if { ![synth::filter_parse_options $console_appearance parsed_options message] } {
+ synth::report_error \
+ "Invalid entry in target definition file $synth::target_definition\
+ \n synth_device \"console\", entry \"appearance\"\n$message"
+ } else {
+ synth::filter_add_parsed "console" parsed_options
+ }</PRE
+></TD
+></TR
+></TABLE
+><P
+>On success <TT
+CLASS="VARNAME"
+>parsed_options</TT
+> will be updated with an
+internal representation of the desired appearance, which can then be
+used in a call to <B
+CLASS="COMMAND"
+>synth::filter_add_parsed</B
+>. On
+failure <TT
+CLASS="VARNAME"
+>message</TT
+> will be updated with details of the
+parsing error that occurred.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-NEW-HOST-GUI"
+></A
+><H2
+>The Graphical Interface</H2
+><P
+>When the I/O auxiliary is running in graphical mode, many scripts will
+want to update the user interface in some way. This may be as simple
+as adding another entry to the help menu for the device, or adding a
+new button to the toolbar. It may also involve adding new subwindows,
+or even creating entire new toplevel windows. These may be simple
+monitor windows, displaying additional information about what is going
+on in the system in a graphical format. Alternatively they may emulate
+actual I/O operations, for example button widgets could be used to
+emulate real physical buttons.
+ </P
+><P
+>The I/O auxiliary does not provide many procedures related to the
+graphical interface. Instead it is expected that scripts will just
+update the widget hierarchy directly.
+ </P
+><DIV
+CLASS="INFORMALFIGURE"
+><A
+NAME="AEN1018"><P
+></P
+><DIV
+CLASS="MEDIAOBJECT"
+><P
+><IMG
+SRC="layout.gif"
+ALIGN="CENTER"></P
+></DIV
+><P
+></P
+></DIV
+><P
+>So adding a new item to the <SPAN
+CLASS="GUIMENU"
+>Help</SPAN
+> menu involves a
+<B
+CLASS="COMMAND"
+>.menubar.help&nbsp;add</B
+> operation with suitable
+arguments. Adding a new button to the toolbar involves creating a
+child window in <TT
+CLASS="VARNAME"
+>.toolbar</TT
+> and packing it
+appropriately. Scripts can create their own subwindows and then pack
+it into one of <TT
+CLASS="VARNAME"
+>.main.nw</TT
+>,
+<TT
+CLASS="VARNAME"
+>.main.n</TT
+>, <TT
+CLASS="VARNAME"
+>.main.ne</TT
+>,
+<TT
+CLASS="VARNAME"
+>.main.w</TT
+>, <TT
+CLASS="VARNAME"
+>.main.e</TT
+>,
+<TT
+CLASS="VARNAME"
+>.main.sw</TT
+>, <TT
+CLASS="VARNAME"
+>.main.s</TT
+> or
+<TT
+CLASS="VARNAME"
+>.main.se</TT
+>. Normally the user should be allowed to
+<A
+HREF="synth-gui.html#SYNTH-GUI-LAYOUT"
+>control</A
+> this via the target
+definition file. The central window <TT
+CLASS="VARNAME"
+>.main.centre</TT
+>
+should normally be left alone by other scripts since it gets used for
+text output.
+ </P
+><P
+>The following graphics-related utilities may be found useful:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth::load_image &lt;image name&gt; &lt;filename&gt;
+synth::register_ballon_help &lt;widget&gt; &lt;message&gt;
+synth::handle_help &lt;URL&gt;</PRE
+></TD
+></TR
+></TABLE
+><P
+><B
+CLASS="COMMAND"
+>synth::load_image</B
+> can be used to add a new image to
+the current interpreter. If the specified file has a
+<TT
+CLASS="FILENAME"
+>.xbm</TT
+> extension then the image will be a
+monochrome bitmap, otherwise it will be a colour image of some sort.
+A boolean will be returned to indicate success or failure, and
+suitable diagnostics will be generated if necessary.
+ </P
+><P
+><B
+CLASS="COMMAND"
+>synth::register_balloon_help</B
+> provides balloon help
+for a specific widget, usually a button on the toolbar.
+ </P
+><P
+><B
+CLASS="COMMAND"
+>synth::handle_help</B
+> is a utility routine that can be
+installed as the command for displaying online help, for example:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> .menubar.help add command -label "my device" -command \
+ [list synth::handle_help "file://$path"]</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+SUMMARY="Footer navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="synth-new-target.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="hal-synth-arch.html"
+ACCESSKEY="H"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="synth-porting.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Writing New Devices - target</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Porting</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/synth-new-target.html b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-new-target.html
new file mode 100644
index 0000000000..3cde39f0be
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-new-target.html
@@ -0,0 +1,823 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Writing New Devices - target</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
+"><LINK
+REL="HOME"
+TITLE="eCos Synthetic Target"
+HREF="hal-synth-arch.html"><LINK
+REL="PREVIOUS"
+TITLE="System Calls"
+HREF="synth-syscalls.html"><LINK
+REL="NEXT"
+TITLE="Writing New Devices - host"
+HREF="synth-new-host.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+SUMMARY="Header navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos Synthetic Target</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="synth-syscalls.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="synth-new-host.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="SYNTH-NEW-TARGET">Writing New Devices - target</H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN524"
+></A
+><H2
+>Name</H2
+>Writing New Devices&nbsp;--&nbsp;extending the synthetic target, target-side</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN527"><H2
+>Synopsis</H2
+><DIV
+CLASS="FUNCSYNOPSIS"
+><A
+NAME="AEN528"><P
+></P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="FUNCSYNOPSISINFO"
+>#include &lt;cyg/hal/hal_io.h
+ </PRE
+></TD
+></TR
+></TABLE
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>int synth_auxiliary_instantiate</CODE
+>(const char* package, const char* version, const char* device, const char* instance, const char* data);</CODE
+></P
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>void synth_auxiliary_xchgmsg</CODE
+>(int device_id, int request, int arg1, int arg2, const unsigned char* txdata, int txlen, int* reply, unsigned char* rxdata, int* rxlen, int max_rxlen);</CODE
+></P
+><P
+></P
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-NEW-TARGET-DESCRIPTION"
+></A
+><H2
+>Description</H2
+><P
+>In some ways writing a device driver for the synthetic target is very
+similar to writing one for a real target. Obviously it has to provide
+the standard interface for that class of device, so for example an
+ethernet device has to provide <TT
+CLASS="FUNCTION"
+>can_send</TT
+>,
+<TT
+CLASS="FUNCTION"
+>send</TT
+>, <TT
+CLASS="FUNCTION"
+>recv</TT
+> and similar
+functions. Many devices will involve interrupts, so the driver
+contains ISR and DSR functions and will call
+<TT
+CLASS="FUNCTION"
+>cyg_drv_interrupt_create</TT
+>,
+<TT
+CLASS="FUNCTION"
+>cyg_drv_interrupt_acknowledge</TT
+>, and related
+functions.
+ </P
+><P
+>In other ways writing a device driver for the synthetic target is very
+different. Usually the driver will not have any direct access to the
+underlying hardware. In fact for some devices the I/O may not involve
+real hardware, instead everything is emulated by widgets on the
+graphical display. Therefore the driver cannot just peek and poke
+device registers, instead it must interact with host-side code by
+exchanging message. The synthetic target HAL provides a function
+<TT
+CLASS="FUNCTION"
+>synth_auxiliary_xchgmsg</TT
+> for this purpose.
+ </P
+><P
+>Initialization of a synthetic target device driver is also very
+different. On real targets the device hardware already exists when the
+driver's initialization routine runs. On the synthetic target it is
+first necessary to instantiate the device inside the I/O auxiliary, by
+a call to <TT
+CLASS="FUNCTION"
+>synth_auxiliary_instantiate</TT
+>. That
+function performs a special message exchange with the I/O auxiliary,
+causing it to load a Tcl script for the desired type of device and run
+an instantiation procedure within that script.
+ </P
+><P
+>Use of the I/O auxiliary is optional: if the user does not specify
+<TT
+CLASS="OPTION"
+>--io</TT
+> on the command line then the auxiliary will not
+be started and hence most I/O operations will not be possible. Device
+drivers should allow for this possibility, for example by just
+discarding any data that gets written. The HAL exports a flag
+<TT
+CLASS="VARNAME"
+>synth_auxiliary_running</TT
+> which should be checked.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-NEW-TARGET-INSTANTIATE"
+></A
+><H2
+>Instantiating a Device</H2
+><P
+>Device instantiation should happen during the C++ prioritized static
+constructor phase of system initialization, before control switches to
+<TT
+CLASS="FUNCTION"
+>cyg_user_start</TT
+> and general application code. This
+ensures that there is a clearly defined point at which the I/O
+auxiliary knows that all required devices have been loaded. It can
+then perform various consistency checks and clean-ups, run the user's
+<TT
+CLASS="FILENAME"
+>mainrc.tcl</TT
+> script, and make the main window
+visible.
+ </P
+><P
+>For standard devices generic eCos I/O code will call the device
+initialization routines at the right time, iterating through the
+<TT
+CLASS="VARNAME"
+>DEVTAB</TT
+> table in a static constructor. The same
+holds for network devices and file systems. For more custom devices
+code like the following can be used:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#include &lt;cyg/infra/cyg_type.h&gt;
+class mydev_init {
+ public:
+ mydev_init() {
+ &#8230;
+ }
+};
+static mydev_init mydev_init_object CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Some care has to be taken because the object
+<TT
+CLASS="VARNAME"
+>mydev_init_object</TT
+> will typically not be referenced
+by other code, and hence may get eliminated at link-time. If the code
+is part of an eCos package then problems can be avoided by putting the
+relevant file in <TT
+CLASS="FILENAME"
+>libextras.a</TT
+>:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>cdl_package CYGPKG_DEVS_MINE {
+ &#8230;
+ compile -library=libextras.a init.cxx
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>For devices inside application code the same can be achieved by
+linking the relevant module as a <TT
+CLASS="FILENAME"
+>.o</TT
+> file rather
+than putting it in a <TT
+CLASS="FILENAME"
+>.a</TT
+> library.
+ </P
+><P
+>In the device initialization routine the main operation is a call to
+<TT
+CLASS="FUNCTION"
+>synth_auxiliary_instantiate</TT
+>. This takes five
+arguments, all of which should be strings:
+ </P
+><P
+></P
+><DIV
+CLASS="VARIABLELIST"
+><DL
+><DT
+><TT
+CLASS="VARNAME"
+>package</TT
+></DT
+><DD
+><P
+>For device drivers which are eCos packages this should be a directory
+path relative to the eCos repository, for example
+<TT
+CLASS="LITERAL"
+>devs/eth/synth/ecosynth</TT
+>. This will allow the I/O
+auxiliary to find the various host-side support files for this package
+within the install tree. If the device is application-specific and not
+part of an eCos package then a NULL pointer can be used, causing the
+I/O auxiliary to search for the support files in the current directory
+and then in <TT
+CLASS="FILENAME"
+>~/.ecos/synth</TT
+>
+instead.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>version</TT
+></DT
+><DD
+><P
+>For eCos packages this argument should be the version of the package
+that is being used, for example <TT
+CLASS="LITERAL"
+>current</TT
+>. A simple
+way to get this version is to use the
+<TT
+CLASS="FUNCTION"
+>SYNTH_MAKESTRING</TT
+> macro on the package name.
+If the device is application-specific then a NULL pointer should be
+used.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>device</TT
+></DT
+><DD
+><P
+>This argument specifies the type of device being instantiated, for
+example <TT
+CLASS="LITERAL"
+>ethernet</TT
+>. More specifically the I/O
+auxiliary will append a <TT
+CLASS="FILENAME"
+>.tcl</TT
+> suffix, giving
+the name of a Tcl script that will handle all I/O requests for the
+device. If the application requires several instances of a type
+of device then the script will only be loaded once, but the script
+will contain an instantiation procedure that will be called for each
+device instance.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>instance</TT
+></DT
+><DD
+><P
+>If it is possible to have multiple instances of a device then this
+argument identifies the particular instance, for example
+<TT
+CLASS="LITERAL"
+>eth0</TT
+> or <TT
+CLASS="LITERAL"
+>eth1</TT
+>. Otherwise a NULL
+pointer can be used.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>data</TT
+></DT
+><DD
+><P
+>This argument can be used to pass additional initialization data from
+eCos to the host-side support. This is useful for devices where eCos
+configury must control certain aspects of the device, rather than
+host-side configury such as the target definition file, because eCos
+has compile-time dependencies on some or all of the relevant options.
+An example might be an emulated frame buffer where eCos has been
+statically configured for a particular screen size, orientation and
+depth. There is no fixed format for this string, it will be
+interpreted only by the device-specific host-side Tcl script. However
+the string length should be limited to a couple of hundred bytes to
+avoid possible buffer overflow problems.
+ </P
+></DD
+></DL
+></DIV
+><P
+>Typical usage would look like:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> if (!synth_auxiliary_running) {
+ return;
+ }
+ id = synth_auxiliary_instantiate("devs/eth/synth/ecosynth",
+ SYNTH_MAKESTRING(CYGPKG_DEVS_ETH_ECOSYNTH),
+ "ethernet",
+ "eth0",
+ (const char*) 0);</PRE
+></TD
+></TR
+></TABLE
+><P
+>The return value will be a device identifier which can be used for
+subsequent calls to <TT
+CLASS="FUNCTION"
+>synth_auxiliary_xchgmsg</TT
+>. If
+the device could not be instantiated then <TT
+CLASS="LITERAL"
+>-1</TT
+> will
+be returned. It is the responsibility of the host-side software to
+issue suitable diagnostics explaining what went wrong, so normally the
+target-side code should fail silently.
+ </P
+><P
+>Once the desired device has been instantiated, often it will be
+necessary to do some additional initialization by a message exchange.
+For example an ethernet device might need information from the
+host-side about the MAC address, the <A
+HREF="synth-new-target.html#SYNTH-NEW-TARGET-INTERRUPTS"
+>interrupt vector</A
+>, and
+whether or not multicasting is supported.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-NEW-TARGET-XCHGMSG"
+></A
+><H2
+>Communicating with a Device</H2
+><P
+>Once a device has been instantiated it is possible to perform I/O by
+sending messages to the appropriate Tcl script running inside the
+auxiliary, and optionally getting back replies. I/O operations are
+always initiated by the eCos target-side, it is not possible for the
+host-side software to initiate data transfers. However the host-side
+can raise interrupts, and the interrupt handler inside the target can
+then exchange one or more messages with the host.
+ </P
+><P
+>There is a single function to perform I/O operations,
+<TT
+CLASS="FUNCTION"
+>synth_auxiliary_xchgmsg</TT
+>. This takes the following
+arguments:
+ </P
+><P
+></P
+><DIV
+CLASS="VARIABLELIST"
+><DL
+><DT
+><TT
+CLASS="VARNAME"
+>device_id</TT
+></DT
+><DD
+><P
+>This should be one of the identifiers returned by a previous
+call to <TT
+CLASS="FUNCTION"
+>synth_auxiliary_instantiate</TT
+>, specifying the
+particular device which should perform some I/O.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>request</TT
+></DT
+><DD
+><P
+>Request are just signed 32-bit integers that identify the particular
+I/O operation being requested. There is no fixed set of codes, instead
+each type of device can define its own.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>arg1</TT
+>, <TT
+CLASS="VARNAME"
+>arg2</TT
+></DT
+><DD
+><P
+>For some requests it is convenient to pass one or two additional
+parameters alongside the request code. For example an ethernet device
+could define a multicast-all request, with <TT
+CLASS="VARNAME"
+>arg1</TT
+>
+controlling whether this mode should be enabled or disabled. Both
+<TT
+CLASS="VARNAME"
+>arg1</TT
+> and <TT
+CLASS="VARNAME"
+>arg2</TT
+> should be signed
+32-bit integers, and their values are interpreted only by the
+device-specific Tcl script.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>txdata</TT
+>, <TT
+CLASS="VARNAME"
+>txlen</TT
+></DT
+><DD
+><P
+>Some I/O operations may involve sending additional data, for example
+an ethernet packet. Alternatively a control operation may require many
+more parameters than can easily be encoded in <TT
+CLASS="VARNAME"
+>arg1</TT
+>
+and <TT
+CLASS="VARNAME"
+>arg2</TT
+>, so those parameters have to be placed in
+a suitable buffer and extracted at the other end.
+<TT
+CLASS="VARNAME"
+>txdata</TT
+> is an arbitrary buffer of
+<TT
+CLASS="VARNAME"
+>txlen</TT
+> bytes that should be sent to the host-side.
+There is no specific upper bound on the number of bytes that can be
+sent, but usually it is a good idea to allocate the transmit buffer
+statically and keep transfers down to at most several kilobytes.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>reply</TT
+></DT
+><DD
+><P
+>If the host-side is expected to send a reply message then
+<TT
+CLASS="VARNAME"
+>reply</TT
+> should be a pointer to an integer variable
+and will be updated with a reply code, a simple 32-bit integer. The
+synthetic target HAL code assumes that the host-side and target-side
+agree on the protocol being used: if the host-side will not send a
+reply to this message then the <TT
+CLASS="VARNAME"
+>reply</TT
+> argument
+should be a NULL pointer; otherwise the host-side must always send
+a reply code and the <TT
+CLASS="VARNAME"
+>reply</TT
+> argument must be valid.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>rxdata</TT
+>, <TT
+CLASS="VARNAME"
+>rxlen</TT
+></DT
+><DD
+><P
+>Some operations may involve additional data coming from the host-side,
+for example an incoming ethernet packet. <TT
+CLASS="VARNAME"
+>rxdata</TT
+>
+should be a suitably-sized buffer, and <TT
+CLASS="VARNAME"
+>rxlen</TT
+> a
+pointer to an integer variable that will end up containing the number
+of bytes that were actually received. These arguments will only be
+used if the host-side is expected to send a reply and hence the
+<TT
+CLASS="VARNAME"
+>reply</TT
+> argument was not NULL.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>max_rxlen</TT
+></DT
+><DD
+><P
+>If a reply to this message is expected and that reply may involve
+additional data, <TT
+CLASS="VARNAME"
+>max_rxlen</TT
+> limits the size of that
+reply. In other words, it corresponds to the size of the
+<TT
+CLASS="VARNAME"
+>rxdata</TT
+> buffer.
+ </P
+></DD
+></DL
+></DIV
+><P
+>Most I/O operations involve only some of the arguments. For example
+transmitting an ethernet packet would use the
+<TT
+CLASS="VARNAME"
+>request</TT
+>, <TT
+CLASS="VARNAME"
+>txdata</TT
+> and
+<TT
+CLASS="VARNAME"
+>txlen</TT
+> fields (in addition to
+<TT
+CLASS="VARNAME"
+>device_id</TT
+> which is always required), but would not
+involve <TT
+CLASS="VARNAME"
+>arg1</TT
+> or <TT
+CLASS="VARNAME"
+>arg2</TT
+> and no
+reply would be expected. Receiving an ethernet packet would involve
+<TT
+CLASS="VARNAME"
+>request</TT
+>, <TT
+CLASS="VARNAME"
+>rxdata</TT
+>,
+<TT
+CLASS="VARNAME"
+>rxlen</TT
+> and <TT
+CLASS="VARNAME"
+>max_rxlen</TT
+>; in addition
+<TT
+CLASS="VARNAME"
+>reply</TT
+> is needed to get any reply from the host-side
+at all, and could be used to indicate whether or not any more packets
+are buffered up. A control operation such as enabling multicast mode
+would involve <TT
+CLASS="VARNAME"
+>request</TT
+> and <TT
+CLASS="VARNAME"
+>arg1</TT
+>,
+but none of the remaining arguments.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-NEW-TARGET-INTERRUPTS"
+></A
+><H2
+>Interrupt Handling</H2
+><P
+>Interrupt handling in the synthetic target is much the same as on a
+real target. An interrupt object is created using
+<TT
+CLASS="FUNCTION"
+>cyg_drv_interrupt_create</TT
+>, attached, and unmasked.
+The emulated device - in other words the Tcl script running inside the
+I/O auxiliary - can raise an interrupt. Subject to interrupts being
+disabled and the appropriate vector being masked, the system will
+invoke the specified ISR function. The synthetic target HAL
+implementation does have some limitations: there is no support for
+nested interrupts, interrupt priorities, or a separate interrupt
+stack. Supporting those might be appropriate when targetting a
+simulator that attempts to model real hardware accurately, but not for
+the simple emulation provided by the synthetic target.
+ </P
+><P
+>Of course the actual implementation of the ISR and DSR functions will
+be rather different for a synthetic target device driver. For real
+hardware the device driver will interact with the device by reading
+and writing device registers, managing DMA engines, and the like. A
+synthetic target driver will instead call
+<TT
+CLASS="FUNCTION"
+>synth_auxiliary_xchgmsg</TT
+> to perform the I/O
+operations.
+ </P
+><P
+>There is one other significant difference between interrupt handling
+on the synthetic target and on real hardware. Usually the eCos code
+will know which interrupt vectors are used for which devices. That
+information is fixed when the target hardware is designed. With the
+synthetic target interrupt vectors are assigned to devices on the host
+side, either via the target definition file or dynamically when the
+device is instantiated. Therefore the initialization code for a
+target-side device driver will need to request interrupt vector
+information from the host-side, via a message exchange. Such interrupt
+vectors will be in the range 1 to 31 inclusive, with interrupt 0 being
+reserved for the real-time clock.
+ </P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+SUMMARY="Footer navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="synth-syscalls.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="hal-synth-arch.html"
+ACCESSKEY="H"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="synth-new-host.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>System Calls</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Writing New Devices - host</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/synth-porting.html b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-porting.html
new file mode 100644
index 0000000000..601ec6179a
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-porting.html
@@ -0,0 +1,379 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Porting</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
+"><LINK
+REL="HOME"
+TITLE="eCos Synthetic Target"
+HREF="hal-synth-arch.html"><LINK
+REL="PREVIOUS"
+TITLE="Writing New Devices - host"
+HREF="synth-new-host.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+SUMMARY="Header navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos Synthetic Target</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="synth-new-host.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+>&nbsp;</TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="SYNTH-PORTING">Porting</H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN1049"
+></A
+><H2
+>Name</H2
+>Porting&nbsp;--&nbsp;Adding support for other hosts</DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-PORTING-DESCRIPTION"
+></A
+><H2
+>Description</H2
+><P
+>The initial development effort of the eCos synthetic target happened
+on x86 Linux machines. Porting to other platforms involves addressing
+a number of different issues. Some ports should be fairly
+straightforward, for example a port to Linux on a processor other than
+an x86. Porting to Unix or Unix-like operating systems other than
+Linux may be possible, but would involve more effort. Porting to a
+completely different operating system such as Windows would be very
+difficult. The text below complements the eCos Porting Guide.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-PORTING-LINUX"
+></A
+><H2
+>Other Linux Platforms</H2
+><P
+>Porting the synthetic target to a Linux platform that uses a processor
+other than x86 should be straightforward. The simplest approach is to
+copy the existing <TT
+CLASS="FILENAME"
+>i386linux</TT
+>
+directory tree in the <TT
+CLASS="FILENAME"
+>hal/synth</TT
+>
+hierarchy, then rename and edit the ten or so files in this package.
+Most of the changes should be pretty obvious, for example on a 64-bit
+processor some new data types will be needed in the
+<TT
+CLASS="FILENAME"
+>basetype.h</TT
+> header file. It will also be necessary
+to update the toplevel <TT
+CLASS="FILENAME"
+>ecos.db</TT
+> database with an
+entry for the new HAL package, and a new target entry will be needed.
+ </P
+><P
+>Obviously a different processor will have different register sets and
+calling conventions, so the code for saving and restoring thread
+contexts and for implementing <TT
+CLASS="FUNCTION"
+>setjmp</TT
+> and
+<TT
+CLASS="FUNCTION"
+>longjmp</TT
+> will need to be updated. The exact way of
+performing Linux system calls will vary: on x86 linux this usually
+involves pushing some registers on the stack and then executing an
+<TT
+CLASS="LITERAL"
+>int&nbsp;0x080</TT
+> trap instruction, but on a different
+processor the arguments might be passed in registers instead and
+certainly a different trap instruction will be used. The startup code
+is written in assembler, but needs to do little more than extract the
+process' argument and environment variables and then jump to the main
+<TT
+CLASS="FUNCTION"
+>linux_entry</TT
+> function provided by the
+architectural synthetic target HAL package.
+ </P
+><P
+>The header file <TT
+CLASS="FILENAME"
+>hal_io.h</TT
+> provided by the
+architectural HAL package provides various structure definitions,
+function prototypes, and macros related to system calls. These are
+correct for x86 linux, but there may be problems on other processors.
+For example a structure field that is currently defined as a 32-bit
+number may in fact may be a 64-bit number instead.
+ </P
+><P
+>The synthetic target's memory map is defined in two files in the
+<TT
+CLASS="FILENAME"
+>include/pkgconf</TT
+> subdirectory.
+For x86 the default memory map involves eight megabytes of read-only
+memory for the code at location 0x1000000 and another eight megabytes
+for data at 0x2000000. These address ranges may be reserved for other
+purposes on the new architecture, so may need changing. There may be
+some additional areas of memory allocated by the system for other
+purposes, for example the startup stack and any environment variables,
+but usually eCos applications can and should ignore those.
+ </P
+><P
+>Other HAL functionality such as interrupt handling, diagnostics, and
+the system clock are provided by the architectural HAL package and
+should work on different processors with few if any changes. There may
+be some problems in the code that interacts with the I/O auxiliary
+because of lurking assumptions about endianness or the sizes of
+various data types.
+ </P
+><P
+>When porting to other processors, a number of sources of information
+are likely to prove useful. Obviously the Linux kernel sources and
+header files constitute the ultimate authority on how things work at
+the system call level. The GNU C library sources may also prove very
+useful: for a normal Linux application it is the C library that
+provides the startup code and the system call interface.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-PORTING-UNIX"
+></A
+><H2
+>Other Unix Platforms</H2
+><P
+>Porting to a Unix or Unix-like operating system other than Linux would
+be somewhat more involved. The first requirement is toolchains: the
+GNU compilers, gcc and g++, must definitely be used; use of other GNU
+tools such as the linker may be needed as well, because eCos depends
+on functionality such as prioritizing C++ static constructors, and
+other linkers may not implement this or may implement it in a
+different and incompatible way. A closely related requirement is the
+use of ELF format for binary executables: if the operating system
+still uses an older format such as COFF then there are likely to be
+problems because they do not provide the flexibility required by eCos.
+ </P
+><P
+>In the architectural HAL there should be very little code that is
+specific to Linux. Instead the code should work on any operating
+system that provides a reasonable implementation of the POSIX
+standard. There may be some problems with program startup, but those
+could be handled at the architectural level. Some changes may also be
+required to the exception handling code. However one file which will
+present a problem is <TT
+CLASS="FILENAME"
+>hal_io.h</TT
+>, which contains
+various structure definitions and macros used with the system call
+interface. It is likely that many of these definitions will need
+changing, and it may well be appropriate to implement variant HAL
+packages for the different operating systems where this information
+can be separated out. Another possible problem is that the generic
+code assumes that system calls such as
+<TT
+CLASS="FUNCTION"
+>cyg_hal_sys_write</TT
+> are available. On an operating
+system other than Linux it is possible that some of these are not
+simple system calls, and instead wrapper functions will need to be
+implemented at the variant HAL level.
+ </P
+><P
+>The generic I/O auxiliary code should be fairly portable to other Unix
+platforms. However some of the device drivers may contain code that is
+specific to Linux, for example the <TT
+CLASS="LITERAL"
+>PF_PACKET</TT
+> socket
+address family and the ethertap virtual tunnelling interface. These
+may prove quite difficult to port.
+ </P
+><P
+>The remaining porting task is to implement one or more platform HAL
+packages, one per processor type that is supported. This should
+involve much the same work as a port to <A
+HREF="synth-porting.html#SYNTH-PORTING-LINUX"
+>another processor running Linux</A
+>.
+ </P
+><P
+>When using other Unix operating systems the kernel source code may not
+be available, which would make any porting effort more challenging.
+However there is still a good chance that the GNU C library will have
+been ported already, so its source code may contain much useful
+information.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-PORTING-OTHER"
+></A
+><H2
+>Windows Platforms</H2
+><P
+>Porting the current synthetic target code to some version of Windows
+or to another non-Unix platform is likely to prove very difficult. The
+first hurdle that needs to be crossed is the file format for binary
+executables: current Windows implementations do not use ELF, instead
+they use their own format PE which is a variant of the rather old and
+limited COFF format. It may well prove easier to first write an ELF
+loader for Windows executables, rather than try to get eCos to work
+within the constraints of PE. Of course that introduces new problems,
+for example existing source-level debuggers will still expect
+executables to be in PE format.
+ </P
+><P
+>Under Linux a synthetic target application is not linked with the
+system's C library or any other standard system library. That would
+cause confusion, for example both eCos and the system's C library
+might try to define the <TT
+CLASS="FUNCTION"
+>printf</TT
+> function, and
+introduce complications such as working with shared libraries. For
+much the same reasons, a synthetic target application under Windows
+should not be linked with any Windows DLL's. If an ELF loader has been
+specially written then this may not be much of a problem.
+ </P
+><P
+>The next big problem is the system call interface. Under Windows
+system calls are generally made via DLL's, and it is not clear that
+the underlying trap mechanism is well-documented or consistent between
+different releases of Windows.
+ </P
+><P
+>The current code depends on the operating system providing an
+implementation of POSIX signal handling. This is used for I/O
+purposes, for example <TT
+CLASS="LITERAL"
+>SIGALRM</TT
+> is used for the
+system clock, and for exceptions. It is not known what equivalent
+functionality is available under Windows.
+ </P
+><P
+>Given the above problems a port of the synthetic target to Windows may
+or may not be technically feasible, but it would certainly require a
+very large amount of effort.
+ </P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+SUMMARY="Footer navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="synth-new-host.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="hal-synth-arch.html"
+ACCESSKEY="H"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Writing New Devices - host</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>&nbsp;</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/synth-running.html b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-running.html
new file mode 100644
index 0000000000..386f0c2282
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-running.html
@@ -0,0 +1,964 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Running a Synthetic Target Application</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
+"><LINK
+REL="HOME"
+TITLE="eCos Synthetic Target"
+HREF="hal-synth-arch.html"><LINK
+REL="PREVIOUS"
+TITLE="Installation"
+HREF="synth-install.html"><LINK
+REL="NEXT"
+TITLE="The I/O Auxiliary's User Interface"
+HREF="synth-gui.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+SUMMARY="Header navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos Synthetic Target</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="synth-install.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="synth-gui.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="SYNTH-RUNNING">Running a Synthetic Target Application</H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN95"
+></A
+><H2
+>Name</H2
+>Execution&nbsp;--&nbsp;Arguments and configuration files</DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-RUNNING-DESCRIPTION"
+></A
+><H2
+>Description</H2
+><P
+>The procedure for configuring and building eCos and an application for
+the synthetic target is the same as for any other eCos target. Once an
+executable has been built it can be run like any Linux program, for
+example from a shell prompt,
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+>$ ecos_hello &lt;options&gt;</PRE
+></TD
+></TR
+></TABLE
+><P
+>or using gdb:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+>$ gdb --nw --quiet --args ecos_hello &lt;options&gt;
+(gdb) run
+Starting program: ecos_hello &lt;options&gt;</PRE
+></TD
+></TR
+></TABLE
+><P
+>By default use of the I/O auxiliary is disabled. If its I/O facilities
+are required then the option <TT
+CLASS="OPTION"
+>--io</TT
+> must be used.
+ </P
+><DIV
+CLASS="NOTE"
+><BLOCKQUOTE
+CLASS="NOTE"
+><P
+><B
+>Note: </B
+>In future the default behaviour may change, with the I/O auxiliary
+being started by default. The option <TT
+CLASS="OPTION"
+>--nio</TT
+> can be
+used to prevent the auxiliary from being run.
+ </P
+></BLOCKQUOTE
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-RUNNING-ARGUMENTS"
+></A
+><H2
+>Command-line Arguments</H2
+><P
+>The syntax for running a synthetic target application is:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+>$ &lt;ecos_app&gt; [options] [-- [app_options]]</PRE
+></TD
+></TR
+></TABLE
+><P
+>Command line options up to the <TT
+CLASS="OPTION"
+>--</TT
+> are passed on to
+the I/O auxiliary. Subsequent arguments are not passed on to the
+auxiliary, and hence can be used by the eCos application itself. The
+full set of arguments can be accessed through the variables
+<TT
+CLASS="VARNAME"
+>cyg_hal_sys_argc</TT
+> and
+<TT
+CLASS="VARNAME"
+>cyg_hal_sys_argv</TT
+>.
+ </P
+><P
+>The following options are accepted as standard:
+ </P
+><P
+></P
+><DIV
+CLASS="VARIABLELIST"
+><DL
+><DT
+><TT
+CLASS="OPTION"
+>--io</TT
+></DT
+><DD
+><P
+>This option causes the eCos application to spawn the I/O auxiliary
+during HAL initialization. Without this option only limited I/O will
+be available.
+ </P
+></DD
+><DT
+><TT
+CLASS="OPTION"
+>--nio</TT
+></DT
+><DD
+><P
+>This option prevents the eCos application from spawning the I/O
+auxiliary. In the current version of the software this is the default.
+ </P
+></DD
+><DT
+><TT
+CLASS="OPTION"
+>-nw</TT
+>, <TT
+CLASS="OPTION"
+>--no-windows</TT
+></DT
+><DD
+><P
+>The I/O auxiliary can either provide a graphical user interface, or it
+can run in a text-only mode. The default is to provide the graphical
+interface, but this can be disabled with <TT
+CLASS="OPTION"
+>-nw</TT
+>.
+Emulation of some devices, for example buttons connected to digital
+inputs, requires the graphical interface.
+ </P
+></DD
+><DT
+><TT
+CLASS="OPTION"
+>-w</TT
+>, <TT
+CLASS="OPTION"
+>--windows</TT
+></DT
+><DD
+><P
+>The <TT
+CLASS="OPTION"
+>-w</TT
+> causes the I/O auxiliary to provide a
+graphical user interface. This is the default.
+ </P
+></DD
+><DT
+><TT
+CLASS="OPTION"
+>-v</TT
+>, <TT
+CLASS="OPTION"
+>--version</TT
+></DT
+><DD
+><P
+>The <TT
+CLASS="OPTION"
+>-v</TT
+> option can be used to determine the version of
+the I/O auxiliary being used and where it has been installed. Both the
+auxiliary and the eCos application will exit immediately.
+ </P
+></DD
+><DT
+><TT
+CLASS="OPTION"
+>-h</TT
+>, <TT
+CLASS="OPTION"
+>--help</TT
+></DT
+><DD
+><P
+><TT
+CLASS="OPTION"
+>-h</TT
+> causes the I/O auxiliary to list all accepted
+command-line arguments. This happens after all devices have been
+initialized, since the host-side support for some of the devices may
+extend the list of recognised options. After this both the auxiliary
+and the eCos application will exit immediately. This option implies
+<TT
+CLASS="OPTION"
+>-nw</TT
+>.
+ </P
+></DD
+><DT
+><TT
+CLASS="OPTION"
+>-k</TT
+>, <TT
+CLASS="OPTION"
+>--keep-going</TT
+></DT
+><DD
+><P
+>If an error occurs in the I/O auxiliary while reading in any of the
+configuration files or initializing devices, by default both the
+auxiliary and the eCos application will exit. The <TT
+CLASS="OPTION"
+>-k</TT
+>
+option can be used to make the auxiliary continue in spite of errors,
+although obviously it may not be fully functional.
+ </P
+></DD
+><DT
+><TT
+CLASS="OPTION"
+>-nr</TT
+>, <TT
+CLASS="OPTION"
+>--no-rc</TT
+></DT
+><DD
+><P
+>Normally the auxiliary processes two <A
+HREF="synth-running.html#SYNTH-RUNNING-USER-CONFIG"
+>user configuration files</A
+>
+during startup: <TT
+CLASS="FILENAME"
+>initrc.tcl</TT
+> and
+<TT
+CLASS="FILENAME"
+>mainrc.tcl</TT
+>. This can be suppressed using the
+<TT
+CLASS="OPTION"
+>-nr</TT
+> option.
+ </P
+></DD
+><DT
+><TT
+CLASS="OPTION"
+>-x</TT
+>, <TT
+CLASS="OPTION"
+>--exit</TT
+></DT
+><DD
+><P
+>When providing a graphical user interface the I/O auxiliary will
+normally continue running even after the eCos application has exited.
+This allows the user to take actions such as saving the current
+contents of the main text window. If run with <TT
+CLASS="OPTION"
+>-x</TT
+> then
+the auxiliary will exit as soon the application exits.
+ </P
+></DD
+><DT
+><TT
+CLASS="OPTION"
+>-nx</TT
+>, <TT
+CLASS="OPTION"
+>--no-exit</TT
+></DT
+><DD
+><P
+>When the graphical user interface is disabled with
+<TT
+CLASS="OPTION"
+>-nw</TT
+> the I/O auxiliary will normally exit immediately
+when the eCos application exits. Without the graphical frontend there
+is usually no way for the user to interact directly with the
+auxiliary, so there is no point in continuing to run once the eCos
+application will no longer request any I/O operations. Specifying the
+<TT
+CLASS="OPTION"
+>-nx</TT
+> option causes the auxiliary to continue running
+even after the application has exited.
+ </P
+></DD
+><DT
+><TT
+CLASS="OPTION"
+>-V</TT
+>, <TT
+CLASS="OPTION"
+>--verbose</TT
+></DT
+><DD
+><P
+>This option causes the I/O auxiliary to output some additional
+information, especially during initialization.
+ </P
+></DD
+><DT
+><TT
+CLASS="OPTION"
+>-l &lt;file&gt;</TT
+>, <TT
+CLASS="OPTION"
+>--logfile &lt;file&gt;</TT
+></DT
+><DD
+><P
+>Much of the output of the eCos application and the I/O auxiliary is
+simple text, for example resulting from eCos
+<TT
+CLASS="FUNCTION"
+>printf</TT
+> or <TT
+CLASS="FUNCTION"
+>diag_printf</TT
+> calls.
+When running in graphical mode this output goes to a central text
+window, and can be saved to a file or edited via menus. The
+<TT
+CLASS="OPTION"
+>-l</TT
+> can be used to automatically generate an
+additional logfile containing all the text. If graphical
+mode is disabled then by default all the text just goes to the current
+standard output. Specifying <TT
+CLASS="OPTION"
+>-l</TT
+> causes most of the
+text to go into a logfile instead, although some messages such as
+errors generated by the auxiliary itself will still go to stdout as
+well.
+ </P
+></DD
+><DT
+><TT
+CLASS="OPTION"
+>-t &lt;file&gt;</TT
+>, <TT
+CLASS="OPTION"
+>--target &lt;file&gt;</TT
+></DT
+><DD
+><P
+>During initialization the I/O auxiliary reads in a target definition
+file. This file holds information such as which Linux devices should
+be used to emulate the various eCos devices. The <TT
+CLASS="OPTION"
+>-t</TT
+>
+option can be used to specify which target definition should be used
+for the current run, defaulting to <TT
+CLASS="FILENAME"
+>default.tdf</TT
+>.
+It is not necessary to include the <TT
+CLASS="FILENAME"
+>.tdf</TT
+> suffix,
+this will be appended automatically if necessary.
+ </P
+></DD
+><DT
+><TT
+CLASS="OPTION"
+>-geometry &lt;geometry&gt;</TT
+></DT
+><DD
+><P
+>This option can be used to control the size and position of the main
+window, as per X conventions.
+ </P
+></DD
+></DL
+></DIV
+><P
+>The I/O auxiliary loads support for the various devices dynamically
+and some devices may accept additional command line arguments. Details
+of these can be obtained using the <TT
+CLASS="OPTION"
+>-h</TT
+> option or by
+consulting the device-specific documentation. If an unrecognised
+command line argument is used then a warning will be issued.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-RUNNING-TDF"
+></A
+><H2
+>The Target Definition File</H2
+><P
+>The eCos application will want to access devices such as
+<TT
+CLASS="VARNAME"
+>eth0</TT
+> or <TT
+CLASS="VARNAME"
+>/dev/ser0</TT
+>. These need to
+be mapped on to Linux devices. For example some users may all traffic
+on the eCos <TT
+CLASS="VARNAME"
+>/dev/ser0</TT
+> serial device to go via the
+Linux serial device <TT
+CLASS="VARNAME"
+>/dev/ttyS1</TT
+>, while ethernet I/O
+for the eCos <TT
+CLASS="VARNAME"
+>eth0</TT
+> device should be mapped to the
+Linux ethertap device <TT
+CLASS="VARNAME"
+>tap3</TT
+>. Some devices may need
+additional configuration information, for example to limit the
+number of packets that should be buffered within the I/O auxiliary.
+The target definition file provides all this information.
+ </P
+><P
+>By default the I/O auxiliary will look for a file
+<TT
+CLASS="FILENAME"
+>default.tdf</TT
+>. An alternative target definition can
+be specified on the command line using <TT
+CLASS="OPTION"
+>-t</TT
+>, for
+example:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+>$ bridge_app --io -t twineth</PRE
+></TD
+></TR
+></TABLE
+><P
+>A <TT
+CLASS="FILENAME"
+>.tdf</TT
+> suffix will be appended automatically if
+necessary. If a relative pathname is used then the I/O auxiliary will
+search for the target definition file in the current directory, then
+in <TT
+CLASS="FILENAME"
+>~/.ecos/synth/</TT
+>, and finally
+in its install location.
+ </P
+><P
+>A typical target definition file might look like this:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device console {
+ # appearance -foreground white -background black
+ filter trace {^TRACE:.*} -foreground HotPink1 -hide 1
+}
+
+synth_device ethernet {
+ eth0 real eth1
+ eth1 ethertap tap4 00:01:02:03:FE:06
+
+ ## Maximum number of packets that should be buffered per interface.
+ ## Default 16
+ #max_buffer 32
+
+ ## Filters for the various recognised protocols.
+ ## By default all filters are visible and use standard colours.
+ filter ether -hide 0
+ #filter arp -hide 1
+ #filter ipv4 -hide 1
+ #filter ipv6 -hide 1
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>A target definition file is actually a Tcl script that gets run in the
+main interpreter of the I/O auxiliary during initialization. This
+provides a lot of flexibility if necessary. For example the script
+could open a socket to a resource management server of some sort to
+determine which hardware facilities are already in use and adapt
+accordingly. Another possibility is to adapt based on <A
+HREF="synth-new-host.html#SYNTH-NEW-HOST-ARGS"
+>command line arguments</A
+>. Users who
+are not familiar with Tcl programming should still be able to edit a
+simple target definition file without too much difficulty, using a
+mixture of cut'n'paste, commenting or uncommenting various lines, and
+making small edits such as changing <TT
+CLASS="LITERAL"
+>tap4</TT
+> to
+<TT
+CLASS="LITERAL"
+>eth2</TT
+>.
+ </P
+><P
+>Each type of device will have its own entry in the target definition
+file, taking the form:
+ </P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>synth_device &lt;device type&gt; {
+ &lt;options&gt;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>The documentaton for each synthetic target device should provide
+details of the options available for that device, and often a suitable
+fragment that can be pasted into a target definition file and edited.
+There is no specific set of options that a given device will always
+provide. However in practice many devices will use common code
+exported by the main I/O auxiliary, or their implementation will
+involve some re-use of code for an existing device. Hence certain
+types of option are common to many devices.
+ </P
+><P
+>A good example of this is filters, which control the appearance of
+text output. The above target definition file defines a filter
+<TT
+CLASS="VARNAME"
+>trace</TT
+> for output from the eCos application. The
+regular expression will match output from the infrastructure package's
+tracing facilities when <TT
+CLASS="VARNAME"
+>CYGDBG_USE_TRACING</TT
+> and
+<TT
+CLASS="VARNAME"
+>CYGDBG_INFRA_DEBUG_TRACE_ASSERT_SIMPLE</TT
+> are enabled.
+With the current settings this output will not be visible by default,
+but can be made visible using the menu item <SPAN
+CLASS="GUIMENUITEM"
+>System
+Filters</SPAN
+>. If made visible the trace output will appear in
+an unusual colour, so users can easily distinguish the trace output
+from other text. All filters accept the following options:
+ </P
+><P
+></P
+><DIV
+CLASS="VARIABLELIST"
+><DL
+><DT
+><TT
+CLASS="OPTION"
+>-hide [0|1]</TT
+></DT
+><DD
+><P
+>This controls whether or not text matching this filter should be
+invisible by default or not. At run-time the visibility of each filter
+can be controlled using the <SPAN
+CLASS="GUIMENUITEM"
+>System Filters</SPAN
+>
+menu item.
+ </P
+></DD
+><DT
+><TT
+CLASS="OPTION"
+>-foreground &lt;colour&gt;</TT
+></DT
+><DD
+><P
+>This specifies the foreground colour for all text matching this
+filter. The colour can be specified using an RGB value such as
+<TT
+CLASS="LITERAL"
+>#F08010</TT
+>, or a symbolic name such as
+<TT
+CLASS="LITERAL"
+>"light steel blue"</TT
+>. The X11 utility
+<SPAN
+CLASS="APPLICATION"
+>showrgb</SPAN
+> can be used to find out
+about the available colours.
+ </P
+></DD
+><DT
+><TT
+CLASS="OPTION"
+>-background &lt;colour&gt;</TT
+></DT
+><DD
+><P
+>This specifies the background colour for all text matching the filter.
+As with <TT
+CLASS="OPTION"
+>-foreground</TT
+> the colour can be specified using
+a symbolic name or an RGB value.
+ </P
+></DD
+></DL
+></DIV
+><P
+>Some devices may create their own subwindows, for example to monitor
+ethernet traffic or to provide additional I/O facilities such as
+emulated LED's or buttons. Usually the target definition file can be
+used to control the <A
+HREF="synth-gui.html#SYNTH-GUI-LAYOUT"
+>layout</A
+> of
+these windows.
+ </P
+><P
+>The I/O auxiliary will not normally warn about
+<B
+CLASS="COMMAND"
+>synth_device</B
+> entries in the target definition file
+for devices that are not actually needed by the current eCos
+application. This makes it easier to use a single file for several
+different applications. However it can lead to confusion if an entry
+is spelled incorrectly and hence does not actually get used. The
+<TT
+CLASS="OPTION"
+>-V</TT
+> command line option can be used to get warnings
+about unused device entries in the target definition file.
+ </P
+><P
+>If the body of a <B
+CLASS="COMMAND"
+>synth_device</B
+> command contains an
+unrecognised option and the relevant device is in use, the I/O
+auxiliary will always issue a warning about such options.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-RUNNING-USER-CONFIG"
+></A
+><H2
+>User Configuration Files</H2
+><P
+>During initialization the I/O auxiliary will execute two user
+configuration files, <TT
+CLASS="FILENAME"
+>initrc.tcl</TT
+> and
+<TT
+CLASS="FILENAME"
+>mainrc.tcl</TT
+>. It will look for these files in the
+directory <TT
+CLASS="FILENAME"
+>~/.ecos/synth/</TT
+>. If
+that directory does not yet exist it will be created and populated
+with initial dummy files.
+ </P
+><P
+>Both of these configuration files are Tcl scripts and will be run in
+the main interpreter used by the I/O auxiliary itself. This means that
+they have full access to the internals of the auxiliary including the
+various Tk widgets, and they can perform file or socket I/O if
+desired. The section <A
+HREF="synth-new-host.html"
+>Writing New Devices - host</A
+> contains
+information about the facilities available on the host-side for
+writing new device drivers, and these can also be used in the
+initialization scripts.
+ </P
+><P
+>The <TT
+CLASS="FILENAME"
+>initrc.tcl</TT
+> script is run before the auxiliary
+has processed any requests from the eCos application, and hence before
+any devices have been instantiated. At this point the generic
+command-line arguments has been processed, the target definition file
+has been read in, and the hooks functionality has been initialized. If
+running in graphical mode the main window will have been created, but
+has been withdrawn from the screen to allow new widgets to be added
+without annoying screen flicker. A typical
+<TT
+CLASS="FILENAME"
+>initrc.tcl</TT
+> script could add some menu or toolbar
+options, or install a hook function that will be run when the
+eCos application exits.
+ </P
+><P
+>The <TT
+CLASS="FILENAME"
+>mainrc.tcl</TT
+> script is run after eCos has
+performed all its device initialization and after C++ static
+constructors have run, and just before the call to
+<TT
+CLASS="FUNCTION"
+>cyg_start</TT
+> which will end up transferring control
+to the application itself. A typical <TT
+CLASS="FILENAME"
+>mainrc.tcl</TT
+>
+script could look at what interrupt vectors have been allocated to
+which devices and create a little monitor window that shows interrupt
+activity.
+ </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-RUNNING-SESSION"
+></A
+><H2
+>Session Information</H2
+><P
+>When running in graphical mode, the I/O auxiliary will read in a file
+<TT
+CLASS="FILENAME"
+>~/.ecos/synth/guisession</TT
+> containing session
+information. This file should not normally be edited manually, instead
+it gets updated automatically when the auxiliary exits. The purpose of
+this file is to hold configuration options that are manipulated via
+the graphical interface, for example which browser should be used to
+display online help.
+ </P
+><DIV
+CLASS="WARNING"
+><P
+></P
+><TABLE
+CLASS="WARNING"
+BORDER="1"
+WIDTH="100%"
+><TR
+><TD
+ALIGN="CENTER"
+><B
+>Warning</B
+></TD
+></TR
+><TR
+><TD
+ALIGN="LEFT"
+><P
+>GUI session functionality is not yet available in the current release.
+When that functionality is fully implemented it is possible that some
+target definition file options may be removed, to be replaced by
+graphical editing via a suitable preferences dialog, with the
+current settings saved in the session file.
+ </P
+></TD
+></TR
+></TABLE
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+SUMMARY="Footer navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="synth-install.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="hal-synth-arch.html"
+ACCESSKEY="H"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="synth-gui.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Installation</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>The I/O Auxiliary's User Interface</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/synth-syscalls.html b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-syscalls.html
new file mode 100644
index 0000000000..3f0a5fb80f
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/synth-syscalls.html
@@ -0,0 +1,333 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>System Calls</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
+"><LINK
+REL="HOME"
+TITLE="eCos Synthetic Target"
+HREF="hal-synth-arch.html"><LINK
+REL="PREVIOUS"
+TITLE="The Console Device"
+HREF="synth-console.html"><LINK
+REL="NEXT"
+TITLE="Writing New Devices - target"
+HREF="synth-new-target.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+SUMMARY="Header navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos Synthetic Target</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="synth-console.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="synth-new-target.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="SYNTH-SYSCALLS">System Calls</H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN483"
+></A
+><H2
+>Name</H2
+>cyg_hal_sys_xyz&nbsp;--&nbsp;Access Linux system facilities</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN486"><H2
+>Synopsis</H2
+><DIV
+CLASS="FUNCSYNOPSIS"
+><A
+NAME="AEN487"><P
+></P
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="FUNCSYNOPSISINFO"
+>#include &lt;cyg/hal/hal_io.h
+ </PRE
+></TD
+></TR
+></TABLE
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>int cyg_hal_sys_xyzzy</CODE
+>(...);</CODE
+></P
+><P
+></P
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-SYSCALLS-DESCRIPTION"
+></A
+><H2
+>Description</H2
+><P
+>On a real embedded target eCos interacts with the hardware by peeking
+and poking various registers, manipulating special regions of memory,
+and so on. The synthetic target does not access hardware directly.
+Instead I/O and other operations are emulated by making appropriate
+Linux system calls. The HAL package exports a number of functions
+which allow other packages, or even application code, to make these
+same system calls. However this facility must be used with care: any
+code which calls, for example, <TT
+CLASS="FUNCTION"
+>cyg_hal_sys_write</TT
+>
+will only ever run on the synthetic target; that functionality is
+obviously not provided on any real hardware because there is no
+underlying Linux kernel to implement it.
+ </P
+><P
+>The synthetic target only provides a subset of the available system
+calls, specifically those calls which have proved useful to implement
+I/O emulation. This subset can be extended fairly easily if necessary.
+All of the available calls, plus associated data structures and
+macros, are defined in the header file <TT
+CLASS="FILENAME"
+>cyg/hal/hal_io.h</TT
+>. There is a simple
+convention: given a Linux system call such as
+<TT
+CLASS="FUNCTION"
+>open</TT
+>, the synthetic target will prefix
+<TT
+CLASS="LITERAL"
+>cyg_hal_sys</TT
+> and provide a function with that name.
+The second argument to the <TT
+CLASS="FUNCTION"
+>open</TT
+> system call is
+a set of flags such as <TT
+CLASS="CONSTANT"
+>O_RDONLY</TT
+>, and the header
+file will define a matching constant
+<TT
+CLASS="CONSTANT"
+>CYG_HAL_SYS_O_RDONLY</TT
+>. There are also data
+structures such as <SPAN
+CLASS="STRUCTNAME"
+>cyg_hal_sys_sigset_t</SPAN
+>,
+matching the Linux data structure <SPAN
+CLASS="STRUCTNAME"
+>sigset_t</SPAN
+>.
+ </P
+><P
+>In most cases the functions provided by the synthetic target behave as
+per the documentation for the Linux system calls, and section 2 of the
+Linux man pages can be consulted for more information. There is one
+important difference: typically the documentation will say that a
+function returns <TT
+CLASS="LITERAL"
+>-1</TT
+> to indicate an error, with the
+actual error code held in <TT
+CLASS="VARNAME"
+>errno</TT
+>; the actual
+underlying system call and hence the
+<TT
+CLASS="FUNCTION"
+>cyg_hal_sys_xyz</TT
+> provided by eCos instead returns
+a negative number to indicate an error, with the absolute value of
+that number corresponding to the error code; usually it is the C
+library which handles this and manipulates errno, but of course
+synthetic target applications are not linked with that Linux library.
+ </P
+><P
+>However, there are some exceptions. The Linux kernel has evolved over
+the years, and some of the original system call interfaces are no
+longer appropriate. For example the original
+<TT
+CLASS="FUNCTION"
+>select</TT
+> system call has been superseded by
+<TT
+CLASS="FUNCTION"
+>_newselect</TT
+>, and that is what the
+<TT
+CLASS="FUNCTION"
+>select</TT
+> function in the C library actually uses.
+The old call is still available to preserve binary compatibility but,
+like the C library, eCos makes use of the new one because it provides
+the appropriate functionality. In an attempt to reduce confusion the
+eCos function is called <TT
+CLASS="FUNCTION"
+>cyg_hal_sys__newselect</TT
+>,
+in other words it matches the official system call naming scheme. The
+authoritive source of information on such matters is the Linux kernel
+sources themselves, and especially its header files.
+ </P
+><P
+>eCos packages and applications should never
+<TT
+CLASS="LITERAL"
+>#include</TT
+> Linux header files directly. For example,
+doing a <TT
+CLASS="LITERAL"
+>#include&nbsp;&lt;/usr/include/fcntl.h&gt;</TT
+>
+to access additional macros or structure definitions, or alternatively
+manipulating the header file search path, will lead to problems
+because the Linux header files are likely to duplicate and clash with
+definitions in the eCos headers. Instead the appropriate functionality
+should be extracted from the Linux headers and moved into either
+<TT
+CLASS="FILENAME"
+>cyg/hal/hal_io.h</TT
+> or into
+application code, with suitable renaming to avoid clashes with eCos
+names. Users should be aware that large-scale copying may involve
+licensing complications.
+ </P
+><P
+>Adding more system calls is usually straightforward and involves
+adding one or more lines to the platform-specific file in the
+appropriate platform HAL, for example
+<TT
+CLASS="FILENAME"
+>syscall-i386-linux-1.0.S</TT
+>. However it is necessary
+to do some research first about the exact interface implemented by the
+system call, because of issues such as old system calls that have been
+superseded. The required information can usually be found fairly
+easily by searching through the Linux kernel sources and possibly the
+GNU C library sources.
+ </P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+SUMMARY="Footer navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="synth-console.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="hal-synth-arch.html"
+ACCESSKEY="H"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="synth-new-target.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>The Console Device</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Writing New Devices - target</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/synth.html b/cesar/ecos/packages/hal/synth/arch/current/doc/synth.html
new file mode 100644
index 0000000000..260b94d483
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/synth.html
@@ -0,0 +1,372 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Overview</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
+"><LINK
+REL="HOME"
+TITLE="eCos Synthetic Target"
+HREF="hal-synth-arch.html"><LINK
+REL="PREVIOUS"
+TITLE="eCos Synthetic Target"
+HREF="hal-synth-arch.html"><LINK
+REL="NEXT"
+TITLE="Installation"
+HREF="synth-install.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+SUMMARY="Header navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos Synthetic Target</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="hal-synth-arch.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="synth-install.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="SYNTH">Overview</H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN6"
+></A
+><H2
+>Name</H2
+>The eCos synthetic target&nbsp;--&nbsp;Overview</DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="SYNTH-DESCRIPTION"
+></A
+><H2
+>Description</H2
+><P
+>Usually eCos runs on either a custom piece of hardware, specially
+designed to meet the needs of a specific application, or on a
+development board of some sort that is available before the final
+hardware. Such boards have a number of things in common:
+ </P
+><P
+></P
+><OL
+TYPE="1"
+><LI
+><P
+>Obviously there has to be at least one processor to do the work. Often
+this will be a 32-bit processor, but it can be smaller or larger.
+Processor speed will vary widely, depending on the expected needs of
+the application. However the exact processor being used tends not to
+matter very much for most of the development process: the use of
+languages such as C or C++ means that the compiler will handle those
+details.
+ </P
+></LI
+><LI
+><P
+>There needs to be memory for code and for data. A typical system will
+have two different types of memory. There will be some non-volatile
+memory such as flash, EPROM or masked ROM. There will also be some
+volatile memory such as DRAM or SRAM. Often the code for the final
+application will reside in the non-volatile memory and all of the RAM
+will be available for data. However updating non-volatile memory
+requires a non-trivial amount of effort, so for much of the
+development process it is more convenient to burn suitable firmware,
+for example RedBoot, into the non-volatile memory and then use that to
+load the application being debugged into RAM, alongside the
+application data and a small area reserved for use by the firmware.
+ </P
+></LI
+><LI
+><P
+>The platform must provide certain mimimal I/O facilities. Most eCos
+configurations require a clock signal of some sort. There must also be
+some way of outputting diagnostics to the user, often but not always
+via a serial port. Unless special debug hardware is being used, source
+level debugging will require bidirectional communication between a
+host machine and the target hardware, usually via a serial port or an
+ethernet device.
+ </P
+></LI
+><LI
+><P
+>All the above is not actually very useful yet because there is no way
+for the embedded device to interact with the rest of the world, except
+by generating diagnostics. Therefore an embedded device will have
+additional I/O hardware. This may be fairly standard hardware such as
+an ethernet or USB interface, or special hardware designed
+specifically for the intended application, or quite often some
+combination. Standard hardware such as ethernet or USB may be
+supported by eCos device drivers and protocol stacks, whereas the
+special hardware will be driven directly by application code.
+ </P
+></LI
+></OL
+><P
+>Much of the above can be emulated on a typical PC running Linux.
+Instead of running the embedded application being developed on a
+target board of some sort, it can be run as a Linux process. The
+processor will be the PC's own processor, for example an x86, and the
+memory will be the process' address space. Some I/O facilities can be
+emulated directly through system calls. For example clock hardware can
+be emulated by setting up a <TT
+CLASS="LITERAL"
+>SIGALRM</TT
+> signal, which
+will cause the process to be interrupted at regular intervals. This
+emulation of real hardware will not be particularly accurate, the
+number of cpu cycles available to the eCos application between clock
+ticks will vary widely depending on what else is running on the PC,
+but for much development work it will be good enough.
+ </P
+><P
+>Other I/O facilities are provided through an I/O auxiliary process,
+ecosynth, that gets spawned by the eCos application during startup.
+When an eCos device driver wants to perform some I/O operation, for
+example send out an ethernet packet, it sends a request to the I/O
+auxiliary. That is an ordinary Linux application so it has ready
+access to all normal Linux I/O facilities. To emulate a device
+interrupt the I/O auxiliary can raise a <TT
+CLASS="LITERAL"
+>SIGIO</TT
+>
+signal within the eCos application. The HAL's interrupt subsystem
+installs a signal handler for this, which will then invoke the
+standard eCos ISR/DSR mechanisms. The I/O auxiliary is based around
+Tcl scripting, making it easy to extend and customize. It should be
+possible to configure the synthetic target so that its I/O
+functionality is similar to what will be available on the final target
+hardware for the application being developed.
+ </P
+><DIV
+CLASS="INFORMALFIGURE"
+><A
+NAME="AEN25"><P
+></P
+><DIV
+CLASS="MEDIAOBJECT"
+><P
+><IMG
+SRC="overview.gif"
+ALIGN="CENTER"></P
+></DIV
+><P
+></P
+></DIV
+><P
+>A key requirement for synthetic target code is that the embedded
+application must not be linked with any of the standard Linux
+libraries such as the GNU C library: that would lead to a confusing
+situation where both eCos and the Linux libraries attempted to provide
+functions such as <TT
+CLASS="FUNCTION"
+>printf</TT
+>. Instead the synthetic
+target support must be implemented directly on top of the Linux
+kernels' system call interface. For example, the kernel provides a
+system call for write operations. The actual function
+<TT
+CLASS="FUNCTION"
+>write</TT
+> is implemented in the system's C library,
+but all it does is move its arguments on to the stack or into certain
+registers and then execute a special trap instruction such as
+<TT
+CLASS="LITERAL"
+>int&nbsp;0x80</TT
+>. When this instruction is executed
+control transfers into the kernel, which will validate the arguments
+and perform the appropriate operation. Now, a synthetic target
+application cannot be linked with the system's C library. Instead it
+contains a function <TT
+CLASS="FUNCTION"
+>cyg_hal_sys_write</TT
+> which, like
+the C library's <TT
+CLASS="FUNCTION"
+>write</TT
+> function, pushes its
+arguments on to the stack and executes the trap instruction. The Linux
+kernel cannot tell the difference, so it will perform the I/O
+operation requested by the synthetic target. With appropriate
+knowledge of what system calls are available, this makes it possible
+to emulate the required I/O facilities. For example, spawning the
+ecosynth I/O auxiliary involves system calls
+<TT
+CLASS="FUNCTION"
+>cyg_hal_sys_fork</TT
+> and
+<TT
+CLASS="FUNCTION"
+>cyg_hal_sys_execve</TT
+>, and sending a request to the
+auxiliary uses <TT
+CLASS="FUNCTION"
+>cyg_hal_sys_write</TT
+>.
+ </P
+><P
+>In many ways developing for the synthetic target is no different from
+developing for real embedded targets. eCos must be configured
+appropriately: selecting a suitable target such as
+<TT
+CLASS="USERINPUT"
+><B
+>i386linux</B
+></TT
+> will cause the configuration system
+to load the appropriate packages for this hardware; this includes an
+architectural HAL package and a platform-specific package; the
+architectural package contains generic code applicable to all Linux
+platforms, whereas the platform package is for specific Linux
+implementations such as the x86 version and contains any
+processor-specific code. Selecting this target will also bring in some
+device driver packages. Other aspects of the configuration such as
+which API's are supported are determined by the template, by adding
+and removing packages, and by fine-grained configuration.
+ </P
+><P
+>In other ways developing for the synthetic target can be much easier
+than developing for a real embedded target. For example there is no
+need to worry about building and installing suitable firmware on the
+target hardware, and then downloading and debugging the actual
+application over a serial line or a similar connection. Instead an
+eCos application built for the synthetic target is mostly
+indistinguishable from an ordinary Linux program. It can be run simply
+by typing the name of the executable file at a shell prompt.
+Alternatively you can debug the application using whichever version of
+gdb is provided by your Linux distribution. There is no need to build
+or install special toolchains. Essentially using the synthetic target
+means that the various problems associated with real embedded hardware
+can be bypassed for much of the development process.
+ </P
+><P
+>The eCos synthetic target provides emulation, not simulation. It is
+possible to run eCos in suitable architectural simulators but that
+involves a rather different approach to software development. For
+example, when running eCos on the psim PowerPC simulator you need
+appropriate cross-compilation tools that allow you to build PowerPC
+executables. These are then loaded into the simulator which interprets
+every instruction and attempts to simulate what would happen if the
+application were running on real hardware. This involves a lot of
+processing overhead, but depending on the functionality provided by
+the simulator it can give very accurate results. When developing for
+the synthetic target the executable is compiled for the PC's own
+processor and will be executed at full speed, with no need for a
+simulator or special tools. This will be much faster and somewhat
+simpler than using an architectural simulator, but no attempt is made
+to accurately match the behaviour of a real embedded target.
+ </P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+SUMMARY="Footer navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="hal-synth-arch.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="hal-synth-arch.html"
+ACCESSKEY="H"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="synth-install.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>eCos Synthetic Target</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Installation</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/hal/synth/arch/current/doc/synth.sgml b/cesar/ecos/packages/hal/synth/arch/current/doc/synth.sgml
new file mode 100644
index 0000000000..6409086181
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/doc/synth.sgml
@@ -0,0 +1,2747 @@
+<!-- DOCTYPE part PUBLIC "-//OASIS//DTD DocBook V3.1//EN" -->
+
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- synth.sgml -->
+<!-- -->
+<!-- Synthetic target architectural documentation. -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 2002 Bart Veer. -->
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- Author(s): bartv -->
+<!-- Contact(s): bartv -->
+<!-- Date: 2002/02/24 -->
+<!-- Version: 0.01 -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part id="hal-synth-arch"><title>eCos Synthetic Target</title>
+
+<!-- {{{ Overview -->
+
+<refentry id="synth">
+ <refmeta>
+ <refentrytitle>Overview</refentrytitle>
+ </refmeta>
+ <refnamediv>
+ <refname>The eCos synthetic target</refname>
+ <refpurpose>Overview</refpurpose>
+ </refnamediv>
+
+ <refsect1 id="synth-description"><title>Description</title>
+ <para>
+Usually eCos runs on either a custom piece of hardware, specially
+designed to meet the needs of a specific application, or on a
+development board of some sort that is available before the final
+hardware. Such boards have a number of things in common:
+ </para>
+ <orderedlist>
+ <listitem><para>
+Obviously there has to be at least one processor to do the work. Often
+this will be a 32-bit processor, but it can be smaller or larger.
+Processor speed will vary widely, depending on the expected needs of
+the application. However the exact processor being used tends not to
+matter very much for most of the development process: the use of
+languages such as C or C++ means that the compiler will handle those
+details.
+ </para></listitem>
+ <listitem><para>
+There needs to be memory for code and for data. A typical system will
+have two different types of memory. There will be some non-volatile
+memory such as flash, EPROM or masked ROM. There will also be some
+volatile memory such as DRAM or SRAM. Often the code for the final
+application will reside in the non-volatile memory and all of the RAM
+will be available for data. However updating non-volatile memory
+requires a non-trivial amount of effort, so for much of the
+development process it is more convenient to burn suitable firmware,
+for example RedBoot, into the non-volatile memory and then use that to
+load the application being debugged into RAM, alongside the
+application data and a small area reserved for use by the firmware.
+ </para></listitem>
+ <listitem><para>
+The platform must provide certain mimimal I/O facilities. Most eCos
+configurations require a clock signal of some sort. There must also be
+some way of outputting diagnostics to the user, often but not always
+via a serial port. Unless special debug hardware is being used, source
+level debugging will require bidirectional communication between a
+host machine and the target hardware, usually via a serial port or an
+ethernet device.
+ </para></listitem>
+ <listitem><para>
+All the above is not actually very useful yet because there is no way
+for the embedded device to interact with the rest of the world, except
+by generating diagnostics. Therefore an embedded device will have
+additional I/O hardware. This may be fairly standard hardware such as
+an ethernet or USB interface, or special hardware designed
+specifically for the intended application, or quite often some
+combination. Standard hardware such as ethernet or USB may be
+supported by eCos device drivers and protocol stacks, whereas the
+special hardware will be driven directly by application code.
+ </para></listitem>
+ </orderedlist>
+ <para>
+Much of the above can be emulated on a typical PC running Linux.
+Instead of running the embedded application being developed on a
+target board of some sort, it can be run as a Linux process. The
+processor will be the PC's own processor, for example an x86, and the
+memory will be the process' address space. Some I/O facilities can be
+emulated directly through system calls. For example clock hardware can
+be emulated by setting up a <literal>SIGALRM</literal> signal, which
+will cause the process to be interrupted at regular intervals. This
+emulation of real hardware will not be particularly accurate, the
+number of cpu cycles available to the eCos application between clock
+ticks will vary widely depending on what else is running on the PC,
+but for much development work it will be good enough.
+ </para>
+ <para>
+Other I/O facilities are provided through an I/O auxiliary process,
+ecosynth, that gets spawned by the eCos application during startup.
+When an eCos device driver wants to perform some I/O operation, for
+example send out an ethernet packet, it sends a request to the I/O
+auxiliary. That is an ordinary Linux application so it has ready
+access to all normal Linux I/O facilities. To emulate a device
+interrupt the I/O auxiliary can raise a <literal>SIGIO</literal>
+signal within the eCos application. The HAL's interrupt subsystem
+installs a signal handler for this, which will then invoke the
+standard eCos ISR/DSR mechanisms. The I/O auxiliary is based around
+Tcl scripting, making it easy to extend and customize. It should be
+possible to configure the synthetic target so that its I/O
+functionality is similar to what will be available on the final target
+hardware for the application being developed.
+ </para>
+ <informalfigure PgWide=1>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="synth-io-overview.png" Scalefit=1 Align="Center">
+ </imageobject>
+ </mediaobject>
+ </informalfigure>
+ <para>
+A key requirement for synthetic target code is that the embedded
+application must not be linked with any of the standard Linux
+libraries such as the GNU C library: that would lead to a confusing
+situation where both eCos and the Linux libraries attempted to provide
+functions such as <function>printf</function>. Instead the synthetic
+target support must be implemented directly on top of the Linux
+kernels' system call interface. For example, the kernel provides a
+system call for write operations. The actual function
+<function>write</function> is implemented in the system's C library,
+but all it does is move its arguments on to the stack or into certain
+registers and then execute a special trap instruction such as
+<literal>int&nbsp;0x80</literal>. When this instruction is executed
+control transfers into the kernel, which will validate the arguments
+and perform the appropriate operation. Now, a synthetic target
+application cannot be linked with the system's C library. Instead it
+contains a function <function>cyg_hal_sys_write</function> which, like
+the C library's <function>write</function> function, pushes its
+arguments on to the stack and executes the trap instruction. The Linux
+kernel cannot tell the difference, so it will perform the I/O
+operation requested by the synthetic target. With appropriate
+knowledge of what system calls are available, this makes it possible
+to emulate the required I/O facilities. For example, spawning the
+ecosynth I/O auxiliary involves system calls
+<function>cyg_hal_sys_fork</function> and
+<function>cyg_hal_sys_execve</function>, and sending a request to the
+auxiliary uses <function>cyg_hal_sys_write</function>.
+ </para>
+ <para>
+In many ways developing for the synthetic target is no different from
+developing for real embedded targets. eCos must be configured
+appropriately: selecting a suitable target such as
+<userinput>i386linux</userinput> will cause the configuration system
+to load the appropriate packages for this hardware; this includes an
+architectural HAL package and a platform-specific package; the
+architectural package contains generic code applicable to all Linux
+platforms, whereas the platform package is for specific Linux
+implementations such as the x86 version and contains any
+processor-specific code. Selecting this target will also bring in some
+device driver packages. Other aspects of the configuration such as
+which API's are supported are determined by the template, by adding
+and removing packages, and by fine-grained configuration.
+ </para>
+ <para>
+In other ways developing for the synthetic target can be much easier
+than developing for a real embedded target. For example there is no
+need to worry about building and installing suitable firmware on the
+target hardware, and then downloading and debugging the actual
+application over a serial line or a similar connection. Instead an
+eCos application built for the synthetic target is mostly
+indistinguishable from an ordinary Linux program. It can be run simply
+by typing the name of the executable file at a shell prompt.
+Alternatively you can debug the application using whichever version of
+gdb is provided by your Linux distribution. There is no need to build
+or install special toolchains. Essentially using the synthetic target
+means that the various problems associated with real embedded hardware
+can be bypassed for much of the development process.
+ </para>
+ <para>
+The eCos synthetic target provides emulation, not simulation. It is
+possible to run eCos in suitable architectural simulators but that
+involves a rather different approach to software development. For
+example, when running eCos on the psim PowerPC simulator you need
+appropriate cross-compilation tools that allow you to build PowerPC
+executables. These are then loaded into the simulator which interprets
+every instruction and attempts to simulate what would happen if the
+application were running on real hardware. This involves a lot of
+processing overhead, but depending on the functionality provided by
+the simulator it can give very accurate results. When developing for
+the synthetic target the executable is compiled for the PC's own
+processor and will be executed at full speed, with no need for a
+simulator or special tools. This will be much faster and somewhat
+simpler than using an architectural simulator, but no attempt is made
+to accurately match the behaviour of a real embedded target.
+ </para>
+ </refsect1>
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ Installation -->
+
+<refentry id="synth-install">
+ <refmeta>
+ <refentrytitle>Installation</refentrytitle>
+ </refmeta>
+ <refnamediv>
+ <refname>Installation</refname>
+ <refpurpose>Preparing to use the synthetic target</refpurpose>
+ </refnamediv>
+
+ <refsect1 id="synth-install-host"><title>Host-side Software</title>
+ <para>
+To get the full functionality of the synthetic target, users must
+build and install the I/O auxiliary ecosynth and various support
+files. It is possible to develop applications for the synthetic target
+without the auxiliary, but only limited I/O facilities will be
+available. The relevant code resides in the <filename
+class="directory">host</filename> subdirectory of the synthetic target
+architectural HAL package, and building it involves the standard
+<command>configure</command>, <command>make</command>, and
+<command>make install</command> steps.
+ </para>
+ <para>
+There are two main ways of building the host-side software. It is
+possible to build both the generic host-side software and all
+package-specific host-side software, including the I/O auxiliary. in a
+single build tree. This involves using the
+<command>configure</command> script at the toplevel of the eCos
+repository, which will automatically search the <filename
+class="directory">packages</filename> hierarchy for host-side
+software. For more information on this, see the
+<filename>README.host</filename> file at the top of the repository.
+Note that if you have an existing build tree which does not include
+the synthetic target architectural HAL package then it will be
+necessary to rerun the toplevel configure script: the search for
+appropriate packages happens at configure time.
+ </para>
+ <para>
+The alternative is to build just the host-side for this package.
+This involves creating a suitable build directory and running the
+<command>configure</command> script. Note that building directly in
+the source tree is not allowed.
+ </para>
+ <screen>
+$ cd &lt;somewhere suitable&gt;
+$ mkdir synth_build
+$ cd synth_build
+$ &lt;repo&lt;&gt;/packages/hal/synth/arch/&lt;version&gt;/host/configure &lt;options&gt;
+$ make
+$ make install
+</screen>
+ <para>
+The code makes extensive use of Tcl/TK and requires version 8.3 or
+later. This is checked by the <command>configure</command> script. By
+default it will use the system's Tcl installation in <filename
+class="directory">/usr</filename>. If a different, more recent Tcl
+installation should be used then its location can be specified using
+the options <option>--with-tcl=&lt;path&gt;</option>,
+<option>--with-tcl-header=&lt;path&gt;</option> and
+<option>--with-tcl-lib=&lt;path&gt;</option>. For more information on these options
+see the <filename>README.host</filename> file at the toplevel of the
+eCos repository.
+ </para>
+ <para>
+Some users may also want to specify the install location using a
+<option>--prefix=&lt;path&gt;</option> option. The default install
+location is <filename class="directory">/usr/local</filename>. It is
+essential that the <filename class="directory">bin</filename>
+subdirectory of the install location is on the user's search
+<envar>PATH</envar>, otherwise the eCos application will be unable to
+locate and execute the I/O auxiliary ecosynth.
+ </para>
+ <para>
+Because ecosynth is run automatically by an eCos application rather
+than explicitly by the user, it is not installed in the <filename
+class="directory">bin</filename> subdirectory itself. Instead it is
+installed below <filename class="directory">libexec</filename>,
+together with various support files such as images. At configure time
+it is usually possible to specify an alternative location for
+<filename class="directory">libexec</filename> using
+<option>--exec-prefix=&lt;path&gt;</option> or
+<option>--libexecdir=&lt;path&gt;</option>. These options should not
+be used for this package because the eCos application is built
+completely separately and does not know how the host-side was
+configured.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-tools"><title>Toolchain</title>
+ <para>
+When developing eCos applications for a normal embedded target it is
+necessary to use a suitable cross-compiler and related tools such as
+the linker. Developing for the synthetic target is easier because you
+can just use the standard GNU tools (gcc, g++, ld, &hellip;) which
+were provided with your Linux distribution, or which you used to build
+your own Linux setup. Any reasonably recent version of the tools, for
+example gcc 2.96(Red Hat) as shipped with Red Hat Linux 7, should be
+sufficient.
+ </para>
+ <para>
+There is one important limitation when using these tools: current gdb
+will not support debugging of eCos threads on the synthetic target. As
+far as gdb is concerned a synthetic target application is
+indistinguishable from a normal Linux application, so it assumes that
+any threads will be created by calls to the Linux
+<function>pthread_create</function> function provided by the C
+library. Obviously this is not the case since the application is never
+linked with that library. Therefore gdb never notices the eCos thread
+mechanisms and assumes the application is single-threaded. Fixing this
+is possible but would involve non-trivial changes to gdb.
+ </para>
+ <para>
+Theoretically it is possible to develop synthetic target applications
+on, for example, a PC running Windows and then run the resulting
+executables on another machine that runs Linux. This is rarely useful:
+if a Linux machine is available then usually that machine will also be
+used for building ecos and the application. However, if for some
+reason it is necessary or desirable to build on another machine then
+this requires a suitable cross-compiler and related tools. If the
+application will be running on a typical PC with an x86 processor then
+a suitable configure triplet would be
+<userinput>i686-pc-linux-gnu</userinput>. The installation
+instructions for the various GNU tools should be consulted for further
+information.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-hardware"><title>Hardware Preparation</title>
+ <para>
+Preparing a real embedded target for eCos development can be tricky.
+Often the first step is to install suitable firmware, usually RedBoot.
+This means creating and building a special configuration for eCos with
+the RedBoot template, then somehow updating the target's flash chips
+with the resulting RedBoot image. Typically it will also be necessary
+to get a working serial connection, and possibly set up ethernet as
+well. Although usually none of the individual steps are particularly
+complicated, there are plenty of ways in which things can go wrong and
+it can be hard to figure out what is actually happening. Of course
+some board manufacturers make life easier for their developers by
+shipping hardware with RedBoot preinstalled, but even then it is still
+necessary to set up communication between host and target.
+ </para>
+ <para>
+None of this is applicable to the synthetic target. Instead you can
+just build a normal eCos configuration, link your application with the
+resulting libraries, and you end up with an executable that you can
+run directly on your Linux machine or via gdb. A useful side effect of
+this is that application development can start before any real
+embedded hardware is actually available.
+ </para>
+ <para>
+Typically the memory map for a synthetic target application will be
+set up such that there is a read-only ROM region containing all the
+code and constant data, and a read-write RAM region for the data. The
+default locations and sizes of these regions depend on the specific
+platform being used for development. Note that the application always
+executes out of ROM: on a real embedded target much of the development
+would involve running RedBoot firmware there, with application code
+and data loaded into RAM; usually this would change for the final
+system; the firmware would be replaced by the eCos application itself,
+configured for ROM bootstrap, and it would perform the appropriate
+hardware initialization. Therefore the synthetic target actually
+emulates the behaviour of a final system, not of a development
+environment. In practice this is rarely significant, although having
+the code in read-only memory can help catch some problems in
+application code.
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ Running the application -->
+
+<refentry id="synth-running">
+ <refmeta>
+ <refentrytitle>Running a Synthetic Target Application</refentrytitle>
+ </refmeta>
+ <refnamediv>
+ <refname>Execution</refname>
+ <refpurpose>Arguments and configuration files</refpurpose>
+ </refnamediv>
+
+ <refsect1 id="synth-running-description"><title>Description</title>
+ <para>
+The procedure for configuring and building eCos and an application for
+the synthetic target is the same as for any other eCos target. Once an
+executable has been built it can be run like any Linux program, for
+example from a shell prompt,
+ </para>
+ <screen>
+$ ecos_hello &lt;options&gt;
+</screen>
+ <para>
+or using gdb:
+ </para>
+ <screen>
+$ gdb --nw --quiet --args ecos_hello &lt;options&gt;
+(gdb) run
+Starting program: ecos_hello &lt;options&gt;
+</screen>
+ <para>
+By default use of the I/O auxiliary is disabled. If its I/O facilities
+are required then the option <option>--io</option> must be used.
+ </para>
+ <note><para>
+In future the default behaviour may change, with the I/O auxiliary
+being started by default. The option <option>--nio</option> can be
+used to prevent the auxiliary from being run.
+ </para></note>
+ </refsect1>
+
+ <refsect1 id="synth-running-arguments"><title>Command-line Arguments</title>
+ <para>
+The syntax for running a synthetic target application is:
+ </para>
+ <screen>
+$ &lt;ecos_app&gt; [options] [-- [app_options]]
+</screen>
+ <para>
+Command line options up to the <option>--</option> are passed on to
+the I/O auxiliary. Subsequent arguments are not passed on to the
+auxiliary, and hence can be used by the eCos application itself. The
+full set of arguments can be accessed through the variables
+<varname>cyg_hal_sys_argc</varname> and
+<varname>cyg_hal_sys_argv</varname>.
+ </para>
+ <para>
+The following options are accepted as standard:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><option>--io</option></term>
+ <listitem><para>
+This option causes the eCos application to spawn the I/O auxiliary
+during HAL initialization. Without this option only limited I/O will
+be available.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>--nio</option></term>
+ <listitem><para>
+This option prevents the eCos application from spawning the I/O
+auxiliary. In the current version of the software this is the default.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-nw</option>, <option>--no-windows</option></term>
+ <listitem><para>
+The I/O auxiliary can either provide a graphical user interface, or it
+can run in a text-only mode. The default is to provide the graphical
+interface, but this can be disabled with <option>-nw</option>.
+Emulation of some devices, for example buttons connected to digital
+inputs, requires the graphical interface.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-w</option>, <option>--windows</option></term>
+ <listitem><para>
+The <option>-w</option> causes the I/O auxiliary to provide a
+graphical user interface. This is the default.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-v</option>, <option>--version</option></term>
+ <listitem><para>
+The <option>-v</option> option can be used to determine the version of
+the I/O auxiliary being used and where it has been installed. Both the
+auxiliary and the eCos application will exit immediately.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-h</option>, <option>--help</option></term>
+ <listitem><para>
+<option>-h</option> causes the I/O auxiliary to list all accepted
+command-line arguments. This happens after all devices have been
+initialized, since the host-side support for some of the devices may
+extend the list of recognised options. After this both the auxiliary
+and the eCos application will exit immediately. This option implies
+<option>-nw</option>.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-k</option>, <option>--keep-going</option></term>
+ <listitem><para>
+If an error occurs in the I/O auxiliary while reading in any of the
+configuration files or initializing devices, by default both the
+auxiliary and the eCos application will exit. The <option>-k</option>
+option can be used to make the auxiliary continue in spite of errors,
+although obviously it may not be fully functional.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-nr</option>, <option>--no-rc</option></term>
+ <listitem><para>
+Normally the auxiliary processes two <link
+linkend="synth-running-user-config">user configuration files</link>
+during startup: <filename>initrc.tcl</filename> and
+<filename>mainrc.tcl</filename>. This can be suppressed using the
+<option>-nr</option> option.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-x</option>, <option>--exit</option></term>
+ <listitem><para>
+When providing a graphical user interface the I/O auxiliary will
+normally continue running even after the eCos application has exited.
+This allows the user to take actions such as saving the current
+contents of the main text window. If run with <option>-x</option> then
+the auxiliary will exit as soon the application exits.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-nx</option>, <option>--no-exit</option></term>
+ <listitem><para>
+When the graphical user interface is disabled with
+<option>-nw</option> the I/O auxiliary will normally exit immediately
+when the eCos application exits. Without the graphical frontend there
+is usually no way for the user to interact directly with the
+auxiliary, so there is no point in continuing to run once the eCos
+application will no longer request any I/O operations. Specifying the
+<option>-nx</option> option causes the auxiliary to continue running
+even after the application has exited.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-V</option>, <option>--verbose</option></term>
+ <listitem><para>
+This option causes the I/O auxiliary to output some additional
+information, especially during initialization.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-l &lt;file&gt;</option>, <option>--logfile &lt;file&gt;</option></term>
+ <listitem><para>
+Much of the output of the eCos application and the I/O auxiliary is
+simple text, for example resulting from eCos
+<function>printf</function> or <function>diag_printf</function> calls.
+When running in graphical mode this output goes to a central text
+window, and can be saved to a file or edited via menus. The
+<option>-l</option> can be used to automatically generate an
+additional logfile containing all the text. If graphical
+mode is disabled then by default all the text just goes to the current
+standard output. Specifying <option>-l</option> causes most of the
+text to go into a logfile instead, although some messages such as
+errors generated by the auxiliary itself will still go to stdout as
+well.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-t &lt;file&gt;</option>, <option>--target &lt;file&gt;</option></term>
+ <listitem><para>
+During initialization the I/O auxiliary reads in a target definition
+file. This file holds information such as which Linux devices should
+be used to emulate the various eCos devices. The <option>-t</option>
+option can be used to specify which target definition should be used
+for the current run, defaulting to <filename>default.tdf</filename>.
+It is not necessary to include the <filename>.tdf</filename> suffix,
+this will be appended automatically if necessary.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-geometry &lt;geometry&gt;</option></term>
+ <listitem><para>
+This option can be used to control the size and position of the main
+window, as per X conventions.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+The I/O auxiliary loads support for the various devices dynamically
+and some devices may accept additional command line arguments. Details
+of these can be obtained using the <option>-h</option> option or by
+consulting the device-specific documentation. If an unrecognised
+command line argument is used then a warning will be issued.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-running-tdf"><title>The Target Definition File</title>
+ <para>
+The eCos application will want to access devices such as
+<varname>eth0</varname> or <varname>/dev/ser0</varname>. These need to
+be mapped on to Linux devices. For example some users may all traffic
+on the eCos <varname>/dev/ser0</varname> serial device to go via the
+Linux serial device <varname>/dev/ttyS1</varname>, while ethernet I/O
+for the eCos <varname>eth0</varname> device should be mapped to the
+Linux ethertap device <varname>tap3</varname>. Some devices may need
+additional configuration information, for example to limit the
+number of packets that should be buffered within the I/O auxiliary.
+The target definition file provides all this information.
+ </para>
+ <para>
+By default the I/O auxiliary will look for a file
+<filename>default.tdf</filename>. An alternative target definition can
+be specified on the command line using <option>-t</option>, for
+example:
+ </para>
+ <screen>
+$ bridge_app --io -t twineth
+</screen>
+ <para>
+A <filename>.tdf</filename> suffix will be appended automatically if
+necessary. If a relative pathname is used then the I/O auxiliary will
+search for the target definition file in the current directory, then
+in <filename class="directory">~/.ecos/synth/</filename>, and finally
+in its install location.
+ </para>
+ <para>
+A typical target definition file might look like this:
+ </para>
+ <programlisting>
+synth_device console {
+ # appearance -foreground white -background black
+ filter trace {^TRACE:.*} -foreground HotPink1 -hide 1
+}
+
+synth_device ethernet {
+ eth0 real eth1
+ eth1 ethertap tap4 00:01:02:03:FE:06
+
+ ## Maximum number of packets that should be buffered per interface.
+ ## Default 16
+ #max_buffer 32
+
+ ## Filters for the various recognised protocols.
+ ## By default all filters are visible and use standard colours.
+ filter ether -hide 0
+ #filter arp -hide 1
+ #filter ipv4 -hide 1
+ #filter ipv6 -hide 1
+}
+</programlisting>
+ <para>
+A target definition file is actually a Tcl script that gets run in the
+main interpreter of the I/O auxiliary during initialization. This
+provides a lot of flexibility if necessary. For example the script
+could open a socket to a resource management server of some sort to
+determine which hardware facilities are already in use and adapt
+accordingly. Another possibility is to adapt based on <link
+linkend="synth-new-host-args">command line arguments</link>. Users who
+are not familiar with Tcl programming should still be able to edit a
+simple target definition file without too much difficulty, using a
+mixture of cut'n'paste, commenting or uncommenting various lines, and
+making small edits such as changing <literal>tap4</literal> to
+<literal>eth2</literal>.
+ </para>
+ <para>
+Each type of device will have its own entry in the target definition
+file, taking the form:
+ </para>
+ <programlisting>
+synth_device &lt;device type&gt; {
+ &lt;options&gt;
+}
+</programlisting>
+ <para>
+The documentaton for each synthetic target device should provide
+details of the options available for that device, and often a suitable
+fragment that can be pasted into a target definition file and edited.
+There is no specific set of options that a given device will always
+provide. However in practice many devices will use common code
+exported by the main I/O auxiliary, or their implementation will
+involve some re-use of code for an existing device. Hence certain
+types of option are common to many devices.
+ </para>
+ <para>
+A good example of this is filters, which control the appearance of
+text output. The above target definition file defines a filter
+<varname>trace</varname> for output from the eCos application. The
+regular expression will match output from the infrastructure package's
+tracing facilities when <varname>CYGDBG_USE_TRACING</varname> and
+<varname>CYGDBG_INFRA_DEBUG_TRACE_ASSERT_SIMPLE</varname> are enabled.
+With the current settings this output will not be visible by default,
+but can be made visible using the menu item <guimenuitem>System
+Filters</guimenuitem>. If made visible the trace output will appear in
+an unusual colour, so users can easily distinguish the trace output
+from other text. All filters accept the following options:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><option>-hide [0|1]</option></term>
+ <listitem><para>
+This controls whether or not text matching this filter should be
+invisible by default or not. At run-time the visibility of each filter
+can be controlled using the <guimenuitem>System Filters</guimenuitem>
+menu item.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-foreground &lt;colour&gt;</option></term>
+ <listitem><para>
+This specifies the foreground colour for all text matching this
+filter. The colour can be specified using an RGB value such as
+<literal>#F08010</literal>, or a symbolic name such as
+<literal>"light steel blue"</literal>. The X11 utility
+<application>showrgb</application> can be used to find out
+about the available colours.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-background &lt;colour&gt;</option></term>
+ <listitem><para>
+This specifies the background colour for all text matching the filter.
+As with <option>-foreground</option> the colour can be specified using
+a symbolic name or an RGB value.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+Some devices may create their own subwindows, for example to monitor
+ethernet traffic or to provide additional I/O facilities such as
+emulated LED's or buttons. Usually the target definition file can be
+used to control the <link linkend="synth-gui-layout">layout</link> of
+these windows.
+ </para>
+ <para>
+The I/O auxiliary will not normally warn about
+<command>synth_device</command> entries in the target definition file
+for devices that are not actually needed by the current eCos
+application. This makes it easier to use a single file for several
+different applications. However it can lead to confusion if an entry
+is spelled incorrectly and hence does not actually get used. The
+<option>-V</option> command line option can be used to get warnings
+about unused device entries in the target definition file.
+ </para>
+ <para>
+If the body of a <command>synth_device</command> command contains an
+unrecognised option and the relevant device is in use, the I/O
+auxiliary will always issue a warning about such options.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-running-user-config"><title>User Configuration Files</title>
+ <para>
+During initialization the I/O auxiliary will execute two user
+configuration files, <filename>initrc.tcl</filename> and
+<filename>mainrc.tcl</filename>. It will look for these files in the
+directory <filename class="directory">~/.ecos/synth/</filename>. If
+that directory does not yet exist it will be created and populated
+with initial dummy files.
+ </para>
+ <para>
+Both of these configuration files are Tcl scripts and will be run in
+the main interpreter used by the I/O auxiliary itself. This means that
+they have full access to the internals of the auxiliary including the
+various Tk widgets, and they can perform file or socket I/O if
+desired. The section <xref linkend="synth-new-host"> contains
+information about the facilities available on the host-side for
+writing new device drivers, and these can also be used in the
+initialization scripts.
+ </para>
+ <para>
+The <filename>initrc.tcl</filename> script is run before the auxiliary
+has processed any requests from the eCos application, and hence before
+any devices have been instantiated. At this point the generic
+command-line arguments has been processed, the target definition file
+has been read in, and the hooks functionality has been initialized. If
+running in graphical mode the main window will have been created, but
+has been withdrawn from the screen to allow new widgets to be added
+without annoying screen flicker. A typical
+<filename>initrc.tcl</filename> script could add some menu or toolbar
+options, or install a hook function that will be run when the
+eCos application exits.
+ </para>
+ <para>
+The <filename>mainrc.tcl</filename> script is run after eCos has
+performed all its device initialization and after C++ static
+constructors have run, and just before the call to
+<function>cyg_start</function> which will end up transferring control
+to the application itself. A typical <filename>mainrc.tcl</filename>
+script could look at what interrupt vectors have been allocated to
+which devices and create a little monitor window that shows interrupt
+activity.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-running-session"><title>Session Information</title>
+ <para>
+When running in graphical mode, the I/O auxiliary will read in a file
+<filename>~/.ecos/synth/guisession</filename> containing session
+information. This file should not normally be edited manually, instead
+it gets updated automatically when the auxiliary exits. The purpose of
+this file is to hold configuration options that are manipulated via
+the graphical interface, for example which browser should be used to
+display online help.
+ </para>
+ <warning><para>
+GUI session functionality is not yet available in the current release.
+When that functionality is fully implemented it is possible that some
+target definition file options may be removed, to be replaced by
+graphical editing via a suitable preferences dialog, with the
+current settings saved in the session file.
+ </para></warning>
+ </refsect1>
+
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ ecosynth user interface -->
+
+<refentry id="synth-gui">
+ <refmeta>
+ <refentrytitle>The I/O Auxiliary's User Interface</refentrytitle>
+ </refmeta>
+ <refnamediv>
+ <refname>User Interface</refname>
+ <refpurpose>Controlling the I/O Auxiliary</refpurpose>
+ </refnamediv>
+
+ <refsect1 id="synth-gui-description"><title>Description</title>
+ <para>
+The synthetic target auxiliary is designed to support both extensions
+and user customization. Support for the desired devices is dynamically
+loaded, and each device can extend the user interface. For example it
+is possible for a device to add menu options, place new buttons on the
+toolbar, create its own sub-window within the overall layout, or even
+create entire new toplevel windows. These subwindows or toplevels
+could show graphs of activity such as interrupts or packets being
+transferred. They could also allow users to interact with the eCos
+application, for example by showing a number of buttons which will be
+mapped on to digital inputs in the eCos application. Different
+applications will have their own I/O requirements, changing the
+host-side support files that get loaded and that may modify the user
+interface. The I/O auxiliary also reads in user configuration scripts
+which can enhance the interface in the same way. Therefore the exact
+user interface will depend on the user and on the eCos application
+being run. However the overall layout is likely to remain the same.
+ </para>
+ <informalfigure PgWide=1>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="screen_main.png" Scalefit=1 Align="Center">
+ </imageobject>
+ </mediaobject>
+ </informalfigure>
+ <para>
+The title bar identifies the window as belonging to an eCos synthetic
+target application and lists both the application name and its process
+id. The latter is especially useful if the application was started
+directly from a shell prompt and the user now wants to attach a gdb
+session. The window has a conventional menu bar with the usual
+entries, plus a toolbar with buttons for common operations such as cut
+and paste. Balloon help is supported.
+ </para>
+ <para>
+There is a central <link linkend="synth-gui-text">text window</link>,
+possibly surrounded by various sub-windows for various devices. For
+example there could be a row of emulated LED's above the text window,
+and monitors of ethernet traffic and interrupt activity on the right.
+At the bottom of the window is a status line, including a small
+animation that shows whether or not the eCos application is still
+running.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-gui-menus"><title>Menus and the Toolbar</title>
+ <para>
+Usually there will be four menus on the menu bar:
+<guimenu>File</guimenu>, <guimenu>Edit</guimenu>,
+<guimenu>View</guimenu> and <guimenu>Help</guimenu>.
+ </para>
+ <informalfigure PgWide=1>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="menu_file.png" Scalefit=1 Align="Center">
+ </imageobject>
+ </mediaobject>
+ </informalfigure>
+ <para>
+On the <guimenu>File</guimenu> menu there are three entries related to
+saving the current contents of the central text window.
+<guimenuitem>Save</guimenuitem> is used to save the currently visible
+contents of the text window. Any text that is hidden because of
+filters will not be written to the savefile. If there has been a
+previous <guimenuitem>Save</guimenuitem> or <guimenuitem>Save
+As</guimenuitem> operation then the existing savefile will be re-used,
+otherwise the user will be asked to select a suitable file.
+<guimenuitem>Save As</guimenuitem> also saves just the currently
+visible contents but will always prompt the user for a filename.
+<guimenuitem>Save All</guimenuitem> can be used to save the full
+contents of the text window, including any text that is currently
+hidden. It will always prompt for a new filename, to avoid confusion
+with partial savefiles.
+ </para>
+ <para>
+Usually the eCos application will be run from inside gdb or from a
+shell prompt. Killing off the application while it is being debugged
+in a gdb session is not a good idea, it would be better to use gdb's
+own <command>kill</command> command. Alternatively the eCos
+application itself can use the <function>CYG_TEST_EXIT</function> or
+<filename>cyg_hal_sys_exit</filename> functionality. However it is
+possible to terminate the application from the I/O auxiliary using
+<guimenuitem>Kill eCos</guimenuitem>. A clean shutdown will be
+attempted, but that can fail if the application is currently halted
+inside gdb or if it has crashed completely. As a last resort
+<constant>SIGKILL</constant> will be used.
+ </para>
+ <para>
+When operating in graphical mode the I/O auxiliary will normally
+continue to run even after the eCos application has exited. This
+allows the user to examine the last few lines of output, and perhaps
+perform actions such as saving the output to a file. The
+<guimenuitem>Exit</guimenuitem> menu item can be used to shut down the
+auxiliary. Note that this behaviour can be changed with command line
+arguments <link
+linkend="synth-running-arguments"><option>--exit</option></link> and
+<link
+linkend="synth-running-arguments"><option>--no-exit</option></link>.
+ </para>
+ <para>
+If <guimenuitem>Exit</guimenuitem> is used while the eCos application
+is still running then the I/O auxiliary will first attempt to
+terminate the application cleanly, and then exit.
+ </para>
+ <informalfigure PgWide=1>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="menu_edit.png" Scalefit=1 Align="Center">
+ </imageobject>
+ </mediaobject>
+ </informalfigure>
+ <para>
+The <guimenu>Edit</guimenu> menu contains the usual entries for
+text manipulation: <guimenuitem>Cut</guimenuitem>,
+<guimenuitem>Copy</guimenuitem>, <guimenuitem>Paste</guimenuitem>,
+<guimenuitem>Clear</guimenuitem> and <guimenuitem>Select
+All</guimenuitem>. These all operate on the central text window. By
+default this window cannot be edited so the cut, paste and clear
+operations are disabled. If the user wants to edit the contents of the
+text window then the <guimenuitem>Read Only</guimenuitem> checkbutton
+should be toggled.
+ </para>
+ <para>
+The <guimenuitem>Preferences</guimenuitem> menu item brings up a
+miscellaneous preferences dialog. One of the preferences relates to
+online help: the I/O auxiliary does not currently have a built-in html
+viewer; instead it will execute an external browser of some sort. With
+the example settings shown, the I/O auxiliary will first attempt to
+interact with an existing mozilla session. If that fails it will try
+to run a new mozilla instance, or as a last result use the Gnome help
+viewer.
+ </para>
+ <informalfigure PgWide=1>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="preferences.png" Scalefit=1 Align="Center">
+ </imageobject>
+ </mediaobject>
+ </informalfigure>
+ <para>
+The <guimenu>View</guimenu> menu contains the <guimenuitem>System
+Filters</guimenuitem> entry, used to edit the settings for the current
+<link linkend="synth-gui-text">filters</link>.
+ </para>
+ <informalfigure PgWide=1>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="menu_view.png" Scalefit=1 Align="Center">
+ </imageobject>
+ </mediaobject>
+ </informalfigure>
+ <para>
+The <guimenu>Help</guimenu> menu can be used to activate online help
+for eCos generally, for the synthetic target as a whole, and for
+specific devices supported by the generic target. The Preferences
+dialog can be used to select the browser that will be used.
+ </para>
+ <informalfigure PgWide=1>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="menu_help.png" Scalefit=1 Align="Center">
+ </imageobject>
+ </mediaobject>
+ </informalfigure>
+ <note><para>
+At the time of writing there is no well-defined toplevel index file
+for all eCos documentation. Hence the relevant menu item is disabled.
+Documentation for the synthetic target and the supported devices
+is stored as part of the package itself so can usually be found fairly
+easily. It may be necessary to set the <envar>ECOS_REPOSITORY</envar>
+environment variable.
+ </para></note>
+
+ </refsect1>
+
+ <refsect1 id="synth-gui-text"><title>The Main Text Window</title>
+ <para>
+The central text window holds the console output from the eCos
+application: the screen shot above shows DHCP initialization data from
+the TCP/IP stack, and some output from the <function>main</function>
+thread at the bottom. Some devices can insert text of their own, for
+example the ethernet device support can be configured to show details
+of incoming and outgoing packets. Mixing the output from the eCos
+application and the various devices can make it easier to understand
+the order in which events occur.
+ </para>
+ <para>
+The appearance of text from different sources can be controlled by
+means of filters, and it is also possible to hide some of the text.
+For example, if tracing is enabled in the eCos configuration then the
+trace output can be given its own colour scheme, making it stand out
+from the rest of the output. In addition the trace output is generally
+voluminous so it can be hidden by default, made visible only to find
+out more about what was happening when a particular problem occurred.
+Similarly the ethernet device support can output details of the
+various packets being transferred, and using a different background
+colour for this output again makes it easier to distinguish from
+console output.
+ </para>
+ <para>
+The default appearance for most filters is controlled via the
+<link linkend="synth-running-tdf">target definition file</link>. An
+example entry might be:
+ </para>
+ <programlisting>
+ filter trace {^TRACE:.*} -foreground HotPink1 -hide 1
+</programlisting>
+ <para>
+The various colours and the hide flag for each filter can be changed
+at run-time, using the <guimenuitem>System Filters</guimenuitem> item
+on the <guimenu>View</guimenu> menu. This will bring up a dialog like
+the following:
+ </para>
+ <informalfigure PgWide=1>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="filters.png" Scalefit=1 Align="Center">
+ </imageobject>
+ </mediaobject>
+ </informalfigure>
+ <para>
+It should be noted that the text window is line-oriented, not
+character-oriented. If an eCos application sends a partial line of
+text then that will remain buffered until a newline character is
+received, rather than being displayed immediately. This avoids
+confusion when there is concurrent output from several sources.
+ </para>
+ <para>
+By default the text window is read-only. This means it will not allow
+cut, paste and clear operations, and keyboard input will be ignored.
+The <guimenu>Edit</guimenu> menu has a checkbutton <guimenuitem>Read
+Only</guimenuitem> which can be toggled to allow write operations. For
+example, a user could type in a reminder of what was happening at this
+time, or paste in part of a gdb session. Such keyboard input does not
+get forwarded to the eCos application: if the latter requires keyboard
+input then that should happen via a separate keyboard device.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-gui-layout"><title>Positioning Optional Windows</title>
+ <para>
+Some devices may create their own subwindows, for example to monitor
+ethernet traffic or to provide additional I/O facilities such as
+emulated LED's or buttons. Usually the target definition file can be
+used to control the <link linkend="synth-gui-layout">layout</link> of
+these windows. This requires an understanding of the overall layout of
+the display.
+ </para>
+ <informalfigure PgWide=1>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="layout.png" Scalefit=1 Align="Center">
+ </imageobject>
+ </mediaobject>
+ </informalfigure>
+ <para>
+Subwindows are generally packed in one of eight frames surrounding the
+central text window: <varname>.main.nw</varname>,
+<varname>.main.n</varname>, <varname>.main.ne</varname>,
+<varname>.main.w</varname>, <varname>.main.e</varname>,
+<varname>.main.sw</varname>, <varname>.main.s</varname>, and
+<varname>.main.se</varname>. To position a row of LED's above the text
+window and towards the left, a target definition file could contain an
+entry such as:
+ </para>
+ <programlisting>
+synth_device led {
+ pack -in .main.n -side left
+ &hellip;
+}
+</programlisting>
+ <para>
+Similarly, to put a traffic monitor window on the right of the text
+window would involve something like:
+ </para>
+ <programlisting>
+ &hellip;
+ monitor_pack -in .main.e -side bottom
+ &hellip;
+</programlisting>
+ <para>
+Often it will be sufficient to specify a container frame and one of
+<constant>left</constant>, <constant>right</constant>,
+<constant>top</constant> or <constant>bottom</constant>. Full control
+over the positioning requires an understanding of Tcl/Tk and in
+particular the packing algorithm, and an appropriate reference work
+should be consulted.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-gui-global-config"><title>Global Settings</title>
+ <note><para>
+This section still to be written - it should document the interaction
+between X resources and ecosynth, and how users can control settings
+such as the main foreground and background colours.
+ </para></note>
+ </refsect1>
+
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ The console device -->
+
+<refentry id="synth-console">
+ <refmeta>
+ <refentrytitle>The Console Device</refentrytitle>
+ </refmeta>
+ <refnamediv>
+ <refname>The console device </refname>
+ <refpurpose>Show output from the eCos application</refpurpose>
+ </refnamediv>
+
+ <refsect1 id="synth-console-description"><title>Description</title>
+ <para>
+The eCos application can generate text output in a variety of ways,
+including calling <function>printf</function> or
+<function>diag_printf</function>. When the I/O auxiliary is enabled
+the eCos startup code will instantiate a console device to process all
+such output. If operating in text mode the output will simply go to
+standard output, or to a logfile if the <option>-l</option> command
+line option is specified. If operating in graphical mode the output
+will go to the central text window, and optionally to a logfile as
+well. In addition it is possible to control the appearance of the main
+text via the target definition file, and to install extra filters for
+certain types of text.
+ </para>
+ <para>
+It should be noted that the console device is line-oriented, not
+character-oriented. This means that outputting partial lines is not
+supported, and some functions such as <function>fflush</function> and
+<function>setvbuf</function> will not operate as expected. This
+limitation prevents much possible confusion when using filters to
+control the appearance of the text window, and has some performance
+benefits - especially when the eCos application generates a great deal
+of output such as when tracing is enabled. For most applications this
+is not a problem, but it is something that developers should be aware
+of.
+ </para>
+ <para>
+The console device is output-only, it does not provide any support for
+keyboard input. If the application requires keyboard input then that
+should be handled by a separate eCos device package and matching
+host-side code.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-console-install"><title>Installation</title>
+ <para>
+The eCos side of the console device is implemented by the
+architectural HAL itself, in the source file
+<filename>synth_diag.c</filename>, rather than in a separate device
+package. Similarly the host-side implementation,
+<function>console.tcl</function>, is part of the architectural HAL's
+host-side support. It gets installed automatically alongside the I/O
+auxiliary itself, so no separate installation procedure is required.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-console-tdf"><title>Target Definition File</title>
+ <para>
+The <link linkend="synth-running-tdf">target definition file</link>
+can contain a number of entries related to the console device. These
+are all optional, they only control the appearance of text output. If
+such control is desired then the relevant options should appear in the
+body of a <command>synth_device</command> entry:
+ </para>
+ <programlisting>
+synth_device console {
+ &hellip;
+}
+</programlisting>
+ <para>
+The first option is <command>appearance</command>, used to control the
+appearance of any text generated by the eCos application that does not
+match one of the installed filters. This option takes the same
+argument as any other filter, for example:
+ </para>
+ <programlisting>
+synth_device console {
+ appearance -foreground white -background black
+ &hellip;
+}
+</programlisting>
+ <para>
+Any number of additional filters can be created with a
+<command>filter</command> option, for example:
+ </para>
+ <programlisting>
+synth_device console {
+ &hellip;
+ filter trace {^TRACE:.*} -foreground HotPink1 -hide 1
+ &hellip;
+}
+</programlisting>
+ <para>
+The first argument gives the new filter a name which will be used in
+the <link linkend="synth-gui-text">filters dialog</link>. Filter names
+should be unique. The second argument is a Tcl regular expression. The
+console support will match each line of eCos output against this
+regular expression, and if a match is found then the filter will be
+used for this line of text. The above example matches any line of
+output that begins with <literal>TRACE:</literal>, which corresponds
+to the eCos infrastructure's tracing facilities. The remaining options
+control the desired appearance for matched text. If some eCos output
+matches the regular expressions for several different filters then
+only the first match will be used.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-console-target-config"><title>Target-side
+ Configuration Options</title>
+ <para>
+There are no target-side configuration options related to the console
+device.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-console-arguments"><title>Command Line Arguments</title>
+ <para>
+The console device does not use any command-line arguments.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-console-hooks"><title>Hooks</title>
+ <para>
+The console device does not provide any hooks.
+ </para>
+ </refsect1>
+
+ <refsect1><title>Additional Tcl Procedures</title>
+ <para>
+The console device does not provide any additional Tcl procedures that
+can be used by other scripts.
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ System calls -->
+
+<refentry id="synth-syscalls">
+ <refmeta>
+ <refentrytitle>System Calls</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_hal_sys_xyz</refname>
+ <refpurpose>Access Linux system facilities</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/hal/hal_io.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>int <function>cyg_hal_sys_xyzzy</function></funcdef>
+ <varargs>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="synth-syscalls-description"><title>Description</title>
+ <para>
+On a real embedded target eCos interacts with the hardware by peeking
+and poking various registers, manipulating special regions of memory,
+and so on. The synthetic target does not access hardware directly.
+Instead I/O and other operations are emulated by making appropriate
+Linux system calls. The HAL package exports a number of functions
+which allow other packages, or even application code, to make these
+same system calls. However this facility must be used with care: any
+code which calls, for example, <function>cyg_hal_sys_write</function>
+will only ever run on the synthetic target; that functionality is
+obviously not provided on any real hardware because there is no
+underlying Linux kernel to implement it.
+ </para>
+ <para>
+The synthetic target only provides a subset of the available system
+calls, specifically those calls which have proved useful to implement
+I/O emulation. This subset can be extended fairly easily if necessary.
+All of the available calls, plus associated data structures and
+macros, are defined in the header file <filename
+class="headerfile">cyg/hal/hal_io.h</filename>. There is a simple
+convention: given a Linux system call such as
+<function>open</function>, the synthetic target will prefix
+<literal>cyg_hal_sys</literal> and provide a function with that name.
+The second argument to the <function>open</function> system call is
+a set of flags such as <constant>O_RDONLY</constant>, and the header
+file will define a matching constant
+<constant>CYG_HAL_SYS_O_RDONLY</constant>. There are also data
+structures such as <structname>cyg_hal_sys_sigset_t</structname>,
+matching the Linux data structure <structname>sigset_t</structname>.
+ </para>
+ <para>
+In most cases the functions provided by the synthetic target behave as
+per the documentation for the Linux system calls, and section 2 of the
+Linux man pages can be consulted for more information. There is one
+important difference: typically the documentation will say that a
+function returns <literal>-1</literal> to indicate an error, with the
+actual error code held in <varname>errno</varname>; the actual
+underlying system call and hence the
+<function>cyg_hal_sys_xyz</function> provided by eCos instead returns
+a negative number to indicate an error, with the absolute value of
+that number corresponding to the error code; usually it is the C
+library which handles this and manipulates errno, but of course
+synthetic target applications are not linked with that Linux library.
+ </para>
+ <para>
+However, there are some exceptions. The Linux kernel has evolved over
+the years, and some of the original system call interfaces are no
+longer appropriate. For example the original
+<function>select</function> system call has been superseded by
+<function>_newselect</function>, and that is what the
+<function>select</function> function in the C library actually uses.
+The old call is still available to preserve binary compatibility but,
+like the C library, eCos makes use of the new one because it provides
+the appropriate functionality. In an attempt to reduce confusion the
+eCos function is called <function>cyg_hal_sys__newselect</function>,
+in other words it matches the official system call naming scheme. The
+authoritive source of information on such matters is the Linux kernel
+sources themselves, and especially its header files.
+ </para>
+ <para>
+eCos packages and applications should never
+<literal>#include</literal> Linux header files directly. For example,
+doing a <literal>#include&nbsp;&lt;/usr/include/fcntl.h&gt;</literal>
+to access additional macros or structure definitions, or alternatively
+manipulating the header file search path, will lead to problems
+because the Linux header files are likely to duplicate and clash with
+definitions in the eCos headers. Instead the appropriate functionality
+should be extracted from the Linux headers and moved into either
+<filename class="headerfile">cyg/hal/hal_io.h</filename> or into
+application code, with suitable renaming to avoid clashes with eCos
+names. Users should be aware that large-scale copying may involve
+licensing complications.
+ </para>
+ <para>
+Adding more system calls is usually straightforward and involves
+adding one or more lines to the platform-specific file in the
+appropriate platform HAL, for example
+<filename>syscall-i386-linux-1.0.S</filename>. However it is necessary
+to do some research first about the exact interface implemented by the
+system call, because of issues such as old system calls that have been
+superseded. The required information can usually be found fairly
+easily by searching through the Linux kernel sources and possibly the
+GNU C library sources.
+ </para>
+ </refsect1>
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ New devices - target-side -->
+
+<refentry id="synth-new-target">
+ <refmeta>
+ <refentrytitle>Writing New Devices - target</refentrytitle>
+ </refmeta>
+ <refnamediv>
+ <refname>Writing New Devices</refname>
+ <refpurpose>extending the synthetic target, target-side</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/hal/hal_io.h&gt;
+ </funcsynopsisinfo>
+
+ <funcprototype>
+ <funcdef>int <function>synth_auxiliary_instantiate</function></funcdef>
+ <paramdef>const char* <parameter>package</parameter></paramdef>
+ <paramdef>const char* <parameter>version</parameter></paramdef>
+ <paramdef>const char* <parameter>device</parameter></paramdef>
+ <paramdef>const char* <parameter>instance</parameter></paramdef>
+ <paramdef>const char* <parameter>data</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>synth_auxiliary_xchgmsg</function></funcdef>
+ <paramdef>int <parameter>device_id</parameter></paramdef>
+ <paramdef>int <parameter>request</parameter></paramdef>
+ <paramdef>int <parameter>arg1</parameter></paramdef>
+ <paramdef>int <parameter>arg2</parameter></paramdef>
+ <paramdef>const unsigned char* <parameter>txdata</parameter></paramdef>
+ <paramdef>int <parameter>txlen</parameter></paramdef>
+ <paramdef>int* <parameter>reply</parameter></paramdef>
+ <paramdef>unsigned char* <parameter>rxdata</parameter></paramdef>
+ <paramdef>int* <parameter>rxlen</parameter></paramdef>
+ <paramdef>int <parameter>max_rxlen</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="synth-new-target-description"><title>Description</title>
+ <para>
+In some ways writing a device driver for the synthetic target is very
+similar to writing one for a real target. Obviously it has to provide
+the standard interface for that class of device, so for example an
+ethernet device has to provide <function>can_send</function>,
+<function>send</function>, <function>recv</function> and similar
+functions. Many devices will involve interrupts, so the driver
+contains ISR and DSR functions and will call
+<function>cyg_drv_interrupt_create</function>,
+<function>cyg_drv_interrupt_acknowledge</function>, and related
+functions.
+ </para>
+ <para>
+In other ways writing a device driver for the synthetic target is very
+different. Usually the driver will not have any direct access to the
+underlying hardware. In fact for some devices the I/O may not involve
+real hardware, instead everything is emulated by widgets on the
+graphical display. Therefore the driver cannot just peek and poke
+device registers, instead it must interact with host-side code by
+exchanging message. The synthetic target HAL provides a function
+<function>synth_auxiliary_xchgmsg</function> for this purpose.
+ </para>
+ <para>
+Initialization of a synthetic target device driver is also very
+different. On real targets the device hardware already exists when the
+driver's initialization routine runs. On the synthetic target it is
+first necessary to instantiate the device inside the I/O auxiliary, by
+a call to <function>synth_auxiliary_instantiate</function>. That
+function performs a special message exchange with the I/O auxiliary,
+causing it to load a Tcl script for the desired type of device and run
+an instantiation procedure within that script.
+ </para>
+ <para>
+Use of the I/O auxiliary is optional: if the user does not specify
+<option>--io</option> on the command line then the auxiliary will not
+be started and hence most I/O operations will not be possible. Device
+drivers should allow for this possibility, for example by just
+discarding any data that gets written. The HAL exports a flag
+<varname>synth_auxiliary_running</varname> which should be checked.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-new-target-instantiate"><title>Instantiating a Device</title>
+ <para>
+Device instantiation should happen during the C++ prioritized static
+constructor phase of system initialization, before control switches to
+<function>cyg_user_start</function> and general application code. This
+ensures that there is a clearly defined point at which the I/O
+auxiliary knows that all required devices have been loaded. It can
+then perform various consistency checks and clean-ups, run the user's
+<filename>mainrc.tcl</filename> script, and make the main window
+visible.
+ </para>
+ <para>
+For standard devices generic eCos I/O code will call the device
+initialization routines at the right time, iterating through the
+<varname>DEVTAB</varname> table in a static constructor. The same
+holds for network devices and file systems. For more custom devices
+code like the following can be used:
+ </para>
+ <programlisting>
+#include &lt;cyg/infra/cyg_type.h&gt;
+class mydev_init {
+ public:
+ mydev_init() {
+ &hellip;
+ }
+};
+static mydev_init mydev_init_object CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO);
+</programlisting>
+ <para>
+Some care has to be taken because the object
+<varname>mydev_init_object</varname> will typically not be referenced
+by other code, and hence may get eliminated at link-time. If the code
+is part of an eCos package then problems can be avoided by putting the
+relevant file in <filename>libextras.a</filename>:
+ </para>
+ <programlisting>
+cdl_package CYGPKG_DEVS_MINE {
+ &hellip;
+ compile -library=libextras.a init.cxx
+}
+</programlisting>
+ <para>
+For devices inside application code the same can be achieved by
+linking the relevant module as a <filename>.o</filename> file rather
+than putting it in a <filename>.a</filename> library.
+ </para>
+ <para>
+In the device initialization routine the main operation is a call to
+<function>synth_auxiliary_instantiate</function>. This takes five
+arguments, all of which should be strings:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><varname>package</varname></term>
+ <listitem><para>
+For device drivers which are eCos packages this should be a directory
+path relative to the eCos repository, for example
+<literal>devs/eth/synth/ecosynth</literal>. This will allow the I/O
+auxiliary to find the various host-side support files for this package
+within the install tree. If the device is application-specific and not
+part of an eCos package then a NULL pointer can be used, causing the
+I/O auxiliary to search for the support files in the current directory
+and then in <filename class="directory">~/.ecos/synth</filename>
+instead.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>version</varname></term>
+ <listitem><para>
+For eCos packages this argument should be the version of the package
+that is being used, for example <literal>current</literal>. A simple
+way to get this version is to use the
+<function>SYNTH_MAKESTRING</function> macro on the package name.
+If the device is application-specific then a NULL pointer should be
+used.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>device</varname></term>
+ <listitem><para>
+This argument specifies the type of device being instantiated, for
+example <literal>ethernet</literal>. More specifically the I/O
+auxiliary will append a <filename>.tcl</filename> suffix, giving
+the name of a Tcl script that will handle all I/O requests for the
+device. If the application requires several instances of a type
+of device then the script will only be loaded once, but the script
+will contain an instantiation procedure that will be called for each
+device instance.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>instance</varname></term>
+ <listitem><para>
+If it is possible to have multiple instances of a device then this
+argument identifies the particular instance, for example
+<literal>eth0</literal> or <literal>eth1</literal>. Otherwise a NULL
+pointer can be used.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>data</varname></term>
+ <listitem><para>
+This argument can be used to pass additional initialization data from
+eCos to the host-side support. This is useful for devices where eCos
+configury must control certain aspects of the device, rather than
+host-side configury such as the target definition file, because eCos
+has compile-time dependencies on some or all of the relevant options.
+An example might be an emulated frame buffer where eCos has been
+statically configured for a particular screen size, orientation and
+depth. There is no fixed format for this string, it will be
+interpreted only by the device-specific host-side Tcl script. However
+the string length should be limited to a couple of hundred bytes to
+avoid possible buffer overflow problems.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+Typical usage would look like:
+ </para>
+ <programlisting>
+ if (!synth_auxiliary_running) {
+ return;
+ }
+ id = synth_auxiliary_instantiate("devs/eth/synth/ecosynth",
+ SYNTH_MAKESTRING(CYGPKG_DEVS_ETH_ECOSYNTH),
+ "ethernet",
+ "eth0",
+ (const char*) 0);
+</programlisting>
+ <para>
+The return value will be a device identifier which can be used for
+subsequent calls to <function>synth_auxiliary_xchgmsg</function>. If
+the device could not be instantiated then <literal>-1</literal> will
+be returned. It is the responsibility of the host-side software to
+issue suitable diagnostics explaining what went wrong, so normally the
+target-side code should fail silently.
+ </para>
+ <para>
+Once the desired device has been instantiated, often it will be
+necessary to do some additional initialization by a message exchange.
+For example an ethernet device might need information from the
+host-side about the MAC address, the <link
+linkend="synth-new-target-interrupts">interrupt vector</link>, and
+whether or not multicasting is supported.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-new-target-xchgmsg"><title>Communicating with a Device</title>
+ <para>
+Once a device has been instantiated it is possible to perform I/O by
+sending messages to the appropriate Tcl script running inside the
+auxiliary, and optionally getting back replies. I/O operations are
+always initiated by the eCos target-side, it is not possible for the
+host-side software to initiate data transfers. However the host-side
+can raise interrupts, and the interrupt handler inside the target can
+then exchange one or more messages with the host.
+ </para>
+ <para>
+There is a single function to perform I/O operations,
+<function>synth_auxiliary_xchgmsg</function>. This takes the following
+arguments:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><varname>device_id</varname></term>
+ <listitem><para>
+This should be one of the identifiers returned by a previous
+call to <function>synth_auxiliary_instantiate</function>, specifying the
+particular device which should perform some I/O.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>request</varname></term>
+ <listitem><para>
+Request are just signed 32-bit integers that identify the particular
+I/O operation being requested. There is no fixed set of codes, instead
+each type of device can define its own.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>arg1</varname></term>
+ <term><varname>arg2</varname></term>
+ <listitem><para>
+For some requests it is convenient to pass one or two additional
+parameters alongside the request code. For example an ethernet device
+could define a multicast-all request, with <varname>arg1</varname>
+controlling whether this mode should be enabled or disabled. Both
+<varname>arg1</varname> and <varname>arg2</varname> should be signed
+32-bit integers, and their values are interpreted only by the
+device-specific Tcl script.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>txdata</varname></term>
+ <term><varname>txlen</varname></term>
+ <listitem><para>
+Some I/O operations may involve sending additional data, for example
+an ethernet packet. Alternatively a control operation may require many
+more parameters than can easily be encoded in <varname>arg1</varname>
+and <varname>arg2</varname>, so those parameters have to be placed in
+a suitable buffer and extracted at the other end.
+<varname>txdata</varname> is an arbitrary buffer of
+<varname>txlen</varname> bytes that should be sent to the host-side.
+There is no specific upper bound on the number of bytes that can be
+sent, but usually it is a good idea to allocate the transmit buffer
+statically and keep transfers down to at most several kilobytes.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>reply</varname></term>
+ <listitem><para>
+If the host-side is expected to send a reply message then
+<varname>reply</varname> should be a pointer to an integer variable
+and will be updated with a reply code, a simple 32-bit integer. The
+synthetic target HAL code assumes that the host-side and target-side
+agree on the protocol being used: if the host-side will not send a
+reply to this message then the <varname>reply</varname> argument
+should be a NULL pointer; otherwise the host-side must always send
+a reply code and the <varname>reply</varname> argument must be valid.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>rxdata</varname></term>
+ <term><varname>rxlen</varname></term>
+ <listitem><para>
+Some operations may involve additional data coming from the host-side,
+for example an incoming ethernet packet. <varname>rxdata</varname>
+should be a suitably-sized buffer, and <varname>rxlen</varname> a
+pointer to an integer variable that will end up containing the number
+of bytes that were actually received. These arguments will only be
+used if the host-side is expected to send a reply and hence the
+<varname>reply</varname> argument was not NULL.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>max_rxlen</varname></term>
+ <listitem><para>
+If a reply to this message is expected and that reply may involve
+additional data, <varname>max_rxlen</varname> limits the size of that
+reply. In other words, it corresponds to the size of the
+<varname>rxdata</varname> buffer.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+Most I/O operations involve only some of the arguments. For example
+transmitting an ethernet packet would use the
+<varname>request</varname>, <varname>txdata</varname> and
+<varname>txlen</varname> fields (in addition to
+<varname>device_id</varname> which is always required), but would not
+involve <varname>arg1</varname> or <varname>arg2</varname> and no
+reply would be expected. Receiving an ethernet packet would involve
+<varname>request</varname>, <varname>rxdata</varname>,
+<varname>rxlen</varname> and <varname>max_rxlen</varname>; in addition
+<varname>reply</varname> is needed to get any reply from the host-side
+at all, and could be used to indicate whether or not any more packets
+are buffered up. A control operation such as enabling multicast mode
+would involve <varname>request</varname> and <varname>arg1</varname>,
+but none of the remaining arguments.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-new-target-interrupts"><title>Interrupt Handling</title>
+ <para>
+Interrupt handling in the synthetic target is much the same as on a
+real target. An interrupt object is created using
+<function>cyg_drv_interrupt_create</function>, attached, and unmasked.
+The emulated device - in other words the Tcl script running inside the
+I/O auxiliary - can raise an interrupt. Subject to interrupts being
+disabled and the appropriate vector being masked, the system will
+invoke the specified ISR function. The synthetic target HAL
+implementation does have some limitations: there is no support for
+nested interrupts, interrupt priorities, or a separate interrupt
+stack. Supporting those might be appropriate when targetting a
+simulator that attempts to model real hardware accurately, but not for
+the simple emulation provided by the synthetic target.
+ </para>
+ <para>
+Of course the actual implementation of the ISR and DSR functions will
+be rather different for a synthetic target device driver. For real
+hardware the device driver will interact with the device by reading
+and writing device registers, managing DMA engines, and the like. A
+synthetic target driver will instead call
+<function>synth_auxiliary_xchgmsg</function> to perform the I/O
+operations.
+ </para>
+ <para>
+There is one other significant difference between interrupt handling
+on the synthetic target and on real hardware. Usually the eCos code
+will know which interrupt vectors are used for which devices. That
+information is fixed when the target hardware is designed. With the
+synthetic target interrupt vectors are assigned to devices on the host
+side, either via the target definition file or dynamically when the
+device is instantiated. Therefore the initialization code for a
+target-side device driver will need to request interrupt vector
+information from the host-side, via a message exchange. Such interrupt
+vectors will be in the range 1 to 31 inclusive, with interrupt 0 being
+reserved for the real-time clock.
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ New devices - host-side -->
+
+<refentry id="synth-new-host">
+ <refmeta>
+ <refentrytitle>Writing New Devices - host</refentrytitle>
+ </refmeta>
+ <refnamediv>
+ <refname>Writing New Devices</refname>
+ <refpurpose>extending the synthetic target, host-side</refpurpose>
+ </refnamediv>
+
+ <refsect1 id="synth-new-host-description"><title>Description</title>
+ <para>
+On the host-side adding a new device means writing a Tcl/Tk script
+that will handle instantiation and subsequent requests from the
+target-side. These scripts all run in the same full interpreter,
+extended with various commands provided by the main I/O auxiliary
+code, and running in an overall GUI framework. Some knowledge of
+programming with Tcl/Tk is required to implement host-side device
+support.
+ </para>
+ <para>
+Some devices can be implemented entirely using a Tcl/Tk script. For
+example, if the final system will have some buttons then those can be
+emulated in the synthetic target using a few Tk widgets. A simple
+emulation could just have the right number of buttons in a row. A more
+advanced emulation could organize the buttons with the right layout,
+perhaps even matching the colour scheme, the shapes, and the relative
+sizes. With other devices it may be necessary for the Tcl script to
+interact with an external program, because the required functionality
+cannot easily be accessed from a Tcl script. For example interacting
+with a raw ethernet device involves some <function>ioctl</function>
+calls, which is easier to do in a C program. Therefore the
+<filename>ethernet.tcl</filename> script which implements the
+host-side ethernet support spawns a separate program
+<filename>rawether</filename>, written in C, that performs the
+low-level I/O. Raw ethernet access usually also requires root
+privileges, and running a small program <filename>rawether</filename>
+with such privileges is somewhat less of a security risk than the
+whole eCos application, the I/O auxiliary, and various dynamically
+loaded Tcl scripts.
+ </para>
+ <para>
+Because all scripts run in a single interpreter, some care has
+to be taken to avoid accidental sharing of global variables. The best
+way to avoid problems is to have each script create its own Tcl
+namespace, so for example the <filename>ethernet.tcl</filename> script
+creates a namespace <varname>ethernet::</varname> and all variables
+and procedures reside in this namespace. Similarly the I/O auxiliary
+itself makes use of a <varname>synth::</varname> namespace.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-new-host-build"><title>Building and Installation</title>
+ <para>
+When an eCos device driver or application code instantiates a device,
+the I/O auxiliary will attempt to load a matching Tcl script. The
+third argument to <function>synth_auxiliary_instantiate</function>
+specifies the type of device, for example <literal>ethernet</literal>,
+and the I/O auxiliary will append a <filename>.tcl</filename> suffix
+and look for a script <filename>ethernet.tcl</filename>.
+ </para>
+ <para>
+If the device being instantiated is application-specific rather than
+part of an eCos package, the I/O auxiliary will look first in the
+current directory, then in <filename
+class="directory">~/.ecos/synth</filename>. If it is part of an eCos
+package then the auxiliary will expect to find the Tcl script and any
+support files below <filename
+class="directory">libexec/ecos</filename> in the install tree - note
+that the same install tree must be used for the I/O auxiliary itself
+and for any device driver support. The directory hierarchy below
+<filename class="directory">libexec/ecos</filename> matches the
+structure of the eCos repository, allowing multiple versions of a
+package to be installed to allow for incompatible protocol changes.
+ </para>
+ <para>
+The preferred way to build host-side software is to use
+<command>autoconf</command> and <command>automake</command>. Usually
+this involves little more than copying the
+<filename>acinclude.m4</filename>, <filename>configure.in</filename>
+and <filename>Makefile.am</filename> files from an existing package,
+for example the synthetic target ethernet driver, and then making
+minor edits. In <filename>acinclude.m4</filename> it may be necessary
+to adjust the path to the root of the repository.
+<filename>configure.in</filename> may require a similar change, and
+the <function>AC_INIT</function> macro invocation will have to be
+changed to match one of the files in the new package. A critical macro
+in this file is <filename>ECOS_PACKAGE_DIRS</filename> which will set
+up the correct install directory. <filename>Makefile.am</filename> may
+require some more changes, for example to specify the data files that
+should be installed (including the Tcl script). These files should
+then be processed using <command>aclocal</command>,
+<command>autoconf</command> and <command>automake</command> in that
+order. Actually building the software then just involves
+<command>configure</command>, <command>make</command> and
+<command>make install</command>, as per the instructions in the
+toplevel <filename>README.host</filename> file.
+ </para>
+ <para>
+To assist developers, if the environment variable
+<envar>ECOSYNTH_DEVEL</envar> is set then a slightly different
+algorithm is used for locating device Tcl scripts. Instead of looking
+only in the install tree the I/O auxiliary will also look in the
+source tree, and if the script there is more recent than the installed
+version it will be used in preference. This allows developers to
+modify the master copy without having to run <command>make
+install</command> all the time.
+ </para>
+ <para>
+If a script needs to know where it has been installed it can examine
+the Tcl variable <varname>synth::device_install_dir</varname> . This
+variable gets updated whenever a script is loaded, so if the
+value may be needed later it should be saved away in a device-specific
+variable.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-new-host-instantiation"><title>Instantiation</title>
+ <para>
+The I/O auxiliary will <command>source</command> the device-specific
+Tcl script when the eCos application first attempts to instantiate a
+device of that type. The script should return a procedure that will be
+invoked to instantiate a device.
+ </para>
+ <programlisting>
+namespace eval ethernet {
+ &hellip;
+ proc instantiate { id instance data } {
+ &hellip;
+ return ethernet::handle_request
+ }
+}
+return ethernet::instantiate
+</programlisting>
+ <para>
+The <varname>id</varname> argument is a unique identifier for this
+device instance. It will also be supplied on subsequent calls to the
+request handler, and will match the return value of
+<function>synth_auxiliary_instantiate</function> on the target side. A
+common use for this value is as an array index to support multiple
+instances of this types of device. The <varname>instance</varname> and
+<varname>data</varname> arguments match the corresponding arguments to
+<function>synth_auxiliary_instantiate</function> on the target side, so
+a typical value for <varname>instance</varname> would be
+<literal>eth0</literal>, and <varname>data</varname> is used to pass
+arbitrary initialization parameters from target to host.
+ </para>
+ <para>
+The actual work done by the instantiation procedure is obviously
+device-specific. It may involve allocating an <link
+linkend="synth-new-host-interrupts">interrupt vector</link>, adding a
+device-specific subwindow to the display, opening a real Linux device,
+establishing a socket connection to some server, spawning a separate
+process to handle the actual I/O, or a combination of some or all of
+the above.
+ </para>
+ <para>
+If the device is successfully instantiated then the return value
+should be a handler for subsequent I/O requests. Otherwise the return
+value should be an empty string, and on the target-side the
+<function>synth_auxiliary_instantiate</function> call will return
+<literal>-1</literal>. The script is responsible for providing
+<link linkend="synth-new-host-output">diagnostics</link> explaining
+why the device could not be instantiated.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-new-host-requests"><title>Handling Requests</title>
+ <para>
+When the target-side calls
+<function>synth_auxiliary_xchgmsg</function>, the I/O auxiliary will
+end up calling the request handler for the appropriate device instance
+returned during instantiation:
+ </para>
+ <programlisting>
+namespace eval ethernet {
+ &hellip;
+ proc handle_request { id request arg1 arg2 txdata txlen max_rxlen } {
+ &hellip;
+ if { &lt;some condition&gt; } {
+ synth::send_reply &lt;error code&gt; 0 ""
+ return
+ }
+ &hellip;
+ synth::send_reply &lt;reply code&gt; $packet_len $packet
+ }
+ &hellip;
+}
+</programlisting>
+ <para>
+The <varname>id</varname> argument is the same device id that was
+passed to the instantiate function, and is typically used as an array
+index to access per-device data. The <varname>request</varname>,
+<varname>arg1</varname>, <varname>arg2</varname>, and
+<varname>max_rxlen</varname> are the same values that were passed to
+<function>synth_auxiliary_xchgmsg</function> on the target-side,
+although since this is a Tcl script obviously the numbers have been
+converted to strings. The <varname>txdata</varname> buffer is raw data
+as transmitted by the target, or an empty string if the I/O operation
+does not involve any additional data. The Tcl procedures
+<command>binary scan</command>, <command>string index</command> and
+<command>string range</command> may be found especially useful when
+manipulating this buffer. <varname>txlen</varname> is provided for
+convenience, although <command>string length $txdata</command> would
+give the same information.
+ </para>
+ <para>
+The code for actually processing the request is of course device
+specific. If the target does not expect a reply then the request
+handler should just return when finished. If a reply is expected then
+there should be a call to <command>synth::send_reply</command>. The
+first argument is the reply code, and will be turned into a 32-bit
+integer on the target side. The second argument specifies the length
+of the reply data, and the third argument is the reply data itself.
+For some devices the Tcl procedure <command>binary format</command>
+may prove useful. If the reply involves just a code and no additional
+data, the second and third arguments should be <literal>0</literal>
+and an empty string respectively.
+ </para>
+ <para>
+Attempts to send a reply when none is expected, fail to send a reply
+when one is expected, or send a reply that is larger than the
+target-side expects, will all be detected by the I/O auxiliary and
+result in run-time error messages.
+ </para>
+ <para>
+It is not possible for the host-side code to send unsolicited messages
+to the target. If host-side code needs attention from the target, for
+example because some I/O operation has completed, then an interrupt
+should be raised.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-new-host-interrupts"><title>Interrupts</title>
+ <para>
+The I/O auxiliary provides a number of procedures for interrupt
+handling.
+ </para>
+ <programlisting>
+synth::interrupt_allocate &lt;name&gt;
+synth::interrupt_get_max
+synth::interrupt_get_devicename &lt;vector&gt;
+synth::interrupt_raise &lt;vector&gt;
+</programlisting>
+ <para>
+<command>synth::interrupt_allocate</command> is normally called during
+device instantiation, and returns the next free interrupt vector. This
+can be passed on to the target-side device driver in response to a
+suitable request, and it can then install an interrupt handler on that
+vector. Interrupt vector <literal>0</literal> is used within the
+target-side code for the real-time clock, so the allocated vectors
+will start at <literal>1</literal>. The argument identifies the
+device, for example <literal>eth0</literal>. This is not actually used
+internally, but can be accessed by user-initialization scripts that
+provide some sort of interrupt monitoring facility (typically via the
+<literal>interrupt</literal> <link
+linkend="synth-new-host-hooks">hook</link>). It is possible for a
+single device to allocate multiple interrupt vectors, but the
+synthetic target supports a maximum of 32 such vectors.
+ </para>
+ <para>
+<command>synth::interrupt_get_max</command> returns the highest
+interrupt vector that has been allocated, or <literal>0</literal> if
+there have been no calls to
+<command>synth::interrupt_allocate</command>.
+<command>synth::interrupt_get_devicename</command> returns the string
+that was passed to <command>synth::interrupt_allocate</command> when
+the vector was allocated.
+ </para>
+ <para>
+<command>synth::interrupt_raise</command> can be called any time after
+initialization. The argument should be the vector returned by
+<command>synth::interrupt_allocate</command> for this device. It will
+activate the normal eCos interrupt handling mechanism so, subject to
+interrupts being enabled and this particular interrupt not being
+masked out, the appropriate ISR will run.
+ </para>
+ <note><para>
+At this time it is not possible for a device to allocate a specific
+interrupt vector. The order in which interrupt vectors are assigned to
+devices effectively depends on the order in which the eCos devices get
+initialized, and that may change if the eCos application is rebuilt. A
+future extension may allow devices to allocate specific vectors, thus
+making things more deterministic. However that will introduce new
+problems, in particular the code will have to start worrying about
+requests for vectors that have already been allocated.
+ </para></note>
+ </refsect1>
+
+ <refsect1 id="synth-new-host-args"><title>Flags and Command Line Arguments</title>
+ <para>
+The generic I/O auxiliary code will process the standard command line
+arguments, and will set various flag variables accordingly. Some of
+these should be checked by device-specific scripts.
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><varname>synth::flag_gui</varname></term>
+ <listitem><para>
+This is set when the I/O auxiliary is operating in graphical mode
+rather than text mode. Some functionality such as filters and the GUI
+layout are only available in graphical mode.
+ </para>
+ <programlisting>
+ if { $synth::flag_gui } {
+ &hellip;
+ }
+</programlisting></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>synth::flag_verbose</varname></term>
+ <listitem><para>
+The user has requested additional information during startup. Each
+device driver can decide how much additional information, if any,
+should be produced.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>synth::flag_keep_going</varname></term>
+ <listitem><para>
+The user has specified <option>-k</option> or
+<option>--keep-going</option>, so even if an error occurs the I/O
+auxiliary and the various device driver scripts should continue running
+if at all possible. Diagnostics should still be generated.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+Some scripts may want to support additional command line arguments.
+This facility should be used with care since there is no way to
+prevent two different scripts from trying to use the same argument.
+The following Tcl procedures are available:
+ </para>
+ <programlisting>
+synth::argv_defined &lt;name&gt;
+synth::argv_get_value &lt;name&gt;
+</programlisting>
+ <para>
+<command>synth::argv_defined</command> returns a boolean to indicate
+whether or not a particular argument is present. If the argument is
+the name part of a name/value pair, an <literal>=</literal> character
+should be appended. Typical uses might be:
+ </para>
+ <programlisting>
+ if { [synth::argv_defined "-o13"] } {
+ &hellip;
+ }
+
+ if { [synth::argv_defined "-mark="] } {
+ &hellip;
+ }
+</programlisting>
+ <para>
+The first call checks for a flag <literal>-o13</literal> or
+<literal>--o13</literal> - the code treats options with single and
+double hyphens interchangeably. The second call checks for an argument
+of the form <literal>-mark=&lt;value&gt;</literal> or a pair of
+arguments <literal>-mark &lt;value&gt;</literal>. The value part of a
+name/value pair can be obtained using
+<command>synth::argv_get_value</command>;
+ </para>
+ <programlisting>
+ variable speed 1
+ if { [synth::argv_defined "-mark="] } {
+ set mark [synth::argv_get_value "-mark="]
+ if { ![string is integer $mark] || ($mark < 1) || ($mark > 9) } {
+ &lt;issue diagnostic&gt;
+ } else {
+ set speed $mark
+ }
+ }
+</programlisting>
+ <para>
+<command>synth::argv_get_value</command> should only be used after a
+successful call to <command>synth::argv_defined</command>.
+At present there is no support for some advanced forms of command line
+argument processing. For example it is not possible to repeat a
+certain option such as <option>-v</option> or
+<option>--verbose</option>, with each occurrence increasing the level
+of verbosity.
+ </para>
+ <para>
+If a script is going to have its own set of command-line arguments
+then it should give appropriate details if the user specifies
+<option>--help</option>. This involves a hook function:
+ </para>
+ <programlisting>
+namespace eval my_device {
+ proc help_hook { } {
+ puts " -o13 : activate the omega 13 device"
+ puts " -mark &lt;speed&gt; : set speed. Valid values are 1 to 9."
+ }
+
+ synth::hook_add "help" my_device::help_hook
+}
+</programlisting>
+ </refsect1>
+
+ <refsect1 id="synth-new-host-tdf"><title>The Target Definition File</title>
+ <para>
+Most device scripts will want to check entries in the target
+definition file for run-time configuration information. The Tcl
+procedures for this are as follows:
+ </para>
+ <programlisting>
+synth::tdf_has_device &lt;name&gt;
+synth::tdf_get_devices
+synth::tdf_has_option &lt;devname&gt; &lt;option&gt;
+synth::tdf_get_option &lt;devname&gt; &lt;option&gt;
+synth::tdf_get_options &lt;devname&gt; &lt;option&gt;
+synth::tdf_get_all_options &lt;devname&gt;
+</programlisting>
+ <para>
+<command>synth::tdf_has_device</command> can be used to check whether
+or not the target definition file had an entry
+<literal>synth_device&nbsp;&lt;name&gt;</literal>. Usually the name
+will match the type of device, so the
+<filename>console.tcl</filename> script will look for a target
+definition file entry <literal>console</literal>.
+<command>synth::tdf_get_devices</command> returns a list of all
+device entries in the target definition file.
+ </para>
+ <para>
+Once it is known that the target definition file has an entry for a
+certain device, it is possible to check for options within the entry.
+<command>synth::tdf_has_option</command> just checks for the presence,
+returning a boolean:
+ </para>
+ <programlisting>
+ if { [synth::tdf_has_option "console" "appearance"] } {
+ &hellip;
+ }
+</programlisting>
+ <para>
+<command>synth::tdf_get_option</command> returns a list of all the
+arguments for a given option. For example, if the target definition
+file contains an entry:
+ </para>
+ <programlisting>
+synth_device console {
+ appearance -foreground white -background black
+ filter trace {^TRACE:.*} -foreground HotPink1 -hide 1
+ filter xyzzy {.*xyzzy.*} -foreground PapayaWhip
+}
+</programlisting>
+ <para>
+A call
+<command>synth::tdf_get_option&nbsp;console&nbsp;appearance</command>
+will return the list <literal>{-foreground white -background
+black}</literal>. This list can be manipulated using standard Tcl routines
+such as <command>llength</command> and <command>lindex</command>. Some
+options can occur multiple times in one entry, for example
+<option>filter</option> in the <literal>console</literal> entry.
+<command>synth::tdf_get_options</command> returns a list of lists,
+with one entry for each option occurrence.
+<command>synth::tdf_get_all_options</command> returns a list of lists
+of all options. This time each entry will include the option name as
+well.
+ </para>
+ <para>
+The I/O auxiliary will not issue warnings about entries in the target
+definition file for devices which were not loaded, unless the
+<option>-v</option> or <option>--verbose</option> command line
+argument was used. This makes it easier to use a single target
+definition file for different applications. However the auxiliary will
+issue warnings about options within an entry that were ignored,
+because often these indicate a typing mistake of some sort. Hence a
+script should always call <command>synth::tdf_has_option</command>,
+<command>synth:;tdf_get_option</command> or
+<command>synth::tdf_get_options</command> for all valid options, even
+if some of the options preclude the use of others.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-new-host-hooks"><title>Hooks</title>
+ <para>
+Some scripts may want to take action when particular events occur, for
+example when the eCos application has exited and there is no need for
+further I/O. This is supported using hooks:
+ </para>
+ <programlisting>
+namespace eval my_device {
+ &hellip;
+ proc handle_ecos_exit { arg_list } {
+ &hellip;
+ }
+ synth::hook_add "ecos_exit" my_device::handle_ecos_exit
+}
+</programlisting>
+ <para>
+It is possible for device scripts to add their own hooks and call all
+functions registered for those hooks. A typical use for this is by
+user initialization scripts that want to monitor some types of I/O.
+The available Tcl procedures for manipulating hooks are:
+ </para>
+ <programlisting>
+synth::hook_define &lt;name&gt;
+synth::hook_defined &lt;name&gt;
+synth::hook_add &lt;name&gt; &lt;function&gt;
+synth::hook_call &lt;name&gt; &lt;args&gt;
+</programlisting>
+ <para>
+<command>synth::hook_define</command> creates a new hook with the
+specified name. This hook must not already exist.
+<command>synth::hook_defined</command> can be used to check for the
+existence of a hook. <command>synth::hook_add</command> allows other
+scripts to register a callback function for this hook, and
+<command>synth::hook_call</command> allows the owner script to invoke
+all such callback functions. A hook must already be defined before a
+callback can be attached. Therefore typically device scripts will only
+use standard hooks and their own hooks, not hooks created by some
+other device, because the order of device initialization is not
+sufficiently defined. User scripts run from
+<filename>mainrc.tcl</filename> can use any hooks that have been
+defined.
+ </para>
+ <para>
+<command>synth::hook_call</command> takes an arbitrary list of
+arguments, for example:
+ </para>
+ <programlisting>
+ synth::hook_call "ethernet_rx" "eth0" $packet
+</programlisting>
+ <para>
+The callback function will always be invoked with a single argument,
+a list of the arguments that were passed to
+<command>synth::hook_call</command>:
+ </para>
+ <programlisting>
+ proc rx_callback { arg_list } {
+ set device [lindex $arg_list 0]
+ set packet [lindex $arg_list 1]
+ }
+</programlisting>
+ <para>
+Although it might seem more appropriate to use Tcl's
+<command>eval</command> procedure and have the callback functions
+invoked with the right number of arguments rather than a single list,
+that would cause serious problems if any of the data contained special
+characters such as <literal>[</literal> or <literal>$</literal>. The
+current implementation of hooks avoids such problems, at the cost of
+minor inconvenience when writing callbacks.
+ </para>
+ <para>
+A number of hooks are defined as standard. Some devices will add
+additional hooks, and the device-specific documentation should be
+consulted for those. User scripts can add their own hooks if desired.
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><literal>exit</literal></term>
+ <listitem><para>
+This hook is called just before the I/O auxiliary exits. Hence it
+provides much the same functionality as <function>atexit</function> in
+C programs. The argument list passed to the callback function will be
+empty.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>ecos_exit</literal></term>
+ <listitem><para>
+This hook is called when the eCos application has exited. It is used
+mainly to shut down I/O operations: if the application is no longer
+running then there is no point in raising interrupts or storing
+incoming packets. The callback argument list will be empty.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>ecos_initialized</literal></term>
+ <listitem><para>
+The synthetic target HAL will send a request to the I/O auxiliary once
+the static constructors have been run. All devices should now have been
+instantiated. A script could now check how many instances there are of
+a given type of device, for example ethernet devices, and create a
+little monitor window showing traffic on all the devices. The
+<literal>ecos_initialized</literal> callbacks will be run just before
+the user's <filename>mainrc.tcl</filename> script. The callback
+argument list will be empty.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>help</literal></term>
+ <listitem><para>
+This hook is also invoked once static constructors have been run, but
+only if the user specified <option>-h</option> or
+<option>--help</option>. Any scripts that add their own command line
+arguments should add a callback to this hook which outputs details of
+the additional arguments. The callback argument list will be empty.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>interrupt</literal></term>
+ <listitem><para>
+Whenever a device calls <command>synth::interrupt_raise</command> the
+<literal>interrupt</literal> hook will be called with a single
+argument, the interrupt vector. The main use for this is to allow
+user scripts to monitor interrupt traffic.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1 id="synth-new-host-output"><title>Output and Filters</title>
+ <para>
+Scripts can use conventional facilities for sending text output to the
+user, for example calling <command>puts</command> or directly
+manipulating the central text widget
+<varname>.main.centre.text</varname>. However in nearly all cases it
+is better to use output facilities provided by the I/O auxiliary
+itself:
+ </para>
+ <programlisting>
+synth::report &lt;msg&gt;
+synth::report_warning &lt;msg&gt;
+synth::report_error &lt;msg&gt;
+synth::internal_error &lt;msg&gt;
+synth::output &lt;msg&gt; &lt;filter&gt;
+</programlisting>
+ <para>
+<command>synth::report</command> is intended for messages related to
+the operation of the I/O auxiliary itself, especially additional
+output resulting from <option>-v</option> or
+<option>--verbose</option>. If running in text mode the output will go
+to standard output. If running in graphical mode the output will go to
+the central text window. In both modes, use of <option>-l</option> or
+<option>--logfile</option> will modify the behaviour.
+ </para>
+ <para>
+<command>synth::report_warning</command>,
+<command>synth::report_error</command> and
+<command>synth::internal_error</command> have the obvious meaning,
+including prepending strings such as <literal>Warning:</literal> and
+<literal>Error:</literal>. When the eCos application informs the I/O
+auxiliary that all static constructors have run, if at that point
+there have been any calls to <command>synth::error</command> then the
+I/O auxiliary will exit. This can be suppressed with command line
+arguments <option>-k</option> or <option>--keep-going</option>.
+<command>synth::internal_error</command> will output some information
+about the current state of the I/O auxiliary and then exit
+immediately. Of course it should never be necessary to call this
+function.
+ </para>
+ <para>
+<command>synth::output</command> is the main routine for outputting
+text. The second argument identifies a filter. If running in text mode
+the filter is ignored, but if running in graphical mode the filter can
+be used to control the appearance of this output. A typical use would
+be:
+ </para>
+ <programlisting>
+ synth::output $line "console"
+</programlisting>
+ <para>
+This outputs a single line of text using the
+<literal>console</literal> filter. If running in graphical mode the
+default appearance of this text can be modified with the
+<option>appearance</option> option in the
+<command>synth_device&nbsp;console</command> entry of the target
+definition file. The <guimenuitem>System filters</guimenuitem> menu
+option can be used to change the appearance at run-time.
+ </para>
+ <para>
+Filters should be created before they are used. The procedures
+available for this are:
+ </para>
+ <programlisting>
+synth::filter_exists &lt;name&gt;
+synth::filter_get_list
+synth::filter_add &lt;name&gt; [options]
+synth::filter_parse_options &lt;options&gt; &lt;parsed_options&gt; &lt;message&gt;
+synth::filter_add_parsed &lt;name&gt; &lt;parsed_options&gt;
+</programlisting>
+ <para>
+<command>synth::filter_exists</command> can be used to check whether
+or not a particular filter already exists: creating two filters with
+the same name is not allowed.
+<command>synth::filter_get_list</command> returns a list of the
+current known filters. <command>synth::filter_add</command> can be
+used to create a new filter. The first argument names the new filter,
+and the remaining arguments control the initial appearance. A typical
+use might be:
+ </para>
+ <programlisting>
+ synth::filter_add "my_device_tx" -foreground yellow -hide 1
+</programlisting>
+ <para>
+It is assumed that the supplied arguments are valid, which typically
+means that they are hard-wired in the script. If instead the data
+comes out of a configuration file and hence may be invalid, the
+I/O auxiliary provides a parsing utility. Typical usage would be:
+ </para>
+ <programlisting>
+ array set parsed_options [list]
+ set message ""
+ if { ![synth::filter_parse_options $console_appearance parsed_options message] } {
+ synth::report_error \
+ "Invalid entry in target definition file $synth::target_definition\
+ \n synth_device \"console\", entry \"appearance\"\n$message"
+ } else {
+ synth::filter_add_parsed "console" parsed_options
+ }
+</programlisting>
+ <para>
+On success <varname>parsed_options</varname> will be updated with an
+internal representation of the desired appearance, which can then be
+used in a call to <command>synth::filter_add_parsed</command>. On
+failure <varname>message</varname> will be updated with details of the
+parsing error that occurred.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-new-host-gui"><title>The Graphical Interface</title>
+ <para>
+When the I/O auxiliary is running in graphical mode, many scripts will
+want to update the user interface in some way. This may be as simple
+as adding another entry to the help menu for the device, or adding a
+new button to the toolbar. It may also involve adding new subwindows,
+or even creating entire new toplevel windows. These may be simple
+monitor windows, displaying additional information about what is going
+on in the system in a graphical format. Alternatively they may emulate
+actual I/O operations, for example button widgets could be used to
+emulate real physical buttons.
+ </para>
+ <para>
+The I/O auxiliary does not provide many procedures related to the
+graphical interface. Instead it is expected that scripts will just
+update the widget hierarchy directly.
+ </para>
+ <informalfigure PgWide=1>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="layout.png" Scalefit=1 Align="Center">
+ </imageobject>
+ </mediaobject>
+ </informalfigure>
+ <para>
+So adding a new item to the <guimenu>Help</guimenu> menu involves a
+<command>.menubar.help&nbsp;add</command> operation with suitable
+arguments. Adding a new button to the toolbar involves creating a
+child window in <varname>.toolbar</varname> and packing it
+appropriately. Scripts can create their own subwindows and then pack
+it into one of <varname>.main.nw</varname>,
+<varname>.main.n</varname>, <varname>.main.ne</varname>,
+<varname>.main.w</varname>, <varname>.main.e</varname>,
+<varname>.main.sw</varname>, <varname>.main.s</varname> or
+<varname>.main.se</varname>. Normally the user should be allowed to
+<link linkend="synth-gui-layout">control</link> this via the target
+definition file. The central window <varname>.main.centre</varname>
+should normally be left alone by other scripts since it gets used for
+text output.
+ </para>
+ <para>
+The following graphics-related utilities may be found useful:
+ </para>
+ <programlisting>
+synth::load_image &lt;image name&gt; &lt;filename&gt;
+synth::register_ballon_help &lt;widget&gt; &lt;message&gt;
+synth::handle_help &lt;URL&gt;
+</programlisting>
+ <para>
+<command>synth::load_image</command> can be used to add a new image to
+the current interpreter. If the specified file has a
+<filename>.xbm</filename> extension then the image will be a
+monochrome bitmap, otherwise it will be a colour image of some sort.
+A boolean will be returned to indicate success or failure, and
+suitable diagnostics will be generated if necessary.
+ </para>
+ <para>
+<command>synth::register_balloon_help</command> provides balloon help
+for a specific widget, usually a button on the toolbar.
+ </para>
+ <para>
+<command>synth::handle_help</command> is a utility routine that can be
+installed as the command for displaying online help, for example:
+ </para>
+ <programlisting>
+ .menubar.help add command -label "my device" -command \
+ [list synth::handle_help "file://$path"]
+</programlisting>
+ </refsect1>
+
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ Porting -->
+
+<refentry id="synth-porting">
+ <refmeta>
+ <refentrytitle>Porting</refentrytitle>
+ </refmeta>
+ <refnamediv>
+ <refname>Porting</refname>
+ <refpurpose>Adding support for other hosts</refpurpose>
+ </refnamediv>
+
+ <refsect1 id="synth-porting-description"><title>Description</title>
+ <para>
+The initial development effort of the eCos synthetic target happened
+on x86 Linux machines. Porting to other platforms involves addressing
+a number of different issues. Some ports should be fairly
+straightforward, for example a port to Linux on a processor other than
+an x86. Porting to Unix or Unix-like operating systems other than
+Linux may be possible, but would involve more effort. Porting to a
+completely different operating system such as Windows would be very
+difficult. The text below complements the eCos Porting Guide.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-porting-linux"><title>Other Linux Platforms</title>
+ <para>
+Porting the synthetic target to a Linux platform that uses a processor
+other than x86 should be straightforward. The simplest approach is to
+copy the existing <filename class="directory">i386linux</filename>
+directory tree in the <filename class="directory">hal/synth</filename>
+hierarchy, then rename and edit the ten or so files in this package.
+Most of the changes should be pretty obvious, for example on a 64-bit
+processor some new data types will be needed in the
+<filename>basetype.h</filename> header file. It will also be necessary
+to update the toplevel <filename>ecos.db</filename> database with an
+entry for the new HAL package, and a new target entry will be needed.
+ </para>
+ <para>
+Obviously a different processor will have different register sets and
+calling conventions, so the code for saving and restoring thread
+contexts and for implementing <function>setjmp</function> and
+<function>longjmp</function> will need to be updated. The exact way of
+performing Linux system calls will vary: on x86 linux this usually
+involves pushing some registers on the stack and then executing an
+<literal>int&nbsp;0x080</literal> trap instruction, but on a different
+processor the arguments might be passed in registers instead and
+certainly a different trap instruction will be used. The startup code
+is written in assembler, but needs to do little more than extract the
+process' argument and environment variables and then jump to the main
+<function>linux_entry</function> function provided by the
+architectural synthetic target HAL package.
+ </para>
+ <para>
+The header file <filename>hal_io.h</filename> provided by the
+architectural HAL package provides various structure definitions,
+function prototypes, and macros related to system calls. These are
+correct for x86 linux, but there may be problems on other processors.
+For example a structure field that is currently defined as a 32-bit
+number may in fact may be a 64-bit number instead.
+ </para>
+ <para>
+The synthetic target's memory map is defined in two files in the
+<filename class="directory">include/pkgconf</filename> subdirectory.
+For x86 the default memory map involves eight megabytes of read-only
+memory for the code at location 0x1000000 and another eight megabytes
+for data at 0x2000000. These address ranges may be reserved for other
+purposes on the new architecture, so may need changing. There may be
+some additional areas of memory allocated by the system for other
+purposes, for example the startup stack and any environment variables,
+but usually eCos applications can and should ignore those.
+ </para>
+ <para>
+Other HAL functionality such as interrupt handling, diagnostics, and
+the system clock are provided by the architectural HAL package and
+should work on different processors with few if any changes. There may
+be some problems in the code that interacts with the I/O auxiliary
+because of lurking assumptions about endianness or the sizes of
+various data types.
+ </para>
+ <para>
+When porting to other processors, a number of sources of information
+are likely to prove useful. Obviously the Linux kernel sources and
+header files constitute the ultimate authority on how things work at
+the system call level. The GNU C library sources may also prove very
+useful: for a normal Linux application it is the C library that
+provides the startup code and the system call interface.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-porting-unix"><title>Other Unix Platforms</title>
+ <para>
+Porting to a Unix or Unix-like operating system other than Linux would
+be somewhat more involved. The first requirement is toolchains: the
+GNU compilers, gcc and g++, must definitely be used; use of other GNU
+tools such as the linker may be needed as well, because eCos depends
+on functionality such as prioritizing C++ static constructors, and
+other linkers may not implement this or may implement it in a
+different and incompatible way. A closely related requirement is the
+use of ELF format for binary executables: if the operating system
+still uses an older format such as COFF then there are likely to be
+problems because they do not provide the flexibility required by eCos.
+ </para>
+ <para>
+In the architectural HAL there should be very little code that is
+specific to Linux. Instead the code should work on any operating
+system that provides a reasonable implementation of the POSIX
+standard. There may be some problems with program startup, but those
+could be handled at the architectural level. Some changes may also be
+required to the exception handling code. However one file which will
+present a problem is <filename>hal_io.h</filename>, which contains
+various structure definitions and macros used with the system call
+interface. It is likely that many of these definitions will need
+changing, and it may well be appropriate to implement variant HAL
+packages for the different operating systems where this information
+can be separated out. Another possible problem is that the generic
+code assumes that system calls such as
+<function>cyg_hal_sys_write</function> are available. On an operating
+system other than Linux it is possible that some of these are not
+simple system calls, and instead wrapper functions will need to be
+implemented at the variant HAL level.
+ </para>
+ <para>
+The generic I/O auxiliary code should be fairly portable to other Unix
+platforms. However some of the device drivers may contain code that is
+specific to Linux, for example the <literal>PF_PACKET</literal> socket
+address family and the ethertap virtual tunnelling interface. These
+may prove quite difficult to port.
+ </para>
+ <para>
+The remaining porting task is to implement one or more platform HAL
+packages, one per processor type that is supported. This should
+involve much the same work as a port to <link
+linkend="synth-porting-linux">another processor running Linux</link>.
+ </para>
+ <para>
+When using other Unix operating systems the kernel source code may not
+be available, which would make any porting effort more challenging.
+However there is still a good chance that the GNU C library will have
+been ported already, so its source code may contain much useful
+information.
+ </para>
+ </refsect1>
+
+ <refsect1 id="synth-porting-other"><title>Windows Platforms</title>
+ <para>
+Porting the current synthetic target code to some version of Windows
+or to another non-Unix platform is likely to prove very difficult. The
+first hurdle that needs to be crossed is the file format for binary
+executables: current Windows implementations do not use ELF, instead
+they use their own format PE which is a variant of the rather old and
+limited COFF format. It may well prove easier to first write an ELF
+loader for Windows executables, rather than try to get eCos to work
+within the constraints of PE. Of course that introduces new problems,
+for example existing source-level debuggers will still expect
+executables to be in PE format.
+ </para>
+ <para>
+Under Linux a synthetic target application is not linked with the
+system's C library or any other standard system library. That would
+cause confusion, for example both eCos and the system's C library
+might try to define the <function>printf</function> function, and
+introduce complications such as working with shared libraries. For
+much the same reasons, a synthetic target application under Windows
+should not be linked with any Windows DLL's. If an ELF loader has been
+specially written then this may not be much of a problem.
+ </para>
+ <para>
+The next big problem is the system call interface. Under Windows
+system calls are generally made via DLL's, and it is not clear that
+the underlying trap mechanism is well-documented or consistent between
+different releases of Windows.
+ </para>
+ <para>
+The current code depends on the operating system providing an
+implementation of POSIX signal handling. This is used for I/O
+purposes, for example <literal>SIGALRM</literal> is used for the
+system clock, and for exceptions. It is not known what equivalent
+functionality is available under Windows.
+ </para>
+ <para>
+Given the above problems a port of the synthetic target to Windows may
+or may not be technically feasible, but it would certainly require a
+very large amount of effort.
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- }}} -->
+
+</part>
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/Makefile.am b/cesar/ecos/packages/hal/synth/arch/current/host/Makefile.am
new file mode 100644
index 0000000000..578bfb5b03
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/Makefile.am
@@ -0,0 +1,92 @@
+## Process this file with automake to produce Makefile.in
+## =====================================================================
+##
+## Makefile.am
+##
+## Build support for the host-side synthetic target support,
+## the arch package.
+##
+##
+## =====================================================================
+######COPYRIGHTBEGIN####
+#
+# ----------------------------------------------------------------------------
+# Copyright (C) 2002, 2003 Bart Veer
+#
+# This file is part of the eCos synthetic target support.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# ----------------------------------------------------------------------------
+#
+######COPYRIGHTEND####
+## =====================================================================
+#######DESCRIPTIONBEGIN####
+##
+## Author(s): bartv
+## Contact(s): bartv
+## Date: 2002/08/06
+## Version: 0.01
+##
+######DESCRIPTIONEND####
+## =====================================================================
+
+AUTOMAKE_OPTIONS = 1.3 foreign
+
+## Only some platforms are supported. Having the configure script throw
+## an error when attempting to configure on an unsupported platform
+## would be a mistake, since that would prevent any configury from
+## the toplevel on unsupported platforms. Instead an automake conditional
+## is used, leading to null makefiles on unsupported platforms.
+
+if SUPPORTED
+
+AM_CFLAGS = @ecos_CFLAGS@ -DECOSYNTH_VERSION=\"@VERSION@\" \
+ -DECOS_REPOSITORY=\"@ECOS_REPOSITORY@\" \
+ -DLIBEXECDIR=\"$(libexecdir)\" \
+ -DPACKAGE_DIR=\"@PACKAGE_DIR@\" \
+ -DPACKAGE_VERSION=\"@PACKAGE_VERSION@\" \
+ -DPACKAGE_INSTALL=\"@PACKAGE_INSTALL@\"
+AM_CXXFLAGS = @ecos_CXXFLAGS@
+INCLUDES = @ecos_INCLUDES@ @ecos_tk_includes@
+LIBS = @ecos_LIBS@ @ecos_LDADD@
+
+## The synthetic target support consists of a single program ecosynth,
+## a number of Tcl scripts, and some additional data files. These are
+## all installed in a single directory $(libexec)/ecos/<package>_<version>/
+## Neither the ecosynth executable nor any of the scripts are directly
+## executable, instead ecosynth gets fork()'d/execve()'d by the eCos
+## application so $(libexec) is appropriate. Strictly speaking the
+## Tcl scripts and data files are architecture-independent so should
+## probably be installed in an analogous directory below $(datadir),
+## but that would add more directories for little real gain. The scripts
+## are treated as data files since they should not be executed directly,
+## i.e. they should not be installed with the execute bit set.
+
+synthdir = $(libexecdir)/ecos/@PACKAGE_INSTALL@
+synth_PROGRAMS = ecosynth
+synth_DATA = ecosynth.tcl default.tdf user_initrc.tcl user_mainrc.tcl \
+ console.tcl \
+ ecosicon.xbm ecosiconmask.xbm tick_yes.xbm tick_no.xbm \
+ save.xbm cut.xbm copy.xbm paste.xbm help.xbm running1.ppm \
+ saveall.xbm
+
+ecosynth_SOURCES = ecosynth.c
+ecosynth_LDADD = @ecos_tk_libs@
+
+## Manual dependencies
+ecosynth.$(OBJEXT) : Makefile ../src/synth_protocol.h
+
+endif
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/Makefile.in b/cesar/ecos/packages/hal/synth/arch/current/host/Makefile.in
new file mode 100644
index 0000000000..ba41bc25cd
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/Makefile.in
@@ -0,0 +1,450 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+######COPYRIGHTBEGIN####
+#
+# ----------------------------------------------------------------------------
+# Copyright (C) 2002, 2003 Bart Veer
+#
+# This file is part of the eCos synthetic target support.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# ----------------------------------------------------------------------------
+#
+######COPYRIGHTEND####
+#######DESCRIPTIONBEGIN####
+######DESCRIPTIONEND####
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+CC = @CC@
+CXX = @CXX@
+ECOS_REPOSITORY = @ECOS_REPOSITORY@
+EXEEXT = @EXEEXT@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MSVC_SRCDIR = @MSVC_SRCDIR@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_DIR = @PACKAGE_DIR@
+PACKAGE_INSTALL = @PACKAGE_INSTALL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+VERSION = @VERSION@
+ecos_CFLAGS = @ecos_CFLAGS@
+ecos_CXXFLAGS = @ecos_CXXFLAGS@
+ecos_INCLUDES = @ecos_INCLUDES@
+ecos_LDADD = @ecos_LDADD@
+ecos_LIBS = @ecos_LIBS@
+ecos_infra_incdir = @ecos_infra_incdir@
+ecos_infra_libdir = @ecos_infra_libdir@
+ecos_libcdl_incdir = @ecos_libcdl_incdir@
+ecos_libcdl_libdir = @ecos_libcdl_libdir@
+ecos_tk_includes = @ecos_tk_includes@
+ecos_tk_libs = @ecos_tk_libs@
+
+AUTOMAKE_OPTIONS = 1.3 foreign
+
+@SUPPORTED_TRUE@AM_CFLAGS = @SUPPORTED_TRUE@@ecos_CFLAGS@ -DECOSYNTH_VERSION=\"@VERSION@\" \
+@SUPPORTED_TRUE@ -DECOS_REPOSITORY=\"@ECOS_REPOSITORY@\" \
+@SUPPORTED_TRUE@ -DLIBEXECDIR=\"$(libexecdir)\" \
+@SUPPORTED_TRUE@ -DPACKAGE_DIR=\"@PACKAGE_DIR@\" \
+@SUPPORTED_TRUE@ -DPACKAGE_VERSION=\"@PACKAGE_VERSION@\" \
+@SUPPORTED_TRUE@ -DPACKAGE_INSTALL=\"@PACKAGE_INSTALL@\"
+@SUPPORTED_TRUE@AM_CXXFLAGS = @SUPPORTED_TRUE@@ecos_CXXFLAGS@
+@SUPPORTED_TRUE@INCLUDES = @SUPPORTED_TRUE@@ecos_INCLUDES@ @ecos_tk_includes@
+@SUPPORTED_TRUE@LIBS = @SUPPORTED_TRUE@@ecos_LIBS@ @ecos_LDADD@
+
+@SUPPORTED_TRUE@synthdir = @SUPPORTED_TRUE@$(libexecdir)/ecos/@PACKAGE_INSTALL@
+@SUPPORTED_TRUE@synth_PROGRAMS = @SUPPORTED_TRUE@ecosynth
+@SUPPORTED_TRUE@synth_DATA = @SUPPORTED_TRUE@ecosynth.tcl default.tdf user_initrc.tcl user_mainrc.tcl \
+@SUPPORTED_TRUE@ console.tcl \
+@SUPPORTED_TRUE@ ecosicon.xbm ecosiconmask.xbm tick_yes.xbm tick_no.xbm \
+@SUPPORTED_TRUE@ save.xbm cut.xbm copy.xbm paste.xbm help.xbm running1.ppm \
+@SUPPORTED_TRUE@ saveall.xbm
+
+@SUPPORTED_TRUE@ecosynth_SOURCES = @SUPPORTED_TRUE@ecosynth.c
+@SUPPORTED_TRUE@ecosynth_LDADD = @SUPPORTED_TRUE@@ecos_tk_libs@
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../acsupport/mkinstalldirs
+CONFIG_CLEAN_FILES =
+@SUPPORTED_TRUE@synth_PROGRAMS = ecosynth$(EXEEXT)
+PROGRAMS = $(synth_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir)
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+@SUPPORTED_TRUE@ecosynth_OBJECTS = ecosynth.$(OBJEXT)
+@SUPPORTED_TRUE@ecosynth_DEPENDENCIES =
+ecosynth_LDFLAGS =
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DATA = $(synth_DATA)
+
+DIST_COMMON = Makefile.am Makefile.in acinclude.m4 aclocal.m4 configure \
+configure.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+DEP_FILES = .deps/ecosynth.P
+SOURCES = $(ecosynth_SOURCES)
+OBJECTS = $(ecosynth_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .o .obj .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
+ cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+mostlyclean-synthPROGRAMS:
+
+clean-synthPROGRAMS:
+ -test -z "$(synth_PROGRAMS)" || rm -f $(synth_PROGRAMS)
+
+distclean-synthPROGRAMS:
+
+maintainer-clean-synthPROGRAMS:
+
+install-synthPROGRAMS: $(synth_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(synthdir)
+ @list='$(synth_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(synthdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(synthdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+
+uninstall-synthPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ list='$(synth_PROGRAMS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(synthdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ done
+
+# FIXME: We should only use cygpath when building on Windows,
+# and only if it is available.
+.c.obj:
+ $(COMPILE) -c `cygpath -w $<`
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+ -rm -f *.$(OBJEXT)
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+ecosynth$(EXEEXT): $(ecosynth_OBJECTS) $(ecosynth_DEPENDENCIES)
+ @rm -f ecosynth$(EXEEXT)
+ $(LINK) $(ecosynth_LDFLAGS) $(ecosynth_OBJECTS) $(ecosynth_LDADD) $(LIBS)
+
+install-synthDATA: $(synth_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(synthdir)
+ @list='$(synth_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(synthdir)/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(synthdir)/$$p; \
+ else if test -f $$p; then \
+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(synthdir)/$$p"; \
+ $(INSTALL_DATA) $$p $(DESTDIR)$(synthdir)/$$p; \
+ fi; fi; \
+ done
+
+uninstall-synthDATA:
+ @$(NORMAL_UNINSTALL)
+ list='$(synth_DATA)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(synthdir)/$$p; \
+ done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ -rm -rf $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ dc_install_base=`cd $(distdir)/=inst && pwd`; \
+ cd $(distdir)/=build \
+ && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) dist
+ -rm -rf $(distdir)
+ @banner="$(distdir).tar.gz is ready for distribution"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"
+dist: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+dist-all: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+distdir: $(DISTFILES)
+ -rm -rf $(distdir)
+ mkdir $(distdir)
+ -chmod 777 $(distdir)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+
+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-include $(DEP_FILES)
+
+mostlyclean-depend:
+
+clean-depend:
+
+distclean-depend:
+ -rm -rf .deps
+
+maintainer-clean-depend:
+
+%.o: %.c
+ @echo '$(COMPILE) -c $<'; \
+ $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-cp .deps/$(*F).pp .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm .deps/$(*F).pp
+
+%.lo: %.c
+ @echo '$(LTCOMPILE) -c $<'; \
+ $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
+ < .deps/$(*F).pp > .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm -f .deps/$(*F).pp
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-synthPROGRAMS install-synthDATA
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-synthPROGRAMS uninstall-synthDATA
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(synthdir) $(DESTDIR)$(synthdir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-synthPROGRAMS mostlyclean-compile \
+ mostlyclean-tags mostlyclean-depend mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-synthPROGRAMS clean-compile clean-tags clean-depend \
+ clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-synthPROGRAMS distclean-compile distclean-tags \
+ distclean-depend distclean-generic clean-am
+
+distclean: distclean-am
+ -rm -f config.status
+
+maintainer-clean-am: maintainer-clean-synthPROGRAMS \
+ maintainer-clean-compile maintainer-clean-tags \
+ maintainer-clean-depend maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+ -rm -f config.status
+
+.PHONY: mostlyclean-synthPROGRAMS distclean-synthPROGRAMS \
+clean-synthPROGRAMS maintainer-clean-synthPROGRAMS \
+uninstall-synthPROGRAMS install-synthPROGRAMS mostlyclean-compile \
+distclean-compile clean-compile maintainer-clean-compile \
+uninstall-synthDATA install-synthDATA tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir \
+mostlyclean-depend distclean-depend clean-depend \
+maintainer-clean-depend info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+@SUPPORTED_TRUE@ecosynth.$(OBJEXT) : Makefile ../src/synth_protocol.h
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/acinclude.m4 b/cesar/ecos/packages/hal/synth/arch/current/host/acinclude.m4
new file mode 100644
index 0000000000..e019ff1b28
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/acinclude.m4
@@ -0,0 +1,46 @@
+dnl Process this file with aclocal to get an aclocal.m4 file. Then
+dnl process that with autoconf.
+dnl ====================================================================
+dnl
+dnl acinclude.m4
+dnl
+dnl ====================================================================
+dnl####COPYRIGHTBEGIN####
+dnl
+dnl ----------------------------------------------------------------------------
+dnl Copyright (C) 2002 Bart Veer
+dnl
+dnl This file is part of the eCos host tools.
+dnl
+dnl This program is free software; you can redistribute it and/or modify it
+dnl under the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 of the License, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but WITHOUT
+dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+dnl more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along with
+dnl this program; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+dnl
+dnl ----------------------------------------------------------------------------
+dnl
+dnl####COPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s): bartv
+dnl Contact(s): bartv
+dnl Date: 2002/08/06
+dnl Version: 0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+dnl Access shared macros.
+dnl AM_CONDITIONAL needs to be mentioned here or else aclocal does not
+dnl incorporate the macro into aclocal.m4
+sinclude(../../../../../../acsupport/acinclude.m4)
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/aclocal.m4 b/cesar/ecos/packages/hal/synth/arch/current/host/aclocal.m4
new file mode 100644
index 0000000000..439c94b5b7
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/aclocal.m4
@@ -0,0 +1,184 @@
+dnl aclocal.m4 generated automatically by aclocal 1.4-p5
+
+dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+dnl Process this file with aclocal to get an aclocal.m4 file. Then
+dnl process that with autoconf.
+dnl ====================================================================
+dnl
+dnl acinclude.m4
+dnl
+dnl ====================================================================
+dnl####COPYRIGHTBEGIN####
+dnl
+dnl ----------------------------------------------------------------------------
+dnl Copyright (C) 2002 Bart Veer
+dnl
+dnl This file is part of the eCos host tools.
+dnl
+dnl This program is free software; you can redistribute it and/or modify it
+dnl under the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 of the License, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but WITHOUT
+dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+dnl more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along with
+dnl this program; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+dnl
+dnl ----------------------------------------------------------------------------
+dnl
+dnl####COPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s): bartv
+dnl Contact(s): bartv
+dnl Date: 2002/08/06
+dnl Version: 0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+dnl Access shared macros.
+dnl AM_CONDITIONAL needs to be mentioned here or else aclocal does not
+dnl incorporate the macro into aclocal.m4
+sinclude(../../../../../../acsupport/acinclude.m4)
+
+# Define a conditional.
+
+AC_DEFUN([AM_CONDITIONAL],
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi])
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AC_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "[$]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "[$]*" != "X $srcdir/configure conftestfile" \
+ && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "[$]2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN([AM_MISSING_PROG],
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+ $1=$2
+ AC_MSG_RESULT(found)
+else
+ $1="$3/missing $2"
+ AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
+
+# serial 1
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT($USE_MAINTAINER_MODE)
+ AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST(MAINT)dnl
+]
+)
+
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/configure b/cesar/ecos/packages/hal/synth/arch/current/host/configure
new file mode 100755
index 0000000000..85329bbeb0
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/configure
@@ -0,0 +1,2079 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer"
+ac_help="$ac_help
+ --enable-debug do a debug rather than a release build"
+ac_help="$ac_help
+ --enable-ansi do an ANSI rather than a unicode build"
+ac_help="$ac_help
+ --with-tcl=<path> location of Tcl header and libraries"
+ac_help="$ac_help
+ --with-tcl-version=<vsn> version of Tcl to be used"
+ac_help="$ac_help
+ --with-tcl-header=<path> location of Tcl header"
+ac_help="$ac_help
+ --with-tcl-lib=<path> location of Tcl libraries"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=ecosynth.c
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../../../../acsupport $srcdir/../../../../../../acsupport; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in ../../../../../../acsupport $srcdir/../../../../../../acsupport" 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+
+ echo $ac_n "checking that a separate build tree is being used""... $ac_c" 1>&6
+echo "configure:563: checking that a separate build tree is being used" >&5
+ ecos_cwd=`/bin/pwd`
+ if test "${srcdir}" = "." ; then
+ srcdir=${ecos_cwd}
+ fi
+ if test "${ecos_cwd}" = "${srcdir}" ; then
+ echo "$ac_t""no" 1>&6
+ { echo "configure: error: This configure script should not be run inside the source tree. Instead please use a separate build tree" 1>&2; exit 1; }
+ else
+ echo "$ac_t""yes" 1>&6
+ fi
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:582: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:614: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:667: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "$*" != "X $srcdir/configure conftestfile" \
+ && test "$*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+ fi
+
+ test "$2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+else
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:724: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+PACKAGE=eCos_synthetic_target_arch
+
+VERSION=0.1
+
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
+
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
+echo "configure:763: checking for working aclocal" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+ ACLOCAL=aclocal
+ echo "$ac_t""found" 1>&6
+else
+ ACLOCAL="$missing_dir/missing aclocal"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:776: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+ AUTOCONF=autoconf
+ echo "$ac_t""found" 1>&6
+else
+ AUTOCONF="$missing_dir/missing autoconf"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake""... $ac_c" 1>&6
+echo "configure:789: checking for working automake" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (automake --version) < /dev/null > /dev/null 2>&1; then
+ AUTOMAKE=automake
+ echo "$ac_t""found" 1>&6
+else
+ AUTOMAKE="$missing_dir/missing automake"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:802: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+ AUTOHEADER=autoheader
+ echo "$ac_t""found" 1>&6
+else
+ AUTOHEADER="$missing_dir/missing autoheader"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:815: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+ MAKEINFO=makeinfo
+ echo "$ac_t""found" 1>&6
+else
+ MAKEINFO="$missing_dir/missing makeinfo"
+ echo "$ac_t""missing" 1>&6
+fi
+
+
+echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
+echo "configure:829: checking whether to enable maintainer-specific portions of Makefiles" >&5
+ # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+ enableval="$enable_maintainer_mode"
+ USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
+
+
+if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+case "${host}" in
+ i[34567]86-*-linux-gnu* ) SUPPORTED="yes";;
+ * ) SUPPORTED="no"
+esac
+
+if test "${SUPPORTED}" = "yes" ; then
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:861: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:891: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:942: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:974: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 985 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1016: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1021: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1049: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
+ for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1085: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CXX="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CXX="$ac_cv_prog_CXX"
+if test -n "$CXX"; then
+ echo "$ac_t""$CXX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$CXX" && break
+done
+test -n "$CXX" || CXX="gcc"
+
+
+echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1117: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 1128 "configure"
+#include "confdefs.h"
+
+int main(){return(0);}
+EOF
+if { (eval echo configure:1133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cxx_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cxx_cross=no
+ else
+ ac_cv_prog_cxx_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cxx_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
+if test $ac_cv_prog_cxx_works = no; then
+ { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1159: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
+cross_compiling=$ac_cv_prog_cxx_cross
+
+echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
+echo "configure:1164: checking whether we are using GNU C++" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.C <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gxx=yes
+else
+ ac_cv_prog_gxx=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gxx" 1>&6
+
+if test $ac_cv_prog_gxx = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+
+ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ac_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS=
+echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
+echo "configure:1192: checking whether ${CXX-g++} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.cc
+if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
+ ac_cv_prog_cxx_g=yes
+else
+ ac_cv_prog_cxx_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS="$ac_save_CXXFLAGS"
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+
+for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat > conftest.$ac_ext <<EOF
+#line 1233 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+int main() {
+exit (42);
+; return 0; }
+EOF
+if { (eval echo configure:1241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ continue
+fi
+rm -f conftest*
+ cat > conftest.$ac_ext <<EOF
+#line 1251 "configure"
+#include "confdefs.h"
+$ac_declaration
+int main() {
+exit (42);
+; return 0; }
+EOF
+if { (eval echo configure:1258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+
+ echo $ac_n "checking for object suffix""... $ac_c" 1>&6
+echo "configure:1275: checking for object suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftest*
+echo 'int i = 1;' > conftest.$ac_ext
+if { (eval echo configure:1281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ for ac_file in conftest.*; do
+ case $ac_file in
+ *.c) ;;
+ *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
+ esac
+ done
+else
+ { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_objext" 1>&6
+OBJEXT=$ac_cv_objext
+ac_objext=$ac_cv_objext
+
+ echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:1299: checking for Cygwin environment" >&5
+if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1304 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
+; return 0; }
+EOF
+if { (eval echo configure:1315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_cygwin=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_cygwin=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_cygwin" 1>&6
+CYGWIN=
+test "$ac_cv_cygwin" = yes && CYGWIN=yes
+echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
+echo "configure:1332: checking for mingw32 environment" >&5
+if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1337 "configure"
+#include "confdefs.h"
+
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:1344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_mingw32=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_mingw32=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_mingw32" 1>&6
+MINGW32=
+test "$ac_cv_mingw32" = yes && MINGW32=yes
+
+
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:1363: checking for executable suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
+ ac_cv_exeext=.exe
+else
+ rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.$ac_ext
+ ac_cv_exeext=
+ if { (eval echo configure:1373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj) ;;
+ *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ else
+ { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ rm -f conftest*
+ test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
+
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
+
+
+ ecos_CFLAGS=""
+ ecos_CXXFLAGS=""
+ ecos_LDADD=""
+ ecos_INCLUDES=""
+ ecos_LIBS=""
+
+
+
+
+
+
+
+
+
+
+
+ echo $ac_n "checking "for Visual C++"""... $ac_c" 1>&6
+echo "configure:1411: checking "for Visual C++"" >&5
+ MSVC="no";
+ if test "${CC}" = "cl" ; then
+ MSVC="yes"
+ CXX="cl"
+ MSVC_SRCDIR=${srcdir}
+
+
+
+ if test "${MSVC}" = "yes" ; then
+ MSVC_SRCDIR=`cygpath -w ${MSVC_SRCDIR} | tr \\\\\\\\ /`
+ fi
+
+
+ ecos_INCLUDES="${ecos_INCLUDES} \"-I${MSVC_SRCDIR}\""
+ ecos_LDADD="-link"
+ ecos_LIBS="advapi32.lib"
+ fi
+
+
+if test "${MSVC}" = "yes"; then
+ MSVC_TRUE=
+ MSVC_FALSE='#'
+else
+ MSVC_TRUE='#'
+ MSVC_FALSE=
+fi
+ if test "${MSVC}" = "yes" ; then
+ echo "$ac_t""unfortunately yes" 1>&6
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+
+
+
+
+
+
+
+ echo $ac_n "checking "the default compiler flags"""... $ac_c" 1>&6
+echo "configure:1451: checking "the default compiler flags"" >&5
+
+ ecosflags_enable_debug="no"
+ # Check whether --enable-debug or --disable-debug was given.
+if test "${enable_debug+set}" = set; then
+ enableval="$enable_debug"
+ case "${enableval}" in
+ yes) ecosflags_enable_debug="yes" ;;
+ *) ecosflags_enable_debug="no" ;;
+ esac
+fi
+
+
+ ecosflags_enable_ansi="no"
+ if test "${MSVC}" = "yes" ; then
+ # Check whether --enable-ansi or --disable-ansi was given.
+if test "${enable_ansi+set}" = set; then
+ enableval="$enable_ansi"
+ case "${enableval}" in
+ yes) ecosflags_enable_ansi="yes" ;;
+ *) ecosflags_enable_ansi="no" ;;
+ esac
+fi
+
+ fi
+
+ if test "${GCC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -pipe -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -pipe -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Woverloaded-virtual"
+ elif test "${MSVC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -nologo -W3"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -nologo -W3 -GR -GX"
+ else
+ { echo "configure: error: "default flags for ${CC} are not known"" 1>&2; exit 1; }
+ fi
+
+ if test "${ecosflags_enable_debug}" = "yes" ; then
+ if test "${GCC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -g -O0"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -g -O0"
+ elif test "${MSVC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -MDd -Zi"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -MDd -Zi"
+ fi
+ else
+ if test "${GCC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -O0"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -O0"
+ elif test "${MSVC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -MD -O2"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -MD -O2"
+ fi
+ fi
+
+ CFLAGS="${ac_save_CFLAGS}"
+ CXXFLAGS="${ac_save_CXXFLAGS}"
+
+ echo "$ac_t""done" 1>&6
+
+
+
+
+
+
+
+ ecos_tk_libs=""
+ ecos_tk_libdir=""
+
+ echo $ac_n "checking for Tcl installation""... $ac_c" 1>&6
+echo "configure:1520: checking for Tcl installation" >&5
+ # Check whether --with-tcl or --without-tcl was given.
+if test "${with_tcl+set}" = set; then
+ withval="$with_tcl"
+ :
+fi
+
+ # Check whether --with-tcl-version or --without-tcl-version was given.
+if test "${with_tcl_version+set}" = set; then
+ withval="$with_tcl_version"
+ :
+fi
+
+
+ if test "${MSVC}" = "yes" ; then
+ # Check whether --with-tcl-header or --without-tcl-header was given.
+if test "${with_tcl_header+set}" = set; then
+ withval="$with_tcl_header"
+ :
+fi
+
+ # Check whether --with-tcl-lib or --without-tcl-lib was given.
+if test "${with_tcl_lib+set}" = set; then
+ withval="$with_tcl_lib"
+ :
+fi
+
+ ecos_tcl_incdir=""
+ ecos_tcl_libdir=""
+ if test "${with_tcl_version+set}" != set ; then
+ { echo "configure: error: You must specify a Tcl version using --with-tcl-version=<vsn>" 1>&2; exit 1; }
+ fi
+ if test "${with_tcl_header+set}" = set ; then
+ ecos_tcl_incdir=${with_tcl_header}
+ elif test "${with_tcl+set}" = set ; then
+ ecos_tcl_incdir="${with_tcl}/include"
+ else
+ { echo "configure: error: You must specify a Tcl installation with either --with-tcl=<path> or --with-tcl-header=<path>" 1>&2; exit 1; }
+ fi
+ if test "${with_tcl_lib+set}" = set; then
+ ecos_tcl_libdir=${with_tcl_lib}
+ elif test "${with_tcl+set}" = set; then
+ ecos_tcl_libdir="${with_tcl}/lib"
+ else
+ { echo "configure: error: You must specify a Tcl installation with either --with-tcl=<path> or --with-tcl-lib=<path>" 1>&2; exit 1; }
+ fi
+
+ if test \! -r "${ecos_tcl_incdir}/tcl.h" ; then
+ { echo "configure: error: unable to locate Tcl header file tcl.h" 1>&2; exit 1; }
+ fi
+
+
+
+
+ if test "${MSVC}" = "yes" ; then
+ ecos_tcl_incdir=`cygpath -w ${ecos_tcl_incdir} | tr \\\\\\\\ /`
+ fi
+
+
+
+
+ if test "${MSVC}" = "yes" ; then
+ ecos_tcl_libdir=`cygpath -w ${ecos_tcl_libdir} | tr \\\\\\\\ /`
+ fi
+
+ ecos_INCLUDES="${ecos_INCLUDES} \"-I${ecos_tcl_incdir}\""
+ ecos_LIBS="${ecos_LIBS} tcl${with_tcl_version}.lib"
+ ecos_LDADD="${ecos_LDADD} \"-libpath=${ecos_tcl_libdir}\""
+
+ ecos_tk_libs=""
+
+ else
+ possibles=""
+ if test "${with_tcl+set}" = set ; then
+ possibles="${with_tcl}/lib"
+ if test "${with_tcl_version+set}" = set ; then
+ possibles="${possibles} ${with_tcl}/lib/tcl${with_tcl_version}"
+ fi
+ fi
+ possibles="${possibles} ${prefix}/lib"
+ if test "${with_tcl_version+set}" = set ; then
+ possibles="${possibles} ${prefix}/lib/tcl${with_tcl_version}"
+ fi
+ possibles="${possibles} /usr/lib"
+ if test "${with_tcl_version+set}" = set ; then
+ possibles="${possibles} /usr/lib/tcl${with_tcl_version}"
+ fi
+
+ tclconfig=""
+ for i in ${possibles}; do
+ if test -r "$i/"tclConfig.sh""; then
+ tclconfig=$i
+ break
+ fi
+ done
+
+ if test \! -r "${tclconfig}/tclConfig.sh" ; then
+ { echo "configure: error: unable to locate Tcl configuration file tclConfig.sh" 1>&2; exit 1; }
+ else
+ . ${tclconfig}/tclConfig.sh
+
+ if test -z "${TCL_INC_DIR}" ; then
+ ecos_tcl_incdir="${TCL_PREFIX}/include"
+ else
+ ecos_tcl_incdir="${TCL_INC_DIR}"
+ fi
+ if test \! -r "${ecos_tcl_incdir}/tcl.h" ; then
+ { echo "configure: error: unable to locate Tcl header file tcl.h" 1>&2; exit 1; }
+ else
+ if test "${ecos_tcl_incdir}" != "/usr/include" ; then
+ ecos_INCLUDES="${ecos_INCLUDES} -I${ecos_tcl_incdir}"
+ fi
+ fi
+
+ if test -z "${TCL_LIB_SPEC}" -a "${with_tcl_version+set}" = set ; then
+
+ libtcl=""
+ for i in ${possibles}; do
+ if test -r "$i/"libtcl${with_tcl_version}.a""; then
+ libtcl=$i
+ break
+ fi
+ done
+
+ if test -r "${libtcl}/libtcl${with_tcl_version}.a" ; then
+ TCL_LIB_SPEC="-L${libtcl} -ltcl${with_tcl_version}"
+ fi
+ fi
+ if test -z "${TCL_LIB_SPEC}" ; then
+
+ libtcl=""
+ for i in ${possibles}; do
+ if test -r "$i/"libtcl.a""; then
+ libtcl=$i
+ break
+ fi
+ done
+
+ if test -r "${libtcl}/libtcl.a" ; then
+ TCL_LIB_SPEC="-L${libtcl} -ltcl"
+ fi
+ fi
+ if test -z "${TCL_LIB_SPEC}" ; then
+ { echo "configure: error: ${tclconfig}/tclConfig.sh does not define TCL_LIB_SPEC" 1>&2; exit 1; }
+ fi
+ ecos_LIBS="${ecos_LIBS} ${TCL_LIB_SPEC}"
+
+ possibles=`echo ${possibles} | sed -e 's,tcl,tk,g'`
+
+ tkconfig=""
+ for i in ${possibles}; do
+ if test -r "$i/"tkConfig.sh""; then
+ tkconfig=$i
+ break
+ fi
+ done
+
+ if test \! -r "${tkconfig}/tkConfig.sh" ; then
+ { echo "configure: error: unable to locate Tk config file tkConfig.sh" 1>&2; exit 1; }
+ else
+ . ${tkconfig}/tkConfig.sh
+ if test -z "${TK_INC_DIR}" ; then
+ if test "${TK_PREFIX}" = "/usr" ; then
+ ecos_tk_includes="${TK_XINCLUDES}"
+ else
+ ecos_tk_includes="-I${TK_PREFIX}/include ${TK_XINCLUDES}"
+ fi
+ else
+ ecos_tk_includes="-I${TK_INC_DIR} ${TK_XINCLUDES}"
+ fi
+
+ if test -z "${TK_LIB_SPEC}" -a "${with_tcl_version+set}" = set ; then
+
+ libtk=""
+ for i in ${possibles}; do
+ if test -r "$i/"libtk${with_tcl_version}.a""; then
+ libtk=$i
+ break
+ fi
+ done
+
+ if test -r "${libtk}/libtk${with_tcl_version}.a" ; then
+ TK_LIB_SPEC="-L${libtk} -ltk${with_tcl_version}"
+ fi
+ fi
+ if test -z "${TK_LIB_SPEC}" ; then
+
+ libtk=""
+ for i in ${possibles}; do
+ if test -r "$i/"libtk.a""; then
+ libtk=$i
+ break
+ fi
+ done
+
+ if test -r "${libtk}/libtk.a" ; then
+ TK_LIB_SPEC="-L${libtk} -ltk"
+ fi
+ fi
+ if test -z "${TK_LIB_SPEC}" ; then
+ { echo "configure: error: ${tkconfig}/tkConfig.sh does not define TK_LIB_SPEC" 1>&2; exit 1; }
+ fi
+ ecos_tk_libs="${TK_LIB_SPEC} ${TK_LIBS}"
+ fi
+ fi
+ fi
+
+ echo "$ac_t""-I${ecos_tcl_incdir} ${TCL_LIB_SPEC}" 1>&6
+
+
+
+ if test "${TK_MAJOR_VERSION}" = "8" ; then
+ if test ${TK_MINOR_VERSION} -lt 3 ; then
+ echo "configure: warning: The synthetic target support requires at least version 8.3 of Tcl/Tk" 1>&2
+ echo "configure: warning: Synthetic target host-side support will not be built" 1>&2
+ SUPPORTED="no"
+ fi
+ fi
+
+
+ package_dir=`cd ${srcdir} && /bin/pwd`
+ PACKAGE_VERSION=`dirname ${package_dir}`
+ PACKAGE_VERSION=`basename ${PACKAGE_VERSION}`
+
+ package_dir=`dirname ${package_dir}`
+ package_dir=`dirname ${package_dir}`
+
+ possibles="${package_dir}/.. ${package_dir}/../.. ${package_dir}/../../.. ${package_dir}/../../../.."
+ possibles="${possibles} ${package_dir}/../../../../.. ${package_dir}/../../../../../.."
+
+ repository_root=""
+ for i in ${possibles}; do
+ if test -d "$i/"acsupport""; then
+ repository_root=$i
+ break
+ fi
+ done
+
+ if test "${repository_root}" = "" ; then
+ { echo "configure: error: Failed to identify this package's position within the eCos repository" 1>&2; exit 1; }
+ fi
+ ECOS_REPOSITORY=`cd "${repository_root}/packages/pkgconf/.." && /bin/pwd`
+
+ PACKAGE_DIR=`echo ${package_dir} | sed -e "s:${ECOS_REPOSITORY}/::"`
+
+ PACKAGE_INSTALL="${PACKAGE_DIR}/${PACKAGE_VERSION}"
+
+
+
+
+
+
+fi
+
+
+
+if test "${SUPPORTED}" = "yes"; then
+ SUPPORTED_TRUE=
+ SUPPORTED_FALSE='#'
+else
+ SUPPORTED_TRUE='#'
+ SUPPORTED_FALSE=
+fi
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "Makefile:Makefile.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
+s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
+s%@MAINT@%$MAINT%g
+s%@CC@%$CC%g
+s%@CXX@%$CXX%g
+s%@OBJEXT@%$OBJEXT%g
+s%@EXEEXT@%$EXEEXT%g
+s%@ecos_CFLAGS@%$ecos_CFLAGS%g
+s%@ecos_CXXFLAGS@%$ecos_CXXFLAGS%g
+s%@ecos_LDADD@%$ecos_LDADD%g
+s%@ecos_INCLUDES@%$ecos_INCLUDES%g
+s%@ecos_LIBS@%$ecos_LIBS%g
+s%@MSVC_SRCDIR@%$MSVC_SRCDIR%g
+s%@MSVC_TRUE@%$MSVC_TRUE%g
+s%@MSVC_FALSE@%$MSVC_FALSE%g
+s%@ecos_tk_includes@%$ecos_tk_includes%g
+s%@ecos_tk_libs@%$ecos_tk_libs%g
+s%@ECOS_REPOSITORY@%$ECOS_REPOSITORY%g
+s%@PACKAGE_DIR@%$PACKAGE_DIR%g
+s%@PACKAGE_VERSION@%$PACKAGE_VERSION%g
+s%@PACKAGE_INSTALL@%$PACKAGE_INSTALL%g
+s%@SUPPORTED_TRUE@%$SUPPORTED_TRUE%g
+s%@SUPPORTED_FALSE@%$SUPPORTED_FALSE%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile:Makefile.in"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/configure.in b/cesar/ecos/packages/hal/synth/arch/current/host/configure.in
new file mode 100644
index 0000000000..d76401a103
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/configure.in
@@ -0,0 +1,96 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl ====================================================================
+dnl
+dnl configure.in
+dnl
+dnl configure script for eCos synthetic target architectural
+dnl host-side support
+dnl
+dnl ====================================================================
+dnl####COPYRIGHTBEGIN####
+dnl
+dnl ----------------------------------------------------------------------------
+dnl Copyright (C) 2002 Bart Veer
+dnl
+dnl This file is part of the eCos synthetic target support.
+dnl
+dnl This program is free software; you can redistribute it and/or modify it
+dnl under the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 of the License, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but WITHOUT
+dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+dnl more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along with
+dnl this program; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+dnl
+dnl ----------------------------------------------------------------------------
+dnl
+dnl####COPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s): bartv
+dnl Contact(s): bartv
+dnl Date: 2002/08/06
+dnl Version: 0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+
+AC_INIT(ecosynth.c)
+
+dnl Pick up the support files from the top-level acsupport directory.
+AC_CONFIG_AUX_DIR(../../../../../../acsupport)
+
+ECOS_CHECK_BUILD_ne_SRC
+AC_CANONICAL_HOST
+AM_INIT_AUTOMAKE(eCos_synthetic_target_arch,0.1,0)
+AM_MAINTAINER_MODE
+
+dnl The current version of the synthetic target is implemented only for
+dnl x86 Linux platforms, so a test is appropriate here. However
+dnl it is not a good idea for the configure script to report an error:
+dnl that would prevent any top-level configury working for other
+dnl platforms. Instead an automake conditional is used to suppress adding
+dnl targets to the build.
+case "${host}" in
+ i[[34567]]86-*-linux-gnu* ) SUPPORTED="yes";;
+ * ) SUPPORTED="no"
+esac
+
+if test "${SUPPORTED}" = "yes" ; then
+ AC_PROG_CC
+ AC_PROG_CXX
+ AC_OBJEXT
+ AC_EXEEXT
+ ECOS_PROG_MSVC
+ ECOS_PROG_STANDARD_COMPILER_FLAGS
+
+ ECOS_PATH_TCL
+ dnl Check that the version of tk is sufficiently recent.
+ dnl For example the text widget's tag -elide facility was
+ dnl added between 8.2 and 8.3. Initial development of
+ dnl the synthetic target used 8.3.1
+ if test "${TK_MAJOR_VERSION}" = "8" ; then
+ if test ${TK_MINOR_VERSION} -lt 3 ; then
+ AC_MSG_WARN([The synthetic target support requires at least version 8.3 of Tcl/Tk])
+ AC_MSG_WARN([Synthetic target host-side support will not be built])
+ SUPPORTED="no"
+ fi
+ fi
+ ECOS_PACKAGE_DIRS
+fi
+
+AM_CONDITIONAL(SUPPORTED, test "${SUPPORTED}" = "yes")
+
+dnl There is no real need for a config.h file at this time, since the code
+dnl is specific to x86 Linux. This may change in future.
+dnl AM_CONFIG_HEADER(config.h:config.h.in)
+
+AC_OUTPUT(Makefile:Makefile.in)
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/console.tcl b/cesar/ecos/packages/hal/synth/arch/current/host/console.tcl
new file mode 100644
index 0000000000..39474a4474
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/console.tcl
@@ -0,0 +1,198 @@
+# {{{ Banner
+
+# ============================================================================
+#
+# console.tcl
+#
+# Console output support for the eCos synthetic target I/O auxiliary
+#
+# ============================================================================
+# ####COPYRIGHTBEGIN####
+#
+# ----------------------------------------------------------------------------
+# Copyright (C) 2002 Bart Veer
+#
+# This file is part of the eCos host tools.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# ----------------------------------------------------------------------------
+#
+# ####COPYRIGHTEND####
+# ============================================================================
+# #####DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Contact(s): bartv
+# Date: 2002/08/07
+# Version: 0.01
+# Description:
+# Implementation of the console device. This script should only ever
+# be run from inside the ecosynth auxiliary.
+#
+# ####DESCRIPTIONEND####
+# ============================================================================
+
+# }}}
+
+# The console device is pretty simple. There can only ever be one
+# instance of the console, and it does not take any initialization
+# data from the target or from command-line arguments. It does
+# look for entries in the target definition file, to set up
+# colours for console output, and to install additional regexp-based
+# filters. The only type of request that can go to the console device
+# is to write some text.
+
+namespace eval ::console {
+
+ variable _pending_output ""
+ variable filter_count 0
+ array set filters [list]
+
+ proc instantiate { id name data } {
+ # There is only console so no name is expected, and the target
+ # cannot provide any initialization data.
+ if { ("" != $name) || ("" != $data) } {
+ synth::report_error "The target has passed invalid data when instantiating the console device.\n"
+ return ""
+ }
+
+ # There are no command line arguments to be processed and consumed.
+
+ # Look for and consume target definition entries related to the console.
+ # These are only actually applicable when running in GUI mode, but
+ # should always be consumed.
+ set console_appearance ""
+
+ if { [synth::tdf_has_device "console"] } {
+ if { [synth::tdf_has_option "console" "appearance"] } {
+ set console_appearance [synth::tdf_get_option "console" "appearance"]
+ }
+
+ if { [synth::tdf_has_option "console" "filter"] } {
+ set tdf_filters [synth::tdf_get_options "console" "filter"]
+ foreach filter $tdf_filters {
+ if { 2 > [llength $filter] } {
+ set msg "Invalid entry in target definition file $synth::target_definition\n"
+ append msg " Device console, option filter takes at least two arguments, a name and a regular expression.\n"
+ synth::report_error $msg
+ } else {
+ # Attempt some minimal validation of the regexp
+ set name [lindex $filter 0]
+ set regexp [lindex $filter 1]
+ set error ""
+ if { [catch { regexp -- $regexp "Hello world\n" } error] } {
+ set msg "Invalid entry in target definition file $synth::target_definition\n"
+ append msg " Device console, filter $name, invalid regular expression\n $error\n"
+ synth::report_error $msg
+ } else {
+ set ::console::filters($::console::filter_count,name) $name
+ set ::console::filters($::console::filter_count,regexp) $regexp
+ set ::console::filters($::console::filter_count,appearance) [lrange $filter 2 end]
+ incr ::console::filter_count
+ }
+ }
+ }
+ }
+ }
+
+ # If the GUI is enabled then set up a filter for the console, and
+ # any additional filters specified in the target definition file
+ # for e.g. trace output.
+ if { $synth::flag_gui } {
+ if { [synth::filter_exists "console" ] } {
+ synth::report_warning "The console device script [info script] cannot create a filter for \"console\".\nThis filter already exists.\n"
+ } elseif { "" == $console_appearance } {
+ synth::filter_add "console"
+ } else {
+ array set parsed_options [list]
+ set message ""
+ if { ![synth::filter_parse_options $console_appearance parsed_options message] } {
+ synth::report_error \
+ "Invalid entry in target definition file $synth::target_definition\
+ \n synth_device \"console\", entry \"appearance\"\n$message"
+ } else {
+ synth::filter_add_parsed "console" parsed_options
+ }
+ }
+
+ for { set i 0 } { $i < $::console::filter_count } { incr i } {
+ set name $::console::filters($i,name)
+ set appearance $::console::filters($i,appearance)
+ array unset parsed_options
+ array set parsed_options [list]
+
+ if { [synth::filter_exists $name] } {
+ synth::report_warning "The console device script [info script] cannot create a filter for \"$name\".\nThis filter already exists.\n"
+ } else {
+ set message ""
+ if { ![synth::filter_parse_options $appearance parsed_options message] } {
+ synth::report_error \
+ "Invalid entry in target definition file $synth::target_definition\
+ \n synth_device \"console\", entry filter $name\n$message"
+ } else {
+ synth::filter_add_parsed $name parsed_options
+ }
+ }
+ }
+ }
+
+ # An instantiation function should return a handler for further requests
+ # to this device instance.
+ return console::handle_request
+ }
+
+ proc handle_request { id reqcode arg1 arg2 reqdata reqlen reply_len } {
+ # Unfortunately the main eCos diagnostic code assumes it is
+ # talking to a tty in raw mode, since typically the output
+ # will go via the gdb output window. Hence it will have inserted
+ # carriage returns which are best filtered out here.
+ set reqdata [string map {"\r" " "} $reqdata]
+
+ # The output should be processed one line at a time, to make it
+ # easier to write the regexp filters.
+ append console::_pending_output $reqdata
+ while { -1 != [string first "\n" $console::_pending_output] } {
+ set regexp_matched 0
+ set index [string first "\n" $console::_pending_output]
+ set line [string range $console::_pending_output 0 $index]
+ set ::console::_pending_output [string range $console::_pending_output [expr $index + 1] end]
+
+ for { set i 0 } { !$regexp_matched && ($i < $console::filter_count) } { incr i } {
+ if { [regexp -- $console::filters($i,regexp) $line] } {
+ synth::output $line $console::filters($i,name)
+ set regexp_matched 1
+ }
+ }
+ if { ! $regexp_matched } {
+ synth::output $line "console"
+ }
+ }
+ }
+
+ # Deal with the case where eCos has exited after sending only part
+ # of a line, which is still pending. In practice this has no
+ # effect at present because the data is still buffered inside
+ # eCos.
+ proc _flush { arg_list } {
+ if { "" != $console::_pending_output } {
+ synth::output "$console::_pending_output\n" "console"
+ }
+ }
+ synth::hook_add "ecos_exit" console::_flush
+
+}
+
+return console::instantiate
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/copy.xbm b/cesar/ecos/packages/hal/synth/arch/current/host/copy.xbm
new file mode 100644
index 0000000000..92df79f64b
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/copy.xbm
@@ -0,0 +1,6 @@
+#define copy_width 16
+#define copy_height 15
+static unsigned char copy_bits[] = {
+ 0x00, 0x00, 0x7e, 0x00, 0xc2, 0x00, 0x42, 0x01, 0xda, 0x0f, 0x82, 0x30,
+ 0xfa, 0xd0, 0x82, 0xf6, 0xfa, 0x80, 0x82, 0xbe, 0xfe, 0x80, 0x80, 0xbe,
+ 0x80, 0x80, 0x80, 0xff, 0x00, 0x00};
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/cut.xbm b/cesar/ecos/packages/hal/synth/arch/current/host/cut.xbm
new file mode 100644
index 0000000000..93a0fcf25a
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/cut.xbm
@@ -0,0 +1,6 @@
+#define cut_width 16
+#define cut_height 15
+static unsigned char cut_bits[] = {
+ 0x00, 0x00, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x60, 0x03, 0x40, 0x01,
+ 0xc0, 0x01, 0x80, 0x00, 0xc0, 0x00, 0x40, 0x07, 0x70, 0x09, 0x48, 0x09,
+ 0x48, 0x09, 0x48, 0x06, 0x30, 0x00};
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/default.tdf b/cesar/ecos/packages/hal/synth/arch/current/host/default.tdf
new file mode 100644
index 0000000000..485b68047d
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/default.tdf
@@ -0,0 +1,43 @@
+# Default synthetic target hardware definition file. This file gets
+# installed alongside ecosynth.tcl and other support files in the
+# directory $(libexecdir)/ecos/hal_synth_arch_<version>.
+#
+# The synthetic target support will look for the target definition
+# file in various places: first the current directory, then
+# ~/.ecos/synth, finally the install location as above. It assumes the
+# file is called "default.tdf", unless this is overwritten on the
+# command line using the -t or --target option. Typically users will
+# make a copy of the default target definition in an appropriate
+# location and then modify this copy as required.
+#
+# This file only contains support for those devices supported by the
+# core package: the console, ... Additional devices such as the
+# ethernet support which live in separate eCos packages may have their
+# own example fragments which can be inserted in the user's own target
+# definition file, directly or via e.g. a Tcl "source" command.
+#
+# This file is executed in a Tcl interpreter with an additional
+# command "synth_device", so Tcl syntax applies and the full
+# functionality provided by Tcl interpreters is available if desired.
+
+# ----------------------------------------------------------------------------
+# The console device. This serves as the destination for low-level
+# eCos text output, for example from the diag_printf() function,
+# and is intended primarily for diagnostics and debugging.
+#
+# The appearance of normal console output can be controlled by
+# the "appearance" option. This takes the standard arguments for
+# text filters, for example -foreground and -background.
+#
+# It is also possible to install new filters for specific types
+# of output, for example eCos tracing output. Each such filter
+# is defined by a name, a regular expression, and details of
+# the desired appearance. Every line of console output generated
+# by eCos is matched against the various regular expressions,
+# and the first match found controls the appearance of the
+# output.
+
+synth_device console {
+ # appearance -foreground white -background black
+ filter trace {^TRACE:.*} -foreground HotPink1 -hide 1
+} \ No newline at end of file
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/ecosicon.xbm b/cesar/ecos/packages/hal/synth/arch/current/host/ecosicon.xbm
new file mode 100644
index 0000000000..cc7f5632ba
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/ecosicon.xbm
@@ -0,0 +1,10 @@
+#define ecosicon_width 40
+#define ecosicon_height 16
+static unsigned char ecosicon_bits[] = {
+ 0xfc, 0xff, 0xab, 0xaa, 0x2a, 0xfe, 0xff, 0x53, 0x55, 0x55, 0xff, 0xff,
+ 0xab, 0xaa, 0xaa, 0x87, 0x1f, 0x52, 0x50, 0x40, 0x03, 0x0f, 0x28, 0x20,
+ 0x80, 0x71, 0xc6, 0x11, 0x41, 0x14, 0x79, 0xe6, 0x8b, 0x22, 0xaa, 0x01,
+ 0xe6, 0x17, 0x45, 0x40, 0x01, 0xe6, 0x8f, 0xa2, 0x80, 0xf9, 0xe7, 0x13,
+ 0x45, 0x15, 0x79, 0xc6, 0x09, 0x22, 0x8a, 0x03, 0x0e, 0x10, 0x50, 0x00,
+ 0x07, 0x1f, 0x2a, 0xa8, 0x80, 0xff, 0xff, 0x53, 0x55, 0x55, 0xfe, 0xff,
+ 0xab, 0xaa, 0x2a, 0xfc, 0xff, 0x53, 0x55, 0x15};
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/ecosiconmask.xbm b/cesar/ecos/packages/hal/synth/arch/current/host/ecosiconmask.xbm
new file mode 100644
index 0000000000..4c143a222f
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/ecosiconmask.xbm
@@ -0,0 +1,10 @@
+#define ecosiconmask_width 40
+#define ecosiconmask_height 16
+static unsigned char ecosiconmask_bits[] = {
+ 0xfc, 0xff, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff,
+ 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0x3f};
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/ecosynth.c b/cesar/ecos/packages/hal/synth/arch/current/host/ecosynth.c
new file mode 100644
index 0000000000..fba043e4e6
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/ecosynth.c
@@ -0,0 +1,366 @@
+//============================================================================
+//
+// ecosynth.c
+//
+// The eCos synthetic target I/O auxiliary
+//
+//============================================================================
+//####COPYRIGHTBEGIN####
+//
+// ----------------------------------------------------------------------------
+// Copyright (C) 2002 Bart Veer
+//
+// This file is part of the eCos host tools.
+//
+// This program is free software; you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 of the License, or (at your option)
+// any later version.
+//
+// This program is distributed in the hope that it will be useful, but WITHOUT
+// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+// more details.
+//
+// You should have received a copy of the GNU General Public License along with
+// this program; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// ----------------------------------------------------------------------------
+//
+//####COPYRIGHTEND####
+//============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contact(s): bartv
+// Date: 2002-08-05
+// Version: 0.01
+// Description:
+//
+// The main module for the eCos synthetic target auxiliary. This
+// program is fork'ed and execve'd during the initialization phase of
+// any synthetic target application, and is primarily responsible for
+// I/O operations. This program should never be run directly by a
+// user.
+//
+//####DESCRIPTIONEND####
+//============================================================================
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <signal.h>
+#include <limits.h>
+#include <unistd.h>
+#include <assert.h>
+#include <fcntl.h>
+#include <sys/param.h>
+#include <sys/types.h>
+// Avoid compatibility problems with Tcl 8.4 vs. earlier
+#define USE_NON_CONST
+#include <tcl.h>
+#include <tk.h>
+
+// The protocol between host and target is defined by a private
+// target-side header.
+#include "../src/synth_protocol.h"
+
+// ----------------------------------------------------------------------------
+// Statics etc.
+#define PROGNAME "Synthetic target auxiliary"
+
+static int no_windows = 0; // -nw arg
+
+static pid_t parent_pid;
+
+// ----------------------------------------------------------------------------
+// Overview.
+//
+// When a synthetic target application is executed, whether directly
+// or from inside gdb, it can fork() and execve() the synthetic
+// target auxiliary: this program, ecosynth. For now this is disabled
+// by default but can be enabled using a --io option on the command line.
+// In future it may be enabled by default, but can be suppressed using
+// --nio.
+//
+// stdin, stdout, and stderr will be inherited from the eCos application, so
+// that attempts to use printf() or fprintf(stderr, ) from inside the
+// auxiliary or its helper applications work as expected. In addition file
+// descriptor 3 will be a pipe from the eCos application, and file descriptor
+// 4 will be a pipe to the application. The protocol defined in
+// ../src/synth_protocol.h runs over these pip
+//
+// argv[] and environ are also as per the application, with the exception
+// of argv[0] which is the full path to this application.
+//
+// The bulk of the hard work is done inside Tcl. The C++ code is
+// responsible only for initialization and for implementing some
+// additional commands, for example to send a SIGIO signal to the
+// parent when there is a new pending interrupt. The primary script is
+// ecosynth.tcl which should be installed alongside the executable.
+//
+// This code makes use of the standard Tcl initialization facilities:
+//
+// 1) main() calls Tcl_Main() with the command-line arguments and an
+// application-specific initialization routine ecosynth_appinit().
+//
+// 2) Tcl_Main() goes through the initialization sequence in generic/tclMain.c.
+// There is one slight complication: Tcl_main() interprets arguments in
+// a way that makes sense for tclsh, but not for ecosynth. Specially if
+// argv[1] exists and does not begin with a - then it will be interpreted
+// as a script to be executed. Hence argv[] is re-allocated and the name
+// of a suitable script is inserted.
+//
+// 3) ecosynth_appinit() initializes the Tcl interpreter, and optionally
+// the Tk interpreter as well. This is controlled by the presence of
+// a -nw argument on the command line. This initialization routine
+// also takes care of adding some commands to the Tcl interpreter.
+//
+// 4) Tcl_Main() will now proceed to execute the startup script, which
+// is eccentric.tcl installed in the libexec directory.
+
+static int ecosynth_appinit(Tcl_Interp*);
+
+int
+main(int argc, char** argv)
+{
+ char ecosynth_tcl_path[_POSIX_PATH_MAX];
+ char** new_argv;
+ int i;
+
+ parent_pid = getppid();
+
+ // The various core Tcl scripts are installed in the same
+ // directory as ecosynth. The Tcl script itself will check whether
+ // there is a newer version of itself in the source tree and
+ // switch to that instead.
+ assert((strlen(LIBEXECDIR) + strlen(PACKAGE_INSTALL) + 20) < _POSIX_PATH_MAX);
+ strcpy(ecosynth_tcl_path, LIBEXECDIR);
+ strcat(ecosynth_tcl_path, "/ecos/");
+ strcat(ecosynth_tcl_path, PACKAGE_INSTALL);
+ strcat(ecosynth_tcl_path, "/ecosynth.tcl");
+
+ // Installation sanity checks.
+ if (0 != access(ecosynth_tcl_path, F_OK)) {
+ fprintf(stderr, PROGNAME ": error, a required Tcl script has not been installed.\n");
+ fprintf(stderr, " The script is \"%s\"\n", ecosynth_tcl_path);
+ exit(EXIT_FAILURE);
+ }
+ if (0 != access(ecosynth_tcl_path, R_OK)) {
+ fprintf(stderr, PROGNAME ": error, no read access to a required Tcl script.\n");
+ fprintf(stderr, " The script is \"%s\"\n", ecosynth_tcl_path);
+ exit(EXIT_FAILURE);
+ }
+
+ // Look for options -nw and -w. This information is needed by the appinit() routine.
+ no_windows = 0;
+ for (i = 1; i < argc; i++) {
+ if ((0 == strcmp("-nw", argv[i])) || (0 == strcmp("--nw", argv[i])) ||
+ (0 == strcmp("-no-windows", argv[i])) || (0 == strcmp("--no-windows", argv[i]))) {
+ no_windows = 1;
+ } else if ((0 == strcmp("-w", argv[i])) || (0 == strcmp("--w", argv[i])) ||
+ (0 == strcmp("-windows", argv[i])) || (0 == strcmp("--windows", argv[i]))) {
+ no_windows = 0;
+ }
+ }
+
+ new_argv = malloc((argc+2) * sizeof(char*));
+ if (NULL == new_argv) {
+ fprintf(stderr, PROGNAME ": internal error, out of memory.\n");
+ exit(EXIT_FAILURE);
+ }
+ new_argv[0] = argv[0];
+ new_argv[1] = ecosynth_tcl_path;
+ for (i = 1; i < argc; i++) {
+ new_argv[i+1] = argv[i];
+ }
+ new_argv[i+1] = NULL;
+
+ // Ignore SIGINT requests. Those can happen if e.g. the application is
+ // ctrl-C'd or if a gdb session is interrupted because this process is
+ // a child of the eCos application. Instead the normal code for handling
+ // application termination needs to run.
+ signal(SIGINT, SIG_IGN);
+
+ // Similarly ignore SIGTSTP if running in graphical mode, it would
+ // be inappropriate for the GUI to freeze if the eCos application is
+ // suspended. If running in text mode then it is better for both
+ // the application and the I/O auxiliary to freeze, halting any further
+ // output.
+ if (!no_windows) {
+ signal(SIGTSTP, SIG_IGN);
+ }
+
+ Tcl_Main(argc+1, new_argv, &ecosynth_appinit);
+ return EXIT_SUCCESS;
+}
+
+
+// ----------------------------------------------------------------------------
+// Commands for the Tcl interpreter. These are few and far between because
+// as much work as possible is done in Tcl.
+
+// Send a SIGIO signal to the parent process. This is done whenever a new
+// interrupt is pending. There is a possibility of strange behaviour if
+// the synthetic target application is exiting at just the wrong moment
+// and this process has become a zombie. An alternative approach would
+// involve loading the Extended Tcl extension.
+static int
+ecosynth_send_SIGIO(ClientData clientData __attribute__ ((unused)),
+ Tcl_Interp* interp,
+ int argc,
+ char** argv __attribute__ ((unused)))
+{
+ if (1 != argc) {
+ Tcl_SetResult(interp, "wrong # args: should be \"usbtest::_send_SIGIO\"" , TCL_STATIC);
+ return TCL_ERROR;
+ }
+
+ (void) kill(parent_pid, SIGIO);
+ return TCL_OK;
+}
+
+// Similarly send a SIGKILL (-9) to the parent process. This allows the GUI
+// code to kill of the eCos application
+static int
+ecosynth_send_SIGKILL(ClientData clientData __attribute__ ((unused)),
+ Tcl_Interp* interp,
+ int argc,
+ char** argv __attribute__ ((unused)))
+{
+ if (1 != argc) {
+ Tcl_SetResult(interp, "wrong # args: should be \"usbtest::_send_SIGIO\"" , TCL_STATIC);
+ return TCL_ERROR;
+ }
+
+ (void) kill(parent_pid, SIGKILL);
+ return TCL_OK;
+}
+
+
+// ----------------------------------------------------------------------------
+// Application-specific initialization.
+
+static int
+ecosynth_appinit(Tcl_Interp* interp)
+{
+ Tcl_Channel from_app;
+ Tcl_Channel to_app;
+
+ // Tcl library initialization. This has the effect of executing init.tcl,
+ // thus setting up package load paths etc. Not all of that initialization
+ // is necessarily appropriate for ecosynth, but some devices may well want
+ // to load in additional packages or whatever.
+ if (Tcl_Init(interp) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ // Optionally initialize Tk as well. This can be suppressed by an
+ // argument -nw. Possibly this could be done by the Tcl script
+ // instead using dynamic loading.
+ //
+ // There is a problem with the way that Tk does its argument processing.
+ // By default it will accept abbreviations for the standard wish arguments,
+ // so if the user specifies e.g. -v then the Tk code will interpret this
+ // as an abbreviation for -visual, and will probably complain because
+ // -visual takes an argument whereas ecosynth's -v is just a flag.
+ //
+ // The Tk argument processing can be suppressed simply by temporarily
+ // getting rid of the argv variable. The disadvantage is that some
+ // standard arguments now have to be processed explicitly:
+ //
+ // -colormap map ignored, of little interest these days
+ // -display display currently ignored. This would have to be
+ // implemented at the C level, not the Tcl level,
+ // since Tk_Init() will start interacting with the
+ // X server. Its implementation would involve a
+ // setenv() call.
+ // -geometry geom implemented in the Tcl code using "wm geometry"
+ // -name name ignored for now.
+ // -sync ignored, of little interest to typical users
+ // -use id ignored, probably of little interest for now
+ // -visual visual ignored, of little interest these days
+ //
+ // so actually the only extra work that is required is for the Tcl code
+ // to process -geometry.
+ if (!no_windows) {
+ Tcl_Obj* argv = Tcl_GetVar2Ex(interp, "argv", NULL, TCL_GLOBAL_ONLY);
+ Tcl_IncrRefCount(argv);
+ Tcl_UnsetVar(interp, "argv", TCL_GLOBAL_ONLY);
+ if (Tk_Init(interp) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ Tcl_SetVar2Ex(interp, "argv", NULL, argv, TCL_GLOBAL_ONLY);
+ Tcl_DecrRefCount(argv);
+ }
+
+ // Create the synth:: namespace. Currently this does not seem to be possible from
+ // inside C.
+ if (TCL_OK != Tcl_Eval(interp,
+ "namespace eval synth {\n"
+ " variable channel_from_app 0\n"
+ " variable channel_to_app 0\n"
+ "}\n")) {
+ fprintf(stderr, PROGNAME ": internal error, failed to create Tcl synth:: namespace\n");
+ fprintf(stderr, " Please check Tcl version (8.3 or later required).\n");
+ exit(EXIT_FAILURE);
+ }
+
+ // The pipe to/from the application is exposed to Tcl, allowing
+ // the main communication to be handled at the Tcl level and
+ // specifically via the event loop. This requires two additional
+ // Tcl channels to be created for file descriptors 3 and 4.
+ from_app = Tcl_MakeFileChannel((ClientData) 3, TCL_READABLE);
+ if (NULL == from_app) {
+ fprintf(stderr, PROGNAME ": internal error, failed to create Tcl channel for pipe from application.\n");
+ exit(EXIT_FAILURE);
+ }
+ Tcl_RegisterChannel(interp, from_app);
+
+ // The channel name will be something like file0. Add a variable to the
+ // interpreter to store this name.
+ if (NULL == Tcl_SetVar(interp, "synth::_channel_from_app", Tcl_GetChannelName(from_app), TCL_GLOBAL_ONLY)) {
+ fprintf(stderr, PROGNAME ": internal error, failed to create Tcl variable from application channel 0\n");
+ exit(EXIT_FAILURE);
+ }
+
+ // Repeat for the channel to the application.
+ to_app = Tcl_MakeFileChannel((ClientData) 4, TCL_WRITABLE);
+ if (NULL == to_app) {
+ fprintf(stderr, PROGNAME ": internal error, failed to create Tcl channel for pipe to application.\n");
+ exit(EXIT_FAILURE);
+ }
+ Tcl_RegisterChannel(interp, to_app);
+ if (NULL == Tcl_SetVar(interp, "synth::_channel_to_app", Tcl_GetChannelName(to_app), TCL_GLOBAL_ONLY)) {
+ fprintf(stderr, PROGNAME ": internal error, failed to create Tcl variable from application channel 1\n");
+ exit(EXIT_FAILURE);
+ }
+
+ // The auxiliary may spawn additional programs, via
+ // device-specific scripts. Those programs should not have
+ // direct access to the pipe - that would just lead to
+ // confusion.
+ fcntl(3, F_SETFD, FD_CLOEXEC);
+ fcntl(4, F_SETFD, FD_CLOEXEC);
+
+ // Add synthetic target-specific commands to the Tcl interpreter.
+ Tcl_CreateCommand(interp, "synth::_send_SIGIO", &ecosynth_send_SIGIO, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL);
+ Tcl_CreateCommand(interp, "synth::_send_SIGKILL", &ecosynth_send_SIGKILL, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL);
+
+ // Define additional variables.
+
+ // The version, from the AM_INIT_AUTOMAKE() macro in configure.in
+ Tcl_SetVar(interp, "synth::_ecosynth_version", ECOSYNTH_VERSION, TCL_GLOBAL_ONLY);
+
+ // The parent process id, i.e. that for the eCos application itself.
+ Tcl_SetVar2Ex(interp, "synth::_ppid", NULL, Tcl_NewIntObj(getppid()), TCL_GLOBAL_ONLY);
+
+ // The various directories
+ Tcl_SetVar(interp, "synth::_ecosynth_repository", ECOS_REPOSITORY, TCL_GLOBAL_ONLY);
+ Tcl_SetVar(interp, "synth::_ecosynth_libexecdir", LIBEXECDIR, TCL_GLOBAL_ONLY);
+ Tcl_SetVar(interp, "synth::_ecosynth_package_dir", PACKAGE_DIR, TCL_GLOBAL_ONLY);
+ Tcl_SetVar(interp, "synth::_ecosynth_package_version", PACKAGE_VERSION, TCL_GLOBAL_ONLY);
+ Tcl_SetVar(interp, "synth::_ecosynth_package_install", PACKAGE_INSTALL, TCL_GLOBAL_ONLY);
+
+ return TCL_OK;
+}
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/ecosynth.tcl b/cesar/ecos/packages/hal/synth/arch/current/host/ecosynth.tcl
new file mode 100644
index 0000000000..54ec6bdbde
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/ecosynth.tcl
@@ -0,0 +1,3292 @@
+# {{{ Banner
+
+# ============================================================================
+#
+# ecosynth.tcl
+#
+# The eCos synthetic target I/O auxiliary
+#
+# ============================================================================
+# ####COPYRIGHTBEGIN####
+#
+# ----------------------------------------------------------------------------
+# Copyright (C) 2002 Bart Veer
+#
+# This file is part of the eCos host tools.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# ----------------------------------------------------------------------------
+#
+# ####COPYRIGHTEND####
+# ============================================================================
+# #####DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Contact(s): bartv
+# Date: 2002/08/05
+# Version: 0.01
+# Description:
+# The main script for the eCos synthetic target auxiliary. This should
+# only ever be invoked from inside ecosynth.
+#
+# ####DESCRIPTIONEND####
+# ============================================================================
+
+# }}}
+
+# {{{ Overview
+
+# When an eCos synthetic target application runs it will usually
+# fork/execve an auxiliary program, ecosynth, to provide certain
+# I/O functionality. This happens as part of hardware initialization.
+#
+# The ecosynth executable in turn runs this ecosynth.tcl script which
+# either does most of the real work or delegates it to other scripts.
+# Those other scripts may in turn exec other programs to perform any
+# I/O operations that cannot easily be done at the Tcl level. For
+# example performing low-level ethernet operations generally requires
+# working at the C level or equivalent, so a separate executable would
+# be appropriate. The ecosynth executable will transfer control to
+# this script after the appinit() call, which should have performed
+# certain initialization steps.
+#
+# 1) the Tcl interpreter will be fully initialized.
+#
+# 2) usually Tk will have been loaded and initialized as well. This
+# can be suppressed using a command-line option -nw.
+#
+# 3) there will be a namespace synth:: for use by ecosynth.tcl
+# Auxiliary scripts are expected to use their own namespace
+# where possible.
+#
+# 4) there will be two channels synth::_channel_from_app and
+# synth::_channel_to_app. These correspond to a pipe between
+# the eCos application and the auxiliary. The application will
+# send requests using this pipe and expect replies. I/O
+# operations are always initiated by a request from the
+# application, but the auxiliary can raise an interrupt via
+# the SIGIO signal.
+#
+# Other standard channels stdin, stdout and stderr will have
+# been inherited from the eCos application.
+#
+# 5) some Tcl commands implemented in C will have been added to the
+# interpreter. The most notable is synth::_send_SIGIO, used to
+# raise an interrupt within the application.
+#
+# 6) similarly some variables will have been added to the interpreter.
+#
+#
+# Configuring everything can get somewhat complicated. It is the eCos
+# application that knows what I/O facilities within the auxiliary it
+# wants to access, but it may not know all the details. The eCos
+# component architecture makes things a bit more complicated still,
+# generic code such as this ecosynth.tcl script has no way of knowing
+# what I/O facilities might be provided by some package or other.
+#
+# For example, a target-side ethernet driver may want to send outgoing
+# ethernet packets to some script or program on the host and receive
+# incoming ethernet packets. However it does not necessarily know what
+# the host-side should do with those ethernet packets, e.g. use a
+# spare Linux ethernet device, use the Linux kernel's ethertap
+# facility, ... Although that kind of information could be handled by
+# target-side configury, host-side configuration files will often be
+# more appropriate. Specifically it would allow a single eCos
+# synthetic target application to run in a variety of environments,
+# using different ways to provide the I/O, with no need to do any
+# reconfiguring or rebuilding of the target side.
+#
+#
+# The basic approach that is taken is:
+#
+# 1) the eCos application tells the auxiliary what I/O facilities
+# it is interested in. This should happen as a result
+# of static constructors or of device driver initialization
+# routines. The application has no control over the implementation
+# of the I/O facilities, it just expects something on the other
+# end to respond sensibly to requests.
+#
+# For example, a synthetic target ethernet driver will supply
+# an initialization routine via its NETDEVTAB_ENTRY. This
+# routine will send a request to the auxiliary asking for a
+# device of type ethernet, id "eth0", provided by
+# CYGPKG_DEVS_ETH_ECOSYNTH, version current. The auxiliary will
+# now attempt to load a suitable Tcl script ethernet.tcl from a
+# location determined using the package name and version.
+#
+# 2) there is a primary target definition file which can be
+# specified as the final argument on the command line, with
+# "default" being the default value. The code will look for
+# this file with or without a .tdf extension, first in the
+# current directory, then in ~/.ecos/synth/. This file is
+# actually a Tcl script that gets executed in the current
+# interpreter. However typically it will only contain
+# entries such as:
+#
+# synth_device eth0 {
+# ...
+# }
+#
+# 3) There are additional optional configuration files
+# ~/.ecos/synth/initrc.tcl and ~/.ecos/synth/mainrc.tcl which can
+# be used for further customization. initrc.tcl will get run
+# early on, mainrc.tcl will get run once initialization is
+# complete. Specifically the target-side code will send an
+# appropriate request after invoking all the static constructors.
+# At this time the auxiliary will run mainrc.tcl, and in addition
+# it may issue warnings about unused arguments etc.
+#
+# 4) there may also be separate configuration files for GUI
+# preferences etc. These are distinct from the initrc and
+# mainrc files in that they are generated rather than
+# hand-written.
+
+# }}}
+# {{{ Basic initialization
+
+# ----------------------------------------------------------------------------
+# There should be two channels corresponding to the pipe between the
+# eCos application and the auxiliary. These should be configured
+# appropriately. If either channel does not exist then that is a
+# very good indication that the system is not properly initialized,
+# i.e. that this script is not being run by the ecosynth executable
+# and by implication that no eCos application is involved.
+
+if {([info exists synth::_channel_to_app] == 0) ||
+ ([info exists synth::_channel_from_app] == 0) ||
+ ([info exists synth::_ecosynth_version] == 0) ||
+ ([info exists synth::_ppid] == 0) ||
+ ([info exists synth::_ecosynth_repository] == 0) ||
+ ([info exists synth::_ecosynth_libexecdir] == 0) ||
+ ([info exists synth::_ecosynth_package_dir] == 0) ||
+ ([info exists synth::_ecosynth_package_version] == 0) ||
+ ([info exists synth::_ecosynth_package_install] == 0) ||
+ ([info commands synth::_send_SIGIO] == "") ||
+ ([info commands synth::_send_SIGKILL] == "") } {
+
+ puts stderr "ecosynth.tcl: the current interpreter has not been properly initialized."
+ puts stderr " This script should only be invoked by the ecosynth executable when"
+ puts stderr " an eCos synthetic target application is run."
+ exit 1
+}
+
+# Is the script currently being executed the most recent version?
+# This check should only happen if an environment variable
+# ECOSYNTH_DEVEL is set, because the installed tools may have come
+# from somewhere other than the current repository.
+if { [info exists ::env(ECOSYNTH_DEVEL)] } {
+ set _orig_name [file join $synth::_ecosynth_repository $synth::_ecosynth_package_dir $synth::_ecosynth_package_version \
+ "host" [file tail [info script]]]
+ if { [file exists $_orig_name] && [file readable $_orig_name] && ($_orig_name != [info script]) } {
+ if { [file mtime $_orig_name] >= [file mtime [info script]] } {
+ puts "$_orig_name is more recent than install: executing that."
+ source $_orig_name
+ return
+ }
+ }
+ unset _orig_name
+}
+
+fconfigure $synth::_channel_to_app -buffering none
+fconfigure $synth::_channel_from_app -encoding binary
+fconfigure $synth::_channel_to_app -encoding binary
+fconfigure $synth::_channel_from_app -translation binary
+fconfigure $synth::_channel_to_app -translation binary
+
+# Define additional globals and procedures inside the synth:: namespace.
+# Variables and functions that begin with an _ are considered internal
+# and should not be used directly.
+namespace eval synth {
+
+ # Unfortunately the name of the eCos executable is lost at this stage.
+ # Within the eCos application it was held in argv[0], but that has been
+ # overridden with the name of the auxiliary. However we have access to the
+ # parent process id so we can use /proc to get the required information.
+ variable ecos_appname ""
+ catch {
+ set synth::ecos_appname [file readlink "/proc/[set synth::_ppid]/exe"]
+ set synth::ecos_appname [file tail $synth::ecos_appname]
+ }
+
+ # The install location can be determined from the script name.
+ # This is used for e.g. loading bitmaps, even if ECOSYNTH_DEVEL
+ # is set, because some of the files may be generated.
+ # ECOSYNTH_DEVEL only affects Tcl scripts.
+ variable install_dir [file join $synth::_ecosynth_libexecdir "ecos" $synth::_ecosynth_package_install]
+
+ # Is the eCos application still running? This is worth keeping
+ # track of so that send_reply and raise_interrupt do not try to
+ # interact with a program that is no longer running.
+ variable ecos_running 1
+
+ # This variable is used to enter the event loop
+ variable _ecosynth_exit 0
+
+ # Is GUI mode enabled?
+ variable flag_gui [expr { "" != [info commands "tk"] } ]
+
+ # When running in GUI mode the GUI should stay up even after the application
+ # has exited, so that the user can take a good look around. When running in
+ # non-GUI mode this program should exit as soon it has finished cleaning up.
+ variable flag_immediate_exit [expr { 0 == $synth::flag_gui} ]
+
+ # Is the GUI ready to accept output?
+ variable flag_gui_ready 0
+
+ # Flags and variables related to command-line arguments
+ variable flag_help 0
+ variable flag_keep_going 0
+ variable flag_no_rc 0
+ variable flag_verbose 0
+ variable flag_debug 0
+ variable logfile ""
+ variable target_definition ""
+ variable geometry "<none>"
+}
+
+# }}}
+# {{{ Hooks & atexit support
+
+# ----------------------------------------------------------------------------
+# A lot of the flexibility of ecosynth is provided by hooks. Device scripts
+# and, more importantly, the per-user initrc and mainrc scripts can install
+# hooks that get called when an event occurs, for example when the eCos
+# applications attempts to transmit an ethernet packet.
+#
+# A special hook is used to implement atexit handling. This involves redefining
+# the "exit" command so that it will invoke the appropriate hooks first.
+
+namespace eval synth {
+ # All hooks are held in an array, indexed by the hook name, with each
+ # array entry being a list of functions to be invoked.
+ array set _hooks [list]
+
+ proc hook_define { name } {
+ if { [info exists synth::_hooks($name)] } {
+ synth::report_error "Attempt to create hook $name which already exists.\n"
+ } else {
+ set synth::_hooks($name) [list]
+ }
+ }
+
+ proc hook_defined { name } {
+ return [info exists synth::_hooks($name)]
+ }
+
+ proc hook_add { name function } {
+ if { ! [info exists synth::_hooks($name)] } {
+ synth::report_error "Attempt to attach a function to an unknown hook $name\n"
+ set synth::_hooks($name) [list]
+ }
+ lappend synth::_hooks($name) $function
+ }
+
+ proc hook_call { name args } {
+ if { ! [info exists synth::_hooks($name) ] } {
+ synth::report_error "Attempt to invoke unknown hook $name\n"
+ } else {
+ foreach function $synth::_hooks($name) {
+ $function $args
+ }
+ }
+ }
+
+ # Define an initial set of hooks
+ synth::hook_define "exit" ;# The auxiliary is exiting
+ synth::hook_define "ecos_exit" ;# The eCos application has exited
+ synth::hook_define "ecos_initialized" ;# eCos static constructors have run
+ synth::hook_define "help" ;# --help
+}
+
+# Rename the builtin exit command so that it can still be accessed.
+rename exit _hook_real_exit
+
+# And define a replacement for exit which will invoke the appropriate
+# hook. Care has to be taken in case of recursive exit calls, each
+# hook function is only called once.
+
+proc exit { { code 0 } } {
+ while { [llength $synth::_hooks(exit)] > 0 } {
+ set handler [lindex $synth::_hooks(exit) end]
+ set synth::_hooks(exit) [lrange $synth::_hooks(exit) 0 end-1]
+
+ # For now assume no errors - it is not clear what could be done
+ # about them anyway.
+ catch { eval $handler [list]}
+ }
+ _hook_real_exit $code
+}
+
+# }}}
+# {{{ Output
+
+# ----------------------------------------------------------------------------
+# The usual set of utilities for issuing warnings, errors, ...
+#
+# There are three possibilities to consider:
+#
+# 1) running in text-only mode. The output should just go to stdout
+#
+# 2) running in GUI mode and the text window exists. Just update the
+# window
+#
+# 3) running in GUI mode but the text window is not yet ready. The
+# output needs to be buffered for now, and will be flushed
+# later.
+#
+# Also, if for some reason this program exits while there is output still
+# buffered that output should also go to stdout.
+#
+# If any errors occur during initialization, e.g. an invalid device script
+# or user initialization scripts, those get reported and an error count
+# is maintained. When the eCos application reports that initialization is
+# complete it will be sent back a status for the auxiliary, and will
+# exit if things have not started up correctly. This tries to ensure that
+# if there are multiple errors the user sees all of them.
+
+namespace eval synth {
+
+ variable _pending_output [list]
+ variable _logfd ""
+ variable _error_count 0
+
+ proc logfile_open { } {
+ synth::report "Opening logfile $synth::logfile"
+ set msg ""
+ if { [catch { set synth::_logfd [open $synth::logfile "w"] } msg ] } {
+ synth::report_error "Unable to open logfile \"$synth::logfile\"\n $msg\n"
+ }
+ }
+
+ # A default implementation of output. This gets overwritten later when running
+ # in GUI mode, so if GUI mode is enabled then this proc must be called before
+ # the GUI is ready and the data must be queued.
+ proc output { msg filter } {
+ if { ! $synth::flag_gui } {
+ # If a logfile exists, output normally goes there rather than
+ # to standard output. The exception is for errors which
+ # always go to stderr, in addition to the logfile.
+ if { "" != $synth::_logfd } {
+ puts -nonewline $synth::_logfd $msg
+ if { "error" == $filter } {
+ puts -nonewline stderr $msg
+ }
+ } else {
+ if { "error" == $filter } {
+ puts -nonewline stderr $msg
+ } else {
+ puts -nonewline $msg
+ }
+ }
+ } else {
+ lappend synth::_pending_output [list $msg $filter]
+ }
+ }
+
+ # Invoked by the text window code once everything is ready
+ # and synth::output has been redefined.
+ proc _flush_output { } {
+ foreach msg $synth::_pending_output {
+ synth::output [lindex $msg 0] [lindex $msg 1]
+ }
+ set synth::_pending_output [list]
+ }
+
+ # Cope with early exits. This will only have an effect if
+ # _flush_output has not been called yet, and by implication
+ # if synth::output has not yet been redefined.
+ proc _exit_flush_output { arg_list } {
+ if { 0 != [llength $synth::_pending_output] } {
+ set synth::flag_gui 0
+ synth::_flush_output
+ }
+ }
+ synth::hook_add "exit" synth::_exit_flush_output
+
+ proc report { msg } {
+ synth::output $msg "report"
+ }
+
+ proc report_warning { msg } {
+ synth::output "Warning: $msg" "warning"
+ }
+
+ proc report_error { msg } {
+ incr synth::_error_count
+ synth::output "Error: $msg" "error"
+ }
+
+ # Internal errors indicate a serious problem within ecosynth or
+ # a device-specific script. For now this results in output to
+ # stderr, a backtrace, and termination of the auxiliary, which
+ # should also cause the eCos application to shut down.
+ #
+ # An alternative approach would involve calling ::error and
+ # benefitting from its backtrace generation, but there are various
+ # places where it makes to sense to catch problems and call
+ # synth::error rather than internal_error
+ proc internal_error { msg } {
+ puts stderr "ecosynth, an internal error has occurred:"
+ puts stderr " $msg"
+ puts stderr "---------- backtrace -------------------------------------------------"
+ for { set level [info level] } { $level > 0 } { incr level -1 } {
+ puts stderr [info level $level]
+ }
+ puts stderr "----------------------------------------------------------------------"
+ puts stderr "ecosynth, exiting."
+ exit 1
+ }
+
+ # Dummy implementations of the exported filter routines, in case a script
+ # tries to create a filter even when not running in graphical mode
+ variable _dummy_filters [list]
+
+ proc filter_exists { name } {
+ set result 0
+ if { -1 != [lsearch -exact $synth::_dummy_filters $name] } {
+ set result 1
+ }
+ return $result
+ }
+
+ proc filter_get_list { } {
+ return $synth::_dummy_filters
+ }
+
+ proc filter_add { name args } {
+ if { [synth::filter_exists $name] } {
+ synth::internal_error "attempt to install filter $name twice.\n"
+ }
+ lappend synth::_dummy_filters $name
+ }
+}
+
+# }}}
+# {{{ Argument processing and global options
+
+# ----------------------------------------------------------------------------
+# Argument processing. The eCos application will usually just pass its
+# command line arguments to the auxiliary. Four special arguments will
+# have been examined already:
+#
+# -io, --io
+# I/O facilities, i.e. the auxiliary should run
+# -ni, -nio, --ni, --nio
+# No I/O facilities, i.e. the auxiliary should not be run.
+# -nw, --nw, --no-windows
+# No windows, i.e. disable the GUI
+# -w, --w, --windows
+# Enable the GUI
+#
+# There are a number of additional flags available as standard:
+#
+# -v, --version
+# The usual
+# -h, --help
+# Ditto
+# -k, --k, --keep-going
+# Ignore errors as much as possible
+# -nr, --no-rc
+# Skip the initrc and mainrc files
+# -x, --exit
+# The auxiliary should exit at the same time as the eCos application.
+# -nx, --no-exit
+# Inverse of the above
+# -V, --verbose
+# The usual
+# --debug
+# Not intended for end users
+# -l <file>, -l=<file>, --logfile <file>, --logfile=<file>
+# Send all output to the specified file. In GUI mode this is in addition
+# to the main text window. In non-GUI mode this is instead of stdout.
+# -t <file>, -t=<file>, --target <file>, --target=<file>
+# Specify the target definition file.
+#
+# Many X applications accept a common set of options, e.g. -display,
+# -geometry, etc. Although usually Tk will process these, there are
+# some problems - see ecosynth.c, ecosynth_appinit() for details.
+# Hence -geometry has to be processed here.
+#
+# -geometry <geom>
+#
+#
+# Some device-specific scripts may want to support additional
+# command line arguments. This is somewhat messy, since the core
+# code has no way of knowing what devices might be available and
+# hence what the actual valid arguments are. It would be possible
+# to just ignore any arguments that are not used by any device,
+# but that could really confuse a user who has made a typo. Instead
+# the code below keeps track of which arguments have been "consumed",
+# allowing it to issue a warning about unconsumed arguments after
+# initialization.
+#
+# Arguments can take the following forms:
+#
+# 1) -flag or --flag.
+# 2) -name=value or --name=value
+# 3) -name value or --name value
+#
+# There is a possibility of confusion if any of the values begin with a hyphen.
+# It is hard to do anything about this without advance knowledge of what all
+# the valid arguments are. Instead the user can avoid problems by using
+# the -name=value variant on the command line.
+#
+# There is also possible confusion if a single argument can occur multiple
+# times. If that is permitted then things can get rather messy, and
+# the current API does not really handle it.
+
+namespace eval synth {
+
+ # Keep track of all arguments which have not yet been consumed.
+ array set _argv_unconsumed [list]
+ for { set i 0 } { $i < $::argc } { incr i } {
+ set synth::_argv_unconsumed($i) [lindex $::argv $i]
+ }
+
+ # Provide a list of just those arguments that have not yet
+ # been consumed.
+ proc argv_get_unconsumed { } {
+ set result [list]
+ for { set i 0 } { $i < $::argc } {incr i } {
+ if { [info exists synth::_argv_unconsumed($i)] } {
+ lappend result $synth::_argv_unconsumed($i)
+ }
+ }
+ return $result
+ }
+
+ proc _argv_consume { index } {
+ if { [info exists synth::_argv_unconsumed($index)] } {
+ unset synth::_argv_unconsumed($index)
+ }
+ }
+
+ # Internal routine. Given a string of the form "-flag" or "-name=",
+ # return an index within argv or -1 if not found. As a side effect
+ # this "consumes" the argument.
+ proc _argv_lookup { name } {
+ set result -1
+ if { "=" != [string index $name end] } {
+ for { set i 0 } { $i < $::argc } { incr i } {
+ set arg [lindex $::argv $i]
+ if { [string equal $arg $name] || [string equal $arg "-[set name]"] } {
+ set result $i
+ synth::_argv_consume $i
+ break
+ }
+ }
+ } else {
+ set name [string range $name 0 end-1]
+ set len [string length $name]
+ for { set i 0 } { $i < $::argc } { incr i } {
+ set arg [lindex $::argv $i]
+ if { [string equal -length $len $arg $name] } {
+ if { "=" == [string index $arg $len] } {
+ set result $i
+ synth::_argv_consume $i
+ break;
+ } elseif { ([string length $arg] == $len) && ($i < ($::argc - 1)) } {
+ set result $i
+ synth::_argv_consume $i
+ synth::_argv_consume [expr $i + 1]
+ break
+ }
+ } elseif { [string equal -length [expr $len + 1] $arg "-[set name]"] } {
+ if { "=" == [string index $arg [expr $len + 1]] } {
+ set result $i
+ synth::_argv_consume $i
+ break
+ } elseif { ([string length $arg] == [expr $len + 1]) && ($i < ($::argc - 1)) } {
+ set result $i
+ synth::_argv_consume $i
+ synth::_argv_consume [expr $i + 1]
+ break
+ }
+ }
+ }
+ }
+ return $result
+ }
+
+ # Look for a given argument on the command line.
+ proc argv_defined { name } {
+ set result 0
+ set index [synth::_argv_lookup $name]
+ if { -1 != $index } {
+ set result 1
+ }
+ return $result
+ }
+
+ # Return the value associated with a given argument, which must be present.
+ proc argv_get_value { name } {
+ if { "=" != [string index $name end] } {
+ synth::internal_error "attempt to get a value for a simple flag argument \"$name\".\n"
+ }
+ set result ""
+ set index [synth::_argv_lookup $name]
+ if { -1 == $index } {
+ synth::internal_error "attempt to get the value associated with a non-existent argument \"$name\".\n"
+ }
+ set arg [lindex $::argv $index]
+ set len [string length $name]
+ if { [string equal -length $len $arg $name] } {
+ set result [string range $arg $len end]
+ } elseif { [string equal -length [expr $len + 1] $arg "-[set name]"] } {
+ set result [string range $arg [expr $len + 1] end]
+ } else {
+ set result [lindex $::argv [expr $index + 1]]
+ }
+ return $result
+ }
+
+ # -ni/-nio are not relevant. If present then they would have been handled
+ # within the eCos application, the auxiliary would not have been spawned,
+ # and this script would not be running.
+
+ # -io will have been processed by the eCos application.
+ # -nw, -w, and related options have been processed by the C code.
+ # Look them up anyway to consume them.
+ synth::_argv_lookup "-io"
+ synth::_argv_lookup "-nw"
+ synth::_argv_lookup "-no-windows"
+ synth::_argv_lookup "-w"
+ synth::_argv_lookup "-windows"
+
+ # Now cope with the other standard flags
+ if { [synth::argv_defined "-v"] || [synth::argv_defined "--version"] } {
+ # Just output the version message and exit. The eCos application
+ # will do the same. The version is obtained from configure.in,
+ # and also from the install directory. The synthetic target
+ # startup code will exit quietly if the auxiliary exits at this
+ # stage. This output should go via puts rather than the
+ # synth:: output routines, since the GUI will never appear if
+ # --version is specified.
+ puts "ecosynth: version $synth::_ecosynth_version"
+ puts " : install location [file dirname [info script]]"
+ exit 0
+ }
+
+ if { [synth::argv_defined "-l="] } {
+ set synth::logfile [synth::argv_get_value "-l="]
+ } elseif { [synth::argv_defined "-logfile="] } {
+ set synth::logfile [synth::argv_get_value "-logfile="]
+ }
+ if { "" != $synth::logfile } {
+ synth::logfile_open
+ }
+
+ # -h/--help would normally also result in an immediate exit. However,
+ # the device-specific scripts have not yet been loaded so there
+ # is no way of reporting their options. Hence the usage information
+ # is delayed until later. Suppressing GUI mode as a side effect is
+ # probably a good idea as well, that way the output appears in the
+ # current console window.
+ if { [synth::argv_defined "-h"] || [synth::argv_defined "-help"] } {
+ set synth::flag_help 1
+ set synth::flag_gui 0
+ }
+
+ if { [synth::argv_defined "-debug"] } {
+ set synth::flag_debug 1
+ }
+
+ if { [synth::argv_defined "-k"] || [synth::argv_defined "-keep-going"] } {
+ set synth::flag_keep_going 1
+ }
+
+ if { [synth::argv_defined "-nr"] || [synth::argv_defined "-no-rc"]} {
+ set synth::flag_no_rc 1
+ }
+
+ if { [synth::argv_defined "-x"] || [synth::argv_defined "-exit"] } {
+ set synth::flag_immediate_exit 1
+ } elseif { [synth::argv_defined "-nx"] || [synth::argv_defined "-no-exit"] } {
+ set synth::flag_immediate_exit 0
+ }
+
+ if { [synth::argv_defined "-V"] || [synth::argv_defined "-verbose"] } {
+ set synth::flag_verbose 1
+ }
+
+ if { [synth::argv_defined "-t="] } {
+ set synth::target_definition [synth::argv_get_value "-t="]
+ } elseif { [synth::argv_defined "-target="] } {
+ set synth::target_definition [synth::argv_get_value "-target="]
+ }
+
+ # Arguably -geometry should only be checked when the GUI is enabled,
+ # but doing so at all times is harmless.
+ # Note that '-geometry ""' means that any value held in the
+ # preferences file should be ignored. Hence the regexp below
+ # accepts the empty string, and treats it separately from
+ # uninitialized.
+ if { [synth::argv_defined "-geometry="] } {
+ set synth::geometry [synth::argv_get_value "-geometry="]
+
+ if { ![regexp -- {^([0-9]+x[0-9]+)?([+-][0-9]+[+-][0-9]+)?$} $synth::geometry] } {
+ synth::report_warning "Invalid geometry string $synth::geometry\n"
+ set synth::geometry "<none>"
+ }
+ }
+
+ if { $synth::flag_debug } {
+ synth::report \
+ "Results of initial command-line parsing:\n \
+ --help $synth::flag_help\n \
+ --keep-going $synth::flag_keep_going\n \
+ --no-rc $synth::flag_no_rc\n \
+ --exit $synth::flag_immediate_exit\n \
+ --verbose $synth::flag_verbose\n \
+ logfile $synth::logfile\n \
+ target definition $synth::target_definition\n \
+ geometry $synth::geometry\n \
+ unconsumed [synth::get_unconsumed_args]\n"
+ }
+}
+
+# }}}
+# {{{ Create and populate ~/.ecos/synth
+
+# ----------------------------------------------------------------------------
+# If the per-user configuration directories do not exist yet, create them.
+# Also install default initrc.tcl and mainrc.tcl files which do nothing, but
+# which can be edited. If problems occur then the user gets a warning
+# but execution proceeds.
+#
+# Some people may object to this automatic creation of directories and
+# configuration files. However there is plenty of precedent, and the
+# files involved are small. Messages are generated so that the user
+# knows what has happened.
+#
+# Currently the default target definition file is not copied from
+# the install tree into the per-user tree. Although some users will
+# be happy having this file in ~/.ecos/synth, others may prefer it
+# to be more visible in the current directory.
+
+if { ![file exists "~/.ecos"] } {
+ synth::report "Creating new directory ~/.ecos for eCos configuration files.\n"
+ if { 0 != [catch { file mkdir "~/.ecos" }] } {
+ synth::report_warning "failed to create directory ~/.ecos\n"
+ }
+}
+if { [file exists "~/.ecos"] && [file isdirectory "~/.ecos"] && ![file exists "~/.ecos/synth"] } {
+ synth::report "Creating new directory ~/.ecos/synth for synthetic target configuration files.\n"
+ if { 0 != [catch { file mkdir "~/.ecos/synth" } ] } {
+ synth::report_warning "failed to create directory ~/.ecos/synth\n"
+ } else {
+ # initrc and mainrc are only copied when the directory is first created,
+ # so that users can delete them if unwanted - even though the
+ # default versions do nothing.
+ synth::report "Installing default configuration files ~/.ecos/synth/initrc.tcl and ~/.ecos/synth/mainrc.tcl\n"
+ catch { file copy -- [file join $synth::install_dir "user_initrc.tcl"] "~/.ecos/synth/initrc.tcl"}
+ catch { file copy -- [file join $synth::install_dir "user_mainrc.tcl"] "~/.ecos/synth/mainrc.tcl"}
+ }
+}
+
+# }}}
+# {{{ Read target definition file
+
+# ----------------------------------------------------------------------------
+# Once the GUI is up and running it is possible to start reading in some
+# configuration files. The first of these is the target definition file.
+# Typically this would be ~/.ecos/synth/default.tdf. An alternative
+# definition file can be specified on the command line with the
+# -t argument, and the code will look in the current directory,
+# in ~/.ecos/synth, and in the install tree.
+#
+# The purpose of the target definition file is to specify exactly
+# how I/O gets implemented. For example the eCos application may
+# want to access a network device eth0, but that device could be
+# implemented in a variety of ways (e.g. a real ethernet device
+# on the Linux host, or a fake device provided by the ethertap
+# facility). It is the target definition file that provides
+# this information.
+#
+# The file is of course just another Tcl script, running in the
+# current interpreter. There seems little point in using a safe
+# interpreter given the considerable number of other Tcl scripts
+# that are being used, some of which need the ability to e.g.
+# run other programs. The main command is synth_device which
+# takes two arguments, a device name and some options for that
+# device, e.g.:
+#
+# synth_device eth0 {
+# use eth1
+# }
+#
+# synth_device eth1 {
+# use tap0
+# }
+#
+# When the eCos device driver looks up eth0 this will cause a
+# device-specific Tcl script to be loaded, which can examine
+# this data.
+#
+# This code has no way of knowing what constitutes valid or invalid
+# contents for an eth0 device, especially since the Tcl script that
+# could provide such knowledge has not been loaded. Instead it is
+# assumed that the contents is another set of Tcl commands such as
+# "physical", which will of course not be defined so the Tcl interpreter
+# will invoke "unknown" which is temporarily redefined here. This makes
+# it possible for the device-specific commands to have arbitrary number
+# of arguments, or to define Tcl fragments for hooks, or whatever.
+#
+# As with argument processing, the code attempts to keep track of
+# which devices and options have been "consumed" and can issue
+# warnings about any unused devices or options. This helps to track
+# down typos and similar problems. These warnings are only output
+# when running at verbose mode, since it is fairly normal practice
+# to have a single target definition file which supports
+# a number of different eCos applications with different I/O
+# requirements.
+
+namespace eval synth {
+ # A list of all devices specified in the target definition file.
+ # For now assume that a given device will only be specified once.
+ variable _tdf_devices [list]
+
+ # An array with additional details of each device. This will have
+ # entries such as _tdf_device_options(eth0,4), where the second
+ # argument is a per-device index. The value of each entry is
+ # a list of the actual command and its arguments. This use of
+ # an index allows for multiple instances of a per-device
+ # option.
+ array set _tdf_device_options [list]
+
+ # While reading in the device details it is necessary to keep track
+ # of the current device, if any. Otherwise the implementation of
+ # "unknown" will not be able to update _tdf_device_options. An index
+ # is needed as well.
+ variable _tdf_current_device ""
+ variable _tdf_current_index 0
+
+ # Keep track of which devices and options have been consumed
+ variable _tdf_consumed_devices [list]
+ variable _tdf_consumed_options [list]
+
+ proc tdf_has_device { name } {
+ return [expr -1 != [lsearch -exact $synth::_tdf_devices $name]]
+ }
+
+ proc tdf_get_devices { } {
+ return $synth::_tdf_devices
+ }
+
+ proc _tdf_get_option_index { devname option } {
+ synth::_tdf_consume_device $devname
+ for { set i 0 } { [info exists synth::_tdf_device_options($devname,$i)] } { incr i } {
+ if { $option == [lindex $synth::_tdf_device_options($devname,$i) 0] } {
+ synth::_tdf_consume_option $devname $i
+ return $i
+ }
+ }
+ return -1
+ }
+
+ proc _tdf_get_option_indices { devname option } {
+ synth::_tdf_consume_device $devname
+ set result [list]
+ for { set i 0 } { [info exists synth::_tdf_device_options($devname,$i)] } { incr i } {
+ if { $option == [lindex $synth::_tdf_device_options($devname,$i) 0] } {
+ synth::_tdf_consume_option $devname $i
+ lappend result $i
+ }
+ }
+ return $result
+ }
+
+ proc tdf_has_option { devname option } {
+ return [expr -1 != [synth::_tdf_get_option_index $devname $option]]
+ }
+
+ proc tdf_get_option { devname option } {
+ set index [synth::_tdf_get_option_index $devname $option]
+ if { -1 != $index } {
+ lappend synth::_tdf_consumed_options "$devname,$index"
+ return [lrange $synth::_tdf_device_options($devname,$index) 1 end]
+ } else {
+ return [list]
+ }
+ }
+
+ proc tdf_get_options { devname option } {
+ set result [list]
+ set indices [synth::_tdf_get_option_indices $devname $option]
+ foreach index $indices {
+ lappend result [lrange $synth::_tdf_device_options($devname,$index) 1 end]
+ }
+ return $result
+ }
+
+ proc tdf_get_all_options { devname } {
+ set result [list]
+ for { set i 0 } { [info exists synth::_tdf_device_options($devname,$i)] } { incr i } {
+ lappend synth::_tdf_consumed_options "$devname,$index"
+ lappend result $synth::_tdf_device_options($devname,$i)
+ }
+ return $result
+ }
+
+ proc _tdf_consume_device { name } {
+ if { -1 == [lsearch -exact $synth::_tdf_consumed_devices $name] } {
+ lappend synth::_tdf_consumed_devices $name
+ }
+ }
+
+ proc _tdf_consume_option { devname index } {
+ if { -1 == [lsearch -exact $synth::_tdf_consumed_options "$devname,$index"] } {
+ lappend synth::_tdf_consumed_options "$devname,$index"
+ }
+ }
+
+ proc tdf_get_unconsumed_devices { } {
+ set result [list]
+ foreach devname $synth::_tdf_devices {
+ if { -1 == [lsearch -exact $synth::_tdf_consumed_devices $devname] } {
+ lappend result $devname
+ }
+ }
+ return $result
+ }
+
+ proc tdf_get_unconsumed_options { } {
+ set result [list]
+ foreach devname $synth::_tdf_devices {
+ if { -1 == [lsearch -exact $synth::_tdf_consumed_devices $devname] } {
+ # Do not report all the options for a device that has not been consumed at all
+ continue
+ }
+ for { set i 0 } { [info exists synth::_tdf_device_options($devname,$i)] } { incr i } {
+ if { -1 == [lsearch -exact $synth::_tdf_consumed_options "$devname,$i"] } {
+ lappend result [list $devname $synth::_tdf_device_options($devname,$i)]
+ }
+ }
+ }
+ return $result
+ }
+}
+
+# Look for the target definition file.
+set _tdf $synth::target_definition
+if { "" == $_tdf } {
+ set _tdf "default"
+}
+set _config_file ""
+
+set _dirlist [list [pwd] "~/.ecos/synth" $synth::install_dir]
+foreach _dir $_dirlist {
+ set _candidate "[file join $_dir $_tdf].tdf" ; # file join does the right thing for absolute paths
+ if { [file isfile $_candidate] } {
+ set _config_file $_candidate
+ break
+ } else {
+ set _candidate [file join $_dir $_tdf]
+ if { [file isfile $_candidate] } {
+ set _config_file $_candidate
+ break
+ }
+ }
+}
+if { "" == $_config_file } {
+ if { "" != $synth::target_definition } {
+ # The user explicitly specified a file, so it must be read in.
+ # If it cannot be found then that should be treated as an error.
+ set msg "Unable to find target definition file $synth::target_definition\n"
+ if { "absolute" != [file pathtype $synth::target_definition] } {
+ append msg " Searched $_dirlist\n"
+ }
+ synth::report_error $msg
+ exit 1
+ } else {
+ # This is a mild error, because default.tdf should be installed
+ # below libexec. However the default file does not actually
+ # define anything, it is just a set of comments, so there is
+ # nothing to be gained by issuing a warning.
+ }
+} else {
+
+ set synth::target_definition $_config_file
+
+ proc synth_device { name data } {
+ if { "" != $synth::_tdf_current_device } {
+ error "synth_device $name is nested inside $synth::_tdf_current_device\nNesting of synth_device entries is not allowed."
+ }
+ if { -1 != [lsearch -exact $synth::_tdf_devices $name] } {
+ error "Duplicate entry for synth_device $name"
+ }
+ set synth::_tdf_current_device $name
+ set synth::_tdf_current_index 0
+ lappend synth::_tdf_devices $name
+ eval $data
+ # If the eval resulted in an error, propagate it immediately rather than attempt
+ # any form of recovery. The downside is that only error per run will be
+ # reported.
+ set synth::_tdf_current_device ""
+ }
+ rename unknown _synth_unknown
+ proc unknown { args } {
+ if { "" == $synth::_tdf_current_device } {
+ # An unknown command at the toplevel. Pass this to the
+ # original "unknown" command, in the unlikely event that
+ # the user really did want to autoload a library or do
+ # something similar.
+ eval _synth_unknown $arg
+ return
+ }
+
+ # Anything else is treated as an option within the synth_device
+ set synth::_tdf_device_options($synth::_tdf_current_device,$synth::_tdf_current_index) $args
+ incr synth::_tdf_current_index
+ }
+
+ set _config_file_msg ""
+ set _result [catch { source $_config_file } _config_file_msg ]
+
+ rename unknown ""
+ rename synth_device ""
+ rename _synth_unknown unknown
+
+ if { $_result } {
+ # Any problems reading in the target definition file should be
+ # treated as an error: I/O is unlikely to behave in the way
+ # that the user expects.
+ set msg "An error occurred while reading in the target definition file\n $_config_file\n $_config_file_msg\n"
+ synth::report_error $msg
+ exit 1
+ }
+ unset _result _config_file_msg
+}
+
+unset _dirlist _tdf _config_file _candidate
+
+# }}}
+
+if { $synth::flag_gui } {
+# {{{ Main GUI code
+
+# {{{ Session file
+
+# ----------------------------------------------------------------------------
+# The tool manages a file ~/.ecos/synth/guisession, holding information
+# such as the size and position of the main window. The aim is to give
+# the user a fairly consistent interface between sessions. The information
+# is saved during exit handling, and also in response to the window
+# manager WM_SAVE_YOURSELF request. However note that the latter does
+# not extend to user session information - restarting the eCos application
+# the next time a user logs in is inappropriate for eCos, plus if
+# the application is being run inside gdb (a likely scenario) it is gdb
+# that should handle restarting the application.
+#
+# Using a single file has limitations. Specifically the user may be
+# switching between a number of different target definition files,
+# each resulting in a subtly different layout, and arguably there
+# should be separate session information for each one. However
+# distinguishing between per-target and global settings would be
+# very complicated.
+#
+# The most obvious implementation involves the options database.
+#
+# FIXME: implement properly
+
+namespace eval synth {
+ # Make sure we are using the right options from .Xdefaults etc.
+ tk appname "ecosynth"
+
+ if { $synth::flag_debug } {
+ # synth::report "Reading in session file ~/.ecos/synth/guisession\n"
+ }
+
+ # synth::report_warning "Support for reading session file ~/.ecos/synth/guisession not yet implemented.\n"
+
+ if { [file exists "~/.ecos/synth/guisession"] } {
+ if {0 != [catch { option readfile "~/.ecos/synth/guisession" userDefault} msg]} {
+ # synth::report_error "Failed to read GUI session information from file ~/.ecos/synth/guisession\n $msg\n"
+ }
+ }
+
+ proc _update_session_file { arg_list } {
+ # synth::report_warning "Support for updating session file ~/.ecos/synth/guisession not yet implemented.\n"
+ }
+ proc _handle_wm_save_yourself { } {
+ # synth::report_warning "Support for WM_SAVE_YOURSELF not yet implemented\n"
+ }
+
+ synth::hook_add "exit" synth::_update_session_file
+}
+
+# }}}
+# {{{ Load images
+
+# ----------------------------------------------------------------------------
+# Load various useful bitmaps etc. into memory, so that they can be accessed
+# by any code that needs them.
+#
+# Running1 is a coloured version of the eCos logo. running2 and running3 are
+# used by alternative implementations of the heartbeat: running2 has the
+# red and black reversed, and running3 is mostly a mirror image of the normal
+# logo.
+namespace eval synth {
+
+ proc load_image { image_name filename } {
+ set result 0
+ set type [file extension $filename]
+ if { ! [file exists $filename] } {
+ synth::report_error "Image $filename has not been installed.\n"
+ } elseif { ! [file readable $filename] } {
+ synth::report_error "Image $filename is not readable.\n"
+ } elseif { (".xbm" == $type) } {
+ if { 0 == [catch { set $image_name [image create bitmap -file $filename] }] } {
+ set result 1
+ } else {
+ synth::report_error "Bitmap image $filename is invalid.\n"
+ }
+ } else {
+ if { 0 == [catch { set $image_name [image create photo -file $filename] }] } {
+ set result 1
+ } else {
+ synth::report_error "Image $filename is invalid.\n"
+ }
+ }
+ return $result
+ }
+
+ set _images [list "tick_yes.xbm" "tick_no.xbm" "save.xbm" "cut.xbm" "copy.xbm" "paste.xbm" \
+ "help.xbm" "running1.ppm" "saveall.xbm" ]
+ foreach _image $_images {
+ variable image_[file rootname $_image]
+ synth::load_image "synth::image_[file rootname $_image]" [file join $synth::install_dir $_image]
+ }
+ unset _images _image
+}
+
+# }}}
+# {{{ Balloon help
+
+namespace eval synth {
+
+ variable _balloon_messages
+ variable _balloon_pending ""
+
+ toplevel .balloon
+ label .balloon.info -borderwidth 2 -relief groove -background "light yellow"
+ pack .balloon.info -side left -fill both -expand 1
+ wm overrideredirect .balloon 1
+ wm withdraw .balloon
+
+ proc register_balloon_help { widget message } {
+ set synth::_balloon_messages($widget) $message
+ bind $widget <Enter> { synth::_balloonhelp_pending %W }
+ bind $widget <Leave> { synth::_balloonhelp_cancel }
+ }
+
+ proc _balloonhelp_pending { widget } {
+ synth::_balloonhelp_cancel
+ set synth::_balloon_pending [after 1200 [list synth::_balloonhelp_show $widget]]
+ }
+
+ proc _balloonhelp_cancel { } {
+ if { "" != $synth::_balloon_pending } {
+ after cancel $synth::_balloon_pending
+ set synth::_balloon_pending ""
+ } else {
+ wm withdraw .balloon
+ }
+ }
+
+ proc _balloonhelp_show { widget } {
+ .balloon.info configure -text $synth::_balloon_messages($widget)
+ set x [expr [winfo rootx $widget] + 2]
+ set y [expr [winfo rooty $widget] + [winfo height $widget] + 2]
+ wm geometry .balloon +$x+$y
+ wm deiconify .balloon
+ raise .balloon
+ set synth::_balloon_pending ""
+ }
+}
+
+# }}}
+# {{{ Window manager settings
+
+# ----------------------------------------------------------------------------
+# Set up the current program name in the title bar etc.
+
+namespace eval synth {
+
+ if { $synth::flag_debug } {
+ synth::report "Performing required interactions with window manager\n"
+ }
+
+ # The toplevel is withdrawn during startup. It is possible that
+ # some of the windows and other objects created initially will end
+ # up being deleted again before the system is fully up and running,
+ # and the event loop is entered before then to accept requests from
+ # the eCos application. This could cause confusing changes. The
+ # toplevel is displayed in response to the constructors-done request.
+ wm withdraw .
+
+ # For now disable all attempts to use the "send" command. Leaving it
+ # enabled would introduce security problems.
+ rename "::send" {}
+
+ variable title "eCos synthetic target"
+ if { "" != $synth::ecos_appname} {
+ append synth::title ": $synth::ecos_appname ($synth::_ppid)"
+ }
+ wm title . $synth::title
+
+ # Use the specified geometry, or that from the last session.
+ # Obviously how well this works depends very much on the
+ # window manager being used.
+ set _geometry ""
+ if { "" == $synth::geometry} {
+ # Command line request to suppress the preferences. Revert
+ # to a default size.
+ set _geometry "640x480"
+ } elseif { "<none>" == $synth::geometry } {
+ # No command line option, use the value from the preferences file
+ # FIXME: implement
+ set _geometry "640x480"
+ } else {
+ # There was an explicit -geometry option on the command line. Use it.
+ set synth::_geometry $synth::geometry
+ if { [regexp -- {^([0-9]+x[0-9]+).*$} $synth::_geometry] } {
+ wm sizefrom . "user"
+ }
+ if { [regexp -- {^.*([+-][0-9]+[+-][0-9]+)$} $synth::_geometry] } {
+ wm positionfrom . "user"
+ }
+ }
+ wm geometry . $synth::_geometry
+ unset synth::_geometry
+
+ set _file [file join $synth::install_dir "ecosicon.xbm"]
+ if { [file readable $synth::_file] } {
+ wm iconbitmap . "@$synth::_file"
+ }
+ set _file [file join $synth::install_dir "ecosiconmask.xbm"]
+ if { [file readable $synth::_file] } {
+ wm iconmask . "@$synth::_file"
+ }
+ unset synth::_file
+
+ if { "" != $synth::ecos_appname } {
+ wm iconname . "ecosynth: $synth::ecos_appname"
+ } else {
+ wm iconname . "ecosynth"
+ }
+
+ wm protocol . "WM_DELETE_WINDOW" synth::_handle_exit_request
+ wm protocol . "WM_SAVE_YOURSELF" synth::_handle_wm_save_yourself
+}
+
+# }}}
+# {{{ Exit and kill handling
+
+# ----------------------------------------------------------------------------
+# Exit handling. The user may request program termination using various
+# different ways:
+# 1) File->Exit
+# 2) ctrl-Q, the shortcut for the above
+# 3) the Window Manager's delete-window request
+#
+# If eCos has already exited then the request can be handled straightaway.
+# The invocation of exit will go via the exit hooks so appropriate
+# clean-ups will take place.
+#
+# If eCos has not already exited then it is assumed that the user wants
+# the eCos application to terminate as well as the GUI. This can be achieved
+# via the interrupt subsystem. However, there is a risk that the application
+# has crashed, or is blocked in gdb, or has interrupts permanently disabled,
+# in which case it is not going to respond to the SIGIO. To allow for this
+# a number of retries are attempted, and after five seconds of this the
+# application is killed off forcibly.
+
+namespace eval synth {
+
+ variable _handle_exit_retries 0
+ variable _handle_exit_after ""
+
+ proc _handle_exit_request { } {
+
+ if { !$synth::ecos_running } {
+ exit 0
+ }
+ # Setting this flag causes ecosynth to exit immediately once
+ # the application terminates.
+ set synth::flag_immediate_exit 1
+
+ # Now ask the application to exit
+ synth::request_application_exit
+
+ # Set up a timer to retry this
+ if { "" == $synth::_handle_exit_after } {
+ set synth::_handle_exit_after [after 1000 synth::_handle_exit_timer]
+
+ # And output something so the user knows the request has been received
+ synth::report "Waiting for the eCos application to exit.\n"
+ }
+ }
+
+ # This routine requests termination of eCos, but not of
+ # ecosynth
+ proc _handle_kill_request { } {
+ if { $synth::ecos_running } {
+ synth::request_application_exit
+ if { "" == $synth::_handle_exit_after } {
+ set synth::_handle_exit_after [after 1000 synth::_handle_exit_timer]
+ }
+ }
+ }
+
+ proc _handle_exit_timer { } {
+ if { $synth::ecos_running } {
+ incr synth::_handle_exit_retries
+ if { $synth::_handle_exit_retries < 5 } {
+ synth::request_application_exit
+ synth::report "Still waiting for the eCos application to exit.\n"
+ } else {
+ synth::_send_SIGKILL
+ }
+ set synth::_handle_exit_after [after 1000 synth::_handle_exit_timer]
+ }
+ }
+}
+
+# }}}
+# {{{ Main window layout
+
+# ----------------------------------------------------------------------------
+# The window layout is as follows:
+# 1) a menu bar at the top (surprise surprise). Many of the menus will be
+# empty or nearly so, but device-specific scripts may want to extend
+# the menus.
+# 2) a toolbar. This is primarily for use by device-specific scripts
+# 3) a central grid.
+# 4) a status line at the bottom.
+#
+# The central grid is organised as a 3x3 set of frames. The centre frame holds
+# the main text display, plus associated scrollbars, and is the frame that
+# will expand or shrink as the toplevel is resized. The remaining eight frames
+# (nw, n, ne, e, se, s, sw, w) are available for use by device-specific
+# scripts, typically under control of settings in the target definition file.
+# It is very possible that some or all of these eight frames will be empty,
+# and if an entire row or column is empty then Tk will make them invisible.
+#
+# Possible enhancements:
+# 1) implement some sort of paning/resizing around the central text window.
+# That would provide some way of letting the user control the space
+# taken by device-specific subwindows. This would be implemented
+# by modifying the weights assigned to different rows/columns.
+# 2) it would be very useful if the main text window could be split,
+# like emacs. This would require multiple text widgets, with output
+# being pasted in each one.
+# 3) possibly the text window should not be hard-wired to the centre frame,
+# instead its frame could be selected by preferences somehow.
+
+if { $synth::flag_debug } {
+ synth::report "Creating main window layout\n"
+}
+
+# The various frames are generally accessed via variables
+
+menu .menubar -borderwidth 1
+menu .menubar.file
+menu .menubar.edit
+menu .menubar.view
+menu .menubar.windows
+menu .menubar.help
+
+. configure -menu .menubar
+.menubar add cascade -label "File" -underline 0 -menu .menubar.file
+.menubar add cascade -label "Edit" -underline 0 -menu .menubar.edit
+.menubar add cascade -label "View" -underline 0 -menu .menubar.view
+.menubar add cascade -label "Windows" -underline 0 -menu .menubar.windows
+.menubar add cascade -label "Help" -underline 0 -menu .menubar.help
+
+.menubar.file add command -label "Save" -underline 0 -accelerator "Ctrl-S" -command [list synth::_handle_file_save]
+.menubar.file add command -label "Save As..." -underline 5 -command [list synth::_handle_file_save_as]
+.menubar.file add command -label "Save All..." -underline 6 -command [list synth::_handle_file_save_all]
+.menubar.file add command -label "Kill eCos" -underline 0 -command [list synth::_handle_kill_request]
+.menubar.file add command -label "Exit" -underline 1 -accelerator "Ctrl-Q" -command [list synth::_handle_exit_request]
+bind . <Control-KeyPress-q> [list synth::_handle_exit_request]
+bind . <Control-KeyPress-s> [list synth::_handle_file_save]
+
+# Once eCos has exited, the kill option should be disabled
+namespace eval synth {
+ proc _menubar_ecos_exit_clean { arg_list } {
+ .menubar.file entryconfigure "Kill eCos" -state disabled
+ }
+ synth::hook_add "ecos_exit" synth::_menubar_ecos_exit_clean
+}
+
+frame .toolbar -borderwidth 1 -relief groove
+if { "" != $synth::image_save } {
+ button .toolbar.save -image $synth::image_save -borderwidth 0 -command [list synth::_handle_file_save]
+ pack .toolbar.save -side left -padx 2
+ synth::register_balloon_help .toolbar.save "Save visible output"
+}
+if { "" != $synth::image_saveall } {
+ button .toolbar.saveall -image $synth::image_saveall -borderwidth 0 -command [list synth::_handle_file_save_all]
+ pack .toolbar.saveall -side left -padx 2
+ synth::register_balloon_help .toolbar.saveall "Save all output"
+}
+if { "" != $synth::image_cut } {
+ button .toolbar.cut -image $synth::image_cut -borderwidth 0 -state disabled -command [list synth::_handle_edit_cut]
+ pack .toolbar.cut -side left -padx 2
+ synth::register_balloon_help .toolbar.cut "Cut"
+}
+if { "" != $synth::image_copy } {
+
+ button .toolbar.copy -image $synth::image_copy -borderwidth 0 -command [list synth::_handle_edit_copy]
+ pack .toolbar.copy -side left -padx 2
+ synth::register_balloon_help .toolbar.copy "Copy"
+}
+if { "" != $synth::image_paste } {
+ button .toolbar.paste -image $synth::image_paste -borderwidth 0 -state disabled -command [list synth::_handle_edit_paste]
+ pack .toolbar.paste -side left -padx 2
+ synth::register_balloon_help .toolbar.paste "Paste"
+}
+pack .toolbar -side top -fill x
+
+frame .main
+frame .main.nw -borderwidth 0
+frame .main.n -borderwidth 0
+frame .main.ne -borderwidth 0
+frame .main.e -borderwidth 0
+frame .main.se -borderwidth 0
+frame .main.s -borderwidth 0
+frame .main.sw -borderwidth 0
+frame .main.w -borderwidth 0
+
+frame .main.centre
+
+frame .main.border_nw_n -width 2 -background black -borderwidth 0
+frame .main.border_n_ne -width 2 -background black -borderwidth 0
+frame .main.border_w_centre -width 2 -background black -borderwidth 0
+frame .main.border_centre_e -width 2 -background black -borderwidth 0
+frame .main.border_sw_s -width 2 -background black -borderwidth 0
+frame .main.border_s_se -width 2 -background black -borderwidth 0
+frame .main.border_nw_w -height 2 -background black -borderwidth 0
+frame .main.border_n_centre -height 2 -background black -borderwidth 0
+frame .main.border_ne_e -height 2 -background black -borderwidth 0
+frame .main.border_w_sw -height 2 -background black -borderwidth 0
+frame .main.border_centre_s -height 2 -background black -borderwidth 0
+frame .main.border_e_se -height 2 -background black -borderwidth 0
+
+text .main.centre.text -xscrollcommand [list .main.centre.horizontal set] -yscrollcommand [list .main.centre.vertical set]
+scrollbar .main.centre.horizontal -orient horizontal -command [list .main.centre.text xview]
+scrollbar .main.centre.vertical -orient vertical -command [list .main.centre.text yview]
+grid configure .main.centre.text -row 0 -column 0 -sticky news
+grid configure .main.centre.vertical -row 0 -column 1 -sticky ns
+grid configure .main.centre.horizontal -row 1 -column 0 -sticky ew
+# Is there anything useful to be done in 1,1? e.g. a >> button to
+# go directly to perform ".main.centre.text see end"
+
+# Make sure that row 0 column 0, i.e. the text widget rather than the
+# scrollbars, grows to fit all available space.
+grid rowconfigure .main.centre 0 -weight 1
+grid rowconfigure .main.centre 1 -weight 0
+grid columnconfigure .main.centre 0 -weight 1
+grid columnconfigure .main.centre 1 -weight 0
+
+grid configure .main.nw -row 0 -column 0 -sticky news
+grid configure .main.border_nw_n -row 0 -column 1 -sticky ns
+grid configure .main.n -row 0 -column 2 -sticky news
+grid configure .main.border_n_ne -row 0 -column 3 -sticky ns
+grid configure .main.ne -row 0 -column 4 -sticky news
+grid configure .main.border_nw_w -row 1 -column 0 -sticky ew
+grid configure .main.border_n_centre -row 1 -column 1 -columnspan 3 -sticky ew
+grid configure .main.border_ne_e -row 1 -column 4 -sticky ew
+grid configure .main.w -row 2 -column 0 -sticky news
+grid configure .main.border_w_centre -row 2 -column 1 -sticky ns
+grid configure .main.centre -row 2 -column 2 -sticky news
+grid configure .main.border_centre_e -row 2 -column 3 -sticky ns
+grid configure .main.e -row 2 -column 4 -sticky news
+grid configure .main.border_w_sw -row 3 -column 0 -sticky ew
+grid configure .main.border_centre_s -row 3 -column 1 -columnspan 3 -sticky ew
+grid configure .main.border_e_se -row 3 -column 4 -sticky ew
+grid configure .main.sw -row 4 -column 0 -sticky news
+grid configure .main.border_sw_s -row 4 -column 1 -sticky ns
+grid configure .main.s -row 4 -column 2 -sticky news
+grid configure .main.border_s_se -row 4 -column 3 -sticky ns
+grid configure .main.se -row 4 -column 4 -sticky news
+grid columnconfigure .main 0 -weight 0
+grid columnconfigure .main 1 -weight 0
+grid columnconfigure .main 2 -weight 1
+grid columnconfigure .main 3 -weight 0
+grid columnconfigure .main 4 -weight 0
+grid rowconfigure .main 0 -weight 0
+grid rowconfigure .main 1 -weight 0
+grid rowconfigure .main 2 -weight 1
+grid rowconfigure .main 3 -weight 0
+grid rowconfigure .main 4 -weight 0
+
+# The .main frame should not be packed into the main window yet.
+# Until all devices have been instantiated the various subwindows
+# are not yet known, so the desired size of .main is not known
+# either. Packing it too early and then adding more windows
+# causes confusion.
+
+# }}}
+# {{{ Help
+
+# ----------------------------------------------------------------------------
+# Two main sources of documentation are of interest to the synthetic
+# target. The first is the toplevel eCos documentation. The second
+# is the documentation specific to the generic target. Device-specific
+# scripts may want to add menu entries for their own documentation.
+#
+# The problems are:
+# 1) where to find the documentation
+# 2) how to view it?
+#
+# The documentation should be in the component repository. If there is
+# a variable ECOS_REPOSITORY then that gives the appropriate information.
+# Otherwise things get messy because the repository being used for
+# eCos may not match the repository used when building the host-side
+# support - the versions should match but the repository may have
+# moved. Never the less that is the best we can do.
+# NOTE: sources.redhat.com might provide another alternative, but the
+# documentation is not organized in the same way as the repository.
+#
+# As for how to view the documentation, this is up to user preferences
+# but ecosynth has built-in knowledge of three different viewers.
+
+namespace eval synth {
+
+ if { $synth::flag_debug } {
+ synth::report "Setting up help menu\n"
+ }
+
+ variable _browser1 "mozilla -remote openURL(%s)"
+ variable _browser2 "mozilla %s"
+ variable _browser3 "gnome-help-browser %s"
+ variable _main_help ""
+ variable _synth_help ""
+ set _repo ""
+
+ if { [info exists env(ECOS_REPOSITORY)] } {
+ set _repo $env(ECOS_REPOSITORY)
+ } else {
+ set _repo $synth::_ecos_repository
+ }
+ if { ![file exists [file join $_repo "ecos.db"]] } {
+ synth::report_warning "Failed to locate eCos component repository.\n \
+ Please define an environment variable ECOS_REPOSITORY.\n"
+ } else {
+ # FIXME: this needs attention once the documentation is more sorted
+ set synth::_main_help [file join $_repo "index.html"]
+ if { ![file exists $synth::_main_help] } {
+ if { 0 } {
+ synth::report_warning "Failed to locate toplevel documentation file $synth::_main_help\n \
+ Help->eCos menu option disabled.\n"
+ }
+ set synth::_main_help ""
+ } else {
+ set synth::_main_help "file://$_main_help"
+ }
+
+ set synth::_synth_help [file join $_repo $synth::_ecosynth_package_dir $synth::_ecosynth_package_version "doc/hal-synth-arch.html"]
+ if { ![file exists $synth::_synth_help] } {
+ synth::report_warning "Failed to locate synthetic target documentation $synth::_synth_help\n \
+ Help->Synthetic target menu option disabled.\n"
+ set synth::_synth_help ""
+ } else {
+ set synth::_synth_help "file://$_synth_help"
+ }
+ }
+
+ if { "" != $_main_help } {
+ .menubar.help add command -label "eCos" -command [list synth::_menu_help $synth::handle_help]
+ } else {
+ .menubar.help add command -label "eCos" -state disabled
+ }
+ if { "" != $_synth_help } {
+ .menubar.help add command -label "Synthetic target" -command [list synth::handle_help "$synth::_synth_help"]
+ } else {
+ .menubar.help add command -label "Synthetic target" -state disabled
+ }
+
+ unset _repo
+
+ proc handle_help { which } {
+ set command [format $synth::_browser1 $which]
+ if { 0 != [catch { eval exec -- "$command > /dev/null" } & ] } {
+ set command [format $synth::_browser2 $which]
+ if { 0 != [catch { eval exec -- "$command > /dev/null &" } ] } {
+ set command [format $synth::_browser3 $which]
+ if { 0 != [catch { eval exec -- "$command > /dev/null &"} ] } {
+ synth::report_warning "Unable to start a help browser.\n Please check the settings in Edit->Preferences.\n"
+ }
+ }
+ }
+ }
+
+ # FIXME: add an about box as well.
+}
+
+# }}}
+# {{{ Filters
+
+# ----------------------------------------------------------------------------
+# The central text window is expected to provide the bulk of the information
+# to the user. This information can be voluminous, so filtering is desirable.
+#
+# There are two types of filters. System filters are provided by ecosynth
+# itself and by device-specific scripts. For example ecosynth has a filter
+# for warnings, and the console device has a filter for eCos trace messages.
+# In addition users can specify their own filters using regular expressions,
+# and those filters take priority. Note that there is an assumption that
+# output is predominantly line-based: if partial lines get output then
+# some confusion is possible.
+#
+# With tk the implementation is relatively straightforward: the text widget's
+# tag facility does all the hard work of controlling how text gets displayed.
+# It is possible to show or hide text using -elide, colours can be controlled
+# using -background and -foreground, ... Not all of this functionality
+# is made available to the user just yet.
+
+namespace eval synth {
+ # The bulk of the information is held in arrays, indexed by the name of
+ # the filter. Lists are used to keep track of all valid names.
+ variable _system_filter_list [list]
+ variable _system_filter_settings
+ variable _user_filter_list [list]
+ variable _user_filter_settings
+
+ # Does a given system filter already exist?
+ proc filter_exists { name } {
+ set result 0
+ if { -1 != [lsearch -exact $synth::_system_filter_list $name] } {
+ set result 1
+ }
+ return $result
+ }
+
+ proc filter_get_list { } {
+ return $synth::_system_filter_list
+ }
+
+ # Parsing support. All filters take a number of standard options:
+ #
+ # -text "message" - how to identify this filter to the user
+ # -hide [0|1] - whether or not this text should be hidden by default
+ # -foreground <colour>
+ # -background <colour>
+ #
+ # The details of the currently supported options are known only to
+ # filter_parse_options and filter_add, allowing new options such
+ # as font manipulation to be added in future.
+ #
+ # There are two ways of adding a filter. filter_add is typically used
+ # inside ecosynth.tcl with known good data. filter_add_parsed is
+ # used with user-provided data, e.g. from the target definition file,
+ # after a call to filter_validate.
+ proc filter_parse_options { arg_list result_ref message_ref } {
+ upvar 1 $result_ref result
+ upvar 1 $message_ref message
+ set message ""
+
+ set text_set 0
+ set hide_set 0
+ set foreground_set 0
+ set background_set 0
+
+ set len [llength $arg_list]
+ for { set i 0 } { $i < $len } { incr i } {
+ set arg [lindex $arg_list $i]
+ if { ( "-text" == $arg) ||
+ ( "-hide" == $arg) ||
+ ( "-foreground" == $arg) || ( "-fg" == $arg) ||
+ ( "-background" == $arg) || ( "-bg" == $arg) } {
+
+ incr i
+ if { $i >= $len } {
+ append message " Missing data after argument $arg\n"
+ } else {
+ set data [lindex $arg_list $i]
+ if { "-text" == $arg } {
+ if { $text_set } {
+ append message " Attempt to set -text option twice.\n"
+ } else {
+ set text_set 1
+ set result("-text") $data
+ }
+ } elseif { "-hide" == $arg } {
+ if { $hide_set } {
+ append message " Attempt to set -hide option twice.\n"
+ } else {
+ set hide_set 1
+ if { ! [string is boolean -strict $data] } {
+ append message " -hide should be given a boolean value, not \"$data\"\n"
+ } else {
+ set result("-hide") [expr $data ? 1 : 0]
+ }
+ }
+ } elseif { ( "-foreground" == $arg) || ( "-fg" == $arg ) } {
+ if { $foreground_set } {
+ append message " Attempt to set -foreground twice.\n"
+ } else {
+ set foreground_set 1
+ # FIXME: is there some way of validating this color?
+ set result("-foreground") $data
+ }
+ } elseif { ( "-background" == $arg) || ( "-bg" == $arg ) } {
+ if { $background_set } {
+ append message " Attempt to set -background twice.\n"
+ } else {
+ set background_set 1
+ # FIXME: is there some way of validating this color?
+ set result("-background") $data
+ }
+ }
+ }
+ } else {
+ append message " Unknown option \"$arg\".\n"
+ }
+ }
+
+ if { "" == $message } {
+ return 1
+ } else {
+ return 0
+ }
+ }
+
+ # Add a new system filter, after the options have been parsed
+ proc filter_add_parsed { name data_ref } {
+ upvar 1 $data_ref data
+
+ set text $name
+ set hide 0
+ set foreground "<default>"
+ set background "<default>"
+ if { [info exists data("-text")] } {
+ set text $data("-text")
+ }
+ if { [info exists data("-hide")] } {
+ set hide $data("-hide")
+ }
+ if { [info exists data("-foreground")] } {
+ set foreground $data("-foreground")
+ }
+ if { [info exists data("-background")] } {
+ set background $data("-background")
+ }
+
+ if { $hide } {
+ .main.centre.text tag configure $name -elide 1
+ } else {
+ .main.centre.text tag configure $name -elide 0
+ }
+ if { "<default>" == $foreground } {
+ .main.centre.text tag configure $name -foreground [.main.centre.text cget -foreground]
+ } else {
+ set msg ""
+ if [catch { .main.centre.text tag configure $name -foreground $foreground } msg ] {
+ synth::report_warning "Unable to configure color \"$foreground\"\n $msg\n"
+ set foreground "<default>"
+ .main.centre.text tag configure $name -foreground [.main.centre.text cget -foreground]
+ }
+ }
+ if { "<default>" == $background } {
+ .main.centre.text tag configure $name -background [.main.centre.text cget -background]
+ } else {
+ set msg ""
+ if [catch { .main.centre.text tag configure $name -background $background } msg ] {
+ synth::report_warning "Unable to configure color \"$background\"\n $msg\n"
+ set background "<default>"
+ .main.centre.text tag configure $name -background [.main.centre.text cget -background]
+ }
+ }
+
+ lappend synth::_system_filter_list $name
+ set synth::_system_filter_settings($name,text) $text
+ set synth::_system_filter_settings($name,hide) $hide
+ set synth::_system_filter_settings($name,foreground) $foreground
+ set synth::_system_filter_settings($name,background) $background
+
+ # System tags should only get added during initialization. Hence the
+ # first time the system filters window is brought up all filters
+ # should be defined. However, just in case a new filter is added
+ # in the middle of a run...
+ if { [winfo exists .system_filters] } {
+ destroy .system_filters
+ }
+ }
+
+ # Add a new system filter, performing the appropriate parsing.
+ proc filter_add { name args } {
+
+ if { [synth::filter_exists $name] } {
+ synth::internal_error "attempt to install filter $name twice.\n"
+ }
+ array set data [list]
+ set msg ""
+
+ if { ![synth::filter_parse_options $args data msg] } {
+ # Any dubious arguments to the internal filter_add are treated as fatal.
+ synth::internal_error "unable to create new filter $name.\n$msg"
+ } else {
+ filter_add_parsed $name data
+ }
+ }
+
+ filter_add "report" -text "ecosynth messages"
+ filter_add "error" -text "ecosynth errors" -foreground red
+ # amber is not a standard colour. Amber leds emit light in the range
+ # 595-605 nm, corresponding to rgb values of approx. FF4200.
+ # OrangeRed is close enough at FF4500
+ filter_add "warning" -text "ecosynth warnings" -foreground OrangeRed
+
+ # Bring up the system filters window, creating it if necessary.
+ # Keeping the toplevel around but iconified/withdrawn when
+ # unwanted means that properties such as size and position will
+ # tend to be preserved.
+ variable _system_filter_new_settings
+ variable _system_filter_widgets
+
+ proc _menu_view_system_filters { } {
+ if { [winfo exists .system_filters] } {
+ if { "normal" == [wm state .system_filters] } {
+ raise .system_filters
+ } else {
+ wm deiconify .system_filters
+ }
+ return
+ }
+ toplevel .system_filters
+ wm title .system_filters "ecosynth system filters"
+ wm protocol .system_filters "WM_DELETE_WINDOW" [list synth::_menu_view_system_filters_cancel]
+ wm group .system_filters .
+
+ frame .system_filters.main
+ label .system_filters.main.header1 -text "Filter"
+ label .system_filters.main.header2 -text "Hide"
+ label .system_filters.main.header3 -text "Foreground"
+ label .system_filters.main.header4 -text "Background"
+ set text_fg [.system_filters.main.header1 cget -foreground]
+ frame .system_filters.main.row0 -height 1 -background $text_fg
+ frame .system_filters.main.row2 -height 1 -background $text_fg
+ frame .system_filters.main.col0 -width 1 -background $text_fg
+ frame .system_filters.main.col2 -width 1 -background $text_fg
+ frame .system_filters.main.col4 -width 1 -background $text_fg
+ frame .system_filters.main.col6 -width 1 -background $text_fg
+ frame .system_filters.main.col8 -width 1 -background $text_fg
+ grid .system_filters.main.row0 -row 0 -column 0 -columnspan 9 -sticky ew
+ grid .system_filters.main.header1 -row 1 -column 1 -sticky news
+ grid .system_filters.main.header2 -row 1 -column 3 -sticky news
+ grid .system_filters.main.header3 -row 1 -column 5 -sticky news
+ grid .system_filters.main.header4 -row 1 -column 7 -sticky news
+ grid .system_filters.main.row2 -row 2 -column 0 -columnspan 9 -sticky ew
+
+ set row 3
+ foreach filter $synth::_system_filter_list {
+ set synth::_system_filter_new_settings($filter,hide) $synth::_system_filter_settings($filter,hide)
+ set synth::_system_filter_new_settings($filter,foreground) $synth::_system_filter_settings($filter,foreground)
+ set synth::_system_filter_new_settings($filter,background) $synth::_system_filter_settings($filter,background)
+
+ set synth::_system_filter_widgets($filter,label) \
+ [label .system_filters.main.filter_name_$row -text $synth::_system_filter_settings($filter,text)]
+ set synth::_system_filter_widgets($filter,hide) \
+ [checkbutton .system_filters.main.filter_hide_$row -borderwidth 2 -indicatoron false -selectcolor "" \
+ -image $synth::image_tick_no -selectimage $synth::image_tick_yes -variable synth::_system_filter_new_settings($filter,hide)]
+ set synth::_system_filter_widgets($filter,foreground) [button .system_filters.main.filter_foreground_$row -borderwidth 2 \
+ -command [list synth::_menu_view_system_filters_choose_foreground $filter]]
+ set synth::_system_filter_widgets($filter,background) [button .system_filters.main.filter_background_$row -borderwidth 2 \
+ -command [list synth::_menu_view_system_filters_choose_background $filter]]
+
+ grid .system_filters.main.filter_name_$row -row $row -column 1 -sticky news
+ grid .system_filters.main.filter_hide_$row -row $row -column 3 -sticky news
+ grid .system_filters.main.filter_foreground_$row -row $row -column 5 -sticky news
+ grid .system_filters.main.filter_background_$row -row $row -column 7 -sticky news
+
+ incr row
+ frame .system_filters.main.row$row -height 1 -background $text_fg
+ grid .system_filters.main.row$row -row $row -column 0 -columnspan 9 -sticky ew
+ incr row
+ }
+ grid .system_filters.main.col0 -row 0 -column 0 -rowspan $row -sticky ns
+ grid .system_filters.main.col2 -row 0 -column 2 -rowspan $row -sticky ns
+ grid .system_filters.main.col4 -row 0 -column 4 -rowspan $row -sticky ns
+ grid .system_filters.main.col6 -row 0 -column 6 -rowspan $row -sticky ns
+ grid .system_filters.main.col8 -row 0 -column 8 -rowspan $row -sticky ns
+
+ for { set i 0 } { $i < $row } { incr i 2 } {
+ grid rowconfigure .system_filters.main $i -weight 0
+ }
+ for { set i 1 } { $i < $row } { incr i 2 } {
+ grid rowconfigure .system_filters.main $i -weight 1
+ }
+ for { set i 0 } { $i < 9 } { incr i 2 } {
+ grid columnconfigure .system_filters.main $i -weight 0
+ }
+ for { set i 1 } { $i < 9 } { incr i 2 } {
+ grid columnconfigure .system_filters.main $i -weight 1
+ }
+
+ pack .system_filters.main -side top -fill both -expand 1 -pady 4 -padx 4
+
+ # FIXME: add try and revert buttons
+ frame .system_filters.buttons
+ button .system_filters.buttons.ok -text "OK" -command [list synth::_menu_view_system_filters_ok]
+ button .system_filters.buttons.cancel -text "Cancel" -command [list synth::_menu_view_system_filters_cancel]
+ pack .system_filters.buttons.ok .system_filters.buttons.cancel -side left -expand 1
+ pack .system_filters.buttons -side bottom -fill x -pady 4
+
+ frame .system_filters.separator -height 2 -borderwidth 1 -relief sunken
+ pack .system_filters.separator -side bottom -fill x -pady 4
+
+ bind .system_filters <KeyPress-Return> [list synth::_menu_view_system_filters_ok]
+ bind .system_filters <KeyPress-Escape> [list synth::_menu_view_system_filters_cancel]
+
+ synth::_menu_view_system_filters_reset
+ }
+
+ proc _menu_view_system_filters_reset { } {
+ foreach filter $synth::_system_filter_list {
+ set synth::_system_filter_new_settings($filter,hide) $synth::_system_filter_settings($filter,hide)
+ set synth::_system_filter_new_settings($filter,foreground) $synth::_system_filter_settings($filter,foreground)
+ set synth::_system_filter_new_settings($filter,background) $synth::_system_filter_settings($filter,background)
+
+ set colour $synth::_system_filter_new_settings($filter,foreground)
+ if { "<default>" == $colour } {
+ set colour [.system_filters.main.header1 cget -foreground]
+ }
+ $synth::_system_filter_widgets($filter,label) configure -foreground $colour
+ $synth::_system_filter_widgets($filter,foreground) configure -background $colour -activebackground $colour
+
+ set colour $synth::_system_filter_new_settings($filter,background)
+ if { "<default>" == $colour } {
+ set colour [.system_filters.main.header1 cget -background]
+ }
+ $synth::_system_filter_widgets($filter,label) configure -background $colour
+ $synth::_system_filter_widgets($filter,background) configure -background $colour -activebackground $colour
+ }
+ }
+
+ # Change a colour. For now this involves calling Tk's chooseColor utility.
+ # This is simple but not quite right: it would be much better to allow
+ # the foreground and background to be modified in the same dialog, providing
+ # immediate feedback on how the text will actually appear; it should also
+ # provide some simple way of reverting to the default.
+ proc _menu_view_system_filters_choose_foreground { filter } {
+ set current_colour $synth::_system_filter_new_settings($filter,foreground)
+ if { "<default>" == $current_colour } {
+ set current_colour [.system_filters.main.header1 cget -foreground]
+ }
+ set new_colour [tk_chooseColor -parent .system_filters -title "$synth::_system_filter_settings($filter,text) foreground" \
+ -initialcolor $current_colour]
+ if { "" != $new_colour } {
+ set synth::_system_filter_new_settings($filter,foreground) $new_colour
+ $synth::_system_filter_widgets($filter,label) configure -foreground $new_colour
+ $synth::_system_filter_widgets($filter,foreground) configure -background $new_colour -activebackground $new_colour
+ }
+ }
+
+ proc _menu_view_system_filters_choose_background { filter } {
+ set current_colour $synth::_system_filter_new_settings($filter,background)
+ if { "<default>" == $current_colour } {
+ set current_colour [.system_filters.main.header1 cget -background]
+ }
+ set new_colour [tk_chooseColor -parent .system_filters -title "$synth::_system_filter_settings($filter,text) background" \
+ -initialcolor $current_colour]
+ if { "" != $new_colour } {
+ set synth::_system_filter_new_settings($filter,background) $new_colour
+ $synth::_system_filter_widgets($filter,label) configure -background $new_colour
+ $synth::_system_filter_widgets($filter,background) configure -background $new_colour -activebackground $new_colour
+ }
+ }
+
+ proc _menu_view_system_filters_ok { } {
+ wm withdraw .system_filters
+ foreach filter $synth::_system_filter_list {
+ if { $synth::_system_filter_settings($filter,hide) != $synth::_system_filter_new_settings($filter,hide) } {
+ set hide $synth::_system_filter_new_settings($filter,hide)
+ set synth::_system_filter_settings($filter,hide) $hide
+ if { $hide } {
+ .main.centre.text tag configure $filter -elide 1
+ } else {
+ .main.centre.text tag configure $filter -elide 0
+ }
+ }
+ if { $synth::_system_filter_settings($filter,foreground) != $synth::_system_filter_new_settings($filter,foreground) } {
+ set foreground $synth::_system_filter_new_settings($filter,foreground)
+ set synth::_system_filter_settings($filter,foreground) $foreground
+ .main.centre.text tag configure $filter -foreground $foreground
+ }
+ if { $synth::_system_filter_settings($filter,background) != $synth::_system_filter_new_settings($filter,background) } {
+ set background $synth::_system_filter_new_settings($filter,background)
+ set synth::_system_filter_settings($filter,background) $background
+ .main.centre.text tag configure $filter -background $background
+ }
+ }
+ }
+
+ proc _menu_view_system_filters_cancel { } {
+ wm withdraw .system_filters
+ synth::_menu_view_system_filters_reset
+ }
+
+ # Now add a suitable entry to the View menu.
+ .menubar.view add command -label "System filters..." -command [list synth::_menu_view_system_filters]
+
+ # User filters.
+ # FIXME: implement
+ # .menubar.view add command -label "User filters..." -command [list synth::_menu_view_filters] -state disabled
+}
+
+# }}}
+# {{{ Text window
+
+# ----------------------------------------------------------------------------
+# The central text window is expected to provide the bulk of the information
+# to the user. Various filtering mechanisms are desirable. For example the
+# user should be able to control whether or not eCos trace messages are
+# currently visible, not to mention other characteristics such as font
+# and colours. The text widget's tag mechanism makes this relatively simple.
+
+namespace eval synth {
+
+ # Should the user be able to edit the text window, e.g. to add annotations?
+ # This is disabled by default but can be enabled.
+ variable flag_read_only 1
+
+ # By default disable wrapping. Possibly it should be possible to
+ # enable this on a per-tag basis.
+ .main.centre.text configure -wrap "none"
+
+ # Give the text widget the focus by default. That way operations
+ # like page-up work immediately.
+ focus .main.centre.text
+
+ # If editing is currently disallowed, do not accept any input.
+ # The code below is probably not quite sufficient, it is
+ # ASCII-centric. A separate binding for Alt- sequences ensures
+ # that the top-level menu processing continues to work.
+ # Similarly a separate binding for Control- sequences ensures
+ # that the shortcuts continue to work.
+ bind .main.centre.text <Alt-KeyPress> {
+ continue
+ }
+ bind .main.centre.text <Control-KeyPress> {
+ continue
+ }
+ bind .main.centre.text <KeyPress> {
+ if { !$synth::flag_read_only } {
+ continue
+ } elseif { 0 != [llength %A] } {
+ break
+ } elseif { ("Return" == "%K") || ("Tab" == "%K") || ("space" == "%K") } {
+ break
+ } else {
+ continue
+ }
+ }
+ # There are a few special control- bindings built in to the Tk text
+ # widget which perform editing operations
+ bind .main.centre.text <Control-KeyPress-h> {
+ if { !$synth::flag_read_only } {
+ continue
+ } else {
+ break
+ }
+ }
+ bind .main.centre.text <Control-KeyPress-d> {
+ if { !$synth::flag_read_only } {
+ continue
+ } else {
+ break
+ }
+ }
+ bind .main.centre.text <Control-KeyPress-k> {
+ if { !$synth::flag_read_only } {
+ continue
+ } else {
+ break
+ }
+ }
+ bind .main.centre.text <Control-KeyPress-o> {
+ if { !$synth::flag_read_only } {
+ continue
+ } else {
+ break
+ }
+ }
+ bind .main.centre.text <Control-KeyPress-t> {
+ if { !$synth::flag_read_only } {
+ continue
+ } else {
+ break
+ }
+ }
+
+ # Implement support for the normal edit menu operations.
+ # FIXME: add a search facility
+ .menubar.edit insert end command -label "Cut" -command [list synth::_handle_edit_cut] -underline 2 -accelerator "Ctrl-X" -state disabled
+ .menubar.edit insert end command -label "Copy" -command [list synth::_handle_edit_copy] -underline 0 -accelerator "Ctrl-C"
+ .menubar.edit insert end command -label "Paste" -command [list synth::_handle_edit_paste] -underline 0 -accelerator "Ctrl-V" -state disabled
+ .menubar.edit insert end command -label "Clear" -command [list synth::_handle_edit_clear] -underline 3 -accelerator "Del" -state disabled
+ .menubar.edit insert end command -label "Select All" -command [list synth::_handle_edit_select_all] -underline 9 -accelerator "Ctrl-A"
+ .menubar.edit insert end checkbutton -label "Read Only" -variable synth::flag_read_only
+ .menubar.edit insert end separator
+ proc _trace_read_only { name1 name2 op } {
+ if { !$synth::flag_read_only } {
+ .menubar.edit entryconfigure "Cut" -state normal
+ .menubar.edit entryconfigure "Paste" -state normal
+ .menubar.edit entryconfigure "Clear" -state normal
+ .toolbar.cut configure -state normal
+ .toolbar.paste configure -state normal
+ } else {
+ .menubar.edit entryconfigure "Cut" -state disabled
+ .menubar.edit entryconfigure "Paste" -state disabled
+ .menubar.edit entryconfigure "Clear" -state disabled
+ .toolbar.cut configure -state disabled
+ .toolbar.paste configure -state disabled
+ }
+ }
+ trace variable synth::flag_read_only "w" synth::_trace_read_only
+
+ # Support for cut'n'paste etc. The widget does most of the hard
+ # work, but this code has to distinguish between read-only and
+ # read-write windows.
+ #
+ # Some operations such as clear may operate on everything in the
+ # selection, including hidden text that happens to be in the
+ # range. That may or may not be the right thing to do. It is right
+ # if the intent is to get rid of all events during a period of
+ # time, but wrong if the user wants to get rid of specific text.
+ bind . <Control-KeyPress-x> [list synth::_handle_edit_cut]
+ bind . <Control-KeyPress-c> [list synth::_handle_edit_copy]
+ bind . <Control-KeyPress-v> [list synth::_handle_edit_paste]
+ bind . <KeyPress-Delete> [list synth::_handle_edit_clear]
+ bind . <Control-KeyPress-a> [list synth::_handle_edit_select_all]
+
+ bind .main.centre.text <<Paste>> {
+ if { !$synth::flag_read_only } {
+ continue
+ } else {
+ break
+ }
+ }
+ bind .main.centre.text <<Cut>> {
+ if { !$synth::flag_read_only } {
+ continue
+ } else {
+ break
+ }
+ }
+ bind .main.centre.text <<Clear>> {
+ if { !$synth::flag_read_only } {
+ continue
+ } else {
+ break
+ }
+ }
+
+ proc _handle_edit_cut { } {
+ event generate .main.centre.text "<<Cut>>"
+ }
+
+ proc _handle_edit_copy { } {
+ event generate .main.centre.text "<<Copy>>"
+ }
+
+ proc _handle_edit_paste { } {
+ event generate .main.centre.text "<<Paste>>"
+ }
+
+ proc _handle_edit_clear { } {
+ event generate .main.centre.text "<<Clear>>"
+ }
+
+ proc _handle_edit_select_all { } {
+ .main.centre.text tag add sel 1.0 "end - 1 chars"
+ }
+
+ # Most output to the text window goes through this routine. It inserts
+ # some text with an appropriate tag. In addition it will ensure that
+ # the new text is visible if appropriate, and if a logfile has been
+ # specified then that will be updated as well.
+ proc output { msg tag } {
+ set ytail [lindex [.main.centre.text yview] 1]
+ set xhead [lindex [.main.centre.text xview] 0]
+ .main.centre.text insert end $msg $tag
+ if { (1.0 == $ytail) && (0.0 == $xhead) } {
+ .main.centre.text see end
+ }
+ if { "" != $synth::_logfd } {
+ puts -nonewline $synth::_logfd $msg
+ }
+ }
+
+ # Text output is now possible, so flush anything that is still buffered.
+ # xview and yview may not give the right results until the window
+ # is mapped, so always make the last text visible.
+ set synth::flag_gui_ready 1
+ synth::_flush_output
+ .main.centre.text see end
+
+
+ # Support for saving the current document. Save applies only to
+ # the currently visible text. SaveAll gives the hidden text as
+ # well.
+ variable _savefile ""
+ proc _handle_file_save { } {
+ if { "" == $synth::_savefile } {
+ set synth::_savefile [tk_getSaveFile -parent .]
+ if { "" == $synth::_savefile } {
+ return
+ }
+ }
+ set msg ""
+ if { 0 != [catch { set fd [open $synth::_savefile "w"] } msg] } {
+ synth::report_error "$msg\n"
+ if { $synth::_system_filter_settings(error,hide) } {
+ tk_messageBox -type "ok" -icon "error" -parent . -message "$msg\n"
+ }
+ return
+ }
+ set number_lines [expr int([.main.centre.text index end])]
+ for { set i 1 } { $i < $number_lines } { incr i } {
+ set tags [.main.centre.text tag names "[set i].0"]
+ if {[llength $tags] > 0 } {
+ set tag [lindex $tags 0]
+ if { [info exists synth::_system_filter_settings($tag,hide)] &&
+ $synth::_system_filter_settings($tag,hide) } {
+ continue
+ }
+ }
+ puts $fd [.main.centre.text get "[set i].0" "[set i].end"]
+ }
+ close $fd
+ }
+
+ proc _handle_file_save_as { } {
+ set new_savefile [tk_getSaveFile -parent .]
+ if { "" == $new_savefile } {
+ return
+ }
+ set synth::_savefile $new_savefile
+ synth::_handle_file_save
+ }
+
+ proc _handle_file_save_all { } {
+ set new_savefile [tk_getSaveFile -parent .]
+ if { "" == $new_savefile } {
+ return
+ }
+ set msg ""
+ if { 0 != [catch { set fd [open $new_savefile "w"] } msg] } {
+ synth::report_error "$msg\n"
+ if { $synth::_system_filter_settings(error,hide) } {
+ tk_messageBox -type "ok" -icon "error" -parent . -message "$msg\n"
+ }
+ return
+ }
+ puts -nonewline $fd [.main.centre.text get 1.0 end]
+ close $fd
+ }
+}
+
+# }}}
+# {{{ Heartbeat and status
+
+# ----------------------------------------------------------------------------
+# This code manages a status line at the bottom of the main window.
+# This involves a little heartbeat window, a label with the
+# text Running or Exited, some padding, and an additional status
+# line for use by other code.
+#
+# A variety of heartbeats have been attempted. The current one is
+# still not very good, but will do for now. Others are if 0'd out.
+# Note that these others may require additional images to be
+# preloaded.
+
+namespace eval synth {
+ frame .status -borderwidth 1 -relief groove
+
+ if { 1 } {
+ # The eCos logo, bouncing horizontally
+ variable _heartbeat_image_width [image width $synth::image_running1]
+ variable _heartbeat_offset 0
+ variable _heartbeat_ltor 1
+
+ frame .status.heartbeat -width $synth::_heartbeat_image_width -height [image height $synth::image_running1]
+ pack .status.heartbeat -side left
+ label .status.heartbeat.image -image $synth::image_running1 -anchor w -borderwidth 0
+ place .status.heartbeat.image -x $synth::_heartbeat_offset -y 0
+
+ proc _heartbeat_update { } {
+ if { ! $synth::ecos_running } {
+ place configure .status.heartbeat.image -x 0 -y 0
+ } else {
+ if { $synth::_heartbeat_ltor } {
+ incr synth::_heartbeat_offset 4
+ } else {
+ incr synth::_heartbeat_offset -4
+ }
+ place configure .status.heartbeat.image -x $synth::_heartbeat_offset
+
+ if { $synth::_heartbeat_offset < (5 - $synth::_heartbeat_image_width) } {
+ set synth::_heartbeat_ltor 1
+ } elseif { $synth::_heartbeat_offset > ( $synth::_heartbeat_image_width -5) } {
+ set synth::_heartbeat_ltor 0
+ }
+ after 100 synth::_heartbeat_update
+ }
+ }
+ after 100 synth::_heartbeat_update
+
+ } elseif { 0 } {
+ # The eCos logo, alternating between a normal and an inverse version
+ variable _heartbeat_image_width [image width $synth::image_running1]
+ variable _heartbeat_inverse ""
+ variable _heartbeat_normal ""
+ variable _heartbeat_inverse_width 1
+ variable _heartbeat_normal_width 1
+
+ canvas .status.heartbeat_canvas -width [image width $synth::image_running1] -height [image height $synth::image_running1]
+ pack .status.heartbeat_canvas -side left
+ label .status.heartbeat_canvas.background -image $synth::image_running1 -anchor w -borderwidth 0
+ label .status.heartbeat_canvas.inverse -image $synth::image_running2 -anchor w -borderwidth 0
+ label .status.heartbeat_canvas.normal -image $synth::image_running1 -anchor w -borderwidth 0
+ .status.heartbeat_canvas create window 0 0 -anchor nw -window .status.heartbeat_canvas.background
+ set synth::_heartbeat_inverse [.status.heartbeat_canvas create window 0 0 -anchor nw -window .status.heartbeat_canvas.inverse]
+ raise .status.heartbeat_canvas.inverse .status.heartbeat_canvas.background
+ set synth::_heartbeat_normal [.status.heartbeat_canvas create window 0 0 -anchor nw -window .status.heartbeat_canvas.normal]
+ raise .status.heartbeat_canvas.normal .status.heartbeat_canvas.inverse
+
+ .status.heartbeat_canvas itemconfigure $synth::_heartbeat_inverse -width $synth::_heartbeat_inverse_width
+ .status.heartbeat_canvas itemconfigure $synth::_heartbeat_normal -width $synth::_heartbeat_normal_width
+
+ proc _heartbeat_update { } {
+ if { ! $synth::ecos_running } {
+ .status.heartbeat_canvas delete $synth::_heartbeat_inverse
+ .status.heartbeat_canvas delete $synth::_heartbeat_normal
+ } else {
+ if { $synth::_heartbeat_inverse_width < $synth::_heartbeat_image_width } {
+ incr synth::_heartbeat_inverse_width 2
+ .status.heartbeat_canvas itemconfigure $synth::_heartbeat_inverse -width $synth::_heartbeat_inverse_width
+ } elseif { $synth::_heartbeat_normal_width < $synth::_heartbeat_image_width } {
+ incr synth::_heartbeat_normal_width 2
+ .status.heartbeat_canvas itemconfigure $synth::_heartbeat_normal -width $synth::_heartbeat_normal_width
+ } else {
+ set synth::_heartbeat_inverse_width 1
+ set synth::_heartbeat_normal_width 1
+ .status.heartbeat_canvas itemconfigure $synth::_heartbeat_inverse -width $synth::_heartbeat_inverse_width
+ .status.heartbeat_canvas itemconfigure $synth::_heartbeat_normal -width $synth::_heartbeat_normal_width
+ }
+ after 100 synth::_heartbeat_update
+ }
+ }
+ after 100 synth::_heartbeat_update
+
+ } elseif { 0 } {
+ # The eCos logo moving left to right, then replaced by a slightly smaller
+ # mirror version moving right to left, sort of as if rotating around a torus
+ variable _heartbeat_image_width [image width $synth::image_running1]
+ variable _heartbeat_offset [expr -1 * [image width $synth::image_running1]]
+ variable _heartbeat_ltor 1
+
+ frame .status.heartbeat -width $synth::_heartbeat_image_width -height [image height $synth::image_running1]
+ pack .status.heartbeat -side left
+ label .status.heartbeat.label -image $synth::image_running1 -anchor w -borderwidth 0
+
+ place .status.heartbeat.label -x $synth::_heartbeat_offset -y 0
+
+ proc _heartbeat_update { } {
+ if { ! $synth::ecos_running } {
+ .status.heartbeat.label configure -image $synth::image_running1
+ place configure .status.heartbeat.label -x 0
+ } else {
+ if { $synth::_heartbeat_ltor } {
+ incr synth::_heartbeat_offset 4
+ } else {
+ incr synth::_heartbeat_offset -4
+ }
+ place configure .status.heartbeat.label -x $synth::_heartbeat_offset
+ if { $synth::_heartbeat_offset < (0 - $synth::_heartbeat_image_width) } {
+ .status.heartbeat.label configure -image $synth::image_running1
+ set synth::_heartbeat_ltor 1
+ } elseif { $synth::_heartbeat_offset > $synth::_heartbeat_image_width } {
+ .status.heartbeat.label configure -image $synth::image_running3
+ set synth::_heartbeat_ltor 0
+ }
+ after 100 synth::_heartbeat_update
+ }
+ }
+ after 100 synth::_heartbeat_update
+ }
+
+ label .status.running -width 10 -text "Running" -anchor w
+ pack .status.running -side left
+ proc _heartbeat_exit_hook { arg_list } {
+ .status.running configure -text "Exited"
+ }
+ synth::hook_add "ecos_exit" synth::_heartbeat_exit_hook
+
+ label .status.text -text "" -anchor w
+ pack .status.text -side left -fill x -expand 1
+ pack .status -side bottom -fill x
+}
+
+# }}}
+# {{{ Preferences
+
+namespace eval synth {
+
+ if { $synth::flag_debug } {
+ synth::report "Setting up preferences window.\n"
+ }
+
+ variable _pref_browser1 ""
+ variable _pref_browser2 ""
+ variable _pref_browser3 ""
+
+ toplevel .preferences
+ wm title .preferences "ecosynth preferences"
+ wm withdraw .preferences
+ wm protocol .preferences "WM_DELETE_WINDOW" [list synth::_menu_edit_preferences_cancel]
+ wm group .preferences .
+
+ # NOTE: the fixed-size padx/pady arguments should probably be determined
+ # using a font calculation. The fixed width for the column 0 entries is also
+ # a cheat.
+ set _pref_col0_width 24
+
+ frame .preferences.help
+ frame .preferences.help.frame -borderwidth 2 -relief groove
+ pack .preferences.help.frame -fill both -expand 1 -pady 10
+ frame .preferences.help.frame.blank -height 10
+ label .preferences.help.frame.label1 -text "Preferred browser" -width $synth::_pref_col0_width -anchor w
+ label .preferences.help.frame.label2 -text "First alternative" -width $synth::_pref_col0_width -anchor w
+ label .preferences.help.frame.label3 -text "Second alternative" -width $synth::_pref_col0_width -anchor w
+ entry .preferences.help.frame.entry1 -width 40 -relief sunken -textvariable synth::_pref_browser1
+ entry .preferences.help.frame.entry2 -width 40 -relief sunken -textvariable synth::_pref_browser2
+ entry .preferences.help.frame.entry3 -width 40 -relief sunken -textvariable synth::_pref_browser3
+ grid .preferences.help.frame.blank -row 0 -column 0
+ grid .preferences.help.frame.label1 -row 1 -column 0 -sticky w
+ grid .preferences.help.frame.label2 -row 2 -column 0 -sticky w
+ grid .preferences.help.frame.label3 -row 3 -column 0 -sticky w
+ grid .preferences.help.frame.entry1 -row 1 -column 1 -sticky ew
+ grid .preferences.help.frame.entry2 -row 2 -column 1 -sticky ew
+ grid .preferences.help.frame.entry3 -row 3 -column 1 -sticky ew
+ grid columnconfigure .preferences.help.frame 0 -weight 0
+ grid columnconfigure .preferences.help.frame 1 -weight 1
+
+ label .preferences.help.title -text "Help"
+ place .preferences.help.title -in .preferences.help.frame -relx .1 -x -5 -y -10 -bordermode outside
+ pack .preferences.help -fill both -expand 1 -padx 10
+
+ frame .preferences.buttons
+ button .preferences.buttons.ok -text "OK" -command [list synth::_menu_edit_preferences_ok]
+ button .preferences.buttons.cancel -text "Cancel" -command [list synth::_menu_edit_preferences_cancel]
+ pack .preferences.buttons.ok .preferences.buttons.cancel -side left -expand 1
+ pack .preferences.buttons -side bottom -fill x -pady 4
+
+ frame .preferences.separator -height 2 -borderwidth 1 -relief sunken
+ pack .preferences.separator -side bottom -fill x -pady 4
+
+ bind .preferences <KeyPress-Return> [list synth::_menu_edit_preferences_ok]
+ bind .preferences <KeyPress-Escape> [list synth::_menu_edit_preferences_cancel]
+
+ variable _saved_focus ""
+ proc _menu_edit_preferences { } {
+ set synth::_saved_focus [focus]
+ set synth::_pref_browser1 $synth::_browser1
+ set synth::_pref_browser2 $synth::_browser2
+ set synth::_pref_browser3 $synth::_browser3
+ if { "normal" == [wm state .preferences] } {
+ raise .preferences
+ } else {
+ wm deiconify .preferences
+ }
+ focus .preferences.help.frame.entry1
+ }
+
+ proc _menu_edit_preferences_ok { } {
+ if { $synth::_browser1 != $synth::_pref_browser1 } {
+ set synth::_browser1 $synth::_pref_browser1
+ }
+ if { $synth::_browser2 != $synth::_pref_browser2 } {
+ set synth::_browser2 $synth::_pref_browser2
+ }
+ if { $synth::_browser3 != $synth::_pref_browser3 } {
+ set synth::_browser3 $synth::_pref_browser3
+ }
+
+ wm withdraw .preferences
+ catch { focus $synth::_saved_focus }
+ }
+
+ proc _menu_edit_preferences_cancel { } {
+ wm withdraw .preferences
+ catch { focus $synth::_saved_focus }
+ }
+
+ .menubar.edit add command -label "Preferences..." -command [list synth::_menu_edit_preferences]
+}
+
+# }}}
+# {{{ Clean-up
+
+# ----------------------------------------------------------------------------
+# GUI clean-up.
+#
+# Once all the device-specific scripts have been loaded and initialized, it
+# is time to go through the various components of the GUI and clean up
+# anything that is not actually required.
+namespace eval synth {
+
+ proc _cleanup_gui { } {
+
+ if { $synth::flag_debug } {
+ synth::report "Cleaning up unused GUI items.\n"
+ }
+
+ # File, Edit, View and Help should always have contents, unless
+ # the user has deleted entries via the mainrc file. The Windows
+ # menu will be empty unless contents have been added. There is
+ # always a global binding for ctrl-Q, and the window manager
+ # should always provide a way of killing off the application,
+ # so there is no need to treat File specially.
+ if { 0 == [.menubar.file index end] } {
+ .menubar delete "File"
+ }
+ if { 0 == [.menubar.edit index end] } {
+ .menubar delete "Edit"
+ }
+ if { 0 == [.menubar.view index end] } {
+ .menubar delete "View"
+ }
+ if { 0 == [.menubar.windows index end] } {
+ .menubar delete "Windows"
+ }
+ if { 0 == [.menubar.help index end] } {
+ .menubar delete "Help"
+ }
+
+ # If the toolbar is empty get rid of it.
+ if { 0 == [llength [winfo children .toolbar]] } {
+ pack forget .toolbar
+ destroy .toolbar
+ }
+
+ set can_destroy [list]
+ # Remove some or all of the top, left hand, right hand or bottom
+ # sets of frames, if nobody is using them.
+ if { (0 == [llength [pack slaves .main.nw]]) &&
+ (0 == [llength [pack slaves .main.n]]) &&
+ (0 == [llength [pack slaves .main.ne]]) } {
+ lappend can_destroy .main.nw .main.border_nw_n .main.n .main.border_n_ne .main.ne
+ lappend can_destroy .main.border_nw_w .main.border_n_centre .main.border_ne_e
+ }
+ if { (0 == [llength [pack slaves .main.nw]]) &&
+ (0 == [llength [pack slaves .main.w]]) &&
+ (0 == [llength [pack slaves .main.sw]]) } {
+ lappend can_destroy .main.nw .main.border_nw_w .main.w .main.border_w_sw .main.sw
+ lappend can_destroy .main.border_nw_n .main.border_w_centre .main.border_w_sw
+ }
+ if { (0 == [llength [pack slaves .main.ne]]) &&
+ (0 == [llength [pack slaves .main.e]]) &&
+ (0 == [llength [pack slaves .main.se]]) } {
+ lappend can_destroy .main.ne .main.border_ne_e .main.e .main.border_e_se .main.se
+ lappend can_destroy .main.border_n_ne .main.border_centre_e .main.border_s_se
+ }
+ if { (0 == [llength [pack slaves .main.sw]]) &&
+ (0 == [llength [pack slaves .main.s]]) &&
+ (0 == [llength [pack slaves .main.se]]) } {
+ lappend can_destroy .main.sw .main.border_sw_s .main.s .main.border_s_se .main.se
+ lappend can_destroy .main.border_w_sw .main.border_centre_s .main.border_e_se
+ }
+
+ foreach frame [lsort -unique $can_destroy] {
+ grid forget $frame
+ }
+ foreach frame [lsort -unique $can_destroy] {
+ destroy $frame
+ }
+
+ # Now that the full window layout is known the .main frame can be
+ # packed. Doing this before now could cause problems because the
+ # desired sizes of the subwindows are not known.
+ pack .main -expand 1 -fill both
+ }
+}
+
+# }}}
+# {{{ Screen dump support
+
+# Create screen dumps for the main window or for various subwindows.
+# Normally disabled, but useful when generating documentation.
+# FIXME: there seem to be problems getting the desired info about
+# transient windows, e.g. sizes. Hence the generated dumps still
+# require a lot of hand editing for now.
+if { 0 } {
+
+ bind . <Alt-w> {
+ exec xwd -out main.xwd -frame -id [winfo id .]
+ }
+
+ bind . <Alt-f> {
+ .menubar invoke "File"
+ after 100 exec xwd -out menu_file.xwd -frame -id [winfo id .]
+ }
+
+ bind . <Alt-e> {
+ .menubar invoke "Edit"
+ after 100 exec xwd -out menu_edit.xwd -frame -id [winfo id .]
+ }
+
+ bind . <Alt-v> {
+ .menubar invoke "View"
+ after 100 exec xwd -out menu_view.xwd -frame -id [winfo id .]
+ }
+
+ # The Help menu will extend beyond the window boundaries
+ bind . <Alt-h> {
+ .menubar invoke "Help"
+ after 100 exec xwd -out menu_help.xwd -root
+ }
+}
+
+# }}}
+
+# }}}
+}
+
+# {{{ Device instantiation
+
+# ----------------------------------------------------------------------------
+# This code handles the loading of device-specific scripts in response
+# to requests from the eCos application, and the instantiation of devices.
+# The application's request provides four pieces of information, held in
+# null-terminated strings in the request buffer:
+#
+# package name e.g. hal/synth/arch
+# package version e.g. current
+# device type e.g. console or ethernet
+# device instance e.g. eth0, or an empty string
+# device data e.g. 1024x768 for frame buffer resolution
+#
+# The first two pieces of information can be concatenated to give a
+# path to the install location. The third identifies a suitable
+# tcl script, e.g. console.tcl. This is sufficient to locate and load
+# the tcl script. It should return an instantiation procedure which will
+# be invoked with the instance name (or an empty string if there will only
+# ever be one instance of this device type). The instantiation procedure
+# will then be called with a number and the device instance string, and
+# should return a handler for all requests intended for that device.
+#
+# If the package name and version are empty strings then an application-specific
+# device is being initialized, and the code will search in the current
+# directory and in ~/.ecos/synth
+
+namespace eval synth {
+ # Map package/version/type on to an instantiation procedure
+ array set _instantiation_procs [list]
+
+ # Map device instances on to handlers.
+ array set _device_handlers [list]
+ array set _device_names [list]
+ variable _next_device_id 1
+
+ # Let scripts know their install location and their source dir
+ variable device_install_dir ""
+ variable device_src_dir ""
+
+ # One handler is predefined.
+ set synth::_device_handlers(0) synth::_handle_ecosynth_requests
+ set synth::_device_names(0) "ecosynth I/O auxiliary"
+
+ proc _handle_INSTANTIATE { data } {
+
+ set list [split $data \0]
+ if { [llength $list] < 5 } {
+ synth::send_reply -1 0 ""
+ return
+ }
+ set package_dir [lindex $list 0]
+ set package_version [lindex $list 1]
+ set device_type [lindex $list 2]
+ set device_instance [lindex $list 3]
+ set device_data [lindex $list 4]
+
+ if { ![info exists synth::_instantiation_procs($package_dir,$package_version,$device_type)] } {
+ # The required script has not yet been loaded.
+ if { "" != $package_dir } {
+ # The device is provided by a package
+ set synth::device_install_dir [file join $synth::_ecosynth_libexecdir "ecos" $package_dir $package_version]
+ set synth::device_src_dir [file join $synth::_ecosynth_repository $package_dir $package_version]
+
+ set script [file join $::synth::device_install_dir "[set device_type].tcl"]
+ if { ![file exists $script] } {
+ synth::report_error "Unable to initialize device $device_type\n Script \"$script\" not found.\n"
+ synth::send_reply -1 0 ""
+ return
+ } elseif { ![file readable $script] } {
+ synth::report_error "Unable to initialize device $device_type\n Script \"$script\" not readable.\n"
+ synth::send_reply -1 0 ""
+ return
+ }
+
+ # Is there a more recent version in the repository
+ if { [info exists ::env(ECOSYNTH_DEVEL)] } {
+ set _orig_name [file join $synth::device_src_dir "host" "[set device_type].tcl"]
+ if { [file exists $_orig_name] && [file readable $_orig_name] } {
+ if { [file mtime $_orig_name] >= [file mtime $script] } {
+ puts "$_orig_name is more recent than install: executing that."
+ set script $_orig_name
+ }
+ }
+ }
+ } else {
+ # The device is application-specific
+ set script [file join [pwd] "[set device_type].tcl"]
+ if { ![file exists $script] || ![file readable $script] } {
+ set script [file join "~/.ecos/synth" "[set device_type].tcl"]
+ if { ![file exists $script] || ![file readable $script] } {
+ synth::report_error "Unable to initialize device $device_type\n Script $device_type.tcl not found in [pwd] or ~/.ecos/synth\n"
+ synth::send_reply -1 0 ""
+ return
+ }
+ }
+ }
+
+ # The uplevel ensures that the device script operates at the global
+ # level, so any namespaces it creates are also at global level
+ # and not nested inside synth. This avoids having to add
+ # synth:: to lots of variable accesses and generally avoids confusion
+ set result [catch { uplevel #0 source $script } instantiator]
+ if { 0 != $result } {
+ synth::report_error "Unable to initialize device $device_type\n Error loading script \"$script\"\n $instantiator\n"
+ synth::send_reply -1 0 ""
+ return
+ }
+
+ set synth::_instantiation_procs($package_dir,$package_version,$device_type) $instantiator
+ }
+
+ set handler [$synth::_instantiation_procs($package_dir,$package_version,$device_type) \
+ $synth::_next_device_id $device_instance $device_data]
+ if { "" == $handler } {
+ synth::send_reply -1 0 ""
+ } else {
+ set result $synth::_next_device_id
+ incr synth::_next_device_id
+
+ set synth::_device_handlers($result) $handler
+ if { "" != $device_instance } {
+ set synth::_device_names($result) $device_instance
+ } else {
+ set synth::_device_names($result) $device_type
+ }
+ synth::send_reply $result 0 ""
+ }
+ }
+}
+
+# }}}
+# {{{ Interrupt handling
+
+# ----------------------------------------------------------------------------
+# Interrupt handling. Device handlers can request an interrupt number
+# using allocate_interrupt, and typically they will transmit this
+# number to the eCos device driver during initialization. Device handlers
+# can at any time call raise_interrupt with that number, which typically
+# will result in SIGIO being sent to the eCos application. The latter will
+# send a request to retrieve a mask of current pending interrupts.
+#
+# Exit handling, in the sense of the user selecting File->Exit, is also
+# handled here. Such an exit request also involves raising SIGIO and
+# then sending a specially format response to the get-pending request.
+
+namespace eval synth {
+
+ # The next interrupt number to be allocated. Interrupt source 0 is reserved
+ # for the timer, which is handled within eCos itself via SIGALRM
+ # rather than by the I/O auxiliary.
+ variable _interrupt_next 1
+
+ # Keep track of which interrupts belong to which devices, for display and
+ # diagnostic purposes.
+ array set _interrupt_names [list]
+ set _interrupt_names(0) "system clock"
+
+ # A mask of current pending interrupts
+ variable _interrupt_pending 0
+
+ # Is an exit request pending?
+ variable _interrupt_exit_pending 0
+
+ # Allow other code to hook into the interrupt system, e.g. to display
+ # pending interrupts.
+ synth::hook_define "interrupt"
+
+ # For now interrupts are always allocated dynamically, which effectively
+ # means in the order of C++ static constructors. This means that interrupt
+ # allocation depends on the application, and may even change as the application
+ # is relinked.
+ #
+ # An alternative approach would allow device scripts to request specific
+ # interrupt numbers, making the system a bit more deterministic, but
+ # introducing complications such as shared interrupt numbers. On the other
+ # hand that would make it easier to test chained interrupt support and
+ # the like.
+ # FIXME: add support for allocating specific interrupt numbers
+ proc interrupt_allocate { name } {
+ if { $synth::_interrupt_next == 32 } {
+ synth::report_error "Unable to allocate an interrupt vector for $name\nAll 32 interrupt vectors are already in use.\n"
+ return -1
+ }
+ set result $synth::_interrupt_next
+ set synth::_interrupt_names($result) $name
+ incr synth::_interrupt_next
+ return $result
+ }
+
+ # Allow information about the device->interrupt mappings to be retrieved
+ proc interrupt_get_max { } {
+ return [expr $synth::_interrupt_next - 1]
+ }
+ proc interrupt_get_devicename { number } {
+ if { [info exists synth::_interrupt_names($number) ] } {
+ return $synth::_interrupt_names($number)
+ } else {
+ return ""
+ }
+ }
+
+ # Raise a specific interrupt. If the interrupt is already pending
+ # this has no effect because a SIGIO will have been sent to the
+ # eCos application already. Otherwise SIGIO needs to be raised.
+ proc interrupt_raise { number } {
+ if { $number >= $synth::_interrupt_next } {
+ error "Attempt to raise invalid interrupt $number."
+ }
+ if { !$synth::ecos_running } {
+ return
+ }
+ set or_mask [expr 0x01 << $number]
+ if { 0 == ($or_mask & $synth::_interrupt_pending) } {
+ # This interrupt was not previously pending, so action is needed.
+ set synth::_interrupt_pending [expr $synth::_interrupt_pending | $or_mask]
+ synth::hook_call "interrupt" $number
+ synth::_send_SIGIO
+ }
+ }
+
+ # Request application exit. This is typically called in response to
+ # File->Exit.
+ proc request_application_exit { } {
+ set synth::_interrupt_exit_pending 1
+ synth::_send_SIGIO
+ }
+
+ # The eCos application wants to know about pending interrupts. It maintains
+ # its own set of pending interrupts, so once the information has been
+ # transferred there are no pending interrupts left in the I/O auxiliary,
+ # only in the eCos app. A pending exit is indicated by non-empty data,
+ # the actual data does not matter.
+ proc _handle_GET_IRQ_PENDING { } {
+ if { $synth::_interrupt_exit_pending } {
+ synth::send_reply $synth::_interrupt_pending 1 "x"
+ } else {
+ synth::send_reply $synth::_interrupt_pending 0 ""
+ }
+ set synth::_interrupt_pending 0
+ }
+}
+
+# }}}
+# {{{ Initialization complete
+
+# ----------------------------------------------------------------------------
+# This is called once all static constructors have been run, i.e. when all
+# eCos devices should be initialized. It does the following:
+#
+# 1) invoke any "initialized" hooks set up by device scripts.
+#
+# 2) run the per-user mainrc.tcl script, if it exists, so that users can
+# install hooks, modify the GUI display, etc.
+#
+# 3) warn about any unused command line arguments
+#
+# 4) optionally warn about any unused entries in the target definition file
+#
+# 5) clean up the GUI, e.g. remove unwanted windows and borders, and display it.
+#
+# However if the user specified --help then, instead of all the above,
+# a help message is displayed and the auxiliary exits, hopefully taking the
+# eCos application with it.
+
+namespace eval synth {
+
+ proc _handle_CONSTRUCTORS_DONE { } {
+
+ if { $synth::flag_help } {
+ puts "Usage : <eCos application> <options>"
+ puts " Options are passed to the I/O auxiliary, and are not"
+ puts " accessible to the eCos application."
+ puts "Standard options:"
+ puts " -io : run with I/O facilities."
+ puts " -nio : run with no I/O facilities at all."
+ puts " -nw, --no-windows : run in console mode."
+ puts " -w, --windows : run in GUI mode (default)."
+ puts " -v, --version : display the version of the I/O auxiliary."
+ puts " -h, --help : show this help text."
+ puts " -k, --keep-going : ignore errors in init scripts or the"
+ puts " target definition file."
+ puts " -nr, --no-rc : do not run the user's init scripts."
+ puts " -x, --exit : terminate I/O auxiliary as soon as the eCos"
+ puts " application exits (default in console mode)."
+ puts " -nx, --no-exit : I/O auxiliary keeps running even after eCos"
+ puts " application has exited (default in GUI mode)."
+ puts " -V, --verbose : provide additional output during the run."
+ puts " -l <file>, --logfile <file> : send all output to the specified file. In"
+ puts " GUI mode this in addition to the main text"
+ puts " window. In console mode this is instead of"
+ puts " stdout."
+ puts " -t <file>, --target <file> : use the specified .tdf file as the target"
+ puts " definition. The auxiliary will look for this"
+ puts " file in the current directory, ~/.ecos, and"
+ puts " finally the install location."
+ puts " -geometry <geometry> : size and position for the main window."
+ synth::hook_call "help"
+ exit 1
+ }
+
+ synth::hook_call "ecos_initialized"
+
+ # ----------------------------------------------------------------------------
+ if { !$synth::flag_no_rc } {
+ set _config_file [file join "~/.ecos/synth" "mainrc.tcl"]
+ if { [file exists $_config_file] } {
+ if { [file readable $_config_file] } {
+ if { [catch { source $_config_file } msg ] } {
+ set error "Failed to execute user initialization file \"$_config_file\"\n"
+ append error " $msg\n"
+ if { $synth::flag_verbose } {
+ append error "------- backtrace ------------------------------------------\n"
+ append error $::errorInfo
+ append error "\n------- backtrace ends -------------------------------------\n"
+ }
+ synth::report_error $error
+ }
+ } else {
+ synth::report_error "No read access to user initialization file \"$_config_file\"\n"
+ }
+ }
+ unset _config_file
+ }
+
+ # ----------------------------------------------------------------------------
+ # Report any arguments that have not been used up by the auxiliary itself
+ # or by any device handlers
+ set unconsumed_args [synth::argv_get_unconsumed]
+ foreach arg $unconsumed_args {
+ synth::report_warning "Unrecognised command line option \"$arg\", ignored.\n"
+ }
+
+ # ----------------------------------------------------------------------------
+ if { $synth::flag_verbose } {
+ set unconsumed_devices [synth::tdf_get_unconsumed_devices]
+ set unconsumed_options [synth::tdf_get_unconsumed_options]
+ if { (0 != [llength $unconsumed_devices]) || (0 != [llength $unconsumed_options]) } {
+ set msg "Target definition file $synth::target_definition\n"
+ foreach dev $unconsumed_devices {
+ append msg " synth_device \"$dev\" not recognised.\n"
+ }
+ foreach option $unconsumed_options {
+ set dev [lindex $option 0]
+ set opt [lindex $option 1]
+ append msg " synth_device \"$dev\", option \"$opt\" not recognised.\n"
+ }
+ synth::report_warning $msg
+ }
+ }
+
+ # ----------------------------------------------------------------------------
+ if { $synth::flag_gui } {
+ synth::_cleanup_gui
+ wm deiconify .
+ }
+
+ # ----------------------------------------------------------------------------
+ # Finally send a reply back to the application so it can really
+ # start running. Alternatively, if any errors occurred during
+ # initialization and the user did not specify --keep-going then
+ # send back an error code, causing the eCos application to terminate.
+ if { (0 == $synth::_error_count) || $synth::flag_keep_going } {
+ synth::send_reply 1 0 ""
+ } else {
+ synth::send_reply 0 0 ""
+ }
+ }
+}
+
+# }}}
+# {{{ Requests for the I/O auxiliary itself
+
+# ----------------------------------------------------------------------------
+# There are three requests which can be aimed at the I/O auxiliary itself,
+# rather than at device-specific scripts. These are: INSTANTIATE to instantiate
+# a device; CONSTRUCTORS_DONE to indicate when initialization is complete;
+# and GET_IRQ_PENDING which deals with interrupts.
+
+namespace eval synth {
+
+ proc _handle_ecosynth_requests { devid request arg1 arg2 request_data request_len reply_len } {
+ if { 0x01 == $request } {
+ synth::_handle_INSTANTIATE $request_data
+ } elseif { 0x02 == $request } {
+ synth::_handle_CONSTRUCTORS_DONE
+ } elseif { 0x03 == $request } {
+ synth::_handle_GET_IRQ_PENDING
+ } elseif { 0x04 == $request } {
+ synth::_handle_GET_VERSION
+ } else {
+ error "The eCos application has sent an invalid request sent to the I/O auxiliary"
+ }
+ }
+
+ variable _SYNTH_AUXILIARY_PROTOCOL_VERSION 0x01
+ proc _handle_GET_VERSION { } {
+ synth::send_reply $synth::_SYNTH_AUXILIARY_PROTOCOL_VERSION 0 ""
+ }
+}
+
+# }}}
+# {{{ Application exit
+
+# ----------------------------------------------------------------------------
+# The application has exited. This is detected by an EOF event on the pipe
+# from the eCos application.
+#
+# First the rest of the system is informed about the event using the
+# appropriate hook. This should ensure that the various device-specific
+# scripts do the right thing, e.g shut down sub-processes. Next, if
+# the immediate exit flag is set then that is obeyed. This flag is set by
+# default when in command-line mode because there is no point in continuing
+# to run if there is neither an application nor a GUI for the user to interact
+# with. It also gets set if the user has explicitly requested an exit.
+#
+# The exit call will invoke the appropriate hooks.
+namespace eval synth {
+
+ proc _application_has_exited { } {
+
+ set synth::ecos_running 0
+ synth::hook_call "ecos_exit"
+
+ # Depending on command-line arguments and whether or not the GUI is present,
+ # the auxiliary should now exit
+ if { $synth::flag_immediate_exit } {
+ exit 0
+ } elseif { !$synth::flag_gui } {
+ synth::report "eCos application has exited: I/O auxiliary still running in the background.\n"
+ }
+ }
+}
+
+# }}}
+# {{{ Communication with the eCos application
+
+namespace eval synth {
+
+ # ----------------------------------------------------------------------------
+ # The basic communication routines between the auxiliary and the
+ # eCos application. _read_request is invoked whenever there is
+ # a pending event on the pipe from the eCos application, either
+ # a request or an EOF. It
+
+ # Keep track of a couple of things to detect protocol mismatches.
+ variable _reply_expected 0
+ variable _expected_rxlen 0
+
+ # Receive a single request from the eCos application and invoke the
+ # appropriate handler.
+ proc _read_request { } {
+ # Read a single request from the application, or possibly EOF
+ set devid 0
+ set reqcode 0
+ set arg1 0
+ set arg2 0
+ set txlen 0
+ set txdata ""
+ set rxlen 0
+ set request [read $synth::_channel_from_app 24]
+
+ if { [eof $synth::_channel_from_app] } {
+ fileevent $synth::_channel_from_app readable ""
+ synth::_application_has_exited
+ return
+ }
+
+ # If a real request is sent then currently the application should
+ # not be expecting a reply
+ if { $synth::_reply_expected } {
+ error "The eCos application should not be sending a request when there is still a reply pending"
+ }
+
+ set binary_result [binary scan $request "iiiiii" devid reqcode arg1 arg2 txlen rxlen]
+ if { 6 != $binary_result } {
+ error "Internal error decoding request from eCos application"
+ }
+
+ # If running on a 64-bit platform then the above numbers will have been sign-extended,
+ # which could lead to confusing results
+ set devid [expr $devid & 0x0FFFFFFFF]
+ set reqcode [expr $reqcode & 0x0FFFFFFFF]
+ set arg1 [expr $arg1 & 0x0FFFFFFFF]
+ set arg2 [expr $arg2 & 0x0FFFFFFFF]
+ set txlen [expr $txlen & 0x0FFFFFFFF]
+ set rxlen [expr $rxlen & 0x0FFFFFFFF]
+
+ # The top bit of rxlen is special and indicates whether or not a reply is expected.
+ set synth::_reply_expected [expr 0 != ($rxlen & 0x080000000)]
+ set synth::_expected_rxlen [expr $rxlen & 0x07FFFFFFF]
+
+ # Is there additional data to be read
+ if { $txlen > 0 } {
+ set txdata [read $synth::_channel_from_app $txlen]
+ if { [eof $synth::_channel_from_app] } {
+ fileevent $synth::_channel_from_app readable ""
+ synth::_application_has_exited
+ return
+ }
+ }
+
+ # The devid can be used to get hold of a handler function, and that will do
+ # the hard work.
+ if { ![info exists synth::_device_handlers($devid)] } {
+ error "A request has been received for an unknown device $devid"
+ }
+
+ $synth::_device_handlers($devid) $devid $reqcode $arg1 $arg2 $txdata $txlen $synth::_expected_rxlen
+ }
+
+ # Register _read_request as the handler for file events on the pipe from
+ # the application.
+ fileevent $synth::_channel_from_app readable synth::_read_request
+
+ # Send a reply back to eCos. This consists of a two-word structure,
+ # result and length, followed by the data if any. Currently this
+ # raises an error if there is a mismatch between the specified and
+ # actual length of the data. Possibly the code should cope with
+ # data strings that exceed the specified length, extracting a
+ # suitable substring.
+ proc send_reply { result { length 0 } { data "" } } {
+ # Make sure that a reply is actually expected.
+ if { !$synth::_reply_expected } {
+ error "Attempt to send reply to application when no request has been sent"
+ } else {
+ set synth::_reply_expected 0
+ }
+
+ if { $length > $synth::_expected_rxlen } {
+ error "Reply contains more data than the application expects: $length bytes instead of $synth::_expected_rxlen"
+ }
+ if { ($length > 0) && ([string length $data] != $length) } {
+ error "Mismatch between specified and actual data length: $length [string length $data]"
+ }
+ if { !$synth::ecos_running } {
+ return
+ }
+
+ set struct [binary format "ii" $result $length]
+ # Ignore any errors when writing down the pipe. The only likely error is
+ # when the application has exited, causing a SIGPIPE which Tcl
+ # will handle. The application should be waiting for this response.
+ catch {
+ puts -nonewline $synth::_channel_to_app $struct
+ if { $length > 0 } {
+ puts -nonewline $synth::_channel_to_app $data
+ }
+ }
+ }
+}
+
+# }}}
+
+# {{{ initrc
+
+# ----------------------------------------------------------------------------
+# Just before control is returned to the eCos application, run the per-user
+# file, ~/.ecos/synth/initrc.tcl. The main GUI is now in place and the target
+# definition file has been read in, but no eCos static constructors have
+# been run yet and hence no devices have been loaded or activated.
+# All the various core procedures have been defined. initrc gives the user
+# a chance to install hooks, redefine some internals, and so on.
+# Another initialization file mainrc.tcl gets read in later, just before
+# the eCos application really starts running.
+#
+# Possibly ecosynth should also read in a system-wide initialization
+# file equivalent to emacs' site-start.el, but the extra complexity
+# does not seem warranted just yet.
+
+if { !$synth::flag_no_rc } {
+ set _config_file [file join "~/.ecos/synth" "initrc.tcl"]
+ if { [file exists $_config_file] } {
+ if { [file readable $_config_file] } {
+ if { [catch { source $_config_file } msg ] } {
+ set error "Failed to execute user initialization file \"$_config_file\"\n"
+ append error " $msg\n"
+ if { $synth::flag_verbose } {
+ append error "------- backtrace ------------------------------------------\n"
+ append error $::errorInfo
+ append error "\n------- backtrace ends -------------------------------------\n"
+ }
+ synth::report_error $error
+ }
+ } else {
+ synth::report_error "No read access to user initialization file \"$_config_file\"\n"
+ }
+ }
+ unset _config_file
+}
+
+# }}}
+# {{{ Done
+
+# ----------------------------------------------------------------------------
+# The last few steps.
+
+# Once everything has been initialized the application can be woken up again.
+# It should be blocked waiting for a single byte on the pipe.
+if { $synth::flag_debug } {
+ synth::report "Core initialization complete, resuming the eCos application.\n"
+}
+
+puts -nonewline $synth::_channel_to_app "."
+
+# Enter the event loop. In console mode there is a problem if -nx has been
+# specified: there may not be any event handlers left once the eCos application
+# has exited, so the vwait would abort. This is avoided by a dummy after proc.
+if { !$synth::flag_gui && !$synth::flag_immediate_exit } {
+ namespace eval synth {
+ proc _dummy_after_handler { } {
+ after 1000000 synth::_dummy_after_handler
+ }
+ }
+ after 1000000 synth::_dummy_after_handler
+}
+
+vwait synth::_ecosynth_exit
+
+# }}}
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/help.xbm b/cesar/ecos/packages/hal/synth/arch/current/host/help.xbm
new file mode 100644
index 0000000000..4486cfbfe0
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/help.xbm
@@ -0,0 +1,6 @@
+#define help_width 16
+#define help_height 15
+static unsigned char help_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0xe0, 0x03, 0x30, 0x06, 0x30, 0x06,
+ 0x00, 0x06, 0x00, 0x03, 0x80, 0x01, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01,
+ 0x80, 0x01, 0x00, 0x00, 0x00, 0x00};
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/paste.xbm b/cesar/ecos/packages/hal/synth/arch/current/host/paste.xbm
new file mode 100644
index 0000000000..bcd9fdd272
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/paste.xbm
@@ -0,0 +1,6 @@
+#define paste_width 16
+#define paste_height 15
+static unsigned char paste_bits[] = {
+ 0x00, 0x00, 0xe0, 0x01, 0x3e, 0x3f, 0xd1, 0x22, 0x09, 0x24, 0xf9, 0x27,
+ 0x01, 0x20, 0xc1, 0x3f, 0x41, 0x20, 0x41, 0x50, 0x41, 0x77, 0x41, 0x40,
+ 0x41, 0x4e, 0x7e, 0x40, 0xc0, 0x7f};
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/running1.ppm b/cesar/ecos/packages/hal/synth/arch/current/host/running1.ppm
new file mode 100644
index 0000000000..dc461b0350
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/running1.ppm
Binary files differ
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/running2.ppm b/cesar/ecos/packages/hal/synth/arch/current/host/running2.ppm
new file mode 100644
index 0000000000..38ccc9fac1
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/running2.ppm
Binary files differ
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/running3.ppm b/cesar/ecos/packages/hal/synth/arch/current/host/running3.ppm
new file mode 100644
index 0000000000..32a02b28b1
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/running3.ppm
Binary files differ
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/save.xbm b/cesar/ecos/packages/hal/synth/arch/current/host/save.xbm
new file mode 100644
index 0000000000..8546835fb7
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/save.xbm
@@ -0,0 +1,6 @@
+#define save_width 16
+#define save_height 15
+static unsigned char save_bits[] = {
+ 0x00, 0x00, 0xfe, 0xff, 0x0a, 0xa0, 0x0a, 0xe0, 0x0a, 0xa0, 0x0a, 0xa0,
+ 0x0a, 0xa0, 0x0a, 0xa0, 0xf2, 0x9f, 0x02, 0x80, 0xf2, 0x9f, 0xf2, 0x93,
+ 0xf2, 0x93, 0xf2, 0x93, 0xfc, 0xff, };
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/saveall.xbm b/cesar/ecos/packages/hal/synth/arch/current/host/saveall.xbm
new file mode 100644
index 0000000000..358a54403b
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/saveall.xbm
@@ -0,0 +1,6 @@
+#define saveall_width 16
+#define saveall_height 15
+static unsigned char saveall_bits[] = {
+ 0x00, 0x00, 0xfe, 0xff, 0x0a, 0xa0, 0x4a, 0xea, 0xaa, 0xaa, 0xea, 0xaa,
+ 0xaa, 0xaa, 0x0a, 0xa0, 0xf2, 0x9f, 0x02, 0x80, 0xf2, 0x9f, 0xf2, 0x93,
+ 0xf2, 0x93, 0xf2, 0x93, 0xfc, 0xff, };
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/tick_no.xbm b/cesar/ecos/packages/hal/synth/arch/current/host/tick_no.xbm
new file mode 100644
index 0000000000..cc89fa18a8
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/tick_no.xbm
@@ -0,0 +1,5 @@
+#define tick_no_width 11
+#define tick_no_height 11
+static unsigned char tick_no_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x03, 0x8c, 0x01, 0xd8, 0x00, 0x70, 0x00,
+ 0xd8, 0x00, 0x8c, 0x01, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00};
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/tick_yes.xbm b/cesar/ecos/packages/hal/synth/arch/current/host/tick_yes.xbm
new file mode 100644
index 0000000000..e100142f6a
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/tick_yes.xbm
@@ -0,0 +1,5 @@
+#define tick_yes_width 11
+#define tick_yes_height 11
+static unsigned char tick_yes_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x01, 0xc4, 0x01, 0xec, 0x00,
+ 0x7c, 0x00, 0x38, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/user_initrc.tcl b/cesar/ecos/packages/hal/synth/arch/current/host/user_initrc.tcl
new file mode 100644
index 0000000000..e0a941d9d1
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/user_initrc.tcl
@@ -0,0 +1,9 @@
+# ~/.ecos/synth/initrc.tcl
+#
+# This configuration file is executed by ecosynth, the eCos synthetic
+# target auxiliary program, early on during initialization. Typically
+# this file is used to set up search paths and similar variables. The
+# eCos synthetic target documentation should be consulted for more
+# information.
+#
+# This file is executed in a Tcl interpreter, so Tcl syntax applies.
diff --git a/cesar/ecos/packages/hal/synth/arch/current/host/user_mainrc.tcl b/cesar/ecos/packages/hal/synth/arch/current/host/user_mainrc.tcl
new file mode 100644
index 0000000000..a85cfc977f
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/host/user_mainrc.tcl
@@ -0,0 +1,10 @@
+# ~/.ecos/synth/mainrc.tcl
+#
+# This configuration file is executed by ecosynth, the eCos synthetic
+# target auxiliary program, just before the application is allowed
+# to continue. The target definition file has been processed and the
+# GUI has been set up, although usually the event loop will not have
+# been entered and no windows will have been displayed yet.
+#
+# This file is executed in a Tcl interpreter, so Tcl syntax applies.
+
diff --git a/cesar/ecos/packages/hal/synth/arch/current/include/hal_arch.h b/cesar/ecos/packages/hal/synth/arch/current/include/hal_arch.h
new file mode 100644
index 0000000000..211ecf0472
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/include/hal_arch.h
@@ -0,0 +1,90 @@
+#ifndef CYGONCE_HAL_HAL_ARCH_H
+#define CYGONCE_HAL_HAL_ARCH_H
+
+//=============================================================================
+//
+// hal_arch.h
+//
+// Architecture specific abstractions for synthetic target.
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): proven
+// Contributors:proven, pjo, nickg,bartv
+// Date: 1998-10-05
+// Purpose: Define architecture abstractions
+// Usage: #include <cyg/hal/hal_arch.h>
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+// ----------------------------------------------------------------------------
+// Architectural definitions such as processor save state information.
+// For the synthetic target most of this information has to be
+// provided by the variant HALs.
+
+#include <cyg/hal/var_arch.h>
+
+//-----------------------------------------------------------------------------
+// Exception handling function.
+// This function is provided by either the kernel or the common HAL to
+// deliver an exception to the current thread.
+// NOTE: the declaration should move to a common package.
+externC void cyg_hal_deliver_exception( CYG_WORD code, CYG_ADDRWORD data );
+
+//-----------------------------------------------------------------------------
+// Execution reorder barrier.
+// When optimizing the compiler can reorder code. In multithreaded systems
+// where the order of actions is vital, this can sometimes cause problems.
+// This macro may be inserted into places where reordering should not happen.
+
+#define HAL_REORDER_BARRIER() asm volatile ( "" : : : "memory" )
+
+//-----------------------------------------------------------------------------
+// Idle thread code.
+// This macro is called in the idle thread loop, and gives the HAL the
+// chance to insert code. In the synthetic target it involves blocking
+// until there is a signal.
+
+externC void hal_idle_thread_action(cyg_uint32 loop_count);
+
+#define HAL_IDLE_THREAD_ACTION(_count_) hal_idle_thread_action(_count_)
+
+//--------------------------------------------------------------------------
+#endif // CYGONCE_HAL_HAL_ARCH_H
+// End of hal_arch.h
diff --git a/cesar/ecos/packages/hal/synth/arch/current/include/hal_cache.h b/cesar/ecos/packages/hal/synth/arch/current/include/hal_cache.h
new file mode 100644
index 0000000000..2e4fe5d752
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/include/hal_cache.h
@@ -0,0 +1,88 @@
+#ifndef CYGONCE_HAL_CACHE_H
+#define CYGONCE_HAL_CACHE_H
+
+//=============================================================================
+//
+// hal_cache.h
+//
+// HAL cache control API
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors:proven,bartv
+// Date: 1998-10-29
+// Purpose: Cache control API
+// Description: The macros defined here provide the HAL APIs for handling
+// cache control operations.
+// Usage:
+// #include <cyg/hal/hal_cache.h>
+// ...
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+// ----------------------------------------------------------------------------
+// The synthetic target does not have a cache. The underlying hardware
+// is quite likely to have a cache, but the synthetic target code has
+// no way of manipulating it. A minimal set of no-op #define's is
+// required.
+
+#include <cyg/infra/cyg_type.h>
+
+#define HAL_ICACHE_ENABLE()
+#define HAL_ICACHE_DISABLE()
+#define HAL_ICACHE_SYNC()
+#define HAL_ICACHE_INVALIDATE_ALL()
+#define HAL_ICACHE_IS_ENABLED(_state_) \
+ CYG_MACRO_START \
+ (_state_) = 0; \
+ CYG_MACRO_END
+
+#define HAL_DCACHE_ENABLE()
+#define HAL_DCACHE_DISABLE()
+#define HAL_DCACHE_SYNC()
+#define HAL_DCACHE_INVALIDATE_ALL()
+#define HAL_DCACHE_IS_ENABLED(_state_) \
+ CYG_MACRO_START \
+ (_state_) = 0; \
+ CYG_MACRO_END
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_HAL_CACHE_H
+// End of hal_cache.h
diff --git a/cesar/ecos/packages/hal/synth/arch/current/include/hal_diag.h b/cesar/ecos/packages/hal/synth/arch/current/include/hal_diag.h
new file mode 100644
index 0000000000..df020c8e15
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/include/hal_diag.h
@@ -0,0 +1,78 @@
+#ifndef CYGONCE_HAL_HAL_DIAG_H
+#define CYGONCE_HAL_HAL_DIAG_H
+
+//=============================================================================
+//
+// hal_diag.h
+//
+// Synthetic target HAL Support for Kernel Diagnostic Routines
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): proven
+// Contributors:proven, bartv
+// Date: 1998-10-05
+// Purpose: HAL Support for Kernel Diagnostic Routines
+// Description: Diagnostic routines for use during kernel development.
+// Usage: #include "cyg/hal/hal_diag.h"
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/infra/cyg_type.h>
+
+//-----------------------------------------------------------------------------
+// functions implemented in hal_diag.c
+
+externC void hal_diag_init( void );
+
+externC void hal_diag_read_char(char *c);
+
+externC void hal_diag_write_char(char c);
+
+//-----------------------------------------------------------------------------
+
+#define HAL_DIAG_INIT() hal_diag_init()
+
+#define HAL_DIAG_READ_CHAR(_c_) hal_diag_read_char(&_c_)
+
+#define HAL_DIAG_WRITE_CHAR(_c_) hal_diag_write_char(_c_)
+
+//-----------------------------------------------------------------------------
+// end of hal_diag.h
+#endif // CYGONCE_HAL_HAL_DIAG_H
diff --git a/cesar/ecos/packages/hal/synth/arch/current/include/hal_intr.h b/cesar/ecos/packages/hal/synth/arch/current/include/hal_intr.h
new file mode 100644
index 0000000000..5da5bb7b98
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/include/hal_intr.h
@@ -0,0 +1,271 @@
+#ifndef CYGONCE_HAL_HAL_INTR_H
+#define CYGONCE_HAL_HAL_INTR_H
+
+//==========================================================================
+//
+// hal_intr.h
+//
+// HAL Interrupt and clock support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): proven
+// Contributors: proven, jskov, pjo, nickg, bartv
+// Date: 1999-02-20
+// Purpose: Define Interrupt support
+// Description: The macros defined here provide the HAL APIs for handling
+// interrupts and the clock.
+//
+// Usage:
+// #include <cyg/hal/hal_intr.h>
+// ...
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+// Interrupt and exception handling in the synthetic target is very much
+// tied up with POSIX signal handling.
+//
+// There are two interrupt sources to consider. The system clock is
+// provided most conveniently by a timer signal SIGALRM. All other
+// interrupts are handled by communication with the auxiliary program
+// and involve SIGIO. The model that is actually presented to
+// higher-level code is a single VSR, and 32 ISRs. ISR 0 is
+// arbitrarily assigned to the clock. The remaining 31 ISRs correspond
+// to devices managed through the auxiliary, effectively providing an
+// interrupt controller. A single VSR suffices because it is passed
+// the signal number as argument.
+//
+// Exceptions also correspond to signals, but are not handled through
+// the same VSR: slightly different processing is needed for
+// interrupts vs. exceptions, for example the latter does not involve
+// calling interrupt_end(). The exceptions of interest are SIGILL,
+// SIGBUS, SIGFPE, and SIGSEGV. SIGBUS and SIGSEGV are treated as a
+// single exception. Obviously there are other signals but they do not
+// have obvious meanings in the context of the synthetic target. NOTE:
+// SIGSTKFLT may be needed as well at some point.
+
+#define CYGNUM_HAL_INTERRUPT_RTC 0
+#define CYGNUM_HAL_ISR_MIN 0
+#define CYGNUM_HAL_ISR_MAX 31
+#define CYGNUM_HAL_ISR_COUNT (CYGNUM_HAL_ISR_MAX + 1)
+
+#define CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION 0
+#define CYGNUM_HAL_EXCEPTION_DATA_ACCESS 1
+#define CYGNUM_HAL_EXCEPTION_FPU 2
+
+#define CYGNUM_HAL_EXCEPTION_MIN 0
+#define CYGNUM_HAL_EXCEPTION_MAX CYGNUM_HAL_EXCEPTION_FPU
+#define CYGNUM_HAL_EXCEPTION_COUNT (CYGNUM_HAL_EXCEPTION_MAX + 1)
+
+#define CYGNUM_HAL_VECTOR_SIGNAL 0
+#define CYGNUM_HAL_VSR_MIN 0
+#define CYGNUM_HAL_VSR_MAX CYGNUM_HAL_VECTOR_SIGNAL
+#define CYGNUM_HAL_VSR_COUNT (CYGNUM_HAL_VSR_MAX + 1)
+
+// These #include's cannot happen until after the above are defined.
+// There are dependencies on e.g. CYGNUM_HAL_EXCEPTION_COUNT.
+// Basic data types
+#include <cyg/infra/cyg_type.h>
+
+// cyg_vector_t etc., supplied either by the kernel or the common HAL
+#include <cyg/hal/drv_api.h>
+
+// Nearly all interrupt state control happens via functions. This
+// facilitates debugging, for example it is easier to set breakpoints
+// that way, at the cost of performance. However performance is not a
+// critical issue for the synthetic target, Instead it is intended to
+// facilitate application development, and hence debugability has a
+// higher priority. There is one exception: the sequence
+// disable_interrupts() followed by restore_interrupts() occurs
+// frequently and is worth some inlining.
+//
+// Note: some of the details such as the existence of a global
+// variable hal_interrupts_enabled are known to the context switch
+// code in the variant HAL.
+typedef cyg_bool_t CYG_INTERRUPT_STATE;
+externC volatile cyg_bool_t hal_interrupts_enabled;
+externC void hal_enable_interrupts(void);
+externC cyg_bool_t hal_interrupt_in_use(cyg_vector_t);
+externC void hal_interrupt_attach(cyg_vector_t, cyg_ISR_t*, CYG_ADDRWORD, CYG_ADDRESS);
+externC void hal_interrupt_detach(cyg_vector_t, cyg_ISR_t*);
+externC void (*hal_vsr_get(cyg_vector_t))(void);
+externC void hal_vsr_set(cyg_vector_t, void (*)(void), void (**)(void));
+externC void hal_interrupt_mask(cyg_vector_t);
+externC void hal_interrupt_unmask(cyg_vector_t);
+externC void hal_interrupt_acknowledge(cyg_vector_t);
+externC void hal_interrupt_configure(cyg_vector_t, cyg_bool_t, cyg_bool_t);
+externC void hal_interrupt_set_level(cyg_vector_t, cyg_priority_t);
+
+
+#define HAL_ENABLE_INTERRUPTS() \
+ CYG_MACRO_START \
+ hal_enable_interrupts(); \
+ CYG_MACRO_END
+
+#define HAL_DISABLE_INTERRUPTS(_old_) \
+ CYG_MACRO_START \
+ _old_ = hal_interrupts_enabled; \
+ hal_interrupts_enabled = false; \
+ CYG_MACRO_END
+
+#define HAL_RESTORE_INTERRUPTS(_old_) \
+ CYG_MACRO_START \
+ if (!_old_) { \
+ hal_interrupts_enabled = false; \
+ } else if (!hal_interrupts_enabled) { \
+ hal_enable_interrupts(); \
+ } \
+ CYG_MACRO_END
+
+#define HAL_QUERY_INTERRUPTS(_old_) \
+ CYG_MACRO_START \
+ _old_ = hal_interrupts_enabled; \
+ CYG_MACRO_END
+
+#define HAL_TRANSLATE_VECTOR(_vector_, _index_) \
+ CYG_MACRO_START \
+ (_index_) = (_vector_); \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_IN_USE(_vector_, _state_) \
+ CYG_MACRO_START \
+ (_state_) = hal_interrupt_in_use(_vector_); \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_ATTACH(_vector_, _isr_, _data_, _object_ ) \
+ CYG_MACRO_START \
+ hal_interrupt_attach(_vector_, _isr_, (CYG_ADDRWORD) _data_, (CYG_ADDRESS) _object_); \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_DETACH(_vector_, _isr_) \
+ CYG_MACRO_START \
+ hal_interrupt_detach(_vector_, _isr_); \
+ CYG_MACRO_END
+
+#define HAL_VSR_GET(_vector_, _vsr_) \
+ CYG_MACRO_START \
+ (*_vsr_) = hal_vsr_get(_vector_); \
+ CYG_MACRO_END
+
+#define HAL_VSR_SET(_vector_, _vsr_, _poldvsr_) \
+ CYG_MACRO_START \
+ hal_vsr_set(_vector_, _vsr_, _poldvsr_); \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_MASK(_vector_) \
+ CYG_MACRO_START \
+ hal_interrupt_mask(_vector_); \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_UNMASK(_vector_) \
+ CYG_MACRO_START \
+ hal_interrupt_unmask(_vector_); \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_ACKNOWLEDGE(_vector_) \
+ CYG_MACRO_START \
+ hal_interrupt_acknowledge(_vector_); \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_CONFIGURE(_vector_, _level_, _up_) \
+ CYG_MACRO_START \
+ hal_interrupt_configure(_vector_, _level_, _up_); \
+ CYG_MACRO_END
+
+#define HAL_INTERRUPT_SET_LEVEL(_vector_, _level_) \
+ CYG_MACRO_START \
+ hal_interrupt_set_level(_vector_, _level_); \
+ CYG_MACRO_END
+
+// Additional data exported by the synthetic target interrupt handling
+// subsystem. These two variables correspond to typical interrupt
+// status and mask registers.
+extern volatile cyg_uint32 synth_pending_isrs;
+extern volatile cyg_uint32 synth_masked_isrs;
+
+// ----------------------------------------------------------------------------
+// The clock support
+externC void hal_clock_initialize(cyg_uint32);
+externC cyg_uint32 hal_clock_read(void);
+
+#define HAL_CLOCK_INITIALIZE( _period_ ) \
+ CYG_MACRO_START \
+ hal_clock_initialize(_period_); \
+ CYG_MACRO_END
+
+// No special action is needed for reset.
+#define HAL_CLOCK_RESET( _vector_, _period_ ) \
+ CYG_EMPTY_STATEMENT
+
+#define HAL_CLOCK_READ(_pvalue_) \
+ CYG_MACRO_START \
+ *(_pvalue_) = hal_clock_read(); \
+ CYG_MACRO_END
+
+// ----------------------------------------------------------------------------
+// HAL_DELAY_US() support. The macro is provided by the processor-specific
+// HAL, but the bogomips rating is provided by the architectural code.
+extern int hal_bogomips;
+#include <cyg/hal/var_intr.h>
+
+// ----------------------------------------------------------------------------
+// Resetting the Synth target is not possible, but existing the process is.
+externC void cyg_hal_sys_exit(int);
+#define HAL_PLATFORM_RESET() \
+ CYG_MACRO_START \
+ cyg_hal_sys_exit(0); \
+ CYG_MACRO_END
+
+extern void (*synth_atexit_handler)(void);
+#define HAL_PLATFORM_EXIT(x) \
+ CYG_MACRO_START \
+ if(synth_atexit_handler !=NULL){ \
+ (*synth_atexit_handler)(); } \
+ cyg_hal_sys_exit(x); \
+ CYG_MACRO_END
+
+// ----------------------------------------------------------------------------
+// Test case exit support.
+#define CYGHWR_TEST_PROGRAM_EXIT() \
+ CYG_MACRO_START \
+ cyg_hal_sys_exit(0); \
+ CYG_MACRO_END
+//---------------------------------------------------------------------------
+#endif // ifndef CYGONCE_HAL_HAL_INTR_H
+// End of hal_intr.h
diff --git a/cesar/ecos/packages/hal/synth/arch/current/include/hal_io.h b/cesar/ecos/packages/hal/synth/arch/current/include/hal_io.h
new file mode 100644
index 0000000000..2f44461b5a
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/include/hal_io.h
@@ -0,0 +1,587 @@
+#ifndef CYGONCE_HAL_HAL_IO_H
+#define CYGONCE_HAL_HAL_IO_H
+
+//=============================================================================
+//
+// hal_io.h
+//
+// HAL device IO register support.
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2002 Bart Veer
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors:nickg, bartv, alunn, jlarmour
+// Date: 1998-02-17
+// Purpose: Define IO register support
+// Description: The macros defined here provide the HAL APIs for handling
+// device IO control registers.
+//
+// For the synthetic target these macros should never
+// actually be used since the application will run as an
+// ordinary user application and should not have
+// permission to access any real hardware. Instead
+// hardware access should go via the auxiliary. Possibly
+// the macros should be #pragma poison'd, but some people
+// may want to run the synthetic target in a way that
+// does involve accessing real hardware.
+//
+// The synthetic target provides some additional I/O
+// facilities in the form of Linux system calls. A useful
+// subset of these are prototyped here, together with
+// associated constants. There are also I/O operations to
+// interact with the auxiliary.
+//
+// Usage:
+// #include <cyg/hal/hal_io.h>
+// ...
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/infra/cyg_type.h>
+
+#include <cyg/hal/var_io.h> // Variant-specific definitions
+
+//-----------------------------------------------------------------------------
+// IO Register address.
+// This type is for recording the address of an IO register.
+
+typedef volatile CYG_ADDRWORD HAL_IO_REGISTER;
+
+//-----------------------------------------------------------------------------
+// BYTE Register access.
+// Individual and vectorized access to 8 bit registers.
+
+#define HAL_READ_UINT8( _register_, _value_ ) \
+ CYG_MACRO_START \
+ ((_value_) = *((volatile CYG_BYTE *)(_register_))); \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT8( _register_, _value_ ) \
+ CYG_MACRO_START \
+ (*((volatile CYG_BYTE *)(_register_)) = (_value_)); \
+ CYG_MACRO_END
+
+#define HAL_READ_UINT8_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ (_buf_)[_i_] = ((volatile CYG_BYTE *)(_register_))[_j_]; \
+ } \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT8_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ ((volatile CYG_BYTE *)(_register_))[_j_] = (_buf_)[_i_]; \
+ } \
+ CYG_MACRO_END
+
+
+//-----------------------------------------------------------------------------
+// 16 bit access.
+// Individual and vectorized access to 16 bit registers.
+
+#define HAL_READ_UINT16( _register_, _value_ ) \
+ CYG_MACRO_START \
+ ((_value_) = *((volatile CYG_WORD16 *)(_register_))); \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT16( _register_, _value_ ) \
+ CYG_MACRO_START \
+ (*((volatile CYG_WORD16 *)(_register_)) = (_value_)); \
+ CYG_MACRO_END
+
+#define HAL_READ_UINT16_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ (_buf_)[_i_] = ((volatile CYG_WORD16 *)(_register_))[_j_]; \
+ } \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT16_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ ((volatile CYG_WORD16 *)(_register_))[_j_] = (_buf_)[_i_]; \
+ } \
+ CYG_MACRO_END
+
+//-----------------------------------------------------------------------------
+// 32 bit access.
+// Individual and vectorized access to 32 bit registers.
+
+#define HAL_READ_UINT32( _register_, _value_ ) \
+ CYG_MACRO_START \
+ ((_value_) = *((volatile CYG_WORD32 *)(_register_))); \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT32( _register_, _value_ ) \
+ CYG_MACRO_START \
+ (*((volatile CYG_WORD32 *)(_register_)) = (_value_)); \
+ CYG_MACRO_END
+
+#define HAL_READ_UINT32_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ (_buf_)[_i_] = ((volatile CYG_WORD32 *)(_register_))[_j_]; \
+ } \
+ CYG_MACRO_END
+
+#define HAL_WRITE_UINT32_VECTOR( _register_, _buf_, _count_, _step_ ) \
+ CYG_MACRO_START \
+ cyg_count32 _i_,_j_; \
+ for( _i_ = 0, _j_ = 0; _i_ < (_count_); _i_++, _j_ += (_step_)) { \
+ ((volatile CYG_WORD32 *)(_register_))[_j_] = (_buf_)[_i_]; \
+ } \
+ CYG_MACRO_END
+
+// ----------------------------------------------------------------------------
+// Linux system calls and associated structures and constants. This is
+// by no means a complete list, but there is enough information for
+// the needs of the relevant HAL packages. The information needs to be
+// kept in synch with the Linux header files, but in practice
+// divergence will be rare because that would imply incompatible
+// changes in the Linux kernel API.
+//
+// It may seem tempting to import the Linux header files directly, but
+// that would prevent cross-compilation and introduce all kinds of
+// namespace pollution.
+//
+// The actual implementation lives in variant HAL packages since
+// typically they involve direct system calls via bits of assembler.
+// Note that only a subset of system calls are actually implemented,
+// so the variant HALs may need to be updated if this list needs to
+// be extended.
+
+// Error codes.
+#define CYG_HAL_SYS_EINTR 4
+#define CYG_HAL_SYS_EAGAIN 11
+
+// Signal-related information
+#define CYG_HAL_SYS_SIGHUP 1
+#define CYG_HAL_SYS_SIGINT 2
+#define CYG_HAL_SYS_SIGQUIT 3
+#define CYG_HAL_SYS_SIGILL 4
+#define CYG_HAL_SYS_SIGTRAP 5
+#define CYG_HAL_SYS_SIGABRT 6
+#define CYG_HAL_SYS_SIGBUS 7
+#define CYG_HAL_SYS_SIGFPE 8
+#define CYG_HAL_SYS_SIGKILL 9
+#define CYG_HAL_SYS_SIGUSR1 10
+#define CYG_HAL_SYS_SIGSEGV 11
+#define CYG_HAL_SYS_SIGUSR2 12
+#define CYG_HAL_SYS_SIGPIPE 13
+#define CYG_HAL_SYS_SIGALRM 14
+#define CYG_HAL_SYS_SIGTERM 15
+#define CYG_HAL_SYS_SIGSTKFLT 16
+#define CYG_HAL_SYS_SIGCHLD 17
+#define CYG_HAL_SYS_SIGCONT 18
+#define CYG_HAL_SYS_SIGSTOP 19
+#define CYG_HAL_SYS_SIGTSTP 20
+#define CYG_HAL_SYS_SIGTTIN 21
+#define CYG_HAL_SYS_SIGTTOU 22
+#define CYG_HAL_SYS_SIGURG 23
+#define CYG_HAL_SYS_SIGXCPU 24
+#define CYG_HAL_SYS_SIGXFSZ 25
+#define CYG_HAL_SYS_SIGVTALRM 26
+#define CYG_HAL_SYS_SIGPROF 27
+#define CYG_HAL_SYS_SIGWINCH 28
+#define CYG_HAL_SYS_SIGIO 29
+#define CYG_HAL_SYS_SIGPWR 30
+#define CYG_HAL_SYS_SIGSYS 31
+
+#define CYG_HAL_SYS_SA_NOCLDSTOP 0x00000001
+#define CYG_HAL_SYS_SA_NOCLDWAIT 0x00000002
+#define CYG_HAL_SYS_SA_SIGINFO 0x00000004
+#define CYG_HAL_SYS_SA_RESTORER 0x04000000
+#define CYG_HAL_SYS_SA_RESTART 0x10000000
+#define CYG_HAL_SYS_SA_NODEFER 0x40000000
+
+#define CYG_HAL_SYS_SIG_BLOCK 0
+#define CYG_HAL_SYS_SIG_UNBLOCK 1
+#define CYG_HAL_SYS_SIG_SETMASK 2
+
+#define CYG_HAL_SYS__NSIG 64
+#define CYG_HAL_SYS__SIGBITS (8 * sizeof(unsigned long))
+#define CYG_HAL_SYS__SIGELT(_d_) ((_d_) / CYG_HAL_SYS__SIGBITS)
+#define CYG_HAL_SYS__SIGMASK(_d_) ((unsigned long)1 << ((_d_) % CYG_HAL_SYS__SIGBITS))
+
+typedef struct cyg_hal_sys_sigset_t {
+ unsigned long hal_sig_bits[CYG_HAL_SYS__NSIG / CYG_HAL_SYS__SIGBITS];
+} cyg_hal_sys_sigset_t;
+
+#define CYG_HAL_SYS_SIGFILLSET(_set_) \
+ CYG_MACRO_START \
+ unsigned int __i; \
+ for (__i = 0; __i < (CYG_HAL_SYS__NSIG / CYG_HAL_SYS__SIGBITS); __i++) { \
+ (_set_)->hal_sig_bits[__i] = ~0; \
+ } \
+ CYG_MACRO_END
+
+#define CYG_HAL_SYS_SIGEMPTYSET(_set_) \
+ CYG_MACRO_START \
+ unsigned int __i; \
+ for (__i = 0; __i < (CYG_HAL_SYS__NSIG / CYG_HAL_SYS__SIGBITS); __i++) { \
+ (_set_)->hal_sig_bits[__i] = 0; \
+ } \
+ CYG_MACRO_END
+
+#define CYG_HAL_SYS_SIGADDSET(_set_, _bit_) \
+ CYG_MACRO_START \
+ (_set_)->hal_sig_bits[CYG_HAL_SYS__SIGELT(_bit_ - 1)] |= CYG_HAL_SYS__SIGMASK(_bit_ - 1); \
+ CYG_MACRO_END
+
+#define CYG_HAL_SYS_SIGDELSET(_set_, _bit_) \
+ CYG_MACRO_START \
+ (_set_)->hal_sig_bits[CYG_HAL_SYS__SIGELT(_bit_ - 1)] &= ~CYG_HAL_SYS__SIGMASK(_bit_ - 1); \
+ CYG_MACRO_END
+
+#define CYG_HAL_SYS_SIGISMEMBER(_set_, _bit_) \
+ (0 != ((_set_)->hal_sig_bits[CYG_HAL_SYS__SIGELT(_bit_ - 1)] & CYG_HAL_SYS__SIGMASK(_bit_ - 1)))
+
+// The kernel sigaction structure has changed, to allow for >32
+// signals. This is the old version, i.e. a struct old_sigaction, for
+// use with the sigaction() system call rather than rt_sigaction(). It
+// is preferred to the more modern version because gdb knows about
+// rt_sigaction() and will start intercepting signals, but it seems to
+// ignore sigaction().
+struct cyg_hal_sys_sigaction {
+ void (*hal_handler)(int);
+ long hal_mask;
+ int hal_flags;
+ void (*hal_restorer)(void);
+};
+
+// Time support.
+struct cyg_hal_sys_timeval {
+ long hal_tv_sec;
+ long hal_tv_usec;
+};
+
+struct cyg_hal_sys_timezone {
+ int hal_tz_minuteswest;
+ int hal_tz_dsttime;
+};
+
+// Select support. Initially this is used only by the idle handler.
+#define CYG_HAL_SYS_FD_SETSIZE 1024
+#define CYG_HAL_SYS__NFDBITS (8 * sizeof(unsigned long))
+#define CYG_HAL_SYS__FDELT(_d_) ((_d_) / CYG_HAL_SYS__NFDBITS)
+#define CYG_HAL_SYS__FDMASK(_d_) ((unsigned long)1 << ((_d_) % CYG_HAL_SYS__NFDBITS))
+
+struct cyg_hal_sys_fd_set {
+ unsigned long hal_fds_bits[CYG_HAL_SYS_FD_SETSIZE / CYG_HAL_SYS__NFDBITS];
+};
+#define CYG_HAL_SYS_FD_ZERO(_fdsp_) \
+ do { \
+ unsigned int __i; \
+ for (__i = 0; \
+ __i < (CYG_HAL_SYS_FD_SETSIZE / CYG_HAL_SYS__NFDBITS); \
+ __i++) { \
+ (_fdsp_)->hal_fds_bits[__i] = 0; \
+ } \
+ } while (0);
+
+#define CYG_HAL_SYS_FD_SET(_fd_, _fdsp_) \
+ CYG_MACRO_START \
+ (_fdsp_)->hal_fds_bits[CYG_HAL_SYS__FDELT(_fd_)] |= CYG_HAL_SYS__FDMASK(_fd_); \
+ CYG_MACRO_END
+
+#define CYG_HAL_SYS_FD_CLR(_fd_, _fdsp_) \
+ CYG_MACRO_START \
+ (_fdsp_)->hal_fds_bits[CYG_HAL_SYS__FDELT(_fd_)] &= ~CYG_HAL_SYS__FDMASK(_fd_); \
+ CYG_MACRO_END
+
+#define CYG_HAL_SYS_FD_ISSET(_fd_, _fdsp_) \
+ (0 != ((_fdsp_)->hal_fds_bits[CYG_HAL_SYS__FDELT(_fd_)] & CYG_HAL_SYS__FDMASK(_fd_)))
+
+// Interval timer support, needed for the clock.
+#define CYG_HAL_SYS_ITIMER_REAL 0
+#define CYG_HAL_SYS_ITIMER_VIRTUAL 1
+#define CYG_HAL_SYS_ITIMER_PROF 2
+
+struct cyg_hal_sys_itimerval {
+ struct cyg_hal_sys_timeval hal_it_interval;
+ struct cyg_hal_sys_timeval hal_it_value;
+};
+
+// System calls and related constants, or rather the subset that is
+// needed internally.
+#define CYG_HAL_SYS_R_OK 0x04
+#define CYG_HAL_SYS_W_OK 0x02
+#define CYG_HAL_SYS_X_OK 0x01
+#define CYG_HAL_SYS_F_OK 0x00
+
+/* lseek whence flags */
+#define CYG_HAL_SYS_SEEK_SET 0 /* Seek from beginning of file. */
+#define CYG_HAL_SYS_SEEK_CUR 1 /* Seek from current position. */
+#define CYG_HAL_SYS_SEEK_END 2 /* Seek from end of file. */
+
+/* open/fcntl flags */
+
+#define CYG_HAL_SYS_O_RDONLY 0
+#define CYG_HAL_SYS_O_WRONLY 01
+#define CYG_HAL_SYS_O_RDWR 02
+#define CYG_HAL_SYS_O_CREAT 0100
+#define CYG_HAL_SYS_O_EXCL 0200
+#define CYG_HAL_SYS_O_NOCTTY 0400
+#define CYG_HAL_SYS_O_TRUNC 01000
+#define CYG_HAL_SYS_O_APPEND 02000
+#define CYG_HAL_SYS_O_NONBLOCK 04000
+#define CYG_HAL_SYS_O_NDELAY CYG_HAL_SYS_O_NONBLOCK
+#define CYG_HAL_SYS_O_SYNC 010000
+#define CYG_HAL_SYS_O_FSYNC CYG_HAL_SYS_O_SYNC
+#define CYG_HAL_SYS_O_ASYNC 020000
+
+/* open mode flags */
+#define CYG_HAL_SYS_S_IRUSR 0400
+#define CYG_HAL_SYS_S_IREAD CYG_HAL_SYS_S_IRUSR
+#define CYG_HAL_SYS_S_IWUSR 0200
+#define CYG_HAL_SYS_S_IWRITE CYG_HAL_SYS_S_IWUSR
+#define CYG_HAL_SYS_S_IXUSR 0100
+#define CYG_HAL_SYS_S_IEXEC CYG_HAL_SYS_S_IXUSR
+#define CYG_HAL_SYS_S_IRWXU \
+ (CYG_HAL_SYS_S_IREAD|CYG_HAL_SYS_S_IWRITE|CYG_HAL_SYS_S_IEXEC)
+#define CYG_HAL_SYS_S_IRWXG (CYG_HAL_SYS_S_IRWXU>>3)
+#define CYG_HAL_SYS_S_IRGRP (CYG_HAL_SYS_S_IRUSR>>3)
+#define CYG_HAL_SYS_S_IWGRP (CYG_HAL_SYS_S_IWUSR>>3)
+#define CYG_HAL_SYS_S_IXGRP (CYG_HAL_SYS_S_IXUSR>>3)
+#define CYG_HAL_SYS_S_IRWXO (CYG_HAL_SYS_S_IRWXG>>3)
+#define CYG_HAL_SYS_S_IROTH (CYG_HAL_SYS_S_IRGRP>>3)
+#define CYG_HAL_SYS_S_IWOTH (CYG_HAL_SYS_S_IWGRP>>3)
+#define CYG_HAL_SYS_S_IXOTH (CYG_HAL_SYS_S_IXGRP>>3)
+
+/* stat flags */
+#define CYG_HAL_SYS_S_IFMT 0170000 /*bitmask for the file type bitfields*/
+#define CYG_HAL_SYS_S_IFSOCK 0140000 /*socket*/
+#define CYG_HAL_SYS_S_IFLNK 0120000 /*symbolic link*/
+#define CYG_HAL_SYS_S_IFREG 0100000 /*regular file*/
+#define CYG_HAL_SYS_S_IFBLK 0060000 /*block device*/
+#define CYG_HAL_SYS_S_IFDIR 0040000 /*directory*/
+#define CYG_HAL_SYS_S_IFCHR 0020000 /*character device*/
+#define CYG_HAL_SYS_S_IFIFO 0010000 /*fifo*/
+#define CYG_HAL_SYS_S_ISUID 0004000 /*set UID bit*/
+#define CYG_HAL_SYS_S_ISGID 0002000 /*set GID bit (see below)*/
+#define CYG_HAL_SYS_S_ISVTX 0001000 /*sticky bit (see below)*/
+
+struct cyg_hal_sys_mmap_args {
+ unsigned long addr;
+ unsigned long len;
+ unsigned long prot;
+ unsigned long flags;
+ unsigned long fd;
+ unsigned long offset;
+};
+
+/* Protection flags for mmap */
+#define CYG_HAL_SYS_PROT_READ 0x1 /* page can be read */
+#define CYG_HAL_SYS_PROT_WRITE 0x2 /* page can be written */
+#define CYG_HAL_SYS_PROT_EXEC 0x4 /* page can be executed */
+#define CYG_HAL_SYS_PROT_NONE 0x0 /* page can not be accessed */
+
+/* Sharing types and other flags */
+#define CYG_HAL_SYS_MAP_SHARED 0x01 /* Share changes. */
+#define CYG_HAL_SYS_MAP_PRIVATE 0x02 /* Changes are private. */
+#define CYG_HAL_SYS_MAP_FIXED 0x10 /* Interpret addr exactly. */
+
+struct cyg_hal_sys_dirent
+{
+ unsigned long d_ino;
+ unsigned long d_off;
+ unsigned short int d_reclen;
+ char d_name[256];
+};
+
+struct cyg_hal_sys_timespec
+{
+ unsigned int tv_sec;
+ unsigned int tv_nsec;
+};
+
+struct cyg_hal_sys_stat
+{
+ unsigned int dev; /* inode */
+ unsigned long ino; /* device */
+ unsigned short mode; /* protection */
+ unsigned short nlink; /* number of hard links */
+ unsigned short uid; /* user ID of owner */
+ unsigned short gid; /* group ID of owner */
+ unsigned long rdev; /* device type (if inode device) */
+ unsigned long size; /* total size, in bytes */
+ unsigned int blksize; /* blocksize for filesystem I/O */
+ unsigned int blocks; /* number of blocks allocated */
+ struct cyg_hal_sys_timespec atime; /* time of last access */
+ struct cyg_hal_sys_timespec mtime; /* time of last modification */
+ struct cyg_hal_sys_timespec ctime; /* time of last change */
+};
+
+// System calls, or rather the subset that is needed internally or by
+// applications which want to access the host OS.
+
+externC unsigned long cyg_hal_sys_write(int, const void*, long);
+externC unsigned long cyg_hal_sys_read(int, void*, long);
+externC int cyg_hal_sys_lseek(int, int, int);
+externC int cyg_hal_sys_open(const char *,int,int);
+externC int cyg_hal_sys_fdatasync(int);
+externC int cyg_hal_sys_sigaction(int,
+ const struct cyg_hal_sys_sigaction*,
+ struct cyg_hal_sys_sigaction*);
+externC int cyg_hal_sys_sigprocmask(int,
+ const cyg_hal_sys_sigset_t*,
+ cyg_hal_sys_sigset_t*);
+externC int cyg_hal_sys__newselect(int,
+ struct cyg_hal_sys_fd_set*,
+ struct cyg_hal_sys_fd_set*,
+ struct cyg_hal_sys_fd_set*,
+ struct cyg_hal_sys_timeval*);
+externC int cyg_hal_sys_setitimer(int,
+ const struct cyg_hal_sys_itimerval*,
+ struct cyg_hal_sys_itimerval*);
+externC int cyg_hal_sys_gettimeofday(struct cyg_hal_sys_timeval*,
+ struct cyg_hal_sys_timezone*);
+
+externC int cyg_hal_sys_access(const char*, int);
+externC int cyg_hal_sys_fork(void);
+externC int cyg_hal_sys_execve(const char*, const char* [], const char* []);
+externC int cyg_hal_sys_pipe(int []);
+externC int cyg_hal_sys_close(int);
+externC int cyg_hal_sys_dup2(int, int);
+externC int cyg_hal_sys_kill(int, int);
+externC int cyg_hal_sys_getpid(void);
+
+#define CYG_HAL_SYS_IPCOP_semop 1
+#define CYG_HAL_SYS_IPCOP_semget 2
+#define CYG_HAL_SYS_IPCOP_semctl 3
+#define CYG_HAL_SYS_IPCOP_msgsnd 11
+#define CYG_HAL_SYS_IPCOP_msgrcv 12
+#define CYG_HAL_SYS_IPCOP_msgget 13
+#define CYG_HAL_SYS_IPCOP_msgctl 14
+#define CYG_HAL_SYS_IPCOP_shmat 21
+#define CYG_HAL_SYS_IPCOP_shmdt 22
+#define CYG_HAL_SYS_IPCOP_shmget 23
+#define CYG_HAL_SYS_IPCOP_shmctl 24
+
+/*The ipc system call, which is used by the following shmem
+ functions. These may be unportable*/
+
+// Generic system call. Depending on the value of call, it will
+// perform the following functions.
+externC int cyg_hal_sys_ipc(int call, int first, int second,
+ int third, void* ptr);
+//get an identifier for a shared memory segment
+externC int cyg_hal_sys_shmget (int key, int size, int shmflg);
+//attach to an shared memory segment
+externC void * cyg_hal_sys_shmat (int shmid, const void* shmaddr,
+ int shmflg);
+//detach from it again
+externC int cyg_hal_sys_shmdt (const void* shmaddr);
+
+// The actual implementation appears to return the new brk() value.
+externC void* cyg_hal_sys_brk(void*);
+
+// Returns the number of characters placed in the buffer or <0 for error,
+// not a char*.
+externC int cyg_hal_sys_getcwd(char*, int);
+
+// mmap on the "host" system - this may be unportable. This is the
+// really system call into the kernel which passes one structure
+// containing all the arguments.
+externC int cyg_hal_sys_mmapx(struct cyg_hal_sys_mmap_args *);
+
+// This is the mmap call that users are used to.
+externC int cyg_hal_sys_mmap(void *addr,
+ unsigned long length,
+ unsigned long prot,
+ unsigned long flags,
+ unsigned long fd,
+ unsigned long off);
+
+externC int cyg_hal_sys_readdir(unsigned int fd,
+ struct cyg_hal_sys_dirent *dp,
+ unsigned int count);
+externC int cyg_hal_sys_lstat(const char* name, struct cyg_hal_sys_stat *buf);
+externC int cyg_hal_sys_fstat(int fd, struct cyg_hal_sys_stat *buf);
+externC int cyg_hal_sys_mkdir(const char* path, int mode);
+
+externC int cyg_hal_sys_atexit_handler(void (*fct_atexit)(void));
+
+// Access to environmental data
+extern int cyg_hal_sys_argc;
+extern const char** cyg_hal_sys_argv;
+extern const char** cyg_hal_sys_environ;
+
+// ----------------------------------------------------------------------------
+// Interaction between the application and the auxiliary.
+
+// Is the auxiliary actually in use/available? This flag should be tested by
+// device drivers prior to attempting any communication with the auxiliary.
+extern cyg_bool synth_auxiliary_running;
+
+// The fundamental I/O operation: sending a request to the auxiliary and
+// optionally getting back a reply. A null pointer for the response field
+// indicates that no reply is expected.
+externC void synth_auxiliary_xchgmsg(int /* devid */, int /* request */,
+ int /* arg1 */, int /* arg2 */,
+ const unsigned char* /* txdata */, int /* txlen */,
+ int* /* response */,
+ unsigned char* /* rxdata */, int* /* actual_rxlen */,
+ int /* rxlen */);
+
+// Request that the auxiliary instantiates a given device, loading appropriate
+// support code as required. This function takes the following arguments:
+// 1) the location of the package that should provide this device, e.g.
+// devs/eth/synth
+// 2) the version of that package currently being used, e.g. "current"
+// 3) the name of the device, e.g. "ethernet". This identifies the
+// Tcl script that should be loaded to handle requests for this device.
+// 4) the name of the device instance, e.g. "eth0".
+// 5) device-specific initialization data.
+externC int synth_auxiliary_instantiate(const char*, const char*, const char*, const char*, const char*);
+
+// Support for generating strings
+#define SYNTH_MAKESTRING1(a) #a
+#define SYNTH_MAKESTRING(a) SYNTH_MAKESTRING1(a)
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_HAL_HAL_IO_H
+// End of hal_io.h
diff --git a/cesar/ecos/packages/hal/synth/arch/current/src/synth.ld b/cesar/ecos/packages/hal/synth/arch/current/src/synth.ld
new file mode 100644
index 0000000000..62c8f7a434
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/src/synth.ld
@@ -0,0 +1,219 @@
+//==========================================================================
+//
+// synth.ld
+//
+// Linker script for the synthetic target
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors:jskov, bartv
+// Date: 1999-01-18
+// Purpose: synthetic target linker script
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+STARTUP(vectors.o)
+ENTRY(_start)
+#ifdef EXTRAS
+INPUT(extras.o)
+#endif
+#if (__GNUC__ >= 3)
+GROUP(libtarget.a libgcc.a libsupc++.a libgcc_eh.a)
+#else
+GROUP(libtarget.a libgcc.a)
+#endif
+
+#define ALIGN_LMA 8
+#define FOLLOWING(_section_) AT ((LOADADDR (_section_) + SIZEOF (_section_) + ALIGN_LMA - 1) & ~ (ALIGN_LMA - 1))
+#define LMA_EQ_VMA
+#define FORCE_OUTPUT . = .
+
+
+#define SECTIONS_BEGIN
+
+#define SECTION_vectors(_region_, _vma_, _lma_) \
+ .vectors _vma_ : _lma_ \
+ { FORCE_OUTPUT; KEEP(*(.vectors)) } \
+ > _region_
+
+#define SECTION_text(_region_, _vma_, _lma_) \
+ .text _vma_ : _lma_ \
+ { _stext = .; \
+ *(.text*) *(.gnu.warning) *(.gnu.linkonce.t.*) *(.init) } \
+ > _region_ \
+ _etext = .; PROVIDE (etext = .);
+
+#define SECTION_fini(_region_, _vma_, _lma_) \
+ .fini _vma_ : _lma_ \
+ { FORCE_OUTPUT; *(.fini) } \
+ > _region_
+
+#define SECTION_rodata1(_region_, _vma_, _lma_) \
+ .rodata1 _vma_ : _lma_ \
+ { FORCE_OUTPUT; *(.rodata1) } \
+ > _region_
+
+#define SECTION_rodata(_region_, _vma_, _lma_) \
+ .rodata _vma_ : _lma_ \
+ { FORCE_OUTPUT; *(.rodata*) *(.gnu.linkonce.r.*) } \
+ > _region_
+
+#define SECTION_fixup(_region_, _vma_, _lma_) \
+ .fixup _vma_ : _lma_ \
+ { _FIXUP_START_ = ABSOLUTE(.); *(.fixup) _FIXUP_END_ = ABSOLUTE(.);} \
+ > _region_
+
+#define SECTION_gcc_except_table(_region_, _vma_, _lma_) \
+ .gcc_except_table _vma_ : _lma_ \
+ { _EXCEPT_START_ = ABSOLUTE(.); *(.gcc_except_table) \
+ _EXCEPT_END_ = ABSOLUTE(.);} \
+ > _region_
+
+#define SECTION_eh_frame(_region_, _vma_, _lma_) \
+ .eh_frame_hdr : { *(.eh_frame_hdr) } > _region_ \
+ .eh_frame _vma_ : _lma_ \
+ { \
+ FORCE_OUTPUT; __EH_FRAME_BEGIN__ = .; \
+ KEEP(*(.eh_frame)) \
+ __FRAME_END__ = .; \
+ . = . + 8; \
+ } > _region_ = 0
+
+#define SECTION_RELOCS(_region_, _vma_, _lma_) \
+ .rel.text : \
+ { \
+ *(.rel.text) \
+ *(.rel.text.*) \
+ *(.rel.gnu.linkonce.t*) \
+ } > _region_ \
+ .rela.text : \
+ { \
+ *(.rela.text) \
+ *(.rela.text.*) \
+ *(.rela.gnu.linkonce.t*) \
+ } > _region_ \
+ .rel.data : \
+ { \
+ *(.rel.data) \
+ *(.rel.data.*) \
+ *(.rel.gnu.linkonce.d*) \
+ } > _region_ \
+ .rela.data : \
+ { \
+ *(.rela.data) \
+ *(.rela.data.*) \
+ *(.rela.gnu.linkonce.d*) \
+ } > _region_ \
+ .rel.rodata : \
+ { \
+ *(.rel.rodata) \
+ *(.rel.rodata.*) \
+ *(.rel.gnu.linkonce.r*) \
+ } > _region_ \
+ .rela.rodata : \
+ { \
+ *(.rela.rodata) \
+ *(.rela.rodata.*) \
+ *(.rela.gnu.linkonce.r*) \
+ } > _region_ \
+ .rel.got : { *(.rel.got) } > _region_ \
+ .rela.got : { *(.rela.got) } > _region_ \
+ .rel.ctors : { *(.rel.ctors) } > _region_ \
+ .rela.ctors : { *(.rela.ctors) } > _region_ \
+ .rel.dtors : { *(.rel.dtors) } > _region_ \
+ .rela.dtors : { *(.rela.dtors) } > _region_ \
+ .rel.init : { *(.rel.init) } > _region_ \
+ .rela.init : { *(.rela.init) } > _region_ \
+ .rel.fini : { *(.rel.fini) } > _region_ \
+ .rela.fini : { *(.rela.fini) } > _region_ \
+ .rel.bss : { *(.rel.bss) } > _region_ \
+ .rela.bss : { *(.rela.bss) } > _region_ \
+ .rel.plt : { *(.rel.plt) } > _region_ \
+ .rela.plt : { *(.rela.plt) } > _region_ \
+ .rel.dyn : { *(.rel.dyn) } > _region_
+
+// Note: The __ in the name is an encoding of the .
+#define SECTION_rel__got(_region_, _vma_, _lma_) \
+ .rel.got _vma_ : _lma_ \
+ { *(.rel.got) } \
+ > _region_
+
+#define SECTION_data(_region_, _vma_, _lma_) \
+ .data _vma_ : _lma_ \
+ { __ram_data_start = ABSOLUTE(.); *(.data*) *(.gnu.linkonce.d.*) \
+ _GOT1_START_ = ABSOLUTE(.); *(.got1) _GOT1_END_ = ABSOLUTE(.); \
+ /* Put .ctors and .dtors next to the .got2 section, so that */ \
+ /* the pointers get relocated with -mrelocatable. */ \
+ . = ALIGN(8); __CTOR_LIST__ = ABSOLUTE(.); \
+ KEEP(*(SORT(.ctors*))) __CTOR_END__ = ABSOLUTE(.); \
+ __DTOR_LIST__ = ABSOLUTE(.); \
+ KEEP(*(SORT(.dtors*))) __DTOR_END__ = ABSOLUTE(.); \
+ . = ALIGN(32); \
+ KEEP(*( SORT (.ecos.table.*))); \
+ _GOT2_START_ = ABSOLUTE(.); *(.got2) _GOT2_END_ = ABSOLUTE(.); \
+ _GOT_START_ = ABSOLUTE(.); _GLOBAL_OFFSET_TABLE_ = ABSOLUTE(. + 32768); \
+ _SDA_BASE_ = ABSOLUTE(.); *(.got.plt) *(.got) \
+ _GOT_END_ = ABSOLUTE(.); *(.dynamic) \
+ /* We want the small data sections together, so single-instruction */ \
+ /* offsets can access them all, and initialized data all before */ \
+ /* uninitialized, so we can shorten the on-disk segment size. */ \
+ _SDATA_START_ = ABSOLUTE(.); *(.sdata*) *(.gnu.linkonce.s.*) } \
+ > _region_ \
+ __rom_data_start = LOADADDR(.data); \
+ __ram_data_end = .; PROVIDE(__ram_data_end = .); \
+ _edata = .; PROVIDE (edata = .);
+
+#define SECTION_sbss(_region_, _vma_, _lma_) \
+ .sbss _vma_ : _lma_ \
+ { __bss_start = ABSOLUTE (.); \
+ _SBSS_START_ = ABSOLUTE(.); *(.sbss*) *(.gnu.linkonce.sb.*) \
+ _SBSS_END_ = ABSOLUTE(.); \
+ *(.scommon*) } \
+ > _region_
+
+#define SECTION_bss(_region_, _vma_, _lma_) \
+ .bss _vma_ : _lma_ \
+ { FORCE_OUTPUT; *(.dynbss*) *(.bss*) *(COMMON) *(.gnu.linkonce.b.*) } \
+ > _region_ \
+ __bss_end = .;
+
+#define SECTIONS_END . = ALIGN(4); _end = .; PROVIDE (end = .);
+
+#include <pkgconf/system.h>
+#include CYGHWR_MEMORY_LAYOUT_LDI
diff --git a/cesar/ecos/packages/hal/synth/arch/current/src/synth_diag.c b/cesar/ecos/packages/hal/synth/arch/current/src/synth_diag.c
new file mode 100644
index 0000000000..faae4b53b1
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/src/synth_diag.c
@@ -0,0 +1,155 @@
+//=============================================================================
+//
+// synth_diag.c
+//
+// Synthetic target diagnostic output code
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2002 Bart Veer
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): proven
+// Contributors:proven, bartv
+// Date: 1998-10-05
+// Purpose: HAL diagnostic output
+// Description: Implementations of HAL diagnostic output support.
+//
+// There are two possible ways of performing I/O. The first
+// involves simply writing to stdout. This is robust, but
+// has some disadvantages such as the output getting mixed up
+// with gdb output. The second involves sending the data on
+// to the auxiliary, less robust but much more flexible.
+//
+// Similarly, input can be handled by reading from stdin or
+// by a suitable device in the auxiliary.
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_diag.h>
+#include <cyg/hal/hal_io.h>
+#include <cyg/infra/cyg_ass.h>
+
+//-----------------------------------------------------------------------------
+// If the auxiliary exists, hal_diag_init() will try to contact it and
+// instantiate a console device. Subsequent console writes will be
+// redirected to that device, as long as the auxiliary is up and running.
+// If the auxiliary is not being used or has exited, console writes
+// will instead go to stdout.
+//
+// This code also contains an implementation of hal_diag_read_char()
+// which is probably not very useful. Currently it works by reading
+// from stdin, but no attempt is made to set the tty into raw mode
+// or anything like that.
+
+static int auxiliary_console_id = -1;
+
+void hal_diag_init( void )
+{
+ if (synth_auxiliary_running) {
+ auxiliary_console_id = synth_auxiliary_instantiate("hal/synth/arch", SYNTH_MAKESTRING(CYGPKG_HAL_SYNTH), "console",
+ (const char*) 0, (const char*) 0);
+ }
+}
+
+// Output a single character.
+//
+// The calling code will output one character at a time. Output
+// involves at least one system call, and this is expensive for
+// a single character (especially when used in conjunction with
+// I/O intensive facilities like unbuffered tracing). Therefore
+// this code will buffer lines up to 128 characters before
+// doing the I/O.
+//
+// NOTE: one problem is that there is no support for flushing buffers
+// at this level. Therefore if say C library stdio ends up mapped to
+// HAL diagnostics I/O then functions like fflush() and setvbuf() will
+// not behave the way they should. There is no simple workaround at
+// this level, the required information is not available.
+
+void hal_diag_write_char(char c)
+{
+ static int diag_index = 0;
+ static unsigned char diag_buffer[128];
+
+ CYG_ASSERT(diag_index < 128, "Diagnostic buffer overflow");
+
+ diag_buffer[diag_index++] = (unsigned char) c;
+ if (('\n' == c) || (128 == diag_index)) {
+ if ((-1 != auxiliary_console_id) && synth_auxiliary_running) {
+ synth_auxiliary_xchgmsg(auxiliary_console_id, 0, 0, 0, diag_buffer, diag_index, (int *) 0, (unsigned char*) 0, (int *)0, 0);
+ diag_index = 0;
+ } else {
+ int written;
+ unsigned char* next = diag_buffer;
+
+ while (diag_index > 0) {
+ written = cyg_hal_sys_write(1, next, diag_index);
+ if (written > 0) {
+ diag_index -= written;
+ next += written;
+ } else if ((-CYG_HAL_SYS_EINTR != written) && (-CYG_HAL_SYS_EAGAIN != written)) {
+ CYG_FAIL("Unexpected error writing to stdout.");
+ diag_index = 0;
+ break;
+ }
+ }
+ CYG_ASSERT(0 == diag_index, "All data should have been written out");
+ diag_index = 0;
+ cyg_hal_sys_fdatasync(1);
+ }
+ }
+}
+
+// Diagnostic input. It is not clear that this is actually useful,
+// input would normally go to gdb rather than to the application. If
+// keyboard input really is required then that should be handled via a
+// suitable device driver interacting with the auxiliary, not at the
+// HAL level. The read syscall will get woken up by the itimer alarm,
+// but we don't want to stop reading if that's the case
+
+void hal_diag_read_char(char *c)
+{
+ int rc;
+ do {
+ rc = cyg_hal_sys_read(0, c, 1);
+ } while ((-CYG_HAL_SYS_EINTR == rc) || (-CYG_HAL_SYS_EAGAIN == rc));
+}
+
+//-----------------------------------------------------------------------------
+// End of hal_diag.c
diff --git a/cesar/ecos/packages/hal/synth/arch/current/src/synth_entry.c b/cesar/ecos/packages/hal/synth/arch/current/src/synth_entry.c
new file mode 100644
index 0000000000..4121413603
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/src/synth_entry.c
@@ -0,0 +1,235 @@
+//==========================================================================
+//
+// synth_entry.c
+//
+// Entry code for Linux synthetic target.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2002 Bart Veer
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): proven
+// Contributors:proven, jskov, bartv
+// Date: 1999-01-06
+// Purpose: Entry point for Linux synthetic target.
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_io.h>
+#include CYGHWR_MEMORY_LAYOUT_H
+
+/*------------------------------------------------------------------------*/
+/* C++ support - run initial constructors */
+
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+cyg_bool cyg_hal_stop_constructors;
+#endif
+
+typedef void (*pfunc) (void);
+extern pfunc __CTOR_LIST__[];
+extern pfunc __CTOR_END__[];
+
+void
+cyg_hal_invoke_constructors (void)
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ static pfunc *p = &__CTOR_END__[-1];
+
+ cyg_hal_stop_constructors = 0;
+ for (; p >= __CTOR_LIST__; p--) {
+ (*p) ();
+ if (cyg_hal_stop_constructors) {
+ p--;
+ break;
+ }
+ }
+#else
+ pfunc *p;
+
+ for (p = &__CTOR_END__[-1]; p >= __CTOR_LIST__; p--)
+ (*p) ();
+#endif
+}
+
+// ----------------------------------------------------------------------------
+// The low-level entry point is platform-specific, typically in the
+// assember file vectors.S. However that entry point simply jumps
+// directly here, with no further processing or stack manipulation.
+// The HAL specification defines clearly what should happen during
+// startup.
+
+externC void cyg_start( void );
+externC void synth_hardware_init(void);
+externC void synth_hardware_init2(void);
+
+void _linux_entry( void )
+{
+ void* new_top = (void*) 0;
+
+ // "Initialize various cpu status registers, including disabling interrupts."
+ // That is a no-op for the synthetic target, in particular interrupts are
+ // already disabled.
+
+ // "Set up any CPU memory controller to access ROM, RAM, and I/O devices
+ // correctly".
+ //
+ // This involves using the brk() system call to allocate the RAM used
+ // for the heaps. There are no variables mapped there so the system
+ // will not have done this for us. Note that the implementation of
+ // brk() (mm/mmap.c) differs from the documentation - the return
+ // value is the new brk value, not an error code.
+ new_top = (void*) (CYGMEM_REGION_ram + CYGMEM_REGION_ram_SIZE);
+ if (new_top != cyg_hal_sys_brk(new_top)) {
+ CYG_FAIL("Failed to initialize memory");
+ HAL_PLATFORM_EXIT(1);
+ }
+
+ // Again a no-op for the synthetic target. All memory is readily
+ // accessible. Arguably the auxiliary should be started up here, but
+ // instead that is left to platform initialization.
+
+ // "Enable the cache". Effectively the synthetic target has no cache,
+ // anything provided by the hardware is not readily accessible.
+
+ // "Set up the stack pointer". The system starts up a program with a
+ // suitable stack.
+
+ // "Initialize any global pointer register". There is no such register.
+
+ // Perform platform-specific initialization. Actually, all Linux
+ // platforms can share this. It involves setting up signal handlers,
+ // starting the I/O auxiliary, and so on.
+ synth_hardware_init();
+
+ // This is not a ROM startup, so no need to worry about copying the
+ // .data section.
+
+ // "Zero the .bss section". Linux will have done this for us.
+
+ // "Create a suitable C stack frame". Already done.
+
+ // Invoke the C++ constructors.
+ cyg_hal_invoke_constructors();
+
+ // Once the C++ constructors have been invoked, a second stage
+ // of hardware initialization is desirable. At this point all
+ // eCos device drivers should have been initialized so the
+ // I/O auxiliary will have loaded the appropriate support
+ // scripts, and the auxiliary can now map the window(s) on to
+ // the display and generally operate normally.
+ synth_hardware_init2();
+
+ // "Call cyg_start()". OK.
+ cyg_start();
+
+ // "Drop into an infinite loop". Not a good idea for the synthetic
+ // target. Instead, exit.
+ HAL_PLATFORM_EXIT(0);
+}
+
+// ----------------------------------------------------------------------------
+// Stub functions needed for linking with various versions of gcc
+// configured for Linux rather than i386-elf.
+
+#if (__GNUC__ < 3)
+// 2.95.x libgcc.a __pure_virtual() calls __write().
+int __write(void)
+{
+ return -1;
+}
+#endif
+
+#if (__GNUC__ >= 3)
+// Versions of gcc/g++ after 3.0 (approx.), when configured for Linux
+// native development (specifically, --with-__cxa_enable), have
+// additional dependencies related to the destructors for static
+// objects. When compiling C++ code with static objects the compiler
+// inserts a call to __cxa_atexit() with __dso_handle as one of the
+// arguments. __cxa_atexit() would normally be provided by glibc, and
+// __dso_handle is part of crtstuff.c. Synthetic target applications
+// are linked rather differently, so either a differently-configured
+// compiler is needed or dummy versions of these symbols should be
+// provided. If these symbols are not actually used then providing
+// them is still harmless, linker garbage collection will remove them.
+
+void
+__cxa_atexit(void (*arg1)(void*), void* arg2, void* arg3)
+{
+}
+void* __dso_handle = (void*) &__dso_handle;
+
+// gcc 3.2.2 (approx). The libsupc++ version of the new operator pulls
+// in exception handling code, even when using the nothrow version and
+// building with -fno-exceptions. libgcc_eh.a provides the necessary
+// functions, but requires a dl_iterate_phdr() function. That is related
+// to handling dynamically loaded code so is not applicable to eCos.
+int
+dl_iterate_phdr(void* arg1, void* arg2)
+{
+ return -1;
+}
+#endif
+
+#if (__GNUC__ >= 4)
+// First noticed with gcc 4.1.1. There is now code to detect stack
+// smashing.
+void __attribute__ ((noreturn))
+__stack_chk_fail(void)
+{
+ CYG_FAIL("Stack smashing detected, aborting");
+ diag_printf("Application error: stack smashing detected.\n");
+ HAL_PLATFORM_EXIT(1);
+ for (;;);
+}
+
+void __attribute__ ((noreturn))
+__stack_chk_fail_local(void)
+{
+ __stack_chk_fail();
+}
+#endif
+
+//-----------------------------------------------------------------------------
+// End of entry.c
diff --git a/cesar/ecos/packages/hal/synth/arch/current/src/synth_intr.c b/cesar/ecos/packages/hal/synth/arch/current/src/synth_intr.c
new file mode 100644
index 0000000000..5e65f45bb9
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/src/synth_intr.c
@@ -0,0 +1,1403 @@
+//=============================================================================
+//
+// synth_intr.c
+//
+// Interrupt and clock code for the Linux synthetic target.
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2005 eCosCentric Ltd
+// Copyright (C) 2002 Bart Veer
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv, asl
+// Date: 2001-03-30
+// Purpose: Implement the interrupt subsystem for the synthetic target
+//####DESCRIPTIONEND####
+//=============================================================================
+
+// sigprocmask handling.
+//
+// In the synthetic target interrupts and exceptions are based around
+// POSIX sighandlers. When the clock ticks a SIGALRM signal is raised.
+// When the I/O auxiliary wants to raise some other interrupt, it
+// sends a SIGIO signal. When an exception occurs this results in
+// signals like SIGILL and SIGSEGV. This implies an implementation
+// where the VSR is the signal handler. Disabling interrupts would
+// then mean using sigprocmask() to block certain signals, and
+// enabling interrupts means unblocking those signals.
+//
+// However there are a few problems. One of these is performance: some
+// bits of the system such as buffered tracing make very extensive use
+// of enabling and disabling interrupts, so making a sigprocmask
+// system call each time adds a lot of overhead. More seriously, there
+// is a subtle discrepancy between POSIX signal handling and hardware
+// interrupts. Signal handlers are expected to return, and then the
+// system automatically passes control back to the foreground thread.
+// In the process, the sigprocmask is manipulated before invoking the
+// signal handler and restored afterwards. Interrupt handlers are
+// different: it is quite likely that an interrupt results in another
+// eCos thread being activated, so the signal handler does not
+// actually return until the interrupted thread gets another chance to
+// run.
+//
+// The second problem can be addressed by making the sigprocmask part
+// of the thread state, saving and restoring it as part of a context
+// switch (c.f. siglongjmp()). This matches quite nicely onto typical
+// real hardware, where there might be a flag inside some control
+// register that controls whether or not interrupts are enabled.
+// However this adds more system calls to context switch overhead.
+//
+// The alternative approach is to implement interrupt enabling and
+// disabling in software. The sigprocmask is manipulated only once,
+// during initialization, such that certain signals are allowed
+// through and others are blocked. When a signal is raised the signal
+// handler will always be invoked, but it will decide in software
+// whether or not the signal should be processed immediately. This
+// alternative approach does not correspond particularly well with
+// real hardware: effectively the VSR is always allowed to run.
+// However for typical applications this will not really matter, and
+// the performance gains outweigh the discrepancy.
+//
+// Nested interrupts and interrupt priorities can be implemented in
+// software, specifically by manipulating the current mask of blocked
+// interrupts. This is not currently implemented.
+//
+// At first glance it might seem that an interrupt stack could be
+// implemented trivially using sigaltstack. This does not quite work:
+// signal handlers do not always return immediately, so the system
+// does not get a chance to clean up the signal handling stack. A
+// separate interrupt stack is possible but would have to be
+// implemented here, in software, e.g. by having the signal handler
+// invoke the VSR on that stack. Unfortunately the system may have
+// pushed quite a lot of state on to the current stack already when
+// raising the signal, so things could get messy.
+
+// ----------------------------------------------------------------------------
+#include <pkgconf/hal.h>
+#include <pkgconf/hal_synth.h>
+
+// There are various dependencies on the kernel, e.g. how exceptions
+// should be handled.
+#include <pkgconf/system.h>
+#ifdef CYGPKG_KERNEL
+# include <pkgconf/kernel.h>
+#endif
+
+#include <cyg/infra/cyg_type.h> // base types
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_io.h>
+#include <cyg/infra/cyg_ass.h> // Assertions are safe in the synthetic target
+
+#include "synth_protocol.h"
+
+// ----------------------------------------------------------------------------
+// Statics.
+
+// The bogomips rating, used by HAL_DELAY_US()
+int hal_bogomips;
+
+// Are interrupts currently enabled?
+volatile cyg_bool_t hal_interrupts_enabled = false;
+
+// These flags are updated by the signal handler when a signal comes in
+// and interrupts are disabled.
+static volatile cyg_bool_t synth_sigio_pending = false;
+static volatile cyg_bool_t synth_sigalrm_pending = false;
+
+// The current VSR, to be invoked by the signal handler. This allows
+// application code to install an alternative VSR, without that VSR
+// having to check for interrupts being disabled and updating the
+// pending flags. Effectively, the VSR is only invoked when interrupts
+// are enabled.
+static void (*synth_VSR)(void) = (void (*)(void)) 0;
+
+// The current ISR status and mask registers, or rather software
+// emulations thereof. These are not static since application-specific
+// VSRs may want to examine/manipulate these. They are also not
+// exported in any header file, forcing people writing such VSRs to
+// know what they are doing.
+volatile cyg_uint32 synth_pending_isrs = 0;
+volatile cyg_uint32 synth_masked_isrs = 0xFFFFFFFF;
+
+// The vector of interrupt handlers.
+typedef struct synth_isr_handler {
+ cyg_ISR_t* isr;
+ CYG_ADDRWORD data;
+ CYG_ADDRESS obj;
+ cyg_priority_t pri;
+} synth_isr_handler;
+static synth_isr_handler synth_isr_handlers[CYGNUM_HAL_ISR_COUNT];
+
+static void synth_alrm_sighandler(int);
+static void synth_io_sighandler(int);
+
+// ----------------------------------------------------------------------------
+// Basic ISR and VSR handling.
+
+// The default ISR handler. The system should never receive an interrupt it
+// does not know how to handle.
+static cyg_uint32
+synth_default_isr(cyg_vector_t vector, cyg_addrword_t data)
+{
+ CYG_UNUSED_PARAM(cyg_vector_t, vector);
+ CYG_UNUSED_PARAM(cyg_addrword_t, data);
+ CYG_FAIL("Default isr handler should never get invoked");
+ return CYG_ISR_HANDLED;
+}
+
+// The VSR is invoked
+// 1) directly by a SIGALRM or SIGIO signal handler, if interrupts
+// were enabled.
+// 2) indirectly by hal_enable_interrupts(), if a signal happened
+// while interrupts were disabled. hal_enable_interrupts()
+// will have re-invoked the signal handler.
+//
+// On entry interrupts are disabled, and there should be one or more
+// pending ISRs which are not masked off.
+//
+// The implementation is as per the HAL specification, where
+// applicable.
+
+static void
+synth_default_vsr(void)
+{
+ int isr_vector;
+ cyg_uint32 isr_result;
+
+ CYG_ASSERT(!hal_interrupts_enabled, "VSRs should only be invoked when interrupts are disabled");
+ CYG_ASSERT(0 != (synth_pending_isrs & ~synth_masked_isrs), "VSRs should only be invoked when an interrupt is pending");
+
+ // No need to save the cpu state. Either we are in a signal
+ // handler and the system has done that for us, or we are called
+ // synchronously via enable_interrupts.
+
+ // Increment the kernel scheduler lock, if the kernel is present.
+ // This prevents context switching while interrupt handling is in
+ // progress.
+#ifdef CYGFUN_HAL_COMMON_KERNEL_SUPPORT
+ cyg_scheduler_lock();
+#endif
+
+ // Do not switch to an interrupt stack - functionality is not
+ // implemented
+
+ // Do not allow nested interrupts - functionality is not
+ // implemented.
+
+ // Decode the actual external interrupt being delivered. This is
+ // determined from the pending and masked variables. Only one isr
+ // source can be handled here, since interrupt_end must be invoked
+ // with details of that interrupt. Multiple pending interrupts
+ // will be handled by a recursive call
+ HAL_LSBIT_INDEX(isr_vector, (synth_pending_isrs & ~synth_masked_isrs));
+ CYG_ASSERT((CYGNUM_HAL_ISR_MIN <= isr_vector) && (isr_vector <= CYGNUM_HAL_ISR_MAX), "ISR vector must be valid");
+
+ isr_result = (*synth_isr_handlers[isr_vector].isr)(isr_vector, synth_isr_handlers[isr_vector].data);
+
+ // Do not switch back from the interrupt stack, there isn't one.
+
+ // Interrupts were not enabled before, so they must be enabled
+ // now. This may result in a recursive invocation if other IRQs
+ // are still pending. The ISR should have either acknowledged or
+ // masked the current interrupt source, to prevent a recursive
+ // call for the current interrupt.
+ hal_enable_interrupts();
+
+ // Now call interrupt_end() with the result of the isr and the
+ // ISR's object This may return straightaway, or it may result in
+ // a context switch to another thread. In the latter case, when
+ // the current thread is reactivated we end up back here. The
+ // third argument should be a pointer to the saved state, but that
+ // is only relevant for thread-aware debugging which is not yet
+ // supported by the synthetic target.
+ {
+ extern void interrupt_end(cyg_uint32, CYG_ADDRESS, HAL_SavedRegisters*);
+ interrupt_end(isr_result, synth_isr_handlers[isr_vector].obj, (HAL_SavedRegisters*) 0);
+ }
+
+ // Restore machine state and return to the interrupted thread.
+ // That requires no effort here.
+}
+
+// Enabling interrupts. If a SIGALRM or SIGIO arrived at an inconvenient
+// time, e.g. when already interacting with the auxiliary, then these
+// will have been left pending and must be serviced now. Next, enabling
+// interrupts means checking the interrupt pending and mask registers
+// and seeing if the VSR should be invoked.
+void
+hal_enable_interrupts(void)
+{
+ hal_interrupts_enabled = true;
+ if (synth_sigalrm_pending) {
+ synth_sigalrm_pending = false;
+ synth_alrm_sighandler(CYG_HAL_SYS_SIGALRM);
+ }
+ if (synth_sigio_pending) {
+ synth_sigio_pending = false;
+ synth_io_sighandler(CYG_HAL_SYS_SIGIO);
+ }
+
+ // The interrupt mask "register" may have been modified while
+ // interrupts were disabled. If there are pending interrupts,
+ // invoke the VSR. The VSR must be invoked with interrupts
+ // disabled, and will return with interrupts enabled.
+ // An alternative implementation that might be more accurate
+ // is to raise a signal, e.g. SIGUSR1. That way all interrupts
+ // come in via the system's signal handling mechanism, and
+ // it might be possible to do something useful with saved contexts
+ // etc., facilitating thread-aware debugging.
+ if (0 != (synth_pending_isrs & ~synth_masked_isrs)) {
+ hal_interrupts_enabled = false;
+ (*synth_VSR)();
+ CYG_ASSERT( hal_interrupts_enabled, "Interrupts should still be enabled on return from the VSR");
+ }
+}
+
+// ----------------------------------------------------------------------------
+// Other interrupt-related routines. Mostly these just involve
+// updating some of the statics, but they may be called while
+// interrupts are still enabled so care has to be taken.
+
+cyg_bool_t
+hal_interrupt_in_use(cyg_vector_t vec)
+{
+ CYG_ASSERT( (CYGNUM_HAL_ISR_MIN <= vec) && (vec <= CYGNUM_HAL_ISR_MAX), "Can only attach to valid ISR vectors");
+ return synth_default_isr != synth_isr_handlers[vec].isr;
+}
+
+void
+hal_interrupt_attach(cyg_vector_t vec, cyg_ISR_t* isr, CYG_ADDRWORD data, CYG_ADDRESS obj)
+{
+ CYG_ASSERT( (CYGNUM_HAL_ISR_MIN <= vec) && (vec <= CYGNUM_HAL_ISR_MAX), "Can only attach to valid ISR vectors");
+ CYG_CHECK_FUNC_PTR( isr, "A valid ISR must be supplied");
+ // The object cannot be validated, it may be NULL if chained
+ // interrupts are enabled.
+ CYG_ASSERT( synth_isr_handlers[vec].isr == &synth_default_isr, "Only one ISR can be attached to a vector at the HAL level");
+ CYG_ASSERT( (false == hal_interrupts_enabled) || (0 != (synth_masked_isrs & (0x01 << vec))), "ISRs should only be attached when it is safe");
+
+ // The priority will have been installed shortly before this call.
+ synth_isr_handlers[vec].isr = isr;
+ synth_isr_handlers[vec].data = data;
+ synth_isr_handlers[vec].obj = obj;
+}
+
+void
+hal_interrupt_detach(cyg_vector_t vec, cyg_ISR_t* isr)
+{
+ CYG_ASSERT( (CYGNUM_HAL_ISR_MIN <= vec) && (vec <= CYGNUM_HAL_ISR_MAX), "Can only detach from valid ISR vectors");
+ CYG_CHECK_FUNC_PTR( isr, "A valid ISR must be supplied");
+ CYG_ASSERT( isr != &synth_default_isr, "An ISR must be attached before it can be detached");
+ CYG_ASSERT( (false == hal_interrupts_enabled) || (0 != (synth_masked_isrs & (0x01 << vec))), "ISRs should only be detached when it is safe");
+
+ // The Cyg_Interrupt destructor does an unconditional detach, even if the
+ // isr is not currently attached.
+ if (isr == synth_isr_handlers[vec].isr) {
+ synth_isr_handlers[vec].isr = &synth_default_isr;
+ synth_isr_handlers[vec].data = (CYG_ADDRWORD) 0;
+ synth_isr_handlers[vec].obj = (CYG_ADDRESS) 0;
+ }
+
+ // The priority is not updated here. This should be ok, if another
+ // isr is attached then the appropriate priority will be installed
+ // first.
+}
+
+void (*hal_vsr_get(cyg_vector_t vec))(void)
+{
+ CYG_ASSERT( (CYGNUM_HAL_VSR_MIN <= vec) && (vec <= CYGNUM_HAL_VSR_MAX), "Can only get valid VSR vectors");
+ return synth_VSR;
+}
+
+void
+hal_vsr_set(cyg_vector_t vec, void (*new_vsr)(void), void (**old_vsrp)(void))
+{
+ cyg_bool_t old;
+
+ CYG_ASSERT( (CYGNUM_HAL_VSR_MIN <= vec) && (vec <= CYGNUM_HAL_VSR_MAX), "Can only get valid VSR vectors");
+ CYG_CHECK_FUNC_PTR( new_vsr, "A valid VSR must be supplied");
+
+ // There is a theoretical possibility of two hal_vsr_set calls at
+ // the same time. The old and new VSRs must be kept in synch.
+ HAL_DISABLE_INTERRUPTS(old);
+ if (0 != old_vsrp) {
+ *old_vsrp = synth_VSR;
+ }
+ synth_VSR = new_vsr;
+ HAL_RESTORE_INTERRUPTS(old);
+}
+
+void
+hal_interrupt_mask(cyg_vector_t which)
+{
+ CYG_PRECONDITION( !hal_interrupts_enabled, "Interrupts should be disabled on entry to hal_interrupt_mask");
+ CYG_ASSERT((CYGNUM_HAL_ISR_MIN <= which) && (which <= CYGNUM_HAL_ISR_MAX), "A valid ISR vector must be supplied");
+ synth_masked_isrs |= (0x01 << which);
+}
+
+void
+hal_interrupt_unmask(cyg_vector_t which)
+{
+ CYG_PRECONDITION( !hal_interrupts_enabled, "Interrupts should be disabled on entry to hal_interrupt_unmask");
+ CYG_ASSERT((CYGNUM_HAL_ISR_MIN <= which) && (which <= CYGNUM_HAL_ISR_MAX), "A valid ISR vector must be supplied");
+ synth_masked_isrs &= ~(0x01 << which);
+}
+
+void
+hal_interrupt_acknowledge(cyg_vector_t which)
+{
+ cyg_bool_t old;
+ CYG_ASSERT((CYGNUM_HAL_ISR_MIN <= which) && (which <= CYGNUM_HAL_ISR_MAX), "A valid ISR vector must be supplied");
+
+ // Acknowledging an interrupt means clearing the bit in the
+ // interrupt pending "register".
+ // NOTE: does the auxiliary need to keep track of this? Probably
+ // not, the auxiliary can just raise SIGIO whenever a device wants
+ // attention. There may be a trade off here between additional
+ // communication and unnecessary SIGIOs.
+ HAL_DISABLE_INTERRUPTS(old);
+ synth_pending_isrs &= ~(0x01 << which);
+ HAL_RESTORE_INTERRUPTS(old);
+}
+
+void
+hal_interrupt_configure(cyg_vector_t which, cyg_bool_t level, cyg_bool_t up)
+{
+ CYG_ASSERT((CYGNUM_HAL_ISR_MIN <= which) && (which <= CYGNUM_HAL_ISR_MAX), "A valid ISR vector must be supplied");
+ // The synthetic target does not currently distinguish between
+ // level and edge interrupts. Possibly this information will have
+ // to be passed on to the auxiliary in future.
+ CYG_UNUSED_PARAM(cyg_vector_t, which);
+ CYG_UNUSED_PARAM(cyg_bool_t, level);
+ CYG_UNUSED_PARAM(cyg_bool_t, up);
+}
+
+void
+hal_interrupt_set_level(cyg_vector_t which, cyg_priority_t level)
+{
+ CYG_ASSERT((CYGNUM_HAL_ISR_MIN <= which) && (which <= CYGNUM_HAL_ISR_MAX), "A valid ISR vector must be supplied");
+ // The legal values for priorities are not defined at this time.
+ // Manipulating the interrupt priority level currently has no
+ // effect. The information is stored anyway, for future use.
+ synth_isr_handlers[which].pri = level;
+}
+
+// ----------------------------------------------------------------------------
+// Exception handling. Typically this involves calling into the kernel,
+// translating the POSIX signal number into a HAL exception number. In
+// practice these signals will generally be caught in the debugger and
+// will not have to be handled by eCos itself.
+/*
+static void
+synth_exception_sighandler(int sig)
+{
+ CYG_WORD ecos_exception_number = 0;
+ cyg_bool_t old;
+
+ // There is no need to save state, that will have been done by the
+ // system as part of the signal delivery process.
+
+ // Disable interrupts. Performing e.g. an interaction with the
+ // auxiliary after a SIGSEGV is dubious.
+ HAL_DISABLE_INTERRUPTS(old);
+
+ // Now decode the signal and turn it into an eCos exception.
+ switch(sig) {
+ case CYG_HAL_SYS_SIGILL:
+ ecos_exception_number = CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION;
+ break;
+ case CYG_HAL_SYS_SIGBUS:
+ case CYG_HAL_SYS_SIGSEGV:
+ ecos_exception_number = CYGNUM_HAL_EXCEPTION_DATA_ACCESS;
+ break;
+ case CYG_HAL_SYS_SIGFPE:
+ ecos_exception_number = CYGNUM_HAL_EXCEPTION_FPU;
+ break;
+ default:
+ CYG_FAIL("Unknown signal");
+ break;
+ }
+
+#ifdef CYGPKG_KERNEL_EXCEPTIONS
+ // Deliver the signal, usually to the kernel, possibly to the
+ // common HAL. The second argument should be the current
+ // savestate, but that is not readily accessible.
+ cyg_hal_deliver_exception(ecos_exception_number, (CYG_ADDRWORD) 0);
+
+ // It is now necessary to restore the machine state, including
+ // interrupts. In theory higher level code may have manipulated
+ // the machine state to prevent any recurrence of the exception.
+ // In practice the machine state is not readily accessible.
+ HAL_RESTORE_INTERRUPTS(old);
+#else
+ CYG_FAIL("Exception!!!");
+ for (;;);
+#endif
+}
+*/
+// ----------------------------------------------------------------------------
+// The clock support. This can be implemented using the setitimer()
+// and getitimer() calls. The kernel will install a suitable interrupt
+// handler for CYGNUM_HAL_INTERRUPT_RTC, but it depends on the HAL
+// for low-level manipulation of the clock hardware.
+//
+// There is a problem with HAL_CLOCK_READ(). The obvious
+// implementation would use getitimer(), but that has the wrong
+// behaviour: it is intended for fairly coarse intervals and works in
+// terms of system clock ticks, as opposed to a fine-grained
+// implementation that actually examines the system clock. Instead use
+// gettimeofday().
+
+static struct cyg_hal_sys_timeval synth_clock = { 0, 0 };
+
+void
+hal_clock_initialize(cyg_uint32 period)
+{
+ struct cyg_hal_sys_itimerval timer;
+
+ // Needed for hal_clock_read(), if HAL_CLOCK_READ() is used before
+ // the first clock interrupt.
+ cyg_hal_sys_gettimeofday(&synth_clock, (struct cyg_hal_sys_timezone*) 0);
+
+ // The synthetic target clock resolution is in microseconds. A typical
+ // value for the period will be 10000, corresponding to one timer
+ // interrupt every 10ms. Set up a timer to interrupt in period us,
+ // and again every period us after that.
+ CYG_ASSERT( period < 1000000, "Clock interrupts should happen at least once per second");
+ timer.hal_it_interval.hal_tv_sec = 0;
+ timer.hal_it_interval.hal_tv_usec = period;
+ timer.hal_it_value.hal_tv_sec = 0;
+ timer.hal_it_value.hal_tv_usec = period;
+
+ if (0 != cyg_hal_sys_setitimer(CYG_HAL_SYS_ITIMER_REAL, &timer, (struct cyg_hal_sys_itimerval*) 0)) {
+ CYG_FAIL("Failed to initialize the clock itimer");
+ }
+}
+
+static void
+synth_alrm_sighandler(int sig)
+{
+ CYG_PRECONDITION((CYG_HAL_SYS_SIGALRM == sig), "Only SIGALRM should be handled here");
+
+ if (!hal_interrupts_enabled) {
+ synth_sigalrm_pending = true;
+ return;
+ }
+
+ // Interrupts were enabled, but must be blocked before any further processing.
+ hal_interrupts_enabled = false;
+
+ // Update the cached value of the clock for hal_clock_read()
+ cyg_hal_sys_gettimeofday(&synth_clock, (struct cyg_hal_sys_timezone*) 0);
+
+ // Update the interrupt status "register" to match pending interrupts
+ // A timer signal means that IRQ 0 needs attention.
+ synth_pending_isrs |= 0x01;
+
+ // If any of the pending interrupts are not masked, invoke the
+ // VSR. That will reenable interrupts.
+ if (0 != (synth_pending_isrs & ~synth_masked_isrs)) {
+ (*synth_VSR)();
+ } else {
+ hal_interrupts_enabled = true;
+ }
+
+ // The VSR will have invoked interrupt_end() with interrupts
+ // enabled, and they should still be enabled.
+ CYG_ASSERT( hal_interrupts_enabled, "Interrupts should still be enabled on return from the VSR");
+}
+
+// Implementing hal_clock_read(). gettimeofday() in conjunction with
+// synth_clock gives the time since the last clock tick in
+// microseconds, the correct unit for the synthetic target.
+cyg_uint32
+hal_clock_read(void)
+{
+ int elapsed;
+ struct cyg_hal_sys_timeval now;
+ cyg_hal_sys_gettimeofday(&now, (struct cyg_hal_sys_timezone*) 0);
+
+ elapsed = (1000000 * (now.hal_tv_sec - synth_clock.hal_tv_sec)) + (now.hal_tv_usec - synth_clock.hal_tv_usec);
+ return elapsed;
+}
+
+// ----------------------------------------------------------------------------
+// The signal handler for SIGIO. This can also be invoked by
+// hal_enable_interrupts() to catch up with any signals that arrived
+// while interrupts were disabled. SIGIO is raised by the auxiliary
+// when it requires attention, i.e. when one or more of the devices
+// want to raise an interrupt. Finding out exactly which interrupt(s)
+// are currently pending in the auxiliary requires communication with
+// the auxiliary.
+//
+// If interrupts are currently disabled then the signal cannot be
+// handled immediately. In particular SIGIO cannot be handled because
+// there may already be ongoing communication with the auxiliary.
+// Instead some volatile flags are used to keep track of which signals
+// were raised while interrupts were disabled.
+//
+// It might be better to perform the interaction with the auxiliary
+// as soon as possible, i.e. either in the SIGIO handler or when the
+// current communication completes. That way the mask of pending
+// interrupts would remain up to date even when interrupts are
+// disabled, thus allowing applications to run in polled mode.
+
+// A little utility called when the auxiliary has been asked to exit,
+// implicitly affecting this application as well. The sole purpose
+// of this function is to put a suitably-named function on the stack
+// to make it more obvious from inside gdb what is happening.
+static void
+synth_io_handle_shutdown_request_from_auxiliary(void)
+{
+ HAL_PLATFORM_EXIT(0);
+}
+
+static void
+synth_io_sighandler(int sig)
+{
+ CYG_PRECONDITION((CYG_HAL_SYS_SIGIO == sig), "Only SIGIO should be handled here");
+
+ if (!hal_interrupts_enabled) {
+ synth_sigio_pending = true;
+ return;
+ }
+
+ // Interrupts were enabled, but must be blocked before any further processing.
+ hal_interrupts_enabled = false;
+
+ // Update the interrupt status "register" to match pending interrupts
+ // Contact the auxiliary to find out what interrupts are currently pending there.
+ // If there is no auxiliary at present, e.g. because it has just terminated
+ // and things are generally somewhat messy, ignore it.
+ //
+ // This code also deals with the case where the user has requested program
+ // termination. It would be wrong for the auxiliary to just exit, since the
+ // application could not distinguish that case from a crash. Instead the
+ // auxiliary can optionally return an additional byte of data, and if that
+ // byte actually gets sent then that indicates pending termination.
+ if (synth_auxiliary_running) {
+ int result;
+ int actual_len;
+ unsigned char dummy[1];
+ synth_auxiliary_xchgmsg(SYNTH_DEV_AUXILIARY, SYNTH_AUXREQ_GET_IRQPENDING, 0, 0,
+ (const unsigned char*) 0, 0, // The auxiliary does not need any additional data
+ &result, dummy, &actual_len, 1);
+ synth_pending_isrs |= result;
+ if (actual_len) {
+ // The auxiliary has been asked to terminate by the user. This
+ // request has now been passed on to the eCos application.
+ synth_io_handle_shutdown_request_from_auxiliary();
+ }
+ }
+
+ // If any of the pending interrupts are not masked, invoke the VSR
+ if (0 != (synth_pending_isrs & ~synth_masked_isrs)) {
+ (*synth_VSR)();
+ } else {
+ hal_interrupts_enabled = true;
+ }
+
+ // The VSR will have invoked interrupt_end() with interrupts
+ // enabled, and they should still be enabled.
+ CYG_ASSERT( hal_interrupts_enabled, "Interrupts should still be enabled on return from the VSR");
+}
+
+// ----------------------------------------------------------------------------
+// Here we define an action to do in the idle thread. For the
+// synthetic target it makes no sense to spin eating processor time
+// that other processes could make use of. Instead we call select. The
+// itimer will still go off and kick the scheduler back into life,
+// giving us an escape path from the select. There is one problem: in
+// some configurations, e.g. when preemption is disabled, the idle
+// thread must yield continuously rather than blocking.
+void
+hal_idle_thread_action(cyg_uint32 loop_count)
+{
+#ifndef CYGIMP_HAL_IDLE_THREAD_SPIN
+ cyg_hal_sys__newselect(0,
+ (struct cyg_hal_sys_fd_set*) 0,
+ (struct cyg_hal_sys_fd_set*) 0,
+ (struct cyg_hal_sys_fd_set*) 0,
+ (struct cyg_hal_sys_timeval*) 0);
+#endif
+ CYG_UNUSED_PARAM(cyg_uint32, loop_count);
+}
+
+// ----------------------------------------------------------------------------
+// The I/O auxiliary.
+//
+// I/O happens via an auxiliary process. During startup this code attempts
+// to locate and execute a program ecosynth which should be installed in
+// ../libexec/ecosynth relative to some directory on the search path.
+// Subsequent I/O operations involve interacting with this auxiliary.
+
+#define MAKESTRING1(a) #a
+#define MAKESTRING2(a) MAKESTRING1(a)
+#define AUXILIARY "../libexec/ecos/hal/synth/arch/" MAKESTRING2(CYGPKG_HAL_SYNTH) "/ecosynth"
+
+// Is the auxiliary up and running?
+cyg_bool synth_auxiliary_running = false;
+
+// The pipes to and from the auxiliary.
+static int to_aux = -1;
+static int from_aux = -1;
+
+// Attempt to start up the auxiliary. Note that this happens early on
+// during system initialization so it is "known" that the world is
+// still simple, e.g. that no other files have been opened.
+static void
+synth_start_auxiliary(void)
+{
+#define BUFSIZE 256
+ char filename[BUFSIZE];
+ const char* path = 0;
+ int i, j;
+ cyg_bool found = false;
+ int to_aux_pipe[2];
+ int from_aux_pipe[2];
+ int child;
+ int aux_version;
+#if 1
+ // Check for a command line argument -io. Only run the auxiliary if this
+ // argument is provided, i.e. default to traditional behaviour.
+ for (i = 1; i < cyg_hal_sys_argc; i++) {
+ const char* tmp = cyg_hal_sys_argv[i];
+ if ('-' == *tmp) {
+ // Arguments beyond -- are reserved for use by the application,
+ // and should not be interpreted by the HAL itself or by ecosynth.
+ if (('-' == tmp[1]) && ('\0' == tmp[2])) {
+ break;
+ }
+ tmp++;
+ if ('-' == *tmp) {
+ // Do not distinguish between -io and --io
+ tmp++;
+ }
+ if (('i' == tmp[0]) && ('o' == tmp[1]) && ('\0' == tmp[2])) {
+ found = 1;
+ break;
+ }
+ }
+ }
+ if (!found) {
+ return;
+ }
+#else
+ // Check for a command line argument -ni or -nio. Always run the
+ // auxiliary unless this argument is given, i.e. default to full
+ // I/O support.
+ for (i = 1; i < cyg_hal_sys_argc; i++) {
+ const char* tmp = cyg_hal_sys_argv[i];
+ if ('-' == *tmp) {
+ if (('-' == tmp[1]) && ('\0' == tmp[2])) {
+ break;
+ }
+ tmp++;
+ if ('-' == *tmp) {
+ tmp++;
+ }
+ if ('n' == *tmp) {
+ tmp++;
+ if ('i' == *tmp) {
+ tmp++;
+ if ('\0' == *tmp) {
+ found = 1; // -ni or --ni
+ break;
+ }
+ if (('o' == *tmp) && ('\0' == tmp[1])) {
+ found = 1; // -nio or --nio
+ break;
+ }
+ }
+ }
+ }
+ }
+ if (found) {
+ return;
+ }
+#endif
+
+ // The auxiliary must be found relative to the current search path,
+ // so look for a PATH= environment variable.
+ for (i = 0; (0 == path) && (0 != cyg_hal_sys_environ[i]); i++) {
+ const char *var = cyg_hal_sys_environ[i];
+ if (('P' == var[0]) && ('A' == var[1]) && ('T' == var[2]) && ('H' == var[3]) && ('=' == var[4])) {
+ path = var + 5;
+ }
+ }
+ if (0 == path) {
+ // Very unlikely, but just in case.
+ path = ".:/bin:/usr/bin";
+ }
+
+ found = 0;
+ while (!found && ('\0' != *path)) { // for every entry in the path
+ char *tmp = AUXILIARY;
+
+ j = 0;
+
+ // As a special case, an empty string in the path corresponds to the
+ // current directory.
+ if (':' == *path) {
+ filename[j++] = '.';
+ path++;
+ } else {
+ while ((j < BUFSIZE) && ('\0' != *path) && (':' != *path)) {
+ filename[j++] = *path++;
+ }
+ // If not at the end of the search path, move on to the next entry.
+ if ('\0' != *path) {
+ while ((':' != *path) && ('\0' != *path)) {
+ path++;
+ }
+ if (':' == *path) {
+ path++;
+ }
+ }
+ }
+ // Now append a directory separator, and then the name of the executable.
+ if (j < BUFSIZE) {
+ filename[j++] = '/';
+ }
+ while ((j < BUFSIZE) && ('\0' != *tmp)) {
+ filename[j++] = *tmp++;
+ }
+ // If there has been a buffer overflow, skip this entry.
+ if (j == BUFSIZE) {
+ filename[BUFSIZE-1] = '\0';
+ diag_printf("Warning: buffer limit reached while searching PATH for the I/O auxiliary.\n");
+ diag_printf(" : skipping current entry.\n");
+ } else {
+ // filename now contains a possible match for the auxiliary.
+ filename[j++] = '\0';
+ if (0 == cyg_hal_sys_access(filename, CYG_HAL_SYS_X_OK)) {
+ found = true;
+ }
+ }
+ }
+#undef BUFSIZE
+
+ if (!found) {
+ diag_printf("Error: unable to find the I/O auxiliary program on the current search PATH\n");
+ diag_printf(" : please install the appropriate host-side tools.\n");
+ HAL_PLATFORM_EXIT(1);
+ }
+
+ // An apparently valid executable exists (or at the very least it existed...),
+ // so create the pipes that will be used for communication.
+ if ((0 != cyg_hal_sys_pipe(to_aux_pipe)) ||
+ (0 != cyg_hal_sys_pipe(from_aux_pipe))) {
+ diag_printf("Error: unable to set up pipes for communicating with the I/O auxiliary.\n");
+ HAL_PLATFORM_EXIT(1);
+ }
+
+ // Time to fork().
+ child = cyg_hal_sys_fork();
+ if (child < 0) {
+ diag_printf("Error: failed to fork() process for the I/O auxiliary.\n");
+ HAL_PLATFORM_EXIT(1);
+ } else if (child == 0) {
+ cyg_bool found_dotdot;
+ // There should not be any problems rearranging the file descriptors as desired...
+ cyg_bool unexpected_error = 0;
+
+ // In the child process. Close unwanted file descriptors, then some dup2'ing,
+ // and execve() the I/O auxiliary. The auxiliary will inherit stdin,
+ // stdout and stderr from the eCos application, so that functions like
+ // printf() work as expected. In addition fd 3 will be the pipe from
+ // the eCos application and fd 4 the pipe to the application. It is possible
+ // that the eCos application was run from some process other than a shell
+ // and hence that file descriptors 3 and 4 are already in use, but that is not
+ // supported. One possible workaround would be to close all file descriptors
+ // >= 3, another would be to munge the argument vector passing the file
+ // descriptors actually being used.
+ unexpected_error |= (0 != cyg_hal_sys_close(to_aux_pipe[1]));
+ unexpected_error |= (0 != cyg_hal_sys_close(from_aux_pipe[0]));
+
+ if (3 != to_aux_pipe[0]) {
+ if (3 == from_aux_pipe[1]) {
+ // Because to_aux_pipe[] was set up first it should have received file descriptors 3 and 4.
+ diag_printf("Internal error: file descriptors have been allocated in an unusual order.\n");
+ HAL_PLATFORM_EXIT(1);
+ } else {
+ unexpected_error |= (3 != cyg_hal_sys_dup2(to_aux_pipe[0], 3));
+ unexpected_error |= (0 != cyg_hal_sys_close(to_aux_pipe[0]));
+ }
+ }
+ if (4 != from_aux_pipe[1]) {
+ unexpected_error |= (4 != cyg_hal_sys_dup2(from_aux_pipe[1], 4));
+ unexpected_error |= (0 != cyg_hal_sys_close(from_aux_pipe[1]));
+ }
+ if (unexpected_error) {
+ diag_printf("Error: internal error in auxiliary process, failed to manipulate pipes.\n");
+ HAL_PLATFORM_EXIT(1);
+ }
+ // The arguments passed to the auxiliary are mostly those for
+ // the synthetic target application, except for argv[0] which
+ // is replaced with the auxiliary's pathname. The latter
+ // currently holds at least one ../, and cleaning this up is
+ // useful.
+ //
+ // If the argument vector contains -- then that and subsequent
+ // arguments are not passed to the auxiliary. Instead such
+ // arguments are reserved for use by the application.
+ do {
+ int len;
+ for (len = 0; '\0' != filename[len]; len++)
+ ;
+ found_dotdot = false;
+ for (i = 0; i < (len - 4); i++) {
+ if (('/' == filename[i]) && ('.' == filename[i+1]) && ('.' == filename[i+2]) && ('/' == filename[i+3])) {
+ j = i + 3;
+ for ( --i; (i >= 0) && ('/' != filename[i]); i--) {
+ CYG_EMPTY_STATEMENT;
+ }
+ if (i >= 0) {
+ found_dotdot = true;
+ do {
+ i++; j++;
+ filename[i] = filename[j];
+ } while ('\0' != filename[i]);
+ }
+ }
+ }
+ } while(found_dotdot);
+
+ cyg_hal_sys_argv[0] = filename;
+
+ for (i = 1; i < cyg_hal_sys_argc; i++) {
+ const char* tmp = cyg_hal_sys_argv[i];
+ if (('-' == tmp[0]) && ('-' == tmp[1]) && ('\0' == tmp[2])) {
+ cyg_hal_sys_argv[i] = (const char*) 0;
+ break;
+ }
+ }
+ cyg_hal_sys_execve(filename, cyg_hal_sys_argv, cyg_hal_sys_environ);
+
+ // An execute error has occurred. Report this here, then exit. The
+ // parent will detect a close on the pipe without having received
+ // any data, and it will assume that a suitable diagnostic will have
+ // been displayed already.
+ diag_printf("Error: failed to execute the I/O auxiliary.\n");
+ HAL_PLATFORM_EXIT(1);
+ } else {
+ int rc;
+ char buf[1];
+
+ // Still executing the eCos application.
+ // Do some cleaning-up.
+ to_aux = to_aux_pipe[1];
+ from_aux = from_aux_pipe[0];
+ if ((0 != cyg_hal_sys_close(to_aux_pipe[0])) ||
+ (0 != cyg_hal_sys_close(from_aux_pipe[1]))) {
+ diag_printf("Error: internal error in main process, failed to manipulate pipes.\n");
+ HAL_PLATFORM_EXIT(1);
+ }
+
+ // It is now a good idea to block until the auxiliary is
+ // ready, i.e. give it a chance to read in its configuration
+ // files, load appropriate scripts, pop up windows, ... This
+ // may take a couple of seconds or so. Once the auxiliary is
+ // ready it will write a single byte down the pipe. This is
+ // the only time that the auxiliary will write other than when
+ // responding to a request.
+ do {
+ rc = cyg_hal_sys_read(from_aux, buf, 1);
+ } while (-CYG_HAL_SYS_EINTR == rc);
+
+ if (1 != rc) {
+ // The auxiliary has not started up successfully, so exit
+ // immediately. It should have generated appropriate
+ // diagnostics.
+ HAL_PLATFORM_EXIT(1);
+ }
+ }
+
+ // At this point the auxiliary is up and running. It should not
+ // generate any interrupts just yet since none of the devices have
+ // been initialized. Remember that the auxiliary is now running,
+ // so that the initialization routines for those devices can
+ // figure out that they should interact with the auxiliary rather
+ // than attempt anything manually.
+ synth_auxiliary_running = true;
+
+ // Make sure that the auxiliary is the right version.
+ synth_auxiliary_xchgmsg(SYNTH_DEV_AUXILIARY, SYNTH_AUXREQ_GET_VERSION, 0, 0,
+ (const unsigned char*) 0, 0,
+ &aux_version, (unsigned char*) 0, (int*) 0, 0);
+ if (SYNTH_AUXILIARY_PROTOCOL_VERSION != aux_version) {
+ synth_auxiliary_running = false;
+ diag_printf("Error: an incorrect version of the I/O auxiliary is installed\n"
+ " Expected version %d, actual version %d\n"
+ " Installed binary is %s\n",
+ SYNTH_AUXILIARY_PROTOCOL_VERSION, aux_version, filename);
+ HAL_PLATFORM_EXIT(1);
+ }
+}
+
+// Write a request to the I/O auxiliary, and optionally get back a
+// reply. The dev_id is 0 for messages intended for the auxiliary
+// itself, for example a device instantiation or a request for the
+// current interrupt sate. Otherwise it identifies a specific device.
+// The request code is specific to the device, and the two optional
+// arguments are specific to the request.
+void
+synth_auxiliary_xchgmsg(int devid, int reqcode, int arg1, int arg2,
+ const unsigned char* txdata, int txlen,
+ int* result,
+ unsigned char* rxdata, int* actual_rxlen, int rxlen)
+{
+ unsigned char request[SYNTH_REQUEST_LENGTH];
+ unsigned char reply[SYNTH_REPLY_LENGTH];
+ int rc;
+ int reply_rxlen;
+ cyg_bool_t old_isrstate;
+
+ CYG_ASSERT(devid >= 0, "A valid device id should be supplied");
+ CYG_ASSERT((0 == txlen) || ((const unsigned char*)0 != txdata), "Data transmits require a transmit buffer");
+ CYG_ASSERT((0 == rxlen) || ((unsigned char*)0 != rxdata), "Data receives require a receive buffer");
+ CYG_ASSERT((0 == rxlen) || ((int*)0 != result), "If a reply is expected then space must be allocated");
+
+ // I/O interactions with the auxiliary must be atomic: a context switch in
+ // between sending the header and the actual data would be bad.
+ HAL_DISABLE_INTERRUPTS(old_isrstate);
+
+ // The auxiliary should be running for the duration of this
+ // exchange. However the auxiliary can disappear asynchronously,
+ // so it is not possible for higher-level code to be sure that the
+ // auxiliary is still running.
+ //
+ // If the auxiliary disappears during this call then usually this
+ // will cause a SIGCHILD or SIGPIPE, both of which result in
+ // termination. The exception is when the auxiliary decides to
+ // shut down stdout for some reason without exiting - that has to
+ // be detected in the read loop.
+ if (synth_auxiliary_running) {
+ request[SYNTH_REQUEST_DEVID_OFFSET + 0] = (devid >> 0) & 0x0FF;
+ request[SYNTH_REQUEST_DEVID_OFFSET + 1] = (devid >> 8) & 0x0FF;
+ request[SYNTH_REQUEST_DEVID_OFFSET + 2] = (devid >> 16) & 0x0FF;
+ request[SYNTH_REQUEST_DEVID_OFFSET + 3] = (devid >> 24) & 0x0FF;
+ request[SYNTH_REQUEST_REQUEST_OFFSET + 0] = (reqcode >> 0) & 0x0FF;
+ request[SYNTH_REQUEST_REQUEST_OFFSET + 1] = (reqcode >> 8) & 0x0FF;
+ request[SYNTH_REQUEST_REQUEST_OFFSET + 2] = (reqcode >> 16) & 0x0FF;
+ request[SYNTH_REQUEST_REQUEST_OFFSET + 3] = (reqcode >> 24) & 0x0FF;
+ request[SYNTH_REQUEST_ARG1_OFFSET + 0] = (arg1 >> 0) & 0x0FF;
+ request[SYNTH_REQUEST_ARG1_OFFSET + 1] = (arg1 >> 8) & 0x0FF;
+ request[SYNTH_REQUEST_ARG1_OFFSET + 2] = (arg1 >> 16) & 0x0FF;
+ request[SYNTH_REQUEST_ARG1_OFFSET + 3] = (arg1 >> 24) & 0x0FF;
+ request[SYNTH_REQUEST_ARG2_OFFSET + 0] = (arg2 >> 0) & 0x0FF;
+ request[SYNTH_REQUEST_ARG2_OFFSET + 1] = (arg2 >> 8) & 0x0FF;
+ request[SYNTH_REQUEST_ARG2_OFFSET + 2] = (arg2 >> 16) & 0x0FF;
+ request[SYNTH_REQUEST_ARG2_OFFSET + 3] = (arg2 >> 24) & 0x0FF;
+ request[SYNTH_REQUEST_TXLEN_OFFSET + 0] = (txlen >> 0) & 0x0FF;
+ request[SYNTH_REQUEST_TXLEN_OFFSET + 1] = (txlen >> 8) & 0x0FF;
+ request[SYNTH_REQUEST_TXLEN_OFFSET + 2] = (txlen >> 16) & 0x0FF;
+ request[SYNTH_REQUEST_TXLEN_OFFSET + 3] = (txlen >> 24) & 0x0FF;
+ request[SYNTH_REQUEST_RXLEN_OFFSET + 0] = (rxlen >> 0) & 0x0FF;
+ request[SYNTH_REQUEST_RXLEN_OFFSET + 1] = (rxlen >> 8) & 0x0FF;
+ request[SYNTH_REQUEST_RXLEN_OFFSET + 2] = (rxlen >> 16) & 0x0FF;
+ request[SYNTH_REQUEST_RXLEN_OFFSET + 3] = ((rxlen >> 24) & 0x0FF) | (((int*)0 != result) ? 0x080 : 0);
+
+ // sizeof(synth_auxiliary_request) < PIPE_BUF (4096) so a single write should be atomic,
+ // subject only to incoming clock or SIGIO or child-related signals.
+ do {
+ rc = cyg_hal_sys_write(to_aux, (const void*) &request, SYNTH_REQUEST_LENGTH);
+ } while (-CYG_HAL_SYS_EINTR == rc);
+
+ // Is there any more data to be sent?
+ if (0 < txlen) {
+ int sent = 0;
+ CYG_LOOP_INVARIANT(synth_auxiliary_running, "The auxiliary cannot just disappear");
+
+ while (sent < txlen) {
+ rc = cyg_hal_sys_write(to_aux, (const void*) &(txdata[sent]), txlen - sent);
+ if (-CYG_HAL_SYS_EINTR == rc) {
+ continue;
+ } else if (rc < 0) {
+ diag_printf("Internal error: unexpected result %d when sending buffer to auxiliary.\n", rc);
+ diag_printf(" : this application is exiting immediately.\n");
+ HAL_PLATFORM_EXIT(1);
+ } else {
+ sent += rc;
+ }
+ }
+ CYG_ASSERT(sent <= txlen, "Amount of data sent should not exceed requested size");
+ }
+
+ // The auxiliary can now process this entire request. Is a reply expected?
+ if ((int*)0 != result) {
+ // The basic reply is also only a small number of bytes, so should be atomic.
+ do {
+ rc = cyg_hal_sys_read(from_aux, (void*) &reply, SYNTH_REPLY_LENGTH);
+ } while (-CYG_HAL_SYS_EINTR == rc);
+ if (rc <= 0) {
+ if (rc < 0) {
+ diag_printf("Internal error: unexpected result %d when receiving data from auxiliary.\n", rc);
+ } else {
+ diag_printf("Internal error: EOF detected on pipe from auxiliary.\n");
+ }
+ diag_printf(" : this application is exiting immediately.\n");
+ HAL_PLATFORM_EXIT(1);
+ }
+ CYG_ASSERT(SYNTH_REPLY_LENGTH == rc, "The correct amount of data should have been read");
+
+ // Replies are packed in Tcl and assumed to be two 32-bit
+ // little-endian integers.
+ *result = (reply[SYNTH_REPLY_RESULT_OFFSET + 3] << 24) |
+ (reply[SYNTH_REPLY_RESULT_OFFSET + 2] << 16) |
+ (reply[SYNTH_REPLY_RESULT_OFFSET + 1] << 8) |
+ (reply[SYNTH_REPLY_RESULT_OFFSET + 0] << 0);
+ reply_rxlen = (reply[SYNTH_REPLY_RXLEN_OFFSET + 3] << 24) |
+ (reply[SYNTH_REPLY_RXLEN_OFFSET + 2] << 16) |
+ (reply[SYNTH_REPLY_RXLEN_OFFSET + 1] << 8) |
+ (reply[SYNTH_REPLY_RXLEN_OFFSET + 0] << 0);
+
+ CYG_ASSERT(reply_rxlen <= rxlen, "The auxiliary should not be sending more data than was requested.");
+
+ if ((int*)0 != actual_rxlen) {
+ *actual_rxlen = reply_rxlen;
+ }
+ if (reply_rxlen) {
+ int received = 0;
+
+ while (received < reply_rxlen) {
+ rc = cyg_hal_sys_read(from_aux, (void*) &(rxdata[received]), reply_rxlen - received);
+ if (-CYG_HAL_SYS_EINTR == rc) {
+ continue;
+ } else if (rc <= 0) {
+ if (rc < 0) {
+ diag_printf("Internal error: unexpected result %d when receiving data from auxiliary.\n", rc);
+ } else {
+ diag_printf("Internal error: EOF detected on pipe from auxiliary.\n");
+ }
+ diag_printf(" : this application is exiting immediately.\n");
+ } else {
+ received += rc;
+ }
+ }
+ CYG_ASSERT(received == reply_rxlen, "Amount received should be exact");
+ }
+ }
+ }
+
+ HAL_RESTORE_INTERRUPTS(old_isrstate);
+}
+
+// Instantiate a device. This takes arguments such as
+// devs/eth/synth/ecosynth, current, ethernet, eth0, and 200x100 If
+// the package and version are NULL strings then the device being
+// initialized is application-specific and does not belong to any
+// particular package.
+int
+synth_auxiliary_instantiate(const char* pkg, const char* version, const char* devtype, const char* devinst, const char* devdata)
+{
+ int result = -1;
+ unsigned char buf[512 + 1];
+ const char* str;
+ int index;
+
+ CYG_ASSERT((const char*)0 != devtype, "Device instantiations must specify a valid device type");
+ CYG_ASSERT((((const char*)0 != pkg) && ((const char*)0 != version)) || \
+ (((const char*)0 == pkg) && ((const char*)0 == version)), "If a package is specified then the version must be supplied as well");
+
+ index = 0;
+ str = pkg;
+ if ((const char*)0 == str) {
+ str = "";
+ }
+ while ( (index < 512) && ('\0' != *str) ) {
+ buf[index++] = *str++;
+ }
+ if (index < 512) buf[index++] = '\0';
+ str = version;
+ if ((const char*)0 == str) {
+ str = "";
+ }
+ while ((index < 512) && ('\0' != *str) ) {
+ buf[index++] = *str++;
+ }
+ if (index < 512) buf[index++] = '\0';
+ for (str = devtype; (index < 512) && ('\0' != *str); ) {
+ buf[index++] = *str++;
+ }
+ if (index < 512) buf[index++] = '\0';
+ if ((const char*)0 != devinst) {
+ for (str = devinst; (index < 512) && ('\0' != *str); ) {
+ buf[index++] = *str++;
+ }
+ }
+ if (index < 512) buf[index++] = '\0';
+ if ((const char*)0 != devdata) {
+ for (str = devdata; (index < 512) && ('\0' != *str); ) {
+ buf[index++] = *str++;
+ }
+ }
+ if (index < 512) {
+ buf[index++] = '\0';
+ } else {
+ diag_printf("Internal error: buffer overflow constructing instantiate request for auxiliary.\n");
+ diag_printf(" : this application is exiting immediately.\n");
+ HAL_PLATFORM_EXIT(1);
+ }
+
+ if (synth_auxiliary_running) {
+ synth_auxiliary_xchgmsg(SYNTH_DEV_AUXILIARY, SYNTH_AUXREQ_INSTANTIATE, 0, 0,
+ buf, index,
+ &result,
+ (unsigned char*) 0, (int *) 0, 0);
+ }
+ return result;
+}
+
+// ----------------------------------------------------------------------------
+// SIGPIPE and SIGCHLD are special, related to the auxiliary process.
+//
+// A SIGPIPE can only happen when the application is writing to the
+// auxiliary, which only happens inside synth_auxiliary_xchgmsg() (this
+// assumes that no other code is writing down a pipe, e.g. to interact
+// with a process other than the standard I/O auxiliary). Either the
+// auxiliary has explicitly closed the pipe, which it is not supposed
+// to do, or more likely it has exited. Either way, there is little
+// point in continuing - unless we already know that the system is
+// shutting down.
+static void
+synth_pipe_sighandler(int sig)
+{
+ CYG_ASSERT(CYG_HAL_SYS_SIGPIPE == sig, "The right signal handler should be invoked");
+ if (synth_auxiliary_running) {
+ synth_auxiliary_running = false;
+ diag_printf("Internal error: communication with the I/O auxiliary has been lost.\n");
+ diag_printf(" : this application is exiting immediately.\n");
+ HAL_PLATFORM_EXIT(1);
+ }
+}
+
+// Similarly it is assumed that there will be no child processes other than
+// the auxiliary. Therefore a SIGCHLD indicates that the auxiliary has
+// terminated unexpectedly. This is bad: normal termination involves
+// the application exiting and the auxiliary terminating in response,
+// not the other way around.
+//
+// As a special case, if it is known that the auxiliary is not currently
+// usable then the signal is ignored. This copes with the situation where
+// the auxiliary has just been fork()'d but has failed to initialize, or
+// alternatively where the whole system is in the process of shutting down
+// cleanly and it happens that the auxiliary got there first.
+static void
+synth_chld_sighandler(int sig)
+{
+ CYG_ASSERT(CYG_HAL_SYS_SIGCHLD == sig, "The right signal handler should be invoked");
+ if (synth_auxiliary_running) {
+ synth_auxiliary_running = false;
+ diag_printf("Internal error: the I/O auxiliary has terminated unexpectedly.\n");
+ diag_printf(" : this application is exiting immediately.\n");
+ HAL_PLATFORM_EXIT(1);
+ }
+}
+
+// ----------------------------------------------------------------------------
+// Initialization
+
+void
+synth_hardware_init(void)
+{
+ struct cyg_hal_sys_sigaction action;
+ //struct cyg_hal_sys_sigset_t blocked;
+ int i;
+
+ // Set up a sigprocmask to block all signals except the ones we
+ // particularly want to handle. However do not block the tty
+ // signals - the ability to ctrl-C a program is important.
+/* CYG_HAL_SYS_SIGFILLSET(&blocked);
+ CYG_HAL_SYS_SIGDELSET(&blocked, CYG_HAL_SYS_SIGILL);
+ CYG_HAL_SYS_SIGDELSET(&blocked, CYG_HAL_SYS_SIGBUS);
+ CYG_HAL_SYS_SIGDELSET(&blocked, CYG_HAL_SYS_SIGFPE);
+ CYG_HAL_SYS_SIGDELSET(&blocked, CYG_HAL_SYS_SIGSEGV);
+ CYG_HAL_SYS_SIGDELSET(&blocked, CYG_HAL_SYS_SIGPIPE);
+ CYG_HAL_SYS_SIGDELSET(&blocked, CYG_HAL_SYS_SIGCHLD);
+ CYG_HAL_SYS_SIGDELSET(&blocked, CYG_HAL_SYS_SIGALRM);
+ CYG_HAL_SYS_SIGDELSET(&blocked, CYG_HAL_SYS_SIGIO);
+ CYG_HAL_SYS_SIGDELSET(&blocked, CYG_HAL_SYS_SIGHUP);
+ CYG_HAL_SYS_SIGDELSET(&blocked, CYG_HAL_SYS_SIGINT);
+ CYG_HAL_SYS_SIGDELSET(&blocked, CYG_HAL_SYS_SIGQUIT);
+ CYG_HAL_SYS_SIGDELSET(&blocked, CYG_HAL_SYS_SIGTERM);
+ CYG_HAL_SYS_SIGDELSET(&blocked, CYG_HAL_SYS_SIGCONT);
+ CYG_HAL_SYS_SIGDELSET(&blocked, CYG_HAL_SYS_SIGSTOP);
+ CYG_HAL_SYS_SIGDELSET(&blocked, CYG_HAL_SYS_SIGTSTP);
+
+ if (0 != cyg_hal_sys_sigprocmask(CYG_HAL_SYS_SIG_SETMASK, &blocked, (cyg_hal_sys_sigset_t*) 0)) {
+ CYG_FAIL("Failed to initialize sigprocmask");
+ }
+*/
+ // Now set up the VSR and ISR statics
+ synth_VSR = &synth_default_vsr;
+ for (i = 0; i < CYGNUM_HAL_ISR_COUNT; i++) {
+ synth_isr_handlers[i].isr = &synth_default_isr;
+ synth_isr_handlers[i].data = (CYG_ADDRWORD) 0;
+ synth_isr_handlers[i].obj = (CYG_ADDRESS) 0;
+ synth_isr_handlers[i].pri = CYGNUM_HAL_ISR_COUNT;
+ }
+
+ // Install signal handlers for SIGIO and SIGALRM, the two signals
+ // that may cause the VSR to run. SA_NODEFER is important: it
+ // means that the current signal will not be blocked while the
+ // signal handler is running. Combined with a mask of 0, it means
+ // that the sigprocmask does not change when a signal handler is
+ // invoked, giving eCos the flexibility to switch to other threads
+ // instead of having the signal handler return immediately.
+ action.hal_mask = 0;
+ action.hal_flags = CYG_HAL_SYS_SA_NODEFER;
+ action.hal_handler = &synth_alrm_sighandler;
+ action.hal_restorer = (void (*)(void)) 0;
+#ifdef CYG_HAL_SYS_SIGACTION_ADJUST
+ CYG_HAL_SYS_SIGACTION_ADJUST(CYG_HAL_SYS_SIGALRM, &action);
+#endif
+ if (0 != cyg_hal_sys_sigaction(CYG_HAL_SYS_SIGALRM, &action, (struct cyg_hal_sys_sigaction*) 0)) {
+ CYG_FAIL("Failed to install signal handler for SIGALRM");
+ }
+ action.hal_handler = &synth_io_sighandler;
+ if (0 != cyg_hal_sys_sigaction(CYG_HAL_SYS_SIGIO, &action, (struct cyg_hal_sys_sigaction*) 0)) {
+ CYG_FAIL("Failed to install signal handler for SIGIO");
+ }
+
+ // Install handlers for the various exceptions. For now these also
+ // operate with unchanged sigprocmasks, allowing nested
+ // exceptions. It is not clear that this is entirely a good idea,
+ // but in practice these exceptions will usually be handled by gdb
+ // anyway.
+/* action.hal_handler = &synth_exception_sighandler;
+ if (0 != cyg_hal_sys_sigaction(CYG_HAL_SYS_SIGILL, &action, (struct cyg_hal_sys_sigaction*) 0)) {
+ CYG_FAIL("Failed to install signal handler for SIGILL");
+ }
+ if (0 != cyg_hal_sys_sigaction(CYG_HAL_SYS_SIGBUS, &action, (struct cyg_hal_sys_sigaction*) 0)) {
+ CYG_FAIL("Failed to install signal handler for SIGBUS");
+ }
+ if (0 != cyg_hal_sys_sigaction(CYG_HAL_SYS_SIGFPE, &action, (struct cyg_hal_sys_sigaction*) 0)) {
+ CYG_FAIL("Failed to install signal handler for SIGFPE");
+ }
+ if (0 != cyg_hal_sys_sigaction(CYG_HAL_SYS_SIGSEGV, &action, (struct cyg_hal_sys_sigaction*) 0)) {
+ CYG_FAIL("Failed to install signal handler for SIGSEGV");
+ }
+*/
+ // Also cope with SIGCHLD and SIGPIPE. SIGCHLD indicates that the
+ // auxiliary has terminated, which is a bad thing. SIGPIPE
+ // indicates that a write to the auxiliary has terminated, but
+ // the error condition was caught at a different stage.
+ action.hal_handler = &synth_pipe_sighandler;
+ if (0 != cyg_hal_sys_sigaction(CYG_HAL_SYS_SIGPIPE, &action, (struct cyg_hal_sys_sigaction*) 0)) {
+ CYG_FAIL("Failed to install signal handler for SIGPIPE");
+ }
+ action.hal_handler = &synth_chld_sighandler;
+ action.hal_flags |= CYG_HAL_SYS_SA_NOCLDSTOP | CYG_HAL_SYS_SA_NOCLDWAIT;
+ if (0 != cyg_hal_sys_sigaction(CYG_HAL_SYS_SIGCHLD, &action, (struct cyg_hal_sys_sigaction*) 0)) {
+ CYG_FAIL("Failed to install signal handler for SIGCHLD");
+ }
+
+ // Determine the processor's bogomips rating. This adds some
+ // start-up overhead to all applications, even if HAL_DELAY_US()
+ // is not used. However doing it on demand in the first call
+ // to HAL_DELAY_US() would risk running out of file descriptors.
+ {
+ int fd;
+ char buf[4096]; // much larger than current /proc/cpuinfo, but still small enough for synthetic target stacks
+ int read;
+ int i;
+
+ fd = cyg_hal_sys_open("/proc/cpuinfo", CYG_HAL_SYS_O_RDONLY, 0);
+ if (fd < 0) {
+ CYG_FAIL("Failed to open /proc/cpuinfo, needed for BogoMips rating");
+ }
+ read = cyg_hal_sys_read(fd, buf, 4096);
+ cyg_hal_sys_close(fd);
+
+ for (i = 0; i < read; i++) {
+ if ((buf[i ] == 'b') && (buf[i+1] == 'o') && (buf[i+2] == 'g') && (buf[i+3] == 'o') &&
+ (buf[i+4] == 'm') && (buf[i+5] == 'i') && (buf[i+6] == 'p') && (buf[i+7] == 's')) {
+
+ for ( i += 8; (i < read) && ((buf[i] < '1') || (buf[i] > '9')); i++) {
+ ;
+ }
+ // Only bother with the integer part of the rating
+ for ( ; (i < read) && (buf[i] >= '0') && (buf[i] <= '9'); i++) {
+ hal_bogomips = (10 * hal_bogomips) + (buf[i] - '0');
+ }
+ break;
+ }
+ }
+ if (0 == hal_bogomips) {
+ CYG_FAIL("Failed to find bogomips entry in /proc/cpuinfo");
+ }
+ }
+
+ // Start up the auxiliary process.
+ synth_start_auxiliary();
+
+ // All done. At this stage interrupts are still disabled, no ISRs
+ // have been installed, and the clock is not yet ticking.
+ // Exceptions can come in and will be processed normally. SIGIO
+ // and SIGALRM could come in, but nothing has yet been done
+ // to make that happen.
+}
+
+// Second-stage hardware init. This is called after all C++ static
+// constructors have been run, which should mean that all device
+// drivers have been initialized and will have performed appropriate
+// interactions with the I/O auxiliary. There should now be a
+// message exchange with the auxiliary to let it know that there will
+// not be any more devices, allowing it to remove unwanted frames,
+// run the user's mainrc.tcl script, and so on. Also this is the
+// time that the various toplevels get mapped on to the display.
+//
+// This request blocks until the auxiliary is ready. The return value
+// indicates whether or not any errors occurred on the auxiliary side,
+// and that those errors have not been suppressed using --keep-going
+
+void
+synth_hardware_init2(void)
+{
+ if (synth_auxiliary_running) {
+ int result;
+ synth_auxiliary_xchgmsg(SYNTH_DEV_AUXILIARY, SYNTH_AUXREQ_CONSTRUCTORS_DONE,
+ 0, 0, (const unsigned char*) 0, 0,
+ &result,
+ (unsigned char*) 0, (int*) 0, 0);
+ if ( !result ) {
+ HAL_PLATFORM_EXIT(1);
+ }
+ }
+}
diff --git a/cesar/ecos/packages/hal/synth/arch/current/src/synth_protocol.h b/cesar/ecos/packages/hal/synth/arch/current/src/synth_protocol.h
new file mode 100644
index 0000000000..f063211765
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/src/synth_protocol.h
@@ -0,0 +1,124 @@
+#ifndef CYGONCE_HAL_SYNTH_PROTOCOL_H
+#define CYGONCE_HAL_SYNTH_PROTOCOL_H
+
+//=============================================================================
+//
+// synth_protocol.h
+//
+// Generic protocol between eCos and the I/O auxiliary.
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2002 Bart Veer
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors:bartv
+// Date: 2002-08-05
+// Purpose: Protocol definitions.
+// Description: This header file defines the protocol used between the
+// synthetic target HAL and the I/O auxiliary. The relevant
+// code in the latter is implemented in Tcl (making
+// use of the "binary" command) so this header file is
+// not actually used on the host-side. Instead the protocol
+// is defined in terms of byte arrays.
+//
+// The header file is not exported to any higher-level packages
+// that wish to communicate with the auxiliary. Instead those
+// packages are expected to use the functions synth_auxiliary_xchgmsg()
+// and synth_auxiliary_instantiate().
+//
+// Usage: #include "synth_protocol.h"
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+// Messages from the eCos synthetic target application to the I/O
+// auxiliary are exactly 24 bytes long, consisting of six 32-bit
+// little-endian integers. Inside the auxiliary they will be decoded
+// using the Tcl binary scan command and the format i6. The top bit
+// of RXLEN is overloaded to indicate whether or not a reply is expected
+// at all.
+#define SYNTH_REQUEST_LENGTH 24
+#define SYNTH_REQUEST_DEVID_OFFSET 0
+#define SYNTH_REQUEST_REQUEST_OFFSET 4
+#define SYNTH_REQUEST_ARG1_OFFSET 8
+#define SYNTH_REQUEST_ARG2_OFFSET 12
+#define SYNTH_REQUEST_TXLEN_OFFSET 16
+#define SYNTH_REQUEST_RXLEN_OFFSET 20
+
+// And the response. This consists of two 32-bit little-endian integers,
+// a result code and an actual rx_len field.
+#define SYNTH_REPLY_LENGTH 8
+#define SYNTH_REPLY_RESULT_OFFSET 0
+#define SYNTH_REPLY_RXLEN_OFFSET 4
+
+// Device 0 is special, it is for control messages with the auxiliary
+// itself - for example, to instantiate a device.
+#define SYNTH_DEV_AUXILIARY 0
+
+// Requests intended directly for the auxiliary.
+
+// Instantiate a device. arg1 and arg2 are ignored. The tx buffer
+// holds a string for the given device. The rx buffer will be for a
+// single integer, the device id or -1.
+#define SYNTH_AUXREQ_INSTANTIATE 0x01
+
+// Second-stage initialization, once all eCos device drivers have been
+// activated.
+#define SYNTH_AUXREQ_CONSTRUCTORS_DONE 0x02
+
+// Get the current mask of pending interrupts. arg1 and arg2 are
+// ignored, and there is no tx buffer. The reply code holds the irq
+// pending mask. Normally there is no additional reply data, but if
+// rx_len is non-zero then that indicates that the auxiliary has been
+// asked to exit.
+#define SYNTH_AUXREQ_GET_IRQPENDING 0x03
+
+// Versioning. The core protocol cannot be changed without breaking
+// lots of code. However it is still a good idea to allow the eCos
+// application to verify that the host-side is the right version, in
+// case new requests are added. arg1 and arg2 are ignored, there is no
+// tx buffer or reply data, and the reply code holds the version.
+#define SYNTH_AUXREQ_GET_VERSION 0x04
+
+// The version has to be kept in synch with ecosynth.tcl
+#define SYNTH_AUXILIARY_PROTOCOL_VERSION 0x01
+
+// The console device is also provided by the architectural package,
+// but only implements one function (write some output) so there is no
+// need for any function codes.
+
+#endif // CYGONCE_HAL_SYNTH_PROTOCOL.H
diff --git a/cesar/ecos/packages/hal/synth/arch/current/src/synth_syscalls.c b/cesar/ecos/packages/hal/synth/arch/current/src/synth_syscalls.c
new file mode 100644
index 0000000000..73d8a55925
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/arch/current/src/synth_syscalls.c
@@ -0,0 +1,110 @@
+//=============================================================================
+//
+// synth_syscalls.c
+//
+// Synthetic target access to more complex system calls
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2004 Andrew Lunn
+// Copyright (C) 2004 eCosCentric Ltd
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Andrew Lunn
+// Contributors:Alexander Neundorf
+// Date: 2004-12-15
+// Purpose: Access to more complex system calls which require marshalling.
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_io.h>
+
+void * cyg_hal_sys_shmat(int shmid, const void* shmaddr, int shmflg)
+{
+ void * result;
+ void * raddr;
+
+ result = (void *) cyg_hal_sys_ipc(CYG_HAL_SYS_IPCOP_shmat,
+ shmid,
+ shmflg,
+ (int) (&raddr),
+ (void*)shmaddr);
+ return raddr;
+}
+
+int cyg_hal_sys_shmget(int key, int size, int shmflg)
+{
+ return cyg_hal_sys_ipc(CYG_HAL_SYS_IPCOP_shmget, key, size, shmflg, NULL);
+}
+
+int cyg_hal_sys_shmdt(const void* shmaddr)
+{
+ return cyg_hal_sys_ipc(CYG_HAL_SYS_IPCOP_shmdt, 0, 0, 0,
+ ((void *) shmaddr));
+}
+
+int
+cyg_hal_sys_mmap(void *addr, unsigned long length, unsigned long prot,
+ unsigned long flags, unsigned long fd, unsigned long off)
+{
+
+ struct cyg_hal_sys_mmap_args args;
+
+ args.addr = (unsigned long) addr;
+ args.len = length;
+ args.prot = prot = prot;
+ args.flags = flags;
+ args.fd = fd;
+ args.offset = off;
+
+ return (cyg_hal_sys_mmapx(&args));
+}
+
+void (*synth_atexit_handler)(void) = (void (*)(void)) 0;
+
+int
+cyg_hal_sys_atexit_handler(void (*fct_atexit)(void))
+{
+ if(synth_atexit_handler == NULL) {
+ synth_atexit_handler = fct_atexit;
+ return 0;
+ }
+ else {
+ diag_write_string("ERROR an atexit handler already exist\n");
+ return -1;
+ }
+}
+
diff --git a/cesar/ecos/packages/hal/synth/i386linux/current/ChangeLog b/cesar/ecos/packages/hal/synth/i386linux/current/ChangeLog
new file mode 100644
index 0000000000..fc39f38478
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/i386linux/current/ChangeLog
@@ -0,0 +1,426 @@
+2005-06-26 Bart Veer <bartv@ecoscentric.com>
+
+ * include/var_intr.h (HAL_DELAY_US): new header to supply
+ processor-specific HAL_DELAY_US() macro
+
+2005-03-21 Bart Veer <bartv@ecoscentric.com>
+
+ * cdl/hal_synth_i386.cdl, src/profile.c: add profiling support.
+
+2005-03-11 Bart Veer <bartv@ecoscentric.com>
+
+ * include/var_io.h, src/syscall-i386-linux-1.0.S:
+ Improve support for returning from signal handlers
+
+2004-12-14 Alexander Neundorf <neundorf@kde.org>
+
+ * src/syscall-i386-linux-1.0.S: Add ipc system call
+
+2004-08-04 Alexander Neundorf <alexander.neundorf@jenoptik.com>
+
+ * src/syscall-i386-linux-1.0.S: Add mkdir system call
+
+2004-06-21 Alexander Neundorf <alexander.neundorf@jenoptik.com>
+
+ * src/syscall-i386-linux-1.0.S:
+ Add readdir, lstat and fstat system calls
+
+2004-04-22 Jani Monoses <jani@iv.ro>
+
+ * cdl/hal_synth_i386.cdl :
+ Invoke tail with stricter syntax that works in latest coreutils.
+
+2002-09-15 Bart Veer <bartv@ecoscentric.com>
+
+ * src/syscall-i386-linux-1.0.S:
+ Add access system call
+
+2002-08-04 Bart Veer <bartv@tymora.demon.co.uk>
+
+ * src/vectors.S (_start):
+ Store argv and environ in cyg_hal_sys_... variables
+
+2002-04-29 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/vectors.S:
+ Don't use .file as it can confuse debugging since the .file
+ doesn't contain the path and therefore the debugger will never
+ know where it lives! This conflicts with using -Wa,--gstabs.
+
+2002-04-10 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/pkgconf/mlt_synth_i386_rom.ldi: Define eh_frame and
+ RELOCS sections.
+
+2001-11-1 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/syscall-i386-linux-1.0.S: Added mmap system call
+
+2001-12-07 Bart Veer <bartv@redhat.com>
+
+ * src/syscall-i386-linux-1.0.S: added getcwd() system call
+
+2001-08-02 Bart Veer <bartv@redhat.com>
+
+ * src/context.S, include/arch.inc, include/var_arch.h:
+ Update thread context manipulation code to do the
+ right thing with respect to interrupt state.
+
+ * src/context.S (hal_setjmp):
+ Fixed bug in hal_setjmp() that corrupted EBX.
+
+2001-04-27 Bart Veer <bartv@redhat.com>
+
+ * All files
+ Major reorganization and clean-up of the synthetic target.
+
+2000-11-02 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/entry.c (_linux_entry): Extend memory using brk() syscall to
+ match memory layout
+
+ * src/syscall-i386-linux-1.0.S: Add brk syscall
+
+2000-10-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/pkgconf/mlt_i386_linux_ram.mlt:
+ Add heap1 section
+
+ * include/pkgconf/mlt_i386_linux_ram.h:
+ * include/pkgconf/mlt_i386_linux_ram.ldi:
+ Regenerated
+
+2000-10-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/hal_i386_linux.cdl: Correct memory layout file name
+
+2000-03-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/hal_i386_linux.cdl (CYGBLD_GLOBAL_COMMAND_PREFIX):
+
+ Revert most recent change for now to avoid breaking the
+ release system.
+
+2000-03-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/hal_i386_linux.cdl (CYGBLD_GLOBAL_COMMAND_PREFIX): Use native
+ toolchain by default, and describe versions to be used
+
+2000-02-29 Jesper Skov <jskov@redhat.com>
+
+ * include/plf_intr.h: Don't include kernel headers.
+
+2000-02-16 Jesper Skov <jskov@redhat.com>
+
+ * src/hal_diag.c (hal_diag_write_char): Check that write call is
+ successful.
+
+2000-02-16 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/variant.inc: Added missed copyright notice.
+
+2000-02-15 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/variant.inc:
+ * include/var_intr.h:
+ * include/plf_intr.h:
+ These files added to make this HAL consistent with PC
+ version. They also contains some code moved out of the
+ architecture HAL.
+
+2000-01-24 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/*.cdl:
+
+ Remove obsolete option CYGTST_TESTING_IDENTIFIER.
+
+2000-01-21 Jesper Skov <jskov@cygnus.co.uk>
+ CR 902062-CR
+ * src/hal_diag.c:
+ * src/syscall-i386-linux-1.0.S:
+ Sync after write.
+
+ * src/hal_startup.c: Make signals NODEFER.
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+
+1999-12-20 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * cdl/hal_i386_linux.cdl: Add -Wl for linker options.
+
+1999-11-25 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/mlt_i386_linux_ram.h: New file(s).
+
+1999-11-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * cdl/hal_i386_linux.cdl: Added.
+ Use define_proc for const header defs.
+1999-10-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/linux_misc.c: Fix some really minor spelling typos
+
+ * src/hal_diag.c (hal_diag_read_char): Check if we were woken up by
+ the itimer alarm (which is used for rescheduling) - in which case
+ just read again.
+
+
+1999-10-05 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal_i386_linux.h: Changed to use REAL TIME as
+ default.
+
+ From Andrew Lunn (lunn@ma.tech.ascom.ch)
+ * src/PKGconf.mak:
+ * src/linux_misc.c: [added]
+ * src/syscall-i386-linux-1.0.S:
+ Added idle thread action, reducing host load when eCos is idle.
+
+1999-08-16 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/hal_i386_linux.h:
+
+ Proper case package display string.
+
+1999-05-20 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/hal_i386_linux.h: Move RTC setup here.
+
+1999-05-14 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18956
+ * include/pkgconf/mlt_i386_linux_ram.mlt:
+ * include/pkgconf/mlt_i386_linux_ram.ldi:
+ Fixed problem with rel_got.
+ Encode . in section name as __.
+
+1999-04-08 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/mlt_*.*: Use double underscore substitution
+ for period character in SECTION_* macro names (PR 19787)
+
+1999-04-08 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/*.ldi: Revised SECTION_* macro arguments to
+ avoid padded output sections (PR 19787)
+
+1999-03-22 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/linux.S: Added comment.
+ Doh! Managed to break compilation with a comment...
+
+1999-03-16 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19483
+ * src/linux.S (cyg_hal_hardware_init): Fiddled some more with the
+ bits to no avail.
+
+ * src/hal_startup.c:
+ Renamed hal_ to cyg_hal_.
+ Added exception handling.
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_startup.c (cyg_hal_isr_init): Initialize ISR table with
+ pointers to default ISR routine.
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19486
+ * src/linux.S (cyg_hal_hardware_init): Only enable zero divide
+ exceptions.
+
+1999-03-11 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_startup.c:
+ * src/entry.c:
+ Renamed hal_isr_init to cyg_hal_isr_init.
+
+ * src/hal_startup.c: Also catch SIGFPE.
+
+ * src/entry.c: Call cyg_hal_hardware_init.
+
+ * src/linux.S: [added]
+ * src/PKGconf.mak:
+ Added file to hold startup assembly code.
+
+1999-03-11 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/*.ldi: add copyright notices
+
+1999-03-04 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/*.ldi: give all LDI files unique names so
+ that they can co-exist in an eCos build tree (PR 19184)
+ * include/pkgconf/*.mlt: give all MLT files unique names so
+ that they can co-exist in an eCos build tree (PR 19184)
+
+1999-02-25 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/hal_startup.c:
+ Changed label used to access scheduler lock to one that is not
+ mangled by C++. This is intended to make support for interrupt
+ handling in non-kernel configurations easier.
+
+1999-02-22 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/syscall-i386-linux-1.0.S: Added copyright header.
+
+1999-02-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/hal_startup.c:
+ Rename hal_interrupts_deffered -> hal_interrupts_deferred
+ Rename CYG_ISR/VSR_* -> CYGNUM_HAL_ISR/VSR_* in line with HAL changes
+ Rename CYG_VECTOR_RTC -> CYGNUM_HAL_INTERRUPT_RTC
+
+ * src/syscall-i386-linux-1.0.S:
+ Add a FIX ME
+
+1999-02-08 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/ram.mlt: New memory layout save file
+
+1999-02-05 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/*.ldi: Remove LMA_EQ_VMA macro definition.
+
+1999-01-29 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal_i386_linux.h: Changed CDL type back to radio
+ to get consistent ConfigTool output.
+
+1999-01-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/ram.ldi: Commented out the rel_got change.
+
+1999-01-25 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/ram.ldi: Added rel.got section.
+
+1999-01-22 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_startup.c: Moved external declarations into top-level
+ scope to avoid compiler warning.
+
+1999-01-19 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal_i386_linux.h: Removed startup
+ config. Changed linux entry to dummy instead of bool.
+
+1999-01-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal_i386_linux.h: Added config for real-time
+ timer.
+
+1999-01-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_diag.c: Removed hal_diag_write_line.
+
+ * src/entry.c: Removed main/argv stuff.
+
+1999-01-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/hal_i386_linux.h: Added.
+
+1999-01-11 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_startup.c (hal_default_vsr):
+ * src/linux.ld (cyg_hal_sched_lock):
+ Added C-symbol reference to the scheduler lock.
+
+1999-01-11 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_startup.c (hal_default_vsr): Allow interrupt disable
+ count to be bigger than 1.
+
+1999-01-11 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/linux.ld: Added fix me. Remember to clean up.
+
+ * src/hal_startup.c: Removed bogus include statement.
+ Added CYGPKG_KERNEL config handling.
+
+ * src/hal_diag.c: Removed bogus include statements and functions.
+
+1999-01-07 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_startup.c (hal_isr_init): Use CYG_VECTOR_RTC rather than
+ hardcoded value.
+
+1999-01-07 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/syscall-i386-linux-1.0.S:
+ * src/hal_diag.c:
+ * src/PKGconf.mak:
+ Removed tabs & fixed comment style.
+
+1999-01-07 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/PKGconf.mak: Cleaned up.
+
+ * src/entry.c: Added (from proven's crtbegin.c).
+
+ * src/linux.ld: Added.
+
+ * src/hal_startup.cxx: (Deleted)
+ * src/hal_startup.c: (Added)
+ Changed code to C, cleaned up.
+
+1999-01-06 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/hal_diag.c: Fixed warnings. Output chars in batches to avoid
+ problems with pkgtest - also improves performance.
+
+1999-01-06 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/syscall-i386-linux-1.0.S: Set behavior to match __ELF__.
+
+1998-12-18 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/syscall-i386-linux-1.0.S:
+ * src/hal_startup.cxx:
+ Fixed compiler warnings.
+
+Fri Dec 4 13:49:03 GMT 1998
+
+ * src/syscall-i386-linux-1.0.S: Fix to work with Bart's latest tools.
+ For some reason it doesn't define __ELF__ but, we really don't care.
+
+Mon Nov 9 15:18:11 GMT 1998 Chris Provenzano <proven@cygnus.com>
+
+ Initial i386 linux port.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/hal/synth/i386linux/current/cdl/hal_synth_i386.cdl b/cesar/ecos/packages/hal/synth/i386linux/current/cdl/hal_synth_i386.cdl
new file mode 100644
index 0000000000..e6976c8b6c
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/i386linux/current/cdl/hal_synth_i386.cdl
@@ -0,0 +1,166 @@
+# ====================================================================
+#
+# hal_synth_i386.cdl
+#
+# i386-specific synthetic target configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 2005 eCosCentric Ltd
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: jskov
+# Contributors: bartv
+# Date: 1999-11-01
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_HAL_SYNTH_I386 {
+ parent CYGPKG_HAL_SYNTH
+ display "Linux/i386 synthetic target"
+ description "
+ The Linux/i386 Synthetic Target HAL package provides the
+ support needed to run eCos binaries on top of the i386
+ Linux kernel."
+
+ include_dir cyg/hal
+ define_header hal_synth_i386.h
+ define_proc {
+ puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_synth_i386.h>"
+ }
+ # On the synthetic target the default main stack size is smaller than
+ # the recommended minimum from var_arch.h
+ requires { !CYGPKG_LIBC_STARTUP || CYGINT_LIBC_STARTUP_MAIN_NO_STACK_SIZE || (CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE >= (16 * 1024)) }
+
+ implements CYGINT_PROFILE_HAL_TIMER
+ implements CYGINT_PROFILE_HAL_MCOUNT
+
+ make {
+ <PREFIX>/lib/vectors.o : <PACKAGE>/src/vectors.S
+ $(CC) -Wp,-MD,vectors.tmp $(INCLUDE_PATH) $(CFLAGS) -c -o $@ $<
+ @echo $@ ": \\" > $(notdir $@).deps
+ @tail -n +2 vectors.tmp >> $(notdir $@).deps
+ @echo >> $(notdir $@).deps
+ @rm vectors.tmp
+ }
+ compile context.S syscall-i386-linux-1.0.S profile.c
+
+ cdl_component CYG_HAL_STARTUP {
+ display "Startup type"
+ flavor data
+ legal_values {"ROM"}
+ default_value {"ROM"}
+ no_define
+ define -file system.h CYG_HAL_STARTUP
+ description "
+ At the moment only ROM startup is supported. In the context
+ of the synthetic target this means a read-only region for
+ code and a read-write region for data."
+ }
+
+ cdl_component CYGBLD_GLOBAL_OPTIONS {
+ display "Global build options"
+ flavor none
+ parent CYGPKG_NONE
+ description "
+ Global build options including control over
+ compiler flags, linker flags and choice of toolchain."
+
+
+ cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
+ display "Global command prefix"
+ flavor data
+ no_define
+ if { ($tcl_platform(os) == "Linux") && [string match "i*86" $tcl_platform(machine)] } {
+ default_value { "" }
+ } else {
+ default_value { "i686-pc-linux-gnu" }
+ }
+ description "
+ This option specifies the command prefix used when
+ invoking the build tools. You must be using gcc-2.95.2 or
+ later, and \"ld -v\" must report a version more recent than
+ 2.9.1."
+ }
+
+ cdl_option CYGBLD_GLOBAL_CFLAGS {
+ display "Global compiler flags"
+ flavor data
+ no_define
+ default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
+ description "
+ This option controls the global compiler flags which
+ are used to compile all packages by
+ default. Individual packages may define
+ options which override these global flags."
+ }
+
+ cdl_option CYGBLD_GLOBAL_LDFLAGS {
+ display "Global linker flags"
+ flavor data
+ no_define
+ default_value { "-g -nostdlib -Wl,--gc-sections -Wl,-static" }
+ description "
+ This option controls the global linker flags. Individual
+ packages may define options which override these global flags."
+ }
+ }
+
+ cdl_component CYGHWR_MEMORY_LAYOUT {
+ display "Memory layout"
+ flavor data
+ no_define
+ calculated { "mlt_synth_i386_rom" }
+
+ cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
+ display "Memory layout linker script fragment"
+ flavor data
+ no_define
+ define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
+ calculated { "<pkgconf/mlt_synth_i386_rom.ldi>" }
+ }
+
+ cdl_option CYGHWR_MEMORY_LAYOUT_H {
+ display "Memory layout header file"
+ flavor data
+ no_define
+ define -file system.h CYGHWR_MEMORY_LAYOUT_H
+ calculated { "<pkgconf/mlt_synth_i386_rom.h>" }
+ }
+ }
+}
diff --git a/cesar/ecos/packages/hal/synth/i386linux/current/include/arch.inc b/cesar/ecos/packages/hal/synth/i386linux/current/include/arch.inc
new file mode 100644
index 0000000000..1ca01850d4
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/i386linux/current/include/arch.inc
@@ -0,0 +1,77 @@
+##=============================================================================
+##
+## arch.inc
+##
+## i386 assembler header file for the synthetic target
+##
+##=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+##=============================================================================
+#######DESCRIPTIONBEGIN####
+##
+## Author(s): jskov
+## Contributors:jskov, nickg, bartv
+## Date: 1999-01-20
+## Purpose: i386 definitions.
+## Description: This file contains various definitions and macros that are
+## useful for writing assembly code for the i386
+## Usage:
+## #include <cyg/hal/arch.inc>
+## ...
+##
+##
+######DESCRIPTIONEND####
+##
+##=============================================================================
+
+#------------------------------------------------------------------------------
+# Exception, interrupt and thread context save area layout
+# The layout of this structure is also defined in "hal_arch.h", for C
+# code. Do not change this without changing that (or vice versa).
+
+ # See SYSV ABI4, i386 supplement (page 37-38)
+ # http://www.sco.com/products/layered/develop/devspecs/abi386-4.pdf
+
+ # Callee save registers (eax, ecx, and edx are scratch registers)
+ .equ i386reg_esp, 0
+ .equ i386reg_next_context, 4 # only used when dropping through...
+ .equ i386reg_ebp, 8 # ...from switch_ to load_context.
+ .equ i386reg_ebx, 12
+ .equ i386reg_esi, 16
+ .equ i386reg_edi, 20
+ .equ i386reg_interrupts, 24
+ .equ i386reg_context_size, 28
+
+#------------------------------------------------------------------------------
+# end of arch.inc
diff --git a/cesar/ecos/packages/hal/synth/i386linux/current/include/basetype.h b/cesar/ecos/packages/hal/synth/i386linux/current/include/basetype.h
new file mode 100644
index 0000000000..97fb84d27b
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/i386linux/current/include/basetype.h
@@ -0,0 +1,82 @@
+#ifndef CYGONCE_HAL_BASETYPE_H
+#define CYGONCE_HAL_BASETYPE_H
+
+//=============================================================================
+//
+// basetype.h
+//
+// Standard types for x86 synthetic target.
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): proven
+// Contributors:proven
+// Date: 1998-10-02
+// Purpose: Define architecture base types.
+// Usage: Included by "cyg_type.h", do not use directly
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+//-----------------------------------------------------------------------------
+// Characterize the architecture
+
+#define CYG_BYTEORDER CYG_LSBFIRST // Little endian
+
+//-----------------------------------------------------------------------------
+// I386 does not usually use labels with underscores.
+
+//#define CYG_LABEL_NAME(_name_) _name_
+
+//-----------------------------------------------------------------------------
+// Override the alignment definitions from cyg_type.h. x86 requires
+// 32 *byte* alignment because gcc sometimes tries to be clever with
+// aligning things on cache lines.
+
+#define CYGARC_ALIGNMENT 32
+#define CYGARC_P2ALIGNMENT 5
+
+//-----------------------------------------------------------------------------
+// Define the standard variable sizes
+
+// The ix86 architecture uses the default definitions of the base types,
+// so we do not need to define any here.
+
+//-----------------------------------------------------------------------------
+#endif // CYGONCE_HAL_BASETYPE_H
+// End of basetype.h
diff --git a/cesar/ecos/packages/hal/synth/i386linux/current/include/pkgconf/mlt_synth_i386_rom.h b/cesar/ecos/packages/hal/synth/i386linux/current/include/pkgconf/mlt_synth_i386_rom.h
new file mode 100644
index 0000000000..1fe0c751c4
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/i386linux/current/include/pkgconf/mlt_synth_i386_rom.h
@@ -0,0 +1,20 @@
+// eCos memory layout - Fri Oct 20 08:40:39 2000
+
+// This is a generated file - do not edit
+
+#ifndef __ASSEMBLER__
+#include <cyg/infra/cyg_type.h>
+#include <stddef.h>
+
+#endif
+#define CYGMEM_REGION_rom (0x1000000)
+#define CYGMEM_REGION_rom_SIZE (0x800000)
+#define CYGMEM_REGION_rom_ATTR (CYGMEM_REGION_ATTR_R)
+#define CYGMEM_REGION_ram (0x2000000)
+#define CYGMEM_REGION_ram_SIZE (0x800000)
+#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
+#ifndef __ASSEMBLER__
+extern char CYG_LABEL_NAME (__heap1) [];
+#endif
+#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
+#define CYGMEM_SECTION_heap1_SIZE (0x2800000 - (size_t) CYG_LABEL_NAME (__heap1))
diff --git a/cesar/ecos/packages/hal/synth/i386linux/current/include/pkgconf/mlt_synth_i386_rom.ldi b/cesar/ecos/packages/hal/synth/i386linux/current/include/pkgconf/mlt_synth_i386_rom.ldi
new file mode 100644
index 0000000000..57ce1f999f
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/i386linux/current/include/pkgconf/mlt_synth_i386_rom.ldi
@@ -0,0 +1,31 @@
+// eCos memory layout - Fri Oct 20 08:40:39 2000
+
+// This is a generated file - do not edit
+
+#include <cyg/infra/cyg_type.inc>
+
+MEMORY
+{
+ rom : ORIGIN = 0x1000000, LENGTH = 0x800000
+ ram : ORIGIN = 0x2000000, LENGTH = 0x800000
+}
+
+SECTIONS
+{
+ SECTIONS_BEGIN
+ SECTION_vectors (rom, 0x1000000, LMA_EQ_VMA)
+ SECTION_text (rom, ALIGN (0x4), LMA_EQ_VMA)
+ SECTION_fini (rom, ALIGN (0x4), LMA_EQ_VMA)
+ SECTION_rodata1 (rom, ALIGN (0x8), LMA_EQ_VMA)
+ SECTION_rodata (rom, ALIGN (0x8), LMA_EQ_VMA)
+ SECTION_fixup (rom, ALIGN (0x4), LMA_EQ_VMA)
+ SECTION_RELOCS (rom, ALIGN (0x4), LMA_EQ_VMA)
+ SECTION_eh_frame (rom, ALIGN (0x4), LMA_EQ_VMA)
+ SECTION_rel__got (rom, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_gcc_except_table (rom, ALIGN (0x1), LMA_EQ_VMA)
+ SECTION_data (ram, 0x2000000, LMA_EQ_VMA)
+ SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA)
+ SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA)
+ CYG_LABEL_DEFN(__heap1) = ALIGN (0x10);
+ SECTIONS_END
+}
diff --git a/cesar/ecos/packages/hal/synth/i386linux/current/include/var_arch.h b/cesar/ecos/packages/hal/synth/i386linux/current/include/var_arch.h
new file mode 100644
index 0000000000..b3f31466cf
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/i386linux/current/include/var_arch.h
@@ -0,0 +1,212 @@
+#ifndef CYGONCE_HAL_VAR_ARCH_H
+#define CYGONCE_HAL_VAR_ARCH_H
+
+//=============================================================================
+//
+// var_arch.h
+//
+// Per-processor information such as processor save states.
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): proven
+// Contributors:proven, pjo, nickg,bartv
+// Date: 1998-10-05
+// Purpose: Define architecture abstractions
+// Usage: #include <cyg/hal/hal_arch.h>
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+
+#include <cyg/infra/cyg_type.h>
+
+//-----------------------------------------------------------------------------
+// Processor saved states. This structure is also defined in arch.inc for
+// assembly code. Do not change this without changing that (or vice versa).
+// Note: there is no need to worry about floating point contexts, see context.S
+
+typedef struct
+{
+ cyg_uint32 esp;
+ cyg_uint32 next_context; // only used when dropping through...
+ cyg_uint32 ebp; // ...from switch_ to load_context
+ cyg_uint32 ebx;
+ cyg_uint32 esi;
+ cyg_uint32 edi;
+ cyg_bool interrupts; // Are interrupts enabled for this thread?
+} HAL_SavedRegisters;
+
+
+//-----------------------------------------------------------------------------
+// Bit manipulation routines. These are provided by the processor variant
+// HAL to allow for processor-specific implementations.
+
+#define HAL_LSBIT_INDEX(index, mask) \
+CYG_MACRO_START \
+ asm volatile( "bsfl %1,%0\n" \
+ : "=r" (index) \
+ : "r" (mask) \
+ ); \
+CYG_MACRO_END
+
+#define HAL_MSBIT_INDEX(index, mask) \
+CYG_MACRO_START \
+ asm volatile( "bsrl %1,%0\n" \
+ : "=r" (index) \
+ : "r" (mask) \
+ ); \
+CYG_MACRO_END
+
+//-----------------------------------------------------------------------------
+// Context Initialization
+// Initialize the context of a thread.
+// Arguments:
+// _sp_ name of variable containing current sp, will be written with new sp
+// _thread_ thread object address, passed as argument to entry point
+// _entry_ entry point address.
+// _id_ bit pattern used in initializing registers, for debugging.
+
+#define HAL_THREAD_INIT_CONTEXT( _sparg_, _thread_, _entry_, _id_ ) \
+ CYG_MACRO_START \
+ register CYG_WORD* _sp_ = ((CYG_WORD*)((_sparg_) &~15)); \
+ register HAL_SavedRegisters *_regs_; \
+ \
+ /* The 'ret' executed at the end of hal_thread_load_context will */ \
+ /* use the last entry on the stack as a return pointer (_entry_). */ \
+ /* Cyg_HardwareThread::thread_entry expects one argument at stack */ \
+ /* offset 4 (_thread_). The (0xDEADBEEF) entry is the return addr */ \
+ /* for thread_entry (which is never used). */ \
+ *(--_sp_) = (CYG_WORD)(0); \
+ *(--_sp_) = (CYG_WORD)(0); \
+ *(--_sp_) = (CYG_WORD)(0); \
+ *(--_sp_) = (CYG_WORD)(0); \
+ *(--_sp_) = (CYG_WORD)(_thread_); \
+ *(--_sp_) = (CYG_WORD)(0); \
+ *(--_sp_) = (CYG_WORD)(_entry_); \
+ \
+ _regs_ = (HAL_SavedRegisters *) \
+ ((unsigned long)_sp_ - sizeof(HAL_SavedRegisters)); \
+ _regs_->esp = (CYG_WORD) _sp_; \
+ _regs_->ebx = (CYG_WORD)(_id_); \
+ _regs_->ebp = (CYG_WORD)(_id_); \
+ _regs_->esi = (CYG_WORD)(_id_); \
+ _regs_->edi = (CYG_WORD)(_id_); \
+ _regs_->interrupts = true; \
+ (_sparg_) = (CYG_ADDRESS) _regs_; \
+ CYG_MACRO_END
+
+//-----------------------------------------------------------------------------
+// Context switch macros.
+// The arguments are pointers to locations where the stack pointer
+// of the current thread is to be stored, and from where the sp of the
+// next thread is to be fetched.
+
+externC void hal_thread_switch_context( CYG_ADDRESS _to_, CYG_ADDRESS _from_ );
+externC void hal_thread_load_context( CYG_ADDRESS _to_ )
+ __attribute__ ((noreturn));
+
+#define HAL_THREAD_SWITCH_CONTEXT(_fspptr_,_tspptr_) \
+ hal_thread_switch_context((CYG_ADDRESS)_tspptr_,(CYG_ADDRESS)_fspptr_);
+
+#define HAL_THREAD_LOAD_CONTEXT(_tspptr_) \
+ hal_thread_load_context( (CYG_ADDRESS)_tspptr_ );
+
+//-----------------------------------------------------------------------------
+// HAL setjmp
+
+#define CYGARC_JMP_BUF_SP 0
+#define CYGARC_JMP_BUF_EBP 1
+#define CYGARC_JMP_BUF_EBX 2
+#define CYGARC_JMP_BUF_ESI 3
+#define CYGARC_JMP_BUF_EDI 4
+#define CYGARC_JMP_BUF_PC 5
+
+#define CYGARC_JMP_BUF_SIZE 6
+
+typedef cyg_uint32 hal_jmp_buf[CYGARC_JMP_BUF_SIZE];
+
+externC int hal_setjmp(hal_jmp_buf env);
+externC void hal_longjmp(hal_jmp_buf env, int val);
+
+//-----------------------------------------------------------------------------
+// Minimal and sensible stack sizes: the intention is that applications
+// will use these to provide a stack size in the first instance prior to
+// proper analysis. Idle thread stack should be this big.
+
+// THESE ARE NOT INTENDED TO BE MICROMETRICALLY ACCURATE FIGURES.
+// THEY ARE HOWEVER ENOUGH TO START PROGRAMMING.
+// YOU MUST MAKE YOUR STACKS LARGER IF YOU HAVE LARGE "AUTO" VARIABLES!
+
+// This is not a config option because it should not be adjusted except
+// under "enough rope" sort of disclaimers.
+
+// Stack frame overhead per call. 3 local registers (edi, esi, ebx) and
+// return address.
+#define CYGNUM_HAL_STACK_FRAME_SIZE (4 * 4)
+
+// Stack needed for a context switch (i386reg_context_size from i386.inc)
+#define CYGNUM_HAL_STACK_CONTEXT_SIZE (4 * 24)
+
+// Interrupt stack size. Interrupts are handled by signals so the relevant
+// data is MINSIGSTKSIZE (see man sigaltstack) or 2048. Given the
+// multiplier *15 for STACK_SIZE_MINIMUM, this should be adequate.
+#define CYGNUM_HAL_STACK_INTERRUPT_SIZE 2048
+
+// We define a minimum stack size as the minimum any thread could ever
+// legitimately get away with. We can throw asserts if users ask for less
+// than this. Allow enough for three interrupt sources - clock, serial and
+// one other
+//
+// On the synthetic target memory is cheap so comparatively large stacks
+// are possible. This avoids stack overflow problems when working with
+// the synthetic target, although arguably the problem is now deferred to
+// when the application is moved to real hardware where it will be more
+// difficult to track down.
+#define CYGNUM_HAL_STACK_SIZE_MINIMUM (16 * 1024)
+#define CYGNUM_HAL_STACK_SIZE_TYPICAL (32 * 1024)
+
+//--------------------------------------------------------------------------
+// Macros for switching context between two eCos instances (jump from
+// code in ROM to code in RAM or vice versa).
+#define CYGARC_HAL_SAVE_GP()
+#define CYGARC_HAL_RESTORE_GP()
+
+//--------------------------------------------------------------------------
+#endif // CYGONCE_HAL_VAR_ARCH_H
+// End of var_arch.h
diff --git a/cesar/ecos/packages/hal/synth/i386linux/current/include/var_intr.h b/cesar/ecos/packages/hal/synth/i386linux/current/include/var_intr.h
new file mode 100644
index 0000000000..2d729b487e
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/i386linux/current/include/var_intr.h
@@ -0,0 +1,76 @@
+#ifndef CYGONCE_HAL_VAR_INTR_H
+#define CYGONCE_HAL_VAR_INTR_H
+
+//=============================================================================
+//
+// var_intr.h
+//
+// Processor-specific interrupt support
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2005 eCosCentric Ltd.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Date: 2005-06-26
+// Usage: #include <cyg/hal/hal_intr.h>
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+// The architectural HAL provides the bogomips rating. This is an
+// outer loop for the number of us and an inner loop for 1us. The
+// alignment of the inner loop can greatly affect performance. The
+// *16 of the bogomips rating seems to give about the right results
+// on a range of hardware.
+#define HAL_DELAY_US(_us_) \
+ CYG_MACRO_START \
+ asm volatile ( \
+ "1:\n" \
+ "movl %2,%1\n" \
+ "sal $0x4,%1\n" \
+ ".align 16\n" \
+ "2:\n" \
+ "decl %1\n" \
+ "jns 2b\n" \
+ "decl %0\n" \
+ "jns 1b\n" \
+ : \
+ : "r" (_us_), "r" (0), "g" (hal_bogomips+1) \
+ : "cc"); \
+ CYG_MACRO_END
+
+
+//--------------------------------------------------------------------------
+#endif // CYGONCE_HAL_VAR_INTR_H
+// End of var_intr.h
diff --git a/cesar/ecos/packages/hal/synth/i386linux/current/include/var_io.h b/cesar/ecos/packages/hal/synth/i386linux/current/include/var_io.h
new file mode 100644
index 0000000000..011892a15b
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/i386linux/current/include/var_io.h
@@ -0,0 +1,101 @@
+#ifndef CYGONCE_HAL_VAR_IO_H
+#define CYGONCE_HAL_VAR_IO_H
+
+//=============================================================================
+//
+// var_io.h
+//
+// Processor-specific I/O support
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003, 2005 eCosCentric Ltd
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Date: 2003-10-08
+// Usage: #include <cyg/hal/hal_io.h>
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/infra/cyg_type.h>
+
+// In theory an application signal handler can just return straight to
+// the kernel. In reality this is usually the case as well, but with
+// some kernel versions on some processors it is necessary instead to
+// exit via a sigreturn system call.
+externC void cyg_hal_sys_restore(void);
+externC void cyg_hal_sys_restore_rt(void);
+
+#define CYG_HAL_SYS_SIGACTION_ADJUST(_sig_, _sigaction_) \
+ CYG_MACRO_START \
+ (_sigaction_)->hal_flags |= CYG_HAL_SYS_SA_RESTORER; \
+ (_sigaction_)->hal_restorer = &cyg_hal_sys_restore; \
+ CYG_MACRO_END
+
+// Additional information passed to a signal handler. This is useful
+// for e.g. profiling.
+struct cyg_hal_sys_sigcontext {
+ unsigned short hal_gs;
+ unsigned short hal_gsh;
+ unsigned short hal_fs;
+ unsigned short hal_fsh;
+ unsigned short hal_es;
+ unsigned short hal_esh;
+ unsigned short hal_ds;
+ unsigned short hal_dsh;
+ unsigned long hal_edi;
+ unsigned long hal_esi;
+ unsigned long hal_ebp;
+ unsigned long hal_esp;
+ unsigned long hal_ebx;
+ unsigned long hal_edx;
+ unsigned long hal_ecx;
+ unsigned long hal_eax;
+ unsigned long hal_trapno;
+ unsigned long hal_err;
+ unsigned long hal_eip;
+ unsigned short hal_cs;
+ unsigned short hal_csh;
+ unsigned long hal_eflags;
+ unsigned long hal_esp_at_signal;
+ unsigned short hal_ss;
+ unsigned short hal_ssh;
+ void* hal_fpstate;
+ unsigned long hal_oldmask;
+ unsigned long hal_cr2;
+};
+
+//--------------------------------------------------------------------------
+#endif // CYGONCE_HAL_VAR_IO_H
+// End of var_io.h
diff --git a/cesar/ecos/packages/hal/synth/i386linux/current/src/context.S b/cesar/ecos/packages/hal/synth/i386linux/current/src/context.S
new file mode 100644
index 0000000000..685c755b47
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/i386linux/current/src/context.S
@@ -0,0 +1,224 @@
+##=============================================================================
+##
+## context.S
+##
+## x86 thread context manipulation.
+##
+##=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+##=============================================================================
+#######DESCRIPTIONBEGIN####
+##
+## Author(s): jskov
+## Contributors:jskov, pjo, nickg, bartv
+## Date: 1999-03-11
+## Purpose: CPU-specific code
+## Description: This file contains the code needed to manage the
+## CPU on an i386/Linux synthetic target.
+##
+######DESCRIPTIONEND####
+##
+##=============================================================================
+
+#include <cyg/hal/arch.inc>
+
+#------------------------------------------------------------------------------
+# function declaration macro
+
+#define FUNC_START(name) \
+ .globl name; \
+name:
+
+#------------------------------------------------------------------------------
+# Context switch and setjmp/longjmp support.
+# Based on PowerPC context.S, using data from SYSV ABI4, i386
+# supplement (page 37-38)
+# http://www.sco.com/products/layered/develop/devspecs/abi386-4.pdf
+#
+# There is no need to worry about saving floating point context. If
+# a switch occurs because of an interrupt/signal, the system will have
+# saved the fpu state already before the signal handler was invoked,
+# and the state will be returned when the signal handler returns i.e.
+# when the interrupted thread is reactivated. If a context switch is
+# voluntary, for example a call to cyg_thread_yield(), then according
+# to the calling conventions all fpu registers are CALL_USED_REGISTERS
+# (gcc/config/i386/i386.h) and will have been saved by the calling
+# code.
+#
+# FIXME: it may be appropriate to match eCos thread contexts
+# more closely onto Linux sigcontexts - that might facilitate
+# thread-aware debugging.
+
+# hal_thread_switch_context
+# Switch thread contexts
+# : 0(%esp) : return address
+# : 4(%esp) : address of sp of next thread to execute
+# : 8(%esp) : address of sp save location of current thread
+#
+# %eax, %ecx, and %edx are ours to abuse.
+
+ .extern hal_interrupts_enabled
+ .extern hal_enable_interrupts
+
+FUNC_START(hal_thread_switch_context)
+ movl 4(%esp),%eax # next context ptr
+ movl 8(%esp),%edx # this context ptr
+
+ # Make room on the stack for the context
+ movl %esp,%ecx # keep original SP
+ sub $i386reg_context_size,%esp
+
+ # Save next context ptr in this context. Necessary because
+ # hal_thread_load_context expects to find the ptr on the stack,
+ # not in a register as on PPC.
+ movl %eax,i386reg_next_context(%esp)
+
+ # Save registers
+ movl %ecx,i386reg_esp(%esp) # original esp
+ movl %ebp,i386reg_ebp(%esp)
+ movl %ebx,i386reg_ebx(%esp)
+ movl %esi,i386reg_esi(%esp)
+ movl %edi,i386reg_edi(%esp)
+
+ # And interrupt state
+ movl hal_interrupts_enabled,%eax
+ movl %eax,i386reg_interrupts(%esp)
+
+ # Store the context ptr
+ movl %esp,(%edx)
+
+ # Now fall through to hal_thread_load_context
+
+
+#------------------------------------------------------------------------------
+# hal_thread_load_context
+# Load thread context
+# : 4(%esp) = i386reg_next_context(%esp) = address of sp of thread to execute
+# Note that this function is also the second half of hal_thread_switch_context
+# and is simply dropped into from it.
+#
+# %eax, %ecx, and %edx are ours to abuse.
+
+FUNC_START(hal_thread_load_context)
+
+ movl i386reg_next_context(%esp),%eax # get new context ptr
+ movl (%eax),%eax
+
+ # Restore registers
+ movl i386reg_ebp(%eax),%ebp
+ movl i386reg_ebx(%eax),%ebx
+ movl i386reg_esi(%eax),%esi
+ movl i386reg_edi(%eax),%edi
+ movl i386reg_esp(%eax),%esp
+
+ # And see what needs to happen about interrupts
+ movl i386reg_interrupts(%eax),%eax
+ cmpl hal_interrupts_enabled,%eax
+ je interrupts_ok
+
+ # The saved interrupt state differs from the current one.
+ # If interrupts are supposed to be enabled then invoke
+ # hal_enable_interrupts. That can be done as a tail call.
+ # If interrupts are supposed to be disabled then just
+ # update the global variable.
+ cmpl $0,%eax
+ jne hal_enable_interrupts
+ movl %eax,hal_interrupts_enabled
+
+interrupts_ok:
+ ret
+
+
+#------------------------------------------------------------------------------
+# HAL longjmp, setjmp implementations
+# hal_setjmp saves only to callee save registers ebp, ebx, esi, edi and
+# and esp+pc into buffer supplied in 4(esp)
+# Note: These definitions are repeated in hal_arch.h. If changes are required
+# remember to update both sets.
+
+#define CYGARC_JMP_BUF_SP 0
+#define CYGARC_JMP_BUF_EBP 1
+#define CYGARC_JMP_BUF_EBX 2
+#define CYGARC_JMP_BUF_ESI 3
+#define CYGARC_JMP_BUF_EDI 4
+#define CYGARC_JMP_BUF_PC 5
+
+#define CYGARC_JMP_BUF_SIZE 6
+
+FUNC_START(hal_setjmp)
+ # Get jmpbuf pointer
+ movl 4(%esp),%eax
+
+ # Save regular registers
+ movl %ebp,CYGARC_JMP_BUF_EBP*4(%eax)
+ movl %ebx,CYGARC_JMP_BUF_EBX*4(%eax)
+ movl %esi,CYGARC_JMP_BUF_ESI*4(%eax)
+ movl %edi,CYGARC_JMP_BUF_EDI*4(%eax)
+
+ # Stack and PC
+ movl %esp,CYGARC_JMP_BUF_SP*4(%eax)
+ movl 0(%esp),%edx
+ movl %edx,CYGARC_JMP_BUF_PC*4(%eax)
+
+ # Return 0
+ xor %eax,%eax
+ ret
+
+
+# hal_longjmp loads state from 4(esp) and returns to PC stored in state
+
+FUNC_START(hal_longjmp)
+ # Get return value
+ movl 8(%esp),%eax
+
+ # Get jmpbuf pointer
+ movl 4(%esp),%ecx
+
+ # Restore regular registers
+ movl CYGARC_JMP_BUF_EBP*4(%ecx),%ebp
+ movl CYGARC_JMP_BUF_EBX*4(%ecx),%ebx
+ movl CYGARC_JMP_BUF_ESI*4(%ecx),%esi
+ movl CYGARC_JMP_BUF_EDI*4(%ecx),%edi
+
+ # Restore stack pointer
+ movl CYGARC_JMP_BUF_SP*4(%ecx),%esp
+
+ # Put return address on stack
+ movl CYGARC_JMP_BUF_PC*4(%ecx),%edx
+ movl %edx,0(%esp)
+
+ ret
+
+#------------------------------------------------------------------------------
+# end of linux.S
diff --git a/cesar/ecos/packages/hal/synth/i386linux/current/src/profile.c b/cesar/ecos/packages/hal/synth/i386linux/current/src/profile.c
new file mode 100644
index 0000000000..752a3984f5
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/i386linux/current/src/profile.c
@@ -0,0 +1,182 @@
+//=============================================================================
+//
+// profile.c
+//
+// Support for profiling on x86 synthetic target
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003, 2005 eCosCentric Ltd
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 2003-10-12
+//
+//####DESCRIPTIONEND####
+//=============================================================================
+
+#include <pkgconf/system.h>
+#ifdef CYGPKG_PROFILE_GPROF
+#include <pkgconf/hal_synth.h>
+#include <pkgconf/hal_synth_i386.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/hal/hal_io.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/profile/profile.h>
+
+#if 1
+// Profiling support.
+//
+// The profile timer uses the ITIMER_PROF, which means we get a SIGPROF
+// signal at the desired rate. The signal handler can obtain the address
+// of the interrupted code via a sigcontext structure. The contents of
+// the sigcontext structure and exactly how it gets passed to the signal
+// handler depends on the architecture, hence this code is x86-specific.
+//
+// The results of this profiling code seem a lot poorer than on other
+// targets, but it is not clear why. There may be some subtle
+// interaction between the system and profiling clocks.
+static void
+synth_prof_sighandler(int sig, struct cyg_hal_sys_sigcontext context)
+{
+ __profile_hit((CYG_ADDRWORD) context.hal_eip);
+ CYG_UNUSED_PARAM(int, sig);
+}
+
+int
+hal_enable_profile_timer(int resolution)
+{
+ struct cyg_hal_sys_sigaction action;
+ struct cyg_hal_sys_sigset_t mask;
+ struct cyg_hal_sys_itimerval timer;
+
+ // We want profiling to be an atomic operation. __profile_hit() is
+ // a very simple function which should return quickly, and there
+ // is no need for a DSR or context switching. Hence everything
+ // including SIGIO and SIGALRM are blocked, effectively giving the
+ // profiling timer the highest priority.
+ action.hal_mask = 0xffffffff;
+ action.hal_flags = CYG_HAL_SYS_SA_RESTORER;
+ action.hal_handler = (void (*)(int)) &synth_prof_sighandler;
+ action.hal_restorer = &cyg_hal_sys_restore;
+
+ if (0 != cyg_hal_sys_sigaction(CYG_HAL_SYS_SIGPROF, &action, (struct cyg_hal_sys_sigaction*) 0)) {
+ CYG_FAIL("Failed to install signal handler for SIGPROF");
+ }
+
+ // The resolution is limited by the underlying 100Hz system clock,
+ // there is no hardware timer which can generate faster clock
+ // interrupts.
+ if (resolution < 10000) {
+ resolution = 10000;
+ } else {
+ resolution = (resolution + 5000) / 10000;
+ resolution *= 10000;
+ }
+ timer.hal_it_interval.hal_tv_sec = 0;
+ timer.hal_it_interval.hal_tv_usec = resolution;
+ timer.hal_it_value.hal_tv_sec = 0;
+ timer.hal_it_value.hal_tv_usec = resolution;
+ if (0 != cyg_hal_sys_setitimer(CYG_HAL_SYS_ITIMER_PROF, &timer, (struct cyg_hal_sys_itimerval*) 0)) {
+ CYG_FAIL("Failed to initialize the profiling itimer");
+ }
+
+ // Now unblock SIGPROF
+ CYG_HAL_SYS_SIGEMPTYSET(&mask);
+ CYG_HAL_SYS_SIGADDSET(&mask, CYG_HAL_SYS_SIGPROF);
+ if (0 != cyg_hal_sys_sigprocmask(CYG_HAL_SYS_SIG_UNBLOCK, &mask, (cyg_hal_sys_sigset_t*)0)) {
+ CYG_FAIL("Failed to unblock SIGPROF");
+ }
+
+ return resolution;
+}
+
+#else
+
+// An alternative implementation that overloads the SIGALRM handler
+// rather than using SIGPROF. It does not seem to work any better.
+static void (*synth_profile_old_alrm_sighandler)(int);
+
+static void
+synth_profile_alrm_sighandler(int sig, struct cyg_hal_sys_sigcontext context)
+{
+ __profile_hit((CYG_ADDRWORD) context.hal_eip);
+ (*synth_profile_old_alrm_sighandler)(sig);
+}
+
+int
+hal_enable_profile_timer(int resolution)
+{
+ struct cyg_hal_sys_sigaction action;
+
+ if (0 != cyg_hal_sys_sigaction(CYG_HAL_SYS_SIGALRM, (const struct cyg_hal_sys_sigaction*)0, &action)) {
+ CYG_FAIL("Failed to retrieve old signal handler for SIGALRM");
+ }
+ synth_profile_old_alrm_sighandler = action.hal_handler;
+ action.hal_handler = (void (*)(int)) &synth_profile_alrm_sighandler;
+ if (0 != cyg_hal_sys_sigaction(CYG_HAL_SYS_SIGALRM, &action, (struct cyg_hal_sys_sigaction*)0)) {
+ CYG_FAIL("Failed to install new signal handler for SIGALRM");
+ }
+
+ return CYGNUM_HAL_RTC_PERIOD;
+}
+
+#endif
+
+// mcount() can be implemented largely using compiler built-ins. However
+// there are two complications. The generic profiling code assumes
+// __profile_mcount() is called with interrupts disabled. Blocking interrupts
+// won't stop the low-level signal handlers, so mcount() calls from those
+// may get lost because of the nesting test but that is fairly harmless.
+// Those signal handlers will complete before control returns here, i.e.
+// we have strict nesting, so there is no risk of the nested flag remaining
+// set while a context switch occurs. Also if eCos itself is built with
+// -pg then the compiler will insert a recursive call to mcount(), and
+// we have to guard against that.
+void
+mcount(void)
+{
+ static int nested = 0;
+ int enabled;
+
+ HAL_DISABLE_INTERRUPTS(enabled);
+ if (!nested) {
+ nested = 1;
+ __profile_mcount((CYG_ADDRWORD)__builtin_return_address(1),
+ (CYG_ADDRWORD)__builtin_return_address(0));
+ nested = 0;
+ }
+ HAL_RESTORE_INTERRUPTS(enabled);
+}
+
+#endif
diff --git a/cesar/ecos/packages/hal/synth/i386linux/current/src/syscall-i386-linux-1.0.S b/cesar/ecos/packages/hal/synth/i386linux/current/src/syscall-i386-linux-1.0.S
new file mode 100644
index 0000000000..38f39d0da4
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/i386linux/current/src/syscall-i386-linux-1.0.S
@@ -0,0 +1,469 @@
+//=============================================================================
+//
+// syscall-i386-linux-1.0.S
+//
+// Linux system call interface functions for i386.
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2005 eCosCentric Ltd.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): proven
+// Contributors:proven,bartv
+// Date: 1998-10-06
+// Description: Machine dependent syscalls for i386/i486/i586
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+// The numbers come from <asm/unistd.h>
+#define SYS_setup 0 // Used only by init, to get system going.
+#define SYS_exit 1
+#define SYS_fork 2
+#define SYS_read 3
+#define SYS_write 4
+#define SYS_open 5
+#define SYS_close 6
+#define SYS_waitpid 7
+#define SYS_creat 8
+#define SYS_link 9
+#define SYS_unlink 10
+#define SYS_execve 11
+#define SYS_chdir 12
+#define SYS_time 13
+#define SYS_prev_mknod 14
+#define SYS_chmod 15
+#define SYS_lchown 16
+#define SYS_break 17
+#define SYS_oldstat 18
+#define SYS_lseek 19
+#define SYS_getpid 20
+#define SYS_mount 21
+#define SYS_umount 22
+#define SYS_setuid 23
+#define SYS_getuid 24
+#define SYS_stime 25
+#define SYS_ptrace 26
+#define SYS_alarm 27
+#define SYS_oldfstat 28
+#define SYS_pause 29
+#define SYS_utime 30
+#define SYS_stty 31
+#define SYS_gtty 32
+#define SYS_access 33
+#define SYS_nice 34
+#define SYS_ftime 35
+#define SYS_sync 36
+#define SYS_kill 37
+#define SYS_rename 38
+#define SYS_mkdir 39
+#define SYS_rmdir 40
+#define SYS_dup 41
+#define SYS_pipe 42
+#define SYS_times 43
+#define SYS_prof 44
+#define SYS_brk 45
+#define SYS_setgid 46
+#define SYS_getgid 47
+#define SYS_signal 48
+#define SYS_geteuid 49
+#define SYS_getegid 50
+#define SYS_acct 51
+#define SYS_phys 52
+#define SYS_lock 53
+#define SYS_ioctl 54
+#define SYS_fcntl 55
+#define SYS_mpx 56
+#define SYS_setpgid 57
+#define SYS_ulimit 58
+#define SYS_oldolduname 59
+#define SYS_umask 60
+#define SYS_chroot 61
+#define SYS_prev_ustat 62
+#define SYS_dup2 63
+#define SYS_getppid 64
+#define SYS_getpgrp 65
+#define SYS_setsid 66
+#define SYS_sigaction 67
+#define SYS_siggetmask 68
+#define SYS_sigsetmask 69
+#define SYS_setreuid 70
+#define SYS_setregid 71
+#define SYS_sigsuspend 72
+#define SYS_sigpending 73
+#define SYS_sethostname 74
+#define SYS_setrlimit 75
+#define SYS_getrlimit 76
+#define SYS_getrusage 77
+#define SYS_gettimeofday 78
+#define SYS_settimeofday 79
+#define SYS_getgroups 80
+#define SYS_setgroups 81
+#define SYS_select 82
+#define SYS_symlink 83
+#define SYS_oldlstat 84
+#define SYS_readlink 85
+#define SYS_uselib 86
+#define SYS_swapon 87
+#define SYS_reboot 88
+#define SYS_readdir 89
+#define SYS_mmapx 90
+#define SYS_munmap 91
+#define SYS_truncate 92
+#define SYS_ftruncate 93
+#define SYS_fchmod 94
+#define SYS_fchown 95
+#define SYS_getpriority 96
+#define SYS_setpriority 97
+#define SYS_profil 98
+#define SYS_statfs 99
+#define SYS_fstatfs 100
+#define SYS_ioperm 101
+#define SYS_socketcall 102
+#define SYS_klog 103
+#define SYS_setitimer 104
+#define SYS_getitimer 105
+#define SYS_prev_stat 106
+#define SYS_prev_lstat 107
+#define SYS_prev_fstat 108
+#define SYS_olduname 109
+#define SYS_iopl 110
+#define SYS_vhangup 111
+#define SYS_idle 112
+#define SYS_vm86old 113
+#define SYS_wait4 114
+#define SYS_swapoff 115
+#define SYS_sysinfo 116
+#define SYS_ipc 117
+#define SYS_fsync 118
+#define SYS_sigreturn 119
+#define SYS_clone 120
+#define SYS_setdomainname 121
+#define SYS_uname 122
+#define SYS_modify_ldt 123
+#define SYS_adjtimex 124
+#define SYS_mprotect 125
+#define SYS_sigprocmask 126
+#define SYS_create_module 127
+#define SYS_init_module 128
+#define SYS_delete_module 129
+#define SYS_get_kernel_syms 130
+#define SYS_quotactl 131
+#define SYS_getpgid 132
+#define SYS_fchdir 133
+#define SYS_bdflush 134
+#define SYS_sysfs 135
+#define SYS_personality 136
+#define SYS_afs_syscall 137 // Syscall for Andrew File System
+#define SYS_setfsuid 138
+#define SYS_setfsgid 139
+#define SYS__llseek 140
+#define SYS_getdents 141
+#define SYS__newselect 142
+#define SYS_flock 143
+#define SYS_syscall_flock 143
+#define SYS_msync 144
+#define SYS_readv 145
+#define SYS_syscall_readv 145
+#define SYS_writev 146
+#define SYS_syscall_writev 146
+#define SYS_getsid 147
+#define SYS_fdatasync 148
+#define SYS__sysctl 149
+#define SYS_mlock 150
+#define SYS_munlock 151
+#define SYS_mlockall 152
+#define SYS_munlockall 153
+#define SYS_sched_setparam 154
+#define SYS_sched_getparam 155
+#define SYS_sched_setscheduler 156
+#define SYS_sched_getscheduler 157
+#define SYS_sched_yield 158
+#define SYS_sched_get_priority_max 159
+#define SYS_sched_get_priority_min 160
+#define SYS_sched_rr_get_interval 161
+#define SYS_nanosleep 162
+#define SYS_mremap 163
+#define SYS_setresuid 164
+#define SYS_getresuid 165
+#define SYS_vm86 166
+#define SYS_query_module 167
+#define SYS_poll 168
+#define SYS_nfsservctl 169
+#define SYS_setresgid 170
+#define SYS_getresgid 171
+#define SYS_prctl 172
+#define SYS_rt_sigreturn 173
+#define SYS_rt_sigaction 174
+#define SYS_rt_sigprocmask 175
+#define SYS_rt_sigpending 176
+#define SYS_rt_sigtimedwait 177
+#define SYS_rt_sigqueueinfo 178
+#define SYS_rt_sigsuspend 179
+#define SYS_pread 180
+#define SYS_pwrite 181
+#define SYS_chown 182
+#define SYS_getcwd 183
+#define SYS_capget 184
+#define SYS_capset 185
+#define SYS_sigaltstack 186
+#define SYS_sendfile 187
+#define SYS_getpmsg 188
+#define SYS_putpmsg 189
+#define SYS_vfork 190
+#define SYS_ugetrlimit 191
+#define SYS_mmap2 192
+#define SYS_truncate64 193
+#define SYS_ftruncate64 194
+#define SYS_stat64 195
+#define SYS_lstat64 196
+#define SYS_fstat64 197
+#define SYS_lchown32 198
+#define SYS_getuid32 199
+#define SYS_getgid32 200
+#define SYS_geteuid32 201
+#define SYS_getegid32 202
+#define SYS_setreuid32 203
+#define SYS_setregid32 204
+#define SYS_getgroups32 205
+#define SYS_setgroups32 206
+#define SYS_fchown32 207
+#define SYS_setresuid32 208
+#define SYS_getresuid32 209
+#define SYS_setresgid32 210
+#define SYS_getresgid32 211
+#define SYS_chown32 212
+#define SYS_setuid32 213
+#define SYS_setgid32 214
+#define SYS_setfsuid32 215
+#define SYS_setfsgid32 216
+#define SYS_pivot_root 217
+#define SYS_mincore 218
+#define SYS_madvise 219
+#define SYS_madvise1 219
+#define SYS_getdents64 220
+#define SYS_fcntl64 221
+
+
+#define NAME(X) cyg_hal_sys_##X
+#define END(X) 1: ; .type NAME(X),@function ; .size NAME(X),1b - NAME(X)
+
+#define SYSCALL0(x) \
+ .globl NAME(x) ; \
+ \
+NAME(x): \
+ \
+ push %ebx; \
+ lea SYS_##x, %eax; \
+ int $0x80; \
+ pop %ebx; \
+ ret; \
+ \
+ END(x)
+
+#define SYSCALL1(x) \
+ .globl NAME(x) ; \
+ \
+NAME(x): \
+ \
+ push %ebx; \
+ mov 8(%esp), %ebx; \
+ lea SYS_##x, %eax; \
+ int $0x80; \
+ pop %ebx; \
+ ret; \
+ \
+ END(x)
+
+#define SYSCALL2(x) \
+ .globl NAME(x) ; \
+ \
+NAME(x): \
+ \
+ push %ebx; \
+ mov 8(%esp), %ebx; \
+ mov 12(%esp), %ecx; \
+ lea SYS_##x, %eax; \
+ int $0x80; \
+ pop %ebx; \
+ ret; \
+ \
+ END(x)
+
+#define STATCALL2(x) \
+ .globl NAME(x) ; \
+ \
+NAME(x): \
+ \
+ push %ebx; \
+ mov 8(%esp), %ebx; \
+ mov 12(%esp), %ecx; \
+ lea SYS_prev_##x, %eax; \
+ int $0x80; \
+ pop %ebx; \
+ ret; \
+ END(x)
+
+#define SYSCALL3(x) \
+ .globl NAME(x) ; \
+ \
+NAME(x): \
+ \
+ push %ebx; \
+ mov 8(%esp), %ebx; \
+ mov 12(%esp), %ecx; \
+ mov 16(%esp), %edx; \
+ lea SYS_##x, %eax; \
+ int $0x80; \
+ pop %ebx; \
+ ret; \
+ END(x)
+
+
+#define SYSCALL4(x) \
+ .globl NAME(x) ; \
+ \
+NAME(x): \
+ \
+ push %ebx; \
+ push %esi; \
+ mov 12(%esp), %ebx; \
+ mov 16(%esp), %ecx; \
+ mov 20(%esp), %edx; \
+ mov 24(%esp), %esi; \
+ lea SYS_##x, %eax; \
+ int $0x80; \
+ pop %esi; \
+ pop %ebx; \
+ ret; \
+ END(x)
+
+#define SYSCALL5(x) \
+ .globl NAME(x) ; \
+ \
+NAME(x): \
+ \
+ push %ebx; \
+ push %esi; \
+ push %edi; \
+ mov 16(%esp), %ebx; \
+ mov 20(%esp), %ecx; \
+ mov 24(%esp), %edx; \
+ mov 28(%esp), %esi; \
+ mov 32(%esp), %edi; \
+ lea SYS_##x, %eax; \
+ int $0x80; \
+ pop %edi; \
+ pop %esi; \
+ pop %ebx; \
+ ret; \
+ END(x)
+
+
+//==========================================================================
+// Initial asm stuff for all functions.
+ .text
+ .align 2
+
+SYSCALL1(exit)
+SYSCALL0(fork)
+SYSCALL3(read)
+SYSCALL3(write)
+SYSCALL3(open)
+SYSCALL1(close)
+SYSCALL3(waitpid)
+SYSCALL2(creat)
+SYSCALL2(link)
+SYSCALL1(unlink)
+SYSCALL3(execve)
+SYSCALL1(chdir)
+SYSCALL1(time)
+SYSCALL2(chmod)
+SYSCALL3(lseek)
+SYSCALL0(getpid)
+SYSCALL0(getuid)
+SYSCALL1(nice)
+SYSCALL2(kill)
+SYSCALL1(dup)
+SYSCALL1(pipe)
+SYSCALL1(brk)
+SYSCALL3(ioctl)
+SYSCALL3(fcntl)
+SYSCALL1(chroot)
+SYSCALL2(dup2)
+SYSCALL3(sigaction)
+SYSCALL2(gettimeofday)
+SYSCALL1(mmapx)
+SYSCALL2(socketcall)
+SYSCALL3(setitimer)
+SYSCALL3(sigprocmask)
+SYSCALL5(_newselect)
+SYSCALL3(readv)
+SYSCALL3(writev)
+SYSCALL1(fdatasync)
+SYSCALL2(getcwd)
+SYSCALL2(access)
+SYSCALL3(readdir)
+STATCALL2(lstat)
+STATCALL2(fstat)
+SYSCALL2(mkdir)
+SYSCALL5(ipc)
+
+// ----------------------------------------------------------------------------
+// Special support for returning from a signal handler. In theory no special
+// action is needed, but with some versions of the kernel on some
+// architectures that is not good enough. Instead returning has to happen
+// via another system call.
+
+ .align 16
+ .global cyg_hal_sys_restore_rt
+cyg_hal_sys_restore_rt:
+ movl $SYS_rt_sigreturn, %eax
+ int $0x80
+1:
+ .type __restore_rt,@function
+ .size __restore_rt,1b - __restore_rt
+
+ .align 8
+ .global cyg_hal_sys_restore
+cyg_hal_sys_restore:
+ popl %eax
+ movl $SYS_sigreturn, %eax
+ int $0x80
+1:
+ .type __restore,@function
+ .size __restore,1b - __restore
diff --git a/cesar/ecos/packages/hal/synth/i386linux/current/src/vectors.S b/cesar/ecos/packages/hal/synth/i386linux/current/src/vectors.S
new file mode 100644
index 0000000000..b60935135a
--- /dev/null
+++ b/cesar/ecos/packages/hal/synth/i386linux/current/src/vectors.S
@@ -0,0 +1,102 @@
+##=============================================================================
+##
+## vectors.S
+##
+## x86 exception vectors
+##
+##=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+##=============================================================================
+#######DESCRIPTIONBEGIN####
+##
+## Author(s): bartv
+## Contributors:bartv
+## Date: 2001-03-16
+## Purpose: Synthetic target startup
+## Description: When running on real hardware vectors.S contains
+## initialization code and usually the low-level interrupt and
+## exception support. On the synthetic target the latter is
+## handled by C code. The main initialization that is needed is
+## to jump into the C startup.
+##
+######DESCRIPTIONEND####
+##
+##=============================================================================
+
+# According the SVR4/i386 ABI, most registers are undefined. However
+# there is some interesting information on the stack:
+# %esp argc
+# %esp+4 argv[0]
+# ... argv[1 onwards]
+# %esp + (argc*4) NULL
+# ... environ[0]
+# ... ...
+# ... NULL
+#
+# There are some other things that could be done, for example aligning
+# the stack to a 16-byte boundary for SSE, but it is not clear which of
+# those things are actually useful. The glibc source file
+# sysdeps/i386/elf/start.S contains some relevant information.
+
+#==============================================================================
+
+ .file "vectors.S"
+
+ .extern _linux_entry
+
+ .data
+ .global cyg_hal_sys_argc
+cyg_hal_sys_argc:
+ .long 0
+ .global cyg_hal_sys_argv
+cyg_hal_sys_argv:
+ .long 0
+ .global cyg_hal_sys_environ
+cyg_hal_sys_environ:
+ .long 0
+
+ .text
+ .globl _start
+_start:
+ popl %eax
+ movl %eax, cyg_hal_sys_argc
+ movl %esp, %ebx
+ movl %ebx, cyg_hal_sys_argv
+ inc %eax
+ addl %eax, %eax
+ addl %eax, %eax
+ addl %eax, %ebx
+ movl %ebx, cyg_hal_sys_environ
+
+ jmp _linux_entry
diff --git a/cesar/ecos/packages/infra/current/ChangeLog b/cesar/ecos/packages/infra/current/ChangeLog
new file mode 100644
index 0000000000..e5bbaf8ae6
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/ChangeLog
@@ -0,0 +1,1018 @@
+2005-07-29 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/cyg_ass.h: Fixed a function prototype so that
+ gcc4 does not give warnings. A const void makes no sense.
+ * src/*.cxx (cyg_check_func_ptr): match the implementation to the
+ prototype.
+
+2005-06-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/cyg_type.h: Added CYGBLD_ATTRIB_USED so that we can
+ indicate to gcc 3.4.4 or above not to throw away a variable or
+ function even when it appears to be not references.
+
+2005-03-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/diag.h: Added CYGBLD_ATTRIB_PRINTF_FORMAT where
+ appropriate to get the compiler to do more checking.
+ * src/diag.cxx (diag_dump_buf_with_offset_16bit): Fix compiler warning
+ caused by above change.
+
+2005-02-08 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * tests/diag_sprintf1.c
+ * tests/diag_sprintf2.c
+ * cdl/infra.cdl: Used the sprintf test from libc to test
+ diag_sprintf.
+
+2005-02-08 Christoph Csebits <Christoph.CSEBITS@frequentis.com>
+
+ * src/diag.cxx (diag_snprintf): Off by one error could cause the
+ end of the buffer to be overrun.
+
+2004-07-12 Gary Thomas <gary@mlbassoc.com>
+
+ * src/diag.cxx (_vprintf): Fix return length for %%
+
+2004-06-30 Gary Thomas <gary@mlbassoc.com>
+
+ * src/diag.cxx (_vprintf): Returned [length] was wrong for %p
+
+2004-04-16 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * tests/cxxsupp.cxx: Allow inline function to be correctly inlined.
+
+2004-04-15 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * include/cyg_type.h: added CYG_ATTRIB_ALIGN_MAX and
+ CYGBLD_ATTRIB_ALIGNOFTYPE. Inspired by Robert Larice.
+
+2004-01-08 Jani Monoses <jani@iv.ro>
+
+ * src/diag.cxx (diag_check_string): Allow '\t' in format strings.
+
+2004-01-05 Gary Thomas <gary@mlbassoc.com>
+
+ * tests/fc_test.c:
+ * src/tcdiag.cxx (cyg_assert_msg): 'fconfig' API changed again.
+
+2003-12-21 Gary Thomas <gary@mlbassoc.com>
+
+ * tests/fc_test.c: New test/demonstration of 'fconfig' access.
+
+ * src/tcdiag.cxx (cyg_assert_msg): Interface to 'fconfig' data
+ has changed.
+
+2003-10-11 Gary Thomas <gary@mlbassoc.com>
+
+ * src/tcdiag.cxx (cyg_test_exit):
+ * cdl/infra.cdl: New option CYGSEM_INFRA_RESET_ON_TEST_EXIT which
+ [if defined] indicates that "cyg_test_exit()" should reset the
+ platform instead of the default hang.
+
+2003-10-03 Nick Garnett <nickg@balti.calivar.com>
+
+ * tests/cxxsupp.cxx: Added ifdef to disable this test on H8/300
+ targets. The H8/300 toolchain does not currently have C++ support.
+
+2003-07-01 Michael Checky <Michael_Checky@ThermoKing.com>
+
+ * src/diag.cxx: Added support for the 'z' qualifier in format strings.
+
+2003-05-05 Gary Thomas <gary@mlbassoc.com>
+
+ * cdl/infra.cdl: Add option to control number of times tests run.
+
+2003-04-25 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * tests/cxxsupp.cxx: don't include <pkgconf/kernel.h> as it's not
+ needed.
+ (cyg_start): CYGINT_ISO_MALLOC needs a #if test.
+
+2003-04-10 Nick Garnett <nickg@balti.calivar.com>
+
+ * tests/cxxsupp.cxx: Added this test program to check that basic
+ C++ support is present. It checks that pure virtual functions can
+ be defined, that new and delete are present and functional, and
+ that calls to as-yet undefined inline functions work. Most of
+ these are linker and runtime system issues, so the actual run of
+ the program is almost a non-event.
+
+ * cdl/infra.cdl:
+ Added CYGFUN_INFRA_DUMMY_ABORT and CYGFUN_INFRA_DUMMY_STRLEN
+ options to control inclusion of dummy abort() and strlen()
+ functions. These are needed to be present by the compiler's C++
+ runtime system, although they should never be called.
+ Added CYGPKG_INFRA_TESTS to define test programs.
+ Added CYGPKG_INFRA_LDFLAGS_REMOVE and CYGPKG_INFRA_LDFLAGS_ADD to
+ modify the linkage options for the infra package
+ tests. Specifically they remove the --gc-sections option and make
+ all linker warning fatal. This is necessary if cxxsupp.cxx is to
+ test what it needs correctly.
+
+ * src/abort.cxx: Added this dummy implementation of abort() to
+ satisfy references in the C++ runtime system.
+
+ * src/strlen.cxx: Added this dummy implementation of strlen() to
+ satisfy references in the C++ runtime system.
+
+2003-03-27 Bart Veer <bartv@ecoscentric.com>
+
+ * src/pure.cxx, cdl/infra.cdl: new function __cxa_pure_virtual(),
+ needed when building with g++ v3.x if the code uses pure
+ virtual functions.
+
+2003-01-18 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * include/cyg_ass.h (CYG_CHECK_FUNC_PTRC): Define with const pointer
+ arguments.
+ (CYG_CHECK_DATA_PTRC): Ditto.
+ (CYG_CHECK_FUNC_PTR): Ditto.
+ (CYG_CHECK_DATA_PTR): Ditto.
+ * src/null.cxx: Define cyg_check_data/func_ptr() with const args.
+ * src/buffer.cxx: Ditto.
+ * src/fancy.cxx: Ditto.
+ * src/simple.cxx: Ditto.
+
+2002-07-18 Gary Thomas <gary@chez-thomas.org>
+
+ * include/diag.h:
+ * src/diag.cxx (diag_vdump_buf_with_offset): New function.
+
+2002-05-22 Jesper Skov <jskov@redhat.com>
+
+ * cdl/infra.cdl: Added two options to control CFLAGS.
+
+2002-05-17 Martin Buck <martin.buck@ascom.ch>
+
+ * include/cyg_type.h (CYGBLD_ATTRIB_PRINTF_FORMAT): Add.
+
+2002-05-23 Gary Thomas <gthomas@redhat.com>
+
+ * src/diag.cxx (_vprintf): Mapping of '\n'=>'\r\n' must be done
+ at the _putc() level.
+
+2002-04-17 Gary Thomas <gthomas@redhat.com>
+
+ * src/diag.cxx (diag_dump_buf_with_offset): Fix pad for short lines.
+
+2002-04-16 Gary Thomas <gthomas@redhat.com>
+
+ * src/diag.cxx: Return proper length result for sprintf() functions.
+
+2002-04-09 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/cyg_type.h: Allow HALs to override certain attrib macros.
+
+2002-02-19 Gary Thomas <gthomas@redhat.com>
+
+ * src/diag.cxx (diag_snprintf):
+ * include/diag.h: Change function signature on diag_snprintf()
+ to match snprintf() found in stdio.
+
+2002-02-13 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/cyg_trac.h: Make message type of trace functions be
+ const char * to help avoid warnings with callers.
+ * src/null.cxx: Reflect that in actual functions.
+ * src/fancy.cxx: Ditto.
+ * src/simple.cxx: Ditto.
+ * src/buffer.cxx: Ditto.
+
+2002-01-31 Hugo Tyson <hmt@redhat.com>
+
+ * src/tcdiag.cxx (cyg_assert_msg): Enable this function
+ universally; given the extra usefulness it now has (see below)
+ it's worth always having around by default in asserted builds.
+ It can be disabled with CYGDBG_INFRA_DEBUG_ASSERT_MESSAGE = 0.
+
+2002-01-30 Hugo Tyson <hmt@redhat.com>
+
+ * src/tcdiag.cxx (cyg_assert_msg): Collect from RedBoot flash
+ config, whether or not to dump to a specific console.
+
+2002-01-28 Gary Thomas <gthomas@redhat.com>
+
+ * src/diag.cxx (diag_snprintf):
+ * include/diag.h: New function diag_snprintf().
+
+2002-01-23 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/cyg_type.h: Define CYG_INIT_IO_FS used by filesystems
+ so that they init *after* the devices they depend on.
+
+2002-01-21 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/tcdiag.cxx (cyg_test_exit): Work around problem with recent
+ SH tools that isn't likely to get fixed soon.
+
+2002-01-17 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
+
+ * src/diag.cxx (diag_check_string): enlarge valid string length to 2048
+
+2001-12-06 Jesper Skov <jskov@redhat.com>
+
+ * src/diag.cxx: Added functions to do memory dump in 16 and 32 bit
+ units. Based on changes from Warren Jasper <warrenj@bops.com>.
+ * include/diag.h: Function declarations.
+
+2001-09-12 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/eprintf.c (__eprintf): Tolerate absence of standard ISO C
+ functions better.
+
+2001-09-11 Jesper Skov <jskov@redhat.com>
+
+ * src/diag.cxx (diag_check_string): Also accept \b.
+
+2001-08-25 Gary Thomas <gthomas@redhat.com>
+
+ * src/diag.cxx (_vprintf): Fix confusion between signed and unsigned
+ descriptors (only %d is signed).
+
+2001-08-24 Gary Thomas <gthomas@redhat.com>
+
+ * include/diag.h: Export diag_dump_buf_with_offset.
+
+ * src/diag.cxx (_vprintf): Fix problems with signed/unsigned prints.
+ (diag_dump_buf_with_offset): Export.
+
+2001-08-23 Gary Thomas <gthomas@redhat.com>
+
+ * src/diag.cxx (_vprintf): Restore functionality of %D,%U,%X,%B,%S,%C
+ which were present in old code.
+
+2001-08-22 Gary Thomas <gthomas@redhat.com>
+
+ * src/diag.cxx:
+ * include/diag.h:
+ * cdl/infra.cdl: Restructuring to support more flexible versions
+ of diag_printf() and related functions. Remove old cruft which
+ was workaround for possibly failing compilers [K&R support].
+ These versions of printf(), etc, were part of the RedBoot package
+ and have been moved here (and renamed) to reduce code duplication.
+
+2001-08-22 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/eprintf.c: New file to implement __eprintf called from libgcc.
+ * cdl/infra.cdl: Build it.
+ * include/cyg_type.h: Provide __THROW default empty throw specifier.
+ * include/cyg_ass.h (cyg_assert_fail): Add __THROW.
+ (cyg_assert_msg): Ditto.
+ * src/buffer.cxx (cyg_assert_fail): Ditto.
+ * src/fancy.cxx (cyg_assert_fail): Ditto.
+ * src/null.cxx (cyg_assert_fail): Ditto (twice).
+ * src/simple.cxx (cyg_assert_fail): Ditto.
+ * src/tcdiag.cxx (cyg_assert_msg): Ditto.
+
+2001-08-03 Nick Garnett <nickg@cygnus.co.uk>
+
+ Imported from a development branch:
+
+ 2001-06-27 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/diag.cxx:
+ * src/tcdiag.cxx:
+ Added use of CYG_HAL_DIAG_LOCK() and CYG_HAL_DIAG_UNLOCK() to
+ diag_printf(), cyg_assert_msg() and cyg_test_output() to prevent
+ messages from different CPUs being mingled.
+
+ 2001-05-22 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/cyg_type.h (CYGBLD_ANNOTATE_VARIABLE_*):
+ Added better way of supplying default definitions for these.
+
+ 2001-04-27 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/cyg_type.h:
+ Added default variable annotation macros.
+
+2001-07-18 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/cyg_type.h (CYG_INIT_MEMALLOC): Add.
+
+2001-07-13 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/diag.cxx (diag_vprintf): Fix long longs (patch from
+ Motoya Kurotsu <kurotsu [at] allied-telesis.co.jp>
+
+ * cdl/debug.cdl: Make tracing styles be mutually exclusive properly
+ using an interface.
+
+2001-06-14 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/clist.hxx (Cyg_DNode_T): Don't qualify constructor or
+ destructor with <T>.
+ (Cyg_CList_T): Ditto.
+
+2001-02-23 Robin Farine <acnrf@dial.eunet.ch>
+
+ * include/cyg_type.h: Do alignment consistency check.
+
+2001-01-05 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/clist.hxx: Many changes to make these classes usable in
+ the MLQ scheduler and alarm objects.
+
+2000-12-15 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/clist.hxx: Added this implementation of simple circular
+ list classes. This is not immediately useful, except to the
+ dynamic loader, but it is intended to simplify the MLQ scheduler
+ with these classes eventually.
+
+2000-12-13 Jesper Skov <jskov@redhat.com>
+
+ * include/cyg_type.h (CYGBLD_ATTRIB_ASM_ALIAS): Mangle assembler
+ symbols properly.
+
+2000-09-08 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/cyg_type.h (CYGBLD_ATTRIB_SECTION): Don't stringify arg.
+
+2000-09-04 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/cyg_type.h (CYGARC_ALIGNMENT): Add default of 8
+ (CYGARC_P2ALIGNMENT): Add corresponding default of 3
+ (CYGBLD_ATTRIB_ALIGN): Define to allow alignment
+ * include/cyg_type.inc: As above for CYGARC_ALIGNMENT and
+ CYGARC_P2ALIGNMENT
+
+2000-07-25 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/cyg_type.inc: Create. Used for the equivalent stuff of
+ cyg_type.h in assembler and linker scripts
+
+2000-07-19 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/pkgstart.cxx (cyg_package_start): Remove POSIX startup option
+ * cdl/startup.cdl: Likewise
+
+2000-07-18 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/buffer.cxx (increment_buffer_pos): Reset buffer pos *before*
+ we try to print the buffer
+ Thanks to Chris Morrow (cmorrow at YottaYotta.com ) for spotting
+ the problem.
+
+2000-07-04 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/infra.cdl: Add CYGFUN_INFRA_EMPTY_DELETE_FUNCTIONS option
+ to control presence of empty C++ delete functions
+
+ * src/delete.cxx: Move comments into above option, and simplify
+ the configuration now that it's more straightforward
+
+2000-06-21 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/simple.cxx:
+ * src/null.cxx:
+ * src/fancy.cxx:
+ * src/buffer.cxx:
+ Removed use of CYG_LABEL_NAME() and added extra underscores to
+ _stext and _etext.
+
+ * include/cyg_type.h: Changed default for CYG_LABEL_DEFN() to
+ define labels without an extra underscore. This reflects the
+ practice of most of the targets we support.
+
+2000-06-19 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/cyg_type.h:
+ Added CYGBLD_ATTRIB_SECTION to assign variables to a named
+ section.
+ Added CYG_LABEL_DEFN() macro for defining labels in asm and linker
+ scripts. This is particularly useful for generating labels in
+ inline assembler fragments.
+
+2000-05-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/startup.cdl:
+ * src/pkgstart.cxx:
+ Remove CYGSEM_START_ISO_C_COMPATIBILITY: startup is now handled
+ via extras.o
+ * include/cyg_type.h: Define __externC alternative to externC
+
+2000-04-12 Jesper Skov <jskov@redhat.com>
+
+ * cdl/infra.cdl: Allow build flags to be tweaked.
+
+2000-03-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * cdl/startup.cdl:
+ * src/pkgstart.cxx:
+ Added POSIX startup option.
+
+2000-03-28 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/cyg_trac.h: Also update internal documentation for below
+ const char * changes (2000-03-27)
+
+2000-03-28 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/infra.cdl:
+
+ Adjust documentation URLs.
+
+2000-03-27 Gary Thomas <gthomas@redhat.com>
+
+ * src/tcdiag.cxx: HAL architecture ports may override default
+ behavior for 'cyg_test_exit()'.
+
+ * src/diag.cxx (diag_vprintf): Add support for %llX modifier, which
+ allows for printing of (long long) operands.
+
+2000-03-27 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/cyg_trac.h: Use const qualifier on function and file name
+ strings to be compatible with the C++ standard
+ * src/buffer.cxx: likewise
+ * src/fancy.cxx: likewise
+ * src/null.cxx: likewise
+
+2000-03-27 Jesper Skov <jskov@redhat.com>
+
+ * include/cyg_type.h: Make cyg_halbool the same for C and C++
+ code.
+
+ * include/cyg_ass.h (CYGDBG_DEFINE_CHECK_THIS): Use cyg_bool
+ instead of bool.
+
+2000-03-07 Jesper Skov <jskov@redhat.com>
+
+ * src/buffer.cxx: Fix some compiler warnings.
+
+2000-03-03 Jesper Skov <jskov@redhat.com>
+
+ * include/cyg_type.h (CYGBLD_ATTRIB_WEAK): disarm bomb for !GCC.
+
+2000-03-01 Jesper Skov <jskov@redhat.com>
+ 103290
+ * include/cyg_ass.h: Make cyg_assert_fail a weak symbol.
+
+2000-02-28 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/diag.h:
+ * src/diag.cxx (diag_dump_buf): Add diagnostic "dump buffer" function.
+
+2000-02-21 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/tcdiag.cxx (cyg_test_is_simulator): set this true if ugly
+ new cdl_option CYGHWR_TARGET_SIMULATOR_NO_GDB_WORKING is set.
+ This means we cannot diddle the variable using GDB.
+
+2000-02-18 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/tcdiag.cxx (cyg_test_exit): Add the facility for a platform
+ HAL to define an action to take at CYG_TEST_EXIT time; this is
+ useful for some simulators that are not (yet) Gdb integrated.
+ The action is CYGHWR_TEST_PROGRAM_EXIT() if defined.
+
+ * src/simple.cxx (cyg_assert_fail): Add the facility for a
+ platform HAL to define an action to take when an assertion failure
+ occurs. Ditto.
+
+ * src/fancy.cxx (cyg_assert_fail): Ditto.
+
+ * src/buffer.cxx (cyg_assert_fail): Ditto.
+
+ [no change to null.cxx because, well, it's null isn't it]
+
+2000-02-08 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/cyg_trac.h: Define and document CYG_TRACE_PRINT() and
+ CYG_TRACE_DUMP() macros for outputting buffered trace output, and
+ kernel state dump respectively
+
+ * cdl/debug.cdl (CYGDBG_INFRA_DEBUG_TRACE_ASSERT_BUFFER):
+ replace (incorrect) mention of cyg_trace_output() with CYG_TRACE_PRINT()
+ macro.
+
+ * src/fancy.cxx (cyg_trace_dump): Add (from buffer.cxx)
+ * src/simple.cxx (cyg_trace_dump): Add (from buffer.cxx)
+ * src/null.cxx (cyg_trace_dump): Add as empty function
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl\infra.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl\infra.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+1999-11-26 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/cyg_type.h: Add MLT symbols CYGMEM_REGION_ATTR_R/W.
+
+1999-11-23 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/debug.cdl: Add "active_if CYGDBG_USE_TRACING" to all tracing
+ only options in the buffered flavour of assert'n'trace. Otherwise
+ enabling asserts but no tracing does not build; oldCDL dealt with
+ this by a string of ifdefs in the header. Active_if is my friend.
+ This also prevents the confusion of having active options that
+ have no effect whatsoever.
+ Aside: the default is buffered assert'n'trace so that the test
+ farm can enable tracing and not get swamped by output.
+
+1999-05-14 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/cyg_type.h (CYG_INIT_COMPAT): add a new init priority
+ level for compatibility layers (for uITRON that is, but
+ potentially POSIX also perhaps, after libc anyway).
+
+1999-04-14 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/infra.h: Add cdl_package doc attribute.
+
+1999-04-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/cyg_type.h: Added new init priority for IO devices.
+
+ * include/diag.h:
+ * src/diag.cxx:
+ Use device for diag if configured so.
+
+1999-03-19 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/diag.cxx (diag_vprintf): Support '%%' printf modifier.
+
+1999-03-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/cyg_type.h:
+ Add CYGBLD_ATTRIB_CONST and tidy define indentation
+
+1999-03-04 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/diag.h:
+ Added a #include for <pkgconf/infra.h> so that the header file
+ can correctly check for CYGDBG_INFRA_DIAG_PRINTF_USE_VARARG
+
+1999-02-25 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/cyg_type.h:
+ Added CYGBLD_ATTRIB_ASM_ALIAS() macro to supply an alias for a
+ variable while it is being defined.
+
+1999-02-24 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/cyg_type.h (CYG_INIT_APPLICATION): Add CYG_INIT_DRIVERS
+ priority
+
+ * src/tcdiag.cxx (cyg_test_output): Re-include angle brackets
+ for CYG_TEST_GDBCMD command
+
+1999-02-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/testcase.h (CYG_TEST_NA):
+ Add call to cyg_test_exit()
+
+1999-02-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/cyg_type.h:
+ Add CYGBLD_ATTRIB_INIT_PRI/BEFORE/AFTER macros.
+ Remove CYG_INIT_BEFORE/AFTER as they were unusable
+
+ * include/testcase.h:
+ * src/tcdiag.cxx:
+ Add CYGNUM_TEST_NA() macro for not applicable state
+ Don't need to call diag_init() any more from cyg_test_init()
+
+ * src/diag.c:
+ * src/diag.cxx:
+ Rename diag.c to diag.cxx
+ Add dummy constructor object to do initialization right after the
+ HAL has started. Needed to get asserts working correctly at
+ constructor time, and for CYGNUM_TEST_GDBCMD to work as intended
+ (i.e. before calling CYG_TEST_INIT())
+
+1999-02-17 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/tcdiag.cxx (cyg_test_output): Remove angle brackets round
+ GDBCMD output
+
+1999-02-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/fancy.cxx (trim_func):
+ * src/simple.cxx (trim_func):
+ * src/buffer.cxx (trim_func):
+ Don't delete bits before a space as it may not always be a
+ type, if using CYG_FUNCNAME rather than relying on
+ __PRETTY_FUNCTION__
+
+ * src/tcdiag.cxx (cyg_test_output):
+ Add new GDBCMD output and do some tidying vis a vis coding standards
+ etc.
+
+ * include/testcase.h:
+ Do some tidying vis a vis coding standards etc.
+
+1999-02-16 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/cyg_type.h (CYGBLD_ATTRIB_CONSTRUCTOR):
+ New macro, used to define a 'C' routine to be run with 'C++'
+ constructors.
+
+1999-01-26 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/cyg_type.h (CYGBLD_ATTRIB_NORET):
+ Updated the non-GNUC version of the macro
+
+1999-01-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/cyg_type.h:
+ Remove all traces of CYG_KERNEL_USE_INIT_PRIORITY option - now
+ compulsory. Consequently can remove include of pkgconf/infra.h.
+ Add CYG_INIT_PREDEFAULT priority for
+ CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG implementation.
+ Change CYGBLD_NORET to CYGBLD_ATTRIB_NORET
+ Add CYGBLD_ATTRIB_ALIAS and CYGBLD_ATTRIB_WEAK_ALIAS macros
+
+ * include/cyg_ass.h:
+ * include/testcase.h
+ Change CYGBLD_NORET to CYGBLD_ATTRIB_NORET
+
+ * src/startup.cxx:
+ Split up into smaller files to make GDB happier when debuggin
+
+ * src/pkgstart.cxx:
+ * src/prestart.cxx:
+ * src/userstart.cxx:
+ New files with contents originally from startup.cxx
+
+1999-01-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/cyg_type.h (CYG_REFERENCE_OBJECT):
+ Make this work with no overhead, although it doesn't work with
+ anything other than objects with constructors. I _believe_ this
+ is the only relevant situation though. Bite me.
+ Fix for PR 18782
+
+1999-01-14 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/cyg_type.h (CYG_REFERENCE_SYMBOL): Added.
+
+1999-01-13 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/cyg_type.h: Default handling of 'CYG_DOUBLE_BYTEORDER'
+
+1999-01-13 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/cyg_type.h (CYG_UNUSED_PARAM): Don't assign to the
+ unused parameter; it might be a macro constant.
+
+1999-01-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/tcdiag.cxx (cyg_test_output):
+ * include/testcase.h:
+ Use const where appropriate in cyg_test_output()
+
+1999-01-06 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/cyg_trac.h (CYG_REPORT_FUNCARG8):
+ Removed spurious comma so that the macro actually compiles.
+
+1998-12-24 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/simple.cxx:
+ * src/null.cxx:
+ * src/fancy.cxx:
+ * src/diag.c:
+ * src/buffer.cxx:
+ * include/diag.h:
+ In the assertion support, use const where appropriate.
+
+1998-12-24 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/cyg_ass.h:
+ The prototype for cyg_assert_fail() is now always present.
+ const is used wherever appropriate.
+ A number of additional assertion macros are now defined.
+ Host-specific assertion support has been added.
+ Some minor tweaks for greater consistency in macro usage.
+
+1998-12-21 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/cyg_type.h:
+ Allow for platforms where pointers are not 32 bits wide.
+
+1998-12-16 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/testcase.h (cyg_test_is_simulator):
+ * src/tcdiag.cxx (cyg_test_is_simulator):
+ Change the type to int so that all gdb's understand it.
+ (it was impossible to assign to from the prompt as a bool)
+
+1998-12-09 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/testcase.h:
+ Hide a __noreturn__ attribute inside a macro so that the
+ header file can be used for host-side code.
+
+1998-11-02 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/memset.c (_memset): Use type casted pointer to avoid
+ compiler warning.
+
+Mon Oct 26 21:20:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/buffer.cxx:
+ Make write_thread_id() conditional on CYGDBG_USE_ASSERTS as that's
+ the only time it is used. This silences a compiler warning
+
+Mon Oct 26 19:40:48 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/memset.c, src/memcpy.c:
+ Conditionalise out all tracing for now
+ Fix for PR 17996
+
+Fri Oct 23 05:42:36 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/cyg_ass.h (CYGASSERT_docall):
+ Make a dummy reference to _msg_ argument when
+ CYGDBG_INFRA_DEBUG_ASSERT_MESSAGE is disabled, otherwise we may get
+ "unused variable" warnings
+ Fix for PR 17889
+
+1998-10-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/buffer.cxx (increment_buffer_pos):
+ Use the correctly named print_trace_buffer() rather than some
+ typo/globaleditto.
+ (cyg_trace_dump): only refer to thread->get_saved_context() if
+ CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT is defined.
+
+1998-10-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/buffer.cxx (write_thread_id):
+ Make get_tid() be there when used.
+
+ * include/pkgconf/infra.h:
+ Only enable all the buffered tracing stuff if USE_TRACING is
+ selected; otherwise link errors ensue if only USE_ASSERTS is
+ enabled.
+
+1998-10-22 Jesper Skov <jskov@cygnus.co.uk>
+ PR 17914
+
+ * src/simple.cxx (CYG_NO_THREADID): Set if there is no Kernel
+ support.
+
+1998-10-20 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/null.cxx:
+ Removed fix for PR 17471 since the required macros have been moved
+ to cyg_type.h.
+
+ * include/diag.h (diag_printf):
+ * src/diag.c (diag_printf):
+ Made use of variadic arguments optional in this function.
+
+ * include/pkgconf/infra.h:
+ Added configury to support buffered tracing.
+
+ * src/fancy.cxx (trim_func):
+ Fixed fencepost bug.
+
+ * src/PKGconf.mak:
+ * src/buffer.cxx:
+ Added buffer.cxx to implement buffered trace log.
+
+Thu Oct 15 21:27:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/delete.cxx, src/memcpy.c, src/memset.c:
+ Moved here from ecc/kernel/current/src/common, as they should
+ be present even if the kernel is disabled
+
+ * include/pkgconf/infra.h:
+ Add new config options CYGIMP_INFRA_PREFER_SMALL_TO_FAST_MEMCPY
+ and CYGIMP_INFRA_PREFER_SMALL_TO_FAST_MEMSET to support the
+ functionality available in memcpy.c and memset.c
+
+ * src/PKGconf.mak:
+ build above new files
+
+ Above changes are required for PR 17229
+
+1998-10-14 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/cyg_type.h:
+ Moved CYG_LABEL_NAME() macro here from ktypes.h.
+
+Wed Oct 14 17:10:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/diag.c:
+ Change warning message from previous change to match compiler
+ output exactly
+
+Tue Oct 13 17:23:37 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/diag.c:
+ Output another warning so that people know that diag.c produces
+ a warning
+ Reformat to 76 columns
+ Change args of diag_printf to be ANSI-style, not K&R to
+ silence warning
+
+1998-09-25 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/null.cxx:
+ PR 17471: null.cxx relies on the macro CYG_LABEL_NAME(), which on
+ the mn10300 is defined only if <cyg/kernel/ktypes.h> is included.
+ As a temporary fix this header file is now always included. In the
+ medium term there will have to be proper fixes to ktypes.h and to
+ cyg_type.h
+
+Wed Sep 16 03:42:16 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/startup.cxx, src/dummyxxmain.cxx:
+ Move __main() to a separate dummyxxmain.cxx source file to resolve
+ linking bogosities on some targets
+ Fix for PR 17279 - kudos to Tim Goodwin really
+
+ * src/PKGconf.mak:
+ Build src/dummyxxmain.cxx
+
+Tue Sep 15 19:14:33 1998 David Moore <dsm@keema.cygnus.co.uk>
+
+ * include/pkgconf/infra.h: Cleaned up comments.
+
+Tue Sep 15 14:34:34 1998 David Moore <dsm@cygnus.co.uk>
+
+ * src/startup.cxx:
+ * include/cyg_type.h:
+ CYGBLD_ATTRIB_WEAK moved from src/startup.cxx to
+ include/cyg_type.h
+
+Tue Sep 15 12:26:36 1998 Jonathan Larmour <jlarmour@peshwari.cygnus.co.uk>
+
+ * src/null.cxx, src/simple.cxx, src/fancy.cxx:
+ Change cyg_check_data_ptr() to not compare with _end symbol from
+ linker scripts as this is a bogus thing to do when starting in
+ ROM. Some better magic can be done later with the memory layout
+ tool.
+
+ * src/simple.cxx (cyg_assert_fail),
+ src/fancy.cxx (cyg_assert_fail):
+ If an assert is thrown, loop forever no matter what the platform
+ rather than resetting the jmr board.
+
+Fri Sep 11 12:52:59 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/tcdiag.cxx:
+ * src/diag.c:
+ Remove dependencies on the kernel:
+ o types are available from here, infra.
+ o Diag and its mates are here and the HAL.
+
+Thu Sep 10 21:59:09 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/fancy.cxx:
+ * src/simple.cxx:
+ * src/null.cxx:
+ Remove dependencies on the kernel:
+ o interrupt stuff is available from the HAL.
+ o types are available from here, infra.
+ o Diag and its mates are here and the HAL.
+ o Only consider printing thread information if there is a kernel.
+
+Thu Sep 10 21:29:55 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/infra.h:
+ Fix CDL descriptions (mainly) resulting from review of
+ configury here.
+
+Thu Sep 10 17:38:00 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/null.cxx:
+ Add an empty cyg_assert_fail() if not CYGDBG_USE_ASSERTS, so that
+ clib's assert() can use it, in common with but regardless of the
+ internal assert setup. Of course if internal asserts are used,
+ the same routine is used.
+
+Thu Sep 3 19:05:29 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/startup.cxx (__main):
+ ...and its mates. Correct the bad usage of the tracing macros - a
+ type was implied when the type was void, so an assert fires.
+
+ * include/diag.h (diag_printf):
+ Remove 'useful' prototype; this function deliberately has a K&R
+ prototype to avoid having to use varargs, or pad arglists or
+ anything grody like that. Comment to that effect added too.
+
+ * src/fancy.cxx:
+ Condition out routines which are only used by tracing system;
+ prevent warnings. Also changed the default widths setup to
+ something more suitable to our long function names; viewing on
+ about a 200 column screen recommended - or use 'simple' instead.
+
+Tue Sep 1 19:09:39 1998 Hugo Tyson <hmt@masala.cygnus.co.uk>
+
+ * include/pkgconf/infra.h:
+ Fancy tracing by default, as I've been requested.
+ Move definition (or not) of CYGDBG_INFRA_DIAG_USE_DEVICE from the
+ kernel, correcting the symbol construction as we go.
+
+ * include/cyg_type.h:
+ Correct multiple-inclusion protection, remove
+ <dollar>Version<Dollar> nonsense, correct Usage: field, put in
+ definition of CYGBLD_NORET.
+
+ * include/cyg_ass.h:
+ Correct Usage: field, remove definition of CYGDBG_NORET, correct
+ definition of cyg_assert_fail to use CYGBLD_NORET as intended.
+
+ * include/cyg_trac.h:
+ Tidy up comments.
+
+ * src/PKGconf.mak (COMPILE):
+ Added all the new units below.
+
+ * src/fancy.cxx:
+ * src/simple.cxx:
+ * src/null.cxx:
+ Moved here from the kernel; comments changed accordingly.
+
+ * src/tcdiag.cxx:
+ * include/diag.h:
+ * src/diag.c:
+ Moved here from the kernel; comments changed accordingly.
+ Also use config symbol CYGDBG_INFRA_DIAG_USE_DEVICE rather than
+ (badly named) CYG_DIAG_USE_DEVICE.
+
+Fri Aug 28 15:22:16 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/infra.h:
+ Add lots of lovely cdl comments and new, correct, names for the
+ config options themselves.
+ * include/cyg_trac.h:
+ * include/cyg_ass.h:
+ Use the newly named options.
+
+ [KERNEL] see also changes to src/trace/{fancy,null,simple}.cxx
+ which should soon move into this package instead.
+
+Fri Aug 28 09:57:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/infra.h:
+ Add CYGSEM_START_ISO_C_COMPATIBILITY and
+ CYGSEM_START_UITRON_COMPATIBILITY options, along with some comment.
+
+ * src/PKGconf.mak, src/startup.cxx:
+ Add these two files for the new file startup.cxx that provides the
+ generic startup mechanism, using new cyg_start() functions. This
+ is to remove the dependency on main(), which is defined in ISO and
+ POSIX as having certain properties we wouldn't be able to give it
+ otherwise.
+
+Tue Aug 25 11:47:58 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/startup.cxx:
+ Add this to provide new startup method
+
+1998-08-20 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/cyg_type.h:
+ Moved constructor priority ordering stuff here from
+ kernel/ktypes.h.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+
+
+
diff --git a/cesar/ecos/packages/infra/current/cdl/assert.cdl b/cesar/ecos/packages/infra/current/cdl/assert.cdl
new file mode 100644
index 0000000000..07ed39cac5
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/cdl/assert.cdl
@@ -0,0 +1,120 @@
+# ====================================================================
+#
+# assert.cdl
+#
+# Infrastructure debugging/assertion configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: bartv,hmt
+# Contributors:
+# Date: 1999-07-02
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+# The eCos system uses a number of more specialised assertions in
+# addition to a conventional ASSERT() macro. By default these are all
+# enabled when general assertions are enabled, but it is possible to
+# suppress some of them and thus reduce the size of the generated code.
+#
+# Preconditions check that a condition holds true at the beginning of
+# a piece of code, typically at the start of a function. For example a
+# kernel function might have a precondition that it is only invoked
+# when the scheduler is locked.
+#
+# Postconditions check that a condition holds at the end of a piece of
+# code, typically at the point where a function returns. For example
+# at the end of scheduler initialisation there could be a
+# postcondition that there is at least one runnable thread, the idle
+# thread.
+#
+# Loop invariants check that a condition holds on every iteration of
+# a loop. For example the deferred service support code in the kernel
+# could have a loop invariant that interrupts are enabled whenever
+# there are still DSR's pending.
+
+cdl_option CYGDBG_INFRA_DEBUG_PRECONDITIONS {
+ display "Preconditions"
+ default_value 1
+ description "
+ This option allows individual control of preconditions.
+ A precondition is one type of assert, which it is
+ useful to control separately from more general asserts.
+ The function is CYG_PRECONDITION(condition,msg)."
+}
+cdl_option CYGDBG_INFRA_DEBUG_POSTCONDITIONS {
+ display "Postconditions"
+ default_value 1
+ description "
+ This option allows individual control of postconditions.
+ A postcondition is one type of assert, which it is
+ useful to control separately from more general asserts.
+ The function is CYG_POSTCONDITION(condition,msg)."
+}
+cdl_option CYGDBG_INFRA_DEBUG_LOOP_INVARIANTS {
+ display "Loop invariants"
+ default_value 1
+ description "
+ This option allows individual control of loop invariants.
+ A loop invariant is one type of assert, which it is
+ useful to control separately from more general asserts,
+ particularly since a loop invariant is typically evaluated
+ a great many times when used correctly.
+ The function is CYG_LOOP_INVARIANT(condition,msg)."
+}
+
+cdl_option CYGDBG_INFRA_DEBUG_ASSERT_MESSAGE {
+ display "Use assert text"
+ default_value 1
+ description "
+ All assertions within eCos contain a text message
+ which should give some information about the condition
+ being tested.
+ These text messages will end up being embedded in the
+ application image and hence there is a significant penalty
+ in terms of image size.
+ It is possible to suppress the use of these messages by
+ disabling this option.
+ This results in smaller code size, but there is less
+ human-readable information if an assertion actually gets
+ triggered."
+}
+
+# EOF assert.cdl
diff --git a/cesar/ecos/packages/infra/current/cdl/debug.cdl b/cesar/ecos/packages/infra/current/cdl/debug.cdl
new file mode 100644
index 0000000000..1d9fc16620
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/cdl/debug.cdl
@@ -0,0 +1,235 @@
+# ====================================================================
+#
+# debug.cdl
+#
+# Infrastructure debugging configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: bartv,hmt
+# Contributors:
+# Date: 1999-07-02
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+# If global debugging is enabled then by default all assertions
+# are enabled. Tracing is not enabled by default because it
+# involves excessive overheads, for example on some targets
+# it requires sending a string down a serial line for every
+# function call. Both assertions and tracing are controlled
+# by the following lines.
+
+cdl_component CYGDBG_USE_ASSERTS {
+ display "Use asserts"
+ default_value 1
+ requires { 1 == CYGINT_INFRA_DEBUG_TRACE_IMPL }
+ description "
+ If this option is defined, asserts in the code are tested.
+ Assert functions (CYG_ASSERT()) are defined in
+ 'include/cyg/infra/cyg_ass.h' within the 'install' tree.
+ If it is not defined, these result in no additional
+ object code and no checking of the asserted conditions."
+
+ script assert.cdl
+}
+
+cdl_component CYGDBG_USE_TRACING {
+ display "Use tracing"
+ default_value 0
+ requires { 1 == CYGINT_INFRA_DEBUG_TRACE_IMPL }
+ description "
+ If this option is defined, tracing operations
+ result in output or logging, depending on other options.
+ This may have adverse effects on performance, if the time
+ taken to output message overwhelms the available CPU
+ power or output bandwidth.
+ Trace functions (CYG_TRACE()) are defined in
+ 'include/cyg/infra/cyg_trac.h' within the 'install' tree.
+ If it is not defined, these result in no additional
+ object code and no trace information."
+
+
+ # The eCos system uses two types of tracing mechanisms. The most common
+ # type traces events, for example an event could be logged whenever
+ # an interrupt occurs or whenever a context switch takes place. The
+ # second type of tracing mechanism records every function entry and
+ # exit. It is possible to disable this second type of tracing while
+ # leaving the main tracing facility enabled.
+ cdl_option CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS {
+ display "Trace function reports"
+ default_value 1
+ description "
+ This option allows individual control of
+ function entry/exit tracing, independent of
+ more general tracing output.
+ This may be useful to remove clutter from a
+ trace log."
+ }
+
+ cdl_option CYGDBG_INFRA_DEBUG_TRACE_MESSAGE {
+ display "Use trace text"
+ default_value 1
+ description "
+ All trace calls within eCos contain a text message
+ which should give some information about the circumstances.
+ These text messages will end up being embedded in the
+ application image and hence there is a significant penalty
+ in terms of image size.
+ It is possible to suppress the use of these messages by
+ disabling this option.
+ This results in smaller code size, but there is less
+ human-readable information available in the trace output,
+ possibly only filenames and line numbers."
+ }
+}
+
+cdl_interface CYGINT_INFRA_DEBUG_TRACE_IMPL {
+ display "Trace output implementations"
+}
+
+cdl_option CYGDBG_INFRA_DEBUG_TRACE_ASSERT_NULL {
+ display "Null output"
+ default_value 0
+ implements CYGINT_INFRA_DEBUG_TRACE_IMPL
+ description "
+ A null output module which is useful when
+ debugging interactively; the output routines
+ can be breakpointed rather than have them actually
+ 'print' something."
+}
+cdl_option CYGDBG_INFRA_DEBUG_TRACE_ASSERT_SIMPLE {
+ display "Simple output"
+ default_value 0
+ implements CYGINT_INFRA_DEBUG_TRACE_IMPL
+ description "
+ An output module which produces simple output
+ from tracing and assertion events."
+}
+cdl_option CYGDBG_INFRA_DEBUG_TRACE_ASSERT_FANCY {
+ display "Fancy output"
+ default_value 0
+ implements CYGINT_INFRA_DEBUG_TRACE_IMPL
+ description "
+ An output module which produces fancy output
+ from tracing and assertion events."
+}
+cdl_component CYGDBG_INFRA_DEBUG_TRACE_ASSERT_BUFFER {
+ display "Buffered tracing"
+ default_value 1
+ implements CYGINT_INFRA_DEBUG_TRACE_IMPL
+ description "
+ An output module which buffers output
+ from tracing and assertion events. The stored
+ messages are output when an assert fires, or
+ CYG_TRACE_PRINT() (defined in <cyg/infra/cyg_trac.h>)
+ is called.
+ Of course, there will only be stored messages
+ if tracing per se (CYGDBG_USE_TRACING)
+ is enabled above."
+
+ cdl_option CYGDBG_INFRA_DEBUG_TRACE_BUFFER_SIZE {
+ display "Trace buffer size"
+ flavor data
+ active_if CYGDBG_USE_TRACING
+ default_value 32
+ legal_values 5 to 65535
+ description "
+ The size of the trace buffer. This counts the number
+ of trace records stored. When the buffer fills it
+ either wraps, stops recording, or generates output."
+ }
+ # FIXME: The below options should be mutually exclusive.
+ cdl_option CYGDBG_INFRA_DEBUG_TRACE_BUFFER_WRAP {
+ display "Wrap trace buffer when full"
+ active_if CYGDBG_USE_TRACING
+ default_value 1
+ # type radio
+ description "
+ When the trace buffer has filled with records it
+ starts again at the beginning. Hence only the last
+ CYGDBG_INFRA_DEBUG_TRACE_BUFFER_SIZE messages will
+ be recorded."
+ }
+ cdl_option CYGDBG_INFRA_DEBUG_TRACE_BUFFER_HALT {
+ display "Halt trace buffer when full"
+ active_if CYGDBG_USE_TRACING
+ default_value 0
+ # type radio
+ description "
+ When the trace buffer has filled with records it
+ stops recording. Hence only the first
+ CYGDBG_INFRA_DEBUG_TRACE_BUFFER_SIZE messages will
+ be recorded."
+ }
+ cdl_option CYGDBG_INFRA_DEBUG_TRACE_BUFFER_PRINT {
+ display "Print trace buffer when full"
+ active_if CYGDBG_USE_TRACING
+ default_value 0
+ # type radio
+ description "
+ When the trace buffer has filled with records it
+ prints the contents of the buffer. The buffer is then
+ emptied and the system continues."
+ }
+ cdl_option CYGDBG_INFRA_DEBUG_TRACE_BUFFER_PRINT_ON_ASSERT {
+ display "Print trace buffer on assert fail"
+ active_if CYGDBG_USE_TRACING
+ default_value 1
+ description "
+ When an assertion fails the trace buffer will be
+ printed to the default diagnostic device."
+ }
+}
+
+cdl_option CYGDBG_INFRA_DEBUG_FUNCTION_PSEUDOMACRO {
+ display "Use function names"
+ default_value 1
+ description "
+ All trace and assert calls within eCos contain a
+ reference to the builtin macro '__PRETTY_FUNCTION__',
+ which evaluates to a string containing
+ the name of the current function.
+ This is useful when reading a trace log.
+ It is possible to suppress the use of the function name
+ by disabling this option.
+ This results in smaller code size, but there is less
+ human-readable information available in the trace output,
+ possibly only filenames and line numbers."
+}
diff --git a/cesar/ecos/packages/infra/current/cdl/infra.cdl b/cesar/ecos/packages/infra/current/cdl/infra.cdl
new file mode 100644
index 0000000000..18aac2bde2
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/cdl/infra.cdl
@@ -0,0 +1,334 @@
+# ====================================================================
+#
+# infra.cdl
+#
+# Infrastructure configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Original data: bartv,hmt
+# Contributors:
+# Date: 1999-06-13
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_INFRA {
+ display "Infrastructure"
+ include_dir cyg/infra
+ description "
+ Common types and useful macros.
+ Tracing and assertion facilities.
+ Package startup options."
+
+ compile startup.cxx prestart.cxx pkgstart.cxx userstart.cxx \
+ dummyxxmain.cxx null.cxx simple.cxx fancy.cxx buffer.cxx \
+ diag.cxx tcdiag.cxx memcpy.c memset.c delete.cxx eprintf.c \
+ pure.cxx
+
+
+ # ====================================================================
+# cdl_component CYGPKG_INFRA_TYPES {
+# display "Common Types"
+# flavor none
+# active_if 0 ;# Not yet configurable.
+# description "
+# These types are used throughout the eCos source code.
+# Currently there are no configuration options associated
+# with the Common Types component; they are automatically
+# set up according to the selected HAL."
+# }
+
+ # ====================================================================
+ cdl_component CYGPKG_INFRA_DEBUG {
+ display "Asserts & Tracing"
+ default_value 0
+ description "
+ The eCos source code contains a significant amount of
+ internal debugging support, in the form of assertions and
+ tracing.
+ Assertions check at runtime that various conditions are as
+ expected; if not, execution is halted.
+ Tracing takes the form of text messages that are output
+ whenever certain events occur, or whenever functions are
+ called or return.
+ The most important property of these checks and messages is
+ that they are not required for the program to run.
+ It is prudent to develop software with assertions enabled,
+ but disable them when making a product release, thus
+ removing the overhead of that checking.
+ It is possible to enable assertions and tracing
+ independently.
+ There are also options controlling the exact behaviour of
+ the assertion and tracing facilities, thus giving users
+ finer control over the code and data size requirements."
+
+ script debug.cdl
+ }
+
+ # ====================================================================
+ cdl_component CYGPKG_INFRA_STARTUP {
+ display "Startup options"
+ flavor none
+ description "
+ Some packages require a startup routine to be called.
+ This can be carried out by application code, by supplying
+ a routine called cyg_package_start() which calls the
+ appropriate package startup routine(s).
+ Alternatively, this routine can be constructed automatically
+ and configured to call the startup routines of your choice."
+
+ script startup.cdl
+ }
+
+ # ========================================================================
+ # memcpy()/memset() configuration
+ cdl_option CYGIMP_INFRA_PREFER_SMALL_TO_FAST_MEMCPY {
+ display "Smaller slower memcpy()"
+ default_value 0
+ description "
+ Enabling this option causes the implementation of
+ the standard memcpy() routine to reduce code
+ size at the expense of execution speed. This
+ option is automatically enabled with the use of
+ the -Os option to the compiler. Also note that
+ the compiler will try to use its own builtin
+ version of memcpy() if possible, ignoring the
+ implementation in this package, unless given
+ the -fno-builtin compiler option."
+ }
+
+ cdl_option CYGIMP_INFRA_PREFER_SMALL_TO_FAST_MEMSET {
+ display "Smaller slower memset()"
+ default_value 0
+ description "
+ Enabling this option causes the implementation of
+ the standard memset() routine to reduce code
+ size at the expense of execution speed. This
+ option is automatically enabled with the use of
+ the -Os option to the compiler. Also note that
+ the compiler will try to use its own builtin
+ version of memset() if possible, ignoring the
+ implementation in this package, unless given
+ the -fno-builtin compiler option."
+ }
+
+ # ========================================================================
+
+ cdl_option CYGFUN_INFRA_EMPTY_DELETE_FUNCTIONS {
+ display "Provide empty C++ delete functions"
+ default_value 1
+ description "
+ To deal with virtual destructors, where the correct delete()
+ function must be called for the derived class in question, the
+ underlying delete is called when needed, from destructors. This
+ is regardless of whether the destructor is called by delete itself.
+ So there is a reference to delete() from all destructors. The
+ default builtin delete() attempts to call free() if there is
+ one defined. So, if you have destructors, and you have free(),
+ as in malloc() and free(), any destructor counts as a reference
+ to free(). So the dynamic memory allocation code is linked
+ in regardless of whether it gets explicitly called. This
+ increases code and data size needlessly.
+
+ To defeat this undesirable behaviour, we define empty versions
+ of delete and delete[]. But doing this prevents proper use
+ of dynamic memory in C++ programs via C++'s new and delete
+ operators.
+
+ Therefore, this option is provided
+ for explicitly disabling the provision of these empty functions,
+ so that new and delete can be used, if that is what is required."
+ }
+
+ # ========================================================================
+
+ cdl_option CYGFUN_INFRA_DUMMY_ABORT {
+ display "Provide dummy abort() function"
+ requires !CYGINT_ISO_EXIT
+ default_value { CYGINT_ISO_EXIT == 0 }
+ compile abort.cxx
+ description "
+ This option controls the inclusion of a dummy abort() function.
+ Parts of the C and C++ compiler runtime systems contain references
+ to abort(), particulary in the C++ exception handling code. It is
+ not possible to eliminate these references, so this dummy function
+ in included to satisfy them. It is not expected that this function
+ will ever be called, so its current behaviour is to simply loop."
+ }
+
+ # ========================================================================
+
+ cdl_option CYGSEM_INFRA_RESET_ON_TEST_EXIT {
+ display "Reset platform at end of test case execution"
+ default_value 0
+ description "
+ If this option is set then test case programs will reset the platform
+ when they terminate, as opposed to the default which is to just hang
+ in a loop."
+ }
+
+ # ========================================================================
+
+ cdl_option CYGFUN_INFRA_DUMMY_STRLEN {
+ display "Provide dummy strlen() function"
+ requires !CYGINT_ISO_STRING_STRFUNCS
+ default_value { CYGINT_ISO_STRING_STRFUNCS == 0 }
+ compile strlen.cxx
+ description "
+ This option controls the inclusion of a dummy strlen() function.
+ Parts of the C and C++ compiler runtime systems contain references
+ to strlen(), particulary in the C++ exception handling code. It is
+ not possible to eliminate these references, so this dummy function
+ in included to satisfy them. While it is not expected that this function
+ will ever be called, it is functional but uses the simplest, smallest
+ algorithm. There is a faster version of strlen() in the C library."
+ }
+
+ # ========================================================================
+ # Debugging-related miscellania.
+
+ define_proc {
+ puts $::cdl_header "/***** proc output start *****/"
+ puts $::cdl_header "#include <pkgconf/system.h>"
+ puts $::cdl_header "/***** proc output end *****/"
+ }
+
+
+ # ========================================================================
+ # Global compiler option controls
+
+ cdl_option CYGBLD_INFRA_CFLAGS_WARNINGS_AS_ERRORS {
+ display "Make all compiler warnings show as errors"
+ requires { is_substr(CYGBLD_GLOBAL_CFLAGS, " -Werror") }
+ default_value 0
+ description "
+ Enabling this option will cause all compiler warnings to show
+ as errors and bring the library build to a halt. This is used
+ to ensure that the code base is warning free, and thus ensure
+ that newly introduced warnings stand out and get fixed before
+ they show up as weird run-time behavior."
+ }
+
+ cdl_option CYGBLD_INFRA_CFLAGS_PIPE {
+ display "Make compiler and assembler communicate by pipe"
+ requires { is_substr(CYGBLD_GLOBAL_CFLAGS, " -pipe") }
+ default_value 0
+ description "
+ Enabling this option will cause the compiler to feed the
+ assembly output the the assembler via a pipe instead of
+ via a temporary file. This normally reduces the build
+ time."
+ }
+
+ # ========================================================================
+ # Package compiler options
+
+ cdl_component CYGPKG_INFRA_OPTIONS {
+ display "Infra build options"
+ flavor none
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package."
+
+
+ cdl_option CYGPKG_INFRA_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the eCos infra package. These flags are used
+ in addition to the set of global flags."
+ }
+
+ cdl_option CYGPKG_INFRA_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the eCos infra package. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_INFRA_LDFLAGS_REMOVE {
+ display "Suppressed linker flags"
+ flavor data
+ no_define
+ default_value { "-Wl,--gc-sections" }
+ description "
+ This option modifies the set of linker flags for
+ building the eCos infra package tests. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_INFRA_LDFLAGS_ADD {
+ display "Additional linker flags"
+ flavor data
+ no_define
+ default_value { "-Wl,--fatal-warnings" }
+ description "
+ This option modifies the set of linker flags for
+ building the eCos infra package tests. These flags are added to
+ the set of global flags if present."
+ }
+
+ cdl_component CYGPKG_INFRA_TESTS {
+ display "Infra package tests"
+ flavor data
+ no_define
+ calculated { "tests/cxxsupp tests/diag_sprintf1 tests/diag_sprintf2" }
+
+ cdl_option CYGNUM_TESTS_RUN_COUNT {
+ display "Number of times a test runs"
+ flavor data
+ default_value 1
+ description "
+ This option controls the number of times tests will execute their
+ basic function. Not all tests will honor this setting, but those
+ that do will execute the test N times before terminating. A value
+ less than 0 indicates to run forever."
+ }
+ }
+
+ }
+}
diff --git a/cesar/ecos/packages/infra/current/cdl/startup.cdl b/cesar/ecos/packages/infra/current/cdl/startup.cdl
new file mode 100644
index 0000000000..9a7e039491
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/cdl/startup.cdl
@@ -0,0 +1,82 @@
+# ====================================================================
+#
+# startup.cdl
+#
+# Infrastructure startup configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Original data: bartv,hmt
+# Contributors:
+# Date: 1999-06-13
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+# =================================================================
+# The following options allow particular compatibility modes to be
+# enabled, when they require specialised support from the startup
+# process. These can affect the environment in which the program
+# runs.
+#
+# CYGSEM_START_UITRON_COMPATIBILITY enables compatibility with uItron.
+# You must configure uItron with the correct tasks, and then enabling this
+# option starts the uItron subsystem. It does this by invoking the function
+# cyg_uitron_start().
+#
+# Both these can also be done by the user overriding cyg_user_start(),
+# cyg_package_start(), or cyg_prestart(). Refer to the documentation on
+# how and when to do this.
+
+cdl_option CYGSEM_START_UITRON_COMPATIBILITY {
+ display "Start uITRON subsystem"
+ default_value 0
+ requires CYGPKG_UITRON
+ active_if CYGPKG_UITRON
+ description "
+ Generate a call to initialize the
+ uITRON compatibility subsystem
+ within the system version of cyg_package_start().
+ This enables compatibility with uITRON.
+ You must configure uITRON with the correct tasks before
+ starting the uItron subsystem.
+ If this is disabled, and you want to use uITRON,
+ you must call cyg_uitron_start() from your own
+ cyg_package_start() or cyg_userstart()."
+}
diff --git a/cesar/ecos/packages/infra/current/include/clist.hxx b/cesar/ecos/packages/infra/current/include/clist.hxx
new file mode 100644
index 0000000000..3a49223739
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/include/clist.hxx
@@ -0,0 +1,365 @@
+#ifndef CYGONCE_INFRA_CLIST_HXX
+#define CYGONCE_INFRA_CLIST_HXX
+
+//==========================================================================
+//
+// clist.hxx
+//
+// Standard types, and some useful coding macros.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-11-08
+// Purpose: Simple circular list implementation
+// Description: A simple implementation of circular lists.
+// Usage: #include "cyg/infra/clist.hxx"
+// ...
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/infra/cyg_type.h>
+
+// -------------------------------------------------------------------------
+// Class and structure conversion macros.
+// CYG_CLASSFROMFIELD translates a pointer to a field of a struct or
+// class into a pointer to the class.
+// CYG_OFFSETOFBASE yields the offset of a base class of a derived
+// class.
+// CYG_CLASSFROMBASE translates a pointer to a base class into a pointer
+// to a selected derived class. The base class object _must_ be part of
+// the specified derived class. This is essentially a poor mans version
+// of the RTTI dynamic_cast operator.
+// Caveat: These macros do not work for virtual base classes.
+
+// Note: These definitions are exact duplicates of definitions in
+// ktypes.h. If either definition is changed, the other should be too
+// to avoid compiler messages.
+
+#define CYG_CLASSFROMFIELD(_type_,_member_,_ptr_)\
+ ((_type_ *)((char *)(_ptr_)-((char *)&(((_type_ *)0)->_member_))))
+
+#define CYG_OFFSETOFBASE(_type_,_base_)\
+ ((char *)((_base_ *)((_type_ *)4)) - (char *)4)
+
+# define CYG_CLASSFROMBASE(_class_,_base_,_ptr_)\
+ ((_class_ *)((char *)(_ptr_) - CYG_OFFSETOFBASE(_class_,_base_)))
+
+
+// -------------------------------------------------------------------------
+// Cyg_DNode class.
+// This simply represents a double linked node that is intended to
+// be a base member of the class that is being managed.
+
+class Cyg_DNode
+{
+ friend class Cyg_CList;
+
+ Cyg_DNode *next;
+ Cyg_DNode *prev;
+
+public:
+
+ Cyg_DNode()
+ {
+ // Initialize pointers to point here
+ next = prev = this;
+ };
+
+ // Accessor and test functions
+ Cyg_DNode *get_next() { return next; };
+ Cyg_DNode *get_prev() { return prev; };
+ cyg_bool in_list() { return next != this; };
+
+ // Insert a node into the list before this one,
+ // so that it becomes this nodes predecessor in
+ // the list.
+ void insert( Cyg_DNode *node )
+ {
+ node->next = this;
+ node->prev = prev;
+ prev->next = node;
+ prev = node;
+ };
+
+ // Append a node after this one so that it become
+ // this nodes sucessor in the list.
+ void append( Cyg_DNode *node )
+ {
+ node->prev = this;
+ node->next = next;
+ next->prev = node;
+ next = node;
+ };
+
+ // Unlink this node from it's list. It is safe to apply this to an
+ // already unlinked node.
+ void unlink()
+ {
+ next->prev = prev;
+ prev->next = next;
+ next = prev = this;
+ };
+
+ ~Cyg_DNode()
+ {
+ // If this node is still linked, unlink it.
+ if( next != this )
+ unlink();
+ };
+
+};
+
+// -------------------------------------------------------------------------
+// Cyg_CList class.
+
+// This is a simple class that manages a circular list of DNodes. This
+// object points to the head of the list and provides functions to
+// manipulate the head and tail of the list.
+
+class Cyg_CList
+{
+ Cyg_DNode *head; // list head pointer
+
+public:
+
+ Cyg_CList()
+ {
+ head = NULL;
+ };
+
+ // Accessor and test functions
+ Cyg_DNode *get_head() { return head; };
+ Cyg_DNode *get_tail() { return head?head->prev:NULL; };
+ cyg_bool empty() { return head == NULL; };
+
+ // Add a node at the head of the list
+ void add_head( Cyg_DNode *node )
+ {
+ if( head == NULL )
+ head = node;
+ else
+ {
+ head->insert( node );
+ head = node;
+ }
+ };
+
+ // Remove the node at the head of the list
+ Cyg_DNode *rem_head()
+ {
+ Cyg_DNode *node = head;
+ if( node != NULL )
+ {
+ // There is a node available
+ Cyg_DNode *next = node->next;
+ if( next == node )
+ {
+ // Only node on list
+ head = NULL;
+ }
+ else
+ {
+ // remove head node and move head to next.
+ node->unlink();
+ head = next;
+ }
+ }
+ return node;
+ };
+
+
+ // Add a node at the tail of the list
+ void add_tail( Cyg_DNode *node )
+ {
+ if( head == NULL )
+ head = node;
+ else
+ head->insert( node );
+ };
+
+ // Remove the node at the tail of the list
+ Cyg_DNode *rem_tail()
+ {
+ if( head == NULL )
+ return NULL;
+
+ Cyg_DNode *node = head->prev;
+
+ if( node == head )
+ head = NULL;
+ else node->unlink();
+
+ return node;
+ };
+
+ // Merge the supplied list into this one, at the tail.
+ void merge( Cyg_CList& list )
+ {
+ if( list.head == NULL )
+ return; // Nothing to do
+ else if( head == NULL )
+ head = list.head; // this is empty, just move it
+ else
+ {
+ // We have a real merge to do. Adjust the pointers
+ // on the two lists so that they become one.
+
+ Cyg_DNode *lh = list.head;
+ Cyg_DNode *lt = lh->prev;
+ Cyg_DNode *tail = head->prev;
+
+ head->prev = lt;
+ lt->next = head;
+ tail->next = lh;
+ lh->prev = tail;
+ }
+ list.head = NULL;
+ };
+
+ // General removal. Deals with what happend if this is only
+ // object on list, or is the head.
+ void remove( Cyg_DNode *node )
+ {
+ if( node == head )
+ rem_head();
+ else node->unlink();
+ };
+
+ // Rotation - move the head to the next node in the list.
+ void rotate()
+ {
+ if( head )
+ head = head->next;
+ };
+
+ // Move a node to the head of the list. Assumes that the
+ // node is in this list.
+ void to_head( Cyg_DNode *node )
+ {
+ head = node;
+ };
+
+ // Insert a node before one in this list, and deal with what
+ // happens if the node happens to be at the head of the list.
+ void insert( Cyg_DNode *list_node, Cyg_DNode *node )
+ {
+ if( list_node == head )
+ {
+ head->insert( node );
+ head = node;
+ }
+ else list_node->insert( node );
+ };
+
+ ~Cyg_CList()
+ {
+ while( head != NULL )
+ rem_head();
+ };
+
+};
+
+// -------------------------------------------------------------------------
+// Cyg_CList_T
+// Template class that allows us to make use of the CList class in a
+// type-specific way.
+
+template <class T> class Cyg_CList_T
+ : public Cyg_CList
+{
+public:
+
+ Cyg_CList_T() {};
+ ~Cyg_CList_T() {};
+
+ T *get_head()
+ {
+ Cyg_DNode *node = Cyg_CList::get_head();
+ if( node ) return CYG_CLASSFROMBASE( T, Cyg_DNode, node );
+ return NULL;
+ };
+ T *get_tail()
+ {
+ Cyg_DNode *node = Cyg_CList::get_tail();
+ if( node ) return CYG_CLASSFROMBASE( T, Cyg_DNode, node );
+ return NULL;
+ };
+
+ T *rem_head()
+ {
+ Cyg_DNode *node = Cyg_CList::rem_head();
+ if( node ) return CYG_CLASSFROMBASE( T, Cyg_DNode, node );
+ return NULL;
+ };
+
+ T *rem_tail()
+ {
+ Cyg_DNode *node = Cyg_CList::rem_tail();
+ if( node ) return CYG_CLASSFROMBASE( T, Cyg_DNode, node );
+ return NULL;
+ };
+
+ // The rest just default to the Cyg_CList class operations.
+};
+
+// -------------------------------------------------------------------------
+// Cyg_DNode_T
+// Template class that allows us to make use of the DNode class in a
+// type-specific way.
+
+template <class T> class Cyg_DNode_T
+ : public Cyg_DNode
+{
+public:
+
+ Cyg_DNode_T() {};
+ ~Cyg_DNode_T() {};
+
+ T *get_next() { return CYG_CLASSFROMBASE( T, Cyg_DNode, Cyg_DNode::get_next() ); };
+ T *get_prev() { return CYG_CLASSFROMBASE( T, Cyg_DNode, Cyg_DNode::get_prev() ); };
+
+ // The rest just default to the Cyg_DNode class operations.
+};
+
+// -------------------------------------------------------------------------
+#endif // CYGONCE_INFRA_CLIST_HXX multiple inclusion protection
+// EOF clist.hxx
+
diff --git a/cesar/ecos/packages/infra/current/include/cyg_ass.h b/cesar/ecos/packages/infra/current/include/cyg_ass.h
new file mode 100644
index 0000000000..9f9290a1f6
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/include/cyg_ass.h
@@ -0,0 +1,619 @@
+#ifndef CYGONCE_INFRA_CYG_ASS_H
+#define CYGONCE_INFRA_CYG_ASS_H
+
+//==========================================================================
+//
+// assert.h
+//
+// Macros and prototypes for the assert system
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg from an original by hmt
+// Contributors: nickg
+// Date: 1997-09-08
+// Purpose: Use asserts to avoid writing duff code.
+// Description: Runtime tests that compile to nothing in
+// release versions of the code, to allow
+// as-you-go testing of alternate builds.
+// Usage: #include <cyg/infra/cyg_ass.h>
+// ...
+// CYG_ASSERT( pcount > 0, "Number of probes should be > 0!" );
+//
+// which can result, for example, in a message of the form:
+// ASSERT FAILED: probemgr.cxx:1340, scan_probes() :
+// number of probes should be > 0!
+// if the boolean "pcount > 0" is false.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/infra.h>
+
+#include <cyg/infra/cyg_type.h> // for CYGBLD_ATTRIB_NORET
+
+// -------------------------------------------------------------------------
+// If we do not have a function name macro, define it ourselves
+
+#if 0 // Hey! This is not eCos namespace!
+#ifndef CYGDBG_INFRA_DEBUG_FUNCTION_PSEUDOMACRO
+ // __PRETTY_FUNCTION__ does not work
+# ifndef __PRETTY_FUNCTION__ // And it is not already defined
+# define __PRETTY_FUNCTION__ NULL
+# endif
+#endif
+#endif
+
+// -------------------------------------------------------------------------
+// This is executed to deal with failure - breakpoint it first!
+// It is declared as a weak symbol to allow user code to override the
+// definition.
+
+externC void
+cyg_assert_fail( const char* /* psz_func */, const char* /* psz_file */,
+ cyg_uint32 /* linenum */, const char* /* psz_msg */ ) __THROW
+ CYGBLD_ATTRIB_NORET CYGBLD_ATTRIB_WEAK;
+
+externC void
+cyg_assert_msg( const char *psz_func, const char *psz_file,
+ cyg_uint32 linenum, const char *psz_msg ) __THROW;
+
+// -------------------------------------------------------------------------
+
+#ifdef CYGDBG_USE_ASSERTS
+
+// -------------------------------------------------------------------------
+// We define macros and appropriate prototypes for the assert/fail
+// system. These are:
+// CYG_FAIL - unconditional panic
+// CYG_ASSERT - panic if boolean expression is false
+// CYG_ASSERTC - compact version of CYG_ASSERT
+
+# ifdef CYGDBG_INFRA_DEBUG_ASSERT_MESSAGE
+# define CYG_ASSERT_DOCALL( _msg_ ) \
+ CYG_MACRO_START \
+ /* Make sure we always get a pretty-printed message */ \
+ cyg_assert_msg( __PRETTY_FUNCTION__, __FILE__, __LINE__, _msg_ ); \
+ cyg_assert_fail( __PRETTY_FUNCTION__, __FILE__, __LINE__, _msg_ );\
+ CYG_MACRO_END
+# else
+# define CYG_ASSERT_DOCALL( _msg_ ) \
+ CYG_MACRO_START \
+ const char* _tmp1_ = _msg_; \
+ _tmp1_ = _tmp1_; \
+ cyg_assert_fail( __PRETTY_FUNCTION__, __FILE__, __LINE__, NULL ); \
+ CYG_MACRO_END
+# endif
+
+// unconditional failure; use like panic(), coredump() &c.
+# define CYG_FAIL( _msg_ ) \
+ CYG_MACRO_START \
+ CYG_ASSERT_DOCALL( _msg_ ); \
+ CYG_MACRO_END
+
+// conditioned assert; if the condition is false, fail.
+# define CYG_ASSERT( _bool_, _msg_ ) \
+ CYG_MACRO_START \
+ if ( ! ( _bool_ ) ) \
+ CYG_ASSERT_DOCALL( _msg_ ); \
+ CYG_MACRO_END
+
+# define CYG_ASSERTC( _bool_ ) \
+ CYG_MACRO_START \
+ if ( ! ( _bool_ ) ) \
+ CYG_ASSERT_DOCALL( #_bool_ );\
+ CYG_MACRO_END
+
+#else // ! CYGDBG_USE_ASSERTS
+
+// -------------------------------------------------------------------------
+// No asserts: we define empty statements for assert & fail.
+
+# define CYG_FAIL( _msg_ ) CYG_EMPTY_STATEMENT
+# define CYG_ASSERT( _bool_, _msg_ ) CYG_EMPTY_STATEMENT
+# define CYG_ASSERTC( _bool_ ) CYG_EMPTY_STATEMENT
+
+#endif // ! CYGDBG_USE_ASSERTS
+
+// -------------------------------------------------------------------------
+// Pointer integrity checks.
+// These check not only for NULL pointer, but can also check for pointers
+// that are outside to defined memory areas of the platform or executable.
+// We differentiate between data and function pointers, so that we can cope
+// with different formats, and so we can check them against different memory
+// regions.
+
+externC cyg_bool cyg_check_data_ptr(const void *ptr);
+externC cyg_bool cyg_check_func_ptr(void (*ptr)(void));
+
+#ifdef CYGDBG_USE_ASSERTS
+
+# define CYG_CHECK_DATA_PTR( _ptr_, _msg_ ) \
+ CYG_MACRO_START \
+ if( !cyg_check_data_ptr((const void *)(_ptr_))) \
+ CYG_ASSERT_DOCALL( _msg_ ); \
+ CYG_MACRO_END
+
+# define CYG_CHECK_FUNC_PTR( _ptr_, _msg_ ) \
+ CYG_MACRO_START \
+ if( !cyg_check_func_ptr((void (*)(void))(_ptr_))) \
+ CYG_ASSERT_DOCALL( _msg_ ); \
+ CYG_MACRO_END
+
+# define CYG_CHECK_DATA_PTRC( _ptr_ ) \
+ CYG_MACRO_START \
+ if ( !cyg_check_data_ptr((const void *)(_ptr_))) \
+ CYG_ASSERT_DOCALL("data pointer (" #_ptr_ ") is valid");\
+ CYG_MACRO_END
+
+# define CYG_CHECK_FUNC_PTRC( _ptr_ ) \
+ CYG_MACRO_START \
+ if ( !cyg_check_func_ptr((void (*)(void))(_ptr_))) \
+ CYG_ASSERT_DOCALL("function pointer (" #_ptr_ ") is valid"); \
+ CYG_MACRO_END
+
+#else // CYGDBG_USE_ASSERTS
+
+# define CYG_CHECK_DATA_PTR( _ptr_, _msg_ ) CYG_EMPTY_STATEMENT
+# define CYG_CHECK_FUNC_PTR( _ptr_, _msg_ ) CYG_EMPTY_STATEMENT
+# define CYG_CHECK_DATA_PTRC( _ptr_ ) CYG_EMPTY_STATEMENT
+# define CYG_CHECK_FUNC_PTRC( _ptr_ ) CYG_EMPTY_STATEMENT
+
+#endif // CYGDBG_USE_ASSERTS
+
+// -------------------------------------------------------------------------
+// Unconditional definitions:
+
+// Check an object for validity by calling its own checker.
+// Usage:
+// ClassThing *p = &classobject;
+// CYG_ASSERTCLASS( p, "Object at p is broken!" );
+
+// this enum gives some options as to how keenly to test; avoids cluttering
+// the member function declaration if the implementor wants to do more
+// zealous tests themselves.
+
+enum cyg_assert_class_zeal {
+ cyg_system_test = -1,
+ cyg_none = 0,
+ cyg_trivial,
+ cyg_quick,
+ cyg_thorough,
+ cyg_extreme
+};
+
+// -------------------------------------------------------------------------
+// Define macros for checking classes:
+//
+// CYG_ASSERT_CLASS - do proforma check on a class pointer
+// CYG_ASSERT_CLASSO - do proforma check on a class object
+// CYG_ASSERT_ZERO_OR_CLASS- a class pointer is NULL or valid
+// CYG_ASSERT_THIS - "this" is valid
+// + 3 compact variants and two aliases for backwards compatibility.
+//
+// All of these end up going via CYG_ASSERT(), which will be an empty
+// statement if CYGDBG_USE_ASSERTS is disabled. There is no need to
+// test CYGDBG_USE_ASSERTS again here.
+//
+// The idiom required is that a class have a member function called
+// "bool check_this( cyg_assert_class_zeal ) const" that returns true
+// iff the object is OK. This need not be conditionally compiled against
+// CYGDBG_USE_ASSERTS but it can be if only this macro is used to
+// invoke it. Alternatively it can be invoked by hand with other
+// choices from the above enum.
+
+// Assert the checker function of an object by pointer, or in hand.
+
+#ifdef __cplusplus
+
+# ifndef CYG_ASSERT_CLASS_ZEAL
+# define CYG_ASSERT_CLASS_ZEAL (cyg_quick) // can be redefined locally
+# endif
+
+# define CYG_ASSERT_CLASS( _pobj_, _msg_ ) \
+ CYG_ASSERT( ((0 != (_pobj_)) && \
+ (_pobj_)->check_this( CYG_ASSERT_CLASS_ZEAL )), _msg_ )
+
+# define CYG_ASSERTCLASS( _pobj_,_msg_) \
+ CYG_ASSERT_CLASS( (_pobj_), _msg_ )
+
+# define CYG_ASSERT_CLASSO( _obj_, _msg_ ) \
+ CYG_ASSERT( (_obj_).check_this( CYG_ASSERT_CLASS_ZEAL ), _msg_ )
+
+# define CYG_ASSERTCLASSO( _obj_, _msg_ ) \
+ CYG_ASSERT_CLASSO( (_obj_), _msg_ )
+
+# define CYG_ASSERT_ZERO_OR_CLASS( _pobj_, _msg_ ) \
+ CYG_ASSERT( ((0 == (_pobj_)) || \
+ (_pobj_)->check_this( CYG_ASSERT_CLASS_ZEAL )), _msg_ )
+
+# define CYG_ASSERT_THIS( _msg_ ) \
+ CYG_ASSERT( this->check_this( CYG_ASSERT_CLASS_ZEAL ), _msg_ )
+
+# define CYG_ASSERT_CLASSC( _pobj_ ) \
+ CYG_ASSERT_CLASS( (_pobj_), "class pointer (" #_pobj_ ") is valid" )
+
+# define CYG_ASSERT_CLASSOC( _obj_ ) \
+ CYG_ASSERT_CLASSO( (_obj_), "object (" #_obj_ ") is valid" )
+
+# define CYG_ASSERT_ZERO_OR_CLASSC( _pobj_ ) \
+ CYG_ASSERT_ZERO_OR_CLASS((_pobj_), \
+ "class pointer (" #_pobj_ ") is zero or valid")
+
+# define CYG_ASSERT_THISC( ) \
+ CYG_ASSERT_THIS( "\"this\" pointer is valid" )
+
+#define CYGDBG_DEFINE_CHECK_THIS \
+ cyg_bool check_this( cyg_assert_class_zeal zeal ) const;
+
+#endif // __cplusplus
+
+// -------------------------------------------------------------------------
+// Some alternative names for basic assertions that we can disable
+// individually.
+//
+// CYG_PRECONDITION - argument checking etc
+// CYG_POSTCONDITION - results etc
+// CYG_LOOP_INVARIANT - for putting in loops
+//
+// C++ programmers have class-related variants of all of these.
+
+#ifdef CYGDBG_INFRA_DEBUG_PRECONDITIONS
+# define CYG_PRECONDITION( _bool_ , _msg_ ) CYG_ASSERT( _bool_, _msg_ )
+# define CYG_PRECONDITIONC( _bool_ ) \
+ CYG_ASSERT( _bool_, "precondition " #_bool_)
+#else
+# define CYG_PRECONDITION( _bool_ , _msg_ ) CYG_EMPTY_STATEMENT
+# define CYG_PRECONDITIONC( _bool_ ) CYG_EMPTY_STATEMENT
+#endif
+
+#ifdef CYGDBG_INFRA_DEBUG_POSTCONDITIONS
+# define CYG_POSTCONDITION( _bool_ , _msg_ ) CYG_ASSERT( _bool_, _msg_ )
+# define CYG_POSTCONDITIONC( _bool_ ) \
+ CYG_ASSERT( _bool_, "postcondition " #_bool_)
+#else
+# define CYG_POSTCONDITION( _bool_ , _msg_ ) CYG_EMPTY_STATEMENT
+# define CYG_POSTCONDITIONC( _bool_ ) CYG_EMPTY_STATEMENT
+#endif
+
+#ifdef CYGDBG_INFRA_DEBUG_LOOP_INVARIANTS
+# define CYG_LOOP_INVARIANT( _bool_ , _msg_ ) CYG_ASSERT( _bool_, _msg_ )
+# define CYG_LOOP_INVARIANTC( _bool_ ) \
+ CYG_ASSERT( _bool_, "loop invariant " #_bool_ )
+#else
+# define CYG_LOOP_INVARIANT( _bool_ , _msg_ ) CYG_EMPTY_STATEMENT
+# define CYG_LOOP_INVARIANTC( _bool_ ) CYG_EMPTY_STATEMENT
+#endif
+
+#ifdef __cplusplus
+
+// All variants of _CLASS
+# define CYG_PRECONDITION_CLASS( _pobj_, _msg_ ) \
+ CYG_PRECONDITION( ((0 != (_pobj_)) && \
+ (_pobj_)->check_this(CYG_ASSERT_CLASS_ZEAL)), _msg_)
+
+# define CYG_PRECONDITION_CLASSC( _pobj_ ) \
+ CYG_PRECONDITION_CLASS( (_pobj_), \
+ "precondition, class pointer (" #_pobj_ ") is valid" )
+
+# define CYG_POSTCONDITION_CLASS( _pobj_, _msg_ ) \
+ CYG_POSTCONDITION( ((0 != (_pobj_)) && \
+ (_pobj_)->check_this(CYG_ASSERT_CLASS_ZEAL)), _msg_)
+
+# define CYG_POSTCONDITION_CLASSC( _pobj_ ) \
+ CYG_POSTCONDITION_CLASS( (_pobj_), \
+ "postcondition, class pointer (" #_pobj_ ") is valid" )
+
+# define CYG_LOOP_INVARIANT_CLASS( _pobj_, _msg_) \
+ CYG_LOOP_INVARIANT( ((0 != (_pobj_)) && \
+ (_pobj_)->check_this(CYG_ASSERT_CLASS_ZEAL)), _msg_)
+
+# define CYG_LOOP_INVARIANT_CLASSC( _pobj_ ) \
+ CYG_LOOP_INVARIANT_CLASS( (_pobj_), \
+ "loop invariant, class pointer (" #_pobj_ ") is valid" )
+
+// All variants of _CLASSO
+# define CYG_PRECONDITION_CLASSO( _obj_, _msg_ ) \
+ CYG_PRECONDITION( (_obj_).check_this(CYG_ASSERT_CLASS_ZEAL), _msg_)
+
+# define CYG_PRECONDITION_CLASSOC( _obj_ ) \
+ CYG_PRECONDITION_CLASSO( (_obj_), \
+ "precondition, object (" #_obj_ ") is valid" )
+
+# define CYG_POSTCONDITION_CLASSO( _obj_, _msg_ ) \
+ CYG_POSTCONDITION( (_obj_).check_this(CYG_ASSERT_CLASS_ZEAL), _msg_)
+
+# define CYG_POSTCONDITION_CLASSOC( _obj_ ) \
+ CYG_POSTCONDITION_CLASSO( (_obj_), \
+ "postcondition, object (" #_obj_ ") is valid" )
+
+# define CYG_LOOP_INVARIANT_CLASSO( _obj_, _msg_) \
+ CYG_LOOP_INVARIANT( (_obj_).check_this(CYG_ASSERT_CLASS_ZEAL), _msg_)
+
+# define CYG_LOOP_INVARIANT_CLASSOC( _obj_ ) \
+ CYG_LOOP_INVARIANT_CLASSO( (_obj_), \
+ "loop invariant, object (" #_obj_ ") is valid" )
+
+// All variants of _ZERO_OR_CLASS
+# define CYG_PRECONDITION_ZERO_OR_CLASS( _pobj_, _msg_ ) \
+ CYG_PRECONDITION( ((0 == (_pobj_)) || \
+ (_pobj_)->check_this(CYG_ASSERT_CLASS_ZEAL)), _msg_)
+
+# define CYG_PRECONDITION_ZERO_OR_CLASSC( _pobj_ ) \
+ CYG_PRECONDITION_ZERO_OR_CLASS( (_pobj_), \
+ "precondition, class pointer (" #_pobj_ ") is zero or valid" )
+
+# define CYG_POSTCONDITION_ZERO_OR_CLASS( _pobj_, _msg_ ) \
+ CYG_POSTCONDITION( ((0 == (_pobj_)) || \
+ (_pobj_)->check_this(CYG_ASSERT_CLASS_ZEAL)), _msg_)
+
+# define CYG_POSTCONDITION_ZERO_OR_CLASSC( _pobj_ ) \
+ CYG_POSTCONDITION_ZERO_OR_CLASS( (_pobj_), \
+ "postcondition, class pointer (" #_pobj_ ") is zero or valid" )
+
+# define CYG_LOOP_INVARIANT_ZERO_OR_CLASS( _pobj_, _msg_) \
+ CYG_LOOP_INVARIANT( ((0 == (_pobj_)) || \
+ (_pobj_)->check_this(CYG_ASSERT_CLASS_ZEAL)), _msg_)
+
+# define CYG_LOOP_INVARIANT_ZERO_OR_CLASSC( _pobj_ ) \
+ CYG_LOOP_INVARIANT_ZERO_OR_CLASS( (_pobj_), \
+ "loop invariant, class pointer (" #_pobj_ ") is zero or valid" )
+
+// All variants of _THIS
+# define CYG_PRECONDITION_THIS( _msg_ ) \
+ CYG_PRECONDITION( this->check_this(CYG_ASSERT_CLASS_ZEAL), _msg_)
+
+# define CYG_PRECONDITION_THISC() \
+ CYG_PRECONDITION_THIS( "precondition, \"this\" is valid" )
+
+# define CYG_POSTCONDITION_THIS( _msg_ ) \
+ CYG_POSTCONDITION( this->check_this(CYG_ASSERT_CLASS_ZEAL), _msg_)
+
+# define CYG_POSTCONDITION_THISC() \
+ CYG_POSTCONDITION_THIS( "postcondition, \"this\" is valid" )
+
+# define CYG_LOOP_INVARIANT_THIS( _msg_) \
+ CYG_LOOP_INVARIANT( this->check_this(CYG_ASSERT_CLASS_ZEAL), _msg_)
+
+# define CYG_LOOP_INVARIANT_THISC() \
+ CYG_LOOP_INVARIANT_THIS( "loop invariant, \"this\" is valid" )
+
+#endif // __cplusplus
+
+// -------------------------------------------------------------------------
+// Invariants. These are a bit more interesting. The ordinary invariants
+// take an arbitrary boolean expression, and C++ does not provide any way
+// of evaluating this expression automatically on entry and exit - any
+// attempt to use local objects leads to trying to evaluate the expression
+// when it is not in scope. This problem does not arise with objects.
+//
+// For C++ objects it is possible to do a bit better. A template can be
+// used to create a local object whose constructor will validate the
+// target object and whose destructor will validate the target object
+// again. Unfortunately it is necessary to pass the type as well as
+// the object: typeof() is a gcc extension, and RTTI's typeid facility
+// would provide the derived class and not what we actually want.
+
+#ifdef CYGDBG_INFRA_DEBUG_INVARIANTS
+
+# define CYG_INVARIANT( _bool_, _msg_ ) \
+ CYG_MACRO_START \
+ if ( ! ( _bool_ ) ) \
+ CYG_ASSERT_DOCALL( _msg_ ); \
+ CYG_MACRO_END
+
+# define CYG_INVARIANTC( _bool_ ) \
+ CYG_MACRO_START \
+ if ( ! ( _bool_ ) ) \
+ CYG_ASSERT_DOCALL( "invariant (" #_bool_ ")" ); \
+ CYG_MACRO_END
+
+# ifdef __cplusplus
+// NOTE: if the compiler does not manage to inline the appropriate
+// template functions then the impact on code size and performance becomes
+// rather large. But there are significant performance overheads anyway
+// simply because of the call to check_this()...
+//
+template<class X> class __CygInvariantObject {
+
+ const X* rep;
+
+ private:
+ // Prevent access to the default constructors.
+ __CygInvariantObject() { }
+ __CygInvariantObject( const __CygInvariantObject& arg ) { }
+ __CygInvariantObject & operator=( const __CygInvariantObject & arg) { return *this; }
+
+ public:
+ __CygInvariantObject( X* arg, const char* msg ) : rep(arg) {
+ if ( !rep->check_this( CYG_ASSERT_CLASS_ZEAL ) )
+ CYG_ASSERT_DOCALL( msg );
+ }
+ __CygInvariantObject( X& arg, const char* msg ) : rep(&arg) {
+ if ( !rep->check_this( CYG_ASSERT_CLASS_ZEAL ) )
+ CYG_ASSERT_DOCALL( msg );
+ }
+ __CygInvariantObject( const X* arg, const char* msg ) : rep(arg) {
+ if ( !rep->check_this( CYG_ASSERT_CLASS_ZEAL ) )
+ CYG_ASSERT_DOCALL( msg );
+ }
+ __CygInvariantObject( const X& arg, const char* msg ) : rep(&arg) {
+ if ( !rep->check_this( CYG_ASSERT_CLASS_ZEAL ) )
+ CYG_ASSERT_DOCALL( msg );
+ }
+ ~__CygInvariantObject( ) {
+ if ( !rep->check_this( CYG_ASSERT_CLASS_ZEAL ) )
+ CYG_ASSERT_DOCALL( "invariant, object valid on exit" );
+ rep = 0;
+ };
+};
+
+//
+// These macros provide sensible concatenation facilities at
+// the C preprocessor level, getting around complications in the
+// macro expansion rules related to __LINE__ and __FILE__.
+
+# define __CYG_INVARIANT_CLASSNAME_AUX( a, b) a ## b
+# define __CYG_INVARIANT_CLASSNAME( a, b ) \
+ __CYG_INVARIANT_CLASSNAME_AUX( a, b )
+
+
+// These macro definitions do not use CYG_MACRO_START because
+// I do not want the scope of the local objects to get confused.
+//
+// The first line of the macro expansion specifies the type of
+// the local object being created. The second line invents a
+// name for this object. The third line provides command-line
+// arguments.
+
+# define CYG_INVARIANT_CLASS( _type_, _pobj_, _msg_ ) \
+ __CygInvariantObject<_type_> \
+ __CYG_INVARIANT_CLASSNAME( __invariant_class_, __LINE__ ) \
+ ( _pobj_, _msg_ )
+
+# define CYG_INVARIANT_CLASSC( _type_, _pobj_ ) \
+ __CygInvariantObject<_type_> \
+ __CYG_INVARIANT_CLASSNAME( __invariant_class_, __LINE__ ) \
+ ( _pobj_, "invariant, class pointer (" #_pobj_ ") is valid" )
+
+# define CYG_INVARIANT_CLASSO( _type_, _obj_, _msg_ ) \
+ __CygInvariantObject<_type_> \
+ __CYG_INVARIANT_CLASSNAME( __invariant_class_, __LINE__ ) \
+ ( _obj_, _msg_ )
+
+# define CYG_INVARIANT_CLASSOC( _type_, _obj_ ) \
+ __CygInvariantObject<_type_> \
+ __CYG_INVARIANT_CLASSNAME( __invariant_class_, __LINE__ ) \
+ ( _obj_, "invariant, object (" #_obj_ ") is valid" )
+
+# define CYG_INVARIANT_THIS( _type_, _msg_ ) \
+ __CygInvariantObject<_type_> \
+ __CYG_INVARIANT_CLASSNAME( __invariant_class_, __LINE__ ) \
+ ( this, _msg_ )
+
+# define CYG_INVARIANT_THISC( _type_ ) \
+ __CygInvariantObject<_type_> \
+ __CYG_INVARIANT_CLASSNAME( __invariant_class_, __LINE__ ) \
+ ( this, "invariant, \"this\" is valid" )
+
+# endif // __cplusplus
+
+#else // !CYGDBG_INFRA_DEBUG_INVARIANTS
+
+# define CYG_INVARIANT( _bool_, _msg_ ) CYG_EMPTY_STATEMENT
+# define CYG_INVARIANTC( _bool_ ) CYG_EMPTY_STATEMENT
+
+# ifdef __cplusplus
+
+# define CYG_INVARIANT_CLASS( _type_, _pobj_, _msg_ )
+# define CYG_INVARIANT_CLASSC( _type_, _pobj_ )
+# define CYG_INVARIANT_CLASSO( _type_, _obj_, _msg_ )
+# define CYG_INVARIANT_CLASSOC( _type_, _obj_ )
+# define CYG_INVARIANT_THIS( _type_, _msg_ )
+# define CYG_INVARIANT_THISC( _type_ )
+
+# endif
+
+#endif // CYGDBG_INFRA_DEBUG_INVARIANTS
+
+// -------------------------------------------------------------------------
+// Compile time failure; like #error but in a macro so we can use it in
+// other definitions.
+//
+// Usage:
+// #define new CYG_COMPILETIMEFAIL( "Do NOT use new!")
+
+#define CYG_COMPILETIMEFAIL( _msg_ ) !!!-- _msg_ --!!!
+
+
+// -------------------------------------------------------------------------
+// The host-side implementation of the infrastructure provides a number
+// of additional functions that allow applications to provide their own
+// implementation of cyg_assert_fail(). This is not strictly necessary
+// since the presence of cyg_assert_fail() in the application would
+// override the one in the library anyway, but it is useful to make
+// certain functionality more readily available.
+//
+// These declarations are only available if the symbol
+// CYG_DECLARE_HOST_ASSERTION_SUPPORT is defined.
+#ifdef CYG_DECLARE_HOST_ASSERTION_SUPPORT
+
+// The default assertion handler writes its output to a file and
+// if possible a suitable message to stdout. It is possible to
+// install an alternative handler. If this alternative returns false
+// then the default handler will be invoked instead, otherwise the
+// application will exit.
+externC void cyg_assert_install_failure_handler(
+ bool (*)(const char* /* psz_func */,
+ const char* /* psz_file */,
+ cyg_uint32 /* linenum */,
+ const char* /* psz_msg */) );
+
+// Register a callback that should get invoked as part of handling an
+// assertion failure and that will typically produce some additional
+// output. For example the trace code will install a callback to output
+// trace information.
+//
+// The first argument is a string identifying the callback. The second
+// argument is a function pointer for the callback itself, whose
+// argument is another function that can be invoked for output.
+externC void cyg_assert_install_failure_callback(
+ const char* /* name */,
+ void (*)( void (*)(const char*) ));
+
+// This function can be called by assert failure handlers to invoke
+// the installed callbacks. The three arguments are function pointers
+// that get invoked prior to callback invocation, by the callback itself,
+// and after each callback. In the first case the argument will be the
+// callback name.
+externC void cyg_assert_failure_invoke_callbacks(
+ void (*)(const char* /* name */),
+ void (*)(const char* /* callback data */ ),
+ void (*)(void) );
+
+// This function is intended to be called from inside gdb instead of
+// cyg_assert_fail(),, without the need to specify a filename or
+// anything else.
+externC void cyg_assert_quickfail(void);
+
+#endif // CYG_DECLARE_HOST_ASSERTION_SUPPORT
+
+// -------------------------------------------------------------------------
+
+#endif // CYGONCE_INFRA_CYG_ASS_H multiple inclusion protection
+// EOF cyg_ass.h
diff --git a/cesar/ecos/packages/infra/current/include/cyg_trac.h b/cesar/ecos/packages/infra/current/include/cyg_trac.h
new file mode 100644
index 0000000000..d2529183ca
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/include/cyg_trac.h
@@ -0,0 +1,1655 @@
+#ifndef CYGONCE_INFRA_CYG_TRAC_H
+#define CYGONCE_INFRA_CYG_TRAC_H
+
+//==========================================================================
+//
+// cyg_trac.h
+//
+// Macros and prototypes for the tracing system
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg from an original by hmt
+// Contributors: nickg
+// Date: 1998-04-23
+// Purpose: Use traces to log procedure entry, and "print" stuff
+// Description: Runtime logging messages that compile to nothing in
+// release versions of the code, to allow
+// as-you-go tracing of alternate builds.
+// Usage: #include <cyg/infra/cyg_trac.h>
+// ...
+// CYG_TRACE2( PIPE_TRACE, "pipe %x, data %d", ppipe, oword );
+//
+// which can result, for example, in a message of the form:
+// "TRACE: pipemgr.cxx:1340, write_pipe(): pipe 0x8004c, data 17"
+//
+//####DESCRIPTIONEND####
+//
+
+/****************************************************************************
+
+Explicit tracing
+================
+
+CYG_TRACE0( bool, msg );
+CYG_TRACE1( bool, msg, arg1 );
+CYG_TRACE2( bool, msg, arg1, arg2 );
+....
+CYG_TRACE8( bool, msg, .... [with 8 args] );
+
+In general, the bool controls whether or not the tracing occurs for a
+particular invocation of the macro. The msg is a printf-style string,
+though exactly which formats are supported depends on the underlying
+implementation. Typically, at least %d, %x, %08x, %c and %s will be
+supported. Of course a most compact implementation might print
+
+ TRACE:z1dbuff.c[92]get_nextdata(): data pointer %x offset %d: 42BD8 1C
+
+or some such, leaving you to work it out for yourself.
+
+It is expected that the boolean would rarely actually be a complex
+expression; it is more likely that it would either be "1", tracing being
+controlled for the whole compilation unit or subsystem by means of the
+CYGDBG_USE_TRACING symbol, or a local symbol for tracing over the whole
+file, defined to 0 or to 1. For runtime control of tracing in a debugging
+session, it is typical to use symbols defined to expressions such as:
+
+ static int xxx_trace = 0;
+ #define TL1 (0 < xxx_trace)
+ #define TL2 (1 < xxx_trace)
+
+so you set xxx_trace to 1 to enable those messages conditioned by TL1
+(trace level 1) and so on.
+
+ CYG_TRACE1( TL1, "Major argument is %d", zz );
+ CYG_TRACE4( TL2, "...minor details %d %d %d %d", m1, m2, m3 ,m4 );
+
+To assist with the case where the same symbol or expression is used
+throughout a compilation unit, the programmer can define the symbol
+CYG_TRACE_USER_BOOL as they choose and then use convenience macros with the
+suffix 'B' in the obvious manner:
+
+ #define CYG_TRACE_USER_BOOL (xxx_trace > 0)
+ CYG_TRACE2B( "Counters are %d, %d", countlo, counthi );
+
+For the case where you just want to print a load of numbers in hex, or
+decimal, convenience suffices X, D and Y are provided. X uses %08x, D %d
+and Y an unadorned %x for each argument.
+
+ CYG_TRACE3D( TL2, m1, m2, d );
+
+If you want to do something similar but with a little more comment, the
+names (strictly spellings) of the variables you are printing can be used by
+appending a V to the X, D or Y.
+
+ CYG_TRACE3DV( TL2, m1, m2, d );
+
+might output:
+
+ TRACE:z1dbuff.c[92]get_nextdata(): m1=23 m2=-4 d=55
+
+These conveniences can be combined, and they apply equally to tracing with
+up to 8 variables; the B for Bool goes last:
+
+ CYG_TRACE4DVB( i, i*i, i*i*i, i*i*i*i );
+
+might output:
+
+ TRACE:table.c[12]main(): i=3 i*i=9 i*i*i=27 i*i*i*i=81
+
+
+Function Tracing
+================
+
+There are also facities for easily reporting function entry and exit,
+printing the function arguments, and detecting returns without logging (or
+without a value!).
+
+The basic facility is
+
+ CYG_REPORT_FUNCTION();
+
+In C, place this between the local variable declarations and the first
+statement or errors will ensue. C++ is more flexible; place the macro as
+the first line of all functions you wish to trace. The following
+variations are also provided:
+
+ CYG_REPORT_FUNCTYPE( exitmsg ) provide a printf string for the type
+ of the returned value
+ CYG_REPORT_FUNCNAME( name ) supply a function name explicitly, for
+ if __FUNCTION__ is not supported
+ CYG_REPORT_FUNCNAMETYPE( name, exitmsg ) both of the above extensions
+
+These are unconditional; the assumption is that if function reporting is
+used at all it will be used for all functions within a compilation unit.
+However, it is useful to be able to control function reporting at finer
+grain without editing the source files concerned, at compile time or at
+runtime. To support this, conditioned versions (with suffix 'C') are
+provided for the above four macros, which only procduce trace output if the
+macro CYG_REPORT_USER_BOOL evaluates true.
+
+ CYG_REPORT_FUNCTIONC()
+ CYG_REPORT_FUNCNAMEC( name )
+ CYG_REPORT_FUNCTYPEC( exitmsg )
+ CYG_REPORT_FUNCNAMETYPEC( name, exitmsg )
+
+You can define CYG_REPORT_USER_BOOL to anything you like before invoking
+these macros; using a simple -DCYG_REPORT_USER_BOOL=0 or ...=1 on the
+compiler command line would do the trick, but there is more flexibility to
+be gained by something like:
+
+ #define CYG_REPORT_USER_BOOL (reporting_bool_FOO)
+ #ifdef TRACE_FOO
+ int reporting_bool_FOO = 1;
+ #else
+ int reporting_bool_FOO = 0;
+ #endif
+
+where FOO relates to the module name. Thus an external symbol sets the
+default, but it can be overridden in a debugging session by setting the
+variable reporting_bool_FOO.
+
+Note that the condition applied to the initial CYG_REPORT_FUNC...() macro
+controls all function-related reporting (not tracing) from that function;
+the underlying mechanisms still operate even if no output is created. Thus
+no conditioned variants of CYG_REPORT_FUNCARG[s] nor of CYG_REPORT_RETURN
+are needed.
+
+Examples:
+ int myfunction()
+ {
+ CYG_REPORT_FUNCTYPE( "recode is %d" );
+
+A function return is traced using
+
+ CYG_REPORT_RETURN() a void return
+ CYG_REPORT_RETVAL( value ) returning a value
+
+With the CYG_REPORT_FUNCTYPE example, the latter might produce a message
+like:
+
+ TRACE:myprog.c[40]fact(): enter
+ TRACE:myprog.c[53]fact(): retcode is 24
+
+It is also useful to trace the values of the arguments to a function:
+ CYG_REPORT_FUNCARGVOID confirms that the function is void
+ CYG_REPORT_FUNCARG1( format, arg ) printf-style
+ to
+ CYG_REPORT_FUNCARG8( format, arg1...arg8 ) printf-style
+
+The CYG_REPORT_FUNCARG[1-8] macros are also offered with the convenience
+extensions: D, X, or Y, and V like the explicit tracing macros. For
+example:
+
+ int fact( int number )
+ {
+ CYG_REPORT_FUNCTYPE( "recode is %d" );
+ CYG_REPORT_FUNCARG1DV( number );
+ int result = number;
+ while ( --number > 1 ) result *= number
+ CYG_REPORT_RETVAL( result );
+ return result;
+ }
+
+might produce:
+
+ TRACE:myprog.c[40]fact(): enter
+ TRACE:myprog.c[40]fact(): number=4
+ TRACE:myprog.c[53]fact(): retcode is 24
+
+If no exit message is provided, a default of %08x is used.
+
+
+General Configury
+=================
+
+If CYGDBG_INFRA_DEBUG_FUNCTION_PSEUDOMACRO is *not* defined, it is assumed
+that __PRETTY_FUNCTION__ or equivalents do not exist, so no function name
+tracing is possible; only file and line number.
+
+If CYGDBG_INFRA_DEBUG_TRACE_MESSAGE is *not* defined, the message and
+arguments to all tracing macros are not used; only "execution was here"
+type information, by file, function and line number, is available. This
+can greatly reduce the size of an image with tracing disabled, which may be
+crucial in debugging on actual shipped hardware with limited memory.
+
+If configured for buffered tracing then CYG_TRACE_PRINT() can be used to
+output the contents of the trace buffer on demand.
+
+CYG_TRACE_DUMP() outputs a form of "core dump" containing info on the
+scheduler and threads at the time. This information will be invalid if
+the kernel is not running.
+
+C/C++: in C++ the function reporting is implemented using a class object
+with a destructor; this allows reporting of a return which has not been
+explicitly reported, and detection of accidental multiple return reports.
+This helps you write the function reporting correctly. In C it is not
+possible to be so sophisticated, so the implementation is not so helpful in
+detecting errors in the use of the tracing system.
+
+Note that for all of the above variations, the internal API to the
+functions which are called in consequence of tracing remains the same, so
+these variations can be mixed in the same executable, by configuring the
+tracing macros differently in different compilation units or subsystems.
+
+
+Summary
+=======
+
+Explicit tracing
+----------------
+
+CYG_TRACE0( bool, msg ) if bool, print msg
+CYG_TRACE1( bool, msg, arg ) if bool, printf-style
+ to
+CYG_TRACE8( bool, msg, arg1...arg8 ) if bool, printf-style
+
+CYG_TRACE0B( msg, args... ) to CYG_TRACE8B() use CYG_TRACE_USER_BOOL
+
+CYG_TRACE1X( bool, args... ) to CYG_TRACE8X() print args using %08x
+CYG_TRACE1Y( bool, args... ) to CYG_TRACE8Y() print args using %x
+CYG_TRACE1D( bool, args... ) to CYG_TRACE8D() print args using %d
+
+CYG_TRACE1XV( bool, args... ) to CYG_TRACE8XV() print args using "arg=%08x"
+CYG_TRACE1YV( bool, args... ) to CYG_TRACE8YV() print args using "arg=%x"
+CYG_TRACE1DV( bool, args... ) to CYG_TRACE8DV() print args using "arg=%d"
+
+CYG_TRACE1XB( args... ) to CYG_TRACE8XB() print using %08x, no bool
+CYG_TRACE1YB( args... ) to CYG_TRACE8YB() print using %x, no bool
+CYG_TRACE1DB( args... ) to CYG_TRACE8DB() print using %d, no bool
+
+CYG_TRACE1XVB( args... ) to CYG_TRACE8XVB() use "arg=%08x", no bool
+CYG_TRACE1YVB( args... ) to CYG_TRACE8YVB() use "arg=%x", no bool
+CYG_TRACE1DVB( args... ) to CYG_TRACE8DVB() use "arg=%d", no bool
+
+Function tracing
+----------------
+
+CYG_REPORT_FUNCTION() default function entry
+CYG_REPORT_FUNCNAME( name ) name the function
+CYG_REPORT_FUNCTYPE( exitmsg ) printf for retval
+CYG_REPORT_FUNCNAMETYPE( name, exitmsg ) both
+
+CYG_REPORT_FUNCTIONC() as above, but conditional
+CYG_REPORT_FUNCNAMEC( name ) on CYG_REPORT_USER_BOOL
+CYG_REPORT_FUNCTYPEC( exitmsg ) however it is defined
+CYG_REPORT_FUNCNAMETYPEC( name, exitmsg ) ...
+
+CYG_REPORT_RETURN() void function exit
+CYG_REPORT_RETVAL( value ) returning value
+
+CYG_REPORT_FUNCARGVOID() void function entry
+CYG_REPORT_FUNCARG1( format, arg ) printf-style
+ to
+CYG_REPORT_FUNCARG8( format, arg1...arg8 ) printf-style
+
+CYG_REPORT_FUNCARG1X( arg )
+ to
+CYG_REPORT_FUNCARG8X( arg1...arg8 ) use %08x
+CYG_REPORT_FUNCARG1Y... use %x
+CYG_REPORT_FUNCARG1D... use %d
+
+CYG_REPORT_FUNCARG1XV... use "arg=%08x"
+CYG_REPORT_FUNCARG1YV... use "arg=%x"
+CYG_REPORT_FUNCARG1DV... use "arg=%d"
+
+Other
+-----
+
+CYG_TRACE_DUMP() dumps kernel state
+CYG_TRACE_PRINT() prints buffered tracing
+
+
+---------------------------------------------------------------------------
+
+Internal Documentation
+======================
+
+The required functions which are used by the tracing macros are
+
+ externC void
+ cyg_tracenomsg( const char *psz_func, const char *psz_file,
+ cyg_uint32 linenum );
+
+ externC void
+ cyg_tracemsg( cyg_uint32 what, const char *psz_func, const char *psz_file,
+ cyg_uint32 linenum, const char *psz_msg );
+
+ externC void
+ cyg_tracemsg2( cyg_uint32 what,
+ const char *psz_func, const char *psz_file,
+ cyg_uint32 linenum, const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1 );
+ // extended in the obvious way for 4,6,8 arguments
+
+These functions should expect psz_func and psz_file to possibly be NULL in
+case those facilities are not available in the compilation environment, and
+do something safe in such cases. A NULL message should really be dealt
+with safely also, just logging "execution here" info like cyg_tracenomsg().
+
+Discussion of possible underlying implementations
+-------------------------------------------------
+
+It is intended that the functions that get called can simply print the info
+they are given in as fancy a format as you like, or they could do the
+printf-type formatting and log the resulting text in a buffer. They get
+told the type of event (function-entry, function-arguments, function-exit
+or plain tracing info) and so can perform fancy indenting, for example, to
+make call stack inspection more obvious to humans. It is also intended
+that a more compact logging arrangement be possible, for example one which
+records, in 32-bit words (CYG_ADDRWORDs), the addresses of the file,
+function and msg strings, the line number and the arguments. This has the
+implication that the msg string should not be constructed dynamically but
+be static ie. a plain quoted C string. The number of arguments also must
+be recorded, and if it is chosen to save string arguments in the buffer
+rather than just their addresses (which could be invalid by the time the
+logged information is processed) some flagging of which arguments are
+strings must be provided. The system could also be extended to deal with
+floats of whichever size fir in a CYG_ADDRWORD; these would probably
+require special treatment also. With these considerations in mind, the
+maximum number of parameters in a single trace message has been set to 8,
+so that a byte bitset could be used to indicate which arguments are
+strings, another for those which are floats, and the count of arguments
+also fits in a byte as number or a bitset.
+
+
+****************************************************************************/
+
+#include <pkgconf/infra.h>
+
+#include <cyg/infra/cyg_ass.h>
+
+// -------------------------------------------------------------------------
+// CYGDBG_INFRA_DEBUG_FUNCTION_PSEUDOMACRO is dealt with in cyg_ass.h.
+// -------------------------------------------------------------------------
+
+#ifdef CYGDBG_USE_TRACING
+
+// -------------------------------------------------------------------------
+// We define macros and appropriate prototypes for the trace/fail
+// system. These are:
+// CYG_TRACE0..8 - trace if boolean
+// CYG_TRACEPROC - default no comment proc entry
+// CYG_TRACEPROCOUT - default no comment proc exit
+// CYG_TRACE_DUMP - outputs a form of "core dump", including the state
+// of the kernel scheduler, threads, etc.
+// CYG_TRACE_PRINT - Forces manual output of any trace info that has
+// been buffered up.
+
+// these are executed to deal with tracing - breakpoint?
+
+externC void
+cyg_tracenomsg( const char *psz_func, const char *psz_file, cyg_uint32 linenum );
+
+externC void
+cyg_trace_dump(void);
+
+#define CYG_TRACE_DUMP() cyg_trace_dump()
+
+#ifdef CYGDBG_INFRA_DEBUG_TRACE_ASSERT_BUFFER
+
+externC void
+cyg_trace_print(void);
+
+#define CYG_TRACE_PRINT() cyg_trace_print()
+
+#else
+#define CYG_TRACE_PRINT() CYG_EMPTY_STATEMENT
+#endif
+
+// provide every other one of these as a space/caller bloat compromise.
+
+# ifdef CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+
+enum cyg_trace_what{
+ cyg_trace_trace = 0,
+ cyg_trace_enter,
+ cyg_trace_args,
+ cyg_trace_return,
+// cyg_trace_,
+// cyg_trace_,
+};
+
+externC void
+cyg_tracemsg( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg );
+
+externC void
+cyg_tracemsg2( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1 );
+externC void
+cyg_tracemsg4( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1,
+ CYG_ADDRWORD arg2, CYG_ADDRWORD arg3 );
+externC void
+cyg_tracemsg6( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1,
+ CYG_ADDRWORD arg2, CYG_ADDRWORD arg3,
+ CYG_ADDRWORD arg4, CYG_ADDRWORD arg5 );
+externC void
+cyg_tracemsg8( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1,
+ CYG_ADDRWORD arg2, CYG_ADDRWORD arg3,
+ CYG_ADDRWORD arg4, CYG_ADDRWORD arg5,
+ CYG_ADDRWORD arg6, CYG_ADDRWORD arg7 );
+
+#endif // CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+
+// -------------------------------------------------------------------------
+
+# ifdef CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+
+# define CYG_TRACE_docall0( _msg_ ) \
+ cyg_tracemsg( cyg_trace_trace, \
+ __PRETTY_FUNCTION__, __FILE__, __LINE__, _msg_ );
+
+# define CYG_TRACE_docall2( _msg_, _arg0_, _arg1_ ) \
+ cyg_tracemsg2( cyg_trace_trace, \
+ __PRETTY_FUNCTION__, __FILE__, __LINE__, _msg_, \
+ (CYG_ADDRWORD)_arg0_, (CYG_ADDRWORD)_arg1_ );
+
+# define CYG_TRACE_docall4( _msg_, _arg0_, _arg1_ , _arg2_, _arg3_ ) \
+ cyg_tracemsg4( cyg_trace_trace, \
+ __PRETTY_FUNCTION__, __FILE__, __LINE__, _msg_, \
+ (CYG_ADDRWORD)_arg0_, (CYG_ADDRWORD)_arg1_, \
+ (CYG_ADDRWORD)_arg2_, (CYG_ADDRWORD)_arg3_ );
+
+# define CYG_TRACE_docall6( _msg_, _arg0_, _arg1_ , _arg2_, _arg3_, \
+ _arg4_, _arg5_ ) \
+ cyg_tracemsg6( cyg_trace_trace, \
+ __PRETTY_FUNCTION__, __FILE__, __LINE__, _msg_, \
+ (CYG_ADDRWORD)_arg0_, (CYG_ADDRWORD)_arg1_, \
+ (CYG_ADDRWORD)_arg2_, (CYG_ADDRWORD)_arg3_, \
+ (CYG_ADDRWORD)_arg4_, (CYG_ADDRWORD)_arg5_ );
+
+# define CYG_TRACE_docall8( _msg_, _arg0_, _arg1_ , _arg2_, _arg3_, \
+ _arg4_, _arg5_, _arg6_, _arg7_ ) \
+ cyg_tracemsg8( cyg_trace_trace, \
+ __PRETTY_FUNCTION__, __FILE__, __LINE__, _msg_, \
+ (CYG_ADDRWORD)_arg0_, (CYG_ADDRWORD)_arg1_, \
+ (CYG_ADDRWORD)_arg2_, (CYG_ADDRWORD)_arg3_, \
+ (CYG_ADDRWORD)_arg4_, (CYG_ADDRWORD)_arg5_, \
+ (CYG_ADDRWORD)_arg6_, (CYG_ADDRWORD)_arg7_ );
+
+# else // do not CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+
+# define CYG_TRACE_docall0( _msg_ ) \
+ cyg_tracenomsg( __PRETTY_FUNCTION__, __FILE__, __LINE__ );
+
+# define CYG_TRACE_docall2( _msg_, _arg0_, _arg1_ ) \
+ cyg_tracenomsg( __PRETTY_FUNCTION__, __FILE__, __LINE__ );
+
+# define CYG_TRACE_docall4( _msg_, _arg0_, _arg1_ , _arg2_, _arg3_ ) \
+ cyg_tracenomsg( __PRETTY_FUNCTION__, __FILE__, __LINE__ );
+
+# define CYG_TRACE_docall6( _msg_, _arg0_, _arg1_ , _arg2_, _arg3_, \
+ _arg4_, _arg5_ ) \
+ cyg_tracenomsg( __PRETTY_FUNCTION__, __FILE__, __LINE__ );
+
+# define CYG_TRACE_docall8( _msg_, _arg0_, _arg1_, _arg2_, _arg3_, \
+ _arg4_, _arg5_, _arg6_, _arg7_ ) \
+ cyg_tracenomsg( __PRETTY_FUNCTION__, __FILE__, __LINE__ );
+
+#endif
+
+// -------------------------------------------------------------------------
+// Conditioned trace; if the condition is false, fail.
+
+#define CYG_TRACE0( _bool_, _msg_ ) \
+ CYG_MACRO_START \
+ if ( ( _bool_ ) ) \
+ CYG_TRACE_docall0( _msg_ ); \
+ CYG_MACRO_END
+
+#define CYG_TRACE1( _bool_, _msg_, a ) \
+ CYG_MACRO_START \
+ if ( ( _bool_ ) ) \
+ CYG_TRACE_docall2( _msg_, a, 0 ); \
+ CYG_MACRO_END
+
+#define CYG_TRACE2( _bool_, _msg_, a, b ) \
+ CYG_MACRO_START \
+ if ( ( _bool_ ) ) \
+ CYG_TRACE_docall2( _msg_, a, b ); \
+ CYG_MACRO_END
+
+#define CYG_TRACE3( _bool_, _msg_, a, b, c ) \
+ CYG_MACRO_START \
+ if ( ( _bool_ ) ) \
+ CYG_TRACE_docall4( _msg_, a, b, c, 0 ); \
+ CYG_MACRO_END
+
+#define CYG_TRACE4( _bool_, _msg_, a, b, c, d ) \
+ CYG_MACRO_START \
+ if ( ( _bool_ ) ) \
+ CYG_TRACE_docall4( _msg_, a, b, c, d ); \
+ CYG_MACRO_END
+
+#define CYG_TRACE5( _bool_, _msg_, a, b, c, d, e ) \
+ CYG_MACRO_START \
+ if ( ( _bool_ ) ) \
+ CYG_TRACE_docall6( _msg_, a, b, c, d, e, 0 ); \
+ CYG_MACRO_END
+
+#define CYG_TRACE6( _bool_, _msg_, a, b, c, d, e, f ) \
+ CYG_MACRO_START \
+ if ( ( _bool_ ) ) \
+ CYG_TRACE_docall6( _msg_, a, b, c, d, e, f ); \
+ CYG_MACRO_END
+
+#define CYG_TRACE7( _bool_, _msg_, a, b, c, d, e, f, g ) \
+ CYG_MACRO_START \
+ if ( ( _bool_ ) ) \
+ CYG_TRACE_docall8( _msg_, a, b, c, d, e, f, g, 0 ); \
+ CYG_MACRO_END
+
+#define CYG_TRACE8( _bool_, _msg_, a, b, c, d, e, f, g, h ) \
+ CYG_MACRO_START \
+ if ( ( _bool_ ) ) \
+ CYG_TRACE_docall8( _msg_, a, b, c, d, e, f, g, h ); \
+ CYG_MACRO_END
+
+// -------------------------------------------------------------------------
+// Report function entry and exit.
+// In C++ the macro CYG_REPORT_FUNCTION should appear as the first line of
+// any function. It will generate a message whenever the function is entered
+// and when it is exited.
+// In C the macro should appear as the first statement after any local variable
+// definitions. No exit message will be generated unless CYG_REPORT_RETURN is
+// placed just before each return.
+// Where a piece of code is to be compiled with both C and C++, the above
+// rules for C should be followed.
+
+#ifdef CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS
+
+#ifdef __cplusplus
+
+class Cyg_TraceFunction_Report_
+{
+public:
+ int cond;
+ const char *func;
+ const char *file;
+ cyg_uint32 lnum;
+#ifdef CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+ char *exitmsg;
+ CYG_ADDRWORD exitvalue;
+ enum { UNSET = 0, SET, VOID } exitset;
+#endif
+
+ Cyg_TraceFunction_Report_(
+ int condition, const char *psz_func, const char *psz_file,
+ cyg_uint32 linenum)
+ {
+ cond = condition;
+ func = psz_func;
+ file = psz_file;
+ lnum = linenum;
+
+#ifdef CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+ exitmsg = NULL;
+ exitset = UNSET;
+ if ( cond )
+ cyg_tracemsg( cyg_trace_enter, func, file, lnum, "enter");
+#else
+ if ( cond )
+ cyg_tracenomsg( func, file, lnum );
+#endif
+ };
+
+ Cyg_TraceFunction_Report_(
+ int condition, const char *psz_func, const char *psz_file,
+ cyg_uint32 linenum, char *psz_exitmsg )
+ {
+ cond = condition;
+ func = psz_func;
+ file = psz_file;
+ lnum = linenum;
+#ifdef CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+ exitmsg = psz_exitmsg;
+ exitset = UNSET;
+ if ( cond )
+ cyg_tracemsg( cyg_trace_enter, func, file, lnum, "enter");
+#else
+ CYG_UNUSED_PARAM( char *, psz_exitmsg );
+ if ( cond )
+ cyg_tracenomsg( func, file, lnum );
+#endif
+ };
+
+ inline void set_exitvoid( cyg_uint32 linenum )
+ {
+ lnum = linenum;
+#ifdef CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+ CYG_ASSERT( NULL == exitmsg, "exitvoid used in typed function" );
+ CYG_ASSERT( UNSET == exitset, "exitvoid used when arg already set" );
+ exitset = VOID;
+#endif
+ }
+
+ inline void set_exitvalue( cyg_uint32 linenum, CYG_ADDRWORD retcode )
+ {
+ lnum = linenum;
+#ifdef CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+ CYG_ASSERT( UNSET == exitset, "exitvalue used when arg already set" );
+ exitvalue = retcode;
+ exitset = SET;
+#else
+ CYG_UNUSED_PARAM( CYG_ADDRWORD, retcode );
+#endif
+ }
+
+ ~Cyg_TraceFunction_Report_()
+ {
+ if ( cond ) {
+#ifdef CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+ if ( VOID == exitset )
+ cyg_tracemsg( cyg_trace_return, func, file, lnum,
+ "return void");
+ else if ( UNSET == exitset )
+ cyg_tracemsg( cyg_trace_return, func, file, lnum,
+ "RETURNING UNSET!");
+ else if ( NULL == exitmsg )
+ cyg_tracemsg2( cyg_trace_return, func, file, lnum,
+ "return %08x", exitvalue, 0 );
+ else
+ cyg_tracemsg2( cyg_trace_return, func, file, lnum,
+ exitmsg, exitvalue, 0 );
+#else
+ cyg_tracenomsg( func, file, lnum );
+#endif
+ }
+ }
+};
+
+// These have no CYG_MACRO_START,END around because it is required
+// that the scope of the object be the whole function body. Get it?
+
+// These are the unconditional versions:
+#define CYG_REPORT_FUNCTION() \
+ Cyg_TraceFunction_Report_ cyg_tracefunction_report_( \
+ 1, __PRETTY_FUNCTION__, \
+ __FILE__, __LINE__ )
+
+#define CYG_REPORT_FUNCTYPE( _exitmsg_ ) \
+ Cyg_TraceFunction_Report_ cyg_tracefunction_report_( \
+ 1, __PRETTY_FUNCTION__, \
+ __FILE__, __LINE__, _exitmsg_ )
+
+#define CYG_REPORT_FUNCNAME( _name_ ) \
+ Cyg_TraceFunction_Report_ cyg_tracefunction_report_( \
+ 1, _name_, \
+ __FILE__, __LINE__ )
+
+#define CYG_REPORT_FUNCNAMETYPE( _name_, _exitmsg_ ) \
+ Cyg_TraceFunction_Report_ cyg_tracefunction_report_( \
+ 1, _name_, \
+ __FILE__, __LINE__, _exitmsg_ )
+
+// These are conditioned on macro CYG_REPORT_USER_BOOL
+// (which you better have defined)
+#define CYG_REPORT_FUNCTIONC() \
+ Cyg_TraceFunction_Report_ cyg_tracefunction_report_( \
+ CYG_REPORT_USER_BOOL, __PRETTY_FUNCTION__, \
+ __FILE__, __LINE__ )
+
+#define CYG_REPORT_FUNCTYPEC( _exitmsg_ ) \
+ Cyg_TraceFunction_Report_ cyg_tracefunction_report_( \
+ CYG_REPORT_USER_BOOL, __PRETTY_FUNCTION__, \
+ __FILE__, __LINE__, _exitmsg_ )
+
+#define CYG_REPORT_FUNCNAMEC( _name_ ) \
+ Cyg_TraceFunction_Report_ cyg_tracefunction_report_( \
+ CYG_REPORT_USER_BOOL, _name_, \
+ __FILE__, __LINE__ )
+
+#define CYG_REPORT_FUNCNAMETYPEC( _name_, _exitmsg_ ) \
+ Cyg_TraceFunction_Report_ cyg_tracefunction_report_( \
+ CYG_REPORT_USER_BOOL, _name_, \
+ __FILE__, __LINE__, _exitmsg_ )
+
+
+#define CYG_REPORT_RETURN() CYG_MACRO_START \
+ cyg_tracefunction_report_.set_exitvoid( __LINE__ ); \
+CYG_MACRO_END
+
+#define CYG_REPORT_RETVAL( _value_) CYG_MACRO_START \
+ cyg_tracefunction_report_.set_exitvalue( \
+ __LINE__, (CYG_ADDRWORD)(_value_) ); \
+CYG_MACRO_END
+
+
+#else // not __cplusplus
+
+
+struct Cyg_TraceFunction_Report_
+{
+ int cond;
+ char *func;
+ char *file; /* not strictly needed in plain 'C' */
+ cyg_uint32 lnum; /* nor this */
+#ifdef CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+ char *exitmsg;
+ CYG_ADDRWORD exitvalue;
+ int exitset;
+#endif
+
+};
+
+#ifdef CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+
+#define CYG_REPORT_FUNCTION_ENTER_INTERNAL() CYG_MACRO_START \
+ if ( cyg_tracefunction_report_.cond ) \
+ cyg_tracemsg( cyg_trace_enter, \
+ cyg_tracefunction_report_.func, \
+ cyg_tracefunction_report_.file, \
+ cyg_tracefunction_report_.lnum, \
+ "enter" ); \
+CYG_MACRO_END
+
+#define CYG_REPORT_FUNCTION_CONSTRUCT( _c_, _fn_,_fl_,_l_,_xm_,_xv_,_xs_ ) \
+ { _c_, _fn_, _fl_, _l_, _xm_, _xv_, _xs_ }
+
+#else // do not CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+
+#define CYG_REPORT_FUNCTION_ENTER_INTERNAL() CYG_MACRO_START \
+ if ( cyg_tracefunction_report_.cond ) \
+ cyg_tracenomsg( cyg_tracefunction_report_.func, \
+ cyg_tracefunction_report_.file, \
+ cyg_tracefunction_report_.lnum ); \
+CYG_MACRO_END
+
+#define CYG_REPORT_FUNCTION_CONSTRUCT( _c_, _fn_,_fl_,_l_,_xm_,_xv_,_xs_ ) \
+ { _c_, _fn_, _fl_, _l_ }
+
+#endif // not CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+
+// These have no CYG_MACRO_START,END around because it is required
+// that the scope of the object be the whole function body. Get it?
+
+// These are the unconditional versions:
+#define CYG_REPORT_FUNCTION() \
+ struct Cyg_TraceFunction_Report_ cyg_tracefunction_report_ = \
+ CYG_REPORT_FUNCTION_CONSTRUCT( \
+ 1, __PRETTY_FUNCTION__, __FILE__, __LINE__, NULL, 0, 0 ); \
+ CYG_REPORT_FUNCTION_ENTER_INTERNAL()
+
+#define CYG_REPORT_FUNCTYPE( _exitmsg_ ) \
+ struct Cyg_TraceFunction_Report_ cyg_tracefunction_report_ = \
+ CYG_REPORT_FUNCTION_CONSTRUCT( \
+ 1, __PRETTY_FUNCTION__, __FILE__, __LINE__, _exitmsg_, 0, 0 ); \
+ CYG_REPORT_FUNCTION_ENTER_INTERNAL()
+
+#define CYG_REPORT_FUNCNAME( _name_ ) \
+ struct Cyg_TraceFunction_Report_ cyg_tracefunction_report_ = \
+ CYG_REPORT_FUNCTION_CONSTRUCT( \
+ 1, _name_, __FILE__, __LINE__, NULL, 0, 0 ); \
+ CYG_REPORT_FUNCTION_ENTER_INTERNAL()
+
+#define CYG_REPORT_FUNCNAMETYPE( _name_, _exitmsg_ ) \
+ struct Cyg_TraceFunction_Report_ cyg_tracefunction_report_ = \
+ CYG_REPORT_FUNCTION_CONSTRUCT( \
+ 1, _name_, __FILE__, __LINE__, _exitmsg_, 0, 0 ); \
+ CYG_REPORT_FUNCTION_ENTER_INTERNAL()
+
+// These are conditioned on macro CYG_REPORT_USER_BOOL
+// (which you better have defined)
+#define CYG_REPORT_FUNCTIONC() \
+ struct Cyg_TraceFunction_Report_ cyg_tracefunction_report_ = \
+ CYG_REPORT_FUNCTION_CONSTRUCT( \
+ CYG_REPORT_USER_BOOL, \
+ __PRETTY_FUNCTION__, __FILE__, __LINE__, NULL, 0, 0 ); \
+ CYG_REPORT_FUNCTION_ENTER_INTERNAL()
+
+#define CYG_REPORT_FUNCTYPEC( _exitmsg_ ) \
+ struct Cyg_TraceFunction_Report_ cyg_tracefunction_report_ = \
+ CYG_REPORT_FUNCTION_CONSTRUCT( \
+ CYG_REPORT_USER_BOOL, \
+ __PRETTY_FUNCTION__, __FILE__, __LINE__, _exitmsg_, 0, 0 ); \
+ CYG_REPORT_FUNCTION_ENTER_INTERNAL()
+
+#define CYG_REPORT_FUNCNAMEC( _name_ ) \
+ struct Cyg_TraceFunction_Report_ cyg_tracefunction_report_ = \
+ CYG_REPORT_FUNCTION_CONSTRUCT( \
+ CYG_REPORT_USER_BOOL, \
+ _name_, __FILE__, __LINE__, NULL, 0, 0 ); \
+ CYG_REPORT_FUNCTION_ENTER_INTERNAL()
+
+#define CYG_REPORT_FUNCNAMETYPEC( _name_, _exitmsg_ ) \
+ struct Cyg_TraceFunction_Report_ cyg_tracefunction_report_ = \
+ CYG_REPORT_FUNCTION_CONSTRUCT( \
+ CYG_REPORT_USER_BOOL, \
+ _name_, __FILE__, __LINE__, _exitmsg_, 0, 0 ); \
+ CYG_REPORT_FUNCTION_ENTER_INTERNAL()
+
+#ifdef CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+
+#define CYG_REPORT_RETURN() CYG_MACRO_START \
+ CYG_ASSERT( NULL == cyg_tracefunction_report_.exitmsg, \
+ "exitvoid used in typed function" ); \
+ CYG_ASSERT( 0 == cyg_tracefunction_report_.exitset, \
+ "exitvoid used when arg already set" ); \
+ cyg_tracefunction_report_.lnum = __LINE__; \
+ cyg_tracefunction_report_.exitset = 2; \
+ if ( cyg_tracefunction_report_.cond ) \
+ cyg_tracemsg( cyg_trace_return, \
+ cyg_tracefunction_report_.func, \
+ cyg_tracefunction_report_.file, \
+ cyg_tracefunction_report_.lnum, \
+ "return void" ); \
+CYG_MACRO_END
+
+#define CYG_REPORT_RETVAL( _value_ ) CYG_MACRO_START \
+ CYG_ASSERT( 0 == cyg_tracefunction_report_.exitset, \
+ "exitvalue used when arg already set" ); \
+ cyg_tracefunction_report_.lnum = __LINE__; \
+ cyg_tracefunction_report_.exitvalue = (CYG_ADDRWORD)(_value_); \
+ cyg_tracefunction_report_.exitset = 1; \
+ if ( cyg_tracefunction_report_.cond ) \
+ cyg_tracemsg2( cyg_trace_return, \
+ cyg_tracefunction_report_.func, \
+ cyg_tracefunction_report_.file, \
+ cyg_tracefunction_report_.lnum, \
+ cyg_tracefunction_report_.exitmsg ? \
+ cyg_tracefunction_report_.exitmsg : \
+ "return %08x", \
+ cyg_tracefunction_report_.exitvalue, 0 ); \
+CYG_MACRO_END
+
+#else // do not CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+
+#define CYG_REPORT_RETURN() CYG_MACRO_START \
+ cyg_tracefunction_report_.lnum = __LINE__; \
+ if ( cyg_tracefunction_report_.cond ) \
+ cyg_tracenomsg( cyg_tracefunction_report_.func, \
+ cyg_tracefunction_report_.file, \
+ cyg_tracefunction_report_.lnum ); \
+CYG_MACRO_END
+
+#define CYG_REPORT_RETVAL( _value_ ) CYG_MACRO_START \
+ CYG_REPORT_RETURN(); \
+CYG_MACRO_END
+
+#endif // not CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+
+#endif // not __cplusplus
+
+#ifdef CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+
+#define CYG_REPORT_FUNCARGVOID() CYG_MACRO_START \
+ if ( cyg_tracefunction_report_.cond ) \
+ cyg_tracemsg( cyg_trace_args, \
+ cyg_tracefunction_report_.func, \
+ cyg_tracefunction_report_.file, \
+ cyg_tracefunction_report_.lnum, \
+ "(void)" \
+ ); \
+CYG_MACRO_END
+
+#define CYG_REPORT_FUNCARG1( _format_, a ) CYG_MACRO_START \
+ if ( cyg_tracefunction_report_.cond ) \
+ cyg_tracemsg2( cyg_trace_args, \
+ cyg_tracefunction_report_.func, \
+ cyg_tracefunction_report_.file, \
+ cyg_tracefunction_report_.lnum, \
+ (_format_), \
+ (CYG_ADDRWORD)a , 0 \
+ ); \
+CYG_MACRO_END
+
+#define CYG_REPORT_FUNCARG2( _format_, a,b ) CYG_MACRO_START \
+ if ( cyg_tracefunction_report_.cond ) \
+ cyg_tracemsg2( cyg_trace_args, \
+ cyg_tracefunction_report_.func, \
+ cyg_tracefunction_report_.file, \
+ cyg_tracefunction_report_.lnum, \
+ (_format_), \
+ (CYG_ADDRWORD)a, (CYG_ADDRWORD)b \
+ ); \
+CYG_MACRO_END
+
+#define CYG_REPORT_FUNCARG3( _format_, a,b,c ) CYG_MACRO_START \
+ if ( cyg_tracefunction_report_.cond ) \
+ cyg_tracemsg4( cyg_trace_args, \
+ cyg_tracefunction_report_.func, \
+ cyg_tracefunction_report_.file, \
+ cyg_tracefunction_report_.lnum, \
+ (_format_), \
+ (CYG_ADDRWORD)a, (CYG_ADDRWORD)b, \
+ (CYG_ADDRWORD)c , 0 \
+ ); \
+CYG_MACRO_END
+
+#define CYG_REPORT_FUNCARG4( _format_, a,b,c,d ) CYG_MACRO_START \
+ if ( cyg_tracefunction_report_.cond ) \
+ cyg_tracemsg4( cyg_trace_args, \
+ cyg_tracefunction_report_.func, \
+ cyg_tracefunction_report_.file, \
+ cyg_tracefunction_report_.lnum, \
+ (_format_), \
+ (CYG_ADDRWORD)a, (CYG_ADDRWORD)b, \
+ (CYG_ADDRWORD)c, (CYG_ADDRWORD)d \
+ ); \
+CYG_MACRO_END
+
+#define CYG_REPORT_FUNCARG5( _format_, a,b,c,d,e ) CYG_MACRO_START \
+ if ( cyg_tracefunction_report_.cond ) \
+ cyg_tracemsg6( cyg_trace_args, \
+ cyg_tracefunction_report_.func, \
+ cyg_tracefunction_report_.file, \
+ cyg_tracefunction_report_.lnum, \
+ (_format_), \
+ (CYG_ADDRWORD)a, (CYG_ADDRWORD)b, \
+ (CYG_ADDRWORD)c, (CYG_ADDRWORD)d, \
+ (CYG_ADDRWORD)e , 0 \
+ ); \
+CYG_MACRO_END
+
+#define CYG_REPORT_FUNCARG6( _format_, a,b,c,d,e,f ) CYG_MACRO_START \
+ if ( cyg_tracefunction_report_.cond ) \
+ cyg_tracemsg6( cyg_trace_args, \
+ cyg_tracefunction_report_.func, \
+ cyg_tracefunction_report_.file, \
+ cyg_tracefunction_report_.lnum, \
+ (_format_), \
+ (CYG_ADDRWORD)a, (CYG_ADDRWORD)b, \
+ (CYG_ADDRWORD)c, (CYG_ADDRWORD)d, \
+ (CYG_ADDRWORD)e, (CYG_ADDRWORD)f \
+ ); \
+CYG_MACRO_END
+
+#define CYG_REPORT_FUNCARG7( _format_, a,b,c,d,e,f,g ) CYG_MACRO_START \
+ if ( cyg_tracefunction_report_.cond ) \
+ cyg_tracemsg8( cyg_trace_args, \
+ cyg_tracefunction_report_.func, \
+ cyg_tracefunction_report_.file, \
+ cyg_tracefunction_report_.lnum, \
+ (_format_), \
+ (CYG_ADDRWORD)a, (CYG_ADDRWORD)b, \
+ (CYG_ADDRWORD)c, (CYG_ADDRWORD)d, \
+ (CYG_ADDRWORD)e, (CYG_ADDRWORD)f, \
+ (CYG_ADDRWORD)g , 0 \
+ ); \
+CYG_MACRO_END
+
+#define CYG_REPORT_FUNCARG8( _format_, a,b,c,d,e,f,g,h ) CYG_MACRO_START\
+ if ( cyg_tracefunction_report_.cond ) \
+ cyg_tracemsg8( cyg_trace_args, \
+ cyg_tracefunction_report_.func, \
+ cyg_tracefunction_report_.file, \
+ cyg_tracefunction_report_.lnum, \
+ (_format_), \
+ (CYG_ADDRWORD)a, (CYG_ADDRWORD)b, \
+ (CYG_ADDRWORD)c, (CYG_ADDRWORD)d, \
+ (CYG_ADDRWORD)e, (CYG_ADDRWORD)f, \
+ (CYG_ADDRWORD)g, (CYG_ADDRWORD)h \
+ ); \
+CYG_MACRO_END
+
+
+#else // do not CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+
+#define CYG_REPORT_FUNCARGVOID() CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG1( _format_, a ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG2( _format_, a,b ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG3( _format_, a,b,c ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG4( _format_, a,b,c,d ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG5( _format_, a,b,c,d,e ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG6( _format_, a,b,c,d,e,f ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG7( _format_, a,b,c,d,e,f,g ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG8( _format_, a,b,c,d,e,f,g,h ) CYG_EMPTY_STATEMENT
+
+#endif // not CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
+
+#else // no CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS
+
+#define CYG_REPORT_FUNCTION() CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCTYPE( _exitmsg_ ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCNAME( _name_ ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCNAMETYPE( _name_, _exitmsg_ ) CYG_EMPTY_STATEMENT
+
+#define CYG_REPORT_FUNCTIONC() CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCTYPEC( _exitmsg_ ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCNAMEC( _name_ ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCNAMETYPEC( _name_, _exitmsg_ ) CYG_EMPTY_STATEMENT
+
+#define CYG_REPORT_FUNCARGVOID() CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG1( _format_, a ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG2( _format_, a,b ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG3( _format_, a,b,c ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG4( _format_, a,b,c,d ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG5( _format_, a,b,c,d,e ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG6( _format_, a,b,c,d,e,f ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG7( _format_, a,b,c,d,e,f,g ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG8( _format_, a,b,c,d,e,f,g,h ) CYG_EMPTY_STATEMENT
+
+#define CYG_REPORT_RETURN() CYG_EMPTY_STATEMENT
+#define CYG_REPORT_RETVAL( _value_ ) CYG_EMPTY_STATEMENT
+
+#endif // CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS
+
+#else // ! CYGDBG_USE_TRACING
+
+// -------------------------------------------------------------------------
+// No traces: we define empty statements for trace macros.
+
+#define CYG_TRACE0( _bool_, _msg_ ) CYG_EMPTY_STATEMENT
+#define CYG_TRACE1( _bool_, _msg_, a ) CYG_EMPTY_STATEMENT
+#define CYG_TRACE2( _bool_, _msg_, a,b ) CYG_EMPTY_STATEMENT
+#define CYG_TRACE3( _bool_, _msg_, a,b,c ) CYG_EMPTY_STATEMENT
+#define CYG_TRACE4( _bool_, _msg_, a,b,c,d ) CYG_EMPTY_STATEMENT
+#define CYG_TRACE5( _bool_, _msg_, a,b,c,d,e ) CYG_EMPTY_STATEMENT
+#define CYG_TRACE6( _bool_, _msg_, a,b,c,d,e,f ) CYG_EMPTY_STATEMENT
+#define CYG_TRACE7( _bool_, _msg_, a,b,c,d,e,f,g ) CYG_EMPTY_STATEMENT
+#define CYG_TRACE8( _bool_, _msg_, a,b,c,d,e,f,g,h ) CYG_EMPTY_STATEMENT
+
+#define CYG_REPORT_FUNCTION() CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCTYPE( _exitmsg_ ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCNAME( _name_ ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCNAMETYPE( _name_, _exitmsg_ ) CYG_EMPTY_STATEMENT
+
+#define CYG_REPORT_FUNCTIONC() CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCTYPEC( _exitmsg_ ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCNAMEC( _name_ ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCNAMETYPEC( _name_, _exitmsg_ ) CYG_EMPTY_STATEMENT
+
+#define CYG_REPORT_FUNCARGVOID() CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG1( _format_, a ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG2( _format_, a,b ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG3( _format_, a,b,c ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG4( _format_, a,b,c,d ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG5( _format_, a,b,c,d,e ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG6( _format_, a,b,c,d,e,f ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG7( _format_, a,b,c,d,e,f,g ) CYG_EMPTY_STATEMENT
+#define CYG_REPORT_FUNCARG8( _format_, a,b,c,d,e,f,g,h ) CYG_EMPTY_STATEMENT
+
+#define CYG_REPORT_RETURN() CYG_EMPTY_STATEMENT
+#define CYG_REPORT_RETVAL( _value_ ) CYG_EMPTY_STATEMENT
+
+#define CYG_TRACE_PRINT() CYG_EMPTY_STATEMENT
+#define CYG_TRACE_DUMP() CYG_EMPTY_STATEMENT
+
+#endif // ! CYGDBG_USE_TRACING
+
+// -------------------------------------------------------------------------
+//
+// CYG_TRACEn{[XDY]{V}}{B}
+//
+// Convenience macros: these fall into a few dimensions, with suffix letters:
+// First option:
+// X: user need not supply a format string, %08x is used
+// D: ditto but signed decimal, %d
+// Y: ditto but just plain %x
+// Second option, only meaningful with one of XDY:
+// V: "<var> = %..." is used, by stringifying the argument
+// Third option:
+// B: user need not supply a bool; the symbol CYG_TRACE_USER_BOOL is
+// used (which we do not define, user must do this)
+
+#define CYG_TRACE0B( _msg_ ) \
+ CYG_TRACE0( CYG_TRACE_USER_BOOL, _msg_ )
+#define CYG_TRACE1B( _msg_, a ) \
+ CYG_TRACE1( CYG_TRACE_USER_BOOL, _msg_, a )
+#define CYG_TRACE2B( _msg_, a,b ) \
+ CYG_TRACE2( CYG_TRACE_USER_BOOL, _msg_, a,b )
+#define CYG_TRACE3B( _msg_, a,b,c ) \
+ CYG_TRACE3( CYG_TRACE_USER_BOOL, _msg_, a,b,c )
+#define CYG_TRACE4B( _msg_, a,b,c,d ) \
+ CYG_TRACE4( CYG_TRACE_USER_BOOL, _msg_, a,b,c,d )
+#define CYG_TRACE5B( _msg_, a,b,c,d,e ) \
+ CYG_TRACE5( CYG_TRACE_USER_BOOL, _msg_, a,b,c,d,e )
+#define CYG_TRACE6B( _msg_, a,b,c,d,e,f ) \
+ CYG_TRACE6( CYG_TRACE_USER_BOOL, _msg_, a,b,c,d,e,f )
+#define CYG_TRACE7B( _msg_, a,b,c,d,e,f,g ) \
+ CYG_TRACE7( CYG_TRACE_USER_BOOL, _msg_, a,b,c,d,e,f,g )
+#define CYG_TRACE8B( _msg_, a,b,c,d,e,f,g,h ) \
+ CYG_TRACE8( CYG_TRACE_USER_BOOL, _msg_, a,b,c,d,e,f,g,h )
+
+// long hex versions
+
+#define CYG_TRACE1X( _bool_, a ) \
+ CYG_TRACE1( _bool_, "%08x", a )
+#define CYG_TRACE2X( _bool_, a,b ) \
+ CYG_TRACE2( _bool_, "%08x %08x", a,b )
+#define CYG_TRACE3X( _bool_, a,b,c ) \
+ CYG_TRACE3( _bool_, "%08x %08x %08x", a,b,c )
+#define CYG_TRACE4X( _bool_, a,b,c,d ) \
+ CYG_TRACE4( _bool_, "%08x %08x %08x %08x", a,b,c,d )
+#define CYG_TRACE5X( _bool_, a,b,c,d,e ) \
+ CYG_TRACE5( _bool_, "%08x %08x %08x %08x %08x", a,b,c,d,e )
+#define CYG_TRACE6X( _bool_, a,b,c,d,e,f ) \
+ CYG_TRACE6( _bool_, "%08x %08x %08x %08x %08x %08x", \
+ a,b,c,d,e,f )
+#define CYG_TRACE7X( _bool_, a,b,c,d,e,f,g ) \
+ CYG_TRACE7( _bool_, "%08x %08x %08x %08x %08x %08x %08x", \
+ a,b,c,d,e,f,g )
+#define CYG_TRACE8X( _bool_, a,b,c,d,e,f,g,h ) \
+ CYG_TRACE8( _bool_, "%08x %08x %08x %08x %08x %08x %08x %08x", \
+ a,b,c,d,e,f,g,h )
+
+#define CYG_TRACE1XV( _bool_, a ) \
+ CYG_TRACE1( _bool_, # a "=%08x ", a )
+#define CYG_TRACE2XV( _bool_, a,b ) \
+ CYG_TRACE2( _bool_, \
+ # a "=%08x " # b "=%08x " , a,b )
+#define CYG_TRACE3XV( _bool_, a,b,c ) \
+ CYG_TRACE3( _bool_, \
+ # a "=%08x " # b "=%08x " # c "=%08x " , a,b,c )
+#define CYG_TRACE4XV( _bool_, a,b,c,d ) \
+ CYG_TRACE4( _bool_, \
+ # a "=%08x " # b "=%08x " # c "=%08x " # d "=%08x " \
+ , a,b,c,d )
+#define CYG_TRACE5XV( _bool_, a,b,c,d,e ) \
+ CYG_TRACE5( _bool_, \
+ # a "=%08x " # b "=%08x " # c "=%08x " # d "=%08x " \
+ # e "=%08x " \
+ , a,b,c,d,e )
+#define CYG_TRACE6XV( _bool_, a,b,c,d,e,f ) \
+ CYG_TRACE6( _bool_, \
+ # a "=%08x " # b "=%08x " # c "=%08x " # d "=%08x " \
+ # e "=%08x " # f "=%08x " \
+ , a,b,c,d,e,f )
+#define CYG_TRACE7XV( _bool_, a,b,c,d,e,f,g ) \
+ CYG_TRACE7( _bool_, \
+ # a "=%08x " # b "=%08x " # c "=%08x " # d "=%08x " \
+ # e "=%08x " # f "=%08x " # g "=%08x " \
+ , a,b,c,d,e,f,g )
+#define CYG_TRACE8XV( _bool_, a,b,c,d,e,f,g,h ) \
+ CYG_TRACE8( _bool_, \
+ # a "=%08x " # b "=%08x " # c "=%08x " # d "=%08x " \
+ # e "=%08x " # f "=%08x " # g "=%08x " # h "=%08x " \
+ , a,b,c,d,e,f,g,h )
+
+#define CYG_TRACE1XB( a ) \
+ CYG_TRACE1( CYG_TRACE_USER_BOOL, "%08x", a )
+#define CYG_TRACE2XB( a,b ) \
+ CYG_TRACE2( CYG_TRACE_USER_BOOL, "%08x %08x", a,b )
+#define CYG_TRACE3XB( a,b,c ) \
+ CYG_TRACE3( CYG_TRACE_USER_BOOL, "%08x %08x %08x", a,b,c )
+#define CYG_TRACE4XB( a,b,c,d ) \
+ CYG_TRACE4( CYG_TRACE_USER_BOOL, "%08x %08x %08x %08x", a,b,c,d )
+#define CYG_TRACE5XB( a,b,c,d,e ) \
+ CYG_TRACE5( CYG_TRACE_USER_BOOL, "%08x %08x %08x %08x %08x", a,b,c,d,e )
+#define CYG_TRACE6XB( a,b,c,d,e,f ) \
+ CYG_TRACE6( CYG_TRACE_USER_BOOL, "%08x %08x %08x %08x %08x %08x", \
+ a,b,c,d,e,f )
+#define CYG_TRACE7XB( a,b,c,d,e,f,g ) \
+ CYG_TRACE7( CYG_TRACE_USER_BOOL, "%08x %08x %08x %08x %08x %08x %08x", \
+ a,b,c,d,e,f,g )
+#define CYG_TRACE8XB( a,b,c,d,e,f,g,h ) \
+ CYG_TRACE8( CYG_TRACE_USER_BOOL, "%08x %08x %08x %08x %08x %08x %08x %08x", \
+ a,b,c,d,e,f,g,h )
+
+#define CYG_TRACE1XVB( a ) \
+ CYG_TRACE1( CYG_TRACE_USER_BOOL, # a "=%08x ", a )
+#define CYG_TRACE2XVB( a,b ) \
+ CYG_TRACE2( CYG_TRACE_USER_BOOL, \
+ # a "=%08x " # b "=%08x " , a,b )
+#define CYG_TRACE3XVB( a,b,c ) \
+ CYG_TRACE3( CYG_TRACE_USER_BOOL, \
+ # a "=%08x " # b "=%08x " # c "=%08x " , a,b,c )
+#define CYG_TRACE4XVB( a,b,c,d ) \
+ CYG_TRACE4( CYG_TRACE_USER_BOOL, \
+ # a "=%08x " # b "=%08x " # c "=%08x " # d "=%08x " \
+ , a,b,c,d )
+#define CYG_TRACE5XVB( a,b,c,d,e ) \
+ CYG_TRACE5( CYG_TRACE_USER_BOOL, \
+ # a "=%08x " # b "=%08x " # c "=%08x " # d "=%08x " \
+ # e "=%08x " \
+ , a,b,c,d,e )
+#define CYG_TRACE6XVB( a,b,c,d,e,f ) \
+ CYG_TRACE6( CYG_TRACE_USER_BOOL, \
+ # a "=%08x " # b "=%08x " # c "=%08x " # d "=%08x " \
+ # e "=%08x " # f "=%08x " \
+ , a,b,c,d,e,f )
+#define CYG_TRACE7XVB( a,b,c,d,e,f,g ) \
+ CYG_TRACE7( CYG_TRACE_USER_BOOL, \
+ # a "=%08x " # b "=%08x " # c "=%08x " # d "=%08x " \
+ # e "=%08x " # f "=%08x " # g "=%08x " \
+ , a,b,c,d,e,f,g )
+#define CYG_TRACE8XVB( a,b,c,d,e,f,g,h ) \
+ CYG_TRACE8( CYG_TRACE_USER_BOOL, \
+ # a "=%08x " # b "=%08x " # c "=%08x " # d "=%08x " \
+ # e "=%08x " # f "=%08x " # g "=%08x " # h "=%08x " \
+ , a,b,c,d,e,f,g,h )
+
+// decimal versions
+
+#define CYG_TRACE1D( _bool_, a ) \
+ CYG_TRACE1( _bool_, "%d", a )
+#define CYG_TRACE2D( _bool_, a,b ) \
+ CYG_TRACE2( _bool_, "%d %d", a,b )
+#define CYG_TRACE3D( _bool_, a,b,c ) \
+ CYG_TRACE3( _bool_, "%d %d %d", a,b,c )
+#define CYG_TRACE4D( _bool_, a,b,c,d ) \
+ CYG_TRACE4( _bool_, "%d %d %d %d", a,b,c,d )
+#define CYG_TRACE5D( _bool_, a,b,c,d,e ) \
+ CYG_TRACE5( _bool_, "%d %d %d %d %d", a,b,c,d,e )
+#define CYG_TRACE6D( _bool_, a,b,c,d,e,f ) \
+ CYG_TRACE6( _bool_, "%d %d %d %d %d %d", \
+ a,b,c,d,e,f )
+#define CYG_TRACE7D( _bool_, a,b,c,d,e,f,g ) \
+ CYG_TRACE7( _bool_, "%d %d %d %d %d %d %d", \
+ a,b,c,d,e,f,g )
+#define CYG_TRACE8D( _bool_, a,b,c,d,e,f,g,h ) \
+ CYG_TRACE8( _bool_, "%d %d %d %d %d %d %d %d", \
+ a,b,c,d,e,f,g,h )
+
+#define CYG_TRACE1DV( _bool_, a ) \
+ CYG_TRACE1( _bool_, # a "=%d ", a )
+#define CYG_TRACE2DV( _bool_, a,b ) \
+ CYG_TRACE2( _bool_, \
+ # a "=%d " # b "=%d " , a,b )
+#define CYG_TRACE3DV( _bool_, a,b,c ) \
+ CYG_TRACE3( _bool_, \
+ # a "=%d " # b "=%d " # c "=%d " , a,b,c )
+#define CYG_TRACE4DV( _bool_, a,b,c,d ) \
+ CYG_TRACE4( _bool_, \
+ # a "=%d " # b "=%d " # c "=%d " # d "=%d " \
+ , a,b,c,d )
+#define CYG_TRACE5DV( _bool_, a,b,c,d,e ) \
+ CYG_TRACE5( _bool_, \
+ # a "=%d " # b "=%d " # c "=%d " # d "=%d " \
+ # e "=%d " \
+ , a,b,c,d,e )
+#define CYG_TRACE6DV( _bool_, a,b,c,d,e,f ) \
+ CYG_TRACE6( _bool_, \
+ # a "=%d " # b "=%d " # c "=%d " # d "=%d " \
+ # e "=%d " # f "=%d " \
+ , a,b,c,d,e,f )
+#define CYG_TRACE7DV( _bool_, a,b,c,d,e,f,g ) \
+ CYG_TRACE7( _bool_, \
+ # a "=%d " # b "=%d " # c "=%d " # d "=%d " \
+ # e "=%d " # f "=%d " # g "=%d " \
+ , a,b,c,d,e,f,g )
+#define CYG_TRACE8DV( _bool_, a,b,c,d,e,f,g,h ) \
+ CYG_TRACE8( _bool_, \
+ # a "=%d " # b "=%d " # c "=%d " # d "=%d " \
+ # e "=%d " # f "=%d " # g "=%d " # h "=%d " \
+ , a,b,c,d,e,f,g,h )
+
+#define CYG_TRACE1DB( a ) \
+ CYG_TRACE1( CYG_TRACE_USER_BOOL, "%d", a )
+#define CYG_TRACE2DB( a,b ) \
+ CYG_TRACE2( CYG_TRACE_USER_BOOL, "%d %d", a,b )
+#define CYG_TRACE3DB( a,b,c ) \
+ CYG_TRACE3( CYG_TRACE_USER_BOOL, "%d %d %d", a,b,c )
+#define CYG_TRACE4DB( a,b,c,d ) \
+ CYG_TRACE4( CYG_TRACE_USER_BOOL, "%d %d %d %d", a,b,c,d )
+#define CYG_TRACE5DB( a,b,c,d,e ) \
+ CYG_TRACE5( CYG_TRACE_USER_BOOL, "%d %d %d %d %d", a,b,c,d,e )
+#define CYG_TRACE6DB( a,b,c,d,e,f ) \
+ CYG_TRACE6( CYG_TRACE_USER_BOOL, "%d %d %d %d %d %d", \
+ a,b,c,d,e,f )
+#define CYG_TRACE7DB( a,b,c,d,e,f,g ) \
+ CYG_TRACE7( CYG_TRACE_USER_BOOL, "%d %d %d %d %d %d %d", \
+ a,b,c,d,e,f,g )
+#define CYG_TRACE8DB( a,b,c,d,e,f,g,h ) \
+ CYG_TRACE8( CYG_TRACE_USER_BOOL, "%d %d %d %d %d %d %d %d", \
+ a,b,c,d,e,f,g,h )
+
+#define CYG_TRACE1DVB( a ) \
+ CYG_TRACE1( CYG_TRACE_USER_BOOL, # a "=%d ", a )
+#define CYG_TRACE2DVB( a,b ) \
+ CYG_TRACE2( CYG_TRACE_USER_BOOL, \
+ # a "=%d " # b "=%d " , a,b )
+#define CYG_TRACE3DVB( a,b,c ) \
+ CYG_TRACE3( CYG_TRACE_USER_BOOL, \
+ # a "=%d " # b "=%d " # c "=%d " , a,b,c )
+#define CYG_TRACE4DVB( a,b,c,d ) \
+ CYG_TRACE4( CYG_TRACE_USER_BOOL, \
+ # a "=%d " # b "=%d " # c "=%d " # d "=%d " \
+ , a,b,c,d )
+#define CYG_TRACE5DVB( a,b,c,d,e ) \
+ CYG_TRACE5( CYG_TRACE_USER_BOOL, \
+ # a "=%d " # b "=%d " # c "=%d " # d "=%d " \
+ # e "=%d " \
+ , a,b,c,d,e )
+#define CYG_TRACE6DVB( a,b,c,d,e,f ) \
+ CYG_TRACE6( CYG_TRACE_USER_BOOL, \
+ # a "=%d " # b "=%d " # c "=%d " # d "=%d " \
+ # e "=%d " # f "=%d " \
+ , a,b,c,d,e,f )
+#define CYG_TRACE7DVB( a,b,c,d,e,f,g ) \
+ CYG_TRACE7( CYG_TRACE_USER_BOOL, \
+ # a "=%d " # b "=%d " # c "=%d " # d "=%d " \
+ # e "=%d " # f "=%d " # g "=%d " \
+ , a,b,c,d,e,f,g )
+#define CYG_TRACE8DVB( a,b,c,d,e,f,g,h ) \
+ CYG_TRACE8( CYG_TRACE_USER_BOOL, \
+ # a "=%d " # b "=%d " # c "=%d " # d "=%d " \
+ # e "=%d " # f "=%d " # g "=%d " # h "=%d " \
+ , a,b,c,d,e,f,g,h )
+
+// short hex versions
+
+#define CYG_TRACE1Y( _bool_, a ) \
+ CYG_TRACE1( _bool_, "%x", a )
+#define CYG_TRACE2Y( _bool_, a,b ) \
+ CYG_TRACE2( _bool_, "%x %x", a,b )
+#define CYG_TRACE3Y( _bool_, a,b,c ) \
+ CYG_TRACE3( _bool_, "%x %x %x", a,b,c )
+#define CYG_TRACE4Y( _bool_, a,b,c,d ) \
+ CYG_TRACE4( _bool_, "%x %x %x %x", a,b,c,d )
+#define CYG_TRACE5Y( _bool_, a,b,c,d,e ) \
+ CYG_TRACE5( _bool_, "%x %x %x %x %x", a,b,c,d,e )
+#define CYG_TRACE6Y( _bool_, a,b,c,d,e,f ) \
+ CYG_TRACE6( _bool_, "%x %x %x %x %x %x", \
+ a,b,c,d,e,f )
+#define CYG_TRACE7Y( _bool_, a,b,c,d,e,f,g ) \
+ CYG_TRACE7( _bool_, "%x %x %x %x %x %x %x", \
+ a,b,c,d,e,f,g )
+#define CYG_TRACE8Y( _bool_, a,b,c,d,e,f,g,h ) \
+ CYG_TRACE8( _bool_, "%x %x %x %x %x %x %x %x", \
+ a,b,c,d,e,f,g,h )
+
+#define CYG_TRACE1YV( _bool_, a ) \
+ CYG_TRACE1( _bool_, # a "=%x ", a )
+#define CYG_TRACE2YV( _bool_, a,b ) \
+ CYG_TRACE2( _bool_, \
+ # a "=%x " # b "=%x " , a,b )
+#define CYG_TRACE3YV( _bool_, a,b,c ) \
+ CYG_TRACE3( _bool_, \
+ # a "=%x " # b "=%x " # c "=%x " , a,b,c )
+#define CYG_TRACE4YV( _bool_, a,b,c,d ) \
+ CYG_TRACE4( _bool_, \
+ # a "=%x " # b "=%x " # c "=%x " # d "=%x " \
+ , a,b,c,d )
+#define CYG_TRACE5YV( _bool_, a,b,c,d,e ) \
+ CYG_TRACE5( _bool_, \
+ # a "=%x " # b "=%x " # c "=%x " # d "=%x " \
+ # e "=%x " \
+ , a,b,c,d,e )
+#define CYG_TRACE6YV( _bool_, a,b,c,d,e,f ) \
+ CYG_TRACE6( _bool_, \
+ # a "=%x " # b "=%x " # c "=%x " # d "=%x " \
+ # e "=%x " # f "=%x " \
+ , a,b,c,d,e,f )
+#define CYG_TRACE7YV( _bool_, a,b,c,d,e,f,g ) \
+ CYG_TRACE7( _bool_, \
+ # a "=%x " # b "=%x " # c "=%x " # d "=%x " \
+ # e "=%x " # f "=%x " # g "=%x " \
+ , a,b,c,d,e,f,g )
+#define CYG_TRACE8YV( _bool_, a,b,c,d,e,f,g,h ) \
+ CYG_TRACE8( _bool_, \
+ # a "=%x " # b "=%x " # c "=%x " # d "=%x " \
+ # e "=%x " # f "=%x " # g "=%x " # h "=%x " \
+ , a,b,c,d,e,f,g,h )
+
+#define CYG_TRACE1YB( a ) \
+ CYG_TRACE1( CYG_TRACE_USER_BOOL, "%x", a )
+#define CYG_TRACE2YB( a,b ) \
+ CYG_TRACE2( CYG_TRACE_USER_BOOL, "%x %x", a,b )
+#define CYG_TRACE3YB( a,b,c ) \
+ CYG_TRACE3( CYG_TRACE_USER_BOOL, "%x %x %x", a,b,c )
+#define CYG_TRACE4YB( a,b,c,d ) \
+ CYG_TRACE4( CYG_TRACE_USER_BOOL, "%x %x %x %x", a,b,c,d )
+#define CYG_TRACE5YB( a,b,c,d,e ) \
+ CYG_TRACE5( CYG_TRACE_USER_BOOL, "%x %x %x %x %x", a,b,c,d,e )
+#define CYG_TRACE6YB( a,b,c,d,e,f ) \
+ CYG_TRACE6( CYG_TRACE_USER_BOOL, "%x %x %x %x %x %x", \
+ a,b,c,d,e,f )
+#define CYG_TRACE7YB( a,b,c,d,e,f,g ) \
+ CYG_TRACE7( CYG_TRACE_USER_BOOL, "%x %x %x %x %x %x %x", \
+ a,b,c,d,e,f,g )
+#define CYG_TRACE8YB( a,b,c,d,e,f,g,h ) \
+ CYG_TRACE8( CYG_TRACE_USER_BOOL, "%x %x %x %x %x %x %x %x", \
+ a,b,c,d,e,f,g,h )
+
+#define CYG_TRACE1YVB( a ) \
+ CYG_TRACE1( CYG_TRACE_USER_BOOL, # a "=%x ", a )
+#define CYG_TRACE2YVB( a,b ) \
+ CYG_TRACE2( CYG_TRACE_USER_BOOL, \
+ # a "=%x " # b "=%x " , a,b )
+#define CYG_TRACE3YVB( a,b,c ) \
+ CYG_TRACE3( CYG_TRACE_USER_BOOL, \
+ # a "=%x " # b "=%x " # c "=%x " , a,b,c )
+#define CYG_TRACE4YVB( a,b,c,d ) \
+ CYG_TRACE4( CYG_TRACE_USER_BOOL, \
+ # a "=%x " # b "=%x " # c "=%x " # d "=%x " \
+ , a,b,c,d )
+#define CYG_TRACE5YVB( a,b,c,d,e ) \
+ CYG_TRACE5( CYG_TRACE_USER_BOOL, \
+ # a "=%x " # b "=%x " # c "=%x " # d "=%x " \
+ # e "=%x " \
+ , a,b,c,d,e )
+#define CYG_TRACE6YVB( a,b,c,d,e,f ) \
+ CYG_TRACE6( CYG_TRACE_USER_BOOL, \
+ # a "=%x " # b "=%x " # c "=%x " # d "=%x " \
+ # e "=%x " # f "=%x " \
+ , a,b,c,d,e,f )
+#define CYG_TRACE7YVB( a,b,c,d,e,f,g ) \
+ CYG_TRACE7( CYG_TRACE_USER_BOOL, \
+ # a "=%x " # b "=%x " # c "=%x " # d "=%x " \
+ # e "=%x " # f "=%x " # g "=%x " \
+ , a,b,c,d,e,f,g )
+#define CYG_TRACE8YVB( a,b,c,d,e,f,g,h ) \
+ CYG_TRACE8( CYG_TRACE_USER_BOOL, \
+ # a "=%x " # b "=%x " # c "=%x " # d "=%x " \
+ # e "=%x " # f "=%x " # g "=%x " # h "=%x " \
+ , a,b,c,d,e,f,g,h )
+
+// -------------------------------------------------------------------------
+//
+// CYG_REPORT_FUNCARGn{[XDY]{V}}
+//
+// Convenience macros two: these fall into a few dimensions, with suffix letters:
+// First option:
+// X: user need not supply a format string, %08x is used
+// D: ditto but signed decimal, %d
+// Y: ditto but just plain %x
+// Second option, only meaningful with one of XDY:
+// V: "<var> = %..." is used, by stringifying the argument
+
+// long hex versions
+
+#define CYG_REPORT_FUNCARG1X( a ) \
+ CYG_REPORT_FUNCARG1( "%08x", a )
+#define CYG_REPORT_FUNCARG2X( a,b ) \
+ CYG_REPORT_FUNCARG2( "%08x %08x", a,b )
+#define CYG_REPORT_FUNCARG3X( a,b,c ) \
+ CYG_REPORT_FUNCARG3( "%08x %08x %08x", a,b,c )
+#define CYG_REPORT_FUNCARG4X( a,b,c,d ) \
+ CYG_REPORT_FUNCARG4( "%08x %08x %08x %08x", a,b,c,d )
+#define CYG_REPORT_FUNCARG5X( a,b,c,d,e ) \
+ CYG_REPORT_FUNCARG5( "%08x %08x %08x %08x %08x", a,b,c,d,e )
+#define CYG_REPORT_FUNCARG6X( a,b,c,d,e,f ) \
+ CYG_REPORT_FUNCARG6( "%08x %08x %08x %08x %08x %08x", \
+ a,b,c,d,e,f )
+#define CYG_REPORT_FUNCARG7X( a,b,c,d,e,f,g ) \
+ CYG_REPORT_FUNCARG7( "%08x %08x %08x %08x %08x %08x %08x", \
+ a,b,c,d,e,f,g )
+#define CYG_REPORT_FUNCARG8X( a,b,c,d,e,f,g,h ) \
+ CYG_REPORT_FUNCARG8( "%08x %08x %08x %08x %08x %08x %08x %08x", \
+ a,b,c,d,e,f,g,h )
+
+#define CYG_REPORT_FUNCARG1XV( a ) \
+ CYG_REPORT_FUNCARG1( # a "=%08x ", a )
+#define CYG_REPORT_FUNCARG2XV( a,b ) \
+ CYG_REPORT_FUNCARG2( \
+ # a "=%08x " # b "=%08x " , a,b )
+#define CYG_REPORT_FUNCARG3XV( a,b,c ) \
+ CYG_REPORT_FUNCARG3( \
+ # a "=%08x " # b "=%08x " # c "=%08x " , a,b,c )
+#define CYG_REPORT_FUNCARG4XV( a,b,c,d ) \
+ CYG_REPORT_FUNCARG4( \
+ # a "=%08x " # b "=%08x " # c "=%08x " # d "=%08x " \
+ , a,b,c,d )
+#define CYG_REPORT_FUNCARG5XV( a,b,c,d,e ) \
+ CYG_REPORT_FUNCARG5( \
+ # a "=%08x " # b "=%08x " # c "=%08x " # d "=%08x " \
+ # e "=%08x " \
+ , a,b,c,d,e )
+#define CYG_REPORT_FUNCARG6XV( a,b,c,d,e,f ) \
+ CYG_REPORT_FUNCARG6( \
+ # a "=%08x " # b "=%08x " # c "=%08x " # d "=%08x " \
+ # e "=%08x " # f "=%08x " \
+ , a,b,c,d,e,f )
+#define CYG_REPORT_FUNCARG7XV( a,b,c,d,e,f,g ) \
+ CYG_REPORT_FUNCARG7( \
+ # a "=%08x " # b "=%08x " # c "=%08x " # d "=%08x " \
+ # e "=%08x " # f "=%08x " # g "=%08x " \
+ , a,b,c,d,e,f,g )
+#define CYG_REPORT_FUNCARG8XV( a,b,c,d,e,f,g,h ) \
+ CYG_REPORT_FUNCARG8( \
+ # a "=%08x " # b "=%08x " # c "=%08x " # d "=%08x " \
+ # e "=%08x " # f "=%08x " # g "=%08x " # h "=%08x " \
+ , a,b,c,d,e,f,g,h )
+
+// decimal versions
+
+
+#define CYG_REPORT_FUNCARG1D( a ) \
+ CYG_REPORT_FUNCARG1( "%d", a )
+#define CYG_REPORT_FUNCARG2D( a,b ) \
+ CYG_REPORT_FUNCARG2( "%d %d", a,b )
+#define CYG_REPORT_FUNCARG3D( a,b,c ) \
+ CYG_REPORT_FUNCARG3( "%d %d %d", a,b,c )
+#define CYG_REPORT_FUNCARG4D( a,b,c,d ) \
+ CYG_REPORT_FUNCARG4( "%d %d %d %d", a,b,c,d )
+#define CYG_REPORT_FUNCARG5D( a,b,c,d,e ) \
+ CYG_REPORT_FUNCARG5( "%d %d %d %d %d", a,b,c,d,e )
+#define CYG_REPORT_FUNCARG6D( a,b,c,d,e,f ) \
+ CYG_REPORT_FUNCARG6( "%d %d %d %d %d %d", \
+ a,b,c,d,e,f )
+#define CYG_REPORT_FUNCARG7D( a,b,c,d,e,f,g ) \
+ CYG_REPORT_FUNCARG7( "%d %d %d %d %d %d %d", \
+ a,b,c,d,e,f,g )
+#define CYG_REPORT_FUNCARG8D( a,b,c,d,e,f,g,h ) \
+ CYG_REPORT_FUNCARG8( "%d %d %d %d %d %d %d %d", \
+ a,b,c,d,e,f,g,h )
+
+#define CYG_REPORT_FUNCARG1DV( a ) \
+ CYG_REPORT_FUNCARG1( # a "=%d ", a )
+#define CYG_REPORT_FUNCARG2DV( a,b ) \
+ CYG_REPORT_FUNCARG2( \
+ # a "=%d " # b "=%d " , a,b )
+#define CYG_REPORT_FUNCARG3DV( a,b,c ) \
+ CYG_REPORT_FUNCARG3( \
+ # a "=%d " # b "=%d " # c "=%d " , a,b,c )
+#define CYG_REPORT_FUNCARG4DV( a,b,c,d ) \
+ CYG_REPORT_FUNCARG4( \
+ # a "=%d " # b "=%d " # c "=%d " # d "=%d " \
+ , a,b,c,d )
+#define CYG_REPORT_FUNCARG5DV( a,b,c,d,e ) \
+ CYG_REPORT_FUNCARG5( \
+ # a "=%d " # b "=%d " # c "=%d " # d "=%d " \
+ # e "=%d " \
+ , a,b,c,d,e )
+#define CYG_REPORT_FUNCARG6DV( a,b,c,d,e,f ) \
+ CYG_REPORT_FUNCARG6( \
+ # a "=%d " # b "=%d " # c "=%d " # d "=%d " \
+ # e "=%d " # f "=%d " \
+ , a,b,c,d,e,f )
+#define CYG_REPORT_FUNCARG7DV( a,b,c,d,e,f,g ) \
+ CYG_REPORT_FUNCARG7( \
+ # a "=%d " # b "=%d " # c "=%d " # d "=%d " \
+ # e "=%d " # f "=%d " # g "=%d " \
+ , a,b,c,d,e,f,g )
+#define CYG_REPORT_FUNCARG8DV( a,b,c,d,e,f,g,h ) \
+ CYG_REPORT_FUNCARG8( \
+ # a "=%d " # b "=%d " # c "=%d " # d "=%d " \
+ # e "=%d " # f "=%d " # g "=%d " # h "=%d " \
+ , a,b,c,d,e,f,g,h )
+
+// short hex versions
+
+#define CYG_REPORT_FUNCARG1Y( a ) \
+ CYG_REPORT_FUNCARG1( "%x", a )
+#define CYG_REPORT_FUNCARG2Y( a,b ) \
+ CYG_REPORT_FUNCARG2( "%x %x", a,b )
+#define CYG_REPORT_FUNCARG3Y( a,b,c ) \
+ CYG_REPORT_FUNCARG3( "%x %x %x", a,b,c )
+#define CYG_REPORT_FUNCARG4Y( a,b,c,d ) \
+ CYG_REPORT_FUNCARG4( "%x %x %x %x", a,b,c,d )
+#define CYG_REPORT_FUNCARG5Y( a,b,c,d,e ) \
+ CYG_REPORT_FUNCARG5( "%x %x %x %x %x", a,b,c,d,e )
+#define CYG_REPORT_FUNCARG6Y( a,b,c,d,e,f ) \
+ CYG_REPORT_FUNCARG6( "%x %x %x %x %x %x", \
+ a,b,c,d,e,f )
+#define CYG_REPORT_FUNCARG7Y( a,b,c,d,e,f,g ) \
+ CYG_REPORT_FUNCARG7( "%x %x %x %x %x %x %x", \
+ a,b,c,d,e,f,g )
+#define CYG_REPORT_FUNCARG8Y( a,b,c,d,e,f,g,h ) \
+ CYG_REPORT_FUNCARG8( "%x %x %x %x %x %x %x %x", \
+ a,b,c,d,e,f,g,h )
+
+#define CYG_REPORT_FUNCARG1YV( a ) \
+ CYG_REPORT_FUNCARG1( # a "=%x ", a )
+#define CYG_REPORT_FUNCARG2YV( a,b ) \
+ CYG_REPORT_FUNCARG2( \
+ # a "=%x " # b "=%x " , a,b )
+#define CYG_REPORT_FUNCARG3YV( a,b,c ) \
+ CYG_REPORT_FUNCARG3( \
+ # a "=%x " # b "=%x " # c "=%x " , a,b,c )
+#define CYG_REPORT_FUNCARG4YV( a,b,c,d ) \
+ CYG_REPORT_FUNCARG4( \
+ # a "=%x " # b "=%x " # c "=%x " # d "=%x " \
+ , a,b,c,d )
+#define CYG_REPORT_FUNCARG5YV( a,b,c,d,e ) \
+ CYG_REPORT_FUNCARG5( \
+ # a "=%x " # b "=%x " # c "=%x " # d "=%x " \
+ # e "=%x " \
+ , a,b,c,d,e )
+#define CYG_REPORT_FUNCARG6YV( a,b,c,d,e,f ) \
+ CYG_REPORT_FUNCARG6( \
+ # a "=%x " # b "=%x " # c "=%x " # d "=%x " \
+ # e "=%x " # f "=%x " \
+ , a,b,c,d,e,f )
+#define CYG_REPORT_FUNCARG7YV( a,b,c,d,e,f,g ) \
+ CYG_REPORT_FUNCARG7( \
+ # a "=%x " # b "=%x " # c "=%x " # d "=%x " \
+ # e "=%x " # f "=%x " # g "=%x " \
+ , a,b,c,d,e,f,g )
+#define CYG_REPORT_FUNCARG8YV( a,b,c,d,e,f,g,h ) \
+ CYG_REPORT_FUNCARG8( \
+ # a "=%x " # b "=%x " # c "=%x " # d "=%x " \
+ # e "=%x " # f "=%x " # g "=%x " # h "=%x " \
+ , a,b,c,d,e,f,g,h )
+
+
+#endif // CYGONCE_INFRA_CYG_TRAC_H multiple inclusion protection
+// EOF cyg_trac.h
diff --git a/cesar/ecos/packages/infra/current/include/cyg_type.h b/cesar/ecos/packages/infra/current/include/cyg_type.h
new file mode 100644
index 0000000000..d542b00384
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/include/cyg_type.h
@@ -0,0 +1,480 @@
+#ifndef CYGONCE_INFRA_CYG_TYPE_H
+#define CYGONCE_INFRA_CYG_TYPE_H
+
+//==========================================================================
+//
+// cyg_type.h
+//
+// Standard types, and some useful coding macros.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg from an original by hmt
+// Contributors: nickg
+// Date: 1997-09-08
+// Purpose: share unambiguously sized types.
+// Description: we typedef [cyg_][u]int8,16,32 &c for general use.
+// Usage: #include "cyg/infra/cyg_type.h"
+// ...
+// cyg_int32 my_32bit_integer;
+//
+//####DESCRIPTIONEND####
+//
+
+#include <stddef.h> // Definition of NULL from the compiler
+
+// -------------------------------------------------------------------------
+// Some useful macros. These are defined here by default.
+
+// __externC is used in mixed C/C++ headers to force C linkage on an external
+// definition. It avoids having to put all sorts of ifdefs in.
+
+#ifdef __cplusplus
+# define __externC extern "C"
+#else
+# define __externC extern
+#endif
+// Also define externC for now - but it is deprecated
+#define externC __externC
+
+// -------------------------------------------------------------------------
+// The header <basetype.h> defines the base types used here. It is
+// supplied either by the target architecture HAL, or by the host
+// porting kit. They are all defined as macros, and only those that
+// make choices other than the defaults given below need be defined.
+
+#define CYG_LSBFIRST 1234
+#define CYG_MSBFIRST 4321
+
+#include <cyg/hal/basetype.h>
+
+#if (CYG_BYTEORDER != CYG_LSBFIRST) && (CYG_BYTEORDER != CYG_MSBFIRST)
+# error You must define CYG_BYTEORDER to equal CYG_LSBFIRST or CYG_MSBFIRST
+#endif
+
+#ifndef CYG_DOUBLE_BYTEORDER
+#define CYG_DOUBLE_BYTEORDER CYG_BYTEORDER
+#endif
+
+#ifndef cyg_halint8
+# define cyg_halint8 char
+#endif
+#ifndef cyg_halint16
+# define cyg_halint16 short
+#endif
+#ifndef cyg_halint32
+# define cyg_halint32 int
+#endif
+#ifndef cyg_halint64
+# define cyg_halint64 long long
+#endif
+
+#ifndef cyg_halcount8
+# define cyg_halcount8 int
+#endif
+#ifndef cyg_halcount16
+# define cyg_halcount16 int
+#endif
+#ifndef cyg_halcount32
+# define cyg_halcount32 int
+#endif
+#ifndef cyg_halcount64
+# define cyg_halcount64 long long
+#endif
+
+#ifndef cyg_haladdress
+# define cyg_haladdress cyg_uint32
+#endif
+#ifndef cyg_haladdrword
+# define cyg_haladdrword cyg_uint32
+#endif
+
+#ifndef cyg_halbool
+# define cyg_halbool int
+#endif
+
+#ifndef cyg_halatomic
+# define cyg_halatomic cyg_halint8
+#endif
+
+// -------------------------------------------------------------------------
+// Provide a default architecture alignment
+// This may be overridden in basetype.h if necessary.
+// These should be straightforward numbers to allow use in assembly.
+
+#ifndef CYGARC_ALIGNMENT
+# define CYGARC_ALIGNMENT 8
+#endif
+// And corresponding power of two alignment
+#ifndef CYGARC_P2ALIGNMENT
+# define CYGARC_P2ALIGNMENT 3
+#endif
+#if (CYGARC_ALIGNMENT) != (1 << CYGARC_P2ALIGNMENT)
+# error "Inconsistent CYGARC_ALIGNMENT and CYGARC_P2ALIGNMENT values"
+#endif
+
+// -------------------------------------------------------------------------
+// The obvious few that compilers may define for you.
+// But in case they don't:
+
+#ifndef NULL
+# define NULL 0
+#endif
+
+#ifndef __cplusplus
+#ifndef __bool_true_false_are_defined
+
+typedef cyg_halbool bool;
+
+# ifndef false
+# define false 0
+# endif
+
+# ifndef true
+# define true (!false)
+# endif
+
+#endif
+#endif
+
+// -------------------------------------------------------------------------
+// Allow creation of procedure-like macros that are a single statement,
+// and must be followed by a semi-colon
+
+#define CYG_MACRO_START do {
+#define CYG_MACRO_END } while (0)
+
+#define CYG_EMPTY_STATEMENT CYG_MACRO_START CYG_MACRO_END
+
+#define CYG_UNUSED_PARAM( _type_, _name_ ) CYG_MACRO_START \
+ _type_ __tmp1 = (_name_); \
+ _type_ __tmp2 = __tmp1; \
+ __tmp1 = __tmp2; \
+CYG_MACRO_END
+
+
+// -------------------------------------------------------------------------
+// Reference a symbol without explicitly making use of it. Ensures that
+// the object containing the symbol will be included when linking.
+
+#define CYG_REFERENCE_OBJECT(__object__) \
+ CYG_MACRO_START \
+ static void *__cygvar_discard_me__ __attribute__ ((unused)) = \
+ &(__object__); \
+ CYG_MACRO_END
+
+// -------------------------------------------------------------------------
+// Define basic types for using integers in memory and structures;
+// depends on compiler defaults and CPU type.
+
+typedef unsigned cyg_halint8 cyg_uint8 ;
+typedef signed cyg_halint8 cyg_int8 ;
+
+typedef unsigned cyg_halint16 cyg_uint16 ;
+typedef signed cyg_halint16 cyg_int16 ;
+
+typedef unsigned cyg_halint32 cyg_uint32 ;
+typedef signed cyg_halint32 cyg_int32 ;
+
+typedef unsigned cyg_halint64 cyg_uint64 ;
+typedef signed cyg_halint64 cyg_int64 ;
+
+typedef cyg_halbool cyg_bool ;
+
+// -------------------------------------------------------------------------
+// Define types for using integers in registers for looping and the like;
+// depends on CPU type, choose what it is most comfortable with, with at
+// least the range required.
+
+typedef unsigned cyg_halcount8 cyg_ucount8 ;
+typedef signed cyg_halcount8 cyg_count8 ;
+
+typedef unsigned cyg_halcount16 cyg_ucount16 ;
+typedef signed cyg_halcount16 cyg_count16 ;
+
+typedef unsigned cyg_halcount32 cyg_ucount32 ;
+typedef signed cyg_halcount32 cyg_count32 ;
+
+typedef unsigned cyg_halcount64 cyg_ucount64 ;
+typedef signed cyg_halcount64 cyg_count64 ;
+
+// -------------------------------------------------------------------------
+// Define a type to be used for atomic accesses. This type is guaranteed
+// to be read or written in a single uninterruptible operation. This type
+// is at least a single byte.
+
+typedef volatile unsigned cyg_halatomic cyg_atomic;
+typedef volatile unsigned cyg_halatomic CYG_ATOMIC;
+
+// -------------------------------------------------------------------------
+// Define types for access plain, on-the-metal memory or devices.
+
+typedef cyg_uint32 CYG_WORD;
+typedef cyg_uint8 CYG_BYTE;
+typedef cyg_uint16 CYG_WORD16;
+typedef cyg_uint32 CYG_WORD32;
+typedef cyg_uint64 CYG_WORD64;
+
+typedef cyg_haladdress CYG_ADDRESS;
+typedef cyg_haladdrword CYG_ADDRWORD;
+
+// -------------------------------------------------------------------------
+// Constructor ordering macros. These are added as annotations to all
+// static objects to order the constuctors appropriately.
+
+#if defined(__cplusplus) && defined(__GNUC__) && \
+ !defined(CYGBLD_ATTRIB_INIT_PRI)
+# define CYGBLD_ATTRIB_INIT_PRI( _pri_ ) __attribute__((init_priority(_pri_)))
+#elif !defined(CYGBLD_ATTRIB_INIT_PRI)
+// FIXME: should maybe just bomb out if this is attempted anywhere else?
+// Not sure
+# define CYGBLD_ATTRIB_INIT_PRI( _pri_ )
+#endif
+
+// The following will be removed eventually as it doesn't allow the use of
+// e.g. pri+5 format
+#define CYG_INIT_PRIORITY( _pri_ ) CYGBLD_ATTRIB_INIT_PRI( CYG_INIT_##_pri_ )
+
+#define CYGBLD_ATTRIB_INIT_BEFORE( _pri_ ) CYGBLD_ATTRIB_INIT_PRI(_pri_-100)
+#define CYGBLD_ATTRIB_INIT_AFTER( _pri_ ) CYGBLD_ATTRIB_INIT_PRI(_pri_+100)
+
+#define CYG_INIT_HAL 10000
+#define CYG_INIT_SCHEDULER 11000
+#define CYG_INIT_INTERRUPTS 12000
+#define CYG_INIT_DRIVERS 13000
+#define CYG_INIT_CLOCK 14000
+#define CYG_INIT_IDLE_THREAD 15000
+#define CYG_INIT_THREADS 16000
+#define CYG_INIT_KERNEL 40000
+#define CYG_INIT_MEMALLOC 47000
+#define CYG_INIT_IO 49000
+#define CYG_INIT_IO_FS 50000
+#define CYG_INIT_LIBC 52000
+#define CYG_INIT_COMPAT 55000
+#define CYG_INIT_APPLICATION 60000
+#define CYG_INIT_PREDEFAULT 65534
+#define CYG_INIT_DEFAULT 65535
+
+// -------------------------------------------------------------------------
+// Label name macros. Some toolsets generate labels with initial
+// underscores and others don't. CYG_LABEL_NAME should be used on
+// labels in C/C++ code that are defined in assembly code or linker
+// scripts. CYG_LABEL_DEFN is for use in assembly code and linker
+// scripts where we need to manufacture labels that can be used from
+// C/C++.
+// These are default implementations that should work for most targets.
+// They may be overridden in basetype.h if necessary.
+
+#ifndef CYG_LABEL_NAME
+
+#define CYG_LABEL_NAME(_name_) _name_
+
+#endif
+
+#ifndef CYG_LABEL_DEFN
+
+#define CYG_LABEL_DEFN(_label) _label
+
+#endif
+
+// -------------------------------------------------------------------------
+// COMPILER-SPECIFIC STUFF
+
+#ifdef __GNUC__
+#if defined(__GNU_PATCHLEVEL__)
+# define __GNUC_VERSION__ (__GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100 \
+ + __GNUC_PATCHLEVEL__)
+#else
+# define __GNUC_VERSION__ (__GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100)
+#endif
+
+// Force a 'C' routine to be called like a 'C++' contructor
+# if !defined(CYGBLD_ATTRIB_CONSTRUCTOR)
+# define CYGBLD_ATTRIB_CONSTRUCTOR __attribute__((constructor))
+# endif
+
+// Define a compiler-specific rune for saying a function doesn't return
+# if !defined(CYGBLD_ATTRIB_NORET)
+# define CYGBLD_ATTRIB_NORET __attribute__((noreturn))
+# endif
+
+// How to define weak symbols - this is only relevant for ELF and a.out,
+// but that won't be a problem for eCos
+# if !defined(CYGBLD_ATTRIB_WEAK)
+# define CYGBLD_ATTRIB_WEAK __attribute__ ((weak))
+# endif
+
+// How to define alias to symbols. Just pass in the symbol itself, not
+// the string name of the symbol
+# if !defined(CYGBLD_ATTRIB_ALIAS)
+# define CYGBLD_ATTRIB_ALIAS(__symbol__) \
+ __attribute__ ((alias (#__symbol__)))
+# endif
+
+// This effectively does the reverse of the previous macro. It defines
+// a name that the attributed variable or function will actually have
+// in assembler.
+# if !defined(CYGBLD_ATTRIB_ASM_ALIAS)
+# define __Str(x) #x
+# define __Xstr(x) __Str(x)
+# define CYGBLD_ATTRIB_ASM_ALIAS(__symbol__) \
+ __asm__ ( __Xstr( CYG_LABEL_DEFN( __symbol__ ) ) )
+# endif
+
+// Shows that a function returns the same value when given the same args, but
+// note this can't be used if there are pointer args
+# if !defined(CYGBLD_ATTRIB_CONST)
+# define CYGBLD_ATTRIB_CONST __attribute__((const))
+#endif
+
+// Assign a defined variable to a specific section
+# if !defined(CYGBLD_ATTRIB_SECTION)
+# define CYGBLD_ATTRIB_SECTION(__sect__) __attribute__((section (__sect__)))
+# endif
+
+// Give a type or object explicit minimum alignment
+# if !defined(CYGBLD_ATTRIB_ALIGN)
+# define CYGBLD_ATTRIB_ALIGN(__align__) __attribute__((aligned(__align__)))
+# endif
+
+# if !defined(CYGBLD_ATTRIB_ALIGN_MAX)
+# define CYGBLD_ATTRIB_ALIGN_MAX __attribute__((aligned))
+# endif
+
+# if !defined(CYGBLD_ATTRIB_ALIGNOFTYPE)
+# define CYGBLD_ATTRIB_ALIGNOFTYPE( _type_ ) \
+ __attribute__((aligned(__alignof__( _type_ ))))
+# endif
+
+// Teach compiler how to check format of printf-like functions
+# define CYGBLD_ATTRIB_PRINTF_FORMAT(__format__, __args__) \
+ __attribute__((format (printf, __format__, __args__)))
+
+// Teach compiler how to check format of scanf-like functions
+# define CYGBLD_ATTRIB_SCANF_FORMAT(__format__, __args__) \
+ __attribute__((format (scanf, __format__, __args__)))
+
+// Teach compiler how to check format of strftime-like functions
+# define CYGBLD_ATTRIB_STRFTIME_FORMAT(__format__, __args__) \
+ __attribute__((format (strftime, __format__, __args__)))
+
+// Tell the compiler not to throw away a variable or function. Only
+// available on 3.3.4 or above. Old version's didn't throw them away,
+// but using the unused attribute should stop warnings.
+# if !defined(CYGBLD_ATTRIB_USED)
+# if __GNUC_VERSION__ >= 30404
+# define CYGBLD_ATTRIB_USED __attribute__((used))
+# else
+# define CYGBLD_ATTRIB_USED __attribute__((unused))
+# endif
+# endif
+#else // non-GNU
+
+# define CYGBLD_ATTRIB_CONSTRUCTOR
+
+# define CYGBLD_ATTRIB_NORET
+ // This intentionally gives an error only if we actually try to
+ // use it. #error would give an error if we simply can't.
+// FIXME: Had to disarm the bomb - the CYGBLD_ATTRIB_WEAK macro is now
+// (indirectly) used in host tools.
+# define CYGBLD_ATTRIB_WEAK /* !!!-- Attribute weak not defined --!!! */
+
+# define CYGBLD_ATTRIB_ALIAS(__x__) !!!-- Attribute alias not defined --!!!
+
+# define CYGBLD_ATTRIB_ASM_ALIAS(__symbol__) !!!-- Asm alias not defined --!!!
+
+# define CYGBLD_ATTRIB_CONST
+
+# define CYGBLD_ATTRIB_ALIGN(__align__) !!!-- Alignment alias not defined --!!!
+
+# define CYGBLD_ATTRIB_ALIGN_MAX !!!-- Alignment alias not defined --!!!
+
+# define CYGBLD_ATTRIB_ALIGNOFTYPE( _type_ ) !!!-- Alignment alias not defined --!!!
+
+# define CYGBLD_ATTRIB_PRINTF_FORMAT(__format__, __args__)
+
+# define CYGBLD_ATTRIB_SCANF_FORMAT(__format__, __args__)
+
+# define CYGBLD_ATTRIB_STRFTIME_FORMAT(__format__, __args__)
+
+
+#endif
+
+// How to define weak aliases. Currently this is simply a mixture of the
+// above
+
+# define CYGBLD_ATTRIB_WEAK_ALIAS(__symbol__) \
+ CYGBLD_ATTRIB_WEAK CYGBLD_ATTRIB_ALIAS(__symbol__)
+
+#ifdef __cplusplus
+# define __THROW throw()
+#else
+# define __THROW
+#endif
+
+// -------------------------------------------------------------------------
+// Variable annotations
+// These annotations may be added to various static variables in the
+// HAL and kernel to indicate which component they belong to. These
+// are used by some targets to optimize memory placement of these
+// variables.
+
+#ifndef CYGBLD_ANNOTATE_VARIABLE_HAL
+#define CYGBLD_ANNOTATE_VARIABLE_HAL
+#endif
+#ifndef CYGBLD_ANNOTATE_VARIABLE_SCHED
+#define CYGBLD_ANNOTATE_VARIABLE_SCHED
+#endif
+#ifndef CYGBLD_ANNOTATE_VARIABLE_CLOCK
+#define CYGBLD_ANNOTATE_VARIABLE_CLOCK
+#endif
+#ifndef CYGBLD_ANNOTATE_VARIABLE_INTR
+#define CYGBLD_ANNOTATE_VARIABLE_INTR
+#endif
+
+// -------------------------------------------------------------------------
+// Various "flavours" of memory regions that can be described by the
+// Memory Layout Tool (MLT).
+
+#define CYGMEM_REGION_ATTR_R 0x01 // Region can be read
+#define CYGMEM_REGION_ATTR_W 0x02 // Region can be written
+
+// -------------------------------------------------------------------------
+#endif // CYGONCE_INFRA_CYG_TYPE_H multiple inclusion protection
+// EOF cyg_type.h
diff --git a/cesar/ecos/packages/infra/current/include/cyg_type.inc b/cesar/ecos/packages/infra/current/include/cyg_type.inc
new file mode 100644
index 0000000000..551d7985ed
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/include/cyg_type.inc
@@ -0,0 +1,87 @@
+#ifndef CYGONCE_INFRA_CYG_TYPE_INC
+#define CYGONCE_INFRA_CYG_TYPE_INC
+
+//==========================================================================
+//
+// cyg_type.inc
+//
+// Standard types, and some useful coding macros.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-07-25
+// Purpose: Define symbols for use in linker scripts and "generic" asm
+// Description: This file should only use #defines - it should be safe
+// to include from both linker scripts and assembler files
+// Usage: #include <cyg/infra/cyg_type.inc>
+//
+//
+//####DESCRIPTIONEND####
+
+#include <cyg/hal/basetype.h>
+
+// -------------------------------------------------------------------------
+// Label name macros. Some toolsets generate labels with initial
+// underscores and others don't. CYG_LABEL_NAME should be used on
+// labels in C/C++ code that are defined in assembly code or linker
+// scripts. CYG_LABEL_DEFN is for use in assembly code and linker
+// scripts where we need to manufacture labels that can be used from
+// C/C++.
+// These are default implementations that should work for most targets.
+// They may be overridden in basetype.h if necessary.
+
+#ifndef CYG_LABEL_DEFN
+# define CYG_LABEL_DEFN(_label) _label
+#endif
+
+// -------------------------------------------------------------------------
+// Provide a default architecture alignment.
+// This may be overridden in basetype.h if necessary.
+
+#ifndef CYGARC_ALIGNMENT
+# define CYGARC_ALIGNMENT 8
+#endif
+// And corresponding power of two alignment
+#ifndef CYGARC_P2ALIGNMENT
+# define CYGARC_P2ALIGNMENT 3
+#endif
+
+#endif /* CYGONCE_INFRA_CYG_TYPE_INC */
+
+// EOF cyg_type.inc
diff --git a/cesar/ecos/packages/infra/current/include/diag.h b/cesar/ecos/packages/infra/current/include/diag.h
new file mode 100644
index 0000000000..5381cdd9ab
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/include/diag.h
@@ -0,0 +1,117 @@
+#ifndef CYGONCE_INFRA_DIAG_H
+#define CYGONCE_INFRA_DIAG_H
+
+/*=============================================================================
+//
+// diag.h
+//
+// Diagnostic Routines for Infra Development
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg, gthomas
+// Date: 1998-03-02
+// Purpose: Diagnostic Routines for Infra Development
+// Description: Diagnostic routines for use during infra development.
+// Usage: #include <cyg/infra/diag.h>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================*/
+
+#include <pkgconf/infra.h>
+#include <cyg/infra/cyg_type.h>
+#include <stdarg.h>
+
+/*---------------------------------------------------------------------------*/
+/* Diagnostic routines */
+
+externC void diag_init(void); /* Initialize, call before any others*/
+
+externC void diag_write_char(char c); /* Write single char to output */
+
+externC void diag_write_string(const char *psz); /* Write zero terminated string */
+
+externC void diag_write_dec( cyg_int32 n); /* Write decimal value */
+
+externC void diag_write_hex( cyg_uint32 n); /* Write hexadecimal value */
+
+externC void diag_dump_buf(void *buf, CYG_ADDRWORD len);
+externC void diag_dump_buf_32bit(void *buf, CYG_ADDRWORD len);
+externC void diag_dump_buf_16bit(void *buf, CYG_ADDRWORD len);
+typedef int __printf_fun(const char *fmt, ...);
+externC void diag_vdump_buf_with_offset(__printf_fun *pf,
+ cyg_uint8 *p,
+ CYG_ADDRWORD s,
+ cyg_uint8 *base);
+externC void diag_dump_buf_with_offset(cyg_uint8 *p,
+ CYG_ADDRWORD s,
+ cyg_uint8 *base);
+
+externC void diag_dump_buf_with_offset_32bit(cyg_uint32 *p,
+ CYG_ADDRWORD s,
+ cyg_uint32 *base);
+
+externC void diag_dump_buf_with_offset_16bit(cyg_uint16 *p,
+ CYG_ADDRWORD s,
+ cyg_uint16 *base);
+
+/* Formatted print */
+externC int diag_printf( const char *fmt, ... ) CYGBLD_ATTRIB_PRINTF_FORMAT(1,2);
+
+externC void diag_init_putc(void (*putc)(char c, void **param));
+externC int diag_sprintf(char *buf, const char *fmt, ...)
+ CYGBLD_ATTRIB_PRINTF_FORMAT(2,3);
+externC int diag_snprintf(char *buf, size_t len, const char *fmt, ...)
+ CYGBLD_ATTRIB_PRINTF_FORMAT(3,4);
+externC int diag_vsprintf(char *buf, const char *fmt, va_list ap)
+ CYGBLD_ATTRIB_PRINTF_FORMAT(2,0);
+externC int diag_vprintf(const char *fmt, va_list ap)
+ CYGBLD_ATTRIB_PRINTF_FORMAT(1,0);
+
+
+/*---------------------------------------------------------------------------*/
+/* Internal Diagnostic MACROS */
+
+#define DIAG_DEVICE_START_SYNC()
+#define DIAG_DEVICE_END_SYNC()
+
+/*---------------------------------------------------------------------------*/
+#endif /* CYGONCE_INFRA_DIAG_H */
+/* EOF diag.h */
diff --git a/cesar/ecos/packages/infra/current/include/testcase.h b/cesar/ecos/packages/infra/current/include/testcase.h
new file mode 100644
index 0000000000..1ac4406fa1
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/include/testcase.h
@@ -0,0 +1,199 @@
+#ifndef CYGONCE_INFRA_TESTCASE_H
+#define CYGONCE_INFRA_TESTCASE_H
+//==========================================================================
+//
+// testcase.h
+//
+// Target side interface for tests
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy
+// Contributors: ctarpy, jlarmour
+// Date: 1999-02-16
+//
+//
+//####DESCRIPTIONEND####
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+
+
+// CONSTANTS
+
+// Status codes
+
+typedef enum {
+ CYGNUM_TEST_FAIL,
+ CYGNUM_TEST_PASS,
+ CYGNUM_TEST_EXIT,
+ CYGNUM_TEST_INFO,
+ CYGNUM_TEST_GDBCMD,
+ CYGNUM_TEST_NA
+} Cyg_test_code;
+
+// FUNCTION PROTOTYPES
+
+externC void
+cyg_test_output(Cyg_test_code _status_, const char* _msg_, int _line_number_,
+ const char* _file_);
+
+// This should be called at the start of each test file
+externC void
+cyg_test_init(void);
+
+// This causes the test to exit
+externC void
+cyg_test_exit(void) CYGBLD_ATTRIB_NORET;
+
+// GLOBALS
+
+externC int cyg_test_is_simulator; // infrastructure changes as necessary
+
+// MACROS
+
+// ----------- Info -----------
+//
+// Any macro with EXIT in it should only be used in a panic situation. It
+// is synonymous with assert. If the test behaves as expected, it
+// should call one of the FINISH macros.
+//
+// - Compound testcases
+// If a testcase is capable of being part of a compound, then the following
+// rules apply:
+// - The testcase must only ever call one of the EXIT macros if it decides
+// the state of the system is such that further testing is meaningless;
+// such a call would prevent subsequent tests in the compound from being
+// run.
+// - In order to terminate the test, the testcase should call one of the
+// FINISH macros. This must be done from within main().
+
+
+
+
+// The following is the testcase API to be used by testcases.
+
+#define CYG_TEST_INIT() cyg_test_init()
+
+#define CYG_TEST_INFO( _msg_ ) \
+ cyg_test_output(CYGNUM_TEST_INFO, _msg_, __LINE__, __FILE__)
+
+#define CYG_TEST_PASS( _msg_ ) \
+ cyg_test_output(CYGNUM_TEST_PASS, _msg_, __LINE__, __FILE__)
+
+#define CYG_TEST_FAIL( _msg_ ) \
+ cyg_test_output(CYGNUM_TEST_FAIL, _msg_, __LINE__, __FILE__)
+
+#define CYG_TEST_EXIT( _msg_ ) \
+ (cyg_test_output(CYGNUM_TEST_EXIT, _msg_, __LINE__, __FILE__), \
+ cyg_test_exit())
+
+// Use the following macro to instruct GDB to run a command when using
+// the automatic testing infrastructure. This must be used *before*
+// CYG_TEST_INIT() is called
+
+#define CYG_TEST_GDBCMD( _command_ ) \
+ CYG_MACRO_START \
+ cyg_test_output(CYGNUM_TEST_GDBCMD, _command_, __LINE__, __FILE__); \
+ CYG_MACRO_END
+
+// Use the following macro to declare that a test is not applicable for
+// some reason - perhaps not appropriate due to chosen hardware,
+// configuration options governing the presence of a tested feature, or
+// even configuration options governing the presence of a feature the
+// test relies on _in_order_ to test the feature (despite being
+// unrelated!)
+
+#define CYG_TEST_NA( _msg_ ) \
+ CYG_MACRO_START \
+ cyg_test_output(CYGNUM_TEST_NA, _msg_, __LINE__, __FILE__); \
+ cyg_test_exit(); \
+ CYG_MACRO_END
+
+#ifdef CYG_COMPOUND_TEST
+# define CYG_TEST_FINISH( _msg_ ) \
+ CYG_MACRO_START \
+ cyg_test_output(CYGNUM_TEST_EXIT, _msg_, __LINE__, __FILE__); \
+ return 0; \
+ CYG_MACRO_END
+#else
+# define CYG_TEST_FINISH( _msg_ ) CYG_TEST_EXIT( _msg_ )
+#endif
+
+#define CYG_TEST_STILL_ALIVE( _ctr_ , _msg_ ) CYG_TEST_INFO( _msg_ )
+
+
+// ----- The following are convenience functions
+
+#define CYG_TEST_PASS_FINISH( _msg_ ) \
+ CYG_MACRO_START \
+ CYG_TEST_PASS( _msg_ ); \
+ CYG_TEST_FINISH("done"); \
+ CYG_MACRO_END
+
+#define CYG_TEST_FAIL_FINISH( _msg_ ) \
+ CYG_MACRO_START \
+ CYG_TEST_FAIL( _msg_ ); \
+ CYG_TEST_FINISH("done"); \
+ CYG_MACRO_END
+
+
+#define CYG_TEST_CHECK( _chk_ , _msg_) \
+ CYG_MACRO_START \
+ (void)(( _chk_ ) || ( CYG_TEST_FAIL( _msg_ ) , cyg_test_exit(), 1)); \
+ CYG_MACRO_END
+
+#define CYG_TEST_PASS_FAIL( _cdn_, _msg_ ) \
+ CYG_MACRO_START \
+ if ( _cdn_ ) CYG_TEST_PASS( _msg_ ); else CYG_TEST_FAIL( _msg_ ); \
+ CYG_MACRO_END
+
+
+// CYG_TEST_PASS_EXIT and CYG_TEST_FAIL_EXIT are now obscelete,
+// but are here for now
+// to avoid breaking testcases which still use them. They will
+// soon go away.
+#define CYG_TEST_PASS_EXIT( _msg_ ) \
+ (cyg_test_output(CYGNUM_TEST_PASS, _msg_, __LINE__, __FILE__), \
+ CYG_TEST_EXIT("done"))
+
+#define CYG_TEST_FAIL_EXIT( _msg_ ) \
+ (cyg_test_output(CYGNUM_TEST_FAIL, _msg_, __LINE__, __FILE__), \
+ CYG_TEST_EXIT("done"))
+
+
+#endif // CYGONCE_INFRA_TESTCASE_H
+// EOF testcase.h
diff --git a/cesar/ecos/packages/infra/current/src/abort.cxx b/cesar/ecos/packages/infra/current/src/abort.cxx
new file mode 100644
index 0000000000..815c1d1c23
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/abort.cxx
@@ -0,0 +1,66 @@
+//==========================================================================
+//
+// abort.cxx
+//
+// Dummy abort()
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003 Nick Garnett <nickg@calivar.com>
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Date: 2003-04-02
+// Purpose: provide a dummy abort() function
+// Description: Parts of the C and C++ compiler runtime systems have
+// references to abort() built in to them. This definition
+// satisfies these references. Note that it is not expected
+// that this function will ever be called.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/infra.h>
+#include <cyg/infra/cyg_ass.h>
+
+//==========================================================================
+
+extern "C" void
+abort( void )
+{
+ CYG_FAIL("abort() called");
+ for (;;)
+ continue;
+}
+
+//==========================================================================
+// EOF abort.cxx
diff --git a/cesar/ecos/packages/infra/current/src/buffer.cxx b/cesar/ecos/packages/infra/current/src/buffer.cxx
new file mode 100644
index 0000000000..be4ea7571c
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/buffer.cxx
@@ -0,0 +1,791 @@
+//==========================================================================
+//
+// buffer.cxx
+//
+// Memory buffered trace and assert functions
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1998-10-16
+// Purpose: Buffered Trace and assert functions
+// Description: The functions in this file are a buffered implementation
+// of the standard trace and assert functions. These store
+// trace messages in a memory buffer and emit them when an
+// assert is hit, or when requested to.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/infra.h>
+
+#ifdef CYGDBG_INFRA_DEBUG_TRACE_ASSERT_BUFFER
+
+#include <cyg/infra/cyg_type.h> // base types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <pkgconf/hal.h> // HAL configury
+#include <cyg/infra/diag.h> // HAL polled output
+#include <cyg/hal/hal_arch.h> // architectural stuff for...
+#include <cyg/hal/hal_intr.h> // interrupt control
+
+#ifdef CYGPKG_KERNEL
+#include <pkgconf/kernel.h> // kernel configury
+#include <cyg/kernel/thread.hxx> // thread id to print
+#include <cyg/kernel/sched.hxx> // ancillaries for above
+#include <cyg/kernel/thread.inl> // ancillaries for above
+#endif
+
+// -------------------------------------------------------------------------
+// Local Configuration: hack me!
+
+// these are generally:
+// if 0, feature is disabled
+// if 1, feature is enabled, printing is default width
+// if >1, field is padded up to that width if necessary
+// (not truncated ever)
+
+#define CYG_FILENAME 20
+#define CYG_THREADID 1
+#define CYG_LINENUM 4
+#define CYG_FUNCNAME 100
+#define CYG_DIAG_PRINTF 1
+#define CYG_FUNC_INDENT 2
+
+#ifndef CYGPKG_KERNEL
+# undef CYG_THREADID
+# define CYG_THREADID 0
+#endif
+
+#if CYG_FUNCNAME == 1
+#define CYG_FBUF_SIZE 100
+#else
+#define CYG_FBUF_SIZE (CYG_FUNCNAME+20)
+#endif
+
+// -------------------------------------------------------------------------
+// Trace buffer
+
+#ifdef CYGDBG_USE_TRACING
+
+struct Cyg_TraceRecord
+{
+ cyg_uint32 what;
+ cyg_uint32 tid;
+ const char *function;
+ const char *file;
+ const char *message;
+ cyg_uint32 line;
+ cyg_uint32 narg;
+ CYG_ADDRWORD arg[8];
+};
+
+Cyg_TraceRecord cyg_infra_trace_buffer[CYGDBG_INFRA_DEBUG_TRACE_BUFFER_SIZE];
+
+static cyg_uint32 cyg_infra_trace_buffer_pos = 0;
+
+static cyg_bool cyg_infra_trace_buffer_enable = true;
+
+static cyg_bool cyg_infra_trace_buffer_wrap = false;
+
+// -------------------------------------------------------------------------
+// Functions to trim file names and function names down to printable lengths
+// (these are shared between trace and assert functions)
+
+#if 0
+static char * tracepremsgs[] = {
+ " INFO:",
+ "ENTER :",
+ "ARGS :",
+ "RETURN:",
+ "bad code"
+};
+#endif
+
+static char * tracepremsgs[] = {
+ "'",
+ "{{",
+ "((",
+ "}}",
+ "bad code"
+};
+
+static char * tracepostmsgs[] = {
+ "'",
+ "",
+ "))",
+ "",
+ "bad code"
+};
+
+static void
+write_whattrace( cyg_uint32 what )
+{
+#if CYG_FUNC_INDENT
+ static cyg_int32 cyg_indent = 0;
+ if ( 3 == what )
+ cyg_indent -= CYG_FUNC_INDENT;
+ cyg_int32 i = cyg_indent;
+ for ( ; i > 0; i-- )
+ diag_write_string( " " );
+#endif // CYG_FUNC_INDENT
+ diag_write_string( tracepremsgs[ what > 4 ? 4 : what ] );
+#if CYG_FUNC_INDENT
+ if ( 1 == what )
+ cyg_indent += CYG_FUNC_INDENT;
+#endif // CYG_FUNC_INDENT
+}
+
+static void
+write_whattracepost( cyg_uint32 what )
+{
+ diag_write_string( tracepostmsgs[ what > 4 ? 4 : what ] );
+}
+
+
+#endif // CYGDBG_USE_TRACING
+
+// -------------------------------------------------------------------------
+
+#if defined(CYGDBG_USE_TRACING) || defined(CYGDBG_USE_ASSERTS)
+
+static const char *trim_file(const char *file)
+{
+#if CYG_FILENAME
+ if ( NULL == file )
+ file = "<nofile>";
+
+#if 1 == CYG_FILENAME
+ const char *f = file;
+ while( *f ) f++;
+ while( *f != '/' && f != file ) f--;
+ return f==file?f:(f+1);
+#else
+ static char fbuf2[100];
+ const char *f = file;
+ char *g = fbuf2;
+ while( *f ) f++;
+ while( *f != '/' && f != file ) f--;
+ if ( f > file ) f++;
+ while( *f ) *g++ = *f++;
+ while( CYG_FILENAME > (g - fbuf2) ) *g++ = ' ';
+ *g = 0;
+ return fbuf2;
+#endif
+#else
+ return "";
+#endif
+}
+
+static const char *trim_func(const char *func)
+{
+#if CYG_FUNCNAME
+ static char fbuf[CYG_FBUF_SIZE];
+ cyg_count32 i;
+
+ if ( NULL == func )
+ func = "<nofunc>";
+
+ for( i = 0; func[i] && func[i] != '(' && i < CYG_FBUF_SIZE-4 ; i++ )
+ fbuf[i] = func[i];
+
+ fbuf[i++] = '(';
+ fbuf[i++] = ')';
+ fbuf[i ] = 0;
+ i=0;
+#if 1 == CYG_FUNCNAME
+ return &fbuf[i];
+#else
+ char *p = &fbuf[i];
+ while ( *p ) p++;
+ while ( CYG_FUNCNAME > (p - (&fbuf[i])) ) *p++ = ' ';
+ *p = 0;
+ return &fbuf[i];
+#endif
+#else
+ return "";
+#endif
+}
+
+static void write_lnum( cyg_uint32 lnum)
+{
+#if CYG_LINENUM
+ diag_write_char('[');
+#if 1 < CYG_LINENUM
+ cyg_uint32 i, j;
+ for ( i = 2, j = 100; i < CYG_LINENUM ; i++, j *= 10 )
+ if ( lnum < j )
+ diag_write_char(' ');
+#endif
+ diag_write_dec(lnum);
+ diag_write_char(']');
+ diag_write_char(' ');
+#endif
+}
+
+#endif // defined(CYGDBG_USE_TRACING) || defined(CYGDBG_USE_ASSERTS)
+
+// -------------------------------------------------------------------------
+
+#if defined(CYGDBG_USE_TRACING) || defined(CYGDBG_USE_ASSERTS)
+
+#if CYG_THREADID
+static cyg_uint32 get_tid(void)
+{
+
+ Cyg_Thread *t = Cyg_Thread::self();
+ cyg_uint16 tid = 0xFFFF;
+
+ if( t != NULL ) tid = t->get_unique_id();
+
+ return tid;
+}
+#else
+# define get_tid() (0xFFFF)
+#endif
+
+#endif // defined(CYGDBG_USE_TRACING) || defined(CYGDBG_USE_ASSERTS)
+
+#ifdef CYGDBG_USE_ASSERTS
+static void write_thread_id()
+{
+#if CYG_THREADID
+ cyg_uint16 tid = get_tid();
+
+ diag_write_char('<');
+ diag_write_hex(tid);
+ diag_write_char('>');
+#endif
+}
+#endif
+
+// -------------------------------------------------------------------------
+// Trace functions:
+
+#ifdef CYGDBG_USE_TRACING
+
+static void print_trace_buffer(void)
+{
+ cyg_count32 start = cyg_infra_trace_buffer_pos;
+ cyg_count32 end = start;
+ cyg_count32 i;
+
+ // If the buffer has wrapped we want to display the records from
+ // the current pos and around back to the same place. If the buffer
+ // has not wrapped, we want to display from the start to pos.
+
+ if( !cyg_infra_trace_buffer_wrap )
+ start = 0;
+
+ i = start;
+ do
+ {
+ Cyg_TraceRecord *rec = &cyg_infra_trace_buffer[i];
+ cyg_uint32 old_ints;
+
+ const char *psz_msg = rec->message;
+
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+ if ( NULL == psz_msg )
+ psz_msg = "<nomsg>";
+
+ diag_write_string( "TRACE: " );
+#if CYG_THREADID
+ diag_write_char('<');
+ diag_write_hex(rec->tid);
+ diag_write_char('>');
+#endif
+ diag_write_string(trim_file(rec->file));
+ write_lnum(rec->line);
+ diag_write_string(trim_func(rec->function));
+ diag_write_char(' ');
+ write_whattrace( rec->what );
+#if CYG_DIAG_PRINTF
+ diag_printf( psz_msg,
+ rec->arg[0], rec->arg[1],
+ rec->arg[2], rec->arg[3],
+ rec->arg[4], rec->arg[5],
+ rec->arg[6], rec->arg[7] );
+#else
+ diag_write_string(psz_msg);
+ diag_write_char(' ');
+
+ for( cyg_count8 j = 0; j < rec->narg ; j++ )
+ {
+ diag_write_hex(rec->arg[j]);
+ diag_write_char(' ');
+ }
+#endif
+ write_whattracepost( rec->what );
+ diag_write_char('\n');
+
+ DIAG_DEVICE_END_SYNC();
+ HAL_RESTORE_INTERRUPTS(old_ints);
+
+ i++;
+ if( i == CYGDBG_INFRA_DEBUG_TRACE_BUFFER_SIZE )
+ i = 0;
+
+ } while( i != end );
+
+}
+
+static void increment_buffer_pos()
+{
+ cyg_infra_trace_buffer_pos++;
+
+ if( cyg_infra_trace_buffer_pos == CYGDBG_INFRA_DEBUG_TRACE_BUFFER_SIZE )
+ {
+#if defined(CYGDBG_INFRA_DEBUG_TRACE_BUFFER_WRAP)
+ cyg_infra_trace_buffer_pos = 0;
+ cyg_infra_trace_buffer_wrap = true;
+#elif defined(CYGDBG_INFRA_DEBUG_TRACE_BUFFER_HALT)
+ cyg_infra_trace_buffer_enable = false;
+#elif defined(CYGDBG_INFRA_DEBUG_TRACE_BUFFER_PRINT)
+ cyg_infra_trace_buffer_pos = 0;
+ print_trace_buffer();
+#else
+#error No trace buffer full mode set
+#endif
+ }
+
+}
+
+// -------------------------------------------------------------------------
+
+externC void
+cyg_tracenomsg( const char *psz_func, const char *psz_file, cyg_uint32 linenum )
+{
+ cyg_uint32 old_ints;
+
+ if( !cyg_infra_trace_buffer_enable ) return;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+
+ Cyg_TraceRecord *rec = &cyg_infra_trace_buffer[cyg_infra_trace_buffer_pos];
+
+ rec->what = 0;
+ rec->tid = get_tid();
+ rec->function = psz_func;
+ rec->file = psz_file;
+ rec->line = linenum;
+ rec->message = 0;
+ rec->narg = 0;
+
+ increment_buffer_pos();
+
+ HAL_RESTORE_INTERRUPTS(old_ints);
+
+};
+
+// provide every other one of these as a space/caller bloat compromise.
+
+externC void
+cyg_tracemsg( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg )
+{
+ cyg_uint32 old_ints;
+
+ if( !cyg_infra_trace_buffer_enable ) return;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+
+ Cyg_TraceRecord *rec = &cyg_infra_trace_buffer[cyg_infra_trace_buffer_pos];
+
+ rec->what = what;
+ rec->tid = get_tid();
+ rec->function = psz_func;
+ rec->file = psz_file;
+ rec->line = linenum;
+ rec->message = psz_msg;
+ rec->narg = 0;
+
+ increment_buffer_pos();
+
+ HAL_RESTORE_INTERRUPTS(old_ints);
+
+};
+
+externC void
+cyg_tracemsg2( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1 )
+{
+ cyg_uint32 old_ints;
+
+ if( !cyg_infra_trace_buffer_enable ) return;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+
+ Cyg_TraceRecord *rec = &cyg_infra_trace_buffer[cyg_infra_trace_buffer_pos];
+
+ rec->what = what;
+ rec->tid = get_tid();
+ rec->function = psz_func;
+ rec->file = psz_file;
+ rec->line = linenum;
+ rec->message = psz_msg;
+ rec->narg = 2;
+
+ rec->arg[0] = arg0;
+ rec->arg[1] = arg1;
+
+ increment_buffer_pos();
+
+ HAL_RESTORE_INTERRUPTS(old_ints);
+};
+
+externC void
+cyg_tracemsg4( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1,
+ CYG_ADDRWORD arg2, CYG_ADDRWORD arg3 )
+{
+ cyg_uint32 old_ints;
+
+ if( !cyg_infra_trace_buffer_enable ) return;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+
+ Cyg_TraceRecord *rec = &cyg_infra_trace_buffer[cyg_infra_trace_buffer_pos];
+
+ rec->what = what;
+ rec->tid = get_tid();
+ rec->function = psz_func;
+ rec->file = psz_file;
+ rec->line = linenum;
+ rec->message = psz_msg;
+ rec->narg = 4;
+
+ rec->arg[0] = arg0;
+ rec->arg[1] = arg1;
+ rec->arg[2] = arg2;
+ rec->arg[3] = arg3;
+
+ increment_buffer_pos();
+
+ HAL_RESTORE_INTERRUPTS(old_ints);
+};
+
+externC void
+cyg_tracemsg6( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1,
+ CYG_ADDRWORD arg2, CYG_ADDRWORD arg3,
+ CYG_ADDRWORD arg4, CYG_ADDRWORD arg5 )
+{
+ cyg_uint32 old_ints;
+
+ if( !cyg_infra_trace_buffer_enable ) return;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+
+ Cyg_TraceRecord *rec = &cyg_infra_trace_buffer[cyg_infra_trace_buffer_pos];
+
+ rec->what = what;
+ rec->tid = get_tid();
+ rec->function = psz_func;
+ rec->file = psz_file;
+ rec->line = linenum;
+ rec->message = psz_msg;
+ rec->narg = 6;
+
+ rec->arg[0] = arg0;
+ rec->arg[1] = arg1;
+ rec->arg[2] = arg2;
+ rec->arg[3] = arg3;
+ rec->arg[4] = arg4;
+ rec->arg[5] = arg5;
+
+ increment_buffer_pos();
+
+ HAL_RESTORE_INTERRUPTS(old_ints);
+};
+
+externC void
+cyg_tracemsg8( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1,
+ CYG_ADDRWORD arg2, CYG_ADDRWORD arg3,
+ CYG_ADDRWORD arg4, CYG_ADDRWORD arg5,
+ CYG_ADDRWORD arg6, CYG_ADDRWORD arg7 )
+{
+ cyg_uint32 old_ints;
+
+ if( !cyg_infra_trace_buffer_enable ) return;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+
+ Cyg_TraceRecord *rec = &cyg_infra_trace_buffer[cyg_infra_trace_buffer_pos];
+
+ rec->what = what;
+ rec->tid = get_tid();
+ rec->function = psz_func;
+ rec->file = psz_file;
+ rec->line = linenum;
+ rec->message = psz_msg;
+ rec->narg = 6;
+
+ rec->arg[0] = arg0;
+ rec->arg[1] = arg1;
+ rec->arg[2] = arg2;
+ rec->arg[3] = arg3;
+ rec->arg[4] = arg4;
+ rec->arg[5] = arg5;
+ rec->arg[6] = arg6;
+ rec->arg[7] = arg7;
+
+ increment_buffer_pos();
+
+ HAL_RESTORE_INTERRUPTS(old_ints);
+};
+
+// -------------------------------------------------------------------------
+
+externC void
+cyg_trace_print(void)
+{
+ cyg_bool old_enable = cyg_infra_trace_buffer_enable;
+ cyg_infra_trace_buffer_enable = false;
+ print_trace_buffer();
+ cyg_infra_trace_buffer_pos = 0;
+ cyg_infra_trace_buffer_wrap = false;
+ cyg_infra_trace_buffer_enable = old_enable;
+}
+
+
+// -------------------------------------------------------------------------
+
+externC void
+cyg_trace_dump(void)
+{
+#if defined(CYGPKG_KERNEL) && defined(CYG_DIAG_PRINTF)
+
+ {
+ diag_printf("\nScheduler:\n\n");
+
+ Cyg_Scheduler *sched = &Cyg_Scheduler::scheduler;
+
+ diag_printf("Lock: %d\n",sched->get_sched_lock() );
+
+# ifdef CYGVAR_KERNEL_THREADS_NAME
+
+ diag_printf("Current Thread: %s\n",sched->get_current_thread()->get_name());
+
+# else
+
+ diag_printf("Current Thread: %d\n",sched->get_current_thread()->get_unique_id());
+
+# endif
+
+ }
+
+# ifdef CYGVAR_KERNEL_THREADS_LIST
+
+ {
+ Cyg_Thread *t = Cyg_Thread::get_list_head();
+
+ diag_printf("\nThreads:\n\n");
+
+ while( NULL != t )
+ {
+ cyg_uint32 state = t->get_state();
+ char tstate[7];
+ char *tstate1 = "SCUKX";
+ static char *(reasons[8]) =
+ {
+ "NONE", // No recorded reason
+ "WAIT", // Wait with no timeout
+ "DELAY", // Simple time delay
+ "TIMEOUT", // Wait with timeout/timeout expired
+ "BREAK", // forced break out of sleep
+ "DESTRUCT", // wait object destroyed[note]
+ "EXIT", // forced termination
+ "DONE" // Wait/delay complete
+ };
+
+ if( 0 != state )
+ {
+ // Knock out chars that do not correspond to set bits.
+ for( int i = 0; i < 6 ; i++ )
+ if( 0 == (state & (1<<i)) )
+ tstate[i] = ' ';
+ else tstate[i] = tstate1[i];
+ tstate[6] = 0;
+ }
+ else tstate[0] = 'R', tstate[1] = 0;
+
+# ifdef CYGVAR_KERNEL_THREADS_NAME
+
+ diag_printf( "%20s pri = %3d state = %6s id = %3d\n",
+ t->get_name(),
+ t->get_priority(),
+ tstate,
+ t->get_unique_id()
+ );
+# else
+
+ diag_printf( "Thread %3d pri = %3d state = %6s\n",
+ t->get_unique_id(),
+ t->get_priority(),
+ tstate
+ );
+
+# endif
+ diag_printf( "%20s stack base = %08x ptr = %08x size = %08x\n",
+ "",
+ t->get_stack_base(),
+#ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+ t->get_saved_context(),
+#else
+ 0,
+#endif
+ t->get_stack_size()
+ );
+
+ diag_printf( "%20s sleep reason %8s wake reason %8s\n",
+ "",
+ reasons[t->get_sleep_reason()],
+ reasons[t->get_wake_reason()]
+ );
+
+ diag_printf( "%20s queue = %08x wait info = %08x\n",
+ "",
+ t->get_current_queue(),
+ t->get_wait_info()
+ );
+
+ diag_printf("\n");
+ t = t->get_list_next();
+ }
+
+ }
+# endif // CYGVAR_KERNEL_THREADS_LIST
+
+#endif // CYG_DIAG_PRINTF
+}
+
+#endif // CYGDBG_USE_TRACING
+
+// -------------------------------------------------------------------------
+// Assert functions:
+
+#ifdef CYGDBG_USE_ASSERTS
+
+externC void
+cyg_assert_fail( const char *psz_func, const char *psz_file,
+ cyg_uint32 linenum, const char *psz_msg ) __THROW
+{
+ cyg_uint32 old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+ diag_write_string("ASSERT FAIL: ");
+ write_thread_id();
+ diag_write_string(trim_file(psz_file));
+ write_lnum(linenum);
+ diag_write_string(trim_func(psz_func));
+ diag_write_char(' ');
+ diag_write_string(psz_msg);
+ diag_write_char('\n');
+
+#ifdef CYGDBG_INFRA_DEBUG_TRACE_BUFFER_PRINT_ON_ASSERT
+
+ cyg_trace_print();
+ cyg_trace_dump();
+
+#endif
+
+#ifdef CYGHWR_TEST_PROGRAM_EXIT
+ CYGHWR_TEST_PROGRAM_EXIT();
+#endif
+ for(;;);
+
+// DIAG_DEVICE_END_SYNC();
+// HAL_RESTORE_INTERRUPTS(old_ints);
+};
+
+extern "C"
+{
+extern unsigned long _stext;
+extern unsigned long _etext;
+
+unsigned long stext_addr = (unsigned long)&_stext;
+unsigned long etext_addr = (unsigned long)&_etext;
+};
+
+externC cyg_bool cyg_check_data_ptr(const void *ptr)
+{
+ unsigned long p = (unsigned long)ptr;
+
+ if( p == 0 ) return false;
+
+ if( p > stext_addr && p < etext_addr ) return false;
+
+ return true;
+}
+
+externC cyg_bool cyg_check_func_ptr(void (*ptr)(void))
+{
+ unsigned long p = (unsigned long)ptr;
+
+ if( p == 0 ) return false;
+
+ if( p < stext_addr && p > etext_addr ) return false;
+
+ return true;
+}
+
+#endif // CYGDBG_USE_ASSERTS
+
+#endif // CYGDBG_INFRA_DEBUG_TRACE_ASSERT_BUFFER
+
+// -------------------------------------------------------------------------
+// EOF buffer.cxx
diff --git a/cesar/ecos/packages/infra/current/src/delete.cxx b/cesar/ecos/packages/infra/current/src/delete.cxx
new file mode 100644
index 0000000000..87c4a1b932
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/delete.cxx
@@ -0,0 +1,79 @@
+//==========================================================================
+//
+// common/delete.cxx
+//
+// Default delete implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-08-13
+// Purpose: Gives a default delete operation if the C library isn't present
+// Description: This file supplies a definition of the default delete
+// operation (aka __builtin_delete and __builtin_vec_delete)
+// for use when the normal delete can't be used - normally when
+// the C library is not present
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/infra.h>
+
+#include <cyg/infra/cyg_type.h>
+
+// see the description comment in infra.cdl for
+// CYGFUN_INFRA_EMPTY_DELETE_FUNCTIONS
+
+#ifdef CYGFUN_INFRA_EMPTY_DELETE_FUNCTIONS
+// then define these empty functions:
+
+void operator delete(void *x) throw()
+{
+ CYG_EMPTY_STATEMENT;
+}
+
+void operator delete[](void *x) throw()
+{
+ CYG_EMPTY_STATEMENT;
+}
+
+#endif // CYGFUN_INFRA_EMPTY_DELETE_FUNCTIONS
+
+// EOF delete.cxx
diff --git a/cesar/ecos/packages/infra/current/src/diag.cxx b/cesar/ecos/packages/infra/current/src/diag.cxx
new file mode 100644
index 0000000000..2311627f8c
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/diag.cxx
@@ -0,0 +1,714 @@
+/*========================================================================
+//
+// diag.c
+//
+// Infrastructure diagnostic output code
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2004 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg,gthomas,jlarmour
+// Contributors:
+// Date: 1999-02-22
+// Purpose: Infrastructure diagnostic output
+// Description: Implementations of infrastructure diagnostic routines.
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================*/
+
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+#include <pkgconf/infra.h>
+
+#include <cyg/infra/cyg_type.h> // base types
+
+#include <cyg/infra/diag.h> // HAL polled output
+#include <cyg/hal/hal_arch.h> // architectural stuff for...
+#include <cyg/hal/hal_intr.h> // interrupt control
+#include <cyg/hal/hal_diag.h> // diagnostic output routines
+#include <stdarg.h>
+#include <limits.h>
+
+#ifdef CYG_HAL_DIAG_LOCK_DATA_DEFN
+CYG_HAL_DIAG_LOCK_DATA_DEFN;
+#endif
+
+/*----------------------------------------------------------------------*/
+
+externC void diag_write_num(
+ cyg_uint32 n, /* number to write */
+ cyg_ucount8 base, /* radix to write to */
+ cyg_ucount8 sign, /* sign, '-' if -ve, '+' if +ve */
+ cyg_bool pfzero, /* prefix with zero ? */
+ cyg_ucount8 width /* min width of number */
+ );
+
+class Cyg_dummy_diag_init_class {
+public:
+ Cyg_dummy_diag_init_class() {
+ HAL_DIAG_INIT();
+ }
+};
+
+// Initialize after HAL.
+static Cyg_dummy_diag_init_class cyg_dummy_diag_init_obj
+ CYGBLD_ATTRIB_INIT_AFTER(CYG_INIT_HAL);
+
+/*----------------------------------------------------------------------*/
+/* Write single char to output */
+
+externC void diag_write_char(char c)
+{
+ /* Translate LF into CRLF */
+
+ if( c == '\n' )
+ {
+ HAL_DIAG_WRITE_CHAR('\r');
+ }
+
+ HAL_DIAG_WRITE_CHAR(c);
+}
+
+// Default wrapper function used by diag_printf
+static void
+_diag_write_char(char c, void **param)
+{
+ diag_write_char(c);
+}
+
+/*----------------------------------------------------------------------*/
+/* Initialize. Call to pull in diag initializing constructor */
+
+externC void diag_init(void)
+{
+}
+
+//
+// This routine is used to send characters during 'printf()' functions.
+// It can be replaced by providing a replacement via diag_init_putc().
+//
+static void (*_putc)(char c, void **param) = _diag_write_char;
+
+void
+diag_init_putc(void (*putc)(char c, void **param))
+{
+ _putc = putc;
+}
+
+/*----------------------------------------------------------------------*/
+/* Write zero terminated string */
+
+externC void diag_write_string(const char *psz)
+{
+ while( *psz ) diag_write_char( *psz++ );
+}
+
+/*----------------------------------------------------------------------*/
+/* Write decimal value */
+
+externC void diag_write_dec( cyg_int32 n)
+{
+ cyg_ucount8 sign;
+
+ if( n < 0 ) n = -n, sign = '-';
+ else sign = '+';
+
+ diag_write_num( n, 10, sign, false, 0);
+}
+
+/*----------------------------------------------------------------------*/
+/* Write hexadecimal value */
+
+externC void diag_write_hex( cyg_uint32 n)
+{
+ diag_write_num( n, 16, '+', false, 0);
+}
+
+/*----------------------------------------------------------------------*/
+/* Generic number writing function */
+/* The parameters determine what radix is used, the signed-ness of the */
+/* number, its minimum width and whether it is zero or space filled on */
+/* the left. */
+
+externC void diag_write_long_num(
+ cyg_uint64 n, /* number to write */
+ cyg_ucount8 base, /* radix to write to */
+ cyg_ucount8 sign, /* sign, '-' if -ve, '+' if +ve */
+ cyg_bool pfzero, /* prefix with zero ? */
+ cyg_ucount8 width /* min width of number */
+ )
+{
+ char buf[32];
+ cyg_count8 bpos;
+ char bufinit = pfzero?'0':' ';
+ char *digits = "0123456789ABCDEF";
+
+ /* init buffer to padding char: space or zero */
+ for( bpos = 0; bpos < (cyg_count8)sizeof(buf); bpos++ ) buf[bpos] = bufinit;
+
+ /* Set pos to start */
+ bpos = 0;
+
+ /* construct digits into buffer in reverse order */
+ if( n == 0 ) buf[bpos++] = '0';
+ else while( n != 0 )
+ {
+ cyg_ucount8 d = n % base;
+ buf[bpos++] = digits[d];
+ n /= base;
+ }
+
+ /* set pos to width if less. */
+ if( (cyg_count8)width > bpos ) bpos = width;
+
+ /* set sign if negative. */
+ if( sign == '-' )
+ {
+ if( buf[bpos-1] == bufinit ) bpos--;
+ buf[bpos] = sign;
+ }
+ else bpos--;
+
+ /* Now write it out in correct order. */
+ while( bpos >= 0 )
+ diag_write_char(buf[bpos--]);
+}
+
+externC void diag_write_num(
+ cyg_uint32 n, /* number to write */
+ cyg_ucount8 base, /* radix to write to */
+ cyg_ucount8 sign, /* sign, '-' if -ve, '+' if +ve */
+ cyg_bool pfzero, /* prefix with zero ? */
+ cyg_ucount8 width /* min width of number */
+ )
+{
+ diag_write_long_num((long long)n, base, sign, pfzero, width);
+}
+
+/*----------------------------------------------------------------------*/
+/* perform some simple sanity checks on a string to ensure that it */
+/* consists of printable characters and is of reasonable length. */
+
+static cyg_bool diag_check_string( const char *str )
+{
+ cyg_bool result = true;
+ const char *s;
+
+ if( str == NULL ) return false;
+
+ for( s = str ; result && *s ; s++ )
+ {
+ char c = *s;
+
+ /* Check for a reasonable length string. */
+
+ if( s-str > 2048 ) result = false;
+
+ /* We only really support CR, NL, tab and backspace at present.
+ * If we want to use other special chars, this test will
+ * have to be expanded. */
+
+ if( c == '\n' || c == '\r' || c == '\b' || c == '\t' )
+ continue;
+
+ /* Check for printable chars. This assumes ASCII */
+
+ if( c < ' ' || c > '~' )
+ result = false;
+
+ }
+
+ return result;
+}
+
+/*----------------------------------------------------------------------*/
+
+static int
+_cvt(unsigned long long val, char *buf, long radix, char *digits)
+{
+ char temp[80];
+ char *cp = temp;
+ int length = 0;
+
+ if (val == 0) {
+ /* Special case */
+ *cp++ = '0';
+ } else {
+ while (val) {
+ *cp++ = digits[val % radix];
+ val /= radix;
+ }
+ }
+ while (cp != temp) {
+ *buf++ = *--cp;
+ length++;
+ }
+ *buf = '\0';
+ return (length);
+}
+
+#define is_digit(c) ((c >= '0') && (c <= '9'))
+
+static int
+_vprintf(void (*putc)(char c, void **param), void **param, const char *fmt, va_list ap)
+{
+ char buf[sizeof(long long)*8];
+ char c, sign, *cp=buf;
+ int left_prec, right_prec, zero_fill, pad, pad_on_right,
+ i, islong, islonglong;
+ long long val = 0;
+ int res = 0, length = 0;
+
+ if (!diag_check_string(fmt)) {
+ diag_write_string("<Bad format string: ");
+ diag_write_hex((cyg_uint32)fmt);
+ diag_write_string(" :");
+ for( i = 0; i < 8; i++ ) {
+ diag_write_char(' ');
+ val = va_arg(ap, unsigned long);
+ diag_write_hex(val);
+ }
+ diag_write_string(">\n");
+ return 0;
+ }
+ while ((c = *fmt++) != '\0') {
+ if (c == '%') {
+ c = *fmt++;
+ left_prec = right_prec = pad_on_right = islong = islonglong = 0;
+ if (c == '-') {
+ c = *fmt++;
+ pad_on_right++;
+ }
+ if (c == '0') {
+ zero_fill = true;
+ c = *fmt++;
+ } else {
+ zero_fill = false;
+ }
+ while (is_digit(c)) {
+ left_prec = (left_prec * 10) + (c - '0');
+ c = *fmt++;
+ }
+ if (c == '.') {
+ c = *fmt++;
+ zero_fill++;
+ while (is_digit(c)) {
+ right_prec = (right_prec * 10) + (c - '0');
+ c = *fmt++;
+ }
+ } else {
+ right_prec = left_prec;
+ }
+ sign = '\0';
+ if (c == 'l') {
+ // 'long' qualifier
+ c = *fmt++;
+ islong = 1;
+ if (c == 'l') {
+ // long long qualifier
+ c = *fmt++;
+ islonglong = 1;
+ }
+ }
+ if (c == 'z') {
+ c = *fmt++;
+ islong = sizeof(size_t) == sizeof(long);
+ }
+ // Fetch value [numeric descriptors only]
+ switch (c) {
+ case 'p':
+ islong = 1;
+ case 'd':
+ case 'D':
+ case 'x':
+ case 'X':
+ case 'u':
+ case 'U':
+ case 'b':
+ case 'B':
+ if (islonglong) {
+ val = va_arg(ap, long long);
+ } else if (islong) {
+ val = (long long)va_arg(ap, long);
+ } else{
+ val = (long long)va_arg(ap, int);
+ }
+ if ((c == 'd') || (c == 'D')) {
+ if (val < 0) {
+ sign = '-';
+ val = -val;
+ }
+ } else {
+ // Mask to unsigned, sized quantity
+ if (islong) {
+ val &= ((long long)1 << (sizeof(long) * 8)) - 1;
+ } else{
+ val &= ((long long)1 << (sizeof(int) * 8)) - 1;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ // Process output
+ switch (c) {
+ case 'p': // Pointer
+ (*putc)('0', param);
+ (*putc)('x', param);
+ zero_fill = true;
+ left_prec = sizeof(unsigned long)*2;
+ res += 2; // Account for "0x" leadin
+ case 'd':
+ case 'D':
+ case 'u':
+ case 'U':
+ case 'x':
+ case 'X':
+ switch (c) {
+ case 'd':
+ case 'D':
+ case 'u':
+ case 'U':
+ length = _cvt(val, buf, 10, "0123456789");
+ break;
+ case 'p':
+ case 'x':
+ length = _cvt(val, buf, 16, "0123456789abcdef");
+ break;
+ case 'X':
+ length = _cvt(val, buf, 16, "0123456789ABCDEF");
+ break;
+ }
+ cp = buf;
+ break;
+ case 's':
+ case 'S':
+ cp = va_arg(ap, char *);
+ if (cp == NULL)
+ cp = "<null>";
+ else if (!diag_check_string(cp)) {
+ diag_write_string("<Not a string: 0x");
+ diag_write_hex((cyg_uint32)cp);
+ cp = ">";
+ }
+ length = 0;
+ while (cp[length] != '\0') length++;
+ break;
+ case 'c':
+ case 'C':
+ c = va_arg(ap, int /*char*/);
+ (*putc)(c, param);
+ res++;
+ continue;
+ case 'b':
+ case 'B':
+ length = left_prec;
+ if (left_prec == 0) {
+ if (islonglong)
+ length = sizeof(long long)*8;
+ else if (islong)
+ length = sizeof(long)*8;
+ else
+ length = sizeof(int)*8;
+ }
+ for (i = 0; i < length-1; i++) {
+ buf[i] = ((val & ((long long)1<<i)) ? '1' : '.');
+ }
+ cp = buf;
+ break;
+ case '%':
+ (*putc)('%', param);
+ res++;
+ continue;
+ default:
+ (*putc)('%', param);
+ (*putc)(c, param);
+ res += 2;
+ continue;
+ }
+ pad = left_prec - length;
+ if (sign != '\0') {
+ pad--;
+ }
+ if (zero_fill) {
+ c = '0';
+ if (sign != '\0') {
+ (*putc)(sign, param);
+ res++;
+ sign = '\0';
+ }
+ } else {
+ c = ' ';
+ }
+ if (!pad_on_right) {
+ while (pad-- > 0) {
+ (*putc)(c, param);
+ res++;
+ }
+ }
+ if (sign != '\0') {
+ (*putc)(sign, param);
+ res++;
+ }
+ while (length-- > 0) {
+ c = *cp++;
+ (*putc)(c, param);
+ res++;
+ }
+ if (pad_on_right) {
+ while (pad-- > 0) {
+ (*putc)(' ', param);
+ res++;
+ }
+ }
+ } else {
+ (*putc)(c, param);
+ res++;
+ }
+ }
+ return (res);
+}
+
+struct _sputc_info {
+ char *ptr;
+ int max, len;
+};
+
+static void
+_sputc(char c, void **param)
+{
+ struct _sputc_info *info = (struct _sputc_info *)param;
+
+ if (info->len < info->max) {
+ *(info->ptr)++ = c;
+ *(info->ptr) = '\0';
+ info->len++;
+ }
+}
+
+int
+diag_sprintf(char *buf, const char *fmt, ...)
+{
+ int ret;
+ va_list ap;
+ struct _sputc_info info;
+
+ va_start(ap, fmt);
+ info.ptr = buf;
+ info.max = 1024; // Unlimited
+ info.len = 0;
+ ret = _vprintf(_sputc, (void **)(void *)&info, fmt, ap);
+ va_end(ap);
+ return (info.len);
+}
+
+int
+diag_snprintf(char *buf, size_t len, const char *fmt, ...)
+{
+ int ret;
+ va_list ap;
+ struct _sputc_info info;
+
+ va_start(ap, fmt);
+ info.ptr = buf;
+ info.len = 0;
+ info.max = len-1;
+ ret = _vprintf(_sputc, (void **)(void *)&info, fmt, ap);
+ va_end(ap);
+ return (info.len);
+}
+
+int
+diag_vsprintf(char *buf, const char *fmt, va_list ap)
+{
+ int ret;
+ struct _sputc_info info;
+
+ info.ptr = buf;
+ info.max = 1024; // Unlimited
+ info.len = 0;
+ ret = _vprintf(_sputc, (void **)(void *)&info, fmt, ap);
+ return (info.len);
+}
+
+int
+diag_printf(const char *fmt, ...)
+{
+ va_list ap;
+ int ret;
+
+ va_start(ap, fmt);
+ ret = _vprintf(_putc, (void **)0, fmt, ap);
+ va_end(ap);
+ return (ret);
+}
+
+int
+diag_vprintf(const char *fmt, va_list ap)
+{
+ int ret;
+
+ ret = _vprintf(_putc, (void **)0, fmt, ap);
+ return (ret);
+}
+
+void
+diag_vdump_buf_with_offset(__printf_fun *pf,
+ cyg_uint8 *p,
+ CYG_ADDRWORD s,
+ cyg_uint8 *base)
+{
+ int i, c;
+ if ((CYG_ADDRWORD)s > (CYG_ADDRWORD)p) {
+ s = (CYG_ADDRWORD)s - (CYG_ADDRWORD)p;
+ }
+ while ((int)s > 0) {
+ if (base) {
+ (*pf)("%08X: ", (CYG_ADDRWORD)p - (CYG_ADDRWORD)base);
+ } else {
+ (*pf)("%08X: ", p);
+ }
+ for (i = 0; i < 16; i++) {
+ if (i < (int)s) {
+ (*pf)("%02X ", p[i] & 0xFF);
+ } else {
+ (*pf)(" ");
+ }
+ if (i == 7) (*pf)(" ");
+ }
+ (*pf)(" |");
+ for (i = 0; i < 16; i++) {
+ if (i < (int)s) {
+ c = p[i] & 0xFF;
+ if ((c < 0x20) || (c >= 0x7F)) c = '.';
+ } else {
+ c = ' ';
+ }
+ (*pf)("%c", c);
+ }
+ (*pf)("|\n");
+ s -= 16;
+ p += 16;
+ }
+}
+
+void
+diag_dump_buf_with_offset(cyg_uint8 *p,
+ CYG_ADDRWORD s,
+ cyg_uint8 *base)
+{
+ diag_vdump_buf_with_offset(diag_printf, p, s, base);
+}
+
+void
+diag_dump_buf(void *p, CYG_ADDRWORD s)
+{
+ diag_dump_buf_with_offset((cyg_uint8 *)p, s, 0);
+}
+
+void
+diag_dump_buf_with_offset_32bit(cyg_uint32 *p,
+ CYG_ADDRWORD s,
+ cyg_uint32 *base)
+{
+ int i;
+ if ((CYG_ADDRWORD)s > (CYG_ADDRWORD)p) {
+ s = (CYG_ADDRWORD)s - (CYG_ADDRWORD)p;
+ }
+ while ((int)s > 0) {
+ if (base) {
+ diag_printf("%08X: ", (CYG_ADDRWORD)p - (CYG_ADDRWORD)base);
+ } else {
+ diag_printf("%08X: ", (CYG_ADDRWORD)p);
+ }
+ for (i = 0; i < 4; i++) {
+ if (i < (int)s/4) {
+ diag_printf("%08X ", p[i] );
+ } else {
+ diag_printf(" ");
+ }
+ }
+ diag_printf("\n");
+ s -= 16;
+ p += 4;
+ }
+}
+
+externC void
+diag_dump_buf_32bit(void *p, CYG_ADDRWORD s)
+{
+ diag_dump_buf_with_offset_32bit((cyg_uint32 *)p, s, 0);
+}
+
+void
+diag_dump_buf_with_offset_16bit(cyg_uint16 *p,
+ CYG_ADDRWORD s,
+ cyg_uint16 *base)
+{
+ int i;
+ if ((CYG_ADDRWORD)s > (CYG_ADDRWORD)p) {
+ s = (CYG_ADDRWORD)s - (CYG_ADDRWORD)p;
+ }
+ while ((int)s > 0) {
+ if (base) {
+ diag_printf("%08X: ", (CYG_ADDRWORD)p - (CYG_ADDRWORD)base);
+ } else {
+ diag_printf("%08X: ", (CYG_ADDRWORD)p);
+ }
+ for (i = 0; i < 8; i++) {
+ if (i < (int)s/2) {
+ diag_printf("%04X ", p[i] );
+ if (i == 3) diag_printf(" ");
+ } else {
+ diag_printf(" ");
+ }
+ }
+ diag_printf("\n");
+ s -= 16;
+ p += 8;
+ }
+}
+
+externC void
+diag_dump_buf_16bit(void *p, CYG_ADDRWORD s)
+{
+ diag_dump_buf_with_offset_16bit((cyg_uint16 *)p, s, 0);
+}
+
+/*-----------------------------------------------------------------------*/
+/* EOF infra/diag.c */
diff --git a/cesar/ecos/packages/infra/current/src/dummyxxmain.cxx b/cesar/ecos/packages/infra/current/src/dummyxxmain.cxx
new file mode 100644
index 0000000000..893406a322
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/dummyxxmain.cxx
@@ -0,0 +1,81 @@
+//========================================================================
+//
+// dummyxxmain.cxx
+//
+// Dummy __main() function required for certain targets
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-08-25
+// Purpose: Provide a default empty __main() function
+// Description: Dummy __main() function which certain targets use
+// to invoke constructors. But we invoke constructors
+// explicitly from the linker scripts in eCos
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/infra.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Default tracing support
+
+
+// FUNCTIONS
+
+externC void
+__main( void )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARGVOID();
+
+ CYG_TRACE0( true, "This is the system default __main()" );
+
+ CYG_EMPTY_STATEMENT; // don't let it complain about doing nothing
+
+ CYG_REPORT_RETURN();
+} // __main()
+
+// EOF dummyxxmain.cxx
diff --git a/cesar/ecos/packages/infra/current/src/eprintf.c b/cesar/ecos/packages/infra/current/src/eprintf.c
new file mode 100644
index 0000000000..4887c7ff07
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/eprintf.c
@@ -0,0 +1,100 @@
+//========================================================================
+//
+// eprintf.c
+//
+// __eprintf() used by libgcc
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2001-08-21
+// Purpose: Provide __eprintf() as used by libgcc.
+// Description: libgcc calls __eprintf() to display errors and abort.
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/system.h>
+
+#ifdef CYGPKG_ISOINFRA
+# include <pkgconf/isoinfra.h> // Configuration header
+#endif
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_ass.h> // Default assertion
+#include <cyg/infra/diag.h>
+
+#ifdef CYGPKG_ISOINFRA
+# if defined(CYGINT_ISO_STDIO_FORMATTED_IO) || \
+ defined(CYGINT_ISO_STDIO_FILEACCESS)
+# include <stdio.h>
+# endif
+# if CYGINT_ISO_EXIT
+# include <stdlib.h>
+# endif
+#endif
+
+// FUNCTIONS
+
+__externC void
+__eprintf (const char *string, const char *expression,
+ unsigned int line, const char *filename)
+{
+#ifdef CYGINT_ISO_STDIO_FORMATTED_IO
+ fprintf(stderr, string, expression, line, filename);
+#else
+ diag_printf(string, expression, line, filename);
+#endif
+#ifdef CYGINT_ISO_STDIO_FILEACCESS
+ fflush (stderr);
+#endif
+#if CYGINT_ISO_EXIT
+ abort();
+#else
+ CYG_FAIL( "Aborting" );
+ for (;;);
+#endif
+} // __eprintf()
+
+// EOF eprintf.c
diff --git a/cesar/ecos/packages/infra/current/src/fancy.cxx b/cesar/ecos/packages/infra/current/src/fancy.cxx
new file mode 100644
index 0000000000..d938b841f8
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/fancy.cxx
@@ -0,0 +1,662 @@
+//==========================================================================
+//
+// fancy.cxx
+//
+// Fancy formatting trace and assert functions
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-12-04
+// Purpose: Fancy Trace and assert functions
+// Description: The functions in this file are fancy implementations of the
+// standard trace and assert functions. These do printf
+// style formatting, printing the string and arguments.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/infra.h>
+
+#ifdef CYGDBG_INFRA_DEBUG_TRACE_ASSERT_FANCY
+
+#include <cyg/infra/cyg_type.h> // base types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <pkgconf/hal.h> // HAL configury
+#include <cyg/infra/diag.h> // HAL polled output
+#include <cyg/hal/hal_arch.h> // architectural stuff for...
+#include <cyg/hal/hal_intr.h> // interrupt control
+
+#ifdef CYGPKG_KERNEL
+#include <pkgconf/kernel.h> // kernel configury
+#include <cyg/kernel/thread.hxx> // thread id to print
+#include <cyg/kernel/sched.hxx> // ancillaries for above
+#include <cyg/kernel/thread.inl> // ancillaries for above
+#endif
+
+// -------------------------------------------------------------------------
+// Local Configuration: hack me!
+
+// these are generally:
+// if 0, feature is disabled
+// if 1, feature is enabled, printing is default width
+// if >1, field is padded up to that width if necessary
+// (not truncated ever)
+
+#define CYG_FILENAME 20
+#define CYG_THREADID 0 // DO NOT SET IF NO KERNEL
+#define CYG_LINENUM 4
+#define CYG_FUNCNAME 100
+#define CYG_DIAG_PRINTF 1
+#define CYG_FUNC_INDENT 2
+
+#ifndef CYGPKG_KERNEL
+# undef CYG_THREADID
+# define CYG_THREADID 0
+#endif
+
+#if CYG_FUNCNAME == 1
+#define CYG_FBUF_SIZE 100
+#else
+#define CYG_FBUF_SIZE (CYG_FUNCNAME+20)
+#endif
+
+// -------------------------------------------------------------------------
+// Functions to trim file names and function names down to printable lengths
+// (these are shared between trace and assert functions)
+
+#ifdef CYGDBG_USE_TRACING
+
+#if 0
+static char * tracepremsgs[] = {
+ " INFO:",
+ "ENTER :",
+ "ARGS :",
+ "RETURN:",
+ "bad code"
+};
+#endif
+
+static char * tracepremsgs[] = {
+ "'",
+ "{{",
+ "((",
+ "}}",
+ "bad code"
+};
+
+static char * tracepostmsgs[] = {
+ "'",
+ "",
+ "))",
+ "",
+ "bad code"
+};
+
+static void
+write_whattrace( cyg_uint32 what )
+{
+#if CYG_FUNC_INDENT
+ static cyg_uint32 cyg_indent = 0;
+ if ( 3 == what )
+ cyg_indent -= CYG_FUNC_INDENT;
+ cyg_uint32 i = cyg_indent;
+ for ( ; i > 0; i-- )
+ diag_write_string( " " );
+#endif // CYG_FUNC_INDENT
+ diag_write_string( tracepremsgs[ what > 4 ? 4 : what ] );
+#if CYG_FUNC_INDENT
+ if ( 1 == what )
+ cyg_indent += CYG_FUNC_INDENT;
+#endif // CYG_FUNC_INDENT
+}
+
+static void
+write_whattracepost( cyg_uint32 what )
+{
+ diag_write_string( tracepostmsgs[ what > 4 ? 4 : what ] );
+}
+#endif // CYGDBG_USE_TRACING
+
+static const char *trim_file(const char *file)
+{
+#if CYG_FILENAME
+ if ( NULL == file )
+ file = "<nofile>";
+
+#if 1 == CYG_FILENAME
+ const char *f = file;
+ while( *f ) f++;
+ while( *f != '/' && f != file ) f--;
+ return f==file?f:(f+1);
+#else
+ static char fbuf2[100];
+ const char *f = file;
+ char *g = fbuf2;
+ while( *f ) f++;
+ while( *f != '/' && f != file ) f--;
+ if ( f > file ) f++;
+ while( *f ) *g++ = *f++;
+ while( CYG_FILENAME > (g - fbuf2) ) *g++ = ' ';
+ *g = 0;
+ return fbuf2;
+#endif
+#else
+ return "";
+#endif
+}
+
+static const char *trim_func(const char *func)
+{
+#if CYG_FUNCNAME
+ static char fbuf[CYG_FBUF_SIZE];
+ int i;
+
+ if ( NULL == func )
+ func = "<nofunc>";
+
+ for( i = 0; func[i] && func[i] != '(' && i < CYG_FBUF_SIZE-4 ; i++ )
+ fbuf[i] = func[i];
+
+ fbuf[i++] = '(';
+ fbuf[i++] = ')';
+ fbuf[i ] = 0;
+ i=0;
+#if 1 == CYG_FUNCNAME
+ return &fbuf[i];
+#else
+ char *p = &fbuf[i];
+ while ( *p ) p++;
+ while ( CYG_FUNCNAME > (p - (&fbuf[i])) ) *p++ = ' ';
+ *p = 0;
+ return &fbuf[i];
+#endif
+#else
+ return "";
+#endif
+}
+
+void write_lnum( cyg_uint32 lnum)
+{
+#if CYG_LINENUM
+ diag_write_char('[');
+#if 1 < CYG_LINENUM
+ cyg_uint32 i, j;
+ for ( i = 2, j = 100; i < CYG_LINENUM ; i++, j *= 10 )
+ if ( lnum < j )
+ diag_write_char(' ');
+#endif
+ diag_write_dec(lnum);
+ diag_write_char(']');
+ diag_write_char(' ');
+#endif
+}
+
+void write_thread_id()
+{
+#if CYG_THREADID
+ Cyg_Thread *t = Cyg_Thread::self();
+ cyg_uint16 tid = 0xFFFF;
+
+ if( t != NULL ) tid = t->get_unique_id();
+
+ diag_write_char('<');
+ diag_write_hex(tid);
+ diag_write_char('>');
+#endif
+}
+
+// -------------------------------------------------------------------------
+// Trace functions:
+
+#ifdef CYGDBG_USE_TRACING
+
+externC void
+cyg_tracenomsg( const char *psz_func, const char *psz_file, cyg_uint32 linenum )
+{
+ cyg_uint32 old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+ diag_write_string("TRACE: ");
+ write_thread_id();
+ diag_write_string(trim_file(psz_file));
+ write_lnum(linenum);
+ diag_write_string(trim_func(psz_func));
+ diag_write_char('\n');
+
+ DIAG_DEVICE_END_SYNC();
+ HAL_RESTORE_INTERRUPTS(old_ints);
+
+};
+
+// provide every other one of these as a space/caller bloat compromise.
+
+externC void
+cyg_tracemsg( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg )
+{
+ cyg_uint32 old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+ if ( NULL == psz_msg )
+ psz_msg = "<nomsg>";
+
+ diag_write_string( "TRACE: " );
+ write_thread_id();
+ diag_write_string(trim_file(psz_file));
+ write_lnum(linenum);
+ diag_write_string(trim_func(psz_func));
+ diag_write_char(' ');
+ write_whattrace( what );
+ diag_write_string(psz_msg);
+ write_whattracepost( what );
+ diag_write_char('\n');
+
+ DIAG_DEVICE_END_SYNC();
+ HAL_RESTORE_INTERRUPTS(old_ints);
+
+};
+
+externC void
+cyg_tracemsg2( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1 )
+{
+ cyg_uint32 old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+ if ( NULL == psz_msg )
+ psz_msg = "<nomsg>";
+
+ diag_write_string( "TRACE: " );
+ write_thread_id();
+ diag_write_string(trim_file(psz_file));
+ write_lnum(linenum);
+ diag_write_string(trim_func(psz_func));
+ diag_write_char(' ');
+ write_whattrace( what );
+#if CYG_DIAG_PRINTF
+ diag_printf( psz_msg, arg0, arg1 );
+#else
+ diag_write_string(psz_msg);
+ diag_write_char(' ');
+ diag_write_hex(arg0);
+ diag_write_char(' ');
+ diag_write_hex(arg1);
+#endif
+ write_whattracepost( what );
+ diag_write_char('\n');
+ DIAG_DEVICE_END_SYNC();
+ HAL_RESTORE_INTERRUPTS(old_ints);
+};
+
+externC void
+cyg_tracemsg4( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1,
+ CYG_ADDRWORD arg2, CYG_ADDRWORD arg3 )
+{
+ cyg_uint32 old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+ if ( NULL == psz_msg )
+ psz_msg = "<nomsg>";
+
+ diag_write_string( "TRACE: " );
+ write_thread_id();
+ diag_write_string(trim_file(psz_file));
+ write_lnum(linenum);
+ diag_write_string(trim_func(psz_func));
+ diag_write_char(' ');
+ write_whattrace( what );
+#if CYG_DIAG_PRINTF
+ diag_printf( psz_msg, arg0, arg1, arg2, arg3 );
+#else
+ diag_write_string(psz_msg);
+ diag_write_char(' ');
+ diag_write_hex(arg0);
+ diag_write_char(' ');
+ diag_write_hex(arg1);
+ diag_write_char(' ');
+ diag_write_hex(arg2);
+ diag_write_char(' ');
+ diag_write_hex(arg3);
+#endif
+ write_whattracepost( what );
+ diag_write_char('\n');
+
+ DIAG_DEVICE_END_SYNC();
+ HAL_RESTORE_INTERRUPTS(old_ints);
+};
+
+externC void
+cyg_tracemsg6( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1,
+ CYG_ADDRWORD arg2, CYG_ADDRWORD arg3,
+ CYG_ADDRWORD arg4, CYG_ADDRWORD arg5 )
+{
+ cyg_uint32 old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+ if ( NULL == psz_msg )
+ psz_msg = "<nomsg>";
+
+ diag_write_string( "TRACE: " );
+ write_thread_id();
+ diag_write_string(trim_file(psz_file));
+ write_lnum(linenum);
+ diag_write_string(trim_func(psz_func));
+ diag_write_char(' ');
+ write_whattrace( what );
+#if CYG_DIAG_PRINTF
+ diag_printf( psz_msg, arg0, arg1, arg2, arg3, arg4, arg5 );
+#else
+ diag_write_string(psz_msg);
+ diag_write_char(' ');
+ diag_write_hex(arg0);
+ diag_write_char(' ');
+ diag_write_hex(arg1);
+ diag_write_char(' ');
+ diag_write_hex(arg2);
+ diag_write_char(' ');
+ diag_write_hex(arg3);
+ diag_write_char(' ');
+ diag_write_hex(arg4);
+ diag_write_char(' ');
+ diag_write_hex(arg5);
+#endif
+ write_whattracepost( what );
+ diag_write_char('\n');
+
+ DIAG_DEVICE_END_SYNC();
+ HAL_RESTORE_INTERRUPTS(old_ints);
+};
+
+externC void
+cyg_tracemsg8( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1,
+ CYG_ADDRWORD arg2, CYG_ADDRWORD arg3,
+ CYG_ADDRWORD arg4, CYG_ADDRWORD arg5,
+ CYG_ADDRWORD arg6, CYG_ADDRWORD arg7 )
+{
+ cyg_uint32 old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+ if ( NULL == psz_msg )
+ psz_msg = "<nomsg>";
+
+ diag_write_string( "TRACE: " );
+ write_thread_id();
+ diag_write_string(trim_file(psz_file));
+ write_lnum(linenum);
+ diag_write_string(trim_func(psz_func));
+ diag_write_char(' ');
+ write_whattrace( what );
+#if CYG_DIAG_PRINTF
+ diag_printf( psz_msg, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 );
+#else
+ diag_write_string(psz_msg);
+ diag_write_char(' ');
+ diag_write_hex(arg0);
+ diag_write_char(' ');
+ diag_write_hex(arg1);
+ diag_write_char(' ');
+ diag_write_hex(arg2);
+ diag_write_char(' ');
+ diag_write_hex(arg3);
+ diag_write_char(' ');
+ diag_write_hex(arg4);
+ diag_write_char(' ');
+ diag_write_hex(arg5);
+ diag_write_char(' ');
+ diag_write_hex(arg6);
+ diag_write_char(' ');
+ diag_write_hex(arg7);
+#endif
+ write_whattracepost( what );
+ diag_write_char('\n');
+
+ DIAG_DEVICE_END_SYNC();
+ HAL_RESTORE_INTERRUPTS(old_ints);
+};
+
+// -------------------------------------------------------------------------
+
+externC void
+cyg_trace_dump(void)
+{
+#if defined(CYGPKG_KERNEL) && defined(CYG_DIAG_PRINTF)
+
+ {
+ diag_printf("\nScheduler:\n\n");
+
+ Cyg_Scheduler *sched = &Cyg_Scheduler::scheduler;
+
+ diag_printf("Lock: %d\n",sched->get_sched_lock() );
+
+# ifdef CYGVAR_KERNEL_THREADS_NAME
+
+ diag_printf("Current Thread: %s\n",sched->get_current_thread()->get_name());
+
+# else
+
+ diag_printf("Current Thread: %d\n",sched->get_current_thread()->get_unique_id());
+
+# endif
+
+ }
+
+# ifdef CYGVAR_KERNEL_THREADS_LIST
+
+ {
+ Cyg_Thread *t = Cyg_Thread::get_list_head();
+
+ diag_printf("\nThreads:\n\n");
+
+ while( NULL != t )
+ {
+ cyg_uint32 state = t->get_state();
+ char tstate[7];
+ char *tstate1 = "SCUKX";
+ static char *(reasons[8]) =
+ {
+ "NONE", // No recorded reason
+ "WAIT", // Wait with no timeout
+ "DELAY", // Simple time delay
+ "TIMEOUT", // Wait with timeout/timeout expired
+ "BREAK", // forced break out of sleep
+ "DESTRUCT", // wait object destroyed[note]
+ "EXIT", // forced termination
+ "DONE" // Wait/delay complete
+ };
+
+ if( 0 != state )
+ {
+ // Knock out chars that do not correspond to set bits.
+ for( int i = 0; i < 6 ; i++ )
+ if( 0 == (state & (1<<i)) )
+ tstate[i] = ' ';
+ else tstate[i] = tstate1[i];
+ tstate[6] = 0;
+ }
+ else tstate[0] = 'R', tstate[1] = 0;
+
+# ifdef CYGVAR_KERNEL_THREADS_NAME
+
+ diag_printf( "%20s pri = %3d state = %6s id = %3d\n",
+ t->get_name(),
+ t->get_priority(),
+ tstate,
+ t->get_unique_id()
+ );
+# else
+
+ diag_printf( "Thread %3d pri = %3d state = %6s\n",
+ t->get_unique_id(),
+ t->get_priority(),
+ tstate
+ );
+
+# endif
+ diag_printf( "%20s stack base = %08x ptr = %08x size = %08x\n",
+ "",
+ t->get_stack_base(),
+#ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+ t->get_saved_context(),
+#else
+ 0,
+#endif
+ t->get_stack_size()
+ );
+
+ diag_printf( "%20s sleep reason %8s wake reason %8s\n",
+ "",
+ reasons[t->get_sleep_reason()],
+ reasons[t->get_wake_reason()]
+ );
+
+ diag_printf( "%20s queue = %08x wait info = %08x\n",
+ "",
+ t->get_current_queue(),
+ t->get_wait_info()
+ );
+
+ diag_printf("\n");
+ t = t->get_list_next();
+ }
+
+ }
+# endif // CYGVAR_KERNEL_THREADS_LIST
+
+#endif // CYG_DIAG_PRINTF
+}
+
+#endif // CYGDBG_USE_TRACING
+
+// -------------------------------------------------------------------------
+// Assert functions:
+
+#ifdef CYGDBG_USE_ASSERTS
+
+externC void
+cyg_assert_fail( const char *psz_func, const char *psz_file,
+ cyg_uint32 linenum, const char *psz_msg ) __THROW
+{
+ cyg_uint32 old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+ diag_write_string("ASSERT FAIL: ");
+ write_thread_id();
+ diag_write_string(trim_file(psz_file));
+ write_lnum(linenum);
+ diag_write_string(trim_func(psz_func));
+ diag_write_char(' ');
+ diag_write_string(psz_msg);
+ diag_write_char('\n');
+
+#ifdef CYGHWR_TEST_PROGRAM_EXIT
+ CYGHWR_TEST_PROGRAM_EXIT();
+#endif
+ for(;;);
+
+// DIAG_DEVICE_END_SYNC();
+// HAL_RESTORE_INTERRUPTS(old_ints);
+};
+
+extern "C"
+{
+extern unsigned long _stext;
+extern unsigned long _etext;
+
+unsigned long stext_addr = (unsigned long)&_stext;
+unsigned long etext_addr = (unsigned long)&_etext;
+};
+
+externC cyg_bool cyg_check_data_ptr(const void *ptr)
+{
+ unsigned long p = (unsigned long)ptr;
+
+ if( p == 0 ) return false;
+
+ if( p > stext_addr && p < etext_addr ) return false;
+
+ return true;
+}
+
+externC cyg_bool cyg_check_func_ptr(void (*ptr)(void))
+{
+ unsigned long p = (unsigned long)ptr;
+
+ if( p == 0 ) return false;
+
+ if( p < stext_addr && p > etext_addr ) return false;
+
+ return true;
+}
+
+#endif // CYGDBG_USE_ASSERTS
+
+#endif // CYGDBG_INFRA_DEBUG_TRACE_ASSERT_FANCY
+
+// -------------------------------------------------------------------------
+// EOF fancy.cxx
diff --git a/cesar/ecos/packages/infra/current/src/memcpy.c b/cesar/ecos/packages/infra/current/src/memcpy.c
new file mode 100644
index 0000000000..6ff8fd6d15
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/memcpy.c
@@ -0,0 +1,193 @@
+/*===========================================================================
+//
+// memcpy.c
+//
+// ANSI standard memcpy() routine
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-06-04
+// Purpose: This file implements the ANSI memcpy() function
+// Description: This file implements the memcpy() function defined in ANSI para
+// 7.11.2.1. This is implemented in the kernel rather than the
+// C library due to it being required by gcc whether or not the
+// C library has been configured in.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================*/
+
+
+/* INCLUDES */
+
+#include <pkgconf/infra.h> /* Configuration of infra package */
+
+#include <cyg/infra/cyg_type.h> /* Common type definitions */
+#include <cyg/infra/cyg_trac.h> /* Tracing support */
+#include <cyg/infra/cyg_ass.h> /* Assertion support */
+#include <stddef.h> /* Compiler defns such as size_t, NULL etc. */
+
+/* MACROS */
+
+/* Nonzero if either X or Y is not aligned on a word boundary. */
+#define CYG_STR_UNALIGNED(X, Y) \
+ (((CYG_WORD)(X) & (sizeof (CYG_WORD) - 1)) | \
+ ((CYG_WORD)(Y) & (sizeof (CYG_WORD) - 1)))
+
+/* How many bytes are copied each iteration of the 4X unrolled loop in the
+ * optimised string implementation
+ */
+#define CYG_STR_OPT_BIGBLOCKSIZE (sizeof(CYG_WORD) << 2)
+
+
+/* How many bytes are copied each iteration of the word copy loop in the
+ * optimised string implementation
+ */
+#define CYG_STR_OPT_LITTLEBLOCKSIZE (sizeof (CYG_WORD))
+
+/* EXPORTED SYMBOLS */
+
+externC void *
+memcpy( void *s1, const void *s2, size_t n ) __attribute__((weak,
+ alias("_memcpy")));
+
+/* FUNCTIONS */
+
+void *
+_memcpy( void *s1, const void *s2, size_t n )
+{
+#if defined(CYGIMP_INFRA_PREFER_SMALL_TO_FAST_MEMCPY) || defined(__OPTIMIZE_SIZE__)
+ char *dst = (char *) s1;
+ const char *src = (const char *) s2;
+
+#ifdef CYG_TRACING_FIXED
+ CYG_REPORT_FUNCNAMETYPE( "_memcpy", "returning %08x" );
+ CYG_REPORT_FUNCARG3( "dst=%08x, src=%08x, n=%d", dst, src, n );
+
+ if (n != 0)
+ {
+ CYG_CHECK_DATA_PTR( dst, "dst is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( src, "src is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( dst+n-1, "dst+n-1 is not a valid address!" );
+ CYG_CHECK_DATA_PTR( src+n-1, "src+n-1 is not a valid address!" );
+ }
+#endif
+
+ while (n--)
+ {
+ *dst++ = *src++;
+ } /* while */
+
+#ifdef CYG_TRACING_FIXED
+ CYG_REPORT_RETVAL( s1 );
+#endif
+ return s1;
+#else
+ char *dst;
+ const char *src;
+ CYG_WORD *aligned_dst;
+ const CYG_WORD *aligned_src;
+
+#ifdef CYG_TRACING_FIXED
+ CYG_REPORT_FUNCNAMETYPE( "_memcpy", "returning %08x" );
+#endif
+
+ dst = (char *)s1;
+ src = (const char *)s2;
+
+#ifdef CYG_TRACING_FIXED
+ CYG_REPORT_FUNCARG3( "dst=%08x, src=%08x, n=%d", dst, src, n );
+
+ if (n != 0)
+ {
+ CYG_CHECK_DATA_PTR( dst, "dst is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( src, "src is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( dst+n-1, "dst+n-1 is not a valid address!" );
+ CYG_CHECK_DATA_PTR( src+n-1, "src+n-1 is not a valid address!" );
+ }
+#endif
+
+ /* If the size is small, or either SRC or DST is unaligned,
+ * then punt into the byte copy loop. This should be rare.
+ */
+ if (n < sizeof(CYG_WORD) || CYG_STR_UNALIGNED (src, dst))
+ {
+ while (n--)
+ *dst++ = *src++;
+#ifdef CYG_TRACING_FIXED
+ CYG_REPORT_RETVAL( s1 );
+#endif
+ return s1;
+ } /* if */
+
+ aligned_dst = (CYG_WORD *)dst;
+ aligned_src = (const CYG_WORD *)src;
+
+ /* Copy 4X long words at a time if possible. */
+ while (n >= CYG_STR_OPT_BIGBLOCKSIZE)
+ {
+ *aligned_dst++ = *aligned_src++;
+ *aligned_dst++ = *aligned_src++;
+ *aligned_dst++ = *aligned_src++;
+ *aligned_dst++ = *aligned_src++;
+ n -= CYG_STR_OPT_BIGBLOCKSIZE;
+ } /* while */
+
+ /* Copy one long word at a time if possible. */
+ while (n >= CYG_STR_OPT_LITTLEBLOCKSIZE)
+ {
+ *aligned_dst++ = *aligned_src++;
+ n -= CYG_STR_OPT_LITTLEBLOCKSIZE;
+ } /* while */
+
+ /* Pick up any residual with a byte copier. */
+ dst = (char*)aligned_dst;
+ src = (const char*)aligned_src;
+ while (n--)
+ *dst++ = *src++;
+
+#ifdef CYG_TRACING_FIXED
+ CYG_REPORT_RETVAL( s1 );
+#endif
+ return s1;
+#endif /* not defined(CYGIMP_PREFER_SMALL_TO_FAST_MEMCPY) ||
+ * defined(__OPTIMIZE_SIZE__) */
+} /* _memcpy() */
+
+/* EOF memcpy.c */
diff --git a/cesar/ecos/packages/infra/current/src/memset.c b/cesar/ecos/packages/infra/current/src/memset.c
new file mode 100644
index 0000000000..6213f75143
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/memset.c
@@ -0,0 +1,190 @@
+/*===========================================================================
+//
+// memset.c
+//
+// ANSI standard memset() routine
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-06-04
+// Purpose: This file implements the ANSI memset() function
+// Description: This file implements the memset() function defined in ANSI para
+// 7.11.6.1. This is implemented in the kernel rather than the
+// C library due to it being required by gcc whether or not the
+// C library has been configured in.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================*/
+
+
+/* INCLUDES */
+
+#include <pkgconf/infra.h> /* Configuration of infra package */
+
+#include <cyg/infra/cyg_type.h> /* Common type definitions */
+#include <cyg/infra/cyg_trac.h> /* Tracing support */
+#include <cyg/infra/cyg_ass.h> /* Assertion support */
+#include <stddef.h> /* Compiler defns such as size_t, NULL etc. */
+
+/* MACROS */
+
+/* Nonzero if X is not aligned on a word boundary. */
+#define CYG_STR_UNALIGNED(X) ((CYG_WORD)(X) & (sizeof (CYG_WORD) - 1))
+
+/* How many bytes are copied each iteration of the word copy loop in the
+ * optimised string implementation
+ */
+#define CYG_STR_OPT_LITTLEBLOCKSIZE (sizeof (CYG_WORD))
+
+/* EXPORTED SYMBOLS */
+
+externC void *
+memset( void *s, int c, size_t n ) __attribute__ ((weak, alias("_memset")));
+
+/* FUNCTIONS */
+
+void *
+_memset( void *s, int c, size_t n )
+{
+#if defined(CYGIMP_INFRA_PREFER_SMALL_TO_FAST_MEMSET) || defined(__OPTIMIZE_SIZE__)
+ char *char_ptr = (char *)s;
+
+#ifdef CYG_TRACING_FIXED
+ CYG_REPORT_FUNCNAMETYPE( "_memset", "returning %08x" );
+ CYG_REPORT_FUNCARG3( "s=%08x, c=%d, n=%d", s, c, n );
+
+ if (n != 0)
+ {
+ CYG_CHECK_DATA_PTR( char_ptr, "s is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( (&char_ptr[n-1]), "s+n-1 is not a valid address!" );
+ }
+#endif
+
+ while (n-- != 0)
+ {
+ *char_ptr++ = (char) c;
+ }
+
+#ifdef CYG_TRACING_FIXED
+ CYG_REPORT_RETVAL( s );
+#endif
+ return s;
+#else
+ char *char_ptr = (char *)s;
+ cyg_ucount8 count;
+ CYG_WORD buffer;
+ CYG_WORD *aligned_addr;
+ char *unaligned_addr;
+
+#ifdef CYG_TRACING_FIXED
+ CYG_REPORT_FUNCNAMETYPE( "_memset", "returning %08x" );
+ CYG_REPORT_FUNCARG3( "s=%08x, c=%d, n=%d", s, c, n );
+
+ if (n != 0)
+ {
+ CYG_CHECK_DATA_PTR( s, "s is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( (char *)s+n-1, "s+n-1 is not a valid address!" );
+ }
+#endif
+
+ if (n < sizeof(CYG_WORD) || CYG_STR_UNALIGNED (s))
+ {
+ while (n-- != 0)
+ {
+ *char_ptr++ = (char) c;
+ }
+#ifdef CYG_TRACING_FIXED
+ CYG_REPORT_RETVAL( s );
+#endif
+ return s;
+ }
+
+ /* If we get this far, we know that n is large and s is word-aligned. */
+
+ aligned_addr = (CYG_WORD *)s;
+
+ /* Store C into each char sized location in BUFFER so that
+ * we can set large blocks quickly.
+ */
+ c &= 0xff;
+ if (CYG_STR_OPT_LITTLEBLOCKSIZE == 4)
+ {
+ buffer = (c << 8) | c;
+ buffer |= (buffer << 16);
+ }
+ else
+ {
+ buffer = 0;
+ for (count = 0; count < CYG_STR_OPT_LITTLEBLOCKSIZE; count++)
+ buffer = (buffer << 8) | c;
+ }
+
+ while (n >= CYG_STR_OPT_LITTLEBLOCKSIZE*4)
+ {
+ *aligned_addr++ = buffer;
+ *aligned_addr++ = buffer;
+ *aligned_addr++ = buffer;
+ *aligned_addr++ = buffer;
+ n -= 4*CYG_STR_OPT_LITTLEBLOCKSIZE;
+ }
+
+ while (n >= CYG_STR_OPT_LITTLEBLOCKSIZE)
+ {
+ *aligned_addr++ = buffer;
+ n -= CYG_STR_OPT_LITTLEBLOCKSIZE;
+ }
+
+ /* Pick up the remainder with a bytewise loop. */
+ unaligned_addr = (char*)aligned_addr;
+ while (n)
+ {
+ *unaligned_addr++ = (char)c;
+ n--;
+ }
+
+#ifdef CYG_TRACING_FIXED
+ CYG_REPORT_RETVAL( s );
+#endif
+ return s;
+#endif /* not defined(CYGIMP_PREFER_SMALL_TO_FAST_MEMSET) ||
+ * defined(__OPTIMIZE_SIZE__) */
+} /* _memset() */
+
+/* EOF memset.c */
diff --git a/cesar/ecos/packages/infra/current/src/null.cxx b/cesar/ecos/packages/infra/current/src/null.cxx
new file mode 100644
index 0000000000..506e6d2bde
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/null.cxx
@@ -0,0 +1,185 @@
+//==========================================================================
+//
+// null.cxx
+//
+// Null trace and assert functions
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-15
+// Purpose: Trace and assert functions
+// Description: The functions in this file are null implementations of the
+// standard trace and assert functions. These can be used to
+// eliminate all trace and assert messages without recompiling.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/infra.h>
+
+#ifndef CYGDBG_USE_ASSERTS
+// then you get an empty function regardless, so that other code can link:
+// (for example libc assert() calls this whether or not eCos code has
+// asserts enabled - of course if it does, assert() maps to the chosen
+// implementation; if not, it's the same inner function to breakpoint.)
+
+#include <cyg/infra/cyg_type.h> // base types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+externC void
+cyg_assert_fail( const char *psz_func, const char *psz_file,
+ cyg_uint32 linenum, const char *psz_msg ) __THROW
+{
+ for(;;);
+};
+#endif // not CYGDBG_USE_ASSERTS
+
+#ifdef CYGDBG_INFRA_DEBUG_TRACE_ASSERT_NULL
+
+#include <cyg/infra/cyg_type.h> // base types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+// -------------------------------------------------------------------------
+// Trace functions:
+
+#ifdef CYGDBG_USE_TRACING
+
+externC void
+cyg_tracenomsg( const char *psz_func, const char *psz_file, cyg_uint32 linenum )
+{}
+
+// provide every other one of these as a space/caller bloat compromise.
+
+externC void
+cyg_tracemsg( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg )
+{}
+
+externC void
+cyg_tracemsg2( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1 )
+{}
+externC void
+cyg_tracemsg4( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1,
+ CYG_ADDRWORD arg2, CYG_ADDRWORD arg3 )
+{}
+externC void
+cyg_tracemsg6( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1,
+ CYG_ADDRWORD arg2, CYG_ADDRWORD arg3,
+ CYG_ADDRWORD arg4, CYG_ADDRWORD arg5 )
+{}
+externC void
+cyg_tracemsg8( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1,
+ CYG_ADDRWORD arg2, CYG_ADDRWORD arg3,
+ CYG_ADDRWORD arg4, CYG_ADDRWORD arg5,
+ CYG_ADDRWORD arg6, CYG_ADDRWORD arg7 )
+{}
+
+// -------------------------------------------------------------------------
+
+externC void
+cyg_trace_dump(void)
+{}
+
+#endif // CYGDBG_USE_TRACING
+
+// -------------------------------------------------------------------------
+// Assert functions:
+
+#ifdef CYGDBG_USE_ASSERTS
+
+externC void
+cyg_assert_fail( const char *psz_func, const char *psz_file,
+ cyg_uint32 linenum, const char *psz_msg ) __THROW
+{
+ for(;;);
+};
+
+extern "C"
+{
+extern unsigned long _stext;
+extern unsigned long _etext;
+
+unsigned long stext_addr = (unsigned long)&_stext;
+unsigned long etext_addr = (unsigned long)&_etext;
+};
+
+externC cyg_bool cyg_check_data_ptr(const void *ptr)
+{
+ unsigned long p = (unsigned long)ptr;
+
+ if( p == 0 ) return false;
+
+ if( p > stext_addr && p < etext_addr ) return false;
+
+ return true;
+}
+
+externC cyg_bool cyg_check_func_ptr(void (*ptr)(void))
+{
+ unsigned long p = (unsigned long)ptr;
+
+ if( p == 0 ) return false;
+
+ if( p < stext_addr && p > etext_addr ) return false;
+
+ return true;
+}
+
+#endif // CYGDBG_USE_ASSERTS
+
+#endif // CYGDBG_INFRA_DEBUG_TRACE_ASSERT_NULL
+
+// -------------------------------------------------------------------------
+// EOF null.cxx
diff --git a/cesar/ecos/packages/infra/current/src/pkgstart.cxx b/cesar/ecos/packages/infra/current/src/pkgstart.cxx
new file mode 100644
index 0000000000..a422ec6f85
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/pkgstart.cxx
@@ -0,0 +1,99 @@
+//========================================================================
+//
+// pkgstart.cxx
+//
+// General startup code for the target machine
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-01-21
+// Purpose: This provides generic startup code for the eCos system.
+// Description: We start the system with the entry point cyg_start()
+// which is called from the eCos HALs. This in turn invokes
+// cyg_prestart(), cyg_package_start() and cyg_user_start().
+// All these can be overriden by the user.
+// Usage: Override the defaults to use your own startup code.
+// cyg_package_start() is used to call into individual
+// packages' startup code. Alternatively leave it be and
+// use the configuration options to set the appropriate
+// compatibility environment e.g. uItron, etc.
+// This may be automatically generated in the future.
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/infra.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Default tracing support
+
+#ifdef CYGSEM_START_UITRON_COMPATIBILITY
+# include <cyg/compat/uitron/uit_func.h>
+#endif
+
+// FUNCTION PROTOTYPES
+
+externC void
+cyg_package_start( void ) CYGBLD_ATTRIB_WEAK;
+
+// FUNCTIONS
+
+void
+cyg_package_start( void )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARGVOID();
+
+ CYG_TRACE0( true, "This is the system default cyg_package_start()" );
+
+#ifdef CYGSEM_START_UITRON_COMPATIBILITY
+ cyg_uitron_start();
+#endif
+
+ CYG_EMPTY_STATEMENT; // don't let it complain about doing nothing
+
+ CYG_REPORT_RETURN();
+} // cyg_package_start()
+
+// EOF pkgstart.cxx
diff --git a/cesar/ecos/packages/infra/current/src/prestart.cxx b/cesar/ecos/packages/infra/current/src/prestart.cxx
new file mode 100644
index 0000000000..5839084320
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/prestart.cxx
@@ -0,0 +1,85 @@
+//========================================================================
+//
+// prestart.cxx
+//
+// General startup code for the target machine
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-01-21
+// Purpose: This provides generic startup code for the eCos system.
+// Description: We start the system with the entry point cyg_start()
+// which is called from the eCos HALs. This in turn invokes
+// cyg_prestart(), cyg_package_start() and cyg_user_start().
+// All these can be overriden by the user.
+// Usage: Override the defaults to use your own startup code.
+// cyg_prestart() is the first thing called after the
+// HAL initialization, and is before the package
+// initialization
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Default tracing support
+
+// FUNCTION PROTOTYPES
+
+externC void
+cyg_prestart( void ) CYGBLD_ATTRIB_WEAK;
+
+// FUNCTIONS
+
+void
+cyg_prestart( void )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARGVOID();
+
+ CYG_TRACE0( true, "This is the system default cyg_prestart()" );
+
+ CYG_EMPTY_STATEMENT; // don't let it complain about doing nothing
+
+ CYG_REPORT_RETURN();
+} // cyg_prestart()
+
+// EOF prestart.cxx
diff --git a/cesar/ecos/packages/infra/current/src/pure.cxx b/cesar/ecos/packages/infra/current/src/pure.cxx
new file mode 100644
index 0000000000..ade74de51b
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/pure.cxx
@@ -0,0 +1,65 @@
+//==========================================================================
+//
+// pure.cxx
+//
+// g++ support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003 Bart Veer
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Date: 2003-03-27
+// Purpose: provide a __cxa_pure_virtual() function
+// Description: g++ v3.x generates references to a function __cxa_pure_virtual()
+// whenever the code contains pure virtual functions. This is a
+// placeholder used while constructing an object, and the function
+// should never actually get called. There is a default
+// implementation in libsupc++ but that has dependencies on I/O
+// and so on, unwanted in a minimal eCos environment. Instead we
+// want a minimal __cxa_pure_virtual().
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/infra.h>
+#include <cyg/infra/cyg_ass.h>
+
+extern "C" void
+__cxa_pure_virtual(void)
+{
+ CYG_FAIL("attempt to use a virtual function before object has been constructed");
+ for ( ; ; );
+}
+
+// EOF pure.cxx
diff --git a/cesar/ecos/packages/infra/current/src/simple.cxx b/cesar/ecos/packages/infra/current/src/simple.cxx
new file mode 100644
index 0000000000..9558473a24
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/simple.cxx
@@ -0,0 +1,563 @@
+//==========================================================================
+//
+// simple.cxx
+//
+// Simple, non formatting trace and assert functions
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-12-04
+// Purpose: Simple Trace and assert functions
+// Description: The functions in this file are simple implementations
+// of the standard trace and assert functions. These do not
+// do any printf style formatting, simply printing the string
+// and arguments directly.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/infra.h>
+
+#ifdef CYGDBG_INFRA_DEBUG_TRACE_ASSERT_SIMPLE
+
+#include <cyg/infra/cyg_type.h> // base types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <pkgconf/hal.h> // HAL configury
+#include <cyg/infra/diag.h> // HAL polled output
+#include <cyg/hal/hal_arch.h> // architectural stuff for...
+#include <cyg/hal/hal_intr.h> // interrupt control
+
+#ifdef CYGPKG_KERNEL
+#include <pkgconf/kernel.h> // kernel configury
+#include <cyg/kernel/thread.hxx> // thread id to print
+#include <cyg/kernel/sched.hxx> // ancillaries for above
+#include <cyg/kernel/thread.inl> // ancillaries for above
+#endif
+
+// -------------------------------------------------------------------------
+// Local Configuration: hack me!
+
+#define CYG_NO_FILENAME 1
+#define CYG_NO_THREADID 0
+#define CYG_NO_LINENUM 0
+#define CYG_NO_FUNCNAME 0
+#define CYG_DIAG_PRINTF 1
+
+#ifndef CYGPKG_KERNEL
+# undef CYG_NO_THREADID
+# define CYG_NO_THREADID 1
+#endif
+// -------------------------------------------------------------------------
+// Functions to trim file names and function names down to printable lengths
+// (these are shared between trace and assert functions)
+
+static const char *trim_file(const char *file)
+{
+#if !CYG_NO_FILENAME
+ if ( NULL == file )
+ file = "<nofile>";
+
+ const char *f = file;
+
+ while( *f ) f++;
+
+ while( *f != '/' && f != file ) f--;
+
+ return f==file?f:(f+1);
+#else
+ return "";
+#endif
+}
+
+static const char *trim_func(const char *func)
+{
+#if !CYG_NO_FUNCNAME
+
+ static char fbuf[100];
+ int i;
+
+ if ( NULL == func )
+ func = "<nofunc>";
+
+ for( i = 0; func[i] && func[i] != '(' ; i++ )
+ fbuf[i] = func[i];
+
+ fbuf[i++] = '(';
+ fbuf[i++] = ')';
+ fbuf[i ] = 0;
+
+ return &fbuf[0];
+#else
+ return "";
+#endif
+}
+
+void write_lnum( cyg_uint32 lnum)
+{
+#if !CYG_NO_LINENUM
+ diag_write_char('[');
+ diag_write_dec(lnum);
+ diag_write_char(']');
+#endif
+}
+
+void write_thread_id()
+{
+#if !CYG_NO_THREADID
+ Cyg_Thread *t = Cyg_Thread::self();
+ cyg_uint16 tid = 0xFFFF;
+
+ if( t != NULL ) tid = t->get_unique_id();
+
+ diag_write_char('<');
+ diag_write_hex(tid);
+ diag_write_char('>');
+#endif
+}
+
+
+// -------------------------------------------------------------------------
+// Trace functions:
+
+#ifdef CYGDBG_USE_TRACING
+
+externC void
+cyg_tracenomsg( const char *psz_func, const char *psz_file, cyg_uint32 linenum )
+{
+ cyg_uint32 old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+ diag_write_string("TRACE: ");
+ write_thread_id();
+ diag_write_string(trim_file(psz_file));
+ write_lnum(linenum);
+ diag_write_string(trim_func(psz_func));
+ diag_write_char('\n');
+
+ DIAG_DEVICE_END_SYNC();
+ HAL_RESTORE_INTERRUPTS(old_ints);
+
+};
+
+// provide every other one of these as a space/caller bloat compromise.
+
+externC void
+cyg_tracemsg( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg )
+{
+ cyg_uint32 old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+ if ( NULL == psz_msg )
+ psz_msg = "<nomsg>";
+
+ diag_write_string("TRACE: ");
+ write_thread_id();
+ diag_write_string(trim_file(psz_file));
+ write_lnum(linenum);
+ diag_write_string(trim_func(psz_func));
+ diag_write_char(' ');
+ diag_write_string(psz_msg);
+ diag_write_char('\n');
+
+ DIAG_DEVICE_END_SYNC();
+ HAL_RESTORE_INTERRUPTS(old_ints);
+
+};
+
+externC void
+cyg_tracemsg2( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1 )
+{
+ cyg_uint32 old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+ if ( NULL == psz_msg )
+ psz_msg = "<nomsg>";
+
+ diag_write_string("TRACE: ");
+ write_thread_id();
+ diag_write_string(trim_file(psz_file));
+ write_lnum(linenum);
+ diag_write_string(trim_func(psz_func));
+ diag_write_char(' ');
+#if CYG_DIAG_PRINTF
+ diag_printf( psz_msg, arg0, arg1 );
+#else
+ diag_write_string(psz_msg);
+ diag_write_char(' ');
+ diag_write_hex(arg0);
+ diag_write_char(' ');
+ diag_write_hex(arg1);
+#endif
+ diag_write_char('\n');
+ DIAG_DEVICE_END_SYNC();
+ HAL_RESTORE_INTERRUPTS(old_ints);
+};
+
+externC void
+cyg_tracemsg4( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1,
+ CYG_ADDRWORD arg2, CYG_ADDRWORD arg3 )
+{
+ cyg_uint32 old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+ if ( NULL == psz_msg )
+ psz_msg = "<nomsg>";
+
+ diag_write_string("TRACE: ");
+ write_thread_id();
+ diag_write_string(trim_file(psz_file));
+ write_lnum(linenum);
+ diag_write_string(trim_func(psz_func));
+ diag_write_char(' ');
+#if CYG_DIAG_PRINTF
+ diag_printf( psz_msg, arg0, arg1, arg2, arg3 );
+#else
+ diag_write_string(psz_msg);
+ diag_write_char(' ');
+ diag_write_hex(arg0);
+ diag_write_char(' ');
+ diag_write_hex(arg1);
+ diag_write_char(' ');
+ diag_write_hex(arg2);
+ diag_write_char(' ');
+ diag_write_hex(arg3);
+#endif
+ diag_write_char('\n');
+
+ DIAG_DEVICE_END_SYNC();
+ HAL_RESTORE_INTERRUPTS(old_ints);
+};
+
+externC void
+cyg_tracemsg6( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1,
+ CYG_ADDRWORD arg2, CYG_ADDRWORD arg3,
+ CYG_ADDRWORD arg4, CYG_ADDRWORD arg5 )
+{
+ cyg_uint32 old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+ if ( NULL == psz_msg )
+ psz_msg = "<nomsg>";
+
+ diag_write_string("TRACE: ");
+ write_thread_id();
+ diag_write_string(trim_file(psz_file));
+ write_lnum(linenum);
+ diag_write_string(trim_func(psz_func));
+ diag_write_char(' ');
+#if CYG_DIAG_PRINTF
+ diag_printf( psz_msg, arg0, arg1, arg2, arg3, arg4, arg5 );
+#else
+ diag_write_string(psz_msg);
+ diag_write_char(' ');
+ diag_write_hex(arg0);
+ diag_write_char(' ');
+ diag_write_hex(arg1);
+ diag_write_char(' ');
+ diag_write_hex(arg2);
+ diag_write_char(' ');
+ diag_write_hex(arg3);
+ diag_write_char(' ');
+ diag_write_hex(arg4);
+ diag_write_char(' ');
+ diag_write_hex(arg5);
+#endif
+ diag_write_char('\n');
+
+ DIAG_DEVICE_END_SYNC();
+ HAL_RESTORE_INTERRUPTS(old_ints);
+};
+
+externC void
+cyg_tracemsg8( cyg_uint32 what,
+ const char *psz_func, const char *psz_file, cyg_uint32 linenum,
+ const char *psz_msg,
+ CYG_ADDRWORD arg0, CYG_ADDRWORD arg1,
+ CYG_ADDRWORD arg2, CYG_ADDRWORD arg3,
+ CYG_ADDRWORD arg4, CYG_ADDRWORD arg5,
+ CYG_ADDRWORD arg6, CYG_ADDRWORD arg7 )
+{
+ cyg_uint32 old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+ if ( NULL == psz_msg )
+ psz_msg = "<nomsg>";
+
+ diag_write_string("TRACE: ");
+ write_thread_id();
+ diag_write_string(trim_file(psz_file));
+ write_lnum(linenum);
+ diag_write_string(trim_func(psz_func));
+ diag_write_char(' ');
+#if CYG_DIAG_PRINTF
+ diag_printf( psz_msg, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 );
+#else
+ diag_write_string(psz_msg);
+ diag_write_char(' ');
+ diag_write_hex(arg0);
+ diag_write_char(' ');
+ diag_write_hex(arg1);
+ diag_write_char(' ');
+ diag_write_hex(arg2);
+ diag_write_char(' ');
+ diag_write_hex(arg3);
+ diag_write_char(' ');
+ diag_write_hex(arg4);
+ diag_write_char(' ');
+ diag_write_hex(arg5);
+ diag_write_char(' ');
+ diag_write_hex(arg6);
+ diag_write_char(' ');
+ diag_write_hex(arg7);
+#endif
+ diag_write_char('\n');
+
+ DIAG_DEVICE_END_SYNC();
+ HAL_RESTORE_INTERRUPTS(old_ints);
+};
+
+// -------------------------------------------------------------------------
+
+externC void
+cyg_trace_dump(void)
+{
+#if defined(CYGPKG_KERNEL) && defined(CYG_DIAG_PRINTF)
+
+ {
+ diag_printf("\nScheduler:\n\n");
+
+ Cyg_Scheduler *sched = &Cyg_Scheduler::scheduler;
+
+ diag_printf("Lock: %d\n",sched->get_sched_lock() );
+
+# ifdef CYGVAR_KERNEL_THREADS_NAME
+
+ diag_printf("Current Thread: %s\n",sched->get_current_thread()->get_name());
+
+# else
+
+ diag_printf("Current Thread: %d\n",sched->get_current_thread()->get_unique_id());
+
+# endif
+
+ }
+
+# ifdef CYGVAR_KERNEL_THREADS_LIST
+
+ {
+ Cyg_Thread *t = Cyg_Thread::get_list_head();
+
+ diag_printf("\nThreads:\n\n");
+
+ while( NULL != t )
+ {
+ cyg_uint32 state = t->get_state();
+ char tstate[7];
+ char *tstate1 = "SCUKX";
+ static char *(reasons[8]) =
+ {
+ "NONE", // No recorded reason
+ "WAIT", // Wait with no timeout
+ "DELAY", // Simple time delay
+ "TIMEOUT", // Wait with timeout/timeout expired
+ "BREAK", // forced break out of sleep
+ "DESTRUCT", // wait object destroyed[note]
+ "EXIT", // forced termination
+ "DONE" // Wait/delay complete
+ };
+
+ if( 0 != state )
+ {
+ // Knock out chars that do not correspond to set bits.
+ for( int i = 0; i < 6 ; i++ )
+ if( 0 == (state & (1<<i)) )
+ tstate[i] = ' ';
+ else tstate[i] = tstate1[i];
+ tstate[6] = 0;
+ }
+ else tstate[0] = 'R', tstate[1] = 0;
+
+# ifdef CYGVAR_KERNEL_THREADS_NAME
+
+ diag_printf( "%20s pri = %3d state = %6s id = %3d\n",
+ t->get_name(),
+ t->get_priority(),
+ tstate,
+ t->get_unique_id()
+ );
+# else
+
+ diag_printf( "Thread %3d pri = %3d state = %6s\n",
+ t->get_unique_id(),
+ t->get_priority(),
+ tstate
+ );
+
+# endif
+ diag_printf( "%20s stack base = %08x ptr = %08x size = %08x\n",
+ "",
+ t->get_stack_base(),
+#ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+ t->get_saved_context(),
+#else
+ 0,
+#endif
+ t->get_stack_size()
+ );
+
+ diag_printf( "%20s sleep reason %8s wake reason %8s\n",
+ "",
+ reasons[t->get_sleep_reason()],
+ reasons[t->get_wake_reason()]
+ );
+
+ diag_printf( "%20s queue = %08x wait info = %08x\n",
+ "",
+ t->get_current_queue(),
+ t->get_wait_info()
+ );
+
+ diag_printf("\n");
+ t = t->get_list_next();
+ }
+
+ }
+# endif // CYGVAR_KERNEL_THREADS_LIST
+
+#endif // CYG_DIAG_PRINTF
+}
+
+#endif // CYGDBG_USE_TRACING
+
+// -------------------------------------------------------------------------
+// Assert functions:
+
+#ifdef CYGDBG_USE_ASSERTS
+
+externC void
+cyg_assert_fail( const char *psz_func, const char *psz_file,
+ cyg_uint32 linenum, const char *psz_msg ) __THROW
+{
+ cyg_uint32 old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+ diag_write_string("ASSERT FAIL: ");
+ write_thread_id();
+ diag_write_string(trim_file(psz_file));
+ write_lnum(linenum);
+ diag_write_string(trim_func(psz_func));
+ diag_write_char(' ');
+ diag_write_string(psz_msg);
+ diag_write_char('\n');
+
+#ifdef CYGHWR_TEST_PROGRAM_EXIT
+ CYGHWR_TEST_PROGRAM_EXIT();
+#endif
+ for(;;);
+
+// DIAG_DEVICE_END_SYNC();
+// HAL_RESTORE_INTERRUPTS(old_ints);
+};
+
+extern "C"
+{
+extern unsigned long _stext;
+extern unsigned long _etext;
+
+unsigned long stext_addr = (unsigned long)&_stext;
+unsigned long etext_addr = (unsigned long)&_etext;
+};
+
+externC cyg_bool cyg_check_data_ptr(const void *ptr)
+{
+ unsigned long p = (unsigned long)ptr;
+
+ if( p == 0 ) return false;
+
+ if( p > stext_addr && p < etext_addr ) return false;
+
+ return true;
+}
+
+externC cyg_bool cyg_check_func_ptr(const void (*ptr)(void))
+{
+ unsigned long p = (unsigned long)ptr;
+
+ if( p == 0 ) return false;
+
+ if( p < stext_addr && p > etext_addr ) return false;
+
+ return true;
+}
+
+#endif // CYGDBG_USE_ASSERTS
+
+#endif // CYGDBG_INFRA_DEBUG_TRACE_ASSERT_SIMPLE
+
+// -------------------------------------------------------------------------
+// EOF simple.cxx
diff --git a/cesar/ecos/packages/infra/current/src/startup.cxx b/cesar/ecos/packages/infra/current/src/startup.cxx
new file mode 100644
index 0000000000..84418d6b78
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/startup.cxx
@@ -0,0 +1,110 @@
+//========================================================================
+//
+// startup.cxx
+//
+// General startup code for the target machine
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-01-21
+// Purpose: This provides generic startup code for the eCos system.
+// Description: We start the system with the entry point cyg_start()
+// which is called from the eCos HALs. This in turn invokes
+// cyg_prestart(), cyg_package_start() and cyg_user_start().
+// All these can be overriden by the user.
+// Usage: Override the defaults to use your own startup code,
+// which will allow you to take complete control after the
+// HAL initialization
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/infra.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Default tracing support
+
+#ifdef CYGPKG_KERNEL
+# include <pkgconf/kernel.h>
+# include <cyg/kernel/sched.hxx>
+# include <cyg/kernel/sched.inl>
+#endif
+
+// FUNCTION PROTOTYPES
+
+externC void
+cyg_start( void ) CYGBLD_ATTRIB_WEAK;
+
+externC void
+cyg_prestart( void );
+
+externC void
+cyg_package_start( void );
+
+externC void
+cyg_user_start( void );
+
+
+// FUNCTIONS
+
+void
+cyg_start( void )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARGVOID();
+
+ cyg_prestart();
+
+ cyg_package_start();
+
+ cyg_user_start();
+
+#ifdef CYGPKG_KERNEL
+ Cyg_Scheduler::start();
+#endif
+
+ CYG_REPORT_RETURN();
+} // cyg_start()
+
+// EOF startup.cxx
diff --git a/cesar/ecos/packages/infra/current/src/strlen.cxx b/cesar/ecos/packages/infra/current/src/strlen.cxx
new file mode 100644
index 0000000000..bf37282be4
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/strlen.cxx
@@ -0,0 +1,104 @@
+//===========================================================================
+//
+// strlen.cxx
+//
+// ANSI standard strlen() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Nick Garnett <nickg@calivar.com>
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: nickg
+// Date: 2000-04-14
+// Purpose:
+// Description: strlen() function, to satisfy C++ runtime needs. This
+// function functions correctly, but in the interests of
+// keeping code size down, it uses the smallest implementation
+// possible, and is consequently not very fast.
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/system.h> // Configuration header
+#include <pkgconf/infra.h> // Configuration header
+
+//==========================================================================
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+
+//==========================================================================
+// EXPORTED SYMBOLS
+
+extern "C" size_t
+strlen( const char *s ) CYGBLD_ATTRIB_WEAK_ALIAS(__strlen);
+
+//==========================================================================
+// FUNCTIONS
+
+extern "C" size_t
+__strlen( const char *s )
+{
+ int retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "__strlen", "returning length %d" );
+ CYG_REPORT_FUNCARG1( "s=%08x", s );
+
+ CYG_CHECK_DATA_PTR( s, "s is not a valid pointer!" );
+
+ const char *start = s;
+
+ while (*s)
+ s++;
+
+ retval = s - start;
+
+ CYG_REPORT_RETVAL( retval );
+
+ return retval;
+
+} // __strlen()
+
+//==========================================================================
+// EOF strlen.cxx
diff --git a/cesar/ecos/packages/infra/current/src/tcdiag.cxx b/cesar/ecos/packages/infra/current/src/tcdiag.cxx
new file mode 100644
index 0000000000..baf0b84668
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/tcdiag.cxx
@@ -0,0 +1,276 @@
+//==========================================================================
+//
+// tcdiag.cxx
+//
+// Infrastructure diag test harness.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm, jlarmour
+// Date: 1999-02-16
+// Description: Test harness implementation that uses the infrastructure
+// diag channel. This is intended for manual testing.
+//
+//####DESCRIPTIONEND####
+
+#include <pkgconf/infra.h>
+#include <pkgconf/system.h>
+#include CYGBLD_HAL_TARGET_H // get initialization for
+#include CYGBLD_HAL_PLATFORM_H // cyg_test_is_simulator
+
+#include <cyg/infra/cyg_type.h> // base types
+#include <cyg/hal/hal_arch.h> // any architecture specific stuff
+#include <cyg/infra/diag.h> // HAL polled output
+#include <cyg/infra/testcase.h> // what we implement
+
+#include <cyg/hal/hal_intr.h> // exit macro, if defined
+
+#ifdef CYGHWR_TARGET_SIMULATOR_NO_GDB_WORKING
+int cyg_test_is_simulator = 1; // set this anyway
+#else
+int cyg_test_is_simulator = 0; // infrastructure changes as necessary
+#endif
+
+//----------------------------------------------------------------------------
+// Functions ensuring we get pretty printed assertion messages in the
+// farm - regardless of configuration and GDB capabilities.
+
+#ifdef CYGPKG_KERNEL
+# include <pkgconf/kernel.h>
+# include <cyg/kernel/thread.hxx> // thread id to print
+# include <cyg/kernel/thread.inl> // ancillaries for above
+#endif
+
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+#include <cyg/hal/hal_if.h>
+#endif
+
+static inline const char *trim_file(const char *file)
+{
+ if ( NULL == file )
+ file = "<nofile>";
+
+ const char *f = file;
+
+ while( *f ) f++;
+
+ while( *f != '/' && f != file ) f--;
+
+ return f==file?f:(f+1);
+}
+
+static inline const char *trim_func(const char *func)
+{
+ static char fbuf[100];
+ int i;
+
+ if ( NULL == func )
+ func = "<nofunc>";
+
+ for( i = 0; func[i] && func[i] != '(' ; i++ )
+ fbuf[i] = func[i];
+
+ fbuf[i++] = '(';
+ fbuf[i++] = ')';
+ fbuf[i ] = 0;
+
+ return &fbuf[0];
+}
+
+static inline
+void write_lnum( cyg_uint32 lnum)
+{
+ diag_write_char('[');
+ diag_write_dec(lnum);
+ diag_write_char(']');
+}
+
+static inline
+void write_thread_id()
+{
+#ifdef CYGPKG_KERNEL
+ Cyg_Thread *t = Cyg_Thread::self();
+ cyg_uint16 tid = 0xFFFF;
+
+ if( t != NULL ) tid = t->get_unique_id();
+
+ diag_write_char('<');
+ diag_write_hex(tid);
+ diag_write_char('>');
+#endif
+}
+
+// Called from the CYG_ASSERT_DOCALL macro
+externC void
+cyg_assert_msg( const char *psz_func, const char *psz_file,
+ cyg_uint32 linenum, const char *psz_msg ) __THROW
+{
+ cyg_uint32 old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ DIAG_DEVICE_START_SYNC();
+
+#ifdef CYG_HAL_DIAG_LOCK
+ CYG_HAL_DIAG_LOCK();
+#endif
+
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+ {
+ int cur_console;
+ int i;
+ struct cyg_fconfig fc;
+
+ cur_console = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+ fc.key = "info_console_force";
+ fc.type = CYGNUM_FLASH_CFG_TYPE_CONFIG_BOOL;
+ fc.val = (void *)&i;
+ if (CYGACC_CALL_IF_FLASH_CFG_OP2(CYGNUM_CALL_IF_FLASH_CFG_GET, &fc)) {
+ if (i) {
+ fc.key = "info_console_number";
+ fc.type = CYGNUM_FLASH_CFG_TYPE_CONFIG_INT;
+ if (CYGACC_CALL_IF_FLASH_CFG_OP2(CYGNUM_CALL_IF_FLASH_CFG_GET, &fc)) {
+ // Then i is the console to force it to:
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(i);
+ }
+ }
+ }
+#endif
+ diag_write_string("ASSERT FAIL: ");
+ write_thread_id();
+ diag_write_string(trim_file(psz_file));
+ write_lnum(linenum);
+ diag_write_string(trim_func(psz_func));
+ diag_write_char(' ');
+ diag_write_string(psz_msg);
+ diag_write_char('\n');
+
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(cur_console);
+ }
+#endif
+#ifdef CYG_HAL_DIAG_UNLOCK
+ CYG_HAL_DIAG_UNLOCK();
+#endif
+
+ DIAG_DEVICE_END_SYNC();
+ HAL_RESTORE_INTERRUPTS(old_ints);
+}
+
+externC void
+cyg_test_init(void)
+{
+ // currently nothing
+}
+
+externC void
+cyg_test_output(Cyg_test_code status, const char *msg, int line,
+ const char *file)
+{
+ char *st;
+
+ switch (status) {
+ case CYGNUM_TEST_FAIL:
+ st = "FAIL:";
+ break;
+ case CYGNUM_TEST_PASS:
+ st = "PASS:";
+ break;
+ case CYGNUM_TEST_EXIT:
+ st = "EXIT:";
+ break;
+ case CYGNUM_TEST_INFO:
+ st = "INFO:";
+ break;
+ case CYGNUM_TEST_GDBCMD:
+ st = "GDB:";
+ break;
+ case CYGNUM_TEST_NA:
+ st = "NOTAPPLICABLE:";
+ break;
+ default:
+ st = "UNKNOWN STATUS:";
+ break;
+ }
+
+#ifdef CYG_HAL_DIAG_LOCK
+ CYG_HAL_DIAG_LOCK();
+#endif
+
+ diag_write_string(st);
+ diag_write_char('<');
+ diag_write_string(msg);
+ diag_write_char('>');
+ if( CYGNUM_TEST_FAIL == status ) {
+ diag_write_string(" Line: ");
+ diag_write_dec(line);
+ diag_write_string(", File: ");
+ diag_write_string(file);
+ }
+ diag_write_char('\n');
+
+#ifdef CYG_HAL_DIAG_UNLOCK
+ CYG_HAL_DIAG_UNLOCK();
+#endif
+
+
+}
+
+// This is an appropriate function to set a breakpoint on
+externC void
+cyg_test_exit(void)
+{
+// workaround SH dwarf2 gen problem
+#if defined(CYGPKG_HAL_SH) && (__GNUC__ >= 3)
+ static volatile int i;
+ i++;
+#endif
+#ifdef CYGHWR_TEST_PROGRAM_EXIT
+ CYGHWR_TEST_PROGRAM_EXIT();
+#endif
+#ifdef CYGSEM_INFRA_RESET_ON_TEST_EXIT
+#ifdef HAL_PLATFORM_RESET
+ HAL_PLATFORM_RESET();
+#else
+#warning "Reset selected for test case exit, but none defined"
+#endif
+#endif
+ // Default behaviour - simply hang in a loop
+ for(;;)
+ ;
+}
+// EOF tcdiag.cxx
diff --git a/cesar/ecos/packages/infra/current/src/userstart.cxx b/cesar/ecos/packages/infra/current/src/userstart.cxx
new file mode 100644
index 0000000000..c0aa277ed2
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/src/userstart.cxx
@@ -0,0 +1,86 @@
+//========================================================================
+//
+// userstart.cxx
+//
+// General startup code for the target machine
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-01-21
+// Purpose: This provides generic startup code for the eCos system.
+// Description: We start the system with the entry point cyg_start()
+// which is called from the eCos HALs. This in turn invokes
+// cyg_prestart(), cyg_package_start() and cyg_user_start().
+// All these can be overriden by the user.
+// Usage: Override the defaults to use your own startup code.
+// cyg_user_start() is the default entry point for programs
+// not using a compatibility layer
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Default tracing support
+
+// FUNCTION PROTOTYPES
+
+externC void
+cyg_user_start( void ) CYGBLD_ATTRIB_WEAK;
+
+
+// FUNCTIONS
+
+void
+cyg_user_start( void )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARGVOID();
+
+ CYG_TRACE0( true, "This is the system default cyg_user_start()" );
+
+ CYG_EMPTY_STATEMENT; // don't let it complain about doing nothing
+
+ CYG_REPORT_RETURN();
+} // cyg_user_start()
+
+
+// EOF userstart.cxx
diff --git a/cesar/ecos/packages/infra/current/tests/cxxsupp.cxx b/cesar/ecos/packages/infra/current/tests/cxxsupp.cxx
new file mode 100644
index 0000000000..ed82cdac5e
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/tests/cxxsupp.cxx
@@ -0,0 +1,191 @@
+//==========================================================================
+//
+// cxxsupp.cxx
+//
+// C++ runtime support test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003 Nick Garnett <nickg@calivar.com>
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting the copyright
+// holders.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2003-04-01
+// Description: Simple test for C++ runtime support.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/isoinfra.h>
+
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h>
+
+// The H8300 does not have C++ support in its toolchain
+#ifndef CYGPKG_HAL_H8300
+
+#include <new>
+
+//==========================================================================
+
+class Pure
+{
+protected:
+ int instance;
+public:
+ Pure(int i);
+ virtual void pure_fun1(void) = 0;
+ virtual void pure_fun2(void) = 0;
+ virtual void impure_fun1(void);
+ inline void inline_fun1(void);
+};
+
+Pure::Pure(int i)
+{
+ instance = i;
+ diag_printf("%s(%d) called\n",__PRETTY_FUNCTION__,instance);
+}
+
+void Pure::impure_fun1()
+{
+ diag_printf("%s(%d) called\n",__PRETTY_FUNCTION__,instance);
+}
+
+inline void Pure::inline_fun1()
+{
+ diag_printf("%s(%d) called\n",__PRETTY_FUNCTION__,instance);
+}
+
+//==========================================================================
+
+class Derived : public Pure
+{
+public:
+ Derived(int i);
+ void pure_fun1(void);
+ void pure_fun2(void);
+ void impure_fun2(void);
+};
+
+Derived::Derived(int i)
+ : Pure(i)
+{
+ diag_printf("%s(%d) called\n",__PRETTY_FUNCTION__,instance);
+}
+
+void Derived::pure_fun1(void)
+{
+ diag_printf("%s(%d) called\n",__PRETTY_FUNCTION__,instance);
+}
+
+void Derived::pure_fun2(void)
+{
+ diag_printf("%s(%d) called\n",__PRETTY_FUNCTION__,instance);
+}
+
+
+void Derived::impure_fun2(void)
+{
+ diag_printf("%s(%d) called\n",__PRETTY_FUNCTION__,instance);
+}
+
+//==========================================================================
+
+__externC void
+cyg_start( void )
+{
+
+ CYG_TEST_INIT();
+
+ Derived derived(1);
+ Pure *pure = &derived;
+
+ CYG_TEST_INFO("Calling derived members");
+ derived.pure_fun1();
+ derived.pure_fun2();
+ derived.impure_fun1();
+ derived.impure_fun2();
+ derived.inline_fun1();
+
+ CYG_TEST_INFO("Calling pure members");
+ pure->pure_fun1();
+ pure->pure_fun2();
+ pure->impure_fun1();
+ pure->inline_fun1();
+
+#if CYGINT_ISO_MALLOC
+ Derived *derived2 = new Derived(2);
+ Pure *pure2 = derived2;
+
+ CYG_TEST_INFO("Calling derived2 members");
+ derived2->pure_fun1();
+ derived2->pure_fun2();
+ derived2->impure_fun1();
+ derived2->impure_fun2();
+ derived2->inline_fun1();
+
+ CYG_TEST_INFO("Calling pure2 members");
+ pure2->pure_fun1();
+ pure2->pure_fun2();
+ pure2->impure_fun1();
+ pure2->inline_fun1();
+
+ delete derived2;
+
+#else
+ CYG_TEST_INFO("No malloc support, new and delete not tested");
+#endif
+
+ CYG_TEST_PASS_FINISH("C++ Support OK");
+}
+
+//==========================================================================
+
+#else
+
+__externC void
+cyg_start( void )
+{
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_NA("C++ not supported on this architecture\n");
+}
+
+#endif
+
+//==========================================================================
+// EOF cxxsupp.cxx
diff --git a/cesar/ecos/packages/infra/current/tests/diag_sprintf1.c b/cesar/ecos/packages/infra/current/tests/diag_sprintf1.c
new file mode 100644
index 0000000000..66bfae1ba6
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/tests/diag_sprintf1.c
@@ -0,0 +1,257 @@
+//=================================================================
+//
+// diag_sprintf1.c
+//
+// Testcase for infra diag_sprintf()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors: andrew lunn
+// Date: 2005-02-09
+// Description: Contains testcode for infra diag_sprintf() function
+//
+//
+//####DESCRIPTIONEND####
+
+
+// INCLUDES
+
+#include <cyg/infra/diag.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+
+static void test(CYG_ADDRWORD data)
+{
+ static char x[500];
+ static char y[500];
+ int ret;
+ int tmp;
+ int *ptr;
+
+
+ // Check 1
+ ret = diag_sprintf(x, "%d", 20);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "20")==0, "%d test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%d test return code");
+
+ // Check 2
+ my_strcpy(y, "Pigs noses. Get 'em while there 'ot");
+ ret = diag_sprintf(x, "%s", y);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%s test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%s test return code");
+
+ // Check 3
+ ret = diag_sprintf(x, "||%7d||", 2378);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "|| 2378||")==0, "padding test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "padding test return code");
+
+ // Check 4
+ ret = diag_sprintf(x, "%x", 3573);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "df5")==0, "hex conversion (lowercase)");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "hex conv (lowercase) return code");
+
+ // Check 5
+ ret = diag_sprintf(x, "%X", 3573);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "DF5")==0, "hex conversion (uppercase)");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "hex conv (upperbase ) return code");
+
+ // Check 6
+ ret = diag_sprintf(x, "%c", 65);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "A")==0, "%c test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%c test return code");
+
+ // Check 7
+ // Check 7 was for octal, but diag_sprintf does not support this.
+
+ // Check 8
+ ret = diag_sprintf(x, "%u", (unsigned int) 4738);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "4738")==0, "%u test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%u test return code");
+
+ // Check 9
+ // Check 9 was for the %n conversion specifier which diag_sprintf
+ // does not support.
+
+ // Check 10
+ ret = diag_sprintf(x, "%%");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "%")==0, "%% test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%% test return code");
+
+ // Check 11
+ ret = diag_sprintf(x, "%ld", (long)1<<30);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "1073741824")==0, "%ld test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%ld test return code");
+
+ // Check 12
+ ret = diag_sprintf(x, "%lu", (unsigned long)(1<<31) + 100);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "2147483748")==0, "%lu test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%lu test return code");
+
+ // Check 13
+ ret = diag_sprintf(x, "%x", 0x789a);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "789a")==0, "%x test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%x test return code");
+
+ // Check 14
+ ret = diag_sprintf(x, "%X", 0x789ab2);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "789AB2")==0, "%X test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%x test return code");
+
+ // Check 15
+ ret = diag_sprintf(x, "%08x", 0xdea2f2);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "00dea2f2")==0, "%0x test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%0x test return code");
+
+ // Check 16
+ ret = diag_sprintf(x, "%09X", 0x12fa1c);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "00012FA1C")==0, "%0X test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%0X test return code");
+
+ // Check 17
+ ptr=&tmp;
+ ret = diag_sprintf(x, "%p", (void *)ptr);
+ // just check _something_ was returned
+ CYG_TEST_PASS_FAIL((ret==my_strlen(x)) && (ret > 0),
+ "%p test return code");
+
+ // Long string tests
+ ret = diag_sprintf(x, "This is a very long string so I hope this works as "
+ "otherwise I would be very, very, sad. The cat sat on the "
+ "hat, and the mat sat on the rat. Quick brown fax, etc.etc. "
+ "blah, blah and all that jazz. Isn't he finished yet? My "
+ "old man's a dustman, why do I have to think up this "
+ "drivel, isn't that what summer students are for, if "
+ "anything that seems thinking up mindless drivel seems to "
+ "be their occupation in life. Yoof of today, eh? What, "
+ "what? %s So there.",
+ "And this is a middly bit.");
+ my_strcpy(y, "This is a very long string so I hope this works as "
+ "otherwise I would be very, very, sad. The cat sat on the "
+ "hat, and the mat sat on the rat. Quick brown fax, etc.etc. "
+ "blah, blah and all that jazz. Isn't he finished yet? My "
+ "old man's a dustman, why do I have to think up this "
+ "drivel, isn't that what summer students are for, if "
+ "anything that seems thinking up mindless drivel seems to "
+ "be their occupation in life. Yoof of today, eh? What, "
+ "what? And this is a middly bit. So there.");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "long (480 char) string output #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "long (480 char) string output #1 return code");
+
+ ret = diag_sprintf(x, "Boo! This %s So there.",
+ "is a very long string so I hope this works as "
+ "otherwise I would be very, very, sad. The cat sat on the "
+ "hat, and the mat sat on the rat. Quick brown fax, etc.etc. "
+ "blah, blah and all that jazz. Isn't he finished yet? My "
+ "old man's a dustman, why do I have to think up this "
+ "drivel, isn't that what summer students are for, if "
+ "anything that seems thinking up mindless drivel seems to "
+ "be their occupation in life. Yoof of today, eh? What, "
+ "what? And this is a middly bit.");
+ my_strcpy(y, "Boo! This is a very long string so I hope this works as "
+ "otherwise I would be very, very, sad. The cat sat on the "
+ "hat, and the mat sat on the rat. Quick brown fax, etc.etc. "
+ "blah, blah and all that jazz. Isn't he finished yet? My "
+ "old man's a dustman, why do I have to think up this "
+ "drivel, isn't that what summer students are for, if "
+ "anything that seems thinking up mindless drivel seems to "
+ "be their occupation in life. Yoof of today, eh? What, "
+ "what? And this is a middly bit. So there.");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "long (485 char) string output #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "long (485 char) string output #2 return code");
+
+
+
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "diag_sprintf() function");
+
+} // test()
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for infra library "
+ "diag_sprintf() function");
+ CYG_TEST_INFO("These test individual features separately");
+
+ test(0);
+
+ return 0;
+} // main()
+
+// EOF diag_sprintf1.c
diff --git a/cesar/ecos/packages/infra/current/tests/diag_sprintf2.c b/cesar/ecos/packages/infra/current/tests/diag_sprintf2.c
new file mode 100644
index 0000000000..784c464e8b
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/tests/diag_sprintf2.c
@@ -0,0 +1,160 @@
+//=================================================================
+//
+// diag_sprintf2.c
+//
+// Testcase for infra library diag_sprintf()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors: andrew lunn
+// Date: 2005-02-09
+// Description: Contains testcode for infra library diag_sprintf() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+// INCLUDES
+
+#include <cyg/infra/diag.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int
+my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static int
+my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *
+my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+
+static void
+test( CYG_ADDRWORD data )
+{
+ static char x[200];
+ static char y[200];
+ static char z[200];
+ int ret;
+
+ // Check 1
+ my_strcpy(x, "I'm afraid the shield generator");
+ ret = diag_sprintf(y, "%s will be quite operational - %5d%%%c%05X", x,
+ 13, '5', 0x89ab);
+ my_strcpy( z, "I'm afraid the shield generator will be "
+ "quite operational - 13%5089AB" );
+ CYG_TEST_PASS_FAIL(my_strcmp(y,z) == 0, "%s%n%d%%%c%0X test");
+
+ CYG_TEST_PASS_FAIL(ret == my_strlen(z),
+ "%s%n%d%%%c%0X test return code" );
+
+ // Check 2
+ ret = diag_sprintf(y, "|%5d|%10s|%03d|%c|", 2, "times", 6, '=');
+ my_strcpy(z, "| 2| times|006|=|");
+
+ CYG_TEST_PASS_FAIL(my_strcmp(y,z) == 0, "|%5d|%10s|%03d|%c| test");
+
+ CYG_TEST_PASS_FAIL(ret == my_strlen(z),
+ "|%5d|%10s|%03d|%c|%o| test return code" );
+
+ // Check 3
+ ret = diag_snprintf(y, 19, "print up to here >< and not this bit" );
+ my_strcpy(z, "print up to here >");
+ CYG_TEST_PASS_FAIL(my_strcmp(y,z) == 0, "simple diag_snprintf test #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(z),
+ "simple diag_snprintf test #1 return code" );
+
+ // Check 4
+ ret = diag_snprintf(y, 31, "print a bit of this number: %05d nyer", 1234);
+ my_strcpy(z, "print a bit of this number: 01");
+ CYG_TEST_PASS_FAIL(my_strcmp(y,z) == 0, "simple diag_snprintf test #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(z),
+ "simple diag_snprintf test #2 return code" );
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__
+ " for C library diag_sprintf() function");
+
+} // test()
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for infra "
+ "library diag_sprintf() function");
+ CYG_TEST_INFO("These test combinations of diag_sprintf() features");
+
+ test(0);
+
+ return 0;
+} // main()
+
+// EOF diag_sprintf2.c
diff --git a/cesar/ecos/packages/infra/current/tests/fc_test.c b/cesar/ecos/packages/infra/current/tests/fc_test.c
new file mode 100644
index 0000000000..125301dfbd
--- /dev/null
+++ b/cesar/ecos/packages/infra/current/tests/fc_test.c
@@ -0,0 +1,108 @@
+//==========================================================================
+//
+// fc_test.c
+//
+// Test/demonstration of using RedBoot 'fconfig' from eCos
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003, 2004 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2003-12-22
+// Purpose:
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+//
+// Demonstration of how to use virtual vector interfaces to access/modify
+// persistent data stored by 'fconfig' command in RedBoot.
+//
+// Note: there is currently no support for adding new keys using this
+// mechanism. Only existing key/value pairs may be updated.
+//
+#include <pkgconf/hal.h>
+#include <cyg/hal/hal_if.h>
+#include <cyg/infra/diag.h>
+
+void
+main(void)
+{
+ struct cyg_fconfig fc;
+ char key[64];
+ int port;
+
+ diag_printf("fconfig test started\n");
+ fc.offset = 0;
+ fc.key = key;
+ fc.keylen = sizeof(key);
+ while (CYGACC_CALL_IF_FLASH_CFG_OP2(CYGNUM_CALL_IF_FLASH_CFG_NEXT, &fc)) {
+ diag_printf(" Offset: %d, key: '%s', type: %d\n", fc.offset, fc.key, fc.type);
+ fc.keylen = sizeof(key);
+ }
+ // Try and update a data value
+ fc.key = "gdb_port";
+ fc.val = &port;
+ fc.type = CYGNUM_FLASH_CFG_TYPE_CONFIG_INT;
+ if (CYGACC_CALL_IF_FLASH_CFG_OP2(CYGNUM_CALL_IF_FLASH_CFG_GET, &fc)) {
+ diag_printf("gdb_port = %d\n", port);
+ port++;
+ if (CYGACC_CALL_IF_FLASH_CFG_OP2(CYGNUM_CALL_IF_FLASH_CFG_SET, &fc)) {
+ if (CYGACC_CALL_IF_FLASH_CFG_OP2(CYGNUM_CALL_IF_FLASH_CFG_GET, &fc)) {
+ diag_printf("now = %d\n", port);
+ } else {
+ diag_printf("Can't re-fetch 'gdb_port'\n");
+ exit(1);
+ }
+ port--;
+ if (!CYGACC_CALL_IF_FLASH_CFG_OP2(CYGNUM_CALL_IF_FLASH_CFG_SET, &fc)) {
+ diag_printf("Can't update 'gdb_port'\n");
+ exit(1);
+ }
+ } else {
+ diag_printf("Can't update 'gdb_port'\n");
+ exit(1);
+ }
+ } else {
+ diag_printf("Fetch 'gdb_port' failed\n");
+ exit(1);
+ }
+ diag_printf("... done\n");
+ exit(1);
+}
diff --git a/cesar/ecos/packages/io/common/current/ChangeLog b/cesar/ecos/packages/io/common/current/ChangeLog
new file mode 100644
index 0000000000..0182e1f9b7
--- /dev/null
+++ b/cesar/ecos/packages/io/common/current/ChangeLog
@@ -0,0 +1,268 @@
+2004-12-23 Peter Korsgaard <jacmet@sunsite.dk>
+
+ * doc/io.sgml: Match CYG_TTY_IN_FLAGS_ECHO and
+ CYG_TTY_IN_FLAGS_BINARY values with source code.
+
+2004-09-21 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/io.sgml: Rename incorrect cyg_drv_mutex to cyg_drv_mutex_t.
+ Ditto cyg_drv_cond and cyg_drv_cond_t.
+
+2004-04-16 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/iosys.c (cyg_io_lookup): Use union to avoid aliasing problems
+ with compiler.
+
+2004-01-19 Nick Garnett <nickg@calivar.com>
+
+ * include/config_keys.h (CYG_IO_GET_CONFIG_DISK_INFO): Added DISK
+ IO config key base definition.
+
+2003-11-27 David Woodhouse <dwmw2@infradead.org>
+
+ * include/config_keys.h: Add CYG_IO_SET_CONFIG_FLASH_FIS_NAME
+
+2003-11-06 Billy <billy@babababa.net>
+
+ * doc/io.sgml: In the TTY section swap "\n\r" to "\r\n" to match
+ reality.
+
+2003-03-25 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * include/config_keys.h: Define CYG_IO_SET_CONFIG_SERIAL_OUTPUT_FLUSH
+ to be same as CYG_IO_GET_CONFIG_SERIAL_OUTPUT_FLUSH.
+ Ditto for ..._INPUT_FLUSH.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/io.cdl: Fix doc link.
+
+2002-03-12 Nick Garnett <nickg@redhat.com>
+
+ * doc/io.sgml: Generally sorted out, reformetted, folded. SMP
+ considerations added to various parts of the document.
+
+2002-01-23 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/config_keys.h: Add config keys for flash block drivers.
+
+2001-09-27 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/io_diag.c: Delete. No longer used.
+ * cdl/io.cdl: Don't build io_diag.c.
+
+2001-04-18 Jesper Skov <jskov@redhat.com>
+ Case 105926
+ * src/io_file.c (falloc): Don't return -EMFILE, but EMFILE. Found
+ by Andrew Lunn.
+
+2000-11-22 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/io.cdl: Only put ioinit.cxx in extras.o. Build others normally.
+ * src/iosys.c: Move devtab table definition from here....
+ * src/ioinit.cxx: .... to here
+
+2000-11-21 Bart Veer <bartv@redhat.com>
+
+ * src/iosys.c:
+ * include/devtab.h:
+ Add dummy implementations for select, get_config and set_config
+
+2000-09-07 Jesper Skov <jskov@redhat.com>
+
+ * include/devtab.h (cyg_devtab_entry_t): Fix syntax problem.
+
+2000-09-04 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/devtab.h (cyg_devtab_entry_t): Apply CYG_HAL_TABLE_TYPE
+
+2000-08-01 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/config_keys.h:
+ Add keys to support flow control, line status callbacks,
+ hardware breaks and termios.
+
+2000-07-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/config_keys.h: Added generic keys for controlling
+ BLOCKING behaviour, and added aliases to retain compatibility.
+
+2000-07-25 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/devtab.h: Define cyg_devio_cwrite, _cread, _bwrite and _bread
+ with C linkage
+
+2000-07-21 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/io.h:
+ * include/devtab.h:
+ * src/iosys.c:
+ Added support for block devices. At present this is really just
+ exploiting the perturbations that the EL/IX branch merge will
+ cause to add placeholders for future developments.
+ These changes consist mainly of adding bwrite() and bread()
+ entries in the cyg_devio_table_t structure and adding a char/block
+ discriminator flags to the devtab entry status field. API calls
+ cyg_io_bwrite() and cyg_io_bread() have also been added.
+ Suitable definition of macros means that no existing driver code
+ needs to be changed to accomodate this addition.
+
+2000-06-19 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/iosys.c:
+ * include/devtab.h:
+ Converted to new table construction mechanism.
+
+2000-06-15 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/io.h:
+ * src/iosys.c: Added cyg_io_select().
+
+ * include/devtab.h: Added select() support function to
+ cyg_devio_table_t structure. Modified DEVIO_TABLE() macro
+ to match.
+
+2000-06-09 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/file.h: Added redefinition of CYG_SELINFO_TAG.
+
+2000-06-07 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/file.h: Added definitions to make this header work with
+ the fileio package.
+
+ * cdl/io.cdl: Moved support for files into a sub-component that is
+ only active if the FILEIO package is not present.
+
+2000-05-05 Grant Edwards <grante@visi.com>
+
+ * include/config_keys.h: Add key to inquire about serial buffer info
+
+2000-05-03 Jesper Skov <jskov@redhat.com>
+
+ * include/config_keys.h: Added keys for DSP io.
+ Added key for overflow reset.
+
+2000-05-01 Jesper Skov <jskov@redhat.com>
+
+ * include/config_keys.h: Added keys for read/write blocking.
+
+2000-03-28 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/io.cdl:
+
+ Adjust documentation URLs.
+
+2000-03-18 Gary Thomas <gthomas@redhat.com>
+
+ * include/file.h: Add additional flags for nonblocking and
+ async modes (used in network support).
+
+2000-03-04 Gary Thomas <gthomas@redhat.com>
+
+ * include/file.h: Add function prototypes.
+
+2000-02-17 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/io_file.c: Use eCos error list <cyg/error/codes.h>.
+
+2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/io_file.c: Use standard errno.h, not sys/errno.h
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+
+ * cdl/io.cdl: Adjust help URLs in line with new doc layout.
+
+2000-01-28 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/file.h:
+ * src/io_file.c: New file(s)
+
+ * cdl/io.cdl: Add generic file I/O support.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+
+ * cdl/io.cdl: Adjust help URLs in line with new doc layout.
+
+1999-04-28 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/PKGconf.mak (EXTRAS_COMPILE):
+ Use the new rules for generating libextras.a
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/iosys.c (cyg_io_set_config): Only dereference len if non-NULL
+ (cyg_io_get_config): Ditto
+ (cyg_io_read): Ditto
+ (cyg_io_write): Ditto
+ Fix for PR 19856
+
+1999-04-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/ioinit.cxx: Use new device IO init priority.
+
+ * src/io_diag.c: [added]
+ * include/io_diag.h: [added]
+ * src/PKGconf.mak:
+ Added io_diag functionality.
+
+1999-03-18 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/config_keys.h (CYG_IO_GET_CONFIG_SERIAL_ABORT):
+ New funtion which aborts (cancels) any pending I/O on a channel.
+
+1999-03-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/io.h: Add 'CYGDBG_IO_INIT' for control of
+ init messages.
+
+1999-03-10 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/io.h: Improve CDL description.
+
+1999-03-05 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/io.h:
+ Changed include files used to permit non-kernel configurations to
+ be built.
+
+1999-02-25 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * serial/current/src/common/tty.c (tty_set_config):
+ Fix problem when passing through to lower level driver.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/io/common/current/cdl/io.cdl b/cesar/ecos/packages/io/common/current/cdl/io.cdl
new file mode 100644
index 0000000000..bbecef2aa6
--- /dev/null
+++ b/cesar/ecos/packages/io/common/current/cdl/io.cdl
@@ -0,0 +1,92 @@
+# ====================================================================
+#
+# io.cdl
+#
+# eCos IO configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: gthomas
+# Contributors:
+# Date: 1999-07-07
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_IO {
+ display "I/O sub-system"
+ doc ref/io.html
+ include_dir cyg/io
+ requires CYGPKG_ERROR
+ description "
+ The eCos system is supplied with a number of different
+ device drivers. This option enables the basic I/O system
+ support which is the basis for all drivers."
+
+ compile -library=libextras.a ioinit.cxx
+ compile iosys.c
+
+
+ cdl_option CYGDBG_IO_INIT {
+ display "Debug I/O sub-system"
+ default_value 0
+ description "
+ This option enables verbose messages to be displayed on the
+ system 'diag' device during I/O system initialization."
+ }
+
+ cdl_component CYGPKG_IO_FILE_SUPPORT {
+ display "Basic support for file based I/O"
+ active_if !CYGPKG_IO_FILEIO
+ default_value 1
+ description "
+ This option control support for simple file I/O primitives. It is only
+ present if the FILEIO package is not included."
+
+ compile io_file.c
+
+ cdl_option CYGPKG_IO_NFILE {
+ display "Number of open files"
+ flavor data
+ default_value 16
+ description "
+ This option controls the number of open files."
+ }
+ }
+}
diff --git a/cesar/ecos/packages/io/common/current/doc/io.sgml b/cesar/ecos/packages/io/common/current/doc/io.sgml
new file mode 100644
index 0000000000..b3c809803f
--- /dev/null
+++ b/cesar/ecos/packages/io/common/current/doc/io.sgml
@@ -0,0 +1,4050 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- io.sgml -->
+<!-- -->
+<!-- Generic I/O subsystem documentation -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<PART id="io">
+<TITLE>I/O Package (Device Drivers)</TITLE>
+
+<!-- {{{ Intro -->
+
+<CHAPTER id="io-package-intro">
+<TITLE>Introduction</TITLE>
+
+<PARA>
+The I/O package is designed as a general purpose framework for
+supporting device drivers. This includes all classes of
+drivers from simple serial to networking stacks and beyond.
+</PARA>
+
+<PARA>
+Components of the I/O package, such as device drivers, are
+configured into the system just like all other components.
+Additionally, end users may add their own drivers to this set.
+</PARA>
+
+<PARA>
+While the set of drivers (and the devices they represent) may be
+considered static, they must be accessed via an opaque
+&ldquo;handle&rdquo;. Each device in the system has a unique name and
+the <FUNCTION>cyg_io_lookup()</FUNCTION> function is used to map that
+name onto the handle for the device. This &ldquo;hiding&rdquo; of the
+device implementation allows for generic, named devices, as well as
+more flexibility. Also, the <FUNCTION>cyg_io_lookup()</FUNCTION>
+function provides drivers the opportunity to initialize the device
+when usage actually starts.
+</PARA>
+
+<PARA>
+All devices have a name. The standard provided devices use names such
+as <filename>&ldquo;/dev/console&rdquo;</filename> and
+<filename>&ldquo;/dev/serial0&rdquo;</filename>, where the
+<filename>&ldquo;/dev/&rdquo;</filename> prefix indicates that this is
+the name of a device.
+</PARA>
+
+<PARA>The entire I/O package API, as well as the standard
+set of provided drivers, is written in C. </PARA>
+
+<PARA>Basic functions are provided to send data to and receive data
+from a device. The details of how this is done is left to the device [class] itself.
+For example, writing data to a block device like a disk drive may
+have different semantics than writing to a serial port. </PARA>
+
+<PARA>Additional functions are provided to manipulate the state
+of the driver and/or the actual device. These functions
+are, by design, quite specific to the actual driver. </PARA>
+
+<PARA>This driver model supports layering; in other words, a device
+may actually be created &ldquo;on top of&rdquo; another device.
+For example, the &ldquo;tty&rdquo; (terminal-like) devices are
+built on top of simple serial devices. The upper layer then has
+the flexibility to add features and functions not found at the lower
+layers. In this case the &ldquo;tty&rdquo; device provides
+for line buffering and editing not available from the simple serial
+drivers.
+</PARA>
+
+<PARA>Some drivers will support visibility of the layers they depend
+upon. The &ldquo;tty&rdquo; driver allows information about
+the actual serial device to be manipulated by passing get/set
+config calls that use a serial driver &ldquo;key&rdquo; down
+to the serial driver itself. </PARA>
+
+</CHAPTER>
+
+<!-- }}} -->
+<!-- {{{ User API -->
+
+<CHAPTER id="io-user-api">
+<TITLE><!-- <index></index> -->User API</TITLE>
+
+<PARA>
+All functions, except <FUNCTION>cyg_io_lookup()</FUNCTION>
+require an I/O &ldquo;<!-- <index></index> -->handle&rdquo;.
+</PARA>
+
+<PARA>
+All functions return a value of the type <type>Cyg_ErrNo</type>. If an
+error condition is detected, this value will be negative and the
+absolute value indicates the actual error, as specified in
+<filename>cyg/error/codes.h</filename>. The only other legal return
+value will be <varname>ENOERR</varname>. All other function arguments
+are pointers (references). This allows the drivers to pass information
+efficiently, both into and out of the driver. The most striking
+example of this is the &ldquo;length&rdquo; value passed to the read
+and write functions. This parameter contains the desired length of
+data on input to the function and the actual transferred length on
+return.
+</PARA>
+
+<PROGRAMLISTING>
+// Lookup a device and return its handle
+ Cyg_ErrNo <FUNCTION><!-- <index></index> -->cyg_io_lookup</function>(
+ const char <parameter>*name</parameter>,
+ cyg_io_handle_t <parameter>*handle</parameter> )
+</PROGRAMLISTING>
+
+<PARA>
+This function maps a device name onto an appropriate handle. If the
+named device is not in the system, then the error
+<varname>-ENOENT</varname> is returned. If the device is found, then
+the handle for the device is returned by way of the handle pointer
+<parameter>*handle</parameter>.
+</PARA>
+
+<PROGRAMLISTING>
+// Write data to a device
+Cyg_ErrNo <FUNCTION><!-- <index></index> -->cyg_io_write</function>(
+ cyg_io_handle_t <parameter>handle</parameter>,
+ const void <parameter>*buf</parameter>,
+ cyg_uint32 <parameter>*len</parameter> )
+</PROGRAMLISTING>
+
+<PARA>
+This function sends data to a device. The size of data to send is
+contained in <parameter>*len</parameter> and the actual size sent will
+be returned in the same place.
+</PARA>
+
+<PROGRAMLISTING>
+// Read data from a device
+Cyg_ErrNo <!-- <index></index> --><function>cyg_io_read</function>(
+ cyg_io_handle_t <parameter>handle</parameter>,
+ void <parameter>*buf</parameter>,
+ cyg_uint32 <parameter>*len</parameter> )
+</PROGRAMLISTING>
+
+<PARA>
+This function receives data from a device. The desired size of data to
+receive is contained in <parameter>*len</parameter> and the actual
+size obtained will be returned in the same place.
+</PARA>
+
+<PROGRAMLISTING>
+// Get the configuration of a device
+Cyg_ErrNo <FUNCTION><!-- <index></index> -->cyg_io_get_config</FUNCTION>(
+ cyg_io_handle_t <parameter>handle</parameter>,
+ cyg_uint32 <parameter>key</parameter>,
+ void *<parameter>buf</parameter>,
+ cyg_uint32 *<parameter>len</parameter> )
+</PROGRAMLISTING>
+
+<PARA>
+This function is used to obtain run-time configuration about a
+device. The type of information retrieved is specified by the
+<parameter>key</parameter>. The data will be returned in the given
+buffer. The value of <parameter>*len</parameter> should contain the
+amount of data requested, which must be at least as large as the size
+appropriate to the selected key. The actual size of data retrieved is
+placed in <parameter> *len</parameter>. The appropriate key values
+differ for each driver and are all listed in the file
+<filename>&lt;cyg/io/config_keys.h&gt;</filename>.
+</PARA>
+
+<PROGRAMLISTING>
+// Change the configuration of a device
+Cyg_ErrNo <!-- <index></index> --><function>cyg_io_set_config</function>(
+ cyg_io_handle_t <parameter>handle</parameter>,
+ cyg_uint32 <parameter>key</parameter>,
+ const void <parameter>*buf</parameter>,
+ cyg_uint32 <parameter>*len</parameter> )
+</PROGRAMLISTING>
+
+<PARA>
+This function is used to manipulate or change the run-time
+configuration of a device. The type of information is specified by the
+<parameter>key</parameter>. The data will be obtained from the given
+buffer. The value of <parameter>*len</parameter> should contain the
+amount of data provided, which must match the size appropriate to the
+selected key. The appropriate key values differ for each driver and
+are all listed in the file
+<filename>&lt;cyg/io/config_keys.h&gt;</filename>.
+</PARA>
+
+</CHAPTER>
+
+<!-- }}} -->
+<!-- {{{ Serial Drivers -->
+
+<CHAPTER id="io-serial-driver-details">
+<TITLE>Serial driver details</TITLE>
+
+<PARA>
+Two different classes of serial drivers are provided as a standard
+part of the eCos system. These are described as &ldquo;raw
+serial&rdquo; (serial) and &ldquo;tty-like&rdquo; (tty).
+</PARA>
+
+<!-- {{{ Raw Serial Drivers -->
+
+<SECTION id="io-simple-serial-driver">
+<TITLE>Raw Serial Driver</TITLE>
+
+<PARA>
+Use the include file <FILENAME>&lt;cyg/io/serialio.h&gt;</FILENAME> for
+this driver.
+</PARA>
+
+<PARA>
+The <!-- <index></index> -->raw serial driver is capable of sending
+and receiving blocks of raw data to a serial device. Controls are
+provided to configure the actual hardware, but there is no manipulation
+of the data by this driver.
+</PARA>
+
+<PARA>
+There may be many instances of this driver in a given system,
+one for each serial channel. Each channel corresponds to a physical
+device and there will typically be a device module created for this
+purpose. The device modules themselves are configurable, allowing
+specification of the actual hardware details, as well as such details
+as whether the channel should be buffered by the serial driver,
+etc.
+</PARA>
+
+<!-- {{{ Runtime Configuration -->
+
+<SECTION>
+<TITLE>Runtime Configuration</TITLE>
+
+<para>
+Runtime configuration is achieved by exchanging data structures with
+the driver via the <function>cyg_io_set_config()</function> and
+<function>cyg_io_get_config()</function> functions.
+</para>
+
+<PROGRAMLISTING>
+typedef struct {
+ cyg_serial_baud_rate_t baud;
+ cyg_serial_stop_bits_t stop;
+ cyg_serial_parity_t parity;
+ cyg_serial_word_length_t word_length;
+ cyg_uint32 flags;
+} cyg_serial_info_t;
+</PROGRAMLISTING>
+
+<PARA>
+The field <structfield><!-- <index></index>
+-->word_length</structfield> contains the number of data bits per word
+(character). This must be one of the values:
+</PARA>
+
+<PROGRAMLISTING>
+ CYGNUM_SERIAL_WORD_LENGTH_5
+ CYGNUM_SERIAL_WORD_LENGTH_6
+ CYGNUM_SERIAL_WORD_LENGTH_7
+ CYGNUM_SERIAL_WORD_LENGTH_8
+</PROGRAMLISTING>
+
+<PARA>
+The field <structfield><!-- <index></index>
+-->baud</structfield> contains a baud rate selection. This must be
+one of the values:
+</PARA>
+
+<PROGRAMLISTING>
+ CYGNUM_SERIAL_BAUD_50
+ CYGNUM_SERIAL_BAUD_75
+ CYGNUM_SERIAL_BAUD_110
+ CYGNUM_SERIAL_BAUD_134_5
+ CYGNUM_SERIAL_BAUD_150
+ CYGNUM_SERIAL_BAUD_200
+ CYGNUM_SERIAL_BAUD_300
+ CYGNUM_SERIAL_BAUD_600
+ CYGNUM_SERIAL_BAUD_1200
+ CYGNUM_SERIAL_BAUD_1800
+ CYGNUM_SERIAL_BAUD_2400
+ CYGNUM_SERIAL_BAUD_3600
+ CYGNUM_SERIAL_BAUD_4800
+ CYGNUM_SERIAL_BAUD_7200
+ CYGNUM_SERIAL_BAUD_9600
+ CYGNUM_SERIAL_BAUD_14400
+ CYGNUM_SERIAL_BAUD_19200
+ CYGNUM_SERIAL_BAUD_38400
+ CYGNUM_SERIAL_BAUD_57600
+ CYGNUM_SERIAL_BAUD_115200
+ CYGNUM_SERIAL_BAUD_234000
+</PROGRAMLISTING>
+
+<PARA>The field <structfield><!-- <index></index>
+-->stop</structfield> contains the number of stop bits. This must be
+one of the values:</PARA>
+
+<PROGRAMLISTING>
+ CYGNUM_SERIAL_STOP_1
+ CYGNUM_SERIAL_STOP_1_5
+ CYGNUM_SERIAL_STOP_2
+</PROGRAMLISTING>
+
+<NOTE>
+<title>Note</title>
+<PARA>
+On most hardware, a selection of 1.5 stop bits is only valid
+if the word (character) length is 5.
+</PARA>
+</NOTE>
+
+<PARA>The field <structfield><!-- <index></index>
+-->parity</structfield> contains the parity mode. This must be one of
+the values: </PARA>
+
+<PROGRAMLISTING>
+ CYGNUM_SERIAL_PARITY_NONE
+ CYGNUM_SERIAL_PARITY_EVEN
+ CYGNUM_SERIAL_PARITY_ODD
+ CYGNUM_SERIAL_PARITY_MARK
+ CYGNUM_SERIAL_PARITY_SPACE
+</PROGRAMLISTING>
+
+<PARA>The field <structfield><!-- <index></index>
+-->flags</structfield> is a bitmask which controls the behavior of the
+serial device driver. It should be built from the values
+<literal>CYG_SERIAL_FLAGS_xxx</literal> defined below:
+</PARA>
+
+<PROGRAMLISTING>
+#define CYG_SERIAL_FLAGS_RTSCTS 0x0001
+</PROGRAMLISTING>
+
+<PARA>If this bit is set then the port is placed in &ldquo;hardware
+handshake&rdquo; mode. In this mode, the CTS and RTS pins control
+when data is allowed to be sent/received at the port. This
+bit is ignored if the hardware does not support this level of
+handshake.
+</PARA>
+
+<PROGRAMLISTING>
+typedef struct {
+ cyg_int32 rx_bufsize;
+ cyg_int32 rx_count;
+ cyg_int32 tx_bufsize;
+ cyg_int32 tx_count;
+} cyg_serial_buf_info_t;
+</PROGRAMLISTING>
+
+<PARA>The field <structfield>rx_bufsize</structfield> contains
+the total size of the incoming data buffer. This is set to zero on
+devices that do not support buffering (i.e. polled devices).</PARA>
+
+<PARA>The field <structfield>rx_count</structfield> contains the
+number of bytes currently occupied in the incoming data buffer.
+This is set to zero on devices that do not support buffering (i.e. polled
+devices).</PARA>
+
+<PARA>The field <structfield>tx_bufsize</structfield> contains the
+total size of the transmit data buffer. This is set to zero on devices
+that do not support buffering (i.e. polled devices).</PARA>
+
+<PARA>The field <structfield>tx_count</structfield> contains the
+number of bytes currently occupied in the transmit data buffer. This
+is set to zero on devices that do not support buffering (i.e. polled
+devices).</PARA>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ API Details -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->API Details</TITLE>
+
+<!-- {{{ cyg_io_write -->
+
+<section id="io-serial-cyg-io-write">
+<title>cyg_io_write</title>
+
+<PROGRAMLISTING>
+cyg_io_write(handle, buf, len)
+</PROGRAMLISTING>
+
+<PARA>
+Send the data from <parameter>buf</parameter> to the device. The
+driver maintains a buffer to hold the data. The size of the
+intermediate buffer is configurable within the interface module. The
+data is not modified at all while it is being buffered. On return,
+<parameter>*len</parameter> contains the amount of characters actually
+consumed .</PARA>
+
+<PARA>
+It is possible to configure the write call to be blocking
+(default) or non-blocking. Non-blocking mode requires both the configuration
+option <literal>CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING</literal>
+to be enabled, and the specific device to be set to non-blocking
+mode for writes (see <function>cyg_io_set_config()</function>).
+</para>
+
+<para>
+In blocking mode, the call will not return until there is space in the
+buffer and the entire contents of <parameter>buf</parameter> have been
+consumed.
+</PARA>
+
+<PARA>
+In non-blocking mode, as much as possible gets consumed from
+<parameter>buf</parameter>. If everything was consumed, the call
+returns <literal>ENOERR</literal>. If only part of the
+<parameter>buf</parameter> contents was consumed,
+<literal>-EAGAIN</literal> is returned and the caller must try
+again. On return, <parameter>*len</parameter> contains the number of characters actually
+consumed .</PARA>
+
+<PARA>
+The call can also return <literal>-EINTR</literal> if interrupted
+via the <function>cyg_io_get_config()</function>/<literal>ABORT</literal> key.
+</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ cyg_io_read -->
+
+<section id="io-serial-cyg-io-read">
+<title>cyg_io_read</title>
+
+<programlisting>
+cyg_io_read(handle, buf, len)
+</programlisting>
+
+<PARA>
+Receive data into the buffer, <parameter>buf</parameter>, from the
+device. No manipulation of the data is performed before being
+transferred. An interrupt driven interface module will support data
+arriving when no read is pending by buffering the data in the serial
+driver. Again, this buffering is completely configurable. On return,
+<parameter>*len</parameter> contains the number of characters actually
+received.</PARA>
+
+<PARA>
+It is possible to configure the read call to be blocking (default)
+or non-blocking. Non-blocking mode requires both the configuration
+option <literal>CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING</literal>
+to be enabled, and the specific device to be set to non-blocking
+mode for reads (see <function>cyg_io_set_config()</function>).
+</PARA>
+
+<PARA>
+In blocking mode, the call will not return until the requested
+amount of data has been read.</PARA>
+
+<PARA>
+In non-blocking mode, data waiting in the device buffer is copied to
+<parameter>buf</parameter>, and the call returns immediately. If there
+was enough data in the buffer to fulfill the request,
+<literal>ENOERR</literal> is returned. If only part of the request
+could be fulfilled, <literal>-EAGAIN</literal> is returned and the
+caller must try again. On return, <parameter>*len</parameter> contains
+the number of characters actually received.</PARA>
+
+<PARA>
+The call can also return <literal>-EINTR</literal> if interrupted via
+the <function>cyg_io_get_config()</function>/<literal>ABORT</literal>
+key.
+</PARA>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ cyg_io_get_config -->
+
+<section id="io-serial-cyg-get-config">
+<title>cyg_io_get_config</title>
+
+<PROGRAMLISTING>
+cyg_io_get_config(handle, key, buf, len)
+</PROGRAMLISTING>
+
+<PARA>This function returns current [runtime] information
+about the device and/or driver. </PARA>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM><literal>CYG_IO_GET_CONFIG_SERIAL_INFO</literal></TERM>
+ <LISTITEM>
+ <variablelist>
+ <VARLISTENTRY>
+ <TERM>Buf type:</TERM>
+ <LISTITEM>
+ <PARA>cyg_serial_info_t</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <PARA>
+ This function retrieves the current state of the driver
+ and hardware. This information contains fields for
+ hardware baud rate, number of stop bits, and parity
+ mode. It also includes a set of flags that control the
+ port, such as hardware flow control.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ </variablelist>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM><literal>CYG_IO_GET_CONFIG_SERIAL_BUFFER_INFO</literal></TERM>
+ <LISTITEM>
+ <variablelist>
+ <VARLISTENTRY>
+ <TERM>Buf type:</TERM>
+ <LISTITEM>
+ <PARA>cyg_serial_buf_info_t</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <PARA>
+ This function retrieves the current state of the
+ software buffers in the serial drivers. For both
+ receive and transmit buffers it returns the total
+ buffer size and the current number of bytes occupied in
+ the buffer. It does not take into account any buffering
+ such as FIFOs or holding registers that the serial
+ device itself may have.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ </variablelist>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM><literal>CYG_IO_GET_CONFIG_SERIAL_OUTPUT_DRAIN</literal></TERM>
+ <LISTITEM>
+ <variablelist>
+ <VARLISTENTRY>
+ <TERM>Buf type:</TERM>
+ <LISTITEM>
+ <PARA>void *</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <PARA>
+ This function waits for any buffered output to
+ complete. This function only completes when there is no
+ more data remaining to be sent to the device.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ </variablelist>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM><literal>CYG_IO_GET_CONFIG_SERIAL_OUTPUT_FLUSH</literal></TERM>
+ <LISTITEM>
+ <variablelist>
+ <VARLISTENTRY>
+ <TERM>Buf type:</TERM>
+ <LISTITEM>
+ <PARA>void *</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <PARA>
+ This function discards any buffered output for the
+ device.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ </variablelist>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM><literal>CYG_IO_GET_CONFIG_SERIAL_INPUT_DRAIN</literal></term>
+ <LISTITEM>
+ <variablelist>
+ <VARLISTENTRY>
+ <TERM>Buf type:</TERM>
+ <LISTITEM>
+ <PARA>void *</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <PARA>This function discards any buffered input for the
+ device.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ </variablelist>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM><literal>CYG_IO_GET_CONFIG_SERIAL_ABORT</literal></TERM>
+ <LISTITEM>
+ <variablelist>
+ <VARLISTENTRY>
+ <TERM>Buf type:</TERM>
+ <LISTITEM>
+ <PARA> void*</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <PARA>This function will cause any pending read or write calls on
+ this device to return with <literal>-EABORT</literal>.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ </variablelist>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM><literal>CYG_IO_GET_CONFIG_SERIAL_READ_BLOCKING</literal></TERM>
+ <LISTITEM>
+ <variablelist>
+ <VARLISTENTRY>
+ <TERM>Buf type:</TERM>
+ <LISTITEM>
+ <PARA> cyg_uint32 (values 0 or 1)</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <PARA>This function will read back the blocking-mode
+ setting for read calls on this device. This call is only
+ available if the configuration option
+ <literal>CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING</literal> is
+ enabled.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ </variablelist>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM><literal>CYG_IO_GET_CONFIG_SERIAL_WRITE_BLOCKING</literal></TERM>
+ <LISTITEM>
+ <variablelist>
+ <VARLISTENTRY>
+ <TERM>Buf type:</TERM>
+ <LISTITEM>
+ <PARA> cyg_uint32 (values 0 or 1)</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <PARA>
+ This function will read back the blocking-mode
+ setting for write calls on this device. This call is only
+ available if the configuration option
+ <literal>CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING</literal> is enabled.</PARA>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ cyg_io_set_config -->
+
+<section id="io-serial-cyg-set-config">
+<title>cyg_io_set_config</title>
+
+<PROGRAMLISTING>
+cyg_io_set_config(handle, key, buf,len)
+</PROGRAMLISTING>
+
+<PARA>This function is used to update or change runtime configuration
+of a port. </PARA>
+
+<variablelist>
+ <VARLISTENTRY>
+ <TERM><literal>CYG_IO_SET_CONFIG_SERIAL_INFO</literal></TERM>
+ <LISTITEM>
+ <variablelist>
+ <VARLISTENTRY>
+ <TERM>Buf type:</TERM>
+ <LISTITEM>
+ <PARA>cyg_serial_info_t</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <PARA>This function updates the information for the driver
+ and hardware. The information contains fields for
+ hardware baud rate, number of stop bits, and parity
+ mode. It also includes a set of flags that control the
+ port, such as hardware flow control.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ </variablelist>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM><literal>CYG_IO_SET_CONFIG_SERIAL_READ_BLOCKING</literal></TERM>
+ <LISTITEM>
+ <variablelist>
+ <VARLISTENTRY>
+ <TERM>Buf type:</TERM>
+ <LISTITEM>
+ <PARA> cyg_uint32 (values 0 or 1)</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <PARA>This function will set the blocking-mode for read
+ calls on this device. This call is only available if the
+ configuration option <literal>CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING</literal>
+ is enabled.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ </variablelist>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM><literal>CYG_IO_SET_CONFIG_SERIAL_WRITE_BLOCKING</literal></TERM>
+ <LISTITEM>
+ <variablelist>
+ <VARLISTENTRY>
+ <TERM>Buf type:</TERM>
+ <LISTITEM>
+ <PARA>cyg_uint32 (values 0 or 1)</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <PARA>This function will set the blocking-mode for write
+ calls on this device. This call is only available if the
+ configuration option <literal>CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING</literal>
+ is enabled.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ </variablelist>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</section>
+
+<!-- }}} -->
+
+</SECTION>
+
+<!-- }}} -->
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ TTY Drivers -->
+
+<SECTION id="io-tty-driver">
+<TITLE> TTY driver</TITLE>
+
+<PARA>
+Use the include file <filename>&lt;cyg/io/ttyio.h&gt;</filename> for
+this driver.
+</PARA>
+
+<PARA>
+This <!-- <index></index> -->driver is built on top of the simple
+serial driver and is typically used for a device that interfaces with
+humans such as a terminal. It provides some minimal formatting of data
+on output and allows for line-oriented editing on input.
+</PARA>
+
+<!-- {{{ Runtime Configuration -->
+
+<SECTION>
+<TITLE>Runtime configuration</TITLE>
+
+<para>
+Runtime configuration is achieved by exchanging data structures with
+the driver via the <function>cyg_io_set_config()</function> and
+<function>cyg_io_get_config()</function> functions.
+</para>
+
+
+<PROGRAMLISTING>
+typedef struct {
+ cyg_uint32 tty_out_flags;
+ cyg_uint32 tty_in_flags;
+} cyg_tty_info_t;
+</PROGRAMLISTING>
+
+<PARA>The field <structfield><!-- <index></index> -->tty_out_flags</structfield>
+is used to control what happens to data as it is send to the serial
+port. It contains a bitmap comprised of the bits as defined by the
+<literal>CYG_TTY_OUT_FLAGS_xxx</literal> values below. </PARA>
+
+<PROGRAMLISTING>
+#define CYG_TTY_OUT_FLAGS_CRLF 0x0001 // Map '\n' =&gt; '\r\n' on output
+</PROGRAMLISTING>
+
+<PARA>If this bit is set in <structfield>tty_out_flags</structfield>,
+any occurrence of the character &quot;\n&quot; will
+be replaced by the sequence &quot;\r\n&quot; before
+being sent to the device.</PARA>
+
+<PARA>The field <structfield><!-- <index></index> -->tty_in_flags</structfield>
+is used to control how data is handled as it comes from the serial
+port. It contains a bitmap comprised of the bits as defined by the
+<literal>CYG_TTY_IN_FLAGS_xxx</literal> values below. </PARA>
+
+<PROGRAMLISTING>
+#define CYG_TTY_IN_FLAGS_CR 0x0001 // Map '\r' =&gt; '\n' on input
+</PROGRAMLISTING>
+
+<PARA>If this bit is set in <structfield>tty_in_flags</structfield>, the
+character &quot;\r&quot; (&ldquo;return&rdquo; or &ldquo;enter&rdquo; on
+most keyboards) will be mapped to &quot;\n&quot;.</PARA>
+
+<PROGRAMLISTING>
+#define CYG_TTY_IN_FLAGS_CRLF 0x0002 // Map '\r\n' =&gt; '\n' on input
+</PROGRAMLISTING>
+
+<PARA>
+If this bit is set in <structfield>tty_in_flags</structfield>, the
+character sequence &quot;\r\n&quot; (often sent by DOS/Windows
+based terminals) will be mapped to &quot;\n&quot;. </PARA>
+
+<PROGRAMLISTING>
+#define CYG_TTY_IN_FLAGS_ECHO 0x0004 // Echo characters as processed
+</PROGRAMLISTING>
+
+<PARA>
+If this bit is set in <structfield>tty_in_flags</structfield>, characters
+will be echoed back to the serial port as they are processed. </PARA>
+
+<PROGRAMLISTING>
+#define CYG_TTY_IN_FLAGS_BINARY 0x0008 // No input processing
+</PROGRAMLISTING>
+
+<PARA>If this bit is set in <structfield>tty_in_flags</structfield>, the
+input will not be manipulated in any way before being placed in
+the user&rsquo;s buffer. </PARA>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ API Details -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->API details</TITLE>
+
+<PROGRAMLISTING>
+cyg_io_read(handle, buf, len)
+</PROGRAMLISTING>
+
+<PARA>This function is used to read data from the device. In the
+default case, data is read until an end-of-line character ("\n"
+or "\r") is read. Additionally, the characters are echoed
+back to the [terminal] device. Minimal editing
+of the input is also supported. </PARA>
+
+<NOTE>
+<PARA>When connecting to a remote target via GDB it is not possible
+to provide console input while GDB is connected. The GDB remote
+protocol does not support input. Users must disconnect from GDB
+if this functionality is required.</PARA>
+</NOTE>
+
+<PROGRAMLISTING>
+cyg_io_write(handle, buf, len)
+</PROGRAMLISTING>
+
+<PARA>This function is used to send data to the device. In the default
+case, the end-of-line character "\n" is replaced by the
+sequence "\r\n". </PARA>
+
+<PROGRAMLISTING>
+cyg_io_get_config(handle, key, buf, len)
+</PROGRAMLISTING>
+
+<PARA>This function is used to get information about the channel&rsquo;s
+configuration at runtime. </PARA>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM><literal>CYG_IO_GET_CONFIG_TTY_INFO</literal></TERM>
+ <LISTITEM>
+ <variablelist>
+ <VARLISTENTRY>
+ <TERM>Buf type:</TERM>
+ <LISTITEM>
+ <PARA>cyg_tty_info_t</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <PARA>This function retrieves the current state of the
+ driver.
+ </PARA>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<PARA>Serial driver keys (see above) may also be specified
+in which case the call is passed directly to the serial
+driver. </PARA>
+
+<PROGRAMLISTING>
+cyg_io_set_config(handle, key, buf, len)
+</PROGRAMLISTING>
+
+<PARA>This function is used to modify the channel&rsquo;s configuration
+at runtime. </PARA>
+
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM><literal>CYG_IO_SET_CONFIG_TTY_INFO</literal></term>
+ <LISTITEM>
+ <VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Buf type:</TERM>
+ <LISTITEM>
+ <PARA>cyg_tty_info_t</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <PARA>This function changes the current state of the
+ driver.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ </variablelist>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+<PARA>Serial driver
+keys (see above) may also be specified in which case the
+call is passed directly to the serial driver. </PARA>
+
+</SECTION>
+
+<!-- }}} -->
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ DSP Driver -->
+
+
+<!-- }}} -->
+
+</CHAPTER>
+
+<!-- }}} -->
+<!-- {{{ How to Write a Driver -->
+
+<CHAPTER id="io-how-to-write-a-driver">
+<TITLE>How to Write a Driver</TITLE>
+
+<!-- {{{ Intro -->
+
+<PARA>
+A <!-- <index></index> -->device driver is nothing more than a
+named entity that supports the basic I/O functions - read, write, get
+config, and set config. Typically a device driver also uses and
+manages interrupts from the device. While the interface is generic and
+device driver independent, the actual driver implementation is
+completely up to the device driver designer. </PARA>
+
+<PARA>That said, the reason for using a device driver is to provide
+access to a device from application code in as general purpose a
+fashion as reasonable. Most driver writers are also concerned with
+making this access as simple as possible while being as efficient
+as possible. </PARA>
+
+<PARA>Most device drivers are concerned with the movement of information,
+for example data bytes along a serial interface, or packets in a
+network. In order to make the most efficient use of system resources,
+interrupts are used. This will allow other application processing
+to take place while the data transfers are under way, with interrupts
+used to indicate when various events have occurred. For example,
+a serial port typically generates an interrupt after a character
+has been sent &ldquo;down the wire&rdquo; and the interface
+is ready for another. It makes sense to allow further application
+processing while the data is being sent since this can take quite
+a long time. The interrupt can be used to allow the driver to send
+a character as soon as the current one is complete, without any
+active participation by the application code. </PARA>
+
+<PARA>The main building blocks for device drivers are found in the
+include file: <filename>&lt;cyg/io/devtab.h&gt;</filename></PARA>
+
+<PARA>All device drivers in <EMPHASIS>eCos</EMPHASIS> are described
+by a device table entry, using the <type>cyg_devtab_entry_t</type> type.
+The entry should be created using the <FUNCTION>DEVTAB_ENTRY()</FUNCTION> macro,
+like this:</PARA>
+
+<PROGRAMLISTING><function>
+DEVTAB_ENTRY</function>(l, name, dep_name, handlers, init, lookup, priv)
+</PROGRAMLISTING>
+
+<variablelist>
+<title>Arguments</title>
+ <varlistentry>
+ <term><parameter>l</parameter></term>
+ <listitem><para>The "C" label for this device table entry.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>name</parameter></term>
+ <listitem><para>The "C" string name for the device.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>dep_name</parameter></term>
+ <listitem><para>For a layered device, the "C" string name of the
+ device this device is built upon.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>handlers</parameter></term>
+ <listitem><para>A pointer to the I/O function "handlers" (see below).</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>init</parameter></term>
+ <listitem><para>A function called when eCos is initialized. This
+ function can query the device, setup hardware, etc.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>lookup</parameter></term>
+ <listitem><para>A function called when <function>cyg_io_lookup()</function> is called
+ for this device. </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>priv</parameter></term>
+ <listitem><para>A placeholder for any device specific data
+ required by the driver.</para></listitem>
+ </varlistentry>
+</variablelist>
+
+<PARA>The interface to the driver is through the <structfield><!--
+<index></index> -->handlers</structfield> field. This is a pointer to
+a set of functions which implement the various <function>cyg_io_XXX()</function>
+routines. This table is defined by the macro:</PARA>
+
+
+<PROGRAMLISTING>
+DEVIO_TABLE(l, write, read, get_config, set_config)
+</PROGRAMLISTING>
+
+<variablelist>
+<title>Arguments</title>
+ <varlistentry>
+ <term><parameter>l</parameter></term>
+ <listitem><para>The "C" label for this table of handlers.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>write</term>
+ <listitem><para>The function called as a result of
+ <function>cyg_io_write()</function>.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>read</term>
+ <listitem><para>The function called as a result of
+ <function>cyg_io_read()</function>. </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>get_config</term>
+ <listitem><para>The function called as a result of
+ <function>cyg_io_get_config()</function>.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>set_config</term>
+ <listitem><para>The function called as a result of
+ <function>cyg_io_set_config()</function>. </para></listitem>
+ </varlistentry>
+</variablelist>
+
+<PARA>
+When <EMPHASIS>eCos</EMPHASIS> is initialized (sometimes called
+&ldquo;boot&rdquo; time), the <function>init()</function> function is called
+for all devices in the system. The <function>init()</function> function is
+allowed to return an error in which case the device will be placed
+&ldquo;off line&rdquo; and all I/O requests to that device will be
+considered in error.
+</PARA>
+
+<PARA>
+The <function>lookup()</function> function is called whenever
+the <FUNCTION>cyg_io_lookup()</FUNCTION> function
+is called with this device name. The lookup function may cause the device
+to come &ldquo;on line&rdquo; which would then allow I/O
+operations to proceed. Future versions of the I/O system
+will allow for other states, including power saving modes,
+etc.
+</PARA>
+
+<!-- }}} -->
+<!-- {{{ How to Write a Serial Hardware Interface Driver -->
+
+<SECTION id="io-how-to-write-serial-interface-driver">
+<TITLE>How to Write a Serial Hardware Interface Driver</TITLE>
+
+
+<PARA>The standard serial driver supplied with
+<EMPHASIS>eCos</EMPHASIS> is structured as a hardware independent
+portion and a hardware dependent interface module. To add support for
+a new serial port, the user should be able to use the existing
+hardware independent portion and just add their own <!--
+<index></index> -->interface driver which handles the details of the
+actual device. The user should have no need to change the hardware
+independent portion. </PARA>
+
+<PARA>The interfaces used by the serial driver and serial implementation
+modules are contained in the file <filename>&lt;cyg/io/serial.h&gt;</filename>
+</PARA>
+
+<NOTE>
+<PARA>In the sections below we use the notation &lt;&lt;xx&gt;&gt; to
+mean a module specific value, referred to as &ldquo;xx&rdquo; below.</PARA>
+</NOTE>
+
+<!-- {{{ DevTab Entry -->
+
+<section>
+<title>DevTab Entry</title>
+
+<PARA>The interface module contains the devtab entry (or entries
+if a single module supports more than one interface). This entry
+should have the form: </PARA>
+
+<PROGRAMLISTING>
+DEVTAB_ENTRY(&lt;&lt;module_name&gt;&gt;,
+ &lt;&lt;device_name&gt;&gt;,
+ 0,
+ &amp;serial_devio,
+ &lt;&lt;module_init&gt;&gt;,
+ &lt;&lt;module_lookup&gt;&gt;,
+ &amp;&lt;&lt;serial_channel&gt;&gt;
+ );
+</PROGRAMLISTING>
+
+<variablelist>
+<title>Arguments</title>
+ <varlistentry>
+ <term><parameter>module_name</parameter></term>
+ <listitem><para>The "C" label for this devtab entry</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>device_name</parameter></term>
+ <listitem><para>The "C" string for the
+ device. E.g. <filename>/dev/serial0</filename>.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>serial_devio</parameter></term>
+ <listitem><para>The table of I/O functions. This set is defined in
+ the hardware independent serial driver and should be used.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>module_init</parameter></term>
+ <listitem><para>The module initialization function.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>module_lookup</parameter></term>
+ <listitem><para>The device lookup function. This function
+ typically sets up the device for actual use, turning on
+ interrupts, configuring the port, etc.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>serial_channel</parameter></term>
+ <listitem><para>This table (defined below) contains the interface
+ between the interface module and the serial driver proper.</para></listitem>
+ </varlistentry>
+</variablelist>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Serial Channel Structure -->
+
+<section>
+<title>Serial Channel Structure</title>
+
+<PARA>Each serial device must have a &ldquo;serial channel&rdquo;.
+This is a set of data which describes all operations on the device.
+It also contains buffers, etc., if the device is to be buffered.
+The serial channel is created by the macro: </PARA>
+
+<PROGRAMLISTING>
+SERIAL_CHANNEL_USING_INTERRUPTS(l, funs, dev_priv, baud,stop, parity, word_length,
+ flags, out_buf, out_buflen, in_buf, in_buflen)
+</PROGRAMLISTING>
+
+<variablelist>
+ <title>Arguments</title>
+ <varlistentry>
+ <term><parameter>l</parameter></term>
+ <listitem><para>The "C" label for this structure.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>funs</parameter></term>
+ <listitem><para>The set of interface functions (see below).</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><structfield>dev_priv</structfield></term>
+ <listitem><para>A placeholder for any device specific data for
+ this channel.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><structfield>baud</structfield></term>
+ <listitem><para>The initial baud rate value
+ (<type>cyg_serial_baud_t</type>).</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><structfield>stop</structfield></term>
+ <listitem><para>The initial stop bits value
+ (<type>cyg_serial_stop_bits_t</type>).</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><structfield>parity</structfield></term>
+ <listitem><para>The initial parity mode value
+ (<type>cyg_serial_parity_t</type>).</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><structfield>word_length</structfield></term>
+ <listitem><para>The initial word length value
+ (<type>cyg_serial_word_length_t</type>).</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><structfield>flags</structfield></term>
+ <listitem><para>The initial driver flags value.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><structfield>out_buf</structfield></term>
+ <listitem><para>Pointer to the output
+ buffer. <literal>NULL</literal> if none required.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><structfield>out_buflen</structfield></term>
+ <listitem><para>The length of the output buffer.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><structfield>in_buf</structfield></term>
+ <listitem><para>pointer to the input
+ buffer. <literal>NULL</literal> if none required.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><structfield>in_buflen</structfield></term>
+ <listitem><para>The length of the input buffer. </PARA></listitem>
+ </varlistentry>
+</variablelist>
+
+<PARA>
+If either buffer length is zero, no buffering will take place
+in that direction and only polled mode functions will be used.
+</PARA>
+
+<PARA>
+The interface from the hardware independent driver into the
+hardware interface module is contained in the <structfield>funs</structfield> table.
+This is defined by the macro:
+</PARA>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Serial Functions Structure -->
+
+<section>
+<title>Serial Functions Structure</title>
+
+<PROGRAMLISTING>
+SERIAL_FUNS(l, putc, getc, set_config, start_xmit, stop_xmit)
+</PROGRAMLISTING>
+
+
+<variablelist>
+ <title>Arguments</title>
+ <varlistentry>
+ <term><structfield>l</structfield></term>
+ <listitem><para>The "C" label for this structure.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><structfield>putc</structfield></term>
+ <listitem>
+ <para><literal>bool (*putc)(serial_channel *priv, unsigned char
+ c)</literal></para>
+ <para>
+ This function sends one character to the interface. It should
+ return <literal>true</literal> if the character is actually consumed. It should
+ return <literal>false</literal> if there is no space in the interface
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><structfield>getc</structfield></term>
+ <listitem>
+ <para><literal>unsigned char (*getc)(serial_channel *priv)</literal></para>
+ <para>
+ This function fetches one character from the interface. It will
+ be only called in a non-interrupt driven mode, thus it should
+ wait for a character by polling the device until ready.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><structfield>set_config</structfield></term>
+ <listitem>
+ <para><literal>bool (*set_config)(serial_channel
+ *priv,cyg_serial_info_t *config)</literal></para>
+ <para>
+ This function is used to configure the port. It should return
+ <literal>true</literal> if the hardware is updated to match the desired
+ configuration. It should return <literal>false</literal> if the port cannot
+ support some parameter specified by the given
+ configuration. E.g. selecting 1.5 stop bits and 8 data bits is
+ invalid for most serial devices and should not be allowed.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>start_xmit</parameter></term>
+ <listitem><para><literal>void (*start_xmit)(serial_channel *priv)</literal></para>
+ <para>
+ In interrupt mode, turn on the transmitter and allow for
+ transmit interrupts.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>stop_xmit</parameter></term>
+ <listitem>
+ <para><literal>void (*stop_xmit)(serial_channel *priv)</literal></para>
+ <para>In interrupt mode, turn off the transmitter.</PARA>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Callbacks -->
+
+<section>
+<title>Callbacks</title>
+
+<PARA>
+The device interface module can execute functions in the
+hardware independent driver via <literal>chan-&gt;callbacks</literal>.
+These functions are available:
+</PARA>
+
+<PROGRAMLISTING>
+void (*serial_init)( serial_channel *chan )
+</PROGRAMLISTING>
+
+<PARA>This function is used to initialize the serial channel. It
+is only required if the channel is being used in interrupt
+mode.</PARA>
+
+<PROGRAMLISTING>
+void (*xmt_char)( serial_channel *chan )
+</PROGRAMLISTING>
+
+<PARA>
+This function would be called from an interrupt handler after a
+transmit interrupt indicating that additional characters may be
+sent. The upper driver will call the <function>putc</function>
+function as appropriate to send more data to the device.</PARA>
+
+<PROGRAMLISTING>
+void (*rcv_char)( serial_channel *chan, unsigned char c )
+</PROGRAMLISTING>
+
+
+<PARA>
+This function is used to tell the driver that a character has arrived
+at the interface. This function is typically called from the interrupt
+handler. </PARA>
+
+<PARA>
+Furthermore, if the device has a FIFO it should require the hardware
+independent driver to provide block transfer functionality (driver CDL
+should include &quot;implements
+CYGINT_IO_SERIAL_BLOCK_TRANSFER&quot;). In that case, the following
+functions are available as well:</PARA>
+
+<PROGRAMLISTING>
+bool (*data_xmt_req)(serial_channel *chan,
+ int space,
+ int* chars_avail,
+ unsigned char** chars)
+void (*data_xmt_done)(serial_channel *chan)
+</PROGRAMLISTING>
+
+<PARA>
+Instead of calling <function>xmt_char()</function> to get a single
+character for transmission at a time, the driver should call
+<function>data_xmt_req()</function> in a loop, requesting character
+blocks for transfer. Call with a <parameter>space</parameter> argument of how much space
+there is available in the FIFO.</PARA>
+
+<PARA>If the call returns <literal>true</literal>, the driver can read
+<parameter>chars_avail</parameter> characters from
+<parameter>chars</parameter> and copy them into the FIFO.</PARA>
+
+<PARA>If the call returns <literal>false</literal>, there are
+no more buffered characters and the driver should continue without
+filling up the FIFO.</PARA>
+
+<PARA>When all data has been unloaded, the
+driver must call <function>data_xmt_done()</function>.</PARA>
+
+
+<PROGRAMLISTING>
+bool (*data_rcv_req)(serial_channel *chan,
+ int avail,
+ int* space_avail,
+ unsigned char** space)
+void (*data_rcv_done)(serial_channel *chan)
+</PROGRAMLISTING>
+
+<PARA>Instead of calling <function>rcv_char()</function> with a single
+character at a time, the driver should call
+<function>data_rcv_req()</function> in a loop, requesting space to
+unload the FIFO to. <parameter>avail</parameter> is the number of
+characters the driver wishes to unload.</PARA>
+
+
+<PARA>If the call returns <literal>true</literal>, the driver can copy
+<parameter>space_avail</parameter> characters to
+<parameter>space</parameter>. </PARA>
+
+
+<PARA>If the call returns <literal>false</literal>, the input buffer is
+full. It is up to the driver to decide what to do in that case
+(callback functions for registering overflow are being planned for
+later versions of the serial driver).
+</PARA>
+
+<PARA>When all data has been unloaded, the driver must call
+<function>data_rcv_done()</function>.</PARA>
+
+</section>
+
+<!-- }}} -->
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ Serial Testing -->
+
+<section id="io-serial-testing-with-serfilter">
+<title>Serial testing with ser_filter</title>
+
+<!-- {{{ Rationale -->
+
+<section id="io-serfilter-rationale">
+<title>Rationale</title>
+
+<para>
+Since some targets only have one serial connection, a serial testing harness
+needs to be able to share the connection with <application>GDB</application>
+(however, the test and <application>GDB</application> can also run on separate
+lines).
+</para>
+
+<para>
+The <firstterm>serial filter</firstterm> (<application>ser_filter</application>)
+sits between the serial port and <application>GDB</application> and monitors
+the exchange of data between <application>GDB</application> and the target.
+Normally, no changes are made to the data.
+</para>
+
+<para>
+When a test request packet is sent from the test on the target, it is
+intercepted by the filter.
+</para>
+
+<para>
+The filter and target then enter a loop, exchanging protocol data between
+them which <application>GDB</application> never sees.
+</para>
+
+<para>
+In the event of a timeout, or a crash on the target, the filter falls
+back into its pass-through mode. If this happens due to a crash it should be
+possible to start regular debugging with <application>GDB</application>. The
+filter will stay in the pass-though mode until <application>GDB</application>
+disconnects.
+</para>
+</section>
+
+<!-- }}} -->
+<!-- {{{ The Protocol -->
+
+<section id="io-serfilter-protocol">
+<title>The Protocol</title>
+
+<para>The protocol commands are prefixed with an <literal>&quot;@&quot;</literal>
+character which the serial filter is looking for. The protocol
+commands include:
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term><literal>PING</literal></term>
+ <listitem>
+ <para>Allows the test on the target to probe for the filter. The
+ filter responds with <literal>OK</literal>, while
+ <application>GDB</application> would just ignore the
+ command. This allows the tests to do nothing if they require the
+ filter and it is not present.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>CONFIG</literal></term>
+ <listitem>
+ <para>Requests a change of serial line configuration. Arguments
+ to the command specify baud rate, data bits, stop bits, and
+ parity. [This command is not fully implemented yet - there is no
+ attempt made to recover if the new configuration turns out to
+ cause loss of data.]</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>BINARY</literal></term>
+ <listitem>
+ <para>Requests data to be sent from the filter to the
+ target. The data is checksummed, allowing errors in the transfer
+ to be detected. Sub-options of this command control how the
+ data transfer is made:</para>
+ <variablelist>
+ <varlistentry>
+ <term><literal>NO_ECHO</literal></term>
+ <listitem>
+ <para>(serial driver receive test) Just send data from the
+ filter to the target. The test verifies the checksum and
+ PASS/FAIL depending on the result. </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>EOP_ECHO</literal></term>
+ <listitem>
+ <para>(serial driver half-duplex receive and send test) As
+ <literal>NO_ECHO</literal> but the test echoes back the
+ data to the filter. The filter does a checksum on the
+ received data and sends the result to the target. The test
+ PASS/FAIL depending on the result of both checksum
+ verifications.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>DUPLEX_ECHO</literal></term>
+ <listitem>
+ <para>(serial driver duplex receive and send test) Smaller
+ packets of data are sent back and forth in a pattern that
+ ensures that the serial driver will be both sending and
+ receiving at the same time. Again, checksums are computed
+ and verified resulting in PASS/FAIL.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>TEXT</literal></term>
+ <listitem>
+ <para> This is a test of the text translations in the TTY layer.
+ Requests a transfer of text data from the target to the filter
+ and possibly back again. The filter treats this as a binary
+ transfer, while the target ma be doing translations on the
+ data. The target provides the filter with checksums for what it
+ should expect to see. This test is not implemented yet.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>The above commands may be extended, and new commands added, as
+required to test (new) parts of the serial drivers in
+<productname>eCos</productname>.
+</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ The Serial Tests -->
+
+<section id="io-serfilter-serial-tests">
+<title>The Serial Tests</title>
+
+<para>
+The serial tests are built as any other eCos test. After running the
+<command>make tests</command> command, the tests can be found in
+<filename>install/tests/io_serial/</filename></para>
+
+<variablelist>
+ <varlistentry>
+ <term><filename>serial1</filename></term>
+ <listitem><para>A simple API test.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>serial2</filename></term>
+ <listitem>
+ <para>A simple serial send test. It writes out two strings, one
+ raw and one encoded as a <application>GDB</application>
+ O-packet</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>serial3</filename> [ requires the serial filter ]</term>
+ <listitem>
+ <para>This tests the half-duplex send and receive capabilities
+ of the serial driver. </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>serial4</filename> [ requires the serial filter ]</term>
+ <listitem>
+ <para>This test attempts to use a few different serial
+ configurations, testing the driver's configuration/setup
+ functionality. </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>serial5</filename> [ requires the serial filter ]</term>
+ <listitem>
+ <para>This tests the duplex send and receive capabilities of the
+ serial driver. </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>All tests should complete in less than 30 seconds.</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Serial Filter Usage-->
+
+<section id="io-serfilter-usage">
+<title>Serial Filter Usage</title>
+
+<para>Running the ser_filter program with no (or wrong) arguments results in
+the following output:
+</para>
+
+<screen>
+Usage: ser_filter [-t -S] TcpIPport SerialPort BaudRate
+or: ser_filter -n [-t -S] SerialPort BaudRate
+-t: Enable tracing.
+-S: Output data read from serial line.
+-c: Output data on console instead of via GDB.
+-n: No GDB.
+</screen>
+
+<para>The normal way to use it with GDB is to start the filter:</para>
+
+<screen>
+$ <userinput>ser_filter -t 9000 com1 38400</userinput>
+</screen>
+
+<para>
+In this case, the filter will be listening on port 9000 and connect to the
+target via the serial port <literal>COM1</literal> at 38400 baud. On a UNIX
+host, replace "<literal>COM1</literal>" with a device such as
+"<filename>/dev/ttyS0</filename>".
+</para>
+
+<para>
+The <option>-t</option> option enables tracing which will cause the
+filter to describe its actions on the console.
+</para>
+
+<para>Now start <application>GDB</application> with one of the tests as an
+argument:
+</para>
+
+<screen>
+$ <userinput>mips-tx39-elf-gdb -nw install/tests/io_serial/serial3</userinput>
+</screen>
+
+<para>Then connect to the filter:</para>
+
+<screen>
+(gdb) <userinput>target remote localhost:9000</userinput>
+</screen>
+
+<para>
+This should result in a connection in exactly the same way as if you
+had connected directly to the target on the serial line.
+</para>
+
+<screen>
+(gdb) <userinput>c</userinput>
+</screen>
+
+<para>
+Which should result in output similar to the below:
+</para>
+
+<screen>
+Continuing.
+INFO: &lt;BINARY:16:1!&gt;
+PASS: &lt;Binary test completed&gt;
+INFO: &lt;BINARY:128:1!&gt;
+PASS: &lt;Binary test completed&gt;
+INFO: &lt;BINARY:256:1!&gt;
+PASS: &lt;Binary test completed&gt;
+INFO: &lt;BINARY:1024:1!&gt;
+PASS: &lt;Binary test completed&gt;
+INFO: &lt;BINARY:512:0!&gt;
+PASS: &lt;Binary test completed&gt;
+...
+PASS: &lt;Binary test completed&gt;
+INFO: &lt;BINARY:16384:0!&gt;
+PASS: &lt;Binary test completed&gt;
+PASS: &lt;serial13 test OK&gt;
+EXIT: &lt;done&gt;
+</screen>
+
+<para>
+If any of the individual tests fail the testing will terminate with a
+<computeroutput>FAIL</computeroutput>.
+</para>
+
+<para>
+With tracing enabled, you would also see the filter's status output:
+</para>
+
+<para>
+The <literal>PING</literal> command sent from the target to determine the
+presence of the filter:
+</para>
+
+<screen>
+[400 11:35:16] Dispatching command PING
+[400 11:35:16] Responding with status OK
+</screen>
+
+<para>Each of the binary commands result in output similar to:</para>
+
+<screen>
+[400 11:35:16] Dispatching command BINARY
+[400 11:35:16] Binary data (Size:16, Flags:1).
+[400 11:35:16] Sending CRC: '170231!', len: 7.
+[400 11:35:16] Reading 16 bytes from target.
+[400 11:35:16] Done. in_crc 170231, out_crc 170231.
+[400 11:35:16] Responding with status OK
+[400 11:35:16] Received DONE from target.
+</screen>
+
+<para>
+This tracing output is normally sent as O-packets to <application>GDB
+</application> which will display the tracing text. By using the
+<option>-c </option> option, the tracing text can be redirected to the
+console from which ser_filter was started.
+</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ A Note on Failures -->
+
+<section id="io-serfilter-failures">
+<title>A Note on Failures</title>
+
+<para>
+A serial connection (especially when driven at a high baud rate) can garble the
+transmitted data because of noise from the environment. It is not the job of
+the serial driver to ensure data integrity - that is the job of protocols
+layering on top of the serial driver. </para>
+
+<para>In the current implementation the serial tests and the serial filter are
+not resilient to such data errors. This means that the test may crash or hang
+(possibly without reporting a <computeroutput>FAIL</computeroutput>). It also
+means that you should be aware of random errors - a <computeroutput>FAIL
+</computeroutput> is not necessarily caused by a bug in the serial driver.
+</para>
+
+<para>Ideally, the serial testing infrastructure should be able to distinguish
+random errors from consistent errors - the former are most likely due to noise
+in the transfer medium, while the latter are more likely to be caused by faulty
+drivers. The current implementation of the infrastructure does not have this
+capability.</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Debugging -->
+
+<section id="io-serfilter-debugging">
+<title>Debugging</title>
+
+<para>If a test fails, the serial filter's output may provide some hints about
+what the problem is. If the option <option>-S</option> is used when starting
+the filter, data received from the target is printed out:
+</para>
+
+<screen>
+[400 11:35:16] 0000 50 41 53 53 3a 3c 42 69 'PASS:&lt;Bi'
+[400 11:35:16] 0008 6e 61 72 79 20 74 65 73 'nary.tes'
+[400 11:35:16] 0010 74 20 63 6f 6d 70 6c 65 't.comple'
+[400 11:35:16] 0018 74 65 64 3e 0d 0a 49 4e 'ted&gt;..IN'
+[400 11:35:16] 0020 46 4f 3a 3c 42 49 4e 41 'FO:&lt;BINA'
+[400 11:35:16] 0028 52 59 3a 31 32 38 3a 31 'RY:128:1'
+[400 11:35:16] 0030 21 3e 0d 0a 40 42 49 4e '!..@BIN'
+[400 11:35:16] 0038 41 52 59 3a 31 32 38 3a 'ARY:128:'
+[400 11:35:16] 0040 31 21 .. .. .. .. .. .. '1!'
+</screen>
+
+<para>In the case of an error during a testing command the data received by the
+filter will be printed out, as will the data that was expected. This allows
+the two data sets to be compared which may give some idea of what the problem
+is.</para>
+
+</section>
+
+<!-- }}} -->
+
+</section>
+
+<!-- }}} -->
+
+</chapter>
+
+<!-- }}} -->
+<!-- {{{ Device Driver API -->
+
+<CHAPTER id="devapi-device-driver-interface-to-the-kernel">
+<TITLE>Device Driver Interface to the Kernel</TITLE>
+
+<PARA>
+This chapter describes the API that device drivers may use
+to interact with the kernel and HAL. It is primarily concerned with
+the control and management of interrupts and the synchronization of
+ISRs, DSRs and threads.
+</PARA>
+
+<PARA>
+The same API will be present in configurations where the kernel
+is not present. In this case the functions will be supplied by code
+acting directly on the HAL.
+</PARA>
+
+
+<!-- {{{ Interrupt Model -->
+
+<SECTION id="devapi-interrupt-model">
+<TITLE>Interrupt Model</TITLE>
+
+<PARA>
+<EMPHASIS>eCos</EMPHASIS> presents a three level interrupt model to
+<!-- <index></index> -->device drivers. This consists of <!--
+<index></index> -->Interrupt Service Routines (ISRs) that are invoked
+in response to a hardware interrupt; <!-- <index></index> -->Deferred
+Service Routines (DSRs) that are invoked in response to a request by
+an ISR; and threads that are the clients of the driver. </PARA>
+
+<PARA>
+Hardware interrupts are delivered with minimal intervention to an
+ISR. The HAL decodes the hardware source of the interrupt and calls
+the ISR of the attached interrupt object. This ISR may manipulate the
+hardware but is only allowed to make a restricted set of calls on the
+driver API. When it returns, an ISR may request that its DSR should be
+scheduled to run.
+</PARA>
+
+<PARA>
+A DSR will be run when it is safe to do so without interfering with
+the scheduler. Most of the time the DSR will run immediately after the
+ISR, but if the current thread is in the scheduler, it will be delayed
+until the thread is finished. A DSR is allowed to make a larger set of
+driver API calls, including, in particular, being able to call
+<FUNCTION>cyg_drv_cond_signal()</FUNCTION> to wake up waiting
+threads.
+</PARA>
+
+<PARA>
+Finally, threads are able to make all API calls and in particular are
+allowed to wait on mutexes and condition variables. </PARA>
+
+
+<PARA>
+For a device driver to receive interrupts it must first define ISR and
+DSR routines as shown below, and then call
+<FUNCTION>cyg_drv_interrupt_create()</FUNCTION>. Using the handle
+returned, the driver must then call
+<FUNCTION>cyg_drv_interrupt_attach()</FUNCTION> to actually attach the
+interrupt to the hardware vector.
+</PARA>
+
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ Synchronization -->
+
+<SECTION id="devapi-synchronization">
+<TITLE><!-- <index></index> -->Synchronization</TITLE>
+
+<PARA>There are three levels of synchronization supported:</PARA>
+
+<ORDEREDLIST>
+ <LISTITEM>
+ <PARA>
+ Synchronization with ISRs. This normally means disabling
+ interrupts to prevent the ISR running during a critical
+ section. In an SMP environment, this will also require the use of
+ a spinlock to synchronize with ISRs, DSRs or threads running on
+ other CPUs. This is implemented by the
+ <FUNCTION>cyg_drv_isr_lock()</FUNCTION> and
+ <FUNCTION>cyg_drv_isr_unlock()</FUNCTION> functions. This
+ mechanism should be used sparingly and for short periods only.
+ For finer grained synchronization, individual spinlocks are also
+ supplied.
+ </PARA>
+ </LISTITEM>
+
+ <LISTITEM>
+ <PARA>
+ Synchronization with DSRs. This will be implemented in the kernel
+ by taking the scheduler lock to prevent DSRs running during
+ critical sections. In non-kernel configurations it will be
+ implemented by non-kernel code. This is implemented by the
+ <FUNCTION>cyg_drv_dsr_lock()</FUNCTION> and
+ <FUNCTION>cyg_drv_dsr_unlock()</FUNCTION> functions. As with ISR
+ synchronization, this mechanism should be used sparingly. Only
+ DSRs and threads may use this synchronization mechanism, ISRs are
+ not allowed to do this.
+ </PARA>
+ </LISTITEM>
+ <LISTITEM>
+ <PARA>
+ Synchronization with threads. This is implemented with mutexes
+ and condition variables. Only threads may lock the mutexes and
+ wait on the condition variables, although DSRs may signal
+ condition variables.
+ </PARA>
+ </LISTITEM>
+</ORDEREDLIST>
+
+<PARA>
+Any data that is accessed from more than one level must be protected
+against concurrent access. Data that is accessed by ISRs must be
+protected with the ISR lock, or a spinlock at all times,
+<emphasis>even in ISRs</emphasis>. Data that is shared between DSRs
+and threads should be protected with the DSR lock. Data that is only
+accessed by threads must be protected with mutexes.
+</PARA>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ SMP Support -->
+
+<SECTION id="devapi-smp-support">
+<TITLE><!-- <index></index> -->SMP Support</TITLE>
+
+<para>
+Some eCos targets contain support for Symmetric Multi-Processing (SMP)
+configurations, where more than one CPU may be present. This option
+has a number of ramifications for the way in which device drivers must
+be written if they are to be SMP-compatible.
+</para>
+
+<para>
+Since it is possible for the ISR, DSR and thread components of a
+device driver to execute on different CPUs, it is important that
+SMP-compatible device drivers use the driver API routines correctly.
+</para>
+
+<para>
+Synchronization between threads and DSRs continues to require that the
+thread-side code use <function>cyg_drv_dsr_lock()</function> and
+<function>cyg_drv_dsr_unlock()</function> to protect access to shared
+data. While it is not strictly necessary for DSR code to claim the DSR
+lock, since DSRs are run with it claimed already, it is good practice
+to do so.
+</para>
+
+<para>
+Synchronization between ISRs and DSRs or threads requires that access
+to sensitive data be protected, in all places, by calls to
+<function>cyg_drv_isr_lock()</function> and
+<function>cyg_drv_isr_unlock()</function>. Disabling or masking
+interrupts is not adequate, since the thread or DSR may be running on
+a different CPU and interrupt enable/disable only work on the current
+CPU.
+</para>
+
+<para>
+The ISR lock, for SMP systems, not only disables local interrupts, but
+also acquires a spinlock to protect against concurrent access from
+other CPUs. This is necessary because ISRs are not run with the
+scheduler lock claimed. Hence they can run in parallel with the other
+components of the device driver.
+</para>
+
+<para>
+The ISR lock provided by the driver API is just a shared spinlock that
+is available for use by all drivers. If a driver needs to implement a
+finer grain of locking, it can use private spinlocks, accessed via the
+<function>cyg_drv_spinlock_*()</function> functions.
+</para>
+
+</section>
+
+<!-- }}} -->
+<!-- {{{ Device Driver Models -->
+
+<SECTION id="devapi-device-driver-models">
+<TITLE>Device Driver Models</TITLE>
+
+<PARA>
+There are several ways in which <!-- <index></index> -->device drivers
+may be built. The exact model chosen will depend on the properties of
+the device and the behavior desired. There are three basic models that
+may be adopted.
+</PARA>
+
+<PARA>
+The first model is to do all device processing in the ISR. When it is
+invoked the ISR programs the device hardware directly and accesses
+data to be transferred directly in memory. The ISR should also call
+<FUNCTION>cyg_drv_interrupt_acknowledge()</FUNCTION>. When it is
+finished it may optionally request that its DSR be invoked. The DSR
+does nothing but call <FUNCTION>cyg_drv_cond_signal()</FUNCTION> to
+cause a thread to be woken up. Thread level code must call
+<FUNCTION>cyg_drv_isr_lock()</FUNCTION>, or
+<FUNCTION>cyg_drv_interrupt_mask()</FUNCTION> to prevent ISRs running
+while it manipulates shared memory.
+</PARA>
+
+<PARA>
+The second model is to defer device processing to the DSR. The ISR
+simply prevents further delivery of interrupts by either programming
+the device, or by calling
+<FUNCTION>cyg_drv_interrupt_mask()</FUNCTION>. It must then call
+<FUNCTION>cyg_drv_interrupt_acknowledge()</FUNCTION> to allow other
+interrupts to be delivered and then request that its DSR be
+called. When the DSR runs it does the majority of the device handling,
+optionally signals a condition variable to wake a thread, and finishes
+by calling <FUNCTION>cyg_drv_interrupt_unmask()</FUNCTION> to re-allow
+device interrupts. Thread level code uses
+<FUNCTION>cyg_drv_dsr_lock()</FUNCTION> to prevent DSRs running while
+it manipulates shared memory. The eCos serial device drivers use this
+approach.
+</PARA>
+
+<PARA>
+The third model is to defer device processing even further to a
+thread. The ISR behaves exactly as in the previous model and simply
+blocks and acknowledges the interrupt before request that the DSR
+run. The DSR itself only calls
+<FUNCTION>cyg_drv_cond_signal()</FUNCTION> to wake the thread. When
+the thread awakens it performs all device processing, and has full
+access to all kernel facilities while it does so. It should finish by
+calling <FUNCTION>cyg_drv_interrupt_unmask()</FUNCTION> to re-allow
+device interrupts. The eCos ethernet device drivers are written to
+this model.
+</PARA>
+
+<PARA>
+The first model is good for devices that need immediate processing and
+interact infrequently with thread level. The second model trades a
+little latency in dealing with the device for a less intrusive
+synchronization mechanism. The last model allows device processing to
+be scheduled with other threads and permits more complex device
+handling.
+</PARA>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ Synchronization Levels -->
+
+<SECTION id="devapi-synchronization-levels">
+<TITLE>Synchronization Levels</TITLE>
+
+<PARA>
+Since it would be dangerous for an ISR or DSR to make a call
+that might reschedule the current thread (by trying to lock a mutex
+for example) all functions in this API have an associated synchronization
+level. These levels are:
+</PARA>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Thread</TERM>
+ <LISTITEM>
+ <PARA>
+ This function may only be called from within threads. This is
+ usually the client code that makes calls into the device driver.
+ In a non-kernel configuration, this will be code running at the
+ default non-interrupt level.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>DSR</TERM>
+ <LISTITEM>
+ <PARA>
+ This function may be called by either DSR or thread code.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+
+ <VARLISTENTRY>
+ <TERM>ISR</TERM>
+ <LISTITEM>
+ <PARA>
+ This function may be called from ISR, DSR or thread code.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+<PARA>
+The following table shows, for each API function, the levels
+at which is may be called:
+</PARA>
+
+<PROGRAMLISTING role="ascii-art">
+ Callable from:
+Function ISR DSR Thread
+-------------------------------------------------------------------------
+
+cyg_drv_isr_lock X X X
+cyg_drv_isr_unlock X X X
+cyg_drv_spinlock_init X
+cyg_drv_spinlock_destroy X
+cyg_drv_spinlock_spin X X X
+cyg_drv_spinlock_clear X X X
+cyg_drv_spinlock_try X X X
+cyg_drv_spinlock_test X X X
+cyg_drv_spinlock_spin_intsave X X X
+cyg_drv_spinlock_clear_intsave X X X
+cyg_drv_dsr_lock X X
+cyg_drv_dsr_unlock X X
+cyg_drv_mutex_init X
+cyg_drv_mutex_destroy X
+cyg_drv_mutex_lock X
+cyg_drv_mutex_trylock X
+cyg_drv_mutex_unlock X
+cyg_drv_mutex_release X
+cyg_drv_cond_init X
+cyg_drv_cond_destroy X
+cyg_drv_cond_wait X
+cyg_drv_cond_signal X X
+cyg_drv_cond_broadcast X X
+cyg_drv_interrupt_create X
+cyg_drv_interrupt_delete X
+cyg_drv_interrupt_attach X X X
+cyg_drv_interrupt_detach X X X
+cyg_drv_interrupt_mask X X X
+cyg_drv_interrupt_unmask X X X
+cyg_drv_interrupt_acknowledge X X X
+cyg_drv_interrupt_configure X X X
+cyg_drv_interrupt_level X X X
+cyg_drv_interrupt_set_cpu X X X
+cyg_drv_interrupt_get_cpu X X X
+
+</PROGRAMLISTING>
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ The API -->
+
+<SECTION id="devapi-api">
+<TITLE>The API</TITLE>
+
+<PARA>
+This section details the <!-- <index></index> -->Driver Kernel
+Interface. Note that most of these functions are identical to Kernel C
+API calls, and will in most configurations be wrappers for them. In
+non-kernel configurations they will be supported directly by the HAL,
+or by code to emulate the required behavior.
+</PARA>
+
+<PARA>This API is defined in the header file
+<FILENAME>&lt;cyg/hal/drv_api.h&gt;</FILENAME>.
+</PARA>
+
+<!-- {{{ cyg_drv_isr_lock -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_isr_lock</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_isr_lock()</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA>None</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result:</TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level:</TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description:</TERM>
+ <LISTITEM>
+ <PARA>
+ Disables delivery of interrupts, preventing all ISRs running. This
+ function maintains a counter of the number of times it is
+ called.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_isr_unlock -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_isr_unlock</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_isr_unlock()</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA>None</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Re-enables delivery of interrupts, allowing ISRs to
+ run. This function decrements the counter maintained by
+ <FUNCTION>cyg_drv_isr_lock()</FUNCTION>, and only re-allows
+ interrupts when it goes to zero. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_spinlock_init -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_spinlock_init</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+<programlisting>
+void cyg_drv_spinlock_init(cyg_spinlock_t *lock, cyg_bool_t locked )
+</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>lock</parameter> - pointer to spinlock to initialize</PARA>
+ <PARA><parameter>locked</parameter> - initial state of lock</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result:</TERM>
+ <LISTITEM>
+ <PARA>None</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level:</TERM>
+ <LISTITEM>
+ <PARA>Thread</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description:</TERM>
+ <LISTITEM>
+ <para>
+ Initialize a spinlock. The <parameter>locked</parameter>
+ argument indicates how the spinlock should be initialized:
+ <literal>TRUE</literal> for locked or <literal>FALSE</literal>
+ for unlocked state.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_spinlock_destroy -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_spinlock_destroy</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_spinlock_destroy(cyg_spinlock_t *lock )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>lock</parameter> - pointer to spinlock destroy</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result:</TERM>
+ <LISTITEM>
+ <PARA>None</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level:</TERM>
+ <LISTITEM>
+ <PARA>Thread</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description:</TERM>
+ <LISTITEM>
+ <para>
+ Destroy a spinlock that is no longer of use. There should be no
+ CPUs attempting to claim the lock at the time this function is
+ called, otherwise the behavior is undefined.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_spinlock_spin -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_spinlock_spin</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_spinlock_spin(cyg_spinlock_t *lock )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>lock</parameter> - pointer to spinlock to claim</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result:</TERM>
+ <LISTITEM>
+ <PARA>None</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level:</TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description:</TERM>
+ <LISTITEM>
+ <para>
+ Claim a spinlock, waiting in a busy loop until it is
+ available. Wherever this is called from, this operation
+ effectively pauses the CPU until it succeeds. This operations
+ should therefore be used sparingly, and in situations where
+ deadlocks/livelocks cannot occur. Also see
+ <function>cyg_drv_spinlock_spin_intsave()</function>.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_spinlock_clear -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_spinlock_clear</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_spinlock_clear(cyg_spinlock_t *lock )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>lock</parameter> - pointer to spinlock to clear </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result:</TERM>
+ <LISTITEM>
+ <PARA>None</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level:</TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description:</TERM>
+ <LISTITEM>
+ <para>
+ Clear a spinlock. This clears the spinlock and allows another
+ CPU to claim it. If there is more than one CPU waiting in
+ <function>cyg_drv_spinlock_spin()</function> then just one of
+ them will be allowed to proceed.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_spinlock_try -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_spinlock_try</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <programlisting>cyg_bool_t cyg_drv_spinlock_try(cyg_spinlock_t *lock )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>lock</parameter> - pointer to spinlock to try</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result:</TERM>
+ <LISTITEM>
+ <PARA><literal>TRUE</literal> if the spinlock was claimed,
+ <literal>FALSE</literal> otherwise.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level:</TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description:</TERM>
+ <LISTITEM>
+ <para>
+ Try to claim the spinlock without waiting. If the spinlock could
+ be claimed immediately then <literal>TRUE</literal> is
+ returned. If the spinlock is already claimed then the result is
+ <literal>FALSE</literal>.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_spinlock_test -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_spinlock_test</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <programlisting>cyg_bool_t cyg_drv_spinlock_test(cyg_spinlock_t *lock )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>lock</parameter> - pointer to spinlock to test</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result:</TERM>
+ <LISTITEM>
+ <PARA><literal>TRUE</literal> if the spinlock is available,
+ <literal>FALSE</literal> otherwise.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level:</TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description:</TERM>
+ <LISTITEM>
+ <para>
+ Inspect the state of the spinlock. If the spinlock is not locked
+ then the result is <literal>TRUE</literal>. If it is locked then
+ the result will be <literal>FALSE</literal>.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_spinlock_spin_intsave -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_spinlock_spin_intsave</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+<programlisting>
+void cyg_drv_spinlock_spin_intsave(cyg_spinlock_t *lock,
+ cyg_addrword_t *istate )
+</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>lock</parameter> - pointer to spinlock to claim</PARA>
+ <PARA><parameter>istate</parameter> - pointer to interrupt state save location</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result:</TERM>
+ <LISTITEM>
+ <PARA>None</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level:</TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description:</TERM>
+ <LISTITEM>
+ <para>
+ This function behaves exactly like
+ <function>cyg_drv_spinlock_spin()</function> except that it also
+ disables interrupts before attempting to claim the lock. The
+ current interrupt enable state is saved in
+ <parameter>*istate</parameter>. Interrupts remain disabled once
+ the spinlock had been claimed and must be restored by calling
+ <function>cyg_drv_spinlock_clear_intsave()</function>.
+ </para>
+ <para>
+ In general, device drivers should use this function to claim and
+ release spinlocks rather than the
+ non-<function>_intsave()</function> variants, to ensure proper
+ exclusion with code running on both other CPUs and this CPU.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_spinlock_clear_intsave -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_spinlock_clear_intsave</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+<programlisting>
+void cyg_drv_spinlock_clear_intsave( cyg_spinlock_t *lock,
+ cyg_addrword_t istate )
+</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>lock</parameter> - pointer to spinlock to clear </PARA>
+ <PARA><parameter>istate</parameter> - interrupt state to restore </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result:</TERM>
+ <LISTITEM>
+ <PARA>None</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level:</TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description:</TERM>
+ <LISTITEM>
+ <para>
+ This function behaves exactly like
+ <function>cyg_drv_spinlock_clear()</function> except that it
+ also restores an interrupt state saved by
+ <function>cyg_drv_spinlock_spin_intsave()</function>. The
+ <parameter>istate</parameter> argument must have been
+ initialized by a previous call to
+ <function>cyg_drv_spinlock_spin_intsave()</function>.
+ </para>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_dsr_lock -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_dsr_lock</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_dsr_lock()</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA>None</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>DSR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Disables scheduling of DSRs. This function maintains a
+ counter of the number of times it has been called. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_dsr_unlock -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_dsr_unlock</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_dsr_unlock()</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA>None</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result:</TERM>
+ <LISTITEM>
+ <PARA> </PARA>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level:</TERM>
+ <LISTITEM>
+ <PARA>DSR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Re-enables scheduling of DSRs. This function decrements
+ the counter incremented by
+ <FUNCTION>cyg_drv_dsr_lock()</FUNCTION>. DSRs are only allowed
+ to be delivered when the counter goes to zero. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_mutex_init -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_mutex_init</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_mutex_init(cyg_drv_mutex_t *mutex)</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>mutex</parameter> - pointer to mutex to initialize</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>Thread</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Initialize the mutex pointed to by the
+ <literal>mutex</literal> argument. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_mutex_destroy -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_mutex_destroy</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_mutex_destroy( cyg_drv_mutex_t *mutex )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>mutex</parameter> - pointer to mutex to destroy</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>Thread</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Destroy the mutex pointed to by the
+ <parameter>mutex</parameter> argument. The mutex should be unlocked
+ and there should be no threads waiting to lock it when this call
+ in made.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_mutex_lock -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_mutex_lock</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>cyg_bool cyg_drv_mutex_lock( cyg_drv_mutex_t *mutex )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>mutex</parameter> - pointer to mutex to lock</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result:</TERM>
+ <LISTITEM>
+ <PARA><literal>TRUE</literal> it the thread has claimed the
+ lock, <literal>FALSE</literal> otherwise.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level:</TERM>
+ <LISTITEM>
+ <PARA>Thread</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Attempt to lock the mutex pointed to by the
+ <parameter>mutex</parameter> argument. If the mutex is already
+ locked by another thread then this thread will wait until that
+ thread is finished. If the result from this function is
+ <literal>FALSE</literal> then the thread was broken out of its
+ wait by some other thread. In this case the mutex will not have
+ been locked. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_mutex_trylock -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_mutex_trylock</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+ <PARA><programlisting>cyg_bool cyg_drv_mutex_trylock( cyg_drv_mutex_t *mutex )</programlisting></PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>mutex</parameter> - pointer to mutex to lock</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result:</TERM>
+ <LISTITEM>
+ <PARA><literal>TRUE</literal> if the mutex has been locked,
+ <literal>FALSE</literal> otherwise. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level:</TERM>
+ <LISTITEM>
+ <PARA>Thread</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description:</TERM>
+ <LISTITEM>
+ <PARA>Attempt to lock the mutex pointed to by the
+ <parameter>mutex</parameter> argument without waiting. If the
+ mutex is already locked by some other thread then this function
+ returns <literal>FALSE</literal>. If the function can lock the
+ mutex without waiting, then <literal>TRUE</literal> is
+ returned. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_mutex_unlock -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_mutex_unlock</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_mutex_unlock( cyg_drv_mutex_t *mutex )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>mutex</parameter> - pointer to mutex to unlock</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>Thread</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Unlock the mutex pointed to by the
+ <parameter>mutex</parameter> argument. If there are any threads
+ waiting to claim the lock, one of them is woken up to try and
+ claim it. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_mutex_release -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_mutex_release</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_mutex_release( cyg_drv_mutex_t *mutex )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><literal>mutex</literal> - pointer to mutex to release</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>Thread</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Release all threads waiting on the mutex pointed to by the
+ <parameter>mutex</parameter> argument. These threads will return
+ from <FUNCTION>cyg_drv_mutex_lock()</FUNCTION> with a
+ <literal>FALSE</literal> result and will not have claimed the
+ mutex. This function has no effect on any thread that may have
+ the mutex claimed. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_cond_init -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_cond_init</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting> void cyg_drv_cond_init( cyg_drv_cond_t *cond, cyg_drv_mutex_t *mutex )
+ </programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>cond</parameter> - condition variable to initialize</PARA>
+ <PARA><parameter>mutex</parameter> - mutex to associate with this condition variable</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>Thread </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Initialize the condition variable pointed to by the
+ <parameter>cond</parameter> argument. The
+ <parameter>mutex</parameter> argument must point to a mutex with
+ which this condition variable is associated. A thread may only
+ wait on this condition variable when it has already locked the
+ associated mutex. Waiting will cause the mutex to be unlocked,
+ and when the thread is reawakened, it will automatically claim
+ the mutex before continuing. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_cond_destroy -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_cond_destroy</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting> void cyg_drv_cond_destroy( cyg_drv_cond_t *cond )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>cond</parameter> - condition variable to destroy</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>Thread</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Destroy the condition variable pointed to by the
+ <parameter>cond</parameter> argument. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_cond_wait -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_cond_wait</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_cond_wait( cyg_drv_cond_t *cond )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>cond</parameter> - condition variable to wait on</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>Thread</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Wait for a signal on the condition variable pointed to by
+ the <parameter>cond</parameter> argument. The thread must have
+ locked the associated mutex, supplied in
+ <function>cyg_drv_cond_init()</function>, before waiting on this
+ condition variable. While the thread waits, the mutex will be
+ unlocked, and will be re-locked before this function returns. It
+ is possible for threads waiting on a condition variable to
+ occasionally wake up spuriously. For this reason it is necessary
+ to use this function in a loop that re-tests the condition each
+ time it returns. Note that this function performs an implicit
+ scheduler unlock/relock sequence, so that it may be used within
+ an explicit
+ <literal>cyg_drv_dsr_lock()...cyg_drv_dsr_unlock()</literal>
+ structure.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_cond_signal -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_cond_signal</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_cond_signal( cyg_drv_cond_t *cond )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>cond</parameter> - condition variable to signal</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>DSR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Signal the condition variable pointed to by the <parameter>cond</parameter>
+ argument. If there are any threads waiting on this variable at
+ least one of them will be awakened. Note that in some
+ configurations there may not be any difference between this
+ function and <FUNCTION>cyg_drv_cond_broadcast()</FUNCTION>.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_cond_broadcast -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_cond_broadcast</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_cond_broadcast( cyg_drv_cond_t *cond )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>cond</parameter> - condition variable to broadcast to</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>DSR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Signal the condition variable pointed to by the
+ <parameter>cond</parameter> argument. If there are any threads
+ waiting on this variable they will all be awakened. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_interrupt_create -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_interrupt_create</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+<PROGRAMLISTING>
+void cyg_drv_interrupt_create( cyg_vector_t vector,
+ cyg_priority_t priority,
+ cyg_addrword_t data,
+ cyg_ISR_t *isr,
+ cyg_DSR_t *dsr,
+ cyg_handle_t *handle,
+ cyg_interrupt *intr
+ )
+</PROGRAMLISTING>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>vector</parameter> - vector to attach to</PARA>
+ <PARA><parameter>priority</parameter> - queuing priority</PARA>
+ <PARA><parameter>data</parameter> - data pointer</PARA>
+ <PARA><parameter>isr</parameter> - interrupt service routine</PARA>
+ <PARA><parameter>dsr</parameter> - deferred service routine</PARA>
+ <PARA><parameter>handle</parameter> - returned handle</PARA>
+ <PARA><parameter>intr</parameter> - put interrupt object here</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>Thread</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Create an interrupt object and returns a handle to it. The
+ object contains information about which interrupt vector to use
+ and the ISR and DSR that will be called after the interrupt
+ object is attached to the vector. The interrupt object will be
+ allocated in the memory passed in the
+ <parameter>intr</parameter> parameter. The interrupt object is
+ not immediately attached; it must be attached with the
+ <FUNCTION>cyg_interrupt_attach()</FUNCTION> call. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_interrupt_delete -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_interrupt_delete</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting> void cyg_drv_interrupt_delete( cyg_handle_t interrupt )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>interrupt</parameter> - interrupt to delete</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>Thread</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Detach the interrupt from the vector and free the memory
+ passed in the <parameter>intr</parameter> argument to
+ <FUNCTION>cyg_drv_interrupt_create()</FUNCTION> for
+ reuse. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_interrupt_attach -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_interrupt_attach</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_interrupt_attach( cyg_handle_t interrupt )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>interrupt</parameter> - interrupt to attach</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Attach the interrupt to the vector so that interrupts will
+ be delivered to the ISR when the interrupt occurs. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_interrupt_detach -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_interrupt_detach</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_interrupt_detach( cyg_handle_t interrupt )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>interrupt</parameter> - interrupt to detach</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Detach the interrupt from the vector so that interrupts
+ will no longer be delivered to the ISR. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_interrupt_mask -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_interrupt_mask</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_interrupt_mask(cyg_vector_t vector )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>vector</parameter> - vector to mask</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Program the interrupt controller to stop delivery of
+ interrupts on the given vector. On architectures which implement
+ interrupt priority levels this may also disable all lower
+ priority interrupts. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_interrupt_mask_intunsafe -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_interrupt_mask_intunsafe</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_interrupt_mask_intunsafe(cyg_vector_t vector )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>vector</parameter> - vector to mask</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Program the interrupt controller to stop delivery of
+ interrupts on the given vector. On architectures which implement
+ interrupt priority levels this may also disable all lower
+ priority interrupts. This version differs from
+ <function>cyg_drv_interrupt_mask()</function> in not being
+ interrupt safe. So in situations where, for example, interrupts
+ are already known to be disabled, this may be called to avoid
+ the extra overhead.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_interrupt_unmask -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_interrupt_unmask</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_interrupt_unmask(cyg_vector_t vector )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>vector</parameter> - vector to unmask</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Program the interrupt controller to re-allow delivery of
+ interrupts on the given <parameter>vector</parameter>. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_interrupt_unmask_intunsafe -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_interrupt_unmask_intunsafe</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_interrupt_unmask_intunsafe(cyg_vector_t vector )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>vector</parameter> - vector to unmask</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Program the interrupt controller to re-allow delivery of
+ interrupts on the given <parameter>vector</parameter>. This
+ version differs from
+ <function>cyg_drv_interrupt_unmask()</function> in not being
+ interrupt safe.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_interrupt_acknowledge -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_interrupt_acknowledge</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <programlisting>void cyg_drv_interrupt_acknowledge( cyg_vector_t vector )</programlisting>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>vector</parameter> - vector to acknowledge</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Perform any processing required at the interrupt
+ controller and in the CPU to cancel the current interrupt
+ request on the <parameter>vector</parameter>. An ISR may also
+ need to program the hardware of the device to prevent an
+ immediate re-triggering of the interrupt. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_interrupt_configure -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_interrupt_configure</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+ <PROGRAMLISTING>
+void cyg_drv_interrupt_configure( cyg_vector_t vector,
+ cyg_bool_t level,
+ cyg_bool_t up
+ )
+</PROGRAMLISTING>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>vector</parameter> - vector to configure</PARA>
+ <PARA><parameter>level</parameter> - level or edge triggered</PARA>
+ <PARA><parameter>up</parameter> - rising/falling edge, high/low level</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Program the interrupt controller with the characteristics
+ of the interrupt source. The <parameter>level</parameter>
+ argument chooses between level- or edge-triggered
+ interrupts. The <parameter>up</parameter> argument chooses
+ between high and low level for level triggered interrupts or
+ rising and falling edges for edge triggered interrupts. This
+ function only works with interrupt controllers that can control
+ these parameters. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_interrupt_level -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_interrupt_level</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function: </TERM>
+ <LISTITEM>
+<PROGRAMLISTING>
+void cyg_drv_interrupt_level( cyg_vector_t vector,
+ cyg_priority_t level
+ )
+</PROGRAMLISTING>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>vector</parameter> - vector to configure</PARA>
+ <PARA><parameter>level</parameter> - level to set</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level: </TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Program the interrupt controller to deliver the given
+ interrupt at the supplied priority level. This function only
+ works with interrupt controllers that can control this
+ parameter.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_interrupt_set_cpu -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_interrupt_set_cpu</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+<PROGRAMLISTING>
+void cyg_drv_interrupt_set_cpu( cyg_vector_t vector,
+ cyg_cpu_t cpu
+ )
+</PROGRAMLISTING>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>vector</parameter> - interrupt vector to route</PARA>
+ <PARA><parameter>cpu</parameter> - destination CPU</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result:</TERM>
+ <LISTITEM>
+ <PARA>None</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level:</TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>
+ This function causes all interrupts on the given vector to be
+ routed to the specified CPU. Subsequently, all such interrupts
+ will be handled by that CPU. This only works if the underlying
+ hardware is capable of performing this kind of routing. This
+ function does nothing on a single CPU system.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_drv_interrupt_get_cpu -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_drv_interrupt_get_cpu</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Function:</TERM>
+ <LISTITEM>
+<PROGRAMLISTING>
+cyg_cpu_t cyg_drv_interrupt_set_cpu( cyg_vector_t vector )
+</PROGRAMLISTING>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Arguments:</TERM>
+ <LISTITEM>
+ <PARA><parameter>vector</parameter> - interrupt vector to query</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result:</TERM>
+ <LISTITEM>
+ <PARA>The CPU to which this vector is routed</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Level:</TERM>
+ <LISTITEM>
+ <PARA>ISR</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>
+ In multi-processor systems this function returns the id of the
+ CPU to which interrupts on the given vector are current being
+ delivered. In single CPU systems this function returns zero.
+ </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_ISR_t -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_ISR_t</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Type: </TERM>
+ <LISTITEM>
+<PROGRAMLISTING>
+typedef cyg_uint32 cyg_ISR_t( cyg_vector_t vector,
+ cyg_addrword_t data
+ )
+</PROGRAMLISTING>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Fields:</TERM>
+ <LISTITEM>
+ <PARA><parameter>vector</parameter> - vector being delivered</PARA>
+ <PARA><parameter>data</parameter> - data value supplied by client</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>Bit mask indicating whether interrupt was handled and
+ whether the DSR should be called. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Interrupt Service Routine definition. A pointer to a
+ function with this prototype is passed to
+ <FUNCTION>cyg_interrupt_create()</FUNCTION> when an interrupt
+ object is created. When an interrupt is delivered the function
+ will be called with the vector number and the data value that
+ was passed to <FUNCTION>cyg_interrupt_create()</FUNCTION>.
+ </PARA>
+ <PARA>The return value is a bit mask containing one or both of the
+ following bits: </PARA>
+ <variablelist>
+ <VARLISTENTRY>
+ <TERM>CYG_ISR_HANDLED </TERM>
+ <LISTITEM>
+ <PARA>indicates that the interrupt was handled by this
+ ISR. It is a configuration option whether this will
+ prevent further ISR being run. </PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>CYG_ISR_CALL_DSR </TERM>
+ <LISTITEM>
+ <PARA>causes the DSR that was passed to
+ <FUNCTION>cyg_interrupt_create()</FUNCTION> to be
+ scheduled to be called.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ </variablelist>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+<!-- {{{ cyg_DSR_t -->
+
+<SECTION>
+<TITLE><!-- <index></index> -->cyg_DSR_t</TITLE>
+
+<VARIABLELIST>
+ <VARLISTENTRY>
+ <TERM>Type: </TERM>
+ <LISTITEM>
+<PROGRAMLISTING>
+typedef void cyg_DSR_t( cyg_vector_t vector,
+ cyg_ucount32 count,
+ cyg_addrword_t data
+ )
+</PROGRAMLISTING>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Fields:</TERM>
+ <LISTITEM>
+ <PARA><parameter>vector</parameter> - vector being delivered</PARA>
+ <PARA><parameter>count</parameter> - number of times DSR has been scheduled</PARA>
+ <PARA><parameter>data</parameter> - data value supplied by client</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Result: </TERM>
+ <LISTITEM>
+ <PARA>None</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+ <VARLISTENTRY>
+ <TERM>Description: </TERM>
+ <LISTITEM>
+ <PARA>Deferred Service Routine prototype. A pointer to a
+ function with this prototype is passed to
+ <FUNCTION>cyg_interrupt_create()</FUNCTION> when an interrupt
+ object is created. When the ISR requests the scheduling of its
+ DSR, this function will be called at some later point. In
+ addition to the <parameter>vector</parameter> and
+ <parameter>data</parameter> arguments, which will be the same as
+ those passed to the ISR, this routine is also passed a
+ <parameter>count</parameter> of the number of times the ISR has
+ requested that this DSR be scheduled. This counter is zeroed
+ each time the DSR actually runs, so it indicates how many
+ interrupts have occurred since it last ran.</PARA>
+ </LISTITEM>
+ </VARLISTENTRY>
+</VARIABLELIST>
+
+</SECTION>
+
+<!-- }}} -->
+
+</SECTION>
+
+<!-- }}} -->
+
+</CHAPTER>
+
+<!-- }}} -->
+
+
+</PART>
diff --git a/cesar/ecos/packages/io/common/current/include/config_keys.h b/cesar/ecos/packages/io/common/current/include/config_keys.h
new file mode 100644
index 0000000000..c79085be6a
--- /dev/null
+++ b/cesar/ecos/packages/io/common/current/include/config_keys.h
@@ -0,0 +1,154 @@
+#ifndef CYGONCE_CONFIG_KEYS_H
+#define CYGONCE_CONFIG_KEYS_H
+// ====================================================================
+//
+// config_keys.h
+//
+// Device I/O "Keys" for get/put config functions
+//
+// ====================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+// ====================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas,jskov,grante,jlarmour
+// Date: 1999-02-04
+// Purpose: Repository for all get/put config "keys"
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+// ====================================================================
+
+// This file contains all of the 'key' values used by all I/O components.
+// It is placed in this single repository to make it easy to reduce conflicts.
+
+// ======== 0x0100 Serial ====================================================
+// Get/Set configuration 'key' values for low-level serial I/O
+
+#define CYG_IO_GET_CONFIG_SERIAL_INFO 0x0101
+#define CYG_IO_GET_CONFIG_SERIAL_OUTPUT_DRAIN 0x0102
+#define CYG_IO_GET_CONFIG_SERIAL_OUTPUT_FLUSH 0x0103
+#define CYG_IO_SET_CONFIG_SERIAL_OUTPUT_FLUSH CYG_IO_GET_CONFIG_SERIAL_OUTPUT_FLUSH
+#define CYG_IO_GET_CONFIG_SERIAL_INPUT_FLUSH 0x0104
+#define CYG_IO_SET_CONFIG_SERIAL_INPUT_FLUSH CYG_IO_GET_CONFIG_SERIAL_INPUT_FLUSH
+#define CYG_IO_GET_CONFIG_SERIAL_ABORT 0x0105
+#define CYG_IO_GET_CONFIG_SERIAL_BUFFER_INFO 0x0111
+#define CYG_IO_GET_CONFIG_SERIAL_FLOW_CONTROL_METHOD 0x0112
+
+#define CYG_IO_SET_CONFIG_SERIAL_INFO 0x0181
+#define CYG_IO_SET_CONFIG_SERIAL_HW_RX_FLOW_THROTTLE 0x0184
+#define CYG_IO_SET_CONFIG_SERIAL_HW_FLOW_CONFIG 0x0185
+#define CYG_IO_SET_CONFIG_SERIAL_FLOW_CONTROL_METHOD 0x0186
+#define CYG_IO_SET_CONFIG_SERIAL_FLOW_CONTROL_FORCE 0x0187
+#define CYG_IO_SET_CONFIG_SERIAL_STATUS_CALLBACK 0x0188
+#define CYG_IO_SET_CONFIG_SERIAL_HW_BREAK 0x0189
+
+// Compatibility values. Use of these is deprecated, the generic symbols
+// should be used instead.
+#define CYG_IO_GET_CONFIG_SERIAL_READ_BLOCKING CYG_IO_GET_CONFIG_READ_BLOCKING
+#define CYG_IO_GET_CONFIG_SERIAL_WRITE_BLOCKING CYG_IO_GET_CONFIG_WRITE_BLOCKING
+#define CYG_IO_SET_CONFIG_SERIAL_READ_BLOCKING CYG_IO_SET_CONFIG_READ_BLOCKING
+#define CYG_IO_SET_CONFIG_SERIAL_WRITE_BLOCKING CYG_IO_SET_CONFIG_WRITE_BLOCKING
+
+// ======== 0x0200 TTY =======================================================
+// Get/Set configuration 'key' values for tty-like driver
+#define CYG_IO_GET_CONFIG_TTY_INFO 0x0201 // Get channel configuration
+#define CYG_IO_SET_CONFIG_TTY_INFO 0x0281 // Set channel configuration
+
+
+// ======== 0x0300 DSP =======================================================
+// Get/Set configuration 'key' values for low-level DSP I/O
+#define CYG_IO_GET_CONFIG_DSP_OUTPUT_DRAIN 0x0301
+#define CYG_IO_GET_CONFIG_DSP_OUTPUT_FLUSH 0x0302
+#define CYG_IO_GET_CONFIG_DSP_INPUT_FLUSH 0x0303
+#define CYG_IO_GET_CONFIG_DSP_ABORT 0x0304
+#define CYG_IO_GET_CONFIG_DSP_INPUT_OVERFLOW_RESET 0x0307
+
+// Compatibility values. Use of these is deprecated, the generic symbols
+// should be used instead.
+#define CYG_IO_GET_CONFIG_DSP_READ_BLOCKING CYG_IO_GET_CONFIG_READ_BLOCKING
+#define CYG_IO_GET_CONFIG_DSP_WRITE_BLOCKING CYG_IO_GET_CONFIG_WRITE_BLOCKING
+#define CYG_IO_SET_CONFIG_DSP_READ_BLOCKING CYG_IO_SET_CONFIG_READ_BLOCKING
+#define CYG_IO_SET_CONFIG_DSP_WRITE_BLOCKING CYG_IO_SET_CONFIG_WRITE_BLOCKING
+
+// ======== 0x400 DSP =======================================================
+// Get/Set configuration 'key' values for termios emulation
+
+#define CYG_IO_GET_CONFIG_TERMIOS 0x0400
+#define CYG_IO_SET_CONFIG_TERMIOS 0x0401
+
+// ======== 0x600 FLASH =====================================================
+// Get/Set configuration 'key' values for FLASH drivers
+
+#define CYG_IO_GET_CONFIG_FLASH_ERASE 0x600
+#define CYG_IO_GET_CONFIG_FLASH_QUERY 0x601
+#define CYG_IO_GET_CONFIG_FLASH_LOCK 0x602
+#define CYG_IO_GET_CONFIG_FLASH_UNLOCK 0x603
+#define CYG_IO_GET_CONFIG_FLASH_VERIFY 0x604
+#define CYG_IO_GET_CONFIG_FLASH_DEVSIZE 0x605
+#define CYG_IO_GET_CONFIG_FLASH_BLOCKSIZE 0x606
+
+#define CYG_IO_SET_CONFIG_FLASH_FIS_NAME 0x680
+
+// ======== 0x700 DISK =======================================================
+// Get/Set configuration 'key' values for DISK I/O
+
+#define CYG_IO_GET_CONFIG_DISK_INFO 0x700
+
+// ======== 0x800 CAN ========================================================
+// Get/Set configuration 'key' values for DISK I/O
+
+#define CYG_IO_GET_CONFIG_CAN_INFO 0x0801
+#define CYG_IO_GET_CONFIG_CAN_BUFFER_INFO 0x0802
+#define CYG_IO_GET_CONFIG_CAN_TIMEOUT 0x0803
+
+#define CYG_IO_SET_CONFIG_CAN_INFO 0x0881
+#define CYG_IO_SET_CONFIG_CAN_TIMEOUT 0x0883
+#define CYG_IO_SET_CONFIG_CAN_RTR_BUF 0x0884
+
+// ======== 0x1000 Generic ===================================================
+// Get/Set configuration 'key' values that can apply to more than one
+// class of device.
+
+#define CYG_IO_GET_CONFIG_READ_BLOCKING 0x1001
+#define CYG_IO_GET_CONFIG_WRITE_BLOCKING 0x1002
+
+#define CYG_IO_SET_CONFIG_READ_BLOCKING 0x1081
+#define CYG_IO_SET_CONFIG_WRITE_BLOCKING 0x1082
+
+
+#endif /* CYGONCE_CONFIG_KEYS_H */
+/* EOF config_keys.h */
diff --git a/cesar/ecos/packages/io/common/current/include/devtab.h b/cesar/ecos/packages/io/common/current/include/devtab.h
new file mode 100644
index 0000000000..8a47611385
--- /dev/null
+++ b/cesar/ecos/packages/io/common/current/include/devtab.h
@@ -0,0 +1,202 @@
+#ifndef CYGONCE_IO_DEVTAB_H
+#define CYGONCE_IO_DEVTAB_H
+// ====================================================================
+//
+// devtab.h
+//
+// Device I/O Table
+//
+// ====================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+// ====================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-02-04
+// Purpose: Describe low level I/O interfaces.
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+// ====================================================================
+
+// Private include file. This file should only be used by device
+// drivers, not application code.
+
+#include <pkgconf/system.h>
+#include <cyg/io/io.h>
+#include <cyg/hal/drv_api.h>
+#include <cyg/hal/hal_tables.h>
+
+// Set of functions which handle top level I/O functions
+typedef struct {
+ Cyg_ErrNo (*write)(cyg_io_handle_t handle,
+ const void *buf,
+ cyg_uint32 *len);
+ Cyg_ErrNo (*read)(cyg_io_handle_t handle,
+ void *buf,
+ cyg_uint32 *len);
+ Cyg_ErrNo (*bwrite)(cyg_io_handle_t handle,
+ const void *buf,
+ cyg_uint32 *len,
+ cyg_uint32 pos);
+ Cyg_ErrNo (*bread)(cyg_io_handle_t handle,
+ void *buf,
+ cyg_uint32 *len,
+ cyg_uint32 pos);
+ cyg_bool (*select)(cyg_io_handle_t handle,
+ cyg_uint32 which,
+ CYG_ADDRWORD info);
+ Cyg_ErrNo (*get_config)(cyg_io_handle_t handle,
+ cyg_uint32 key,
+ void *buf,
+ cyg_uint32 *len);
+ Cyg_ErrNo (*set_config)(cyg_io_handle_t handle,
+ cyg_uint32 key,
+ const void *buf,
+ cyg_uint32 *len);
+} cyg_devio_table_t;
+
+
+// Default functions
+
+__externC Cyg_ErrNo cyg_devio_cwrite(cyg_io_handle_t handle,
+ const void *buf, cyg_uint32 *len);
+__externC Cyg_ErrNo cyg_devio_cread(cyg_io_handle_t handle,
+ void *buf, cyg_uint32 *len);
+__externC Cyg_ErrNo cyg_devio_bwrite(cyg_io_handle_t handle,
+ const void *buf, cyg_uint32 *len,
+ cyg_uint32 pos);
+__externC Cyg_ErrNo cyg_devio_bread(cyg_io_handle_t handle,
+ void *buf, cyg_uint32 *len,
+ cyg_uint32 pos);
+
+__externC Cyg_ErrNo cyg_devio_select(cyg_io_handle_t handle,
+ cyg_uint32 which,
+ CYG_ADDRWORD info);
+
+__externC Cyg_ErrNo cyg_devio_get_config(cyg_io_handle_t handle,
+ cyg_uint32 key,
+ void* buf,
+ cyg_uint32* len);
+
+__externC Cyg_ErrNo cyg_devio_set_config(cyg_io_handle_t handle,
+ cyg_uint32 key,
+ void* buf,
+ cyg_uint32* len);
+
+// Initialization macros
+
+#define CHAR_DEVIO_TABLE(_l,_write,_read,_select,_get_config,_set_config) \
+cyg_devio_table_t _l = { \
+ _write, \
+ _read, \
+ cyg_devio_bwrite, \
+ cyg_devio_bread, \
+ _select, \
+ _get_config, \
+ _set_config, \
+};
+
+#define BLOCK_DEVIO_TABLE(_l,_bwrite,_bread,_select,_get_config,_set_config) \
+cyg_devio_table_t _l = { \
+ cyg_devio_cwrite, \
+ cyg_devio_cread, \
+ _bwrite, \
+ _bread, \
+ _select, \
+ _get_config, \
+ _set_config, \
+};
+
+#define DEVIO_TABLE(_l,_write,_read,_select,_get_config,_set_config) \
+ CHAR_DEVIO_TABLE(_l,_write,_read,_select,_get_config,_set_config)
+
+typedef struct cyg_devtab_entry {
+ const char *name;
+ const char *dep_name;
+ cyg_devio_table_t *handlers;
+ bool (*init)(struct cyg_devtab_entry *tab);
+ Cyg_ErrNo (*lookup)(struct cyg_devtab_entry **tab,
+ struct cyg_devtab_entry *sub_tab,
+ const char *name);
+ void *priv;
+ unsigned long status;
+} CYG_HAL_TABLE_TYPE cyg_devtab_entry_t;
+
+#define CYG_DEVTAB_STATUS_AVAIL 0x0001
+#define CYG_DEVTAB_STATUS_CHAR 0x1000
+#define CYG_DEVTAB_STATUS_BLOCK 0x2000
+
+extern cyg_devtab_entry_t __DEVTAB__[], __DEVTAB_END__;
+
+#define CHAR_DEVTAB_ENTRY(_l,_name,_dep_name,_handlers,_init,_lookup,_priv) \
+cyg_devtab_entry_t _l CYG_HAL_TABLE_ENTRY(devtab) = { \
+ _name, \
+ _dep_name, \
+ _handlers, \
+ _init, \
+ _lookup, \
+ _priv, \
+ CYG_DEVTAB_STATUS_CHAR \
+};
+
+#define BLOCK_DEVTAB_ENTRY(_l,_name,_dep_name,_handlers,_init,_lookup,_priv) \
+cyg_devtab_entry_t _l CYG_HAL_TABLE_ENTRY(devtab) = { \
+ _name, \
+ _dep_name, \
+ _handlers, \
+ _init, \
+ _lookup, \
+ _priv, \
+ CYG_DEVTAB_STATUS_BLOCK \
+};
+
+#define DEVTAB_ENTRY(_l,_name,_dep_name,_handlers,_init,_lookup,_priv) \
+ CHAR_DEVTAB_ENTRY(_l,_name,_dep_name,_handlers,_init,_lookup,_priv)
+
+
+#define DEVTAB_ENTRY_NO_INIT(_l,_name,_dep_name,_handlers,_init,_lookup,_priv) \
+cyg_devtab_entry_t _l = { \
+ _name, \
+ _dep_name, \
+ _handlers, \
+ _init, \
+ _lookup, \
+ _priv, \
+ CYG_DEVTAB_STATUS_CHAR \
+};
+
+#endif // CYGONCE_IO_DEVTAB_H
diff --git a/cesar/ecos/packages/io/common/current/include/file.h b/cesar/ecos/packages/io/common/current/include/file.h
new file mode 100644
index 0000000000..7abd3f37c6
--- /dev/null
+++ b/cesar/ecos/packages/io/common/current/include/file.h
@@ -0,0 +1,164 @@
+//==========================================================================
+//
+// io/common/include/file.h
+//
+// Defines for high level file I/O
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-01-10
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+
+#ifndef _CYG_IO_FILE_H_
+#define _CYG_IO_FILE_H_
+
+#include <pkgconf/system.h>
+
+//==========================================================================
+// If the fileio package is loaded, we need to go through that to do all
+// basic IO operations. This code redefines the tags on the structures so
+// that they have the names expected by BSD based code.
+
+#ifdef CYGPKG_IO_FILEIO
+
+#include <pkgconf/io_fileio.h>
+
+#define CYG_IOVEC_TAG iovec
+#define CYG_UIO_TAG uio
+#define CYG_FILEOPS_TAG fileops
+#define CYG_FILE_TAG file
+#define CYG_SELINFO_TAG selinfo
+
+#include <cyg/fileio/fileio.h>
+
+// File states
+#define FREAD CYG_FREAD
+#define FWRITE CYG_FWRITE
+#define FNONBLOCK CYG_FNONBLOCK
+#define FASYNC CYG_FASYNC
+
+// Type of "file"
+#define DTYPE_VNODE CYG_FILE_TYPE_FILE /* file */
+#define DTYPE_SOCKET CYG_FILE_TYPE_SOCKET /* communications endpoint */
+
+//==========================================================================
+// Otherwise define all the structs here...
+
+#else // CYGPKG_IO_FILEIO
+
+// High-level file I/O interfaces
+// Derived [in part] from OpenBSD <sys/file.h>, <sys/uio.h>, <sys/fcntl.h>
+
+#include <pkgconf/io.h>
+#include <cyg/infra/cyg_type.h>
+
+#define NFILE CYGPKG_IO_NFILE
+
+struct iovec {
+ void *iov_base; /* Base address. */
+ CYG_ADDRWORD iov_len; /* Length. */
+};
+
+enum uio_rw { UIO_READ, UIO_WRITE };
+
+/* Segment flag values. */
+enum uio_seg {
+ UIO_USERSPACE, /* from user data space */
+ UIO_SYSSPACE /* from system space */
+};
+
+struct uio {
+ struct iovec *uio_iov; /* pointer to array of iovecs */
+ int uio_iovcnt; /* number of iovecs in array */
+ CYG_ADDRWORD uio_offset; /* offset into file this uio corresponds to */
+ CYG_ADDRWORD uio_resid; /* residual i/o count */
+ enum uio_seg uio_segflg; /* see above */
+ enum uio_rw uio_rw; /* see above */
+};
+
+/*
+ * Limits
+ */
+#define UIO_SMALLIOV 8 /* 8 on stack, else malloc */
+
+// Description of open file
+struct file {
+ short f_flag; /* file state */
+ short f_type; /* descriptor type */
+ struct fileops {
+ int (*fo_read)(struct file *fp, struct uio *uio);
+ int (*fo_write)(struct file *fp, struct uio *uio);
+ int (*fo_ioctl)(struct file *fp, CYG_ADDRWORD com,
+ CYG_ADDRWORD data);
+ int (*fo_select)(struct file *fp, int which);
+ int (*fo_close)(struct file *fp);
+ } *f_ops;
+ CYG_ADDRWORD f_offset;
+ CYG_ADDRWORD f_data; /* vnode or socket */
+};
+
+// File states
+#define FREAD 0x01
+#define FWRITE 0x02
+#define FNONBLOCK 0x10
+#define FASYNC 0x20
+#define FALLOC 0x80 // File is "busy", i.e. allocated
+
+// Type of "file"
+#define DTYPE_VNODE 1 /* file */
+#define DTYPE_SOCKET 2 /* communications endpoint */
+#define DTYPE_PIPE 3 /* pipe */
+
+externC cyg_bool getfp(int fdes, struct file **fp);
+externC int falloc(struct file **fp, int *fd);
+externC void ffree(struct file *fp);
+
+//==========================================================================
+
+#endif // CYGPKG_IO_FILEIO
+
+//==========================================================================
+#endif // _CYG_IO_FILE_H_
diff --git a/cesar/ecos/packages/io/common/current/include/io.h b/cesar/ecos/packages/io/common/current/include/io.h
new file mode 100644
index 0000000000..ccfb9a792a
--- /dev/null
+++ b/cesar/ecos/packages/io/common/current/include/io.h
@@ -0,0 +1,116 @@
+#ifndef CYGONCE_IO_H
+#define CYGONCE_IO_H
+// ====================================================================
+//
+// io.h
+//
+// Device I/O
+//
+// ====================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+// ====================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-02-04
+// Purpose: Describe low level I/O interfaces.
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+// ====================================================================
+
+// This file contains the user-level visible I/O interfaces
+
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+#include <cyg/infra/cyg_type.h>
+
+#ifdef CYGPKG_ERROR
+#include <cyg/error/codes.h>
+#else
+#error I/O subsystem requires 'error' package
+#endif
+
+// typedef int Cyg_ErrNo;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *cyg_io_handle_t;
+
+// Lookup a device and return it's handle
+Cyg_ErrNo cyg_io_lookup(const char *name,
+ cyg_io_handle_t *handle);
+// Write data to a device
+Cyg_ErrNo cyg_io_write(cyg_io_handle_t handle,
+ const void *buf,
+ cyg_uint32 *len);
+// Read data from a device
+Cyg_ErrNo cyg_io_read(cyg_io_handle_t handle,
+ void *buf,
+ cyg_uint32 *len);
+// Write data to a block device
+Cyg_ErrNo cyg_io_bwrite(cyg_io_handle_t handle,
+ const void *buf,
+ cyg_uint32 *len,
+ cyg_uint32 pos);
+// Read data from a block device
+Cyg_ErrNo cyg_io_bread(cyg_io_handle_t handle,
+ void *buf,
+ cyg_uint32 *len,
+ cyg_uint32 pos);
+// Get the configuration of a device
+Cyg_ErrNo cyg_io_get_config(cyg_io_handle_t handle,
+ cyg_uint32 key,
+ void *buf,
+ cyg_uint32 *len);
+// Change the configuration of a device
+Cyg_ErrNo cyg_io_set_config(cyg_io_handle_t handle,
+ cyg_uint32 key,
+ const void *buf,
+ cyg_uint32 *len);
+// Test a device for readiness
+cyg_bool cyg_io_select(cyg_io_handle_t handle,
+ cyg_uint32 which,
+ CYG_ADDRWORD info);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CYGONCE_IO_H */
+/* EOF io.h */
diff --git a/cesar/ecos/packages/io/common/current/include/io_diag.h b/cesar/ecos/packages/io/common/current/include/io_diag.h
new file mode 100644
index 0000000000..9687c0ead4
--- /dev/null
+++ b/cesar/ecos/packages/io/common/current/include/io_diag.h
@@ -0,0 +1,64 @@
+#ifndef CYGONCE_IO_COMMON_IO_DIAG_H
+#define CYGONCE_IO_COMMON_IO_DIAG_H
+//=============================================================================
+//
+// io_diag.h
+//
+// Redirect diag output to the configured console device
+//
+//============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors:jskov
+// Date: 1999-04-09
+// Purpose: Kernel diagnostic output
+// Description: Implementations of kernel diagnostic routines.
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/infra/cyg_type.h>
+
+externC void diag_device_init(void);
+externC void diag_device_write_char(char c);
+externC void diag_device_start_sync(void);
+externC void diag_device_end_sync(void);
+
+#endif // CYGONCE_IO_COMMON_IO_DIAG_H
+//-----------------------------------------------------------------------------
+// EOF io_diag.h
diff --git a/cesar/ecos/packages/io/common/current/src/io_file.c b/cesar/ecos/packages/io/common/current/src/io_file.c
new file mode 100644
index 0000000000..daa5d4eee8
--- /dev/null
+++ b/cesar/ecos/packages/io/common/current/src/io_file.c
@@ -0,0 +1,106 @@
+//==========================================================================
+//
+// io/common/io_file.c
+//
+// High-level file I/O support.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-01-10
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+
+// File I/O support
+
+#include <pkgconf/io.h>
+#include <cyg/io/file.h>
+#include <cyg/error/codes.h>
+
+struct file fds[CYGPKG_IO_NFILE];
+
+//
+// This function allcates a file "slot".
+//
+int
+falloc(struct file **fp, int *fd)
+{
+ int i;
+ struct file *f;
+ f = &fds[0];
+ for (i = 0; i < CYGPKG_IO_NFILE; i++, f++) {
+ if (f->f_flag == 0) {
+ f->f_flag = FALLOC;
+ *fp = f;
+ *fd = i;
+ return 0;
+ }
+ }
+ return EMFILE; // No more files
+}
+
+//
+// This function is used to return a file slot.
+//
+void
+ffree(struct file *fp)
+{
+ fp->f_flag = 0; // Mark free
+}
+
+//
+// This function provides the mapping from a file descriptor (small
+// integer used by application code) to the corresponding file slot.
+cyg_bool
+getfp(int fd, struct file **fp)
+{
+ struct file *f;
+ if (fd >= CYGPKG_IO_NFILE)
+ return -1;
+ f = &fds[fd];
+ if (f->f_flag == 0)
+ return -1;
+ *fp = f;
+ return 0;
+}
diff --git a/cesar/ecos/packages/io/common/current/src/ioinit.cxx b/cesar/ecos/packages/io/common/current/src/ioinit.cxx
new file mode 100644
index 0000000000..5ba8facaf3
--- /dev/null
+++ b/cesar/ecos/packages/io/common/current/src/ioinit.cxx
@@ -0,0 +1,73 @@
+//==========================================================================
+//
+// io/iosys.c
+//
+// I/O Subsystem + Device Table support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-02-04
+// Purpose: Device Table
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/io/io.h>
+#include <cyg/io/devtab.h>
+
+// This is a dummy class just so we can execute the I/O package
+// initialization at it's proper priority
+
+externC void cyg_io_init(void);
+
+class cyg_io_init_class {
+public:
+ cyg_io_init_class(void) {
+ cyg_io_init();
+ }
+};
+
+// And here's an instance of the class just to make the code run
+static cyg_io_init_class _cyg_io_init CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO);
+
+// Define table boundaries
+CYG_HAL_TABLE_BEGIN( __DEVTAB__, devtab );
+CYG_HAL_TABLE_END( __DEVTAB_END__, devtab );
diff --git a/cesar/ecos/packages/io/common/current/src/iosys.c b/cesar/ecos/packages/io/common/current/src/iosys.c
new file mode 100644
index 0000000000..951a218e21
--- /dev/null
+++ b/cesar/ecos/packages/io/common/current/src/iosys.c
@@ -0,0 +1,350 @@
+//==========================================================================
+//
+// io/iosys.c
+//
+// I/O Subsystem + Device Table support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-02-04
+// Purpose: Device I/O Support
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/io.h>
+#include <cyg/io/io.h>
+#include <cyg/io/devtab.h>
+#include <cyg/infra/diag.h>
+
+//extern void cyg_io_init(void) CYGBLD_ATTRIB_CONSTRUCTOR
+// CYG_INIT_PRIORITY(CYG_INIT_BEFORE(LIBC));
+
+// Checks that two strings are "equivalent" device names
+// 'n1' is a string from the user
+// 'n2' is a name in a device table entry
+// 'cyg_io_compare()' will return true IFF
+// n1 == n2, for all characters
+// n2 ends in '/' and matches n1 up to the terminating '/'
+// 'ptr' will get a pointer to the residual string.
+static bool
+cyg_io_compare(const char *n1, const char *n2, const char **ptr)
+{
+ while (*n1 && *n2) {
+ if (*n1++ != *n2++) {
+ return false;
+ }
+ }
+ if (*n1) {
+ // See if the devtab name is is a substring
+ if (*(n2-1) == '/') {
+ *ptr = n1;
+ return true;
+ }
+ }
+ if (*n1 || *n2) {
+ return false;
+ }
+ *ptr = n1;
+ return true;
+}
+
+//
+// This function is called during system initialization. The purpose is
+// to step through all devices linked into the system, calling their
+// "init" entry points.
+//
+
+void
+cyg_io_init(void)
+{
+ static int _init = false;
+ cyg_devtab_entry_t *t;
+ if (_init) return;
+ for (t = &__DEVTAB__[0]; t != &__DEVTAB_END__; t++) {
+#ifdef CYGDBG_IO_INIT
+ diag_printf("Init device '%s'\n", t->name);
+#endif
+ if (t->init(t)) {
+ t->status |= CYG_DEVTAB_STATUS_AVAIL;
+ } else {
+ // What to do if device init fails?
+ // Device not [currently] available
+ t->status &= ~CYG_DEVTAB_STATUS_AVAIL;
+ }
+ }
+ _init = true;
+}
+
+//
+// Look up the devtab entry for a named device and return its handle.
+// If the device is found and it has a "lookup" function, call that
+// function to allow the device/driver to perform any necessary
+// initializations.
+//
+
+Cyg_ErrNo
+cyg_io_lookup(const char *name, cyg_io_handle_t *handle)
+{
+ union devtab_entry_handle_union {
+ cyg_devtab_entry_t *st;
+ cyg_io_handle_t h;
+ } stunion;
+ cyg_devtab_entry_t *t;
+ Cyg_ErrNo res;
+ const char *name_ptr;
+ for (t = &__DEVTAB__[0]; t != &__DEVTAB_END__; t++) {
+ if (cyg_io_compare(name, t->name, &name_ptr)) {
+ // FUTURE: Check 'avail'/'online' here
+ if (t->dep_name) {
+ res = cyg_io_lookup(t->dep_name, &stunion.h);
+ if (res != ENOERR) {
+ return res;
+ }
+ } else {
+ stunion.st = NULL;
+ }
+ if (t->lookup) {
+ // This indirection + the name pointer allows the lookup routine
+ // to return a different 'devtab' handle. This will provide for
+ // 'pluggable' devices, file names, etc.
+ res = (t->lookup)(&t, stunion.st, name_ptr);
+ if (res != ENOERR) {
+ return res;
+ }
+ }
+ *handle = (cyg_io_handle_t)t;
+ return ENOERR;
+ }
+ }
+ return -ENOENT; // Not found
+}
+
+//
+// 'write' data to a device.
+//
+
+Cyg_ErrNo
+cyg_io_write(cyg_io_handle_t handle, const void *buf, cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ // Validate request
+ if (!t->handlers->write) {
+ return -EDEVNOSUPP;
+ }
+ // Special check. If length is zero, this just verifies that the
+ // 'write' method exists for the given device.
+ if (NULL != len && 0 == *len) {
+ return ENOERR;
+ }
+ return t->handlers->write(handle, buf, len);
+}
+
+//
+// 'read' data from a device.
+//
+
+Cyg_ErrNo
+cyg_io_read(cyg_io_handle_t handle, void *buf, cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ // Validate request
+ if (!t->handlers->read) {
+ return -EDEVNOSUPP;
+ }
+ // Special check. If length is zero, this just verifies that the
+ // 'read' method exists for the given device.
+ if (NULL != len && 0 == *len) {
+ return ENOERR;
+ }
+ return t->handlers->read(handle, buf, len);
+}
+
+Cyg_ErrNo
+cyg_io_bwrite(cyg_io_handle_t handle, const void *buf, cyg_uint32 *len, cyg_uint32 pos)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ // Validate request
+ if (!t->handlers->bwrite) {
+ return -EDEVNOSUPP;
+ }
+ // Special check. If length is zero, this just verifies that the
+ // 'bwrite' method exists for the given device.
+ if (NULL != len && 0 == *len) {
+ return ENOERR;
+ }
+ return t->handlers->bwrite(handle, buf, len, pos);
+}
+
+//
+// 'read' data from a device.
+//
+
+Cyg_ErrNo
+cyg_io_bread(cyg_io_handle_t handle, void *buf, cyg_uint32 *len, cyg_uint32 pos)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ // Validate request
+ if (!t->handlers->bread) {
+ return -EDEVNOSUPP;
+ }
+ // Special check. If length is zero, this just verifies that the
+ // 'bread' method exists for the given device.
+ if (NULL != len && 0 == *len) {
+ return ENOERR;
+ }
+ return t->handlers->bread(handle, buf, len, pos);
+}
+
+//
+// Check device for available input or space for output
+//
+
+cyg_bool
+cyg_io_select(cyg_io_handle_t handle, cyg_uint32 which, CYG_ADDRWORD info)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ // Validate request
+ if (!t->handlers->select) {
+ return -EDEVNOSUPP;
+ }
+
+ return t->handlers->select( handle, which, info );
+}
+
+//
+// Get the configuration of a device.
+//
+
+Cyg_ErrNo
+cyg_io_get_config(cyg_io_handle_t handle, cyg_uint32 key, void *buf, cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ // Validate request
+ if (!t->handlers->get_config) {
+ return -EDEVNOSUPP;
+ }
+ // Special check. If length is zero, this just verifies that the
+ // 'get_config' method exists for the given device.
+ if (NULL != len && 0 == *len) {
+ return ENOERR;
+ }
+ return t->handlers->get_config(handle, key, buf, len);
+}
+
+//
+// Change the configuration of a device.
+//
+
+Cyg_ErrNo
+cyg_io_set_config(cyg_io_handle_t handle, cyg_uint32 key, const void *buf, cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ // Validate request
+ if (!t->handlers->set_config) {
+ return -EDEVNOSUPP;
+ }
+ // Special check. If length is zero, this just verifies that the
+ // 'set_config' method exists for the given device.
+ if (NULL != len && 0 == *len) {
+ return ENOERR;
+ }
+ return t->handlers->set_config(handle, key, buf, len);
+}
+
+/*---------------------------------------------------------------------------*/
+// Default functions for devio tables
+
+Cyg_ErrNo cyg_devio_cwrite(cyg_io_handle_t handle, const void *buf, cyg_uint32 *len)
+{
+ return -EDEVNOSUPP;
+}
+
+Cyg_ErrNo cyg_devio_cread(cyg_io_handle_t handle, void *buf, cyg_uint32 *len)
+{
+ return -EDEVNOSUPP;
+}
+
+Cyg_ErrNo cyg_devio_bwrite(cyg_io_handle_t handle, const void *buf,
+ cyg_uint32 *len, cyg_uint32 pos)
+{
+ return -EDEVNOSUPP;
+}
+
+Cyg_ErrNo cyg_devio_bread(cyg_io_handle_t handle, void *buf,
+ cyg_uint32 *len, cyg_uint32 pos)
+{
+ return -EDEVNOSUPP;
+}
+
+Cyg_ErrNo
+cyg_devio_select(cyg_io_handle_t handle, cyg_uint32 which, CYG_ADDRWORD info)
+{
+ CYG_UNUSED_PARAM(cyg_io_handle_t, handle);
+ CYG_UNUSED_PARAM(cyg_uint32, which);
+ CYG_UNUSED_PARAM(CYG_ADDRWORD, info);
+ return -EDEVNOSUPP;
+}
+
+Cyg_ErrNo
+cyg_devio_get_config(cyg_io_handle_t handle, cyg_uint32 key,
+ void* buf, cyg_uint32* len)
+{
+ CYG_UNUSED_PARAM(cyg_io_handle_t, handle);
+ CYG_UNUSED_PARAM(cyg_uint32, key);
+ CYG_UNUSED_PARAM(void*, buf);
+ CYG_UNUSED_PARAM(cyg_uint32*, len);
+ return -EDEVNOSUPP;
+}
+
+Cyg_ErrNo
+cyg_devio_set_config(cyg_io_handle_t handle, cyg_uint32 key,
+ void* buf, cyg_uint32* len)
+{
+ CYG_UNUSED_PARAM(cyg_io_handle_t, handle);
+ CYG_UNUSED_PARAM(cyg_uint32, key);
+ CYG_UNUSED_PARAM(void*, buf);
+ CYG_UNUSED_PARAM(cyg_uint32*, len);
+ return -EDEVNOSUPP;
+}
+
+/*---------------------------------------------------------------------------*/
+/* End of io/iosys.c */
diff --git a/cesar/ecos/packages/io/eth/current/ChangeLog b/cesar/ecos/packages/io/eth/current/ChangeLog
new file mode 100644
index 0000000000..7c00b045f1
--- /dev/null
+++ b/cesar/ecos/packages/io/eth/current/ChangeLog
@@ -0,0 +1,672 @@
+2005-07-29 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/net/eth_drv.c (eth_drv_recv): Change of type to remove
+ compiler warning.
+
+2005-06-29 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * doc/driver_doc: Removed, it has been superseded by the sgml
+ documentation.
+
+2005-03-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/net/eth_drv.c (eth_drv_send): Fixed a compiler warning about
+ type of parameter passed to diag_printf.
+
+2004-08-06 Jani Monoses <jani@iv.ro>
+
+ * src/stand_alone/eth_drv.c: Add parantheses to fix operator
+ precedence bugs even though they were harmless in practice.
+
+2004-01-09 Jani Monoses <jani@iv.ro>
+
+ * include/eth_drv.h:
+ * src/lwip/eth_drv.c: Update to support more than one device and
+ be in sync with current lwip code.
+
+2004-01-05 Gary Thomas <gary@mlbassoc.com>
+
+ * src/net/eth_drv.c: Names of FLASH config types changed.
+
+2003-10-09 Gary Thomas <gary@mlbassoc.com>
+
+ * src/stand_alone/eth_drv.c: Obviate __local_enet_addr, since this
+ same information is already kept in the driver structure *__local_enet_sc
+
+2003-08-19 Gary Thomas <gary@mlbassoc.com>
+
+ * src/stand_alone/eth_drv.c:
+ * src/net/eth_drv.c: Improve network speeds by reducing some
+ overhead and also the delay when sending a packet.
+
+2003-07-23 Nick Garnett <nickg@balti.calivar.com>
+
+ * include/eth_drv.h:
+ * src/net/eth_drv.c:
+ Added an ifndef to fix warnings about NBPFILTER not being
+ defined.
+
+2003-03-20 Mark Salter <msalter@redhat.com>
+
+ * cdl/eth_drivers.cdl (CYGHWR_NET_DRIVERS): Moved here from net/common.
+
+2003-03-14 Nick Garnett <nickg@calivar.com>
+
+ * src/net/eth_drv.c: Added calls to cyg_net_show_mbufs() whenever
+ we see an out-of-mbufs problem.
+
+2003-03-11 Mark Salter <msalter@redhat.com>
+
+ * src/stand_alone/eth_drv.c (eth_drv_stop): Uncomment, make non-static,
+ and use __local_enet_sc.
+ * include/eth_drv.h: Add extern decl for eth_drv_stop.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/eth_drivers.cdl: Add doc link.
+
+2003-02-07 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/net/eth_drv.c: If driver can't set multi-cast, indicate it's
+ only a warning.
+
+2002-08-14 Gary Thomas <gthomas@ecoscentric.com>
+
+ * cdl/eth_drivers.cdl: CYGNUM_IO_ETH_DRIVERS_SG_LIST_SIZE
+ needs to be global (used by all drivers, not just NET).
+
+2002-08-13 Gary Thomas <gthomas@ecoscentric.com>
+
+ * src/net/eth_drv.c (eth_drv_send): Print a better message
+ if the scatter-gather list overflows.
+
+ * include/eth_drv.h (MAX_ETH_DRV_SG):
+ * cdl/eth_drivers.cdl: Add control over size of scatter-gather
+ data lists used to pass requests to physical layer. Previous
+ value was sometimes too small.
+
+2002-07-31 Gary Thomas <gary@chez-thomas.org>
+
+ * src/net/eth_drv.c (eth_drv_start): Fix compile error when
+ built with old stack (no multicast) - introduced below.
+
+2002-07-26 Gary Thomas <gary@chez-thomas.org>
+2002-07-26 Ken Cox <jkc@redhat.com>
+
+ * src/net/eth_drv.c (eth_drv_start): Force multicast address
+ setup any time chip is reset/reconfigured.
+
+2002-05-30 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/eth_drivers.cdl: Provide CYGINT_IO_ETH_INT_SUPPORT_REQUIRED
+ interface to indicate if interrupt support is required.
+
+2002-05-28 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/lwip/lw.diff: Remove. Obsolete.
+
+2002-05-13 Jesper Skov <jskov@redhat.com>
+
+ * cdl/eth_drivers.cdl: Moved the package's header files to
+ cyg/io/eth to clean up the include root directory.
+
+2002-04-30 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/lwip/eth_drv.c: Update from Jani Monoses.
+
+ * cdl/eth_drivers.cdl: Move CYGINT_ISO_STRING_STRFUNCS requirement
+ into CYGPKG_IO_ETH_DRIVERS_NET where it belongs.
+ Move CYGINT_ISO_STRING_MEMFUNCS requirement into
+ CYGPKG_IO_ETH_DRIVERS_STAND_ALONE where it belongs.
+
+2002-04-10 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/eth_drv.c: Only pass mutlicast addresses down to drivers.
+
+2002-04-05 Jani Monoses <jani@iv.ro>
+
+ * src/lwip/eth_drv.c: New file. Add eth driver support for lwip.
+ * src/lwip/lw.diff: New file. diff against lwip sources.
+ * src/lwip/README: New file.
+ * cdl/eth_drivers.cdl: Add lwip driver support.
+
+2002-03-09 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/eth_drv.c: Select 'multicast_all' if too many addresses
+ are required. Also, ignore any non-multicast addresses.
+
+2002-02-22 Hugo Tyson <hmt@redhat.com>
+
+ * doc/ethdrv.sgml: New file. SGML-ized the existing driver-doc
+ file and brought the information up to date with deliver functions
+ and all that.
+
+2002-02-18 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/eth_drivers.cdl:
+ Add new interface CYGINT_IO_ETH_MULTICAST which is used to
+ insure that drivers support multicast addresses if IPv6 is used.
+
+2002-02-15 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/eth_drv.c:
+ * include/eth_drv.h: Add framework for multicast address support.
+
+2002-01-30 Hugo Tyson <hmt@redhat.com>
+
+ * cdl/eth_drivers.cdl (CYGPKG_IO_ETH_DRIVERS_WARN_FORCE_CONSOLE):
+ CDL options removed; control is now from RedBoot.
+
+ * src/net/eth_drv.c (START_CONSOLE): Changed to use RedBoot
+ fconfig items for deciding what console to use for special debug
+ messages such as "out of MBUFs" and the like.
+
+ * src/stand_alone/eth_drv.c (LOCK_APPLICATION_SCHEDULER): New
+ macro to do what it says, before passing packets to the app.
+ Used in two places: when passing a received packet, and when
+ passing a tx completion status back.
+
+2002-01-28 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/eth_drv.c (eth_drv_init): Changes for supporting new
+ FreeBSD based stack (minor API changes internal to that stack).
+
+2001-12-12 Hugo Tyson <hmt@redhat.com>
+
+ * src/net/eth_drv.c (START_CONSOLE,END_CONSOLE): New macros akin
+ to those within RedBoot's internal net_io.c, for directing warning
+ messages to a serial line if required. All printf's wrapped in
+ them for safety.
+
+ * cdl/eth_drivers.cdl (CYGPKG_IO_ETH_DRIVERS_WARN_FORCE_CONSOLE):
+ and ..._NUMBER, new options to direct application warning output
+ somewhere useful (less harmful) for when you are debugging over
+ the net. Trying to print within a call which occurred from within
+ RedBoot itself is such a recursive situation as to be fatal.
+ Defaults are disabled, you must choose to set these up if
+ you want to debug your app safely over the network.
+
+2001-12-12 Hugo Tyson <hmt@redhat.com>
+
+ * src/stand_alone/eth_drv.c (DIAG_DUMP_BUF_HDR,DIAG_DUMP_BUF_BDY):
+ Separate macros for debug dumps of ethernet header and body.
+ (eth_drv_write): Use them.
+ (eth_drv_copy_recv): Do not corrupt the static data pointer, so
+ that if we are erroneously called twice, at least what we pass is
+ a packet, rather than random memory; do not escape to SEGV. Guard
+ against NULL sg_list[].buf pointers, in case caller out of MBUFs.
+ (eth_drv_recv): Only dump packet if we actually have a buffer.
+ Only forward the packet if actually have a buffer.
+
+2001-12-04 Richard Sandiford <rsandifo@redhat.com>
+
+ * src/stand_alone/eth_drv.c (eth_drv_read): Check that the return
+ buffer is big enough to hold the packet.
+
+2001-11-28 Jonathan Larmour <jlarmour@redhat.com>
+
+ * doc/driver_doc: Mention preferences on how the ESA should be set.
+
+2001-10-30 Jonathan Larmour <jlarmour@redhat.com>
+
+ * doc/driver_doc: Add description of poll, deliver and int_vector
+ driver functions.
+
+2001-10-29 Hugo Tyson <hmt@redhat.com>
+
+ * src/net/eth_drv.c (eth_drv_tickle_devices): [CASE 106613] Rather
+ than calling can_send() in the device driver directly, call our
+ own eth_drv_send() function which will also dequeue a waiting
+ packet if we find we indeed can_send(). This helps to recover
+ from queue full situations within the if_ethersubr layer above.
+ This change is belt & braces with a similar call in the code which
+ drops a packet if the queue is full, in the main network code in
+ net/tcpip/.../src/sys/net/if_ethersubr.c (ether_output); this
+ change will recover the situation shortly even if the application
+ gives up trying to send because of ENOBUFS.
+
+2001-10-18 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/eth_drivers.cdl: Rename CYGSEM_IO_ETH_DRIVERS_DEBUG to
+ CYGDBG_IO_ETH_DRIVERS_DEBUG and make it a common option.
+ Add separate CYGDBG_IO_ETH_DRIVERS_DEBUG_VERBOSITY config.
+
+ * include/eth_drv.h: Don't claim BSD if it isn't.
+ * include/eth_drv_stats.h: Ditto.
+ * include/netdev.h: Ditto.
+ * src/net/eth_drv.c: Ditto.
+ Also use above CDL options to conditionalize debugging (and the
+ verbosity level).
+ * src/stand_alone/eth_drv.c: Use above renamed CDL options.
+
+2001-10-11 Gary Thomas <gthomas@redhat.com>
+
+ * src/stand_alone/eth_drv.c (eth_drv_recv):
+ Defensive programming - insure valid packet size.
+
+2001-10-05 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/net/eth_drv.c: Add default implementation of min().
+
+2001-09-26 Jesper Skov <jskov@redhat.com>
+
+ * cdl/eth_drivers.cdl: Require the string functions.
+
+ * src/stand_alone/eth_drv.c: Fix warnings.
+
+2001-09-25 Hugo Tyson <hmt@redhat.com>
+
+ * src/net/eth_drv.c (eth_drv_dsr): Assert that the "sc" given to
+ eth_drv_dsr() really is a sc from the valid list. This can save a
+ few hours debug time of a typo.
+
+2001-09-13 Hugo Tyson <hmt@redhat.com>
+
+ * src/net/eth_drv.c (eth_drv_tickle_devices): New function to call
+ can_send() on all devices to allow them to unstick from a lost
+ interrupt or other wedge - it's up to the device to detect this,
+ of course, can_send() does not explicitly do this, it's just used
+ as an opportunity harmlessly to get control into the device so it
+ can examine its world.
+
+2001-09-05 Gary Thomas <gthomas@redhat.com>
+
+ * src/stand_alone/eth_drv.c (eth_drv_init): Don't initialize
+ structures if ESA is zero. This is used by low level drivers
+ to indicate that a device is present, but can't currently be
+ used. The eCos driver handles this case as well.
+
+2001-08-31 Hugo Tyson <hmt@redhat.com>
+2001-08-31 Andrew Lunn <Andrew.Lunn@ascom.ch>
+
+ * src/net/eth_drv.c (eth_drv_tx_done): Guard against a NULL key
+ return - which can be caused by race conditions in the driver,
+ this is the neatest fixup. It's good defensive programming
+ anyway and ASCOM's tests indicate a benefit for CASE 106059.
+
+2001-08-22 Gary Thomas <gthomas@redhat.com>
+
+ * src/stand_alone/eth_drv.c:
+ printf() is no longer a part of RedBoot. Thus all programs
+ must use diag_printf() and related functions instead.
+
+ * cdl/eth_drivers.cdl: Only enable warning/debug modes if RedBoot
+ is present as the debug environment (since there are implicit
+ dependencies on RedBoot functions).
+
+2001-08-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/net/eth_drv.c (eth_drv_send): Move endif location to fix build
+ error.
+
+2001-08-17 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/eth_drivers.cdl (CYGSEM_IO_ETH_DRIVERS_DEBUG): Now booldata.
+ * src/stand_along/eth_drv.c (eth_drv_tx_done): Use different
+ value of CYGSEM_IO_ETH_DRIVERS_DEBUG for verbosity.
+
+2001-08-14 Gary Thomas <gthomas@redhat.com>
+
+ * src/stand_alone/eth_drv.c (eth_drv_write):
+ (eth_drv_tx_done):
+ (eth_drv_read): Better handling of stacking (layering) of drivers.
+ RedBoot (stand alone code) is designed to call into the eCos
+ stack and these changes make sure that this is done properly
+ nested/stacked. These changes also affect the behaviour positively
+ for CR 902745-CR.
+
+ * src/net/eth_drv.c (eth_drv_send): Add locking of driver while
+ actual hardware routines are involved. Since the same driver
+ can be shared by both eCos and RedBoot, it is imperative that
+ additional locking (in the form of locking the scheduler) be
+ employed during this window to make sure that the hardware is
+ handled in complete, consistent steps. This helps with known
+ bug CR 902745-CR.
+
+2001-08-09 Hugo Tyson <hmt@redhat.com>
+
+ * src/net/eth_drv.c (eth_drv_recv): Add a pair of
+ CYGARC_HAL_SAVE_GP()/CYGARC_HAL_RESTORE_GP() on entry and exit;
+ this function is intercalled between RedBoot and the application.
+ A minor re-org at the ending to accommodate these macros' nesting.
+ (eth_drv_tx_done): CYGARC_HAL_SAVE_GP()/CYGARC_HAL_RESTORE_GP().
+
+ * src/stand_alone/eth_drv.c (eth_drv_tx_done): Add a pair of
+ CYGARC_HAL_SAVE_GP()/CYGARC_HAL_RESTORE_GP() on entry and exit;
+ this function is intercalled between RedBoot and the application.
+ Also make printing message about "tx_done for other key" also
+ conditional on net_debug variable - it's commonplace.
+ (eth_drv_recv): CYGARC_HAL_SAVE_GP()/CYGARC_HAL_RESTORE_GP().
+ (eth_drv_copy_recv): CYGARC_HAL_SAVE_GP()/CYGARC_HAL_RESTORE_GP().
+
+2001-07-03 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/eth_drv.c (eth_drv_recv): Better cleanup when running
+ out of mbufs - could have lost mbufs before.
+
+2001-06-21 David Woodhouse <dwmw2@redhat.com>
+
+ * src/stand_alone/eth_drv.c: Timeout when waiting for Ethernet
+ driver to finish sending packet.
+ * src/stand_alone/eth_drv.c: Don't delay if it's ready immediately.
+
+2001-06-11 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/eth_drivers.cdl: Make debug default for RedBoot.
+
+2001-05-22 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/eth_drivers.cdl: New option: CYGSEM_IO_ETH_DRIVERS_PASS_PACKETS
+ which replaces the static define in...
+ * src/stand_alone_eth_drv.c: Rename ETH_DRV_PASS_PACKETS to
+ new CDL option above.
+ Also, ensure references to start_console/end_console are conditional
+ on CYGSEM_IO_ETH_DRIVERS_DEBUG.
+
+2001-05-22 Hugo Tyson <hmt@redhat.com>
+2001-05-22 Sanjay Bisen <Sanjay.Bisen@ascom.ch>
+
+ * src/net/eth_drv.c (eth_drv_recv): Patch from Sanjay at Ascom; it
+ leaked one mbuf if you run out of clusters. Fix is simply to
+ free m in addition to top.
+
+ * src/net/eth_drv.c (eth_drv_run_deliveries): Fixed a warning with
+ an int cast in HAL_CTRLC_CHECK().
+
+2001-03-21 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/eth_drivers.cdl: Fewer buffers needed in stand-alone mode.
+
+2001-03-12 Hugo Tyson <hmt@redhat.com>
+
+ * cdl/eth_drivers.cdl: Permit defines for
+ CYGPKG_IO_ETH_DRIVERS_STAND_ALONE and CYGPKG_IO_ETH_DRIVERS_NET.
+ The generic i82559 driver needs to know, unfortunately; it calls
+ its own DSR directly to unblock after a lost interrupt. And you
+ mustn't call the DSR under RedBoot == ....STAND_ALONE.
+
+2001-01-15 Jesper Skov <jskov@redhat.com>
+
+ * src/net/eth_drv.c (eth_drv_init): Do not use enaddr if NULL.
+
+2001-01-07 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/eth_drivers.cdl: Add interface 'CYGPKG_NET_DRIVER_FRAMEWORK'
+ to describe interdependencies between network stack and driver
+ framework packages.
+
+2001-01-04 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/eth_drv.c (eth_drv_tx_done): Update count of Tx packets.
+
+2000-12-11 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/eth_drv.c (eth_drv_run_deliveries): Support ^C when
+ using network based debug channel.
+
+2000-12-02 Gary Thomas <gthomas@redhat.com>
+
+ * src/stand_alone/eth_drv.c (eth_drv_write): Debug: dump packet
+ before calling hardware routine for improved usability.
+
+2000-10-30 Gary Thomas <gthomas@redhat.com>
+
+ * include/eth_drv.h: Fix compile error in stand-alone mode.
+
+2000-10-17 Hugo Tyson <hmt@redhat.com>
+2000-10-10 Andrew Lunn <Andrew.Lunn@ascom.ch>
+ * cdl/eth_drivers.cdl: Add configury to disable the warnings about
+ out of mbufs for receives.
+
+ * src/net/eth_drv.c: The changes required for the above.
+
+2000-09-28 Hugo Tyson <hmt@redhat.com>
+
+ * src/net/eth_drv.c (eth_drv_run_deliveries): Remove race
+ condition; a chance to deliver could be delayed until "next time"
+ if the DSR snuck in just right.
+
+2000-09-14 Hugo Tyson <hmt@redhat.com>
+
+ * cdl/eth_drivers.cdl: Add configury to control new features. All
+ is controlled globally by CYGPKG_IO_ETH_DRIVERS_SIMULATED_FAILURES
+ which is by default off, natch.
+
+ * src/net/eth_drv.c (simulate_fail): Implement simulated failures
+ in ethernet packet delivery - independent tx and rx dropping and
+ rx packet corruption. Also a "line break" drop-all feature.
+
+2000-09-13 Gary Thomas <gthomas@redhat.com>
+
+ * src/stand_alone/eth_drv.c: Take out noisy dump when out of buffers.
+
+2000-09-11 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stand_alone/eth_drv.c (eth_drv_write): If we timeout waiting
+ for the write to complete, do reset the vectors to point to the
+ application, rather just a bald "return".
+
+2000-09-08 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/netdev.h (NETDEVTAB_ENTRY): Work around feature of new
+ version of CYG_HAL_TABLE_ENTRY() whereby no spaces are allowed.
+
+2000-09-07 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/netdev.h (cyg_netdevtab_entry_t): Correct syntax for
+ CYG_HAL_TABLE_TYPE
+
+2000-09-04 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/netdev.h (cyg_netdevtab_entry_t): Apply CYG_HAL_TABLE_TYPE
+
+2000-09-01 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stand_alone/eth_drv.c (eth_drv_dsr): New function, never
+ called but maybe referenced in stand_alone context, which lets
+ redboot work in the new world.
+
+2000-09-01 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * OVERVIEW: This is part of the change to the network stack to
+ greatly reduce latencies both of (other) DSRs and of thread
+ scheduling. All the work that the network stack *and* individual
+ ether drivers used to do in DSRs (including alarm callbacks and
+ data copies to/from the device memory) is moved into a "fast
+ network thread" instead. It calls a device's "deliver" function
+ to do the work that was previously in the DSR. This is a separate
+ thread so that it can be set higher priority than application
+ threads in order to minimize packet loss (depending on the
+ driver), if required (the application threads presumed to be
+ higher priority in turn than the network thread). A crucial
+ consequence of this is that we are no longer locking against DSRs,
+ so a plain mutex can be used rather than the global scheduler
+ lock, thus simplifying all the splfoo/splx() style functions.
+
+ These changes WILL BREAK individual device drivers until they are
+ updated AND the standalone logical ether driver in this component,
+ until it is updated also.
+
+ * include/eth_drv.h (ETH_DRV_SC): Add "deliver" entry to struct
+ eth_hwr_funs interface record; declare available DSR and flag for
+ "needs delivery" in SC status field.
+
+ * src/net/eth_drv.c (eth_drv_run_deliveries): New function,
+ performs callbacks to deliver funcs for all devs that want it.
+ (eth_drv_dsr): New function, sets flag in sc and calls up to net
+ stack to schedule the fast network thread.
+ (eth_drv_send): No need to lock scheduler here.
+
+2000-08-29 Gary Thomas <gthomas@redhat.com>
+
+ * src/stand_alone/eth_drv.c: Use null buffer, (char *)0,
+ instead of wasting memory - low level drivers must be designed
+ to handle this case.
+
+2000-08-28 Gary Thomas <gthomas@redhat.com>
+
+ * src/stand_alone/eth_drv.c: Use new configuration parameters.
+
+ * cdl/eth_drivers.cdl: Add new configury to control number of
+ internal buffers used by this layer. Also exposed some of the
+ debug flags here.
+
+2000-08-25 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/eth_drv_stats.h (ether_drv_stats): A little further
+ diddling; have a bool to say whether the dot3 info is filled in.
+
+2000-08-24 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/net/eth_drv.c (eth_drv_ioctl): Implement ioctl() calls.
+ sockio.h numbers SIOCGIFSTATS and SIOCGIFSTATSUD map to
+ ETH_DRV_GET_IF_STATS and ETH_DRV_GET_IF_STATS_UD respectively.
+
+ * include/eth_drv.h (ETH_DRV_GET_IF_STATS_UD): Add new device
+ interface ioctl() numbers, to get the struct below filled in.
+ Also pull in the definition include file (below).
+
+ * include/eth_drv_stats.h (ether_drv_stats): New file: Define
+ common structure for ether devices to return stats info to higher
+ up, via an ioctl() call. SNMP uses this.
+
+2000-08-23 Gary Thomas <gthomas@redhat.com>
+
+ * src/stand_alone/eth_drv.c:
+ * include/eth_drv.h: Low level drivers now need to export a
+ function which returns the interrupt vector used by that interface.
+ This allows outside code to determine this in a portable fashion.
+
+2000-08-16 Gary Thomas <gthomas@redhat.com>
+
+ * src/stand_alone/eth_drv.c:
+ * include/eth_drv.h: Clean up warnings (better protyping).
+
+ * src/stand_alone/eth_drv.c (eth_drv_write): Abandon sending
+ packet if device goes not ready for a long time (in some cases,
+ this is the only indication that the link is down).
+
+2000-08-07 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/eth_drv.c (eth_drv_recv): Add safety in case this gets
+ called [from stand-alone code] while interface is not up.
+
+ * src/stand_alone/eth_drv.c:
+ * include/eth_drv.h: Rework to more fully support mixed stand-alone
+ and system (eCos) stacks.
+
+2000-08-03 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/eth_drivers.cdl: Reparent within I/O, not NET. This allows
+ for stand-alone use as well as support for other stack implementations.
+
+2000-07-28 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/eth_drv.c (eth_drv_recv): Assert that the length we're asked
+ to deal with is at least an ether header, and also be defensive in
+ any case; discard small packets. [CASE 104206]
+
+2000-07-26 Gary Thomas <gthomas@redhat.com>
+
+ * src/eth_drv.c:
+ * include/eth_drv.h: Change interfaces used by hardware layer to
+ be "soft" (pointers to functions). This will allow those drivers
+ to be shared by applications and the ROM/debug environment.
+
+2000-07-15 Gary Thomas <gthomas@redhat.com>
+
+ * include/eth_drv.h: Add [initial] extensions to let this
+ layer work either in an eCos environment or stand-alone.
+
+2000-07-11 Gary Thomas <gthomas@redhat.com>
+
+ * include/eth_drv.h: Add minimal PCMCIA support.
+
+ * src/eth_drv.c (eth_drv_netdev): New function - used to find the
+ ethernet device info for PCMCIA devices.
+
+2000-06-23 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/eth_drv.c (eth_drv_send): Do not consume an SG entry for
+ zero length data; tolerate overflow of the SG. Before this, pings
+ of 6000 bytes crashed the system!
+
+ You can now set net_debug to 2 to get quieter output; 1 gives the
+ whole packet dump as before.
+
+ * include/eth_drv.h (MAX_ETH_DRV_SG): Make this 16 so that an MTU
+ made of all mbufs will not overflow.
+
+2000-03-28 Gary Thomas <gthomas@redhat.com>
+
+ * src/eth_drv.c (eth_drv_recv): Tolerate running out of MBUFs
+ instead of "panic"ing.
+
+2000-03-08 Gary Thomas <gthomas@redhat.com>
+
+ * src/eth_drv.c: Add some function [block] comments.
+ (eth_drv_send): Use eCos scheduler lock instead of interrupt lock.
+
+2000-03-08 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * doc/driver_doc: Add some clarification about what's called when,
+ proofreading results, shorter lines so I can print it nicely.
+
+2000-03-06 Gary Thomas <gthomas@redhat.com>
+
+ * src/eth_drv.c:
+ * include/eth_drv.h:
+ * doc/driver_doc: Remove generic "priv"ate references.
+
+2000-02-29 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/eth_drv.c:
+ * include/eth_drv.h: New expanded API for hardware drivers.
+
+2000-02-18 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/eth_drv.c (eth_drv_send): Disable interrupts while initiating
+ the buffer send - avoid a possible race.
+
+2000-02-08 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/eth_drivers.cdl:
+ Reparent under CYGPKG_NET and tidy display strings.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+
+
+
diff --git a/cesar/ecos/packages/io/eth/current/cdl/eth_drivers.cdl b/cesar/ecos/packages/io/eth/current/cdl/eth_drivers.cdl
new file mode 100644
index 0000000000..1a11078d77
--- /dev/null
+++ b/cesar/ecos/packages/io/eth/current/cdl/eth_drivers.cdl
@@ -0,0 +1,251 @@
+# ====================================================================
+#
+# eth_drivers.cdl
+#
+# Ethernet drivers - platform independent support
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): gthomas
+# Original data: gthomas
+# Contributors:
+# Date: 2000-01-25
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_IO_ETH_DRIVERS {
+ display "Common ethernet support"
+ include_dir cyg/io/eth
+ parent CYGPKG_IO
+ description "Platform independent ethernet drivers"
+ doc ref/io-eth-drv-generic.html
+
+ implements CYGPKG_NET_DRIVER_FRAMEWORK
+
+ cdl_interface CYGHWR_NET_DRIVERS {
+ display "Network drivers"
+ }
+
+ cdl_interface CYGINT_IO_ETH_MULTICAST {
+ display "Driver supports multicast addressing"
+ description "
+ This interface defines whether or not a driver can handle
+ requests for multicast addressing."
+ }
+
+ cdl_component CYGDBG_IO_ETH_DRIVERS_DEBUG {
+ display "Support printing driver debug information"
+ flavor bool
+ default_value 1
+ description "
+ Selecting this option will include code to allow the driver to
+ print lots of information on diagnostic output such as full
+ packet dumps."
+
+ cdl_option CYGDBG_IO_ETH_DRIVERS_DEBUG_VERBOSITY {
+ display "Driver debug output verbosity"
+ flavor data
+ default_value 0
+ description "
+ The value of this option indicates the default verbosity
+ level of debugging output. 0 means no debugging output
+ is made by default. Higher values indicate higher verbosity.
+ The verbosity level may also be changed at run time by
+ changing the variable cyg_io_eth_net_debug."
+ }
+ }
+
+ cdl_option CYGNUM_IO_ETH_DRIVERS_SG_LIST_SIZE {
+ display "Size of scatter-gather I/O lists"
+ flavor data
+ default_value 32
+ description "
+ A scatter-gather list is used to pass requests to/from
+ the physical device driver. This list can typically be
+ small, as the data is normally already packed into reasonable
+ chunks."
+ }
+
+ cdl_component CYGPKG_IO_ETH_DRIVERS_NET {
+ display "Support for standard eCos TCP/IP stack."
+ flavor bool
+ active_if CYGPKG_NET
+ requires CYGINT_ISO_STRING_STRFUNCS
+ implements CYGINT_IO_ETH_INT_SUPPORT_REQUIRED
+ default_value 1
+ compile net/eth_drv.c
+
+ cdl_component CYGPKG_IO_ETH_DRIVERS_WARN_NO_MBUFS {
+ display "Warn when there are no more mbufs"
+ flavor bool
+ default_value 1
+ description "
+ Warnings about running out of mbufs are printed to the
+ diagnostic output channel via diag_printf() if this option
+ is enabled. Mbufs are the network stack's basic dynamic
+ memory objects that hold all packets in transit; running
+ out is bad for performance but not fatal, not a crash.
+ You might want to turn off the warnings to preserve realtime
+ properties of the system even in extremis."
+ }
+
+ cdl_component CYGPKG_IO_ETH_DRIVERS_SIMULATED_FAILURES {
+ display "Simulate network failures for testing"
+ flavor bool
+ default_value 0
+ description "
+ This package contains a suite of simulated failure modes
+ for the ethernet device layer, including dropping and/or
+ corrupting received packets, dropping packets queued for
+ transmission, and simulating a complete network break.
+ It requires the kernel as a source of time information."
+
+ cdl_option CYGPKG_IO_ETH_DRIVERS_SIMULATE_DROP_RX {
+ display "Drop incoming packets (percentage)"
+ flavor booldata
+ legal_values 10 50 80
+ default_value 10
+ }
+
+ cdl_option CYGPKG_IO_ETH_DRIVERS_SIMULATE_CORRUPT_RX {
+ display "Corrupt incoming packets (percentage)"
+ flavor booldata
+ legal_values 10 50 80
+ default_value 10
+ }
+
+ cdl_option CYGPKG_IO_ETH_DRIVERS_SIMULATE_DROP_TX {
+ display "Drop outgoing packets (percentage)"
+ flavor booldata
+ legal_values 10 50 80
+ default_value 10
+ }
+
+ cdl_option CYGPKG_IO_ETH_DRIVERS_SIMULATE_LINE_CUT {
+ display "Simulate a line cut from time to time"
+ flavor bool
+ default_value 0
+ description "
+ This option causes the system to drop all packets for a
+ short random period (10s of seconds), and then act
+ normally for up to 4 times that long. This simulates your
+ sysadmin fiddling with plugs in the network switch
+ cupboard."
+ }
+ }
+ }
+
+ cdl_component CYGPKG_IO_ETH_DRIVERS_STAND_ALONE {
+ display "Support for stand-alone network stack."
+ flavor bool
+ active_if !CYGPKG_NET
+ requires CYGINT_ISO_STRING_MEMFUNCS
+ default_value 1
+ compile stand_alone/eth_drv.c
+
+ cdl_option CYGSEM_IO_ETH_DRIVERS_PASS_PACKETS {
+ display "Pass packets to an alternate stack"
+ flavor bool
+ default_value { 0 != CYGPKG_REDBOOT_NETWORKING }
+ description "
+ Define this to allow packets seen by this layer to be
+ passed on to the previous logical layer, i.e. when
+ stand-alone processing replaces system (eCos) processing."
+ }
+
+ cdl_option CYGNUM_IO_ETH_DRIVERS_NUM_PKT {
+ display "Number of \[network\] buffers"
+ flavor data
+ default_value 4
+ legal_values 2 to 32
+ description "
+ This option is used to allocate space to buffer incoming network
+ packets. These buffers are used to hold data until they can be
+ logically processed by higher layers."
+ }
+
+ cdl_option CYGSEM_IO_ETH_DRIVERS_WARN {
+ display "Show driver warnings"
+ active_if CYGPKG_REDBOOT
+ flavor bool
+ default_value 0
+ description "
+ Selecting this option will allows the stand-alone ethernet driver
+ to display warnings on the system console when incoming network
+ packets are being discarded due to lack of buffer space."
+ }
+ }
+
+ cdl_component CYGPKG_IO_ETH_DRIVERS_LWIP {
+ display "Support for lwIP network stack."
+ flavor bool
+ requires !CYGPKG_NET
+ active_if CYGPKG_NET_LWIP
+ default_value 1
+ implements CYGINT_IO_ETH_INT_SUPPORT_REQUIRED
+ compile lwip/eth_drv.c
+ }
+
+ cdl_interface CYGINT_IO_ETH_INT_SUPPORT_REQUIRED {
+ display "Interrupt support required"
+ flavor booldata
+ description "This interface is used to indicate to the low
+ level device drivers that interrupt driven operation
+ is required by higher layers."
+ }
+
+ cdl_component CYGPKG_IO_ETH_DRIVERS_OPTIONS {
+ display "Common ethernet support build options"
+ flavor none
+ no_define
+
+ cdl_option CYGPKG_IO_ETH_DRIVERS_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "-D_KERNEL -D__ECOS" }
+ description "
+ This option modifies the set of compiler flags for
+ building the common ethernet support package. These flags are used in addition
+ to the set of global flags."
+ }
+ }
+}
+
+# EOF eth_drivers.cdl
diff --git a/cesar/ecos/packages/io/eth/current/doc/ethdrv.sgml b/cesar/ecos/packages/io/eth/current/doc/ethdrv.sgml
new file mode 100644
index 0000000000..df017e7e03
--- /dev/null
+++ b/cesar/ecos/packages/io/eth/current/doc/ethdrv.sgml
@@ -0,0 +1,769 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- ethdrv.sgml -->
+<!-- -->
+<!-- eCos generic ethernet driver documentation -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part id="io-eth-drv-generic">
+<title>Ethernet Device Drivers</title>
+<chapter id="io-eth-drv-generic1">
+<title>Generic Ethernet Device Driver</title>
+<sect1 id="io-eth-drv-api">
+<title>Generic Ethernet API</title>
+<para>
+This section provides a simple description of how to write a low-level,
+hardware dependent ethernet driver.
+</para>
+<para>
+There is a high-level driver (which is only code &mdash; with no state of
+its own) that is part of the stack. There will be one or more low-level
+drivers tied to the actual network hardware. Each of these drivers
+contains one or more driver instances. The intent is that the
+low-level drivers know nothing of the details of the stack that will be
+using them. Thus, the same driver can be used by the
+<productname>eCos</productname>
+supported
+<acronym>TCP/IP</acronym>
+stack,
+<productname>RedBoot</productname>,
+or any other, with no changes.
+</para>
+<para>
+A driver instance is contained within a
+<type>struct eth_drv_sc</type>:
+<programlisting>
+struct eth_hwr_funs {
+ // Initialize hardware (including startup)
+ void (*start)(struct eth_drv_sc *sc,
+ unsigned char *enaddr,
+ int flags);
+ // Shut down hardware
+ void (*stop)(struct eth_drv_sc *sc);
+ // Device control (ioctl pass-thru)
+ int (*control)(struct eth_drv_sc *sc,
+ unsigned long key,
+ void *data,
+ int data_length);
+ // Query - can a packet be sent?
+ int (*can_send)(struct eth_drv_sc *sc);
+ // Send a packet of data
+ void (*send)(struct eth_drv_sc *sc,
+ struct eth_drv_sg *sg_list,
+ int sg_len,
+ int total_len,
+ unsigned long key);
+ // Receive [unload] a packet of data
+ void (*recv)(struct eth_drv_sc *sc,
+ struct eth_drv_sg *sg_list,
+ int sg_len);
+ // Deliver data to/from device from/to stack memory space
+ // (moves lots of memcpy()s out of DSRs into thread)
+ void (*deliver)(struct eth_drv_sc *sc);
+ // Poll for interrupts/device service
+ void (*poll)(struct eth_drv_sc *sc);
+ // Get interrupt information from hardware driver
+ int (*int_vector)(struct eth_drv_sc *sc);
+ // Logical driver interface
+ struct eth_drv_funs *eth_drv, *eth_drv_old;
+};
+
+struct eth_drv_sc {
+ struct eth_hwr_funs *funs;
+ void *driver_private;
+ const char *dev_name;
+ int state;
+ struct arpcom sc_arpcom; /* ethernet common */
+};
+</programlisting>
+</para><note><para>
+If you have two instances of the same hardware, you only need one
+<type>struct eth_hwr_funs</type> shared between them.
+</para></note><para>
+There is another structure which is used to communicate with the rest of
+the stack:
+<programlisting>
+struct eth_drv_funs {
+ // Logical driver - initialization
+ void (*init)(struct eth_drv_sc *sc,
+ unsigned char *enaddr);
+ // Logical driver - incoming packet notifier
+ void (*recv)(struct eth_drv_sc *sc,
+ int total_len);
+ // Logical driver - outgoing packet notifier
+ void (*tx_done)(struct eth_drv_sc *sc,
+ CYG_ADDRESS key,
+ int status);
+};
+</programlisting>
+Your driver does <emphasis>not</emphasis> create an instance of this
+structure. It is provided for driver code to use in the
+<type>eth_drv</type> member of the function record.
+Its usage is described below in <xref linkend=io-eth-drv-upper-api>
+</para><para>
+One more function completes the API with which your driver communicates
+with the rest of the stack:
+<programlisting>
+extern void eth_drv_dsr(cyg_vector_t vector,
+ cyg_ucount32 count,
+ cyg_addrword_t data);
+</programlisting>
+</para><para>
+This function is designed so that it can be registered as the DSR for your
+interrupt handler. It will awaken the
+&ldquo;Network Delivery Thread&rdquo;
+to call your deliver routine. See <xref linkend=io-eth-drv-api-deliver>.
+</para><para>
+You create an instance of <type>struct eth_drv_sc</type>
+using the
+<function>ETH_DRV_SC()</function>
+macro which
+sets up the structure, including the prototypes for the functions, etc.
+By doing things this way, if the internal design of the ethernet drivers
+changes (e.g. we need to add a new low-level implementation function),
+existing drivers will no longer compile until updated. This is much
+better than to have all of the definitions in the low-level drivers
+themselves and have them be (quietly) broken if the interfaces change.
+</para><para>
+The &ldquo;magic&rdquo;
+which gets the drivers started (and indeed, linked) is
+similar to what is used for the I/O subsystem.
+This is done using the
+<function>NETDEVTAB_ENTRY()</function>
+macro, which defines an initialization function
+and the basic data structures for the low-level driver.
+</para>
+<para><programlisting>
+ typedef struct cyg_netdevtab_entry {
+ const char *name;
+ bool (*init)(struct cyg_netdevtab_entry *tab);
+ void *device_instance;
+ unsigned long status;
+ } cyg_netdevtab_entry_t;
+</programlisting>
+The <varname>device_instance</varname>
+entry here would point to the <type>struct eth_drv_sc</type>
+entry previously defined. This allows the network driver
+setup to work with any class of driver, not just ethernet drivers. In
+the future, there will surely be serial <acronym>PPP</acronym>
+drivers, etc. These will
+use the <function>NETDEVTAB_ENTRY()</function>
+setup to create the basic driver, but they will
+most likely be built on top of other high-level device driver layers.
+</para><para>
+To instantiate itself, and connect it to the system,
+a hardware driver will have a template
+(boilerplate) which looks something like this:
+<programlisting>
+#include &lt;cyg/infra/cyg_type.h&gt;
+#include &lt;cyg/hal/hal_arch.h&gt;
+#include &lt;cyg/infra/diag.h&gt;
+#include &lt;cyg/hal/drv_api.h&gt;
+#include &lt;cyg/io/eth/netdev.h&gt;
+#include &lt;cyg/io/eth/eth_drv.h&gt;
+
+ETH_DRV_SC(<replaceable>DRV</replaceable>_sc,
+ 0, // No driver specific data needed
+ "eth0", // Name for this interface
+ <replaceable>HRDWR</replaceable>_start,
+ <replaceable>HRDWR</replaceable>_stop,
+ <replaceable>HRDWR</replaceable>_control,
+ <replaceable>HRDWR</replaceable>_can_send
+ <replaceable>HRDWR</replaceable>_send,
+ <replaceable>HRDWR</replaceable>_recv,
+ <replaceable>HRDWR</replaceable>_deliver,
+ <replaceable>HRDWR</replaceable>_poll,
+ <replaceable>HRDWR</replaceable>_int_vector
+);
+
+NETDEVTAB_ENTRY(<replaceable>DRV</replaceable>_netdev,
+ "<replaceable>DRV</replaceable>",
+ <replaceable>DRV_HRDWR</replaceable>_init,
+ &amp;<replaceable>DRV</replaceable>_sc);
+</programlisting>
+</para><para>
+This, along with the referenced functions, completely define the driver.
+</para><note><para>
+If one needed the same low-level driver to handle
+multiple similar hardware interfaces, you would need multiple invocations
+of the
+<function>ETH_DRV_SC()</function>/<function>NETDEVTAB_ENTRY()</function>
+macros. You would add a pointer
+to some instance specific data, e.g. containing base addresses, interrupt
+numbers, etc, where the
+<programlisting>
+ 0, // No driver specific data
+</programlisting>
+is currently.
+</para></note>
+</sect1>
+<sect1 id="io-eth-drv-api-funcs">
+<title>Review of the functions</title>
+<para>
+Now a brief review of the functions. This discussion will use generic
+names for the functions &mdash; your driver should use hardware-specific
+names to maintain uniqueness against any other drivers.
+</para>
+<sect2 id="io-eth-drv-api-init">
+<title>Init function</title>
+<para>
+<programlisting>
+static bool <replaceable>DRV_HDWR</replaceable>_init(struct cyg_netdevtab_entry *tab)
+</programlisting>
+This function is called as part of system initialization. Its primary
+function is to decide if the hardware (as indicated via
+<type>tab-&gt;device_instance</type>)
+is working and if the interface needs to be made
+available in the system. If this is the case, this function needs to
+finish with a call to the ethernet driver function:
+<programlisting>
+ struct eth_drv_sc *sc = (struct eth_drv_sc *)tab->device_instance;
+ <replaceable>....initialization code....</replaceable>
+ // Initialize upper level driver
+ (sc-&gt;funs-&gt;eth_drv-&gt;init)( sc, unsigned char *enaddr );
+</programlisting>
+where <parameter>enaddr</parameter>
+is a pointer to the ethernet station address for this unit, to inform
+the stack of this device's readiness and availability.
+</para>
+<note><para>The ethernet station address
+(<acronym>ESA</acronym>)
+is supposed to be a
+world-unique, 48 bit address for this particular ethernet interface.
+Typically it is provided by the board/hardware manufacturer in ROM.
+</para>
+<para>
+In many packages it is possible for the
+<acronym>ESA</acronym>
+to be set from RedBoot,
+(perhaps from 'fconfig' data), hard-coded from
+<acronym>CDL</acronym>, or from an <acronym>EPROM</acronym>.
+A driver should choose a run-time specified
+<acronym>ESA</acronym>
+(e.g. from RedBoot)
+preferentially, otherwise (in order) it should use a <acronym>CDL</acronym> specified
+<acronym>ESA</acronym>
+if one has been set, otherwise an <acronym>EPROM</acronym> set
+<acronym>ESA</acronym>, or otherwise
+fail. See the <filename>cl/cs8900a</filename>
+ethernet driver for an example.
+</para></note>
+</sect2>
+<sect2 id="io-eth-drv-api-start">
+<title>Start function</title>
+<para>
+<programlisting>
+static void
+<replaceable>HRDWR</replaceable>_start(struct eth_drv_sc *sc, unsigned char *enaddr, int flags)
+</programlisting>
+This function is called, perhaps much later than system initialization
+time, when the system (an application) is ready for the interface to
+become active. The purpose of this function is to set up the hardware
+interface to start accepting packets from the network and be able to
+send packets out. The receiver hardware should not be enabled prior to
+this call.
+</para><note><para>This function will be called whenever the
+up/down state of the logical interface changes, e.g. when the IP address
+changes, or when promiscuous mode is selected by means of an
+<function>ioctl()</function> call in the application.
+This may occur more than once, so this function needs to
+be prepared for that case.
+</para></note><note><para>
+In future, the <parameter>flags</parameter>
+field (currently unused) may be used to tell the
+function how to start up, e.g. whether interrupts will be used,
+alternate means of selecting promiscuous mode etc.
+</para></note>
+</sect2>
+<sect2 id="io-eth-drv-api-stop">
+<title>Stop function</title>
+<para>
+<programlisting>
+static void <replaceable>HRDWR</replaceable>_stop(struct eth_drv_sc *sc)
+</programlisting>
+This function is the inverse of &ldquo;start.&rdquo;
+It should shut down the hardware, disable the receiver, and keep it from
+interacting with the physical network.
+</para>
+</sect2>
+<sect2 id="io-eth-drv-api-control">
+<title>Control function</title>
+<para>
+<programlisting>
+static int
+<replaceable>HRDWR</replaceable>_control(
+ struct eth_drv_sc *sc, unsigned long key,
+ void *data, int len)
+</programlisting>
+This function is used to perform low-level &ldquo;control&rdquo;
+operations on the
+interface. These operations would typically be initiated via
+<function>ioctl()</function> calls in the BSD
+stack, and would be anything that might require the hardware setup to
+change (i.e. cannot be performed totally by the
+platform-independent layers).
+</para><para>
+The <parameter>key</parameter> parameter selects the operation, and the
+<parameter>data</parameter> and <parameter>len</parameter> params point describe,
+as required, some data for the operation in question.
+</para>
+<variablelist><title>Available Operations:</title>
+<varlistentry><term>ETH_DRV_SET_MAC_ADDRESS</term>
+<listitem><para>
+This operation sets the ethernet station address (ESA or MAC) for the
+device. Normally this address is kept in non-volatile memory and is
+unique in the world. This function must at least set the interface to
+use the new address. It may also update the NVM as appropriate.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>ETH_DRV_GET_IF_STATS_UD</term>
+<term>ETH_DRV_GET_IF_STATS</term>
+<listitem><para>
+These acquire a set of statistical counters from the interface, and write
+the information into the memory pointed to by <parameter>data</parameter>.
+The &ldquo;UD&rdquo; variant explicitly instructs the driver to acquire
+up-to-date values. This is a separate option because doing so may take
+some time, depending on the hardware.
+</para><para>
+The definition of the data structure is in
+<filename>cyg/io/eth/eth_drv_stats.h</filename>.
+</para><para>
+This call is typically made by SNMP, see <xref linkend=net-snmp-ecos-port>.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry><term>ETH_DRV_SET_MC_LIST</term>
+<listitem><para>
+This entry instructs the device to set up multicast packet filtering
+to receive only packets addressed to the multicast ESAs in the list pointed
+to by <parameter>data</parameter>.
+</para><para>
+The format of the data is a 32-bit count of the ESAs in the list, followed
+by packed bytes which are the ESAs themselves, thus:
+<programlisting>
+#define ETH_DRV_MAX_MC 8
+struct eth_drv_mc_list {
+ int len;
+ unsigned char addrs[ETH_DRV_MAX_MC][ETHER_ADDR_LEN];
+};
+</programlisting>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry><term>ETH_DRV_SET_MC_ALL</term>
+<listitem><para>
+This entry instructs the device to receive all multicast packets, and
+delete any explicit filtering which had been set up.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+<para>
+This function should return zero if the specified operation was
+completed successfully. It should return non-zero if the operation
+could not be performed, for any reason.
+</para>
+</sect2>
+<sect2 id="io-eth-drv-api-can-send">
+<title>Can-send function</title>
+<para>
+<programlisting>
+static int <replaceable>HRDWR</replaceable>_can_send(struct eth_drv_sc *sc)
+</programlisting>
+This function is called to determine if it is possible to start the
+transmission of a packet on the interface. Some interfaces will allow
+multiple packets to be "queued" and this function allows for the highest
+possible utilization of that mode.
+</para><para>
+Return the number of packets which could be accepted at this time, zero
+implies that the interface is saturated/busy.
+</para>
+</sect2>
+<sect2 id="io-eth-drv-api-send">
+<title>Send function</title>
+<para>
+<programlisting>
+struct eth_drv_sg {
+ CYG_ADDRESS buf;
+ CYG_ADDRWORD len;
+};
+
+static void
+<replaceable>HRDWR</replaceable>_send(
+ struct eth_drv_sc *sc,
+ struct eth_drv_sg *sg_list, int sg_len,
+ int total_len, unsigned long key)
+</programlisting>
+This function is used to send a packet of data to the network. It is
+the responsibility of this function to somehow hand the data over to the
+hardware interface. This will most likely require copying, but just the
+address/length values could be used by smart hardware.
+</para><note><para>
+All data in/out of the driver is specified via a
+&ldquo;scatter-gather&rdquo;
+list. This is just an array of address/length pairs which describe
+sections of data to move (in the order given by the array), as in the
+<type>struct eth_drv_sg</type> defined above and pointed to by
+<parameter>sg_list</parameter>.
+</para></note><para>
+Once the data has been successfully sent by the interface (or if an
+error occurs), the driver should call
+<function>(sc->funs->eth_drv->tx_done)()</function>
+(see <xref linkend=io-eth-drv-tx-done>)
+using the specified <parameter>key</parameter>.
+Only then will the upper layers release the resources
+for that packet and start another transmission.
+</para><note><para>
+In future, this function may be extended so that the data need not be
+copied by having the function return a &ldquo;disposition&rdquo; code
+(done, send pending, etc). At this point, you should move the data to some
+&ldquo;safe&rdquo; location before returning.
+</para></note>
+</sect2>
+<sect2 id="io-eth-drv-api-deliver">
+<title>Deliver function</title>
+<para>
+<programlisting>
+static void
+<replaceable>HRDWR</replaceable>_deliver(struct eth_drv_sc *sc)
+</programlisting>
+This function is called from the &ldquo;Network Delivery Thread&rdquo; in
+order to let the device driver do the time-consuming work associated with
+receiving a packet &mdash; usually copying the entire packet from the
+hardware or a special memory location into the network stack's memory.
+</para><para>
+After handling any outstanding incoming packets or pending transmission
+status, it can unmask the device's interrupts, and free any relevant
+resources so it can process further packets.
+</para><para>
+It will be called when the interrupt handler for the network device
+has called
+<programlisting>
+ eth_drv_dsr( vector, count, (cyg_addrword_t)sc );
+</programlisting>
+to alert the system that &ldquo;something requires attention.&rdquo;
+This <function>eth_drv_dsr()</function> call must occur from within the
+interrupt handler's DSR (not the ISR) or actually <emphasis>be</emphasis>
+the DSR, whenever it is determined that
+the device needs attention from the foreground. The third parameter
+(<parameter>data</parameter> in the prototype of
+<function>eth_drv_dsr()</function> <emphasis>must</emphasis>
+be a valid <type>struct eth_drv_sc</type> pointer <varname>sc</varname>.
+</para><para>
+The reason for this slightly convoluted train of events is to keep the DSR
+(and ISR) execution time as short as possible, so that other activities of
+higher priority than network servicing are not denied the CPU by network
+traffic.
+</para><para>
+To deliver a newly-received packet into the network stack, the deliver
+routine must call
+<programlisting>
+(sc->funs->eth_drv->recv)(sc, len);
+</programlisting>
+which will in turn call the receive function, which we talk about next.
+See also <xref linkend=io-eth-drv-upper-recv> below.
+</para>
+</sect2>
+<sect2 id="io-eth-drv-api-recv">
+<title>Receive function</title>
+<para>
+<programlisting>
+static void
+<replaceable>HRDWR</replaceable>_recv(
+ struct eth_drv_sc *sc,
+ struct eth_drv_sg *sg_list, int sg_len)
+</programlisting>
+This function is a call back, only invoked after the
+upper-level function
+<programlisting>
+(sc->funs->eth_drv->recv)(struct eth_drv_sc *sc, int total_len)
+</programlisting>
+has been called itself from your deliver function when it knows that a
+packet of data is available on the
+interface. The <function>(sc->funs->eth_drv->recv)()</function>
+function then arranges network buffers
+and structures for the data and then calls
+<function><replaceable>HRDWR</replaceable>_recv()</function> to actually
+move the data from the interface.
+</para><para>
+A scatter-gather list (<type>struct eth_drv_sg</type>) is used once more,
+just like in the send case.
+</para>
+</sect2>
+<sect2 id="io-eth-drv-api-poll">
+<title>Poll function</title>
+<para>
+<programlisting>
+static void
+<replaceable>HRDWR</replaceable>_poll(struct eth_drv_sc *sc)
+</programlisting>
+This function is used when in a non-interrupt driven system, e.g. when
+interrupts are completely disabled. This allows the driver time to check
+whether anything needs doing either for transmission, or to check if
+anything has been received, or if any other processing needs doing.
+</para><para>
+It is perfectly correct and acceptable for the poll function to look like
+this:
+<programlisting>
+static void
+<replaceable>HRDWR</replaceable>_poll(struct eth_drv_sc *sc)
+{
+ <replaceable>my_interrupt_ISR</replaceable>(sc);
+ <replaceable>HRDWR</replaceable>_deliver(struct eth_drv_sc *sc);
+}
+</programlisting>
+provided that both the ISR and the deliver functions are idempotent and
+harmless if called when there is no attention needed by the hardware. Some
+devices might not need a call to the ISR here if the deliver function
+contains all the &ldquo;intelligence.&rdquo;
+</para>
+</sect2>
+<sect2 id="io-eth-drv-api-int-vector">
+<title>Interrupt-vector function</title>
+<para>
+<programlisting>
+static int
+<replaceable>HRDWR</replaceable>_int_vector(struct eth_drv_sc *sc)
+</programlisting>
+This function returns the interrupt vector number used for receive
+interrupts.
+This is so that the common GDB stubs can detect when to check
+for incoming &ldquo;CTRL-C&rdquo; packets (used to asynchronously
+halt the application) when debugging over ethernet.
+The GDB stubs need to know which interrupt the ethernet device uses
+so that they can mask or unmask that interrupt as required.
+</para>
+</sect2>
+</sect1>
+<sect1 id=io-eth-drv-upper-api>
+<title>Upper Layer Functions</title>
+<para>
+Upper layer functions are called by drivers to deliver received packets
+or transmission completion status back up into the network stack.
+</para><para>
+These functions are defined by the hardware independent upper layers of
+the networking driver support. They are present to hide the interfaces
+to the actual networking stack so that the hardware drivers may
+be used by different network stack implementations without change.
+</para><para>
+These functions require a pointer to a <type>struct eth_drv_sc</type>
+which describes the interface at a logical level. It is assumed that the
+low level hardware driver will keep track of this pointer so
+it may be passed &ldquo;up&rdquo; as appropriate.
+</para>
+<sect2 id="io-eth-drv-upper-init">
+<title>Callback Init function</title>
+<para>
+<programlisting>
+void (sc->funs->eth_drv->init)(
+ struct eth_drv_sc *sc, unsigned char *enaddr)
+</programlisting>
+This function establishes the device at initialization time.
+It should be called once per device instance only, from the
+initialization function, if all is well
+(see <xref linkend=io-eth-drv-api-init>).
+The hardware should be totally initialized
+(<emphasis>not</emphasis> &ldquo;started&rdquo;)
+when this function is called.
+</para>
+</sect2>
+<sect2 id="io-eth-drv-tx-done">
+<title>Callback Tx-Done function</title>
+<para>
+<programlisting>
+void (sc->funs->eth_drv->tx_done)(
+ struct eth_drv_sc *sc,
+ unsigned long key, int status)
+</programlisting>
+This function is called when a packet completes transmission on the
+interface. The <parameter>key</parameter>
+value must be one of the keys provided to
+<function><replaceable>HRDWR</replaceable>_send()</function>
+above. The value <parameter>status</parameter> should be non-zero
+(details currently undefined) to indicate that an error occurred during the
+transmission, and zero if all was well.
+</para><para>
+It should be called from the deliver function
+(see <xref linkend=io-eth-drv-api-deliver>)
+or poll function
+(see <xref linkend=io-eth-drv-api-poll>).
+</para>
+</sect2>
+<sect2 id="io-eth-drv-upper-recv">
+<title>Callback Receive function</title>
+<para>
+<programlisting>
+void (sc->funs->eth_drv->recv)(struct eth_drv_sc *sc, int len)
+</programlisting>
+This function is called to indicate that a packet of length
+<parameter>len</parameter> has
+arrived at the interface.
+The callback
+<function><replaceable>HRDWR</replaceable>_recv()</function> function
+described above will be used to actually unload the data from the
+interface into buffers used by the device independent layers.
+</para><para>
+It should be called from the deliver function
+(see <xref linkend=io-eth-drv-api-deliver>)
+or poll function
+(see <xref linkend=io-eth-drv-api-poll>).
+</para>
+</sect2>
+</sect1>
+<sect1 id=io-eth-call-graph>
+<title>Calling graph for Transmission and Reception</title>
+<para>
+It may be worth clarifying further the flow of control in the transmit and
+receive cases, where the hardware driver does use interrupts and so DSRs to
+tell the &ldquo;foreground&rdquo; when something asynchronous has occurred.
+</para>
+<sect2 id=io-eth-call-graph-tx>
+<title>Transmission</title>
+<orderedlist>
+<listitem><para>
+Some foreground task such as the application, SNMP &ldquo;daemon&rdquo;,
+DHCP management thread or whatever, calls into network stack to send a
+packet, or the stack decides to send a packet in response to incoming
+traffic such as a &ldquo;ping&rdquo; or <acronym>ARP</acronym> request.
+</para></listitem>
+<listitem><para>
+The driver calls the
+<function><replaceable>HRDWR</replaceable>_can_send()</function>
+function in the hardware driver.
+</para></listitem>
+<listitem><para>
+<function><replaceable>HRDWR</replaceable>_can_send()</function>
+returns the number of available "slots" in which it
+can store a pending transmit packet.
+If it cannot send at this time, the packet is queued outside the
+hardware driver for later; in this case, the hardware is already busy
+transmitting, so expect an interrupt as described below for completion
+of the packet currently outgoing.
+</para></listitem>
+<listitem><para>
+If it can send right now, <replaceable>HRDWR</replaceable>_send() is called.
+<function><replaceable>HRDWR</replaceable>_send()</function> copies the
+data into special hardware buffers, or instructs the hardware to
+&ldquo;send that.&rdquo; It also remembers the key that is associated with
+this tx request.
+</para></listitem>
+<listitem><para>
+These calls return &hellip; time passes &hellip;
+</para></listitem>
+<listitem><para>
+Asynchronously, the hardware makes an interrupt to say
+&ldquo;transmit is done.&rdquo;
+The ISR quietens the interrupt source in the hardware and
+requests that the associated DSR be run.
+</para></listitem>
+<listitem><para>
+The DSR calls (or <emphasis>is</emphasis>) the
+<function>eth_drv_dsr()</function> function in the generic driver.
+</para></listitem>
+<listitem><para>
+<function>eth_drv_dsr()</function> in the generic driver awakens the
+&ldquo;Network Delivery Thread&rdquo; which calls the deliver function
+<replaceable>HRDWR</replaceable>_deliver() in the driver.
+</para></listitem>
+<listitem><para>
+The deliver function realizes that a transmit request has completed,
+and calls the callback tx-done function
+<function>(sc->funs->eth_drv->tx_done)()</function>
+with the same key that it remembered for this tx.
+</para></listitem>
+<listitem><para>
+The callback tx-done function
+uses the key to find the resources associated with
+this transmit request; thus the stack knows that the transmit has
+completed and its resources can be freed.
+</para></listitem>
+<listitem><para>
+The callback tx-done function
+also enquires whether <replaceable>HRDWR</replaceable>_can_send() now says
+&ldquo;yes, we can send&rdquo;
+and if so, dequeues a further transmit request
+which may have been queued as described above. If so, then
+<replaceable>HRDWR</replaceable>_send() copies the data into the hardware buffers, or
+instructs the hardware to "send that" and remembers the new key, as above.
+These calls then all return to the &ldquo;Network Delivery Thread&rdquo;
+which then sleeps, awaiting the next asynchronous event.
+</para></listitem>
+<listitem><para>
+All done &hellip;
+</para></listitem>
+</orderedlist>
+</sect2>
+<sect2 id=io-eth-call-graph-rx>
+<title>Receive</title>
+<orderedlist>
+<listitem><para>
+Asynchronously, the hardware makes an interrupt to say
+&ldquo;there is ready data in a receive buffer.&rdquo;
+The ISR quietens the interrupt source in the hardware and
+requests that the associated DSR be run.
+</para></listitem>
+<listitem><para>
+The DSR calls (or <emphasis>is</emphasis>) the
+<function>eth_drv_dsr()</function> function in the generic driver.
+</para></listitem>
+<listitem><para>
+<function>eth_drv_dsr()</function> in the generic driver awakens the
+&ldquo;Network Delivery Thread&rdquo; which calls the deliver function
+<replaceable>HRDWR</replaceable>_deliver() in the driver.
+</para></listitem>
+<listitem><para>
+The deliver function realizes that there is data ready and calls
+the callback receive function
+<function>(sc->funs->eth_drv->recv)()</function>
+to tell it how many bytes to prepare for.
+</para></listitem>
+<listitem><para>
+The callback receive function allocates memory within the stack
+(eg. <type>MBUFs</type> in BSD/Unix style stacks) and prepares
+a set of scatter-gather buffers that can
+accommodate the packet.
+</para></listitem>
+<listitem><para>
+It then calls back into the hardware driver routine
+<replaceable>HRDWR</replaceable>_recv().
+<replaceable>HRDWR</replaceable>_recv() must copy the data from the
+hardware's buffers into the scatter-gather buffers provided, and return.
+</para></listitem>
+<listitem><para>
+The network stack now has the data in-hand, and does with it what it will.
+This might include recursive calls to transmit a response packet.
+When this all is done, these calls return, and the
+&ldquo;Network Delivery Thread&rdquo;
+sleeps once more, awaiting the next asynchronous event.
+</para></listitem>
+</orderedlist>
+</sect2>
+</sect1>
+</chapter>
+</part>
diff --git a/cesar/ecos/packages/io/eth/current/include/eth_drv.h b/cesar/ecos/packages/io/eth/current/include/eth_drv.h
new file mode 100644
index 0000000000..387d216004
--- /dev/null
+++ b/cesar/ecos/packages/io/eth/current/include/eth_drv.h
@@ -0,0 +1,244 @@
+//==========================================================================
+//
+// include/cyg/io/eth/eth_drv.h
+//
+// High level networking driver interfaces
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-01-10
+// Purpose:
+// Description: High level networking driver interfaces
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+// Ethernet driver structure
+
+#ifndef _ETH_DRV_H_
+#define _ETH_DRV_H_
+
+#include <pkgconf/system.h>
+#include <pkgconf/io_eth_drivers.h>
+
+#ifdef CYGPKG_NET
+#include <sys/param.h>
+#include <sys/socket.h>
+
+#include <net/if.h>
+
+#ifdef INET
+#include <netinet/in.h>
+#include <netinet/in_systm.h>
+#include <netinet/in_var.h>
+#include <netinet/ip.h>
+#include <netinet/if_ether.h>
+#endif
+
+#ifndef NBPFILTER
+#define NBPFILTER 0
+#endif
+
+#if NBPFILTER > 0
+#include <net/bpf.h>
+#include <net/bpfdesc.h>
+#endif
+
+#else // !CYGPKG_NET
+#include <cyg/hal/drv_api.h>
+#endif
+#ifdef CYGPKG_NET_LWIP
+#include "lwip/netif.h"
+#endif
+
+struct eth_drv_sg {
+ CYG_ADDRESS buf;
+ CYG_ADDRWORD len;
+};
+
+#define MAX_ETH_DRV_SG CYGNUM_IO_ETH_DRIVERS_SG_LIST_SIZE
+
+struct eth_drv_sc;
+
+struct eth_drv_funs {
+ // Logical driver - initialization
+ void (*init)(struct eth_drv_sc *sc,
+ unsigned char *enaddr);
+ // Logical driver - incoming packet notifier
+ void (*recv)(struct eth_drv_sc *sc,
+ int total_len);
+ // Logical driver - outgoing packet notifier
+ void (*tx_done)(struct eth_drv_sc *sc,
+ CYG_ADDRESS key,
+ int status);
+};
+
+struct eth_hwr_funs {
+ // Initialize hardware (including startup)
+ void (*start)(struct eth_drv_sc *sc,
+ unsigned char *enaddr,
+ int flags);
+ // Shut down hardware
+ void (*stop)(struct eth_drv_sc *sc);
+ // Device control (ioctl pass-thru)
+ int (*control)(struct eth_drv_sc *sc,
+ unsigned long key,
+ void *data,
+ int data_length);
+ // Query - can a packet be sent?
+ int (*can_send)(struct eth_drv_sc *sc);
+ // Send a packet of data
+ void (*send)(struct eth_drv_sc *sc,
+ struct eth_drv_sg *sg_list,
+ int sg_len,
+ int total_len,
+ unsigned long key);
+ // Receive [unload] a packet of data
+ void (*recv)(struct eth_drv_sc *sc,
+ struct eth_drv_sg *sg_list,
+ int sg_len);
+ // Deliver data to/from device from/to stack memory space
+ // (moves lots of memcpy()s out of DSRs into thread)
+ void (*deliver)(struct eth_drv_sc *sc);
+ // Poll for interrupts/device service
+ void (*poll)(struct eth_drv_sc *sc);
+ // Get interrupt information from hardware driver
+ int (*int_vector)(struct eth_drv_sc *sc);
+ // Logical driver interface
+ struct eth_drv_funs *eth_drv, *eth_drv_old;
+};
+
+#ifdef CYGPKG_IO_ETH_DRIVERS_STAND_ALONE
+struct arpcom {
+ unsigned char esa[6];
+};
+#endif
+
+#ifdef CYGPKG_NET_LWIP
+struct arpcom {
+ struct netif ac_if;
+};
+#endif
+
+struct eth_drv_sc {
+ struct eth_hwr_funs *funs;
+ void *driver_private;
+ const char *dev_name;
+ int state;
+ struct arpcom sc_arpcom; /* ethernet common */
+};
+
+#define ETH_DRV_SC(sc,priv,name,start,stop,control,can_send,send,recv,deliver,poll,int_vector) \
+static void start(struct eth_drv_sc *sc, unsigned char *enaddr, int flags); \
+static void stop(struct eth_drv_sc *sc); \
+static int control(struct eth_drv_sc *sc, unsigned long key, void *data, int data_length); \
+static int can_send(struct eth_drv_sc *sc); \
+static void send(struct eth_drv_sc *sc, struct eth_drv_sg *sg_list, int sg_len, int total, unsigned long key); \
+static void recv(struct eth_drv_sc *sc, struct eth_drv_sg *sg_list, int sg_len); \
+static void deliver(struct eth_drv_sc *sc); \
+static void poll(struct eth_drv_sc *sc); \
+static int int_vector(struct eth_drv_sc *sc); \
+static struct eth_hwr_funs sc##_funs = { \
+ start, \
+ stop, \
+ control, \
+ can_send, \
+ send, \
+ recv, \
+ deliver, \
+ poll, \
+ int_vector, \
+ &eth_drv_funs, \
+ (struct eth_drv_funs *)0 }; \
+struct eth_drv_sc sc = {&sc##_funs, priv, name};
+
+#define ETH_DRV_STATE_ACTIVE 0x0001
+#define ETH_DRV_NEEDS_DELIVERY 0x0002
+#define ETH_DRV_STATE_DEBUG 0x1000
+
+// Register this as your DSR within your driver: it will cause your deliver
+// routine to be called from the network thread. The "data" parameter
+// *must* be your own "struct eth_drv_sc *sc" pointer.
+extern void eth_drv_dsr(cyg_vector_t vector,
+ cyg_ucount32 count,
+ cyg_addrword_t data);
+
+extern struct eth_drv_funs eth_drv_funs;
+
+#ifdef CYGPKG_IO_PCMCIA
+#ifdef CYGPKG_NET
+#include <cyg/io/eth/netdev.h>
+cyg_netdevtab_entry_t *eth_drv_netdev(char *name);
+#endif
+#endif // CYGPKG_IO_PCMCIA
+
+// Control 'key's
+#define ETH_DRV_SET_MAC_ADDRESS 0x0100
+
+#ifdef CYGPKG_NET
+#define ETH_DRV_GET_IF_STATS_UD 0x0101
+#define ETH_DRV_GET_IF_STATS 0x0102
+#include <cyg/io/eth/eth_drv_stats.h> // The struct * for these ops.
+#endif
+
+#ifndef ETHER_ADDR_LEN
+#define ETHER_ADDR_LEN 6
+#endif
+
+#define ETH_DRV_SET_MC_LIST 0x0110 // Set multicast list
+#define ETH_DRV_SET_MC_ALL 0x0111 // Set multicast all mode
+#define ETH_DRV_MAX_MC 8
+struct eth_drv_mc_list {
+ int len;
+ unsigned char addrs[ETH_DRV_MAX_MC][ETHER_ADDR_LEN];
+};
+
+#ifndef CYGPKG_NET
+extern void eth_drv_buffers_init(void);
+extern int eth_drv_read(char *eth_hdr, char *buf, int len);
+extern void eth_drv_write(char *eth_hdr, char *buf, int len);
+extern int eth_drv_int_vector(void);
+extern void eth_drv_stop(void);
+extern unsigned char __local_enet_addr[];
+extern struct eth_drv_sc *__local_enet_sc;
+#endif
+
+#endif // _ETH_DRV_H_
diff --git a/cesar/ecos/packages/io/eth/current/include/eth_drv_stats.h b/cesar/ecos/packages/io/eth/current/include/eth_drv_stats.h
new file mode 100644
index 0000000000..524703e354
--- /dev/null
+++ b/cesar/ecos/packages/io/eth/current/include/eth_drv_stats.h
@@ -0,0 +1,122 @@
+#ifndef CYGONCE_IO_ETH_ETH_DRV_STATS_H
+#define CYGONCE_IO_ETH_ETH_DRV_STATS_H
+//==========================================================================
+//
+// include/cyg/io/eth/eth_drv_stats.h
+//
+// High level networking driver interfaces - statistics gathering
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 2000-08-23
+// Purpose:
+// Description: High level networking driver interfaces - stats gathering
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+
+#ifdef CYGPKG_NET
+#include <sys/param.h>
+#include <sys/socket.h>
+
+#include <net/if.h>
+
+// This information is oriented towards SNMP's needs.
+
+#define DESC_LEN (48)
+#define SNMP_CHIPSET_LEN (20)
+
+struct ether_drv_stats {
+ struct ifreq ifreq; // tell ioctl() which interface.
+
+ char description[ DESC_LEN ]; // Textual description of hardware
+ unsigned char snmp_chipset[ SNMP_CHIPSET_LEN ];
+ // SNMP ID of chipset
+ unsigned char duplex; // 1 = UNKNOWN, 2 = SIMPLEX, 3 = DUPLEX
+ unsigned char operational; // 1 = UNKNOWN, 2 = DOWN, 3 = UP
+ // These are general status information:
+ unsigned int speed; // 10,000,000 or 100,000,000
+ // to infinity and beyond?
+
+ // These are typically kept by device hardware - and there may be some
+ // cost for getting up to date values:
+
+ unsigned int supports_dot3; /* Boolean value if the device supports dot3*/
+ unsigned int tx_good;
+ unsigned int tx_max_collisions;
+ unsigned int tx_late_collisions;
+ unsigned int tx_underrun;
+ unsigned int tx_carrier_loss;
+ unsigned int tx_deferred;
+ unsigned int tx_sqetesterrors;
+ unsigned int tx_single_collisions;
+ unsigned int tx_mult_collisions;
+ unsigned int tx_total_collisions;
+ unsigned int rx_good;
+ unsigned int rx_crc_errors;
+ unsigned int rx_align_errors;
+ unsigned int rx_resource_errors;
+ unsigned int rx_overrun_errors;
+ unsigned int rx_collisions;
+ unsigned int rx_short_frames;
+ unsigned int rx_too_long_frames;
+ unsigned int rx_symbol_errors;
+
+ // These are typically kept by driver software:
+ unsigned int interrupts;
+ unsigned int rx_count;
+ unsigned int rx_deliver;
+ unsigned int rx_resource;
+ unsigned int rx_restart;
+ unsigned int tx_queue_len;
+ unsigned int tx_count;
+ unsigned int tx_complete;
+ unsigned int tx_dropped;
+
+ // Add any others here...
+
+};
+#endif // CYGPKG_NET
+#endif // CYGONCE_IO_ETH_ETH_DRV_STATS_H
+
+// EOF include/cyg/io/eth/eth_drv_stats.h
diff --git a/cesar/ecos/packages/io/eth/current/include/netdev.h b/cesar/ecos/packages/io/eth/current/include/netdev.h
new file mode 100644
index 0000000000..1ab4e882a7
--- /dev/null
+++ b/cesar/ecos/packages/io/eth/current/include/netdev.h
@@ -0,0 +1,79 @@
+#ifndef _NETDEV_H_
+#define _NETDEV_H_
+//==========================================================================
+//
+// include/netdev.h
+//
+// Network device description
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-01-10
+// Purpose:
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/hal/hal_tables.h>
+
+// Network device support
+
+typedef struct cyg_netdevtab_entry {
+ const char *name;
+ bool (*init)(struct cyg_netdevtab_entry *tab);
+ void *device_instance; // Local data, instance specific
+ unsigned long status;
+} CYG_HAL_TABLE_TYPE cyg_netdevtab_entry_t;
+
+#define CYG_NETDEVTAB_STATUS_AVAIL 0x0001
+
+extern cyg_netdevtab_entry_t __NETDEVTAB__[], __NETDEVTAB_END__;
+
+#define NETDEVTAB_ENTRY(_l,_name,_init,_instance) \
+static bool _init(struct cyg_netdevtab_entry *tab); \
+cyg_netdevtab_entry_t _l CYG_HAL_TABLE_ENTRY(netdev) = { \
+ _name, \
+ _init, \
+ _instance \
+};
+
+#endif // _NETDEV_H_
diff --git a/cesar/ecos/packages/io/eth/current/src/lwip/README b/cesar/ecos/packages/io/eth/current/src/lwip/README
new file mode 100644
index 0000000000..752f3dedb2
--- /dev/null
+++ b/cesar/ecos/packages/io/eth/current/src/lwip/README
@@ -0,0 +1,10 @@
+An EPK of lwip is available from http://humans.iv.ro/jani which has the most
+up-to-date package (at least until it all gets integrated).
+
+It has just been tested on another ARM similar to the EB40 with CS89000
+and it works there too (that board has 128K of RAM).
+
+Alternatively, lw.diff is the diff against the lwip-0.5.3 tree. It contains
+eCos support + an eCos project sample based on unixsim. Look at
+lwip-0.5.3/proj/ecos to see how to use it. Modify the Makefile to suit
+your needs and to reflect your eCos project dir.
diff --git a/cesar/ecos/packages/io/eth/current/src/lwip/eth_drv.c b/cesar/ecos/packages/io/eth/current/src/lwip/eth_drv.c
new file mode 100644
index 0000000000..c83471fe25
--- /dev/null
+++ b/cesar/ecos/packages/io/eth/current/src/lwip/eth_drv.c
@@ -0,0 +1,332 @@
+//==========================================================================
+//
+// src/lwip/eth_drv.c
+//
+// Hardware independent ethernet driver for lwIP
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Jani Monoses <jani@iv.ro>
+// Contributors:
+// Date: 2002-04-05
+// Purpose: Hardware independent ethernet driver
+// Description: Based on the standalone driver for RedBoot.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/io_eth_drivers.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/drv_api.h>
+#include <cyg/hal/hal_if.h>
+#include <cyg/io/eth/eth_drv.h>
+#include <cyg/io/eth/netdev.h>
+#include <string.h>
+
+#include <cyg/hal/hal_tables.h>
+#include <cyg/kernel/kapi.h>
+
+#include "lwip/opt.h"
+#include "lwip/ip.h"
+#include "lwip/mem.h"
+#include "lwip/pbuf.h"
+#include "lwip/sys.h"
+
+#include "netif/etharp.h"
+
+
+// Interfaces exported to drivers
+
+static void eth_drv_init(struct eth_drv_sc *sc, unsigned char *enaddr);
+static void eth_drv_recv(struct eth_drv_sc *sc, int total_len);
+static void eth_drv_tx_done(struct eth_drv_sc *sc, CYG_ADDRWORD key, int status);
+
+struct eth_drv_funs eth_drv_funs = { eth_drv_init, eth_drv_recv, eth_drv_tx_done };
+
+#ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG
+int cyg_io_eth_net_debug = CYGDBG_IO_ETH_DRIVERS_DEBUG_VERBOSITY;
+#endif
+
+extern void lwip_dsr_stuff(void);
+extern void lwip_set_addr(struct netif *);
+
+//DSR called from the low level driver.Signals the input_thread
+void
+eth_drv_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data)
+{
+ struct eth_drv_sc *sc = (struct eth_drv_sc *) data;
+ sc->state |= ETH_DRV_NEEDS_DELIVERY;
+ lwip_dsr_stuff();
+}
+
+err_t ecosif_init(struct netif *netif);
+
+// This function is called during system initialization to register a
+// network interface with the system.
+static void
+eth_drv_init(struct eth_drv_sc *sc, unsigned char *enaddr)
+{
+ struct netif *netif = &sc->sc_arpcom.ac_if;
+
+ netif->state = sc;
+ ecosif_init(netif);
+
+ // enaddr == 0 -> hardware init was incomplete (no ESA)
+ if (enaddr != 0) {
+ // Set up hardware address
+ memcpy(netif->hwaddr, enaddr, ETHER_ADDR_LEN);
+ // Perform any hardware initialization
+ (sc->funs->start) (sc, (unsigned char *) &netif->hwaddr, 0);
+ }
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_DIAG
+// Set up interfaces so debug environment can share this device
+ {
+ void *dbg = CYGACC_CALL_IF_DBG_DATA();
+ if (!dbg) {
+ CYGACC_CALL_IF_DBG_DATA_SET((void *)sc);
+ }
+ }
+#endif
+
+}
+
+//
+// Control whether any special locking needs to take place if we intend to
+// cooperate with a ROM monitor (e.g. RedBoot) using this hardware.
+//
+#if defined(CYGSEM_HAL_USE_ROM_MONITOR) && \
+ defined(CYGSEM_HAL_VIRTUAL_VECTOR_DIAG) && \
+ !defined(CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS)
+
+// Indicate that special locking precautions are warranted.
+#define _LOCK_WITH_ROM_MONITOR
+
+// This defines the [well known] channel that RedBoot will use when it is
+// using the network hardware for the debug channel.
+#define RedBoot_TCP_CHANNEL CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS
+
+#endif
+
+//
+// Send a packet of data to the hardware
+//
+
+static void
+eth_drv_send(struct netif *netif, struct pbuf *p)
+{
+ struct eth_drv_sg sg_list[MAX_ETH_DRV_SG];
+ struct eth_drv_sc *sc = netif->state;
+ int sg_len = 0;
+ struct pbuf *q;
+
+#ifdef _LOCK_WITH_ROM_MONITOR
+ bool need_lock = false;
+ int debug_chan;
+#endif
+
+ while (!(sc->funs->can_send) (sc));
+
+ for (q = p; q != NULL; q = q->next) {
+ sg_list[sg_len].buf = (CYG_ADDRESS) q->payload;
+ sg_list[sg_len++].len = q->len;
+ }
+#ifdef _LOCK_WITH_ROM_MONITOR
+ debug_chan = CYGACC_CALL_IF_SET_DEBUG_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+ if (debug_chan == RedBoot_TCP_CHANNEL) {
+ need_lock = true;
+ cyg_drv_dsr_lock();
+ }
+#endif // _LOCK_WITH_ROM_MONITOR
+
+ (sc->funs->send) (sc, sg_list, sg_len, p->tot_len,
+ (CYG_ADDRWORD) p);
+
+#ifdef _LOCK_WITH_ROM_MONITOR
+ // Unlock the driver & hardware. It can once again be safely shared.
+ if (need_lock) {
+ cyg_drv_dsr_unlock();
+ }
+#endif // _LOCK_WITH_ROM_MONITOR
+
+}
+
+//
+// This function is called from the hardware driver when an output operation
+// has completed - i.e. the packet has been sent.
+//
+static void
+eth_drv_tx_done(struct eth_drv_sc *sc, CYG_ADDRWORD key, int status)
+{
+#if 0
+ struct pbuf *p = (struct pbuf *)key;
+ struct netif *netif = &sc->sc_arpcom.ac_if;
+
+ CYGARC_HAL_SAVE_GP();
+ CYGARC_HAL_RESTORE_GP();
+#endif
+}
+
+static void ecosif_input(struct netif *netif, struct pbuf* pbuf);
+
+#define MAX_ETH_MSG 1540
+//
+// This function is called from a hardware driver to indicate that an input
+// packet has arrived. The routine will set up appropriate network resources
+// to hold the data and call back into the driver to retrieve the data.
+//
+static void
+eth_drv_recv(struct eth_drv_sc *sc, int total_len)
+{
+ struct eth_drv_sg sg_list[MAX_ETH_DRV_SG];
+ struct netif *netif = &sc->sc_arpcom.ac_if;
+
+ struct pbuf *p, *q;
+
+ int sg_len = 0;
+ CYGARC_HAL_SAVE_GP();
+
+ if ((total_len > MAX_ETH_MSG) || (total_len < 0)) {
+ total_len = MAX_ETH_MSG;
+ }
+
+ p = pbuf_alloc(PBUF_RAW, total_len, PBUF_POOL);
+
+ if (p == NULL) {
+ LWIP_DEBUGF(0, ("ecosif_input: low_level_input returned NULL\n"));
+ return;
+ }
+
+ for (q = p; q != NULL; q = q->next) {
+ sg_list[sg_len].buf = (CYG_ADDRESS) q->payload;
+ sg_list[sg_len++].len = q->len;
+ }
+ (sc->funs->recv) (sc, sg_list, sg_len);
+ ecosif_input(netif, p);
+ CYGARC_HAL_RESTORE_GP();
+}
+
+
+#define IFNAME0 'e'
+#define IFNAME1 't'
+
+
+
+//
+// low_level_output():
+//
+// Should do the actual transmission of the packet. The packet is
+// contained in the pbuf that is passed to the function. This pbuf
+// might be chained.We pass the data down to the eCos hw independent
+// ethernet driver
+//
+
+static err_t
+low_level_output(struct netif *netif, struct pbuf *p)
+{
+ eth_drv_send(netif, p);
+ return ERR_OK;
+}
+
+//
+// ecosif_output():
+//
+// This function is called by the TCP/IP stack when an IP packet
+// should be sent. It calls the function called low_level_output() to
+// do the actual transmission of the packet.
+//
+//
+static err_t
+ecosif_output(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr)
+{
+
+ p = etharp_output(netif, ipaddr, p);
+ if (p) {
+ low_level_output(netif, p);
+ p = NULL;
+ }
+ return ERR_OK;
+}
+
+
+
+//
+// ecosif_input():
+// This function is called when the eCos hw independent driver
+// has some data to pass up to lwIP.It does it through ecosif_input.
+//
+static void
+ecosif_input(struct netif *netif, struct pbuf *p)
+{
+ struct eth_hdr *ethhdr;
+
+ ethhdr = p->payload;
+
+ switch (htons(ethhdr->type)) {
+ case ETHTYPE_IP:
+ LWIP_DEBUGF(0, ("ecosif_input: IP packet\n"));
+ etharp_ip_input(netif, p);
+ pbuf_header(p, -14);
+ netif->input(p, netif);
+ break;
+ case ETHTYPE_ARP:
+ LWIP_DEBUGF(0, ("ecosif_input: ARP packet\n"));
+ etharp_arp_input(netif, (struct eth_addr *) &netif->hwaddr, p);
+ break;
+ default:
+ pbuf_free(p);
+ break;
+ }
+
+}
+
+err_t
+ecosif_init(struct netif *netif)
+{
+ netif->name[0] = IFNAME0;
+ netif->name[1] = IFNAME1;
+ netif->hwaddr_len = 6;
+ netif->output = ecosif_output;
+ netif->linkoutput = low_level_output;
+ netif->mtu = 1500;
+ lwip_set_addr(netif);
+ return ERR_OK;
+}
diff --git a/cesar/ecos/packages/io/eth/current/src/net/eth_drv.c b/cesar/ecos/packages/io/eth/current/src/net/eth_drv.c
new file mode 100644
index 0000000000..d6c36dc5c5
--- /dev/null
+++ b/cesar/ecos/packages/io/eth/current/src/net/eth_drv.c
@@ -0,0 +1,1062 @@
+//==========================================================================
+//
+// src/net/eth_drv.c
+//
+// Hardware independent ethernet driver
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-01-10
+// Purpose: Hardware independent ethernet driver
+// Description:
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+// High-level ethernet driver
+
+#include <sys/param.h>
+#include <sys/errno.h>
+#include <sys/ioctl.h>
+#include <sys/mbuf.h>
+#include <sys/socket.h>
+
+#include <net/if.h>
+#include <net/if_dl.h>
+#include <net/if_types.h>
+#include <net/netisr.h>
+
+#ifdef INET
+#include <netinet/in.h>
+#include <netinet/in_systm.h>
+#include <netinet/in_var.h>
+#include <netinet/ip.h>
+#include <netinet/if_ether.h>
+#endif
+
+#ifndef NBPFILTER
+#define NBPFILTER 0
+#endif
+
+#if NBPFILTER > 0
+#include <net/bpf.h>
+#include <net/bpfdesc.h>
+#endif
+
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/hal/drv_api.h>
+#include <pkgconf/hal.h>
+#include <cyg/hal/hal_if.h>
+#include <pkgconf/io_eth_drivers.h> // module configury; SIMULATED_FAILURES
+#include <pkgconf/net.h> // CYGPKG_NET_FAST_THREAD_TICKLE_DEVS?
+
+#include <cyg/io/eth/eth_drv.h>
+#include <cyg/io/eth/netdev.h>
+
+#ifndef min
+#define min( _x_, _y_ ) ((_x_) < (_y_) ? (_x_) : (_y_))
+#endif
+
+// ------------------------------------------------------------------------
+#ifdef CYGPKG_IO_ETH_DRIVERS_SIMULATED_FAILURES
+
+#define noLOG_RANDOM 32 // so you can tell this is really being random
+#ifdef LOG_RANDOM
+static struct {
+ unsigned int *which;
+ unsigned int random;
+ unsigned int r100;
+} random_log[LOG_RANDOM];
+
+static int random_index = 0;
+#endif
+
+static unsigned int
+randomize( unsigned int *p )
+{
+ unsigned int r100;
+ HAL_CLOCK_READ( &r100 );
+ r100 ^= *p;
+ *p = (r100 * 1103515245) + 12345;
+ r100 &= 127;
+ if ( r100 >= 100 ) // spread the overflow around evenly
+ r100 = 4 * (r100 - 100);
+ if ( r100 >= 100 ) // and again - (125,126,127=>100,104,108)
+ r100 = 12 * (r100 - 100); // =>(0,48,96)
+#ifdef LOG_RANDOM
+ random_log[random_index].which = p;
+ random_log[random_index].random = *p;
+ random_log[random_index].r100 = r100;
+ random_index++;
+ random_index &= (LOG_RANDOM-1);
+#endif
+ return r100;
+}
+
+#define SIMULATE_FAIL_SEND 1
+#define SIMULATE_FAIL_RECV 2
+#define SIMULATE_FAIL_CORRUPT 3
+
+static struct simulated_failure_state {
+ struct eth_drv_sc *sc;
+ unsigned int r_tx_fail;
+ unsigned int r_rx_fail;
+ unsigned int r_rx_corrupt;
+ cyg_tick_count_t droptime;
+ cyg_tick_count_t passtime;
+} simulated_failure_states[2] = {{0},{0}};
+
+static int
+simulate_fail( struct eth_drv_sc *sc, int which )
+{
+ struct simulated_failure_state *s;
+
+ for ( s = &simulated_failure_states[0]; s < &simulated_failure_states[2];
+ s++ ) {
+ if ( 0 == s->sc ) {
+ s->sc = sc;
+ s->r_tx_fail = (unsigned int)sc;
+ s->r_rx_fail = (unsigned int)sc ^ 0x01234567;
+ s->r_rx_corrupt = (unsigned int)sc ^ 0xdeadbeef;
+ s->droptime = 0;
+ s->passtime = 0;
+ }
+ if ( sc == s->sc )
+ break;
+ }
+ if ( &simulated_failure_states[2] == s ) {
+ CYG_FAIL( "No free slot in simulated_failure_states[]" );
+ return 1; // always fail
+ }
+
+#ifdef CYGPKG_IO_ETH_DRIVERS_SIMULATE_LINE_CUT
+ // Regardless of the question, we say "yes" during the period of
+ // unpluggedness...
+ {
+ cyg_tick_count_t now = cyg_current_time();
+ if ( now > s->droptime && 0 == s->passtime ) { // [initial condition]
+ s->droptime = 0; // go into a passing phase
+ (void)randomize( &s->r_tx_fail );
+ (void)randomize( &s->r_rx_fail );
+ (void)randomize( &s->r_rx_corrupt );
+ s->passtime = s->r_tx_fail + s->r_rx_fail + s->r_rx_corrupt;
+ s->passtime &= 0x3fff; // 16k cS is up to 160S, about 2.5 minutes
+ s->passtime += now;
+ }
+ else if ( now > s->passtime && 0 == s->droptime ) {
+ s->passtime = 0; // go into a dropping phase
+ (void)randomize( &s->r_tx_fail );
+ (void)randomize( &s->r_rx_fail );
+ (void)randomize( &s->r_rx_corrupt );
+ s->droptime = s->r_tx_fail + s->r_rx_fail + s->r_rx_corrupt;
+ s->droptime &= 0x0fff; // 4k cS is up to 40S, about 1/2 a minute
+ s->droptime += now;
+ }
+
+ if ( now < s->droptime )
+ return 1; // Say "no"
+ }
+#endif
+
+ switch ( which ) {
+#ifdef CYGPKG_IO_ETH_DRIVERS_SIMULATE_DROP_TX
+ case SIMULATE_FAIL_SEND: {
+ unsigned int z = randomize( &s->r_tx_fail );
+ return z < CYGPKG_IO_ETH_DRIVERS_SIMULATE_DROP_TX;
+ }
+#endif
+#ifdef CYGPKG_IO_ETH_DRIVERS_SIMULATE_DROP_RX
+ case SIMULATE_FAIL_RECV: {
+ unsigned int z = randomize( &s->r_rx_fail );
+ return z < CYGPKG_IO_ETH_DRIVERS_SIMULATE_DROP_RX;
+ }
+#endif
+#ifdef CYGPKG_IO_ETH_DRIVERS_SIMULATE_CORRUPT_RX
+ case SIMULATE_FAIL_CORRUPT: {
+ unsigned int z = randomize( &s->r_rx_corrupt );
+ return z < CYGPKG_IO_ETH_DRIVERS_SIMULATE_CORRUPT_RX;
+ }
+#endif
+ default:
+ // do nothing - for when options above are not enabled.
+ }
+ return 0;
+}
+
+#define noLOG_CORRUPTION 32 // so you can tell this is really being random
+#ifdef LOG_CORRUPTION
+static struct {
+ int len;
+ int thislen;
+ int off;
+ unsigned char xor;
+ unsigned char idx;
+} corruption_log[LOG_CORRUPTION];
+
+static int corruption_index = 0;
+#endif
+
+static void
+simulate_fail_corrupt_sglist( struct eth_drv_sg *sg_list, int sg_len )
+{
+ unsigned int z, len, i, off;
+ HAL_CLOCK_READ( &z );
+ z += simulated_failure_states[0].r_rx_corrupt;
+ z += simulated_failure_states[1].r_rx_corrupt;
+
+ CYG_ASSERT( MAX_ETH_DRV_SG >= sg_len, "sg_len overflow in corrupt" );
+
+ for ( i = 0, len = 0; i < sg_len && sg_list[i].buf && sg_list[i].len; i++ )
+ len =+ sg_list[i].len;
+
+ CYG_ASSERT( 1500 >= len, "sg...len > ether MTU" );
+ if ( 14 >= len ) // normal ether header
+ return;
+
+ off = z & 2047; // next (2^N-1) > MTU
+ while ( off > len )
+ off -= len;
+
+ for ( i = 0; i < sg_len && sg_list[i].buf && sg_list[i].len; i++ ) {
+ if ( off < sg_list[i].len ) { // corrupt this one
+ unsigned char *p = (unsigned char *)sg_list[i].buf;
+ p[off] ^= (0xff & (z >> 11));
+#ifdef LOG_CORRUPTION
+ corruption_log[corruption_index].len = len;
+ corruption_log[corruption_index].thislen = sg_list[i].len;
+ corruption_log[corruption_index].off = off;
+ corruption_log[corruption_index].xor = (0xff & (z >> 11));
+ corruption_log[corruption_index].idx = i;
+ corruption_index++;
+ corruption_index &= (LOG_CORRUPTION-1);
+#endif
+ return;
+ }
+ off -= sg_list[i].len;
+ }
+ CYG_FAIL( "Didn't corrupt anything" );
+}
+
+#endif // CYGPKG_IO_ETH_DRIVERS_SIMULATED_FAILURES
+// ------------------------------------------------------------------------
+
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+
+#include <cyg/hal/hal_if.h>
+
+// Use with care! Local variable defined!
+#define START_CONSOLE() \
+{ /* NEW BLOCK */ \
+ int _cur_console = \
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT); \
+ { \
+ int i; \
+ if ( CYGACC_CALL_IF_FLASH_CFG_OP( CYGNUM_CALL_IF_FLASH_CFG_GET, \
+ "info_console_force", &i, \
+ CYGNUM_FLASH_CFG_TYPE_CONFIG_BOOL ) ) { \
+ if ( i ) { \
+ if ( CYGACC_CALL_IF_FLASH_CFG_OP( CYGNUM_CALL_IF_FLASH_CFG_GET, \
+ "info_console_number", &i, \
+ CYGNUM_FLASH_CFG_TYPE_CONFIG_INT ) ){ \
+ /* Then i is the console to force it to: */ \
+ CYGACC_CALL_IF_SET_CONSOLE_COMM( i ); \
+ } \
+ } \
+ } \
+ }
+
+#define END_CONSOLE() \
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(_cur_console); \
+} /* END BLOCK */
+
+#else
+#define START_CONSOLE()
+#define END_CONSOLE()
+#endif
+// ------------------------------------------------------------------------
+
+#ifdef CYGPKG_NET_FREEBSD_STACK
+extern char *_ioctl_name(u_long cmd);
+typedef void void_fun(void *);
+#endif
+
+static int eth_drv_ioctl(struct ifnet *, u_long, caddr_t);
+static void eth_drv_send(struct ifnet *);
+static void eth_drv_start(struct eth_drv_sc *sc);
+
+#ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG
+int cyg_io_eth_net_debug = CYGDBG_IO_ETH_DRIVERS_DEBUG_VERBOSITY;
+#endif
+
+// Interfaces exported to drivers
+
+static void eth_drv_init(struct eth_drv_sc *sc, unsigned char *enaddr);
+static void eth_drv_recv(struct eth_drv_sc *sc, int total_len);
+static void eth_drv_tx_done(struct eth_drv_sc *sc, CYG_ADDRESS key, int status);
+
+struct eth_drv_funs eth_drv_funs = {eth_drv_init, eth_drv_recv, eth_drv_tx_done};
+
+//
+// This function is called during system initialization to register a
+// network interface with the system.
+//
+static void
+eth_drv_init(struct eth_drv_sc *sc, unsigned char *enaddr)
+{
+ struct ifnet *ifp = &sc->sc_arpcom.ac_if;
+#ifdef CYGPKG_NET_FREEBSD_STACK
+ int unit;
+ char *np, *xp;
+#endif
+
+ // Set up hardware address
+ if (NULL != enaddr)
+ bcopy(enaddr, &sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN);
+
+ // Initialize ifnet structure
+ ifp->if_softc = sc;
+ ifp->if_start = eth_drv_send;
+ ifp->if_ioctl = eth_drv_ioctl;
+ ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
+#ifdef IFF_NOTRAILERS
+ ifp->if_flags |= IFF_NOTRAILERS;
+#endif
+#ifdef CYGPKG_NET_FREEBSD_STACK
+ ifp->if_name = xp = ifp->if_xname;
+ np = (char *)sc->dev_name;
+ unit = 0;
+ while (*np && !((*np >= '0') && (*np <= '9'))) *xp++ = *np++;
+ if (*np) {
+ *xp = '\0';
+ while (*np) {
+ unit = (unit * 10) + (*np++ - '0');
+ }
+ ifp->if_unit = unit;
+ }
+ ifp->if_init = (void_fun *)eth_drv_start;
+ ifp->if_output = ether_output;
+#else
+ bcopy((void *)sc->dev_name, ifp->if_xname, IFNAMSIZ);
+#endif
+ sc->state = 0;
+
+ // Attach the interface
+#ifdef CYGPKG_NET_FREEBSD_STACK
+ ether_ifattach(ifp, 0);
+#else
+ if_attach(ifp);
+ ether_ifattach(ifp);
+#endif
+
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_DIAG
+// Set up interfaces so debug environment can share this device
+ {
+ void *dbg = CYGACC_CALL_IF_DBG_DATA();
+ if (!dbg) {
+ CYGACC_CALL_IF_DBG_DATA_SET((void *)sc);
+ }
+ }
+#endif
+}
+
+//
+// This [internal] function will be called to stop activity on an interface.
+//
+static void
+eth_drv_stop(struct eth_drv_sc *sc)
+{
+ (sc->funs->stop)(sc);
+ sc->state &= ~ETH_DRV_STATE_ACTIVE;
+}
+
+//
+// This [internal] function will be called to start activity on an interface.
+//
+static void
+eth_drv_start(struct eth_drv_sc *sc)
+{
+ struct ifnet *ifp = &sc->sc_arpcom.ac_if;
+
+ // Perform any hardware initialization
+ (sc->funs->start)(sc, (unsigned char *)&sc->sc_arpcom.ac_enaddr, 0);
+#ifdef CYGPKG_NET_FREEBSD_STACK
+ // resend multicast addresses if present
+ if(ifp->if_multiaddrs.lh_first && ifp->if_ioctl) {
+ int s = splimp();
+ ifp->if_ioctl(ifp, SIOCADDMULTI, 0);
+ splx(s);
+ }
+#endif
+ // Set 'running' flag, and clear output active flag.
+ ifp->if_flags |= IFF_RUNNING;
+ ifp->if_flags &= ~IFF_OACTIVE;
+ sc->state |= ETH_DRV_STATE_ACTIVE;
+ eth_drv_send(ifp); // Try and start up transmit
+}
+
+//
+// This function supports "I/O control" operations on an interface.
+//
+static int
+eth_drv_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+{
+ struct eth_drv_sc *sc = ifp->if_softc;
+#ifndef CYGPKG_NET_FREEBSD_STACK
+ struct ifaddr *ifa = (struct ifaddr *) data;
+#endif
+ struct ifreq *ifr = (struct ifreq *)data;
+ int s, error = 0;
+
+// DEBUG
+#ifdef CYGPKG_NET_FREEBSD_STACK
+ log(LOG_IOCTL, "%s: cmd: %s, data:\n", __FUNCTION__, _ioctl_name(cmd));
+ log_dump(LOG_IOCTL, data, 32);
+#endif
+// DEBUG
+
+ s = splnet();
+
+#ifdef CYGPKG_NET_FREEBSD_STACK
+ if ((error = ether_ioctl(ifp, cmd, data)) > 0) {
+#else
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+#endif
+ splx(s);
+ return error;
+ }
+
+ switch (cmd) {
+
+ case SIOCSIFADDR:
+#ifndef CYGPKG_NET_FREEBSD_STACK // Now in if_ethersubr.c
+ ifp->if_flags |= IFF_UP;
+
+ switch (ifa->ifa_addr->sa_family) {
+#ifdef INET
+ case AF_INET:
+ eth_drv_start(sc);
+ arp_ifinit(&sc->sc_arpcom, ifa);
+ break;
+#endif
+ default:
+ eth_drv_start(sc);
+ break;
+ }
+#endif // CYGPKG_NET_FREEBSD_STACK
+ break;
+
+ case SIOCGIFHWADDR:
+ // Get hardware (MAC) address
+ ifr->ifr_hwaddr.sa_family = AF_INET;
+ bcopy(&sc->sc_arpcom.ac_enaddr, &ifr->ifr_hwaddr.sa_data, ETHER_ADDR_LEN);
+ break;
+
+ case SIOCSIFHWADDR:
+ // Set hardware (MAC) address
+ bcopy(&ifr->ifr_hwaddr.sa_data, &sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN);
+ if ((sc->funs->control)(sc, ETH_DRV_SET_MAC_ADDRESS,
+ &sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN)) {
+ error = EINVAL;
+ }
+ break;
+
+#ifdef SIOCGIFSTATS
+ case SIOCGIFSTATS:
+#ifdef SIOCGIFSTATSUD
+ case SIOCGIFSTATSUD:
+#endif
+ // Get interface statistics:
+ if ((sc->funs->control)(sc, (cmd == SIOCGIFSTATS)
+ ? ETH_DRV_GET_IF_STATS
+ : ETH_DRV_GET_IF_STATS_UD,
+ data, 0 ) ) {
+ error = EINVAL;
+ }
+ break;
+#endif // SIOCGIFSTATS
+
+ case SIOCSIFFLAGS:
+ if ((ifp->if_flags & IFF_UP) == 0 &&
+ (ifp->if_flags & IFF_RUNNING) != 0) {
+ /*
+ * If interface is marked down and it is running, then
+ * stop it.
+ */
+ eth_drv_stop(sc);
+ ifp->if_flags &= ~IFF_RUNNING;
+ } else
+ if ((ifp->if_flags & IFF_UP) != 0 &&
+ (ifp->if_flags & IFF_RUNNING) == 0) {
+ /*
+ * If interface is marked up and it is stopped, then
+ * start it.
+ */
+ eth_drv_start(sc);
+ } else {
+ /*
+ * Reset the interface to pick up changes in any other
+ * flags that affect hardware registers.
+ */
+ eth_drv_stop(sc);
+ eth_drv_start(sc);
+ }
+ break;
+
+#ifdef CYGPKG_NET_FREEBSD_STACK
+ case SIOCADDMULTI:
+ case SIOCDELMULTI:
+ {
+ struct ifmultiaddr *ifma;
+ struct eth_drv_mc_list mc_list;
+ int mode = (ifp->if_flags & IFF_ALLMULTI) ? ETH_DRV_SET_MC_ALL :
+ ETH_DRV_SET_MC_LIST;
+
+#ifdef DEBUG
+ log(LOG_ADDR, "%s Multi\n",(cmd == SIOCADDMULTI) ? "Add" : "Del");
+#endif
+ mc_list.len = 0;
+ LIST_FOREACH(ifma, &((ifp)->if_multiaddrs), ifma_link) {
+ if (ifma->ifma_addr->sa_family != AF_LINK) {
+ continue;
+ }
+#ifdef DEBUG
+ log_dump(LOG_ADDR, LLADDR((struct sockaddr_dl *)ifma->ifma_addr), 6);
+#endif
+ if ((LLADDR((struct sockaddr_dl *)ifma->ifma_addr)[0] & 0x01) == 0) {
+#ifdef DEBUG
+ log(LOG_ADDR, "** Not a multicast address - ignored\n");
+#endif
+ continue;
+ }
+ if (mc_list.len < ETH_DRV_MAX_MC) {
+ bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr),
+ mc_list.addrs[mc_list.len], ETHER_ADDR_LEN);
+ mc_list.len++;
+ } else {
+ mode = ETH_DRV_SET_MC_ALL;
+ }
+ }
+ // Note: drivers may behave like IFF_ALLMULTI if the list is
+ // more than their hardware can handle, e.g. some can only handle 1.
+ if ((sc->funs->control)(sc, mode, &mc_list, sizeof(mc_list))) {
+ diag_printf( "[%s] Warning: Driver can't set multi-cast mode\n",
+ __FUNCTION__ );
+ error = EINVAL;
+ }
+ break;
+ }
+#endif
+
+ default:
+ error = EINVAL;
+ break;
+ }
+
+ splx(s);
+ return (error);
+}
+
+//
+// Control whether any special locking needs to take place if we intend to
+// cooperate with a ROM monitor (e.g. RedBoot) using this hardware.
+//
+#if defined(CYGSEM_HAL_USE_ROM_MONITOR) && \
+ defined(CYGSEM_HAL_VIRTUAL_VECTOR_DIAG) && \
+ !defined(CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS)
+
+// Indicate that special locking precautions are warranted.
+#define _LOCK_WITH_ROM_MONITOR
+
+// This defines the [well known] channel that RedBoot will use when it is
+// using the network hardware for the debug channel.
+#define RedBoot_TCP_CHANNEL CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS
+
+// Define this if you ever need to call 'diag_printf()' from interrupt level
+// code (ISR) and the debug channel might be using the network hardware. If
+// this is not the case, then disabling interrupts here is over-kill.
+//#define _LOCK_USING_INTERRUPTS
+#endif
+
+//
+// This routine is called to start transmitting if there is data
+// available.
+//
+static void
+eth_drv_send(struct ifnet *ifp)
+{
+ struct eth_drv_sc *sc = ifp->if_softc;
+#if MAX_ETH_DRV_SG > 64
+ static // Avoid large stack requirements
+#endif
+ struct eth_drv_sg sg_list[MAX_ETH_DRV_SG];
+ int sg_len;
+ struct mbuf *m0, *m;
+ int len, total_len;
+ unsigned char *data;
+#ifdef _LOCK_WITH_ROM_MONITOR
+#ifdef _LOCK_USING_INTERRUPTS
+ cyg_uint32 ints;
+#endif
+ bool need_lock = false;
+ int debug_chan;
+#endif // _LOCK_WITH_ROM_MONITOR
+
+ // This is now only called from network threads, so no guarding is
+ // required; locking is in place via the splfoo() mechanism already.
+
+ if ((ifp->if_flags & IFF_RUNNING) != IFF_RUNNING) {
+ return;
+ }
+
+ // If nothing on the queue, no need to bother hardware
+ if (IF_IS_EMPTY(&ifp->if_snd)) {
+ return;
+ }
+
+ while ((sc->funs->can_send)(sc) > 0) {
+ IF_DEQUEUE(&ifp->if_snd, m0);
+ if (m0 == 0) {
+ break;
+ }
+
+#ifdef CYGPKG_IO_ETH_DRIVERS_SIMULATED_FAILURES
+ if ( simulate_fail( sc, SIMULATE_FAIL_SEND ) ) {
+ // must free the mbufs
+ m_freem(m0);
+ continue; // next packet to send
+ }
+#endif
+
+#ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG
+ if (cyg_io_eth_net_debug) {
+ START_CONSOLE();
+ diag_printf("Sending %d bytes\n", m0->m_pkthdr.len);
+ END_CONSOLE();
+ }
+#endif
+
+ /* We need to use m->m_pkthdr.len, so require the header */
+ if ((m0->m_flags & M_PKTHDR) == 0)
+ panic("eth_drv_send: no header mbuf");
+
+#if NBPFILTER > 0
+ /* Tap off here if there is a BPF listener. */
+ if (ifp->if_bpf)
+ bpf_mtap(ifp->if_bpf, m0);
+#endif
+
+ // Extract data pointers (don't actually move data here)
+ sg_len = 0; total_len = 0;
+ for (m = m0; m ; m = m->m_next) {
+ data = mtod(m, u_char *);
+ len = m->m_len;
+ total_len += len;
+ sg_list[sg_len].buf = (CYG_ADDRESS)data;
+ sg_list[sg_len].len = len;
+ if ( len )
+ sg_len++;
+#ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG
+ if (cyg_io_eth_net_debug) {
+ START_CONSOLE();
+ diag_printf("xmit %d bytes at %p sg[%d]\n", len, data, sg_len);
+ if ( cyg_io_eth_net_debug > 1)
+ diag_dump_buf(data, len);
+ END_CONSOLE();
+ }
+#endif
+ if ( MAX_ETH_DRV_SG < sg_len ) {
+#ifdef CYGPKG_IO_ETH_DRIVERS_WARN_NO_MBUFS
+ int needed = 0;
+ struct mbuf *m1;
+ for (m1 = m0; m1 ; m1 = m1->m_next) needed++;
+ START_CONSOLE();
+ diag_printf("too many mbufs to tx, %d > %d, need %d\n",
+ sg_len, MAX_ETH_DRV_SG, needed );
+ END_CONSOLE();
+#endif
+ sg_len = 0;
+ break; // drop it on the floor
+ }
+ }
+
+#ifdef _LOCK_WITH_ROM_MONITOR
+ // Firm lock on this portion of the driver. Since we are about to
+ // start messing with the actual hardware, it is imperative that the
+ // current thread not loose control of the CPU at this time. Otherwise,
+ // the hardware could be left in an unusable state. This caution is
+ // only warranted if there is a possibility of some other thread trying
+ // to use the hardware simultaneously. The network stack would prevent
+ // this implicitly since all accesses are controlled by the "splX()"
+ // locks, but if there is a ROM monitor, such as RedBoot, also using
+ // the hardware, all bets are off.
+
+ // Note: these operations can be avoided if it were well known that
+ // RedBoot was not using the network hardware for diagnostic I/O. This
+ // can be inferred by checking which I/O channel RedBoot is currently
+ // hooked to.
+ debug_chan = CYGACC_CALL_IF_SET_DEBUG_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+ if (debug_chan == RedBoot_TCP_CHANNEL) {
+ need_lock = true;
+#ifdef _LOCK_USING_INTERRUPTS
+ HAL_DISABLE_INTERRUPTS(ints);
+#endif
+ cyg_drv_dsr_lock();
+ }
+#endif // _LOCK_WITH_ROM_MONITOR
+
+ // Tell hardware to send this packet
+ if ( sg_len )
+ (sc->funs->send)(sc, sg_list, sg_len, total_len, (unsigned long)m0);
+
+#ifdef _LOCK_WITH_ROM_MONITOR
+ // Unlock the driver & hardware. It can once again be safely shared.
+ if (need_lock) {
+ cyg_drv_dsr_unlock();
+#ifdef _LOCK_USING_INTERRUPTS
+ HAL_RESTORE_INTERRUPTS(ints);
+#endif
+ }
+#endif // _LOCK_WITH_ROM_MONITOR
+#undef _LOCK_WITH_ROM_MONITOR
+ }
+}
+
+//
+// This function is called from the hardware driver when an output operation
+// has completed - i.e. the packet has been sent.
+//
+static struct mbuf *mbuf_key;
+
+static void
+eth_drv_tx_done(struct eth_drv_sc *sc, CYG_ADDRESS key, int status)
+{
+ struct ifnet *ifp = &sc->sc_arpcom.ac_if;
+ struct mbuf *m0 = (struct mbuf *)key;
+ CYGARC_HAL_SAVE_GP();
+
+ // Check for errors here (via 'status')
+ ifp->if_opackets++;
+ // Done with packet
+
+ // Guard against a NULL return - can be caused by race conditions in
+ // the driver, this is the neatest fixup:
+ if (m0) {
+ mbuf_key = m0;
+ m_freem(m0);
+ }
+ // Start another if possible
+ eth_drv_send(ifp);
+ CYGARC_HAL_RESTORE_GP();
+}
+
+//
+// This function is called from a hardware driver to indicate that an input
+// packet has arrived. The routine will set up appropriate network resources
+// (mbuf's) to hold the data and call back into the driver to retrieve the data.
+//
+static void
+eth_drv_recv(struct eth_drv_sc *sc, int total_len)
+{
+ struct ifnet *ifp = &sc->sc_arpcom.ac_if;
+ struct ether_header _eh, *eh=&_eh;
+ struct mbuf *top, **mp, *m;
+ int mlen;
+ caddr_t data;
+#if MAX_ETH_DRV_SG > 64
+ static // Avoid large stack requirements
+#endif
+ struct eth_drv_sg sg_list[MAX_ETH_DRV_SG];
+ int sg_len;
+
+ if ((ifp->if_flags & IFF_RUNNING) != IFF_RUNNING) {
+ return; // Interface not up, ignore this request
+ }
+
+ CYG_ASSERT( 0 != total_len, "total_len is zero!" );
+ CYG_ASSERT( 0 <= total_len, "total_len is negative!" );
+ CYG_ASSERT( sizeof( struct ether_header ) <= total_len,
+ "No ether header here!" );
+
+ if ( total_len < sizeof( struct ether_header ) )
+ // Our arithmetic below would go wrong
+ return;
+
+ CYGARC_HAL_SAVE_GP(); // This is down here to make matching restore neat
+
+ /* Pull packet off interface. */
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
+ if (m == 0) {
+#ifdef CYGPKG_IO_ETH_DRIVERS_WARN_NO_MBUFS
+ START_CONSOLE();
+ diag_printf("warning: eth_recv out of MBUFs\n");
+#ifdef CYGDBG_NET_SHOW_MBUFS
+ cyg_net_show_mbufs();
+#endif
+ END_CONSOLE();
+#endif
+ }
+
+ // Set up buffers
+ // Unload ethernet header separately so IP/UDP/TCP headers are aligned
+ sg_list[0].buf = (CYG_ADDRESS)eh;
+ sg_list[0].len = sizeof(*eh);
+ sg_len = 1;
+
+ // Compute total length (minus ethernet header)
+ total_len -= sizeof(*eh);
+
+ top = 0;
+ mlen = MHLEN;
+ mp = &top;
+
+ if (m) {
+ m->m_pkthdr.rcvif = ifp;
+ m->m_pkthdr.len = total_len;
+ } else {
+ sg_list[sg_len].buf = (CYG_ADDRESS)0;
+ sg_list[sg_len].len = total_len;
+ sg_len++;
+ total_len = 0;
+ }
+
+ while (total_len > 0) {
+ if (top) {
+ MGET(m, M_DONTWAIT, MT_DATA);
+ if (m == 0) {
+ m_freem(top);
+#ifdef CYGPKG_IO_ETH_DRIVERS_WARN_NO_MBUFS
+ START_CONSOLE();
+ diag_printf("out of MBUFs [2]");
+#ifdef CYGDBG_NET_SHOW_MBUFS
+ cyg_net_show_mbufs();
+#endif
+ END_CONSOLE();
+#endif
+ sg_list[sg_len].buf = (CYG_ADDRESS)0;
+ sg_list[sg_len].len = total_len;
+ sg_len++;
+ top = 0;
+ break;
+ }
+ mlen = MLEN;
+ }
+ if (total_len >= MINCLSIZE) {
+ MCLGET(m, M_DONTWAIT);
+ if ((m->m_flags & M_EXT) == 0) {
+ m_freem(top);
+ m_free(m);
+#ifdef CYGPKG_IO_ETH_DRIVERS_WARN_NO_MBUFS
+ START_CONSOLE();
+ diag_printf("warning: eth_recv out of MBUFs\n");
+#ifdef CYGDBG_NET_SHOW_MBUFS
+ cyg_net_show_mbufs();
+#endif
+ END_CONSOLE();
+#endif
+ sg_list[sg_len].buf = (CYG_ADDRESS)0;
+ sg_list[sg_len].len = total_len;
+ sg_len++;
+ top = 0;
+ break;
+ }
+ mlen = MCLBYTES;
+ }
+ m->m_len = mlen = min(total_len, mlen);
+ total_len -= mlen;
+ data = mtod(m, caddr_t);
+ sg_list[sg_len].buf = (CYG_ADDRESS)data;
+ sg_list[sg_len].len = mlen;
+ sg_len++;
+ *mp = m;
+ mp = &m->m_next;
+ } // endwhile
+
+ // Ask hardware to unload buffers
+ (sc->funs->recv)(sc, sg_list, sg_len);
+
+#ifdef CYGPKG_IO_ETH_DRIVERS_SIMULATED_FAILURES
+ if ( simulate_fail( sc, SIMULATE_FAIL_RECV ) ) {
+ // toss the packet - note that some hardware gets
+ // fussy if the packet isn't "unloaded", thus we
+ // have to wait until now to throw it away
+ if (top) {
+ m_free(top);
+ }
+ ifp->if_ierrors++;
+ return;
+ }
+
+ if ( simulate_fail( sc, SIMULATE_FAIL_CORRUPT ) ) {
+ // Corrupt the data
+ simulate_fail_corrupt_sglist( sg_list, sg_len );
+ }
+#endif
+
+#ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG
+ if (cyg_io_eth_net_debug) {
+ int i;
+ START_CONSOLE();
+ for (i = 0; i < sg_len; i++) {
+ if (sg_list[i].buf) {
+ diag_printf("rx %d bytes at %x sg[%d]\n", sg_list[i].len, sg_list[i].buf, i);
+ if ( cyg_io_eth_net_debug > 1 )
+ diag_dump_buf((void *)sg_list[i].buf, sg_list[i].len);
+ }
+ }
+ END_CONSOLE();
+ }
+#endif
+ m = top;
+ if (m == 0) {
+ ifp->if_ierrors++;
+ }
+ else {
+ ifp->if_ipackets++;
+
+#if NBPFILTER > 0
+#error FIXME - Need mbuf with ethernet header attached
+ /*
+ * Check if there's a BPF listener on this interface.
+ * If so, hand off the raw packet to bpf.
+ */
+ if (ifp->if_bpf)
+ bpf_mtap(ifp->if_bpf, m);
+#endif
+
+ // Push data into protocol stacks
+ ether_input(ifp, eh, m);
+ }
+ CYGARC_HAL_RESTORE_GP();
+}
+
+
+// ------------------------------------------------------------------------
+// DSR to schedule network delivery thread
+
+extern void ecos_synch_eth_drv_dsr(void); // from ecos/timeout.c in net stack
+
+void
+eth_drv_dsr(cyg_vector_t vector,
+ cyg_ucount32 count,
+ cyg_addrword_t data)
+{
+ struct eth_drv_sc *sc = (struct eth_drv_sc *)data;
+
+#ifdef CYGDBG_USE_ASSERTS
+ // then check that this really is a "sc"
+ {
+ cyg_netdevtab_entry_t *t;
+ for (t = &__NETDEVTAB__[0]; t != &__NETDEVTAB_END__; t++)
+ if ( ((struct eth_drv_sc *)t->device_instance) == sc )
+ break; // found it
+ CYG_ASSERT( t != &__NETDEVTAB_END__, "eth_drv_dsr: Failed to find sc in NETDEVTAB" );
+ }
+#endif // Checking code
+
+ sc->state |= ETH_DRV_NEEDS_DELIVERY;
+
+ ecos_synch_eth_drv_dsr(); // [request] run delivery function for this dev
+}
+
+// This is called from the delivery thread, to do just that:
+void eth_drv_run_deliveries( void )
+{
+ cyg_netdevtab_entry_t *t;
+ for (t = &__NETDEVTAB__[0]; t != &__NETDEVTAB_END__; t++) {
+ struct eth_drv_sc *sc = (struct eth_drv_sc *)t->device_instance;
+ if ( ETH_DRV_NEEDS_DELIVERY & sc->state ) {
+#if defined(CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT)
+ cyg_bool was_ctrlc_int;
+#endif
+ sc->state &=~ETH_DRV_NEEDS_DELIVERY;
+#if defined(CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT)
+ was_ctrlc_int = HAL_CTRLC_CHECK((*sc->funs->int_vector)(sc), (int)sc);
+ if (!was_ctrlc_int) // Fall through and run normal code
+#endif
+ (*sc->funs->deliver)(sc);
+ }
+ }
+}
+
+// This is called from the delivery thread, to unstick devices if there is
+// no network activity.
+#ifdef CYGPKG_NET_FAST_THREAD_TICKLE_DEVS
+void eth_drv_tickle_devices( void )
+{
+ cyg_netdevtab_entry_t *t;
+ for (t = &__NETDEVTAB__[0]; t != &__NETDEVTAB_END__; t++) {
+ struct eth_drv_sc *sc = (struct eth_drv_sc *)t->device_instance;
+ if ( ETH_DRV_STATE_ACTIVE & sc->state ) {
+ struct ifnet *ifp = &sc->sc_arpcom.ac_if;
+ // Try to dequeue a packet for this interface, if we can. This
+ // will call can_send() for active interfaces. It is calls to
+ // this function from tx_done() which normally provide
+ // continuous transmissions; otherwise we do not get control.
+ // This call fixes that.
+ if (!IF_IS_EMPTY(&ifp->if_snd)) {
+ eth_drv_send(ifp);
+ }
+ }
+ }
+}
+#endif // CYGPKG_NET_FAST_THREAD_TICKLE_DEVS
+
+// ------------------------------------------------------------------------
+
+#ifdef CYGPKG_IO_PCMCIA
+// Lookup a 'netdev' entry, assuming that it is an ethernet device.
+cyg_netdevtab_entry_t *
+eth_drv_netdev(char *name)
+{
+ cyg_netdevtab_entry_t *t;
+ struct eth_drv_sc *sc;
+ for (t = &__NETDEVTAB__[0]; t != &__NETDEVTAB_END__; t++) {
+ sc = (struct eth_drv_sc *)t->device_instance;
+ if (strcmp(sc->dev_name, name) == 0) {
+ return t;
+ }
+ }
+ return (cyg_netdevtab_entry_t *)NULL;
+}
+#endif // CYGPKG_IO_PCMCIA
+
+// EOF src/net/eth_drv.c
diff --git a/cesar/ecos/packages/io/eth/current/src/stand_alone/eth_drv.c b/cesar/ecos/packages/io/eth/current/src/stand_alone/eth_drv.c
new file mode 100644
index 0000000000..d0b4d88556
--- /dev/null
+++ b/cesar/ecos/packages/io/eth/current/src/stand_alone/eth_drv.c
@@ -0,0 +1,556 @@
+//==========================================================================
+//
+// src/stand_alone/eth_drv.c
+//
+// Stand-alone hardware independent networking support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/io_eth_drivers.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/drv_api.h>
+#include <cyg/hal/hal_if.h>
+#include <cyg/io/eth/eth_drv.h>
+#include <cyg/io/eth/netdev.h>
+#include <string.h>
+
+// High-level ethernet driver
+
+
+// Interfaces exported to drivers
+
+static void eth_drv_init(struct eth_drv_sc *sc, unsigned char *enaddr);
+static void eth_drv_recv(struct eth_drv_sc *sc, int total_len);
+static void eth_drv_tx_done(struct eth_drv_sc *sc, CYG_ADDRWORD key, int status);
+
+struct eth_drv_funs eth_drv_funs = {eth_drv_init, eth_drv_recv, eth_drv_tx_done};
+
+#ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG
+int cyg_io_eth_net_debug = CYGDBG_IO_ETH_DRIVERS_DEBUG_VERBOSITY;
+// Usually just the header is enough, the body slows things too much.
+#define DIAG_DUMP_BUF_HDR( a, b ) if (0 < cyg_io_eth_net_debug) diag_dump_buf( (a), (b) )
+#define DIAG_DUMP_BUF_BDY( a, b ) if (1 < cyg_io_eth_net_debug) diag_dump_buf( (a), (b) )
+#else
+#define DIAG_DUMP_BUF_HDR( a, b )
+#define DIAG_DUMP_BUF_BDY( a, b )
+#endif
+
+struct eth_drv_sc *__local_enet_sc = NULL;
+
+#ifdef CYGSEM_IO_ETH_DRIVERS_PASS_PACKETS
+//
+// Horrible hack: In order to allow the stand-alone networking code to work
+// alongside eCos (or any other stack), separate IP addresses must be used.
+// When a packet arrives at the interface, we check to see which IP address
+// it corresponds to and only pass it "up" if it's not for the stand-alone
+// layer.
+//
+// tres degolas :-(
+//
+extern char __local_ip_addr[4];
+#endif // PASS_PACKETS
+
+#ifdef CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
+//
+// Another horrible hack: In order to do the above passing on of
+// application packets safely - and passing on completion events for
+// pending transmissions (which is not conditional) - we must lock the
+// application scheduler before calling into it. There are several reasons
+// for this: a) We are likely running on a RedBoot special debug stack and
+// so the application's stack checking fires; b) we could even get
+// descheduled if the arrival of a packet causes a higher priority thread
+// to awaken!
+
+#include <cyg/hal/dbg-threads-api.h>
+
+// Use with care! Local variable defined!
+# define LOCK_APPLICATION_SCHEDULER() \
+{ /* NEW BLOCK */ \
+ threadref currthread; \
+ int threadok; \
+ threadok = dbg_currthread( &currthread ); \
+ if ( threadok ) { \
+ threadok = dbg_scheduler( &currthread, 1, 1 ); /* lock */ \
+ }
+
+# define UNLOCK_APPLICATION_SCHEDULER() \
+ if ( threadok ) { \
+ dbg_scheduler( &currthread, 0, 1 ); /* unlock */ \
+ } \
+} /* END BLOCK */
+
+#else
+# define LOCK_APPLICATION_SCHEDULER() CYG_EMPTY_STATEMENT
+# define UNLOCK_APPLICATION_SCHEDULER() CYG_EMPTY_STATEMENT
+#endif // GDB_THREAD_SUPPORT
+
+//
+// Buffer 'get' support. The problem is that this function only gets
+// called when some data is required, but packets may arrive on the device
+// at any time. More particularly, on some devices when data arrive, all
+// of that data needs to be consumed immediately or be lost. This process
+// is driven by interrupts, which in the stand-along case are simulated by
+// calling the "poll" interface.
+//
+// Thus there will be a pool of buffers, some free and some full, to try
+// and manage this.
+//
+
+#define MAX_ETH_MSG 1540
+#define NUM_ETH_MSG CYGNUM_IO_ETH_DRIVERS_NUM_PKT
+
+struct eth_msg {
+ struct eth_msg *next, *prev;
+ int len; // Actual number of bytes in message
+ unsigned char data[MAX_ETH_MSG];
+};
+
+struct eth_msg_hdr {
+ struct eth_msg *first, *last;
+};
+
+static struct eth_msg_hdr eth_msg_free, eth_msg_full;
+static struct eth_msg eth_msgs[NUM_ETH_MSG];
+
+// Prototypes for functions used in this module
+static void eth_drv_start(struct eth_drv_sc *sc);
+
+// These functions are defined in RedBoot and control access to
+// the "default" console.
+extern int start_console(void);
+extern void end_console(int);
+
+// Simple queue management functions
+
+static void
+eth_drv_msg_put(struct eth_msg_hdr *hdr, struct eth_msg *msg)
+{
+ if (hdr->first != (struct eth_msg *)hdr) {
+ // Something already in queue
+ hdr->last->next = msg;
+ msg->prev = hdr->last;
+ msg->next = (struct eth_msg *)hdr;
+ hdr->last = msg;
+ } else {
+ hdr->first = hdr->last = msg;
+ msg->next = msg->prev = (struct eth_msg *)hdr;
+ }
+}
+
+static struct eth_msg *
+eth_drv_msg_get(struct eth_msg_hdr *hdr)
+{
+ struct eth_msg *msg;
+ if (hdr->first != (struct eth_msg *)hdr) {
+ msg = hdr->first;
+ hdr->first = msg->next;
+ msg->next->prev = (struct eth_msg *)hdr;
+ } else {
+ msg = (struct eth_msg *)NULL;
+ }
+ return msg;
+}
+
+void
+eth_drv_buffers_init(void)
+{
+ int i;
+ struct eth_msg *msg = eth_msgs;
+
+ eth_msg_full.first = eth_msg_full.last = (struct eth_msg *)&eth_msg_full;
+ eth_msg_free.first = eth_msg_free.last = (struct eth_msg *)&eth_msg_free;
+ for (i = 0; i < NUM_ETH_MSG; i++, msg++) {
+ eth_drv_msg_put(&eth_msg_free, msg);
+ }
+}
+
+//
+// This function is called during system initialization to register a
+// network interface with the system.
+//
+static void
+eth_drv_init(struct eth_drv_sc *sc, unsigned char *enaddr)
+{
+ // enaddr == 0 -> hardware init was incomplete (no ESA)
+ if (enaddr != 0) {
+ // Set up hardware address
+ memcpy(&sc->sc_arpcom.esa, enaddr, ETHER_ADDR_LEN);
+ __local_enet_sc = sc;
+ eth_drv_start(sc);
+ }
+}
+
+//
+// This [internal] function will be called to stop activity on an interface.
+//
+void
+eth_drv_stop(void)
+{
+ struct eth_drv_sc *sc = __local_enet_sc;
+
+ if (sc != NULL)
+ (sc->funs->stop)(sc);
+}
+
+//
+// This [internal] function will be called to start activity on an interface.
+//
+static void
+eth_drv_start(struct eth_drv_sc *sc)
+{
+ // Perform any hardware initialization
+ (sc->funs->start)(sc, (unsigned char *)&sc->sc_arpcom.esa, 0);
+}
+
+//
+// Send a packet of data to the hardware
+//
+static int packet_sent;
+
+void
+eth_drv_write(char *eth_hdr, char *buf, int len)
+{
+ struct eth_drv_sg sg_list[MAX_ETH_DRV_SG];
+ struct eth_drv_sc *sc = __local_enet_sc;
+ int sg_len = 2;
+ void *dbg = CYGACC_CALL_IF_DBG_DATA();
+ int old_state;
+ int wait_time = 5; // Timeout before giving up
+ void *eth_drv_old = 0;
+
+ if (dbg) {
+ sc = (struct eth_drv_sc *)dbg; // Use control from installed driver
+ eth_drv_old = sc->funs->eth_drv_old;
+ if (eth_drv_old == 0) {
+ sc->funs->eth_drv_old = sc->funs->eth_drv;
+ sc->funs->eth_drv = &eth_drv_funs; // Substitute stand-alone driver
+ old_state = sc->state;
+ if (!(old_state & ETH_DRV_STATE_ACTIVE)) {
+ // This interface not fully initialized, do it now
+ (sc->funs->start)(sc, (unsigned char *)sc->sc_arpcom.esa, 0);
+ sc->state |= ETH_DRV_STATE_ACTIVE;
+ }
+ }
+ }
+
+ while (!(sc->funs->can_send)(sc)) {
+ // Give driver a chance to service hardware
+ (sc->funs->poll)(sc);
+ CYGACC_CALL_IF_DELAY_US(2*100000);
+ if (--wait_time <= 0)
+ goto reset_and_out; // Give up on sending packet
+ }
+
+ sg_list[0].buf = (CYG_ADDRESS)eth_hdr;
+ sg_list[0].len = (6+6+2); // FIXME
+ sg_list[1].buf = (CYG_ADDRESS)buf;
+ sg_list[1].len = len;
+ packet_sent = 0;
+#ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG
+ if (cyg_io_eth_net_debug) {
+ int old_console;
+ old_console = start_console();
+ diag_printf("Ethernet send:\n");
+ DIAG_DUMP_BUF_HDR(eth_hdr, 14);
+ DIAG_DUMP_BUF_BDY(buf, len);
+ end_console(old_console);
+ }
+#endif
+
+ (sc->funs->send)(sc, sg_list, sg_len, len+14, (CYG_ADDRWORD)&packet_sent);
+
+ wait_time = 50000;
+ while (1) {
+ (sc->funs->poll)(sc);
+
+ if(packet_sent)
+ break;
+
+ CYGACC_CALL_IF_DELAY_US(2*10);
+ if (--wait_time <= 0)
+ goto reset_and_out; // Give up on sending packet
+ }
+ reset_and_out:
+ if (dbg) {
+// if (!(old_state & ETH_DRV_STATE_ACTIVE)) {
+// // This interface was not fully initialized, shut it back down
+// (sc->funs->stop)(sc);
+// }
+ if (eth_drv_old == 0) {
+ sc->funs->eth_drv = sc->funs->eth_drv_old;
+ sc->funs->eth_drv_old = (struct eth_drv_funs *)0;
+ }
+ }
+}
+
+//
+// This function is called from the hardware driver when an output operation
+// has completed - i.e. the packet has been sent.
+//
+static void
+eth_drv_tx_done(struct eth_drv_sc *sc, CYG_ADDRWORD key, int status)
+{
+ CYGARC_HAL_SAVE_GP();
+ if ((int *)key == &packet_sent) {
+ *(int *)key = 1;
+ } else {
+ // It's possible that this acknowledgement is for a different
+ // [logical] driver. Try and pass it on.
+#if defined(CYGDBG_IO_ETH_DRIVERS_DEBUG) && \
+ (CYGDBG_IO_ETH_DRIVERS_DEBUG_VERBOSITY >=2 )
+ // Note: not normally enabled - too verbose
+ if (cyg_io_eth_net_debug > 1) {
+ int old_console;
+ old_console = start_console();
+ diag_printf("tx_done for other key: %x\n", key);
+ end_console(old_console);
+ }
+#endif
+ LOCK_APPLICATION_SCHEDULER();
+ if (sc->funs->eth_drv_old) {
+ (sc->funs->eth_drv_old->tx_done)(sc, key, status);
+ } else {
+ (sc->funs->eth_drv->tx_done)(sc, key, status);
+ }
+ UNLOCK_APPLICATION_SCHEDULER();
+ }
+ CYGARC_HAL_RESTORE_GP();
+}
+
+//
+// Receive one packet of data from the hardware, if available
+//
+int
+eth_drv_read(char *eth_hdr, char *buf, int len)
+{
+ struct eth_drv_sc *sc = __local_enet_sc;
+ struct eth_msg *msg;
+ int res;
+ void *dbg = CYGACC_CALL_IF_DBG_DATA();
+ int old_state;
+ void *eth_drv_old = 0;
+
+ if (dbg) {
+ sc = (struct eth_drv_sc *)dbg; // Use control from installed driver
+ eth_drv_old = sc->funs->eth_drv_old;
+ if (eth_drv_old == 0) {
+ sc->funs->eth_drv_old = sc->funs->eth_drv;
+ sc->funs->eth_drv = &eth_drv_funs; // Substitute stand-alone driver
+ old_state = sc->state;
+ if (!(old_state & ETH_DRV_STATE_ACTIVE)) {
+ // This interface not fully initialized, do it now
+ (sc->funs->start)(sc, (unsigned char *)sc->sc_arpcom.esa, 0);
+ sc->state |= ETH_DRV_STATE_ACTIVE;
+ }
+ }
+ }
+ (sc->funs->poll)(sc); // Give the driver a chance to fetch packets
+ msg = eth_drv_msg_get(&eth_msg_full);
+ if (msg && len >= msg->len - 14) {
+ memcpy(eth_hdr, msg->data, 14);
+ memcpy(buf, &msg->data[14], msg->len-14);
+ res = msg->len;
+ } else {
+ res = 0;
+ }
+ if (msg) {
+ eth_drv_msg_put(&eth_msg_free, msg);
+ }
+
+ if (dbg) {
+ if (eth_drv_old == 0) {
+ sc->funs->eth_drv = sc->funs->eth_drv_old;
+ sc->funs->eth_drv_old = (struct eth_drv_funs *)0;
+ }
+// if (!old_state & ETH_DRV_STATE_ACTIVE) {
+// // This interface was not fully initialized, shut it back down
+// (sc->funs->stop)(sc);
+// }
+ }
+ return res;
+}
+
+#ifdef CYGSEM_IO_ETH_DRIVERS_PASS_PACKETS
+//
+// This function is called to copy a message up to the next level.
+// It is only used when this driver has usurped the processing of
+// network functions.
+//
+static unsigned char *eth_drv_copy_recv_buf;
+static void
+eth_drv_copy_recv(struct eth_drv_sc *sc,
+ struct eth_drv_sg *sg_list,
+ int sg_len)
+{
+ int i;
+ unsigned char *ppp;
+ CYGARC_HAL_SAVE_GP();
+ ppp = eth_drv_copy_recv_buf; // Be safe against being called again by accident
+ for (i = 0; i < sg_len; i++) {
+ if ( sg_list[i].buf ) // Be safe against discarding calls
+ memcpy((unsigned char *)sg_list[i].buf,
+ ppp, sg_list[i].len);
+ ppp += sg_list[i].len;
+ }
+ CYGARC_HAL_RESTORE_GP();
+}
+#endif
+
+//
+// This function is called from a hardware driver to indicate that an input
+// packet has arrived. The routine will set up appropriate network resources
+// to hold the data and call back into the driver to retrieve the data.
+//
+static void
+eth_drv_recv(struct eth_drv_sc *sc, int total_len)
+{
+ struct eth_drv_sg sg_list[MAX_ETH_DRV_SG];
+ int sg_len = 0;
+ struct eth_msg *msg;
+ unsigned char *buf;
+ CYGARC_HAL_SAVE_GP();
+
+ if ((total_len > MAX_ETH_MSG) || (total_len < 0)) {
+#ifdef CYGSEM_IO_ETH_DRIVERS_WARN
+ int old_console;
+ old_console = start_console();
+ diag_printf("%s: packet of %d bytes truncated\n", __FUNCTION__, total_len);
+ end_console(old_console);
+#endif
+ total_len = MAX_ETH_MSG;
+ }
+ msg = eth_drv_msg_get(&eth_msg_free);
+ if (msg) {
+ buf = msg->data;
+ } else {
+#ifdef CYGSEM_IO_ETH_DRIVERS_WARN
+ int old_console;
+ old_console = start_console();
+ diag_printf("%s: packet of %d bytes dropped\n", __FUNCTION__, total_len);
+ end_console(old_console);
+#endif
+ buf = (unsigned char *)0; // Drivers know this means "the bit bucket"
+ }
+ sg_list[0].buf = (CYG_ADDRESS)buf;
+ sg_list[0].len = total_len;
+ sg_len = 1;
+
+ (sc->funs->recv)(sc, sg_list, sg_len);
+#ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG
+ if (cyg_io_eth_net_debug) {
+ int old_console;
+ old_console = start_console();
+ diag_printf("Ethernet recv:\n");
+ if ( buf ) {
+ DIAG_DUMP_BUF_HDR(buf, 14);
+ DIAG_DUMP_BUF_BDY(buf+14, total_len-14);
+ }
+ else
+ diag_printf(" ...NULL buffer.\n");
+ end_console(old_console);
+ }
+#endif
+#ifdef CYGSEM_IO_ETH_DRIVERS_PASS_PACKETS
+ if ((unsigned char *)0 != buf && // Only pass on a packet we actually got!
+ sc->funs->eth_drv_old != (struct eth_drv_funs *)0) {
+ void (*hold_recv)(struct eth_drv_sc *sc,
+ struct eth_drv_sg *sg_list,
+ int sg_len);
+ // See if this packet was for us. If not, pass it upwards
+ // This is a major layering violation!!
+ if (memcmp(&__local_ip_addr, &buf[14+16], 4)) {
+ hold_recv = sc->funs->recv;
+ sc->funs->recv = eth_drv_copy_recv;
+ eth_drv_copy_recv_buf = buf;
+ // This calls into the 'other' driver, giving it a chance to
+ // do something with this data (since it wasn't for us)
+ LOCK_APPLICATION_SCHEDULER();
+ (sc->funs->eth_drv_old->recv)(sc, total_len);
+ UNLOCK_APPLICATION_SCHEDULER();
+ sc->funs->recv = hold_recv;
+ }
+ }
+#endif
+ if (msg) {
+ msg->len = total_len;
+ eth_drv_msg_put(&eth_msg_full, msg);
+#ifdef CYGSEM_IO_ETH_DRIVERS_WARN
+ // there was an else with a dump_buf() here but it's
+ // meaningless; sg_list[0].buf is NULL!
+#endif
+ }
+ CYGARC_HAL_RESTORE_GP();
+}
+
+//
+// Determine the interrupt vector used by an interface
+//
+int
+eth_drv_int_vector(void)
+{
+ struct eth_drv_sc *sc = __local_enet_sc;
+ return sc->funs->int_vector(sc);
+}
+
+
+void eth_drv_dsr(cyg_vector_t vector,
+ cyg_ucount32 count,
+ cyg_addrword_t data)
+{
+ diag_printf("eth_drv_dsr should not be called: vector %d, data %x\n",
+ vector, data );
+}
+
+
+// EOF src/stand_alone/eth_drv.c
diff --git a/cesar/ecos/packages/io/fileio/current/ChangeLog b/cesar/ecos/packages/io/fileio/current/ChangeLog
new file mode 100644
index 0000000000..76c2b71bb8
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/ChangeLog
@@ -0,0 +1,835 @@
+2005-08-02 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * tests/socket.c (SHOW_RESULT): Add a cast to avoid compiler
+ warnings about the format string not matching the parameters.
+ * tests/testfs.c: rename strcmp and strcpy to mystrcmp and
+ mystrcpy to avoid clashes with the normal implementations.
+
+2005-05-13 Peter Korsgaard <jacmet@sunsite.dk>
+
+ * src/devfs.cxx (dev_stat, dev_fo_fstat): Corrected mode for block
+ devices, made nlink 1.
+ * src/devfs.cxx (dev_fo_fstat): Set st_dev to zero to match dev_stat.
+
+2005-05-26 Gary Thomas <gary@mlbassoc.com>
+
+ * tests/socket.c: Fix config test (CYGPKG_POSIX_SIGNALS)
+
+ * tests/pselect.c: Fix config test (CYGPKG_POSIX_SIGNALS is
+ only defined in <pkgconf/posix.h>) Also, reduce number of
+ iterations so test completes in a reasonable time (~30 seconds).
+
+2005-03-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * tests/testfs.c: Fixed compiler warnigs for passing wrong types
+ to diag_printf.
+ * tests/fileio1.c: Ditto
+ * tests/select.c: Ditto
+
+
+2005-02-24 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/fileio.h: Only include kapi.h when
+ CYGFUN_IO_FILEIO_SELECT is enabled and then define the select
+ support structures.
+
+2005-01-27 Yoshinori Sato <ysato@users.sourceforge.jp>
+
+ * src/io.cxx (ioctl): Change ioctl to use varargs so that it works
+ on with h8300 who's compiler does not like doing it the other way.
+
+2005-01-22 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/misc.cxx (cyg_fs_root_lookup): New function to find the mount
+ point of a give filesystems root directory.
+ * src/fio.h:
+ * include/fileio.h: Made cyg_fs_{un}lock accessible outside of the
+ fileio package.
+
+2004-01-22 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ *
+2004-12-15 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/select.cxx (cyg_pselect): We need the oldmask under all
+ conditions.
+
+2004-12-01 Alex Paulis and Cameron Taylor <ctaylor@waverider.com>
+
+ * include/fileio.h: Changed si_thread to si_waitFlag
+ * src/select.cxx: Improved efficiency: 1. Only threads waiting
+ on a selector are woken up in selwake. This is done by swapping
+ the condition variable for an event flag and registering threads
+ for wakeup in selrecord. 2. No mutex is now required. 3. Search
+ through the FD mask much streamlined.
+
+2004-11-17 Jani Monoses <jani@iv.ro>
+
+ * tests/socket.c: Allow building without kernel config.
+
+2004-11-14 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * tests/fileio1.c: Start the test using cyg_user_start so that
+ it can be used without the kernel.
+ * tests/testfs.c (testfs_time): If we don't have a kernel return 0
+ as the time rather than the current time.
+
+2004-11-14 Jani Monoses <jani@iv.ro>
+
+ * src/devfs.cxx: Removed unneeded header files so the package can
+ be compiled without the kernel.
+
+2004-10-13 David Brennan <eCos@brennanhome.com>
+
+ * include/fileio.h:
+ * src/file.cxx: Added support for cyg_fs_fssync,
+ cyg_fs_get_attrib, and cyg_fs_set_attrib
+
+2004-10-13 David Brennan <eCos@brennanhome.com>
+
+ * src/file.cxx: Added a check data ptr in LOCK_FS
+
+2004-10-06 David Brennan <eCos@brennanhome.com>
+
+ * tests/pselect.c: Added check for POSIX signals while building
+ the test case.
+ * tests/select.c: Include sys/select.h to prevent a possible warning.
+
+2004-10-01 Oyvind Harboe <oyvind.harboe@zylin.com>
+
+ * src/select.cxx: place the CYGBLD_ATTRIB_INIT_PRI such that it
+ compiles for gcc 3.4.2 which is more picky about its placement.
+
+2004-07-23 Oyvind Harboe <oyvind.harboe@zylin.com>
+
+ * src/select.cxx: now correctly returns from select() on
+ e.g. closed file pointers.
+
+2004-04-15 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * tests/fileio1.c: include stdio.h for rename() prototype.
+
+2004-04-07 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/fd.cxx: Fix the assert just added. 0 is a valid fd.
+
+2004-03-25 Sebastien Couret <sebastien.couret@elios-informatique.fr>
+
+ * src/fd.cxx: Added CYG_ASSERT bound checking for file descriptor
+ numbers (0<fd<CYGNUM_FILEIO_NFD).
+
+2004-03-12 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/fio.h: If no POSIX then CYG_FILEIO_DELIVER_SIGNALS
+ and CYG_FILEIO_SIGMASK_SET call CYG_UNUSED_PARAM on their
+ arguments to silence warnings.
+ * src/file.cxx (rename): Use a throw specifier to match
+ prototype.
+
+2004-02-16 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/io.cxx (readwritev): For EWOULDBLOCK and EAGAIN return
+ the number of bytes written if any have been written.
+
+2004-01-07 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/select.cxx: No need to make pselect() dependent on
+ CYGPKG_POSIX - that would depend on the arguments. Assert instead,
+ and more correctly make it contingent on CYGPKG_POSIX_SIGNALS.
+
+ * src/fio.h: Separate out signal functionality into its own separate
+ test.
+
+2003-12-21 Sandeep Kumar <sandeep@codito.com>
+
+ * src/dir.cxx (readdir_r): Handle NULL dirp argument and return
+ EBADF
+
+2003-12-03 Dan Jakubiec <djakubiec@yahoo.com>
+
+ * src/select.cxx (pselect): Fixed the pselect() call to correctly
+ handle NULL timeout arguments. The previous implementation would
+ cause a random timeout value to be used.
+
+2003-11-28 David Woodhouse <dwmw2@redhat.com>
+
+ * include/fileio.h, include/sockio.h, src/dir.cxx, src/fd.cxx,
+ src/io.cxx: Don't include kernel headers if no kernel support.
+
+2003-10-23 Savin Zlobec <savin@elatec.si>
+
+ * src/io.cxx: Added cyg_fs_fsetinfo and cyg_fs_fgetinfo functions.
+
+ * src/file.cxx: Added cyg_fs_setinfo and cyg_fs_getinfo functions.
+
+ * include/fileio.h: Added cyg_fs_fsetinfo, cyg_fs_fgetinfo,
+ cyg_fs_setinfo and cyg_fs_getinfo function prototypes.
+
+2003-10-16 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/socket.cxx (bind): Pass a copy of the socket address so the
+ stack can modify it without changing the users copy. Bug found by
+ reji@codito.com.
+
+2003-10-06 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/fio.h (CYG_FILEIO_SIGMASK_SET): Fixed a compiler warning
+ about an unused variable.
+
+2003-09-22 Eric Doenges <Eric.Doenges@DynaPel.com>
+ * src/devfs.cxx: prototype of dev_fo_select now matches
+ implementation
+ * include/fileio.h: changed definition of cyg_fileop_select to
+ return a cyg_bool instead of int to match current implementations
+ * src/misc.cxx: changed cyg_fileio_seltrue() to match prototype.
+
+2003-07-11 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/socket.cxx (socket): If there are no network stacks configured
+ return EAFNOSUPPORT when opening a socket.
+
+2003-04-11 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/socket.cxx: Give nstab_lock mutex a priority. Also it's
+ local, so make static.
+ Change nstab and nstab_end to cyg_nstab and cyg_nstab_end for
+ cleaner namespace.
+ * include/sockio.h: nstab -> cyg_nstab.
+ * src/misc.cxx, src/dir.cxx, src/fio.h, src/file.cxx: Change
+ fstab, fstab_end, mtab, mtab_end, cdir_dir, cdir_mtab_entry to
+ have cyg_ prefix for cleaner namespace.
+
+2003-03-20 Gary Thomas <gary@mlbassoc.com>
+
+ * src/devfs.cxx: Remove unnecessary checks for -EAGAIN (should
+ no longer happen in lower layers).
+
+2003-03-08 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * tests/pselect.c (pthread_entry1): Allow for infrequent but
+ occasional off by one error due to race condition when
+ signalling.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/fileio.cdl: Add doc link.
+
+2003-02-20 Bart Veer <bartv@ecoscentric.com>
+
+ * cdl/fileio.cdl: identify test binaries, not test sources
+
+2003-01-30 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * cdl/fileio.cdl: Added interface CYGINT_IO_FILEIO_FS which any
+ FS which FILEIO can use should implement.
+
+2003-01-23 Gary Thomas <gary@mlbassoc.com>
+
+ * src/misc.cxx (cyg_mtab_lookup): Return an error if the current
+ directory is not known - happens if no file systems are mounted.
+
+2002-11-10 Nick Garnett <nickg@ecoscentric.com>
+
+ * src/fio.h: Added macros to deal with signal handling. These will
+ call into the POSIX package if it is present, but are null if it
+ is not.
+
+ * src/select.cxx: Renamed original select() to cyg_pselect() and
+ added select() and pselect() routine from POSIX-200X to call
+ it. Reorganized code a little and added calls to macros to deal
+ with signal delivery and detection.
+
+ * cdl/fileio.cdl:
+ * tests/pselect.c: New test added to verify the signal masking and
+ delivery behaviour of pselect().
+
+ * tests/select.c: Fixed up some printfs to make it a little tidier.
+
+2002-11-03 Gary Thomas <gthomas@ecoscentric.com>
+
+ * src/io.cxx:
+ * cdl/fileio.cdl: Add readv()/writev() support.
+
+2002-08-08 Nick Garnett <nickg@calivar.demon.co.uk>
+
+ * src/select.cxx (select): Changed mechanism for calculating
+ select timeout to avoid possible race conditions between this code
+ and the timer DSR.
+
+2002-05-29 Jesper Skov <jskov@redhat.com>
+
+ * tests/fileio1.c: Removed strcat definition. Rely on string.h to
+ provide it.
+
+2002-05-28 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/limits.h (NAME_MAX): Increase default to 64.
+ * cdl/fileio.cdl: Set CYGBLD_ISO_NAME_MAX_HEADER.
+
+2002-04-11 Nick Garnett <nickg@redhat.com>
+
+ * doc/fileio.sgml: Added a section on writing a new
+ filesystem. This probably still needs more work, but it's better
+ than nothing.
+
+2002-04-05 Nick Garnett <nickg@redhat.com>
+
+ * src/devfs.cxx: Changed test for EAGAIN in dev_fo_read() and
+ dev_fo_write() to negate value first.
+
+2002-03-07 Nick Garnett <nickg@redhat.com>
+
+ * doc/fileio.sgml: Added this file to contain documentation on
+ this package.
+
+2002-02-04 Gary Thomas <gthomas@redhat.com>
+
+ * tests/socket.c (main):
+ * tests/select.c (main): sin_len field must be set.
+
+2002-01-29 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/fileio.cdl: Actually, don't bother to build testfs.c at all.
+
+2002-01-29 Jesper Skov <jskov@redhat.com>
+
+ * cdl/fileio.cdl: Added CYGPKG_FILEIO_BUILD_TESTS option and made
+ building of testfs dependant on it.
+
+2002-01-25 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/inode.h: New API defining a common generic inode type.
+ * src/inocache.cxx: Implement the inode cache functions.
+ * cdl/fileio.cdl: (Configurably) build it.
+
+2002-01-23 David Woodhouse <dwmw2@redhat.com>
+2002-01-23 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/fileio.cdl: Remove select compilation and support to new
+ CYGFUN_IO_FILEIO_SELECT option conditional on the kernel
+ Ditto for DEVS and CYGPKG_IO_FILEIO_DEVFS_SUPPORT.
+ Make CYGPKG_IO_FILEIO_SOCKET_SUPPORT also conditional on kernel.
+ * src/fio.h: Define FILEIO_MUTEX_LOCK() and FILEIO_MUTEX_UNLOCK()
+ so that code doesn't need to care whether the kernel is included or
+ not.
+ * src/fd.cxx: Conditionalize mutex usage throughout on CYGPKG_KERNEL,
+ and FILEIO_MUTEX_LOCK()/UNLOCK().
+ * src/file.cxx: Ditto.
+ * src/misc.cxx: Ditto.
+ (cyg_timestamp): Only use Cyg_Clock implementation if CYGPKG_KERNEL.
+
+2002-01-23 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/misc.cxx: Initialize fileio_initializer at prio CYG_INIT_IO_FS
+ so it happens after the devices it depends on.
+ * src/file.cxx (getcwd_lock): Ditto.
+ * src/select.cxx (select_mutex): ditto.
+ (selwait): ditto.
+ * src/fd.cxx (fdlock): ditto
+ (file_lock): ditto.
+ * src/dir.cxx (readdir): Use FILEIO_RETURN_VALUE on exit.
+ (readdir_r): Ditto.
+ * src/devfs.cxx (dev_stat): Don't use handle for st_dev - it will
+ probably be truncated.
+
+2002-01-04 Wade Jensen <Wade_Jensen@inter-tel.com>
+2002-01-04 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/socket.cxx (recvfrom): Set msg.msg_namelen correctly for
+ NULL fromlen.
+
+2001-12-28 Gary Thomas <gthomas@redhat.com>
+
+ * src/io.cxx (readwrite): Add missing check for return (errors).
+
+2001-11-29 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/file.cxx (chdir): Don't detach from current dir if unset.
+
+2001-11-02 Felix Wong <felixwong@i-technologies.cc>
+2001-11-02 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/devfs.cxx (dev_fo_read): Support block devices.
+ (dev_fo_write): Ditto.
+
+2001-10-09 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/fio.h: Make cancellation point dependand on
+ CYGINT_ISO_PTHREAD_IMPL from <pkgconf/isoinfra.h> really.
+ * tests/select.c: Ditto.
+
+2001-10-09 Jesper Skov <jskov@redhat.com>
+
+ * tests/select.c: Do NA check for posix threads.
+
+ * src/fio.h: Make cancellation point dependant on
+ CYGPKG_POSIX_PTHREAD as in the POSIX package.
+
+2001-07-26 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/fileio.cdl: Implements select().
+ * src/select.cxx: Include <sys/select.h> from isoinfra.
+
+2001-07-19 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/devfs.cxx (dev_fo_read): Treat non-blocking reads returning
+ EAGAIN correctly
+ (dev_fo_write): Ditto for writes.
+
+2001-06-14 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/fio.h (FILEIO_ENTRY): Don't use CYG_MACRO_START/END around
+ tracing macros.
+ Reported by Richard Panton.
+
+2001-06-11 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/socket.cxx (cyg_sock_unlock): Fix cyg_file_lock->cyg_file_unlock
+ thinko.
+
+2001-03-15 Gary Thomas <gthomas@redhat.com>
+
+ * src/file.cxx (open): Check for required/valid open mode.
+
+2001-03-14 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/misc.cxx (cyg_mtab_lookup): check valid mtab entry
+ (umount): ditto.
+
+2001-03-14 Martin van Veen <martin_van_veen@yahoo.com>
+
+ * src/misc.cxx (mount): Return error if mount fails.
+
+2001-03-12 Gary Thomas <gthomas@redhat.com>
+
+ * src/misc.cxx (mount): Do implicit 'chdir()' in the
+ absence of any statically mounted file systems.
+ (cyg_fs_lock, cyg_fs_unlock): Add assertions.
+
+ * src/file.cxx (LOCK_FS):
+ * src/dir.cxx (LOCK_FS): Add assertions on 'mte'.
+
+2001-01-05 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/socket.c (main):
+ Added call to init_all_network_interfaces().
+
+2000-12-15 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/misc.cxx: Fixed some bugs in initialization of timestamp
+ function when Wallclock and POSIX packages are absent.
+
+2000-11-01 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/io.cxx (readwrite): Ensure we call FILEIO_RETURN_VALUE() to
+ get correct cleanup
+ (fpathconf): Ditto
+ (lseek): Ditto
+
+ * src/file.cxx (open): If applicable, refer to stdin, stdout and stderr
+ here to ensure they are pulled in, in case selective linking would
+ otherwise eliminate them. This is to ensure they get allocated to
+ fd's 0, 1 and 2.
+
+2000-10-13 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/io.cxx (readwrite): Merged both read() and write() functions
+ into this single common routine.
+
+ * include/fileio.h: Introduced a common typedef for both read and
+ write operations.
+
+ * doc/fileio.txt: Added some text about getcwd() and tidied up
+ some other parts.
+
+2000-10-05 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/file.cxx: Added support for getcwd(). There are three
+ mechanisms provided here. The first is to use the FS_INFO_GETCWD
+ key on the filesystem to use any support it has for this. If that
+ fails it falls back on one of the two other mechanisms. If
+ CYGPKG_IO_FILEIO_TRACK_CWD is set then the current directory is
+ tracked textually in chdir() and the result of that is reported in
+ getcwd(). Otherwise an attempt is made to traverse the directory
+ tree to its root using ".." entries. This last option is
+ complicated and expensive, so the other two mechanisms are to be
+ preferred if possible.
+
+ * include/fileio.h: Added FS_INFO_GETCWD getinfo option and a
+ matching struct cyg_getcwd_info. These are used to access getcwd()
+ support in a filesystem.
+
+ * src/fio.h: Added initial support for POSIX API function entry
+ and return.
+
+ * cdl/fileio.cdl: Added CYGPKG_IO_FILEIO_TRACK_CWD option to
+ enable current directory tracking.
+
+2000-09-28 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/select.cxx (cyg_selwakeup):
+ Removed test for whether the waiting thread is actually waiting
+ for this event. This lead to a race condition when the thread is
+ still polling other objects but has already checked this
+ event. Now all waiting selectors are woken up by each selectable
+ event.
+
+2000-09-18 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/select.cxx: Apply constructor prioritization to mutexes and
+ condition variables
+ * src/fd.cxx: Ditto
+
+2000-09-11 Jonathan Larmour <jlarmour@redhat.com>
+
+ * tests/select.c: NA if no POSIX package
+
+ * cdl/fileio.cdl: Set CYGBLD_ISO_OPEN_MAX_HEADER to this package's
+ limits.h
+ * include/limits.h: New file to define OPEN_MAX (and other things in
+ future)
+
+2000-09-08 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/fileio.h:
+ Removed spaces from arguments to CYG_HAL_TABLE_ENTRY().
+
+2000-09-04 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/sockio.h (struct cyg_nstab_entry): Apply CYG_HAL_TABLE_TYPE
+ * include/fileio.h (struct cyg_mtab_entry): Ditto
+ (FSTAB_ENTRY): Ditto
+
+2000-08-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/select.cxx (select): Added scheduler unlock in timeout
+ return case.
+
+2000-08-22 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * doc/fileio.txt: Add Nick's text description of plug-in filesystems
+ and sockets here for now.
+
+2000-08-18 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/fileio.h: Added CYG_FAPPEND flag for preservation in
+ file object flags.
+ Added prototype for cyg_timestamp().
+
+ * src/misc.cxx: Fixed bug in cyg_mtab_lookup() when dealing with
+ empty mount table entries.
+ Added cyg_timestamp() to provide timestamp support to client
+ filesystems.
+
+2000-08-09 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/misc.cxx: Don't define own strcmp() function (which had a bug
+ anyway). Use string.h.
+ * cdl/fileio.cdl: requires ISO C string functions
+
+2000-08-01 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/misc.cxx: Use correct initializer for mtab_extra
+
+ * src/fio.h (FILEIO_RETURN_VOID): Surround in CYG_MACRO_START to
+ prevent problems when used with one-line if.
+ (FILEIO_RETURN_VALUE): Likewise
+
+ * include/fileio.h: Make getinfo/setinfo take void *bufs, not char *
+ for easier casting (and more correct)
+
+ * tests/testfs.c: Likewise
+
+ * src/devfs.cxx: Likewise.
+ Also fix bug with Nick's change below that set non-blocking mode
+ in all cases.
+
+2000-07-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/devfs.cxx (dev_open): Added support for O_NONBLOCK.
+
+2000-07-27 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/select.c: Wrapped include of pkgconf/io_serial.h in
+ #ifdef CYGPKG_IO_SERIAL.
+
+2000-07-25 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * tests/select.c (main): Wrap call to init_all_network_interfaces()
+ in #ifdef TEST_NET
+
+2000-07-25 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/select.c (main): Added call to
+ init_all_network_interfaces().
+
+2000-07-21 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/fileio.h:
+ * src/file.cxx:
+ * src/devfs.cxx:
+ * tests/testfs.c:
+ Added support for link() API call. This was the only major file
+ operation omitted.
+
+2000-07-20 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/fileio.h: Added some modes for fsync().
+
+ * src/file.cxx: Added access() function.
+
+ * src/io.cxx: Added fdatasync() and isatty().
+
+ * src/devfs.cxx: Added fsync() support.
+
+ * tests/fileio1.c: Added calls to access() to check (non-)existence
+ of files where appropriate.
+
+2000-07-13 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/select.cxx (select): Fixed return value when timing out. Now
+ returns zero and no error, it used to return -1 and ETIMEDOUT.
+
+ * src/io.cxx: Fixed fsync() to match standard.
+
+ * src/devfs.cxx:
+ Added lseek() support - all devices are always at position
+ zero. Added [f]stat() support - currently just fills in the stat
+ buffer with some predefined values. When we have more
+ sophisticated devices this may need to be improved.
+
+ * tests/testfs.c (testfs_open): Added support for O_TRUNC open
+ flag.
+
+ * tests/stdio.c:
+ * cdl/fileio.cdl:
+ Added stdio.c to test C library IO integration. This does not test
+ the C library functionality, just that it works with the fileio
+ package in certain limited ways.
+
+2000-06-30 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/misc.cxx: Fixed definition of mtab_extra[] so that it gets
+ emitted correctly into the object file.
+
+ * tests/testfs.c:
+ Added support for dynamic mount()/umount().
+ Added testfs_dump() to report state of filesystem, and to do a
+ little consistency checking.
+
+ * tests/fileio1.c: Extended testing to mount() and maximum file
+ sizes.
+
+2000-06-28 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/dirent.h: Added this file to contain directory support
+ definitions.
+
+ * include/fileio.h:
+ Introduced separate typedefs for all operation functions.
+ Added CYG_FDIR to mark directory streams.
+ Added some default operation functions.
+
+ * src/fio.h (FILEIO_RETURN_VOID): Added this macro.
+
+ * src/dir.cxx: Added this file to contain directory listing API
+ functions.
+
+ * src/misc.cxx:
+ Added default operation functions.
+
+ * src/file.cxx:
+ Fixed mkdir() to have correct prototype.
+ Moved opendir() to dir.cxx.
+ Added support in chdir() for deregistering the current directory.
+
+ * cdl/fileio.cdl: Added dev.cxx to compile list. Added support for
+ dirent.h implementation.
+
+ * tests/testfs.c: Lots of changes towards a more complete
+ implementation.
+
+ * tests/select.c: Changed SHOW_RESULT() message a little. Fixed up
+ some warnings when no testing is possible.
+
+ * tests/fileio1.c:
+ Largely rewritten to do more complete testing.
+
+2000-06-19 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/select.cxx: Added selwake_count variable to count select
+ wakeups. This allows us to avoid sleeping when a selectee calls
+ cyg_selwakeup() while we are still scanning the FD sets.
+
+ * include/fileio.h:
+ * include/sockio.h:
+ * src/misc.cxx:
+ * src/socket.cxx:
+ Converted tables to new mechanism.
+
+ * tests/select.c: Reduced buffer size to avoid buffer overflow in
+ serial devices.
+
+2000-06-15 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/fileio.h:
+ Added typedef for cyg_selinfo.
+ Added umount to fstab entry structure.
+ Added mount() and unmount() prototypes.
+ Added const in various places.
+ Changed some types from CYG_ADDRWORD to their ISO standard
+ equivalents.
+ Added si_thread field to cyg_selinfo structure, added
+ cyg_selinit() prototype.
+
+ * src/socket.cxx: Converted an errant LOCK_NS() into the
+ UNLOCK_NS() it should be.
+
+ * src/select.cxx:
+ Added cyg_selinit() which must be called by all selectees at
+ initialization to prepare a cyg_selinfo structure for use.
+ Modified cyg_selwakeup() to minimize the number for actual wakeup
+ operations it actually performs.
+
+ * src/misc.cxx:
+ Added mtab_extra[] to contain dynamic mount table entries,
+ modified startup scan of mtab to cope with this.
+ changed matchlen() to cope with "/" mountpoint, this function is
+ rapidly ceasing to be the neat bit of code it started out as.
+ Added implementations of mount() and umount().
+
+ * src/devfs.cxx: Added dev_umount, various minor tweaks.
+
+ * cdl/fileio.cdl: Added CYGNUM_FILEIO_MTAB_EXTRA to define how
+ many extra mount table entries should exist for dynamic mounts.
+ Added select.c to list of tests.
+
+ * tests/select.c: Added this file to test select() functionality
+ on both sockets and (serial) devices.
+
+ * tests/socket.c: Tidied some compilation warnings.
+
+ * tests/testfs.c: Added umount stub function.
+
+2000-06-12 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/sockio.h:
+ * include/fileio.h:
+ * src/fio.h:
+ * tests/testfs.c:
+ * src/socket.cxx:
+ * src/misc.cxx:
+ * src/file.cxx:
+ * src/fd.cxx:
+ * src/io.cxx:
+ * src/devfs.cxx:
+ Tidied up and sorted out locking protocols and synchronization
+ mechanisms.
+
+2000-06-09 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/select.cxx:
+ * src/devfs.cxx:
+ * include/fileio.h:
+ * tests/testfs.c:
+ Added select() support.
+
+ * src/socket.cxx: Fixed a resource management bug in accept().
+
+ * tests/socket.c: Extended to test that all API calls work, at
+ least minimally, as they should. Still some calls to add here.
+
+2000-06-07 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/socket.c: Simple socket API test program. Needs much more
+ work to give full coverage.
+
+ * src/socket.cxx: Filled in some implementations. Changed some
+ type specifications.
+
+ * src/select.cxx: Added this file to contain select()
+ implementation. At present it does nothing.
+
+ * include/sockio.h:
+ Added definition of socklen_t for use when the NET package is
+ absent - just so this file compiles.
+ Added macro to generate an nstab entry.
+ Changed prototypes of socket operation ffunctions to better match
+ both API definition and BSD stack implementation.
+
+ * cdl/fileio.cdl: Added support for socket API. This is only
+ active if the NET package is present.
+ Added initial socket API test program.
+
+2000-06-02 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/socket.cxx:
+ Added this file to implement socket interface. This is still a
+ rough draft that has not yet been tested.
+
+ * src/misc.cxx:
+ * src/io.cxx:
+ * src/fio.h: Various minor changes and bug fixes.
+
+ * src/file.cxx: Various bug fixes. Added pathconf().
+
+ * src/fd.cxx: Various changes and bug fixes, mostly in the
+ handling of the locking mechanisms.
+
+ * src/devfs.cxx: Added this filesystem to interface to the device
+ IO subsystem. Not yet tested.
+
+ * include/sockio.h: Various minor changes prompted by
+ implementation.
+
+ * include/fileio.h:
+ Added macros to instantiate filesystem and mount table entries.
+ Added mode mask for setting up f_flags.
+ Changed file object types, added device type.
+
+ * cdl/fileio.cdl:
+ Added some extra files to compile. Some now go in libextras.
+ Added table maxima for fstab, mtab and nstab.
+ Added tests.
+
+ * tests/fileio1.c: Added this simple test for the fileio
+ infrastructure.
+
+ * tests/testfs.c:
+ Created this simple ROM filesystem to test out the fileio
+ infrastructure. This is not really usable for anything other than
+ this, and should not be used in "production" systems. Hence its
+ presence in tests rather than src.
+ At present this only has support for open(), close(), read(),
+ write(), lseek() and unlink(). Other parts will be implemented as
+ and when required.
+
+2000-05-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/fio.h:
+ * src/file.cxx:
+ * src/io.cxx:
+ * src/misc.cxx:
+ Roughed out most of the file IO infrastructure. While this code
+ compiles, none of it has actually been executed yet. A lot of this
+ was cut-and-paste-and-edit, so some minor blemishes are to be
+ expected.
+
+ * src/fd.cxx: Several modifications in response to implementing
+ rest of infrastructure. Added dup() and dup2() API routines.
+
+ * include/fileio.h: Many changes and tidies prompted by
+ infrastructure implementation.
+
+ * cdl/fileio.cdl: Added "implements" directives for isoinfra
+ interfaces. Extended compile to new files.
+
+2000-05-26 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/fileio.h:
+ * include/sockio.h:
+ * src/fd.cxx:
+ * cdl/fileio.cdl:
+ Created these files as a start at defining the file IO package.
+ There is still a lot to do here, so expect radical changes to all
+ of these files in the near future.
diff --git a/cesar/ecos/packages/io/fileio/current/cdl/fileio.cdl b/cesar/ecos/packages/io/fileio/current/cdl/fileio.cdl
new file mode 100644
index 0000000000..bf38686130
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/cdl/fileio.cdl
@@ -0,0 +1,243 @@
+# ====================================================================
+#
+# fileio.cdl
+#
+# FILEIO layer configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2002 Nick Garnett
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): nickg
+# Contributors:
+# Date: 2000-5-25
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_IO_FILEIO {
+ display "POSIX File IO compatibility layer"
+ description "This package enables the POSIX compatibility
+ layer that implements IEEE 1003.1 file IO."
+ include_dir cyg/fileio
+ doc ref/fileio.html
+
+ requires CYGPKG_ISOINFRA
+ requires CYGPKG_ERROR
+ requires CYGINT_ISO_ERRNO
+ requires CYGINT_ISO_ERRNO_CODES
+ requires CYGINT_ISO_STRING_STRFUNCS
+
+ implements CYGINT_ISO_FCNTL
+ implements CYGINT_ISO_OPEN
+ implements CYGINT_ISO_DIRENT
+
+ requires { CYGBLD_ISO_DIRENT_HEADER == "<cyg/fileio/dirent.h>" }
+ requires { CYGBLD_ISO_OPEN_MAX_HEADER == "<cyg/fileio/limits.h>" }
+ requires { CYGBLD_ISO_NAME_MAX_HEADER == "<cyg/fileio/limits.h>" }
+
+ compile fd.cxx file.cxx io.cxx dir.cxx
+ compile -library=libextras.a misc.cxx
+
+ cdl_interface CYGINT_IO_FILEIO_FS {
+ display "Filesystems interfacing to FILEIO"
+ no_define
+ description "
+ Each filesystem driver which FILEIO can use implements
+ this interface. You can use this to determine if there are
+ any filesystems configured in the system."
+ }
+
+ cdl_option CYGFUN_IO_FILEIO_SELECT {
+ display "Enable support for select()"
+ active_if CYGPKG_KERNEL
+ implements CYGINT_ISO_SELECT
+ default_value 1
+ description "
+ This option enables support for select()."
+
+ compile select.cxx
+ }
+
+ cdl_option CYGPKG_IO_FILEIO_DEVFS_SUPPORT {
+ display "Enable devfs support"
+ active_if CYGPKG_IO
+ default_value { CYGPKG_REDBOOT ? 0 : 1 }
+ description "
+ This option enables support for the devfs file system."
+
+ compile -library=libextras.a devfs.cxx
+ }
+
+ cdl_option CYGPKG_IO_FILEIO_SOCKET_SUPPORT {
+ display "Enable socket support"
+ active_if CYGPKG_NET
+ active_if CYGPKG_KERNEL
+ default_value 1
+ description "
+ This option enables support for the socket interface. It is
+ only present if the NET package is included."
+
+ compile socket.cxx
+ }
+
+ cdl_option CYGNUM_FILEIO_NFILE {
+ display "Maximum number of open files"
+ flavor data
+ default_value 16
+ legal_values 1 to 9999999
+ description "This option controls the number of open files
+ that are allowed for all filesystems."
+ }
+
+ cdl_option CYGNUM_FILEIO_NFD {
+ display "Maximum number of open file descriptors"
+ flavor data
+ default_value 16
+ legal_values CYGNUM_FILEIO_NFILE to 9999999
+ description "This option controls the number of open file descriptors
+ that are allowed for all filesystems."
+ }
+
+ cdl_option CYGNUM_FILEIO_FSTAB_MAX {
+ display "Maximum number of installed filesystems"
+ flavor data
+ default_value 4
+ legal_values 1 to 9999999
+ description "This option controls the maximum number of filesystems
+ that can be handled by the fileio system."
+
+ }
+
+ cdl_option CYGNUM_FILEIO_MTAB_MAX {
+ display "Maximum number of mounted filesystems"
+ flavor data
+ default_value 8
+ legal_values CYGNUM_FILEIO_MTAB_EXTRA to 9999999
+ description "This option controls the maximum number of mounted
+ filesystems that can be handled by the fileio system."
+
+ }
+
+ cdl_option CYGNUM_FILEIO_MTAB_EXTRA {
+ display "Number of dynamically mounted filesystems"
+ flavor data
+ default_value 8
+ legal_values 0 to 9999999
+ description "This option controls the number of mounted
+ filesystems that can be created dynamically."
+ }
+
+ cdl_option CYGNUM_FILEIO_NSTAB_MAX {
+ display "Maximum number of installed network stacks"
+ flavor data
+ default_value 1
+ legal_values 1 to 9999999
+ description "This option controls the maximum number of installed
+ network stacks that can be handled by the fileio system."
+ }
+
+ cdl_option CYGPKG_IO_FILEIO_TRACK_CWD {
+ display "Enable current directory tracking"
+ flavor bool
+ default_value 1
+ description "This option enables tracking of the name of the current
+ directory in the FILEIO package, to support the getcwd()
+ function. When this option is enabled the FILEIO package
+ will attempt to maintain a string that names the current
+ directory. It does this textually, dealing with \".\" and
+ \"..\" entries by textual manipulation. While this should
+ always provide a path for the current directory, it may not
+ be the best, if symbolic links are present. This tracked CWD
+ is only used if a filesystem does not support the
+ FS_INFO_GETCWD key. "
+ }
+
+ cdl_component CYGPKG_IO_FILEIO_INODE {
+ display "Generic inode support"
+ flavor bool
+ description "This option enables generic inode support useful to
+ some filesystems. Not all filesystems require this
+ so it is not enabled by default."
+ default_value 0
+ requires CYGINT_ISO_MALLOC
+ compile inocache.cxx
+
+ cdl_option CYGNUM_IO_FILEIO_MAX_INODE_CACHE_DEAD {
+ display "Maximum space for unused cached inodes"
+ flavor data
+ default_value 10
+ description "The inode cache allows a maximum limit to be set
+ for the number of unused inodes still in the
+ cache before they are freed. It may be set to 0
+ to indicate no dead inode caching should be
+ provided."
+ }
+ }
+
+ cdl_option CYGNUM_FILEIO_IOVEC_MAX {
+ display "Maximum size of iovec used by readv/writev"
+ flavor data
+ default_value 16
+ legal_values 1 to 9999999
+ description "This option controls the maximum size of the iovec
+ structure that can be used by readv()/writev(). This
+ limit is required because the iovec structure must be
+ invariant (to the user), thus a copy needs to be made
+ by the interface routines. The limit is merely a
+ control over the amount of stack space used by the
+ readv()/writev() functions."
+
+ }
+
+ # ----------------------------------------------------------------
+ # Tests
+
+ cdl_option CYGPKG_IO_FILEIO_TESTS {
+ display "Fileio tests"
+ flavor data
+ no_define
+ calculated { "tests/fileio1 tests/socket tests/select tests/stdio tests/pselect" }
+ description "
+ This option specifies the set of tests for the FileIO package."
+ }
+}
+
+# ====================================================================
+# End of fileio.cdl
+
+
diff --git a/cesar/ecos/packages/io/fileio/current/doc/fileio.sgml b/cesar/ecos/packages/io/fileio/current/doc/fileio.sgml
new file mode 100644
index 0000000000..3111fc32bb
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/doc/fileio.sgml
@@ -0,0 +1,1196 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- fileio.sgml -->
+<!-- -->
+<!-- eCos Generic File I/O package documentation -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part id="fileio">
+<title>File System Support Infrastructure</title>
+
+<!-- {{{ Introduction -->
+
+<chapter id="fileio-intro">
+<title>Introduction</title>
+
+<para>
+This document describes the filesystem infrastructure provided in
+eCos. This is implemented by the FILEIO package and provides POSIX
+compliant file and IO operations together with the BSD socket
+API. These APIs are described in the relevant standards and original
+documentation and will not be described here. See <xref
+linkend="posix-standard-support"> for details of which parts of the
+POSIX standard are supported.
+</para>
+
+<para>
+This document is concerned with the interfaces presented to client
+filesystems and network protocol stacks.
+</para>
+
+<para>
+The FILEIO infrastructure consist mainly of a set of tables containing
+pointers to the primary interface functions of a file system. This
+approach avoids problems of namespace pollution (for example several
+filesystems can have a function called <function>read()</function>, so long as they are
+static). The system is also structured to eliminate the need for
+dynamic memory allocation.
+</para>
+
+<para>
+New filesystems can be written directly to the interfaces described
+here. Existing filesystems can be ported very easily by the
+introduction of a thin veneer porting layer that translates FILEIO
+calls into native filesystem calls.
+</para>
+
+<para>
+The term filesystem should be read fairly loosely in this
+document. Object accessed through these interfaces could equally be
+network protocol sockets, device drivers, fifos, message queues or any
+other object that can present a file-like interface.
+</para>
+
+</chapter>
+
+<!-- }}} -->
+<!-- {{{ File System Table -->
+
+<chapter id="fileio-fstab">
+<title>File System Table</title>
+
+<para>
+The filesystem table is an array of entries that describe each
+filesystem implementation that is part of the system image. Each
+resident filesystem should export an entry to this table using the
+<literal>FSTAB_ENTRY()</literal> macro.
+</para>
+
+<note>
+<title>Note</title>
+<para>
+At present we do not support dynamic addition or removal of table
+entries. However, an API similar to <function>mount()</function> would
+allow new entries to be added to the table.
+</para>
+</note>
+
+<para>
+The table entries are described by the following structure:
+</para>
+
+<programlisting>
+struct cyg_fstab_entry
+{
+ const char *name; // filesystem name
+ CYG_ADDRWORD data; // private data value
+ cyg_uint32 syncmode; // synchronization mode
+
+ int (*mount) ( cyg_fstab_entry *fste, cyg_mtab_entry *mte );
+ int (*umount) ( cyg_mtab_entry *mte );
+ int (*open) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int mode, cyg_file *fte );
+ int (*unlink) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+ int (*mkdir) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+ int (*rmdir) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+ int (*rename) ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2 );
+ int (*link) ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2, int type );
+ int (*opendir) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_file *fte );
+ int (*chdir) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_dir *dir_out );
+ int (*stat) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ struct stat *buf);
+ int (*getinfo) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, char *buf, int len );
+ int (*setinfo) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, char *buf, int len );
+};
+</programlisting>
+
+<para>
+The <structfield>name</structfield> field points to a string that
+identifies this filesystem implementation. Typical values might be
+&quot;romfs&quot;, &quot;msdos&quot;, &quot;ext2&quot; etc.
+</para>
+
+<para>
+The <structfield>data</structfield> field contains any private data
+that the filesystem needs, perhaps the root of its data structures.
+</para>
+
+<para>
+The <structfield>syncmode</structfield> field contains a description of
+the locking protocol to be used when accessing this filesystem. It
+will be described in more detail in <xref linkend="fileio-synchronization">.
+</para>
+
+<para>
+The remaining fields are pointers to functions that implement
+filesystem operations that apply to files and directories as whole
+objects. The operation implemented by each function should be obvious
+from the names, with a few exceptions:
+</para>
+
+<para>
+The <function>opendir()</function> function pointer opens a directory
+for reading. See <xref linkend="fileio-directories"> for details.
+</para>
+
+<para>
+The <function>getinfo()</function> and
+<function>setinfo()</function> function pointers provide support for
+various minor control and information functions such as
+<function>pathconf()</function> and <function>access()</function>.
+</para>
+
+<para>
+With the exception of the <function>mount()</function> and
+<function>umount()</function> functions, all of these functions
+take three standard arguments, a pointer to a mount table entry (see
+later) a directory pointer (also see later) and a file name relative
+to the directory. These should be used by the filesystem to locate the
+object of interest.
+</para>
+
+</chapter>
+
+<!-- }}} -->
+<!-- {{{ Mount Table -->
+
+<chapter id="fileio-mount-table">
+<title>Mount Table</title>
+
+<para>
+The mount table records the filesystems that are actually active.
+These can be seen as being analogous to mount points in Unix systems.
+</para>
+
+<para>
+There are two sources of mount table entries. Filesystems (or other
+components) may export static entries to the table using the
+<literal>MTAB_ENTRY()</literal> macro. Alternatively, new entries may
+be installed at run time using the <function>mount()</function>
+function. Both types of entry may be unmounted with the
+<function>umount()</function> function.
+</para>
+
+<para>
+A mount table entry has the following structure:
+</para>
+
+<programlisting>
+struct cyg_mtab_entry
+{
+ const char *name; // name of mount point
+ const char *fsname; // name of implementing filesystem
+ const char *devname; // name of hardware device
+ CYG_ADDRWORD data; // private data value
+ cyg_bool valid; // Valid entry?
+ cyg_fstab_entry *fs; // pointer to fstab entry
+ cyg_dir root; // root directory pointer
+};
+</programlisting>
+
+<para>
+The <structfield>name</structfield> field identifies the mount
+point. This is used to direct rooted filenames (filenames that
+begin with &quot;/&quot;) to the correct filesystem. When a file
+name that begins with &quot;/&quot; is submitted, it is matched
+against the <structfield>name</structfield> fields of all valid mount
+table entries. The entry that yields the longest match terminating
+before a &quot;/&quot;, or end of string, wins and the appropriate
+function from the filesystem table entry is then passed the remainder
+of the file name together with a pointer to the table entry and the
+value of the <structfield>root</structfield> field as the directory
+pointer.
+</para>
+
+<para>
+For example, consider a mount table that contains the following
+entries:
+</para>
+
+<programlisting>
+ { "/", "msdos", "/dev/hd0", ... }
+ { "/fd", "msdos", "/dev/fd0", ... }
+ { "/rom", "romfs", "", ... }
+ { "/tmp", "ramfs", "", ... }
+ { "/dev", "devfs", "", ... }
+</programlisting>
+
+<para>
+An attempt to open &quot;/tmp/foo&quot; would be directed to the RAM
+filesystem while an open of &quot;/bar/bundy&quot; would be directed
+to the hard disc MSDOS filesystem. Opening &quot;/dev/tty0&quot; would
+be directed to the device management filesystem for lookup in the
+device table.
+</para>
+
+<para>
+Unrooted file names (those that do not begin with a '/') are passed
+straight to the filesystem that contains the current directory. The
+current directory is represented by a pair consisting of a mount table
+entry and a directory pointer.
+</para>
+
+<para>
+The <structfield>fsname</structfield> field points to a string that
+should match the <structfield>name</structfield> field of the
+implementing filesystem. During initialization the mount table is
+scanned and the <structfield>fsname</structfield> entries looked up in
+the filesystem table. For each match, the filesystem's _mount_
+function is called and if successful the mount table entry is marked
+as valid and the <structfield>fs</structfield> pointer installed.
+</para>
+
+<para>
+The <structfield>devname</structfield> field contains the name of the
+device that this filesystem is to use. This may match an entry in the
+device table (see later) or may be a string that is specific to the
+filesystem if it has its own internal device drivers.
+</para>
+
+<para>
+The <structfield>data</structfield> field is a private data value. This
+may be installed either statically when the table entry is defined, or
+may be installed during the <function>mount()</function> operation.
+</para>
+
+<para>
+The <structfield>valid</structfield> field indicates whether this mount
+point has actually been mounted successfully. Entries with a false
+<structfield>valid</structfield> field are ignored when searching for a
+name match.
+</para>
+
+<para>
+The <structfield>fs</structfield> field is installed after a successful
+<function>mount()</function> operation to point to the implementing
+filesystem.
+</para>
+
+<para>
+The <structfield>root</structfield> field contains a directory pointer
+value that the filesystem can interpret as the root of its directory
+tree. This is passed as the <parameter>dir</parameter> argument of
+filesystem functions that operate on rooted filenames. This field must
+be initialized by the filesystem's <function>mount()</function>
+function.
+</para>
+
+</chapter>
+
+<!-- }}} -->
+<!-- {{{ File Table -->
+
+<chapter id="fileio-file-table">
+<title>File Table</title>
+
+<para>
+Once a file has been opened it is represented by an open file
+object. These are allocated from an array of available file
+objects. User code accesses these open file objects via a second array
+of pointers which is indexed by small integer offsets. This gives the
+usual Unix file descriptor functionality, complete with the various
+duplication mechanisms.
+</para>
+
+<para>
+A file table entry has the following structure:
+</para>
+
+<programlisting>
+struct CYG_FILE_TAG
+{
+ cyg_uint32 f_flag; /* file state */
+ cyg_uint16 f_ucount; /* use count */
+ cyg_uint16 f_type; /* descriptor type */
+ cyg_uint32 f_syncmode; /* synchronization protocol */
+ struct CYG_FILEOPS_TAG *f_ops; /* file operations */
+ off_t f_offset; /* current offset */
+ CYG_ADDRWORD f_data; /* file or socket */
+ CYG_ADDRWORD f_xops; /* extra type specific ops */
+ cyg_mtab_entry *f_mte; /* mount table entry */
+};
+</programlisting>
+
+<para>
+The <structfield>f_flag</structfield> field contains some FILEIO
+control bits and some bits propagated from the
+<parameter>flags</parameter> argument of the
+<function>open()</function> call (defined by
+<literal>CYG_FILE_MODE_MASK</literal>).
+</para>
+
+<para>
+The <structfield>f_ucount</structfield> field contains a use count that
+controls when a file will be closed. Each duplicate in the file
+descriptor array counts for one reference here. It is also
+incremented around each I/O operation to ensure that the file cannot
+be closed while it has current I/O operations.
+</para>
+
+<para>
+The <structfield>f_type</structfield> field indicates the type of the
+underlying file object. Some of the possible values here are
+<literal>CYG_FILE_TYPE_FILE</literal>,
+<literal>CYG_FILE_TYPE_SOCKET</literal> or <literal>CYG_FILE_TYPE_DEVICE</literal>.
+</para>
+
+<para>
+The <structfield>f_syncmode</structfield> field is copied from the
+<structfield>syncmode</structfield> field of the implementing
+filesystem. Its use is described in <xref linkend="fileio-synchronization">.
+</para>
+
+<para>
+The <structfield>f_offset</structfield> field records the current file
+position. It is the responsibility of the file operation functions to
+keep this field up to date.
+</para>
+
+<para>
+The <structfield>f_data</structfield> field contains private data
+placed here by the underlying filesystem. Normally this will be a
+pointer to, or handle on, the filesystem object that implements this
+file.
+</para>
+
+<para>
+The <structfield>f_xops</structfield> field contains a pointer to any
+extra type specific operation functions. For example, the socket I/O
+system installs a pointer to a table of functions that implement the
+standard socket operations.
+</para>
+
+<para>
+The <structfield>f_mte</structfield> field contains a pointer to the
+parent mount table entry for this file. It is used mainly to implement
+the synchronization protocol. This may contain a pointer to some other
+data structure in file objects not derived from a filesystem.
+</para>
+
+<para>
+The <structfield>f_ops</structfield> field contains a pointer to a
+table of file I/O operations. This has the following structure:
+</para>
+
+<programlisting>
+struct CYG_FILEOPS_TAG
+{
+ int (*fo_read) (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+ int (*fo_write) (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+ int (*fo_lseek) (struct CYG_FILE_TAG *fp, off_t *pos, int whence );
+ int (*fo_ioctl) (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com,
+ CYG_ADDRWORD data);
+ int (*fo_select) (struct CYG_FILE_TAG *fp, int which, CYG_ADDRWORD info);
+ int (*fo_fsync) (struct CYG_FILE_TAG *fp, int mode );
+ int (*fo_close) (struct CYG_FILE_TAG *fp);
+ int (*fo_fstat) (struct CYG_FILE_TAG *fp, struct stat *buf );
+ int (*fo_getinfo) (struct CYG_FILE_TAG *fp, int key, char *buf, int len );
+ int (*fo_setinfo) (struct CYG_FILE_TAG *fp, int key, char *buf, int len );
+};
+</programlisting>
+
+<para>
+It should be obvious from the names of most of these functions what
+their responsibilities are. The <function>fo_getinfo()</function>
+and <function>fo_setinfo()</function> function pointers, like their
+counterparts in the filesystem structure, implement minor control and
+info functions such as <function>fpathconf()</function>.
+</para>
+
+<para>
+The second argument to the <function>fo_read()</function> and
+<function>fo_write()</function> function pointers is a pointer to a
+UIO structure:
+</para>
+
+<programlisting>
+struct CYG_UIO_TAG
+{
+ struct CYG_IOVEC_TAG *uio_iov; /* pointer to array of iovecs */
+ int uio_iovcnt; /* number of iovecs in array */
+ off_t uio_offset; /* offset into file this uio corresponds to */
+ ssize_t uio_resid; /* residual i/o count */
+ enum cyg_uio_seg uio_segflg; /* see above */
+ enum cyg_uio_rw uio_rw; /* see above */
+};
+
+struct CYG_IOVEC_TAG
+{
+ void *iov_base; /* Base address. */
+ ssize_t iov_len; /* Length. */
+};
+</programlisting>
+
+<para>
+This structure encapsulates the parameters of any data transfer
+operation. It provides support for scatter/gather operations and
+records the progress of any data transfer. It is also compatible with
+the I/O operations of any BSD-derived network stacks and filesystems.
+</para>
+
+<para>
+When a file is opened (or a file object created by some other means,
+such as <function>socket()</function> or <function>accept()</function>) it is the
+responsibility of the filesystem open operation to initialize all the
+fields of the object except the <structfield>f_ucount</structfield>,
+<structfield>f_syncmode</structfield> and
+<structfield>f_mte</structfield> fields. Since the
+<structfield>f_flag</structfield> field will already contain bits belonging to the FILEIO
+infrastructure, any changes to it must be made with the appropriate
+logical operations.
+</para>
+
+</chapter>
+
+<!-- }}} -->
+<!-- {{{ Directories -->
+
+<chapter id="fileio-directories">
+<title>Directories</title>
+
+<para>
+Filesystem operations all take a directory pointer as one of their
+arguments. A directory pointer is an opaque handle managed by the
+filesystem. It should encapsulate a reference to a specific directory
+within the filesystem. For example, it may be a pointer to the data
+structure that represents that directory (such as an inode), or a
+pointer to a pathname for the directory.
+</para>
+
+<para>
+The <function>chdir()</function> filesystem function pointer has two
+modes of use. When passed a pointer in the
+<parameter>dir_out</parameter> argument, it should locate the named
+directory and place a directory pointer there. If the
+<parameter>dir_out</parameter> argument is NULL then the
+<parameter>dir</parameter> argument is a previously generated
+directory pointer that can now be disposed of. When the infrastructure
+is implementing the <function>chdir()</function> function it makes two
+calls to filesystem <function>chdir()</function> functions. The first
+is to get a directory pointer for the new current directory. If this
+succeeds the second is to dispose of the old current directory
+pointer.
+</para>
+
+<para>
+The <function>opendir()</function> function is used to open a
+directory for reading. This results in an open file object that can be
+read to return a sequence of <structname>struct dirent</structname>
+objects. The only operations that are allowed on this file are
+<function>read</function>, <function>lseek</function> and
+<function>close</function>. Each read operation on this file should
+return a single <structname>struct dirent</structname> object. When
+the end of the directory is reached, zero should be returned. The only
+seek operation allowed is a rewind to the start of the directory, by
+supplying an offset of zero and a <parameter>whence</parameter>
+specifier of <literal>SEEK_SET</literal>.
+</para>
+
+<para>
+Most of these considerations are invisible to clients of a filesystem
+since they will access directories via the POSIX
+<function>opendir()</function>, <function>readdir()</function> and
+<function>closedir()</function> functions.
+</para>
+
+<para>
+Support for the <function>getcwd()</function> function is provided by
+three mechanisms. The first is to use the
+<literal>FS_INFO_GETCWD</literal> getinfo key on the filesystem to use
+any internal support that it has for this. If that fails it falls back
+on one of the two other mechanisms. If
+<literal>CYGPKG_IO_FILEIO_TRACK_CWD</literal> is set then the current
+directory is tracked textually in <function>chdir()</function> and the result of that is
+reported in getcwd(). Otherwise an attempt is made to traverse the
+directory tree to its root using &quot;..&quot; entries.
+</para>
+
+<para>
+This last option is complicated and expensive, and relies on the
+filesystem supporting &quot;.&quot; and &quot;..&quot; entries. This is not always the
+case, particularly if the filesystem has been ported from a
+non-UNIX-compatible source. Tracking the pathname textually will
+usually work, but might not produce optimum results when symbolic
+links are being used.
+</para>
+
+</chapter>
+
+<!-- }}} -->
+<!-- {{{ Synchronization -->
+
+<chapter id="fileio-synchronization">
+<title>Synchronization</title>
+
+<para>
+The FILEIO infrastructure provides a synchronization mechanism for
+controlling concurrent access to filesystems. This allows existing
+filesystems to be ported to eCos, even if they do not have their own
+synchronization mechanisms. It also allows new filesystems to be
+implemented easily without having to consider the synchronization
+issues.
+</para>
+
+<para>
+The infrastructure maintains a mutex for each entry in each of
+the main tables: filesystem table, mount table and file table. For
+each class of operation each of these mutexes may be locked before the
+corresponding filesystem operation is invoked.
+</para>
+
+<para>
+The synchronization protocol required by a filesystem is described
+by the <structfield>syncmode</structfield> field of the filesystem
+table entry. This is a combination of the following flags:
+</para>
+
+<variablelist>
+<varlistentry>
+<term><literal>CYG_SYNCMODE_FILE_FILESYSTEM</literal></term>
+<listitem>
+<para>
+Lock the filesystem table entry mutex
+during all filesystem level operations.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>CYG_SYNCMODE_FILE_MOUNTPOINT</literal></term>
+<listitem>
+<para>
+Lock the mount table entry mutex
+during all filesystem level operations.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>CYG_SYNCMODE_IO_FILE</literal></term>
+<listitem>
+<para>
+Lock the file table entry mutex during all
+I/O operations.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>CYG_SYNCMODE_IO_FILESYSTEM</literal></term>
+<listitem>
+<para>
+Lock the filesystem table entry mutex during all I/O operations.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>CYG_SYNCMODE_IO_MOUNTPOINT</literal></term>
+<listitem><para>
+Lock the mount table entry mutex during all I/O operations.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>CYG_SYNCMODE_SOCK_FILE</literal></term>
+<listitem>
+<para>
+Lock the file table entry mutex during all socket operations.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>CYG_SYNCMODE_SOCK_NETSTACK</literal></term>
+<listitem>
+<para>
+Lock the network stack table entry mutex during all socket operations.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><literal>CYG_SYNCMODE_NONE</literal></term>
+<listitem>
+<para>
+Perform no locking at all during any operations.
+</para>
+</listitem>
+</varlistentry>
+
+</variablelist>
+
+<para>
+The value of the <structfield>syncmode</structfield> field in the
+filesystem table entry will be copied by the infrastructure to the
+open file object after a successful <function>open()</function> operation.
+</para>
+
+</chapter>
+
+<!-- }}} -->
+<!-- {{{ Initialization and Mounting -->
+
+<chapter id="fileio-mounting">
+<title>Initialization and Mounting</title>
+
+<para>
+As mentioned previously, mount table entries can be sourced from two
+places. Static entries may be defined by using the
+<literal>MTAB_ENTRY()</literal> macro. Such entries will be
+automatically mounted on system startup. For each entry in the mount
+table that has a non-null <structfield>name</structfield> field the
+filesystem table is searched for a match with the
+<structfield>fsname</structfield> field. If a match is found the
+filesystem's <structfield>mount</structfield> entry is called and if
+successful the mount table entry marked valid and the
+<structfield>fs</structfield> field initialized. The
+<function>mount()</function> function is responsible for initializing
+the <structfield>root</structfield> field.
+</para>
+
+
+<para>
+The size of the mount table is defined by the configuration value
+<literal>CYGNUM_FILEIO_MTAB_MAX</literal>. Any entries that have not
+been statically defined are available for use by dynamic mounts.
+</para>
+
+<para>
+A filesystem may be mounted dynamically by calling <function>mount()</function>. This
+function has the following prototype:
+</para>
+
+<programlisting width=72>
+int mount( const char *devname,
+ const char *dir,
+ const char *fsname);
+</programlisting>
+
+<para>
+The <parameter>devname</parameter> argument identifies a device that
+will be used by this filesystem and will be assigned to the
+<structfield>devname</structfield> field of the mount table entry.
+</para>
+
+<para>
+The <parameter>dir</parameter> argument is the mount point name, it
+will be assigned to the <structfield>name</structfield> field of the
+mount table entry.
+</para>
+
+<para>
+The <parameter>fsname</parameter> argument is the name of the
+implementing filesystem, it will be assigned to the
+<structfield>fsname</structfield> entry of the mount table entry.
+</para>
+
+<para>
+The process of mounting a filesystem dynamically is as follows. First
+a search is made of the mount table for an entry with a NULL
+<structfield>name</structfield> field to be used for the new mount
+point. The filesystem table is then searched for an entry whose name
+matches <structfield>fsname</structfield>. If this is successful then
+the mount table entry is initialized and the filesystem's
+<function>mount()</function> operation called. If this is successful,
+the mount table entry is marked valid and the
+<structfield>fs</structfield> field initialized.
+</para>
+
+<para>
+Unmounting a filesystem is done by the <function>umount()</function>
+function. This can unmount filesystems whether they were mounted
+statically or dynamically.
+</para>
+
+<para>
+The <function>umount()</function> function has the following prototype:
+</para>
+
+<programlisting width=72>
+int umount( const char *name );
+</programlisting>
+
+<para>
+The mount table is searched for a match between the
+<parameter>name</parameter> argument and the entry
+<structfield>name</structfield> field. When a match is found the
+filesystem's <function>umount()</function> operation is called and if
+successful, the mount table entry is invalidated by setting its
+<structfield>valid</structfield> field false and the
+<structfield>name</structfield> field to NULL.
+</para>
+
+<!--
+
+
+-->
+
+</chapter>
+
+<!-- }}} -->
+<!-- {{{ Sockets -->
+
+<chapter id="fileio-sockets">
+<title>Sockets</title>
+
+<para>
+If a network stack is present, then the FILEIO infrastructure also
+provides access to the standard BSD socket calls.
+</para>
+
+<para>
+The netstack table contains entries which describe the network
+protocol stacks that are in the system image. Each resident stack
+should export an entry to this table using the
+<literal>NSTAB_ENTRY()</literal> macro.
+</para>
+
+<para>
+Each table entry has the following structure:
+</para>
+
+<programlisting width=72>
+struct cyg_nstab_entry
+{
+ cyg_bool valid; // true if stack initialized
+ cyg_uint32 syncmode; // synchronization protocol
+ char *name; // stack name
+ char *devname; // hardware device name
+ CYG_ADDRWORD data; // private data value
+
+ int (*init)( cyg_nstab_entry *nste );
+ int (*socket)( cyg_nstab_entry *nste, int domain, int type,
+ int protocol, cyg_file *file );
+};
+</programlisting>
+
+<para>
+This table is analogous to a combination of the filesystem and mount
+tables.
+</para>
+
+<para>
+The <structfield>valid</structfield> field is set
+<literal>true</literal> if the stack's <function>init()</function>
+function returned successfully and the
+<structfield>syncmode</structfield> field contains the
+<literal>CYG_SYNCMODE_SOCK_*</literal> bits described above.
+</para>
+
+<!--
+
+
+-->
+
+<para>
+The <structfield>name</structfield> field contains the name of the
+protocol stack.
+</para>
+
+<!--
+
+
+-->
+
+<para>
+The <structfield>devname</structfield> field names the device that the stack is using. This may
+reference a device under &quot;/dev&quot;, or may be a name that is only
+meaningful to the stack itself.
+</para>
+
+<!--
+
+
+-->
+
+<para>
+The <function>init()</function> function pointer is called during
+system initialization to start the protocol stack running. If it
+returns non-zero the <structfield>valid</structfield> field is set
+false and the stack will be ignored subsequently.
+</para>
+
+<para>
+The <function>socket()</function> function is called to attempt to create a socket in the
+stack. When the <function>socket()</function> API function is called the netstack table is
+scanned and for each valid entry the <function>socket()</function>
+function pointer is called. If
+this returns non-zero then the scan continues to the next valid stack,
+or terminates with an error if the end of the table is reached.
+</para>
+
+<para>
+The result of a successful socket call is an initialized file object
+with the <structfield>f_xops</structfield> field pointing to the
+following structure:
+</para>
+
+<programlisting width=72>
+struct cyg_sock_ops
+{
+ int (*bind) ( cyg_file *fp, const sockaddr *sa, socklen_t len );
+ int (*connect) ( cyg_file *fp, const sockaddr *sa, socklen_t len );
+ int (*accept) ( cyg_file *fp, cyg_file *new_fp,
+ struct sockaddr *name, socklen_t *anamelen );
+ int (*listen) ( cyg_file *fp, int len );
+ int (*getname) ( cyg_file *fp, sockaddr *sa, socklen_t *len, int peer );
+ int (*shutdown) ( cyg_file *fp, int flags );
+ int (*getsockopt)( cyg_file *fp, int level, int optname,
+ void *optval, socklen_t *optlen);
+ int (*setsockopt)( cyg_file *fp, int level, int optname,
+ const void *optval, socklen_t optlen);
+ int (*sendmsg) ( cyg_file *fp, const struct msghdr *m,
+ int flags, ssize_t *retsize );
+ int (*recvmsg) ( cyg_file *fp, struct msghdr *m,
+ socklen_t *namelen, ssize_t *retsize );
+};
+</programlisting>
+
+<para>
+It should be obvious from the names of these functions which API calls
+they provide support for. The <function>getname()</function> function
+pointer provides support for both <function>getsockname()</function>
+and <function>getpeername()</function> while the
+<function>sendmsg()</function> and <function>recvmsg()</function>
+function pointers provide support for <function>send()</function>,
+<function>sendto()</function>, <function>sendmsg()</function>,
+<function>recv()</function>, <function>recvfrom()</function> and
+<function>recvmsg()</function> as appropriate.
+</para>
+
+</chapter>
+
+<!-- }}} -->
+<!-- {{{ Select -->
+
+<chapter id="fileio-select">
+<title>Select</title>
+
+<para>
+The infrastructure provides support for implementing a select
+mechanism. This is modeled on the mechanism in the BSD kernel, but has
+been modified to make it implementation independent.
+</para>
+
+<para>
+The main part of the mechanism is the <function>select()</function>
+API call. This processes its arguments and calls the
+<function>fo_select()</function> function pointer on all file objects
+referenced by the file descriptor sets passed to it. If the same
+descriptor appears in more than one descriptor set, the
+<function>fo_select()</function> function will be called separately
+for each appearance.
+</para>
+
+<para>
+The <parameter>which</parameter> argument of the
+<function>fo_select()</function> function will either be
+<literal>CYG_FREAD</literal> to test for read conditions,
+<literal>CYG_FWRITE</literal> to test for write conditions or zero to
+test for exceptions. For each of these options the function should
+test whether the condition is satisfied and if so return true. If it
+is not satisfied then it should call
+<function>cyg_selrecord()</function> with the
+<parameter>info</parameter> argument that was passed to the function
+and a pointer to a <structname>cyg_selinfo</structname> structure.
+</para>
+
+<para>
+The <structname>cyg_selinfo</structname> structure is used to record information about current
+select operations. Any object that needs to support select must
+contain an instance of this structure. Separate <structname>cyg_selinfo</structname>
+structures should be kept for each of the options that the object can
+select on - read, write or exception.
+</para>
+
+<para>
+If none of the file objects report that the select condition is
+satisfied, then the <function>select()</function> API function puts
+the calling thread to sleep waiting either for a condition to become
+satisfied, or for the optional timeout to expire.
+</para>
+
+<para>
+A selectable object must have some asynchronous activity that may
+cause a select condition to become true - either via interrupts or the
+activities of other threads. Whenever a selectable condition is
+satisfied, the object should call <function>cyg_selwakeup()</function> with a pointer to
+the appropriate <structname>cyg_selinfo</structname> structure. If the thread is still waiting,
+this will cause it to wake up and repeat its poll of the file
+descriptors. This time around, the object that caused the wakeup
+should indicate that the select condition is satisfied, and the
+<function>select()</function> API call will return.
+</para>
+
+<para>
+Note that <function>select()</function> does not exhibit real time
+behaviour: the iterative poll of the descriptors, and the wakeup
+mechanism mitigate against this. If real time response to device or
+socket I/O is required then separate threads should be devoted to each
+device of interest and should use blocking calls to wait for a
+condition to become ready.
+</para>
+
+</chapter>
+
+<!-- }}} -->
+<!-- {{{ Devices -->
+
+<chapter id="fileio-devices">
+<title>Devices</title>
+
+<para>
+Devices are accessed by means of a pseudo-filesystem, &quot;devfs&quot;, that is
+mounted on &quot;/dev&quot;. Open operations are translated into calls to
+<function>cyg_io_lookup()</function> and if successful result in a file object whose
+<structfield>f_ops</structfield> functions translate filesystem API functions into calls into
+the device API.
+</para>
+
+</chapter>
+
+<!-- }}} -->
+<!-- {{{ Writing a New Filesystem -->
+
+<chapter id="fileio-writing">
+<title>Writing a New Filesystem</title>
+
+<para>
+To create a new filesystem it is necessary to define the fstab entry
+and the file IO operations. The easiest way to do this is to copy an
+existing filesystem: either the test filesystem in the FILEIO package,
+or the RAM or ROM filesystem packages.
+</para>
+
+<para>
+To make this clearer, the following is a brief tour of the FILEIO
+relevant parts of the RAM filesystem.
+</para>
+
+<para>
+First, it is necessary to provide forward definitions of the functions
+that constitute the filesystem interface:
+</para>
+
+<programlisting width=72>
+//==========================================================================
+// Forward definitions
+
+// Filesystem operations
+static int ramfs_mount ( cyg_fstab_entry *fste, cyg_mtab_entry *mte );
+static int ramfs_umount ( cyg_mtab_entry *mte );
+static int ramfs_open ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int mode, cyg_file *fte );
+static int ramfs_unlink ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+static int ramfs_mkdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+static int ramfs_rmdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+static int ramfs_rename ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2 );
+static int ramfs_link ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2, int type );
+static int ramfs_opendir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_file *fte );
+static int ramfs_chdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_dir *dir_out );
+static int ramfs_stat ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ struct stat *buf);
+static int ramfs_getinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len );
+static int ramfs_setinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len );
+
+// File operations
+static int ramfs_fo_read (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+static int ramfs_fo_write (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+static int ramfs_fo_lseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence );
+static int ramfs_fo_ioctl (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com,
+ CYG_ADDRWORD data);
+static int ramfs_fo_fsync (struct CYG_FILE_TAG *fp, int mode );
+static int ramfs_fo_close (struct CYG_FILE_TAG *fp);
+static int ramfs_fo_fstat (struct CYG_FILE_TAG *fp, struct stat *buf );
+static int ramfs_fo_getinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
+static int ramfs_fo_setinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
+
+// Directory operations
+static int ramfs_fo_dirread (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+static int ramfs_fo_dirlseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence );
+</programlisting>
+
+<para>
+We define all of the fstab entries and all of the file IO
+operations. We also define alternatives for the
+<structfield>fo_read</structfield> and
+<structfield>fo_lseek</structfield> file IO operations.
+</para>
+
+<para>
+We can now define the filesystem table entry. There is a macro,
+<literal>FSTAB_ENTRY</literal> to do this:
+</para>
+
+
+<programlisting width=72>
+//==========================================================================
+// Filesystem table entries
+
+// -------------------------------------------------------------------------
+// Fstab entry.
+// This defines the entry in the filesystem table.
+// For simplicity we use _FILESYSTEM synchronization for all accesses since
+// we should never block in any filesystem operations.
+
+FSTAB_ENTRY( ramfs_fste, "ramfs", 0,
+ CYG_SYNCMODE_FILE_FILESYSTEM|CYG_SYNCMODE_IO_FILESYSTEM,
+ ramfs_mount,
+ ramfs_umount,
+ ramfs_open,
+ ramfs_unlink,
+ ramfs_mkdir,
+ ramfs_rmdir,
+ ramfs_rename,
+ ramfs_link,
+ ramfs_opendir,
+ ramfs_chdir,
+ ramfs_stat,
+ ramfs_getinfo,
+ ramfs_setinfo);
+</programlisting>
+
+<para>
+The first argument to this macro gives the fstab entry a name, the
+remainder are initializers for the field of the structure.
+</para>
+
+<para>
+We must also define the file operations table that is installed in all
+open file table entries:
+</para>
+
+<programlisting width=72>
+// -------------------------------------------------------------------------
+// File operations.
+// This set of file operations are used for normal open files.
+
+static cyg_fileops ramfs_fileops =
+{
+ ramfs_fo_read,
+ ramfs_fo_write,
+ ramfs_fo_lseek,
+ ramfs_fo_ioctl,
+ cyg_fileio_seltrue,
+ ramfs_fo_fsync,
+ ramfs_fo_close,
+ ramfs_fo_fstat,
+ ramfs_fo_getinfo,
+ ramfs_fo_setinfo
+};
+</programlisting>
+
+<para>
+These all point to functions supplied by the filesystem except the
+<structfield>fo_select</structfield> field which is filled with a
+pointer to <function>cyg_fileio_seltrue()</function>. This is provided
+by the FILEIO package and is a select function that always returns
+true to all operations.
+</para>
+
+<para>
+Finally, we need to define a set of file operations for use when
+reading directories. This table only defines the
+<structfield>fo_read</structfield> and
+<structfield>fo_lseek</structfield> operations. The rest are filled
+with stub functions supplied by the FILEIO package that just return an
+error code.
+</para>
+
+<programlisting width=72>
+// -------------------------------------------------------------------------
+// Directory file operations.
+// This set of operations are used for open directories. Most entries
+// point to error-returning stub functions. Only the read, lseek and
+// close entries are functional.
+
+static cyg_fileops ramfs_dirops =
+{
+ ramfs_fo_dirread,
+ (cyg_fileop_write *)cyg_fileio_enosys,
+ ramfs_fo_dirlseek,
+ (cyg_fileop_ioctl *)cyg_fileio_enosys,
+ cyg_fileio_seltrue,
+ (cyg_fileop_fsync *)cyg_fileio_enosys,
+ ramfs_fo_close,
+ (cyg_fileop_fstat *)cyg_fileio_enosys,
+ (cyg_fileop_getinfo *)cyg_fileio_enosys,
+ (cyg_fileop_setinfo *)cyg_fileio_enosys
+};
+</programlisting>
+
+<para>
+If the filesystem wants to have an instance automatically mounted on
+system startup, it must also define a mount table entry. This is done
+with the <literal>MTAB_ENTRY</literal> macro. This is an example from
+the test filesystem of how this is used:
+</para>
+
+<programlisting width=72>
+MTAB_ENTRY( testfs_mte1,
+ "/",
+ "testfs",
+ "",
+ 0);
+</programlisting>
+
+<para>
+The first argument provides a name for the table entry. The following
+arguments provide initialization for the
+<structfield>name</structfield>, <structfield>fsname</structfield>,
+<structfield>devname</structfield> and <structfield>data</structfield>
+fields respectively.
+</para>
+
+<para>
+These definitions are adequate to let the new filesystem interact
+with the FILEIO package. The new filesystem now needs to be fleshed
+out with implementations of the functions defined above. Obviously,
+the exact form this takes will depend on what the filesystem is
+intended to do. Take a look at the RAM and ROM filesystems for
+examples of how this has been done.
+</para>
+
+</chapter>
+
+<!-- }}} -->
+
+</part> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/fileio/current/doc/fileio.txt b/cesar/ecos/packages/io/fileio/current/doc/fileio.txt
new file mode 100644
index 0000000000..87bf301093
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/doc/fileio.txt
@@ -0,0 +1,593 @@
+File System Support Infrastructure
+==================================
+
+Nick Garnett
+v0.2
+
+
+This document describes the filesystem infrastructure provided in
+eCos. This is implemented by the FILEIO package and provides POSIX
+compliant file and IO operations together with the BSD socket
+API. These APIs are described in the relevant standards and original
+documentation and will not be described here. This document is,
+instead, concerned with the interfaces presented to client
+filesystems and network protocol stacks.
+
+The FILEIO infrastructure consist mainly of a set of tables containing
+pointers to the primary interface functions of a file system. This
+approach avoids problems of namespace pollution (several filesystems
+can have a function called read(),so long as they are static). The
+system is also structured to eliminate the need for dynamic memory
+allocation.
+
+New filesystems can be written directly to the interfaces described
+here. Existing filesystems can be ported very easily by the
+introduction of a thin veneer porting layer that translates FILEIO
+calls into native filesystem calls.
+
+The term filesystem should be read fairly loosely in this
+document. Object accessed through these interfaces could equally be
+network protocol sockets, device drivers, fifos, message queues or any
+other object that can present a file-like interface.
+
+
+File System Table
+-----------------
+
+The filesystem table is an array of entries that describe each
+filesystem implementation that is part of the system image. Each
+resident filesystem should export an entry to this table using the
+FSTAB_ENTRY() macro.
+
+The table entries are described by the following structure:
+
+struct cyg_fstab_entry
+{
+ const char *name; // filesystem name
+ CYG_ADDRWORD data; // private data value
+ cyg_uint32 syncmode; // synchronization mode
+
+ int (*mount) ( cyg_fstab_entry *fste, cyg_mtab_entry *mte );
+ int (*umount) ( cyg_mtab_entry *mte );
+ int (*open) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int mode, cyg_file *fte );
+ int (*unlink) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+ int (*mkdir) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+ int (*rmdir) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+ int (*rename) ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2 );
+ int (*link) ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2, int type );
+ int (*opendir) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_file *fte );
+ int (*chdir) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_dir *dir_out );
+ int (*stat) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ struct stat *buf);
+ int (*getinfo) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, char *buf, int len );
+ int (*setinfo) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, char *buf, int len );
+};
+
+The _name_ field points to a string that identifies this filesystem
+implementation. Typical values might be "romfs", "msdos", "ext2" etc.
+
+The _data_ field contains any private data that the filesystem needs,
+perhaps the root of its data structures.
+
+The _syncmode_ field contains a description of the locking protocol to
+be used when accessing this filesystem. It will be described in more
+detail in the "Synchronization" section.
+
+The remaining fields are pointers to functions that implement
+filesystem operations that apply to files and directories as whole
+objects. The operation implemented by each function should be obvious
+from the names, with a few exceptions.
+
+The _opendir_ function opens a directory for reading. See the section
+on Directories later for details.
+
+The _getinfo_ and _setinfo_ functions provide support for various
+minor control and information functions such as pathconf() and
+access().
+
+With the exception of the _mount_ and _umount_ functions, all of these
+functions take three standard arguments, a pointer to a mount table
+entry (see later) a directory pointer (also see later) and a file name
+relative to the directory. These should be used by the filesystem to
+locate the object of interest.
+
+Mount Table
+-----------
+
+The mount table records the filesystems that are actually active.
+These can be seen as being analogous to mount points in Unix systems.
+
+There are two sources of mount table entries. Filesystems (or other
+components) may export static entries to the table using the
+MTAB_ENTRY() macro. Alternatively, new entries may be installed at run
+time using the mount() function. Both types of entry may be unmounted
+with the umount() function.
+
+A mount table entry has the following structure:
+
+struct cyg_mtab_entry
+{
+ const char *name; // name of mount point
+ const char *fsname; // name of implementing filesystem
+ const char *devname; // name of hardware device
+ CYG_ADDRWORD data; // private data value
+ cyg_bool valid; // Valid entry?
+ cyg_fstab_entry *fs; // pointer to fstab entry
+ cyg_dir root; // root directory pointer
+};
+
+The _name_ field identifies the mount point. This is used to translate
+rooted filenames (filenames that begin with "/") into the correct
+filesystem. When a file name that begins with "/" is submitted, it is
+matched against the _name_ fields of all valid mount table
+entries. The entry that yields the longest match terminating before a
+"/", or end of string, wins and the appropriate function from the
+filesystem table entry is then passed the remainder of the file name
+together with a pointer to the table entry and the value of the _root_
+field as the directory pointer.
+
+For example, consider a mount table that contains the following
+entries:
+
+ { "/", "msdos", "/dev/hd0", ... }
+ { "/fd", "msdos", "/dev/fd0", ... }
+ { "/rom", "romfs", "", ... }
+ { "/tmp", "ramfs", "", ... }
+ { "/dev", "devfs", "", ... }
+
+An attempt to open "/tmp/foo" would be directed to the RAM filesystem
+while an open of "/bar/bundy" would be directed to the hard disc MSDOS
+filesystem. Opening "/dev/tty0" would be directed to the device
+management filesystem for lookup in the device table.
+
+Unrooted file names (those that do not begin with a '/') are passed
+straight to the current directory. The current directory is
+represented by a pair consisting of a mount table entry and a
+directory pointer.
+
+The _fsname_ field points to a string that should match the _name_
+field of the implementing filesystem. During initialization the mount
+table is scanned and the _fsname_ entries looked up in the
+filesystem table. For each match, the filesystem's _mount_ function
+is called and if successful the mount table entry is marked as valid
+and the _fs_ pointer installed.
+
+The _devname_ field contains the name of the device that this
+filesystem is to use. This may match an entry in the device table (see
+later) or may be a string that is specific to the filesystem if it has
+its own internal device drivers.
+
+The _data_ field is a private data value. This may be installed either
+statically when the table entry is defined, or may be installed during
+the _mount_ operation.
+
+The _valid_ field indicates whether this mount point has actually been
+mounted successfully. Entries with a false _valid_ field are ignored
+when searching for a name match.
+
+The _fs_ field is installed after a successful mount operation to
+point to the implementing filesystem.
+
+The _root_ field contains a directory pointer value that the
+filesystem can interpret as the root of its directory tree. This is
+passed as the _dir_ argument of filesystem functions that operate on
+rooted filenames. This field must be initialized by the filesystem's
+_mount_ function.
+
+
+
+File Table
+----------
+
+Once a file has been opened it is represented by an open file
+object. These are allocated from an array of available file
+objects. User code accesses these open file objects via a second array
+of pointers which is indexed by small integer offsets. This gives the
+usual Unix file descriptor functionality, complete with the various
+duplication mechanisms.
+
+A file table entry has the following structure:
+
+struct CYG_FILE_TAG
+{
+ cyg_uint32 f_flag; /* file state */
+ cyg_uint16 f_ucount; /* use count */
+ cyg_uint16 f_type; /* descriptor type */
+ cyg_uint32 f_syncmode; /* synchronization protocol */
+ struct CYG_FILEOPS_TAG *f_ops; /* file operations */
+ off_t f_offset; /* current offset */
+ CYG_ADDRWORD f_data; /* file or socket */
+ CYG_ADDRWORD f_xops; /* extra type specific ops */
+ cyg_mtab_entry *f_mte; /* mount table entry */
+};
+
+The _f_flag_ field contains some FILEIO control bits and some of the
+bits from the open call (defined by CYG_FILE_MODE_MASK).
+
+The _f_ucount_ field contains a use count that controls when a file
+will be closed. Each duplicate in the file descriptor array counts for
+one reference here and it is also incremented around each I/O
+operation.
+
+The _f_type_ field indicates the type of the underlying file
+object. Some of the possible values here are CYG_FILE_TYPE_FILE,
+CYG_FILE_TYPE_SOCKET or CYG_FILE_TYPE_DEVICE.
+
+The _f_syncmode_ field is copied from the _syncmode_ field of the
+implementing filesystem. Its use is described in the "Synchronization"
+section later.
+
+The _f_offset_ field records the current file position. It is the
+responsibility of the file operation functions to keep this field up
+to date.
+
+The _f_data_ field contains private data placed here by the underlying
+filesystem. Normally this will be a pointer to or handle on the
+filesystem object that implements this file.
+
+The _f_xops_ field contains a pointer to any extra type specific
+operation functions. For example, the socket I/O system installs a
+pointer to a table of functions that implement the standard socket
+operations.
+
+The _f_mte_ field contains a pointer to the parent mount table entry
+for this file. It is used mainly to implement the synchronization
+protocol. This may contain a pointer to some other data structure in
+file objects not derived from a filesystem.
+
+The _f_ops_ field contains a pointer to a table of file I/O
+operations. This has the following structure:
+
+struct CYG_FILEOPS_TAG
+{
+ int (*fo_read) (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+ int (*fo_write) (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+ int (*fo_lseek) (struct CYG_FILE_TAG *fp, off_t *pos, int whence );
+ int (*fo_ioctl) (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com,
+ CYG_ADDRWORD data);
+ int (*fo_select) (struct CYG_FILE_TAG *fp, int which, CYG_ADDRWORD info);
+ int (*fo_fsync) (struct CYG_FILE_TAG *fp, int mode );
+ int (*fo_close) (struct CYG_FILE_TAG *fp);
+ int (*fo_fstat) (struct CYG_FILE_TAG *fp, struct stat *buf );
+ int (*fo_getinfo) (struct CYG_FILE_TAG *fp, int key, char *buf, int len );
+ int (*fo_setinfo) (struct CYG_FILE_TAG *fp, int key, char *buf, int len );
+};
+
+It should be obvious from the names of most of these functions what
+their responsibilities are. The _fo_getinfo_ and _fo_setinfo_
+function, like their counterparts in the filesystem structure,
+implement minor control and info functions such as fpathconf().
+
+The second argument to _fo_read_ and _fo_write_ is a pointer to a UIO
+structure:
+
+struct CYG_UIO_TAG
+{
+ struct CYG_IOVEC_TAG *uio_iov; /* pointer to array of iovecs */
+ int uio_iovcnt; /* number of iovecs in array */
+ off_t uio_offset; /* offset into file this uio corresponds to */
+ ssize_t uio_resid; /* residual i/o count */
+ enum cyg_uio_seg uio_segflg; /* see above */
+ enum cyg_uio_rw uio_rw; /* see above */
+};
+
+struct CYG_IOVEC_TAG
+{
+ void *iov_base; /* Base address. */
+ ssize_t iov_len; /* Length. */
+};
+
+This structure encapsulates the parameters of any data transfer
+operation. It provides support for scatter/gather operations and
+records the progress of any data transfer. It is also compatible with
+the I/O operations of any BSD-derived network stacks and filesystems.
+
+
+When a file is opened (or a file object created by some other means,
+such as socket() or accept()) it is the responsibility of the
+filesystem open operation to initialize all the fields of the object
+except the _f_ucount_, _f_syncmode_ and _f_mte_ fields. Since the
+_f_flag_ field will already contain bits belonging to the FILEIO
+infrastructure, any changes to it must be made with the appropriate
+logical operations.
+
+
+Directories
+-----------
+
+Filesystem operations all take a directory pointer as one of their
+arguments. A directory pointer is an opaque handle managed by the
+filesystem. It should encapsulate a reference to a specific directory
+within the filesystem. For example, it may be a pointer to the data
+structure that represents that directory, or a pointer to a pathname
+for the directory.
+
+The _chdir_ filesystem function has two modes of use. When passed a
+pointer in the _dir_out_ argument, it should locate the named
+directory and place a directory pointer there. If the _dir_out_
+argument is NULL then the _dir_ argument is a previously generated
+directory pointer that can now be disposed of. When the infrastructure
+is implementing the chdir() function it makes two calls to filesystem
+_chdir_ functions. The first is to get a directory pointer for the new
+current directory. If this succeeds the second is to dispose of the
+old current directory pointer.
+
+The _opendir_ function is used to open a directory for reading. This
+results in an open file object that can be read to return a sequence
+of _struct dirent_ objects. The only operation that are allowed on
+this file are _read_, _lseek_ and _close_. Each read operation on this
+file should return a single _struct dirent_ object. When the end of
+the directory is reached, zero should be returned. The only seek
+operation allowed is a rewind to the start of the directory, by
+supplying an offset of zero and a _whence_ specifier of _SEEK_SET_.
+
+Most of these considerations are invisible to clients of a filesystem
+since they will access directories via the POSIX
+opendir()/readdir()/closedir() functions.
+
+Support for the _getcwd()_ function is provided by three mechanisms.
+The first is to use the _FS_INFO_GETCWD_ getinfo key on the filesystem
+to use any internal support that it has for this. If that fails it
+falls back on one of the two other mechanisms. If
+_CYGPKG_IO_FILEIO_TRACK_CWD_ is set then the current directory is
+tracked textually in chdir() and the result of that is reported in
+getcwd(). Otherwise an attempt is made to traverse the directory tree
+to its root using ".." entries.
+
+This last option is complicated and expensive, and relies on the
+filesystem supporting "." and ".." entries. This is not always the
+case, particularly if the filesystem has been ported from a
+non-UNIX-compatible source. Tracking the pathname textually will
+usually work, but might not produce optimum results when symbolic
+links are being used.
+
+
+Synchronization
+---------------
+
+The FILEIO infrastructure provides a synchronization mechanism for
+controlling concurrent access to filesystems. This allows existing
+filesystems to be ported to eCos, even if they do not have their own
+synchronization mechanisms. It also allows new filesystems to be
+implemented easily without having to consider the synchronization
+issues.
+
+The infrastructure maintains a mutex for each entry in each of
+the main tables: filesystem table, mount table and file table. For
+each class of operation each of these mutexes may be locked before the
+corresponding filesystem operation is invoked.
+
+The synchronization protocol implemented by a filesystem is described
+by the _syncmode_ field of the filesystem table entry. This is a
+combination of the following flags:
+
+CYG_SYNCMODE_FILE_FILESYSTEM Lock the filesystem table entry mutex
+ during all filesystem level operations.
+
+CYG_SYNCMODE_FILE_MOUNTPOINT Lock the mount table entry mutex
+ during all filesystem level operations.
+
+CYG_SYNCMODE_IO_FILE Lock the file table entry mutex during all
+ I/O operations.
+
+CYG_SYNCMODE_IO_FILESYSTEM Lock the filesystem table entry mutex
+ during all I/O operations.
+
+CYG_SYNCMODE_IO_MOUNTPOINT Lock the mount table entry mutex during
+ all I/O operations.
+
+CYG_SYNCMODE_SOCK_FILE Lock the file table entry mutex during
+ all socket operations.
+
+CYG_SYNCMODE_SOCK_NETSTACK Lock the network stack table entry mutex
+ during all socket operations.
+
+CYG_SYNCMODE_NONE Perform no locking at all during any
+ operations.
+
+
+The value of the _syncmode_ in the filesystem table entry will be
+copied by the infrastructure to the open file object after a
+successful open() operation.
+
+
+Initialization and Mounting
+---------------------------
+
+As mentioned previously, mount table entries can be sourced from two
+places. Static entries may be defined by using the MTAB_ENTRY()
+macro. Such entries will be automatically mounted on system startup.
+For each entry in the mount table that has a non-null _name_ field the
+filesystem table is searched for a match with the _fsname_ field. If a
+match is found the filesystem's _mount_ entry is called and if
+successful the mount table entry marked valid and the _fs_ field
+initialized. The _mount_ function is responsible for initializing the
+_root_ field.
+
+The size of the mount table is defined by the configuration value
+CYGNUM_FILEIO_MTAB_MAX. Any entries that have not been statically
+defined are available for use by dynamic mounts.
+
+A filesystem may be mounted dynamically by calling mount(). This
+function has the following prototype:
+
+int mount( const char *devname,
+ const char *dir,
+ const char *fsname);
+
+The _devname_ argument identifies a device that will be used by this
+filesystem and will be assigned to the _devname_ field of the mount
+table entry.
+
+The _dir_ argument is the mount point name, it will be assigned to the
+_name_ field of the mount table entry.
+
+The _fsname_ argument is the name of the implementing filesystem, it
+will be assigned to the _fsname_ entry of the mount table entry.
+
+The process of mounting a filesystem dynamically is as follows. First
+a search is made of the mount table for an entry with a NULL _name_
+field to be used for the new mount point. The filesystem table is then
+searched for an entry whose name matches _fsname_. If this is
+successful then the mount table entry is initialized and the
+filesystem's _mount_ operation called. If this is successful, the
+mount table entry is marked valid and the _fs_ field initialized.
+
+Unmounting a filesystem is done by the umount() function. This can
+unmount filesystems whether they were mounted statically or
+dynamically.
+
+The umount() function has the following prototype:
+
+int umount( const char *name );
+
+The mount table is searched for a match between the _name_ argument
+and the entry _name_ field. When a match is found the filesystem's
+_umount_ operation is called and if successful, the mount table entry
+is invalidated by setting its _valid_ field false and the _name_ field
+to NULL.
+
+Sockets
+-------
+
+If a network stack is present, then the FILEIO infrastructure also
+provides access to the standard BSD socket calls.
+
+The netstack table contains entries which describe the network
+protocol stacks that are in the system image. Each resident stack
+should export an entry to this table using the NSTAB_ENTRY() macro.
+
+Each table entry has the following structure:
+
+struct cyg_nstab_entry
+{
+ cyg_bool valid; // true if stack initialized
+ cyg_uint32 syncmode; // synchronization protocol
+ char *name; // stack name
+ char *devname; // hardware device name
+ CYG_ADDRWORD data; // private data value
+
+ int (*init)( cyg_nstab_entry *nste );
+ int (*socket)( cyg_nstab_entry *nste, int domain, int type,
+ int protocol, cyg_file *file );
+};
+
+This table is analogous to a combination of the filesystem and mount
+tables.
+
+The _valid_ field is set true if the stack's _init_ function returned
+successfully and the _syncmode_ field contains the CYG_SYNCMODE_SOCK_*
+bits described above.
+
+The _name_ field contains the name of the protocol stack.
+
+The _devname_ field names the device that the stack is using. This may
+reference a device under "/dev", or may be a name that is only
+meaningful to the stack itself.
+
+The _init_ function is called during system initialization to start
+the protocol stack running. If it returns non-zero the _valid_ field
+is set false and the stack will be ignored subsequently.
+
+The _socket_ function is called to attempt to create a socket in the
+stack. When the socket() API function is called the netstack table is
+scanned and for each valid entry the _socket_ function is called. If
+this returns non-zero then the scan continues to the next valid stack,
+or terminates with an error if the end of the table is reached.
+
+The result of a successful socket call is an initialized file object
+with the _f_xops_ field pointing to the following structure:
+
+struct cyg_sock_ops
+{
+ int (*bind) ( cyg_file *fp, const sockaddr *sa, socklen_t len );
+ int (*connect) ( cyg_file *fp, const sockaddr *sa, socklen_t len );
+ int (*accept) ( cyg_file *fp, cyg_file *new_fp,
+ struct sockaddr *name, socklen_t *anamelen );
+ int (*listen) ( cyg_file *fp, int len );
+ int (*getname) ( cyg_file *fp, sockaddr *sa, socklen_t *len, int peer );
+ int (*shutdown) ( cyg_file *fp, int flags );
+ int (*getsockopt)( cyg_file *fp, int level, int optname,
+ void *optval, socklen_t *optlen);
+ int (*setsockopt)( cyg_file *fp, int level, int optname,
+ const void *optval, socklen_t optlen);
+ int (*sendmsg) ( cyg_file *fp, const struct msghdr *m,
+ int flags, ssize_t *retsize );
+ int (*recvmsg) ( cyg_file *fp, struct msghdr *m,
+ socklen_t *namelen, ssize_t *retsize );
+};
+
+It should be obvious from the names of these functions which API calls
+they provide support for. The _getname_ function provides support for
+both getsockname() and getpeername() while the _sendmsg_ and _recvmsg_
+functions provide support for send(), sendto(), sendmsg(), recv(),
+recvfrom() and recvmsg() as appropriate.
+
+
+
+Select
+------
+
+The infrastructure provides support for implementing a select
+mechanism. This is modeled on the mechanism in the BSD kernel, but has
+been modified to make it implementation independent.
+
+The main part of the mechanism is the select() API call. This
+processes its arguments and calls the _fo_select_ function on all file
+objects referenced by the file descriptor sets passed to it. If the
+same descriptor appears in more than one descriptor set, the
+_fo_select_ function will be called separately for each appearance.
+
+The _which_ argument of the _fo_select_ function will either be
+CYG_FREAD to test for read conditions, CYG_FWRITE to test for write
+conditions or zero to test for exceptions. For each of these options
+the function should test whether the condition is satisfied and if so
+return true. If it is not satisfied then it should call
+cyg_selrecord() with the _info_ argument that was passed to the
+function and a pointer to a cyg_selinfo structure.
+
+The cyg_selinfo structure is used to record information about current
+select operations. Any object that needs to support select must
+contain an instance of this structure. Separate cyg_selinfo
+structures should be kept for each of the options that the object can
+select on - read, write or exception.
+
+If none of the file objects report that the select condition is
+satisfied, then the select() API function puts the calling thread to
+sleep waiting either for a condition to become satisfied, or for the
+optional timeout to expire.
+
+A selectable object must have some asynchronous activity that may
+cause a select condition to become true - either via interrupts or the
+activities of other threads. Whenever a selectable condition is
+satisfied, the object should call cyg_selwakeup() with a pointer to
+the appropriate cyg_selinfo structure. If the thread is still waiting,
+this will cause it to wake up and repeat its poll of the file
+descriptors. This time around, the object that caused the wakeup
+should indicate that the select condition is satisfied, and the
+_select()_ API call will return.
+
+Note that _select()_ does not exhibit real time behaviour: the
+iterative poll of the descriptors, and the wakeup mechanism mitigate
+against this. If real time response to device or socket I/O is
+required then separate threads should be devoted to each device of
+interest.
+
+
+Devices
+-------
+
+Devices are accessed by means of a pseudo-filesystem, "devfs", that is
+mounted on "/dev". Open operations are translated into calls to
+cyg_io_lookup() and if successful result in a file object whose
+_f_ops_ functions translate filesystem API functions into calls into
+the device API.
+
+// EOF fileio.txt
diff --git a/cesar/ecos/packages/io/fileio/current/include/dirent.h b/cesar/ecos/packages/io/fileio/current/include/dirent.h
new file mode 100644
index 0000000000..63d33fd912
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/include/dirent.h
@@ -0,0 +1,91 @@
+#ifndef CYGONCE_FILEIO_DIRENT_H
+#define CYGONCE_FILEIO_DIRENT_H
+/*========================================================================
+//
+// dirent.h
+//
+// POSIX directory functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors:
+// Date: 2000-06-26
+// Purpose: This file provides the macros, types and functions
+// for directory operations required by POSIX 1003.1.
+// Description: Implementations of the types needed for directory
+// reading.
+// Usage: #include <dirent.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+#include <pkgconf/isoinfra.h>
+
+#include <sys/types.h>
+#include <limits.h>
+
+//======================================================================
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//======================================================================
+// dirent structure.
+
+struct dirent
+{
+ char d_name[NAME_MAX+1];
+};
+
+//======================================================================
+// DIR pointer object.
+
+typedef void *DIR;
+
+//======================================================================
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+//======================================================================
+#endif /* CYGONCE_FILEIO_DIRENT_H multiple inclusion protection */
+/* EOF dirent.h */
diff --git a/cesar/ecos/packages/io/fileio/current/include/fileio.h b/cesar/ecos/packages/io/fileio/current/include/fileio.h
new file mode 100644
index 0000000000..98173d38c7
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/include/fileio.h
@@ -0,0 +1,473 @@
+#ifndef CYGONCE_FILEIO_H
+#define CYGONCE_FILEIO_H
+//=============================================================================
+//
+// fileio.h
+//
+// Fileio header
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-05-25
+// Purpose: Fileio header
+// Description: This header contains the external definitions of the general file
+// IO subsystem for POSIX and EL/IX compatability.
+//
+// Usage:
+// #include <fileio.h>
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/io_fileio.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_tables.h>
+#ifdef CYGFUN_IO_FILEIO_SELECT
+#include <cyg/kernel/kapi.h>
+#endif
+
+#include <stddef.h> // NULL, size_t
+#include <limits.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+//=============================================================================
+// forward definitions
+
+struct cyg_mtab_entry;
+typedef struct cyg_mtab_entry cyg_mtab_entry;
+
+struct cyg_fstab_entry;
+typedef struct cyg_fstab_entry cyg_fstab_entry;
+
+struct CYG_FILEOPS_TAG;
+typedef struct CYG_FILEOPS_TAG cyg_fileops;
+
+struct CYG_FILE_TAG;
+typedef struct CYG_FILE_TAG cyg_file;
+
+struct CYG_IOVEC_TAG;
+typedef struct CYG_IOVEC_TAG cyg_iovec;
+
+struct CYG_UIO_TAG;
+typedef struct CYG_UIO_TAG cyg_uio;
+
+struct CYG_SELINFO_TAG;
+typedef struct CYG_SELINFO_TAG cyg_selinfo;
+
+//=============================================================================
+// Directory pointer
+
+typedef CYG_ADDRWORD cyg_dir;
+
+#define CYG_DIR_NULL 0
+
+//=============================================================================
+// Filesystem table entry
+
+typedef int cyg_fsop_mount ( cyg_fstab_entry *fste, cyg_mtab_entry *mte );
+typedef int cyg_fsop_umount ( cyg_mtab_entry *mte );
+typedef int cyg_fsop_open ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int mode, cyg_file *fte );
+typedef int cyg_fsop_unlink ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+typedef int cyg_fsop_mkdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+typedef int cyg_fsop_rmdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+typedef int cyg_fsop_rename ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2 );
+typedef int cyg_fsop_link ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2, int type );
+typedef int cyg_fsop_opendir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_file *fte );
+typedef int cyg_fsop_chdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_dir *dir_out );
+typedef int cyg_fsop_stat ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ struct stat *buf);
+typedef int cyg_fsop_getinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len );
+typedef int cyg_fsop_setinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len );
+
+
+struct cyg_fstab_entry
+{
+ const char *name; // filesystem name
+ CYG_ADDRWORD data; // private data value
+ cyg_uint32 syncmode; // synchronization mode
+
+ cyg_fsop_mount *mount;
+ cyg_fsop_umount *umount;
+ cyg_fsop_open *open;
+ cyg_fsop_unlink *unlink;
+ cyg_fsop_mkdir *mkdir;
+ cyg_fsop_rmdir *rmdir;
+ cyg_fsop_rename *rename;
+ cyg_fsop_link *link;
+ cyg_fsop_opendir *opendir;
+ cyg_fsop_chdir *chdir;
+ cyg_fsop_stat *stat;
+ cyg_fsop_getinfo *getinfo;
+ cyg_fsop_setinfo *setinfo;
+} CYG_HAL_TABLE_TYPE;
+
+//-----------------------------------------------------------------------------
+// Keys for getinfo() and setinfo()
+
+#define FS_INFO_CONF 1 /* pathconf() */
+#define FS_INFO_ACCESS 2 /* access() */
+#define FS_INFO_GETCWD 3 /* getcwd() */
+#define FS_INFO_SYNC 4 /* cyg_fs_fssync() */
+#define FS_INFO_ATTRIB 5 /* cyg_fs_(get|set)_attrib() */
+
+//-----------------------------------------------------------------------------
+// Types for link()
+
+#define CYG_FSLINK_HARD 1 /* form a hard link */
+#define CYG_FSLINK_SOFT 2 /* form a soft link */
+
+//-----------------------------------------------------------------------------
+// getinfo() and setinfo() buffers structures.
+
+struct cyg_getcwd_info
+{
+ char *buf; /* buffer for cwd string */
+ size_t size; /* size of buffer */
+};
+
+typedef cyg_uint32 cyg_fs_attrib_t;
+
+//-----------------------------------------------------------------------------
+// Macro to define an initialized fstab entry
+
+#define FSTAB_ENTRY( _l, _name, _data, _syncmode, _mount, _umount, \
+ _open, _unlink, _mkdir, _rmdir, _rename, _link, \
+ _opendir, _chdir, _stat, _getinfo, _setinfo) \
+struct cyg_fstab_entry _l CYG_HAL_TABLE_ENTRY(fstab) = \
+{ \
+ _name, \
+ _data, \
+ _syncmode, \
+ _mount, \
+ _umount, \
+ _open, \
+ _unlink, \
+ _mkdir, \
+ _rmdir, \
+ _rename, \
+ _link, \
+ _opendir, \
+ _chdir, \
+ _stat, \
+ _getinfo, \
+ _setinfo \
+};
+
+//=============================================================================
+// Mount table entry
+
+struct cyg_mtab_entry
+{
+ const char *name; // name of mount point
+ const char *fsname; // name of implementing filesystem
+ const char *devname; // name of hardware device
+ CYG_ADDRWORD data; // private data value
+
+ // The following are filled in after a successful mount operation
+ cyg_bool valid; // Valid entry?
+ cyg_fstab_entry *fs; // pointer to fstab entry
+ cyg_dir root; // root directory pointer
+} CYG_HAL_TABLE_TYPE;
+
+
+// This macro defines an initialized mtab entry
+
+#define MTAB_ENTRY( _l, _name, _fsname, _devname, _data ) \
+struct cyg_mtab_entry _l CYG_HAL_TABLE_ENTRY(mtab) = \
+{ \
+ _name, \
+ _fsname, \
+ _devname, \
+ _data, \
+ false, \
+ NULL, \
+ CYG_DIR_NULL \
+};
+
+//=============================================================================
+// IO vector descriptors
+
+struct CYG_IOVEC_TAG
+{
+ void *iov_base; /* Base address. */
+ ssize_t iov_len; /* Length. */
+};
+
+enum cyg_uio_rw { UIO_READ, UIO_WRITE };
+
+/* Segment flag values. */
+enum cyg_uio_seg
+{
+ UIO_USERSPACE, /* from user data space */
+ UIO_SYSSPACE /* from system space */
+};
+
+struct CYG_UIO_TAG
+{
+ struct CYG_IOVEC_TAG *uio_iov; /* pointer to array of iovecs */
+ int uio_iovcnt; /* number of iovecs in array */
+ off_t uio_offset; /* offset into file this uio corresponds to */
+ ssize_t uio_resid; /* residual i/o count */
+ enum cyg_uio_seg uio_segflg; /* see above */
+ enum cyg_uio_rw uio_rw; /* see above */
+};
+
+// Limits
+#define UIO_SMALLIOV 8 /* 8 on stack, else malloc */
+
+//=============================================================================
+// Description of open file
+
+typedef int cyg_fileop_readwrite (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+typedef cyg_fileop_readwrite cyg_fileop_read;
+typedef cyg_fileop_readwrite cyg_fileop_write;
+typedef int cyg_fileop_lseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence );
+typedef int cyg_fileop_ioctl (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com,
+ CYG_ADDRWORD data);
+typedef cyg_bool cyg_fileop_select (struct CYG_FILE_TAG *fp, int which, CYG_ADDRWORD info);
+typedef int cyg_fileop_fsync (struct CYG_FILE_TAG *fp, int mode );
+typedef int cyg_fileop_close (struct CYG_FILE_TAG *fp);
+typedef int cyg_fileop_fstat (struct CYG_FILE_TAG *fp, struct stat *buf );
+typedef int cyg_fileop_getinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
+typedef int cyg_fileop_setinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
+
+struct CYG_FILEOPS_TAG
+{
+ cyg_fileop_read *fo_read;
+ cyg_fileop_write *fo_write;
+ cyg_fileop_lseek *fo_lseek;
+ cyg_fileop_ioctl *fo_ioctl;
+ cyg_fileop_select *fo_select;
+ cyg_fileop_fsync *fo_fsync;
+ cyg_fileop_close *fo_close;
+ cyg_fileop_fstat *fo_fstat;
+ cyg_fileop_getinfo *fo_getinfo;
+ cyg_fileop_setinfo *fo_setinfo;
+};
+
+struct CYG_FILE_TAG
+{
+ cyg_uint32 f_flag; /* file state */
+ cyg_uint16 f_ucount; /* use count */
+ cyg_uint16 f_type; /* descriptor type */
+ cyg_uint32 f_syncmode; /* synchronization protocol */
+ struct CYG_FILEOPS_TAG *f_ops; /* file operations */
+ off_t f_offset; /* current offset */
+ CYG_ADDRWORD f_data; /* file or socket */
+ CYG_ADDRWORD f_xops; /* extra type specific ops */
+ cyg_mtab_entry *f_mte; /* mount table entry */
+};
+
+//-----------------------------------------------------------------------------
+// File flags
+
+// Allocation here is that bits 0..15 are copies of bits from the open
+// flags, bits 16..23 are extra bits that are visible to filesystems but
+// are not derived from the open call, and bits 24..31 are reserved for
+// the fileio infrastructure.
+#define CYG_FREAD O_RDONLY
+#define CYG_FWRITE O_WRONLY
+#define CYG_FNONBLOCK O_NONBLOCK
+#define CYG_FAPPEND O_APPEND
+#define CYG_FASYNC 0x00010000
+#define CYG_FDIR 0x00020000
+
+#define CYG_FLOCKED 0x01000000 // Set if file is locked
+#define CYG_FLOCK 0x02000000 // Lock during file ops
+#define CYG_FALLOC 0x80000000 // File is "busy", i.e. allocated
+
+// Mask for open mode bits stored in file object
+#define CYG_FILE_MODE_MASK (CYG_FREAD|CYG_FWRITE|CYG_FNONBLOCK|CYG_FAPPEND)
+
+//-----------------------------------------------------------------------------
+// Type of file
+
+#define CYG_FILE_TYPE_FILE 1 /* file */
+#define CYG_FILE_TYPE_SOCKET 2 /* communications endpoint */
+#define CYG_FILE_TYPE_DEVICE 3 /* device */
+
+//-----------------------------------------------------------------------------
+// Keys for getinfo() and setinfo()
+
+#define FILE_INFO_CONF 1 /* fpathconf() */
+
+//-----------------------------------------------------------------------------
+// Modes for fsync()
+
+#define CYG_FSYNC 1
+#define CYG_FDATASYNC 2
+
+//-----------------------------------------------------------------------------
+// Get/set info buffer structures
+
+// This is used for pathconf() and fpathconf()
+struct cyg_pathconf_info
+{
+ int name; // POSIX defined variable name
+ long value; // Returned variable value
+};
+
+//=============================================================================
+// Synchronization modes
+// These values are filled into the syncmode fields of the above structures
+// and define the synchronization protocol used when accessing the object in
+// question.
+
+#define CYG_SYNCMODE_NONE (0) // no locking required
+
+#define CYG_SYNCMODE_FILE_FILESYSTEM 0x0002 // lock fs during file ops
+#define CYG_SYNCMODE_FILE_MOUNTPOINT 0x0004 // lock mte during file ops
+#define CYG_SYNCMODE_IO_FILE 0x0010 // lock file during io ops
+#define CYG_SYNCMODE_IO_FILESYSTEM 0x0020 // lock fs during io ops
+#define CYG_SYNCMODE_IO_MOUNTPOINT 0x0040 // lock mte during io ops
+#define CYG_SYNCMODE_SOCK_FILE 0x0100 // lock socket during socket ops
+#define CYG_SYNCMODE_SOCK_NETSTACK 0x0800 // lock netstack during socket ops
+
+#define CYG_SYNCMODE_IO_SHIFT (4) // shift for IO to file bits
+#define CYG_SYNCMODE_SOCK_SHIFT (8) // shift for sock to file bits
+
+//=============================================================================
+// Mount and umount functions
+
+__externC int mount( const char *devname,
+ const char *dir,
+ const char *fsname);
+
+__externC int umount( const char *name);
+
+//=============================================================================
+// Get/Set info functions
+
+__externC int cyg_fs_getinfo( const char *path, int key, void *buf, int len );
+__externC int cyg_fs_setinfo( const char *path, int key, void *buf, int len );
+__externC int cyg_fs_fgetinfo( int fd, int key, void *buf, int len );
+__externC int cyg_fs_fsetinfo( int fd, int key, void *buf, int len );
+
+#ifdef CYGFUN_IO_FILEIO_SELECT
+//=============================================================================
+// Select support
+
+//-----------------------------------------------------------------------------
+// Data structure for embedding in client data structures. A pointer to this
+// must be passed to cyg_selrecord() and cyg_selwakeup().
+
+struct CYG_SELINFO_TAG
+{
+ CYG_ADDRWORD si_info; // info passed through from fo_select()
+ cyg_flag_value_t si_waitFlag; // select wait flags
+};
+
+//-----------------------------------------------------------------------------
+// Select support functions.
+
+// cyg_selinit() is used to initialize a selinfo structure.
+__externC void cyg_selinit( struct CYG_SELINFO_TAG *sip );
+
+// cyg_selrecord() is called when a client device needs to register
+// the current thread for selection.
+__externC void cyg_selrecord( CYG_ADDRWORD info, struct CYG_SELINFO_TAG *sip );
+
+// cyg_selwakeup() is called when the client device matches the select
+// criterion, and needs to wake up a selector.
+__externC void cyg_selwakeup( struct CYG_SELINFO_TAG *sip );
+#endif
+//=============================================================================
+// Timestamp support
+
+// Provides the current time as a time_t timestamp for use in filesystem
+// data strucures.
+
+__externC time_t cyg_timestamp(void);
+
+//=============================================================================
+// Miscellaneous functions.
+
+// Provide a function to synchronize an individual file system. (ie write
+// file and directory information to disk)
+__externC int cyg_fs_fssync(const char *path);
+
+// Functions to set and get attributes of a file, eg FAT attributes
+// like hidden and system.
+__externC int cyg_fs_set_attrib( const char *fname,
+ const cyg_fs_attrib_t new_attrib );
+__externC int cyg_fs_get_attrib( const char *fname,
+ cyg_fs_attrib_t * const file_attrib );
+
+// Functions to lock and unlock a filesystem. These are normally used
+// internally by the fileio layer, but the file system might need to
+// use them when it needs to lock itself, eg when performing garbage
+// collect.
+__externC void cyg_fs_lock( cyg_mtab_entry *mte, cyg_uint32 syncmode );
+
+__externC void cyg_fs_unlock( cyg_mtab_entry *mte, cyg_uint32 syncmode );
+
+// To be able to lock the filesystem you need the mte. This function
+// allows the table of mounted filesystems to be searched to find an
+// mte which uses the give filesystem root.
+
+__externC cyg_mtab_entry * cyg_fs_root_lookup( cyg_dir *root );
+
+//=============================================================================
+// Default functions.
+// Cast to the appropriate type, these functions can be put into any of
+// the operation table slots to provide the defined error code.
+
+__externC int cyg_fileio_enosys(void);
+__externC int cyg_fileio_erofs(void);
+__externC int cyg_fileio_enoerr(void);
+__externC int cyg_fileio_enotdir(void);
+__externC cyg_fileop_select cyg_fileio_seltrue;
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_FILEIO_H
+// End of fileio.h
diff --git a/cesar/ecos/packages/io/fileio/current/include/inode.h b/cesar/ecos/packages/io/fileio/current/include/inode.h
new file mode 100644
index 0000000000..a44caf54b5
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/include/inode.h
@@ -0,0 +1,142 @@
+#ifndef CYGONCE_IO_FILEIO_INODE_H
+#define CYGONCE_IO_FILEIO_INODE_H
+//=============================================================================
+//
+// inode.h
+//
+// Header describing eCos inodes
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2002-01-18
+// Purpose: Describe inodes
+// Description: This header contains the definitions that may be useful to a
+// filesystem implementation with the concept of inodes.
+// There should remain no *requirement* for a FS to use inodes.
+// Instead these are just useful functions and definitions.
+//
+// Usage:
+// #include <cyg/fileio/inode.h>
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/infra/cyg_type.h>
+#include <sys/types.h>
+#include <time.h> // time_t
+#include <cyg/fileio/fileio.h>
+#include <cyg/io/io.h>
+#include <limits.h>
+
+// some members are named for compatibility for Linux inodes
+typedef struct CYG_INODE_TAG {
+ cyg_uint32 i_ino; // inode number
+ mode_t i_mode; // mode
+ nlink_t i_nlink; // number of (hard) links
+ uid_t i_uid; // UID
+ gid_t i_gid; // GID
+ cyg_io_handle_t i_device; // underlying device
+ off_t i_size; // file size
+ time_t i_atime; // file access time
+ time_t i_mtime; // file modification time
+ time_t i_ctime; // file metadata change time
+ struct CYG_INODE_TAG *i_parent; // parent inode
+
+ // these duplicate the contents of a cyg_file, but that's okay
+ cyg_mtab_entry* i_mte; // mount table entry
+ struct CYG_FILEOPS_TAG *i_fop; // file operations
+
+ // inode cache related members
+ cyg_atomic i_count; // number of references to this inode
+ struct CYG_INODE_TAG *i_cache_prev; // previous in icache
+ struct CYG_INODE_TAG *i_cache_next; // next in icache
+
+ // This allows us to use a GCC extension to extend the size as appropriate
+ // for individual FS's requirements.
+ // Obviously anything here cannot be shared between FSs.
+ CYG_ADDRWORD i_private[];
+} cyg_inode;
+
+// There should be one cyg_inodecache per FS instance (to preserve inode number
+// uniqueness)
+typedef void (*cyg_inodecache_freecallback_t)( cyg_inode *);
+typedef struct {
+ cyg_inode *head;
+#if CYGNUM_IO_FILEIO_MAX_INODE_CACHE_DEAD > 0
+ cyg_inode *freeable;
+ cyg_atomic freeablelistlen;
+#endif
+ cyg_inodecache_freecallback_t freecallback;
+ size_t privatespace;
+ // should be some locking eventually
+} cyg_inodecache;
+
+static __inline__ int
+cyg_inodecache_init( cyg_inodecache *ic, size_t extraprivatespace,
+ cyg_inodecache_freecallback_t freecb )
+{
+ ic->head = NULL;
+#if CYGNUM_IO_FILEIO_MAX_INODE_CACHE_DEAD > 0
+ ic->freeable = NULL;
+ ic->freeablelistlen = 0;
+#endif
+ ic->privatespace = extraprivatespace;
+ ic->freecallback = freecb;
+ return 0;
+}
+
+// Create an inode, with extra private space. Returns NULL on error.
+__externC cyg_inode *
+cyg_inode_create( cyg_inodecache *ic );
+
+__externC cyg_inode *
+cyg_inode_get( cyg_inodecache *ic, cyg_uint32 ino );
+
+__externC void
+cyg_inode_put( cyg_inodecache *ic, cyg_inode *ino );
+
+__externC void
+cyg_inodecache_destroy( cyg_inodecache *ic );
+
+#endif // CYGONCE_IO_FILEIO_INODE_H
+
+// EOF inode.h
diff --git a/cesar/ecos/packages/io/fileio/current/include/limits.h b/cesar/ecos/packages/io/fileio/current/include/limits.h
new file mode 100644
index 0000000000..e3bbda7c43
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/include/limits.h
@@ -0,0 +1,67 @@
+#ifndef CYGONCE_IO_FILEIO_LIMITS_H
+#define CYGONCE_IO_FILEIO_LIMITS_H
+/*============================================================================
+//
+// limits.h
+//
+// Fileio limits header
+//
+//============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-09-11
+// Purpose: Provide POSIX limits for file I/O related properties
+// Description:
+//
+// Usage: #include <limits.h>
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================*/
+
+#include <pkgconf/io_fileio.h>
+
+#ifndef __STRICT_ANSI__
+# define NAME_MAX 64
+# define OPEN_MAX CYGNUM_FILEIO_NFILE
+#endif
+
+/*--------------------------------------------------------------------------*/
+#endif /* ifndef CYGONCE_IO_FILEIO_LIMITS_H */
+/* End of fileio.h */
diff --git a/cesar/ecos/packages/io/fileio/current/include/sockio.h b/cesar/ecos/packages/io/fileio/current/include/sockio.h
new file mode 100644
index 0000000000..1752768fed
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/include/sockio.h
@@ -0,0 +1,144 @@
+#ifndef CYGONCE_SOCKIO_H
+#define CYGONCE_SOCKIO_H
+//=============================================================================
+//
+// sockio.h
+//
+// Socket IO header
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-05-25
+// Purpose: Socket IO header
+// Description: This header contains the external definitions of the general
+// socket IO subsystem for POSIX and EL/IX compatability.
+//
+// Usage:
+// #include <sockio.h>
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/io_fileio.h>
+
+#include <cyg/infra/cyg_type.h>
+
+#include <stddef.h> // NULL, size_t
+#include <limits.h>
+#include <sys/types.h>
+
+#include <cyg/fileio/fileio.h>
+
+//=============================================================================
+// Forward definitions
+
+struct cyg_nstab_entry;
+typedef struct cyg_nstab_entry cyg_nstab_entry;
+
+struct cyg_sock_ops;
+typedef struct cyg_sock_ops cyg_sock_ops;
+
+struct sockaddr;
+typedef struct sockaddr sockaddr;
+
+struct msghdr;
+typedef struct msghdr msghdr;
+
+#ifndef CYGPKG_NET
+
+typedef cyg_uint32 socklen_t; /* length type for network syscalls */
+
+#endif
+
+//=============================================================================
+// network stack entry
+
+struct cyg_nstab_entry
+{
+ cyg_bool valid; // true if stack initialized
+ cyg_uint32 syncmode; // synchronization protocol
+ char *name; // stack name
+ char *devname; // hardware device name
+ CYG_ADDRWORD data; // private data value
+
+ int (*init)( cyg_nstab_entry *nste );
+ int (*socket)( cyg_nstab_entry *nste, int domain, int type,
+ int protocol, cyg_file *file );
+} CYG_HAL_TABLE_TYPE;
+
+#define NSTAB_ENTRY( _l, _syncmode, _name, _devname, _data, _init, _socket ) \
+struct cyg_nstab_entry _l CYG_HAL_TABLE_ENTRY(nstab) = \
+{ \
+ false, \
+ _syncmode, \
+ _name, \
+ _devname, \
+ _data, \
+ _init, \
+ _socket \
+};
+
+//=============================================================================
+
+struct cyg_sock_ops
+{
+ int (*bind) ( cyg_file *fp, const sockaddr *sa, socklen_t len );
+ int (*connect) ( cyg_file *fp, const sockaddr *sa, socklen_t len );
+ int (*accept) ( cyg_file *fp, cyg_file *new_fp,
+ struct sockaddr *name, socklen_t *anamelen );
+ int (*listen) ( cyg_file *fp, int len );
+ int (*getname) ( cyg_file *fp, sockaddr *sa, socklen_t *len, int peer );
+ int (*shutdown) ( cyg_file *fp, int flags );
+ int (*getsockopt)( cyg_file *fp, int level, int optname,
+ void *optval, socklen_t *optlen);
+ int (*setsockopt)( cyg_file *fp, int level, int optname,
+ const void *optval, socklen_t optlen);
+ int (*sendmsg) ( cyg_file *fp, const struct msghdr *m,
+ int flags, ssize_t *retsize );
+ int (*recvmsg) ( cyg_file *fp, struct msghdr *m,
+ socklen_t *namelen, ssize_t *retsize );
+};
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_SOCKIO_H
+// End of sockio.h
diff --git a/cesar/ecos/packages/io/fileio/current/src/devfs.cxx b/cesar/ecos/packages/io/fileio/current/src/devfs.cxx
new file mode 100644
index 0000000000..e407dc8691
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/src/devfs.cxx
@@ -0,0 +1,497 @@
+//==========================================================================
+//
+// devfs.cxx
+//
+// Fileio device filesystem
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg, gthomas
+// Date: 2000-05-25
+// Purpose: Fileio device filesystem
+// Description: This file implements a simple filesystem that interfaces
+// to the existing device IO subsystem.
+//
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/io_fileio.h>
+
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include "fio.h" // Private header
+
+#include <cyg/io/devtab.h> // device subsystem
+#include <cyg/io/config_keys.h> // CYG_IO_GET_CONFIG_SERIAL_OUTPUT_DRAIN
+
+//==========================================================================
+// Forward definitions
+
+// Filesystem operations
+static int dev_mount ( cyg_fstab_entry *fste, cyg_mtab_entry *mte );
+static int dev_umount ( cyg_mtab_entry *mte );
+static int dev_open ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int mode, cyg_file *fte );
+static int dev_unlink ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+static int dev_mkdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+static int dev_rmdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+static int dev_rename ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2 );
+static int dev_link ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2, int type );
+static int dev_opendir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_file *fte );
+static int dev_chdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_dir *dir_out );
+static int dev_stat ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ struct stat *buf);
+static int dev_getinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len );
+static int dev_setinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len );
+
+// File operations
+static int dev_fo_read (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+static int dev_fo_write (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+static int dev_fo_lseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence );
+static int dev_fo_ioctl (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com,
+ CYG_ADDRWORD data);
+static cyg_bool dev_fo_select (struct CYG_FILE_TAG *fp, int which, CYG_ADDRWORD info);
+static int dev_fo_fsync (struct CYG_FILE_TAG *fp, int mode );
+static int dev_fo_close (struct CYG_FILE_TAG *fp);
+static int dev_fo_fstat (struct CYG_FILE_TAG *fp, struct stat *buf );
+static int dev_fo_getinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
+static int dev_fo_setinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
+
+
+//==========================================================================
+// Filesystem table entries
+
+FSTAB_ENTRY( dev_fste, "devfs", 0,
+ CYG_SYNCMODE_NONE, // dev system has its own sync mechanism
+ dev_mount,
+ dev_umount,
+ dev_open,
+ dev_unlink,
+ dev_mkdir,
+ dev_rmdir,
+ dev_rename,
+ dev_link,
+ dev_opendir,
+ dev_chdir,
+ dev_stat,
+ dev_getinfo,
+ dev_setinfo);
+
+MTAB_ENTRY( dev_mte,
+ "/dev",
+ "devfs",
+ "",
+ 0);
+
+static cyg_fileops dev_fileops =
+{
+ dev_fo_read,
+ dev_fo_write,
+ dev_fo_lseek,
+ dev_fo_ioctl,
+ dev_fo_select,
+ dev_fo_fsync,
+ dev_fo_close,
+ dev_fo_fstat,
+ dev_fo_getinfo,
+ dev_fo_setinfo
+};
+
+//==========================================================================
+// Filesystem operations
+
+// -------------------------------------------------------------------------
+
+static int dev_mount ( cyg_fstab_entry *fste, cyg_mtab_entry *mte )
+{
+ // Nothing to do here. The device IO subsystem has already initialized
+ // iteslf, and the fileio infrastructure will do the rest.
+
+ return 0;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_umount ( cyg_mtab_entry *mte )
+{
+ // Nothing to do here.
+
+ return 0;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_open ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int mode, cyg_file *file )
+{
+ Cyg_ErrNo err;
+ cyg_io_handle_t handle;
+
+ // The name we are passed will point to the first character after
+ // "/dev/". We know that the full string contains the prefix string,
+ // so we back the pointer up by 5 chars.
+ // A better approach would be for the device table entries to only
+ // contain the part of the string after the prefix.
+
+ name -= 5;
+
+ err = cyg_io_lookup( name, &handle );
+
+ if( err < 0 )
+ return -err;
+
+ // If we want non-blocking mode, configure the device for it.
+ if( (mode & (O_NONBLOCK|O_RDONLY)) == (O_NONBLOCK|O_RDONLY) )
+ {
+ cyg_uint32 f = 0;
+ cyg_uint32 fsize = sizeof(f);
+ err = cyg_io_set_config( handle, CYG_IO_SET_CONFIG_READ_BLOCKING,
+ (void *)&f, &fsize);
+ if( err < 0 )
+ return -err;
+ }
+
+ if( (mode & (O_NONBLOCK|O_WRONLY)) == (O_NONBLOCK|O_WRONLY) )
+ {
+ cyg_uint32 f = 0;
+ cyg_uint32 fsize = sizeof(f);
+ err = cyg_io_set_config( handle, CYG_IO_SET_CONFIG_WRITE_BLOCKING,
+ (void *)&f, &fsize);
+ if( err < 0 )
+ return -err;
+ }
+
+ // Initialize the file object
+
+ file->f_flag |= mode & CYG_FILE_MODE_MASK;
+ file->f_type = CYG_FILE_TYPE_FILE;
+ file->f_ops = &dev_fileops;
+ file->f_offset = 0;
+ file->f_data = (CYG_ADDRWORD)handle;
+ file->f_xops = 0;
+
+ return 0;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_unlink ( cyg_mtab_entry *mte, cyg_dir dir, const char *name )
+{
+ return EROFS;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_mkdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name )
+{
+ return EROFS;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_rmdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name )
+{
+ return EROFS;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_rename ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2 )
+{
+ return EROFS;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_link ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2, int type )
+{
+ return EROFS;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_opendir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_file *fte )
+{
+ return ENOTDIR;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_chdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_dir *dir_out )
+{
+ return ENOTDIR;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_stat ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ struct stat *buf)
+{
+ Cyg_ErrNo err;
+ cyg_io_handle_t handle;
+ cyg_devtab_entry_t *dev;
+
+ name -= 5; // See comment in dev_open()
+
+ err = cyg_io_lookup( name, &handle );
+
+ if( err < 0 )
+ return -err;
+
+ // Just fill in the stat buffer with some constant values.
+ dev = (cyg_devtab_entry_t *)handle;
+
+ if (dev->status & CYG_DEVTAB_STATUS_BLOCK)
+ buf->st_mode = __stat_mode_BLK;
+ else
+ buf->st_mode = __stat_mode_CHR;
+
+ buf->st_ino = (ino_t)handle; // map dev handle to inode
+ buf->st_dev = 0; // (dev_t)handle; // same with dev id
+ buf->st_nlink = 1;
+ buf->st_uid = 0;
+ buf->st_gid = 0;
+ buf->st_size = 0;
+ buf->st_atime = 0;
+ buf->st_mtime = 0;
+ buf->st_ctime = 0;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_getinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len )
+{
+ return ENOSYS;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_setinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len )
+{
+ return ENOSYS;
+}
+
+//==========================================================================
+// File operations
+
+
+// -------------------------------------------------------------------------
+
+static int dev_fo_read (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio)
+{
+ Cyg_ErrNo err = 0;
+ int i;
+
+ // Now loop over the iovecs until they are all done, or
+ // we get an error.
+ for( i = 0; i < uio->uio_iovcnt; i++ )
+ {
+ cyg_iovec *iov = &uio->uio_iov[i];
+ cyg_uint32 len = iov->iov_len;
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)fp->f_data;
+
+ if (t->status & CYG_DEVTAB_STATUS_BLOCK)
+ err = cyg_io_bread( (cyg_io_handle_t)t,
+ iov->iov_base,
+ &len, fp->f_offset);
+ else
+ err = cyg_io_read( (cyg_io_handle_t)t,
+ iov->iov_base,
+ &len);
+
+ if( err < 0 ) break;
+
+ uio->uio_resid -= len;
+ }
+
+ return -err;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_fo_write (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio)
+{
+ Cyg_ErrNo err = 0;
+ int i;
+
+ // Now loop over the iovecs until they are all done, or
+ // we get an error.
+ for( i = 0; i < uio->uio_iovcnt; i++ )
+ {
+ cyg_iovec *iov = &uio->uio_iov[i];
+ cyg_uint32 len = iov->iov_len;
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)fp->f_data;
+
+ if (t->status & CYG_DEVTAB_STATUS_BLOCK)
+ err = cyg_io_bwrite( (cyg_io_handle_t)t,
+ iov->iov_base,
+ &len, fp->f_offset);
+ else
+ err = cyg_io_write( (cyg_io_handle_t)t,
+ iov->iov_base,
+ &len);
+
+ if( err < 0 ) break;
+
+ uio->uio_resid -= len;
+ }
+
+ return -err;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_fo_lseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence )
+{
+ // All current devices have no notion of position. Just return zero
+ // as the new position.
+
+ *pos = 0;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_fo_ioctl (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com,
+ CYG_ADDRWORD data)
+{
+ return ENOSYS;
+}
+
+// -------------------------------------------------------------------------
+
+static cyg_bool dev_fo_select (struct CYG_FILE_TAG *fp, int which, CYG_ADDRWORD info)
+{
+ return cyg_io_select( (cyg_io_handle_t)fp->f_data,
+ which,
+ info);
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_fo_fsync (struct CYG_FILE_TAG *fp, int mode )
+{
+ Cyg_ErrNo err;
+
+ err = cyg_io_get_config((cyg_io_handle_t)fp->f_data,
+ CYG_IO_GET_CONFIG_SERIAL_OUTPUT_DRAIN,
+ NULL, NULL);
+
+ return -err;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_fo_close (struct CYG_FILE_TAG *fp)
+{
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_fo_fstat (struct CYG_FILE_TAG *fp, struct stat *buf )
+{
+ cyg_devtab_entry_t *dev = (cyg_devtab_entry_t *)fp->f_data;
+
+ // Just fill in the stat buffer with some constant values.
+ if (dev->status & CYG_DEVTAB_STATUS_BLOCK)
+ buf->st_mode = __stat_mode_BLK;
+ else
+ buf->st_mode = __stat_mode_CHR;
+
+ buf->st_ino = (ino_t)fp->f_data; // map dev handle to inode
+ buf->st_dev = 0; //(dev_t)fp->f_data; // same with dev id
+ buf->st_nlink = 1;
+ buf->st_uid = 0;
+ buf->st_gid = 0;
+ buf->st_size = 0;
+ buf->st_atime = 0;
+ buf->st_mtime = 0;
+ buf->st_ctime = 0;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_fo_getinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len )
+{
+ Cyg_ErrNo err = 0;
+ cyg_uint32 ll = len;
+
+ err = cyg_io_get_config( (cyg_io_handle_t)fp->f_data, key, buf, &ll );
+
+ return -err;
+}
+
+// -------------------------------------------------------------------------
+
+static int dev_fo_setinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len )
+{
+ Cyg_ErrNo err = 0;
+ cyg_uint32 ll = len;
+
+ err = cyg_io_set_config( (cyg_io_handle_t)fp->f_data, key, buf, &ll );
+
+ return -err;
+}
+
+// -------------------------------------------------------------------------
+// EOF devfs.cxx
diff --git a/cesar/ecos/packages/io/fileio/current/src/dir.cxx b/cesar/ecos/packages/io/fileio/current/src/dir.cxx
new file mode 100644
index 0000000000..32fc03b0cb
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/src/dir.cxx
@@ -0,0 +1,228 @@
+//==========================================================================
+//
+// dir.cxx
+//
+// Fileio directory support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-05-25
+// Purpose: Fileio directory support
+// Description: Support for directory operations.
+//
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/io_fileio.h>
+
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <stdarg.h> // for fcntl()
+
+#include "fio.h" // Private header
+
+#include <dirent.h> // struct dirent
+
+//==========================================================================
+
+#define DIROPEN_RETURN_ERR( err ) \
+CYG_MACRO_START \
+ errno = err; \
+ CYG_REPORT_RETVAL( NULL ); \
+ return NULL; \
+CYG_MACRO_END
+
+//==========================================================================
+// Implement filesystem locking protocol.
+
+#define LOCK_FS( _mte_ ) { \
+ CYG_ASSERT(_mte_ != NULL, "Bad mount table entry"); \
+ cyg_fs_lock( _mte_, (_mte_)->fs->syncmode); \
+}
+
+#define UNLOCK_FS( _mte_ ) cyg_fs_unlock( _mte_, (_mte_)->fs->syncmode)
+
+//==========================================================================
+// Open a directory for reading
+
+extern DIR *opendir( const char *dirname )
+{
+ FILEIO_ENTRY();
+
+ CYG_CANCELLATION_POINT;
+
+ int ret = 0;
+ int fd;
+ cyg_file *file;
+ cyg_mtab_entry *mte = cyg_cdir_mtab_entry;
+ cyg_dir dir = cyg_cdir_dir;
+ const char *name = dirname;
+
+ fd = cyg_fd_alloc(1); // Never return fd 0
+
+ if( fd < 0 )
+ DIROPEN_RETURN_ERR(EMFILE);
+
+ file = cyg_file_alloc();
+
+ if( file == NULL )
+ {
+ cyg_fd_free(fd);
+ DIROPEN_RETURN_ERR(ENFILE);
+ }
+
+ ret = cyg_mtab_lookup( &dir, &name, &mte );
+
+ if( 0 != ret )
+ {
+ cyg_fd_free(fd);
+ cyg_file_free(file);
+ DIROPEN_RETURN_ERR(ENOENT);
+ }
+
+ LOCK_FS( mte );
+
+ ret = mte->fs->opendir( mte, dir, name, file );
+
+ UNLOCK_FS( mte );
+
+ if( 0 != ret )
+ {
+ cyg_fd_free(fd);
+ cyg_file_free(file);
+ DIROPEN_RETURN_ERR(ret);
+ }
+
+ file->f_flag |= CYG_FDIR|CYG_FREAD;
+ file->f_mte = mte;
+ file->f_syncmode = mte->fs->syncmode;
+
+ cyg_fd_assign( fd, file );
+
+ DIR *dirp = (DIR *)fd;
+
+ FILEIO_RETURN_VALUE(dirp);
+}
+
+//==========================================================================
+// Read a directory entry.
+// This is the thread-unsafe version that uses a static result buffer.
+// It just calls the thread-safe version to do the work.
+
+extern struct dirent *readdir( DIR *dirp )
+{
+ FILEIO_ENTRY();
+
+ static struct dirent ent;
+ struct dirent *result;
+ int err;
+
+ err = readdir_r( dirp, &ent, &result );
+
+ if( err != 0 )
+ {
+ errno = err;
+ FILEIO_RETURN_VALUE( NULL );
+ }
+
+ FILEIO_RETURN_VALUE( result );
+}
+
+//==========================================================================
+
+extern int readdir_r( DIR *dirp, struct dirent *entry, struct dirent **result )
+{
+ FILEIO_ENTRY();
+
+ int fd = (int)dirp;
+ ssize_t res;
+
+ *result = NULL;
+
+ if( NULL == dirp )
+ {
+ FILEIO_RETURN_VALUE( EBADF );
+ }
+
+ res = read( fd, (void *)entry, sizeof(struct dirent));
+
+ if( res < 0 )
+ {
+ FILEIO_RETURN_VALUE( errno );
+ }
+
+ if( res > 0 )
+ *result = entry;
+
+ FILEIO_RETURN( ENOERR );
+}
+
+//==========================================================================
+
+extern void rewinddir( DIR *dirp )
+{
+ FILEIO_ENTRY();
+
+ int fd = (int)dirp;
+
+ lseek( fd, 0, SEEK_SET );
+
+ FILEIO_RETURN_VOID();
+}
+
+//==========================================================================
+
+extern int closedir( DIR *dirp )
+{
+ FILEIO_ENTRY();
+
+ int fd = (int)dirp;
+ int err = close( fd );
+
+ FILEIO_RETURN_VALUE( err );
+}
+
+// -------------------------------------------------------------------------
+// EOF dir.cxx
diff --git a/cesar/ecos/packages/io/fileio/current/src/fd.cxx b/cesar/ecos/packages/io/fileio/current/src/fd.cxx
new file mode 100644
index 0000000000..be6faad156
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/src/fd.cxx
@@ -0,0 +1,398 @@
+//==========================================================================
+//
+// fd.cxx
+//
+// Fileio file descriptor implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-05-25
+// Purpose: Fileio file descriptor implementation
+// Description: This file contains the implementation of the file
+// descriptor functions.
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/io_fileio.h>
+
+#ifdef CYGPKG_KERNEL
+#include <pkgconf/kernel.h>
+#include <cyg/kernel/ktypes.h> // base kernel types
+#endif
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include "fio.h" // Private header
+
+//-----------------------------------------------------------------------------
+// File data structures
+
+#ifdef CYGPKG_KERNEL
+// Mutex for controlling access to file desriptor arrays
+Cyg_Mutex fdlock CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO_FS);
+
+// Array of per-file mutexes
+static Cyg_Mutex file_lock[CYGNUM_FILEIO_NFILE] \
+ CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO_FS);
+#endif // ifdef CYGPKG_KERNEL
+
+// Array of open file objects
+static cyg_file file[CYGNUM_FILEIO_NFILE];
+
+// Descriptor array
+static cyg_file *desc[CYGNUM_FILEIO_NFD];
+
+#define FD_ALLOCATED ((cyg_file *)1)
+
+//==========================================================================
+// Initialization
+
+__externC void cyg_fd_init()
+{
+ int i;
+
+ for( i = 0; i < CYGNUM_FILEIO_NFILE; i++ )
+ file[i].f_flag = 0;
+
+ for( i = 0; i < CYGNUM_FILEIO_NFD; i++ )
+ desc[i] = NULL;
+}
+
+//==========================================================================
+// File object allocation
+
+//--------------------------------------------------------------------------
+// Locate and allocate a free file object.
+
+__externC cyg_file *cyg_file_alloc()
+{
+ int i;
+ cyg_file *fp = NULL;
+
+ FILEIO_MUTEX_LOCK(fdlock);
+
+ for( i = 0; i < CYGNUM_FILEIO_NFILE; i++ )
+ {
+ if( (file[i].f_flag & CYG_FALLOC) == 0 )
+ {
+ fp = &file[i];
+ fp->f_flag = CYG_FALLOC;
+ fp->f_ucount = 0;
+ break;
+ }
+ }
+
+ FILEIO_MUTEX_UNLOCK(fdlock);
+
+ return fp;
+}
+
+//--------------------------------------------------------------------------
+// Free a file object. This is a straightforward freeing, usually used
+// during error recovery. File objects are normally freed as a side
+// effect of cyg_fd_assign() or cyg_fd_free().
+
+__externC void cyg_file_free(cyg_file * fp)
+{
+ FILEIO_MUTEX_LOCK(fdlock);
+
+ fp->f_flag = 0;
+
+ FILEIO_MUTEX_UNLOCK(fdlock);
+}
+
+//==========================================================================
+// Internal routines for handling descriptor deallocation
+// These must all be called with the fdlock already locked.
+
+//--------------------------------------------------------------------------
+// Decrement the use count on a file object and if it goes to zero,
+// close the file and deallocate the file object.
+
+static int fp_ucount_dec( cyg_file *fp )
+{
+ int error = 0;
+ if( (--fp->f_ucount) <= 0 )
+ {
+ cyg_file_lock( fp, fp->f_syncmode );
+
+ error = fp->f_ops->fo_close(fp);
+
+ cyg_file_unlock( fp, fp->f_syncmode );
+
+ if( error == 0 )
+ fp->f_flag = 0;
+ }
+
+ return error;
+}
+
+//--------------------------------------------------------------------------
+// Clear out a descriptor. If this is the last reference to the file
+// object, then that will be closed and deallocated.
+
+static int fd_close( int fd )
+{
+ int error = 0;
+ cyg_file *fp;
+
+ CYG_ASSERT(((0 <= fd) && (fd<CYGNUM_FILEIO_NFD)), "fd out of range");
+
+ fp = desc[fd];
+
+ if( fp != FD_ALLOCATED && fp != NULL)
+ {
+ // The descriptor is occupied, decrement its usecount and
+ // close the file if it goes zero.
+
+ error = fp_ucount_dec( fp );
+ }
+
+ desc[fd] = FD_ALLOCATED;
+
+ return error;
+}
+
+
+//==========================================================================
+// File descriptor allocation
+
+//--------------------------------------------------------------------------
+// Allocate a file descriptor. The allocated descriptor is set to the value
+// FD_ALLOCATED to prevent it being reallocated by another thread.
+
+__externC int cyg_fd_alloc(int low)
+{
+ int fd;
+
+ CYG_ASSERT(((0 <= low) && (low<CYGNUM_FILEIO_NFD)),"fd out of range");
+
+ FILEIO_MUTEX_LOCK(fdlock);
+
+ for( fd = low; fd < CYGNUM_FILEIO_NFD; fd++ )
+ {
+ if( desc[fd] == NULL )
+ {
+ desc[fd] = FD_ALLOCATED;
+ FILEIO_MUTEX_UNLOCK(fdlock);
+ return fd;
+ }
+ }
+
+ FILEIO_MUTEX_UNLOCK(fdlock);
+
+ return -1;
+}
+
+//--------------------------------------------------------------------------
+// Assign a file object to a descriptor. If the descriptor is already
+// occupied, the occupying files usecount is decrement and it may be
+// closed.
+
+__externC void cyg_fd_assign(int fd, cyg_file *fp)
+{
+
+ CYG_ASSERT(((0 <= fd) && (fd<CYGNUM_FILEIO_NFD)),"fd out of range");
+
+ FILEIO_MUTEX_LOCK(fdlock);
+
+ fd_close( fd );
+
+ fp->f_ucount++;
+ desc[fd] = fp;
+
+ FILEIO_MUTEX_UNLOCK(fdlock);
+}
+
+//--------------------------------------------------------------------------
+// Free a descriptor. Any occupying files usecount is decremented and
+// it may be closed.
+
+__externC int cyg_fd_free(int fd)
+{
+ int error;
+
+ CYG_ASSERT(((0 <= fd) && (fd<CYGNUM_FILEIO_NFD)),"fd out of range");
+
+ FILEIO_MUTEX_LOCK(fdlock);
+
+ error = fd_close( fd );
+
+ desc[fd] = NULL;
+
+ FILEIO_MUTEX_UNLOCK(fdlock);
+
+ return error;
+}
+
+//==========================================================================
+// Descriptor to file object mapping
+
+
+//--------------------------------------------------------------------------
+// Map a descriptor to a file object. This is just a straightforward index
+// into the descriptor array complicated by the need to lock the mutex and
+// increment the usecount.
+
+__externC cyg_file *cyg_fp_get( int fd )
+{
+ CYG_ASSERT(((0 <= fd) && (fd<CYGNUM_FILEIO_NFD)),"fd out of range");
+
+ FILEIO_MUTEX_LOCK(fdlock);
+
+ cyg_file *fp = desc[fd];
+
+ if( fp != FD_ALLOCATED && fp != NULL)
+ {
+ // Increment use count while we work on this file
+
+ fp->f_ucount++;
+ }
+ else fp = NULL;
+
+ FILEIO_MUTEX_UNLOCK(fdlock);
+
+ return fp;
+}
+
+//--------------------------------------------------------------------------
+// Free the usecount reference we acquired in cyg_fp_get(). If the usecount
+// is zeroed, the file will be closed.
+
+__externC void cyg_fp_free( cyg_file *fp )
+{
+ FILEIO_MUTEX_LOCK(fdlock);
+
+ fp_ucount_dec( fp );
+
+ FILEIO_MUTEX_UNLOCK(fdlock);
+}
+
+//==========================================================================
+// File locking protocol
+
+void cyg_file_lock( cyg_file *fp , cyg_uint32 syncmode )
+{
+ cyg_fs_lock( fp->f_mte, syncmode>>CYG_SYNCMODE_IO_SHIFT);
+
+ if( syncmode & CYG_SYNCMODE_IO_FILE )
+ {
+ fp->f_flag |= CYG_FLOCKED;
+ FILEIO_MUTEX_LOCK(file_lock[fp-&file[0]]);
+ }
+}
+
+void cyg_file_unlock( cyg_file *fp, cyg_uint32 syncmode )
+{
+ cyg_fs_unlock( fp->f_mte, syncmode>>CYG_SYNCMODE_IO_SHIFT);
+
+ if( syncmode & CYG_SYNCMODE_IO_FILE )
+ {
+ fp->f_flag &= ~CYG_FLOCKED;
+ FILEIO_MUTEX_UNLOCK(file_lock[fp-&file[0]]);
+ }
+}
+
+
+//==========================================================================
+// POSIX API routines
+
+//--------------------------------------------------------------------------
+// dup() - duplicate an FD into a random descriptor
+
+__externC int dup( int fd )
+{
+ cyg_file *fp = cyg_fp_get( fd );
+
+ if( fp == NULL )
+ {
+ errno = EBADF;
+ return -1;
+ }
+
+ int fd2 = cyg_fd_alloc(0);
+
+ if( fd2 == -1 )
+ {
+ errno = EMFILE;
+ return -1;
+ }
+
+ cyg_fd_assign( fd2, fp );
+
+ cyg_fp_free(fp);
+
+ return fd2;
+}
+
+//--------------------------------------------------------------------------
+// dup2() - duplicate an FD into a chosen descriptor
+
+__externC int dup2( int fd, int fd2 )
+{
+ if( fd2 == fd ) return fd2;
+
+ if( fd2 < 0 || fd2 >= OPEN_MAX )
+ {
+ errno = EBADF;
+ return -1;
+ }
+
+ cyg_file *fp = cyg_fp_get( fd );
+
+ if( fp == NULL )
+ {
+ errno = EBADF;
+ return -1;
+ }
+
+ cyg_fd_assign( fd2, fp );
+
+ cyg_fp_free(fp);
+
+ return fd2;
+}
+
+// -------------------------------------------------------------------------
+// EOF fd.cxx
diff --git a/cesar/ecos/packages/io/fileio/current/src/file.cxx b/cesar/ecos/packages/io/fileio/current/src/file.cxx
new file mode 100644
index 0000000000..11e0049bad
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/src/file.cxx
@@ -0,0 +1,906 @@
+//==========================================================================
+//
+// file.cxx
+//
+// Fileio file operations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-05-25
+// Purpose: Fileio file operations
+// Description: These are the functions that operate on files as a whole,
+// such as open(), creat(), mkdir() etc.
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/io_fileio.h>
+#include <pkgconf/isoinfra.h>
+
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <string.h> // string functions
+#include <dirent.h>
+#include <stdio.h> // stdin, stdout, stderr
+
+#include "fio.h" // Private header
+
+//==========================================================================
+// Implement filesystem locking protocol.
+
+#define LOCK_FS( _mte_ ) { \
+ CYG_ASSERT(_mte_ != NULL, "Bad mount table entry"); \
+ CYG_ASSERT(_mte_->fs != NULL, "Bad mount filesystem entry"); \
+ cyg_fs_lock( _mte_, (_mte_)->fs->syncmode); \
+}
+
+#define UNLOCK_FS( _mte_ ) cyg_fs_unlock( _mte_, (_mte_)->fs->syncmode)
+
+//==========================================================================
+// A local strcpy clone that returns a pointer to the end of the copied
+// string, not the beginning.
+
+static char *my_strcpy( char *s1, const char *s2 )
+{
+ while( (*s1++ = *s2++) != 0);
+ return s1-1;
+}
+
+//==========================================================================
+// Compare a pathname fragment with an element in a pathname. This
+// deals with zero or separator termination and avoids substring
+// matches.
+
+static int pathcmp( const char *path, const char *name )
+{
+ while( *path == *name && *path != '\0' )
+ path++, name++;
+ if( *name != '\0' ) return false;
+ if( *path == '/' || *path == '\0' ) return true;
+ return false;
+}
+
+//==========================================================================
+// CWD support
+
+#ifdef CYGPKG_IO_FILEIO_TRACK_CWD
+
+// buffer for storing CWD path
+static char cwd[PATH_MAX];
+static size_t cwd_size = 0;
+
+
+static void update_cwd( cyg_mtab_entry *mte, cyg_dir dir, const char *path )
+{
+ char *p = cwd;
+
+ if( mte != cyg_cdir_mtab_entry || dir != cyg_cdir_dir )
+ {
+ // Here, the path is relative to the root of the filesystem,
+ // or in a totally new filesystem, initialize the cwd with the
+ // mount point name of the filesystem.
+
+ p = my_strcpy( p, mte->name );
+ }
+ else p = cwd+cwd_size;
+
+ // We must now copy the path into the cwd buffer while dealing
+ // with any "." and ".." components textually.
+
+ while( *path != '\0' )
+ {
+ // skip any stray directory separators.
+ if( *path == '/' ) path++;
+
+ // Look for a "." entry and just ignore it.
+ if( pathcmp( path, "." ) )
+ {
+ path++;
+ continue;
+ }
+
+ // Look for a ".." entry. If found, chew off the last cwd
+ // entry.
+ if( pathcmp( path, ".." ) )
+ {
+ while( *(--p) != '/' ); // back up to last '/'
+ path += 2; // skip "..".
+ continue;
+ }
+
+ // Otherwise just copy the name fragment over to the cwd.
+
+ if( *(p-1) != '/' )
+ *p++ = '/'; // add a directory separator
+ while( *path != '/' && *path != '\0' )
+ *p++ = *path++;
+
+ }
+
+ // Zero terminate the cwd.
+ *p = '\0';
+
+ // update size
+ cwd_size = p-cwd;
+}
+
+#else
+
+#ifdef CYGPKG_KERNEL
+static Cyg_Mutex getcwd_lock CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO_FS);
+#endif
+
+#endif
+
+
+//==========================================================================
+// Open a file
+
+__externC int open( const char *path, int oflag, ... )
+{
+ FILEIO_ENTRY();
+
+ // we want to be sure we pull in stdin/out/err, so they can be
+ // assigned to fds 0, 1 and 2
+#ifdef CYGINT_ISO_STDIO_STREAMS
+ CYG_REFERENCE_OBJECT(stdin);
+ CYG_REFERENCE_OBJECT(stdout);
+ CYG_REFERENCE_OBJECT(stderr);
+#endif
+
+ CYG_CANCELLATION_POINT;
+
+ int ret = 0;
+ int fd;
+ cyg_file *file;
+ cyg_mtab_entry *mte = cyg_cdir_mtab_entry;
+ cyg_dir dir = cyg_cdir_dir;
+ const char *name = path;
+
+ // At least one of O_RDONLY, O_WRONLY, O_RDWR must be provided
+ if( (oflag & O_RDWR) == 0 )
+ FILEIO_RETURN(EINVAL);
+
+ fd = cyg_fd_alloc(0);
+
+ if( fd < 0 )
+ FILEIO_RETURN(EMFILE);
+
+ file = cyg_file_alloc();
+
+ if( file == NULL )
+ {
+ cyg_fd_free(fd);
+ FILEIO_RETURN(ENFILE);
+ }
+
+ ret = cyg_mtab_lookup( &dir, &name, &mte );
+
+ if( 0 != ret )
+ {
+ cyg_fd_free(fd);
+ cyg_file_free(file);
+ FILEIO_RETURN(ENOENT);
+ }
+
+ LOCK_FS( mte );
+
+ ret = mte->fs->open( mte, dir, name, oflag, file );
+
+ UNLOCK_FS( mte );
+
+ if( 0 != ret )
+ {
+ cyg_fd_free(fd);
+ cyg_file_free(file);
+ FILEIO_RETURN(ret);
+ }
+
+ file->f_mte = mte;
+ file->f_syncmode = mte->fs->syncmode;
+
+ cyg_fd_assign( fd, file );
+
+ FILEIO_RETURN_VALUE(fd);
+}
+
+//==========================================================================
+// create a file
+
+__externC int creat( const char *path, mode_t mode )
+{
+ return open( path, O_WRONLY | O_CREAT | O_TRUNC, mode );
+}
+
+
+//==========================================================================
+// Unlink/remove a file
+
+__externC int unlink( const char *path )
+{
+ FILEIO_ENTRY();
+
+ int ret = 0;
+ cyg_mtab_entry *mte = cyg_cdir_mtab_entry;
+ cyg_dir dir = cyg_cdir_dir;
+ const char *name = path;
+
+ ret = cyg_mtab_lookup( &dir, &name, &mte );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ENOENT);
+
+ LOCK_FS( mte );
+
+ ret = mte->fs->unlink( mte, dir, name );
+
+ UNLOCK_FS( mte );
+
+ FILEIO_RETURN(ret);
+}
+
+//==========================================================================
+// Make a directory
+
+__externC int mkdir( const char *path, mode_t mode )
+{
+ FILEIO_ENTRY();
+
+ int ret = 0;
+ cyg_mtab_entry *mte = cyg_cdir_mtab_entry;
+ cyg_dir dir = cyg_cdir_dir;
+ const char *name = path;
+
+ mode=mode;
+
+ ret = cyg_mtab_lookup( &dir, &name, &mte );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ENOENT);
+
+ LOCK_FS( mte );
+
+ ret = mte->fs->mkdir( mte, dir, name );
+
+ UNLOCK_FS( mte );
+
+ FILEIO_RETURN(ret);
+}
+
+//==========================================================================
+// Remove a directory
+
+__externC int rmdir( const char *path )
+{
+ FILEIO_ENTRY();
+
+ int ret = 0;
+ cyg_mtab_entry *mte = cyg_cdir_mtab_entry;
+ cyg_dir dir = cyg_cdir_dir;
+ const char *name = path;
+
+ ret = cyg_mtab_lookup( &dir, &name, &mte );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ENOENT);
+
+ LOCK_FS( mte );
+
+ ret = mte->fs->rmdir( mte, dir, name );
+
+ UNLOCK_FS( mte );
+
+ FILEIO_RETURN(ret);
+}
+
+//==========================================================================
+// Rename a file
+
+__externC int rename( const char *path1, const char *path2 ) __THROW
+{
+ FILEIO_ENTRY();
+
+ int ret = 0;
+ cyg_mtab_entry *mte1 = cyg_cdir_mtab_entry;
+ cyg_mtab_entry *mte2 = cyg_cdir_mtab_entry;
+ cyg_dir dir1 = cyg_cdir_dir;
+ cyg_dir dir2 = cyg_cdir_dir;
+ const char *name1 = path1;
+ const char *name2 = path2;
+
+ ret = cyg_mtab_lookup( &dir1, &name1, &mte1 );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ENOENT);
+
+ ret = cyg_mtab_lookup( &dir2, &name2, &mte2 );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ENOENT);
+
+ // Cannot rename between different filesystems
+ if( mte1 != mte2 )
+ FILEIO_RETURN(EXDEV);
+
+ LOCK_FS( mte1 );
+
+ ret = mte1->fs->rename( mte1, dir1, name1, dir2, name2 );
+
+ UNLOCK_FS( mte1 );
+
+ FILEIO_RETURN(ret);
+}
+
+//==========================================================================
+// Create a link from an existing file (path1) to a new one (path2)
+
+__externC int link( const char *path1, const char *path2 )
+{
+ FILEIO_ENTRY();
+
+ int ret = 0;
+ cyg_mtab_entry *mte1 = cyg_cdir_mtab_entry;
+ cyg_mtab_entry *mte2 = cyg_cdir_mtab_entry;
+ cyg_dir dir1 = cyg_cdir_dir;
+ cyg_dir dir2 = cyg_cdir_dir;
+ const char *name1 = path1;
+ const char *name2 = path2;
+
+ ret = cyg_mtab_lookup( &dir1, &name1, &mte1 );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ENOENT);
+
+ ret = cyg_mtab_lookup( &dir2, &name2, &mte2 );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ENOENT);
+
+ // Cannot hard-link between different filesystems
+ if( mte1 != mte2 )
+ FILEIO_RETURN(EXDEV);
+
+ LOCK_FS( mte1 );
+
+ ret = mte1->fs->link( mte1, dir1, name1, dir2, name2, CYG_FSLINK_HARD );
+
+ UNLOCK_FS( mte1 );
+
+ FILEIO_RETURN(ret);
+}
+
+//==========================================================================
+// Change current directory
+
+__externC int chdir( const char *path )
+{
+ FILEIO_ENTRY();
+
+ int ret = 0;
+ cyg_mtab_entry *mte = cyg_cdir_mtab_entry;
+ cyg_dir dir = cyg_cdir_dir;
+ cyg_dir newdir;
+ const char *name = path;
+
+ ret = cyg_mtab_lookup( &dir, &name, &mte );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ENOENT);
+
+ LOCK_FS(mte);
+
+ ret = mte->fs->chdir( mte, dir, name, &newdir );
+
+ UNLOCK_FS(mte);
+
+ if( 0 != ret )
+ FILEIO_RETURN(ret);
+
+#ifdef CYGPKG_IO_FILEIO_TRACK_CWD
+ update_cwd( mte, dir, name );
+#endif
+
+ if( cyg_cdir_mtab_entry != NULL && cyg_cdir_dir != CYG_DIR_NULL )
+ {
+ // Now detach from current cyg_cdir. We call the current directory's
+ // chdir routine with a NULL dir_out pointer.
+
+ LOCK_FS(cyg_cdir_mtab_entry);
+
+ ret = cyg_cdir_mtab_entry->fs->chdir( cyg_cdir_mtab_entry, cyg_cdir_dir, NULL, NULL );
+
+ UNLOCK_FS(cyg_cdir_mtab_entry);
+
+ // We really shouldn't get an error here.
+ if( 0 != ret )
+ FILEIO_RETURN(ret);
+ }
+
+ cyg_cdir_mtab_entry = mte;
+ cyg_cdir_dir = newdir;
+
+ FILEIO_RETURN(ENOERR);
+}
+
+//==========================================================================
+// Get file statistics
+
+__externC int stat( const char *path, struct stat *buf )
+{
+ FILEIO_ENTRY();
+
+ int ret = 0;
+ cyg_mtab_entry *mte = cyg_cdir_mtab_entry;
+ cyg_dir dir = cyg_cdir_dir;
+ const char *name = path;
+
+ ret = cyg_mtab_lookup( &dir, &name, &mte );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ENOENT);
+
+ LOCK_FS( mte );
+
+ ret = mte->fs->stat( mte, dir, name, buf );
+
+ UNLOCK_FS( mte );
+
+ FILEIO_RETURN(ret);
+}
+
+//==========================================================================
+// Get file configurable pathname variables
+
+__externC long pathconf( const char *path, int vname )
+{
+ FILEIO_ENTRY();
+
+ int ret = 0;
+ cyg_mtab_entry *mte = cyg_cdir_mtab_entry;
+ cyg_dir dir = cyg_cdir_dir;
+ const char *name = path;
+
+ ret = cyg_mtab_lookup( &dir, &name, &mte );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ENOENT);
+
+ struct cyg_pathconf_info info;
+
+ info.name = vname;
+ info.value = 0;
+
+ LOCK_FS( mte );
+
+ ret = mte->fs->getinfo( mte, dir, name,
+ FS_INFO_CONF, (char *)&info, sizeof(info) );
+
+ UNLOCK_FS( mte );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ret);
+
+ FILEIO_RETURN_VALUE(info.value);
+}
+
+//==========================================================================
+// Sync filesystem without unmounting
+
+__externC int cyg_fs_fssync( const char *path )
+{
+ FILEIO_ENTRY();
+
+ int ret = 0;
+ cyg_mtab_entry *mte = cyg_cdir_mtab_entry;
+ cyg_dir dir = cyg_cdir_dir;
+ const char *name = path;
+
+ ret = cyg_mtab_lookup( &dir, &name, &mte );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ENOENT);
+
+ LOCK_FS( mte );
+
+ ret = mte->fs->setinfo( mte, dir, name, FS_INFO_SYNC, NULL, 0 );
+
+ UNLOCK_FS( mte );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ret);
+
+ FILEIO_RETURN_VALUE(ENOERR);
+}
+
+//==========================================================================
+// Set file attributes
+
+__externC int cyg_fs_set_attrib( const char *fname,
+ const cyg_fs_attrib_t new_attrib )
+{
+ FILEIO_ENTRY();
+
+ int ret = 0;
+ cyg_mtab_entry *mte = cyg_cdir_mtab_entry;
+ cyg_dir dir = cyg_cdir_dir;
+ const char *name = fname;
+
+ ret = cyg_mtab_lookup( &dir, &name, &mte );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ENOENT);
+
+ LOCK_FS( mte );
+
+ ret = mte->fs->setinfo( mte, dir, name,
+ FS_INFO_ATTRIB,
+ (char *)&new_attrib, sizeof(new_attrib) );
+
+ UNLOCK_FS( mte );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ret);
+
+ FILEIO_RETURN(ENOERR);
+}
+
+//==========================================================================
+// Get file attributes
+
+__externC int cyg_fs_get_attrib( const char *fname,
+ cyg_fs_attrib_t * const file_attrib )
+{
+ FILEIO_ENTRY();
+
+ int ret = 0;
+ cyg_mtab_entry *mte = cyg_cdir_mtab_entry;
+ cyg_dir dir = cyg_cdir_dir;
+ const char *name = fname;
+
+ ret = cyg_mtab_lookup( &dir, &name, &mte );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ENOENT);
+
+ LOCK_FS( mte );
+
+ ret = mte->fs->getinfo( mte, dir, name,
+ FS_INFO_ATTRIB,
+ (char *)file_attrib, sizeof(*file_attrib) );
+
+ UNLOCK_FS( mte );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ret);
+
+ FILEIO_RETURN(ENOERR);
+}
+
+//==========================================================================
+// Access() function.
+// This simply piggybacks onto stat().
+
+extern int access(const char *path, int amode)
+{
+ FILEIO_ENTRY();
+
+ int ret;
+ struct stat buf;
+
+ ret = stat( path, &buf );
+
+ // Translate not found into EACCES if the F_OK bit is
+ // set.
+ if( (amode & F_OK) && (ret < 0) && (errno == ENOENT) )
+ FILEIO_RETURN(EACCES);
+
+ // All other errors go straight back to the user.
+ if( ret < 0 )
+ FILEIO_RETURN_VALUE(ret);
+
+ // At present we do not have any access modes, so there is nothing
+ // to test. Just return success for all access modes.
+
+ FILEIO_RETURN(ENOERR);
+}
+
+//==========================================================================
+// getcwd()
+
+__externC char *getcwd( char *buf, size_t size )
+{
+ FILEIO_ENTRY();
+
+ int err = ENOERR;
+ cyg_mtab_entry *mte = cyg_cdir_mtab_entry;
+ cyg_dir dir = cyg_cdir_dir;
+ cyg_getcwd_info info;
+
+ if( size == 0 )
+ {
+ errno = EINVAL;
+ FILEIO_RETURN_VALUE(NULL);
+ }
+
+ info.buf = buf;
+ info.size = size;
+
+ LOCK_FS( mte );
+
+ err = mte->fs->getinfo( mte, dir, "",
+ FS_INFO_GETCWD, (char *)&info, sizeof(info) );
+
+ UNLOCK_FS( mte );
+
+ if( err == ENOERR )
+ FILEIO_RETURN_VALUE(buf);
+
+ // Attempting to use filesystem support for getcwd() has
+ // failed.
+
+#ifdef CYGPKG_IO_FILEIO_TRACK_CWD
+
+ // If this option is set, the current directory path has been
+ // tracked in chdir(). Just report that value here.
+
+ if( size < cwd_size+1 )
+ {
+ errno = ERANGE;
+ FILEIO_RETURN_VALUE(NULL);
+ }
+
+ char *p = my_strcpy( buf, cwd );
+ *p = '\0';
+
+#else
+
+ // As a fallback we try to use ".." entries in the directory tree
+ // to climb back up to the root. Because we cannot assume that
+ // any filesystem can handle more than one directory pointer we
+ // have to do the climbing textually, by manufacturing a path name
+ // consisting of ".."s. At each level we then scan the parent
+ // directory looking for the entry for the lower level directory
+ // by matching st_ino values. This is not guaranteed to work at
+ // all since there is no requirement on filesystems to support "."
+ // and "..", or for them to report distinct inode values in
+ // stat().
+
+ static char ddbuf[PATH_MAX];
+ char *p = buf+size-1;
+ int ddbufpos;
+
+ // Claim lock to serialize use of ddbuf.
+ FILEIO_MUTEX_LOCK(getcwd_lock);
+
+ // Initialize ddbuf with ".".
+ ddbuf[0] = '.';
+ ddbuf[1] = '\0';
+ ddbufpos = 1;
+
+ // Start result buffer with a zero terminator. We accumulate the
+ // path name in the top end of the result buffer.
+ *p = '\0';
+
+ for(;;)
+ {
+ struct stat sdbuf;
+ struct stat sddbuf;
+
+ // Get status for "." and "..". If the filesystem does not
+ // support these, then this whole function will fail here.
+
+ err = stat( ddbuf, &sdbuf );
+ if( err < 0 ) break;
+
+ ddbuf[ddbufpos++] = '/';
+ ddbuf[ddbufpos++] = '.';
+ ddbuf[ddbufpos++] = '.';
+ ddbuf[ddbufpos] = '\0';
+
+ err = stat( ddbuf, &sddbuf );
+ if( err < 0 ) break;
+
+ // See whether we are at the root. This will be true when
+ // the inode numbers of "." and ".." are the same.
+ if( sdbuf.st_ino == sddbuf.st_ino )
+ break;
+
+ // We now need to find an entry in the ".." directory that
+ // matches the inode number of ".".
+
+ struct dirent de;
+ DIR *d = opendir( ddbuf );
+ if( d == NULL )
+ {
+ err = -1;
+ break;
+ }
+
+ for(;;)
+ {
+ struct dirent *res;
+ struct stat objstat;
+ int i;
+
+ err = readdir_r( d, &de, &res );
+ if( err < 0 || res == NULL ) break;
+
+ // Skip "." and ".." entries.
+ if( pathcmp( de.d_name, "." ) || pathcmp( de.d_name, ".." ) )
+ continue;
+
+ // Tack the name of the directory entry on to the ddbuf
+ // and stat the object.
+
+ ddbuf[ddbufpos] = '/';
+ for( i = 0; de.d_name[i] != '\0'; i++ )
+ ddbuf[ddbufpos+i+1] = de.d_name[i];
+ ddbuf[ddbufpos+i+1] = '\0';
+
+ // Take a look at it
+ err = stat( ddbuf, &objstat );
+ if( err < 0 ) break;
+
+ // Cast out directories
+ if( !S_ISDIR(objstat.st_mode) )
+ continue;
+
+ // We have a directory. Compare its inode with that of "."
+ // and if they are the same, we have found our entry.
+
+ if( sdbuf.st_ino == objstat.st_ino )
+ break;
+ }
+
+ ddbuf[ddbufpos] = '\0'; // reterminate ddbuf
+
+ closedir( d );
+
+ // Halt on any errors.
+ if( err < 0 )
+ break;
+
+ // Here de contains the name of the directory entry in ".."
+ // that has the same inode as ".". Add the name to the path we
+ // are accumulating in the buffer.
+
+ char *q = de.d_name;
+ while( *q != '\0' ) q++; // skip to end of name
+
+ do
+ {
+ *--p = *--q;
+ } while( q != de.d_name );
+
+ *--p = '/'; // add a separator
+ }
+
+ // We have finished using ddbuf now.
+ FILEIO_MUTEX_UNLOCK(getcwd_lock);
+
+ if( err < 0 )
+ FILEIO_RETURN_VALUE(NULL);
+
+ // We have the directory path in the top end of the buffer. Add
+ // the mount point name at the beginning and copy the rest of the
+ // name down.
+
+ char *bp = buf;
+
+ bp = my_strcpy( bp, mte->name );
+
+ // Sort out the separators between the mount name and the
+ // pathname. This is a bit messy since we have to deal with mount
+ // names of both "/" and "/foo" and pathnames that start with '/'
+ // or are empty.
+ if( *(bp-1) != '/' && *p != '\0' ) *bp++ = '/';
+ if( *p == '/' ) p++;
+
+ // Now copy the path over.
+ while( *p )
+ *bp++ = *p++;
+
+ *bp = '\0'; // Terminate the string
+
+ // All done!
+
+#endif
+
+ FILEIO_RETURN_VALUE(buf);
+}
+
+//==========================================================================
+// FS get info.
+
+__externC int cyg_fs_getinfo( const char *path, int key, void *buf, int len )
+{
+ FILEIO_ENTRY();
+
+ int ret = 0;
+ cyg_mtab_entry *mte = cyg_cdir_mtab_entry;
+ cyg_dir dir = cyg_cdir_dir;
+ const char *name = path;
+
+ ret = cyg_mtab_lookup( &dir, &name, &mte );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ENOENT);
+
+ LOCK_FS( mte );
+
+ ret = mte->fs->getinfo( mte, dir, name, key, buf, len );
+
+ UNLOCK_FS( mte );
+
+ FILEIO_RETURN(ret);
+}
+
+//==========================================================================
+// FS set info.
+
+__externC int cyg_fs_setinfo( const char *path, int key, void *buf, int len )
+{
+ FILEIO_ENTRY();
+
+ int ret = 0;
+ cyg_mtab_entry *mte = cyg_cdir_mtab_entry;
+ cyg_dir dir = cyg_cdir_dir;
+ const char *name = path;
+
+ ret = cyg_mtab_lookup( &dir, &name, &mte );
+
+ if( 0 != ret )
+ FILEIO_RETURN(ENOENT);
+
+ LOCK_FS( mte );
+
+ ret = mte->fs->setinfo( mte, dir, name, key, buf, len );
+
+ UNLOCK_FS( mte );
+
+ FILEIO_RETURN(ret);
+}
+
+// -------------------------------------------------------------------------
+// EOF file.cxx
diff --git a/cesar/ecos/packages/io/fileio/current/src/fio.h b/cesar/ecos/packages/io/fileio/current/src/fio.h
new file mode 100644
index 0000000000..ee4bdb506b
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/src/fio.h
@@ -0,0 +1,232 @@
+#ifndef CYGONCE_FIO_H
+#define CYGONCE_FIO_H
+//=============================================================================
+//
+// fio.h
+//
+// Fileio private header
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Nick Garnett
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-05-25
+// Purpose: Fileio private header
+// Description: This file contains private definitions for communication
+// between the parts of the fileio package.
+//
+// Usage:
+// #include "fio.h"
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/io_fileio.h>
+#include <pkgconf/isoinfra.h>
+
+#include <cyg/infra/cyg_type.h>
+
+#include <stddef.h> // NULL, size_t
+#include <unistd.h>
+#include <limits.h>
+#include <sys/types.h>
+
+#include <cyg/fileio/fileio.h>
+#include <cyg/fileio/sockio.h>
+
+#include <errno.h>
+
+#ifdef CYGPKG_KERNEL
+#include <pkgconf/kernel.h>
+#include <cyg/kernel/mutex.hxx> // mutex definitions
+
+#define FILEIO_MUTEX_LOCK(_m_) ((_m_).lock())
+#define FILEIO_MUTEX_UNLOCK(_m_) ((_m_).unlock())
+
+#else
+#define FILEIO_MUTEX_LOCK(_m_)
+#define FILEIO_MUTEX_UNLOCK(_m_)
+#endif
+
+
+//=============================================================================
+// POSIX API support
+
+#ifdef CYGPKG_POSIX
+#include <pkgconf/posix.h>
+#include <cyg/posix/export.h>
+
+#define CYG_FILEIO_FUNCTION_START() CYG_POSIX_FUNCTION_START()
+
+#define CYG_FILEIO_FUNCTION_FINISH() CYG_POSIX_FUNCTION_FINISH()
+
+#else
+
+#define CYG_FILEIO_FUNCTION_START() CYG_EMPTY_STATEMENT
+
+#define CYG_FILEIO_FUNCTION_FINISH() CYG_EMPTY_STATEMENT
+
+#endif
+
+#ifdef CYGPKG_POSIX_SIGNALS
+
+#define CYG_FILEIO_SIGMASK_SET( __set, __oset ) \
+ CYG_PTHREAD_SIGMASK_SET( __set, __oset )
+
+#define CYG_FILEIO_SIGPENDING() CYG_POSIX_SIGPENDING()
+
+#define CYG_FILEIO_DELIVER_SIGNALS( __mask ) \
+ CYG_POSIX_DELIVER_SIGNALS( __mask )
+
+#else
+
+#define CYG_FILEIO_SIGMASK_SET( __set, __oset ) \
+CYG_MACRO_START \
+CYG_UNUSED_PARAM( const sigset_t*, __set ); \
+CYG_UNUSED_PARAM( const sigset_t*, __oset ); \
+CYG_MACRO_END
+
+#define CYG_FILEIO_SIGPENDING() (0)
+
+#define CYG_FILEIO_DELIVER_SIGNALS( __mask ) CYG_UNUSED_PARAM( const sigset_t*, __mask )
+
+typedef int sigset_t;
+
+#endif
+
+//=============================================================================
+// Fileio function entry and return macros.
+
+// Handle entry to a fileio package function.
+#define FILEIO_ENTRY() \
+ CYG_REPORT_FUNCTYPE( "returning %d" ); \
+ CYG_FILEIO_FUNCTION_START(); \
+
+// Do a fileio package defined return. This requires the error code
+// to be placed in errno, and if it is non-zero, -1 returned as the
+// result of the function. This also gives us a place to put any
+// generic tidyup handling needed for things like signal delivery and
+// cancellation.
+#define FILEIO_RETURN(err) \
+CYG_MACRO_START \
+ int __retval = 0; \
+ CYG_FILEIO_FUNCTION_FINISH(); \
+ if( err != 0 ) __retval = -1, errno = err; \
+ CYG_REPORT_RETVAL( __retval ); \
+ return __retval; \
+CYG_MACRO_END
+
+#define FILEIO_RETURN_VALUE(val) \
+CYG_MACRO_START \
+ CYG_FILEIO_FUNCTION_FINISH(); \
+ CYG_REPORT_RETVAL( val ); \
+ return val; \
+CYG_MACRO_END
+
+#define FILEIO_RETURN_VOID() \
+CYG_MACRO_START \
+ CYG_FILEIO_FUNCTION_FINISH(); \
+ CYG_REPORT_RETURN(); \
+ return; \
+CYG_MACRO_END
+
+//=============================================================================
+// Cancellation support
+// If the POSIX package is present we want to include cancellation points
+// in the routines that are defined to contain them.
+// The macro CYG_CANCELLATION_POINT does this.
+
+#ifdef CYGINT_ISO_PTHREAD_IMPL
+
+# include <pthread.h>
+
+# define CYG_CANCELLATION_POINT pthread_testcancel()
+
+#else
+
+# define CYG_CANCELLATION_POINT CYG_EMPTY_STATEMENT
+
+#endif
+
+//=============================================================================
+// Internal exports
+
+//-----------------------------------------------------------------------------
+// Exports from misc.cxx
+
+// Current directory info
+__externC cyg_mtab_entry *cyg_cdir_mtab_entry;
+__externC cyg_dir cyg_cdir_dir;
+
+__externC int cyg_mtab_lookup( cyg_dir *dir, const char **name, cyg_mtab_entry **mte);
+
+//-----------------------------------------------------------------------------
+// Exports from fd.cxx
+
+__externC void cyg_fd_init();
+
+__externC cyg_file *cyg_file_alloc();
+
+__externC void cyg_file_free(cyg_file * fp);
+
+__externC int cyg_fd_alloc(int low);
+
+__externC void cyg_fd_assign(int fd, cyg_file *fp);
+
+__externC int cyg_fd_free(int fd);
+
+__externC cyg_file *cyg_fp_get( int fd );
+
+__externC void cyg_fp_free( cyg_file *fp );
+
+__externC void cyg_file_lock( cyg_file *fp, cyg_uint32 syncmode );
+
+__externC void cyg_file_unlock( cyg_file *fp, cyg_uint32 syncmode );
+
+//-----------------------------------------------------------------------------
+// Exports from socket.cxx
+
+__externC void cyg_nstab_init();
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_FIO_H
+// End of fio.h
diff --git a/cesar/ecos/packages/io/fileio/current/src/inocache.cxx b/cesar/ecos/packages/io/fileio/current/src/inocache.cxx
new file mode 100644
index 0000000000..38f754bed8
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/src/inocache.cxx
@@ -0,0 +1,216 @@
+//=============================================================================
+//
+// inocache.cxx
+//
+// Implementation of inode cache
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2002-01-18
+// Purpose:
+// Description:
+// Usage:
+// #include <cyg/fileio/inode.h>
+// ...
+//
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/system.h>
+#include <cyg/infra/cyg_type.h>
+#include <stdlib.h>
+#include <cyg/fileio/inode.h>
+
+#ifdef CYGPKG_KERNEL
+# include <pkgconf/kernel.h>
+# include <cyg/kernel/mutex.hxx>
+# if 0
+# define LOCK_ICACHE(_ic_) \
+ CYG_MACRO_START \
+ (_ic_)->icmutex.lock(); \
+ CYG_MACRO_END
+
+# define UNLOCK_ICACHE(_ic_) \
+ CYG_MACRO_START \
+ (_ic_)->icmutex.unlock(); \
+ CYG_MACRO_END
+# define LOCK_INO(_ic_,_ino_) \
+ CYG_MACRO_START \
+ (_ic_)->icmutex.lock(); \
+ CYG_MACRO_END
+# define UNLOCK_INO(_ic_,_ino_) \
+ CYG_MACRO_START \
+ (_ic_)->icmutex.unlock(); \
+ CYG_MACRO_END
+# endif
+#endif
+
+# define LOCK_ICACHE(_ic_) CYG_EMPTY_STATEMENT
+# define UNLOCK_ICACHE(_ic_) CYG_EMPTY_STATEMENT
+# define LOCK_INO(_ic_,_ino_) CYG_EMPTY_STATEMENT
+# define UNLOCK_INO(_ic_,_ino_) CYG_EMPTY_STATEMENT
+
+// Tried to make this implementation use tables, but the requirement to
+// allow for extra space makes this difficult
+
+__externC void
+cyg_inodecache_destroy( cyg_inodecache *ic )
+{
+ cyg_inode *tmp;
+ for ( tmp=ic->head; tmp != NULL; tmp=tmp->i_cache_next )
+ free(tmp);
+#if CYGNUM_IO_FILEIO_MAX_INODE_CACHE_DEAD > 0
+ for ( tmp=ic->freeable; tmp != NULL; tmp=tmp->i_cache_next )
+ free(tmp);
+#endif
+} // cyg_inodecache_destroy()
+
+static __inline__ void
+insert_in_list( cyg_inode **i, cyg_inode *ino )
+{
+ cyg_inode *here = *i;
+ if ( here == NULL ) {
+ ino->i_cache_prev = ino->i_cache_next = ino;
+ } else {
+ ino->i_cache_prev = here->i_cache_prev;
+ ino->i_cache_next = here;
+ here->i_cache_prev = ino;
+ ino->i_cache_prev->i_cache_next = ino;
+ }
+ // put at start, as this is more likely to come off sooner than later
+ *i = ino;
+}
+
+// Create an inode. Returns a negative error code on error.
+__externC cyg_inode *
+cyg_inode_create( cyg_inodecache *ic )
+{
+ cyg_inode *ni;
+
+ ni = (cyg_inode *)malloc( sizeof(cyg_inode)+ic->privatespace );
+ if ( !ni )
+ return ni;
+ ni->i_count = 1;
+
+ LOCK_ICACHE(ic);
+ insert_in_list( &ic->head, ni );
+ UNLOCK_ICACHE(ic);
+
+ return ni;
+} // cyg_inode_create()
+
+__externC cyg_inode *
+cyg_inode_get( cyg_inodecache *ic, cyg_uint32 ino )
+{
+ cyg_inode *head = ic->head;
+ // first try the (live) cache
+ if (head) {
+ cyg_inode *tmp=head;
+ while (1) {
+ if ( tmp->i_ino == ino ) {
+ tmp->i_count++;
+ return tmp;
+ }
+ tmp = tmp->i_cache_next;
+ if ( tmp == head )
+ break;
+ }
+ }
+#if CYGNUM_IO_FILEIO_MAX_INODE_CACHE_DEAD > 0
+ // now try the cache of dead inodes
+ head = ic->freeable;
+ if (head) {
+ cyg_inode *tmp=head;
+ while (1) {
+ if ( tmp->i_ino == ino ) {
+ tmp->i_count++;
+ LOCK_ICACHE(ic);
+ ic->freeablelistlen--;
+ if ( ic->freeablelistlen ) {
+ tmp->i_cache_prev->i_cache_next = tmp->i_cache_next;
+ tmp->i_cache_next->i_cache_prev = tmp->i_cache_prev;
+ } else
+ ic->freeable = NULL;
+ insert_in_list( &ic->head, tmp );
+ UNLOCK_ICACHE(ic);
+ return tmp;
+ }
+ tmp = tmp->i_cache_next;
+ if ( tmp == head )
+ break;
+ }
+ }
+#endif
+ // not found so make it
+ return cyg_inode_create( ic );
+
+} // cyg_inode_get()
+
+__externC void
+cyg_inode_put( cyg_inodecache *ic, cyg_inode *ino )
+{
+ if ( --ino->i_count == 0 )
+ {
+ LOCK_ICACHE(ic);
+ if ( ino->i_cache_next == ino ) {
+ ic->head = NULL;
+ } else {
+ ino->i_cache_prev->i_cache_next = ino->i_cache_next;
+ ino->i_cache_next->i_cache_prev = ino->i_cache_prev;
+ }
+#if CYGNUM_IO_FILEIO_MAX_INODE_CACHE_DEAD > 0
+ ic->freeablelistlen++;
+ insert_in_list( &ic->freeable, ino );
+ if ( ic->freeablelistlen > CYGNUM_IO_FILEIO_MAX_INODE_CACHE_DEAD ) {
+ cyg_inode *prev = ino->i_cache_prev;
+ prev->i_cache_prev->i_cache_next = ino;
+ ino->i_cache_prev = prev->i_cache_prev;
+ ic->freecallback(prev);
+ free(prev);
+ }
+#else
+ ic->freecallback(ino);
+ free(ino);
+#endif
+ }
+} // cyg_inode_put()
+
+// EOF inode.h
diff --git a/cesar/ecos/packages/io/fileio/current/src/io.cxx b/cesar/ecos/packages/io/fileio/current/src/io.cxx
new file mode 100644
index 0000000000..743211f1ec
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/src/io.cxx
@@ -0,0 +1,544 @@
+//==========================================================================
+//
+// io.cxx
+//
+// Fileio IO operations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-05-25
+// Purpose: Fileio IO operations
+// Description: These are the functions that operate on open files,
+// such as read(), write(), fstat() etc.
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/io_fileio.h>
+
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <stdarg.h> // for fcntl()
+
+#include "fio.h" // Private header
+
+
+//==========================================================================
+// File object locking
+
+#define LOCK_FILE( fp ) cyg_file_lock( fp, fp->f_syncmode )
+
+#define UNLOCK_FILE( fp ) cyg_file_unlock( fp, fp->f_syncmode )
+
+//==========================================================================
+// Common wrapper for read/write using an iovec descriptor
+// 'direction' should be O_RDONLY for readv, O_WRONLY for writev
+
+static ssize_t
+readwritev( int fd, const cyg_iovec *_iov, int iov_len, int direction )
+{
+ FILEIO_ENTRY();
+
+ CYG_CANCELLATION_POINT;
+
+ ssize_t cnt, len;
+ int ret, _idx;
+ cyg_file *fp;
+ cyg_iovec iov[CYGNUM_FILEIO_IOVEC_MAX];
+
+ if( iov_len > CYGNUM_FILEIO_IOVEC_MAX )
+ FILEIO_RETURN(EINVAL);
+
+ // Copy 'iovec' structure since it's supposed to be "const"
+ // and some lower level routines might want to change it.
+ // Also accumulate the length of the total I/O request
+ len = 0;
+ for (_idx = 0; _idx < iov_len; _idx++) {
+ len += _iov[_idx].iov_len;
+ iov[_idx].iov_base = _iov[_idx].iov_base;
+ iov[_idx].iov_len = _iov[_idx].iov_len;
+ }
+
+ if( len > SSIZE_MAX )
+ FILEIO_RETURN(EINVAL);
+
+ fp = cyg_fp_get( fd );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ if( (fp->f_flag & direction) == 0 )
+ {
+ cyg_fp_free( fp );
+ FILEIO_RETURN(EBADF);
+ }
+
+ cyg_uio uio;
+ cyg_fileop_readwrite *op;
+
+ uio.uio_iov = iov;
+ uio.uio_iovcnt = iov_len;
+ uio.uio_resid = len;
+ uio.uio_segflg = UIO_USERSPACE;
+
+ cnt = len;
+
+ if( direction == O_RDONLY )
+ uio.uio_rw = UIO_READ, op = fp->f_ops->fo_read;
+ else
+ uio.uio_rw = UIO_WRITE, op = fp->f_ops->fo_write;
+
+ LOCK_FILE( fp );
+
+ ret = op( fp, &uio );
+
+ UNLOCK_FILE( fp );
+
+ cnt -= uio.uio_resid;
+
+ cyg_fp_free( fp );
+
+ CYG_CANCELLATION_POINT;
+
+ if( ret != 0 )
+ {
+ if ((ret == EWOULDBLOCK || ret == EAGAIN) && cnt)
+ FILEIO_RETURN_VALUE(cnt);
+ else
+ FILEIO_RETURN(ret);
+ }
+
+ FILEIO_RETURN_VALUE(cnt);
+}
+
+//==========================================================================
+// Read from file
+
+__externC ssize_t read( int fd, void *buf, size_t len )
+{
+ cyg_iovec _iov;
+
+ _iov.iov_base = buf;
+ _iov.iov_len = len;
+ return readwritev(fd, &_iov, 1, O_RDONLY);
+}
+
+//==========================================================================
+// Write to a file
+
+__externC ssize_t write( int fd, const void *buf, size_t len )
+{
+ cyg_iovec _iov;
+
+ _iov.iov_base = (void *)buf;
+ _iov.iov_len = len;
+ return readwritev(fd, &_iov, 1, O_WRONLY);
+}
+
+//==========================================================================
+// Read via an iovec
+__externC ssize_t readv( int fd, const cyg_iovec *_iov, int iov_len )
+{
+ return readwritev(fd, _iov, iov_len, O_RDONLY);
+}
+
+//==========================================================================
+// Write via an iovec
+__externC ssize_t writev( int fd, const cyg_iovec *_iov, int iov_len )
+{
+ return readwritev(fd, _iov, iov_len, O_WRONLY);
+}
+
+
+//==========================================================================
+// Close a file
+
+__externC int close( int fd )
+{
+ FILEIO_ENTRY();
+
+ CYG_CANCELLATION_POINT;
+
+ int ret;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( fd );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ cyg_fp_free( fp );
+
+ // The file's fo_close entry may be called as a side
+ // effect of this operation...
+ ret = cyg_fd_free( fd );
+
+ CYG_CANCELLATION_POINT;
+
+ FILEIO_RETURN(ret);
+}
+
+//==========================================================================
+// Seek a file
+
+__externC off_t lseek( int fd, off_t pos, int whence )
+{
+ FILEIO_ENTRY();
+
+ int ret;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( fd );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ LOCK_FILE( fp );
+
+ ret = fp->f_ops->fo_lseek( fp, &pos, whence );
+
+ UNLOCK_FILE( fp );
+
+ cyg_fp_free( fp );
+
+ if( ret != 0 )
+ FILEIO_RETURN(ret);
+
+ FILEIO_RETURN_VALUE(pos);
+}
+
+//==========================================================================
+// ioctl
+
+__externC int ioctl( int fd, CYG_ADDRWORD com, ... )
+{
+ FILEIO_ENTRY();
+
+ int ret;
+ cyg_file *fp;
+ va_list ap;
+ CYG_ADDRWORD data;
+
+ fp = cyg_fp_get( fd );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ va_start(ap, com);
+ data = va_arg(ap, CYG_ADDRWORD);
+ va_end(ap);
+
+ LOCK_FILE( fp );
+
+ ret = fp->f_ops->fo_ioctl( fp, com, data );
+
+ UNLOCK_FILE( fp );
+
+ cyg_fp_free( fp );
+
+ FILEIO_RETURN(ret);
+}
+
+//==========================================================================
+// fsync
+
+__externC int fsync( int fd )
+{
+ FILEIO_ENTRY();
+
+ CYG_CANCELLATION_POINT;
+
+ int ret;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( fd );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ LOCK_FILE( fp );
+
+ ret = fp->f_ops->fo_fsync( fp, CYG_FSYNC );
+
+ UNLOCK_FILE( fp );
+
+ cyg_fp_free( fp );
+
+ CYG_CANCELLATION_POINT;
+
+ FILEIO_RETURN(ret);
+}
+
+//==========================================================================
+// fdatasync()
+
+__externC int fdatasync( int fd )
+{
+ FILEIO_ENTRY();
+
+ CYG_CANCELLATION_POINT;
+
+ int ret;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( fd );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ LOCK_FILE( fp );
+
+ ret = fp->f_ops->fo_fsync( fp, CYG_FDATASYNC );
+
+ UNLOCK_FILE( fp );
+
+ cyg_fp_free( fp );
+
+ CYG_CANCELLATION_POINT;
+
+ FILEIO_RETURN(ret);
+}
+
+//==========================================================================
+// fstat
+
+__externC int fstat( int fd, struct stat *buf )
+{
+ FILEIO_ENTRY();
+
+ int ret;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( fd );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ LOCK_FILE( fp );
+
+ ret = fp->f_ops->fo_fstat( fp, buf );
+
+ UNLOCK_FILE( fp );
+
+ cyg_fp_free( fp );
+
+ FILEIO_RETURN(ret);
+}
+
+//==========================================================================
+// fpathconf
+
+__externC long fpathconf( int fd, int name )
+{
+ FILEIO_ENTRY();
+
+ int ret;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( fd );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ struct cyg_pathconf_info info;
+
+ info.name = name;
+ info.value = 0;
+
+ LOCK_FILE( fp );
+
+ ret = fp->f_ops->fo_getinfo( fp, FILE_INFO_CONF, (char *)&info, sizeof(info) );
+
+ UNLOCK_FILE( fp );
+
+ cyg_fp_free( fp );
+
+ if( ret != 0 )
+ FILEIO_RETURN(ret);
+
+ FILEIO_RETURN_VALUE(info.value);
+}
+
+//==========================================================================
+// fcntl
+
+__externC int fcntl( int fd, int cmd, ... )
+{
+ FILEIO_ENTRY();
+
+ CYG_CANCELLATION_POINT;
+
+ int ret = 0;
+ cyg_file *fp;
+ va_list a;
+
+ fp = cyg_fp_get( fd );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ va_start( a, cmd );
+
+ switch( cmd )
+ {
+ case F_DUPFD:
+ {
+ int fda = va_arg(a, int);
+
+ if( fda < 0 || fda >= OPEN_MAX )
+ {
+ errno = EBADF;
+ break;
+ }
+
+ int fd2 = cyg_fd_alloc( fda );
+
+ if( fd2 == -1 )
+ {
+ ret = EMFILE;
+ break;
+ }
+
+ cyg_fd_assign( fd2, fp );
+
+ break;
+ }
+
+ default:
+ ret = ENOTSUP;
+ break;
+ }
+
+ va_end(a);
+
+ cyg_fp_free( fp );
+
+ CYG_CANCELLATION_POINT;
+
+ FILEIO_RETURN(ret);
+}
+
+//==========================================================================
+// isatty()
+
+__externC int isatty( int fd )
+{
+ FILEIO_ENTRY();
+
+ int ret = 0;
+ struct stat buf;
+ int err;
+
+ err = fstat( fd, &buf );
+
+ // Any error and we return zero. If the client wants to
+ // they can always pick up the error code from errno.
+ if( err < 0 )
+ FILEIO_RETURN_VALUE(0);
+
+ // For now we assume that all char devices are ttys.
+ // In future we may need to have a special getinfo()
+ // call to decide this more specifically.
+
+ if( S_ISCHR( buf.st_mode ) )
+ ret = 1;
+
+ FILEIO_RETURN_VALUE(ret);
+}
+
+//==========================================================================
+// File get info.
+
+__externC int cyg_fs_fgetinfo( int fd, int key, void *buf, int len )
+{
+ FILEIO_ENTRY();
+
+ int ret;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( fd );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ LOCK_FILE( fp );
+
+ ret = fp->f_ops->fo_getinfo( fp, key, buf, len );
+
+ UNLOCK_FILE( fp );
+
+ cyg_fp_free( fp );
+
+ FILEIO_RETURN(ret);
+}
+
+//==========================================================================
+// File set info.
+
+__externC int cyg_fs_fsetinfo( int fd, int key, void *buf, int len )
+{
+ FILEIO_ENTRY();
+
+ int ret;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( fd );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ LOCK_FILE( fp );
+
+ ret = fp->f_ops->fo_setinfo( fp, key, buf, len );
+
+ UNLOCK_FILE( fp );
+
+ cyg_fp_free( fp );
+
+ FILEIO_RETURN(ret);
+}
+
+// -------------------------------------------------------------------------
+// EOF io.cxx
diff --git a/cesar/ecos/packages/io/fileio/current/src/misc.cxx b/cesar/ecos/packages/io/fileio/current/src/misc.cxx
new file mode 100644
index 0000000000..f878cf6f99
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/src/misc.cxx
@@ -0,0 +1,495 @@
+//==========================================================================
+//
+// misc.cxx
+//
+// Fileio miscellaneous functions
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-05-25
+// Purpose: Fileio miscellaneous functions
+// Description: This file contains various miscellaneous functions
+// for use with the fileio system. These include startup,
+// table management, and other service routines.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+#include <pkgconf/io_fileio.h>
+#ifdef CYGPKG_LIBC_TIME
+#include <pkgconf/libc_time.h>
+#endif
+
+
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <string.h> // strcmp()
+#include <time.h> // time()
+
+#ifdef CYGPKG_IO_WALLCLOCK
+# include <cyg/io/wallclock.hxx> // Wallclock class
+#endif
+
+#ifdef CYGPKG_KERNEL
+#include <pkgconf/kernel.h>
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/kernel/clock.inl> // Clock inlines
+#endif
+
+#include "fio.h" // Private header
+
+//==========================================================================
+// forward definitions
+
+static void cyg_mtab_init();
+
+__externC int chdir( const char *path );
+
+//==========================================================================
+// Filesystem tables
+
+// -------------------------------------------------------------------------
+// Filesystem table.
+
+// This array contains entries for all filesystem that are installed in
+// the system.
+__externC cyg_fstab_entry cyg_fstab[];
+CYG_HAL_TABLE_BEGIN( cyg_fstab, fstab );
+
+// end of filesystem table, set in linker script.
+__externC cyg_fstab_entry cyg_fstab_end;
+CYG_HAL_TABLE_END( cyg_fstab_end, fstab );
+
+#ifdef CYGPKG_KERNEL
+// Array of mutexes for locking the fstab entries
+static Cyg_Mutex fstab_lock[CYGNUM_FILEIO_FSTAB_MAX] CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO_FS);
+#endif
+
+// -------------------------------------------------------------------------
+// Mount table.
+
+// This array contains entries for all valid running filesystems.
+__externC cyg_mtab_entry cyg_mtab[];
+CYG_HAL_TABLE_BEGIN( cyg_mtab, mtab );
+
+// Extra entries at end of mtab for dynamic mount points.
+cyg_mtab_entry cyg_mtab_extra[CYGNUM_FILEIO_MTAB_EXTRA] CYG_HAL_TABLE_EXTRA(mtab) = { { NULL } };
+
+// End of mount table, set in the linker script.
+__externC cyg_mtab_entry cyg_mtab_end;
+CYG_HAL_TABLE_END( cyg_mtab_end, mtab );
+
+#ifdef CYGPKG_KERNEL
+// Array of mutexes for locking the mtab entries
+static Cyg_Mutex mtab_lock[CYGNUM_FILEIO_MTAB_MAX] CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO_FS);
+#endif
+
+//==========================================================================
+// Current directory
+
+cyg_mtab_entry *cyg_cdir_mtab_entry = NULL;
+cyg_dir cyg_cdir_dir = CYG_DIR_NULL;
+
+//==========================================================================
+// Initialization object
+
+class Cyg_Fileio_Init_Class
+{
+public:
+ Cyg_Fileio_Init_Class();
+};
+
+static Cyg_Fileio_Init_Class fileio_initializer CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO_FS);
+
+Cyg_Fileio_Init_Class::Cyg_Fileio_Init_Class()
+{
+ cyg_fd_init();
+
+ cyg_mtab_init();
+
+ chdir("/");
+}
+
+//==========================================================================
+// Mount table initializer
+
+static void cyg_mtab_init()
+{
+ cyg_mtab_entry *m;
+
+ for( m = &cyg_mtab[0]; m != &cyg_mtab_end; m++ )
+ {
+ const char *fsname = m->fsname;
+ cyg_fstab_entry *f;
+
+ // Ignore empty entries
+ if( m->name == NULL )
+ continue;
+
+ // stop if there are more than the configured maximum
+ if( m-&cyg_mtab[0] >= CYGNUM_FILEIO_MTAB_MAX )
+ break;
+
+ for( f = &cyg_fstab[0]; f != &cyg_fstab_end; f++ )
+ {
+ // stop if there are more than the configured maximum
+ if( f-&cyg_fstab[0] >= CYGNUM_FILEIO_FSTAB_MAX )
+ break;
+
+ if( strcmp( fsname, f->name) == 0 )
+ {
+ // We have a match.
+
+ if( f->mount( f, m ) == 0 )
+ {
+ m->valid = true;
+ m->fs = f;
+ // m->root installed by fs.
+ }
+ else
+ {
+ m->valid = false;
+ }
+
+ break;
+ }
+ }
+ }
+}
+
+//==========================================================================
+// Mount table matching
+
+// -------------------------------------------------------------------------
+// matchlen() compares two strings and returns the number of bytes by which
+// they match.
+
+static int matchlen( const char *s1, const char *s2 )
+{
+ int len = 0;
+ while( s1[len] == s2[len] && s1[len] && s2[len] ) len++;
+
+ // Return length only if s2 is an initial substring of s1,
+ // and it terminates in s1 at end-of-string or a '/'.
+
+ // Special case for s2 == "/"
+ if( len == 1 && s2[0] == '/' && s2[1] == 0 )
+ return len;
+
+ if( (s2[len] == 0) && (s1[len] == 0 || s1[len] == '/'))
+ return len;
+ else return 0;
+}
+
+// -------------------------------------------------------------------------
+// Search the mtab for the entry that matches the longest substring of
+// **name.
+
+__externC int cyg_mtab_lookup( cyg_dir *dir, const char **name, cyg_mtab_entry **mte)
+{
+ cyg_mtab_entry *m, *best = NULL;
+ int best_len = 0;
+
+ // Unrooted file names go straight to current dir
+ if( **name != '/' ) {
+ if (*mte == (cyg_mtab_entry *)NULL) {
+ // No known current directory
+ return -1;
+ }
+ // Current directory is well known
+ return 0;
+ }
+
+ // Otherwise search the mount table.
+ for( m = &cyg_mtab[0]; m != &cyg_mtab_end; m++ )
+ {
+ if( m->name != NULL && m->valid )
+ {
+ int len = matchlen(*name,m->name);
+ if( len > best_len )
+ best = m, best_len = len;
+ }
+ }
+
+ // No match found, bad path name...
+ if( best_len == 0 ) return -1;
+
+ *name += best_len;
+ if( **name == '/' )
+ (*name)++;
+ *mte = best;
+ *dir = best->root;
+
+ return 0;
+}
+
+//==========================================================================
+// mount filesystem
+
+__externC int mount( const char *devname,
+ const char *dir,
+ const char *fsname)
+{
+
+ FILEIO_ENTRY();
+
+ cyg_mtab_entry *m;
+ cyg_fstab_entry *f;
+ int result = ENOERR;
+
+ // Search the mount table for an empty entry
+ for( m = &cyg_mtab[0]; m != &cyg_mtab_end; m++ )
+ {
+ // stop if there are more than the configured maximum
+ if( m-&cyg_mtab[0] >= CYGNUM_FILEIO_MTAB_MAX )
+ {
+ m = &cyg_mtab_end;
+ break;
+ }
+
+ if( m->name == NULL ) break;
+ }
+
+ if( m == &cyg_mtab_end )
+ FILEIO_RETURN(ENOMEM);
+
+ // Now search the fstab for the filesystem implementation
+ for( f = &cyg_fstab[0]; f != &cyg_fstab_end; f++ )
+ {
+ // stop if there are more than the configured maximum
+ if( f-&cyg_fstab[0] >= CYGNUM_FILEIO_FSTAB_MAX )
+ break;
+
+ if( strcmp( fsname, f->name) == 0 )
+ break;
+ }
+
+ if( f == &cyg_fstab_end )
+ FILEIO_RETURN(ENODEV);
+
+ // We have a match.
+
+ m->name = dir;
+ m->fsname = fsname;
+ m->devname = devname;
+
+ if( (result = f->mount( f, m )) == 0 )
+ {
+ m->valid = true;
+ m->fs = f;
+ // m->root installed by fs.
+ }
+ else
+ {
+ m->valid = false;
+ m->name = NULL;
+ }
+
+ // Make sure that there is something to search (for open)
+
+ if (cyg_cdir_mtab_entry == (cyg_mtab_entry *)NULL) {
+ cyg_cdir_mtab_entry = m;
+ }
+
+ FILEIO_RETURN(result);
+}
+
+//==========================================================================
+// unmount filesystem
+
+__externC int umount( const char *name)
+{
+ int err = ENOERR;
+
+ FILEIO_ENTRY();
+
+ cyg_mtab_entry *m;
+
+ // Search the mount table for a matching entry
+ for( m = &cyg_mtab[0]; m != &cyg_mtab_end; m++ )
+ {
+ // stop if there are more than the configured maximum
+ if( m-&cyg_mtab[0] >= CYGNUM_FILEIO_MTAB_MAX )
+ {
+ m = &cyg_mtab_end;
+ break;
+ }
+
+ // Ignore empty or invalid entries
+ if( m->name == NULL || !m->valid ) continue;
+
+ // match names.
+ if( strcmp(name,m->name) == 0 ) break;
+
+ // Match device name too?
+ }
+
+ if( m == &cyg_mtab_end )
+ FILEIO_RETURN(EINVAL);
+
+ // We have a match, call the umount function
+
+ err = m->fs->umount( m );
+
+ if( err == ENOERR )
+ {
+ m->valid = false;
+ m->name = NULL;
+ }
+
+ FILEIO_RETURN(err);
+}
+
+//==========================================================================
+// Implement filesystem locking protocol.
+
+void cyg_fs_lock( cyg_mtab_entry *mte, cyg_uint32 syncmode )
+{
+ CYG_ASSERT(mte != NULL, "Bad mount table entry");
+
+ if( syncmode & CYG_SYNCMODE_FILE_FILESYSTEM ) {
+ CYG_ASSERT(mte->fs-&cyg_fstab[0] < CYGNUM_FILEIO_FSTAB_MAX, "Bad file system");
+ FILEIO_MUTEX_LOCK( fstab_lock[mte->fs-&cyg_fstab[0]] );
+ }
+
+ if( syncmode & CYG_SYNCMODE_FILE_MOUNTPOINT ) {
+ CYG_ASSERT(mte-&cyg_mtab[0] < CYGNUM_FILEIO_MTAB_MAX, "Bad mount point");
+ FILEIO_MUTEX_LOCK( mtab_lock[mte-&cyg_mtab[0]] );
+ }
+}
+
+void cyg_fs_unlock( cyg_mtab_entry *mte, cyg_uint32 syncmode )
+{
+ CYG_ASSERT(mte != NULL, "Bad mount table entry");
+
+ if( syncmode & CYG_SYNCMODE_FILE_FILESYSTEM ) {
+ CYG_ASSERT(mte->fs-&cyg_fstab[0] < CYGNUM_FILEIO_FSTAB_MAX, "Bad file system");
+ FILEIO_MUTEX_UNLOCK( fstab_lock[mte->fs-&cyg_fstab[0]] );
+ }
+
+ if( syncmode & CYG_SYNCMODE_FILE_MOUNTPOINT ) {
+ CYG_ASSERT(mte-&cyg_mtab[0] < CYGNUM_FILEIO_MTAB_MAX, "Bad mount point");
+ FILEIO_MUTEX_UNLOCK( mtab_lock[mte-&cyg_mtab[0]] );
+ }
+}
+
+//==========================================================================
+// Search mount table for a filesystems root.
+
+__externC cyg_mtab_entry * cyg_fs_root_lookup( cyg_dir *root )
+{
+ cyg_mtab_entry *m;
+
+ for( m = &cyg_mtab[0]; m != &cyg_mtab_end; m++ )
+ {
+ if( (cyg_dir *)m->root == root )
+ {
+ return m;
+ }
+ }
+ return NULL;
+}
+
+//==========================================================================
+// Timestamp support
+// This provides access to the current time/date, expressed as a
+// time_t. It uses a number of mechanisms to do this, selecting
+// whichever is available in the current configuration.
+
+__externC time_t cyg_timestamp()
+{
+#if defined(CYGPKG_IO_WALLCLOCK)
+
+ // First, try to get the time from the wallclock device.
+
+ return (time_t) Cyg_WallClock::wallclock->get_current_time();
+
+#elif defined(CYGINT_ISO_POSIX_TIMERS)
+
+ // If POSIX is present, use the current value of the realtime
+ // clock.
+
+ struct timespec tp;
+
+ clock_gettime( CLOCK_REALTIME, &tp );
+
+ return (time_t) tp.tv_sec;
+
+#elif defined(CYGPKG_KERNEL)
+
+ // If all else fails, get the current realtime clock value and
+ // convert it to seconds ourself.
+
+ static struct Cyg_Clock::converter sec_converter;
+ static cyg_bool initialized = false;
+ cyg_tick_count ticks;
+
+ if( !initialized )
+ {
+ Cyg_Clock::real_time_clock->get_clock_to_other_converter( 1000000000, &sec_converter );
+ initialized = true;
+ }
+
+ ticks = Cyg_Clock::real_time_clock->current_value();
+
+ return (time_t) Cyg_Clock::convert( ticks, &sec_converter );
+#else
+ /* No clock support at all. */
+ return (time_t) 0;
+#endif
+
+}
+
+//==========================================================================
+// Default functions
+
+__externC int cyg_fileio_enosys() { return ENOSYS; }
+__externC int cyg_fileio_erofs() { return EROFS; }
+__externC int cyg_fileio_enoerr() { return ENOERR; }
+__externC int cyg_fileio_enotdir() { return ENOTDIR; }
+
+__externC cyg_bool cyg_fileio_seltrue (struct CYG_FILE_TAG *fp, int which, CYG_ADDRWORD info)
+{ return 1; }
+
+// -------------------------------------------------------------------------
+// EOF misc.cxx
diff --git a/cesar/ecos/packages/io/fileio/current/src/select.cxx b/cesar/ecos/packages/io/fileio/current/src/select.cxx
new file mode 100644
index 0000000000..03782e149d
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/src/select.cxx
@@ -0,0 +1,402 @@
+//==========================================================================
+//
+// select.cxx
+//
+// Fileio select() support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Nick Garnett
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-05-25
+// Purpose: Fileio select() support
+// Description: Support for select().
+//
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/io_fileio.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <stdarg.h> // for fcntl()
+
+#include "fio.h" // Private header
+
+#include <sys/select.h> // select header
+
+#include <cyg/kernel/sched.hxx> // scheduler definitions
+#include <cyg/kernel/thread.hxx> // thread definitions
+#include <cyg/kernel/flag.hxx> // flag definitions
+#include <cyg/kernel/clock.hxx> // clock definitions
+
+#include <cyg/kernel/sched.inl>
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/clock.inl>
+
+//==========================================================================
+// File object locking
+
+#define LOCK_FILE( fp ) cyg_file_lock( fp )
+
+#define UNLOCK_FILE( fp ) cyg_file_unlock( fp )
+
+// Get a flag based on the thread's unique ID. Note: In a system with a large
+// number of threads, the same flag may be used by more than one thread.
+#define SELECT_WAIT_FLAG_GET() (1 << (Cyg_Thread::self()->get_unique_id() \
+ & (sizeof (Cyg_FlagValue) * NBBY - 1)))
+
+//==========================================================================
+// Local variables
+
+static volatile cyg_uint32 selwake_count = 0;
+
+// A flag is used to block a thread until data from the device is available. This
+// prevents all threads from waking up at the same time and polling for changes.
+// Each thread is allocated a flag bit via the SELECT_WAIT_FLAG_GET() macro when
+// the thread registers for selection via cyg_selrecord (). The flag is stored in
+// the driver's select info block. Only those threads specified via the flags in
+// the select info are woken up by cyg_selwakeup ().
+// If there are more than 32 threads in the system, then there is a chance that
+// cyg_selwakeup () may wake up more than one thread. Each thread then polls for
+// changes.
+static Cyg_Flag select_flag CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO_FS);
+
+//==========================================================================
+// Timeval to ticks conversion support
+
+// Converters from sec and us to ticks
+static struct Cyg_Clock::converter us_converter, sec_converter;
+
+static cyg_bool converters_initialized = false;
+
+externC cyg_tick_count cyg_timeval_to_ticks( const struct timeval *tv )
+{
+ if( !converters_initialized )
+ {
+ // Create the converters we need.
+ Cyg_Clock::real_time_clock->get_other_to_clock_converter( 1000, &us_converter );
+ Cyg_Clock::real_time_clock->get_other_to_clock_converter( 1000000000, &sec_converter );
+
+ converters_initialized = true;
+ }
+
+ // Short circuit zero timeval
+ if( tv->tv_sec == 0 && tv->tv_usec == 0 )
+ {
+ return 0;
+ }
+
+ // Convert the seconds field to ticks.
+ cyg_tick_count ticks = Cyg_Clock::convert( tv->tv_sec, &sec_converter );
+
+ // Convert the nanoseconds. This will round down to nearest whole tick.
+ ticks += Cyg_Clock::convert( (cyg_tick_count)tv->tv_usec, &us_converter );
+
+ return ticks;
+}
+
+//==========================================================================
+// Select API function
+
+static int
+cyg_pselect(int nfd, fd_set *in, fd_set *out, fd_set *ex,
+ struct timeval *tv, const sigset_t *mask)
+{
+ FILEIO_ENTRY();
+
+ int error = ENOERR;
+ int fd, mode, num;
+ cyg_file *fp;
+ fd_set in_res, out_res, ex_res; // Result sets
+ fd_set *selection[3], *result[3];
+ cyg_tick_count ticks;
+ int mode_type[] = {CYG_FREAD, CYG_FWRITE, 0};
+ cyg_uint32 wake_count;
+ sigset_t oldmask;
+
+ Cyg_FlagValue myFlag = SELECT_WAIT_FLAG_GET ();
+ int maxFdIndex = __howmany(nfd, __NFDBITS); // size of fd sets
+
+ // Make sure the nfd < FD_SETSIZE, a value greater than FD_SETSIZE
+ // would break the results sets
+ if(nfd > FD_SETSIZE)
+ {
+ FILEIO_RETURN(EINVAL);
+ }
+
+ FD_ZERO(&in_res);
+ FD_ZERO(&out_res);
+ FD_ZERO(&ex_res);
+
+ // Set up sets
+ selection[0] = in; result[0] = &in_res;
+ selection[1] = out; result[1] = &out_res;
+ selection[2] = ex; result[2] = &ex_res;
+
+ // Compute end time
+ if (tv)
+ ticks = cyg_timeval_to_ticks( tv );
+ else ticks = 0;
+
+ // Scan sets for possible I/O until something found, timeout or error.
+ while (!error)
+ {
+ wake_count = selwake_count;
+
+ num = 0; // Total file descriptors "ready"
+ for (mode = 0; !error && mode < 3; mode++)
+ {
+ if (selection[mode])
+ {
+ fd_mask *fds_bits = selection[mode]->fds_bits;
+ int index, fdbase;
+ for(index = 0, fdbase = 0; !error && index < maxFdIndex; index++, fdbase += __NFDBITS)
+ {
+ fd_mask mask = fds_bits[index];
+ for(fd = fdbase; mask != 0; fd++, mask >>= 1)
+ {
+ if(mask & 1)
+ {
+ fp = cyg_fp_get( fd );
+ if( fp == NULL )
+ {
+ error = EBADF;
+ break;
+ }
+
+ if ((*fp->f_ops->fo_select)(fp, mode_type[mode], 0))
+ {
+ FD_SET(fd, result[mode]);
+ num++;
+ }
+ cyg_fp_free( fp );
+ }
+ }
+ }
+ }
+ }
+
+ if (error)
+ break;
+
+ if (num)
+ {
+ // Found something, update user's sets
+ if (in) FD_COPY( &in_res, in );
+ if (out) FD_COPY( &out_res, out );
+ if (ex) FD_COPY( &ex_res, ex );
+ CYG_FILEIO_DELIVER_SIGNALS( mask );
+ FILEIO_RETURN_VALUE(num);
+ }
+
+ Cyg_Scheduler::lock();
+
+ // Switch to the supplied signal mask. This will permit delivery
+ // of any signals that might terminate this select operation.
+
+ CYG_FILEIO_SIGMASK_SET( mask, &oldmask );
+
+ do
+ {
+
+ // We need to see if any signals have been posted while we
+ // were testing all those files. The handlers will not
+ // have run because we have ASRs inhibited but the signal
+ // will have been set pending.
+
+ if( CYG_FILEIO_SIGPENDING() )
+ {
+ // There are pending signals so we need to terminate
+ // the select operation and return EINTR. Handlers for
+ // the pending signals will be called just before we
+ // return.
+
+ error = EINTR;
+ break;
+ }
+
+ if( wake_count == selwake_count )
+ {
+ // Nothing found, see if we want to wait
+ if (tv)
+ {
+ // Special case of "poll"
+ if (ticks == 0)
+ {
+ error = EAGAIN;
+ break;
+ }
+
+ ticks += Cyg_Clock::real_time_clock->current_value();
+
+ if( !select_flag.wait (myFlag, Cyg_Flag::OR, ticks) )
+ {
+ // A non-standard wakeup, if the current time is equal to
+ // or past the timeout, return zero. Otherwise return
+ // EINTR, since we have been released.
+
+ if( Cyg_Clock::real_time_clock->current_value() >= ticks )
+ {
+ error = EAGAIN;
+ break;
+ }
+ else error = EINTR;
+ }
+
+ ticks -= Cyg_Clock::real_time_clock->current_value();
+ }
+ else
+ {
+ // Wait forever (until something happens)
+ if( !select_flag.wait (myFlag, Cyg_Flag::OR) )
+ error = EINTR;
+ }
+ }
+
+ } while(0);
+
+ CYG_FILEIO_SIGMASK_SET( &oldmask, NULL );
+
+ Cyg_Scheduler::unlock();
+
+ } // while(!error)
+
+ // If the error code is EAGAIN, this means that a timeout has
+ // happened. We return zero in that case, rather than a proper
+ // error code.
+ // If the error code is EINTR, then a signal may be pending
+ // delivery. Call back into the POSIX package to handle it.
+
+ if( error == EAGAIN )
+ FILEIO_RETURN_VALUE(0);
+ else if( error == EINTR )
+ CYG_FILEIO_DELIVER_SIGNALS( mask );
+
+ FILEIO_RETURN(error);
+}
+
+// -------------------------------------------------------------------------
+// Select API function
+
+__externC int
+select(int nfd, fd_set *in, fd_set *out, fd_set *ex, struct timeval *tv)
+{
+ return cyg_pselect(nfd, in, out, ex, tv, NULL);
+}
+
+// -------------------------------------------------------------------------
+// Pselect API function
+//
+// This is derived from the POSIX-200X specification.
+
+__externC int
+pselect(int nfd, fd_set *in, fd_set *out, fd_set *ex,
+ const struct timespec *ts, const sigset_t *sigmask)
+{
+ struct timeval tv;
+
+#ifndef CYGPKG_POSIX_SIGNALS
+ CYG_ASSERT( sigmask == NULL,
+ "pselect called with non-null sigmask without POSIX signal support"
+ );
+#endif
+
+ if (ts != NULL)
+ {
+ tv.tv_sec = ts->tv_sec;
+ tv.tv_usec = ts->tv_nsec/1000;
+ }
+
+ return cyg_pselect(nfd, in, out, ex, ts ? &tv : NULL, sigmask);
+}
+
+//==========================================================================
+// Select support functions.
+
+// -------------------------------------------------------------------------
+// cyg_selinit() is used to initialize a selinfo structure
+
+void cyg_selinit( struct CYG_SELINFO_TAG *sip )
+{
+ sip->si_info = 0;
+ sip->si_waitFlag = 0;
+}
+
+// -------------------------------------------------------------------------
+// cyg_selrecord() is called when a client device needs to register
+// the current thread for selection. Save the flag that identifies the thread.
+void cyg_selrecord( CYG_ADDRWORD info, struct CYG_SELINFO_TAG *sip )
+{
+ sip->si_info = info;
+ Cyg_Scheduler::lock();
+ sip->si_waitFlag |= SELECT_WAIT_FLAG_GET ();
+ Cyg_Scheduler::unlock();
+}
+
+// -------------------------------------------------------------------------
+// cyg_selwakeup() is called when the client device matches the select
+// criterion, and needs to wake up a thread.
+void cyg_selwakeup( struct CYG_SELINFO_TAG *sip )
+{
+ // We don't actually use the si_info field of selinfo at present.
+ Cyg_Scheduler::lock();
+
+ if( sip->si_waitFlag != 0 )
+ {
+ // If the flag is still present, this selection has not fired before.
+ // Only wake up the threads waiting on the flags specified in si_waitFlag.
+ // There is no need to wake threads that are not waiting for this data.
+ select_flag.setbits (sip->si_waitFlag);
+ sip->si_waitFlag = 0; // clear all flags
+ select_flag.maskbits (sip->si_waitFlag);
+ selwake_count++;
+ }
+ Cyg_Scheduler::unlock();
+}
+
+// -------------------------------------------------------------------------
+// EOF select.cxx
diff --git a/cesar/ecos/packages/io/fileio/current/src/socket.cxx b/cesar/ecos/packages/io/fileio/current/src/socket.cxx
new file mode 100644
index 0000000000..85f17f31c3
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/src/socket.cxx
@@ -0,0 +1,735 @@
+//==========================================================================
+//
+// socket.cxx
+//
+// Fileio socket operations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-05-25
+// Purpose: Fileio socket operations
+// Description: These are the functions that operate on sockets,
+// such as socket(), bind(), accept() etc.
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/io_fileio.h>
+
+#include <cyg/hal/hal_tables.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <stdarg.h> // for fcntl()
+
+#include <cyg/io/file.h> // struct iovec
+
+#include "fio.h" // Private header
+
+#include <cyg/kernel/mutex.hxx> // mutex definitions
+
+#ifdef CYGPKG_NET
+
+#include <sys/socket.h> // struct msghdr
+
+#endif
+
+//==========================================================================
+// Forward definitions
+
+static void cyg_ns_lock( cyg_nstab_entry *ns );
+static void cyg_ns_unlock( cyg_nstab_entry *ns );
+static void cyg_sock_lock( cyg_file *fp );
+static void cyg_sock_unlock( cyg_file *fp );
+
+//==========================================================================
+// Local entry/return macros
+
+#define SOCKET_ENTRY() FILEIO_ENTRY()
+
+#define SOCKET_RETURN(err) FILEIO_RETURN(err)
+
+#define SOCKET_RETURN_VALUE(val) FILEIO_RETURN_VALUE(val)
+
+//==========================================================================
+// Locking protocols
+
+#define LOCK_NS( _n ) cyg_ns_lock( _n )
+
+#define UNLOCK_NS( _n ) cyg_ns_unlock( _n )
+
+#define LOCK_SOCKET( _fp ) cyg_sock_lock( _fp )
+
+#define UNLOCK_SOCKET( _fp ) cyg_sock_unlock( _fp )
+
+//==========================================================================
+// Tables and local variables
+
+// Array of network stacks installed
+__externC cyg_nstab_entry cyg_nstab[];
+CYG_HAL_TABLE_BEGIN( cyg_nstab, nstab );
+
+// End of array marker
+__externC cyg_nstab_entry cyg_nstab_end;
+CYG_HAL_TABLE_END( cyg_nstab_end, nstab );
+
+static Cyg_Mutex nstab_lock[CYGNUM_FILEIO_NSTAB_MAX] CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO_FS);
+
+//==========================================================================
+// Initialization
+
+__externC void cyg_nstab_init()
+{
+ cyg_nstab_entry *n;
+
+ for( n = &cyg_nstab[0]; n != &cyg_nstab_end; n++ )
+ {
+ // stop if there are more than the configured maximum
+ if( n-&cyg_nstab[0] >= CYGNUM_FILEIO_NSTAB_MAX )
+ break;
+
+ if( n->init( n ) == 0 )
+ {
+ n->valid = true;
+ }
+ }
+}
+
+//==========================================================================
+// Socket API calls
+
+// -------------------------------------------------------------------------
+
+__externC int socket (int domain, int type, int protocol)
+{
+ SOCKET_ENTRY();
+
+ int err = EAFNOSUPPORT;
+ int fd;
+ cyg_file *file;
+
+ fd = cyg_fd_alloc(0);
+
+ if( fd < 0 )
+ SOCKET_RETURN(EMFILE);
+
+ file = cyg_file_alloc();
+
+ if( file == NULL )
+ {
+ cyg_fd_free(fd);
+ SOCKET_RETURN(ENFILE);
+ }
+
+ cyg_nstab_entry *n;
+
+ for( n = &cyg_nstab[0]; n != &cyg_nstab_end; n++ )
+ {
+ LOCK_NS( n );
+
+ err = n->socket( n, domain, type, protocol, file );
+
+ UNLOCK_NS( n );
+
+ if( err == 0 ) break;
+ }
+
+ if( err != 0 )
+ {
+ cyg_fd_free(fd);
+ cyg_file_free(file);
+ SOCKET_RETURN( err );
+ }
+
+ file->f_syncmode = n->syncmode;
+ file->f_mte = (cyg_mtab_entry *)n;
+
+ cyg_fd_assign( fd, file );
+
+ SOCKET_RETURN_VALUE(fd);
+}
+
+
+// -------------------------------------------------------------------------
+
+__externC int accept (int s, struct sockaddr *sa, socklen_t *addrlen)
+{
+ SOCKET_ENTRY();
+
+ int err = 0;
+ int fd;
+ cyg_file *fp;
+ cyg_file *new_fp;
+
+ fp = cyg_fp_get( s );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ fd = cyg_fd_alloc(0);
+
+ if( fd < 0 )
+ {
+ cyg_fp_free( fp );
+ SOCKET_RETURN(EMFILE);
+ }
+
+ new_fp = cyg_file_alloc();
+
+ if( new_fp == NULL )
+ {
+ cyg_fp_free( fp );
+ cyg_fd_free(fd);
+ SOCKET_RETURN(ENFILE);
+ }
+
+ if( fp->f_type == CYG_FILE_TYPE_SOCKET )
+ {
+ cyg_sock_ops *ops = (cyg_sock_ops *)fp->f_xops;
+
+ LOCK_SOCKET( fp );
+
+ err = ops->accept( fp, new_fp, sa, addrlen );
+
+ UNLOCK_SOCKET( fp );
+
+ }
+ else err = EBADF;
+
+ if( err != 0 )
+ {
+ cyg_fp_free( fp );
+ cyg_fd_free(fd);
+ cyg_file_free(new_fp);
+ SOCKET_RETURN( err );
+ }
+
+ new_fp->f_syncmode = fp->f_syncmode;
+ new_fp->f_mte = fp->f_mte;
+
+ cyg_fd_assign( fd, new_fp );
+
+ cyg_fp_free( fp );
+
+ SOCKET_RETURN_VALUE(fd);
+}
+
+
+// -------------------------------------------------------------------------
+
+__externC int bind (int s, const struct sockaddr *sa, unsigned int len)
+{
+ SOCKET_ENTRY();
+
+ int ret = 0;
+ cyg_file *fp;
+ struct sockaddr sa2 = *sa;
+
+ fp = cyg_fp_get( s );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ if( fp->f_type == CYG_FILE_TYPE_SOCKET )
+ {
+ cyg_sock_ops *ops = (cyg_sock_ops *)fp->f_xops;
+
+ LOCK_SOCKET( fp );
+
+ ret = ops->bind( fp, &sa2, len );
+
+ UNLOCK_SOCKET( fp );
+
+ }
+
+ cyg_fp_free( fp );
+
+ SOCKET_RETURN(ret);
+}
+
+
+// -------------------------------------------------------------------------
+
+__externC int connect (int s, const struct sockaddr *sa, socklen_t len)
+{
+ SOCKET_ENTRY();
+
+ int ret = 0;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( s );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ if( fp->f_type == CYG_FILE_TYPE_SOCKET )
+ {
+ cyg_sock_ops *ops = (cyg_sock_ops *)fp->f_xops;
+
+ LOCK_SOCKET( fp );
+
+ ret = ops->connect( fp, sa, len );
+
+ UNLOCK_SOCKET( fp );
+
+ }
+
+ cyg_fp_free( fp );
+
+ SOCKET_RETURN(ret);
+}
+
+
+// -------------------------------------------------------------------------
+
+__externC int getpeername (int s, struct sockaddr *sa, socklen_t *len)
+{
+ SOCKET_ENTRY();
+
+ int ret = 0;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( s );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ if( fp->f_type == CYG_FILE_TYPE_SOCKET )
+ {
+ cyg_sock_ops *ops = (cyg_sock_ops *)fp->f_xops;
+
+ LOCK_SOCKET( fp );
+
+ ret = ops->getname( fp, sa, len, 1 );
+
+ UNLOCK_SOCKET( fp );
+ }
+
+ cyg_fp_free( fp );
+
+ SOCKET_RETURN(ret);
+}
+
+
+// -------------------------------------------------------------------------
+
+__externC int getsockname (int s, struct sockaddr *sa, socklen_t *len)
+{
+ SOCKET_ENTRY();
+
+ int ret = 0;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( s );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ if( fp->f_type == CYG_FILE_TYPE_SOCKET )
+ {
+ cyg_sock_ops *ops = (cyg_sock_ops *)fp->f_xops;
+
+ LOCK_SOCKET( fp );
+
+ ret = ops->getname( fp, sa, len, 0 );
+
+ UNLOCK_SOCKET( fp );
+ }
+
+ cyg_fp_free( fp );
+
+ SOCKET_RETURN(ret);
+}
+
+
+// -------------------------------------------------------------------------
+
+__externC int getsockopt (int s, int level, int optname, void *optval, socklen_t *optlen)
+{
+ SOCKET_ENTRY();
+
+ int ret = 0;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( s );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ if( fp->f_type == CYG_FILE_TYPE_SOCKET )
+ {
+ cyg_sock_ops *ops = (cyg_sock_ops *)fp->f_xops;
+
+ LOCK_SOCKET( fp );
+
+ ret = ops->getsockopt( fp, level, optname, optval, optlen );
+
+ UNLOCK_SOCKET( fp );
+ }
+
+ cyg_fp_free( fp );
+
+ SOCKET_RETURN(ret);
+}
+
+
+// -------------------------------------------------------------------------
+
+__externC int listen (int s, int len)
+{
+ SOCKET_ENTRY();
+
+ int ret = 0;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( s );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ if( fp->f_type == CYG_FILE_TYPE_SOCKET )
+ {
+ cyg_sock_ops *ops = (cyg_sock_ops *)fp->f_xops;
+
+ LOCK_SOCKET( fp );
+
+ ret = ops->listen( fp, len );
+
+ UNLOCK_SOCKET( fp );
+ }
+
+ cyg_fp_free( fp );
+
+ SOCKET_RETURN(ret);
+}
+
+
+// -------------------------------------------------------------------------
+
+__externC ssize_t recvmsg (int s, struct msghdr *msg, int flags)
+{
+ SOCKET_ENTRY();
+
+ ssize_t ret = 0;
+ int error = 0;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( s );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ if( fp->f_type == CYG_FILE_TYPE_SOCKET )
+ {
+ cyg_sock_ops *ops = (cyg_sock_ops *)fp->f_xops;
+
+ LOCK_SOCKET( fp );
+
+ msg->msg_flags = flags;
+
+ error = ops->recvmsg( fp, msg, NULL, &ret );
+
+ UNLOCK_SOCKET( fp );
+ }
+
+ cyg_fp_free( fp );
+
+ if( error != ENOERR )
+ SOCKET_RETURN(error);
+
+ SOCKET_RETURN_VALUE( ret );
+}
+
+// -------------------------------------------------------------------------
+
+__externC ssize_t recvfrom (int s, void *buf, size_t len, int flags,
+ struct sockaddr *from, socklen_t *fromlen)
+{
+ SOCKET_ENTRY();
+
+ struct msghdr msg;
+ struct iovec iov;
+ ssize_t ret = 0;
+ int error = 0;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( s );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ if( fp->f_type == CYG_FILE_TYPE_SOCKET )
+ {
+ cyg_sock_ops *ops = (cyg_sock_ops *)fp->f_xops;
+
+ // Set up a message header...
+ msg.msg_name = (caddr_t)from;
+ msg.msg_namelen = fromlen ? *fromlen : 0;
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+ iov.iov_base = buf;
+ iov.iov_len = len;
+ msg.msg_control = 0;
+ msg.msg_flags = flags;
+
+ LOCK_SOCKET( fp );
+
+ error = ops->recvmsg( fp, &msg, fromlen, &ret );
+
+ UNLOCK_SOCKET( fp );
+ }
+
+ cyg_fp_free( fp );
+
+ if( error != ENOERR )
+ SOCKET_RETURN(error);
+
+ SOCKET_RETURN_VALUE( ret );
+
+}
+
+// -------------------------------------------------------------------------
+
+__externC ssize_t recv (int s, void *buf, size_t len, int flags)
+{
+ return recvfrom( s, buf, len, flags, NULL, NULL );
+}
+
+// -------------------------------------------------------------------------
+
+__externC ssize_t sendmsg (int s, const struct msghdr *msg, int flags)
+{
+ SOCKET_ENTRY();
+
+ ssize_t ret = 0;
+ int error = 0;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( s );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ if( fp->f_type == CYG_FILE_TYPE_SOCKET )
+ {
+ cyg_sock_ops *ops = (cyg_sock_ops *)fp->f_xops;
+
+ LOCK_SOCKET( fp );
+
+ error = ops->sendmsg( fp, msg, flags, &ret );
+
+ UNLOCK_SOCKET( fp );
+ }
+
+ cyg_fp_free( fp );
+
+ if( error != ENOERR )
+ SOCKET_RETURN(error);
+
+ SOCKET_RETURN_VALUE( ret );
+}
+
+
+// -------------------------------------------------------------------------
+
+__externC ssize_t sendto (int s, const void *buf,
+ size_t len, int flags, const struct sockaddr *to, socklen_t tolen)
+{
+ SOCKET_ENTRY();
+
+ ssize_t ret = 0;
+ int error = 0;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( s );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ if( fp->f_type == CYG_FILE_TYPE_SOCKET )
+ {
+ cyg_sock_ops *ops = (cyg_sock_ops *)fp->f_xops;
+
+
+ struct msghdr msg;
+ struct iovec iov;
+
+ msg.msg_name = (caddr_t)to;
+ msg.msg_namelen = tolen;
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+ msg.msg_control = 0;
+ msg.msg_flags = 0;
+ iov.iov_base = (char *)buf;
+ iov.iov_len = len;
+
+ LOCK_SOCKET( fp );
+
+ error = ops->sendmsg( fp, &msg, flags, &ret );
+
+ UNLOCK_SOCKET( fp );
+ }
+
+ cyg_fp_free( fp );
+
+ if( error != ENOERR )
+ SOCKET_RETURN(error);
+
+ SOCKET_RETURN_VALUE( ret );
+}
+
+// -------------------------------------------------------------------------
+
+__externC ssize_t send (int s, const void *buf, size_t len, int flags)
+{
+ return sendto( s, buf, len, flags, NULL, 0 );
+}
+
+
+// -------------------------------------------------------------------------
+
+__externC int setsockopt (int s, int level, int optname,
+ const void *optval, socklen_t optlen)
+{
+ SOCKET_ENTRY();
+
+ int ret = 0;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( s );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ if( fp->f_type == CYG_FILE_TYPE_SOCKET )
+ {
+ cyg_sock_ops *ops = (cyg_sock_ops *)fp->f_xops;
+
+ LOCK_SOCKET( fp );
+
+ ret = ops->setsockopt( fp, level, optname, optval, optlen );
+
+ UNLOCK_SOCKET( fp );
+ }
+
+ cyg_fp_free( fp );
+
+ SOCKET_RETURN(ret);
+}
+
+// -------------------------------------------------------------------------
+
+__externC int shutdown (int s, int how)
+{
+ SOCKET_ENTRY();
+
+ int ret = 0;
+ cyg_file *fp;
+
+ fp = cyg_fp_get( s );
+
+ if( fp == NULL )
+ FILEIO_RETURN(EBADF);
+
+ if( fp->f_type == CYG_FILE_TYPE_SOCKET )
+ {
+ cyg_sock_ops *ops = (cyg_sock_ops *)fp->f_xops;
+
+ LOCK_SOCKET( fp );
+
+ ret = ops->shutdown( fp, how );
+
+ UNLOCK_SOCKET( fp );
+ }
+
+ cyg_fp_free( fp );
+
+ SOCKET_RETURN(ret);
+}
+
+//==========================================================================
+// Locking protocol
+
+static void cyg_ns_lock( cyg_nstab_entry *ns )
+{
+ if( ns->syncmode & CYG_SYNCMODE_SOCK_NETSTACK )
+ {
+ nstab_lock[ns-&cyg_nstab[0]].lock();
+ }
+}
+
+static void cyg_ns_unlock( cyg_nstab_entry *ns )
+{
+ if( ns->syncmode & CYG_SYNCMODE_SOCK_NETSTACK )
+ {
+ nstab_lock[ns-&cyg_nstab[0]].unlock();
+ }
+}
+
+static void cyg_sock_lock( cyg_file *fp )
+{
+ cyg_nstab_entry *ns = (cyg_nstab_entry *)fp->f_mte;
+
+ if( fp->f_syncmode & CYG_SYNCMODE_SOCK_NETSTACK )
+ nstab_lock[ns-&cyg_nstab[0]].lock();
+
+ cyg_file_lock( fp, fp->f_syncmode>>CYG_SYNCMODE_SOCK_SHIFT);
+}
+
+static void cyg_sock_unlock( cyg_file *fp )
+{
+ cyg_nstab_entry *ns = (cyg_nstab_entry *)fp->f_mte;
+
+ if( fp->f_syncmode & CYG_SYNCMODE_SOCK_NETSTACK )
+ nstab_lock[ns-&cyg_nstab[0]].unlock();
+
+ cyg_file_unlock( fp, fp->f_syncmode>>CYG_SYNCMODE_SOCK_SHIFT);
+}
+
+
+// -------------------------------------------------------------------------
+// EOF socket.cxx
diff --git a/cesar/ecos/packages/io/fileio/current/tests/fileio1.c b/cesar/ecos/packages/io/fileio/current/tests/fileio1.c
new file mode 100644
index 0000000000..61b7f40277
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/tests/fileio1.c
@@ -0,0 +1,464 @@
+//==========================================================================
+//
+// fileio1.c
+//
+// Test fileio system
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-05-25
+// Purpose: Test fileio system
+// Description: This test uses the testfs to check out the initialization
+// and basic operation of the fileio system
+//
+//
+//
+//
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/io_fileio.h>
+
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <string.h>
+
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h> // HAL polled output
+
+//==========================================================================
+// Include the test filesystem.
+// If we could make tests out of multiple files, then we could just link
+// against the object file for this rather than including it.
+
+#include "testfs.c"
+
+//==========================================================================
+
+#define SHOW_RESULT( _fn, _res ) \
+diag_printf("<INFO>: " #_fn "() returned %ld %s\n", (long)_res, _res<0?strerror(errno):"");
+
+//==========================================================================
+
+#define IOSIZE 100
+
+//==========================================================================
+
+static void listdir( char *name, int statp )
+{
+ int err;
+ DIR *dirp;
+
+ diag_printf("<INFO>: reading directory %s\n",name);
+
+ dirp = opendir( name );
+ if( dirp == NULL ) SHOW_RESULT( opendir, -1 );
+
+ for(;;)
+ {
+ struct dirent *entry = readdir( dirp );
+
+ if( entry == NULL )
+ break;
+
+ diag_printf("<INFO>: entry %14s",entry->d_name);
+ if( statp )
+ {
+ char fullname[PATH_MAX];
+ struct stat sbuf;
+
+ if( name[0] )
+ {
+ strcpy(fullname, name );
+ if( !(name[0] == '/' && name[1] == 0 ) )
+ strcat(fullname, "/" );
+ }
+ else fullname[0] = 0;
+
+ strcat(fullname, entry->d_name );
+
+ err = stat( fullname, &sbuf );
+ if( err < 0 )
+ {
+ if( errno == ENOSYS )
+ diag_printf(" <no status available>");
+ else SHOW_RESULT( stat, err );
+ }
+ else
+ {
+ diag_printf(" [mode %08x nlink %d size %ld]",
+ sbuf.st_mode,sbuf.st_nlink,sbuf.st_size);
+ }
+ }
+
+ diag_printf("\n");
+ }
+
+ err = closedir( dirp );
+ if( err < 0 ) SHOW_RESULT( stat, err );
+}
+
+//==========================================================================
+
+static void createfile( char *name, size_t size )
+{
+ char buf[IOSIZE];
+ int fd;
+ ssize_t wrote;
+ int i;
+ int err;
+
+ diag_printf("<INFO>: create file %s size %d\n",name,size);
+
+ err = access( name, F_OK );
+ if( err < 0 && errno != EACCES ) SHOW_RESULT( access, err );
+
+ for( i = 0; i < IOSIZE; i++ ) buf[i] = i%256;
+
+ fd = open( name, O_WRONLY|O_CREAT );
+ if( fd < 0 ) SHOW_RESULT( open, fd );
+
+ while( size > 0 )
+ {
+ ssize_t len = size;
+ if ( len > IOSIZE ) len = IOSIZE;
+
+ wrote = write( fd, buf, len );
+ if( wrote != len ) SHOW_RESULT( write, wrote );
+
+ size -= wrote;
+ }
+
+ err = close( fd );
+ if( err < 0 ) SHOW_RESULT( close, err );
+}
+
+//==========================================================================
+
+static void maxfile( char *name )
+{
+ char buf[IOSIZE];
+ int fd;
+ ssize_t wrote;
+ int i;
+ int err;
+ size_t size = 0;
+
+ diag_printf("<INFO>: create maximal file %s\n",name);
+
+ err = access( name, F_OK );
+ if( err < 0 && errno != EACCES ) SHOW_RESULT( access, err );
+
+ for( i = 0; i < IOSIZE; i++ ) buf[i] = i%256;
+
+ fd = open( name, O_WRONLY|O_CREAT );
+ if( fd < 0 ) SHOW_RESULT( open, fd );
+
+ do
+ {
+ wrote = write( fd, buf, IOSIZE );
+ if( wrote < 0 ) SHOW_RESULT( write, wrote );
+
+ size += wrote;
+
+ } while( wrote == IOSIZE );
+
+ diag_printf("<INFO>: file size == %d\n",size);
+
+ err = close( fd );
+ if( err < 0 ) SHOW_RESULT( close, err );
+}
+
+//==========================================================================
+
+static void checkfile( char *name )
+{
+ char buf[IOSIZE];
+ int fd;
+ ssize_t done;
+ int i;
+ int err;
+
+ diag_printf("<INFO>: check file %s\n",name);
+
+ err = access( name, F_OK );
+ if( err != 0 ) SHOW_RESULT( access, err );
+
+ fd = open( name, O_RDONLY );
+ if( fd < 0 ) SHOW_RESULT( open, fd );
+
+ for(;;)
+ {
+ done = read( fd, buf, IOSIZE );
+ if( done < 0 ) SHOW_RESULT( read, done );
+
+ if( done == 0 ) break;
+
+ for( i = 0; i < done; i++ )
+ if( buf[i] != i%256 )
+ {
+ diag_printf("buf[%d](%02x) != %02x\n",i,buf[i],i%256);
+ CYG_TEST_FAIL("Data read not equal to data written\n");
+ }
+ }
+
+ err = close( fd );
+ if( err < 0 ) SHOW_RESULT( close, err );
+}
+
+//==========================================================================
+
+static void copyfile( char *name2, char *name1 )
+{
+
+ int err;
+ char buf[IOSIZE];
+ int fd1, fd2;
+ ssize_t done, wrote;
+
+ diag_printf("<INFO>: copy file %s -> %s\n",name2,name1);
+
+ err = access( name1, F_OK );
+ if( err < 0 && errno != EACCES ) SHOW_RESULT( access, err );
+
+ err = access( name2, F_OK );
+ if( err != 0 ) SHOW_RESULT( access, err );
+
+ fd1 = open( name1, O_WRONLY|O_CREAT );
+ if( fd1 < 0 ) SHOW_RESULT( open, fd1 );
+
+ fd2 = open( name2, O_RDONLY );
+ if( fd2 < 0 ) SHOW_RESULT( open, fd2 );
+
+ for(;;)
+ {
+ done = read( fd2, buf, IOSIZE );
+ if( done < 0 ) SHOW_RESULT( read, done );
+
+ if( done == 0 ) break;
+
+ wrote = write( fd1, buf, done );
+ if( wrote != done ) SHOW_RESULT( write, wrote );
+
+ if( wrote != done ) break;
+ }
+
+ err = close( fd1 );
+ if( err < 0 ) SHOW_RESULT( close, err );
+
+ err = close( fd2 );
+ if( err < 0 ) SHOW_RESULT( close, err );
+
+}
+
+//==========================================================================
+
+static void comparefiles( char *name2, char *name1 )
+{
+ int err;
+ char buf1[IOSIZE];
+ char buf2[IOSIZE];
+ int fd1, fd2;
+ ssize_t done1, done2;
+ int i;
+
+ diag_printf("<INFO>: compare files %s == %s\n",name2,name1);
+
+ err = access( name1, F_OK );
+ if( err != 0 ) SHOW_RESULT( access, err );
+
+ err = access( name1, F_OK );
+ if( err != 0 ) SHOW_RESULT( access, err );
+
+ fd1 = open( name1, O_RDONLY );
+ if( fd1 < 0 ) SHOW_RESULT( open, fd1 );
+
+ fd2 = open( name2, O_RDONLY );
+ if( fd2 < 0 ) SHOW_RESULT( open, fd2 );
+
+ for(;;)
+ {
+ done1 = read( fd1, buf1, IOSIZE );
+ if( done1 < 0 ) SHOW_RESULT( read, done1 );
+
+ done2 = read( fd2, buf2, IOSIZE );
+ if( done2 < 0 ) SHOW_RESULT( read, done2 );
+
+ if( done1 != done2 )
+ diag_printf("Files different sizes\n");
+
+ if( done1 == 0 ) break;
+
+ for( i = 0; i < done1; i++ )
+ if( buf1[i] != buf2[i] )
+ {
+ diag_printf("buf1[%d](%02x) != buf1[%d](%02x)\n",i,buf1[i],i,buf2[i]);
+ CYG_TEST_FAIL("Data in files not equal\n");
+ }
+ }
+
+ err = close( fd1 );
+ if( err < 0 ) SHOW_RESULT( close, err );
+
+ err = close( fd2 );
+ if( err < 0 ) SHOW_RESULT( close, err );
+
+}
+
+//==========================================================================
+// main
+
+int cyg_user_start(void)
+{
+ int err;
+
+ CYG_TEST_INIT();
+
+ // --------------------------------------------------------------
+
+ createfile( "/foo", 202 );
+ checkfile( "foo" );
+ copyfile( "foo", "fee");
+ checkfile( "fee" );
+ comparefiles( "foo", "/fee" );
+
+ err = mkdir( "/bar", 0 );
+ if( err < 0 ) SHOW_RESULT( mkdir, err );
+
+ listdir( "/" , false);
+
+ copyfile( "fee", "/bar/fum" );
+ checkfile( "bar/fum" );
+ comparefiles( "/fee", "bar/fum" );
+
+
+ err = chdir( "bar" );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+
+ err = rename( "/foo", "bundy" );
+ if( err < 0 ) SHOW_RESULT( rename, err );
+
+ listdir( "/", true );
+ listdir( "" , true );
+
+ checkfile( "/bar/bundy" );
+ comparefiles("/fee", "bundy" );
+
+ testfs_dump();
+
+ // --------------------------------------------------------------
+
+ err = unlink( "/fee" );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+ err = unlink( "fum" );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+ err = unlink( "/bar/bundy" );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+ err = chdir( "/" );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+
+ err = rmdir( "/bar" );
+ if( err < 0 ) SHOW_RESULT( rmdir, err );
+
+ listdir( "/", false );
+
+ // --------------------------------------------------------------
+
+ err = mount( "", "/ram", "testfs" );
+ if( err < 0 ) SHOW_RESULT( mount, err );
+
+ createfile( "/ram/tinky", 456 );
+ copyfile( "/ram/tinky", "/ram/laalaa" );
+ checkfile( "/ram/tinky");
+ checkfile( "/ram/laalaa");
+ comparefiles( "/ram/tinky", "/ram/laalaa" );
+
+ err = chdir( "/ram" );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+
+ createfile( "tinky", 678 );
+ checkfile( "tinky" );
+
+ maxfile( "dipsy" );
+ checkfile( "dipsy" );
+ copyfile( "dipsy", "po" );
+ checkfile( "po" );
+ comparefiles( "dipsy", "po" );
+
+ testfs_dump();
+
+ // --------------------------------------------------------------
+
+ err = unlink( "tinky" );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+ err = unlink( "dipsy" );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+ err = unlink( "po" );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+ err = unlink( "laalaa" );
+ if( err < 0 ) SHOW_RESULT( unlink, err );
+
+ err = chdir( "/" );
+ if( err < 0 ) SHOW_RESULT( chdir, err );
+
+ err = umount( "/ram" );
+ if( err < 0 ) SHOW_RESULT( umount, err );
+
+ CYG_TEST_PASS_FINISH("fileio1");
+}
+
+// -------------------------------------------------------------------------
+// EOF fileio1.c
diff --git a/cesar/ecos/packages/io/fileio/current/tests/pselect.c b/cesar/ecos/packages/io/fileio/current/tests/pselect.c
new file mode 100644
index 0000000000..083ff437d7
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/tests/pselect.c
@@ -0,0 +1,375 @@
+//==========================================================================
+//
+// pselect.c
+//
+// Test pselect implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Nick Garnett
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2002-11-08
+// Purpose: Test pselect implementation
+// Description:
+//
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/isoinfra.h>
+#ifdef CYGPKG_POSIX
+#include <pkgconf/posix.h>
+#endif
+
+#ifndef CYGINT_ISO_PTHREAD_IMPL
+# define NA_MSG "POSIX threads needed to run test"
+#elif !defined(CYGPKG_NET)
+# define NA_MSG "NET package needed to run test"
+#elif !defined(CYGPKG_POSIX_SIGNALS)
+# define NA_MSG "POSIX signals package needed to run test"
+#endif
+
+#include <cyg/infra/testcase.h>
+
+#ifndef NA_MSG
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/io_fileio.h>
+
+#define __ECOS 1 // dont like this at all
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <string.h>
+
+#include <network.h>
+#include <arpa/inet.h>
+
+#include <pthread.h>
+#include <signal.h>
+
+#include <sys/select.h>
+
+
+#include <cyg/infra/diag.h> // HAL polled output
+
+#define NUM_TEST_SIGNALS 1500 // So test completes in ~30 seconds
+
+//--------------------------------------------------------------------------
+
+#define SHOW_RESULT( _fn, _res ) \
+diag_printf("INFO: " #_fn "() returned %d %s\n", _res, _res<0?strerror(errno):"");
+
+//--------------------------------------------------------------------------
+// Thread stacks
+
+char thread1_stack[PTHREAD_STACK_MIN*2];
+char thread2_stack[PTHREAD_STACK_MIN*2];
+
+//--------------------------------------------------------------------------
+// Local variables
+
+// Thread IDs
+pthread_t thread1;
+pthread_t thread2;
+
+struct sockaddr_in sa;
+
+volatile int sigusr1_calls = 0;
+volatile int sigusr1_sent = 0;
+volatile int pselect_wakeups = 0;
+volatile int pselect_eintr = 0;
+
+volatile cyg_bool running = true;
+
+//--------------------------------------------------------------------------
+
+void show_fdsets( char *s, int nfd, fd_set *rd, fd_set *wr, fd_set *ex )
+{
+ int i;
+ diag_printf("INFO:<%s nfd %d ",s,nfd);
+
+ if( rd )
+ {
+ diag_printf("rd: [");
+ for( i = 0; i < nfd ; i++ )
+ if( FD_ISSET( i, rd ) ) diag_printf("%d ",i);
+ diag_printf("] ");
+ }
+ if( wr )
+ {
+ diag_printf("wr: [");
+ for( i = 0; i < nfd ; i++ )
+ if( FD_ISSET( i, wr ) ) diag_printf("%d ",i);
+ diag_printf("] ");
+ }
+ if( ex )
+ {
+ diag_printf("ex: [");
+ for( i = 0; i < nfd ; i++ )
+ if( FD_ISSET( i, ex ) ) diag_printf("%d ",i);
+ diag_printf("] ");
+ }
+
+ diag_printf(">\n");
+}
+
+//--------------------------------------------------------------------------
+
+void sigusr1( int sig, siginfo_t *info, void *context )
+{
+ CYG_TEST_CHECK( pthread_self() == thread1, "Sigusr1: not called by thread 1\n");
+
+ sigusr1_calls++;
+}
+
+//--------------------------------------------------------------------------
+// Selecting thread
+
+// This thread just opens up a socket ready to accept a connection and
+// then calls pselect() to wait for it. The timeout is set to 0 so we
+// actually just poll.
+
+void *pthread_entry1( void *arg)
+{
+ int fd = 0;
+ int err;
+ fd_set rd, wr;
+ sigset_t mask, oldmask;
+ struct sigaction sigact;
+ struct timespec ts;
+
+ CYG_TEST_INFO( "Thread 1 running" );
+
+ FD_ZERO( &rd );
+ FD_ZERO( &wr );
+
+ sigfillset( &mask );
+ pthread_sigmask( SIG_SETMASK, &mask, &oldmask );
+
+ sigdelset( &mask, SIGUSR1 );
+
+ sigact.sa_mask = mask;
+ sigact.sa_flags = SA_SIGINFO;
+ sigact.sa_sigaction = sigusr1;
+
+ err = sigaction( SIGUSR1, &sigact, NULL );
+ if( err < 0 ) SHOW_RESULT( sigact, err );
+
+ CYG_TEST_INFO( "Thread1: calling socket()");
+ fd = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP );
+ if( fd < 0 ) SHOW_RESULT( socket, fd );
+ CYG_TEST_CHECK( fd >= 0, "socket() returned error");
+
+ CYG_TEST_INFO( "Thread1: calling bind()");
+ err = bind( fd, (struct sockaddr *)&sa, sizeof(sa));
+ if( err < 0 ) SHOW_RESULT( bind, err );
+ CYG_TEST_CHECK( err == 0, "bind() returned error");
+
+ CYG_TEST_INFO( "Thread1: calling listen()");
+ err = listen( fd, 3);
+ if( err < 0 ) SHOW_RESULT( listen, err );
+ CYG_TEST_CHECK( err == 0, "listen() returned error");
+
+ FD_SET( fd, &rd );
+
+ ts.tv_sec = 0;
+ ts.tv_nsec = 0;
+
+
+ while( running )
+ {
+ fd_set rd_res = rd;
+ fd_set wr_res = wr;
+
+// ts.tv_nsec = 1000000 * (pselect_wakeups % 10);
+
+ err = pselect( 8, &rd_res, &wr_res, NULL, &ts, &mask );
+ if( err < 0 )
+ {
+ if( errno == EINTR ) pselect_eintr++;
+ else SHOW_RESULT( pselect, err );
+ }
+ if( err > 0 ) show_fdsets( "Thread1 result: ", 8, &rd_res, &wr_res, NULL );
+ pselect_wakeups++;
+
+ }
+
+ // If we were interrupted at just the wrong point above we may still
+ // have a SIGUSR1 signal pending that we didn't handle, and so won't
+ // have accounted for. So let's look...
+ CYG_TEST_CHECK( 0 == sigpending( &mask ), "sigpending() returned error");
+ if (1 == sigismember(&mask, SIGUSR1) )
+ pselect_eintr++;
+
+ pthread_sigmask( SIG_SETMASK, &oldmask, NULL );
+
+ pthread_exit(arg);
+}
+
+//--------------------------------------------------------------------------
+
+void *pthread_entry2( void *arg)
+{
+ struct timespec zzz;
+ int err;
+
+ zzz.tv_sec = 0;
+ zzz.tv_nsec = 10*1000000;
+
+ CYG_TEST_INFO( "Thread 2: running" );
+
+ CYG_TEST_INFO( "Thread 2: sleeping" );
+ nanosleep( &zzz, NULL );
+ nanosleep( &zzz, NULL );
+ nanosleep( &zzz, NULL );
+
+ while( sigusr1_sent < NUM_TEST_SIGNALS )
+ {
+ nanosleep( &zzz, NULL );
+
+ err = pthread_kill( thread1, SIGUSR1 );
+ if( err < 0 ) SHOW_RESULT( pthread_kill, err );
+
+ sigusr1_sent++;
+
+ if( (sigusr1_sent % 500) == 0 )
+ diag_printf("INFO: <Thread 2: %d signals sent>\n",sigusr1_sent);
+ }
+
+ running = false;
+
+ CYG_TEST_INFO( "Thread 2: exit" );
+ pthread_exit( arg );
+}
+
+//==========================================================================
+// main
+
+int main( int argc, char **argv )
+{
+ void *retval;
+ pthread_attr_t attr;
+ struct sched_param schedparam;
+
+ CYG_TEST_INIT();
+
+ sa.sin_family = AF_INET;
+ sa.sin_len = sizeof(sa);
+ inet_aton("127.0.0.1", &sa.sin_addr);
+ sa.sin_port = htons(1234);
+ init_all_network_interfaces();
+
+ // Create test threads
+
+ {
+ pthread_attr_init( &attr );
+
+ schedparam.sched_priority = 5;
+ pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
+ pthread_attr_setschedpolicy( &attr, SCHED_RR );
+ pthread_attr_setschedparam( &attr, &schedparam );
+ pthread_attr_setstackaddr( &attr, (void *)&thread1_stack[sizeof(thread1_stack)] );
+ pthread_attr_setstacksize( &attr, sizeof(thread1_stack) );
+
+ pthread_create( &thread1,
+ &attr,
+ pthread_entry1,
+ (void *)0x12345671);
+ }
+
+ {
+ pthread_attr_init( &attr );
+
+ schedparam.sched_priority = 10;
+ pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
+ pthread_attr_setschedpolicy( &attr, SCHED_RR );
+ pthread_attr_setschedparam( &attr, &schedparam );
+ pthread_attr_setstackaddr( &attr, (void *)&thread2_stack[sizeof(thread2_stack)] );
+ pthread_attr_setstacksize( &attr, sizeof(thread2_stack) );
+
+ pthread_create( &thread2,
+ &attr,
+ pthread_entry2,
+ (void *)0x12345672);
+ }
+
+ // Now join with thread1
+ CYG_TEST_INFO( "Main: calling pthread_join(thread1)");
+ pthread_join( thread1, &retval );
+
+ // And thread 2
+ CYG_TEST_INFO( "Main: calling pthread_join(thread2)");
+ pthread_join( thread2, &retval );
+
+ diag_printf("INFO: pselect returns: %d\n", pselect_wakeups );
+ diag_printf("INFO: pselect EINTR returns: %d\n", pselect_eintr );
+ diag_printf("INFO: SIGUSR1 sent: %d\n", sigusr1_sent );
+ diag_printf("INFO: SIGUSR1 delivered: %d\n", sigusr1_calls );
+
+ CYG_TEST_CHECK( sigusr1_sent == sigusr1_calls, "SIGUSR1 calls != delivered");
+ CYG_TEST_CHECK( sigusr1_sent == pselect_eintr, "SIGUSR1 calls != pselect EINTR wakeups");
+
+ CYG_TEST_PASS_FINISH("pselect");
+}
+
+#else
+
+//==========================================================================
+// main
+
+void cyg_start(void)
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_NA(NA_MSG);
+}
+
+#endif
+
diff --git a/cesar/ecos/packages/io/fileio/current/tests/select.c b/cesar/ecos/packages/io/fileio/current/tests/select.c
new file mode 100644
index 0000000000..b9f6b36c9f
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/tests/select.c
@@ -0,0 +1,638 @@
+//==========================================================================
+//
+// select.c
+//
+// Test select implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-05-25
+// Purpose: Test select implementation
+// Description:
+//
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/isoinfra.h>
+
+#ifndef CYGINT_ISO_PTHREAD_IMPL
+# define NA_MSG "POSIX threads needed to run test"
+#endif
+
+#include <cyg/infra/testcase.h>
+
+#ifndef NA_MSG
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/io_fileio.h>
+
+#ifdef CYGPKG_IO_SERIAL
+#include <pkgconf/io_serial.h>
+#endif
+
+#define __ECOS 1 // dont like this at all
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/select.h>
+#include <errno.h>
+#include <string.h>
+
+#ifdef CYGPKG_NET
+#include <network.h>
+#include <arpa/inet.h>
+#define TEST_NET
+#endif
+
+#ifdef CYGPKG_IO_SERIAL_LOOP
+#define TEST_DEV
+#endif
+
+#include <pthread.h>
+#include <signal.h>
+
+
+#include <cyg/infra/diag.h> // HAL polled output
+
+//--------------------------------------------------------------------------
+
+#define SHOW_RESULT( _fn, _res ) \
+diag_printf("INFO: " #_fn "() returned %ld %s\n", (long)_res, _res<0?strerror(errno):"");
+
+//--------------------------------------------------------------------------
+// Thread stack.
+
+char thread1_stack[PTHREAD_STACK_MIN*2];
+char thread2_stack[PTHREAD_STACK_MIN*2];
+
+//--------------------------------------------------------------------------
+// Local variables
+
+// Thread IDs
+pthread_t thread1;
+pthread_t thread2;
+
+#ifdef TEST_NET
+struct sockaddr_in sa;
+#endif
+
+//--------------------------------------------------------------------------
+// Test buffers
+// The buffer size here must be less that the size of the serial device
+// buffers since the serial devices do not currently implement flow
+// control.
+
+#define TEST_BUFSIZE 100
+
+#ifdef TEST_NET
+static char buf1[TEST_BUFSIZE];
+static char buf2[TEST_BUFSIZE];
+static char buf3[TEST_BUFSIZE];
+#endif
+#ifdef TEST_DEV
+static char sbuf1[TEST_BUFSIZE];
+static char sbuf2[TEST_BUFSIZE];
+static char sbuf3[TEST_BUFSIZE];
+#endif
+
+
+//--------------------------------------------------------------------------
+
+void show_fdsets( char *s, int nfd, fd_set *rd, fd_set *wr, fd_set *ex )
+{
+ int i;
+ diag_printf("INFO:<%s nfd %d ",s,nfd);
+
+ if( rd )
+ {
+ diag_printf("rd: [");
+ for( i = 0; i < nfd ; i++ )
+ if( FD_ISSET( i, rd ) ) diag_printf("%d ",i);
+ diag_printf("] ");
+ }
+ if( wr )
+ {
+ diag_printf("wr: [");
+ for( i = 0; i < nfd ; i++ )
+ if( FD_ISSET( i, wr ) ) diag_printf("%d ",i);
+ diag_printf("] ");
+ }
+ if( ex )
+ {
+ diag_printf("ex: [");
+ for( i = 0; i < nfd ; i++ )
+ if( FD_ISSET( i, ex ) ) diag_printf("%d ",i);
+ diag_printf("] ");
+ }
+
+ diag_printf(">\n");
+}
+
+
+//--------------------------------------------------------------------------
+
+void *pthread_entry1( void *arg)
+{
+#ifdef TEST_NET
+ int fd = 0, fd2 = -1;
+ struct sockaddr_in accsa;
+ socklen_t accsa_len = sizeof(accsa);
+ int netstate = 0;
+#endif
+#ifdef TEST_DEV
+ int ser0;
+ int serstate = 0;
+#endif
+#if defined(TEST_DEV) || defined(TEST_NET)
+ int i;
+ ssize_t done;
+#endif
+ int netdone = 0;
+ int serdone = 0;
+ int err;
+ fd_set rd, wr;
+
+ CYG_TEST_INFO( "Thread 1 running" );
+
+ FD_ZERO( &rd );
+ FD_ZERO( &wr );
+
+#ifdef TEST_DEV
+
+ CYG_TEST_INFO( "Thread1: calling open()");
+ ser0 = open("/dev/ser0", O_RDWR );
+ if( ser0 < 0 ) SHOW_RESULT( open, ser0 );
+ CYG_TEST_CHECK( ser0 >= 0, "open(/dev/ser0) returned error");
+
+ FD_SET( ser0, &rd );
+#else
+ serdone = 1;
+#endif
+
+#ifdef TEST_NET
+
+ for( i = 0; i < TEST_BUFSIZE; i++ ) buf1[i] = i;
+
+ CYG_TEST_INFO( "Thread1: calling socket()");
+ fd = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP );
+ if( fd < 0 ) SHOW_RESULT( socket, fd );
+ CYG_TEST_CHECK( fd >= 0, "socket() returned error");
+
+ CYG_TEST_INFO( "Thread1: calling bind()");
+ err = bind( fd, (struct sockaddr *)&sa, sizeof(sa));
+ if( err < 0 ) SHOW_RESULT( bind, err );
+ CYG_TEST_CHECK( err == 0, "bind() returned error");
+
+ CYG_TEST_INFO( "Thread1: calling listen()");
+ err = listen( fd, 3);
+ if( err < 0 ) SHOW_RESULT( listen, err );
+ CYG_TEST_CHECK( err == 0, "listen() returned error");
+
+ FD_SET( fd, &rd );
+
+#else
+ netdone = 1;
+#endif
+
+ while(!(netdone && serdone))
+ {
+ fd_set rd_res = rd;
+ fd_set wr_res = wr;
+
+ CYG_TEST_INFO( "Thread1: calling select()");
+ show_fdsets( "Thread1 request: ", 8, &rd_res, &wr_res, NULL );
+ err = select( 8, &rd_res, &wr_res, NULL, NULL );
+ if( err < 0 ) SHOW_RESULT( select, err );
+ CYG_TEST_CHECK( err >= 0, "select() returned error");
+ show_fdsets( "Thread1 result: ", 8, &rd_res, &wr_res, NULL );
+
+#ifdef TEST_NET
+ switch( netstate )
+ {
+ case 0:
+ CYG_TEST_INFO( "Thread1: netstate 0");
+ if( FD_ISSET( fd, &rd_res ) )
+ {
+ CYG_TEST_INFO( "Thread1: calling accept(fd)");
+ fd2 = accept( fd, (struct sockaddr *)&accsa, &accsa_len );
+ if( fd2 < 0 ) SHOW_RESULT( accept, fd2 );
+ CYG_TEST_CHECK( fd2 >= 0, "accept() returned error");
+
+ FD_CLR( fd, &rd );
+ FD_SET( fd2, &wr );
+
+ netstate++;
+ }
+ break;
+
+
+ case 1:
+ CYG_TEST_INFO( "Thread1: netstate 1");
+ if( FD_ISSET( fd2, &wr_res ) )
+ {
+
+ CYG_TEST_INFO( "Thread1: calling write(fd2)");
+ done = write( fd2, buf1, TEST_BUFSIZE);
+ if( done != TEST_BUFSIZE ) SHOW_RESULT( write, done );
+ CYG_TEST_CHECK( done == TEST_BUFSIZE, "write() returned bad size");
+
+ FD_CLR( fd2, &wr );
+ FD_SET( fd2, &rd );
+
+ netstate++;
+ }
+ break;
+
+ case 2:
+ CYG_TEST_INFO( "Thread1: netstate 2");
+ if( FD_ISSET( fd2, &rd_res ) )
+ {
+ CYG_TEST_INFO( "Thread1: calling read(fd2)");
+ done = read( fd2, buf3, TEST_BUFSIZE);
+ if( done != TEST_BUFSIZE ) SHOW_RESULT( read, done );
+ CYG_TEST_CHECK( done == TEST_BUFSIZE, "read() returned bad size");
+
+ for( i = 0; i < TEST_BUFSIZE; i++ )
+ if( buf1[i] != buf3[i] )
+ diag_printf("buf1[%d](%02x) != buf3[%d](%02x)\n",i,buf1[i],i,buf3[i]);
+
+ FD_CLR( fd2, &rd );
+
+ netstate++;
+ netdone = 1;
+ CYG_TEST_INFO( "Thread1: netdone");
+ }
+ break;
+
+ }
+#endif
+
+#ifdef TEST_DEV
+ switch( serstate )
+ {
+ case 0:
+ CYG_TEST_INFO( "Thread1: serstate 0");
+ if( FD_ISSET( ser0, &rd_res ) )
+ {
+ CYG_TEST_INFO( "Thread1: calling read(ser0)");
+ done = read( ser0, sbuf2, TEST_BUFSIZE);
+ if( done != TEST_BUFSIZE ) SHOW_RESULT( read, done );
+ CYG_TEST_CHECK( done == TEST_BUFSIZE, "read() returned bad size");
+
+ for( i = 0; i < TEST_BUFSIZE; i++ )
+ if( sbuf1[i] != sbuf2[i] )
+ diag_printf("buf1[%d](%02x) != buf2[%d](%02x)\n",i,sbuf1[i],i,sbuf2[i]);
+
+ FD_CLR( ser0, &rd );
+ FD_SET( ser0, &wr );
+ serstate++;
+
+ }
+ break;
+
+ case 1:
+ CYG_TEST_INFO( "Thread1: serstate 1");
+ if( FD_ISSET( ser0, &wr_res ) )
+ {
+ CYG_TEST_INFO( "Thread1: calling write(ser0)");
+ done = write( ser0, sbuf2, TEST_BUFSIZE);
+ if( done != TEST_BUFSIZE ) SHOW_RESULT( write, done );
+ CYG_TEST_CHECK( done == TEST_BUFSIZE, "write() returned bad size");
+
+ FD_CLR( ser0, &wr );
+
+ serstate++;
+ serdone = 1;
+ CYG_TEST_INFO( "Thread1: serdone");
+ }
+ else FD_SET( ser0, &wr );
+ break;
+ }
+#endif
+ }
+
+#ifdef TEST_NET
+ CYG_TEST_INFO( "Thread1: calling close(fd)");
+ err = close(fd);
+ if( err < 0 ) SHOW_RESULT( close, err );
+ CYG_TEST_CHECK( err == 0, "close() returned error");
+
+ if( fd2 >= 0 )
+ {
+ CYG_TEST_INFO( "Thread1: calling close(fd2)");
+ err = close(fd2);
+ if( err < 0 ) SHOW_RESULT( close, err );
+ CYG_TEST_CHECK( err == 0, "close() returned error");
+ }
+#endif
+#ifdef TEST_DEV
+ CYG_TEST_INFO( "Thread1: calling close(ser0)");
+ err = close(ser0);
+ if( err < 0 ) SHOW_RESULT( close, err );
+ CYG_TEST_CHECK( err == 0, "close() returned error");
+#endif
+
+ CYG_TEST_INFO( "Thread1: calling pthread_exit()");
+ pthread_exit( arg );
+}
+
+//--------------------------------------------------------------------------
+
+void *pthread_entry2( void *arg)
+{
+#ifdef TEST_NET
+ int fd;
+ int netstate = 0;
+#endif
+#ifdef TEST_DEV
+ int ser1;
+ int serstate = 0;
+#endif
+#if defined(TEST_DEV) || defined(TEST_NET)
+ int i;
+ ssize_t done;
+#endif
+ int netdone = 0;
+ int serdone = 0;
+ int err;
+ fd_set rd, wr;
+
+ CYG_TEST_INFO( "Thread 2 running" );
+
+ FD_ZERO( &rd );
+ FD_ZERO( &wr );
+
+#ifdef TEST_NET
+ CYG_TEST_INFO( "Thread2: calling socket()");
+ fd = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP );
+ if( fd < 0 ) SHOW_RESULT( socket, fd );
+ CYG_TEST_CHECK( fd >= 0, "socket() returned error");
+
+ CYG_TEST_INFO( "Thread2: calling connect()");
+ err = connect( fd, (struct sockaddr *)&sa, sizeof(sa));
+ if( err < 0 ) SHOW_RESULT( connect, err );
+ CYG_TEST_CHECK( err == 0, "connect() returned error");
+
+ FD_SET( fd, &rd );
+#else
+ netdone = 1;
+#endif
+
+#ifdef TEST_DEV
+ for( i = 0; i < TEST_BUFSIZE; i++ ) sbuf1[i] = i;
+
+ CYG_TEST_INFO( "Thread2: calling open(/dev/ser1)");
+ ser1 = open("/dev/ser1", O_RDWR );
+ if( ser1 < 0 ) SHOW_RESULT( open, ser1 );
+ CYG_TEST_CHECK( ser1 >= 0, "open(/dev/ser1) returned error");
+
+ CYG_TEST_INFO( "Thread2: calling write(ser1)");
+ done = write( ser1, sbuf1, TEST_BUFSIZE);
+ if( done != TEST_BUFSIZE ) SHOW_RESULT( write, done );
+ CYG_TEST_CHECK( done == TEST_BUFSIZE, "write() returned bad size");
+
+ FD_SET( ser1, &wr );
+
+#else
+ serdone = 1;
+#endif
+
+ while(!(netdone && serdone))
+ {
+ fd_set rd_res = rd;
+ fd_set wr_res = wr;
+
+ CYG_TEST_INFO( "Thread2: calling select()");
+ show_fdsets( "Thread2 request: ", 8, &rd_res, &wr_res, NULL );
+ err = select( 8, &rd_res, &wr_res, NULL, NULL );
+ if( err < 0 ) SHOW_RESULT( select, err );
+ CYG_TEST_CHECK( err >= 0, "select() returned error");
+ show_fdsets( "Thread2 result: ", 8, &rd_res, &wr_res, NULL );
+
+#ifdef TEST_NET
+ switch( netstate )
+ {
+ case 0:
+ CYG_TEST_INFO( "Thread2: netstate 0");
+ if( FD_ISSET( fd, &rd_res ) )
+ {
+ CYG_TEST_INFO( "Thread2: calling read()");
+ done = read( fd, buf2, TEST_BUFSIZE);
+ if( done != TEST_BUFSIZE ) SHOW_RESULT( read, done );
+ CYG_TEST_CHECK( done == TEST_BUFSIZE, "read() returned bad size");
+
+ for( i = 0; i < TEST_BUFSIZE; i++ )
+ if( buf1[i] != buf2[i] )
+ diag_printf("buf1[%d](%02x) != buf2[%d](%02x)\n",i,buf1[i],i,buf2[i]);
+
+ netstate++;
+
+ FD_CLR( fd, &rd );
+ FD_SET( fd, &wr );
+ }
+ break;
+
+ case 1:
+ CYG_TEST_INFO( "Thread2: netstate 1");
+ if( FD_ISSET( fd, &wr_res ) )
+ {
+
+ CYG_TEST_INFO( "Thread2: calling write()");
+ done = write( fd, buf2, TEST_BUFSIZE);
+ if( done != TEST_BUFSIZE ) SHOW_RESULT( write, done );
+ CYG_TEST_CHECK( done == TEST_BUFSIZE, "write() returned bad size");
+
+ FD_CLR( fd, &wr );
+
+ netstate++;
+ netdone = 1;
+ CYG_TEST_INFO( "Thread2: netdone");
+ }
+ break;
+
+ }
+#endif
+
+#ifdef TEST_DEV
+ switch( serstate )
+ {
+ case 0:
+ CYG_TEST_INFO( "Thread2: serstate 0");
+ if( FD_ISSET( ser1, &wr_res ) )
+ {
+ FD_CLR( ser1, &wr );
+ FD_SET( ser1, &rd );
+ serstate++;
+ }
+ break;
+
+ case 1:
+ CYG_TEST_INFO( "Thread2: serstate 1");
+ if( FD_ISSET( ser1, &rd_res ) )
+ {
+ CYG_TEST_INFO( "Thread2: calling read(ser1)");
+ done = read( ser1, sbuf3, TEST_BUFSIZE);
+ if( done != TEST_BUFSIZE ) SHOW_RESULT( read, done );
+ CYG_TEST_CHECK( done == TEST_BUFSIZE, "read() returned bad size");
+
+ for( i = 0; i < TEST_BUFSIZE; i++ )
+ if( sbuf1[i] != sbuf3[i] )
+ diag_printf("sbuf1[%d](%02x) != sbuf3[%d](%02x)\n",i,sbuf1[i],i,sbuf3[i]);
+
+ FD_CLR( ser1, &rd );
+
+ serstate++;
+ serdone = 1;
+ CYG_TEST_INFO( "Thread2: serdone");
+ }
+ break;
+ }
+#endif
+ }
+
+#ifdef TEST_NET
+ CYG_TEST_INFO( "Thread2: calling close(fd)");
+ err = close(fd);
+ if( err < 0 ) SHOW_RESULT( close, err );
+ CYG_TEST_CHECK( err == 0, "close() returned error");
+#endif
+#ifdef TEST_DEV
+ CYG_TEST_INFO( "Thread2: calling close(ser1)");
+ err = close(ser1);
+ if( err < 0 ) SHOW_RESULT( close, err );
+ CYG_TEST_CHECK( err == 0, "close(ser1) returned error");
+#endif
+
+
+ CYG_TEST_INFO( "Thread2: calling pthread_exit()");
+ pthread_exit( arg );
+}
+
+//==========================================================================
+// main
+
+int main( int argc, char **argv )
+{
+ void *retval;
+ pthread_attr_t attr;
+ struct sched_param schedparam;
+
+ CYG_TEST_INIT();
+
+#ifdef TEST_NET
+ sa.sin_family = AF_INET;
+ sa.sin_len = sizeof(sa);
+ inet_aton("127.0.0.1", &sa.sin_addr);
+ sa.sin_port = htons(1234);
+ init_all_network_interfaces();
+#endif
+
+ // Create test threads
+
+ {
+ pthread_attr_init( &attr );
+
+ schedparam.sched_priority = 10;
+ pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
+ pthread_attr_setschedpolicy( &attr, SCHED_RR );
+ pthread_attr_setschedparam( &attr, &schedparam );
+ pthread_attr_setstackaddr( &attr, (void *)&thread1_stack[sizeof(thread1_stack)] );
+ pthread_attr_setstacksize( &attr, sizeof(thread1_stack) );
+
+ pthread_create( &thread1,
+ &attr,
+ pthread_entry1,
+ (void *)0x12345671);
+ }
+
+ {
+ pthread_attr_init( &attr );
+
+ schedparam.sched_priority = 5;
+ pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
+ pthread_attr_setschedpolicy( &attr, SCHED_RR );
+ pthread_attr_setschedparam( &attr, &schedparam );
+ pthread_attr_setstackaddr( &attr, (void *)&thread2_stack[sizeof(thread2_stack)] );
+ pthread_attr_setstacksize( &attr, sizeof(thread2_stack) );
+
+ pthread_create( &thread2,
+ &attr,
+ pthread_entry2,
+ (void *)0x12345672);
+ }
+
+ // Now join with thread1
+ CYG_TEST_INFO( "Main: calling pthread_join(thread1)");
+ pthread_join( thread1, &retval );
+
+ // And thread 2
+ CYG_TEST_INFO( "Main: calling pthread_join(thread2)");
+ pthread_join( thread2, &retval );
+
+ CYG_TEST_PASS_FINISH("select");
+}
+
+#else
+
+//==========================================================================
+// main
+
+void cyg_start(void)
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_NA(NA_MSG);
+}
+
+#endif
+
+
+// -------------------------------------------------------------------------
+// EOF socket.c
diff --git a/cesar/ecos/packages/io/fileio/current/tests/socket.c b/cesar/ecos/packages/io/fileio/current/tests/socket.c
new file mode 100644
index 0000000000..ea94dc2100
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/tests/socket.c
@@ -0,0 +1,368 @@
+//==========================================================================
+//
+// socket.c
+//
+// Test socket API
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-05-25
+// Purpose: Test socket API
+// Description: This program tests the socket API. Note that it is only
+// intended to test the API and not the functionality of
+// the underlying network stack. That is assumed to have
+// been established by other tests elsewhere.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/isoinfra.h>
+#ifdef CYGPKG_POSIX
+#include <pkgconf/posix.h>
+#endif
+
+#ifndef CYGINT_ISO_PTHREAD_IMPL
+# define NA_MSG "POSIX threads needed to run test"
+#elif !defined CYGPKG_NET
+# define NA_MSG "NET package needed to run test"
+#elif !defined CYGPKG_POSIX_SIGNALS
+# define NA_MSG "POSIX signals package needed to run test"
+#endif
+
+#include <cyg/infra/testcase.h>
+
+#ifndef NA_MSG
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+#include <pkgconf/io_fileio.h>
+
+
+#define __ECOS 1
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <cyg/infra/testcase.h>
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+#include <network.h>
+#include <arpa/inet.h>
+
+#include <pthread.h>
+#include <signal.h>
+
+
+#include <cyg/infra/diag.h> // HAL polled output
+
+//--------------------------------------------------------------------------
+
+#define SHOW_RESULT( _fn, _res ) \
+diag_printf(#_fn " returned %d %s\n", (int) _res, _res<0?strerror(errno):"");
+
+//--------------------------------------------------------------------------
+// Thread stack.
+
+char thread1_stack[PTHREAD_STACK_MIN*2];
+char thread2_stack[PTHREAD_STACK_MIN*2];
+
+//--------------------------------------------------------------------------
+// Local variables
+
+// Thread IDs
+pthread_t thread1;
+pthread_t thread2;
+
+struct sockaddr_in sa;
+
+//--------------------------------------------------------------------------
+// test buffers
+
+#define TEST_BUFSIZE 512
+
+static char buf1[TEST_BUFSIZE];
+static char buf2[TEST_BUFSIZE];
+static char buf3[TEST_BUFSIZE];
+
+//--------------------------------------------------------------------------
+
+void *pthread_entry1( void *arg)
+{
+ int fd, fd2;
+ struct sockaddr_in accsa;
+ socklen_t accsa_len = sizeof(accsa);
+ int err;
+// int one = 1;
+// int so1 = sizeof(one);
+ fd_set rd;
+ int i;
+ ssize_t done;
+
+ CYG_TEST_INFO( "Thread 1 running" );
+
+ CYG_TEST_INFO( "Thread1: calling socket()");
+ fd = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP );
+ if( fd < 0 ) SHOW_RESULT( socket, fd );
+ CYG_TEST_CHECK( fd >= 0, "socket() returned error");
+
+// err = setsockopt( fd, SOL_SOCKET, SO_DONTROUTE, (void *)&one, so1);
+// if( err < 0 ) SHOW_RESULT( setsockopt, err );
+// CYG_TEST_CHECK( err == 0, "setsockopt() returned error");
+
+ CYG_TEST_INFO( "Thread1: calling bind()");
+ err = bind( fd, (struct sockaddr *)&sa, sizeof(sa));
+ if( err < 0 ) SHOW_RESULT( bind, err );
+ CYG_TEST_CHECK( err == 0, "bind() returned error");
+
+ CYG_TEST_INFO( "Thread1: calling listen()");
+ err = listen( fd, 1);
+ if( err < 0 ) SHOW_RESULT( listen, err );
+ CYG_TEST_CHECK( err == 0, "listen() returned error");
+
+ FD_ZERO( &rd );
+ FD_SET( fd, &rd );
+
+ CYG_TEST_INFO( "Thread1: calling select()");
+ err = select( fd+1, &rd, NULL, NULL, NULL );
+ if( err < 0 ) SHOW_RESULT( select, err );
+ CYG_TEST_CHECK( err >= 0, "select() returned error");
+ CYG_TEST_CHECK( FD_ISSET( fd, &rd ), "Fd not set in select() result");
+
+ CYG_TEST_INFO( "Thread1: calling accept()");
+ fd2 = accept( fd, (struct sockaddr *)&accsa, &accsa_len );
+ if( fd2 < 0 ) SHOW_RESULT( accept, fd2 );
+ CYG_TEST_CHECK( fd2 >= 0, "accept() returned error");
+
+
+ for( i = 0; i < TEST_BUFSIZE; i++ ) buf1[i] = i;
+
+ CYG_TEST_INFO( "Thread1: calling write()");
+ done = write( fd2, buf1, TEST_BUFSIZE);
+ if( done != TEST_BUFSIZE ) SHOW_RESULT( write, done );
+ CYG_TEST_CHECK( done == TEST_BUFSIZE, "write() returned bad size");
+
+ FD_ZERO( &rd );
+ FD_SET( fd2, &rd );
+
+ CYG_TEST_INFO( "Thread1: calling select()");
+ err = select( fd2+1, &rd, NULL, NULL, NULL );
+ if( err < 0 ) SHOW_RESULT( select, err );
+ CYG_TEST_CHECK( err >= 0, "select() returned error");
+ CYG_TEST_CHECK( FD_ISSET( fd2, &rd ), "Fd2 not set in select() result");
+
+ CYG_TEST_INFO( "Thread1: calling read()");
+ done = read( fd2, buf3, TEST_BUFSIZE);
+ if( done != TEST_BUFSIZE ) SHOW_RESULT( read, done );
+ CYG_TEST_CHECK( done == TEST_BUFSIZE, "read() returned bad size");
+
+ for( i = 0; i < TEST_BUFSIZE; i++ )
+ if( buf1[i] != buf3[i] )
+ diag_printf("buf1[%d](%02x) != buf3[%d](%02x)\n",i,buf1[i],i,buf3[i]);
+
+ CYG_TEST_INFO( "Thread1: calling close(fd)");
+ err = close(fd);
+ if( err < 0 ) SHOW_RESULT( close, err );
+ CYG_TEST_CHECK( err == 0, "close() returned error");
+
+ CYG_TEST_INFO( "Thread1: calling close(fd2)");
+ err = close(fd2);
+ if( err < 0 ) SHOW_RESULT( close, err );
+ CYG_TEST_CHECK( err == 0, "close() returned error");
+
+ CYG_TEST_INFO( "Thread1: calling pthread_exit()");
+ pthread_exit( arg );
+}
+
+//--------------------------------------------------------------------------
+
+void *pthread_entry2( void *arg)
+{
+ int fd;
+ int err;
+// int one = 1;
+// int so1 = sizeof(one);
+ int i;
+ ssize_t done;
+ fd_set rd;
+
+ CYG_TEST_INFO( "Thread 2 running" );
+
+ CYG_TEST_INFO( "Thread2: calling socket()");
+ fd = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP );
+ if( fd < 0 ) SHOW_RESULT( socket, fd );
+ CYG_TEST_CHECK( fd >= 0, "socket() returned error");
+
+// err = setsockopt( fd, SOL_SOCKET, SO_DONTROUTE, (void *)&one, so1);
+// if( err < 0 ) SHOW_RESULT( setsockopt, err );
+// CYG_TEST_CHECK( err == 0, "setsockopt() returned error");
+
+ CYG_TEST_INFO( "Thread2: calling connect()");
+ err = connect( fd, (struct sockaddr *)&sa, sizeof(sa));
+ if( err < 0 ) SHOW_RESULT( connect, err );
+ CYG_TEST_CHECK( err == 0, "connect() returned error");
+
+ FD_ZERO( &rd );
+ FD_SET( fd, &rd );
+
+ CYG_TEST_INFO( "Thread2: calling select()");
+ err = select( fd+1, &rd, NULL, NULL, NULL );
+ if( err < 0 ) SHOW_RESULT( select, err );
+ CYG_TEST_CHECK( err >= 0, "select() returned error");
+ CYG_TEST_CHECK( FD_ISSET( fd, &rd ), "Fd not set in select() result");
+
+ CYG_TEST_INFO( "Thread2: calling read()");
+ done = read( fd, buf2, TEST_BUFSIZE);
+ if( done != TEST_BUFSIZE ) SHOW_RESULT( read, done );
+ CYG_TEST_CHECK( done == TEST_BUFSIZE, "read() returned bad size");
+
+ for( i = 0; i < TEST_BUFSIZE; i++ )
+ if( buf1[i] != buf2[i] )
+ diag_printf("buf1[%d](%02x) != buf2[%d](%02x)\n",i,buf1[i],i,buf2[i]);
+
+ CYG_TEST_INFO( "Thread2: calling write()");
+ done = write( fd, buf2, TEST_BUFSIZE);
+ if( done != TEST_BUFSIZE ) SHOW_RESULT( write, done );
+ CYG_TEST_CHECK( done == TEST_BUFSIZE, "write() returned bad size");
+
+ CYG_TEST_INFO( "Thread2: calling close(fd)");
+ err = close(fd);
+ if( err < 0 ) SHOW_RESULT( close, err );
+ CYG_TEST_CHECK( err == 0, "close() returned error");
+
+ CYG_TEST_INFO( "Thread2: calling pthread_exit()");
+ pthread_exit( arg );
+}
+
+//==========================================================================
+// main
+
+int main( int argc, char **argv )
+{
+ struct in_addr ina;
+ char *addr1 = "127.0.255.106";
+ char *addr2;
+ void *retval;
+ pthread_attr_t attr;
+ struct sched_param schedparam;
+
+ sa.sin_family = AF_INET;
+ sa.sin_len = sizeof(sa);
+ inet_aton("127.0.0.1", &sa.sin_addr);
+ sa.sin_port = htons(1234);
+
+ CYG_TEST_INIT();
+
+ init_all_network_interfaces();
+
+ // Test inet_ntoa() and inet_aton()
+
+ inet_aton(addr1, &ina);
+ addr2 = inet_ntoa(ina);
+ CYG_TEST_CHECK( strcmp(addr1, addr2) == 0, "Bad inet adderess conversion");
+
+
+ // Create test threads
+
+ {
+ pthread_attr_init( &attr );
+
+ schedparam.sched_priority = 10;
+ pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
+ pthread_attr_setschedpolicy( &attr, SCHED_RR );
+ pthread_attr_setschedparam( &attr, &schedparam );
+ pthread_attr_setstackaddr( &attr, (void *)&thread1_stack[sizeof(thread1_stack)] );
+ pthread_attr_setstacksize( &attr, sizeof(thread1_stack) );
+
+ pthread_create( &thread1,
+ &attr,
+ pthread_entry1,
+ (void *)0x12345671);
+ }
+
+ {
+ pthread_attr_init( &attr );
+
+ schedparam.sched_priority = 5;
+ pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
+ pthread_attr_setschedpolicy( &attr, SCHED_RR );
+ pthread_attr_setschedparam( &attr, &schedparam );
+ pthread_attr_setstackaddr( &attr, (void *)&thread2_stack[sizeof(thread2_stack)] );
+ pthread_attr_setstacksize( &attr, sizeof(thread2_stack) );
+
+ pthread_create( &thread2,
+ &attr,
+ pthread_entry2,
+ (void *)0x12345672);
+ }
+
+ // Now join with thread1
+ CYG_TEST_INFO( "Main: calling pthread_join(thread1)");
+ pthread_join( thread1, &retval );
+
+ // And thread 2
+ CYG_TEST_INFO( "Main: calling pthread_join(thread2)");
+ pthread_join( thread2, &retval );
+
+ CYG_TEST_PASS_FINISH("socket");
+}
+
+#else
+
+//==========================================================================
+// main
+
+int main( int argc, char **argv )
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_NA(NA_MSG);
+}
+
+#endif
+
+
+// -------------------------------------------------------------------------
+// EOF socket.c
diff --git a/cesar/ecos/packages/io/fileio/current/tests/stdio.c b/cesar/ecos/packages/io/fileio/current/tests/stdio.c
new file mode 100644
index 0000000000..326fea53b6
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/tests/stdio.c
@@ -0,0 +1,179 @@
+//==========================================================================
+//
+// stdio.c
+//
+// Test stdio integration of fileio system
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-05-25
+// Purpose: Test stdio integration of fileio system
+// Description: This test uses the testfs to check that the options
+// in the STDIO package that enable use of the fileio
+// API work correctly.
+//
+//
+//
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <stdio.h>
+#include <string.h>
+
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h> // HAL polled output
+
+//==========================================================================
+// Include the test filesystem.
+// If we could make tests out of multiple files, then we could just link
+// against the object file for this rather than including it.
+
+#include "testfs.c"
+
+//==========================================================================
+
+#define SHOW_RESULT( _fn, _res ) \
+diag_printf("<INFO>: " #_fn "() returned %d %s\n", _res, _res<0?strerror(errno):"");
+
+
+#ifdef CYGPKG_LIBC_STDIO
+
+//==========================================================================
+// main
+
+int main( int argc, char **argv )
+{
+ int err;
+ FILE *f;
+ fpos_t fpos;
+
+ int flibble = 4567;
+ char *wibble = "abcdefghijk";
+
+ int flibble1;
+ char wibble1[20];
+
+ CYG_TEST_INIT();
+
+
+ f = fopen("/foo", "w" );
+ if( f == NULL ) SHOW_RESULT( fopen, -1 );
+
+ err = fprintf(f, "flibble %d wibble %s\n", flibble, wibble );
+ if( err < 0 ) SHOW_RESULT( fprintf, err );
+
+ err = fprintf(f, "another flibble %d another wibble %s\n", flibble, wibble );
+ if( err < 0 ) SHOW_RESULT( fprintf, err );
+
+ err = fclose( f );
+ if( err == EOF ) SHOW_RESULT( fclose, -1 );
+
+
+
+ f = fopen("/foo", "r" );
+ if( f == NULL ) SHOW_RESULT( fopen, -1 );
+
+ err = fscanf(f, "flibble %d wibble %s\n", &flibble1, wibble1 );
+ if( err < 0 ) SHOW_RESULT( fscanf, err );
+
+ diag_printf("<INFO>: flibble1 %d wibble1 %s\n",flibble1,wibble1);
+
+ CYG_TEST_CHECK( flibble1 == flibble , "Bad flibble result from fscanf");
+ CYG_TEST_CHECK( strcmp(wibble,wibble1) == 0, "Bad wibble result from fscanf");
+
+
+ err = fgetpos( f, &fpos );
+ if( err < 0 ) SHOW_RESULT( fgetpos, err );
+
+ err = fseek( f, 0, SEEK_SET );
+ if( err < 0 ) SHOW_RESULT( fseek, err );
+
+ err = fscanf(f, "flibble %d wibble %s\n", &flibble1, wibble1 );
+ if( err < 0 ) SHOW_RESULT( fscanf, err );
+
+ diag_printf("<INFO>: flibble1 %d wibble1 %s\n",flibble1,wibble1);
+
+ CYG_TEST_CHECK( flibble1 == flibble , "Bad flibble result from fscanf");
+ CYG_TEST_CHECK( strcmp(wibble,wibble1) == 0, "Bad wibble result from fscanf");
+
+
+ err = fseek( f, 0, SEEK_END );
+ if( err < 0 ) SHOW_RESULT( fseek, err );
+
+ err = fsetpos( f, &fpos );
+ if( err < 0 ) SHOW_RESULT( fsetpos, err );
+
+ err = fscanf(f, "another flibble %d another wibble %s\n", &flibble1, wibble1 );
+ if( err < 0 ) SHOW_RESULT( fscanf, err );
+
+ diag_printf("<INFO>: flibble1 %d wibble1 %s\n",flibble1,wibble1);
+
+ CYG_TEST_CHECK( flibble1 == flibble , "Bad flibble result from fscanf");
+ CYG_TEST_CHECK( strcmp(wibble,wibble1) == 0, "Bad wibble result from fscanf");
+
+
+
+ err = fclose( f );
+
+
+
+ CYG_TEST_PASS_FINISH("stdio");
+
+ return 0;
+}
+
+#else
+
+// -------------------------------------------------------------------------
+
+int main( int argc, char **argv )
+{
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_NA("stdio");
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// EOF stdio.c
diff --git a/cesar/ecos/packages/io/fileio/current/tests/testfs.c b/cesar/ecos/packages/io/fileio/current/tests/testfs.c
new file mode 100644
index 0000000000..0e19745f7f
--- /dev/null
+++ b/cesar/ecos/packages/io/fileio/current/tests/testfs.c
@@ -0,0 +1,1251 @@
+//==========================================================================
+//
+// testfs.c
+//
+// Test file system
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-05-25
+// Purpose: Test file system
+// Description: This is a very simple implementation of a RAM file system.
+// This implementation is not "industrial strength" or suitable
+// for production use, it is too wasteful of both memory and time.
+// Its primary purpose is to support testing of the fileio
+// infrastructure and API. It can, however, serve as a model
+// and source of code fragments for the implementation
+// of further filesystems.
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/io_fileio.h>
+
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <dirent.h>
+
+#include <cyg/fileio/fileio.h>
+
+#include <cyg/infra/diag.h>
+
+//==========================================================================
+// Configuration parameters
+
+#define TESTFS_NFILE 10 // Max number of files/directories
+#define TESTFS_NBLOCK 20 // Number of data blocks available
+#define TESTFS_BLOCKSIZE 128 // Bytes stored per block
+#define TESTFS_FILEBLOCKS 8 // Max blocks per file
+#define TESTFS_NAMESIZE 32 // Length of file names in bytes
+
+
+// Maximum file size is blocksize*blocks
+#define TESTFS_FILESIZE_MAX (TESTFS_BLOCKSIZE*TESTFS_FILEBLOCKS)
+
+//==========================================================================
+// Data structures
+
+struct testfs_node;
+typedef struct testfs_node testfs_node;
+
+struct testfs_block;
+typedef struct testfs_block testfs_block;
+
+
+struct testfs_node
+{
+ testfs_node *next; // next node in list
+ testfs_node *parent; // Back pointer to parent
+ int refcnt; // reference count
+ char name[TESTFS_NAMESIZE]; // file name
+ struct stat status; // status data
+ union
+ {
+ struct
+ {
+ testfs_block *data[TESTFS_FILEBLOCKS]; // array of blocks
+ } file;
+
+ struct
+ {
+ testfs_node *nodes[TESTFS_FILEBLOCKS]; // array of nodes
+ } dir;
+ } u;
+};
+
+struct testfs_block
+{
+ union
+ {
+ testfs_block *next; // next block in free list
+ testfs_node *file; // back pointer to file
+ } u;
+ off_t pos; // position in file of first byte
+ size_t size; // number of bytes in buffer
+ char data[TESTFS_BLOCKSIZE]; // the data
+};
+
+//==========================================================================
+// Local data
+
+// Array of nodes
+static testfs_node node[TESTFS_NFILE];
+
+// node free list.
+static testfs_node *free_node = NULL;
+
+// Array of data blocks
+static testfs_block block[TESTFS_NBLOCK];
+
+// block free list.
+static testfs_block *free_block = NULL;
+
+// Init flag
+cyg_bool testfs_initialized = false;
+
+//==========================================================================
+// Forward definitions
+
+// Filesystem operations
+static int testfs_mount ( cyg_fstab_entry *fste, cyg_mtab_entry *mte );
+static int testfs_umount ( cyg_mtab_entry *mte );
+static int testfs_open ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int mode, cyg_file *fte );
+static int testfs_unlink ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+static int testfs_mkdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+static int testfs_rmdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name );
+static int testfs_rename ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2 );
+static int testfs_link ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1,
+ cyg_dir dir2, const char *name2, int type );
+static int testfs_opendir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_file *fte );
+static int testfs_chdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ cyg_dir *dir_out );
+static int testfs_stat ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ struct stat *buf);
+static int testfs_getinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len );
+static int testfs_setinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *name,
+ int key, void *buf, int len );
+
+// File operations
+static int testfs_fo_read (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+static int testfs_fo_write (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+static int testfs_fo_lseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence );
+static int testfs_fo_ioctl (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com,
+ CYG_ADDRWORD data);
+//static int testfs_fo_select (struct CYG_FILE_TAG *fp, int which, CYG_ADDRWORD info);
+static int testfs_fo_fsync (struct CYG_FILE_TAG *fp, int mode );
+static int testfs_fo_close (struct CYG_FILE_TAG *fp);
+static int testfs_fo_fstat (struct CYG_FILE_TAG *fp, struct stat *buf );
+static int testfs_fo_getinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
+static int testfs_fo_setinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len );
+
+// Directory operations
+static int testfs_fo_dirread (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio);
+static int testfs_fo_dirlseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence );
+
+//==========================================================================
+// Filesystem table entries
+
+FSTAB_ENTRY( testfs_fste, "testfs", 0,
+ CYG_SYNCMODE_FILE_FILESYSTEM|CYG_SYNCMODE_IO_FILESYSTEM,
+ testfs_mount,
+ testfs_umount,
+ testfs_open,
+ testfs_unlink,
+ testfs_mkdir,
+ testfs_rmdir,
+ testfs_rename,
+ testfs_link,
+ testfs_opendir,
+ testfs_chdir,
+ testfs_stat,
+ testfs_getinfo,
+ testfs_setinfo);
+
+MTAB_ENTRY( testfs_mte1,
+ "/",
+ "testfs",
+ "",
+ 0);
+
+#if 0
+MTAB_ENTRY( testfs_mte2,
+ "/ram",
+ "testfs",
+ "",
+ 0);
+#endif
+
+static cyg_fileops testfs_fileops =
+{
+ testfs_fo_read,
+ testfs_fo_write,
+ testfs_fo_lseek,
+ testfs_fo_ioctl,
+ cyg_fileio_seltrue,
+ testfs_fo_fsync,
+ testfs_fo_close,
+ testfs_fo_fstat,
+ testfs_fo_getinfo,
+ testfs_fo_setinfo
+};
+
+static cyg_fileops testfs_dirops =
+{
+ testfs_fo_dirread,
+ (cyg_fileop_write *)cyg_fileio_enosys,
+ testfs_fo_dirlseek,
+ (cyg_fileop_ioctl *)cyg_fileio_enosys,
+ cyg_fileio_seltrue,
+ (cyg_fileop_fsync *)cyg_fileio_enosys,
+ testfs_fo_close,
+ (cyg_fileop_fstat *)cyg_fileio_enosys,
+ (cyg_fileop_getinfo *)cyg_fileio_enosys,
+ (cyg_fileop_setinfo *)cyg_fileio_enosys
+};
+
+//==========================================================================
+// Support routines
+
+// -------------------------------------------------------------------------
+// Local strcmp() and strcpy()
+
+static int mystrcmp( const char *s1, const char *s2 )
+{
+ while( *s1 == *s2 && *s1 != '\0' && *s2 != '\0' )
+ s1++, s2++;
+
+ return (*s2)-(*s1);
+}
+
+static char *mystrcpy( char *s1, const char *s2 )
+{
+ char *s = s1;
+ while( (*s1++ = *s2++) != 0);
+ return s;
+}
+
+// -------------------------------------------------------------------------
+// Follow a path through the directory structure
+
+static int testfs_find( testfs_node *dir, // dir to start search in
+ const char *path, // path to follow
+ testfs_node **found, // return node found
+ testfs_node **parent, // return last dir searched
+ char *name, // name fragment buffer
+ cyg_bool *lastp) // last name in path ?
+{
+ testfs_node *nd = dir;
+
+ *lastp = false;
+ *found = NULL;
+
+ while( *path != '\0' )
+ {
+ const char *p = path;
+ char *n = name;
+ testfs_node *nd1;
+ int i;
+
+ // check nd is a directory
+ if( !S_ISDIR(nd->status.st_mode) ) return ENOTDIR;
+
+ // Isolate the next element of the path name.
+ while( *p != '\0' && *p != '/' && (n-&name[0]) < TESTFS_NAMESIZE)
+ *n++ = *p++;
+
+ if( (n-&name[0]) >= TESTFS_NAMESIZE )
+ return ENAMETOOLONG;
+
+ // Step path on past the separator
+ // If this is the last name element in the path,
+ // set *lastp to indicate this.
+ if( *(path=p) == '/' ) path++;
+ else *lastp = true;
+
+ // teminate name
+ *n = '\0';
+
+ // name now contains the next path element, search the node
+ // in nd for it.
+
+ *parent = nd;
+ nd1 = NULL;
+
+ for( i = 0; i < TESTFS_FILEBLOCKS; i++ )
+ {
+ testfs_node *n = nd->u.dir.nodes[i];
+ if( n == NULL )
+ continue;
+
+ if( mystrcmp( name, n->name ) == 0 )
+ {
+ nd1 = n;
+ break;
+ }
+ }
+
+ if( nd1 == NULL ) return ENOENT;
+
+ nd = nd1;
+ }
+
+ // Return what we have found
+ *found = nd;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+// Get current time since epoch
+
+static time_t testfs_time(void)
+{
+#ifdef CYGPKG_KERNEL
+ return cyg_current_time();
+#else
+ return 0;
+#endif
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_delnode( testfs_node *nd )
+{
+
+ testfs_node *parent;
+ int i;
+
+ // Non-unitary ref count means this node is either open
+ // or is a dir with entries in it.
+ if( nd->refcnt > 1 )
+ return EBUSY;
+
+ // Remove from parent's node list.
+
+ parent = nd->parent;
+
+ for( i = 0; i < TESTFS_FILEBLOCKS; i++ )
+ if( parent->u.dir.nodes[i] == nd )
+ {
+ parent->u.dir.nodes[i] = NULL;
+ break;
+ }
+
+ parent->refcnt--;
+
+ if( S_ISREG(nd->status.st_mode) )
+ {
+ // for a file, return blocks to free list
+ for( i = 0; i < TESTFS_FILEBLOCKS; i++ )
+ {
+ testfs_block *b = nd->u.file.data[i];
+ if( b != NULL )
+ {
+ b->u.next = free_block;
+ b->pos = -1;
+ free_block = b;
+ }
+ }
+ }
+
+ // and finally return nd to free node list
+
+ nd->next = free_node;
+ nd->refcnt = -1;
+ free_node = nd;
+
+ return ENOERR;
+}
+
+//==========================================================================
+// Filesystem operations
+
+// -------------------------------------------------------------------------
+
+static int testfs_mount ( cyg_fstab_entry *fste, cyg_mtab_entry *mte )
+{
+ testfs_node *root;
+ int i;
+
+ if( !testfs_initialized )
+ {
+ int i;
+
+ for( i = 0; i < TESTFS_NFILE; i++ )
+ {
+ node[i].next = free_node;
+ node[i].refcnt = -1;
+ free_node = &node[i];
+ }
+
+ for( i = 0; i < TESTFS_NBLOCK; i++ )
+ {
+ block[i].u.next = free_block;
+ block[i].pos = -1;
+ free_block = &block[i];
+ }
+
+ testfs_initialized = true;
+ }
+
+ // Allocate a node to be the root of this filesystem and
+ // initialize it.
+
+ root = free_node;
+
+ if( root == NULL ) return ENOSPC;
+
+ free_node = root->next;
+
+ root->next = root; // form circular list
+ root->parent = root; // I'm my own parent!
+ root->refcnt = 1; // don't want to ever lose root
+ mystrcpy( root->name, "root");
+ root->status.st_mode = __stat_mode_DIR;
+ root->status.st_ino = root-&node[0];
+ root->status.st_dev = 0;
+ root->status.st_nlink = 1;
+ root->status.st_uid = 0;
+ root->status.st_gid = 0;
+ root->status.st_size = 0;
+ root->status.st_atime = testfs_time();
+ root->status.st_mtime = testfs_time();
+ root->status.st_ctime = testfs_time();
+
+ for( i = 0; i < TESTFS_FILEBLOCKS; i++ )
+ root->u.dir.nodes[i] = NULL;
+
+ mte->root = (cyg_dir)root;
+
+ return 0;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_umount ( cyg_mtab_entry *mte )
+{
+ testfs_node *root = (testfs_node *)mte->root;
+
+ // Non-empty filesystem, do not unmount
+ if( root->refcnt != 1 )
+ return EBUSY;
+
+ // Otherwise just return it to the free pool
+ root->next = free_node;
+ root->refcnt = -1;
+ free_node = root;
+
+ // Clear root pointer
+ mte->root = CYG_DIR_NULL;
+
+ // That's all folks.
+
+ return ENOERR;
+}
+// -------------------------------------------------------------------------
+
+static int testfs_open ( cyg_mtab_entry *mte, cyg_dir dir, const char *path,
+ int mode, cyg_file *file )
+{
+ testfs_node *nd, *parent;
+ int err;
+ char name[TESTFS_NAMESIZE];
+ cyg_bool lastp;
+
+ err = testfs_find( (testfs_node *)dir, path, &nd, &parent, name, &lastp );
+
+ if( lastp && err == ENOENT && (mode & O_CREAT) )
+ {
+ int i;
+ // No node there, if the O_CREAT bit is set then we must
+ // create a new one. The parent and name results will have been filled
+ // in, so we know where to put it.
+
+ // first check that there is space for it
+ for( i = 0; i < TESTFS_FILEBLOCKS; i++ )
+ if( parent->u.dir.nodes[i] == NULL )
+ break;
+
+ if( i == TESTFS_FILEBLOCKS ) return ENOSPC;
+
+ // Allocate a new node
+ nd = free_node;
+ if( nd == NULL ) return ENOSPC;
+ free_node = nd->next;
+
+ // Add to directory list
+ parent->u.dir.nodes[i] = nd;
+
+ parent->refcnt++;
+
+ // Fill in details
+ nd->parent = parent;
+ nd->refcnt = 1; // 1 for directory reference
+ mystrcpy( nd->name, name);
+ nd->status.st_mode = __stat_mode_REG;
+ nd->status.st_ino = nd-&node[0];
+ nd->status.st_dev = 0;
+ nd->status.st_nlink = 1;
+ nd->status.st_uid = 0;
+ nd->status.st_gid = 0;
+ nd->status.st_size = 0;
+ nd->status.st_atime = testfs_time();
+ nd->status.st_mtime = testfs_time();
+ nd->status.st_ctime = testfs_time();
+
+ for( i = 0; i < TESTFS_FILEBLOCKS; i++ )
+ nd->u.file.data[i] = NULL;
+
+ err = ENOERR;
+ }
+
+ if( err == ENOERR && (mode & O_TRUNC ) )
+ {
+ // Clean out any blocks in the file...
+
+ int i;
+
+ for( i = 0; i < TESTFS_FILEBLOCKS; i++ )
+ {
+ testfs_block *b = nd->u.file.data[i];
+ if( b != NULL )
+ {
+ b->u.next = free_block;
+ b->pos = -1;
+ free_block = b;
+ nd->u.file.data[i] = NULL;
+ }
+ }
+
+ nd->status.st_size = 0;
+ }
+
+ if( err != ENOERR ) return err;
+
+ if( S_ISDIR(nd->status.st_mode) ) return EISDIR;
+
+ nd->refcnt++; // Count successful open as a ref
+
+ // Initialize the file object
+
+ file->f_flag |= mode & CYG_FILE_MODE_MASK;
+ file->f_type = CYG_FILE_TYPE_FILE;
+ file->f_ops = &testfs_fileops;
+ file->f_offset = 0;
+ file->f_data = (CYG_ADDRWORD)nd;
+ file->f_xops = 0;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_unlink ( cyg_mtab_entry *mte, cyg_dir dir, const char *path )
+{
+ testfs_node *nd, *parent;
+ int err;
+ char name[TESTFS_NAMESIZE];
+ cyg_bool lastp;
+
+ err = testfs_find( (testfs_node *)dir, path, &nd, &parent, name, &lastp );
+
+ if( err != ENOERR ) return err;
+
+ // Cannot unlink directories, use rmdir() instead
+ if( S_ISDIR(nd->status.st_mode) )
+ return EPERM;
+
+ err = testfs_delnode( nd );
+
+ return err;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_mkdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *path )
+{
+
+ testfs_node *nd, *parent;
+ int err;
+ char name[TESTFS_NAMESIZE];
+ cyg_bool lastp;
+
+ err = testfs_find( (testfs_node *)dir, path, &nd, &parent, name, &lastp );
+
+ if( lastp && err == ENOENT )
+ {
+ int i;
+ // No node there, create a new one. The parent and name
+ // results will have been filled in, so we know where to put
+ // it.
+
+ // first check that there is space for it
+ for( i = 0; i < TESTFS_FILEBLOCKS; i++ )
+ if( parent->u.dir.nodes[i] == NULL )
+ break;
+
+ if( i == TESTFS_FILEBLOCKS ) return ENOSPC;
+
+ // Allocate a new node
+ nd = free_node;
+ if( nd == NULL ) return ENOSPC;
+ free_node = nd->next;
+
+ // Add to directory list
+ parent->u.dir.nodes[i] = nd;
+
+ parent->refcnt++;
+
+ // Fill in details
+ nd->parent = parent;
+ nd->refcnt = 1; // 1 for directory reference
+ mystrcpy( nd->name, name);
+ nd->status.st_mode = __stat_mode_DIR;
+ nd->status.st_ino = nd-&node[0];
+ nd->status.st_dev = 0;
+ nd->status.st_nlink = 1;
+ nd->status.st_uid = 0;
+ nd->status.st_gid = 0;
+ nd->status.st_size = 0;
+ nd->status.st_atime = testfs_time();
+ nd->status.st_mtime = testfs_time();
+ nd->status.st_ctime = testfs_time();
+
+ for( i = 0; i < TESTFS_FILEBLOCKS; i++ )
+ nd->u.dir.nodes[i] = NULL;
+
+ err = ENOERR;
+ }
+
+ return err;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_rmdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *path )
+{
+ testfs_node *nd, *parent;
+ int err;
+ char name[TESTFS_NAMESIZE];
+ cyg_bool lastp;
+
+ err = testfs_find( (testfs_node *)dir, path, &nd, &parent, name, &lastp );
+
+ if( err != ENOERR ) return err;
+
+ // Check that it is a directory
+ if( !S_ISDIR(nd->status.st_mode) )
+ return EPERM;
+
+ err = testfs_delnode( nd );
+
+ return err;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_rename ( cyg_mtab_entry *mte, cyg_dir dir1, const char *path1,
+ cyg_dir dir2, const char *path2 )
+{
+ testfs_node *nd1, *parent1;
+ testfs_node *nd2, *parent2;
+ int err;
+ char name1[TESTFS_NAMESIZE];
+ char name2[TESTFS_NAMESIZE];
+ cyg_bool lastp;
+ int i,j;
+
+ err = testfs_find( (testfs_node *)dir1, path1, &nd1, &parent1, name1, &lastp );
+
+ if( err != ENOERR ) return err;
+
+ err = testfs_find( (testfs_node *)dir2, path2, &nd2, &parent2, name2, &lastp );
+
+ // Allow through renames to non-existent objects.
+ if( lastp && err == ENOENT )
+ err = ENOERR;
+
+ if( err != ENOERR ) return err;
+
+ // Null rename, just return
+ if( nd1 == nd2 )
+ return ENOERR;
+
+
+ // First deal with any node that is at the destination
+ if( nd2 )
+ {
+ // Check that we are renaming like-for-like
+
+ if( !S_ISDIR(nd1->status.st_mode) && S_ISDIR(nd2->status.st_mode) )
+ return EISDIR;
+
+ if( S_ISDIR(nd1->status.st_mode) && !S_ISDIR(nd2->status.st_mode) )
+ return ENOTDIR;
+
+ // Now delete the destination node.
+ err = testfs_delnode( nd2 );
+ if( err != ENOERR ) return err;
+ }
+
+ // Now we know that there is no clashing node at the destination.
+ // Move the node over and change its name.
+
+ // first check that there is space for it
+ for( i = 0; i < TESTFS_FILEBLOCKS; i++ )
+ if( parent2->u.dir.nodes[i] == NULL )
+ break;
+
+ if( i == TESTFS_FILEBLOCKS ) return ENOSPC;
+
+ // Now remove node from old parent.
+ for( j = 0; j < TESTFS_FILEBLOCKS; j++ )
+ if( parent1->u.dir.nodes[j] == nd1 )
+ {
+ parent1->u.dir.nodes[j] = NULL;
+ break;
+ }
+
+ parent1->refcnt--;
+
+ // Add to directory list
+ parent2->u.dir.nodes[i] = nd1;
+ parent2->refcnt++;
+ nd1->parent = parent2;
+
+ // And give it a new name.
+ mystrcpy( nd1->name, name2 );
+
+ return err;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_link ( cyg_mtab_entry *mte, cyg_dir dir1, const char *path1,
+ cyg_dir dir2, const char *path2, int type )
+{
+ // The data structures of this file system do not support the
+ // creation of links.
+
+ return ENOSYS;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_opendir ( cyg_mtab_entry *mte, cyg_dir dir, const char *path,
+ cyg_file *file )
+{
+ testfs_node *nd, *parent;
+ int err;
+ char name[TESTFS_NAMESIZE];
+ cyg_bool lastp;
+
+ err = testfs_find( (testfs_node *)dir, path, &nd, &parent, name, &lastp );
+
+ if( err != ENOERR ) return err;
+
+ if( !S_ISDIR(nd->status.st_mode) )
+ return ENOTDIR;
+
+ nd->refcnt++; // Count successful open as a ref
+
+ // Initialize the file object
+
+ file->f_type = CYG_FILE_TYPE_FILE;
+ file->f_ops = &testfs_dirops;
+ file->f_offset = 0;
+ file->f_data = (CYG_ADDRWORD)nd;
+ file->f_xops = 0;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_chdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *path,
+ cyg_dir *dir_out )
+{
+ if( dir_out != NULL )
+ {
+ // This is a request to get a new directory pointer in
+ // *dir_out.
+
+ testfs_node *nd, *parent;
+ int err;
+ char name[TESTFS_NAMESIZE];
+ cyg_bool lastp;
+
+ err = testfs_find( (testfs_node *)dir, path, &nd, &parent, name, &lastp );
+
+ if( err != ENOERR ) return err;
+
+ if( !S_ISDIR(nd->status.st_mode) )
+ return ENOTDIR;
+
+ // Increment ref count to keep this directory in existent
+ // while it is the current cdir.
+ nd->refcnt++;
+
+ // Pass it out
+ *dir_out = (cyg_dir)nd;
+ }
+ else
+ {
+ // If no output dir is required, this means that the mte and
+ // dir arguments are the current cdir setting and we should
+ // forget this fact.
+
+ testfs_node *nd = (testfs_node *)dir;
+
+ // Just decrement reference count.
+ nd->refcnt--;
+ }
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_stat ( cyg_mtab_entry *mte, cyg_dir dir, const char *path,
+ struct stat *buf)
+{
+ testfs_node *nd, *parent;
+ int err;
+ char name[TESTFS_NAMESIZE];
+ cyg_bool lastp;
+
+ err = testfs_find( (testfs_node *)dir, path, &nd, &parent, name, &lastp );
+
+ if( err != ENOERR ) return err;
+
+ *buf = nd->status;
+
+ return err;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_getinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *path,
+ int key, void *buf, int len )
+{
+ return ENOSYS;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_setinfo ( cyg_mtab_entry *mte, cyg_dir dir, const char *path,
+ int key, void *buf, int len )
+{
+ return ENOSYS;
+}
+
+
+//==========================================================================
+// File operations
+
+
+// -------------------------------------------------------------------------
+
+static int testfs_fo_read (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio)
+{
+ testfs_node *nd = (testfs_node *)fp->f_data;
+ int i;
+ off_t pos = fp->f_offset;
+
+ for( i = 0; i < uio->uio_iovcnt; i++ )
+ {
+ cyg_iovec *iov = &uio->uio_iov[i];
+ char *buf = (char *)iov->iov_base;
+ off_t len = iov->iov_len;
+
+ while( len > 0 && pos < nd->status.st_size )
+ {
+ testfs_block *b = nd->u.file.data[pos/TESTFS_BLOCKSIZE];
+ off_t l = len;
+ off_t bpos = pos%TESTFS_BLOCKSIZE;
+
+ // If there is no block in that pos, we have reached
+ // the end of the file.
+ if( b == NULL ) return ENOERR;
+
+ // adjust size to this block
+ if( l > (b->size-bpos) )
+ l = (b->size-bpos);
+
+ // copy data out
+ memcpy( buf, &b->data[bpos], l );
+
+ uio->uio_resid -= l;
+ len -= l;
+ buf += l;
+ pos += l;
+
+ // keep offset up to date incase of errors
+ fp->f_offset = pos;
+ }
+ }
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_fo_write (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio)
+{
+ testfs_node *nd = (testfs_node *)fp->f_data;
+ int i;
+ off_t pos = fp->f_offset;
+
+ // Check we are not at end of allowed max file size
+ if( pos >= TESTFS_FILESIZE_MAX )
+ return EFBIG;
+
+ // Check that pos is within current file size, or at the very end.
+ if( pos < 0 || pos > nd->status.st_size )
+ return EINVAL;
+
+ // Now loop over the iovecs until they are all done, or
+ // we get an error.
+ for( i = 0; i < uio->uio_iovcnt; i++ )
+ {
+ cyg_iovec *iov = &uio->uio_iov[i];
+ char *buf = (char *)iov->iov_base;
+ off_t len = iov->iov_len;
+
+ while( len > 0 )
+ {
+ testfs_block *b = nd->u.file.data[pos/TESTFS_BLOCKSIZE];
+ off_t l = len;
+ off_t bpos = pos%TESTFS_BLOCKSIZE;
+
+ // If there is no block in that pos, allocate one
+ // and initialize it
+ if( b == NULL )
+ {
+ b = free_block;
+ if( b == NULL ) return ENOSPC;
+ free_block = b->u.next;
+ nd->u.file.data[pos/TESTFS_BLOCKSIZE] = b;
+ b->u.file = nd;
+ b->pos = pos;
+ b->size = 0;
+ }
+
+ // adjust size to this block
+ if( l > (TESTFS_BLOCKSIZE-bpos) )
+ l = (TESTFS_BLOCKSIZE-bpos);
+
+ // copy data in
+ memcpy( &b->data[bpos], buf, l );
+
+ // adjust buffer info
+ if( b->size < bpos+l )
+ b->size = bpos+l;
+
+ uio->uio_resid -= l;
+ len -= l;
+ buf += l;
+ pos += l;
+
+ // keep node size and file offset up to date
+ //in case of an error.
+ if( pos > nd->status.st_size )
+ nd->status.st_size = pos;
+ fp->f_offset = pos;
+
+ if( pos >= TESTFS_FILESIZE_MAX )
+ return EFBIG;
+ }
+ }
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_fo_lseek (struct CYG_FILE_TAG *fp, off_t *apos, int whence )
+{
+ testfs_node *nd = (testfs_node *)fp->f_data;
+ off_t pos = *apos;
+
+ switch( whence )
+ {
+ case SEEK_SET:
+ // we are already where we want to be.
+ break;
+
+ case SEEK_CUR:
+ pos += fp->f_offset;
+ break;
+
+ case SEEK_END:
+ pos += nd->status.st_size;
+ break;
+
+ default:
+ return EINVAL;
+ }
+
+ // Check that pos is within current file size, or at the very end.
+ if( pos < 0 || pos > nd->status.st_size )
+ return EINVAL;
+
+ // All OK, set fp offset.
+ *apos = fp->f_offset = pos;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_fo_ioctl (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com,
+ CYG_ADDRWORD data)
+{
+ return ENOSYS;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_fo_fsync (struct CYG_FILE_TAG *fp, int mode )
+{
+ // Nothing to do
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_fo_close (struct CYG_FILE_TAG *fp)
+{
+ testfs_node *nd = (testfs_node *)fp->f_data;
+
+ nd->refcnt--; // remove open count
+
+ fp->f_data = 0; // clear data pointer
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_fo_fstat (struct CYG_FILE_TAG *fp, struct stat *buf )
+{
+ testfs_node *nd = (testfs_node *)fp->f_data;
+
+ *buf = nd->status;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_fo_getinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len )
+{
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_fo_setinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len )
+{
+ return ENOERR;
+}
+
+
+//==========================================================================
+// Directory operations
+
+static int testfs_fo_dirread (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio)
+{
+ testfs_node *nd = (testfs_node *)fp->f_data;
+ off_t pos = fp->f_offset;
+ cyg_iovec *iov = &uio->uio_iov[0];
+ char *buf = (char *)iov->iov_base;
+ off_t len = iov->iov_len;
+
+ // End of directory
+ if( pos >= TESTFS_FILEBLOCKS )
+ return ENOERR;
+
+ if( len < sizeof(struct dirent) )
+ return EINVAL;
+
+ for( ; pos < TESTFS_FILEBLOCKS; pos++ )
+ if( nd->u.dir.nodes[pos] != NULL )
+ {
+ struct dirent *ent = (struct dirent *)buf;
+ mystrcpy( ent->d_name, nd->u.dir.nodes[pos]->name );
+ uio->uio_resid -= sizeof(struct dirent);
+ break;
+ }
+
+ fp->f_offset = pos+1;
+
+ return ENOERR;
+}
+
+// -------------------------------------------------------------------------
+
+static int testfs_fo_dirlseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence )
+{
+ if( whence != SEEK_SET || *pos != 0)
+ return EINVAL;
+
+ *pos = fp->f_offset = 0;
+
+ return ENOERR;
+}
+
+//==========================================================================
+// Filesystem dump
+// Dumps out the node and block arrays in a readable format, and does
+// a little consistency checking as it goes.
+
+void testfs_dump(void)
+{
+ int errors = 0;
+ int i;
+ char *indent = "\n |";
+
+ diag_printf("Nodes:\n");
+ for( i = 0; i < TESTFS_NFILE; i++ )
+ {
+ testfs_node *nd = &node[i];
+
+ diag_printf("%3d : ",i);
+ if( nd->refcnt < 0 )
+ diag_printf("<free>");
+ else if( !S_ISDIR(nd->status.st_mode) )
+ {
+ // Regular file
+ int j;
+ diag_printf("f %8s %4ld |",nd->name,
+ (unsigned long)nd->status.st_size);
+ for( j = 0; j < TESTFS_FILEBLOCKS; j++ )
+ {
+ testfs_block *b = nd->u.file.data[j];
+ if( b != NULL )
+ {
+ if( j > 0 && (j%4) == 0 )
+ diag_printf(indent);
+ diag_printf(" %3d[%3ld,%3d]",b-block,
+ (unsigned long)b->pos,b->size);
+ if( b->u.file != nd )
+ {
+ errors++;
+ diag_printf("!");
+ }
+ }
+ }
+ }
+ else
+ {
+ // Directory
+ int j;
+ int rc = 1;
+ diag_printf("d %8s |",nd->name);
+
+ for( j = 0; j < TESTFS_FILEBLOCKS; j++ )
+ {
+ testfs_node *n = nd->u.dir.nodes[j];
+ if( n != NULL )
+ {
+ if( j > 0 && (j%4) == 0 )
+ diag_printf(indent);
+ diag_printf(" %3d[%7s]",n-node,n->name);
+ rc++;
+ }
+ }
+
+ if( nd->refcnt != rc )
+ {
+ diag_printf("%s refcount is %d should be %d",indent,nd->refcnt,rc);
+ if( nd->refcnt == rc+1 )
+ diag_printf(" (but may be current dir)");
+ }
+ }
+
+ diag_printf("\n");
+ }
+
+ diag_printf("Blocks:\n");
+
+ for( i = 0; i < TESTFS_NBLOCK; i++ )
+ {
+ testfs_block *b = &block[i];
+
+ diag_printf("%3d :",i);
+ if( b->pos == -1 )
+ diag_printf(" <free>");
+ else
+ {
+ int j;
+ testfs_node *nd = b->u.file;
+ diag_printf(" %3ld %3d %d[%7s]",b->pos,b->size,nd-node,nd->name);
+ for( j = 0; j < TESTFS_FILEBLOCKS; j++ )
+ {
+ if( nd->u.file.data[j] == b )
+ break;
+ }
+ if( j == TESTFS_FILEBLOCKS )
+ {
+ errors++;
+ diag_printf(" block not in file!");
+ }
+ }
+ diag_printf("\n");
+ }
+
+ if( errors != 0 )
+ diag_printf("%d errors detected\n",errors);
+}
+
+// -------------------------------------------------------------------------
+// EOF testfs.c
diff --git a/cesar/ecos/packages/io/pci/current/ChangeLog b/cesar/ecos/packages/io/pci/current/ChangeLog
new file mode 100644
index 0000000000..a59940725b
--- /dev/null
+++ b/cesar/ecos/packages/io/pci/current/ChangeLog
@@ -0,0 +1,385 @@
+2004-11-03 David Vrabel <dvrabel@arcom.com>
+
+ * src/pci.c (cyg_pci_configure_device): Fix bug which caused
+ memory resources to be not allocated.
+
+2004-10-13 David Brennan <eCos@brennanhome.com>
+
+ * src/pci.c: Added include of cyg/infra/diag.h to fix compiler
+ warning.
+
+2004-10-12 Mark Salter <msalter@redhat.com>
+
+ * cdl/io_pci.cdl (CYGPKG_IO_PCI_CONFIGURE_INTLINE): New option.
+ * src/pci.c (cyg_pci_translate_interrupt): Don't write INT LINE
+ register unless CYGPKG_IO_PCI_CONFIGURE_INTLINE defined.
+
+2004-08-31 Mark Salter <msalter@redhat.com>
+
+ * src/pci.c (cyg_pci_translate_interrupt): Write vector number into
+ INT_LINE register.
+ (cyg_pci_get_device_info): Add mechanism for HALs to specify certain
+ BARs to be ignored.
+ * include/pci_hw.h (CYG_PCI_IGNORE_BAR): New macro.
+ * doc/pci.sgml: Add info on HAL_PCI_IGNORE_BAR.
+
+2004-01-14 Nick Garnett <nickg@calivar.com>
+
+ * src/pci.c (cyg_pci_get_device_info): Added fix for devices that
+ only implement the bottom 16 bits of an IO BAR. This is allowed by
+ the standard but is very rare and mostly present in older devices
+ only. Without this cyg_pci_allocate_io_priv() gets confused.
+
+2004-01-09 David Vrabel <dvrabel@arcom.com>
+
+ * src/pci.c (cyg_pci_find_device): Remove debug message.
+
+2003-11-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/pci.c (cyg_pci_find_device): Removed a debug print which should
+ not be there and is causing an warning.
+
+2003-11-18 Manu Sharma <manu.sharma@ascom.com>
+
+ * src/pci.c : Additional changes in cyg_pci_get_device_info,
+ cyg_pci_set_device_info and cyg_pci_configure_device to be able
+ to support non-contiguous BARs.
+
+2003-09-29 Nick Garnett <nickg@balti.calivar.com>
+
+ * src/pci.c (cyg_pci_get_device_info): Removed check for inactive
+ BARs since the requirement for the BARs to be contiguous has been
+ relaxed in more recent versions of the PCI standard.
+
+2003-08-08 Gary Thomas <gary@mind.be>
+
+ * include/pci.h: Add CYGARC_PCI_DMA_ADDRESS() macro - used to
+ map CPU addresses to ones usable by PCI masters.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/io_pci.cdl: Fix doc link.
+
+2003-02-21 Gary Thomas <gary@mlbassoc.com>
+
+ * src/pci.c (cyg_pci_get_device_info): While scanning active
+ devices, remember the I/O and memory addresses they use. This
+ allows for new devices to be added which will not conflict.
+
+2003-02-20 Gary Thomas <gary@mlbassoc.com>
+
+ * tests/pcihdr.h: Update to latest published version.
+
+2002-05-14 Jesper Skov <jskov@redhat.com>
+
+ * tests/pci1.c: Fix warning.
+
+2002-02-13 Hugo Tyson <hmt@redhat.com>
+
+ * doc/pci.sgml: Tidy up some typos and PROGRAMLISTING width
+ issues.
+
+2002-02-11 Mark Salter <msalter@redhat.com>
+
+ * doc/pci.sgml: Brought docs up to date with current code.
+
+2002-01-31 Mark Salter <msalter@redhat.com>
+
+ * src/pci.c (cyg_pci_init): Set default memory and io bases here
+ as the HAL_PCI_ALLOC_BASE_* macros may not be static values.
+
+2002-01-21 Mark Salter <msalter@redhat.com>
+
+ * src/pci.c (cyg_pci_get_device_info): Fix setting of upper 32 bits
+ for 64-bit BAR.
+
+2001-09-28 Gary Thomas <gthomas@redhat.com>
+
+ * src/pci.c (cyg_pci_find_next):
+ * include/pci.h: Allow platforms to restrict PCI bus/device ranges.
+
+2001-08-22 Gary Thomas <gthomas@redhat.com>
+
+ * src/pci.c:
+ printf() is no longer a part of RedBoot. Thus all programs
+ must use diag_printf() and related functions instead.
+
+2001-02-28 Hugo Tyson <hmt@redhat.com>
+
+ * tests/pci1.c (pci_scan): Added a new function to re-scan the
+ device list after configuring to let a human confirm that we truly
+ are seeing distinct devices - ie. do they retain their distinct
+ resource allocations in the BARs? This was useful to me in
+ investigating a recalcitrant target...
+
+2001-02-02 Jesper Skov <jskov@redhat.com>
+
+ * tests/pci2.c (pci_test): Removed bogus check for 1MB IO limit.
+
+2001-01-10 Jesper Skov <jskov@redhat.com>
+
+ * src/pci.c (cyg_pci_get_device_info): Do correct casting of
+ header_type. Do not make assumptions about structure layout.
+
+ * tests/pcihdr.h: Updated.
+
+2001-01-02 Hugo Tyson <hmt@redhat.com>
+
+ * include/pci.h: Define new API to perform more generalized matching
+ on device properties.
+
+ * src/pci.c (cyg_pci_find_matching): New API implementation.
+
+2000-12-21 Mark Salter <msalter@redhat.com>
+
+ * include/pci_hw.h: Add platform hook so certain devices
+ can be skipped by generic PCI io code. This is a workaround
+ for a hw problem where configuration space cycles on some
+ devices cause a bus lockup.
+
+ * src/pci.c (cyg_pci_find_next): Use platform hook to ignore
+ certain devices during device search.
+
+2000-12-02 Gary Thomas <gthomas@redhat.com>
+
+ * src/pci.c:
+ * cdl/io_pci.cdl: Add CDL to control debug prints.
+
+2000-11-30 Gary Thomas <gthomas@redhat.com>
+
+ * src/pci.c (cyg_pci_find_next): Improve debug prints when
+ scanning the bus, showing vendor and device code for each slot.
+
+2000-11-19 Gary Thomas <gthomas@redhat.com>
+
+ * src/pci.c (cyg_pci_find_device): Don't update 'devid' if no
+ suitable devices found. This allows for simpler rescan for
+ multiple device types.
+
+2000-11-12 Gary Thomas <gthomas@redhat.com>
+
+ * src/pci_hw.c:
+ * src/pci.c: Layout changes require <pkgconf/hal.h>
+
+2000-11-06 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/pci.c (cyg_pci_find_next): Conditionalize debug printfs
+
+2000-11-04 Mark Salter <msalter@redhat.com>
+
+ * src/pci.c (cyg_pci_get_device_info): Add bridge support. Handle
+ already configured devices.
+ (cyg_pci_set_device_info): Add bridge support.
+ (cyg_pci_find_next): Support device id with valid bus number
+ combined with CYG_PCI_NULL_DEVFN.
+ (cyg_pci_configure_device): Return true if device already configured.
+ Fixed for devices which use no BARs.
+ (cyg_pci_allocate_io_priv): Remove bogus limit check.
+ (cyg_pci_configure_bus): New function to recursively configure a
+ bus and its subordinate bases.
+
+ * include/pci_cfg.h: Added bridge definitions.
+ (CYG_PCI_CFG_BAR_5): Corrected.
+
+ * include/pci.h (CYG_PCI_NULL_DEVFN): Define.
+ (cyg_pci_device): Add bridge support. Add num_bars. Add
+ declaration for cyg_pci_configure_bus.
+ (CYG_PCI_MAX_BUS): Increase to (arbitrary) 8.
+
+2000-03-28 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/io_pci.cdl:
+
+ Adjust documentation URLs.
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl\io_pci.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl\io_pci.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+
+1999-12-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * cdl/io_pci.cdl (CYGPKG_IO_PCI): Relevant to more than one platform
+ so reparent under IO package
+ (CYGPKG_IO_PCI_CFLAGS_REMOVE): Fix display line typo
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/io_pci.cdl: Define build options.
+
+1999-09-24 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/pci2.c (pci_test): Replaced CYG_ASSERT with CYG_TEST_CHECK
+
+1999-09-10 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/io_pci.h: Reparent under CYGPKG_IO - this is used under
+ more than one target now and the library itself is generic.
+
+1999-08-25 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/pci.c (cyg_pci_init): Made it idempotent.
+
+ * tests/pci1.c:
+ * tests/pci2.c:
+ * src/pci.c:
+ * include/pci.h:
+ All functions that deal with addresses in PCI space now use PCI
+ ADDRESS types.
+
+1999-08-24 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/pci1.c:
+ * tests/pci2.c:
+ * include/pci.h:
+ * src/pci.c:
+ Handle requests for memory regions in 64bit space.
+
+1999-08-24 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/pci1.c: Added more output, resource allocation, debug help
+ (enable devices).
+
+ * src/pci.c (cyg_pci_find_next): Handle multi-function devices.
+
+ * include/pci_cfg.h (CYG_PCI_CFG_COMMAND_ACTIVE): Added MASTER.
+ Added HEADER_TYPE definitions.
+
+1999-08-23 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/pci1.c: Fixed a couple of bugs in the vendor/device/class
+ table search code.
+
+1999-08-23 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/pcihdr.h: [Added]
+ * tests/pci1.c: Added Vendor/Device ID description output.
+
+ * include/pci_cfg.h: Added vendor and class IDs.
+ Also added Prog/IF IDs.
+
+1999-08-19 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/pci1.c (pci_test): Added printf() of class_rev code to
+ output of bus scan.
+
+ * include/pci.h (CYG_PCI_MAX_FN): Increased to 8.
+
+1999-08-19 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/pci.c (cyg_pci_allocate_memory, cyg_pci_allocate_io):
+ Check that device is inactive. Ensure that 1MB limits (IO/MEM1MB)
+ are observed.
+
+ * tests/pci2.c (pci_test): Added tests of io/mem allocators.
+
+1999-08-17 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/pci2.c (pci_test): Added (empty for now)
+ * tests/pci1.c: Added API checks.
+ * include/pci.h: Fixed typo.
+
+ * include/pci.h (CYG_PCI_NULL_DEVID): Changed initializer.
+ * src/pci.c (cyg_pci_find_next): Correct check for initializer.
+
+ * tests/pci1.c: Added.
+ Fixed output.
+
+ * include/pci_cfg.h:
+ * include/pci.h:
+ * include/pci_hw.h:
+ * src/pci_hw.c:
+ * src/pci.c:
+ Renamed cyg_pci_config_interrupt to cyg_pci_translate_interrupt.
+ Untabified.
+
+1999-08-16 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/io_pci.cdl:
+
+ Parent PCI library package under package on which it depends.
+
+1999-08-16 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/io_pci.h:
+
+ Parent PCI package under package on which it depends.
+
+1999-08-16 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pci.h:
+ * src/pci.c (cyg_pci_config_interrupt):
+ * include/pci_hw.h:
+ * src/pci_hw.c (cyg_pcihw_config_interrupt):
+ Added interrupt configuration functions.
+
+1999-08-13 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pci_cfg.h:
+ * include/pci.h:
+ * src/pci_hw.c:
+ * src/pci.c:
+ Extended cyg_pci_device and API.
+ Renamed HAL macros.
+ Put physical address in base_map.
+
+ (cyg_pci_get_device_info): Fix switch. Clear base_size when device
+ enabled.
+
+1999-08-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pci_hw.h:
+ * include/pci_cfg.h:
+ * include/pci.h:
+ * src/pci_hw.c:
+ * src/pci.c:
+ Renamed some registers. Fixed some bad arguments. Added forgotten
+ externCs.
+ cyg_pci_configure_device fleshed out a bit.
+
+ * First half-empty files checked in.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/io/pci/current/cdl/io_pci.cdl b/cesar/ecos/packages/io/pci/current/cdl/io_pci.cdl
new file mode 100644
index 0000000000..1181c576c7
--- /dev/null
+++ b/cesar/ecos/packages/io/pci/current/cdl/io_pci.cdl
@@ -0,0 +1,125 @@
+# ====================================================================
+#
+# io_pci.cdl
+#
+# eCos PCI library configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Contributors:
+# Date: 1999-08-12
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_IO_PCI {
+ display "PCI configuration library"
+ doc ref/io-pci.html
+ include_dir cyg/io
+ parent CYGPKG_IO
+ description "
+ The PCI configuration library provides initialization of devices
+ on the PCI bus. Functions to find and access these devices are
+ also provided."
+
+ compile pci.c pci_hw.c
+
+ cdl_component CYGPKG_IO_PCI_OPTIONS {
+ display "PCI build options"
+ flavor none
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_IO_PCI_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the PCI configuration library. These flags are used in addition
+ to the set of global flags."
+ }
+
+ cdl_option CYGPKG_IO_PCI_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the PCI configuration library. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_IO_PCI_DEBUG {
+ display "Enable debugging."
+ flavor bool
+ default_value 0
+ description "
+ This option enables minimal debugging of the PCI library.
+ In particular, it will print information about devices as the
+ PCI bus is being scanned/searched."
+ }
+
+ cdl_option CYGPKG_IO_PCI_TESTS {
+ display "PCI tests"
+ flavor data
+ no_define
+ calculated { "tests/pci1 tests/pci2" }
+ description "
+ This option specifies the set of tests for the PCI configuration library."
+ }
+
+ cdl_option CYGPKG_IO_PCI_CONFIGURE_INTLINE {
+ display "Writeback Interrupt Line register."
+ flavor bool
+ default_value 0
+ description "
+ This option causes a PCI device interrupt vector to be
+ written to the Interrupt Line register in config space.
+ This is traditionally done by a BIOS so that device
+ drivers can read the interrupt vector directly from
+ device configuration space."
+ }
+ }
+}
diff --git a/cesar/ecos/packages/io/pci/current/doc/pci.sgml b/cesar/ecos/packages/io/pci/current/doc/pci.sgml
new file mode 100644
index 0000000000..2b59b10cdf
--- /dev/null
+++ b/cesar/ecos/packages/io/pci/current/doc/pci.sgml
@@ -0,0 +1,637 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- pci.sgml -->
+<!-- -->
+<!-- eCos PCI support -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<PART id="io-pci">
+<TITLE>PCI Library</TITLE>
+<CHAPTER id="ecos-pci-library">
+<TITLE>The eCos PCI Library</TITLE>
+<PARA>The PCI library is an optional part of eCos, and is only
+ applicable to some platforms.</PARA>
+<SECT1 id="pci-library">
+<TITLE>PCI Library</TITLE>
+<PARA>The eCos PCI library provides the following functionality:</PARA>
+<orderedlist>
+<listitem><para>Scan the PCI bus for specific devices or devices of a certain
+class.</para></listitem>
+<listitem><para>Read and change generic PCI information.</para></listitem>
+<listitem><para>Read and change device-specific PCI information.</para></listitem>
+<listitem><para>Allocate PCI memory and IO space to devices.</para></listitem>
+<listitem><para>Translate a device's PCI interrupts to equivalent HAL
+vectors.</para></listitem>
+</orderedlist>
+<PARA>Example code fragments are from the pci1 test (see <filename>io/pci/&lt;release&gt;/tests/pci1.c</filename>).</PARA>
+<PARA>All of the functions described below are declared in the header
+file <filename>&lt;cyg/io/pci.h&gt;</filename> which all
+clients of the PCI library should include.</PARA>
+<SECT2>
+<TITLE>PCI Overview</TITLE>
+<PARA>The PCI bus supports several address spaces: memory, IO, and configuration. All PCI
+devices must support mandatory configuration space registers. Some devices may also present
+IO mapped and/or memory mapped resources. Before devices on the bus can be used, they must
+be configured. Basically, configuration will assign PCI IO and/or memory address ranges to
+each device and then enable that device. All PCI devices have a unique address in
+configuration space. This address is comprised of a bus number, a device number, and a
+function number. Special devices called bridges are used to connect two PCI busses together.
+The PCI standard supports up to 255 busses with each bus having up to 32 devices and each
+device having up to 8 functions.
+</PARA>
+<PARA>The environment in which a platform operates will dictate if and how eCos should
+configure devices on the PCI bus. If the platform acts as a host on a single PCI bus,
+then devices may be configured individually from the relevant device driver. If the
+platform is not the primary host, such as a PCI card plugged into a PC, configuration
+of PCI devices may be left to the PC BIOS. If PCI-PCI bridges are involved, configuration
+of all devices is best done all at once early in the boot process. This is because all
+devices on the secondary side of a bridge must be evaluated for their IO and memory space
+requirements before the bridge can be configured.
+</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Initializing the bus</TITLE>
+<PARA>The PCI bus needs to be initialized before it can be used.
+This only needs to be done once - some HALs may do it as part of
+the platform initialization procedure, other HALs may leave it to
+the application or device drivers to do it. The following function
+will do the initialization only once, so it's safe to call from
+multiple drivers:</PARA>
+<PROGRAMLISTING>void cyg_pci_init( void );</PROGRAMLISTING>
+</SECT2>
+<SECT2>
+<TITLE>Scanning for devices</TITLE>
+<PARA>After the bus has been initialized, it is possible to scan
+it for devices. This is done using the function:</PARA>
+<PROGRAMLISTING>cyg_bool cyg_pci_find_next( cyg_pci_device_id cur_devid,
+ cyg_pci_device_id *next_devid );
+</PROGRAMLISTING>
+<PARA>It will scan the bus for devices starting at <parameter>cur_devid
+</parameter>. If a device is found, its devid is stored in <parameter>
+next_devid</parameter> and the function returns <constant>true</constant>.
+</PARA>
+<PARA>The <filename>pci1</filename> test's outer loop looks like:</PARA>
+<PROGRAMLISTING>
+ cyg_pci_init();
+ if (cyg_pci_find_next(CYG_PCI_NULL_DEVID, &amp;devid)) {
+ do {
+ &lt;use devid&gt;
+ } while (cyg_pci_find_next(devid, &amp;devid));
+ }</PROGRAMLISTING>
+<PARA>What happens is that the bus gets initialized and a scan is
+started. <literal>CYG_PCI_NULL_DEVID</literal> causes <function>
+cyg_pci_find_next()</function> to restart its scan. If the bus does not
+contain any devices, the first call to <function>cyg_pci_find_next()</function>
+will return <constant>false</constant>.</PARA>
+<PARA>If the call returns <constant>true</constant>, a loop is entered where
+the found devid is used. After devid processing has completed, the next device
+on the bus is searched for; <function>cyg_pci_find_next()</function>
+continues its scan from the current devid. The loop terminates when
+no more devices are found on the bus.</PARA>
+<PARA>This is the generic way of scanning the bus, enumerating all
+the devices on the bus. But if the application is looking for a
+device of a given device class (e.g., a SCSI controller), or a specific
+vendor device, these functions simplify the task a bit:</PARA>
+<PROGRAMLISTING>
+cyg_bool cyg_pci_find_class( cyg_uint32 dev_class,
+ cyg_pci_device_id *devid );
+cyg_bool cyg_pci_find_device( cyg_uint16 vendor, cyg_uint16 device,
+ cyg_pci_device_id *devid );</PROGRAMLISTING>
+<PARA>They work just like <function>cyg_pci_find_next()</function>,
+but only return true when the dev_class or vendor/device
+qualifiers match those of a device on the bus. The devid serves
+as both an input and an output operand: the scan starts at the given
+device, and if a device is found devid is updated with the value
+for the found device.</PARA>
+<PARA>The <filename>&lt;cyg/io/pci_cfg.h&gt;</filename> header
+file (included by <filename>pci.h</filename>) contains definitions for PCI
+class, vendor and device codes which can be used as arguments to the find
+functions.
+The list of vendor and device codes is not complete: add new codes
+as necessary. If possible also register the codes at the PCI Code
+List (<ulink url="http://www.yourvote.com/pci">http://www.yourvote.com/pci)
+</ulink> which is where the eCos definitions are generated from.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Generic config information</TITLE>
+<PARA>When a valid device ID (devid) is found using one of the above
+functions, the associated device can be queried and controlled using
+the functions:</PARA>
+<PROGRAMLISTING>
+void cyg_pci_get_device_info ( cyg_pci_device_id devid,
+ cyg_pci_device *dev_info );
+void cyg_pci_set_device_info ( cyg_pci_device_id devid,
+ cyg_pci_device *dev_info );</PROGRAMLISTING>
+<PARA>The <structname>cyg_pci_device structure</structname> (defined in
+<filename>pci.h</filename>) primarily holds information as described by the PCI
+ specification <link linkend=pci-spec>[1]</link>.
+The <filename>pci1</filename> test prints out some of this information:</PARA>
+<PROGRAMLISTING> // Get device info
+ cyg_pci_get_device_info(devid, &amp;dev_info);
+ diag_printf("\n Command 0x%04x, Status 0x%04x\n",
+ dev_info.command, dev_info.status);</PROGRAMLISTING>
+<PARA>The command register can also be written to, controlling (among
+other things) whether the device responds to IO and memory access
+from the bus. </PARA>
+</SECT2>
+<SECT2>
+<TITLE>Specific config information</TITLE>
+<PARA>The above functions only allow access to generic PCI config
+registers. A device can have extra config registers not specified
+by the PCI specification. These can be accessed with these functions:</PARA>
+<PROGRAMLISTING>
+void cyg_pci_read_config_uint8( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint8 *val);
+void cyg_pci_read_config_uint16( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint16 *val);
+void cyg_pci_read_config_uint32( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint32 *val);
+void cyg_pci_write_config_uint8( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint8 val);
+void cyg_pci_write_config_uint16( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint16 val);
+void cyg_pci_write_config_uint32( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint32 val);
+</PROGRAMLISTING>
+<PARA>The write functions should only be used for device-specific
+config registers since using them on generic registers may invalidate
+the contents of a previously fetched cyg_pci_device
+structure.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Allocating memory</TITLE>
+<PARA>A PCI device ignores all IO and memory access from the PCI
+bus until it has been activated. Activation cannot happen until
+after device configuration. Configuration means telling the device
+where it should map its IO and memory resources. This is done with
+one of the following functions::</PARA>
+<PROGRAMLISTING>cyg_bool cyg_pci_configure_device( cyg_pci_device *dev_info );
+cyg_bool cyg_pci_configure_bus( cyg_uint8 bus, cyg_uint8 *next_bus );
+</PROGRAMLISTING>
+<PARA>The <function>cyg_pci_configure_device</function> handles all IO
+and memory regions that need configuration on non-bridge devices. On
+platforms with multiple busses connected by bridges, the <function>
+cyg_pci_configure_bus</function> function should be used. It will recursively
+configure all devices on the given <parameter>bus</parameter> and all
+subordinate busses. <function>cyg_pci_configure_bus</function> will
+use <function>cyg_pci_configure_device</function> to configure
+individual non-bridge devices.
+</PARA>
+<PARA> Each region is represented in the PCI device's config space by BARs
+(Base Address Registers) and is handled individually according to type
+using these functions:</PARA>
+<PROGRAMLISTING>cyg_bool cyg_pci_allocate_memory( cyg_pci_device *dev_info,
+ cyg_uint32 bar,
+ CYG_PCI_ADDRESS64 *base );
+cyg_bool cyg_pci_allocate_io( cyg_pci_device *dev_info,
+ cyg_uint32 bar,
+ CYG_PCI_ADDRESS32 *base );</PROGRAMLISTING>
+<PARA>The memory bases (in two distinct address spaces) are increased
+as memory regions are allocated to devices. Allocation will fail
+(the function returns false) if the base exceeds the limits of the
+address space (IO is 1MB, memory is 2^32 or 2^64 bytes).</PARA>
+<PARA>These functions can also be called directly by the application/driver
+if necessary, but this should not be necessary.</PARA>
+<PARA>The bases are initialized with default values provided by
+the HAL. It is possible for an application to override these using
+the following functions: </PARA>
+<PROGRAMLISTING>void cyg_pci_set_memory_base( CYG_PCI_ADDRESS64 base );
+void cyg_pci_set_io_base( CYG_PCI_ADDRESS32 base );</PROGRAMLISTING>
+<PARA>When a device has been configured, the cyg_pci_device
+structure will contain the physical address in the CPU's
+address space where the device's memory regions can be
+accessed. </PARA>
+<PARA>This information is provided in <varname>base_map[]</varname> -
+there is a 32 bit word for each of the device's BARs. For
+32 bit PCI memory regions, each 32 bit word will be an actual pointer
+that can be used immediately by the driver: the memory space will normally
+be linearly addressable by the CPU.</PARA>
+<PARA>However, for 64 bit PCI memory regions, some (or all) of the
+region may be outside of the CPUs address space. In this case the
+driver will need to know how to access the region in segments. This
+functionality may be adopted by the eCos HAL if deemed useful in
+the future. The 2GB available on many systems should suffice though.</PARA>
+</SECT2>
+<SECT2 id="pci-interrupts">
+<TITLE>Interrupts</TITLE>
+<PARA>A device may generate interrupts. The HAL vector associated
+with a given device on the bus is platform specific. This function
+allows a driver to find the actual interrupt vector for a given
+device:</PARA>
+<PROGRAMLISTING>cyg_bool cyg_pci_translate_interrupt( cyg_pci_device *dev_info,
+ CYG_ADDRWORD *vec );</PROGRAMLISTING>
+<PARA>If the function returns false, no interrupts will be generated
+by the device. If it returns true, the CYG_ADDRWORD pointed
+to by vec is updated with the HAL interrupt vector the device will
+be using. This is how the function is used in the <filename>pci1</filename>
+test:</PARA>
+<PROGRAMLISTING> if (cyg_pci_translate_interrupt(&amp;dev_info, &amp;irq))
+ diag_printf(" Wired to HAL vector %d\n", irq);
+ else
+ diag_printf(" Does not generate interrupts.\n");</PROGRAMLISTING>
+<PARA>The application/drive should attach an interrupt
+handler to a device's interrupt before activating the device.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Activating a device</TITLE>
+<PARA>When the device has been allocated memory space it can be
+activated. This is not done by the library since a driver may have
+to initialize more state on the device before it can be safely activated.</PARA>
+<PARA>Activating the device is done by enabling flags in its command
+word. As an example, see the <filename>pci1</filename> test which can be
+configured to enable the devices it finds. This allows these to be accessed from
+GDB (if a breakpoint is set on <function>cyg_test_exit</function>):</PARA>
+<PROGRAMLISTING>#ifdef ENABLE_PCI_DEVICES
+ {
+ cyg_uint16 cmd;
+
+ // Don't use cyg_pci_set_device_info since it clears
+ // some of the fields we want to print out below.
+ cyg_pci_read_config_uint16(dev_info.devid,
+ CYG_PCI_CFG_COMMAND, &amp;cmd);
+ cmd |= CYG_PCI_CFG_COMMAND_IO|CYG_PCI_CFG_COMMAND_MEMORY;
+ cyg_pci_write_config_uint16(dev_info.devid,
+ CYG_PCI_CFG_COMMAND, cmd);
+ }
+ diag_printf(" **** Device IO and MEM access enabled\n");
+#endif</PROGRAMLISTING>
+<note><title>Note</title><PARA>The best way to activate a device is actually
+through <function>cyg_pci_set_device_info()</function>,
+but in this particular case the <structname>cyg_pci_device</structname>
+structure contents from before the activation is required for printout
+further down in the code.</PARA></note>
+</SECT2>
+<SECT2>
+<TITLE>Links</TITLE>
+<PARA>See these links for more information about PCI:</PARA>
+<orderedlist>
+<listitem><PARA><anchor id="pci-spec"><ulink url="http://www.pcisig.com/">
+http://www.pcisig.com/</ulink> - information on the PCI specifications
+</para></listitem>
+<listitem><para>
+<ulink url="http://www.yourvote.com/pci/">http://www.yourvote.com/pci/
+</ulink> - list of vendor and device IDs
+</para>
+</listitem>
+<listitem><para><ulink url="http://www.picmg.org/">http://www.picmg.org/
+</ulink> - PCI Industrial Computer Manufacturers Group</PARA>
+</listitem>
+</orderedlist>
+</SECT2>
+</SECT1>
+<SECT1 id="pci-library-reference">
+<TITLE>PCI Library reference</TITLE>
+<PARA>This document defines the PCI Support Library for eCos.</PARA>
+<PARA>The PCI support library provides a set of routines for accessing
+the PCI bus configuration space in a portable manner. This is provided
+by two APIs. The high level API is used by device drivers, or other
+code, to access the PCI configuration space portably. The low level
+API is used by the PCI library itself to access the hardware in
+a platform-specific manner, and may also be used by device drivers
+to access the PCI configuration space directly.</PARA>
+<PARA>Underlying the low-level API is HAL support for the basic
+configuration space operations. These should not generally be used
+by any code other than the PCI library, and are present in the HAL
+to allow low level initialization of the PCI bus and devices to
+take place if necessary.</PARA>
+<SECT2>
+<TITLE>PCI Library API</TITLE>
+<PARA>The PCI library provides the following routines and types
+for accessing the PCI configuration space.</PARA>
+<PARA>The API for the PCI library is found in the header file
+<filename class=headerfile>&lt;cyg/io/pci.h&gt;</filename>.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Definitions</TITLE>
+<PARA>The header file contains definitions for the common configuration
+structure offsets and specimen values for device, vendor and class
+code.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Types and data structures</TITLE>
+<PARA>The following types are defined:</PARA>
+<PROGRAMLISTING>typedef CYG_WORD32 cyg_pci_device_id;</PROGRAMLISTING>
+<PARA>This is comprised of the bus number, device number and functional
+unit numbers packed into a single word. The macro <function>CYG_PCI_DEV_MAKE_ID()
+</function>, in conjunction with the <function>CYG_PCI_DEV_MAKE_DEVFN()</function>
+macro, may be used to construct a device id from the bus, device and functional
+unit numbers. Similarly the macros <function>CYG_PCI_DEV_GET_BUS()</function>,
+<function>CYG_PCI_DEV_GET_DEVFN()</function>,
+<function>CYG_PCI_DEV_GET_DEV()</function>, and
+<function>CYG_PCI_DEV_GET_FN()</function> may be used to extract the
+constituent parts of a device id. It should not be necessary to use these
+macros under normal circumstances. The following code fragment demonstrates
+how these macros may be used:</PARA>
+<PROGRAMLISTING>
+ // Create a packed representation of device 1, function 0
+ cyg_uint8 devfn = CYG_PCI_DEV_MAKE_DEVFN(1,0);
+
+ // Create a packed devid for that device on bus 2
+ cyg_pci_device_id devid = CYG_PCI_DEV_MAKE_ID(2, devfn);
+
+ diag_printf("bus %d, dev %d, func %d\n",
+ CYG_PCI_DEV_GET_BUS(devid),
+ CYG_PCI_DEV_GET_DEV(CYG_PCI_DEV_GET_DEVFN(devid)),
+ CYG_PCI_DEV_GET_FN(CYG_PCI_DEV_GET_DEVFN(devid));
+</PROGRAMLISTING>
+<PROGRAMLISTING>typedef struct cyg_pci_device;</PROGRAMLISTING>
+<PARA>This structure is used to contain data read from a PCI device's
+configuration header by <function>cyg_pci_get_device_info()</function>.
+It is also used to record the resource allocations made to the device.</PARA>
+<PROGRAMLISTING>typedef CYG_WORD64 CYG_PCI_ADDRESS64;
+typedef CYG_WORD32 CYG_PCI_ADDRESS32;</PROGRAMLISTING>
+<PARA>Pointers in the PCI address space are 32 bit (IO space) or
+32/64 bit (memory space). In most platform and device configurations
+all of PCI memory will be linearly addressable using only 32 bit
+pointers as read from <varname>base_map[]</varname>.</PARA>
+<PARA>The 64 bit type is used to allow handling 64 bit devices in
+the future, should it be necessary, without changing the library's
+API.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Functions</TITLE>
+<PROGRAMLISTING>void cyg_pci_init(void);</PROGRAMLISTING>
+<PARA>Initialize the PCI library and establish contact with the
+hardware. This function is idempotent and can be called either by
+all drivers in the system, or just from an application initialization
+function.</PARA>
+<PROGRAMLISTING>cyg_bool cyg_pci_find_device( cyg_uint16 vendor,
+ cyg_uint16 device,
+ cyg_pci_device_id *devid );</PROGRAMLISTING>
+<PARA>Searches the PCI bus configuration space for a device with
+the given <parameter>vendor</parameter> and <parameter>device</parameter>
+ids. The search starts at the device pointed to by <parameter>devid</parameter>,
+or at the first slot if it contains <literal>CYG_PCI_NULL_DEVID</literal>.
+<parameter>*devid</parameter> will be updated with the ID of the next device
+found. Returns <constant>true</constant> if one is found and <constant>false
+</constant> if not.</PARA>
+<PROGRAMLISTING>cyg_bool cyg_pci_find_class( cyg_uint32 dev_class,
+ cyg_pci_device_id *devid );</PROGRAMLISTING>
+<PARA>Searches the PCI bus configuration space for a device with
+the given <parameter>dev_class</parameter> class code. The search starts at the
+device pointed to by <parameter>devid</parameter>, or at the first slot if it
+contains <literal>CYG_PCI_NULL_DEVID</literal>.</PARA>
+<PARA><parameter>*devid</parameter> will be updated with the ID of the next
+device found. Returns <constant>true</constant> if one is found and
+<constant>false</constant> if not.</PARA>
+<PROGRAMLISTING>cyg_bool cyg_pci_find_next( cyg_pci_device_id cur_devid,
+ cyg_pci_device_id *next_devid );</PROGRAMLISTING>
+<PARA>Searches the PCI configuration space for the next valid device
+after <parameter>cur_devid</parameter>. If <parameter>cur_devid</parameter>
+is given the value <literal>CYG_PCI_NULL_DEVID</literal>, then the search starts
+at the first slot. It is permitted for <parameter>next_devid</parameter> to
+point to <parameter>cur_devid</parameter>. Returns <constant>true</constant>
+if another device is found and <constant>false</constant> if not.</PARA>
+<PROGRAMLISTING>
+cyg_bool cyg_pci_find_matching( cyg_pci_match_func *matchp,
+ void * match_callback_data,
+ cyg_pci_device_id *devid );
+</PROGRAMLISTING>
+<PARA>Searches the PCI bus configuration space for a device whose properties
+match those required by the caller supplied <parameter>cyg_pci_match_func</parameter>.
+The search starts at the device pointed to by <parameter>devid</parameter>, or
+at the first slot if it contains <constant>CYG_PCI_NULL_DEVID</constant>. The
+<parameter>devid</parameter> will be updated with the ID of the next device found.
+This function returns <constant>true</constant> if a matching device is found
+and <constant>false</constant> if not.
+</PARA>
+<PARA>The match_func has a type declared as:</PARA>
+<PROGRAMLISTING>
+typedef cyg_bool (cyg_pci_match_func)( cyg_uint16 vendor,
+ cyg_uint16 device,
+ cyg_uint32 class,
+ void * user_data);
+</PROGRAMLISTING>
+<PARA>The <parameter>vendor</parameter>, <parameter>device</parameter>, and
+<parameter>class</parameter> are from the device configuration space. The
+<parameter>user_data</parameter> is the callback data passed to <function>
+cyg_pci_find_matching</function>.
+</PARA>
+<PROGRAMLISTING>void cyg_pci_get_device_info ( cyg_pci_device_id devid,
+ cyg_pci_device *dev_info );</PROGRAMLISTING>
+<PARA>This function gets the PCI configuration information for the
+device indicated in <parameter>devid</parameter>. The common fields of the
+<structname>cyg_pci_device</structname> structure, and the appropriate fields
+of the relevant header union member are filled in from the device's
+configuration space.
+If the device has not been enabled, then this function will also fetch
+the size and type information from the base address registers and
+place it in the <varname>base_size[]</varname> array.</PARA>
+<PROGRAMLISTING>void cyg_pci_set_device_info ( cyg_pci_device_id devid,
+ cyg_pci_device *dev_info );</PROGRAMLISTING>
+<PARA>This function sets the PCI configuration information for the
+device indicated in <parameter>devid</parameter>. Only the configuration space
+registers that are writable are actually written. Once all the fields have
+been written, the device info will be read back into <parameter>*dev_info
+</parameter>, so that it reflects the true state of the hardware.</PARA>
+<PROGRAMLISTING>
+void cyg_pci_read_config_uint8( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint8 *val );
+void cyg_pci_read_config_uint16( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint16 *val );
+void cyg_pci_read_config_uint32( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint32 *val );
+</PROGRAMLISTING>
+<PARA>These functions read registers of the appropriate size from
+the configuration space of the given device. They should mainly
+be used to access registers that are device specific. General PCI
+registers are best accessed through <function>cyg_pci_get_device_info()
+</function>.</PARA>
+<PROGRAMLISTING>
+void cyg_pci_write_config_uint8( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint8 val );
+void cyg_pci_write_config_uint16( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint16 val );
+void cyg_pci_write_config_uint32( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint32 val );
+</PROGRAMLISTING>
+<PARA>These functions write registers of the appropriate size to
+the configuration space of the given device. They should mainly
+be used to access registers that are device specific. General PCI
+registers are best accessed through <function>cyg_pci_get_device_info()
+</function>. Writing the general registers this way may render the contents of
+a <structname>cyg_pci_device</structname> structure invalid.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Resource allocation</TITLE>
+<PARA>These routines allocate memory and I/O space to PCI devices.</PARA>
+<PROGRAMLISTING>cyg_bool cyg_pci_configure_device( cyg_pci_device *dev_info )</PROGRAMLISTING>
+<PARA>Allocate memory and IO space to all base address registers
+using the current memory and IO base addresses in the library. The
+allocated base addresses, translated into directly usable values,
+will be put into the matching <varname>base_map[]</varname> entries
+in <parameter>*dev_info</parameter>. If <parameter>*dev_info</parameter> does
+not contain valid <varname>base_size[]</varname> entries, then the result is
+<constant>false</constant>. This function will also call <function>
+cyg_pci_translate_interrupt()</function> to put the interrupt vector into the
+HAL vector entry.</PARA>
+<PROGRAMLISTING>cyg_bool cyg_pci_configure_bus( cyg_uint8 bus, cyg_uint8 *next_bus )
+</PROGRAMLISTING>
+<PARA>Allocate memory and IO space to all base address registers on all devices
+on the given bus and all subordinate busses. If a PCI-PCI bridge is found on
+<parameter>bus</parameter>, this function will call itself recursively in order
+to configure the bus on the other side of the bridge. Because of the nature of
+bridge devices, all devices on the secondary side of a bridge must be allocated
+memory and IO space before the memory and IO windows on the bridge device can be
+properly configured. The <parameter>next_bus</parameter> argument points to the
+bus number to assign to the next subordinate bus found. The number will be
+incremented as new busses are discovered. If successful, <constant>true</constant>
+is returned. Otherwise, <constant>false</constant> is returned.
+</PARA>
+<PROGRAMLISTING>
+cyg_bool cyg_pci_translate_interrupt( cyg_pci_device *dev_info,
+ CYG_ADDRWORD *vec );
+</PROGRAMLISTING>
+<PARA>Translate the device's PCI interrupt (INTA#-INTD#)
+to the associated HAL vector. This may also depend on which slot
+the device occupies. If the device may generate interrupts, the
+translated vector number will be stored in <parameter>vec</parameter> and the
+result is <constant>true</constant>. Otherwise the result is <constant>false
+</constant>.</PARA>
+<PROGRAMLISTING>
+cyg_bool cyg_pci_allocate_memory( cyg_pci_device *dev_info,
+ cyg_uint32 bar,
+ CYG_PCI_ADDRESS64 *base );
+cyg_bool cyg_pci_allocate_io( cyg_pci_device *dev_info,
+ cyg_uint32 bar,
+ CYG_PCI_ADDRESS32 *base );
+</PROGRAMLISTING>
+<PARA>These routines allocate memory or I/O space to the base address
+register indicated by <parameter>bar</parameter>. The base address in
+<parameter>*base</parameter> will be correctly aligned and the address of the
+next free location will be written back into it if the allocation succeeds. If
+the base address register is of the wrong type for this allocation, or
+<parameter>dev_info</parameter> does not contain valid <varname>base_size[]
+</varname> entries, the result is <constant>false</constant>. These functions
+allow a device driver to set up its own mappings if it wants. Most devices
+should probably use <function>cyg_pci_configure_device()</function>.</PARA>
+<PROGRAMLISTING>void cyg_pci_set_memory_base( CYG_PCI_ADDRESS64 base );
+void cyg_pci_set_io_base( CYG_PCI_ADDRESS32 base );</PROGRAMLISTING>
+<PARA>These routines set the base addresses for memory and I/O mappings
+to be used by the memory allocation routines. Normally these base
+addresses will be set to default values based on the platform. These
+routines allow these to be changed by application code if necessary.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>PCI Library Hardware API</TITLE>
+<PARA>This API is used by the PCI library to access the PCI bus
+configuration space. Although it should not normally be necessary,
+this API may also be used by device driver or application code to
+perform PCI bus operations not supported by the PCI library.</PARA>
+<PROGRAMLISTING>void cyg_pcihw_init(void);</PROGRAMLISTING>
+<PARA>Initialize the PCI hardware so that the configuration space
+may be accessed.</PARA>
+<PROGRAMLISTING>
+void cyg_pcihw_read_config_uint8( cyg_uint8 bus,
+ cyg_uint8 devfn, cyg_uint8 offset, cyg_uint8 *val);
+void cyg_pcihw_read_config_uint16( cyg_uint8 bus,
+ cyg_uint8 devfn, cyg_uint8 offset, cyg_uint16 *val);
+void cyg_pcihw_read_config_uint32( cyg_uint8 bus,
+ cyg_uint8 devfn, cyg_uint8 offset, cyg_uint32 *val);
+</PROGRAMLISTING>
+<PARA>These functions read a register of the appropriate size from
+the PCI configuration space at an address composed from the <parameter>bus
+</parameter>, <parameter>devfn</parameter> and <parameter>offset</parameter>
+arguments.</PARA>
+<PROGRAMLISTING>
+void cyg_pcihw_write_config_uint8( cyg_uint8 bus,
+ cyg_uint8 devfn, cyg_uint8 offset, cyg_uint8 val);
+void cyg_pcihw_write_config_uint16( cyg_uint8 bus,
+ cyg_uint8 devfn, cyg_uint8 offset, cyg_uint16 val);
+void cyg_pcihw_write_config_uint32( cyg_uint8 bus,
+ cyg_uint8 devfn, cyg_uint8 offset, cyg_uint32 val);
+</PROGRAMLISTING>
+<PARA>These functions write a register of the appropriate size to
+the PCI configuration space at an address composed from the
+<parameter>bus</parameter>, <parameter>devfn</parameter> and
+<parameter>offset</parameter> arguments.</PARA>
+<PROGRAMLISTING>
+cyg_bool cyg_pcihw_translate_interrupt( cyg_uint8 bus,
+ cyg_uint8 devfn,
+ CYG_ADDRWORD *vec);
+</PROGRAMLISTING>
+<PARA>This function interrogates the device and determines which
+HAL interrupt vector it is connected to.</PARA>
+</SECT2>
+<SECT2>
+<TITLE>HAL PCI support</TITLE>
+<PARA>HAL support consists of a set of C macros that provide the
+implementation of the low level PCI API.</PARA>
+<PROGRAMLISTING>HAL_PCI_INIT()</PROGRAMLISTING>
+<PARA>Initialize the PCI bus.</PARA>
+<PROGRAMLISTING>HAL_PCI_READ_UINT8( bus, devfn, offset, val )
+HAL_PCI_READ_UINT16( bus, devfn, offset, val )
+HAL_PCI_READ_UINT32( bus, devfn, offset, val )</PROGRAMLISTING>
+<PARA>Read a value from the PCI configuration space of the appropriate
+size at an address composed from the <parameter>bus</parameter>, <parameter>
+devfn</parameter> and <parameter>offset</parameter>.</PARA>
+<PROGRAMLISTING>HAL_PCI_WRITE_UINT8( bus, devfn, offset, val )
+HAL_PCI_WRITE_UINT16( bus, devfn, offset, val )
+HAL_PCI_WRITE_UINT32( bus, devfn, offset, val )</PROGRAMLISTING>
+<PARA>Write a value to the PCI configuration space of the appropriate
+size at an address composed from the <parameter>bus</parameter>, <parameter>
+devfn</parameter> and <parameter>offset</parameter>.</PARA>
+<PROGRAMLISTING>HAL_PCI_TRANSLATE_INTERRUPT( bus, devfn, *vec, valid )</PROGRAMLISTING>
+<PARA>Translate the device's interrupt line into a HAL
+interrupt vector.</PARA>
+<PROGRAMLISTING>HAL_PCI_ALLOC_BASE_MEMORY
+HAL_PCI_ALLOC_BASE_IO</PROGRAMLISTING>
+<PARA>These macros define the default base addresses used to initialize
+the memory and I/O allocation pointers.</PARA>
+<PROGRAMLISTING>HAL_PCI_PHYSICAL_MEMORY_BASE
+HAL_PCI_PHYSICAL_IO_BASE</PROGRAMLISTING>
+<PARA>PCI memory and IO range do not always correspond directly
+to physical memory or IO addresses. Frequently the PCI address spaces
+are windowed into the processor's address range at some
+offset. These macros define offsets to be added to the PCI base
+addresses to translate PCI bus addresses into physical memory addresses
+that can be used to access the allocated memory or IO space.</PARA>
+<NOTE>
+<PARA>The chunk of PCI memory space directly addressable though
+the window by the CPU may be smaller than the amount of PCI memory
+actually provided. In that case drivers will have to access PCI
+memory space in segments. Doing this will be platform specific and
+is currently beyond the scope of the HAL.</PARA>
+</NOTE>
+<PROGRAMLISTING>HAL_PCI_IGNORE_DEVICE( bus, dev, fn )</PROGRAMLISTING
+<PARA>This macro, if defined, may be used to limit the devices which are
+found by the bus scanning functions. This is sometimes necessary for
+devices which need special handling. If this macro evaluates to <constant>true
+</constant>, the given device will not be found by <function>cyg_pci_find_next
+</function> or other bus scanning functions.
+</PARA>
+<PROGRAMLISTING>HAL_PCI_IGNORE_BAR( dev_info, bar_num )</PROGRAMLISTING
+<PARA>This macro, if defined, may be used to limit which BARs are discovered
+and configured. This is sometimes necessary for platforms with limited PCI
+windows. If this macro evaluates to <constant>true</constant>, the given BAR
+will not be discovered by <function>cyg_pci_get_device_info</function> and
+therefore not configured by <function>cyg_pci_configure_device</function>.
+</PARA>
+</SECT2>
+</SECT1>
+</CHAPTER>
+</PART>
diff --git a/cesar/ecos/packages/io/pci/current/include/pci.h b/cesar/ecos/packages/io/pci/current/include/pci.h
new file mode 100644
index 0000000000..dea76fa8cc
--- /dev/null
+++ b/cesar/ecos/packages/io/pci/current/include/pci.h
@@ -0,0 +1,368 @@
+#ifndef CYGONCE_PCI_H
+#define CYGONCE_PCI_H
+//=============================================================================
+//
+// pci.h
+//
+// PCI library
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov, from design by nickg
+// Contributors: jskov
+// Date: 1999-08-09
+// Purpose: PCI configuration access
+// Usage:
+// #include <cyg/io/pci.h>
+// Description:
+// This library provides a set of routines for accessing
+// the PCI bus configuration space in a portable manner.
+// This is provided by two APIs. The high level API (defined
+// by this file) is used by device drivers, or other code, to
+// access the PCI configuration space portably. The low level
+// API (see pci_hw.h) is used by the PCI library itself
+// to access the hardware in a platform-specific manner and
+// may also be used by device drivers to access the PCI
+// configuration space directly.
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/io/pci_cfg.h>
+#include <cyg/io/pci_hw.h>
+
+//------------------------------------------------------------------
+// Map a logical (CPU local) address to one used by a PCI master
+// Normally, this is just the physical address of the object, but
+// it may differ if the platform has different address maps from
+// the CPU side vs. the PCI side
+#ifndef CYGARC_PCI_DMA_ADDRESS
+#define CYGARC_PCI_DMA_ADDRESS(_x_) CYGARC_PHYSICAL_ADDRESS(_x_)
+#endif
+
+//------------------------------------------------------------------
+// The PCI memory space can span 64 bits, IO space only 32 bits
+typedef CYG_WORD64 CYG_PCI_ADDRESS64;
+typedef CYG_WORD32 CYG_PCI_ADDRESS32;
+
+//------------------------------------------------------------------
+// Macros for manufacturing and decomposing device ids
+typedef CYG_WORD32 cyg_pci_device_id; // PCI device ID
+
+#define CYG_PCI_DEV_MAKE_ID(__bus,__devfn) (((__bus)<<16)|((__devfn)<<8))
+#define CYG_PCI_DEV_GET_BUS(__devid) ((__devid>>16)&0xFF)
+#define CYG_PCI_DEV_GET_DEVFN(__devid) ((__devid>>8)&0xFF)
+
+#define CYG_PCI_NULL_DEVID 0xffffffff
+#define CYG_PCI_NULL_DEVFN 0xffff
+
+//------------------------------------------------------------------
+// PCI device data definitions and structures
+
+typedef enum {
+ CYG_PCI_HEADER_NORMAL = 0,
+ CYG_PCI_HEADER_BRIDGE = 1,
+ CYG_PCI_HEADER_CARDBUS_BRIDGE = 2
+} cyg_pci_header_type;
+
+typedef struct // PCI device data
+{
+ cyg_pci_device_id devid; // ID of this device
+
+ // The following fields are read out of the
+ // config space for this device.
+
+ cyg_uint16 vendor; // vendor ID
+ cyg_uint16 device; // device ID
+ cyg_uint16 command; // command register
+ cyg_uint16 status; // status register
+ cyg_uint32 class_rev; // class+revision
+ cyg_uint8 cache_line_size; // cache line size
+ cyg_uint8 latency_timer; // latency timer
+ cyg_pci_header_type header_type; // header type
+ cyg_uint8 bist; // Built-in Self-Test
+ cyg_uint32 base_address[6]; // Memory base address registers
+
+ // The following fields are used by the resource allocation
+ // routines to keep track of allocated resources.
+ cyg_uint32 num_bars;
+
+ cyg_uint32 base_size[6]; // Memory size for each base address
+ cyg_uint32 base_map[6]; // Physical address mapped
+
+ CYG_ADDRWORD hal_vector; // HAL interrupt vector used by
+ // device if int_line!=0
+
+ // One of the following unions will be filled in according to
+ // the value of the header_type field.
+
+ union
+ {
+ struct
+ {
+ cyg_uint32 cardbus_cis; // CardBus CIS Pointer
+ cyg_uint16 sub_vendor; // subsystem vendor id
+ cyg_uint16 sub_id; // subsystem id
+ cyg_uint32 rom_address; // ROM address register
+ cyg_uint8 cap_list; // capability list
+ cyg_uint8 reserved1[7];
+ cyg_uint8 int_line; // interrupt line
+ cyg_uint8 int_pin; // interrupt pin
+ cyg_uint8 min_gnt; // timeslice request
+ cyg_uint8 max_lat; // priority-level request
+ } normal;
+ struct
+ {
+ cyg_uint8 pri_bus; // primary bus number
+ cyg_uint8 sec_bus; // secondary bus number
+ cyg_uint8 sub_bus; // subordinate bus number
+ cyg_uint8 sec_latency_timer; // secondary bus latency
+ cyg_uint8 io_base;
+ cyg_uint8 io_limit;
+ cyg_uint16 sec_status; // secondary bus status
+ cyg_uint16 mem_base;
+ cyg_uint16 mem_limit;
+ cyg_uint16 prefetch_base;
+ cyg_uint16 prefetch_limit;
+ cyg_uint32 prefetch_base_upper32;
+ cyg_uint32 prefetch_limit_upper32;
+ cyg_uint16 io_base_upper16;
+ cyg_uint16 io_limit_upper16;
+ cyg_uint8 reserved1[4];
+ cyg_uint32 rom_address; // ROM address register
+ cyg_uint8 int_line; // interrupt line
+ cyg_uint8 int_pin; // interrupt pin
+ cyg_uint16 control; // bridge control
+ } bridge;
+ struct
+ {
+ // Not yet supported
+ } cardbus_bridge;
+ } header;
+} cyg_pci_device;
+
+//------------------------------------------------------------------------
+// Init
+externC void cyg_pci_init( void );
+
+//------------------------------------------------------------------------
+// Common device configuration access functions
+
+// This function gets the PCI configuration information for the
+// device indicated in devid. The common fields of the cyg_pci_device
+// structure, and the appropriate fields of the relevant header union
+// member are filled in from the device's configuration space. If the
+// device has not been enabled, then this function will also fetch
+// the size and type information from the base address registers and
+// place it in the base_size[] array.
+externC void cyg_pci_get_device_info ( cyg_pci_device_id devid,
+ cyg_pci_device *dev_info );
+
+
+// This function sets the PCI configuration information for the
+// device indicated in devid. Only the configuration space registers
+// that are writable are actually written. Once all the fields have
+// been written, the device info will be read back into *dev_info, so
+// that it reflects the true state of the hardware.
+externC void cyg_pci_set_device_info ( cyg_pci_device_id devid,
+ cyg_pci_device *dev_info );
+
+//------------------------------------------------------------------------
+// Device find functions
+
+// Searches the PCI bus configuration space for a device with the
+// given vendor and device ids. The search starts at the device
+// pointed to by devid, or at the first slot if it contains
+// CYG_PCI_NULL_DEVID. *devid will be updated with the ID of the next
+// device found. Returns true if one is found and false if not.
+externC cyg_bool cyg_pci_find_device( cyg_uint16 vendor, cyg_uint16 device,
+ cyg_pci_device_id *devid );
+
+
+// Searches the PCI bus configuration space for a device with the
+// given class code. The search starts at the device pointed to by
+// devid, or at the first slot if it contains CYG_PCI_NULL_DEVID.
+// *devid will be updated with the ID of the next device found.
+// Returns true if one is found and false if not.
+externC cyg_bool cyg_pci_find_class( cyg_uint32 dev_class,
+ cyg_pci_device_id *devid );
+
+
+
+// Searches the PCI bus configuration space for a device whose properties
+// match those required by the match_func, which the user supplies. The
+// match_func's arguments are vendor, device, class exactly as they might
+// be in the two APIs above. The additional parameter is for any state
+// which a caller might wish available to its callback routine.
+// The search starts at the device pointed to by
+// devid, or at the first slot if it contains CYG_PCI_NULL_DEVID. *devid
+// will be updated with the ID of the next device found. Returns true if
+// one is found and false if not.
+typedef cyg_bool (cyg_pci_match_func)( cyg_uint16,/* vendor */
+ cyg_uint16,/* device */
+ cyg_uint32,/* class */
+ void * /* arbitrary user data */ );
+externC cyg_bool cyg_pci_find_matching( cyg_pci_match_func *matchp,
+ void * match_callback_data,
+ cyg_pci_device_id *devid );
+
+
+// Searches the PCI configuration space for the next valid device
+// after cur_devid. If cur_devid is given the value
+// CYG_PCI_NULL_DEVID, then the search starts at the first slot. It
+// is permitted for next_devid to point to the cur_devid. Returns
+// true if another device is found and false if not.
+externC cyg_bool cyg_pci_find_next( cyg_pci_device_id cur_devid,
+ cyg_pci_device_id *next_devid );
+
+//------------------------------------------------------------------------
+// Resource Allocation
+// These routines allocate memory and IO space to PCI devices.
+
+// Allocate memory and IO space to all base address registers using
+// the current memory and IO base addresses in the library. If
+// dev_info does not contain valid base_size[] entries, then the
+// result is false.
+externC cyg_bool cyg_pci_configure_device( cyg_pci_device *dev_info );
+
+// Allocate memory and IO space for all devices found on the given
+// bus and its subordinate busses. This routine recurses when a
+// PCI-to-PCI bridge is encountered. The next_bus argument points
+// to a variable holding the bus number of the next PCI bus to
+// be allocated when a bridge is encountered. This routine returns
+// true if successful, false if unsuccessful.
+externC cyg_bool cyg_pci_configure_bus( cyg_uint8 bus,
+ cyg_uint8 *next_bus );
+
+// These routines set the base addresses for memory and IO mappings
+// to be used by the memory allocation routines. Normally these base
+// addresses will be set to default values based on the platform,
+// these routines allow those to be changed by application code if
+// necessary.
+externC void cyg_pci_set_memory_base( CYG_PCI_ADDRESS64 base );
+externC void cyg_pci_set_io_base( CYG_PCI_ADDRESS32 base );
+
+// These routines allocate memory or IO space to the base address
+// register indicated by bar. The base address in *base will be
+// correctly aligned and the address of the next free location will
+// be written back into it if the allocation succeeds. If the base
+// address register is of the wrong type for this allocation, or
+// dev_info does not contain valid base_size[] entries, the result is
+// false.
+externC cyg_bool cyg_pci_allocate_memory( cyg_pci_device *dev_info,
+ cyg_uint32 bar,
+ CYG_PCI_ADDRESS64 *base );
+externC cyg_bool cyg_pci_allocate_io( cyg_pci_device *dev_info,
+ cyg_uint32 bar,
+ CYG_PCI_ADDRESS32 *base );
+
+// Translate the device's PCI interrupt (INTA#-INTD#) to the
+// associated HAL vector. This may also depend on which slot the
+// device occupies. If the device may generate interrupts, the
+// translated vector number will be stored in vec and the result is
+// true. Otherwise the result is false.
+externC cyg_bool cyg_pci_translate_interrupt( cyg_pci_device *dev_info,
+ CYG_ADDRWORD *vec );
+
+
+//----------------------------------------------------------------------
+// Specific device configuration access functions
+
+// Read functions
+// These functions read registers of the appropriate size from the
+// configuration space of the given device. They should mainly be
+// used to access registers that are device specific. General PCI
+// registers are best accessed through cyg_pci_get_device_info().
+externC void cyg_pci_read_config_uint8( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint8 *val);
+externC void cyg_pci_read_config_uint16( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint16 *val);
+externC void cyg_pci_read_config_uint32( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint32 *val);
+
+// Write functions
+// These functions write registers of the appropriate size to the
+// configuration space of the given device. They should mainly be
+// used to access registers that are device specific. General PCI
+// registers are best accessed through
+// cyg_pci_get_device_info(). Writing the general registers this way
+// may render the contents of a cyg_pci_device structure invalid.
+externC void cyg_pci_write_config_uint8( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint8 val);
+externC void cyg_pci_write_config_uint16( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint16 val);
+externC void cyg_pci_write_config_uint32( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint32 val);
+
+
+//----------------------------------------------------------------------
+// Functions private to the PCI library. These should only be used by
+// tests.
+externC cyg_bool cyg_pci_allocate_memory_priv(cyg_pci_device *dev_info,
+ cyg_uint32 bar,
+ CYG_PCI_ADDRESS64 *base,
+ CYG_PCI_ADDRESS64 *assigned_addr);
+externC cyg_bool cyg_pci_allocate_io_priv( cyg_pci_device *dev_info,
+ cyg_uint32 bar,
+ CYG_PCI_ADDRESS32 *base,
+ CYG_PCI_ADDRESS32 *assigned_addr);
+
+
+//----------------------------------------------------------------------
+// Bus probing limits.
+// Note: these can be overridden by the platform
+#ifndef CYG_PCI_MAX_BUS
+#define CYG_PCI_MAX_BUS 8 // Eight is enough?
+#endif
+#ifndef CYG_PCI_MAX_DEV
+#define CYG_PCI_MAX_DEV 32
+#endif
+#ifndef CYG_PCI_MIN_DEV
+#define CYG_PCI_MIN_DEV 0
+#endif
+#ifndef CYG_PCI_MAX_FN
+#define CYG_PCI_MAX_FN 8
+#endif
+#ifndef CYG_PCI_MAX_BAR
+#define CYG_PCI_MAX_BAR 6
+#endif
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_PCI_H
+// End of pci.h
diff --git a/cesar/ecos/packages/io/pci/current/include/pci_cfg.h b/cesar/ecos/packages/io/pci/current/include/pci_cfg.h
new file mode 100644
index 0000000000..436b4e3667
--- /dev/null
+++ b/cesar/ecos/packages/io/pci/current/include/pci_cfg.h
@@ -0,0 +1,1065 @@
+#ifndef CYGONCE_PCI_CFG_H
+#define CYGONCE_PCI_CFG_H
+//=============================================================================
+//
+// pci_cfg.h
+//
+// PCI configuration definitions
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov
+// Date: 1999-08-09
+// Purpose: Provides PCI configuration information
+// (common structure layout & defined vendor/class codes)
+// Usage:
+// #include <cyg/io/pci_cfg.h>
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+//----------------------------------------------------------------------
+// PCI Configuration structure offsets
+#define CYG_PCI_CFG_VENDOR 0x00
+#define CYG_PCI_CFG_DEVICE 0x02
+#define CYG_PCI_CFG_COMMAND 0x04
+#define CYG_PCI_CFG_STATUS 0x06
+#define CYG_PCI_CFG_CLASS_REV 0x08
+#define CYG_PCI_CFG_CACHE_LINE_SIZE 0x0c
+#define CYG_PCI_CFG_LATENCY_TIMER 0x0d
+#define CYG_PCI_CFG_HEADER_TYPE 0x0e
+#define CYG_PCI_CFG_BIST 0x0f
+#define CYG_PCI_CFG_BAR_BASE 0x10
+#define CYG_PCI_CFG_BAR_0 0x10
+#define CYG_PCI_CFG_BAR_1 0x14
+#define CYG_PCI_CFG_BAR_2 0x18
+#define CYG_PCI_CFG_BAR_3 0x1c
+#define CYG_PCI_CFG_BAR_4 0x20
+#define CYG_PCI_CFG_BAR_5 0x24
+#define CYG_PCI_CFG_CARDBUS_CIS 0x28
+#define CYG_PCI_CFG_SUB_VENDOR 0x2c
+#define CYG_PCI_CFG_SUB_ID 0x2e
+#define CYG_PCI_CFG_ROM_ADDRESS 0x30
+#define CYG_PCI_CFG_CAP_LIST 0x34
+#define CYG_PCI_CFG_INT_LINE 0x3c
+#define CYG_PCI_CFG_INT_PIN 0x3d
+#define CYG_PCI_CFG_MIN_GNT 0x3e
+#define CYG_PCI_CFG_MAX_LAT 0x3f
+
+// Bridge configuration offsets
+#define CYG_PCI_CFG_PRI_BUS 0x18
+#define CYG_PCI_CFG_SEC_BUS 0x19
+#define CYG_PCI_CFG_SUB_BUS 0x1a
+#define CYG_PCI_CFG_SEC_LATENCY_TIMER 0x1b
+#define CYG_PCI_CFG_IO_BASE 0x1c
+#define CYG_PCI_CFG_IO_LIMIT 0x1d
+#define CYG_PCI_CFG_SEC_STATUS 0x1e
+#define CYG_PCI_CFG_MEM_BASE 0x20
+#define CYG_PCI_CFG_MEM_LIMIT 0x22
+#define CYG_PCI_CFG_PREFETCH_BASE 0x24
+#define CYG_PCI_CFG_PREFETCH_LIMIT 0x26
+#define CYG_PCI_CFG_PREFETCH_BASE_UPPER32 0x28
+#define CYG_PCI_CFG_PREFETCH_LIMIT_UPPER32 0x2c
+#define CYG_PCI_CFG_IO_BASE_UPPER16 0x30
+#define CYG_PCI_CFG_IO_LIMIT_UPPER16 0x32
+#define CYG_PCI_CFG_BRIDGE_ROM_ADDRESS 0x38
+#define CYG_PCI_CFG_BRIDGE_CONTROL 0x3e
+
+
+//-----------------------------------------------------------------
+// PCI Control bits
+
+// Command
+#define CYG_PCI_CFG_COMMAND_IO 0x0001
+#define CYG_PCI_CFG_COMMAND_MEMORY 0x0002
+#define CYG_PCI_CFG_COMMAND_MASTER 0x0004
+#define CYG_PCI_CFG_COMMAND_SPECIAL 0x0008
+#define CYG_PCI_CFG_COMMAND_INVALIDATE 0x0010
+#define CYG_PCI_CFG_COMMAND_VGA_SNOOP 0x0020
+#define CYG_PCI_CFG_COMMAND_PARITY 0x0040
+#define CYG_PCI_CFG_COMMAND_WAIT 0x0080
+#define CYG_PCI_CFG_COMMAND_SERR 0x0100
+#define CYG_PCI_CFG_COMMAND_FAST_BACK 0x0200
+
+// Consider the device active if any of these bits are set.
+#define CYG_PCI_CFG_COMMAND_ACTIVE \
+ (CYG_PCI_CFG_COMMAND_IO \
+ |CYG_PCI_CFG_COMMAND_MEMORY \
+ |CYG_PCI_CFG_COMMAND_MASTER)
+
+// Header type
+#define CYG_PCI_CFG_HEADER_TYPE_MASK 0x7f
+#define CYG_PCI_CFG_HEADER_TYPE_MF 0x80
+
+// BAR
+#define CYG_PCI_CFG_BAR_SPACE_MASK 0x00000001
+#define CYG_PCI_CFG_BAR_SPACE_MEM 0x00000000
+#define CYG_PCI_CFG_BAR_SPACE_IO 0x00000001
+
+#define CYG_PRI_CFG_BAR_MEM_TYPE_MASK 0x00000006
+#define CYG_PRI_CFG_BAR_MEM_TYPE_32 0x00000000
+#define CYG_PRI_CFG_BAR_MEM_TYPE_1M 0x00000002
+#define CYG_PRI_CFG_BAR_MEM_TYPE_64 0x00000004
+
+#define CYG_PRI_CFG_BAR_MEM_PREFETCH 0x00000008
+
+#define CYG_PRI_CFG_BAR_MEM_MASK 0xfffffff0
+#define CYG_PRI_CFG_BAR_IO_MASK 0xfffffffc
+
+// Bridge control
+#define CYG_PCI_CFG_BRIDGE_CTL_PARITY 0x0001
+#define CYG_PCI_CFG_BRIDGE_CTL_SERR 0x0002
+#define CYG_PCI_CFG_BRIDGE_CTL_ISA 0x0004
+#define CYG_PCI_CFG_BRIDGE_CTL_VGA 0x0008
+#define CYG_PCI_CFG_BRIDGE_CTL_MASTER 0x0020
+#define CYG_PCI_CFG_BRIDGE_CTL_RESET 0x0040
+#define CYG_PCI_CFG_BRIDGE_CTL_FAST_BACK 0x0080
+
+//----------------------------------------------------------------------
+// PCI Vendor IDs
+/***********************************************************************
+ Can be extracted from the PCICODE List at http://www.yourvote.com/pci
+ maintained by Jib Boemler. Use the below Perl script and fix any
+ bad vendor names by hand.
+
+#!/usr/bin/perl
+while(<>) {
+ if (/PCI_VENTABLE/) {
+ %mvendors = {};
+ @vendors = ();
+ @codes = ();
+ while(<>) {
+ # Collect vendor names and codes.
+ if (m!.*0x([0-9A-F]{4}), \"([^\"]*)\".*!) {
+ $c = lc($1);
+ $v = uc($2);
+ $v =~ tr/-+ \/&.!/______ /;
+ $v =~ s/__/_/g;
+ $v =~ s/_$//;
+ push @vendors, $v;
+ push @codes, $c;
+ # Count occurences of vendor name.
+ $mvendors{$v} += 1;
+ }
+ last if (/;/);
+ }
+ # Ouput definitions.
+ while ($#vendors >= 0) {
+ $v = shift @vendors;
+ $c = shift @codes;
+
+ $o = "#define CYG_PCI_VENDOR_$v";
+ # If a vendor name occurs more than once, append code
+ # to get unique definitions.
+ if ($mvendors{$v} > 1) {
+ $o .= "_0x$c";
+ }
+ print $o . " " x (60-length($o)) . "0x$c\n";
+ }
+ }
+}
+***********************************************************************/
+
+//---------------------- AUTO GENERATED START --------------------------
+#define CYG_PCI_VENDOR_LOCKHEED_MARTIN 0x003d
+#define CYG_PCI_VENDOR_COMPAQ_0x0e11 0x0e11
+#define CYG_PCI_VENDOR_SYM 0x1000
+#define CYG_PCI_VENDOR_ATI 0x1002
+#define CYG_PCI_VENDOR_ULSI 0x1003
+#define CYG_PCI_VENDOR_VLSI 0x1004
+#define CYG_PCI_VENDOR_AVANCE_0x1005 0x1005
+#define CYG_PCI_VENDOR_REPLY 0x1006
+#define CYG_PCI_VENDOR_NETFRAME 0x1007
+#define CYG_PCI_VENDOR_EPSON 0x1008
+#define CYG_PCI_VENDOR_PHOENIX 0x100a
+#define CYG_PCI_VENDOR_NSC 0x100b
+#define CYG_PCI_VENDOR_TSENG_0x100c 0x100c
+#define CYG_PCI_VENDOR_AST 0x100d
+#define CYG_PCI_VENDOR_WEITEK 0x100e
+#define CYG_PCI_VENDOR_VLOGIC 0x1010
+#define CYG_PCI_VENDOR_DEC_0x1011 0x1011
+#define CYG_PCI_VENDOR_MICRONICS 0x1012
+#define CYG_PCI_VENDOR_CIRRUS 0x1013
+#define CYG_PCI_VENDOR_IBM 0x1014
+#define CYG_PCI_VENDOR_LSIL 0x1015
+#define CYG_PCI_VENDOR_FUJITSU_ICL 0x1016
+#define CYG_PCI_VENDOR_SPEA 0x1017
+#define CYG_PCI_VENDOR_UNISYS 0x1018
+#define CYG_PCI_VENDOR_ECS 0x1019
+#define CYG_PCI_VENDOR_NCR 0x101a
+#define CYG_PCI_VENDOR_VITESSE 0x101b
+#define CYG_PCI_VENDOR_WD 0x101c
+#define CYG_PCI_VENDOR_AMI 0x101e
+#define CYG_PCI_VENDOR_PICTURETEL 0x101f
+#define CYG_PCI_VENDOR_HITACHI_0x1020 0x1020
+#define CYG_PCI_VENDOR_OKI 0x1021
+#define CYG_PCI_VENDOR_AMD 0x1022
+#define CYG_PCI_VENDOR_TRIDENT 0x1023
+#define CYG_PCI_VENDOR_ZENITH_0x1024 0x1024
+#define CYG_PCI_VENDOR_ACER 0x1025
+#define CYG_PCI_VENDOR_DELL 0x1028
+#define CYG_PCI_VENDOR_SIEM_NIX 0x1029
+#define CYG_PCI_VENDOR_LSI 0x102a
+#define CYG_PCI_VENDOR_MATROX 0x102b
+#define CYG_PCI_VENDOR_C_T 0x102c
+#define CYG_PCI_VENDOR_WYSE 0x102d
+#define CYG_PCI_VENDOR_OLIVETTI 0x102e
+#define CYG_PCI_VENDOR_TOSHIBA_0x102f 0x102f
+#define CYG_PCI_VENDOR_TMC_0x1030 0x1030
+#define CYG_PCI_VENDOR_MIRO 0x1031
+#define CYG_PCI_VENDOR_COMPAQ_0x1032 0x1032
+#define CYG_PCI_VENDOR_NEC_0x1033 0x1033
+#define CYG_PCI_VENDOR_BURNDY 0x1034
+#define CYG_PCI_VENDOR_C_CRL 0x1035
+#define CYG_PCI_VENDOR_FDOMAIN 0x1036
+#define CYG_PCI_VENDOR_HITACHI_0x1037 0x1037
+#define CYG_PCI_VENDOR_AMP 0x1038
+#define CYG_PCI_VENDOR_SIS 0x1039
+#define CYG_PCI_VENDOR_SEIKO 0x103a
+#define CYG_PCI_VENDOR_TATUNG 0x103b
+#define CYG_PCI_VENDOR_HP 0x103c
+#define CYG_PCI_VENDOR_SOLLIDAY 0x103e
+#define CYG_PCI_VENDOR_LOGIC_MOD 0x103f
+#define CYG_PCI_VENDOR_KUBOTA 0x1040
+#define CYG_PCI_VENDOR_COMPUTREND 0x1041
+#define CYG_PCI_VENDOR_PC_TECH 0x1042
+#define CYG_PCI_VENDOR_ASUSTEK 0x1043
+#define CYG_PCI_VENDOR_DPT 0x1044
+#define CYG_PCI_VENDOR_OPTI 0x1045
+#define CYG_PCI_VENDOR_IPC 0x1046
+#define CYG_PCI_VENDOR_GENOA 0x1047
+#define CYG_PCI_VENDOR_ELSA 0x1048
+#define CYG_PCI_VENDOR_FOUNTAIN 0x1049
+#define CYG_PCI_VENDOR_STM 0x104a
+#define CYG_PCI_VENDOR_BUSLOGOC 0x104b
+#define CYG_PCI_VENDOR_TI 0x104c
+#define CYG_PCI_VENDOR_SONY 0x104d
+#define CYG_PCI_VENDOR_OAK 0x104e
+#define CYG_PCI_VENDOR_CO_TIME 0x104f
+#define CYG_PCI_VENDOR_WINBOND 0x1050
+#define CYG_PCI_VENDOR_ANIGMA 0x1051
+#define CYG_PCI_VENDOR_YOUNG 0x1052
+#define CYG_PCI_VENDOR_HITACHI_0x1054 0x1054
+#define CYG_PCI_VENDOR_EFAR 0x1055
+#define CYG_PCI_VENDOR_ICL 0x1056
+#define CYG_PCI_VENDOR_MOTOROLA_0x1057 0x1057
+#define CYG_PCI_VENDOR_E_TR 0x1058
+#define CYG_PCI_VENDOR_TEKNOR 0x1059
+#define CYG_PCI_VENDOR_PROMISE 0x105a
+#define CYG_PCI_VENDOR_FOXCONN 0x105b
+#define CYG_PCI_VENDOR_WIPRO 0x105c
+#define CYG_PCI_VENDOR_NUMBER_NINE 0x105d
+#define CYG_PCI_VENDOR_VTECH 0x105e
+#define CYG_PCI_VENDOR_INFOTRONIC 0x105f
+#define CYG_PCI_VENDOR_UMC 0x1060
+#define CYG_PCI_VENDOR_8X8 0x1061
+#define CYG_PCI_VENDOR_MASPAR 0x1062
+#define CYG_PCI_VENDOR_OOA 0x1063
+#define CYG_PCI_VENDOR_ALCATEL 0x1064
+#define CYG_PCI_VENDOR_TM 0x1065
+#define CYG_PCI_VENDOR_PICOPOWER 0x1066
+#define CYG_PCI_VENDOR_MITSUBISHI_0x1067 0x1067
+#define CYG_PCI_VENDOR_DIV_TECH 0x1068
+#define CYG_PCI_VENDOR_MYLEX 0x1069
+#define CYG_PCI_VENDOR_ATEN 0x106a
+#define CYG_PCI_VENDOR_APPLE 0x106b
+#define CYG_PCI_VENDOR_HYUNDAI 0x106c
+#define CYG_PCI_VENDOR_SEQUENT 0x106d
+#define CYG_PCI_VENDOR_DFI 0x106e
+#define CYG_PCI_VENDOR_CITYGATE 0x106f
+#define CYG_PCI_VENDOR_DAEWOO 0x1070
+#define CYG_PCI_VENDOR_MITAC 0x1071
+#define CYG_PCI_VENDOR_GIT 0x1072
+#define CYG_PCI_VENDOR_YAMAHA 0x1073
+#define CYG_PCI_VENDOR_NEXGEN 0x1074
+#define CYG_PCI_VENDOR_AIR 0x1075
+#define CYG_PCI_VENDOR_CHAINTECH_0x1076 0x1076
+#define CYG_PCI_VENDOR_Q_LOGIC 0x1077
+#define CYG_PCI_VENDOR_CYRIX 0x1078
+#define CYG_PCI_VENDOR_I_BUS 0x1079
+#define CYG_PCI_VENDOR_NETWORTH 0x107a
+#define CYG_PCI_VENDOR_GATEWAY 0x107b
+#define CYG_PCI_VENDOR_GOLDSTAR 0x107c
+#define CYG_PCI_VENDOR_LEADTEK 0x107d
+#define CYG_PCI_VENDOR_INTERPHASE 0x107e
+#define CYG_PCI_VENDOR_DTC 0x107f
+#define CYG_PCI_VENDOR_CONTAQ 0x1080
+#define CYG_PCI_VENDOR_SUPERMAC 0x1081
+#define CYG_PCI_VENDOR_EFA 0x1082
+#define CYG_PCI_VENDOR_FOREX 0x1083
+#define CYG_PCI_VENDOR_PARADOR 0x1084
+#define CYG_PCI_VENDOR_TULIP 0x1085
+#define CYG_PCI_VENDOR_J_BOND 0x1086
+#define CYG_PCI_VENDOR_CACHE 0x1087
+#define CYG_PCI_VENDOR_MS_SON 0x1088
+#define CYG_PCI_VENDOR_DG 0x1089
+#define CYG_PCI_VENDOR_BIT3 0x108a
+#define CYG_PCI_VENDOR_ELONEX 0x108c
+#define CYG_PCI_VENDOR_OLICOM 0x108d
+#define CYG_PCI_VENDOR_SUN 0x108e
+#define CYG_PCI_VENDOR_SYSTEMSOFT 0x108f
+#define CYG_PCI_VENDOR_ENCORE 0x1090
+#define CYG_PCI_VENDOR_INTERGRAPH 0x1091
+#define CYG_PCI_VENDOR_DIAMOND 0x1092
+#define CYG_PCI_VENDOR_NAT_INST 0x1093
+#define CYG_PCI_VENDOR_FIC 0x1094
+#define CYG_PCI_VENDOR_CMD 0x1095
+#define CYG_PCI_VENDOR_ALACRON 0x1096
+#define CYG_PCI_VENDOR_APPIAN 0x1097
+#define CYG_PCI_VENDOR_QUANTUM_0x1098 0x1098
+#define CYG_PCI_VENDOR_SAMSUNG_0x1099 0x1099
+#define CYG_PCI_VENDOR_PACKARD_BELL 0x109a
+#define CYG_PCI_VENDOR_GEMLIGHT 0x109b
+#define CYG_PCI_VENDOR_MEGACHIPS 0x109c
+#define CYG_PCI_VENDOR_ZIDA 0x109d
+#define CYG_PCI_VENDOR_BROOKTREE 0x109e
+#define CYG_PCI_VENDOR_TRIGEM_0x109f 0x109f
+#define CYG_PCI_VENDOR_MEIDENSHA 0x10a0
+#define CYG_PCI_VENDOR_JUKO 0x10a1
+#define CYG_PCI_VENDOR_QUANTUM_0x10a2 0x10a2
+#define CYG_PCI_VENDOR_EVEREX 0x10a3
+#define CYG_PCI_VENDOR_GLOBE 0x10a4
+#define CYG_PCI_VENDOR_RACAL 0x10a5
+#define CYG_PCI_VENDOR_INFORMTECH 0x10a6
+#define CYG_PCI_VENDOR_BENCHMARQ 0x10a7
+#define CYG_PCI_VENDOR_SIERRA_0x10a8 0x10a8
+#define CYG_PCI_VENDOR_SG 0x10a9
+#define CYG_PCI_VENDOR_ACC 0x10aa
+#define CYG_PCI_VENDOR_DIGICOM 0x10ab
+#define CYG_PCI_VENDOR_HONEYWELL 0x10ac
+#define CYG_PCI_VENDOR_SYMPHONY_0x10ad 0x10ad
+#define CYG_PCI_VENDOR_CORNERSTONE 0x10ae
+#define CYG_PCI_VENDOR_MCS_0x10af 0x10af
+#define CYG_PCI_VENDOR_CARDEXPERT 0x10b0
+#define CYG_PCI_VENDOR_CABLETRON 0x10b1
+#define CYG_PCI_VENDOR_RAYTHEON 0x10b2
+#define CYG_PCI_VENDOR_DATABOOK 0x10b3
+#define CYG_PCI_VENDOR_STB 0x10b4
+#define CYG_PCI_VENDOR_PLX 0x10b5
+#define CYG_PCI_VENDOR_MADGE 0x10b6
+#define CYG_PCI_VENDOR_3COM 0x10b7
+#define CYG_PCI_VENDOR_STANDARD 0x10b8
+#define CYG_PCI_VENDOR_ALI 0x10b9
+#define CYG_PCI_VENDOR_MITSUBISHI_0x10ba 0x10ba
+#define CYG_PCI_VENDOR_DAPHA 0x10bb
+#define CYG_PCI_VENDOR_ALR 0x10bc
+#define CYG_PCI_VENDOR_SURECOM 0x10bd
+#define CYG_PCI_VENDOR_TSENG_0x10be 0x10be
+#define CYG_PCI_VENDOR_MOST 0x10bf
+#define CYG_PCI_VENDOR_BOCA 0x10c0
+#define CYG_PCI_VENDOR_ICM 0x10c1
+#define CYG_PCI_VENDOR_AUSPEX 0x10c2
+#define CYG_PCI_VENDOR_SAMSUNG_0x10c3 0x10c3
+#define CYG_PCI_VENDOR_AWARD 0x10c4
+#define CYG_PCI_VENDOR_XEROX 0x10c5
+#define CYG_PCI_VENDOR_RAMBUS 0x10c6
+#define CYG_PCI_VENDOR_MEDIA_VISION 0x10c7
+#define CYG_PCI_VENDOR_NEOMAGIC 0x10c8
+#define CYG_PCI_VENDOR_DATAEXPERT 0x10c9
+#define CYG_PCI_VENDOR_FUJITSU_0x10ca 0x10ca
+#define CYG_PCI_VENDOR_OMRON 0x10cb
+#define CYG_PCI_VENDOR_MENTOR 0x10cc
+#define CYG_PCI_VENDOR_ADVANSYS 0x10cd
+#define CYG_PCI_VENDOR_RADIUS 0x10ce
+#define CYG_PCI_VENDOR_TTI 0x10cf
+#define CYG_PCI_VENDOR_FUJITSU_0x10d0 0x10d0
+#define CYG_PCI_VENDOR_FUTURE 0x10d1
+#define CYG_PCI_VENDOR_MOLEX 0x10d2
+#define CYG_PCI_VENDOR_JABIL 0x10d3
+#define CYG_PCI_VENDOR_HUALON 0x10d4
+#define CYG_PCI_VENDOR_AUTOLOGIC 0x10d5
+#define CYG_PCI_VENDOR_CETIA 0x10d6
+#define CYG_PCI_VENDOR_BCM 0x10d7
+#define CYG_PCI_VENDOR_APL 0x10d8
+#define CYG_PCI_VENDOR_MACRONIX 0x10d9
+#define CYG_PCI_VENDOR_T_C 0x10da
+#define CYG_PCI_VENDOR_ROHM 0x10db
+#define CYG_PCI_VENDOR_CERN 0x10dc
+#define CYG_PCI_VENDOR_E_S 0x10dd
+#define CYG_PCI_VENDOR_NVIDIA_0x10de 0x10de
+#define CYG_PCI_VENDOR_EMULEX 0x10df
+#define CYG_PCI_VENDOR_IMS 0x10e0
+#define CYG_PCI_VENDOR_TEKRAM_0x10e1 0x10e1
+#define CYG_PCI_VENDOR_APTIX 0x10e2
+#define CYG_PCI_VENDOR_TUNDRA 0x10e3
+#define CYG_PCI_VENDOR_TANDEM 0x10e4
+#define CYG_PCI_VENDOR_MIC 0x10e5
+#define CYG_PCI_VENDOR_GAINBERY 0x10e6
+#define CYG_PCI_VENDOR_VADEM 0x10e7
+#define CYG_PCI_VENDOR_AMCC 0x10e8
+#define CYG_PCI_VENDOR_ALPS 0x10e9
+#define CYG_PCI_VENDOR_INTERGRAPHICS 0x10ea
+#define CYG_PCI_VENDOR_ARTIST 0x10eb
+#define CYG_PCI_VENDOR_REALTEK 0x10ec
+#define CYG_PCI_VENDOR_ASCII 0x10ed
+#define CYG_PCI_VENDOR_XILINX 0x10ee
+#define CYG_PCI_VENDOR_RACORE 0x10ef
+#define CYG_PCI_VENDOR_PERITEK 0x10f0
+#define CYG_PCI_VENDOR_TYAN 0x10f1
+#define CYG_PCI_VENDOR_ACHME 0x10f2
+#define CYG_PCI_VENDOR_ALARIS 0x10f3
+#define CYG_PCI_VENDOR_S_MOS 0x10f4
+#define CYG_PCI_VENDOR_NKK 0x10f5
+#define CYG_PCI_VENDOR_CREATIVE 0x10f6
+#define CYG_PCI_VENDOR_MATSUSHITA_0x10f7 0x10f7
+#define CYG_PCI_VENDOR_ALTOS 0x10f8
+#define CYG_PCI_VENDOR_PC_DIRECT 0x10f9
+#define CYG_PCI_VENDOR_TRUEVISION 0x10fa
+#define CYG_PCI_VENDOR_THESYS 0x10fb
+#define CYG_PCI_VENDOR_I_O 0x10fc
+#define CYG_PCI_VENDOR_SOYO 0x10fd
+#define CYG_PCI_VENDOR_FAST 0x10fe
+#define CYG_PCI_VENDOR_NCUBE 0x10ff
+#define CYG_PCI_VENDOR_JAZZ 0x1100
+#define CYG_PCI_VENDOR_INITIO 0x1101
+#define CYG_PCI_VENDOR_CREATIVE_LABS 0x1102
+#define CYG_PCI_VENDOR_TRIONES 0x1103
+#define CYG_PCI_VENDOR_RASTEROPS 0x1104
+#define CYG_PCI_VENDOR_SIGMA_0x1105 0x1105
+#define CYG_PCI_VENDOR_VIA 0x1106
+#define CYG_PCI_VENDOR_STRATUS 0x1107
+#define CYG_PCI_VENDOR_PROTEON 0x1108
+#define CYG_PCI_VENDOR_COGENT 0x1109
+#define CYG_PCI_VENDOR_SIEMENS 0x110a
+#define CYG_PCI_VENDOR_CHROMATIC 0x110b
+#define CYG_PCI_VENDOR_MINI_MAX 0x110c
+#define CYG_PCI_VENDOR_ZNYX 0x110d
+#define CYG_PCI_VENDOR_CPU_TECH 0x110e
+#define CYG_PCI_VENDOR_ROSS 0x110f
+#define CYG_PCI_VENDOR_POWERHOUSE 0x1110
+#define CYG_PCI_VENDOR_SCO 0x1111
+#define CYG_PCI_VENDOR_OSICOM 0x1112
+#define CYG_PCI_VENDOR_ACCTON 0x1113
+#define CYG_PCI_VENDOR_ATMEL 0x1114
+#define CYG_PCI_VENDOR_DUPONT 0x1115
+#define CYG_PCI_VENDOR_DATA_TRANS 0x1116
+#define CYG_PCI_VENDOR_DATACUBE 0x1117
+#define CYG_PCI_VENDOR_BERG 0x1118
+#define CYG_PCI_VENDOR_VORTEX 0x1119
+#define CYG_PCI_VENDOR_EFF_NET 0x111a
+#define CYG_PCI_VENDOR_TELEDYNE 0x111b
+#define CYG_PCI_VENDOR_TRICORD 0x111c
+#define CYG_PCI_VENDOR_IDT 0x111d
+#define CYG_PCI_VENDOR_ELDEC 0x111e
+#define CYG_PCI_VENDOR_PDI 0x111f
+#define CYG_PCI_VENDOR_EMC 0x1120
+#define CYG_PCI_VENDOR_ZILOG 0x1121
+#define CYG_PCI_VENDOR_MULTI_TECH 0x1122
+#define CYG_PCI_VENDOR_EDI 0x1123
+#define CYG_PCI_VENDOR_LEUTRON 0x1124
+#define CYG_PCI_VENDOR_EUROCORE 0x1125
+#define CYG_PCI_VENDOR_VIGRA 0x1126
+#define CYG_PCI_VENDOR_FORE 0x1127
+#define CYG_PCI_VENDOR_FIRMWORKS 0x1129
+#define CYG_PCI_VENDOR_HERMES 0x112a
+#define CYG_PCI_VENDOR_LINOTYPE 0x112b
+#define CYG_PCI_VENDOR_ZENITH_0x112c 0x112c
+#define CYG_PCI_VENDOR_RAVICAD 0x112d
+#define CYG_PCI_VENDOR_INFOMEDIA 0x112e
+#define CYG_PCI_VENDOR_IMAGTECH 0x112f
+#define CYG_PCI_VENDOR_COMPUTERVISION 0x1130
+#define CYG_PCI_VENDOR_PHILIPS 0x1131
+#define CYG_PCI_VENDOR_MITEL 0x1132
+#define CYG_PCI_VENDOR_EIC 0x1133
+#define CYG_PCI_VENDOR_MCS_0x1134 0x1134
+#define CYG_PCI_VENDOR_FUJI 0x1135
+#define CYG_PCI_VENDOR_MOMENTUM 0x1136
+#define CYG_PCI_VENDOR_CISCO 0x1137
+#define CYG_PCI_VENDOR_ZIATECH 0x1138
+#define CYG_PCI_VENDOR_DYN_PICT 0x1139
+#define CYG_PCI_VENDOR_FWB 0x113a
+#define CYG_PCI_VENDOR_NCD 0x113b
+#define CYG_PCI_VENDOR_CYCLONE 0x113c
+#define CYG_PCI_VENDOR_LEADING_EDGE 0x113d
+#define CYG_PCI_VENDOR_SANYO 0x113e
+#define CYG_PCI_VENDOR_EQUINOX 0x113f
+#define CYG_PCI_VENDOR_INTERVOICE 0x1140
+#define CYG_PCI_VENDOR_CREST 0x1141
+#define CYG_PCI_VENDOR_ALLIANCE 0x1142
+#define CYG_PCI_VENDOR_NETPOWER_0x1143 0x1143
+#define CYG_PCI_VENDOR_CINN_MIL 0x1144
+#define CYG_PCI_VENDOR_WORKBIT 0x1145
+#define CYG_PCI_VENDOR_FORCE 0x1146
+#define CYG_PCI_VENDOR_INTERFACE 0x1147
+#define CYG_PCI_VENDOR_S_K 0x1148
+#define CYG_PCI_VENDOR_WIN_SYSTEM 0x1149
+#define CYG_PCI_VENDOR_VMIC 0x114a
+#define CYG_PCI_VENDOR_CANOPUS 0x114b
+#define CYG_PCI_VENDOR_ANNABOOKS 0x114c
+#define CYG_PCI_VENDOR_IC_CORP 0x114d
+#define CYG_PCI_VENDOR_NIKON 0x114e
+#define CYG_PCI_VENDOR_STARGATE 0x114f
+#define CYG_PCI_VENDOR_TMC_0x1150 0x1150
+#define CYG_PCI_VENDOR_JAE 0x1151
+#define CYG_PCI_VENDOR_MEGATEK 0x1152
+#define CYG_PCI_VENDOR_LAND_WIN 0x1153
+#define CYG_PCI_VENDOR_MELCO 0x1154
+#define CYG_PCI_VENDOR_PINE 0x1155
+#define CYG_PCI_VENDOR_PERISCOPE 0x1156
+#define CYG_PCI_VENDOR_AVSYS 0x1157
+#define CYG_PCI_VENDOR_VOARX 0x1158
+#define CYG_PCI_VENDOR_MUTECH 0x1159
+#define CYG_PCI_VENDOR_HARLEQUIN 0x115a
+#define CYG_PCI_VENDOR_PARALLAX 0x115b
+#define CYG_PCI_VENDOR_PHOTRON 0x115c
+#define CYG_PCI_VENDOR_XIRCOM 0x115d
+#define CYG_PCI_VENDOR_PEER 0x115e
+#define CYG_PCI_VENDOR_MAXTOR 0x115f
+#define CYG_PCI_VENDOR_MEGASOFT 0x1160
+#define CYG_PCI_VENDOR_PFU 0x1161
+#define CYG_PCI_VENDOR_OA_LAB 0x1162
+#define CYG_PCI_VENDOR_RENDITION 0x1163
+#define CYG_PCI_VENDOR_APT 0x1164
+#define CYG_PCI_VENDOR_IMAGRAPH 0x1165
+#define CYG_PCI_VENDOR_PEQUR 0x1166
+#define CYG_PCI_VENDOR_MUTOH 0x1167
+#define CYG_PCI_VENDOR_THINE 0x1168
+#define CYG_PCI_VENDOR_CDAC 0x1169
+#define CYG_PCI_VENDOR_POLARIS 0x116a
+#define CYG_PCI_VENDOR_CONNECTWARE 0x116b
+#define CYG_PCI_VENDOR_INT_RES 0x116c
+#define CYG_PCI_VENDOR_EFI 0x116e
+#define CYG_PCI_VENDOR_WKSTA_TECH 0x116f
+#define CYG_PCI_VENDOR_INVENTEC 0x1170
+#define CYG_PCI_VENDOR_LOUGH_SOUND 0x1171
+#define CYG_PCI_VENDOR_ALTERA 0x1172
+#define CYG_PCI_VENDOR_ADOBE 0x1173
+#define CYG_PCI_VENDOR_BRIDGEPORT 0x1174
+#define CYG_PCI_VENDOR_MITRON 0x1175
+#define CYG_PCI_VENDOR_SBE 0x1176
+#define CYG_PCI_VENDOR_SILICON_ENG 0x1177
+#define CYG_PCI_VENDOR_ALFA 0x1178
+#define CYG_PCI_VENDOR_TOSHIBA_0x1179 0x1179
+#define CYG_PCI_VENDOR_A_TREND 0x117a
+#define CYG_PCI_VENDOR_LG_ELEC 0x117b
+#define CYG_PCI_VENDOR_ATTO 0x117c
+#define CYG_PCI_VENDOR_B_D 0x117d
+#define CYG_PCI_VENDOR_T_R 0x117e
+#define CYG_PCI_VENDOR_ICS 0x117f
+#define CYG_PCI_VENDOR_RICOH 0x1180
+#define CYG_PCI_VENDOR_TELMATICS 0x1181
+#define CYG_PCI_VENDOR_FUJIKURA 0x1183
+#define CYG_PCI_VENDOR_FORKS_0x1184 0x1184
+#define CYG_PCI_VENDOR_DATAWORLD 0x1185
+#define CYG_PCI_VENDOR_D_LINK 0x1186
+#define CYG_PCI_VENDOR_ATL 0x1187
+#define CYG_PCI_VENDOR_SHIMA 0x1188
+#define CYG_PCI_VENDOR_MATSUSHITA_0x1189 0x1189
+#define CYG_PCI_VENDOR_HILEVEL 0x118a
+#define CYG_PCI_VENDOR_HYPERTEC 0x118b
+#define CYG_PCI_VENDOR_COROLLARY 0x118c
+#define CYG_PCI_VENDOR_BITFLOW 0x118d
+#define CYG_PCI_VENDOR_HERMSTEDT 0x118e
+#define CYG_PCI_VENDOR_GREEN 0x118f
+#define CYG_PCI_VENDOR_ARTOP 0x1191
+#define CYG_PCI_VENDOR_DENSAN 0x1192
+#define CYG_PCI_VENDOR_ZEITNET 0x1193
+#define CYG_PCI_VENDOR_TOUCAN 0x1194
+#define CYG_PCI_VENDOR_RATOC 0x1195
+#define CYG_PCI_VENDOR_HYTEC 0x1196
+#define CYG_PCI_VENDOR_GAGE 0x1197
+#define CYG_PCI_VENDOR_LAMBDA 0x1198
+#define CYG_PCI_VENDOR_ATTACHMATE 0x1199
+#define CYG_PCI_VENDOR_MIND_SHARE 0x119a
+#define CYG_PCI_VENDOR_OMEGA 0x119b
+#define CYG_PCI_VENDOR_ITI 0x119c
+#define CYG_PCI_VENDOR_BUG 0x119d
+#define CYG_PCI_VENDOR_FUJITSU_0x119e 0x119e
+#define CYG_PCI_VENDOR_BULL 0x119f
+#define CYG_PCI_VENDOR_CONVEX 0x11a0
+#define CYG_PCI_VENDOR_HAMAMATSU 0x11a1
+#define CYG_PCI_VENDOR_SIERRA_0x11a2 0x11a2
+#define CYG_PCI_VENDOR_DEURETZBACHER 0x11a3
+#define CYG_PCI_VENDOR_BARCO 0x11a4
+#define CYG_PCI_VENDOR_MICROUNITY 0x11a5
+#define CYG_PCI_VENDOR_PURE_DATA 0x11a6
+#define CYG_PCI_VENDOR_POWER_COMP 0x11a7
+#define CYG_PCI_VENDOR_SYSTECH 0x11a8
+#define CYG_PCI_VENDOR_INNOSYS 0x11a9
+#define CYG_PCI_VENDOR_ACTEL 0x11aa
+#define CYG_PCI_VENDOR_GALILEO 0x11ab
+#define CYG_PCI_VENDOR_CANON 0x11ac
+#define CYG_PCI_VENDOR_LITE_ON 0x11ad
+#define CYG_PCI_VENDOR_SCITEX 0x11ae
+#define CYG_PCI_VENDOR_PRO_LOG 0x11af
+#define CYG_PCI_VENDOR_V3 0x11b0
+#define CYG_PCI_VENDOR_APRICOT 0x11b1
+#define CYG_PCI_VENDOR_KODAK 0x11b2
+#define CYG_PCI_VENDOR_BARR 0x11b3
+#define CYG_PCI_VENDOR_LEITCH 0x11b4
+#define CYG_PCI_VENDOR_RADSTONE 0x11b5
+#define CYG_PCI_VENDOR_UNITED_VIDEO 0x11b6
+#define CYG_PCI_VENDOR_MOTOROLA_0x11b7 0x11b7
+#define CYG_PCI_VENDOR_XPOINT 0x11b8
+#define CYG_PCI_VENDOR_PATHLIGHT 0x11b9
+#define CYG_PCI_VENDOR_VIDEOTRON 0x11ba
+#define CYG_PCI_VENDOR_PYRAMID 0x11bb
+#define CYG_PCI_VENDOR_NET_PERIPH 0x11bc
+#define CYG_PCI_VENDOR_PINNACLE 0x11bd
+#define CYG_PCI_VENDOR_IMI 0x11be
+#define CYG_PCI_VENDOR_ASTRODESIGN 0x11bf
+#define CYG_PCI_VENDOR_H_P 0x11c0
+#define CYG_PCI_VENDOR_AT_T 0x11c1
+#define CYG_PCI_VENDOR_SAND 0x11c2
+#define CYG_PCI_VENDOR_NEC_0x11c3 0x11c3
+#define CYG_PCI_VENDOR_DOC_TECH 0x11c4
+#define CYG_PCI_VENDOR_SHIVA 0x11c5
+#define CYG_PCI_VENDOR_DAINIPPON 0x11c6
+#define CYG_PCI_VENDOR_D_C_M 0x11c7
+#define CYG_PCI_VENDOR_DOLPHIN 0x11c8
+#define CYG_PCI_VENDOR_MAGMA 0x11c9
+#define CYG_PCI_VENDOR_LSI_SYS 0x11ca
+#define CYG_PCI_VENDOR_SPECIALIX 0x11cb
+#define CYG_PCI_VENDOR_M_K 0x11cc
+#define CYG_PCI_VENDOR_HAL 0x11cd
+#define CYG_PCI_VENDOR_PRI 0x11ce
+#define CYG_PCI_VENDOR_PEC 0x11cf
+#define CYG_PCI_VENDOR_LORAL 0x11d0
+#define CYG_PCI_VENDOR_AURAVISION 0x11d1
+#define CYG_PCI_VENDOR_INTERCOM 0x11d2
+#define CYG_PCI_VENDOR_TRANCELL 0x11d3
+#define CYG_PCI_VENDOR_AD 0x11d4
+#define CYG_PCI_VENDOR_IKON 0x11d5
+#define CYG_PCI_VENDOR_TEKELEC 0x11d6
+#define CYG_PCI_VENDOR_TRENTON 0x11d7
+#define CYG_PCI_VENDOR_ITD 0x11d8
+#define CYG_PCI_VENDOR_TEC 0x11d9
+#define CYG_PCI_VENDOR_NOVELL 0x11da
+#define CYG_PCI_VENDOR_SEGA 0x11db
+#define CYG_PCI_VENDOR_QUESTRA 0x11dc
+#define CYG_PCI_VENDOR_CROSFIELD 0x11dd
+#define CYG_PCI_VENDOR_ZORAN 0x11de
+#define CYG_PCI_VENDOR_NEW_WAVE 0x11df
+#define CYG_PCI_VENDOR_CRAY 0x11e0
+#define CYG_PCI_VENDOR_GEC_PLESSEY 0x11e1
+#define CYG_PCI_VENDOR_SAMSUNG_0x11e2 0x11e2
+#define CYG_PCI_VENDOR_QUICKLOGIC 0x11e3
+#define CYG_PCI_VENDOR_SECOND_WAVE 0x11e4
+#define CYG_PCI_VENDOR_IIX 0x11e5
+#define CYG_PCI_VENDOR_MITSUI 0x11e6
+#define CYG_PCI_VENDOR_TOSHIBA_0x11e7 0x11e7
+#define CYG_PCI_VENDOR_DPSI 0x11e8
+#define CYG_PCI_VENDOR_HIGHWATER 0x11e9
+#define CYG_PCI_VENDOR_ELSAG 0x11ea
+#define CYG_PCI_VENDOR_FORMATION 0x11eb
+#define CYG_PCI_VENDOR_CORECO 0x11ec
+#define CYG_PCI_VENDOR_MEDIAMATICS 0x11ed
+#define CYG_PCI_VENDOR_DOME 0x11ee
+#define CYG_PCI_VENDOR_NICOLET 0x11ef
+#define CYG_PCI_VENDOR_COMPU_SHACK 0x11f0
+#define CYG_PCI_VENDOR_SYMBIOS 0x11f1
+#define CYG_PCI_VENDOR_PIC_TEL 0x11f2
+#define CYG_PCI_VENDOR_KEITHLEY 0x11f3
+#define CYG_PCI_VENDOR_KINETIC 0x11f4
+#define CYG_PCI_VENDOR_COMP_DEV 0x11f5
+#define CYG_PCI_VENDOR_POWERMATIC 0x11f6
+#define CYG_PCI_VENDOR_S_A 0x11f7
+#define CYG_PCI_VENDOR_PMC_SIERRA 0x11f8
+#define CYG_PCI_VENDOR_I_CUBE 0x11f9
+#define CYG_PCI_VENDOR_KASAN 0x11fa
+#define CYG_PCI_VENDOR_DATEL 0x11fb
+#define CYG_PCI_VENDOR_SILICON_MAGIC 0x11fc
+#define CYG_PCI_VENDOR_HIGH_STREET 0x11fd
+#define CYG_PCI_VENDOR_COMTROL 0x11fe
+#define CYG_PCI_VENDOR_SCION 0x11ff
+#define CYG_PCI_VENDOR_CSS 0x1200
+#define CYG_PCI_VENDOR_VISTA 0x1201
+#define CYG_PCI_VENDOR_NETWORK_GEN 0x1202
+#define CYG_PCI_VENDOR_AGFA 0x1203
+#define CYG_PCI_VENDOR_LATTICE 0x1204
+#define CYG_PCI_VENDOR_ARRAY 0x1205
+#define CYG_PCI_VENDOR_AMDAHL 0x1206
+#define CYG_PCI_VENDOR_PARSYTEC 0x1208
+#define CYG_PCI_VENDOR_SCI_SYS 0x1209
+#define CYG_PCI_VENDOR_SYNAPTEL 0x120a
+#define CYG_PCI_VENDOR_ADAPTIVE 0x120b
+#define CYG_PCI_VENDOR_COMP_LABS 0x120d
+#define CYG_PCI_VENDOR_CYCLADES 0x120e
+#define CYG_PCI_VENDOR_ESSENTIAL 0x120f
+#define CYG_PCI_VENDOR_HYPERPARALLEL 0x1210
+#define CYG_PCI_VENDOR_BRAINTECH 0x1211
+#define CYG_PCI_VENDOR_KINGSTON 0x1212
+#define CYG_PCI_VENDOR_AISI 0x1213
+#define CYG_PCI_VENDOR_PERF_TECH 0x1214
+#define CYG_PCI_VENDOR_INTERWARE 0x1215
+#define CYG_PCI_VENDOR_PURUP 0x1216
+#define CYG_PCI_VENDOR_O2MICRO 0x1217
+#define CYG_PCI_VENDOR_HYBRICON 0x1218
+#define CYG_PCI_VENDOR_FIRST_VIRTUAL 0x1219
+#define CYG_PCI_VENDOR_3DFX 0x121a
+#define CYG_PCI_VENDOR_ATM 0x121b
+#define CYG_PCI_VENDOR_NIPPON_TEXA 0x121c
+#define CYG_PCI_VENDOR_LIPPERT 0x121d
+#define CYG_PCI_VENDOR_CSPI 0x121e
+#define CYG_PCI_VENDOR_ARCUS 0x121f
+#define CYG_PCI_VENDOR_ARIEL 0x1220
+#define CYG_PCI_VENDOR_CONTEC 0x1221
+#define CYG_PCI_VENDOR_ANCOR 0x1222
+#define CYG_PCI_VENDOR_HEURIKON 0x1223
+#define CYG_PCI_VENDOR_INT_IMG 0x1224
+#define CYG_PCI_VENDOR_POWER_IO 0x1225
+#define CYG_PCI_VENDOR_TECH_SOURCE 0x1227
+#define CYG_PCI_VENDOR_NORSK 0x1228
+#define CYG_PCI_VENDOR_DATA_KIN 0x1229
+#define CYG_PCI_VENDOR_INT_TELECOM 0x122a
+#define CYG_PCI_VENDOR_LG_IND 0x122b
+#define CYG_PCI_VENDOR_SICAN 0x122c
+#define CYG_PCI_VENDOR_AZTECH 0x122d
+#define CYG_PCI_VENDOR_XYRATEX 0x122e
+#define CYG_PCI_VENDOR_ANDREW 0x122f
+#define CYG_PCI_VENDOR_FISHCAMP 0x1230
+#define CYG_PCI_VENDOR_W_MCCOACH 0x1231
+#define CYG_PCI_VENDOR_GPT 0x1232
+#define CYG_PCI_VENDOR_BUS_TECH 0x1233
+#define CYG_PCI_VENDOR_TECHNICAL 0x1234
+#define CYG_PCI_VENDOR_RISQ_MOD 0x1235
+#define CYG_PCI_VENDOR_SIGMA_0x1236 0x1236
+#define CYG_PCI_VENDOR_ALTA_TECH 0x1237
+#define CYG_PCI_VENDOR_ADTRAN 0x1238
+#define CYG_PCI_VENDOR_3DO 0x1239
+#define CYG_PCI_VENDOR_VISICOM 0x123a
+#define CYG_PCI_VENDOR_SEEQ 0x123b
+#define CYG_PCI_VENDOR_CENTURY_SYS 0x123c
+#define CYG_PCI_VENDOR_EDT 0x123d
+#define CYG_PCI_VENDOR_C_CUBE 0x123f
+#define CYG_PCI_VENDOR_MARATHON 0x1240
+#define CYG_PCI_VENDOR_DSC 0x1241
+#define CYG_PCI_VENDOR_DELPHAX 0x1243
+#define CYG_PCI_VENDOR_AVM 0x1244
+#define CYG_PCI_VENDOR_APD 0x1245
+#define CYG_PCI_VENDOR_DIPIX 0x1246
+#define CYG_PCI_VENDOR_XYLON 0x1247
+#define CYG_PCI_VENDOR_CENTRAL_DATA 0x1248
+#define CYG_PCI_VENDOR_SAMSUNG_0x1249 0x1249
+#define CYG_PCI_VENDOR_AEG 0x124a
+#define CYG_PCI_VENDOR_GREENSPRING 0x124b
+#define CYG_PCI_VENDOR_SOLITRON 0x124c
+#define CYG_PCI_VENDOR_STALLION 0x124d
+#define CYG_PCI_VENDOR_CYLINK 0x124e
+#define CYG_PCI_VENDOR_INFORTREND 0x124f
+#define CYG_PCI_VENDOR_HITACHI_0x1250 0x1250
+#define CYG_PCI_VENDOR_VLSI_SOL 0x1251
+#define CYG_PCI_VENDOR_GUZIK 0x1253
+#define CYG_PCI_VENDOR_LINEAR_SYSTEMS 0x1254
+#define CYG_PCI_VENDOR_OPTIBASE 0x1255
+#define CYG_PCI_VENDOR_PERCEPTIVE 0x1256
+#define CYG_PCI_VENDOR_VERTEX 0x1257
+#define CYG_PCI_VENDOR_GILBARCO 0x1258
+#define CYG_PCI_VENDOR_ALLIED_TSYN 0x1259
+#define CYG_PCI_VENDOR_ABB_PWR 0x125a
+#define CYG_PCI_VENDOR_ASIX 0x125b
+#define CYG_PCI_VENDOR_AURORA 0x125c
+#define CYG_PCI_VENDOR_ESS 0x125d
+#define CYG_PCI_VENDOR_SPECVIDEO 0x125e
+#define CYG_PCI_VENDOR_CONCURRENT 0x125f
+#define CYG_PCI_VENDOR_HARRIS 0x1260
+#define CYG_PCI_VENDOR_MATSUSHITA_0x1261 0x1261
+#define CYG_PCI_VENDOR_ES_COMP 0x1262
+#define CYG_PCI_VENDOR_SONIC_SOL 0x1263
+#define CYG_PCI_VENDOR_AVAL_NAG 0x1264
+#define CYG_PCI_VENDOR_CASIO 0x1265
+#define CYG_PCI_VENDOR_MICRODYNE 0x1266
+#define CYG_PCI_VENDOR_SA_TELECOM 0x1267
+#define CYG_PCI_VENDOR_TEKTRONIX 0x1268
+#define CYG_PCI_VENDOR_THOMSON_CSF 0x1269
+#define CYG_PCI_VENDOR_LEXMARK 0x126a
+#define CYG_PCI_VENDOR_ADAX 0x126b
+#define CYG_PCI_VENDOR_NORTEL 0x126c
+#define CYG_PCI_VENDOR_SPLASH 0x126d
+#define CYG_PCI_VENDOR_SUMITOMO 0x126e
+#define CYG_PCI_VENDOR_SIL_MOTION 0x126f
+#define CYG_PCI_VENDOR_OLYMPUS 0x1270
+#define CYG_PCI_VENDOR_GW_INSTR 0x1271
+#define CYG_PCI_VENDOR_TELEMATICS 0x1272
+#define CYG_PCI_VENDOR_HUGHES 0x1273
+#define CYG_PCI_VENDOR_ENSONIQ 0x1274
+#define CYG_PCI_VENDOR_NETAPP 0x1275
+#define CYG_PCI_VENDOR_SW_NET_TECH 0x1276
+#define CYG_PCI_VENDOR_COMSTREAM 0x1277
+#define CYG_PCI_VENDOR_TRANSTECH 0x1278
+#define CYG_PCI_VENDOR_TRANSMETA 0x1279
+#define CYG_PCI_VENDOR_ROCKWELL_SEMI 0x127a
+#define CYG_PCI_VENDOR_PIXERA 0x127b
+#define CYG_PCI_VENDOR_CROSSPOINT 0x127c
+#define CYG_PCI_VENDOR_VELA_RES 0x127d
+#define CYG_PCI_VENDOR_WINNOW 0x127e
+#define CYG_PCI_VENDOR_FUJIFILM_0x127f 0x127f
+#define CYG_PCI_VENDOR_PHOTOSCRIPT 0x1280
+#define CYG_PCI_VENDOR_YOKOGAWA 0x1281
+#define CYG_PCI_VENDOR_DAVICOM 0x1282
+#define CYG_PCI_VENDOR_ITEXPRESS 0x1283
+#define CYG_PCI_VENDOR_SAHARA 0x1284
+#define CYG_PCI_VENDOR_PLAT_TECH 0x1285
+#define CYG_PCI_VENDOR_MAZET 0x1286
+#define CYG_PCI_VENDOR_LUXSONOR 0x1287
+#define CYG_PCI_VENDOR_TIMESTEP 0x1288
+#define CYG_PCI_VENDOR_AVC_TECH 0x1289
+#define CYG_PCI_VENDOR_ASANTE 0x128a
+#define CYG_PCI_VENDOR_TRANSWITCH 0x128b
+#define CYG_PCI_VENDOR_RETIX 0x128c
+#define CYG_PCI_VENDOR_G2_NET 0x128d
+#define CYG_PCI_VENDOR_SAMHO 0x128e
+#define CYG_PCI_VENDOR_TATENO 0x128f
+#define CYG_PCI_VENDOR_SORD 0x1290
+#define CYG_PCI_VENDOR_NCS_COMP 0x1291
+#define CYG_PCI_VENDOR_TRITECH 0x1292
+#define CYG_PCI_VENDOR_M_REALITY 0x1293
+#define CYG_PCI_VENDOR_RHETOREX 0x1294
+#define CYG_PCI_VENDOR_IMAGENATION 0x1295
+#define CYG_PCI_VENDOR_KOFAX 0x1296
+#define CYG_PCI_VENDOR_HOLCO 0x1297
+#define CYG_PCI_VENDOR_SPELLCASTER 0x1298
+#define CYG_PCI_VENDOR_KNOW_TECH 0x1299
+#define CYG_PCI_VENDOR_VMETRO 0x129a
+#define CYG_PCI_VENDOR_IMG_ACCESS 0x129b
+#define CYG_PCI_VENDOR_COMPCORE 0x129d
+#define CYG_PCI_VENDOR_VICTOR_JPN 0x129e
+#define CYG_PCI_VENDOR_OEC_MED 0x129f
+#define CYG_PCI_VENDOR_A_B 0x12a0
+#define CYG_PCI_VENDOR_SIMPACT 0x12a1
+#define CYG_PCI_VENDOR_NEWGEN 0x12a2
+#define CYG_PCI_VENDOR_LUCENT 0x12a3
+#define CYG_PCI_VENDOR_NTT_ELECT 0x12a4
+#define CYG_PCI_VENDOR_VISION_DYN 0x12a5
+#define CYG_PCI_VENDOR_SCALABLE 0x12a6
+#define CYG_PCI_VENDOR_AMO 0x12a7
+#define CYG_PCI_VENDOR_NEWS_DATACOM 0x12a8
+#define CYG_PCI_VENDOR_XIOTECH 0x12a9
+#define CYG_PCI_VENDOR_SDL 0x12aa
+#define CYG_PCI_VENDOR_YUAN_YUAN 0x12ab
+#define CYG_PCI_VENDOR_MEASUREX 0x12ac
+#define CYG_PCI_VENDOR_MULTIDATA 0x12ad
+#define CYG_PCI_VENDOR_ALTEON 0x12ae
+#define CYG_PCI_VENDOR_TDK_USA 0x12af
+#define CYG_PCI_VENDOR_JORGE_SCI 0x12b0
+#define CYG_PCI_VENDOR_GAMMALINK 0x12b1
+#define CYG_PCI_VENDOR_GEN_SIGNAL 0x12b2
+#define CYG_PCI_VENDOR_INTER_FACE 0x12b3
+#define CYG_PCI_VENDOR_FUTURE_TEL 0x12b4
+#define CYG_PCI_VENDOR_GRANITE 0x12b5
+#define CYG_PCI_VENDOR_NAT_MICRO 0x12b6
+#define CYG_PCI_VENDOR_ACUMEN 0x12b7
+#define CYG_PCI_VENDOR_KORG 0x12b8
+#define CYG_PCI_VENDOR_US_ROBOTICS 0x12b9
+#define CYG_PCI_VENDOR_BITTWARE 0x12ba
+#define CYG_PCI_VENDOR_NIPPON_UNI 0x12bb
+#define CYG_PCI_VENDOR_ARRAY_MICRO 0x12bc
+#define CYG_PCI_VENDOR_COMPUTERM 0x12bd
+#define CYG_PCI_VENDOR_ANCHOR_CHIPS 0x12be
+#define CYG_PCI_VENDOR_FUJIFILM_0x12bf 0x12bf
+#define CYG_PCI_VENDOR_INFIMED 0x12c0
+#define CYG_PCI_VENDOR_GMM_RES 0x12c1
+#define CYG_PCI_VENDOR_MENTEC 0x12c2
+#define CYG_PCI_VENDOR_HOLTEK 0x12c3
+#define CYG_PCI_VENDOR_CONN_TECH 0x12c4
+#define CYG_PCI_VENDOR_PICTUREL 0x12c5
+#define CYG_PCI_VENDOR_MITANI 0x12c6
+#define CYG_PCI_VENDOR_DIALOGIC 0x12c7
+#define CYG_PCI_VENDOR_G_FORCE 0x12c8
+#define CYG_PCI_VENDOR_GIGI_OPS 0x12c9
+#define CYG_PCI_VENDOR_I_C_ENGINES 0x12ca
+#define CYG_PCI_VENDOR_ANTEX 0x12cb
+#define CYG_PCI_VENDOR_PLUTO 0x12cc
+#define CYG_PCI_VENDOR_AIMS_LAB 0x12cd
+#define CYG_PCI_VENDOR_NETSPEED 0x12ce
+#define CYG_PCI_VENDOR_PROPHET 0x12cf
+#define CYG_PCI_VENDOR_GDE_SYS 0x12d0
+#define CYG_PCI_VENDOR_PSITECH 0x12d1
+#define CYG_PCI_VENDOR_NVIDIA_0x12d2 0x12d2
+#define CYG_PCI_VENDOR_VINGMED 0x12d3
+#define CYG_PCI_VENDOR_DGM_S 0x12d4
+#define CYG_PCI_VENDOR_EQUATOR 0x12d5
+#define CYG_PCI_VENDOR_ANALOGIC 0x12d6
+#define CYG_PCI_VENDOR_BIOTRONIC 0x12d7
+#define CYG_PCI_VENDOR_PERICOM 0x12d8
+#define CYG_PCI_VENDOR_ACULAB 0x12d9
+#define CYG_PCI_VENDOR_TRUE_TIME 0x12da
+#define CYG_PCI_VENDOR_ANNAPOLIS 0x12db
+#define CYG_PCI_VENDOR_SYMICRON 0x12dc
+#define CYG_PCI_VENDOR_MGI 0x12dd
+#define CYG_PCI_VENDOR_RAINBOW 0x12de
+#define CYG_PCI_VENDOR_SBS_TECH 0x12df
+#define CYG_PCI_VENDOR_CHASE 0x12e0
+#define CYG_PCI_VENDOR_NINTENDO 0x12e1
+#define CYG_PCI_VENDOR_DATUM 0x12e2
+#define CYG_PCI_VENDOR_IMATION 0x12e3
+#define CYG_PCI_VENDOR_BROOKTROUT 0x12e4
+#define CYG_PCI_VENDOR_CIREL 0x12e6
+#define CYG_PCI_VENDOR_SEBRING 0x12e7
+#define CYG_PCI_VENDOR_CRISC 0x12e8
+#define CYG_PCI_VENDOR_GE_SPACENET 0x12e9
+#define CYG_PCI_VENDOR_ZUKEN 0x12ea
+#define CYG_PCI_VENDOR_AUREAL 0x12eb
+#define CYG_PCI_VENDOR_3A_INTL 0x12ec
+#define CYG_PCI_VENDOR_OPTIVISION 0x12ed
+#define CYG_PCI_VENDOR_ORANGE_MICRO 0x12ee
+#define CYG_PCI_VENDOR_VIENNA 0x12ef
+#define CYG_PCI_VENDOR_PENTEK 0x12f0
+#define CYG_PCI_VENDOR_SORENSON 0x12f1
+#define CYG_PCI_VENDOR_GAMMAGRAPHX 0x12f2
+#define CYG_PCI_VENDOR_MEGATEL 0x12f4
+#define CYG_PCI_VENDOR_FORKS_0x12f5 0x12f5
+#define CYG_PCI_VENDOR_DAWSON_FR 0x12f6
+#define CYG_PCI_VENDOR_COGNEX 0x12f7
+#define CYG_PCI_VENDOR_ELECTRONIC_DESIGN 0x12f8
+#define CYG_PCI_VENDOR_FFT 0x12f9
+#define CYG_PCI_VENDOR_ESD 0x12fe
+#define CYG_PCI_VENDOR_RADISYS 0x1331
+#define CYG_PCI_VENDOR_VIDEOMAIL 0x1335
+#define CYG_PCI_VENDOR_ODETICS 0x1347
+#define CYG_PCI_VENDOR_ABB_NETWORK_PARTN 0x135d
+#define CYG_PCI_VENDOR_PTSC 0x137e
+#define CYG_PCI_VENDOR_SYMPHONY_0x1c1c 0x1c1c
+#define CYG_PCI_VENDOR_TEKRAM_0x1de1 0x1de1
+#define CYG_PCI_VENDOR_CHAINTECH_0x270f 0x270f
+#define CYG_PCI_VENDOR_HANSOL 0x3000
+#define CYG_PCI_VENDOR_3DLABS 0x3d3d
+#define CYG_PCI_VENDOR_AVANCE_0x4005 0x4005
+#define CYG_PCI_VENDOR_DEC_0x4143 0x4143
+#define CYG_PCI_VENDOR_UMAX_COMP 0x4680
+#define CYG_PCI_VENDOR_BUSLOGIC 0x4b10
+#define CYG_PCI_VENDOR_S3 0x5333
+#define CYG_PCI_VENDOR_TU_BERLIN 0x5455
+#define CYG_PCI_VENDOR_NETPOWER_0x5700 0x5700
+#define CYG_PCI_VENDOR_C4T 0x6374
+#define CYG_PCI_VENDOR_QUANCOM 0x8008
+#define CYG_PCI_VENDOR_INTEL 0x8086
+#define CYG_PCI_VENDOR_TRIGEM_0x8800 0x8800
+#define CYG_PCI_VENDOR_SIL_MAGIC 0x8888
+#define CYG_PCI_VENDOR_COMPUTONE 0x8e0e
+#define CYG_PCI_VENDOR_ADAPTEC_0x9004 0x9004
+#define CYG_PCI_VENDOR_ADAPTEC_0x9005 0x9005
+#define CYG_PCI_VENDOR_ATRONICS 0x907f
+#define CYG_PCI_VENDOR_MOT_ENGRG 0xc0fe
+#define CYG_PCI_VENDOR_DY4 0xd4d4
+#define CYG_PCI_VENDOR_TIGER_JET 0xe159
+#define CYG_PCI_VENDOR_ARC 0xedd8
+#define CYG_PCI_VENDOR_BAD 0xffff
+//----------------------- AUTO GENERATED END ---------------------------
+
+#define CYG_PCI_VENDOR_UNDEFINED 0xffff
+
+//----------------------------------------------------------------------
+// PCI Class IDs
+#define CYG_PCI_CLASS_OLD_NONVGA 0x000000
+#define CYG_PCI_CLASS_OLD_VGA 0x000100
+
+#define CYG_PCI_CLASS_STORAGE_SCSI 0x010000
+#define CYG_PCI_CLASS_STORAGE_IDE 0x010100
+#define CYG_PCI_CLASS_STORAGE_FLOPPY 0x010200
+#define CYG_PCI_CLASS_STORAGE_IPI 0x010300
+#define CYG_PCI_CLASS_STORAGE_RAID 0x010400
+#define CYG_PCI_CLASS_STORAGE_OTHER 0x018000
+
+#define CYG_PCI_CLASS_NET_ETHERNET 0x020000
+#define CYG_PCI_CLASS_NET_TOKEN_RING 0x020100
+#define CYG_PCI_CLASS_NET_FDDI 0x020200
+#define CYG_PCI_CLASS_NET_ATM 0x020300
+#define CYG_PCI_CLASS_NET_OTHER 0x028000
+
+#define CYG_PCI_CLASS_DISPLAY_PC_COMPAT_VGA 0x030000
+#define CYG_PCI_CLASS_DISPLAY_PC_COMPAT_8514 0x030001
+#define CYG_PCI_CLASS_DISPLAY_XGA 0x030100
+#define CYG_PCI_CLASS_DISPLAY_OTHER 0x038000
+
+#define CYG_PCI_CLASS_MM_VIDEO 0x040000
+#define CYG_PCI_CLASS_MM_AUDIO 0x040100
+#define CYG_PCI_CLASS_MM_OTHER 0x048000
+
+#define CYG_PCI_CLASS_MEM_RAM 0x050000
+#define CYG_PCI_CLASS_MEM_FLASH 0x050100
+#define CYG_PCI_CLASS_MEM_OTHER 0x058000
+
+#define CYG_PCI_CLASS_BRIDGE_HOST_PCI 0x060000
+#define CYG_PCI_CLASS_BRIDGE_PCI_ISA 0x060100
+#define CYG_PCI_CLASS_BRIDGE_PCI_EISA 0x060200
+#define CYG_PCI_CLASS_BRIDGE_PCI_MC 0x060300
+#define CYG_PCI_CLASS_BRIDGE_PCI_PCI 0x060400
+#define CYG_PCI_CLASS_BRIDGE_PCI_PCMCIA 0x060500
+#define CYG_PCI_CLASS_BRIDGE_PCI_NUBUS 0x060600
+#define CYG_PCI_CLASS_BRIDGE_PCI_CARDBUS 0x060700
+#define CYG_PCI_CLASS_BRIDGE_OTHER 0x068000
+
+#define CYG_PCI_CLASS_SCC_SERIAL_GENERIC 0x070000
+#define CYG_PCI_CLASS_SCC_SERIAL_16450 0x070001
+#define CYG_PCI_CLASS_SCC_SERIAL_16550 0x070002
+#define CYG_PCI_CLASS_SCC_PARALLEL_STANDARD 0x070100
+#define CYG_PCI_CLASS_SCC_PARALLEL_BIDRECTIONAL 0x070101
+#define CYG_PCI_CLASS_SCC_PARALLEL_ECP 0x070102
+#define CYG_PCI_CLASS_SCC_OTHER 0x078000
+
+#define CYG_PCI_CLASS_BSP_PIC_GENERIC 0x080000
+#define CYG_PCI_CLASS_BSP_PIC_ISA 0x080001
+#define CYG_PCI_CLASS_BSP_PIC_PCI 0x080002
+#define CYG_PCI_CLASS_BSP_DMA_GENERIC 0x080100
+#define CYG_PCI_CLASS_BSP_DMA_ISA 0x080101
+#define CYG_PCI_CLASS_BSP_DMA_EISA 0x080102
+#define CYG_PCI_CLASS_BSP_TIMER_GENERIC 0x080200
+#define CYG_PCI_CLASS_BSP_TIMER_ISA 0x080201
+#define CYG_PCI_CLASS_BSP_TIMER_EISA 0x080202
+#define CYG_PCI_CLASS_BSP_RTC_GENERIC 0x080300
+#define CYG_PCI_CLASS_BSP_RTC_ISA 0x080301
+#define CYG_PCI_CLASS_BSP_OTHER 0x088000
+
+#define CYG_PCI_CLASS_INPUT_KEYBOARD 0x090000
+#define CYG_PCI_CLASS_INPUT_DIGITIZER 0x090100
+#define CYG_PCI_CLASS_INPUT_MOUSE 0x090200
+#define CYG_PCI_CLASS_INPUT_OTHER 0x098000
+
+#define CYG_PCI_CLASS_DOCKING_GENERIC 0x0a0000
+#define CYG_PCI_CLASS_DOCKING_OTHER 0x0a8000
+
+#define CYG_PCI_CLASS_CPU_I386 0x0b0000
+#define CYG_PCI_CLASS_CPU_I486 0x0b0100
+#define CYG_PCI_CLASS_CPU_PENTIUM 0x0b0200
+#define CYG_PCI_CLASS_CPU_ALPHA 0x0b1000
+#define CYG_PCI_CLASS_CPU_POWERPC 0x0b2000
+#define CYG_PCI_CLASS_CPU_COPROCESSOR 0x0b8000
+
+#define CYG_PCI_CLASS_SBC_FIREWIRE 0x0c0000
+#define CYG_PCI_CLASS_SBC_ACCESSBUS 0x0c0100
+#define CYG_PCI_CLASS_SBC_SSA 0x0c0200
+#define CYG_PCI_CLASS_SBC_USB 0x0c0300
+#define CYG_PCI_CLASS_SBC_FIBRE_CHANNEL 0x0c0400
+
+#define CYG_PCI_CLASS_UNKNOWN 0xff0000
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_PCI_CFG_H
+// End of pci_cfg.h
diff --git a/cesar/ecos/packages/io/pci/current/include/pci_hw.h b/cesar/ecos/packages/io/pci/current/include/pci_hw.h
new file mode 100644
index 0000000000..665de04630
--- /dev/null
+++ b/cesar/ecos/packages/io/pci/current/include/pci_hw.h
@@ -0,0 +1,127 @@
+#ifndef CYGONCE_PCI_HW_H
+#define CYGONCE_PCI_HW_H
+//=============================================================================
+//
+// pci_hw.h
+//
+// PCI hardware library
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov, from design by nickg
+// Contributors: jskov
+// Date: 1999-08-09
+// Purpose: PCI hardware configuration access
+// Usage:
+// #include <cyg/io/pci_hw.h>
+// Description:
+// This API is used by the PCI library to access the PCI bus
+// configuration space. Although this should not normally be
+// necessary, this API may also be used by device driver or
+// application code to perform PCI bus operations not supported
+// by the PCI library.
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+// Rely on hal_io.h to include plf_io.h if it exists for the selected target.
+#include <cyg/hal/hal_io.h> // HAL_PCI_ macros
+
+#ifdef HAL_PCI_INIT
+
+// This varible selects whether the PCI library gets built (requires
+// HAL_PCI_INIT to be defined by the platform io header file)
+#define CYG_PCI_PRESENT
+
+#include <cyg/infra/cyg_type.h>
+
+#include <cyg/io/pci_cfg.h>
+
+
+// This is the lowest level where devfns are used.
+#define CYG_PCI_DEV_MAKE_DEVFN(__dev, __fn) (((__dev)<<3)|(__fn))
+#define CYG_PCI_DEV_GET_DEV(__devfn) ((__devfn>>3)&0x1f)
+#define CYG_PCI_DEV_GET_FN(__devfn) (__devfn&0x7)
+
+// Some buggy PCI chips force us to ignore certain devices so that
+// they may be handled specially.
+#ifdef HAL_PCI_IGNORE_DEVICE
+#define CYG_PCI_IGNORE_DEVICE(__bus, __dev, __fn) \
+ HAL_PCI_IGNORE_DEVICE((__bus), (__dev), (__fn))
+#else
+#define CYG_PCI_IGNORE_DEVICE(__bus, __dev, __fn) 0
+#endif
+
+// Ignore certain BARs at discretion of HAL
+#ifdef HAL_PCI_IGNORE_BAR
+#define CYG_PCI_IGNORE_BAR(__dinfo, __bar) \
+ HAL_PCI_IGNORE_BAR((__dinfo), (__bar))
+#else
+#define CYG_PCI_IGNORE_BAR(__dinfo, __bar) 0
+#endif
+
+
+// Init
+externC void cyg_pcihw_init(void);
+
+// Read functions
+externC void cyg_pcihw_read_config_uint8( cyg_uint8 bus, cyg_uint8 devfn,
+ cyg_uint8 offset, cyg_uint8 *val);
+externC void cyg_pcihw_read_config_uint16( cyg_uint8 bus, cyg_uint8 devfn,
+ cyg_uint8 offset, cyg_uint16 *val);
+externC void cyg_pcihw_read_config_uint32( cyg_uint8 bus, cyg_uint8 devfn,
+ cyg_uint8 offset, cyg_uint32 *val);
+
+// Write functions
+externC void cyg_pcihw_write_config_uint8( cyg_uint8 bus, cyg_uint8 devfn,
+ cyg_uint8 offset, cyg_uint8 val);
+externC void cyg_pcihw_write_config_uint16( cyg_uint8 bus, cyg_uint8 devfn,
+ cyg_uint8 offset, cyg_uint16 val);
+externC void cyg_pcihw_write_config_uint32( cyg_uint8 bus, cyg_uint8 devfn,
+ cyg_uint8 offset, cyg_uint32 val);
+
+// Interrupt translation
+externC cyg_bool cyg_pcihw_translate_interrupt( cyg_uint8 bus, cyg_uint8 devfn,
+ CYG_ADDRWORD *vec);
+
+#endif // ifdef HAL_PCI_INIT
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_PCI_HW_H
+// End of pci_hw.h
+
diff --git a/cesar/ecos/packages/io/pci/current/src/pci.c b/cesar/ecos/packages/io/pci/current/src/pci.c
new file mode 100644
index 0000000000..74c739f665
--- /dev/null
+++ b/cesar/ecos/packages/io/pci/current/src/pci.c
@@ -0,0 +1,1107 @@
+//=============================================================================
+//
+// pci.c
+//
+// PCI library
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov, from design by nickg
+// Contributors: jskov
+// Date: 1999-08-09
+// Purpose: PCI configuration
+// Description:
+// PCI bus support library.
+// Handles simple resource allocation for devices.
+// Can configure 64bit devices, but drivers may need special
+// magic to access all of this memory space - this is platform
+// specific and the driver must know how to handle it on its own.
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+#include <pkgconf/io_pci.h>
+#include <cyg/io/pci_hw.h>
+
+// CYG_PCI_PRESENT only gets defined for targets that provide PCI HAL support.
+// See pci_hw.h for details.
+#ifdef CYG_PCI_PRESENT
+
+#include <cyg/io/pci.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/diag.h>
+
+static cyg_bool cyg_pci_lib_initialized = false;
+static CYG_PCI_ADDRESS64 cyg_pci_memory_base;
+static CYG_PCI_ADDRESS32 cyg_pci_io_base;
+
+void
+cyg_pci_init( void )
+{
+ if (!cyg_pci_lib_initialized) {
+
+ cyg_pci_set_memory_base(HAL_PCI_ALLOC_BASE_MEMORY);
+ cyg_pci_set_io_base(HAL_PCI_ALLOC_BASE_IO);
+
+ // Initialize the PCI bus, preparing it for general access.
+ cyg_pcihw_init();
+
+ cyg_pci_lib_initialized = true;
+ }
+}
+
+//---------------------------------------------------------------------------
+// Common device configuration access functions
+
+void
+cyg_pci_get_device_info ( cyg_pci_device_id devid, cyg_pci_device *dev_info )
+{
+ int i;
+ unsigned char bar_count;
+ cyg_uint8 bus = CYG_PCI_DEV_GET_BUS(devid);
+ cyg_uint8 devfn = CYG_PCI_DEV_GET_DEVFN(devid);
+ cyg_uint8 header_type;
+
+ dev_info->devid = devid;
+
+ cyg_pcihw_read_config_uint16(bus, devfn, CYG_PCI_CFG_VENDOR,
+ &dev_info->vendor);
+ cyg_pcihw_read_config_uint16(bus, devfn, CYG_PCI_CFG_DEVICE,
+ &dev_info->device);
+ cyg_pcihw_read_config_uint16(bus, devfn, CYG_PCI_CFG_COMMAND,
+ &dev_info->command);
+ cyg_pcihw_read_config_uint16(bus, devfn, CYG_PCI_CFG_STATUS,
+ &dev_info->status);
+ cyg_pcihw_read_config_uint32(bus, devfn, CYG_PCI_CFG_CLASS_REV,
+ &dev_info->class_rev);
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_CACHE_LINE_SIZE,
+ &dev_info->cache_line_size);
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_LATENCY_TIMER,
+ &dev_info->latency_timer);
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_HEADER_TYPE,
+ &header_type);
+ dev_info->header_type = (cyg_pci_header_type) header_type;
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_BIST,
+ &dev_info->bist);
+
+ if ((dev_info->header_type & CYG_PCI_CFG_HEADER_TYPE_MASK) == CYG_PCI_HEADER_BRIDGE)
+ dev_info->num_bars = 2;
+ else
+ dev_info->num_bars = 6;
+
+ // Clear out all address info (the code below stops short)
+ for (i = 0; i < CYG_PCI_MAX_BAR; i++) {
+ dev_info->base_map[i] = 0xffffffff;
+ dev_info->base_address[i] = 0;
+ dev_info->base_size[i] = 0;
+ }
+
+ for (i = 0; i < dev_info->num_bars; i++) {
+ if (CYG_PCI_IGNORE_BAR(dev_info, i))
+ continue;
+
+ cyg_pcihw_read_config_uint32(bus, devfn,
+ CYG_PCI_CFG_BAR_BASE + 4*i,
+ &dev_info->base_address[i]);
+ }
+
+ // If device is disabled, probe BARs for sizes.
+ if ((dev_info->command & CYG_PCI_CFG_COMMAND_ACTIVE) == 0) {
+
+ bar_count = 0;
+ for (i = 0; i < dev_info->num_bars; i++){
+ cyg_uint32 size;
+
+ if (CYG_PCI_IGNORE_BAR(dev_info, i))
+ continue;
+
+ cyg_pcihw_write_config_uint32(bus, devfn,
+ CYG_PCI_CFG_BAR_BASE + 4*i,
+ 0xffffffff);
+ cyg_pcihw_read_config_uint32(bus, devfn,
+ CYG_PCI_CFG_BAR_BASE + 4*i,
+ &size);
+ dev_info->base_size[i] = size;
+ dev_info->base_map[i] = 0xffffffff;
+
+ // Increment BAR count only if it has valid entry. BARs may not
+ // be in contiguous locations.
+ if (size != 0) {
+ ++bar_count;
+ }
+
+ // Check for a 64bit memory region.
+ if (CYG_PCI_CFG_BAR_SPACE_MEM ==
+ (size & CYG_PCI_CFG_BAR_SPACE_MASK)) {
+ if (size & CYG_PRI_CFG_BAR_MEM_TYPE_64) {
+ // Clear fields for next BAR - it's the upper 32 bits.
+ i++;
+ dev_info->base_size[i] = 0;
+ dev_info->base_map[i] = 0xffffffff;
+ }
+ }
+
+ // Fix any IO devices that only implement the bottom 16
+ // bits of the the BAR. Just fill in these bits so it
+ // looks like a full 32 bit BAR.
+ if ((CYG_PCI_CFG_BAR_SPACE_IO ==
+ (size & CYG_PCI_CFG_BAR_SPACE_MASK)) &&
+ ((size & 0xFFFF0000) == 0)
+ )
+ {
+ dev_info->base_size[i] |= 0xFFFF0000;
+ }
+ }
+ dev_info->num_bars = bar_count;
+ } else {
+ // If the device is already configured. Fill in the base_map.
+ CYG_PCI_ADDRESS64 tmp_addr;
+ cyg_uint32 bar;
+
+ bar_count = 0;
+ for (i = 0; i < dev_info->num_bars; i++){
+
+ dev_info->base_size[i] = 0;
+
+ bar = dev_info->base_address[i];
+
+ // Increment BAR count only if it has valid entry. BARs may not
+ // be in contiguous locations.
+ if (bar != 0) {
+ ++bar_count;
+ }
+
+ if ((bar & CYG_PCI_CFG_BAR_SPACE_MASK) == CYG_PCI_CFG_BAR_SPACE_IO) {
+ dev_info->base_map[i] = (bar & CYG_PRI_CFG_BAR_IO_MASK) + HAL_PCI_PHYSICAL_IO_BASE;
+ bar &= CYG_PRI_CFG_BAR_IO_MASK;
+ if ((bar < 0xFF000000) && (bar >= cyg_pci_io_base)) {
+ // Assume that this device owns 512 'registers'
+ cyg_pci_io_base = bar + 0x200;
+#ifdef CYGPKG_IO_PCI_DEBUG
+ diag_printf("Update I/O base to %x from bar: %d\n", cyg_pci_io_base, i);
+#endif
+ }
+ } else {
+ tmp_addr = bar & CYG_PRI_CFG_BAR_MEM_MASK;
+
+ if ((bar & CYG_PRI_CFG_BAR_MEM_TYPE_MASK) == CYG_PRI_CFG_BAR_MEM_TYPE_64)
+ tmp_addr |= ((CYG_PCI_ADDRESS64)(dev_info->base_address[i+1] & CYG_PRI_CFG_BAR_MEM_MASK)) << 32;
+
+ if ((tmp_addr < 0xFF000000) && (tmp_addr >= cyg_pci_memory_base)) {
+ // Assume that this device owns 1M
+ cyg_pci_memory_base = tmp_addr + 0x100000;
+#ifdef CYGPKG_IO_PCI_DEBUG
+ diag_printf("Update memory base to %llx from bar: %d\n", cyg_pci_memory_base, i);
+#endif
+ }
+
+ tmp_addr += HAL_PCI_PHYSICAL_MEMORY_BASE;
+
+ dev_info->base_map[i] = tmp_addr;
+ if ((bar & CYG_PRI_CFG_BAR_MEM_TYPE_MASK) == CYG_PRI_CFG_BAR_MEM_TYPE_64)
+ dev_info->base_map[++i] = tmp_addr >> 32;
+ }
+ }
+ dev_info->num_bars = bar_count;
+ }
+
+
+ switch (dev_info->header_type & CYG_PCI_CFG_HEADER_TYPE_MASK) {
+ case CYG_PCI_HEADER_NORMAL:
+ cyg_pcihw_read_config_uint32(bus, devfn, CYG_PCI_CFG_CARDBUS_CIS,
+ &dev_info->header.normal.cardbus_cis);
+ cyg_pcihw_read_config_uint16(bus, devfn, CYG_PCI_CFG_SUB_VENDOR,
+ &dev_info->header.normal.sub_vendor);
+ cyg_pcihw_read_config_uint16(bus, devfn, CYG_PCI_CFG_SUB_ID,
+ &dev_info->header.normal.sub_id);
+ cyg_pcihw_read_config_uint32(bus, devfn, CYG_PCI_CFG_ROM_ADDRESS,
+ &dev_info->header.normal.rom_address);
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_CAP_LIST,
+ &dev_info->header.normal.cap_list);
+
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_INT_LINE,
+ &dev_info->header.normal.int_line);
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_INT_PIN,
+ &dev_info->header.normal.int_pin);
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_MIN_GNT,
+ &dev_info->header.normal.min_gnt);
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_MAX_LAT,
+ &dev_info->header.normal.max_lat);
+ break;
+ case CYG_PCI_HEADER_BRIDGE:
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_PRI_BUS,
+ &dev_info->header.bridge.pri_bus);
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_SEC_BUS,
+ &dev_info->header.bridge.sec_bus);
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_SUB_BUS,
+ &dev_info->header.bridge.sub_bus);
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_SEC_LATENCY_TIMER,
+ &dev_info->header.bridge.sec_latency_timer);
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_IO_BASE,
+ &dev_info->header.bridge.io_base);
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_IO_LIMIT,
+ &dev_info->header.bridge.io_limit);
+ cyg_pcihw_read_config_uint16(bus, devfn, CYG_PCI_CFG_SEC_STATUS,
+ &dev_info->header.bridge.sec_status);
+ cyg_pcihw_read_config_uint16(bus, devfn, CYG_PCI_CFG_MEM_BASE,
+ &dev_info->header.bridge.mem_base);
+ cyg_pcihw_read_config_uint16(bus, devfn, CYG_PCI_CFG_MEM_LIMIT,
+ &dev_info->header.bridge.mem_limit);
+ cyg_pcihw_read_config_uint16(bus, devfn, CYG_PCI_CFG_PREFETCH_BASE,
+ &dev_info->header.bridge.prefetch_base);
+ cyg_pcihw_read_config_uint16(bus, devfn, CYG_PCI_CFG_PREFETCH_LIMIT,
+ &dev_info->header.bridge.prefetch_limit);
+ cyg_pcihw_read_config_uint32(bus, devfn, CYG_PCI_CFG_PREFETCH_BASE_UPPER32,
+ &dev_info->header.bridge.prefetch_base_upper32);
+ cyg_pcihw_read_config_uint32(bus, devfn, CYG_PCI_CFG_PREFETCH_LIMIT_UPPER32,
+ &dev_info->header.bridge.prefetch_limit_upper32);
+ cyg_pcihw_read_config_uint16(bus, devfn, CYG_PCI_CFG_IO_BASE_UPPER16,
+ &dev_info->header.bridge.io_base_upper16);
+ cyg_pcihw_read_config_uint16(bus, devfn, CYG_PCI_CFG_IO_LIMIT_UPPER16,
+ &dev_info->header.bridge.io_limit_upper16);
+ cyg_pcihw_read_config_uint32(bus, devfn, CYG_PCI_CFG_BRIDGE_ROM_ADDRESS,
+ &dev_info->header.bridge.rom_address);
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_INT_LINE,
+ &dev_info->header.bridge.int_line);
+ cyg_pcihw_read_config_uint8(bus, devfn, CYG_PCI_CFG_INT_PIN,
+ &dev_info->header.bridge.int_pin);
+ cyg_pcihw_read_config_uint16(bus, devfn, CYG_PCI_CFG_BRIDGE_CONTROL,
+ &dev_info->header.bridge.control);
+ break;
+ case CYG_PCI_HEADER_CARDBUS_BRIDGE:
+ CYG_FAIL("PCI device header 'cardbus bridge' support not implemented");
+ break;
+ default:
+ CYG_FAIL("Unknown PCI device header type");
+ break;
+ }
+}
+
+void
+cyg_pci_set_device_info ( cyg_pci_device_id devid, cyg_pci_device *dev_info )
+{
+ cyg_uint8 bus = CYG_PCI_DEV_GET_BUS(devid);
+ cyg_uint8 devfn = CYG_PCI_DEV_GET_DEVFN(devid);
+ int i;
+
+ // Only writable entries are updated.
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_COMMAND,
+ dev_info->command);
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_STATUS,
+ dev_info->status);
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_CACHE_LINE_SIZE,
+ dev_info->cache_line_size);
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_LATENCY_TIMER,
+ dev_info->latency_timer);
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_BIST,
+ dev_info->bist);
+
+ // Check for all possible BARs because they may be non-contiguous
+ for (i = 0; i < CYG_PCI_MAX_BAR; i++) {
+ if (dev_info->base_address[i]) {
+ cyg_pcihw_write_config_uint32 (bus, devfn,
+ CYG_PCI_CFG_BAR_BASE+4*i,
+ dev_info->base_address[i]);
+ }
+ }
+
+ switch (dev_info->header_type & CYG_PCI_CFG_HEADER_TYPE_MASK) {
+ case CYG_PCI_HEADER_NORMAL:
+ cyg_pcihw_write_config_uint32(bus, devfn, CYG_PCI_CFG_CARDBUS_CIS,
+ dev_info->header.normal.cardbus_cis);
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_SUB_VENDOR,
+ dev_info->header.normal.sub_vendor);
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_SUB_ID,
+ dev_info->header.normal.sub_id);
+ cyg_pcihw_write_config_uint32(bus, devfn, CYG_PCI_CFG_ROM_ADDRESS,
+ dev_info->header.normal.rom_address);
+
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_INT_LINE,
+ dev_info->header.normal.int_line);
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_INT_PIN,
+ dev_info->header.normal.int_pin);
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_MIN_GNT,
+ dev_info->header.normal.min_gnt);
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_MAX_LAT,
+ dev_info->header.normal.max_lat);
+ break;
+ case CYG_PCI_HEADER_BRIDGE:
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_PRI_BUS,
+ dev_info->header.bridge.pri_bus);
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_SEC_BUS,
+ dev_info->header.bridge.sec_bus);
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_SUB_BUS,
+ dev_info->header.bridge.sub_bus);
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_SEC_LATENCY_TIMER,
+ dev_info->header.bridge.sec_latency_timer);
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_IO_BASE,
+ dev_info->header.bridge.io_base);
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_IO_LIMIT,
+ dev_info->header.bridge.io_limit);
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_SEC_STATUS,
+ dev_info->header.bridge.sec_status);
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_MEM_BASE,
+ dev_info->header.bridge.mem_base);
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_MEM_LIMIT,
+ dev_info->header.bridge.mem_limit);
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_PREFETCH_BASE,
+ dev_info->header.bridge.prefetch_base);
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_PREFETCH_LIMIT,
+ dev_info->header.bridge.prefetch_limit);
+ cyg_pcihw_write_config_uint32(bus, devfn, CYG_PCI_CFG_PREFETCH_BASE_UPPER32,
+ dev_info->header.bridge.prefetch_base_upper32);
+ cyg_pcihw_write_config_uint32(bus, devfn, CYG_PCI_CFG_PREFETCH_LIMIT_UPPER32,
+ dev_info->header.bridge.prefetch_limit_upper32);
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_IO_BASE_UPPER16,
+ dev_info->header.bridge.io_base_upper16);
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_IO_LIMIT_UPPER16,
+ dev_info->header.bridge.io_limit_upper16);
+ cyg_pcihw_write_config_uint32(bus, devfn, CYG_PCI_CFG_BRIDGE_ROM_ADDRESS,
+ dev_info->header.bridge.rom_address);
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_INT_LINE,
+ dev_info->header.bridge.int_line);
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_BRIDGE_CONTROL,
+ dev_info->header.bridge.control);
+ break;
+ case CYG_PCI_HEADER_CARDBUS_BRIDGE:
+ CYG_FAIL("PCI device header 'cardbus bridge' support not implemented");
+ break;
+ default:
+ CYG_FAIL("Unknown PCI device header type");
+ break;
+ }
+
+ // Update values in dev_info.
+ cyg_pci_get_device_info(devid, dev_info);
+}
+
+
+//---------------------------------------------------------------------------
+// Specific device configuration access functions
+void
+cyg_pci_read_config_uint8( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint8 *val)
+{
+ cyg_pcihw_read_config_uint8(CYG_PCI_DEV_GET_BUS(devid),
+ CYG_PCI_DEV_GET_DEVFN(devid),
+ offset, val);
+}
+
+void
+cyg_pci_read_config_uint16( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint16 *val)
+{
+ cyg_pcihw_read_config_uint16(CYG_PCI_DEV_GET_BUS(devid),
+ CYG_PCI_DEV_GET_DEVFN(devid),
+ offset, val);
+}
+
+void
+cyg_pci_read_config_uint32( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint32 *val)
+{
+ cyg_pcihw_read_config_uint32(CYG_PCI_DEV_GET_BUS(devid),
+ CYG_PCI_DEV_GET_DEVFN(devid),
+ offset, val);
+}
+
+
+// Write functions
+void
+cyg_pci_write_config_uint8( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint8 val)
+{
+ cyg_pcihw_write_config_uint8(CYG_PCI_DEV_GET_BUS(devid),
+ CYG_PCI_DEV_GET_DEVFN(devid),
+ offset, val);
+}
+
+void
+cyg_pci_write_config_uint16( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint16 val)
+{
+ cyg_pcihw_write_config_uint16(CYG_PCI_DEV_GET_BUS(devid),
+ CYG_PCI_DEV_GET_DEVFN(devid),
+ offset, val);
+}
+
+void
+cyg_pci_write_config_uint32( cyg_pci_device_id devid,
+ cyg_uint8 offset, cyg_uint32 val)
+{
+ cyg_pcihw_write_config_uint32(CYG_PCI_DEV_GET_BUS(devid),
+ CYG_PCI_DEV_GET_DEVFN(devid),
+ offset, val);
+}
+
+//------------------------------------------------------------------------
+// Device find functions
+
+cyg_bool
+cyg_pci_find_next( cyg_pci_device_id cur_devid,
+ cyg_pci_device_id *next_devid )
+{
+ cyg_uint8 bus = CYG_PCI_DEV_GET_BUS(cur_devid);
+ cyg_uint8 devfn = CYG_PCI_DEV_GET_DEVFN(cur_devid);
+ cyg_uint8 dev = CYG_PCI_DEV_GET_DEV(devfn);
+ cyg_uint8 fn = CYG_PCI_DEV_GET_FN(devfn);
+
+#ifdef CYGPKG_IO_PCI_DEBUG
+ diag_printf("cyg_pci_find_next: start[%x] ...\n",(unsigned)cur_devid);
+#endif
+
+ // If this is the initializer, start with 0/0/0
+ if (CYG_PCI_NULL_DEVID == cur_devid) {
+ bus = dev = fn = 0;
+ dev = CYG_PCI_MIN_DEV;
+ } else if (CYG_PCI_NULL_DEVFN == (cur_devid & CYG_PCI_NULL_DEVFN)) {
+ dev = fn = 0;
+ dev = CYG_PCI_MIN_DEV;
+ } else {
+ // Otherwise, check multi-function bit of device's first function
+ cyg_uint8 header;
+
+ devfn = CYG_PCI_DEV_MAKE_DEVFN(dev, 0);
+ cyg_pcihw_read_config_uint8(bus, devfn,
+ CYG_PCI_CFG_HEADER_TYPE, &header);
+ if (header & CYG_PCI_CFG_HEADER_TYPE_MF) {
+ // Multi-function device. Increase fn.
+ fn++;
+ if (fn >= CYG_PCI_MAX_FN) {
+ fn = 0;
+ dev++;
+ }
+ } else {
+ // Single-function device. Skip to next.
+ dev++;
+ }
+ }
+
+ // Note: Reset iterators in enclosing statement's "next" part.
+ // Allows resuming scan with given input values.
+ for (;bus < CYG_PCI_MAX_BUS; bus++, dev=CYG_PCI_MIN_DEV) {
+ for (;dev < CYG_PCI_MAX_DEV; dev++, fn=0) {
+ for (;fn < CYG_PCI_MAX_FN; fn++) {
+ cyg_uint16 vendor;
+
+ if (CYG_PCI_IGNORE_DEVICE(bus, dev, fn))
+ continue;
+
+ devfn = CYG_PCI_DEV_MAKE_DEVFN(dev, fn);
+ cyg_pcihw_read_config_uint16(bus, devfn,
+ CYG_PCI_CFG_VENDOR, &vendor);
+ if (CYG_PCI_VENDOR_UNDEFINED != vendor) {
+#ifdef CYGPKG_IO_PCI_DEBUG
+ diag_printf(" Bus: %d, Dev: %d, Fn: %d, Vendor: %x\n", bus, dev, fn, vendor);
+#endif
+ *next_devid = CYG_PCI_DEV_MAKE_ID(bus, devfn);
+ return true;
+ }
+ }
+ }
+ }
+
+#ifdef CYGPKG_IO_PCI_DEBUG
+ diag_printf("nothing.\n");
+#endif
+
+ return false;
+}
+
+//
+// Scan for a particular device, starting with 'devid'
+// 'devid' is updated with the next device if found.
+// is not changed if no suitable device is found.
+cyg_bool
+cyg_pci_find_device( cyg_uint16 vendor, cyg_uint16 device,
+ cyg_pci_device_id *devid )
+{
+ cyg_pci_device_id new_devid = *devid;
+
+#ifdef CYGPKG_IO_PCI_DEBUG
+ diag_printf("cyg_pci_find_device - vendor: %x, device: %x\n", vendor, device);
+#endif
+ // Scan entire bus, check for matches on valid devices.
+ while (cyg_pci_find_next(new_devid, &new_devid)) {
+ cyg_uint8 bus = CYG_PCI_DEV_GET_BUS(new_devid);
+ cyg_uint8 devfn = CYG_PCI_DEV_GET_DEVFN(new_devid);
+ cyg_uint16 v, d;
+
+ // Check that vendor matches.
+ cyg_pcihw_read_config_uint16(bus, devfn,
+ CYG_PCI_CFG_VENDOR, &v);
+ cyg_pcihw_read_config_uint16(bus, devfn,
+ CYG_PCI_CFG_DEVICE, &d);
+#ifdef CYGPKG_IO_PCI_DEBUG
+ diag_printf("... PCI vendor = %x, device = %x\n", v, d);
+#endif
+
+ if (v != vendor) continue;
+
+ // Check that device matches.
+ if (d == device) {
+#ifdef CYGPKG_IO_PCI_DEBUG
+ diag_printf("Found it!\n");
+#endif
+ *devid = new_devid;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+cyg_bool
+cyg_pci_find_class( cyg_uint32 dev_class, cyg_pci_device_id *devid )
+{
+ // Scan entire bus, check for matches on valid devices.
+ while (cyg_pci_find_next(*devid, devid)) {
+ cyg_uint8 bus = CYG_PCI_DEV_GET_BUS(*devid);
+ cyg_uint8 devfn = CYG_PCI_DEV_GET_DEVFN(*devid);
+ cyg_uint32 c;
+
+ // Check that class code matches.
+ cyg_pcihw_read_config_uint32(bus, devfn,
+ CYG_PCI_CFG_CLASS_REV, &c);
+ c >>= 8;
+ if (c == dev_class)
+ return true;
+ }
+
+ return false;
+}
+
+cyg_bool
+cyg_pci_find_matching( cyg_pci_match_func *matchp,
+ void * match_callback_data,
+ cyg_pci_device_id *devid )
+{
+ cyg_pci_device_id new_devid = *devid;
+
+#ifdef CYGPKG_IO_PCI_DEBUG
+ diag_printf("cyg_pci_find_matching - func is at %x\n", (unsigned int)matchp);
+#endif
+ // Scan entire bus, check for matches on valid devices.
+ while (cyg_pci_find_next(new_devid, &new_devid)) {
+ cyg_uint8 bus = CYG_PCI_DEV_GET_BUS(new_devid);
+ cyg_uint8 devfn = CYG_PCI_DEV_GET_DEVFN(new_devid);
+ cyg_uint16 v, d;
+ cyg_uint32 c;
+
+ // Check that vendor, device and class match.
+ cyg_pcihw_read_config_uint16(bus, devfn,
+ CYG_PCI_CFG_VENDOR, &v);
+ cyg_pcihw_read_config_uint16(bus, devfn,
+ CYG_PCI_CFG_DEVICE, &d);
+ cyg_pcihw_read_config_uint32(bus, devfn,
+ CYG_PCI_CFG_CLASS_REV, &c);
+ c >>= 8;
+#ifdef CYGPKG_IO_PCI_DEBUG
+ diag_printf("... PCI vendor = %x, device = %x, class %x\n", v, d, c);
+#endif
+ // Check that device matches as the caller desires:
+ if ( (*matchp)(v, d, c, match_callback_data) ) {
+ *devid = new_devid;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+//------------------------------------------------------------------------
+// Resource Allocation
+
+void
+cyg_pci_set_memory_base(CYG_PCI_ADDRESS64 base)
+{
+ cyg_pci_memory_base = base;
+}
+
+void
+cyg_pci_set_io_base(CYG_PCI_ADDRESS32 base)
+{
+ cyg_pci_io_base = base;
+}
+
+cyg_bool
+cyg_pci_configure_device( cyg_pci_device *dev_info )
+{
+ int bar;
+ cyg_uint32 flags;
+ cyg_bool ret = true;
+
+ // If device is already active, just return true as
+ // cyg_pci_get_device_info has presumably filled in
+ // the base_map already.
+ if ((dev_info->command & CYG_PCI_CFG_COMMAND_ACTIVE) != 0)
+ return true;
+
+ if (dev_info->num_bars > 0) {
+ for (bar = 0; bar < CYG_PCI_MAX_BAR; bar++) {
+ if (!dev_info->base_size[bar]) {
+ continue;
+ }
+ flags = dev_info->base_size[bar];
+
+ ret = false;
+
+ if ((flags & CYG_PCI_CFG_BAR_SPACE_MASK) == CYG_PCI_CFG_BAR_SPACE_MEM){
+ ret |= cyg_pci_allocate_memory(dev_info, bar,
+ &cyg_pci_memory_base);
+
+ // If this is a 64bit memory region, skip the next bar
+ // since it will contain the top 32 bits.
+ if (flags & CYG_PRI_CFG_BAR_MEM_TYPE_64)
+ bar++;
+ } else
+ ret |= cyg_pci_allocate_io(dev_info, bar, &cyg_pci_io_base);
+
+ if (!ret)
+ return ret;
+ }
+ }
+
+ cyg_pci_translate_interrupt(dev_info, &dev_info->hal_vector);
+
+ return ret;
+}
+
+// This is the function that handles resource allocation. It doesn't
+// affect the device state.
+// Should not be called with top32bit-bar of a 64bit pair.
+inline cyg_bool
+cyg_pci_allocate_memory_priv( cyg_pci_device *dev_info, cyg_uint32 bar,
+ CYG_PCI_ADDRESS64 *base,
+ CYG_PCI_ADDRESS64 *assigned_addr)
+{
+ cyg_uint32 mem_type, flags;
+ CYG_PCI_ADDRESS64 size, aligned_addr;
+
+ // Get the probed size and flags
+ flags = dev_info->base_size[bar];
+
+ // Decode size
+ size = (CYG_PCI_ADDRESS64) ((~(flags & CYG_PRI_CFG_BAR_MEM_MASK))+1);
+
+ // Calculate address we will assign the device.
+ // This can be made more clever, specifically:
+ // 1) The lowest 1MB should be reserved for devices with 1M memory type.
+ // : Needs to be handled.
+ // 2) The low 32bit space should be reserved for devices with 32bit type.
+ // : With the usual handful of devices it is unlikely that the
+ // low 4GB space will become full.
+ // 3) A bitmap can be used to avoid fragmentation.
+ // : Again, unlikely to be necessary.
+ //
+ // For now, simply align to required size.
+ aligned_addr = (*base+size-1) & ~(size-1);
+
+ // Is the request for memory space?
+ if (CYG_PCI_CFG_BAR_SPACE_MEM != (flags & CYG_PCI_CFG_BAR_SPACE_MASK))
+ return false;
+
+ // Check type of memory requested...
+ mem_type = CYG_PRI_CFG_BAR_MEM_TYPE_MASK & flags;
+
+ // We don't handle <1MB devices optimally yet.
+ if (CYG_PRI_CFG_BAR_MEM_TYPE_1M == mem_type
+ && (aligned_addr + size) > 1024*1024)
+ return false;
+
+ // Update the resource pointer and return values.
+ *base = aligned_addr+size;
+ *assigned_addr = aligned_addr;
+
+ dev_info->base_map[bar] = (cyg_uint32)
+ (aligned_addr+HAL_PCI_PHYSICAL_MEMORY_BASE) & 0xffffffff;
+
+ // If a 64bit region, store upper 32 bits in the next bar.
+ // Note: The CPU is not necessarily able to access the region
+ // linearly - it may have to do it in segments. Driver must handle that.
+ if (CYG_PRI_CFG_BAR_MEM_TYPE_64 == mem_type) {
+ dev_info->base_map[bar+1] = (cyg_uint32)
+ ((aligned_addr+HAL_PCI_PHYSICAL_MEMORY_BASE) >> 32) & 0xffffffff;
+ }
+
+ return true;
+}
+
+cyg_bool
+cyg_pci_allocate_memory( cyg_pci_device *dev_info, cyg_uint32 bar,
+ CYG_PCI_ADDRESS64 *base)
+{
+ cyg_uint8 bus = CYG_PCI_DEV_GET_BUS(dev_info->devid);
+ cyg_uint8 devfn = CYG_PCI_DEV_GET_DEVFN(dev_info->devid);
+ CYG_PCI_ADDRESS64 assigned_addr;
+ cyg_bool ret;
+
+ // Check that device is inactive.
+ if ((dev_info->command & CYG_PCI_CFG_COMMAND_ACTIVE) != 0)
+ return false;
+
+ // Allocate memory space for the device.
+ ret = cyg_pci_allocate_memory_priv(dev_info, bar, base, &assigned_addr);
+
+ if (ret) {
+ // Map the device and update the BAR in the dev_info structure.
+ cyg_pcihw_write_config_uint32(bus, devfn,
+ CYG_PCI_CFG_BAR_BASE+4*bar,
+ (cyg_uint32)
+ (assigned_addr & 0xffffffff));
+ cyg_pcihw_read_config_uint32(bus, devfn,
+ CYG_PCI_CFG_BAR_BASE+4*bar,
+ &dev_info->base_address[bar]);
+
+ // Handle upper 32 bits if necessary.
+ if (dev_info->base_size[bar] & CYG_PRI_CFG_BAR_MEM_TYPE_64) {
+ cyg_pcihw_write_config_uint32(bus, devfn,
+ CYG_PCI_CFG_BAR_BASE+4*(bar+1),
+ (cyg_uint32)
+ ((assigned_addr >> 32)& 0xffffffff));
+ cyg_pcihw_read_config_uint32(bus, devfn,
+ CYG_PCI_CFG_BAR_BASE+4*(bar+1),
+ &dev_info->base_address[bar+1]);
+ }
+ }
+
+ return ret;
+}
+
+cyg_bool
+cyg_pci_allocate_io_priv( cyg_pci_device *dev_info, cyg_uint32 bar,
+ CYG_PCI_ADDRESS32 *base,
+ CYG_PCI_ADDRESS32 *assigned_addr)
+{
+ cyg_uint32 flags, size;
+ CYG_PCI_ADDRESS32 aligned_addr;
+
+ // Get the probed size and flags
+ flags = dev_info->base_size[bar];
+
+ // Decode size
+ size = (~(flags & CYG_PRI_CFG_BAR_IO_MASK))+1;
+
+ // Calculate address we will assign the device.
+ // This can be made more clever.
+ // For now, simply align to required size.
+ aligned_addr = (*base+size-1) & ~(size-1);
+
+ // Is the request for IO space?
+ if (CYG_PCI_CFG_BAR_SPACE_IO != (flags & CYG_PCI_CFG_BAR_SPACE_MASK))
+ return false;
+
+ // Update the resource pointer and return values.
+ *base = aligned_addr+size;
+ dev_info->base_map[bar] = aligned_addr+HAL_PCI_PHYSICAL_IO_BASE;
+ *assigned_addr = aligned_addr;
+
+ return true;
+}
+
+
+cyg_bool
+cyg_pci_allocate_io( cyg_pci_device *dev_info, cyg_uint32 bar,
+ CYG_PCI_ADDRESS32 *base)
+{
+ cyg_uint8 bus = CYG_PCI_DEV_GET_BUS(dev_info->devid);
+ cyg_uint8 devfn = CYG_PCI_DEV_GET_DEVFN(dev_info->devid);
+ CYG_PCI_ADDRESS32 assigned_addr;
+ cyg_bool ret;
+
+ // Check that device is inactive.
+ if ((dev_info->command & CYG_PCI_CFG_COMMAND_ACTIVE) != 0)
+ return false;
+
+ // Allocate IO space for the device.
+ ret = cyg_pci_allocate_io_priv(dev_info, bar, base, &assigned_addr);
+
+ if (ret) {
+ // Map the device and update the BAR in the dev_info structure.
+ cyg_pcihw_write_config_uint32(bus, devfn,
+ CYG_PCI_CFG_BAR_BASE+4*bar,
+ assigned_addr);
+ cyg_pcihw_read_config_uint32(bus, devfn,
+ CYG_PCI_CFG_BAR_BASE+4*bar,
+ &dev_info->base_address[bar]);
+ }
+
+ return ret;
+}
+
+cyg_bool
+cyg_pci_translate_interrupt( cyg_pci_device *dev_info,
+ CYG_ADDRWORD *vec )
+{
+ cyg_uint8 bus = CYG_PCI_DEV_GET_BUS(dev_info->devid);
+ cyg_uint8 devfn = CYG_PCI_DEV_GET_DEVFN(dev_info->devid);
+
+ if (cyg_pcihw_translate_interrupt(bus, devfn, vec)) {
+#ifdef CYGPKG_IO_PCI_CONFIGURE_INTLINE
+ // Fill in interrupt line info. This only really works for
+ // platforms where assigned PCI irq numbers are less than 255.
+ cyg_pcihw_write_config_uint8(bus, devfn,
+ CYG_PCI_CFG_INT_LINE,
+ *vec & 0xff);
+#endif
+ return true;
+ }
+ return false;
+}
+
+
+// Initialize devices on a given bus and all subordinate busses.
+cyg_bool
+cyg_pci_configure_bus( cyg_uint8 bus,
+ cyg_uint8 *next_bus )
+{
+ cyg_uint8 devfn, header_type;
+ cyg_pci_device_id devid;
+ cyg_pci_device dev_info;
+
+ CYG_PCI_ADDRESS64 mem_start, mem_limit, mem_base;
+ CYG_PCI_ADDRESS32 io_start, io_limit, io_base;
+
+ // Scan only this bus for valid devices.
+ devid = CYG_PCI_DEV_MAKE_ID(bus, 0) | CYG_PCI_NULL_DEVFN;
+
+#ifdef CYGPKG_IO_PCI_DEBUG
+ diag_printf("Configuring bus %d.\n", bus);
+#endif
+
+ while (cyg_pci_find_next(devid, &devid) && bus == CYG_PCI_DEV_GET_BUS(devid)) {
+
+ devfn = CYG_PCI_DEV_GET_DEVFN(devid);
+
+ // Get the device info
+ cyg_pci_get_device_info(devid, &dev_info);
+
+#ifdef CYGPKG_IO_PCI_DEBUG
+ diag_printf("\n");
+ diag_printf("Configuring PCI Bus : %d\n", bus);
+ diag_printf(" PCI Device: %d\n", CYG_PCI_DEV_GET_DEV(devfn));
+ diag_printf(" PCI Func : %d\n", CYG_PCI_DEV_GET_FN(devfn));
+ diag_printf(" Vendor Id : 0x%08X\n", dev_info.vendor);
+ diag_printf(" Device Id : 0x%08X\n", dev_info.device);
+#endif
+
+ header_type = dev_info.header_type & CYG_PCI_CFG_HEADER_TYPE_MASK;
+
+ // Check for supported header types.
+ if (header_type != CYG_PCI_HEADER_NORMAL &&
+ header_type != CYG_PCI_HEADER_BRIDGE) {
+ CYG_FAIL("Unsupported PCI header type");
+ continue;
+ }
+
+ // Only PCI-to-PCI bridges
+ if (header_type == CYG_PCI_HEADER_BRIDGE &&
+ (dev_info.class_rev >> 8) != CYG_PCI_CLASS_BRIDGE_PCI_PCI) {
+ CYG_FAIL("Unsupported PCI bridge class");
+ continue;
+ }
+
+ // Configure the base registers
+ if (!cyg_pci_configure_device(&dev_info)) {
+ // Apparently out of resources.
+ CYG_FAIL("cyg_pci_configure_device failed");
+ break;
+ }
+
+ // Activate non-bridge devices.
+ if (header_type != CYG_PCI_HEADER_BRIDGE) {
+ dev_info.command |= (CYG_PCI_CFG_COMMAND_IO // enable I/O space
+ | CYG_PCI_CFG_COMMAND_MEMORY // enable memory space
+ | CYG_PCI_CFG_COMMAND_MASTER); // enable bus master
+ cyg_pci_write_config_uint16(dev_info.devid, CYG_PCI_CFG_COMMAND, dev_info.command);
+ } else {
+ // Bridge Configuration
+
+ // Set up the bus numbers that define the bridge
+ dev_info.header.bridge.pri_bus = bus;
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_PRI_BUS,
+ dev_info.header.bridge.pri_bus);
+
+ dev_info.header.bridge.sec_bus = *next_bus;
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_SEC_BUS,
+ dev_info.header.bridge.sec_bus);
+
+ // Temporarily set to maximum so config cycles get passed along.
+ dev_info.header.bridge.sub_bus = CYG_PCI_MAX_BUS - 1;
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_SUB_BUS,
+ dev_info.header.bridge.sub_bus);
+
+ // increment bus counter
+ *next_bus += 1;
+
+ // To figure the sizes of the memory and I/O windows, save the
+ // current base of memory and I/O before configuring the bus
+ // or busses on the secondary side of the bridge. After the
+ // secondary side is configured, the difference between the
+ // current values and saved values will tell the size.
+
+ // For bridges, the memory window must start and end on a 1M
+ // boundary and the I/O window must start and end on a 4K
+ // boundary. We round up the mem and I/O allocation bases
+ // to appropriate boundaries before configuring the secondary
+ // bus. Save the pre-rounded values in case no mem or I/O
+ // is needed we can recover any space lost due to rounding.
+
+ // round up start of PCI memory space to a 1M boundary
+ mem_base = cyg_pci_memory_base;
+ cyg_pci_memory_base += 0xfffff;
+ cyg_pci_memory_base &= ~0xfffff;
+ mem_start = cyg_pci_memory_base;
+
+ // round up start of PCI I/O space to a 4 Kbyte start address
+ io_base = cyg_pci_io_base;
+ cyg_pci_io_base += 0xfff;
+ cyg_pci_io_base &= ~0xfff;
+ io_start = cyg_pci_io_base;
+
+ // configure the subordinate PCI bus
+ cyg_pci_configure_bus (dev_info.header.bridge.sec_bus, next_bus);
+
+ // set subordinate bus number to last assigned bus number
+ dev_info.header.bridge.sub_bus = *next_bus - 1;
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_SUB_BUS,
+ dev_info.header.bridge.sub_bus);
+
+ // Did sub bus configuration use any I/O?
+ if (cyg_pci_io_base > io_start) {
+
+ // round up end of bridge's I/O space to a 4K boundary
+ cyg_pci_io_base += 0xfff;
+ cyg_pci_io_base &= ~0xfff;
+ io_limit = cyg_pci_io_base - 0x1000;
+
+ // Enable I/O cycles across bridge
+ dev_info.command |= CYG_PCI_CFG_COMMAND_IO;
+
+ // 32 Bit I/O?
+ if ((dev_info.header.bridge.io_base & 0x0f) == 0x01) {
+ // I/O Base Upper 16 Bits Register
+ dev_info.header.bridge.io_base_upper16 = io_start >> 16;
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_IO_BASE_UPPER16,
+ dev_info.header.bridge.io_base_upper16);
+ // I/O Limit Upper 16 Bits Register
+ dev_info.header.bridge.io_limit_upper16 = io_limit >> 16;
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_IO_LIMIT_UPPER16,
+ dev_info.header.bridge.io_limit_upper16);
+ }
+
+ // I/O Base Register
+ dev_info.header.bridge.io_base = (io_start & 0xf000) >> 8;
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_IO_BASE,
+ dev_info.header.bridge.io_base);
+ // I/O Limit Register
+ dev_info.header.bridge.io_limit = (io_limit & 0xf000) >> 8;
+ cyg_pcihw_write_config_uint8(bus, devfn, CYG_PCI_CFG_IO_LIMIT,
+ dev_info.header.bridge.io_limit);
+
+ } else {
+ // No I/O space used on secondary bus.
+ // Recover any space lost on unnecessary rounding
+ cyg_pci_io_base = io_base;
+ }
+
+ // Did sub bus configuration use any memory?
+ if (cyg_pci_memory_base > mem_start) {
+
+ // round up end of bridge's PCI memory space to a 1M boundary
+ cyg_pci_memory_base += 0xfffff;
+ cyg_pci_memory_base &= ~0xfffff;
+ mem_limit = cyg_pci_memory_base - 0x100000;
+
+ // Enable memory cycles across bridge
+ dev_info.command |= CYG_PCI_CFG_COMMAND_MEMORY;
+
+ // Memory Base Register
+ dev_info.header.bridge.mem_base = (mem_start >> 16) & 0xfff0;
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_MEM_BASE,
+ dev_info.header.bridge.mem_base);
+
+ // Memory Limit Register
+ dev_info.header.bridge.mem_limit = (mem_limit >> 16) & 0xfff0;
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_MEM_LIMIT,
+ dev_info.header.bridge.mem_limit);
+
+ // Prefetchable memory not yet supported across bridges.
+ // Disable by making limit < base
+ {
+ cyg_uint16 tmp_word;
+
+ tmp_word = 0;
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_PREFETCH_LIMIT,
+ tmp_word);
+ tmp_word = 0xfff0;
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_PREFETCH_BASE,
+ tmp_word);
+ }
+ } else {
+ // No memory space used on secondary bus.
+ // Recover any space lost on unnecessary rounding
+ cyg_pci_memory_base = mem_base;
+ }
+
+ // Setup the bridge command register
+ dev_info.command |= CYG_PCI_CFG_COMMAND_MASTER;
+ dev_info.command |= CYG_PCI_CFG_COMMAND_SERR;
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_COMMAND,
+ dev_info.command);
+
+ /* Setup the Bridge Control Register */
+ dev_info.header.bridge.control |= CYG_PCI_CFG_BRIDGE_CTL_PARITY;
+ dev_info.header.bridge.control |= CYG_PCI_CFG_BRIDGE_CTL_SERR;
+ dev_info.header.bridge.control |= CYG_PCI_CFG_BRIDGE_CTL_MASTER;
+ cyg_pcihw_write_config_uint16(bus, devfn, CYG_PCI_CFG_BRIDGE_CONTROL,
+ dev_info.header.bridge.control);
+ }
+ }
+#ifdef CYGPKG_IO_PCI_DEBUG
+ diag_printf("Finished configuring bus %d.\n", bus);
+#endif
+
+ return true;
+}
+
+
+#endif // ifdef CYG_PCI_PRESENT
+
+//-----------------------------------------------------------------------------
+// end of pci.c
diff --git a/cesar/ecos/packages/io/pci/current/src/pci_hw.c b/cesar/ecos/packages/io/pci/current/src/pci_hw.c
new file mode 100644
index 0000000000..a473c2ec49
--- /dev/null
+++ b/cesar/ecos/packages/io/pci/current/src/pci_hw.c
@@ -0,0 +1,126 @@
+//=============================================================================
+//
+// pci_hw.c
+//
+// PCI hardware library
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov, from design by nickg
+// Contributors: jskov
+// Date: 1999-08-09
+// Purpose: PCI hardware configuration access
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+#include <cyg/io/pci_hw.h>
+
+// CYG_PCI_PRESENT only gets defined for targets that provide PCI HAL support.
+// See pci_hw.h for details.
+#ifdef CYG_PCI_PRESENT
+
+// Init
+void
+cyg_pcihw_init(void)
+{
+ HAL_PCI_INIT();
+}
+
+// Read functions
+void
+cyg_pcihw_read_config_uint8( cyg_uint8 bus, cyg_uint8 devfn,
+ cyg_uint8 offset, cyg_uint8 *val)
+{
+ HAL_PCI_CFG_READ_UINT8(bus, devfn, offset, *val);
+}
+
+void
+cyg_pcihw_read_config_uint16( cyg_uint8 bus, cyg_uint8 devfn,
+ cyg_uint8 offset, cyg_uint16 *val)
+{
+ HAL_PCI_CFG_READ_UINT16(bus, devfn, offset, *val);
+}
+
+void
+cyg_pcihw_read_config_uint32( cyg_uint8 bus, cyg_uint8 devfn,
+ cyg_uint8 offset, cyg_uint32 *val)
+{
+ HAL_PCI_CFG_READ_UINT32(bus, devfn, offset, *val);
+}
+
+// Write functions
+void
+cyg_pcihw_write_config_uint8( cyg_uint8 bus, cyg_uint8 devfn,
+ cyg_uint8 offset, cyg_uint8 val)
+{
+ HAL_PCI_CFG_WRITE_UINT8(bus, devfn, offset, val);
+}
+
+void
+cyg_pcihw_write_config_uint16( cyg_uint8 bus, cyg_uint8 devfn,
+ cyg_uint8 offset, cyg_uint16 val)
+{
+ HAL_PCI_CFG_WRITE_UINT16(bus, devfn, offset, val);
+}
+
+void
+cyg_pcihw_write_config_uint32( cyg_uint8 bus, cyg_uint8 devfn,
+ cyg_uint8 offset, cyg_uint32 val)
+{
+ HAL_PCI_CFG_WRITE_UINT32(bus, devfn, offset, val);
+}
+
+// Interrupt translation
+cyg_bool
+cyg_pcihw_translate_interrupt( cyg_uint8 bus, cyg_uint8 devfn,
+ CYG_ADDRWORD *vec)
+{
+ cyg_bool valid;
+
+ HAL_PCI_TRANSLATE_INTERRUPT(bus, devfn, *vec, valid);
+
+ return valid;
+}
+
+#endif // ifdef CYG_PCI_PRESENT
+
+//-----------------------------------------------------------------------------
+// end of pci_hw.c
diff --git a/cesar/ecos/packages/io/pci/current/tests/pci1.c b/cesar/ecos/packages/io/pci/current/tests/pci1.c
new file mode 100644
index 0000000000..70f1e37b57
--- /dev/null
+++ b/cesar/ecos/packages/io/pci/current/tests/pci1.c
@@ -0,0 +1,454 @@
+//==========================================================================
+//
+// pci1.c
+//
+// Test PCI library API
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov
+// Date: 1999-03-17
+// Description: Simple test that:
+// Checks API (compile time)
+// Prints out information about found PCI devices.
+// Allocates resources to devices (but does not enable
+// them).
+//####DESCRIPTIONEND####
+
+#include <pkgconf/system.h>
+
+#include <cyg/infra/diag.h> // diag_printf
+#include <cyg/infra/testcase.h> // test macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+// Package requirements
+#if defined(CYGPKG_IO_PCI) && defined(CYGPKG_KERNEL) && defined(CYGPKG_ISOINFRA)
+
+#include <pkgconf/kernel.h>
+#include <pkgconf/io_pci.h>
+#include <cyg/io/pci.h>
+#include <cyg/hal/hal_arch.h>
+#include <string.h>
+
+// Package option requirements
+#if defined(CYGFUN_KERNEL_API_C) && defined(CYG_PCI_PRESENT)
+
+#include <cyg/kernel/kapi.h>
+
+// If the target has limited memory resources, undef the below to
+// avoid inclusion of the big PCI code tables.
+//
+// The header file is created from http://www.yourvote.com/pci
+// maintained by Jim Boemler (jboemler@halcyon.com).
+//
+// If you have PCI devices not listed in this list, please consider
+// registering the codes in the database.
+#define USE_PCI_CODE_LIST
+
+#ifdef USE_PCI_CODE_LIST
+#include "pcihdr.h"
+#endif
+
+// You may want to use this code to do some simple testing of the
+// devices on the PCI bus. By enabling the below definition, the
+// devices will get PCI IO and MEM access activated after configuration
+// so you can play with IO registers and display/set contents of MEM.
+#define nENABLE_PCI_DEVICES
+
+unsigned char stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+cyg_thread thread_data;
+cyg_handle_t thread_handle;
+
+void pci_scan( void );
+
+cyg_bool
+pci_api_test(int dummy)
+{
+ cyg_pci_device dev_info;
+ cyg_pci_device_id devid = CYG_PCI_NULL_DEVID;
+ cyg_bool ret;
+ CYG_PCI_ADDRESS64 mem_base = 0;
+ CYG_PCI_ADDRESS32 io_base = 0;
+ CYG_ADDRWORD vec;
+ cyg_uint8 var_uint8;
+ cyg_uint16 var_uint16;
+ cyg_uint32 var_uint32;
+
+
+ // Always return...
+ if (dummy)
+ return true;
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+
+ // PCI library API
+ cyg_pci_init();
+
+ cyg_pci_get_device_info (devid, &dev_info);
+ cyg_pci_set_device_info (devid, &dev_info);
+
+ ret = cyg_pci_find_device(0, 0, &devid);
+ ret |= cyg_pci_find_class(0, &devid);
+ ret |= cyg_pci_find_next(devid, &devid);
+
+ ret |= cyg_pci_configure_device(&dev_info);
+
+ cyg_pci_set_memory_base(mem_base);
+ cyg_pci_set_io_base(io_base);
+
+ ret |= cyg_pci_allocate_memory(&dev_info, 0, &mem_base);
+ ret |= cyg_pci_allocate_io(&dev_info, 0, &io_base);
+
+ ret |= cyg_pci_translate_interrupt(&dev_info, &vec);
+
+ cyg_pci_read_config_uint8(devid, 0, &var_uint8);
+ cyg_pci_read_config_uint16(devid, 0, &var_uint16);
+ cyg_pci_read_config_uint32(devid, 0, &var_uint32);
+
+ cyg_pci_write_config_uint8(devid, 0, var_uint8);
+ cyg_pci_write_config_uint16(devid, 0, var_uint16);
+ cyg_pci_write_config_uint32(devid, 0, var_uint32);
+
+ return ret;
+}
+
+void
+pci_test( void )
+{
+ cyg_pci_device dev_info;
+ cyg_pci_device_id devid;
+ CYG_ADDRWORD irq;
+ int i;
+#ifdef USE_PCI_CODE_LIST
+ cyg_bool no_match = false;
+ cyg_uint16 vendor, device;
+ cyg_uint8 bc, sc, pi;
+ PCI_VENTABLE* vtbl;
+ PCI_DEVTABLE* dtbl;
+ PCI_CLASSCODETABLE* ctbl;
+#endif
+
+ pci_api_test(1);
+
+ cyg_pci_init();
+
+ diag_printf( "========== Finding and configuring devices\n" );
+
+ if (cyg_pci_find_next(CYG_PCI_NULL_DEVID, &devid)) {
+ do {
+ // Get device info
+ cyg_pci_get_device_info(devid, &dev_info);
+
+
+ // Print stuff
+ diag_printf("Found device on bus %d, devfn 0x%02x:\n",
+ CYG_PCI_DEV_GET_BUS(devid),
+ CYG_PCI_DEV_GET_DEVFN(devid));
+
+ if (dev_info.command & CYG_PCI_CFG_COMMAND_ACTIVE) {
+ diag_printf(" Note that board is active. Probed"
+ " sizes and CPU addresses invalid!\n");
+ }
+
+ // Configure the device
+ if (cyg_pci_configure_device(&dev_info)) {
+ diag_printf(" Device configuration succeeded\n");
+#ifdef ENABLE_PCI_DEVICES
+ {
+ cyg_uint16 cmd;
+
+ // Don't use cyg_pci_set_device_info since it clears
+ // some of the fields we want to print out below.
+ cyg_pci_read_config_uint16(dev_info.devid,
+ CYG_PCI_CFG_COMMAND, &cmd);
+ cmd |= CYG_PCI_CFG_COMMAND_IO|CYG_PCI_CFG_COMMAND_MEMORY;
+ cyg_pci_write_config_uint16(dev_info.devid,
+ CYG_PCI_CFG_COMMAND, cmd);
+ }
+ diag_printf(" **** Device IO and MEM access enabled\n");
+#endif
+ } else {
+ diag_printf(" Device configuration failed");
+ if (dev_info.command & CYG_PCI_CFG_COMMAND_ACTIVE)
+ diag_printf(" - device already enabled\n");
+ else
+ diag_printf(" - resource problem\n");
+ }
+
+ diag_printf(" Vendor 0x%04x", dev_info.vendor);
+#ifdef USE_PCI_CODE_LIST
+ vendor = dev_info.vendor;
+ vtbl = PciVenTable;
+ for (i = 0; i < PCI_VENTABLE_LEN; i++, vtbl++)
+ if (vendor == vtbl->VenId)
+ break;
+
+ if (i < PCI_VENTABLE_LEN) {
+ diag_printf(" [%s][%s]", vtbl->VenShort, vtbl->VenFull);
+ } else {
+ diag_printf(" [UNKNOWN]");
+ no_match = true;
+ }
+#endif
+ diag_printf("\n Device 0x%04x", dev_info.device);
+#ifdef USE_PCI_CODE_LIST
+ device = dev_info.device;
+ dtbl = PciDevTable;
+ for (i = 0; i < PCI_DEVTABLE_LEN; i++, dtbl++)
+ if (vendor == dtbl->VenId && device == dtbl->DevId)
+ break;
+
+ if (i < PCI_DEVTABLE_LEN) {
+ diag_printf(" [%s][%s]", dtbl->Chip, dtbl->ChipDesc);
+ } else {
+ diag_printf(" [UNKNOWN]");
+ no_match = true;
+ }
+#endif
+
+ diag_printf("\n Command 0x%04x, Status 0x%04x\n",
+ dev_info.command, dev_info.status);
+
+ diag_printf(" Class/Rev 0x%08x", dev_info.class_rev);
+#ifdef USE_PCI_CODE_LIST
+ bc = (dev_info.class_rev >> 24) & 0xff;
+ sc = (dev_info.class_rev >> 16) & 0xff;
+ pi = (dev_info.class_rev >> 8) & 0xff;
+ ctbl = PciClassCodeTable;
+ for (i = 0; i < PCI_CLASSCODETABLE_LEN; i++, ctbl++)
+ if (bc == ctbl->BaseClass
+ && sc == ctbl->SubClass
+ && pi == ctbl->ProgIf)
+ break;
+
+ if (i < PCI_CLASSCODETABLE_LEN) {
+ diag_printf(" [%s][%s][%s]", ctbl->BaseDesc,
+ ctbl->SubDesc, ctbl->ProgDesc);
+ } else {
+ diag_printf(" [UNKNOWN]");
+ no_match = true;
+ }
+#endif
+ diag_printf("\n Header 0x%02x\n", dev_info.header_type);
+
+ diag_printf(" SubVendor 0x%04x, Sub ID 0x%04x\n",
+ dev_info.header.normal.sub_vendor,
+ dev_info.header.normal.sub_id);
+
+
+ for(i = 0; i < CYG_PCI_MAX_BAR; i++) {
+ diag_printf(" BAR[%d] 0x%08x /", i, dev_info.base_address[i]);
+ diag_printf(" probed size 0x%08x / CPU addr 0x%08x\n",
+ dev_info.base_size[i], dev_info.base_map[i]);
+ }
+
+ if (cyg_pci_translate_interrupt(&dev_info, &irq))
+ diag_printf(" Wired to HAL vector %d\n", irq);
+ else
+ diag_printf(" Does not generate interrupts.\n");
+
+ } while (cyg_pci_find_next(devid, &devid));
+
+
+#ifdef USE_PCI_CODE_LIST
+ diag_printf("\nStrings in [] are from the PCI Code List at http://www.yourvote.com/pci\n");
+ if (no_match) {
+ diag_printf("It seems that some of the device information has not been registered in\n");
+ diag_printf("the PCI Code List. Please consider improving the database by registering\n");
+ diag_printf("the [UNKNOWN] information for your devices. Thanks.\n");
+ }
+#endif
+ } else {
+ diag_printf("No PCI devices found.");
+ }
+
+ pci_scan();
+
+ CYG_TEST_PASS_FINISH("pci1 test OK");
+}
+
+void
+pci_scan( void )
+{
+ cyg_pci_device dev_info;
+ cyg_pci_device_id devid;
+ CYG_ADDRWORD irq;
+ int i;
+#ifdef USE_PCI_CODE_LIST
+ cyg_bool no_match = false;
+ cyg_uint16 vendor, device;
+ cyg_uint8 bc, sc, pi;
+ PCI_VENTABLE* vtbl;
+ PCI_DEVTABLE* dtbl;
+ PCI_CLASSCODETABLE* ctbl;
+#endif
+
+ diag_printf( "========== Scanning initialized devices\n" );
+
+ if (cyg_pci_find_next(CYG_PCI_NULL_DEVID, &devid)) {
+ do {
+ // Since we are NOT about to configure the device, set the
+ // devinfo record so we don't mistake garbage for data.
+ memset( &dev_info, 0xAAAAAAAAu, sizeof( dev_info ) );
+
+ // Get device info
+ cyg_pci_get_device_info(devid, &dev_info);
+
+ // Print stuff
+ diag_printf("Found device on bus %d, devfn 0x%02x:\n",
+ CYG_PCI_DEV_GET_BUS(devid),
+ CYG_PCI_DEV_GET_DEVFN(devid));
+
+ if (dev_info.command & CYG_PCI_CFG_COMMAND_ACTIVE) {
+ diag_printf(" Note that board is active. Probed"
+ " sizes and CPU addresses invalid!\n");
+ }
+
+ diag_printf(" Vendor 0x%04x", dev_info.vendor);
+#ifdef USE_PCI_CODE_LIST
+ vendor = dev_info.vendor;
+ vtbl = PciVenTable;
+ for (i = 0; i < PCI_VENTABLE_LEN; i++, vtbl++)
+ if (vendor == vtbl->VenId)
+ break;
+
+ if (i < PCI_VENTABLE_LEN) {
+ diag_printf(" [%s][%s]", vtbl->VenShort, vtbl->VenFull);
+ } else {
+ diag_printf(" [UNKNOWN]");
+ no_match = true;
+ }
+#endif
+ diag_printf("\n Device 0x%04x", dev_info.device);
+#ifdef USE_PCI_CODE_LIST
+ device = dev_info.device;
+ dtbl = PciDevTable;
+ for (i = 0; i < PCI_DEVTABLE_LEN; i++, dtbl++)
+ if (vendor == dtbl->VenId && device == dtbl->DevId)
+ break;
+
+ if (i < PCI_DEVTABLE_LEN) {
+ diag_printf(" [%s][%s]", dtbl->Chip, dtbl->ChipDesc);
+ } else {
+ diag_printf(" [UNKNOWN]");
+ no_match = true;
+ }
+#endif
+
+ diag_printf("\n Command 0x%04x, Status 0x%04x\n",
+ dev_info.command, dev_info.status);
+
+ diag_printf(" Class/Rev 0x%08x", dev_info.class_rev);
+#ifdef USE_PCI_CODE_LIST
+ bc = (dev_info.class_rev >> 24) & 0xff;
+ sc = (dev_info.class_rev >> 16) & 0xff;
+ pi = (dev_info.class_rev >> 8) & 0xff;
+ ctbl = PciClassCodeTable;
+ for (i = 0; i < PCI_CLASSCODETABLE_LEN; i++, ctbl++)
+ if (bc == ctbl->BaseClass
+ && sc == ctbl->SubClass
+ && pi == ctbl->ProgIf)
+ break;
+
+ if (i < PCI_CLASSCODETABLE_LEN) {
+ diag_printf(" [%s][%s][%s]", ctbl->BaseDesc,
+ ctbl->SubDesc, ctbl->ProgDesc);
+ } else {
+ diag_printf(" [UNKNOWN]");
+ no_match = true;
+ }
+#endif
+ diag_printf("\n Header 0x%02x\n", dev_info.header_type);
+
+ diag_printf(" SubVendor 0x%04x, Sub ID 0x%04x\n",
+ dev_info.header.normal.sub_vendor,
+ dev_info.header.normal.sub_id);
+
+
+ for(i = 0; i < CYG_PCI_MAX_BAR; i++) {
+ diag_printf(" BAR[%d] 0x%08x /", i, dev_info.base_address[i]);
+ diag_printf(" probed size 0x%08x / CPU addr 0x%08x\n",
+ dev_info.base_size[i], dev_info.base_map[i]);
+ }
+
+ if (cyg_pci_translate_interrupt(&dev_info, &irq))
+ diag_printf(" Wired to HAL vector %d\n", irq);
+ else
+ diag_printf(" Does not generate interrupts.\n");
+
+ } while (cyg_pci_find_next(devid, &devid));
+ } else {
+ diag_printf("No PCI devices found.");
+ }
+}
+
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ cyg_thread_create(10, // Priority - just a number
+ (cyg_thread_entry_t*)pci_test, // entry
+ 0, //
+ "pci_thread", // Name
+ &stack[0], // Stack
+ CYGNUM_HAL_STACK_SIZE_TYPICAL, // Size
+ &thread_handle, // Handle
+ &thread_data // Thread data structure
+ );
+ cyg_thread_resume(thread_handle);
+ cyg_scheduler_start();
+}
+
+#else // CYGFUN_KERNEL_API_C && CYG_PCI_PRESENT
+#define N_A_MSG "Needs kernel C API & PCI platform support"
+#endif
+
+#else // CYGPKG_IO_PCI && CYGPKG_KERNEL
+#define N_A_MSG "Needs IO/PCI, ISOINFRA, and Kernel"
+#endif
+
+#ifdef N_A_MSG
+void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG);
+}
+#endif // N_A_MSG
+
+// EOF pci1.c
diff --git a/cesar/ecos/packages/io/pci/current/tests/pci2.c b/cesar/ecos/packages/io/pci/current/tests/pci2.c
new file mode 100644
index 0000000000..4812dd8ff9
--- /dev/null
+++ b/cesar/ecos/packages/io/pci/current/tests/pci2.c
@@ -0,0 +1,230 @@
+//==========================================================================
+//
+// pci2.c
+//
+// Test PCI library's resource allocation.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov
+// Date: 1999-03-17
+// Description: Simple test that prints out information about found
+// PCI devices. Entirely passive - no configuration happens.
+//
+//####DESCRIPTIONEND####
+
+#include <pkgconf/system.h>
+
+#include <cyg/infra/diag.h> // diag_printf
+#include <cyg/infra/testcase.h> // test macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+// Package requirements
+#if defined(CYGPKG_IO_PCI) && defined(CYGPKG_KERNEL)
+
+#include <pkgconf/kernel.h>
+#include <pkgconf/io_pci.h>
+#include <cyg/io/pci.h>
+#include <cyg/hal/hal_arch.h>
+
+// Package option requirements
+#if defined(CYGFUN_KERNEL_API_C) && defined(CYG_PCI_PRESENT)
+
+#include <cyg/kernel/kapi.h>
+
+unsigned char stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+cyg_thread thread_data;
+cyg_handle_t thread_handle;
+
+void
+pci_test( void )
+{
+ cyg_pci_device dev_info;
+ CYG_PCI_ADDRESS64 mem_base;
+ CYG_PCI_ADDRESS64 mem_assigned_addr;
+ CYG_PCI_ADDRESS32 io_base;
+ CYG_PCI_ADDRESS32 io_assigned_addr;
+
+ // Verify that space type requests are checked.
+ dev_info.base_size[0] = CYG_PCI_CFG_BAR_SPACE_IO;
+ CYG_TEST_CHECK(!cyg_pci_allocate_memory_priv(&dev_info, 0, &mem_base,
+ &mem_assigned_addr),
+ "cyg_pci_allocate_memory_priv accepted IO request");
+ dev_info.base_size[0] = CYG_PCI_CFG_BAR_SPACE_MEM;
+ CYG_TEST_CHECK(!cyg_pci_allocate_io_priv(&dev_info, 0, &io_base,
+ &io_assigned_addr),
+ "cyg_pci_allocate_io_priv accepted MEM request");
+
+ // Check allocation and alignment of IO space
+ io_base = 0x0000;
+ // Size 4
+ dev_info.base_size[0] = CYG_PCI_CFG_BAR_SPACE_IO | 0xfffffffc;
+ CYG_TEST_CHECK(cyg_pci_allocate_io_priv(&dev_info, 0, &io_base,
+ &io_assigned_addr),
+ "cyg_pci_allocate_io_priv(4) failed");
+ CYG_TEST_CHECK(0x0004 == io_base,
+ "cyg_pci_allocate_io_priv(4) size failed");
+ CYG_TEST_CHECK(0x0000 == io_assigned_addr,
+ "cyg_pci_allocate_io_priv(4) align failed");
+ // Size 8 (alignment required)
+ dev_info.base_size[0] = CYG_PCI_CFG_BAR_SPACE_IO | 0xfffffff8;
+ CYG_TEST_CHECK(cyg_pci_allocate_io_priv(&dev_info, 0, &io_base,
+ &io_assigned_addr),
+ "cyg_pci_allocate_io_priv(8) failed");
+ CYG_TEST_CHECK(0x0010 == io_base,
+ "cyg_pci_allocate_io_priv(8) size failed");
+ CYG_TEST_CHECK(0x0008 == io_assigned_addr,
+ "cyg_pci_allocate_io_priv(8) align failed");
+ // Size 16 (no alignment required)
+ dev_info.base_size[0] = CYG_PCI_CFG_BAR_SPACE_IO | 0xfffffff0;
+ CYG_TEST_CHECK(cyg_pci_allocate_io_priv(&dev_info, 0, &io_base,
+ &io_assigned_addr),
+ "cyg_pci_allocate_io_priv(16) failed");
+ CYG_TEST_CHECK(0x0020 == io_base,
+ "cyg_pci_allocate_io_priv(16) size failed");
+ CYG_TEST_CHECK(0x0010 == io_assigned_addr,
+ "cyg_pci_allocate_io_priv(16) align failed");
+ // Size 64 (alignment required)
+ dev_info.base_size[0] = CYG_PCI_CFG_BAR_SPACE_IO | 0xffffffc0;
+ CYG_TEST_CHECK(cyg_pci_allocate_io_priv(&dev_info, 0, &io_base,
+ &io_assigned_addr),
+ "cyg_pci_allocate_io_priv(64) failed");
+ CYG_TEST_CHECK(0x0080 == io_base,
+ "cyg_pci_allocate_io_priv(64) size failed");
+ CYG_TEST_CHECK(0x0040 == io_assigned_addr,
+ "cyg_pci_allocate_io_priv(64) align failed");
+ // Size 256 (alignment required)
+ dev_info.base_size[0] = CYG_PCI_CFG_BAR_SPACE_IO | 0xffffff00;
+ CYG_TEST_CHECK(cyg_pci_allocate_io_priv(&dev_info, 0, &io_base,
+ &io_assigned_addr),
+ "cyg_pci_allocate_io_priv(256) failed");
+ CYG_TEST_CHECK(0x0200 == io_base,
+ "cyg_pci_allocate_io_priv(256) size failed");
+ CYG_TEST_CHECK(0x0100 == io_assigned_addr,
+ "cyg_pci_allocate_io_priv(256) align failed");
+
+ // Check allocation and alignment of MEM space
+ mem_base = 0x00000000;
+ // Size 16 (no alignment required)
+ dev_info.base_size[0] = CYG_PCI_CFG_BAR_SPACE_MEM | 0xfffffff0;
+ CYG_TEST_CHECK(cyg_pci_allocate_memory_priv(&dev_info, 0, &mem_base,
+ &mem_assigned_addr),
+ "cyg_pci_allocate_memory_priv(16) failed");
+ CYG_TEST_CHECK(0x00000010 == mem_base,
+ "cyg_pci_allocate_memory_priv(16) size failed");
+ CYG_TEST_CHECK(0x00000000 == mem_assigned_addr,
+ "cyg_pci_allocate_memory_priv(16) align failed");
+ // Size 64 (alignment required - <1MB)
+ dev_info.base_size[0] = (CYG_PCI_CFG_BAR_SPACE_MEM
+ | CYG_PRI_CFG_BAR_MEM_TYPE_1M
+ | 0xffffffc0);
+ CYG_TEST_CHECK(cyg_pci_allocate_memory_priv(&dev_info, 0, &mem_base,
+ &mem_assigned_addr),
+ "cyg_pci_allocate_memory_priv(64/<1MB) failed");
+ CYG_TEST_CHECK(0x00000080 == mem_base,
+ "cyg_pci_allocate_memory_priv(64/<1MB) size failed");
+ CYG_TEST_CHECK(0x00000040 == mem_assigned_addr,
+ "cyg_pci_allocate_memory_priv(64/<1MB) align failed");
+ // Size 1MB (alignment required)
+ dev_info.base_size[0] = CYG_PCI_CFG_BAR_SPACE_MEM | 0xfff00000;
+ CYG_TEST_CHECK(cyg_pci_allocate_memory_priv(&dev_info, 0, &mem_base,
+ &mem_assigned_addr),
+ "cyg_pci_allocate_memory_priv(1MB) failed");
+ CYG_TEST_CHECK(0x00200000 == mem_base,
+ "cyg_pci_allocate_memory_priv(1MB) size failed");
+ CYG_TEST_CHECK(0x00100000 == mem_assigned_addr,
+ "cyg_pci_allocate_memory_priv(1MB) align failed");
+ // Size 16MB (alignment required)
+ dev_info.base_size[0] = CYG_PCI_CFG_BAR_SPACE_MEM | 0xff000000;
+ CYG_TEST_CHECK(cyg_pci_allocate_memory_priv(&dev_info, 0, &mem_base,
+ &mem_assigned_addr),
+ "cyg_pci_allocate_memory_priv(16MB) failed");
+ CYG_TEST_CHECK(0x02000000 == mem_base,
+ "cyg_pci_allocate_memory_priv(16MB) size failed");
+ CYG_TEST_CHECK(0x01000000 == mem_assigned_addr,
+ "cyg_pci_allocate_memory_priv(16MB) align failed");
+ // Size 32 (no alignment required - <1MB - FAILS!)
+ // Note: When more clever allocation has been made for the bottom
+ // 1MB of PCI memory space, this test needs to be made more elaborate.
+ dev_info.base_size[0] = (CYG_PCI_CFG_BAR_SPACE_MEM
+ | CYG_PRI_CFG_BAR_MEM_TYPE_1M
+ | 0xffffffe0);
+ CYG_TEST_CHECK(!cyg_pci_allocate_memory_priv(&dev_info, 0, &mem_base,
+ &mem_assigned_addr),
+ "cyg_pci_allocate_memory_priv(32/<1MB) unexpectedly worked!");
+
+ // TBD: Check 64bit MEM allocation.
+
+ CYG_TEST_PASS_FINISH("pci2 test OK");
+}
+
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ cyg_thread_create(10, // Priority - just a number
+ (cyg_thread_entry_t*)pci_test, // entry
+ 0, //
+ "pci_thread", // Name
+ &stack[0], // Stack
+ CYGNUM_HAL_STACK_SIZE_TYPICAL, // Size
+ &thread_handle, // Handle
+ &thread_data // Thread data structure
+ );
+ cyg_thread_resume(thread_handle);
+ cyg_scheduler_start();
+}
+
+#else // CYGFUN_KERNEL_API_C && CYG_PCI_PRESENT
+#define N_A_MSG "Needs kernel C API & PCI platform support"
+#endif
+
+#else // CYGPKG_IO_PCI && CYGPKG_KERNEL
+#define N_A_MSG "Needs IO/PCI and Kernel"
+#endif
+
+#ifdef N_A_MSG
+void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG);
+}
+#endif // N_A_MSG
+
+// EOF pci1.c
diff --git a/cesar/ecos/packages/io/pci/current/tests/pcihdr.h b/cesar/ecos/packages/io/pci/current/tests/pcihdr.h
new file mode 100644
index 0000000000..52a24dc99f
--- /dev/null
+++ b/cesar/ecos/packages/io/pci/current/tests/pcihdr.h
@@ -0,0 +1,5719 @@
+#if 0
+PCIHDR.H: PCI Vendors, Devices, and Class Type information
+
+ Created automatically from the web using the following URL:
+ http://www.yourvote.com/pci
+ Software to create and maintain the PCICODE List written by:
+ Jim Boemler (jboemler@halcyon.com)
+
+ This header created on Thu, 13 Feb 2003 08:15:25 UTC
+
+Too many people have contributed to this list to acknowledge them all, but
+a few have provided the majority of the input and deserve special mention:
+ Frederic Potter, who maintains a list for Linux.
+ Chris Aston at Madge Networks.
+ Thomas Dippon of Hewlett-Packard GmbH.
+ Jurgen ("Josh") Thelen
+ William H. Avery III at Altitech
+ Sergei Shtylyov of Brain-dead Software in Russia
+#endif
+
+// NOTE that the 0xFFFF of 0xFF entries at the end of some tables below are
+// not properly list terminators, but are actually the printable definitions
+// of values that are legitimately found on the PCI bus. The size
+// definitions should be used for loop control when the table is searched.
+
+typedef struct _PCI_VENTABLE
+{
+ unsigned short VenId ;
+ char * VenShort ;
+ char * VenFull ;
+} PCI_VENTABLE, *PPCI_VENTABLE ;
+
+PCI_VENTABLE PciVenTable [] =
+{
+ { 0x0000, "Gammagraphx", "Gammagraphx, Inc." } ,
+ { 0x0033, "", "Paradyne Corp." } ,
+ { 0x003D, "Lockheed Martin", "Lockheed Martin Corp" } ,
+ { 0x0070, "Hauppauge", "Hauppauge Computer Works Inc." } ,
+ { 0x0100, "", "Ncipher Corp. Ltd" } ,
+ { 0x0123, "", "General Dynamics" } ,
+ { 0x0160, "USR", "us robotics" } ,
+ { 0x0315, "", "SK - Electronics Co., Ltd." } ,
+ { 0x0675, "Dynalink", "Dynalink" } ,
+ { 0x0700, "Lava", "Lava Computer MFG Inc." } ,
+ { 0x0815, "LinTech", "LinTech GmbH" } ,
+ { 0x0871, "Berkom", "Berkom" } ,
+ { 0x0914, "SDT", "Shanghai Dare Technologies Ltd." } ,
+ { 0x09C1, "Arris", "Arris" } ,
+ { 0x0A89, "BREA", "BREA Technologies Inc." } ,
+ { 0x0E11, "Compaq", "Compaq Computer Corp." } ,
+ { 0x1000, "LSI", "LSI Logic" } ,
+ { 0x1001, "KOLTER", "Kolter Electronic - Germany" } ,
+ { 0x1002, "ATI", "ATI Technologies" } ,
+ { 0x1003, "ULSI", "ULSI" } ,
+ { 0x1004, "VLSI", "VLSI Technology" } ,
+ { 0x1005, "Avance", "Avance Logic Inc." } ,
+ { 0x1006, "Reply", "Reply Group" } ,
+ { 0x1007, "NetFrame", "Netframe Systems Inc." } ,
+ { 0x1008, "Epson", "Epson" } ,
+ { 0x100A, "Phoenix", "Phoenix Technologies Ltd." } ,
+ { 0x100B, "NSC", "National Semiconductor" } ,
+ { 0x100C, "Tseng", "Tseng Labs" } ,
+ { 0x100D, "AST", "AST Research" } ,
+ { 0x100E, "Weitek", "Weitek" } ,
+ { 0x1010, "VLogic", "Video Logic Ltd." } ,
+ { 0x1011, "DEC", "Digital Equipment Corporation" } ,
+ { 0x1012, "Micronics", "Micronics Computers Inc." } ,
+ { 0x1013, "Cirrus", "Cirrus Logic" } ,
+ { 0x1014, "IBM", "International Business Machines Corp." } ,
+ { 0x1015, "LSIL", "LSI Logic Corp of Canada" } ,
+ { 0x1016, "Fujitsu ICL", "Fujitsu ICL Computers" } ,
+ { 0x1017, "Spea", "Spea Software AG" } ,
+ { 0x1018, "Unisys", "Unisys Systems" } ,
+ { 0x1019, "ECS", "Elitegroup Computer Sys" } ,
+ { 0x101A, "NCR", "NCR/AT&T GIS" } ,
+ { 0x101B, "Vitesse", "Vitesse Semiconductor" } ,
+ { 0x101C, "WDC", "Western Digital" } ,
+ { 0x101E, "AMI", "American Megatrends Inc." } ,
+ { 0x101F, "PictureTel", "PictureTel Corp." } ,
+ { 0x1020, "Hitachi", "Hitachi Computer Electronics" } ,
+ { 0x1021, "OKI", "Oki Electric Industry" } ,
+ { 0x1022, "AMD", "Advanced Micro Devices" } ,
+ { 0x1023, "Trident", "Trident Microsystems" } ,
+ { 0x1024, "Zenith", "Zenith Data Systems" } ,
+ { 0x1025, "Acer", "Acer Incorporated" } ,
+ { 0x1028, "Dell", "Dell Computer Corporation" } ,
+ { 0x1029, "Siem-Nix", "Siemens Nixdorf AG" } ,
+ { 0x102A, "LSI", "LSI Logic Headland Division" } ,
+ { 0x102B, "Matrox", "Matrox" } ,
+ { 0x102C, "C&T", "Asiliant (Chips And Technologies)" } ,
+ { 0x102D, "Wyse", "Wyse Technologies" } ,
+ { 0x102E, "Olivetti", "Olivetti Advanced Technology" } ,
+ { 0x102F, "Toshiba", "Toshiba America" } ,
+ { 0x1030, "TMC", "TMC Research" } ,
+ { 0x1031, "miro", "miro Computer Products AG" } ,
+ { 0x1032, "Compaq", "Compaq" } ,
+ { 0x1033, "NEC", "NEC Corporation" } ,
+ { 0x1034, "Burndy", "Burndy Corporation" } ,
+ { 0x1035, "C&CRL", "Computer&Communication Research Lab" } ,
+ { 0x1036, "FDomain", "Future Domain" } ,
+ { 0x1037, "Hitachi", "Hitachi Micro Systems Inc" } ,
+ { 0x1038, "AMP", "AMP Incorporated" } ,
+ { 0x1039, "SiS", "Silicon Integrated System" } ,
+ { 0x103A, "Seiko", "Seiko Epson Corporation" } ,
+ { 0x103B, "Tatung", "Tatung Corp. Of America" } ,
+ { 0x103C, "HP", "Hewlett-Packard Company" } ,
+ { 0x103E, "Solliday", "Solliday Engineering" } ,
+ { 0x103F, "Logic Mod.", "Logic Modeling" } ,
+ { 0x1040, "Kubota", "Kubota Pacific Computer Inc." } ,
+ { 0x1041, "Computrend", "Computrend" } ,
+ { 0x1042, "PC Tech.", "PC Technology Inc." } ,
+ { 0x1043, "Asustek", "Asustek Computer Inc." } ,
+ { 0x1044, "DPT", "Distributed Processing Tech" } ,
+ { 0x1045, "OPTi", "OPTi Inc." } ,
+ { 0x1046, "IPC", "IPC Corporation LTD" } ,
+ { 0x1047, "Genoa", "Genoa Systems Corp." } ,
+ { 0x1048, "ELSA", "ELSA GmbH" } ,
+ { 0x1049, "Fountain", "Fountain Technology" } ,
+ { 0x104A, "STM", "STMicroelectronics" } ,
+ { 0x104B, "Mylex", "Mylex Corporation" } ,
+ { 0x104C, "TI", "Texas Instruments" } ,
+ { 0x104D, "Sony", "Sony Corporation" } ,
+ { 0x104E, "Oak", "Oak Technology" } ,
+ { 0x104F, "Co-Time", "Co-Time Computer Ltd." } ,
+ { 0x1050, "Winbond", "Winbond Electronics Corp." } ,
+ { 0x1051, "Anigma", "Anigma Corp." } ,
+ { 0x1052, "Young", "Young Micro Systems" } ,
+ { 0x1053, "Young", "Young Micro Systems" } ,
+ { 0x1054, "Hitachi", "Hitachi Ltd" } ,
+ { 0x1055, "SMSC", "Standard Microsystems Corp." } ,
+ { 0x1056, "ICL", "ICL" } ,
+ { 0x1057, "Motorola", "Motorola" } ,
+ { 0x1058, "E&TR", "Electronics & Telecommunication Res" } ,
+ { 0x1059, "Kontron", "Kontron Canada" } ,
+ { 0x105A, "Promise", "Promise Technology" } ,
+ { 0x105B, "Foxconn", "Foxconn International Inc." } ,
+ { 0x105C, "Wipro", "Wipro Infotech Limited" } ,
+ { 0x105D, "Number-Nine", "Number Nine Visual Technology" } ,
+ { 0x105E, "Vtech", "Vtech Engineering Canada Ltd." } ,
+ { 0x105F, "Infotronic", "Infotronic America Inc." } ,
+ { 0x1060, "UMC", "United Microelectronics" } ,
+ { 0x1061, "8x8", "8x8 Inc." } ,
+ { 0x1062, "Maspar", "Maspar Computer Corp." } ,
+ { 0x1063, "OOA", "Ocean Office Automation" } ,
+ { 0x1064, "Alcatel", "Alcatel Cit" } ,
+ { 0x1065, "TM", "Texas Microsystems" } ,
+ { 0x1066, "Picopower", "Picopower Technology" } ,
+ { 0x1067, "Mitsubishi", "Mitsubishi Electronics" } ,
+ { 0x1068, "Div. Tech.", "Diversified Technology" } ,
+ { 0x1069, "Mylex", "IBM Corporation" } ,
+ { 0x106A, "Aten", "Aten Research Inc." } ,
+ { 0x106B, "Apple", "Apple Computer Inc." } ,
+ { 0x106C, "Hyundai", "Hyundai Electronics America" } ,
+ { 0x106D, "Sequent", "Sequent Computer Systems" } ,
+ { 0x106E, "DFI", "DFI Inc." } ,
+ { 0x106F, "CityGate", "City Gate Development LTD" } ,
+ { 0x1070, "Daewoo", "Daewoo Telecom Ltd." } ,
+ { 0x1071, "Mitac", "Mitac" } ,
+ { 0x1072, "GIT", "GIT Co. Ltd." } ,
+ { 0x1073, "Yamaha", "Yamaha Corporation" } ,
+ { 0x1074, "Nexgen", "Nexgen Microsystems" } ,
+ { 0x1075, "AIR", "Advanced Integration Research" } ,
+ { 0x1076, "Chaintech", "Chaintech Computer Co. Ltd." } ,
+ { 0x1077, "QLogic", "QLogic Corporation" } ,
+ { 0x1078, "Cyrix", "Cyrix Corporation" } ,
+ { 0x1079, "I-Bus", "I-Bus" } ,
+ { 0x107A, "Networth", "Networth" } ,
+ { 0x107B, "Gateway", "Gateway 2000" } ,
+ { 0x107C, "Goldstar", "Goldstar Co. Ltd." } ,
+ { 0x107D, "Leadtek", "Leadtek Research" } ,
+ { 0x107E, "Interphase", "Interphase Corporation" } ,
+ { 0x107F, "DTC", "Data Technology Corporation" } ,
+ { 0x1080, "Cypress", "Cypress Semiconductor" } ,
+ { 0x1081, "Radius Inc.", "Radius Inc." } ,
+ { 0x1082, "EFA", "EFA Corporation Of America" } ,
+ { 0x1083, "Forex", "Forex Computer Corporation" } ,
+ { 0x1084, "Parador", "Parador" } ,
+ { 0x1085, "Tulip", "Tulip Computers Int'l BV" } ,
+ { 0x1086, "J. Bond", "J. Bond Computer Systems" } ,
+ { 0x1087, "Cache", "Cache Computer" } ,
+ { 0x1088, "MS Son", "Microcomputer Systems (M) Son" } ,
+ { 0x1089, "DG", "Data General Corporation" } ,
+ { 0x108A, "Bit3", "SBS Operations" } ,
+ { 0x108C, "Oakleigh", "Oakleigh Systems Inc." } ,
+ { 0x108D, "Olicom", "Olicom" } ,
+ { 0x108E, "Sun", "Sun Microsystems" } ,
+ { 0x108F, "Systemsoft", "Systemsoft Corporation" } ,
+ { 0x1090, "Encore", "Encore Computer Corporation" } ,
+ { 0x1091, "Intergraph", "Intergraph Corporation" } ,
+ { 0x1092, "Diamond", "Diamond Computer Systems" } ,
+ { 0x1093, "Nat. Inst.", "National Instruments" } ,
+ { 0x1094, "FIC", "First Int'l Computers" } ,
+ { 0x1095, "Silicon Image", "Silicon Image, Inc." } ,
+ { 0x1096, "Alacron", "Alacron" } ,
+ { 0x1097, "Appian", "Appian Graphics" } ,
+ { 0x1098, "Quantum", "Quantum Designs Ltd." } ,
+ { 0x1099, "Samsung", "Samsung Electronics Co. Ltd." } ,
+ { 0x109A, "Packard-Bell", "Packard Bell" } ,
+ { 0x109B, "Gemlight", "Gemlight Computer Ltd." } ,
+ { 0x109C, "Megachips", "Megachips Corporation" } ,
+ { 0x109D, "Zida", "Zida Technologies Ltd." } ,
+ { 0x109E, "Brooktree", "Brooktree Corporation" } ,
+ { 0x109F, "Trigem", "Trigem Computer Inc." } ,
+ { 0x10A0, "Meidensha", "Meidensha Corporation" } ,
+ { 0x10A1, "Juko", "Juko Electronics Inc. Ltd." } ,
+ { 0x10A2, "Quantum", "Quantum Corporation" } ,
+ { 0x10A3, "Everex", "Everex Systems Inc." } ,
+ { 0x10A4, "Globe", "Globe Manufacturing Sales" } ,
+ { 0x10A5, "Racal", "Racal Interlan" } ,
+ { 0x10A6, "Informtech", "Informtech Industrial Ltd." } ,
+ { 0x10A7, "Benchmarq", "Benchmarq Microelectronics" } ,
+ { 0x10A8, "Sierra", "Sierra Semiconductor" } ,
+ { 0x10A9, "SG", "Silicon Graphics" } ,
+ { 0x10AA, "ACC", "ACC Microelectronics" } ,
+ { 0x10AB, "Digicom", "Digicom" } ,
+ { 0x10AC, "Honeywell", "Honeywell IASD" } ,
+ { 0x10AD, "Winbond", "Winbond Systems Labs" } ,
+ { 0x10AE, "Cornerstone", "Cornerstone Technology" } ,
+ { 0x10AF, "MCS", "Micro Computer Systems Inc." } ,
+ { 0x10B0, "CardExpert", "CardExpert Technology" } ,
+ { 0x10B1, "Cabletron", "Cabletron Systems Inc." } ,
+ { 0x10B2, "Raytheon", "Raytheon Company" } ,
+ { 0x10B3, "Databook", "Databook Inc." } ,
+ { 0x10B4, "STB", "STB Systems" } ,
+ { 0x10B5, "PLX", "PLX Technology" } ,
+ { 0x10B6, "Madge", "Madge Networks" } ,
+ { 0x10B7, "3Com", "3Com Corporation" } ,
+ { 0x10B8, "SMC", "Standard Microsystems Corporation" } ,
+ { 0x10B9, "ALi", "Acer Labs Inc." } ,
+ { 0x10BA, "Mitsubishi", "Mitsubishi Electronics Corp." } ,
+ { 0x10BB, "Dapha", "Dapha Electronics Corporation" } ,
+ { 0x10BC, "ALR", "Advanced Logic Research Inc." } ,
+ { 0x10BD, "Surecom", "Surecom Technology" } ,
+ { 0x10BE, "Tseng", "Tsenglabs International Corp." } ,
+ { 0x10BF, "MOST", "MOST Corp." } ,
+ { 0x10C0, "Boca", "Boca Research Inc." } ,
+ { 0x10C1, "ICM", "ICM Corp. Ltd." } ,
+ { 0x10C2, "Auspex", "Auspex Systems Inc." } ,
+ { 0x10C3, "Samsung", "Samsung Semiconductors" } ,
+ { 0x10C4, "Award", "Award Software Int'l Inc." } ,
+ { 0x10C5, "Xerox", "Xerox Corporation" } ,
+ { 0x10C6, "Rambus", "Rambus Inc." } ,
+ { 0x10C7, "Media Vision", "Media Vision" } ,
+ { 0x10C8, "Neomagic", "Neomagic Corporation" } ,
+ { 0x10C9, "Dataexpert", "Dataexpert Corporation" } ,
+ { 0x10CA, "Fujitsu", "Fujitsu" } ,
+ { 0x10CB, "Omron", "Omron Corporation" } ,
+ { 0x10CC, "MAI", "Mai Logic Incorporated" } ,
+ { 0x10CD, "AdvanSys", "Advanced System Products" } ,
+ { 0x10CE, "Radius", "Radius Inc." } ,
+ { 0x10CF, "Fujitsu", "Fujitsu Ltd." } ,
+ { 0x10D0, "Fujitsu", "Fujitsu Limited" } ,
+ { 0x10D1, "Future+", "Future+ Systems" } ,
+ { 0x10D2, "Molex", "Molex Incorporated" } ,
+ { 0x10D3, "Jabil", "Jabil Circuit Inc." } ,
+ { 0x10D4, "Hualon", "Hualon Microelectronics" } ,
+ { 0x10D5, "Autologic", "Autologic Inc." } ,
+ { 0x10D6, "Cetia", "Cetia" } ,
+ { 0x10D7, "BCM", "BCM Advanced Research" } ,
+ { 0x10D8, "APL", "Advanced Peripherals Labs" } ,
+ { 0x10D9, "Macronix", "Macronix International Co. Ltd." } ,
+ { 0x10DA, "T-C", "Thomas-Conrad Corporation" } ,
+ { 0x10DB, "Rohm", "Rohm Research" } ,
+ { 0x10DC, "CERN", "CERN-European Lab. for Particle Physics" } ,
+ { 0x10DD, "E&S", "Evans & Sutherland" } ,
+ { 0x10DE, "NVIDIA", "NVIDIA Corporation" } ,
+ { 0x10DF, "Emulex", "Emulex Corporation" } ,
+ { 0x10E0, "IMS", "Integrated Micro Solutions" } ,
+ { 0x10E1, "Tekram", "Tekram Technology Corp. Ltd." } ,
+ { 0x10E2, "Aptix", "Aptix Corporation" } ,
+ { 0x10E3, "Tundra", "Tundra Semiconductor Corp." } ,
+ { 0x10E4, "Tandem", "Tandem Computers" } ,
+ { 0x10E5, "MIC", "Micro Industries Corporation" } ,
+ { 0x10E6, "Gainbery", "Gainbery Computer Products Inc." } ,
+ { 0x10E7, "Vadem", "Vadem" } ,
+ { 0x10E8, "AMCC", "Applied Micro Circuits Corp." } ,
+ { 0x10E9, "Alps", "Alps Electronic Corp. Ltd." } ,
+ { 0x10EA, "Tvia", "Tvia, Inc." } ,
+ { 0x10EB, "Artist", "Artist Graphics" } ,
+ { 0x10EC, "Realtek", "Realtek Semiconductor" } ,
+ { 0x10ED, "Ascii", "Ascii Corporation" } ,
+ { 0x10EE, "Xilinx", "Xilinx Corporation" } ,
+ { 0x10EF, "Racore", "Racore Computer Products" } ,
+ { 0x10F0, "Peritek", "Peritek Corporation" } ,
+ { 0x10F1, "Tyan", "Tyan Computer" } ,
+ { 0x10F2, "Achme", "Achme Computer Inc." } ,
+ { 0x10F3, "Alaris", "Alaris Inc." } ,
+ { 0x10F4, "S-Mos", "S-Mos Systems" } ,
+ { 0x10F5, "NKK", "NKK Corporation" } ,
+ { 0x10F6, "Creative", "Creative Electronic Systems SA" } ,
+ { 0x10F7, "Matsushita", "Matsushita Electric Industrial Corp." } ,
+ { 0x10F8, "Altos", "Altos India Ltd." } ,
+ { 0x10F9, "PC-Direct", "PC Direct" } ,
+ { 0x10FA, "Truevision", "Truevision" } ,
+ { 0x10FB, "Thesys", "Thesys Microelectronic's" } ,
+ { 0x10FC, "I-O", "I-O Data Device Inc." } ,
+ { 0x10FD, "Soyo", "Soyo Technology Corp. Ltd." } ,
+ { 0x10FE, "Fast", "Fast Electronic GmbH" } ,
+ { 0x10FF, "Ncube", "Ncube" } ,
+ { 0x1100, "Jazz", "Jazz Multimedia" } ,
+ { 0x1101, "Initio", "Initio Corporation" } ,
+ { 0x1102, "Creative Labs", "Creative Labs" } ,
+ { 0x1103, "HighPoint", "HighPoint Technologies Inc." } ,
+ { 0x1104, "Rasterops", "Rasterops" } ,
+ { 0x1105, "Sigma", "Sigma Designs Inc." } ,
+ { 0x1106, "VIA", "VIA Technologies Inc" } ,
+ { 0x1107, "Stratus", "Stratus Computer" } ,
+ { 0x1108, "Proteon", "Proteon Inc." } ,
+ { 0x1109, "Cogent", "Adaptec/Cogent Data Technologies" } ,
+ { 0x110A, "Infineon", "Infineon Technologies" } ,
+ { 0x110B, "Chromatic", "Chromatic Research Inc" } ,
+ { 0x110C, "Mini-Max", "Mini-Max Technology Inc." } ,
+ { 0x110D, "ZNYX", "ZNYX Corporation" } ,
+ { 0x110E, "CPU Tech.", "CPU Technology" } ,
+ { 0x110F, "Ross", "Ross Technology" } ,
+ { 0x1110, "Powerhouse", "Powerhouse Systems" } ,
+ { 0x1111, "SCO", "SCO Group" } ,
+ { 0x1112, "Osicom", "Osicom Technologies Inc." } ,
+ { 0x1113, "Accton", "Accton Technology Corporation" } ,
+ { 0x1114, "Atmel", "Atmel Corp." } ,
+ { 0x1115, "Dupont", "Dupont Pixel Systems Ltd." } ,
+ { 0x1116, "Media 100", "Media 100, Inc." } ,
+ { 0x1117, "Datacube", "Datacube Inc." } ,
+ { 0x1118, "Berg", "Berg Electronics" } ,
+ { 0x1119, "Vortex", "ICP vortex Computersysteme GmbH" } ,
+ { 0x111A, "Eff. Net.", "Efficent Networks" } ,
+ { 0x111B, "Teledyne", "Teledyne Electronic Systems" } ,
+ { 0x111C, "Tricord", "Tricord Systems Inc." } ,
+ { 0x111D, "IDT", "Integrated Device Technology Inc." } ,
+ { 0x111E, "Eldec", "Eldec Corp." } ,
+ { 0x111F, "PDI", "Precision Digital Images" } ,
+ { 0x1120, "EMC", "EMC Corp." } ,
+ { 0x1121, "Zilog", "Zilog" } ,
+ { 0x1122, "Multi-Tech", "Multi-Tech Systems Inc." } ,
+ { 0x1123, "EDI", "Excellent Design Inc." } ,
+ { 0x1124, "Leutron", "Leutron Vision AG" } ,
+ { 0x1125, "Eurocore", "Eurocore/Vigra" } ,
+ { 0x1126, "Vigra", "Vigra" } ,
+ { 0x1127, "FORE", "FORE Systems" } ,
+ { 0x1129, "Firmworks", "Firmworks" } ,
+ { 0x112A, "Hermes", "Hermes Electronics Co. Ltd." } ,
+ { 0x112B, "Linotype", "Linotype - Hell AG" } ,
+ { 0x112C, "Zenith", "Zenith Data Systems" } ,
+ { 0x112D, "Ravicad", "Ravicad" } ,
+ { 0x112E, "Infomedia", "Infomedia" } ,
+ { 0x112F, "ImagTech", "Imaging Technology" } ,
+ { 0x1130, "Computervision", "Computervision" } ,
+ { 0x1131, "Philips", "Philips Semiconductors" } ,
+ { 0x1132, "Mitel", "Mitel Corp." } ,
+ { 0x1133, "EIC", "Eicon Networks Corporation" } ,
+ { 0x1134, "MCS", "Mercury Computer Systems Inc." } ,
+ { 0x1135, "Fuji", "Fuji Xerox Co Ltd" } ,
+ { 0x1136, "Momentum", "Momentum Data Systems" } ,
+ { 0x1137, "Cisco", "Cisco Systems Inc" } ,
+ { 0x1138, "Ziatech", "Ziatech Corporation" } ,
+ { 0x1139, "Dyn. Pict.", "Dynamic Pictures Inc" } ,
+ { 0x113A, "FWB", "FWB Inc" } ,
+ { 0x113B, "NCD", "Network Computing Devices" } ,
+ { 0x113C, "Cyclone", "Cyclone Microsystems Inc." } ,
+ { 0x113D, "Leading Edge", "Leading Edge Products Inc" } ,
+ { 0x113E, "Sanyo", "Sanyo Electric Co" } ,
+ { 0x113F, "Equinox", "Equinox Systems" } ,
+ { 0x1140, "Intervoice", "Intervoice Inc" } ,
+ { 0x1141, "Crest", "Crest Microsystem Inc" } ,
+ { 0x1142, "Alliance", "Alliance Semiconductor CA - USA" } ,
+ { 0x1143, "Netpower", "Netpower Inc" } ,
+ { 0x1144, "Cinn. Mil.", "Cincinnati Milacron" } ,
+ { 0x1145, "Workbit", "Workbit Corp" } ,
+ { 0x1146, "Force", "Force Computers" } ,
+ { 0x1147, "Interface", "Interface Corp" } ,
+ { 0x1148, "S&K", "Schneider & Koch" } ,
+ { 0x1149, "Win System", "Win System Corporation" } ,
+ { 0x114A, "VMIC", "VMIC" } ,
+ { 0x114B, "Canopus", "Canopus Co. Ltd" } ,
+ { 0x114C, "Annabooks", "Annabooks" } ,
+ { 0x114D, "IC Corp.", "IC Corporation" } ,
+ { 0x114E, "Nikon", "Nikon Systems Inc" } ,
+ { 0x114F, "Digi", "Digi International" } ,
+ { 0x1150, "TMC", "Thinking Machines Corporation" } ,
+ { 0x1151, "JAE", "JAE Electronics Inc." } ,
+ { 0x1152, "Megatek", "Megatek" } ,
+ { 0x1153, "Land Win", "Land Win Electronic Corp" } ,
+ { 0x1154, "Melco", "Melco Inc" } ,
+ { 0x1155, "Pine", "Pine Technology Ltd" } ,
+ { 0x1156, "Periscope", "Periscope Engineering" } ,
+ { 0x1157, "Avsys", "Avsys Corporation" } ,
+ { 0x1158, "Voarx", "Voarx R&D Inc" } ,
+ { 0x1159, "Mutech", "Mutech" } ,
+ { 0x115A, "Harlequin", "Harlequin Ltd" } ,
+ { 0x115B, "Parallax", "Parallax Graphics" } ,
+ { 0x115C, "Photron", "Photron Ltd." } ,
+ { 0x115D, "Xircom", "Xircom" } ,
+ { 0x115E, "Peer", "Peer Protocols Inc" } ,
+ { 0x115F, "Maxtor", "Maxtor Corporation" } ,
+ { 0x1160, "Megasoft", "Megasoft Inc" } ,
+ { 0x1161, "PFU", "PFU Ltd" } ,
+ { 0x1162, "OA Lab", "OA Laboratory Co Ltd" } ,
+ { 0x1163, "Rendition", "Rendition Inc" } ,
+ { 0x1164, "APT", "Advanced Peripherals Tech" } ,
+ { 0x1165, "Imagraph", "Imagraph Corporation" } ,
+ { 0x1166, "RCC/ServerWorks", "Reliance Computer Corp./ServerWorks" } ,
+ { 0x1167, "Mutoh", "Mutoh Industries Inc" } ,
+ { 0x1168, "Thine", "Thine Electronics Inc" } ,
+ { 0x1169, "CDAC", "Centre f/Dev. of Adv. Computing" } ,
+ { 0x116A, "Polaris", "Polaris Communications" } ,
+ { 0x116B, "Connectware", "Connectware Inc" } ,
+ { 0x116C, "Int Res.", "Intelligent Resources" } ,
+ { 0x116E, "EFI", "Electronics for Imaging" } ,
+ { 0x116F, "WkSta. Tech.", "Workstation Technology" } ,
+ { 0x1170, "Inventec", "Inventec Corporation" } ,
+ { 0x1171, "Lough. Sound", "Loughborough Sound Images" } ,
+ { 0x1172, "Altera", "Altera Corporation" } ,
+ { 0x1173, "Adobe", "Adobe Systems" } ,
+ { 0x1174, "Bridgeport", "Bridgeport Machines" } ,
+ { 0x1175, "Mitron", "Mitron Computer Inc." } ,
+ { 0x1176, "SBE", "SBE" } ,
+ { 0x1177, "Silicon Eng.", "Silicon Engineering" } ,
+ { 0x1178, "Alfa", "Alfa Inc" } ,
+ { 0x1179, "Toshiba", "Toshiba America Info Systems" } ,
+ { 0x117A, "A-Trend", "A-Trend Technology" } ,
+ { 0x117B, "LG Elec.", "LG Electronics Inc." } ,
+ { 0x117C, "Atto", "Atto Technology" } ,
+ { 0x117D, "B&D", "Becton & Dickinson" } ,
+ { 0x117E, "T/R", "T/R Systems" } ,
+ { 0x117F, "ICS", "Integrated Circuit Systems" } ,
+ { 0x1180, "CAC", "Communication Automation Corporation" } ,
+ { 0x1181, "Telmatics", "Telmatics International" } ,
+ { 0x1183, "Fujikura", "Fujikura Ltd" } ,
+ { 0x1184, "Forks", "Forks Inc" } ,
+ { 0x1185, "Dataworld", "Dataworld" } ,
+ { 0x1186, "D-Link", "D-Link System Inc" } ,
+ { 0x1187, "ATL", "Advanced Technology Laboratories" } ,
+ { 0x1188, "Shima", "Shima Seiki Manufacturing Ltd." } ,
+ { 0x1189, "Matsushita", "Matsushita Electronics" } ,
+ { 0x118A, "Hilevel", "Hilevel Technology" } ,
+ { 0x118B, "Hypertec", "Hypertec Pty Ltd" } ,
+ { 0x118C, "Corollary", "Corollary Inc" } ,
+ { 0x118D, "BitFlow", "BitFlow Inc" } ,
+ { 0x118E, "Hermstedt", "Hermstedt AG" } ,
+ { 0x118F, "Green", "Green Logic" } ,
+ { 0x1190, "Tripace", "Tripace" } ,
+ { 0x1191, "ACARD", "ACARD Technology" } ,
+ { 0x1192, "Densan", "Densan Co. Ltd" } ,
+ { 0x1193, "Zeitnet", "Zeitnet Inc." } ,
+ { 0x1194, "Toucan", "Toucan Technology" } ,
+ { 0x1195, "Ratoc", "Ratoc System Inc" } ,
+ { 0x1196, "Hytec", "Hytec Electronics Ltd" } ,
+ { 0x1197, "Gage", "Gage Applied Sciences Inc." } ,
+ { 0x1198, "Lambda", "Lambda Systems Inc" } ,
+ { 0x1199, "Attachmate", "Attachmate Corp." } ,
+ { 0x119A, "Mind Share", "Mind Share Inc." } ,
+ { 0x119B, "Omega", "Omega Micro Inc." } ,
+ { 0x119C, "ITI", "Information Technology Inst." } ,
+ { 0x119D, "Bug", "Bug Sapporo Japan" } ,
+ { 0x119E, "Fujitsu", "Fujitsu Microelectronics Ltd." } ,
+ { 0x119F, "Bull", "Bull Hn Information Systems" } ,
+ { 0x11A0, "Convex", "Convex Computer Corporation" } ,
+ { 0x11A1, "Hamamatsu", "Hamamatsu Photonics K.K." } ,
+ { 0x11A2, "Sierra", "Sierra Research and Technology" } ,
+ { 0x11A3, "Deuretzbacher", "Deuretzbacher GmbH & Co. Eng. KG" } ,
+ { 0x11A4, "Barco", "Barco" } ,
+ { 0x11A5, "MicroUnity", "MicroUnity Systems Engineering Inc." } ,
+ { 0x11A6, "Pure Data", "Pure Data" } ,
+ { 0x11A7, "Power Comp.", "Power Computing Corp." } ,
+ { 0x11A8, "Systech", "Systech Corp." } ,
+ { 0x11A9, "InnoSys", "InnoSys Inc." } ,
+ { 0x11AA, "Actel", "Actel" } ,
+ { 0x11AB, "Marvell", "Marvell Semiconductor, Inc." } ,
+ { 0x11AC, "Canon", "Canon Information Systems" } ,
+ { 0x11AD, "Lite-On", "Lite-On Communications Inc" } ,
+ { 0x11AE, "Scitex", "Scitex Corporation Ltd" } ,
+ { 0x11AF, "Avid", "Avid Technology Inc." } ,
+ { 0x11B0, "V3", "V3 Semiconductor Inc." } ,
+ { 0x11B1, "Apricot", "Apricot Computers" } ,
+ { 0x11B2, "Kodak", "Eastman Kodak" } ,
+ { 0x11B3, "Barr", "Barr Systems Inc." } ,
+ { 0x11B4, "Leitch", "Leitch Technology International" } ,
+ { 0x11B5, "Radstone", "Radstone Technology Plc" } ,
+ { 0x11B6, "United Video", "United Video Corp" } ,
+ { 0x11B7, "Motorola", "Motorola" } ,
+ { 0x11B8, "Xpoint", "Xpoint Technologies Inc" } ,
+ { 0x11B9, "Pathlight", "Pathlight Technology Inc." } ,
+ { 0x11BA, "Videotron", "Videotron Corp" } ,
+ { 0x11BB, "Pyramid", "Pyramid Technology" } ,
+ { 0x11BC, "Net. Periph.", "Network Peripherals Inc" } ,
+ { 0x11BD, "Pinnacle", "Pinnacle Systems Inc." } ,
+ { 0x11BE, "IMI", "International Microcircuits Inc" } ,
+ { 0x11BF, "Astrodesign", "Astrodesign Inc." } ,
+ { 0x11C0, "H-P", "Hewlett-Packard" } ,
+ { 0x11C1, "Agere", "Agere Systems" } ,
+ { 0x11C2, "Sand", "Sand Microelectronics" } ,
+ { 0x11C3, "NEC", "NEC Corporation" } ,
+ { 0x11C4, "Doc. Tech.", "Document Technologies Ind." } ,
+ { 0x11C5, "Shiva", "Shiva Corporatin" } ,
+ { 0x11C6, "Dainippon", "Dainippon Screen Mfg. Co" } ,
+ { 0x11C7, "D.C.M.", "D.C.M. Data Systems" } ,
+ { 0x11C8, "Dolphin", "Dolphin Interconnect Solutions" } ,
+ { 0x11C9, "MAGMA", "MAGMA" } ,
+ { 0x11CA, "LSI Sys.", "LSI Systems Inc" } ,
+ { 0x11CB, "Specialix", "Specialix International Ltd." } ,
+ { 0x11CC, "M&K", "Michels & Kleberhoff Computer GmbH" } ,
+ { 0x11CD, "HAL", "HAL Computer Systems Inc." } ,
+ { 0x11CE, "PRI", "Primary Rate Inc" } ,
+ { 0x11CF, "PEC", "Pioneer Electronic Corporation" } ,
+ { 0x11D0, "BAE", "BAE SYSTEMS - Manassas" } ,
+ { 0x11D1, "AuraVision", "AuraVision Corporation" } ,
+ { 0x11D2, "Intercom", "Intercom Inc." } ,
+ { 0x11D3, "Trancell", "Trancell Systems Inc" } ,
+ { 0x11D4, "ADI", "Analog Devices, Inc." } ,
+ { 0x11D5, "Ikon", "Ikon Corp" } ,
+ { 0x11D6, "Tekelec", "Tekelec Technologies" } ,
+ { 0x11D7, "Trenton", "Trenton Terminals Inc" } ,
+ { 0x11D8, "ITD", "Image Technologies Development" } ,
+ { 0x11D9, "Tec", "Tec Corporation" } ,
+ { 0x11DA, "Novell", "Novell" } ,
+ { 0x11DB, "Sega", "Sega Enterprises Ltd" } ,
+ { 0x11DC, "Questra", "Questra Corp" } ,
+ { 0x11DD, "Crosfield", "Crosfield Electronics Ltd" } ,
+ { 0x11DE, "Zoran", "Zoran Corporation" } ,
+ { 0x11DF, "New Wave", "New Wave Pdg" } ,
+ { 0x11E0, "Cray", "Cray Communications A/S" } ,
+ { 0x11E1, "Gec Plessey", "Gec Plessey Semi Inc" } ,
+ { 0x11E2, "Samsung", "Samsung Information Systems America" } ,
+ { 0x11E3, "Quicklogic", "Quicklogic Corp" } ,
+ { 0x11E4, "Second Wave", "Second Wave Inc" } ,
+ { 0x11E5, "IIX", "IIX Consulting" } ,
+ { 0x11E6, "Mitsui", "Mitsui-Zosen System Research" } ,
+ { 0x11E7, "Toshiba", "Toshiba America Elec. Co" } ,
+ { 0x11E8, "DPSI", "Digital Processing Systems Inc" } ,
+ { 0x11E9, "Highwater", "Highwater Designs Ltd" } ,
+ { 0x11EA, "Elsag", "Elsag Bailey" } ,
+ { 0x11EB, "Formation", "Formation, Inc" } ,
+ { 0x11EC, "Coreco", "Coreco Inc" } ,
+ { 0x11ED, "Mediamatics", "Mediamatics" } ,
+ { 0x11EE, "Dome", "Dome Imaging Systems Inc" } ,
+ { 0x11EF, "Nicolet", "Nicolet Technologies BV" } ,
+ { 0x11F0, "Compu-Shack", "Compu-Shack GmbH" } ,
+ { 0x11F1, "Symbios", "Symbios Logic Inc" } ,
+ { 0x11F2, "Pic-Tel", "Picture Tel Japan KK" } ,
+ { 0x11F3, "Keithley", "Keithley Metrabyte" } ,
+ { 0x11F4, "Kinetic", "Kinetic Systems Corporation" } ,
+ { 0x11F5, "Comp Dev", "Computing Devices Intl" } ,
+ { 0x11F6, "Powermatic", "Powermatic Data Systems Ltd" } ,
+ { 0x11F7, "S-A", "Scientific Atlanta" } ,
+ { 0x11F8, "PMC-Sierra", "PMC-Sierra Inc." } ,
+ { 0x11F9, "I-Cube", "I-Cube Inc" } ,
+ { 0x11FA, "Kasan", "Kasan Electronics Co Ltd" } ,
+ { 0x11FB, "Datel", "Datel Inc" } ,
+ { 0x11FC, "Silicon Magic", "Silicon Magic" } ,
+ { 0x11FD, "High Street", "High Street Consultants" } ,
+ { 0x11FE, "Comtrol", "Comtrol Corp" } ,
+ { 0x11FF, "Scion", "Scion Corp" } ,
+ { 0x1200, "CSS", "CSS Corp" } ,
+ { 0x1201, "Vista", "Vista Controls Corp" } ,
+ { 0x1202, "Network Gen", "Network General Corp" } ,
+ { 0x1203, "Agfa", "Bayer Corporation Agfa Div" } ,
+ { 0x1204, "Lattice", "Lattice Semiconductor Corp" } ,
+ { 0x1205, "Array", "Array Corp" } ,
+ { 0x1206, "Amdahl", "Amdahl Corp" } ,
+ { 0x1208, "Parsytec", "Parsytec GmbH" } ,
+ { 0x1209, "Sci Sys", "Sci Systems Inc" } ,
+ { 0x120A, "Synaptel", "Synaptel" } ,
+ { 0x120B, "Adaptive", "Adaptive Solutions" } ,
+ { 0x120D, "Comp Labs", "Compression Labs Inc." } ,
+ { 0x120E, "Cyclades", "Cyclades Corporation" } ,
+ { 0x120F, "Essential", "Essential Communications" } ,
+ { 0x1210, "Hyperparallel", "Hyperparallel Technologies" } ,
+ { 0x1211, "Braintech", "Braintech Inc" } ,
+ { 0x1212, "Kingston", "Kingston Technology Corp" } ,
+ { 0x1213, "AISI", "Applied Intelligent Systems Inc" } ,
+ { 0x1214, "Perf Tech", "Performance Technologies Inc" } ,
+ { 0x1215, "Interware", "Interware Co Ltd" } ,
+ { 0x1216, "Purup Eskofot", "Purup-Eskofot A/S" } ,
+ { 0x1217, "O2Micro", "O2Micro Inc" } ,
+ { 0x1218, "Hybricon", "Hybricon Corp" } ,
+ { 0x1219, "First Virtual", "First Virtual Corp" } ,
+ { 0x121A, "3dfx", "3dfx Interactive Inc" } ,
+ { 0x121B, "ATM", "Advanced Telecommunications Modules" } ,
+ { 0x121C, "Nippon Texa", "Nippon Texa Co Ltd" } ,
+ { 0x121D, "Lippert", "Lippert Automationstechnik GmbH" } ,
+ { 0x121E, "CSPI", "CSPI" } ,
+ { 0x121F, "Arcus", "Arcus Technology Inc" } ,
+ { 0x1220, "Ariel", "Ariel Corporation" } ,
+ { 0x1221, "Contec", "Contec Co Ltd" } ,
+ { 0x1222, "Ancor", "Ancor Communications Inc" } ,
+ { 0x1223, "Heurikon", "Heurikon/Computer Products" } ,
+ { 0x1224, "Int. Img.", "Interactive Images" } ,
+ { 0x1225, "Power IO", "Power I/O Inc." } ,
+ { 0x1227, "Tech-Source", "Tech-Source" } ,
+ { 0x1228, "Norsk", "Norsk Elektro Optikk A/S" } ,
+ { 0x1229, "Data Kin", "Data Kinesis Inc." } ,
+ { 0x122A, "Int. Telecom", "Integrated Telecom" } ,
+ { 0x122B, "LG Ind.", "LG Industrial Systems Co. Ltd." } ,
+ { 0x122C, "sci-worx", "sci-worx GmbH" } ,
+ { 0x122D, "Aztech", "Aztech System Ltd" } ,
+ { 0x122E, "Xyratex", "Xyratex" } ,
+ { 0x122F, "Andrew", "Andrew Corp." } ,
+ { 0x1230, "Fishcamp", "Fishcamp Engineering" } ,
+ { 0x1231, "WMI", "Woodward McCoach Inc." } ,
+ { 0x1232, "GPT", "GPT Ltd." } ,
+ { 0x1233, "Bus-Tech", "Bus-Tech Inc." } ,
+ { 0x1234, "Technical", "Technical Corp" } ,
+ { 0x1235, "Risq Mod", "Risq Modular Systems Inc." } ,
+ { 0x1236, "Sigma Designs", "Sigma Designs, Inc" } ,
+ { 0x1237, "Alta Tech", "Alta Technology Corp." } ,
+ { 0x1238, "Adtran", "Adtran" } ,
+ { 0x1239, "3DO", "The 3DO Company" } ,
+ { 0x123A, "Visicom", "Visicom Laboratories Inc." } ,
+ { 0x123B, "Seeq", "Seeq Technology Inc." } ,
+ { 0x123C, "Century Sys", "Century Systems Inc." } ,
+ { 0x123D, "EDT", "Engineering Design Team Inc." } ,
+ { 0x123F, "C-Cube", "C-Cube Microsystems" } ,
+ { 0x1240, "Marathon", "Marathon Technologies Corp." } ,
+ { 0x1241, "DSC", "DSC Communications" } ,
+ { 0x1242, "JNI", "JNI Corporation" } ,
+ { 0x1243, "Delphax", "Delphax" } ,
+ { 0x1244, "AVM", "AVM AUDIOVISUELLES MKTG & Computer GmbH" } ,
+ { 0x1245, "APD", "APD S.A." } ,
+ { 0x1246, "Dipix", "Dipix Technologies Inc" } ,
+ { 0x1247, "Xylon", "Xylon Research Inc." } ,
+ { 0x1248, "Central Data", "Central Data Corp." } ,
+ { 0x1249, "Samsung", "Samsung Electronics Co. Ltd." } ,
+ { 0x124A, "AEG", "AEG Electrocom GmbH" } ,
+ { 0x124B, "GreenSpring", "GreenSpring Computers" } ,
+ { 0x124C, "Solitron", "Solitron Technologies Inc." } ,
+ { 0x124D, "Stallion", "Stallion Technologies" } ,
+ { 0x124E, "Cylink", "Cylink" } ,
+ { 0x124F, "Infortrend", "Infortrend Technology Inc" } ,
+ { 0x1250, "Hitachi", "Hitachi Microcomputer System Ltd." } ,
+ { 0x1251, "VLSI Sol.", "VLSI Solution OY" } ,
+ { 0x1253, "Guzik", "Guzik Technical Enterprises" } ,
+ { 0x1254, "Linear Systems", "Linear Systems Ltd." } ,
+ { 0x1255, "Optibase", "Optibase Ltd." } ,
+ { 0x1256, "Perceptive", "Perceptive Solutions Inc." } ,
+ { 0x1257, "Vertex", "Vertex Networks Inc." } ,
+ { 0x1258, "Gilbarco", "Gilbarco Inc." } ,
+ { 0x1259, "Allied Tsyn", "Allied Telesyn International" } ,
+ { 0x125A, "ABB Pwr", "ABB Power Systems" } ,
+ { 0x125B, "Asix", "Asix Electronics Corp." } ,
+ { 0x125C, "Aurora", "Aurora Technologies Inc." } ,
+ { 0x125D, "ESS", "ESS Technology" } ,
+ { 0x125E, "Specvideo", "Specialvideo Engineering SRL" } ,
+ { 0x125F, "Concurrent", "Concurrent Technologies Inc." } ,
+ { 0x1260, "Intersil", "Intersil Corporation" } ,
+ { 0x1261, "Matsushita", "Matsushita-Kotobuki Electronics Indu" } ,
+ { 0x1262, "ES Comp.", "ES Computer Co. Ltd." } ,
+ { 0x1263, "Sonic Sol.", "Sonic Solutions" } ,
+ { 0x1264, "Aval Nag.", "Aval Nagasaki Corp." } ,
+ { 0x1265, "Casio", "Casio Computer Co. Ltd." } ,
+ { 0x1266, "Microdyne", "Microdyne Corp." } ,
+ { 0x1267, "SA Telecom", "S.A. Telecommunications" } ,
+ { 0x1268, "Tektronix", "Tektronix" } ,
+ { 0x1269, "Thomson-CSF", "Thomson-CSF/TTM" } ,
+ { 0x126A, "Lexmark", "Lexmark International Inc." } ,
+ { 0x126B, "Adax", "Adax Inc." } ,
+ { 0x126C, "Nortel", "Nortel Networks Corp." } ,
+ { 0x126D, "Splash", "Splash Technology Inc." } ,
+ { 0x126E, "Sumitomo", "Sumitomo Metal Industries Ltd." } ,
+ { 0x126F, "Sil Motion", "Silicon Motion" } ,
+ { 0x1270, "Olympus", "Olympus Optical Co. Ltd." } ,
+ { 0x1271, "GW Instr.", "GW Instruments" } ,
+ { 0x1272, "Telematics", "Telematics International" } ,
+ { 0x1273, "Hughes", "Hughes Network Systems" } ,
+ { 0x1274, "Ensoniq", "Ensoniq" } ,
+ { 0x1275, "NetApp", "Network Appliance" } ,
+ { 0x1276, "Sw Net Tech", "Switched Network Technologies Inc." } ,
+ { 0x1277, "Comstream", "Comstream" } ,
+ { 0x1278, "Transtech", "Transtech Parallel Systems" } ,
+ { 0x1279, "Transmeta", "Transmeta Corp." } ,
+ { 0x127A, "Conexant", "Conexant Systems" } ,
+ { 0x127B, "Pixera", "Pixera Corp" } ,
+ { 0x127C, "Crosspoint", "Crosspoint Solutions Inc." } ,
+ { 0x127D, "Vela Res", "Vela Research" } ,
+ { 0x127E, "Winnow", "Winnov L.P." } ,
+ { 0x127F, "Fujifilm", "Fujifilm" } ,
+ { 0x1280, "Photoscript", "Photoscript Group Ltd." } ,
+ { 0x1281, "Yokogawa", "Yokogawa Electronic Corp." } ,
+ { 0x1282, "Davicom", "Davicom Semiconductor Inc." } ,
+ { 0x1283, "ITExpress", "Integrated Technology Express Inc." } ,
+ { 0x1284, "Sahara", "Sahara Networks Inc." } ,
+ { 0x1285, "Plat Tech", "Platform Technologies Inc." } ,
+ { 0x1286, "Mazet", "Mazet GmbH" } ,
+ { 0x1287, "LuxSonor", "LuxSonor Inc." } ,
+ { 0x1288, "Timestep", "Timestep Corp." } ,
+ { 0x1289, "AVC Tech", "AVC Technology Inc." } ,
+ { 0x128A, "Asante", "Asante Technologies Inc." } ,
+ { 0x128B, "Transwitch", "Transwitch Corp." } ,
+ { 0x128C, "Retix", "Retix Corp." } ,
+ { 0x128D, "G2 Net", "G2 Networks Inc." } ,
+ { 0x128E, "Samho", "Samho Multi Tech Ltd." } ,
+ { 0x128F, "Tateno", "Tateno Dennou Inc." } ,
+ { 0x1290, "Sord", "Sord Computer Corp." } ,
+ { 0x1291, "NCS Comp", "NCS Computer Italia" } ,
+ { 0x1292, "Tritech", "Tritech Microelectronics Intl PTE" } ,
+ { 0x1293, "M Reality", "Media Reality Technology" } ,
+ { 0x1294, "Rhetorex", "Rhetorex Inc." } ,
+ { 0x1295, "Imagenation", "Imagenation Corp." } ,
+ { 0x1296, "Kofax", "Kofax Image Products" } ,
+ { 0x1297, "Holco", "Holco Enterprise" } ,
+ { 0x1298, "Spellcaster", "Spellcaster Telecommunications Inc." } ,
+ { 0x1299, "Know Tech", "Knowledge Technology Laboratories" } ,
+ { 0x129A, "VMETRO", "VMETRO Inc." } ,
+ { 0x129B, "Img Access", "Image Access" } ,
+ { 0x129D, "CompCore", "CompCore Multimedia Inc." } ,
+ { 0x129E, "Victor Jpn", "Victor Co. of Japan Ltd." } ,
+ { 0x129F, "OEC Med", "OEC Medical Systems Inc." } ,
+ { 0x12A0, "A-B", "Allen Bradley Co." } ,
+ { 0x12A1, "Simpact", "Simpact Inc" } ,
+ { 0x12A2, "NewGen", "NewGen Systems Corp." } ,
+ { 0x12A3, "Lucent", "Lucent Technologies AMR" } ,
+ { 0x12A4, "NTT Elect", "NTT Electronics Technology Co." } ,
+ { 0x12A5, "Vision Dyn", "Vision Dynamics Ltd." } ,
+ { 0x12A6, "Scalable", "Scalable Networks Inc." } ,
+ { 0x12A7, "AMO", "AMO GmbH" } ,
+ { 0x12A8, "News Datacom", "News Datacom" } ,
+ { 0x12A9, "Xiotech", "Xiotech Corp." } ,
+ { 0x12AA, "SDL", "SDL Communications Inc." } ,
+ { 0x12AB, "Yuan Yuan", "Yuan Yuan Enterprise Co. Ltd." } ,
+ { 0x12AC, "MeasureX", "MeasureX Corp." } ,
+ { 0x12AD, "Multidata", "Multidata GmbH" } ,
+ { 0x12AE, "Alteon", "Alteon Networks Inc." } ,
+ { 0x12AF, "TDK USA", "TDK USA Corp." } ,
+ { 0x12B0, "Jorge Sci", "Jorge Scientific Corp." } ,
+ { 0x12B1, "GammaLink", "GammaLink" } ,
+ { 0x12B2, "Gen Signal", "General Signal Networks" } ,
+ { 0x12B3, "Inter-Face", "Inter-Face Co. Ltd." } ,
+ { 0x12B4, "Future Tel", "Future Tel Inc." } ,
+ { 0x12B5, "Granite", "Granite Systems Inc." } ,
+ { 0x12B6, "Nat Micro", "Natural Microsystems" } ,
+ { 0x12B7, "Acumen", "Acumen" } ,
+ { 0x12B8, "Korg", "Korg" } ,
+ { 0x12B9, "US Robotics", "US Robotics" } ,
+ { 0x12BA, "Bittware", "Bittware, Inc" } ,
+ { 0x12BB, "Nippon Uni", "Nippon Unisoft Corp." } ,
+ { 0x12BC, "Array Micro", "Array Microsystems" } ,
+ { 0x12BD, "Computerm", "Computerm Corp." } ,
+ { 0x12BE, "Anchor Chips", "Anchor Chips Inc." } ,
+ { 0x12BF, "Fujifilm", "Fujifilm Microdevices" } ,
+ { 0x12C0, "Infimed", "Infimed" } ,
+ { 0x12C1, "GMM Res", "GMM Research Corp." } ,
+ { 0x12C2, "Mentec", "Mentec Ltd." } ,
+ { 0x12C3, "Holtek", "Holtek Microelectronics Inc." } ,
+ { 0x12C4, "Connect Tech", "Connect Tech Inc." } ,
+ { 0x12C5, "PicturEl", "Picture Elements Inc." } ,
+ { 0x12C6, "Mitani", "Mitani Corp." } ,
+ { 0x12C7, "Dialogic", "Dialogic Corp." } ,
+ { 0x12C8, "G Force", "G Force Co. Ltd." } ,
+ { 0x12C9, "Gigi Ops", "Gigi Operations" } ,
+ { 0x12CA, "ICE", "Integrated Computing Engines, Inc." } ,
+ { 0x12CB, "Antex", "Antex Electronics Corp." } ,
+ { 0x12CC, "Pluto", "Pluto Technologies International" } ,
+ { 0x12CD, "Aims Lab", "Aims Lab" } ,
+ { 0x12CE, "Netspeed", "Netspeed Inc." } ,
+ { 0x12CF, "Prophet", "Prophet Systems Inc." } ,
+ { 0x12D0, "GDE Sys", "GDE Systems Inc." } ,
+ { 0x12D1, "PsiTech", "PsiTech" } ,
+ { 0x12D2, "NVidia", "NVidia / SGS Thomson" } ,
+ { 0x12D3, "Vingmed", "Vingmed Sound A/S" } ,
+ { 0x12D4, "DGM&S", "DGM & S" } ,
+ { 0x12D5, "Equator", "Equator Technologies" } ,
+ { 0x12D6, "Analogic", "Analogic Corp." } ,
+ { 0x12D7, "Biotronic", "Biotronic SRL" } ,
+ { 0x12D8, "Pericom", "Pericom Semiconductor" } ,
+ { 0x12D9, "Aculab", "Aculab Plc." } ,
+ { 0x12DA, "TrueTime", "TrueTime" } ,
+ { 0x12DB, "Annapolis", "Annapolis Micro Systems Inc." } ,
+ { 0x12DC, "Symicron", "Symicron Computer Communication Ltd." } ,
+ { 0x12DD, "MGI", "Management Graphics Inc." } ,
+ { 0x12DE, "Rainbow", "Rainbow Technologies" } ,
+ { 0x12DF, "SBS Tech", "SBS Technologies Inc." } ,
+ { 0x12E0, "Chase", "Chase Research PLC" } ,
+ { 0x12E1, "Nintendo", "Nintendo Co. Ltd." } ,
+ { 0x12E2, "Datum", "Datum Inc. Bancomm-Timing Division" } ,
+ { 0x12E3, "Imation", "Imation Corp. - Medical Imaging Syst" } ,
+ { 0x12E4, "Brooktrout", "Brooktrout Technology Inc." } ,
+ { 0x12E6, "Cirel", "Cirel Systems" } ,
+ { 0x12E7, "Sebring", "Sebring Systems Inc" } ,
+ { 0x12E8, "CRISC", "CRISC Corp." } ,
+ { 0x12E9, "GE Spacenet", "GE Spacenet" } ,
+ { 0x12EA, "Zuken", "Zuken" } ,
+ { 0x12EB, "Aureal", "Aureal Semiconductor" } ,
+ { 0x12EC, "3A Intl", "3A International Inc." } ,
+ { 0x12ED, "Optivision", "Optivision Inc." } ,
+ { 0x12EE, "Orange Micro", "Orange Micro, Inc." } ,
+ { 0x12EF, "Vienna", "Vienna Systems" } ,
+ { 0x12F0, "Pentek", "Pentek" } ,
+ { 0x12F1, "Sorenson", "Sorenson Vision Inc." } ,
+ { 0x12F2, "Gammagraphx", "Gammagraphx Inc." } ,
+ { 0x12F4, "Megatel", "Megatel" } ,
+ { 0x12F5, "Forks", "Forks" } ,
+ { 0x12F6, "Dawson Fr", "Dawson France" } ,
+ { 0x12F7, "Cognex", "Cognex" } ,
+ { 0x12F8, "Electronic-Design", "Electronic-Design GmbH" } ,
+ { 0x12F9, "FFT", "FourFold Technologies" } ,
+ { 0x12FB, "SSP", "Spectrum Signal Processing" } ,
+ { 0x12FC, "", "Capital Equipment Corp" } ,
+ { 0x12FE, "esd", "esd Electronic System Design GmbH" } ,
+ { 0x1303, "", "Innovative Integration" } ,
+ { 0x1304, "", "Juniper Networks Inc." } ,
+ { 0x1307, "ComputerBoards", "ComputerBoards" } ,
+ { 0x1308, "Jato", "Jato Technologies Inc." } ,
+ { 0x130A, "", "Mitsubishi Electric Microcomputer" } ,
+ { 0x130B, "", "Colorgraphic Communications Corp" } ,
+ { 0x130F, "", "Advanet Inc." } ,
+ { 0x1310, "", "Gespac" } ,
+ { 0x1312, "RVSI", "Robotic Vision Systems Incorporated" } ,
+ { 0x1313, "", "Yaskawa Electric Co." } ,
+ { 0x1316, "", "Teradyne Inc." } ,
+ { 0x1317, "", "Admtek Inc" } ,
+ { 0x1318, "Packet Engines", "Packet Engines, Inc." } ,
+ { 0x1319, "Forte Media", "Forte Media, Inc." } ,
+ { 0x131F, "", "SIIG" } ,
+ { 0x1325, "", "Salix Technologies Inc" } ,
+ { 0x1326, "", "Seachange International" } ,
+ { 0x1331, "RadiSys", "RadiSys Corporation" } ,
+ { 0x1332, "Micro Memory", "Micro Memory, LLC" } ,
+ { 0x1335, "Videomail", "Videomail Inc." } ,
+ { 0x133D, "", "Prisa Networks" } ,
+ { 0x133F, "", "SCM Microsystems" } ,
+ { 0x1342, "", "Promax Systems Inc" } ,
+ { 0x1344, "Micron", "Micron Technology, Inc." } ,
+ { 0x1347, "Odetics", "Odetics" } ,
+ { 0x134A, "DTC", "DTC Technology Corp." } ,
+ { 0x134B, "", "ARK Research Corp." } ,
+ { 0x134C, "", "Chori Joho System Co. Ltd" } ,
+ { 0x134D, "PCTEL", "PCTEL Inc." } ,
+ { 0x135A, "", "Brain Boxes Limited" } ,
+ { 0x135B, "", "Giganet Inc." } ,
+ { 0x135C, "", "Quatech Inc" } ,
+ { 0x135D, "ABB Network Partn", "ABB Network Partner AB" } ,
+ { 0x135E, "Sealevel", "Sealevel Systems Inc." } ,
+ { 0x135F, "", "I-Data International A-S" } ,
+ { 0x1360, "", "Meinberg Funkuhren" } ,
+ { 0x1361, "", "Soliton Systems K.K." } ,
+ { 0x1363, "", "Phoenix Technologies Ltd" } ,
+ { 0x1365, "Hypercope", "Hypercope Corp." } ,
+ { 0x1366, "Teijin", "Teijin Seiki Co. Ltd." } ,
+ { 0x1367, "", "Hitachi Zosen Corporation" } ,
+ { 0x1368, "", "Skyware Corporation" } ,
+ { 0x1369, "", "Digigram" } ,
+ { 0x136B, "", "Kawasaki Steel Corporation" } ,
+ { 0x136C, "", "Adtek System Science Co Ltd" } ,
+ { 0x1375, "", "Boeing - Sunnyvale" } ,
+ { 0x1377, "", "GMBH" } ,
+ { 0x137A, "", "Mark Of The Unicorn Inc" } ,
+ { 0x137B, "", "PPT Vision" } ,
+ { 0x137C, "", "Iwatsu Electric Co Ltd" } ,
+ { 0x137D, "", "Dynachip Corporation" } ,
+ { 0x137E, "PTSC", "Patriot Scientific Corp." } ,
+ { 0x1380, "", "Sanritz Automation Co LTC" } ,
+ { 0x1381, "", "Brains Co. Ltd" } ,
+ { 0x1382, "Marian", "Marian - Electronic & Software" } ,
+ { 0x1384, "", "Stellar Semiconductor Inc" } ,
+ { 0x1385, "Netgear", "Netgear" } ,
+ { 0x1387, "", "Systran Corp" } ,
+ { 0x1388, "", "Hitachi Information Technology Co Ltd" } ,
+ { 0x1389, "Applicom", "Applicom International" } ,
+ { 0x138B, "", "Tokimec Inc" } ,
+ { 0x138E, "", "Basler GMBH" } ,
+ { 0x138F, "", "Patapsco Designs Inc" } ,
+ { 0x1390, "CDI", "Concept Development Inc." } ,
+ { 0x1393, "", "Moxa Technologies Co Ltd" } ,
+ { 0x1394, "Level One", "Level One Communications" } ,
+ { 0x1395, "", "Ambicom Inc" } ,
+ { 0x1396, "", "Cipher Systems Inc" } ,
+ { 0x1397, "Cologne", "Cologne Chip Designs GmbH" } ,
+ { 0x1398, "", "Clarion Co. Ltd" } ,
+ { 0x139A, "", "Alacritech Inc" } ,
+ { 0x139D, "", "Xstreams PLC/ EPL Limited" } ,
+ { 0x139E, "", "Echostar Data Networks" } ,
+ { 0x13A0, "", "Crystal Group Inc" } ,
+ { 0x13A1, "", "Kawasaki Heavy Industries Ltd" } ,
+ { 0x13A3, "HI-FN", "HI-FN Inc." } ,
+ { 0x13A4, "", "Rascom Inc" } ,
+ { 0x13A7, "", "Teles AG" } ,
+ { 0x13A8, "XR", "Exar Corp." } ,
+ { 0x13A9, "", "Siemens Medical Solutions" } ,
+ { 0x13AA, "", "Nortel Networks - BWA Division" } ,
+ { 0x13AF, "", "T.Sqware" } ,
+ { 0x13B1, "", "Tamura Corporation" } ,
+ { 0x13B4, "", "Wellbean Co Inc" } ,
+ { 0x13B5, "", "ARM Ltd" } ,
+ { 0x13B6, "", "DLoG GMBH" } ,
+ { 0x13B8, "", "Nokia Telecommunications OY" } ,
+ { 0x13BD, "SHARP", "Sharp Corporation" } ,
+ { 0x13BF, "", "Sharewave Inc" } ,
+ { 0x13C0, "Microgate", "Microgate Corp." } ,
+ { 0x13C1, "3ware", "3ware Inc." } ,
+ { 0x13C2, "", "Technotrend Systemtechnik GMBH" } ,
+ { 0x13C3, "", "Janz Computer AG" } ,
+ { 0x13C7, "", "Blue Chip Technology Ltd" } ,
+ { 0x13CC, "", "Metheus Corporation" } ,
+ { 0x13CF, "", "Studio Audio & Video Ltd" } ,
+ { 0x13D0, "", "B2C2 Inc" } ,
+ { 0x13D1, "", "Abocom Systems Inc" } ,
+ { 0x13D4, "", "Graphics Microsystems Inc" } ,
+ { 0x13D6, "", "K.I. Technology Co Ltd" } ,
+ { 0x13D7, "", "Toshiba Engineering Corporation" } ,
+ { 0x13D8, "", "Phobos Corporation" } ,
+ { 0x13D9, "", "Apex Inc" } ,
+ { 0x13DC, "", "Netboost Corporation" } ,
+ { 0x13DE, "", "ABB Robotics Products AB" } ,
+ { 0x13DF, "E-Tech", "E-Tech Inc." } ,
+ { 0x13E0, "", "GVC Corporation" } ,
+ { 0x13E3, "", "Nest Inc" } ,
+ { 0x13E4, "", "Calculex Inc" } ,
+ { 0x13E5, "", "Telesoft Design Ltd" } ,
+ { 0x13E9, "", "Intraserver Technology Inc" } ,
+ { 0x13EA, "", "Dallas Semiconductor" } ,
+ { 0x13F0, "", "Sundance Technology Inc" } ,
+ { 0x13F1, "", "OCE - Industries S.A." } ,
+ { 0x13F4, "", "Troika Networks Inc" } ,
+ { 0x13F6, "C-Media", "C-Media Electronics Inc." } ,
+ { 0x13F9, "", "NTT Advanced Technology Corp." } ,
+ { 0x13FA, "Pentland", "Pentland Systems Ltd." } ,
+ { 0x13FB, "", "Aydin Corp" } ,
+ { 0x13FD, "", "Micro Science Inc" } ,
+ { 0x13FE, "Advantech", "Advantech Co., Ltd." } ,
+ { 0x13FF, "", "Silicon Spice Inc." } ,
+ { 0x1400, "", "ARTX Inc" } ,
+ { 0x1402, "Meilhaus Electronic", "Meilhaus Electronic GmbH Germany" } ,
+ { 0x1404, "", "Fundamental Software Inc" } ,
+ { 0x1406, "Océ", "Océ Printing Systems" } ,
+ { 0x1407, "LAVA", "Lava Computer MFG Inc." } ,
+ { 0x1408, "", "Aloka Co. Ltd" } ,
+ { 0x1409, "", "eTIMedia Technology Co Ltd" } ,
+ { 0x140A, "", "DSP Research Inc" } ,
+ { 0x140B, "", "Ramix Inc" } ,
+ { 0x140D, "", "Matsushita Electric Works Ltd" } ,
+ { 0x140F, "", "Salient Systems Corp" } ,
+ { 0x1412, "IC Ensemble", "IC Ensemble, Inc." } ,
+ { 0x1413, "", "Addonics" } ,
+ { 0x1415, "Oxford", "Oxford Semiconductor Ltd" } ,
+ { 0x1418, "", "Kyushu Electronics Systems Inc" } ,
+ { 0x1419, "", "Excel Switching Corp" } ,
+ { 0x141B, "", "Zoom Telephonics Inc" } ,
+ { 0x141C, "Zoom", "Zoom Telephonics, Inc" } ,
+ { 0x141E, "", "Fanuc Co. Ltd" } ,
+ { 0x141F, "", "Visiontech Ltd" } ,
+ { 0x1420, "", "Psion Dacom PLC" } ,
+ { 0x1425, "", "ASIC Designers Inc" } ,
+ { 0x1428, "", "Edec Co Ltd" } ,
+ { 0x1429, "", "Unex Technology Corp." } ,
+ { 0x142A, "", "Kingmax Technology Inc" } ,
+ { 0x142B, "", "Radiolan" } ,
+ { 0x142C, "", "Minton Optic Industry Co Ltd" } ,
+ { 0x142D, "", "Pixstream Inc" } ,
+ { 0x1430, "", "ITT Aerospace/Communications Division" } ,
+ { 0x1433, "", "Eltec Elektronik AG" } ,
+ { 0x1435, "RTD-USA", "Real Time Devices USA, Inc." } ,
+ { 0x1436, "", "CIS Technology Inc" } ,
+ { 0x1437, "", "Nissin Inc Co" } ,
+ { 0x1438, "", "Atmel-Dream" } ,
+ { 0x143F, "", "Lightwell Co Ltd - Zax Division" } ,
+ { 0x1441, "", "Agie SA." } ,
+ { 0x1445, "", "Logical Co Ltd" } ,
+ { 0x1446, "", "Graphin Co. Ltd" } ,
+ { 0x1447, "", "Aim GMBH" } ,
+ { 0x1448, "Alesis", "Alesis Studio" } ,
+ { 0x144A, "ADLINK", "ADLINK Technology Inc" } ,
+ { 0x144B, "Loronix", "Loronix Information Systems, Inc." } ,
+ { 0x144D, "", "Samsung Electronics Co Ltd" } ,
+ { 0x1450, "", "Octave Communications Ind." } ,
+ { 0x1451, "", "SP3D Chip Design GMBH" } ,
+ { 0x1453, "", "Mycom Inc" } ,
+ { 0x1455, "", "Logic Plus PLUS Inc" } ,
+ { 0x1458, "Giga-Byte", "Giga-Byte Technologies" } ,
+ { 0x145C, "", "Cryptek" } ,
+ { 0x145F, "Baldor", "Baldor Electric Company" } ,
+ { 0x1460, "", "Dynarc Inc" } ,
+ { 0x1462, "", "Micro-Star International Co Ltd" } ,
+ { 0x1463, "", "Fast Corporation" } ,
+ { 0x1464, "ICS", "Interactive Circuits & Systems Ltd" } ,
+ { 0x1465, "", "GN Nettest Telecom Div." } ,
+ { 0x1468, "", "Ambit Microsystems Corp." } ,
+ { 0x1469, "", "Cleveland Motion Controls" } ,
+ { 0x146C, "", "Ruby Tech Corp." } ,
+ { 0x146D, "", "Tachyon Inc." } ,
+ { 0x146E, "", "WMS Gaming" } ,
+ { 0x1471, "", "Integrated Telecom Express Inc" } ,
+ { 0x1473, "", "Zapex Technologies Inc" } ,
+ { 0x1474, "", "Doug Carson & Associates" } ,
+ { 0x1477, "", "Net Insight" } ,
+ { 0x1478, "", "Diatrend Corporation" } ,
+ { 0x147B, "", "Abit Computer Corp." } ,
+ { 0x147F, "", "Nihon Unisys Ltd." } ,
+ { 0x1482, "", "Isytec - Integrierte Systemtechnik Gmbh" } ,
+ { 0x1483, "", "Labway Coporation" } ,
+ { 0x1485, "", "Erma - Electronic GMBH" } ,
+ { 0x1489, "", "KYE Systems Corporation" } ,
+ { 0x148A, "", "Opto 22" } ,
+ { 0x148B, "", "Innomedialogic Inc." } ,
+ { 0x148D, "Digicom", "Digicom Systems Inc." } ,
+ { 0x148E, "", "OSI Plus Corporation" } ,
+ { 0x148F, "", "Plant Equipment Inc." } ,
+ { 0x1490, "", "TC Labs Pty Ltd." } ,
+ { 0x1493, "", "Maker Communications" } ,
+ { 0x1495, "", "Tokai Communications Industry Co. Ltd" } ,
+ { 0x1496, "", "Joytech Computer Co. Ltd." } ,
+ { 0x1497, "", "SMA Regelsysteme GMBH" } ,
+ { 0x1498, "Tews", "Tews Technologies" } ,
+ { 0x1499, "", "Micro-Technology Co Ltd" } ,
+ { 0x149B, "", "Seiko Instruments Inc" } ,
+ { 0x149E, "", "Mapletree Networks Inc." } ,
+ { 0x149F, "", "Lectron Co Ltd" } ,
+ { 0x14A0, "", "Softing GMBH" } ,
+ { 0x14A2, "", "Millennium Engineering Inc" } ,
+ { 0x14A4, "", "GVC/BCM Advanced Research" } ,
+ { 0x14A5, "", "Xionics Document Technologies Inc." } ,
+ { 0x14A9, "", "Hivertec Inc." } ,
+ { 0x14AB, "", "Mentor Graphics Corp." } ,
+ { 0x14B1, "", "Nextcom K.K." } ,
+ { 0x14B3, "Xpeed", "Xpeed Inc." } ,
+ { 0x14B4, "", "Philips Business Electronics B.V." } ,
+ { 0x14B5, "Creamware", "Creamware GmbH" } ,
+ { 0x14B6, "", "Quantum Data Corp." } ,
+ { 0x14B7, "Proxim", "Proxim Inc." } ,
+ { 0x14B9, "Aironet", "Aironet Wireless Communication" } ,
+ { 0x14BA, "", "Internix Inc." } ,
+ { 0x14BB, "", "Semtech Corporation" } ,
+ { 0x14BE, "", "L3 Communications" } ,
+ { 0x14C0, "Compal", "Compal Electronics, Inc." } ,
+ { 0x14C1, "", "Myricom Inc." } ,
+ { 0x14C2, "", "DTK Computer" } ,
+ { 0x14C4, "", "Iwasaki Information Systems Co Ltd" } ,
+ { 0x14C5, "", "ABB Automation Products AB" } ,
+ { 0x14C6, "", "Data Race Inc" } ,
+ { 0x14C7, "Modtech", "Modular Technology Ltd." } ,
+ { 0x14C8, "Turbocomm", "Turbocomm Tech Inc" } ,
+ { 0x14C9, "", "Odin Telesystems Inc" } ,
+ { 0x14CB, "", "Billionton Systems Inc./Cadmus Micro Inc" } ,
+ { 0x14CD, "", "Universal Scientific Ind." } ,
+ { 0x14CF, "", "TEK Microsystems Inc." } ,
+ { 0x14D2, "OX", "Oxford Semiconductor" } ,
+ { 0x14D4, "PANACOM", "Panacom Technology Corporation" } ,
+ { 0x14D5, "", "Nitsuko Corporation" } ,
+ { 0x14D6, "", "Accusys Inc" } ,
+ { 0x14D7, "", "Hirakawa Hewtech Corp" } ,
+ { 0x14D8, "", "Hopf Elektronik GMBH" } ,
+ { 0x14D9, "", "Alpha Processor Inc" } ,
+ { 0x14DB, "Avlab", "Avlab Technology Inc." } ,
+ { 0x14DC, "Amplicon", "Amplicon Liveline Limited" } ,
+ { 0x14DD, "", "Imodl Inc." } ,
+ { 0x14DE, "", "Applied Integration Corporation" } ,
+ { 0x14E3, "", "Amtelco" } ,
+ { 0x14E4, "Broadcom", "Broadcom Corporation" } ,
+ { 0x14EA, "Planex", "Planex Communications, Inc." } ,
+ { 0x14EB, "", "Seiko Epson Corporation" } ,
+ { 0x14EC, "", "Acqiris" } ,
+ { 0x14ED, "", "Datakinetics Ltd" } ,
+ { 0x14EF, "", "Carry Computer Eng. Co Ltd" } ,
+ { 0x14F1, "Conexant", "Conexant Systems, Inc." } ,
+ { 0x14F2, "Mobility", "Mobility Electronics, Inc." } ,
+ { 0x14F4, "", "Tokyo Electronic Industry Co. Ltd." } ,
+ { 0x14F5, "", "Sopac Ltd" } ,
+ { 0x14F6, "", "Coyote Technologies LLC" } ,
+ { 0x14F7, "", "Wolf Technology Inc" } ,
+ { 0x14F8, "", "Audiocodes Inc" } ,
+ { 0x14F9, "", "AG Communications" } ,
+ { 0x14FB, "", "Transas Marine (UK) Ltd" } ,
+ { 0x14FC, "", "Quadrics Supercomputers World" } ,
+ { 0x14FD, "", "Japan Computer Industry Inc." } ,
+ { 0x14FE, "", "Archtek Telecom Corp." } ,
+ { 0x14FF, "", "Twinhead International Corp." } ,
+ { 0x1500, "DELTA", "DELTA Electronics, Inc." } ,
+ { 0x1501, "", "Banksoft Canada Ltd" } ,
+ { 0x1502, "", "Mitsubishi Electric Logistics Support Co" } ,
+ { 0x1503, "", "Kawasaki LSI USA Inc" } ,
+ { 0x1504, "", "Kaiser Electronics" } ,
+ { 0x1506, "", "Chameleon Systems Inc" } ,
+ { 0x1507, "Htec", "Htec Ltd." } ,
+ { 0x1509, "", "First International Computer Inc" } ,
+ { 0x150B, "", "Yamashita Systems Corp" } ,
+ { 0x150C, "", "Kyopal Co Ltd" } ,
+ { 0x150D, "", "Warpspped Inc" } ,
+ { 0x150E, "", "C-Port Corporation" } ,
+ { 0x150F, "", "Intec GMBH" } ,
+ { 0x1510, "", "Behavior Tech Computer Corp" } ,
+ { 0x1511, "", "Centillium Technology Corp" } ,
+ { 0x1512, "", "Rosun Technologies Inc" } ,
+ { 0x1513, "", "Raychem" } ,
+ { 0x1514, "", "TFL LAN Inc" } ,
+ { 0x1515, "", "ICS Advent" } ,
+ { 0x1516, "", "Myson Technology Inc" } ,
+ { 0x1517, "", "Echotek Corporation" } ,
+ { 0x1518, "", "PEP Modular Computers GMBH" } ,
+ { 0x1519, "", "Telefon Aktiebolaget LM Ericsson" } ,
+ { 0x151A, "Globetek", "Globetek Inc." } ,
+ { 0x151B, "", "Combox Ltd" } ,
+ { 0x151C, "", "Digital Audio Labs Inc" } ,
+ { 0x151D, "", "Fujitsu Computer Products Of America" } ,
+ { 0x151E, "", "Matrix Corp." } ,
+ { 0x151F, "", "Topic Semiconductor Corp" } ,
+ { 0x1520, "", "Chaplet System Inc" } ,
+ { 0x1521, "", "Bell Corporation" } ,
+ { 0x1522, "Mainpine", "Mainpine Limited" } ,
+ { 0x1523, "", "Music Semiconductors" } ,
+ { 0x1524, "", "ENE Technology Inc" } ,
+ { 0x1525, "", "Impact Technologies" } ,
+ { 0x1526, "", "ISS Inc" } ,
+ { 0x1527, "", "Solectron" } ,
+ { 0x1528, "", "Acksys" } ,
+ { 0x1529, "", "American Microsystems Inc" } ,
+ { 0x152A, "", "Quickturn Design Systems" } ,
+ { 0x152B, "", "Flytech Technology Co Ltd" } ,
+ { 0x152C, "", "Macraigor Systems LLC" } ,
+ { 0x152D, "", "Quanta Computer Inc" } ,
+ { 0x152E, "", "Melec Inc" } ,
+ { 0x152F, "", "Philips - Crypto" } ,
+ { 0x1532, "", "Echelon Corporation" } ,
+ { 0x1533, "", "Baltimore" } ,
+ { 0x1534, "", "Road Corporation" } ,
+ { 0x1535, "", "Evergreen Technologies Inc" } ,
+ { 0x1537, "", "Datalex Communcations" } ,
+ { 0x1538, "", "Aralion Inc." } ,
+ { 0x1539, "", "Atelier Informatiques et Electronique Et" } ,
+ { 0x153A, "", "ONO Sokki" } ,
+ { 0x153B, "", "Terratec Electronic GMBH" } ,
+ { 0x153C, "", "Antal Electronic" } ,
+ { 0x153D, "", "Filanet Corporation" } ,
+ { 0x153E, "", "Techwell Inc" } ,
+ { 0x153F, "", "MIPS Denmark" } ,
+ { 0x1540, "", "Provideo Multimedia Co Ltd" } ,
+ { 0x1541, "", "Telocity Inc." } ,
+ { 0x1542, "", "Vivid Technology Inc" } ,
+ { 0x1543, "", "Silicon Laboratories" } ,
+ { 0x1544, "DCM", "DCM Technologies Ltd." } ,
+ { 0x1545, "", "Visiontek" } ,
+ { 0x1546, "", "IOI Technology Corp." } ,
+ { 0x1547, "", "Mitutoyo Corporation" } ,
+ { 0x1548, "", "Jet Propulsion Laboratory" } ,
+ { 0x1549, "ISS", "Interconnect Systems Solutions" } ,
+ { 0x154A, "", "Max Technologies Inc." } ,
+ { 0x154B, "", "Computex Co Ltd" } ,
+ { 0x154C, "", "Visual Technology Inc." } ,
+ { 0x154D, "", "PAN International Industrial Corp" } ,
+ { 0x154E, "", "Servotest Ltd" } ,
+ { 0x154F, "", "Stratabeam Technology" } ,
+ { 0x1550, "", "Open Network Co Ltd" } ,
+ { 0x1551, "", "Smart Electronic Development GMBH" } ,
+ { 0x1552, "", "Racal Airtech Ltd" } ,
+ { 0x1553, "", "Chicony Electronics Co Ltd" } ,
+ { 0x1554, "PMC", "Prolink Microsystems Corp." } ,
+ { 0x1555, "Gesytec", "Gesytec GmbH" } ,
+ { 0x1556, "", "PLD Applications" } ,
+ { 0x1557, "", "Mediastar Co. Ltd" } ,
+ { 0x1558, "", "Clevo/Kapok Computer" } ,
+ { 0x1559, "", "SI Logic Ltd" } ,
+ { 0x155A, "", "Innomedia Inc" } ,
+ { 0x155B, "", "Protac International Corp" } ,
+ { 0x155C, "", "Cemax-Icon Inc" } ,
+ { 0x155D, "", "MAC System Co Ltd" } ,
+ { 0x155E, "", "LP Elektronik GMBH" } ,
+ { 0x155F, "", "Perle Systems Limited" } ,
+ { 0x1560, "", "Terayon Communications Systems" } ,
+ { 0x1561, "", "Viewgraphics Inc" } ,
+ { 0x1562, "", "Symbol Technologies" } ,
+ { 0x1563, "", "A-Trend Technology Co Ltd" } ,
+ { 0x1564, "", "Yamakatsu Electronics Industry Co Ltd" } ,
+ { 0x1565, "", "Biostar Microtech Intl Corp" } ,
+ { 0x1566, "", "Ardent Technologies Inc" } ,
+ { 0x1567, "", "Jungsoft" } ,
+ { 0x1568, "", "DDK Electronics Inc" } ,
+ { 0x1569, "", "Palit Microsystems Inc" } ,
+ { 0x156A, "", "Avtec Systems" } ,
+ { 0x156B, "", "2wire Inc" } ,
+ { 0x156C, "", "Vidac Electronics GMBH" } ,
+ { 0x156D, "", "Alpha-Top Corp" } ,
+ { 0x156E, "", "Alfa Inc." } ,
+ { 0x156F, "", "M-Systems Flash Disk Pioneers Ltd" } ,
+ { 0x1570, "", "Lecroy Corporation" } ,
+ { 0x1571, "", "Contemporary Controls" } ,
+ { 0x1572, "", "Otis Elevator Company" } ,
+ { 0x1573, "", "Lattice - Vantis" } ,
+ { 0x1574, "", "Fairchild Semiconductor" } ,
+ { 0x1575, "", "Voltaire Advanced Data Security Ltd" } ,
+ { 0x1576, "", "Viewcast Com" } ,
+ { 0x1578, "", "Hitt" } ,
+ { 0x1579, "", "Dual Technology Corporation" } ,
+ { 0x157A, "", "Japan Elecronics Ind. Inc" } ,
+ { 0x157B, "", "Star Multimedia Corp." } ,
+ { 0x157C, "Eurosoft", "Eurosoft (UK)" } ,
+ { 0x157D, "", "Gemflex Networks" } ,
+ { 0x157E, "", "Transition Networks" } ,
+ { 0x157F, "", "PX Instruments Technology Ltd" } ,
+ { 0x1580, "", "Primex Aerospace Co." } ,
+ { 0x1581, "", "SEH Computertechnik GMBH" } ,
+ { 0x1582, "", "Cytec Corporation" } ,
+ { 0x1583, "", "Inet Technologies Inc" } ,
+ { 0x1584, "", "Uniwill Computer Corp." } ,
+ { 0x1585, "", "Marconi Commerce Systems SRL" } ,
+ { 0x1586, "", "Lancast Inc" } ,
+ { 0x1587, "", "Konica Corporation" } ,
+ { 0x1588, "", "Solidum Systems Corp" } ,
+ { 0x1589, "", "Atlantek Microsystems Pty Ltd" } ,
+ { 0x158A, "", "Digalog Systems Inc" } ,
+ { 0x158B, "", "Allied Data Technologies" } ,
+ { 0x158C, "", "Hitachi Semiconductor & Devices Sales Co" } ,
+ { 0x158D, "", "Point Multimedia Systems" } ,
+ { 0x158E, "", "Lara Technology Inc" } ,
+ { 0x158F, "", "Ditect Coop" } ,
+ { 0x1590, "", "3pardata Inc." } ,
+ { 0x1591, "", "ARN" } ,
+ { 0x1592, "Syba", "Syba Tech Ltd." } ,
+ { 0x1593, "", "Bops Inc" } ,
+ { 0x1594, "", "Netgame Ltd" } ,
+ { 0x1595, "", "Diva Systems Corp." } ,
+ { 0x1596, "", "Folsom Research Inc" } ,
+ { 0x1597, "", "Memec Design Services" } ,
+ { 0x1598, "", "Granite Microsystems" } ,
+ { 0x1599, "", "Delta Electronics Inc" } ,
+ { 0x159A, "", "General Instrument" } ,
+ { 0x159B, "", "Faraday Technology Corp" } ,
+ { 0x159C, "", "Stratus Computer Systems" } ,
+ { 0x159D, "", "Ningbo Harrison Electronics Co Ltd" } ,
+ { 0x159E, "", "A-Max Technology Co Ltd" } ,
+ { 0x159F, "", "Galea Network Security" } ,
+ { 0x15A0, "", "Compumaster SRL" } ,
+ { 0x15A1, "", "Geocast Network Systems Inc" } ,
+ { 0x15A2, "", "Catalyst Enterprises Inc" } ,
+ { 0x15A3, "", "Italtel" } ,
+ { 0x15A4, "", "X-Net OY" } ,
+ { 0x15A5, "", "Toyota MACS Inc" } ,
+ { 0x15A6, "", "Sunlight Ultrasound Technologies Ltd" } ,
+ { 0x15A7, "", "SSE Telecom Inc" } ,
+ { 0x15A8, "", "Shanghai Communications Technologies Cen" } ,
+ { 0x15AA, "", "Moreton Bay" } ,
+ { 0x15AB, "", "Bluesteel Networks Inc" } ,
+ { 0x15AC, "", "North Atlantic Instruments" } ,
+ { 0x15AD, "VMware", "VMware Inc." } ,
+ { 0x15AE, "", "Amersham Pharmacia Biotech" } ,
+ { 0x15B0, "", "Zoltrix International Limited" } ,
+ { 0x15B1, "", "Source Technology Inc" } ,
+ { 0x15B2, "", "Mosaid Technologies Inc." } ,
+ { 0x15B3, "", "Mellanox Technology" } ,
+ { 0x15B4, "", "CCI/Triad" } ,
+ { 0x15B5, "", "Cimetrics Inc" } ,
+ { 0x15B6, "", "Texas Memory Systems Inc" } ,
+ { 0x15B7, "", "Sandisk Corp." } ,
+ { 0x15B8, "", "Addi-Data GMBH" } ,
+ { 0x15B9, "", "Maestro Digital Communications" } ,
+ { 0x15BA, "", "Impacct Technology Corp" } ,
+ { 0x15BB, "", "Portwell Inc" } ,
+ { 0x15BC, "Agilent", "Agilent Technologies" } ,
+ { 0x15BD, "", "DFI Inc." } ,
+ { 0x15BE, "", "Sola Electronics" } ,
+ { 0x15BF, "", "High Tech Computer Corp (HTC)" } ,
+ { 0x15C0, "BVM", "BVM Limited" } ,
+ { 0x15C1, "", "Quantel" } ,
+ { 0x15C2, "", "Newer Technology Inc" } ,
+ { 0x15C3, "", "Taiwan Mycomp Co Ltd" } ,
+ { 0x15C4, "", "EVSX Inc" } ,
+ { 0x15C5, "", "Procomp Informatics Ltd" } ,
+ { 0x15C6, "", "Technical University Of Budapest" } ,
+ { 0x15C7, "", "Tateyama System Laboratory Co Ltd" } ,
+ { 0x15C8, "", "Penta Media Co. Ltd" } ,
+ { 0x15C9, "", "Serome Technology Inc" } ,
+ { 0x15CA, "", "Bitboys OY" } ,
+ { 0x15CB, "", "AG Electronics Ltd" } ,
+ { 0x15CC, "", "Hotrail Inc." } ,
+ { 0x15CD, "", "Dreamtech Co Ltd" } ,
+ { 0x15CE, "", "Genrad Inc." } ,
+ { 0x15CF, "", "Hilscher GMBH" } ,
+ { 0x15D1, "Infineon", "Infineon Technologies AG" } ,
+ { 0x15D2, "", "FIC (First International Computer Inc)" } ,
+ { 0x15D3, "", "NDS Technologies Israel Ltd" } ,
+ { 0x15D4, "", "Iwill Corporation" } ,
+ { 0x15D5, "", "Tatung Co." } ,
+ { 0x15D6, "", "Entridia Corporation" } ,
+ { 0x15D7, "", "Rockwell-Collins Inc" } ,
+ { 0x15D8, "", "Cybernetics Technology Co Ltd" } ,
+ { 0x15D9, "", "Super Micro Computer Inc" } ,
+ { 0x15DA, "", "Cyberfirm Inc." } ,
+ { 0x15DB, "", "Applied Computing Systems Inc." } ,
+ { 0x15DC, "Litronic", "Litronic Inc." } ,
+ { 0x15DD, "", "Sigmatel Inc." } ,
+ { 0x15DE, "", "Malleable Technologies Inc" } ,
+ { 0x15DF, "", "Infinilink Corp." } ,
+ { 0x15E0, "", "Cacheflow Inc" } ,
+ { 0x15E1, "VTG", "Voice Technologies Group" } ,
+ { 0x15E2, "", "Quicknet Technologies Inc" } ,
+ { 0x15E3, "", "Networth Technologies Inc" } ,
+ { 0x15E4, "", "VSN Systemen BV" } ,
+ { 0x15E5, "", "Valley Technologies Inc" } ,
+ { 0x15E6, "", "Agere Inc." } ,
+ { 0x15E7, "", "GET Engineering Corp." } ,
+ { 0x15E8, "", "National Datacomm Corp." } ,
+ { 0x15E9, "", "Pacific Digital Corp." } ,
+ { 0x15EA, "", "Tokyo Denshi Sekei K.K." } ,
+ { 0x15EB, "", "Drsearch GMBH" } ,
+ { 0x15EC, "", "Beckhoff GMBH" } ,
+ { 0x15ED, "", "Macrolink Inc" } ,
+ { 0x15EE, "", "IN Win Development Inc." } ,
+ { 0x15EF, "", "Intelligent Paradigm Inc" } ,
+ { 0x15F0, "", "B-Tree Systems Inc" } ,
+ { 0x15F1, "", "Times N Systems Inc" } ,
+ { 0x15F2, "", "Diagnostic Instruments Inc" } ,
+ { 0x15F3, "", "Digitmedia Corp." } ,
+ { 0x15F4, "", "Valuesoft" } ,
+ { 0x15F5, "", "Power Micro Research" } ,
+ { 0x15F6, "", "Extreme Packet Device Inc" } ,
+ { 0x15F7, "", "Banctec" } ,
+ { 0x15F8, "", "Koga Electronics Co" } ,
+ { 0x15F9, "", "Zenith Electronics Corporation" } ,
+ { 0x15FA, "", "J.P. Axzam Corporation" } ,
+ { 0x15FB, "", "Zilog Inc." } ,
+ { 0x15FC, "", "Techsan Electronics Co Ltd" } ,
+ { 0x15FD, "", "N-Cubed.Net" } ,
+ { 0x15FE, "", "Kinpo Electronics Inc" } ,
+ { 0x15FF, "", "Fastpoint Technologies Inc." } ,
+ { 0x1600, "", "Northrop Grumman - Canada Ltd" } ,
+ { 0x1601, "", "Tenta Technology" } ,
+ { 0x1602, "", "Prosys-TEC Inc." } ,
+ { 0x1603, "", "Nokia Wireless Business Communications" } ,
+ { 0x1604, "", "Central System Research Co Ltd" } ,
+ { 0x1605, "", "Pairgain Technologies" } ,
+ { 0x1606, "", "Europop AG" } ,
+ { 0x1607, "", "Lava Semiconductor Manufacturing Inc." } ,
+ { 0x1608, "", "Automated Wagering International" } ,
+ { 0x1609, "", "Sciemetric Instruments Inc" } ,
+ { 0x160A, "", "Kollmorgen Servotronix" } ,
+ { 0x160B, "", "Onkyo Corp." } ,
+ { 0x160C, "", "Oregon Micro Systems Inc." } ,
+ { 0x160D, "", "Aaeon Electronics Inc" } ,
+ { 0x160E, "", "CML Emergency Services" } ,
+ { 0x160F, "", "ITEC Co Ltd" } ,
+ { 0x1610, "", "Tottori Sanyo Electric Co Ltd" } ,
+ { 0x1611, "", "Bel Fuse Inc." } ,
+ { 0x1612, "", "Telesynergy Research Inc." } ,
+ { 0x1613, "", "System Craft Inc." } ,
+ { 0x1614, "", "Jace Tech Inc." } ,
+ { 0x1615, "", "Equus Computer Systems Inc" } ,
+ { 0x1616, "", "Iotech Inc." } ,
+ { 0x1617, "", "Rapidstream Inc" } ,
+ { 0x1618, "", "Esec SA" } ,
+ { 0x1619, "FarSite", "FarSite Communications Limited" } ,
+ { 0x161A, "", "Wvinten Ltd" } ,
+ { 0x161B, "", "Mobilian Israel Ltd" } ,
+ { 0x161C, "", "Berkshire Products" } ,
+ { 0x161D, "", "Gatec" } ,
+ { 0x161E, "", "Kyoei Sangyo Co Ltd" } ,
+ { 0x161F, "", "Arima Computer Co" } ,
+ { 0x1620, "", "Sigmacom Co Ltd" } ,
+ { 0x1621, "", "Lynx Studio Technology Inc" } ,
+ { 0x1622, "NHC", "Nokia Home Communications" } ,
+ { 0x1623, "", "KRF Tech Ltd" } ,
+ { 0x1624, "", "CE Infosys GMBH" } ,
+ { 0x1625, "", "Warp Nine Engineering" } ,
+ { 0x1626, "", "TDK Semiconductor Corp." } ,
+ { 0x1627, "", "BCom Electronics Inc" } ,
+ { 0x1629, "", "Kongsberg Spacetec a.s." } ,
+ { 0x162A, "", "Sejin Computerland Co Ltd" } ,
+ { 0x162B, "", "Shanghai Bell Company Limited" } ,
+ { 0x162C, "", "C&H Technologies Inc" } ,
+ { 0x162D, "", "Reprosoft Co Ltd" } ,
+ { 0x162E, "", "Margi Systems Inc" } ,
+ { 0x162F, "", "Rohde & Schwarz GMBH & Co KG" } ,
+ { 0x1630, "", "Sky Computers Inc" } ,
+ { 0x1631, "", "NEC Computer International" } ,
+ { 0x1632, "", "Verisys Inc" } ,
+ { 0x1633, "", "Adac Corporation" } ,
+ { 0x1634, "", "Visionglobal Network Corp." } ,
+ { 0x1635, "", "Decros" } ,
+ { 0x1636, "", "Jean Company Ltd" } ,
+ { 0x1637, "", "NSI" } ,
+ { 0x1638, "", "Eumitcom Technology Inc" } ,
+ { 0x163A, "", "Air Prime Inc" } ,
+ { 0x163B, "", "Glotrex Co Ltd" } ,
+ { 0x163C, "", "Smart Link" } ,
+ { 0x163D, "", "Heidelberg Digital LLC" } ,
+ { 0x163E, "", "3dpower" } ,
+ { 0x163F, "", "Renishaw PLC" } ,
+ { 0x1640, "", "Intelliworxx Inc" } ,
+ { 0x1641, "", "MKNet Corporation" } ,
+ { 0x1642, "", "Bitland" } ,
+ { 0x1643, "", "Hajime Industries Ltd" } ,
+ { 0x1644, "", "Western Avionics Ltd" } ,
+ { 0x1645, "", "Quick-Serv. Computer Co. Ltd" } ,
+ { 0x1646, "", "Nippon Systemware Co Ltd" } ,
+ { 0x1647, "", "Hertz Systemtechnik GMBH" } ,
+ { 0x1648, "", "MeltDown Systems LLC" } ,
+ { 0x1649, "", "Jupiter Systems" } ,
+ { 0x164A, "", "Aiwa Co. Ltd" } ,
+ { 0x164C, "", "Department Of Defense" } ,
+ { 0x164D, "", "Ishoni Networks" } ,
+ { 0x164E, "", "Micrel Inc." } ,
+ { 0x164F, "", "Datavoice (Pty) Ltd." } ,
+ { 0x1650, "", "Admore Technology Inc." } ,
+ { 0x1651, "", "Chaparral Network Storage" } ,
+ { 0x1652, "", "Spectrum Digital Inc." } ,
+ { 0x1653, "", "Nature Worldwide Technology Corp" } ,
+ { 0x1654, "", "Sonicwall Inc" } ,
+ { 0x1655, "", "Dazzle Multimedia Inc." } ,
+ { 0x1656, "", "Insyde Software Corp" } ,
+ { 0x1657, "", "Brocade Communications Systems" } ,
+ { 0x1658, "", "Med Associates Inc." } ,
+ { 0x1659, "", "Shiba Denshi Systems Inc." } ,
+ { 0x165A, "", "Epix Inc." } ,
+ { 0x165B, "", "Real-Time Digital Inc." } ,
+ { 0x165C, "", "Gidel Ltd." } ,
+ { 0x165D, "", "Hsing Tech. Enterprise Co. Ltd." } ,
+ { 0x165E, "", "Hyunju Computer Co. Ltd." } ,
+ { 0x165F, "", "Add One Company" } ,
+ { 0x1660, "", "Network Security Technologies Inc. (Net " } ,
+ { 0x1661, "", "Worldspace Corp." } ,
+ { 0x1662, "", "Int Labs" } ,
+ { 0x1663, "", "Elmec Inc. Ltd." } ,
+ { 0x1664, "", "Fastfame Technology Co. Ltd." } ,
+ { 0x1665, "", "Edax Inc." } ,
+ { 0x1666, "", "Norpak Corporation" } ,
+ { 0x1667, "", "CoSystems Inc." } ,
+ { 0x1668, "Actiontec", "Actiontec Electronics Inc." } ,
+ { 0x166A, "", "Komatsu Ltd." } ,
+ { 0x166B, "", "Supernet Inc." } ,
+ { 0x166C, "", "Shade Ltd." } ,
+ { 0x166D, "", "Sibyte Inc." } ,
+ { 0x166E, "", "Schneider Automation Inc." } ,
+ { 0x166F, "", "Televox Software Inc." } ,
+ { 0x1670, "", "Rearden Steel" } ,
+ { 0x1671, "", "Atan Technology Inc." } ,
+ { 0x1672, "", "Unitec Co. Ltd." } ,
+ { 0x1673, "", "Connex" } ,
+ { 0x1675, "", "Square Wave Technology" } ,
+ { 0x1676, "", "Emachines Inc." } ,
+ { 0x1677, "", "Bernecker + Rainer" } ,
+ { 0x1678, "", "INH Semiconductor" } ,
+ { 0x1679, "", "Tokyo Electron Device Ltd." } ,
+ { 0x167F, "iba", "Ingenieurbuero Anhaus GmbH" } ,
+ { 0x1680, "Dunti", "Dunti Corp." } ,
+ { 0x1681, "Hercules", "Hercules" } ,
+ { 0x1682, "PINE", "PINE Technology, Ltd." } ,
+ { 0x1688, "CastleNet", "CastleNet Technology Inc." } ,
+ { 0x168A, "USA", "Utimaco Safeware AG" } ,
+ { 0x168B, "", "Circut Assembly Corp." } ,
+ { 0x168C, "Atheros", "Atheros Communications Inc." } ,
+ { 0x168D, "NMI", "NMI Electronics Ltd." } ,
+ { 0x168E, "Hyundai MultiCAV", "Hyundai MultiCAV Computer Co. Ltd." } ,
+ { 0x168F, "KDSI", "KDS Innotech Corp." } ,
+ { 0x1690, "NetContinuum", "NetContinuum, Inc." } ,
+ { 0x1693, "FERMA", "FERMA" } ,
+ { 0x1695, "EPoX", "EPoX Computer Co., Ltd." } ,
+ { 0x16AE, "SFNT", "SafeNet Inc." } ,
+ { 0x16B3, "", "CNF Mobile Solutions" } ,
+ { 0x16CA, "Cenatek", "Cenatek Inc." } ,
+ { 0x16CB, "Minolta", "Minolta Co. Ltd." } ,
+ { 0x16CC, "Inari", "Inari Inc." } ,
+ { 0x16D0, "", "Systemax" } ,
+ { 0x16E0, "3MTS", "Third Millenium Test Solutions, Inc." } ,
+ { 0x16F0, "", "TLA Inc." } ,
+ { 0x16F1, "Adicti", "Adicti Corp." } ,
+ { 0x16F3, "Jetway", "Jetway Information Co., Ltd" } ,
+ { 0x16F6, "VideoTele.com", "VideoTele.com Inc." } ,
+ { 0x1700, "Antara", "Antara LLC" } ,
+ { 0x1701, "", "Interactive Computer Products Inc." } ,
+ { 0x1702, "", "Internet Machines Corp." } ,
+ { 0x1703, "Desana", "Desana Systems" } ,
+ { 0x1704, "Clearwater", "Clearwater Networks" } ,
+ { 0x1705, "Digital First", "Digital First" } ,
+ { 0x1706, "PBC", "Pacific Broadband Communications" } ,
+ { 0x1707, "Cogency", "Cogency Semiconductor Inc." } ,
+ { 0x1708, "Harris", "Harris Corp." } ,
+ { 0x1709, "Zarlink", "Zarlink Semiconductor" } ,
+ { 0x170A, "Alpine", "Alpine Electronics Inc." } ,
+ { 0x170B, "NetOctave", "NetOctave Inc." } ,
+ { 0x170C, "YottaYotta", "YottaYotta Inc." } ,
+ { 0x170D, "SMI", "SensoMotoric Instruments GmbH" } ,
+ { 0x170E, "San Valley", "San Valley Systems, Inc." } ,
+ { 0x170F, "Cyberdyne", "Cyberdyne Inc." } ,
+ { 0x1710, "Pelago", "Pelago Networks" } ,
+ { 0x1711, "NetScreen", "NetScreen Technologies, Inc." } ,
+ { 0x1712, "NICE", "NICE Systems Inc." } ,
+ { 0x1713, "TOPCON", "TOPCON Corp." } ,
+ { 0x1734, "Fujitsu-Siemens", "Fujitsu-Siemens Computers GmbH" } ,
+ { 0x173B, "Altima", "Altima" } ,
+ { 0x1743, "Peppercon", "Peppercon AG" } ,
+ { 0x1752, "GBM", "Global Brands Manufacture Ltd." } ,
+ { 0x1755, "Alchemy", "Alchemy Semiconductor Inc." } ,
+ { 0x176A, "GDC", "General Dynamics Canada" } ,
+ { 0x1789, "Ennyah", "Ennyah Technologies Corp" } ,
+ { 0x1793, "Unitech", "Unitech Electronics Co., Ltd" } ,
+ { 0x17A7, "Start Network", "Start Network Technology Co., Ltd." } ,
+ { 0x17AA, "Legend", "Legend Ltd. (Beijing)" } ,
+ { 0x17AB, "", "Phillips Components" } ,
+ { 0x17AF, "Hightech", "Hightech Information Systems, Ltd." } ,
+ { 0x17C0, "Wistron", "Wistron Corp." } ,
+ { 0x17C4, "", "Movita Technologies, Inc" } ,
+ { 0x17E9, "", "DH electronics GmbH" } ,
+ { 0x1813, "", "Modem Silicon Operation" } ,
+ { 0x1815, "devolo", "devolo AG" } ,
+ { 0x1820, "InfiniCon", "InfiniCon Systems, Inc." } ,
+ { 0x1860, "Primagraphics", "Primagraphics Ltd." } ,
+ { 0x1888, "", "Varisys Limited" } ,
+ { 0X1898, "DICIT", "DIC INFORMATION TECHNOLOGY ,LTD" } ,
+ { 0x1978, "", "HARPO sp. z o.o." } ,
+ { 0x1A08, "Sierra", "Sierra Semiconductor" } ,
+ { 0x1B13, "", "Jaton Corporation" } ,
+ { 0x1C1C, "Symphony", "Symphony" } ,
+ { 0x1D44, "DPT", "Distributed Processing Technology" } ,
+ { 0x1DE1, "Tekram", "Tekram" } ,
+ { 0x1DE2, "A/DHOC", "A/DHOC Systèmes" } ,
+ { 0x1DEA, "LST", "Lasentec" } ,
+ { 0x2001, "", "Temporal Research Ltd" } ,
+ { 0x2002, "AT", "Automation Technology GmbH" } ,
+ { 0x2014, "NONTECH", "NONTECH Nonnenmacher GmbH" } ,
+ { 0x2348, "Racore", "Racore" } ,
+ { 0x2646, "", "Kingston Technology Co." } ,
+ { 0x270F, "ChainTech", "ChainTech Computer Co. Ltd." } ,
+ { 0x2EC1, "", "Zenic Inc" } ,
+ { 0x3000, "Hansol", "Hansol Electronics Inc." } ,
+ { 0x3142, "PostImpressions", "Post Impressions Systems" } ,
+ { 0x3333, "Bertin", "Bertin Technologies" } ,
+ { 0x3388, "Hint", "Hint Corp." } ,
+ { 0x3411, "", "Quantum Designs (H.K.) Inc." } ,
+ { 0x3513, "ARCOM", "ARCOM Control Systems Ltd." } ,
+ { 0x38D0, "MFP", "MFP GmbH" } ,
+ { 0x38EF, "", "4links" } ,
+ { 0x3D3D, "3DLabs", "3Dlabs, Inc. Ltd" } ,
+ { 0x4005, "Avance", "Avance Logic Inc." } ,
+ { 0x4033, "Addtron", "Addtron Technology Co., Inc." } ,
+ { 0x4130, "AT", "Allied Telesyn" } ,
+ { 0x4143, "DEC", "Digital Equipment Corp." } ,
+ { 0x4144, "Alpha Data", "Alpha Data" } ,
+ { 0x416C, "", "Aladdin Knowledge Systems" } ,
+ { 0x4444, "Conexant", "Conexant Inc." } ,
+ { 0x4468, "Bridgeport", "Bridgeport Machines" } ,
+ { 0x4550, "TDT", "Tucker-Davis Technologies" } ,
+ { 0x4594, "", "Cogetec Informatique Inc." } ,
+ { 0x45FB, "Baldor", "Baldor Electric Company" } ,
+ { 0x4680, "UMAX Comp", "UMAX Computer Corp." } ,
+ { 0x4843, "Hercules", "Hercules Computer Technology" } ,
+ { 0x4943, "", "Growth Networks" } ,
+ { 0x494F, "ICS", "ICS Advent" } ,
+ { 0x4954, "Integral", "Integral Technologies" } ,
+ { 0x4978, "Axil", "Axil Computer Inc." } ,
+ { 0x4A14, "NetVin", "NetVin" } ,
+ { 0x4ABD, "ABI", "Applied Biosystems Division" } ,
+ { 0x4B10, "Buslogic", "Buslogic Inc" } ,
+ { 0x4C48, "Lung Hwa", "Lung Hwa Electronics" } ,
+ { 0x4C53, "", "SBS-OR Industrial Computers" } ,
+ { 0x4CA1, "", "Seanix Technology Inc" } ,
+ { 0x4D51, "Mediaq", "Mediaq Inc." } ,
+ { 0x4D54, "", "Microtechnica Co Ltd" } ,
+ { 0x4DDC, "ILC", "ILC Data Device Corp." } ,
+ { 0x5046, "Guillemot", "Guillemot" } ,
+ { 0x5053, "TBS/Voyetra", "TBS/Voyetra Technologies" } ,
+ { 0x5112, "", "Sigmatek GmbH & CoKG" } ,
+ { 0x5136, "", "S S Technologies" } ,
+ { 0x5143, "Qualcomm", "Qualcomm Inc." } ,
+ { 0x5145, "ENSONIQ", "ENSONIQ" } ,
+ { 0x5301, "Alliance", "Alliance Semicondutor Corp." } ,
+ { 0x5333, "S3", "S3 Incorporated" } ,
+ { 0x5401, "Ericsson", "Ericsson" } ,
+ { 0x5430, "Evergreen", "Evergreen Technologies Inc." } ,
+ { 0x544C, "", "Teralogic Inc" } ,
+ { 0x5455, "TU-Berlin", "Technische Universtiaet Berlin" } ,
+ { 0x5519, "Cnet", "Cnet Technoliges, Inc." } ,
+ { 0x5544, "Dunord", "Dunord Technologies" } ,
+ { 0x5555, "Genroco", "Genroco Inc." } ,
+ { 0x55CF, "", "Unisys Corporation" } ,
+ { 0x5700, "Netpower", "Netpower" } ,
+ { 0x5AB7, "Sabtech", "Sabtech Industries" } ,
+ { 0x6356, "UltraStor", "UltraStor" } ,
+ { 0x6374, "C4T", "c't Magazin f_r Computertechnik" } ,
+ { 0x6409, "", "Logitec Corp." } ,
+ { 0x6666, "Decision", "Decision Computer International Co." } ,
+ { 0x7604, "O.N.", "O.N. Electric Co. Ltd." } ,
+ { 0x7747, "DaoGuo", "DaoGuo Technology Co.,Ltd" } ,
+ { 0x7BDE, "MIDAC", "MIDAC Corporation" } ,
+ { 0x7FED, "PowerTV", "PowerTV" } ,
+ { 0x8001, "BEYERTONE", "Beyertone AG - Germany" } ,
+ { 0x8008, "QUANCOM", "QUANCOM Informationssysteme GmbH" } ,
+ { 0x801F, "", "ARS Technologies" } ,
+ { 0x8086, "Intel", "Intel Corporation" } ,
+ { 0x8800, "Trigem", "Trigem Computer" } ,
+ { 0x8866, "T-Square", "T-Square Design Inc." } ,
+ { 0x8888, "Sil Magic", "Silicon Magic" } ,
+ { 0x8912, "TRX", "TRX" } ,
+ { 0x8967, "", "Woopy systems" } ,
+ { 0x8E0E, "Computone", "Computone Corporation" } ,
+ { 0x8E2E, "KTI", "KTI" } ,
+ { 0x9004, "Adaptec", "Adaptec" } ,
+ { 0x9005, "Adaptec", "Adaptec" } ,
+ { 0x907F, "Atronics", "Atronics" } ,
+ { 0x919A, "", "Gigapixel Corp" } ,
+ { 0x9412, "Holtek", "Holtek" } ,
+ { 0x9699, "", "Omni Media Technology Inc." } ,
+ { 0x9710, "NetMos", "NetMos Techology" } ,
+ { 0x9875, "", "wouteronline" } ,
+ { 0x9877, "surveyors", "pan asia superitendence corp" } ,
+ { 0x9902, "StarGen", "StarGen, Inc." } ,
+ { 0xA0A0, "Aopen", "Aopen Inc." } ,
+ { 0xA0F1, "", "Unisys Corporation" } ,
+ { 0xA200, "NEC", "NEC Corp." } ,
+ { 0xA259, "", "Hewlett Packard" } ,
+ { 0xA25B, "Hewlett Packard", "Hewlett Packard GmbH PL24-MKT" } ,
+ { 0xA304, "Sony", "Sony" } ,
+ { 0xA727, "", "3com Corporation" } ,
+ { 0xAA42, "Scitex", "Scitex Digital Video" } ,
+ { 0xABCD, "", "PROGSTAR" } ,
+ { 0xAC1E, "", "Digital Receiver Technology Inc" } ,
+ { 0xAECB, "", "Adrienne Electronics Corporation" } ,
+ { 0xB00C, "IC Book", "IC Book Labs" } ,
+ { 0xB1B3, "Shiva", "Shiva Europe Ltd." } ,
+ { 0xB894, "", "Brown & Sharpe Mfg. Co." } ,
+ { 0xBEEF, "Mindstream Computing", "Mindstream Computing" } ,
+ { 0xC001, "TSI", "TSI Telsys" } ,
+ { 0xC0A9, "Micron/Crucial", "Micron/Crucial Technology" } ,
+ { 0xC0DE, "", "Motorola" } ,
+ { 0xC0FE, "Mot Engrg", "Motion Engineering Inc." } ,
+ { 0xC622, "", "Hudson Soft Co Ltd" } ,
+ { 0xCA50, "Varian", "Varian Australia Pty. Ltd." } ,
+ { 0xCAFE, "", "Chrysalis-ITS" } ,
+ { 0xCCCC, "", "Catapult Communications" } ,
+ { 0xCDDD, "Tyzx Inc.", "Tyzx Inc." } ,
+ { 0xD4D4, "DY4", "DY4 Systems Inc." } ,
+ { 0xD531, "I+ME ACTIA", "I+ME ACTIA GmBH" } ,
+ { 0xD84D, "Exsys", "Exsys" } ,
+ { 0xDC93, "", "Dawicontrol" } ,
+ { 0xDEAD, "Indigita", "Indigita Corporation" } ,
+ { 0xDEAF, "", "Middle Digital, Inc" } ,
+ { 0xE000, "Winbond", "Winbond" } ,
+ { 0xE159, "Tiger Jet", "Tiger Jet Network Inc" } ,
+ { 0xE4BF, "", "EKF Elektronik GMBH" } ,
+ { 0xEA01, "", "Eagle Technology" } ,
+ { 0xEABB, "Aashima", "Aashima Technology B.V." } ,
+ { 0xEACE, "Endace", "Endace Measurement Systems Ltd." } ,
+ { 0xECC0, "Echo", "Echo Corporation" } ,
+ { 0xEDD8, "ARK Logic", "ARK Logic, Inc" } ,
+ { 0xF1D0, "", "AJA Video" } ,
+ { 0xF5F5, "", "F5 Networks Inc." } ,
+ { 0xFA57, "Interagon", "Interagon AS" } ,
+ { 0xFEBD, "Ultraview", "Ultraview Corp." } ,
+ { 0xFEDA, "Broadcom", "Broadcom" } ,
+ { 0xFFFE, "VMware", "VMware Inc." } ,
+ { 0xFFFF, "BAD!", "ILLEGITIMATE VENDOR ID" }
+} ;
+
+// Use this value for loop control during searching:
+#define PCI_VENTABLE_LEN (sizeof(PciVenTable)/sizeof(PCI_VENTABLE))
+
+typedef struct _PCI_DEVTABLE
+{
+ unsigned short VenId ;
+ unsigned short DevId ;
+ char * Chip ;
+ char * ChipDesc ;
+} PCI_DEVTABLE, *PPCI_DEVTABLE ;
+
+PCI_DEVTABLE PciDevTable [] =
+{
+ { 0x0000, 0x07, "", "" } ,
+ { 0x0000, 0x1073, "", "" } ,
+ { 0x003D, 0x00D1, "", "i740 PCI" } ,
+ { 0x0675, 0x1700, "IS64PH", "ISDN Adapter" } ,
+ { 0x0675, 0x1702, "IS64PH", "ISDN Adapter" } ,
+ { 0x0700, 0x0100, "", "LavaPort PCI" } ,
+ { 0x0700, 0x0200, "", "LavaPort PCI" } ,
+ { 0x0815, 0x0002, "ELKA SO-PCI", "" } ,
+ { 0x0871, 0xFFA1, "A1T", "HCF-PCI card" } ,
+ { 0x0871, 0xFFA2, "T-Concept", "HCF-PCI card" } ,
+ { 0x0914, 0x0201, "83820", "32bit pci mac" } ,
+ { 0x0914, 0x0202, "83821", "64bit pci gnic" } ,
+ { 0x09C1, 0x0704, "CM 200E", "Cable Modem" } ,
+ { 0x0E11, 0x0001, "", "PCI to EISA Bridge" } ,
+ { 0x0E11, 0x0002, "ISA Bridge", "" } ,
+ { 0x0E11, 0x000F, "CPQB1A9", "StorageWorks Library Adapter (HVD)" } ,
+ { 0x0E11, 0x0049, "NC7132", "Gigabit Upgrade Module" } ,
+ { 0x0E11, 0x004A, "NC6136", "Gigabit Server Adapter" } ,
+ { 0x0E11, 0x00C0, "Adaptec AIC-7899G", "64Bit,66MHz,Dual Channel WideUltra3 SCSI" } ,
+ { 0x0E11, 0x0508, "Neteligent 4/16 TR", "PCI UTP/STP Controller" } ,
+ { 0x0E11, 0x1000, "Triflex Model 1000", "Pentium Bridge" } ,
+ { 0x0E11, 0x2000, "Triflex Model 2000", "Pentium Bridge" } ,
+ { 0x0E11, 0x3032, "QVision 1280/p v0", "GUI Accelerator" } ,
+ { 0x0E11, 0x3033, "QVision 1280/p v1", "GUI Accelerator" } ,
+ { 0x0E11, 0x3034, "QVision 1280/p v2", "GUI Accelerator" } ,
+ { 0x0E11, 0x4000, "Triflex Model 4000", "Pentium Bridge" } ,
+ { 0x0E11, 0x6010, "Model 6010", "HotPlug PCI Bridge" } ,
+ { 0x0E11, 0x7020, "", "USB Controller" } ,
+ { 0x0E11, 0xA0EC, "", "Original Compaq fibre Channel HBA" } ,
+ { 0x0E11, 0xA0F0, "", "Advanced System Management Controller" } ,
+ { 0x0E11, 0xA0F3, "", "Triflex PCI to ISA PnP Bridge" } ,
+ { 0x0E11, 0xA0F7, "", "PCI Hotplug Controller" } ,
+ { 0x0E11, 0xA0F8, "ZFMicro", "USB Open Host Controller" } ,
+ { 0x0E11, 0xA0FC, "HPFC-5166A", "Tachyon TL 64-bit/66-Mhz FC HBA" } ,
+ { 0x0E11, 0xAe10, "", "Smart-2 Array Controller" } ,
+ { 0x0E11, 0xAE29, "MIS-L", "PCI to ISA Bridge" } ,
+ { 0x0E11, 0xAE2A, "MPC", "CPU to PCI Bridge" } ,
+ { 0x0E11, 0xAE2B, "MIS-E", "PCI to ISA PnP Bridge" } ,
+ { 0x0E11, 0xAE31, "", "System Management Controller" } ,
+ { 0x0E11, 0xAE32, "", "Netelligent 10/100 TX PCI UTP TLAN 2.3" } ,
+ { 0x0E11, 0xAE33, "Triflex", "Dual EIDE Controller" } ,
+ { 0x0E11, 0xAE34, "", "Netelligent 10 T PCI UTP TLAN 2.3" } ,
+ { 0x0E11, 0xAE35, "", "Integrated NetFlex 3/P TLAN 2.3" } ,
+ { 0x0E11, 0xAE40, "", "Dual Port Netelligent 10/100 TX PCI TLAN" } ,
+ { 0x0E11, 0xAE43, "", "Integrated Netelligent 10/100 TX PCI" } ,
+ { 0x0E11, 0xAE69, "CETUS-L", "PCI to ISA Bridge" } ,
+ { 0x0E11, 0xAE6C, "DRACO", "PCI Bridge" } ,
+ { 0x0E11, 0xAE6D, "NorthStar", "CPU to PCI Bridge" } ,
+ { 0x0E11, 0xB011, "", "Dual Port Netelligent 10/100 TX" } ,
+ { 0x0E11, 0xB012, "Netelligent 10 T/2", "UTP/Coax PCI" } ,
+ { 0x0E11, 0xB01E, "NC3120", "Fast Ethernet NIC" } ,
+ { 0x0E11, 0xB01F, "NC3122", "Fast Ethernet NIC" } ,
+ { 0x0E11, 0xB02F, "NC1120", "Ethernet NIC" } ,
+ { 0x0E11, 0xB030, "Netelligent WS 1500", "10/100TX Embedded UTP/Coax Controller" } ,
+ { 0x0E11, 0xB04A, "", "10/100TX WOL UTP Controller" } ,
+ { 0x0E11, 0XB060, "CISS", "SMART2 Array Controller" } ,
+ { 0x0E11, 0xB0C6, "NC3161", "Fast Ethernet Embedded Controller w/ WOL" } ,
+ { 0x0E11, 0xB0C7, "NC3160", "Fast Ethernet NIC" } ,
+ { 0x0E11, 0xB0D7, "NC3121 rev. A & B", "Fast Ethernet NIC" } ,
+ { 0x0E11, 0xB0DD, "NC3131", "Fast Ethernet NIC" } ,
+ { 0x0E11, 0xB0DE, "NC3132", "Fast Ethernet NIC" } ,
+ { 0x0E11, 0xB0DF, "NC6132", "Gigabit Module" } ,
+ { 0x0E11, 0xB0E0, "NC6133", "Gigabit Module" } ,
+ { 0x0E11, 0xB0E1, "NC3133", "Fast Ethernet Module" } ,
+ { 0x0E11, 0xB123, "NC6134", "Gigabit NIC" } ,
+ { 0x0E11, 0xB134, "NC3163", "Fast Ethernet NIC" } ,
+ { 0x0E11, 0xB13C, "NC3162", "Fast Ethernet NIC" } ,
+ { 0x0E11, 0xB144, "NC3123", "Fast Ethernet NIC" } ,
+ { 0x0E11, 0xB163, "NC3134", "Fast Ethernet NIC" } ,
+ { 0x0E11, 0xB164, "NC3135", "Fast Ethernet Upgrade Module" } ,
+ { 0x0E11, 0xB178, "CISSB", "SMART2 Array Controller" } ,
+ { 0x0E11, 0xB196, "", "Conexant SoftK56 Modem" } ,
+ { 0x0E11, 0xB1A4, "NC7131", "Gigabit Server Adapter" } ,
+ { 0x0E11, 0xB203, "iLo", "Integrated Lights Out Processor" } ,
+ { 0x0E11, 0xB204, "iLo", "Integrated Lights Out Processor" } ,
+ { 0x0E11, 0xF130, "", "ThunderLAN 1.0 NetFlex-3/P" } ,
+ { 0x0E11, 0xF150, "", "ThunderLAN 2.3 NetFlex-3/P with BNC" } ,
+ { 0x0E11, 0xF700, "", "LP7000 Compaq/Emulex Fibre Channel HBA" } ,
+ { 0x0E11, 0xF800, "", "LP8000 Compaq/Emulex Fibre Channel HBA" } ,
+ { 0x1000, 0x0001, "LSI53C810/810A/810AE", "PCI-SCSI I/O Processor" } ,
+ { 0x1000, 0x0002, "53C820", "Fast-wide SCSI" } ,
+ { 0x1000, 0x0003, "LSI53C825/825A/825AE", "PCI to SCSI I/O Processor" } ,
+ { 0x1000, 0x0004, "53C815", "Fast SCSI" } ,
+ { 0x1000, 0x0005, "53C810AP", "Fast SCSI" } ,
+ { 0x1000, 0x0006, "LSI53C860/860E", "PCI to Ultra SCSI I/O Processor" } ,
+ { 0x1000, 0x000A, "LSI53C1510", "PCI Dual Channel Wide Ultra2 SCSI Ctrlr" } ,
+ { 0x1000, 0x000B, "LSI53C896/897", "PCI Dual Channel Wide Ultra2 SCSI Ctrlr" } ,
+ { 0x1000, 0x000C, "LSI53C895", "PCI to Ultra2 SCSI I/O Processor" } ,
+ { 0x1000, 0x000D, "53C885", "Ultra Wide SCSI, Ethernet" } ,
+ { 0x1000, 0x000F, "53C875/875E/876/876E", "PCI to Ultra SCSI I/O Processor" } ,
+ { 0x1000, 0x0010, "LSI53C1510", "I2O-Ready PCI RAID Ultra2 SCSI Ctrlr" } ,
+ { 0x1000, 0x0012, "LSI53C895A", "PCI to Ultra2 SCSI Controller" } ,
+ { 0x1000, 0x0013, "LSI53C875A", "PCI to Ultra SCSI Controller" } ,
+ { 0x1000, 0x0020, "LSI53C1010-33", "PCI to Dual Channel Ultra3 SCSI Ctrlr" } ,
+ { 0x1000, 0x0021, "LSI53C1000/1010-66", "PCI to Ultra160 SCSI Controller" } ,
+ { 0x1000, 0x0030, "LSI53C1020/1030", "PCI-X to Ultra320 SCSI Controller" } ,
+ { 0x1000, 0x0031, "LSI53C1030ZC", "PCI-X SCSI Controller" } ,
+ { 0x1000, 0x0035, "LSI53C1035", "PCI-X SCSI Controller" } ,
+ { 0x1000, 0x0040, "LSI53C1035", "PCI-X SCSI Controller" } ,
+ { 0x1000, 0x008F, "53C810", "LSI 53C8xx SCSI host adapter chip" } ,
+ { 0x1000, 0x0621, "LSIFC909", "Fibre Channel I/O Processor" } ,
+ { 0x1000, 0x0622, "LSIFC929", "Dial Channel Fibre Channel I/O Processor" } ,
+ { 0x1000, 0x0623, "LSIFC929", "Dual Channel Fibre Channel I/O Processor" } ,
+ { 0x1000, 0x0624, "LSIFC919", "Fibre Channel I/O Processor" } ,
+ { 0x1000, 0x0625, "LSIFC919", "Fibre Channel I/O Processor" } ,
+ { 0x1000, 0x0630, "LSIFC920", "Fibre Channel I/O Processor" } ,
+ { 0x1000, 0x0701, "53C885", "10/100 MBit Ethernet" } ,
+ { 0x1000, 0x0702, "Yellowfin G-NIC", "Gigabit Ethernet Controller" } ,
+ { 0x1000, 0x0901, "61C102", "USB Controller" } ,
+ { 0x1000, 0x1000, "63C815", "Fast SCSI Controller" } ,
+ { 0x1000, 0x1001, "53C895", "Symbios Ultra2 SCSI controller" } ,
+ { 0x1001, 0x0010, "ispLSI1032E", "PCI 1616, 16 TTL-IN, 16 TTL-OUT" } ,
+ { 0x1001, 0x0011, "ispLSI1032E", "OPTO-PCI, 16 IN / 16 OUT 24 VDC" } ,
+ { 0x1001, 0x0012, "ispLSI1032E", "PCI-AD, PCI-ADDA analog I/O-card" } ,
+ { 0x1001, 0x0013, "ispLSI1032E", "PCI-OptoRel, PCI-Relais 16 Relais & Opto" } ,
+ { 0x1001, 0x0014, "ispLSI1032E", "Timer, Pulse & Counter-card 16..32 bit" } ,
+ { 0x1001, 0x0015, "ispLSI1032E", "PCI-DAC416, 4 channel D/A16bit precision" } ,
+ { 0x1001, 0x0016, "ispLSI1032E", "PCI-MFB high-speed analog I/O" } ,
+ { 0x1001, 0x0017, "ispLSI1032E", "PROTO-3 PCI, digital I/O with chipselect" } ,
+ { 0x1001, 0x0020, "ispLSI1032E", "Universal digital I/O PCI-Interface" } ,
+ { 0x1002, 0x4136, "", "Radeon Mobility A3" } ,
+ { 0x1002, 0x4144, "R300", "Radeon 9700/9500 Series" } ,
+ { 0x1002, 0x4147, "", "ATI Fire GL Z1 4P Video Accelerator" } ,
+ { 0x1002, 0x4158, "68800AX", "Mach 32" } ,
+ { 0x1002, 0x4164, "", "Fire GL Z1/Z1 Pro Video Accelerator" } ,
+ { 0x1002, 0x4167, "", "ATI Fire GL Z1 4P SECONDARY Video" } ,
+ { 0x1002, 0x4242, "R200AIW", "All-In-Wonder 8500DV" } ,
+ { 0x1002, 0x4243, "", "Lucent OHCI IEEE1394 Host Controller" } ,
+ { 0x1002, 0x4336, "", "Radeon IGP 320M" } ,
+ { 0x1002, 0x4337, "RS200M", "Mobility M6 (U2)" } ,
+ { 0x1002, 0x4354, "215CT222", "Mach 64 CT" } ,
+ { 0x1002, 0x4358, "210888CX", "Mach64 CX" } ,
+ { 0x1002, 0x4554, "Mach64 ET", "" } ,
+ { 0x1002, 0x4654, "Mach64 VT", "" } ,
+ { 0x1002, 0x4742, "ATI GTC (GT-C2U2)", "ATI 3D Rage Pro Turbo AGP 2X" } ,
+ { 0x1002, 0x4744, "Rage 3D Pro AGP 1x", "" } ,
+ { 0x1002, 0x4747, "Rage 3D Pro", "" } ,
+ { 0x1002, 0x4749, "Rage Pro Turbo PCI", "ATI ALL IN WONDER PRO (8MB)" } ,
+ { 0x1002, 0x474C, "Rage XC PCI-66", "" } ,
+ { 0x1002, 0x474D, "Rage XL AGP 2x", "" } ,
+ { 0x1002, 0x474E, "Rage XC AGP 2x", "" } ,
+ { 0x1002, 0x474F, "Rage XL PCI-66", "" } ,
+ { 0x1002, 0x4750, "Rage 3D Pro PCI", "Graphics Accelerator" } ,
+ { 0x1002, 0x4751, "Rage 3D Pro PCI", "" } ,
+ { 0x1002, 0x4752, "Rage XL PCI", "" } ,
+ { 0x1002, 0x4753, "Rage XC PCI", "" } ,
+ { 0x1002, 0x4754, "Mach 64 GT", "Rage 3D II Graphics Accelerator" } ,
+ { 0x1002, 0x4755, "Rage 3D II+", "" } ,
+ { 0x1002, 0x4756, "Rage 3D IIC PCI", "Graphics Accelerator" } ,
+ { 0x1002, 0x4757, "3D 11C AGP", "Rage 3D IIC AGP" } ,
+ { 0x1002, 0x4758, "210888GX", "Mach 64 GX (WinTurbo)" } ,
+ { 0x1002, 0x4759, "", "Rage 3D IIC" } ,
+ { 0x1002, 0x475A, "", "Rage 3D IIC AGP" } ,
+ { 0x1002, 0x4966, "RV250", "Radeon 9000/9000 Pro" } ,
+ { 0x1002, 0x496E, "RV250", "Radeon 9000/9000 Pro - Secondary" } ,
+ { 0x1002, 0x4C42, "", "Rage 3D LT Pro AGP 133 MHz" } ,
+ { 0x1002, 0x4C44, "", "Rage 3D LT Pro AGP 66 MHz" } ,
+ { 0x1002, 0x4C45, "", "Rage Mobility M3 AGP" } ,
+ { 0x1002, 0x4C46, "Mobility M3 AGP 2x", "" } ,
+ { 0x1002, 0x4C47, "", "Rage 3D LT-G" } ,
+ { 0x1002, 0x4C49, "", "Rage 3D LT Pro PCI" } ,
+ { 0x1002, 0x4C4D, "01541014", "Rage P/M Mobility AGP 2x" } ,
+ { 0x1002, 0x4C4E, "", "Rage L Mobility AGP 2x" } ,
+ { 0x1002, 0x4C50, "", "Rage 3D LT Pro PCI" } ,
+ { 0x1002, 0x4C51, "", "Rage 3D LT Pro PCI" } ,
+ { 0x1002, 0x4C52, "", "Rage P/M Mobility PCI" } ,
+ { 0x1002, 0x4C53, "", "Rage L Mobility PCI" } ,
+ { 0x1002, 0x4C54, "", "Mach 64 LT" } ,
+ { 0x1002, 0x4C57, "", "Radeon Mobility M7 LW" } ,
+ { 0x1002, 0x4C58, "", "FireGL Mobility" } ,
+ { 0x1002, 0x4C59, "Mobility 6", "Radeon Mobility M6 LY" } ,
+ { 0x1002, 0x4C5A, "", "Radeon Mobility M6 LZ" } ,
+ { 0x1002, 0x4C64, "", "Radeon Mobility M9-GL" } ,
+ { 0x1002, 0x4C66, "", "Radeon Mobility M9" } ,
+ { 0x1002, 0x4D46, "", "Rage Mobility 128 AGP 4x" } ,
+ { 0x1002, 0x4D4C, "", "Rage Mobility 128 AGP" } ,
+ { 0x1002, 0x4E44, "R300", "Radeon 9700/9500 Series" } ,
+ { 0x1002, 0x4E45, "R300", "Radeon 9700/9500 Series" } ,
+ { 0x1002, 0x4E47, "", "ATI Fire GL X1/Z1 Video Accelerator" } ,
+ { 0x1002, 0x4E64, "R300", "Radeon 9700/9500 Series - Secondary" } ,
+ { 0x1002, 0x4E65, "R300", "Radeon 9700/9500 Series - Secondary" } ,
+ { 0x1002, 0x4E67, "", "ATI Fire GL X1/Z1 SECONDARY Video" } ,
+ { 0x1002, 0x5041, "", "Rage 128 Pro PA PCI" } ,
+ { 0x1002, 0x5042, "", "Rage 128 Pro PB AGP 2x" } ,
+ { 0x1002, 0x5043, "", "Rage 128 Pro PC AGP 4x" } ,
+ { 0x1002, 0x5044, "", "Rage 128 Pro PD PCI" } ,
+ { 0x1002, 0x5045, "", "Rage 128 Pro PE AGP 2x" } ,
+ { 0x1002, 0x5046, "", "Rage 128 Pro PF AGP 4x" } ,
+ { 0x1002, 0x5047, "", "Rage 128 Pro PG PCI" } ,
+ { 0x1002, 0x5048, "Rage 128 Pro PH AGP ", "Rage 128 Pro PH AGP 2x" } ,
+ { 0x1002, 0x5049, "Rage 128 Pro PI AGP ", "Rage 128 Pro PI AGP 4x" } ,
+ { 0x1002, 0x504A, "Rage 128 Pro PJ PCI", "Rage 128 Pro PJ PCI (TMDS)" } ,
+ { 0x1002, 0x504B, "Rage 128 Pro PK AGP ", "Rage 128 Pro PK AGP 2x (TMDS)" } ,
+ { 0x1002, 0x504C, "Rage 128 Pro PL AGP ", "Rage 128 Pro PL AGP 4x (TMDS)" } ,
+ { 0x1002, 0x504D, "Rage 128 Pro PM PCI", "Rage 128 Pro PM PCI" } ,
+ { 0x1002, 0x504E, "Rage 128 Pro PN AGP ", "Rage 128 Pro PN AGP 2x" } ,
+ { 0x1002, 0x504F, "Rage 128 Pro PO AGP ", "Rage 128 Pro PO AGP 4x" } ,
+ { 0x1002, 0x5050, "Rage 128 Pro PP PCI", "Rage 128 Pro PP PCI (TMDS)" } ,
+ { 0x1002, 0x5051, "Rage 128 Pro PQ AGP ", "Rage 128 Pro PQ AGP 2x (TMDS)" } ,
+ { 0x1002, 0x5052, "Rage 128 Pro PR AGP ", "Rage 128 Pro PR AGP 4x (TMDS)" } ,
+ { 0x1002, 0x5053, "Rage 128 Pro PS PCI", "Rage 128 Pro PS PCI" } ,
+ { 0x1002, 0x5054, "Rage 128 Pro PT AGP ", "Rage 128 Pro PT AGP 2x" } ,
+ { 0x1002, 0x5055, "Rage 128 Pro PU AGP ", "Rage 128 Pro PU AGP 4x" } ,
+ { 0x1002, 0x5056, "Rage 128 Pro PV PCI", "Rage 128 Pro PV PCI (TMDS)" } ,
+ { 0x1002, 0x5057, "Rage 128 Pro PW AGP ", "Rage 128 Pro PW AGP 2x (TMDS)" } ,
+ { 0x1002, 0x5058, "Rage 128 Pro PX AGP ", "Rage 128 Pro PX AGP 4x (TMDS)" } ,
+ { 0x1002, 0x5144, "", "Radeon 7200 QD SDR/DDR" } ,
+ { 0x1002, 0x5145, "", "Radeon QE" } ,
+ { 0x1002, 0x5146, "", "Radeon QF" } ,
+ { 0x1002, 0x5147, "", "Radeon QG" } ,
+ { 0x1002, 0x5148, "R200", "Radeon R200 QH" } ,
+ { 0x1002, 0x5149, "", "Radeon R200 QI" } ,
+ { 0x1002, 0x514A, "", "Radeon R200 QJ" } ,
+ { 0x1002, 0x514B, "", "Radeon R200 QK" } ,
+ { 0x1002, 0x514C, "R200", "Radeon 8500 / 8500LE" } ,
+ { 0x1002, 0x514E, "", "Radeon R200 QM" } ,
+ { 0x1002, 0x514F, "", "Radeon R200 QN" } ,
+ { 0x1002, 0x5157, "RV200", "Radeon 7500" } ,
+ { 0x1002, 0x5158, "", "Radeon 7500 QX" } ,
+ { 0x1002, 0x5159, "Radeon VE QY", "Radeon 7000 / Radeon VE" } ,
+ { 0x1002, 0x515A, "", "Radeon VE QZ" } ,
+ { 0x1002, 0x5168, "", "Radeon R200 Qh" } ,
+ { 0x1002, 0x5169, "", "Radeon R200 Qi" } ,
+ { 0x1002, 0x516A, "", "Radeon R200 Qj" } ,
+ { 0x1002, 0x516B, "", "Radeon R200 Qk" } ,
+ { 0x1002, 0x516C, "", "Radeon 8500 / 8500LE" } ,
+ { 0x1002, 0x5245, "", "Rage 128 GL PCI" } ,
+ { 0x1002, 0x5246, "Rage 128 GL AGP 2x", "Rage Fury 16/32MB" } ,
+ { 0x1002, 0x5247, "", "Rage 128 RG" } ,
+ { 0x1002, 0x524B, "", "Rage 128 VR RK PCI" } ,
+ { 0x1002, 0x524C, "", "Rage 128 VR RL AGP 2x" } ,
+ { 0x1002, 0x5345, "", "Rage 128 4x SE PCI" } ,
+ { 0x1002, 0x5346, "", "Rage 128 SF 4x AGP 2x" } ,
+ { 0x1002, 0x5347, "", "Rage 128 SG 4x AGP 4x" } ,
+ { 0x1002, 0x5348, "", "Rage 128 4x SH" } ,
+ { 0x1002, 0x534B, "Rage 128 SK PCI", "Rage 128 4x SK PCI" } ,
+ { 0x1002, 0x534C, "Rage 128 SL AGP 2x", "Rage 128 4x SL AGP 2x" } ,
+ { 0x1002, 0x534D, "Rage 128 SM AGP 4x", "Rage 128 4x SM AGP 4x" } ,
+ { 0x1002, 0x534E, "Rage 128 4x", "" } ,
+ { 0x1002, 0x5354, "", "Mach 64 ST" } ,
+ { 0x1002, 0x5446, "Rage 128 PRO ULTRA", "" } ,
+ { 0x1002, 0x544C, "", "Rage 128 Pro TL" } ,
+ { 0x1002, 0x5452, "", "Rage 128 Pro TR" } ,
+ { 0x1002, 0x5455, "", "Rage 128 Pro Ultra TU" } ,
+ { 0x1002, 0x5654, "215VT222", "Mach 64 VT VIDEO XPRESSION" } ,
+ { 0x1002, 0x5655, "", "Mach 64 VT3" } ,
+ { 0x1002, 0x5656, "", "Mach 64 VT4 PCI" } ,
+ { 0x1002, 0x700F, "", "PCI to AGP Bridge" } ,
+ { 0x1002, 0xCAB0, "", "CPU to PCI Bridge" } ,
+ { 0x1003, 0x0201, "US201", "GUI Accelerator" } ,
+ { 0x1004, 0x0005, "82C591/2-FC1", "CPU Bridge" } ,
+ { 0x1004, 0x0006, "82C593", "ISA Bridge" } ,
+ { 0x1004, 0x0007, "82C594", "Wildcat System Controller" } ,
+ { 0x1004, 0x0008, "82C596/597", "Wildcat ISA Bridge" } ,
+ { 0x1004, 0x0009, "82C597-AFC2", "" } ,
+ { 0x1004, 0x000C, "82C541", "" } ,
+ { 0x1004, 0x000D, "82C543", "" } ,
+ { 0x1004, 0x0100, "", "CPU to PCI Bridge for notebook" } ,
+ { 0x1004, 0x0101, "82C532", "Peripheral Controller" } ,
+ { 0x1004, 0x0102, "82C534", "PCI to PCI Bridge" } ,
+ { 0x1004, 0x0103, "82C538", "PCI to ISA Bridge" } ,
+ { 0x1004, 0x0104, "82C535", "Host Bridge" } ,
+ { 0x1004, 0x0105, "82C147", "IrDA Controller" } ,
+ { 0x1004, 0x0200, "82C975", "RISC GUI Accelerator" } ,
+ { 0x1004, 0x0280, "82C925", "RISC GUI Accelerator" } ,
+ { 0x1004, 0x0304, "SAA7785", "ThunderBird PCI Audio Accelerator" } ,
+ { 0x1004, 0x0305, "SAA7785", "ThunderBird joystick port" } ,
+ { 0x1004, 0x0306, "SAA7785", "ThunderBird 16650 UART" } ,
+ { 0x1004, 0x0307, "", "Philips Seismic Edge 705" } ,
+ { 0x1004, 0x0308, "", "Philips PSC705 GamePort Enumerator" } ,
+ { 0x1004, 0x0702, "VAS96011", "Golden Gate II" } ,
+ { 0x1005, 0x2064, "ALG2032/2064", "alg2032 63067s1" } ,
+ { 0x1005, 0x2128, "ALG2364A", "" } ,
+ { 0x1005, 0x2301, "ALG2301", "GUI Accelerator" } ,
+ { 0x1005, 0x2302, "ALG2302", "GUI Accelerator" } ,
+ { 0x1005, 0x2364, "AL2364", "GUI Accelerator" } ,
+ { 0x1005, 0x2464, "ALG2364A", "" } ,
+ { 0x1005, 0x2501, "ALG2564A/25128A", "" } ,
+ { 0x100B, 0x0001, "DP83810", "10/100 Ethernet MAC" } ,
+ { 0x100B, 0x0002, "PC87415", "PCI-IDE DMA Master Mode Interface Ctrlr" } ,
+ { 0x100B, 0x000E, "PC87560", "Legacy I/O Controller" } ,
+ { 0x100B, 0x000F, "CS4210", "IEEE 1394 OHCI Controller" } ,
+ { 0x100B, 0x0011, "PC87560", "PCI System I/O" } ,
+ { 0x100B, 0x0012, "", "USB Controller" } ,
+ { 0x100B, 0x001B, "LM4560", "Advanced PCI Audio Accelerator" } ,
+ { 0x100B, 0x0020, "DP83815/16", "MacPhyter 10/100 Mb/s Ethernet MAC & PHY" } ,
+ { 0x100B, 0x0021, "PC87200", "PCI to ISA Bridge" } ,
+ { 0x100B, 0x0022, "DP83820/1", "10/100/1000 Mb/s PCI Ethernet NIC" } ,
+ { 0x100B, 0x0500, "SCx200", "Bridge" } ,
+ { 0x100B, 0x0501, "SCx200", "SMI" } ,
+ { 0x100B, 0x0502, "SCx200", "IDE" } ,
+ { 0x100B, 0x0503, "SCx200", "Audio" } ,
+ { 0x100B, 0x0504, "SCx200", "Video" } ,
+ { 0x100B, 0x0505, "SCx200", "XBus" } ,
+ { 0x100B, 0xD001, "PC87410", "PCI-IDE Interface" } ,
+ { 0x100C, 0x3202, "ET4000W32P-A", "GUI Accelerator" } ,
+ { 0x100C, 0x3205, "ET4000W32P-B", "GUI Accelerator" } ,
+ { 0x100C, 0x3206, "ET4000W32P-C", "GUI Accelerator" } ,
+ { 0x100C, 0x3207, "ET4000W32P-D", "GUI Accelerator" } ,
+ { 0x100C, 0x3208, "ET6000", "Graphics/Multimedia Engine" } ,
+ { 0x100C, 0x4702, "ET6300", "" } ,
+ { 0x100E, 0x0564, "STPC Client", "Host Bridge" } ,
+ { 0x100E, 0x55CC, "STPC Client", "South Bridge" } ,
+ { 0x100E, 0x9000, "P9000", "WeitekPower GUI Accelerator" } ,
+ { 0x100E, 0x9001, "P9000", "GUI Accelerator" } ,
+ { 0x100E, 0x9100, "P9100", "GUI Accelerator" } ,
+ { 0x1011, 0x0001, "DC21050", "PCI-PCI Bridge" } ,
+ { 0x1011, 0x0002, "DC21040", "Tulip Ethernet Adapter" } ,
+ { 0x1011, 0x0004, "DC21030", "PCI Graphics Accelerator" } ,
+ { 0x1011, 0x0007, "Zephyr", "NV-RAM" } ,
+ { 0x1011, 0x0008, "KZPSA", "SCSI to SCSI Adapter" } ,
+ { 0x1011, 0x0009, "DC21140", "Fast Ethernet Ctrlr" } ,
+ { 0x1011, 0x000A, "DC21230", "Video Codec" } ,
+ { 0x1011, 0x000C, "DC21130", "PCI Integrated Graphics & Video Accel" } ,
+ { 0x1011, 0x000D, "TGA2", "TGA2 PDXGB" } ,
+ { 0x1011, 0x000F, "DEFPA", "FDDI" } ,
+ { 0x1011, 0x0014, "DC21041", "Tulip Plus Ethernet Adapter" } ,
+ { 0x1011, 0x0016, "DGLPB", "ATM" } ,
+ { 0x1011, 0x0019, "DC21142/3", "PCI/CardBus 10/100 Mbit Ethernet Ctlr" } ,
+ { 0x1011, 0x0021, "21052[-AB]", "PCI-PCI Bridge" } ,
+ { 0x1011, 0x0022, "DC21150-AA", "PCI-PCI Bridge" } ,
+ { 0x1011, 0x0023, "DC21150", "PCI to PCI Bridge" } ,
+ { 0x1011, 0x0024, "DC21151/2", "PCI-PCI Bridge" } ,
+ { 0x1011, 0x0025, "21153", "PCI-PCI Bridge" } ,
+ { 0x1011, 0x0026, "21154", "PCI-PCI Bridge" } ,
+ { 0x1011, 0x0034, "Modem56", "CardBus" } ,
+ { 0x1011, 0x0045, "DC21553", "PCI to PCI Bridge" } ,
+ { 0x1011, 0x0046, "21554", "PCI-to-PCI Bridge" } ,
+ { 0x1011, 0x1065, "21285", "Core Logic for SA-110 Microprocessor" } ,
+ { 0x1013, 0x0038, "CL-GD7548", "GUI-Accelerated XGA/SVGA LCD Controller" } ,
+ { 0x1013, 0x0040, "CL-GD7555", "Flat Panel GUI Accelerator" } ,
+ { 0x1013, 0x004C, "CL-GD7556", "64-bit Accelerated LCD/CRT Controller" } ,
+ { 0x1013, 0x00A0, "CL-GD5340", "GUI Accelerator" } ,
+ { 0x1013, 0x00A2, "CL-GD5432", "Alpine GUI Accelerator" } ,
+ { 0x1013, 0x00A4, "CL-GD5434", "Alpine GUI Accelerator" } ,
+ { 0x1013, 0x00A8, "CL-GD5434", "Alpine GUI Accelerator" } ,
+ { 0x1013, 0x00AC, "CL-GD5436", "Alpine GUI Accelerator" } ,
+ { 0x1013, 0x00B8, "CL-GD5446", "64-bit VisualMedia Accelerator" } ,
+ { 0x1013, 0x00BC, "CL-GD5480", "64-bit SGRAM GUI accelerator" } ,
+ { 0x1013, 0x00D0, "CL-GD5462", "Laguna VisualMedia graphics accelerator" } ,
+ { 0x1013, 0x00D4, "CL-GD5464", "Laguna 3D VisualMedia Graphics Accel" } ,
+ { 0x1013, 0x00D5, "CL-GD5464", "Laguna BD" } ,
+ { 0x1013, 0x00D6, "CL-GD5465", "Laguna 3D VisualMedia Graphics Accel" } ,
+ { 0x1013, 0x00E8, "CL-GD5436U", "" } ,
+ { 0x1013, 0x1100, "CL-PD6729", "PCI-to-PC Card host adapter" } ,
+ { 0x1013, 0x1110, "CL-PD6832", "PCMCIA/CardBus Controller" } ,
+ { 0x1013, 0x1112, "CL-PD6834", "PCMCIA/CardBus Controller" } ,
+ { 0x1013, 0x1113, "CL-PD6833", "PCI-to-CardBus Host Adapter" } ,
+ { 0x1013, 0x1200, "CL-GD7542", "Nordic GUI Accelerator" } ,
+ { 0x1013, 0x1202, "CL-GD7543", "Viking GUI Accelerator" } ,
+ { 0x1013, 0x1204, "CL-GD7541", "Nordic-lite VGA Cntrlr" } ,
+ { 0x1013, 0x4400, "CL-CD4400", "Communications Controller" } ,
+ { 0x1013, 0x6001, "CS4610", "CrystalClear SoundFusion PCI Audio Accel" } ,
+ { 0x1013, 0x6003, "CS4610/14/22/24/30", "CrystalClear SoundFusion PCI Audio Accel" } ,
+ { 0x1013, 0x6004, "CS4615", "CrystalClear SoundFusion PCI Audio Accel" } ,
+ { 0x1013, 0x6005, "CS4281", "CrystalClear PCI Audio Interface" } ,
+ { 0x1014, 0x0002, "MCA Bridge", "MCA Bridge" } ,
+ { 0x1014, 0x0005, "Alta Lite", "CPU Bridge" } ,
+ { 0x1014, 0x0007, "Alta MP", "CPU Bridge" } ,
+ { 0x1014, 0x000A, "Fire Coral", "ISA Bridge w/PnP" } ,
+ { 0x1014, 0x0017, "", "CPU to PCI Bridge" } ,
+ { 0x1014, 0x0018, "Auto LANStreamer", "TR Auto LANStreamer" } ,
+ { 0x1014, 0x001B, "GXT-150P", "Graphics Adapter" } ,
+ { 0x1014, 0x001D, "82G2675", "scsi-2 fast pci adapter" } ,
+ { 0x1014, 0x0020, "", "MCA Bridge" } ,
+ { 0x1014, 0x0022, "82351/2", "PCI to PCI Bridge" } ,
+ { 0x1014, 0x002D, "Python", "" } ,
+ { 0x1014, 0x002E, "ServeRAID I/II/3x/4H", "Coppertime RAID SCSI Adapter" } ,
+ { 0x1014, 0x0036, "Miami/PCI", "32-bit LocalBus Bridge" } ,
+ { 0x1014, 0x0037, "IBM27-82660", "PowerPC to PCI Bridge and Memory Ctrlr" } ,
+ { 0x1014, 0x003A, "", "CPU to PCI Bridge" } ,
+ { 0x1014, 0x003E, "85H9533", "16/4 Token Ring PCI IBM UTP/STP Ctrlr" } ,
+ { 0x1014, 0x0045, "", "SSA Adapter" } ,
+ { 0x1014, 0x0046, "MPIC", "Interrupt Controller" } ,
+ { 0x1014, 0x0047, "", "PCI to PCI Bridge" } ,
+ { 0x1014, 0x0048, "", "PCI to PCI Bridge" } ,
+ { 0x1014, 0x0049, "", "Warhead SCSI Controller" } ,
+ { 0x1014, 0x004E, "", "ATM Controller" } ,
+ { 0x1014, 0x004F, "", "ATM Controller" } ,
+ { 0x1014, 0x0050, "", "ATM Controller" } ,
+ { 0x1014, 0x0053, "", "25 MBit ATM controller" } ,
+ { 0x1014, 0x0057, "", "MPEG PCI Bridge" } ,
+ { 0x1014, 0x005C, "i82557B", "10/100 PCI Ethernet Adapter" } ,
+ { 0x1014, 0x005D, "05J3506", "TCP/IP networking device" } ,
+ { 0x1014, 0x007C, "", "ATM Controller" } ,
+ { 0x1014, 0x007D, "3780IDSP", "MPEG-2 Decoder" } ,
+ { 0x1014, 0x0090, "GXT-3000P", "" } ,
+ { 0x1014, 0x0095, "20H2999", "PCI Docking Bridge" } ,
+ { 0x1014, 0x0096, "", "Chukar chipset SCSI Controller" } ,
+ { 0x1014, 0x00A1, "PowerNP NPr2.7", "ATM support device" } ,
+ { 0x1014, 0x00A5, "", "ATM Controller" } ,
+ { 0x1014, 0x00A6, "", "ATM 155Mbps MM Controller" } ,
+ { 0x1014, 0x00B7, "GXT2000", "256-bit Graphics Rasterizer" } ,
+ { 0x1014, 0x00BE, "", "ATM 622Mbps Controller" } ,
+ { 0x1014, 0x00CE, "02li537", "Adapter 2 Token Ring Card" } ,
+ { 0x1014, 0x00F9, "CPC700", "Memory Controller and PCI Bridge" } ,
+ { 0x1014, 0x00FC, "CPC710", "PCI-64 Bridge" } ,
+ { 0x1014, 0x0105, "CPC710", "PCI-32 Bridge" } ,
+ { 0x1014, 0x010F, "", "Remote Supervisor+Serial Port+Mouse/Keyb" } ,
+ { 0x1014, 0x011B, "", "Raid controller" } ,
+ { 0x1014, 0x0142, "Yotta", "Video Compositor Input" } ,
+ { 0x1014, 0x0144, "Yotta", "Video Compositor Output" } ,
+ { 0x1014, 0x0156, "405GP", "PLB to PCI Bridge" } ,
+ { 0x1014, 0x0170, "RC1000", "Rasterizer/IBM GT1000 Geometr" } ,
+ { 0x1014, 0x01A7, "IBM 133", "PCI-X Bridge R1.1" } ,
+ { 0x1014, 0x01BD, "ServeRAID 4/5", "Morpheus SCSI RAID Controller" } ,
+ { 0x1014, 0x01ef, "440GP", "PLB to PCI-X Bridge" } ,
+ { 0x1014, 0x0302, "", "PCI-X Host Bridge" } ,
+ { 0x1014, 0xFFFF, "MPIC 2", "Interrupt Controller" } ,
+ { 0x1017, 0x5343, "", "SPEA 3D Accelerator" } ,
+ { 0x101A, 0x0005, "8156", "100VG/AnyLAN Adapter" } ,
+ { 0x101A, 0x0009, "Altera FLEX", "??? Raid Controller ???" } ,
+ { 0x101C, 0x0193, "WD33C193A", "8-bit SCSI Cntrlr" } ,
+ { 0x101C, 0x0196, "WD33C196A", "PCI-SCSI Bridge" } ,
+ { 0x101C, 0x0197, "WD33C197A", "16-bit SCSI Cntrlr" } ,
+ { 0x101C, 0x0296, "WD33C296A", "high perf 16-bit SCSI Cntrlr" } ,
+ { 0x101C, 0x3193, "WD7193", "Fast SCSI-II" } ,
+ { 0x101C, 0x3197, "WD7197", "Fast-wide SCSI-II" } ,
+ { 0x101C, 0x3296, "WD33C296A", "Fast Wide SCSI bridge" } ,
+ { 0x101C, 0x4296, "WD34C296", "Wide Fast-20 Bridge" } ,
+ { 0x101C, 0x9710, "Pipeline 9710", "" } ,
+ { 0x101C, 0x9712, "Pipeline 9712", "" } ,
+ { 0x101C, 0xC24A, "90C", "" } ,
+ { 0x101e, 0x1960, "80960RP", "i960RP Microprocessor" } ,
+ { 0x101E, 0x9010, "MegaRAID 428", "Ultra Wide SCSI RAID Controller" } ,
+ { 0x101E, 0x9030, "", "EIDE Controller" } ,
+ { 0x101E, 0x9031, "", "EIDE Controller" } ,
+ { 0x101E, 0x9032, "", "IDE and SCSI Cntrlr" } ,
+ { 0x101E, 0x9033, "", "SCSI Controller" } ,
+ { 0x101E, 0x9040, "", "Multimedia card" } ,
+ { 0x101E, 0x9060, "MegaRAID 434", "Ultra GT RAID Controller" } ,
+ { 0x101E, 0x9063, "MegaRAC", "" } ,
+ { 0x1022, 0x2000, "Am79C970/1/2/3/5/6", "PCnet LANCE PCI Ethernet Controller" } ,
+ { 0x1022, 0x2001, "Am79C978", "PCnet-Home Networking Ctrlr (1/10 Mbps)" } ,
+ { 0x1022, 0x2020, "53C974", "SCSI Ctrlr" } ,
+ { 0x1022, 0x2040, "79C974", "Ethernet & SCSI Ctrlr" } ,
+ { 0x1022, 0x3000, "", "ELAN SC520 Rev. B0" } ,
+ { 0x1022, 0x7004, "AMD-751", "CPU to PCI Bridge" } ,
+ { 0x1022, 0x7006, "AMD-751", "Processor-to-PCI Bridge / Memory Ctrlr" } ,
+ { 0x1022, 0x7007, "AMD-751", "AGP and PCI-to-PCI Bridge (1x/2x AGP)" } ,
+ { 0x1022, 0x700C, "AMD-762", "CPU to PCI Bridge (SMP chipset)" } ,
+ { 0x1022, 0x700D, "AMD-762", "CPU to PCI Bridge (AGP 4x)" } ,
+ { 0x1022, 0x700E, "AMD-761", "North Bridge" } ,
+ { 0x1022, 0x700F, "AMD-761", "CPU to AGP Bridge (AGP 4x)" } ,
+ { 0x1022, 0x7400, "AMD-755", "PCI to ISA Bridge" } ,
+ { 0x1022, 0x7401, "AMD-755", "Bus Master IDE Controller" } ,
+ { 0x1022, 0x7403, "AMD-755", "Power Management Controller" } ,
+ { 0x1022, 0x7404, "AMD-755", "PCI to USB Open Host Controller" } ,
+ { 0x1022, 0x7408, "AMD-756", "PCI-ISA Bridge" } ,
+ { 0x1022, 0x7409, "AMD-756", "EIDE Controller" } ,
+ { 0x1022, 0x740B, "AMD-756", "Power Management" } ,
+ { 0x1022, 0x740C, "AMD-756", "USB Open Host Controller" } ,
+ { 0x1022, 0x7410, "AMD-766", "PCI to ISA/LPC Bridge" } ,
+ { 0x1022, 0x7411, "AMD-766", "Enhanced IDE Controller" } ,
+ { 0x1022, 0x7412, "AMD-766", "USB Controller" } ,
+ { 0x1022, 0x7413, "AMD-766", "Power Management Controller" } ,
+ { 0x1022, 0x7414, "AMD-766", "USB OpenHCI Host Controller" } ,
+ { 0x1022, 0x7440, "AMD-768", "LPC Bridge" } ,
+ { 0x1022, 0x7441, "AMD-768", "EIDE Controller" } ,
+ { 0x1022, 0x7443, "AMD-768", "System Management" } ,
+ { 0x1022, 0x7445, "AMD-768", "AC97 Audio" } ,
+ { 0x1022, 0x7446, "AMD-768", "AC97 Modem" } ,
+ { 0x1022, 0x7448, "AMD-768", "PCI Bridge" } ,
+ { 0x1022, 0x7449, "AMD-768", "USB Controller" } ,
+ { 0x1022, 0x7454, "AMD-8151", "System Controller" } ,
+ { 0x1022, 0x7455, "AMD-8151", "AGP Bridge" } ,
+ { 0x1022, 0x7460, "AMD-8111", "PCI Bridge" } ,
+ { 0x1022, 0x7461, "AMD-8111", "USB 2.0 Controller" } ,
+ { 0x1022, 0x7462, "AMD-8111", "Ethernet Controller" } ,
+ { 0x1022, 0x7463, "", "Enhanced USB Controller" } ,
+ { 0x1022, 0x7464, "", "OpenHCI USB Host Controller" } ,
+ { 0x1022, 0x7468, "AMD-8111", "LPC Bridge" } ,
+ { 0x1022, 0x7469, "AMD-8111", "UltraATA/133 Controller" } ,
+ { 0x1022, 0x746A, "AMD-8111", "SMBus 2.0 Controller" } ,
+ { 0x1022, 0x746B, "AMD-8111", "ACPI Controller" } ,
+ { 0x1022, 0x746D, "AMD-8111", "AC97 Audio Controller" } ,
+ { 0x1022, 0x756B, "AMD-8111", "ACPI Controller" } ,
+ { 0x1023, 0x0194, "82C194", "CardBus Controller" } ,
+ { 0x1023, 0x2000, "4DWAVE-DX", "advanced PCI DirectSound accelerator" } ,
+ { 0x1023, 0x2001, "4DWAVE-NX", "PCI Audio" } ,
+ { 0x1023, 0x8400, "CyberBlade i7", "" } ,
+ { 0x1023, 0x8420, "CyberBlade i7 AGP", "" } ,
+ { 0x1023, 0x8500, "CyberBlade i1", "AGP 51 (77?)" } ,
+ { 0x1023, 0x8520, "CyberBlade i1 AGP", "" } ,
+ { 0x1023, 0x8620, "CyberBlade-A i1", "" } ,
+ { 0x1023, 0x8820, "CyberBlade XPAi1", "" } ,
+ { 0x1023, 0x9320, "TGUI9320", "32-bit GUI Accelerator" } ,
+ { 0x1023, 0x9350, "TGUI9350", "32-bit GUI Accelerator" } ,
+ { 0x1023, 0x9360, "", "Flat panel Cntrlr" } ,
+ { 0x1023, 0x9382, "Cyber9382", "" } ,
+ { 0x1023, 0x9383, "Cyber9383", "" } ,
+ { 0x1023, 0x9385, "Cyber9385", "" } ,
+ { 0x1023, 0x9386, "Cyber9386", "Video Accelerator" } ,
+ { 0x1023, 0x9388, "Cyber9388", "Video Accelerator" } ,
+ { 0x1023, 0x9397, "Cyber9397", "Video Accelerator" } ,
+ { 0x1023, 0x939A, "Cyber9397DVD", "Video Accelerator" } ,
+ { 0x1023, 0x9420, "TGUI9420", "DGi GUI Accelerator" } ,
+ { 0x1023, 0x9430, "TGUI9430", "GUI Accelerator" } ,
+ { 0x1023, 0x9440, "TGUI9440", "DGi GUI Acclerator" } ,
+ { 0x1023, 0x9460, "TGUI9460", "32-bit GUI Accelerator" } ,
+ { 0x1023, 0x9470, "TGUI9470", "" } ,
+ { 0x1023, 0x9520, "Cyber9520", "Video Accelerator" } ,
+ { 0x1023, 0x9525, "Cyber9525", "Video Accelerator" } ,
+ { 0x1023, 0x9540, "Cyber9540", "Video Acclerator" } ,
+ { 0x1023, 0x9660, "TGUI9660XGi", "GUI Accelerator" } ,
+ { 0x1023, 0x9680, "TGUI9680", "GUI Accelerator" } ,
+ { 0x1023, 0x9682, "TGUI9682", "Multimedia Accelerator" } ,
+ { 0x1023, 0x9683, "TGUI9683", "GUI Accelerator" } ,
+ { 0x1023, 0x9685, "ProVIDIA 9685", "" } ,
+ { 0x1023, 0x9750, "3DImage 9750 PCI/AGP", "trident dgi" } ,
+ { 0x1023, 0x9753, "TGUI9753", "Video Accelerator" } ,
+ { 0x1023, 0x9754, "TGUI9753", "Wave Video Accelerator" } ,
+ { 0x1023, 0x9759, "TGUI975?", "Image GUI Accelerator" } ,
+ { 0x1023, 0x9783, "TGUI9783", "" } ,
+ { 0x1023, 0x9785, "TGUI9785", "" } ,
+ { 0x1023, 0x9850, "3D Image 9850 AGP", "" } ,
+ { 0x1023, 0x9880, "Blade 3D 9880", "" } ,
+ { 0x1023, 0x9910, "", "CyberBlade XP" } ,
+ { 0x1023, 0x9930, "CyberBlade XPm", "" } ,
+ { 0x1024, 0x1024, "R6785-61", "HCF 56k PCI Modem" } ,
+ { 0x1025, 0x1435, "M1435", "CPU to PCI & PCI to ISA Bridge" } ,
+ { 0x1025, 0x1445, "M1445", "VL Bridge & EIDE" } ,
+ { 0x1025, 0x1449, "M1449", "ISA Bridge" } ,
+ { 0x1025, 0x1451, "M1451", "Pentium Chipset" } ,
+ { 0x1025, 0x1461, "M1461", "P54C Chipset" } ,
+ { 0x1025, 0x1489, "M1489", "" } ,
+ { 0x1025, 0x1511, "M1511", "" } ,
+ { 0x1025, 0x1512, "M1512", "" } ,
+ { 0x1025, 0x1513, "M1513", "" } ,
+ { 0x1025, 0x1521, "M1521", "CPU Bridge" } ,
+ { 0x1025, 0x1523, "M1523", "ISA Bridge" } ,
+ { 0x1025, 0x1531, "M1531", "North Bridge" } ,
+ { 0x1025, 0x1533, "M1533", "ISA South Bridge" } ,
+ { 0x1025, 0x1535, "M1535", "PCI South Bridge" } ,
+ { 0x1025, 0x1541, "M1541", "AGP PCI North Bridge Aladdin V/V+" } ,
+ { 0x1025, 0x1542, "M1542", "AGP+PCI North Bridge" } ,
+ { 0x1025, 0x1543, "M1543C", "PCi South Bridge Aladdin IV+/V" } ,
+ { 0x1025, 0x1561, "M1561", "Northbridge" } ,
+ { 0x1025, 0x1621, "M1621", "PCI North Bridge Aladdin Pro II" } ,
+ { 0x1025, 0x1631, "M1631", "PCI North Bridge Aladdin Pro III" } ,
+ { 0x1025, 0x1641, "M1641", "PCI North Bridge Aladdin Pro IV" } ,
+ { 0x1025, 0x3141, "M3141", "GUI Accelerator" } ,
+ { 0x1025, 0x3143, "M3143", "GUI Accelerator" } ,
+ { 0x1025, 0x3145, "M3145", "GUI Accelerator" } ,
+ { 0x1025, 0x3147, "M3147", "GUI Accelerator" } ,
+ { 0x1025, 0x3149, "M3149", "GUI Accelerator" } ,
+ { 0x1025, 0x3151, "M3151", "GUI Accelerator" } ,
+ { 0x1025, 0x3307, "M3307", "MPEG-1 Decoder" } ,
+ { 0x1025, 0x3309, "M3309", "MPEG Decoder" } ,
+ { 0x1025, 0x5212, "M4803", "" } ,
+ { 0x1025, 0x5215, "M5217", "EIDE Controller" } ,
+ { 0x1025, 0x5217, "M5217", "I/O Controller" } ,
+ { 0x1025, 0x5219, "M5219", "I/O Controller" } ,
+ { 0x1025, 0x5225, "M5225", "EIDE Controller" } ,
+ { 0x1025, 0x5229, "M5229", "EIDE Controller" } ,
+ { 0x1025, 0x5235, "M5235", "I/O Controller" } ,
+ { 0x1025, 0x5237, "M5237", "PCI USB Host Controller" } ,
+ { 0x1025, 0x5240, "", "EIDE Controller" } ,
+ { 0x1025, 0x5241, "", "PCMCIA Bridge" } ,
+ { 0x1025, 0x5242, "", "General Purpose Controller" } ,
+ { 0x1025, 0x5243, "", "PCI to PCI Bridge" } ,
+ { 0x1025, 0x5244, "", "Floppy Disk Controller" } ,
+ { 0x1025, 0x5247, "M1541", "PCI-PCI Bridge" } ,
+ { 0x1025, 0x5427, "", "PCI to AGP Bridge" } ,
+ { 0x1025, 0x5451, "M5451", "PCI AC-Link Controller Audio Device" } ,
+ { 0x1025, 0x5453, "M5453", "M5453 AC-Link Controller Modem Device" } ,
+ { 0x1025, 0x7101, "M7101", "PCI PMU Power Management Controller" } ,
+ { 0x1028, 0x0001, "PowerEdge 2 /Si", "Expandable RAID Controller" } ,
+ { 0x1028, 0x0002, "PowerEdge 3/Di", "Expandable RAID Controller" } ,
+ { 0x1028, 0x0003, "PowerEdge 3/Si", "Expandable RAID Controller" } ,
+ { 0x1028, 0x0004, "PowerEdge 3/Si", "Expandable RAID Controller" } ,
+ { 0x1028, 0x0005, "PowerEdge 3/Di", "Expandable RAID Controller" } ,
+ { 0x1028, 0x0006, "PowerEdge 3/Di", "Expandable RAID Controller" } ,
+ { 0x1028, 0x0007, "", "Remote Assistant Card 3" } ,
+ { 0x1028, 0x0008, "PowerEdge 3/Di", "Expandable RAID Controller" } ,
+ { 0x1028, 0x000A, "PowerEdge 3/Di", "Expandable RAID Controller" } ,
+ { 0x1028, 0x000C, "", "Embedded Systems Management Device 4" } ,
+ { 0x102A, 0x0000, "HYDRA", "P5 Chipset" } ,
+ { 0x102A, 0x0010, "ASPEN", "i486 Chipset" } ,
+ { 0x102a, 0x0310, "L64364", "ATMizer II+ ATM SAR Chip" } ,
+ { 0x102B, 0x0010, "MGA-I", "Impression?" } ,
+ { 0x102B, 0x0518, "MGA-PX2085", "Atlas GUI Accelerator" } ,
+ { 0x102B, 0x0519, "MGA-2064W", "Strorm GUI Accelerator" } ,
+ { 0x102B, 0x051A, "MGA 1064SG", "Hurricane/Cyclone 64-bit graphics chip" } ,
+ { 0x102B, 0x051B, "MGA-21164W", "Mistral" } ,
+ { 0x102B, 0x051E, "MGA-1164SG", "Chinook" } ,
+ { 0x102B, 0x051F, "MGA2164WA-B", "Mistral" } ,
+ { 0x102B, 0x0520, "MGA-G200B", "Eclipse/Calao" } ,
+ { 0x102B, 0x0521, "MGA-G200", "Eclipse/Calao" } ,
+ { 0x102b, 0x0525, "MGA-G400/450", "Toucan/Condor" } ,
+ { 0x102B, 0x0527, "Parhelia AGP", "" } ,
+ { 0x102B, 0x0D10, "MGA-I", "Athena GUI accelerator" } ,
+ { 0x102B, 0x1000, "MGA-G100", "Twister" } ,
+ { 0x102B, 0x1001, "MGA-G100", "Twister AGP" } ,
+ { 0x102B, 0x1525, "Fusion G450 AGP", "" } ,
+ { 0x102B, 0x1527, "Fusion Plus G800 AGP", "" } ,
+ { 0x102B, 0x2007, "Mistral", "GUI+3D Accelerator" } ,
+ { 0x102B, 0x2527, "MGA-G550", "AGP Chipset" } ,
+ { 0x102B, 0x4536, "Meteor 2 STD/MC/Dig", "Video Capture Card" } ,
+ { 0x102B, 0x6573, "Shark", "10/100 Multiport Switch NIC" } ,
+ { 0x102C, 0x00B8, "64310", "Wingine DGX - DRAM Graphics Accelerator" } ,
+ { 0x102C, 0x00C0, "69000", "AGP/PCI Flat Panel/CRT VGA Accelerator" } ,
+ { 0x102C, 0x00D0, "65545", "Flat panel/crt VGA Cntrlr" } ,
+ { 0x102C, 0x00D8, "65540", "Flat Panel/CRT VGA Controller" } ,
+ { 0x102C, 0x00DC, "65548", "GUI Accelerator" } ,
+ { 0x102C, 0x00E0, "65550", "LCD/CRT controller" } ,
+ { 0x102C, 0x00E4, "65554", "Flat Panel/LCD CRT GUI Accelerator" } ,
+ { 0x102C, 0x00E5, "65555", "VGA GUI Accelerator" } ,
+ { 0x102C, 0x00F0, "68554", "GUI Controller" } ,
+ { 0x102C, 0x00F4, "68554", "HiQVision Flat Panel/CRT GUI Controller" } ,
+ { 0x102C, 0x00F5, "68555", "GUI Controller" } ,
+ { 0x102C, 0x01E0, "65560", "PCI Flat Panel/CRT VGA Accelerator" } ,
+ { 0x102C, 0x0C30, "69030", "AGP/PCI Flat Panel/CRT VGA Accelerator" } ,
+ { 0x102D, 0x50DC, "3328", "Audio" } ,
+ { 0x102F, 0x0009, "r4x00", "CPU Bridge" } ,
+ { 0x102F, 0x0020, "Meteor 155", "ATM PCI Adapter" } ,
+ { 0x1031, 0x5601, "MiroVIDEO DC20", "I/O & JPEG" } ,
+ { 0x1031, 0x5607, "", "video in and out with motion jpeg compression and deco" } ,
+ { 0x1031, 0x5631, "Media 3D", "" } ,
+ { 0x1031, 0x6057, "MiroVIDEO DC10/DC30", "" } ,
+ { 0x1033, 0x0001, "upD98409", "PCI to 486 like bus Bridge" } ,
+ { 0x1033, 0x0002, "", "PCI to VL98 Bridge" } ,
+ { 0x1033, 0x0003, "", "ATM Controller" } ,
+ { 0x1033, 0x0004, "R4000", "PCI bus Bridge" } ,
+ { 0x1033, 0x0005, "", "PCI to 486 like peripheral bus Bridge" } ,
+ { 0x1033, 0x0006, "", "GUI Accelerator" } ,
+ { 0x1033, 0x0007, "", "PCI to ux-bus Bridge" } ,
+ { 0x1033, 0x0008, "", "GUI Accelerator (vga equivalent)" } ,
+ { 0x1033, 0x0009, "", "graphic Cntrlr for 98" } ,
+ { 0x1033, 0x001A, "Nile II", "" } ,
+ { 0x1033, 0x001D, "uPD98405", "NEASCOT-S20 ATM Integrated SAR Ctrlr" } ,
+ { 0x1033, 0x0021, "Vrc4373", "Nile I" } ,
+ { 0x1033, 0x0029, "PoverVR PCX1", "3D Accelerator" } ,
+ { 0x1033, 0x002A, "PoverVR", "3D Accelerator" } ,
+ { 0x1033, 0x0035, "uPD9210FGC-7EA", "USB Host Controller" } ,
+ { 0x1033, 0x0036, "uPD98409", "NEASCOT-S40C ATM Light SAR Controller" } ,
+ { 0x1033, 0x003E, "uPD66369", "NAPCCARD CardBus Controller" } ,
+ { 0x1033, 0x0046, "PoverVR PCX2", "3D Accelerator" } ,
+ { 0x1033, 0x005A, "Vrc5074", "Nile 4" } ,
+ { 0x1033, 0x0063, "uPD72862", "Firewarden IEEE1394 OHCI Host Controller" } ,
+ { 0x1033, 0x0067, "PowerVR Neon 250", "PowerVR series II graphics processor" } ,
+ { 0x1033, 0x0074, "", "56k Voice Modem" } ,
+ { 0x1033, 0x009B, "Vrc5476", "" } ,
+ { 0x1033, 0x00BE, "VR4122", "64-bit CPU with Northbridge" } ,
+ { 0x1033, 0x00CD, "uPD72870", "IEEE1394 1-Chip OHCI Host Controller" } ,
+ { 0x1033, 0x00CE, "uPD72871/2", "IEEE1394 1-Chip OHCI Host Controller" } ,
+ { 0x1033, 0x00E0, "uPD720100A", "USB 2.0 Host Controller" } ,
+ { 0x1033, 0x00E7, "uPD72873", "IEEE1394 OHCI 1.1 2-port PHY-Link Ctrlr" } ,
+ { 0x1033, 0x00F2, "uPD72874", "IEEE1394 OHCI 1.1 3-port PHY-Link Ctrlr" } ,
+ { 0x1036, 0x0000, "TMC-18C30", "Fast SCSI" } ,
+ { 0x1039, 0x0001, "SiS 530", "Virtual PCI-to-PCI bridge (AGP)" } ,
+ { 0x1039, 0x0002, "SiS 6201/02", "PCI True-Color Graphics Accelerator" } ,
+ { 0x1039, 0x0005, "", "Pentium chipset" } ,
+ { 0x1039, 0x0006, "SiS 85C501", "PCI/ISA Cache Memory Controller (PCMC)" } ,
+ { 0x1039, 0x0008, "SiS 85C503", "PCI System I/O (PSIO)" } ,
+ { 0x1039, 0x0009, "SiS 5595", "Power Management Unit (PMU)" } ,
+ { 0x1039, 0x0018, "SiS950", "PCI to ISA Bridge (LPC Bridge)" } ,
+ { 0x1039, 0x0200, "SiS5597/98", "Onboard Graphics Controller" } ,
+ { 0x1039, 0x0204, "SiS 6215", "PCI Graphics & Video Accelerator" } ,
+ { 0x1039, 0x0205, "SiS 6205", "PCI Graphics & Video Accelerator" } ,
+ { 0x1039, 0x0300, "SiS300/305/630", "GUI Accelerator+3D" } ,
+ { 0x1039, 0x0305, "SiS305", "2D/3D/Video/DVD Accelerator" } ,
+ { 0x1039, 0x0315, "SiS 315", "" } ,
+ { 0x1039, 0x0325, "SiS325", "2D/3D Accelerator" } ,
+ { 0x1039, 0x0330, "SiS330", "Xabre 2D/3D Accelerator" } ,
+ { 0x1039, 0x0406, "85C501", "PCI/ISA Cache Memory Controller (PCMC)" } ,
+ { 0x1039, 0x0496, "85C496", "CPU to PCI & PCI to ISA Bridge" } ,
+ { 0x1039, 0x0530, "SiS530", "Host-to-PCI bridge" } ,
+ { 0x1039, 0x0540, "SiS540", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0550, "SiS550/1/2", "North Bridge" } ,
+ { 0x1039, 0x0596, "SiS596", "Pentium PCI chipset with IDE" } ,
+ { 0x1039, 0x0597, "SiS5513", "EIDE Controller (step C)" } ,
+ { 0x1039, 0x0601, "SiS83C601", "PCI EIDE Controller" } ,
+ { 0x1039, 0x0620, "SiS620", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0630, "SiS630", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0635, "SiS 635", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0640, "SiS 640", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0645, "SiS 645", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0646, "SiS645DX", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0648, "SiS648", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0649, "", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0650, "SiS 650", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0651, "SiS651", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0655, "SiS655", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0660, "", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0730, "SiS 730", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0735, "SiS 735", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0740, "SiS 740", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0745, "SiS745", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0746, "SiS746", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0755, "", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x0900, "SiS900", "Fast Ethernet/Home Networking Ctrlr" } ,
+ { 0x1039, 0x0963, "SiS963", "PCI to ISA Bridge" } ,
+ { 0x1039, 0x3602, "SiS83C602", "IDE Controller" } ,
+ { 0x1039, 0x5107, "SiS5107", "Hot Docking Controller" } ,
+ { 0x1039, 0x5300, "SiS540", "AGP" } ,
+ { 0x1039, 0x5315, "SiS550/1/2", "GUI Accelerator" } ,
+ { 0x1039, 0x5401, "SiS5401", "486 PCI Chipset" } ,
+ { 0x1039, 0x5511, "SiS5511/5512", "PCI/ISA System Memory Controller" } ,
+ { 0x1039, 0x5513, "SiS5513", "PCI IDE Controller" } ,
+ { 0x1039, 0x5517, "SiS5517", "CPU to PCI Bridge" } ,
+ { 0x1039, 0x5571, "SiS5571", "Memory/PCI bridge" } ,
+ { 0x1039, 0x5581, "SiS 5581", "p5 chipset" } ,
+ { 0x1039, 0x5582, "SiS5582", "PCI to ISA Bridge" } ,
+ { 0x1039, 0x5591, "SiS 5591/5592", "PCI AGP & CPU Memory Controller" } ,
+ { 0x1039, 0x5596, "SiS5596", "PCI, Memory & VGA Controller" } ,
+ { 0x1039, 0x5597, "SiS5597", "Host to PCI bridge" } ,
+ { 0x1039, 0x5600, "SiS600", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x5630, "SiS630", "Host-to-PCI Bridge" } ,
+ { 0x1039, 0x6204, "SiS6204", "video decoder/mpeg interface" } ,
+ { 0x1039, 0x6205, "SiS6205", "PCI VGA Controller" } ,
+ { 0x1039, 0x6225, "SiS 6225", "PCI Graphics & Video Accelerator" } ,
+ { 0x1039, 0x6236, "SiS6236", "Graphics" } ,
+ { 0x1039, 0x6300, "SiS630/730", "GUI Accelerator+3D" } ,
+ { 0x1039, 0x6306, "SiS530/620", "Integrated 3D VGA Controller" } ,
+ { 0x1039, 0x6325, "SiS650/651/740", "GUI 2D/3D Accelerator" } ,
+ { 0x1039, 0x6326, "SiS 86C326", "AGP/PCI Graphics & Video Accelerator" } ,
+ { 0x1039, 0x7001, "SiS5571", "USB Host Controller" } ,
+ { 0x1039, 0x7002, "SiS7002", "USB 2.0 Enhanced Host Controller" } ,
+ { 0x1039, 0x7005, "SiS551/2", "Memory Stick Controller" } ,
+ { 0x1039, 0x7007, "", "OHCI Compliant FireWire Controller" } ,
+ { 0x1039, 0x7012, "SiS7012", "PCI Audio Accelerator" } ,
+ { 0x1039, 0x7013, "SiS7013", "56k Modem" } ,
+ { 0x1039, 0x7015, "SiS550/1/2", "Software Audio" } ,
+ { 0x1039, 0x7016, "SiS7016", "10/100 Ethernet Adapter" } ,
+ { 0x1039, 0x7018, "SiS7018", "PCI Audio Accelerator" } ,
+ { 0x1039, 0x7019, "SiS550/1/2", "Hardware Audio" } ,
+ { 0x1039, 0x7300, "SiS730", "GUI Accelerator+3D" } ,
+ { 0x103C, 0x1005, "A4977A", "Visialize EG" } ,
+ { 0x103C, 0x1008, "Donner GFX", "" } ,
+ { 0x103C, 0x100A, "hpVisualizeFX", "Hewlett-Packard VisualizeFX Series Video" } ,
+ { 0x103C, 0x1028, "", "Tachyon TL Fibre Channel Adapter" } ,
+ { 0x103C, 0x1029, "HPFC-5200B", "Tachyon XL2 Fibre Channel Adapter" } ,
+ { 0x103C, 0x102A, "Tach TS", "Tachyon TS Fibre Channel Host Adapter" } ,
+ { 0x103C, 0x1030, "J2585A", "DeskDirect 10/100VG LAN Adapter" } ,
+ { 0x103C, 0x1031, "J2585B", "DeskDirect 10/100 NIC" } ,
+ { 0x103C, 0x1040, "J2973A", "DeskDirect 10BaseT NIC" } ,
+ { 0x103C, 0x1041, "J2585B", "DeskDirect 10/100VG NIC" } ,
+ { 0x103C, 0x1042, "J2970A", "DeskDirect 10BaseT/2 NIC" } ,
+ { 0x103C, 0x1048, "SAS", "" } ,
+ { 0x103C, 0x1049, "DIVA1", "" } ,
+ { 0x103C, 0x104A, "DIVA2", "" } ,
+ { 0x103C, 0x104B, "SP2", "" } ,
+ { 0x103C, 0x104D, "J3242A", "EL-10 Ethernet Adapter" } ,
+ { 0x103C, 0x1064, "79C970", "PCnet Ethernet Controller" } ,
+ { 0x103C, 0x10C1, "", "NetServer Smart IRQ Router" } ,
+ { 0x103C, 0x10ED, "TopTools", "Remote Control" } ,
+ { 0x103C, 0x1200, "82557B", "10/100 NIC" } ,
+ { 0x103C, 0x1219, "", "NetServer PCI Hot-Plug Controller" } ,
+ { 0x103C, 0x121A, "", "NetServer SMIC Controller" } ,
+ { 0x103C, 0x121B, "", "NetServer Legacy COM Port Decoder" } ,
+ { 0x103C, 0x121C, "", "NetServer PCI COM Port Decoder" } ,
+ { 0x103C, 0x1229, "zx1", "System Bus Adapter" } ,
+ { 0x103C, 0x122A, "zx1", "I/O Controller" } ,
+ { 0x103C, 0x122B, "zx1", "Local Bus Adapter" } ,
+ { 0x103C, 0x2910, "E2910A", "PCI Bus Exerciser" } ,
+ { 0x103C, 0x2920, "", "Fast Host Interface" } ,
+ { 0x103C, 0x2924, "E2924A", "PCI Host Interface Adapter" } ,
+ { 0x103C, 0x2925, "E2925A", "32 bit PCI Bus Exerciser and Analyzer" } ,
+ { 0x103C, 0x2926, "E2926A", "64 bit PCI Bus Exerciser and Analyzer" } ,
+ { 0x103C, 0x2927, "E2927A", "64 Bit, 66/50MHz PCI Analyzer & Exerciser" } ,
+ { 0x103c, 0x2928, "E2928A", "64Bit, 66MHz PCI Exerciser/Analyzer" } ,
+ { 0x103C, 0x2940, "E2940A", "64 bit, 66/50MHz CompactPCI Analyzer&Exerciser" } ,
+ { 0x1042, 0x1000, "FDC 37C665", "EIDE" } ,
+ { 0x1042, 0x1000, "RZ1000", "IDE Ctrlr" } ,
+ { 0x1042, 0x1001, "37C922", "" } ,
+ { 0x1042, 0x3000, "Samurai device 0", "CPU to PCI Bridge" } ,
+ { 0x1042, 0x3010, "Samurai device 1", "CPU to PCI Bridge" } ,
+ { 0x1042, 0x3020, "Samurai IDE device", "IDE Controller" } ,
+ { 0x1042, 0x3030, "MT82P664", "Samurai 64M2" } ,
+ { 0x1042, 0x3120, "Samurai-DDR", "CPU to PCI bridge" } ,
+ { 0x1042, 0x3130, "Samurai-DDR", "AGP controller" } ,
+ { 0x1043, 0x0675, "HFC-S PCI A", "Cologne Chip" } ,
+ { 0x1044, 0x1012, "Domino", "RAID Engine" } ,
+ { 0x1044, 0xA400, "2124A/9X", "SmartCache III/RAID SCSI Controller" } ,
+ { 0x1044, 0xA500, "", "PCI Bridge" } ,
+ { 0x1044, 0xA501, "", "I2O SmartRAID V Controller" } ,
+ { 0x1044, 0xA511, "Raptor", "SmartRAID Controller" } ,
+ { 0x1045, 0x0005, "", "" } ,
+ { 0x1045, 0xA0F8, "82C750", "PCI USB Controller" } ,
+ { 0x1045, 0xC101, "82C264", "GUI Accelerator" } ,
+ { 0x1045, 0xC178, "82C178", "LCD GUI Accelerator" } ,
+ { 0x1045, 0xC556, "82C556", "Viper" } ,
+ { 0x1045, 0xC557, "82C557", "CPU Bridge (Viper)" } ,
+ { 0x1045, 0xC558, "82C558", "ISA Bridge w/PnP" } ,
+ { 0x1045, 0xC567, "82C750", "Vendetta chipset: host bridge" } ,
+ { 0x1045, 0xC568, "82C750", "Vendetta chipset: ISA bridge" } ,
+ { 0x1045, 0xC569, "82C579", "Pentium to PCI Bridge" } ,
+ { 0x1045, 0xC621, "82C621", "PCI IDE Controller (PIC)" } ,
+ { 0x1045, 0xC700, "82C700", "FireStar chipset, PCI-ISA bridge???" } ,
+ { 0x1045, 0xC701, "82C700", "FireStar mobile chipset: host bridge" } ,
+ { 0x1045, 0xC814, "82C814", "FireBridge II Docking Station Controller" } ,
+ { 0x1045, 0xC822, "82C822", "CPU to PCI & PCI to ISA PnP bridge" } ,
+ { 0x1045, 0xC824, "82C824", "FireFox 32-Bit PC Card Controller" } ,
+ { 0x1045, 0xC825, "82C825 function 0", "PCI-to-ISA Bridge" } ,
+ { 0x1045, 0xC832, "82C832", "CPU-to-PCI and PCI-to-ISA Bridge" } ,
+ { 0x1045, 0xC861, "82C861/2/3", "FireLink PCI-to-USB Bridge" } ,
+ { 0x1045, 0xC881, "82C881", "FireLink 1394 OHCI Link Controller" } ,
+ { 0x1045, 0xC895, "82C895", "" } ,
+ { 0x1045, 0xC935, "82C935", "MachOne integrated PCI audio processor" } ,
+ { 0x1045, 0xD568, "82C825", "PCI bus master IDE controller" } ,
+ { 0x1045, 0xD768, "82C750", "Ultra DMA IDE controller" } ,
+ { 0x1048, 0x0C60, "Elsa Gladiac MX", "NVidia Geforce 2 MX" } ,
+ { 0x1048, 0x1000, "Quick Step 1000", "" } ,
+ { 0x1048, 0x3000, "QuickStep 3000", "" } ,
+ { 0x1048, 0x8901, "", "ELSA GLoria XL" } ,
+ { 0x104A, 0x0008, "STG 2000X", "" } ,
+ { 0x104A, 0x0009, "STG 1764X", "" } ,
+ { 0x104A, 0x0010, "STG4000", "PowerVR KYRO series 3 graphics processor" } ,
+ { 0x104A, 0x0209, "STPC Consmr/Indstrl", "North/South Bridges" } ,
+ { 0x104A, 0x020A, "STPC Atlas/Elite", "North Bridge" } ,
+ { 0x104A, 0x0210, "STPC Atlas", "ISA Bridge" } ,
+ { 0x104A, 0x021A, "STPC Consmr-S/Elite", "ISA Bridge" } ,
+ { 0x104A, 0x021B, "STPC Consumer-II", "ISA Bridge" } ,
+ { 0x104A, 0x0228, "STPC Atlas", "IDE Controller" } ,
+ { 0x104A, 0x0230, "STPC Atlas", "USB Controller" } ,
+ { 0x104A, 0x0500, "ST70137", "ADSL" } ,
+ { 0x104A, 0x0981, "", "10/100 Ethernet Adapter" } ,
+ { 0x104A, 0x1746, "STG 1746X", "" } ,
+ { 0x104A, 0x2774, "STE10/100A", "PCI 10/100 Ethernet Controller" } ,
+ { 0x104A, 0x3520, "", "MPEG-II Video Decoder" } ,
+ { 0x104B, 0x0140, "BT-946C", "Multimaster NC (SCSI-2)" } ,
+ { 0x104B, 0x1040, "BA80C30", "Multimaster" } ,
+ { 0x104B, 0x8130, "BT-930/32/50/52", "Flashpoint LT/DL/LW/DW Ultra (Wide) SCSI" } ,
+ { 0x104C, 0x0500, "TNETE100A/110A/211", "ThunderLAN 100 Mbit LAN Controller" } ,
+ { 0x104C, 0x0508, "TI380PCI", "PCI interface for TI380 compressors" } ,
+ { 0x104C, 0x1000, "TI PCI Eagle i/f AS", "" } ,
+ { 0x104C, 0x3D04, "TVP4010", "Permedia" } ,
+ { 0x104C, 0x3D07, "TVP4020", "AGP Permedia 2" } ,
+ { 0x104C, 0x8000, "TSB12LV21", "LYNX IEEE1394 FireWire Host Controller" } ,
+ { 0x104C, 0x8009, "TSB12LV22", "OHCI-Lynx PCI IEEE 1394 Host Controller" } ,
+ { 0x104C, 0x8011, "PCI4450", "OHCI-Lynx IEEE 1394 Controller" } ,
+ { 0x104C, 0x8017, "PCI4410", "OHCI-Lynx IEEE 1394 Controller" } ,
+ { 0x104C, 0x8019, "TSB12LV23", "OHCI-Lynx PCI IEEE 1394 Host Controller" } ,
+ { 0x104C, 0x8020, "TSB12LV26", "OHCI-Lynx PCI IEEE 1394 Host Controller" } ,
+ { 0x104C, 0x8021, "TSB43AA22", "1394a-2000 OHCI PHY/Link Layer Ctrlr" } ,
+ { 0x104C, 0x8023, "TSB43AB22/A", "IEEE1394a-2000 OHCI PHY/Link-Layer Ctrlr" } ,
+ { 0x104C, 0x8024, "TSB43AB23", "IEEE 1394a-2000 OHCI PHY/Link Layer Ctrl" } ,
+ { 0x104C, 0x8026, "TSB43AB21", "1394a-2000 OHCI PHY/Link Layer Ctrlr" } ,
+ { 0x104C, 0x8027, "PCI4451", "OHCI-Lynx IEEE 1394 Controller" } ,
+ { 0x104C, 0x8400, "", "802.11b+ 22Mbps Wireless Adapter" } ,
+ { 0x104C, 0xA001, "TDC1570", "64-bit PCI ATM SAR" } ,
+ { 0x104C, 0xA100, "TDC1561", "32-bit PCI ATM SAR" } ,
+ { 0x104C, 0xA102, "TNETA1575", "HyperSAR Plus w/PCI host & UTOPIA i/f" } ,
+ { 0x104C, 0xAC10, "PCI1050", "PC Card Controller" } ,
+ { 0x104C, 0xAC11, "PCI1030/1053", "PC Card Controller" } ,
+ { 0x104C, 0xAC12, "PCI1130", "PC card CardBus Controller" } ,
+ { 0x104C, 0xAC13, "PCI1031", "PCI-TO-PC CARD16 CONTROLLER UNIT" } ,
+ { 0x104c, 0xAC15, "PCI1131", "Dual Socket PCI CardBus Controller" } ,
+ { 0x104C, 0xAC16, "PCI1250", "PC Card CardBus Controller" } ,
+ { 0x104C, 0xAC17, "PCI1220", "CardBus Controller" } ,
+ { 0x104C, 0xAC18, "PCI1260", "PC card CardBus Controller" } ,
+ { 0x104c, 0xAC19, "PCI1221", "PC Card Controller" } ,
+ { 0x104C, 0xAC1A, "PCI1210", "PC card CardBus Controller" } ,
+ { 0x104C, 0xAC1B, "PCI1450", "PC card CardBus Controller" } ,
+ { 0x104c, 0xAC1C, "PCI1225 GHK/PDV", "PC card CardBus Controller" } ,
+ { 0x104c, 0xAC1D, "PCI1251A", "PC Card Controller" } ,
+ { 0x104c, 0xAC1E, "PCI1211", "High Performance PC Card Controller" } ,
+ { 0x104C, 0xAC1F, "PCI1251B", "PC card CardBus Controller" } ,
+ { 0x104C, 0xAC20, "PCI2030", "PCI to PCI Bridge" } ,
+ { 0x104C, 0xAC21, "PCI2031", "PCI to PCI Bridge" } ,
+ { 0x104C, 0xAC22, "PCI2032", "PCI Docking Bridge" } ,
+ { 0x104C, 0xAC23, "PCI2250", "PCI-to-PCI Bridge" } ,
+ { 0x104C, 0xAC28, "PCI2050/2050I", "PCI-to-PCI Bridge" } ,
+ { 0x104C, 0xAC30, "PCI1260", "PC card CardBus Controller" } ,
+ { 0x104C, 0xAC40, "PCI4450", "PC card CardBus Controller" } ,
+ { 0x104C, 0xAC41, "PCI4410", "PC card CardBus Controller" } ,
+ { 0x104C, 0xAC42, "PCI4451", "PC card CardBus Controller" } ,
+ { 0x104C, 0xAC43, "PCI4550", "PC card CardBus Controller" } ,
+ { 0x104C, 0xAC44, "PCI4510", "PC Card Controller" } ,
+ { 0x104C, 0xAC46, "PCI4520", "PCCard CardBus Controller" } ,
+ { 0x104C, 0xAC50, "PCI1410", "PC card cardBus Controller" } ,
+ { 0x104c, 0xAC51, "PCI1420", "PC Card Controller" } ,
+ { 0x104C, 0xAC52, "PCI1451", "PC card CardBus Controller" } ,
+ { 0x104C, 0xAC53, "PCI1421", "PC card CardBus Controller" } ,
+ { 0x104C, 0xAC54, "PCI1620", "PCCard CardBus Controller w/UltraMedia" } ,
+ { 0x104C, 0xAC55, "PCI1520", "PCCard CardBus Controller" } ,
+ { 0x104C, 0xAC56, "PCI1510", "PCCard CardBus Controller" } ,
+ { 0x104C, 0xAC57, "PCI1530", "PCCard CardBus Controller" } ,
+ { 0x104C, 0xAC58, "PCI1515", "PCCard CardBus Controller" } ,
+ { 0x104C, 0xAC59, "PCI1621", "PCCard CardBus Controller w/UltraMedia" } ,
+ { 0x104C, 0xAC5A, "PCI1610", "PCCard CardBus Controller w/UltraMedia" } ,
+ { 0x104c, 0xAC60, "PCI2040", "PCI-DSP Bridge Controller" } ,
+ { 0x104C, 0xFE00, "", "FireWire Host Controller" } ,
+ { 0x104C, 0xFE03, "12C01A", "FireWire Host Controller" } ,
+ { 0x104D, 0x8009, "CXD1947", "i.LINK FireWire PCI Host Controller" } ,
+ { 0x104D, 0x8039, "CXD3222", "OHCI i.LINK (IEEE 1394) PCI Host Ctrlr" } ,
+ { 0x104D, 0x8056, "Rockwell HCF 56K", "Modem" } ,
+ { 0x104D, 0x808A, "", "Memory Stick Controller" } ,
+ { 0x104E, 0x0017, "OTI-64017", "" } ,
+ { 0x104E, 0x0107, "OTI107", "Spitfire VGA Accelerator" } ,
+ { 0x104E, 0x0109, "", "Video Adapter" } ,
+ { 0x104E, 0x0217, "OTI-64217", "" } ,
+ { 0x104E, 0x0317, "OTI-64317", "" } ,
+ { 0x104E, 0x0611, "OTI-610", "" } ,
+ { 0x104F, 0x104F, "iatca8392", "Multi I/O" } ,
+ { 0x1050, 0x0000, "004005-34c8c8", "Ethernet Controller (NE2000 compatible)" } ,
+ { 0x1050, 0x0001, "W83769F", "Ethernet Adapter" } ,
+ { 0x1050, 0x0105, "W82C105", "Ethernet Adapter" } ,
+ { 0x1050, 0x0628, "W83628F/629D", "PCI to ISA Bridge Set" } ,
+ { 0x1050, 0x0840, "W89C840F", "100/10Mbps Ethernet Controller" } ,
+ { 0x1050, 0x0940, "w89c940f", "winbond pci ethernet" } ,
+ { 0x1050, 0x5A5A, "W89C940F", "ELANC-PCI Twisted-pair Ether-LAN Ctrlr" } ,
+ { 0x1050, 0x6692, "W6692/92A/92CF", "PCI BusISDN S/T-Controller" } ,
+ { 0x1050, 0x9922, "W9922PF", "ISDN Controller" } ,
+ { 0x1050, 0x9960, "W9960CF", "Video Codec" } ,
+ { 0x1050, 0x9961, "W9961CF", "H.263/H.261 Video Codec" } ,
+ { 0x1050, 0x9970, "W9970CF", "VGA controller" } ,
+ { 0x1050, 0x9971, "W9971CF", "Video Graphics Controller With TV Encode" } ,
+ { 0x1051, 0x0100, "Motorola MC145575", "" } ,
+ { 0x1054, 0x0001, "", "PCI Bridge" } ,
+ { 0x1054, 0x0002, "", "PCI bus Cntrlr" } ,
+ { 0x1054, 0x3505, "SH7751", "SuperH (SH) 32-Bit RISC MCU/MPU Series" } ,
+ { 0x1055, 0x0810, "", "EFAR 486 host Bridge" } ,
+ { 0x1055, 0x0922, "", "Pentium/p54c host Bridge" } ,
+ { 0x1055, 0x0926, "", "ISA Bridge" } ,
+ { 0x1055, 0x9130, "SLC90E66", "Ultra ATA/66 IDE Controller" } ,
+ { 0x1055, 0x9460, "SLC90E66", "Victory66 PCI to ISA Bridge" } ,
+ { 0x1055, 0x9461, "SLC90E66", "Victory66 UDMA EIDE Controller" } ,
+ { 0x1055, 0x9462, "SLC90E66", "Victory66 USB Host Controller" } ,
+ { 0x1055, 0x9463, "SLC90E66", "Victory66 Power Management Controller" } ,
+ { 0x1057, 0x0001, "MPC105", "PCI Bridge / Memory Controller (PCIB/MC)" } ,
+ { 0x1057, 0x0002, "MPC106", "PCI Bridge/Memory Controller (PCIB/MC)" } ,
+ { 0x1057, 0x0003, "MPC8240", "Integrated Processor" } ,
+ { 0x1057, 0x0004, "MPC107", "PCI Bridge/Memory Controller for PPC" } ,
+ { 0x1057, 0x0006, "MPC8245", "Integrated Processor" } ,
+ { 0x1057, 0x0100, "MC145575", "HCF-PCI" } ,
+ { 0x1057, 0x0431, "KTI829c", "100VG Ethernet Controller" } ,
+ { 0x1057, 0x1801, "DSP56301", "24-bit Digital Signal Processor" } ,
+ { 0x1057, 0x1802, "DSP56305", "24-Bit Digital Signal Processor" } ,
+ { 0x1057, 0x18C0, "MPC8265A/66", "PowerQUICC II PCI Bridge" } ,
+ { 0x1057, 0x3421, "56IVMR/Phoenix 56ISM", "Modem" } ,
+ { 0x1057, 0x4801, "Raven", "PowerPC Chipset" } ,
+ { 0x1057, 0x4802, "Falcon", "" } ,
+ { 0x1057, 0x4803, "Hawk", "" } ,
+ { 0x1057, 0x4806, "CPX8216", "" } ,
+ { 0x1057, 0x4809, "CPX8216T", "HotSwap Controller" } ,
+ { 0x1057, 0x5600, "SM56", "PCI Speakerphone/Data,Fax Modem" } ,
+ { 0x1057, 0x5602, "SM56", "PCI Modem" } ,
+ { 0x1057, 0x5608, "SM56", "PCI Fax Voice Modem" } ,
+ { 0x1057, 0x6400, "MPC190", "Security Co-Processor" } ,
+ { 0x105a, 0x0D30, "PDC20265", "Ultra100 EIDE controller (on M/B)" } ,
+ { 0x105A, 0x0D38, "PDC20263", "FastTrak66 EIDE Controller" } ,
+ { 0x105A, 0x1275, "PDC20275", "FastTrack TX EIDE Controller" } ,
+ { 0x105A, 0x3318, "PDC20318?", "FastTrak SATA150 TX4 Controller" } ,
+ { 0x105A, 0x3319, "PDC20319?", "FastTrak SATA150 TX4 Controller" } ,
+ { 0x105A, 0x3371, "PDC20371?", "FastTrak SATA150 TX2plus Controller" } ,
+ { 0x105A, 0x3375, "PDC20375?", "FastTrak SATA150 TX2plus Controller" } ,
+ { 0x105A, 0x3376, "PDC20376", "FastTrak 376 Controller" } ,
+ { 0x105A, 0x4D30, "PDC20267", "Ultra100 EIDE Controller" } ,
+ { 0x105A, 0x4D33, "PDC20246", "FastTrak Ultra ATA RAID controller" } ,
+ { 0x105A, 0x4D38, "PDC20262", "Ultra66 EIDE Controller" } ,
+ { 0x105A, 0x4D68, "PDC20268", "Ultra100 EIDE Controller" } ,
+ { 0x105a, 0x4D69, "PDC20269", "Ultra133TX2 EIDE Controller" } ,
+ { 0x105A, 0x5275, "PDC20276", "MBUltra133 EIDE Controller" } ,
+ { 0x105A, 0x5300, "DC5300", "EIDE Controller" } ,
+ { 0x105A, 0x6268, "PDC20268R", "FastTrak100 TX2/TX4/LP EIDE controller" } ,
+ { 0x105A, 0x6269, "PDC20271", "FastTrak TX2000 EIDE controller" } ,
+ { 0x105A, 0x6629, "", "FastTrak TX4000 Controller" } ,
+ { 0x105a, 0x7275, "PDC20277", "SBFastTrak SX6000 EIDE Controller" } ,
+ { 0x105D, 0x2309, "Imagine 128", "GUI Accelerator" } ,
+ { 0x105D, 0x2339, "I128s2", "Imagine 128 Series 2" } ,
+ { 0x105D, 0x493D, "T2R", "Revolution 3D" } ,
+ { 0x105D, 0x5348, "Revolution IV", "Revolution IV" } ,
+ { 0x1060, 0x0001, "UM82C881", "486 Chipset" } ,
+ { 0x1060, 0x0002, "UM82C886", "ISA Bridge" } ,
+ { 0x1060, 0x0101, "UM8673F", "EIDE Controller" } ,
+ { 0x1060, 0x0881, "UM8881", "" } ,
+ { 0x1060, 0x0881, "UM8881", "HB4 486 PCI Chipset" } ,
+ { 0x1060, 0x0886, "UM8886F", "ISA Bridge" } ,
+ { 0x1060, 0x0891, "UM82C891", "Pentium CPU to PCI bridge" } ,
+ { 0x1060, 0x1001, "UM886A", "IDE Cntrlr (dual function)" } ,
+ { 0x1060, 0x673A, "UM8886BF", "EIDE Controller" } ,
+ { 0x1060, 0x673B, "", "EIDE Master/DMA" } ,
+ { 0x1060, 0x8710, "UM8710", "VGA Cntrlr" } ,
+ { 0x1060, 0x8821, "", "CPU/PCI Bridge" } ,
+ { 0x1060, 0x8822, "", "PCI/ISA Bridge" } ,
+ { 0x1060, 0x8851, "", "Pentium CPU/PCI Bridge" } ,
+ { 0x1060, 0x8852, "", "Pentium CPU/ISA Bridge" } ,
+ { 0x1060, 0x886A, "UM8886A", "ISA Bridge with EIDE" } ,
+ { 0x1060, 0x8881, "UM8881F", "HB4 486 PCI Chipset" } ,
+ { 0x1060, 0x8886, "UM8886", "ISA Bridge (w/o IDE support)" } ,
+ { 0x1060, 0x888A, "UM8886A", "" } ,
+ { 0x1060, 0x8891, "UM8891", "586 Chipset" } ,
+ { 0x1060, 0x9017, "UM9017F", "Ethernet" } ,
+ { 0x1060, 0x9018, "UM9018", "Ethernet" } ,
+ { 0x1060, 0x9026, "UM9026", "Fast Ethernet" } ,
+ { 0x1060, 0xE881, "UM8881", "486 Chipset" } ,
+ { 0x1060, 0xE886, "UM8886N", "ISA Bridge w/EIDE" } ,
+ { 0x1060, 0xE88A, "UM8886N", "PCI / ISA Bridge" } ,
+ { 0x1060, 0xE891, "UM8891N", "" } ,
+ { 0x1061, 0x0001, "AGX013/016", "GUI Accelerator" } ,
+ { 0x1061, 0x0002, "IIT3204/3501", "MPEG Decoder" } ,
+ { 0x1065, 0x8139, "", "Realtek 8139C Network Card" } ,
+ { 0x1066, 0x0000, "PT80C826", "VL Bridge" } ,
+ { 0x1066, 0x0001, "PT86C521", "Vesuvius V1-LS System Controller" } ,
+ { 0x1066, 0x0002, "PT86C523", "Vesuvius V3-LS ISA Bridge" } ,
+ { 0x1066, 0x0003, "PT80C524", "Nile PCI to PCI Bridge" } ,
+ { 0x1066, 0x0004, "PT80C525", "Nile-II PCI to PCI Bridge" } ,
+ { 0x1066, 0x0005, "PC87550", "System Controller" } ,
+ { 0x1066, 0x8002, "PT86C523", "ISA Bridge" } ,
+ { 0x1067, 0x1002, "VG500", "VolumePro Volume Rendering Accelerator" } ,
+ { 0x1069, 0x0001, "DAC960P", "DAC960P 3 ch SCSI RAID Controller" } ,
+ { 0x1069, 0x0002, "DAC960PD", "DAC960PD 3 ch SCSI RAID Controller" } ,
+ { 0x1069, 0x0010, "DAC960PJ", "DAC960PJ 3 ch SCSI RAID Controller" } ,
+ { 0x1069, 0x0050, "i960", "AcceleRAID 170" } ,
+ { 0x1069, 0xBA55, "1100", "eXtremeRAID support device" } ,
+ { 0x1069, 0xBA56, "", "eXtremeRAID Disk Array" } ,
+ { 0x106B, 0x0001, "Bandit", "PowerPC Host-PCI Bridge" } ,
+ { 0x106B, 0x0002, "Grand Central", "I/O Controller" } ,
+ { 0x106B, 0x0003, "Control Video", "" } ,
+ { 0x106B, 0x0004, "PlanB", "Video-in" } ,
+ { 0x106B, 0x0007, "OHare", "I/O Controller" } ,
+ { 0x106b, 0x0008, "Bandit", "Host-PCI bridge" } ,
+ { 0x106B, 0x000E, "Hydra", "Mac I/O Controller" } ,
+ { 0x106B, 0x0010, "Heathrow", "Mac I/O Controller" } ,
+ { 0x106B, 0x0017, "Paddington", "Mac I/O Controller" } ,
+ { 0x106B, 0x0018, "UniNorth", "FireWire Controller" } ,
+ { 0x106b, 0x0019, "KeyLargo", "USB controller" } ,
+ { 0x106b, 0x001E, "UniNorth", "Host-PCI bridge" } ,
+ { 0x106B, 0x001F, "UniNorth", "Host-PCI bridge" } ,
+ { 0x106B, 0x0020, "UniNorth", "AGP interface" } ,
+ { 0x106b, 0x0021, "UniNorth GMAC", "Ethernet controller" } ,
+ { 0x106b, 0x0022, "KeyLargo", "Mac I/O controller" } ,
+ { 0x106b, 0x0024, "GMAC", "Ethernet controller" } ,
+ { 0x106b, 0x0025, "Pangea", "Mac I/O controller" } ,
+ { 0x106B, 0x0026, "Pangea", "USB Interface" } ,
+ { 0x106B, 0x0027, "Pangea", "AGP interface" } ,
+ { 0x106b, 0x0028, "Pangea", "Host-PCI bridge" } ,
+ { 0x106b, 0x0029, "Pangea", "Host-PCI bridge" } ,
+ { 0x106B, 0x002D, "UniNorth 1.5", "AGP Bridge" } ,
+ { 0x106B, 0x002E, "UniNorth 1.5", "PCI Bridge" } ,
+ { 0x106B, 0x002F, "UniNorth 1.5", "Internal PCI" } ,
+ { 0x106B, 0x0030, "UniNorth/Pangea", "FireWire Controller" } ,
+ { 0x106C, 0x8801, "", "Dual Pentium ISA/PCI Motherboard" } ,
+ { 0x106C, 0x8802, "", "PowerPC ISA/PCI Motherboard" } ,
+ { 0x106C, 0x8803, "", "Dual Window Graphics Accelerator" } ,
+ { 0x106C, 0x8804, "", "PCI LAN Controller" } ,
+ { 0x106C, 0x8805, "", "100-BaseT LAN Controller" } ,
+ { 0x1073, 0x0001, "", "3D graphics Cntrlr" } ,
+ { 0x1073, 0x0002, "YGV615", "RPA3 3D-Graphics Controller" } ,
+ { 0x1073, 0x0003, "YMF740", "" } ,
+ { 0x1073, 0x0004, "YMF724", "PCI Audio Controller" } ,
+ { 0x1073, 0x0005, "DS1", "DS1 Audio" } ,
+ { 0x1073, 0x0006, "DS1", "DS1 Audio" } ,
+ { 0x1073, 0x0008, "DS1", "DS1 Audio" } ,
+ { 0x1073, 0x000A, "YMF740", "DS-1L PCI Audio Controller" } ,
+ { 0x1073, 0x000C, "YMF740C", "DS-1L PCI audio controller" } ,
+ { 0x1073, 0x000D, "YMF724F", "Yamaha Onboard Sound System" } ,
+ { 0x1073, 0x0010, "YMF744B-V", "DS-1 PCI audio controller" } ,
+ { 0x1073, 0x0012, "YMF754B", "DS-1E PCI Audio Controller" } ,
+ { 0x1073, 0x0020, "", "DS-1 Audio" } ,
+ { 0x1073, 0x1000, "SW1000XG", "Sound system" } ,
+ { 0x1073, 0x2000, "DS2416", "Digital Mixing Card" } ,
+ { 0x1074, 0x4E78, "82C500/1", "Nx586 Chipset" } ,
+ { 0x1077, 0x1016, "ISP10160", "Single Channel Ultra3 SCSI Processor" } ,
+ { 0x1077, 0x1020, "ISP1040B/1020A", "Fast-wide SCSI - Sparc PCI" } ,
+ { 0x1077, 0x1022, "ISP1022A", "Fast-wide SCSI" } ,
+ { 0x1077, 0x1080, "ISP1080", "SCSI Host Adapter" } ,
+ { 0x1077, 0x1216, "ISP12160", "Dual Channel Ultra3 SCSI Processor" } ,
+ { 0x1077, 0x1240, "ISP1240", "SCSI Host Adapter" } ,
+ { 0x1077, 0x1280, "ISP1280", "SCSI Host Adapter" } ,
+ { 0x1077, 0x2020, "ISP2020A", "Fast!SCSI Basic Adapter" } ,
+ { 0x1077, 0x2100, "QLA2100", "64-bit Fibre Channel Adapter" } ,
+ { 0x1077, 0x2200, "QLA2200", "PCI Fibre Channel Adapter" } ,
+ { 0x1077, 0x2300, "ISP 2300", "64-bit PCI FC-AL Adapter" } ,
+ { 0x1077, 0x2312, "ISP 2312", "Fibre Channel Adapter" } ,
+ { 0x1078, 0x0000, "Cx5520", "ISA Bridge" } ,
+ { 0x1078, 0x0001, "MediaGXm MMX", "Cyrix Integrated CPU" } ,
+ { 0x1078, 0x0002, "Cx5520", "ISA Bridge" } ,
+ { 0x1078, 0x0100, "Cx5530", "ISA bridge" } ,
+ { 0x1078, 0x0101, "Cx5530", "SMI status and ACPI timer" } ,
+ { 0x1078, 0x0102, "Cx5530", "IDE Controller" } ,
+ { 0x1078, 0x0103, "Cx5530", "XpressAUDIO" } ,
+ { 0x1078, 0x0104, "Cx5530", "Video Controller" } ,
+ { 0x1078, 0x0400, "ZFMicro", "CPU to PCI Bridge" } ,
+ { 0x1078, 0x0401, "ZFMicro", "Power Management Controller" } ,
+ { 0x1078, 0x0402, "ZFMicro", "IDE Controller" } ,
+ { 0x1078, 0x0403, "ZFMicro", "Expansion Bus" } ,
+ { 0x107D, 0x0000, "P86C850", "Graphic GLU-Logic" } ,
+ { 0x107E, 0x0001, "FLIPPER", "FRED Local Bus I/F to PCI Peripheral" } ,
+ { 0x107E, 0x0002, "", "100 vg anylan Cntrlr" } ,
+ { 0x107E, 0x0004, "5526", "Fibre Channel Host Adapter" } ,
+ { 0x107E, 0x0005, "x526", "Fibre Channel Host Adapter" } ,
+ { 0x107E, 0x0008, "4575/5525/5575/6575", "(i)chipSAR+ 155 MBit ATM controller" } ,
+ { 0x107E, 0x9003, "5535-4P-BRI-ST", "" } ,
+ { 0x107E, 0x9007, "5535-4P-BRI-U", "" } ,
+ { 0x107E, 0x9008, "5535-1P-SR", "" } ,
+ { 0x107E, 0x900C, "5535-1P-SR-ST", "" } ,
+ { 0x107E, 0x900E, "5535-1P-SR-U", "" } ,
+ { 0x107E, 0x9011, "5535-1P-PRI", "" } ,
+ { 0x107E, 0x9013, "5535-2P-PRI", "" } ,
+ { 0x107E, 0x9023, "5535-4P-BRI-ST", "" } ,
+ { 0x107E, 0x9027, "5536-4P-BRI-U", "" } ,
+ { 0x107E, 0x9031, "5535-1P-PRI", "" } ,
+ { 0x107E, 0x9033, "5536-2P-PRI", "" } ,
+ { 0x107E, 0x9060, "6535", "CompactPCI T1/E1/J1Communications Ctrlr" } ,
+ { 0x107E, 0x9070, "4538", "PMC T1/E1/J1 Communications Controller" } ,
+ { 0x107E, 0x9080, "4532-002/005", "PMC ATM Over OC-3/STM-1 Comm Controller" } ,
+ { 0x107E, 0x9081, "4532-001/004", "PMC ATM Over OC-3/STM-1 Comm Controller" } ,
+ { 0x107E, 0x9082, "4532-000/003", "PMC ATM Over OC-3/STM-1 Comm Controller" } ,
+ { 0x107E, 0x9090, "4531S-000/001", "PMC ATM Over T3/E3 Communications Ctrlr" } ,
+ { 0x107E, 0x90A0, "4539", "PMC Quad T1/E1/J1 Communications Ctrlr" } ,
+ { 0x107F, 0x0802, "SL82C105", "EIDE Ctrlr" } ,
+ { 0x107F, 0x0803, "", "EIDE Bus Master Controller" } ,
+ { 0x107F, 0x0806, "", "EIDE Controller" } ,
+ { 0x107f, 0x1138, "1138", "" } ,
+ { 0x107F, 0x2015, "", "EIDE Controller" } ,
+ { 0x1080, 0x0600, "82C596/9", "CPU to PCI & PCI to ISA Bridge" } ,
+ { 0x1080, 0xC691, "Cypress CY82C691", "" } ,
+ { 0x1080, 0xC693, "82C693", "PCI to ISA Bridge" } ,
+ { 0x1081, 0x0D47, "", "Radius PCI to NuBUS Bridge" } ,
+ { 0x1083, 0x0001, "FR710", "PCI Enhanced IDE Adapter" } ,
+ { 0x1083, 0x0613, "", "Host Bridge" } ,
+ { 0x1085, 0x0001, "UsbDgn", "Datalaster Interface for OBD automotive" } ,
+ { 0x1087, 0x9200, "", "" } ,
+ { 0x108A, 0x0001, "Model 617", "PCI-VME Bus Adapter" } ,
+ { 0x108A, 0x0010, "Model 618", "VME Bridge" } ,
+ { 0x108A, 0x0040, "dataBLIZZARD", "" } ,
+ { 0x108A, 0x3000, "Model 2106", "VME Bridge" } ,
+ { 0x108D, 0x0001, "OC-3136/37", "Token-Ring 16/4 PCI Adapter" } ,
+ { 0x108D, 0x0002, "OC-3139f", "Fastload 16/4 PCI/III Token Ring Adapter" } ,
+ { 0x108D, 0x0004, "OC-3139/40", "RapidFire Token Ring 16/4 Adapter" } ,
+ { 0x108D, 0x0005, "OC-3250", "GoCard Token Ring 16/4 Adapter" } ,
+ { 0x108D, 0x0006, "OC-3530", "RapidFire Token Ring 100 Adapter" } ,
+ { 0x108D, 0x0007, "OC-3141", "RapidFire Token Ring 16/4 Adapter" } ,
+ { 0x108D, 0x0008, "OC-3540", "RapidFire HSTR 100/16/4 Adapter" } ,
+ { 0x108D, 0x000A, "OC-3150", "RapidFire Token-Ring 16/4 PCI Adapter" } ,
+ { 0x108D, 0x0011, "OC-2805", "Ethernet Controller" } ,
+ { 0x108D, 0x0012, "OC-2325", "Ethernet PCI/II 10/100 Controller" } ,
+ { 0x108D, 0x0013, "OC-2183/85", "PCI/II Ethernet Controller" } ,
+ { 0x108D, 0x0014, "OC-2326", "Ethernet PCI/II 10/100 Controller" } ,
+ { 0x108D, 0x0019, "OC-2327/50", "10/100 Ethernet Controller" } ,
+ { 0x108D, 0x0021, "OC-6151/52", "155 Mbit ATM Adapter" } ,
+ { 0x108D, 0x0022, "", "ATM Adapter" } ,
+ { 0x108E, 0x0001, "SPARC EBUS", "" } ,
+ { 0x108E, 0x1000, "PCIO", "PCI Input/Output Controller" } ,
+ { 0x108E, 0x1001, "PCIO", "Happy Meal Ethernet" } ,
+ { 0x108E, 0x1100, "RIO EBUS", "" } ,
+ { 0x108E, 0x1101, "RIO GEM", "" } ,
+ { 0x108E, 0x1102, "RIO 1394", "" } ,
+ { 0x108E, 0x1103, "RIO USB", "" } ,
+ { 0x108E, 0x2BAD, "GEM", "Sun Gigabit Ethernet Card" } ,
+ { 0x108E, 0x5000, "SME2411", "UltraSPARC-IIi Advanced PCI Bridge" } ,
+ { 0x108E, 0x5043, "SunPCI", "Co-processor" } ,
+ { 0x108E, 0x8000, "STP2223BGA", "UPA to PCI Interface (UPA)" } ,
+ { 0x108E, 0x8001, "Schizo", "PCI Bus Module" } ,
+ { 0x108E, 0xA000, "UltraSPARC IIi", "Sabre" } ,
+ { 0x108E, 0xA001, "UltraSPARC IIe", "Hummingbird" } ,
+ { 0x1091, 0x0020, "", "3D Graphics Processor" } ,
+ { 0x1091, 0x0021, "", "3D graphics processor w/texturing" } ,
+ { 0x1091, 0x0040, "", "3D graphics frame buffer" } ,
+ { 0x1091, 0x0041, "", "3D graphics frame buffer" } ,
+ { 0x1091, 0x0060, "", "Proprietary bus Bridge" } ,
+ { 0x1091, 0x00E4, "Powerstorm 4D50T", "" } ,
+ { 0x1091, 0x0720, "", "Motion JPEG Codec" } ,
+ { 0x1092, 0x00A0, "SpeedStar Pro SE", "GUI Accelerator" } ,
+ { 0x1092, 0x00A8, "SpeedStar 64", "GUI Accelerator" } ,
+ { 0x1092, 0x0550, "Viper V550", "" } ,
+ { 0x1092, 0x08D4, "Supra 2260", "WinModem" } ,
+ { 0x1092, 0x094C, "SupraExpress 56i Pro", "SupraExpress 56i Pro" } ,
+ { 0x1092, 0x09C8, "SUP2760", "SupraExpress 56i Pro VCC" } ,
+ { 0x1092, 0x1092, "Viper V330", "" } ,
+ { 0x1092, 0x6120, "Maximum", "DVD" } ,
+ { 0x1092, 0x8810, "Stealth SE", "GUI Accelerator" } ,
+ { 0x1092, 0x8811, "Stealth 64/SE", "GUI Accelerator" } ,
+ { 0x1092, 0x8880, "Stealth Video", "" } ,
+ { 0x1092, 0x8881, "Stealth Video", "GUI Accelerator" } ,
+ { 0x1092, 0x88B0, "Stealth 64 Video", "GUI Accelerator" } ,
+ { 0x1092, 0x88B1, "Stealth 64 Video", "GUI Accelerator" } ,
+ { 0x1092, 0x88C0, "Stealth 64", "GUI Accelerator" } ,
+ { 0x1092, 0x88C1, "Stealth 64", "GUI Accelerator" } ,
+ { 0x1092, 0x88D0, "Stealth 64", "GUI Accelerator" } ,
+ { 0x1092, 0x88D1, "Stealth 64", "GUI Accelerator" } ,
+ { 0x1092, 0x88F0, "Stealth 64 Video", "GUI Accelerator" } ,
+ { 0x1092, 0x88F1, "Stealth 64 Video", "GUI Accelerator" } ,
+ { 0x1092, 0x9876, "", "Supra Express 56i Pro CW #2" } ,
+ { 0x1092, 0x9999, "Monster Sound", "Diamand Technology DT0398" } ,
+ { 0x1093, 0x0160, "PCI-DIO-96", "data adquisition input and output" } ,
+ { 0x1093, 0x0161, "PCI-1200", "Multifunction data acquisition board" } ,
+ { 0x1093, 0x0162, "PCI-MIO-16XE-50", "24MIO 6-03-2" } ,
+ { 0x1093, 0x1150, "PCI-DIO-32HS", "High Speed Digital I/O Board" } ,
+ { 0x1093, 0x1170, "PCI-MIO-16XE-10", "" } ,
+ { 0x1093, 0x1180, "PCI-MIO-16E-1", "" } ,
+ { 0x1093, 0x1190, "PCI-MIO-16E-4", "" } ,
+ { 0x1093, 0x1270, "PCI-6032E", "Multifunction Data Acquisition Card" } ,
+ { 0x1093, 0x1310, "PCI-6602", "Data Acquisition Device" } ,
+ { 0x1093, 0x1330, "PCI-6031E", "" } ,
+ { 0x1093, 0x1340, "PCI-6033E", "Multifunction Data Acquisition Card" } ,
+ { 0x1093, 0x1350, "PCI-6071E", "" } ,
+ { 0x1093, 0x17D0, "PCI-6503", "" } ,
+ { 0x1093, 0x2A60, "PCI-6023E", "" } ,
+ { 0x1093, 0x2A70, "PCI-6024E", "Multifunction Data Acquisition Card" } ,
+ { 0x1093, 0x2A80, "PCI-6025E", "Multifunction Data Acquisition Card" } ,
+ { 0x1093, 0x2C80, "PCI-6035E", "" } ,
+ { 0x1093, 0xB001, "IMAQ-PCI-1408", "" } ,
+ { 0x1093, 0xB011, "IMAQ-PXI-1408", "" } ,
+ { 0x1093, 0xB021, "IMAQ-PCI-1424", "" } ,
+ { 0x1093, 0xB031, "IMAQ-PCI-1413", "" } ,
+ { 0x1093, 0xB041, "IMAQ-PCI-1407", "" } ,
+ { 0x1093, 0xB051, "IMAQ-PXI-1407", "" } ,
+ { 0x1093, 0xB061, "IMAQ-PCI-1411", "" } ,
+ { 0x1093, 0xB071, "IMAQ-PCI-1422", "" } ,
+ { 0x1093, 0xB081, "IMAQ-PXI-1422", "" } ,
+ { 0x1093, 0xB091, "IMAQ-PXI-1411", "" } ,
+ { 0x1093, 0xC801, "PCI-GPIB", "GPIB Controller Interface Board" } ,
+ { 0x1093, 0xd130, "PCI-232/2", "2-port RS-232 Serial Interface Board" } ,
+ { 0x1095, 0x0640, "PCI0640A/B", "EIDE Ctrlr" } ,
+ { 0x1095, 0x0641, "PCI0640", "PCI EIDE Adapter with RAID 1" } ,
+ { 0x1095, 0x0642, "PCI0642", "IDE Cntrlr w/RAID 1" } ,
+ { 0x1095, 0x0643, "PCI0643", "PCI EIDE controller" } ,
+ { 0x1095, 0x0646, "PCI0646", "bus master IDE" } ,
+ { 0x1095, 0x0647, "PCI0647", "" } ,
+ { 0x1095, 0x0648, "PCI-648", "Bus Master Ultra DMA PCI-IDE/ATA Chip" } ,
+ { 0x1095, 0x0649, "PCI-649", "Ultra ATA/100 PCI to IDE/ATA Controller" } ,
+ { 0x1095, 0x0650, "PBC0650A", "Fast SCSI-II Ctrlr" } ,
+ { 0x1095, 0x0670, "USB0670", "PCI-USB ASIC" } ,
+ { 0x1095, 0x0673, "USB0673", "PCI-USB ASIC" } ,
+ { 0x1095, 0x0680, "SiI 0680", "UltraATA/133 EIDE Controller" } ,
+ { 0x1095, 0x3112, "SiI 3112", "SATARaid Controller" } ,
+ { 0x1097, 0x0038, "", "EIDE Controller (single FIFO)" } ,
+ { 0x1098, 0x0001, "QD8500", "EIDE Controller" } ,
+ { 0x1098, 0x0002, "QD8580", "EIDE Controller" } ,
+ { 0x109E, 0x0350, "BT848", "TV/PCI with DMA Push" } ,
+ { 0x109E, 0x0351, "Bt849", "Video Capture" } ,
+ { 0x109E, 0x0369, "Bt878", "Video Capture" } ,
+ { 0x109E, 0x036C, "Bt879KHF", "Video Capture" } ,
+ { 0x109E, 0x036E, "Bt878", "MediaStream Controller" } ,
+ { 0x109E, 0x036F, "Bt879", "Video Capture" } ,
+ { 0x109E, 0x0370, "Bt880", "Video Capture (10 bit High qualtiy cap)" } ,
+ { 0x109E, 0x0878, "Bt878", "Video Capture (Audio Section)" } ,
+ { 0x109E, 0x0879, "Bt879", "Video Capture (Audio Section)" } ,
+ { 0x109E, 0x0880, "Bt880", "Video Capture (Audio Section)" } ,
+ { 0x109E, 0x2115, "BtV 2115", "BtV Mediastream Controller" } ,
+ { 0x109E, 0x2125, "BtV 2125", "BtV Mediastream Controller" } ,
+ { 0x109E, 0x2164, "BtV 2164", "Display Adapter" } ,
+ { 0x109E, 0x2165, "BtV 2165", "MediaStream Controller" } ,
+ { 0x109E, 0x8230, "BtV 8230", "ATM Segment/Reassembly Controller (SRC)" } ,
+ { 0x109E, 0x8472, "Bt8471/72", "32/64-channel HDLC Controllers" } ,
+ { 0x109E, 0x8474, "Bt8474", "128-channel HDLC Controller" } ,
+ { 0x10A4, 0X5969, "", "" } ,
+ { 0x10A8, 0x0000, "?", "64-bit GUI Accelerator" } ,
+ { 0x10a9, 0x0001, "", "Crosstalk to PCi Bridge" } ,
+ { 0x10a9, 0x0002, "Linc", "I/O Controller" } ,
+ { 0x10a9, 0x0003, "IOC3", "I/O Controller" } ,
+ { 0x10A9, 0x0004, "O2 MACE", "" } ,
+ { 0x10A9, 0x0005, "RAD Audio", "" } ,
+ { 0x10A9, 0x0006, "HPCEX", "" } ,
+ { 0x10A9, 0x0007, "RPCEX", "" } ,
+ { 0x10A9, 0x0008, "DiVO VIP", "" } ,
+ { 0x10A9, 0x0009, "Alteon", "Gigabit Ethernet" } ,
+ { 0x10A9, 0x0010, "AMP", "Video I/O" } ,
+ { 0x10A9, 0x0011, "GRIP", "" } ,
+ { 0x10A9, 0x0012, "SGH PSHAC GSN", "" } ,
+ { 0x10A9, 0x1001, "Magic Carpet", "" } ,
+ { 0x10A9, 0x1002, "Lithium", "" } ,
+ { 0x10A9, 0x1003, "Dual JPEG 1", "" } ,
+ { 0x10A9, 0x1004, "Dual JPEG 2", "" } ,
+ { 0x10A9, 0x1005, "Dual JPEG 3", "" } ,
+ { 0x10A9, 0x1006, "Dual JPEG 4", "" } ,
+ { 0x10A9, 0x1007, "Dual JPEG 5", "" } ,
+ { 0x10A9, 0x1008, "Cesium", "" } ,
+ { 0x10A9, 0x2001, "", "Fibre Channel" } ,
+ { 0x10A9, 0x2002, "ASDE", "" } ,
+ { 0x10A9, 0x8001, "O2 1394", "" } ,
+ { 0x10A9, 0x8002, "G-net NT", "" } ,
+ { 0x10AA, 0x0000, "ACC 2056/2188", "CPU to PCI Bridge (Pentium)" } ,
+ { 0x10AA, 0x2051, "", "Laptop Chipset CPU Bridge" } ,
+ { 0x10AA, 0x5842, "", "Laptop Chipset ISA Bridge" } ,
+ { 0x10AD, 0x0001, "W83769F", "EIDE Ctrlr" } ,
+ { 0x10ad, 0x0003, "SL82C103", "EIDE Controller" } ,
+ { 0x10ad, 0x0005, "SL82C105", "EIDE Busmaster Controller" } ,
+ { 0x10AD, 0x0103, "sl82c103", "PCI-ide mode 4.5 Cntrlr" } ,
+ { 0x10AD, 0x0105, "W83789F", "Sonata bus master PCI-IDE controller" } ,
+ { 0x10ad, 0x0150, "", "EIDE Controller" } ,
+ { 0x10ad, 0x0565, "W83C553F/554F", "ISA Bridge" } ,
+ { 0x10ae, 0x0002, "", "Graphics Controller" } ,
+ { 0x10af, 0x0001, "", "IDE Controller" } ,
+ { 0x10b3, 0x3106, "DB87144", "CardBus Controller" } ,
+ { 0x10b3, 0xB106, "DB87144", "PCI-to-CardBus bridge" } ,
+ { 0x10b4, 0x1B1D, "Velocity 128 3D", "" } ,
+ { 0x10b5, 0x0364, "PCI 9080RDK-RC32364", "PCI Reference Design Kit for PCI 9080" } ,
+ { 0x10b5, 0x0401, "PCI 9080RDK-401B", "PCI Reference Design Kit for PCI 9080" } ,
+ { 0x10B5, 0x0480, "IOP 480", "Integrated PowerPC I/O Processor" } ,
+ { 0x10b5, 0x0860, "PCI 9080RDK-860", "PCI Reference Design Kit for PCI 9080" } ,
+ { 0x10B5, 0x0960, "PCI 9080RDK-960", "PCI Reference Design Kit for PCI 9080" } ,
+ { 0x10B5, 0x1030, "Gazel R685", "ISDN card" } ,
+ { 0x10b5, 0x1076, "PCI 9050", "Vision Systems VScom 800" } ,
+ { 0x10b5, 0x1077, "PCI 9050", "Vision Systems VScom 400" } ,
+ { 0x10B5, 0x1078, "PCI 9050", "Vision Systems VScom PCI-210" } ,
+ { 0x10B5, 0x1103, "PCI 9050", "Vision Systems VScom PCI-200" } ,
+ { 0x10B5, 0x1146, "PCI 9050", "Vision Systems VScom PCI-010S" } ,
+ { 0x10B5, 0x1147, "PCI 9050", "Vision Systems VScom PCI-020S" } ,
+ { 0x10B5, 0x1151, "Gazel R753", "ISDN card" } ,
+ { 0x10B5, 0x1152, "Gazel R753", "ISDN card" } ,
+ { 0x10b5, 0x1860, "PCI 9054RDK-860", "Reference Design Kit for PCI 9054" } ,
+ { 0x10b5, 0x2021, "PCI9080", "Daktronics VMax Quad Transmitter Card" } ,
+ { 0x10b5, 0x2288, "", "Chrislin Industries Memory" } ,
+ { 0x10B5, 0x2724, "", "Thales PCSM Security Card" } ,
+ { 0x10b5, 0x3001, "PCI 9030RDK-LITE", "PCI Reference Design Kit for PCI 9030" } ,
+ { 0x10b5, 0x30C1, "cPCI 9030RDK-LITE", "CompactPCI Reference Design Kit for 9030" } ,
+ { 0x10b5, 0x5201, "PCI 9052RDK-LITE", "Rapid Development Kit for ISA to PCI" } ,
+ { 0x10b5, 0x5406, "PCI 9054RDK-LITE", "PCI Bus Master Prototyping Kit for 9054" } ,
+ { 0x10b5, 0x5601, "PCI 9056RDK-Lite", "PCI 9056 Rapid Development Kit" } ,
+ { 0x10b5, 0x56C2, "cPCI 9056RDK-860", "CompactPCI Rapid Design Kit for PCI 9056" } ,
+ { 0x10b5, 0x6466, "GBP32", "PCI Adaptive Switch Fabric Controller" } ,
+ { 0x10b5, 0x7709, "PCI 9080RDK-SH3", "PCI Reference Design Kit for PCI 9080" } ,
+ { 0x10B5, 0x9030, "PCI 9030", "PCI SMARTarget I/O Accelerator" } ,
+ { 0x10B5, 0x9036, "PCI9036", "Interface chip" } ,
+ { 0x10B5, 0x9050, "PCI 9050", "Target PCI Interface Chip" } ,
+ { 0x10B5, 0x9052, "PCI 9052", "PCI 9052 Target PCI Interface Chip" } ,
+ { 0x10B5, 0x9054, "PCI 9054", "PCI I/O Accelerator" } ,
+ { 0x10b5, 0x9056, "PCI 9056", "32-bit, 66MHz PCI Master I/O Accelerator" } ,
+ { 0x10B5, 0x9060, "PCI9060", "PCI Bus Master Interface Chip" } ,
+ { 0x10B5, 0x906D, "PCI 9060SD", "PCI Bus Master Interface Chip" } ,
+ { 0x10B5, 0x906E, "PCI 9060ES", "PCI Bus Master Interface Chip" } ,
+ { 0x10B5, 0x9080, "PCI 9080", "High performance PCI to Local Bus chip" } ,
+ { 0x10b5, 0x9601, "PCI 9656RDK-Lite", "PCI Rapid Development Kit for PCI 9656" } ,
+ { 0x10b5, 0x9656, "PCI 9656", "64-bit 66 MHz PCI Master I/O Accelerator" } ,
+ { 0x10b5, 0x96C2, "cPCI 9656RDK-860", "CompactPCI Rapid Development Kit" } ,
+ { 0x10b5, 0xC860, "cPCI 9054RDK-860", "CompactPCI Reference Design Kit for 9054" } ,
+ { 0x10B6, 0x0001, "Smart 16/4", "Ringnode (PCI1b)" } ,
+ { 0x10B6, 0x0002, "Smart 16/4", "Ringnode (PCIBM2/CardBus)" } ,
+ { 0x10B6, 0x0003, "Smart 16/4", "Ringnode" } ,
+ { 0x10B6, 0x0004, "", "Smart 16/4 Ringnode Mk1 (PCIBM1)" } ,
+ { 0x10B6, 0x0006, "", "16/4 CardBus Adapter (Eric 2)" } ,
+ { 0x10B6, 0x0007, "Presto PCI", "" } ,
+ { 0x10B6, 0x0009, "", "Smart 100/16/4 PCi-HS Ringnode" } ,
+ { 0x10B6, 0x000A, "", "Smart 100/16/4 PCI Ringnode" } ,
+ { 0x10B6, 0x000B, "", "16/4 CardBus Adapter Mk2" } ,
+ { 0x10B6, 0x1000, "Horizon", "ATM adapter" } ,
+ { 0x10B6, 0x1001, "Ambassador", "ATM adapter" } ,
+ { 0x10B6, 0x1002, "Ambassador", "ATM Adapter" } ,
+ { 0x10B7, 0x0001, "3C985", "1000BaseSX Gigabit Etherlink" } ,
+ { 0x10B7, 0x1000, "3C905CX-TXNM", "3COM 3C905CX-TXNM with 40-0664-003 ASIC" } ,
+ { 0x10B7, 0x1006, "0038TA <- AC101 - TF", "Mini-PCI 56K V.90 Modem" } ,
+ { 0x10B7, 0x1007, "3C556", "V.90 Mini-PCI Modem" } ,
+ { 0x10B7, 0x1F1F, "3CRWE777A", "AirConnect Wireless LAN PCI Card" } ,
+ { 0x10B7, 0x3390, "3C339", "Token Link Velocity" } ,
+ { 0x10B7, 0x3590, "3C359", "TokenLink Velocity XL Adapter" } ,
+ { 0x10B7, 0x4500, "3C450", "Cyclone" } ,
+ { 0x10B7, 0x5055, "3C555", "Laptop Hurricane" } ,
+ { 0x10B7, 0x5057, "3C575", "Megahertz 10/100 LAN CardBus PC Card" } ,
+ { 0x10B7, 0x5157, "3C575B", "Megahertz 10/100 LAN CardBus PC Card" } ,
+ { 0x10B7, 0x5257, "3CCFE575CT", "Cyclone Fast Ethernet CardBus PC Card" } ,
+ { 0x10B7, 0x5900, "3C590", "Ethernet III Bus Fast PCI" } ,
+ { 0x10B7, 0x5920, "3C592", "PCI/EISA 10Mbps Demon/Vortex" } ,
+ { 0x10B7, 0x5950, "3C595", "Fast EtherLink PCI TX" } ,
+ { 0x10B7, 0x5951, "3C595", "Fast EtherLink PCI T4" } ,
+ { 0x10B7, 0x5952, "3C595", "Fast EtherLink PCI MII" } ,
+ { 0x10B7, 0x5970, "3C597", "PCI/EISA Fast Demon/Vortex" } ,
+ { 0x10B7, 0x5B57, "3C595", "Megahertz 10/100 LAN CardBus" } ,
+ { 0x10B7, 0x6055, "3C556", "10/100 Fast Ethernet MiniPCI Adapter" } ,
+ { 0x10B7, 0x6056, "3CN3AC1556B", "MiniPCI 10/100 Ethernet+Modem56k (see devid:1007)" } ,
+ { 0x10B7, 0x6560, "3CCFE656", "Cyclone CardBus PC Card" } ,
+ { 0x10B7, 0x6561, "FEM656", "10/100 LAN+56K Modem CardBus PC Card" } ,
+ { 0x10B7, 0x6562, "3CCFEM656", "Cyclone CardBus PC Card" } ,
+ { 0x10B7, 0x6563, "FEM656B", "10/100 LAN+56K Modem CardBus PC Card" } ,
+ { 0x10B7, 0x6564, "3CCFEM656", "Cyclone CardBus PC Card" } ,
+ { 0x10B7, 0x6565, "3CCFEM656C", "Global 10/100 Fast Ethernet+56K Modem" } ,
+ { 0x10B7, 0x7646, "3CSOHO100-TX", "Hurricane" } ,
+ { 0x10B7, 0x8811, "", "Token Ring" } ,
+ { 0x10B7, 0x9000, "3C900-TPO", "Fast Etherlink PCI TPO NIC" } ,
+ { 0x10B7, 0x9001, "3C900-COMBO", "Fast Etherlink XL PCI Combo NIC" } ,
+ { 0x10B7, 0x9004, "3C900B-TPO", "EtherLink XL TPO 10Mb" } ,
+ { 0x10B7, 0x9005, "3C900B-COMBO", "Fast Etherlink 10Mbps Combo NIC" } ,
+ { 0x10B7, 0x9006, "3C900B-TPC", "EtherLink XL TPC" } ,
+ { 0x10B7, 0x900A, "3C900B-FL", "EtherLink PCI Fiber NIC" } ,
+ { 0x10B7, 0x9050, "3C905-TX", "Fast Etherlink XL PCI 10/100" } ,
+ { 0x10B7, 0x9051, "3C905-T4", "Fast Etherlink XL 10/100" } ,
+ { 0x10B7, 0x9055, "3C905B-TX", "Fast Etherlink 10/100 PCI TX NIC" } ,
+ { 0x10B7, 0x9056, "3C905B-T4", "Fast EtherLink XL 10/100" } ,
+ { 0x10B7, 0x9058, "3C905B-COMBO", "Deluxe EtherLink 10/100 PCI Combo NIC" } ,
+ { 0x10B7, 0x905A, "3C905B-FX", "Fast EtherLink 100 Fiber NIC" } ,
+ { 0x10B7, 0x9200, "3C905C-TX", "Fast EtherLink for PC Management NIC" } ,
+ { 0x10B7, 0x9800, "3C980-TX", "Fast EtherLink XL Server Adapter" } ,
+ { 0x10B7, 0x9805, "3C980-TX", "Python-T 10/100baseTX NIC" } ,
+ { 0x10B7, 0x9902, "3CR990-TX-95", "EtherLink 10/100 PCI with 3XP Processor" } ,
+ { 0x10B7, 0x9903, "3CR990-TX-97", "EtherLink 10/100 PCI with 3XP Processor" } ,
+ { 0x10B7, 0x9908, "3CR990SVR95", "EtherLink 10/100 Server PCI with 3XP" } ,
+ { 0x10B7, 0x9909, "3CR990SVR97", "EtherLink 10/100 Server PCI with 3XP" } ,
+ { 0x10B8, 0x0005, "LAN83C170QF/171", "EPIC/XF 10/100 Mbps Fast Ethernet Ctrlr" } ,
+ { 0x10B8, 0x0006, "LAN83C175", "EPIC/C Ethernet CardBus Integrated Ctrlr" } ,
+ { 0x10B8, 0x1000, "37C665", "FDC" } ,
+ { 0x10B8, 0x1001, "37C922", "FDC" } ,
+ { 0x10B8, 0xA011, "83C170QF", "Fast ethernet controller" } ,
+ { 0x10B8, 0xB106, "SMC34C90", "CardBus Controller" } ,
+ { 0x10B9, 0x0111, "CMI8738/C3DX", "C-Media Audio Device (OEM)" } ,
+ { 0x10B9, 0x1435, "M1435", "VL Bridge" } ,
+ { 0x10B9, 0x1445, "M1445", "CPU to PCI & PCI to ISA Bridge w/EIDE" } ,
+ { 0x10B9, 0x1449, "M1449", "ISA Bridge" } ,
+ { 0x10B9, 0x1451, "M1451", "Pentium CPU to PCI Bridge" } ,
+ { 0x10B9, 0x1461, "M1461", "P54C Chipset" } ,
+ { 0x10B9, 0x1489, "M1489", "486 PCI Chipset" } ,
+ { 0x10B9, 0x1511, "M1511", "Aladdin 2 Host Bridge" } ,
+ { 0x10B9, 0x1513, "M1513", "Aladdin 2 South Bridge" } ,
+ { 0x10B9, 0x1521, "M1521", "Alladin III CPU to PCI Bridge" } ,
+ { 0x10B9, 0x1523, "M1523", "ISA Bridge" } ,
+ { 0x10b9, 0x1531, "M1531B", "ALi Aladdin IV Host Bridge" } ,
+ { 0x10B9, 0x1533, "M1533", "PCI South Bridge" } ,
+ { 0x10B9, 0x1535, "M1535x", "ISA Bridge" } ,
+ { 0x10B9, 0x1541, "M1541", "Aladdin V AGPset Host Bridge" } ,
+ { 0x10B9, 0x1543, "M1543", "Aladdin V AGPset South Bridge" } ,
+ { 0x10B9, 0x1561, "M1561", "North Bridge" } ,
+ { 0x10B9, 0x1563, "M1563", "South Bridge with Hypertransport Support" } ,
+ { 0x10b9, 0x1621, "M1621", "Aladdin-Pro II Northbridge" } ,
+ { 0x10b9, 0x1631, "M1631", "Aladdin Pro III Northbridge" } ,
+ { 0x10B9, 0x1632, "M1632", "North Bridge" } ,
+ { 0x10B9, 0x1641, "M1641", "CPU to PCI Bridge" } ,
+ { 0x10B9, 0x1644, "M1644", "AGP System Controller" } ,
+ { 0x10B9, 0x1646, "M1646", "AGP System Controller" } ,
+ { 0x10B9, 0x1647, "M1647", "CPU to PCI Bridge" } ,
+ { 0x10B9, 0x1651, "M1651", "CPU to PCI Bridge" } ,
+ { 0x10B9, 0x1661, "M1661", "AGP System Controller" } ,
+ { 0x10B9, 0x1667, "M1667", "AGP System Controller" } ,
+ { 0x10B9, 0x1671, "M1671", "Super P4 Nouth Bridge" } ,
+ { 0x10B9, 0x1681, "M1681", "P4 Nouth Bridge with HyperTransport" } ,
+ { 0x10B9, 0x1687, "M1687", "K8 North Bridge with HyperTransport" } ,
+ { 0x10B9, 0x3141, "M3141", "GUI Accelerator" } ,
+ { 0x10B9, 0x3143, "M3143", "GUI Accelerator" } ,
+ { 0x10B9, 0x3145, "M3145", "GUI Accelerator" } ,
+ { 0x10B9, 0x3147, "M3147", "GUI Accelerator" } ,
+ { 0x10B9, 0x3149, "M3149", "GUI Accelerator" } ,
+ { 0x10B9, 0x3151, "M3151", "GUI Accelerator" } ,
+ { 0x10B9, 0x3307, "M3307", "MPEG-1 Decoder" } ,
+ { 0x10B9, 0x3309, "M3309", "MPEG Decoder" } ,
+ { 0x10B9, 0x5212, "M4803", "" } ,
+ { 0x10B9, 0x5215, "MS4803", "EIDE Ctrlr" } ,
+ { 0x10B9, 0x5217, "m5217h", "I/O (?)" } ,
+ { 0x10B9, 0x5219, "m5219", "PCI Bus Master IDE Controller" } ,
+ { 0x10B9, 0x5225, "M5225", "IDE Controller" } ,
+ { 0x10B9, 0x5229, "M1543 Southbridge", "EIDE Controller" } ,
+ { 0x10B9, 0x5235, "M5235", "I/O Controller" } ,
+ { 0x10b9, 0x5237, "M5237", "USB Host Controller" } ,
+ { 0x10b9, 0x5240, "", "EIDE Controller" } ,
+ { 0x10b9, 0x5241, "", "PCMCIA Bridge" } ,
+ { 0x10b9, 0x5242, "", "General Purpose Controller" } ,
+ { 0x10b9, 0x5243, "M1541A", "Aladdin V PCI-to-PCI Bridge" } ,
+ { 0x10b9, 0x5244, "", "Floppy Disk Controller" } ,
+ { 0x10b9, 0x5247, "M1621", "Aladdin V built-in PCI-to-PCI bridge" } ,
+ { 0x10B9, 0x5249, "M5249", "HyperTransport to PCI Bridge" } ,
+ { 0x10B9, 0x5251, "M5251", "IEEE P1394 OpenHCI 1.0 Controller" } ,
+ { 0x10B9, 0x5253, "M5253", "IEEE P1394 OpenHCI 1.0 Controller" } ,
+ { 0x10b9, 0x5427, "M6VLR", "PCI to AGP Bridge" } ,
+ { 0x10B9, 0x5450, "", "Agere Systems AC97 Modem" } ,
+ { 0x10b9, 0x5451, "M5451", "PCI AC-link Controller Audio Device" } ,
+ { 0x10b9, 0x5453, "M5453", "PCI AC-link Controller Modem Device" } ,
+ { 0x10B9, 0x5457, "ALI N5457", "Agere Systems AC97 Modem" } ,
+ { 0x10B9, 0X5459, "MDV92XP NetoDragon", "PCI Soft Modem V92 NetoDragon" } ,
+ { 0x10B9, 0x7101, "M7101", "Power Management Controller" } ,
+ { 0x10ba, 0x0301, "", "GUI Accelerator" } ,
+ { 0x10BA, 0x0304, "", "GUI Accelerator" } ,
+ { 0x10BD, 0x0E34, "NE34", "Ethernet Adapter (NE2000 PCI clone)" } ,
+ { 0x10BD, 0x5240, "", "IDE Cntrlr" } ,
+ { 0x10BD, 0x5241, "", "PCMCIA Bridge" } ,
+ { 0x10BD, 0x5242, "", "General Purpose Cntrlr" } ,
+ { 0x10BD, 0x5243, "", "Bus Cntrlr" } ,
+ { 0x10BD, 0x5244, "", "FCD Cntrlr" } ,
+ { 0x10c3, 0x1100, "SC1100", "SmartEther100 LAN Adapter (i82557B)" } ,
+ { 0x10C4, 0x8363, "", "" } ,
+ { 0x10C8, 0x0000, "", "Graphics Cntrlr" } ,
+ { 0x10c8, 0x0001, "NM2070", "MagicGraph 128" } ,
+ { 0x10c8, 0x0002, "NM2090", "MagicGraph 128V" } ,
+ { 0x10C8, 0x0003, "NM2093", "MagicGraph 128ZV Video Controller" } ,
+ { 0x10C8, 0x0004, "NM2160", "MagicGraph 128XD" } ,
+ { 0x10C8, 0x0005, "NM2200", "MagicMedia 256AV" } ,
+ { 0x10C8, 0x0006, "NM2360", "MagicMedia 256ZX/256M6D" } ,
+ { 0x10C8, 0x0016, "NM2380", "MagicMedia 256XL+" } ,
+ { 0x10C8, 0x0025, "NM2230", "MagicMedia 256AV+" } ,
+ { 0x10C8, 0x0083, "NM2097", "Graphic Controller NeoMagic MagicGraph128ZV+" } ,
+ { 0x10C8, 0x8005, "NM2200", "MagicMedia 256AV Audio Device" } ,
+ { 0x10C8, 0x8006, "NM2360", "MagicMedia 256ZX Audio Device" } ,
+ { 0x10C8, 0x8016, "NM2380", "MagicMedia 256XL+ Audio Device" } ,
+ { 0x10cc, 0x0226, "Articia S", "RISC chipset with AGP2X" } ,
+ { 0x10cc, 0x0257, "Articia Sa", "RISC chipset with PCIX, AGP2X, DDR, DMA" } ,
+ { 0x10CD, 0x1100, "ASC1100", "PCI SCSI Host Adapter" } ,
+ { 0x10CD, 0x1200, "ASC1200", "Fast SCSI-II" } ,
+ { 0x10CD, 0x1300, "ASC-3050", "ASC-3150" } ,
+ { 0x10CD, 0x2300, "ASC2300", "PCI Ultra Wide SCSI-2 Host Adapter" } ,
+ { 0x10CD, 0x2500, "ASC38C0800/1600", "PCI Ultra 80/160 SCSI Controllers" } ,
+ { 0x10CD, 0x4000, "ASC30C0400", "IEEE-1394 OHCI PCI Controller" } ,
+ { 0x10CF, 0x10C5, "FMV-103", "Serial Parallel Card" } ,
+ { 0x10CF, 0x2001, "MB86605", "PCI SCSI Host Adapter (Fast Wide SCSI-2)" } ,
+ { 0x10CF, 0x2002, "MB86606", "Fast Wide SCSI Controller" } ,
+ { 0x10CF, 0x2005, "MB86974", "10/100 Fast Ethernet Adapter" } ,
+ { 0x10CF, 0x200C, "MB86974", "IEEE1394 OpenHCI Controller" } ,
+ { 0x10CF, 0x2010, "", "OHCI FireWire Controller" } ,
+ { 0x10CF, 0x2011, "", "MPEG2 R-Engine (MPEG2 Hardware Encoder)" } ,
+ { 0x10D9, 0x0066, "MX86101P", "" } ,
+ { 0x10D9, 0x0512, "MX98713", "Fast Ethernet Adapter" } ,
+ { 0x10D9, 0x0531, "MX98715/725", "Single Chip Fast Ethernet NIC Controller" } ,
+ { 0x10D9, 0x0532, "MX98723/727", "PCI/CardBus Fast Ethernet Controller" } ,
+ { 0x10D9, 0x0553, "MX987x5", "Ethernet Adapter" } ,
+ { 0x10D9, 0x8625, "MX86250", "" } ,
+ { 0x10D9, 0x8626, "MX86251", "" } ,
+ { 0x10D9, 0x8627, "MX86251", "" } ,
+ { 0x10D9, 0x8888, "MX86200", "9619E" } ,
+ { 0x10D9, 0xC115, "lc82c115", "" } ,
+ { 0x10DA, 0x0508, "TC4048", "Token Ring" } ,
+ { 0x10DA, 0x3390, "Tl3c3x9", "Token Ring" } ,
+ { 0x10DC, 0x0001, "STAR/RD24", "SCSI (PMC)" } ,
+ { 0x10DC, 0x0002, "ATT 2C15-3 (FPGA)", "SCI bridge on PCI 5 Volt card" } ,
+ { 0x10DC, 0x0010, "680-1110-150/400", "Simple PMC/PCI to S-LINK interface" } ,
+ { 0x10DC, 0x0011, "680-1110-200/450", "Simple S-LINK to PMC/PCI interface" } ,
+ { 0x10DC, 0x0012, "S32PCI64", "32-bit S-LINK to 64-bit PCI interface" } ,
+ { 0x10DC, 0x0021, "", "HIPPI destination" } ,
+ { 0x10DC, 0x0022, "", "HIPPI source" } ,
+ { 0x10dc, 0x0033, "", "ALICE DDL PCI adapter card (RORC)" } ,
+ { 0x10DC, 0x10DC, "ATT 2C15-3 (FPGA)", "" } ,
+ { 0x10DD, 0x0001, "", "3D graphics processor" } ,
+ { 0x10DE, 0x0008, "NV1", "Edge 3D" } ,
+ { 0x10DE, 0x0009, "NV1", "Edge 3D" } ,
+ { 0x10DE, 0x0010, "NV2", "Mutara V08" } ,
+ { 0x10DE, 0x0018, "NV3", "Riva 128" } ,
+ { 0x10DE, 0x0019, "NV3", "Riva 128ZX" } ,
+ { 0x10DE, 0x0020, "NV4", "Riva TNT" } ,
+ { 0x10DE, 0x0028, "NV5", "TNT2 / TNT2 Pro" } ,
+ { 0x10DE, 0x0029, "NV5", "TNT2 Ultra" } ,
+ { 0x10DE, 0x002A, "NV5", "TNT2" } ,
+ { 0x10DE, 0x002B, "NV5", "Riva TNT2" } ,
+ { 0x10DE, 0x002C, "NV5", "Vanta/Vanta LT" } ,
+ { 0x10DE, 0x002D, "NV5", "TNT2 Model 64 / TNT2 Model 64 Pro" } ,
+ { 0x10DE, 0x002E, "NV6", "VANTA" } ,
+ { 0x10DE, 0x002F, "NV6", "VANTA" } ,
+ { 0x10DE, 0x0060, "nForce MCP2", "ISA Bridge" } ,
+ { 0x10DE, 0x0064, "nForce MCP-T?", "SMBus Controller" } ,
+ { 0x10DE, 0x0065, "nForce MCP2", "EIDE Controller" } ,
+ { 0x10DE, 0x0066, "nForce MCP2", "Networking Adapter" } ,
+ { 0x10DE, 0x0067, "nForce MCP2", "OpenHCI USB Controller" } ,
+ { 0x10DE, 0x0068, "nForce MCP2", "EHCI USB 2.0 Controller" } ,
+ { 0x10DE, 0x006A, "nForce MCP2", "Audio Codec Interface" } ,
+ { 0x10DE, 0x006B, "nForce MCP-T?", "Audio Processing Unit (Dolby Digital)" } ,
+ { 0x10DE, 0x006C, "nForce", "PCI to PCI Bridge" } ,
+ { 0x10DE, 0x006E, "nForce MCP2", "OHCI Compliant IEEE 1394 Controller" } ,
+ { 0x10DE, 0x00A0, "NV5", "Aladdin TNT2" } ,
+ { 0x10DE, 0x00D4, "nForce MCP3?", "SMBus Controller" } ,
+ { 0x10DE, 0x00DA, "nForce MCP3", "Audio Codec Interface" } ,
+ { 0x10DE, 0x0100, "NV10", "GeForce 256" } ,
+ { 0x10DE, 0x0101, "NV10", "GeForce 256 DDR" } ,
+ { 0x10DE, 0x0102, "NV10", "GeForce 256 Ultra" } ,
+ { 0x10DE, 0x0103, "NV10GL", "Quadro (GeForce 256 GL)" } ,
+ { 0x10DE, 0x0110, "NV11", "GeForce2 MX / MX 400" } ,
+ { 0x10DE, 0x0111, "NV11DDR", "GeForce2 MX 100/200  (DDR)" } ,
+ { 0x10DE, 0x0112, "NV11", "GeForce2 Go / MX Ultra" } ,
+ { 0x10DE, 0x0113, "NV11GL", "Quadro2 MXR / EX / Go" } ,
+ { 0x10DE, 0x0150, "NV15", "GeForce2 GTS / Pro" } ,
+ { 0x10DE, 0x0151, "NV15 DDR", "GeForce2 Ti (DDR)" } ,
+ { 0x10DE, 0x0152, "NV15BR", "GeForce2 Ultra (BladeRunner)" } ,
+ { 0x10DE, 0x0153, "NV15GL", "Quadro2 Pro" } ,
+ { 0x10DE, 0x0170, "NV17.1", "GeForce4 MX 460" } ,
+ { 0x10DE, 0x0171, "NV17.2", "GeForce4 MX 440" } ,
+ { 0x10DE, 0x0172, "NV17.3", "GeForce4 MX 420" } ,
+ { 0x10DE, 0x0173, "NV17", "" } ,
+ { 0x10DE, 0x0174, "NV17M", "GeForce4 440 Go" } ,
+ { 0x10DE, 0x0175, "NV17M", "GeForce4 420 Go" } ,
+ { 0x10DE, 0x0176, "NV17M", "GeForce4 420 Go 32M" } ,
+ { 0x10DE, 0x0177, "NV17M", "GeForce4 460 Go" } ,
+ { 0x10DE, 0x0178, "NV17GL.1", "Quadro4 500/550 XGL" } ,
+ { 0x10DE, 0x0179, "NV17M", "GeForce4 440 Go 64M" } ,
+ { 0x10DE, 0x017A, "NV17GL.2", "Quadro4 200/400 NVS" } ,
+ { 0x10DE, 0x017B, "NV17GL.3", "Quadro4 550 XGL" } ,
+ { 0x10DE, 0x017C, "NV17M-GL", "Quadro4 500 GoGL" } ,
+ { 0x10de, 0x0180, "NV18", "GeForce4 MX 440 with AGP8X" } ,
+ { 0x10de, 0x0181, "NV18", "GeForce4 MX 440SE with AGP8X" } ,
+ { 0x10de, 0x0182, "NV18", "GeForce4 MX 420 with AGP8X" } ,
+ { 0x10DE, 0x0183, "", "GeForce4 MX 460?" } ,
+ { 0x10de, 0x0188, "NV18GL", "Quadro4 580 XGL" } ,
+ { 0x10de, 0x018A, "NV18GL", "Quadro4 280 NVS" } ,
+ { 0x10de, 0x018B, "NV18GL", "Quadro4 380 XGL" } ,
+ { 0x10De, 0x01A0, "Crush11", "GeForce2 Integrated graphics" } ,
+ { 0x10DE, 0x01A4, "nForce", "AGP Controller" } ,
+ { 0x10DE, 0x01A5, "nForce", "AGP Controller" } ,
+ { 0x10DE, 0x01A6, "nForce", "AGP Controller" } ,
+ { 0x10DE, 0x01A8, "nForce 220", "Memory Controller (SDR)" } ,
+ { 0x10DE, 0x01A9, "nForce 420", "Memory Controller (SDR)" } ,
+ { 0x10DE, 0x01AA, "nForce 220/230", "Memory Controller (DDR)" } ,
+ { 0x10DE, 0x01AB, "nForce 415/420/430", "Memory Controller (DDR)" } ,
+ { 0x10DE, 0x01AC, "nForce 2x0/415/4x0", "Memory Controller" } ,
+ { 0x10DE, 0x01AD, "nForce 2x0/415/4x0", "Memory Controller" } ,
+ { 0x10DE, 0x01B0, "nForce MCP", "Audio Processing Unit (Dolby Digital)" } ,
+ { 0x10DE, 0x01B1, "nForce MCP", "Audio Codec Interface" } ,
+ { 0x10DE, 0x01B2, "nForce", "HUB Interface" } ,
+ { 0x10DE, 0x01B4, "nForce MCP", "SMBus Controller" } ,
+ { 0x10DE, 0x01B7, "nForce AGP", "Host to PCI Bridge" } ,
+ { 0x10DE, 0x01B8, "nForce", "PCI Bridge" } ,
+ { 0x10DE, 0x01BC, "nForce MCP", "ATA Controller" } ,
+ { 0x10DE, 0x01C1, "nForce MCP", "AC97 Modem" } ,
+ { 0x10DE, 0x01C2, "nForce MCP", "OHCI USB Controller" } ,
+ { 0x10DE, 0x01C3, "nForce MCP", "Networking Adapter" } ,
+ { 0x10DE, 0x01E0, "nForce2", "AGP Controller" } ,
+ { 0x10DE, 0x01E1, "nForce2", "AGP Controller" } ,
+ { 0x10DE, 0x01E8, "nForce2", "AGP Host to PCI Bridge" } ,
+ { 0x10DE, 0x01EA, "nForce2", "Memory Controller 0" } ,
+ { 0x10DE, 0x01EB, "nForce2", "Memory Controller 1" } ,
+ { 0x10DE, 0x01EC, "nForce2", "Memory Controller 2" } ,
+ { 0x10DE, 0x01ED, "nForce2", "Memory Controller 3" } ,
+ { 0x10DE, 0x01EE, "nForce2", "Memory Controller 4" } ,
+ { 0x10DE, 0x01EF, "nForce2", "Memory Controller 5" } ,
+ { 0x10de, 0x01F0, "nForce2 IGP", "GeForce4 MX Integrated GPU" } ,
+ { 0x10DE, 0x0200, "NV20", "GeForce3" } ,
+ { 0x10de, 0x0201, "NV20DDR", "GeForce3 Ti 200" } ,
+ { 0x10DE, 0x0202, "NV20BR", "GeForce3 Ti 500" } ,
+ { 0x10DE, 0x0203, "NV20DCC", "Quadro DCC" } ,
+ { 0x10de, 0x0250, "NV25.1", "GeForce4 Ti 4600" } ,
+ { 0x10de, 0x0251, "NV25.2", "GeForce4 Ti 4400" } ,
+ { 0x10de, 0x0252, "NV25.3", "" } ,
+ { 0x10de, 0x0253, "NV25.4", "GeForce4 Ti 4200" } ,
+ { 0x10de, 0x0258, "NV25GL.1", "Quadro4 900 XGL" } ,
+ { 0x10de, 0x0259, "NV25GL.2", "Quadro4 750 XGL" } ,
+ { 0x10de, 0x025B, "NV25GL.4", "Quadro4 700 XGL" } ,
+ { 0x10de, 0x0280, "NV28", "GeForce4 Ti 4600 with AGP 8X" } ,
+ { 0x10de, 0x0281, "NV28", "GeForce4 Ti 4200 with AGP8X" } ,
+ { 0x10de, 0x0282, "NV28", "GeForce4 Ti 4800 SE" } ,
+ { 0x10de, 0x0288, "NV28GL", "Quadro4 980 XGL" } ,
+ { 0x10de, 0x0289, "NV28GL", "Quadro4 780 XGL" } ,
+ { 0x10DE, 0x02A0, "NV2A", "GeForce3 Integrated GPU" } ,
+ { 0x10de, 0x0301, "NV30", "GeForceFX 5800" } ,
+ { 0x10de, 0x0302, "NV30", "GeForceFX 5800" } ,
+ { 0x10de, 0x0308, "NV30GL", "QuadroFX" } ,
+ { 0x10de, 0x0309, "NV30GL", "QuadroFX" } ,
+ { 0x10DF, 0x10DF, "Light Pulse", "Fibre Channel Adapter" } ,
+ { 0x10DF, 0x1AE5, "LP6000", "Fibre Channel Host Adapter" } ,
+ { 0x10DF, 0xF700, "LP7000", "Fibre Channel Host Adapter" } ,
+ { 0x10DF, 0xF800, "LP8000", "Fibre Channel Host Adapter" } ,
+ { 0x10E0, 0x5026, "IMS5026/27/28", "VL Bridge" } ,
+ { 0x10E0, 0x5027, "IMS5027", "" } ,
+ { 0x10E0, 0x5028, "IMS5028", "ISA Bridge" } ,
+ { 0x10E0, 0x8849, "IMS8849/48", "VL Bridge" } ,
+ { 0x10E0, 0x8853, "IMS8853", "ATM Network Adapter" } ,
+ { 0x10E0, 0x9128, "IMS9129", "GUI Accelerator" } ,
+ { 0x10E1, 0x0391, "TRM-S1040", "" } ,
+ { 0x10E1, 0x690C, "DC-690c", "" } ,
+ { 0x10E1, 0xDC20, "DC-290", "EIDE Controller" } ,
+ { 0x10E3, 0x0000, "CA91C042/142", "Universe/II VMEbus Bridge" } ,
+ { 0x10E3, 0x0513, "Tsi320", "Dual-Mode PCI-to-PCI Bus Bridge" } ,
+ { 0x10E3, 0x0850, "Tsi850", "Power PC Dual PCI Host Bridge" } ,
+ { 0x10E3, 0x0854, "Tsi850", "Power PC Single PCI Host Bridge" } ,
+ { 0x10E3, 0x0860, "CA91C860", "QSpan Motorola Processor Bridge" } ,
+ { 0x10E3, 0x0862, "CA91L862A", "QSpan II PCI-to-Motorola CPU Bridge" } ,
+ { 0x10E3, 0x8260, "CA91L8200/8260", "PowerSpan II PowerPC-to-PCI Bus Switch" } ,
+ { 0x10E3, 0x8261, "CA91L8200/8260", "PowerSpan II PowerPC-to-PCI Bus Switch" } ,
+ { 0x10E8, 0x2011, "Q-Motion pci 200", "Video Capture/Edit board" } ,
+ { 0x10E8, 0x4750, "S5930/33/35", "PCI MatchMaker" } ,
+ { 0x10E8, 0x5920, "S5920", "32-Bit PCI Bus Target Interface" } ,
+ { 0x10e8, 0x8001, "S5933", "Daktronics VMax Transmitter Card" } ,
+ { 0x10E8, 0x8033, "BBK-PCI light", "Transputer Link Interface" } ,
+ { 0x10E8, 0x8043, "LANai4.x", "Myrinet LANai interface chip" } ,
+ { 0x10E8, 0x8062, "S5933", "Parastation" } ,
+ { 0x10E8, 0x807D, "S5933", "PCI44" } ,
+ { 0x10E8, 0x8088, "FS", "Kingsberg Spacetec Format Synchronizer" } ,
+ { 0x10E8, 0x8089, "SOB", "Kingsberg Spacetec Serial Output Board" } ,
+ { 0x10E8, 0x809C, "S5933", "Traquair HEPC3" } ,
+ { 0x10E8, 0x80D7, "PCI-9112", "" } ,
+ { 0x10E8, 0x80D8, "PCI-7200", "" } ,
+ { 0x10E8, 0x80D9, "PCI-9118", "" } ,
+ { 0x10E8, 0x811A, "PCI-DSlink", "PCI-IEEE1355-DS-DE interface" } ,
+ { 0x10E8, 0x8170, "S5933", "Matchmaker PCI Chipset Development Tool" } ,
+ { 0x10e8, 0x81B7, "S5933 / NTV", "AJAVideo NTV ITU-R.601 video stillstore" } ,
+ { 0x10EA, 0x1680, "IGA-1680", "svga" } ,
+ { 0x10EA, 0x1682, "IGA-1682", "" } ,
+ { 0x10EA, 0x1683, "IGA-1683", "" } ,
+ { 0x10EA, 0x2000, "CyberPro 2010", "TV output ram 2MB Cyberpro2010" } ,
+ { 0x10EA, 0x2010, "CyberPro 20xx/2000A", "" } ,
+ { 0x10EA, 0x5000, "CyberPro 5000", "" } ,
+ { 0x10EA, 0x5050, "CyberPro 5050", "" } ,
+ { 0x10EB, 0x0101, "3GA", "64 bit graphics processor" } ,
+ { 0x10EB, 0x8111, "Twist3", "Frame Grabber" } ,
+ { 0x10EC, 0x8029, "RTL8029", "NE2000 compatible Ethernet" } ,
+ { 0x10EC, 0x8129, "RTL8129", "10/100 Fast Ethernet Controller" } ,
+ { 0x10EC, 0x8138, "RT8139B/C", "CardBus Fast Ethernet Adapter" } ,
+ { 0x10EC, 0x8139, "RT8139A/B/C", "Fast Ethernet Adapter" } ,
+ { 0x10ED, 0x7310, "V7310", "VGA Video Overlay Adapter" } ,
+ { 0x10EE, 0X1001, "8343176", "PCI to H.100 audio interface" } ,
+ { 0x10EE, 0x3FC0, "RME Digi96", "" } ,
+ { 0x10EE, 0x3FC1, "RME Digi96/8", "" } ,
+ { 0x10EE, 0x3FC2, "RME Digi 96/8 Pro", "" } ,
+ { 0x10EE, 0x3FC3, "RME Digi96/8 Pad", "" } ,
+ { 0x10EE, 0x3FC4, "Digi9652", "Hammerfall" } ,
+ { 0x10EE, 0x5343, "Seamont SC100", "Security Adapter" } ,
+ { 0x10EE, 0x8130, "Durango PMC", "Virtex-II Bridge, XC2V1000-4FG456C" } ,
+ { 0x10EE, 0x8381, "", "" } ,
+ { 0x10EF, 0x8154, "M815x", "Token Ring Adapter" } ,
+ { 0x10F0, 0xA800, "VCL-P", "Graphics board" } ,
+ { 0x10F0, 0xB300, "VCL-M", "graphics board" } ,
+ { 0x10F1, 0x1566, "", "IDE/SCSI" } ,
+ { 0x10F1, 0x1677, "", "Multimedia" } ,
+ { 0x10F4, 0x1300, "rev1.1", "PCI to S5U13x06B0B Bridge Adapter" } ,
+ { 0x10F5, 0xA001, "NDR4000", "NR4600 Bridge" } ,
+ { 0x10FA, 0x0000, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x0001, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x0002, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x0003, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x0004, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x0005, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x0006, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x0007, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x0008, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x0009, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x000A, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x000B, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x000C, "Targa 1000", "Video Capture & Editing card" } ,
+ { 0x10FA, 0x000D, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x000E, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x000F, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x0010, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x0011, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x0012, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x0013, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x0014, "", "GUI Accelerator" } ,
+ { 0x10FA, 0x0015, "", "GUI Accelerator" } ,
+ { 0x10FB, 0x186f, "TH6255", "" } ,
+ { 0x1101, 0x0002, "INI-920", "Ultra SCSI Adapter" } ,
+ { 0x1101, 0x1060, "INI-A100U2W", "Orchid Ultra-2 SCSI Controller" } ,
+ { 0x1101, 0x134A, "", "Ultra SCSI Adapter" } ,
+ { 0x1101, 0x9100, "INI-9010/9010W", "Fast Wide SCSI Controller" } ,
+ { 0x1101, 0x9400, "INIC-940", "Fast Wide SCSI Controller" } ,
+ { 0x1101, 0x9401, "INIC-935", "Fast Wide SCSI Controller" } ,
+ { 0x1101, 0x9500, "INIC-950", "SCSI Controller" } ,
+ { 0x1101, 0x9700, "", "Fast Wide SCSI" } ,
+ { 0x1102, 0x0002, "EMU10000", "Sound Blaster Live!" } ,
+ { 0x1102, 0x0003, "EMU8008", "AWE64D OEM (CT4600)" } ,
+ { 0x1102, 0x0004, "EMU10K2", "Audigy Audio Processor" } ,
+ { 0x1102, 0x0006, "emu10k1x", "Soundblaster Live! 5.1" } ,
+ { 0x1102, 0x1017, "Banshee", "3D Blaster Banshee PCI CT6760" } ,
+ { 0x1102, 0x1047, "", "3D Blaster Annihilator 2" } ,
+ { 0x1102, 0x2898, "", "" } ,
+ { 0x1102, 0x4001, "EMU10K2", "Audigy IEEE1394 Firewire Controller" } ,
+ { 0x1102, 0x7002, "EMU10000", "Game Port" } ,
+ { 0x1102, 0x7003, "EMU10K2", "Audigy Gameport" } ,
+ { 0x1102, 0x8938, "EV1938", "Sound" } ,
+ { 0x1103, 0x0003, "HPT343/345/363", "UDMA EIDE Controller" } ,
+ { 0x1103, 0x0004, "HPT366/368/370/372", "UDMA66/100 EIDE Controller" } ,
+ { 0x1103, 0x0004, "HPT366/368/370/372", "" } ,
+ { 0x1103, 0x0005, "HPT372A", "UDMA/ATA133 RAID Controller" } ,
+ { 0x1103, 0x0006, "HPT302", "UDMA/ATA133 EIDE Controller" } ,
+ { 0x1103, 0x0007, "HPT371", "UDMA/ATA133 EIDE Controller" } ,
+ { 0x1103, 0x0008, "HPT374", "UDMA/ATA133 RAID Controller" } ,
+ { 0x1105, 0x5000, "", "Multimedia" } ,
+ { 0x1105, 0x8300, "EM8300", "MPEG-2 Decoder" } ,
+ { 0x1105, 0x8400, "EM8400", "MPEG-2 Decoder" } ,
+ { 0x1105, 0x8475, "EM8475", "MPEG-4 Decoder" } ,
+ { 0x1106, 0x0130, "VT6305", "VIA Fire 1394.A OHCI Link Layer Ctrlr" } ,
+ { 0x1106, 0x0198, "", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x0305, "VT8363A/8365", "Host Bridge" } ,
+ { 0x1106, 0x0391, "VT8363/71", "Host Bridge" } ,
+ { 0x1106, 0x0501, "VT8501", "Host Bridge" } ,
+ { 0x1106, 0x0505, "82C505", "VLB to PCI Bridge" } ,
+ { 0x1106, 0x0561, "82C570 MV", "IDE Controller" } ,
+ { 0x1106, 0x0571, "VT82C586/596/686", "PCI IDE Controller" } ,
+ { 0x1106, 0x0576, "82C576", "P54 Ctrlr" } ,
+ { 0x1106, 0x0585, "VT82C585VP/VPX", "Host Bus-PCI Bridge" } ,
+ { 0x1106, 0x0586, "VT82C586VP", "PCI-to-ISA Bridge" } ,
+ { 0x1106, 0x0595, "VT82C595", "Apollo VP2 PCI North Bridge" } ,
+ { 0x1106, 0x0596, "VT82C596/596A/596B", "PCI ISA Bridge" } ,
+ { 0x1106, 0x0597, "VT82C597", "Host Bridge (Apollo VP3)" } ,
+ { 0x1106, 0x0598, "VT82C598", "Host Bridge" } ,
+ { 0x1106, 0x0601, "VT8601", "System Controller" } ,
+ { 0x1106, 0x0605, "VT8605", "PM133 System Controller" } ,
+ { 0x1106, 0x0680, "VT82C680", "Apollo P6" } ,
+ { 0x1106, 0x0686, "VT82C686/686A/686B", "PCI-to-ISA bridge" } ,
+ { 0x1106, 0x0691, "VT82C691/693A/694X", "Host Bridge" } ,
+ { 0x1106, 0x0692, "", "North Bridge" } ,
+ { 0x1106, 0x0693, "VT82C693", "Host Bridge" } ,
+ { 0x1106, 0x0926, "VT86C926", "Amazon PCI Ethernet Controller" } ,
+ { 0x1106, 0x1000, "82C570MV", "Host Bridge" } ,
+ { 0x1106, 0x1106, "82C570MV", "ISA Bridge w/IDE" } ,
+ { 0x1106, 0x1571, "VT82C416", "IDE Controller" } ,
+ { 0x1106, 0x1595, "VT82C595/97", "Host Bridge" } ,
+ { 0x1106, 0x3038, "VT83C572", "PCI USB Controller" } ,
+ { 0x1106, 0x3040, "VT83C572", "Power Management Controller" } ,
+ { 0x1106, 0x3043, "VT86C100A", "Rhine 10/100 Ethernet Adapter" } ,
+ { 0x1106, 0x3044, "VT6306", "VIA Fire II 1394a OHCI Link Layer Ctrlr" } ,
+ { 0x1106, 0x3050, "VT82C596/596A/596", "Power Management and SMBus Controller" } ,
+ { 0x1106, 0x3051, "", "Power Management Controller" } ,
+ { 0x1106, 0x3053, "VT6105M", "Rhine III Management Adapter" } ,
+ { 0x1106, 0x3057, "VT82C686A", "ACPI Power Management Controller" } ,
+ { 0x1106, 0x3058, "VT82C686A/B", "AC97 Audio Codec" } ,
+ { 0x1106, 0x3059, "VT8233/33A", "AC97 Enhanced Audio Controller" } ,
+ { 0x1106, 0x3065, "VT6102", "Rhine II PCI Fast Ethernet Controller" } ,
+ { 0x1106, 0x3068, "VT82C686/686A/686B", "AC97 Modem Codec" } ,
+ { 0x1106, 0x3074, "VT8233", "PCI to ISA Bridge" } ,
+ { 0x1106, 0x3086, "VT82C686", "Power management" } ,
+ { 0x1106, 0x3091, "VT8633", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3099, "VT8366/66A/67", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3101, "VT8653", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3102, "VT8362", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3103, "VT8615", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3104, "VT6202", "USB 2.0 Enhanced Host Controller" } ,
+ { 0x1106, 0x3106, "VT6105M/LOM", "Rhine III PCI Fast Ethernet Controller" } ,
+ { 0x1106, 0x3109, "VT8233C", "PCI to ISA Bridge" } ,
+ { 0x1106, 0x3112, "VT8361", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3113, "", "PCI to PCI Bridge" } ,
+ { 0x1106, 0x3116, "VT8375", "CPU-to-PCI Bridge" } ,
+ { 0x1106, 0x3123, "VT8623", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3128, "VT8753", "CPU-to-PCI Bridge" } ,
+ { 0x1106, 0x3133, "VT3133", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3147, "VT8233", "PCI to ISA Bridge" } ,
+ { 0x1106, 0x3148, "VT8751", "CPU-to-PCI Bridge" } ,
+ { 0x1106, 0x3156, "VT8372", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3158, "", "CPU-to-PCI Bridge" } ,
+ { 0x1106, 0x3168, "", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3177, "VT8235", "PCI to ISA Bridge" } ,
+ { 0x1106, 0x3178, "", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3188, "", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3189, "VT8377", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3198, "", "CPU-to-PCI Bridge" } ,
+ { 0x1106, 0x3202, "", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3204, "", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3205, "", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3208, "", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3209, "", "CPU to PCI Bridge" } ,
+ { 0x1106, 0x3213, "", "PCI to PCI Bridge" } ,
+ { 0x1106, 0x5030, "VT82C596", "ACPI Power Management Controller" } ,
+ { 0x1106, 0x6100, "VT86C100A", "Rhine II PCI Fast Ethernet Controller" } ,
+ { 0x1106, 0x8231, "VT8231", "PCI to ISA Bridge" } ,
+ { 0x1106, 0x8235, "VT8235", "Power Management Controller" } ,
+ { 0x1106, 0x8305, "VT8363A/65", "PCI to AGP Bridge" } ,
+ { 0x1106, 0x8391, "VT8363/71", "PCI to AGP Bridge" } ,
+ { 0x1106, 0x8501, "VT8501", "PCI to AGP Bridge" } ,
+ { 0x1106, 0x8596, "VT82C596", "PCI to AGP Bridge" } ,
+ { 0x1106, 0x8597, "VT82C597", "PCI-to-PCI Bridge (AGP)" } ,
+ { 0x1106, 0x8598, "VT82C598MVP/694X", "PCI-to-PCI Bridge (AGP)" } ,
+ { 0x1106, 0x8601, "VT82C601", "PCI-to-PCI Bridge (AGP)" } ,
+ { 0x1106, 0x8602, "", "CPU to AGP Bridge" } ,
+ { 0x1106, 0x8605, "VT8605", "PCI-to-PCI Bridge(AGP)" } ,
+ { 0x1106, 0x8691, "VT82C691/693A/694X", "PCI-to-PCI Bridge (AGP)" } ,
+ { 0x1106, 0x8693, "VT82C693", "PCI-to-PCI Bridge (AGP)" } ,
+ { 0x1106, 0x9398, "VT8601", "2D/3D Graphics Accelerator" } ,
+ { 0x1106, 0xB091, "VT8633", "PCI-to-PCI Bridge (AGP)" } ,
+ { 0x1106, 0xB099, "VT8366/A", "PCI-to-PCI Bridge (AGP)" } ,
+ { 0x1106, 0xB101, "VT8653", "PCI-to-PCI Bridge (AGP)" } ,
+ { 0x1106, 0xB102, "VT8362", "PCI-to-PCI Bridge (AGP)" } ,
+ { 0x1106, 0xB103, "VT8615", "PCI-to-PCI Bridge (AGP)" } ,
+ { 0x1106, 0xB112, "VT8361", "PCI-to-PCI Bridge (AGP)" } ,
+ { 0x1106, 0xB113, "", "I/O APIC" } ,
+ { 0x1106, 0xB115, "VT8363/65", "CPU to AGP Controller" } ,
+ { 0x1106, 0xB116, "VT8375", "PCI-to-PCI Bridge (AGP)" } ,
+ { 0x1106, 0xB133, "vt686b", "CPU to AGP Controller" } ,
+ { 0x1106, 0xB148, "VT8751", "PCI-to-PCI Bridge (AGP)" } ,
+ { 0x1106, 0xB156, "VT8372", "PCI-to-PCI Bridge (AGP)" } ,
+ { 0x1106, 0xB158, "", "PCI-to-PCI Bridge (AGP)" } ,
+ { 0x1106, 0xB168, "", "PCI-to-PCI Bridge (AGP 2.0/3.0)" } ,
+ { 0x1106, 0xB188, "", "PCI-to-PCI Bridge (AGP 2.0/3.0)" } ,
+ { 0x1106, 0xB198, "", "PCI-to-PCI Bridge (AGP 2.0/3.0)" } ,
+ { 0x1106, 0xB213, "", "I/O APIC" } ,
+ { 0x1106, 0xD213, "", "PCI to PCI Bridge" } ,
+ { 0x1107, 0x8576, "", "PCI Host Bridge" } ,
+ { 0x1108, 0x0100, "p1690plus-AA", "Token Ring Adapter" } ,
+ { 0x1108, 0x0101, "p1690plus-AB", "2-Port Token Ring Adapter" } ,
+ { 0x1108, 0x0105, "P1690Plus", "Token Ring Adapter" } ,
+ { 0x1108, 0x0108, "P1690Plus", "Token Ring Adapter" } ,
+ { 0x1108, 0x0138, "P1690Plus", "Token Ring Adapter" } ,
+ { 0x1108, 0x0139, "P1690Plus", "Token Ring Adapter" } ,
+ { 0x1108, 0x013C, "P1690Plus", "Token Ring Adapter" } ,
+ { 0x1108, 0x013D, "P1690Plus", "Token Ring Adapter" } ,
+ { 0x1109, 0x1400, "EM110TX", "EX110TX PCI Fast Ethernet Adapter" } ,
+ { 0x110A, 0x0002, "Piranha", "PCI-EIDE Adapter (2-port)" } ,
+ { 0x110A, 0x0005, "SAB 82C206-N", "Tulip-Ctrlr, Power-Mgmt, Switch Extender" } ,
+ { 0x110A, 0x0006, "PINC", "" } ,
+ { 0x110A, 0x0015, "", "Multiprocessor Interrupt Ctrlr (MINT)" } ,
+ { 0x110A, 0x0017, "20534", "PCI-WAN Adapter (SiemensCard PWAN)" } ,
+ { 0x110A, 0x001D, "Copernicus", "Management Controller" } ,
+ { 0x110A, 0x007b, "", "" } ,
+ { 0x110A, 0x113C, "FPGA-CPTR", "Hardware Tracer for CP113C / CP113D" } ,
+ { 0x110A, 0x113E, "FPGA-CPTRE", "Hardware Tracer for CP113E" } ,
+ { 0x110A, 0x2101, "PEB 20321", "MUNICH32X Multichannel NIC for HDLC" } ,
+ { 0x110A, 0x2102, "PEB/PEF 20534", "DSCC4 Multiprotocol HDLC Controller" } ,
+ { 0x110A, 0x2103, "PEB 20324", "MUNICH128X NIC for HDLC + extensions" } ,
+ { 0x110A, 0x2104, "PSB 4600/4610", "PCI I/F for Telephony/Data Apps (PITA)" } ,
+ { 0x110A, 0x2106, "PEB 20256 E", "MUNICH256 (NIC HDLC/PPP w/256 channels)" } ,
+ { 0x110A, 0x2108, "PEB 20256M E", "MUNICH256FM Multichnl NIC for HDLC/PPP" } ,
+ { 0x110A, 0x3160, "MCCA", "Pentium-PCI Host Bridge Core ASIC" } ,
+ { 0x110A, 0x4942, "FPGA-IBTR", "I-Bus Tracer for MBD" } ,
+ { 0x110A, 0x6120, "SZB6120", "Multimedia Adapter" } ,
+ { 0x110B, 0x0001, "Mpact", "Media Processor" } ,
+ { 0x110B, 0x0002, "GM90C7110VX", "MPACT DVD decoder." } ,
+ { 0x1110, 0x6037, "Firepower", "Powerized SMP I/O ASIC" } ,
+ { 0x1110, 0x6073, "Firepower", "Powerized SMP I/O ASIC" } ,
+ { 0x1112, 0x2200, "2200", "FDDI adapter" } ,
+ { 0x1112, 0x2300, "2300", "Fast Ethernet adapter" } ,
+ { 0x1112, 0X2340, "2340", "4 Port 10/100 UTP Fast Ethernet Adapter" } ,
+ { 0x1112, 0x2400, "2400", "ATM adapter" } ,
+ { 0x1113, 0x1211, "EN-1207D", "Fast Ethernet Adapter" } ,
+ { 0x1113, 0x1216, "EN5251", "Ethernet Controller" } ,
+ { 0x1113, 0x1217, "EN-1217", "Ethernet Adapter" } ,
+ { 0x1113, 0x5105, "EN-1660", "" } ,
+ { 0x1113, 0x9211, "EN-1207D", "Fast Ethernet Adapter" } ,
+ { 0x1116, 0x0022, "DT3001", "" } ,
+ { 0x1116, 0x0023, "DT3002", "" } ,
+ { 0x1116, 0x0024, "DT3003", "" } ,
+ { 0x1116, 0x0025, "DT3004", "" } ,
+ { 0x1116, 0x0026, "Dt3005", "" } ,
+ { 0x1116, 0x0027, "DT3001-PGL", "" } ,
+ { 0x1116, 0x0028, "DT3003-PGL", "" } ,
+ { 0x1117, 0x9500, "", "max-lc SVGA card" } ,
+ { 0x1117, 0x9501, "", "MaxPCI image processing board" } ,
+ { 0x1119, 0x0000, "GDT6000/6020/6050", "PCI SCSI RAID Controller" } ,
+ { 0x1119, 0x0001, "GDT6000/6010", "PCI 1-channel SCSI RAID Controller" } ,
+ { 0x1119, 0x0002, "GDT6110/6510", "PCI 1-channel SCSI RAID Controller" } ,
+ { 0x1119, 0x0003, "GDT6120/6520", "PCI 2-channel SCSI RAID Controller" } ,
+ { 0x1119, 0x0004, "GDT6530", "PCI 3-channel SCSI RAID Controller" } ,
+ { 0x1119, 0x0005, "GDT6550", "PCI 5-channel SCSI RAID Controller" } ,
+ { 0x1119, 0x0006, "GDT6117/6517", "Wide Ultra SCSI Controller" } ,
+ { 0x1119, 0x0007, "GDT6127/6527", "Wide Ultra SCSI Controller" } ,
+ { 0x1119, 0x0008, "GDT6537", "Wide Ultra SCSI Controller" } ,
+ { 0x1119, 0x0009, "GDT6557/6557-ECC", "Wide Ultra SCSI Controller" } ,
+ { 0x1119, 0x000A, "GDT6115/6515", "Ultra SCSI Controller" } ,
+ { 0x1119, 0x000B, "GDT6125/6525", "Wide SCSI Controller" } ,
+ { 0x1119, 0x000C, "GDT6535", "Wide SCSI Controller" } ,
+ { 0x1119, 0x000D, "GDT6555/6555-ECC", "Wide SCSI Controller" } ,
+ { 0x1119, 0x0100, "GDT6117RP/6517RP", "2 Channel Wide Ultra SCSI" } ,
+ { 0x1119, 0x0101, "GDT6127RP/6527RP", "Wide Ultra SCSI HBA" } ,
+ { 0x1119, 0x0102, "GDT6537RP", "Wide Ultra SCSI HBA" } ,
+ { 0x1119, 0x0103, "GDT6557RP", "Wide Ultra SCSI HBA" } ,
+ { 0x1119, 0x0104, "GDT6111RP/6511RP", "Ultra SCSI HBA" } ,
+ { 0x1119, 0x0105, "GDT6121RP/6521RP", "Ultra SCSI HBA" } ,
+ { 0x1119, 0x0110, "GDT6117RD/6517RD", "Wide Ultra SCSI HBA" } ,
+ { 0x1119, 0x0111, "GDT6127RD/6527RD", "Wide Ultra SCSI HBA" } ,
+ { 0x1119, 0x0112, "GDT6537RD", "Wide Ultra SCSI HBA" } ,
+ { 0x1119, 0x0113, "GDT6557RD", "Wide Ultra SCSI HBA" } ,
+ { 0x1119, 0x0114, "GDT6111RD/6511RD", "Ultra SCSI HBA" } ,
+ { 0x1119, 0x0115, "GDT6127RD/6527RD", "Ultra SCSI HBA" } ,
+ { 0x1119, 0x0118, "GDT6x18RD", "Wide Ultra2 SCSI HBA" } ,
+ { 0x1119, 0x0119, "GDT6x28RD", "Wide Ultra2 SCSI HBA" } ,
+ { 0x1119, 0x011A, "GDT6538RD/6638RD", "Wide Ultra2 SCSI HBA" } ,
+ { 0x1119, 0x011B, "GDT6558RD/6658RD", "Wide Ultra2 SCSI HBA" } ,
+ { 0x1119, 0x0120, "GDT6117RP2/6517RP2", "" } ,
+ { 0x1119, 0x0121, "GDT6127RP2/6527RP2", "" } ,
+ { 0x1119, 0x0122, "GDT6537RP2", "" } ,
+ { 0x1119, 0x0123, "GDT6557RP2", "" } ,
+ { 0x1119, 0x0124, "GDT6111RP2/6511RP2", "" } ,
+ { 0x1119, 0x0125, "GDT6127RP2/6527RP2", "" } ,
+ { 0x1119, 0x0136, "GDT 6x13RS", "" } ,
+ { 0x1119, 0x0137, "GDT 6x23RS", "Disk Array Controller" } ,
+ { 0x1119, 0x0138, "GDT 6x18RS", "" } ,
+ { 0x1119, 0x0139, "GDT 6x28RS", "" } ,
+ { 0x1119, 0x013A, "GDT 6x38RS", "" } ,
+ { 0x1119, 0x013B, "GDT 6x58RS", "" } ,
+ { 0x1119, 0x013C, "GDT 6x33RS", "" } ,
+ { 0x1119, 0x013D, "GDT 6x43RS", "" } ,
+ { 0x1119, 0x013E, "GDT 6x53RS", "" } ,
+ { 0x1119, 0x013F, "GDT 6x63RS", "" } ,
+ { 0x1119, 0x0166, "GDT 7x13RN", "" } ,
+ { 0x1119, 0x0167, "GDT 7x23RN", "" } ,
+ { 0x1119, 0x0168, "GDT7x18RN", "64-bit PCI Wide Untra2 SCSI HBA" } ,
+ { 0x1119, 0x0169, "GDT7x28RN", "64-bit PCI Wide Ultra2 SCSI HBA" } ,
+ { 0x1119, 0x016A, "GDT7538RN/7638RN", "64-bit PCI Wide Ultra2 SCSI HBA" } ,
+ { 0x1119, 0x016B, "GDT7558RN/7658RN", "64-bit PCI Wide Ultra2 SCSI HBA" } ,
+ { 0x1119, 0x016C, "GDT 7x33RN", "" } ,
+ { 0x1119, 0x016D, "GDT 7x43RN", "" } ,
+ { 0x1119, 0x016E, "GDT 7x53RN", "" } ,
+ { 0x1119, 0x016F, "GDT 7x63RN", "" } ,
+ { 0x1119, 0x01D6, "GDT 4x13RZ", "" } ,
+ { 0x1119, 0x01D7, "GDT 4x23RZ", "" } ,
+ { 0x1119, 0x01F6, "GDT 8x13RZ", "" } ,
+ { 0x1119, 0x01F7, "GDT 8x23RZ", "" } ,
+ { 0x1119, 0x01FC, "GDT 8x33RZ", "" } ,
+ { 0x1119, 0x01FD, "GDT 8x43RZ", "" } ,
+ { 0x1119, 0x01FE, "GDT 8x53RZ", "" } ,
+ { 0x1119, 0x01FF, "GDT 8x63RZ", "" } ,
+ { 0x1119, 0x0210, "GDT6519RD/6619RD", "Fibre Channel HBA" } ,
+ { 0x1119, 0x0211, "GDT6529RD/6629RD", "Fibre Channel HBA" } ,
+ { 0x1119, 0x0260, "GDT7519RN/7619RN", "64-bit PCI Fibre Channel HBA" } ,
+ { 0x1119, 0x0261, "GDT7529RN/7629RN", "64-bit PCI Fibre Channel HBA" } ,
+ { 0x1119, 0x0300, "GDT Rx", "" } ,
+ { 0x111A, 0x0000, "155P-MF1", "" } ,
+ { 0x111A, 0x0002, "166P-MF1", "" } ,
+ { 0x111A, 0x0003, "ENI-25P", "ATM Adapter" } ,
+ { 0x111a, 0x0005, "ENI-30x0", "SpeedStream ADSL Adapter" } ,
+ { 0x111C, 0x0001, "", "Powerbus Bridge" } ,
+ { 0x111D, 0x0001, "IDT77201/211", "NICStAR ATM Adapter" } ,
+ { 0x111D, 0x0003, "IDT77222/252", "MICRO ABR SAR PCI ATM Controller" } ,
+ { 0x111D, 0x0004, "IDT77V252", "MICRO ABR SAR PCI ATM Controller" } ,
+ { 0x111F, 0x4A47, "Precision MX", "Video engine interface" } ,
+ { 0x111F, 0x5243, "", "Frame Capture Bus Interface" } ,
+ { 0x1127, 0x0200, "FireRunner PCA-200", "ATM" } ,
+ { 0x1127, 0x0210, "PCA-200PC", "ATM" } ,
+ { 0x1127, 0x0250, "", "ATM" } ,
+ { 0x1127, 0x0300, "PCA-200E", "ATM adapter" } ,
+ { 0x1127, 0x0310, "", "ATM" } ,
+ { 0x1127, 0x0400, "ForeRunner HE", "ATM Adapter" } ,
+ { 0x112E, 0x0000, "", "EIDE/hdd and IDE/cd-rom Ctrlr" } ,
+ { 0x112E, 0x000B, "", "EIDE/hdd and IDE/cd-rom Ctrlr" } ,
+ { 0x112F, 0x0000, "ICPCI", "" } ,
+ { 0x112F, 0x0001, "", "video frame grabber/processor" } ,
+ { 0x112F, 0x0007, "?", "PCVisionPlus Image Capture Device" } ,
+ { 0x1131, 0x1201, "PTD3000", "VPN IPSEC coprocessor" } ,
+ { 0x1131, 0x1234, "", "EHCI USB 2.0 Controller" } ,
+ { 0x1131, 0x1301, "PTD3210", "SSL Accelerator" } ,
+ { 0x1131, 0x1562, "ISP1561", "EHCI USB 2.0 Controller" } ,
+ { 0x1131, 0x2780, "TDA2780AQ", "TV deflection controller" } ,
+ { 0x1131, 0x3400, "UCB1500", "Modem" } ,
+ { 0x1131, 0x3401, "UCB1500", "Multimedia Audio Device" } ,
+ { 0x1131, 0x5400, "TriMedia TM1000/1100", "Multimedia processor" } ,
+ { 0x1131, 0x5402, "TriMedia TM-1300", "Media Processor" } ,
+ { 0x1131, 0x7130, "SAA7130HL", "Multi Media Capture Device" } ,
+ { 0x1131, 0x7133, "SAA7135HL", "Multi Media Capture Device" } ,
+ { 0x1131, 0x7134, "SAA7134HL", "Multi Media Capture Device" } ,
+ { 0x1131, 0x7145, "SAA7145", "Multimedia PCI Bridge" } ,
+ { 0x1131, 0x7146, "SAA7146", "Multi Media Bridge Scaler" } ,
+ { 0x1131, 0x9730, "SAA9730", "Ethernet controller" } ,
+ { 0x1133, 0x7711, "EiconCard C91", "" } ,
+ { 0x1133, 0x7901, "EiconCard S90", "" } ,
+ { 0x1133, 0x7902, "", "" } ,
+ { 0x1133, 0x7911, "", "" } ,
+ { 0x1133, 0x7912, "", "" } ,
+ { 0x1133, 0x7941, "", "" } ,
+ { 0x1133, 0x7942, "", "" } ,
+ { 0x1133, 0x7943, "", "EiconCard S94" } ,
+ { 0x1133, 0x7944, "", "EiconCard S94" } ,
+ { 0x1133, 0xB921, "", "" } ,
+ { 0x1133, 0xB922, "", "" } ,
+ { 0x1133, 0xB923, "", "EiconCard P92" } ,
+ { 0x1133, 0xE001, "DIVA Pro 2.0 S/T", "" } ,
+ { 0x1133, 0xE002, "DIVA 2.0 S/T", "" } ,
+ { 0x1133, 0xE003, "DIVA Pro 2.0 U", "" } ,
+ { 0x1133, 0xE004, "DIVA 2.0 U", "" } ,
+ { 0x1133, 0xE005, "DIVA 2.01 S/T", "Eicon ISDN card using Siemens IPAC chip" } ,
+ { 0x1133, 0xE00B, "DIVA ISDN 2.02 PCI", "Eicon ISDN card using Infineon chip" } ,
+ { 0x1133, 0xE010, "Maestra", "DIVA Server BRI-2M" } ,
+ { 0x1133, 0xE012, "MaestraQ", "DIVA Server BRI-8M" } ,
+ { 0x1133, 0xE013, "MaestraQ-U", "DIVA Server 4BRI/PCI" } ,
+ { 0x1133, 0xE014, "MaestraP", "DIVA Server PRI-30M" } ,
+ { 0x1133, 0xE015, "", "Diva Server PRI-30M PCI v.2" } ,
+ { 0x1133, 0xE018, "", "DIVA Server BRI-2M/-2F" } ,
+ { 0x1134, 0x0001, "", "Raceway Bridge" } ,
+ { 0x1135, 0x0001, "", "Printer Cntrlr" } ,
+ { 0x1138, 0x8905, "8905", "STD 32 Bridge" } ,
+ { 0x113C, 0x0000, "PCI9060", "i960 Bridge" } ,
+ { 0x113C, 0x0001, "PCI9060", "i960 Bridge / Evaluation Platform" } ,
+ { 0x113C, 0x0911, "PCI911", "i960Jx I/O Controller" } ,
+ { 0x113C, 0x0912, "PCI912", "i960Cx I/O Controller" } ,
+ { 0x113C, 0x0913, "PCI913", "i960Hx I/O Controller" } ,
+ { 0x113C, 0x0914, "PCI914", "I/O Controller with secondary PCI bus" } ,
+ { 0x113F, 0x0808, "SST-64P", "Adapter" } ,
+ { 0x113F, 0x1010, "SST-128P", "Adapter" } ,
+ { 0x113F, 0x80C0, "", "" } ,
+ { 0x113F, 0x80C4, "", "" } ,
+ { 0x113F, 0x80C8, "", "" } ,
+ { 0x113F, 0x8888, "", "" } ,
+ { 0x113F, 0x9090, "", "" } ,
+ { 0x1141, 0x0001, "", "EIDE/ATAPI super adapter" } ,
+ { 0x1142, 0x3210, "ProMotion 3210", "VGA/AVI Playback Accelerator" } ,
+ { 0x1142, 0x6410, "6410 6422", "GUI Accelerator" } ,
+ { 0x1142, 0x6412, "", "GUI Accelerator" } ,
+ { 0x1142, 0x6420, "", "GUI Accelerator" } ,
+ { 0x1142, 0x6422, "Provideo 6422", "ProMotion-6422" } ,
+ { 0x1142, 0x6424, "ProVideo 6424", "ProMotion AT24 GUI Accelerator" } ,
+ { 0x1142, 0x6425, "ProMotion AT25", "bbu67b 9811" } ,
+ { 0x1142, 0x6426, "", "GUI Accelerator" } ,
+ { 0x1142, 0x643D, "AT25", "ProMotion-AT3D" } ,
+ { 0x1144, 0x0001, "", "Noservo Cntrlr" } ,
+ { 0x1145, 0xF020, "", "CardBus ATAPI Host Adapter" } ,
+ { 0x1148, 0x4000, "SK-NET", "FDDI adapter" } ,
+ { 0x1148, 0x4200, "", "Token Ring Adapter" } ,
+ { 0x1148, 0x4300, "SK-984x", "SK-NET Gigabit Ethernet Adapter" } ,
+ { 0x114A, 0x5579, "VMIPCI-5579", "Reflective Memory Card" } ,
+ { 0x114A, 0x5588, "VMICPCI5588", "VMICPCI5588 Reflective Memory Card" } ,
+ { 0x114A, 0x6504, "", "Timer/SRAM FPGA" } ,
+ { 0x114A, 0x7587, "VMIVME-7587", "" } ,
+ { 0x114F, 0x0002, "AccelePort EPC", "" } ,
+ { 0x114F, 0x0003, "RightSwitch SE-6", "" } ,
+ { 0x114F, 0x0004, "AccelePort Xem", "" } ,
+ { 0x114F, 0x0005, "AccelePort Xr", "" } ,
+ { 0x114F, 0x0006, "AccelePort C/X", "" } ,
+ { 0x114F, 0x0007, "DataFire PCI 1 S/T", "" } ,
+ { 0x114F, 0x0009, "AccelePort Xr/J", "" } ,
+ { 0x114F, 0x000A, "AccelePort EPC/J", "" } ,
+ { 0x114F, 0x000C, "DataFirePRIme T1", "" } ,
+ { 0x114F, 0x000D, "SyncPort", "X.25/FR 2-port" } ,
+ { 0x114F, 0x0011, "AccelePort8r EIA-232", "" } ,
+ { 0x114F, 0x0012, "AccelePort8r EIA-422", "" } ,
+ { 0x114F, 0x0013, "AccelePort Xr", "" } ,
+ { 0x114F, 0x0014, "AccelePort8r EIA-422", "" } ,
+ { 0x114F, 0x0015, "AccelePort Xem", "" } ,
+ { 0x114F, 0x0016, "AccelePort EPC/X", "" } ,
+ { 0x114F, 0x0017, "AccelePort C/X", "" } ,
+ { 0x114F, 0x0019, "DataFire PCI 1 U", "" } ,
+ { 0x114F, 0x001A, "DataFirePRIme E1", "" } ,
+ { 0x114F, 0x001B, "AccelePort C/X (IBM)", "" } ,
+ { 0x114F, 0x001D, "DataFire RAS", "T1/E1/PRI" } ,
+ { 0x114F, 0x001F, "", "ClydeNonCsu6034" } ,
+ { 0x114F, 0x0020, "", "ClydeNonCsu6032" } ,
+ { 0x114F, 0x0021, "", "ClydeNonCsu4" } ,
+ { 0x114F, 0x0022, "", "ClydeNonCsu2" } ,
+ { 0x114F, 0x0023, "AccelePort RAS", "" } ,
+ { 0x114F, 0x0024, "DataFire RAS B4 ST/U", "" } ,
+ { 0x114F, 0x0026, "AccelePort 4r 920", "" } ,
+ { 0x114F, 0x0027, "AccelePort 8r 920", "" } ,
+ { 0x114F, 0x0029, "DigiClassic PCI", "" } ,
+ { 0x114F, 0x0034, "AccelePort 2r 920", "" } ,
+ { 0x114F, 0x0035, "DataFire DSP", "T1/E1/PRI, Compact PCI" } ,
+ { 0x114F, 0x0040, "AccelePort Xp", "" } ,
+ { 0x114F, 0x0042, "AccelePort 2p PCI", "" } ,
+ { 0x114F, 0x0070, "DataFire Micro V", "" } ,
+ { 0x114F, 0x0071, "DataFire Micro V", "" } ,
+ { 0x114F, 0x0072, "DataFire Micro V", "" } ,
+ { 0x114F, 0x0073, "DataFire Micro V", "" } ,
+ { 0x114F, 0x6001, "Avanstar", "" } ,
+ { 0x1155, 0x0810, "", "486 CPU/PCI Bridge" } ,
+ { 0x1155, 0x0922, "", "Pentium CPU/PCI Bridge" } ,
+ { 0x1155, 0x0926, "", "PCI/ISA Bridge" } ,
+ { 0x1158, 0x3011, "", "Tokenet/vg 1001/10m anylan" } ,
+ { 0x1158, 0x9050, "", "Lanfleet/Truevalue" } ,
+ { 0x1158, 0x9051, "", "Lanfleet/Truevalue" } ,
+ { 0x1159, 0x0001, "MV1000", "" } ,
+ { 0x1159, 0x0002, "MV-1500", "Frame Grabber" } ,
+ { 0x115D, 0x0003, "", "CardBus Ethernet 10/100" } ,
+ { 0x115D, 0x0005, "", "CardBus Ethernet 10/100" } ,
+ { 0x115D, 0x0007, "", "CardBus Ethernet 10/100" } ,
+ { 0x115D, 0x000B, "", "CardBus Ethernet 10/100" } ,
+ { 0x115D, 0x000C, "MPCI 3A56GSP-100 PA", "Mini-PCI V.90 56k Modem" } ,
+ { 0x115D, 0x000F, "", "CardBus Ethernet 10/100" } ,
+ { 0x115D, 0x002b, "", "Winmodem built into NEC Versa VXi" } ,
+ { 0x115D, 0x0076, "", "Xircom MPCI3B-56G (Lucent SCORPIO) Soft" } ,
+ { 0x115D, 0x00d3, "", "Xircom MPCI Modem 56" } ,
+ { 0x115D, 0x00D4, "MPCI", "Modem 56k" } ,
+ { 0x115D, 0x0101, "", "CardBus 56k Modem" } ,
+ { 0x115D, 0x0103, "", "CardBus Ehternet + 56k Modem" } ,
+ { 0x115d, 0x1181, "", "" } ,
+ { 0x1161, 0x0001, "", "Host Bridge" } ,
+ { 0x1163, 0x0001, "Verite 1000", "3D Blaster" } ,
+ { 0x1163, 0x2000, "Verite 2x00", "" } ,
+ { 0x1165, 0x0001, "", "Motion JPEG rec/play w/audio" } ,
+ { 0x1166, 0x0005, "NB6536 (CNB20-LE)", "PCI to PCI Bridge, bus/dev/func 0/0/1" } ,
+ { 0x1166, 0x0006, "NB6536 (CNB20-HE)", "Host Bridge, function 2 and function 3" } ,
+ { 0x1166, 0x0007, "NB6635 (CNB20-LE/HE)", "CPU to PCI Bridge" } ,
+ { 0x1166, 0x0008, "NB6536 (CNB20-HE)", "Hostbridge & MCH, bus/dev/func 0/0/0" } ,
+ { 0x1166, 0x0009, "NB6536 (CNB20-LE)", "AGP interface" } ,
+ { 0x1166, 0x0010, "CIOB30", "" } ,
+ { 0x1166, 0x0011, "CMIC-HE", "" } ,
+ { 0x1166, 0x0012, "CMIC-LE", "" } ,
+ { 0x1166, 0x0013, "CNB20-HE", "Hostbridge and MCH" } ,
+ { 0x1166, 0x0014, "CNB20-HE", "Host Bridge" } ,
+ { 0x1166, 0x0015, "CMIC-GC", "Hostbridge and MCH" } ,
+ { 0x1166, 0x0016, "CMIC-GC", "Host Bridge" } ,
+ { 0x1166, 0x0017, "CMIC-SL", "" } ,
+ { 0x1166, 0x0101, "CIOB-X2", "" } ,
+ { 0x1166, 0x0200, "OSB4", "PCI to ISA Bridge" } ,
+ { 0x1166, 0x0201, "CSB5", "ISA bridge" } ,
+ { 0x1166, 0x0211, "OSB4", "EIDE Controller" } ,
+ { 0x1166, 0x0212, "CSB5", "IDE interface" } ,
+ { 0x1166, 0x0220, "OSB4", "OpenHCI Compliant USB Controller" } ,
+ { 0x1166, 0x0225, "CSB5", "PCI Bridge" } ,
+ { 0x1166, 0x0230, "", "ISA bridge" } ,
+ { 0x1169, 0x2001, "Ql5032-33APQ208C", "PCI to C-DAC RTU bus interface FPGA" } ,
+ { 0x116A, 0x6100, "", "Bus/Tag Channel" } ,
+ { 0x116A, 0x6800, "", "Escon Channel" } ,
+ { 0x116A, 0x7100, "", "Bus/Tag Channel" } ,
+ { 0x116A, 0x7800, "", "Escon Channel" } ,
+ { 0x1172, 0x0001, "", "" } ,
+ { 0x1178, 0xAFA1, "", "Fast Ethernet" } ,
+ { 0x1179, 0x0102, "", "Extended PCI IDE Controller" } ,
+ { 0x1179, 0x0103, "", "Extended PCI IDE Controller Type-B" } ,
+ { 0x1179, 0x0404, "", "" } ,
+ { 0x1179, 0x0406, "Tecra", "Video Capture device" } ,
+ { 0x1179, 0x0407, "", "" } ,
+ { 0x1179, 0x0601, "", "Toshiba CPU to PCI bridge" } ,
+ { 0x1179, 0x0602, "", "PCI to ISA Bridge for Notebooks" } ,
+ { 0x1179, 0x0603, "ToPIC95", "PCI to CardBus Bridge for Notebooks" } ,
+ { 0x1179, 0x0604, "", "PCI to PCI Bridge for Notebooks" } ,
+ { 0x1179, 0x0605, "", "PCI to ISA Bridge for Notebooks" } ,
+ { 0x1179, 0x0606, "", "PCI to ISA Bridge for Notebooks" } ,
+ { 0x1179, 0x0609, "", "PCI to PCI Bridge for Notebooks" } ,
+ { 0x1179, 0x060A, "ToPIC95B", "Toshiba ToPIC95 CardBus Controller" } ,
+ { 0x1179, 0x060F, "ToPIC97", "CardBus Controller" } ,
+ { 0x1179, 0x0611, "", "PCI to ISA Bridge" } ,
+ { 0x1179, 0x0617, "ToPIC100", "PCI to CardBus Bridge with ZV support" } ,
+ { 0x1179, 0x0618, "", "CPU to PCI and PCI to ISA Bridge" } ,
+ { 0x1179, 0x0701, "", "PCI Communication Device" } ,
+ { 0x1179, 0x0805, "", "SD Card Controller" } ,
+ { 0x1179, 0x0D01, "", "FIR Port Type-DO" } ,
+ { 0x1179, 0x13A8, "XR17C158/154/152", "Multi-channel PCI UART" } ,
+ { 0x117E, 0x0001, "", "Printer Host" } ,
+ { 0x1180, 0x0465, "RL5C465", "CardBus controller" } ,
+ { 0x1180, 0x0466, "RL5C466", "CardBus controller" } ,
+ { 0x1180, 0x0475, "RL5C475", "CardBus controller" } ,
+ { 0x1180, 0x0476, "RL5C476 II", "CardBus controller" } ,
+ { 0x1180, 0x0477, "RLc477", "CardBus Controller" } ,
+ { 0x1180, 0x0478, "RLc478", "CardBus Controller" } ,
+ { 0x1180, 0x0521, "R5C521", "1394 Host Controller" } ,
+ { 0x1180, 0X0551, "", "IEEE1394 Controller" } ,
+ { 0x1180, 0x0552, "RL5c552", "FireWire (IEEE1394) Controller. IBM A31p" } ,
+ { 0x1180, 0x0576, "", "SD-Card Interface" } ,
+ { 0x1185, 0x8929, "", "EIDE Controller" } ,
+ { 0x1186, 0x0100, "DC21041", "Ethernet Adapter" } ,
+ { 0x1186, 0x1002, "DFE-550TX", "Fast Ethernet Adapter" } ,
+ { 0x1186, 0x1100, "", "Fast Ethernet Adapter" } ,
+ { 0x1186, 0x1300, "DFE-530TX+", "Fast Ethernet Adapter" } ,
+ { 0x1186, 0x1340, "DFE-690TXD", "CardBus PC Card" } ,
+ { 0x1186, 0x1561, "DRP-32TXD", "CardBus PC Card" } ,
+ { 0x1186, 0x4000, "DL2000", "Gigabit Ethernet Adapter" } ,
+ { 0x1186, 0x4001, "DFE-650TX", "D Link Fast Ethernet PCMCIA Card" } ,
+ { 0x1189, 0x1592, "", "VL/PCI Bridge" } ,
+ { 0x118C, 0x0014, "PCIB", "C-bus II to PCI bus host bridge chip" } ,
+ { 0x118C, 0x1117, "MAC-94C201B3", "Corollary/Intel Memory Controller Chip" } ,
+ { 0x118D, 0x0001, "n/a", "Raptor-PCI framegrabber" } ,
+ { 0x118D, 0x0012, "Model 12", "Road Runner Frame Grabber" } ,
+ { 0x118D, 0x0014, "Model 14", "Road Runner Frame Grabber" } ,
+ { 0x118D, 0x0024, "Model 24", "Road Runner Frame Grabber" } ,
+ { 0x118D, 0x0044, "Model 44", "Road Runner Frame Grabber" } ,
+ { 0x118D, 0x0112, "Model 12", "Road Runner Frame Grabber" } ,
+ { 0x118D, 0x0114, "Model 14", "Road Runner Frame Grabber" } ,
+ { 0x118D, 0x0124, "Model 24", "Road Runner Frame Grabber" } ,
+ { 0x118D, 0x0144, "Model 44", "Road Runner Frame Grabber" } ,
+ { 0x118D, 0x0212, "Model 12", "Road Runner Frame Grabber" } ,
+ { 0x118D, 0x0214, "Model 14", "Road Runner Frame Grabber" } ,
+ { 0x118D, 0x0224, "Model 24", "Road Runner Frame Grabber" } ,
+ { 0x118D, 0x0244, "Model 44", "Road Runner Frame Grabber" } ,
+ { 0x118D, 0x0312, "Model 12", "Road Runner Frame Grabber" } ,
+ { 0x118D, 0x0314, "Model 14", "Road Runner Frame Grabber" } ,
+ { 0x118D, 0x0324, "Model 24", "Road Runner Frame Grabber" } ,
+ { 0x118D, 0x0344, "Model 44", "Road Runner Frame Grabber" } ,
+ { 0x1190, 0x2550, "TC-2550", "Single Chip Ultra (Wide) SCSI Processor" } ,
+ { 0x1190, 0xC721, "", "EIDE" } ,
+ { 0x1190, 0xC731, "TP-910/920/940", "PCI Ultra (Wide) SCSI Adapter" } ,
+ { 0x1191, 0x0001, "", "IDE Ctrlr" } ,
+ { 0x1191, 0x0002, "ATP850UF", "UltraDMA33 EIDE Controller (AEC6210UF)" } ,
+ { 0x1191, 0x0003, "", "SCSI-2 cache Cntrlr" } ,
+ { 0x1191, 0x0004, "ATP8400", "UltraDMA33 EIDE Controller" } ,
+ { 0x1191, 0x0005, "ATP850UF", "UltraDMA33 EIDE Controller (AEC6210UF)" } ,
+ { 0x1191, 0x0006, "ATP860A", "UltraDMA66 EDIE Controller (AEC6260)" } ,
+ { 0x1191, 0x0007, "ATP860R", "UltraDMA66 EIDE Controller (AEC6260)" } ,
+ { 0x1191, 0x0008, "ATP865", "" } ,
+ { 0x1191, 0x0009, "ATP865", "" } ,
+ { 0x1191, 0x8001, "ATP8600", "SCSI-2 RAID (cache?) Adapter (AEC6820U)" } ,
+ { 0x1191, 0x8002, "ATP850S", "SCSI-2 Host Adapter (AEC6710L/F)" } ,
+ { 0x1191, 0x8010, "ATP870", "Ultra Wide SCSI Controller" } ,
+ { 0x1191, 0x8020, "ATP870", "Ultra SCSI Controller" } ,
+ { 0x1191, 0x8030, "ATP870", "Ultra SCSI Controller" } ,
+ { 0x1191, 0x8040, "ATP870", "SCSI Controller" } ,
+ { 0x1191, 0x8050, "", "Ultra Wide SCSI Controller" } ,
+ { 0x1191, 0x8060, "AEC671x", "SCSI Host Adapter" } ,
+ { 0x1191, 0x8081, "AEC-67160", "PCI Ultra160 LVD/SE SCSI Adapter" } ,
+ { 0x1193, 0x0001, "ZN1221", "ATM adapter" } ,
+ { 0x1193, 0x0002, "ZN1225", "ATM adapter" } ,
+ { 0x1199, 0x0001, "", "IRMA 3270 PCI Adapter" } ,
+ { 0x1199, 0x0002, "", "Advanced ISCA PCI Adapter" } ,
+ { 0x1199, 0x0201, "", "SDLC PCI Adapter" } ,
+ { 0x119B, 0x1221, "82C092G", "PCI PCMCIA bridge" } ,
+ { 0x119E, 0x0001, "MB86697", "FireStream 155 ATM adapter" } ,
+ { 0x119E, 0x0003, "MB86695", "FireStream 50 ATM adapter" } ,
+ { 0x11A8, 0x7302, "", "NTX-8023-PCI 2MB Long Card" } ,
+ { 0x11A8, 0x7308, "", "NTX-8023-PCI 8MB Long Card" } ,
+ { 0x11A8, 0x7402, "", "NTX-8023-PCI 2MB Short Card" } ,
+ { 0x11A8, 0x7408, "", "NTX-8023-PCI 8MB Short Card" } ,
+ { 0x11A9, 0x4240, "AMCC S5933Q", "Intelligent Serial Card" } ,
+ { 0x11AB, 0x0146, "GT-64010/A", "System Ctrlr for R4xxx/5000 Family CPUs" } ,
+ { 0x11ab, 0x4620, "GT64120", "System Ctrlr for R5K & R7K w/64bit PCI" } ,
+ { 0x11AB, 0x4801, "GT-48001", "8 port switched ethernet ctrlr" } ,
+ { 0x11AB, 0x4809, "EV-48300", "Evaluation board for the GT-48300" } ,
+ { 0x11AB, 0x6320, "GT-64130/131", "System Controller for PowerPC Processors" } ,
+ { 0x11ab, 0x6430, "GT-64260A", "System Controller for PowerPC Processors" } ,
+ { 0x11AB, 0x9653, "GT-96100A", "Advanced Communication Controller" } ,
+ { 0x11AB, 0xF003, "GT-64010", "Primary Image Piranha Image Generator" } ,
+ { 0x11AB, 0xF004, "GT64120", "Primary Image Barracuda Image Generator" } ,
+ { 0x11ab, 0xF006, "GT64120A", "Primary Image Cruncher Geometry Acclrtr" } ,
+ { 0x11AD, 0x0002, "NGMC169B", "10/100 Ethernet (NetGear FA310TX)" } ,
+ { 0x11AD, 0xC115, "LC82C115", "PNIC II 10/100 PCI MAC/PHY" } ,
+ { 0x11AE, 0x4153, "", "Bridge Controller" } ,
+ { 0x11AE, 0x5842, "", "Bridge Controller" } ,
+ { 0x11B0, 0x0001, "V960PBC/PSC", "i960 Local Bus to PCI Bridge" } ,
+ { 0x11B0, 0x0002, "V961PBC/PSC", "i960Jx Local Bus to PCI Bridge" } ,
+ { 0x11B0, 0x0004, "V962PBC/PSC", "i960Cx/Hx Local Bus to PCI Bridge" } ,
+ { 0x11B0, 0x0010, "V292PBC/PSC", "Am29K Local Bus to PCI Bridge" } ,
+ { 0x11B0, 0x0021, "V363EPC", "i960Sx Local Bus to PCI Bridge" } ,
+ { 0x11B0, 0x0022, "V363EPC", "i960Jx Local Bus to PCI Bridge" } ,
+ { 0x11B0, 0x0024, "V363EPC", "i960Cx/Hx Local Bus to PCI Bridge" } ,
+ { 0x11B0, 0x0030, "V363EPC", "Am29K Local Bus to PCI Bridge" } ,
+ { 0x11B0, 0x0100, "V320USC", "PCI System Ctrlr for 32-bit MIPS CPU" } ,
+ { 0x11B0, 0x0101, "V320USC", "PCI System Ctrlr for 32-bit MIPS CPU" } ,
+ { 0x11B0, 0x0102, "V320USC", "PCI System Ctrlr for Super-H SH3 CPU" } ,
+ { 0x11B0, 0x0103, "V320USC", "PCI System Ctrlr for Super-H SH4 CPU" } ,
+ { 0x11B0, 0x0200, "V370PDC", "High Performance PCI SDRAM Controller" } ,
+ { 0x11B0, 0x0292, "V292PBC", "Am29030/40 Bridge" } ,
+ { 0x11B0, 0x0500, "V340HPC", "PCI System Ctrlr for 64-bit MIPS CPU" } ,
+ { 0x11B0, 0x0960, "V96xPBC", "i960 Bridges for i960 Processors" } ,
+ { 0x11B0, 0xC960, "V96DPC", "i960 Dual PCI Bridge" } ,
+ { 0x11b3, 0x0001, "", "CHANNEL-IN (BT) Rev 1" } ,
+ { 0x11b3, 0x0002, "", "CHANNEL-OUT (BT) Rev 1" } ,
+ { 0x11b3, 0x0010, "", "CHANNEL-IN (ES)" } ,
+ { 0x11b3, 0x0100, "", "SYNC MAX PCI" } ,
+ { 0x11b3, 0x1001, "", "CHANNEL-IN (BT) Rev 2" } ,
+ { 0x11b3, 0x1002, "", "CHANNEL-OUT (BT) Rev 2" } ,
+ { 0x11B8, 0x0001, "Quad PeerMaster", "" } ,
+ { 0x11B9, 0xC0ED, "SSA Ctrlr", "" } ,
+ { 0x11BC, 0x0001, "NPI NuCard", "PCI FDDI" } ,
+ { 0x11C1, 0x0440, "LT Winmodem 56k", "Data+Fax+Voice+DSVD" } ,
+ { 0x11C1, 0x0441, "LT Winmodem 56k", "Data+Fax" } ,
+ { 0x11C1, 0x0442, "1646T00", "V.90 Lucent Modem" } ,
+ { 0x11C1, 0x0443, "LT Winmodem", "" } ,
+ { 0x11C1, 0x0444, "LT Winmodem", "" } ,
+ { 0x11C1, 0x0445, "LT Winmodem", "" } ,
+ { 0x11C1, 0x0446, "LT Winmodem", "" } ,
+ { 0x11C1, 0x0447, "LT Winmodem", "" } ,
+ { 0x11C1, 0x0448, "LT Winmodem 56k", "" } ,
+ { 0x11C1, 0x0449, "LT Winmodem 56k", "" } ,
+ { 0x11C1, 0x044A, "LT Winmodem 56k", "" } ,
+ { 0x11C1, 0x044B, "LT Winmodem", "" } ,
+ { 0x11C1, 0x044C, "LT Winmodem", "" } ,
+ { 0x11C1, 0x044D, "LT Winmodem", "" } ,
+ { 0x11C1, 0x044E, "lucent 1646T00", "LT WinModem 56k Data+Fax" } ,
+ { 0x11C1, 0x044F, "90094-1", "LT V.90+DSL WildFire Modem" } ,
+ { 0x11C1, 0x0450, "1456VQH19R-1(INT)", "LT Winmodem 56K" } ,
+ { 0x11C1, 0x0451, "LT Winmodem", "LT WinModem 56k Data+Fax+Voice+DSVD" } ,
+ { 0x11C1, 0x0452, "LT Winmodem", "" } ,
+ { 0x11C1, 0x0453, "LT Winmodem", "" } ,
+ { 0x11C1, 0x0454, "LT Winmodem", "" } ,
+ { 0x11C1, 0x0455, "LT Winmodem", "" } ,
+ { 0x11C1, 0x0456, "LT Winmodem", "" } ,
+ { 0x11C1, 0x0457, "LT Winmodem", "" } ,
+ { 0x11C1, 0x0458, "1648C", "Mars 3 Mercury v.92 v.44" } ,
+ { 0x11C1, 0x0459, "LT Winmodem", "" } ,
+ { 0x11C1, 0x045A, "LT Winmodem", "" } ,
+ { 0x11c1, 0x045C, "", "LT Winmodem" } ,
+ { 0x11C1, 0x045D, "LT WinModem", "" } ,
+ { 0x11C1, 0x0461, "", "V90 Wildfire Modem" } ,
+ { 0x11C1, 0x0462, "", "56K.V90/ADSL Wildfire Modem" } ,
+ { 0x11C1, 0x0464, "Riptide", "Audio PCI Legacy Resources" } ,
+ { 0x11C1, 0x0480, "Venus Winmodem", "" } ,
+ { 0x11c1, 0x048C, "LU97", "AC-Link Soft Modem Chip Set - 56Kbps" } ,
+ { 0x11C1, 0x048F, "SV92P-T00", "" } ,
+ { 0x11c1, 0x5400, "Lucent OR3TP12 FPSC", "FPGA w embedded PCI core" } ,
+ { 0x11C1, 0x5801, "", "USB Open Host Controller" } ,
+ { 0x11C1, 0x5802, "USS-312", "2-port PCI-to-USB OpenHCI Host Ctrlr" } ,
+ { 0x11C1, 0x5803, "USS-344", "QuadraBus 4-port USB OpenHCI Host Ctrlr" } ,
+ { 0x11C1, 0x5805, "", "USB Advanced Host Controller" } ,
+ { 0x11C1, 0x5811, "FW322/323", "1394A PCI PHY/Link Open Host Ctrlr I/F" } ,
+ { 0x11C1, 0xAB20, "WaveLAN", "PCI Wireless LAN Adapter" } ,
+ { 0x11C6, 0x3001, "1", "VM-1200 Opto Unit Controller" } ,
+ { 0x11C8, 0x0658, "PSB 32", "32 bit , 33 Mhz PCI-SCI Bridge" } ,
+ { 0x11C8, 0xD665, "PSB64", "64 bit , 33 Mhz PCI-SCI Bridge" } ,
+ { 0x11C8, 0xD667, "PSB66", "64 bit , 66 Mhz PCI-SCI Bridge. (D33x)" } ,
+ { 0x11C9, 0x0010, "", "16-line serial port w/DMA" } ,
+ { 0x11C9, 0x0011, "", "4-line serial port w/DMA" } ,
+ { 0x11CB, 0x2000, "PCI-9050", "Target Interface" } ,
+ { 0x11CB, 0x4000, "SUPI-1", "XIO/SIO Host" } ,
+ { 0x11CB, 0x8000, "T225", "Bridge RIO Host" } ,
+ { 0x11D1, 0x01F7, "VxP524", "PCI Video Processor" } ,
+ { 0x11d4, 0x11d4, "ad1807js", "erl3227a-0,8" } ,
+ { 0x11D4, 0x1535, "ADSP-21535", "Blackfin DSP PCI Bus Interface" } ,
+ { 0x11D4, 0x1805, "62412-51", "erl3227a-0.8" } ,
+ { 0x11d4, 0x1807, "AD1807JS", "3Com winmodem chip" } ,
+ { 0x11D4, 0x1889, "AD1889", "Sound Chip" } ,
+ { 0x11D4, 0x2192, "ADSP-2192", "DSP Microcomputer (function #0)" } ,
+ { 0x11D4, 0x219A, "ADSP-2192", "DSP Microcomputer (function #1)" } ,
+ { 0x11D4, 0x219E, "ADSP-2192", "DSP Microcomputer (function #2)" } ,
+ { 0x11D4, 0x2F44, "ADSP-2141", "SafeNet Crypto Accelerator chip" } ,
+ { 0x11D5, 0x0115, "10115", "Greensheet" } ,
+ { 0x11D5, 0x0117, "10117", "Greensheet" } ,
+ { 0x11DB, 0x1234, "", "Dreamcast Broadband Adapter" } ,
+ { 0x11DE, 0x6057, "ZR36057/36067", "AV PCI Controller" } ,
+ { 0x11de, 0x6120, "ZR36120/5", "DVD Decoder" } ,
+ { 0x11F0, 0x4231, "", "" } ,
+ { 0x11F0, 0x4232, "FASTline UTP Quattro", "" } ,
+ { 0x11F0, 0x4233, "FASTline FO", "" } ,
+ { 0x11F0, 0x4234, "FASTline UTP", "" } ,
+ { 0x11F0, 0x4235, "FASTline-II UTP", "" } ,
+ { 0x11F0, 0x4236, "FASTline-II FO", "" } ,
+ { 0x11F0, 0x4731, "GIGAline", "" } ,
+ { 0x11F4, 0x2915, "2915", "" } ,
+ { 0x11F6, 0x0112, "", "ReadyLink ENET100-VG4" } ,
+ { 0x11F6, 0x0113, "", "FreedomLine 100" } ,
+ { 0x11F6, 0x1401, "832AE28030680", "ReadyLink RL2000 (Winbond W89C940)" } ,
+ { 0x11F6, 0x2011, "RL100-ATX", "10/100 Fast Ethernet Adapter" } ,
+ { 0x11F6, 0x2201, "", "ReadyLink 100TX (Winbond W89C840)" } ,
+ { 0x11F6, 0x9881, "RL100TX", "Fast Ethernet Adapter" } ,
+ { 0x11F8, 0x7364, "PM7364", "FREEDM-32 Frame Engine & Datalink Mgr" } ,
+ { 0x11F8, 0x7366, "PM7366", "FREEDM-8 Frame Engine & Datalink Manager" } ,
+ { 0x11F8, 0x7367, "PM7367", "FREEDM-32P32 Frame Engine & Datalink Mgr" } ,
+ { 0x11F8, 0x7375, "PM7375", "LASAR-155 ATM SAR" } ,
+ { 0x11F8, 0x7380, "PM7380", "FREEDM-32P672 Frm Engine & Datalink Mgr" } ,
+ { 0x11F8, 0x7382, "PM7382", "FREEDM-32P256 Frm Engine & Datalink Mgr" } ,
+ { 0x11F8, 0x7384, "PM7384", "FREEDM-84P672 Frm Engine & Datalink Mgr" } ,
+ { 0x11FE, 0x0001, "RocketPort", "" } ,
+ { 0x11FE, 0x0002, "RocketPort", "" } ,
+ { 0x11FE, 0x0003, "RocketPort", "" } ,
+ { 0x11FE, 0x0004, "RocketPort", "" } ,
+ { 0x11FE, 0x0005, "RocketPort", "" } ,
+ { 0x11FE, 0x0006, "RocketPort", "" } ,
+ { 0x11FE, 0x0007, "RocketPort", "" } ,
+ { 0x11FE, 0x0008, "RocketPort", "" } ,
+ { 0x11FE, 0x0009, "RocketPort", "" } ,
+ { 0x11FE, 0x000A, "RocketPort", "" } ,
+ { 0x11FE, 0x000B, "RocketPort", "" } ,
+ { 0x11FE, 0x000C, "RocketPort", "" } ,
+ { 0x11FE, 0x000D, "RocketPort", "" } ,
+ { 0x11FE, 0x8015, "RocketPort", "4-port UART 16954" } ,
+ { 0x1202, 0x0001, "NAIATMPCI", "PCI ATM Adapter" } ,
+ { 0x1208, 0x4853, "", "HS-Link Device" } ,
+ { 0x120E, 0x0100, "Cyclom-Y", "Multiport Serial Card" } ,
+ { 0x120E, 0x0101, "Cyclom-Y", "Multiport Serial Card" } ,
+ { 0x120E, 0x0102, "Cyclom-4Y", "Multiport Serial Card" } ,
+ { 0x120E, 0x0103, "Cyclom-4Y", "Multiport Serial Card" } ,
+ { 0x120E, 0x0104, "Cyclom-8Y", "Multiport Serial Card" } ,
+ { 0x120E, 0x0105, "Cyclom-8Y", "Multiport Serial Card" } ,
+ { 0x120E, 0x0200, "Cyclom-Z", "Intelligent Multiport Serial" } ,
+ { 0x120E, 0x0201, "Cyclom-Z", "Intelligent Serial Card" } ,
+ { 0x120E, 0x0300, "PC300 RX 2", "" } ,
+ { 0x120E, 0x0301, "PC300 RX 1", "" } ,
+ { 0x120E, 0x0302, "PC300 TE 2", "" } ,
+ { 0x120E, 0x0303, "PC300 TE 1", "" } ,
+ { 0x120F, 0x0001, "Roadrunner", "" } ,
+ { 0x1217, 0x6729, "OZ6729", "PCI to PCMCIA Bridge" } ,
+ { 0x1217, 0x673A, "OZ6730", "PCI to PCMCIA Bridge" } ,
+ { 0x1217, 0x6832, "OZ6832/3", "CardBus Controller" } ,
+ { 0x1217, 0x6836, "OZ6836/6860", "CardBus Controller" } ,
+ { 0x1217, 0x6872, "OZ6812", "CardBus Controller" } ,
+ { 0x1217, 0x6925, "OZ6922", "CardBus Controller" } ,
+ { 0x1217, 0x6933, "OZ6933", "CardBus Controller" } ,
+ { 0x1217, 0x6972, "OZ6912", "CardBus Controller" } ,
+ { 0x121A, 0x0001, "Voodoo", "Voodoo 3D Acceleration Chip" } ,
+ { 0x121A, 0x0002, "Voodoo2", "Voodoo 2 3D Accelerator" } ,
+ { 0x121A, 0x0003, "Voodoo Banshee", "Voodoo Banshee" } ,
+ { 0x121a, 0x0004, "", "Voodoo Banshee (Velocity 100)" } ,
+ { 0x121A, 0x0005, "Voodoo3", "All Voodoo3 chips, 3000" } ,
+ { 0x121A, 0x0007, "Voodoo4", "" } ,
+ { 0x121A, 0x0009, "Voodoo5", "" } ,
+ { 0x121A, 0x0010, "Rampage", "Rev.A AGPx4, 0.25µm, 200/2x200 core/RAM" } ,
+ { 0x121A, 0x0057, "Voodoo 3/3000", "Avenger" } ,
+ { 0x1220, 0x1220, "", "AMCC 5933 TMS320C80 DSP/Imaging Board" } ,
+ { 0x122D, 0x1206, "368DSP", "" } ,
+ { 0x122D, 0x4201, "MR2800W", "AMR 56K modem" } ,
+ { 0x122D, 0x50DC, "PCI168/3328", "Audio" } ,
+ { 0x122D, 0x80DA, "3328", "Audio" } ,
+ { 0x1236, 0x0000, "RealMagic64/GX", "SD6425" } ,
+ { 0x1236, 0x6401, "REALmagic64/GX", "GUI Accelerator" } ,
+ { 0x123D, 0x0010, "PCI-DV", "PCI-DV Digital Video Interface" } ,
+ { 0x123F, 0x00E4, "", "MPEG" } ,
+ { 0x123F, 0x6120, "", "DVD device" } ,
+ { 0x123F, 0x8120, "176", "E4?" } ,
+ { 0x123F, 0x8888, "", "Cinemaster C 3.0 DVD Decoder" } ,
+ { 0x1242, 0x1460, "JNIC-1460", "2-Gb/s Fibre Channel-PCI 64-bit 66 MHz" } ,
+ { 0x1242, 0x1560, "JNIC-1560", "Dual Channel 2 Gb/s Fibre Channel-PCI-X" } ,
+ { 0x1244, 0x0700, "B1", "ISDN controller" } ,
+ { 0x1244, 0x0800, "C4", "ISDN Controller" } ,
+ { 0x1244, 0x0A00, "A1", "ISDN Controller" } ,
+ { 0x1244, 0x0E00, "", "Fritz!PCI 2.0 ISDN Controller" } ,
+ { 0x1244, 0x1100, "C2", "ISDN Controller" } ,
+ { 0x1244, 0x1200, "T1", "ISDN Controller" } ,
+ { 0x124B, 0x0040, "cPCI-200", "Four Slot IndustryPack Carrier" } ,
+ { 0x124D, 0x0000, "EasyConnect 8/32", "" } ,
+ { 0x124D, 0x0002, "EasyConnect 8/64", "" } ,
+ { 0x124D, 0x0003, "EasyIO PCI", "" } ,
+ { 0x124F, 0x0041, "IFT-2000", "PCI RAID Controller" } ,
+ { 0x1250, 0x2898, "", "" } ,
+ { 0x1255, 0x1110, "MPEG Forge", "" } ,
+ { 0x1255, 0x1210, "MPEG Fusion", "" } ,
+ { 0x1255, 0x2110, "VideoPlex", "" } ,
+ { 0x1255, 0x2120, "VideoPlex CC", "" } ,
+ { 0x1255, 0x2130, "VideoQuest", "" } ,
+ { 0x1256, 0x4201, "PCI-2240i", "EIDE Adapter" } ,
+ { 0x1256, 0x4401, "PCI-2220i", "Dale EIDE Adapter" } ,
+ { 0x1256, 0x5201, "PCI-2000", "IntelliCache SCSI Adapter" } ,
+ { 0x1259, 0x2503, "Realtek 8139b", "" } ,
+ { 0x1259, 0x2560, "", "AT-2560 Fast Ethernet Adapter (i82557B)" } ,
+ { 0x125D, 0x0000, "ESS336H", "PCI Fax Modem (early model)" } ,
+ { 0x125D, 0x1968, "ES1968", "Maestro-2 PCI audio accelerator" } ,
+ { 0x125D, 0x1969, "ES1938/41/46", "Solo-1 PCI AudioDrive family" } ,
+ { 0x125d, 0x1978, "ES1978", "Maestro-2 PCI Audio Accelerator" } ,
+ { 0x125d, 0x1988, "ES1989", "Allegro-1 Audiodrive" } ,
+ { 0x125d, 0x1989, "ES56CVM-PI", "Allegro-1.COMM PCI Voice+Fax Modem" } ,
+ { 0x125d, 0x1998, "ES1980", "Maestro-3 PCI Audio Accelerator" } ,
+ { 0x125d, 0x1999, "ES1983", "Maestro-3.COMM PCI Voice+Fax Modem" } ,
+ { 0x125d, 0x199A, "ES1980", "Maestro-3 PCI Audio Accelerator" } ,
+ { 0x125D, 0x199B, "ES1938", "Maestro-3.COMM PCI Voice+Fax Modem" } ,
+ { 0x125D, 0x2808, "ES336H", "PCI Fax Modem (later model)" } ,
+ { 0x125d, 0x2838, "ES2838S/2839", "SuperLink PCI Fax Modem V.90" } ,
+ { 0x125d, 0x2843, "ES2838/2839", "SuperLink-MLP Voice Modem" } ,
+ { 0x125d, 0x2847, "ES2838/2839", "SuperLink-MLP 10 Voice Modem" } ,
+ { 0x125D, 0x2898, "ES2898S", "TelDrive ES56T-PI family V.90 PCI modem" } ,
+ { 0x1260, 0x3873, "ISL3874A", "PRISMII.5 IEE802.11B Wireless LAN" } ,
+ { 0x1260, 0x8130, "HMP8130", "NTSC/PAL Video Decoder" } ,
+ { 0x1260, 0x8131, "HMP8131", "NTSC/PAL Video Decoder" } ,
+ { 0x1266, 0x0001, "", "NE10/100 Adapter (i82557B)" } ,
+ { 0x1266, 0x1910, "", "NE2000Plus (RT8029) Ethernet Adapter" } ,
+ { 0x1267, 0x1016, "", "NICCY PCI card" } ,
+ { 0x1267, 0x4243, "", "Satellite receiver board / MPEG2 decoder" } ,
+ { 0x1267, 0x5352, "PCR2101", "" } ,
+ { 0x1267, 0x5A4B, "telsatturbo", "" } ,
+ { 0x126C, 0x1F1F, "", "e-mobility 802.11b Wireless LAN PCI Card" } ,
+ { 0x126F, 0x0710, "SM710", "LynxEM" } ,
+ { 0x126F, 0x0712, "SM712", "LynxEM+" } ,
+ { 0x126F, 0x0720, "SM720", "Lynx3DM" } ,
+ { 0x126F, 0x0810, "SM810", "LynxE" } ,
+ { 0x126F, 0x0811, "SM811", "LynxE" } ,
+ { 0x126F, 0x0820, "SM820", "Lynx3D" } ,
+ { 0x126F, 0x0910, "SM910", "Lynx" } ,
+ { 0x1273, 0x0002, "DirecPC", "" } ,
+ { 0x1274, 0x1274, "5880", "multimedia audio device" } ,
+ { 0x1274, 0x1371, "ES1371", "AudioPCI" } ,
+ { 0x1274, 0x1373, "ES1373", "Sound Blaster Audio(PCI)" } ,
+ { 0x1274, 0x5000, "ES1370", "AudioPCI" } ,
+ { 0x1274, 0x5880, "5880", "AudioPCI" } ,
+ { 0x1278, 0x0701, "TPE3/TM3", "PowerPC Node" } ,
+ { 0x1279, 0x0295, "", "Virtual Northbridge" } ,
+ { 0x1279, 0x0395, "LongRun", "Northbridge" } ,
+ { 0x1279, 0x0396, "", "SDRAM Controller" } ,
+ { 0x1279, 0x0397, "", "BIOS scratchpad" } ,
+ { 0x127A, 0x1002, "RH56D-PCI", "Modem enumerator" } ,
+ { 0x127A, 0x1003, "65785467", "HCF 56k V.90 Modem" } ,
+ { 0x127A, 0x1004, "R6795-12", "HCF 56k V.90 Modem" } ,
+ { 0x127A, 0x1005, "r6793-17", "HSF 56k V.90 Speakerphone/Voice Modem" } ,
+ { 0x127A, 0x1022, "1456VQH20E", "HCF V.90 Modem" } ,
+ { 0x127A, 0x1023, "", "V.90 Modem" } ,
+ { 0x127A, 0x1024, "R6785-61", "HCF 56k PCI Modem (Amquest)" } ,
+ { 0x127A, 0x1025, "1456VQH-R1", "HCF 56k PCI Modem" } ,
+ { 0x127A, 0x1026, "R6785-61", "HCF 56k V.90 Speakerphone Modem" } ,
+ { 0x127A, 0x1032, "", "HCF 56k PCI Modem" } ,
+ { 0x127A, 0x1033, "R6795 12", "HCF P85 DATA/FAX PCI Modem" } ,
+ { 0x127A, 0x1034, "", "HCF 56k PCI Modem" } ,
+ { 0x127A, 0x1035, "RH56D/SP-PCI", "HCF 56k Speakerphone Modem" } ,
+ { 0x127A, 0x1036, "", "HCF 56k PCI Modem" } ,
+ { 0x127A, 0x1085, "r6793-11", "Volcano SoftK56 Data,Fax,Speak PCI Modem" } ,
+ { 0x127a, 0x1125, "", "" } ,
+ { 0x127A, 0x2004, "SoftK56VB2.1V2.08.02", "K56 modem" } ,
+ { 0x127A, 0x2005, "RS56/SP-PCI11P1", "Single chip 56K V90 modem/spkrphone" } ,
+ { 0x127A, 0x2013, "", "Volcano SoftK56 PCI modem" } ,
+ { 0x127A, 0x2014, "rs56 sp-pci", "PCI modem" } ,
+ { 0x127A, 0x2015, "r6793-11", "Conexant SoftK56 Speakerphone Modem" } ,
+ { 0x127A, 0x2016, "RS56/SP-PCI11P1", "HSF 56k Data/Fax/Voice/Spkrphone Modem" } ,
+ { 0x127A, 0x2114, "R6793-11", "Soft 56K Data, Fax, PCI modem" } ,
+ { 0x127A, 0x2F00, "cx11252-11", "HSF 56k HSFi" } ,
+ { 0x127A, 0x4310, "123456", "Master Riptide PCI Audio Device" } ,
+ { 0x127A, 0x4311, "V1456VQH-R6", "Conexant PCI Modem Enumerator" } ,
+ { 0x127A, 0x4312, "", "Riptide PCI Game Controller" } ,
+ { 0x127A, 0x4320, "810E", "Riptide PCI Audio Controller" } ,
+ { 0x127A, 0x4321, "RLVDL56DPF/SP", "Riptide HCF 56k PCI Modem" } ,
+ { 0x127A, 0x4322, "", "Riptide PCI Game Controller" } ,
+ { 0x127A, 0x5278, "Harmonic DVB", "Network Adapter" } ,
+ { 0x127A, 0x8234, "RS8234", "ATM ServiceSAR Plus" } ,
+ { 0x1282, 0x9009, "DM9009", "Ethernet Adapter" } ,
+ { 0x1282, 0x9102, "DM9102/A/AF", "GFast Ethernet Adapter" } ,
+ { 0x1283, 0x0801, "IT8152F/G", "Audio Digital Controller" } ,
+ { 0x1283, 0x673A, "IT8330G", "IDE Controller" } ,
+ { 0x1283, 0x8152, "IT8152F/G", "Advanced RISC-to-PCI Companion Chip" } ,
+ { 0x1283, 0x8172, "IT8172G", "Ultra RISC (MIPS, SH4) Companion Chip" } ,
+ { 0x1283, 0x8330, "IT8330G", "Host Bridge" } ,
+ { 0x1283, 0x8872, "IT8871/72", "PCI to ISA I/O chip" } ,
+ { 0x1283, 0x8875, "IT8875F", "PCI Parallel Port" } ,
+ { 0x1283, 0x8888, "IT8888F", "PCI to ISA Bridge with SMB" } ,
+ { 0x1283, 0x8889, "IT8889F", "PCI to ISA Bridge" } ,
+ { 0x1283, 0x9876, "IT8875F", "PCI I/O CARD" } ,
+ { 0x1283, 0xE886, "IT8330G", "PCI to ISA Bridge" } ,
+ { 0x1285, 0x0100, "ES1849", "Maestro-1 AudioDrive" } ,
+ { 0x1287, 0x001E, "LS220D", "DVD Decoder" } ,
+ { 0x1287, 0x001F, "LS220C", "DVD Decoder" } ,
+ { 0x1287, 0x0020, "LS242", "MPEG/DVD video decoder" } ,
+ { 0x1289, 0x1006, "", "" } ,
+ { 0x128A, 0xF001, "Ethernet 10/100", "AsanteFAST 10/100 PCI Ethernet Adapter" } ,
+ { 0x128D, 0x0021, "", "ATM Adapter" } ,
+ { 0x128E, 0x0008, "ST128", "WSS/SB" } ,
+ { 0x128E, 0x0009, "ST128", "SAM9407" } ,
+ { 0x128E, 0x000A, "ST128", "Game Port" } ,
+ { 0x128E, 0x000B, "ST128", "MPU Port" } ,
+ { 0x128E, 0x000C, "ST128", "Control Port" } ,
+ { 0x129A, 0x0415, "PBT-415", "PCI 66MHz Analyzer and 33MHz Exerciser" } ,
+ { 0x129A, 0x0515, "PBT-515", "PCI 66MHz Analyzer and Exerciser" } ,
+ { 0x129A, 0x0615, "PBT-615", "PCI 66MHz and PCI-X 100MHz Bus Analyzer" } ,
+ { 0x12A3, 0xECB8, "1646T00", "" } ,
+ { 0x12aa, 0x5568, "", "WANic 400 series" } ,
+ { 0x12AA, 0x556C, "", "NAI HSSI Sniffer PCI Adapter" } ,
+ { 0x12AB, 0x3000, "TUN-200/MPG-200C", "PCI TV (and DVD Decoder?) Card" } ,
+ { 0x12AE, 0x0001, "3C986", "ACEnic 1000 BASE-SX Ethernet adapter" } ,
+ { 0x12AE, 0x0002, "3C986-T", "Copper Gigabit Ethernet Adapter" } ,
+ { 0x12B9, 0x0062, "erk41926a-0.6", "usr 56k internal modem" } ,
+ { 0x12B9, 0x1006, "3cp803598", "USR 56k Internal Voice WinModem" } ,
+ { 0x12B9, 0x1007, "ERL3263A-0", "USR 56k Internal DF GWPCI PC99" } ,
+ { 0x12B9, 0x1008, "3cp803598", "USR 56k Internal Modem" } ,
+ { 0x12BA, 0x0032, "Hammerhead-Lite-PCI", "DSP Prototyping & Development Card" } ,
+ { 0x12BE, 0x3041, "AN3041Q", "CO-MEM PCI Bus Interface and Cache" } ,
+ { 0x12be, 0x3042, "CY7C09449PV-AC", "128Kbit Dual-Port SRAM w PCI Bus Ctrlr" } ,
+ { 0x12C1, 0x9080, "Sync4hs/CCP/PCI/MP", "Communications Processor" } ,
+ { 0x12C3, 0x0058, "HT80232", "LAN Adapter (NE2000-compatible)" } ,
+ { 0x12C3, 0x5598, "HT80229", "Ethernet Adapter (NE2000-compatible)" } ,
+ { 0x12C5, 0x007F, "ISE", "PEI Imaging Subsystem Engine" } ,
+ { 0x12C5, 0x0081, "PCIVST", "PCI Thresholding Engine" } ,
+ { 0x12C5, 0x0085, "", "Video Simulator/Sender" } ,
+ { 0x12C5, 0x0086, "THR2", "Multi-scale Thresholder" } ,
+ { 0x12C7, 0x0546, "", "D120JCT-LS Card" } ,
+ { 0x12C7, 0x0561, "", "BRI/2 Type Card (Voice Driver)" } ,
+ { 0x12C7, 0x0647, "", "D/240JCT-T1 Card" } ,
+ { 0x12C7, 0x0648, "", "D/300JCT-E1 Card" } ,
+ { 0x12C7, 0x0649, "", "D/300JCT-E1 Card" } ,
+ { 0x12C7, 0x0651, "", "MSI PCI Card" } ,
+ { 0x12C7, 0x0673, "", "BRI/160-PCI Card" } ,
+ { 0x12C7, 0x0674, "", "BRI/120-PCI Card" } ,
+ { 0x12C7, 0x0675, "", "BRI/80-PCI Card" } ,
+ { 0x12C7, 0x0676, "", "D/41JCT Card" } ,
+ { 0x12C7, 0x0685, "", "D/480JCT-2T1 Card" } ,
+ { 0x12C7, 0x0687, "", "D/600JCT-2E1 (75 Ohm) Card" } ,
+ { 0x12C7, 0x0689, "D/600JCT-2E1", "Dialogic 2E1 - JCT series" } ,
+ { 0x12C7, 0x0707, "", "D/320JCT (Resource Only) Card" } ,
+ { 0x12C7, 0x0708, "", "D/160JCT (Resource Only) Card" } ,
+ { 0x12CB, 0x0027, "StudioCard", "" } ,
+ { 0x12CB, 0x002D, "BX-12", "" } ,
+ { 0x12CB, 0x002E, "SC-2000", "" } ,
+ { 0x12CB, 0x002F, "LX-44", "" } ,
+ { 0x12CB, 0x0030, "SC-22", "" } ,
+ { 0x12CB, 0x0031, "BX-44", "" } ,
+ { 0x12CB, 0x0032, "LX-24M", "20-bit 2-in, 4-out audio card w/MPEG-2" } ,
+ { 0x12CB, 0x0033, "LX-22M", "" } ,
+ { 0x12CB, 0x0034, "BX-8", "" } ,
+ { 0x12CB, 0x0035, "BX-12e", "" } ,
+ { 0x12D2, 0x0008, "NV1", "EDGE 3D Accelerator" } ,
+ { 0x12D2, 0x0009, "DAC64", "EDGE 3D" } ,
+ { 0x12d2, 0x0010, "Mutara V08", "" } ,
+ { 0x12D2, 0x0018, "RIVA 128", "128-bit 3D Multimedia Accelerator" } ,
+ { 0x12D2, 0x0019, "RIVA 128ZX", "2D/3D GUI Accelerator" } ,
+ { 0x12D2, 0x0020, "NV4", "Riva TNT GUI+3D Accelerator" } ,
+ { 0x12D2, 0x0028, "NV5", "Riva TNT2 /TNT2 Pro" } ,
+ { 0x12D2, 0x0029, "NVULTRA", "Riva TNT2 Ultra" } ,
+ { 0x12D2, 0x002A, "NV5", "Riva TNT2" } ,
+ { 0x12D2, 0x002B, "NV5", "Riva TNT2" } ,
+ { 0x12D2, 0x002C, "NVVANTA", "Vanta / Vanta LT" } ,
+ { 0x12D2, 0x002D, "NVM64", "Riva TNT2 Model 64" } ,
+ { 0x12D2, 0x002E, "NV6", "Vanta" } ,
+ { 0x12D2, 0x002F, "NV6", "Vanta" } ,
+ { 0x12D2, 0x00A0, "NVA0", "Riva TNT2 Aladdin" } ,
+ { 0x12D5, 0x1000, "MAP-CA", "Broadband Signal Processor" } ,
+ { 0x12D5, 0x1002, "MAP-1000", "Digital Signal Processor" } ,
+ { 0x12D8, 0x71E2, "PI7C7300", "3 Port PCI to PCI bridge" } ,
+ { 0x12D8, 0x8150, "PI7C8150", "2-Port PCI to PCI Bridge" } ,
+ { 0x12DB, 0x0003, "", "FoxFire II" } ,
+ { 0x12DE, 0x0200, "", "Cryptoswift 200" } ,
+ { 0x12E0, 0x0010, "ST16C654", "Quad UART" } ,
+ { 0x12E0, 0x0020, "ST16C654", "Quad UART" } ,
+ { 0x12E0, 0x0030, "ST16C654", "Quad UART" } ,
+ { 0x12E4, 0x1140, "", "ISDN Controller" } ,
+ { 0x12EB, 0x0001, "AU8820", "Vortex 1 Digital Audio Processor" } ,
+ { 0x12eb, 0x0002, "AU8830", "Vortex 2 3D Digital Audio Processor" } ,
+ { 0x12eb, 0x0003, "AU8810", "Vortex Digital Audio Processor" } ,
+ { 0x12eb, 0x8803, "", "Vortex 56k Software Modem" } ,
+ { 0x12F8, 0x0002, "VideoMaker", "" } ,
+ { 0x1303, 0x0001, "", "cM67 CompactPCI DSP Card" } ,
+ { 0x1307, 0x0001, "PCI-DAS1602/16", "" } ,
+ { 0x1307, 0x0006, "PCI-GPIB", "" } ,
+ { 0x1307, 0x000B, "PCI-DIO48H", "" } ,
+ { 0x1307, 0x000C, "PCI-PDISO8", "" } ,
+ { 0x1307, 0x000D, "PCI-PDISO16", "" } ,
+ { 0x1307, 0x000F, "PCI-DAS1200", "" } ,
+ { 0x1307, 0x0010, "PCI-DAS1602/12", "" } ,
+ { 0x1307, 0x0014, "PCI-DIO24H", "" } ,
+ { 0x1307, 0x0015, "PCI-DIO24H/CTR3", "" } ,
+ { 0x1307, 0x0016, "PCI-DIO24H/CTR16", "" } ,
+ { 0x1307, 0x0017, "PCI-DIO96H", "" } ,
+ { 0x1307, 0x0018, "PCI-CTR05", "" } ,
+ { 0x1307, 0x0019, "PCI-DAS1200/JR", "" } ,
+ { 0x1307, 0x001A, "PCI-DAS1001", "" } ,
+ { 0x1307, 0x001B, "PCI-DAS1002", "" } ,
+ { 0x1307, 0x001C, "PCI-DAS1602JR/16", "" } ,
+ { 0x1307, 0x001D, "PCI-DAS6402/16", "" } ,
+ { 0x1307, 0x001E, "PCI-DAS6402/12", "" } ,
+ { 0x1307, 0x001F, "PCI-DAS16/M1", "" } ,
+ { 0x1307, 0x0020, "PCI-DDA02/12", "" } ,
+ { 0x1307, 0x0021, "PCI-DDA04/12", "" } ,
+ { 0x1307, 0x0022, "PCI-DDA08/12", "" } ,
+ { 0x1307, 0x0023, "PCI-DDA02/16", "" } ,
+ { 0x1307, 0x0024, "PCI-DDA04/16", "" } ,
+ { 0x1307, 0x0025, "PCI-DDA08/16", "" } ,
+ { 0x1307, 0x0026, "PCI-DAC04/12-HS", "" } ,
+ { 0x1307, 0x0027, "PCI-DAC04/16-HS", "" } ,
+ { 0x1307, 0x0028, "CIO-DIO24", "24 Bit Digital Input/Output Board" } ,
+ { 0x1307, 0x0029, "PCI-DAS08", "" } ,
+ { 0x1307, 0x002C, "PCI-INT32", "" } ,
+ { 0x1307, 0x0033, "PCI-DUAL-AC5", "" } ,
+ { 0x1307, 0x0034, "PCI-DAS-TC", "" } ,
+ { 0x1307, 0x0035, "PCI-DAS64/M1/16", "" } ,
+ { 0x1307, 0x0036, "PCI-DAS64/M2/16", "" } ,
+ { 0x1307, 0x0037, "PCI-DAS64/M3/16", "" } ,
+ { 0x1307, 0x004C, "PCI-DAS1000", "" } ,
+ { 0x1308, 0x0001, "", "NetCelerator Adapter" } ,
+ { 0x1310, 0x0003, "9060", "CompactPCI Interface" } ,
+ { 0x1310, 0x000D, "", "FPGA PCI Bridge" } ,
+ { 0x1317, 0x0531, "", "" } ,
+ { 0x1317, 0x0981, "AM981", "Ethernet Adapter" } ,
+ { 0x1317, 0x0985, "ADM983", "fast ethernet controller" } ,
+ { 0x1317, 0x1985, "ADM985", "10/100 cardbus ethernet controller" } ,
+ { 0x1317, 0x9511, "ADM9511", "cardbus ethernet-modem controller" } ,
+ { 0x1317, 0x9513, "ADM9513", "cardbus ethernet-modem controller" } ,
+ { 0x1318, 0x0911, "G-NIC II", "1000BT Network Interface Card" } ,
+ { 0x1319, 0x0801, "FM801", "Xwave PCI audio controller" } ,
+ { 0x1319, 0x0802, "FM801", "Xwave PCI Joystick" } ,
+ { 0x1319, 0x1000, "FM801", "PCI Audio" } ,
+ { 0x1319, 0x1001, "FM801", "PCI Joystick" } ,
+ { 0x131f, 0x1000, "", "PCI Serial Card" } ,
+ { 0x131f, 0x1001, "", "CyberSerial 16550 (1-port)" } ,
+ { 0x131f, 0x1002, "", "CyberSerial 16850 (1-port)" } ,
+ { 0x131f, 0x1010, "", "Duet1S(16550)+1P" } ,
+ { 0x131f, 0x1011, "", "Duet 1S(16550)+1P" } ,
+ { 0x131f, 0x1012, "", "Duet 1S(16550)+1P" } ,
+ { 0x131f, 0x1020, "", "CyberParallel PCI Card" } ,
+ { 0x131f, 0x1021, "", "CyberParallel PCI Card" } ,
+ { 0x131f, 0x1030, "", "CyberSerial 16550" } ,
+ { 0x131f, 0x1031, "", "CyberSerial 16650" } ,
+ { 0x131f, 0x1032, "", "CyberSerial 16850" } ,
+ { 0x131f, 0x1034, "", "Trio 2S(16550)+1P" } ,
+ { 0x131f, 0x1035, "", "Trio 2S(16650)+1P" } ,
+ { 0x131f, 0x1036, "", "Trio 2S(16850)+1P" } ,
+ { 0x131f, 0x1050, "", "CyberSerial 16550" } ,
+ { 0x131f, 0x1051, "", "CyberSerial 16650" } ,
+ { 0x131f, 0x1052, "", "CyberSerial 16850" } ,
+ { 0x131f, 0x2000, "", "CyberSerial 16550" } ,
+ { 0x131f, 0x2001, "", "CyberSerial 16650" } ,
+ { 0x131F, 0x2002, "", "CyberSerial 16850" } ,
+ { 0x131f, 0x2010, "", "Duet 1S(16550)+1P" } ,
+ { 0x131F, 0x2011, "", "Duet 1S(16650)+1P" } ,
+ { 0x131F, 0x2012, "", "Duet 1S(16850)+1P" } ,
+ { 0x131f, 0x2020, "CyberParallel", "" } ,
+ { 0x131f, 0x2021, "CyberParallel", "" } ,
+ { 0x131f, 0x2030, "", "CyberSerial 16550/PCI SERIAL 8000 IO1875" } ,
+ { 0x131f, 0x2031, "", "CyberSerial 16650" } ,
+ { 0x131f, 0x2032, "", "CyberSerial 16850" } ,
+ { 0x131f, 0x2040, "", "Trio 1S(16550)+2P" } ,
+ { 0x131f, 0x2041, "", "Trio 1S(16650)+2P" } ,
+ { 0x131F, 0x2042, "", "Trio 1S(16850)+2P" } ,
+ { 0x131f, 0x2050, "", "CyberSerial 16550" } ,
+ { 0x131F, 0x2051, "", "CyberSerial 16650" } ,
+ { 0x131F, 0x2052, "", "CyberSerial 16850" } ,
+ { 0x131F, 0x2060, "", "Trio 2S(16550)+1P" } ,
+ { 0x131F, 0x2061, "", "Trio 2S(16650)+1P" } ,
+ { 0x131F, 0x2062, "", "Trio 2S(16850)+1P" } ,
+ { 0x1332, 0x5415, "MM-5415CN", "PCI Memory Module with Battery Backup" } ,
+ { 0x133D, 0x1000, "SST-5136-PFB-PCI", "Industrial I/O Card" } ,
+ { 0x1344, 0x3240, "", "CopperHead CopperTail SC1 AMC AC97" } ,
+ { 0x1344, 0x3320, "MT8LLN21PADF", "North Bridge" } ,
+ { 0x1344, 0x3470, "MT7LLN22NCNE", "South Bridge" } ,
+ { 0x1344, 0x4020, "", "CopperHead CopperTail SC1 IDE Controller" } ,
+ { 0x1344, 0x4030, "", "CopperHead CopperTail SC1 USB Controller" } ,
+ { 0x134A, 0x0001, "F01 2ASV17184.1", "Domex DMX 3191 PCI SCSI Controller" } ,
+ { 0x134A, 0x0002, "", "Domex DMX3192U/3194UP SCSI Adapter" } ,
+ { 0x134D, 0x2486, "2304WT", "V.92 MDC Modem" } ,
+ { 0x134D, 0x7890, "PCT789T-C1", "HSP MicroModem 56" } ,
+ { 0x134D, 0x7891, "PCT 789T", "HSP MicroModem 56" } ,
+ { 0x134D, 0x7892, "PCT 789T-A", "HSP MicroModem 56" } ,
+ { 0x134D, 0x7893, "S911 K017", "HSP MicroModem 56" } ,
+ { 0x134D, 0x7894, "FT13", "HSP MicroModem 56" } ,
+ { 0x134D, 0x7895, "PCT789T-C1", "HSP MicroModem 56" } ,
+ { 0x134D, 0x7896, "pct789t-c1", "HSP MicroModem 56" } ,
+ { 0x134D, 0x7897, "97860963", "HSP MicroModem 56/PCT789T" } ,
+ { 0x134D, 0x9714, "PCT 288-1A", "PCTEL" } ,
+ { 0x134D, 0xD800, "pct388p-a", "pctel 56k modem" } ,
+ { 0x135a, 0x0042, "PLX PCI9050 + 16C554", "" } ,
+ { 0x135a, 0x0043, "PLX PCI9050 + 16C554", "" } ,
+ { 0x135a, 0x0061, "PLX PCI9050 + 16C552", "2-port RS232 card with printer port" } ,
+ { 0x135a, 0x0062, "PLX PCI9050 + 16C552", "2-port RS232 card with printer port, r 3" } ,
+ { 0x135a, 0x0063, "PLX PCI9050 + 16C552", "2-port RS232 card with printer port, r 4" } ,
+ { 0x135A, 0x0224, "PLX9050", "PLX PCI Bus Logic" } ,
+ { 0x135a, 0x04A3, "PLX PCI9050 + 16C552", "2-port RS232 card, r 4" } ,
+ { 0x135a, 0x04A4, "PLX PCI9050 + 16C552", "2-port RS232 card, r 5" } ,
+ { 0x135E, 0x5101, "5101", "Route 56" } ,
+ { 0x135E, 0x7101, "", "Single Port RS-232/422/485/520" } ,
+ { 0x135E, 0x7201, "", "Dual Port RS-232/422/485 Interface" } ,
+ { 0x135E, 0x7202, "", "Dual Port RS-232 Interface" } ,
+ { 0x135E, 0x7401, "", "Four Port RS-232 Interface" } ,
+ { 0x135E, 0x7402, "", "Four Port RS-422/485 Interface" } ,
+ { 0x135E, 0x7801, "", "Eight Port RS-232 Interface" } ,
+ { 0x135E, 0x8001, "8001", "Digital I/O Adapter" } ,
+ { 0x1365, 0x9050, "HYSDN", "" } ,
+ { 0x1382, 0x2048, "", "Prodif Plus sound card" } ,
+ { 0x1385, 0x4100, "MA301", "802.11b Wireless Adapter" } ,
+ { 0x1385, 0x620A, "GA620", "" } ,
+ { 0x1385, 0x622A, "GA622", "" } ,
+ { 0x1385, 0x630A, "GA630", "" } ,
+ { 0x1385, 0xF311, "FA311", "Fast Ethernet Adapter" } ,
+ { 0x1389, 0x0001, "PCI1500PFB", "Intelligent fieldbus Adapter" } ,
+ { 0x1393, 0x1040, "C104H/PCI", "Smartio" } ,
+ { 0x1393, 0x1320, "CP-132", "Industio" } ,
+ { 0x1393, 0x1680, "C168H/PCI", "Smartio" } ,
+ { 0x1393, 0x2040, "CP-204J", "Intellio" } ,
+ { 0x1393, 0x2180, "C218", "Intellio Turbo PCI" } ,
+ { 0x1393, 0x3200, "C320", "Intellio Turbo PCI" } ,
+ { 0x1394, 0x0001, "LXT1001", "Gigabit Ethernet Adapter" } ,
+ { 0x1397, 0x0B4D, "HFC-8S 16B8D8S0", "ISDN HDLC FIFO Controller" } ,
+ { 0x1397, 0x2BD0, "HFC-PCI A ISDN 2BDS0", "ISDN HDLC FIFO Controller" } ,
+ { 0x1397, 0x8B4D, "HFC-4S ISDN 8B4D4S0", "ISDN HDLC FIFO Controller" } ,
+ { 0x1397, 0xB000, "B000", "HCF-PCI card" } ,
+ { 0x1397, 0xB006, "B006", "HCF-PCI card" } ,
+ { 0x1397, 0xB007, "B007", "HCF-PCI card" } ,
+ { 0x1397, 0xB008, "B008", "HCF-PCI card" } ,
+ { 0x1397, 0xB009, "B009", "HCF-PCI card" } ,
+ { 0x1397, 0xB00A, "B00A", "HCF-PCI card" } ,
+ { 0x1397, 0xB00B, "B00B", "HCF-PCI card" } ,
+ { 0x1397, 0xB00C, "B00C", "HCF-PCI card" } ,
+ { 0x1397, 0xB100, "B100", "HCF-PCI card" } ,
+ { 0x13A3, 0x0005, "7751", "Security Processor" } ,
+ { 0x13A3, 0x0006, "6500", "Public Key Processor" } ,
+ { 0x13A3, 0x0007, "7811", "Security Processor" } ,
+ { 0x13A3, 0x0012, "7951", "Security Processor" } ,
+ { 0x13a8, 0x0152, "XR17C152", "Two channel PCI UART (5V)" } ,
+ { 0x13A8, 0x0154, "XR17C154", "Four Channel PCI Bus UART" } ,
+ { 0x13A8, 0x0158, "XR17C158", "Eight Channel PCI Bus UART (5V)" } ,
+ { 0x13C0, 0x0010, "", "SyncLink PCI WAN Adapter" } ,
+ { 0x13c0, 0x0020, "", "SyncLink SCC Adapter" } ,
+ { 0x13c0, 0x0030, "", "SyncLink Multiport Adapter" } ,
+ { 0x13C1, 0x1000, "", "ATA-RAID Controller" } ,
+ { 0x13C1, 0x1001, "7000 series", "ATA-100 Storage Controller" } ,
+ { 0x13C7, 0x0ADC, "", "Multi-Function Analogue/Digital IO card" } ,
+ { 0x13D0, 0x2103, "T228502", "B2C2 Sky2PC Core Chip" } ,
+ { 0x13D1, 0xAB06, "FE2000VX", "CardBus /Atelco Fibreline Ethernet Adptr" } ,
+ { 0x13D7, 0x8086, "", "" } ,
+ { 0x13DF, 0x0001, "PCI56RVP", "Modem" } ,
+ { 0x13EA, 0x3131, "DS3131", "BoSS Bit Synchronous HDLC Controller" } ,
+ { 0x13EA, 0x3134, "DS3134", "Chateau Channelized T1/E1/HDLC Controller" } ,
+ { 0x13F0, 0x0201, "ST201", "Fast Ehternet Adapter" } ,
+ { 0x13F6, 0x0100, "CMI8338/PCI C3DX", "PCI Audio Chip" } ,
+ { 0x13F6, 0x0101, "CMI8338-031", "PCI Audio Device" } ,
+ { 0x13F6, 0x0111, "CMI8738/PCI C3DX", "PCI Audio Chip" } ,
+ { 0x13F6, 0x0112, "CMI-8378B/PCI-6CH", "PCI Audio Chip" } ,
+ { 0x13F6, 0x0211, "HSP56", "Audiomodem Riser" } ,
+ { 0x13FE, 0x1240, "PCI-1240-A", "4-Axis Stepping/Servo Motor Card" } ,
+ { 0x13fe, 0x1750, "PCI-1750", "Opto Isolated Digital I/O Card w/Counter" } ,
+ { 0x1400, 0x1401, "9432 TX", "" } ,
+ { 0x1407, 0x0100, "", "Lava Dual Serial 550 PCI" } ,
+ { 0x1407, 0x0101, "", "Lava Quatro PCI A/B" } ,
+ { 0x1407, 0x0102, "", "Lava Quatro PCI C/D" } ,
+ { 0x1407, 0x0110, "", "Lava DSerial PCI Port A" } ,
+ { 0x1407, 0x0111, "", "Lava DSerial PCI Port B" } ,
+ { 0x1407, 0x0180, "", "Lava Octopus PCI Ports 1-4" } ,
+ { 0x1407, 0x0181, "", "Lava Octopus PCI Ports 5-8" } ,
+ { 0x1407, 0x0200, "", "LavaPort Dual-650 PCI" } ,
+ { 0x1407, 0x0201, "", "LavaPort Quad-650 PCI A/B" } ,
+ { 0x1407, 0x0202, "", "LavaPort Quad-650 PIC C/D" } ,
+ { 0x1407, 0x0400, "", "Lava 8255 PIO PCI" } ,
+ { 0x1407, 0x0500, "", "Lava Single Serial 550 PCI" } ,
+ { 0x1407, 0x0510, "", "Lava SP Serial 550 PCI" } ,
+ { 0x1407, 0x0511, "", "Lava SP BIDIR Parallel PCI" } ,
+ { 0x1407, 0x0600, "", "Lava Port 650 PCI" } ,
+ { 0x1407, 0x0A00, "LavaPort PCI", "COM Port Accelerator" } ,
+ { 0x1407, 0x8000, "", "Lava Parallel" } ,
+ { 0x1407, 0x8001, "", "Lava Dual Parallel port A" } ,
+ { 0x1407, 0x8002, "", "Lava Dual Parallel port A" } ,
+ { 0x1407, 0x8003, "", "Lava Dual Parallel port B" } ,
+ { 0x1407, 0x8800, "", "BOCA Research IOPPAR" } ,
+ { 0x1412, 0x1712, "ICE1712", "Envy24 PCI Multi-Channel I/O Ctrlr" } ,
+ { 0x1415, 0x8401, "OX9162", "PCI Interface to local bus" } ,
+ { 0x1415, 0x8403, "OX9162", "Parallel Port" } ,
+ { 0x1415, 0x9500, "OX16PCI954", "Quad UART (disabled)" } ,
+ { 0x1415, 0x9501, "OX16PCI954", "Quad UART" } ,
+ { 0x1415, 0x950B, "OXCB950", "Integrated High Performance UART" } ,
+ { 0x1415, 0x9510, "OX16PCI954", "PCI Interface (disabled)" } ,
+ { 0x1415, 0x9511, "OX9160", "PCI Interface to 8-bit local bus" } ,
+ { 0x1415, 0x9512, "OX16PCI954", "PCI Interface to 32-bit bus" } ,
+ { 0x1415, 0x9513, "OX16PCI954", "Parallel Port" } ,
+ { 0x1415, 0x9521, "OX12PCI952", "Dual UART" } ,
+ { 0x1415, 0x9523, "OX12PCI952", "Integrated Parallel Port" } ,
+ { 0x141F, 0x6181, "KFIR", "MPEG decoder" } ,
+ { 0x1448, 0x0001, "ADAT/EDIT", "Audio Editing" } ,
+ { 0x144a, 0x6208, "PCI-6208", "" } ,
+ { 0x144A, 0x7248, "PCI-7248", "" } ,
+ { 0x144A, 0x7250, "PCI-7250", "PLX PCI9052" } ,
+ { 0x144A, 0x7296, "PCI-7296", "" } ,
+ { 0x144A, 0x7432, "PCI-7432", "" } ,
+ { 0x144A, 0x7433, "PCI-7433", "" } ,
+ { 0x144A, 0x7434, "PCI-7434", "" } ,
+ { 0x144A, 0x7841, "PCI-7841", "" } ,
+ { 0x144A, 0x8133, "PCI-8133", "" } ,
+ { 0x144A, 0x8554, "PCI-8554", "" } ,
+ { 0x144A, 0x9111, "PCI-9111", "" } ,
+ { 0x144A, 0x9113, "PCI-9113", "" } ,
+ { 0x144A, 0x9114, "PCI-9114", "" } ,
+ { 0x144B, 0x0601, "", "" } ,
+ { 0x145F, 0x0001, "NextMove PCI", "" } ,
+ { 0x1462, 0x5071, "", "Audio controller" } ,
+ { 0x1471, 0x0188, "RoadRunner 10", "ADSL PCI" } ,
+ { 0x148D, 0x1003, "Rockwell HCF chipset", "Creative ModemBlaster V.90 PCI DI5635" } ,
+ { 0x14B3, 0x0000, "", "DSL NIC" } ,
+ { 0x14B5, 0x0200, "Scope", "" } ,
+ { 0x14B5, 0x0300, "Pulsar", "" } ,
+ { 0x14B5, 0x0400, "Pulsar SRB", "" } ,
+ { 0x14B5, 0x0600, "Pulsar 2", "" } ,
+ { 0x14B5, 0x0800, "", "DSP-Board" } ,
+ { 0x14B5, 0x0900, "", "DSP-Board" } ,
+ { 0x14B5, 0x0A00, "", "DSP-Board" } ,
+ { 0x14B5, 0x0B00, "", "DSP-Board" } ,
+ { 0x14B7, 0x0001, "Symphony 4110", "" } ,
+ { 0x14B9, 0x0001, "PC4800", "" } ,
+ { 0x14B9, 0x0340, "", "Cisco Systems 340 PCI Wireless LAN Adptr" } ,
+ { 0x14b9, 0x0350, "AIR-PCI352", "AiroNet 350 PCI" } ,
+ { 0x14B9, 0x2500, "PC2500 DS", "Wireless PCI LAN Adapter" } ,
+ { 0x14B9, 0x3100, "PC3100 FH", "Wireless PCI LAN Adapter" } ,
+ { 0x14B9, 0x3101, "PC3100 FH", "Wireless PCI LAN Adapter" } ,
+ { 0x14B9, 0x3500, "PC3500 FH", "Wireless PCI LAN Adapter" } ,
+ { 0x14B9, 0x4500, "PC4500 DS", "Wireless PCI LAN Adapter" } ,
+ { 0x14B9, 0x4800, "PC4800 DS", "Wireless PCI LAN Adapter" } ,
+ { 0x14C1, 0x8043, "LANai 9.2 0129", "MyriNet" } ,
+ { 0x14D2, 0x8001, "PCI-010L", "Visial Systems VScom PCI-010L Contoller" } ,
+ { 0x14D2, 0x8002, "", "Visual Systems PCI-020L Controller" } ,
+ { 0x14D2, 0x8010, "", "Visual Systems VScom PCI-100L Controller" } ,
+ { 0x14D2, 0x8011, "", "Visual Systems VScom PCI-110L Controller" } ,
+ { 0x14D2, 0x8020, "", "Visual Systems VScom PCI-200L Controller" } ,
+ { 0x14D2, 0x8021, "", "Visual Systems VScom PCI-210L Controller" } ,
+ { 0x14D2, 0x8040, "", "Visual Systems VScom PCI-400L Controller" } ,
+ { 0x14D2, 0x8041, "", "Visual Systems VScom PCI-410L Controller" } ,
+ { 0x14D2, 0x8042, "", "Visual Systems VScom PCI-420L Controller" } ,
+ { 0x14D2, 0x8080, "", "Visual Systems VScom PCI-800L Controller" } ,
+ { 0x14D2, 0xA000, "", "Visual Systems VScom PCI-010H Controller" } ,
+ { 0x14D2, 0xA001, "", "Visual Systems VScom PCI-110H Controller" } ,
+ { 0x14D2, 0xA003, "16PCI954", "Visual Systems VScom PCI-400H Controller" } ,
+ { 0x14D2, 0xA004, "", "Visual Systems VScom PCI-400HF1 Ctrlr" } ,
+ { 0x14D2, 0xA005, "", "Visual Systems VScom PCI-200H Controller" } ,
+ { 0x14D2, 0xE001, "", "Visial Systems VScom PCI-010HV2" } ,
+ { 0x14D2, 0xE010, "", "Visual Systems VScom PCI-100HV2" } ,
+ { 0x14D2, 0xE020, "", "Visual Systems VScom PCI-200HV2" } ,
+ { 0x14D2, 0xFFFF, "", "Dummy Controller" } ,
+ { 0x14D4, 0x0400, "Panacom 7", "Interface chip" } ,
+ { 0x14DB, 0x2100, "PCI IO 1S", "" } ,
+ { 0x14DB, 0x2101, "PCI IO 1S-650", "" } ,
+ { 0x14DB, 0x2102, "PCI IO 1S-850", "" } ,
+ { 0x14DB, 0x2110, "PCI IO 1S1P", "" } ,
+ { 0x14DB, 0x2111, "PCI IO 1S1P-650", "" } ,
+ { 0x14DB, 0x2112, "PCI IO 1S1P-850", "" } ,
+ { 0x14DB, 0x2120, "TK9902", "" } ,
+ { 0x14DB, 0x2121, "PCI IO 2P", "" } ,
+ { 0x14DB, 0x2130, "PCI IO 2S", "2 Port PCI Serial Card" } ,
+ { 0x14DB, 0x2131, "PCI IO 2S-650", "" } ,
+ { 0x14DB, 0x2132, "PCI IO 2S-850", "" } ,
+ { 0x14DB, 0x2140, "PCI IO 2P1S", "" } ,
+ { 0x14DB, 0x2141, "PCI IO 2P1S-650", "" } ,
+ { 0x14DB, 0x2142, "PCI IO 2P1S-850", "" } ,
+ { 0x14DB, 0x2144, "PCI IO 2P2S", "" } ,
+ { 0x14DB, 0x2145, "PCI IO 2P2S-650", "" } ,
+ { 0x14DB, 0x2146, "PCI IO 2P2S-850", "" } ,
+ { 0x14DB, 0x2150, "PCI IO 4S", "" } ,
+ { 0x14DB, 0x2151, "PCI IO 4S-654", "" } ,
+ { 0x14DB, 0x2152, "PCI IO 4S-850", "" } ,
+ { 0x14DB, 0x2160, "PCI IO 2S1P", "" } ,
+ { 0x14DB, 0x2161, "PCI IO 2S1P-650", "" } ,
+ { 0x14DB, 0x2162, "PCI IO 2S1P-850", "" } ,
+ { 0x14DB, 0x2180, "PCI IO 8S", "" } ,
+ { 0x14DB, 0x2181, "PCI IO 8S-654", "" } ,
+ { 0x14DB, 0x2182, "PCI IO 8S-850", "" } ,
+ { 0x14DC, 0x0000, "PCI230", "" } ,
+ { 0x14DC, 0x0001, "PCI242H", "4-port high speed RS-232" } ,
+ { 0x14DC, 0x0002, "PCI244H", "8-port high speed RD-232" } ,
+ { 0x14DC, 0x0003, "PCI247H", "2-port high speed RS-232" } ,
+ { 0x14DC, 0x0004, "PCI248H", "2-port high speed RS-422/485" } ,
+ { 0x14DC, 0x0005, "PCI249H", "2-port high speed RS-232 and RS-422/485" } ,
+ { 0x14DC, 0x0006, "PCI260", "16-channel analog input (with timers)" } ,
+ { 0x14DC, 0x0007, "PCI224", "16-chan 12-bit analog output (w/ timers)" } ,
+ { 0x14DC, 0x0008, "PCI234", "4-chan 16-bit analog output (w/ timers)" } ,
+ { 0x14DC, 0x0009, "PCI236", "24-channel digital I/O" } ,
+ { 0x14DC, 0x000A, "PCI272", "72-channel digital I/O" } ,
+ { 0x14DC, 0x000B, "PCI215", "48-channel digital I/O (w/ 6 timers)" } ,
+ { 0x14DC, 0x000C, "PCI263", "16-channel reed relay output" } ,
+ { 0x14E4, 0x1644, "BCM5700", "NetXtreme Gigabit Ethernet Controller" } ,
+ { 0x14E4, 0x1645, "BCM5701", "NetXtreme Gigabit Ethernet" } ,
+ { 0x14E4, 0x1646, "BCM5702", "NetXtreme Gigabit Ethernet" } ,
+ { 0x14E4, 0x1647, "BCM5703", "NetXtreme Gigabit Ethernet" } ,
+ { 0x14E4, 0x164D, "BCM5702FE", "NetXtreme Fast Ethernet Controller" } ,
+ { 0x14E4, 0x16A6, "BCM5702X", "Gigabit Ethernet" } ,
+ { 0x14E4, 0x16A7, "BCM5703X", "Gigabit Ethernet" } ,
+ { 0x14E4, 0x4211, "BCM HPNA", "10Mb/s NIC" } ,
+ { 0x14E4, 0x4212, "BCM V.90", "56k Modem" } ,
+ { 0x14E4, 0x4301, "BCM4301 802.11b", "IEEE 802.11b WLAN client chipset" } ,
+ { 0x14E4, 0x4320, "BCM94306", "802.11g NIC" } ,
+ { 0x14E4, 0x4401, "BCM440x", "10/100 Integrated Ethernet Controller" } ,
+ { 0x14E4, 0x4402, "BCM440x", "10/100 Integrated Ethernet Controller" } ,
+ { 0x14E4, 0x5820, "BCM5820", "Crypto Accelerator" } ,
+ { 0x14EA, 0xAB06, "FNW-3603-TX", "10/100 Fast Ethernet CardBus (RTL8139)" } ,
+ { 0x14EB, 0x0020, "BEMx.x", "PCI to S5U13xxxB00B Bridge Adapter" } ,
+ { 0x14EB, 0x0C01, "S1D13808", "Embedded Memory Display Controller" } ,
+ { 0x14F1, 0x1002, "3251", "HCF 56k Modem" } ,
+ { 0x14F1, 0x1003, "11242-11", "HCF 56k Modem" } ,
+ { 0x14F1, 0x1004, "11242-11", "HCF 56k Modem FCCID=H4TFM-PIB3PC" } ,
+ { 0x14F1, 0x1005, "", "HCF 56k Modem" } ,
+ { 0x14F1, 0x1006, "", "HCF 56k Modem" } ,
+ { 0x14F1, 0x1022, "", "HCF 56k Modem" } ,
+ { 0x14F1, 0x1023, "", "HCF 56k Modem" } ,
+ { 0x14F1, 0x1024, "", "HCF 56k Modem" } ,
+ { 0x14F1, 0x1025, "r6793-15", "HCF 56k Modem" } ,
+ { 0x14F1, 0x1026, "", "HCF 56k Modem" } ,
+ { 0x14F1, 0x1032, "", "HCF 56k Modem" } ,
+ { 0x14f1, 0x1033, "ce0682x", "56k Winmodem" } ,
+ { 0x14F1, 0x1034, "R6795-12", "Single Chip Controllerless V.90 56k" } ,
+ { 0x14f1, 0x1035, "R6795-11", "PCI Modem Enumerator" } ,
+ { 0x14f1, 0x1036, "R6795-11", "Communications Controller" } ,
+ { 0x14F1, 0x1052, "", "HCF 56k Data/Fax Modem (Worldwide)" } ,
+ { 0x14F1, 0x1053, "", "HCF 56k Data/Fax Modem (Worldwide)" } ,
+ { 0x14F1, 0x1054, "", "HCF 56k Data/Fax/Voice Modem (Worldwide)" } ,
+ { 0x14F1, 0x1055, "", "HCF 56k Data/Fax/Voice/Spkrphone Modem" } ,
+ { 0x14f1, 0x1056, "", "HCF 56k Data/Fax/Voice/Spkrphone Modem" } ,
+ { 0x14f1, 0x1057, "", "HCF 56k Data/Fax/Voice/Spkrphone Modem" } ,
+ { 0x14F1, 0x1058, "", "HCF P96 Data/Fax/Voice/Spkp Modem" } ,
+ { 0x14f1, 0x1059, "", "HCF 56k Data/Fax/Voice Modem (Worldwide)" } ,
+ { 0x14f1, 0x1063, "", "HCF 56k Data/Fax Modem" } ,
+ { 0x14f1, 0x1064, "", "HCF 56k Daat/Fax/Voice Modem" } ,
+ { 0x14f1, 0x1065, "", "HCF 56k Data/Fax/Voice/Spkrphone Modem" } ,
+ { 0x14f1, 0x1066, "", "HCF 56k Data/Fax/Voice/Spkrphone Modem" } ,
+ { 0x14F1, 0x1085, "CX11250", "SmartHSF Mobile Modem" } ,
+ { 0x14F1, 0x10B3, "", "HCF Data/Fax" } ,
+ { 0x14F1, 0x10B4, "", "HCF Data/Fax/Remote TAM" } ,
+ { 0x14F1, 0x10B5, "", "HCF Data/Fax/Voice/Speakerphone" } ,
+ { 0x14F1, 0x10B6, "", "HCF Data/Fax/Remote TAM/Speakerphone" } ,
+ { 0x14f1, 0x1433, "", "HCF 56k Data/Fax Modem" } ,
+ { 0x14f1, 0x1434, "", "HCF 56k Data/Fax/Voice Modem" } ,
+ { 0x14f1, 0x1435, "", "HCF 56k Data/Fax/Voice/Spkrphone Modem" } ,
+ { 0x14f1, 0x1436, "", "HCF 56k Data/Fax Modem" } ,
+ { 0x14f1, 0x1453, "", "HCf 56k Data/Fax Modem" } ,
+ { 0x14f1, 0x1454, "", "HCF 56k Data/Fax/Voice Modem" } ,
+ { 0x14f1, 0x1455, "", "HCf 56k Data/Fax/Voice/Spkrphone Modem" } ,
+ { 0x14f1, 0x1456, "", "HCF 56k Data/Fax/Voice/Spkrphone Modem" } ,
+ { 0x14F1, 0x1620, "P5100-xx", "ARM controller" } ,
+ { 0x14F1, 0x1621, "20463-xx", "HSF modem" } ,
+ { 0x14F1, 0x1622, "11627-xx", "ADSL modem" } ,
+ { 0x14F1, 0x1623, "", "HPNA 1" } ,
+ { 0x14F1, 0x1624, "", "Ethernet 10/100" } ,
+ { 0x14F1, 0x1625, "", "HomePNA2" } ,
+ { 0x14f1, 0x1803, "", "HCF 56k Modem" } ,
+ { 0x14f1, 0x1815, "", "HCF 56k Modem" } ,
+ { 0x14F1, 0x1F10, "", "HCF Data/Fax (USA)" } ,
+ { 0x14F1, 0x1F11, "", "HCF Data/Fax (Worldwide)" } ,
+ { 0x14F1, 0x1F14, "", "HCF Data/Fax/Voice (USA)" } ,
+ { 0x14F1, 0x1F15, "", "HCF Data/Fax/Voice (Worldwide)" } ,
+ { 0x14F1, 0x2003, "", "SoftK56 Winmodem" } ,
+ { 0x14F1, 0x2004, "", "SoftK56 RemoteTAM Winmodem" } ,
+ { 0x14F1, 0x2005, "", "SoftK56 Speakerphone Winmodem" } ,
+ { 0x14F1, 0x2006, "", "SoftK56 Speakerphone Winmodem" } ,
+ { 0x14F1, 0x2013, "8850155D", "SoftK56 Winmodem/HSF GENERIC" } ,
+ { 0x14f1, 0x2014, "r6793-15", "SoftK56 RemoteTAM Winmodem" } ,
+ { 0x14F1, 0x2015, "", "SoftK56 Speakerphone Winmodem" } ,
+ { 0x14F1, 0x2016, "", "HSF Data/Fax/TAM/Speakerphone" } ,
+ { 0x14f1, 0x2043, "1049144F", "HSF 56k Data/Fax Modem" } ,
+ { 0x14F1, 0x2044, "smarthsf+11242-11", "HSF 56k Data/Fax/Voice Modem" } ,
+ { 0x14F1, 0x2045, "11242-11", "SoftK56 Modem Controller" } ,
+ { 0x14F1, 0x2046, "1456VQH-R4", "HSF 56k Data/Fax/Voice/Spkrphone Modem" } ,
+ { 0x14F1, 0x2053, "", "HSF Data/Fax" } ,
+ { 0x14F1, 0x2054, "", "HSF Data/Fax/TAM" } ,
+ { 0x14F1, 0x2055, "", "HSF Data/Fax/Voice/Speakerphone" } ,
+ { 0x14F1, 0x2056, "", "HSF Data/Fax/TAM/Speakerphone" } ,
+ { 0x14F1, 0x2063, "", "HSF 56k Data/Fax Modem" } ,
+ { 0x14F1, 0x2064, "11242-11", "HSF 56k Data/Fax/Voice Modem" } ,
+ { 0x14F1, 0x2065, "", "HSF 56k Data/Fax/Voice/Spkrphone Modem" } ,
+ { 0x14F1, 0x2066, "", "HSF 56k Data/Fax/Voice/Spkrphone Modem" } ,
+ { 0x14F1, 0x2093, "", "HSF 56k Modem" } ,
+ { 0x14F1, 0x2143, "", "HSF 56k Data/Fax/Cell Modem" } ,
+ { 0x14F1, 0x2144, "", "HSF 56k Data/Fax/Voice/Cell Modem" } ,
+ { 0x14F1, 0x2145, "", "HSF 56k Data/Fax/Voice/Spkr/Cell Modem" } ,
+ { 0x14F1, 0x2146, "", "HSF 56k Data/Fax/Voice/Spkr/Cell Modem" } ,
+ { 0x14F1, 0x2163, "", "HSF 56k Data/Fax/Cell Modem" } ,
+ { 0x14F1, 0x2164, "", "HSF 56k Data/Fax/Voice/Cell Modem" } ,
+ { 0x14F1, 0x2165, "", "HSF 56k Data/Fax/Voice/Spkr/Cell Modem" } ,
+ { 0x14F1, 0x2166, "", "HSF 56k Data/Fax/Voice/Spkr/Cell Modem" } ,
+ { 0x14F1, 0x2343, "", "HSF 56k Data/Fax CardBus Modem" } ,
+ { 0x14F1, 0x2344, "", "HSF 56k Data/Fax/Voice CardBus Modem" } ,
+ { 0x14F1, 0x2345, "r6793-11", "HSF 56k Data/Fax/Voice/Sp CardBus Modem" } ,
+ { 0x14F1, 0x2346, "", "HSF 56k Data/Fax/Voice/Sp CardBus Modem" } ,
+ { 0x14F1, 0x2363, "", "HSF 56k Data/Fax CardBus Modem" } ,
+ { 0x14F1, 0x2364, "", "HSF 56k Data/Fax/Voice CardBus Modem" } ,
+ { 0x14F1, 0x2365, "", "HSF 56k Data/Fax/Voice/Sp CardBus Modem" } ,
+ { 0x14F1, 0x2366, "", "HSF 56k Data/Fax/Voice/Sp CardBus Modem" } ,
+ { 0x14f1, 0x2443, "E30965.1", "HSF 56k Data/Fax Modem" } ,
+ { 0x14F1, 0x2444, "", "HSF 56k Data/Fax/Voice Modem" } ,
+ { 0x14F1, 0x2445, "", "HSF 56k Data/Fax/Voice/Spkrphone Modem" } ,
+ { 0x14F1, 0x2446, "", "HSF 56k Data/Fax/Voice/Spkrphone Modem" } ,
+ { 0x14F1, 0x2463, "", "HSF 56k Data/Fax Modem" } ,
+ { 0x14F1, 0x2464, "", "HSF 56k Data/Fax/Voice Modem" } ,
+ { 0x14F1, 0x2465, "11242-11", "HSF 56k Data/Fax/Voice/Spkrphone Modem" } ,
+ { 0x14F1, 0x2466, "", "HSF 56k Data/Fax/Voice/Spkrphone Modem" } ,
+ { 0x14f1, 0x2F00, "cx11252-11", "HSF 56k HSFi" } ,
+ { 0x14f1, 0x2F10, "E124327.1", "USRobotics 56k Soft FCC PCI Faxmodem" } ,
+ { 0x14f1, 0x2F12, "", "HSF Data/Fax/Voice (USA)" } ,
+ { 0x14f1, 0x2F14, "", "56K PCI Software Modem" } ,
+ { 0x14F1, 0x8237, "CN8237", "ATM OC2 ServiceSAR+ controller" } ,
+ { 0x14F1, 0x8471, "CN8471A", "32-channel HDLC Controller" } ,
+ { 0x14F1, 0x8472, "CN8472A", "64-channel HDLC Controller" } ,
+ { 0x14F1, 0x8474, "CN8474A", "128-channel HDLC Controller" } ,
+ { 0x14F1, 0x8478, "CN8478", "256-channel HDLC Controller" } ,
+ { 0x14F1, 0x8502, "CX28500", "676-channel HDLC Controller" } ,
+ { 0x14F1, 0x8503, "CX28500", "1024-channel HDLC Controller" } ,
+ { 0x14F1, 0x8563, "CX28560", "2047-channel HDLC Controller" } ,
+ { 0x14F2, 0x0001, "", "Moselle Split Bridge" } ,
+ { 0x14F2, 0x0002, "", "Capilano Split Bridge" } ,
+ { 0x14F2, 0x0120, "", "Merlin Split Bridge" } ,
+ { 0x14F2, 0x0121, "", "PCI Parallel Port" } ,
+ { 0x14F2, 0x0122, "", "PCI Serial Port" } ,
+ { 0x14F2, 0x0123, "", "PCI PS/2 Keyboard Port" } ,
+ { 0x14F2, 0x0124, "", "PCI PS/2 Mouse Port" } ,
+ { 0x1500, 0x1300, "SIS900", "10/100M PCI Fast Ethernet Controller" } ,
+ { 0x1500, 0x1320, "VT86C100A", "10/100M PCI Fast Ethernet Controler" } ,
+ { 0x1500, 0x1360, "RTL8139A", "10/100 Mbps PCI Fast Ethernet Controller" } ,
+ { 0x1500, 0x1380, "DEC21143PD", "10/100M PCI Fast Ethernet Controller" } ,
+ { 0x1507, 0x0001, "MPC105 Eagle", "" } ,
+ { 0x1507, 0x0002, "MPC106 Grackle", "" } ,
+ { 0x1507, 0x0003, "MPC8240 Kahlua", "" } ,
+ { 0x1507, 0x0100, "MPC145575 HFC-PCI", "" } ,
+ { 0x1507, 0x0431, "KTI829c 100VG", "" } ,
+ { 0x1507, 0x4801, "Raven", "" } ,
+ { 0x1507, 0x4802, "Falcon", "" } ,
+ { 0x1507, 0x4803, "Hawk", "" } ,
+ { 0x1507, 0x4806, "CPX8216", "" } ,
+ { 0x1516, 0x0803, "803 series", "PCI Ethernet controller" } ,
+ { 0x151A, 0x1002, "PCI-1002", "" } ,
+ { 0x151A, 0x1004, "PCI-1004", "" } ,
+ { 0x151A, 0x1008, "PCI-1008", "" } ,
+ { 0x151c, 0x0002, "Xilinx PLD", "CardDeluxe Analog + Digital Audio" } ,
+ { 0x151f, 0x0000, "TP560i", "56K Data/Fax/Voice/Speaker Phone Modem" } ,
+ { 0x1522, 0x0100, "PBridge+", "PCI Interface Chip" } ,
+ { 0x153B, 0x6003, "CS4614/22/24", "CrystalClear SoundFusion PCI Audio Accel" } ,
+ { 0x1549, 0x80FF, "PCI-ISA-001", "PCI/ISA Bus Bridge" } ,
+ { 0x1555, 0x0002, "PLX PCI 9050", "Easylon PCI Bus Interface" } ,
+ { 0x1558, 0x1558, "", "" } ,
+ { 0x1562, 0x0001, "LA-41x3", "Spectrum24 Wireless LAN PCI Card" } ,
+ { 0x1571, 0xA001, "CCSI PCI20-485", "ARCnet" } ,
+ { 0x1571, 0xA002, "CCSI PCI20-485D", "ARCnet" } ,
+ { 0x1571, 0xA003, "CCSI PCI20-485X", "ARCnet" } ,
+ { 0x1571, 0xA004, "CCSI PCI20-CXB", "ARCnet" } ,
+ { 0x1571, 0xA005, "CCSI PCI20-CXS", "ARCnet" } ,
+ { 0x1571, 0xA006, "CCSI PCI20-FOG-SMA", "ARCnet" } ,
+ { 0x1571, 0xA007, "CCSI PCI20-FOG-ST", "ARCnet" } ,
+ { 0x1571, 0xA008, "CCSI PCI20-TB5", "ARCnet" } ,
+ { 0x1571, 0xA009, "CCSI PCI20-5-485", "5 Mbit ARCnet" } ,
+ { 0x1571, 0xA00A, "CCSI PCI20-5-485D", "5 Mbit ARCnet" } ,
+ { 0x1571, 0xA00B, "CCSI PCI20-5-485X", "5 Mbit ARCnet" } ,
+ { 0x1571, 0xA00C, "CCSI PIC20-5-FOG-ST", "5 Mbit ARCnet" } ,
+ { 0x1571, 0xA00D, "CCSI PCI20-5-FOG-SMA", "5 Mbit ARCnet" } ,
+ { 0x1571, 0xA201, "CCSI PCI22-485", "10 Mbit ARCnet" } ,
+ { 0x1571, 0xA202, "CCSI PCI22-485D", "10 Mbit ARCnet" } ,
+ { 0x1571, 0xA203, "CCSI PCI22-485X", "10 Mbit ARCnet" } ,
+ { 0x1571, 0xA204, "CCSI PCI22-CHB", "10 Mbit ARCnet" } ,
+ { 0x1571, 0xA205, "CCSI PCI22-FOG-ST", "10 Mbit ARCnet" } ,
+ { 0x1571, 0xA206, "CCSI PCI22-THB", "10 Mbit ARCnet" } ,
+ { 0x157C, 0x8001, "Fix2000", "PCI Y2K Compliance Card" } ,
+ { 0x1592, 0x0781, "", "Multi-IO Card" } ,
+ { 0x1592, 0x0782, "", "Dual Parallel Port Card (EPP)" } ,
+ { 0x1592, 0x0783, "TC32001 PCI I/O", "Multi-IO Card" } ,
+ { 0x1592, 0x0785, "", "Multi-IO Card" } ,
+ { 0x1592, 0x0786, "", "Multi-IO Card" } ,
+ { 0x1592, 0x0787, "winbond w83787if", "Multi-IO Card 2 series" } ,
+ { 0x1592, 0x0788, "", "Multi-IO Card" } ,
+ { 0x1592, 0x078A, "", "Multi-IO Card" } ,
+ { 0x15A2, 0x0001, "TA700", "PCI Bus Analyzer/Exerciser" } ,
+ { 0x15AD, 0x0710, "", "Virtual SVGA" } ,
+ { 0x15B0, 0x0001, "FM-1789", "Pctel" } ,
+ { 0x15B0, 0x2BD0, "2BD0", "HCF-PCI card" } ,
+ { 0x15B3, 0x5274, "MT21108", "InfiniBridge" } ,
+ { 0x15bc, 0x0100, "n2530a", "DX2 FC-AL Adapter" } ,
+ { 0x15BC, 0x0101, "n2530a", "DX2+ FC-AL Adapter" } ,
+ { 0x15bc, 0x2432, "N2530A", "Remote Management Card" } ,
+ { 0x15bc, 0x2530, "N2530A", "Agilent N2530A Service Processor" } ,
+ { 0x15bc, 0x2531, "Agilent N2530A etc.", "Remote Management Card" } ,
+ { 0x15bc, 0x2532, "N2530A", "Remote Management Card" } ,
+ { 0x15bc, 0x25A1, "N2530A", "Remote Management Card - BMC" } ,
+ { 0x15bc, 0x2922, "E2922A", "64 Bit, 133MHz PCI-X Exerciser/Observer" } ,
+ { 0x15bc, 0x2929, "E2929A", "64 Bit, 133MHz PCI-X Exerciser/Analyzer" } ,
+ { 0x15D1, 0x0001, "TC11IB", "TriCore 32-bit Single-chip Microctrlr" } ,
+ { 0x15d1, 0x0002, "PEB 20535 E v3.1", "4 Channel Serial Comm Controller (DSCC4)" } ,
+ { 0x15D1, 0x0003, "PEB 20544 E v1.1", "6 Port Optimized Comm Ctrlr (SPOCC)" } ,
+ { 0x15D1, 0x0004, "PEB 3454 E v1.1", "TE3-SPICCE 6 Port Integrated Comm Ctrlr" } ,
+ { 0x15D8, 0x9001, "", "" } ,
+ { 0x15DC, 0x0001, "Argus 300", "PCI Cryptography Module" } ,
+ { 0x15E2, 0x0500, "", "Internet PhoneJack PCI Card" } ,
+ { 0x15E8, 0x0130, "NCP130", "Wireless NIC" } ,
+ { 0x15E8, 0x0131, "Prism II", "InstantWave HR PCI card" } ,
+ { 0x15E9, 0x1841, "NetStaQ ADMA-100", "ATA controller" } ,
+ { 0x15F2, 0x0001, "Spot RT", "Spot RT Interface Board" } ,
+ { 0x15F2, 0x0002, "Spot RT #2", "Spot RT Interface Board" } ,
+ { 0x15F2, 0x0003, "Spot Insight", "Spot Insight Interface Board" } ,
+ { 0x1619, 0x0400, "FarSync T2P", "Two Port Intelligent Sync Comms Card" } ,
+ { 0x1619, 0x0440, "FarSync T4P", "Four Port Intelligent Sync Comms Card" } ,
+ { 0x1619, 0x0610, "FarSync T1U", "One Port Intelligent Sync Comms Card" } ,
+ { 0x1619, 0x0620, "FarSync T2U", "Two Port Intelligent Sync Comms Card" } ,
+ { 0x1619, 0x0640, "FarSync T4U", "Four Port Intelligent Sync Comms Card" } ,
+ { 0x1629, 0x1003, "", "Format Synchronizer v3.0" } ,
+ { 0x1629, 0x2002, "", "Fast Universal Data Output" } ,
+ { 0x162D, 0x0100, "", "Repeographics controller" } ,
+ { 0x162D, 0x0101, "", "Reprographics Controller" } ,
+ { 0x162D, 0x0102, "", "Reprographics Controller" } ,
+ { 0x162D, 0x0103, "", "Reprographics Controller" } ,
+ { 0x162F, 0x1111, "TS-PRL1", "General Purpose Relay Card" } ,
+ { 0x162F, 0x1112, "TS-PMA", "Matrix Card" } ,
+ { 0x1638, 0x1100, "WL11000P", "" } ,
+ { 0x163C, 0xFF02, "", "Aztech CNR V.92 Modem" } ,
+ { 0x165A, 0xC100, "PIXCI CL1", "PCI camera link video capture board" } ,
+ { 0x165A, 0xD200, "PIXCI D2X", "PCI digital video capture board" } ,
+ { 0x165A, 0xD300, "PIXCI D3X", "PCI digital video capture board" } ,
+ { 0x1668, 0x0100, "", "PCI to PCI Bridge" } ,
+ { 0x167F, 0x4634, "", "FOB-IO Card" } ,
+ { 0x167F, 0x4C32, "", "L2B PCI Board" } ,
+ { 0x167F, 0x5344, "", "FOB-SD Card" } ,
+ { 0x167F, 0x5443, "", "FOB-TDC Card" } ,
+ { 0x168C, 0x0007, "", "802.11a Wireless Adapter" } ,
+ { 0x1693, 0x0212, "PLX PCI9054", "EPONINE ESR-PCI Board" } ,
+ { 0x1693, 0x0213, "Motorola MPC8245", "EPONINE MTM120 PCI Board" } ,
+ { 0x16CA, 0x0001, "Rocket Drive", "Solid State Disk" } ,
+ { 0x173B, 0x03E8, "AC1000", "Gigabit Ethernet Adapter" } ,
+ { 0x1743, 0x8139, "ROL/F-100", "Fast Ethernet Adapter with ROL" } ,
+ { 0x17e9, 0x0001, "XLON PCI", "LonWorks Network Interface Card" } ,
+ { 0x1813, 0x4000, "MD5628D-L", "Modem" } ,
+ { 0x1813, 0x4100, "MD8820", "Modem" } ,
+ { 0x1888, 0x2503, "Bt881", "Video Capture (10 bit High qualtiy cap)" } ,
+ { 0x1888, 0x2504, "Bt878", "Video Capture" } ,
+ { 0x1888, 0x3503, "nVidia NV28", "VGA Geforce4 MX440" } ,
+ { 0x1888, 0x3505, "nVidia NV28", "VGA Geforce4 Ti4200" } ,
+ { 0X1898, 0X2001, "", "DVB Receiver Card" } ,
+ { 0x1A08, 0x0000, "SC15064", "" } ,
+ { 0x1C1C, 0x0001, "FR710", "EIDE Ctrlr" } ,
+ { 0x1C1C, 0x0001, "82C101", "IDE Ctrlr" } ,
+ { 0x1D44, 0xA400, "PM2x24/3224", "SCSI Adapter" } ,
+ { 0x1DE1, 0x0391, "TRM-S1040", "SCSI ASIC" } ,
+ { 0x1DE1, 0x2020, "DC-390", "SCSI Controller" } ,
+ { 0x1DE1, 0x690C, "DC-690C", "IDE Cache Controller" } ,
+ { 0x1DE1, 0xDC29, "DC290M", "Bus Master IDE PCI 2 controllers" } ,
+ { 0x1DE2, 0x1190, "001", "Slave PCI protyting board" } ,
+ { 0x1DEA, 0x0001, "701-1350", "Lasentec FBRM Counter" } ,
+ { 0x1DEA, 0x0002, "701-1429", "Lasentec PVM Controller" } ,
+ { 0x2002, 0x2003, "0x2003", "PCI Frame Grabber" } ,
+ { 0x2014, 0x0004, "aa551234", "PCI Master Target" } ,
+ { 0x2014, 0x0040, "0xff8000", "PCI to Private Bus Bridge for Primary Ra" } ,
+ { 0x2348, 0x2010, "8142", "100VG/AnyLAN" } ,
+ { 0x3388, 0x0020, "HB6", "UNIVERSAL PCI-PCI BRIDGE" } ,
+ { 0x3388, 0x0021, "HB1-SE33", "PCI-to-PCI Bridge" } ,
+ { 0x3388, 0x8011, "", "CPU to PCI Bridge" } ,
+ { 0x3388, 0x8012, "", "PCI to ISA Bridge" } ,
+ { 0x3388, 0x8013, "", "EIDE Controller" } ,
+ { 0x38D0, 0x62D6, "fieldbus-master", "PCI Measurement bus controller for EPSI" } ,
+ { 0x3D3D, 0x0001, "GLint 300SX", "3D Accelerator" } ,
+ { 0x3D3D, 0x0002, "GLint 500TX", "Sapphire 3D Accelerator" } ,
+ { 0x3D3D, 0x0003, "GLint", "Delta Geometry processor" } ,
+ { 0x3D3D, 0x0004, "3C0SX", "2D+3D Accelerator" } ,
+ { 0x3D3D, 0x0005, "Permedia", "2D+3D Accelerator" } ,
+ { 0x3D3D, 0x0006, "GLint MX", "3D Accelerator" } ,
+ { 0x3D3D, 0x0007, "3D Extreme", "Permedia II 2D+3D Accelerator" } ,
+ { 0x3D3D, 0x0008, "GLint Gamma G1", "" } ,
+ { 0x3D3D, 0x0009, "Permedia2v", "2d+3d chipset, integrated ramdac" } ,
+ { 0x3D3D, 0x000A, "Permedia 3", "" } ,
+ { 0x3D3D, 0x000C, "Permedia 3", "" } ,
+ { 0x3D3D, 0x000D, "GLINT R4", "3D Accelerator" } ,
+ { 0x3D3D, 0x000E, "GLINT Gamma G2", "" } ,
+ { 0x3D3D, 0x0100, "Permedia II", "2D+3D Accelerator" } ,
+ { 0x3d3d, 0x07A0, "Wildcat 4xxx", "Wildcat 4xxx series" } ,
+ { 0x3d3d, 0x07A1, "Wildcat 5xxx", "Wildcat 5xxx series" } ,
+ { 0x3D3D, 0x1004, "Permedia", "3D+3D Accelerator" } ,
+ { 0x3d3d, 0x1040, "Wildcat III 6110", "Wildcat III 6110" } ,
+ { 0x3d3d, 0x1041, "Wildcat III 6210", "Wildcat III 6210" } ,
+ { 0x3D3D, 0x3D04, "Permedia", "2D+3D Accelerator" } ,
+ { 0x3d3d, 0x3d07, "Permedia IIv", "Permedia IIv" } ,
+ { 0x3D3D, 0xFFFF, "GLint VGA", "" } ,
+ { 0x4005, 0x0300, "ALS300", "PCI Audio Device" } ,
+ { 0x4005, 0x0308, "ALS300+", "PCI Audio Device" } ,
+ { 0x4005, 0x0309, "ALS300+", "PCI Input Controller" } ,
+ { 0x4005, 0x1064, "ALG2064", "GUI Accelerator" } ,
+ { 0x4005, 0x2064, "<DELETE>", "GUI Accelerator" } ,
+ { 0x4005, 0x2128, "ALG2364A", "GUI Accelerator" } ,
+ { 0x4005, 0x2301, "ALG2301", "GUI Accelerator" } ,
+ { 0x4005, 0x2302, "ALG2302", "GUI Accelerator" } ,
+ { 0x4005, 0x2303, "AVG2302", "GUI Accelerator" } ,
+ { 0x4005, 0x2364, "ALG2364", "GUI Accelerator" } ,
+ { 0x4005, 0x2464, "ALG2464", "GUI Accelerator" } ,
+ { 0x4005, 0x2501, "ALG2564A/25128A", "GUI Accelerator" } ,
+ { 0x4005, 0x4000, "ALS4000", "Audio Chipset" } ,
+ { 0x4033, 0x1300, "SIS900", "10/100Mbps Fast Ethernet Controller" } ,
+ { 0x4033, 0x1320, "VT86C100A", "10/100M PCI Fast Ethernet Controller" } ,
+ { 0x4033, 0x1360, "RTL8139A", "10/100 Mbps PCI Fast Ethernet Controller" } ,
+ { 0x4033, 0x1380, "DEC 21143PD", "10/100M PCI Fast Ethernet Controller" } ,
+ { 0x4144, 0x0043, "ADM-XPL", "Virtex-II Pro Bridge" } ,
+ { 0x416C, 0x0100, "AlladinCARD", "" } ,
+ { 0x416C, 0x0200, "CPC", "" } ,
+ { 0x4444, 0x0002, "iTVC12", "MPEG Encoder Card" } ,
+ { 0x4444, 0x0803, "iTVC15", "MPEG Coder" } ,
+ { 0x4550, 0x9054, "PLX9054", "" } ,
+ { 0x494F, 0x22C0, "WDT500", "Watchdog" } ,
+ { 0x494F, 0xACA8, "PCI-AI/1216", "ADC Card" } ,
+ { 0x494F, 0xACA9, "PCI-AI/1216(M)", "ADC Card" } ,
+ { 0x4A14, 0x5000, "NV5000", "RPTI RT8029-based Ethernet Adapter" } ,
+ { 0x4B10, 0x3080, "", "SCSI Host Adapter" } ,
+ { 0x4B10, 0x4010, "", "Fast/wide SCSI-2" } ,
+ { 0x4C53, 0x0000, "PLUSTEST", "Diagnostics Device" } ,
+ { 0x4D51, 0x0200, "MQ-200", "" } ,
+ { 0x5046, 0x1001, "", "Radio FM" } ,
+ { 0x5053, 0x2010, "", "Daytona Audio Adapter" } ,
+ { 0x5112, 0x0001, "DCP401", "Intelligent Dias Master" } ,
+ { 0x5145, 0x3031, "Concert", "AudioPCI" } ,
+ { 0x5301, 0x0001, "ProMotion aT3D", "" } ,
+ { 0x5333, 0x0551, "86C551", "Plato/PX" } ,
+ { 0x5333, 0x5631, "86C325", "Virge 3D GUI Accelerator" } ,
+ { 0x5333, 0x8800, "", "Vision 866 GUI Accelerator" } ,
+ { 0x5333, 0x8801, "", "Vision 964 GUI Accelerator" } ,
+ { 0x5333, 0x8810, "86C732", "Trio 32 GUI Accelerator rev. 0" } ,
+ { 0x5333, 0x8811, "86C764/765", "Trio 64/64V+ GUI Accelerator" } ,
+ { 0x5333, 0x8812, "86CM65?", "Aurora 64V+" } ,
+ { 0x5333, 0x8813, "86C764", "Trio 32/64 GUI Accelerator v3" } ,
+ { 0x5333, 0x8814, "86C767", "Trio 64UV+ GUI Accelerator" } ,
+ { 0x5333, 0x8815, "86CM66", "Aurora128" } ,
+ { 0x5333, 0x883D, "86C988", "ViRGE/VX 3D GUI Accelerator" } ,
+ { 0x5333, 0x8870, "Fire GL", "" } ,
+ { 0x5333, 0x8880, "86C868", "Vision 868 GUI Accelerator VRAM rev. 0" } ,
+ { 0x5333, 0x8881, "86C868", "Vision 868 GUI Accelerator VRAM rev. 1" } ,
+ { 0x5333, 0x8882, "86C868", "Vision 868 GUI Accelerator VRAM rev. 2" } ,
+ { 0x5333, 0x8883, "86C868", "Vision 868 GUI Accelerator VRAM rev. 3" } ,
+ { 0x5333, 0x88B0, "86C928", "Vision 928 GUI Accelerator VRAM rev. 0" } ,
+ { 0x5333, 0x88B1, "86C928", "Vision 928 GUI Accelerator VRAM rev. 1" } ,
+ { 0x5333, 0x88B2, "86C928", "Vision 928 GUI Accelerator VRAM rev. 2" } ,
+ { 0x5333, 0x88B3, "86C928", "Vision 928 GUI Accelerator VRAM rev. 3" } ,
+ { 0x5333, 0x88C0, "86C864", "Vision 864 GUI Accelerator DRAM rev. 0" } ,
+ { 0x5333, 0x88C1, "86C864", "Vision 864 GUI Accelerator DRAM rev. 1" } ,
+ { 0x5333, 0x88C2, "86C864", "Vision 864 GUI Accelerator DRAM rev. 2" } ,
+ { 0x5333, 0x88C3, "86C864", "Vision 864 GUI Accelerator DRAM rev. 3" } ,
+ { 0x5333, 0x88D0, "86C964", "Vision 964 GUI Accelerator VRAM rev. 0" } ,
+ { 0x5333, 0x88D1, "86C964", "Vision 964-P GUI Accelerator VRAM rev. 1" } ,
+ { 0x5333, 0x88D2, "86C964", "Vision 964-P GUI Accelerator DRAM rev 2" } ,
+ { 0x5333, 0x88D3, "86C964", "Vision 964-P GUI Accelerator VRAM rev. 3" } ,
+ { 0x5333, 0x88F0, "86C968", "Vision 968 GUI Accelerator VRAM rev. 0" } ,
+ { 0x5333, 0x88F1, "86C968", "Vision 968 GUI Accelerator VRAM rev. 1" } ,
+ { 0x5333, 0x88F2, "86C968", "Vision 968 GUI Accelerator VRAM rev. 2" } ,
+ { 0x5333, 0x88F3, "86C968", "Vision 968 GUI Accelerator VRAM rev. 3" } ,
+ { 0x5333, 0x8900, "86C775", "Trio64V2/DX" } ,
+ { 0x5333, 0x8901, "86C775/86C785", "Trio 64V2 DX/GX" } ,
+ { 0x5333, 0x8902, "86C551", "SMA Family" } ,
+ { 0x5333, 0x8903, "", "TrioV Family" } ,
+ { 0x5333, 0x8904, "86C365/366", "Trio3D" } ,
+ { 0x5333, 0x8905, "", "86C765 Trio64V+ compatible" } ,
+ { 0x5333, 0x8906, "", "86C765 Trio64V+ compatible" } ,
+ { 0x5333, 0x8907, "", "86C765 Trio64V+ compatible" } ,
+ { 0x5333, 0x8908, "", "86C765 Trio64V+ compatible" } ,
+ { 0x5333, 0x8909, "", "86C765 Trio64V+ compatible" } ,
+ { 0x5333, 0x890A, "", "86C765 Trio64V+ compatible" } ,
+ { 0x5333, 0x890B, "", "86C765 Trio64V+ compatible" } ,
+ { 0x5333, 0x890C, "", "86C765 Trio64V+ compatible" } ,
+ { 0x5333, 0x890D, "", "86C765 Trio64V+ compatible" } ,
+ { 0x5333, 0x890E, "", "86C765 Trio64V+ compatible" } ,
+ { 0x5333, 0x890F, "", "86C765 Trio64V+ compatible" } ,
+ { 0x5333, 0x8A01, "86C375/86C385", "ViRGE /DX & /GX" } ,
+ { 0x5333, 0x8A10, "86C357/86C359", "ViRGE /GX2 & /GX2+" } ,
+ { 0x5333, 0x8A11, "86C359", "ViRGE /GX2+ Macrovision" } ,
+ { 0x5333, 0x8A12, "86C359", "ViRGE /GX2+" } ,
+ { 0x5333, 0x8A13, "86C362/86C368", "Trio3D2x & Trio3D2x+ AGP" } ,
+ { 0x5333, 0x8A20, "86C390/391", "Savage3D" } ,
+ { 0x5333, 0x8A21, "86C390", "Savage3D/MV" } ,
+ { 0x5333, 0x8A22, "86C394-397", "Savage 4" } ,
+ { 0x5333, 0x8A23, "86C394-397", "Savage 4" } ,
+ { 0x5333, 0x8A25, "86C370", "Savage4" } ,
+ { 0x5333, 0x8A26, "86C395B", "ProSavage" } ,
+ { 0x5333, 0x8C00, "85C260", "ViRGE/M3 (ViRGE/MX)" } ,
+ { 0x5333, 0x8C01, "86C260", "ViRGE/M5 (ViRGE/MX)" } ,
+ { 0x5333, 0x8C02, "86C240", "ViRGE/MXC" } ,
+ { 0x5333, 0x8C03, "86C280", "ViRGE /MX+ Macrovision" } ,
+ { 0x5333, 0x8C10, "86C270/274/290/294", "Savage MX/IX/MX+MV/IX+MV" } ,
+ { 0x5333, 0x8C12, "86C270/274/290/294", "Savage MX/IX/MX+MV/IX+MV" } ,
+ { 0x5333, 0x8C22, "86C508", "SuperSavage 128/MX" } ,
+ { 0x5333, 0x8C2A, "86C544", "SuperSavage 128/IX" } ,
+ { 0x5333, 0x8C2B, "86C553", "SuperSavage 128/IX DDR" } ,
+ { 0x5333, 0x8C2C, "86C564", "SuperSavage/IX" } ,
+ { 0x5333, 0x8C2D, "86C573", "SuperSavage/IX DDR" } ,
+ { 0x5333, 0x8C2E, "86C584", "SuperSavage/IXC SDRAM" } ,
+ { 0x5333, 0x8C2F, "86C594", "SuperSavage/IXC DDR" } ,
+ { 0x5333, 0x8D01, "Twister", "" } ,
+ { 0x5333, 0x8D02, "Twister-K", "" } ,
+ { 0x5333, 0x8D04, "P4M266", "ProSavage DDR" } ,
+ { 0x5333, 0x9102, "86C410", "Savage 2000" } ,
+ { 0x5333, 0xCA00, "86C617", "SonicVibes PCI Audio Accelerator" } ,
+ { 0x5356, 0x4002, "", "ULTRA24 SCSI Host" } ,
+ { 0x5356, 0x4102, "", "ULTRA24 SCSI Host" } ,
+ { 0x5356, 0x4202, "", "ULTRA24 SCSI Host" } ,
+ { 0x5356, 0x4302, "", "ULTRA24 SCSI Host" } ,
+ { 0x5356, 0x4402, "", "ULTRA24 SCSI Host" } ,
+ { 0x5356, 0x4502, "", "ULTRA24 SCSI Host" } ,
+ { 0x5356, 0x4602, "", "ULTRA24 SCSI Host" } ,
+ { 0x5356, 0x4702, "", "ULTRA24 SCSI Host" } ,
+ { 0x5356, 0x4802, "", "ULTRA24 SCSI Host" } ,
+ { 0x5356, 0x4902, "", "ULTRA24 SCSI Host" } ,
+ { 0x5356, 0x4A02, "", "ULTRA24 SCSI Host" } ,
+ { 0x5356, 0x4B02, "", "ULTRA24 SCSI Host" } ,
+ { 0x5356, 0x4C02, "", "ULTRA24 SCSI Host" } ,
+ { 0x5356, 0x4D02, "", "ULTRA24 SCSI Host" } ,
+ { 0x5356, 0x4E02, "", "ULTRA24 SCSI Host" } ,
+ { 0x5356, 0x4F02, "", "ULTRA24 SCSI Host" } ,
+ { 0x5401, 0x0101, "DSSS", "Wireless LAN PCI Card" } ,
+ { 0x5430, 0x0100, "AcceleraPCI", "Upgrade Card Adapter" } ,
+ { 0x5455, 0x4458, "S5933", "PCI-MyBus-Bridge" } ,
+ { 0x5544, 0x0001, "I-30xx", "Scanner Interface" } ,
+ { 0x5555, 0x0003, "", "TURBOstor HFP-832 HiPPI NIC" } ,
+ { 0x55cF, 0x20D1, "", "UNISYS DCHA5" } ,
+ { 0x55CF, 0x2111, "", "UNISYS CP150P" } ,
+ { 0x6356, 0x4002, "", "ULTRA24 SCSI Host" } ,
+ { 0x6356, 0x4102, "", "ULTRA24 SCSI Host" } ,
+ { 0x6356, 0x4202, "", "ULTRA24 SCSI Host" } ,
+ { 0x6356, 0x4302, "", "ULTRA24 SCSI Host" } ,
+ { 0x6356, 0x4402, "", "ULTRA24 SCSI Host" } ,
+ { 0x6356, 0x4502, "", "ULTRA24 SCSI Host" } ,
+ { 0x6356, 0x4602, "", "ULTRA24 SCSI Host" } ,
+ { 0x6356, 0x4702, "", "ULTRA24 SCSI Host" } ,
+ { 0x6356, 0x4802, "", "ULTRA24 SCSI Host" } ,
+ { 0x6356, 0x4902, "", "ULTRA24 SCSI Host" } ,
+ { 0x6356, 0x4A02, "", "ULTRA24 SCSI Host" } ,
+ { 0x6356, 0x4B02, "", "ULTRA24 SCSI Host" } ,
+ { 0x6356, 0x4C02, "", "ULTRA24 SCSI Host" } ,
+ { 0x6356, 0x4D02, "", "ULTRA24 SCSI Host" } ,
+ { 0x6356, 0x4E02, "", "ULTRA24 SCSI Host" } ,
+ { 0x6356, 0x4F02, "", "ULTRA24 SCSI Host" } ,
+ { 0x6374, 0x6773, "GPPCI", "PCI Interface" } ,
+ { 0x6666, 0x0001, "", "PCCOM4" } ,
+ { 0x6666, 0x0002, "", "PCCOM8" } ,
+ { 0x8001, 0x0010, "ispLSI1032E", "PCI-decoder" } ,
+ { 0x8008, 0x0010, "PWDOG1/2", "PCI-Watchdog 1" } ,
+ { 0x8008, 0x0011, "PWDOG1/2", "Watchdog2/PCI" } ,
+ { 0x8008, 0x0016, "PROTO2", "" } ,
+ { 0x8008, 0x0100, "PREL8", "" } ,
+ { 0x8008, 0x0102, "PREL16", "" } ,
+ { 0x8008, 0x0103, "POPTOREL16", "" } ,
+ { 0x8008, 0x0105, "POPTO16IN", "" } ,
+ { 0x8008, 0x0106, "PTTL24IO", "" } ,
+ { 0x8008, 0x0107, "PUNIREL", "" } ,
+ { 0x8008, 0x1000, "PDAC4", "" } ,
+ { 0x8008, 0x1001, "PAD12DAC4", "" } ,
+ { 0x8008, 0x1002, "PAD16DAC4", "" } ,
+ { 0x8008, 0x1005, "PAD12", "" } ,
+ { 0x8008, 0x1006, "PAD16", "" } ,
+ { 0x8008, 0x3000, "POPTOLCA", "" } ,
+ { 0x801F, 0x0020, "", "" } ,
+ { 0x801F, 0x0040, "", "" } ,
+ { 0x8086, 0x0008, "", "Extended Express System Support Ctrlr" } ,
+ { 0x8086, 0x0309, "80303", "I/O Processor PCI-to-PCI Bridge Unit" } ,
+ { 0x8086, 0x030D, "80312", "I/O Companion Unit PCI-to-PCI Bridge" } ,
+ { 0x8086, 0x0482, "82375EB", "PCI-EISA Bridge (PCEB)" } ,
+ { 0x8086, 0x0483, "82424TX/ZX", "CPU (i486) Bridge (Saturn)" } ,
+ { 0x8086, 0x0484, "82378ZB/IB", "SIO ISA Bridge" } ,
+ { 0x8086, 0x0486, "82425EX", "PCI System Controller (PSC) for i486 (Aries)" } ,
+ { 0x8086, 0x04A3, "82434LX", "CPU (Pentium) Bridge (Mercury)" } ,
+ { 0x8086, 0x0500, "E8870", "Processor Bus Controller" } ,
+ { 0x8086, 0x0501, "E8870", "Memory Controller" } ,
+ { 0x8086, 0x0502, "E8870", "Scalability Port 0" } ,
+ { 0x8086, 0x0503, "E8870", "Scalability Port 1 / Glob. Perf. Monitor" } ,
+ { 0x8086, 0x0510, "E8870IO", "Hub Interface Port 0 (8-bit compatible)" } ,
+ { 0x8086, 0x0511, "E8870IO", "Hub Interface Port 1" } ,
+ { 0x8086, 0x0512, "E8870IO", "Hub Interface Port 2" } ,
+ { 0x8086, 0x0513, "E8870IO", "Hub Interface Port 3" } ,
+ { 0x8086, 0x0514, "E8870IO", "Hub Interface Port 4" } ,
+ { 0x8086, 0x0515, "E8870IO", "Server I/O Hub (SIOH)" } ,
+ { 0x8086, 0x0516, "E8870IO", "Reliabilty, Availability, Serviceability" } ,
+ { 0x8086, 0x0530, "E8870SP", "Scalability Port" } ,
+ { 0x8086, 0x0531, "E8870SP", "Scalability Port" } ,
+ { 0x8086, 0x0532, "E8870SP", "Scalability Port" } ,
+ { 0x8086, 0x0533, "E8870SP", "Scalability Port" } ,
+ { 0x8086, 0x0534, "E8870SP", "Scalability Port" } ,
+ { 0x8086, 0x0535, "E8870SP", "Scalability Port" } ,
+ { 0x8086, 0x0536, "E8870SP", "Scalability Port Switch Global Registers" } ,
+ { 0x8086, 0x0537, "E8870SP", "Interleave Configuration Registers" } ,
+ { 0x8086, 0x0600, "", "Storage RAID Controller" } ,
+ { 0x8086, 0x0960, "80960RP", "i960 RP Microprocessor/Bridge" } ,
+ { 0x8086, 0x0962, "80960RM/RN", "i960RM/RN Microprocessor/Bridge" } ,
+ { 0x8086, 0x0964, "80960RP", "i960 RP Microprocessor Bridge" } ,
+ { 0x8086, 0x1000, "82542", "Gigabit Ethernet Controller" } ,
+ { 0x8086, 0x1001, "82543GC", "10/100/1000 Ethernet Controller" } ,
+ { 0x8086, 0x1002, "", "Pro 100 LAN+Modem 56 CardBus II" } ,
+ { 0x8086, 0x1004, "82543GC", "Gigabit Ethernet Controller" } ,
+ { 0x8086, 0x1008, "82544EI/GC", "Gigabit Ethernet Controller (Copper)" } ,
+ { 0x8086, 0x1009, "82544EI", "Gigabit Ethernet Controller" } ,
+ { 0x8086, 0x100C, "82544 T", "Gigabit Ethernet Controller" } ,
+ { 0x8086, 0x100D, "82544GC", "Gigabit Ethernet Controller" } ,
+ { 0x8086, 0x100E, "82544XT", "Gigabit Ethernet Controller" } ,
+ { 0x8086, 0x100F, "82545EM", "Gigabit Ethernet Controller (copper)" } ,
+ { 0x8086, 0x1010, "82546EB", "Gigabit Ethernet Controller (copper)" } ,
+ { 0x8086, 0x1011, "82545EM", "Gigabit Ethernet Controller (fiber)" } ,
+ { 0x8086, 0x1012, "82546EB", "Gigabit Ethernet Controller (fiber)" } ,
+ { 0x8086, 0x1015, "82540EM", "PRO/1000 MT Mobile Connection" } ,
+ { 0x8086, 0x1029, "82559", "Fast Ethernet PCI/CardBus Controller" } ,
+ { 0x8086, 0x1030, "82559", "PCI Networking device" } ,
+ { 0x8086, 0x1031, "82801CAM", "PRO/100 VE Network Connection" } ,
+ { 0x8086, 0x1032, "", "PRO/100 VE Network Connection" } ,
+ { 0x8086, 0x1033, "", "PRO/100 VM Network Connection" } ,
+ { 0x8086, 0x1034, "", "PRO/100 VM Network Connection" } ,
+ { 0x8086, 0x1035, "82562EH", "Phoneline Network Connection" } ,
+ { 0x8086, 0x1036, "82562EH", "Phoneline Network Connection" } ,
+ { 0x8086, 0x1038, "82559 PRO/100 VM", "Networking device" } ,
+ { 0x8086, 0x1039, "82801DB", "LAN Controller with 82562ET/EZ PHY" } ,
+ { 0x8086, 0x103A, "82801DB", "LAN Controller with 82562ET/EZ (CNR) PHY" } ,
+ { 0x8086, 0x103B, "82801DB", "LAN Controller with 82562EM/EX PHY" } ,
+ { 0x8086, 0x103C, "82801DB", "LAN Controller with 82562EM/EX (CNR) PHY" } ,
+ { 0x8086, 0x103D, "82801DB", "PRO/100 VE Network Connection" } ,
+ { 0x8086, 0x103E, "82801DB", "PRO/100 VM Network Connection" } ,
+ { 0x8086, 0x1040, "536EP", "V.92 PCI (DSP) Data Fax Modem" } ,
+ { 0x8086, 0x1042, "", "PRO/Wireless 2011 LAN PCI Card" } ,
+ { 0x8086, 0x1059, "82551QM", "PRO/100 M Mobile Connection" } ,
+ { 0x8086, 0x1100, "82815", "Host-Hub Interface Bridge / DRAM Ctrlr" } ,
+ { 0x8086, 0x1101, "82815", "AGP Bridge" } ,
+ { 0x8086, 0x1102, "82815", "Internal Graphics Device" } ,
+ { 0x8086, 0x1110, "82815", "Host-Hub Interface Bridge / DRAM Ctrlr" } ,
+ { 0x8086, 0x1112, "82815", "Internal Graphics Device" } ,
+ { 0x8086, 0x1120, "82815", "Host-Hub Interface Bridge / DRAM Ctrlr" } ,
+ { 0x8086, 0x1121, "82815", "AGP Bridge" } ,
+ { 0x8086, 0x1130, "82815/82815EM/EP", "Host-Hub Interface Bridge / DRAM Ctrlr" } ,
+ { 0x8086, 0x1131, "82815/82815EM/EP", "AGP Bridge" } ,
+ { 0x8086, 0x1132, "82815", "Internal Graphics Device" } ,
+ { 0x8086, 0x1161, "82806AA", "I/O APIC Device" } ,
+ { 0x8086, 0x1162, "BECC", "XScale 80200 Companion Chip (FPGA)" } ,
+ { 0x8086, 0x1209, "82559ER", "Ethernet Controller" } ,
+ { 0x8086, 0x1221, "82092AA", "PCMCIA Bridge" } ,
+ { 0x8086, 0x1222, "82092AA", "IDE Ctrlr" } ,
+ { 0x8086, 0x1223, "SAA7116", "Video Controller" } ,
+ { 0x8086, 0x1225, "82452KX/GX", "Orion Extended Express CPU to PCI Bridge" } ,
+ { 0x8086, 0x1226, "82596", "EtherExpress PRO/10" } ,
+ { 0x8086, 0x1227, "82865", "EtherExpress PRO100" } ,
+ { 0x8086, 0x1228, "EE PRO/100 Smart", "Intelligent 10/100 Fast Ethernet Adapter" } ,
+ { 0x8086, 0x1229, "82557/8/9/0/1", "Fast Ethernet LAN Controller" } ,
+ { 0x8086, 0x122D, "82437FX", "System Controller (TSC)" } ,
+ { 0x8086, 0x122E, "82371FB", "PCI to ISA Bridge (Triton)" } ,
+ { 0x8086, 0x1230, "82371FB", "IDE Interface (Triton)" } ,
+ { 0x8086, 0x1231, "", "DSVD Modem" } ,
+ { 0x8086, 0x1234, "82371MX", "Mobile PCI I/O IDE Xcelerator (MPIIX)" } ,
+ { 0x8086, 0x1235, "82437MX", "Mobile System Controller (MTSC)" } ,
+ { 0x8086, 0x1237, "82441FX", "PCI & Memory Controller (PMC)" } ,
+ { 0x8086, 0x1239, "82371FB", "IDE Interface (Triton)" } ,
+ { 0x8086, 0x123B, "82380PB", "PCI to PCI Docking Bridge" } ,
+ { 0x8086, 0x123C, "82380AB", "Mobile PCI-to-ISA Bridge (MISA)" } ,
+ { 0x8086, 0x123D, "683053", "Programmable Interrupt Device" } ,
+ { 0x8086, 0x123E, "82466GX", "Integrated Hot-Plug Controller (IHPC)" } ,
+ { 0x8086, 0x123F, "82466GX", "Integrated Hot-Plug Controller (IHPC)" } ,
+ { 0x8086, 0x1240, "82752", "AGP Graphics Accelerator" } ,
+ { 0x8086, 0x124B, "82380FB", "Mobile PCI-to-PCI Bridge (MPCI2)" } ,
+ { 0x8086, 0x1250, "82439HX", "System Controller (TXC)" } ,
+ { 0x8086, 0x1360, "82806AA", "Hub Interface to PCI Bridge" } ,
+ { 0x8086, 0x1361, "82806AA", "Advanced Interrupt Controller" } ,
+ { 0x8086, 0x1460, "82870P2", "Hub Interface-to-PCI Bridge" } ,
+ { 0x8086, 0x1461, "82870P2", "I/OxAPIC Interrupt Controller" } ,
+ { 0x8086, 0x1462, "82870P2", "Hot Plug Controller" } ,
+ { 0x8086, 0x1960, "80960RP", "i960RP Microprocessor" } ,
+ { 0x8086, 0x1A20, "82840", "" } ,
+ { 0x8086, 0x1A21, "82840", "Host-Hub Interface A Bridge / DRAM Ctrlr" } ,
+ { 0x8086, 0x1A22, "82840", "Host to I/O Hub Bridge (Quad PCI)" } ,
+ { 0x8086, 0x1A23, "82840", "AGP Bridge" } ,
+ { 0x8086, 0x1A24, "82840", "Hub Interface B Bridge" } ,
+ { 0x8086, 0x1A30, "82845[E/MP/MZ]", "Host-Hub Interface Bridge" } ,
+ { 0x8086, 0x1A31, "82845[MP/MZ]", "AGP Bridge" } ,
+ { 0x8086, 0x2125, "82801AB", "AC97 Audio Controller" } ,
+ { 0x8086, 0x2410, "82801AA", "LPC Interface" } ,
+ { 0x8086, 0x2411, "82801AA", "IDE Controller (UltraATA/66)" } ,
+ { 0x8086, 0x2412, "82801AA", "USB Controller" } ,
+ { 0x8086, 0x2413, "82801AA", "SMBus Controller" } ,
+ { 0x8086, 0x2415, "82801AA", "AC97 Audio Controller" } ,
+ { 0x8086, 0x2416, "82801AA", "AC97 Modem Controller" } ,
+ { 0x8086, 0x2418, "82801AA", "Hub Interface-to-PCI Bridge" } ,
+ { 0x8086, 0x2420, "82801AB", "LPC Interface" } ,
+ { 0x8086, 0x2421, "82801AB", "IDE Controller (UltraATA/33)" } ,
+ { 0x8086, 0x2422, "82801AB", "USB Controller" } ,
+ { 0x8086, 0x2423, "82801AB", "SMBus Controller" } ,
+ { 0x8086, 0x2425, "82801AB", "AC97 Audio Controller" } ,
+ { 0x8086, 0x2426, "82801AB", "AC97 Modem Controller" } ,
+ { 0x8086, 0x2428, "82801AB", "Hub Interface-to-PCI Bridge" } ,
+ { 0x8086, 0x2440, "82801BA", "LPC Interface Bridge, ICH2" } ,
+ { 0x8086, 0x2441, "82801BA", "IDE Controller (UltraATA/66)" } ,
+ { 0x8086, 0x2442, "82801BA/BAM", "USB Controller, USB-A" } ,
+ { 0x8086, 0x2443, "82801BA/BAM", "SMBus Controller" } ,
+ { 0x8086, 0x2444, "82801BA/BAM", "USB Controller, USB-B" } ,
+ { 0x8086, 0x2445, "82801BA/BAM", "Avance AC97 Audio Controller" } ,
+ { 0x8086, 0x2446, "82801BA/BAM", "AC97 Modem Controller" } ,
+ { 0x8086, 0x2448, "82801BAM/CAM/DBM", "Hub Interface to PCI Bridge" } ,
+ { 0x8086, 0x2449, "82801BA/BAM/CA", "LAN Controller" } ,
+ { 0x8086, 0x244A, "82801BAM", "IDE Controller" } ,
+ { 0x8086, 0x244B, "82801BA", "IDE Controller" } ,
+ { 0x8086, 0x244C, "82801BAM", "LPC Interface Bridge" } ,
+ { 0x8086, 0x244E, "82801BA/CA/DB", "Hub Interface to PCI Bridge" } ,
+ { 0x8086, 0x2450, "82801E", "LPC Interface Bridge" } ,
+ { 0x8086, 0x2452, "82801E", "USB Controller" } ,
+ { 0x8086, 0x2453, "82801E", "SMBus Controller" } ,
+ { 0x8086, 0x2459, "82801E", "LAN0 Controller" } ,
+ { 0x8086, 0x245B, "82801E", "IDE Controller" } ,
+ { 0x8086, 0x245D, "82801E", "LAN1 Controller" } ,
+ { 0x8086, 0x245E, "82801E", "Hub Interface to PCI Bridge" } ,
+ { 0x8086, 0x2480, "82801CA", "LPC Interface Bridge" } ,
+ { 0x8086, 0x2481, "82801CA", "IDE Controller (UltraATA/66)" } ,
+ { 0x8086, 0x2482, "82801CA/CAM", "USB Controller" } ,
+ { 0x8086, 0x2483, "82801CA/CAM", "SMBus Controller" } ,
+ { 0x8086, 0x2484, "82801CA/CAM", "USB Controller" } ,
+ { 0x8086, 0x2485, "82801CA/CAM", "AC97 Audio Controller" } ,
+ { 0x8086, 0x2486, "82801CA/CAM", "AC 97 Modem Controller" } ,
+ { 0x8086, 0x2487, "82801CA/CAM", "USB Controller" } ,
+ { 0x8086, 0x248A, "82801CAM", "UltraATA IDE Controller" } ,
+ { 0x8086, 0x248B, "82801CA", "UltraATA/100 IDE Controller" } ,
+ { 0x8086, 0x248C, "82801CAM", "LPC Interface or ISA bridge: see Notes" } ,
+ { 0x8086, 0x248D, "82801??", "USB 2.0 EHCI Contoroller" } ,
+ { 0x8086, 0x24C0, "82801DB", "LPC Interface Bridge" } ,
+ { 0x8086, 0x24C2, "82801DB/DBM", "USB UHCI Controller #1" } ,
+ { 0x8086, 0x24C3, "82801DB/DBM", "SMBus Controller" } ,
+ { 0x8086, 0x24C4, "82801DB/DBM", "USB UHCI Controller #2" } ,
+ { 0x8086, 0x24C5, "82801DB/DBM", "AC97 Audio Controller" } ,
+ { 0x8086, 0x24C6, "82801DB/DBM", "AC97 Modem Controller" } ,
+ { 0x8086, 0x24C7, "82801DB/DBM", "USB UHCI Controller #3" } ,
+ { 0x8086, 0x24CA, "82801DBM", "IDE Controller (UltraATA/100)" } ,
+ { 0x8086, 0x24CB, "82801DB", "IDE Controller (UltraATA/100)" } ,
+ { 0x8086, 0x24CC, "82801DBM", "LPC Interface Bridge" } ,
+ { 0x8086, 0x24CD, "82801DB/DBM", "USB EHCI Controller" } ,
+ { 0x8086, 0x2500, "82820", "Host-Hub Interface Bridge / DRAM Ctrlr" } ,
+ { 0x8086, 0x2501, "82820", "Host Bridge (MCH)" } ,
+ { 0x8086, 0x2502, "82820", "" } ,
+ { 0x8086, 0x2503, "82820", "" } ,
+ { 0x8086, 0x2504, "82820", "" } ,
+ { 0x8086, 0x250B, "82820", "Host Bridge (MCH)" } ,
+ { 0x8086, 0x250F, "82820", "AGP Bridge" } ,
+ { 0x8086, 0x2520, "82805AA", "Memory Translator Hub (MTH)" } ,
+ { 0x8086, 0x2521, "82804AA", "Memory Repeater Hub for SDRAM (MRH-S)" } ,
+ { 0x8086, 0x2530, "82850/850E", "Host-Hub Interface Bridge" } ,
+ { 0x8086, 0x2531, "82860", "Host-Hub Interface_A Bridge (DP mode)" } ,
+ { 0x8086, 0x2532, "82850/850E/860", "AGP Bridge" } ,
+ { 0x8086, 0x2533, "82860", "Hub Interface_B Bridge" } ,
+ { 0x8086, 0x2534, "82860", "Hub Interface_C Bridge" } ,
+ { 0x8086, 0x2535, "82860", "PCI Bridge" } ,
+ { 0x8086, 0x2536, "82860", "PCI Bridge" } ,
+ { 0x8086, 0x2539, "82860", "(Quad Processor mode)" } ,
+ { 0x8086, 0x2540, "E7500", "Host-HI Bridge & DRAM Controller" } ,
+ { 0x8086, 0x2541, "E7500/E7501", "DRAM Controller Error Reporting" } ,
+ { 0x8086, 0x2543, "E7500/E7501", "HI_B Virtual PCI-to-PCI Bridge" } ,
+ { 0x8086, 0x2544, "E7500/E7501", "HI_B PCI-to-PCI Bridge Error Reporting" } ,
+ { 0x8086, 0x2545, "E7500/E7501", "HI_C Virtual PCI-to-PCI Bridge" } ,
+ { 0x8086, 0x2546, "E7500/E7501", "HI_C PCI-to-PCI Bridge Error Reporting" } ,
+ { 0x8086, 0x2547, "E7500/E7501", "HI_D Virtual PCI-to-PCI Bridge" } ,
+ { 0x8086, 0x2548, "E7500/E7501", "HI_D PCI-to-PCI Bridge Error Reporting" } ,
+ { 0x8086, 0x254C, "E7501", "Host Controller" } ,
+ { 0x8086, 0x2550, "E7505", "Host Controller" } ,
+ { 0x8086, 0x2551, "E7205/E7505", "Host RAS Controller" } ,
+ { 0x8086, 0x2552, "E7205/E7505", "PCI-to-AGP Bridge" } ,
+ { 0x8086, 0x2553, "E7505", "Hub Interface_B PCI-to-PCI Bridge" } ,
+ { 0x8086, 0x2554, "E7505", "Hub I/F_B PCI-to-PCI Bridge Error Report" } ,
+ { 0x8086, 0x255d, "E7205", "Host Controller" } ,
+ { 0x8086, 0x2560, "82845G/GL/GV/GE/PE", "DRAM Controller / Host-Hub I/F Bridge" } ,
+ { 0x8086, 0x2561, "82845G/GL/GV/GE/PE", "Host-to-AGP Bridge" } ,
+ { 0x8086, 0x2562, "82845G/GL/GV/GE/PE", "Integrated Graphics Device" } ,
+ { 0x8086, 0x3092, "SRCU32", "I2O 1.5 RAID Controller" } ,
+ { 0x8086, 0x3200, "31244", "PCI-X to Serial ATA Controller" } ,
+ { 0x8086, 0x3575, "82830[MP]", "Host-Hub I/F Bridge / SDRAM Controller" } ,
+ { 0x8086, 0x3576, "82830M/MP", "Host-AGP Bridge" } ,
+ { 0x8086, 0x3577, "82830M/MG", "Integrated Graphics Device" } ,
+ { 0x8086, 0x3578, "82830[MP]", "CPU to I/O Bridge" } ,
+ { 0x8086, 0x3580, "852GM", "Host-Hub Interface Bridge" } ,
+ { 0x8086, 0x3582, "852GM", "Integrated Graphics Device" } ,
+ { 0x8086, 0x3584, "852GM", "System Memory Controller" } ,
+ { 0x8086, 0x3585, "852GM", "Configuration Process" } ,
+ { 0x8086, 0x4000, "Creatix", "V.90 HaM Modem" } ,
+ { 0x8086, 0x5001, "PRO/DSL 2100", "Modem - PPP" } ,
+ { 0x8086, 0x5005, "PRO/DSL 2200", "Modem - PPPoA" } ,
+ { 0x8086, 0x5200, "", "PCI to PCI Bridge" } ,
+ { 0x8086, 0x5201, "", "Network Controller" } ,
+ { 0x8086, 0x5309, "80303", "I/O Processor Address Translation Unit" } ,
+ { 0x8086, 0x530D, "80312", "I/O Companion Unit Address Translation" } ,
+ { 0x8086, 0x6960, "", "EHCI 960 emulator" } ,
+ { 0x8086, 0x7000, "82371SB", "PIIX3 PCI-to-ISA Bridge (Triton II)" } ,
+ { 0x8086, 0x7010, "82371SB", "PIIX3 IDE Interface (Triton II)" } ,
+ { 0x8086, 0x7020, "82371SB", "PIIX3 USB Host Controller (Triton II)" } ,
+ { 0x8086, 0x7030, "82437VX", "System Controller" } ,
+ { 0x8086, 0x7051, "PB 642365-003", "Intel Business Video Conferencing Card" } ,
+ { 0x8086, 0x7100, "82439TX", "System Controller (MTXC), part of 430TX chipset" } ,
+ { 0x8086, 0x7110, "82371AB/EB/MB", "PIIX4/4E/4M ISA Bridge" } ,
+ { 0x8086, 0x7111, "82371AB/EB/MB", "PIIX4/4E/4M IDE Controller" } ,
+ { 0x8086, 0x7112, "82371AB/EB/MB", "PIIX4/4E/4M USB Interface" } ,
+ { 0x8086, 0x7113, "82371AB/EB/MB", "PIIX4/4E/4M Power Management Controller" } ,
+ { 0x8086, 0x7120, "82810", "Host-Hub Interface Bridge / DRAM Ctrlr" } ,
+ { 0x8086, 0x7121, "82810", "Graphics Device" } ,
+ { 0x8086, 0x7122, "82810-DC100", "Host-Hub Interface Bridge / DRAM Ctrlr" } ,
+ { 0x8086, 0x7123, "82810-DC100", "Graphics Device" } ,
+ { 0x8086, 0x7124, "82810E", "Host-Hub Interface Bridge / DRAM Ctrlr" } ,
+ { 0x8086, 0x7125, "82810E", "Intel Direct AGP 810 Chipset" } ,
+ { 0x8086, 0x7126, "82810-DC133", "Host Bridge and Memory Controller Hub" } ,
+ { 0x8086, 0x7127, "82810-DC133", "Graphics Device (FSB 133 MHz)" } ,
+ { 0x8086, 0x7128, "82810-M DC-100", "Host Bridge and Memory Controller Hub" } ,
+ { 0x8086, 0x712A, "82810-M DC-133", "Host Bridge and Memory Controller Hub" } ,
+ { 0x8086, 0x7180, "82443LX/EX (PAC)", "Host/PCI bridge in 440LX/EX AGP chipset" } ,
+ { 0x8086, 0x7181, "", "AGP device in 440LX/EX AGP chipset" } ,
+ { 0x8086, 0x7182, "440LX/EX", "" } ,
+ { 0x8086, 0x7190, "82443BX/ZX", "440BX/ZX AGPset Host Bridge" } ,
+ { 0x8086, 0x7191, "82443BX/ZX", "440BX/ZX AGPset PCI-to-PCI bridge" } ,
+ { 0x8086, 0x7192, "82443BX/ZX", "440BX/ZX chipset Host-to-PCI Bridge" } ,
+ { 0x8086, 0x7194, "82443MX", "I/O Controller?" } ,
+ { 0x8086, 0x7195, "82443MX?", "AC97 Audio Controller" } ,
+ { 0x8086, 0x7196, "82440 - 443MX", "AC97 Modem Controller (Winmodem)" } ,
+ { 0x8086, 0x7198, "82443MX", "PCI to ISA Bridge" } ,
+ { 0x8086, 0x7199, "82443MX", "EIDE Controller" } ,
+ { 0x8086, 0x719A, "82443MX", "USB Universal Host Controller" } ,
+ { 0x8086, 0x719B, "82443MX", "Power Management Controller" } ,
+ { 0x8086, 0x71A0, "82443GX", "Host-to-PCI Bridge" } ,
+ { 0x8086, 0x71A1, "82443GX", "PCI-to-PCI Bridge (AGP)" } ,
+ { 0x8086, 0x71A2, "82443GX", "Host-to-PCI Bridge" } ,
+ { 0x8086, 0x7600, "82372FB/82468GX", "LPC/FWH Interface" } ,
+ { 0x8086, 0x7601, "82372FB/82468GX", "EIDE Controller" } ,
+ { 0x8086, 0x7602, "82372FB/82468GX", "USB Host Controller" } ,
+ { 0x8086, 0x7603, "82372FB/82468GX", "SM Bus Controller" } ,
+ { 0x8086, 0x7605, "82372FB", "IEEE1394 OpenHCI Host Controller" } ,
+ { 0x8086, 0x7800, "82740", "AGP Graphics Accelerator" } ,
+ { 0x8086, 0x84C4, "82454KX/GX", "450KX/GX PCI Bridge (Orion)" } ,
+ { 0x8086, 0x84C5, "82453KX/GX", "450KX/GX Memory Controller (Orion)" } ,
+ { 0x8086, 0x84CA, "82451NX", "450NX PCIset Memory & I/O Controller" } ,
+ { 0x8086, 0x84CB, "82454NX/82467GX", "PCI Expander Bridge" } ,
+ { 0x8086, 0x84E0, "82461GX", "System Address controller" } ,
+ { 0x8086, 0x84E1, "82462GX", "System Data Controller" } ,
+ { 0x8086, 0x84E2, "82465GX", "Graphics Expander Bridge" } ,
+ { 0x8086, 0x84E3, "82463GX", "Memory Address Controller" } ,
+ { 0x8086, 0x84E4, "82464GX", "Memory Data Controller" } ,
+ { 0x8086, 0x84E6, "82466GX", "Wide and fast PCI eXpander Bridge" } ,
+ { 0x8086, 0x84EA, "82460GX", "AGP Bridge (GXB function 1)" } ,
+ { 0x8086, 0x9620, "", "I2O RAID PCI to PCI Bridge" } ,
+ { 0x8086, 0x9621, "SRCU21", "I2O 1.5 RAID Controller" } ,
+ { 0x8086, 0x9622, "SRCUxx", "I2O 1.5 RAID Controller" } ,
+ { 0x8086, 0x9641, "SRCU31", "I2O 1.5 RAID Controller" } ,
+ { 0x8086, 0x96A1, "SRCU31L", "I2O 1.5 RAID Controller" } ,
+ { 0x8086, 0xB152, "S21152BB", "PCI to PCI Bridge" } ,
+ { 0x8086, 0xB154, "S21154AE/BE", "PCI to PCI Bridge" } ,
+ { 0x8086, 0xB555, "21555", "Non-Transparent PCI-to-PCI Bridge" } ,
+ { 0x8800, 0x2008, "", "video assistant component" } ,
+ { 0x8912, 0x0001, "", "" } ,
+ { 0x8E2E, 0x3000, "Et32/Px", "Ethernet Adapter" } ,
+ { 0x9004, 0x0078, "aic-7880p", "AHA-2940UW/CN" } ,
+ { 0x9004, 0x1078, "AIC-7810C", "RAID Coprocessor" } ,
+ { 0x9004, 0x1160, "AIC-1160", "Fibre Channel Adapter" } ,
+ { 0x9004, 0x2178, "AIC-7821", "SCSI Controller" } ,
+ { 0x9004, 0x3860, "", "AIC-2930U Ultra SCSI Ctrlr" } ,
+ { 0x9004, 0x3B78, "AHA-4944W/4944UW", "QuadChannel Fast-Wide/Ultra-Wide Diff. SCSI Ctrlr" } ,
+ { 0x9004, 0x5075, "AIC-755x", "SCSI Ctrlr" } ,
+ { 0x9004, 0x5078, "AIC-7850P", "Fast/Wide SCSI Controller" } ,
+ { 0x9004, 0x5175, "AIC-755x", "SCSI Ctrlr" } ,
+ { 0x9004, 0x5178, "AIC-7850", "FAST-SCSI Ctrlr" } ,
+ { 0x9004, 0x5275, "AIC-755x", "SCSI Ctrlr" } ,
+ { 0x9004, 0x5278, "AIC-7850", "Fast SCSI Ctrlr" } ,
+ { 0x9004, 0x5375, "AIC-755x", "SCSI Ctrlr" } ,
+ { 0x9004, 0x5378, "AIC-7850", "Fast SCSI Ctrlr" } ,
+ { 0x9004, 0x5475, "AIC-755x", "SCSI Ctrlr" } ,
+ { 0x9004, 0x5478, "AIC-7850", "Fast SCSI Ctrlr" } ,
+ { 0x9004, 0x5575, "AVA-2930", "SCSI Ctrlr" } ,
+ { 0x9004, 0x5578, "AIC-7855", "Fast SCSI Ctrlr" } ,
+ { 0x9004, 0x5675, "AIC-755x", "SCSI Ctrlr" } ,
+ { 0x9004, 0x5678, "AIC-7856", "Fast SCSI Ctrlr" } ,
+ { 0x9004, 0x5775, "AIC-755x", "SCSI Ctrlr" } ,
+ { 0x9004, 0x5778, "AIC-7850", "Fast SCSI Ctrlr" } ,
+ { 0x9004, 0x5800, "AIC-5800", "PCI-to-1394 Ctrlr" } ,
+ { 0x9004, 0x5900, "ANA-5910/30/40", "ATM155 & 25 LAN Controller" } ,
+ { 0x9004, 0x5905, "ANA-5910A/30A/40A", "ATM Adpater" } ,
+ { 0x9004, 0x6038, "AHA-2930C", "Ultra SCSI Adpater (VAR)" } ,
+ { 0x9004, 0x6075, "AIC-7560?", "CardBus Ultra SCSI Controller" } ,
+ { 0x9004, 0x6078, "AIC-7860", "PCI SCSI Controller" } ,
+ { 0x9004, 0x6178, "AIC-7861", "PCI SCSI Controller" } ,
+ { 0x9004, 0x6278, "AIC-7860", "SCSI Ctrlr" } ,
+ { 0x9004, 0x6378, "AIC-7860", "SCSI Ctrlr" } ,
+ { 0x9004, 0x6478, "AIC-786x", "SCSI Ctrlr" } ,
+ { 0x9004, 0x6578, "AIC-786x", "SCSI Ctrlr" } ,
+ { 0x9004, 0x6678, "AIC-786x", "SCSI Ctrlr" } ,
+ { 0x9004, 0x6778, "AIC-786x", "SCSI Ctrlr" } ,
+ { 0x9004, 0x6915, "ANA620xx/69011A", "Fast Ethernet" } ,
+ { 0x9004, 0x7078, "AIC-7870", "Fast and Wide SCSI Ctrlr" } ,
+ { 0x9004, 0x7178, "AHA-2940/2940W", "Fast/Fast-Wide SCSI Ctrlr" } ,
+ { 0x9004, 0x7278, "AHA-3940/3940W", "Multichannel Fast/Fast-Wide SCSI Ctrlr" } ,
+ { 0x9004, 0x7378, "AHA-3985", "4-chan RAID SCSI Ctrlr" } ,
+ { 0x9004, 0x7478, "AHA-2944", "SCSI Ctrlr" } ,
+ { 0x9004, 0x7578, "AHA-3944/3944W", "Multichannel Fast/Fast-Wide Diff. SCSI Ctrlr" } ,
+ { 0x9004, 0x7678, "AHA-4944W/4944UW", "QuadChannel Fast-Wide/Ultra-Wide Diff. SCSI Ctrlr" } ,
+ { 0x9004, 0x7778, "AIC-787x", "SCSI Ctrlr" } ,
+ { 0x9004, 0x7810, "aic 7810", "Memory control IC" } ,
+ { 0x9004, 0x7815, "AIC-7515", "RAID + Memory Controller IC" } ,
+ { 0x9004, 0x7850, "aic-7850", "Fast/Wide SCSI-2 Controller" } ,
+ { 0x9004, 0x7855, "AHA-2930", "Single channel SCSI Host Adapter" } ,
+ { 0x9004, 0x7860, "AIC-7860", "PCI SCSI Controller" } ,
+ { 0x9004, 0x7870, "AIC-7870", "Fast/Wide SCSI-2 Controller" } ,
+ { 0x9004, 0x7871, "aha 2940", "SCSI" } ,
+ { 0x9004, 0x7872, "aha 3940", "Multiple SCSI channels" } ,
+ { 0x9004, 0x7873, "aha 3980", "Multiple SCSI channels" } ,
+ { 0x9004, 0x7874, "aha 2944", "Differential SCSI" } ,
+ { 0x9004, 0x7880, "aic7880", "Fast 20 SCSI" } ,
+ { 0x9004, 0x7890, "AIC-7890", "SCSI controller" } ,
+ { 0x9004, 0x7891, "AIC-789x", "SCSI controller" } ,
+ { 0x9004, 0x7892, "AIC-789x", "SCSI controller" } ,
+ { 0x9004, 0x7893, "AIC-789x", "SCSI controller" } ,
+ { 0x9004, 0x7894, "AIC-789x", "SCSI controller" } ,
+ { 0x9004, 0x7895, "AIC-7895", "Ultra-Wide SCSI Ctrlr on AHA-2940 AHA-394x" } ,
+ { 0x9004, 0x7896, "AIC-789x", "SCSI controller" } ,
+ { 0x9004, 0x7897, "AIC-789x", "SCSI controller" } ,
+ { 0x9004, 0x8078, "AIC-7880", "Ultra Wide SCSI" } ,
+ { 0x9004, 0x8178, "AHA-2940U/2940UW", "Ultra/Ultra-Wide SCSI Ctrlr" } ,
+ { 0x9004, 0x8278, "AHA-3940Uxx", "AHA-3940U/3940UW/3940UWD SCSI Ctrlr" } ,
+ { 0x9004, 0x8378, "AIC-7883U", "SCSI Controller" } ,
+ { 0x9004, 0x8478, "AHA-2944UW", "Ultra-Wide Diff. SCSI Ctrlr" } ,
+ { 0x9004, 0x8578, "AHA-3944U/3944UWD", "Fast-Wide/Ultra-Wide Diff. SCSI Ctrlr" } ,
+ { 0x9004, 0x8678, "AHA-4944UW", "QuadChannel Ultra-Wide Diff. SCSI Ctrlr" } ,
+ { 0x9004, 0x8778, "AIC-788x", "Ultra-Wide SCSI Ctrlr" } ,
+ { 0x9004, 0x8878, "AIC-7888?", "Ultra Wide SCSI Controller" } ,
+ { 0x9004, 0x8B78, "ABA-1030", "" } ,
+ { 0x9004, 0xEC78, "AHA-4944W/4944UW", "QuadChannel Fast-Wide/Ultra-Wide Diff. SCSI Ctrlr" } ,
+ { 0x9005, 0x0010, "AIC-7890AB", "AHA-2940U2W/U2B,2950U2W Ultra2 SCSI" } ,
+ { 0x9005, 0x0011, "", "AHA-2930U2 Ultra2 SCSI Host Adapter" } ,
+ { 0x9005, 0x0013, "AIC-7890/1", "SCSI Controller" } ,
+ { 0x9005, 0x001F, "AIC-7890/1", "Ultra2-Wide SCSI controller" } ,
+ { 0x9005, 0x0020, "AIC-789x", "SCSI Controller" } ,
+ { 0x9005, 0x002F, "AIC-789x", "SCSI Controller" } ,
+ { 0x9005, 0x0030, "AIC-789x", "SCSI Controller" } ,
+ { 0x9005, 0x003F, "AIC-789x", "SCSI Controller" } ,
+ { 0x9005, 0x0050, "", "AHA-3940U2x/3950U2x Ultra2 SCSI Adapter" } ,
+ { 0x9005, 0x0051, "", "AHA-3950U2x Ultra2 SCSI Adapter" } ,
+ { 0x9005, 0x0053, "AIC-7896", "SCSI Controller" } ,
+ { 0x9005, 0x005F, "AIC-7896/7", "Ultra2 SCSI Controller" } ,
+ { 0x9005, 0x0080, "AIC-7892A", "Ultra160/m PCI SCSI Controller" } ,
+ { 0x9005, 0x0081, "AIC-7892B", "Ultra160 SCSI Controller" } ,
+ { 0x9005, 0x0083, "AIC-7892D", "Ultra160 SCSI Controller" } ,
+ { 0x9005, 0x008F, "AIC-7892", "Ultra160 SCSI Controller" } ,
+ { 0x9005, 0x00C0, "AIC-7899A", "Ultra160 SCSI Controller" } ,
+ { 0x9005, 0x00C1, "AIC-7899B", "Ultra160 SCSI Controller" } ,
+ { 0x9005, 0x00C3, "AIC-7899D", "Ultra160 SCSI Controller" } ,
+ { 0x9005, 0x00C5, "", "RAID Subsystem HBA" } ,
+ { 0x9005, 0x00CF, "AIC-7899", "Ultra160 SCSI Controller" } ,
+ { 0x9005, 0x0258, "AAC-RAID", "RAID Controller" } ,
+ { 0x9005, 0x801F, "AIC-7902", "Ultra320 SCSI Controller" } ,
+ { 0x907F, 0x2015, "IDE-2015PL", "EIDE Ctrlr" } ,
+ { 0x9412, 0x6565, "HT6565", "IDE Controller?" } ,
+ { 0x9710, 0x9705, "Nm9705", "Parallel Port Adapter" } ,
+ { 0x9710, 0x9715, "Nm9715", "PCI Dual 1284 Printer Ports" } ,
+ { 0x9710, 0x9735, "Nm9735", "Dual UART" } ,
+ { 0x9710, 0x9745, "Nm9745", "Dual UART and PCI-ISA Bridge" } ,
+ { 0x9710, 0x9755, "Nm9755", "PCI Bridge with 1284 Parallel Port" } ,
+ { 0x9710, 0x9805, "Nm9805", "PCI + 1284 Printer Port" } ,
+ { 0x9710, 0x9815, "Nm9715CV", "Parallel Port Adapter" } ,
+ { 0x9710, 0x9820, "Nm9820", "Single PCI UART" } ,
+ { 0x9710, 0x9825, "Nm9825", "Single PCI UART" } ,
+ { 0x9710, 0x9835, "Nm9835", "PCI + Dual UART and 1284 Printer Port" } ,
+ { 0x9710, 0x9845, "Nm9845", "PCI Bridge with Dual UART" } ,
+ { 0x9710, 0x9855, "Nm9855", "Parallel/Serial Port Adapter" } ,
+ { 0x9902, 0x0001, "SG2010", "PCI-to-PCI Bridge" } ,
+ { 0x9902, 0x0002, "SG2010", "PCI to high speed serial bridge" } ,
+ { 0x9902, 0x0003, "SG1010", "6 port serial switch /PCI-to-PCI bridge" } ,
+ { 0xAA42, 0x03A3, "9400-0931", "CharKey" } ,
+ { 0xB00C, 0x001C, "IC80+PCI", "POST Diagnostics Card" } ,
+ { 0xb00c, 0x011c, "IC128", "PCI Parallel Port (LPT)" } ,
+ { 0xb00c, 0x021c, "", "Gunboat x4" } ,
+ { 0xb00c, 0x031C, "", "Gunboat x4 Pro" } ,
+ { 0xb00c, 0x041c, "", "Ironclad x8" } ,
+ { 0xb00c, 0x051c, "", "Ironclad x8 Pro" } ,
+ { 0xB00C, 0x061C, "", "IC 138 PCI" } ,
+ { 0xB00C, 0x081C, "", "Dreadnought x16 Pro" } ,
+ { 0xB00C, 0x091C, "", "Dreadnought x16 Lite" } ,
+ { 0xC0DE, 0x5600, "62802", "" } ,
+ { 0xC0DE, 0xC0DE, "62802-5", "QZ0022" } ,
+ { 0xCDDD, 0x0101, "", "DeepSea 1 Board" } ,
+ { 0xCDDD, 0x0200, "DeepSea 1", "High speed stereo correlation chip" } ,
+ { 0xD4D4, 0x0601, "", "PCI Mezzanine Card" } ,
+ { 0xDEAF, 0x9050, "", "PC Weasel PCI VGA Device" } ,
+ { 0xDEAF, 0x9051, "", "PC Weasel PCI Serial Comm. Device" } ,
+ { 0xDEAF, 0x9052, "", "PC Weasel PCI" } ,
+ { 0xE000, 0xE000, "W89C940", "Ethernet Adapter" } ,
+ { 0xE159, 0x0001, "Tiger 300/320", "PCI interface" } ,
+ { 0xE159, 0x0002, "", "Sedlbauer Speed PCI" } ,
+ { 0xE159, 0x0600, "Tiger 600", "PCI-to-PCI Bridge" } ,
+ { 0xEACE, 0x3100, "DAG 3.10", "OC-3/OC-12" } ,
+ { 0xEACE, 0x3200, "DAG 3.2x", "OC-3/OC-12" } ,
+ { 0xEACE, 0x320E, "DAG 3.2E", "Fast Ethernet" } ,
+ { 0xEACE, 0x340E, "DAG 3.4E", "Fast Ethernet" } ,
+ { 0xEACE, 0x341E, "DAG 3.41E", "Fast Ethernet" } ,
+ { 0xEACE, 0x3500, "DAG 3.5", "OC-3/OC-12" } ,
+ { 0xEACE, 0x351C, "DAG 3.5ECM", "Fast Ethernet" } ,
+ { 0xEACE, 0x4100, "DAG 4.10", "OC-48" } ,
+ { 0xEACE, 0x4110, "DAG 4.11", "OC-48" } ,
+ { 0xEACE, 0x4200, "DAG 4.2", "OC-48" } ,
+ { 0xEACE, 0x420E, "DAG 4.2E", "Dual Gigabit Ethernet" } ,
+ { 0xEDD8, 0xA091, "ARK1000PV", "Stingray GUI Accelerator" } ,
+ { 0xEDD8, 0xA099, "ARK2000PV", "Stingray GUI Accelerator" } ,
+ { 0xEDD8, 0xA0A1, "ARK2000MT", "Stingray 64" } ,
+ { 0xEDD8, 0xA0A9, "ARK2000MI", "Quadro645 GUI Accelerator" } ,
+ { 0xEDD8, 0xA0B1, "ARK2000MI+", "GUI Accelerator" } ,
+ { 0xFA57, 0x0001, "PMC", "Pattern Matching Chip" } ,
+ { 0xFEDA, 0xA0FA, "BCM4210", "OEM Chip for 10meg/s over phone line" } ,
+ { 0xFFFE, 0x0710, "", "Virtual SVGA" } ,
+ { 0xFFFF, 0xFFFF, "NO-DEVICE", "No device on PCI bus" }
+} ;
+
+// Use this value for loop control during searching:
+#define PCI_DEVTABLE_LEN (sizeof(PciDevTable)/sizeof(PCI_DEVTABLE))
+
+
+typedef struct _PCI_CLASSCODETABLE
+{
+ unsigned char BaseClass ;
+ unsigned char SubClass ;
+ unsigned char ProgIf ;
+ char * BaseDesc ;
+ char * SubDesc ;
+ char * ProgDesc ;
+} PCI_CLASSCODETABLE, *PPCI_CLASSCODETABLE ;
+
+PCI_CLASSCODETABLE PciClassCodeTable [] =
+{
+ { 0x00, 0x00, 0x00, "Pre-2.0 PCI Specification Device", "Non-VGA","" } ,
+ { 0x00, 0x01, 0x00, "Pre-2.0 PCI Specification Device", "VGA Compatible", "" } ,
+
+ { 0x01, 0x00, 0x00, "Mass Storage Controller", "SCSI", "" } ,
+ { 0x01, 0x01, 0x00, "Mass Storage Controller", "IDE", "" } ,
+ { 0x01, 0x02, 0x00, "Mass Storage Controller", "Floppy", "" } ,
+ { 0x01, 0x03, 0x00, "Mass Storage Controller", "IPI", "" } ,
+ { 0x01, 0x04, 0x00, "Mass Storage Controller", "RAID", "" } ,
+ { 0x01, 0x80, 0x00, "Mass Storage Controller", "Other", "" } ,
+
+ { 0x02, 0x00, 0x00, "Network Controller", "Ethernet", "" } ,
+ { 0x02, 0x01, 0x00, "Network Controller", "Token Ring", "" } ,
+ { 0x02, 0x02, 0x00, "Network Controller", "FDDI", "" } ,
+ { 0x02, 0x03, 0x00, "Network Controller", "ATM", "" } ,
+ { 0x02, 0x04, 0x00, "Network Controller", "ISDN", "" } ,
+ { 0x02, 0x80, 0x00, "Network Controller", "Other", "" } ,
+
+ { 0x03, 0x00, 0x00, "Display Controller", "PC Compatible", "VGA" } ,
+ { 0x03, 0x00, 0x01, "Display Controller", "PC Compatible", "8514" } ,
+ { 0x03, 0x01, 0x00, "Display Controller", "XGA", "" } ,
+ { 0x03, 0x02, 0x00, "Display Controller", "3D", "" } ,
+ { 0x03, 0x80, 0x00, "Display Controller", "Other", "" } ,
+
+ { 0x04, 0x00, 0x00, "Multimedia Device", "Video", "" } ,
+ { 0x04, 0x01, 0x00, "Multimedia Device", "Audio", "" } ,
+ { 0x04, 0x02, 0x00, "Multimedia Device", "Telephony", "" } ,
+ { 0x04, 0x80, 0x00, "Multimedia Device", "Other", "" } ,
+
+ { 0x05, 0x00, 0x00, "Memory Controller", "RAM", "" } ,
+ { 0x05, 0x01, 0x00, "Memory Controller", "Flash", "" } ,
+ { 0x05, 0x80, 0x00, "Memory Controller", "Other", "" } ,
+
+ { 0x06, 0x00, 0x00, "Bridge Device", "Host/PCI", "" } ,
+ { 0x06, 0x01, 0x00, "Bridge Device", "PCI/ISA", "" } ,
+ { 0x06, 0x02, 0x00, "Bridge Device", "PCI/EISA", "" } ,
+ { 0x06, 0x03, 0x00, "Bridge Device", "PCI/MCA", "" } ,
+ { 0x06, 0x04, 0x00, "Bridge Device", "PCI/PCI", "" } ,
+ { 0x06, 0x04, 0x01, "Bridge Device", "PCI/PCI", "Subtractive" } ,
+ { 0x06, 0x05, 0x00, "Bridge Device", "PCI/PCMCIA", "" } ,
+ { 0x06, 0x06, 0x00, "Bridge Device", "PCI/NuBus", "" } ,
+ { 0x06, 0x07, 0x00, "Bridge Device", "PCI/CardBus", "" } ,
+ { 0x06, 0x08, 0x00, "Bridge Device", "PCI/RACEway", "Transparent" } ,
+ { 0x06, 0x08, 0x01, "Bridge Device", "PCI/RACEway", "End-Point" } ,
+ { 0x06, 0x80, 0x00, "Bridge Device", "Other", "" } ,
+
+ { 0x07, 0x00, 0x00, "Simple Communications Controller", "Serial", "Generic XT Compatible" } ,
+ { 0x07, 0x00, 0x01, "Simple Communications Controller", "Serial", "16450 Compatible" } ,
+ { 0x07, 0x00, 0x02, "Simple Communications Controller", "Serial", "16550 Compatible" } ,
+ { 0x07, 0x00, 0x03, "Simple Communications Controller", "Serial", "16650 Compatible" } ,
+ { 0x07, 0x00, 0x04, "Simple Communications Controller", "Serial", "16750 Compatible" } ,
+ { 0x07, 0x00, 0x05, "Simple Communications Controller", "Serial", "16850 Compatible" } ,
+ { 0x07, 0x00, 0x06, "Simple Communications Controller", "Serial", "16950 Compatible" } ,
+ { 0x07, 0x01, 0x00, "Simple Communications Controller", "Parallel", "Standard" } ,
+ { 0x07, 0x01, 0x01, "Simple Communications Controller", "Parallel", "Bidirectional" } ,
+ { 0x07, 0x01, 0x02, "Simple Communications Controller", "Parallel", "ECP 1.X Compliant" } ,
+ { 0x07, 0x01, 0x03, "Simple Communications Controller", "Parallel", "IEEE 1284 controller" } ,
+ { 0x07, 0x01, 0xFE, "Simple Communications Controller", "Parallel", "IEEE 1284 target" } ,
+ { 0x07, 0x02, 0x00, "Simple Communications Controller", "Multiport Serial", "" } ,
+ { 0x07, 0x03, 0x00, "Simple Communications Controller", "Generic Modem", "" } ,
+ { 0x07, 0x03, 0x01, "Simple Communications Controller", "Hayes-Compatible Modem", "16450" } ,
+ { 0x07, 0x03, 0x02, "Simple Communications Controller", "Hayes-Compatible Modem", "16550" } ,
+ { 0x07, 0x03, 0x03, "Simple Communications Controller", "Hayes-Compatible Modem", "16650" } ,
+ { 0x07, 0x03, 0x04, "Simple Communications Controller", "Hayes-Compatible Modem", "16750" } ,
+ { 0x07, 0x80, 0x02, "Simple Communications Controller", "Other", "" } ,
+
+ { 0x08, 0x00, 0x00, "Base Systems Peripheral", "PIC (Programmable Interrupt Controller)", "Generic 8259" } ,
+ { 0x08, 0x00, 0x01, "Base Systems Peripheral", "PIC (Programmable Interrupt Controller)", "ISA" } ,
+ { 0x08, 0x00, 0x02, "Base Systems Peripheral", "PIC (Programmable Interrupt Controller)", "EISA" } ,
+ { 0x08, 0x00, 0x10, "Base Systems Peripheral", "I/O APIC", "" } ,
+ { 0x08, 0x00, 0x20, "Base Systems Peripheral", "I/O(x) APIC", "" } ,
+ { 0x08, 0x01, 0x00, "Base Systems Peripheral", "DMA (Direct Memory Access)", "Generic 8237" } ,
+ { 0x08, 0x01, 0x01, "Base Systems Peripheral", "DMA (Direct Memory Access)", "ISA" } ,
+ { 0x08, 0x01, 0x02, "Base Systems Peripheral", "DMA (Direct Memory Access)", "EISA" } ,
+ { 0x08, 0x02, 0x00, "Base Systems Peripheral", "System Timer", "Generic 8254" } ,
+ { 0x08, 0x02, 0x01, "Base Systems Peripheral", "System Timer", "ISA" } ,
+ { 0x08, 0x02, 0x02, "Base Systems Peripheral", "System Timer", "EISA" } ,
+ { 0x08, 0x03, 0x00, "Base Systems Peripheral", "RTC (Real Time Clock)", "Generic" } ,
+ { 0x08, 0x03, 0x01, "Base Systems Peripheral", "RTC (Real Time Clock)", "ISA" } ,
+ { 0x08, 0x04, 0x00, "Base Systems Peripheral", "PCI Hot-Plug Controller", "Generic" } ,
+ { 0x08, 0x80, 0x00, "Base Systems Peripheral", "Other", "" } ,
+
+ { 0x09, 0x00, 0x00, "Input Device", "Keyboard", "" } ,
+ { 0x09, 0x01, 0x00, "Input Device", "Digitizer (Pen)", "" } ,
+ { 0x09, 0x02, 0x00, "Input Device", "Mouse", "" } ,
+ { 0x09, 0x03, 0x00, "Input Device", "Scanner", "" } ,
+ { 0x09, 0x04, 0x00, "Input Device", "Game Port", "Generic" } ,
+ { 0x09, 0x04, 0x10, "Input Device", "Game Port", "Legacy" } ,
+ { 0x09, 0x80, 0x00, "Input Device", "Other", "" } ,
+
+ { 0x0A, 0x00, 0x00, "Docking Station", "Generic", "" } ,
+ { 0x0A, 0x80, 0x00, "Docking Station", "Other", "" } ,
+
+ { 0x0B, 0x00, 0x00, "Processor", "i386", "" } ,
+ { 0x0B, 0x01, 0x00, "Processor", "i486", "" } ,
+ { 0x0B, 0x02, 0x00, "Processor", "Pentium", "" } ,
+ { 0x0B, 0x10, 0x00, "Processor", "Alpha", "" } ,
+ { 0x0B, 0x20, 0x00, "Processor", "Power PC", "" } ,
+ { 0x0B, 0x30, 0x00, "Processor", "MIPS", "" } ,
+ { 0x0B, 0x40, 0x00, "Processor", "Co-processor", "" } ,
+
+ { 0x0C, 0x00, 0x00, "Serial Bus Controller", "IEEE 1394", "Firewire" } ,
+ { 0x0C, 0x00, 0x10, "Serial Bus Controller", "IEEE 1394", "OpenHCI" } ,
+ { 0x0C, 0x01, 0x00, "Serial Bus Controller", "ACCESS.bus", "" } ,
+ { 0x0C, 0x02, 0x00, "Serial Bus Controller", "SSA (Serial Storage Archetecture)", "" } ,
+ { 0x0C, 0x03, 0x00, "Serial Bus Controller", "USB (Universal Serial Bus)", "Universal Host Controller" } ,
+ { 0x0C, 0x03, 0x10, "Serial Bus Controller", "USB (Universal Serial Bus)", "Open Host Controller" } ,
+ { 0x0C, 0x03, 0x80, "Serial Bus Controller", "USB (Universal Serial Bus)", "Non-specific Controller" } ,
+ { 0x0C, 0x03, 0xFE, "Serial Bus Controller", "USB (Universal Serial Bus)", "Device" } ,
+ { 0x0C, 0x04, 0x00, "Serial Bus Controller", "Fibre Channel", "" } ,
+ { 0x0C, 0x05, 0x00, "Serial Bus Controller", "SMBus", "" } ,
+
+ { 0x0D, 0x00, 0x00, "Wireless", "iRDA-compatible Controller", "" } ,
+ { 0x0D, 0x01, 0x00, "Wireless", "Consumer IR Controller", "" } ,
+ { 0x0D, 0x10, 0x00, "Wireless", "RF Controller", "" } ,
+ { 0x0D, 0x80, 0x00, "Wireless", "Other", "" } ,
+
+ { 0x0E, 0x00, 0x00, "Intelligent IO", "I2O", "" } ,
+
+ { 0x0F, 0x01, 0x00, "Satellite", "TV", "" } ,
+ { 0x0F, 0x02, 0x00, "Satellite", "Audio", "" } ,
+ { 0x0F, 0x03, 0x00, "Satellite", "Voice", "" } ,
+ { 0x0F, 0x04, 0x00, "Satellite", "Data", "" } ,
+
+ { 0x10, 0x00, 0x00, "Encryption", "Network/Computing", "" } ,
+ { 0x10, 0x10, 0x00, "Encryption", "Entertainment", "" } ,
+ { 0x10, 0x80, 0x00, "Encryption", "Other", "" } ,
+
+ { 0x11, 0x00, 0x00, "Signal Processing", "DPIO", "" } ,
+ { 0x11, 0x80, 0x00, "Signal Processing", "Other", "" } ,
+
+ { 0xFF, 0x00, 0x00, "Unknown", "Device Does Not Fit in a Defined Class", "UDF" } ,
+} ;
+
+// Use this value for loop control during searching:
+#define PCI_CLASSCODETABLE_LEN (sizeof(PciClassCodeTable)/sizeof(PCI_CLASSCODETABLE))
+
+
+char * PciCommandFlags [] =
+{
+ "I/O Access",
+ "Memory Access",
+ "Bus Mastering",
+ "Special Cycles",
+ "Memory Write & Invalidate",
+ "Palette Snoop",
+ "Parity Errors",
+ "Wait Cycles",
+ "System Errors",
+ "Fast Back-To-Back",
+ "Reserved 10",
+ "Reserved 11",
+ "Reserved 12",
+ "Reserved 13",
+ "Reserved 14",
+ "Reserved 15"
+} ;
+
+// Use this value for loop control during searching:
+#define PCI_COMMANDFLAGS_LEN (sizeof(PciCommandFlags)/sizeof(char *))
+
+
+char * PciStatusFlags [] =
+{
+ "Reserved 0",
+ "Reserved 1",
+ "Reserved 2",
+ "Reserved 3",
+ "Reserved 4",
+ "66 MHz Capable",
+ "User-Defined Features",
+ "Fast Back-To-Back",
+ "Data Parity Reported",
+ "",
+ "",
+ "Signalled Target Abort",
+ "Received Target Abort",
+ "Received Master Abort",
+ "Signalled System Error",
+ "Detected Parity Error"
+} ;
+
+// Use this value for loop control during searching:
+#define PCI_STATUSFLAGS_LEN (sizeof(PciStatusFlags)/sizeof(char *))
+
+
+char * PciDevSelFlags [] =
+{
+ "Fast Devsel Speed", // TypeC
+ "Medium Devsel Speed", // TypeB
+ "Slow Devsel Speed", // TypeA
+ "Reserved 9&10"
+} ;
+
+// Use this value for loop control during searching:
+#define PCI_DEVSELFLAGS_LEN (sizeof(PciDevSelFlags)/sizeof(char *))
+
diff --git a/cesar/ecos/packages/io/serial/current/ChangeLog b/cesar/ecos/packages/io/serial/current/ChangeLog
new file mode 100644
index 0000000000..ae8c783d9d
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/ChangeLog
@@ -0,0 +1,1564 @@
+2005-09-02 Sebastien Couret <sebastien.couret@elios-informatique.fr>
+
+ * src/common/termiostty.c and
+ * tests/serial_echo.c : Fix compiler warning on a signedness
+ argument
+
+2005-07-22 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/common/tty.c (tty_write):
+ * src/common/haldiag.c (haldiag_getc): Fixed pointer signness to
+ avoid compiler warnings.
+ * tests/*.c msglen should by an unsigned int to avoid compiler
+ warnings.
+
+2005-07-21 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/common/termiostty.c: Removed errbuf from priv. It was never
+ being used after being allocated and never freed.
+
+2005-06-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/common/serial.c (serial_select): Swap the DSR locks and
+ mutex locks around to avoid deadlocks with the rest of the code
+ which uses this order.
+
+2005-06-17 Andreas Gaer <andreas.gaer@baslerweb.com>
+
+ * src/common/serial.c (serial_select): Lock DSRs inside
+ serial_select() as the serial DSR calls functions manipulating the
+ cbuf structs, leading to a race condition. Also use the mutex to
+ avoid races between different threads.
+
+2005-05-13 Peter Korsgaard <jacmet@sunsite.dk>
+
+ * src/common/serial.c (serial_init): Fix compiler warnings about
+ formats strings for diag_printf.
+
+2004-11-30 Jani Monoses <jani@iv.ro>
+
+ * cdl/io_serial.cdl : CYGPKG_IO_SERIAL_SELECT_SUPPORT requires
+ CYGFUN_IO_FILEIO_SELECT specifically not just CYGPKG_FILEIO. The
+ latter provides select support only in kernel configurations.
+
+2004-04-22 Jani Monoses <jani@iv.ro>
+
+ * cdl/io_serial.cdl :
+ Invoke tail with stricter syntax that works in latest coreutils.
+
+2004-01-12 Dan Jakubiec <djakubiec@yahoo.com>
+
+ * src/common/serial.c: serial_write() was returning an incorrect
+ result code in non-blocking mode when output was blocked. The
+ previous code would return ENOERR with 0 bytes written. This
+ was fixed to return EAGAIN.
+
+2003-08-18 Jay Foster <jay@systech.com>
+
+ * src/common/serial.c: Fixed bug for XON/XOFF flow control that
+ would cause multiple XON (or XOFF) characters to be sent for a
+ single flow control state transition.
+ Fixed bug in serial_write() that would cause output data to be
+ discarded if using polled mode with flow control, and output
+ was blocked due to flow control.
+ Fixed bug in serial_data_xmt_req() that would not stop sending
+ data when output was flow controlled off (hardware flow control).
+
+2003-09-02 Eric Doenges <Eric.Doenges@DynaPel.com>
+
+ * src/common/tty.c: Make tty_select prototype match implementation.
+ * src/common/termiostty.c: Make termios_select prototype match
+ implementation.
+
+2003-09-02 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/common/serial.c: Make serial_select prototype match
+ implementation.
+
+2003-06-09 Nick Garnett <nickg@balti.calivar.com>
+
+ * src/common/serial.c: Changed all calls to cyg_drv_cond_signal()
+ to cyg_drv_cond_broadcast(). Removed comment asking whether this
+ matters: it does.
+
+ * include/serialio.h: Added includes of pkgconf files so that the
+ ifdefs in this file work properly.
+
+ * include/serial.h: Added include of devtab.h to fix compile
+ error.
+
+2003-05-21 Gary Thomas <gary@mlbassoc.com>
+
+ * src/common/serial.c (serial_get_config): Restart receiver
+ after input queue flush if it had been throttled. Inspired
+ by David Marqvar <DAM@tt.dk>
+
+2003-03-25 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/common/serial.c (serial_get_config): For both INPUT_FLUSH
+ and OUTPUT_FLUSH keys, pass down to the hardware driver as well
+ to allow it to flush FIFOs.
+ Based on patch from Roland Cassebohm.
+
+2003-03-20 Gary Thomas <gary@mlbassoc.com>
+
+ * src/common/serial.c: Only return -EAGAIN if no data moved.
+
+2003-03-11 Gary Thomas <gary@mlbassoc.com>
+
+ * src/common/termiostty.c (termios_read): VMIN handling still wasn't
+ quite correct. When VMIN > 0, at least VMIN characters should be
+ read.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/io_serial.cdl: Fix doc link.
+
+2003-02-14 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/common/termiostty.c: Support VMIN > 0 properly.
+
+2002-12-10 Gary Thomas <gthomas@ecoscentric.com>
+
+ * src/common/tty.c (tty_write): Only return number of characters
+ in original string which were written - don't include any CR/LF
+ expansion characters.
+
+2002-04-23 Jesper Skov <jskov@redhat.com>
+
+ * tests/serial3.c (serial_test): Use 19200 baud rate when board
+ cannot handle 38400.
+ * tests/serial5.c (serial_test): Same.
+
+2002-02-19 Jesper Skov <jskov@redhat.com>
+
+ * cdl/io_serial.cdl: Removed termiostty.c build rule.
+
+ * cdl/termios.cdl: Make termiostty.c building depending on actual
+ requirements for its content.
+
+2002-02-15 Jesper Skov <jskov@redhat.com>
+
+ * tests/flow1.c: Also try DSR/DTR flow control (presently
+ unsupported by Linux though).
+ * tests/flow2.c: Same.
+
+2002-01-11 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/common/termiostty.c (termios_read): Don't return after VMIN,
+ this was a stupid thing to do and decreases performance a lot.
+
+2001-08-15 Gary Thomas <gthomas@redhat.com>
+
+ * tests/ser_test_protocol.inl: Change NONE in 'cyg_verbosity_level_t'
+ to be _NONE [unused] to avoid name clash with <kernel/kapi.h>.
+
+2000-12-08 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/common/serial.c: Fix CYGOPT_IO_SERIAL_FLOW_CONTROL_HW ->
+ CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS typo when declaring callbacks
+ Thanks to Brian Danilko for reporting.
+
+2000-11-22 Jesper Skov <jskov@redhat.com>
+
+ * src/common/serial.c: Changed #ifdef to #if used on an interface
+ option.
+
+2000-11-06 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/common/tty.c (tty_write): Check buffer size appropriately
+ since when doing \r\n expansion "size" may have been double
+ incremented as a result.
+ Thanks to Alex Mathews of Crosstor for the fix.
+
+2000-10-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/common/serial.c: Include cyg/infra/cyg_ass.h for assertion
+ support since we have assertions here!
+
+2000-10-12 Jesper Skov <jskov@redhat.com>
+
+ * tests/ser_test_protocol.inl: Moved most testing parameters into
+ device driver CDL.
+
+ * cdl/io_serial.cdl: Added comment.
+
+2000-10-06 Jesper Skov <jskov@redhat.com>
+
+ * src/common/serial.c (serial_rcv_char): Register overruns.
+
+ * src/common/serial.c: Made block request functions return cause
+ of failure. Necessary for the device driver to be able to
+ fall-back to other transfer method efficiently.
+ * include/serial.h: Added enum with failure types.
+
+2000-10-03 Jesper Skov <jskov@redhat.co.uk>
+
+ * tests/ser_test_protocol.inl: Moved testing parameters to device
+ driver CDL for SH targets.
+
+2000-09-29 Jesper Skov <jskov@redhat.com>
+
+ * include/serialio.h: Fix compiler warning and errors due to
+ non-default flow control config.
+
+2000-09-27 Jesper Skov <jskov@redhat.com>
+
+ * src/common/serial.c (serial_data_rcv_done,
+ serial_data_xmt_done): Buffer pointers updated in _done instead of
+ in _req to avoid race in xmt. Same change in rcv for consistency.
+ * include/serial.h: Changed prototype accordingly.
+
+2000-09-18 Jesper Skov <jskov@redhat.com>
+
+ * cdl/io_serial.cdl: Added interfaces to allow test tweaking.
+ * tests/ser_test_protocol.inl: Use interfaces. Moved PID details
+ to PID serial package.
+
+2000-09-15 Jesper Skov <jskov@redhat.com>
+
+ * tests/ser_test_protocol.inl: Allow drivers to define testing
+ parameters via CDL.
+
+2000-09-13 Jesper Skov <jskov@redhat.com>
+
+ * include/serial.h (SERIAL_CALLBACKS): Fix typo.
+
+2000-09-06 Jesper Skov <jskov@redhat.com>
+
+ * tests/ser_test_protocol.inl: Renamed some option names due to SH
+ serial driver reorg.
+
+2000-08-09 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/common/serial.c (serial_indicate_status): Treat flow control
+ case conditionally
+
+2000-08-08 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/common/serial.c (serial_data_rcv_req): Adjust nb in correct
+ direction
+
+2000-08-04 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/io_serial.cdl: Default software flow control to on (but keep
+ flow control overall default off)
+
+ * tests/flow1.c (cyg_start): Fix N_A_MSG -> NA_MSG typo
+ * tests/flow2.c (cyg_start): Ditto
+
+2000-08-03 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/io_serial.cdl: Should default flow control to off
+
+ * src/common/serial.c (serial_data_xmt_req): Update cbuf->nb
+ (serial_data_rcv_req): Update cbuf->nb
+
+2000-08-01 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/io_serial.cdl: Add support for line status queries,
+ software flow control, hardware flow control and POSIX termios
+ * include/serial.h: Likewise. Also change prototype for set_config
+ hardware operations to use keys to be more flexible.
+ * include/serialio.h: Add lots of types and constants to support
+ new line status and flow control config key queries
+
+ * src/common/haldiag.c (haldiag_set_config): Use keys to be more
+ flexible.
+
+ * src/common/serial.c: Many changes to support software/hardware
+ flow control (with low and high water points), line status and
+ fix some omissions with select. Also fix bugs in block transfer
+ functions resulting from EL/IX merge.
+
+ * tests/flow1.c, tests/flow2.c: New tests for flow control
+
+ * cdl/termios.cdl: Add to configure termios
+ * src/termios.c: Add new POSIX Termios API
+ * src/termiostty.c: Add POSIX Termios tty driver
+
+ * tests/ser_test_protocol.inl (change_config): Add support for
+ hardware and software flow control testing, indicated to the
+ host by an extra CONFIG argument.
+
+ * tests/serial3.c: Add flow control config
+ * tests/serial5.c: Add flow control config
+
+2000-07-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/common/serial.c: Changed BLOCKING control definitions to
+ generic versions.
+
+2000-07-03 Jesper Skov <jskov@redhat.com>
+
+ * src/common/serial.c (serial_data_rcv_req): Fix off-by-1 bug.
+
+2000-06-23 Jesper Skov <jskov@redhat.com>
+
+ * tests/ser_test_protocol.inl: Added cq7708 definitions.
+
+2000-06-19 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/serial.h:
+ * src/common/serial.c:
+ Added nb field to cbuf_t structure. This keeps track of the number of
+ bytes currently in the buffer. Without this counter, there is no
+ way to distinguish a totally full buffer from one that is totally
+ empty, since in both cases put==get.
+
+2000-06-15 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/serial.h: Added selinfo field to cbuf structure when
+ select support is enabled.
+
+ * src/common/serial.c:
+ * src/common/tty.c:
+ Added select support.
+
+ * cdl/io_serial.cdl: Added CYGPKG_IO_SERIAL_SELECT_SUPPORT to
+ enable select() support. Defaults to on.
+ Also added component for loopback driver.
+
+ * tests/ser_test_protocol.inl: Added test setup for loopback
+ driver.
+
+2000-05-28 Gary Thomas <gthomas@redhat.com>
+
+ * tests/ser_test_protocol.inl: Rename NEC V85x drivers.
+
+2000-05-25 Jesper Skov <jskov@redhat.com>
+
+ * tests/ser_test_protocol.inl: Added rules for REF4955.
+
+2000-05-08 Jesper Skov <jskov@redhat.com>
+
+ * cdl/io_serial.cdl: active_if CYGPKG_IO
+
+2000-05-05 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/common/serial.c (serial_get_config): Tidy below change a little
+
+2000-05-05 Grant Edwards <grante@visi.com>
+
+ * src/common/serial.c (serial_get_config): Support
+ CYG_IO_GET_CONFIG_SERIAL_BUFFER_INFO key to get buffer information
+
+ * include/serialio.h: Add cyg_serial_buf_info_t
+
+2000-05-04 Jesper Skov <jskov@redhat.com>
+
+ * cdl/io_serial.cdl: Only build tests when drivers enabled.
+
+2000-05-02 Jesper Skov <jskov@redhat.com>
+
+ * src/common/serial.c (serial_set_config): Set proper parity for
+ blocking options.
+ (serial_get_config): Fix copy'n'paste buglet.
+
+2000-05-01 Jesper Skov <jskov@redhat.com>
+
+ * src/common/serial.c: Added non-blocking config and operation for
+ read/write calls.
+ Added block transfer rcv/xmt callbacks.
+ Added (disabled for now) check for rcv overflow. [need to add
+ handling]
+
+ * include/serial.h: Added non-blocking callbacks.
+
+ * cdl/io_serial.cdl: Added non-blocking option. Added block
+ transfer interface.
+
+2000-04-17 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/PKGconf.mak: remove; it's obsolete.
+
+2000-04-13 Gary Thomas <gthomas@redhat.com>
+
+ * src/common/serial.c (serial_write): Make safer - only call
+ 'start_xmit' with DSRs disabled.
+
+2000-04-11 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/io_serial.cdl (CYGPKG_IO_SERIAL_DEVICES): New package which
+ is a container and control for the real device drivers.
+
+2000-04-11 Jesper Skov <jskov@redhat.com>
+
+ * cdl/io_serial.cdl: Bad hack to build separate test.
+ * tests/serial_echo.c: Added.
+
+2000-04-11 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/ser_.... (driver-specific cdl files):
+ Remove all these; they are no longer needed following the change
+ below. They do exist in devs/serial/ARCH/PLATFORM/VERSION/cdl/
+ directories various instead.
+
+2000-04-07 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * ecos.db: Re-organize device packages. This is a massive change
+ involving deleting all the sources for serial and ethernet drivers
+ from where they used to live in
+ packages/io/serial/current/src/ARCH/PLATFORM.[ch]
+ packages/net/drivers/eth/PLATFORM/current/src/...
+ and reinstating them in
+ packages/devs/serial/ARCH/PLATFORM/current/src/...
+ packages/devs/eth/ARCH/PLATFORM/current/src/...
+
+ All these new packages are properly defined in ecos.db, and are
+ all of type "hardware" so that a "target" can grab them.
+
+ This directory layout is descriptive of the devices we have right
+ now, arch and platform are separate levels just to make it easier
+ to navigate in the filesystem and similar to the HAL structure in
+ the filesystem.
+
+ It is *not* prescriptive of future work; for example, the mythical
+ common highly-portable 16550 serial driver which works on many
+ targets would be called "devs/serial/s16550/current", or a serial
+ device for a particular board (cogent springs to mind) that can
+ work with different CPUs fitted is "devs/serial/cogent/current".
+
+ Changelogs have been preserved and replicated over all the new
+ packages, so that no history is lost.
+
+ The contents of individual source files are unchanged; they build
+ in just the same emvironment except for a very few cases where the
+ config file name changed in this movement.
+
+ Targets in ecos.db have been redefined to bring in all relevant
+ hardware packages including net and serial drivers (but the newly
+ included packages are only active if their desired parent is
+ available.)
+
+ The names of CDL options (and their #defines of course) stay the
+ same for the serial drivers, for backward compatibility.
+
+ * templates/*/current.ect: these have had CYGPKG_IO_SERIAL added
+ rather than it being in (almost) all target definitions.
+
+2000-04-07 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/common/tty.c (tty_read): Correct handling of modes with newlines
+
+2000-04-05 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/common/tty.c (tty_read): CRLF conversion should use \r\n not \n\r
+ (tty_write): Similarly
+
+ * include/ttyio.h: Update CYG_TTY_IN_FLAGS_CRLF and
+ CYG_TTY_IN_FLAGS_CRLF to match
+
+2000-03-31 Jesper Skov <jskov@redhat.com>
+
+ * cdl/ser_sh_edk7708.cdl: Limit legal baud rate range.
+ * src/sh/sh_sci_serial.c: Use baud rate macro instead of hardwired
+ constants.
+
+2000-03-28 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/io_serial.cdl,
+ cdl/ser_arm_aeb.cdl,
+ cdl/ser_arm_cma230.cdl,
+ cdl/ser_arm_edb7xxx.cdl,
+ cdl/ser_arm_pid.cdl,
+ cdl/ser_i386_pc.cdl,
+ cdl/ser_mips_jmr3904.cdl,
+ cdl/ser_mips_vrc4373.cdl,
+ cdl/ser_mn10300.cdl,
+ cdl/ser_powerpc_cogent.cdl,
+ cdl/ser_quicc_smc.cdl,
+ cdl/ser_sh_edk7708.cdl,
+ cdl/ser_sparclite_sleb.cdl,
+ cdl/tty.cdl:
+
+ Adjust documentation URLs.
+
+2000-03-07 Jesper Skov <jskov@redhat.com>
+
+ * cdl/ser_mips_jmr3904.cdl: Rename devices to match CDL naming.
+
+2000-02-29 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/serialio.h: Correct baud rate typo: 230400 rather than
+ 234000. Thanks to Grant Edwards for the report.
+
+2000-02-28 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/powerpc/quicc_smc_serial.c: Use standard 'diag_dump_buf()'.
+
+2000-02-28 Jesper Skov <jskov@redhat.com>
+
+ * tests/ser_test_protocol.inl: Allow 115200 baud on Cogent
+ again. Fixed interrupt problem.
+
+2000-02-22 Jesper Skov <jskov@redhat.com>
+
+ * tests/ser_test_protocol.inl: Don't use 115200 baud on
+ Cogent. Our slower boards can't keep up.
+
+2000-02-17 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * cdl/ser_powerpc_cogent.cdl: Fix incorrect dependency.
+
+2000-02-16 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h:
+ Added configury for PC serial device drivers.
+
+ * cdl/ser_i386_pc.cdl:
+ * src/i386/pc_serial.c:
+ * src/i386/pc_serial.h:
+ Added these files to implement PC serial line drivers.
+
+ * cdl/io_serial.cdl:
+ Added CYGPKG_IO_SERIAL_I386_PC.
+
+ * tests/ser_test_protocol.inl:
+ Added support for PC serial line testing.
+
+2000-02-11 Jesper Skov <jskov@redhat.com>
+
+ * src/sh/sh_sci_7708.inl (DEVTAB_ENTRY):
+ * src/sparclite/sleb_sdtr.c:
+ serial_devio => cyg_io_serial_devio
+
+2000-02-10 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/mn10300/mn10300_serial.c: Ensure all CYG_HAL_MN10300_*
+ preprocessor conditionals use the correct CYGPKG_HAL_MN10300_AM3* form
+ now.
+
+2000-02-03 Jesper Skov <jskov@redhat.com>
+
+ * src/powerpc/quicc_smc_serial.c: CYG_HAL_POWERPC_x->CYGPKG_...
+
+2000-02-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/arm/aeb_serial.h: Rename lower case register macros to REG_ upper
+ case macros
+
+ * src/arm/aeb_serial.c: Update to reflect above
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/common/tty.c (tty_read): Fix problem with backspace at start
+ of line (size must be 'signed' for compare to work).
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+
+2000-01-17 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/common/tty.c (tty_read): Avoid echoing "backspace/erase" at
+ start of line.
+
+2000-01-05 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/common/serial.c (serial_write): Avoid potential deadlock if
+ transmit start actually sends enough characters to signal cond wait.
+
+2000-01-03 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/serial.h: Fix namespace pollution -
+ serial_devio => cyg_io_serial_devio
+ serial_callbacks => cyg_io_serial_callbacks
+
+ * src/mips/tx3904_serial.c:
+ * src/mips/vrc4373_serial.c:
+ * src/mn10300/mn10300_serial.c:
+ * src/powerpc/quicc_smc_serial.c:
+ * src/powerpc/cogent_serial_with_ints.c:
+ * src/sparclite/sleb_sdtr.c:
+ * src/arm/aeb_serial.c:
+ * src/arm/pid_serial_with_ints.c:
+ * src/arm/edb7xxx_serial.c:
+ * src/arm/cma230_serial.c:
+ * src/arm/ebsa285_serial.c:
+ * src/common/haldiag.c:
+ * src/common/serial.c: Fix namespace pollution -
+ serial_devio => cyg_io_serial_devio
+
+1999-12-06 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/pid_serial_with_ints.c (pid_serial_DSR): Add loop to handle
+ case where an interrupt represents multiple events.
+
+1999-11-19 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/powerpc/quicc_smc_serial.c: Channel select for SMC2 was wrong.
+
+1999-11-18 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h: Remove mention of 7209/7212.
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/io_serial.cdl: Define build options.
+
+1999-10-26 Jesper Skov <jskov@cygnus.co.uk>
+ * tests/serial5.c (serial_test): Reduce speed in thumb mode.
+
+ * src/arm/pid_serial.h: Added BE support.
+
+ * src/PKGconf.mak: Use CYGPKG_<> instead of CYG_<> to control what
+ needs to be compiled.
+
+1999-10-25 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/pid_serial.h (ISR_RxTO): Define - character received but
+ not handled "promptly".
+
+ * src/arm/pid_serial_with_ints.c (pid_serial_DSR): Handle rcv interrupts
+ properly (can't ignore them even with TO bit set).
+
+ * src/arm/cl7211_serial.c (cl7211_serial_rx_DSR): Need to handle all
+ input (empty input FIFO) otherwise characters get dropped.
+
+1999-10-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl: Removed AEB rev C change. Was bogus.
+
+1999-10-11 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl: Added configury for VR4300 testing.
+
+ * src/mips/vrc4373_serial.c: Added Bi-endian support.
+
+ * include/pkgconf/io_serial.h: Adjusted default baud rates to
+ 38400.
+
+1999-10-06 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl: Run tests on AEB rev C as well.
+
+1999-09-28 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/powerpc/quicc_smc_serial.c (quicc_smc_serial_init): Correct
+ value supplied for interrupt priority - it may be unused, but it
+ is asserted for range. Initialize the diagnostic channel if on an
+ MBX and if NOT using SMC1 ourselves, to ensure that diag output
+ and built-in stubs work correctly; otherwise reset the quicc and
+ ignore SMC1 as before. Fix various warnings, mostly about
+ casting/arg-passing/assigning away volatile.
+
+1999-08-31 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl: Define dummy crash ID.
+
+1999-08-30 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl: Added crash information which
+ should help track down repeating errors.
+
+1999-08-20 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/README: Added.
+
+1999-08-18 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/tty1.c:
+ * tests/tty2.c:
+ * tests/serial1.c:
+ * tests/serial2.c:
+ * tests/serial3.c:
+ * tests/serial4.c:
+ * tests/serial5.c:
+ * tests/PKGconf.mak:
+ Require kernel and kernel C API.
+
+1999-08-17 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/mn10300/mn10300_serial.c: Added a simple implementation of a
+ receive FIFO to try and reduce the overhead of receiving bytes.
+
+1999-08-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak:
+ * src/mn10300/mn10300_serial.c:
+ * tests/ser_test_protocol.inl:
+ Rename all am32 -> am31
+
+1999-08-12 Nick Garnett <nickg@cygnus.co.uk>
+
+ Imported following changes from development branch:
+
+ 1999-08-11 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/serial5.c: Modified config test for boards that need a lower
+ speed for this test.
+
+ * tests/ser_test_protocol.inl: Removed 14400 baud tests for all
+ MN10300 variants. The MN10300 cannot currently do this speed.
+
+ * src/mn10300/mn10300_serial.c: Tidied up the transmit interrupt
+ enable/disable code to be variant specific.
+
+ * include/pkgconf/io_serial.h: Undid Jonathan's change, since the
+ same options are used for all MN10300 variants.
+
+ 1999-08-10 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h:
+ Reparent CYGPKG_IO_SERIAL_MN10300 from under CYGPKG_HAL_MN10300 to
+ CYGPKG_HAL_MN10300_AM32_STDEVAL1 since it's stdeval1 specific
+
+ 1999-08-04 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl:
+ Changed names of MN10300 defines tested. Added AM33 definitions.
+
+ * src/mn10300/mn10300_serial.c:
+ Modified driver to work on am33 too. This simply requires some
+ alternate definitions of things like register addresses and some
+ bits in them plus some extra parameterization of some register
+ values.
+
+ * src/PKGconf.mak:
+ Added am33 to list of architectures supporting serial lines.
+
+1999-07-28 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h: Update descriptions to be more
+ generic (CL7x11 instead of CL7211).
+
+1999-07-28 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h: Correct typos in CDL description
+ for serial port 2 driver
+
+1999-07-26 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/arm/ebsa285_serial.c: New file: device driver for the serial
+ device of the Intel StrongARM EBSA-285 evaluation board.
+
+ * include/pkgconf/io_serial.h (CYGPKG_IO_SERIAL_ARM_EBSA285):
+ Config for it.
+
+ * src/PKGconf.mak (EXTRAS_COMPILE): Compile it.
+
+ * tests/ser_test_protocol.inl (TEST_SER_DEV): Enable testing of it.
+
+1999-07-08 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl (change_config): Changed implementation.
+
+1999-06-27 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/powerpc/quicc_smc_serial.c (quicc_smc_serial_init): More robust
+ initialization, with data cache disabled. This seems to fix the
+ random failures described below.
+
+ * tests/ser_test_protocol.inl: Add configuration for QUICC/MBX860.
+ Added some delays in the configuration change code to make QUICC
+ happy [didn't help much although the manual says they are required].
+
+ * src/powerpc/quicc_smc_serial.h (UART_BITRATE): Rewrote macro to
+ match what the Linux driver uses - still doesn't work well, though.
+
+ * src/powerpc/quicc_smc_serial.c: Lots of changes trying to get the
+ serial driver working and robust. At this point it works quite well,
+ using the default buffer sizes. Changing from the defaults seem to
+ easily break it though, certainly on input. Also, changing the baud
+ rate seems to not work reliably.
+
+ * src/common/serial.c: Add some tracing/debug info to try and debug
+ problems with QUICC serial driver. These are hard disabled with
+ "XX_" prepended to "CYGDBG_DIAG_BUF". Enabling them gives information
+ about how/when data are delivered from the serial driver.
+
+ * include/pkgconf/io_serial.h: Adjust limits and defaults on number and
+ size of buffers with values that seem to work.
+
+1999-06-21 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/sh/sh_sci_serial.c: Rearranged inclusion of .inl file a bit
+ to avoid compiler warnings.
+
+1999-06-21 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h: Fix CDL for number of buffers.
+
+ * src/powerpc/quicc_smc_serial.c: Force number of buffers = 1.
+
+1999-06-20 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h: Some clean up (removed commented
+ obsolete CDL parenting structure).
+ Add support for Motorola PowerPC QUICC/SMC.
+
+ * src/arm/cma230_serial.c:
+ * src/arm/cl7211_serial.c:
+ * src/arm/aeb_serial.c:
+ * src/arm/pid_serial_with_ints.c: Use #include to get 'diag_printf()'
+ prototypes.
+
+1999-06-17 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/cl7211_serial.c (cl7211_serial_start_xmit): Fix race which
+ cause xmitter to get stuck.
+
+1999-06-16 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/sh/sh_serial.c: [removed]
+ * src/sh/sh_sci_serial.c: [added]
+ * src/sh/sh_sci_7708.inl: [added]
+ * include/pkgconf/io_serial.h:
+ * src/PKGconf.mak (EXTRAS_COMPILE):
+ * tests/ser_test_protocol.inl:
+ Renamed CDL options and restructered driver.
+ Fixed CDL typo.
+
+1999-06-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h: Fixed CDL string for BAUD rate option.
+
+1999-06-04 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl: Disable testing at 115200
+ for Cogent CMA230 (ARM).
+
+ * src/arm/cma230_serial.c: Fix interrupt for port B.
+
+1999-05-31 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/sh/sh_serial.c: Fixed receive interrupts and added handler for
+ error interrupts.
+
+1999-05-28 Jesper Skov <jskov@cygnus.co.uk>
+
+ * io/serial/current/src/PKGconf.mak:
+ * io/serial/current/tests/ser_test_protocol.inl:
+ * include/pkgconf/io_serial.h:
+ Renamed SH platform package to edk7708.
+
+1999-05-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl: Added ability to change options in
+ host software.
+
+1999-05-27 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/mn10300/mn10300_serial.c (mn10300_serial_config_port):
+ Wait for the serial device to become acquiescent before disabling
+ it. This prevents cygmon's outgoing characters getting corrupted
+ due to transmission being disabled.
+ Fix for PR 20047
+
+1999-05-26 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h:
+ * tests/ser_test_protocol.inl: Add Cogent CMA230 setup.
+
+ * src/arm/cma230_serial.c: Make names compatible with Cogent
+ PowerPC board.
+
+1999-05-26 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl: Add Cirrus Logic CL7211 setup.
+1999-05-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/sh/sh_serial.c: Added more baud rate values. Disabled
+ interrupt driven receive. Fixed config_port to enable proper
+ interrupt flags.
+
+1999-05-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl:
+ Change all mentions of CYGPKG_HAL_TX39_JMR3904 to
+ CYGPKG_HAL_MIPS_TX39_JMR3904
+
+1999-05-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak (EXTRAS_COMPILE): Change CYG_HAL_TX39 to
+ CYG_HAL_MIPS_TX39
+1999-05-25 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl: Added sh entry.
+
+1999-05-24 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/PKGconf.mak:
+ * include/pkgconf/io_serial.h:
+ * src/sh/sh_serial.c:
+ Added sh driver.
+
+1999-05-18 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19926
+ * src/sparclite/sleb_sdtr.c (sleb_sdtr_rx_DSR): Only read chan if
+ there is one.
+
+1999-05-18 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19926
+ * src/arm/cl7211_serial.c (cl7211_serial_rx_DSR): Only read char
+ if there is one.
+
+1999-05-16 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/cl7211_serial.c: Clean up, first working version.
+
+1999-05-14 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl: Removed workaround for spurious
+ Cogent reads.
+
+ * src/arm/aeb_serial.c:
+ * src/arm/aeb_serial.h:
+ * src/arm/pid_serial_with_ints.c:
+ * src/arm/pid_serial.h:
+ * src/powerpc/cogent_serial.h:
+ * src/powerpc/cogent_serial_with_ints.c:
+ Check for receive interrupt before reading.
+
+1999-05-13 Nick Garnett <nickg@cygnus.co.uk>
+
+ The follow changes were made in a branch an have now been merged:
+
+ 1999-04-21 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/mips/vrc4373_serial.c: Small changes to get working with
+ interrupts.
+
+ 1999-04-20 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h: Fix CYGPKG_IO_SERIAL_TX39_JMR3904
+ parent attribute.
+
+1999-05-11 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/cl7211_serial.c: Fix compile problems from merged code.
+
+1999-05-05 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl: Tidied up a bit and added
+ description of protocol.
+
+1999-05-05 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/common/serial.c (serial_write, serial_read): Clear abort
+ flag at entry.
+
+1999-05-05 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/serial4.c (serial_test): Handle config fails correctly.
+
+ * tests/ser_test_protocol.inl: Better change_config
+ handling. Simple recovery and negotiation isn't timing
+ dependant.
+
+1999-05-05 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/timeout.inl: Updated with the below changes.
+
+1999-05-05 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * misc/timeout.inl (timeout): Timeouts are relative, but alarms
+ need absolute time values.
+
+1999-05-04 Jesper Skov <jskov@cygnus.co.uk>
+ PR 20018
+ * tests/serial1.c (serial_test): Always PASS, regardless of
+ configuration.
+
+1999-05-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl: Reverse order of configurations -
+ run tests with slow baud rate first.
+ Only check CYG_KERNEL_DIAG_GDB_SERIAL_DIRECT for SLEB on RAM startup.
+
+1999-05-04 Jesper Skov <jskov@cygnus.co.uk>
+ * src/mn10300/mn10300_serial.c:
+ Use interrupt enable/disable feature of serial port2 to allow
+ coexistence with CygMon/hal_diag.
+
+ * tests/ser_test_protocol.inl: Use port2 for MN10300.
+
+1999-04-28 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/PKGconf.mak (EXTRAS_COMPILE):
+ Use the new rules for generating libextras.a
+
+1999-04-26 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h: Add support for Cirrus Logic CL7211.
+
+
+1999-04-20 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/aeb_serial.c:
+ * src/arm/pid_serial_with_ints.c: Fix default baud rate if unbuffered.
+1999-04-20 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl: Added some comments. Disabled 38400
+ for SLEB. Only run test on SLEB if CygMon isn't used for diag
+ output.
+
+1999-04-15 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19752
+ * tests/serial3.c:
+ * tests/serial5.c:
+ Run these tests at a lower baud rate on ARM AEB.
+
+1999-04-14 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19839
+ * src/mn10300/mn10300_serial.c:
+ Fix compiler warnings.
+
+1999-04-14 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h:
+ Reparent the board-specific serial devices below the actual boards.
+
+1999-04-13 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl:
+ NA when run from simulator.
+
+1999-04-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl:
+ Disabled 115200 for MN10300.
+ Reclaim interrupt vectors from CygMon when testing on SLEB.
+
+1999-04-09 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/serial.h: Change SERIAL_CHANNEL setup so all channels
+ have serial callbacks, regardless of buffering.
+
+1999-04-09 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/common/tty.c:
+ * include/pkgconf/io_serial.h:
+ Added new ttydiag device layered on top of haldiag, so that tty0
+ can be layered on top of ser0.
+
+1999-04-08 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/tty1.c: [added]
+ * tests/tty2.c: [added]
+ * tests/PKGconf.mak:
+ * tests/ser_test_protocol.inl:
+ Added two simple TTY tests.
+
+1999-04-07 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/sparclite/sleb_sdtr.h: Include cyg/hal/hal_io.h for I/O
+ macros instead of hal_diag.h where they had evolved before.
+
+1999-04-06 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/serial4.c (serial_test):
+ * tests/serial3.c (serial_test):
+ Reduce packet sizes.
+
+1999-03-31 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl: Added remaining targets to the
+ test.
+
+1999-03-31 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/sparclite/sleb_sdtr.c (sleb_sdtr_start_xmit): Fix timing race
+ when enabling xmit interrupts.
+
+1999-03-26 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/sparclite/sleb_sdtr.c: Change how the port is set up. The transmitter
+ is now always enabled, just the interrupts are masked/unmasked to control it.
+ This lets the serial driver cooperate with Cygmon on the port used for GDB.
+ Note that currently serial input does not work for CON1 since Cygmon is
+ taking all of the receive interrupts for itself.
+ (sleb_sdtr_tx_DSR): Need to keep track whether xmit interrupt should be
+ enabled - otherwise it can get enabled incorrectly and we get interrupted
+ to death!
+
+1999-03-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl: Send a DONE message after a no-echo
+ binary packet.
+
+1999-03-26 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/serial5.c:
+ * tests/serial4.c:
+ * tests/serial3.c:
+ * tests/serial2.c:
+ * tests/serial1.c:
+ Make these build when no kernel present; include of testcase
+ was the wrong side of the ifdef.
+
+1999-03-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/serial5.c:
+ * tests/serial4.c:
+ * tests/serial3.c:
+ * tests/serial2.c:
+ * tests/serial1.c:
+ Moved NOP check to ser_test_protocol open call.
+
+ * tests/ser_test_protocol.inl: Make sure the proper device is
+ selected for testing. Do NOP check in open call.
+
+1999-03-25 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h:
+ * misc/console.c:
+ * src/arm/aeb_serial.c:
+ * src/arm/pid_serial_with_ints.c:
+ * src/common/tty.c:
+ * src/mips/tx3904_serial.c:
+ * src/mn10300/mn10300_serial.c:
+ * src/powerpc/cogent_serial_with_ints.c:
+ * src/sparclite/sleb_sdtr.c: Update CDL to follow naming conventions.
+
+ * src/mips/tx3904_serial.c (tx3904_serial_config_port):
+ Make sure port is enabled (CDL) before using it.
+
+ * src/mn10300/mn10300_serial.c (mn10300_serial_config_port):
+ * src/powerpc/cogent_serial_with_ints.c (cogent_serial_config_port):
+ * src/arm/aeb_serial.c (aeb_serial_config_port):
+ * src/arm/pid_serial_with_ints.c (pid_serial_config_port): Change so that
+ the physical port is not modified unless the provided configuration is valid.
+
+ * src/sparclite/sleb_sdtr.c (sleb_sdtr_config_port):
+ Using wrong config data.
+
+ * include/serialio.h: Add macros to support baud rate from CDL.
+
+ * include/pkgconf/io_serial.h:
+ * src/mn10300/mn10300_serial.c:
+ * src/mips/tx3904_serial.c (tx3904_serial_ISR):
+ * src/sparclite/sleb_sdtr.c:
+ * src/powerpc/cogent_serial_with_ints.c:
+ * src/arm/pid_serial_with_ints.c:
+ * src/arm/aeb_serial.c: Add configury for baud rate and buffer size.
+
+1999-03-24 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/mips/tx3904_serial.c:
+ Now uses CYGHWR_HAL_MIPS_CPU_FREQ_ACTUAL to get CPU
+ frequency. This is a little more accurate than using
+ CYGHWR_HAL_MIPS_CPU_FREQ.
+
+1999-03-24 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/serialio.h (CYGNUM_SERIAL_BAUD_MIN/MAX): Add for completeness.
+
+ * src/arm/aeb_serial.c (aeb_serial_stop_xmit):
+ * src/arm/pid_serial_with_ints.c (pid_serial_stop_xmit): Fix typo in comment.
+
+1999-03-24 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/ser_test_protocol.inl: Weeded out configs TX39 doesn't
+ like.
+
+ * src/powerpc/cogent_serial.h:
+ Added copyright header.
+
+ * tests/ser_test_protocol.inl:
+ * tests/serial1.c:
+ * tests/serial2.c:
+ * tests/serial3.c:
+ * tests/serial4.c:
+ * tests/serial5.c:
+ Don't try to run tests when no IO device has been specified.
+
+1999-03-23 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/serial1.c, misc/serial2.c, misc/serial3.c, misc/serial4.c,
+ * misc/serial5.c, misc/ser_test_protocol.inl
+ Deleted.
+
+1999-03-23 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/PKGconf.mak:
+ * tests/timeout.inl:
+ * tests/PKGconf.mak:
+ * tests/serial1.c:
+ * tests/serial2.c:
+ * tests/serial3.c:
+ * tests/serial4.c:
+ * tests/serial5.c:
+ * tests/ser_test_protocol.inl:
+ Moved the serial tests from the misc directory to the tests
+ directory.
+
+1999-03-23 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/mn10300/mn10300_serial.c: Now initially mask TX interrupts
+ at initialization and unmask/remask in start/stop xmit
+ routines. This has no real effect on the hardware, but the
+ simulator does not implement the LCR_TXE bit properly, resulting
+ in spurious TX interrupts during diagnostic output.
+ This was the cause of the slow output reported in PR 19559.
+
+1999-03-23 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h: Fix "display" strings to have appropriate
+ case - mostly lower case.
+
+1999-03-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * misc/console.c:
+ * misc/serial.c:
+ * misc/serial1.c:
+ * misc/serial2.c:
+ * misc/serial3.c:
+ * misc/serial4.c:
+ * misc/serial5.c:
+ Use CYGNUM_HAL_STACK_SIZE_TYPICAL for the stack size instead of
+ CYGNUM_HAL_MINIMUM_STACK_SIZE.
+
+1999-03-22 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/mn10300/mn10300_serial.c:
+ * src/mips/tx3904_serial.c: Add CDL configury.
+
+ * include/pkgconf/io_serial.h: Update CDL to add device name
+ configurability for all devices.
+
+ * src/sparclite/sleb_sdtr.c:
+ * src/powerpc/cogent_serial_with_ints.c:
+ * src/arm/aeb_serial.c:
+ * src/arm/pid_serial_with_ints.c: Use CDL configured device names.
+
+1999-03-22 Jesper Skov <jskov@lassi.cygnus.co.uk>
+
+ * misc/serial1.c:
+ * misc/serial2.c:
+ * misc/serial3.c:
+ * misc/serial4.c:
+ * misc/serial5.c:
+ Requires kernel as well.
+
+1999-03-22 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/sparclite/sleb_sdtr.c:
+ Moved include statement to avoid warnings.
+
+1999-03-19 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/ser_test_protocol.inl:
+ * misc/serial5.c:
+ * misc/PKGconf.mak:
+ Replace complex and not very stable duplex test with a simpler
+ test that works better.
+ Added serial5 using that test.
+
+1999-03-19 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/PKGconf.mak:
+ * misc/serial1.c:
+ * misc/serial2.c:
+ Added API test and made serial2 do simple string output.
+
+1999-03-19 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/powerpc/cogent_serial_with_ints.c: Changed ToDo comment.
+
+1999-03-19 Jesper Skov <jskov@lassi.cygnus.co.uk>
+
+ * src/powerpc/cogent_serial_with_ints.c:
+ * src/arm/aeb_serial.c:
+ * src/arm/pid_serial_with_ints.c:
+ Moved include statement to avoid warnings.
+
+1999-03-19 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h: More CDL problems.
+
+1999-03-18 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h: Add CDL for SPARClite SLEB.
+
+ * src/powerpc/cogent_serial_with_ints.c:
+ * src/arm/pid_serial_with_ints.c:
+ * src/arm/aeb_serial.c: Update device names to match CDL.
+
+ * include/pkgconf/io_serial.h: Change names for serial ports to
+ be CYGPKG_IO_SERIAL_<arch>_<platform>_<port>.
+
+1999-03-18 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/ser_test_protocol.inl:
+ * misc/serial2.c:
+ First stab at the duplex binary test. Still much fun to be had...
+
+1999-03-18 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/ser_test_protocol.inl: Added timeout for PING.
+
+1999-03-18 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/common/serial.c: Change ABORT functionality to be DSR safe.
+ (serial_get_config): Fix typo!
+
+ * include/pkgconf/io_serial.h: Small change in CDL to make serial
+ devices tied to the platform and not the serial I/O package. This
+ means that only the devices appropriate to a given platform can be
+ enabled.
+
+ * misc/serial.c: Better use of alarms - only trigger at the time of
+ the next timeout. Moved timeout functions to new file "timeout.inl".
+
+ * src/common/serial.c (serial_get_config): Add support for
+ CYG_IO_GET_CONFIG_SERIAL_INPUT_FLUSH and CYG_IO_GET_CONFIG_SERIAL_ABORT.
+
+ * misc/serial.c: Add simple timeout mechanisms.
+
+1999-03-17 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/powerpc/cogent_serial_with_ints.c:
+ * src/arm/aeb_serial.c:
+ * src/arm/pid_serial_with_ints.c: Conditionalize based on CDL.
+
+ * include/pkgconf/io_serial.h: Add some CDL configury - not perfect
+ because of current ~CDL limitations.
+
+1999-03-17 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/serial2.c: Cleaned up a bit. Used for hacking new tests.
+
+1999-03-17 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/PKGconf.mak:
+ * misc/ser_test_protocol.inl:
+ * misc/serial2.c:
+ * misc/serial3.c:
+ * misc/serial4.c:
+ Put testing protocol implementation in a separate file. Split the
+ tests in serial2 into separate files.
+
+1999-03-16 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/mn10300/mn10300_serial.c: Fixed some compiler warnings.
+
+1999-03-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h: Change default configurations.
+ No serial drivers enabled for PID port A or AEB.
+
+ * src/sparclite/sleb_sdtr.c:
+ * src/powerpc/cogent_serial_with_ints.c:
+ * src/arm/aeb_serial.c:
+ * src/arm/pid_serial_with_ints.c:
+ * src/common/haldiag.c:
+ * src/common/tty.c:
+ * src/common/serial.c: Add 'CYGDBG_IO_INIT' for control of init
+ messages.
+
+ * src/powerpc/cogent_serial_with_ints.c:
+ * src/sparclite/sleb_sdtr.c:
+ * src/arm/aeb_serial.c:
+ * src/arm/pid_serial_with_ints.c: Don't include <cyg/kernel/kapi.h>
+
+1999-03-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/serial2.c (serial_test): Fix use of strlen. Fix DONE part
+ of binary protocol.
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/serial2.c: Play a bit with timing. Think I broke it :(
+ Added DONE to BINARY packet.
+ Proper call to DRAIN.
+
+1999-03-12 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/mips/tx3904_serial.c: Tidied away some debugging code.
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/serial2.c: Removed bogus config changes.
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/serial2.c (serial_test): Check for ser_filter on host (PING
+ packet).
+
+1999-03-11 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/powerpc/cogent_serial_with_ints.c: Added note.
+
+ * misc/serial2.c:
+ Added (almost) proper configuration handling.
+ Run tests on varying configurations.
+
+1999-03-11 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/mips/tx3904_serial.c:
+ Many changes to get working.
+
+ * misc/console.c (console_test): Fixed compiler warning.
+
+ * misc/serial2.c:
+ Added device name for TX39 testing.
+ Fixed some bugs in Tcyg_io_write() macro.
+
+1999-03-10 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/serial2.c: Added target specific test device name.
+
+1999-03-10 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h: Correct CDL description spelling.
+
+1999-03-10 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/powerpc/cogent_serial_with_ints.c:
+ * misc/console.c:
+ Fixed compiler warnings.
+
+1999-03-10 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h: Improve CDL descriptions.
+
+1999-03-10 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/serial2.c (serial_test): Do some more tests with changed
+ baud rates.
+
+1999-03-09 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/serial2.c (serial_test): Added workaround for spurious byte
+ problem. Added a few more tests to run.
+
+ * src/powerpc/cogent_serial_with_ints.c
+ (cogent_serial_config_port): Remove interrupt enabling.
+
+1999-03-09 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/PKGconf.mak:
+ * src/mips/tx3904_serial.c:
+ Added initial version of TX39 device driver. Currently untested
+ but eliminates PR19445.
+
+1999-03-09 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/serial2.c: DRAIN function works now.
+
+1999-03-09 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/io_serial.h: Only enable one serial driver per
+ default.
+
+1999-03-08 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/serial2.c (serial_test): Be a bit more aggressive.
+
+ * src/powerpc/cogent_serial_with_ints.c: Check that configuration
+ is sensible.
+
+1999-03-08 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/powerpc/cogent_serial_with_ints.c:
+ Added support for both ports.
+
+ * include/pkgconf/io_serial.h: Added simple defines for cogent
+ serial ports. No CDL yet.
+
+1999-03-08 Jesper Skov <jskov@cygnus.co.uk>
+
+ * misc/serial.c: Removed PID references. Fixed compiler warnings.
+
+1999-03-08 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/powerpc/cogent_serial_with_ints.c: Cleaned up a
+ bit. Actually works now.
+
+1999-03-08 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/common/serial.c: Change in cyg_drv_cond_wait() behaviour
+ means DSR lock should be left alone.
+
+1999-03-08 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19400
+ * src/powerpc/cogent_serial_with_ints.c (cogent_serial_init): Set
+ valid interrupt priority.
+
+1999-03-05 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/mn10300/mn10300_serial.c (mn10300_serial_init):
+ Added extra test to avoid initializing serial 2 when CYGMON is
+ present.
+ Include hal_intr.h explicitly for use in non-kernel
+ configurations.
+
+ * src/common/serial.c:
+ Added extra test before calls to cyg_drv_cond_wait() to avoid race
+ condition. This is not, however, a complete solution to this
+ problem. A better solution will be forthcoming.
+
+ * include/serial.h:
+ Changed include files used to permit non-kernel configurations to
+ be built.
+
+1999-03-05 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/common/haldiag.c: Removed diag_printf declaration.
+
+1999-03-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/mn10300/mn10300_serial.c:
+ Change CYG_VECTOR_* to CYGNUM_HAL_INTERRUPT_* to get it to compile!
+
+1999-03-05 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/powerpc/cogent_serial_with_ints.c (cogent_serial_config_port):
+ Fix renaming of interrupt vectors.
+
+1999-03-05 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/arm/pid_serial_with_ints.c: Fix interrupt vectors.
+
+1999-03-03 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * serial/current/src/arm/pid_serial_with_ints.c:
+ New [somewhat] configurable drivers for PID.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/io/serial/current/cdl/io_serial.cdl b/cesar/ecos/packages/io/serial/current/cdl/io_serial.cdl
new file mode 100644
index 0000000000..268064b6ea
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/cdl/io_serial.cdl
@@ -0,0 +1,362 @@
+# ====================================================================
+#
+# io_serial.cdl
+#
+# eCos IO configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: gthomas
+# Contributors:
+# Date: 1999-07-07
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_IO_SERIAL {
+ display "Serial device drivers"
+ active_if CYGPKG_IO
+ requires CYGPKG_ERROR
+ include_dir cyg/io
+ description "
+ This option enables drivers for basic I/O services on
+ serial devices."
+ doc ref/io.html
+
+ compile -library=libextras.a common/serial.c
+
+ define_proc {
+ puts $::cdl_header "/***** proc output start *****/"
+ puts $::cdl_header "#include <pkgconf/system.h>"
+ puts $::cdl_header "#ifdef CYGDAT_IO_SERIAL_DEVICE_HEADER"
+ puts $::cdl_header "# include CYGDAT_IO_SERIAL_DEVICE_HEADER"
+ puts $::cdl_header "#endif "
+ puts $::cdl_header "/****** proc output end ******/"
+ }
+
+ cdl_option CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING {
+ display "Support non-blocking read and write calls"
+ default_value 0
+ description "
+ This option enables extra code in the generic serial driver
+ which allows clients to switch read() and write() call
+ semantics from blocking to non-blocking."
+ }
+
+ cdl_interface CYGINT_IO_SERIAL_BLOCK_TRANSFER {
+ display "Driver requires block transfer callback functions"
+ description "
+ Some low-level drivers can be optimized to transfer blocks
+ of data instead of a single character at a time. These usually
+ rely on a hardware FIFO of some sort."
+ }
+
+ cdl_interface CYGINT_IO_SERIAL_LINE_STATUS_HW {
+ display "Serial driver supports line status"
+ }
+
+ cdl_option CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS {
+ display "Support line status callbacks"
+ requires { CYGINT_IO_SERIAL_LINE_STATUS_HW > 0 }
+ default_value { 0 != CYGINT_IO_SERIAL_LINE_STATUS_HW }
+ description "
+ This option indicates that if the serial driver supports it,
+ serial line status and modem status information should be
+ propagated to higher layers via callbacks."
+ }
+
+ cdl_component CYGPKG_IO_SERIAL_FLOW_CONTROL {
+ display "Flow control"
+ description "
+ This component contains options related to flow control."
+ flavor bool
+ requires (CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE || \
+ CYGOPT_IO_SERIAL_FLOW_CONTROL_HW)
+ default_value 0
+
+ cdl_component CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE {
+ display "Software flow control"
+ default_value 1
+ description "
+ This component enables support of software flow control."
+
+ cdl_option CYGDAT_IO_SERIAL_FLOW_CONTROL_XON_CHAR {
+ display "Start character"
+ flavor data
+ default_value 17
+ legal_values 0 to 255
+ description "
+ This option specifies the ascii character used to
+ indicate that transmission should start."
+ }
+
+ cdl_option CYGDAT_IO_SERIAL_FLOW_CONTROL_XOFF_CHAR {
+ display "Stop character"
+ flavor data
+ default_value 19
+ legal_values 0 to 255
+ description "
+ This option specifies the ascii character used to
+ indicate that transmission should stop."
+ }
+ }
+
+ cdl_option CYGOPT_IO_SERIAL_FLOW_CONTROL_HW {
+ display "Hardware flow control"
+ active_if { CYGINT_IO_SERIAL_FLOW_CONTROL_HW > 0 }
+ requires { CYGINT_IO_SERIAL_FLOW_CONTROL_HW > 0 }
+ requires CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
+ default_value { CYGINT_IO_SERIAL_FLOW_CONTROL_HW > 0 ? \
+ CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS : 0 }
+ description "
+ If the hardware supports it, this option allows hardware
+ flow control to be enabled. This may be in the form of
+ either or both of RTS/CTS, or DSR/DTR flow control."
+ }
+
+ cdl_interface CYGINT_IO_SERIAL_FLOW_CONTROL_HW {
+ display "Serial h/w supports hardware flow control"
+ }
+
+ cdl_option CYGDAT_IO_SERIAL_FLOW_CONTROL_DEFAULT {
+ display "Default flow control method"
+ flavor data
+ legal_values { "NONE" "XONXOFF" "RTSCTS" "DSRDTR" }
+ default_value { "NONE" }
+ description "This option allows a default flow control method
+ to be defined. Combinations of flow control methods
+ may also be set, but this is only possible by
+ using the cyg_io_set_config() API in source code."
+ }
+
+ cdl_option CYGNUM_IO_SERIAL_FLOW_CONTROL_LOW_WATER_PERCENT {
+ display "Rx flow control low water mark"
+ flavor data
+ legal_values 1 to 100
+ default_value 33
+ description "This sets the water mark used for determining
+ when to disable flow control, expressed
+ as a percentage of the buffer size. When the
+ receive buffer size is lower than this percentage,
+ if the transmitter had previously been throttled, it
+ will now be informed it can restart."
+ }
+
+ cdl_option CYGNUM_IO_SERIAL_FLOW_CONTROL_HIGH_WATER_PERCENT {
+ display "Rx flow control high water mark"
+ flavor data
+ legal_values 1 to 100
+ default_value 66
+ requires { CYGNUM_IO_SERIAL_FLOW_CONTROL_HIGH_WATER_PERCENT >= \
+ CYGNUM_IO_SERIAL_FLOW_CONTROL_LOW_WATER_PERCENT }
+ description "This sets the water mark used for determining
+ when to enable flow control, expressed
+ as a percentage of the buffer size. When the
+ receive buffer size exceeds this percentage,
+ signals are sent to the transmitter to tell it
+ to throttle tranmission."
+ }
+
+ }
+
+ cdl_component CYGPKG_IO_SERIAL_TTY {
+ display "TTY-mode serial device drivers"
+ flavor bool
+ default_value 1
+ description "
+ This option enables a simple terminal-like device driver
+ that can be used for serial devices that interact with humans,
+ such as a system console."
+
+ script tty.cdl
+ compile -library=libextras.a common/tty.c
+ }
+
+ cdl_component CYGPKG_IO_SERIAL_TERMIOS {
+ display "Termios compatible TTY drivers"
+ flavor bool
+ requires CYGPKG_ISOINFRA
+ requires CYGPKG_IO_FILEIO
+ requires CYGINT_ISO_ERRNO_CODES
+ requires CYGINT_ISO_ERRNO
+ requires CYGINT_ISO_MALLOC
+ default_value { 0 != CYGPKG_ISOINFRA && 0 != CYGPKG_IO_FILEIO && \
+ 0 != CYGINT_ISO_ERRNO_CODES && \
+ 0 != CYGINT_ISO_ERRNO }
+ implements CYGINT_ISO_TERMIOS
+ description "
+ This option enables terminal drivers compatible with
+ POSIX termios."
+
+ script termios.cdl
+ compile common/termios.c
+ }
+
+ cdl_component CYGPKG_IO_SERIAL_DEVICES {
+ display "Hardware serial device drivers"
+ flavor bool
+ default_value 0
+ description "
+ This option enables the hardware device drivers
+ for the current platform."
+ }
+
+ cdl_option CYGBLD_IO_SERIAL_EXTRA_TESTS {
+ display "Build extra serial tests"
+ default_value 0
+ no_define
+ description "
+ This option enables the building of some extra tests which
+ can be used when testing / debugging serial drivers. These
+ are not built by default since they do not use the dedicated
+ testing infrastructure."
+
+ make -priority 320 {
+ <PREFIX>/bin/serial_echo : <PACKAGE>/tests/serial_echo.c
+ @sh -c "mkdir -p tests $(dir $@)"
+ $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o tests/serial_echo.o $<
+ @echo $@ ": \\" > $(notdir $@).deps
+ @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
+ @tail -n +2 deps.tmp >> $(notdir $@).deps
+ @echo >> $(notdir $@).deps
+ @rm deps.tmp
+ $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ tests/serial_echo.o
+ }
+ }
+
+ cdl_component CYGPKG_IO_SERIAL_OPTIONS {
+ display "Serial device driver build options"
+ flavor none
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_IO_SERIAL_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the serial device drivers. These flags are used in addition
+ to the set of global flags."
+ }
+
+ cdl_option CYGPKG_IO_SERIAL_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the serial device drivers. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_IO_SERIAL_TESTS {
+ display "Serial device driver tests"
+ flavor data
+ no_define
+ calculated { CYGPKG_IO_SERIAL_DEVICES ? "tests/serial1 tests/serial2 tests/serial3 tests/serial4 tests/serial5 tests/tty1 tests/tty2 tests/flow1 tests/flow2" : "" }
+ description "
+ This option specifies the set of tests for the serial device drivers."
+ }
+ }
+
+ cdl_option CYGPKG_IO_SERIAL_SELECT_SUPPORT {
+ display "Enable serial device select support"
+ flavor bool
+ active_if CYGPKG_IO_FILEIO
+ requires { CYGFUN_IO_FILEIO_SELECT == 1 }
+ default_value 1
+ description "
+ This option enables support for the select() API function on all
+ serial devices."
+ }
+
+ # These could be regular define_proc outputs, but keeping them as
+ # CDL interfaces allow us to possibly skip building/running some
+ # tests.
+ cdl_component CYGPKG_IO_SERIAL_TEST_SPECS {
+ display "Serial testing specification"
+ flavor bool
+ calculated 1
+ no_define
+
+ cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_9600 {
+ display "Skip 9600 baud testing"
+ }
+
+ cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_14400 {
+ display "Skip 14400 baud testing"
+ }
+
+ cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_19200 {
+ display "Skip 19200 baud testing"
+ }
+
+ cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_38400 {
+ display "Skip 38400 baud testing"
+ }
+
+ cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_57600 {
+ display "Skip 57600 baud testing"
+ }
+
+ cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_115200 {
+ display "Skip 115200 baud testing"
+ }
+
+ cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_PARITY_EVEN {
+ display "Skip even-parity testing"
+ }
+
+ cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_PARITY_ODD {
+ display "Skip odd-parity testing"
+ }
+
+ cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_STOP_2 {
+ display "Skip 2-stop bit testing"
+ }
+ }
+}
+
+# EOF io_serial.cdl
diff --git a/cesar/ecos/packages/io/serial/current/cdl/termios.cdl b/cesar/ecos/packages/io/serial/current/cdl/termios.cdl
new file mode 100644
index 0000000000..5bda266e3d
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/cdl/termios.cdl
@@ -0,0 +1,132 @@
+# ====================================================================
+#
+# termios.cdl
+#
+# eCos POSIX termios compatible terminal configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jlarmour, gthomas
+# Contributors:
+# Date: 2000-07-22
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_interface CYGINT_IO_SERIAL_TERMIOS_TERMIOS_TTY {
+ display "Interface for termios tty driver file enabling"
+}
+
+cdl_option CYGBLD_IO_SERIAL_TERMIOS_TERMIOS_TTY {
+ display "Build termios tty driver file"
+ calculated 1
+ active_if { CYGINT_IO_SERIAL_TERMIOS_TERMIOS_TTY > 0 }
+ compile -library=libextras.a common/termiostty.c
+}
+
+
+cdl_component CYGPKG_IO_SERIAL_TERMIOS_TERMIOS0 {
+ display "Termios TTY channel #0"
+ flavor bool
+ default_value 0
+ implements CYGINT_IO_SERIAL_TERMIOS_TERMIOS_TTY
+ description "
+ This option causes '/dev/termios0' to be included in the standard
+ drivers."
+
+ cdl_option CYGDAT_IO_SERIAL_TERMIOS_TERMIOS0_DEV {
+ display "Termios TTY channel #0 device"
+ flavor data
+ default_value { "\"/dev/ser0\"" }
+ description "
+ This option selects the physical device to use for
+ '/dev/termios0'."
+ }
+}
+cdl_component CYGPKG_IO_SERIAL_TERMIOS_TERMIOS1 {
+ display "Termios TTY channel #1"
+ flavor bool
+ default_value 0
+ implements CYGINT_IO_SERIAL_TERMIOS_TERMIOS_TTY
+ description "
+ This option causes '/dev/termios1' to be included in the standard
+ drivers."
+
+ cdl_option CYGDAT_IO_SERIAL_TERMIOS_TERMIOS1_DEV {
+ display "Termios TTY channel #1 device"
+ flavor data
+ default_value {"\"/dev/ser1\""}
+ description "
+ This option selects the physical device to use for
+ '/dev/termios1'."
+ }
+}
+
+cdl_component CYGPKG_IO_SERIAL_TERMIOS_TERMIOS2 {
+ display "Termios TTY channel #2"
+ flavor bool
+ default_value 0
+ implements CYGINT_IO_SERIAL_TERMIOS_TERMIOS_TTY
+ description "
+ This option causes '/dev/termios2' to be included in the standard
+ drivers."
+
+ cdl_option CYGDAT_IO_SERIAL_TERMIOS_TERMIOS2_DEV {
+ display "Termios TTY channel #2 device"
+ flavor data
+ default_value {"\"/dev/ser2\""}
+ description "
+ This option selects the physical device to use for
+ '/dev/termios2'."
+ }
+}
+
+cdl_option CYGSEM_IO_SERIAL_TERMIOS_USE_SIGNALS {
+ display "Support signals"
+ flavor bool
+ requires CYGINT_ISO_SIGNAL_NUMBERS
+ requires CYGINT_ISO_SIGNAL_IMPL
+ default_value { CYGINT_ISO_SIGNAL_NUMBERS != 0 && \
+ CYGINT_ISO_SIGNAL_IMPL != 0 }
+ description "This option selects whether those parts of the termios
+ interface involving signals is supported. This includes
+ BRKINT mode, the INTR and QUIT characters, and whether
+ SIGHUP is sent on terminal close."
+}
+
+# EOF termios.cdl
diff --git a/cesar/ecos/packages/io/serial/current/cdl/tty.cdl b/cesar/ecos/packages/io/serial/current/cdl/tty.cdl
new file mode 100644
index 0000000000..54e5defc83
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/cdl/tty.cdl
@@ -0,0 +1,130 @@
+# ====================================================================
+#
+# tty.cdl
+#
+# eCos serial TTY configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: gthomas
+# Contributors:
+# Date: 1999-07-07
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_component CYGPKG_IO_SERIAL_HALDIAG {
+ display "HAL/diag serial device driver"
+ flavor bool
+ default_value 1
+ description "
+ This option enables the use of the HAL diagnostic channel
+ via the standard I/O drivers."
+ compile -library=libextras.a common/haldiag.c
+}
+
+cdl_option CYGDAT_IO_SERIAL_TTY_CONSOLE {
+ display "Console device name"
+ flavor data
+ default_value {"\"/dev/ttydiag\""}
+ description "
+ This option selects the TTY device to use for the console."
+}
+
+cdl_component CYGPKG_IO_SERIAL_TTY_TTYDIAG {
+ display "TTY mode HAL/diag channel"
+ flavor bool
+ default_value 1
+ description "
+ This option causes '/dev/ttydiag' to be included in the standard
+ drivers."
+}
+
+cdl_component CYGPKG_IO_SERIAL_TTY_TTY0 {
+ display "TTY mode channel #0"
+ flavor bool
+ default_value 0
+ description "
+ This option causes '/dev/tty0' to be included in the standard
+ drivers."
+
+ cdl_option CYGDAT_IO_SERIAL_TTY_TTY0_DEV {
+ display "TTY mode channel #0 device"
+ flavor data
+ default_value { "\"/dev/ser0\"" }
+ description "
+ This option selects the physical device to use for
+ '/dev/tty0'."
+ }
+}
+cdl_component CYGPKG_IO_SERIAL_TTY_TTY1 {
+ display "TTY mode channel #1"
+ flavor bool
+ default_value 0
+ description "
+ This option causes '/dev/tty1' to be included in the standard
+ drivers."
+
+ cdl_option CYGDAT_IO_SERIAL_TTY_TTY1_DEV {
+ display "TTY mode channel #1 device"
+ flavor data
+ default_value {"\"/dev/ser1\""}
+ description "
+ This option selects the physical device to use for
+ '/dev/tty1'."
+ }
+}
+
+cdl_component CYGPKG_IO_SERIAL_TTY_TTY2 {
+ display "TTY mode channel #2"
+ flavor bool
+ default_value 0
+ description "
+ This option causes '/dev/tty2' to be included in the standard
+ drivers."
+
+ cdl_option CYGDAT_IO_SERIAL_TTY_TTY2_DEV {
+ display "TTY mode channel #2 device"
+ flavor data
+ default_value {"\"/dev/ser2\""}
+ description "
+ This option selects the physical device to use for
+ '/dev/tty2'."
+ }
+}
diff --git a/cesar/ecos/packages/io/serial/current/include/serial.h b/cesar/ecos/packages/io/serial/current/include/serial.h
new file mode 100644
index 0000000000..7804d04926
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/include/serial.h
@@ -0,0 +1,277 @@
+#ifndef CYGONCE_SERIAL_H
+#define CYGONCE_SERIAL_H
+// ====================================================================
+//
+// serial.h
+//
+// Device I/O
+//
+// ====================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+// ====================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-02-04
+// Purpose: Internal interfaces for serial I/O drivers
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+// ====================================================================
+
+// Serial I/O interfaces
+
+#include <pkgconf/system.h>
+#include <pkgconf/io_serial.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/io/io.h>
+#include <cyg/io/serialio.h>
+#include <cyg/io/devtab.h>
+#include <cyg/hal/drv_api.h>
+
+#ifdef CYGPKG_IO_SERIAL_SELECT_SUPPORT
+#include <cyg/fileio/fileio.h>
+#endif
+
+typedef struct serial_channel serial_channel;
+typedef struct serial_funs serial_funs;
+
+// The block transfer request functions may fail for one of two
+// reasons. It's important for the caller to know which.
+typedef enum {
+ CYG_RCV_OK,
+ CYG_RCV_FULL,
+ CYG_RCV_DISABLED
+} rcv_req_reply_t;
+
+typedef enum {
+ CYG_XMT_OK,
+ CYG_XMT_EMPTY,
+ CYG_XMT_DISABLED
+} xmt_req_reply_t;
+
+// Pointers into upper-level driver which interrupt handlers need
+typedef struct {
+ // Initialize the channel
+ void (*serial_init)(serial_channel *chan);
+ // Cause an additional character to be output if one is available
+ void (*xmt_char)(serial_channel *chan);
+ // Consume an input character
+ void (*rcv_char)(serial_channel *chan, unsigned char c);
+#if CYGINT_IO_SERIAL_BLOCK_TRANSFER
+ // Request space for input characters
+ rcv_req_reply_t (*data_rcv_req)(serial_channel *chan, int avail,
+ int* space_avail, unsigned char** space);
+ // Receive operation completed
+ void (*data_rcv_done)(serial_channel *chan, int chars_rcvd);
+ // Request characters for transmission
+ xmt_req_reply_t (*data_xmt_req)(serial_channel *chan, int space,
+ int* chars_avail, unsigned char** chars);
+ // Transmit operation completed
+ void (*data_xmt_done)(serial_channel *chan, int chars_sent);
+#endif
+#if defined(CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS)
+ void (*indicate_status)(serial_channel *chan, cyg_serial_line_status_t *s );
+#endif
+} serial_callbacks_t;
+
+#if CYGINT_IO_SERIAL_BLOCK_TRANSFER
+# ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
+# define SERIAL_CALLBACKS(_l,_init,_xmt_char,_rcv_char, _data_rcv_req, _data_rcv_done, _data_xmt_req, _data_xmt_done, _indicate_status) \
+serial_callbacks_t _l = { \
+ _init, \
+ _xmt_char, \
+ _rcv_char, \
+ _data_rcv_req, \
+ _data_rcv_done, \
+ _data_xmt_req, \
+ _data_xmt_done, \
+ _indicate_status \
+};
+# else
+# define SERIAL_CALLBACKS(_l,_init,_xmt_char,_rcv_char, _data_rcv_req, _data_rcv_done, _data_xmt_req, _data_xmt_done) \
+serial_callbacks_t _l = { \
+ _init, \
+ _xmt_char, \
+ _rcv_char, \
+ _data_rcv_req, \
+ _data_rcv_done, \
+ _data_xmt_req, \
+ _data_xmt_done \
+};
+# endif
+#else
+# ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
+# define SERIAL_CALLBACKS(_l,_init,_xmt_char,_rcv_char,_indicate_status) \
+serial_callbacks_t _l = { \
+ _init, \
+ _xmt_char, \
+ _rcv_char, \
+ _indicate_status \
+};
+# else
+# define SERIAL_CALLBACKS(_l,_init,_xmt_char,_rcv_char) \
+serial_callbacks_t _l = { \
+ _init, \
+ _xmt_char, \
+ _rcv_char \
+};
+# endif
+#endif
+
+extern serial_callbacks_t cyg_io_serial_callbacks;
+
+typedef struct {
+ unsigned char *data;
+ volatile int put;
+ volatile int get;
+ int len;
+ volatile int nb; // count of bytes currently in buffer
+ int low_water; // For tx: min space in buffer before restart
+ // For rx: max buffer used before flow unthrottled
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+ int high_water; // For tx: unused
+ // For rx: min buffer used before throttle
+#endif
+ cyg_drv_cond_t wait;
+ cyg_drv_mutex_t lock;
+ bool waiting;
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING
+ bool blocking;
+#endif
+ volatile bool abort; // Set by an outsider to kill processing
+ volatile cyg_int32 pending; // This many bytes waiting to be sent
+#ifdef CYGPKG_IO_SERIAL_SELECT_SUPPORT
+ struct CYG_SELINFO_TAG selinfo; // select info
+#endif
+
+#ifdef CYGDBG_USE_ASSERTS
+#ifdef CYGINT_IO_SERIAL_BLOCK_TRANSFER
+ bool block_mode_xfer_running;
+#endif // CYGINT_IO_SERIAL_BLOCK_TRANSFER
+#endif // CYGDBG_USE_ASSERTS
+} cbuf_t;
+
+#define CBUF_INIT(_data, _len) \
+ {_data, 0, 0, _len}
+
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+typedef struct {
+ cyg_uint32 flags;
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
+ cyg_uint8 xchar;
+#endif
+} flow_desc_t;
+#endif
+
+// Private data which describes this channel
+struct serial_channel {
+ serial_funs *funs;
+ serial_callbacks_t *callbacks;
+ void *dev_priv; // Whatever is needed by actual device routines
+ cyg_serial_info_t config; // Current configuration
+ bool init;
+ cbuf_t out_cbuf;
+ cbuf_t in_cbuf;
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+ flow_desc_t flow_desc;
+#endif
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
+ cyg_serial_line_status_callback_fn_t status_callback;
+ CYG_ADDRWORD status_callback_priv;
+#endif
+};
+
+// Flow descriptor flag values
+#define CYG_SERIAL_FLOW_OUT_THROTTLED (1<<0)
+#define CYG_SERIAL_FLOW_IN_THROTTLED (1<<1)
+
+// Initialization macro for serial channel
+#define SERIAL_CHANNEL(_l, \
+ _funs, \
+ _dev_priv, \
+ _baud, _stop, _parity, _word_length, _flags) \
+serial_channel _l = { \
+ &_funs, \
+ &cyg_io_serial_callbacks, \
+ &(_dev_priv), \
+ CYG_SERIAL_INFO_INIT(_baud, _stop, _parity, _word_length, _flags), \
+};
+
+#define SERIAL_CHANNEL_USING_INTERRUPTS(_l, \
+ _funs, \
+ _dev_priv, \
+ _baud, _stop, _parity, _word_length, _flags, \
+ _out_buf, _out_buflen, \
+ _in_buf, _in_buflen) \
+serial_channel _l = { \
+ &_funs, \
+ &cyg_io_serial_callbacks, \
+ &(_dev_priv), \
+ CYG_SERIAL_INFO_INIT(_baud, _stop, _parity, _word_length, _flags), \
+ false, \
+ CBUF_INIT(_out_buf, _out_buflen), \
+ CBUF_INIT(_in_buf, _in_buflen) \
+};
+
+// Low level interface functions
+struct serial_funs {
+ // Send one character to the output device, return true if consumed
+ bool (*putc)(serial_channel *priv, unsigned char c);
+ // Fetch one character from the device
+ unsigned char (*getc)(serial_channel *priv);
+ // Change hardware configuration (baud rate, etc)
+ Cyg_ErrNo (*set_config)(serial_channel *priv, cyg_uint32 key, const void *xbuf,
+ cyg_uint32 *len);
+ // Enable the transmit channel and turn on transmit interrupts
+ void (*start_xmit)(serial_channel *priv);
+ // Disable the transmit channel and turn transmit interrupts off
+ void (*stop_xmit)(serial_channel *priv);
+};
+
+#define SERIAL_FUNS(_l,_putc,_getc,_set_config,_start_xmit,_stop_xmit) \
+serial_funs _l = { \
+ _putc, \
+ _getc, \
+ _set_config, \
+ _start_xmit, \
+ _stop_xmit \
+};
+
+extern cyg_devio_table_t cyg_io_serial_devio;
+
+#endif // CYGONCE_SERIAL_H
diff --git a/cesar/ecos/packages/io/serial/current/include/serialio.h b/cesar/ecos/packages/io/serial/current/include/serialio.h
new file mode 100644
index 0000000000..7d5f53c7ac
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/include/serialio.h
@@ -0,0 +1,212 @@
+#ifndef CYGONCE_SERIALIO_H
+#define CYGONCE_SERIALIO_H
+// ====================================================================
+//
+// serialio.h
+//
+// Device I/O
+//
+// ====================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+// ====================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-02-04
+// Purpose: Special support for serial I/O devices
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+// ====================================================================
+
+// This file contains the user-level visible I/O interfaces
+
+#include <pkgconf/system.h>
+#include <pkgconf/io_serial.h>
+#include <pkgconf/hal.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/io/config_keys.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Supported baud rates
+typedef enum {
+ CYGNUM_SERIAL_BAUD_50 = 1,
+ CYGNUM_SERIAL_BAUD_75,
+ CYGNUM_SERIAL_BAUD_110,
+ CYGNUM_SERIAL_BAUD_134_5,
+ CYGNUM_SERIAL_BAUD_150,
+ CYGNUM_SERIAL_BAUD_200,
+ CYGNUM_SERIAL_BAUD_300,
+ CYGNUM_SERIAL_BAUD_600,
+ CYGNUM_SERIAL_BAUD_1200,
+ CYGNUM_SERIAL_BAUD_1800,
+ CYGNUM_SERIAL_BAUD_2400,
+ CYGNUM_SERIAL_BAUD_3600,
+ CYGNUM_SERIAL_BAUD_4800,
+ CYGNUM_SERIAL_BAUD_7200,
+ CYGNUM_SERIAL_BAUD_9600,
+ CYGNUM_SERIAL_BAUD_14400,
+ CYGNUM_SERIAL_BAUD_19200,
+ CYGNUM_SERIAL_BAUD_38400,
+ CYGNUM_SERIAL_BAUD_57600,
+ CYGNUM_SERIAL_BAUD_115200,
+ CYGNUM_SERIAL_BAUD_230400
+} cyg_serial_baud_rate_t;
+#define CYGNUM_SERIAL_BAUD_MIN CYGNUM_SERIAL_BAUD_50
+#define CYGNUM_SERIAL_BAUD_MAX CYGNUM_SERIAL_BAUD_230400
+
+// Note: two levels of macro are required to get proper expansion.
+#define _CYG_SERIAL_BAUD_RATE(n) CYGNUM_SERIAL_BAUD_##n
+#define CYG_SERIAL_BAUD_RATE(n) _CYG_SERIAL_BAUD_RATE(n)
+
+// Stop bit selections
+typedef enum {
+ CYGNUM_SERIAL_STOP_1 = 1,
+ CYGNUM_SERIAL_STOP_1_5,
+ CYGNUM_SERIAL_STOP_2
+} cyg_serial_stop_bits_t;
+
+// Parity modes
+typedef enum {
+ CYGNUM_SERIAL_PARITY_NONE = 0,
+ CYGNUM_SERIAL_PARITY_EVEN,
+ CYGNUM_SERIAL_PARITY_ODD,
+ CYGNUM_SERIAL_PARITY_MARK,
+ CYGNUM_SERIAL_PARITY_SPACE
+} cyg_serial_parity_t;
+
+// Word length
+typedef enum {
+ CYGNUM_SERIAL_WORD_LENGTH_5 = 5,
+ CYGNUM_SERIAL_WORD_LENGTH_6,
+ CYGNUM_SERIAL_WORD_LENGTH_7,
+ CYGNUM_SERIAL_WORD_LENGTH_8
+} cyg_serial_word_length_t;
+
+typedef struct {
+ cyg_serial_baud_rate_t baud;
+ cyg_serial_stop_bits_t stop;
+ cyg_serial_parity_t parity;
+ cyg_serial_word_length_t word_length;
+ cyg_uint32 flags;
+} cyg_serial_info_t;
+
+// cyg_serial_info_t flags
+#define CYGNUM_SERIAL_FLOW_NONE (0)
+// receive flow control, send xon/xoff when necessary:
+#define CYGNUM_SERIAL_FLOW_XONXOFF_RX (1<<0)
+// transmit flow control, act on received xon/xoff:
+#define CYGNUM_SERIAL_FLOW_XONXOFF_TX (1<<1)
+// receive flow control, send RTS when necessary:
+#define CYGNUM_SERIAL_FLOW_RTSCTS_RX (1<<2)
+// transmit flow control, act when not CTS:
+#define CYGNUM_SERIAL_FLOW_RTSCTS_TX (1<<3)
+// receive flow control, send DTR when necessary:
+#define CYGNUM_SERIAL_FLOW_DSRDTR_RX (1<<4)
+// transmit flow control, act when not DSR:
+#define CYGNUM_SERIAL_FLOW_DSRDTR_TX (1<<5)
+
+// arguments for CYG_IO_SET_CONFIG_SERIAL_FLOW_CONTROL_FORCE
+#define CYGNUM_SERIAL_FLOW_THROTTLE_RX 0
+#define CYGNUM_SERIAL_FLOW_RESTART_RX 1
+#define CYGNUM_SERIAL_FLOW_THROTTLE_TX 2
+#define CYGNUM_SERIAL_FLOW_RESTART_TX 3
+
+// arguments for CYG_IO_SET_CONFIG_SERIAL_HW_RX_FLOW_THROTTLE
+#define CYGNUM_SERIAL_FLOW_HW_UNTHROTTLE 0
+#define CYGNUM_SERIAL_FLOW_HW_THROTTLE 0
+#define CYGNUM_SERIAL_FLOW_HW_UNTHROTTLE 0
+
+typedef struct {
+ cyg_int32 rx_bufsize;
+ cyg_int32 rx_count;
+ cyg_int32 tx_bufsize;
+ cyg_int32 tx_count;
+} cyg_serial_buf_info_t;
+
+#define CYG_SERIAL_INFO_INIT(_baud,_stop,_parity,_word_length,_flags) \
+ { _baud, _stop, _parity, _word_length, _flags}
+
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
+
+# define CYGNUM_SERIAL_STATUS_FLOW 0
+# define CYGNUM_SERIAL_STATUS_BREAK 1
+# define CYGNUM_SERIAL_STATUS_FRAMEERR 2
+# define CYGNUM_SERIAL_STATUS_PARITYERR 3
+# define CYGNUM_SERIAL_STATUS_OVERRUNERR 4
+# define CYGNUM_SERIAL_STATUS_CARRIERDETECT 5
+# define CYGNUM_SERIAL_STATUS_RINGINDICATOR 6
+
+typedef struct {
+ cyg_uint32 which; // one of CYGNUM_SERIAL_STATUS_* above
+ cyg_uint32 value; // and its value
+} cyg_serial_line_status_t;
+
+typedef void (*cyg_serial_line_status_callback_fn_t)(
+ cyg_serial_line_status_t *s,
+ CYG_ADDRWORD priv );
+typedef struct {
+ cyg_serial_line_status_callback_fn_t fn;
+ CYG_ADDRWORD priv;
+} cyg_serial_line_status_callback_t;
+
+#endif // ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
+
+// Default configuration
+#define CYG_SERIAL_BAUD_DEFAULT CYGNUM_SERIAL_BAUD_38400
+#define CYG_SERIAL_STOP_DEFAULT CYGNUM_SERIAL_STOP_1
+#define CYG_SERIAL_PARITY_DEFAULT CYGNUM_SERIAL_PARITY_NONE
+#define CYG_SERIAL_WORD_LENGTH_DEFAULT CYGNUM_SERIAL_WORD_LENGTH_8
+
+#ifdef CYGDAT_IO_SERIAL_FLOW_CONTROL_DEFAULT_XONXOFF
+# define CYG_SERIAL_FLAGS_DEFAULT (CYGNUM_SERIAL_FLOW_XONXOFF_RX|CYGNUM_SERIAL_FLOW_XONXOFF_TX)
+#elif defined(CYGDAT_IO_SERIAL_FLOW_CONTROL_DEFAULT_RTSCTS)
+# define CYG_SERIAL_FLAGS_DEFAULT (CYGNUM_SERIAL_FLOW_RTSCTS_RX|CYGNUM_SERIAL_FLOW_RTSCTS_TX)
+#elif defined(CYGDAT_IO_SERIAL_FLOW_CONTROL_DEFAULT_DSRDTR)
+# define CYG_SERIAL_FLAGS_DEFAULT (CYGNUM_SERIAL_FLOW_DSRDTR_RX|CYGNUM_SERIAL_FLOW_DSRDTR_TX)
+#else
+# define CYG_SERIAL_FLAGS_DEFAULT 0
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CYGONCE_SERIALIO_H */
+/* EOF serialio.h */
diff --git a/cesar/ecos/packages/io/serial/current/include/ttyio.h b/cesar/ecos/packages/io/serial/current/include/ttyio.h
new file mode 100644
index 0000000000..2505cc4fce
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/include/ttyio.h
@@ -0,0 +1,89 @@
+#ifndef CYGONCE_TTYIO_H
+#define CYGONCE_TTYIO_H
+// ====================================================================
+//
+// ttyio.h
+//
+// Device I/O
+//
+// ====================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+// ====================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-02-04
+// Purpose: Special support for tty I/O devices
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+// ====================================================================
+
+// This file contains the user-level visible I/O interfaces
+
+#include <pkgconf/hal.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/io/serialio.h>
+#include <cyg/io/config_keys.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+ cyg_uint32 tty_out_flags;
+ cyg_uint32 tty_in_flags;
+} cyg_tty_info_t;
+
+// TTY flags - used to control behaviour when sending data to tty
+#define CYG_TTY_OUT_FLAGS_CRLF 0x0001 // Map '\n' => '\r\n' on output
+
+#define CYG_TTY_OUT_FLAGS_DEFAULT (CYG_TTY_OUT_FLAGS_CRLF)
+
+// TTY flags - used to control behaviour when receiving data from tty
+#define CYG_TTY_IN_FLAGS_CR 0x0001 // Map '\r' => '\n' on input
+#define CYG_TTY_IN_FLAGS_CRLF 0x0002 // Map '\r\n' => '\n' on input
+#define CYG_TTY_IN_FLAGS_ECHO 0x0004 // Echo characters as processed
+#define CYG_TTY_IN_FLAGS_BINARY 0x0008 // No input processing
+
+#define CYG_TTY_IN_FLAGS_DEFAULT (CYG_TTY_IN_FLAGS_CR|CYG_TTY_IN_FLAGS_ECHO)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CYGONCE_TTYIO_H */
+/* EOF ttyio.h */
diff --git a/cesar/ecos/packages/io/serial/current/misc/console.c b/cesar/ecos/packages/io/serial/current/misc/console.c
new file mode 100644
index 0000000000..b18004ce48
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/misc/console.c
@@ -0,0 +1,238 @@
+//==========================================================================
+//
+// console.c
+//
+// Initial device I/O tests
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-02-05
+// Description: Minimal testing of "console" I/O
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+#include <pkgconf/io.h>
+#include <pkgconf/io_serial.h>
+#include <cyg/io/io.h>
+#include <cyg/io/ttyio.h>
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h>
+#ifdef CYGFUN_KERNEL_API_C
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_arch.h>
+#define STACK_SIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+unsigned char stack[STACK_SIZE];
+cyg_thread thread_data;
+cyg_handle_t thread_handle;
+#endif
+
+static void
+dump_buf_with_offset(unsigned char *p,
+ int s,
+ unsigned char *base)
+{
+ int i, c;
+ if ((unsigned int)s > (unsigned int)p) {
+ s = (unsigned int)s - (unsigned int)p;
+ }
+ while (s > 0) {
+ if (base) {
+ diag_printf("%08X: ", (int)p - (int)base);
+ } else {
+ diag_printf("%08X: ", p);
+ }
+ for (i = 0; i < 16; i++) {
+ if (i < s) {
+ diag_printf("%02X", p[i] & 0xFF);
+ } else {
+ diag_printf(" ");
+ }
+ if ((i % 2) == 1) diag_printf(" ");
+ if ((i % 8) == 7) diag_printf(" ");
+ }
+ diag_printf(" |");
+ for (i = 0; i < 16; i++) {
+ if (i < s) {
+ c = p[i] & 0xFF;
+ if ((c < 0x20) || (c >= 0x7F)) c = '.';
+ } else {
+ c = ' ';
+ }
+ diag_printf("%c", c);
+ }
+ diag_printf("|\n");
+ s -= 16;
+ p += 16;
+ }
+}
+
+static void
+dump_buf(unsigned char *p, int s)
+{
+ dump_buf_with_offset(p, s, 0);
+}
+
+void
+hang(void)
+{
+ while (true) ;
+}
+
+static int
+strlen(char *c)
+{
+ int l = 0;
+ while (*c++) l++;
+ return l;
+}
+
+void
+console_test( CYG_ADDRWORD x )
+{
+ Cyg_ErrNo res;
+ cyg_io_handle_t handle;
+ char msg[] = "This is a test\n";
+ int msglen = sizeof(msg)-1;
+ char in_msg[80];
+ int in_msglen = sizeof(in_msg)-1;
+ cyg_serial_info_t serial_info;
+ cyg_tty_info_t tty_info;
+ char short_msg[] = "This is a short message\n";
+ char long_msg[] = "This is a longer message 0123456789abcdefghijklmnopqrstuvwxyz\n";
+ char filler[] = " ";
+ char prompt[] = "\nPlease enter some data: ";
+ int i, len;
+
+ res = cyg_io_lookup(CYGDAT_IO_SERIAL_TTY_CONSOLE, &handle);
+ if (res != ENOERR) {
+ diag_printf("Can't lookup - DEVIO error: %d\n", res);
+ return;
+ }
+ len = sizeof(serial_info);
+ res = cyg_io_get_config(handle, CYG_IO_GET_CONFIG_SERIAL_INFO, &serial_info, &len);
+ if (res != ENOERR) {
+ diag_printf("Can't get serial config - DEVIO error: %d\n", res);
+hang();
+ return;
+ }
+ len = sizeof(tty_info);
+ res = cyg_io_get_config(handle, CYG_IO_GET_CONFIG_TTY_INFO, &tty_info, &len);
+ if (res != ENOERR) {
+ diag_printf("Can't get tty config - DEVIO error: %d\n", res);
+hang();
+ return;
+ }
+ diag_printf("Config - baud: %d, stop: %d, parity: %d, out flags: %x, in flags: %x\n",
+ serial_info.baud, serial_info.stop, serial_info.parity,
+ tty_info.tty_out_flags, tty_info.tty_in_flags);
+ len = sizeof(serial_info);
+ res = cyg_io_set_config(handle, CYG_IO_SET_CONFIG_SERIAL_INFO, &serial_info, &len);
+ if (res != ENOERR) {
+ diag_printf("Can't set serial config - DEVIO error: %d\n", res);
+hang();
+ return;
+ }
+ len = sizeof(tty_info);
+ res = cyg_io_set_config(handle, CYG_IO_SET_CONFIG_TTY_INFO, &tty_info, &len);
+ if (res != ENOERR) {
+ diag_printf("Can't set tty config - DEVIO error: %d\n", res);
+hang();
+ return;
+ }
+ msglen = strlen(msg);
+ res = cyg_io_write(handle, msg, &msglen);
+ if (res != ENOERR) {
+ diag_printf("Can't write data - DEVIO error: %d\n", res);
+hang();
+ return;
+ }
+ for (i = 0; i < 10; i++) {
+ len = strlen(short_msg);
+ res = cyg_io_write(handle, short_msg, &len);
+ if (res != ENOERR) {
+ diag_printf("Can't write [short] data - DEVIO error: %d\n", res);
+ hang();
+ return;
+ }
+ }
+ for (i = 0; i < 100; i++) {
+ len = (i % 10) + 1;
+ cyg_io_write(handle, filler, &len);
+ len = strlen(long_msg);
+ res = cyg_io_write(handle, long_msg, &len);
+ if (res != ENOERR) {
+ diag_printf("Can't write [long] data - DEVIO error: %d\n", res);
+ hang();
+ return;
+ }
+ }
+ len = strlen(prompt);
+ cyg_io_write(handle, prompt, &len);
+ res = cyg_io_read(handle, in_msg, &in_msglen);
+ if (res != ENOERR) {
+ diag_printf("Can't read data - DEVIO error: %d\n", res);
+hang();
+ return;
+ }
+ diag_printf("Read %d bytes\n", in_msglen);
+ dump_buf(in_msg, in_msglen);
+ CYG_TEST_PASS_FINISH("Console I/O test OK");
+}
+
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+#ifdef CYGFUN_KERNEL_API_C
+ cyg_thread_create(10, // Priority - just a number
+ (cyg_thread_entry_t*)console_test, // entry
+ 0, //
+ "console_thread", // Name
+ &stack[0], // Stack
+ STACK_SIZE, // Size
+ &thread_handle, // Handle
+ &thread_data // Thread data structure
+ );
+ cyg_thread_resume(thread_handle);
+ cyg_scheduler_start();
+#else
+ console_test();
+#endif
+}
+// EOF console.c
diff --git a/cesar/ecos/packages/io/serial/current/misc/serial.c b/cesar/ecos/packages/io/serial/current/misc/serial.c
new file mode 100644
index 0000000000..b05bb471d9
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/misc/serial.c
@@ -0,0 +1,257 @@
+//==========================================================================
+//
+// serial.c
+//
+// Initial device I/O tests
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-02-05
+// Description: Minimal testing of "serial" I/O
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+#include <pkgconf/io.h>
+#include <cyg/io/io.h>
+#include <cyg/io/ttyio.h>
+#include <cyg/infra/diag.h>
+#include <cyg/infra/testcase.h>
+#ifdef CYGFUN_KERNEL_API_C
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_arch.h>
+#define STACK_SIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+unsigned char stack[STACK_SIZE];
+cyg_thread thread_data;
+cyg_handle_t thread_handle;
+
+// This routine will be called if the read "times out"
+static void
+do_abort(void *handle)
+{
+ cyg_io_handle_t io_handle = (cyg_io_handle_t)handle;
+ cyg_int32 len = 1; // Need something here
+ cyg_io_get_config(io_handle, CYG_IO_GET_CONFIG_SERIAL_ABORT, 0, &len);
+}
+
+#include "timeout.inl"
+#endif
+
+static void
+dump_buf_with_offset(unsigned char *p,
+ int s,
+ unsigned char *base)
+{
+ int i, c;
+ if ((unsigned int)s > (unsigned int)p) {
+ s = (unsigned int)s - (unsigned int)p;
+ }
+ while (s > 0) {
+ if (base) {
+ diag_printf("%08X: ", (int)p - (int)base);
+ } else {
+ diag_printf("%08X: ", p);
+ }
+ for (i = 0; i < 16; i++) {
+ if (i < s) {
+ diag_printf("%02X", p[i] & 0xFF);
+ } else {
+ diag_printf(" ");
+ }
+ if ((i % 2) == 1) diag_printf(" ");
+ if ((i % 8) == 7) diag_printf(" ");
+ }
+ diag_printf(" |");
+ for (i = 0; i < 16; i++) {
+ if (i < s) {
+ c = p[i] & 0xFF;
+ if ((c < 0x20) || (c >= 0x7F)) c = '.';
+ } else {
+ c = ' ';
+ }
+ diag_printf("%c", c);
+ }
+ diag_printf("|\n");
+ s -= 16;
+ p += 16;
+ }
+}
+
+static void
+dump_buf(unsigned char *p, int s)
+{
+ dump_buf_with_offset(p, s, 0);
+}
+
+void
+hang(void)
+{
+ while (true) ;
+}
+
+static int
+strlen(char *c)
+{
+ int l = 0;
+ while (*c++) l++;
+ return l;
+}
+
+void
+serial_test( void )
+{
+ Cyg_ErrNo res;
+ cyg_io_handle_t handle;
+ char msg[] = "This is a test\n";
+ int msglen = sizeof(msg)-1;
+ char in_msg[80];
+ int in_msglen = sizeof(in_msg)-1;
+ cyg_serial_info_t serial_info;
+ cyg_tty_info_t tty_info;
+ char short_msg[] = "This is a short message\n";
+ char long_msg[] = "This is a longer message 0123456789abcdefghijklmnopqrstuvwxyz\n";
+ char filler[] = " ";
+ char prompt[] = "\nPlease enter some data: ";
+ int i, len;
+#ifdef CYGFUN_KERNEL_API_C
+ cyg_uint32 stamp;
+#endif
+
+ res = cyg_io_lookup("/dev/tty0", &handle);
+ if (res != ENOERR) {
+ diag_printf("Can't lookup - DEVIO error: %d\n", res);
+ return;
+ }
+ len = sizeof(serial_info);
+ res = cyg_io_get_config(handle, CYG_IO_GET_CONFIG_SERIAL_INFO, &serial_info, &len);
+ if (res != ENOERR) {
+ diag_printf("Can't get serial config - DEVIO error: %d\n", res);
+hang();
+ return;
+ }
+ len = sizeof(tty_info);
+ res = cyg_io_get_config(handle, CYG_IO_GET_CONFIG_TTY_INFO, &tty_info, &len);
+ if (res != ENOERR) {
+ diag_printf("Can't get tty config - DEVIO error: %d\n", res);
+hang();
+ return;
+ }
+ diag_printf("Config - baud: %d, stop: %d, parity: %d, out flags: %x, in flags: %x\n",
+ serial_info.baud, serial_info.stop, serial_info.parity,
+ tty_info.tty_out_flags, tty_info.tty_in_flags);
+ len = sizeof(serial_info);
+ res = cyg_io_set_config(handle, CYG_IO_SET_CONFIG_SERIAL_INFO, &serial_info, &len);
+ if (res != ENOERR) {
+ diag_printf("Can't set serial config - DEVIO error: %d\n", res);
+hang();
+ return;
+ }
+ len = sizeof(tty_info);
+ res = cyg_io_set_config(handle, CYG_IO_SET_CONFIG_TTY_INFO, &tty_info, &len);
+ if (res != ENOERR) {
+ diag_printf("Can't set tty config - DEVIO error: %d\n", res);
+hang();
+ return;
+ }
+ msglen = strlen(msg);
+ res = cyg_io_write(handle, msg, &msglen);
+ if (res != ENOERR) {
+ diag_printf("Can't write data - DEVIO error: %d\n", res);
+hang();
+ return;
+ }
+ for (i = 0; i < 10; i++) {
+ len = strlen(short_msg);
+ res = cyg_io_write(handle, short_msg, &len);
+ if (res != ENOERR) {
+ diag_printf("Can't write [short] data - DEVIO error: %d\n", res);
+ hang();
+ return;
+ }
+ }
+ for (i = 0; i < 100; i++) {
+ len = (i % 10) + 1;
+ cyg_io_write(handle, filler, &len);
+ len = strlen(long_msg);
+ res = cyg_io_write(handle, long_msg, &len);
+ if (res != ENOERR) {
+ diag_printf("Can't write [long] data - DEVIO error: %d\n", res);
+ hang();
+ return;
+ }
+ }
+ len = strlen(prompt);
+ cyg_io_write(handle, prompt, &len);
+#ifdef CYGFUN_KERNEL_API_C
+ stamp = timeout(1000, do_abort, handle);
+#endif
+ res = cyg_io_read(handle, in_msg, &in_msglen);
+ if (res != ENOERR) {
+ diag_printf("Can't read data - DEVIO error: %d\n", res);
+hang();
+ return;
+ }
+#ifdef CYGFUN_KERNEL_API_C
+ untimeout(stamp);
+#endif
+ diag_printf("Read %d bytes\n", in_msglen);
+ dump_buf(in_msg, in_msglen);
+ CYG_TEST_PASS_FINISH("Serial I/O test OK");
+}
+
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+#ifdef CYGFUN_KERNEL_API_C
+ cyg_thread_create(10, // Priority - just a number
+ (cyg_thread_entry_t*)serial_test, // entry
+ (cyg_addrword_t) 0, // entry data
+ "serial_thread", // Name
+ &stack[0], // Stack
+ STACK_SIZE, // Size
+ &thread_handle, // Handle
+ &thread_data // Thread data structure
+ );
+ cyg_thread_resume(thread_handle);
+ cyg_scheduler_start();
+#else
+ serial_test();
+#endif
+}
+// EOF serial.c
diff --git a/cesar/ecos/packages/io/serial/current/misc/timeout.inl b/cesar/ecos/packages/io/serial/current/misc/timeout.inl
new file mode 100644
index 0000000000..25a70d8cf5
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/misc/timeout.inl
@@ -0,0 +1,143 @@
+#ifndef CYGONCE_IO_SERIAL_MISC_TIMEOUT_INL
+#define CYGONCE_IO_SERIAL_MISC_TIMEOUT_INL
+//==========================================================================
+//
+// timeout.inl
+//
+// Simple timeout support for serial I/O testing.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-02-05
+// Description: Simple timeout functions
+//####DESCRIPTIONEND####
+
+// Timeout support
+
+typedef void (timeout_fun)(void *);
+#ifndef NTIMEOUTS
+#define NTIMEOUTS 8
+#endif
+typedef struct {
+ cyg_int32 delta; // Number of "ticks" in the future for this timeout
+ timeout_fun *fun; // Function to execute when it expires
+ void *arg; // Argument to pass when it does
+} timeout_entry;
+static timeout_entry timeouts[NTIMEOUTS];
+static cyg_handle_t timeout_alarm_handle;
+static cyg_alarm timeout_alarm;
+static cyg_int32 last_delta;
+
+static void
+do_timeout(cyg_handle_t alarm, cyg_addrword_t data)
+{
+ int i;
+ cyg_int32 min_delta;
+ timeout_entry *e = timeouts;
+ min_delta = 0x7FFFFFFF; // Maxint
+ for (i = 0; i < NTIMEOUTS; i++, e++) {
+ if (e->delta) {
+ e->delta -= last_delta;
+ if (e->delta == 0) {
+ // Time for this item to 'fire'
+ (e->fun)(e->arg);
+ } else {
+ if (e->delta < min_delta) min_delta = e->delta;
+ }
+ }
+ }
+ if (min_delta != 0x7FFFFFFF) {
+ // Still something to do, schedule it
+ cyg_alarm_initialize(timeout_alarm_handle, cyg_current_time()+min_delta, 0);
+ last_delta = min_delta;
+ }
+}
+
+static cyg_uint32
+timeout(cyg_int32 delta, timeout_fun *fun, void *arg)
+{
+ int i;
+ cyg_int32 min_delta;
+ static bool init = false;
+ timeout_entry *e = timeouts;
+ cyg_uint32 stamp;
+ if (!init) {
+ cyg_handle_t h;
+ cyg_clock_to_counter(cyg_real_time_clock(), &h);
+ cyg_alarm_create(h, do_timeout, 0, &timeout_alarm_handle, &timeout_alarm);
+ init = true;
+ }
+ stamp = 0; // Assume no slots available
+ for (i = 0; i < NTIMEOUTS; i++, e++) {
+ if ((e->delta == 0) && (e->fun == 0)) {
+ // Free entry
+ e->delta = delta;
+ e->fun = fun;
+ e->arg = arg;
+ stamp = (cyg_uint32)e;
+ break;
+ }
+ }
+ e = timeouts;
+ min_delta = 0x7FFFFFFF;
+ for (i = 0; i < NTIMEOUTS; i++, e++) {
+ if (e->delta && (e->delta < min_delta)) min_delta = e->delta;
+ }
+ if (min_delta != 0x7FFFFFFF) {
+ // Still something to do, schedule it
+ cyg_alarm_initialize(timeout_alarm_handle, cyg_current_time()+min_delta, 0);
+ last_delta = min_delta;
+ }
+ return stamp;
+}
+
+static void
+untimeout(cyg_uint32 stamp)
+{
+ if (stamp != 0) {
+ timeout_entry *e = (timeout_entry *)stamp;
+ if (e->fun != 0) {
+ e->delta = 0;
+ e->fun = 0;
+ e->arg = 0;
+ }
+ }
+}
+
+#endif // CYGONCE_IO_SERIAL_MISC_TIMEOUT_INL
diff --git a/cesar/ecos/packages/io/serial/current/src/common/haldiag.c b/cesar/ecos/packages/io/serial/current/src/common/haldiag.c
new file mode 100644
index 0000000000..d11eadb47a
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/src/common/haldiag.c
@@ -0,0 +1,138 @@
+//==========================================================================
+//
+// io/serial/common/haldiag.c
+//
+// Serial I/O interface module using HAL I/O routines
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-02-04
+// Purpose: HAL/diag serial driver
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/io.h>
+#include <pkgconf/io_serial.h>
+#ifdef CYGPKG_IO_SERIAL_HALDIAG
+#include <cyg/io/io.h>
+#include <cyg/io/devtab.h>
+#include <cyg/io/serial.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_diag.h>
+
+static bool haldiag_init(struct cyg_devtab_entry *tab);
+static bool haldiag_putc(serial_channel *chan, unsigned char c);
+static unsigned char haldiag_getc(serial_channel *chan);
+static Cyg_ErrNo haldiag_set_config(serial_channel *chan, cyg_uint32 key,
+ const void *xbuf, cyg_uint32 *len);
+
+static SERIAL_FUNS(haldiag_funs,
+ haldiag_putc,
+ haldiag_getc,
+ haldiag_set_config,
+ 0, // start xmit - not used
+ 0 // stop xmit - not used
+ );
+
+static int _no_data;
+static SERIAL_CHANNEL(haldiag_channel0,
+ haldiag_funs,
+ _no_data,
+ CYG_SERIAL_BAUD_DEFAULT,
+ CYG_SERIAL_STOP_DEFAULT,
+ CYG_SERIAL_PARITY_DEFAULT,
+ CYG_SERIAL_WORD_LENGTH_DEFAULT,
+ CYG_SERIAL_FLAGS_DEFAULT
+ );
+DEVTAB_ENTRY(haldiag_io0,
+ "/dev/haldiag",
+ 0, // Does not depend on a lower level interface
+ &cyg_io_serial_devio,
+ haldiag_init,
+ 0, // No initialization/lookup needed
+ &haldiag_channel0);
+
+static void
+haldiag_config_port(serial_channel *chan)
+{
+}
+
+static bool
+haldiag_init(struct cyg_devtab_entry *tab)
+{
+ serial_channel *chan = (serial_channel *)tab->priv;
+#ifdef CYGDBG_IO_INIT
+ diag_printf("HAL/diag SERIAL init\n");
+#endif
+ haldiag_config_port(chan);
+ return true;
+}
+
+// Return 'true' if character is sent to device
+static bool
+haldiag_putc(serial_channel *chan, unsigned char c)
+{
+ HAL_DIAG_WRITE_CHAR(c);
+ return true;
+}
+
+static unsigned char
+haldiag_getc(serial_channel *chan)
+{
+ char c;
+ HAL_DIAG_READ_CHAR(c);
+ return (unsigned char)c;
+}
+
+static Cyg_ErrNo
+haldiag_set_config(serial_channel *chan, cyg_uint32 key, const void *xbuf,
+ cyg_uint32 *len)
+{
+ switch (key) {
+ case CYG_IO_SET_CONFIG_SERIAL_INFO:
+ diag_printf("%s\n", __FUNCTION__);
+ return ENOERR;
+ default:
+ return -EINVAL;
+ }
+}
+#endif // CYGPKG_IO_SERIAL_HALDIAG
diff --git a/cesar/ecos/packages/io/serial/current/src/common/serial.c b/cesar/ecos/packages/io/serial/current/src/common/serial.c
new file mode 100644
index 0000000000..eb9bf83c87
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/src/common/serial.c
@@ -0,0 +1,1223 @@
+//==========================================================================
+//
+// io/serial/common/serial.c
+//
+// High level serial driver
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas, grante, jlarmour, jskov
+// Date: 1999-02-04
+// Purpose: Top level serial driver
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/io.h>
+#include <pkgconf/io_serial.h>
+
+#include <cyg/io/io.h>
+#include <cyg/io/devtab.h>
+#include <cyg/io/serial.h>
+#include <cyg/infra/cyg_ass.h> // assertion support
+#include <cyg/infra/diag.h> // diagnostic output
+
+static Cyg_ErrNo serial_write(cyg_io_handle_t handle, const void *buf, cyg_uint32 *len);
+static Cyg_ErrNo serial_read(cyg_io_handle_t handle, void *buf, cyg_uint32 *len);
+static cyg_bool serial_select(cyg_io_handle_t handle, cyg_uint32 which, CYG_ADDRWORD info);
+static Cyg_ErrNo serial_get_config(cyg_io_handle_t handle, cyg_uint32 key, void *buf, cyg_uint32 *len);
+static Cyg_ErrNo serial_set_config(cyg_io_handle_t handle, cyg_uint32 key, const void *buf, cyg_uint32 *len);
+
+DEVIO_TABLE(cyg_io_serial_devio,
+ serial_write,
+ serial_read,
+ serial_select,
+ serial_get_config,
+ serial_set_config
+ );
+
+static void serial_init(serial_channel *chan);
+static void serial_xmt_char(serial_channel *chan);
+static void serial_rcv_char(serial_channel *chan, unsigned char c);
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
+static void serial_indicate_status(serial_channel *chan,
+ cyg_serial_line_status_t *s);
+#endif
+#if CYGINT_IO_SERIAL_BLOCK_TRANSFER
+static rcv_req_reply_t serial_data_rcv_req(serial_channel *chan, int avail,
+ int* space_avail,
+ unsigned char** space);
+static void serial_data_rcv_done(serial_channel *chan, int chars_rcvd);
+static xmt_req_reply_t serial_data_xmt_req(serial_channel *chan, int space,
+ int* chars_avail,
+ unsigned char** chars);
+static void serial_data_xmt_done(serial_channel *chan, int chars_sent);
+# ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
+SERIAL_CALLBACKS(cyg_io_serial_callbacks,
+ serial_init,
+ serial_xmt_char,
+ serial_rcv_char,
+ serial_data_rcv_req,
+ serial_data_rcv_done,
+ serial_data_xmt_req,
+ serial_data_xmt_done,
+ serial_indicate_status);
+
+# else
+SERIAL_CALLBACKS(cyg_io_serial_callbacks,
+ serial_init,
+ serial_xmt_char,
+ serial_rcv_char,
+ serial_data_rcv_req,
+ serial_data_rcv_done,
+ serial_data_xmt_req,
+ serial_data_xmt_done);
+# endif
+#else
+# ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
+SERIAL_CALLBACKS(cyg_io_serial_callbacks,
+ serial_init,
+ serial_xmt_char,
+ serial_rcv_char,
+ serial_indicate_status);
+# else
+SERIAL_CALLBACKS(cyg_io_serial_callbacks,
+ serial_init,
+ serial_xmt_char,
+ serial_rcv_char);
+# endif
+#endif
+
+// ---------------------------------------------------------------------------
+
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+
+static __inline__ void
+throttle_tx( serial_channel *chan )
+{
+ chan->flow_desc.flags |= CYG_SERIAL_FLOW_OUT_THROTTLED;
+ // the throttling itself occurs in the serial_xmt_char() callback
+}
+
+static __inline__ void
+restart_tx( serial_channel *chan )
+{
+ serial_funs *funs = chan->funs;
+
+ chan->flow_desc.flags &= ~CYG_SERIAL_FLOW_OUT_THROTTLED;
+
+#ifdef CYGPKG_IO_SERIAL_SELECT_SUPPORT
+ // See if there is now enough room to say it is available
+ // for writing
+ {
+ cbuf_t *cbuf = &chan->out_cbuf;
+ int space;
+
+ space = cbuf->len - cbuf->nb;
+ if (space >= cbuf->low_water)
+ cyg_selwakeup( &cbuf->selinfo );
+ }
+#endif
+ if ( chan->out_cbuf.nb > 0 )
+ (funs->start_xmit)(chan);
+}
+
+static __inline__ void
+throttle_rx( serial_channel *chan, cyg_bool force )
+{
+ serial_funs *funs = chan->funs;
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
+ cyg_uint32 prev_flags = chan->flow_desc.flags;
+#endif
+
+ chan->flow_desc.flags |= CYG_SERIAL_FLOW_IN_THROTTLED;
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
+ // send an xoff if not already done (throttled)
+ if ( force ||
+ ((chan->config.flags & CYGNUM_SERIAL_FLOW_XONXOFF_RX) &&
+ (0==(prev_flags & CYG_SERIAL_FLOW_IN_THROTTLED))) ) {
+ CYG_ASSERT(force||(chan->flow_desc.xchar=='\0')||(chan->flow_desc.xchar==CYGDAT_IO_SERIAL_FLOW_CONTROL_XOFF_CHAR), "xchar already set (XOFF)");
+ chan->flow_desc.xchar = CYGDAT_IO_SERIAL_FLOW_CONTROL_XOFF_CHAR;
+ // Make sure xmit is running so we can send it
+ (funs->start_xmit)(chan);
+ }
+#endif
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_HW
+ {
+ cyg_uint32 i=1;
+ cyg_uint32 len = sizeof(i);
+
+ // set hardware flow control - don't care if it fails
+ if ( force || (chan->config.flags & CYGNUM_SERIAL_FLOW_RTSCTS_RX) ||
+ (chan->config.flags & CYGNUM_SERIAL_FLOW_DSRDTR_RX) )
+ (funs->set_config)(chan,
+ CYG_IO_SET_CONFIG_SERIAL_HW_RX_FLOW_THROTTLE,
+ &i, &len);
+ }
+#endif
+}
+
+static __inline__ void
+restart_rx( serial_channel *chan, cyg_bool force )
+{
+ serial_funs *funs = chan->funs;
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
+ cyg_uint32 prev_flags = chan->flow_desc.flags;
+#endif
+
+ chan->flow_desc.flags &= ~CYG_SERIAL_FLOW_IN_THROTTLED;
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
+ // send an xon, if we haven't already
+ if ( force ||
+ ((chan->config.flags & CYGNUM_SERIAL_FLOW_XONXOFF_RX) &&
+ (prev_flags & CYG_SERIAL_FLOW_IN_THROTTLED)) ) {
+ CYG_ASSERT(force||(chan->flow_desc.xchar=='\0')||(chan->flow_desc.xchar==CYGDAT_IO_SERIAL_FLOW_CONTROL_XON_CHAR), "xchar already set (XON)");
+ chan->flow_desc.xchar = CYGDAT_IO_SERIAL_FLOW_CONTROL_XON_CHAR;
+ (funs->start_xmit)(chan); // Make sure xmit is running so we can send it
+ }
+#endif
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_HW
+ {
+ cyg_uint32 i=0;
+ cyg_uint32 len = sizeof(i);
+
+ // set hardware flow control - don't care if it fails
+ if ( force || (chan->config.flags & CYGNUM_SERIAL_FLOW_RTSCTS_RX) ||
+ (chan->config.flags & CYGNUM_SERIAL_FLOW_DSRDTR_RX) )
+ (funs->set_config)(chan,
+ CYG_IO_SET_CONFIG_SERIAL_HW_RX_FLOW_THROTTLE,
+ &i, &len);
+ }
+#endif
+}
+
+#endif
+
+// ---------------------------------------------------------------------------
+
+static void
+serial_init(serial_channel *chan)
+{
+ if (chan->init) return;
+ if (chan->out_cbuf.len != 0) {
+#ifdef CYGDBG_IO_INIT
+ diag_printf("Set output buffer - buf: %p len: %d\n", chan->out_cbuf.data, chan->out_cbuf.len);
+#endif
+ chan->out_cbuf.waiting = false;
+ chan->out_cbuf.abort = false;
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING
+ chan->out_cbuf.blocking = true;
+#endif
+ chan->out_cbuf.pending = 0;
+ cyg_drv_mutex_init(&chan->out_cbuf.lock);
+ cyg_drv_cond_init(&chan->out_cbuf.wait, &chan->out_cbuf.lock);
+ chan->out_cbuf.low_water = chan->out_cbuf.len / 4;
+#ifdef CYGPKG_IO_SERIAL_SELECT_SUPPORT
+ cyg_selinit( &chan->out_cbuf.selinfo );
+#endif
+ }
+ if (chan->in_cbuf.len != 0) {
+ cbuf_t *cbuf = &chan->in_cbuf;
+
+#ifdef CYGDBG_IO_INIT
+ diag_printf("Set input buffer - buf: %p len: %d\n", cbuf->data, cbuf->len);
+#endif
+ cbuf->waiting = false;
+ cbuf->abort = false;
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING
+ cbuf->blocking = true;
+#endif
+#ifdef CYGPKG_IO_SERIAL_SELECT_SUPPORT
+ cyg_selinit( &cbuf->selinfo );
+#endif
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+ cbuf->low_water =
+ (CYGNUM_IO_SERIAL_FLOW_CONTROL_LOW_WATER_PERCENT * cbuf->len) / 100;
+ cbuf->high_water =
+ (CYGNUM_IO_SERIAL_FLOW_CONTROL_HIGH_WATER_PERCENT * cbuf->len) / 100;
+# ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
+ // But make sure it is at least 35 below buffer size, to allow
+ // for 16 byte fifos, twice, plus some latency before s/w flow
+ // control can kick in. This doesn't apply to h/w flow control
+ // as it is near-instantaneous
+ if ( (cbuf->len - cbuf->high_water) < 35 )
+ cbuf->high_water = cbuf->len - 35;
+ // and just in case...
+ if ( cbuf->high_water <= 0 )
+ cbuf->high_water = 1;
+ if ( cbuf->low_water > cbuf->high_water )
+ cbuf->low_water = cbuf->high_water;
+# endif
+#endif
+ cyg_drv_mutex_init(&cbuf->lock);
+ cyg_drv_cond_init(&cbuf->wait, &cbuf->lock);
+ }
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
+ chan->status_callback = NULL;
+#endif
+
+#ifdef CYGDBG_USE_ASSERTS
+#if CYGINT_IO_SERIAL_BLOCK_TRANSFER
+ chan->in_cbuf.block_mode_xfer_running = false;
+ chan->out_cbuf.block_mode_xfer_running = false;
+#endif // CYGINT_IO_SERIAL_BLOCK_TRANSFER
+#endif // CYGDBG_USE_ASSERTS
+ chan->init = true;
+}
+
+// ---------------------------------------------------------------------------
+
+static Cyg_ErrNo
+serial_write(cyg_io_handle_t handle, const void *_buf, cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ serial_channel *chan = (serial_channel *)t->priv;
+ serial_funs *funs = chan->funs;
+ cyg_int32 size = *len;
+ cyg_uint8 *buf = (cyg_uint8 *)_buf;
+ int next;
+ cbuf_t *cbuf = &chan->out_cbuf;
+ Cyg_ErrNo res = ENOERR;
+
+ cyg_drv_mutex_lock(&cbuf->lock);
+ cbuf->abort = false;
+
+ if (cbuf->len == 0) {
+ // Non interrupt driven (i.e. polled) operation
+ while (size-- > 0) {
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+ while ( ( 0 != (chan->flow_desc.flags & CYG_SERIAL_FLOW_OUT_THROTTLED) ) ||
+ ((funs->putc)(chan, *buf) == false) )
+ ; // Ignore full, keep trying
+#else
+ while ((funs->putc)(chan, *buf) == false)
+ ; // Ignore full, keep trying
+#endif
+ buf++;
+ }
+ } else {
+ cyg_drv_dsr_lock(); // Avoid race condition testing pointers
+ while (size > 0) {
+ next = cbuf->put + 1;
+ if (next == cbuf->len) next = 0;
+ if (cbuf->nb == cbuf->len) {
+ cbuf->waiting = true;
+ // Buffer full - wait for space
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+ if ( 0 == (chan->flow_desc.flags & CYG_SERIAL_FLOW_OUT_THROTTLED) )
+#endif
+ (funs->start_xmit)(chan); // Make sure xmit is running
+
+ // Check flag: 'start_xmit' may have obviated the need
+ // to wait :-)
+ if (cbuf->waiting) {
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING
+ // Optionally return if configured for non-blocking mode.
+ if (!cbuf->blocking) {
+ *len -= size; // number of characters actually sent
+ cbuf->waiting = false;
+ res = (*len == 0) ? -EAGAIN : ENOERR;
+ break;
+ }
+#endif // CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING
+ cbuf->pending += size; // Have this much more to send [eventually]
+ if( !cyg_drv_cond_wait(&cbuf->wait) )
+ cbuf->abort = true;
+ cbuf->pending -= size;
+ }
+ if (cbuf->abort) {
+ // Give up!
+ *len -= size; // number of characters actually sent
+ cbuf->abort = false;
+ cbuf->waiting = false;
+ res = -EINTR;
+ break;
+ }
+ } else {
+ cbuf->data[cbuf->put++] = *buf++;
+ cbuf->put = next;
+ cbuf->nb++;
+ size--; // Only count if actually sent!
+ }
+ }
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+ if ( 0 == (chan->flow_desc.flags & CYG_SERIAL_FLOW_OUT_THROTTLED) )
+#endif
+ (funs->start_xmit)(chan); // Start output as necessary
+ cyg_drv_dsr_unlock();
+ }
+ cyg_drv_mutex_unlock(&cbuf->lock);
+ return res;
+}
+
+
+// ---------------------------------------------------------------------------
+
+static Cyg_ErrNo
+serial_read(cyg_io_handle_t handle, void *_buf, cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ serial_channel *chan = (serial_channel *)t->priv;
+ serial_funs *funs = chan->funs;
+ cyg_uint8 *buf = (cyg_uint8 *)_buf;
+ cyg_int32 size = 0;
+ cbuf_t *cbuf = &chan->in_cbuf;
+ Cyg_ErrNo res = ENOERR;
+#ifdef XX_CYGDBG_DIAG_BUF
+ extern int enable_diag_uart;
+ int _enable = enable_diag_uart;
+ int _time, _stime;
+ externC cyg_tick_count_t cyg_current_time(void);
+#endif // CYGDBG_DIAG_BUF
+
+ cyg_drv_mutex_lock(&cbuf->lock);
+ cbuf->abort = false;
+
+ if (cbuf->len == 0) {
+ // Non interrupt driven (i.e. polled) operation
+ while (size++ < *len) {
+ cyg_uint8 c = (funs->getc)(chan);
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
+ // for software flow control, if the driver returns one of the
+ // characters we act on it and then drop it (the app must not
+ // see it)
+ if ( chan->config.flags & CYGNUM_SERIAL_FLOW_XONXOFF_TX ) {
+ if ( c == CYGDAT_IO_SERIAL_FLOW_CONTROL_XOFF_CHAR ) {
+ throttle_tx( chan );
+ } else if ( c == CYGDAT_IO_SERIAL_FLOW_CONTROL_XON_CHAR ) {
+ restart_tx( chan );
+ }
+ else
+ *buf++ = c;
+ }
+ else
+ *buf++ = c;
+#else
+ *buf++ = c;
+#endif
+ }
+ } else {
+ cyg_drv_dsr_lock(); // Avoid races
+ while (size < *len) {
+ if (cbuf->nb > 0) {
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+ if ( (cbuf->nb <= cbuf->low_water) &&
+ (chan->flow_desc.flags & CYG_SERIAL_FLOW_IN_THROTTLED) )
+ restart_rx( chan, false );
+#endif
+ *buf++ = cbuf->data[cbuf->get];
+ if (++cbuf->get == cbuf->len) cbuf->get = 0;
+ cbuf->nb--;
+ size++;
+ } else {
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING
+ if (!cbuf->blocking) {
+ *len = size; // characters actually read
+ res = size == 0 ? -EAGAIN : ENOERR;
+ break;
+ }
+#endif // CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING
+ cbuf->waiting = true;
+#ifdef XX_CYGDBG_DIAG_BUF
+ enable_diag_uart = 0;
+ HAL_CLOCK_READ(&_time);
+ _stime = (int)cyg_current_time();
+ diag_printf("READ wait - get: %d, put: %d, time: %x.%x\n", cbuf->get, cbuf->put, _stime, _time);
+ enable_diag_uart = _enable;
+#endif // CYGDBG_DIAG_BUF
+ if( !cyg_drv_cond_wait(&cbuf->wait) )
+ cbuf->abort = true;
+#ifdef XX_CYGDBG_DIAG_BUF
+ enable_diag_uart = 0;
+ HAL_CLOCK_READ(&_time);
+ _stime = (int)cyg_current_time();
+ diag_printf("READ continue - get: %d, put: %d, time: %x.%x\n", cbuf->get, cbuf->put, _stime, _time);
+ enable_diag_uart = _enable;
+#endif // CYGDBG_DIAG_BUF
+ if (cbuf->abort) {
+ // Give up!
+ *len = size; // characters actually read
+ cbuf->abort = false;
+ cbuf->waiting = false;
+ res = -EINTR;
+ break;
+ }
+ }
+ }
+ cyg_drv_dsr_unlock();
+ }
+#ifdef XX_CYGDBG_DIAG_BUF
+ cyg_drv_isr_lock();
+ enable_diag_uart = 0;
+ HAL_CLOCK_READ(&_time);
+ _stime = (int)cyg_current_time();
+ diag_printf("READ done - size: %d, len: %d, time: %x.%x\n", size, *len, _stime, _time);
+ enable_diag_uart = _enable;
+ cyg_drv_isr_unlock();
+#endif // CYGDBG_DIAG_BUF
+ cyg_drv_mutex_unlock(&cbuf->lock);
+ return res;
+}
+
+
+// ---------------------------------------------------------------------------
+
+static cyg_bool
+serial_select(cyg_io_handle_t handle, cyg_uint32 which, CYG_ADDRWORD info)
+{
+#ifdef CYGPKG_IO_SERIAL_SELECT_SUPPORT
+
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ serial_channel *chan = (serial_channel *)t->priv;
+ cyg_bool retval = false;
+
+ switch( which )
+ {
+ case CYG_FREAD:
+ {
+ cbuf_t *cbuf = &chan->in_cbuf;
+
+ cyg_drv_mutex_lock(&cbuf->lock);
+ cyg_drv_dsr_lock(); // Avoid races
+
+ // Check for data in the input buffer. If there is none,
+ // register the select operation, otherwise return true.
+
+ if( cbuf->nb == 0 )
+ cyg_selrecord( info, &cbuf->selinfo );
+ else retval = true;
+
+ cyg_drv_dsr_unlock();
+ cyg_drv_mutex_unlock(&cbuf->lock);
+ }
+ break;
+
+ case CYG_FWRITE:
+ {
+ // Check for space in the output buffer. If there is none,
+ // register the select operation, otherwise return true.
+
+ int space ;
+ cbuf_t *cbuf = &chan->out_cbuf;
+
+ cyg_drv_mutex_lock(&cbuf->lock);
+ cyg_drv_dsr_lock(); // Avoid races
+
+ space = cbuf->len - cbuf->nb;
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+ if ( (space < cbuf->low_water) ||
+ (chan->flow_desc.flags & CYG_SERIAL_FLOW_OUT_THROTTLED) )
+ cyg_selrecord( info, &cbuf->selinfo );
+#else
+ if (space < cbuf->low_water)
+ cyg_selrecord( info, &cbuf->selinfo );
+#endif
+ else retval = true;
+
+ cyg_drv_dsr_unlock();
+ cyg_drv_mutex_unlock(&cbuf->lock);
+ }
+ break;
+
+ case 0: // exceptions - none supported
+ break;
+ }
+ return retval;
+#else
+
+ // With no select support, we simply return true.
+ return true;
+#endif
+}
+
+
+// ---------------------------------------------------------------------------
+
+static Cyg_ErrNo
+serial_get_config(cyg_io_handle_t handle, cyg_uint32 key, void *xbuf,
+ cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ serial_channel *chan = (serial_channel *)t->priv;
+ cyg_serial_info_t *buf = (cyg_serial_info_t *)xbuf;
+ Cyg_ErrNo res = ENOERR;
+ cbuf_t *out_cbuf = &chan->out_cbuf;
+ cbuf_t *in_cbuf = &chan->in_cbuf;
+ serial_funs *funs = chan->funs;
+
+ switch (key) {
+ case CYG_IO_GET_CONFIG_SERIAL_INFO:
+ if (*len < sizeof(cyg_serial_info_t)) {
+ return -EINVAL;
+ }
+ *buf = chan->config;
+ *len = sizeof(chan->config);
+ break;
+
+ case CYG_IO_GET_CONFIG_SERIAL_BUFFER_INFO:
+ // return rx/tx buffer sizes and counts
+ {
+ cyg_serial_buf_info_t *p;
+ if (*len < sizeof(cyg_serial_buf_info_t))
+ return -EINVAL;
+
+ *len = sizeof(cyg_serial_buf_info_t);
+ p = (cyg_serial_buf_info_t *)xbuf;
+
+ p->rx_bufsize = in_cbuf->len;
+ if (p->rx_bufsize)
+ p->rx_count = in_cbuf->nb;
+ else
+ p->rx_count = 0;
+
+ p->tx_bufsize = out_cbuf->len;
+ if (p->tx_bufsize)
+ p->tx_count = out_cbuf->nb;
+ else
+ p->tx_count = 0;
+ }
+ break;
+
+ case CYG_IO_GET_CONFIG_SERIAL_OUTPUT_DRAIN:
+// Wait for any pending output to complete
+ if (out_cbuf->len == 0) break; // Nothing to do if not buffered
+ cyg_drv_mutex_lock(&out_cbuf->lock); // Stop any further output processing
+ cyg_drv_dsr_lock();
+ while (out_cbuf->pending || (out_cbuf->nb > 0)) {
+ out_cbuf->waiting = true;
+ if(!cyg_drv_cond_wait(&out_cbuf->wait) )
+ res = -EINTR;
+ }
+ cyg_drv_dsr_unlock();
+ cyg_drv_mutex_unlock(&out_cbuf->lock);
+ break;
+
+ case CYG_IO_GET_CONFIG_SERIAL_INPUT_FLUSH:
+ // Flush any buffered input
+ if (in_cbuf->len == 0) break; // Nothing to do if not buffered
+ cyg_drv_mutex_lock(&in_cbuf->lock); // Stop any further input processing
+ cyg_drv_dsr_lock();
+ if (in_cbuf->waiting) {
+ in_cbuf->abort = true;
+ cyg_drv_cond_broadcast(&in_cbuf->wait);
+ in_cbuf->waiting = false;
+ }
+ in_cbuf->get = in_cbuf->put = in_cbuf->nb = 0; // Flush buffered input
+
+ // Pass to the hardware driver in case it wants to flush FIFOs etc.
+ (funs->set_config)(chan,
+ CYG_IO_SET_CONFIG_SERIAL_INPUT_FLUSH,
+ NULL, NULL);
+ cyg_drv_dsr_unlock();
+ cyg_drv_mutex_unlock(&in_cbuf->lock);
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+ // Restart receiver if it was shutdown
+ if ((chan->flow_desc.flags & CYG_SERIAL_FLOW_IN_THROTTLED) != 0) {
+ restart_rx( chan, false );
+ }
+#endif
+ break;
+
+ case CYG_IO_GET_CONFIG_SERIAL_ABORT:
+ // Abort any outstanding I/O, including blocked reads
+ // Caution - assumed to be called from 'timeout' (i.e. DSR) code
+ if (in_cbuf->len != 0) {
+ in_cbuf->abort = true;
+ cyg_drv_cond_broadcast(&in_cbuf->wait);
+ }
+ if (out_cbuf->len != 0) {
+ out_cbuf->abort = true;
+ cyg_drv_cond_broadcast(&out_cbuf->wait);
+ }
+ break;
+
+ case CYG_IO_GET_CONFIG_SERIAL_OUTPUT_FLUSH:
+// Throw away any pending output
+ if (out_cbuf->len == 0) break; // Nothing to do if not buffered
+ cyg_drv_mutex_lock(&out_cbuf->lock); // Stop any further output processing
+ cyg_drv_dsr_lock();
+ if (out_cbuf->nb > 0) {
+ out_cbuf->get = out_cbuf->put = out_cbuf->nb = 0; // Empties queue!
+ (funs->stop_xmit)(chan); // Done with transmit
+ }
+ // Pass to the hardware driver in case it wants to flush FIFOs etc.
+ (funs->set_config)(chan,
+ CYG_IO_SET_CONFIG_SERIAL_OUTPUT_FLUSH,
+ NULL, NULL);
+ if (out_cbuf->waiting) {
+ out_cbuf->abort = true;
+ cyg_drv_cond_broadcast(&out_cbuf->wait);
+ out_cbuf->waiting = false;
+ }
+ cyg_drv_dsr_unlock();
+ cyg_drv_mutex_unlock(&out_cbuf->lock);
+ break;
+
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING
+ case CYG_IO_GET_CONFIG_READ_BLOCKING:
+ if (*len < sizeof(cyg_uint32)) {
+ return -EINVAL;
+ }
+ *(cyg_uint32*)xbuf = (in_cbuf->blocking) ? 1 : 0;
+ break;
+
+ case CYG_IO_GET_CONFIG_WRITE_BLOCKING:
+ if (*len < sizeof(cyg_uint32)) {
+ return -EINVAL;
+ }
+ *(cyg_uint32*)xbuf = (out_cbuf->blocking) ? 1 : 0;
+ break;
+#endif // CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING
+
+ default:
+ res = -EINVAL;
+ }
+ return res;
+}
+
+
+// ---------------------------------------------------------------------------
+
+static Cyg_ErrNo
+serial_set_config(cyg_io_handle_t handle, cyg_uint32 key, const void *xbuf,
+ cyg_uint32 *len)
+{
+ Cyg_ErrNo res = ENOERR;
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ serial_channel *chan = (serial_channel *)t->priv;
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING
+ cbuf_t *out_cbuf = &chan->out_cbuf;
+ cbuf_t *in_cbuf = &chan->in_cbuf;
+#endif
+ serial_funs *funs = chan->funs;
+
+ switch (key) {
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING
+ case CYG_IO_SET_CONFIG_READ_BLOCKING:
+ if (*len < sizeof(cyg_uint32) || 0 == in_cbuf->len) {
+ return -EINVAL;
+ }
+ in_cbuf->blocking = (1 == *(cyg_uint32*)xbuf) ? true : false;
+ break;
+ case CYG_IO_SET_CONFIG_WRITE_BLOCKING:
+ if (*len < sizeof(cyg_uint32) || 0 == out_cbuf->len) {
+ return -EINVAL;
+ }
+ out_cbuf->blocking = (1 == *(cyg_uint32*)xbuf) ? true : false;
+ break;
+#endif // CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING
+
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+ case CYG_IO_SET_CONFIG_SERIAL_FLOW_CONTROL_METHOD:
+ {
+ cyg_uint32 *f = (cyg_uint32 *)xbuf;
+
+ if (*len < sizeof(*f))
+ return -EINVAL;
+
+ cyg_drv_dsr_lock();
+
+ chan->config.flags &= ~(CYGNUM_SERIAL_FLOW_XONXOFF_RX|
+ CYGNUM_SERIAL_FLOW_XONXOFF_TX|
+ CYGNUM_SERIAL_FLOW_RTSCTS_RX|
+ CYGNUM_SERIAL_FLOW_RTSCTS_TX|
+ CYGNUM_SERIAL_FLOW_DSRDTR_RX|
+ CYGNUM_SERIAL_FLOW_DSRDTR_TX);
+ chan->config.flags |= (*f & (
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
+ CYGNUM_SERIAL_FLOW_XONXOFF_RX|
+ CYGNUM_SERIAL_FLOW_XONXOFF_TX|
+#endif
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_HW
+ CYGNUM_SERIAL_FLOW_RTSCTS_RX|
+ CYGNUM_SERIAL_FLOW_RTSCTS_TX|
+ CYGNUM_SERIAL_FLOW_DSRDTR_RX|
+ CYGNUM_SERIAL_FLOW_DSRDTR_TX|
+#endif
+ 0));
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_HW
+ // up to hardware driver to clear flags if rejected
+ res = (funs->set_config)(chan,
+ CYG_IO_SET_CONFIG_SERIAL_HW_FLOW_CONFIG,
+ NULL, NULL);
+#endif
+ cyg_drv_dsr_unlock();
+ }
+ break;
+
+ case CYG_IO_SET_CONFIG_SERIAL_FLOW_CONTROL_FORCE:
+ {
+ cyg_uint32 *f = (cyg_uint32 *)xbuf;
+
+ if (*len < sizeof(*f))
+ return -EINVAL;
+
+ cyg_drv_dsr_lock();
+ switch (*f) {
+ case CYGNUM_SERIAL_FLOW_THROTTLE_RX:
+ throttle_rx( chan, true );
+ break;
+ case CYGNUM_SERIAL_FLOW_RESTART_RX:
+ restart_rx( chan, true );
+ break;
+ case CYGNUM_SERIAL_FLOW_THROTTLE_TX:
+ throttle_tx( chan );
+ break;
+ case CYGNUM_SERIAL_FLOW_RESTART_TX:
+ restart_tx( chan );
+ break;
+ default:
+ res = -EINVAL;
+ break;
+ }
+ cyg_drv_dsr_unlock();
+ }
+ break;
+#endif // CYGPKG_IO_SERIAL_FLOW_CONTROL
+
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
+ case CYG_IO_SET_CONFIG_SERIAL_STATUS_CALLBACK:
+ {
+ cyg_serial_line_status_callback_fn_t newfn;
+ CYG_ADDRWORD newpriv;
+ cyg_serial_line_status_callback_t *tmp =
+ (cyg_serial_line_status_callback_t *)xbuf;
+
+ if ( *len < sizeof(*tmp) )
+ return -EINVAL;
+
+ newfn = tmp->fn;
+ newpriv = tmp->priv;
+
+ // prevent callbacks while we do this
+ cyg_drv_dsr_lock();
+ // store old callbacks in same structure
+ tmp->fn = chan->status_callback;
+ tmp->priv = chan->status_callback_priv;
+ chan->status_callback = newfn;
+ chan->status_callback_priv = newpriv;
+ cyg_drv_dsr_unlock();
+ *len = sizeof(*tmp);
+ }
+ break;
+#endif
+
+ default:
+ // pass down to lower layers
+ return (funs->set_config)(chan, key, xbuf, len);
+ }
+ return res;
+}
+
+// ---------------------------------------------------------------------------
+
+static void
+serial_xmt_char(serial_channel *chan)
+{
+ cbuf_t *cbuf = &chan->out_cbuf;
+ serial_funs *funs = chan->funs;
+ unsigned char c;
+ int space;
+
+#if CYGINT_IO_SERIAL_BLOCK_TRANSFER
+ CYG_ASSERT(false == cbuf->block_mode_xfer_running,
+ "Attempting char xmt while block transfer is running");
+#endif
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
+ // if we are required to send an XON/XOFF char, send it before
+ // anything else
+ // FIXME: what if XON gets corrupted in transit to the other end?
+ // Should we resend XON even though the other end may not be wanting
+ // to send us stuff at this point?
+ if ( chan->config.flags & CYGNUM_SERIAL_FLOW_XONXOFF_RX ) {
+ if ( chan->flow_desc.xchar ) {
+ if ( (funs->putc)(chan, chan->flow_desc.xchar) ) {
+ chan->flow_desc.xchar = '\0';
+ } else { // otherwise there's no space and we have to wait
+ return;
+ }
+ }
+ }
+#endif
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+ // if we're meant to be throttled, just stop and leave
+ if ( chan->flow_desc.flags & CYG_SERIAL_FLOW_OUT_THROTTLED ) {
+ (funs->stop_xmit)(chan); // Stop transmitting for now
+ return;
+ }
+#endif
+ while (cbuf->nb > 0) {
+ c = cbuf->data[cbuf->get];
+ if ((funs->putc)(chan, c)) {
+ cbuf->get++;
+ if (cbuf->get == cbuf->len) cbuf->get = 0;
+ cbuf->nb--;
+ } else {
+ // See if there is now enough room to restart writer
+ space = cbuf->len - cbuf->nb;
+ if (space >= cbuf->low_water) {
+ if (cbuf->waiting) {
+ cbuf->waiting = false;
+ cyg_drv_cond_broadcast(&cbuf->wait);
+ }
+#ifdef CYGPKG_IO_SERIAL_SELECT_SUPPORT
+ cyg_selwakeup( &cbuf->selinfo );
+#endif
+ }
+ return; // Need to wait for more space
+ }
+ }
+ (funs->stop_xmit)(chan); // Done with transmit
+
+ // must signal waiters, and wake up selecters for the case when
+ // this was the last char to be sent and they hadn't been signalled
+ // before (e.g. because of flow control)
+ if (cbuf->waiting) {
+ cbuf->waiting = false;
+ cyg_drv_cond_broadcast(&cbuf->wait);
+ }
+#ifdef CYGPKG_IO_SERIAL_SELECT_SUPPORT
+ cyg_selwakeup( &cbuf->selinfo );
+#endif
+}
+
+// ---------------------------------------------------------------------------
+
+static void
+serial_rcv_char(serial_channel *chan, unsigned char c)
+{
+ cbuf_t *cbuf = &chan->in_cbuf;
+
+#if CYGINT_IO_SERIAL_BLOCK_TRANSFER
+ CYG_ASSERT(false == cbuf->block_mode_xfer_running,
+ "Attempting char rcv while block transfer is running");
+#endif
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
+ // for software flow control, if the driver returns one of the characters
+ // we act on it and then drop it (the app must not see it)
+ if ( chan->config.flags & CYGNUM_SERIAL_FLOW_XONXOFF_TX ) {
+ if ( c == CYGDAT_IO_SERIAL_FLOW_CONTROL_XOFF_CHAR ) {
+ throttle_tx( chan );
+ return; // it wasn't a "real" character
+ } else if ( c == CYGDAT_IO_SERIAL_FLOW_CONTROL_XON_CHAR ) {
+ restart_tx( chan );
+ return; // it wasn't a "real" character
+ }
+ }
+#endif
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+ // If we've hit the high water mark, tell the other side to stop
+ if ( cbuf->nb >= cbuf->high_water ) {
+ throttle_rx( chan, false );
+ }
+#endif
+#ifdef CYGPKG_IO_SERIAL_SELECT_SUPPORT
+ // Wake up any pending selectors if we are about to
+ // put some data into a previously empty buffer.
+ if( cbuf->nb == 0 )
+ cyg_selwakeup( &cbuf->selinfo );
+#endif
+
+ // If the flow control is not enabled/sufficient and the buffer is
+ // already full, just throw new characters away.
+
+ if ( cbuf->nb < cbuf->len ) {
+ cbuf->data[cbuf->put++] = c;
+ if (cbuf->put == cbuf->len) cbuf->put = 0;
+ cbuf->nb++;
+ } // note trailing else
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
+ else {
+ // Overrun. Report the error.
+ cyg_serial_line_status_t stat;
+ stat.which = CYGNUM_SERIAL_STATUS_OVERRUNERR;
+ serial_indicate_status(chan, &stat);
+ }
+#endif
+
+ if (cbuf->waiting) {
+#ifdef XX_CYGDBG_DIAG_BUF
+ extern int enable_diag_uart;
+ int _enable = enable_diag_uart;
+ int _time, _stime;
+ externC cyg_tick_count_t cyg_current_time(void);
+ enable_diag_uart = 0;
+ HAL_CLOCK_READ(&_time);
+ _stime = (int)cyg_current_time();
+ diag_printf("Signal reader - time: %x.%x\n", _stime, _time);
+ enable_diag_uart = _enable;
+#endif // CYGDBG_DIAG_BUF
+ cbuf->waiting = false;
+ cyg_drv_cond_broadcast(&cbuf->wait);
+ }
+}
+
+//----------------------------------------------------------------------------
+// Flow control indication callback
+
+#ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
+static void
+serial_indicate_status(serial_channel *chan, cyg_serial_line_status_t *s )
+{
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+ if ( CYGNUM_SERIAL_STATUS_FLOW == s->which ) {
+ if ( s->value )
+ restart_tx( chan );
+ else
+ throttle_tx( chan );
+ }
+#endif
+ if ( chan->status_callback )
+ (*chan->status_callback)(s, chan->status_callback_priv);
+}
+#endif // ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
+
+//----------------------------------------------------------------------------
+// Block transfer functions. Not all drivers require these. Those that
+// do must follow the required semantics:
+//
+// Attempt to transfer as much via the block transfer function as
+// possible, _but_ if that fails, do the remaining bytes via the
+// single-char function. That ensures that all policy decisions can be
+// made in this driver, and not in the device driver.
+//
+// Note: if the driver uses DMA for transmission, an initial failing
+// call to the xmt_req function must cause the start_xmit function to
+// fall-back to regular CPU-interrupt based single-character
+// transmission.
+
+#if CYGINT_IO_SERIAL_BLOCK_TRANSFER
+
+static rcv_req_reply_t
+serial_data_rcv_req(serial_channel *chan, int avail,
+ int* space_avail, unsigned char** space)
+{
+ cbuf_t *cbuf = &chan->in_cbuf;
+ int gap;
+
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
+ // When there is software flow-control, force the serial device
+ // driver to use the single-char xmt/rcv functions, since these
+ // have to make policy decision based on the data. Rcv function
+ // may also have to transmit data to throttle the xmitter.
+ if (chan->config.flags & (CYGNUM_SERIAL_FLOW_XONXOFF_TX|CYGNUM_SERIAL_FLOW_XONXOFF_RX))
+ return CYG_RCV_DISABLED;
+#endif
+
+ CYG_ASSERT(false == cbuf->block_mode_xfer_running,
+ "Attempting new block transfer while another is running");
+ // Check for space
+ gap = cbuf->nb;
+ if (gap == cbuf->len)
+ return CYG_RCV_FULL;
+
+#ifdef CYGDBG_USE_ASSERTS
+ cbuf->block_mode_xfer_running = true;
+#endif
+
+ if (0 == gap) {
+ // Buffer is empty. Reset put/get indexes to get max transfer in
+ // one chunk.
+ cbuf->get = 0;
+ cbuf->put = 0;
+ gap = cbuf->len;
+ } else {
+ // Free space (G = get, P = put, x = data, . = empty)
+ // positive: xxxxP.....Gxxx
+ // negative: ..GxxxxxP..... [offer last chunk only]
+
+ // First try for a gap between put and get locations
+ gap = cbuf->get - cbuf->put;
+ if (gap < 0) {
+ // If failed, the gap is between put and the end of buffer
+ gap = cbuf->len - cbuf->put;
+ }
+ }
+
+ if (avail < gap) gap = avail; // bound by what's available from hw
+
+ *space_avail = gap;
+ *space = &cbuf->data[cbuf->put];
+
+ CYG_ASSERT((gap+cbuf->nb) <= cbuf->len, "Buffer will overflow");
+ CYG_ASSERT(cbuf->put < cbuf->len, "Invalid put ptr");
+ CYG_ASSERT(cbuf->get < cbuf->len, "Invalid get ptr");
+
+ return CYG_RCV_OK;
+}
+
+static void
+serial_data_rcv_done(serial_channel *chan, int chars_rcvd)
+{
+ cbuf_t *cbuf = &chan->in_cbuf;
+
+ cbuf->put += chars_rcvd;
+ cbuf->nb += chars_rcvd;
+
+ if (cbuf->put == cbuf->len) cbuf->put = 0;
+
+ CYG_ASSERT(cbuf->nb <= cbuf->len, "Buffer overflow");
+ CYG_ASSERT(cbuf->put < cbuf->len, "Invalid put ptr");
+ CYG_ASSERT(cbuf->get < cbuf->len, "Invalid get ptr");
+
+ if (cbuf->waiting) {
+ cbuf->waiting = false;
+ cyg_drv_cond_broadcast(&cbuf->wait);
+ }
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+ // If we've hit the high water mark, tell the other side to stop
+ if ( cbuf->nb >= cbuf->high_water ) {
+ throttle_rx( chan, false );
+ }
+#endif
+#ifdef CYGPKG_IO_SERIAL_SELECT_SUPPORT
+ // Wake up any pending selectors if we have
+ // put some data into a previously empty buffer.
+ if (chars_rcvd == cbuf->nb)
+ cyg_selwakeup( &cbuf->selinfo );
+#endif
+
+#ifdef CYGDBG_USE_ASSERTS
+ cbuf->block_mode_xfer_running = false;
+#endif
+}
+
+static xmt_req_reply_t
+serial_data_xmt_req(serial_channel *chan, int space,
+ int* chars_avail, unsigned char** chars)
+{
+ cbuf_t *cbuf = &chan->out_cbuf;
+ int avail;
+
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
+ // When there is software flow-control, force the serial device
+ // driver to use the single-char xmt/rcv functions, since these
+ // have to make policy decision based on the data. Rcv function
+ // may also have to transmit data to throttle the xmitter.
+ if (chan->config.flags & (CYGNUM_SERIAL_FLOW_XONXOFF_TX|CYGNUM_SERIAL_FLOW_XONXOFF_RX))
+ return CYG_XMT_DISABLED;
+#endif
+
+ CYG_ASSERT(false == cbuf->block_mode_xfer_running,
+ "Attempting new block transfer while another is running");
+
+#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL
+ // if we're meant to be throttled, just stop and leave
+ if ( chan->flow_desc.flags & CYG_SERIAL_FLOW_OUT_THROTTLED ) {
+ (chan->funs->stop_xmit)(chan); // Stop transmitting for now
+ return CYG_XMT_EMPTY;
+ }
+#endif
+
+ // Available data (G = get, P = put, x = data, . = empty)
+ // 0: no data
+ // negative: xxxxP.....Gxxx [offer last chunk only]
+ // positive: ..GxxxxxP.....
+ if (0 == cbuf->nb)
+ return CYG_XMT_EMPTY;
+
+#ifdef CYGDBG_USE_ASSERTS
+ cbuf->block_mode_xfer_running = true;
+#endif
+
+ if (cbuf->get >= cbuf->put) {
+ avail = cbuf->len - cbuf->get;
+ } else {
+ avail = cbuf->put - cbuf->get;
+ }
+
+ if (avail > space) avail = space; // bound by space in hardware
+
+ *chars_avail = avail;
+ *chars = &cbuf->data[cbuf->get];
+
+ CYG_ASSERT(avail <= cbuf->len, "Avail overflow");
+ CYG_ASSERT(cbuf->nb <= cbuf->len, "Buffer overflow");
+ CYG_ASSERT(cbuf->put < cbuf->len, "Invalid put ptr");
+ CYG_ASSERT(cbuf->get < cbuf->len, "Invalid get ptr");
+
+ return CYG_XMT_OK;
+}
+
+static void
+serial_data_xmt_done(serial_channel *chan, int chars_sent)
+{
+ cbuf_t *cbuf = &chan->out_cbuf;
+ serial_funs *funs = chan->funs;
+ int space;
+
+ cbuf->get += chars_sent;
+ cbuf->nb -= chars_sent;
+
+ if (cbuf->get == cbuf->len) cbuf->get = 0;
+
+ CYG_ASSERT(cbuf->nb <= cbuf->len, "Buffer overflow");
+ CYG_ASSERT(cbuf->nb >= 0, "Buffer underflow");
+ CYG_ASSERT(cbuf->put < cbuf->len, "Invalid put ptr");
+ CYG_ASSERT(cbuf->get < cbuf->len, "Invalid get ptr");
+
+ if (0 == cbuf->nb) {
+ (funs->stop_xmit)(chan); // Done with transmit
+ cbuf->get = cbuf->put = 0; // reset ptrs if empty
+ }
+
+ // See if there is now enough room to restart writer
+ space = cbuf->len - cbuf->nb;
+ if (space >= cbuf->low_water) {
+ if (cbuf->waiting) {
+ cbuf->waiting = false;
+ cyg_drv_cond_broadcast(&cbuf->wait);
+ }
+#ifdef CYGPKG_IO_SERIAL_SELECT_SUPPORT
+ cyg_selwakeup( &cbuf->selinfo );
+#endif
+ }
+
+#ifdef CYGDBG_USE_ASSERTS
+ cbuf->block_mode_xfer_running = false;
+#endif
+}
+
+#endif // CYGINT_IO_SERIAL_BLOCK_TRANSFER
+
+// ---------------------------------------------------------------------------
+
+// EOF serial.c
diff --git a/cesar/ecos/packages/io/serial/current/src/common/termios.c b/cesar/ecos/packages/io/serial/current/src/common/termios.c
new file mode 100644
index 0000000000..a06623ad19
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/src/common/termios.c
@@ -0,0 +1,402 @@
+/* ====================================================================
+//
+// termios.c
+//
+// POSIX termios API implementation
+//
+// ====================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+// ====================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-07-22
+// Purpose: POSIX termios API support
+// Description: Most of the real work happens in the POSIX termios tty
+// drivers
+//
+//####DESCRIPTIONEND####
+//
+// ==================================================================*/
+
+// CONFIGURATION
+
+#include <pkgconf/io_serial.h>
+
+#ifdef CYGPKG_IO_SERIAL_TERMIOS
+
+// INCLUDES
+
+#include <termios.h> // Header for this file
+#include <cyg/infra/cyg_type.h> // Common stuff
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/io/serialio.h> // eCos serial implementation
+#include <cyg/fileio/fileio.h> // file operations
+#include <cyg/io/io.h>
+#include <errno.h> // errno
+#include <unistd.h> // isatty()
+
+// TYPES
+
+typedef struct {
+ const struct termios *termios_p;
+ int optact;
+} setattr_struct;
+
+// FUNCTIONS
+
+extern speed_t
+cfgetospeed( const struct termios *termios_p )
+{
+ CYG_REPORT_FUNCTYPE( "returning speed code %d" );
+ CYG_CHECK_DATA_PTRC( termios_p );
+ CYG_REPORT_FUNCARG1XV( termios_p );
+ CYG_REPORT_RETVAL( termios_p->c_ospeed );
+ return termios_p->c_ospeed;
+} // cfgetospeed()
+
+
+extern int
+cfsetospeed( struct termios *termios_p, speed_t speed )
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+ CYG_CHECK_DATA_PTRC( termios_p );
+ CYG_REPORT_FUNCARG2( "termios_p=%08x, speed=%d", termios_p, speed );
+ CYG_REPORT_RETVAL( termios_p->c_ospeed );
+ if ( speed > B4000000 ) {
+ errno = EINVAL;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+ termios_p->c_ospeed = speed;
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+} // cfsetospeed()
+
+
+extern speed_t
+cfgetispeed( const struct termios *termios_p )
+{
+ CYG_REPORT_FUNCTYPE( "returning speed code %d" );
+ CYG_CHECK_DATA_PTRC( termios_p );
+ CYG_REPORT_FUNCARG1XV( termios_p );
+ CYG_REPORT_RETVAL( termios_p->c_ispeed );
+ return termios_p->c_ispeed;
+} // cfgetispeed()
+
+
+extern int
+cfsetispeed( struct termios *termios_p, speed_t speed )
+{
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+ CYG_CHECK_DATA_PTRC( termios_p );
+ CYG_REPORT_FUNCARG2( "termios_p=%08x, speed=%d", termios_p, speed );
+ if ( speed > B115200 ) {
+ errno = EINVAL;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+ termios_p->c_ispeed = speed;
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+} // cfsetispeed()
+
+
+__externC cyg_file *
+cyg_fp_get( int fd );
+
+__externC void
+cyg_fp_free( cyg_file *fp );
+
+extern int
+tcgetattr( int fildes, struct termios *termios_p )
+{
+ cyg_file *fp;
+ int ret;
+ int len = sizeof( *termios_p );
+
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+ CYG_REPORT_FUNCARG2( "fildes=%d, termios_p=%08x", fildes, termios_p );
+ CYG_CHECK_DATA_PTRC( termios_p );
+
+ if ( !isatty(fildes) ) {
+ errno = ENOTTY;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ fp = cyg_fp_get( fildes );
+
+ if ( NULL == fp ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ ret = fp->f_ops->fo_getinfo( fp, CYG_IO_GET_CONFIG_TERMIOS, termios_p,
+ len);
+ cyg_fp_free( fp );
+
+ if ( ret > 0 ) {
+ errno = ret;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+} // tcgetattr()
+
+
+extern int
+tcsetattr( int fildes, int optact, const struct termios *termios_p )
+{
+ cyg_file *fp;
+ int ret;
+ setattr_struct attr;
+ int len = sizeof( attr );
+
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+ CYG_REPORT_FUNCARG3( "fildes=%d, optact=%d, termios_p=%08x",
+ fildes, optact, termios_p );
+ CYG_CHECK_DATA_PTRC( termios_p );
+
+ if ( !isatty(fildes) ) {
+ errno = ENOTTY;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ if ( (optact != TCSANOW) && (optact != TCSADRAIN) &&
+ (optact != TCSAFLUSH) ) {
+ errno = EINVAL;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ fp = cyg_fp_get( fildes );
+
+ if ( NULL == fp ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ attr.termios_p = termios_p;
+ attr.optact = optact;
+
+ ret = fp->f_ops->fo_setinfo( fp, CYG_IO_SET_CONFIG_TERMIOS, &attr,
+ len);
+
+ cyg_fp_free( fp );
+
+ if ( ret > 0 ) {
+ errno = ret;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+} // tcsetattr()
+
+
+extern int
+tcsendbreak( int fildes, int duration )
+{
+ // FIXME
+ return -EINVAL;
+} // tcsendbreak()
+
+extern int
+tcdrain( int fildes )
+{
+ cyg_file *fp;
+ int ret;
+
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+ CYG_REPORT_FUNCARG1DV( fildes );
+
+ if ( !isatty(fildes) ) {
+ errno = ENOTTY;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ fp = cyg_fp_get( fildes );
+
+ if ( NULL == fp ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ ret = fp->f_ops->fo_getinfo( fp,
+ CYG_IO_GET_CONFIG_SERIAL_OUTPUT_DRAIN,
+ NULL, 0 );
+ cyg_fp_free( fp );
+
+ if ( ret > 0 ) {
+ errno = ret;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+} // tcdrain()
+
+extern int
+tcflush( int fildes, int queue_sel )
+{
+ cyg_file *fp;
+ int ret;
+
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+ CYG_REPORT_FUNCARG2DV( fildes, queue_sel );
+
+ if ( !isatty(fildes) ) {
+ errno = ENOTTY;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ fp = cyg_fp_get( fildes );
+
+ if ( NULL == fp ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ switch( queue_sel ) {
+ case TCIOFLUSH:
+ ret = fp->f_ops->fo_getinfo( fp,
+ CYG_IO_GET_CONFIG_SERIAL_OUTPUT_FLUSH,
+ NULL, 0 );
+ // fallthrough
+ case TCIFLUSH:
+ ret = fp->f_ops->fo_getinfo( fp,
+ CYG_IO_GET_CONFIG_SERIAL_INPUT_FLUSH,
+ NULL, 0 );
+ break;
+ case TCOFLUSH:
+ ret = fp->f_ops->fo_getinfo( fp,
+ CYG_IO_GET_CONFIG_SERIAL_OUTPUT_FLUSH,
+ NULL, 0 );
+ break;
+ default:
+ ret = EINVAL;
+ break;
+ }
+
+ cyg_fp_free( fp );
+
+ if ( ret > 0 ) {
+ errno = ret;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+} // tcflush()
+
+extern int
+tcflow( int fildes, int action )
+{
+ cyg_file *fp;
+ int ret;
+ cyg_uint32 forcearg;
+ int len = sizeof(forcearg);
+
+ CYG_REPORT_FUNCTYPE( "returning %d" );
+ CYG_REPORT_FUNCARG2DV( fildes, action );
+
+ if ( !isatty(fildes) ) {
+ errno = ENOTTY;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ fp = cyg_fp_get( fildes );
+
+ if ( NULL == fp ) {
+ errno = EBADF;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+
+ switch( action ) {
+ case TCOOFF:
+ forcearg = CYGNUM_SERIAL_FLOW_THROTTLE_TX;
+ ret = fp->f_ops->fo_setinfo( fp,
+ CYG_IO_SET_CONFIG_SERIAL_FLOW_CONTROL_FORCE,
+ &forcearg, len );
+ break;
+ case TCOON:
+ forcearg = CYGNUM_SERIAL_FLOW_RESTART_TX;
+ ret = fp->f_ops->fo_setinfo( fp,
+ CYG_IO_SET_CONFIG_SERIAL_FLOW_CONTROL_FORCE,
+ &forcearg, len );
+ break;
+ case TCIOFF:
+ forcearg = CYGNUM_SERIAL_FLOW_THROTTLE_RX;
+ ret = fp->f_ops->fo_setinfo( fp,
+ CYG_IO_SET_CONFIG_SERIAL_FLOW_CONTROL_FORCE,
+ &forcearg, len );
+ break;
+ case TCION:
+ forcearg = CYGNUM_SERIAL_FLOW_RESTART_RX;
+ ret = fp->f_ops->fo_setinfo( fp,
+ CYG_IO_SET_CONFIG_SERIAL_FLOW_CONTROL_FORCE,
+ &forcearg, len );
+ break;
+ default:
+ ret = EINVAL;
+ break;
+ }
+
+ cyg_fp_free( fp );
+
+ if ( ret > 0 ) {
+ errno = ret;
+ CYG_REPORT_RETVAL( -1 );
+ return -1;
+ }
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+} // tcflow()
+
+#endif // ifdef CYGPKG_IO_SERIAL_TERMIOS
+
+// EOF termios.c
diff --git a/cesar/ecos/packages/io/serial/current/src/common/termiostty.c b/cesar/ecos/packages/io/serial/current/src/common/termiostty.c
new file mode 100644
index 0000000000..a0197cde04
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/src/common/termiostty.c
@@ -0,0 +1,904 @@
+//==========================================================================
+//
+// termiostty.c
+//
+// POSIX Termios compatible TTY I/O driver
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Jonathan Larmour
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: gthomas
+// Date: 2000-07-22
+// Purpose: Device driver for termios emulation tty I/O, layered on
+// top of serial I/O
+// Description: TODO: Add OPOST support for 80x25 (configurable) windows
+// TODO: Support _POSIX_VDISABLE
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/io_serial.h>
+
+#ifdef CYGPKG_IO_SERIAL_TERMIOS
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common types
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/io/io.h>
+#include <cyg/io/devtab.h>
+#include <cyg/io/serialio.h> // public serial API
+#include <termios.h> // Termios header
+#include <cyg/hal/drv_api.h>
+#include <stdlib.h> // malloc
+#include <string.h>
+#ifdef CYGSEM_IO_SERIAL_TERMIOS_USE_SIGNALS
+# include <signal.h>
+#endif
+
+//==========================================================================
+// FUNCTION PROTOTYPES
+
+static bool
+termios_init(struct cyg_devtab_entry *tab);
+
+static Cyg_ErrNo
+termios_lookup(struct cyg_devtab_entry **tab,
+ struct cyg_devtab_entry *sub_tab,
+ const char *name);
+static Cyg_ErrNo
+termios_write(cyg_io_handle_t handle, const void *buf, cyg_uint32 *len);
+static Cyg_ErrNo
+termios_read(cyg_io_handle_t handle, void *buf, cyg_uint32 *len);
+static cyg_bool
+termios_select(cyg_io_handle_t handle, cyg_uint32 which, CYG_ADDRWORD info);
+static Cyg_ErrNo
+termios_get_config(cyg_io_handle_t handle, cyg_uint32 key, void *buf,
+ cyg_uint32 *len);
+static Cyg_ErrNo
+termios_set_config(cyg_io_handle_t handle, cyg_uint32 key, const void *buf,
+ cyg_uint32 *len);
+
+//==========================================================================
+// TYPE DEFINITIONS
+
+struct termios_private_info {
+ struct termios termios;
+ cyg_io_handle_t dev_handle;
+ cyg_drv_mutex_t lock;
+ cyg_bool init;
+};
+
+typedef struct {
+ struct termios *termios_p;
+ int optact;
+} setattr_struct;
+
+
+//==========================================================================
+// STATIC OBJECTS
+
+static DEVIO_TABLE(termios_devio,
+ termios_write,
+ termios_read,
+ termios_select,
+ termios_get_config,
+ termios_set_config);
+
+#ifdef CYGPKG_IO_SERIAL_TERMIOS_TERMIOS0
+static struct termios_private_info termios_private_info0;
+DEVTAB_ENTRY(termios_io0,
+ "/dev/termios0",
+ CYGDAT_IO_SERIAL_TERMIOS_TERMIOS0_DEV,
+ &termios_devio,
+ termios_init,
+ termios_lookup,
+ &termios_private_info0);
+#endif
+
+#ifdef CYGPKG_IO_SERIAL_TERMIOS_TERMIOS1
+static struct termios_private_info termios_private_info1;
+DEVTAB_ENTRY(termios_io1,
+ "/dev/termios1",
+ CYGDAT_IO_SERIAL_TERMIOS_TERMIOS1_DEV,
+ &termios_devio,
+ termios_init,
+ termios_lookup,
+ &termios_private_info1);
+#endif
+
+#ifdef CYGPKG_IO_SERIAL_TERMIOS_TERMIOS2
+static struct termios_private_info termios_private_info2;
+DEVTAB_ENTRY(termios_io2,
+ "/dev/termios2",
+ CYGDAT_IO_SERIAL_TERMIOS_TERMIOS2_DEV,
+ &termios_devio,
+ termios_init,
+ termios_lookup,
+ &termios_private_info2);
+#endif
+
+static const cc_t c_cc_init[ NCCS ] = {
+ 0x04, /* EOF == ^D */
+ 0, /* EOL */
+ 0x08, /* ERASE = BS ; NB DEL=0x7f */
+ 0x03, /* INTR = ^C */
+ 0x15, /* KILL = ^U */
+ 0, /* MIN = 0 */
+ 0x1c, /* QUIT = ^\ */
+ 0x1a, /* SUSP = ^Z ; NB ignored in this impl - no job control */
+ 0, /* TIME = 0 */
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
+ CYGDAT_IO_SERIAL_FLOW_CONTROL_XON_CHAR,
+ CYGDAT_IO_SERIAL_FLOW_CONTROL_XOFF_CHAR,
+#else
+ 17,
+ 19,
+#endif
+};
+
+// map eCos bitrates to POSIX bitrates.
+static speed_t ecosbaud2posixbaud[] = {
+ 0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B2400, B3600,
+ B4800, B7200, B9600, B14400, B19200, B38400, B57600, B115200, B230400 };
+
+// map POSIX bitrates to eCos bitrates.
+static cyg_serial_baud_rate_t posixbaud2ecosbaud[] = {
+ 0, CYGNUM_SERIAL_BAUD_50, CYGNUM_SERIAL_BAUD_75, CYGNUM_SERIAL_BAUD_110,
+ CYGNUM_SERIAL_BAUD_134_5, CYGNUM_SERIAL_BAUD_150, CYGNUM_SERIAL_BAUD_200,
+ CYGNUM_SERIAL_BAUD_300, CYGNUM_SERIAL_BAUD_600, CYGNUM_SERIAL_BAUD_1200,
+ CYGNUM_SERIAL_BAUD_1800, CYGNUM_SERIAL_BAUD_2400, CYGNUM_SERIAL_BAUD_3600,
+ CYGNUM_SERIAL_BAUD_4800, CYGNUM_SERIAL_BAUD_7200, CYGNUM_SERIAL_BAUD_9600,
+ CYGNUM_SERIAL_BAUD_14400, CYGNUM_SERIAL_BAUD_19200,
+ CYGNUM_SERIAL_BAUD_38400, CYGNUM_SERIAL_BAUD_57600,
+ CYGNUM_SERIAL_BAUD_115200, CYGNUM_SERIAL_BAUD_230400 };
+
+
+//==========================================================================
+// FUNCTIONS
+
+static __inline__ speed_t
+map_ecosbaud_to_posixbaud( cyg_serial_baud_rate_t ebaud )
+{
+ if ( ebaud > (sizeof(ecosbaud2posixbaud) / sizeof(speed_t)) )
+ return 0;
+ return ecosbaud2posixbaud[ ebaud ];
+}
+
+static __inline__ cyg_serial_baud_rate_t
+map_posixbaud_to_ecosbaud( speed_t pbaud )
+{
+ if ( pbaud > (sizeof(posixbaud2ecosbaud)/sizeof(cyg_serial_baud_rate_t)) )
+ return 0;
+ return posixbaud2ecosbaud[ pbaud ];
+}
+
+//==========================================================================
+// real_termios_init is used to initialize the termios structure. This is
+// called at lookup time, and not from termios_init() because it needs
+// to query the serial device which may not be set up yet at that point
+// in termios_init()
+
+#ifdef CYGSEM_IO_SERIAL_TERMIOS_USE_SIGNALS
+# define C_IFLAG_INIT (ICRNL|IGNBRK|BRKINT)
+#else
+# define C_IFLAG_INIT (ICRNL|IGNBRK)
+#endif
+#define C_OFLAG_INIT (ONLCR)
+#define C_CFLAG_INIT (CREAD)
+#define C_LFLAG_INIT (ECHO|ECHOE|ECHOK|ICANON)
+
+static Cyg_ErrNo
+real_termios_init( struct termios_private_info *priv )
+{
+ Cyg_ErrNo res;
+ struct termios *t;
+ cyg_serial_info_t dev_conf;
+ cyg_serial_buf_info_t dev_buf_conf;
+ cyg_uint32 len = sizeof( dev_conf );
+
+ CYG_REPORT_FUNCTYPE("returning %d");
+ CYG_REPORT_FUNCARG1XV( priv );
+ CYG_CHECK_DATA_PTRC( priv );
+
+ t = &priv->termios;
+
+ // Get info from driver
+ res = cyg_io_get_config( priv->dev_handle, CYG_IO_GET_CONFIG_SERIAL_INFO,
+ &dev_conf, &len );
+ if ( ENOERR == res ) {
+ len = sizeof( dev_buf_conf );
+ res = cyg_io_get_config( priv->dev_handle,
+ CYG_IO_GET_CONFIG_SERIAL_BUFFER_INFO,
+ &dev_buf_conf, &len );
+ }
+
+ if ( ENOERR != res ) {
+ CYG_REPORT_RETVAL( res );
+ return res;
+ }
+
+ // we only support symmetric baud rates
+ t->c_ispeed = t->c_ospeed = map_ecosbaud_to_posixbaud( dev_conf.baud );
+ t->c_iflag = C_IFLAG_INIT;
+ t->c_oflag = C_OFLAG_INIT;
+ t->c_cflag = C_CFLAG_INIT;
+ t->c_lflag = C_LFLAG_INIT;
+ memcpy( t->c_cc, c_cc_init, sizeof( t->c_cc ) );
+
+ switch ( dev_conf.parity ) {
+ case CYGNUM_SERIAL_PARITY_NONE:
+ t->c_iflag |= IGNPAR;
+ break;
+ case CYGNUM_SERIAL_PARITY_ODD:
+ t->c_cflag |= PARODD;
+ // DROPTHROUGH
+ case CYGNUM_SERIAL_PARITY_EVEN:
+ t->c_iflag |= PARENB;
+ break;
+ default:
+ CYG_FAIL( "Unsupported default parity" );
+ break;
+ }
+
+ switch( dev_conf.word_length ) {
+ case CYGNUM_SERIAL_WORD_LENGTH_5:
+ t->c_cflag |= CS5;
+ break;
+ case CYGNUM_SERIAL_WORD_LENGTH_6:
+ t->c_cflag |= CS6;
+ break;
+ case CYGNUM_SERIAL_WORD_LENGTH_7:
+ t->c_cflag |= CS7;
+ break;
+ case CYGNUM_SERIAL_WORD_LENGTH_8:
+ t->c_cflag |= CS8;
+ break;
+ default:
+ CYG_FAIL( "Unsupported word length" );
+ break;
+ }
+
+ switch ( dev_conf.stop ) {
+ case CYGNUM_SERIAL_STOP_1:
+ // Don't need to do anything
+ break;
+ case CYGNUM_SERIAL_STOP_2:
+ t->c_cflag |= CSTOPB;
+ break;
+ default:
+ CYG_FAIL( "Unsupported number of stop bits" );
+ break;
+ }
+
+ switch ( dev_conf.flags ) {
+ case CYGNUM_SERIAL_FLOW_RTSCTS_RX:
+ t->c_cflag |= CRTSCTS;
+ // drop through
+ case CYGNUM_SERIAL_FLOW_XONXOFF_RX:
+ t->c_iflag |= IXOFF;
+ break;
+ case CYGNUM_SERIAL_FLOW_RTSCTS_TX:
+ t->c_cflag |= CRTSCTS;
+ // drop through
+ case CYGNUM_SERIAL_FLOW_XONXOFF_TX:
+ t->c_iflag |= IXON;
+ break;
+ default:
+ // Ignore flags we don't grok
+ break;
+ }
+
+ return ENOERR;
+} // real_termios_init()
+
+//==========================================================================
+// set_attr() actually enacts the termios config. We come in here with
+// the mutex in priv locked
+//
+// Possible deviation from standard: POSIX says we should enact which ever
+// bits we can and only return EINVAL when none of them can be performed
+// Rather than tracking whether *none* of them worked, instead we just
+// always claim success. At the very least, setting c_cc is never to
+// fail so I'm not sure if this is really non-standard or not!
+
+static Cyg_ErrNo
+set_attr( struct termios *t, struct termios_private_info *priv )
+{
+ Cyg_ErrNo res = ENOERR;
+ cyg_serial_info_t dev_conf, new_dev_conf;
+ cyg_uint32 len = sizeof( dev_conf );
+ cc_t *tempcc = &priv->termios.c_cc[0];
+ struct termios *ptermios = &priv->termios;
+
+ // Get info from driver
+ res = cyg_io_get_config( priv->dev_handle, CYG_IO_GET_CONFIG_SERIAL_INFO,
+ &dev_conf, &len );
+
+ if ( ENOERR != res )
+ return res;
+
+ // We need to set up each facet of config to change one by one because
+ // POSIX says we should try and change as much of the config as possible
+ // This is tedious and has to be done by steam :-(
+
+ if ( t->c_ospeed != ptermios->c_ospeed ) {
+ new_dev_conf = dev_conf;
+ new_dev_conf.baud = map_posixbaud_to_ecosbaud( t->c_ospeed );
+ if ( 0 != new_dev_conf.baud ) {
+ len = sizeof( new_dev_conf );
+ res = cyg_io_set_config( priv->dev_handle,
+ CYG_IO_SET_CONFIG_SERIAL_INFO,
+ &new_dev_conf, &len );
+ if ( ENOERR == res ) {
+ // It worked, so update dev_conf to reflect the new state
+ dev_conf.baud = new_dev_conf.baud;
+ // and termios
+ ptermios->c_ispeed = t->c_ospeed;
+ ptermios->c_ospeed = t->c_ospeed;
+ }
+ }
+ }
+
+ if ( (t->c_cflag & CSTOPB) != (ptermios->c_cflag & CSTOPB) ) {
+ new_dev_conf = dev_conf;
+ if ( t->c_cflag & CSTOPB )
+ new_dev_conf.stop = CYGNUM_SERIAL_STOP_2;
+ else
+ new_dev_conf.stop = CYGNUM_SERIAL_STOP_1;
+
+ len = sizeof( new_dev_conf );
+ res = cyg_io_set_config( priv->dev_handle,
+ CYG_IO_SET_CONFIG_SERIAL_INFO,
+ &new_dev_conf, &len );
+ if ( ENOERR == res ) {
+ // It worked, so update dev_conf to reflect the new state
+ dev_conf.stop = new_dev_conf.stop;
+ // and termios
+ ptermios->c_cflag &= ~CSTOPB;
+ ptermios->c_cflag |= t->c_cflag & CSTOPB;
+ }
+ }
+
+ if ( ((t->c_cflag & PARENB) != (ptermios->c_cflag & PARENB)) ||
+ ((t->c_cflag & PARODD) != (ptermios->c_cflag & PARODD)) ) {
+ new_dev_conf = dev_conf;
+ if ( t->c_cflag & PARENB )
+ if ( t->c_cflag & PARODD )
+ new_dev_conf.parity = CYGNUM_SERIAL_PARITY_ODD;
+ else
+ new_dev_conf.parity = CYGNUM_SERIAL_PARITY_EVEN;
+ else
+ new_dev_conf.parity = CYGNUM_SERIAL_PARITY_NONE;
+
+ len = sizeof( new_dev_conf );
+ res = cyg_io_set_config( priv->dev_handle,
+ CYG_IO_SET_CONFIG_SERIAL_INFO,
+ &new_dev_conf, &len );
+ if ( ENOERR == res ) {
+ // It worked, so update dev_conf to reflect the new state
+ dev_conf.parity = new_dev_conf.parity;
+ // and termios
+ ptermios->c_cflag &= ~(PARENB|PARODD);
+ ptermios->c_cflag |= t->c_cflag & (PARENB|PARODD);
+ }
+ }
+
+ if ( (t->c_cflag & CSIZE) != (ptermios->c_cflag & CSIZE) ) {
+ new_dev_conf = dev_conf;
+ switch ( t->c_cflag & CSIZE ) {
+ case CS5:
+ new_dev_conf.word_length = CYGNUM_SERIAL_WORD_LENGTH_5;
+ break;
+ case CS6:
+ new_dev_conf.word_length = CYGNUM_SERIAL_WORD_LENGTH_6;
+ break;
+ case CS7:
+ new_dev_conf.word_length = CYGNUM_SERIAL_WORD_LENGTH_7;
+ break;
+ case CS8:
+ new_dev_conf.word_length = CYGNUM_SERIAL_WORD_LENGTH_8;
+ break;
+ }
+
+ len = sizeof( new_dev_conf );
+ res = cyg_io_set_config( priv->dev_handle,
+ CYG_IO_SET_CONFIG_SERIAL_INFO,
+ &new_dev_conf, &len );
+ if ( ENOERR == res ) {
+ // It worked, so update dev_conf to reflect the new state
+ dev_conf.word_length = new_dev_conf.word_length;
+ // and termios
+ ptermios->c_cflag &= ~CSIZE;
+ ptermios->c_cflag |= t->c_cflag & CSIZE;
+ }
+ }
+
+ if ( (t->c_cflag & IXOFF) != (ptermios->c_cflag & IXOFF) ) {
+ new_dev_conf = dev_conf;
+ new_dev_conf.flags &=
+ ~(CYGNUM_SERIAL_FLOW_XONXOFF_RX|CYGNUM_SERIAL_FLOW_RTSCTS_RX);
+ if ( t->c_cflag & IXOFF )
+ if ( t->c_cflag & CRTSCTS)
+ new_dev_conf.flags |= CYGNUM_SERIAL_FLOW_RTSCTS_RX;
+ else
+ new_dev_conf.flags |= CYGNUM_SERIAL_FLOW_XONXOFF_RX;
+ else
+ new_dev_conf.flags |= CYGNUM_SERIAL_FLOW_NONE;
+
+ len = sizeof( new_dev_conf );
+ res = cyg_io_set_config( priv->dev_handle,
+ CYG_IO_SET_CONFIG_SERIAL_INFO,
+ &new_dev_conf, &len );
+ if ( ENOERR == res ) {
+ // It worked, so update dev_conf to reflect the new state
+ dev_conf.flags = new_dev_conf.flags;
+ // and termios
+ ptermios->c_cflag &= ~(IXOFF|CRTSCTS);
+ ptermios->c_cflag |= t->c_cflag & (IXOFF|CRTSCTS);
+ }
+ }
+
+ if ( (t->c_cflag & IXON) != (ptermios->c_cflag & IXON) ) {
+ new_dev_conf = dev_conf;
+ new_dev_conf.flags &=
+ ~(CYGNUM_SERIAL_FLOW_XONXOFF_TX|CYGNUM_SERIAL_FLOW_RTSCTS_TX);
+ if ( t->c_cflag & IXON )
+ if ( t->c_cflag & CRTSCTS)
+ new_dev_conf.flags |= CYGNUM_SERIAL_FLOW_RTSCTS_TX;
+ else
+ new_dev_conf.flags |= CYGNUM_SERIAL_FLOW_XONXOFF_TX;
+ else
+ new_dev_conf.flags |= CYGNUM_SERIAL_FLOW_NONE;
+
+ len = sizeof( new_dev_conf );
+ res = cyg_io_set_config( priv->dev_handle,
+ CYG_IO_SET_CONFIG_SERIAL_INFO,
+ &new_dev_conf, &len );
+ if ( ENOERR == res ) {
+ // It worked, so update dev_conf to reflect the new state
+ dev_conf.flags = new_dev_conf.flags;
+ // and termios
+ ptermios->c_cflag &= ~(IXON|CRTSCTS);
+ ptermios->c_cflag |= t->c_cflag & (IXON|CRTSCTS);
+ }
+ }
+
+ // Input/Output processing flags can just be set as we grok them all
+ // with few exceptions (see lflags below)
+ ptermios->c_iflag &= ~(BRKINT|ICRNL|IGNBRK|IGNCR|IGNPAR|INLCR|INPCK|
+ ISTRIP|PARMRK);
+ ptermios->c_iflag |= t->c_iflag & (
+#ifdef CYGSEM_IO_SERIAL_TERMIOS_USE_SIGNALS
+ BRKINT|
+#endif
+ ICRNL|IGNBRK|IGNCR|IGNPAR|
+ INLCR|INPCK|ISTRIP|PARMRK );
+
+ ptermios->c_oflag &= ~(OPOST|ONLCR);
+ ptermios->c_oflag |= t->c_oflag & (OPOST|ONLCR);
+
+ ptermios->c_cflag &= ~(CLOCAL|CREAD|HUPCL);
+ ptermios->c_cflag |= t->c_cflag & (CLOCAL|CREAD|HUPCL);
+
+ ptermios->c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL|ICANON|
+ IEXTEN|ISIG|NOFLSH|TOSTOP);
+ // Note we don't support IEXTEN nor TOSTOP so we don't set them
+ ptermios->c_lflag |= t->c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ICANON|
+#ifdef CYGSEM_IO_SERIAL_TERMIOS_USE_SIGNALS
+ ISIG|
+#endif
+ NOFLSH);
+
+ // control characters. We don't support changing of VSTART, VSTOP,
+ // VTIME or VSUSP though
+ tempcc[VEOF] = t->c_cc[VEOF];
+ tempcc[VEOL] = t->c_cc[VEOL];
+ tempcc[VERASE] = t->c_cc[VERASE];
+ tempcc[VINTR] = t->c_cc[VINTR];
+ tempcc[VKILL] = t->c_cc[VKILL];
+ tempcc[VMIN] = t->c_cc[VMIN];
+ tempcc[VQUIT] = t->c_cc[VQUIT];
+
+ return res;
+}
+
+//==========================================================================
+
+static bool
+termios_init(struct cyg_devtab_entry *tab)
+{
+ // can't initialize the termios structure because we can't
+ // query the serial driver yet. Wait until lookup time.
+
+ return true;
+} // termios_init()
+
+//==========================================================================
+
+static Cyg_ErrNo
+termios_lookup(struct cyg_devtab_entry **tab,
+ struct cyg_devtab_entry *sub_tab,
+ const char *name)
+{
+ cyg_io_handle_t chan = (cyg_io_handle_t)sub_tab;
+ struct termios_private_info *priv =
+ (struct termios_private_info *)(*tab)->priv;
+ Cyg_ErrNo err = ENOERR;
+
+ if ( !priv->init ) {
+ cyg_drv_mutex_lock( &priv->lock );
+ if ( !priv->init ) { // retest as we may have been pre-empted
+ priv->dev_handle = chan;
+ err = real_termios_init( priv );
+ }
+ cyg_drv_mutex_unlock( &priv->lock );
+ }
+ return err;
+}
+
+//==========================================================================
+
+#define WRITE_BUFSIZE 100 // FIXME: ->CDL
+// #define MAX_CANON 64 FIXME: relevance?
+
+
+static Cyg_ErrNo
+termios_write(cyg_io_handle_t handle, const void *_buf, cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ struct termios_private_info *priv = (struct termios_private_info *)t->priv;
+ cyg_io_handle_t chan = (cyg_io_handle_t)priv->dev_handle;
+ cyg_int32 xbufsize, input_bytes_read;
+ cyg_uint8 xbuf[WRITE_BUFSIZE];
+ cyg_uint8 *buf = (cyg_uint8 *)_buf;
+ Cyg_ErrNo res;
+
+ xbufsize = input_bytes_read = 0;
+ while (input_bytes_read++ < *len) {
+ if ( (*buf == '\n') && (priv->termios.c_oflag & (OPOST|ONLCR)) ) {
+ xbuf[xbufsize++] = '\r';
+ }
+ xbuf[xbufsize++] = *buf;
+ if ((xbufsize >= (WRITE_BUFSIZE-1)) || (input_bytes_read == *len) ||
+ (*buf == '\n'))
+ {
+ cyg_uint32 size = xbufsize;
+ res = cyg_io_write(chan, xbuf, &size);
+ if (res != ENOERR) {
+ *len = input_bytes_read - (xbufsize - size);
+ return res;
+ }
+ xbufsize = 0;
+ }
+ buf++;
+ }
+ // Everything sent, so *len is correct.
+ return ENOERR;
+}
+
+
+//==========================================================================
+
+static Cyg_ErrNo
+termios_read(cyg_io_handle_t handle, void *_buf, cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *dt = (cyg_devtab_entry_t *)handle;
+ struct termios_private_info *priv = (struct termios_private_info *)dt->priv;
+ cyg_io_handle_t chan = (cyg_io_handle_t)priv->dev_handle;
+ struct termios *t = &priv->termios;
+ cyg_uint32 clen;
+ cyg_uint32 size;
+ Cyg_ErrNo res;
+ cyg_uint8 c;
+ cyg_uint8 *buf = (cyg_uint8 *)_buf;
+ cyg_bool discardc; // should c be discarded (not read, not printed)
+ cyg_bool returnnow = false; // return back to user after this char
+
+ // if receiver off
+ if (0 == (t->c_cflag & CREAD) ) {
+ *len = 0;
+ return -EINVAL;
+ }
+
+ size = 0;
+ if ( 0 == (t->c_lflag & ICANON) ) {
+ // In non-canonical mode we return the min of *len and the
+ // number of bytes available
+ // So we query the driver for how many bytes are available - this
+ // guarantees we won't block
+ cyg_serial_buf_info_t dev_buf_conf;
+ cyg_uint32 dbc_len = sizeof( dev_buf_conf );
+ res = cyg_io_get_config( chan,
+ CYG_IO_GET_CONFIG_SERIAL_BUFFER_INFO,
+ &dev_buf_conf, &dbc_len );
+ CYG_ASSERT( res == ENOERR, "Query buffer status failed!" );
+ if (dev_buf_conf.rx_count > 0) {
+ // Adjust length to be max characters currently available
+ *len = *len < dev_buf_conf.rx_count ? *len : dev_buf_conf.rx_count;
+ } else if (t->c_cc[VMIN] == 0) {
+ // No chars available - don't block
+ *len = 0;
+ return ENOERR;
+ }
+ } // if
+
+ while (!returnnow && size < *len) {
+ clen = 1;
+ discardc = false;
+ res = cyg_io_read(chan, &c, &clen);
+ if (res != ENOERR) {
+ *len = size;
+ return res;
+ }
+
+ // lock to prevent termios getting corrupted while we read from it
+ cyg_drv_mutex_lock( &priv->lock );
+
+ if ( t->c_iflag & ISTRIP )
+ c &= 0x7f;
+
+ // canonical mode: erase, kill, and newline processing
+ if ( t->c_lflag & ICANON ) {
+ if ( t->c_cc[ VERASE ] == c ) {
+ discardc = true;
+ // erase on display?
+ if ( (t->c_lflag & ECHO) && (t->c_lflag & ECHOE) ) {
+ cyg_uint8 erasebuf[3];
+ erasebuf[0] = erasebuf[2] = t->c_cc[ VERASE ];
+ erasebuf[1] = ' ';
+ clen = sizeof(erasebuf);
+ // FIXME: what about error or non-blocking?
+ cyg_io_write(chan, erasebuf, &clen);
+ }
+ if ( size )
+ size--;
+ } // if
+ else if ( t->c_cc[ VKILL ] == c ) {
+ // kill line on display?
+ if ( (t->c_lflag & ECHO) && (t->c_lflag & ECHOK) ) {
+
+ // we could try and be more efficient here and
+ // output a stream of erases, and then a stream
+ // of spaces and then more erases. But this is poor
+ // because on a slow terminal the user will see characters
+ // delete from the middle forward in chunks!
+ // But at least we try and chunk up sets of writes
+ cyg_uint8 erasebuf[30];
+ cyg_uint8 erasechunks;
+ cyg_uint8 i;
+
+ erasechunks = size < (sizeof(erasebuf)/3) ?
+ size : (sizeof(erasebuf)/3);
+
+ for (i=0; i<erasechunks; i++) {
+ erasebuf[i*3] = erasebuf[i*3+2] = t->c_cc[ VERASE ];
+ erasebuf[i*3+1] = ' ';
+ }
+
+ while( size ) {
+ cyg_uint8 j;
+
+ j = size < (sizeof(erasebuf)/3) ?
+ size : (sizeof(erasebuf)/3);
+ clen = (j*3);
+ // FIXME: what about error or non-blocking?
+ cyg_io_write( chan, erasebuf, &clen );
+ size -= j;
+ }
+ } else
+ size = 0;
+ discardc = true;
+ } // else if
+ // CR
+ else if ( '\r' == c ) {
+ if ( t->c_iflag & IGNCR )
+ discardc = true;
+ else if ( t->c_iflag & ICRNL )
+ c = '\n';
+ }
+ // newlines or similar.
+ // Note: not an else if to catch CRNL conversion
+ if ( (t->c_cc[ VEOF ] == c) || (t->c_cc[ VEOL ] == c) ||
+ ('\n' == c) ) {
+ if ( t->c_cc[ VEOF ] == c )
+ discardc = true;
+ if ( t->c_lflag & ECHONL ) { // don't check ECHO in this case
+ clen = 1;
+ // FIXME: what about error or non-blocking?
+ // FIXME: what if INLCR is set?
+ cyg_io_write( chan, "\n", &clen );
+ }
+ if ( t->c_iflag & INLCR )
+ c = '\r';
+ returnnow = true; // FIXME: true even for INLCR?
+ } // else if
+ } // if
+
+#ifdef CYGSEM_IO_SERIAL_TERMIOS_USE_SIGNALS
+ if ( (t->c_lflag & ISIG) && (t->c_cc[ VINTR ] == c) ) {
+ discardc = true;
+ if ( 0 == (t->c_lflag & NOFLSH) )
+ size = 0;
+ // raise could be a non-local jump - we should unlock mutex
+ cyg_drv_mutex_unlock( &priv->lock );
+
+ // FIXME: what if raise returns != 0?
+ raise( SIGINT );
+ cyg_drv_mutex_lock( &priv->lock );
+ }
+
+ if ( (t->c_lflag & ISIG) && (t->c_cc[ VQUIT ] == c) ) {
+ discardc = true;
+ if ( 0 == (t->c_lflag & NOFLSH) )
+ size = 0;
+ // raise could be a non-local jump - we should unlock mutex
+ cyg_drv_mutex_unlock( &priv->lock );
+
+ // FIXME: what if raise returns != 0?
+ raise( SIGQUIT );
+ cyg_drv_mutex_lock( &priv->lock );
+ }
+#endif
+ if (!discardc) {
+ buf[size++] = c;
+ if ( t->c_lflag & ECHO ) {
+ clen = 1;
+ // FIXME: what about error or non-blocking?
+ termios_write( handle, &c, &clen );
+ }
+ }
+
+ if ( (t->c_lflag & ICANON) == 0 ) {
+ // Check to see if read has been satisfied
+ if ( t->c_cc[ VMIN ] && (size >= t->c_cc[ VMIN ]) )
+ returnnow = true;
+ }
+ cyg_drv_mutex_unlock( &priv->lock );
+ } // while
+
+ *len = size;
+ return ENOERR;
+}
+
+
+//==========================================================================
+
+static cyg_bool
+termios_select(cyg_io_handle_t handle, cyg_uint32 which, CYG_ADDRWORD info)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ struct termios_private_info *priv = (struct termios_private_info *)t->priv;
+ cyg_io_handle_t chan = (cyg_io_handle_t)priv->dev_handle;
+
+ // Just pass it on to next driver level
+ return cyg_io_select( chan, which, info );
+}
+
+
+//==========================================================================
+
+static Cyg_ErrNo
+termios_get_config(cyg_io_handle_t handle, cyg_uint32 key, void *buf,
+ cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ struct termios_private_info *priv = (struct termios_private_info *)t->priv;
+ cyg_io_handle_t chan = (cyg_io_handle_t)priv->dev_handle;
+ Cyg_ErrNo res = ENOERR;
+
+ switch (key) {
+ case CYG_IO_GET_CONFIG_TERMIOS:
+ {
+ if ( *len < sizeof(struct termios) ) {
+ return -EINVAL;
+ }
+ cyg_drv_mutex_lock( &priv->lock );
+ *(struct termios *)buf = priv->termios;
+ cyg_drv_mutex_unlock( &priv->lock );
+ *len = sizeof(struct termios);
+ }
+ break;
+ default: // Assume this is a 'serial' driver control
+ res = cyg_io_get_config(chan, key, buf, len);
+ } // switch
+ return res;
+}
+
+
+//==========================================================================
+
+
+static Cyg_ErrNo
+termios_set_config(cyg_io_handle_t handle, cyg_uint32 key, const void *buf, cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ struct termios_private_info *priv = (struct termios_private_info *)t->priv;
+ cyg_io_handle_t chan = (cyg_io_handle_t)priv->dev_handle;
+ Cyg_ErrNo res = ENOERR;
+
+ switch (key) {
+ case CYG_IO_SET_CONFIG_TERMIOS:
+ {
+ setattr_struct *attr = (setattr_struct *)buf;
+ int optact = attr->optact;
+
+ if ( *len != sizeof( *attr ) ) {
+ return -EINVAL;
+ }
+
+ CYG_ASSERT( (optact == TCSAFLUSH) || (optact == TCSADRAIN) ||
+ (optact == TCSANOW), "Invalid optact" );
+
+ cyg_drv_mutex_lock( &priv->lock );
+
+ if ( ( TCSAFLUSH == optact ) ||
+ ( TCSADRAIN == optact ) ) {
+ res = cyg_io_get_config( chan,
+ CYG_IO_GET_CONFIG_SERIAL_OUTPUT_DRAIN,
+ NULL, NULL );
+ CYG_ASSERT( ENOERR == res, "Drain request failed" );
+ }
+ if ( TCSAFLUSH == optact ) {
+ res = cyg_io_get_config( chan,
+ CYG_IO_GET_CONFIG_SERIAL_INPUT_FLUSH,
+ NULL, NULL );
+ CYG_ASSERT( ENOERR == res, "Flush request failed" );
+ }
+
+ res = set_attr( attr->termios_p, priv );
+ cyg_drv_mutex_unlock( &priv->lock );
+ return res;
+ }
+ default: // Pass on to serial driver
+ res = cyg_io_set_config(chan, key, buf, len);
+ }
+ return res;
+}
+
+
+//==========================================================================
+
+#endif // ifdef CYGPKG_IO_SERIAL_TERMIOS
+
+// EOF termiostty.c
diff --git a/cesar/ecos/packages/io/serial/current/src/common/tty.c b/cesar/ecos/packages/io/serial/current/src/common/tty.c
new file mode 100644
index 0000000000..dca69e93ef
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/src/common/tty.c
@@ -0,0 +1,337 @@
+//==========================================================================
+//
+// io/serial/common/tty.c
+//
+// TTY (terminal-like interface) I/O driver
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-02-04
+// Purpose: Device driver for tty I/O, layered on top of serial I/O
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/io.h>
+#include <pkgconf/io_serial.h>
+#ifdef CYGPKG_IO_SERIAL_TTY
+#include <cyg/io/io.h>
+#include <cyg/io/devtab.h>
+#include <cyg/io/ttyio.h>
+#include <cyg/infra/diag.h>
+
+static bool tty_init(struct cyg_devtab_entry *tab);
+static Cyg_ErrNo tty_lookup(struct cyg_devtab_entry **tab,
+ struct cyg_devtab_entry *sub_tab,
+ const char *name);
+static Cyg_ErrNo tty_write(cyg_io_handle_t handle, const void *buf, cyg_uint32 *len);
+static Cyg_ErrNo tty_read(cyg_io_handle_t handle, void *buf, cyg_uint32 *len);
+static cyg_bool tty_select(cyg_io_handle_t handle, cyg_uint32 which, CYG_ADDRWORD info);
+static Cyg_ErrNo tty_get_config(cyg_io_handle_t handle, cyg_uint32 key, void *buf, cyg_uint32 *len);
+static Cyg_ErrNo tty_set_config(cyg_io_handle_t handle, cyg_uint32 key, const void *buf, cyg_uint32 *len);
+
+struct tty_private_info {
+ cyg_tty_info_t dev_info;
+ cyg_io_handle_t dev_handle;
+};
+
+static DEVIO_TABLE(tty_devio,
+ tty_write,
+ tty_read,
+ tty_select,
+ tty_get_config,
+ tty_set_config
+ );
+
+#ifdef CYGPKG_IO_SERIAL_TTY_TTYDIAG
+static struct tty_private_info tty_private_info_diag;
+DEVTAB_ENTRY(tty_io_diag,
+// "/dev/console",
+// CYGDAT_IO_SERIAL_TTY_CONSOLE, // Based on driver for this device
+ "/dev/ttydiag",
+ "/dev/haldiag",
+ &tty_devio,
+ tty_init,
+ tty_lookup, // Execute this when device is being looked up
+ &tty_private_info_diag);
+#endif
+
+#ifdef CYGPKG_IO_SERIAL_TTY_TTY0
+static struct tty_private_info tty_private_info0;
+DEVTAB_ENTRY(tty_io0,
+ "/dev/tty0",
+ CYGDAT_IO_SERIAL_TTY_TTY0_DEV,
+ &tty_devio,
+ tty_init,
+ tty_lookup, // Execute this when device is being looked up
+ &tty_private_info0);
+#endif
+
+#ifdef CYGPKG_IO_SERIAL_TTY_TTY1
+static struct tty_private_info tty_private_info1;
+DEVTAB_ENTRY(tty_io1,
+ "/dev/tty1",
+ CYGDAT_IO_SERIAL_TTY_TTY1_DEV,
+ &tty_devio,
+ tty_init,
+ tty_lookup, // Execute this when device is being looked up
+ &tty_private_info1);
+#endif
+
+#ifdef CYGPKG_IO_SERIAL_TTY_TTY2
+static struct tty_private_info tty_private_info2;
+DEVTAB_ENTRY(tty_io2,
+ "/dev/tty2",
+ CYGDAT_IO_SERIAL_TTY_TTY2_DEV,
+ &tty_devio,
+ tty_init,
+ tty_lookup, // Execute this when device is being looked up
+ &tty_private_info2);
+#endif
+
+static bool
+tty_init(struct cyg_devtab_entry *tab)
+{
+ struct tty_private_info *priv = (struct tty_private_info *)tab->priv;
+#ifdef CYGDBG_IO_INIT
+ diag_printf("Init tty channel: %x\n", tab);
+#endif
+ priv->dev_info.tty_out_flags = CYG_TTY_OUT_FLAGS_DEFAULT;
+ priv->dev_info.tty_in_flags = CYG_TTY_IN_FLAGS_DEFAULT;
+ return true;
+}
+
+static Cyg_ErrNo
+tty_lookup(struct cyg_devtab_entry **tab,
+ struct cyg_devtab_entry *sub_tab,
+ const char *name)
+{
+ cyg_io_handle_t chan = (cyg_io_handle_t)sub_tab;
+ struct tty_private_info *priv = (struct tty_private_info *)(*tab)->priv;
+#if 0
+ cyg_int32 len;
+#endif
+ priv->dev_handle = chan;
+#if 0
+ len = sizeof(cyg_serial_info_t);
+ // Initialize configuration
+ cyg_io_get_config(chan, CYG_SERIAL_GET_CONFIG,
+ (void *)&priv->dev_info.serial_config, &len);
+#endif
+ return ENOERR;
+}
+
+#define BUFSIZE 64
+
+static Cyg_ErrNo
+tty_write(cyg_io_handle_t handle, const void *_buf, cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ struct tty_private_info *priv = (struct tty_private_info *)t->priv;
+ cyg_io_handle_t chan = (cyg_io_handle_t)priv->dev_handle;
+ cyg_uint32 size;
+ cyg_int32 bytes_successful, actually_written;
+ cyg_uint8 xbuf[BUFSIZE];
+ cyg_uint8 c;
+ cyg_uint8 *buf = (cyg_uint8 *)_buf;
+ Cyg_ErrNo res = -EBADF;
+ // assert(chan)
+ size = 0;
+ bytes_successful = 0;
+ actually_written = 0;
+ while (bytes_successful++ < *len) {
+ c = *buf++;
+ if ((c == '\n') &&
+ (priv->dev_info.tty_out_flags & CYG_TTY_OUT_FLAGS_CRLF)) {
+ xbuf[size++] = '\r';
+ }
+ xbuf[size++] = c;
+ // Always leave room for possible CR/LF expansion
+ if ((size >= (BUFSIZE-1)) ||
+ (bytes_successful == *len)) {
+ res = cyg_io_write(chan, xbuf, &size);
+ if (res != ENOERR) {
+ *len = actually_written;
+ return res;
+ }
+ actually_written += size;
+ size = 0;
+ }
+ }
+ return res;
+}
+
+static Cyg_ErrNo
+tty_read(cyg_io_handle_t handle, void *_buf, cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ struct tty_private_info *priv = (struct tty_private_info *)t->priv;
+ cyg_io_handle_t chan = (cyg_io_handle_t)priv->dev_handle;
+ cyg_uint32 clen;
+ cyg_int32 size;
+ Cyg_ErrNo res;
+ cyg_uint8 c;
+ cyg_uint8 *buf = (cyg_uint8 *)_buf;
+ // assert(chan)
+ size = 0;
+ while (size < *len) {
+ clen = 1;
+ res = cyg_io_read(chan, &c, &clen);
+ if (res != ENOERR) {
+ *len = size;
+ return res;
+ }
+ buf[size++] = c;
+ if ((priv->dev_info.tty_in_flags & CYG_TTY_IN_FLAGS_BINARY) == 0) {
+ switch (c) {
+ case '\b': /* drop through */
+ case 0x7f:
+ size -= 2; // erase one character + 'backspace' char
+ if (size < 0) {
+ size = 0;
+ } else if (priv->dev_info.tty_in_flags & CYG_TTY_IN_FLAGS_ECHO) {
+ clen = 3;
+ cyg_io_write(chan, "\b \b", &clen);
+ }
+ break;
+ case '\r':
+ if (priv->dev_info.tty_in_flags & CYG_TTY_IN_FLAGS_CRLF) {
+ /* Don't do anything because a '\n' will come next */
+ break;
+ }
+ if (priv->dev_info.tty_in_flags & CYG_TTY_IN_FLAGS_CR) {
+ c = '\n'; // Map CR -> LF
+ }
+ /* drop through */
+ case '\n':
+ if (priv->dev_info.tty_in_flags & CYG_TTY_IN_FLAGS_ECHO) {
+ if (priv->dev_info.tty_out_flags & CYG_TTY_OUT_FLAGS_CRLF) {
+ clen = 2;
+ cyg_io_write(chan, "\r\n", &clen);
+ } else {
+ clen = 1;
+ cyg_io_write(chan, &c, &clen);
+ }
+ }
+ buf[size-1] = c;
+ *len = size;
+ return ENOERR;
+ default:
+ if (priv->dev_info.tty_in_flags & CYG_TTY_IN_FLAGS_ECHO) {
+ clen = 1;
+ cyg_io_write(chan, &c, &clen);
+ }
+ break;
+ }
+ }
+ }
+ *len = size;
+ return ENOERR;
+}
+
+static cyg_bool
+tty_select(cyg_io_handle_t handle, cyg_uint32 which, CYG_ADDRWORD info)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ struct tty_private_info *priv = (struct tty_private_info *)t->priv;
+ cyg_io_handle_t chan = (cyg_io_handle_t)priv->dev_handle;
+
+ // Just pass it on to next driver level
+ return cyg_io_select( chan, which, info );
+}
+
+static Cyg_ErrNo
+tty_get_config(cyg_io_handle_t handle, cyg_uint32 key, void *buf, cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ struct tty_private_info *priv = (struct tty_private_info *)t->priv;
+ cyg_io_handle_t chan = (cyg_io_handle_t)priv->dev_handle;
+ Cyg_ErrNo res = ENOERR;
+#if 0
+ cyg_int32 current_len;
+#endif
+ // assert(chan)
+ switch (key) {
+ case CYG_IO_GET_CONFIG_TTY_INFO:
+ if (*len < sizeof(cyg_tty_info_t)) {
+ return -EINVAL;
+ }
+#if 0
+ current_len = sizeof(cyg_serial_info_t);
+ res = cyg_io_get_config(chan, CYG_SERIAL_GET_CONFIG,
+ (void *)&priv->dev_info.serial_config, &current_len);
+ if (res != ENOERR) {
+ return res;
+ }
+#endif
+ *(cyg_tty_info_t *)buf = priv->dev_info;
+ *len = sizeof(cyg_tty_info_t);
+ break;
+ default: // Assume this is a 'serial' driver control
+ res = cyg_io_get_config(chan, key, buf, len);
+ }
+ return res;
+}
+
+static Cyg_ErrNo
+tty_set_config(cyg_io_handle_t handle, cyg_uint32 key, const void *buf, cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle;
+ struct tty_private_info *priv = (struct tty_private_info *)t->priv;
+ cyg_io_handle_t chan = (cyg_io_handle_t)priv->dev_handle;
+#if 0
+ cyg_int32 current_len;
+#endif
+ Cyg_ErrNo res = ENOERR;
+ // assert(chan)
+ switch (key) {
+ case CYG_IO_SET_CONFIG_TTY_INFO:
+ if (*len != sizeof(cyg_tty_info_t)) {
+ return -EINVAL;
+ }
+ priv->dev_info = *(cyg_tty_info_t *)buf;
+ break;
+ default: // Pass on to serial driver
+ res = cyg_io_set_config(chan, key, buf, len);
+ }
+ return res;
+}
+#endif // CYGPKG_IO_SERIAL_TTY
diff --git a/cesar/ecos/packages/io/serial/current/tests/README b/cesar/ecos/packages/io/serial/current/tests/README
new file mode 100644
index 0000000000..3186f9b2bc
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/tests/README
@@ -0,0 +1,285 @@
+ Serial Testing with ser_filter
+
+Rationale
+~~~~~~~~~
+ Since some targets only have one serial connection, a serial testing
+ harness needs to be able to share the connection with GDB (however,
+ the test and GDB can also run on separate lines).
+
+ The serial filter (ser_filter) sits between the serial port and GDB
+ and monitors the exchange of data between GDB and the
+ target. Normally, no changes are made to the data.
+
+ When a test request packet is sent from the test on the target, it is
+ intercepted by the filter. The filter and target then enter a loop,
+ exchanging protocol data between them which GDB never sees.
+
+ In the event of a timeout, or a crash on the target, the filter falls
+ back into its pass-through mode. If this happens due to a crash it
+ should be possible to start regular debugging with GDB. The filter
+ will then stay in the pass-though mode until GDB disconnects.
+
+
+Adding A New Platform
+~~~~~~~~~~~~~~~~~~~~~
+ The file ser_test_protocol.inl contains information about how to run
+ the serial tests on supported platforms. When adding a new serial
+ driver to eCos, ser_test_protocol.inl should be updated accordingly
+ so the driver can be tested.
+
+ The definitions TEST_SER_DEV and TEST_TTY_DEV are set according to
+ platform:
+
+ TEST_SER_DEV is the name of the serial device over which the serial
+ test protocol runs. The definition should be conditional on all
+ required configuration options.
+
+ TEST_TTY_DEV is the name of the TTY device over which the TTY test
+ protocol runs. The definition should be conditional on all required
+ configuration options. Note that this device is layered on top of a
+ serial device and must be conditional on that device's config
+ options as well as its own.
+
+ Here's an example for the PowerPC/Cogent where GDB is connected via
+ serial connector B:
+
+#if defined(CYGPKG_HAL_POWERPC_COGENT) \
+ && defined(CYGPKG_IO_SERIAL_POWERPC_COGENT) \
+ && defined(CYGPKG_IO_SERIAL_POWERPC_COGENT_SERIAL_B)
+# define TEST_SER_DEV CYGDAT_IO_SERIAL_POWERPC_COGENT_SERIAL_B_NAME
+# if defined(CYGPKG_IO_SERIAL_TTY_TTY2)
+# define TEST_TTY_DEV CYGDAT_IO_SERIAL_TTY_TTY2_DEV
+# endif
+#endif
+
+
+ On some targets it may also be necessary to intialize interrupt
+ vectors which are otherwise used by CygMon or an eCos GDB stub to
+ monitor characters from the host (looking for Control-C):
+
+# define SER_OVERRIDE_INT_1 CYGNUM_HAL_INTERRUPT_9
+# define SER_OVERRIDE_INT_2 CYGNUM_HAL_INTERRUPT_10
+
+ These definitions cause the serial test to restore the eCos handler
+ on the specified vectors before opening the serial device.
+
+
+ The file ser_test_protocol.inl also contains an array of serial
+ configurations (test_configs). It may be necessary to comment some of
+ these out for the platform if the driver or hardware cannot handle
+ all the given serial configurations.
+
+
+The Protocol
+~~~~~~~~~~~~
+ The protocol commands are prefixed with an @-character which the
+ serial filter is looking for. The protocol commands include:
+
+ PING
+ Allows the test on the target to probe for the filter. The filter
+ responds with OK, while GDB would just ignore the command. This
+ allows the tests to do nothing if they require the filter and it is
+ not present.
+
+ CONFIG
+ Requests a change of serial line configuration. Arguments of the
+ command specify baud rate, data bits, stop bits, and parity.
+
+ OPT
+ Requests changes in the filter's options. This allows various
+ amounts of tracing to be recorded when running tests without
+ requiring the filter to be restarted.
+
+ BINARY
+ Requests data to be sent from the filter to the target. The data is
+ checksummed, allowing errors in the transfer to be detected.
+ Sub-options of this command control how the data transfer is made:
+
+ NO_ECHO (serial driver receive test)
+ Just send data from the filter to the target. The test verifies
+ the checksum and PASS/FAIL depending on the result.
+
+ EOP_ECHO (serial driver half-duplex receive and send test)
+ As NO_ECHO but the test echoes back the data to the filter. The
+ filter does a checksum on the received data and sends the result
+ to the target. The test PASS/FAIL depending on the result of both
+ checksum verifications.
+
+ DUPLEX_ECHO (serial driver duplex receive and send test)
+ Smaller packets of data are sent back and forth in a pattern that
+ ensures that the serial driver will be both sending and receiving
+ at the same time. Again, checksums are computed and verified
+ resulting in PASS/FAIL.
+
+ TEXT
+ This is a test of the text translations in the TTY layer.
+ Requests a transfer of text data from the target to the filter and
+ possibly back again. The filter treats this as a binary transfer,
+ while the target may be doing translations on the data. The target
+ provides the filter with checksums for what it should expect to
+ see.
+ [This test is not implemented yet]
+
+ The above commands may be extended, and new commands added, as
+ required to test (new) parts of the serial drivers in eCos.
+
+ See ser_test_protocol.inl for further details on the protocols.
+
+
+The Serial Tests
+~~~~~~~~~~~~~~~~
+ The serial tests are built as any other eCos test. After running the
+ 'make tests' command, the tests can be found in:
+
+ install/tests/io_serial/
+
+ serial1
+ A simple API test.
+
+ serial2
+ A simple serial send test. It writes out two strings, one raw and
+ one encoded as a GDB O-packet.
+
+ serial3 [requires the serial filter]
+ This tests the half-duplex send and receive capabilities of the
+ serial driver.
+
+ serial4 [requires the serial filter]
+ This test attempts to use a few different serial configurations,
+ testing the driver's configuration/setup functionality.
+
+ serial5 [requires the serial filter]
+ This tests the duplex send and receive capabilities of the serial
+ driver.
+
+ All tests should complete in less than 30 seconds.
+
+
+Serial Filter Usage
+~~~~~~~~~~~~~~~~~~~
+ Running the ser_filter program with no (or wrong) arguments results
+ in the below output:
+
+ Usage: ser_filter [-t -c -g -S] TcpIPport SerialPort BaudRate
+ or: ser_filter -n [-t -c -g -S] SerialPort BaudRate
+ -t: Enable tracing.
+ -f: Enable filter output tracing.
+ -g: Enable GDB tracing.
+ -S: Output data read from serial line.
+ -c: Output data on console instead of via GDB.
+ -n: No GDB.
+
+ The normal way to use it with GDB is to start the filter:
+
+ ser_filter -t 9000 com1 38400
+
+ In this case, the filter will be listening on port 9000 and connect
+ to the target via the serial port COM1 at 38400 baud. On a UNIX host,
+ replace "com1" with a device such as "/dev/ttyS0".
+
+ The '-t' option enables tracing which will cause the filter to
+ describe its actions on the console.
+
+ Now start GDB with one of the tests as an argument:
+
+ $ mips-tx39-elf-gdb -nw install/tests/io_serial/serial3
+
+ Then connect to the filter:
+
+ (gdb) target remote localhost:9000
+
+ This should result in a connection in exactly the same way as if you
+ had connected directly to the target on the serial line.
+
+ (gdb) load
+ ...
+ (gdb) cont
+
+ Which should result in output similar to the below:
+
+ Continuing.
+ INFO:<BINARY:16:1!>
+ PASS:<Binary test completed>
+ INFO:<BINARY:128:1!>
+ PASS:<Binary test completed>
+ INFO:<BINARY:256:1!>
+ PASS:<Binary test completed>
+ INFO:<BINARY:1024:1!>
+ PASS:<Binary test completed>
+ INFO:<BINARY:512:0!>
+ PASS:<Binary test completed>
+ ...
+ PASS:<Binary test completed>
+ INFO:<BINARY:16384:0!>
+ PASS:<Binary test completed>
+ PASS:<serial3 test OK>
+ EXIT:<done>
+
+ If any of the individual tests fail the testing will terminate with
+ a FAIL.
+
+ With tracing enabled, you would also see the filter's status output:
+
+ The PING command sent from the target to determine the presence of
+ the filter:
+ [400 11:35:16] Dispatching command PING
+ [400 11:35:16] Responding with status OK
+
+ Each of the binary commands result in output similar to:
+ [400 11:35:16] Dispatching command BINARY
+ [400 11:35:16] Binary data (Size:16, Flags:1).
+ [400 11:35:16] Sending CRC: '170231!', len: 7.
+ [400 11:35:16] Reading 16 bytes from target.
+ [400 11:35:16] Done. in_crc 170231, out_crc 170231.
+ [400 11:35:16] Responding with status OK
+ [400 11:35:16] Received DONE from target.
+
+ This tracing output is normally sent as O-packets to GDB which will
+ display the tracing text. By using the -c option, the tracing text
+ can be redirected to the console from which ser_filter was started.
+
+
+ The trace options -f, -g, and -S cause data sent from filter, GDB or
+ target to be output in hexadecimal form.
+
+
+A Note on Failures
+~~~~~~~~~~~~~~~~~~
+ A serial connection (especially when driven at a high baud rate) can
+ garble the transmitted data because of noise from the environment. It
+ is not the job of the serial driver to ensure data integrity - that
+ is the job of protocols layering on top of the serial driver.
+
+ In the current implementation the serial tests and the serial filter
+ are not resilient to such data errors. This means that the test may
+ crash or hang (possibly without reporting a FAIL). It also means that
+ you should be aware of random errors - a FAIL is not necessarily
+ caused by a bug in the serial driver.
+
+ Ideally, the serial testing infrastructure should be able to
+ distinguish random errors from consistent errors - the former are
+ most likely due to noise in the transfer medium, while the latter are
+ more likely to be caused by faulty drivers. The current
+ implementation of the infrastructure does not have this capability.
+
+
+Debugging
+~~~~~~~~~
+ If a test fails, the serial filter's output may provide some hints
+ about what the problem is. If the option '-S' is used when starting
+ the filter, data received from the target is printed out:
+
+ [400 11:35:16] 0000 50 41 53 53 3a 3c 42 69 'PASS:<Bi'
+ [400 11:35:16] 0008 6e 61 72 79 20 74 65 73 'nary.tes'
+ [400 11:35:16] 0010 74 20 63 6f 6d 70 6c 65 't.comple'
+ [400 11:35:16] 0018 74 65 64 3e 0d 0a 49 4e 'ted>..IN'
+ [400 11:35:16] 0020 46 4f 3a 3c 42 49 4e 41 'FO:<BINA'
+ [400 11:35:16] 0028 52 59 3a 31 32 38 3a 31 'RY:128:1'
+ [400 11:35:16] 0030 21 3e 0d 0a 40 42 49 4e '!>..@BIN'
+ [400 11:35:16] 0038 41 52 59 3a 31 32 38 3a 'ARY:128:'
+ [400 11:35:16] 0040 31 21 .. .. .. .. .. .. '1!'
+
+ In the case of an error during a testing command the data received by
+ the filter will be printed out, as will the data that was
+ expected. This allows the two data sets to be compared which may give
+ some idea of what the problem is.
diff --git a/cesar/ecos/packages/io/serial/current/tests/flow1.c b/cesar/ecos/packages/io/serial/current/tests/flow1.c
new file mode 100644
index 0000000000..7ece0fe1dc
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/tests/flow1.c
@@ -0,0 +1,209 @@
+//==========================================================================
+//
+// flow1.c
+//
+// Test data half-duplex receive and send with flow control.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov,jlarmour
+// Contributors:
+// Date: 2000-07-27
+// Description: Test the half-duplex receive and send capabilities of
+// the serial driver with flow control.
+// Requirements: This test requires the ser_filter on the host side.
+//
+//####DESCRIPTIONEND####
+
+#include <pkgconf/system.h>
+
+#include <cyg/infra/testcase.h> // test macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#ifdef CYGPKG_KERNEL
+# include <pkgconf/kernel.h>
+#endif
+#ifdef CYGPKG_IO_SERIAL
+# include <pkgconf/io_serial.h>
+#endif
+
+// Package requirements
+#ifndef CYGPKG_IO_SERIAL
+# define NA_MSG "Requires I/O serial package"
+#elif !defined(CYGFUN_KERNEL_API_C)
+# define NA_MSG "Requires kernel C API"
+#elif !defined(CYGPKG_IO_SERIAL_FLOW_CONTROL)
+# define NA_MSG "Requires serial flow control"
+#endif
+
+#ifdef NA_MSG
+void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( NA_MSG);
+}
+#else
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+#include <cyg/kernel/kapi.h>
+unsigned char stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+cyg_thread thread_data;
+cyg_handle_t thread_handle;
+
+// redefine buffer size for large transfer tests
+#ifndef CYGPKG_HAL_ARM_AEB
+# define IN_BUFFER_SIZE 65536
+#endif
+
+#include "ser_test_protocol.inl"
+
+
+//---------------------------------------------------------------------------
+// run the tests
+
+static void
+run_tests( cyg_io_handle_t ser_handle )
+{
+
+
+ // Start slowly, then go for max size.
+ {
+ test_binary(ser_handle, 16, MODE_EOP_ECHO);
+ test_binary(ser_handle, 128, MODE_EOP_ECHO);
+ test_binary(ser_handle, 256, MODE_EOP_ECHO);
+ test_binary(ser_handle, IN_BUFFER_SIZE, MODE_EOP_ECHO);
+ }
+
+ // Write some varying length packets.
+ {
+ int i;
+ for(i = 0; i < 8; i++) {
+ // No echo.
+ test_binary(ser_handle, 256 + 42*i, MODE_NO_ECHO);
+ test_binary(ser_handle, 64 + 7*i, MODE_NO_ECHO);
+ // Echo.
+ test_binary(ser_handle, 256 + 42*i, MODE_EOP_ECHO);
+ test_binary(ser_handle, 64 + 7*i, MODE_EOP_ECHO);
+ }
+ }
+
+ // End with some long packets.
+ {
+ test_binary(ser_handle, 2048, MODE_NO_ECHO);
+ test_binary(ser_handle, 16384, MODE_NO_ECHO);
+ test_binary(ser_handle, 65536, MODE_NO_ECHO);
+ }
+}
+
+//---------------------------------------------------------------------------
+// Serial test main function.
+
+void
+serial_test( void )
+{
+ cyg_io_handle_t ser_handle;
+ cyg_ser_cfg_t *cfg=&test_configs[0];
+ cyg_ser_cfg_t new_cfg;
+ int count = sizeof(test_configs) / sizeof(cyg_ser_cfg_t);
+ int i;
+
+ test_open_ser(&ser_handle);
+
+ // We need the filter for this test.
+ test_ping(ser_handle);
+
+ // Choose the configuration with the fastest baud rate, to be most
+ // provocative. Start at 1 coz cfg already points at 0
+ for (i=1; i<count; i++) {
+ if (cfg->baud_rate < test_configs[i].baud_rate)
+ cfg=&test_configs[i];
+ }
+
+ // Set flow control from configuration
+ // Choose software first
+
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
+ CYG_TEST_INFO("Setting software flow control");
+
+ new_cfg = *cfg;
+ new_cfg.flags |= CYGNUM_SERIAL_FLOW_XONXOFF_RX |
+ CYGNUM_SERIAL_FLOW_XONXOFF_TX;
+ if (ENOERR == change_config(ser_handle, &new_cfg))
+ run_tests( ser_handle );
+#endif
+
+ // hardware flow control
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_HW
+ CYG_TEST_INFO("Setting hardware flow control");
+
+ new_cfg = *cfg;
+ new_cfg.flags |= CYGNUM_SERIAL_FLOW_RTSCTS_RX|CYGNUM_SERIAL_FLOW_RTSCTS_TX;
+ if (ENOERR == change_config(ser_handle, &new_cfg))
+ run_tests( ser_handle );
+
+ CYG_TEST_INFO("Setting DSR/DTR hardware flow control");
+
+ new_cfg = *cfg;
+ new_cfg.flags |= CYGNUM_SERIAL_FLOW_DSRDTR_RX|CYGNUM_SERIAL_FLOW_DSRDTR_TX;
+ if (ENOERR == change_config(ser_handle, &new_cfg))
+ run_tests( ser_handle );
+#endif
+
+ CYG_TEST_PASS_FINISH("flow1 test OK");
+}
+
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ cyg_thread_create(10, // Priority - just a number
+ (cyg_thread_entry_t*)serial_test, // entry
+ 0, //
+ "serial_thread", // Name
+ &stack[0], // Stack
+ CYGNUM_HAL_STACK_SIZE_TYPICAL, // Size
+ &thread_handle, // Handle
+ &thread_data // Thread data structure
+ );
+ cyg_thread_resume(thread_handle);
+ cyg_scheduler_start();
+}
+
+#endif // ifndef NA_MSG
+
+// EOF flow1.c
diff --git a/cesar/ecos/packages/io/serial/current/tests/flow2.c b/cesar/ecos/packages/io/serial/current/tests/flow2.c
new file mode 100644
index 0000000000..374f304a6b
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/tests/flow2.c
@@ -0,0 +1,182 @@
+//==========================================================================
+//
+// flow2.c
+//
+// Test duplex receive and send with flow control.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov,jlarmour
+// Contributors:
+// Date: 2000-07-27
+// Description: Test the duplex receive and send capabilities of
+// the serial driver with flow control.
+// Requirements: This test requires the ser_filter on the host side.
+//
+//####DESCRIPTIONEND####
+
+#include <pkgconf/system.h>
+
+#include <cyg/infra/testcase.h> // test macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#ifdef CYGPKG_KERNEL
+# include <pkgconf/kernel.h>
+#endif
+#ifdef CYGPKG_IO_SERIAL
+# include <pkgconf/io_serial.h>
+#endif
+
+// Package requirements
+#ifndef CYGPKG_IO_SERIAL
+# define NA_MSG "Requires I/O serial package"
+#elif !defined(CYGFUN_KERNEL_API_C)
+# define NA_MSG "Requires kernel C API"
+#elif !defined(CYGPKG_IO_SERIAL_FLOW_CONTROL)
+# define NA_MSG "Requires serial flow control"
+#endif
+
+#ifdef NA_MSG
+void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( NA_MSG);
+}
+#else
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+#include <cyg/kernel/kapi.h>
+unsigned char stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+cyg_thread thread_data;
+cyg_handle_t thread_handle;
+
+#include "ser_test_protocol.inl"
+
+
+//---------------------------------------------------------------------------
+// run the tests
+
+static void
+run_tests( cyg_io_handle_t ser_handle )
+{
+ // Start slowly, then go for max size.
+ {
+ test_binary(ser_handle, 16, MODE_DUPLEX_ECHO);
+ test_binary(ser_handle, 128, MODE_DUPLEX_ECHO);
+ test_binary(ser_handle, 256, MODE_DUPLEX_ECHO);
+ test_binary(ser_handle, 1024, MODE_DUPLEX_ECHO);
+ }
+}
+
+//---------------------------------------------------------------------------
+// Serial test main function.
+
+void
+serial_test( void )
+{
+ cyg_io_handle_t ser_handle;
+ cyg_ser_cfg_t *cfg=&test_configs[0];
+ cyg_ser_cfg_t new_cfg;
+ int count = sizeof(test_configs) / sizeof(cyg_ser_cfg_t);
+ int i;
+
+ test_open_ser(&ser_handle);
+
+ // We need the filter for this test.
+ test_ping(ser_handle);
+
+ // Choose the configuration with the fastest baud rate, to be most
+ // provocative. Start at 1 coz cfg already points at 0
+ for (i=1; i<count; i++) {
+ if (cfg->baud_rate < test_configs[i].baud_rate)
+ cfg=&test_configs[i];
+ }
+
+ // Set flow control from configuration
+ // Choose software first
+
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
+ CYG_TEST_INFO("Setting software flow control");
+
+ new_cfg = *cfg;
+ new_cfg.flags |= CYGNUM_SERIAL_FLOW_XONXOFF_RX |
+ CYGNUM_SERIAL_FLOW_XONXOFF_TX;
+ if (ENOERR == change_config(ser_handle, &new_cfg))
+ run_tests( ser_handle );
+#endif
+
+ // hardware flow control
+#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_HW
+ CYG_TEST_INFO("Setting RTS/CTS hardware flow control");
+
+ new_cfg = *cfg;
+ new_cfg.flags |= CYGNUM_SERIAL_FLOW_RTSCTS_RX|CYGNUM_SERIAL_FLOW_RTSCTS_TX;
+ if (ENOERR == change_config(ser_handle, &new_cfg))
+ run_tests( ser_handle );
+
+ CYG_TEST_INFO("Setting DSR/DTR hardware flow control");
+
+ new_cfg = *cfg;
+ new_cfg.flags |= CYGNUM_SERIAL_FLOW_DSRDTR_RX|CYGNUM_SERIAL_FLOW_DSRDTR_TX;
+ if (ENOERR == change_config(ser_handle, &new_cfg))
+ run_tests( ser_handle );
+#endif
+
+ CYG_TEST_PASS_FINISH("flow2 test OK");
+}
+
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ cyg_thread_create(10, // Priority - just a number
+ (cyg_thread_entry_t*)serial_test, // entry
+ 0, //
+ "serial_thread", // Name
+ &stack[0], // Stack
+ CYGNUM_HAL_STACK_SIZE_TYPICAL, // Size
+ &thread_handle, // Handle
+ &thread_data // Thread data structure
+ );
+ cyg_thread_resume(thread_handle);
+ cyg_scheduler_start();
+}
+
+#endif // ifndef NA_MSG
+
+// EOF flow2.c
diff --git a/cesar/ecos/packages/io/serial/current/tests/ser_test_protocol.inl b/cesar/ecos/packages/io/serial/current/tests/ser_test_protocol.inl
new file mode 100644
index 0000000000..6f4d992c94
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/tests/ser_test_protocol.inl
@@ -0,0 +1,1075 @@
+//==========================================================================
+//
+// ser_test_protocol.c
+//
+// Serial device driver testing protocol
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov, gthomas
+// Date: 1999-03-17
+// Description: Protocol implementation used to test eCos serial devices.
+// Relies on ser_filter to be present on the host side to
+// respond to test requests.
+//
+// To Do:
+// o Clean up.
+// o Clean up config change magic.
+// o Figure out how to handle kernel dependency
+// : without kernel, no timeout. Without timeout, no filter auto detection.
+//
+//####DESCRIPTIONEND####
+
+#include <pkgconf/system.h>
+#include <pkgconf/io.h>
+#include <pkgconf/io_serial.h>
+
+#include <cyg/io/io.h>
+#include <cyg/io/devtab.h>
+#include <cyg/io/ttyio.h>
+#include <cyg/infra/diag.h>
+#include <cyg/infra/cyg_ass.h>
+
+#include <cyg/hal/hal_intr.h> // for reclaiming interrupt vector
+
+//----------------------------------------------------------------------------
+// Definition of which device to run tests on on various platforms.
+
+#define NA_MSG "No test device specified"
+
+// Cleaned up drivers will export the testing parameters via CDL.
+// When all drivers are changed, replace the TEST_ macros throughout
+// with the CYGPRI_ equivalents.
+#ifdef CYGPRI_SER_TEST_CRASH_ID
+# define TEST_CRASH_ID CYGPRI_SER_TEST_CRASH_ID
+# define TEST_SER_DEV CYGPRI_SER_TEST_SER_DEV
+# define TEST_TTY_DEV CYGPRI_SER_TEST_TTY_DEV
+#endif
+
+// Note that CYGPRI_SER_TEST_OVERRIDE_INT_1 and CYGPRI_SER_TEST_OVERRIDE_INT_2
+// may also be exported. These identify interrupts that should be reclaimed
+// from the ROM monitor before the test is started.
+
+#if defined(CYGPKG_HAL_POWERPC_MBX) \
+ && defined(CYGPKG_HAL_QUICC) \
+ && defined(CYGPKG_IO_SERIAL_POWERPC_QUICC_SMC) \
+ && defined(CYGPKG_IO_SERIAL_POWERPC_QUICC_SMC_SMC1)
+# define TEST_CRASH_ID "ppcmbx"
+# define TEST_SER_DEV CYGDAT_IO_SERIAL_POWERPC_QUICC_SMC_SMC1_NAME
+# if defined(CYGPKG_IO_SERIAL_TTY_TTY1)
+# define TEST_TTY_DEV CYGDAT_IO_SERIAL_TTY_TTY1_DEV
+# endif
+#endif
+#if defined(CYGPKG_HAL_MN10300_AM31_STDEVAL1) \
+ && defined(CYGPKG_IO_SERIAL_MN10300) \
+ && defined(CYGPKG_IO_SERIAL_MN10300_SERIAL2)
+# define TEST_CRASH_ID "am31st"
+# define TEST_SER_DEV CYGDAT_IO_SERIAL_MN10300_SERIAL2_NAME
+# if defined(CYGPKG_IO_SERIAL_TTY_TTY2)
+# define TEST_TTY_DEV CYGDAT_IO_SERIAL_TTY_TTY1_DEV
+# endif
+#endif
+#if defined(CYGPKG_HAL_MN10300_AM33_STB) \
+ && defined(CYGPKG_IO_SERIAL_MN10300) \
+ && defined(CYGPKG_IO_SERIAL_MN10300_SERIAL0)
+# define TEST_CRASH_ID "am33st"
+# define TEST_SER_DEV CYGDAT_IO_SERIAL_MN10300_SERIAL0_NAME
+# if defined(CYGPKG_IO_SERIAL_TTY_TTY0)
+# define TEST_TTY_DEV CYGDAT_IO_SERIAL_TTY_TTY0_DEV
+# endif
+#endif
+
+// We can't rely on haldiag for ser_filter detection - it may not define
+// a working character reading function.
+#ifndef TEST_SER_DEV
+# define SER_NOP_TEST
+# define TTY_NOP_TEST
+# define TEST_SER_DEV "/dev/null"
+# define TEST_TTY_DEV "/dev/null"
+#else
+# ifndef TEST_TTY_DEV
+# define TTY_NOP_TEST
+# define TEST_TTY_DEV "/dev/null"
+# endif
+#endif
+
+#ifndef TEST_CRASH_ID
+#define TEST_CRASH_ID "......"
+#endif
+
+//----------------------------------------------------------------------------
+// Crash types
+// Eventually this will be moved into a separate header file so a script
+// can read the definitions and use the output formats/codes to analyze
+// test results. For now we just keep it here...
+
+// FAILCODE:<tttttt:cccc:[optional data, separated by :]!>
+// tttttt: 6 letter target code
+// cccc: crash code (16bit hex value)
+
+#define TEST_CRASH(__h, __code, __msg, args...) \
+ CYG_MACRO_START \
+ cyg_uint32 __len = 1; \
+ /* Try to flush remaining input */ \
+ cyg_thread_delay(50); \
+ cyg_io_get_config(__h, CYG_IO_GET_CONFIG_SERIAL_INPUT_FLUSH, \
+ 0, &__len); \
+ diag_printf("FAILCODE:<" TEST_CRASH_ID ":%04x:" __code, ## args); \
+ diag_printf("!>\n"); \
+ CYG_FAIL(__msg); \
+ hang(); \
+ CYG_MACRO_END
+
+// Target IO
+#define TEST_CRASH_IO 0x0000
+#define TEST_CRASH_IO_READ "%d", 0x0001
+#define TEST_CRASH_IO_WRITE "%d", 0x0002
+#define TEST_CRASH_IO_DRAIN "%d", 0x0003
+#define TEST_CRASH_IO_GET_CFG "%d", 0x0004
+#define TEST_CRASH_IO_SET_CFG "%d", 0x0005
+
+// Target
+#define TEST_CRASH_CRC 0x0010
+#define TEST_CRASH_CRC_CHAR "%02x", 0x0011
+#define TEST_CRASH_CRC_BAD "%08x:%08x", 0x0012
+#define TEST_CRASH_CRC_HOST "", 0x0013
+
+// Protocol errors
+#define TEST_CRASH_PROT 0x1000
+#define TEST_CRASH_PROT_BIN_MODE "%d", 0x1080
+#define TEST_CRASH_PROT_TEXT "%d", 0x1100
+
+#define TEST_CRASH_HOST_xx 0xf000
+#define TEST_CRASH_HOST_TIMEOUT "%d:%d:%d:%d", 0xf000
+ // command#, read invocation#, expected, actual
+#define TEST_CRASH_HOST_CRC_BAD "%d:%08x:%08x:%d:%02x:%02x", 0xf010
+ // command#, expected CRC, actual, index, expected char, actual
+#define TEST_CRASH_HOST_DUPLEX_BAD "%d:%d:%02x:%02x", 0xf020
+ // command#, index, expected char, actual
+
+//----------------------------------------------------------------------------
+// The data in buffer and the cmd buffer
+#ifndef IN_BUFFER_SIZE
+# define IN_BUFFER_SIZE 1024
+#endif
+cyg_uint8 in_buffer[IN_BUFFER_SIZE];
+
+char cmd_buffer[128];
+
+//----------------------------------------------------------------------------
+// Some types specific to the testing protocol.
+typedef enum {
+ MODE_NO_ECHO = 0,
+ MODE_EOP_ECHO,
+ MODE_DUPLEX_ECHO
+} cyg_mode_t;
+
+typedef enum {
+ TEST_RETURN_OK = ENOERR,
+ TEST_RETURN_NA
+} cyg_test_return_t;
+
+typedef struct ser_cfg {
+ cyg_serial_baud_rate_t baud_rate;
+ cyg_serial_word_length_t data_bits;
+ cyg_serial_stop_bits_t stop_bits;
+ cyg_serial_parity_t parity;
+ cyg_uint32 flags;
+ // etc...
+} cyg_ser_cfg_t;
+
+typedef enum {
+ OPT_SERIAL_DEBUG = 0,
+ OPT_VERBOSE_LEVEL
+} cyg_option_t;
+
+typedef enum {
+ _NONE = 0,
+ PROTOCOL_PROGRESS,
+ PROTOCOL_DATA,
+} cyg_verbosity_level_t;
+
+
+// A few predifined option macros. Use after test_ping().
+#define TEST_OPTIONS(__handle, __array) \
+ test_options(__handle, sizeof(__array)/8, __array)
+
+#define TEST_HOST_DEBUG(__handle) \
+ CYG_MACRO_START \
+ cyg_uint32 __options[] = {OPT_SERIAL_DEBUG, 1}; \
+ test_options((__handle), sizeof(__options)/8, \
+ __options); \
+ CYG_MACRO_END
+
+#define TEST_HOST_PROGRESS(__handle) \
+ CYG_MACRO_START \
+ cyg_uint32 __options[] = \
+ {OPT_SERIAL_DEBUG, 1, \
+ OPT_VERBOSE_LEVEL, PROTOCOL_PROGRESS}; \
+ test_options((__handle), sizeof(__options)/8, \
+ __options); \
+ CYG_MACRO_END
+
+#define TEST_HOST_DATA(__handle) \
+ CYG_MACRO_START \
+ cyg_uint32 __options[] = \
+ {OPT_SERIAL_DEBUG, 1, \
+ OPT_VERBOSE_LEVEL, PROTOCOL_DATA}; \
+ test_options((__handle), sizeof(__options)/8, \
+ __options); \
+ CYG_MACRO_END
+
+//----------------------------------------------------------------------------
+// A few predefined configurations. These must all be valid for any
+// given target until change_config is behaving correctly.
+cyg_ser_cfg_t test_configs[] = {
+#if (0 == CYGINT_IO_SERIAL_TEST_SKIP_9600)
+ { CYGNUM_SERIAL_BAUD_9600, CYGNUM_SERIAL_WORD_LENGTH_8,
+ CYGNUM_SERIAL_STOP_1, CYGNUM_SERIAL_PARITY_NONE,
+ CYGNUM_SERIAL_FLOW_NONE },
+#endif
+
+#if (0 == CYGINT_IO_SERIAL_TEST_SKIP_14400)
+#if !defined(CYGPKG_HAL_MN10300_AM31) && \
+ !defined(CYGPKG_HAL_MN10300_AM33)
+ { CYGNUM_SERIAL_BAUD_14400, CYGNUM_SERIAL_WORD_LENGTH_8,
+ CYGNUM_SERIAL_STOP_1, CYGNUM_SERIAL_PARITY_NONE,
+ CYGNUM_SERIAL_FLOW_NONE },
+#endif
+#endif
+
+ { CYGNUM_SERIAL_BAUD_19200, CYGNUM_SERIAL_WORD_LENGTH_8,
+ CYGNUM_SERIAL_STOP_1, CYGNUM_SERIAL_PARITY_NONE,
+ CYGNUM_SERIAL_FLOW_NONE },
+
+#if (0 == CYGINT_IO_SERIAL_TEST_SKIP_38400)
+ { CYGNUM_SERIAL_BAUD_38400, CYGNUM_SERIAL_WORD_LENGTH_8,
+ CYGNUM_SERIAL_STOP_1, CYGNUM_SERIAL_PARITY_NONE,
+ CYGNUM_SERIAL_FLOW_NONE },
+#endif
+
+#if (0 == CYGINT_IO_SERIAL_TEST_SKIP_57600)
+#if !defined(CYGPKG_HAL_MN10300_AM33)
+ { CYGNUM_SERIAL_BAUD_57600, CYGNUM_SERIAL_WORD_LENGTH_8,
+ CYGNUM_SERIAL_STOP_1, CYGNUM_SERIAL_PARITY_NONE,
+ CYGNUM_SERIAL_FLOW_NONE },
+#endif
+#endif
+
+#if (0 == CYGINT_IO_SERIAL_TEST_SKIP_115200)
+#if !defined(CYGPKG_HAL_MN10300_STDEVAL1)
+ { CYGNUM_SERIAL_BAUD_115200, CYGNUM_SERIAL_WORD_LENGTH_8,
+ CYGNUM_SERIAL_STOP_1, CYGNUM_SERIAL_PARITY_NONE,
+ CYGNUM_SERIAL_FLOW_NONE },
+#endif
+#endif
+
+#if (0 == CYGINT_IO_SERIAL_TEST_SKIP_PARITY_EVEN)
+ // One stop bit, even parity
+ { CYGNUM_SERIAL_BAUD_19200, CYGNUM_SERIAL_WORD_LENGTH_8,
+ CYGNUM_SERIAL_STOP_1, CYGNUM_SERIAL_PARITY_EVEN,
+ CYGNUM_SERIAL_FLOW_NONE },
+#endif
+
+#if (0 == CYGINT_IO_SERIAL_TEST_SKIP_PARITY_EVEN)
+#if (0 == CYGINT_IO_SERIAL_TEST_SKIP_STOP_2)
+ // Two stop bits, even parity
+ { CYGNUM_SERIAL_BAUD_19200, CYGNUM_SERIAL_WORD_LENGTH_8,
+ CYGNUM_SERIAL_STOP_2, CYGNUM_SERIAL_PARITY_EVEN,
+ CYGNUM_SERIAL_FLOW_NONE },
+#endif
+#endif
+
+#if (0 == CYGINT_IO_SERIAL_TEST_SKIP_STOP_2)
+ // Two stop bits, no parity
+ { CYGNUM_SERIAL_BAUD_19200, CYGNUM_SERIAL_WORD_LENGTH_8,
+ CYGNUM_SERIAL_STOP_2, CYGNUM_SERIAL_PARITY_NONE,
+ CYGNUM_SERIAL_FLOW_NONE },
+#endif
+};
+
+//----------------------------------------------------------------------------
+// Macros to help extract values from the argument string.
+// Note: This is probably not an ideal solution, but it was easy to make :)
+
+#define INIT_VALUE(__args) \
+ unsigned int v; \
+ char *__ptr1, *__ptr2 = (__args)
+
+#define SET_VALUE(__slot) \
+do { \
+ __ptr1 = index(__ptr2, (int) ':'); \
+ if (__ptr1) \
+ *__ptr1 = 0; \
+ v = atoi(__ptr2); \
+ __ptr2 = __ptr1+1; \
+ (__slot) = v; \
+} while (0)
+
+
+//----------------------------------------------------------------------------
+// CRC magic - it's a bit of a hack for now.
+// FIXME: standard definition?
+#define ADD_CRC_BYTE(__crc, __c) \
+ CYG_MACRO_START \
+ (__crc) = ((__crc) << 1) ^ (__c); \
+ CYG_MACRO_END
+
+// FIXME: Hack to allow easy ASCII transfer.
+#define FIX_CRC(__crc, __icrc) \
+ CYG_MACRO_START \
+ __icrc = (int) (__crc); \
+ if (__icrc < 0) \
+ __icrc = -__icrc; \
+ CYG_MACRO_END
+
+//----------------------------------------------------------------------------
+// Macros for read/write to serial with error cheking.
+static volatile cyg_uint32 r_stamp;
+static volatile int aborted;
+
+// This routine will be called if the read "times out"
+static void
+do_abort(void *handle)
+{
+ cyg_io_handle_t io_handle = (cyg_io_handle_t)handle;
+ cyg_uint32 len = 1; // Need something here
+ cyg_io_get_config(io_handle, CYG_IO_GET_CONFIG_SERIAL_ABORT, 0, &len);
+ aborted = 1;
+}
+#include "timeout.inl"
+
+// Read with timeout (__t = timeout in ticks, int* __r = result)
+#define Tcyg_io_read_timeout(__h, __d, __l, __t, __r) \
+ CYG_MACRO_START \
+ int __res; \
+ r_stamp = timeout((__t), do_abort, (__h)); \
+ __res = cyg_io_read((__h), (__d), (__l)); \
+ if (ENOERR != __res && -EINTR != __res) { \
+ TEST_CRASH(__h, TEST_CRASH_IO_READ, \
+ "cyg_io_read/timeout failed", __res); \
+ } \
+ *(__r) = __res; \
+ untimeout(r_stamp); \
+ CYG_MACRO_END
+
+#define Tcyg_io_read(__h, __d, __l) \
+ CYG_MACRO_START \
+ int __res = cyg_io_read((__h), (__d), (__l)); \
+ if (ENOERR != __res) { \
+ TEST_CRASH(__h, TEST_CRASH_IO_READ, \
+ "cyg_io_read failed", __res); \
+ } \
+ CYG_MACRO_END
+
+#define Tcyg_io_write(__h, __d, __l) \
+ CYG_MACRO_START \
+ int __res; \
+ cyg_uint32 __len = 1; \
+ __res = cyg_io_write((__h), (__d), (__l)); \
+ if (ENOERR != __res) { \
+ TEST_CRASH(__h, TEST_CRASH_IO_WRITE, \
+ "cyg_io_write failed", __res); \
+ } \
+ __res = cyg_io_get_config((__h), \
+ CYG_IO_GET_CONFIG_SERIAL_OUTPUT_DRAIN, \
+ 0, &__len); \
+ if (ENOERR != __res) { \
+ TEST_CRASH(__h, TEST_CRASH_IO_DRAIN, \
+ "DRAIN failed", __res); \
+ } \
+ CYG_MACRO_END
+
+
+//----------------------------------------------------------------------------
+// Some libc like functions that are handy to have around.
+static int
+strlen(const char *c)
+{
+ int l = 0;
+ while (*c++) l++;
+ return l;
+}
+
+static char*
+strcpy(char* dest, const char* src)
+{
+ char c;
+ while ((c = *src++)) {
+ *dest++ = c;
+ }
+ *dest = c;
+
+ return dest;
+}
+
+static char*
+itoa(char* dest, int v)
+{
+ char b[16];
+ char* p = &b[16];
+
+ *--p = 0;
+ if (v) {
+ while (v){
+ *--p = (v % 10) + '0';
+ v = v / 10;
+ }
+ } else
+ *--p = '0';
+
+ return strcpy(dest, p);
+}
+
+#define min(_a, _b) ((_a) < (_b)) ? (_a) : (_b)
+
+void
+hang(void)
+{
+ while (1);
+}
+
+//-----------------------------------------------------------------------------
+// Configuration changing function.
+//
+// First change to the new config and back again to determine if the driver
+// can handle the config.
+// If not, return error.
+//
+// Then query the host for its capability to use the config:
+// Format out:
+// "@CONFIG:<baud rate code>:<#data bits>:<#stop bits>:<parity on/off>:<flow control code>!"
+// Format in:
+// OK/ER
+//
+// On ER, return error.
+//
+// On OK, change to the new configuration. Resynchronize with the host:
+// Target waits for host to send S(ync)
+// [host will delay at least .1 secs after changing baud rate so the
+// line has time to settle.]
+//
+// When receiving S(ync), target replies OK to the host which then
+// acknowledges with D(one).
+//
+// Host can also send R(esync) which means it didn't receieve the OK. If
+// so the target resends its S(ync) message.
+//
+// If the synchronization has not succeeded within 1 second
+// (configurable in the protocol), both host and target will revert to
+// the previous configuration and attempt to synchronize again. If
+// this fails, this call will hang and the host will consider the test
+// a failure.
+//
+// To Do:
+// Host&protocol currently only supports:
+// - no/even parity
+int
+change_config(cyg_io_handle_t handle, cyg_ser_cfg_t* cfg)
+{
+ cyg_serial_info_t old_cfg, new_cfg;
+ const char cmd[] = "@CONFIG:";
+ char reply[2];
+ cyg_uint32 msglen;
+ int res;
+ cyg_uint32 len;
+ char *p1;
+
+ // Prepare the command.
+ p1 = &cmd_buffer[0];
+ p1 = strcpy(p1, &cmd[0]);
+ p1 = itoa(p1, cfg->baud_rate);
+ *p1++ = ':';
+ p1 = itoa(p1, cfg->data_bits);
+ *p1++ = ':';
+ p1 = itoa(p1, cfg->stop_bits);
+ *p1++ = ':';
+ p1 = itoa(p1, cfg->parity);
+ *p1++ = ':';
+ p1 = itoa(p1, cfg->flags);
+ *p1++ = '!';
+ *p1 = 0; // note: we may append to this later
+
+ // Tell user what we're up to.
+ CYG_TEST_INFO((char *)&cmd_buffer[1]);
+
+ // Change to new config and then back to determine if the driver likes it.
+ len = sizeof(old_cfg);
+ res = cyg_io_get_config(handle, CYG_IO_GET_CONFIG_SERIAL_INFO,
+ &old_cfg, &len);
+ res = cyg_io_get_config(handle, CYG_IO_GET_CONFIG_SERIAL_INFO,
+ &new_cfg, &len);
+
+ if (res != ENOERR) {
+ TEST_CRASH(handle, TEST_CRASH_IO_GET_CFG,
+ "Can't get serial config", res);
+ }
+
+ new_cfg.baud = cfg->baud_rate;
+ new_cfg.word_length = cfg->data_bits;
+ new_cfg.stop = cfg->stop_bits;
+ new_cfg.parity = cfg->parity;
+ new_cfg.flags = cfg->flags;
+
+ res = cyg_io_set_config(handle, CYG_IO_SET_CONFIG_SERIAL_INFO,
+ &new_cfg, &len);
+ cyg_thread_delay(10); // Some chips don't like changes to happen to fast...
+
+ // Driver didn't like it. It will not have changed anything, so it's
+ // safe to return now.
+ if (ENOERR != res) {
+ // Let user know that the config was skipped due to the target.
+ const char txt_tskipped[] = "- skipped by target!";
+ p1 = strcpy(p1, txt_tskipped);
+ *p1 = 0;
+ CYG_TEST_INFO(&cmd_buffer[1]);
+ return res;
+ }
+
+ // Succeeded. Change back to the original config so we can communicate
+ // with the host.
+ res = cyg_io_set_config(handle, CYG_IO_SET_CONFIG_SERIAL_INFO,
+ &old_cfg, &len);
+ cyg_thread_delay(10); // Some chips don't like changes to happen to fast...
+
+ if (res != ENOERR) {
+ TEST_CRASH(handle, TEST_CRASH_IO_SET_CFG,
+ "Can't set serial config", res);
+ }
+
+ // Send command to host and read host's reply.
+ msglen = strlen(&cmd_buffer[0]);
+ Tcyg_io_write(handle, &cmd_buffer[0], &msglen);
+ msglen = 2;
+ Tcyg_io_read(handle, &reply[0], &msglen);
+
+ // Did host accept configuration?
+ if ('O' != reply[0] || 'K' != reply[1]) {
+ // Let user know that the config was skipped due to the host.
+ const char txt_hskipped[] = "- skipped by host!";
+ p1 = strcpy(p1, txt_hskipped);
+ *p1 = 0;
+ CYG_TEST_INFO(&cmd_buffer[1]);
+ diag_printf("Host didn't accept config (%02x, %02x).\n",
+ reply[0], reply[1]);
+
+ res = ENOSUPP;
+ return res;
+ }
+
+ // Now change config and wait for host to send us a S(ync)
+ // character.
+ // Loop until protocol exchange completed. This may hang (as seen
+ // from the host), but only when we get totally lost, in which
+ // case there's not much else to do really. In this case the host
+ // will consider the test a FAIL.
+ len = sizeof(new_cfg);
+ res = cyg_io_set_config(handle, CYG_IO_SET_CONFIG_SERIAL_INFO,
+ &new_cfg, &len);
+ cyg_thread_delay(10); // Some chips don't like changes to happen to fast...
+ if (res != ENOERR) {
+ TEST_CRASH(handle, TEST_CRASH_IO_SET_CFG,
+ "Can't set serial config/2", res);
+ }
+
+ {
+ int change_succeeded = 0;
+ int using_old_config = 0;
+ char in_buf[1];
+ cyg_uint32 len;
+ int saw_host_sync;
+
+ for (;;) {
+ aborted = 0; // global abort flag
+
+ // FIXME: Timeout time needs to be configurable, and needs to
+ // be sent to the host before getting here. That would allow
+ // changing the timeout by just rebuilding the test - without
+ // changing the host software.
+ saw_host_sync = 0;
+ r_stamp = timeout(100, do_abort, handle);
+ while(!aborted) {
+ len = 1;
+ in_buf[0] = 0;
+ res = cyg_io_read(handle, in_buf, &len);
+ if (ENOERR != res && -EINTR != res) {
+ // We may have to reset the driver here if the fail
+ // was due to a framing or parity error.
+ break;
+ }
+ if ('R' == in_buf[0]) {
+ // Resync - host didn't see our message. Try again.
+ saw_host_sync = 0;
+ } else if ('S' == in_buf[0] && !saw_host_sync) {
+ // In sync - reply to host if we haven't already
+ char ok_msg[2] = "OK";
+ cyg_uint32 ok_len = 2;
+ Tcyg_io_write(handle, ok_msg, &ok_len);
+ saw_host_sync = 1;
+ } else if ('D' == in_buf[0] && saw_host_sync) {
+ // Done - exchange completed.
+ change_succeeded = 1;
+ break;
+ }
+ }
+ untimeout(r_stamp);
+
+ if (change_succeeded) {
+ // If we had to revert to the old configuration, return error.
+ if (using_old_config)
+ return -EIO;
+ else
+ return ENOERR;
+ }
+
+ // We didn't synchronize with the host. Due to an IO error?
+ if (ENOERR != res && -EINTR != res) {
+ // We may have to reset the driver if the fail was due to
+ // a framing or parity error.
+ }
+
+ // Revert to the old configuration and try again.
+ len = sizeof(old_cfg);
+ res = cyg_io_set_config(handle, CYG_IO_SET_CONFIG_SERIAL_INFO,
+ &old_cfg, &len);
+ cyg_thread_delay(10); // Some chips don't like changes to happen to fast...
+ if (res != ENOERR) {
+ TEST_CRASH(handle, TEST_CRASH_IO_SET_CFG,
+ "Can't set serial config/3", res);
+ }
+ using_old_config = 1;
+ }
+
+ }
+}
+
+
+//-----------------------------------------------------------------------------
+// Host sends CRC in decimal ASCII, terminated with !
+int
+read_host_crc(cyg_io_handle_t handle)
+{
+ int crc;
+ cyg_uint32 len;
+ cyg_uint8 ch;
+
+ crc = 0;
+ while (1) {
+ len = 1;
+ Tcyg_io_read(handle, &ch, &len);
+ if ('!' == ch)
+ break;
+
+ if (!((ch >= '0' && ch <= '9'))){
+ TEST_CRASH(handle, TEST_CRASH_CRC_CHAR,
+ "Illegal CRC format from host", ch);
+ }
+
+ crc = crc*10 + (ch - '0');
+ }
+
+ return crc;
+}
+
+//---------------------------------------------------------------------------
+// Test binary data transmission.
+// Format out:
+// "@BINARY:<byte size>:<mode>!"
+// Format in:
+// <checksum>!<#size bytes data>
+// For echo modes, also:
+// Format out:
+// <#size bytes data>
+// Format in:
+// OK/ER
+// Format out:
+// DONE
+//
+// The last DONE allows the host to eat bytes if target is sending too many.
+//
+// Mode:
+// MODE_NO_ECHO:
+// Just receive data and verify CRC.
+// MODE_EOP_ECHO:
+// Receive data, verify CRC, resend data.
+// Expect OK/ER reply from host when done.
+// MODE_DUPLEX_ECHO:
+// Receive data, echo data, verify CRC.
+// Expect OK/ER reply from host when done.
+//
+// Note:
+// Using diag_printf while talking with the host may cause some funky
+// errors (bytes from the host side being lost!?!?)
+//
+// To Do:
+// MODE_DUPLEX_ECHO:
+// The current implementation is simple and may not stress the
+// driver enough. Also, it's command packet format doesn't match
+// that of the other modes.
+
+cyg_test_return_t
+test_binary(cyg_io_handle_t handle, int size, cyg_mode_t mode)
+{
+ const char cmd[] = "@BINARY:";
+ cyg_uint32 msglen;
+ cyg_uint32 xcrc;
+ int icrc, host_crc;
+ char *p1;
+ cyg_int8 host_status = 'O'; // host is happy by default
+
+ // Verify that the test can be run with available ressources.
+ if (MODE_EOP_ECHO == mode && size > IN_BUFFER_SIZE)
+ return TEST_RETURN_NA;
+
+ // Prepare and send the command.
+ p1 = &cmd_buffer[0];
+ p1 = strcpy(p1, &cmd[0]);
+ p1 = itoa(p1, size);
+ *p1++ = ':';
+ p1 = itoa(p1, mode);
+ *p1++ = '!';
+ *p1++ = 0;
+
+ CYG_TEST_INFO(&cmd_buffer[1]);
+
+ msglen = strlen(&cmd_buffer[0]);
+ Tcyg_io_write(handle, &cmd_buffer[0], &msglen);
+
+ // Get CRC back.
+ host_crc = read_host_crc(handle);
+
+ // Depending on mode, start reading data.
+ xcrc = 0;
+ switch (mode) {
+ case MODE_NO_ECHO:
+ {
+ // Break transfers into chunks no larger than the buffer size.
+ int tx_len, i;
+ cyg_uint32 chunk_len;
+ while (size > 0) {
+ chunk_len = min(IN_BUFFER_SIZE, size);
+ tx_len = chunk_len;
+ size -= chunk_len;
+
+ Tcyg_io_read(handle, &in_buffer[0], &chunk_len);
+
+ for (i = 0; i < tx_len; i++) {
+ ADD_CRC_BYTE(xcrc, in_buffer[i]);
+ }
+ }
+
+ // Reply that we have completed the test.
+ {
+ const char msg_done[] = "DONE";
+
+ chunk_len = strlen(&msg_done[0]);
+ Tcyg_io_write(handle, &msg_done[0], &chunk_len);
+ }
+
+ }
+ break;
+ case MODE_EOP_ECHO:
+ {
+ // We have already checked that the in buffer is large enough.
+ int i, tx_len;
+ cyg_uint32 chunk_len;
+ chunk_len = tx_len = size;
+ Tcyg_io_read(handle, &in_buffer[0], &chunk_len);
+
+ for (i = 0; i < tx_len; i++) {
+ ADD_CRC_BYTE(xcrc, in_buffer[i]);
+ }
+
+ // Echo data back.
+ chunk_len = size;
+ Tcyg_io_write(handle, &in_buffer[0], &chunk_len);
+
+ // Now read host side's status
+ chunk_len = 2;
+ Tcyg_io_read(handle, &in_buffer[0], &chunk_len);
+ host_status = in_buffer[0];
+
+ // Reply that we have completed the test.
+ {
+ const char msg_done[] = "DONE";
+
+ chunk_len = strlen(&msg_done[0]);
+ Tcyg_io_write(handle, &msg_done[0], &chunk_len);
+ }
+ }
+ break;
+ case MODE_DUPLEX_ECHO:
+ {
+ cyg_uint32 chunk_len;
+ int block_size = 64;
+
+ // This is a simple implementation (maybe too simple).
+ // Host sends 4 packets with the same size (64 bytes atm).
+ // Target echoes in this way:
+ // packet1 -> packet1
+ // packet2 -> packet2, packet2
+ // packet3 -> packet3
+ // packet4 -> /dev/null
+ //
+ // The reads/writes are interleaved in a way that should ensure
+ // the target out buffer to be full before the target starts to read
+ // packet3. That is, the target should be both receiving (packet3)
+ // and sending (packet2) at the same time.
+
+ while (size--) {
+ // block_size -> block_size
+ chunk_len = block_size;
+ Tcyg_io_read(handle, &in_buffer[0], &chunk_len);
+ chunk_len = block_size;
+ Tcyg_io_write(handle, &in_buffer[0], &chunk_len);
+
+ // block_size -> 2 x block_size
+ chunk_len = block_size;
+ Tcyg_io_read(handle, &in_buffer[0], &chunk_len);
+ chunk_len = block_size;
+ Tcyg_io_write(handle, &in_buffer[0], &chunk_len);
+ chunk_len = block_size;
+ Tcyg_io_write(handle, &in_buffer[0], &chunk_len);
+
+ // block_size -> block_size
+ chunk_len = block_size;
+ Tcyg_io_read(handle, &in_buffer[0], &chunk_len);
+ chunk_len = block_size;
+ Tcyg_io_write(handle, &in_buffer[0], &chunk_len);
+
+ // block_size -> 0
+ chunk_len = block_size;
+ Tcyg_io_read(handle, &in_buffer[0], &chunk_len);
+ }
+
+ // Kill the CRC. Leave packet verification to the host for now.
+ xcrc = host_crc = 0;
+
+ // Now read host side's status
+ chunk_len = 2;
+ Tcyg_io_read(handle, &in_buffer[0], &chunk_len);
+ host_status = in_buffer[0];
+
+ // Reply that we have completed the test.
+ {
+ const char msg_done[] = "DONE";
+
+ chunk_len = strlen(&msg_done[0]);
+ Tcyg_io_write(handle, &msg_done[0], &chunk_len);
+ }
+ }
+ break;
+ default:
+ TEST_CRASH(handle, TEST_CRASH_PROT_BIN_MODE,
+ "Unknown mode", mode);
+ break;
+ }
+
+
+ // Verify that the CRC matches the one from the host.
+ FIX_CRC(xcrc, icrc);
+ if (host_crc != icrc) {
+ TEST_CRASH(handle, TEST_CRASH_CRC_BAD,
+ "Input CRC failed", icrc, host_crc);
+ }
+
+ // Verify that the host is happy with the data we echoed.
+ if ('O' != host_status) {
+ TEST_CRASH(handle, TEST_CRASH_CRC_HOST,
+ "Output CRC failed");
+ }
+
+ CYG_TEST_PASS("Binary test completed");
+ return TEST_RETURN_OK;
+}
+
+//---------------------------------------------------------------------------
+// Test transformations on text transmissions
+// Format out:
+// "@TEXT:<mode>!<4 bytes binary checksum><C string>"
+// Format in:
+// "<C string>"
+// OK/ER
+//
+// Mode:
+// MODE_EOP_ECHO:
+// Receive data, verify CRC, resend data.
+// Expect OK/ER reply from host when done.
+// MODE_DUPLEX_ECHO:
+// Receive data, echo data, verify CRC.
+// Expect OK/ER reply from host when done.
+//
+cyg_test_return_t
+test_text(cyg_io_handle_t handle, cyg_mode_t mode, const char* s_base,
+ const char* s_out, const char* s_in)
+{
+ return TEST_RETURN_NA;
+}
+
+//---------------------------------------------------------------------------
+// Send PING to host, verifying the filter's presence.
+// Format out:
+// "@PING:<crash id>!"
+// Format in:
+// "OK"
+// or
+// No response if directly connected to GDB.
+//
+// This call only returns if the ser_filter is listening. Otherwise it
+// sends N/A and hangs.
+void
+test_ping(cyg_io_handle_t handle)
+{
+ char msg[] = "@PING:" TEST_CRASH_ID "!";
+ char msg2[] = "\n";
+ cyg_uint32 msglen = strlen(msg);
+ int res;
+
+ msglen = strlen(msg);
+ Tcyg_io_write(handle, msg, &msglen);
+
+ // Now read host side's status
+ msglen = 2;
+ Tcyg_io_read_timeout(handle, &in_buffer[0], &msglen, 100, &res);
+ if (ENOERR == res && 'O' == in_buffer[0] && 'K' == in_buffer[1])
+ return;
+
+ msglen = strlen(msg2);
+ Tcyg_io_write(handle, msg2, &msglen);
+
+ CYG_TEST_NA("No host side testing harness detected.");
+}
+
+
+//---------------------------------------------------------------------------
+// Send OPT to host, setting options in the filter.
+// Format out:
+// "@OPT:option1,value1:...:optionN,valueN!"
+// Format in:
+// "OK"
+//
+// Only integer values can be used. Any option not recognized by the
+// filter will be silently ignored.
+void
+test_options(cyg_io_handle_t handle, int count, cyg_uint32* options)
+{
+ const char cmd[] = "@OPT:";
+ cyg_uint32 msglen;
+ char *p1;
+
+ // Prepare and send the command.
+ p1 = &cmd_buffer[0];
+ p1 = strcpy(p1, &cmd[0]);
+ while(count--) {
+ p1 = itoa(p1, *options++); // option
+ *p1++ = ':';
+ p1 = itoa(p1, *options++); // value
+ *p1++ = ':';
+ }
+ *(p1-1) = '!';
+ *p1++ = 0;
+
+ CYG_TEST_INFO(&cmd_buffer[1]);
+
+ msglen = strlen(&cmd_buffer[0]);
+ Tcyg_io_write(handle, &cmd_buffer[0], &msglen);
+
+ // Now read host side's status
+ msglen = 2;
+ Tcyg_io_read(handle, &in_buffer[0], &msglen);
+}
+
+
+//---------------------------------------------------------------------------
+// Some helper functions to get a test started.
+void
+test_open_ser( cyg_io_handle_t* handle )
+{
+#if defined(CYGPKG_IO_SERIAL_DEVICES) && !defined(SER_NOP_TEST)
+ Cyg_ErrNo res;
+
+ if (cyg_test_is_simulator)
+ CYG_TEST_NA("Cannot run from simulator");
+
+#if defined(HAL_VSR_SET_TO_ECOS_HANDLER)
+# if defined(CYGPRI_SER_TEST_OVERRIDE_INT_1)
+ HAL_VSR_SET_TO_ECOS_HANDLER(CYGPRI_SER_TEST_OVERRIDE_INT_1, NULL);
+# endif
+# if defined(CYGPRI_SER_TEST_OVERRIDE_INT_2)
+ HAL_VSR_SET_TO_ECOS_HANDLER(CYGPRI_SER_TEST_OVERRIDE_INT_2, NULL);
+# endif
+#endif
+
+ res = cyg_io_lookup(TEST_SER_DEV, handle);
+ if (res != ENOERR) {
+ CYG_TEST_FAIL_FINISH("Can't lookup " TEST_SER_DEV);
+ }
+#else
+ CYG_TEST_NA(NA_MSG);
+#endif
+}
+
+void
+test_open_tty( cyg_io_handle_t* handle )
+{
+#if defined(CYGPKG_IO_SERIAL_TTY) && !defined(TTY_NOP_TEST)
+ Cyg_ErrNo res;
+
+ if (cyg_test_is_simulator)
+ CYG_TEST_NA("Cannot run from simulator");
+
+#if defined(HAL_VSR_SET_TO_ECOS_HANDLER)
+# if defined(CYGPRI_SER_TEST_OVERRIDE_INT_1)
+ HAL_VSR_SET_TO_ECOS_HANDLER(CYGPRI_SER_TEST_OVERRIDE_INT_1, NULL);
+# endif
+# if defined(CYGPRI_SER_TEST_OVERRIDE_INT_2)
+ HAL_VSR_SET_TO_ECOS_HANDLER(CYGPRI_SER_TEST_OVERRIDE_INT_2, NULL);
+# endif
+#endif
+
+ res = cyg_io_lookup(TEST_TTY_DEV, handle);
+ if (res != ENOERR) {
+ CYG_TEST_FAIL_FINISH("Can't lookup " TEST_TTY_DEV);
+ }
+#else
+ CYG_TEST_NA(NA_MSG);
+#endif
+}
+
+//---------------------------------------------------------------------------
+// end of ser_test_protocol.inl
diff --git a/cesar/ecos/packages/io/serial/current/tests/serial1.c b/cesar/ecos/packages/io/serial/current/tests/serial1.c
new file mode 100644
index 0000000000..c2dfe24a94
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/tests/serial1.c
@@ -0,0 +1,155 @@
+//==========================================================================
+//
+// serial1.c
+//
+// Test serial driver API
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov
+// Date: 1999-03-17
+// Description: Test the serial driver API.
+//
+//####DESCRIPTIONEND####
+
+#include <pkgconf/system.h>
+
+#include <cyg/infra/testcase.h> // test macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+// Package requirements
+#if defined(CYGPKG_IO_SERIAL) && defined(CYGPKG_KERNEL)
+
+#include <pkgconf/kernel.h>
+
+// Package option requirements
+#if defined(CYGFUN_KERNEL_API_C)
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+#include <cyg/kernel/kapi.h>
+unsigned char stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+cyg_thread thread_data;
+cyg_handle_t thread_handle;
+
+#include "ser_test_protocol.inl"
+
+//---------------------------------------------------------------------------
+// Serial test main function.
+
+
+void
+serial_api_test(int dummy)
+{
+ cyg_io_handle_t handle;
+ int res;
+ cyg_uint32 len;
+ unsigned char buffer[16];
+
+ // Always return...
+ if (dummy)
+ return;
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+
+ test_open_ser(&handle);
+
+ // read & write
+ res = cyg_io_read(handle, &buffer[0], &len);
+ res = cyg_io_write(handle, &buffer[0], &len);
+
+ // cyg_io_get_config
+ cyg_io_get_config(handle,
+ CYG_IO_GET_CONFIG_SERIAL_INFO, &buffer[0], &len);
+ cyg_io_get_config(handle,
+ CYG_IO_GET_CONFIG_SERIAL_OUTPUT_DRAIN, &buffer[0], &len);
+ cyg_io_get_config(handle,
+ CYG_IO_GET_CONFIG_SERIAL_INPUT_FLUSH, &buffer[0], &len);
+ cyg_io_get_config(handle,
+ CYG_IO_GET_CONFIG_SERIAL_ABORT, &buffer[0], &len);
+ cyg_io_get_config(handle,
+ CYG_IO_GET_CONFIG_SERIAL_OUTPUT_FLUSH, &buffer[0], &len);
+
+ // cyg_io_set_config
+ cyg_io_set_config(handle,
+ CYG_IO_SET_CONFIG_SERIAL_INFO, &buffer[0], &len);
+}
+
+
+void
+serial_test( void )
+{
+ serial_api_test(1);
+
+ CYG_TEST_PASS_FINISH("serial1 test OK");
+}
+
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ cyg_thread_create(10, // Priority - just a number
+ (cyg_thread_entry_t*)serial_test, // entry
+ 0, //
+ "serial_thread", // Name
+ &stack[0], // Stack
+ CYGNUM_HAL_STACK_SIZE_TYPICAL, // Size
+ &thread_handle, // Handle
+ &thread_data // Thread data structure
+ );
+ cyg_thread_resume(thread_handle);
+ cyg_scheduler_start();
+}
+
+#else // CYGFUN_KERNEL_API_C
+#define N_A_MSG "Needs kernel C API"
+#endif
+
+#else // CYGPKG_IO_SERIAL && CYGPKG_KERNEL
+#define N_A_MSG "Needs IO/serial and Kernel"
+#endif
+
+#ifdef N_A_MSG
+void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG);
+}
+#endif // N_A_MSG
+
+// EOF serial1.c
diff --git a/cesar/ecos/packages/io/serial/current/tests/serial2.c b/cesar/ecos/packages/io/serial/current/tests/serial2.c
new file mode 100644
index 0000000000..3cfebd6d5c
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/tests/serial2.c
@@ -0,0 +1,127 @@
+//==========================================================================
+//
+// serial2.c
+//
+// Test simple string output.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov
+// Date: 1999-03-17
+// Description: Test simple string output.
+//
+//####DESCRIPTIONEND####
+
+#include <pkgconf/system.h>
+
+#include <cyg/infra/testcase.h> // test macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#if defined(CYGPKG_IO_SERIAL) && defined(CYGPKG_KERNEL)
+
+#include <pkgconf/kernel.h>
+
+// Package option requirements
+#if defined(CYGFUN_KERNEL_API_C)
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+#include <cyg/kernel/kapi.h>
+unsigned char stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+cyg_thread thread_data;
+cyg_handle_t thread_handle;
+
+#include "ser_test_protocol.inl"
+
+//---------------------------------------------------------------------------
+// Serial test main function.
+void
+serial_test( void )
+{
+ char test_msg1[]="This is a test message!\n";
+ char test_msg2[]="$O5468697320697320612074657374206d657373616765210d0a#12";
+ cyg_uint32 msglen;
+ cyg_io_handle_t ser_handle;
+
+ test_open_ser(&ser_handle);
+
+ CYG_TEST_INFO("Writing a raw string to the serial device...");
+ msglen = strlen(&test_msg1[0]);
+ Tcyg_io_write(ser_handle, &test_msg1[0], &msglen);
+
+ CYG_TEST_INFO("Writing a GDB encoded string to the serial device...");
+ msglen = strlen(&test_msg2[0]);
+ Tcyg_io_write(ser_handle, &test_msg2[0], &msglen);
+
+ CYG_TEST_PASS_FINISH("serial2 test OK");
+}
+
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ cyg_thread_create(10, // Priority - just a number
+ (cyg_thread_entry_t*)serial_test, // entry
+ 0, //
+ "serial_thread", // Name
+ &stack[0], // Stack
+ CYGNUM_HAL_STACK_SIZE_TYPICAL, // Size
+ &thread_handle, // Handle
+ &thread_data // Thread data structure
+ );
+ cyg_thread_resume(thread_handle);
+ cyg_scheduler_start();
+}
+
+#else // CYGFUN_KERNEL_API_C
+#define N_A_MSG "Needs kernel C API"
+#endif
+
+#else // CYGPKG_IO_SERIAL && CYGPKG_KERNEL
+#define N_A_MSG "Needs IO/serial and Kernel"
+#endif
+
+#ifdef N_A_MSG
+void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG);
+}
+#endif // N_A_MSG
+
+// EOF serial2.c
diff --git a/cesar/ecos/packages/io/serial/current/tests/serial3.c b/cesar/ecos/packages/io/serial/current/tests/serial3.c
new file mode 100644
index 0000000000..9710cd272b
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/tests/serial3.c
@@ -0,0 +1,166 @@
+//==========================================================================
+//
+// serial3.c
+//
+// Test data half-duplex receive and send.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov
+// Date: 1999-03-17
+// Description: Test the half-duplex receive and send capabilities of
+// the serial driver.
+// Requirements: This test requires the ser_filter on the host side.
+//
+//####DESCRIPTIONEND####
+
+#include <pkgconf/system.h>
+
+#include <cyg/infra/testcase.h> // test macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+// Package requirements
+#if defined(CYGPKG_IO_SERIAL) && defined(CYGPKG_KERNEL)
+
+#include <pkgconf/kernel.h>
+
+// Package option requirements
+#if defined(CYGFUN_KERNEL_API_C)
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+#include <cyg/kernel/kapi.h>
+unsigned char stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+cyg_thread thread_data;
+cyg_handle_t thread_handle;
+
+#include "ser_test_protocol.inl"
+
+//---------------------------------------------------------------------------
+// Serial test main function.
+void
+serial_test( void )
+{
+ cyg_io_handle_t ser_handle;
+
+ test_open_ser(&ser_handle);
+
+ // We need the filter for this test.
+ test_ping(ser_handle);
+
+#if (CYGINT_IO_SERIAL_TEST_SKIP_38400 > 0)
+ {
+ // The board is too slow to run the driver in interrupt mode
+ // at the default 38400 baud when doing this test, so run it
+ // at a slower rate.
+ cyg_ser_cfg_t slow_cfg = {
+ CYGNUM_SERIAL_BAUD_19200, CYGNUM_SERIAL_WORD_LENGTH_8,
+ CYGNUM_SERIAL_STOP_1, CYGNUM_SERIAL_PARITY_NONE,
+ CYGNUM_SERIAL_FLOW_NONE };
+
+ CYG_TEST_INFO("Reducing baud rate to 19200");
+ change_config(ser_handle, &slow_cfg);
+ }
+#endif
+
+ // Start slowly, then go for max size.
+ {
+ test_binary(ser_handle, 16, MODE_EOP_ECHO);
+ test_binary(ser_handle, 128, MODE_EOP_ECHO);
+ test_binary(ser_handle, 256, MODE_EOP_ECHO);
+ test_binary(ser_handle, IN_BUFFER_SIZE, MODE_EOP_ECHO);
+ }
+
+ // Write some varying length packets.
+ {
+ int i;
+ for(i = 0; i < 8; i++) {
+ // No echo.
+ test_binary(ser_handle, 256 + 42*i, MODE_NO_ECHO);
+ test_binary(ser_handle, 64 + 7*i, MODE_NO_ECHO);
+ // Echo.
+ test_binary(ser_handle, 256 + 42*i, MODE_EOP_ECHO);
+ test_binary(ser_handle, 64 + 7*i, MODE_EOP_ECHO);
+ }
+ }
+
+#if 0 // Disable this for now.
+ // End with some long packets.
+ {
+ test_binary(ser_handle, 2048, MODE_NO_ECHO);
+ test_binary(ser_handle, 16384, MODE_NO_ECHO);
+ test_binary(ser_handle, 65536, MODE_NO_ECHO);
+ }
+#endif
+
+ CYG_TEST_PASS_FINISH("serial3 test OK");
+}
+
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ cyg_thread_create(10, // Priority - just a number
+ (cyg_thread_entry_t*)serial_test, // entry
+ 0, //
+ "serial_thread", // Name
+ &stack[0], // Stack
+ CYGNUM_HAL_STACK_SIZE_TYPICAL, // Size
+ &thread_handle, // Handle
+ &thread_data // Thread data structure
+ );
+ cyg_thread_resume(thread_handle);
+ cyg_scheduler_start();
+}
+
+#else // CYGFUN_KERNEL_API_C
+#define N_A_MSG "Needs kernel C API"
+#endif
+
+#else // CYGPKG_IO_SERIAL && CYGPKG_KERNEL
+#define N_A_MSG "Needs IO/serial and Kernel"
+#endif
+
+#ifdef N_A_MSG
+void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG);
+}
+#endif // N_A_MSG
+// EOF serial3.c
diff --git a/cesar/ecos/packages/io/serial/current/tests/serial4.c b/cesar/ecos/packages/io/serial/current/tests/serial4.c
new file mode 100644
index 0000000000..9e28d58097
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/tests/serial4.c
@@ -0,0 +1,143 @@
+//==========================================================================
+//
+// serial4.c
+//
+// Test serial configuration changing
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov
+// Date: 1999-03-17
+// Description: Test the configuration capabilities of the serial driver.
+// Requirements: This test requires the ser_filter on the host side.
+//
+// To Do:
+// This test should do a full test of the configuration combinations.
+// This will get possible with proper test_change_config protocol
+// implementation.
+//####DESCRIPTIONEND####
+
+#include <pkgconf/system.h>
+
+#include <cyg/infra/testcase.h> // test macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+// Package requirements
+#if defined(CYGPKG_IO_SERIAL) && defined(CYGPKG_KERNEL)
+
+#include <pkgconf/kernel.h>
+
+// Package option requirements
+#if defined(CYGFUN_KERNEL_API_C)
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+#include <cyg/kernel/kapi.h>
+unsigned char stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+cyg_thread thread_data;
+cyg_handle_t thread_handle;
+
+#include "ser_test_protocol.inl"
+
+//---------------------------------------------------------------------------
+// Serial test main function.
+void
+serial_test( void )
+{
+ cyg_io_handle_t ser_handle;
+
+ test_open_ser(&ser_handle);
+
+ // We need the filter for this test.
+ test_ping(ser_handle);
+
+ // Test multiple configurations (defined in the protocol file).
+ // FIXME: This will get replaced with a test over the full configuration
+ // permutation space.
+ {
+ int i;
+ int count = sizeof(test_configs) / sizeof(cyg_ser_cfg_t);
+ char msg[] = "This is a test\n";
+ cyg_uint32 msglen = strlen(msg);
+
+ for (i = 0; i < count; i++){
+ if (ENOERR == change_config(ser_handle, &test_configs[i])) {
+ test_binary(ser_handle, 128, MODE_EOP_ECHO);
+ test_binary(ser_handle, 256, MODE_NO_ECHO);
+ Tcyg_io_write(ser_handle, msg, &msglen);
+ }
+ }
+ }
+
+ CYG_TEST_PASS_FINISH("serial4 test OK");
+}
+
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ cyg_thread_create(10, // Priority - just a number
+ (cyg_thread_entry_t*)serial_test, // entry
+ 0, //
+ "serial_thread", // Name
+ &stack[0], // Stack
+ CYGNUM_HAL_STACK_SIZE_TYPICAL, // Size
+ &thread_handle, // Handle
+ &thread_data // Thread data structure
+ );
+ cyg_thread_resume(thread_handle);
+ cyg_scheduler_start();
+}
+
+#else // CYGFUN_KERNEL_API_C
+#define N_A_MSG "Needs kernel C API"
+#endif
+
+#else // CYGPKG_IO_SERIAL && CYGPKG_KERNEL
+#define N_A_MSG "Needs IO/serial and Kernel"
+#endif
+
+#ifdef N_A_MSG
+void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG);
+}
+#endif // N_A_MSG
+
+// EOF serial4.c
diff --git a/cesar/ecos/packages/io/serial/current/tests/serial5.c b/cesar/ecos/packages/io/serial/current/tests/serial5.c
new file mode 100644
index 0000000000..18bdab5bdd
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/tests/serial5.c
@@ -0,0 +1,148 @@
+//==========================================================================
+//
+// serial5.c
+//
+// Test data duplex receive and send.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov
+// Date: 1999-03-19
+// Description: Test the duplex receive and send capabilities of
+// the serial driver.
+// Requirements: This test requires the ser_filter on the host side.
+//####DESCRIPTIONEND####
+
+#include <pkgconf/system.h>
+
+#include <cyg/infra/testcase.h> // test macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+// Package requirements
+#if defined(CYGPKG_IO_SERIAL) && defined(CYGPKG_KERNEL)
+
+#include <pkgconf/kernel.h>
+
+// Package option requirements
+#if defined(CYGFUN_KERNEL_API_C)
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+#include <cyg/kernel/kapi.h>
+unsigned char stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+cyg_thread thread_data;
+cyg_handle_t thread_handle;
+
+#include "ser_test_protocol.inl"
+
+//---------------------------------------------------------------------------
+// Serial test main function.
+void
+serial_test( void )
+{
+ cyg_io_handle_t ser_handle;
+
+ test_open_ser(&ser_handle);
+
+ // We need the filter for this test.
+ test_ping(ser_handle);
+
+
+#if (CYGINT_IO_SERIAL_TEST_SKIP_38400 > 0)
+ {
+ // The board is too slow to run the driver in interrupt mode
+ // at the default 38400 baud when doing this test, so run it
+ // at a slower rate.
+ cyg_ser_cfg_t slow_cfg = {
+ CYGNUM_SERIAL_BAUD_19200, CYGNUM_SERIAL_WORD_LENGTH_8,
+ CYGNUM_SERIAL_STOP_1, CYGNUM_SERIAL_PARITY_NONE,
+ CYGNUM_SERIAL_FLOW_NONE };
+
+ CYG_TEST_INFO("Reducing baud rate to 19200");
+ change_config(ser_handle, &slow_cfg);
+ }
+#endif
+
+ // Start out slow, then go for many tests. Each cycle causes
+ // 512 bytes to be sent over the wire.
+ test_binary(ser_handle, 1, MODE_DUPLEX_ECHO);
+ test_binary(ser_handle, 2, MODE_DUPLEX_ECHO);
+ test_binary(ser_handle, 5, MODE_DUPLEX_ECHO);
+
+#if 0 // Disable these until the ser_filter produces status output.
+ test_binary(ser_handle, 128, MODE_DUPLEX_ECHO);
+ test_binary(ser_handle, 512, MODE_DUPLEX_ECHO);
+ test_binary(ser_handle, 1024, MODE_DUPLEX_ECHO);
+#endif
+
+ CYG_TEST_PASS_FINISH("serial5 test OK");
+}
+
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ cyg_thread_create(10, // Priority - just a number
+ (cyg_thread_entry_t*)serial_test, // entry
+ 0, //
+ "serial_thread", // Name
+ &stack[0], // Stack
+ CYGNUM_HAL_STACK_SIZE_TYPICAL, // Size
+ &thread_handle, // Handle
+ &thread_data // Thread data structure
+ );
+ cyg_thread_resume(thread_handle);
+ cyg_scheduler_start();
+}
+
+#else // CYGFUN_KERNEL_API_C
+#define N_A_MSG "Needs kernel C API"
+#endif
+
+#else // CYGPKG_IO_SERIAL && CYGPKG_KERNEL
+#define N_A_MSG "Needs IO/serial and Kernel"
+#endif
+
+#ifdef N_A_MSG
+void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG);
+}
+#endif // N_A_MSG
+// EOF serial5.c
diff --git a/cesar/ecos/packages/io/serial/current/tests/serial_echo.c b/cesar/ecos/packages/io/serial/current/tests/serial_echo.c
new file mode 100644
index 0000000000..e51f857a0e
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/tests/serial_echo.c
@@ -0,0 +1,127 @@
+//==========================================================================
+//
+// serial_echo.c
+//
+// Simple interactive echo test.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov
+// Date: 2000-04-11
+// Description: Simple echo test.
+//
+//####DESCRIPTIONEND####
+
+#include <pkgconf/system.h>
+
+#include <cyg/infra/testcase.h> // test macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+// Package requirements
+#if defined(CYGPKG_IO_SERIAL) && defined(CYGPKG_KERNEL)
+
+#include <pkgconf/kernel.h>
+
+// Package option requirements
+#if defined(CYGFUN_KERNEL_API_C)
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+#include <cyg/kernel/kapi.h>
+unsigned char stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+cyg_thread thread_data;
+cyg_handle_t thread_handle;
+
+#include "ser_test_protocol.inl"
+
+//---------------------------------------------------------------------------
+// Serial test main function.
+void
+serial_test( void )
+{
+ cyg_io_handle_t ser_handle;
+ cyg_uint8 in_buffer[1];
+ unsigned int len = 1;
+
+ test_open_ser(&ser_handle);
+
+ CYG_TEST_INFO("Kill GDB and open a terminal emulator.");
+ CYG_TEST_INFO("This test will echo all data.");
+
+ while (1) {
+ len = 1;
+ Tcyg_io_read(ser_handle, in_buffer, &len);
+ len = 1;
+ Tcyg_io_write(ser_handle, in_buffer, &len);
+ }
+
+}
+
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ cyg_thread_create(10, // Priority - just a number
+ (cyg_thread_entry_t*)serial_test, // entry
+ 0, //
+ "serial_thread", // Name
+ &stack[0], // Stack
+ CYGNUM_HAL_STACK_SIZE_TYPICAL, // Size
+ &thread_handle, // Handle
+ &thread_data // Thread data structure
+ );
+ cyg_thread_resume(thread_handle);
+ cyg_scheduler_start();
+}
+
+#else // CYGFUN_KERNEL_API_C
+#define N_A_MSG "Needs kernel C API"
+#endif
+
+#else // CYGPKG_IO_SERIAL && CYGPKG_KERNEL
+#define N_A_MSG "Needs IO/serial and Kernel"
+#endif
+
+#ifdef N_A_MSG
+void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG);
+}
+#endif // N_A_MSG
+// EOF serial3.c
diff --git a/cesar/ecos/packages/io/serial/current/tests/timeout.inl b/cesar/ecos/packages/io/serial/current/tests/timeout.inl
new file mode 100644
index 0000000000..25a70d8cf5
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/tests/timeout.inl
@@ -0,0 +1,143 @@
+#ifndef CYGONCE_IO_SERIAL_MISC_TIMEOUT_INL
+#define CYGONCE_IO_SERIAL_MISC_TIMEOUT_INL
+//==========================================================================
+//
+// timeout.inl
+//
+// Simple timeout support for serial I/O testing.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1999-02-05
+// Description: Simple timeout functions
+//####DESCRIPTIONEND####
+
+// Timeout support
+
+typedef void (timeout_fun)(void *);
+#ifndef NTIMEOUTS
+#define NTIMEOUTS 8
+#endif
+typedef struct {
+ cyg_int32 delta; // Number of "ticks" in the future for this timeout
+ timeout_fun *fun; // Function to execute when it expires
+ void *arg; // Argument to pass when it does
+} timeout_entry;
+static timeout_entry timeouts[NTIMEOUTS];
+static cyg_handle_t timeout_alarm_handle;
+static cyg_alarm timeout_alarm;
+static cyg_int32 last_delta;
+
+static void
+do_timeout(cyg_handle_t alarm, cyg_addrword_t data)
+{
+ int i;
+ cyg_int32 min_delta;
+ timeout_entry *e = timeouts;
+ min_delta = 0x7FFFFFFF; // Maxint
+ for (i = 0; i < NTIMEOUTS; i++, e++) {
+ if (e->delta) {
+ e->delta -= last_delta;
+ if (e->delta == 0) {
+ // Time for this item to 'fire'
+ (e->fun)(e->arg);
+ } else {
+ if (e->delta < min_delta) min_delta = e->delta;
+ }
+ }
+ }
+ if (min_delta != 0x7FFFFFFF) {
+ // Still something to do, schedule it
+ cyg_alarm_initialize(timeout_alarm_handle, cyg_current_time()+min_delta, 0);
+ last_delta = min_delta;
+ }
+}
+
+static cyg_uint32
+timeout(cyg_int32 delta, timeout_fun *fun, void *arg)
+{
+ int i;
+ cyg_int32 min_delta;
+ static bool init = false;
+ timeout_entry *e = timeouts;
+ cyg_uint32 stamp;
+ if (!init) {
+ cyg_handle_t h;
+ cyg_clock_to_counter(cyg_real_time_clock(), &h);
+ cyg_alarm_create(h, do_timeout, 0, &timeout_alarm_handle, &timeout_alarm);
+ init = true;
+ }
+ stamp = 0; // Assume no slots available
+ for (i = 0; i < NTIMEOUTS; i++, e++) {
+ if ((e->delta == 0) && (e->fun == 0)) {
+ // Free entry
+ e->delta = delta;
+ e->fun = fun;
+ e->arg = arg;
+ stamp = (cyg_uint32)e;
+ break;
+ }
+ }
+ e = timeouts;
+ min_delta = 0x7FFFFFFF;
+ for (i = 0; i < NTIMEOUTS; i++, e++) {
+ if (e->delta && (e->delta < min_delta)) min_delta = e->delta;
+ }
+ if (min_delta != 0x7FFFFFFF) {
+ // Still something to do, schedule it
+ cyg_alarm_initialize(timeout_alarm_handle, cyg_current_time()+min_delta, 0);
+ last_delta = min_delta;
+ }
+ return stamp;
+}
+
+static void
+untimeout(cyg_uint32 stamp)
+{
+ if (stamp != 0) {
+ timeout_entry *e = (timeout_entry *)stamp;
+ if (e->fun != 0) {
+ e->delta = 0;
+ e->fun = 0;
+ e->arg = 0;
+ }
+ }
+}
+
+#endif // CYGONCE_IO_SERIAL_MISC_TIMEOUT_INL
diff --git a/cesar/ecos/packages/io/serial/current/tests/tty1.c b/cesar/ecos/packages/io/serial/current/tests/tty1.c
new file mode 100644
index 0000000000..f7c275ed8d
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/tests/tty1.c
@@ -0,0 +1,163 @@
+//==========================================================================
+//
+// tty.c
+//
+// Test TTY driver API
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov
+// Date: 1999-04-08
+// Description: Test the TTY driver API.
+//
+//####DESCRIPTIONEND####
+
+#include <pkgconf/system.h>
+
+#include <cyg/infra/testcase.h> // test macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+// Package requirements
+#if defined(CYGPKG_IO_SERIAL) && defined(CYGPKG_KERNEL)
+
+#include <pkgconf/kernel.h>
+
+// Package option requirements
+#if defined(CYGFUN_KERNEL_API_C)
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+#include <cyg/kernel/kapi.h>
+unsigned char stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+cyg_thread thread_data;
+cyg_handle_t thread_handle;
+
+#include "ser_test_protocol.inl"
+
+//---------------------------------------------------------------------------
+// TTY test main function.
+
+
+void
+tty_api_test(cyg_io_handle_t* handle)
+{
+ int res;
+ cyg_uint32 len;
+ unsigned char buffer[16];
+
+ // Always return...
+ if (handle)
+ return;
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+
+ // read & write
+ res = cyg_io_read(handle, &buffer[0], &len);
+ res = cyg_io_write(handle, &buffer[0], &len);
+
+ // cyg_io_get_config
+ // TTY layer
+ cyg_io_get_config(handle,
+ CYG_IO_GET_CONFIG_TTY_INFO, &buffer[0], &len);
+ // Call-throughs to serial layer.
+ cyg_io_get_config(handle,
+ CYG_IO_GET_CONFIG_SERIAL_INFO, &buffer[0], &len);
+ cyg_io_get_config(handle,
+ CYG_IO_GET_CONFIG_SERIAL_OUTPUT_DRAIN, &buffer[0], &len);
+ cyg_io_get_config(handle,
+ CYG_IO_GET_CONFIG_SERIAL_INPUT_FLUSH, &buffer[0], &len);
+ cyg_io_get_config(handle,
+ CYG_IO_GET_CONFIG_SERIAL_ABORT, &buffer[0], &len);
+ cyg_io_get_config(handle,
+ CYG_IO_GET_CONFIG_SERIAL_OUTPUT_FLUSH, &buffer[0], &len);
+
+ // cyg_io_set_config
+ // TTY layer.
+ cyg_io_set_config(handle,
+ CYG_IO_SET_CONFIG_TTY_INFO, &buffer[0], &len);
+ // Call-throughs to serial layer.
+ cyg_io_set_config(handle,
+ CYG_IO_SET_CONFIG_SERIAL_INFO, &buffer[0], &len);
+}
+
+
+void
+tty_test( void )
+{
+ cyg_io_handle_t tty_handle;
+
+ test_open_tty(&tty_handle);
+
+ tty_api_test(&tty_handle);
+
+ CYG_TEST_PASS_FINISH("tty1 test OK");
+}
+
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ cyg_thread_create(10, // Priority - just a number
+ (cyg_thread_entry_t*)tty_test, // entry
+ 0, //
+ "tty_thread", // Name
+ &stack[0], // Stack
+ CYGNUM_HAL_STACK_SIZE_TYPICAL, // Size
+ &thread_handle, // Handle
+ &thread_data // Thread data structure
+ );
+ cyg_thread_resume(thread_handle);
+ cyg_scheduler_start();
+}
+
+#else // CYGFUN_KERNEL_API_C
+#define N_A_MSG "Needs kernel C API"
+#endif
+
+#else // CYGPKG_IO_SERIAL && CYGPKG_KERNEL
+#define N_A_MSG "Needs IO/serial and Kernel"
+#endif
+
+#ifdef N_A_MSG
+void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG);
+}
+#endif // N_A_MSG
+// EOF tty1.c
diff --git a/cesar/ecos/packages/io/serial/current/tests/tty2.c b/cesar/ecos/packages/io/serial/current/tests/tty2.c
new file mode 100644
index 0000000000..d86344454e
--- /dev/null
+++ b/cesar/ecos/packages/io/serial/current/tests/tty2.c
@@ -0,0 +1,128 @@
+//==========================================================================
+//
+// tty2.c
+//
+// Test simple string output.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov
+// Date: 1999-03-17
+// Description: Test simple string output.
+//
+//####DESCRIPTIONEND####
+
+#include <pkgconf/system.h>
+
+#include <cyg/infra/testcase.h> // test macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+// Package requirements
+#if defined(CYGPKG_IO_SERIAL) && defined(CYGPKG_KERNEL)
+
+#include <pkgconf/kernel.h>
+
+// Package option requirements
+#if defined(CYGFUN_KERNEL_API_C)
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+#include <cyg/kernel/kapi.h>
+unsigned char stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+cyg_thread thread_data;
+cyg_handle_t thread_handle;
+
+#include "ser_test_protocol.inl"
+
+//---------------------------------------------------------------------------
+// TTY test main function.
+void
+tty_test( void )
+{
+ char test_msg1[]="This is a test message!\n";
+ char test_msg2[]="$O5468697320697320612074657374206d657373616765210d0a#12";
+ cyg_uint32 msglen;
+ cyg_io_handle_t tty_handle;
+
+ test_open_tty(&tty_handle);
+
+ CYG_TEST_INFO("Writing a raw string to the TTY device...");
+ msglen = strlen(&test_msg1[0]);
+ Tcyg_io_write(tty_handle, &test_msg1[0], &msglen);
+
+ CYG_TEST_INFO("Writing a GDB encoded string to the TTY device...");
+ msglen = strlen(&test_msg2[0]);
+ Tcyg_io_write(tty_handle, &test_msg2[0], &msglen);
+
+ CYG_TEST_PASS_FINISH("tty2 test OK");
+}
+
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ cyg_thread_create(10, // Priority - just a number
+ (cyg_thread_entry_t*)tty_test, // entry
+ 0, //
+ "tty_thread", // Name
+ &stack[0], // Stack
+ CYGNUM_HAL_STACK_SIZE_TYPICAL, // Size
+ &thread_handle, // Handle
+ &thread_data // Thread data structure
+ );
+ cyg_thread_resume(thread_handle);
+ cyg_scheduler_start();
+}
+
+
+#else // CYGFUN_KERNEL_API_C
+#define N_A_MSG "Needs kernel C API"
+#endif
+
+#else // CYGPKG_IO_SERIAL && CYGPKG_KERNEL
+#define N_A_MSG "Needs IO/serial and Kernel"
+#endif
+
+#ifdef N_A_MSG
+void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG);
+}
+#endif // N_A_MSG
+// EOF tty2.c
diff --git a/cesar/ecos/packages/io/usb/common/current/ChangeLog b/cesar/ecos/packages/io/usb/common/current/ChangeLog
new file mode 100644
index 0000000000..2c14cc0717
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/common/current/ChangeLog
@@ -0,0 +1,47 @@
+2001-01-25 Bart Veer <bartv@redhat.com>
+
+ * cdl/usb.cdl:
+ Correctly parent below CYGPKG_IO
+
+2000-11-22 Bart Veer <bartv@redhat.com>
+
+ * include/usb.h: Fix nested #include protection.
+
+2000-11-21 Bart Veer <bartv@redhat.com>
+
+ * First check-in of eCos USB support.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/io/usb/common/current/cdl/usb.cdl b/cesar/ecos/packages/io/usb/common/current/cdl/usb.cdl
new file mode 100644
index 0000000000..e63fb7d34c
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/common/current/cdl/usb.cdl
@@ -0,0 +1,63 @@
+# ====================================================================
+#
+# usb.cdl
+#
+# USB support
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Original data: bartv
+# Contributors:
+# Date: 2000-10-04
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_IO_USB {
+ display "USB Support"
+ include_dir "cyg/io/usb"
+ parent CYGPKG_IO
+
+ cdl_interface CYGHWR_IO_USB_HOST {
+ display "Availability of USB host-side hardware"
+ }
+ cdl_interface CYGHWR_IO_USB_SLAVE {
+ display "Availability of USB slave-side hardware"
+ }
+}
diff --git a/cesar/ecos/packages/io/usb/common/current/include/usb.h b/cesar/ecos/packages/io/usb/common/current/include/usb.h
new file mode 100644
index 0000000000..f51b78cc68
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/common/current/include/usb.h
@@ -0,0 +1,249 @@
+#ifndef CYGONCE_USB_H
+# define CYGONCE_USB_H
+//==========================================================================
+//
+// include/usb.h
+//
+// Data common to USB host and USB slave
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 2000-10-04
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// USB device requests, the setup packet.
+//
+// The structure is defined entirely in terms of bytes, eliminating
+// any confusion about who is supposed to swap what when. This avoids
+// endianness-related portability problems, and eliminates any need
+// to worry about alignment. Also for some requests the value field
+// is split into separate bytes anyway.
+typedef struct usb_devreq {
+ unsigned char type;
+ unsigned char request;
+ unsigned char value_lo;
+ unsigned char value_hi;
+ unsigned char index_lo;
+ unsigned char index_hi;
+ unsigned char length_lo;
+ unsigned char length_hi;
+} usb_devreq __attribute__((packed));
+
+// Encoding of the request_type
+#define USB_DEVREQ_DIRECTION_OUT 0
+#define USB_DEVREQ_DIRECTION_IN (1 << 7)
+#define USB_DEVREQ_DIRECTION_MASK (1 << 7)
+
+#define USB_DEVREQ_TYPE_STANDARD 0
+#define USB_DEVREQ_TYPE_CLASS (0x1 << 5)
+#define USB_DEVREQ_TYPE_VENDOR (0x2 << 5)
+#define USB_DEVREQ_TYPE_RESERVED (0x3 << 5)
+#define USB_DEVREQ_TYPE_MASK (0x3 << 5)
+
+#define USB_DEVREQ_RECIPIENT_DEVICE 0x00
+#define USB_DEVREQ_RECIPIENT_INTERFACE 0x01
+#define USB_DEVREQ_RECIPIENT_ENDPOINT 0x02
+#define USB_DEVREQ_RECIPIENT_OTHER 0x03
+#define USB_DEVREQ_RECIPIENT_MASK 0x1F
+
+// The standard request codes.
+#define USB_DEVREQ_GET_STATUS 0
+#define USB_DEVREQ_CLEAR_FEATURE 1
+#define USB_DEVREQ_SET_FEATURE 3
+#define USB_DEVREQ_SET_ADDRESS 5
+#define USB_DEVREQ_GET_DESCRIPTOR 6
+#define USB_DEVREQ_SET_DESCRIPTOR 7
+#define USB_DEVREQ_GET_CONFIGURATION 8
+#define USB_DEVREQ_SET_CONFIGURATION 9
+#define USB_DEVREQ_GET_INTERFACE 10
+#define USB_DEVREQ_SET_INTERFACE 11
+#define USB_DEVREQ_SYNCH_FRAME 12
+
+// Descriptor types. These are placed in value_hi for the
+// GET_DESCRIPTOR and SET_DESCRIPTOR requests, with an index
+// in value_lo. They also go into the type fields of the
+// various descriptor structures.
+#define USB_DEVREQ_DESCRIPTOR_TYPE_DEVICE 1
+#define USB_DEVREQ_DESCRIPTOR_TYPE_CONFIGURATION 2
+#define USB_DEVREQ_DESCRIPTOR_TYPE_STRING 3
+#define USB_DEVREQ_DESCRIPTOR_TYPE_INTERFACE 4
+#define USB_DEVREQ_DESCRIPTOR_TYPE_ENDPOINT 5
+
+// Feature selectors. These go into value_lo for the CLEAR_FEATURE and
+// SET_FEATURE requests, and in the first response byte for
+// GET_STATUS.
+#define USB_DEVREQ_FEATURE_DEVICE_REMOTE_WAKEUP 1
+#define USB_DEVREQ_FEATURE_ENDPOINT_HALT 0
+
+// Index decoding. When the CLEAR_FEATURE, SET_FEATURE and GET_STATUS
+// requests is applied to an endpoint (as per the recipient field in
+// the type field) index_lo identifies the endpoint.
+#define USB_DEVREQ_INDEX_DIRECTION_OUT 0
+#define USB_DEVREQ_INDEX_DIRECTION_IN (1 << 7)
+#define USB_DEVREQ_INDEX_DIRECTION_MASK (1 << 7)
+#define USB_DEVREQ_INDEX_ENDPOINT_MASK 0x0F
+
+// Descriptors for the GET_DESCRIPTOR and SET_DESCRIPTOR requests.
+typedef struct usb_device_descriptor {
+ unsigned char length; // USB_DEVICE_DESCRIPTOR_LENGTH == 18
+ unsigned char type; // USB_DEVREQ_DESCRIPTOR_TYPE
+ unsigned char usb_spec_lo;
+ unsigned char usb_spec_hi;
+ unsigned char device_class;
+ unsigned char device_subclass;
+ unsigned char device_protocol;
+ unsigned char max_packet_size;
+ unsigned char vendor_lo;
+ unsigned char vendor_hi;
+ unsigned char product_lo;
+ unsigned char product_hi;
+ unsigned char device_lo;
+ unsigned char device_hi;
+ unsigned char manufacturer_str;
+ unsigned char product_str;
+ unsigned char serial_number_str;
+ unsigned char number_configurations;
+} usb_device_descriptor __attribute__((packed));
+
+#define USB_DEVICE_DESCRIPTOR_LENGTH 18
+#define USB_DEVICE_DESCRIPTOR_TYPE USB_DEVREQ_DESCRIPTOR_TYPE_DEVICE
+#define USB_DEVICE_DESCRIPTOR_USB11_LO 0x10
+#define USB_DEVICE_DESCRIPTOR_USB11_HI 0x01
+
+#define USB_DEVICE_DESCRIPTOR_CLASS_INTERFACE 0x00
+#define USB_DEVICE_DESCRIPTOR_CLASS_VENDOR 0x00FF
+#define USB_DEVICE_DESCRIPTOR_SUBCLASS_INTERFACE 0x00
+#define USB_DEVICE_DESCRIPTOR_SUBCLASS_VENDOR 0x00FF
+#define USB_DEVICE_DESCRIPTOR_PROTOCOL_INTERFACE 0x00
+#define USB_DEVICE_DESCRIPTOR_PROTOCOL_VENDOR 0x00FF
+
+typedef struct usb_configuration_descriptor {
+ unsigned char length;
+ unsigned char type;
+ unsigned char total_length_lo;
+ unsigned char total_length_hi;
+ unsigned char number_interfaces;
+ unsigned char configuration_id;
+ unsigned char configuration_str;
+ unsigned char attributes;
+ unsigned char max_power;
+} usb_configuration_descriptor __attribute__((packed));
+
+#define USB_CONFIGURATION_DESCRIPTOR_LENGTH 9
+#define USB_CONFIGURATION_DESCRIPTOR_TYPE USB_DEVREQ_DESCRIPTOR_TYPE_CONFIGURATION
+#define USB_CONFIGURATION_DESCRIPTOR_ATTR_REQUIRED (1 << 7)
+#define USB_CONFIGURATION_DESCRIPTOR_ATTR_SELF_POWERED (1 << 6)
+#define USB_CONFIGURATION_DESCRIPTOR_ATTR_REMOTE_WAKEUP (1 << 5)
+
+typedef struct usb_interface_descriptor {
+ unsigned char length;
+ unsigned char type;
+ unsigned char interface_id;
+ unsigned char alternate_setting;
+ unsigned char number_endpoints;
+ unsigned char interface_class;
+ unsigned char interface_subclass;
+ unsigned char interface_protocol;
+ unsigned char interface_str;
+} usb_interface_descriptor __attribute__((packed));
+
+#define USB_INTERFACE_DESCRIPTOR_LENGTH 9
+#define USB_INTERFACE_DESCRIPTOR_TYPE USB_DEVREQ_DESCRIPTOR_TYPE_INTERFACE
+#define USB_INTERFACE_DESCRIPTOR_CLASS_VENDOR 0x00FF
+#define USB_INTERFACE_DESCRIPTOR_SUBCLASS_VENDOR 0x00FF
+#define USB_INTERFACE_DESCRIPTOR_PROTOCOL_VENDOR 0x00FF
+
+typedef struct usb_endpoint_descriptor {
+ unsigned char length;
+ unsigned char type;
+ unsigned char endpoint;
+ unsigned char attributes;
+ unsigned char max_packet_lo;
+ unsigned char max_packet_hi;
+ unsigned char interval;
+} usb_endpoint_descriptor;
+
+#define USB_ENDPOINT_DESCRIPTOR_LENGTH 7
+#define USB_ENDPOINT_DESCRIPTOR_TYPE USB_DEVREQ_DESCRIPTOR_TYPE_ENDPOINT
+#define USB_ENDPOINT_DESCRIPTOR_ENDPOINT_OUT 0
+#define USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN (1 << 7)
+#define USB_ENDPOINT_DESCRIPTOR_ATTR_CONTROL 0x00
+#define USB_ENDPOINT_DESCRIPTOR_ATTR_ISOCHRONOUS 0x01
+#define USB_ENDPOINT_DESCRIPTOR_ATTR_BULK 0x02
+#define USB_ENDPOINT_DESCRIPTOR_ATTR_INTERRUPT 0x03
+
+// String descriptors. If these are used at all then string 0
+// must be a table of supported LANGID codes. For a simple device
+// which only supports US English, the following sequence of
+// four bytes should suffice for string 0. In practice string
+// constants tend to be used which makes the use of these
+// #define's difficult.
+#define USB_STRING_DESCRIPTOR_STRING0_LENGTH 4
+#define USB_STRING_DESCRIPTOR_STRING0_TYPE USB_DEVREQ_DESCRIPTOR_TYPE_STRING
+#define USB_STRING_DESCRIPTOR_STRING0_LANGID_LO 0x09
+#define USB_STRING_DESCRIPTOR_STRING0_LANGID_HI 0x04
+
+// For subsequent strings the length and data will have to be
+// determined by the application developer or by a suitable tool.
+#define USB_STRING_DESCRIPTOR_TYPE USB_DEVREQ_DESCRIPTOR_TYPE_STRING
+
+// Utility macros to calculate the total_length fields in a
+// configuration descriptor.
+#define USB_CONFIGURATION_DESCRIPTOR_TOTAL_LENGTH_LO(interfaces, endpoints) \
+ (USB_CONFIGURATION_DESCRIPTOR_LENGTH + \
+ (interfaces * USB_INTERFACE_DESCRIPTOR_LENGTH) + \
+ (endpoints * USB_ENDPOINT_DESCRIPTOR_LENGTH)) % 256
+
+#define USB_CONFIGURATION_DESCRIPTOR_TOTAL_LENGTH_HI(interfaces, endpoints) \
+ (USB_CONFIGURATION_DESCRIPTOR_LENGTH + \
+ (interfaces * USB_INTERFACE_DESCRIPTOR_LENGTH) + \
+ (endpoints * USB_ENDPOINT_DESCRIPTOR_LENGTH)) / 256
+
+#ifdef __cplusplus
+} // extern "C" {
+#endif
+
+#endif // CYGONCE_USB_H
+
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/ChangeLog b/cesar/ecos/packages/io/usb/eth/slave/current/ChangeLog
new file mode 100644
index 0000000000..21788ad7a1
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/ChangeLog
@@ -0,0 +1,166 @@
+2003-06-27 Manu Sharma <manu.sharma@ascom.ch>
+
+ * src/usbsethdrv.c (usbs_ethdrv_ioctl): Return 0 when we handle
+ ETH_DRV_GET_IF_STATS* otherwise the caller thinks we don't support
+ these ioctl calls.
+
+2003-03-23 Iztok Zupet <iz@vsr.si>
+
+ * doc/usbseth.sgml: Remove .eps and .gif and introduce .png for
+ for PDF output.
+ * doc/simple.gif, doc/tcpip.gif: Delete.
+ * doc/simple.png, doc/tcpip.png: New files to replace GIFs.
+
+2003-04-19 Bart Veer <bartv@ecoscentric.com>
+
+ * cdl/usbs_eth.cdl: Add per-package compiler flag support and
+ default to -D_KERNEL and -D__ECOS for use with the new network
+ stack.
+
+2003-04-17 Bart Veer <bartv@ecoscentric.com>
+
+ * doc/usbseth.sgml: Fix typo reported by Patrick Doyle
+
+2003-02-25 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/usbseth.sgml: Declare as <part> not <reference> to get
+ correct TOC numbering.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/usbs_eth.cdl: Fix doc link.
+
+ * doc/usbseth.sgml: Comment out DOCTYPE for now to allow building
+ with standard doc build.
+
+2002-07-26 David Smith <dsmith@redhat.com>
+
+ * host/ecos_usbeth.c (ecos_usbeth_probe):
+ Two changes to the code that checks to see if this is the correct
+ driver for the USB peripheral that was just loaded. Fixed a bug
+ that was comparing the product id of the peripheral to the vendor
+ id. Supports multiple implementations (vendor id/product id sets)
+ so that the same driver could be used for several devices.
+
+2001-07-10 Bart Veer <bartv@redhat.com>
+
+ * doc/usbseth.sgml, doc/*.html:
+ Document the below changes.
+
+ * cdl/usbs_eth.cdl:
+ The USB-ethernet device now registers itself as either eth0 or
+ eth1 by default, depending on what else is present in the system.
+ Also bootp/dhcp support is prohibited for this network device on
+ the ground that it is rather unlikely that a host will provide
+ a dhcp service for a network device that does not exist until the
+ host-target connection has been fully established.
+
+
+2001-07-02 Bart Veer <bartv@redhat.com>
+
+ * host/ecos_usbeth.c (ecos_usbeth_probe):
+ Determine the endpoints to use for transmits and receives
+ from the descriptors supplied by the device.
+
+2001-06-28 Bart Veer <bartv@redhat.com>
+
+ * include/usbs_eth.h, src/usbsethdrv.c, src/usbseth.c:
+ Align receive boundaries to cacheline boundaries, and
+ always transfer a multiple of the cacheline size. This
+ avoids problems with some USB device drivers.
+
+2001-05-21 Bart Veer <bartv@redhat.com>
+
+ * host/ecos_usbeth.c (ecos_usbeth_start_tx):
+ Cope with targets that have problems receiving zero-byte
+ packets.
+
+2001-02-02 Bart Veer <bartv@redhat.com>
+
+ * cdl/usbs_eth.cdl:
+ Add doc property to point at the HTML
+
+ * doc/usbseth.sgml, doc/*.html:
+ Incorporate changes from docs department, regenerate HTML
+
+2001-01-26 Bart Veer <bartv@redhat.com>
+
+ * src/usbsethdrv.c (usbs_ethdrv_ioctl):
+ Change chipset specification to null, since there is no real
+ hardware involved, plus SNMP cleanup.
+
+2001-01-22 Bart Veer <bartv@redhat.com>
+
+ * doc/usbseth.sgml, doc/makefile, doc/simple.fig, doc/tcpip.fig:
+ Added documentation.
+
+2000-12-15 Bart Veer <bartv@redhat.com>
+
+ * src/usbsethdrv.c:
+ Enable poll functions.
+
+2000-11-29 Bart Veer <bartv@redhat.com>
+
+ * host/ecos_usbeth.c:
+ Remove debugging and fix the MTU
+
+2000-11-28 Bart Veer <bartv@redhat.com>
+
+ * cdl/usbs_eth.cdl
+ * include/usbs_eth.h
+ * src/usbseth.c
+ * src/usbsethdrv
+ Clean-up, adding missing functionality such as SNMP support,
+ update to current USB API.
+
+2000-11-24 Bart Veer <bartv@redhat.com>
+
+ * host/ecos_usbeth.c:
+ Ignore runt packets, cope with the confusion between
+ CRC errors and timeouts.
+
+ * include/usbs_eth.h, src/usbseth.c
+ Clean up alignments.
+
+2000-11-22 Bart Veer <bartv@redhat.com>
+
+ * include/usbs_eth.h: Fix nested #include protection
+
+2000-11-21 Bart Veer <bartv@redhat.com>
+
+ * First check-in of eCos USB support.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/cdl/usbs_eth.cdl b/cesar/ecos/packages/io/usb/eth/slave/current/cdl/usbs_eth.cdl
new file mode 100644
index 0000000000..df5bc5ecb1
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/cdl/usbs_eth.cdl
@@ -0,0 +1,153 @@
+# ====================================================================
+#
+# usbs_eth.cdl
+#
+# USB slave-side ethernet package.
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 2003 Bart Veer
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Original data: bartv
+# Contributors:
+# Date: 2000-10-04
+#
+#####DESCRIPTIONEND####
+# ====================================================================
+
+cdl_package CYGPKG_IO_USB_SLAVE_ETH {
+ display "USB slave ethernet support"
+ include_dir "cyg/io/usb"
+ parent CYGPKG_IO_USB_SLAVE
+ requires { CYGHWR_IO_USB_SLAVE_OUT_ENDPOINTS >= 1 }
+ requires { CYGHWR_IO_USB_SLAVE_IN_ENDPOINTS >= 1 }
+ compile usbseth.c
+ implements CYGINT_IO_USB_SLAVE_CLIENTS
+ doc ref/io-usb-slave-eth.html
+
+ description "
+ The USB slave ethernet package supports the development
+ of USB peripherals which provide an ethernet service to
+ the host machine. Such a peripheral could be a simple
+ USB-ethernet converter, or it could be rather more
+ complicated internally."
+
+ cdl_component CYGPKG_USBS_ETHDRV {
+ display "Provide a driver for a TCP/IP stack."
+ requires CYGPKG_IO_ETH_DRIVERS
+ implements CYGHWR_NET_DRIVERS
+ default_value CYGPKG_NET
+ compile -library=libextras.a usbsethdrv.c
+
+ description "
+ The primary purpose of USB slave ethernet support is to provide
+ an ethernet service to the USB host. This is very different
+ from a conventional network driver which provides a service
+ to a TCP/IP stack running inside the peripheral. If this
+ component is enabled then the USB-ethernet code will implement
+ an eCos network driver, thus supporting both a host-side TCP/IP
+ stack and an eCos stack. This raises issues such as enabling
+ the bridge code in the stack, and the package documentation
+ should be consulted for further information."
+
+ cdl_option CYGFUN_USBS_ETHDRV_STATISTICS {
+ display "Maintain traffic statistics"
+ flavor bool
+ default_value CYGPKG_SNMPAGENT
+ description "
+ The USB network device driver can maintain some statistics
+ about traffic, for example the number of incoming and
+ outgoing packets. These statistics are intended mainly
+ for SNMP agent software."
+ }
+
+ cdl_option CYGDAT_USBS_ETHDRV_NAME {
+ display "Name to use for this network device"
+ flavor data
+ default_value { (1 == CYGHWR_NET_DRIVERS) ? "\"eth0\"" : "\"eth1\"" }
+ description "
+ The name of this network device for control purposes.
+ "
+ }
+
+ cdl_option CYGPRI_USBS_ETHDRV_ETH0 {
+ display "Enable/disable generic eth0 configury"
+ flavor bool
+ calculated { "\"eth0\"" == CYGDAT_USBS_ETHDRV_NAME }
+ implements CYGHWR_NET_DRIVER_ETH0
+ requires !CYGHWR_NET_DRIVER_ETH0_BOOTP
+ }
+
+ cdl_option CYGPRI_USBS_ETHDRV_ETH1 {
+ display "Enable/disable generic eth1 configury"
+ flavor bool
+ calculated { "\"eth1\"" == CYGDAT_USBS_ETHDRV_NAME }
+ implements CYGHWR_NET_DRIVER_ETH1
+ requires !CYGHWR_NET_DRIVER_ETH1_BOOTP
+ }
+ }
+
+ cdl_component CYGPKG_IO_USB_SLAVE_ETH_OPTIONS {
+ display "Build options"
+ flavor none
+
+ description "
+ Package-specific build options including control over compiler
+ flags used only in building this package."
+
+ cdl_option CYGPKG_IO_USB_SLAVE_ETH_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "-D_KERNEL -D__ECOS" }
+ description "
+ This option modifies the set of compiler flags for
+ building this package. These flags are used in addition
+ to the set of global flags."
+ }
+ cdl_option CYGPKG_IO_USB_SLAVE_ETH_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building this package. These flags are removed from
+ the set of global flags if present."
+ }
+ }
+}
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/doc/io-usb-slave-eth.html b/cesar/ecos/packages/io/usb/eth/slave/current/doc/io-usb-slave-eth.html
new file mode 100644
index 0000000000..d428dfc80b
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/doc/io-usb-slave-eth.html
@@ -0,0 +1,168 @@
+<!-- Copyright (C) 2001 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>eCos Support for Developing USB-ethernet Peripherals</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="NEXT"
+TITLE="Introduction"
+HREF="usbseth-intro.html"></HEAD
+><BODY
+CLASS="REFERENCE"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+>&nbsp;</TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbseth-intro.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><DIV
+CLASS="REFERENCE"
+><A
+NAME="IO-USB-SLAVE-ETH"
+></A
+><DIV
+CLASS="TITLEPAGE"
+><H1
+CLASS="TITLE"
+>I. eCos Support for Developing USB-ethernet Peripherals</H1
+><DIV
+CLASS="TOC"
+><DL
+><DT
+><B
+>Table of Contents</B
+></DT
+><DT
+><A
+HREF="usbseth-intro.html"
+>Introduction</A
+> &#8212; eCos support for developing USB ethernet peripherals</DT
+><DT
+><A
+HREF="usbseth-init.html"
+>Initializing the USB-ethernet Package</A
+> &#8212; Initializing the USB-ethernet Package</DT
+><DT
+><A
+HREF="usbseth-data.html"
+>USB-ethernet Data Transfers</A
+> &#8212; Exchanging ethernet packets with the USB host</DT
+><DT
+><A
+HREF="usbseth-control.html"
+>USB-ethernet State Handling</A
+> &#8212; Maintaining the USB-ethernet connection with the host</DT
+><DT
+><A
+HREF="usbseth-netdev.html"
+>Network Device for the eCos TCP/IP Stack</A
+> &#8212; USB-ethernet support for the eCos TCP/IP Stack</DT
+><DT
+><A
+HREF="usbseth-host.html"
+>Example Host-side Device Driver</A
+> &#8212; Provide host-side support for the eCos USB-ethernet package</DT
+><DT
+><A
+HREF="usbseth-protocol.html"
+>Communication Protocol</A
+> &#8212; Protocol used between the host-side device driver and the eCos
+USB-ethernet package </DT
+></DL
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbseth-intro.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Introduction</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/doc/makefile b/cesar/ecos/packages/io/usb/eth/slave/current/doc/makefile
new file mode 100644
index 0000000000..ca5e3ff91c
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/doc/makefile
@@ -0,0 +1,55 @@
+#=============================================================================
+#
+# makefile
+#
+# For building the USB-ethernet package documentation
+#
+#=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#=============================================================================
+#####DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Date: 2001-01-11
+#####DESCRIPTIONEND####
+#=============================================================================
+
+TOPLEVEL := ../../../../../..
+MAIN_SGML := usbseth.sgml
+MAIN_HTML := io-usb-slave-eth.html
+MAIN_PDF := io-usb-slave-eth.pdf
+OTHER_SGML :=
+PICTURES := simple tcpip
+
+include $(TOPLEVEL)/pkgconf/rules.doc
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/doc/simple.fig b/cesar/ecos/packages/io/usb/eth/slave/current/doc/simple.fig
new file mode 100644
index 0000000000..84854b6fe5
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/doc/simple.fig
@@ -0,0 +1,23 @@
+#FIG 3.2
+Portrait
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 600 600 2400 600 2400 2400 600 2400 600 600
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 2400 1500 4200 1500
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 4200 600 6000 600 6000 2400 4200 2400 4200 600
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 6000 1500 6600 1500
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 6600 300 6600 2700
+4 0 0 50 0 0 12 0.0000 4 135 675 3000 1425 USB bus\001
+4 0 0 50 0 0 12 0.0000 4 135 735 1200 1425 USB host\001
+4 0 0 50 0 0 12 0.0000 4 180 1155 4500 1425 USB peripheral\001
+4 0 0 50 0 0 12 0.0000 4 135 945 6150 2925 real network\001
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/doc/simple.png b/cesar/ecos/packages/io/usb/eth/slave/current/doc/simple.png
new file mode 100644
index 0000000000..dd88cad159
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/doc/simple.png
Binary files differ
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/doc/tcpip.fig b/cesar/ecos/packages/io/usb/eth/slave/current/doc/tcpip.fig
new file mode 100644
index 0000000000..fdac29b3b9
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/doc/tcpip.fig
@@ -0,0 +1,33 @@
+#FIG 3.2
+Portrait
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 600 600 2400 600 2400 2400 600 2400 600 600
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 4200 600 6000 600 6000 2400 4200 2400 4200 600
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 6600 300 6600 2700
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 2400 2100 4200 2100
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 1 4
+ 0 0 1.00 60.00 120.00
+ 0 0 1.00 60.00 120.00
+ 1500 1125 1500 1500 4950 1500 4950 1200
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 6000 2100 6600 2100
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 1 3
+ 0 0 1.00 60.00 120.00
+ 0 0 1.00 60.00 120.00
+ 5175 1200 5175 1500 6600 1500
+4 0 0 50 0 0 12 0.0000 4 135 945 6150 2925 real network\001
+4 0 0 50 0 0 12 0.0000 4 135 735 1125 2100 USB host\001
+4 0 0 50 0 0 12 0.0000 4 180 1155 4500 2100 USB peripheral\001
+4 0 0 50 0 0 12 0.0000 4 135 675 2925 1950 USB bus\001
+4 0 0 50 0 0 12 0.0000 4 135 540 1200 1050 TCP/IP\001
+4 0 0 50 0 0 12 0.0000 4 135 540 4800 1050 TCP/IP\001
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/doc/tcpip.png b/cesar/ecos/packages/io/usb/eth/slave/current/doc/tcpip.png
new file mode 100644
index 0000000000..4d3e394f7f
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/doc/tcpip.png
Binary files differ
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-control.html b/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-control.html
new file mode 100644
index 0000000000..86e9079c43
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-control.html
@@ -0,0 +1,309 @@
+<!-- Copyright (C) 2001 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>USB-ethernet State Handling</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos Support for Developing USB-ethernet Peripherals"
+HREF="io-usb-slave-eth.html"><LINK
+REL="PREVIOUS"
+TITLE="USB-ethernet Data Transfers"
+HREF="usbseth-data.html"><LINK
+REL="NEXT"
+TITLE="Network Device for the eCos TCP/IP Stack"
+HREF="usbseth-netdev.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos Support for Developing USB-ethernet Peripherals</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="usbseth-data.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbseth-netdev.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBSETH-CONTROL"
+>USB-ethernet State Handling</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN163"
+></A
+><H2
+>Name</H2
+>USB-ethernet State Handling&nbsp;--&nbsp;Maintaining the USB-ethernet connection with the host</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN166"
+></A
+><H2
+>Synopsis</H2
+><DIV
+CLASS="FUNCSYNOPSIS"
+><A
+NAME="AEN167"
+></A
+><P
+></P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="FUNCSYNOPSISINFO"
+>#include &lt;cyg/io/usb/usbs_eth.h&gt;</PRE
+></TD
+></TR
+></TABLE
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>usbs_control_return usbs_eth_class_control_handler</CODE
+>(usbs_control_endpoint* ep0, void* callback_data);</CODE
+></P
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>void usbs_eth_state_change_handler</CODE
+>(usbs_control_endpoint* ep0, void* callback_data, usbs_state_change change, int old_state);</CODE
+></P
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>void usbs_eth_disable</CODE
+>(usbs_eth* usbseth&#62;);</CODE
+></P
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>void usbs_eth_enable</CODE
+>(usbs_eth* usbseth&#62;);</CODE
+></P
+><P
+></P
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN197"
+></A
+><H2
+>Description</H2
+><P
+>When the USB-ethernet package is initialized by a call to <A
+HREF="usbseth-init.html"
+><TT
+CLASS="FUNCTION"
+>usbs_eth_init</TT
+></A
+> it
+installs <TT
+CLASS="FUNCTION"
+>usbs_eth_state_change_handler</TT
+> to handle
+USB state changes. This allows the package to detect when the
+connection between the host and the peripheral is established or
+broken, resulting in internal calls to
+<TT
+CLASS="FUNCTION"
+>usbs_eth_enable</TT
+> and
+<TT
+CLASS="FUNCTION"
+>usbs_eth_disable</TT
+> respectively. This is
+appropriate if no other code needs to access the USB device. However,
+if there is other code, either other USB-related packages or the
+application itself, that needs to perform I/O over the USB bus, then
+typically the USB-ethernet package should not have exclusive access to
+state change events. Instead, the assumption is that higher-level
+code, typically provided by the application, will install an
+alternative state change handler in the control endpoint data
+structure after the call to <TT
+CLASS="FUNCTION"
+>usbs_eth_init</TT
+>. This
+alternative handler will either chain into
+<TT
+CLASS="FUNCTION"
+>usbs_eth_state_change_handler</TT
+> when appropriate,
+or else it will invoke <TT
+CLASS="FUNCTION"
+>usbs_eth_enable</TT
+> and
+<TT
+CLASS="FUNCTION"
+>usbs_eth_disable</TT
+> directly. For further details of
+state change handlers and control endpoints generally, see the
+documentation for the common USB-slave package.</P
+><P
+>Similarly, <TT
+CLASS="FUNCTION"
+>usbs_eth_init</TT
+> will install
+<TT
+CLASS="FUNCTION"
+>usbs_eth_class_control_handler</TT
+> in the control
+endpoint data structure as the appropriate handler for class-specific
+USB control messages. This code will handle the ethernet-specific
+<A
+HREF="usbseth-protocol.html"
+>control messages </A
+>, for example
+requests by the host to enable or disable promiscuous mode or to
+obtain the MAC address. If the USB device is not shared with any other
+code then this is both necessary and sufficient. However, if other code
+is involved and if that code also needs to process certain control
+messages, higher-level code should install its own handler and chain
+to the USB-ethernet one when appropriate. It should be noted that the
+request code is encoded in just a single byte, so there is a real
+possibility that exactly the same number will be used by different
+protocols for different requests. Any such problems will have to be
+identified and resolved by application developers, and may involve
+modifying the source code for the USB-ethernet package.</P
+><P
+>As an alternative to chaining the state change handler, higher-level
+code can instead call <TT
+CLASS="FUNCTION"
+>usbs_eth_disable</TT
+> and
+<TT
+CLASS="FUNCTION"
+>usbs_eth_enable</TT
+> directly. These functions may
+also be called if the USB-ethernet package should become inactive for
+reasons not related directly to events on the USB bus. The main effect
+of <TT
+CLASS="FUNCTION"
+>usbs_eth_enable</TT
+> is to restart receive
+operations and to allow transmits. The main effect of
+<TT
+CLASS="FUNCTION"
+>usbs_eth_disable</TT
+> is to block further transmits:
+any current receive operations need to be aborted at the USB level,
+for example by halting the appropriate endpoint.</P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="usbseth-data.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave-eth.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbseth-netdev.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>USB-ethernet Data Transfers</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Network Device for the eCos TCP/IP Stack</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-data.html b/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-data.html
new file mode 100644
index 0000000000..f8c2c9781e
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-data.html
@@ -0,0 +1,374 @@
+<!-- Copyright (C) 2001 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>USB-ethernet Data Transfers</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos Support for Developing USB-ethernet Peripherals"
+HREF="io-usb-slave-eth.html"><LINK
+REL="PREVIOUS"
+TITLE="Initializing the USB-ethernet Package"
+HREF="usbseth-init.html"><LINK
+REL="NEXT"
+TITLE="USB-ethernet State Handling"
+HREF="usbseth-control.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos Support for Developing USB-ethernet Peripherals</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="usbseth-init.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbseth-control.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBSETH-DATA"
+>USB-ethernet Data Transfers</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN94"
+></A
+><H2
+>Name</H2
+>USB-ethernet Data Transfers&nbsp;--&nbsp;Exchanging ethernet packets with the USB host</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN97"
+></A
+><H2
+>Synopsis</H2
+><DIV
+CLASS="FUNCSYNOPSIS"
+><A
+NAME="AEN98"
+></A
+><P
+></P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="FUNCSYNOPSISINFO"
+>#include &lt;cyg/io/usb/usbs_eth.h&gt;</PRE
+></TD
+></TR
+></TABLE
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>void usbs_eth_start_rx</CODE
+>(usbs_eth* usbseth, unsigned char* buffer, void (*)(usbs_eth*, void*, int) complete_fn, void* complete_data);</CODE
+></P
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>void usbs_eth_start_tx</CODE
+>(usbs_eth* usbseth, unsigned char* buffer, void (*)(usbs_eth*, void*, int) complete_fn, void* complete_data);</CODE
+></P
+><P
+></P
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN122"
+></A
+><H2
+>Description</H2
+><P
+>The USB-ethernet package provides two main modes of operation. In the
+first mode it provides a <A
+HREF="usbseth-netdev.html"
+>network device
+driver</A
+> for use by a TCP/IP stack running inside the USB
+peripheral. All incoming ethernet packages should be passed up the
+TCP/IP stack, and only the stack will generate outgoing packets. Apart
+from <A
+HREF="usbseth-init.html"
+>initialization</A
+> and possibly
+certain <A
+HREF="usbseth-control.html"
+>control operations</A
+>,
+higher-level code will not interact with the USB-ethernet package
+directly.</P
+><P
+>In the second mode there is no TCP/IP stack running inside the USB
+peripheral. For example, a simple USB-ethernet converter has an
+ethernet chip and a USB port: ethernet packets received by the
+ethernet chip need to be forwarded to the USB host, and ethernet
+packets sent by the USB host need to be sent out of the ethernet chip.
+<TT
+CLASS="FUNCTION"
+>usbs_eth_start_rx</TT
+> and
+<TT
+CLASS="FUNCTION"
+>usbs_eth_start_tx</TT
+> allow for this lower-level
+access to the USB-ethernet package.</P
+><P
+>The two modes of operation are mutually exclusive. If the network
+device driver mode is enabled then application code should communicate
+at the TCP/IP level, and not by using the lower-level functions.
+Instead, it is the network device driver that will make use of these
+functions, and it assumes that it has exclusive access. The package
+does not perform any locking.</P
+><P
+>The transmit and receive functions work in much the same way. The
+first argument identifies the <SPAN
+CLASS="STRUCTNAME"
+>usbs_eth</SPAN
+>
+structure that should be used. For the majority of applications this
+will be <TT
+CLASS="LITERAL"
+>usbs_eth0</TT
+>. The second argument specifies
+the location of the ethernet packet; outgoing for
+<TT
+CLASS="FUNCTION"
+>usbs_eth_start_tx</TT
+> and incoming for
+<TT
+CLASS="FUNCTION"
+>usbs_eth_start_rx</TT
+>. This buffer should correspond
+to the <A
+HREF="usbseth-protocol.html"
+>protocol</A
+>:</P
+><P
+></P
+><OL
+TYPE="1"
+><LI
+><P
+>Outgoing packets can consist of up to 1516 bytes, consisting of a
+two-byte header specific to USB-ethernet followed by a standard
+ethernet frame (a header with 6-byte destination address, 6-byte
+source address and a further two bytes, followed by a payload of
+up to 1500 bytes). The two-byte USB-ethernet header consists simply of
+the size of the ethernet frame, i.e. the size of the rest of the
+packet not including the USB-ethernet header, with the least
+significant byte first.</P
+></LI
+><LI
+><P
+>For incoming packets the supplied buffer should usually be at least
+1516 bytes. There may be special circumstances in which a smaller
+buffer might be safe; for example, if the host-side device driver is
+modified to support only smaller packets. Once the packet has been
+received the buffer will contain a two-byte header specific to
+USB-ethernet, followed by a normal ethernet frame. The header
+gives the size of the ethernet frame, excluding the header, with the
+least significant byte first.</P
+></LI
+></OL
+><P
+>Both <TT
+CLASS="FUNCTION"
+>usbs_eth_start_tx</TT
+> and
+<TT
+CLASS="FUNCTION"
+>usbs_eth_start_rx</TT
+> are asynchronous: the transfer
+is started and, some time later, a completion function will be invoked.
+The third and fourth arguments to both
+<TT
+CLASS="FUNCTION"
+>usbs_eth_start_tx</TT
+> and
+<TT
+CLASS="FUNCTION"
+>usbs_eth_start_rx</TT
+> supply the completion function
+and an argument to that function respectively. The completion function
+will be invoked with three arguments: a pointer to the
+<SPAN
+CLASS="STRUCTNAME"
+>usbs_eth</SPAN
+> data structure, usually
+<TT
+CLASS="LITERAL"
+>usbs_eth0</TT
+>; the supplied completion data ; and a
+return code field. A negative value indicates that an error occurred,
+for example <TT
+CLASS="LITERAL"
+>-EPIPE</TT
+> if the connection between USB
+host and peripheral has been broken, or <TT
+CLASS="LITERAL"
+>-EAGAIN</TT
+> if
+an endpoint has been halted. A positive value indicates the total size
+of the transfer, which should correspond to the size in the
+USB-ethernet header plus an additional two bytes for the header
+itself.</P
+><P
+>If the data transfer is succesful then the completion function will
+typically be invoked in DSR context rather than in thread context,
+although this depends on the implementation of the underlying USB
+device driver. Therefore the completion function is restricted in what
+it can do; in particular, it must not make any calls that will or may
+block such as locking a mutex or allocating memory. The kernel
+documentation should be consulted for more details of DSR's and
+interrupt handling generally. Note that if the transfer finishes
+quickly then the completion function may be invoked before
+<TT
+CLASS="FUNCTION"
+>usbs_eth_start_rx</TT
+> or
+<TT
+CLASS="FUNCTION"
+>usbs_eth_start_tx</TT
+> returns. This is especially
+likely to happen if the current thread is descheduled after starting
+the data transfer but before returning from these functions.</P
+><P
+>For transmit operations, it is possible for
+<TT
+CLASS="FUNCTION"
+>usbs_eth_start_tx</TT
+> to invoke the completion
+function immediately. If there is no current connection between host
+and target then the transmit will fail immediately with
+<TT
+CLASS="LITERAL"
+>-EPIPE</TT
+>. In addition the USB-ethernet package will
+check the destination MAC address and make sure that the ethernet
+frame really is intended for the host: either it must be for the
+address specified in the initialization call <A
+HREF="usbseth-init.html"
+><TT
+CLASS="FUNCTION"
+>usbs_eth_init</TT
+></A
+>, or
+it must be a broadcast packet, or the host must have enabled
+promiscuous mode. </P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="usbseth-init.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave-eth.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbseth-control.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Initializing the USB-ethernet Package</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>USB-ethernet State Handling</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-host.html b/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-host.html
new file mode 100644
index 0000000000..a468ea1522
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-host.html
@@ -0,0 +1,328 @@
+<!-- Copyright (C) 2001 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Example Host-side Device Driver</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos Support for Developing USB-ethernet Peripherals"
+HREF="io-usb-slave-eth.html"><LINK
+REL="PREVIOUS"
+TITLE="Network Device for the eCos TCP/IP Stack"
+HREF="usbseth-netdev.html"><LINK
+REL="NEXT"
+TITLE="Communication Protocol"
+HREF="usbseth-protocol.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos Support for Developing USB-ethernet Peripherals</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="usbseth-netdev.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbseth-protocol.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBSETH-HOST"
+>Example Host-side Device Driver</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN242"
+></A
+><H2
+>Name</H2
+>Example Host-side Device Driver&nbsp;--&nbsp;Provide host-side support for the eCos USB-ethernet package</DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN245"
+></A
+><H2
+>Description</H2
+><P
+>The USB-ethernet package is supplied with a single host-side device
+driver. This driver has been developed against the Linux kernel
+2.2.16-22, as shipped with Red Hat 7. The driver is provided as is and
+should not be considered production quality: for example it only
+checks for a bogus vendor id <TT
+CLASS="LITERAL"
+>0x4242</TT
+> rather than an
+official vendor id supplied by the <A
+HREF="http://www.usb.org/"
+TARGET="_top"
+>USB Implementers Forum</A
+>. Also, if the
+peripheral involves multiple configurations or multiple interfaces, it
+will fail to detect this. However, the driver can be used for simple
+testing and as the basis of a full device driver. Details of the
+protocol used between host and peripheral can be found in the <A
+HREF="usbseth-protocol.html"
+>Communication Protocol</A
+> section.</P
+><P
+>The host-side device driver can be found in the <TT
+CLASS="FILENAME"
+>host</TT
+> subdirectory of the USB-ethernet
+package, specifically the file <TT
+CLASS="FILENAME"
+>ecos_usbeth.c</TT
+>, and
+comes with a <TT
+CLASS="FILENAME"
+>Makefile</TT
+>. Both files may need
+to be modified for specific applications. For example, the vendor id
+table <TT
+CLASS="LITERAL"
+>ecos_usbeth_implementations</TT
+> may need to be
+updated for the specific USB peripheral being built. The
+<TT
+CLASS="FILENAME"
+>Makefile</TT
+> assumes that the Linux kernel sources
+reside in <TT
+CLASS="FILENAME"
+>/usr/src/linux</TT
+>, and
+that the kernel has already been configured and built. Assuming this
+is the case, the device driver can be built simply by invoking
+<B
+CLASS="COMMAND"
+>make</B
+> with no additional arguments. This will result
+in a dynamically loadable kernel module,
+<TT
+CLASS="FILENAME"
+>ecos_usbeth.o</TT
+>, in the current directory.</P
+><DIV
+CLASS="NOTE"
+><BLOCKQUOTE
+CLASS="NOTE"
+><P
+><B
+>Note: </B
+>As normal for Linux kernel builds, the generated files such as
+<TT
+CLASS="FILENAME"
+>ecos_usbeth.o</TT
+> live in the same directory as the
+source tree. This is very different from eCos where the source tree
+(or component repository) is kept separate from any builds. There may
+be problems if the component repository is kept read-only or if it is
+put under source code control. Any such problems can be avoided by
+making a copy of the <TT
+CLASS="FILENAME"
+>host</TT
+>
+subdirectory and building that copy.</P
+></BLOCKQUOTE
+></DIV
+><P
+>Loading the kernel module into the current system requires root
+privileges. If the generic USB support is also a loadable module and
+has not been loaded already, this must happen first:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+># insmod usb-uhci
+Using /lib/modules/2.2.16-22/usb/usb-uhci.o</PRE
+></TD
+></TR
+></TABLE
+><P
+>Depending on the host hardware, the <TT
+CLASS="LITERAL"
+>uhci</TT
+> or
+<TT
+CLASS="LITERAL"
+>usb-ohci</TT
+> modules may be more appropriate. Loading
+the generic USB module will typically result in a number of messages
+to the logfile <TT
+CLASS="FILENAME"
+>/var/log/messages</TT
+>, giving details
+of the specific host-side hardware that has been detected plus any
+hubs. The next step is to load the USB-ethernet module:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+># insmod ecos_usbeth.o</PRE
+></TD
+></TR
+></TABLE
+><P
+>This should result in a number of additional diagnostics in the
+logfile:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+>Apr 1 18:01:08 grumpy kernel: eCos USB-ethernet device driver
+Apr 1 18:01:08 grumpy kernel: usb.c: registered new driver ecos_usbeth</PRE
+></TD
+></TR
+></TABLE
+><P
+>If a suitable USB peripheral is now connected the host will detect
+this, assign an address in the local USB network, obtain enumeration
+data, and find a suitable device driver. Assuming the peripheral and
+device driver agree on the supported vendor ids, the
+<TT
+CLASS="FILENAME"
+>ecos_usbeth.o</TT
+> module will be selected and this
+will be reported in the system log:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+>Apr 1 18:04:12 grumpy kernel: usb.c: USB new device connect, assigned device number 3
+Apr 1 18:04:12 grumpy kernel: eCos-based USB ethernet peripheral active at eth1</PRE
+></TD
+></TR
+></TABLE
+><P
+>What can happen next depends very much on the software that is running
+on top of the USB-ethernet package inside the peripheral. For example,
+if there is a TCP/IP stack then it should be possible to bring up a
+network connection between host and peripheral using
+<B
+CLASS="COMMAND"
+>ifconfig</B
+>.</P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="usbseth-netdev.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave-eth.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbseth-protocol.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Network Device for the eCos TCP/IP Stack</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Communication Protocol</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-init.html b/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-init.html
new file mode 100644
index 0000000000..dce5623efd
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-init.html
@@ -0,0 +1,326 @@
+<!-- Copyright (C) 2001 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Initializing the USB-ethernet Package</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos Support for Developing USB-ethernet Peripherals"
+HREF="io-usb-slave-eth.html"><LINK
+REL="PREVIOUS"
+TITLE="Introduction"
+HREF="usbseth-intro.html"><LINK
+REL="NEXT"
+TITLE="USB-ethernet Data Transfers"
+HREF="usbseth-data.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos Support for Developing USB-ethernet Peripherals</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="usbseth-intro.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbseth-data.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBSETH-INIT"
+>Initializing the USB-ethernet Package</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN47"
+></A
+><H2
+>Name</H2
+><TT
+CLASS="FUNCTION"
+>usbs_eth_init</TT
+>&nbsp;--&nbsp;Initializing the USB-ethernet Package</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN51"
+></A
+><H2
+>Synopsis</H2
+><DIV
+CLASS="FUNCSYNOPSIS"
+><A
+NAME="AEN52"
+></A
+><P
+></P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="FUNCSYNOPSISINFO"
+>#include &lt;cyg/io/usb/usbs_eth.h&gt;</PRE
+></TD
+></TR
+></TABLE
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>void usbs_eth_init</CODE
+>(usbs_eth* usbeth, usbs_control_endpoint* ep0, usbs_rx_endpoint* ep1, usbs_tx_endpoint* ep2, unsigned char* mac_address);</CODE
+></P
+><P
+></P
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN67"
+></A
+><H2
+>Description</H2
+><P
+>The USB-ethernet package is not tied to any specific hardware. It
+requires certain functionality: there must be USB-slave hardware
+supported by a device driver; there must also be two endpoints for
+bulk transfers between host and peripheral, one for each direction;
+there must also be a control endpoint, although of course that is
+implicit with any USB hardware.</P
+><P
+>However, USB-slave hardware may well provide more endpoints than the
+minimum required for ethernet support. Some of those endpoints might
+be used by other packages, while other endpoints might be used
+directly by the application, or might not be needed for the peripheral
+being built. There is also the possibility of a USB peripheral that
+supports multiple configurations, with the ethernet support active in
+only some of those configurations. The USB-ethernet package has no
+knowledge about any of this, so it relies on higher-level code to tell
+it which endpoints should be used and other information. This is the
+purpose of the <TT
+CLASS="FUNCTION"
+>usbs_eth_init</TT
+> function.</P
+><P
+>The first argument identifies the specific
+<SPAN
+CLASS="STRUCTNAME"
+>usbs_eth</SPAN
+> data structure that is affected. It
+is expected that the vast majority of affected applications will only
+provide a single USB-ethernet device to a single host, and the package
+automatically provides a suitable data structure
+<TT
+CLASS="LITERAL"
+>usbs_eth0</TT
+> to support this. If multiple
+<SPAN
+CLASS="STRUCTNAME"
+>usbs_eth</SPAN
+> structures are needed for some
+reason then these need to be instantiated by other code, and each one
+needs to be initialised by a call to
+<TT
+CLASS="FUNCTION"
+>usbs_eth_init()</TT
+>. </P
+><P
+>The next three arguments identify the endpoints that should be used
+for USB communications: a control endpoint, a receive endpoint for
+ethernet packets coming from the host to the peripheral, and a
+transmit endpoint for ethernet packets going in the other direction.
+Obviously all three endpoints should be provided by the same USB
+hardware. The USB-ethernet package assumes that it has sole access to
+the receive and transmit endpoints, subject to the use of
+<TT
+CLASS="FUNCTION"
+>usbs_eth_disable</TT
+> and
+<TT
+CLASS="FUNCTION"
+>usbs_eth_enable</TT
+> control functions. The package
+also assumes that no other code is interested in USB state changes or
+class control messages: it installs handlers
+<A
+HREF="usbseth-control.html"
+><TT
+CLASS="FUNCTION"
+>usbs_eth_state_change_handler</TT
+></A
+>
+and
+<A
+HREF="usbseth-control.html"
+><TT
+CLASS="FUNCTION"
+>usbs_eth_class_control_handler</TT
+></A
+>
+in the control endpoint. If any other code does need to handle USB
+state changes or class control messages then replacement handlers
+should be installed after the call to
+<TT
+CLASS="FUNCTION"
+>usbs_eth_init</TT
+>, and those replacements should
+invoke the USB-ethernet ones when appropriate.</P
+><P
+>The final argument to <TT
+CLASS="FUNCTION"
+>usbs_eth_init</TT
+> specifies
+the MAC address (or Ethernet Station Address) that should be provided
+to the host-side device driver. Since the USB-ethernet package does not
+interact directly with a real ethernet device it cannot obtain the MAC
+address from any hardware. Instead, it must be supplied by higher-level
+code. The details depend on the <A
+HREF="usbseth-intro.html#AEN22"
+>scenario</A
+> in which the
+USB-ethernet package is being used.</P
+><P
+>The call to <TT
+CLASS="FUNCTION"
+>usbs_eth_init</TT
+> should normally happen
+after the enumeration data has been provided but before the underlying
+USB device driver has been started. If the USB device were to be
+started first then a connection between host and peripheral could be
+established immediately, and the host-side device driver would attempt
+to contact the USB-ethernet package for information such as the MAC
+address. </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>int
+main(int argc, char** argv)
+{
+ unsigned char host_MAC[6] = { 0x40, 0x5d, 0x90, 0xa9, 0xbc, 0x02 };
+
+ usbs_sa11x0_ep0.enumeration_data = &amp;usb_enum_data;
+ &#8230;
+ usbs_eth_init(&amp;usbs_eth0, &amp;usbs_sa11x0_ep0, &amp;usbs_sa11x0_ep1, &amp;usbs_sa11x0_ep2, host_MAC);
+ &#8230;
+ usbs_start(&amp;usbs_sa11x0_ep0);
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="usbseth-intro.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave-eth.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbseth-data.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Introduction</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>USB-ethernet Data Transfers</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-intro.html b/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-intro.html
new file mode 100644
index 0000000000..ebe212d52d
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-intro.html
@@ -0,0 +1,314 @@
+<!-- Copyright (C) 2001 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Introduction</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos Support for Developing USB-ethernet Peripherals"
+HREF="io-usb-slave-eth.html"><LINK
+REL="PREVIOUS"
+TITLE="eCos Support for Developing USB-ethernet Peripherals"
+HREF="io-usb-slave-eth.html"><LINK
+REL="NEXT"
+TITLE="Initializing the USB-ethernet Package"
+HREF="usbseth-init.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos Support for Developing USB-ethernet Peripherals</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="io-usb-slave-eth.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbseth-init.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBSETH-INTRO"
+>Introduction</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN6"
+></A
+><H2
+>Name</H2
+>Introduction&nbsp;--&nbsp;eCos support for developing USB ethernet peripherals</DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN9"
+></A
+><H2
+>Introduction</H2
+><P
+>The eCos USB-ethernet package provides additional support for USB
+peripherals that involve some sort of ethernet-style network. This can
+be a traditional ethernet, or it can involve some other networking
+technology that uses ethernet frames as a unit of transfer. It
+provides functions to transfer ethernet frames over the USB bus,
+handles certain control messages from the host, and optionally it can
+provide a network device driver for use by the eCos TCP/IP stack.
+The package comes with an example host-side device driver.</P
+><P
+>The USB-ethernet package is not tied to any specific hardware. It
+requires the presence of USB hardware and a suitable device driver,
+but not all USB peripherals involve ethernet communications. Hence the
+configuration system cannot load the package automatically for
+specific targets, in the way that a USB device driver or an ethernet
+driver can be loaded automatically. Instead, the package has to be
+added explicitly. When using the command line tools this will involve
+an operation like the following:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+>$ ecosconfig add usbs_eth</PRE
+></TD
+></TR
+></TABLE
+><P
+>Typically, this will automatically cause the USB device driver to
+become active. Loading the USB-ethernet package automatically provides
+functionality for <A
+HREF="usbseth-init.html"
+>initialization</A
+>,
+<A
+HREF="usbseth-data.html"
+>data transfer</A
+>, and the handling of
+<A
+HREF="usbseth-control.html"
+>control messages</A
+> and state
+changes. If the current configuration includes the eCos TCP/IP stack
+then the <A
+HREF="usbseth-netdev.html"
+>network device driver</A
+>
+support will be enabled as well by default, allowing the stack to
+exchange ethernet frames over the USB bus.</P
+><P
+>There is a USB standard for a class of communication devices including
+ethernet. The package does not implement this standard, due to
+limitations in the hardware for which the package was first developed.
+Instead, the package uses its own <A
+HREF="usbseth-protocol.html"
+>protocol</A
+> between USB
+<A
+HREF="usbseth-host.html"
+>host device driver</A
+> and the
+peripheral. </P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN22"
+></A
+><H2
+>Usage Scenarios</H2
+><P
+>The USB-ethernet package can be used several different scenarios. In
+a simple scenario, the peripheral serves only to connect the USB host
+to a suitable network:</P
+><DIV
+CLASS="INFORMALFIGURE"
+><A
+NAME="AEN25"
+></A
+><P
+></P
+><DIV
+CLASS="MEDIAOBJECT"
+><P
+><IMG
+SRC="simple.gif"
+></IMG
+></P
+></DIV
+><P
+></P
+></DIV
+><P
+>After initialization, and once the USB connection between host and
+peripheral has been established, higher-level code needs to detect
+packets that are intended for the host, and to forward these. This can
+be achieved by the low-level <TT
+CLASS="FUNCTION"
+>usbs_eth_start_tx</TT
+>
+function. Similarly, higher-level code needs to detect packets coming
+from the host, using <TT
+CLASS="FUNCTION"
+>usbs_eth_start_rx</TT
+>, and to
+forward these using the real network. As far as the host is concerned
+it is connected directly to the network. In this scenario there is no
+confusion about addresses: there is a single MAC address for the
+host/peripheral combination, corresponding to the connection to the
+real network, and it is this address which should be supplied during
+<A
+HREF="usbseth-init.html"
+>initialization</A
+>.</P
+><P
+>In a more complicated scenario, there is a TCP/IP stack running inside
+the peripheral.</P
+><DIV
+CLASS="INFORMALFIGURE"
+><A
+NAME="AEN36"
+></A
+><P
+></P
+><DIV
+CLASS="MEDIAOBJECT"
+><P
+><IMG
+SRC="tcpip.gif"
+></IMG
+></P
+></DIV
+><P
+></P
+></DIV
+><P
+>This involves the USB-ethernet package providing a service both to the
+host and to the eCos TCP/IP stack. It achieves the latter by acting as
+an eCos network device. Typically, the TCP/IP stack will be configured
+to act as a network bridge. The USB peripheral needs to examine the
+packets arriving over the real network. Some of these packets will be
+intended for the host, while others will be intended for the
+peripheral itself. To distinguish between these two scenarios, two
+distinct MAC addresses are needed: one for the host, and one for the
+peripheral. Similarly, packets sent by the host may have to be
+forwarded via the real network, or they may be intended for the TCP/IP
+stack inside the peripheral. Packets generated inside the peripheral's
+TCP/IP stack may need to be sent via the real network or over the USB
+bus. The network bridge software will have to take care of all these
+possibilities. Unusually for a network bridge, one of the network
+segments being bridged will only ever have one machine attached.</P
+><P
+>There are other possible usage scenarios. For example, the peripheral
+might not be attached to a real network at all. Instead it could be
+the USB host that acts as a network bridge, allowing a TCP/IP stack
+inside the peripheral to communicate with the outside world. The
+various details will depend on the exact type of peripheral being
+developed. </P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="io-usb-slave-eth.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave-eth.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbseth-init.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>eCos Support for Developing USB-ethernet Peripherals</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Initializing the USB-ethernet Package</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-netdev.html b/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-netdev.html
new file mode 100644
index 0000000000..4cd990ba04
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-netdev.html
@@ -0,0 +1,219 @@
+<!-- Copyright (C) 2001 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Network Device for the eCos TCP/IP Stack</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos Support for Developing USB-ethernet Peripherals"
+HREF="io-usb-slave-eth.html"><LINK
+REL="PREVIOUS"
+TITLE="USB-ethernet State Handling"
+HREF="usbseth-control.html"><LINK
+REL="NEXT"
+TITLE="Example Host-side Device Driver"
+HREF="usbseth-host.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos Support for Developing USB-ethernet Peripherals</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="usbseth-control.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbseth-host.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBSETH-NETDEV"
+>Network Device for the eCos TCP/IP Stack</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN221"
+></A
+><H2
+>Name</H2
+>Network Device&nbsp;--&nbsp;USB-ethernet support for the eCos TCP/IP Stack</DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN224"
+></A
+><H2
+>Description</H2
+><P
+>If the USB peripheral involves running the eCos TCP/IP stack and that
+stack needs to use USB-ethernet as a transport layer (or as one of the
+transports), then the USB-ethernet package can provide a suitable
+network device driver. It is still necessary for higher-level code to
+perform appropriate initialization by calling <A
+HREF="usbseth-init.html"
+><TT
+CLASS="FUNCTION"
+>usbs_eth_init</TT
+></A
+>, but
+after that it will be the TCP/IP stack rather than application code
+that transmits or receives ethernet frames.</P
+><P
+>Not all peripherals involving the USB-ethernet package will require a
+TCP/IP stack. Hence the provision of the network device is controlled
+by a configuration option <TT
+CLASS="LITERAL"
+>CYGPKG_USBS_ETHDRV</TT
+>. By
+default this will be enabled if the TCP/IP package
+<TT
+CLASS="LITERAL"
+>CYGPKG_NET</TT
+> is loaded, and disabled otherwise. </P
+><P
+>There are a number of other configuration options related to the
+network device. <TT
+CLASS="LITERAL"
+>CYGFUN_USBS_ETHDRV_STATISTICS</TT
+>
+determines whether or not the package will maintain statistics, mainly
+intended for SNMP: by default this will be enabled if the SNMP support
+package <TT
+CLASS="LITERAL"
+>CYGPKG_SNMPAGENT</TT
+> is loaded, and disabled
+otherwise. The name of the ethernet device is controlled by
+<TT
+CLASS="LITERAL"
+>CYGDATA_USBS_ETHDRV_NAME</TT
+>, and has a default value
+of either <TT
+CLASS="LITERAL"
+>eth0</TT
+> or <TT
+CLASS="LITERAL"
+>eth1</TT
+>
+depending on whether or not there is another network device driver
+present in the configuration.</P
+><P
+>Usually eCos network device drivers default to using DHCP for
+obtaining necessary information such as IP addresses. This is not
+appropriate for USB-ethernet devices. On the host-side the
+USB-ethernet network device will not exist until the USB peripheral
+has been plugged in and communication has been established. Therefore
+any DHCP daemon on the host would not be listening on that network
+device at the point that eCos requests its IP and other information. A
+related issue is that the use of DHCP would imply the presence of a
+DHCP daemon on every affected host machine, as opposed to a single
+daemon (plus backups) for the network as a whole. For these reasons
+the USB-ethernet package precludes the use of DHCP as a way of setting
+the IP address, instead requiring alternatives such as manual
+configuration.</P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="usbseth-control.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave-eth.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbseth-host.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>USB-ethernet State Handling</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Example Host-side Device Driver</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-protocol.html b/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-protocol.html
new file mode 100644
index 0000000000..5ea9ec4628
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth-protocol.html
@@ -0,0 +1,269 @@
+<!-- Copyright (C) 2001 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Communication Protocol</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos Support for Developing USB-ethernet Peripherals"
+HREF="io-usb-slave-eth.html"><LINK
+REL="PREVIOUS"
+TITLE="Example Host-side Device Driver"
+HREF="usbseth-host.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos Support for Developing USB-ethernet Peripherals</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="usbseth-host.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+>&nbsp;</TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBSETH-PROTOCOL"
+>Communication Protocol</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN281"
+></A
+><H2
+>Name</H2
+>Communication Protocol&nbsp;--&nbsp;Protocol used between the host-side device driver and the eCos
+USB-ethernet package </DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN284"
+></A
+><H2
+>Description</H2
+><P
+>There is a USB standard for the protocol to be used between the host
+and a class of communication devices, including ethernet. However, the
+eCos USB-ethernet package does not implement this protocol: the target
+hardware for which the package was first developed had certain
+limitations, and could not implement the standard. Instead, the package
+implements a simple new protocol.</P
+><P
+>A USB-ethernet peripheral involves bulk transfers on two endpoints:
+one endpoint will be used for packets from host to peripheral and the
+other will be used for the opposite direction. Transfers in both
+directions are variable length, with a lower limit of 16 bytes and an
+upper limit of 1516 bytes. The first two bytes of each transfer
+constitute a header specific to USB-ethernet. The next 14 bytes form
+the normal header for an ethernet frame: destination MAC address,
+source MAC address, and a protocol field. The remaining data, up to
+1500 bytes, are the payload. The first two bytes give the size of the
+ethernet frame, least significant byte first, with a value between 14
+and 1514.</P
+><P
+>For example an ARP request from host to peripheral involves an
+ethernet frame of 42 bytes (0x002A), with the usual 14-byte header and
+a 28-byte payload. The destination is the broadcast address
+0xFFFFFFFFFFFF. The source depends on the MAC address specified for
+the host in the call to <A
+HREF="usbseth-init.html"
+><TT
+CLASS="FUNCTION"
+>usbs_eth_init</TT
+></A
+>, e.g.
+0x405D90A9BC02. The remaining data is as specified by the appropriate
+<A
+HREF="http://www.ietf.org"
+TARGET="_top"
+>IETF RFC's</A
+>. The actual bulk
+USB transfer involves the following sequence of 44 bytes:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+>2a 00 ff ff ff ff ff ff 40 5d 90 a9 bc 02 08 06
+00 01 08 00 06 04 00 01 40 5d 90 a9 bc 02 0a 00
+00 01 00 00 00 00 00 00 0a 00 00 02</PRE
+></TD
+></TR
+></TABLE
+><P
+>In addition there are two control messages. These will be sent by the
+host to endpoint 0, the control endpoint, and by default they will
+be handled by <A
+HREF="usbseth-control.html"
+><TT
+CLASS="FUNCTION"
+>usbs_eth_class_control_handler</TT
+></A
+>. If class-specific
+control messages are intercepted by other code then it is the
+responsibility of that code to invoke the USB-ethernet handler when
+appropriate.</P
+><P
+>The first control message can be used by the host to obtain a MAC
+address:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define ECOS_USBETH_CONTROL_GET_MAC_ADDRESS 0x01</PRE
+></TD
+></TR
+></TABLE
+><P
+>The control message's type field should specify IN as the direction.
+The request field should be <TT
+CLASS="LITERAL"
+>0x01</TT
+>. The length fields
+should specify a size of 6 bytes. The remaining fields of the control
+message will be ignored by the USB-ethernet package. The response
+consists of the 6-byte MAC address supplied by the initialization call
+<A
+HREF="usbseth-init.html"
+><TT
+CLASS="FUNCTION"
+>usbs_eth_init</TT
+></A
+>.</P
+><P
+>The second control message can be used by the host to enable or
+disable promiscuous mode.</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define ECOS_USBETH_CONTROL_SET_PROMISCUOUS_MODE 0x02</PRE
+></TD
+></TR
+></TABLE
+><P
+>This control message involves no further data so the length field
+should be set to 0. The value field should be non-zero to enable
+promiscuous mode, zero to disable it. The request field should be
+<TT
+CLASS="LITERAL"
+>0x02</TT
+>. The remaining fields in the control message
+will be ignored. It is the responsibility of the host-side device
+driver to keep track of whether or not promiscuous mode is currently
+enabled. It will be disabled when the peripheral changes to
+Configured state, typically at the point where the host-side device
+driver has been activated.</P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="usbseth-host.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave-eth.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Example Host-side Device Driver</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>&nbsp;</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth.sgml b/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth.sgml
new file mode 100644
index 0000000000..e1c22ca56c
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/doc/usbseth.sgml
@@ -0,0 +1,810 @@
+<!-- DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook V3.1//EN" -->
+
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- usbseth.sgml -->
+<!-- -->
+<!-- USB slave-side ethernet support package. -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- Author(s): bartv -->
+<!-- Contact(s): bartv -->
+<!-- Date: 2001/01/13 -->
+<!-- Version: 0.01 -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part id="io-usb-slave-eth">
+<!-- reference id="io-usb-slave-eth" -->
+ <title>eCos Support for Developing USB-ethernet Peripherals</title>
+
+<!-- {{{ Intro -->
+
+<refentry id="usbseth-intro">
+<refmeta>
+<refentrytitle>Introduction</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>Introduction</refname>
+<refpurpose>eCos support for developing USB ethernet peripherals</refpurpose>
+</refnamediv>
+
+<refsect1><title>Introduction</title>
+<para>
+The eCos USB-ethernet package provides additional support for USB
+peripherals that involve some sort of ethernet-style network. This can
+be a traditional ethernet, or it can involve some other networking
+technology that uses ethernet frames as a unit of transfer. It
+provides functions to transfer ethernet frames over the USB bus,
+handles certain control messages from the host, and optionally it can
+provide a network device driver for use by the eCos TCP/IP stack.
+The package comes with an example host-side device driver.
+</para>
+<para>
+The USB-ethernet package is not tied to any specific hardware. It
+requires the presence of USB hardware and a suitable device driver,
+but not all USB peripherals involve ethernet communications. Hence the
+configuration system cannot load the package automatically for
+specific targets, in the way that a USB device driver or an ethernet
+driver can be loaded automatically. Instead, the package has to be
+added explicitly. When using the command line tools this will involve
+an operation like the following:
+</para>
+<screen width=72 format=linespecific>
+$ ecosconfig add usbs_eth
+</screen>
+<para>
+Typically, this will automatically cause the USB device driver to
+become active. Loading the USB-ethernet package automatically provides
+functionality for <link linkend="usbseth-init">initialization</link>,
+<link linkend="usbseth-data">data transfer</link>, and the handling of
+<link linkend="usbseth-control">control messages</link> and state
+changes. If the current configuration includes the eCos TCP/IP stack
+then the <link linkend="usbseth-netdev">network device driver</link>
+support will be enabled as well by default, allowing the stack to
+exchange ethernet frames over the USB bus.
+</para>
+<para>
+There is a USB standard for a class of communication devices including
+ethernet. The package does not implement this standard, due to
+limitations in the hardware for which the package was first developed.
+Instead, the package uses its own <link
+linkend="usbseth-protocol">protocol</link> between USB
+<link linkend="usbseth-host">host device driver</link> and the
+peripheral.
+</para>
+</refsect1>
+
+<refsect1><title id="usbseth-intro-scenarios">Usage Scenarios</title>
+<para>
+The USB-ethernet package can be used several different scenarios. In
+a simple scenario, the peripheral serves only to connect the USB host
+to a suitable network:
+</para>
+<informalfigure PgWide=1>
+<mediaobject>
+<imageobject>
+<imagedata fileref="simple.png" Align="Center">
+</imageobject>
+</mediaobject>
+</informalfigure>
+<para>
+After initialization, and once the USB connection between host and
+peripheral has been established, higher-level code needs to detect
+packets that are intended for the host, and to forward these. This can
+be achieved by the low-level <function>usbs_eth_start_tx</function>
+function. Similarly, higher-level code needs to detect packets coming
+from the host, using <function>usbs_eth_start_rx</function>, and to
+forward these using the real network. As far as the host is concerned
+it is connected directly to the network. In this scenario there is no
+confusion about addresses: there is a single MAC address for the
+host/peripheral combination, corresponding to the connection to the
+real network, and it is this address which should be supplied during
+<link linkend="usbseth-init">initialization</link>.
+</para>
+<para>
+In a more complicated scenario, there is a TCP/IP stack running inside
+the peripheral.
+</para>
+<informalfigure PgWide=1>
+<mediaobject>
+<imageobject>
+<imagedata fileref="tcpip.png" Align="Center">
+</imageobject>
+</mediaobject>
+</informalfigure>
+<para>
+This involves the USB-ethernet package providing a service both to the
+host and to the eCos TCP/IP stack. It achieves the latter by acting as
+an eCos network device. Typically, the TCP/IP stack will be configured
+to act as a network bridge. The USB peripheral needs to examine the
+packets arriving over the real network. Some of these packets will be
+intended for the host, while others will be intended for the
+peripheral itself. To distinguish between these two scenarios, two
+distinct MAC addresses are needed: one for the host, and one for the
+peripheral. Similarly, packets sent by the host may have to be
+forwarded via the real network, or they may be intended for the TCP/IP
+stack inside the peripheral. Packets generated inside the peripheral's
+TCP/IP stack may need to be sent via the real network or over the USB
+bus. The network bridge software will have to take care of all these
+possibilities. Unusually for a network bridge, one of the network
+segments being bridged will only ever have one machine attached.
+</para>
+<para>
+There are other possible usage scenarios. For example, the peripheral
+might not be attached to a real network at all. Instead it could be
+the USB host that acts as a network bridge, allowing a TCP/IP stack
+inside the peripheral to communicate with the outside world. The
+various details will depend on the exact type of peripheral being
+developed.
+</para>
+</refsect1>
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ Initialization -->
+
+<refentry id="usbseth-init">
+<refmeta>
+<refentrytitle>Initializing the USB-ethernet Package</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname><function>usbs_eth_init</function></refname>
+<refpurpose>Initializing the USB-ethernet Package</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;cyg/io/usb/usbs_eth.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>void <function>usbs_eth_init</function></funcdef>
+<paramdef>usbs_eth* <parameter>usbeth</parameter></paramdef>
+<paramdef>usbs_control_endpoint* <parameter>ep0</parameter></paramdef>
+<paramdef>usbs_rx_endpoint* <parameter>ep1</parameter></paramdef>
+<paramdef>usbs_tx_endpoint* <parameter>ep2</parameter></paramdef>
+<paramdef>unsigned char* <parameter>mac_address</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+<para>
+The USB-ethernet package is not tied to any specific hardware. It
+requires certain functionality: there must be USB-slave hardware
+supported by a device driver; there must also be two endpoints for
+bulk transfers between host and peripheral, one for each direction;
+there must also be a control endpoint, although of course that is
+implicit with any USB hardware.
+</para>
+<para>
+However, USB-slave hardware may well provide more endpoints than the
+minimum required for ethernet support. Some of those endpoints might
+be used by other packages, while other endpoints might be used
+directly by the application, or might not be needed for the peripheral
+being built. There is also the possibility of a USB peripheral that
+supports multiple configurations, with the ethernet support active in
+only some of those configurations. The USB-ethernet package has no
+knowledge about any of this, so it relies on higher-level code to tell
+it which endpoints should be used and other information. This is the
+purpose of the <function>usbs_eth_init</function> function.
+</para>
+<para>
+The first argument identifies the specific
+<structname>usbs_eth</structname> data structure that is affected. It
+is expected that the vast majority of affected applications will only
+provide a single USB-ethernet device to a single host, and the package
+automatically provides a suitable data structure
+<literal>usbs_eth0</literal> to support this. If multiple
+<structname>usbs_eth</structname> structures are needed for some
+reason then these need to be instantiated by other code, and each one
+needs to be initialised by a call to
+<function>usbs_eth_init()</function>.
+</para>
+<para>
+The next three arguments identify the endpoints that should be used
+for USB communications: a control endpoint, a receive endpoint for
+ethernet packets coming from the host to the peripheral, and a
+transmit endpoint for ethernet packets going in the other direction.
+Obviously all three endpoints should be provided by the same USB
+hardware. The USB-ethernet package assumes that it has sole access to
+the receive and transmit endpoints, subject to the use of
+<function>usbs_eth_disable</function> and
+<function>usbs_eth_enable</function> control functions. The package
+also assumes that no other code is interested in USB state changes or
+class control messages: it installs handlers
+<link linkend="usbseth-control"><function>usbs_eth_state_change_handler</function></link>
+and
+<link linkend="usbseth-control"><function>usbs_eth_class_control_handler</function></link>
+in the control endpoint. If any other code does need to handle USB
+state changes or class control messages then replacement handlers
+should be installed after the call to
+<function>usbs_eth_init</function>, and those replacements should
+invoke the USB-ethernet ones when appropriate.
+</para>
+<para>
+The final argument to <function>usbs_eth_init</function> specifies
+the MAC address (or Ethernet Station Address) that should be provided
+to the host-side device driver. Since the USB-ethernet package does not
+interact directly with a real ethernet device it cannot obtain the MAC
+address from any hardware. Instead, it must be supplied by higher-level
+code. The details depend on the <link
+linkend="usbseth-intro-scenarios">scenario</link> in which the
+USB-ethernet package is being used.
+</para>
+<para>
+The call to <function>usbs_eth_init</function> should normally happen
+after the enumeration data has been provided but before the underlying
+USB device driver has been started. If the USB device were to be
+started first then a connection between host and peripheral could be
+established immediately, and the host-side device driver would attempt
+to contact the USB-ethernet package for information such as the MAC
+address.
+</para>
+<programlisting width=72>
+int
+main(int argc, char** argv)
+{
+ unsigned char host_MAC[6] = { 0x40, 0x5d, 0x90, 0xa9, 0xbc, 0x02 };
+
+ usbs_sa11x0_ep0.enumeration_data = &amp;usb_enum_data;
+ &hellip;
+ usbs_eth_init(&amp;usbs_eth0, &amp;usbs_sa11x0_ep0, &amp;usbs_sa11x0_ep1, &amp;usbs_sa11x0_ep2, host_MAC);
+ &hellip;
+ usbs_start(&amp;usbs_sa11x0_ep0);
+ &hellip;
+}
+</programlisting>
+</refsect1>
+
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ Data Transfer -->
+
+<refentry id="usbseth-data">
+<refmeta>
+<refentrytitle>USB-ethernet Data Transfers</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>USB-ethernet Data Transfers</refname>
+<refpurpose>Exchanging ethernet packets with the USB host</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;cyg/io/usb/usbs_eth.h&gt;
+</funcsynopsisinfo>
+
+<funcprototype>
+<funcdef>void <function>usbs_eth_start_rx</function></funcdef>
+<paramdef>usbs_eth* <parameter>usbseth</parameter></paramdef>
+<paramdef>unsigned char* <parameter>buffer</parameter></paramdef>
+<paramdef>void (*)(usbs_eth*, void*, int) <parameter>complete_fn</parameter></paramdef>
+<paramdef>void* <parameter>complete_data</parameter></paramdef>
+</funcprototype>
+
+<funcprototype>
+<funcdef>void <function>usbs_eth_start_tx</function></funcdef>
+<paramdef>usbs_eth* <parameter>usbseth</parameter></paramdef>
+<paramdef>unsigned char* <parameter>buffer</parameter></paramdef>
+<paramdef>void (*)(usbs_eth*, void*, int) <parameter>complete_fn</parameter></paramdef>
+<paramdef>void* <parameter>complete_data</parameter></paramdef>
+</funcprototype>
+
+</funcsynopsis>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+<para>
+The USB-ethernet package provides two main modes of operation. In the
+first mode it provides a <link linkend="usbseth-netdev">network device
+driver</link> for use by a TCP/IP stack running inside the USB
+peripheral. All incoming ethernet packets should be passed up the
+TCP/IP stack, and only the stack will generate outgoing packets. Apart
+from <link linkend="usbseth-init">initialization</link> and possibly
+certain <link linkend="usbseth-control">control operations</link>,
+higher-level code will not interact with the USB-ethernet package
+directly.
+</para>
+<para>
+In the second mode there is no TCP/IP stack running inside the USB
+peripheral. For example, a simple USB-ethernet converter has an
+ethernet chip and a USB port: ethernet packets received by the
+ethernet chip need to be forwarded to the USB host, and ethernet
+packets sent by the USB host need to be sent out of the ethernet chip.
+<function>usbs_eth_start_rx</function> and
+<function>usbs_eth_start_tx</function> allow for this lower-level
+access to the USB-ethernet package.
+</para>
+<para>
+The two modes of operation are mutually exclusive. If the network
+device driver mode is enabled then application code should communicate
+at the TCP/IP level, and not by using the lower-level functions.
+Instead, it is the network device driver that will make use of these
+functions, and it assumes that it has exclusive access. The package
+does not perform any locking.
+</para>
+<para>
+The transmit and receive functions work in much the same way. The
+first argument identifies the <structname>usbs_eth</structname>
+structure that should be used. For the majority of applications this
+will be <literal>usbs_eth0</literal>. The second argument specifies
+the location of the ethernet packet; outgoing for
+<function>usbs_eth_start_tx</function> and incoming for
+<function>usbs_eth_start_rx</function>. This buffer should correspond
+to the <link linkend="usbseth-protocol">protocol</link>:
+</para>
+<orderedlist>
+<listitem>
+<para>
+Outgoing packets can consist of up to 1516 bytes, consisting of a
+two-byte header specific to USB-ethernet followed by a standard
+ethernet frame (a header with 6-byte destination address, 6-byte
+source address and a further two bytes, followed by a payload of
+up to 1500 bytes). The two-byte USB-ethernet header consists simply of
+the size of the ethernet frame, i.e. the size of the rest of the
+packet not including the USB-ethernet header, with the least
+significant byte first.
+</para>
+</listitem>
+<listitem>
+<para>
+For incoming packets the supplied buffer should usually be at least
+1516 bytes. There may be special circumstances in which a smaller
+buffer might be safe; for example, if the host-side device driver is
+modified to support only smaller packets. Once the packet has been
+received the buffer will contain a two-byte header specific to
+USB-ethernet, followed by a normal ethernet frame. The header
+gives the size of the ethernet frame, excluding the header, with the
+least significant byte first.
+</para>
+</listitem>
+</orderedlist>
+<para>
+Both <function>usbs_eth_start_tx</function> and
+<function>usbs_eth_start_rx</function> are asynchronous: the transfer
+is started and, some time later, a completion function will be invoked.
+The third and fourth arguments to both
+<function>usbs_eth_start_tx</function> and
+<function>usbs_eth_start_rx</function> supply the completion function
+and an argument to that function respectively. The completion function
+will be invoked with three arguments: a pointer to the
+<structname>usbs_eth</structname> data structure, usually
+<literal>usbs_eth0</literal>; the supplied completion data ; and a
+return code field. A negative value indicates that an error occurred,
+for example <literal>-EPIPE</literal> if the connection between USB
+host and peripheral has been broken, or <literal>-EAGAIN</literal> if
+an endpoint has been halted. A positive value indicates the total size
+of the transfer, which should correspond to the size in the
+USB-ethernet header plus an additional two bytes for the header
+itself.
+</para>
+<para>
+If the data transfer is succesful then the completion function will
+typically be invoked in DSR context rather than in thread context,
+although this depends on the implementation of the underlying USB
+device driver. Therefore the completion function is restricted in what
+it can do; in particular, it must not make any calls that will or may
+block such as locking a mutex or allocating memory. The kernel
+documentation should be consulted for more details of DSR's and
+interrupt handling generally. Note that if the transfer finishes
+quickly then the completion function may be invoked before
+<function>usbs_eth_start_rx</function> or
+<function>usbs_eth_start_tx</function> returns. This is especially
+likely to happen if the current thread is descheduled after starting
+the data transfer but before returning from these functions.
+</para>
+<para>
+For transmit operations, it is possible for
+<function>usbs_eth_start_tx</function> to invoke the completion
+function immediately. If there is no current connection between host
+and target then the transmit will fail immediately with
+<literal>-EPIPE</literal>. In addition the USB-ethernet package will
+check the destination MAC address and make sure that the ethernet
+frame really is intended for the host: either it must be for the
+address specified in the initialization call <link
+linkend="usbseth-init"><function>usbs_eth_init</function></link>, or
+it must be a broadcast packet, or the host must have enabled
+promiscuous mode.
+</para>
+</refsect1>
+
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ State and Control Messages -->
+
+<refentry id="usbseth-control">
+<refmeta>
+<refentrytitle>USB-ethernet State Handling</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>USB-ethernet State Handling</refname>
+<refpurpose>Maintaining the USB-ethernet connection with the host</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;cyg/io/usb/usbs_eth.h&gt;
+</funcsynopsisinfo>
+
+<funcprototype>
+<funcdef>usbs_control_return <function>usbs_eth_class_control_handler</function></funcdef>
+<paramdef>usbs_control_endpoint* <parameter>ep0</parameter></paramdef>
+<paramdef>void* <parameter>callback_data</parameter></paramdef>
+</funcprototype>
+
+<funcprototype>
+<funcdef>void <function>usbs_eth_state_change_handler</function></funcdef>
+<paramdef>usbs_control_endpoint* <parameter>ep0</parameter></paramdef>
+<paramdef>void* <parameter>callback_data</parameter></paramdef>
+<paramdef>usbs_state_change <parameter>change</parameter></paramdef>
+<paramdef>int <parameter>old_state</parameter></paramdef>
+</funcprototype>
+
+<funcprototype>
+<funcdef>void <function>usbs_eth_disable</function></funcdef>
+<paramdef>usbs_eth* <parameter>usbseth></parameter></paramdef>
+</funcprototype>
+<funcprototype>
+<funcdef>void <function>usbs_eth_enable</function></funcdef>
+<paramdef>usbs_eth* <parameter>usbseth></parameter></paramdef>
+</funcprototype>
+
+</funcsynopsis>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+<para>
+When the USB-ethernet package is initialized by a call to <link
+linkend="usbseth-init"><function>usbs_eth_init</function></link> it
+installs <function>usbs_eth_state_change_handler</function> to handle
+USB state changes. This allows the package to detect when the
+connection between the host and the peripheral is established or
+broken, resulting in internal calls to
+<function>usbs_eth_enable</function> and
+<function>usbs_eth_disable</function> respectively. This is
+appropriate if no other code needs to access the USB device. However,
+if there is other code, either other USB-related packages or the
+application itself, that needs to perform I/O over the USB bus, then
+typically the USB-ethernet package should not have exclusive access to
+state change events. Instead, the assumption is that higher-level
+code, typically provided by the application, will install an
+alternative state change handler in the control endpoint data
+structure after the call to <function>usbs_eth_init</function>. This
+alternative handler will either chain into
+<function>usbs_eth_state_change_handler</function> when appropriate,
+or else it will invoke <function>usbs_eth_enable</function> and
+<function>usbs_eth_disable</function> directly. For further details of
+state change handlers and control endpoints generally, see the
+documentation for the common USB-slave package.
+</para>
+<para>
+Similarly, <function>usbs_eth_init</function> will install
+<function>usbs_eth_class_control_handler</function> in the control
+endpoint data structure as the appropriate handler for class-specific
+USB control messages. This code will handle the ethernet-specific
+<link linkend="usbseth-protocol">control messages </link>, for example
+requests by the host to enable or disable promiscuous mode or to
+obtain the MAC address. If the USB device is not shared with any other
+code then this is both necessary and sufficient. However, if other code
+is involved and if that code also needs to process certain control
+messages, higher-level code should install its own handler and chain
+to the USB-ethernet one when appropriate. It should be noted that the
+request code is encoded in just a single byte, so there is a real
+possibility that exactly the same number will be used by different
+protocols for different requests. Any such problems will have to be
+identified and resolved by application developers, and may involve
+modifying the source code for the USB-ethernet package.
+</para>
+<para>
+As an alternative to chaining the state change handler, higher-level
+code can instead call <function>usbs_eth_disable</function> and
+<function>usbs_eth_enable</function> directly. These functions may
+also be called if the USB-ethernet package should become inactive for
+reasons not related directly to events on the USB bus. The main effect
+of <function>usbs_eth_enable</function> is to restart receive
+operations and to allow transmits. The main effect of
+<function>usbs_eth_disable</function> is to block further transmits:
+any current receive operations need to be aborted at the USB level,
+for example by halting the appropriate endpoint.
+</para>
+</refsect1>
+
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ netdev device -->
+
+<refentry id="usbseth-netdev">
+<refmeta>
+<refentrytitle>Network Device for the eCos TCP/IP Stack</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>Network Device</refname>
+<refpurpose>USB-ethernet support for the eCos TCP/IP Stack</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+<para>
+If the USB peripheral involves running the eCos TCP/IP stack and that
+stack needs to use USB-ethernet as a transport layer (or as one of the
+transports), then the USB-ethernet package can provide a suitable
+network device driver. It is still necessary for higher-level code to
+perform appropriate initialization by calling <link
+linkend="usbseth-init"><function>usbs_eth_init</function></link>, but
+after that it will be the TCP/IP stack rather than application code
+that transmits or receives ethernet frames.
+</para>
+<para>
+Not all peripherals involving the USB-ethernet package will require a
+TCP/IP stack. Hence the provision of the network device is controlled
+by a configuration option <literal>CYGPKG_USBS_ETHDRV</literal>. By
+default this will be enabled if the TCP/IP package
+<literal>CYGPKG_NET</literal> is loaded, and disabled otherwise.
+</para>
+<para>
+There are a number of other configuration options related to the
+network device. <literal>CYGFUN_USBS_ETHDRV_STATISTICS</literal>
+determines whether or not the package will maintain statistics, mainly
+intended for SNMP: by default this will be enabled if the SNMP support
+package <literal>CYGPKG_SNMPAGENT</literal> is loaded, and disabled
+otherwise. The name of the ethernet device is controlled by
+<literal>CYGDATA_USBS_ETHDRV_NAME</literal>, and has a default value
+of either <literal>eth0</literal> or <literal>eth1</literal>
+depending on whether or not there is another network device driver
+present in the configuration.
+</para>
+<para>
+Usually eCos network device drivers default to using DHCP for
+obtaining necessary information such as IP addresses. This is not
+appropriate for USB-ethernet devices. On the host-side the
+USB-ethernet network device will not exist until the USB peripheral
+has been plugged in and communication has been established. Therefore
+any DHCP daemon on the host would not be listening on that network
+device at the point that eCos requests its IP and other information. A
+related issue is that the use of DHCP would imply the presence of a
+DHCP daemon on every affected host machine, as opposed to a single
+daemon (plus backups) for the network as a whole. For these reasons
+the USB-ethernet package precludes the use of DHCP as a way of setting
+the IP address, instead requiring alternatives such as manual
+configuration.
+</para>
+</refsect1>
+
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ ecos_usbeth -->
+
+<refentry id="usbseth-host">
+<refmeta>
+<refentrytitle>Example Host-side Device Driver</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>Example Host-side Device Driver</refname>
+<refpurpose>Provide host-side support for the eCos USB-ethernet package</refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+<para>
+The USB-ethernet package is supplied with a single host-side device
+driver. This driver has been developed against the Linux kernel
+2.2.16-22, as shipped with Red Hat 7. The driver is provided as is and
+should not be considered production quality: for example it only
+checks for a bogus vendor id <literal>0x4242</literal> rather than an
+official vendor id supplied by the <ulink
+url="http://www.usb.org/">USB Implementers Forum</ulink>. Also, if the
+peripheral involves multiple configurations or multiple interfaces, it
+will fail to detect this. However, the driver can be used for simple
+testing and as the basis of a full device driver. Details of the
+protocol used between host and peripheral can be found in the <link
+linkend="usbseth-protocol">Communication Protocol</link> section.
+</para>
+<para>
+The host-side device driver can be found in the <filename
+class="directory">host</filename> subdirectory of the USB-ethernet
+package, specifically the file <filename>ecos_usbeth.c</filename>, and
+comes with a <filename>Makefile</filename>. Both files may need
+to be modified for specific applications. For example, the vendor id
+table <literal>ecos_usbeth_implementations</literal> may need to be
+updated for the specific USB peripheral being built. The
+<filename>Makefile</filename> assumes that the Linux kernel sources
+reside in <filename class="directory">/usr/src/linux</filename>, and
+that the kernel has already been configured and built. Assuming this
+is the case, the device driver can be built simply by invoking
+<command>make</command> with no additional arguments. This will result
+in a dynamically loadable kernel module,
+<filename>ecos_usbeth.o</filename>, in the current directory.
+</para>
+<note>
+<para>
+As normal for Linux kernel builds, the generated files such as
+<filename>ecos_usbeth.o</filename> live in the same directory as the
+source tree. This is very different from eCos where the source tree
+(or component repository) is kept separate from any builds. There may
+be problems if the component repository is kept read-only or if it is
+put under source code control. Any such problems can be avoided by
+making a copy of the <filename class="directory">host</filename>
+subdirectory and building that copy.
+</para>
+</note>
+<para>
+Loading the kernel module into the current system requires root
+privileges. If the generic USB support is also a loadable module and
+has not been loaded already, this must happen first:
+</para>
+<screen width=72 format=linespecific>
+# insmod usb-uhci
+Using /lib/modules/2.2.16-22/usb/usb-uhci.o
+</screen>
+<para>
+Depending on the host hardware, the <literal>uhci</literal> or
+<literal>usb-ohci</literal> modules may be more appropriate. Loading
+the generic USB module will typically result in a number of messages
+to the logfile <filename>/var/log/messages</filename>, giving details
+of the specific host-side hardware that has been detected plus any
+hubs. The next step is to load the USB-ethernet module:
+</para>
+<screen width=72 format=linespecific>
+# insmod ecos_usbeth.o
+</screen>
+<para>
+This should result in a number of additional diagnostics in the
+logfile:
+</para>
+<screen width=72 format=linespecific>
+Apr 1 18:01:08 grumpy kernel: eCos USB-ethernet device driver
+Apr 1 18:01:08 grumpy kernel: usb.c: registered new driver ecos_usbeth
+</screen>
+<para>
+If a suitable USB peripheral is now connected the host will detect
+this, assign an address in the local USB network, obtain enumeration
+data, and find a suitable device driver. Assuming the peripheral and
+device driver agree on the supported vendor ids, the
+<filename>ecos_usbeth.o</filename> module will be selected and this
+will be reported in the system log:
+</para>
+<screen width=86 format=linespecific>
+Apr 1 18:04:12 grumpy kernel: usb.c: USB new device connect, assigned device number 3
+Apr 1 18:04:12 grumpy kernel: eCos-based USB ethernet peripheral active at eth1
+</screen>
+<para>
+What can happen next depends very much on the software that is running
+on top of the USB-ethernet package inside the peripheral. For example,
+if there is a TCP/IP stack then it should be possible to bring up a
+network connection between host and peripheral using
+<command>ifconfig</command>.
+</para>
+</refsect1>
+
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ Protocol -->
+
+<refentry id="usbseth-protocol">
+<refmeta>
+<refentrytitle>Communication Protocol</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>Communication Protocol</refname>
+<refpurpose>Protocol used between the host-side device driver and the eCos
+USB-ethernet package </refpurpose>
+</refnamediv>
+
+<refsect1><title>Description</title>
+<para>
+There is a USB standard for the protocol to be used between the host
+and a class of communication devices, including ethernet. However, the
+eCos USB-ethernet package does not implement this protocol: the target
+hardware for which the package was first developed had certain
+limitations, and could not implement the standard. Instead, the package
+implements a simple new protocol.
+</para>
+<para>
+A USB-ethernet peripheral involves bulk transfers on two endpoints:
+one endpoint will be used for packets from host to peripheral and the
+other will be used for the opposite direction. Transfers in both
+directions are variable length, with a lower limit of 16 bytes and an
+upper limit of 1516 bytes. The first two bytes of each transfer
+constitute a header specific to USB-ethernet. The next 14 bytes form
+the normal header for an ethernet frame: destination MAC address,
+source MAC address, and a protocol field. The remaining data, up to
+1500 bytes, are the payload. The first two bytes give the size of the
+ethernet frame, least significant byte first, with a value between 14
+and 1514.
+</para>
+<para>
+For example an ARP request from host to peripheral involves an
+ethernet frame of 42 bytes (0x002A), with the usual 14-byte header and
+a 28-byte payload. The destination is the broadcast address
+0xFFFFFFFFFFFF. The source depends on the MAC address specified for
+the host in the call to <link
+linkend="usbseth-init"><function>usbs_eth_init</function></link>, e.g.
+0x405D90A9BC02. The remaining data is as specified by the appropriate
+<ulink url="http://www.ietf.org">IETF RFC's</ulink>. The actual bulk
+USB transfer involves the following sequence of 44 bytes:
+</para>
+<screen width=72 format=linespecific>
+2a 00 ff ff ff ff ff ff 40 5d 90 a9 bc 02 08 06
+00 01 08 00 06 04 00 01 40 5d 90 a9 bc 02 0a 00
+00 01 00 00 00 00 00 00 0a 00 00 02
+</screen>
+<para>
+In addition there are two control messages. These will be sent by the
+host to endpoint 0, the control endpoint, and by default they will
+be handled by <link linkend="usbseth-control"><function>
+usbs_eth_class_control_handler</function></link>. If class-specific
+control messages are intercepted by other code then it is the
+responsibility of that code to invoke the USB-ethernet handler when
+appropriate.
+</para>
+<para>
+The first control message can be used by the host to obtain a MAC
+address:
+</para>
+<programlisting width=72>
+#define ECOS_USBETH_CONTROL_GET_MAC_ADDRESS 0x01
+</programlisting>
+<para>
+The control message's type field should specify IN as the direction.
+The request field should be <literal>0x01</literal>. The length fields
+should specify a size of 6 bytes. The remaining fields of the control
+message will be ignored by the USB-ethernet package. The response
+consists of the 6-byte MAC address supplied by the initialization call
+<link
+linkend="usbseth-init"><function>usbs_eth_init</function></link>.
+</para>
+<para>
+The second control message can be used by the host to enable or
+disable promiscuous mode.
+</para>
+<programlisting width=72>
+#define ECOS_USBETH_CONTROL_SET_PROMISCUOUS_MODE 0x02
+</programlisting>
+<para>
+This control message involves no further data so the length field
+should be set to 0. The value field should be non-zero to enable
+promiscuous mode, zero to disable it. The request field should be
+<literal>0x02</literal>. The remaining fields in the control message
+will be ignored. It is the responsibility of the host-side device
+driver to keep track of whether or not promiscuous mode is currently
+enabled. It will be disabled when the peripheral changes to
+Configured state, typically at the point where the host-side device
+driver has been activated.
+</para>
+</refsect1>
+
+</refentry>
+
+<!-- }}} -->
+
+</part>
+<!-- /reference -->
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/host/COPYING b/cesar/ecos/packages/io/usb/eth/slave/current/host/COPYING
new file mode 100644
index 0000000000..60549be514
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/host/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/host/Makefile b/cesar/ecos/packages/io/usb/eth/slave/current/host/Makefile
new file mode 100644
index 0000000000..938255726c
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/host/Makefile
@@ -0,0 +1,95 @@
+#
+# Makefile for the Linux device driver for eCos USB-ethernet
+# devices. This makefile has been cloned from the one in
+# /usr/src/linux-2.2.16/drivers/usb
+#
+
+# This makefile will chain to the Linux makefile if appropriate.
+# The toplevel Linux makefile sets the variable KERNELRELEASE
+ifeq (,$(KERNELRELEASE))
+
+default:
+ make -C /usr/src/linux SUBDIRS=$(shell pwd) modules
+
+modules: default
+
+modules_install:
+ @echo Support for installing this module not yet implemented.
+
+else
+
+# A recursive invocation of this makefile from the Linux one.
+
+# Build this driver as a module.
+CONFIG_USB_ECOS_USBETH = m
+
+# Subdirs.
+
+SUB_DIRS :=
+MOD_SUB_DIRS := $(SUB_DIRS)
+MOD_IN_SUB_DIRS := $(SUB_DIRS)
+ALL_SUB_DIRS := $(SUB_DIRS)
+
+# The target object and module list name.
+
+O_TARGET :=
+M_OBJS :=
+O_OBJS :=
+MOD_LIST_NAME := ECOS_USBETH_MODULE
+
+# Objects that export symbols.
+
+export-objs :=
+
+# Multipart objects.
+
+list-multi :=
+
+# Optional parts of multipart objects.
+
+# Object file lists.
+
+obj-y :=
+obj-m :=
+obj-n :=
+obj- :=
+
+# Object files in subdirectories
+
+# Each configuration option enables a list of files.
+
+obj-$(CONFIG_USB_ECOS_USBETH) += ecos_usbeth.o
+
+# Extract lists of the multi-part drivers.
+# The 'int-*' lists are the intermediate files used to build the multi's.
+
+multi-y := $(filter $(list-multi), $(obj-y))
+multi-m := $(filter $(list-multi), $(obj-m))
+int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs)))
+int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs)))
+
+# Files that are both resident and modular: remove from modular.
+
+obj-m := $(filter-out $(obj-y), $(obj-m))
+int-m := $(filter-out $(int-y), $(int-m))
+
+# Take multi-part drivers out of obj-y and put components in.
+
+obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y)
+
+# Translate to Rules.make lists.
+
+O_OBJS := $(sort $(filter-out $(export-objs), $(obj-y)))
+OX_OBJS := $(sort $(filter $(export-objs), $(obj-y)))
+M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m)))
+MX_OBJS := $(sort $(filter $(export-objs), $(obj-m)))
+MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m)))
+MIX_OBJS := $(sort $(filter $(export-objs), $(int-m)))
+
+# The global Rules.make.
+
+include $(TOPDIR)/Rules.make
+
+# Link rules for multi-part drivers.
+
+endif
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/host/ecos_usbeth.c b/cesar/ecos/packages/io/usb/eth/slave/current/host/ecos_usbeth.c
new file mode 100644
index 0000000000..500c850a19
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/host/ecos_usbeth.c
@@ -0,0 +1,572 @@
+//==========================================================================
+//
+// ecos_usbeth.c
+//
+// Linux device driver for eCos-based USB ethernet peripherals.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 2000-11-12
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/usb.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+
+#ifdef MODULE
+MODULE_AUTHOR("Bart Veer <bartv@redhat.com>");
+MODULE_DESCRIPTION("USB ethernet driver for eCos-based peripherals");
+#endif
+
+// This array identifies specific implementations of eCos USB-ethernet
+// devices. All implementations should add their vendor and device
+// details.
+
+typedef struct ecos_usbeth_impl {
+ const char* name;
+ __u16 vendor;
+ __u16 id;
+} ecos_usbeth_impl;
+
+const static ecos_usbeth_impl ecos_usbeth_implementations[] = {
+ { "eCos ether", 0x4242, 0x4242 },
+ { (const char*) 0, 0, 0 }
+};
+
+
+// Constants. These have to be kept in sync with the target-side
+// code.
+#define ECOS_USBETH_MAXTU 1516
+#define ECOS_USBETH_MAX_CONTROL_TU 8
+#define ECOS_USBETH_CONTROL_GET_MAC_ADDRESS 0x01
+#define ECOS_USBETH_CONTROL_SET_PROMISCUOUS_MODE 0x02
+
+// The main data structure. It keeps track of both the USB
+// and network side of things, and provides buffers for
+// the various operations.
+//
+// NOTE: currently this driver only supports a single
+// plugged-in device. Theoretically multiple eCos-based
+// USB ethernet devices could be plugged in to a single
+// host and each one would require an ecos_usbeth
+// structure.
+typedef struct ecos_usbeth {
+ spinlock_t usb_lock;
+ int target_promiscuous;
+ struct usb_device* usb_dev;
+ struct net_device* net_dev;
+ struct net_device_stats stats;
+ struct urb rx_urb;
+ struct urb tx_urb;
+ unsigned char rx_buffer[ECOS_USBETH_MAXTU];
+ unsigned char tx_buffer[ECOS_USBETH_MAXTU];
+} ecos_usbeth;
+
+
+// open()
+// Invoked by the TCP/IP stack when the interface is brought up.
+// This just starts a receive operation.
+static int
+ecos_usbeth_open(struct net_device* net)
+{
+ ecos_usbeth* usbeth = (ecos_usbeth*) net->priv;
+ int res;
+
+ netif_start_queue(net);
+ res = usb_submit_urb(&(usbeth->rx_urb));
+ if (0 != res) {
+ printk("ecos_usbeth: failed to start USB receives, %d\n", res);
+ }
+ MOD_INC_USE_COUNT;
+ return 0;
+}
+
+// close()
+// Invoked by the TCP/IP stack when the interface is taken down.
+// Any active USB operations need to be cancelled. During
+// a disconnect this may get called twice, once for the
+// disconnect and once for the network interface being
+// brought down.
+static int
+ecos_usbeth_close(struct net_device* net)
+{
+ ecos_usbeth* usbeth = (ecos_usbeth*) net->priv;
+
+ if (0 != netif_running(net)) {
+ netif_stop_queue(net);
+ net->start = 0;
+
+ if (-EINPROGRESS == usbeth->rx_urb.status) {
+ usb_unlink_urb(&(usbeth->rx_urb));
+ }
+ if (-EINPROGRESS == usbeth->tx_urb.status) {
+ usb_unlink_urb(&(usbeth->tx_urb));
+ }
+ MOD_DEC_USE_COUNT;
+ }
+
+ return 0;
+}
+
+// Reception.
+// probe() fills in an rx_urb. When the net device is brought up
+// the urb is activated, and this callback gets run for incoming
+// data.
+static void
+ecos_usbeth_rx_callback(struct urb* urb)
+{
+ ecos_usbeth* usbeth = (ecos_usbeth*) urb->context;
+ struct net_device* net = usbeth->net_dev;
+ struct sk_buff* skb;
+ int len;
+ int res;
+
+ if (0 != urb->status) {
+ // This happens numerous times during a disconnect. Do not
+ // issue a warning, but do clear the status field or things
+ // get confused when resubmitting.
+ //
+ // Some host hardware does not distinguish between CRC errors
+ // (very rare) and timeouts (perfectly normal). Do not
+ // increment the error count if it might have been a timeout.
+ if (USB_ST_CRC != urb->status) {
+ usbeth->stats.rx_errors++;
+ }
+ urb->status = 0;
+ } else if (2 > urb->actual_length) {
+ // With some hardware the target may have to send a bogus
+ // first packet. Just ignore those.
+
+ } else {
+ len = usbeth->rx_buffer[0] + (usbeth->rx_buffer[1] << 8);
+ if (len > (urb->actual_length - 2)) {
+ usbeth->stats.rx_errors++;
+ usbeth->stats.rx_length_errors++;
+ printk("ecos_usbeth: warning, packet size mismatch, got %d bytes, expected %d\n",
+ urb->actual_length, len);
+ } else {
+ skb = dev_alloc_skb(len + 2);
+ if ((struct sk_buff*)0 == skb) {
+ printk("ecos_usbeth: failed to alloc skb, dropping packet\n");
+ usbeth->stats.rx_dropped++;
+ } else {
+#if 0
+ {
+ int i;
+ printk("--------------------------------------------------------------\n");
+ printk("ecos_usbeth RX: total size %d\n", len);
+ for (i = 0; (i < len) && (i < 128); i+= 8) {
+ printk("rx %x %x %x %x %x %x %x %x\n",
+ usbeth->rx_buffer[i+0], usbeth->rx_buffer[i+1], usbeth->rx_buffer[i+2], usbeth->rx_buffer[i+3],
+ usbeth->rx_buffer[i+4], usbeth->rx_buffer[i+5], usbeth->rx_buffer[i+6], usbeth->rx_buffer[i+7]);
+ }
+ printk("--------------------------------------------------------------\n");
+ }
+#endif
+ skb->dev = net;
+ eth_copy_and_sum(skb, &(usbeth->rx_buffer[2]), len, 0);
+ skb_put(skb, len);
+ skb->protocol = eth_type_trans(skb, net);
+ netif_rx(skb);
+ usbeth->stats.rx_packets++;
+ usbeth->stats.rx_bytes += len;
+ }
+ }
+ }
+
+ if (0 != netif_running(net)) {
+ res = usb_submit_urb(&(usbeth->rx_urb));
+ if (0 != res) {
+ printk("ecos_usbeth: failed to restart USB receives after packet, %d\n", res);
+ }
+ }
+}
+
+// start_tx().
+// Transmit a single packet. The relevant USB protocol requires a
+// 2-byte length field at the start, the incoming buffer has no space
+// for this, and the URB API does not support any form of
+// scatter/gather. Therefore unfortunately the whole packet has to be
+// copied. The callback function is specified when the URB is filled
+// in by probe().
+static void
+ecos_usbeth_tx_callback(struct urb* urb)
+{
+ ecos_usbeth* usbeth = (ecos_usbeth*) urb->context;
+ spin_lock(&usbeth->usb_lock);
+ if (0 != netif_running(usbeth->net_dev)) {
+ netif_wake_queue(usbeth->net_dev);
+ }
+ spin_unlock(&usbeth->usb_lock);
+}
+
+static int
+ecos_usbeth_start_tx(struct sk_buff* skb, struct net_device* net)
+{
+ ecos_usbeth* usbeth = (ecos_usbeth*) net->priv;
+ int res;
+
+ if ((skb->len + 2) > ECOS_USBETH_MAXTU) {
+ printk("ecos_usbeth: oversized packet of %d bytes\n", skb->len);
+ return 0;
+ }
+
+ if (netif_queue_stopped(net)) {
+ // Another transmission already in progress.
+ // USB bulk operations should complete within 5s.
+ int current_delay = jiffies - net->trans_start;
+ if (current_delay < (5 * HZ)) {
+ return 1;
+ } else {
+ // There has been a timeout. Discard this message.
+ //printk("transmission timed out\n");
+ usbeth->stats.tx_errors++;
+ dev_kfree_skb(skb);
+ return 0;
+ }
+ }
+
+ spin_lock(&usbeth->usb_lock);
+ usbeth->tx_buffer[0] = skb->len & 0x00FF;
+ usbeth->tx_buffer[1] = (skb->len >> 8) & 0x00FF;
+ memcpy(&(usbeth->tx_buffer[2]), skb->data, skb->len);
+ usbeth->tx_urb.transfer_buffer_length = skb->len + 2;
+
+ // Some targets are unhappy about receiving 0-length packets, not
+ // just sending them.
+ if (0 == (usbeth->tx_urb.transfer_buffer_length % 64)) {
+ usbeth->tx_urb.transfer_buffer_length++;
+ }
+#if 0
+ {
+ int i;
+ printk("--------------------------------------------------------------\n");
+ printk("ecos_usbeth start_tx: len %d\n", skb->len + 2);
+ for (i = 0; (i < (skb->len + 2)) && (i < 128); i+= 8) {
+ printk("tx %x %x %x %x %x %x %x %x\n",
+ usbeth->tx_buffer[i], usbeth->tx_buffer[i+1], usbeth->tx_buffer[i+2], usbeth->tx_buffer[i+3],
+ usbeth->tx_buffer[i+4], usbeth->tx_buffer[i+5], usbeth->tx_buffer[i+6], usbeth->tx_buffer[i+7]);
+ }
+ printk("--------------------------------------------------------------\n");
+ }
+#endif
+ res = usb_submit_urb(&(usbeth->tx_urb));
+ if (0 == res) {
+ netif_stop_queue(net);
+ net->trans_start = jiffies;
+ usbeth->stats.tx_packets++;
+ usbeth->stats.tx_bytes += skb->len;
+ } else {
+ printk("ecos_usbeth: failed to start USB packet transmission, %d\n", res);
+ usbeth->stats.tx_errors++;
+ }
+
+ spin_unlock(&usbeth->usb_lock);
+ dev_kfree_skb(skb);
+ return 0;
+}
+
+
+// set_rx_mode()
+// Invoked by the network stack to enable/disable promiscuous mode or
+// for multicasting. The latter is not yet supported on the target
+// side. The former involves a USB control message. The main call
+// is not allowed to block.
+static void
+ecos_usbeth_set_rx_mode_callback(struct urb* urb)
+{
+ kfree(urb->setup_packet);
+ usb_free_urb(urb);
+}
+
+static void
+ecos_usbeth_set_rx_mode(struct net_device* net)
+{
+ ecos_usbeth* usbeth = (ecos_usbeth*) net->priv;
+ __u16 promiscuous = net->flags & IFF_PROMISC;
+ int res;
+
+ if (promiscuous != usbeth->target_promiscuous) {
+ devrequest* req;
+ urb_t* urb;
+
+ urb = usb_alloc_urb(0);
+ if ((urb_t*)0 == urb) {
+ return;
+ }
+ req = kmalloc(sizeof(devrequest), GFP_KERNEL);
+ if ((devrequest*)0 == req) {
+ usb_free_urb(urb);
+ return;
+ }
+ req->requesttype = USB_TYPE_CLASS | USB_RECIP_DEVICE;
+ req->request = ECOS_USBETH_CONTROL_SET_PROMISCUOUS_MODE;
+ req->value = cpu_to_le16p(&promiscuous);
+ req->index = 0;
+ req->length = 0;
+
+ FILL_CONTROL_URB(urb,
+ usbeth->usb_dev,
+ usb_sndctrlpipe(usbeth->usb_dev, 0),
+ (unsigned char*) req,
+ (void*) 0,
+ 0,
+ &ecos_usbeth_set_rx_mode_callback,
+ (void*) usbeth);
+ res = usb_submit_urb(urb);
+ if (0 != res) {
+ kfree(req);
+ usb_free_urb(urb);
+ } else {
+ usbeth->target_promiscuous = promiscuous;
+ }
+ }
+}
+
+// netdev_stats()
+// Supply the current network statistics. These are held in
+// the stats field of the ecos_usbeth structure
+static struct net_device_stats*
+ecos_usbeth_netdev_stats(struct net_device* net)
+{
+ ecos_usbeth* usbeth = (ecos_usbeth*) net->priv;
+ return &(usbeth->stats);
+}
+
+// ioctl()
+// Currently none of the network ioctl()'s are supported
+static int
+ecos_usbeth_ioctl(struct net_device* net, struct ifreq* request, int command)
+{
+ return -EINVAL;
+}
+
+// probe().
+// This is invoked by the generic USB code when a new device has
+// been detected and its configuration details have been extracted
+// and stored in the usbdev structure. The interface_id specifies
+// a specific USB interface, to cope with multifunction peripherals.
+//
+// FIXME; right now this code only copes with simple enumeration data.
+// OK, to be really honest it just looks for the vendor and device ids
+// in the simple test cases and ignores everything else.
+//
+// On success it should return a non-NULL pointer, which happens to be
+// a newly allocated ecos_usbeth structure. This will get passed to
+// the disconnect function. Filling in the ecos_usbeth structure will,
+// amongst other things, register this as a network device driver.
+// The MAC address is obtained from the peripheral via a control
+// request.
+
+static void*
+ecos_usbeth_probe(struct usb_device* usbdev, unsigned int interface_id)
+{
+ struct net_device* net;
+ ecos_usbeth* usbeth;
+ int res;
+ unsigned char MAC[6];
+ unsigned char dummy[1];
+ int tx_endpoint = -1;
+ int rx_endpoint = -1;
+ const ecos_usbeth_impl* impl;
+ int found_impl = 0;
+
+ // See if this is the correct driver for this USB peripheral.
+ impl = ecos_usbeth_implementations;
+ while (impl->name != NULL) {
+ if ((usbdev->descriptor.idVendor != impl->vendor) ||
+ (usbdev->descriptor.idProduct != impl->id)) {
+ found_impl = 1;
+ break;
+ }
+ impl++;
+ }
+ if (! found_impl) {
+ return (void*) 0;
+ }
+
+ // For now only support USB-ethernet peripherals consisting of a single
+ // configuration, with a single interface, with two bulk endpoints.
+ if ((1 != usbdev->descriptor.bNumConfigurations) ||
+ (1 != usbdev->config[0].bNumInterfaces) ||
+ (2 != usbdev->config[0].interface[0].altsetting->bNumEndpoints)) {
+ return (void*) 0;
+ }
+ if ((0 == (usbdev->config[0].interface[0].altsetting->endpoint[0].bEndpointAddress & USB_DIR_IN)) &&
+ (0 != (usbdev->config[0].interface[0].altsetting->endpoint[1].bEndpointAddress & USB_DIR_IN))) {
+ tx_endpoint = usbdev->config[0].interface[0].altsetting->endpoint[0].bEndpointAddress;
+ rx_endpoint = usbdev->config[0].interface[0].altsetting->endpoint[1].bEndpointAddress & ~USB_DIR_IN;
+ }
+ if ((0 != (usbdev->config[0].interface[0].altsetting->endpoint[0].bEndpointAddress & USB_DIR_IN)) &&
+ (0 == (usbdev->config[0].interface[0].altsetting->endpoint[1].bEndpointAddress & USB_DIR_IN))) {
+ tx_endpoint = usbdev->config[0].interface[0].altsetting->endpoint[1].bEndpointAddress;
+ rx_endpoint = usbdev->config[0].interface[0].altsetting->endpoint[0].bEndpointAddress & ~USB_DIR_IN;
+ }
+ if (-1 == tx_endpoint) {
+ return (void*) 0;
+ }
+
+ res = usb_set_configuration(usbdev, usbdev->config[0].bConfigurationValue);
+ if (0 != res) {
+ printk("ecos_usbeth: failed to set configuration, %d\n", res);
+ return (void*) 0;
+ }
+ res = usb_control_msg(usbdev,
+ usb_rcvctrlpipe(usbdev, 0),
+ ECOS_USBETH_CONTROL_GET_MAC_ADDRESS,
+ USB_TYPE_CLASS | USB_RECIP_DEVICE | USB_DIR_IN,
+ 0,
+ 0,
+ (void*) MAC,
+ 6,
+ 5 * HZ);
+ if (6 != res) {
+ printk("ecos_usbeth: failed to get MAC address, %d\n", res);
+ return (void*) 0;
+ }
+
+ res = usb_control_msg(usbdev,
+ usb_sndctrlpipe(usbdev, 0), // pipe
+ ECOS_USBETH_CONTROL_SET_PROMISCUOUS_MODE, // request
+ USB_TYPE_CLASS | USB_RECIP_DEVICE, // requesttype
+ 0, // value
+ 0, // index
+ (void*) dummy, // data
+ 0, // size
+ 5 * HZ); // timeout
+ if (0 != res) {
+ printk("ecos_usbeth: failed to disable promiscous mode, %d\n", res);
+ }
+
+ usbeth = (ecos_usbeth*) kmalloc(sizeof(ecos_usbeth), GFP_KERNEL);
+ if ((ecos_usbeth*)0 == usbeth) {
+ printk("ecos_usbeth: failed to allocate memory for usbeth data structure\n");
+ return (void*) 0;
+ }
+ memset(usbeth, 0, sizeof(ecos_usbeth));
+
+ net = init_etherdev(0, 0);
+ if ((struct net_device*) 0 == net) {
+ kfree(usbeth);
+ printk("ecos_usbeth: failed to allocate memory for net data structure\n");
+ return (void*) 0;
+ }
+
+ usbeth->usb_lock = SPIN_LOCK_UNLOCKED;
+ usbeth->usb_dev = usbdev;
+ FILL_BULK_URB(&(usbeth->tx_urb), usbdev, usb_sndbulkpipe(usbdev, tx_endpoint),
+ usbeth->tx_buffer, ECOS_USBETH_MAXTU, &ecos_usbeth_tx_callback, (void*) usbeth);
+ FILL_BULK_URB(&(usbeth->rx_urb), usbdev, usb_rcvbulkpipe(usbdev, rx_endpoint),
+ usbeth->rx_buffer, ECOS_USBETH_MAXTU, &ecos_usbeth_rx_callback, (void*) usbeth);
+
+ usbeth->net_dev = net;
+ usbeth->target_promiscuous = 0;
+
+ net->priv = (void*) usbeth;
+ net->open = &ecos_usbeth_open;
+ net->stop = &ecos_usbeth_close;
+ net->do_ioctl = &ecos_usbeth_ioctl;
+ net->hard_start_xmit = &ecos_usbeth_start_tx;
+ net->set_multicast_list = &ecos_usbeth_set_rx_mode;
+ net->get_stats = &ecos_usbeth_netdev_stats;
+ net->mtu = 1500; // ECOS_USBETH_MAXTU - 2;
+ memcpy(net->dev_addr, MAC, 6);
+
+ printk("eCos-based USB ethernet peripheral active at %s\n", net->name);
+ MOD_INC_USE_COUNT;
+ return (void*) usbeth;
+}
+
+// disconnect().
+// Invoked after probe() has recognized a device but that device
+// has gone away.
+static void
+ecos_usbeth_disconnect(struct usb_device* usbdev, void* data)
+{
+ ecos_usbeth* usbeth = (ecos_usbeth*) data;
+ if (!usbeth) {
+ printk("ecos_usbeth: warning, disconnecting unconnected device\n");
+ return;
+ }
+ if (0 != netif_running(usbeth->net_dev)) {
+ ecos_usbeth_close(usbeth->net_dev);
+ }
+ unregister_netdev(usbeth->net_dev);
+ if (-EINPROGRESS == usbeth->rx_urb.status) {
+ usb_unlink_urb(&(usbeth->rx_urb));
+ }
+ if (-EINPROGRESS == usbeth->tx_urb.status) {
+ usb_unlink_urb(&(usbeth->tx_urb));
+ }
+ kfree(usbeth);
+ MOD_DEC_USE_COUNT;
+}
+
+static struct usb_driver ecos_usbeth_driver = {
+ name: "ecos_usbeth",
+ probe: ecos_usbeth_probe,
+ disconnect: ecos_usbeth_disconnect,
+};
+
+// init()
+// Called when the module is loaded. It just registers the device with
+// the generic USB code. Nothing else can really be done until
+// the USB code detects that a device has been attached.
+int __init
+ecos_usbeth_init(void)
+{
+ printk("eCos USB-ethernet device driver\n");
+ return usb_register(&ecos_usbeth_driver);
+}
+
+// exit()
+// Called when the module is unloaded. disconnect() will be
+// invoked if appropriate.
+void __exit
+ecos_usbeth_exit(void)
+{
+ usb_deregister(&ecos_usbeth_driver);
+}
+
+module_init(ecos_usbeth_init);
+module_exit(ecos_usbeth_exit);
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/include/usbs_eth.h b/cesar/ecos/packages/io/usb/eth/slave/current/include/usbs_eth.h
new file mode 100644
index 0000000000..5cfb41be9d
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/include/usbs_eth.h
@@ -0,0 +1,410 @@
+#ifndef CYGONCE_USBS_ETH_H
+#define CYGONCE_USBS_ETH_H_
+//==========================================================================
+//
+// include/usbs_eth.h
+//
+// Description of the USB slave-side ethernet support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 2000-10-04
+// Purpose:
+// Description: USB slave-side ethernet support
+//
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//
+// The primary purpose of the USB slave-side ethernet code is to
+// provide an ethernet service for the host. Essentially this means
+// the following:
+//
+// 1) the host can transmit an ethernet frame to the USB peripheral.
+// This frame is received by the code in this package and then
+// passed up to higher-level code for processing. Typically the
+// frame will originate from a TCP/IP stack running inside the
+// host, and the higher-level code will forward the frame via a
+// real ethernet chip or some other ethernet-style device.
+//
+// 2) higher-level code will provide ethernet frames to be sent to
+// the host, usually to a TCP/IP stack running on the host. The
+// exact source of the ethernet frame is not known.
+//
+// 3) the host may initiate a number of control operations, for
+// example it may request the MAC address or it may want to
+// control the filtering mode (e.g. enable promiscuous mode).
+//
+// 4) there are USB control-related operations, for example actions
+// to be taken when the peripheral is disconnected from the
+// bus or when the host wants to disable the ethernet interface.
+//
+// It is possible to develop a USB ethernet peripheral that does not
+// involve a TCP/IP stack inside the peripheral, in fact that is the
+// most common implementation. Instead a typical peripheral would
+// involve a USB port, an ethernet port, and a cheap microcontroller
+// just powerful enough to forward packets between the two. The eCos
+// USB code can be used in this way, and the primary external
+// interface provides enough functionality for this to work.
+//
+// +---------------+ ethernet
+// +----+ | | |
+// | | USB | app | |
+// |host|---------| / \ |-----o
+// | | | / \ | |
+// +----+ | USB-eth eth | |
+// +---------------+ |
+// USB peripheral
+//
+// Note that the USB-ethernet code does not know anything about the
+// real ethernet device or what the application gets up to, it just
+// provides an interface to the app. The above represents just one
+// possible use for a USB-ethernet device.
+//
+// Also worth mentioning: when the host TCP/IP stack requests the MAC
+// address USB-eth would normally respond with the MAC address for the
+// real ethernet device. That way things like host-side DHCP should
+// just work.
+//
+// Alternatively for some applications it is desirable to run a TCP/IP
+// stack inside the peripheral as well as on the host. This makes
+// things a fair bit more complicated, something like this.
+//
+// +---------------+
+// | app |
+// | | | ethernet
+// +----+ | | | |
+// | | USB | TCP/IP | |
+// |host|---------| / \ |-----o
+// | | | / \ | |
+// +----+ | USB-eth eth | |
+// +---------------+ |
+// USB peripheral
+//
+//
+// Usually this will involve enabling the bridge code in the TCP/IP
+// stack, or possibly performing some sort of bridging below the
+// TCP/IP stack. One way of getting things to work is to view the
+// USB connection as a small ethernet segment with just two
+// attached machines, the host and the peripheral. The two will
+// need separate MAC addresses, in addition to the MAC address
+// for the real ethernet device. This way the bridge code
+// sees things the way it expects.
+//
+// There will still be some subtle differences between a setup like
+// this and a conventional ethernet bridge, mainly because there
+// is a host-side TCP/IP stack which can perform control operations.
+// For example the host stack may request that USB-eth go into
+// promiscuous mode. A conventional ethernet bridge just deals
+// with ethernet segments and does not need to worry about
+// control requests coming in from one of the segments.
+//
+// It is not absolutely essential that there is another network.
+// However without another network this setup would look to the host
+// like an ethernet segment with just two machines attached to it, the
+// host itself and the USB peripheral, yet it still involves all the
+// complexities of ethernet such as broadcast masks and IP subnets.
+// Anything along these lines is likely to prove somewhat confusing,
+// and the USB peripheral should probably act like some other class
+// of USB device instead.
+//
+// One special setup has the host acting as a bridge to another
+// network, rather than the peripheral. This might make sense for
+// mobile peripherals such as PDA's, as a way of connecting the
+// peripheral to an existing LAN without needing a LAN adapter.
+// Enabling bridging in the host may be a complex operation, limiting
+// the applicability of such a setup.
+//
+// This package will only implement the eCos network driver interface
+// if explicitly enabled. The package-specific interface is always
+// provided, although trying to mix and match the two may lead to
+// terrible confusion: once the network driver is active nothing else
+// should use the lower-level USB ethernet code. However application
+// code is responsible for initializing the package, and specifically
+// for providing details of the USB endpoints that should be used.
+//
+// The package assumes that it needs to provide just one
+// instantiation. Conceivably there may be applications where it makes
+// sense for a USB peripheral to supply two separate ethernet devices
+// to the host, but that would be an unusual setup. Also a peripheral
+// might provide two or more USB slave ports to allow multiple hosts
+// to be connected, with a separate USB-ethernet instantiation for
+// each port, but again that would be an unusual setup. Applications
+// which do require more than one instantiation are responsible
+// for doing this inside the application code.
+
+// The public interface depends on configuration options.
+#include <pkgconf/io_usb_slave_eth.h>
+
+// Define the interface in terms of eCos data types.
+#include <cyg/infra/cyg_type.h>
+
+// The generic USB support
+#include <cyg/io/usb/usbs.h>
+
+// Network driver definition, to support cloning of usbs_eth_netdev0
+#ifdef CYGPKG_USBS_ETHDRV
+# include <cyg/io/eth/netdev.h>
+#endif
+
+// Cache details, to allow alignment to cache line boundaries etc.
+#include <cyg/hal/hal_cache.h>
+
+// ----------------------------------------------------------------------------
+// Maximum transfer size. This is not specified by io/eth. It can be
+// determined from <netinet/if_ether.h> but the TCP/IP stack may not
+// be loaded so that header file cannot be used.
+//
+// Some (most?) USB implementations have implementation problems. For
+// example the SA11x0 family cannot support transfers that are exact
+// multiples of the 64-byte USB bulk packet size, instead it is
+// necessary to add explicit size information. This can be encoded
+// conveniently at the start of the buffer.
+//
+// So the actual MTU consists of:
+// 1) a 1500 byte payload
+// 2) the usual ethernet header with a six-byte source MAC
+// address, a six-byte destination MAC address, and a
+// two-byte protocol or length field, for a total header
+// size of 14 bytes.
+// 3) an extra two bytes of size info.
+//
+// For a total of 1516 bytes.
+#define CYGNUM_USBS_ETH_MAX_FRAME_SIZE 1514
+#define CYGNUM_USBS_ETH_MAXTU (CYGNUM_USBS_ETH_MAX_FRAME_SIZE + 2)
+
+// Although the minimum ethernet frame size is 60 bytes, this includes
+// padding which is not needed when transferring over USB. Hence the
+// actual minimum is just the 14 byte ethernet header plus two bytes
+// for the length.
+#define CYGNUM_USBS_ETH_MIN_FRAME_SIZE 14
+#define CYGNUM_USBS_ETH_MINTU (CYGNUM_USBS_ETH_MIN_FRAME_SIZE + 2)
+
+// Typical USB devices involve DMA operations and hence confusion
+// between cached and uncached memory. To make life easier for
+// the underlying USB device drivers, this package ensures that
+// receive operations always involve buffers that are aligned to
+// a cache-line boundary and that are a multiple of the cacheline
+// size.
+#ifndef HAL_DCACHE_LINE_SIZE
+# define CYGNUM_USBS_ETH_RXBUFSIZE CYGNUM_USBS_ETH_MAXTU
+# define CYGNUM_USBS_ETH_RXSIZE CYGNUM_USBS_ETH_MAXTU
+#else
+# define CYGNUM_USBS_ETH_RXBUFSIZE ((CYGNUM_USBS_ETH_MAXTU + HAL_DCACHE_LINE_SIZE + HAL_DCACHE_LINE_SIZE - 1) \
+ & ~(HAL_DCACHE_LINE_SIZE - 1))
+# define CYGNUM_USBS_ETH_RXSIZE ((CYGNUM_USBS_ETH_MAXTU + HAL_DCACHE_LINE_SIZE - 1) & ~(HAL_DCACHE_LINE_SIZE - 1))
+#endif
+
+// ----------------------------------------------------------------------------
+// This data structure serves two purposes. First, it keeps track of
+// the information needed by the low-level USB ethernet code, for
+// example which endpoints should be used for incoming and outgoing
+// packets. Second, if the support for the TCP/IP stack is enabled
+// then there are additional fields to support that (e.g. for keeping
+// track of statistics).
+//
+// Arguably the two uses should be separated into distinct data
+// structures. That would make it possible to instantiate multiple
+// low-level USB-ethernet devices but only have a network driver for
+// one of them. Achieving that flexibility would require some extra
+// indirection, affecting performance and code-size, and it is not
+// clear that that flexibility would ever prove useful. For now having
+// a single data structure seems more appropriate.
+
+typedef struct usbs_eth {
+
+ // What endpoints should be used for communication?
+ usbs_control_endpoint* control_endpoint;
+ usbs_rx_endpoint* rx_endpoint;
+ usbs_tx_endpoint* tx_endpoint;
+
+ // Is the host ready to receive packets? This state is determined
+ // largely by control packets sent from the host. It can change at
+ // DSR level.
+ volatile cyg_bool host_up;
+
+ // Has the host-side set promiscuous mode? This is relevant to the
+ // network driver which may need to do filtering based on the MAC
+ // address and host-side promiscuity.
+ volatile cyg_bool host_promiscuous;
+
+ // The host MAC address. This is the address supplied to the
+ // host's TCP/IP stack and filled in by the init function. There
+ // is no real hardware to extract the address from.
+ unsigned char host_MAC[6];
+
+ // Needed for callback operations.
+ void (*tx_callback_fn)(struct usbs_eth*, void*, int);
+ void* tx_callback_arg;
+
+ void (*rx_callback_fn)(struct usbs_eth*, void*, int);
+ void* rx_callback_arg;
+
+ // RX operations just block if the host is not connected, resuming
+ // when a connection is established. This means saving the buffer
+ // pointer so that when the host comes back up the rx operation
+ // proper can start. This is not quite consistent because if the
+ // connection breaks while an RX is in progress there will be a
+ // callback with an error code whereas an RX on a broken
+ // connection just blocks, but this does fit neatly into an
+ // event-driven I/O model.
+ unsigned char* rx_pending_buf;
+
+#ifdef CYGPKG_USBS_ETHDRV
+ // Has the TCP/IP stack brought up this interface yet?
+ cyg_bool ecos_up;
+
+ // Is there an ongoing receive? Cancelling a receive operation
+ // during a stop() may be difficult, and a stop() may be followed
+ // immediately by a restart.
+ cyg_bool rx_active;
+
+ // The eCos-side MAC. If the host and the eCos stack are to
+ // communicate then they must be able to address each other, i.e.
+ // they need separate addresses. Again there is no real hardware
+ // to extract the address from so it has to be supplied by higher
+ // level code via e.g. an ioctl().
+ unsigned char ecos_MAC[6];
+
+ // SNMP statistics
+# ifdef CYGFUN_USBS_ETHDRV_STATISTICS
+ unsigned int interrupts;
+ unsigned int tx_count;
+ unsigned int rx_count;
+ unsigned int rx_short_frames;
+ unsigned int rx_too_long_frames;
+# endif
+
+ // The need for a receive buffer is unavoidable for now because
+ // the network driver interface does not support pre-allocating an
+ // mbuf and then passing it back to the stack later. Ideally the
+ // rx operation would read a single USB packet, determine the
+ // required mbuf size from the 2-byte header, copy the initial
+ // data, and then read more USB packets. Alternatively, a
+ // 1516 byte mbuf could be pre-allocated and then the whole
+ // transfer could go there, potentially wasting some mbuf space.
+ // None of this is possible at present.
+ //
+ // Also, typically there will be complications because of
+ // dependencies on DMA, cached vs. uncached memory, etc.
+ unsigned char rx_buffer[CYGNUM_USBS_ETH_RXBUFSIZE];
+ unsigned char* rx_bufptr;
+ cyg_bool rx_buffer_full;
+
+ // It should be possible to eliminate the tx buffer. The problem
+ // is that the protocol requires 2 bytes to be prepended, and that
+ // may not be possible with the buffer supplied by higher-level
+ // code. Eliminating this buffer would either require USB
+ // device drivers to implement gather functionality on transmits,
+ // or it would impose a dependency on higher-level code.
+ unsigned char tx_buffer[CYGNUM_USBS_ETH_MAXTU];
+ cyg_bool tx_buffer_full;
+ cyg_bool tx_done;
+ unsigned long tx_key;
+
+ // Prevent recursion send()->tx_done()->can_send()/send()
+ cyg_bool tx_in_send;
+#endif
+
+} usbs_eth;
+
+// The package automatically instantiates one USB ethernet device.
+extern usbs_eth usbs_eth0;
+
+// ----------------------------------------------------------------------------
+// If the network driver option is enabled then the package also
+// provides a single cyg_netdevtab_entry. This is exported so that
+// application code can clone the entry.
+#ifdef CYGPKG_USBS_ETHDRV
+extern cyg_netdevtab_entry_t usbs_eth_netdev0;
+#endif
+
+// ----------------------------------------------------------------------------
+// A C interface to the low-level USB code.
+
+// Initialize the USBS-eth support for a particular usbs_eth device.
+// This associates a usbs_eth structure with specific endpoints.
+extern void usbs_eth_init(usbs_eth*, usbs_control_endpoint*, usbs_rx_endpoint*, usbs_tx_endpoint*, unsigned char*);
+
+// Start an asynchronous transmit of a single buffer of up to
+// CYGNUM_USBS_ETH_MAXTU bytes. This buffer should contain a 2-byte
+// size field, a 14-byte ethernet header, and upto 1500 bytes of
+// payload. When the transmit has completed the callback function (if
+// any) will be invoked with the specified pointer. NOTE: figure out
+// what to do about error reporting
+extern void usbs_eth_start_tx(usbs_eth*, unsigned char*, void (*)(usbs_eth*, void*, int), void*);
+
+// Start an asynchronous receive of an ethernet packet. The supplied
+// buffer should be at least CYGNUM_USBS_ETH_MAXTU bytes. When a
+// complete ethernet frame has been received or when some sort of
+// error occurs the callback function will be invoked. The third
+// argument
+extern void usbs_eth_start_rx(usbs_eth*, unsigned char*, void (*)(usbs_eth*, void*, int), void*);
+
+// The handler for application class control messages. The init call
+// will install this in the control endpoint by default. However the
+// handler is fairly dumb: it assumes that all application control
+// messages are for the ethernet interface and does not bother to
+// check the control message's destination. This is fine for simple
+// USB ethernet devices, but for any kind of multi-function peripheral
+// higher-level code will have to perform multiplexing and invoke this
+// handler only when appropriate.
+extern usbs_control_return usbs_eth_class_control_handler(usbs_control_endpoint*, void*);
+
+// Similarly a handler for state change messages. Installing this
+// means that the ethernet code will have sufficient knowledge about
+// the state of the USB connection for simple ethernet-only
+// peripherals, but not for anything more complicated. In the latter
+// case higher-level code will need to keep track of which
+// configuration, interfaces, etc. are currently active and explicitly
+// enable or disable the ethernet device using the functions below.
+extern void usbs_eth_state_change_handler(usbs_control_endpoint*, void*, usbs_state_change, int);
+extern void usbs_eth_disable(usbs_eth*);
+extern void usbs_eth_enable(usbs_eth*);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // CYGONCE_USBS_ETH_H_
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/src/usbseth.c b/cesar/ecos/packages/io/usb/eth/slave/current/src/usbseth.c
new file mode 100644
index 0000000000..8c27331eea
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/src/usbseth.c
@@ -0,0 +1,321 @@
+//==========================================================================
+//
+// usbseth.c
+//
+// Support for USB-ethernet devices, slave-side.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 2000-10-04
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/cyg_trac.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/drv_api.h>
+
+#include <pkgconf/io_usb_slave_eth.h>
+
+#define __ECOS 1
+#include <cyg/io/usb/usbs_eth.h>
+
+#ifdef CYGPKG_USBS_ETHDRV
+#include <cyg/io/eth/netdev.h>
+#include <cyg/io/eth/eth_drv.h>
+#endif
+
+// ----------------------------------------------------------------------------
+// Static data.
+//
+// usbs_eth0 contains the per-device data, both the low-level data
+// such as which endpoints to use and the network-driver data such as
+// SNMP statistics. If this package is loaded then the assumption
+// is that there should be at least one USB-ethernet device. Additional
+// ones can be instantiated in application code if necessary. A call
+// to usbs_eth_init() is required for initialization.
+usbs_eth usbs_eth0;
+
+// ----------------------------------------------------------------------------
+// Initialization. This should be called explicitly by application code
+// at an appropriate point in the system startup.
+void
+usbs_eth_init(usbs_eth* eth, usbs_control_endpoint* ctrl, usbs_rx_endpoint* rx, usbs_tx_endpoint* tx, unsigned char* mac)
+{
+ eth->control_endpoint = ctrl;
+ eth->rx_endpoint = rx;
+ eth->tx_endpoint = tx;
+ eth->host_up = false;
+ eth->host_promiscuous = false;
+ memcpy(eth->host_MAC, mac, 6);
+ eth->rx_pending_buf = (unsigned char*) 0;
+
+ // Install default handlers for some messages. Higher level code
+ // may override this.
+ ctrl->state_change_fn = &usbs_eth_state_change_handler;
+ ctrl->state_change_data = (void*) eth;
+ ctrl->class_control_fn = &usbs_eth_class_control_handler;
+ ctrl->class_control_data = (void*) eth;
+
+#ifdef CYGPKG_USBS_ETHDRV
+ eth->ecos_up = false;
+ eth->rx_active = false;
+# ifdef CYGFUN_USBS_ETHDRV_STATISTICS
+ eth->interrupts = 0;
+ eth->tx_count = 0;
+ eth->rx_count = 0;
+# endif
+# ifndef HAL_DCACHE_LINE_SIZE
+ eth->rx_bufptr = eth->rx_buffer;
+# else
+# endif
+ eth->rx_bufptr = (unsigned char*) ((((cyg_uint32)eth->rx_buffer) + HAL_DCACHE_LINE_SIZE - 1)
+ & ~(HAL_DCACHE_LINE_SIZE - 1));
+ eth->rx_buffer_full = false;
+ eth->tx_in_send = false;
+ eth->tx_buffer_full = false;
+ eth->tx_done = false;
+#endif
+}
+
+
+// ----------------------------------------------------------------------------
+// Generic transmit and receive operations. These can be called
+// explicitly by application code, or implicitly via the eCos ethernet
+// device driver code in usbsethdrv.c. These two modes of operation
+// should not be mixed since the routines do not perform any
+// synchronization themselves, instead they rely on higher level code.
+
+// Packet transmission. The exported function is usbs_eth_start_tx(),
+// which can be invoked from thread context or DSR context. The
+// supplied buffer must already be in a form that can be transmitted
+// directly out of the USB endpoint with no further processing
+// (although it is necessary to extract the size information from the
+// buffer).
+//
+// When the underlying USB transfer has completed the USB code will invoke
+// usbs_eth_tx_callback(), usually in DSR context although possibly in
+// thread context depending on the specific USB implementation. The
+// underlying USB driver may have had to do some padding so the amount
+// transferred may be slightly greater than requested.
+
+static void
+usbs_eth_tx_callback(void* usbs_callback_arg, int size)
+{
+ usbs_eth* eth = (usbs_eth*) usbs_callback_arg;
+ CYG_ASSERT( (size < 0) || (size >= CYGNUM_USBS_ETH_MINTU), "returned size must be valid.");
+ (*eth->tx_callback_fn)(eth, eth->tx_callback_arg, size);
+}
+
+void
+usbs_eth_start_tx(usbs_eth* eth, unsigned char* buf, void (*callback_fn)(usbs_eth*, void*, int), void* callback_arg)
+{
+ int size;
+ cyg_bool address_ok = false;
+ static const unsigned char broadcast_mac[6] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
+
+ size = buf[0] + (buf[1] << 8);
+ CYG_ASSERT( (size < 0) || ((size >= CYGNUM_USBS_ETH_MIN_FRAME_SIZE) && (size <= CYGNUM_USBS_ETH_MAX_FRAME_SIZE)), \
+ "ethernet frame size constraints must be observed");
+
+ if ((0 == memcmp(buf + 2, eth->host_MAC, 6)) ||
+ (0 == memcmp(buf + 2, broadcast_mac, 6))) {
+ address_ok = true;
+ }
+
+ // The following checks involve data that can change as a result
+ // of control operations, so it is necessary to synchronize with
+ // those. The control operations will typically run at DSR level
+ // so a DSR lock has to be used.
+
+ cyg_drv_dsr_lock();
+ if (eth->host_up && (address_ok || eth->host_promiscuous)) {
+
+ eth->tx_callback_fn = callback_fn;
+ eth->tx_callback_arg = callback_arg;
+ eth->tx_endpoint->buffer = buf;
+ eth->tx_endpoint->buffer_size = size + 2;
+ eth->tx_endpoint->complete_fn = &usbs_eth_tx_callback;
+ eth->tx_endpoint->complete_data = (void*) eth;
+ (*(eth->tx_endpoint->start_tx_fn))(eth->tx_endpoint);
+
+ } else {
+ // Packets not intended for the host can be discarded quietly.
+ // A broken connection needs to be reported.
+ (*callback_fn)(eth, callback_arg, eth->host_up ? size : -EPIPE);
+ }
+ cyg_drv_dsr_unlock();
+}
+
+// Packet reception. This simply involves starting a transfer for
+// up to the maximum ethernet frame size. The lower-level USB code
+// will detect the end of the transfer. The exported function is
+// usbs_eth_start_rx().
+static void
+usbs_eth_rx_callback(void* usbs_callback_arg, int size)
+{
+ usbs_eth* eth = (usbs_eth*) usbs_callback_arg;
+
+ CYG_ASSERT( (size <= 0) || ((size >= CYGNUM_USBS_ETH_MINTU) && (size <= CYGNUM_USBS_ETH_MAXTU)), \
+ "ethernet frame size constraints must be observed");
+
+ (*eth->rx_callback_fn)(eth, eth->rx_callback_arg, size);
+}
+
+void
+usbs_eth_start_rx(usbs_eth* eth, unsigned char* buf, void (*callback_fn)(usbs_eth*, void*, int), void* callback_arg)
+{
+ eth->rx_callback_fn = callback_fn;
+ eth->rx_callback_arg = callback_arg;
+
+ cyg_drv_dsr_lock();
+ if (eth->host_up) {
+ eth->rx_endpoint->buffer = buf;
+ eth->rx_endpoint->buffer_size = CYGNUM_USBS_ETH_RXSIZE;
+ eth->rx_endpoint->complete_fn = &usbs_eth_rx_callback;
+ eth->rx_endpoint->complete_data = (void*) eth;
+ (*(eth->rx_endpoint->start_rx_fn))(eth->rx_endpoint);
+ } else {
+ CYG_ASSERT( (void*) 0 == eth->rx_pending_buf, "No RX operation should be in progress");
+ eth->rx_pending_buf = buf;
+ }
+ cyg_drv_dsr_unlock();
+}
+
+// ----------------------------------------------------------------------------
+// Control operations. The host may send two types of application-specific
+// control messages, one to get the MAC address and one to enable/disable
+// promiscuous mode on the host side. This callback will typically be invoked
+// in DSR context.
+
+// These constants need to be shared somehow with the driver in ../host/,
+// but if some variant of that driver becomes part of the Linux kernel
+// then its sources must be self-contained with no dependencies on
+// eCos sources or headers. Hence a duplicate definition for now.
+#define USBS_ETH_CONTROL_GET_MAC_ADDRESS 0x01
+#define USBS_ETH_CONTROL_SET_PROMISCUOUS_MODE 0x02
+
+usbs_control_return
+usbs_eth_class_control_handler(usbs_control_endpoint* endpoint, void* callback_data)
+{
+ usbs_control_return result = USBS_CONTROL_RETURN_STALL;
+
+ usbs_eth* eth = (usbs_eth*) callback_data;
+ usb_devreq* devreq = (usb_devreq*) endpoint->control_buffer;
+ int size = (devreq->length_hi << 8) + devreq->length_lo;
+
+ CYG_ASSERT(endpoint == eth->control_endpoint, "USB ethernet control messages correctly routed");
+
+ if (USBS_ETH_CONTROL_GET_MAC_ADDRESS == devreq->request) {
+ // This should be an IN operation for at least six bytes.
+ if ((size >= 6) &&
+ (USB_DEVREQ_DIRECTION_IN == (devreq->type & USB_DEVREQ_DIRECTION_MASK))) {
+
+ endpoint->buffer = eth->host_MAC;
+ endpoint->buffer_size = 6;
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+ // Otherwise drop through with a return value of STALL
+
+ } else if (USBS_ETH_CONTROL_SET_PROMISCUOUS_MODE == devreq->request) {
+ // The length should be 0, no more data is expected by either side.
+ if (0 == size) {
+ // The new promiscuity mode is encoded in value_lo;
+ eth->host_promiscuous = devreq->value_lo;
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+ }
+
+ return result;
+}
+
+// State changes. As far as the ethernet code is concerned, if there
+// is a change to CONFIGURED state then the device has come up,
+// otherwise if there is a change from CONFIGURED state it has gone
+// down. All other state changes are irrelevant.
+void
+usbs_eth_state_change_handler(usbs_control_endpoint* endpoint, void* callback_data, usbs_state_change change, int old_state)
+{
+ usbs_eth* eth = (usbs_eth*) callback_data;
+ CYG_ASSERT(endpoint == eth->control_endpoint, "USB ethernet state changes correctly routed");
+
+ if (USBS_STATE_CHANGE_CONFIGURED == change) {
+ if (USBS_STATE_CONFIGURED != old_state) {
+ usbs_eth_enable(eth);
+ }
+ } else if ((USBS_STATE_CHANGE_RESUMED == change) && (USBS_STATE_CONFIGURED == (USBS_STATE_MASK & old_state))) {
+ usbs_eth_enable(eth);
+ } else if (eth->host_up) {
+ usbs_eth_disable(eth);
+ }
+}
+
+// Disabling the ethernet device means clearing the host_up flag.
+// This will block future transmits and receives but not any
+// that are currently underway.
+void
+usbs_eth_disable(usbs_eth* eth)
+{
+ eth->host_up = false;
+}
+
+// Enabling the ethernet device means setting the host_up flag and
+// possibly activating a pending rx operation.
+void
+usbs_eth_enable(usbs_eth* eth)
+{
+ if (!eth->host_up) {
+ eth->host_up = true;
+ eth->host_promiscuous = false;
+ if ((void*) 0 != eth->rx_pending_buf) {
+ eth->rx_endpoint->buffer = eth->rx_pending_buf;
+ eth->rx_endpoint->buffer_size = CYGNUM_USBS_ETH_RXSIZE;
+ eth->rx_endpoint->complete_fn = &usbs_eth_rx_callback;
+ eth->rx_endpoint->complete_data = (void*) eth;
+ eth->rx_pending_buf = (void*) 0;
+ (*(eth->rx_endpoint->start_rx_fn))(eth->rx_endpoint);
+ }
+ }
+}
+
diff --git a/cesar/ecos/packages/io/usb/eth/slave/current/src/usbsethdrv.c b/cesar/ecos/packages/io/usb/eth/slave/current/src/usbsethdrv.c
new file mode 100644
index 0000000000..a58067d5f5
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/eth/slave/current/src/usbsethdrv.c
@@ -0,0 +1,617 @@
+//==========================================================================
+//
+// usbethdrv.c
+//
+// Network device driver for USB-ethernet devices.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 2000-10-04
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/drv_api.h>
+
+#define __ECOS 1
+#include <cyg/io/eth/netdev.h>
+#include <cyg/io/eth/eth_drv.h>
+#include <cyg/io/eth/eth_drv_stats.h>
+
+#include <pkgconf/io_usb_slave_eth.h>
+#include <cyg/io/usb/usbs_eth.h>
+
+// ----------------------------------------------------------------------------
+// The network driver data structure.
+ETH_DRV_SC(usbs_eth_sc0,
+ (void*) &usbs_eth0,
+ CYGDAT_USBS_ETHDRV_NAME,
+ usbs_ethdrv_start,
+ usbs_ethdrv_stop,
+ usbs_ethdrv_ioctl,
+ usbs_ethdrv_can_send,
+ usbs_ethdrv_send,
+ usbs_ethdrv_recv,
+ usbs_ethdrv_deliver,
+ usbs_ethdrv_poll,
+ usbs_ethdrv_intvector);
+
+NETDEVTAB_ENTRY(usbs_eth_netdev0,
+ "usbs_eth0",
+ usbs_ethdrv_init,
+ &usbs_eth_sc0);
+
+// ----------------------------------------------------------------------------
+// Statics gathering. The following macro can be used to increment a
+// statistic without having to use a #ifdef for the statistics
+// configuration option everywhere.
+#ifdef CYGFUN_USBS_ETHDRV_STATISTICS
+# define INCR_STAT(a) \
+ CYG_MACRO_START \
+ (a) += 1; \
+ CYG_MACRO_END
+#else
+# define INCR_STAT(a) CYG_EMPTY_STATEMENT
+#endif
+
+// Various constants related to SNMP statistics. It is not clear
+// what these are all for.
+#ifdef CYGFUN_USBS_ETHDRV_STATISTICS
+# define CYGDAT_USBS_ETHDRV_DESCRIPTION "eCos USB ethernet device"
+#endif
+// ----------------------------------------------------------------------------
+// Utility functions.
+//
+// The TCP/IP stack works in terms of scatter/gather buffers. USB tends to
+// involve DMA operations so it is more convenient to work in terms of
+// 1514 byte flat buffers. Actually, the first two bytes of the buffer
+// are used to hold the ethernet frame size to work around restrictions
+// with certain hardware implementations of USB that may be unable to
+// transfer certain packet sizes.
+
+static bool
+scatter(unsigned char* buf, struct eth_drv_sg* sg, int sg_len)
+{
+ unsigned int size;
+
+ size = buf[0] | (buf[1] << 8);
+ buf++; buf++;
+
+ CYG_ASSERT((size >= CYGNUM_USBS_ETH_MIN_FRAME_SIZE) && (size <= CYGNUM_USBS_ETH_MAX_FRAME_SIZE),\
+ "ethernet frame size limits must be observed");
+
+ while ((size > 0) && (sg_len > 0)) {
+ if (size > sg->len) {
+ memcpy((void*) sg->buf, buf, sg->len);
+ buf += sg->len;
+ size -= sg->len;
+ sg++;
+ sg_len--;
+ } else {
+ memcpy((void*) sg->buf, buf, size);
+ size = 0;
+ }
+ }
+
+ return 0 == size;
+}
+
+static bool
+gather(unsigned char* buf, unsigned int size, struct eth_drv_sg* sg, int sg_len)
+{
+ unsigned int left = size;
+ unsigned char* base = buf;
+
+ buf++; buf++;
+ while ((left > 0) && (sg_len > 0)) {
+ if (left > sg->len) {
+ memcpy(buf, (void*) sg->buf, sg->len);
+ buf += sg->len;
+ left -= sg->len;
+ sg++;
+ sg_len--;
+ } else {
+ memcpy(buf, (void*) sg->buf, left);
+ left = 0;
+ }
+ }
+ size = size - left;
+ base[0] = size & 0x00FF;
+ base[1] = (size >> 8) & 0x00FF;
+
+ return 0 == left;
+}
+
+
+// ----------------------------------------------------------------------------
+// usbs_ethdrv_init()
+//
+// This function is called during system initialization to decide
+// whether or not this particular network device is usable. For
+// USB-ethernet this is problematical, the device is only really
+// usable once both sides have come up. The typical sequence
+// of events is something like:
+//
+// 1) the eCos peripheral is powered up. Static constructors are
+// run resulting in basic initialization.
+//
+// 2) the eCos TCP/IP stack initialization happens. Roughly in
+// parallel the eCos USB slave side is initialized as well,
+// i.e. enumeration data is supplied to control endpoints,
+// endpoints are associated with application classes, and so
+// on. The relative order of TCP/IP and USB initialization is
+// not particularly important.
+//
+// It is the TCP/IP stack's initialization code that will
+// invoke usbs_eth_init().
+//
+// 3) host-side USB detects that the eCos peripheral has been
+// connected or powered up. It goes through the enumeration
+// process and will end up loading a host-side network driver.
+// This connects to the eCos-side USB ethernet code to
+// e.g. obtain the MAC address.
+//
+// 4) when the host-side is ready, the eCos side can be brought up.
+// The required call is (sc->funs->eth_drv->init)(sc, enaddr)
+//
+// In practice it is easier for now to invoke the init() function
+// immediately. There are not going to be any incoming packets
+// until the host is ready, and can_send() can just return false
+// for the time being.
+//
+// Invoked in: thread context only
+// ----------------------------------------------------------------------------
+
+static bool
+usbs_ethdrv_init(struct cyg_netdevtab_entry* ndp)
+{
+ struct eth_drv_sc* sc = (struct eth_drv_sc*)(ndp->device_instance);
+ usbs_eth* eth = (usbs_eth*)(sc->driver_private);
+
+ (*sc->funs->eth_drv->init)(sc, eth->ecos_MAC);
+ return true;
+}
+
+// ----------------------------------------------------------------------------
+// The receive process that is used to transfer a received ethernet
+// packet into the stack. The calling sequence is somewhat convoluted.
+// It started off as:
+//
+// 1) Ethernet hw ISR invoked by hardware, schedules its own
+// hw_dsr(), and blocks further interrupts in the ethernet chip
+// 2) hw_dsr() calls generic eth_drv_dsr() from io/eth common package
+// 3) eth_drv_dsr() interacts with the TCP/IP stack and allocates mbufs
+// (typically, the TCP/IP stack might not be in use)
+// 4) eth_drv_dsr() calls usbs_eth_recv() to transfer the data to mbufs
+// 5) eth_drv_dsr() returns to hw_dsr() which reenables interrupts
+// 6) hw_dsr() completes and everything can proceed.
+//
+// The problem with this is that the whole ethernet packet gets copied
+// inside a DSR, affecting dispatch latency (but not interrupt latency).
+// This is bad. Hence there is an alternative route involving a separate
+// thread in the TCP/IP stack.
+//
+// 1) Ethernet hw ISR runs as before, scheduling hw_dsr()
+// 2) hw_dsr() calls up into eth_drv_dsr()
+// 3) eth_drv_dsr() wakes up a thread inside the TCP/IP stack
+// 4) eth_drv_dsr() returns to hw_dsr(), which performs no further
+// processing. Ethernet chip interrupts remain disabled.
+// 5) The TCP/IP thread ends up calling hw_deliver(). This should take
+// care of any pending activity. For every buffered packet there should
+// be a call to a generic recv() function which then goes back into
+// the driver-specific recv() function.
+//
+// The advantage is that ethernet packet copying now happens at thread
+// level rather than DSR level so thread priorities can be used to
+// schedule things.
+//
+// USB-ethernet does not interact directly with any hardware, instead
+// it just passes information to lower levels of USB code. The reception
+// process is started by usbs_ethdrv_start() when the TCP/IP stack brings
+// up the interface.
+//
+// When the USB transfer has completed a callback will be invoked, at
+// DSR level. Assuming the transfer went ok, the callback will invoke
+// eth_drv_dsr() to inform the higher level code.
+//
+// The deliver function can check the state of the buffer
+// and go through the sc->funs->eth_drv->recv()/recv() sequence
+// to transfer the data into the stack.
+//
+// usbs_ethdrv_recv() does a scatter from the internal buffer into the
+// mbuf, thus freeing up the buffer. This allows it to start another
+// receive,
+//
+// Synchronisation involves the scheduler lock because the recv
+// callback is invoked inside a DSR.
+
+static void usbs_ethdrv_halted_callback(void*, int);
+
+static void
+usbs_ethdrv_recv_callback(usbs_eth* eth, void* callback_data, int size)
+{
+ cyg_bool resubmit = true;
+
+ struct eth_drv_sc* sc = (struct eth_drv_sc*) callback_data;
+ CYG_ASSERT( eth == (usbs_eth*)(sc->driver_private), "USB and TCP/IP worlds need to be consistent");
+
+ INCR_STAT(eth->interrupts);
+ if (!eth->ecos_up) {
+ // This message should just be discarded since the eCos TCP/IP
+ // stack is not expecting anything from this interface.
+ // Reception will resume when the interface comes back up.
+ eth->rx_active = false;
+ resubmit = false;
+ } else if (size < 0) {
+ // An error has occurred. The likely possibilities are:
+ // -EPIPE: connection to the host has been broken
+ // -EAGAIN: the endpoint is haltedn
+ // -EMSGSIZE: bogus message from host
+ // -EIO: other
+
+ if (-EAGAIN == size) {
+ // EAGAIN should be handled by waiting for the endpoint to be reset.
+ resubmit = false;
+ usbs_start_rx_endpoint_wait(eth->rx_endpoint, &usbs_ethdrv_halted_callback, (void*) sc);
+ } else if (-EMSGSIZE == size) {
+ // Do nothing for now
+ } else {
+ // EPIPE should be resubmitted, the usbseth.c will use the
+ // pending rx support. EIO could mean anything.
+ }
+ } else if (0 == size) {
+ // The endpoint is no longer halted. Just do the resubmit at
+ // the end.
+ } else {
+ // A packet has been received. Now do a size sanity check
+ // based on the first two bytes.
+ int real_size = eth->rx_bufptr[0] + (eth->rx_bufptr[1] << 8);
+ if (real_size < CYGNUM_USBS_ETH_MIN_FRAME_SIZE) {
+ INCR_STAT(eth->rx_short_frames);
+ } else if (real_size > CYGNUM_USBS_ETH_MAX_FRAME_SIZE) {
+ INCR_STAT(eth->rx_too_long_frames);
+ } else {
+ // The packet appears to be valid. Inform higher level
+ // code and mark the buffer as in use.
+ resubmit = false;
+ eth->rx_buffer_full = true;
+ eth->rx_active = false;
+ eth_drv_dsr(0, 0, (cyg_addrword_t) sc);
+ }
+ }
+
+ if (resubmit) {
+ eth->rx_active = true;
+ usbs_eth_start_rx(eth, eth->rx_bufptr, &usbs_ethdrv_recv_callback, callback_data);
+ }
+}
+
+// Another callback, used to wait while an endpoint is halted.
+static void
+usbs_ethdrv_halted_callback(void* callback_data, int size)
+{
+ struct eth_drv_sc* sc = (struct eth_drv_sc*) callback_data;
+ usbs_ethdrv_recv_callback((usbs_eth*) sc->driver_private, callback_data, 0);
+}
+
+// Start a receive operation. It is not possible to abort an existing
+// rx operation, so a valid sequence of events is: start, rx ongoing,
+// stop, restart. The rx_active field is used to keep track of whether
+// or not there is still a receive in progress. The receive callback
+// will just discard incoming data if the eCos stack is not currently
+// running.
+static void
+usbs_ethdrv_start_recv(struct eth_drv_sc* sc, usbs_eth* eth)
+{
+ cyg_drv_dsr_lock();
+ if (!eth->rx_active) {
+ eth->rx_active = true;
+ usbs_eth_start_rx(eth, eth->rx_bufptr, &usbs_ethdrv_recv_callback, (void*) sc);
+ }
+ cyg_drv_dsr_unlock();
+}
+
+// This is invoked from the delivery thread when a valid buffer
+// has been received. The buffer should be scattered into the
+// supplied list, then another receive should be started.
+
+static void
+usbs_ethdrv_recv(struct eth_drv_sc* sc,
+ struct eth_drv_sg* sg_list, int sg_len)
+{
+ usbs_eth* eth = (usbs_eth*)(sc->driver_private);
+
+ CYG_ASSERT( eth->rx_buffer_full, "This function should only be called when there is a buffer available");
+ (void) scatter(eth->rx_bufptr, sg_list, sg_len);
+ eth->rx_buffer_full = false;
+ eth->rx_active = true;
+ usbs_eth_start_rx(eth, eth->rx_bufptr, &usbs_ethdrv_recv_callback, (void*) sc);
+}
+
+// ----------------------------------------------------------------------------
+// Now for the transmit process.
+//
+// When an application thread writes down a socket the data gets moved
+// into mbufs, and then passed to the appropriate device driver - which
+// may or may not be able to process it immediately. There is also a
+// timeout thread within the TCP/IP to handle retransmits etc.
+//
+// The stack will start by calling usbs_ethdrv_can_send() to determine
+// whether or not the driver can accept the packet. For the purposes
+// of the USB-ethernet driver this is true provided both host
+// and target are up and there is a spare buffer available.
+//
+// If the usbs_eth_can_send() returns true then there will be a call
+// to usbs_ethdrv_send(). This gathers the data into a single
+// buffer. If there is no transmit in progress yet then one is started.
+//
+// At some point the packet will have been transmitted and a callback
+// gets invoked. This needs to call eth_drv_dsr(), waking up the
+// delivery thread. The deliver() function can then check which
+// transmissions have completed and inform the higher level code
+// via sc->funs->eth_drv->tx_done(). The buffer can be re-used at
+// that point.
+
+static void
+usbs_ethdrv_send_callback(usbs_eth* eth, void* callback_data, int size)
+{
+ struct eth_drv_sc* sc = (struct eth_drv_sc*) callback_data;
+ CYG_ASSERT( eth == (usbs_eth*)(sc->driver_private), "USB and TCP/IP worlds need to be consistent");
+
+ INCR_STAT(eth->interrupts);
+
+ // There are a variety of possible error codes. -EAGAIN indicates
+ // that the endpoint is stalled. -EPIPE indicates that the
+ // connection to the host has been lost. These are not really
+ // particularly interesting. Whatever happens the buffer
+ // must be cleared and higher-level code informed so that
+ // the mbufs can be released.
+ if (size > 0) {
+ INCR_STAT(eth->tx_count);
+ }
+ eth->tx_done = true;
+ eth_drv_dsr(0, 0, (cyg_addrword_t) sc);
+}
+
+// Is it possible to send an ethernet frame? This requires
+// an empty buffer, i.e. there should be no existing
+// transmit in progress. It also requires that the host
+// is connected and that the endpoint is not currently halted.
+static int
+usbs_ethdrv_can_send(struct eth_drv_sc* sc)
+{
+ usbs_eth* eth = (usbs_eth*)(sc->driver_private);
+ return eth->host_up && !eth->tx_buffer_full && !eth->tx_endpoint->halted;
+}
+
+// Actually start a packet transmission. This means collecting
+// all the data into a single buffer and then invoking the
+// lower-level code. The latter may discard the packet immediately
+// if the MAC is not appropriate: it would be more efficient to
+// catch that here, especially for large packets, but the check
+// has to happen inside the lower-level code anyway in case
+// that is being invoked directly rather than via the driver.
+//
+// There is a possible recursion problem,
+// send->start_tx->tx_done->can_send->send, which is guarded
+// against using the tx_in_send flag.
+
+static void
+usbs_ethdrv_send(struct eth_drv_sc* sc,
+ struct eth_drv_sg* sgl_list, int sg_len, int total_len,
+ unsigned long key)
+{
+ usbs_eth* eth = (usbs_eth*)(sc->driver_private);
+
+ CYG_ASSERT( 0 == eth->tx_in_send, "send() should not be invoked recursively");
+ CYG_ASSERT( total_len <= CYGNUM_USBS_ETH_MAX_FRAME_SIZE, "ethernet maximum frame size should be observed");
+ CYG_ASSERT( CYGNUM_USBS_ETH_MIN_FRAME_SIZE <= total_len, "ethernet minimum frame size should be observed");
+
+ eth->tx_in_send = true;
+ CYG_ASSERT( !eth->tx_buffer_full, "the transmit buffer should be empty");
+ gather(eth->tx_buffer, CYGNUM_USBS_ETH_MAX_FRAME_SIZE, sgl_list, sg_len);
+ eth->tx_buffer_full = true;
+ eth->tx_done = false;
+ eth->tx_key = key;
+ usbs_eth_start_tx(eth, eth->tx_buffer, &usbs_ethdrv_send_callback, (void*) sc);
+ eth->tx_in_send = false;
+}
+
+// ----------------------------------------------------------------------------
+// Deliver needs to take into account both receive and transmit buffers.
+
+static void
+usbs_ethdrv_deliver(struct eth_drv_sc* sc)
+{
+ usbs_eth* eth = (usbs_eth*)(sc->driver_private);
+
+ if (eth->rx_buffer_full) {
+ int size = eth->rx_bufptr[0] + (eth->rx_bufptr[1] << 8);
+ (*sc->funs->eth_drv->recv)(sc, size);
+ }
+ if (eth->tx_done) {
+ unsigned long key = eth->tx_key;
+ eth->tx_buffer_full = false;
+ eth->tx_done = false;
+ (*sc->funs->eth_drv->tx_done)(sc, key, 1);
+ }
+}
+
+// ----------------------------------------------------------------------------
+// usbs_ethdrv_start()
+//
+// This gets called by the TCP/IP stack later on during
+// initialization, when the stack is ready to send and receive
+// packets. It may get called multiple times while the stack
+// is running, with different flags values.
+//
+// As far as transmits are concerned, nothing needs to be done. If no
+// transmit is in progress then everything is fine anyway. If a
+// transmit is already in progress then it must be allowed to complete
+// via the usual route. Receives should however be restarted, the
+// start function has appropriate safeguards.
+//
+// Invoked in: thread context only
+// ----------------------------------------------------------------------------
+
+static void
+usbs_ethdrv_start(struct eth_drv_sc* sc, unsigned char* enaddr, int flags)
+{
+ usbs_eth* eth = (usbs_eth*)(sc->driver_private);
+ if (!eth->ecos_up) {
+ eth->ecos_up = true;
+ usbs_ethdrv_start_recv(sc, eth);
+ }
+}
+
+// ----------------------------------------------------------------------------
+// usbs_ethdrv_stop()
+//
+// Similarly this gets called by the TCP/IP stack to bring the network
+// interface down. Nothing should happen for any packets currently
+// being transmitted or received, that would cause confusion everywhere.
+// The receive callback checks the ecos_up flag and does the right
+// thing. The TCP/IP stack should not call can_send() after taking
+// the interface down so no new transmits will be initiated.
+//
+// Invoked in: thread context only
+// ----------------------------------------------------------------------------
+
+static void
+usbs_ethdrv_stop(struct eth_drv_sc* sc)
+{
+ usbs_eth* eth = (usbs_eth*)(sc->driver_private);
+ eth->ecos_up = false;
+}
+
+// ----------------------------------------------------------------------------
+// usbs_eth_ioctl()
+//
+// The operations to worry about here are:
+//
+// SET_MAC_ADDRESS,via the SIOCSIFHWADDR ioctl
+//
+// GET_IF_STATS and GET_IF_STATS_UD, to report gathered statistics.
+//
+// Invoked in: thread context only
+// ----------------------------------------------------------------------------
+
+static int
+usbs_ethdrv_ioctl(struct eth_drv_sc* sc, unsigned long key, void* data, int data_length)
+{
+ usbs_eth* eth = (usbs_eth*)(sc->driver_private);
+ int result = EINVAL;
+
+ switch(key) {
+ case ETH_DRV_SET_MAC_ADDRESS:
+ {
+ if (6 == data_length) {
+ memcpy(eth->ecos_MAC, data, 6);
+ result = 0;
+ }
+ }
+ break;
+#if defined(CYGFUN_USBS_ETHDRV_STATISTICS) && defined(ETH_DRV_GET_IF_STATS_UD)
+ case ETH_DRV_GET_IF_STATS_UD:
+ case ETH_DRV_GET_IF_STATS:
+ {
+ static unsigned char my_chipset[] = { 0, 0 };
+ struct ether_drv_stats *p = (struct ether_drv_stats*) data;
+ int i;
+ strcpy(p->description, CYGDAT_USBS_ETHDRV_DESCRIPTION);
+ for ( i = 0; i < SNMP_CHIPSET_LEN; i++ ) {
+ if ( 0 == (p->snmp_chipset[i] = my_chipset[i]) ) {
+ break;
+ }
+ }
+ p->duplex = 3; // 3 == duplex
+ p->operational = (eth->host_up && eth->ecos_up) ? 3 : 2; // 3 == up, 2 == down
+ p->speed = 10 * 1000000;
+ p->supports_dot3 = 1;
+ p->rx_too_long_frames = eth->rx_too_long_frames;
+ p->rx_short_frames = eth->rx_short_frames;
+ p->interrupts = eth->interrupts;
+ p->rx_count = eth->rx_count;
+ p->tx_count = eth->tx_count;
+ p->tx_queue_len = 1;
+ result=0;
+ }
+ break;
+#endif
+
+ default:
+ break;
+ }
+
+ return result;
+}
+
+
+// ----------------------------------------------------------------------------
+// usbs_ethdrv_poll()
+//
+// On real ethernet hardware this is used by RedBoot once the
+// application has started running, so that the network device can be
+// used for debugging purposes as well as for the application's own
+// needs. The lower-level USB device may supply a poll function as well.
+// ----------------------------------------------------------------------------
+static void
+usbs_ethdrv_poll(struct eth_drv_sc* sc)
+{
+ usbs_eth* eth = (usbs_eth*)(sc->driver_private);
+ (*eth->control_endpoint->poll_fn)(eth->control_endpoint);
+}
+
+// ----------------------------------------------------------------------------
+// usbs_ethdrv_intvector()
+//
+// See usbs_eth_poll().
+// ----------------------------------------------------------------------------
+
+static int
+usbs_ethdrv_intvector(struct eth_drv_sc* sc)
+{
+ usbs_eth* eth = (usbs_eth*)(sc->driver_private);
+ return eth->control_endpoint->interrupt_vector;
+}
+
+
diff --git a/cesar/ecos/packages/io/usb/slave/current/ChangeLog b/cesar/ecos/packages/io/usb/slave/current/ChangeLog
new file mode 100644
index 0000000000..10848f12d9
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/ChangeLog
@@ -0,0 +1,167 @@
+2005-06-26 Bart Veer <bartv@ecoscentric.com>
+
+ * host/usbhost.c, host/configure.in: cope with incompatible
+ changes to the system header <linux/usbdevice_fs.h>
+
+ * host/acconfig.h: new file to support the above
+
+ * host/Makefile.in, host/aclocal.m4, host/config.h.in,
+ host/configure, host/stamp-h.in: regenerate
+
+2003-03-27 Bart Veer <bartv@ecoscentric.com>
+
+ * host/Makefile.am, host/Makefile.in:
+ $(bindir) may not exist yet, so create it if necessary.
+
+2003-02-25 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/usbs.sgml: Declare as <part> not <reference> to get
+ correct TOC numbering.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/usbs.cdl: Update doc links.
+
+ * doc/usbs.sgml: Comment out DOCTYPE for now to allow building
+ with standard doc build.
+
+2003-02-12 Bart Veer <bartv@ecoscentric.com>
+
+ * host/Makefile.in, host/configure:
+ Regenerate after toplevel acinclude.m4 update
+
+2002-09-23 Bart Veer <bartv@ecoscentric.com>
+
+ * host/configure.in:
+ Only build if the required Linux kernel support is present.
+
+2002-09-21 Bart Veer <bartv@ecoscentric.com>
+
+ * host/usbhost.c:
+ Avoid const compatibility problems with Tcl 8.4
+
+2002-01-23 Bart Veer <bartv@redhat.com>
+
+ * host/Makefile.am, host/Makefile.in, host/acinclude.m4,
+ host/aclocal.m4, host/configure, host/configure.in,
+ host/usbhost.c, host/usbhost.tcl, host/verbose.tcl
+ Host-side support for USB testing
+
+ * tests/usbtarget.c, tests/common.c, tests/protocol.h:
+ New files containing the target-side testing support and
+ support files.
+
+ * cdl/usbs.cdl:
+ Add a configuration option to build the target-side testing
+ support.
+
+ * doc/usbs.sgml, doc/*.html:
+ Document the testing support. Regenerate html.
+
+2001-09-14 Bart Veer <bartv@redhat.com>
+
+ * doc/usbs.sgml, doc/*.html:
+ Fix the example strings in the enumeration data.
+ Regenerate html.
+
+ * include/usbs.h:
+ Update the USB testing data structure
+
+ * src/usbs.c (usbs_handle_standard_control):
+ Fix an assertion for the special case of a USB configuration that
+ defines no endpoints.
+
+2001-08-06 Bart Veer <bartv@redhat.com>
+
+ * include/usbs.h:
+ Define additional data structures required for USB testing.
+
+2001-06-19 Bart Veer <bartv@redhat.com>
+
+ * src/usbs.c, include/usbs.h (usbs_devtab_cread):
+ read operations should not take a const buffer
+
+2001-02-02 Bart Veer <bartv@redhat.com>
+
+ * cdl/usbs.cdl:
+ Add doc property to point at the HTML
+
+ * doc/usbs.sgml, *.html:
+ Incorporate changes from docs department, regenerate HTML
+
+2001-01-25 Bart Veer <bartv@redhat.com>
+
+ * src/usbs.c:
+ * include/usbs.h:
+ Only declare the devtab support functions if the I/O package is
+ present, since that provides required data types.
+
+ * cdl/usbs.cdl:
+ devtab support should be enabled by default iff the I/O package is
+ present.
+
+2001-01-22 Bart Veer <bartv@redhat.com>
+
+ * doc/usbs.sgml, doc/makefile:
+ Added documentation
+
+2001-01-16 Bart Veer <bartv@redhat.com>
+
+ * include/usbs.h:
+ * src/usbs.c:
+ Update the start() and poll() functions to match the documentation.
+
+2000-12-15 Bart Veer <bartv@redhat.com>
+
+ * src/usbs.c:
+ Fix missing return statements.
+
+2000-11-28 Bart Veer <bartv@redhat.com>
+
+ * cdl/usbs.cdl
+ * include/usbs.h:
+ * usbs.c
+ Update interface to USB device drivers
+
+2000-11-22 Bart Veer <bartv@redhat.com>
+
+ * include/usbs.h: Fix nested #include protection
+
+2000-11-21 Bart Veer <bartv@redhat.com>
+
+ * First check-in of eCos USB support.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/io/usb/slave/current/cdl/usbs.cdl b/cesar/ecos/packages/io/usb/slave/current/cdl/usbs.cdl
new file mode 100644
index 0000000000..4704168468
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/cdl/usbs.cdl
@@ -0,0 +1,134 @@
+# ====================================================================
+#
+# usbs.cdl
+#
+# USB slave-side support
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Original data: bartv
+# Contributors:
+# Date: 2000-10-04
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_IO_USB_SLAVE {
+ display "USB slave-side support"
+ parent CYGPKG_IO_USB
+ include_dir "cyg/io/usb"
+ active_if CYGHWR_IO_USB_SLAVE
+ doc ref/io-usb-slave.html
+
+ compile usbs.c
+
+ cdl_interface CYGINT_IO_USB_SLAVE_CLIENTS {
+ display "Number of clients of USB devices"
+ description "
+ This counter keeps track of the number of clients of
+ USB devices, especially application-class packages such
+ as the USB-ethernet support. It can be used by USB
+ device drivers for default settings.
+ "
+ }
+
+ cdl_option CYGGLO_IO_USB_SLAVE_APPLICATION {
+ display "Application code uses USB devices"
+ default_value 0
+ implements CYGINT_IO_USB_SLAVE_CLIENTS
+ description "
+ If the USB devices are accessed by application code
+ rather than by other packages then enabling this
+ option will cause the USB device drivers to be enabled.
+ "
+ }
+
+ cdl_option CYGGLO_IO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES {
+ display "Provide devtab entries by default"
+ default_value CYGPKG_IO
+ requires CYGPKG_IO
+ description "
+ The USB slave-side endpoints can typically be accessed in two
+ different ways. There is support for the traditional way of
+ doing I/O with open/read/write calls, which involves the
+ use of devtab entries. It is also possible to use a
+ USB-specific API, defined largely in terms of asynchronous
+ operations and callbacks (the read/write implementation uses
+ these lower-level calls). If neither the application nor
+ any other USB-related packages require the higher-level
+ read/write calls then it is possible to save some memory
+ by eliminating the devtab entries.
+ "
+ }
+
+ cdl_interface CYGHWR_IO_USB_SLAVE_OUT_ENDPOINTS {
+ display "Number of available host->slave endpoints"
+ }
+ cdl_interface CYGHWR_IO_USB_SLAVE_IN_ENDPOINTS {
+ display "Number of available slave->host endpoints"
+ }
+
+ cdl_option CYGBLD_IO_USB_SLAVE_USBTEST {
+ display "Build the main USB test program"
+ doc ref/usbs-testing.html
+ description "
+ The USB slave-side software is supplied with host-side
+ and target-side software that allows a variety of testing
+ to be performed. The slave-side software is not built
+ by default since it can only operate in specific environments
+ and in conjunction with the host-side software. Enabling
+ this option causes the slave-side software to be added
+ to the list of test cases for the current configuration."
+ default_value 0
+ implements CYGINT_IO_USB_SLAVE_CLIENTS
+ requires { is_substr(CYGPKG_IO_USB_SLAVE_TESTS, " tests/usbtarget") }
+
+ requires CYGFUN_KERNEL_API_C CYGFUN_KERNEL_THREADS_TIMER !CYGINT_KNEREL_SCHEDULER_UNIQUE_PRIORITIES
+ requires CYGPKG_LIBC_STDIO CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+ }
+
+ cdl_option CYGPKG_IO_USB_SLAVE_TESTS {
+ display "Kernel tests"
+ flavor data
+ no_define
+ default_value { "" }
+ description "This option specifies the set of tests to be
+ built for the USB slave package"
+ }
+}
diff --git a/cesar/ecos/packages/io/usb/slave/current/doc/io-usb-slave.html b/cesar/ecos/packages/io/usb/slave/current/doc/io-usb-slave.html
new file mode 100644
index 0000000000..123f30dd52
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/doc/io-usb-slave.html
@@ -0,0 +1,188 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>eCos USB Slave Support</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="NEXT"
+TITLE="Introduction"
+HREF="usbs-intro.html"></HEAD
+><BODY
+CLASS="REFERENCE"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+>&nbsp;</TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbs-intro.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><DIV
+CLASS="REFERENCE"
+><A
+NAME="IO-USB-SLAVE"
+></A
+><DIV
+CLASS="TITLEPAGE"
+><H1
+CLASS="TITLE"
+>I. eCos USB Slave Support</H1
+><DIV
+CLASS="TOC"
+><DL
+><DT
+><B
+>Table of Contents</B
+></DT
+><DT
+><A
+HREF="usbs-intro.html"
+>Introduction</A
+> &#8212; eCos support for USB slave devices</DT
+><DT
+><A
+HREF="usbs-enum.html"
+>USB Enumeration Data</A
+> &#8212; The USB enumeration data structures</DT
+><DT
+><A
+HREF="usbs-start.html"
+>Starting up a USB Device</A
+> &#8212; Starting up a USB Device</DT
+><DT
+><A
+HREF="usbs-devtab.html"
+>Devtab Entries</A
+> &#8212; Data endpoint data structure</DT
+><DT
+><A
+HREF="usbs-start-rx.html"
+>Receiving Data from the Host</A
+> &#8212; Receiving Data from the Host</DT
+><DT
+><A
+HREF="usbs-start-tx.html"
+>Sending Data to the Host</A
+> &#8212; Sending Data to the Host</DT
+><DT
+><A
+HREF="usbs-halt.html"
+>Halted Endpoints</A
+> &#8212; Support for Halting and Halted Endpoints</DT
+><DT
+><A
+HREF="usbs-control.html"
+>Control Endpoints</A
+> &#8212; Control endpoint data structure</DT
+><DT
+><A
+HREF="usbs-data.html"
+>Data Endpoints</A
+> &#8212; Data endpoint data structures</DT
+><DT
+><A
+HREF="usbs-writing.html"
+>Writing a USB Device Driver</A
+> &#8212; USB Device Driver Porting Guide</DT
+><DT
+><A
+HREF="usbs-testing.html"
+>Testing</A
+> &#8212; Testing of USB Device Drivers</DT
+></DL
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbs-intro.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Introduction</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/slave/current/doc/makefile b/cesar/ecos/packages/io/usb/slave/current/doc/makefile
new file mode 100644
index 0000000000..e7c3a0f26a
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/doc/makefile
@@ -0,0 +1,55 @@
+#=============================================================================
+#
+# makefile
+#
+# For building the USB slave package documentation
+#
+#=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#=============================================================================
+#####DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Date: 2001-01-11
+#####DESCRIPTIONEND####
+#=============================================================================
+
+TOPLEVEL := ../../../../..
+MAIN_SGML := usbs.sgml
+MAIN_HTML := io-usb-slave.html
+MAIN_PDF := io-usb-slave.pdf
+OTHER_SGML :=
+PICTURES :=
+
+include $(TOPLEVEL)/pkgconf/rules.doc
diff --git a/cesar/ecos/packages/io/usb/slave/current/doc/usbs-control.html b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-control.html
new file mode 100644
index 0000000000..874e448745
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-control.html
@@ -0,0 +1,934 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Control Endpoints</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos USB Slave Support"
+HREF="io-usb-slave.html"><LINK
+REL="PREVIOUS"
+TITLE="Halted Endpoints"
+HREF="usbs-halt.html"><LINK
+REL="NEXT"
+TITLE="Data Endpoints"
+HREF="usbs-data.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos USB Slave Support</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="usbs-halt.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbs-data.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBS-CONTROL"
+>Control Endpoints</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN489"
+></A
+><H2
+>Name</H2
+>Control Endpoints&nbsp;--&nbsp;Control endpoint data structure</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN492"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>#include &lt;cyg/io/usb/usbs.h&gt;
+
+typedef struct usbs_control_endpoint {
+ *hellip;
+} usbs_control_endpoint;</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN494"
+></A
+><H2
+><TT
+CLASS="LITERAL"
+>usbs_control_endpoint</TT
+> Data Structure</H2
+><P
+>The device driver for a USB slave device should supply one
+<SPAN
+CLASS="STRUCTNAME"
+>usbs_control_endpoint</SPAN
+> data structure per USB
+device. This corresponds to endpoint 0 which will be used for all
+control message interaction between the host and that device. The data
+structure is also used for internal management purposes, for example
+to keep track of the current state. In a typical USB peripheral there
+will only be one such data structure in the entire system, but if
+there are multiple USB slave ports, allowing the peripheral to be
+connected to multiple hosts, then there will be a separate data
+structure for each one. The name or names of the data structures are
+determined by the device drivers. For example, the SA11x0 USB device
+driver package provides <TT
+CLASS="LITERAL"
+>usbs_sa11x0_ep0</TT
+>.</P
+><P
+>The operations on a control endpoint do not fit cleanly into a
+conventional open/read/write I/O model. For example, when the host
+sends a control message to the USB peripheral this may be one of four
+types: standard, class, vendor and reserved. Some or all of the
+standard control messages will be handled automatically by the common
+USB slave package or by the device driver itself. Other standard
+control messages and the other types of control messages may be
+handled by a class-specific package or by application code. Although
+it would be possible to have devtab entries such as
+<TT
+CLASS="LITERAL"
+>/dev/usbs_ep0/standard</TT
+> and
+<TT
+CLASS="LITERAL"
+>/dev/usbs_ep0/class</TT
+>, and then support read and
+write operations on these devtab entries, this would add significant
+overhead and code complexity. Instead, all of the fields in the
+control endpoint data structure are public and can be manipulated
+directly by higher level code if and when required. </P
+><P
+>Control endpoints involve a number of callback functions, with
+higher-level code installing suitable function pointers in the control
+endpoint data structure. For example, if the peripheral involves
+vendor-specific control messages then a suitable handler for these
+messages should be installed. Although the exact details depend on the
+device driver, typically these callback functions will be invoked at
+DSR level rather than thread level. Therefore, only certain eCos
+functions can be invoked; specifically, those functions that are
+guaranteed not to block. If a potentially blocking function such as a
+semaphore wait or a mutex lock operation is invoked from inside the
+callback then the resulting behaviour is undefined, and the system as
+a whole may fail. In addition, if one of the callback functions
+involves significant processing effort then this may adversely affect
+the system's real time characteristics. The eCos kernel documentation
+should be consulted for more details of DSR handling.</P
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN504"
+></A
+><H3
+>Initialization</H3
+><P
+>The <SPAN
+CLASS="STRUCTNAME"
+>usbs_control_endpoint</SPAN
+> data structure
+contains the following fields related to initialization.</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>typedef struct usbs_control_endpoint {
+ &#8230;
+ const usbs_enumeration_data* enumeration_data;
+ void (*start_fn)(usbs_control_endpoint*);
+ &#8230;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>It is the responsibility of higher-level code, usually the
+application, to define the USB enumeration data. This needs to be
+installed in the control endpoint data structure early on during
+system startup, before the USB device is actually started and any
+interaction with the host is possible. Details of the enumeration data
+are supplied in the section <A
+HREF="usbs-enum.html"
+>USB Enumeration
+Data</A
+>. Typically, the enumeration data is constant for a given
+peripheral, although it can be constructed dynamically if necessary.
+However, the enumeration data cannot change while the peripheral is
+connected to a host: the peripheral cannot easily claim to be a
+keyboard one second and a printer the next.</P
+><P
+>The <TT
+CLASS="STRUCTFIELD"
+><I
+>start_fn</I
+></TT
+> member is normally accessed
+via the utility <A
+HREF="usbs-start.html"
+><TT
+CLASS="FUNCTION"
+>usbs_start</TT
+></A
+> rather
+than directly. It is provided by the device driver and should be
+invoked once the system is fully initialized and interaction with the
+host is possible. A typical implementation would change the USB data
+pins from tristated to active. If the peripheral is already plugged
+into a host then the latter should detect this change and start
+interacting with the peripheral, including requesting the enumeration
+data.</P
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN515"
+></A
+><H3
+>State</H3
+><P
+>There are three <SPAN
+CLASS="STRUCTNAME"
+>usbs_control_endpoint</SPAN
+> fields
+related to the current state of a USB slave device, plus some state
+constants and an enumeration of the possible state changes:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>typedef struct usbs_control_endpoint {
+ &#8230;
+ int state;
+ void (*state_change_fn)(struct usbs_control_endpoint*, void*,
+ usbs_state_change, int);
+ void* state_change_data;
+ &#8230;
+};
+
+#define USBS_STATE_DETACHED 0x01
+#define USBS_STATE_ATTACHED 0x02
+#define USBS_STATE_POWERED 0x03
+#define USBS_STATE_DEFAULT 0x04
+#define USBS_STATE_ADDRESSED 0x05
+#define USBS_STATE_CONFIGURED 0x06
+#define USBS_STATE_MASK 0x7F
+#define USBS_STATE_SUSPENDED (1 &lt;&lt; 7)
+
+typedef enum {
+ USBS_STATE_CHANGE_DETACHED = 1,
+ USBS_STATE_CHANGE_ATTACHED = 2,
+ USBS_STATE_CHANGE_POWERED = 3,
+ USBS_STATE_CHANGE_RESET = 4,
+ USBS_STATE_CHANGE_ADDRESSED = 5,
+ USBS_STATE_CHANGE_CONFIGURED = 6,
+ USBS_STATE_CHANGE_DECONFIGURED = 7,
+ USBS_STATE_CHANGE_SUSPENDED = 8,
+ USBS_STATE_CHANGE_RESUMED = 9
+} usbs_state_change;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The USB standard defines a number of states for a given USB
+peripheral. The initial state is <I
+CLASS="EMPHASIS"
+>detached</I
+>, where
+the peripheral is either not connected to a host at all or, from the
+host's perspective, the peripheral has not started up yet because the
+relevant pins are tristated. The peripheral then moves via
+intermediate <I
+CLASS="EMPHASIS"
+>attached</I
+> and
+<I
+CLASS="EMPHASIS"
+>powered</I
+> states to its default or
+<I
+CLASS="EMPHASIS"
+>reset</I
+> state, at which point the host and
+peripheral can actually start exchanging data. The first message is
+from host to peripheral and provides a unique 7-bit address within the
+local USB network, resulting in a state change to
+<I
+CLASS="EMPHASIS"
+>addressed</I
+>. The host then requests enumeration
+data and performs other initialization. If everything succeeds the
+host sends a standard set-configuration control message, after which
+the peripheral is <I
+CLASS="EMPHASIS"
+>configured</I
+> and expected to be
+up and running. Note that some USB device drivers may be unable to
+distinguish between the <I
+CLASS="EMPHASIS"
+>detached</I
+>,
+<I
+CLASS="EMPHASIS"
+>attached</I
+> and <I
+CLASS="EMPHASIS"
+>powered</I
+> states
+but generally this is not important to higher-level code.</P
+><P
+>A USB host should generate at least one token every millisecond. If a
+peripheral fails to detect any USB traffic for a period of time then
+typically this indicates that the host has entered a power-saving
+mode, and the peripheral should do the same if possible. This
+corresponds to the <I
+CLASS="EMPHASIS"
+>suspended</I
+> bit. The actual
+state is a combination of <I
+CLASS="EMPHASIS"
+>suspended</I
+> and the
+previous state, for example <I
+CLASS="EMPHASIS"
+>configured</I
+> and
+<I
+CLASS="EMPHASIS"
+>suspended</I
+> rather than just
+<I
+CLASS="EMPHASIS"
+>suspended</I
+>. When the peripheral subsequently
+detects USB traffic it would switch back to the
+<I
+CLASS="EMPHASIS"
+>configured</I
+> state.</P
+><P
+>The USB device driver and the common USB slave package will maintain
+the current state in the control endpoint's
+<TT
+CLASS="STRUCTFIELD"
+><I
+>state</I
+></TT
+> field. There should be no need for
+any other code to change this field, but it can be examined whenever
+appropriate. In addition whenever a state change occurs the generic
+code can invoke a state change callback function. By default, no such
+callback function will be installed. Some class-specific packages such
+as the USB-ethernet package will install a suitable function to keep
+track of whether or not the host-peripheral connection is up, that is
+whether or not ethernet packets can be exchanged. Application code can
+also update this field. If multiple parties want to be informed of
+state changes, for example both a class-specific package and
+application code, then typically the application code will install its
+state change handler after the class-specific package and is
+responsible for chaining into the package's handler.</P
+><P
+>The state change callback function is invoked with four arguments. The
+first identifies the control endpoint. The second is an arbitrary
+pointer: higher-level code can fill in the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>state_change_data</I
+></TT
+> field to set this. The
+third argument specifies the state change that has occurred, and the
+last argument supplies the previous state (the new state is readily
+available from the control endpoint structure).</P
+><P
+>eCos does not provide any utility functions for updating or examining
+the <TT
+CLASS="STRUCTFIELD"
+><I
+>state_change_fn</I
+></TT
+> or
+<TT
+CLASS="STRUCTFIELD"
+><I
+>state_change_data</I
+></TT
+> fields. Instead, it is
+expected that the fields in the
+<SPAN
+CLASS="STRUCTNAME"
+>usbs_control_endpoint</SPAN
+> data structure will be
+manipulated directly. Any utility functions would do just this, but
+at the cost of increased code and cpu overheads.</P
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN545"
+></A
+><H3
+>Standard Control Messages</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>typedef struct usbs_control_endpoint {
+ &#8230;
+ unsigned char control_buffer[8];
+ usbs_control_return (*standard_control_fn)(struct usbs_control_endpoint*, void*);
+ void* standard_control_data;
+ &#8230;
+} usbs_control_endpoint;
+
+typedef enum {
+ USBS_CONTROL_RETURN_HANDLED = 0,
+ USBS_CONTROL_RETURN_UNKNOWN = 1,
+ USBS_CONTROL_RETURN_STALL = 2
+} usbs_control_return;
+
+extern usbs_control_return usbs_handle_standard_control(struct usbs_control_endpoint*);</PRE
+></TD
+></TR
+></TABLE
+><P
+>When a USB peripheral is connected to the host it must always respond
+to control messages sent to endpoint 0. Control messages always
+consist of an initial eight-byte header, containing fields such as a
+request type. This may be followed by a further data transfer, either
+from host to peripheral or from peripheral to host. The way this is
+handled is described in the <A
+HREF="usbs-control.html#AEN578"
+>Buffer Management</A
+> section below.</P
+><P
+>The USB device driver will always accept the initial eight-byte
+header, storing it in the <TT
+CLASS="STRUCTFIELD"
+><I
+>control_buffer</I
+></TT
+>
+field. Then it determines the request type: standard, class, vendor,
+or reserved. The way in which the last three of these are processed is
+described in the section <A
+HREF="usbs-control.html#AEN570"
+>Other
+Control Messages</A
+>. Some
+standard control messages will be handled by the device driver itself;
+typically the <I
+CLASS="EMPHASIS"
+>set-address</I
+> request and the
+<I
+CLASS="EMPHASIS"
+>get-status</I
+>, <I
+CLASS="EMPHASIS"
+>set-feature</I
+> and
+<I
+CLASS="EMPHASIS"
+>clear-feature</I
+> requests when applied to endpoints.</P
+><P
+>If a standard control message cannot be handled by the device driver
+itself, the driver checks the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>standard_control_fn</I
+></TT
+> field in the control
+endpoint data structure. If higher-level code has installed a suitable
+callback function then this will be invoked with two argument, the
+control endpoint data structure itself and the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>standard_control_data</I
+></TT
+> field. The latter
+allows the higher level code to associate arbitrary data with the
+control endpoint. The callback function can return one of three
+values: <I
+CLASS="EMPHASIS"
+>HANDLED</I
+> to indicate that the request has
+been processed; <I
+CLASS="EMPHASIS"
+>UNKNOWN</I
+> if the message should be
+handled by the default code; or <I
+CLASS="EMPHASIS"
+>STALL</I
+> to indicate
+an error condition. If higher level code has not installed a callback
+function or if the callback function has returned
+<I
+CLASS="EMPHASIS"
+>UNKNOWN</I
+> then the device driver will invoke a
+default handler, <TT
+CLASS="FUNCTION"
+>usbs_handle_standard_control</TT
+>
+provided by the common USB slave package.</P
+><P
+>The default handler can cope with all of the standard control messages
+for a simple USB peripheral. However, if the peripheral involves
+multiple configurations, multiple interfaces in a configuration, or
+alternate settings for an interface, then this cannot be handled by
+generic code. For example, a multimedia peripheral may support various
+alternate settings for a given data source with different bandwidth
+requirements, and the host can select a setting that takes into
+account the current load. Clearly higher-level code needs to be aware
+when the host changes the current setting, so that it can adjust the
+rate at which data is fed to or retrieved from the host. Therefore the
+higher-level code needs to install its own standard control callback
+and process appropriate messages, rather than leaving these to the
+default handler.</P
+><P
+>The default handler will take care of the
+<I
+CLASS="EMPHASIS"
+>get-descriptor</I
+> request used to obtain the
+enumeration data. It has support for string descriptors but ignores
+language encoding issues. If language encoding is important for the
+peripheral then this will have to be handled by an
+application-specific standard control handler.</P
+><P
+>The header file <TT
+CLASS="FILENAME"
+>&lt;cyg/io/usb/usb.h&gt;</TT
+> defines various
+constants related to control messages, for example the function codes
+corresponding to the standard request types. This header file is
+provided by the common USB package, not by the USB slave package,
+since the information is also relevant to USB hosts.</P
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN570"
+></A
+><H3
+>Other Control Messages</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>typedef struct usbs_control_endpoint {
+ &#8230;
+ usbs_control_return (*class_control_fn)(struct usbs_control_endpoint*, void*);
+ void* class_control_data;
+ usbs_control_return (*vendor_control_fn)(struct usbs_control_endpoint*, void*);
+ void* vendor_control_data;
+ usbs_control_return (*reserved_control_fn)(struct usbs_control_endpoint*, void*);
+ void* reserved_control_data;
+ &#8230;
+} usbs_control_endpoint;</PRE
+></TD
+></TR
+></TABLE
+><P
+>Non-standard control messages always have to be processed by
+higher-level code. This could be class-specific packages. For example,
+the USB-ethernet package will handle requests for getting the MAC
+address and for enabling or disabling promiscuous mode. In all cases
+the device driver will store the initial request in the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>control_buffer</I
+></TT
+> field, check for an
+appropriate handler, and invoke it with details of the control
+endpoint and any handler-specific data that has been installed
+alongside the handler itself. The handler should return either
+<TT
+CLASS="LITERAL"
+>USBS_CONTROL_RETURN_HANDLED</TT
+> to report success or
+<TT
+CLASS="LITERAL"
+>USBS_CONTROL_RETURN_STALL</TT
+> to report failure. The
+device driver will report this to the host.</P
+><P
+>If there are multiple parties interested in a particular type of
+control messages, it is the responsibility of application code to
+install an appropriate handler and process the requests appropriately. </P
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN578"
+></A
+><H3
+>Buffer Management</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>typedef struct usbs_control_endpoint {
+ &#8230;
+ unsigned char* buffer;
+ int buffer_size;
+ void (*fill_buffer_fn)(struct usbs_control_endpoint*);
+ void* fill_data;
+ int fill_index;
+ usbs_control_return (*complete_fn)(struct usbs_control_endpoint*, int);
+ &#8230;
+} usbs_control_endpoint;</PRE
+></TD
+></TR
+></TABLE
+><P
+>Many USB control messages involve transferring more data than just the
+initial eight-byte header. The header indicates the direction of the
+transfer, OUT for host to peripheral or IN for peripheral to host.
+It also specifies a length field, which is exact for an OUT transfer
+or an upper bound for an IN transfer. Control message handlers can
+manipulate six fields within the control endpoint data structure to
+ensure that the transfer happens correctly.</P
+><P
+>For an OUT transfer, the handler should examine the length field in
+the header and provide a single buffer for all the data. A
+class-specific protocol would typically impose an upper bound on the
+amount of data, allowing the buffer to be allocated statically.
+The handler should update the <TT
+CLASS="STRUCTFIELD"
+><I
+>buffer</I
+></TT
+> and
+<TT
+CLASS="STRUCTFIELD"
+><I
+>complete_fn</I
+></TT
+> fields. When all the data has
+been transferred the completion callback will be invoked, and its
+return value determines the response sent back to the host. The USB
+standard allows for a new control message to be sent before the
+current transfer has completed, effectively cancelling the current
+operation. When this happens the completion function will also be
+invoked. The second argument to the completion function specifies what
+has happened, with a value of 0 indicating success and an error code
+such as <TT
+CLASS="LITERAL"
+>-EPIPE</TT
+> or <TT
+CLASS="LITERAL"
+>-EIO</TT
+>
+indicating that the current transfer has been cancelled.</P
+><P
+>IN transfers are a little bit more complicated. The required
+information, for example the enumeration data, may not be in a single
+contiguous buffer. Instead a mechanism is provided by which the buffer
+can be refilled, thus allowing the transfer to move from one record to
+the next. Essentially, the transfer operates as follows:</P
+><P
+></P
+><OL
+TYPE="1"
+><LI
+><P
+>When the host requests another chunk of data (typically eight bytes),
+the USB device driver will examine the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>buffer_size</I
+></TT
+> field. If non-zero then
+<TT
+CLASS="STRUCTFIELD"
+><I
+>buffer</I
+></TT
+> contains at least one more byte of
+data, and then <TT
+CLASS="STRUCTFIELD"
+><I
+>buffer_size</I
+></TT
+> is decremented.</P
+></LI
+><LI
+><P
+>When <TT
+CLASS="STRUCTFIELD"
+><I
+>buffer_size</I
+></TT
+> has dropped to 0, the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>fill_buffer_fn</I
+></TT
+> field will be examined. If
+non-null it will be invoked to refill the buffer.</P
+></LI
+><LI
+><P
+>The <TT
+CLASS="STRUCTFIELD"
+><I
+>fill_data</I
+></TT
+> and
+<TT
+CLASS="STRUCTFIELD"
+><I
+>fill_index</I
+></TT
+> fields are not used by the
+device driver. Instead these fields are available to the refill
+function to keep track of the current state of the transfer.</P
+></LI
+><LI
+><P
+>When <TT
+CLASS="STRUCTFIELD"
+><I
+>buffer_size</I
+></TT
+> is 0 and
+<TT
+CLASS="STRUCTFIELD"
+><I
+>fill_buffer_fn</I
+></TT
+> is NULL, no more data is
+available and the transfer has completed.</P
+></LI
+><LI
+><P
+>Optionally a completion function can be installed. This will be
+invoked with 0 if the transfer completes successfully, or with an
+error code if the transfer is cancelled because of another control
+messsage. </P
+></LI
+></OL
+><P
+>If the requested data is contiguous then the only fields that need
+to be manipulated are <TT
+CLASS="STRUCTFIELD"
+><I
+>buffer</I
+></TT
+> and
+<TT
+CLASS="STRUCTFIELD"
+><I
+>buffer_size</I
+></TT
+>, and optionally
+<TT
+CLASS="STRUCTFIELD"
+><I
+>complete_fn</I
+></TT
+>. If the requested data is not
+contiguous then the initial control message handler should update
+<TT
+CLASS="STRUCTFIELD"
+><I
+>fill_buffer_fn</I
+></TT
+> and some or all of the other
+fields, as required. An example of this is the handling of the
+standard <I
+CLASS="EMPHASIS"
+>get-descriptor</I
+> control message by
+<TT
+CLASS="FUNCTION"
+>usbs_handle_standard_control</TT
+>.</P
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN615"
+></A
+><H3
+>Polling Support</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>typedef struct usbs_control_endpoint {
+ void (*poll_fn)(struct usbs_control_endpoint*);
+ int interrupt_vector;
+ &#8230;
+} usbs_control_endpoint;</PRE
+></TD
+></TR
+></TABLE
+><P
+>In nearly all circumstances USB I/O should be interrupt-driven.
+However, there are special environments such as RedBoot where polled
+operation may be appropriate. If the device driver can operate in
+polled mode then it will provide a suitable function via the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>poll_fn</I
+></TT
+> field, and higher-level code can
+invoke this regularly. This polling function will take care of all
+endpoints associated with the device, not just the control endpoint.
+If the USB hardware involves a single interrupt vector then this will
+be identified in the data structure as well.</P
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="usbs-halt.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbs-data.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Halted Endpoints</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Data Endpoints</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/slave/current/doc/usbs-data.html b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-data.html
new file mode 100644
index 0000000000..e7b3f22ee9
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-data.html
@@ -0,0 +1,377 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Data Endpoints</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos USB Slave Support"
+HREF="io-usb-slave.html"><LINK
+REL="PREVIOUS"
+TITLE="Control Endpoints"
+HREF="usbs-control.html"><LINK
+REL="NEXT"
+TITLE="Writing a USB Device Driver"
+HREF="usbs-writing.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos USB Slave Support</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="usbs-control.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbs-writing.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBS-DATA"
+>Data Endpoints</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN623"
+></A
+><H2
+>Name</H2
+>Data Endpoints&nbsp;--&nbsp;Data endpoint data structures</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN626"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>#include &lt;cyg/io/usb/usbs.h&gt;
+
+typedef struct usbs_rx_endpoint {
+ void (*start_rx_fn)(struct usbs_rx_endpoint*);
+ void (*set_halted_fn)(struct usbs_rx_endpoint*, cyg_bool);
+ void (*complete_fn)(void*, int);
+ void* complete_data;
+ unsigned char* buffer;
+ int buffer_size;
+ cyg_bool halted;
+} usbs_rx_endpoint;
+
+typedef struct usbs_tx_endpoint {
+ void (*start_tx_fn)(struct usbs_tx_endpoint*);
+ void (*set_halted_fn)(struct usbs_tx_endpoint*, cyg_bool);
+ void (*complete_fn)(void*, int);
+ void* complete_data;
+ const unsigned char* buffer;
+ int buffer_size;
+ cyg_bool halted;
+} usbs_tx_endpoint;</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN628"
+></A
+><H2
+>Receive and Transmit Data Structures</H2
+><P
+>In addition to a single <SPAN
+CLASS="STRUCTNAME"
+>usbs_control_endpoint</SPAN
+>
+data structure per USB slave device, the USB device driver should also
+provide receive and transmit data structures corresponding to the
+other endpoints. The names of these are determined by the device
+driver. For example, the SA1110 USB device driver package provides
+<TT
+CLASS="LITERAL"
+>usbs_sa11x0_ep1</TT
+> for receives and
+<TT
+CLASS="LITERAL"
+>usbs_sa11x0_ep2</TT
+> for transmits.</P
+><P
+>Unlike control endpoints, the common USB slave package does provide a
+number of utility routines to manipulate data endpoints. For example
+<A
+HREF="usbs-start-rx.html"
+><TT
+CLASS="FUNCTION"
+>usbs_start_rx_buffer</TT
+></A
+>
+can be used to receive data from the host into a buffer. In addition
+the USB device driver can provide devtab entries such as
+<TT
+CLASS="LITERAL"
+>/dev/usbs1r</TT
+> and <TT
+CLASS="LITERAL"
+>/dev/usbs2w</TT
+>, so
+higher-level code can <TT
+CLASS="FUNCTION"
+>open</TT
+> these devices and then
+perform blocking <TT
+CLASS="FUNCTION"
+>read</TT
+> and
+<TT
+CLASS="FUNCTION"
+>write</TT
+> operations.</P
+><P
+>However, the operation of data endpoints and the various
+endpoint-related functions is relatively straightforward. First
+consider a <SPAN
+CLASS="STRUCTNAME"
+>usbs_rx_endpoint</SPAN
+> structure. The
+device driver will provide the members
+<TT
+CLASS="STRUCTFIELD"
+><I
+>start_rx_fn</I
+></TT
+> and
+<TT
+CLASS="STRUCTFIELD"
+><I
+>set_halted_fn</I
+></TT
+>, and it will maintain the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>halted</I
+></TT
+> field. To receive data, higher-level
+code sets the <TT
+CLASS="STRUCTFIELD"
+><I
+>buffer</I
+></TT
+>,
+<TT
+CLASS="STRUCTFIELD"
+><I
+>buffer_size</I
+></TT
+>,
+<TT
+CLASS="STRUCTFIELD"
+><I
+>complete_fn</I
+></TT
+> and optionally the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>complete_data</I
+></TT
+> fields. Next the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>start_rx_fn</I
+></TT
+> member should be called. When
+the transfer has finished the device driver will invoke the completion
+function, using <TT
+CLASS="STRUCTFIELD"
+><I
+>complete_data</I
+></TT
+> as the first
+argument and a size field for the second argument. A negative size
+indicates an error of some sort: <TT
+CLASS="LITERAL"
+>-EGAIN</TT
+> indicates
+that the endpoint has been halted, usually at the request of the host;
+<TT
+CLASS="LITERAL"
+>-EPIPE</TT
+> indicates that the connection between the
+host and the peripheral has been broken. Certain device drivers may
+generate other error codes.</P
+><P
+>If higher-level code needs to halt or unhalt an endpoint then it can
+invoke the <TT
+CLASS="STRUCTFIELD"
+><I
+>set_halted_fn</I
+></TT
+> member. When an
+endpoint is halted, invoking <TT
+CLASS="STRUCTFIELD"
+><I
+>start_rx_fn</I
+></TT
+>
+wit <TT
+CLASS="STRUCTFIELD"
+><I
+>buffer_size</I
+></TT
+> set to 0 indicates that
+higher-level code wants to block until the endpoint is no longer
+halted; at that point the completion function will be invoked.</P
+><P
+>USB device drivers are allowed to assume that higher-level protocols
+ensure that host and peripheral agree on the amount of data that will
+be transferred, or at least on an upper bound. Therefore there is no
+need for the device driver to maintain its own buffers, and copy
+operations are avoided. If the host sends more data than expected then
+the resulting behaviour is undefined.</P
+><P
+>Transmit endpoints work in essentially the same way as receive
+endpoints. Higher-level code should set the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>buffer</I
+></TT
+> and
+<TT
+CLASS="STRUCTFIELD"
+><I
+>buffer_size</I
+></TT
+> fields to point at the data to
+be transferred, then call <TT
+CLASS="STRUCTFIELD"
+><I
+>start_tx_fn</I
+></TT
+>, and
+the device driver will invoked the completion function when the
+transfer has completed.</P
+><P
+>USB device drivers are not expected to perform any locking. If at any
+time there are two concurrent receive operations for a given endpoint,
+or two concurrent transmit operations, then the resulting behaviour is
+undefined. It is the responsibility of higher-level code to perform
+any synchronisation that may be necessary. In practice, conflicts are
+unlikely because typically a given endpoint will only be accessed
+sequentially by just one part of the overall system.</P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="usbs-control.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbs-writing.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Control Endpoints</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Writing a USB Device Driver</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/slave/current/doc/usbs-devtab.html b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-devtab.html
new file mode 100644
index 0000000000..e501954c8c
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-devtab.html
@@ -0,0 +1,480 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Devtab Entries</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos USB Slave Support"
+HREF="io-usb-slave.html"><LINK
+REL="PREVIOUS"
+TITLE="Starting up a USB Device"
+HREF="usbs-start.html"><LINK
+REL="NEXT"
+TITLE="Receiving Data from the Host"
+HREF="usbs-start-rx.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos USB Slave Support</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="usbs-start.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbs-start-rx.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBS-DEVTAB"
+>Devtab Entries</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN200"
+></A
+><H2
+>Name</H2
+>Devtab Entries&nbsp;--&nbsp;Data endpoint data structure</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN203"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>/dev/usb0c
+/dev/usb1r
+/dev/usb2w</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN205"
+></A
+><H2
+>Devtab Entries</H2
+><P
+>USB device drivers provide two ways of transferring data between host
+and peripheral. The first involves USB-specific functionality such as
+<A
+HREF="usbs-start-rx.html"
+><TT
+CLASS="FUNCTION"
+>usbs_start_rx_buffer</TT
+></A
+>.
+This provides non-blocking I/O: a transfer is started, and some time
+later the device driver will call a supplied completion function. The
+second uses the conventional I/O model: there are entries in the
+device table corresponding to the various endpoints. Standard calls
+such as <TT
+CLASS="FUNCTION"
+>open</TT
+> can then be used to get a suitable
+handle. Actual I/O happens via blocking <TT
+CLASS="FUNCTION"
+>read</TT
+> and
+<TT
+CLASS="FUNCTION"
+>write</TT
+> calls. In practice the blocking operations
+are simply implemented using the underlying non-blocking
+functionality.</P
+><P
+>Each endpoint will have its own devtab entry. The exact names are
+controlled by the device driver package, but typically the root will
+be <TT
+CLASS="LITERAL"
+>/dev/usb</TT
+>. This is followed by one or more
+decimal digits giving the endpoint number, followed by
+<TT
+CLASS="LITERAL"
+>c</TT
+> for a control endpoint, <TT
+CLASS="LITERAL"
+>r</TT
+> for
+a receive endpoint (host to peripheral), and <TT
+CLASS="LITERAL"
+>w</TT
+> for
+a transmit endpoint (peripheral to host). If the target hardware
+involves more than one USB device then different roots should be used,
+for example <TT
+CLASS="LITERAL"
+>/dev/usb0c</TT
+> and
+<TT
+CLASS="LITERAL"
+>/dev/usb1_0c</TT
+>. This may require explicit
+manipulation of device driver configuration options by the application
+developer.</P
+><P
+>At present the devtab entry for a control endpoint does not support
+any I/O operations. </P
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN221"
+></A
+><H3
+><TT
+CLASS="FUNCTION"
+>write</TT
+> operations</H3
+><P
+><TT
+CLASS="FUNCTION"
+>cyg_io_write</TT
+> and similar functions in
+higher-level packages can be used to perform a transfer from
+peripheral to host. Successive write operations will not be coalesced.
+For example, when doing a 1000 byte write to an endpoint that uses the
+bulk transfer protocol this will involve 15 full-size 64-byte packets
+and a terminating 40-byte packet. USB device drivers are not expected
+to do any locking, and if higher-level code performs multiple
+concurrent write operations on a single endpoint then the resulting
+behaviour is undefined.</P
+><P
+>A USB <TT
+CLASS="FUNCTION"
+>write</TT
+> operation will never transfer less
+data than specified. It is the responsibility of higher-level code to
+ensure that the amount of data being transferred is acceptable to the
+host-side code. Usually this will be defined by a higher-level
+protocol. If an attempt is made to transfer more data than the host
+expects then the resulting behaviour is undefined.</P
+><P
+>There are two likely error conditions. <TT
+CLASS="LITERAL"
+>EPIPE</TT
+>
+indicates that the connection between host and target has been broken.
+<TT
+CLASS="LITERAL"
+>EAGAIN</TT
+> indicates that the endpoint has been
+stalled, either at the request of the host or by other activity
+inside the peripheral.</P
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN231"
+></A
+><H3
+><TT
+CLASS="FUNCTION"
+>read</TT
+> operations</H3
+><P
+><TT
+CLASS="FUNCTION"
+>cyg_io_read</TT
+> and similar functions in higher-level
+packages can be used to perform a transfer from host to peripheral.
+This should be a complete transfer: higher-level protocols should
+define an upper bound on the amount of data being transferred, and the
+<TT
+CLASS="FUNCTION"
+>read</TT
+> operation should involve at least this
+amount of data. The return value will indicate the actual transfer
+size, which may be less than requested.</P
+><P
+>Some device drivers may support partial reads, but USB device drivers
+are not expected to perform any buffering because that involves both
+memory and code overheads. One technique that may work for bulk
+transfers is to exploit the fact that such transfers happen in 64-byte
+packets. It is possible to <TT
+CLASS="FUNCTION"
+>read</TT
+> an initial 64
+bytes, corresponding to the first packet in the transfer. These 64
+bytes can then be examined to determine the total transfer size, and
+the remaining data can be transferred in another
+<TT
+CLASS="FUNCTION"
+>read</TT
+> operation. This technique is not guaranteed
+to work with all USB hardware. Also, if the delay between accepting
+the first packet and the remainder of the transfer is excessive then
+this could cause timeout problems for the host-side software. For
+these reasons the use of partial reads should be avoided.</P
+><P
+>There are two likely error conditions. <TT
+CLASS="LITERAL"
+>EPIPE</TT
+>
+indicates that the connection between host and target has been broken.
+<TT
+CLASS="LITERAL"
+>EAGAIN</TT
+> indicates that the endpoint has been
+stalled, either at the request of the host or by other activity
+inside the peripheral.</P
+><P
+>USB device drivers are not expected to do any locking. If higher-level
+code performs multiple concurrent read operations on a single endpoint
+then the resulting behaviour is undefined.</P
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN244"
+></A
+><H3
+><TT
+CLASS="FUNCTION"
+>select</TT
+> operations</H3
+><P
+>Typical USB device drivers will not provide any support for
+<TT
+CLASS="FUNCTION"
+>select</TT
+>. Consider bulk transfers from the host to
+the peripheral. At the USB device driver level there is no way of
+knowing in advance how large a transfer will be, so it is not feasible
+for the device driver to buffer the entire transfer. It may be
+possible to buffer part of the transfer, for example the first 64-byte
+packet, and copy this into application space at the start of a
+<TT
+CLASS="FUNCTION"
+>read</TT
+>, but this adds code and memory overheads.
+Worse, it means that there is an unknown but potentially long delay
+between a peripheral accepting the first packet of a transfer and the
+remaining packets, which could confuse or upset the host-side
+software.</P
+><P
+>With some USB hardware it may be possible for the device driver to
+detect OUT tokens from the host without actually accepting the data,
+and this would indicate that a <TT
+CLASS="FUNCTION"
+>read</TT
+> is likely to
+succeed. However, it would not be reliable since the host-side I/O
+operation could time out. A similar mechanism could be used to
+implement <TT
+CLASS="FUNCTION"
+>select</TT
+> for outgoing data, but again
+this would not be reliable.</P
+><P
+>Some device drivers may provide partial support for
+<TT
+CLASS="FUNCTION"
+>select</TT
+> anyway, possibly under the control of a
+configuration option. The device driver's documentation should be
+consulted for further information. It is also worth noting that the
+USB-specific non-blocking API can often be used as an alternative to
+<TT
+CLASS="FUNCTION"
+>select</TT
+>.</P
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN256"
+></A
+><H3
+><TT
+CLASS="FUNCTION"
+>get_config</TT
+> and
+<TT
+CLASS="FUNCTION"
+>set_config</TT
+> operations</H3
+><P
+>There are no <TT
+CLASS="FUNCTION"
+>set_config</TT
+> or
+<TT
+CLASS="FUNCTION"
+>get_config</TT
+> (also known as
+<TT
+CLASS="FUNCTION"
+>ioctl</TT
+>) operations defined for USB devices.
+Some device drivers may provide hardware-specific facilities this way. </P
+><DIV
+CLASS="NOTE"
+><BLOCKQUOTE
+CLASS="NOTE"
+><P
+><B
+>Note: </B
+>Currently the USB-specific functions related to <A
+HREF="usbs-halt.html"
+>halted endpoints</A
+> cannot be accessed readily
+via devtab entries. This functionality should probably be made
+available via <TT
+CLASS="FUNCTION"
+>set_config</TT
+> and
+<TT
+CLASS="FUNCTION"
+>get_config</TT
+>. It may also prove useful to provide
+a <TT
+CLASS="FUNCTION"
+>get_config</TT
+> operation that maps from the
+devtab entries to the underlying endpoint data structures.</P
+></BLOCKQUOTE
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN270"
+></A
+><H3
+>Presence</H3
+><P
+>The devtab entries are optional. If the USB device is accessed
+primarily by class-specific code such as the USB-ethernet package and
+that package uses the USB-specific API directly, the devtab entries
+are redundant. Even if application code does need to access the USB
+device, the non-blocking API may be more convenient than the blocking
+I/O provided via the devtab entries. In these cases the devtab entries
+serve no useful purpose, but they still impose a memory overhead. It
+is possible to suppress the presence of these entries by disabling the
+configuration option
+<TT
+CLASS="LITERAL"
+>CYGGLO_IO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES</TT
+>.</P
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="usbs-start.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbs-start-rx.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Starting up a USB Device</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Receiving Data from the Host</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/slave/current/doc/usbs-enum.html b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-enum.html
new file mode 100644
index 0000000000..faf4d41303
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-enum.html
@@ -0,0 +1,834 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>USB Enumeration Data</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos USB Slave Support"
+HREF="io-usb-slave.html"><LINK
+REL="PREVIOUS"
+TITLE="Introduction"
+HREF="usbs-intro.html"><LINK
+REL="NEXT"
+TITLE="Starting up a USB Device"
+HREF="usbs-start.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos USB Slave Support</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="usbs-intro.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbs-start.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBS-ENUM"
+>USB Enumeration Data</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN68"
+></A
+><H2
+>Name</H2
+>Enumeration Data&nbsp;--&nbsp;The USB enumeration data structures</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN71"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>#include &lt;cyg/io/usb/usb.h&gt;
+#include &lt;cyg/io/usb/usbs.h&gt;
+
+typedef struct usb_device_descriptor {
+ &#8230;
+} usb_device_descriptor __attribute__((packed));
+
+typedef struct usb_configuration_descriptor {
+ &#8230;
+} usb_configuration_descriptor __attribute__((packed));
+
+typedef struct usb_interface_descriptor {
+ &#8230;
+} usb_interface_descriptor __attribute__((packed));
+
+typedef struct usb_endpoint_descriptor {
+ &#8230;
+} usb_endpoint_descriptor;
+
+typedef struct usbs_enumeration_data {
+ usb_device_descriptor device;
+ int total_number_interfaces;
+ int total_number_endpoints;
+ int total_number_strings;
+ const usb_configuration_descriptor* configurations;
+ const usb_interface_descriptor* interfaces;
+ const usb_endpoint_descriptor* endpoints;
+ const unsigned char** strings;
+} usbs_enumeration_data;</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN73"
+></A
+><H2
+>USB Enumeration Data</H2
+><P
+>When a USB host detects that a peripheral has been plugged in or
+powered up, one of the first steps is to ask the peripheral to
+describe itself by supplying enumeration data. Some of this data
+depends on the class of peripheral. Other fields are vendor-specific.
+There is also a dependency on the hardware, specifically which
+endpoints are available should be used. In general it is not possible
+for generic code to provide this information, so it is the
+responsibility of application code to provide a suitable
+<SPAN
+CLASS="STRUCTNAME"
+>usbs_enumeration_data</SPAN
+> data structure and
+install it in the endpoint 0 data structure during initialization.
+This must happen before the USB device is enabled by a call to
+<TT
+CLASS="FUNCTION"
+>usbs_start</TT
+>, for example:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>const usbs_enumeration_data usb_enum_data = {
+ &#8230;
+};
+
+int
+main(int argc, char** argv)
+{
+ usbs_sa11x0_ep0.enumeration_data = &amp;usb_enum_data;
+ &#8230;
+ usbs_start(&amp;usbs_sa11x0_ep0);
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>For most applications the enumeration data will be static, although
+the <SPAN
+CLASS="STRUCTNAME"
+>usbs_enumeration_data</SPAN
+> structure can be
+filled in at run-time if necessary. Full details of the enumeration
+data can be found in the Universal Serial Bus specification obtainable
+from the <A
+HREF="http://www.usb.org/"
+TARGET="_top"
+>USB Implementers Forum web
+site</A
+>, although the meaning of most fields is fairly obvious.
+The various data structures and utility macros are defined in the
+header files <TT
+CLASS="FILENAME"
+>cyg/io/usb/usb.h</TT
+>
+and <TT
+CLASS="FILENAME"
+>cyg/io/usb/usbs.h</TT
+>. Note
+that the example code below makes use of the gcc labelled element
+extension.</P
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN84"
+></A
+><H3
+><SPAN
+CLASS="STRUCTNAME"
+>usb_device_descriptor</SPAN
+></H3
+><P
+>The main information about a USB peripheral comes from a single
+<SPAN
+CLASS="STRUCTNAME"
+>usb_device_descriptor</SPAN
+> structure, which is
+embedded in the <SPAN
+CLASS="STRUCTNAME"
+>usbs_enumeration_data</SPAN
+>
+structure. A typical example might look like this:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>const usbs_enumeration_data usb_enum_data = {
+ {
+ length: USB_DEVICE_DESCRIPTOR_LENGTH,
+ type: USB_DEVICE_DESCRIPTOR_TYPE,
+ usb_spec_lo: USB_DEVICE_DESCRIPTOR_USB11_LO,
+ usb_spec_hi: USB_DEVICE_DESCRIPTOR_USB11_HI,
+ device_class: USB_DEVICE_DESCRIPTOR_CLASS_VENDOR,
+ device_subclass: USB_DEVICE_DESCRIPTOR_SUBCLASS_VENDOR,
+ device_protocol: USB_DEVICE_DESCRIPTOR_PROTOCOL_VENDOR,
+ max_packet_size: 8,
+ vendor_lo: 0x42,
+ vendor_hi: 0x42,
+ product_lo: 0x42,
+ product_hi: 0x42,
+ device_lo: 0x00,
+ device_hi: 0x01,
+ manufacturer_str: 1,
+ product_str: 2,
+ serial_number_str: 0,
+ number_configurations: 1
+ },
+ &#8230;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The length and type fields are specified by the USB standard. The
+<TT
+CLASS="STRUCTFIELD"
+><I
+>usb_spec_lo</I
+></TT
+> and
+<TT
+CLASS="STRUCTFIELD"
+><I
+>usb_spec_hi</I
+></TT
+> fields identify the particular
+revision of the standard that the peripheral implements, for example
+revision 1.1.</P
+><P
+>The device class, subclass, and protocol fields are used by generic
+host-side USB software to determine which host-side device driver
+should be loaded to interact with the peripheral. A number of standard
+classes are defined, for example mass-storage devices and
+human-interface devices. If a peripheral implements one of the
+standard classes then a standard existing host-side device driver may
+exist, eliminating the need to write a custom driver. The value
+<TT
+CLASS="LITERAL"
+>0xFF</TT
+> (<TT
+CLASS="LITERAL"
+>VENDOR</TT
+>) is reserved for
+peripherals that implement a vendor-specific protocol rather than a
+standard one. Such peripherals will require a custom host-side device
+driver. The value <TT
+CLASS="LITERAL"
+>0x00</TT
+>
+(<TT
+CLASS="LITERAL"
+>INTERFACE</TT
+>) is reserved and indicates that the
+protocol used by the peripheral is defined at the interface level
+rather than for the peripheral as a whole.</P
+><P
+>The <TT
+CLASS="STRUCTFIELD"
+><I
+>max_package_size</I
+></TT
+> field specifies the
+maximum length of a control message. There is a lower bound of eight
+bytes, and typical hardware will not support anything larger because
+control messages are usually small and not performance-critical.</P
+><P
+>The <TT
+CLASS="STRUCTFIELD"
+><I
+>vendor_lo</I
+></TT
+> and
+<TT
+CLASS="STRUCTFIELD"
+><I
+>vendor_hi</I
+></TT
+> fields specify a vendor id, which
+must be obtained from the USB Implementor's Forum. The numbers used in
+the code fragment above are examples only and must not be used in real
+USB peripherals. The product identifier is determined by the vendor,
+and different USB peripherals should use different identifiers. The
+device identifier field should indicate a release number in
+binary-coded decimal.</P
+><P
+>The above fields are all numerical in nature. A USB peripheral can
+also provide a number of strings as described <A
+HREF="usbs-enum.html#AEN159"
+>below</A
+>, for example the name of the
+vendor can be provided. The various <TT
+CLASS="STRUCTFIELD"
+><I
+>_str</I
+></TT
+>
+fields act as indices into an array of strings, with index 0
+indicating that no string is available. </P
+><P
+>A typical USB peripheral involves just a single configuration. However
+more complicated peripherals can support multiple configurations. Only
+one configuration will be active at any one time, and the host will
+switch between them as appropriate. If a peripheral does involve
+multiple configurations then typically it will be the responsibility
+of application code to <A
+HREF="usbs-control.html#AEN545"
+>handle</A
+> the standard
+set-configuration control message.</P
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN109"
+></A
+><H3
+><SPAN
+CLASS="STRUCTNAME"
+>usb_configuration_descriptor</SPAN
+></H3
+><P
+>A USB peripheral involves at least one and possible several different
+configurations. The <SPAN
+CLASS="STRUCTNAME"
+>usbs_enumeration_data</SPAN
+>
+structure requires a pointer to an array, possibly of length 1, of
+<SPAN
+CLASS="STRUCTNAME"
+>usb_configuration_descriptor</SPAN
+> structures.
+Usually a single structure suffices:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>const usb_configuration_descriptor usb_configuration = {
+ length: USB_CONFIGURATION_DESCRIPTOR_LENGTH,
+ type: USB_CONFIGURATION_DESCRIPTOR_TYPE,
+ total_length_lo: USB_CONFIGURATION_DESCRIPTOR_TOTAL_LENGTH_LO(1, 2),
+ total_length_hi: USB_CONFIGURATION_DESCRIPTOR_TOTAL_LENGTH_HI(1, 2),
+ number_interfaces: 1,
+ configuration_id: 1,
+ configuration_str: 0,
+ attributes: USB_CONFIGURATION_DESCRIPTOR_ATTR_REQUIRED |
+ USB_CONFIGURATION_DESCRIPTOR_ATTR_SELF_POWERED,
+ max_power: 50
+};
+
+const usbs_enumeration_data usb_enum_data = {
+ &#8230;
+ configurations: &amp;usb_configuration,
+ &#8230;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The values for the <TT
+CLASS="STRUCTFIELD"
+><I
+>length</I
+></TT
+> and
+<TT
+CLASS="STRUCTFIELD"
+><I
+>type</I
+></TT
+> fields are determined by the standard.
+The <TT
+CLASS="STRUCTFIELD"
+><I
+>total_length</I
+></TT
+> field depends on the
+number of interfaces and endpoints used by this configuration, and
+convenience macros are provided to calculate this: the first argument
+to the macros specify the number of interfaces, the second the number
+of endpoints. The <TT
+CLASS="STRUCTFIELD"
+><I
+>number_interfaces</I
+></TT
+> field
+is self-explanatory. If the peripheral involves multiple
+configurations then each one must have a unique id, and this will be
+used in the set-configuration control message. The id
+<TT
+CLASS="LITERAL"
+>0</TT
+> is reserved, and a set-configuration control
+message that uses this id indicates that the peripheral should be
+inactive. Configurations can have a string description if required.
+The <TT
+CLASS="STRUCTFIELD"
+><I
+>attributes</I
+></TT
+> field must have the
+<TT
+CLASS="LITERAL"
+>REQUIRED</TT
+> bit set; the
+<TT
+CLASS="LITERAL"
+>SELF_POWERED</TT
+> bit informs the host that the
+peripheral has its own power supply and will not draw any power over
+the bus, leaving more bus power available to other peripherals; the
+<TT
+CLASS="LITERAL"
+>REMOTE_WAKEUP</TT
+> bit is used if the peripheral can
+interrupt the host when the latter is in power-saving mode. For
+peripherals that are not self-powered, the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>max_power</I
+></TT
+> field specifies the power
+requirements in units of 2mA.</P
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN127"
+></A
+><H3
+><SPAN
+CLASS="STRUCTNAME"
+>usb_interface_descriptor</SPAN
+></H3
+><P
+>A USB configuration involves one or more interfaces, typically
+corresponding to different streams of data. For example, one interface
+might involve video data while another interface is for audio.
+Multiple interfaces in a single configuration will be active at the
+same time.</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>const usb_interface_descriptor usb_interface = {
+ length: USB_INTERFACE_DESCRIPTOR_LENGTH,
+ type: USB_INTERFACE_DESCRIPTOR_TYPE,
+ interface_id: 0,
+ alternate_setting: 0,
+ number_endpoints: 2,
+ interface_class: USB_INTERFACE_DESCRIPTOR_CLASS_VENDOR,
+ interface_subclass: USB_INTERFACE_DESCRIPTOR_SUBCLASS_VENDOR,
+ interface_protocol: USB_INTERFACE_DESCRIPTOR_PROTOCOL_VENDOR,
+ interface_str: 0
+};
+
+const usbs_enumeration_data usb_enum_data = {
+ &#8230;
+ total_number_interfaces: 1,
+ interfaces: &amp;usb_interface,
+ &#8230;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>Again, the <TT
+CLASS="STRUCTFIELD"
+><I
+>length</I
+></TT
+> and
+<TT
+CLASS="STRUCTFIELD"
+><I
+>type</I
+></TT
+> fields are specified by the standard.
+Each interface within a configuration requires its own id. However, a
+given interface may have several alternate settings, in other words
+entries in the interfaces array with the same id but different
+<TT
+CLASS="STRUCTFIELD"
+><I
+>alternate_setting</I
+></TT
+> fields. For example,
+there might be one setting which requires a bandwidth of 100K/s and
+another setting that only needs 50K/s. The host can use the standard
+set-interface control message to choose the most appropriate setting.
+The handling of this request is the responsibility of higher-level
+code, so the application may have to <A
+HREF="usbs-control.html#AEN545"
+>install</A
+> its own handler.</P
+><P
+>The number of endpoints used by an interface is specified in the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>number_endpoints</I
+></TT
+> field. Exact details of
+which endpoints are used is held in a separate array of endpoint
+descriptors. The class, subclass and protocol fields are used by
+host-side code to determine which host-side device driver should
+handle this specific interface. Usually this is determined on a
+per-peripheral basis in the
+<SPAN
+CLASS="STRUCTNAME"
+>usb_device_descriptor</SPAN
+> structure, but that can
+defer the details to individual interfaces. A per-interface string
+is allowed as well.</P
+><P
+>For USB peripherals involving multiple configurations, the array of
+<SPAN
+CLASS="STRUCTNAME"
+>usb_interface_descriptor</SPAN
+> structures should
+first contain all the interfaces for the first configuration, then all
+the interfaces for the second configuration, and so on.</P
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN142"
+></A
+><H3
+><SPAN
+CLASS="STRUCTNAME"
+>usb_endpoint_descriptor</SPAN
+></H3
+><P
+>The host also needs information about which endpoint should be used
+for what. This involves an array of endpoint descriptors:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>const usb_endpoint_descriptor usb_endpoints[] = {
+ {
+ length: USB_ENDPOINT_DESCRIPTOR_LENGTH,
+ type: USB_ENDPOINT_DESCRIPTOR_TYPE,
+ endpoint: USB_ENDPOINT_DESCRIPTOR_ENDPOINT_OUT | 1,
+ attributes: USB_ENDPOINT_DESCRIPTOR_ATTR_BULK,
+ max_packet_lo: 64,
+ max_packet_hi: 0,
+ interval: 0
+ },
+ {
+ length: USB_ENDPOINT_DESCRIPTOR_LENGTH,
+ type: USB_ENDPOINT_DESCRIPTOR_TYPE,
+ endpoint: USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN | 2,
+ attributes: USB_ENDPOINT_DESCRIPTOR_ATTR_BULK,
+ max_packet_lo: 64,
+ max_packet_hi: 0,
+ interval: 0
+ }
+};
+
+const usbs_enumeration_data usb_enum_data = {
+ &#8230;
+ total_number_endpoints: 2,
+ endpoints: usb_endpoints,
+ &#8230;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>As usual the values for the <TT
+CLASS="STRUCTFIELD"
+><I
+>length</I
+></TT
+> and
+<TT
+CLASS="STRUCTFIELD"
+><I
+>type</I
+></TT
+> fields are specified by the standard.
+The <TT
+CLASS="STRUCTFIELD"
+><I
+>endpoint</I
+></TT
+> field gives both the endpoint
+number and the direction, so in the above example endpoint 1 is used
+for OUT (host to peripheral) transfers and endpoint 2 is used for IN
+(peripheral to host) transfers. The
+<TT
+CLASS="STRUCTFIELD"
+><I
+>attributes</I
+></TT
+> field indicates the USB protocol
+that should be used on this endpoint: <TT
+CLASS="LITERAL"
+>CONTROL</TT
+>,
+<TT
+CLASS="LITERAL"
+>ISOCHRONOUS</TT
+>, <TT
+CLASS="LITERAL"
+>BULK</TT
+> or
+<TT
+CLASS="LITERAL"
+>INTERRUPT</TT
+>. The
+<TT
+CLASS="STRUCTFIELD"
+><I
+>max_packet</I
+></TT
+> field specifies the maximum size
+of a single USB packet. For bulk transfers this will typically be 64
+bytes. For isochronous transfers this can be up to 1023 bytes. For
+interrupt transfers it can be up to 64 bytes, although usually a
+smaller value will be used. The <TT
+CLASS="STRUCTFIELD"
+><I
+>interval</I
+></TT
+>
+field is ignored for control and bulk transfers. For isochronous
+transfers it should be set to 1. For interrupt transfers it can be a
+value between 1 and 255, and indicates the number of milliseconds
+between successive polling operations.</P
+><P
+>For USB peripherals involving multiple configurations or interfaces
+the array of endpoint descriptors should be organized sequentially:
+first the endpoints corresponding to the first interface of the first
+configuration, then the second interface in that configuration, and so
+on; then all the endpoints for all the interfaces in the second
+configuration; etc.</P
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN159"
+></A
+><H3
+>Strings</H3
+><P
+>The enumeration data can contain a number of strings with additional
+information. Unicode encoding is used for the strings, and it is
+possible for a peripheral to supply a given string in multiple
+languages using the appropriate characters. The first two bytes of
+each string give a length and type field. The first string is special;
+after the two bytes header it consists of an array of 2-byte language
+id codes, indicating the supported languages. The language code
+0x0409 corresponds to English (United States). </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>const unsigned char* usb_strings[] = {
+ "\004\003\011\004",
+ "\020\003R\000e\000d\000 \000H\000a\000t\000"
+};
+
+const usbs_enumeration_data usb_enum_data = {
+ &#8230;
+ total_number_strings: 2,
+ strings: usb_strings,
+ &#8230;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The default handler for standard control messages assumes that the
+peripheral only uses a single language. If this is not the case then
+higher-level code will have to handle the standard get-descriptor
+control messages when a string descriptor is requested.</P
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN164"
+></A
+><H3
+><SPAN
+CLASS="STRUCTNAME"
+>usbs_enumeration_data</SPAN
+></H3
+><P
+>The <SPAN
+CLASS="STRUCTNAME"
+>usbs_enumeration_data</SPAN
+> data structure
+collects together all the various descriptors that make up the
+enumeration data. It is the responsibility of application code to
+supply a suitable data structure and install it in the control
+endpoints's <TT
+CLASS="STRUCTFIELD"
+><I
+>enumeration_data</I
+></TT
+> field before
+the USB device is started.</P
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="usbs-intro.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbs-start.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Introduction</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Starting up a USB Device</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/slave/current/doc/usbs-halt.html b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-halt.html
new file mode 100644
index 0000000000..fc5ca52fb5
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-halt.html
@@ -0,0 +1,312 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Halted Endpoints</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos USB Slave Support"
+HREF="io-usb-slave.html"><LINK
+REL="PREVIOUS"
+TITLE="Sending Data to the Host"
+HREF="usbs-start-tx.html"><LINK
+REL="NEXT"
+TITLE="Control Endpoints"
+HREF="usbs-control.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos USB Slave Support</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="usbs-start-tx.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbs-control.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBS-HALT"
+>Halted Endpoints</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN420"
+></A
+><H2
+>Name</H2
+>Halted Endpoints&nbsp;--&nbsp;Support for Halting and Halted Endpoints</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN423"
+></A
+><H2
+>Synopsis</H2
+><DIV
+CLASS="FUNCSYNOPSIS"
+><A
+NAME="AEN424"
+></A
+><P
+></P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="FUNCSYNOPSISINFO"
+>#include &lt;cyg/io/usb/usbs.h&gt;</PRE
+></TD
+></TR
+></TABLE
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>cyg_bool usbs_rx_endpoint_halted</CODE
+>(usbs_rx_endpoint* ep);</CODE
+></P
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>void usbs_set_rx_endpoint_halted</CODE
+>(usbs_rx_endpoint* ep, cyg_bool new_state);</CODE
+></P
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>void usbs_start_rx_endpoint_wait</CODE
+>(usbs_rx_endpoint* ep, void (*)(void*, int) complete_fn, void * complete_data);</CODE
+></P
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>cyg_bool
+usbs_tx_endpoint_halted</CODE
+>(usbs_tx_endpoint* ep);</CODE
+></P
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>void usbs_set_tx_endpoint_halted</CODE
+>(usbs_tx_endpoint* ep, cyg_bool new_state);</CODE
+></P
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>void usbs_start_tx_endpoint_wait</CODE
+>(usbs_tx_endpoint* ep, void (*)(void*, int) complete_fn, void * complete_data);</CODE
+></P
+><P
+></P
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN468"
+></A
+><H2
+><TT
+CLASS="FUNCTION"
+>Description</TT
+></H2
+><P
+>Normal USB traffic involves straightforward handshakes, with either an
+<TT
+CLASS="LITERAL"
+>ACK</TT
+> to indicate that a packet was transferred
+without errors, or a <TT
+CLASS="LITERAL"
+>NAK</TT
+> if an error occurred, or
+if a peripheral is currently unable to process another packet from the
+host, or has no packet to send to the host. There is a third form of
+handshake, a <TT
+CLASS="LITERAL"
+>STALL</TT
+>, which indicates that the
+endpoint is currently <I
+CLASS="EMPHASIS"
+>halted</I
+>.</P
+><P
+>When an endpoint is halted it means that the host-side code needs to
+take some sort of recovery action before communication over that
+endpoint can resume. The exact circumstances under which this can
+happen are not defined by the USB specification, but one example would
+be a protocol violation if say the peripheral attempted to transmit
+more data to the host than was permitted by the protocol in use. The
+host can use the standard control messages get-status, set-feature and
+clear-feature to examine and manipulate the halted status of a given
+endpoint. There are USB-specific functions which can be used inside
+the peripheral to achieve the same effect. Once an endpoint has been
+halted the host can then interact with the peripheral using class or
+vendor control messages to perform appropriate recovery, and then the
+halted condition can be cleared.</P
+><P
+>Halting an endpoint does not constitute a device state change, and
+there is no mechanism by which higher-level code can be informed
+immediately. However, any ongoing receive or transmit operations will
+be aborted with an <TT
+CLASS="LITERAL"
+>-EAGAIN</TT
+> error, and any new
+receives or transmits will fail immediately with the same error.</P
+><P
+>There are six functions to support halted endpoints, one set for
+receive endpoints and another for transmit endpoints, with both sets
+behaving in essentially the same way. The first,
+<TT
+CLASS="FUNCTION"
+>usbs_rx_endpoint_halted</TT
+>, can be used to determine
+whether or not an endpoint is currently halted: it takes a single
+argument that identifies the endpoint of interest. The second
+function, <TT
+CLASS="FUNCTION"
+>usbs_set_rx_endpoint_halted</TT
+>, can be
+used to change the halted condition of an endpoint: it takes two
+arguments; one to identify the endpoint and another to specify the new
+state. The last function
+<TT
+CLASS="FUNCTION"
+>usbs_start_rx_endpoint_wait</TT
+> operates in much the
+same way as <TT
+CLASS="FUNCTION"
+>usbs_start_rx_buffer</TT
+>: when the
+endpoint is no longer halted the device driver will invoke the
+supplied completion function with a status of 0. The completion
+function has the same signature as that for a transfer operation.
+Often it will be possible to use a single completion function and have
+the foreground code invoke either
+<TT
+CLASS="FUNCTION"
+>usbs_start_rx_buffer</TT
+> or
+<TT
+CLASS="FUNCTION"
+>usbs_start_rx_endpoint_wait</TT
+> depending on the
+current state of the endpoint.</P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="usbs-start-tx.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbs-control.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Sending Data to the Host</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Control Endpoints</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/slave/current/doc/usbs-intro.html b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-intro.html
new file mode 100644
index 0000000000..9fe070eb5f
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-intro.html
@@ -0,0 +1,473 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Introduction</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos USB Slave Support"
+HREF="io-usb-slave.html"><LINK
+REL="PREVIOUS"
+TITLE="eCos USB Slave Support"
+HREF="io-usb-slave.html"><LINK
+REL="NEXT"
+TITLE="USB Enumeration Data"
+HREF="usbs-enum.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos USB Slave Support</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="io-usb-slave.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbs-enum.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBS-INTRO"
+>Introduction</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN6"
+></A
+><H2
+>Name</H2
+>Introduction&nbsp;--&nbsp;eCos support for USB slave devices</DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN9"
+></A
+><H2
+>Introduction</H2
+><P
+>The eCos USB slave support allows developers to produce USB
+peripherals. It consists of a number of different eCos packages:</P
+><P
+></P
+><OL
+TYPE="1"
+><LI
+><P
+>Device drivers for specific implementations of USB slave hardware, for
+example the on-chip USB Device Controller provided by the Intel SA1110
+processor. A typical USB peripheral will only provide one USB slave
+port and therefore only one such device driver package will be needed.
+Usually the device driver package will be loaded automatically when
+you create an eCos configuration for target hardware that has a USB
+slave device. If you select a target which does have a USB slave
+device but no USB device driver is loaded, this implies that no such
+device driver is currently available.</P
+></LI
+><LI
+><P
+>The common USB slave package. This serves two purposes. It defines the
+API that specific device drivers should implement. It also provides
+various utilities that will be needed by most USB device drivers and
+applications, such as handlers for standard control messages.
+Usually this package will be loaded automatically at the same time as
+the USB device driver.</P
+></LI
+><LI
+><P
+>The common USB package. This merely provides some information common
+to both the host and slave sides of USB, such as details of the
+control protocol. It is also used to place the other USB-related
+packages appropriately in the overall configuration hierarchy. Usually
+this package will be loaded at the same time as the USB device driver.</P
+></LI
+><LI
+><P
+>Class-specific USB support packages. These make it easier to develop
+specific classes of USB peripheral, such as a USB-ethernet device. If
+no suitable package is available for a given class of peripheral then
+the USB device driver can instead be accessed directly from
+application code. Such packages will never be loaded automatically
+since the configuration system has no way of knowing what class of USB
+peripheral is being developed. Instead developers have to add the
+appropriate package or packages explicitly.</P
+></LI
+></OL
+><P
+>These packages only provide support for developing USB peripherals,
+not USB hosts.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN22"
+></A
+><H2
+>USB Concepts</H2
+><P
+>Information about USB can be obtained from a number of sources
+including the <A
+HREF="http://www.usb.org/"
+TARGET="_top"
+>USB Implementers Forum
+web site</A
+>. Only a brief summary is provided here.</P
+><P
+>A USB network is asymmetrical: it consists of a single host, one or
+more slave devices, and possibly some number of intermediate hubs. The
+host side is significantly more complicated than the slave side.
+Essentially, all operations are initiated by the host. For example, if
+the host needs to receive some data from a particular USB peripheral
+then it will send an IN token to that peripheral; the latter should
+respond with either a NAK or with appropriate data. Similarly, when
+the host wants to transmit data to a peripheral it will send an OUT
+token followed by the data; the peripheral will return a NAK if it is
+currently unable to receive more data or if there was corruption,
+otherwise it will return an ACK. All transfers are check-summed and
+there is a clearly-defined error recovery process. USB peripherals can
+only interact with the host, not with each other.</P
+><P
+>USB supports four different types of communication: control messages,
+interrupt transfers, isochronous transfers, and bulk transfers.
+Control messages are further subdivided into four categories:
+standard, class, vendor and a reserved category. All USB peripherals
+must respond to certain standard control messages, and usually this
+will be handled by the common USB slave package (for complicated
+peripherals, application support will be needed). Class and vendor
+control messages may be handled by an class-specific USB support
+package, for example the USB-ethernet package will handle control
+messages such as getting the MAC address or enabling/disabling
+promiscuous mode. Alternatively, some or all of these messages will
+have to be handled by application code.</P
+><P
+>Interrupt transfers are used for devices which need to be polled
+regularly. For example, a USB keyboard might be polled once every
+millisecond. The host will not poll the device more frequently than
+this, so interrupt transfers are best suited to peripherals that
+involve a relatively small amount of data. Isochronous transfers are
+intended for multimedia-related peripherals where typically a large
+amount of video or audio data needs to be exchanged continuously.
+Given appropriate host support a USB peripheral can reserve some of
+the available bandwidth. Isochronous transfers are not reliable; if a
+particular packet is corrupted then it will just be discarded and
+software is expected to recover from this. Bulk transfers are used for
+everything else: after taking care of any pending control, isochronous
+and interrupt transfers the host will use whatever bandwidth remains
+for bulk transfers. Bulk transfers are reliable.</P
+><P
+>Transfers are organized into USB packets, with the details depending
+on the transfer type. Control messages always involve an initial
+8-byte packet from host to peripheral, optionally followed by some
+additional packets; in theory these additional packets can be up to 64
+bytes, but hardware may limit it to 8 bytes. Interrupt transfers
+involve a single packet of up to 64 bytes. Isochronous transfers
+involve a single packet of up to 1024 bytes. Bulk transfers involve
+multiple packets. There will be some number, possibly zero, of 64-byte
+packets. The transfer is terminated by a single packet of less than 64
+bytes. If the transfer involves an exact multiple of 64 bytes than the
+final packet will be 0 bytes, consisting of just a header and checksum
+which typically will be generated by the hardware. There is no
+pre-defined limit on the size of a bulk transfer. Instead higher-level
+protocols are expected to handle this, so for a USB-ethernet
+peripheral the protocol could impose a limit of 1514 bytes of data
+plus maybe some additional protocol overhead.</P
+><P
+>Transfers from the host to a peripheral are addressed not just to that
+peripheral but to a specific endpoint within that peripheral.
+Similarly, the host requests incoming data from a specific endpoint
+rather than from the peripheral as a whole. For example, a combined
+keyboard/touchpad device could provide the keyboard events on endpoint
+1 and the mouse events on endpoint 2. A given USB peripheral can have
+up to 16 endpoints for incoming data and another 16 for outgoing data.
+However, given the comparatively high speed of USB I/O this endpoint
+addressing is typically implemented in hardware rather than software,
+and the hardware will only implement a small number of endpoints.
+Endpoint 0 is generally used only for control messages.</P
+><P
+>In practice, many of these details are irrelevant to application code
+or to class packages. Instead, such higher-level code usually just
+performs blocking <TT
+CLASS="FUNCTION"
+>read</TT
+> and
+<TT
+CLASS="FUNCTION"
+>write</TT
+>, or non-blocking USB-specific calls, to
+transfer data between host and target via a specific endpoint. Control
+messages are more complicated but are usually handled by existing
+code.</P
+><P
+>When a USB peripheral is plugged into the host there is an initial
+enumeration and configuration process. The peripheral provides
+information such as its class of device (audio, video, etc.), a
+vendor id, which endpoints should be used for what kind of data, and
+so on. The host OS uses this information to identify a suitable host
+device driver. This could be a generic driver for a class of
+peripherals, or it could be a vendor-specific driver. Assuming a
+suitable driver is installed the host will then activate the USB
+peripheral and perform additional application-specific initialisation.
+For example for a USB-ethernet device this would involve obtaining an
+ethernet MAC address. Most USB peripherals will be fairly simple, but
+it is possible to build multifunction peripherals with multiple
+configurations, interfaces, and alternate interface settings.</P
+><P
+>It is not possible for any of the eCos packages to generate all the
+enumeration data automatically. Some of the required information such
+as the vendor id cannot be supplied by generic packages; only by the
+application developer. Class support code such as the USB-ethernet
+package could in theory supply some of the information automatically,
+but there are also hardware dependencies such as which endpoints get
+used for incoming and outgoing ethernet frames. Instead it is the
+responsibility of the application developer to provide all the
+enumeration data and perform some additional initialisation. In
+addition, the common USB slave package can handle all the standard
+control messages for a simple USB peripheral, but for something like a
+multifunction peripheral additional application support is needed.</P
+><DIV
+CLASS="NOTE"
+><BLOCKQUOTE
+CLASS="NOTE"
+><P
+><B
+>Note: </B
+>The initial implementation of the eCos USB slave packages involved
+hardware that only supported control and bulk transfers, not
+isochronous or interrupt. There may be future changes to the USB
+code and API to allow for isochronous and interrupt transfers,
+especially the former. Other changes may be required to support
+different USB devices. At present there is no support for USB remote
+wakeups, since again it is not supported by the hardware.</P
+></BLOCKQUOTE
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN38"
+></A
+><H2
+>eCos USB I/O Facilities</H2
+><P
+>For protocols other than control messages, eCos provides two ways of
+performing USB I/O. The first involves device table or devtab entries such
+as <A
+HREF="usbs-devtab.html"
+><TT
+CLASS="LITERAL"
+>/dev/usb1r</TT
+></A
+>,
+with one entry per endpoint per USB device. It is possible to
+<TT
+CLASS="FUNCTION"
+>open</TT
+> these devices and use conventional blocking
+I/O functions such as <TT
+CLASS="FUNCTION"
+>read</TT
+> and
+<TT
+CLASS="FUNCTION"
+>write</TT
+> to exchange data between host and
+peripheral.</P
+><P
+>There is also a lower-level USB-specific API, consisting of functions
+such as <A
+HREF="usbs-start-rx.html"
+><TT
+CLASS="FUNCTION"
+>usbs_start_rx_buffer</TT
+></A
+>.
+A USB device driver will supply a data structure for each endpoint,
+for example a <A
+HREF="usbs-data.html"
+><SPAN
+CLASS="STRUCTNAME"
+>usbs_rx_endpoint</SPAN
+></A
+>
+structure for every receive endpoint. The first argument to
+<TT
+CLASS="FUNCTION"
+>usbs_start_rx_buffer</TT
+> should be a pointer to such
+a data structure. The USB-specific API is non-blocking: the initial
+call merely starts the transfer; some time later, once the transfer
+has completed or has been aborted, the device driver will invoke a
+completion function.</P
+><P
+>Control messages are different. With four different categories of
+control messages including application and vendor specific ones, the
+conventional
+<TT
+CLASS="FUNCTION"
+>open</TT
+>/<TT
+CLASS="FUNCTION"
+>read</TT
+>/<TT
+CLASS="FUNCTION"
+>write</TT
+>
+model of I/O cannot easily be applied. Instead, a USB device driver
+will supply a <A
+HREF="usbs-control.html"
+><SPAN
+CLASS="STRUCTNAME"
+>usbs_control_endpoint</SPAN
+></A
+>
+data structure which can be manipulated appropriately. In practice the
+standard control messages will usually be handled by the common USB
+slave package, and other control messages will be handled by
+class-specific code such as the USB-ethernet package. Typically,
+application code remains responsible for supplying the <A
+HREF="usbs-enum.html"
+>enumeration data</A
+> and for actually <A
+HREF="usbs-start.html"
+>starting</A
+> up the USB device.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN60"
+></A
+><H2
+>Enabling the USB code</H2
+><P
+>If the target hardware contains a USB slave device then the
+appropriate USB device driver and the common packages will typically
+be loaded into the configuration automatically when that target is
+selected (assuming a suitable device driver exists). However, the
+driver will not necessarily be active. For example a processor might
+have an on-chip USB device, but not all applications using that
+processor will want to use USB functionality. Hence by default the USB
+device is disabled, ensuring that applications do not suffer any
+memory or other penalties for functionality that is not required.</P
+><P
+>If the application developer explicitly adds a class support package
+such as the USB-ethernet one then this implies that the USB device is
+actually needed, and the device will be enabled automatically.
+However, if no suitable class package is available and the USB device
+will instead be accessed by application code, it is necessary to
+enable the USB device manually. Usually the easiest way to do this is
+to enable the configuration option
+<TT
+CLASS="LITERAL"
+>CYGGLO_IO_USB_SLAVE_APPLICATION</TT
+>, and the USB device
+driver and related packages will adjust accordingly. Alternatively,
+the device driver may provide some configuration options to provide
+more fine-grained control.</P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="io-usb-slave.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbs-enum.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>eCos USB Slave Support</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>USB Enumeration Data</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/slave/current/doc/usbs-start-rx.html b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-start-rx.html
new file mode 100644
index 0000000000..2c2fea0e99
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-start-rx.html
@@ -0,0 +1,444 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Receiving Data from the Host</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos USB Slave Support"
+HREF="io-usb-slave.html"><LINK
+REL="PREVIOUS"
+TITLE="Devtab Entries"
+HREF="usbs-devtab.html"><LINK
+REL="NEXT"
+TITLE="Sending Data to the Host"
+HREF="usbs-start-tx.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos USB Slave Support</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="usbs-devtab.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbs-start-tx.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBS-START-RX"
+>Receiving Data from the Host</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN277"
+></A
+><H2
+>Name</H2
+><TT
+CLASS="FUNCTION"
+>usbs_start_rx_buffer</TT
+>&nbsp;--&nbsp;Receiving Data from the Host</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN281"
+></A
+><H2
+>Synopsis</H2
+><DIV
+CLASS="FUNCSYNOPSIS"
+><A
+NAME="AEN282"
+></A
+><P
+></P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="FUNCSYNOPSISINFO"
+>#include &lt;cyg/io/usb/usbs.h&gt;</PRE
+></TD
+></TR
+></TABLE
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>void usbs_start_rx_buffer</CODE
+>(usbs_rx_endpoint* ep, unsigned char* buffer, int length, void (*)(void*,int) complete_fn, void * complete_data);</CODE
+></P
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>void usbs_start_rx</CODE
+>(usbs_rx_endpoint* ep);</CODE
+></P
+><P
+></P
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN302"
+></A
+><H2
+><TT
+CLASS="FUNCTION"
+>Description</TT
+></H2
+><P
+><TT
+CLASS="FUNCTION"
+>usbs_start_rx_buffer</TT
+> is a USB-specific function
+to accept a transfer from host to peripheral. It can be used for bulk,
+interrupt or isochronous transfers, but not for control messages.
+Instead those involve manipulating the <A
+HREF="usbs-control.html"
+><SPAN
+CLASS="STRUCTNAME"
+>usbs_control_endpoint</SPAN
+></A
+>
+data structure directly. The function takes five arguments:</P
+><P
+></P
+><OL
+TYPE="1"
+><LI
+><P
+>The first argument identifies the specific endpoint that should be
+used. Different USB devices will support different sets of endpoints
+and the device driver will provide appropriate data structures. The
+device driver's documentation should be consulted for details of which
+endpoints are available.</P
+></LI
+><LI
+><P
+>The <TT
+CLASS="PARAMETER"
+><I
+>buffer</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>length</I
+></TT
+>
+arguments control the actual transfer. USB device drivers are not
+expected to perform any buffering or to support partial transfers, so
+the length specified should correspond to the maximum transfer that is
+currently possible and the buffer should be at least this large. For
+isochronous transfers the USB specification imposes an upper bound of
+1023 bytes, and a smaller limit may be set in the <A
+HREF="usbs-enum.html#AEN142"
+>enumeration data</A
+>. Interrupt
+transfers are similarly straightforward with an upper bound of 64
+bytes, or less as per the enumeration data. Bulk transfers are more
+complicated because they can involve multiple 64-byte packets plus a
+terminating packet of less than 64 bytes, so there is no predefined
+limit on the transfer size. Instead it is left to higher-level
+protocols to specify an appropriate upper bound.</P
+><P
+>One technique that may work for bulk transfers is to exploit the fact
+that such transfers happen in 64-byte packets: it may be possible to
+receive an initial 64 bytes, corresponding to the first packet in the
+transfer; these 64 bytes can then be examined to determine the total
+transfer size, and the remaining data can be transferred in another
+receive operation. This technique is not guaranteed to work with all
+USB hardware. Also, if the delay between accepting the first packet and
+the remainder of the transfer is excessive then this could cause
+timeout problems for the host-side software. For these reasons this
+technique should be avoided.</P
+></LI
+><LI
+><P
+><TT
+CLASS="FUNCTION"
+>usbs_start_rx_buffer</TT
+> is non-blocking. It merely
+starts the receive operation, and does not wait for completion. At
+some later point the USB device driver will invoke the completion
+function parameter with two arguments: the completion data defined by
+the last parameter and a result field. A result &gt;=
+<TT
+CLASS="LITERAL"
+>0</TT
+> indicates a successful transfer of that many
+bytes, which may be less than the upper bound imposed by the
+<TT
+CLASS="PARAMETER"
+><I
+>length</I
+></TT
+> argument. A result &lt;
+<TT
+CLASS="LITERAL"
+>0</TT
+> indicates an error. The most likely errors are
+<TT
+CLASS="LITERAL"
+>-EPIPE</TT
+> to indicate that the connection between the
+host and the target has been broken, and <TT
+CLASS="LITERAL"
+>-EAGAIN</TT
+>
+for when the endpoint has been <A
+HREF="usbs-halt.html"
+>halted</A
+>. Specific USB device drivers may
+specify additional error conditions.</P
+></LI
+></OL
+><P
+>The normal sequence of events is that the USB device driver will
+update the appropriate hardware registers. At some point after that
+the host will attempt to send data by transmitting an OUT token
+followed by a data packet, and since a receive operation is now in
+progress the data will be accepted and ACK'd. If there were no receive
+operation then the peripheral would instead generate a NAK. The USB
+hardware will generate an interrupt once the whole packet has been
+received, and the USB device driver will service this interrupt and
+arrange for a DSR to be called. Isochronous and interrupt transfers
+involve just a single packet. However, bulk transfers may involve
+multiple packets so the device driver has to check whether the packet
+was a full 64 bytes or whether it was a terminating packet of less
+than this. When the device driver DSR detects a complete transfer it
+will inform higher-level code by invoking the supplied completion
+function.</P
+><P
+>This means that the completion function will normally be invoked by a
+DSR and not in thread context - although some USB device drivers may
+have a different implementation. Therefore the completion function is
+restricted in what it can do. In particular it must not make any
+calls that will or may block such as locking a mutex or allocating
+memory. The kernel documentation should be consulted for more details
+of DSR's and interrupt handling generally.</P
+><P
+>It is possible that the completion function will be invoked before
+<TT
+CLASS="FUNCTION"
+>usbs_start_rx_buffer</TT
+> returns. Such an event would
+be unusual because the transfer cannot happen until the next time the
+host tries to send data to this peripheral, but it may happen if for
+example another interrupt happens and a higher priority thread is
+scheduled to run. Also, if the endpoint is currently halted then the
+completion function will be invoked immediately with
+<TT
+CLASS="LITERAL"
+>-EAGAIN</TT
+>: typically this will happen in the current
+thread rather than in a separate DSR. The completion function is
+allowed to start another transfer immediately by calling
+<TT
+CLASS="FUNCTION"
+>usbs_start_rx_buffer</TT
+> again.</P
+><P
+>USB device drivers are not expected to perform any locking. It is the
+responsibility of higher-level code to ensure that there is only one
+receive operation for a given endpoint in progress at any one time. If
+there are concurrent calls to
+<TT
+CLASS="FUNCTION"
+>usbs_start_rx_buffer</TT
+> then the resulting behaviour
+is undefined. For typical USB applications this does not present any
+problems, because only one piece of code will access a given endpoint
+at any particular time.</P
+><P
+>The following code fragment illustrates a very simple use of
+<TT
+CLASS="FUNCTION"
+>usbs_start_rx_buffer</TT
+> to implement a blocking
+receive, using a semaphore to synchronise between the foreground
+thread and the DSR. For a simple example like this no completion data
+is needed.</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>static int error_code = 0;
+static cyg_sem_t completion_wait;
+
+static void
+completion_fn(void* data, int result)
+{
+ error_code = result;
+ cyg_semaphore_post(&amp;completion_wait);
+}
+
+int
+blocking_receive(usbs_rx_endpoint* ep, unsigned char* buf, int len)
+{
+ error_code = 0;
+ usbs_start_rx_buffer(ep, buf, len, &amp;completion_fn, NULL);
+ cyg_semaphore_wait(&amp;completion_wait);
+ return error_code;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>There is also a utility function <TT
+CLASS="FUNCTION"
+>usbs_start_rx</TT
+>. This
+can be used by code that wants to manipulate <A
+HREF="usbs-data.html"
+>data endpoints</A
+> directly, specifically the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>complete_fn</I
+></TT
+>,
+<TT
+CLASS="STRUCTFIELD"
+><I
+>complete_data</I
+></TT
+>,
+<TT
+CLASS="STRUCTFIELD"
+><I
+>buffer</I
+></TT
+> and
+<TT
+CLASS="STRUCTFIELD"
+><I
+>buffer_size</I
+></TT
+> fields.
+<TT
+CLASS="FUNCTION"
+>usbs_start_tx</TT
+> just invokes a function
+supplied by the device driver.</P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="usbs-devtab.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbs-start-tx.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Devtab Entries</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Sending Data to the Host</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/slave/current/doc/usbs-start-tx.html b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-start-tx.html
new file mode 100644
index 0000000000..40fc3481b6
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-start-tx.html
@@ -0,0 +1,436 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Sending Data to the Host</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos USB Slave Support"
+HREF="io-usb-slave.html"><LINK
+REL="PREVIOUS"
+TITLE="Receiving Data from the Host"
+HREF="usbs-start-rx.html"><LINK
+REL="NEXT"
+TITLE="Halted Endpoints"
+HREF="usbs-halt.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos USB Slave Support</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="usbs-start-rx.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbs-halt.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBS-START-TX"
+>Sending Data to the Host</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN349"
+></A
+><H2
+>Name</H2
+><TT
+CLASS="FUNCTION"
+>usbs_start_tx_buffer</TT
+>&nbsp;--&nbsp;Sending Data to the Host</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN353"
+></A
+><H2
+>Synopsis</H2
+><DIV
+CLASS="FUNCSYNOPSIS"
+><A
+NAME="AEN354"
+></A
+><P
+></P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="FUNCSYNOPSISINFO"
+>#include &lt;cyg/io/usb/usbs.h&gt;</PRE
+></TD
+></TR
+></TABLE
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>void usbs_start_tx_buffer</CODE
+>(usbs_tx_endpoint* ep, const unsigned char* buffer, int length, void (*)(void*,int) complete_fn, void * complete_data);</CODE
+></P
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>void usbs_start_tx</CODE
+>(usbs_tx_endpoint* ep);</CODE
+></P
+><P
+></P
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN374"
+></A
+><H2
+><TT
+CLASS="FUNCTION"
+>Description</TT
+></H2
+><P
+><TT
+CLASS="FUNCTION"
+>usbs_start_tx_buffer</TT
+> is a USB-specific function
+to transfer data from peripheral to host. It can be used for bulk,
+interrupt or isochronous transfers, but not for control messages;
+instead those involve manipulating the <A
+HREF="usbs-control.html"
+><SPAN
+CLASS="STRUCTNAME"
+>usbs_control_endpoint</SPAN
+></A
+>
+data structure directly. The function takes five arguments:</P
+><P
+></P
+><OL
+TYPE="1"
+><LI
+><P
+>The first argument identifies the specific endpoint that should be
+used. Different USB devices will support different sets of endpoints
+and the device driver will provide appropriate data structures. The
+device driver's documentation should be consulted for details of which
+endpoints are available.</P
+></LI
+><LI
+><P
+>The <TT
+CLASS="PARAMETER"
+><I
+>buffer</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>length</I
+></TT
+>
+arguments control the actual transfer. USB device drivers are not
+allowed to modify the buffer during the transfer, so the data can
+reside in read-only memory. The transfer will be for all the data
+specified, and it is the responsibility of higher-level code to make
+sure that the host is expecting this amount of data. For isochronous
+transfers the USB specification imposes an upper bound of 1023 bytes,
+but a smaller limit may be set in the <A
+HREF="usbs-enum.html#AEN142"
+>enumeration data</A
+>. Interrupt
+transfers have an upper bound of 64 bytes or less, as per the
+enumeration data. Bulk transfers are more complicated because they can
+involve multiple 64-byte packets plus a terminating packet of less
+than 64 bytes, so the basic USB specification does not impose an upper
+limit on the total transfer size. Instead it is left to higher-level
+protocols to specify an appropriate upper bound. If the peripheral
+attempts to send more data than the host is willing to accept then the
+resulting behaviour is undefined and may well depend on the specific
+host operating system being used.</P
+><P
+>For bulk transfers, the USB device driver or the underlying hardware
+will automatically split the transfer up into the appropriate number
+of full-size 64-byte packets plus a single terminating packet, which
+may be 0 bytes.</P
+></LI
+><LI
+><P
+><TT
+CLASS="FUNCTION"
+>usbs_start_tx_buffer</TT
+> is non-blocking. It merely
+starts the transmit operation, and does not wait for completion. At
+some later point the USB device driver will invoke the completion
+function parameter with two arguments: the completion data defined by
+the last parameter, and a result field. This result will be either an
+error code &lt; <TT
+CLASS="LITERAL"
+>0</TT
+>, or the amount of data
+transferred which should correspond to the
+<TT
+CLASS="PARAMETER"
+><I
+>length</I
+></TT
+> argument. The most likely errors are
+<TT
+CLASS="LITERAL"
+>-EPIPE</TT
+> to indicate that the connection between the
+host and the target has been broken, and <TT
+CLASS="LITERAL"
+>-EAGAIN</TT
+>
+for when the endpoint has been <A
+HREF="usbs-halt.html"
+>halted</A
+>. Specific USB device drivers may
+define additional error conditions.</P
+></LI
+></OL
+><P
+>The normal sequence of events is that the USB device driver will
+update the appropriate hardware registers. At some point after that
+the host will attempt to fetch data by transmitting an IN token. Since
+a transmit operation is now in progress the peripheral can send a
+packet of data, and the host will generate an ACK. At this point the
+USB hardware will generate an interrupt, and the device driver will
+service this interrupt and arrange for a DSR to be called. Isochronous
+and interrupt transfers involve just a single packet. However, bulk
+transfers may involve multiple packets so the device driver has to
+check whether there is more data to send and set things up for the
+next packet. When the device driver DSR detects a complete transfer it
+will inform higher-level code by invoking the supplied completion
+function.</P
+><P
+>This means that the completion function will normally be invoked by a
+DSR and not in thread context - although some USB device drivers may
+have a different implementation. Therefore the completion function is
+restricted in what it can do, in particular it must not make any
+calls that will or may block such as locking a mutex or allocating
+memory. The kernel documentation should be consulted for more details
+of DSR's and interrupt handling generally.</P
+><P
+>It is possible that the completion function will be invoked before
+<TT
+CLASS="FUNCTION"
+>usbs_start_tx_buffer</TT
+> returns. Such an event would
+be unusual because the transfer cannot happen until the next time the
+host tries to fetch data from this peripheral, but it may happen if,
+for example, another interrupt happens and a higher priority thread is
+scheduled to run. Also, if the endpoint is currently halted then the
+completion function will be invoked immediately with
+<TT
+CLASS="LITERAL"
+>-EAGAIN</TT
+>: typically this will happen in the current
+thread rather than in a separate DSR. The completion function is
+allowed to start another transfer immediately by calling
+<TT
+CLASS="FUNCTION"
+>usbs_start_tx_buffer</TT
+> again.</P
+><P
+>USB device drivers are not expected to perform any locking. It is the
+responsibility of higher-level code to ensure that there is only one
+transmit operation for a given endpoint in progress at any one time.
+If there are concurrent calls to
+<TT
+CLASS="FUNCTION"
+>usbs_start_tx_buffer</TT
+> then the resulting behaviour
+is undefined. For typical USB applications this does not present any
+problems because only piece of code will access a given endpoint at
+any particular time.</P
+><P
+>The following code fragment illustrates a very simple use of
+<TT
+CLASS="FUNCTION"
+>usbs_start_tx_buffer</TT
+> to implement a blocking
+transmit, using a semaphore to synchronise between the foreground
+thread and the DSR. For a simple example like this no completion data
+is needed.</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>static int error_code = 0;
+static cyg_sem_t completion_wait;
+
+static void
+completion_fn(void* data, int result)
+{
+ error_code = result;
+ cyg_semaphore_post(&amp;completion_wait);
+}
+
+int
+blocking_transmit(usbs_tx_endpoint* ep, const unsigned char* buf, int len)
+{
+ error_code = 0;
+ usbs_start_tx_buffer(ep, buf, len, &amp;completion_fn, NULL);
+ cyg_semaphore_wait(&amp;completion_wait);
+ return error_code;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>There is also a utility function <TT
+CLASS="FUNCTION"
+>usbs_start</TT
+>. This
+can be used by code that wants to manipulate <A
+HREF="usbs-data.html"
+>data endpoints</A
+> directly, specifically the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>complete_fn</I
+></TT
+>,
+<TT
+CLASS="STRUCTFIELD"
+><I
+>complete_data</I
+></TT
+>,
+<TT
+CLASS="STRUCTFIELD"
+><I
+>buffer</I
+></TT
+> and
+<TT
+CLASS="STRUCTFIELD"
+><I
+>buffer_size</I
+></TT
+> fields.
+<TT
+CLASS="FUNCTION"
+>usbs_start_tx</TT
+> just calls a function supplied by
+the device driver.</P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="usbs-start-rx.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbs-halt.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Receiving Data from the Host</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Halted Endpoints</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/slave/current/doc/usbs-start.html b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-start.html
new file mode 100644
index 0000000000..da5b0b6fa8
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-start.html
@@ -0,0 +1,264 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Starting up a USB Device</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos USB Slave Support"
+HREF="io-usb-slave.html"><LINK
+REL="PREVIOUS"
+TITLE="USB Enumeration Data"
+HREF="usbs-enum.html"><LINK
+REL="NEXT"
+TITLE="Devtab Entries"
+HREF="usbs-devtab.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos USB Slave Support</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="usbs-enum.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbs-devtab.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBS-START"
+>Starting up a USB Device</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN173"
+></A
+><H2
+>Name</H2
+><TT
+CLASS="FUNCTION"
+>usbs_start</TT
+>&nbsp;--&nbsp;Starting up a USB Device</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN177"
+></A
+><H2
+>Synopsis</H2
+><DIV
+CLASS="FUNCSYNOPSIS"
+><A
+NAME="AEN178"
+></A
+><P
+></P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="FUNCSYNOPSISINFO"
+>#include &lt;cyg/io/usb/usbs.h&gt;</PRE
+></TD
+></TR
+></TABLE
+><P
+><CODE
+><CODE
+CLASS="FUNCDEF"
+>void usbs_start</CODE
+>(usbs_control_endpoint* ep0);</CODE
+></P
+><P
+></P
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN185"
+></A
+><H2
+>Description</H2
+><P
+>Initializing a USB device requires some support from higher-level
+code, typically the application, in the form of enumeration data.
+Hence it is not possible for the low-level USB driver to activate a
+USB device itself. Instead the higher-level code has to take care of
+this by invoking <TT
+CLASS="FUNCTION"
+>usbs_start</TT
+>. This function takes
+a pointer to a USB control endpoint data structure. USB device drivers
+should provide exactly one such data structure for every USB device,
+so the pointer uniquely identifies the device.</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>const usbs_enumeration_data usb_enum_data = {
+ &#8230;
+};
+
+int
+main(int argc, char** argv)
+{
+ usbs_sa11x0_ep0.enumeration_data = &amp;usb_enum_data;
+ &#8230;
+ usbs_start(&amp;usbs_sa11x0_ep0);
+ &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>The exact behaviour of <TT
+CLASS="FUNCTION"
+>usbs_start</TT
+> depends on the
+USB hardware and the device driver. A typical implementation would
+change the USB data pins from tristated to active. If the peripheral
+is already plugged into a host then the latter should detect this
+change and start interacting with the peripheral, including requesting
+the enumeration data. Some of this may happen before
+<TT
+CLASS="FUNCTION"
+>usbs_start</TT
+> returns, but given that multiple
+interactions between USB host and peripheral are required it is likely
+that the function will return before the peripheral is fully
+configured. Control endpoints provide a <A
+HREF="usbs-control.html#AEN515"
+>mechanism</A
+> for informing
+higher-level code of USB state changes.
+<TT
+CLASS="FUNCTION"
+>usbs_start</TT
+> will return even if the peripheral is
+not currently connected to a host: it will not block until the
+connection is established.</P
+><P
+><TT
+CLASS="FUNCTION"
+>usbs_start</TT
+> should only be called once for a given
+USB device. There are no defined error conditions. Note that the
+function affects the entire USB device and not just the control
+endpoint: there is no need to start any data endpoints as well.</P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="usbs-enum.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbs-devtab.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>USB Enumeration Data</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Devtab Entries</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/slave/current/doc/usbs-testing.html b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-testing.html
new file mode 100644
index 0000000000..8c46b855b3
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-testing.html
@@ -0,0 +1,2267 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Testing</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos USB Slave Support"
+HREF="io-usb-slave.html"><LINK
+REL="PREVIOUS"
+TITLE="Writing a USB Device Driver"
+HREF="usbs-writing.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos USB Slave Support</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="usbs-writing.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+>&nbsp;</TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBS-TESTING"
+>Testing</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN831"
+></A
+><H2
+>Name</H2
+>Testing&nbsp;--&nbsp;Testing of USB Device Drivers</DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN834"
+></A
+><H2
+>Introduction</H2
+><P
+>The support for USB testing provided by the eCos USB common slave
+package is somewhat different in nature from the kind of testing used
+in many other packages. One obvious problem is that USB tests cannot
+be run on just a bare target platform: instead the target platform
+must be connected to a suitable USB host machine, and that host
+machine must be running appropriate software for the test code to
+interact with. This is very different from say a kernel test which
+typically will have no external dependencies. Another important
+difference between USB testing and say a C library
+<TT
+CLASS="FUNCTION"
+>strcmp</TT
+> test is sensitivity to timing and to
+hardware boundary conditions: although a simple test case that just
+performs a small number of USB transfers is better than no testing at
+all, it should also be possible to run tests for hours or days on end,
+under a variety of loads. In order to provide the required
+functionality the basic architecture of the USB testing support is as
+follows: </P
+><P
+></P
+><OL
+TYPE="1"
+><LI
+><P
+> There is a single target-side program
+ <SPAN
+CLASS="APPLICATION"
+>usbtarget</SPAN
+>. By default when this is run
+ on a target platform it will appear to do nothing. In fact it is
+ waiting to be contacted by another program
+ <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+> which will tell it what test or
+ tests to run. <SPAN
+CLASS="APPLICATION"
+>usbtarget</SPAN
+> provides
+ mechanisms for running a wide range of tests.
+ </P
+></LI
+><LI
+><P
+> <SPAN
+CLASS="APPLICATION"
+>usbtarget</SPAN
+> is a generic program, but USB
+ testing depends to some extent on the functionality provided by the
+ hardware. For example there is no point in testing bulk transmits
+ to endpoint 12 if the target hardware does not support an endpoint
+ 12. Therefore each USB device driver should supply information about
+ what the hardware is actually capable of, in the form of an array of
+ <SPAN
+CLASS="STRUCTNAME"
+>usbs_testing_endpoint</SPAN
+> data structures.
+ </P
+></LI
+><LI
+><P
+> There is a single host-side program
+ <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+>, which acts as a counterpart to
+ <SPAN
+CLASS="APPLICATION"
+>usbtarget</SPAN
+>. Again
+ <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+> has no built-in knowledge of
+ the test or tests that are supposed to run, it only provides
+ mechanisms for running a wide range of tests. On start-up
+ <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+> will search the USB bus for
+ hardware running the target-side program, specifically a USB device
+ that identifies itself as the product <TT
+CLASS="LITERAL"
+>&quot;Red Hat eCos
+ USB test&quot;</TT
+>.
+ </P
+></LI
+><LI
+><P
+> <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+> contains a Tcl interpreter, and
+ will execute any Tcl scripts specified on the command line
+ together with appropriate arguments. The Tcl interpreter has been
+ extended with various commands such as
+ <TT
+CLASS="LITERAL"
+>usbtest::bulktest</TT
+>, so the script can perform
+ the desired test or tests.
+ </P
+></LI
+><LI
+><P
+> Adding a new test simply involves writing a short Tcl script that
+ invokes the appropriate USB-specific commands. Running multiple
+ tests involves passing appropriate arguments to
+ <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+>, or alternatively writing a
+ single script that just invokes other scripts.
+ </P
+></LI
+></OL
+><P
+>The current implementation of <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+>
+depends heavily on functionality provided by the Linux kernel and in
+particular the usbdevfs support. It uses
+<TT
+CLASS="FILENAME"
+>/proc/bus/usb/devices</TT
+> to find out what devices
+are attached to the bus, and will then access the device by opening
+<TT
+CLASS="FILENAME"
+>/proc/bus/usb/xxx/yyy</TT
+> and performing
+<TT
+CLASS="FUNCTION"
+>ioctl</TT
+> operations. This allows USB testing to take
+place without having to write a new host-side device driver, but
+getting the code working on host machines not running Linux would
+obviously be problematical.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN867"
+></A
+><H2
+>Building and Running the Target-side Code</H2
+><P
+>The target-side component of the USB testing software consists of a
+single program <SPAN
+CLASS="APPLICATION"
+>usbtarget</SPAN
+> which contains
+support for a range of different tests, under the control of host-side
+software. This program is not built by default alongside other eCos
+test cases since it will only operate in certain environments,
+specifically when the target board's connector is plugged into a Linux
+host, and when the appropriate host-side software has been installed
+on that host. Instead the user must enable a configuration option
+<TT
+CLASS="LITERAL"
+>CYGBLD_IO_USB_SLAVE_USBTEST</TT
+> to add the program to
+the list of tests for the current configuration.</P
+><P
+>Starting the <SPAN
+CLASS="APPLICATION"
+>usbtarget</SPAN
+> program does not
+require anything unusual, so it can be run in a normal
+<SPAN
+CLASS="APPLICATION"
+>gdb</SPAN
+> session just like any eCos application.
+After initialization the program will wait for activity from the host.
+Depending on the hardware, the Linux host will detect that a new USB
+peripheral is present on the bus either when the
+<SPAN
+CLASS="APPLICATION"
+>usbtarget</SPAN
+> initialization is complete or
+when the cable between target and host is connected. The host will
+perform the normal USB enumeration sequence and discover that the
+peripheral does not match any known vendor or product id and that
+there is no device driver for <TT
+CLASS="LITERAL"
+>&quot;Red Hat eCos USB
+test&quot;</TT
+>, so it will ignore the peripheral. When the
+<SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+> program is run on the host it will
+connect to the target-side software, and testing can now commence.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN878"
+></A
+><H2
+>Building and Running the Host-side Code</H2
+><DIV
+CLASS="NOTE"
+><BLOCKQUOTE
+CLASS="NOTE"
+><P
+><B
+>Note: </B
+>In theory the host-side software should be built when the package is
+installed in the component repository, and removed when a package
+is uninstalled. The current eCos administration tool does not provide
+this functionality.</P
+></BLOCKQUOTE
+></DIV
+><P
+>The host-side software should be built via the usual sequence of
+&quot;configure/make/make install&quot;. It can only be built on a
+Linux host and the <B
+CLASS="COMMAND"
+>configure</B
+> script contains an
+explicit test for this. Because the eCos component repository should
+generally be treated as a read-only resource the configure script will
+also prevent you from trying to build inside the source tree. Instead
+a separate build tree is required. Hence a typical sequence for
+building the host-side software would be as follows:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+>$ mkdir usbhost_build
+$ cd usbhost_build
+$ &lt;repo&gt;packages/io/usb/slave/current/host/configure <A
+NAME="PATH"
+><IMG
+SRC="../images/callouts/1.gif"
+HSPACE="0"
+VSPACE="0"
+BORDER="0"
+ALT="(1)"></A
+> <A
+NAME="VERSION"
+><IMG
+SRC="../images/callouts/2.gif"
+HSPACE="0"
+VSPACE="0"
+BORDER="0"
+ALT="(2)"></A
+> &lt;args&gt; <A
+NAME="ARGS"
+><IMG
+SRC="../images/callouts/3.gif"
+HSPACE="0"
+VSPACE="0"
+BORDER="0"
+ALT="(3)"></A
+>
+$ make
+&lt;output from make&gt;
+$ su <A
+NAME="ROOT"
+><IMG
+SRC="../images/callouts/4.gif"
+HSPACE="0"
+VSPACE="0"
+BORDER="0"
+ALT="(4)"></A
+>
+$ make install
+&lt;output from make install&gt;
+$</PRE
+></TD
+></TR
+></TABLE
+><DIV
+CLASS="CALLOUTLIST"
+><DL
+COMPACT="COMPACT"
+><DT
+><A
+HREF="usbs-testing.html#PATH"
+><IMG
+SRC="../images/callouts/1.gif"
+HSPACE="0"
+VSPACE="0"
+BORDER="0"
+ALT="(1)"></A
+></DT
+><DD
+>The location of the eCos component repository should be substituted
+for <TT
+CLASS="LITERAL"
+>&lt;repo&gt;</TT
+>.</DD
+><DT
+><A
+HREF="usbs-testing.html#VERSION"
+><IMG
+SRC="../images/callouts/2.gif"
+HSPACE="0"
+VSPACE="0"
+BORDER="0"
+ALT="(2)"></A
+></DT
+><DD
+>If the package has been obtained via CVS or anonymous CVS then the
+package version will be <TT
+CLASS="FILENAME"
+>current</TT
+>, as per the
+example. If instead the package has been obtained as part of a full
+eCos release or as a separate <TT
+CLASS="FILENAME"
+>.epk</TT
+> file then the
+appropriate package version should be used instead of
+<TT
+CLASS="FILENAME"
+>current</TT
+>.</DD
+><DT
+><A
+HREF="usbs-testing.html#ARGS"
+><IMG
+SRC="../images/callouts/3.gif"
+HSPACE="0"
+VSPACE="0"
+BORDER="0"
+ALT="(3)"></A
+></DT
+><DD
+>The <B
+CLASS="COMMAND"
+>configure</B
+> script takes the usual arguments such
+as <TT
+CLASS="PARAMETER"
+><I
+>--prefix=</I
+></TT
+> to specify where the executables
+and support files should be installed. The only other parameter that
+some users may wish to specify is the location of a suitable Tcl
+installation. By default <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+> will use
+the existing Tcl installation in <TT
+CLASS="FILENAME"
+>/usr</TT
+>,
+as provided by your Linux distribution. An alternative Tcl
+installation can be specified using the parameter
+<TT
+CLASS="PARAMETER"
+><I
+>--with-tcl=</I
+></TT
+>, or alternatively using some
+combination of <TT
+CLASS="PARAMETER"
+><I
+>--with-tcl-include</I
+></TT
+>,
+<TT
+CLASS="PARAMETER"
+><I
+>--with-tcl-lib</I
+></TT
+> and
+<TT
+CLASS="PARAMETER"
+><I
+>--with-tcl-version</I
+></TT
+>. </DD
+><DT
+><A
+HREF="usbs-testing.html#ROOT"
+><IMG
+SRC="../images/callouts/4.gif"
+HSPACE="0"
+VSPACE="0"
+BORDER="0"
+ALT="(4)"></A
+></DT
+><DD
+>One of the host-side executables that gets built,
+<SPAN
+CLASS="APPLICATION"
+>usbchmod</SPAN
+>, needs to be installed with suid
+root privileges. Although the Linux kernel makes it possible for
+applications to perform low-level USB operations such as transmitting
+bulk packets, by default access to this functionality is restricted to
+programs with superuser privileges. It is undesirable to run a complex
+program such as <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+> with such
+privileges, especially since the program contains a general-purpose
+Tcl interpreter. Therefore when <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+>
+starts up and discovers that it does not have sufficient access to the
+appropriate entries in <TT
+CLASS="FILENAME"
+>/proc/bus/usb</TT
+>,
+it spawns an instance of <SPAN
+CLASS="APPLICATION"
+>usbchmod</SPAN
+> to modify
+the permissions on these entries. <SPAN
+CLASS="APPLICATION"
+>usbchmod</SPAN
+>
+will only do this for a USB device <TT
+CLASS="LITERAL"
+>&quot;Red Hat eCos USB
+test&quot;</TT
+>, so installing this program suid root should not
+introduce any security problems.</DD
+></DL
+></DIV
+><P
+>During <B
+CLASS="COMMAND"
+>make install</B
+> the following actions will take
+place: </P
+><P
+></P
+><OL
+TYPE="1"
+><LI
+><P
+><SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+> will be installed in <TT
+CLASS="FILENAME"
+>/usr/local/bin</TT
+>,
+or some other <TT
+CLASS="FILENAME"
+>bin</TT
+> directory if
+the default location is changed at configure-time using a
+<TT
+CLASS="PARAMETER"
+><I
+>--prefix=</I
+></TT
+> or similar option. It will be
+installed as the executable
+<SPAN
+CLASS="APPLICATION"
+>usbhost_&lt;version&gt;</SPAN
+>, for example
+<SPAN
+CLASS="APPLICATION"
+>usbhost_current</SPAN
+>, thus allowing several
+releases of the USB slave package to co-exist. For convenience a
+symbolic link from <TT
+CLASS="FILENAME"
+>usbhost</TT
+> to this executable
+will be created, so users can just run <B
+CLASS="COMMAND"
+>usbhost</B
+> to
+access the most recently-installed version.</P
+></LI
+><LI
+><P
+><SPAN
+CLASS="APPLICATION"
+>usbchmod</SPAN
+> will be installed in
+<TT
+CLASS="FILENAME"
+>/usr/local/libexec/ecos/io_usb_slave_&lt;version&gt;</TT
+>.
+This program should only be run by <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+>,
+not invoked directly, so it is not placed in the <TT
+CLASS="FILENAME"
+>bin</TT
+>
+directory. Again the presence of the package version in the directory
+name allows multiple releases of the package to co-exist.</P
+></LI
+><LI
+><P
+>A Tcl script <TT
+CLASS="FILENAME"
+>usbhost.tcl</TT
+> will get installed in
+the same directory as <SPAN
+CLASS="APPLICATION"
+>usbchmod</SPAN
+>. This Tcl
+script is loaded automatically by the
+<SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+> executable. </P
+></LI
+><LI
+><P
+>A number of additional Tcl scripts, for example
+<TT
+CLASS="FILENAME"
+>list.tcl</TT
+> will get installed alongside
+<TT
+CLASS="FILENAME"
+>usbhost.tcl</TT
+>. These correspond to various test
+cases provided as standard. If a given test case is specified on the
+command line and cannot be found relative to the current directory
+then <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+> will search the install
+directory for these test cases.</P
+><DIV
+CLASS="NOTE"
+><BLOCKQUOTE
+CLASS="NOTE"
+><P
+><B
+>Note: </B
+>Strictly speaking installing the <TT
+CLASS="FILENAME"
+>usbhost.tcl</TT
+> and
+other Tcl scripts below the <TT
+CLASS="FILENAME"
+>libexec</TT
+>
+directory deviates from standard practice: they are
+architecture-independent data files so should be installed below
+the <TT
+CLASS="FILENAME"
+>share</TT
+> subdirectory. In
+practice the files are sufficiently small that there is no point in
+sharing them, and keeping them below <TT
+CLASS="FILENAME"
+>libexec</TT
+>
+simplifies the host-side software somewhat.</P
+></BLOCKQUOTE
+></DIV
+></LI
+></OL
+><P
+>The <B
+CLASS="COMMAND"
+>usbhost</B
+> should be run only when there is a
+suitable target attached to the USB bus and running the
+<SPAN
+CLASS="APPLICATION"
+>usbtarget</SPAN
+> program. It will search
+<TT
+CLASS="FILENAME"
+>/proc/bus/usb/devices</TT
+> for an entry corresponding
+to this program, invoke <SPAN
+CLASS="APPLICATION"
+>usbchmod</SPAN
+> if
+necessary to change the access rights, and then interact with
+<SPAN
+CLASS="APPLICATION"
+>usbtarget</SPAN
+> over the USB bus.
+<B
+CLASS="COMMAND"
+>usbhost</B
+> should be invoked as follows:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+>$ usbhost [-v|--version] [-h|--help] [-V|--verbose] &lt;test&gt; [&lt;test parameters&gt;]</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><OL
+TYPE="1"
+><LI
+><P
+>The <TT
+CLASS="PARAMETER"
+><I
+>-v</I
+></TT
+> or <TT
+CLASS="PARAMETER"
+><I
+>--version</I
+></TT
+>
+option will display version information for
+<SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+> including the version of the USB
+slave package that was used to build the executable.</P
+></LI
+><LI
+><P
+>The <TT
+CLASS="PARAMETER"
+><I
+>-h</I
+></TT
+> or <TT
+CLASS="PARAMETER"
+><I
+>--help</I
+></TT
+> option
+will display usage information.</P
+></LI
+><LI
+><P
+>The <TT
+CLASS="PARAMETER"
+><I
+>-V</I
+></TT
+> or <TT
+CLASS="PARAMETER"
+><I
+>--verbose</I
+></TT
+>
+option can be used to obtain more information at run-time, for example
+some output for every USB transfer. This option can be repeated
+multiple times to increase the amount of output.</P
+></LI
+><LI
+><P
+>The first argument that does not begin with a hyphen specifies a test
+that should be run, in the form of a Tcl script. For example an
+argument of <TT
+CLASS="PARAMETER"
+><I
+>list.tcl</I
+></TT
+> will cause
+<SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+> to look for a script with that
+name, adding a <TT
+CLASS="FILENAME"
+>.tcl</TT
+> suffix if necessarary, and
+run that script. <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+> will look in the
+current directory first, then in the install tree for standard test
+scripts provided by the USB slave package.</P
+></LI
+><LI
+><P
+>Some test scripts may want their own parameters, for example a
+duration in seconds. These can be passed on the command line after
+the name of the test, for example
+<B
+CLASS="COMMAND"
+>usbhost&nbsp;mytest&nbsp;60</B
+>. </P
+></LI
+></OL
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN983"
+></A
+><H2
+>Writing a Test</H2
+><P
+>Each test is defined by a Tcl script, running inside an interpreter
+provided by <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+>. In addition to the
+normal Tcl functionality this interpreter provides a number of
+variables and functions related to USB testing. For example there is a
+variable <TT
+CLASS="VARNAME"
+>bulk_in_endpoints</TT
+> that lists all the
+endpoints on the target that can perform bulk IN operations, and a
+related array <TT
+CLASS="VARNAME"
+>bulk_in</TT
+> which contains information
+such as the minimum and maximum packets sizes. There is a function
+<TT
+CLASS="FUNCTION"
+>bulktest</TT
+> which can be used to perform bulk tests
+on a particular endpoint. A simple test script aimed at specific
+hardware could ignore the information variables since it would know
+exactly what USB hardware is available on the target, whereas a
+general-purpose script would use the information to adapt to the
+hardware capabilities.</P
+><P
+>To avoid namespace pollution all USB-related Tcl variables and
+functions live in the <TT
+CLASS="VARNAME"
+>usbtest::</TT
+> namespace.
+Therefore accessing requires either explicitly including the
+namespace any references, for example
+<TT
+CLASS="LITERAL"
+>$usbtest::bulk_in_endpoints</TT
+>, or by using Tcl's
+<TT
+CLASS="FUNCTION"
+>namespace import</TT
+> facility.</P
+><P
+>A very simple test script might look like this:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>usbtest::bulktest 1 out 4000
+usbtest::bulktest 2 in 4000
+if { [usbtest::start 60] } {
+ puts "Test successful"
+} else
+ puts "Test failed"
+ foreach result $usbtest::results {
+ puts $result
+ }
+}</PRE
+></TD
+></TR
+></TABLE
+><P
+>This would perform a test run involving 4000 bulk transfers from the
+host to the target's endpoint 1, and concurrently 4000 bulk transfers
+from endpoint 2. Default settings for packet sizes, contents, and
+delays would be used. The actual test would not start running until
+<TT
+CLASS="FILENAME"
+>usbtest</TT
+> is invoked, and it is expected that the
+test would complete within 60 seconds. If any failures occur then they
+are reported.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN998"
+></A
+><H2
+>Available Hardware</H2
+><P
+>Each target-side USB device driver provides information about the
+actual capabilities of the hardware, for example which endpoints are
+available. Strictly speaking it provides information about what is
+actually supported by the device driver, which may be a subset of what
+the hardware is capable of. For example, the hardware may support
+isochronous transfers on a particular endpoint but if there is no
+software support for this in the driver then this endpoint will not be
+listed. When <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+> first contacts the
+<SPAN
+CLASS="APPLICATION"
+>usbtarget</SPAN
+> program running on the target
+platform, it obtains this information and makes it available to test
+scripts via Tcl variables:</P
+><P
+></P
+><DIV
+CLASS="VARIABLELIST"
+><DL
+><DT
+><TT
+CLASS="VARNAME"
+>bulk_in_endpoints</TT
+></DT
+><DD
+><P
+> This is a simple list of the endpoints which can support bulk IN
+ transfers. For example if the target-side hardware supports
+ these transfers on endpoints 3 and 5 then the value would be
+ <TT
+CLASS="LITERAL"
+>&quot;3 5&quot;</TT
+> Typical test scripts would
+ iterate over the list using something like:
+ </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="90%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> if { 0 != [llength $usbtest::bulk_in_endpoints] } {
+ puts"Bulk IN endpoints: $usbtest::bulk_in_endpoints"
+ foreach endpoint $usbtest:bulk_in_endpoints {
+ &#8230;
+ }
+ }
+ </PRE
+></TD
+></TR
+></TABLE
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>bulk_in()</TT
+></DT
+><DD
+><P
+> This array holds additional information about each bulk IN endpoint.
+ The array is indexed by two fields, the endpoint number and one of
+ <TT
+CLASS="LITERAL"
+>min_size</TT
+>, <TT
+CLASS="LITERAL"
+>max_size</TT
+>,
+ <TT
+CLASS="LITERAL"
+>max_in_padding</TT
+> and <TT
+CLASS="LITERAL"
+>devtab</TT
+>:
+ </P
+><P
+></P
+><DIV
+CLASS="VARIABLELIST"
+><DL
+><DT
+><TT
+CLASS="LITERAL"
+>min_size</TT
+></DT
+><DD
+><P
+> This field specifies a lower bound on the size of bulk transfers,
+ and will typically will have a value of 1.
+ </P
+><DIV
+CLASS="NOTE"
+><BLOCKQUOTE
+CLASS="NOTE"
+><P
+><B
+>Note: </B
+> The typical minimum transfer size of a single byte is not strictly
+ speaking correct, since under some circumstances it can make sense
+ to have a transfer size of zero bytes. However current target-side
+ device drivers interpret a request to transfer zero bytes as a way
+ for higher-level code to determine whether or not an endpoint is
+ stalled, so it is not actually possible to perform zero-byte
+ transfers. This issue will be addressed at some future point.
+ </P
+></BLOCKQUOTE
+></DIV
+></DD
+><DT
+><TT
+CLASS="LITERAL"
+>max_size</TT
+></DT
+><DD
+><P
+> This field specifies an upper bound on the size of bulk transfers.
+ Some target-side drivers may be limited to transfers of say
+ 0x0FFFF bytes because of hardware limitations. In practice the
+ transfer size is likely to be limited primarily to limit memory
+ consumption of the test code on the target hardware, and to ensure
+ that tests complete reasonably quickly. At the time of writing
+ transfers are limited to 4K.
+ </P
+></DD
+><DT
+><TT
+CLASS="LITERAL"
+>max_in_padding</TT
+></DT
+><DD
+><P
+> On some hardware it may be necessary for the target-side device
+ driver to send more data than is actually intended. For example
+ the SA11x0 USB hardware cannot perform bulk transfers that are
+ an exact multiple of 64 bytes, instead it must pad such
+ transfers with an extra byte and the host must be ready to
+ accept and discard this byte. The
+ <TT
+CLASS="LITERAL"
+>max_in_padding</TT
+> field indicates the amount of
+ padding that is required. The low-level code inside
+ <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+> will use this field
+ automatically, and there is no need for test scripts to adjust
+ packet sizes for padding. The field is provided for
+ informational purposes only.
+ </P
+></DD
+><DT
+><TT
+CLASS="LITERAL"
+>devtab</TT
+></DT
+><DD
+><P
+> This is a string indicating whether or not the
+ target-side USB device driver supports access to this endpoint
+ via entries in the device table, in other words through
+ conventional calls like <TT
+CLASS="FUNCTION"
+>open</TT
+> and
+ <TT
+CLASS="FUNCTION"
+>write</TT
+>. Some device drivers may only
+ support low-level USB access because typically that is what gets
+ used by USB class-specific packages such as USB-ethernet.
+ An empty string indicates that no devtab entry is available,
+ otherwise it will be something like
+ <TT
+CLASS="LITERAL"
+>&quot;/dev/usbs2w&quot;</TT
+>.
+ </P
+></DD
+></DL
+></DIV
+><P
+> Typical test scripts would access this data using something like:
+ </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="90%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> foreach endpoint $usbtest:bulk_in_endpoints {
+ puts "Endpoint $endpoint: "
+ puts " minimum transfer size $usbtest::bulk_in($endpoint,min_size)"
+ puts " maximum transfer size $usbtest::bulk_in($endpoint,max_size)"
+ if { 0 == $usbtest::bulk_in($endpoint,max_in_padding) } {
+ puts " no IN padding required"
+ } else {
+ puts " $usbtest::bulk_in($endpoint,max_in_padding) bytes of IN padding required"
+ }
+ if { "" == $usbtest::bulk_in($endpoint,devtab) } {
+ puts " no devtab entry provided"
+ } else {
+ puts " corresponding devtab entry is $usbtest::bulk_in($endpoint,devtab)"
+ }
+ }
+ </PRE
+></TD
+></TR
+></TABLE
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>bulk_out_endpoint</TT
+></DT
+><DD
+><P
+> This is a simple list of the endpoints which can support bulk OUT
+ transfers. It is analogous to
+ <TT
+CLASS="VARNAME"
+>bulk_in_endpoints</TT
+>.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>bulk_out()</TT
+></DT
+><DD
+><P
+> This array holds additional information about each bulk OUT
+ endpoint. It can be accessed in the same way as
+ <TT
+CLASS="VARNAME"
+>bulk_in()</TT
+>, except that there is no
+ <TT
+CLASS="LITERAL"
+>max_in_padding</TT
+> field because that field only
+ makes sense for IN transfers.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>control()</TT
+></DT
+><DD
+><P
+> This array holds information about the control endpoint. It contains
+ two fields, <TT
+CLASS="LITERAL"
+>min_size</TT
+> and
+ <TT
+CLASS="LITERAL"
+>max_size</TT
+>. Note that there is no variable
+ <TT
+CLASS="VARNAME"
+>control_endpoints</TT
+> because a USB target always
+ supports a single control endpoint <TT
+CLASS="LITERAL"
+>0</TT
+>. Similarly
+ the <TT
+CLASS="VARNAME"
+>control</TT
+> array does not use an endpoint number
+ as the first index because that would be redundant.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>isochronous_in_endpoints</TT
+> and
+ <TT
+CLASS="VARNAME"
+>isochronous_in()</TT
+></DT
+><DD
+><P
+> These variables provide the same information as
+ <TT
+CLASS="VARNAME"
+>bulk_in_endpoints</TT
+> and <TT
+CLASS="VARNAME"
+>bulk_in</TT
+>,
+ but for endpoints that support isochronous IN transfers.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>isochronous_out_endpoints</TT
+> and
+ <TT
+CLASS="VARNAME"
+>isochronous_out()</TT
+></DT
+><DD
+><P
+> These variables provide the same information as
+ <TT
+CLASS="VARNAME"
+>bulk_out_endpoints</TT
+> and <TT
+CLASS="VARNAME"
+>bulk_out</TT
+>,
+ but for endpoints that support isochronous OUT transfers.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>interrupt_in_endpoints</TT
+> and
+ <TT
+CLASS="VARNAME"
+>interrupt_in()</TT
+></DT
+><DD
+><P
+> These variables provide the same information as
+ <TT
+CLASS="VARNAME"
+>bulk_in_endpoints</TT
+> and <TT
+CLASS="VARNAME"
+>bulk_in</TT
+>,
+ but for endpoints that support interrupt IN transfers.
+ </P
+></DD
+><DT
+><TT
+CLASS="VARNAME"
+>interrupt_out_endpoints</TT
+> and
+ <TT
+CLASS="VARNAME"
+>interrupt_out()</TT
+></DT
+><DD
+><P
+> These variables provide the same information as
+ <TT
+CLASS="VARNAME"
+>bulk_out_endpoints</TT
+> and <TT
+CLASS="VARNAME"
+>bulk_out</TT
+>,
+ but for endpoints that support interrupt OUT transfers.
+ </P
+></DD
+></DL
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN1105"
+></A
+><H2
+>Testing Bulk Transfers</H2
+><P
+>The main function for initiating a bulk test is
+<TT
+CLASS="FUNCTION"
+>usbtest::bulktest</TT
+>. This takes three compulsory
+arguments, and can be given a number of additional arguments to
+control the exact behaviour. The compulsory arguments are:</P
+><P
+></P
+><DIV
+CLASS="VARIABLELIST"
+><DL
+><DT
+>endpoint</DT
+><DD
+><P
+> This specifies the endpoint to use. It should correspond to
+ one of the entries in
+ <TT
+CLASS="VARNAME"
+>usbtest::bulk_in_endpoints</TT
+> or
+ <TT
+CLASS="VARNAME"
+>usbtest::bulk_out_endpoints</TT
+>, depending on the
+ transfer direction.
+ </P
+></DD
+><DT
+>direction</DT
+><DD
+><P
+> This should be either <TT
+CLASS="LITERAL"
+>in</TT
+> or <TT
+CLASS="LITERAL"
+>out</TT
+>.
+ </P
+></DD
+><DT
+>number of transfers</DT
+><DD
+><P
+> This specifies the number of transfers that should take place. The
+ testing software does not currently support the concept of performing
+ transfers for a given period of time because synchronising this on
+ both the host and a wide range of targets is difficult. However it
+ is relatively easy to work out the approximate time a number of bulk
+ transfers should take place, based on a typical bandwidth of
+ 1MB/second and assuming say a 1ms overhead per transfer.
+ Alternatively a test script could perform a small initial run to
+ determine what performance can actually be expected from a given
+ target, and then use this information to run a much longer test.
+ </P
+></DD
+></DL
+></DIV
+><P
+>Additional arguments can be used to control the exact transfer. For
+example a <TT
+CLASS="PARAMETER"
+><I
+>txdelay+</I
+></TT
+> argument can be used to
+slowly increase the delay between transfers. All such arguments involve
+a value which can be passed either as part of the argument itself,
+for example <TT
+CLASS="LITERAL"
+>txdelay+=5</TT
+>, or as a subsequent
+argument, <TT
+CLASS="LITERAL"
+>txdelay+ 5</TT
+>. The possible arguments fall
+into a number of categories: data, I/O mechanism, transmit size,
+receive size, transmit delay, and receive delay.</P
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1130"
+></A
+><H3
+>Data</H3
+><P
+>An obvious parameter to control is the actual data that gets sent.
+This can be controlled by the argument <TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+>
+which can take one of five values: <TT
+CLASS="LITERAL"
+>none</TT
+>,
+<TT
+CLASS="LITERAL"
+>bytefill</TT
+>, <TT
+CLASS="LITERAL"
+>intfill</TT
+>,
+<TT
+CLASS="LITERAL"
+>byteseq</TT
+> and <TT
+CLASS="LITERAL"
+>wordseq</TT
+>. The default
+value is <TT
+CLASS="LITERAL"
+>none</TT
+>.</P
+><P
+></P
+><DIV
+CLASS="VARIABLELIST"
+><DL
+><DT
+><TT
+CLASS="LITERAL"
+>none</TT
+></DT
+><DD
+><P
+> The transmit code will not attempt to fill the buffer in any way,
+ and the receive code will not check it. The actual data that gets
+ transferred will be whatever happened to be in the buffer before
+ the transfer started.
+ </P
+></DD
+><DT
+><TT
+CLASS="LITERAL"
+>bytefill</TT
+></DT
+><DD
+><P
+> The entire buffer will be filled with a single byte, as per
+ <TT
+CLASS="FUNCTION"
+>memset</TT
+>.
+ </P
+></DD
+><DT
+><TT
+CLASS="LITERAL"
+>intfill</TT
+></DT
+><DD
+><P
+> The buffer will be treated as an array of 32-bit integers, and will
+ be filled with the same integer repeated the appropriate number of
+ times. If the buffer size is not a multiple of four bytes then
+ the last few bytes will be set to 0.
+ </P
+></DD
+><DT
+><TT
+CLASS="LITERAL"
+>byteseq</TT
+></DT
+><DD
+><P
+> The buffer will be filled with a sequence of bytes, generated by
+ a linear congruential generator. If the first byte in the buffer is
+ filled with the value <TT
+CLASS="LITERAL"
+>x</TT
+>, the next byte will be
+ <TT
+CLASS="LITERAL"
+>(m*x)+i</TT
+>. For example a sequence of slowly
+ incrementing bytes can be achieved by setting both the multiplier
+ and the increment to 1. Alternatively a pseudo-random number
+ sequence can be achieved using values 1103515245 and 12345, as
+ per the standard C library <TT
+CLASS="FUNCTION"
+>rand</TT
+> function.
+ For convenience these two constants are available as Tcl
+ variables <TT
+CLASS="VARNAME"
+>usbtest::MULTIPLIER</TT
+> and
+ <TT
+CLASS="VARNAME"
+>usbtest::INCREMENT</TT
+>.
+ </P
+></DD
+><DT
+><TT
+CLASS="LITERAL"
+>wordseq</TT
+></DT
+><DD
+><P
+> This acts like <TT
+CLASS="LITERAL"
+>byteseq</TT
+>, except that the buffer is
+ treated as an array of 32-bit integers rather than as an array of
+ bytes. If the buffer is not a multiple of four bytes then the last
+ few bytes will be filled with zeroes.
+ </P
+></DD
+></DL
+></DIV
+><P
+>The above requires three additional parameters
+<TT
+CLASS="PARAMETER"
+><I
+>data1</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>data*</I
+></TT
+> and
+<TT
+CLASS="PARAMETER"
+><I
+>data+</I
+></TT
+>. <TT
+CLASS="PARAMETER"
+><I
+>data1</I
+></TT
+> specifies
+the value to be used for byte or word fills, or the first number when
+calculating a sequence. The default value is <TT
+CLASS="LITERAL"
+>0</TT
+>.
+<TT
+CLASS="PARAMETER"
+><I
+>data*</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>data+</I
+></TT
+> specify
+the multiplier and increment for a sequence, and have default values
+of <TT
+CLASS="LITERAL"
+>1</TT
+> and <TT
+CLASS="LITERAL"
+>0</TT
+> respectively. For
+example, to perform a bulk transfer of a pseudo-random sequence of
+integers starting with 42 the following code could be used:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>bulktest 2 IN 1000 data=wordseq data1=42 \
+ data* $usbtest::MULTIPLIER data+ $usbtest::INCREMENT</PRE
+></TD
+></TR
+></TABLE
+><P
+>The above parameters define what data gets transferred for the first
+transfer, but a test can involve multiple transfers. The data format
+will be the same for all transfers, but it is possible to adjust the
+current value, the multiplier, and the increment between each
+transfer. This is achieved with parameters <TT
+CLASS="PARAMETER"
+><I
+>data1*</I
+></TT
+>,
+<TT
+CLASS="PARAMETER"
+><I
+>data1+</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>data**</I
+></TT
+>,
+<TT
+CLASS="PARAMETER"
+><I
+>data*+</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>data+*</I
+></TT
+>, and
+<TT
+CLASS="PARAMETER"
+><I
+>data++</I
+></TT
+>, with default values of 1 for each
+multiplier and 0 for each increment. For example, if the multiplier
+for the first transfer is set to <TT
+CLASS="LITERAL"
+>2</TT
+> using
+<TT
+CLASS="PARAMETER"
+><I
+>data*</I
+></TT
+>, and arguments
+<TT
+CLASS="LITERAL"
+>data**&nbsp;2</TT
+> and <TT
+CLASS="LITERAL"
+>data*+&nbsp;-1</TT
+> are also
+supplied, then the multiplier for subsequent transfers will be
+<TT
+CLASS="LITERAL"
+>3</TT
+>, <TT
+CLASS="LITERAL"
+>5</TT
+>, <TT
+CLASS="LITERAL"
+>9</TT
+>,
+&#8230;.</P
+><DIV
+CLASS="NOTE"
+><BLOCKQUOTE
+CLASS="NOTE"
+><P
+><B
+>Note: </B
+>Currently it is not possible for a test script to send specific data,
+for example a specific sequence of bytes captured by a protocol analyser
+that caused a problem. If the transfer was from host to target then
+the target would have to know the exact sequence of bytes to expect,
+which means transferring data over the USB bus when that data is known
+to have caused problems in the past. Similarly for target to host
+transfers the target would have to know what bytes to send. A possible
+future extension of the USB testing support would allow for bounce
+operations, where a given message is first sent to the target and then
+sent back to the host, with only the host checking that the data was
+returned correctly.</P
+></BLOCKQUOTE
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1200"
+></A
+><H3
+>I/O Mechanism</H3
+><P
+>On the target side USB transfers can happen using either low-level
+USB calls such as <TT
+CLASS="FUNCTION"
+>usbs_start_rx_buffer</TT
+>, or by
+higher-level calls which go through the device table. By default the
+target-side code will use the low-level calls. If it is desired to
+test the higher-level calls instead, for example because those are
+what the application uses, then that can be achieved with an
+argument <TT
+CLASS="PARAMETER"
+><I
+>mechanism=devtab</I
+></TT
+>.</P
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1205"
+></A
+><H3
+>Transmit Size</H3
+><P
+>The next set of arguments can be used to control the size of the
+transmitted buffer: <TT
+CLASS="PARAMETER"
+><I
+>txsize1</I
+></TT
+>,
+<TT
+CLASS="PARAMETER"
+><I
+>txsize&gt;=</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>txsize&lt;=</I
+></TT
+>
+<TT
+CLASS="PARAMETER"
+><I
+>txsize*</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>txsize/</I
+></TT
+>,
+and <TT
+CLASS="PARAMETER"
+><I
+>txsize+</I
+></TT
+>.</P
+><P
+><TT
+CLASS="PARAMETER"
+><I
+>txsize1</I
+></TT
+> determines the size of the first
+transfer, and has a default value of 32 bytes. The size of the next
+transfer is calculated by first multiplying by the
+<TT
+CLASS="PARAMETER"
+><I
+>txsize*</I
+></TT
+> value, then dividing by the
+<TT
+CLASS="PARAMETER"
+><I
+>txsize/</I
+></TT
+> value, and finally adding the
+<TT
+CLASS="PARAMETER"
+><I
+>txsize+</I
+></TT
+> value. The defaults for these are
+<TT
+CLASS="LITERAL"
+>1</TT
+>, <TT
+CLASS="LITERAL"
+>1</TT
+>, and <TT
+CLASS="LITERAL"
+>0</TT
+>
+respectively, which means that the transfer size will remain
+unchanged. If for example the transfer size should increase by
+approximately 50 per cent each time then suitable values might be
+<TT
+CLASS="LITERAL"
+>txsize*&nbsp;3</TT
+>, <TT
+CLASS="LITERAL"
+>txsize/&nbsp;2</TT
+>,
+and <TT
+CLASS="LITERAL"
+>txsize+&nbsp;1</TT
+>. </P
+><P
+>The <TT
+CLASS="PARAMETER"
+><I
+>txsize&gt;=</I
+></TT
+> and
+<TT
+CLASS="PARAMETER"
+><I
+>txsize&lt;=</I
+></TT
+> arguments can be used to impose
+lower and upper bounds on the transfer. By default the
+<TT
+CLASS="LITERAL"
+>min_size</TT
+> and <TT
+CLASS="LITERAL"
+>max_size</TT
+> values
+appropriate for the endpoint will be used. If at any time the
+current size falls outside the bounds then it will be normalized.</P
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1230"
+></A
+><H3
+>Receive Size</H3
+><P
+>The receive size, in other words the number of bytes that either host
+or target will expect to receive as opposed to the number of bytes
+that actually get sent, can be adjusted using a similar set of
+arguments: <TT
+CLASS="PARAMETER"
+><I
+>rxsize1</I
+></TT
+>,
+<TT
+CLASS="PARAMETER"
+><I
+>rxsize&gt;=</I
+></TT
+>,
+<TT
+CLASS="PARAMETER"
+><I
+>rxsize&lt;=</I
+></TT
+>,
+<TT
+CLASS="PARAMETER"
+><I
+>rxsize*</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>rxsize/</I
+></TT
+> and
+<TT
+CLASS="PARAMETER"
+><I
+>rxsize+</I
+></TT
+>. The current receive size will be
+adjusted between transfers just like the transmit size. However when
+communicating over USB it is not a good idea to attempt to receive
+less data than will actually be sent: typically neither the hardware
+nor the software will be able to do anything useful with the excess,
+so there will be problems. Therefore if at any time the calculated
+receive size is less than the transmit size, the actual receive will
+be for the exact number of bytes that will get transmitted. However
+this will not affect the calculations for the next receive size.</P
+><P
+>The default values for <TT
+CLASS="PARAMETER"
+><I
+>rxsize1</I
+></TT
+>,
+<TT
+CLASS="PARAMETER"
+><I
+>rxsize*</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>rxsize/</I
+></TT
+> and
+<TT
+CLASS="PARAMETER"
+><I
+>rxsize+</I
+></TT
+> are <TT
+CLASS="LITERAL"
+>0</TT
+>,
+<TT
+CLASS="LITERAL"
+>1</TT
+>, <TT
+CLASS="LITERAL"
+>1</TT
+> and <TT
+CLASS="LITERAL"
+>0</TT
+>
+respectively. This means that the calculated receive size will always
+be less than the transmit size, so the receive operation will be for
+the exact number of bytes transmitted. For some USB protocols this
+would not accurately reflect the traffic that will happen. For example
+with USB-ethernet transfer sizes will vary between 16 and 1516 bytes,
+so the receiver will always expect up to 1516 bytes. This can be
+achieved using <TT
+CLASS="LITERAL"
+>rxsize1&nbsp;1516</TT
+>, leaving the
+other parameters at their default values.</P
+><P
+>For target hardware which involves non-zero
+<TT
+CLASS="LITERAL"
+>max_in_padding</TT
+>, on the host side the padding will
+be added automatically to the receive size if necessary.</P
+></DIV
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1251"
+></A
+><H3
+>Transmit and Receive Delays</H3
+><P
+>Typically during the testing there will be some minor delays between
+transfers on both host and target. Some of these delays will be caused
+by timeslicing, for example another process running on the host, or a
+concurrent test thread running inside the target. Other delays will be
+caused by the USB bus itself, for example activity from another device
+on the bus. However it is desirable that test cases be allowed to
+inject additional and somewhat more controlled delays into the system,
+for example to make sure that the target behaves correctly even if the
+target is not yet ready to receive data from the host.</P
+><P
+>The transmit delay is controlled by six parameters:
+<TT
+CLASS="PARAMETER"
+><I
+>txdelay1</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>txdelay*</I
+></TT
+>,
+<TT
+CLASS="PARAMETER"
+><I
+>txdelay/</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>txdelay+</I
+></TT
+>,
+<TT
+CLASS="PARAMETER"
+><I
+>txdelay&gt;=</I
+></TT
+> and
+<TT
+CLASS="PARAMETER"
+><I
+>txdelay&lt;=</I
+></TT
+>. The default values for these are
+<TT
+CLASS="LITERAL"
+>0</TT
+>, <TT
+CLASS="LITERAL"
+>1</TT
+>, <TT
+CLASS="LITERAL"
+>1</TT
+>,
+<TT
+CLASS="LITERAL"
+>0</TT
+>, <TT
+CLASS="LITERAL"
+>0</TT
+> and
+<TT
+CLASS="LITERAL"
+>1000000000</TT
+> respectively, so that by default
+transmits will happen as quickly as possible. Delays are measured in
+nanoseconds, so a value of <TT
+CLASS="LITERAL"
+>1000000</TT
+> would correspond
+to a delay of 0.001 seconds or one millisecond. By default delays have
+an upper bound of one second. Between transfers the transmit delay is
+updated in much the same was as the transfer sizes.</P
+><P
+>The receive delay is controlled by a similar set of six parameters:
+<TT
+CLASS="PARAMETER"
+><I
+>rxdelay1</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>rxdelay*</I
+></TT
+>,
+<TT
+CLASS="PARAMETER"
+><I
+>rxdelay/</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>rxdelay+</I
+></TT
+>,
+<TT
+CLASS="PARAMETER"
+><I
+>rxdelay&gt;=</I
+></TT
+> and
+<TT
+CLASS="PARAMETER"
+><I
+>rxdelay&lt;=</I
+></TT
+>. The default values for these are
+the same as for transmit delays.</P
+><P
+>The transmit delay is used on the side which sends data over the USB
+bus, so for a bulk IN transfer it is the target that sends data and
+hence sleeps for the specified transmit delay, while the host receives
+data sleeps for the receive delay. For an OUT transfer the positions
+are reversed.</P
+><P
+>It should be noted that although the delays are measured in
+nanoseconds, the actual delays will be much less precise and are
+likely to be of the order of milliseconds. The exact details will
+depend on the kernel clock speed.</P
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN1277"
+></A
+><H2
+>Other Types of Transfer</H2
+><P
+>Support for testing other types of USB traffic such as isochronous
+transfers is not yet implemented.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN1280"
+></A
+><H2
+>Starting a Test and Collecting Results</H2
+><P
+>A USB test script should prepare one or more transfers using
+appropriate functions such as <TT
+CLASS="FUNCTION"
+>usbtest::bulktest</TT
+>.
+Once all the individual tests have been prepared they can be started
+by a call to <TT
+CLASS="FUNCTION"
+>usbtest::start</TT
+>. This takes a single
+argument, a maximum duration measured in seconds. If all transfers
+have not been completed in the specified time then any remaining
+transfers will be aborted.</P
+><P
+><TT
+CLASS="FUNCTION"
+>usbtest::start</TT
+> will return <TT
+CLASS="LITERAL"
+>1</TT
+>
+if all the tests have succeeded, or <TT
+CLASS="LITERAL"
+>0</TT
+> if any of
+them have failed. More detailed reports will be stored in the
+Tcl variable <TT
+CLASS="VARNAME"
+>usbtests::results</TT
+>, which will be a
+list of string messages.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN1290"
+></A
+><H2
+>Existing Test Scripts</H2
+><P
+>A number of test scripts are provided as standard. These are located
+in the <TT
+CLASS="FILENAME"
+>host</TT
+> subdirectory of the
+common USB slave package, and will be installed as part of the process
+of building the host-side software. When a script is specified on the
+command line <SPAN
+CLASS="APPLICATION"
+>usbhost</SPAN
+> will first search for
+it in the current directory, then in the install tree. Standard
+test scripts include the following:</P
+><P
+></P
+><DIV
+CLASS="VARIABLELIST"
+><DL
+><DT
+><TT
+CLASS="FILENAME"
+>list.tcl</TT
+></DT
+><DD
+><P
+> This script simply displays information about the capabilities
+ of the target platform, as provided by the target-side USB
+ device driver. It can help with tracking down problems, but its
+ primary purpose is to let users check that everything is working
+ correctly: if running <B
+CLASS="COMMAND"
+>usbhost list.tcl</B
+>
+ outputs sensible information then the user knows that the
+ target side is running correctly and that communication between
+ host and target is possible.
+ </P
+></DD
+><DT
+><TT
+CLASS="FILENAME"
+>verbose.tcl</TT
+></DT
+><DD
+><P
+> The target-side code can provide information about what
+ is happening while tests are prepared and run. This facility
+ should not normally be used since the extra I/O involved will
+ significantly affect the behaviour of the system, but in some
+ circumstances it may prove useful. Since an eCos application
+ cannot easily be given command-line arguments the target-side
+ verbosity level cannot be controlled using
+ <TT
+CLASS="PARAMETER"
+><I
+>-V</I
+></TT
+> or <TT
+CLASS="PARAMETER"
+><I
+>--verbose</I
+></TT
+>
+ options. Instead it can be controlled from inside
+ <SPAN
+CLASS="APPLICATION"
+>gdb</SPAN
+> by changing the integer
+ variable <TT
+CLASS="VARNAME"
+>verbose</TT
+>. Alternatively it can
+ be manipulated by running the test script
+ <TT
+CLASS="FILENAME"
+>verbose.tcl</TT
+>. This script takes a single
+ argument, the desired verbosity level, which should be a small
+ integer. For example, to disable target-side run-time logging
+ the command <B
+CLASS="COMMAND"
+>usbhost&nbsp;verbose&nbsp;0</B
+> can
+ be used.
+ </P
+></DD
+></DL
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN1313"
+></A
+><H2
+>Possible Problems</H2
+><P
+>If all transfers succeed within the specified time then both host and
+target remain in synch and further tests can be run without problem.
+However, if at any time a failure occurs then things get more
+complicated. For example, if the current test involves a series of
+bulk OUT transfers and the target detects that for one of these
+transfers it received less data than was expected then the test has
+failed, and the target will stop accepting data on this endpoint.
+However the host-side software may not have detected anything wrong
+and is now blocked trying to send the next lot of data.</P
+><P
+>The test code goes to considerable effort to recover from problems
+such as these. On the host-side separate threads are used for
+concurrent transfers, and on the target-side appropriate asynchronous
+I/O mechanisms are used. In addition there is a control thread on the
+host that checks the state of all the main host-side threads, and the
+state of the target using private control messages. If it discovers
+that one side has stopped sending or receiving data because of an
+error and the other side is blocked as a result, it will set certain
+flags and then cause one additional transfer to take place. That
+additional transfer will have the effect of unblocking the other side,
+which then discovers that an error has occurred by checking the
+appropriate flags. In this way both host and target should end up back
+in synch, and it is possible to move on to the next set of tests.</P
+><P
+>However, the above assumes that the testing has not triggered any
+serious hardware conditions. If instead the target-side hardware has
+been left in some strange state so that, for example, it will no
+longer raise an interrupt for traffic on a particular endpoint then
+recovery is not currently possible, and the testing software will just
+hang.</P
+><P
+>A possible future enhancement to the testing software would allow the
+host-side to raise a USB reset signal whenever a failure occurs, in
+the hope that this would clear any remaining problems within the
+target-side USB hardware.</P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="usbs-writing.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Writing a USB Device Driver</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>&nbsp;</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/slave/current/doc/usbs-writing.html b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-writing.html
new file mode 100644
index 0000000000..89e2a5c48d
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/doc/usbs-writing.html
@@ -0,0 +1,937 @@
+<!-- Copyright (C) 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of substantively modified versions of this -->
+<!-- document is prohibited without the explicit permission of the -->
+<!-- copyright holder. -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->
+<HTML
+><HEAD
+><TITLE
+>Writing a USB Device Driver</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"><LINK
+REL="HOME"
+TITLE="eCos USB Slave Support"
+HREF="io-usb-slave.html"><LINK
+REL="PREVIOUS"
+TITLE="Data Endpoints"
+HREF="usbs-data.html"><LINK
+REL="NEXT"
+TITLE="Testing"
+HREF="usbs-testing.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>eCos USB Slave Support</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="usbs-data.html"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="usbs-testing.html"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="USBS-WRITING"
+>Writing a USB Device Driver</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN668"
+></A
+><H2
+>Name</H2
+>Writing a USB Device Driver&nbsp;--&nbsp;USB Device Driver Porting Guide</DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN671"
+></A
+><H2
+>Introduction</H2
+><P
+>Often the best way to write a USB device driver will be to start with
+an existing one and modify it as necessary. The information given here
+is intended primarily as an outline rather than as a complete guide.</P
+><DIV
+CLASS="NOTE"
+><BLOCKQUOTE
+CLASS="NOTE"
+><P
+><B
+>Note: </B
+>At the time of writing only one USB device driver has been
+implemented. Hence it is possible, perhaps probable, that some
+portability issues have not yet been addressed. One issue
+involves the different types of transfer, for example the initial
+target hardware had no support for isochronous or interrupt transfers,
+so additional functionality may be needed to switch between transfer
+types. Another issue would be hardware where a given endpoint number,
+say endpoint 1, could be used for either receiving or transmitting
+data, but not both because a single fifo is used. Issues like these
+will have to be resolved as and when additional USB device drivers are
+written.</P
+></BLOCKQUOTE
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN676"
+></A
+><H2
+>The Control Endpoint</H2
+><P
+>A USB device driver should provide a single <A
+HREF="usbs-control.html"
+><SPAN
+CLASS="STRUCTNAME"
+>usbs_control_endpoint</SPAN
+></A
+>
+data structure for every USB device. Typical peripherals will have
+only one USB port so there will be just one such data structure in the
+entire system, but theoretically it is possible to have multiple USB
+devices. These may all involve the same chip, in which case a single
+device driver should support multiple device instances, or they may
+involve different chips. The name or names of these data structures
+are determined by the device driver, but appropriate care should be
+taken to avoid name clashes. </P
+><P
+>A USB device cannot be used unless the control endpoint data structure
+exists. However, the presence of USB hardware in the target processor
+or board does not guarantee that the application will necessarily want
+to use that hardware. To avoid unwanted code or data overheads, the
+device driver can provide a configuration option to determine whether
+or not the endpoint 0 data structure is actually provided. A default
+value of <TT
+CLASS="LITERAL"
+>CYGINT_IO_USB_SLAVE_CLIENTS</TT
+> ensures that
+the USB driver will be enabled automatically if higher-level code does
+require USB support, while leaving ultimate control to the user.</P
+><P
+>The USB device driver is responsible for filling in the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>start_fn</I
+></TT
+>,
+<TT
+CLASS="STRUCTFIELD"
+><I
+>poll_fn</I
+></TT
+> and
+<TT
+CLASS="STRUCTFIELD"
+><I
+>interrupt_vector</I
+></TT
+> fields. Usually this can
+be achieved by static initialization. The driver is also largely
+responsible for maintaining the <TT
+CLASS="STRUCTFIELD"
+><I
+>state</I
+></TT
+>
+field. The <TT
+CLASS="STRUCTFIELD"
+><I
+>control_buffer</I
+></TT
+> array should be
+used to hold the first packet of a control message. The
+<TT
+CLASS="STRUCTFIELD"
+><I
+>buffer</I
+></TT
+> and other fields related to data
+transfers will be managed <A
+HREF="usbs-control.html#AEN578"
+>jointly</A
+> by higher-level code and
+the device driver. The remaining fields are generally filled in by
+higher-level code, although the driver should initialize them to NULL
+values.</P
+><P
+>Hardware permitting, the USB device should be inactive until the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>start_fn</I
+></TT
+> is invoked, for example by
+tristating the appropriate pins. This prevents the host from
+interacting with the peripheral before all other parts of the system
+have initialized. It is expected that the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>start_fn</I
+></TT
+> will only be invoked once, shortly
+after power-up.</P
+><P
+>Where possible the device driver should detect state changes, such as
+when the connection between host and peripheral is established, and
+<A
+HREF="usbs-control.html#AEN515"
+>report</A
+> these to higher-level
+code via the <TT
+CLASS="STRUCTFIELD"
+><I
+>state_change_fn</I
+></TT
+> callback, if
+any. The state change to and from configured state cannot easily be
+handled by the device driver itself, instead higher-level code such as
+the common USB slave package will take care of this.</P
+><P
+>Once the connection between host and peripheral has been established,
+the peripheral must be ready to accept control messages at all times,
+and must respond to these within certain time constraints. For
+example, the standard set-address control message must be handled
+within 50ms. The USB specification provides more information on these
+constraints. The device driver is responsible for receiving the
+initial packet of a control message. This packet will always be eight
+bytes and should be stored in the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>control_buffer</I
+></TT
+> field. Certain standard
+control messages should be detected and handled by the device driver
+itself. The most important is set-address, but usually the get-status,
+set-feature and clear-feature requests when applied to halted
+endpoints should also be handled by the driver. Other standard control
+messages should first be passed on to the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>standard_control_fn</I
+></TT
+> callback (if any), and
+finally to the default handler
+<TT
+CLASS="FUNCTION"
+>usbs_handle_standard_control</TT
+> provided by the
+common USB slave package. Class, vendor and reserved control messages
+should always be dispatched to the appropriate callback and there is
+no default handler for these.</P
+><P
+>Some control messages will involve further data transfer, not just the
+initial packet. The device driver must handle this in accordance with
+the USB specification and the <A
+HREF="usbs-control.html#AEN578"
+>buffer management strategy</A
+>. The
+driver is also responsible for keeping track of whether or not the
+control operation has succeeded and generating an ACK or STALL
+handshake. </P
+><P
+>The polling support is optional and may not be feasible on all
+hardware. It is only used in certain specialised environments such as
+RedBoot. A typical implementation of the polling function would just
+check whether or not an interrupt would have occurred and, if so, call
+the same code that the interrupt handler would.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN704"
+></A
+><H2
+>Data Endpoints</H2
+><P
+>In addition to the control endpoint data structure, a USB device
+driver should also provide appropriate <A
+HREF="usbs-data.html"
+>data
+endpoint</A
+> data structures. Obviously this is only relevant if
+the USB support generally is desired, that is if the control endpoint is
+provided. In addition, higher-level code may not require all the
+endpoints, so it may be useful to provide configuration options that
+control the presence of each endpoint. For example, the intended
+application might only involve a single transmit endpoint and of
+course control messages, so supporting receive endpoints might waste
+memory.</P
+><P
+>Conceptually, data endpoints are much simpler than the control
+endpoint. The device driver has to supply two functions, one for
+data transfers and another to control the halted condition. These
+implement the functionality for
+<A
+HREF="usbs-start-rx.html"
+><TT
+CLASS="FUNCTION"
+>usbs_start_rx_buffer</TT
+></A
+>,
+<A
+HREF="usbs-start-tx.html"
+><TT
+CLASS="FUNCTION"
+>usbs_start_tx_buffer</TT
+></A
+>,
+<A
+HREF="usbs-halt.html"
+><TT
+CLASS="FUNCTION"
+>usbs_set_rx_endpoint_halted</TT
+></A
+> and
+<A
+HREF="usbs-halt.html"
+><TT
+CLASS="FUNCTION"
+>usbs_set_tx_endpoint_halted</TT
+></A
+>.
+The device driver is also responsible for maintaining the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>halted</I
+></TT
+> status.</P
+><P
+>For data transfers, higher-level code will have filled in the
+<TT
+CLASS="STRUCTFIELD"
+><I
+>buffer</I
+></TT
+>,
+<TT
+CLASS="STRUCTFIELD"
+><I
+>buffer_size</I
+></TT
+>,
+<TT
+CLASS="STRUCTFIELD"
+><I
+>complete_fn</I
+></TT
+> and
+<TT
+CLASS="STRUCTFIELD"
+><I
+>complete_data</I
+></TT
+> fields. The transfer function
+should arrange for the transfer to start, allowing the host to send or
+receive packets. Typically this will result in an interrupt at the end
+of the transfer or after each packet. Once the entire transfer has
+been completed, the driver's interrupt handling code should invoke the
+completion function. This can happen either in DSR context or thread
+context, depending on the driver's implementation. There are a number
+of special cases to consider. If the endpoint is halted when the
+transfer is started then the completion function can be invoked
+immediately with <TT
+CLASS="LITERAL"
+>-EAGAIN</TT
+>. If the transfer cannot be
+completed because the connection is broken then the completion
+function should be invoked with <TT
+CLASS="LITERAL"
+>-EPIPE</TT
+>. If the
+endpoint is stalled during the transfer, either because of a standard
+control message or because higher-level code calls the appropriate
+<TT
+CLASS="STRUCTFIELD"
+><I
+>set_halted_fn</I
+></TT
+>, then again the completion
+function should be invoked with <TT
+CLASS="LITERAL"
+>-EAGAIN</TT
+>. Finally,
+the &#60;<TT
+CLASS="FUNCTION"
+>usbs_start_rx_endpoint_wait</TT
+> and
+<TT
+CLASS="FUNCTION"
+>usbs_start_tx_endpoint_wait</TT
+> functions involve
+calling the device driver's data transfer function with a buffer size
+of 0 bytes.</P
+><DIV
+CLASS="NOTE"
+><BLOCKQUOTE
+CLASS="NOTE"
+><P
+><B
+>Note: </B
+>Giving a buffer size of 0 bytes a special meaning is problematical
+because it prevents transfers of that size. Such transfers are allowed
+by the USB protocol, consisting of just headers and acknowledgements
+and an empty data phase, although rarely useful. A future modification
+of the device driver specification will address this issue, although
+care has to be taken that the functionality remains accessible through
+devtab entries as well as via low-level accesses.</P
+></BLOCKQUOTE
+></DIV
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN731"
+></A
+><H2
+>Devtab Entries</H2
+><P
+>For some applications or higher-level packages it may be more
+convenient to use traditional open/read/write I/O calls rather than
+the non-blocking USB I/O calls. To support this the device driver can
+provide a devtab entry for each endpoint, for example:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#ifdef CYGVAR_DEVS_USB_SA11X0_EP1_DEVTAB_ENTRY
+
+static CHAR_DEVIO_TABLE(usbs_sa11x0_ep1_devtab_functions,
+ &amp;cyg_devio_cwrite,
+ &amp;usbs_devtab_cread,
+ &amp;cyg_devio_bwrite,
+ &amp;cyg_devio_bread,
+ &amp;cyg_devio_select,
+ &amp;cyg_devio_get_config,
+ &amp;cyg_devio_set_config);
+
+static CHAR_DEVTAB_ENTRY(usbs_sa11x0_ep1_devtab_entry,
+ CYGDAT_DEVS_USB_SA11X0_DEVTAB_BASENAME "1r",
+ 0,
+ &amp;usbs_sa11x0_ep1_devtab_functions,
+ &amp;usbs_sa11x0_devtab_dummy_init,
+ 0,
+ (void*) &amp;usbs_sa11x0_ep1);
+#endif</PRE
+></TD
+></TR
+></TABLE
+><P
+>Again care must be taken to avoid name clashes. This can be achieved
+by having a configuration option to control the base name, with a
+default value of e.g. <TT
+CLASS="LITERAL"
+>/dev/usbs</TT
+>, and appending an
+endpoint-specific string. This gives the application developer
+sufficient control to eliminate any name clashes. The common USB slave
+package provides functions <TT
+CLASS="FUNCTION"
+>usbs_devtab_cwrite</TT
+> and
+<TT
+CLASS="FUNCTION"
+>usbs_devtab_cread</TT
+>, which can be used in the
+function tables for transmit and receive endpoints respectively. The
+private field <TT
+CLASS="STRUCTFIELD"
+><I
+>priv</I
+></TT
+> of the devtab entry
+should be a pointer to the underlying endpoint data structure.</P
+><P
+>Because devtab entries are never accessed directly, only indirectly,
+they would usually be eliminated by the linker. To avoid this the
+devtab entries should normally be defined in a separate source file
+which ends up the special library <TT
+CLASS="FILENAME"
+>libextras.a</TT
+>
+rather than in the default library <TT
+CLASS="FILENAME"
+>libtarget.a</TT
+>.</P
+><P
+>Not all applications or higher-level packages will want to use the
+devtab entries and the blocking I/O facilities. It may be appropriate
+for the device driver to provide additional configuration options that
+control whether or not any or all of the devtab entries should be
+provided, to avoid unnecessary memory overheads.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN744"
+></A
+><H2
+>Interrupt Handling</H2
+><P
+>A typical USB device driver will need to service interrupts for all of
+the endpoints and possibly for additional USB events such as entering
+or leaving suspended mode. Usually these interrupts need not be
+serviced directly by the ISR. Instead, they can be left to a DSR. If
+the peripheral is not able to accept or send another packet just yet,
+the hardware will generate a NAK and the host will just retry a little
+bit later. If high throughput is required then it may be desirable to
+handle the bulk transfer protocol largely at ISR level, that is take
+care of each packet in the ISR and only activate the DSR once the
+whole transfer has completed.</P
+><P
+>Control messages may involve invoking arbitrary callback functions in
+higher-level code. This should normally happen at DSR level. Doing it
+at ISR level could seriously affect the system's interrupt latency and
+impose unacceptable constraints on what operations can be performed by
+those callbacks. If the device driver requires a thread anyway then it
+may be appropriate to use this thread for invoking the callbacks, but
+usually it is not worthwhile to add a new thread to the system just
+for this; higher-level code is expected to write callbacks that
+function sensibly at DSR level. Much the same applies to the
+completion functions associated with data transfers. These should also
+be invoked at DSR or thread level.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN748"
+></A
+><H2
+>Support for USB Testing</H2
+><P
+>Optionally a USB device driver can provide support for the
+<A
+HREF="usbs-testing.html"
+>USB test software</A
+>. This requires
+defining a number of additional data structures, allowing the
+generic test code to work out just what the hardware is capable of and
+hence what testing can be performed.</P
+><P
+>The key data structure is
+<SPAN
+CLASS="STRUCTNAME"
+>usbs_testing_endpoint</SPAN
+>, defined in <TT
+CLASS="FILENAME"
+>cyg/io/usb/usbs.h</TT
+>. In addition some
+commonly required constants are provided by the common USB package in
+<TT
+CLASS="FILENAME"
+>cyg/io/usb/usb.h</TT
+>. One
+<SPAN
+CLASS="STRUCTNAME"
+>usbs_testing_endpoint</SPAN
+> structure should be
+defined for each supported endpoint. The following fields need to be
+filled in:</P
+><P
+></P
+><DIV
+CLASS="VARIABLELIST"
+><DL
+><DT
+><TT
+CLASS="STRUCTFIELD"
+><I
+>endpoint_type</I
+></TT
+></DT
+><DD
+><P
+> This specifies the type of endpoint and should be one of
+ <TT
+CLASS="LITERAL"
+>USB_ENDPOINT_DESCRIPTOR_ATTR_CONTROL</TT
+>,
+ <TT
+CLASS="LITERAL"
+>BULK</TT
+>, <TT
+CLASS="LITERAL"
+>ISOCHRONOUS</TT
+> or
+ <TT
+CLASS="LITERAL"
+>INTERRUPT</TT
+>.
+ </P
+></DD
+><DT
+><TT
+CLASS="STRUCTFIELD"
+><I
+>endpoint_number</I
+></TT
+></DT
+><DD
+><P
+> This identifies the number that should be used by the host
+ to address this endpoint. For a control endpoint it should
+ be 0. For other types of endpoints it should be between
+ 1 and 15.
+ </P
+></DD
+><DT
+><TT
+CLASS="STRUCTFIELD"
+><I
+>endpoint_direction</I
+></TT
+></DT
+><DD
+><P
+> For control endpoints this field is irrelevant. For other
+ types of endpoint it should be either
+ <TT
+CLASS="LITERAL"
+>USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN</TT
+> or
+ <TT
+CLASS="LITERAL"
+>USB_ENDPOINT_DESCRIPTOR_ENDPOINT_OUT</TT
+>. If a given
+ endpoint number can be used for traffic in both directions then
+ there should be two entries in the array, one for each direction.
+ </P
+></DD
+><DT
+><TT
+CLASS="STRUCTFIELD"
+><I
+>endpoint</I
+></TT
+></DT
+><DD
+><P
+> This should be a pointer to the appropriate
+ <SPAN
+CLASS="STRUCTNAME"
+>usbs_control_endpoint</SPAN
+>,
+ <SPAN
+CLASS="STRUCTNAME"
+>usbs_rx_endpoint</SPAN
+> or
+ <SPAN
+CLASS="STRUCTNAME"
+>usbs_tx_endpoint</SPAN
+> structure, allowing the
+ generic testing code to perform low-level I/O.
+ </P
+></DD
+><DT
+><TT
+CLASS="STRUCTFIELD"
+><I
+>devtab_entry</I
+></TT
+></DT
+><DD
+><P
+> If the endpoint also has an entry in the system's device table then
+ this field should give the corresponding string, for example
+ <TT
+CLASS="LITERAL"
+>&quot;/dev/usbs1r&quot;</TT
+>. This allows the
+ generic testing code to access the device via higher-level
+ calls like <TT
+CLASS="FUNCTION"
+>open</TT
+> and <TT
+CLASS="FUNCTION"
+>read</TT
+>.
+ </P
+></DD
+><DT
+><TT
+CLASS="STRUCTFIELD"
+><I
+>min_size</I
+></TT
+></DT
+><DD
+><P
+> This indicates the smallest transfer size that the hardware can
+ support on this endpoint. Typically this will be one.
+ </P
+><DIV
+CLASS="NOTE"
+><BLOCKQUOTE
+CLASS="NOTE"
+><P
+><B
+>Note: </B
+> Strictly speaking a minimum size of one is not quite right since it
+ is valid for a USB transfer to involve zero bytes, in other words a
+ transfer that involves just headers and acknowledgements and an
+ empty data phase, and that should be tested as well. However current
+ device drivers interpret a transfer size of 0 as special, so that
+ would have to be resolved first.
+ </P
+></BLOCKQUOTE
+></DIV
+></DD
+><DT
+><TT
+CLASS="STRUCTFIELD"
+><I
+>max_size</I
+></TT
+></DT
+><DD
+><P
+> Similarly, this specifies the largest transfer size. For control
+ endpoints the USB protocol uses only two bytes to hold the transfer
+ length, so there is an upper bound of 65535 bytes. In practice
+ it is very unlikely that any control transfers would ever need to
+ be this large, and in fact such transfers would take a long time
+ and probably violate timing constraints. For other types of endpoint
+ any of the protocol, the hardware, or the device driver may impose
+ size limits. For example a given device driver might be unable to
+ cope with transfers larger than 65535 bytes. If it should be
+ possible to transfer arbitrary amounts of data then a value of
+ <TT
+CLASS="LITERAL"
+>-1</TT
+> indicates no upper limit, and transfer
+ sizes will be limited by available memory and by the capabilities
+ of the host machine.
+ </P
+></DD
+><DT
+><TT
+CLASS="STRUCTFIELD"
+><I
+>max_in_padding</I
+></TT
+></DT
+><DD
+><P
+> This field is needed on some hardware where it is impossible to
+ send packets of a certain size. For example the hardware may be
+ incapable of sending an empty bulk packet to terminate a transfer
+ that is an exact multiple of the 64-byte bulk packet size.
+ Instead the driver has to do some padding and send an extra byte,
+ and the host has to be prepared to receive this extra byte. Such a
+ driver should specify a value of <TT
+CLASS="LITERAL"
+>1</TT
+> for the
+ padding field. For most drivers this field should be set to
+ <TT
+CLASS="LITERAL"
+>0</TT
+>.
+ </P
+><P
+> A better solution would be for the device driver to supply a
+ fragment of Tcl code that would adjust the receive buffer size
+ only when necessary, rather than for every transfer. Forcing
+ receive padding on all transfers when only certain transfers
+ will actually be padded reduces the accuracy of certain tests.
+ </P
+></DD
+><DT
+><TT
+CLASS="STRUCTFIELD"
+><I
+>alignment</I
+></TT
+></DT
+><DD
+><P
+> On some hardware data transfers may need to be aligned to certain
+ boundaries, for example a word boundary or a cacheline boundary.
+ Although in theory device drivers could hide such alignment
+ restrictions from higher-level code by having their own buffers and
+ performing appropriate copying, that would be expensive in terms of
+ both memory and cpu cycles. Instead the generic testing code will
+ align any buffers passed to the device driver to the specified
+ boundary. For example, if the driver requires that buffers be
+ aligned to a word boundary then it should specify an alignment
+ value of 4.
+ </P
+></DD
+></DL
+></DIV
+><P
+>The device driver should provide an array of these structures
+<TT
+CLASS="VARNAME"
+>usbs_testing_endpoints[]</TT
+>. The USB testing code
+examines this array and uses the information to perform appropriate
+tests. Because different USB devices support different numbers of
+endpoints the number of entries in the array is not known in advance,
+so instead the testing code looks for a special terminator
+<TT
+CLASS="VARNAME"
+>USBS_TESTING_ENDPOINTS_TERMINATOR</TT
+>. An example
+array, showing just the control endpoint and the terminator, might
+look like this:</P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>usbs_testing_endpoint usbs_testing_endpoints[] = {
+ {
+ endpoint_type : USB_ENDPOINT_DESCRIPTOR_ATTR_CONTROL,
+ endpoint_number : 0,
+ endpoint_direction : USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN,
+ endpoint : (void*) &amp;ep0.common,
+ devtab_entry : (const char*) 0,
+ min_size : 1,
+ max_size : 0x0FFFF,
+ max_in_padding : 0,
+ alignment : 0
+ },
+ &#8230;,
+ USBS_TESTING_ENDPOINTS_TERMINATOR
+};</PRE
+></TD
+></TR
+></TABLE
+><DIV
+CLASS="NOTE"
+><BLOCKQUOTE
+CLASS="NOTE"
+><P
+><B
+>Note: </B
+>The use of a single array <TT
+CLASS="VARNAME"
+>usbs_testing_endpoints</TT
+>
+limits USB testing to platforms with a single USB device: if there
+were multiple devices, each defining their own instance of this array,
+then there would a collision at link time. In practice this should not
+be a major problem since typical USB peripherals only interact with a
+single host machine via a single slave port. In addition, even if a
+peripheral did have multiple slave ports the current USB testing code
+would not support this since it would not know which port to use.</P
+></BLOCKQUOTE
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="usbs-data.html"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="io-usb-slave.html"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="usbs-testing.html"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Data Endpoints</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+>&nbsp;</TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Testing</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+> \ No newline at end of file
diff --git a/cesar/ecos/packages/io/usb/slave/current/doc/usbs.sgml b/cesar/ecos/packages/io/usb/slave/current/doc/usbs.sgml
new file mode 100644
index 0000000000..7ec8e22164
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/doc/usbs.sgml
@@ -0,0 +1,3540 @@
+<!-- DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook V3.1//EN" -->
+
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- usbs.sgml -->
+<!-- -->
+<!-- Generic USB-slave documentation. -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- Author(s): bartv -->
+<!-- Contact(s): bartv -->
+<!-- Date: 2001/01/03 -->
+<!-- Version: 0.01 -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part id="io-usb-slave">
+<!-- reference id="io-usb-slave" -->
+ <title>eCos USB Slave Support</title>
+
+<!-- {{{ Intro -->
+
+<refentry id="usbs-intro">
+<refmeta>
+<refentrytitle>Introduction</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>Introduction</refname>
+<refpurpose>eCos support for USB slave devices</refpurpose>
+</refnamediv>
+
+<refsect1><title>Introduction</title>
+<para>
+The eCos USB slave support allows developers to produce USB
+peripherals. It consists of a number of different eCos packages:
+</para>
+<orderedlist>
+
+<listitem>
+<para>
+Device drivers for specific implementations of USB slave hardware, for
+example the on-chip USB Device Controller provided by the Intel SA1110
+processor. A typical USB peripheral will only provide one USB slave
+port and therefore only one such device driver package will be needed.
+Usually the device driver package will be loaded automatically when
+you create an eCos configuration for target hardware that has a USB
+slave device. If you select a target which does have a USB slave
+device but no USB device driver is loaded, this implies that no such
+device driver is currently available.
+</para>
+</listitem>
+
+<listitem>
+<para>
+The common USB slave package. This serves two purposes. It defines the
+API that specific device drivers should implement. It also provides
+various utilities that will be needed by most USB device drivers and
+applications, such as handlers for standard control messages.
+Usually this package will be loaded automatically at the same time as
+the USB device driver.
+</para>
+</listitem>
+
+<listitem>
+<para>
+The common USB package. This merely provides some information common
+to both the host and slave sides of USB, such as details of the
+control protocol. It is also used to place the other USB-related
+packages appropriately in the overall configuration hierarchy. Usually
+this package will be loaded at the same time as the USB device driver.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Class-specific USB support packages. These make it easier to develop
+specific classes of USB peripheral, such as a USB-ethernet device. If
+no suitable package is available for a given class of peripheral then
+the USB device driver can instead be accessed directly from
+application code. Such packages will never be loaded automatically
+since the configuration system has no way of knowing what class of USB
+peripheral is being developed. Instead developers have to add the
+appropriate package or packages explicitly.
+</para>
+</listitem>
+
+</orderedlist>
+
+<para>
+These packages only provide support for developing USB peripherals,
+not USB hosts.
+</para>
+</refsect1>
+
+<refsect1><title>USB Concepts</title>
+<para>
+Information about USB can be obtained from a number of sources
+including the <ulink url="http://www.usb.org/">USB Implementers Forum
+web site</ulink>. Only a brief summary is provided here.
+</para>
+<para>
+A USB network is asymmetrical: it consists of a single host, one or
+more slave devices, and possibly some number of intermediate hubs. The
+host side is significantly more complicated than the slave side.
+Essentially, all operations are initiated by the host. For example, if
+the host needs to receive some data from a particular USB peripheral
+then it will send an IN token to that peripheral; the latter should
+respond with either a NAK or with appropriate data. Similarly, when
+the host wants to transmit data to a peripheral it will send an OUT
+token followed by the data; the peripheral will return a NAK if it is
+currently unable to receive more data or if there was corruption,
+otherwise it will return an ACK. All transfers are check-summed and
+there is a clearly-defined error recovery process. USB peripherals can
+only interact with the host, not with each other.
+</para>
+<para>
+USB supports four different types of communication: control messages,
+interrupt transfers, isochronous transfers, and bulk transfers.
+Control messages are further subdivided into four categories:
+standard, class, vendor and a reserved category. All USB peripherals
+must respond to certain standard control messages, and usually this
+will be handled by the common USB slave package (for complicated
+peripherals, application support will be needed). Class and vendor
+control messages may be handled by an class-specific USB support
+package, for example the USB-ethernet package will handle control
+messages such as getting the MAC address or enabling/disabling
+promiscuous mode. Alternatively, some or all of these messages will
+have to be handled by application code.
+</para>
+<para>
+Interrupt transfers are used for devices which need to be polled
+regularly. For example, a USB keyboard might be polled once every
+millisecond. The host will not poll the device more frequently than
+this, so interrupt transfers are best suited to peripherals that
+involve a relatively small amount of data. Isochronous transfers are
+intended for multimedia-related peripherals where typically a large
+amount of video or audio data needs to be exchanged continuously.
+Given appropriate host support a USB peripheral can reserve some of
+the available bandwidth. Isochronous transfers are not reliable; if a
+particular packet is corrupted then it will just be discarded and
+software is expected to recover from this. Bulk transfers are used for
+everything else: after taking care of any pending control, isochronous
+and interrupt transfers the host will use whatever bandwidth remains
+for bulk transfers. Bulk transfers are reliable.
+</para>
+<para>
+Transfers are organized into USB packets, with the details depending
+on the transfer type. Control messages always involve an initial
+8-byte packet from host to peripheral, optionally followed by some
+additional packets; in theory these additional packets can be up to 64
+bytes, but hardware may limit it to 8 bytes. Interrupt transfers
+involve a single packet of up to 64 bytes. Isochronous transfers
+involve a single packet of up to 1024 bytes. Bulk transfers involve
+multiple packets. There will be some number, possibly zero, of 64-byte
+packets. The transfer is terminated by a single packet of less than 64
+bytes. If the transfer involves an exact multiple of 64 bytes than the
+final packet will be 0 bytes, consisting of just a header and checksum
+which typically will be generated by the hardware. There is no
+pre-defined limit on the size of a bulk transfer. Instead higher-level
+protocols are expected to handle this, so for a USB-ethernet
+peripheral the protocol could impose a limit of 1514 bytes of data
+plus maybe some additional protocol overhead.
+</para>
+<para>
+Transfers from the host to a peripheral are addressed not just to that
+peripheral but to a specific endpoint within that peripheral.
+Similarly, the host requests incoming data from a specific endpoint
+rather than from the peripheral as a whole. For example, a combined
+keyboard/touchpad device could provide the keyboard events on endpoint
+1 and the mouse events on endpoint 2. A given USB peripheral can have
+up to 16 endpoints for incoming data and another 16 for outgoing data.
+However, given the comparatively high speed of USB I/O this endpoint
+addressing is typically implemented in hardware rather than software,
+and the hardware will only implement a small number of endpoints.
+Endpoint 0 is generally used only for control messages.
+</para>
+<para>
+In practice, many of these details are irrelevant to application code
+or to class packages. Instead, such higher-level code usually just
+performs blocking <function>read</function> and
+<function>write</function>, or non-blocking USB-specific calls, to
+transfer data between host and target via a specific endpoint. Control
+messages are more complicated but are usually handled by existing
+code.
+</para>
+<para>
+When a USB peripheral is plugged into the host there is an initial
+enumeration and configuration process. The peripheral provides
+information such as its class of device (audio, video, etc.), a
+vendor id, which endpoints should be used for what kind of data, and
+so on. The host OS uses this information to identify a suitable host
+device driver. This could be a generic driver for a class of
+peripherals, or it could be a vendor-specific driver. Assuming a
+suitable driver is installed the host will then activate the USB
+peripheral and perform additional application-specific initialisation.
+For example for a USB-ethernet device this would involve obtaining an
+ethernet MAC address. Most USB peripherals will be fairly simple, but
+it is possible to build multifunction peripherals with multiple
+configurations, interfaces, and alternate interface settings.
+</para>
+<para>
+It is not possible for any of the eCos packages to generate all the
+enumeration data automatically. Some of the required information such
+as the vendor id cannot be supplied by generic packages; only by the
+application developer. Class support code such as the USB-ethernet
+package could in theory supply some of the information automatically,
+but there are also hardware dependencies such as which endpoints get
+used for incoming and outgoing ethernet frames. Instead it is the
+responsibility of the application developer to provide all the
+enumeration data and perform some additional initialisation. In
+addition, the common USB slave package can handle all the standard
+control messages for a simple USB peripheral, but for something like a
+multifunction peripheral additional application support is needed.
+</para>
+
+<note><para>
+The initial implementation of the eCos USB slave packages involved
+hardware that only supported control and bulk transfers, not
+isochronous or interrupt. There may be future changes to the USB
+code and API to allow for isochronous and interrupt transfers,
+especially the former. Other changes may be required to support
+different USB devices. At present there is no support for USB remote
+wakeups, since again it is not supported by the hardware.
+</para></note>
+
+</refsect1>
+
+<refsect1><title>eCos USB I/O Facilities</title>
+<para>
+For protocols other than control messages, eCos provides two ways of
+performing USB I/O. The first involves device table or devtab entries such
+as <link linkend="usbs-devtab"><literal>/dev/usb1r</literal></link>,
+with one entry per endpoint per USB device. It is possible to
+<function>open</function> these devices and use conventional blocking
+I/O functions such as <function>read</function> and
+<function>write</function> to exchange data between host and
+peripheral.
+</para>
+<para>
+There is also a lower-level USB-specific API, consisting of functions
+such as <link
+linkend="usbs-start-rx"><function>usbs_start_rx_buffer</function></link>.
+A USB device driver will supply a data structure for each endpoint,
+for example a <link
+linkend="usbs-data"><structname>usbs_rx_endpoint</structname></link>
+structure for every receive endpoint. The first argument to
+<function>usbs_start_rx_buffer</function> should be a pointer to such
+a data structure. The USB-specific API is non-blocking: the initial
+call merely starts the transfer; some time later, once the transfer
+has completed or has been aborted, the device driver will invoke a
+completion function.
+</para>
+<para>
+Control messages are different. With four different categories of
+control messages including application and vendor specific ones, the
+conventional
+<function>open</function>/<function>read</function>/<function>write</function>
+model of I/O cannot easily be applied. Instead, a USB device driver
+will supply a <link
+linkend="usbs-control"><structname>usbs_control_endpoint</structname></link>
+data structure which can be manipulated appropriately. In practice the
+standard control messages will usually be handled by the common USB
+slave package, and other control messages will be handled by
+class-specific code such as the USB-ethernet package. Typically,
+application code remains responsible for supplying the <link
+linkend="usbs-enum">enumeration data</link> and for actually <link
+linkend="usbs-start">starting</link> up the USB device.
+</para>
+</refsect1>
+
+<refsect1><title>Enabling the USB code</title>
+<para>
+If the target hardware contains a USB slave device then the
+appropriate USB device driver and the common packages will typically
+be loaded into the configuration automatically when that target is
+selected (assuming a suitable device driver exists). However, the
+driver will not necessarily be active. For example a processor might
+have an on-chip USB device, but not all applications using that
+processor will want to use USB functionality. Hence by default the USB
+device is disabled, ensuring that applications do not suffer any
+memory or other penalties for functionality that is not required.
+</para>
+<para>
+If the application developer explicitly adds a class support package
+such as the USB-ethernet one then this implies that the USB device is
+actually needed, and the device will be enabled automatically.
+However, if no suitable class package is available and the USB device
+will instead be accessed by application code, it is necessary to
+enable the USB device manually. Usually the easiest way to do this is
+to enable the configuration option
+<literal>CYGGLO_IO_USB_SLAVE_APPLICATION</literal>, and the USB device
+driver and related packages will adjust accordingly. Alternatively,
+the device driver may provide some configuration options to provide
+more fine-grained control.
+</para>
+</refsect1>
+
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ Enumeration Data -->
+
+<refentry id="usbs-enum">
+<refmeta>
+<refentrytitle>USB Enumeration Data</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>Enumeration Data</refname>
+<refpurpose>The USB enumeration data structures</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<synopsis>
+#include &lt;cyg/io/usb/usb.h&gt;
+#include &lt;cyg/io/usb/usbs.h&gt;
+
+typedef struct usb_device_descriptor {
+ &hellip;
+} usb_device_descriptor __attribute__((packed));
+
+typedef struct usb_configuration_descriptor {
+ &hellip;
+} usb_configuration_descriptor __attribute__((packed));
+
+typedef struct usb_interface_descriptor {
+ &hellip;
+} usb_interface_descriptor __attribute__((packed));
+
+typedef struct usb_endpoint_descriptor {
+ &hellip;
+} usb_endpoint_descriptor;
+
+typedef struct usbs_enumeration_data {
+ usb_device_descriptor device;
+ int total_number_interfaces;
+ int total_number_endpoints;
+ int total_number_strings;
+ const usb_configuration_descriptor* configurations;
+ const usb_interface_descriptor* interfaces;
+ const usb_endpoint_descriptor* endpoints;
+ const unsigned char** strings;
+} usbs_enumeration_data;
+</synopsis>
+</refsynopsisdiv>
+
+<refsect1><title>USB Enumeration Data</title>
+<para>
+When a USB host detects that a peripheral has been plugged in or
+powered up, one of the first steps is to ask the peripheral to
+describe itself by supplying enumeration data. Some of this data
+depends on the class of peripheral. Other fields are vendor-specific.
+There is also a dependency on the hardware, specifically which
+endpoints are available should be used. In general it is not possible
+for generic code to provide this information, so it is the
+responsibility of application code to provide a suitable
+<structname>usbs_enumeration_data</structname> data structure and
+install it in the endpoint 0 data structure during initialization.
+This must happen before the USB device is enabled by a call to
+<function>usbs_start</function>, for example:
+</para>
+<programlisting width=72>
+const usbs_enumeration_data usb_enum_data = {
+ &hellip;
+};
+
+int
+main(int argc, char** argv)
+{
+ usbs_sa11x0_ep0.enumeration_data = &amp;usb_enum_data;
+ &hellip;
+ usbs_start(&amp;usbs_sa11x0_ep0);
+ &hellip;
+}
+</programlisting>
+<para>
+For most applications the enumeration data will be static, although
+the <structname>usbs_enumeration_data</structname> structure can be
+filled in at run-time if necessary. Full details of the enumeration
+data can be found in the Universal Serial Bus specification obtainable
+from the <ulink url="http://www.usb.org/">USB Implementers Forum web
+site</ulink>, although the meaning of most fields is fairly obvious.
+The various data structures and utility macros are defined in the
+header files <filename class="headerfile">cyg/io/usb/usb.h</filename>
+and <filename class="headerfile">cyg/io/usb/usbs.h</filename>. Note
+that the example code below makes use of the gcc labelled element
+extension.
+</para>
+
+<refsect2><title><structname>usb_device_descriptor</structname></title>
+<para>
+The main information about a USB peripheral comes from a single
+<structname>usb_device_descriptor</structname> structure, which is
+embedded in the <structname>usbs_enumeration_data</structname>
+structure. A typical example might look like this:
+</para>
+<programlisting width=72>
+const usbs_enumeration_data usb_enum_data = {
+ {
+ length: USB_DEVICE_DESCRIPTOR_LENGTH,
+ type: USB_DEVICE_DESCRIPTOR_TYPE,
+ usb_spec_lo: USB_DEVICE_DESCRIPTOR_USB11_LO,
+ usb_spec_hi: USB_DEVICE_DESCRIPTOR_USB11_HI,
+ device_class: USB_DEVICE_DESCRIPTOR_CLASS_VENDOR,
+ device_subclass: USB_DEVICE_DESCRIPTOR_SUBCLASS_VENDOR,
+ device_protocol: USB_DEVICE_DESCRIPTOR_PROTOCOL_VENDOR,
+ max_packet_size: 8,
+ vendor_lo: 0x42,
+ vendor_hi: 0x42,
+ product_lo: 0x42,
+ product_hi: 0x42,
+ device_lo: 0x00,
+ device_hi: 0x01,
+ manufacturer_str: 1,
+ product_str: 2,
+ serial_number_str: 0,
+ number_configurations: 1
+ },
+ &hellip;
+};
+</programlisting>
+<para>
+The length and type fields are specified by the USB standard. The
+<structfield>usb_spec_lo</structfield> and
+<structfield>usb_spec_hi</structfield> fields identify the particular
+revision of the standard that the peripheral implements, for example
+revision 1.1.
+</para>
+<para>
+The device class, subclass, and protocol fields are used by generic
+host-side USB software to determine which host-side device driver
+should be loaded to interact with the peripheral. A number of standard
+classes are defined, for example mass-storage devices and
+human-interface devices. If a peripheral implements one of the
+standard classes then a standard existing host-side device driver may
+exist, eliminating the need to write a custom driver. The value
+<literal>0xFF</literal> (<literal>VENDOR</literal>) is reserved for
+peripherals that implement a vendor-specific protocol rather than a
+standard one. Such peripherals will require a custom host-side device
+driver. The value <literal>0x00</literal>
+(<literal>INTERFACE</literal>) is reserved and indicates that the
+protocol used by the peripheral is defined at the interface level
+rather than for the peripheral as a whole.
+</para>
+<para>
+The <structfield>max_package_size</structfield> field specifies the
+maximum length of a control message. There is a lower bound of eight
+bytes, and typical hardware will not support anything larger because
+control messages are usually small and not performance-critical.
+</para>
+<para>
+The <structfield>vendor_lo</structfield> and
+<structfield>vendor_hi</structfield> fields specify a vendor id, which
+must be obtained from the USB Implementor's Forum. The numbers used in
+the code fragment above are examples only and must not be used in real
+USB peripherals. The product identifier is determined by the vendor,
+and different USB peripherals should use different identifiers. The
+device identifier field should indicate a release number in
+binary-coded decimal.
+</para>
+<para>
+The above fields are all numerical in nature. A USB peripheral can
+also provide a number of strings as described <link
+linkend="usbs-enum-strings">below</link>, for example the name of the
+vendor can be provided. The various <structfield>_str</structfield>
+fields act as indices into an array of strings, with index 0
+indicating that no string is available.
+</para>
+<para>
+A typical USB peripheral involves just a single configuration. However
+more complicated peripherals can support multiple configurations. Only
+one configuration will be active at any one time, and the host will
+switch between them as appropriate. If a peripheral does involve
+multiple configurations then typically it will be the responsibility
+of application code to <link
+linkend="usbs-control-standard">handle</link> the standard
+set-configuration control message.
+</para>
+</refsect2>
+
+<refsect2><title><structname>usb_configuration_descriptor</structname></title>
+<para>
+A USB peripheral involves at least one and possible several different
+configurations. The <structname>usbs_enumeration_data</structname>
+structure requires a pointer to an array, possibly of length 1, of
+<structname>usb_configuration_descriptor</structname> structures.
+Usually a single structure suffices:
+</para>
+<programlisting width=72>
+const usb_configuration_descriptor usb_configuration = {
+ length: USB_CONFIGURATION_DESCRIPTOR_LENGTH,
+ type: USB_CONFIGURATION_DESCRIPTOR_TYPE,
+ total_length_lo: USB_CONFIGURATION_DESCRIPTOR_TOTAL_LENGTH_LO(1, 2),
+ total_length_hi: USB_CONFIGURATION_DESCRIPTOR_TOTAL_LENGTH_HI(1, 2),
+ number_interfaces: 1,
+ configuration_id: 1,
+ configuration_str: 0,
+ attributes: USB_CONFIGURATION_DESCRIPTOR_ATTR_REQUIRED |
+ USB_CONFIGURATION_DESCRIPTOR_ATTR_SELF_POWERED,
+ max_power: 50
+};
+
+const usbs_enumeration_data usb_enum_data = {
+ &hellip;
+ configurations: &amp;usb_configuration,
+ &hellip;
+};
+</programlisting>
+<para>
+The values for the <structfield>length</structfield> and
+<structfield>type</structfield> fields are determined by the standard.
+The <structfield>total_length</structfield> field depends on the
+number of interfaces and endpoints used by this configuration, and
+convenience macros are provided to calculate this: the first argument
+to the macros specify the number of interfaces, the second the number
+of endpoints. The <structfield>number_interfaces</structfield> field
+is self-explanatory. If the peripheral involves multiple
+configurations then each one must have a unique id, and this will be
+used in the set-configuration control message. The id
+<literal>0</literal> is reserved, and a set-configuration control
+message that uses this id indicates that the peripheral should be
+inactive. Configurations can have a string description if required.
+The <structfield>attributes</structfield> field must have the
+<literal>REQUIRED</literal> bit set; the
+<literal>SELF_POWERED</literal> bit informs the host that the
+peripheral has its own power supply and will not draw any power over
+the bus, leaving more bus power available to other peripherals; the
+<literal>REMOTE_WAKEUP</literal> bit is used if the peripheral can
+interrupt the host when the latter is in power-saving mode. For
+peripherals that are not self-powered, the
+<structfield>max_power</structfield> field specifies the power
+requirements in units of 2mA.
+</para>
+</refsect2>
+
+<refsect2><title><structname>usb_interface_descriptor</structname></title>
+<para>
+A USB configuration involves one or more interfaces, typically
+corresponding to different streams of data. For example, one interface
+might involve video data while another interface is for audio.
+Multiple interfaces in a single configuration will be active at the
+same time.
+</para>
+<programlisting width=72>
+const usb_interface_descriptor usb_interface = {
+ length: USB_INTERFACE_DESCRIPTOR_LENGTH,
+ type: USB_INTERFACE_DESCRIPTOR_TYPE,
+ interface_id: 0,
+ alternate_setting: 0,
+ number_endpoints: 2,
+ interface_class: USB_INTERFACE_DESCRIPTOR_CLASS_VENDOR,
+ interface_subclass: USB_INTERFACE_DESCRIPTOR_SUBCLASS_VENDOR,
+ interface_protocol: USB_INTERFACE_DESCRIPTOR_PROTOCOL_VENDOR,
+ interface_str: 0
+};
+
+const usbs_enumeration_data usb_enum_data = {
+ &hellip;
+ total_number_interfaces: 1,
+ interfaces: &amp;usb_interface,
+ &hellip;
+};
+</programlisting>
+<para>
+Again, the <structfield>length</structfield> and
+<structfield>type</structfield> fields are specified by the standard.
+Each interface within a configuration requires its own id. However, a
+given interface may have several alternate settings, in other words
+entries in the interfaces array with the same id but different
+<structfield>alternate_setting</structfield> fields. For example,
+there might be one setting which requires a bandwidth of 100K/s and
+another setting that only needs 50K/s. The host can use the standard
+set-interface control message to choose the most appropriate setting.
+The handling of this request is the responsibility of higher-level
+code, so the application may have to <link
+linkend="usbs-control-standard">install</link> its own handler.
+</para>
+<para>
+The number of endpoints used by an interface is specified in the
+<structfield>number_endpoints</structfield> field. Exact details of
+which endpoints are used is held in a separate array of endpoint
+descriptors. The class, subclass and protocol fields are used by
+host-side code to determine which host-side device driver should
+handle this specific interface. Usually this is determined on a
+per-peripheral basis in the
+<structname>usb_device_descriptor</structname> structure, but that can
+defer the details to individual interfaces. A per-interface string
+is allowed as well.
+</para>
+<para>
+For USB peripherals involving multiple configurations, the array of
+<structname>usb_interface_descriptor</structname> structures should
+first contain all the interfaces for the first configuration, then all
+the interfaces for the second configuration, and so on.
+</para>
+</refsect2>
+
+<refsect2><title id="usbs-enum-endpoint"><structname>usb_endpoint_descriptor</structname></title>
+<para>
+The host also needs information about which endpoint should be used
+for what. This involves an array of endpoint descriptors:
+</para>
+<programlisting width=72>
+const usb_endpoint_descriptor usb_endpoints[] = {
+ {
+ length: USB_ENDPOINT_DESCRIPTOR_LENGTH,
+ type: USB_ENDPOINT_DESCRIPTOR_TYPE,
+ endpoint: USB_ENDPOINT_DESCRIPTOR_ENDPOINT_OUT | 1,
+ attributes: USB_ENDPOINT_DESCRIPTOR_ATTR_BULK,
+ max_packet_lo: 64,
+ max_packet_hi: 0,
+ interval: 0
+ },
+ {
+ length: USB_ENDPOINT_DESCRIPTOR_LENGTH,
+ type: USB_ENDPOINT_DESCRIPTOR_TYPE,
+ endpoint: USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN | 2,
+ attributes: USB_ENDPOINT_DESCRIPTOR_ATTR_BULK,
+ max_packet_lo: 64,
+ max_packet_hi: 0,
+ interval: 0
+ }
+};
+
+const usbs_enumeration_data usb_enum_data = {
+ &hellip;
+ total_number_endpoints: 2,
+ endpoints: usb_endpoints,
+ &hellip;
+};
+</programlisting>
+<para>
+As usual the values for the <structfield>length</structfield> and
+<structfield>type</structfield> fields are specified by the standard.
+The <structfield>endpoint</structfield> field gives both the endpoint
+number and the direction, so in the above example endpoint 1 is used
+for OUT (host to peripheral) transfers and endpoint 2 is used for IN
+(peripheral to host) transfers. The
+<structfield>attributes</structfield> field indicates the USB protocol
+that should be used on this endpoint: <literal>CONTROL</literal>,
+<literal>ISOCHRONOUS</literal>, <literal>BULK</literal> or
+<literal>INTERRUPT</literal>. The
+<structfield>max_packet</structfield> field specifies the maximum size
+of a single USB packet. For bulk transfers this will typically be 64
+bytes. For isochronous transfers this can be up to 1023 bytes. For
+interrupt transfers it can be up to 64 bytes, although usually a
+smaller value will be used. The <structfield>interval</structfield>
+field is ignored for control and bulk transfers. For isochronous
+transfers it should be set to 1. For interrupt transfers it can be a
+value between 1 and 255, and indicates the number of milliseconds
+between successive polling operations.
+</para>
+<para>
+For USB peripherals involving multiple configurations or interfaces
+the array of endpoint descriptors should be organized sequentially:
+first the endpoints corresponding to the first interface of the first
+configuration, then the second interface in that configuration, and so
+on; then all the endpoints for all the interfaces in the second
+configuration; etc.
+</para>
+</refsect2>
+
+<refsect2><title id="usbs-enum-strings">Strings</title>
+<para>
+The enumeration data can contain a number of strings with additional
+information. Unicode encoding is used for the strings, and it is
+possible for a peripheral to supply a given string in multiple
+languages using the appropriate characters. The first two bytes of
+each string give a length and type field. The first string is special;
+after the two bytes header it consists of an array of 2-byte language
+id codes, indicating the supported languages. The language code
+0x0409 corresponds to English (United States).
+</para>
+<programlisting width=72>
+const unsigned char* usb_strings[] = {
+ "\004\003\011\004",
+ "\020\003R\000e\000d\000 \000H\000a\000t\000"
+};
+
+const usbs_enumeration_data usb_enum_data = {
+ &hellip;
+ total_number_strings: 2,
+ strings: usb_strings,
+ &hellip;
+};
+</programlisting>
+<para>
+The default handler for standard control messages assumes that the
+peripheral only uses a single language. If this is not the case then
+higher-level code will have to handle the standard get-descriptor
+control messages when a string descriptor is requested.
+</para>
+</refsect2>
+
+<refsect2><title><structname>usbs_enumeration_data</structname></title>
+<para>
+The <structname>usbs_enumeration_data</structname> data structure
+collects together all the various descriptors that make up the
+enumeration data. It is the responsibility of application code to
+supply a suitable data structure and install it in the control
+endpoints's <structfield>enumeration_data</structfield> field before
+the USB device is started.
+</para>
+</refsect2>
+
+</refsect1>
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ usbs_start() -->
+
+<refentry id="usbs-start">
+<refmeta>
+<refentrytitle>Starting up a USB Device</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname><function>usbs_start</function></refname>
+<refpurpose>Starting up a USB Device</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;cyg/io/usb/usbs.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>void <function>usbs_start</function></funcdef>
+<paramdef>usbs_control_endpoint* <parameter>ep0</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+<para>
+Initializing a USB device requires some support from higher-level
+code, typically the application, in the form of enumeration data.
+Hence it is not possible for the low-level USB driver to activate a
+USB device itself. Instead the higher-level code has to take care of
+this by invoking <function>usbs_start</function>. This function takes
+a pointer to a USB control endpoint data structure. USB device drivers
+should provide exactly one such data structure for every USB device,
+so the pointer uniquely identifies the device.
+</para>
+<programlisting width=72>
+const usbs_enumeration_data usb_enum_data = {
+ &hellip;
+};
+
+int
+main(int argc, char** argv)
+{
+ usbs_sa11x0_ep0.enumeration_data = &amp;usb_enum_data;
+ &hellip;
+ usbs_start(&amp;usbs_sa11x0_ep0);
+ &hellip;
+}
+</programlisting>
+<para>
+The exact behaviour of <function>usbs_start</function> depends on the
+USB hardware and the device driver. A typical implementation would
+change the USB data pins from tristated to active. If the peripheral
+is already plugged into a host then the latter should detect this
+change and start interacting with the peripheral, including requesting
+the enumeration data. Some of this may happen before
+<function>usbs_start</function> returns, but given that multiple
+interactions between USB host and peripheral are required it is likely
+that the function will return before the peripheral is fully
+configured. Control endpoints provide a <link
+linkend="usbs-control-state">mechanism</link> for informing
+higher-level code of USB state changes.
+<function>usbs_start</function> will return even if the peripheral is
+not currently connected to a host: it will not block until the
+connection is established.
+</para>
+<para>
+<function>usbs_start</function> should only be called once for a given
+USB device. There are no defined error conditions. Note that the
+function affects the entire USB device and not just the control
+endpoint: there is no need to start any data endpoints as well.
+</para>
+</refsect1>
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ Devtab Entries -->
+
+<refentry id="usbs-devtab">
+<refmeta>
+<refentrytitle>Devtab Entries</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>Devtab Entries</refname>
+<refpurpose>Data endpoint data structure</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<synopsis>
+/dev/usb0c
+/dev/usb1r
+/dev/usb2w
+</synopsis>
+</refsynopsisdiv>
+
+<refsect1><title>Devtab Entries</title>
+<para>
+USB device drivers provide two ways of transferring data between host
+and peripheral. The first involves USB-specific functionality such as
+<link
+linkend="usbs-start-rx"><function>usbs_start_rx_buffer</function></link>.
+This provides non-blocking I/O: a transfer is started, and some time
+later the device driver will call a supplied completion function. The
+second uses the conventional I/O model: there are entries in the
+device table corresponding to the various endpoints. Standard calls
+such as <function>open</function> can then be used to get a suitable
+handle. Actual I/O happens via blocking <function>read</function> and
+<function>write</function> calls. In practice the blocking operations
+are simply implemented using the underlying non-blocking
+functionality.
+</para>
+<para>
+Each endpoint will have its own devtab entry. The exact names are
+controlled by the device driver package, but typically the root will
+be <literal>/dev/usb</literal>. This is followed by one or more
+decimal digits giving the endpoint number, followed by
+<literal>c</literal> for a control endpoint, <literal>r</literal> for
+a receive endpoint (host to peripheral), and <literal>w</literal> for
+a transmit endpoint (peripheral to host). If the target hardware
+involves more than one USB device then different roots should be used,
+for example <literal>/dev/usb0c</literal> and
+<literal>/dev/usb1_0c</literal>. This may require explicit
+manipulation of device driver configuration options by the application
+developer.
+</para>
+<para>
+At present the devtab entry for a control endpoint does not support
+any I/O operations.
+</para>
+
+<refsect2><title><function>write</function> operations</title>
+<para>
+<function>cyg_io_write</function> and similar functions in
+higher-level packages can be used to perform a transfer from
+peripheral to host. Successive write operations will not be coalesced.
+For example, when doing a 1000 byte write to an endpoint that uses the
+bulk transfer protocol this will involve 15 full-size 64-byte packets
+and a terminating 40-byte packet. USB device drivers are not expected
+to do any locking, and if higher-level code performs multiple
+concurrent write operations on a single endpoint then the resulting
+behaviour is undefined.
+</para>
+<para>
+A USB <function>write</function> operation will never transfer less
+data than specified. It is the responsibility of higher-level code to
+ensure that the amount of data being transferred is acceptable to the
+host-side code. Usually this will be defined by a higher-level
+protocol. If an attempt is made to transfer more data than the host
+expects then the resulting behaviour is undefined.
+</para>
+<para>
+There are two likely error conditions. <literal>EPIPE</literal>
+indicates that the connection between host and target has been broken.
+<literal>EAGAIN</literal> indicates that the endpoint has been
+stalled, either at the request of the host or by other activity
+inside the peripheral.
+</para>
+</refsect2>
+
+<refsect2><title><function>read</function> operations</title>
+<para>
+<function>cyg_io_read</function> and similar functions in higher-level
+packages can be used to perform a transfer from host to peripheral.
+This should be a complete transfer: higher-level protocols should
+define an upper bound on the amount of data being transferred, and the
+<function>read</function> operation should involve at least this
+amount of data. The return value will indicate the actual transfer
+size, which may be less than requested.
+</para>
+<para>
+Some device drivers may support partial reads, but USB device drivers
+are not expected to perform any buffering because that involves both
+memory and code overheads. One technique that may work for bulk
+transfers is to exploit the fact that such transfers happen in 64-byte
+packets. It is possible to <function>read</function> an initial 64
+bytes, corresponding to the first packet in the transfer. These 64
+bytes can then be examined to determine the total transfer size, and
+the remaining data can be transferred in another
+<function>read</function> operation. This technique is not guaranteed
+to work with all USB hardware. Also, if the delay between accepting
+the first packet and the remainder of the transfer is excessive then
+this could cause timeout problems for the host-side software. For
+these reasons the use of partial reads should be avoided.
+</para>
+<para>
+There are two likely error conditions. <literal>EPIPE</literal>
+indicates that the connection between host and target has been broken.
+<literal>EAGAIN</literal> indicates that the endpoint has been
+stalled, either at the request of the host or by other activity
+inside the peripheral.
+</para>
+<para>
+USB device drivers are not expected to do any locking. If higher-level
+code performs multiple concurrent read operations on a single endpoint
+then the resulting behaviour is undefined.
+</para>
+</refsect2>
+
+<refsect2><title><function>select</function> operations</title>
+<para>
+Typical USB device drivers will not provide any support for
+<function>select</function>. Consider bulk transfers from the host to
+the peripheral. At the USB device driver level there is no way of
+knowing in advance how large a transfer will be, so it is not feasible
+for the device driver to buffer the entire transfer. It may be
+possible to buffer part of the transfer, for example the first 64-byte
+packet, and copy this into application space at the start of a
+<function>read</function>, but this adds code and memory overheads.
+Worse, it means that there is an unknown but potentially long delay
+between a peripheral accepting the first packet of a transfer and the
+remaining packets, which could confuse or upset the host-side
+software.
+</para>
+<para>
+With some USB hardware it may be possible for the device driver to
+detect OUT tokens from the host without actually accepting the data,
+and this would indicate that a <function>read</function> is likely to
+succeed. However, it would not be reliable since the host-side I/O
+operation could time out. A similar mechanism could be used to
+implement <function>select</function> for outgoing data, but again
+this would not be reliable.
+</para>
+<para>
+Some device drivers may provide partial support for
+<function>select</function> anyway, possibly under the control of a
+configuration option. The device driver's documentation should be
+consulted for further information. It is also worth noting that the
+USB-specific non-blocking API can often be used as an alternative to
+<function>select</function>.
+</para>
+</refsect2>
+
+<refsect2><title><function>get_config</function> and
+<function>set_config</function> operations</title>
+<para>
+There are no <function>set_config</function> or
+<function>get_config</function> (also known as
+<function>ioctl</function>) operations defined for USB devices.
+Some device drivers may provide hardware-specific facilities this way.
+</para>
+<note>
+<para>
+Currently the USB-specific functions related to <link
+linkend="usbs-halt">halted endpoints</link> cannot be accessed readily
+via devtab entries. This functionality should probably be made
+available via <function>set_config</function> and
+<function>get_config</function>. It may also prove useful to provide
+a <function>get_config</function> operation that maps from the
+devtab entries to the underlying endpoint data structures.
+</para>
+</note>
+</refsect2>
+
+<refsect2><title>Presence</title>
+<para>
+The devtab entries are optional. If the USB device is accessed
+primarily by class-specific code such as the USB-ethernet package and
+that package uses the USB-specific API directly, the devtab entries
+are redundant. Even if application code does need to access the USB
+device, the non-blocking API may be more convenient than the blocking
+I/O provided via the devtab entries. In these cases the devtab entries
+serve no useful purpose, but they still impose a memory overhead. It
+is possible to suppress the presence of these entries by disabling the
+configuration option
+<literal>CYGGLO_IO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES</literal>.
+</para>
+</refsect2>
+</refsect1>
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ usbs_start_rx_buffer() -->
+
+<refentry id="usbs-start-rx">
+<refmeta>
+<refentrytitle>Receiving Data from the Host</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname><function>usbs_start_rx_buffer</function></refname>
+<refpurpose>Receiving Data from the Host</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;cyg/io/usb/usbs.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>void <function>usbs_start_rx_buffer</function></funcdef>
+<paramdef>usbs_rx_endpoint* <parameter>ep</parameter></paramdef>
+<paramdef>unsigned char* <parameter>buffer</parameter></paramdef>
+<paramdef>int <parameter>length</parameter></paramdef>
+<paramdef>void (*)(void*,int) <parameter>complete_fn</parameter></paramdef>
+<paramdef>void * <parameter>complete_data</parameter></paramdef>
+</funcprototype>
+
+<funcprototype>
+<funcdef>void <function>usbs_start_rx</function></funcdef>
+<paramdef>usbs_rx_endpoint* <parameter>ep</parameter></paramdef>
+</funcprototype>
+
+</funcsynopsis>
+</refsynopsisdiv>
+
+<refsect1><title><function>Description</function></title>
+<para>
+<function>usbs_start_rx_buffer</function> is a USB-specific function
+to accept a transfer from host to peripheral. It can be used for bulk,
+interrupt or isochronous transfers, but not for control messages.
+Instead those involve manipulating the <link
+linkend="usbs-control"><structname>usbs_control_endpoint</structname></link>
+data structure directly. The function takes five arguments:
+</para>
+<orderedlist>
+<listitem>
+<para>
+The first argument identifies the specific endpoint that should be
+used. Different USB devices will support different sets of endpoints
+and the device driver will provide appropriate data structures. The
+device driver's documentation should be consulted for details of which
+endpoints are available.
+</para>
+</listitem>
+<listitem>
+<para>
+The <parameter>buffer</parameter> and <parameter>length</parameter>
+arguments control the actual transfer. USB device drivers are not
+expected to perform any buffering or to support partial transfers, so
+the length specified should correspond to the maximum transfer that is
+currently possible and the buffer should be at least this large. For
+isochronous transfers the USB specification imposes an upper bound of
+1023 bytes, and a smaller limit may be set in the <link
+linkend="usbs-enum-endpoint">enumeration data</link>. Interrupt
+transfers are similarly straightforward with an upper bound of 64
+bytes, or less as per the enumeration data. Bulk transfers are more
+complicated because they can involve multiple 64-byte packets plus a
+terminating packet of less than 64 bytes, so there is no predefined
+limit on the transfer size. Instead it is left to higher-level
+protocols to specify an appropriate upper bound.
+</para>
+<para>
+One technique that may work for bulk transfers is to exploit the fact
+that such transfers happen in 64-byte packets: it may be possible to
+receive an initial 64 bytes, corresponding to the first packet in the
+transfer; these 64 bytes can then be examined to determine the total
+transfer size, and the remaining data can be transferred in another
+receive operation. This technique is not guaranteed to work with all
+USB hardware. Also, if the delay between accepting the first packet and
+the remainder of the transfer is excessive then this could cause
+timeout problems for the host-side software. For these reasons this
+technique should be avoided.
+</para>
+</listitem>
+<listitem>
+<para>
+<function>usbs_start_rx_buffer</function> is non-blocking. It merely
+starts the receive operation, and does not wait for completion. At
+some later point the USB device driver will invoke the completion
+function parameter with two arguments: the completion data defined by
+the last parameter and a result field. A result &gt;=
+<literal>0</literal> indicates a successful transfer of that many
+bytes, which may be less than the upper bound imposed by the
+<parameter>length</parameter> argument. A result &lt;
+<literal>0</literal> indicates an error. The most likely errors are
+<literal>-EPIPE</literal> to indicate that the connection between the
+host and the target has been broken, and <literal>-EAGAIN</literal>
+for when the endpoint has been <link
+linkend="usbs-halt">halted</link>. Specific USB device drivers may
+specify additional error conditions.
+</para>
+</listitem>
+</orderedlist>
+<para>
+The normal sequence of events is that the USB device driver will
+update the appropriate hardware registers. At some point after that
+the host will attempt to send data by transmitting an OUT token
+followed by a data packet, and since a receive operation is now in
+progress the data will be accepted and ACK'd. If there were no receive
+operation then the peripheral would instead generate a NAK. The USB
+hardware will generate an interrupt once the whole packet has been
+received, and the USB device driver will service this interrupt and
+arrange for a DSR to be called. Isochronous and interrupt transfers
+involve just a single packet. However, bulk transfers may involve
+multiple packets so the device driver has to check whether the packet
+was a full 64 bytes or whether it was a terminating packet of less
+than this. When the device driver DSR detects a complete transfer it
+will inform higher-level code by invoking the supplied completion
+function.
+</para>
+<para>
+This means that the completion function will normally be invoked by a
+DSR and not in thread context - although some USB device drivers may
+have a different implementation. Therefore the completion function is
+restricted in what it can do. In particular it must not make any
+calls that will or may block such as locking a mutex or allocating
+memory. The kernel documentation should be consulted for more details
+of DSR's and interrupt handling generally.
+</para>
+<para>
+It is possible that the completion function will be invoked before
+<function>usbs_start_rx_buffer</function> returns. Such an event would
+be unusual because the transfer cannot happen until the next time the
+host tries to send data to this peripheral, but it may happen if for
+example another interrupt happens and a higher priority thread is
+scheduled to run. Also, if the endpoint is currently halted then the
+completion function will be invoked immediately with
+<literal>-EAGAIN</literal>: typically this will happen in the current
+thread rather than in a separate DSR. The completion function is
+allowed to start another transfer immediately by calling
+<function>usbs_start_rx_buffer</function> again.
+</para>
+<para>
+USB device drivers are not expected to perform any locking. It is the
+responsibility of higher-level code to ensure that there is only one
+receive operation for a given endpoint in progress at any one time. If
+there are concurrent calls to
+<function>usbs_start_rx_buffer</function> then the resulting behaviour
+is undefined. For typical USB applications this does not present any
+problems, because only one piece of code will access a given endpoint
+at any particular time.
+</para>
+<para>
+The following code fragment illustrates a very simple use of
+<function>usbs_start_rx_buffer</function> to implement a blocking
+receive, using a semaphore to synchronise between the foreground
+thread and the DSR. For a simple example like this no completion data
+is needed.
+</para>
+<programlisting width=72>
+static int error_code = 0;
+static cyg_sem_t completion_wait;
+
+static void
+completion_fn(void* data, int result)
+{
+ error_code = result;
+ cyg_semaphore_post(&amp;completion_wait);
+}
+
+int
+blocking_receive(usbs_rx_endpoint* ep, unsigned char* buf, int len)
+{
+ error_code = 0;
+ usbs_start_rx_buffer(ep, buf, len, &amp;completion_fn, NULL);
+ cyg_semaphore_wait(&amp;completion_wait);
+ return error_code;
+}
+</programlisting>
+<para>
+There is also a utility function <function>usbs_start_rx</function>. This
+can be used by code that wants to manipulate <link
+linkend="usbs-data">data endpoints</link> directly, specifically the
+<structfield>complete_fn</structfield>,
+<structfield>complete_data</structfield>,
+<structfield>buffer</structfield> and
+<structfield>buffer_size</structfield> fields.
+<function>usbs_start_tx</function> just invokes a function
+supplied by the device driver.
+</para>
+</refsect1>
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ usbs_start_tx_buffer() -->
+
+<refentry id="usbs-start-tx">
+<refmeta>
+<refentrytitle>Sending Data to the Host</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname><function>usbs_start_tx_buffer</function></refname>
+<refpurpose>Sending Data to the Host</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;cyg/io/usb/usbs.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>void <function>usbs_start_tx_buffer</function></funcdef>
+<paramdef>usbs_tx_endpoint* <parameter>ep</parameter></paramdef>
+<paramdef>const unsigned char* <parameter>buffer</parameter></paramdef>
+<paramdef>int <parameter>length</parameter></paramdef>
+<paramdef>void (*)(void*,int) <parameter>complete_fn</parameter></paramdef>
+<paramdef>void * <parameter>complete_data</parameter></paramdef>
+</funcprototype>
+
+<funcprototype>
+<funcdef>void <function>usbs_start_tx</function></funcdef>
+<paramdef>usbs_tx_endpoint* <parameter>ep</parameter></paramdef>
+</funcprototype>
+
+</funcsynopsis>
+</refsynopsisdiv>
+
+<refsect1><title><function>Description</function></title>
+<para>
+<function>usbs_start_tx_buffer</function> is a USB-specific function
+to transfer data from peripheral to host. It can be used for bulk,
+interrupt or isochronous transfers, but not for control messages;
+instead those involve manipulating the <link
+linkend="usbs-control"><structname>usbs_control_endpoint</structname></link>
+data structure directly. The function takes five arguments:
+</para>
+<orderedlist>
+<listitem>
+<para>
+The first argument identifies the specific endpoint that should be
+used. Different USB devices will support different sets of endpoints
+and the device driver will provide appropriate data structures. The
+device driver's documentation should be consulted for details of which
+endpoints are available.
+</para>
+</listitem>
+<listitem>
+<para>
+The <parameter>buffer</parameter> and <parameter>length</parameter>
+arguments control the actual transfer. USB device drivers are not
+allowed to modify the buffer during the transfer, so the data can
+reside in read-only memory. The transfer will be for all the data
+specified, and it is the responsibility of higher-level code to make
+sure that the host is expecting this amount of data. For isochronous
+transfers the USB specification imposes an upper bound of 1023 bytes,
+but a smaller limit may be set in the <link
+linkend="usbs-enum-endpoint">enumeration data</link>. Interrupt
+transfers have an upper bound of 64 bytes or less, as per the
+enumeration data. Bulk transfers are more complicated because they can
+involve multiple 64-byte packets plus a terminating packet of less
+than 64 bytes, so the basic USB specification does not impose an upper
+limit on the total transfer size. Instead it is left to higher-level
+protocols to specify an appropriate upper bound. If the peripheral
+attempts to send more data than the host is willing to accept then the
+resulting behaviour is undefined and may well depend on the specific
+host operating system being used.
+</para>
+<para>
+For bulk transfers, the USB device driver or the underlying hardware
+will automatically split the transfer up into the appropriate number
+of full-size 64-byte packets plus a single terminating packet, which
+may be 0 bytes.
+</para>
+</listitem>
+<listitem>
+<para>
+<function>usbs_start_tx_buffer</function> is non-blocking. It merely
+starts the transmit operation, and does not wait for completion. At
+some later point the USB device driver will invoke the completion
+function parameter with two arguments: the completion data defined by
+the last parameter, and a result field. This result will be either an
+error code &lt; <literal>0</literal>, or the amount of data
+transferred which should correspond to the
+<parameter>length</parameter> argument. The most likely errors are
+<literal>-EPIPE</literal> to indicate that the connection between the
+host and the target has been broken, and <literal>-EAGAIN</literal>
+for when the endpoint has been <link
+linkend="usbs-halt">halted</link>. Specific USB device drivers may
+define additional error conditions.
+</para>
+</listitem>
+</orderedlist>
+<para>
+The normal sequence of events is that the USB device driver will
+update the appropriate hardware registers. At some point after that
+the host will attempt to fetch data by transmitting an IN token. Since
+a transmit operation is now in progress the peripheral can send a
+packet of data, and the host will generate an ACK. At this point the
+USB hardware will generate an interrupt, and the device driver will
+service this interrupt and arrange for a DSR to be called. Isochronous
+and interrupt transfers involve just a single packet. However, bulk
+transfers may involve multiple packets so the device driver has to
+check whether there is more data to send and set things up for the
+next packet. When the device driver DSR detects a complete transfer it
+will inform higher-level code by invoking the supplied completion
+function.
+</para>
+<para>
+This means that the completion function will normally be invoked by a
+DSR and not in thread context - although some USB device drivers may
+have a different implementation. Therefore the completion function is
+restricted in what it can do, in particular it must not make any
+calls that will or may block such as locking a mutex or allocating
+memory. The kernel documentation should be consulted for more details
+of DSR's and interrupt handling generally.
+</para>
+<para>
+It is possible that the completion function will be invoked before
+<function>usbs_start_tx_buffer</function> returns. Such an event would
+be unusual because the transfer cannot happen until the next time the
+host tries to fetch data from this peripheral, but it may happen if,
+for example, another interrupt happens and a higher priority thread is
+scheduled to run. Also, if the endpoint is currently halted then the
+completion function will be invoked immediately with
+<literal>-EAGAIN</literal>: typically this will happen in the current
+thread rather than in a separate DSR. The completion function is
+allowed to start another transfer immediately by calling
+<function>usbs_start_tx_buffer</function> again.
+</para>
+<para>
+USB device drivers are not expected to perform any locking. It is the
+responsibility of higher-level code to ensure that there is only one
+transmit operation for a given endpoint in progress at any one time.
+If there are concurrent calls to
+<function>usbs_start_tx_buffer</function> then the resulting behaviour
+is undefined. For typical USB applications this does not present any
+problems because only piece of code will access a given endpoint at
+any particular time.
+</para>
+<para>
+The following code fragment illustrates a very simple use of
+<function>usbs_start_tx_buffer</function> to implement a blocking
+transmit, using a semaphore to synchronise between the foreground
+thread and the DSR. For a simple example like this no completion data
+is needed.
+</para>
+<programlisting width=72>
+static int error_code = 0;
+static cyg_sem_t completion_wait;
+
+static void
+completion_fn(void* data, int result)
+{
+ error_code = result;
+ cyg_semaphore_post(&amp;completion_wait);
+}
+
+int
+blocking_transmit(usbs_tx_endpoint* ep, const unsigned char* buf, int len)
+{
+ error_code = 0;
+ usbs_start_tx_buffer(ep, buf, len, &amp;completion_fn, NULL);
+ cyg_semaphore_wait(&amp;completion_wait);
+ return error_code;
+}
+</programlisting>
+<para>
+There is also a utility function <function>usbs_start</function>. This
+can be used by code that wants to manipulate <link
+linkend="usbs-data">data endpoints</link> directly, specifically the
+<structfield>complete_fn</structfield>,
+<structfield>complete_data</structfield>,
+<structfield>buffer</structfield> and
+<structfield>buffer_size</structfield> fields.
+<function>usbs_start_tx</function> just calls a function supplied by
+the device driver.
+</para>
+</refsect1>
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ Halted endpoints -->
+
+<refentry id="usbs-halt">
+<refmeta>
+<refentrytitle>Halted Endpoints</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>Halted Endpoints</refname>
+<refpurpose>Support for Halting and Halted Endpoints</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<funcsynopsis>
+
+<funcsynopsisinfo>
+#include &lt;cyg/io/usb/usbs.h&gt;
+</funcsynopsisinfo>
+
+<funcprototype>
+<funcdef>cyg_bool <function>usbs_rx_endpoint_halted</function></funcdef>
+<paramdef>usbs_rx_endpoint* <parameter>ep</parameter></paramdef>
+</funcprototype>
+<funcprototype>
+<funcdef>void <function>usbs_set_rx_endpoint_halted</function></funcdef>
+<paramdef>usbs_rx_endpoint* <parameter>ep</parameter></paramdef>
+<paramdef>cyg_bool <parameter>new_state</parameter></paramdef>
+</funcprototype>
+<funcprototype>
+<funcdef>void <function>usbs_start_rx_endpoint_wait</function></funcdef>
+<paramdef>usbs_rx_endpoint* <parameter>ep</parameter></paramdef>
+<paramdef>void (*)(void*, int) <parameter>complete_fn</parameter></paramdef>
+<paramdef>void * <parameter>complete_data</parameter></paramdef>
+</funcprototype>
+
+<funcprototype>
+<funcdef>cyg_bool
+<function>usbs_tx_endpoint_halted</function></funcdef>
+<paramdef>usbs_tx_endpoint* <parameter>ep</parameter></paramdef>
+</funcprototype>
+<funcprototype>
+<funcdef>void <function>usbs_set_tx_endpoint_halted</function></funcdef>
+<paramdef>usbs_tx_endpoint* <parameter>ep</parameter></paramdef>
+<paramdef>cyg_bool <parameter>new_state</parameter></paramdef>
+</funcprototype>
+<funcprototype>
+<funcdef>void <function>usbs_start_tx_endpoint_wait</function></funcdef>
+<paramdef>usbs_tx_endpoint* <parameter>ep</parameter></paramdef>
+<paramdef>void (*)(void*, int) <parameter>complete_fn</parameter></paramdef>
+<paramdef>void * <parameter>complete_data</parameter></paramdef>
+</funcprototype>
+
+</funcsynopsis>
+</refsynopsisdiv>
+
+<refsect1><title><function>Description</function></title>
+<para>
+Normal USB traffic involves straightforward handshakes, with either an
+<literal>ACK</literal> to indicate that a packet was transferred
+without errors, or a <literal>NAK</literal> if an error occurred, or
+if a peripheral is currently unable to process another packet from the
+host, or has no packet to send to the host. There is a third form of
+handshake, a <literal>STALL</literal>, which indicates that the
+endpoint is currently <emphasis>halted</emphasis>.
+</para>
+<para>
+When an endpoint is halted it means that the host-side code needs to
+take some sort of recovery action before communication over that
+endpoint can resume. The exact circumstances under which this can
+happen are not defined by the USB specification, but one example would
+be a protocol violation if say the peripheral attempted to transmit
+more data to the host than was permitted by the protocol in use. The
+host can use the standard control messages get-status, set-feature and
+clear-feature to examine and manipulate the halted status of a given
+endpoint. There are USB-specific functions which can be used inside
+the peripheral to achieve the same effect. Once an endpoint has been
+halted the host can then interact with the peripheral using class or
+vendor control messages to perform appropriate recovery, and then the
+halted condition can be cleared.
+</para>
+<para>
+Halting an endpoint does not constitute a device state change, and
+there is no mechanism by which higher-level code can be informed
+immediately. However, any ongoing receive or transmit operations will
+be aborted with an <literal>-EAGAIN</literal> error, and any new
+receives or transmits will fail immediately with the same error.
+</para>
+<para>
+There are six functions to support halted endpoints, one set for
+receive endpoints and another for transmit endpoints, with both sets
+behaving in essentially the same way. The first,
+<function>usbs_rx_endpoint_halted</function>, can be used to determine
+whether or not an endpoint is currently halted: it takes a single
+argument that identifies the endpoint of interest. The second
+function, <function>usbs_set_rx_endpoint_halted</function>, can be
+used to change the halted condition of an endpoint: it takes two
+arguments; one to identify the endpoint and another to specify the new
+state. The last function
+<function>usbs_start_rx_endpoint_wait</function> operates in much the
+same way as <function>usbs_start_rx_buffer</function>: when the
+endpoint is no longer halted the device driver will invoke the
+supplied completion function with a status of 0. The completion
+function has the same signature as that for a transfer operation.
+Often it will be possible to use a single completion function and have
+the foreground code invoke either
+<function>usbs_start_rx_buffer</function> or
+<function>usbs_start_rx_endpoint_wait</function> depending on the
+current state of the endpoint.
+</para>
+</refsect1>
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ Control Endpoint -->
+
+<refentry id="usbs-control">
+<refmeta>
+<refentrytitle>Control Endpoints</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>Control Endpoints</refname>
+<refpurpose>Control endpoint data structure</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<synopsis>
+#include &lt;cyg/io/usb/usbs.h&gt;
+
+typedef struct usbs_control_endpoint {
+ *hellip;
+} usbs_control_endpoint;
+</synopsis>
+</refsynopsisdiv>
+
+<refsect1><title><literal>usbs_control_endpoint</literal> Data Structure</title>
+<para>
+The device driver for a USB slave device should supply one
+<structname>usbs_control_endpoint</structname> data structure per USB
+device. This corresponds to endpoint 0 which will be used for all
+control message interaction between the host and that device. The data
+structure is also used for internal management purposes, for example
+to keep track of the current state. In a typical USB peripheral there
+will only be one such data structure in the entire system, but if
+there are multiple USB slave ports, allowing the peripheral to be
+connected to multiple hosts, then there will be a separate data
+structure for each one. The name or names of the data structures are
+determined by the device drivers. For example, the SA11x0 USB device
+driver package provides <literal>usbs_sa11x0_ep0</literal>.
+</para>
+<para>
+The operations on a control endpoint do not fit cleanly into a
+conventional open/read/write I/O model. For example, when the host
+sends a control message to the USB peripheral this may be one of four
+types: standard, class, vendor and reserved. Some or all of the
+standard control messages will be handled automatically by the common
+USB slave package or by the device driver itself. Other standard
+control messages and the other types of control messages may be
+handled by a class-specific package or by application code. Although
+it would be possible to have devtab entries such as
+<literal>/dev/usbs_ep0/standard</literal> and
+<literal>/dev/usbs_ep0/class</literal>, and then support read and
+write operations on these devtab entries, this would add significant
+overhead and code complexity. Instead, all of the fields in the
+control endpoint data structure are public and can be manipulated
+directly by higher level code if and when required.
+</para>
+<para>
+Control endpoints involve a number of callback functions, with
+higher-level code installing suitable function pointers in the control
+endpoint data structure. For example, if the peripheral involves
+vendor-specific control messages then a suitable handler for these
+messages should be installed. Although the exact details depend on the
+device driver, typically these callback functions will be invoked at
+DSR level rather than thread level. Therefore, only certain eCos
+functions can be invoked; specifically, those functions that are
+guaranteed not to block. If a potentially blocking function such as a
+semaphore wait or a mutex lock operation is invoked from inside the
+callback then the resulting behaviour is undefined, and the system as
+a whole may fail. In addition, if one of the callback functions
+involves significant processing effort then this may adversely affect
+the system's real time characteristics. The eCos kernel documentation
+should be consulted for more details of DSR handling.
+</para>
+
+<refsect2><title>Initialization</title>
+<para>
+The <structname>usbs_control_endpoint</structname> data structure
+contains the following fields related to initialization.
+</para>
+<programlisting width=72>
+typedef struct usbs_control_endpoint {
+ &hellip;
+ const usbs_enumeration_data* enumeration_data;
+ void (*start_fn)(usbs_control_endpoint*);
+ &hellip;
+};
+</programlisting>
+<para>
+It is the responsibility of higher-level code, usually the
+application, to define the USB enumeration data. This needs to be
+installed in the control endpoint data structure early on during
+system startup, before the USB device is actually started and any
+interaction with the host is possible. Details of the enumeration data
+are supplied in the section <link linkend="usbs-enum">USB Enumeration
+Data</link>. Typically, the enumeration data is constant for a given
+peripheral, although it can be constructed dynamically if necessary.
+However, the enumeration data cannot change while the peripheral is
+connected to a host: the peripheral cannot easily claim to be a
+keyboard one second and a printer the next.
+</para>
+<para>
+The <structfield>start_fn</structfield> member is normally accessed
+via the utility <link
+linkend="usbs-start"><function>usbs_start</function></link> rather
+than directly. It is provided by the device driver and should be
+invoked once the system is fully initialized and interaction with the
+host is possible. A typical implementation would change the USB data
+pins from tristated to active. If the peripheral is already plugged
+into a host then the latter should detect this change and start
+interacting with the peripheral, including requesting the enumeration
+data.
+</para>
+</refsect2>
+
+<refsect2><title id="usbs-control-state">State</title>
+<para>
+There are three <structname>usbs_control_endpoint</structname> fields
+related to the current state of a USB slave device, plus some state
+constants and an enumeration of the possible state changes:
+</para>
+<programlisting width=72>
+typedef struct usbs_control_endpoint {
+ &hellip;
+ int state;
+ void (*state_change_fn)(struct usbs_control_endpoint*, void*,
+ usbs_state_change, int);
+ void* state_change_data;
+ &hellip;
+};
+
+#define USBS_STATE_DETACHED 0x01
+#define USBS_STATE_ATTACHED 0x02
+#define USBS_STATE_POWERED 0x03
+#define USBS_STATE_DEFAULT 0x04
+#define USBS_STATE_ADDRESSED 0x05
+#define USBS_STATE_CONFIGURED 0x06
+#define USBS_STATE_MASK 0x7F
+#define USBS_STATE_SUSPENDED (1 &lt;&lt; 7)
+
+typedef enum {
+ USBS_STATE_CHANGE_DETACHED = 1,
+ USBS_STATE_CHANGE_ATTACHED = 2,
+ USBS_STATE_CHANGE_POWERED = 3,
+ USBS_STATE_CHANGE_RESET = 4,
+ USBS_STATE_CHANGE_ADDRESSED = 5,
+ USBS_STATE_CHANGE_CONFIGURED = 6,
+ USBS_STATE_CHANGE_DECONFIGURED = 7,
+ USBS_STATE_CHANGE_SUSPENDED = 8,
+ USBS_STATE_CHANGE_RESUMED = 9
+} usbs_state_change;
+</programlisting>
+<para>
+The USB standard defines a number of states for a given USB
+peripheral. The initial state is <emphasis>detached</emphasis>, where
+the peripheral is either not connected to a host at all or, from the
+host's perspective, the peripheral has not started up yet because the
+relevant pins are tristated. The peripheral then moves via
+intermediate <emphasis>attached</emphasis> and
+<emphasis>powered</emphasis> states to its default or
+<emphasis>reset</emphasis> state, at which point the host and
+peripheral can actually start exchanging data. The first message is
+from host to peripheral and provides a unique 7-bit address within the
+local USB network, resulting in a state change to
+<emphasis>addressed</emphasis>. The host then requests enumeration
+data and performs other initialization. If everything succeeds the
+host sends a standard set-configuration control message, after which
+the peripheral is <emphasis>configured</emphasis> and expected to be
+up and running. Note that some USB device drivers may be unable to
+distinguish between the <emphasis>detached</emphasis>,
+<emphasis>attached</emphasis> and <emphasis>powered</emphasis> states
+but generally this is not important to higher-level code.
+</para>
+<para>
+A USB host should generate at least one token every millisecond. If a
+peripheral fails to detect any USB traffic for a period of time then
+typically this indicates that the host has entered a power-saving
+mode, and the peripheral should do the same if possible. This
+corresponds to the <emphasis>suspended</emphasis> bit. The actual
+state is a combination of <emphasis>suspended</emphasis> and the
+previous state, for example <emphasis>configured</emphasis> and
+<emphasis>suspended</emphasis> rather than just
+<emphasis>suspended</emphasis>. When the peripheral subsequently
+detects USB traffic it would switch back to the
+<emphasis>configured</emphasis> state.
+</para>
+<para>
+The USB device driver and the common USB slave package will maintain
+the current state in the control endpoint's
+<structfield>state</structfield> field. There should be no need for
+any other code to change this field, but it can be examined whenever
+appropriate. In addition whenever a state change occurs the generic
+code can invoke a state change callback function. By default, no such
+callback function will be installed. Some class-specific packages such
+as the USB-ethernet package will install a suitable function to keep
+track of whether or not the host-peripheral connection is up, that is
+whether or not ethernet packets can be exchanged. Application code can
+also update this field. If multiple parties want to be informed of
+state changes, for example both a class-specific package and
+application code, then typically the application code will install its
+state change handler after the class-specific package and is
+responsible for chaining into the package's handler.
+</para>
+<para>
+The state change callback function is invoked with four arguments. The
+first identifies the control endpoint. The second is an arbitrary
+pointer: higher-level code can fill in the
+<structfield>state_change_data</structfield> field to set this. The
+third argument specifies the state change that has occurred, and the
+last argument supplies the previous state (the new state is readily
+available from the control endpoint structure).
+</para>
+<para>
+eCos does not provide any utility functions for updating or examining
+the <structfield>state_change_fn</structfield> or
+<structfield>state_change_data</structfield> fields. Instead, it is
+expected that the fields in the
+<structname>usbs_control_endpoint</structname> data structure will be
+manipulated directly. Any utility functions would do just this, but
+at the cost of increased code and cpu overheads.
+</para>
+</refsect2>
+
+<refsect2><title id="usbs-control-standard">Standard Control Messages</title>
+<programlisting width=88>
+typedef struct usbs_control_endpoint {
+ &hellip;
+ unsigned char control_buffer[8];
+ usbs_control_return (*standard_control_fn)(struct usbs_control_endpoint*, void*);
+ void* standard_control_data;
+ &hellip;
+} usbs_control_endpoint;
+
+typedef enum {
+ USBS_CONTROL_RETURN_HANDLED = 0,
+ USBS_CONTROL_RETURN_UNKNOWN = 1,
+ USBS_CONTROL_RETURN_STALL = 2
+} usbs_control_return;
+
+extern usbs_control_return usbs_handle_standard_control(struct usbs_control_endpoint*);
+</programlisting>
+<para>
+When a USB peripheral is connected to the host it must always respond
+to control messages sent to endpoint 0. Control messages always
+consist of an initial eight-byte header, containing fields such as a
+request type. This may be followed by a further data transfer, either
+from host to peripheral or from peripheral to host. The way this is
+handled is described in the <link
+linkend="usbs-control-buffer">Buffer Management</link> section below.
+</para>
+<para>
+The USB device driver will always accept the initial eight-byte
+header, storing it in the <structfield>control_buffer</structfield>
+field. Then it determines the request type: standard, class, vendor,
+or reserved. The way in which the last three of these are processed is
+described in the section <link linkend="usbs-control-other">Other
+Control Messages</link>. Some
+standard control messages will be handled by the device driver itself;
+typically the <emphasis>set-address</emphasis> request and the
+<emphasis>get-status</emphasis>, <emphasis>set-feature</emphasis> and
+<emphasis>clear-feature</emphasis> requests when applied to endpoints.
+</para>
+<para>
+If a standard control message cannot be handled by the device driver
+itself, the driver checks the
+<structfield>standard_control_fn</structfield> field in the control
+endpoint data structure. If higher-level code has installed a suitable
+callback function then this will be invoked with two argument, the
+control endpoint data structure itself and the
+<structfield>standard_control_data</structfield> field. The latter
+allows the higher level code to associate arbitrary data with the
+control endpoint. The callback function can return one of three
+values: <emphasis>HANDLED</emphasis> to indicate that the request has
+been processed; <emphasis>UNKNOWN</emphasis> if the message should be
+handled by the default code; or <emphasis>STALL</emphasis> to indicate
+an error condition. If higher level code has not installed a callback
+function or if the callback function has returned
+<emphasis>UNKNOWN</emphasis> then the device driver will invoke a
+default handler, <function>usbs_handle_standard_control</function>
+provided by the common USB slave package.
+</para>
+<para>
+The default handler can cope with all of the standard control messages
+for a simple USB peripheral. However, if the peripheral involves
+multiple configurations, multiple interfaces in a configuration, or
+alternate settings for an interface, then this cannot be handled by
+generic code. For example, a multimedia peripheral may support various
+alternate settings for a given data source with different bandwidth
+requirements, and the host can select a setting that takes into
+account the current load. Clearly higher-level code needs to be aware
+when the host changes the current setting, so that it can adjust the
+rate at which data is fed to or retrieved from the host. Therefore the
+higher-level code needs to install its own standard control callback
+and process appropriate messages, rather than leaving these to the
+default handler.
+</para>
+<para>
+The default handler will take care of the
+<emphasis>get-descriptor</emphasis> request used to obtain the
+enumeration data. It has support for string descriptors but ignores
+language encoding issues. If language encoding is important for the
+peripheral then this will have to be handled by an
+application-specific standard control handler.
+</para>
+<para>
+The header file <filename
+class="headerfile">&lt;cyg/io/usb/usb.h&gt;</filename> defines various
+constants related to control messages, for example the function codes
+corresponding to the standard request types. This header file is
+provided by the common USB package, not by the USB slave package,
+since the information is also relevant to USB hosts.
+</para>
+</refsect2>
+
+<refsect2><title id="usbs-control-other">Other Control Messages</title>
+<programlisting width=88>
+typedef struct usbs_control_endpoint {
+ &hellip;
+ usbs_control_return (*class_control_fn)(struct usbs_control_endpoint*, void*);
+ void* class_control_data;
+ usbs_control_return (*vendor_control_fn)(struct usbs_control_endpoint*, void*);
+ void* vendor_control_data;
+ usbs_control_return (*reserved_control_fn)(struct usbs_control_endpoint*, void*);
+ void* reserved_control_data;
+ &hellip;
+} usbs_control_endpoint;
+</programlisting>
+<para>
+Non-standard control messages always have to be processed by
+higher-level code. This could be class-specific packages. For example,
+the USB-ethernet package will handle requests for getting the MAC
+address and for enabling or disabling promiscuous mode. In all cases
+the device driver will store the initial request in the
+<structfield>control_buffer</structfield> field, check for an
+appropriate handler, and invoke it with details of the control
+endpoint and any handler-specific data that has been installed
+alongside the handler itself. The handler should return either
+<literal>USBS_CONTROL_RETURN_HANDLED</literal> to report success or
+<literal>USBS_CONTROL_RETURN_STALL</literal> to report failure. The
+device driver will report this to the host.
+</para>
+<para>
+If there are multiple parties interested in a particular type of
+control messages, it is the responsibility of application code to
+install an appropriate handler and process the requests appropriately.
+</para>
+</refsect2>
+
+<refsect2><title id="usbs-control-buffer">Buffer Management</title>
+<programlisting width=76>
+typedef struct usbs_control_endpoint {
+ &hellip;
+ unsigned char* buffer;
+ int buffer_size;
+ void (*fill_buffer_fn)(struct usbs_control_endpoint*);
+ void* fill_data;
+ int fill_index;
+ usbs_control_return (*complete_fn)(struct usbs_control_endpoint*, int);
+ &hellip;
+} usbs_control_endpoint;
+</programlisting>
+<para>
+Many USB control messages involve transferring more data than just the
+initial eight-byte header. The header indicates the direction of the
+transfer, OUT for host to peripheral or IN for peripheral to host.
+It also specifies a length field, which is exact for an OUT transfer
+or an upper bound for an IN transfer. Control message handlers can
+manipulate six fields within the control endpoint data structure to
+ensure that the transfer happens correctly.
+</para>
+<para>
+For an OUT transfer, the handler should examine the length field in
+the header and provide a single buffer for all the data. A
+class-specific protocol would typically impose an upper bound on the
+amount of data, allowing the buffer to be allocated statically.
+The handler should update the <structfield>buffer</structfield> and
+<structfield>complete_fn</structfield> fields. When all the data has
+been transferred the completion callback will be invoked, and its
+return value determines the response sent back to the host. The USB
+standard allows for a new control message to be sent before the
+current transfer has completed, effectively cancelling the current
+operation. When this happens the completion function will also be
+invoked. The second argument to the completion function specifies what
+has happened, with a value of 0 indicating success and an error code
+such as <literal>-EPIPE</literal> or <literal>-EIO</literal>
+indicating that the current transfer has been cancelled.
+</para>
+<para>
+IN transfers are a little bit more complicated. The required
+information, for example the enumeration data, may not be in a single
+contiguous buffer. Instead a mechanism is provided by which the buffer
+can be refilled, thus allowing the transfer to move from one record to
+the next. Essentially, the transfer operates as follows:
+</para>
+<orderedlist>
+<listitem>
+<para>
+When the host requests another chunk of data (typically eight bytes),
+the USB device driver will examine the
+<structfield>buffer_size</structfield> field. If non-zero then
+<structfield>buffer</structfield> contains at least one more byte of
+data, and then <structfield>buffer_size</structfield> is decremented.
+</para>
+</listitem>
+<listitem>
+<para>
+When <structfield>buffer_size</structfield> has dropped to 0, the
+<structfield>fill_buffer_fn</structfield> field will be examined. If
+non-null it will be invoked to refill the buffer.
+</para>
+</listitem>
+<listitem>
+<para>
+The <structfield>fill_data</structfield> and
+<structfield>fill_index</structfield> fields are not used by the
+device driver. Instead these fields are available to the refill
+function to keep track of the current state of the transfer.
+</para>
+</listitem>
+<listitem>
+<para>
+When <structfield>buffer_size</structfield> is 0 and
+<structfield>fill_buffer_fn</structfield> is NULL, no more data is
+available and the transfer has completed.
+</para>
+</listitem>
+<listitem>
+<para>
+Optionally a completion function can be installed. This will be
+invoked with 0 if the transfer completes successfully, or with an
+error code if the transfer is cancelled because of another control
+messsage.
+</para>
+</listitem>
+</orderedlist>
+<para>
+If the requested data is contiguous then the only fields that need
+to be manipulated are <structfield>buffer</structfield> and
+<structfield>buffer_size</structfield>, and optionally
+<structfield>complete_fn</structfield>. If the requested data is not
+contiguous then the initial control message handler should update
+<structfield>fill_buffer_fn</structfield> and some or all of the other
+fields, as required. An example of this is the handling of the
+standard <emphasis>get-descriptor</emphasis> control message by
+<function>usbs_handle_standard_control</function>.
+</para>
+</refsect2>
+
+<refsect2><title>Polling Support</title>
+<programlisting width=72>
+typedef struct usbs_control_endpoint {
+ void (*poll_fn)(struct usbs_control_endpoint*);
+ int interrupt_vector;
+ &hellip;
+} usbs_control_endpoint;
+</programlisting>
+<para>
+In nearly all circumstances USB I/O should be interrupt-driven.
+However, there are special environments such as RedBoot where polled
+operation may be appropriate. If the device driver can operate in
+polled mode then it will provide a suitable function via the
+<structfield>poll_fn</structfield> field, and higher-level code can
+invoke this regularly. This polling function will take care of all
+endpoints associated with the device, not just the control endpoint.
+If the USB hardware involves a single interrupt vector then this will
+be identified in the data structure as well.
+</para>
+</refsect2>
+
+</refsect1>
+
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ Data Endpoints -->
+
+<refentry id="usbs-data">
+<refmeta>
+<refentrytitle>Data Endpoints</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>Data Endpoints</refname>
+<refpurpose>Data endpoint data structures</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<synopsis>
+#include &lt;cyg/io/usb/usbs.h&gt;
+
+typedef struct usbs_rx_endpoint {
+ void (*start_rx_fn)(struct usbs_rx_endpoint*);
+ void (*set_halted_fn)(struct usbs_rx_endpoint*, cyg_bool);
+ void (*complete_fn)(void*, int);
+ void* complete_data;
+ unsigned char* buffer;
+ int buffer_size;
+ cyg_bool halted;
+} usbs_rx_endpoint;
+
+typedef struct usbs_tx_endpoint {
+ void (*start_tx_fn)(struct usbs_tx_endpoint*);
+ void (*set_halted_fn)(struct usbs_tx_endpoint*, cyg_bool);
+ void (*complete_fn)(void*, int);
+ void* complete_data;
+ const unsigned char* buffer;
+ int buffer_size;
+ cyg_bool halted;
+} usbs_tx_endpoint;
+</synopsis>
+</refsynopsisdiv>
+
+<refsect1><title>Receive and Transmit Data Structures</title>
+<para>
+In addition to a single <structname>usbs_control_endpoint</structname>
+data structure per USB slave device, the USB device driver should also
+provide receive and transmit data structures corresponding to the
+other endpoints. The names of these are determined by the device
+driver. For example, the SA1110 USB device driver package provides
+<literal>usbs_sa11x0_ep1</literal> for receives and
+<literal>usbs_sa11x0_ep2</literal> for transmits.
+</para>
+<para>
+Unlike control endpoints, the common USB slave package does provide a
+number of utility routines to manipulate data endpoints. For example
+<link
+linkend="usbs-start-rx"><function>usbs_start_rx_buffer</function></link>
+can be used to receive data from the host into a buffer. In addition
+the USB device driver can provide devtab entries such as
+<literal>/dev/usbs1r</literal> and <literal>/dev/usbs2w</literal>, so
+higher-level code can <function>open</function> these devices and then
+perform blocking <function>read</function> and
+<function>write</function> operations.
+</para>
+<para>
+However, the operation of data endpoints and the various
+endpoint-related functions is relatively straightforward. First
+consider a <structname>usbs_rx_endpoint</structname> structure. The
+device driver will provide the members
+<structfield>start_rx_fn</structfield> and
+<structfield>set_halted_fn</structfield>, and it will maintain the
+<structfield>halted</structfield> field. To receive data, higher-level
+code sets the <structfield>buffer</structfield>,
+<structfield>buffer_size</structfield>,
+<structfield>complete_fn</structfield> and optionally the
+<structfield>complete_data</structfield> fields. Next the
+<structfield>start_rx_fn</structfield> member should be called. When
+the transfer has finished the device driver will invoke the completion
+function, using <structfield>complete_data</structfield> as the first
+argument and a size field for the second argument. A negative size
+indicates an error of some sort: <literal>-EGAIN</literal> indicates
+that the endpoint has been halted, usually at the request of the host;
+<literal>-EPIPE</literal> indicates that the connection between the
+host and the peripheral has been broken. Certain device drivers may
+generate other error codes.
+</para>
+<para>
+If higher-level code needs to halt or unhalt an endpoint then it can
+invoke the <structfield>set_halted_fn</structfield> member. When an
+endpoint is halted, invoking <structfield>start_rx_fn</structfield>
+wit <structfield>buffer_size</structfield> set to 0 indicates that
+higher-level code wants to block until the endpoint is no longer
+halted; at that point the completion function will be invoked.
+</para>
+<para>
+USB device drivers are allowed to assume that higher-level protocols
+ensure that host and peripheral agree on the amount of data that will
+be transferred, or at least on an upper bound. Therefore there is no
+need for the device driver to maintain its own buffers, and copy
+operations are avoided. If the host sends more data than expected then
+the resulting behaviour is undefined.
+</para>
+<para>
+Transmit endpoints work in essentially the same way as receive
+endpoints. Higher-level code should set the
+<structfield>buffer</structfield> and
+<structfield>buffer_size</structfield> fields to point at the data to
+be transferred, then call <structfield>start_tx_fn</structfield>, and
+the device driver will invoked the completion function when the
+transfer has completed.
+</para>
+<para>
+USB device drivers are not expected to perform any locking. If at any
+time there are two concurrent receive operations for a given endpoint,
+or two concurrent transmit operations, then the resulting behaviour is
+undefined. It is the responsibility of higher-level code to perform
+any synchronisation that may be necessary. In practice, conflicts are
+unlikely because typically a given endpoint will only be accessed
+sequentially by just one part of the overall system.
+</para>
+
+</refsect1>
+
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ Writing a USB Device Driver -->
+
+<refentry id="usbs-writing">
+<refmeta>
+<refentrytitle>Writing a USB Device Driver</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>Writing a USB Device Driver</refname>
+<refpurpose>USB Device Driver Porting Guide</refpurpose>
+</refnamediv>
+
+<refsect1><title>Introduction</title>
+<para>
+Often the best way to write a USB device driver will be to start with
+an existing one and modify it as necessary. The information given here
+is intended primarily as an outline rather than as a complete guide.
+</para>
+<note>
+<para>
+At the time of writing only one USB device driver has been
+implemented. Hence it is possible, perhaps probable, that some
+portability issues have not yet been addressed. One issue
+involves the different types of transfer, for example the initial
+target hardware had no support for isochronous or interrupt transfers,
+so additional functionality may be needed to switch between transfer
+types. Another issue would be hardware where a given endpoint number,
+say endpoint 1, could be used for either receiving or transmitting
+data, but not both because a single fifo is used. Issues like these
+will have to be resolved as and when additional USB device drivers are
+written.
+</para>
+</note>
+</refsect1>
+
+<refsect1><title>The Control Endpoint</title>
+<para>
+A USB device driver should provide a single <link
+linkend="usbs-control"><structname>usbs_control_endpoint</structname></link>
+data structure for every USB device. Typical peripherals will have
+only one USB port so there will be just one such data structure in the
+entire system, but theoretically it is possible to have multiple USB
+devices. These may all involve the same chip, in which case a single
+device driver should support multiple device instances, or they may
+involve different chips. The name or names of these data structures
+are determined by the device driver, but appropriate care should be
+taken to avoid name clashes.
+</para>
+<para>
+A USB device cannot be used unless the control endpoint data structure
+exists. However, the presence of USB hardware in the target processor
+or board does not guarantee that the application will necessarily want
+to use that hardware. To avoid unwanted code or data overheads, the
+device driver can provide a configuration option to determine whether
+or not the endpoint 0 data structure is actually provided. A default
+value of <literal>CYGINT_IO_USB_SLAVE_CLIENTS</literal> ensures that
+the USB driver will be enabled automatically if higher-level code does
+require USB support, while leaving ultimate control to the user.
+</para>
+<para>
+The USB device driver is responsible for filling in the
+<structfield>start_fn</structfield>,
+<structfield>poll_fn</structfield> and
+<structfield>interrupt_vector</structfield> fields. Usually this can
+be achieved by static initialization. The driver is also largely
+responsible for maintaining the <structfield>state</structfield>
+field. The <structfield>control_buffer</structfield> array should be
+used to hold the first packet of a control message. The
+<structfield>buffer</structfield> and other fields related to data
+transfers will be managed <link
+linkend="usbs-control-buffer">jointly</link> by higher-level code and
+the device driver. The remaining fields are generally filled in by
+higher-level code, although the driver should initialize them to NULL
+values.
+</para>
+<para>
+Hardware permitting, the USB device should be inactive until the
+<structfield>start_fn</structfield> is invoked, for example by
+tristating the appropriate pins. This prevents the host from
+interacting with the peripheral before all other parts of the system
+have initialized. It is expected that the
+<structfield>start_fn</structfield> will only be invoked once, shortly
+after power-up.
+</para>
+<para>
+Where possible the device driver should detect state changes, such as
+when the connection between host and peripheral is established, and
+<link linkend="usbs-control-state">report</link> these to higher-level
+code via the <structfield>state_change_fn</structfield> callback, if
+any. The state change to and from configured state cannot easily be
+handled by the device driver itself, instead higher-level code such as
+the common USB slave package will take care of this.
+</para>
+<para>
+Once the connection between host and peripheral has been established,
+the peripheral must be ready to accept control messages at all times,
+and must respond to these within certain time constraints. For
+example, the standard set-address control message must be handled
+within 50ms. The USB specification provides more information on these
+constraints. The device driver is responsible for receiving the
+initial packet of a control message. This packet will always be eight
+bytes and should be stored in the
+<structfield>control_buffer</structfield> field. Certain standard
+control messages should be detected and handled by the device driver
+itself. The most important is set-address, but usually the get-status,
+set-feature and clear-feature requests when applied to halted
+endpoints should also be handled by the driver. Other standard control
+messages should first be passed on to the
+<structfield>standard_control_fn</structfield> callback (if any), and
+finally to the default handler
+<function>usbs_handle_standard_control</function> provided by the
+common USB slave package. Class, vendor and reserved control messages
+should always be dispatched to the appropriate callback and there is
+no default handler for these.
+</para>
+<para>
+Some control messages will involve further data transfer, not just the
+initial packet. The device driver must handle this in accordance with
+the USB specification and the <link
+linkend="usbs-control-buffer">buffer management strategy</link>. The
+driver is also responsible for keeping track of whether or not the
+control operation has succeeded and generating an ACK or STALL
+handshake.
+</para>
+<para>
+The polling support is optional and may not be feasible on all
+hardware. It is only used in certain specialised environments such as
+RedBoot. A typical implementation of the polling function would just
+check whether or not an interrupt would have occurred and, if so, call
+the same code that the interrupt handler would.
+</para>
+</refsect1>
+
+<refsect1><title>Data Endpoints</title>
+<para>
+In addition to the control endpoint data structure, a USB device
+driver should also provide appropriate <link linkend="usbs-data">data
+endpoint</link> data structures. Obviously this is only relevant if
+the USB support generally is desired, that is if the control endpoint is
+provided. In addition, higher-level code may not require all the
+endpoints, so it may be useful to provide configuration options that
+control the presence of each endpoint. For example, the intended
+application might only involve a single transmit endpoint and of
+course control messages, so supporting receive endpoints might waste
+memory.
+</para>
+<para>
+Conceptually, data endpoints are much simpler than the control
+endpoint. The device driver has to supply two functions, one for
+data transfers and another to control the halted condition. These
+implement the functionality for
+<link linkend="usbs-start-rx"><function>usbs_start_rx_buffer</function></link>,
+<link linkend="usbs-start-tx"><function>usbs_start_tx_buffer</function></link>,
+<link linkend="usbs-halt"><function>usbs_set_rx_endpoint_halted</function></link> and
+<link linkend="usbs-halt"><function>usbs_set_tx_endpoint_halted</function></link>.
+The device driver is also responsible for maintaining the
+<structfield>halted</structfield> status.
+</para>
+<para>
+For data transfers, higher-level code will have filled in the
+<structfield>buffer</structfield>,
+<structfield>buffer_size</structfield>,
+<structfield>complete_fn</structfield> and
+<structfield>complete_data</structfield> fields. The transfer function
+should arrange for the transfer to start, allowing the host to send or
+receive packets. Typically this will result in an interrupt at the end
+of the transfer or after each packet. Once the entire transfer has
+been completed, the driver's interrupt handling code should invoke the
+completion function. This can happen either in DSR context or thread
+context, depending on the driver's implementation. There are a number
+of special cases to consider. If the endpoint is halted when the
+transfer is started then the completion function can be invoked
+immediately with <literal>-EAGAIN</literal>. If the transfer cannot be
+completed because the connection is broken then the completion
+function should be invoked with <literal>-EPIPE</literal>. If the
+endpoint is stalled during the transfer, either because of a standard
+control message or because higher-level code calls the appropriate
+<structfield>set_halted_fn</structfield>, then again the completion
+function should be invoked with <literal>-EAGAIN</literal>. Finally,
+the <<function>usbs_start_rx_endpoint_wait</function> and
+<function>usbs_start_tx_endpoint_wait</function> functions involve
+calling the device driver's data transfer function with a buffer size
+of 0 bytes.
+</para>
+<note><para>
+Giving a buffer size of 0 bytes a special meaning is problematical
+because it prevents transfers of that size. Such transfers are allowed
+by the USB protocol, consisting of just headers and acknowledgements
+and an empty data phase, although rarely useful. A future modification
+of the device driver specification will address this issue, although
+care has to be taken that the functionality remains accessible through
+devtab entries as well as via low-level accesses.
+</para></note>
+</refsect1>
+
+<refsect1><title>Devtab Entries</title>
+<para>
+For some applications or higher-level packages it may be more
+convenient to use traditional open/read/write I/O calls rather than
+the non-blocking USB I/O calls. To support this the device driver can
+provide a devtab entry for each endpoint, for example:
+</para>
+<programlisting width=72>
+#ifdef CYGVAR_DEVS_USB_SA11X0_EP1_DEVTAB_ENTRY
+
+static CHAR_DEVIO_TABLE(usbs_sa11x0_ep1_devtab_functions,
+ &amp;cyg_devio_cwrite,
+ &amp;usbs_devtab_cread,
+ &amp;cyg_devio_bwrite,
+ &amp;cyg_devio_bread,
+ &amp;cyg_devio_select,
+ &amp;cyg_devio_get_config,
+ &amp;cyg_devio_set_config);
+
+static CHAR_DEVTAB_ENTRY(usbs_sa11x0_ep1_devtab_entry,
+ CYGDAT_DEVS_USB_SA11X0_DEVTAB_BASENAME "1r",
+ 0,
+ &amp;usbs_sa11x0_ep1_devtab_functions,
+ &amp;usbs_sa11x0_devtab_dummy_init,
+ 0,
+ (void*) &amp;usbs_sa11x0_ep1);
+#endif
+</programlisting>
+<para>
+Again care must be taken to avoid name clashes. This can be achieved
+by having a configuration option to control the base name, with a
+default value of e.g. <literal>/dev/usbs</literal>, and appending an
+endpoint-specific string. This gives the application developer
+sufficient control to eliminate any name clashes. The common USB slave
+package provides functions <function>usbs_devtab_cwrite</function> and
+<function>usbs_devtab_cread</function>, which can be used in the
+function tables for transmit and receive endpoints respectively. The
+private field <structfield>priv</structfield> of the devtab entry
+should be a pointer to the underlying endpoint data structure.
+</para>
+<para>
+Because devtab entries are never accessed directly, only indirectly,
+they would usually be eliminated by the linker. To avoid this the
+devtab entries should normally be defined in a separate source file
+which ends up the special library <filename>libextras.a</filename>
+rather than in the default library <filename>libtarget.a</filename>.
+</para>
+<para>
+Not all applications or higher-level packages will want to use the
+devtab entries and the blocking I/O facilities. It may be appropriate
+for the device driver to provide additional configuration options that
+control whether or not any or all of the devtab entries should be
+provided, to avoid unnecessary memory overheads.
+</para>
+</refsect1>
+
+<refsect1><title>Interrupt Handling</title>
+<para>
+A typical USB device driver will need to service interrupts for all of
+the endpoints and possibly for additional USB events such as entering
+or leaving suspended mode. Usually these interrupts need not be
+serviced directly by the ISR. Instead, they can be left to a DSR. If
+the peripheral is not able to accept or send another packet just yet,
+the hardware will generate a NAK and the host will just retry a little
+bit later. If high throughput is required then it may be desirable to
+handle the bulk transfer protocol largely at ISR level, that is take
+care of each packet in the ISR and only activate the DSR once the
+whole transfer has completed.
+</para>
+<para>
+Control messages may involve invoking arbitrary callback functions in
+higher-level code. This should normally happen at DSR level. Doing it
+at ISR level could seriously affect the system's interrupt latency and
+impose unacceptable constraints on what operations can be performed by
+those callbacks. If the device driver requires a thread anyway then it
+may be appropriate to use this thread for invoking the callbacks, but
+usually it is not worthwhile to add a new thread to the system just
+for this; higher-level code is expected to write callbacks that
+function sensibly at DSR level. Much the same applies to the
+completion functions associated with data transfers. These should also
+be invoked at DSR or thread level.
+</para>
+
+</refsect1>
+<refsect1><title>Support for USB Testing</title>
+<para>
+Optionally a USB device driver can provide support for the
+<link linkend="usbs-testing">USB test software</link>. This requires
+defining a number of additional data structures, allowing the
+generic test code to work out just what the hardware is capable of and
+hence what testing can be performed.
+</para>
+<para>
+The key data structure is
+<structname>usbs_testing_endpoint</structname>, defined in <filename
+class="headerfile">cyg/io/usb/usbs.h</filename>. In addition some
+commonly required constants are provided by the common USB package in
+<filename class="headerfile">cyg/io/usb/usb.h</filename>. One
+<structname>usbs_testing_endpoint</structname> structure should be
+defined for each supported endpoint. The following fields need to be
+filled in:
+</para>
+<variablelist>
+<varlistentry>
+ <term><structfield>endpoint_type</structfield></term>
+ <listitem><para>
+ This specifies the type of endpoint and should be one of
+ <literal>USB_ENDPOINT_DESCRIPTOR_ATTR_CONTROL</literal>,
+ <literal>BULK</literal>, <literal>ISOCHRONOUS</literal> or
+ <literal>INTERRUPT</literal>.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><structfield>endpoint_number</structfield></term>
+ <listitem><para>
+ This identifies the number that should be used by the host
+ to address this endpoint. For a control endpoint it should
+ be 0. For other types of endpoints it should be between
+ 1 and 15.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><structfield>endpoint_direction</structfield></term>
+ <listitem><para>
+ For control endpoints this field is irrelevant. For other
+ types of endpoint it should be either
+ <literal>USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN</literal> or
+ <literal>USB_ENDPOINT_DESCRIPTOR_ENDPOINT_OUT</literal>. If a given
+ endpoint number can be used for traffic in both directions then
+ there should be two entries in the array, one for each direction.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><structfield>endpoint</structfield></term>
+ <listitem><para>
+ This should be a pointer to the appropriate
+ <structname>usbs_control_endpoint</structname>,
+ <structname>usbs_rx_endpoint</structname> or
+ <structname>usbs_tx_endpoint</structname> structure, allowing the
+ generic testing code to perform low-level I/O.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><structfield>devtab_entry</structfield></term>
+ <listitem><para>
+ If the endpoint also has an entry in the system's device table then
+ this field should give the corresponding string, for example
+ <literal>&quot;/dev/usbs1r&quot;</literal>. This allows the
+ generic testing code to access the device via higher-level
+ calls like <function>open</function> and <function>read</function>.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><structfield>min_size</structfield></term>
+ <listitem><para>
+ This indicates the smallest transfer size that the hardware can
+ support on this endpoint. Typically this will be one.
+ </para>
+ <note><para>
+ Strictly speaking a minimum size of one is not quite right since it
+ is valid for a USB transfer to involve zero bytes, in other words a
+ transfer that involves just headers and acknowledgements and an
+ empty data phase, and that should be tested as well. However current
+ device drivers interpret a transfer size of 0 as special, so that
+ would have to be resolved first.
+ </para></note>
+ </listitem>
+</varlistentry>
+<varlistentry>
+ <term><structfield>max_size</structfield></term>
+ <listitem><para>
+ Similarly, this specifies the largest transfer size. For control
+ endpoints the USB protocol uses only two bytes to hold the transfer
+ length, so there is an upper bound of 65535 bytes. In practice
+ it is very unlikely that any control transfers would ever need to
+ be this large, and in fact such transfers would take a long time
+ and probably violate timing constraints. For other types of endpoint
+ any of the protocol, the hardware, or the device driver may impose
+ size limits. For example a given device driver might be unable to
+ cope with transfers larger than 65535 bytes. If it should be
+ possible to transfer arbitrary amounts of data then a value of
+ <literal>-1</literal> indicates no upper limit, and transfer
+ sizes will be limited by available memory and by the capabilities
+ of the host machine.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><structfield>max_in_padding</structfield></term>
+ <listitem><para>
+ This field is needed on some hardware where it is impossible to
+ send packets of a certain size. For example the hardware may be
+ incapable of sending an empty bulk packet to terminate a transfer
+ that is an exact multiple of the 64-byte bulk packet size.
+ Instead the driver has to do some padding and send an extra byte,
+ and the host has to be prepared to receive this extra byte. Such a
+ driver should specify a value of <literal>1</literal> for the
+ padding field. For most drivers this field should be set to
+ <literal>0</literal>.
+ </para>
+ <para>
+ A better solution would be for the device driver to supply a
+ fragment of Tcl code that would adjust the receive buffer size
+ only when necessary, rather than for every transfer. Forcing
+ receive padding on all transfers when only certain transfers
+ will actually be padded reduces the accuracy of certain tests.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><structfield>alignment</structfield></term>
+ <listitem><para>
+ On some hardware data transfers may need to be aligned to certain
+ boundaries, for example a word boundary or a cacheline boundary.
+ Although in theory device drivers could hide such alignment
+ restrictions from higher-level code by having their own buffers and
+ performing appropriate copying, that would be expensive in terms of
+ both memory and cpu cycles. Instead the generic testing code will
+ align any buffers passed to the device driver to the specified
+ boundary. For example, if the driver requires that buffers be
+ aligned to a word boundary then it should specify an alignment
+ value of 4.
+ </para></listitem>
+</varlistentry>
+</variablelist>
+
+<para>
+The device driver should provide an array of these structures
+<varname>usbs_testing_endpoints[]</varname>. The USB testing code
+examines this array and uses the information to perform appropriate
+tests. Because different USB devices support different numbers of
+endpoints the number of entries in the array is not known in advance,
+so instead the testing code looks for a special terminator
+<varname>USBS_TESTING_ENDPOINTS_TERMINATOR</varname>. An example
+array, showing just the control endpoint and the terminator, might
+look like this:
+</para>
+<programlisting width=72>
+usbs_testing_endpoint usbs_testing_endpoints[] = {
+ {
+ endpoint_type : USB_ENDPOINT_DESCRIPTOR_ATTR_CONTROL,
+ endpoint_number : 0,
+ endpoint_direction : USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN,
+ endpoint : (void*) &amp;ep0.common,
+ devtab_entry : (const char*) 0,
+ min_size : 1,
+ max_size : 0x0FFFF,
+ max_in_padding : 0,
+ alignment : 0
+ },
+ &hellip;,
+ USBS_TESTING_ENDPOINTS_TERMINATOR
+};
+</programlisting>
+
+<note>
+<para>
+The use of a single array <varname>usbs_testing_endpoints</varname>
+limits USB testing to platforms with a single USB device: if there
+were multiple devices, each defining their own instance of this array,
+then there would a collision at link time. In practice this should not
+be a major problem since typical USB peripherals only interact with a
+single host machine via a single slave port. In addition, even if a
+peripheral did have multiple slave ports the current USB testing code
+would not support this since it would not know which port to use.
+</para>
+</note>
+
+</refsect1>
+
+</refentry>
+
+<!-- }}} -->
+<!-- {{{ USB Testing support -->
+
+<refentry id="usbs-testing">
+<refmeta>
+<refentrytitle>Testing</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>Testing</refname>
+<refpurpose>Testing of USB Device Drivers</refpurpose>
+</refnamediv>
+
+<refsect1><title>Introduction</title>
+<para>
+The support for USB testing provided by the eCos USB common slave
+package is somewhat different in nature from the kind of testing used
+in many other packages. One obvious problem is that USB tests cannot
+be run on just a bare target platform: instead the target platform
+must be connected to a suitable USB host machine, and that host
+machine must be running appropriate software for the test code to
+interact with. This is very different from say a kernel test which
+typically will have no external dependencies. Another important
+difference between USB testing and say a C library
+<function>strcmp</function> test is sensitivity to timing and to
+hardware boundary conditions: although a simple test case that just
+performs a small number of USB transfers is better than no testing at
+all, it should also be possible to run tests for hours or days on end,
+under a variety of loads. In order to provide the required
+functionality the basic architecture of the USB testing support is as
+follows:
+</para>
+<orderedlist>
+ <listitem><para>
+ There is a single target-side program
+ <application>usbtarget</application>. By default when this is run
+ on a target platform it will appear to do nothing. In fact it is
+ waiting to be contacted by another program
+ <application>usbhost</application> which will tell it what test or
+ tests to run. <application>usbtarget</application> provides
+ mechanisms for running a wide range of tests.
+ </para></listitem>
+ <listitem><para>
+ <application>usbtarget</application> is a generic program, but USB
+ testing depends to some extent on the functionality provided by the
+ hardware. For example there is no point in testing bulk transmits
+ to endpoint 12 if the target hardware does not support an endpoint
+ 12. Therefore each USB device driver should supply information about
+ what the hardware is actually capable of, in the form of an array of
+ <structname>usbs_testing_endpoint</structname> data structures.
+ </para></listitem>
+ <listitem><para>
+ There is a single host-side program
+ <application>usbhost</application>, which acts as a counterpart to
+ <application>usbtarget</application>. Again
+ <application>usbhost</application> has no built-in knowledge of
+ the test or tests that are supposed to run, it only provides
+ mechanisms for running a wide range of tests. On start-up
+ <application>usbhost</application> will search the USB bus for
+ hardware running the target-side program, specifically a USB device
+ that identifies itself as the product <literal>&quot;Red Hat eCos
+ USB test&quot;</literal>.
+ </para></listitem>
+ <listitem><para>
+ <application>usbhost</application> contains a Tcl interpreter, and
+ will execute any Tcl scripts specified on the command line
+ together with appropriate arguments. The Tcl interpreter has been
+ extended with various commands such as
+ <literal>usbtest::bulktest</literal>, so the script can perform
+ the desired test or tests.
+ </para></listitem>
+ <listitem><para>
+ Adding a new test simply involves writing a short Tcl script that
+ invokes the appropriate USB-specific commands. Running multiple
+ tests involves passing appropriate arguments to
+ <application>usbhost</application>, or alternatively writing a
+ single script that just invokes other scripts.
+ </para></listitem>
+</orderedlist>
+<para>
+The current implementation of <application>usbhost</application>
+depends heavily on functionality provided by the Linux kernel and in
+particular the usbdevfs support. It uses
+<filename>/proc/bus/usb/devices</filename> to find out what devices
+are attached to the bus, and will then access the device by opening
+<filename>/proc/bus/usb/xxx/yyy</filename> and performing
+<function>ioctl</function> operations. This allows USB testing to take
+place without having to write a new host-side device driver, but
+getting the code working on host machines not running Linux would
+obviously be problematical.
+</para>
+</refsect1>
+
+<refsect1><title>Building and Running the Target-side Code</title>
+<para>
+The target-side component of the USB testing software consists of a
+single program <application>usbtarget</application> which contains
+support for a range of different tests, under the control of host-side
+software. This program is not built by default alongside other eCos
+test cases since it will only operate in certain environments,
+specifically when the target board's connector is plugged into a Linux
+host, and when the appropriate host-side software has been installed
+on that host. Instead the user must enable a configuration option
+<literal>CYGBLD_IO_USB_SLAVE_USBTEST</literal> to add the program to
+the list of tests for the current configuration.
+</para>
+<para>
+Starting the <application>usbtarget</application> program does not
+require anything unusual, so it can be run in a normal
+<application>gdb</application> session just like any eCos application.
+After initialization the program will wait for activity from the host.
+Depending on the hardware, the Linux host will detect that a new USB
+peripheral is present on the bus either when the
+<application>usbtarget</application> initialization is complete or
+when the cable between target and host is connected. The host will
+perform the normal USB enumeration sequence and discover that the
+peripheral does not match any known vendor or product id and that
+there is no device driver for <literal>&quot;Red Hat eCos USB
+test&quot;</literal>, so it will ignore the peripheral. When the
+<application>usbhost</application> program is run on the host it will
+connect to the target-side software, and testing can now commence.
+</para>
+</refsect1>
+
+<refsect1><title>Building and Running the Host-side Code</title>
+<note><para>
+In theory the host-side software should be built when the package is
+installed in the component repository, and removed when a package
+is uninstalled. The current eCos administration tool does not provide
+this functionality.
+</para></note>
+<para>
+The host-side software should be built via the usual sequence of
+&quot;configure/make/make install&quot;. It can only be built on a
+Linux host and the <command>configure</command> script contains an
+explicit test for this. Because the eCos component repository should
+generally be treated as a read-only resource the configure script will
+also prevent you from trying to build inside the source tree. Instead
+a separate build tree is required. Hence a typical sequence for
+building the host-side software would be as follows:
+</para>
+<screen>
+$ mkdir usbhost_build
+$ cd usbhost_build
+$ &lt;repo&gt;packages/io/usb/slave/current/host/configure <co id="path"> <co id="version"> &lt;args&gt; <co id="args">
+$ make
+&lt;output from make&gt;
+$ su <co id="root">
+$ make install
+&lt;output from make install&gt;
+$
+</screen>
+<calloutlist>
+<callout arearefs="path">
+<para>
+The location of the eCos component repository should be substituted
+for <literal>&lt;repo&gt;</literal>.
+</para>
+</callout>
+<callout arearefs="version">
+<para>
+If the package has been obtained via CVS or anonymous CVS then the
+package version will be <filename>current</filename>, as per the
+example. If instead the package has been obtained as part of a full
+eCos release or as a separate <filename>.epk</filename> file then the
+appropriate package version should be used instead of
+<filename>current</filename>.
+</para>
+</callout>
+<callout arearefs="args">
+<para>
+The <command>configure</command> script takes the usual arguments such
+as <parameter>--prefix=</parameter> to specify where the executables
+and support files should be installed. The only other parameter that
+some users may wish to specify is the location of a suitable Tcl
+installation. By default <application>usbhost</application> will use
+the existing Tcl installation in <filename class="directory">/usr</filename>,
+as provided by your Linux distribution. An alternative Tcl
+installation can be specified using the parameter
+<parameter>--with-tcl=</parameter>, or alternatively using some
+combination of <parameter>--with-tcl-include</parameter>,
+<parameter>--with-tcl-lib</parameter> and
+<parameter>--with-tcl-version</parameter>.
+</para>
+</callout>
+<callout arearefs="root">
+<para>
+One of the host-side executables that gets built,
+<application>usbchmod</application>, needs to be installed with suid
+root privileges. Although the Linux kernel makes it possible for
+applications to perform low-level USB operations such as transmitting
+bulk packets, by default access to this functionality is restricted to
+programs with superuser privileges. It is undesirable to run a complex
+program such as <application>usbhost</application> with such
+privileges, especially since the program contains a general-purpose
+Tcl interpreter. Therefore when <application>usbhost</application>
+starts up and discovers that it does not have sufficient access to the
+appropriate entries in <filename class="directory">/proc/bus/usb</filename>,
+it spawns an instance of <application>usbchmod</application> to modify
+the permissions on these entries. <application>usbchmod</application>
+will only do this for a USB device <literal>&quot;Red Hat eCos USB
+test&quot;</literal>, so installing this program suid root should not
+introduce any security problems.
+</para>
+</callout>
+</calloutlist>
+
+<para>
+During <command>make install</command> the following actions will take
+place:
+</para>
+<orderedlist>
+<listitem>
+<para>
+<application>usbhost</application> will be installed in <filename class="directory">/usr/local/bin</filename>,
+or some other <filename class="directory">bin</filename> directory if
+the default location is changed at configure-time using a
+<parameter>--prefix=</parameter> or similar option. It will be
+installed as the executable
+<application>usbhost_&lt;version&gt;</application>, for example
+<application>usbhost_current</application>, thus allowing several
+releases of the USB slave package to co-exist. For convenience a
+symbolic link from <filename>usbhost</filename> to this executable
+will be created, so users can just run <command>usbhost</command> to
+access the most recently-installed version.
+</para>
+</listitem>
+<listitem>
+<para>
+<application>usbchmod</application> will be installed in
+<filename class="directory">/usr/local/libexec/ecos/io_usb_slave_&lt;version&gt;</filename>.
+This program should only be run by <application>usbhost</application>,
+not invoked directly, so it is not placed in the <filename class="directory">bin</filename>
+directory. Again the presence of the package version in the directory
+name allows multiple releases of the package to co-exist.
+</para>
+</listitem>
+<listitem>
+<para>
+A Tcl script <filename>usbhost.tcl</filename> will get installed in
+the same directory as <application>usbchmod</application>. This Tcl
+script is loaded automatically by the
+<application>usbhost</application> executable.
+</para>
+</listitem>
+<listitem>
+<para>
+A number of additional Tcl scripts, for example
+<filename>list.tcl</filename> will get installed alongside
+<filename>usbhost.tcl</filename>. These correspond to various test
+cases provided as standard. If a given test case is specified on the
+command line and cannot be found relative to the current directory
+then <application>usbhost</application> will search the install
+directory for these test cases.
+</para>
+<note><para>
+Strictly speaking installing the <filename>usbhost.tcl</filename> and
+other Tcl scripts below the <filename class="directory">libexec</filename>
+directory deviates from standard practice: they are
+architecture-independent data files so should be installed below
+the <filename class="directory">share</filename> subdirectory. In
+practice the files are sufficiently small that there is no point in
+sharing them, and keeping them below <filename class="directory">libexec</filename>
+simplifies the host-side software somewhat.
+</para></note>
+</listitem>
+</orderedlist>
+
+<para>
+The <command>usbhost</command> should be run only when there is a
+suitable target attached to the USB bus and running the
+<application>usbtarget</application> program. It will search
+<filename>/proc/bus/usb/devices</filename> for an entry corresponding
+to this program, invoke <application>usbchmod</application> if
+necessary to change the access rights, and then interact with
+<application>usbtarget</application> over the USB bus.
+<command>usbhost</command> should be invoked as follows:
+</para>
+<screen>
+$ usbhost [-v|--version] [-h|--help] [-V|--verbose] &lt;test&gt; [&lt;test parameters&gt;]
+</screen>
+<orderedlist>
+<listitem>
+<para>
+The <parameter>-v</parameter> or <parameter>--version</parameter>
+option will display version information for
+<application>usbhost</application> including the version of the USB
+slave package that was used to build the executable.
+</para>
+</listitem>
+<listitem>
+<para>
+The <parameter>-h</parameter> or <parameter>--help</parameter> option
+will display usage information.
+</para>
+</listitem>
+<listitem>
+<para>
+The <parameter>-V</parameter> or <parameter>--verbose</parameter>
+option can be used to obtain more information at run-time, for example
+some output for every USB transfer. This option can be repeated
+multiple times to increase the amount of output.
+</para>
+</listitem>
+<listitem>
+<para>
+The first argument that does not begin with a hyphen specifies a test
+that should be run, in the form of a Tcl script. For example an
+argument of <parameter>list.tcl</parameter> will cause
+<application>usbhost</application> to look for a script with that
+name, adding a <filename>.tcl</filename> suffix if necessarary, and
+run that script. <application>usbhost</application> will look in the
+current directory first, then in the install tree for standard test
+scripts provided by the USB slave package.
+</para>
+</listitem>
+<listitem>
+<para>
+Some test scripts may want their own parameters, for example a
+duration in seconds. These can be passed on the command line after
+the name of the test, for example
+<command>usbhost&nbsp;mytest&nbsp;60</command>.
+</para>
+</listitem>
+</orderedlist>
+</refsect1>
+
+<refsect1><title>Writing a Test</title>
+<para>
+Each test is defined by a Tcl script, running inside an interpreter
+provided by <application>usbhost</application>. In addition to the
+normal Tcl functionality this interpreter provides a number of
+variables and functions related to USB testing. For example there is a
+variable <varname>bulk_in_endpoints</varname> that lists all the
+endpoints on the target that can perform bulk IN operations, and a
+related array <varname>bulk_in</varname> which contains information
+such as the minimum and maximum packets sizes. There is a function
+<function>bulktest</function> which can be used to perform bulk tests
+on a particular endpoint. A simple test script aimed at specific
+hardware could ignore the information variables since it would know
+exactly what USB hardware is available on the target, whereas a
+general-purpose script would use the information to adapt to the
+hardware capabilities.
+</para>
+<para>
+To avoid namespace pollution all USB-related Tcl variables and
+functions live in the <varname>usbtest::</varname> namespace.
+Therefore accessing requires either explicitly including the
+namespace any references, for example
+<literal>$usbtest::bulk_in_endpoints</literal>, or by using Tcl's
+<function>namespace import</function> facility.
+</para>
+<para>
+A very simple test script might look like this:
+</para>
+<programlisting width=72>
+usbtest::bulktest 1 out 4000
+usbtest::bulktest 2 in 4000
+if { [usbtest::start 60] } {
+ puts "Test successful"
+} else
+ puts "Test failed"
+ foreach result $usbtest::results {
+ puts $result
+ }
+}
+</programlisting>
+<para>
+This would perform a test run involving 4000 bulk transfers from the
+host to the target's endpoint 1, and concurrently 4000 bulk transfers
+from endpoint 2. Default settings for packet sizes, contents, and
+delays would be used. The actual test would not start running until
+<filename>usbtest</filename> is invoked, and it is expected that the
+test would complete within 60 seconds. If any failures occur then they
+are reported.
+</para>
+</refsect1>
+
+<refsect1><title>Available Hardware</title>
+<para>
+Each target-side USB device driver provides information about the
+actual capabilities of the hardware, for example which endpoints are
+available. Strictly speaking it provides information about what is
+actually supported by the device driver, which may be a subset of what
+the hardware is capable of. For example, the hardware may support
+isochronous transfers on a particular endpoint but if there is no
+software support for this in the driver then this endpoint will not be
+listed. When <application>usbhost</application> first contacts the
+<application>usbtarget</application> program running on the target
+platform, it obtains this information and makes it available to test
+scripts via Tcl variables:
+</para>
+<variablelist>
+<varlistentry>
+ <term><varname>bulk_in_endpoints</varname></term>
+ <listitem><para>
+ This is a simple list of the endpoints which can support bulk IN
+ transfers. For example if the target-side hardware supports
+ these transfers on endpoints 3 and 5 then the value would be
+ <literal>&quot;3 5&quot;</literal> Typical test scripts would
+ iterate over the list using something like:
+ </para>
+ <programlisting width=72>
+ if { 0 != [llength $usbtest::bulk_in_endpoints] } {
+ puts"Bulk IN endpoints: $usbtest::bulk_in_endpoints"
+ foreach endpoint $usbtest:bulk_in_endpoints {
+ &hellip;
+ }
+ }
+ </programlisting>
+ </listitem>
+</varlistentry>
+<varlistentry>
+ <term><varname>bulk_in()</varname></term>
+ <listitem><para>
+ This array holds additional information about each bulk IN endpoint.
+ The array is indexed by two fields, the endpoint number and one of
+ <literal>min_size</literal>, <literal>max_size</literal>,
+ <literal>max_in_padding</literal> and <literal>devtab</literal>:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><literal>min_size</literal></term>
+ <listitem><para>
+ This field specifies a lower bound on the size of bulk transfers,
+ and will typically will have a value of 1.
+ </para>
+ <note><para>
+ The typical minimum transfer size of a single byte is not strictly
+ speaking correct, since under some circumstances it can make sense
+ to have a transfer size of zero bytes. However current target-side
+ device drivers interpret a request to transfer zero bytes as a way
+ for higher-level code to determine whether or not an endpoint is
+ stalled, so it is not actually possible to perform zero-byte
+ transfers. This issue will be addressed at some future point.
+ </para></note>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>max_size</literal></term>
+ <listitem><para>
+ This field specifies an upper bound on the size of bulk transfers.
+ Some target-side drivers may be limited to transfers of say
+ 0x0FFFF bytes because of hardware limitations. In practice the
+ transfer size is likely to be limited primarily to limit memory
+ consumption of the test code on the target hardware, and to ensure
+ that tests complete reasonably quickly. At the time of writing
+ transfers are limited to 4K.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>max_in_padding</literal></term>
+ <listitem><para>
+ On some hardware it may be necessary for the target-side device
+ driver to send more data than is actually intended. For example
+ the SA11x0 USB hardware cannot perform bulk transfers that are
+ an exact multiple of 64 bytes, instead it must pad such
+ transfers with an extra byte and the host must be ready to
+ accept and discard this byte. The
+ <literal>max_in_padding</literal> field indicates the amount of
+ padding that is required. The low-level code inside
+ <application>usbhost</application> will use this field
+ automatically, and there is no need for test scripts to adjust
+ packet sizes for padding. The field is provided for
+ informational purposes only.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>devtab</literal></term>
+ <listitem><para>
+ This is a string indicating whether or not the
+ target-side USB device driver supports access to this endpoint
+ via entries in the device table, in other words through
+ conventional calls like <function>open</function> and
+ <function>write</function>. Some device drivers may only
+ support low-level USB access because typically that is what gets
+ used by USB class-specific packages such as USB-ethernet.
+ An empty string indicates that no devtab entry is available,
+ otherwise it will be something like
+ <literal>&quot;/dev/usbs2w&quot;</literal>.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ Typical test scripts would access this data using something like:
+ </para>
+ <programlisting width=72>
+ foreach endpoint $usbtest:bulk_in_endpoints {
+ puts "Endpoint $endpoint: "
+ puts " minimum transfer size $usbtest::bulk_in($endpoint,min_size)"
+ puts " maximum transfer size $usbtest::bulk_in($endpoint,max_size)"
+ if { 0 == $usbtest::bulk_in($endpoint,max_in_padding) } {
+ puts " no IN padding required"
+ } else {
+ puts " $usbtest::bulk_in($endpoint,max_in_padding) bytes of IN padding required"
+ }
+ if { "" == $usbtest::bulk_in($endpoint,devtab) } {
+ puts " no devtab entry provided"
+ } else {
+ puts " corresponding devtab entry is $usbtest::bulk_in($endpoint,devtab)"
+ }
+ }
+ </programlisting>
+ </listitem>
+</varlistentry>
+<varlistentry>
+ <term><varname>bulk_out_endpoint</varname></term>
+ <listitem><para>
+ This is a simple list of the endpoints which can support bulk OUT
+ transfers. It is analogous to
+ <varname>bulk_in_endpoints</varname>.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><varname>bulk_out()</varname></term>
+ <listitem><para>
+ This array holds additional information about each bulk OUT
+ endpoint. It can be accessed in the same way as
+ <varname>bulk_in()</varname>, except that there is no
+ <literal>max_in_padding</literal> field because that field only
+ makes sense for IN transfers.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><varname>control()</varname></term>
+ <listitem><para>
+ This array holds information about the control endpoint. It contains
+ two fields, <literal>min_size</literal> and
+ <literal>max_size</literal>. Note that there is no variable
+ <varname>control_endpoints</varname> because a USB target always
+ supports a single control endpoint <literal>0</literal>. Similarly
+ the <varname>control</varname> array does not use an endpoint number
+ as the first index because that would be redundant.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><varname>isochronous_in_endpoints</varname> and
+ <varname>isochronous_in()</varname></term>
+ <listitem><para>
+ These variables provide the same information as
+ <varname>bulk_in_endpoints</varname> and <varname>bulk_in</varname>,
+ but for endpoints that support isochronous IN transfers.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><varname>isochronous_out_endpoints</varname> and
+ <varname>isochronous_out()</varname></term>
+ <listitem><para>
+ These variables provide the same information as
+ <varname>bulk_out_endpoints</varname> and <varname>bulk_out</varname>,
+ but for endpoints that support isochronous OUT transfers.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><varname>interrupt_in_endpoints</varname> and
+ <varname>interrupt_in()</varname></term>
+ <listitem><para>
+ These variables provide the same information as
+ <varname>bulk_in_endpoints</varname> and <varname>bulk_in</varname>,
+ but for endpoints that support interrupt IN transfers.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><varname>interrupt_out_endpoints</varname> and
+ <varname>interrupt_out()</varname></term>
+ <listitem><para>
+ These variables provide the same information as
+ <varname>bulk_out_endpoints</varname> and <varname>bulk_out</varname>,
+ but for endpoints that support interrupt OUT transfers.
+ </para></listitem>
+</varlistentry>
+</variablelist>
+</refsect1>
+
+
+<refsect1><title>Testing Bulk Transfers</title>
+<para>
+The main function for initiating a bulk test is
+<function>usbtest::bulktest</function>. This takes three compulsory
+arguments, and can be given a number of additional arguments to
+control the exact behaviour. The compulsory arguments are:
+</para>
+<variablelist>
+<varlistentry>
+ <term>endpoint</term>
+ <listitem><para>
+ This specifies the endpoint to use. It should correspond to
+ one of the entries in
+ <varname>usbtest::bulk_in_endpoints</varname> or
+ <varname>usbtest::bulk_out_endpoints</varname>, depending on the
+ transfer direction.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term>direction</term>
+ <listitem><para>
+ This should be either <literal>in</literal> or <literal>out</literal>.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term>number of transfers</term>
+ <listitem><para>
+ This specifies the number of transfers that should take place. The
+ testing software does not currently support the concept of performing
+ transfers for a given period of time because synchronising this on
+ both the host and a wide range of targets is difficult. However it
+ is relatively easy to work out the approximate time a number of bulk
+ transfers should take place, based on a typical bandwidth of
+ 1MB/second and assuming say a 1ms overhead per transfer.
+ Alternatively a test script could perform a small initial run to
+ determine what performance can actually be expected from a given
+ target, and then use this information to run a much longer test.
+ </para></listitem>
+</varlistentry>
+</variablelist>
+<para>
+Additional arguments can be used to control the exact transfer. For
+example a <parameter>txdelay+</parameter> argument can be used to
+slowly increase the delay between transfers. All such arguments involve
+a value which can be passed either as part of the argument itself,
+for example <literal>txdelay+=5</literal>, or as a subsequent
+argument, <literal>txdelay+ 5</literal>. The possible arguments fall
+into a number of categories: data, I/O mechanism, transmit size,
+receive size, transmit delay, and receive delay.
+</para>
+
+<refsect2><title>Data</title>
+<para>
+An obvious parameter to control is the actual data that gets sent.
+This can be controlled by the argument <parameter>data</parameter>
+which can take one of five values: <literal>none</literal>,
+<literal>bytefill</literal>, <literal>intfill</literal>,
+<literal>byteseq</literal> and <literal>wordseq</literal>. The default
+value is <literal>none</literal>.
+</para>
+<variablelist>
+<varlistentry>
+ <term><literal>none</literal></term>
+ <listitem><para>
+ The transmit code will not attempt to fill the buffer in any way,
+ and the receive code will not check it. The actual data that gets
+ transferred will be whatever happened to be in the buffer before
+ the transfer started.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><literal>bytefill</literal></term>
+ <listitem><para>
+ The entire buffer will be filled with a single byte, as per
+ <function>memset</function>.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><literal>intfill</literal></term>
+ <listitem><para>
+ The buffer will be treated as an array of 32-bit integers, and will
+ be filled with the same integer repeated the appropriate number of
+ times. If the buffer size is not a multiple of four bytes then
+ the last few bytes will be set to 0.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><literal>byteseq</literal></term>
+ <listitem><para>
+ The buffer will be filled with a sequence of bytes, generated by
+ a linear congruential generator. If the first byte in the buffer is
+ filled with the value <literal>x</literal>, the next byte will be
+ <literal>(m*x)+i</literal>. For example a sequence of slowly
+ incrementing bytes can be achieved by setting both the multiplier
+ and the increment to 1. Alternatively a pseudo-random number
+ sequence can be achieved using values 1103515245 and 12345, as
+ per the standard C library <function>rand</function> function.
+ For convenience these two constants are available as Tcl
+ variables <varname>usbtest::MULTIPLIER</varname> and
+ <varname>usbtest::INCREMENT</varname>.
+ </para></listitem>
+</varlistentry>
+<varlistentry>
+ <term><literal>wordseq</literal></term>
+ <listitem><para>
+ This acts like <literal>byteseq</literal>, except that the buffer is
+ treated as an array of 32-bit integers rather than as an array of
+ bytes. If the buffer is not a multiple of four bytes then the last
+ few bytes will be filled with zeroes.
+ </para></listitem>
+</varlistentry>
+</variablelist>
+<para>
+The above requires three additional parameters
+<parameter>data1</parameter>, <parameter>data*</parameter> and
+<parameter>data+</parameter>. <parameter>data1</parameter> specifies
+the value to be used for byte or word fills, or the first number when
+calculating a sequence. The default value is <literal>0</literal>.
+<parameter>data*</parameter> and <parameter>data+</parameter> specify
+the multiplier and increment for a sequence, and have default values
+of <literal>1</literal> and <literal>0</literal> respectively. For
+example, to perform a bulk transfer of a pseudo-random sequence of
+integers starting with 42 the following code could be used:
+</para>
+<programlisting width=72>
+bulktest 2 IN 1000 data=wordseq data1=42 \
+ data* $usbtest::MULTIPLIER data+ $usbtest::INCREMENT
+</programlisting>
+<para>
+The above parameters define what data gets transferred for the first
+transfer, but a test can involve multiple transfers. The data format
+will be the same for all transfers, but it is possible to adjust the
+current value, the multiplier, and the increment between each
+transfer. This is achieved with parameters <parameter>data1*</parameter>,
+<parameter>data1+</parameter>, <parameter>data**</parameter>,
+<parameter>data*+</parameter>, <parameter>data+*</parameter>, and
+<parameter>data++</parameter>, with default values of 1 for each
+multiplier and 0 for each increment. For example, if the multiplier
+for the first transfer is set to <literal>2</literal> using
+<parameter>data*</parameter>, and arguments
+<literal>data**&nbsp;2</literal> and <literal>data*+&nbsp;-1</literal> are also
+supplied, then the multiplier for subsequent transfers will be
+<literal>3</literal>, <literal>5</literal>, <literal>9</literal>,
+&hellip;.
+</para>
+
+<note><para>
+Currently it is not possible for a test script to send specific data,
+for example a specific sequence of bytes captured by a protocol analyser
+that caused a problem. If the transfer was from host to target then
+the target would have to know the exact sequence of bytes to expect,
+which means transferring data over the USB bus when that data is known
+to have caused problems in the past. Similarly for target to host
+transfers the target would have to know what bytes to send. A possible
+future extension of the USB testing support would allow for bounce
+operations, where a given message is first sent to the target and then
+sent back to the host, with only the host checking that the data was
+returned correctly.
+</para></note>
+</refsect2>
+
+<refsect2><title>I/O Mechanism</title>
+<para>
+On the target side USB transfers can happen using either low-level
+USB calls such as <function>usbs_start_rx_buffer</function>, or by
+higher-level calls which go through the device table. By default the
+target-side code will use the low-level calls. If it is desired to
+test the higher-level calls instead, for example because those are
+what the application uses, then that can be achieved with an
+argument <parameter>mechanism=devtab</parameter>.
+</para>
+</refsect2>
+
+<refsect2><title>Transmit Size</title>
+<para>
+The next set of arguments can be used to control the size of the
+transmitted buffer: <parameter>txsize1</parameter>,
+<parameter>txsize&gt;=</parameter>, <parameter>txsize&lt;=</parameter>
+<parameter>txsize*</parameter>, <parameter>txsize/</parameter>,
+and <parameter>txsize+</parameter>.
+</para>
+<para>
+<parameter>txsize1</parameter> determines the size of the first
+transfer, and has a default value of 32 bytes. The size of the next
+transfer is calculated by first multiplying by the
+<parameter>txsize*</parameter> value, then dividing by the
+<parameter>txsize/</parameter> value, and finally adding the
+<parameter>txsize+</parameter> value. The defaults for these are
+<literal>1</literal>, <literal>1</literal>, and <literal>0</literal>
+respectively, which means that the transfer size will remain
+unchanged. If for example the transfer size should increase by
+approximately 50 per cent each time then suitable values might be
+<literal>txsize*&nbsp;3</literal>, <literal>txsize/&nbsp;2</literal>,
+and <literal>txsize+&nbsp;1</literal>.
+</para>
+<para>
+The <parameter>txsize&gt;=</parameter> and
+<parameter>txsize&lt;=</parameter> arguments can be used to impose
+lower and upper bounds on the transfer. By default the
+<literal>min_size</literal> and <literal>max_size</literal> values
+appropriate for the endpoint will be used. If at any time the
+current size falls outside the bounds then it will be normalized.
+</para>
+</refsect2>
+
+<refsect2><title>Receive Size</title>
+<para>
+The receive size, in other words the number of bytes that either host
+or target will expect to receive as opposed to the number of bytes
+that actually get sent, can be adjusted using a similar set of
+arguments: <parameter>rxsize1</parameter>,
+<parameter>rxsize&gt;=</parameter>,
+<parameter>rxsize&lt;=</parameter>,
+<parameter>rxsize*</parameter>, <parameter>rxsize/</parameter> and
+<parameter>rxsize+</parameter>. The current receive size will be
+adjusted between transfers just like the transmit size. However when
+communicating over USB it is not a good idea to attempt to receive
+less data than will actually be sent: typically neither the hardware
+nor the software will be able to do anything useful with the excess,
+so there will be problems. Therefore if at any time the calculated
+receive size is less than the transmit size, the actual receive will
+be for the exact number of bytes that will get transmitted. However
+this will not affect the calculations for the next receive size.
+</para>
+<para>
+The default values for <parameter>rxsize1</parameter>,
+<parameter>rxsize*</parameter>, <parameter>rxsize/</parameter> and
+<parameter>rxsize+</parameter> are <literal>0</literal>,
+<literal>1</literal>, <literal>1</literal> and <literal>0</literal>
+respectively. This means that the calculated receive size will always
+be less than the transmit size, so the receive operation will be for
+the exact number of bytes transmitted. For some USB protocols this
+would not accurately reflect the traffic that will happen. For example
+with USB-ethernet transfer sizes will vary between 16 and 1516 bytes,
+so the receiver will always expect up to 1516 bytes. This can be
+achieved using <literal>rxsize1&nbsp;1516</literal>, leaving the
+other parameters at their default values.
+</para>
+<para>
+For target hardware which involves non-zero
+<literal>max_in_padding</literal>, on the host side the padding will
+be added automatically to the receive size if necessary.
+</para>
+</refsect2>
+
+<refsect2><title>Transmit and Receive Delays</title>
+<para>
+Typically during the testing there will be some minor delays between
+transfers on both host and target. Some of these delays will be caused
+by timeslicing, for example another process running on the host, or a
+concurrent test thread running inside the target. Other delays will be
+caused by the USB bus itself, for example activity from another device
+on the bus. However it is desirable that test cases be allowed to
+inject additional and somewhat more controlled delays into the system,
+for example to make sure that the target behaves correctly even if the
+target is not yet ready to receive data from the host.
+</para>
+<para>
+The transmit delay is controlled by six parameters:
+<parameter>txdelay1</parameter>, <parameter>txdelay*</parameter>,
+<parameter>txdelay/</parameter>, <parameter>txdelay+</parameter>,
+<parameter>txdelay&gt;=</parameter> and
+<parameter>txdelay&lt;=</parameter>. The default values for these are
+<literal>0</literal>, <literal>1</literal>, <literal>1</literal>,
+<literal>0</literal>, <literal>0</literal> and
+<literal>1000000000</literal> respectively, so that by default
+transmits will happen as quickly as possible. Delays are measured in
+nanoseconds, so a value of <literal>1000000</literal> would correspond
+to a delay of 0.001 seconds or one millisecond. By default delays have
+an upper bound of one second. Between transfers the transmit delay is
+updated in much the same was as the transfer sizes.
+</para>
+<para>
+The receive delay is controlled by a similar set of six parameters:
+<parameter>rxdelay1</parameter>, <parameter>rxdelay*</parameter>,
+<parameter>rxdelay/</parameter>, <parameter>rxdelay+</parameter>,
+<parameter>rxdelay&gt;=</parameter> and
+<parameter>rxdelay&lt;=</parameter>. The default values for these are
+the same as for transmit delays.
+</para>
+<para>
+The transmit delay is used on the side which sends data over the USB
+bus, so for a bulk IN transfer it is the target that sends data and
+hence sleeps for the specified transmit delay, while the host receives
+data sleeps for the receive delay. For an OUT transfer the positions
+are reversed.
+</para>
+<para>
+It should be noted that although the delays are measured in
+nanoseconds, the actual delays will be much less precise and are
+likely to be of the order of milliseconds. The exact details will
+depend on the kernel clock speed.
+</para>
+</refsect2>
+
+</refsect1>
+
+<refsect1><title>Other Types of Transfer</title>
+<para>
+Support for testing other types of USB traffic such as isochronous
+transfers is not yet implemented.
+</para>
+</refsect1>
+
+<refsect1><title>Starting a Test and Collecting Results</title>
+<para>
+A USB test script should prepare one or more transfers using
+appropriate functions such as <function>usbtest::bulktest</function>.
+Once all the individual tests have been prepared they can be started
+by a call to <function>usbtest::start</function>. This takes a single
+argument, a maximum duration measured in seconds. If all transfers
+have not been completed in the specified time then any remaining
+transfers will be aborted.
+</para>
+<para>
+<function>usbtest::start</function> will return <literal>1</literal>
+if all the tests have succeeded, or <literal>0</literal> if any of
+them have failed. More detailed reports will be stored in the
+Tcl variable <varname>usbtests::results</varname>, which will be a
+list of string messages.
+</para>
+</refsect1>
+
+<refsect1><title>Existing Test Scripts</title>
+<para>
+A number of test scripts are provided as standard. These are located
+in the <filename class="directory">host</filename> subdirectory of the
+common USB slave package, and will be installed as part of the process
+of building the host-side software. When a script is specified on the
+command line <application>usbhost</application> will first search for
+it in the current directory, then in the install tree. Standard
+test scripts include the following:
+</para>
+<variablelist>
+ <varlistentry><term><filename>list.tcl</filename></term>
+ <listitem><para>
+ This script simply displays information about the capabilities
+ of the target platform, as provided by the target-side USB
+ device driver. It can help with tracking down problems, but its
+ primary purpose is to let users check that everything is working
+ correctly: if running <command>usbhost list.tcl</command>
+ outputs sensible information then the user knows that the
+ target side is running correctly and that communication between
+ host and target is possible.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry><term><filename>verbose.tcl</filename></term>
+ <listitem><para>
+ The target-side code can provide information about what
+ is happening while tests are prepared and run. This facility
+ should not normally be used since the extra I/O involved will
+ significantly affect the behaviour of the system, but in some
+ circumstances it may prove useful. Since an eCos application
+ cannot easily be given command-line arguments the target-side
+ verbosity level cannot be controlled using
+ <parameter>-V</parameter> or <parameter>--verbose</parameter>
+ options. Instead it can be controlled from inside
+ <application>gdb</application> by changing the integer
+ variable <varname>verbose</varname>. Alternatively it can
+ be manipulated by running the test script
+ <filename>verbose.tcl</filename>. This script takes a single
+ argument, the desired verbosity level, which should be a small
+ integer. For example, to disable target-side run-time logging
+ the command <command>usbhost&nbsp;verbose&nbsp;0</command> can
+ be used.
+ </para></listitem>
+ </varlistentry>
+</variablelist>
+</refsect1>
+
+<refsect1><title>Possible Problems</title>
+<para>
+If all transfers succeed within the specified time then both host and
+target remain in synch and further tests can be run without problem.
+However, if at any time a failure occurs then things get more
+complicated. For example, if the current test involves a series of
+bulk OUT transfers and the target detects that for one of these
+transfers it received less data than was expected then the test has
+failed, and the target will stop accepting data on this endpoint.
+However the host-side software may not have detected anything wrong
+and is now blocked trying to send the next lot of data.
+</para>
+<para>
+The test code goes to considerable effort to recover from problems
+such as these. On the host-side separate threads are used for
+concurrent transfers, and on the target-side appropriate asynchronous
+I/O mechanisms are used. In addition there is a control thread on the
+host that checks the state of all the main host-side threads, and the
+state of the target using private control messages. If it discovers
+that one side has stopped sending or receiving data because of an
+error and the other side is blocked as a result, it will set certain
+flags and then cause one additional transfer to take place. That
+additional transfer will have the effect of unblocking the other side,
+which then discovers that an error has occurred by checking the
+appropriate flags. In this way both host and target should end up back
+in synch, and it is possible to move on to the next set of tests.
+</para>
+<para>
+However, the above assumes that the testing has not triggered any
+serious hardware conditions. If instead the target-side hardware has
+been left in some strange state so that, for example, it will no
+longer raise an interrupt for traffic on a particular endpoint then
+recovery is not currently possible, and the testing software will just
+hang.
+</para>
+<para>
+A possible future enhancement to the testing software would allow the
+host-side to raise a USB reset signal whenever a failure occurs, in
+the hope that this would clear any remaining problems within the
+target-side USB hardware.
+</para>
+
+</refsect1>
+
+</refentry>
+
+<!-- }}} -->
+
+</part>
+<!-- /reference -->
diff --git a/cesar/ecos/packages/io/usb/slave/current/host/Makefile.am b/cesar/ecos/packages/io/usb/slave/current/host/Makefile.am
new file mode 100644
index 0000000000..dafa7f8e68
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/host/Makefile.am
@@ -0,0 +1,115 @@
+## Process this file with automake to produce Makefile.in
+## =====================================================================
+##
+## Makefile.am
+##
+## Build support for the eCos USB host-side
+##
+##
+## =====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+## =====================================================================
+#######DESCRIPTIONBEGIN####
+##
+## Author(s): bartv
+## Contact(s): bartv
+## Date: 2002/01/10
+## Version: 0.01
+##
+######DESCRIPTIONEND####
+## =====================================================================
+
+AUTOMAKE_OPTIONS = 1.3 foreign
+
+## Only some platforms are supported. Having the configure script throw
+## an error when attempting to configure on an unsupported platform
+## would be a mistake, since that would prevent any configury from
+## the toplevel on unsupported platforms. Instead an automake conditional
+## is used, leading to null makefiles on unsupported platforms.
+
+if SUPPORTED
+
+AM_CFLAGS = @ecos_CFLAGS@ -DUSBHOST_VERSION=\"@VERSION@\" -DPKGVERSION=\"@PACKAGE_VERSION@\" -DUSBAUXDIR=\"$(libexecdir)/ecos/@PACKAGE_INSTALL@\"
+AM_CXXFLAGS = @ecos_CXXFLAGS@
+INCLUDES = @ecos_INCLUDES@
+LIBS = @ecos_LIBS@ @ecos_LDADD@
+
+## The USB testing support consists of two programs, usbhost and
+## usbchmod, and a number of Tcl scripts. usbhost is executable by the
+## user so it should get installed in bindir, appropriately prefixed
+## and with a symbolic link installed as per e.g. tclsh (it is known
+## that this code is Linux-specific so the use of symbolic links is
+## not a problem). usbchmod is not directly executable so it should
+## get installed in or below libexec. The Tcl scripts are architecture
+## independent so should probably be installed below $(datadir), but
+## for now putting them in the same directory as usbchmod will do
+## fine.
+
+noinst_PROGRAMS = usbhost
+usbhost_SOURCES = usbhost.c
+usbhost_DEPENDENCIES = ../tests/protocol.h ../tests/common.c
+usbhost_LDADD = -lpthread
+
+usbauxdir = $(libexecdir)/ecos/@PACKAGE_INSTALL@
+usbaux_PROGRAMS = usbchmod
+usbaux_DATA = usbhost.tcl list.tcl verbose.tcl
+usbchmod_SOURCES = usbchmod.c
+
+## Two special operations are required during installation.
+## 1) usbhost needs to be installed suitably versioned, e.g. as
+## usbhost_current, and with a symbolic link from usbhost to
+## the new executable.
+## 2) usbchmod needs to be suid root
+install-exec-hook:
+ $(mkinstalldirs) $(bindir)
+ $(INSTALL_PROGRAM) usbhost $(bindir)/usbhost_@PACKAGE_VERSION@
+ rm -f $(bindir)/usbhost
+ $(LN_S) $(bindir)/usbhost_@PACKAGE_VERSION@ $(bindir)/usbhost
+
+install-data-hook:
+ chown root $(usbauxdir)/usbchmod
+ chmod u+s $(usbauxdir)/usbchmod
+
+else
+
+## When automake scans for hooks it does not take conditionals fully
+## into account. If the conditional is not satisfied the generated
+## makefile will still try to invoke the hook, so dummy hooks are needed.
+install-exec-hook:
+ echo Nothing to be done for this platform
+
+install-data-hook:
+ echo Nothing to be done for this platform
+
+endif
diff --git a/cesar/ecos/packages/io/usb/slave/current/host/Makefile.in b/cesar/ecos/packages/io/usb/slave/current/host/Makefile.in
new file mode 100644
index 0000000000..59e2689df9
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/host/Makefile.in
@@ -0,0 +1,499 @@
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+#####ECOSGPLCOPYRIGHTBEGIN####
+#####ECOSGPLCOPYRIGHTEND####
+#######DESCRIPTIONBEGIN####
+######DESCRIPTIONEND####
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+CC = @CC@
+CXX = @CXX@
+ECOS_REPOSITORY = @ECOS_REPOSITORY@
+EXEEXT = @EXEEXT@
+LN_S = @LN_S@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MSVC_SRCDIR = @MSVC_SRCDIR@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_DIR = @PACKAGE_DIR@
+PACKAGE_INSTALL = @PACKAGE_INSTALL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+VERSION = @VERSION@
+ecos_CFLAGS = @ecos_CFLAGS@
+ecos_CXXFLAGS = @ecos_CXXFLAGS@
+ecos_INCLUDES = @ecos_INCLUDES@
+ecos_LDADD = @ecos_LDADD@
+ecos_LIBS = @ecos_LIBS@
+ecos_infra_incdir = @ecos_infra_incdir@
+ecos_infra_libdir = @ecos_infra_libdir@
+ecos_libcdl_incdir = @ecos_libcdl_incdir@
+ecos_libcdl_libdir = @ecos_libcdl_libdir@
+ecos_tk_includes = @ecos_tk_includes@
+ecos_tk_libs = @ecos_tk_libs@
+
+AUTOMAKE_OPTIONS = 1.3 foreign
+
+@SUPPORTED_TRUE@AM_CFLAGS = @SUPPORTED_TRUE@@ecos_CFLAGS@ -DUSBHOST_VERSION=\"@VERSION@\" -DPKGVERSION=\"@PACKAGE_VERSION@\" -DUSBAUXDIR=\"$(libexecdir)/ecos/@PACKAGE_INSTALL@\"
+@SUPPORTED_TRUE@AM_CXXFLAGS = @SUPPORTED_TRUE@@ecos_CXXFLAGS@
+@SUPPORTED_TRUE@INCLUDES = @SUPPORTED_TRUE@@ecos_INCLUDES@
+@SUPPORTED_TRUE@LIBS = @SUPPORTED_TRUE@@ecos_LIBS@ @ecos_LDADD@
+
+@SUPPORTED_TRUE@noinst_PROGRAMS = @SUPPORTED_TRUE@usbhost
+@SUPPORTED_TRUE@usbhost_SOURCES = @SUPPORTED_TRUE@usbhost.c
+@SUPPORTED_TRUE@usbhost_DEPENDENCIES = @SUPPORTED_TRUE@../tests/protocol.h ../tests/common.c
+@SUPPORTED_TRUE@usbhost_LDADD = @SUPPORTED_TRUE@-lpthread
+
+@SUPPORTED_TRUE@usbauxdir = @SUPPORTED_TRUE@$(libexecdir)/ecos/@PACKAGE_INSTALL@
+@SUPPORTED_TRUE@usbaux_PROGRAMS = @SUPPORTED_TRUE@usbchmod
+@SUPPORTED_TRUE@usbaux_DATA = @SUPPORTED_TRUE@usbhost.tcl list.tcl verbose.tcl
+@SUPPORTED_TRUE@usbchmod_SOURCES = @SUPPORTED_TRUE@usbchmod.c
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../acsupport/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+@SUPPORTED_TRUE@noinst_PROGRAMS = usbhost$(EXEEXT)
+@SUPPORTED_TRUE@usbaux_PROGRAMS = usbchmod$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS) $(usbaux_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I.
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+@SUPPORTED_TRUE@usbhost_OBJECTS = usbhost.$(OBJEXT)
+usbhost_LDFLAGS =
+@SUPPORTED_TRUE@usbchmod_OBJECTS = usbchmod.$(OBJEXT)
+usbchmod_LDADD = $(LDADD)
+usbchmod_DEPENDENCIES =
+usbchmod_LDFLAGS =
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DATA = $(usbaux_DATA)
+
+DIST_COMMON = ./stamp-h.in Makefile.am Makefile.in acconfig.h \
+acinclude.m4 aclocal.m4 config.h.in configure configure.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+DEP_FILES = .deps/usbchmod.P .deps/usbhost.P
+SOURCES = $(usbhost_SOURCES) $(usbchmod_SOURCES)
+OBJECTS = $(usbhost_OBJECTS) $(usbchmod_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .o .obj .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
+ cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+config.h: stamp-h
+ @if test ! -f $@; then \
+ rm -f stamp-h; \
+ $(MAKE) stamp-h; \
+ else :; fi
+stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS=config.h:config.h.in \
+ $(SHELL) ./config.status
+ @echo timestamp > stamp-h 2> /dev/null
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
+ @if test ! -f $@; then \
+ rm -f $(srcdir)/stamp-h.in; \
+ $(MAKE) $(srcdir)/stamp-h.in; \
+ else :; fi
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+ cd $(top_srcdir) && $(AUTOHEADER)
+ @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
+
+mostlyclean-hdr:
+
+clean-hdr:
+
+distclean-hdr:
+ -rm -f config.h
+
+maintainer-clean-hdr:
+
+mostlyclean-noinstPROGRAMS:
+
+clean-noinstPROGRAMS:
+ -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+
+distclean-noinstPROGRAMS:
+
+maintainer-clean-noinstPROGRAMS:
+
+mostlyclean-usbauxPROGRAMS:
+
+clean-usbauxPROGRAMS:
+ -test -z "$(usbaux_PROGRAMS)" || rm -f $(usbaux_PROGRAMS)
+
+distclean-usbauxPROGRAMS:
+
+maintainer-clean-usbauxPROGRAMS:
+
+install-usbauxPROGRAMS: $(usbaux_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(usbauxdir)
+ @list='$(usbaux_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(usbauxdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(usbauxdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+
+uninstall-usbauxPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ list='$(usbaux_PROGRAMS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(usbauxdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ done
+
+# FIXME: We should only use cygpath when building on Windows,
+# and only if it is available.
+.c.obj:
+ $(COMPILE) -c `cygpath -w $<`
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+ -rm -f *.$(OBJEXT)
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+usbhost$(EXEEXT): $(usbhost_OBJECTS) $(usbhost_DEPENDENCIES)
+ @rm -f usbhost$(EXEEXT)
+ $(LINK) $(usbhost_LDFLAGS) $(usbhost_OBJECTS) $(usbhost_LDADD) $(LIBS)
+
+usbchmod$(EXEEXT): $(usbchmod_OBJECTS) $(usbchmod_DEPENDENCIES)
+ @rm -f usbchmod$(EXEEXT)
+ $(LINK) $(usbchmod_LDFLAGS) $(usbchmod_OBJECTS) $(usbchmod_LDADD) $(LIBS)
+
+install-usbauxDATA: $(usbaux_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(usbauxdir)
+ @list='$(usbaux_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(usbauxdir)/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(usbauxdir)/$$p; \
+ else if test -f $$p; then \
+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(usbauxdir)/$$p"; \
+ $(INSTALL_DATA) $$p $(DESTDIR)$(usbauxdir)/$$p; \
+ fi; fi; \
+ done
+
+uninstall-usbauxDATA:
+ @$(NORMAL_UNINSTALL)
+ list='$(usbaux_DATA)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(usbauxdir)/$$p; \
+ done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ -rm -rf $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ dc_install_base=`cd $(distdir)/=inst && pwd`; \
+ cd $(distdir)/=build \
+ && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) dist
+ -rm -rf $(distdir)
+ @banner="$(distdir).tar.gz is ready for distribution"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"
+dist: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+dist-all: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+distdir: $(DISTFILES)
+ -rm -rf $(distdir)
+ mkdir $(distdir)
+ -chmod 777 $(distdir)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+
+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-include $(DEP_FILES)
+
+mostlyclean-depend:
+
+clean-depend:
+
+distclean-depend:
+ -rm -rf .deps
+
+maintainer-clean-depend:
+
+%.o: %.c
+ @echo '$(COMPILE) -c $<'; \
+ $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-cp .deps/$(*F).pp .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm .deps/$(*F).pp
+
+%.lo: %.c
+ @echo '$(LTCOMPILE) -c $<'; \
+ $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
+ < .deps/$(*F).pp > .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm -f .deps/$(*F).pp
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+all-recursive-am: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+install-exec-am:
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+install-exec: install-exec-am
+
+install-data-am: install-usbauxPROGRAMS install-usbauxDATA
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-usbauxPROGRAMS uninstall-usbauxDATA
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS) $(DATA) config.h
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(usbauxdir) $(DESTDIR)$(usbauxdir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-hdr mostlyclean-noinstPROGRAMS \
+ mostlyclean-usbauxPROGRAMS mostlyclean-compile \
+ mostlyclean-tags mostlyclean-depend mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-hdr clean-noinstPROGRAMS clean-usbauxPROGRAMS \
+ clean-compile clean-tags clean-depend clean-generic \
+ mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-hdr distclean-noinstPROGRAMS \
+ distclean-usbauxPROGRAMS distclean-compile \
+ distclean-tags distclean-depend distclean-generic \
+ clean-am
+
+distclean: distclean-am
+ -rm -f config.status
+
+maintainer-clean-am: maintainer-clean-hdr \
+ maintainer-clean-noinstPROGRAMS \
+ maintainer-clean-usbauxPROGRAMS \
+ maintainer-clean-compile maintainer-clean-tags \
+ maintainer-clean-depend maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+ -rm -f config.status
+
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
+clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
+mostlyclean-usbauxPROGRAMS distclean-usbauxPROGRAMS \
+clean-usbauxPROGRAMS maintainer-clean-usbauxPROGRAMS \
+uninstall-usbauxPROGRAMS install-usbauxPROGRAMS mostlyclean-compile \
+distclean-compile clean-compile maintainer-clean-compile \
+uninstall-usbauxDATA install-usbauxDATA tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir \
+mostlyclean-depend distclean-depend clean-depend \
+maintainer-clean-depend info-am info dvi-am dvi check check-am \
+installcheck-am installcheck all-recursive-am install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+@SUPPORTED_TRUE@install-exec-hook:
+@SUPPORTED_TRUE@ $(mkinstalldirs) $(bindir)
+@SUPPORTED_TRUE@ $(INSTALL_PROGRAM) usbhost $(bindir)/usbhost_@PACKAGE_VERSION@
+@SUPPORTED_TRUE@ rm -f $(bindir)/usbhost
+@SUPPORTED_TRUE@ $(LN_S) $(bindir)/usbhost_@PACKAGE_VERSION@ $(bindir)/usbhost
+
+@SUPPORTED_TRUE@install-data-hook:
+@SUPPORTED_TRUE@ chown root $(usbauxdir)/usbchmod
+@SUPPORTED_TRUE@ chmod u+s $(usbauxdir)/usbchmod
+
+@SUPPORTED_FALSE@install-exec-hook:
+@SUPPORTED_FALSE@ echo Nothing to be done for this platform
+
+@SUPPORTED_FALSE@install-data-hook:
+@SUPPORTED_FALSE@ echo Nothing to be done for this platform
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/cesar/ecos/packages/io/usb/slave/current/host/acconfig.h b/cesar/ecos/packages/io/usb/slave/current/host/acconfig.h
new file mode 100644
index 0000000000..270c7add76
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/host/acconfig.h
@@ -0,0 +1,51 @@
+#ifndef CYGONCE_USBHOST_CONFIG_H
+# define CYGONCE_USBHOST_CONFIG_H
+
+//======================================================================
+//
+// acconfig.h
+//
+// Configuration header for usbhost
+//
+//======================================================================
+//####COPYRIGHTBEGIN####
+//
+// ----------------------------------------------------------------------------
+// Copyright (C) 2005 eCosCentric Ltd
+//
+// This file is part of the eCos host tools.
+//
+// This program is free software; you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 of the License, or (at your option)
+// any later version.
+//
+// This program is distributed in the hope that it will be useful, but WITHOUT
+// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+// more details.
+//
+// You should have received a copy of the GNU General Public License along with
+// this program; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// ----------------------------------------------------------------------------
+//
+//####COPYRIGHTEND####
+//======================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contact(s): bartv
+// Date: 2005/06/26
+// Version: 0.01
+//
+//####DESCRIPTIONEND####
+//======================================================================
+
+#undef PACKAGE
+#undef VERSION
+#undef CYGBLD_USE_NEW_FIELD_NAMES
+
+#endif // CYGONCE_USBHOST_CONFIG_H
+// End of config.h
diff --git a/cesar/ecos/packages/io/usb/slave/current/host/acinclude.m4 b/cesar/ecos/packages/io/usb/slave/current/host/acinclude.m4
new file mode 100644
index 0000000000..2ee408d66b
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/host/acinclude.m4
@@ -0,0 +1,54 @@
+dnl Process this file with aclocal to get an aclocal.m4 file. Then
+dnl process that with autoconf.
+dnl ====================================================================
+dnl
+dnl acinclude.m4
+dnl
+dnl ====================================================================
+dnl ####ECOSGPLCOPYRIGHTBEGIN####
+dnl -------------------------------------------
+dnl This file is part of eCos, the Embedded Configurable Operating System.
+dnl Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+dnl
+dnl eCos is free software; you can redistribute it and/or modify it under
+dnl the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 or (at your option) any later version.
+dnl
+dnl eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+dnl WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+dnl for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along
+dnl with eCos; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+dnl
+dnl As a special exception, if other files instantiate templates or use macros
+dnl or inline functions from this file, or you compile this file and link it
+dnl with other works to produce a work based on this file, this file does not
+dnl by itself cause the resulting work to be covered by the GNU General Public
+dnl License. However the source code for this file must still be made available
+dnl in accordance with section (3) of the GNU General Public License.
+dnl
+dnl This exception does not invalidate any other reasons why a work based on
+dnl this file might be covered by the GNU General Public License.
+dnl
+dnl Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+dnl at http://sources.redhat.com/ecos/ecos-license/
+dnl -------------------------------------------
+dnl ####ECOSGPLCOPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s): bartv
+dnl Contact(s): bartv
+dnl Date: 2002/01/10
+dnl Version: 0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+dnl Access shared macros.
+dnl AM_CONDITIONAL needs to be mentioned here or else aclocal does not
+dnl incorporate the macro into aclocal.m4
+sinclude(../../../../../../acsupport/acinclude.m4)
diff --git a/cesar/ecos/packages/io/usb/slave/current/host/aclocal.m4 b/cesar/ecos/packages/io/usb/slave/current/host/aclocal.m4
new file mode 100644
index 0000000000..f5395a95e5
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/host/aclocal.m4
@@ -0,0 +1,245 @@
+dnl aclocal.m4 generated automatically by aclocal 1.4-p6
+
+dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+dnl Process this file with aclocal to get an aclocal.m4 file. Then
+dnl process that with autoconf.
+dnl ====================================================================
+dnl
+dnl acinclude.m4
+dnl
+dnl ====================================================================
+dnl ####ECOSGPLCOPYRIGHTBEGIN####
+dnl -------------------------------------------
+dnl This file is part of eCos, the Embedded Configurable Operating System.
+dnl Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+dnl
+dnl eCos is free software; you can redistribute it and/or modify it under
+dnl the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 or (at your option) any later version.
+dnl
+dnl eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+dnl WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+dnl for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along
+dnl with eCos; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+dnl
+dnl As a special exception, if other files instantiate templates or use macros
+dnl or inline functions from this file, or you compile this file and link it
+dnl with other works to produce a work based on this file, this file does not
+dnl by itself cause the resulting work to be covered by the GNU General Public
+dnl License. However the source code for this file must still be made available
+dnl in accordance with section (3) of the GNU General Public License.
+dnl
+dnl This exception does not invalidate any other reasons why a work based on
+dnl this file might be covered by the GNU General Public License.
+dnl
+dnl Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+dnl at http://sources.redhat.com/ecos/ecos-license/
+dnl -------------------------------------------
+dnl ####ECOSGPLCOPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s): bartv
+dnl Contact(s): bartv
+dnl Date: 2002/01/10
+dnl Version: 0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+dnl Access shared macros.
+dnl AM_CONDITIONAL needs to be mentioned here or else aclocal does not
+dnl incorporate the macro into aclocal.m4
+sinclude(../../../../../../acsupport/acinclude.m4)
+
+# Define a conditional.
+
+AC_DEFUN([AM_CONDITIONAL],
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi])
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+# Copyright 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.4-p6])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "[$]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "[$]*" != "X $srcdir/configure conftestfile" \
+ && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "[$]2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN([AM_MISSING_PROG],
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+ $1=$2
+ AC_MSG_RESULT(found)
+else
+ $1="$3/missing $2"
+ AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
+
+# serial 1
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT($USE_MAINTAINER_MODE)
+ AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST(MAINT)dnl
+]
+)
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+AC_DEFUN([AM_CONFIG_HEADER],
+[AC_PREREQ([2.12])
+AC_CONFIG_HEADER([$1])
+dnl When config.status generates a header, we must update the stamp-h file.
+dnl This file resides in the same directory as the config header
+dnl that is generated. We must strip everything past the first ":",
+dnl and everything past the last "/".
+AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
+ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
+<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
+<<am_indx=1
+for am_file in <<$1>>; do
+ case " <<$>>CONFIG_HEADERS " in
+ *" <<$>>am_file "*<<)>>
+ echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
+ ;;
+ esac
+ am_indx=`expr "<<$>>am_indx" + 1`
+done<<>>dnl>>)
+changequote([,]))])
+
diff --git a/cesar/ecos/packages/io/usb/slave/current/host/config.h.in b/cesar/ecos/packages/io/usb/slave/current/host/config.h.in
new file mode 100644
index 0000000000..bc7586aec7
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/host/config.h.in
@@ -0,0 +1,11 @@
+/* config.h.in. Generated automatically from configure.in by autoheader. */
+
+#undef PACKAGE
+#undef VERSION
+#undef CYGBLD_USE_NEW_FIELD_NAMES
+
+/* Define if you have the <linux/usb.h> header file. */
+#undef HAVE_LINUX_USB_H
+
+/* Define if you have the <linux/usbdevice_fs.h> header file. */
+#undef HAVE_LINUX_USBDEVICE_FS_H
diff --git a/cesar/ecos/packages/io/usb/slave/current/host/configure b/cesar/ecos/packages/io/usb/slave/current/host/configure
new file mode 100755
index 0000000000..6710a7ce55
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/host/configure
@@ -0,0 +1,2358 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer"
+ac_help="$ac_help
+ --enable-debug do a debug rather than a release build"
+ac_help="$ac_help
+ --enable-ansi do an ANSI rather than a unicode build"
+ac_help="$ac_help
+ --with-tcl=<path> location of Tcl header and libraries"
+ac_help="$ac_help
+ --with-tcl-version=<vsn> version of Tcl to be used"
+ac_help="$ac_help
+ --with-tcl-header=<path> location of Tcl header"
+ac_help="$ac_help
+ --with-tcl-lib=<path> location of Tcl libraries"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=usbhost.c
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../../../../acsupport $srcdir/../../../../../../acsupport; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in ../../../../../../acsupport $srcdir/../../../../../../acsupport" 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+
+ echo $ac_n "checking that a separate build tree is being used""... $ac_c" 1>&6
+echo "configure:563: checking that a separate build tree is being used" >&5
+ ecos_cwd=`/bin/pwd`
+ if test "${srcdir}" = "." ; then
+ srcdir=${ecos_cwd}
+ fi
+ if test "${ecos_cwd}" = "${srcdir}" ; then
+ echo "$ac_t""no" 1>&6
+ { echo "configure: error: This configure script should not be run inside the source tree. Instead please use a separate build tree" 1>&2; exit 1; }
+ else
+ echo "$ac_t""yes" 1>&6
+ fi
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:582: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+am__api_version="1.4"
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:615: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:668: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "$*" != "X $srcdir/configure conftestfile" \
+ && test "$*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+ fi
+
+ test "$2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+else
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:725: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+PACKAGE=usbhost
+
+VERSION=0.1
+
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
+
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
+echo "configure:764: checking for working aclocal-${am__api_version}" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
+ ACLOCAL=aclocal-${am__api_version}
+ echo "$ac_t""found" 1>&6
+else
+ ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:777: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+ AUTOCONF=autoconf
+ echo "$ac_t""found" 1>&6
+else
+ AUTOCONF="$missing_dir/missing autoconf"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
+echo "configure:790: checking for working automake-${am__api_version}" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
+ AUTOMAKE=automake-${am__api_version}
+ echo "$ac_t""found" 1>&6
+else
+ AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:803: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+ AUTOHEADER=autoheader
+ echo "$ac_t""found" 1>&6
+else
+ AUTOHEADER="$missing_dir/missing autoheader"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:816: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+ MAKEINFO=makeinfo
+ echo "$ac_t""found" 1>&6
+else
+ MAKEINFO="$missing_dir/missing makeinfo"
+ echo "$ac_t""missing" 1>&6
+fi
+
+
+echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
+echo "configure:830: checking whether to enable maintainer-specific portions of Makefiles" >&5
+ # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+ enableval="$enable_maintainer_mode"
+ USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
+
+
+if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+case "${host}" in
+ *-*-linux-gnu* ) SUPPORTED="yes";;
+ * ) SUPPORTED="no"
+esac
+
+if test "${SUPPORTED}" = "no" ; then
+ echo "configure: warning: USB testing is only supported on Linux hosts" 1>&2
+else
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:864: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:894: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:945: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:977: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 988 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1019: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1024: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1052: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
+ for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1088: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CXX="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CXX="$ac_cv_prog_CXX"
+if test -n "$CXX"; then
+ echo "$ac_t""$CXX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$CXX" && break
+done
+test -n "$CXX" || CXX="gcc"
+
+
+echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1120: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 1131 "configure"
+#include "confdefs.h"
+
+int main(){return(0);}
+EOF
+if { (eval echo configure:1136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cxx_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cxx_cross=no
+ else
+ ac_cv_prog_cxx_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cxx_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
+if test $ac_cv_prog_cxx_works = no; then
+ { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1162: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
+cross_compiling=$ac_cv_prog_cxx_cross
+
+echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
+echo "configure:1167: checking whether we are using GNU C++" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.C <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gxx=yes
+else
+ ac_cv_prog_gxx=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gxx" 1>&6
+
+if test $ac_cv_prog_gxx = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+
+ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ac_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS=
+echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
+echo "configure:1195: checking whether ${CXX-g++} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.cc
+if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
+ ac_cv_prog_cxx_g=yes
+else
+ ac_cv_prog_cxx_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS="$ac_save_CXXFLAGS"
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+
+for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat > conftest.$ac_ext <<EOF
+#line 1236 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+int main() {
+exit (42);
+; return 0; }
+EOF
+if { (eval echo configure:1244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ continue
+fi
+rm -f conftest*
+ cat > conftest.$ac_ext <<EOF
+#line 1254 "configure"
+#include "confdefs.h"
+$ac_declaration
+int main() {
+exit (42);
+; return 0; }
+EOF
+if { (eval echo configure:1261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+
+ echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:1278: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+ rm -f conftestdata
+ ac_cv_prog_LN_S="ln -s"
+else
+ ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ echo $ac_n "checking for object suffix""... $ac_c" 1>&6
+echo "configure:1299: checking for object suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftest*
+echo 'int i = 1;' > conftest.$ac_ext
+if { (eval echo configure:1305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ for ac_file in conftest.*; do
+ case $ac_file in
+ *.c) ;;
+ *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
+ esac
+ done
+else
+ { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_objext" 1>&6
+OBJEXT=$ac_cv_objext
+ac_objext=$ac_cv_objext
+
+ echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:1323: checking for Cygwin environment" >&5
+if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1328 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
+; return 0; }
+EOF
+if { (eval echo configure:1339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_cygwin=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_cygwin=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_cygwin" 1>&6
+CYGWIN=
+test "$ac_cv_cygwin" = yes && CYGWIN=yes
+echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
+echo "configure:1356: checking for mingw32 environment" >&5
+if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1361 "configure"
+#include "confdefs.h"
+
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:1368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_mingw32=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_mingw32=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_mingw32" 1>&6
+MINGW32=
+test "$ac_cv_mingw32" = yes && MINGW32=yes
+
+
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:1387: checking for executable suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
+ ac_cv_exeext=.exe
+else
+ rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.$ac_ext
+ ac_cv_exeext=
+ if { (eval echo configure:1397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj) ;;
+ *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ else
+ { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ rm -f conftest*
+ test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
+
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
+
+
+ ecos_CFLAGS=""
+ ecos_CXXFLAGS=""
+ ecos_LDADD=""
+ ecos_INCLUDES=""
+ ecos_LIBS=""
+
+
+
+
+
+
+
+
+
+
+
+ echo $ac_n "checking "for Visual C++"""... $ac_c" 1>&6
+echo "configure:1435: checking "for Visual C++"" >&5
+ MSVC="no";
+ if test "${CC}" = "cl" ; then
+ MSVC="yes"
+ CXX="cl"
+ MSVC_SRCDIR=${srcdir}
+
+
+
+ if test "${MSVC}" = "yes" ; then
+ MSVC_SRCDIR=`cygpath -w ${MSVC_SRCDIR} | tr \\\\\\\\ /`
+ fi
+
+
+ ecos_INCLUDES="${ecos_INCLUDES} \"-I${MSVC_SRCDIR}\""
+ ecos_LDADD="-link"
+ ecos_LIBS="advapi32.lib"
+ fi
+
+
+if test "${MSVC}" = "yes"; then
+ MSVC_TRUE=
+ MSVC_FALSE='#'
+else
+ MSVC_TRUE='#'
+ MSVC_FALSE=
+fi
+ if test "${MSVC}" = "yes" ; then
+ echo "$ac_t""unfortunately yes" 1>&6
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+
+
+
+
+
+
+
+ echo $ac_n "checking "the default compiler flags"""... $ac_c" 1>&6
+echo "configure:1475: checking "the default compiler flags"" >&5
+
+ ecosflags_enable_debug="no"
+ # Check whether --enable-debug or --disable-debug was given.
+if test "${enable_debug+set}" = set; then
+ enableval="$enable_debug"
+ case "${enableval}" in
+ yes) ecosflags_enable_debug="yes" ;;
+ *) ecosflags_enable_debug="no" ;;
+ esac
+fi
+
+
+ ecosflags_enable_ansi="no"
+ if test "${MSVC}" = "yes" ; then
+ # Check whether --enable-ansi or --disable-ansi was given.
+if test "${enable_ansi+set}" = set; then
+ enableval="$enable_ansi"
+ case "${enableval}" in
+ yes) ecosflags_enable_ansi="yes" ;;
+ *) ecosflags_enable_ansi="no" ;;
+ esac
+fi
+
+ fi
+
+ if test "${GCC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -pipe -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -pipe -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Woverloaded-virtual"
+ elif test "${MSVC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -nologo -W3"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -nologo -W3 -GR -GX"
+ else
+ { echo "configure: error: "default flags for ${CC} are not known"" 1>&2; exit 1; }
+ fi
+
+ if test "${ecosflags_enable_debug}" = "yes" ; then
+ if test "${GCC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -g -O0"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -g -O0"
+ elif test "${MSVC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -MDd -Zi"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -MDd -Zi"
+ fi
+ else
+ if test "${GCC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -O0"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -O0"
+ elif test "${MSVC}" = "yes" ; then
+ ecos_CFLAGS="${ecos_CFLAGS} -MD -O2"
+ ecos_CXXFLAGS="${ecos_CXXFLAGS} -MD -O2"
+ fi
+ fi
+
+ CFLAGS="${ac_save_CFLAGS}"
+ CXXFLAGS="${ac_save_CXXFLAGS}"
+
+ echo "$ac_t""done" 1>&6
+
+
+
+ package_dir=`cd ${srcdir} && /bin/pwd`
+ PACKAGE_VERSION=`dirname ${package_dir}`
+ PACKAGE_VERSION=`basename ${PACKAGE_VERSION}`
+
+ package_dir=`dirname ${package_dir}`
+ package_dir=`dirname ${package_dir}`
+
+ possibles="${package_dir}/.. ${package_dir}/../.. ${package_dir}/../../.. ${package_dir}/../../../.."
+ possibles="${possibles} ${package_dir}/../../../../.. ${package_dir}/../../../../../.."
+
+ repository_root=""
+ for i in ${possibles}; do
+ if test -d "$i/"acsupport""; then
+ repository_root=$i
+ break
+ fi
+ done
+
+ if test "${repository_root}" = "" ; then
+ { echo "configure: error: Failed to identify this package's position within the eCos repository" 1>&2; exit 1; }
+ fi
+ ECOS_REPOSITORY=`cd "${repository_root}/packages/pkgconf/.." && /bin/pwd`
+
+ PACKAGE_DIR=`echo ${package_dir} | sed -e "s:${ECOS_REPOSITORY}/::"`
+
+ PACKAGE_INSTALL="${PACKAGE_DIR}/${PACKAGE_VERSION}"
+
+
+
+
+
+
+
+
+
+
+
+
+ ecos_tk_libs=""
+ ecos_tk_libdir=""
+
+ echo $ac_n "checking for Tcl installation""... $ac_c" 1>&6
+echo "configure:1578: checking for Tcl installation" >&5
+ # Check whether --with-tcl or --without-tcl was given.
+if test "${with_tcl+set}" = set; then
+ withval="$with_tcl"
+ :
+fi
+
+ # Check whether --with-tcl-version or --without-tcl-version was given.
+if test "${with_tcl_version+set}" = set; then
+ withval="$with_tcl_version"
+ :
+fi
+
+
+ if test "${MSVC}" = "yes" ; then
+ # Check whether --with-tcl-header or --without-tcl-header was given.
+if test "${with_tcl_header+set}" = set; then
+ withval="$with_tcl_header"
+ :
+fi
+
+ # Check whether --with-tcl-lib or --without-tcl-lib was given.
+if test "${with_tcl_lib+set}" = set; then
+ withval="$with_tcl_lib"
+ :
+fi
+
+ ecos_tcl_incdir=""
+ ecos_tcl_libdir=""
+ if test "${with_tcl_version+set}" != set ; then
+ { echo "configure: error: You must specify a Tcl version using --with-tcl-version=<vsn>" 1>&2; exit 1; }
+ fi
+ if test "${with_tcl_header+set}" = set ; then
+ ecos_tcl_incdir=${with_tcl_header}
+ elif test "${with_tcl+set}" = set ; then
+ ecos_tcl_incdir="${with_tcl}/include"
+ else
+ { echo "configure: error: You must specify a Tcl installation with either --with-tcl=<path> or --with-tcl-header=<path>" 1>&2; exit 1; }
+ fi
+ if test "${with_tcl_lib+set}" = set; then
+ ecos_tcl_libdir=${with_tcl_lib}
+ elif test "${with_tcl+set}" = set; then
+ ecos_tcl_libdir="${with_tcl}/lib"
+ else
+ { echo "configure: error: You must specify a Tcl installation with either --with-tcl=<path> or --with-tcl-lib=<path>" 1>&2; exit 1; }
+ fi
+
+ if test \! -r "${ecos_tcl_incdir}/tcl.h" ; then
+ { echo "configure: error: unable to locate Tcl header file tcl.h" 1>&2; exit 1; }
+ fi
+
+
+
+
+ if test "${MSVC}" = "yes" ; then
+ ecos_tcl_incdir=`cygpath -w ${ecos_tcl_incdir} | tr \\\\\\\\ /`
+ fi
+
+
+
+
+ if test "${MSVC}" = "yes" ; then
+ ecos_tcl_libdir=`cygpath -w ${ecos_tcl_libdir} | tr \\\\\\\\ /`
+ fi
+
+ ecos_INCLUDES="${ecos_INCLUDES} \"-I${ecos_tcl_incdir}\""
+ ecos_LIBS="${ecos_LIBS} tcl${with_tcl_version}.lib"
+ ecos_LDADD="${ecos_LDADD} \"-libpath=${ecos_tcl_libdir}\""
+
+ ecos_tk_libs=""
+
+ else
+ possibles=""
+ if test "${with_tcl+set}" = set ; then
+ possibles="${with_tcl}/lib"
+ if test "${with_tcl_version+set}" = set ; then
+ possibles="${possibles} ${with_tcl}/lib/tcl${with_tcl_version}"
+ fi
+ fi
+ possibles="${possibles} ${prefix}/lib"
+ if test "${with_tcl_version+set}" = set ; then
+ possibles="${possibles} ${prefix}/lib/tcl${with_tcl_version}"
+ fi
+ possibles="${possibles} /usr/lib"
+ if test "${with_tcl_version+set}" = set ; then
+ possibles="${possibles} /usr/lib/tcl${with_tcl_version}"
+ fi
+
+ tclconfig=""
+ for i in ${possibles}; do
+ if test -r "$i/"tclConfig.sh""; then
+ tclconfig=$i
+ break
+ fi
+ done
+
+ if test \! -r "${tclconfig}/tclConfig.sh" ; then
+ { echo "configure: error: unable to locate Tcl configuration file tclConfig.sh" 1>&2; exit 1; }
+ else
+ . ${tclconfig}/tclConfig.sh
+
+ if test -z "${TCL_INC_DIR}" ; then
+ ecos_tcl_incdir="${TCL_PREFIX}/include"
+ else
+ ecos_tcl_incdir="${TCL_INC_DIR}"
+ fi
+ if test \! -r "${ecos_tcl_incdir}/tcl.h" ; then
+ { echo "configure: error: unable to locate Tcl header file tcl.h" 1>&2; exit 1; }
+ else
+ if test "${ecos_tcl_incdir}" != "/usr/include" ; then
+ ecos_INCLUDES="${ecos_INCLUDES} -I${ecos_tcl_incdir}"
+ fi
+ fi
+
+ if test -z "${TCL_LIB_SPEC}" -a "${with_tcl_version+set}" = set ; then
+
+ libtcl=""
+ for i in ${possibles}; do
+ if test -r "$i/"libtcl${with_tcl_version}.a""; then
+ libtcl=$i
+ break
+ fi
+ done
+
+ if test -r "${libtcl}/libtcl${with_tcl_version}.a" ; then
+ TCL_LIB_SPEC="-L${libtcl} -ltcl${with_tcl_version}"
+ fi
+ fi
+ if test -z "${TCL_LIB_SPEC}" ; then
+
+ libtcl=""
+ for i in ${possibles}; do
+ if test -r "$i/"libtcl.a""; then
+ libtcl=$i
+ break
+ fi
+ done
+
+ if test -r "${libtcl}/libtcl.a" ; then
+ TCL_LIB_SPEC="-L${libtcl} -ltcl"
+ fi
+ fi
+ if test -z "${TCL_LIB_SPEC}" ; then
+ { echo "configure: error: ${tclconfig}/tclConfig.sh does not define TCL_LIB_SPEC" 1>&2; exit 1; }
+ fi
+ ecos_LIBS="${ecos_LIBS} ${TCL_LIB_SPEC}"
+
+ possibles=`echo ${possibles} | sed -e 's,tcl,tk,g'`
+
+ tkconfig=""
+ for i in ${possibles}; do
+ if test -r "$i/"tkConfig.sh""; then
+ tkconfig=$i
+ break
+ fi
+ done
+
+ if test \! -r "${tkconfig}/tkConfig.sh" ; then
+ { echo "configure: error: unable to locate Tk config file tkConfig.sh" 1>&2; exit 1; }
+ else
+ . ${tkconfig}/tkConfig.sh
+ if test -z "${TK_INC_DIR}" ; then
+ if test "${TK_PREFIX}" = "/usr" ; then
+ ecos_tk_includes="${TK_XINCLUDES}"
+ else
+ ecos_tk_includes="-I${TK_PREFIX}/include ${TK_XINCLUDES}"
+ fi
+ else
+ ecos_tk_includes="-I${TK_INC_DIR} ${TK_XINCLUDES}"
+ fi
+
+ if test -z "${TK_LIB_SPEC}" -a "${with_tcl_version+set}" = set ; then
+
+ libtk=""
+ for i in ${possibles}; do
+ if test -r "$i/"libtk${with_tcl_version}.a""; then
+ libtk=$i
+ break
+ fi
+ done
+
+ if test -r "${libtk}/libtk${with_tcl_version}.a" ; then
+ TK_LIB_SPEC="-L${libtk} -ltk${with_tcl_version}"
+ fi
+ fi
+ if test -z "${TK_LIB_SPEC}" ; then
+
+ libtk=""
+ for i in ${possibles}; do
+ if test -r "$i/"libtk.a""; then
+ libtk=$i
+ break
+ fi
+ done
+
+ if test -r "${libtk}/libtk.a" ; then
+ TK_LIB_SPEC="-L${libtk} -ltk"
+ fi
+ fi
+ if test -z "${TK_LIB_SPEC}" ; then
+ { echo "configure: error: ${tkconfig}/tkConfig.sh does not define TK_LIB_SPEC" 1>&2; exit 1; }
+ fi
+ ecos_tk_libs="${TK_LIB_SPEC} ${TK_LIBS}"
+ fi
+ fi
+ fi
+
+ echo "$ac_t""-I${ecos_tcl_incdir} ${TCL_LIB_SPEC}" 1>&6
+
+
+
+ if test "${TK_MAJOR_VERSION}" = "8" ; then
+ if test ${TK_MINOR_VERSION} -lt 2 ; then
+ echo "configure: warning: Version 8.2 or greater of Tcl/Tk is required" 1>&2
+ SUPPORTED="no"
+ fi
+ fi
+ if test "${SUPPORTED}" = "yes" ; then
+ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1797: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 1812 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1829 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 1846 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+for ac_hdr in "linux/usb.h" "linux/usbdevice_fs.h"
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1880: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1885 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+SUPPORTED="no"
+fi
+done
+
+ if test "${SUPPORTED}" = "no" ; then
+ echo "configure: warning: Required Linux kernel functionality does not appear to be available" 1>&2
+ else
+ cat > conftest.$ac_ext <<EOF
+#line 1921 "configure"
+#include "confdefs.h"
+
+ #include <linux/usbdevice_fs.h>
+
+int main() {
+
+ static struct usbdevfs_ctrltransfer xx = { .bRequestType = 0 };
+
+; return 0; }
+EOF
+if { (eval echo configure:1932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ cat >> confdefs.h <<\EOF
+#define CYGBLD_USE_NEW_FIELD_NAMES 1
+EOF
+
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ fi
+ fi
+fi
+
+if test "${SUPPORTED}" = "no" ; then
+ echo "configure: warning: The USB testing support cannot be built on this platform." 1>&2
+fi
+
+
+
+if test "${SUPPORTED}" = "yes"; then
+ SUPPORTED_TRUE=
+ SUPPORTED_FALSE='#'
+else
+ SUPPORTED_TRUE='#'
+ SUPPORTED_FALSE=
+fi
+
+
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+DEFS=-DHAVE_CONFIG_H
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "Makefile:Makefile.in config.h:config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
+s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
+s%@MAINT@%$MAINT%g
+s%@CC@%$CC%g
+s%@CXX@%$CXX%g
+s%@LN_S@%$LN_S%g
+s%@OBJEXT@%$OBJEXT%g
+s%@EXEEXT@%$EXEEXT%g
+s%@ecos_CFLAGS@%$ecos_CFLAGS%g
+s%@ecos_CXXFLAGS@%$ecos_CXXFLAGS%g
+s%@ecos_LDADD@%$ecos_LDADD%g
+s%@ecos_INCLUDES@%$ecos_INCLUDES%g
+s%@ecos_LIBS@%$ecos_LIBS%g
+s%@MSVC_SRCDIR@%$MSVC_SRCDIR%g
+s%@MSVC_TRUE@%$MSVC_TRUE%g
+s%@MSVC_FALSE@%$MSVC_FALSE%g
+s%@ECOS_REPOSITORY@%$ECOS_REPOSITORY%g
+s%@PACKAGE_DIR@%$PACKAGE_DIR%g
+s%@PACKAGE_VERSION@%$PACKAGE_VERSION%g
+s%@PACKAGE_INSTALL@%$PACKAGE_INSTALL%g
+s%@ecos_tk_includes@%$ecos_tk_includes%g
+s%@ecos_tk_libs@%$ecos_tk_libs%g
+s%@CPP@%$CPP%g
+s%@SUPPORTED_TRUE@%$SUPPORTED_TRUE%g
+s%@SUPPORTED_FALSE@%$SUPPORTED_FALSE%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile:Makefile.in"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='\([ ]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+ CONFIG_HEADERS="config.h:config.h.in"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ echo creating $ac_file
+
+ rm -f conftest.frag conftest.in conftest.out
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h. And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >> conftest.vals <<\EOF
+s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+ ac_lines=`grep -c . conftest.vals`
+ # grep -c gives empty output for an empty file on some AIX systems.
+ if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+ # Write a limited-size here document to conftest.frag.
+ echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ echo 'CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+ rm -f conftest.vals
+ mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+ rm -f conftest.frag conftest.h
+ echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
+ cat conftest.in >> conftest.h
+ rm -f conftest.in
+ if cmp -s $ac_file conftest.h 2>/dev/null; then
+ echo "$ac_file is unchanged"
+ rm -f conftest.h
+ else
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ fi
+ rm -f $ac_file
+ mv conftest.h $ac_file
+ fi
+fi; done
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/cesar/ecos/packages/io/usb/slave/current/host/configure.in b/cesar/ecos/packages/io/usb/slave/current/host/configure.in
new file mode 100644
index 0000000000..c92122a798
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/host/configure.in
@@ -0,0 +1,121 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl ====================================================================
+dnl
+dnl configure.in
+dnl
+dnl configure script for eCos USB host-side support
+dnl
+dnl ====================================================================
+dnl ####ECOSGPLCOPYRIGHTBEGIN####
+dnl -------------------------------------------
+dnl This file is part of eCos, the Embedded Configurable Operating System.
+dnl Copyright (C) 2005 eCosCentric Ltd
+dnl Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+dnl
+dnl eCos is free software; you can redistribute it and/or modify it under
+dnl the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 or (at your option) any later version.
+dnl
+dnl eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+dnl WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+dnl for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along
+dnl with eCos; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+dnl
+dnl As a special exception, if other files instantiate templates or use macros
+dnl or inline functions from this file, or you compile this file and link it
+dnl with other works to produce a work based on this file, this file does not
+dnl by itself cause the resulting work to be covered by the GNU General Public
+dnl License. However the source code for this file must still be made available
+dnl in accordance with section (3) of the GNU General Public License.
+dnl
+dnl This exception does not invalidate any other reasons why a work based on
+dnl this file might be covered by the GNU General Public License.
+dnl
+dnl Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+dnl at http://sources.redhat.com/ecos/ecos-license/
+dnl -------------------------------------------
+dnl ####ECOSGPLCOPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s): bartv
+dnl Contact(s): bartv
+dnl Date: 2002/01/10
+dnl Version: 0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+
+AC_INIT(usbhost.c)
+
+dnl Pick up the support files from the top-level acsupport directory.
+AC_CONFIG_AUX_DIR(../../../../../../acsupport)
+
+ECOS_CHECK_BUILD_ne_SRC
+AC_CANONICAL_HOST
+AM_INIT_AUTOMAKE(usbhost,0.1,0)
+AM_MAINTAINER_MODE
+
+dnl The current version of the USB testing support depends on
+dnl functionality provided only by Linux platforms, and has only been
+dnl tested on x86 machines, so a test is appropriate here. However
+dnl it is not a good idea for the configure script to report an error:
+dnl that would prevent any top-level configury working for other
+dnl platforms. Instead an automake conditional is used to suppress adding
+dnl targets to the build.
+case "${host}" in
+ *-*-linux-gnu* ) SUPPORTED="yes";;
+ * ) SUPPORTED="no"
+esac
+
+if test "${SUPPORTED}" = "no" ; then
+ AC_MSG_WARN([USB testing is only supported on Linux hosts])
+else
+ AC_PROG_CC
+ AC_PROG_CXX
+ AC_PROG_LN_S
+ AC_OBJEXT
+ AC_EXEEXT
+ ECOS_PROG_MSVC
+ ECOS_PROG_STANDARD_COMPILER_FLAGS
+ ECOS_PACKAGE_DIRS
+
+ ECOS_PATH_TCL
+ dnl Check that the version of tcl is sufficiently recent.
+ dnl e.g. "end" only became a valid index for the
+ dnl string commands after 8.1
+ if test "${TK_MAJOR_VERSION}" = "8" ; then
+ if test ${TK_MINOR_VERSION} -lt 2 ; then
+ AC_MSG_WARN([Version 8.2 or greater of Tcl/Tk is required])
+ SUPPORTED="no"
+ fi
+ fi
+ if test "${SUPPORTED}" = "yes" ; then
+ AC_CHECK_HEADERS("linux/usb.h" "linux/usbdevice_fs.h",,SUPPORTED="no")
+ if test "${SUPPORTED}" = "no" ; then
+ AC_MSG_WARN([Required Linux kernel functionality does not appear to be available])
+ else
+ AC_TRY_COMPILE([
+ #include <linux/usbdevice_fs.h>
+ ], [
+ static struct usbdevfs_ctrltransfer xx = { .bRequestType = 0 };
+ ],
+ AC_DEFINE(CYGBLD_USE_NEW_FIELD_NAMES)
+ )
+ fi
+ fi
+fi
+
+if test "${SUPPORTED}" = "no" ; then
+ AC_MSG_WARN([The USB testing support cannot be built on this platform.])
+fi
+
+AM_CONDITIONAL(SUPPORTED, test "${SUPPORTED}" = "yes")
+
+AM_CONFIG_HEADER(config.h:config.h.in)
+AC_OUTPUT(Makefile:Makefile.in)
diff --git a/cesar/ecos/packages/io/usb/slave/current/host/list.tcl b/cesar/ecos/packages/io/usb/slave/current/host/list.tcl
new file mode 100644
index 0000000000..7b875c07e2
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/host/list.tcl
@@ -0,0 +1,130 @@
+# {{{ Banner
+
+#===============================================================================
+#
+# list.tcl
+#
+# Support for USB testing
+#
+#===============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#===============================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Date: 2001-08-21
+# Purpose: Provide details of the available endpoints
+#
+#####DESCRIPTIONEND####
+#===============================================================================
+#
+
+# }}}
+
+puts "Control endpoint: valid packet sizes are $usbtest::control(min_size) to $usbtest::control(max_size)"
+
+if { 0 != [llength $usbtest::bulk_in_endpoints] } {
+ puts "Bulk IN endpoints: $usbtest::bulk_in_endpoints"
+ foreach ep $usbtest::bulk_in_endpoints {
+ puts [format " %2d: packet sizes %d to %d, padding %d" $ep \
+ $usbtest::bulk_in($ep,min_size) $usbtest::bulk_in($ep,max_size) $usbtest::bulk_in($ep,max_in_padding)]
+ if { "" == $usbtest::bulk_in($ep,devtab) } {
+ puts " no devtab entry"
+ } else {
+ puts " devtab entry $usbtest::bulk_in($ep,devtab)"
+ }
+ }
+}
+if { 0 != [llength $usbtest::bulk_out_endpoints] } {
+ puts "Bulk OUT endpoints: $usbtest::bulk_out_endpoints"
+ foreach ep $usbtest::bulk_out_endpoints {
+ puts [format " %2d: packet sizes %d to %d" $ep \
+ $usbtest::bulk_out($ep,min_size) $usbtest::bulk_out($ep,max_size)]
+ if { "" == $usbtest::bulk_out($ep,devtab) } {
+ puts " no devtab entry"
+ } else {
+ puts " devtab entry $usbtest::bulk_out($ep,devtab)"
+ }
+ }
+}
+
+if { 0 != [llength $usbtest::isochronous_in_endpoints] } {
+ puts "Isochronous IN endpoints: $usbtest::isochronous_in_endpoints"
+ foreach ep $usbtest::isochronous_in_endpoints {
+ puts [format " %2d: packet sizes %d to %d" $ep \
+ $usbtest::isochronous_in($ep,min_size) $usbtest::isochronous_in($ep,max_size)]
+ if { "" == $usbtest::isochronous_in($ep,devtab) } {
+ puts " no devtab entry"
+ } else {
+ puts " devtab entry $usbtest::isochronous_in($ep,devtab)"
+ }
+ }
+}
+if { 0 != [llength $usbtest::isochronous_out_endpoints] } {
+ puts "Isochronous OUT endpoints: $usbtest::isochronous_out_endpoints"
+ foreach ep $usbtest::isochronous_out_endpoints {
+ puts [format " %2d: packet sizes %d to %d" $ep \
+ $usbtest::isochronous_out($ep,min_size) $usbtest::isochronous_out($ep,max_size)]
+ if { "" == $usbtest::isochronous_out($ep,devtab) } {
+ puts " no devtab entry"
+ } else {
+ puts " devtab entry $usbtest::isochronous_out($ep,devtab)"
+ }
+ }
+}
+
+if { 0 != [llength $usbtest::interrupt_in_endpoints] } {
+ puts "Interrupt IN endpoints: $usbtest::interrupt_in_endpoints"
+ foreach ep $usbtest::interrupt_in_endpoints {
+ puts [format " %2d: packet sizes %d to %d" $ep \
+ $usbtest::interrupt_in($ep,min_size) $usbtest::interrupt_in($ep,max_size)]
+ if { "" == $usbtest::interrupt_in($ep,devtab) } {
+ puts " no devtab entry"
+ } else {
+ puts " devtab entry $usbtest::interrupt_in($ep,devtab)"
+ }
+ }
+}
+if { 0 != [llength $usbtest::interrupt_out_endpoints] } {
+ puts "Interrupt OUT endpoints: $usbtest::interrupt_out_endpoints"
+ foreach ep $usbtest::interrupt_out_endpoints {
+ puts [format " %2d: packet sizes %d to %d" $ep \
+ $usbtest::interrupt_out($ep,min_size) $usbtest::interrupt_out($ep,max_size)]
+ if { "" == $usbtest::interrupt_out($ep,devtab) } {
+ puts " no devtab entry"
+ } else {
+ puts " devtab entry $usbtest::interrupt_out($ep,devtab)"
+ }
+ }
+}
diff --git a/cesar/ecos/packages/io/usb/slave/current/host/stamp-h.in b/cesar/ecos/packages/io/usb/slave/current/host/stamp-h.in
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/host/stamp-h.in
diff --git a/cesar/ecos/packages/io/usb/slave/current/host/usbchmod.c b/cesar/ecos/packages/io/usb/slave/current/host/usbchmod.c
new file mode 100644
index 0000000000..69d40b7981
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/host/usbchmod.c
@@ -0,0 +1,180 @@
+//=================================================================
+//
+// usb_chmod.c
+//
+// A utility to manipulate /proc/bus/usb access rights
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// The Linux kernel allows raw access to USB devices via /proc/bus/usb.
+// However, such access requires root privileges: this makes perfect
+// sense for typical USB devices, but gets in the way of eCos USB
+// testing. This utility runs suid and can be used to change the access
+// rights to a specific and validated USB device.
+//
+// Author(s): bartv
+// Date: 2001-07-18
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+// Note: this code is duplicated in usbhost.c. Any changes here
+// should be propagated. For now the routine is too small to warrant
+// a separate source file.
+#define USB_ROOT "/proc/bus/usb/"
+#define PRODUCT_STRING "Red Hat eCos USB test"
+
+static int
+usb_scan_devices(int* bus, int* dev)
+{
+ FILE* devs_file = fopen(USB_ROOT "devices", "r");
+ int current_bus = -1;
+ int current_dev = -1;
+ int ch;
+
+ if (NULL == devs_file) {
+ fprintf(stderr, "Error: unable to access " USB_ROOT "devices\n");
+ return 0;
+ }
+ ch = getc(devs_file);
+ while (EOF != ch) {
+ if ('T' == ch) {
+ if (2 !=fscanf(devs_file, ": Bus=%d %*[^D\n]Dev#=%d", &current_bus, &current_dev)) {
+ current_bus = -1;
+ current_dev = -1;
+ }
+ } else if ('S' == ch) {
+ int start = 0, end = 0;
+ if (EOF != fscanf(devs_file, ": Product=%n" PRODUCT_STRING "%n", &start, &end)) {
+ if (start < end) {
+ *bus = current_bus;
+ *dev = current_dev;
+ break;
+ }
+ }
+ }
+ // Move to the end of the current line.
+ do {
+ ch = getc(devs_file);
+ } while ((EOF != ch) && ('\n' != ch));
+ if (EOF != ch) {
+ ch = getc(devs_file);
+ }
+ }
+
+ fclose(devs_file);
+ if ((-1 != *bus) && (-1 != *dev)) {
+ return 1;
+ }
+ fprintf(stderr, "Error: failed to find a USB device \"" PRODUCT_STRING "\"\n");
+ return 0;
+}
+
+int
+main(int argc, char** argv)
+{
+ int bus, dev;
+ int actual_bus, actual_dev;
+ char devname[_POSIX_PATH_MAX];
+ long strtol_tmp1;
+ char* strtol_tmp2;
+
+ if (3 != argc) {
+ fprintf(stderr, "usb_chmod: wrong number of arguments\n");
+ fprintf(stderr, " : usage, usb_chmod <bus> <dev>\n");
+ exit(EXIT_FAILURE);
+ }
+ if (('\0' == argv[1][0]) || ('\0' == argv[2][0])) {
+ fprintf(stderr, "usb_chmod: invalid arguments\n");
+ exit(EXIT_FAILURE);
+ }
+
+ strtol_tmp1 = strtol(argv[1], &strtol_tmp2, 10);
+ if ('\0' != *strtol_tmp2) {
+ fprintf(stderr, "usbchmod: invalid first argument, not a number\n");
+ exit(EXIT_FAILURE);
+ }
+ if (strtol_tmp1 > INT_MAX) {
+ fprintf(stderr, "usbchmod: invalid first argument, number too large\n");
+ exit(EXIT_FAILURE);
+ }
+ bus = (int) strtol_tmp1;
+
+ strtol_tmp1 = strtol(argv[2], &strtol_tmp2, 10);
+ if ('\0' != *strtol_tmp2) {
+ fprintf(stderr, "usbchmod: invalid second argument, not a number\n");
+ exit(EXIT_FAILURE);
+ }
+ if (strtol_tmp1 > INT_MAX) {
+ fprintf(stderr, "usbchmod: invalid second argument, number too large\n");
+ exit(EXIT_FAILURE);
+ }
+ dev = (int) strtol_tmp1;
+
+ if (!usb_scan_devices(&actual_bus, &actual_dev)) {
+ fprintf(stderr, "usb_chmod: failed to find eCos USB test application\n");
+ exit(EXIT_FAILURE);
+ }
+ if ((bus != actual_bus) || (dev != actual_dev)) {
+ fprintf(stderr, "usbchmod: mismatch between specified and actual USB identifiers.\n");
+ fprintf(stderr, " : eCos test application is at %03d/%03d, not %03d/%03d\n",
+ actual_bus, actual_dev, bus, dev);
+ exit(EXIT_FAILURE);
+ }
+
+ if (_POSIX_PATH_MAX == snprintf(devname, _POSIX_PATH_MAX, "/proc/bus/usb/" "%03d/%03d", actual_bus, actual_dev)) {
+ fprintf(stderr, "usbchmod: internal error, buffer overflow\n");
+ exit(EXIT_FAILURE);
+ }
+
+ if (0 != chmod(devname, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)) {
+ int old_errno = errno;
+ fprintf(stderr, "usbchmod: failed to modify access rights on %s\n", devname);
+ if ((old_errno >= 0) && (old_errno < sys_nerr)) {
+ fprintf(stderr, " : %s\n", sys_errlist[old_errno]);
+ }
+ exit(EXIT_FAILURE);
+ }
+
+ return EXIT_SUCCESS;
+}
diff --git a/cesar/ecos/packages/io/usb/slave/current/host/usbhost.c b/cesar/ecos/packages/io/usb/slave/current/host/usbhost.c
new file mode 100644
index 0000000000..2aa47f5e50
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/host/usbhost.c
@@ -0,0 +1,1913 @@
+/*{{{ Banner */
+
+//=================================================================
+//
+// host.c
+//
+// USB testing - host-side
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2005 eCosCentric Ltd.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Date: 2001-07-04
+//####DESCRIPTIONEND####
+//==========================================================================
+
+// The overall architecture is as follows.
+//
+// The target hardware runs a special application which provides a
+// particular type of USB application, "Red Hat eCos USB testing".
+// This will not be recognised by any device driver, so the Linux
+// kernel will pretty much ignore the device (other host OS's are not
+// considered at this time).
+//
+// This program is the only supported way to interact with that service.
+// It acts as an extended Tcl interpreter, providing a number of new
+// Tcl commands for interacting with the target. All test cases can
+// then be written as Tcl scripts which invoke a series of these commands.
+// These Tcl commands operate essentially though the LINUX usb devfs
+// service which allows ordinary application code to perform USB operations
+// via ioctl()'s.
+
+/*}}}*/
+/*{{{ #include's */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <limits.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <pthread.h>
+#include <semaphore.h>
+// Avoid compatibility problems with Tcl 8.4 vs. earlier
+#define USE_NON_CONST
+#include <tcl.h>
+#include <linux/usb.h>
+#include <linux/usbdevice_fs.h>
+#include "../tests/protocol.h"
+#include "config.h"
+
+/*}}}*/
+
+/*{{{ Backwards compatibility */
+
+// The header file <linux/usbdevice_fs.h> has changed in an incompatible
+// way. This is detected by autoconf
+#ifndef CYGBLD_USE_NEW_FIELD_NAMES
+# define bRequestType requesttype
+# define bRequest request
+# define wValue value
+# define wIndex index
+# define wLength length
+#endif
+
+/*}}}*/
+/*{{{ Statics */
+
+// ----------------------------------------------------------------------------
+// Statics.
+
+// Has the current batch of tests actually terminated? This flag is
+// checked by the various test handlers at appropriate intervals, and
+// helps to handle the case where one of the side has terminated early
+// because an error has been detected.
+static int current_tests_terminated = 0;
+
+// The next local thread to be allocated for testing. This variable can also
+// be used to find out how many threads are involved in the current test.
+// This counter should always be reset to 0 at the end of every test run.
+static int local_thread_count = 0;
+
+// A similar counter for remote threads.
+static int remote_thread_count = 0;
+
+// A file handle for manipulating the USB device at a low level
+static int usb_master_fd = -1;
+
+/*}}}*/
+/*{{{ Logging */
+
+// ----------------------------------------------------------------------------
+// The user can provide one or more -V/--verbose arguments to increase
+// the amount of output generated.
+
+static int verbose = 0;
+
+#define VERBOSE(_level_, _format_, _args_...) \
+ do { \
+ if (verbose >= _level_) { \
+ printf(_format_, ## _args_); \
+ } \
+ } while (0);
+
+/*}}}*/
+/*{{{ Low-level USB access */
+
+// ----------------------------------------------------------------------------
+// Low-level access to a USB device.
+//
+// The various ioctl() calls require a file handle which corresponds to one
+// of the /proc/bus/usb/<abc>/<def> entries. <abc> is a bus number,
+// typically 001 or 001, and <def> is a device number on that bus,
+// e.g. 003. Figuring out <abc> and <def> requires scanning
+// /proc/bus/usb/devices, which is a somewhat complicated text file.
+//
+// This is all somewhat vulnerable to incompatible changes in the
+// Linux kernel, specifically the implementation of the /proc/bus/usb.
+// An alternative approach would be to write a new Linux device driver
+// and interact with that, but that approach is vulnerable to any
+// internal kernel API changes affecting USB device drivers.
+
+// How to access USB devices from userland
+#define USB_ROOT "/proc/bus/usb/"
+
+// How to identify the eCos test case
+#define PRODUCT_STRING "Red Hat eCos USB test"
+
+// Scan through /proc/bus/usb/devices looking for an entry that
+// matches what we are after, specifically a line
+// S: Product=Red Hat eCos USB testcase
+// The required information can then be obtained from the previous
+// line:
+// T: Bus=<abc> ... Dev#= <def> ...
+//
+// Of course the T: line is going to come first, so it is necessary
+// to keep track of the current bus and device numbers.
+//
+// Note: this code is duplicated in usbchmod.c. Any changes here
+// should be propagated. For now the routine is too small to warrant
+// a separate source file.
+
+static int
+usb_scan_devices(int* bus, int* dev)
+{
+ FILE* devs_file;
+ int current_bus = -1;
+ int current_dev = -1;
+ int ch;
+
+ *bus = -1;
+ *dev = -1;
+
+ VERBOSE(1, "Searching " USB_ROOT "devices for the eCos USB test code\n");
+
+ devs_file = fopen(USB_ROOT "devices", "r");
+ if (NULL == devs_file) {
+ fprintf(stderr, "usbhost: error, unable to access " USB_ROOT "devices\n");
+ return 0;
+ }
+ ch = getc(devs_file);
+ while (EOF != ch) {
+ if ('T' == ch) {
+ if (2 !=fscanf(devs_file, ": Bus=%d %*[^D\n]Dev#=%d", &current_bus, &current_dev)) {
+ current_bus = -1;
+ current_dev = -1;
+ }
+ } else if ('S' == ch) {
+ int start = 0, end = 0;
+ if (EOF != fscanf(devs_file, ": Product=%n" PRODUCT_STRING "%n", &start, &end)) {
+ if (start < end) {
+ *bus = current_bus;
+ *dev = current_dev;
+ break;
+ }
+ }
+ }
+ // Move to the end of the current line.
+ do {
+ ch = getc(devs_file);
+ } while ((EOF != ch) && ('\n' != ch));
+ if (EOF != ch) {
+ ch = getc(devs_file);
+ }
+ }
+
+ fclose(devs_file);
+ if ((-1 != *bus) && (-1 != *dev)) {
+ VERBOSE(1, "Found eCos USB test code on bus %d, device %d\n", *bus, *dev);
+ return 1;
+ }
+ fprintf(stderr, "usbhost: error, failed to find a USB device \"" PRODUCT_STRING "\"\n");
+ return 0;
+}
+
+// Actually open the USB device, allowing subsequent ioctl() operations.
+//
+// Typically /proc/bus/usb/... will not allow ordinary applications
+// to perform ioctl()'s. Instead root privileges are required. To work
+// around this there is a little utility usbchmod, installed suid,
+// which can be used to get access to the raw device.
+static int
+usb_open_device(void)
+{
+ char devname[_POSIX_PATH_MAX];
+ static int bus = -1;
+ static int dev = -1;
+ int result;
+
+ if ((-1 == bus) || (-1 == dev)) {
+ if (!usb_scan_devices(&bus, &dev)) {
+ return -1;
+ }
+ }
+
+ if (_POSIX_PATH_MAX == snprintf(devname, _POSIX_PATH_MAX, USB_ROOT "%03d/%03d", bus, dev)) {
+ fprintf(stderr, "usbhost: internal error, buffer overflow\n");
+ exit(EXIT_FAILURE);
+ }
+
+ VERBOSE(1, "Attempting to access USB target via %s\n", devname);
+
+ result = open(devname, O_RDWR);
+ if (-1 == result) {
+ // Check for access right problems. If so, try to work around them
+ // by invoking usbchmod. Always look for this in the install tree,
+ // since it is only that version which is likely to have been
+ // chown'ed and chmod'ed to be suid root.
+ if (EACCES == errno) {
+ char command_name[_POSIX_PATH_MAX];
+
+ VERBOSE(1, "Insufficient access to USB target, running usbchmod\n");
+ if (_POSIX_PATH_MAX == snprintf(command_name, _POSIX_PATH_MAX, "%s/usbchmod %d %d", USBAUXDIR, bus, dev)) {
+ fprintf(stderr, "usbhost: internal error, buffer overflow\n");
+ exit(EXIT_FAILURE);
+ }
+ (void) system(command_name);
+ result = open(devname, O_RDWR);
+ }
+ }
+ if (-1 == result) {
+ fprintf(stderr, "usbhost: error, failed to open \"%s\", errno %d\n", devname, errno);
+ }
+
+ VERBOSE(1, "USB device now accessible via file descriptor %d\n", result);
+
+ // Also perform a set-configuration call, to avoid warnings from
+ // the Linux kernel. Target-side testing is always configuration 1
+ // because only a single configuration is supported.
+ (void) ioctl(result, USBDEVFS_SETCONFIGURATION, 1);
+ return result;
+}
+
+// Exchange a control message with the host. The return value should
+// be 0, or a small positive number indicating the actual number of
+// bytes received which may be less than requested.
+//
+// There appear to be problems with some hosts, manifesting itself as
+// an inability to send control messages that involve additional data
+// from host->target. These problems are not yet well-understood. For
+// now the workaround is to send multiple packets, each with up to
+// four bytes encoded in the index and length fields.
+static int
+usb_control_message(int fd, int request_type, int request, int value, int index, int length, void* data)
+{
+ struct usbdevfs_ctrltransfer transfer;
+ int result = 0;
+
+ VERBOSE(3, "usb_control_message, request %02x, len %d\n", request, length);
+
+ if (length > USBTEST_MAX_CONTROL_DATA) {
+ fprintf(stderr, "usbhost: internal error, control message involves too much data.\n");
+ exit(EXIT_FAILURE);
+ }
+
+#if 1
+ // Workaround - send additional data in the index and length fields.
+ if ((length > 0) && (USB_DIR_OUT == (USB_ENDPOINT_DIR_MASK & request_type))) {
+ int i;
+ unsigned char* buf = (unsigned char*) data;
+
+ for (i = 0; i < length; i+= 4) {
+ int this_len = length - 1;
+ int ioctl_result;
+
+ transfer.bRequestType = USB_TYPE_CLASS | USB_RECIP_DEVICE;
+ if (this_len > 4) {
+ this_len = 4;
+ }
+ switch (this_len) {
+ case 1: transfer.bRequest = USBTEST_CONTROL_DATA1; break;
+ case 2: transfer.bRequest = USBTEST_CONTROL_DATA2; break;
+ case 3: transfer.bRequest = USBTEST_CONTROL_DATA3; break;
+ case 4: transfer.bRequest = USBTEST_CONTROL_DATA4; break;
+ default:
+ fprintf(stderr, "usbhost: internal error, confusion about transfer length.\n");
+ exit(EXIT_FAILURE);
+ }
+ transfer.wValue = (buf[i] << 8) | buf[i+1]; // Possible read beyond end of buffer,
+ transfer.wIndex = (buf[i+2] << 8) | buf[i+3]; // but not worth worrying about.
+ transfer.wLength = 0;
+ transfer.timeout = 10 * 1000; // ten seconds, the target should always accept data faster than this.
+ transfer.data = NULL;
+
+ // This is too strict, deciding what to do about errors should be
+ // handled by higher-level code. However it will do for now.
+ ioctl_result = ioctl(fd, USBDEVFS_CONTROL, &transfer);
+ if (0 != ioctl_result) {
+ fprintf(stderr, "usbhost: error, failed to send control message (data) to target.\n");
+ exit(EXIT_FAILURE);
+ }
+ }
+ // There is no more data to be transferred.
+ length = 0;
+ }
+#endif
+ transfer.bRequestType = request_type;
+ transfer.bRequest = request;
+ transfer.wValue = value;
+ transfer.wIndex = index;
+ transfer.wLength = length;
+ transfer.timeout = 10000;
+ transfer.data = data;
+
+ result = ioctl(fd, USBDEVFS_CONTROL, &transfer);
+ return result;
+}
+
+// A variant of the above which can be called when the target should always respond
+// correctly. This can be used for class control messages.
+static int
+usb_reliable_control_message(int fd, int request_type, int request, int value, int index, int length, void* data)
+{
+ int result = usb_control_message(fd, request_type, request, value, index, length, data);
+ if (-1 == result) {
+ fprintf(stderr, "usbhost: error, failed to send control message %02x to target.\n", request);
+ fprintf(stderr, " : errno %d (%s)\n", errno, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+ return result;
+}
+
+
+// Either send or receive a single bulk message. The top bit of the endpoint
+// number indicates the direction.
+static int
+usb_bulk_message(int fd, int endpoint, unsigned char* buffer, int length)
+{
+ struct usbdevfs_bulktransfer transfer;
+ int result;
+
+ transfer.ep = endpoint;
+ transfer.len = length;
+ transfer.timeout = 60 * 60 * 1000;
+ // An hour. These operations should not time out because that
+ // leaves the system in a confused state. Instead there is
+ // higher-level recovery code that should ensure the operation
+ // really does complete, and the return value here is used
+ // by the calling code to determine whether the operation
+ // was successful or whether there was an error and the recovery
+ // code was invoked.
+ transfer.data = buffer;
+ errno = 0;
+ result = ioctl(fd, USBDEVFS_BULK, &transfer);
+ return result;
+}
+
+
+// Synchronise with the target. This can be used after the host has sent a request that
+// may take a bit of time, e.g. it may involve waking up a thread. The host will send
+// synch requests at regular intervals, until the target is ready.
+//
+// The limit argument can be used to avoid locking up. -1 means loop forever, otherwise
+// it means that many iterations of 100ms apiece.
+static int
+usb_sync(int fd, int limit)
+{
+ unsigned char buf[1];
+ struct timespec delay;
+ int loops = 0;
+ int result = 0;
+
+ VERBOSE(2, "Synchronizing with target\n");
+
+ while (1) {
+ buf[0] = 0;
+ usb_reliable_control_message(fd, USB_TYPE_CLASS | USB_RECIP_DEVICE | USB_DIR_IN, USBTEST_SYNCH, 0, 0, 1, buf);
+ if (buf[0]) {
+ result = 1;
+ break;
+ } else {
+ if ((-1 != limit) && (++loops > limit)) {
+ break;
+ } else {
+ VERBOSE(3, "Not yet synchronized, sleeping\n");
+ delay.tv_sec = 0;
+ delay.tv_nsec = 100000000; // 100 ms
+ nanosleep(&delay, NULL);
+ }
+ }
+ }
+ VERBOSE(2, "%s\n", result ? "Synchronized" : "Not synchronized");
+ return result;
+}
+
+// Abort the target. Things seem to be completely messed up and there is no easy
+// way to restore sanity to both target and host.
+static void
+usb_abort(int fd)
+{
+ VERBOSE(2, "Target-side abort operation invoked\n");
+ usb_reliable_control_message(fd, USB_TYPE_CLASS | USB_RECIP_DEVICE, USBTEST_ABORT, 0, 0, 0, (void*)0);
+}
+
+/*}}}*/
+/*{{{ Initialise endpoints */
+
+// ----------------------------------------------------------------------------
+// On power-up some endpoints may not be in a sensible state. For example,
+// with the SA11x0 the hardware may start accepting bulk OUT transfers
+// before the target-side software has started a receive operation,
+// so if the host sends a bulk packet before the target is ready then
+// things get messy. This is especially troublesome if the target-side
+// attempts any diagnostic output because of verbosity.
+//
+// This code loops through the various endpoints and makes sure that
+// they are all in a reasonable state, before any real tests get run
+// That means known hardware flaws do not show up as test failures,
+// but of course they are still documented and application software
+// will have to do the right thing.
+
+static void
+usb_initialise_control_endpoint(int min_size, int max_size)
+{
+ // At this time there are no known problems on any hardware
+ // that would need to be addressed
+}
+
+static void
+usb_initialise_isochronous_in_endpoint(int number, int min_size, int max_size)
+{
+ // At this time there are no known problems on any hardware
+ // that would need to be addressed
+}
+
+static void
+usb_initialise_isochronous_out_endpoint(int number, int min_size, int max_size)
+{
+ // At this time there are no known problems on any hardware
+ // that would need to be addressed
+}
+
+static void
+usb_initialise_bulk_in_endpoint(int number, int min_size, int max_size, int padding)
+{
+ // At this time there are no known problems on any hardware
+ // that would need to be addressed
+}
+
+static void
+usb_initialise_bulk_out_endpoint(int number, int min_size, int max_size)
+{
+ char buf[1];
+
+ // On the SA1110 the hardware comes up with a bogus default value,
+ // causing the hardware to accept packets before the software has
+ // set up DMA or in any way prepared for incoming data. This is
+ // a problem. It is worked around by making the target receive
+ // a single packet, sending that packet, and then performing a
+ // sync.
+ VERBOSE(2, "Performing bulk OUT initialization on endpoint %d\n", number);
+
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE | USB_DIR_IN,
+ USBTEST_INIT_BULK_OUT, number, 0, 0, (void*) 0);
+ usb_bulk_message(usb_master_fd, number, buf, 1);
+ usb_sync(usb_master_fd, 10);
+}
+
+static void
+usb_initialise_interrupt_in_endpoint(int number, int min_size, int max_size)
+{
+ // At this time there are no known problems on any hardware
+ // that would need to be addressed
+}
+
+static void
+usb_initialise_interrupt_out_endpoint(int number, int min_size, int max_size)
+{
+ // At this time there are no known problems on any hardware
+ // that would need to be addressed
+}
+
+/*}}}*/
+/*{{{ Host/target common code */
+
+#define HOST
+#include "../tests/common.c"
+
+/*}}}*/
+/*{{{ The test cases themselves */
+
+/*{{{ UsbTest definition */
+
+// ----------------------------------------------------------------------------
+// All the data associated with a single test.
+
+typedef struct UsbTest {
+
+ // A "unique" identifier to make verbose output easier to understand.
+ int id;
+ // Which file descriptor should be used to access USB.
+ int fd;
+
+ // Which test should be run.
+ usbtest which_test;
+
+ // Test-specific details.
+ union {
+ UsbTest_Bulk bulk;
+ UsbTest_ControlIn control_in;
+ } test_params;
+
+ // How to recover from any problems. Specifically, what kind of message
+ // could the target send or receive that would unlock the thread on this
+ // side.
+ UsbTest_Recovery recovery;
+
+ int result_pass;
+ char result_message[USBTEST_MAX_MESSAGE];
+ unsigned char buffer[USBTEST_MAX_BULK_DATA + USBTEST_MAX_BULK_DATA_EXTRA];
+} UsbTest;
+
+// Reset the information in a given test. This is used by the pool allocation
+// code. The data union is left alone, filling in the appropriate union
+// member is left to other code.
+static void
+reset_usbtest(UsbTest* test)
+{
+ static int next_id = 1;
+ test->id = next_id++;
+ test->which_test = usbtest_invalid;
+ usbtest_recovery_reset(&(test->recovery));
+ test->result_pass = 0;
+ test->result_message[0] = '\0';
+}
+
+/*}}}*/
+/*{{{ bulk OUT */
+
+static void
+run_test_bulk_out(UsbTest* test)
+{
+ unsigned char* buf = test->buffer;
+ int i;
+
+ VERBOSE(1, "Starting test %d, bulk OUT on endpoint %d\n", test->id, test->test_params.bulk.endpoint);
+
+ for (i = 0; i < test->test_params.bulk.number_packets; i++) {
+ int transferred;
+ int packet_size = test->test_params.bulk.tx_size;
+
+ test->recovery.endpoint = test->test_params.bulk.endpoint;
+ test->recovery.protocol = USB_ENDPOINT_XFER_BULK;
+ test->recovery.size = packet_size;
+
+ usbtest_fill_buffer(&(test->test_params.bulk.data), buf, packet_size);
+ if (verbose < 3) {
+ VERBOSE(2, "Bulk OUT test %d: iteration %d, packet size %d\n", test->id, i, packet_size);
+ } else {
+ // Output the first 32 bytes of data as well.
+ char msg[256];
+ int index;
+ int j;
+ index = snprintf(msg, 255, "Bulk OUT test %d: iteration %d, packet size %d\n Data %s:",
+ test->id, i, packet_size,
+ (usbtestdata_none == test->test_params.bulk.data.format) ? "(uninitialized)" : "");
+
+ for (j = 0; ((j + 3) < packet_size) && (j < 32); j+= 4) {
+ index += snprintf(msg+index, 255-index, " %02x%02x%02x%02x",
+ buf[j], buf[j+1], buf[j+2], buf[j+3]);
+ }
+ if (j < 32) {
+ index += snprintf(msg+index, 255-index, " ");
+ for ( ; j < packet_size; j++) {
+ index += snprintf(msg+index, 255-index, "%02x", buf[j]);
+ }
+
+ }
+ VERBOSE(3, "%s\n", msg);
+ }
+
+ transferred = usb_bulk_message(test->fd, test->test_params.bulk.endpoint, buf, packet_size);
+
+ // Has this test run been aborted for some reason?
+ if (current_tests_terminated) {
+ VERBOSE(2, "Bulk OUT test %d: iteration %d, termination detected\n", test->id, i);
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Host, bulk OUT transfer on endpoint %d: aborted after %d iterations\n",
+ test->test_params.bulk.endpoint & USB_ENDPOINT_NUMBER_MASK, i);
+ return;
+ }
+
+ // If an error occurred, abort this run.
+ if (-1 == transferred) {
+ char errno_buf[USBTEST_MAX_MESSAGE];
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Host, bulk OUT transfer on endpoint %d : host ioctl() system call failed\n errno %d (%s)",
+ test->test_params.bulk.endpoint & USB_ENDPOINT_NUMBER_MASK, errno,
+ strerror_r(errno, errno_buf, USBTEST_MAX_MESSAGE));
+ VERBOSE(2, "Bulk OUT test %d: iteration %d, error:\n %s\n", test->id, i, test->result_message);
+ break;
+ }
+
+ if (0 != test->test_params.bulk.tx_delay) {
+ struct timespec delay;
+
+ VERBOSE(2, "Bulk OUT test %d: iteration %d, sleeping for %d nanoseconds\n", test->id, \
+ i, test->test_params.bulk.tx_delay);
+ // Note that nanosleep() can return early due to incoming signals,
+ // with the unelapsed time returned in a second argument. This
+ // allows for a retry loop. In practice this does not seem
+ // worthwhile, the delays are approximate anyway.
+ delay.tv_sec = test->test_params.bulk.tx_delay / 1000000000;
+ delay.tv_nsec = test->test_params.bulk.tx_delay % 1000000000;
+ nanosleep(&delay, NULL);
+ }
+
+ // Now move on to the next transfer
+ USBTEST_BULK_NEXT(test->test_params.bulk);
+ }
+
+ // If all the packets have been transferred this test has passed.
+ if (i >= test->test_params.bulk.number_packets) {
+ test->result_pass = 1;
+ }
+
+ VERBOSE(1, "Test %d bulk OUT on endpoint %d, result %d\n", test->id, test->test_params.bulk.endpoint, test->result_pass);
+}
+
+/*}}}*/
+/*{{{ bulk IN */
+
+static void
+run_test_bulk_in(UsbTest* test)
+{
+ unsigned char* buf = test->buffer;
+ int i;
+
+ VERBOSE(1, "Starting test %d bulk IN on endpoint %d\n", test->id, test->test_params.bulk.endpoint);
+
+ for (i = 0; i < test->test_params.bulk.number_packets; i++) {
+ int transferred;
+ int tx_size = test->test_params.bulk.tx_size;
+ int rx_size = test->test_params.bulk.rx_size;
+ int size_plus_padding;
+
+ VERBOSE(2, "Bulk IN test %d: iteration %d, rx size %d, tx size %d\n", test->id, i, rx_size, tx_size);
+
+ if (rx_size < tx_size) {
+ rx_size = tx_size;
+ VERBOSE(2, "Bulk IN test %d: iteration %d, packet size reset to %d to match tx size\n",
+ test->id, i, rx_size);
+ }
+ test->recovery.endpoint = test->test_params.bulk.endpoint;
+ test->recovery.protocol = USB_ENDPOINT_XFER_BULK;
+ test->recovery.size = rx_size;
+
+ // Make sure there is no old data lying around
+ if (usbtestdata_none != test->test_params.bulk.data.format) {
+ memset(buf, 0, rx_size);
+ }
+
+ // And do the actual transfer.
+ size_plus_padding = rx_size;
+ if (size_plus_padding < (tx_size + test->test_params.bulk.rx_padding)) {
+ size_plus_padding += test->test_params.bulk.rx_padding;
+ }
+ do {
+ transferred = usb_bulk_message(test->fd, test->test_params.bulk.endpoint, buf, size_plus_padding);
+ } while (0 == transferred);
+
+ // Has this test run been aborted for some reason?
+ if (current_tests_terminated) {
+ VERBOSE(2, "Bulk IN test %d: iteration %d, termination detected\n", test->id, i);
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Host, bulk IN transfer on endpoint %d: aborted after %d iterations\n",
+ test->test_params.bulk.endpoint & USB_ENDPOINT_NUMBER_MASK, i);
+ return;
+ }
+
+ // If an error occurred, abort this run.
+ if (-1 == transferred) {
+ char errno_buf[USBTEST_MAX_MESSAGE];
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Host, bulk IN transfer on endpoint %d : host ioctl() system call failed\n errno %d (%s)",
+ test->test_params.bulk.endpoint & USB_ENDPOINT_NUMBER_MASK, errno,
+ strerror_r(errno, errno_buf, USBTEST_MAX_MESSAGE));
+ VERBOSE(2, "Bulk IN test %d: iteration %d, error:\n %s\n", test->id, i, test->result_message);
+ break;
+ }
+
+ // Did the target send the expected amount of data?
+ if (transferred < tx_size) {
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Host, bulk IN transfer on endpoint %d : the target only sent %d bytes when %d were expected",
+ test->test_params.bulk.endpoint & USB_ENDPOINT_NUMBER_MASK, transferred, tx_size);
+ VERBOSE(2, "Bulk IN test %d: iteration %d, error:\n %s\n", test->id, i, test->result_message);
+ break;
+ }
+
+ if (verbose >= 3) {
+ // Output the first 32 bytes of data
+ char msg[256];
+ int index;
+ int j;
+ index = snprintf(msg, 255, "Bulk IN test %d: iteration %d, transferred %d\n Data %s:",
+ test->id, i, transferred,
+ (usbtestdata_none == test->test_params.bulk.data.format) ? "(uninitialized)" : "");
+
+ for (j = 0; ((j + 3) < transferred) && (j < 32); j+= 4) {
+ index += snprintf(msg+index, 255-index, " %02x%02x%02x%02x",
+ buf[j], buf[j+1], buf[j+2], buf[j+3]);
+ }
+ if (j < 32) {
+ index += snprintf(msg+index, 255-index, " ");
+ for ( ; j < transferred; j++) {
+ index += snprintf(msg+index, 255-index, "%02x", buf[j]);
+ }
+
+ }
+ VERBOSE(3, "%s\n", msg);
+ }
+
+ // Is the data correct?
+ if (!usbtest_check_buffer(&(test->test_params.bulk.data), buf, tx_size)) {
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Host, bulk IN transfer on endpoint %d : mismatch between received and expected data",
+ test->test_params.bulk.endpoint & USB_ENDPOINT_NUMBER_MASK);
+ VERBOSE(2, "Bulk IN test %d: iteration %d, error:\n %s\n", test->id, i, test->result_message);
+ break;
+ }
+
+ if (0 != test->test_params.bulk.rx_delay) {
+ struct timespec delay;
+
+ VERBOSE(2, "Bulk IN test %d: iteration %d, sleeping for %d nanoseconds\n", test->id, \
+ i, test->test_params.bulk.tx_delay);
+ // Note that nanosleep() can return early due to incoming signals,
+ // with the unelapsed time returned in a second argument. This
+ // allows for a retry loop. In practice this does not seem
+ // worthwhile, the delays are approximate anyway.
+ delay.tv_sec = test->test_params.bulk.rx_delay / 1000000000;
+ delay.tv_nsec = test->test_params.bulk.rx_delay % 1000000000;
+ nanosleep(&delay, NULL);
+ }
+
+ USBTEST_BULK_NEXT(test->test_params.bulk);
+ }
+
+
+ // If all the packets have been transferred this test has passed.
+ if (i >= test->test_params.bulk.number_packets) {
+ test->result_pass = 1;
+ }
+
+ VERBOSE(1, "Test %d bulk IN on endpoint %d, result %d\n", test->id, test->test_params.bulk.endpoint, test->result_pass);
+}
+
+/*}}}*/
+/*{{{ control IN */
+
+// Receive appropriate packets via the control endpoint. This is somewhat
+// different from bulk transfers. It is implemented using reserved control
+// messages.
+//
+// Note: it is not entirely clear that this test is safe. There will be
+// concurrent control traffic to detect test termination and the like,
+// and these control messages may interfere with each other. It is not
+// entirely clear how the Linux kernel handles concurrent control
+// operations.
+
+static void
+run_test_control_in(UsbTest* test)
+{
+ unsigned char* buf = test->buffer;
+ int packet_size;
+ int i;
+
+ packet_size = test->test_params.control_in.packet_size_initial;
+ for (i = 0; i < test->test_params.control_in.number_packets; i++) {
+ int transferred;
+
+ test->recovery.endpoint = 0;
+ test->recovery.protocol = USB_ENDPOINT_XFER_CONTROL;
+ test->recovery.size = packet_size;
+
+ // Make sure there is no old data lying around
+ if (usbtestdata_none != test->test_params.control_in.data.format) {
+ memset(buf, 0, packet_size);
+ }
+
+ // And do the actual transfer.
+ transferred = usb_control_message(test->fd, USB_TYPE_RESERVED | USB_RECIP_DEVICE | USB_DIR_IN, USBTEST_RESERVED_CONTROL_IN,
+ 0, 0, packet_size, buf);
+
+ // Has this test run been aborted for some reason?
+ if (current_tests_terminated) {
+ return;
+ }
+
+ // If an error occurred, abort this run.
+ if (-1 == transferred) {
+ char errno_buf[USBTEST_MAX_MESSAGE];
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Host, control IN transfer: host ioctl() system call failed\n errno %d (%s)",
+ errno, strerror_r(errno, errno_buf, USBTEST_MAX_MESSAGE));
+ break;
+ }
+
+ // Did the target send the expected amount of data?
+ if (transferred < packet_size) {
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Host, control IN transfer: the target only sent %d bytes when %d were expected",
+ transferred, packet_size);
+ break;
+ }
+
+ // Is the data correct?
+ if (!usbtest_check_buffer(&(test->test_params.control_in.data), buf, packet_size)) {
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Host, control IN transfer: mismatch between received and expected data");
+ break;
+ }
+
+ USBTEST_CONTROL_NEXT_PACKET_SIZE(packet_size, test->test_params.control_in);
+ }
+
+ // If all the packets have been transferred this test has passed.
+ if (i >= test->test_params.control_in.number_packets) {
+ test->result_pass = 1;
+ }
+}
+
+/*}}}*/
+
+// FIXME: add more tests
+
+/*{{{ run_test() */
+
+// This utility is invoked from a thread in the thread pool whenever there is
+// work to be done. It simply dispatches to the appropriate handler.
+static void
+run_test(UsbTest* test)
+{
+ switch (test->which_test) {
+ case usbtest_bulk_out: run_test_bulk_out(test); break;
+ case usbtest_bulk_in: run_test_bulk_in(test); break;
+ case usbtest_control_in: run_test_control_in(test); break;
+ default:
+ fprintf(stderr, "usbhost: internal error, attempt to execute an unknown test.\n");
+ exit(EXIT_FAILURE);
+ }
+}
+
+/*}}}*/
+
+/*}}}*/
+/*{{{ The thread pool */
+
+// ----------------------------------------------------------------------------
+// A pool of threads and buffers which do the real work. The number of possible
+// concurrent tests is defined in protocol.h. Each one requires a separate
+// thread, transfer buffer, semaphore, and some state information.
+//
+// Although the application is multi-threaded, in practice there is little
+// need for synchronization. Tests will only be started while the pool threads
+// are idle. When the pool threads are running the main thread will be waiting
+// for them all to finish, with a bit of polling to detect error conditions.
+// The pool threads do not share any data, apart from the file descriptor for
+// the USB device.
+
+typedef struct PoolEntry {
+ pthread_t thread;
+ sem_t wakeup;
+ int running;
+ UsbTest test;
+} PoolEntry;
+
+static PoolEntry pool[USBTEST_MAX_CONCURRENT_TESTS];
+
+// This is the entry point for every thread in the pool. It just loops forever,
+// waiting until it is supposed to run a test. These threads never actually
+// exit, instead there should be a call to exit() somewhere.
+static void*
+pool_function(void* arg)
+{
+ PoolEntry* pool_entry = (PoolEntry*) arg;
+ for ( ; ; ) {
+ sem_wait(&(pool_entry->wakeup));
+ run_test(&(pool_entry->test));
+ pool_entry->running = 0;
+ }
+
+ return NULL;
+}
+
+// Initialize all threads in the pool.
+static void
+pool_initialize(void)
+{
+ int i;
+ for (i = 0; i < USBTEST_MAX_CONCURRENT_TESTS; i++) {
+ pool[i].running = 0;
+ pool[i].test.fd = dup(usb_master_fd);
+ if (0 != sem_init(&(pool[i].wakeup), 0, 0)) {
+ fprintf(stderr, "usbhost: internal error, failed to initialize all semaphores.\n");
+ exit(EXIT_FAILURE);
+ }
+ if (0 != pthread_create(&(pool[i].thread), NULL, &pool_function, (void*) &(pool[i]))) {
+ fprintf(stderr, "usbhost: internal error, failed to start all threads.\n");
+ exit(EXIT_FAILURE);
+ }
+ }
+}
+
+// Allocate a single entry in the thread pool.
+static UsbTest*
+pool_allocate(void)
+{
+ UsbTest* result = (UsbTest*) 0;
+
+ if (local_thread_count == USBTEST_MAX_CONCURRENT_TESTS) {
+ fprintf(stderr, "usbhost: internal error, thread resource exhausted.\n");
+ exit(EXIT_FAILURE);
+ }
+
+ result = &(pool[local_thread_count].test);
+ local_thread_count++;
+ reset_usbtest(result);
+ return result;
+}
+
+// Start all the threads that are supposed to be running tests.
+static void
+pool_start(void)
+{
+ int i;
+ for (i = 0; i < local_thread_count; i++) {
+ pool[i].running = 1;
+ sem_post(&(pool[i].wakeup));
+ }
+}
+
+/*}}}*/
+/*{{{ Tcl routines */
+
+// ----------------------------------------------------------------------------
+// Tcl routines to provide access to the USB device from inside Tcl
+// scripts, plus some general utilities. These routines deal mostly
+// with preparing a test run. The actual work is done in C: the
+// ioctl() operations are not readily accessible from Tcl, and
+// operations like filling in buffers and calculating checksums are
+// cpu-intensive.
+
+/*{{{ pass/fail/abort */
+
+// ----------------------------------------------------------------------------
+// Some simple routines accessible from Tcl to get the target to report pass/fail or
+// to make the target abort.
+
+static int
+tcl_target_pass(ClientData clientData __attribute__ ((unused)),
+ Tcl_Interp* interp,
+ int argc,
+ char** argv)
+{
+ if (2 != argc) {
+ Tcl_SetResult(interp, "wrong # args: should be \"usbtest::target_pass <message>\"", TCL_STATIC);
+ return TCL_ERROR;
+ }
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE, USBTEST_PASS, 0, 0, strlen(argv[1]) + 1, argv[1]);
+ usb_sync(usb_master_fd, -1);
+ return TCL_OK;
+}
+
+static int
+tcl_target_fail(ClientData clientData __attribute__ ((unused)),
+ Tcl_Interp* interp,
+ int argc,
+ char** argv)
+{
+ if (2 != argc) {
+ Tcl_SetResult(interp, "wrong # args: should be \"usbtest::target_fail <message>\"", TCL_STATIC);
+ return TCL_ERROR;
+ }
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE, USBTEST_FAIL, 0, 0, strlen(argv[1]) + 1, argv[1]);
+ usb_sync(usb_master_fd, -1);
+ return TCL_OK;
+}
+
+// The next three routines cause the target to exit, so a usb_sync() is inappropriate.
+static int
+tcl_target_pass_exit(ClientData clientData __attribute__ ((unused)),
+ Tcl_Interp* interp,
+ int argc,
+ char** argv)
+{
+ if (2 != argc) {
+ Tcl_SetResult(interp, "wrong # args: should be \"usbtest::target_pass_exit <message>\"", TCL_STATIC);
+ return TCL_ERROR;
+ }
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE, USBTEST_PASS_EXIT, 0, 0,
+ strlen(argv[1]) + 1, argv[1]);
+ return TCL_OK;
+}
+
+
+static int
+tcl_target_fail_exit(ClientData clientData __attribute__ ((unused)),
+ Tcl_Interp* interp,
+ int argc,
+ char** argv)
+{
+ if (2 != argc) {
+ Tcl_SetResult(interp, "wrong # args: should be \"usbtest::target_fail_exit <message>\"", TCL_STATIC);
+ return TCL_ERROR;
+ }
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE, USBTEST_FAIL_EXIT, 0, 0,
+ strlen(argv[1]) + 1, argv[1]);
+ return TCL_OK;
+}
+
+static int
+tcl_target_abort(ClientData clientData __attribute__ ((unused)),
+ Tcl_Interp* interp,
+ int argc,
+ char** argv __attribute__ ((unused)) )
+{
+ if (1 != argc) {
+ Tcl_SetResult(interp, "wrong # args: should be \"usbtest::target_abort\"", TCL_STATIC);
+ return TCL_ERROR;
+ }
+ usb_abort(usb_master_fd);
+ return TCL_OK;
+}
+
+/*}}}*/
+/*{{{ start bulk test */
+
+// ----------------------------------------------------------------------------
+// Start a bulk test. The real Tcl interface to this functionality is
+// implemented in Tcl: it takes care of figuring out sensible default
+// arguments, validating the data, etc. All that this code does is
+// allocate a thread and fill in the appropriate data, plus request
+// the target-side to do the same thing.
+
+static int
+tcl_test_bulk(ClientData clientData __attribute__ ((unused)),
+ Tcl_Interp* interp,
+ int argc,
+ char** argv)
+{
+ int i;
+ int tmp;
+ UsbTest* test;
+ unsigned char request[USBTEST_MAX_CONTROL_DATA];
+ int request_index;
+
+ // The data consists of 28 numbers for UsbTest_Bulk itself, and
+ // another 10 numbers for the test data definition.
+ if (39 != argc) {
+ Tcl_SetResult(interp, "wrong # args: should be \"usbtest::_test_bulk <message>\"", TCL_STATIC);
+ return TCL_ERROR;
+ }
+ for (i = 1; i < 39; i++) {
+ int discard;
+ if (TCL_OK != Tcl_GetInt(interp, argv[i], &discard)) {
+ Tcl_SetResult(interp, "invalid argument: all arguments should be numbers", TCL_STATIC);
+ return TCL_ERROR;
+ }
+ }
+
+ test = pool_allocate();
+ Tcl_GetInt(interp, argv[1], &(test->test_params.bulk.number_packets));
+ Tcl_GetInt(interp, argv[2], &(test->test_params.bulk.endpoint));
+ test->which_test = (USB_DIR_IN == (test->test_params.bulk.endpoint & USB_ENDPOINT_DIR_MASK))
+ ? usbtest_bulk_in : usbtest_bulk_out;
+ Tcl_GetInt(interp, argv[ 3], &(test->test_params.bulk.tx_size));
+ Tcl_GetInt(interp, argv[ 4], &(test->test_params.bulk.tx_size_min));
+ Tcl_GetInt(interp, argv[ 5], &(test->test_params.bulk.tx_size_max));
+ Tcl_GetInt(interp, argv[ 6], &(test->test_params.bulk.tx_size_multiplier));
+ Tcl_GetInt(interp, argv[ 7], &(test->test_params.bulk.tx_size_divisor));
+ Tcl_GetInt(interp, argv[ 8], &(test->test_params.bulk.tx_size_increment));
+ Tcl_GetInt(interp, argv[ 9], &(test->test_params.bulk.rx_size));
+ Tcl_GetInt(interp, argv[10], &(test->test_params.bulk.rx_size_min));
+ Tcl_GetInt(interp, argv[11], &(test->test_params.bulk.rx_size_max));
+ Tcl_GetInt(interp, argv[12], &(test->test_params.bulk.rx_size_multiplier));
+ Tcl_GetInt(interp, argv[13], &(test->test_params.bulk.rx_size_divisor));
+ Tcl_GetInt(interp, argv[14], &(test->test_params.bulk.rx_size_increment));
+ Tcl_GetInt(interp, argv[15], &(test->test_params.bulk.rx_padding));
+ Tcl_GetInt(interp, argv[16], &(test->test_params.bulk.tx_delay));
+ Tcl_GetInt(interp, argv[17], &(test->test_params.bulk.tx_delay_min));
+ Tcl_GetInt(interp, argv[18], &(test->test_params.bulk.tx_delay_max));
+ Tcl_GetInt(interp, argv[19], &(test->test_params.bulk.tx_delay_multiplier));
+ Tcl_GetInt(interp, argv[20], &(test->test_params.bulk.tx_delay_divisor));
+ Tcl_GetInt(interp, argv[21], &(test->test_params.bulk.tx_delay_increment));
+ Tcl_GetInt(interp, argv[22], &(test->test_params.bulk.rx_delay));
+ Tcl_GetInt(interp, argv[23], &(test->test_params.bulk.rx_delay_min));
+ Tcl_GetInt(interp, argv[24], &(test->test_params.bulk.rx_delay_max));
+ Tcl_GetInt(interp, argv[25], &(test->test_params.bulk.rx_delay_multiplier));
+ Tcl_GetInt(interp, argv[26], &(test->test_params.bulk.rx_delay_divisor));
+ Tcl_GetInt(interp, argv[27], &(test->test_params.bulk.rx_delay_increment));
+ Tcl_GetInt(interp, argv[28], &tmp);
+ test->test_params.bulk.io_mechanism = (usb_io_mechanism) tmp;
+ Tcl_GetInt(interp, argv[29], &tmp);
+ test->test_params.bulk.data.format = (usbtestdata) tmp;
+ Tcl_GetInt(interp, argv[30], &(test->test_params.bulk.data.seed));
+ Tcl_GetInt(interp, argv[31], &(test->test_params.bulk.data.multiplier));
+ Tcl_GetInt(interp, argv[32], &(test->test_params.bulk.data.increment));
+ Tcl_GetInt(interp, argv[33], &(test->test_params.bulk.data.transfer_seed_multiplier));
+ Tcl_GetInt(interp, argv[34], &(test->test_params.bulk.data.transfer_seed_increment));
+ Tcl_GetInt(interp, argv[35], &(test->test_params.bulk.data.transfer_multiplier_multiplier));
+ Tcl_GetInt(interp, argv[36], &(test->test_params.bulk.data.transfer_multiplier_increment));
+ Tcl_GetInt(interp, argv[37], &(test->test_params.bulk.data.transfer_increment_multiplier));
+ Tcl_GetInt(interp, argv[38], &(test->test_params.bulk.data.transfer_increment_increment));
+
+ VERBOSE(3, "Preparing USB bulk test on endpoint %d, direction %s, for %d packets\n", \
+ test->test_params.bulk.endpoint, \
+ (usbtest_bulk_in == test->which_test) ? "IN" : "OUT", \
+ test->test_params.bulk.number_packets);
+ VERBOSE(3, " I/O mechanism is %s\n", \
+ (usb_io_mechanism_usb == test->test_params.bulk.io_mechanism) ? "low-level USB" : \
+ (usb_io_mechanism_dev == test->test_params.bulk.io_mechanism) ? "devtab" : "<invalid>");
+ VERBOSE(3, " Data format %s, data1 %d, data* %d, data+ %d, data1* %d, data1+ %d, data** %d, data*+ %d, data+* %d, data++ %d\n",\
+ (usbtestdata_none == test->test_params.bulk.data.format) ? "none" : \
+ (usbtestdata_bytefill == test->test_params.bulk.data.format) ? "bytefill" : \
+ (usbtestdata_wordfill == test->test_params.bulk.data.format) ? "wordfill" : \
+ (usbtestdata_byteseq == test->test_params.bulk.data.format) ? "byteseq" : \
+ (usbtestdata_wordseq == test->test_params.bulk.data.format) ? "wordseq" : "<invalid>", \
+ test->test_params.bulk.data.seed, \
+ test->test_params.bulk.data.multiplier, \
+ test->test_params.bulk.data.increment, \
+ test->test_params.bulk.data.transfer_seed_multiplier, \
+ test->test_params.bulk.data.transfer_seed_increment, \
+ test->test_params.bulk.data.transfer_multiplier_multiplier, \
+ test->test_params.bulk.data.transfer_multiplier_increment, \
+ test->test_params.bulk.data.transfer_increment_multiplier, \
+ test->test_params.bulk.data.transfer_increment_increment);
+ VERBOSE(3, " txsize1 %d, txsize>= %d, txsize<= %d, txsize* %d, txsize/ %d, txsize+ %d\n", \
+ test->test_params.bulk.tx_size, test->test_params.bulk.tx_size_min, \
+ test->test_params.bulk.tx_size_max, test->test_params.bulk.tx_size_multiplier, \
+ test->test_params.bulk.tx_size_divisor, test->test_params.bulk.tx_size_increment);
+ VERBOSE(3, " rxsize1 %d, rxsize>= %d, rxsize<= %d, rxsize* %d, rxsize/ %d, rxsize+ %d\n", \
+ test->test_params.bulk.rx_size, test->test_params.bulk.rx_size_min, \
+ test->test_params.bulk.rx_size_max, test->test_params.bulk.rx_size_multiplier, \
+ test->test_params.bulk.rx_size_divisor, test->test_params.bulk.rx_size_increment);
+ VERBOSE(3, " txdelay1 %d, txdelay>= %d, txdelay<= %d, txdelay* %d, txdelay/ %d, txdelay+ %d\n", \
+ test->test_params.bulk.tx_delay, test->test_params.bulk.tx_delay_min, \
+ test->test_params.bulk.tx_delay_max, test->test_params.bulk.tx_delay_multiplier, \
+ test->test_params.bulk.tx_delay_divisor, test->test_params.bulk.tx_delay_increment);
+ VERBOSE(3, " rxdelay1 %d, rxdelay>= %d, rxdelay<= %d, rxdelay* %d, rxdelay/ %d, rxdelay+ %d\n", \
+ test->test_params.bulk.rx_delay, test->test_params.bulk.rx_delay_min, \
+ test->test_params.bulk.rx_delay_max, test->test_params.bulk.rx_delay_multiplier, \
+ test->test_params.bulk.rx_delay_divisor, test->test_params.bulk.rx_delay_increment);
+
+
+ // That is all the data converted from Tcl to C, and a local thread is set up to handle this
+ // request. Also set up a thread on the target.
+ request_index = 0;
+ pack_usbtest_bulk(&(test->test_params.bulk), request, &request_index);
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE, USBTEST_TEST_BULK, 0, 0, request_index, request);
+ remote_thread_count++;
+
+ return TCL_OK;
+}
+
+/*}}}*/
+/*{{{ start control-in test */
+
+// ----------------------------------------------------------------------------
+// Start a control-in test. The real Tcl interface to this
+// functionality is implemented in Tcl: it takes care of figuring out
+// sensible default arguments, validating the data, etc. All that this
+// code does is allocate a thread and fill in the appropriate data,
+// plus request the target-side to do the same thing.
+
+static int
+tcl_test_control_in(ClientData clientData __attribute__ ((unused)),
+ Tcl_Interp* interp,
+ int argc,
+ char** argv)
+{
+ int i;
+ int tmp;
+ UsbTest* test;
+ unsigned char request[USBTEST_MAX_CONTROL_DATA];
+ int request_index;
+
+ // The data consists of 6 numbers for UsbTest_ControlIn itself, and
+ // another 10 numbers for the test data definition.
+ if (17 != argc) {
+ Tcl_SetResult(interp, "wrong # args: should be \"usbtest::_test_control_in <message>\"", TCL_STATIC);
+ return TCL_ERROR;
+ }
+ for (i = 1; i < 17; i++) {
+ int discard;
+ if (TCL_OK != Tcl_GetInt(interp, argv[i], &discard)) {
+ Tcl_SetResult(interp, "invalid argument: all arguments should be numbers", TCL_STATIC);
+ return TCL_ERROR;
+ }
+ }
+
+ test = pool_allocate();
+ test->which_test = usbtest_control_in;
+ Tcl_GetInt(interp, argv[1], &(test->test_params.control_in.number_packets));
+ Tcl_GetInt(interp, argv[2], &(test->test_params.control_in.packet_size_initial));
+ Tcl_GetInt(interp, argv[3], &(test->test_params.control_in.packet_size_min));
+ Tcl_GetInt(interp, argv[4], &(test->test_params.control_in.packet_size_max));
+ Tcl_GetInt(interp, argv[5], &(test->test_params.control_in.packet_size_multiplier));
+ Tcl_GetInt(interp, argv[6], &(test->test_params.control_in.packet_size_increment));
+ Tcl_GetInt(interp, argv[7], &tmp);
+ test->test_params.bulk.data.format = (usbtestdata) tmp;
+ Tcl_GetInt(interp, argv[ 8], &(test->test_params.control_in.data.seed));
+ Tcl_GetInt(interp, argv[ 9], &(test->test_params.control_in.data.multiplier));
+ Tcl_GetInt(interp, argv[10], &(test->test_params.control_in.data.increment));
+ Tcl_GetInt(interp, argv[11], &(test->test_params.control_in.data.transfer_seed_multiplier));
+ Tcl_GetInt(interp, argv[12], &(test->test_params.control_in.data.transfer_seed_increment));
+ Tcl_GetInt(interp, argv[13], &(test->test_params.control_in.data.transfer_multiplier_multiplier));
+ Tcl_GetInt(interp, argv[14], &(test->test_params.control_in.data.transfer_multiplier_increment));
+ Tcl_GetInt(interp, argv[15], &(test->test_params.control_in.data.transfer_increment_multiplier));
+ Tcl_GetInt(interp, argv[16], &(test->test_params.control_in.data.transfer_increment_increment));
+
+ // That is all the data converted from Tcl to C, and a local thread is set up to handle this
+ // request. Also set up a thread on the target.
+ request_index = 0;
+ pack_usbtest_control_in(&(test->test_params.control_in), request, &request_index);
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE, USBTEST_TEST_CONTROL_IN, 0, 0,
+ request_index, request);
+ remote_thread_count++;
+
+ return TCL_OK;
+}
+
+/*}}}*/
+/*{{{ Cancel the current batch of tests */
+
+static int
+tcl_cancel(ClientData clientData __attribute__ ((unused)),
+ Tcl_Interp* interp,
+ int argc,
+ char** argv __attribute__ ((unused)) )
+{
+ if (1 != argc) {
+ Tcl_SetResult(interp, "wrong # args: should be \"usbtest::cancel\"", TCL_STATIC);
+ return TCL_ERROR;
+ }
+
+ // Send the request on to the target.
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE, USBTEST_CANCEL, 0, 0, 0, (void*)0);
+
+ // Now cancel all the local tests. This can be done by resetting the counter
+ // of allocated threads: no actual work will have been started yet.
+ local_thread_count = 0;
+
+ // And synchronise with the target
+ if (!usb_sync(usb_master_fd, 30)) {
+ fprintf(stderr, "usbhost: error, target has failed to process test cancel request.\n");
+ exit(EXIT_FAILURE);
+
+ }
+ remote_thread_count = 0;
+
+ return TCL_OK;
+}
+
+/*}}}*/
+/*{{{ Run a batch of tests */
+
+// ----------------------------------------------------------------------------
+// This code does an awful lot of the hard work. Start with various utilities.
+
+// Has the current batch finished as far as the local threads are concerned?
+static int
+local_batch_finished(void)
+{
+ int result = 1;
+ int i;
+
+ for (i = 0; i < local_thread_count; i++) {
+ if (pool[i].running) {
+ result = 0;
+ break;
+ }
+ }
+ return result;
+}
+
+// Has the current batch finished as far as remote threads are concerned?
+static int
+remote_batch_finished(void)
+{
+ char buf[1];
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE | USB_DIR_IN, USBTEST_FINISHED,
+ 0, 0, 1, (void*) buf);
+ return buf[0];
+}
+
+// Perform recovery for a thread on the target. This involves asking the
+// target for recovery information, then performing an appropriate
+// action. If no data is returned then no recovery is needed for this thread.
+static void
+recover_remote(int index)
+{
+ unsigned char buffer[USBTEST_MAX_CONTROL_DATA];
+ int buffer_index;
+ UsbTest_Recovery recovery;
+ int i;
+
+ if (0 != usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE | USB_DIR_IN,
+ USBTEST_GET_RECOVERY, 0, index, 12, buffer)) {
+ // There is work to be done
+ buffer_index = 0;
+ unpack_usbtest_recovery(&recovery, buffer, &buffer_index);
+
+ // We have an endpoint, a protocol, and a size.
+ if (0 == recovery.endpoint) {
+ // The target just needs a dummy reserved control message
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_RESERVED | USB_RECIP_DEVICE, USBTEST_RESERVED_CONTROL_IN,
+ 0, 0, 0, (void*) 0);
+ } else if (USB_ENDPOINT_XFER_BULK == recovery.protocol) {
+ // Either we need to send some data to the target, or we need to accept some data.
+ static unsigned char recovery_buffer[USBTEST_MAX_BULK_DATA + USBTEST_MAX_BULK_DATA_EXTRA];
+
+ struct usbdevfs_bulktransfer transfer;
+ transfer.ep = recovery.endpoint;
+ transfer.timeout = 2000; // Two seconds. Should be plenty, even for a large bulk transfer.
+ transfer.data = recovery_buffer;
+ if (USB_DIR_IN == (recovery.endpoint & USB_ENDPOINT_DIR_MASK)) {
+ transfer.len = recovery.size;
+ } else {
+ transfer.len = 1;
+ }
+ errno = 0;
+ i = ioctl(usb_master_fd, USBDEVFS_BULK, &transfer);
+ }
+
+ // There is no recovery support yet for other protocols.
+ }
+}
+
+// Perform recovery for a local thread. This involves extracting the
+// recovery information from the local thread and asking the target
+// to take appropriate action.
+static void
+recover_local(int index)
+{
+ unsigned char buffer[USBTEST_MAX_CONTROL_DATA];
+ int buffer_index;
+
+ if (pool[index].running) {
+ buffer_index = 0;
+ pack_usbtest_recovery(&(pool[index].test.recovery), buffer, &buffer_index);
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE, USBTEST_PERFORM_RECOVERY,
+ 0, 0, buffer_index, (void*) buffer);
+ }
+}
+
+// All done, time for a clean-up on both target and host. The latter
+// is achieved simply by resetting the thread pool, which actually
+// just means resetting the counter since all the threads are blocked
+// waiting for the next batch.
+static void
+run_done(void)
+{
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE, USBTEST_BATCH_DONE, 0, 0, 0, (void*) NULL);
+ local_thread_count = 0;
+ remote_thread_count = 0;
+}
+
+// The main routine, as invoked from Tcl. This takes a single
+// argument, a timeout in seconds.
+static int
+tcl_run(ClientData clientData __attribute__ ((unused)),
+ Tcl_Interp* interp,
+ int argc,
+ char** argv __attribute__ ((unused)) )
+{
+ struct timespec delay;
+ int timeout;
+ time_t start;
+ time_t now;
+ int i, j;
+ unsigned char result_buf[USBTEST_MAX_CONTROL_DATA];
+ int all_ok;
+
+ if (2 != argc) {
+ Tcl_SetResult(interp, "wrong # args: should be \"usbtest::_run <timeout>\"", TCL_STATIC);
+ return TCL_ERROR;
+ }
+ if (TCL_OK != Tcl_GetInt(interp, argv[1], &timeout)) {
+ Tcl_SetResult(interp, "invalid argument: timeout should be numeric", TCL_STATIC);
+ return TCL_ERROR;
+ }
+
+ VERBOSE(2, "Starting a testrun, timeout %d seconds\n", timeout);
+
+ // Start the tests running on the target. The target USB hardware
+ // will not actually do anything except in response to packets
+ // from the host, so it is better to start the target before the
+ // local threads.
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE, USBTEST_START, 0, 0, 0, (void*) 0);
+
+ // Now the local threads can get going.
+ current_tests_terminated = 0;
+ pool_start();
+
+ // Now leave the various testing threads to do their thing until
+ // either side believes that the batch has finished, or until the
+ // timeout expires. Note that if one side decides that the batch
+ // has finished but the other disagrees, that in itself indicates
+ // a test failure of sorts.
+ //
+ // There is a question of polling frequency. Once a second avoids
+ // excessive polling traffic on the USB bus, and should not impose
+ // intolerable delays for short-duration tests.
+ start = time(NULL);
+ do {
+ VERBOSE(3, "The tests are running, waiting for termination\n");
+ delay.tv_sec = 1;
+ delay.tv_nsec = 0;
+ nanosleep(&delay, NULL);
+ now = time(NULL);
+ } while (((start + timeout) > now) && !local_batch_finished() && !remote_batch_finished());
+
+ VERBOSE(2, "Termination detected, time elapsed %ld\n", (long) now - start);
+
+ // If either side believes that testing is not complete, things
+ // get messy. Start by setting the terminated flag. Any tests that
+ // are actually still running happily but have not finished within
+ // the timeout should detect this and stop.
+ if (!local_batch_finished() || !remote_batch_finished()) {
+ VERBOSE(2, "Testing is not yet complete, setting TERMINATED flag\n");
+ current_tests_terminated = 1;
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE, USBTEST_SET_TERMINATED, 0, 0, 0, (void*) 0);
+ // And another delay, to give threads a chance to detect the
+ // flag's update
+ delay.tv_sec = 1;
+ delay.tv_nsec = 0;
+ nanosleep(&delay, NULL);
+ }
+
+ // If there is still are unfinished threads, recovery action
+ // is needed. It is not clear whether it is better to unlock
+ // the local threads first, or the remote threads. For now the
+ // latter approach is taken.
+ if (!remote_batch_finished()) {
+ int i;
+ VERBOSE(2, "Remote threads still running, performing remote recovery\n");
+ for (i = 0; i < remote_thread_count; i++) {
+ recover_remote(i);
+ }
+ // Allow the recovery actions to take effect
+ delay.tv_sec = 1;
+ delay.tv_nsec = 0;
+ nanosleep(&delay, NULL);
+ }
+
+ if (!local_batch_finished()) {
+ int i;
+ VERBOSE(2, "Local threads still running, performing local recovery\n");
+ for (i = 0; i < local_thread_count; i++) {
+ recover_local(i);
+ }
+ // Allow the recovery actions to take effect
+ delay.tv_sec = 1;
+ delay.tv_nsec = 0;
+ nanosleep(&delay, NULL);
+ }
+
+ // One last check to make sure that everything is finished. If not,
+ // testing has broken down and it is necessary to abort.
+ if (!local_batch_finished() || !remote_batch_finished()) {
+ VERBOSE(2, "Giving local and remote threads another chance to finish.\n");
+ // Allow the recovery actions to take effect
+ delay.tv_sec = 5;
+ delay.tv_nsec = 0;
+ nanosleep(&delay, NULL);
+ if (!local_batch_finished() || !remote_batch_finished()) {
+ // OK, normality has not been restored.
+ // It would be nice to get hold of and display any error messages.
+ usb_abort(usb_master_fd);
+ fprintf(stderr, "Fatal error: the host test program and the remote target are out of synch.\n");
+ fprintf(stderr, " recovery has been attempted, without success.\n");
+ fprintf(stderr, " USB testing cannot continue.\n");
+ exit(EXIT_FAILURE);
+ }
+ }
+
+ VERBOSE(2, "Local and remote threads are in synch, collecting results.\n");
+
+ // The world is in a coherent state. Time to collect the results.
+ // The return value of this function is a simple boolean. More
+ // detailed results will be held in a Tcl variable as a list of
+ // messages. It is desirable to keep both local and remote results
+ // in order.
+ for (i = 0; i < ((local_thread_count < remote_thread_count) ? local_thread_count : remote_thread_count); i++) {
+ if (!pool[i].test.result_pass) {
+ Tcl_SetVar(interp, "usbtest::results", pool[i].test.result_message,
+ all_ok ? (TCL_GLOBAL_ONLY | TCL_LIST_ELEMENT) : (TCL_GLOBAL_ONLY | TCL_APPEND_VALUE | TCL_LIST_ELEMENT));
+ all_ok = 0;
+ }
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE | USB_DIR_IN, USBTEST_GET_RESULT,
+ 0, i, USBTEST_MAX_CONTROL_DATA, (void*) result_buf);
+ if (!result_buf[0]) {
+ Tcl_SetVar(interp, "usbtest::results", &(result_buf[1]),
+ all_ok ? TCL_GLOBAL_ONLY : (TCL_GLOBAL_ONLY | TCL_APPEND_VALUE | TCL_LIST_ELEMENT));
+ all_ok = 0;
+ }
+ }
+ for (j = i; j < local_thread_count; j++) {
+ if (!pool[j].test.result_pass) {
+ Tcl_SetVar(interp, "usbtest::results", pool[j].test.result_message,
+ all_ok ? TCL_GLOBAL_ONLY : (TCL_GLOBAL_ONLY | TCL_APPEND_VALUE | TCL_LIST_ELEMENT));
+ all_ok = 0;
+ }
+ }
+ for (j = i; j < remote_thread_count; j++) {
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE | USB_DIR_IN, USBTEST_GET_RESULT,
+ 0, i, USBTEST_MAX_CONTROL_DATA, (void*) result_buf);
+ if (!result_buf[0]) {
+ Tcl_SetVar(interp, "usbtest::results", &(result_buf[1]),
+ all_ok ? TCL_GLOBAL_ONLY : (TCL_GLOBAL_ONLY | TCL_APPEND_VALUE | TCL_LIST_ELEMENT));
+ all_ok = 0;
+ }
+ }
+ VERBOSE(2, "Overall test result %d\n", all_ok);
+
+ Tcl_SetResult(interp, all_ok ? "1" : "0", TCL_STATIC);
+
+ run_done();
+
+ return TCL_OK;
+}
+
+/*}}}*/
+/*{{{ Set verbosity */
+
+// ----------------------------------------------------------------------------
+// Allow Tcl scripts to control verbosity levels for both host and target
+static int
+tcl_host_verbose(ClientData clientData __attribute__ ((unused)),
+ Tcl_Interp* interp,
+ int argc,
+ char** argv)
+{
+ int level;
+
+ if (2 != argc) {
+ Tcl_SetResult(interp, "wrong # args: should be \"usbtest::host_verbose <level>\"", TCL_STATIC);
+ return TCL_ERROR;
+ }
+ if (TCL_OK != Tcl_GetInt(interp, argv[1], &level)) {
+ Tcl_SetResult(interp, "invalid argument: verbosity level should be numeric", TCL_STATIC);
+ return TCL_ERROR;
+ }
+
+ verbose = level;
+ return TCL_OK;
+}
+
+static int
+tcl_target_verbose(ClientData clientData __attribute__ ((unused)),
+ Tcl_Interp* interp,
+ int argc,
+ char** argv)
+{
+ int level;
+
+ if (2 != argc) {
+ Tcl_SetResult(interp, "wrong # args: should be \"usbtest::target_verbose <level>\"", TCL_STATIC);
+ return TCL_ERROR;
+ }
+ if (TCL_OK != Tcl_GetInt(interp, argv[1], &level)) {
+ Tcl_SetResult(interp, "invalid argument: verbosity level should be numeric", TCL_STATIC);
+ return TCL_ERROR;
+ }
+
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE, USBTEST_VERBOSE, level, 0, 0, NULL);
+ usb_sync(usb_master_fd, -1);
+
+ return TCL_OK;
+}
+
+/*}}}*/
+
+/*}}}*/
+/*{{{ AppInit() */
+
+// ----------------------------------------------------------------------------
+// Application-specific initialization. We have a bare Tcl interpreter ready
+// to start executing scripts that define various test cases. However some
+// additional functions will have to be added to the interpreter, plus
+// information about the various endpoints.
+
+static int
+usbhost_appinit(Tcl_Interp* interp)
+{
+ unsigned char buf[USBTEST_MAX_CONTROL_DATA];
+ int number_of_endpoints;
+ int i;
+ char* location;
+
+ // Start by creating a usbtest namespace, for use by the various functions
+ // and variables.
+ if (TCL_OK != Tcl_Eval(interp,
+ "namespace eval usbtest {\n"
+ " variable number_of_endpoints 0\n"
+ " array set endpoint [list]\n"
+ "}\n")) {
+ fprintf(stderr, "usbhost: internal error, failed to create Tcl usbtest:: namespace\n");
+ fprintf(stderr, " Please check Tcl version (8.0b1 or later required).\n");
+ exit(EXIT_FAILURE);
+ }
+
+ // Add some information about the install path so that the
+ // main Tcl script can find and execute test scripts.
+ location = getenv("USBHOSTDIR");
+ if (NULL == location) {
+ location = USBAUXDIR;
+ }
+ Tcl_SetVar(interp, "usbtest::USBAUXDIR", location, TCL_GLOBAL_ONLY);
+
+ // Also set the verbosity level correctly
+ Tcl_SetVar2Ex(interp, "usbtest::verbose", NULL, Tcl_NewIntObj(verbose), TCL_GLOBAL_ONLY);
+
+ // Next we need to know the number of endpoints, and for each
+ // endpoint we want additional information such as type. The
+ // results are placed in a Tcl array.
+ usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE | USB_DIR_IN, USBTEST_ENDPOINT_COUNT,
+ 0, 0, 1, buf);
+ number_of_endpoints = buf[0];
+ Tcl_SetVar2Ex(interp, "usbtest::endpoint_count", NULL, Tcl_NewIntObj(number_of_endpoints), TCL_GLOBAL_ONLY);
+
+ for (i = 0; i < number_of_endpoints; i++) {
+ char varname[256];
+ int result;
+ int endpoint_min_size;
+ int endpoint_max_size;
+ int index;
+
+ memset(buf, 0, USBTEST_MAX_CONTROL_DATA);
+ result = usb_reliable_control_message(usb_master_fd, USB_TYPE_CLASS | USB_RECIP_DEVICE | USB_DIR_IN,
+ USBTEST_ENDPOINT_DETAILS, 0, i, USBTEST_MAX_CONTROL_DATA, buf);
+ if (result < 13) {
+ fprintf(stderr, "usbhost: error, received insufficient endpoint data back from the target.\n");
+ exit(EXIT_FAILURE);
+ }
+
+ // See protocol.h for the encoding used.
+ sprintf(varname, "usbtest::endpoint_data(%d,type)", i);
+ switch(buf[0]) {
+ case USB_ENDPOINT_XFER_CONTROL : Tcl_SetVar(interp, varname, "control", TCL_GLOBAL_ONLY); break;
+ case USB_ENDPOINT_XFER_ISOC : Tcl_SetVar(interp, varname, "isochronous", TCL_GLOBAL_ONLY); break;
+ case USB_ENDPOINT_XFER_BULK : Tcl_SetVar(interp, varname, "bulk", TCL_GLOBAL_ONLY); break;
+ case USB_ENDPOINT_XFER_INT : Tcl_SetVar(interp, varname, "interrupt", TCL_GLOBAL_ONLY); break;
+ }
+
+ sprintf(varname, "usbtest::endpoint_data(%d,number)", i);
+ Tcl_SetVar2Ex(interp, varname, NULL, Tcl_NewIntObj((int) buf[1]), TCL_GLOBAL_ONLY);
+
+ sprintf(varname, "usbtest::endpoint_data(%d,direction)", i);
+ if (USB_DIR_OUT == buf[2]) {
+ Tcl_SetVar(interp, varname, "out", TCL_GLOBAL_ONLY);
+ } else {
+ Tcl_SetVar(interp, varname, "in", TCL_GLOBAL_ONLY);
+ }
+
+ sprintf(varname, "usbtest::endpoint_data(%d,max_in_padding)", i);
+ Tcl_SetVar2Ex(interp, varname, NULL, Tcl_NewIntObj((int) buf[3]), TCL_GLOBAL_ONLY);
+
+ sprintf(varname, "usbtest::endpoint_data(%d,min_size)", i);
+ index = 4;
+ endpoint_min_size = unpack_int(buf, &index);
+ Tcl_SetVar2Ex(interp, varname, NULL, Tcl_NewIntObj(endpoint_min_size), TCL_GLOBAL_ONLY);
+
+ sprintf(varname, "usbtest::endpoint_data(%d,max_size)", i);
+ endpoint_max_size = unpack_int(buf, &index);
+ if (USB_ENDPOINT_XFER_CONTROL == buf[0]) {
+ if (endpoint_max_size > USBTEST_MAX_CONTROL_DATA) {
+ endpoint_max_size = USBTEST_MAX_CONTROL_DATA;
+ }
+ } else {
+ if ((-1 == endpoint_max_size) || (endpoint_max_size > USBTEST_MAX_BULK_DATA)) {
+ endpoint_max_size = USBTEST_MAX_BULK_DATA;
+ }
+ }
+ Tcl_SetVar2Ex(interp, varname, NULL, Tcl_NewIntObj(endpoint_max_size), TCL_GLOBAL_ONLY);
+
+ sprintf(varname, "usbtest::endpoint_data(%d,devtab)", i);
+ Tcl_SetVar(interp, varname, (char*) &(buf[12]), TCL_GLOBAL_ONLY);
+
+ // Perform any additional endpoint-specific initialization to make
+ // sure host and target can actually communicate via this endpoint.
+ switch(buf[0]) {
+ case USB_ENDPOINT_XFER_CONTROL :
+ {
+ usb_initialise_control_endpoint(endpoint_min_size, endpoint_max_size);
+ break;
+ }
+ case USB_ENDPOINT_XFER_ISOC :
+ {
+ if (USB_DIR_OUT == buf[2]) {
+ usb_initialise_isochronous_out_endpoint(buf[1], endpoint_min_size, endpoint_max_size);
+ } else {
+ usb_initialise_isochronous_in_endpoint(buf[1], endpoint_min_size, endpoint_max_size);
+ }
+ break;
+ }
+ case USB_ENDPOINT_XFER_BULK :
+ {
+ if (USB_DIR_OUT == buf[2]) {
+ usb_initialise_bulk_out_endpoint(buf[1], endpoint_min_size, endpoint_max_size);
+ } else {
+ usb_initialise_bulk_in_endpoint(buf[1], endpoint_min_size, endpoint_max_size, buf[3]);
+ }
+
+ break;
+ }
+ case USB_ENDPOINT_XFER_INT :
+ {
+ if (USB_DIR_OUT == buf[2]) {
+ usb_initialise_interrupt_out_endpoint(buf[1], endpoint_min_size, endpoint_max_size);
+ } else {
+ usb_initialise_interrupt_in_endpoint(buf[1], endpoint_min_size, endpoint_max_size);
+ }
+ break;
+ }
+ }
+ }
+
+ // Register appropriate commands with the Tcl interpreter
+ Tcl_CreateCommand(interp, "usbtest::target_pass", &tcl_target_pass, (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);
+ Tcl_CreateCommand(interp, "usbtest::target_pass_exit", &tcl_target_pass_exit, (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);
+ Tcl_CreateCommand(interp, "usbtest::target_fail", &tcl_target_fail, (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);
+ Tcl_CreateCommand(interp, "usbtest::target_fail_exit", &tcl_target_fail_exit, (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);
+ Tcl_CreateCommand(interp, "usbtest::target_abort", &tcl_target_abort, (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);
+ Tcl_CreateCommand(interp, "usbtest::_test_bulk", &tcl_test_bulk, (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);
+ Tcl_CreateCommand(interp, "usbtest::_test_control_in", &tcl_test_control_in, (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);
+ Tcl_CreateCommand(interp, "usbtest::_cancel", &tcl_cancel, (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);
+ Tcl_CreateCommand(interp, "usbtest::_run", &tcl_run, (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);
+ Tcl_CreateCommand(interp, "usbtest::host_verbose", &tcl_host_verbose, (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);
+ Tcl_CreateCommand(interp, "usbtest::target_verbose", &tcl_target_verbose, (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);
+
+ return TCL_OK;
+}
+
+/*}}}*/
+/*{{{ main() */
+
+// ----------------------------------------------------------------------------
+// System start-up. After argument processing this code checks that
+// there is a suitable USB target attached - if not then there is no
+// point in proceeding. Otherwise further initialization is performed
+// and then control is passed to a Tcl interpreter.
+
+static void
+usage(void)
+{
+ printf("usbhost: usage, usbhost [-V|--verbose] [-v|--version] [-h|--help] <test> [args]\n");
+ printf(" -V, --verbose Make the host-side output additional information\n");
+ printf(" during test runs. This argument can be repeated to\n");
+ printf(" increase verbosity.\n");
+ printf(" -v, --version Output version information for usbhost.\n");
+ printf(" -h, --help Output this help information.\n");
+ printf(" <test> The name of a USB test case, for example list.tcl\n");
+ printf(" [args] Optional additional arguments for the testcase.\n");
+ exit(0);
+}
+
+static void
+version(void)
+{
+ printf("usbhost: version %s\n", USBHOST_VERSION);
+ printf(" : built from USB slave package version %s\n", PKGVERSION);
+ printf(" : support files installed in %s\n", USBAUXDIR);
+ exit(0);
+}
+
+int
+main(int argc, char** argv)
+{
+ char* interpreter = argv[0];
+ char** new_argv;
+ char path[_POSIX_PATH_MAX];
+ char* location;
+ int i;
+
+ // Argument processing
+ for (i = 1; i < argc; i++) {
+ if ((0 == strcmp("-h", argv[i])) || (0 == strcmp("-H", argv[i])) || (0 == strcmp("--help", argv[i]))) {
+ usage();
+ }
+ if ((0 == strcmp("-v", argv[i])) || (0 == strcmp("--version", argv[i]))) {
+ version();
+ }
+ if ((0 == strcmp("-V", argv[i])) || (0 == strcmp("--verbose", argv[i]))) {
+ verbose++;
+ continue;
+ }
+
+ // The first unrecognised argument should correspond to the test script.
+ break;
+ }
+ argc = (argc - i) + 1;
+ argv = (argv + i) - 1;
+
+ if (1 == argc) {
+ fprintf(stderr, "usbhost: at least one test script must be specified on the command line.\n");
+ exit(EXIT_FAILURE);
+ }
+
+ usb_master_fd = usb_open_device();
+ if (-1 == usb_master_fd) {
+ return EXIT_FAILURE;
+ }
+
+ // There is a valid USB target. Initialize the pool of threads etc.
+ pool_initialize();
+
+ // Now start a Tcl interpreter. Tcl_Main() will interpret the
+ // first argument as the name of a Tcl script to execute,
+ // i.e. usbhost.tcl. This can be found in the install tree,
+ // but during development it is inconvenient to run
+ // "make install" every time the Tcl script is edited so an
+ // environment variable can be used to override the location.
+ new_argv = malloc((argc + 2) * sizeof(char*));
+ if (NULL == new_argv) {
+ fprintf(stderr, "usbhost: internal error, out of memory.\n");
+ exit(EXIT_FAILURE);
+ }
+ new_argv[0] = interpreter;
+
+ location = getenv("USBHOSTDIR");
+ if (NULL == location) {
+ location = USBAUXDIR;
+ }
+ snprintf(path, _POSIX_PATH_MAX, "%s/usbhost.tcl", location);
+ if (0 != access(path, R_OK)) {
+ fprintf(stderr, "usbhost: cannot find or access required Tcl script\n");
+ fprintf(stderr, " : %s\n", path);
+ exit(EXIT_FAILURE);
+ }
+ new_argv[1] = path;
+
+ for (i = 1; i < argc; i++) {
+ new_argv[i+1] = argv[i];
+ }
+ new_argv[i+1] = NULL;
+
+ Tcl_Main(i+1, new_argv, &usbhost_appinit);
+
+ return EXIT_SUCCESS;
+}
+
+/*}}}*/
diff --git a/cesar/ecos/packages/io/usb/slave/current/host/usbhost.tcl b/cesar/ecos/packages/io/usb/slave/current/host/usbhost.tcl
new file mode 100644
index 0000000000..62e4c64434
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/host/usbhost.tcl
@@ -0,0 +1,531 @@
+# {{{ Banner
+
+#===============================================================================
+#
+# usbhost.tcl
+#
+# Support for USB testing
+#
+#===============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#===============================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Date: 2001-07-04
+# Purpose: To provide higher-level utility commands for performing
+# USB testing, and to iterate through the various test scripts
+# specified on the command line.
+#
+#####DESCRIPTIONEND####
+#===============================================================================
+#
+
+# }}}
+
+# {{{ Endpoint data
+
+# Given the raw endpoint data provided by the C code, turn
+# it something more usable from inside Tcl scripts.
+namespace eval usbtest {
+ array set control {}
+
+ variable bulk_in_endpoints [list]
+ array set bulk_in {}
+ variable bulk_out_endpoints [list]
+ array set bulk_out {}
+
+ variable isochronous_in_endpoints [list]
+ array set isochronous_in {}
+ variable isochronous_out_endpoints [list]
+ array set isochronous_out {}
+
+ variable interrupt_in_endpoints [list]
+ array set interrupt_in {}
+ variable interrupt_out_endpoints [list]
+ array set interrupt_out {}
+
+ for { set i 0 } { $i < $usbtest::endpoint_count } { incr i } {
+ switch -- $usbtest::endpoint_data($i,type) {
+ "control" {
+ set usbtest::control(min_size) $usbtest::endpoint_data($i,min_size)
+ set usbtest::control(max_size) $usbtest::endpoint_data($i,max_size)
+ }
+
+ "bulk" {
+ set number $usbtest::endpoint_data($i,number)
+ if { "in" == $usbtest::endpoint_data($i,direction) } {
+ lappend usbtest::bulk_in_endpoints $number
+ set usbtest::bulk_in($number,min_size) $usbtest::endpoint_data($i,min_size)
+ set usbtest::bulk_in($number,max_size) $usbtest::endpoint_data($i,max_size)
+ set usbtest::bulk_in($number,max_in_padding) $usbtest::endpoint_data($i,max_in_padding)
+ set usbtest::bulk_in($number,devtab) $usbtest::endpoint_data($i,devtab)
+ } else {
+ lappend usbtest::bulk_out_endpoints $number
+ set usbtest::bulk_out($number,min_size) $usbtest::endpoint_data($i,min_size)
+ set usbtest::bulk_out($number,max_size) $usbtest::endpoint_data($i,max_size)
+ set usbtest::bulk_out($number,devtab) $usbtest::endpoint_data($i,devtab)
+ }
+ }
+
+ "isochronous" {
+ set number $usbtest::endpoint_data($i,number)
+ if { "in" == $usbtest::endpoint_data($i,direction) } {
+ lappend usbtest::isochronous_in_endpoints $number
+ set usbtest::isochronous_in($number,min_size) $usbtest::endpoint_data($i,min_size)
+ set usbtest::isochronous_in($number,max_size) $usbtest::endpoint_data($i,max_size)
+ set usbtest::isochronous_in($number,devtab) $usbtest::endpoint_data($i,devtab)
+ } else {
+ lappend usbtest::isochronous_out_endpoints $number
+ set usbtest::isochronous_out($number,min_size) $usbtest::endpoint_data($i,min_size)
+ set usbtest::isochronous_out($number,max_size) $usbtest::endpoint_data($i,max_size)
+ set usbtest::isochronous_out($number,devtab) $usbtest::endpoint_data($i,devtab)
+ }
+ }
+
+ "interrupt" {
+ set number $usbtest::endpoint_data($i,number)
+ if { "in" == $usbtest::endpoint_data($i,direction) } {
+ lappend usbtest::interrupt_in_endpoints $number
+ set usbtest::interrupt_in($number,min_size) $usbtest::endpoint_data($i,min_size)
+ set usbtest::interrupt_in($number,max_size) $usbtest::endpoint_data($i,max_size)
+ set usbtest::interrupt_in($number,devtab) $usbtest::endpoint_data($i,devtab)
+ } else {
+ lappend usbtest::interrupt_out_endpoints $number
+ set usbtest::interrupt_out($number,min_size) $usbtest::endpoint_data($i,min_size)
+ set usbtest::interrupt_out($number,max_size) $usbtest::endpoint_data($i,max_size)
+ set usbtest::interrupt_out($number,devtab) $usbtest::endpoint_data($i,devtab)
+ }
+ }
+
+ default {
+ puts stderr "Internal error: invalid endpoint type $usbtest::endpoint_data($i,type)"
+ exit 1
+ }
+ }
+ }
+}
+
+# }}}
+# {{{ Constants
+
+# The C code expects to receive certain data as simple numbers,
+# corresponding to #define's in common.c and elsewhere. Strictly
+# speaking it would be better to pass strings to the C code and
+# have it do the translation, thus ensuring that these constants
+# exist in only one place.
+
+namespace eval usbtest {
+
+ variable _USB_DIR_IN 0x0080
+ variable _DATA_NONE 0
+ variable _DATA_BYTE_FILL 1
+ variable _DATA_WORD_FILL 2
+ variable _DATA_BYTE_GEN 3
+ variable _DATA_WORD_GEN 4
+ variable _IO_MECHANISM_USB 1
+ variable _IO_MECHANISM_DEV 2
+}
+
+# It is also desirable to have some constants corresponding
+# to common random number generators.
+namespace eval usbtest {
+ variable MULTIPLIER 1103515245
+ variable INCREMENT 12345
+}
+
+# }}}
+# {{{ Argument processing
+
+# ----------------------------------------------------------------------------
+# Given a list of arguments of the form "xyzzy=123" or "xyzzy 123", and
+# an array arguments containing entries such as arguments(xyzzy) and
+# already filled in with default values, update the array using the
+# actual arguments
+namespace eval usbtest {
+
+ proc process_arguments { list array_ref } {
+ upvar $array_ref array
+ array set defined_args [list]
+
+ set listlen [llength $list]
+ for { set index 0 } { $index < $listlen } { incr index } {
+ set arg [lindex $list $index]
+ set found 0
+ foreach name [array names array] {
+ set len [string length $name]
+ if { [string equal -length $len $name $arg] } {
+ # Partial match found.
+ if { [string equal $name $arg] } {
+ # Exact match found, The value must be the next arg.
+ if { [info exists defined_args($name)] } {
+ error "Argument $name should be specified only once"
+ }
+ incr index
+ if { $index >= $listlen } {
+ error "Missing value after argument $name"
+ }
+ set array($name) [lindex $list $index]
+ set found 1
+ break
+ }
+
+ # Not an exact match. Try looking for x=y
+ incr len
+ if { [string equal -length $len "$name=" $arg] } {
+ if { [info exists defined_args($name)] } {
+ error "Argument $name should be specified only once"
+ }
+ set array($name) [string range $arg $len end]
+ set found 1
+ break
+ }
+ }
+ }
+ if { ! $found } {
+ error "Invalid argument $arg"
+ }
+ }
+ }
+}
+
+# }}}
+# {{{ Starting and ending tests
+
+# This section deals with starting tests, or cleaning up when the
+# tests cannot actually proceed. Also there is some validation,
+# for example to make sure that no endpoint number is used for
+# multiple tests.
+
+namespace eval usbtest {
+ variable results
+ variable _tests_submitted 0
+ variable _control_endpoint_in_use 0
+ variable _in_endpoints_in_use [list]
+ variable _out_endpoints_in_use [list]
+
+ proc reset { } {
+ if { 0 != $usbtest::_tests_submitted } {
+ usbtest::_cancel
+ set usbtest::_tests_submitted 0
+
+ }
+ set usbtest::_in_endpoints_in_use [list]
+ set usbtest::_out_endpoints_in_use [list]
+ }
+
+ proc use_endpoint { endpoint direction } {
+ if { 0 == $endpoint } {
+ if { $usbtest::_control_endpoint_in_use } {
+ error "Attempt to run multiple tests on the control endpoint"
+ }
+ set usbtest::_control_endpoint_in_use 1
+ } else {
+ switch -- $direction {
+ "in" {
+ if { -1 != [lsearch -exact $usbtest::_in_endpoints_in_use $endpoint] } {
+ error "Attempt to run multiple IN tests on endpoint $endpoint"
+ }
+ lappend usbtest::_in_endpoints_in_use $endpoint
+ }
+
+ "out" {
+ if { -1 != [lsearch -exact $usbtest::_out_endpoints_in_use $endpoint] } {
+ error "Attempt to run multiple OUT tests on endpoint $endpoint"
+ }
+ lappend usbtest::_out_endpoints_in_use $endpoint
+ }
+
+ default {
+ error "Invalid direction passed to usbtest::use_endpoint"
+ }
+ }
+ }
+ }
+
+ proc test_submitted { } {
+ incr usbtest::_tests_submitted
+ }
+
+ proc start { timeout } {
+ set result 0
+ if { 0 == $usbtest::_tests_submitted } {
+ error "Attempt to start tests when no tests are scheduled to run."
+ } elseif { ! [string is integer -strict $timeout] } {
+ error "Invalid timeout specified, it should be a simple number."
+ } else {
+ set usbtest::results [list]
+ set result [usbtest::_run $timeout]
+ set usbtest::_tests_submitted 0
+ set usbtest::_control_endpoint_in_use 0
+ array unset _in_endpoints_in_use
+ array unset _out_endpoints_in_use
+ }
+ return $result
+ }
+}
+
+# }}}
+# {{{ Bulk tests
+
+# Prepare to run a bulk test.
+#
+# This test requires rather a lot of parameters, many of which
+# will have sensible defaults.
+
+namespace eval usbtest {
+
+ proc bulktest { endpoint direction number_packets args } {
+
+
+ # Parameters to be passed to the C code. Most are
+ # held in an array indexed by the option name,
+ # facilitating command-line parsing.
+ set arguments(format) "none"
+ set arguments(data1) 0
+ set arguments(data*) 1
+ set arguments(data+) 0
+ set arguments(data1*) 1
+ set arguments(data1+) 0
+ set arguments(data**) 1
+ set arguments(data*+) 0
+ set arguments(data+*) 1
+ set arguments(data++) 0
+ set arguments(mechanism) "usb"
+ set arguments(txsize1) 32
+ set arguments(txsize>=) 0
+ set arguments(txsize<=) -1
+ set arguments(txsize*) 1
+ set arguments(txsize/) 1
+ set arguments(txsize+) 0
+ set arguments(rxsize1) 0
+ set arguments(rxsize>=) 0
+ set arguments(rxsize<=) -1
+ set arguments(rxsize*) 1
+ set arguments(rxsize/) 1
+ set arguments(rxsize+) 0
+ set arguments(txdelay1) 0
+ set arguments(txdelay>=) 0
+ set arguments(txdelay<=) 1000000000
+ set arguments(txdelay*) 1
+ set arguments(txdelay/) 1
+ set arguments(txdelay+) 0
+ set arguments(rxdelay1) 0
+ set arguments(rxdelay>=) 0
+ set arguments(rxdelay<=) 1000000000
+ set arguments(rxdelay*) 1
+ set arguments(rxdelay/) 1
+ set arguments(rxdelay+) 0
+
+ set endpoint_param ""
+
+ # Target limits
+ set target_min_size 0
+ set target_max_size 0
+ set target_padding 0
+ set target_devtab ""
+
+ # Start by validating the endpoint and direction arguments.
+ # Also check that the specified endpoint is not yet in use.
+ if { ![string is integer -strict $endpoint] } {
+ error "Invalid endpoint argument \"$endpoint\": should be a number"
+ }
+ if { ($endpoint < 1) || ($endpoint > 15) } {
+ error "Invalid bulk endpoint argument \"$endpoint\": should be between 1 and 15"
+ }
+ switch -- $direction {
+ "in" -
+ "In" -
+ "IN" {
+ set direction "in"
+ if { -1 == [lsearch -exact $usbtest::bulk_in_endpoints $endpoint] } {
+ error "Invalid bulk endpoint argument \"$endpoint\": the target does not list that as a bulk IN endpoint"
+ }
+ set target_min_size $usbtest::bulk_in($endpoint,min_size)
+ set target_max_size $usbtest::bulk_in($endpoint,max_size)
+ set target_padding $usbtest::bulk_in($endpoint,max_in_padding)
+ set target_devtab $usbtest::bulk_in($endpoint,devtab);
+ set endpoint_param [expr $endpoint | $usbtest::_USB_DIR_IN]
+ }
+
+ "out" -
+ "Out" -
+ "OUT" {
+ set direction "out"
+ if { -1 == [lsearch -exact $usbtest::bulk_out_endpoints $endpoint] } {
+ error "Invalid bulk endpoint argument \"$endpoint\": the target does not list that as a bulk OUT endpoint"
+ }
+ set target_min_size $usbtest::bulk_out($endpoint,min_size)
+ set target_max_size $usbtest::bulk_out($endpoint,max_size)
+ set target_devtab $usbtest::bulk_out($endpoint,devtab);
+ set target_padding 0; # Not applicable
+ set endpoint_param $endpoint
+ }
+
+ default {
+ error "Invalid direction argument \"$direction\": should be \"in\" or \"out\""
+ }
+ }
+
+ # Now parse any remaining arguments
+ usbtest::process_arguments $args arguments
+
+ # Convert two of the arguments from strings to numbers, for the
+ # convenience of the C code
+ switch -- $arguments(format) {
+ "none" { set arguments(format) $usbtest::_DATA_NONE }
+ "bytefill" { set arguments(format) $usbtest::_DATA_BYTE_FILL }
+ "wordfill" { set arguments(format) $usbtest::_DATA_WORD_FILL }
+ "byteseq" { set arguments(format) $usbtest::_DATA_BYTE_GEN }
+ "wordseq" { set arguments(format) $usbtest::_DATA_WORD_GEN }
+
+ default {
+ error "Invalid data format argument \"$arguments(data)\"\n \
+ Should be \"none\", \"bytefill\", \"wordfill\", \"byteseq\" or \"wordseq\""
+ }
+ }
+ switch -- $arguments(mechanism) {
+ "usb" { set arguments(mechanism) $usbtest::_IO_MECHANISM_USB }
+ "devtab" { set arguments(mechanism) $usbtest::_IO_MECHANISM_DEV }
+
+ default {
+ error "Invalid mechanism argument \"$arguments(mechanism)\"\n \
+ Should be \"usb\" or \"devtab\""
+ }
+ }
+
+ puts "validating fields"
+ # Validate the remaining fields
+ foreach field [list data1 data* data+ data1* data1+ data** data*+ data+* data++ \
+ txsize1 txsize>= txsize<= txsize* txsize/ txsize+ \
+ rxsize1 rxsize>= rxsize<= rxsize* rxsize/ rxsize+ \
+ txdelay1 txdelay>= txdelay<= txdelay* txdelay/ txdelay+ \
+ rxdelay1 rxdelay>= rxdelay<= rxdelay* rxdelay/ rxdelay+] {
+ if { ![string is integer -strict $arguments($field)] } {
+ error "Invalid value \"$arguments($field)\" for argument $field, should be an integer."
+ }
+ }
+
+ if { $arguments(txsize>=) < $target_min_size } {
+ set arguments(txsize>=) $target_min_size
+ }
+ if { (-1 == $arguments(txsize<=) ) || ($arguments(txsize<=) > $target_max_size) } {
+ set arguments(txsize<=) $target_max_size
+ }
+ if { $arguments(rxsize<=) == -1 } {
+ set arguments(rxsize<=) $target_max_size
+ }
+ if { $arguments(txsize1) < $arguments(txsize>=) } {
+ set arguments(txsize1) $arguments(txsize>=)
+ }
+ # Make sure the endpoint is not already in use
+ usbtest::use_endpoint $endpoint $direction
+
+ puts "Submitting test"
+ # Now submit the test. This is handled by C code.
+ usbtest::_test_bulk \
+ $number_packets \
+ $endpoint_param \
+ $arguments(txsize1) \
+ $arguments(txsize>=) \
+ $arguments(txsize<=) \
+ $arguments(txsize*) \
+ $arguments(txsize/) \
+ $arguments(txsize+) \
+ $arguments(rxsize1) \
+ $arguments(rxsize>=) \
+ $arguments(rxsize<=) \
+ $arguments(rxsize*) \
+ $arguments(rxsize/) \
+ $arguments(rxsize+) \
+ $target_padding \
+ $arguments(txdelay1) \
+ $arguments(txdelay>=) \
+ $arguments(txdelay<=) \
+ $arguments(txdelay*) \
+ $arguments(txdelay/) \
+ $arguments(txdelay+) \
+ $arguments(rxdelay1) \
+ $arguments(rxdelay>=) \
+ $arguments(rxdelay<=) \
+ $arguments(rxdelay*) \
+ $arguments(rxdelay/) \
+ $arguments(rxdelay+) \
+ $arguments(mechanism) \
+ $arguments(format) \
+ $arguments(data1) \
+ $arguments(data*) \
+ $arguments(data+) \
+ $arguments(data1*) \
+ $arguments(data1+) \
+ $arguments(data**) \
+ $arguments(data*+) \
+ $arguments(data+*) \
+ $arguments(data++)
+
+ test_submitted
+ }
+}
+
+# }}}
+# {{{ Execute the specified test script
+
+# Interpret the arguments as a test script plus auxiliary data.
+set script [lindex $::argv 0]
+set ::argv [lrange $::argv 1 end]
+
+set result [catch {
+ set path [file join [pwd] $script]
+ if { ![file exists $path] } {
+ set path "$path.tcl"
+ if { ![file exists $path] } {
+ set path [file join $usbtest::USBAUXDIR $script]
+ if { ![file exists $path] } {
+ set path "$path.tcl"
+ if { ![file exists $path] } {
+ error "Error: unknown test script $script"
+ }
+ }
+ }
+ }
+
+ source $path
+
+} message]
+
+if { 0 != $result } {
+ puts $message
+}
+
+# }}}
diff --git a/cesar/ecos/packages/io/usb/slave/current/host/verbose.tcl b/cesar/ecos/packages/io/usb/slave/current/host/verbose.tcl
new file mode 100644
index 0000000000..2a686d417a
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/host/verbose.tcl
@@ -0,0 +1,71 @@
+# {{{ Banner
+
+#===============================================================================
+#
+# verbose.tcl
+#
+# Support for USB testing
+#
+#===============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#===============================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Date: 2002-01-16
+# Purpose: Set the target-side verbosity level
+#
+#####DESCRIPTIONEND####
+#===============================================================================
+#
+
+# }}}
+
+if { 1 == $argc } {
+ puts "The desired verbosity level must be specified on the command line."
+ puts "This should be a small integer. A value of 0 suppresses run-time"
+ puts "logging within the target."
+ exit 1
+}
+set level [lindex $argv 0]
+
+if { ![string is integer -strict $level ] } {
+ puts "Invalid verbosity level \"$level\""
+ puts "This should be a small integer. A value of 0 suppresses run-time"
+ puts "logging within the target."
+ exit 1
+}
+
+usbtest::target_verbose $level
+
diff --git a/cesar/ecos/packages/io/usb/slave/current/include/usbs.h b/cesar/ecos/packages/io/usb/slave/current/include/usbs.h
new file mode 100644
index 0000000000..2c2b6f5b0a
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/include/usbs.h
@@ -0,0 +1,426 @@
+#ifndef CYGONCE_USBS_H
+# define CYGONCE_USBS_H
+//==========================================================================
+//
+// include/usbs.h
+//
+// The generic USB slave-side support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 2000-10-04
+// Purpose:
+// Description: USB slave-side support
+//
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+# include <pkgconf/system.h>
+# include <cyg/infra/cyg_type.h>
+# include <cyg/io/usb/usb.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// The USB slave-side eCos support involves a number of different
+// components:
+//
+// 1) a hardware-specific package to drive a specific chip implementation.
+// This provides access to the endpoints. All the hardware-specific
+// packages implement a common interface.
+//
+// 2) a common package (this one). This defines the interface implemented
+// by the hardware-specific packages. It also provides support for
+// the various generic control messages, using information provided
+// by higher-level code and invoking callbacks as appropriate.
+//
+// 3) some number of support packages for particular types of
+// application, for example ethernet or mass-storage.
+//
+// Typically there will only be one USB slave device, although the design
+// does allow for multiple devices. Each device should provide a
+// usbs_control_endpoint structure and zero or more usbs_data_endpoint
+// structures. Each usbs_data_endpoint structure supports uni-directional
+// transfers on a single endpoint. If an endpoint can support multiple
+// types of transfer then there will be some control operation to switch
+// between bulk, interrupt and isochronous.
+//
+// Access to the USB endpoints can go either via usbs_ calls which
+// take a usbs_endpoint structure, or via open/read/write calls. The
+// latter is more likely to be used in application code since it
+// involves a familiar interface. The former is more appropriate for
+// eCos packages layered on top of the USB code. The difference is
+// synchronous vs. asynchronous: the open/read/write model involves
+// blocking operations, implying a need for extra threads; the usbs_
+// calls involve start operations and a completion callback. In
+// practice the read and write calls are implemented using the
+// lower-level code.
+
+// Enumeration data. This requires information about the hardware,
+// specifically what endpoints are available and what they get used
+// for. It also requires information about the application class
+// packages that are in the configuration, and quite possibly about
+// things in application space. Some of the enumeration info such as
+// the vendor id is inherently application-specific. Hence there is no
+// way of generating part or all of the the enumeration information
+// automatically, instead it is up to application code to supply this.
+//
+// The intention is that application provides all the data via const
+// static objects, allowing the data to live in ROM. Alternatively the
+// data structures can go into the .data section as normal, allowing
+// them to be edited at run-time.
+//
+// There can be only one device descriptor, so that is part of the
+// main enumeration data structure. There can be an unknown number of
+// configurations so application code has to initialize an array of
+// these. Ditto for interfaces and endpoints. The first x interfaces
+// in the array correspond to the first configuration, the next y
+// interfaces to the second configuration, etc. The endpoints array
+// works in the same way.
+//
+// In the initial implementation multiple languages are not supported
+// so a simple array of strings suffices. The first entry of these
+// is still special in that it should define a single supported
+// LANGID. All strings should be encoded as per the USB standard:
+// a length field, a type code of USB_STRING_DESCRIPTOR_TYPE,
+// and data in unicode format. In future multiple language support
+// may be supported via configury with the default case remaining
+// a single language, thus avoiding incompatibility problems.
+
+typedef struct usbs_enumeration_data {
+ usb_device_descriptor device;
+ int total_number_interfaces;
+ int total_number_endpoints;
+ int total_number_strings;
+ const usb_configuration_descriptor* configurations;
+ const usb_interface_descriptor* interfaces;
+ const usb_endpoint_descriptor* endpoints;
+ const unsigned char** strings;
+} usbs_enumeration_data;
+
+// The current state of a USB device. This involves a bit to mark
+// whether or not the device has been suspended, plus a state machine.
+// On some hardware it may not be possible to distinguish between the
+// detached, attached and powered states. If so then the initial state
+// will be POWERED.
+
+#define USBS_STATE_DETACHED 0x01
+#define USBS_STATE_ATTACHED 0x02
+#define USBS_STATE_POWERED 0x03
+#define USBS_STATE_DEFAULT 0x04
+#define USBS_STATE_ADDRESSED 0x05
+#define USBS_STATE_CONFIGURED 0x06
+#define USBS_STATE_MASK 0x7F
+#define USBS_STATE_SUSPENDED (1 << 7)
+
+// State changes. Application code or higher-level packages should
+// install an appropriate state change function which will get
+// invoked with details of the state change.
+typedef enum {
+ USBS_STATE_CHANGE_DETACHED = 1,
+ USBS_STATE_CHANGE_ATTACHED = 2,
+ USBS_STATE_CHANGE_POWERED = 3,
+ USBS_STATE_CHANGE_RESET = 4,
+ USBS_STATE_CHANGE_ADDRESSED = 5,
+ USBS_STATE_CHANGE_CONFIGURED = 6,
+ USBS_STATE_CHANGE_DECONFIGURED = 7,
+ USBS_STATE_CHANGE_SUSPENDED = 8,
+ USBS_STATE_CHANGE_RESUMED = 9
+} usbs_state_change;
+
+typedef enum {
+ USBS_CONTROL_RETURN_HANDLED = 0,
+ USBS_CONTROL_RETURN_UNKNOWN = 1,
+ USBS_CONTROL_RETURN_STALL = 2
+} usbs_control_return;
+
+typedef struct usbs_control_endpoint {
+ // The state is maintained by the USB code and should not be
+ // modified by anything higher up.
+ int state;
+
+ // The enumeration data should be supplied by higher level code,
+ // usually the application. Often this data will be constant.
+ const usbs_enumeration_data* enumeration_data;
+
+ // This function pointer is supplied by the USB device driver.
+ // Application code should invoke it directly or via the
+ // usbs_start() function when the system is ready. Typically it
+ // will cause the USB lines to switch from tristate to active,
+ // and the USB host/hub should detect this.
+ void (*start_fn)(struct usbs_control_endpoint*);
+
+ // This function is used for polled operation when interrupts
+ // are disabled. This can happen in some debugging contexts.
+ // Higher-level code may also need to know about the interrupt
+ // number(s) used.
+ void (*poll_fn)(struct usbs_control_endpoint*);
+ int interrupt_vector;
+
+ // When a new control message arrives it will be in this buffer
+ // where the appropriate callback functions can examine it. The
+ // USB code will not modify the buffer unless a new control
+ // message arrives. The control_buffer can also be re-used
+ // by handlers to maintain some state information, e.g.
+ // for coping with complicated IN requests, but this is only
+ // allowed if they actually handle the request.
+ unsigned char control_buffer[8];
+
+ // This callback will be invoked by the USB code following a
+ // change in USB state, e.g. to SUSPENDED mode. Higher-level code
+ // should install a suitable function. There is some callback data
+ // as well. This gets passed explicitly to the callback function,
+ // in addition to the control endpoint structure. The reason is
+ // that the actual state change callback may be some sort of
+ // multiplexer inside a multifunction peripheral, and this
+ // multiplexer wants to invoke device-specific state change
+ // functions. However in simple devices those device-specific
+ // state change functions could be invoked directly.
+ void (*state_change_fn)(struct usbs_control_endpoint*, void*, usbs_state_change, int /* old state */);
+ void* state_change_data;
+ // When a standard control message arrives, the device driver will
+ // detect some requests such as SET_ADDRESS and handle it
+ // internally. Otherwise if higher-level code has installed a
+ // callback then that will be invoked. If the callback returns
+ // UNKNOWN then the default handler usbs_handle_standard_control()
+ // is used to process the request.
+ usbs_control_return (*standard_control_fn)(struct usbs_control_endpoint*, void*);
+ void* standard_control_data;
+
+ // These three callbacks are used for other types of control
+ // messages. The generic USB code has no way of knowing what
+ // such control messages are about.
+ usbs_control_return (*class_control_fn)(struct usbs_control_endpoint*, void*);
+ void* class_control_data;
+ usbs_control_return (*vendor_control_fn)(struct usbs_control_endpoint*, void*);
+ void* vendor_control_data;
+ usbs_control_return (*reserved_control_fn)(struct usbs_control_endpoint*, void*);
+ void* reserved_control_data;
+
+ // If a control operation involves transferring more data than
+ // just the initial eight-byte packet, the following fields are
+ // used to keep track of the current operation. The original
+ // control request indicates the direction of the transfer (IN or
+ // OUT) and a length field. For OUT this length is exact, for IN
+ // it is an upper bound. The transfer operates mostly as per the
+ // bulk protocol, but if the length requested is an exact multiple
+ // of the control fifo size (typically eight bytes) then there
+ // is no need for an empty packet at the end.
+ //
+ // For an OUT operation the control message handler should supply
+ // a suitable buffer via the "buffer" field below. The only other
+ // field of interest is the complete_fn which must be provided and
+ // will be invoked once all the data has arrived. Alternatively
+ // the OUT operation may get aborted if a new control message
+ // arrives. The second argument is an error code -EPIPE or -EIO,
+ // or zero to indicate success. The return code is used by the
+ // device driver during the status phase.
+ //
+ // IN is more complicated and the defined interface makes it
+ // possible to gather data from multiple locations, eliminating
+ // the need for copying into large buffers in some circumstances.
+ // Basically when an IN request arrives the device driver will
+ // look at the buffer and buffer_size fields, extracting data from
+ // there if possible. If the current buffer has been exhausted
+ // then the the refill function will be invoked, and this can
+ // reset the buffer and size fields to point somewhere else.
+ // This continues until such time that there is no longer
+ // a refill function and the current buffer is empty. The
+ // refill function can use the refill_data and refill_index
+ // to keep track of the current state. The control_buffer
+ // fields are available as well. At the end of the transfer,
+ // if a completion function has been supplied then it will
+ // be invoked. The return code will be ignored.
+ unsigned char* buffer;
+ int buffer_size;
+ void (*fill_buffer_fn)(struct usbs_control_endpoint*);
+ void* fill_data;
+ int fill_index;
+ usbs_control_return (*complete_fn)(struct usbs_control_endpoint*, int);
+} usbs_control_endpoint;
+
+// Data endpoints are a little bit simpler, but not much. From the
+// perspective of a device driver things a single buffer is most
+// convenient, but that is quite likely to require a max-size buffer
+// at a higher level and an additional copy operation. Supplying
+// a vector of buffers is a bit more general, but in a layered
+// system it may be desirable to prepend to this vector...
+// A combination of a current buffer and a refill/empty function
+// offers flexibility, at the cost of additional function calls
+// from inside the device driver.
+//
+// FIXME: implement support for fill/empty functions.
+//
+// Some USB devices may prefer buffers of particular alignment,
+// e.g. for DMA purposes. This is hard to reconcile with the
+// current interface. However pushing such alignment restrictions
+// etc. up into the higher levels is difficult, e.g. it does
+// not map at all onto a conventional read/write interface.
+// The device driver will just have to do the best it can.
+//
+// The completion function will be invoked at the end of the transfer.
+// The second argument indicates per-transfer completion data. The
+// third argument indicates the total amount received, or an error
+// code: typically -EPIPE to indicate a broken conenction; -EAGAIN to
+// indicate a stall condition; -EMSGSIZE if the host is sending more
+// data than the target is expecting; or -EIO to indicate some other
+// error. Individual device drivers should avoid generating other
+// errors.
+typedef struct usbs_rx_endpoint {
+ void (*start_rx_fn)(struct usbs_rx_endpoint*);
+ void (*set_halted_fn)(struct usbs_rx_endpoint*, cyg_bool);
+ void (*complete_fn)(void*, int);
+ void* complete_data;
+ unsigned char* buffer;
+ int buffer_size;
+ cyg_bool halted;
+} usbs_rx_endpoint;
+
+typedef struct usbs_tx_endpoint {
+ void (*start_tx_fn)(struct usbs_tx_endpoint*);
+ void (*set_halted_fn)(struct usbs_tx_endpoint*, cyg_bool);
+ void (*complete_fn)(void*, int);
+ void* complete_data;
+ const unsigned char*buffer;
+ int buffer_size;
+ cyg_bool halted;
+} usbs_tx_endpoint;
+
+// Functions called by device drivers.
+extern usbs_control_return usbs_handle_standard_control(struct usbs_control_endpoint*);
+
+// Utility functions. These just invoke the corresponding function
+// pointers in the endpoint structures. It is assumed that the
+// necessary fields in the endpoint structures will have been
+// filled in already.
+extern void usbs_start(usbs_control_endpoint*);
+extern void usbs_start_rx(usbs_rx_endpoint*);
+extern void usbs_start_tx(usbs_tx_endpoint*);
+extern void usbs_start_rx_buffer(usbs_rx_endpoint*, unsigned char*, int, void (*)(void*, int), void*);
+extern void usbs_start_tx_buffer(usbs_tx_endpoint*, const unsigned char*, int, void (*)(void*, int), void*);
+extern cyg_bool usbs_rx_endpoint_halted(usbs_rx_endpoint*);
+extern cyg_bool usbs_tx_endpoint_halted(usbs_tx_endpoint*);
+extern void usbs_set_rx_endpoint_halted(usbs_rx_endpoint*, cyg_bool);
+extern void usbs_set_tx_endpoint_halted(usbs_tx_endpoint*, cyg_bool);
+extern void usbs_start_rx_endpoint_wait(usbs_rx_endpoint*, void (*)(void*, int), void*);
+extern void usbs_start_tx_endpoint_wait(usbs_tx_endpoint*, void (*)(void*, int), void*);
+
+// Functions that can go into devtab entries. These should not be
+// called directly, they are intended only for use by USB device
+// drivers.
+#if defined(CYGPKG_IO) && defined(CYGPKG_ERROR)
+#include <cyg/io/io.h>
+extern Cyg_ErrNo usbs_devtab_cwrite(cyg_io_handle_t, const void*, cyg_uint32*);
+extern Cyg_ErrNo usbs_devtab_cread(cyg_io_handle_t, void*, cyg_uint32*);
+extern Cyg_ErrNo usbs_devtab_get_config(cyg_io_handle_t, cyg_uint32, void*, cyg_uint32*);
+extern Cyg_ErrNo usbs_devtab_set_config(cyg_io_handle_t, cyg_uint32, const void*, cyg_uint32*);
+#endif
+
+// Additional support for testing.
+// Test cases need to have some way of finding out about what support is
+// actually provided by the USB device driver, for example what endpoints
+// are available. There is no perfect way of achieving this. One approach
+// would be to scan through the devtab table looking for devices of the
+// form /dev/usbs1r. That is not reliable: the devtab entries may have been
+// configured out if higher-level code uses the usb-specific API; or the
+// devtab entries may have been renamed. Also having a devtab entry does not
+// really give the kind of information a general-purpose testcase needs,
+// for example upper bounds on transfer size.
+//
+// An alternative approach is to have a data structure that somehow
+// defines the USB hardware, and the USB device driver then creates an
+// instance of this. This is the approach actually taken. The problem
+// now is how the test code can access this instance. Accessing by
+// unique name is simple, as long as there is only one USB device in
+// the system (which of course will usually be the case on the USB
+// slave side). Alternative approaches such as creating a table at
+// link time or a list during static construction time are vulnerable
+// either to selective linking or to having these structures present
+// in applications other than the test cases. In future it might be
+// possible to address the latter issue by extending the build system
+// support, e.g. a new library libtesting.a and a new object file
+// testing.o.
+//
+// Note that a given endpoint could be used for bulk transfers some
+// of the time, then for isochronous transfers, etc. It is the
+// responsibility of the host to only perform one type of IN operation
+// for a given endpoint number, and ditto for OUT.
+
+typedef struct usbs_testing_endpoint {
+ int endpoint_type; // One of ATTR_CONTROL, ATTR_BULK, ...
+ int endpoint_number; // Between 0 and 15
+ int endpoint_direction; // ENDPOINT_IN or ENDPOINT_OUT
+ void* endpoint; // pointer to the usbs_control_endpoint, usbs_rx_endpoint, ...
+ const char* devtab_entry; // e.g. "/dev/usbs1r", or 0 if inaccessible via devtab
+ int min_size; // Minimum transfer size
+ int max_size; // -1 indicates no specific upper bound
+ int max_in_padding; // extra bytes that the target may send, usually 0.
+ // Primarily for SA11x0 hardware. It is assumed
+ // for now that no other hardware will exhibit
+ // comparable problems.
+ int alignment; // Buffer should be aligned to a suitable boundary
+} usbs_testing_endpoint;
+
+// A specific instance provided by the device driver. The end of
+// the table is indicated by a NULL endpoint field.
+extern usbs_testing_endpoint usbs_testing_endpoints[];
+
+#define USBS_TESTING_ENDPOINTS_TERMINATOR \
+ { \
+ endpoint_type : USB_ENDPOINT_DESCRIPTOR_ATTR_CONTROL, \
+ endpoint_number : 0, \
+ endpoint_direction : USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN, \
+ endpoint : (void*) 0, \
+ devtab_entry : (const char*) 0, \
+ min_size : 0, \
+ max_size : 0, \
+ max_in_padding : 0, \
+ alignment : 0 \
+ }
+
+#define USBS_TESTING_ENDPOINTS_IS_TERMINATOR(_endpoint_) ((void*)0 == (_endpoint_).endpoint)
+
+#ifdef __cplusplus
+} // extern "C" {
+#endif
+
+#endif // CYGONCE_USBS_H
+
diff --git a/cesar/ecos/packages/io/usb/slave/current/src/usbs.c b/cesar/ecos/packages/io/usb/slave/current/src/usbs.c
new file mode 100644
index 0000000000..c1435de4c9
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/src/usbs.c
@@ -0,0 +1,713 @@
+//==========================================================================
+//
+// usbs.c
+//
+// Generic USB slave-side support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): bartv
+// Contributors: bartv
+// Date: 2000-10-04
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/cyg_trac.h>
+#include <cyg/infra/diag.h>
+#include <cyg/io/usb/usbs.h>
+#include <cyg/hal/drv_api.h>
+
+// ----------------------------------------------------------------------------
+// Devtab entry support. This code can be compiled with no overheads as
+// long as the necessary support package is in place.
+#ifdef CYGPKG_IO
+# include <cyg/io/io.h>
+# include <cyg/io/devtab.h>
+// ----------------------------------------------------------------------------
+// read()/write() functions applied to USB endpoints. These just
+// indirect via the usbs_endpoint structures and wait for the
+// callback to happen.
+
+typedef struct usbs_callback_data {
+ bool completed;
+ int result;
+ cyg_drv_mutex_t lock;
+ cyg_drv_cond_t signal;
+} usbs_callback_data;
+
+static void
+usbs_devtab_callback(void* arg, int result)
+{
+ usbs_callback_data* callback_data = (usbs_callback_data*) arg;
+ callback_data->result = result;
+ callback_data->completed = true;
+ cyg_drv_cond_signal(&(callback_data->signal));
+}
+
+Cyg_ErrNo
+usbs_devtab_cwrite(cyg_io_handle_t handle, const void* buf, cyg_uint32* size)
+{
+ usbs_callback_data wait;
+ cyg_devtab_entry_t* devtab_entry;
+ usbs_tx_endpoint* endpoint;
+ int result = ENOERR;
+
+ CYG_REPORT_FUNCTION();
+
+ wait.completed = 0;
+ cyg_drv_mutex_init(&wait.lock);
+ cyg_drv_cond_init(&wait.signal, &wait.lock);
+
+ devtab_entry = (cyg_devtab_entry_t*) handle;
+ CYG_CHECK_DATA_PTR( devtab_entry, "A valid endpoint must be supplied");
+ endpoint = (usbs_tx_endpoint*) devtab_entry->priv;
+
+ CYG_CHECK_DATA_PTR( endpoint, "The handle must correspond to a USB endpoint");
+ CYG_CHECK_FUNC_PTR( endpoint->start_tx_fn, "The endpoint must have a start_tx function");
+
+ endpoint->buffer = (unsigned char*) buf;
+ endpoint->buffer_size = (int) *size;
+ endpoint->complete_fn = &usbs_devtab_callback;
+ endpoint->complete_data = (void*) &wait;
+ (*endpoint->start_tx_fn)(endpoint);
+
+ cyg_drv_mutex_lock(&wait.lock);
+ while (!wait.completed) {
+ cyg_drv_cond_wait(&wait.signal);
+ }
+ cyg_drv_mutex_unlock(&wait.lock);
+ if (wait.result < 0) {
+ result = wait.result;
+ } else {
+ *size = wait.result;
+ }
+
+ cyg_drv_cond_destroy(&wait.signal);
+ cyg_drv_mutex_destroy(&wait.lock);
+
+ CYG_REPORT_RETURN();
+ return result;
+}
+
+Cyg_ErrNo
+usbs_devtab_cread(cyg_io_handle_t handle, void* buf, cyg_uint32* size)
+{
+ usbs_callback_data wait;
+ cyg_devtab_entry_t* devtab_entry;
+ usbs_rx_endpoint* endpoint;
+ int result = ENOERR;
+
+ CYG_REPORT_FUNCTION();
+
+ wait.completed = 0;
+ cyg_drv_mutex_init(&wait.lock);
+ cyg_drv_cond_init(&wait.signal, &wait.lock);
+
+ devtab_entry = (cyg_devtab_entry_t*) handle;
+ CYG_CHECK_DATA_PTR( devtab_entry, "A valid endpoint must be supplied");
+ endpoint = (usbs_rx_endpoint*) devtab_entry->priv;
+
+ CYG_CHECK_DATA_PTR( endpoint, "The handle must correspond to a USB endpoint");
+ CYG_CHECK_FUNC_PTR( endpoint->start_rx_fn, "The endpoint must have a start_rx function");
+
+ endpoint->buffer = (unsigned char*) buf;
+ endpoint->buffer_size = (int) *size;
+ endpoint->complete_fn = &usbs_devtab_callback;
+ endpoint->complete_data = (void*) &wait;
+ (*endpoint->start_rx_fn)(endpoint);
+ cyg_drv_mutex_lock(&wait.lock);
+ while (!wait.completed) {
+ cyg_drv_cond_wait(&wait.signal);
+ }
+ cyg_drv_mutex_unlock(&wait.lock);
+ if (wait.result < 0) {
+ result = wait.result;
+ } else {
+ *size = wait.result;
+ }
+
+ cyg_drv_cond_destroy(&wait.signal);
+ cyg_drv_mutex_destroy(&wait.lock);
+
+ CYG_REPORT_RETURN();
+ return result;
+}
+
+// ----------------------------------------------------------------------------
+// More devtab functions, this time related to ioctl() style operations.
+Cyg_ErrNo
+usbs_devtab_get_config(cyg_io_handle_t handle, cyg_uint32 code, void* buf, cyg_uint32* size)
+{
+ return -EINVAL;
+}
+
+Cyg_ErrNo
+usbs_devtab_set_config(cyg_io_handle_t handle, cyg_uint32 code, const void* buf, cyg_uint32* size)
+{
+ return -EINVAL;
+}
+
+#endif // CYGPKG_IO
+
+// ----------------------------------------------------------------------------
+// USB-specific functions that are useful for applications/packages which
+// do not want to use the devtab interface. These may get called in DSR
+// context.
+
+void
+usbs_start_rx(usbs_rx_endpoint* endpoint)
+{
+ CYG_CHECK_DATA_PTR( endpoint, "A valid USB endpoint must be supplied");
+ CYG_CHECK_FUNC_PTR( endpoint->start_rx_fn, "The USB endpoint must support receive operations");
+ (*endpoint->start_rx_fn)(endpoint);
+}
+
+void
+usbs_start_rx_buffer(usbs_rx_endpoint* endpoint,
+ unsigned char* buf, int size,
+ void (*callback_fn)(void *, int), void* callback_arg)
+{
+ CYG_CHECK_DATA_PTR( endpoint, "A valid USB endpoint must be supplied");
+ CYG_CHECK_FUNC_PTR( endpoint->start_rx_fn, "The USB endpoint must support receive operations");
+
+ endpoint->buffer = buf;
+ endpoint->buffer_size = size;
+ endpoint->complete_fn = callback_fn;
+ endpoint->complete_data = callback_arg;
+ (*endpoint->start_rx_fn)(endpoint);
+}
+
+void
+usbs_start_tx(usbs_tx_endpoint* endpoint)
+{
+ CYG_CHECK_DATA_PTR( endpoint, "A valid USB endpoint must be supplied");
+ CYG_CHECK_FUNC_PTR( endpoint->start_tx_fn, "The USB endpoint must support receive operations");
+ (*endpoint->start_tx_fn)(endpoint);
+}
+
+void
+usbs_start_tx_buffer(usbs_tx_endpoint* endpoint,
+ const unsigned char* buf, int size,
+ void (*callback_fn)(void*, int), void *callback_arg)
+{
+ CYG_CHECK_DATA_PTR( endpoint, "A valid USB endpoint must be supplied");
+ CYG_CHECK_FUNC_PTR( endpoint->start_tx_fn, "The USB endpoint must support receive operations");
+
+ endpoint->buffer = buf;
+ endpoint->buffer_size = size;
+ endpoint->complete_fn = callback_fn;
+ endpoint->complete_data = callback_arg;
+ (*endpoint->start_tx_fn)(endpoint);
+}
+
+void
+usbs_start(usbs_control_endpoint* endpoint)
+{
+ CYG_CHECK_DATA_PTR( endpoint, "A valid USB endpoint must be supplied");
+ CYG_CHECK_FUNC_PTR( endpoint->start_fn, "The USB endpoint should have a start function");
+
+ (*endpoint->start_fn)(endpoint);
+}
+
+cyg_bool
+usbs_rx_endpoint_halted(usbs_rx_endpoint* endpoint)
+{
+ CYG_CHECK_DATA_PTR( endpoint, "A valid USB endpoint must be supplied");
+ return endpoint->halted;
+}
+
+cyg_bool
+usbs_tx_endpoint_halted(usbs_tx_endpoint* endpoint)
+{
+ CYG_CHECK_DATA_PTR( endpoint, "A valid USB endpoint must be supplied");
+ return endpoint->halted;
+}
+
+void
+usbs_set_rx_endpoint_halted(usbs_rx_endpoint* endpoint, cyg_bool halted)
+{
+ CYG_CHECK_DATA_PTR( endpoint, "A valid USB endpoint must be supplied");
+ CYG_CHECK_FUNC_PTR( endpoint->set_halted_fn, "The USB endpoint should have a set-halted function");
+ (*endpoint->set_halted_fn)(endpoint, halted);
+}
+
+void
+usbs_set_tx_endpoint_halted(usbs_tx_endpoint* endpoint, cyg_bool halted)
+{
+ CYG_CHECK_DATA_PTR( endpoint, "A valid USB endpoint must be supplied");
+ CYG_CHECK_FUNC_PTR( endpoint->set_halted_fn, "The USB endpoint should have a set-halted function");
+ (*endpoint->set_halted_fn)(endpoint, halted);
+}
+
+void
+usbs_start_rx_endpoint_wait(usbs_rx_endpoint* endpoint, void (*callback_fn)(void*, int), void* callback_data)
+{
+ endpoint->buffer = (unsigned char*) 0;
+ endpoint->buffer_size = 0;
+ endpoint->complete_fn = callback_fn;
+ endpoint->complete_data = callback_data;
+ (*endpoint->start_rx_fn)(endpoint);
+}
+
+void
+usbs_start_tx_endpoint_wait(usbs_tx_endpoint* endpoint, void (*callback_fn)(void*, int), void* callback_data)
+{
+ endpoint->buffer = (unsigned char*) 0;
+ endpoint->buffer_size = 0;
+ endpoint->complete_fn = callback_fn;
+ endpoint->complete_data = callback_data;
+ (*endpoint->start_tx_fn)(endpoint);
+}
+
+
+// ----------------------------------------------------------------------------
+// Handling of standard control messages. This will be invoked by
+// a USB device driver, usually at DSR level, to process any control
+// messages that cannot be handled by the hardware itself and that
+// have also not been handled by the application-specific handler
+// (if any).
+//
+// Because this function can run at DSR level performance is important.
+//
+// The various standard control messages are affected as follows:
+//
+// clear-feature: nothing can be done here about device requests to
+// disable remote-wakeup or about endpoint halt requests. It appears
+// to be legal to clear no features on an interface.
+//
+// get-configuration: if the device is not configured a single byte 0
+// should be returned. Otherwise this code assumes only one configuration
+// is supported and its id can be extracted from the enumeration data.
+// For more complicated devices get-configuration has to be handled
+// at a higher-level.
+//
+// get-descriptor: this is the big one. It is used to obtain
+// the enumeration data. An auxiliary refill function is needed.
+//
+// get-interface: this can be used to identify the current variant
+// for a given interface within a configuration. For simple devices
+// there will be only interface, 0. For anything more complicated
+// higher level code will have to take care of the request.
+//
+// get-status. Much the same as clear-feature.
+//
+// set-address. Must be handled at the device driver level.
+//
+// set-configuration: a value of 0 is used to deconfigure the device,
+// which can be handled here. Otherwise this code assumes that only
+// a single configuration is supported and enables that. For anything
+// more complicated higher-level code has to handle this request.
+//
+// set-descriptor: used to update the enumeration data. This is not
+// supported here, although higher-level code can choose to do so.
+//
+// set-feature. See clear-feature and get-status.
+//
+// set-interface. Variant interfaces are not supported by the
+// base code so this request has to be handled at a higher level.
+//
+// synch-frame. This is only relevant for isochronous transfers
+// which are not yet supported, and anyway it is not clear what
+// could be done about these requests here.
+
+// This refill function handles GET_DESCRIPTOR requests for a
+// configuration. For details of the control_buffer usage see
+// the relevant code in the main callback.
+static void
+usbs_configuration_descriptor_refill(usbs_control_endpoint* endpoint)
+{
+ usb_devreq* req = (usb_devreq*) endpoint->control_buffer;
+ int length = (req->length_hi << 8) | req->length_lo;
+ int sent = (req->index_hi << 8) | req->index_lo;
+ int current_interface = req->type;
+ int last_interface = req->request;
+ int current_endpoint = req->value_lo;
+ int last_endpoint = req->value_hi;
+ cyg_bool done = false;
+
+ if (current_endpoint == last_endpoint) {
+ // The next transfer should be a single interface - unless we have already finished.
+ if (current_interface == last_interface) {
+ done = true;
+ } else {
+ endpoint->buffer = (unsigned char*) &(endpoint->enumeration_data->interfaces[current_interface]);
+ if (USB_INTERFACE_DESCRIPTOR_LENGTH >= (length - sent)) {
+ endpoint->buffer_size = length - sent;
+ done = true;
+ } else {
+ endpoint->buffer_size = USB_INTERFACE_DESCRIPTOR_LENGTH;
+ sent += USB_INTERFACE_DESCRIPTOR_LENGTH;
+ // Note that an interface with zero endpoints is ok. We'll just move
+ // to the next interface in the next call.
+ last_endpoint = current_endpoint +
+ endpoint->enumeration_data->interfaces[current_interface].number_endpoints;
+ current_interface++;
+ }
+ }
+ } else {
+ // The next transfer should be a single endpoint. The
+ // endpoints are actually contiguous array elements
+ // but may not be packed, so they have to be transferred
+ // one at a time.
+ endpoint->buffer = (unsigned char*) &(endpoint->enumeration_data->endpoints[current_endpoint]);
+ if ((sent + USB_ENDPOINT_DESCRIPTOR_LENGTH) >= length) {
+ endpoint->buffer_size = length - sent;
+ done = true;
+ } else {
+ endpoint->buffer_size = USB_ENDPOINT_DESCRIPTOR_LENGTH;
+ current_endpoint ++;
+ }
+ }
+
+ if (done) {
+ endpoint->fill_buffer_fn = (void (*)(usbs_control_endpoint*)) 0;
+ } else {
+ req->type = (unsigned char) current_interface;
+ req->value_lo = (unsigned char) current_endpoint;
+ req->value_hi = (unsigned char) last_endpoint;
+ req->index_hi = (unsigned char) (sent >> 8);
+ req->index_lo = (unsigned char) (sent & 0x00FF);
+ }
+}
+
+usbs_control_return
+usbs_handle_standard_control(usbs_control_endpoint* endpoint)
+{
+ usbs_control_return result = USBS_CONTROL_RETURN_UNKNOWN;
+ usb_devreq* req = (usb_devreq*) endpoint->control_buffer;
+ int length;
+ int direction;
+ int recipient;
+
+ length = (req->length_hi << 8) | req->length_lo;
+ direction = req->type & USB_DEVREQ_DIRECTION_MASK;
+ recipient = req->type & USB_DEVREQ_RECIPIENT_MASK;
+
+ if (USB_DEVREQ_CLEAR_FEATURE == req->request) {
+
+ if (USB_DEVREQ_RECIPIENT_INTERFACE == recipient) {
+ // The host should expect no data back, the device must
+ // be configured, and there are no defined features to clear.
+ if ((0 == length) &&
+ (USBS_STATE_CONFIGURED == (endpoint->state & USBS_STATE_MASK)) &&
+ (0 == req->value_lo)) {
+
+ int interface_id = req->index_lo;
+ CYG_ASSERT( 1 == endpoint->enumeration_data->total_number_interfaces, \
+ "Higher level code should have handled this request");
+
+ if (interface_id == endpoint->enumeration_data->interfaces[0].interface_id) {
+ result = USBS_CONTROL_RETURN_HANDLED;
+ } else {
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+
+ } else {
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+ }
+
+ } else if (USB_DEVREQ_GET_CONFIGURATION == req->request) {
+
+ // Return a single byte 0 if the device is not currently
+ // configured. Otherwise assume a single configuration
+ // in the enumeration data and return its id.
+ if ((1 == length) && (USB_DEVREQ_DIRECTION_IN == direction)) {
+
+ if (USBS_STATE_CONFIGURED == (endpoint->state & USBS_STATE_MASK)) {
+ CYG_ASSERT( 1 == endpoint->enumeration_data->device.number_configurations, \
+ "Higher level code should have handled this request");
+ endpoint->control_buffer[0] = endpoint->enumeration_data->configurations[0].configuration_id;
+ } else {
+ endpoint->control_buffer[0] = 0;
+ }
+ endpoint->buffer = endpoint->control_buffer;
+ endpoint->buffer_size = 1;
+ endpoint->fill_buffer_fn = (void (*)(usbs_control_endpoint*)) 0;
+ endpoint->complete_fn = (usbs_control_return (*)(usbs_control_endpoint*, cyg_bool)) 0;
+ result = USBS_CONTROL_RETURN_HANDLED;
+
+ } else {
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+
+ } else if (USB_DEVREQ_GET_DESCRIPTOR == req->request) {
+
+ // The descriptor type is in value_hi. The descriptor index
+ // is in value_lo.
+ // The hsot must expect at least one byte of data.
+ if ((0 == length) || (USB_DEVREQ_DIRECTION_IN != direction)) {
+
+ result = USBS_CONTROL_RETURN_STALL;
+
+ } else if (USB_DEVREQ_DESCRIPTOR_TYPE_DEVICE == req->value_hi) {
+
+ // The device descriptor is easy, it is a single field in the
+ // enumeration data.
+ endpoint->buffer = (unsigned char*) &(endpoint->enumeration_data->device);
+ endpoint->fill_buffer_fn = (void (*)(usbs_control_endpoint*)) 0;
+ endpoint->complete_fn = (usbs_control_return (*)(usbs_control_endpoint*, cyg_bool)) 0;
+ if (length < USB_DEVICE_DESCRIPTOR_LENGTH) {
+ endpoint->buffer_size = length;
+ } else {
+ endpoint->buffer_size = USB_DEVICE_DESCRIPTOR_LENGTH;
+ }
+ result = USBS_CONTROL_RETURN_HANDLED;
+
+ } else if (USB_DEVREQ_DESCRIPTOR_TYPE_CONFIGURATION == req->value_hi) {
+
+ // This is where things get messy. We need to supply the
+ // specified configuration data, followed by some number of
+ // interfaces and endpoints. Plus there are length limits
+ // to consider. First check that the specified index is valid.
+ if (req->value_lo >= endpoint->enumeration_data->device.number_configurations) {
+ result = USBS_CONTROL_RETURN_STALL;
+ } else {
+ // No such luck. OK, supplying the initial block is easy.
+ endpoint->buffer = (unsigned char*) &(endpoint->enumeration_data->configurations[req->value_lo]);
+ endpoint->complete_fn = (usbs_control_return (*)(usbs_control_endpoint*, cyg_bool)) 0;
+
+ // How much data was actually requested. If only the
+ // configuration itself is of interest then there is
+ // no need to worry about the rest.
+ if (length <= USB_CONFIGURATION_DESCRIPTOR_LENGTH) {
+ endpoint->buffer_size = length;
+ endpoint->fill_buffer_fn = (void (*)(usbs_control_endpoint*)) 0;
+ } else {
+ int i, j;
+ int start_interface;
+ int start_endpoint;
+ endpoint->buffer_size = USB_CONFIGURATION_DESCRIPTOR_LENGTH;
+ endpoint->fill_buffer_fn = &usbs_configuration_descriptor_refill;
+
+ // The descriptor refill_fn needs to know what next to transfer.
+ // The desired interfaces and endpoints will be contiguous so
+ // we need to keep track of the following:
+ // 1) the current interface index being transferred.
+ // 2) the last interface that should be transferred.
+ // 3) the current endpoint index that should be transferred.
+ // 4) the last endpoint index. This marks interface/endpoint transitions.
+ // 5) how much has been transferred to date.
+ // This information can be held in the control_buffer,
+ // with the length field being preserved.
+ start_interface = 0;
+ start_endpoint = 0;
+ // For all configurations up to the desired one.
+ for (i = 0; i < req->value_lo; i++) {
+ int config_interfaces = endpoint->enumeration_data->configurations[i].number_interfaces;
+
+ // For all interfaces in this configuration.
+ for (j = 0; j < config_interfaces; j++) {
+ // Add the number of endpoints in this interface to the current count.
+ CYG_ASSERT( (j + start_interface) < endpoint->enumeration_data->total_number_interfaces, \
+ "Valid interface count in enumeration data");
+ start_endpoint += endpoint->enumeration_data->interfaces[j + start_interface].number_endpoints;
+ }
+ // And update the index for the starting interface.
+ start_interface += config_interfaces;
+ }
+ CYG_ASSERT( start_interface < endpoint->enumeration_data->total_number_interfaces, \
+ "Valid interface count in enumeration data");
+ CYG_ASSERT( ((0 == endpoint->enumeration_data->total_number_endpoints) && (0 == start_endpoint)) || \
+ (start_endpoint < endpoint->enumeration_data->total_number_endpoints), \
+ "Valid endpoint count in enumeration data");
+
+ req->type = (unsigned char) start_interface;
+ req->request = (unsigned char) (start_interface +
+ endpoint->enumeration_data->configurations[req->value_lo].number_interfaces
+ );
+ req->value_lo = (unsigned char) start_endpoint;
+ req->value_hi = (unsigned char) start_endpoint;
+ req->index_lo = USB_CONFIGURATION_DESCRIPTOR_LENGTH;
+ req->index_hi = 0;
+ }
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+
+
+ } else if (USB_DEVREQ_DESCRIPTOR_TYPE_STRING == req->value_hi) {
+
+ // As long as the index is valid, the rest is easy since
+ // the strings are just held in a simple array.
+ // NOTE: if multiple languages have to be supported
+ // then things get more difficult.
+ if (req->value_lo >= endpoint->enumeration_data->total_number_strings) {
+ result = USBS_CONTROL_RETURN_STALL;
+ } else {
+ endpoint->buffer = (unsigned char*) endpoint->enumeration_data->strings[req->value_lo];
+ endpoint->fill_buffer_fn = (void (*)(usbs_control_endpoint*)) 0;
+ endpoint->complete_fn = (usbs_control_return (*)(usbs_control_endpoint*, cyg_bool)) 0;
+
+ if (length < endpoint->buffer[0]) {
+ endpoint->buffer_size = length;
+ } else {
+ endpoint->buffer_size = endpoint->buffer[0];
+ }
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+
+ } else {
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+
+ } else if (USB_DEVREQ_GET_INTERFACE == req->request) {
+
+ if ((1 != length) ||
+ (USB_DEVREQ_DIRECTION_IN != direction) ||
+ (USBS_STATE_CONFIGURED != (endpoint->state & USBS_STATE_MASK))) {
+
+ result = USBS_CONTROL_RETURN_STALL;
+
+ } else {
+ int interface_id;
+
+ CYG_ASSERT( (1 == endpoint->enumeration_data->device.number_configurations) && \
+ (1 == endpoint->enumeration_data->total_number_interfaces), \
+ "Higher level code should have handled this request");
+
+ interface_id = (req->index_hi << 8) | req->index_lo;
+ if (interface_id != endpoint->enumeration_data->interfaces[0].interface_id) {
+ result = USBS_CONTROL_RETURN_STALL;
+ } else {
+ endpoint->control_buffer[0] = endpoint->enumeration_data->interfaces[0].alternate_setting;
+ endpoint->buffer = endpoint->control_buffer;
+ endpoint->buffer_size = 1;
+ endpoint->fill_buffer_fn = (void (*)(usbs_control_endpoint*)) 0;
+ endpoint->complete_fn = (usbs_control_return (*)(usbs_control_endpoint*, cyg_bool)) 0;
+ result = USBS_CONTROL_RETURN_HANDLED;
+ }
+ }
+
+ } else if (USB_DEVREQ_GET_STATUS == req->request) {
+
+ if (USB_DEVREQ_RECIPIENT_INTERFACE == recipient) {
+ // The host should expect two bytes back, the device must
+ // be configured, the interface number must be valid.
+ // The host should expect no data back, the device must
+ // be configured, and there are no defined features to clear.
+ if ((2 == length) &&
+ (USB_DEVREQ_DIRECTION_IN == direction) &&
+ (USBS_STATE_CONFIGURED == (endpoint->state & USBS_STATE_MASK))) {
+
+ int interface_id = req->index_lo;
+ CYG_ASSERT( 1 == endpoint->enumeration_data->total_number_interfaces, \
+ "Higher level code should have handled this request");
+
+ if (interface_id == endpoint->enumeration_data->interfaces[0].interface_id) {
+
+ // The request is legit, but there are no defined features for an interface...
+ endpoint->control_buffer[0] = 0;
+ endpoint->control_buffer[1] = 0;
+ endpoint->buffer = endpoint->control_buffer;
+ endpoint->buffer_size = 2;
+ endpoint->fill_buffer_fn = (void (*)(usbs_control_endpoint*)) 0;
+ endpoint->complete_fn = (usbs_control_return (*)(usbs_control_endpoint*, cyg_bool)) 0;
+ result = USBS_CONTROL_RETURN_HANDLED;
+
+ } else {
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+ } else {
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+ }
+
+ } else if (USB_DEVREQ_SET_CONFIGURATION == req->request) {
+
+ // Changing to configuration 0 means a state change from
+ // configured to addressed. Changing to anything else means a
+ // state change to configured. Both involve invoking the
+ // state change callback. If there are multiple configurations
+ // to choose from then this request has to be handled at
+ // a higher level.
+ int old_state = endpoint->state;
+ if (0 == req->value_lo) {
+ endpoint->state = USBS_STATE_ADDRESSED;
+ if ((void (*)(usbs_control_endpoint*, void*, usbs_state_change, int))0 != endpoint->state_change_fn) {
+ (*endpoint->state_change_fn)(endpoint, endpoint->state_change_data,
+ USBS_STATE_CHANGE_DECONFIGURED, old_state);
+ }
+ result = USBS_CONTROL_RETURN_HANDLED;
+
+ } else {
+ CYG_ASSERT(1 == endpoint->enumeration_data->device.number_configurations, \
+ "Higher level code should have handled this request");
+ if (req->value_lo == endpoint->enumeration_data->configurations[0].configuration_id) {
+ endpoint->state = USBS_STATE_CONFIGURED;
+ if ((void (*)(usbs_control_endpoint*, void*, usbs_state_change, int))0 != endpoint->state_change_fn) {
+ (*endpoint->state_change_fn)(endpoint, endpoint->state_change_data,
+ USBS_STATE_CHANGE_CONFIGURED, old_state);
+ }
+ result = USBS_CONTROL_RETURN_HANDLED;
+ } else {
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+ }
+
+ } else if (USB_DEVREQ_SET_FEATURE == req->request) {
+
+ if (USB_DEVREQ_RECIPIENT_INTERFACE == recipient) {
+ // The host should expect no data back, the device must
+ // be configured, and there are no defined features to clear.
+ if ((0 == length) &&
+ (USBS_STATE_CONFIGURED == (endpoint->state & USBS_STATE_MASK)) &&
+ (0 == req->value_lo)) {
+
+ int interface_id = req->index_lo;
+ CYG_ASSERT( 1 == endpoint->enumeration_data->total_number_interfaces, \
+ "Higher level code should have handled this request");
+
+ if (interface_id == endpoint->enumeration_data->interfaces[0].interface_id) {
+ result = USBS_CONTROL_RETURN_HANDLED;
+ } else {
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+
+ } else {
+ result = USBS_CONTROL_RETURN_STALL;
+ }
+ }
+
+ }
+
+ return result;
+}
diff --git a/cesar/ecos/packages/io/usb/slave/current/tests/common.c b/cesar/ecos/packages/io/usb/slave/current/tests/common.c
new file mode 100644
index 0000000000..7ec07f23f2
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/tests/common.c
@@ -0,0 +1,681 @@
+/*{{{ Banner */
+
+/*=================================================================
+//
+// common.c
+//
+// USB testing - code common to host and target
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// This module contains some definitions and functions that are common to
+// both the host and target side of USB testing, for example filling in
+// a buffer with well-known data and validating the contents at the other end.
+// The module is #include'd by other code rather than compiled separately,
+// which simplifies the build process.
+//
+// Author(s): bartv
+// Date: 2001-08-14
+//####DESCRIPTIONEND####
+//==========================================================================
+*/
+
+/*}}}*/
+
+/*{{{ Simple data pack and unpack operations */
+
+// ----------------------------------------------------------------------------
+// Utilities to pack and unpack data into buffers.
+//
+// Integers are transferred with 32 bits of precision, irrespective
+// of the capabilities of either target and host.
+
+static inline void
+pack_int(int datum, unsigned char* buffer, int* index_ptr)
+{
+ int index = *index_ptr;
+ buffer[index++] = (datum >> 0) & 0x0FF;
+ buffer[index++] = (datum >> 8) & 0x0FF;
+ buffer[index++] = (datum >> 16) & 0x0FF;
+ buffer[index++] = (datum >> 24) & 0x0FF;
+ *index_ptr = index;
+}
+
+static inline int
+unpack_int(unsigned char* buffer, int* index_ptr)
+{
+ int index = *index_ptr;
+ int result;
+
+ result = (buffer[index++] << 0);
+ result |= (buffer[index++] << 8);
+ result |= (buffer[index++] << 16);
+ result |= (buffer[index++] << 24);
+ *index_ptr = index;
+ return result;
+}
+
+/*}}}*/
+/*{{{ Buffer data and validation */
+
+// ----------------------------------------------------------------------------
+// The data required for a given test. For some test cases, for
+// example when trying to achieve maximum throughput, it does not
+// matter what data is transferred. For other tests it is important to
+// validate that the data sent and received match up, and there should
+// be some control over the actual data: some tests might want to send
+// a long sequence of byte 0, while others want to send more random data
+// for which a simple random number generator is useful.
+//
+// Exactly the same routines are used on both host and target to fill in
+// and check buffers, and they are sufficiently simple that the routines
+// should get compiled in compatible ways.
+//
+// There is no support at present for sending specific data, e.g. a
+// specific ethernet packet that appears to be causing problems. Knowledge
+// of specific data cannot be compiled into the test code, so the only
+// way to implement something like this would be to transfer the
+// problematical data over the USB bus in order to determine whether or
+// not the bus is capable of reliably transferring this data. That is
+// not entirely impossible (checksums, use of alternative endpoints),
+// but it is not implemented.
+//
+// An alternative approach would be to support a bounce operation
+// involving both an IN and an OUT endpoint, doing validation only on
+// the host. Again that is not yet implemented.
+//
+// The byte_fill and int_fill options are actually redundant because the
+// same effect can be achieved using a multiplier of 1 and an increment
+// of 0, but they can be implemented much more efficiently so may be
+// useful for benchmarks.
+
+typedef enum usbtestdata {
+ usbtestdata_none = 0, // There is nothing useful in the data
+ usbtestdata_bytefill = 1, // The data consists of a single byte, repeated
+ usbtestdata_wordfill = 2, // Or a single integer
+ usbtestdata_byteseq = 3, // Or a pseudo-random sequence (a * seed) + b
+ usbtestdata_wordseq = 4 // as either bytes or integers
+} usbtestdata;
+
+typedef struct UsbTestData {
+ usbtestdata format;
+ int seed;
+ int multiplier; // 1103515245
+ int increment; // 12345
+ int transfer_seed_multiplier;
+ int transfer_seed_increment;
+ int transfer_multiplier_multiplier;
+ int transfer_multiplier_increment;
+ int transfer_increment_multiplier;
+ int transfer_increment_increment;
+} UsbTestData;
+
+static void
+usbtest_fill_buffer(UsbTestData* how, unsigned char* buffer, int length)
+{
+ switch(how->format)
+ {
+ case usbtestdata_none:
+ return;
+
+ case usbtestdata_bytefill:
+ // Leave it to the system to optimise memset().
+ memset(buffer, (how->seed & 0x0FF), length);
+ break;
+
+ case usbtestdata_wordfill:
+ {
+ // The buffer may not be a multiple of four bytes, so the last entry is always
+ // zero'd.
+ int i;
+ int index = 0;
+ for (i = 0; i < (length / 4); i++) {
+ pack_int(how->seed, buffer, &index);
+ }
+ pack_int(0, buffer, &index);
+ break;
+ }
+
+ case usbtestdata_byteseq:
+ {
+ int i;
+ for (i = 0; i < length; i++) {
+ buffer[i] = (how->seed & 0x00FF);
+ how->seed *= how->multiplier;
+ how->seed += how->increment;
+ }
+ break;
+ }
+
+ case usbtestdata_wordseq:
+ {
+ int i;
+ int index = 0;
+ for (i = 0; i < (length / 4); i++) {
+ pack_int(how->seed, buffer, &index);
+ how->seed *= how->multiplier;
+ how->seed += how->increment;
+ }
+ pack_int(0, buffer, &index);
+ break;
+ }
+ }
+
+ // After each transfer update the seed, multiplier and increment
+ // ready for the next one.
+ how->seed *= how->transfer_seed_multiplier;
+ how->seed += how->transfer_seed_increment;
+ how->multiplier *= how->transfer_multiplier_multiplier;
+ how->multiplier += how->transfer_multiplier_increment;
+ how->increment *= how->transfer_increment_multiplier;
+ how->increment += how->transfer_increment_increment;
+}
+
+static int
+usbtest_check_buffer(UsbTestData* how, unsigned char* buffer, int length)
+{
+ int result = 1;
+
+ switch(how->format) {
+ case usbtestdata_none:
+ break;
+
+ case usbtestdata_bytefill:
+ {
+ int i;
+ result = 1;
+ for (i = 0; i < length; i++) {
+ if (buffer[i] != (how->seed & 0x00FF)) {
+ result = 0;
+ break;
+ }
+ }
+ break;
+ }
+
+ case usbtestdata_wordfill:
+ {
+ int i;
+ int index = 0;
+ for (i = 0; i < (length / 4); i++) {
+ int datum = unpack_int(buffer, &index);
+ if (datum != (how->seed & 0x0FFFFFFFF)) {
+ result = 0;
+ break;
+ }
+ }
+ for (i = 4 * i; result && (i < length); i++) {
+ if (0 != buffer[i]) {
+ result = 0;
+ break;
+ }
+ }
+ break;
+ }
+
+ case usbtestdata_byteseq:
+ {
+ int i;
+ for (i = 0; i < length; i++) {
+ if (buffer[i] != (how->seed & 0x00FF)) {
+ result = 0;
+ break;
+ }
+ how->seed *= how->multiplier;
+ how->seed += how->increment;
+ }
+ break;
+ }
+
+ case usbtestdata_wordseq:
+ {
+ int i;
+ int index = 0;
+
+ for (i = 0; i < (length / 4); i++) {
+ int datum = unpack_int(buffer, &index);
+ if (datum != (how->seed & 0x0FFFFFFFF)) {
+ result = 0;
+ break;
+ }
+ how->seed *= how->multiplier;
+ how->seed += how->increment;
+ }
+ for (i = 4 * i; result && (i < length); i++) {
+ if (0 != buffer[i]) {
+ result = 0;
+ break;
+ }
+ }
+ break;
+ }
+ }
+
+ // After each transfer update the seed, multiplier and increment
+ // ready for the next transfer.
+ how->seed *= how->transfer_seed_multiplier;
+ how->seed += how->transfer_seed_increment;
+ how->multiplier *= how->transfer_multiplier_multiplier;
+ how->multiplier += how->transfer_multiplier_increment;
+ how->increment *= how->transfer_increment_multiplier;
+ how->increment += how->transfer_increment_increment;
+
+ return result;
+}
+
+#ifdef HOST
+static void
+pack_usbtestdata(UsbTestData* data, unsigned char* buf, int* index)
+{
+ pack_int((int)data->format, buf, index);
+ pack_int((int)data->seed, buf, index);
+ pack_int((int)data->multiplier, buf, index);
+ pack_int((int)data->increment, buf, index);
+ pack_int((int)data->transfer_seed_multiplier, buf, index);
+ pack_int((int)data->transfer_seed_increment, buf, index);
+ pack_int((int)data->transfer_multiplier_multiplier, buf, index);
+ pack_int((int)data->transfer_multiplier_increment, buf, index);
+ pack_int((int)data->transfer_increment_multiplier, buf, index);
+ pack_int((int)data->transfer_increment_increment, buf, index);
+}
+#endif
+
+#ifdef TARGET
+static void
+unpack_usbtestdata(UsbTestData* data, unsigned char* buf, int* index)
+{
+ data->format = (usbtestdata) unpack_int(buf, index);
+ data->seed = unpack_int(buf, index);
+ data->multiplier = unpack_int(buf, index);
+ data->increment = unpack_int(buf, index);
+ data->transfer_seed_multiplier = unpack_int(buf, index);
+ data->transfer_seed_increment = unpack_int(buf, index);
+ data->transfer_multiplier_multiplier= unpack_int(buf, index);
+ data->transfer_multiplier_increment = unpack_int(buf, index);
+ data->transfer_increment_multiplier = unpack_int(buf, index);
+ data->transfer_increment_increment = unpack_int(buf, index);
+}
+#endif
+
+/*}}}*/
+/*{{{ Testcase definitions */
+
+// ----------------------------------------------------------------------------
+// Definitions of the supported test cases. The actual implementations need
+// to vary between host and target.
+
+typedef enum usbtest {
+ usbtest_invalid = 0,
+ usbtest_bulk_out = 1,
+ usbtest_bulk_in = 2,
+ usbtest_control_in = 3
+} usbtest;
+
+// What I/O mechanism should be used on the target to process data?
+typedef enum usb_io_mechanism {
+ usb_io_mechanism_usb = 1, // The low-level USB-specific API
+ usb_io_mechanism_dev = 2 // cyg_devio_cread() et al
+} usb_io_mechanism;
+
+// Bulk transfers. The same structure can be used for IN and OUT transfers.
+// The endpoint number will be or'd with either USB_DIR_IN or USB_DIR_OUT,
+// or the equivalent under eCos.
+typedef struct UsbTest_Bulk {
+ int number_packets;
+ int endpoint;
+ int tx_size;
+ int tx_size_min;
+ int tx_size_max;
+ int tx_size_multiplier;
+ int tx_size_divisor;
+ int tx_size_increment;
+ int rx_size;
+ int rx_size_min;
+ int rx_size_max;
+ int rx_size_multiplier;
+ int rx_size_divisor;
+ int rx_size_increment;
+ int rx_padding;
+ int tx_delay;
+ int tx_delay_min;
+ int tx_delay_max;
+ int tx_delay_multiplier;
+ int tx_delay_divisor;
+ int tx_delay_increment;
+ int rx_delay;
+ int rx_delay_min;
+ int rx_delay_max;
+ int rx_delay_multiplier;
+ int rx_delay_divisor;
+ int rx_delay_increment;
+ usb_io_mechanism io_mechanism;
+ UsbTestData data;
+} UsbTest_Bulk;
+
+#ifdef HOST
+static void
+pack_usbtest_bulk(UsbTest_Bulk* test, unsigned char* buffer, int* index)
+{
+ pack_int(test->number_packets, buffer, index);
+ pack_int(test->endpoint, buffer, index);
+ pack_int(test->tx_size, buffer, index);
+ pack_int(test->tx_size_min, buffer, index);
+ pack_int(test->tx_size_max, buffer, index);
+ pack_int(test->tx_size_multiplier, buffer, index);
+ pack_int(test->tx_size_divisor, buffer, index);
+ pack_int(test->tx_size_increment, buffer, index);
+ pack_int(test->rx_size, buffer, index);
+ pack_int(test->rx_size_min, buffer, index);
+ pack_int(test->rx_size_max, buffer, index);
+ pack_int(test->rx_size_multiplier, buffer, index);
+ pack_int(test->rx_size_divisor, buffer, index);
+ pack_int(test->rx_size_increment, buffer, index);
+ // There is no need to transfer the padding field. It is only of
+ // interest on the host, and this message is being packed
+ // for the target side.
+ pack_int(test->tx_delay, buffer, index);
+ pack_int(test->tx_delay_min, buffer, index);
+ pack_int(test->tx_delay_max, buffer, index);
+ pack_int(test->tx_delay_multiplier, buffer, index);
+ pack_int(test->tx_delay_divisor, buffer, index);
+ pack_int(test->tx_delay_increment, buffer, index);
+ pack_int(test->rx_delay, buffer, index);
+ pack_int(test->rx_delay_min, buffer, index);
+ pack_int(test->rx_delay_max, buffer, index);
+ pack_int(test->rx_delay_multiplier, buffer, index);
+ pack_int(test->rx_delay_divisor, buffer, index);
+ pack_int(test->rx_delay_increment, buffer, index);
+ pack_int((int)test->io_mechanism, buffer, index);
+ pack_usbtestdata(&(test->data), buffer, index);
+}
+#endif
+
+#ifdef TARGET
+static void
+unpack_usbtest_bulk(UsbTest_Bulk* test, unsigned char* buffer, int* index)
+{
+ test->number_packets = unpack_int(buffer, index);
+ test->endpoint = unpack_int(buffer, index);
+ test->tx_size = unpack_int(buffer, index);
+ test->tx_size_min = unpack_int(buffer, index);
+ test->tx_size_max = unpack_int(buffer, index);
+ test->tx_size_multiplier = unpack_int(buffer, index);
+ test->tx_size_divisor = unpack_int(buffer, index);
+ test->tx_size_increment = unpack_int(buffer, index);
+ test->rx_size = unpack_int(buffer, index);
+ test->rx_size_min = unpack_int(buffer, index);
+ test->rx_size_max = unpack_int(buffer, index);
+ test->rx_size_multiplier = unpack_int(buffer, index);
+ test->rx_size_divisor = unpack_int(buffer, index);
+ test->rx_size_increment = unpack_int(buffer, index);
+ test->tx_delay = unpack_int(buffer, index);
+ test->tx_delay_min = unpack_int(buffer, index);
+ test->tx_delay_max = unpack_int(buffer, index);
+ test->tx_delay_multiplier = unpack_int(buffer, index);
+ test->tx_delay_divisor = unpack_int(buffer, index);
+ test->tx_delay_increment = unpack_int(buffer, index);
+ test->rx_delay = unpack_int(buffer, index);
+ test->rx_delay_min = unpack_int(buffer, index);
+ test->rx_delay_max = unpack_int(buffer, index);
+ test->rx_delay_multiplier = unpack_int(buffer, index);
+ test->rx_delay_divisor = unpack_int(buffer, index);
+ test->rx_delay_increment = unpack_int(buffer, index);
+ test->io_mechanism = (usb_io_mechanism) unpack_int(buffer, index);
+ unpack_usbtestdata(&(test->data), buffer, index);
+}
+#endif
+
+// A macro for moving on the next packet size. This also has to be shared between host
+// and target, if the two got out of synch then testing would go horribly wrong.
+//
+// The new packet size is determined using a multiplier and increment,
+// so to e.g. increase packet sizes by 4 bytes each time the
+// multiplier would be 1 and the increment would be 4, or to double
+// packet sizes the multiplier would be 2 and the increment would be
+// 0. On underflow or overflow the code tries to adjust the packet size
+// back to within the accepted range.
+
+#define USBTEST_NEXT_TX_SIZE(_x_) \
+ do { \
+ _x_.tx_size *= _x_.tx_size_multiplier; \
+ _x_.tx_size /= _x_.tx_size_divisor; \
+ _x_.tx_size += _x_.tx_size_increment; \
+ if (_x_.tx_size < _x_.tx_size_min) { \
+ if (_x_.tx_size_min == _x_.tx_size_max) { \
+ _x_.tx_size = _x_.tx_size_min; \
+ } else { \
+ int tmp = _x_.tx_size_min - _x_.tx_size; \
+ tmp %= _x_.tx_size_max - _x_.tx_size_min; \
+ _x_.tx_size = tmp + _x_.tx_size_min; \
+ } \
+ } else if (_x_.tx_size > _x_.tx_size_max) { \
+ if (_x_.tx_size_min == _x_.tx_size_max) { \
+ _x_.tx_size = _x_.tx_size_max; \
+ } else { \
+ int tmp = _x_.tx_size - _x_.tx_size_max; \
+ tmp %= _x_.tx_size_max - _x_.tx_size_min; \
+ _x_.tx_size = tmp + _x_.tx_size_min; \
+ } \
+ } \
+ } while ( 0 )
+
+// A similar macro for moving on to the next receive size. This is less
+// critical since care is taken to always receive at least the current
+// tx size plus padding.
+// Note that padding needs to be added by the calling code, not here,
+// since padding is only applicable on the host-side and this macro
+// is used on both host and target.
+#define USBTEST_NEXT_RX_SIZE(_x_) \
+ do { \
+ _x_.rx_size *= _x_.rx_size_multiplier; \
+ _x_.rx_size /= _x_.rx_size_divisor; \
+ _x_.rx_size += _x_.rx_size_increment; \
+ if (_x_.rx_size < _x_.rx_size_min) { \
+ if (_x_.rx_size_min == _x_.rx_size_max) { \
+ _x_.rx_size = _x_.rx_size_min; \
+ } else { \
+ int tmp = _x_.rx_size_min - _x_.rx_size; \
+ tmp %= _x_.rx_size_max - _x_.rx_size_min; \
+ _x_.rx_size = tmp + _x_.rx_size_min; \
+ } \
+ } else if (_x_.rx_size > _x_.rx_size_max) { \
+ if (_x_.rx_size_min == _x_.rx_size_max) { \
+ _x_.rx_size = _x_.rx_size_max; \
+ } else { \
+ int tmp = _x_.rx_size - _x_.rx_size_max; \
+ tmp %= _x_.rx_size_max - _x_.rx_size_min; \
+ _x_.rx_size = tmp + _x_.rx_size_min; \
+ } \
+ } \
+ } while ( 0 )
+
+// And a macro for adjusting the transmit delay.
+#define USBTEST_NEXT_TX_DELAY(_x_) \
+ do { \
+ _x_.tx_delay *= _x_.tx_delay_multiplier; \
+ _x_.tx_delay /= _x_.tx_delay_divisor; \
+ _x_.tx_delay += _x_.tx_delay_increment; \
+ if (_x_.tx_delay < _x_.tx_delay_min) { \
+ if (_x_.tx_delay_min == _x_.tx_delay_max) { \
+ _x_.tx_delay = _x_.tx_delay_min; \
+ } else { \
+ int tmp = _x_.tx_delay_min - _x_.tx_delay; \
+ tmp %= _x_.tx_delay_max - _x_.tx_delay_min; \
+ _x_.tx_delay = tmp + _x_.tx_delay_min; \
+ } \
+ } else if (_x_.tx_delay > _x_.tx_delay_max) { \
+ if (_x_.tx_delay_min == _x_.tx_delay_max) { \
+ _x_.tx_delay = _x_.tx_delay_max; \
+ } else { \
+ int tmp = _x_.tx_delay - _x_.tx_delay_max; \
+ tmp %= _x_.tx_delay_max - _x_.tx_delay_min; \
+ _x_.tx_delay = tmp + _x_.tx_delay_min; \
+ } \
+ } \
+ } while ( 0 )
+
+#define USBTEST_NEXT_RX_DELAY(_x_) \
+ do { \
+ _x_.rx_delay *= _x_.rx_delay_multiplier; \
+ _x_.rx_delay /= _x_.rx_delay_divisor; \
+ _x_.rx_delay += _x_.rx_delay_increment; \
+ if (_x_.rx_delay < _x_.rx_delay_min) { \
+ if (_x_.rx_delay_min == _x_.rx_delay_max) { \
+ _x_.rx_delay = _x_.rx_delay_min; \
+ } else { \
+ int tmp = _x_.rx_delay_min - _x_.rx_delay; \
+ tmp %= _x_.rx_delay_max - _x_.rx_delay_min; \
+ _x_.rx_delay = tmp + _x_.rx_delay_min; \
+ } \
+ } else if (_x_.rx_delay > _x_.rx_delay_max) { \
+ if (_x_.rx_delay_min == _x_.rx_delay_max) { \
+ _x_.rx_delay = _x_.rx_delay_max; \
+ } else { \
+ int tmp = _x_.rx_delay - _x_.rx_delay_max; \
+ tmp %= _x_.rx_delay_max - _x_.rx_delay_min; \
+ _x_.rx_delay = tmp + _x_.rx_delay_min; \
+ } \
+ } \
+ } while ( 0 )
+
+#define USBTEST_BULK_NEXT(_bulk_) \
+ USBTEST_NEXT_TX_SIZE(_bulk_); \
+ USBTEST_NEXT_RX_SIZE(_bulk_); \
+ USBTEST_NEXT_TX_DELAY(_bulk_); \
+ USBTEST_NEXT_RX_DELAY(_bulk_);
+
+// Control transfers, receives
+typedef struct UsbTest_ControlIn {
+ int number_packets;
+ int packet_size_initial;
+ int packet_size_min;
+ int packet_size_max;
+ int packet_size_multiplier;
+ int packet_size_increment;
+ UsbTestData data;
+} UsbTest_ControlIn;
+
+#ifdef HOST
+static void
+pack_usbtest_control_in(UsbTest_ControlIn* test, unsigned char* buffer, int* index)
+{
+ pack_int(test->number_packets, buffer, index);
+ pack_int(test->packet_size_initial, buffer, index);
+ pack_int(test->packet_size_min, buffer, index);
+ pack_int(test->packet_size_max, buffer, index);
+ pack_int(test->packet_size_multiplier, buffer, index);
+ pack_int(test->packet_size_increment, buffer, index);
+ pack_usbtestdata(&(test->data), buffer, index);
+}
+#endif
+
+#ifdef TARGET
+static void
+unpack_usbtest_control_in(UsbTest_ControlIn* test, unsigned char* buffer, int* index)
+{
+ test->number_packets = unpack_int(buffer, index);
+ test->packet_size_initial = unpack_int(buffer, index);
+ test->packet_size_min = unpack_int(buffer, index);
+ test->packet_size_max = unpack_int(buffer, index);
+ test->packet_size_multiplier = unpack_int(buffer, index);
+ test->packet_size_increment = unpack_int(buffer, index);
+ unpack_usbtestdata(&(test->data), buffer, index);
+}
+#endif
+
+// For now control packet sizes are adjusted in exactly the same way as bulk transfers.
+#define USBTEST_CONTROL_NEXT_PACKET_SIZE(_packet_size_, _control_) \
+ _packet_size_ = (_packet_size_ * _control_.packet_size_multiplier) + _control_.packet_size_increment; \
+ if (_packet_size_ < _control_.packet_size_min) { \
+ _packet_size_ += _control_.packet_size_max - _control_.packet_size_min; \
+ if (_packet_size_ < _control_.packet_size_min) { \
+ _packet_size_ = _control_.packet_size_initial; \
+ } \
+ } else if (_packet_size_ > _control_.packet_size_max) { \
+ _packet_size_ -= _control_.packet_size_max - _control_.packet_size_min; \
+ if (_packet_size_ > _control_.packet_size_max) { \
+ _packet_size_ = _control_.packet_size_initial; \
+ } \
+ }
+
+/*}}}*/
+/*{{{ Recovery support */
+
+// ----------------------------------------------------------------------------
+// When things go wrong threads on either the host or the target may get
+// locked up waiting for further communication that never happens, because
+// the other side has already raised an error. Recovery is possible by
+// performing an extra I/O operation. For example, if a thread on the
+// target is blocked waiting on an OUT endpoint then recovery is possible
+// by the host sending some data to that endpoint. Similarly if a thread
+// on the host is blocked then recovery involves the target either sending
+// or receiving some additional data. There are alternative approaches such
+// as stalling endpoints, but making sure that the requested communication
+// actually happens involves fewer dependencies on exactly how those
+// operations behave.
+
+typedef struct UsbTest_Recovery {
+ int endpoint; // Top bit indicates direction, -1 indicates invalid
+ int protocol;
+ int size;
+} UsbTest_Recovery;
+
+static void
+pack_usbtest_recovery(UsbTest_Recovery* recovery, unsigned char* buffer, int* index)
+{
+ pack_int(recovery->endpoint, buffer, index);
+ pack_int(recovery->protocol, buffer, index);
+ pack_int(recovery->size, buffer, index);
+}
+
+static void
+unpack_usbtest_recovery(UsbTest_Recovery* recovery, unsigned char* buffer, int *index)
+{
+ recovery->endpoint = unpack_int(buffer, index);
+ recovery->protocol = unpack_int(buffer, index);
+ recovery->size = unpack_int(buffer, index);
+}
+
+static void
+usbtest_recovery_reset(UsbTest_Recovery* recovery)
+{
+ recovery->endpoint = -1;
+ recovery->protocol = 0;
+ recovery->size = 0;
+}
+
+/*}}}*/
diff --git a/cesar/ecos/packages/io/usb/slave/current/tests/protocol.h b/cesar/ecos/packages/io/usb/slave/current/tests/protocol.h
new file mode 100644
index 0000000000..1ae53c1a16
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/tests/protocol.h
@@ -0,0 +1,194 @@
+//=================================================================
+//
+// protocol.h
+//
+// USB testing - host<->target protocol
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// This header file is shared between target and host, and serves to
+// define certain aspects of the protocol used between the two such
+// as request codes.
+//
+// Author(s): bartv
+// Date: 2001-07-04
+//####DESCRIPTIONEND####
+//==========================================================================
+
+// The largest control packet that will be sent or expected.
+#define USBTEST_MAX_CONTROL_DATA 255
+
+// The largest error message that can be sent.
+#define USBTEST_MAX_MESSAGE 254
+
+// The largest bulk transfer that will be sent or expected. Because of
+// the use of the USB devfs support in the Linux kernel this is
+// currently limited to a single page, i.e. 4096 bytes. To allow for
+// padding, it is actually reduced to a slightly smaller size of 4090
+// bytes. This should still be sufficient to test most interesting
+// boundary conditions, apart from the transition to >64K.
+//
+// A small amount of additional buffer space should be allocated by
+// both host and target to allow for padding and possibly cache
+// alignment. All other protocols involve smaller transfers than this,
+// <= 64 bytes for interrupt transfers, <= 1023 for isochronous.
+#define USBTEST_MAX_BULK_DATA (4096)
+#define USBTEST_MAX_BULK_DATA_EXTRA 1024
+
+// The maximum number of tests that can be run concurrently. Each
+// needs a separate thread, stack, and buffer so there are memory
+// consumption implications.
+#define USBTEST_MAX_CONCURRENT_TESTS 8
+
+// Allow the host to find out the number of endpoints supported on
+// this target. The theoretical maximum number of endpoints is 91
+// (endpoint 0 control, endpoint 1-15 for both IN and OUT bulk, iso
+// and interrupt) so a single byte response will suffice. The value
+// and index fields are not used.
+#define USBTEST_MAX_ENDPOINTS 91
+#define USBTEST_ENDPOINT_COUNT 0x001
+
+// Get hold of additional information about a specific entry in the
+// array of endpoint details. The index field in the request
+// identifies the entry of interest. The reply information is as per
+// the usbs_testing_endpoint structure, and consists of:
+// 1) one byte, the endpoint type (control, bulk, ...)
+// 2) one byte, the endpoint number (as opposed to the array index number)
+// 3) one byte for direction, USB_DIR_IN or USB_DIR_OUT
+// 4) one byte for max_in_padding, usually 0
+// 5) four bytes for min_size, 32-bit little-endian integer
+// 6) four bytes for max_size, 32-bit little-endian integer
+// 7) an additional n bytes for the devtab name, max ~240 bytes
+// although usually far less.
+#define USBTEST_ENDPOINT_DETAILS 0x002
+
+// Report pass or failure. The host will send a string of up to
+// MAX_CONTROL_DATA bytes. The value and index fields are not used.
+#define USBTEST_PASS 0x003
+#define USBTEST_PASS_EXIT 0x004
+#define USBTEST_FAIL 0x005
+#define USBTEST_FAIL_EXIT 0x006
+
+// Synchronise. One problem with the current eCos USB API is that
+// there is no way to have a delayed response to a control message.
+// Any such support would be tricky, there are significant differences
+// in the hardware implementations and also timing constraints that
+// need to be satisfied. Instead the entire response to any control
+// request has to be prepared at DSR level. Usually this does not
+// cause any problems, e.g. for handling the standard control
+// messages, but for USB testing it may not be possible to handle a
+// request entirely at DSR level - yet the next full request should
+// not come in until the current one has been handled at thread-level.
+// To work around this there is support for a synchronization control
+// message. The return value is a single byte, 1 if the target is
+// ready for new requests, 0 if there is a still a request being
+// processed. The host can then perform some polling.
+#define USBTEST_SYNCH 0x007
+
+// Abort. There is no easy way to get both host and target back to a
+// known state, so abort the current test run.
+#define USBTEST_ABORT 0x008
+
+// Cancel the current batch of tests. Something has gone wrong at the
+// Tcl level, so any tests already prepared must be abandoned. No
+// additional data is required.
+#define USBTEST_CANCEL 0x009
+
+// Start the current batch of tests. No additional data is involved
+// or expected.
+#define USBTEST_START 0x00A
+
+// Has the current batch of tests finished? The host side polls the
+// target at regular intervals for this information.
+#define USBTEST_FINISHED 0x00B
+
+// Set the test-terminated flag. Something has gone wrong, probably a
+// timeout.
+#define USBTEST_SET_TERMINATED 0x00C
+
+// Get hold of recovery information for thread i in the target, where
+// the index field of the request identifies the thread. The result
+// is zero-bytes if the specified test has already finished, otherwise
+// a recovery structure.
+#define USBTEST_GET_RECOVERY 0x00D
+
+// The target should perform a recovery action to unlock a thread
+// on the host. The request holds a recovery structure.
+#define USBTEST_PERFORM_RECOVERY 0x00E
+
+// Collect the test result. The result is a single byte that indicates
+// pass or fail, optionally followed by a failure message.
+#define USBTEST_GET_RESULT 0x00F
+
+// The current batch of tests has completed. Perform any final clean-ups.
+#define USBTEST_BATCH_DONE 0x010
+
+// Set the verbosity level on the target-side
+#define USBTEST_VERBOSE 0x011
+
+// Perform endpoint initialization to ensure host and target
+// can actually communicate over a given endpoint
+#define USBTEST_INIT_CONTROL 0x012
+#define USBTEST_INIT_BULK_IN 0x013
+#define USBTEST_INIT_BULK_OUT 0x014
+#define USBTEST_INIT_ISO_IN 0x015
+#define USBTEST_INIT_ISO_OUT 0x016
+#define USBTEST_INIT_INTERRUPT_IN 0x017
+#define USBTEST_INIT_INTERRUPT_OUT 0x018
+
+
+// A standard bulk test. The data consists of a UsbTest_Bulk
+// structure, suitably packed.
+#define USBTEST_TEST_BULK 0x040
+
+// A control-IN test. The host will send reserved control messages with
+// an appropriate length field, and the target should return that data.
+#define USBTEST_TEST_CONTROL_IN 0x041
+
+// Sub-protocols for reserved control messages, supporting test operations
+// other than control-IN.
+#define USBTEST_RESERVED_CONTROL_IN 0x01
+
+// Work around a problem with control messages that involve additional
+// data from host to target. This problem is not yet well-understood.
+// The workaround involves sending multiple control packets with
+// up to four bytes encoded in the index and value fields.
+#define USBTEST_CONTROL_DATA1 0x0F1
+#define USBTEST_CONTROL_DATA2 0x0F2
+#define USBTEST_CONTROL_DATA3 0x0F3
+#define USBTEST_CONTROL_DATA4 0x0F4
+
diff --git a/cesar/ecos/packages/io/usb/slave/current/tests/usbtarget.c b/cesar/ecos/packages/io/usb/slave/current/tests/usbtarget.c
new file mode 100644
index 0000000000..0526aebec0
--- /dev/null
+++ b/cesar/ecos/packages/io/usb/slave/current/tests/usbtarget.c
@@ -0,0 +1,1848 @@
+/*{{{ Banner */
+
+/*=================================================================
+//
+// target.c
+//
+// USB testing - target-side
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// This program performs appropriate USB initialization and initializes
+// itself as a specific type of USB peripheral, Red Hat eCos testing.
+// There is no actual host-side device driver for this, instead there is
+// a test application which performs ioctl's on /proc/bus/usb/... and
+// makes appropriate functionality available to a Tcl script.
+//
+// Author(s): bartv
+// Date: 2001-07-04
+//####DESCRIPTIONEND####
+//==========================================================================
+*/
+
+/*}}}*/
+/*{{{ #include's */
+
+#include <stdio.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/diag.h>
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/io/io.h>
+#include <cyg/io/usb/usbs.h>
+#include <cyg/infra/testcase.h>
+#include "protocol.h"
+
+/*}}}*/
+
+/*{{{ Statics */
+
+// ----------------------------------------------------------------------------
+// Statics.
+
+// The number of endpoints supported by the device driver.
+static int number_endpoints = 0;
+
+// The control endpoint
+static usbs_control_endpoint* control_endpoint = (usbs_control_endpoint*) 0;
+
+// Buffers for incoming and outgoing data, and a length field.
+static unsigned char class_request[USBTEST_MAX_CONTROL_DATA + 1];
+static unsigned char class_reply[USBTEST_MAX_CONTROL_DATA + 1];
+static int class_request_size = 0;
+
+// This semaphore is used by DSRs to wake up the main thread when work has to
+// be done at thread level.
+static cyg_sem_t main_wakeup;
+
+// And this function pointer identifies the work that has to be done.
+static void (*main_thread_action)(void) = (void (*)(void)) 0;
+
+// Is the system still busy processing a previous request? This variable is
+// checked in response to the synch request. It may get updated in
+// DSRs as well as at thread level, hence volatile.
+static volatile int idle = 1;
+
+// Are any tests currently running?
+static int running = 0;
+
+// Has the current batch of tests been terminated by the host? This
+// flag is checked by the various test handlers at appropriate
+// intervals, and helps to handle the case where one of the side has
+// terminated early because an error has been detected.
+static int current_tests_terminated = 0;
+
+// A counter for the number of threads involved in the current batch of tests.
+static int thread_counter = 0;
+
+// An extra buffer for recovery operations, for example to accept and discard
+// data which the host is still trying to send.
+static unsigned char recovery_buffer[USBTEST_MAX_BULK_DATA + USBTEST_MAX_BULK_DATA_EXTRA];
+
+/*}}}*/
+/*{{{ Logging */
+
+// ----------------------------------------------------------------------------
+// The target-side code can provide various levels of run-time logging.
+// Obviously the verbose flag cannot be controlled by a command-line
+// argument, but it can be set from inside gdb or alternatively by
+// a request from the host.
+//
+// NOTE: is printf() the best I/O routine to use here?
+
+static int verbose = 0;
+
+#define VERBOSE(_level_, _format_, _args_...) \
+ do { \
+ if (verbose >= _level_) { \
+ diag_printf(_format_, ## _args_); \
+ } \
+ } while (0);
+
+/*}}}*/
+/*{{{ Utilities */
+
+// ----------------------------------------------------------------------------
+// A reimplementation of nanosleep, to avoid having to pull in the
+// POSIX compatibility testing for USB testing.
+static void
+usbs_nanosleep(int delay)
+{
+ cyg_tick_count_t ticks;
+ cyg_resolution_t resolution = cyg_clock_get_resolution(cyg_real_time_clock());
+
+ // (resolution.dividend/resolution.divisor) == nanoseconds/tick
+ // e.g. 1000000000/100, i.e. 10000000 ns or 10 ms per tick
+ // So ticks = (delay * divisor) / dividend
+ // e.g. (10000000 * 100) / 1000000000
+ // with a likely value of 0 for delays of less than the clock resolution,
+ // so round those up to one tick.
+
+ cyg_uint64 tmp = (cyg_uint64) delay;
+ tmp *= (cyg_uint64) resolution.divisor;
+ tmp /= (cyg_uint64) resolution.dividend;
+
+ ticks = (int) tmp;
+ if (0 != ticks) {
+ cyg_thread_delay(ticks);
+ }
+}
+
+// ----------------------------------------------------------------------------
+// Fix any problems in the driver-supplied endpoint data
+//
+// Maximum transfer sizes are limited not just by the capabilities
+// of the driver but also by the testing code itself, since e.g.
+// buffers for transfers are statically allocated.
+static void
+fix_driver_endpoint_data(void)
+{
+ int i;
+
+ for (i = 0; !USBS_TESTING_ENDPOINTS_IS_TERMINATOR(usbs_testing_endpoints[i]); i++) {
+ if (USB_ENDPOINT_DESCRIPTOR_ATTR_BULK == usbs_testing_endpoints[i].endpoint_type) {
+ if ((-1 == usbs_testing_endpoints[i].max_size) ||
+ (usbs_testing_endpoints[i].max_size > USBTEST_MAX_BULK_DATA)) {
+ usbs_testing_endpoints[i].max_size = USBTEST_MAX_BULK_DATA;
+ }
+ }
+ }
+}
+
+// ----------------------------------------------------------------------------
+// A heartbeat thread.
+//
+// USB tests can run for a long time with no traffic on the debug channel,
+// which can cause problems. To avoid problems it is possible to have a
+// heartbeat thread running in the background, sending output at one
+// second intervals.
+//
+// Depending on the configuration the output may still be line-buffered,
+// but that is still sufficient to keep things happy.
+
+static cyg_bool heartbeat = false;
+static cyg_thread heartbeat_data;
+static cyg_handle_t heartbeat_handle;
+static char heartbeat_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+
+static void
+heartbeat_function(cyg_addrword_t arg __attribute((unused)))
+{
+ char* message = "alive\n";
+ int i;
+
+ for ( i = 0; ; i = (i + 1) % 6) {
+ usbs_nanosleep(1000000000);
+ if (heartbeat) {
+ diag_write_char(message[i]);
+ }
+ }
+}
+
+static void
+start_heartbeat(void)
+{
+ cyg_thread_create( 0, &heartbeat_function, 0,
+ "heartbeat", heartbeat_stack, CYGNUM_HAL_STACK_SIZE_TYPICAL,
+ &heartbeat_handle, &heartbeat_data);
+ cyg_thread_resume(heartbeat_handle);
+}
+
+
+/*}}}*/
+/*{{{ Endpoint usage */
+
+// ----------------------------------------------------------------------------
+// It is important to keep track of which endpoints are currently in use,
+// because the behaviour of the USB I/O routines is undefined if there are
+// concurrent attempts to communicate on the same endpoint. Normally this is
+// not a problem because the host will ensure that a given endpoint is used
+// for only one endpoint at a time, but when performing recovery action it
+// is important that the system is sure that a given endpoint can be accessed
+// safely.
+
+static cyg_bool in_endpoint_in_use[16];
+static cyg_bool out_endpoint_in_use[16];
+
+// Lock the given endpoint. In theory this is only ever accessed from a single
+// test thread at a time, but just in case...
+static void
+lock_endpoint(int endpoint, int direction)
+{
+ CYG_ASSERTC((endpoint >=0) && (endpoint < 16));
+ CYG_ASSERTC((USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN == direction) || (USB_ENDPOINT_DESCRIPTOR_ENDPOINT_OUT == direction));
+
+ cyg_scheduler_lock();
+ if (0 == endpoint) {
+ // Comms traffic on endpoint 0 is implemented using reserved control messages.
+ // It is not really possible to have concurrent IN and OUT operations because
+ // the two would interfere with each other.
+ CYG_ASSERTC(!in_endpoint_in_use[0] && !out_endpoint_in_use[0]);
+ in_endpoint_in_use[0] = true;
+ out_endpoint_in_use[0] = true;
+ } else if (USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN == direction) {
+ CYG_ASSERTC(!in_endpoint_in_use[endpoint]);
+ in_endpoint_in_use[endpoint] = true;
+ } else {
+ CYG_ASSERTC(!out_endpoint_in_use[endpoint]);
+ out_endpoint_in_use[endpoint] = true;
+ }
+ cyg_scheduler_unlock();
+}
+
+static void
+unlock_endpoint(int endpoint, int direction)
+{
+ CYG_ASSERTC((endpoint >= 0) && (endpoint < 16));
+ CYG_ASSERTC((USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN == direction) || (USB_ENDPOINT_DESCRIPTOR_ENDPOINT_OUT == direction));
+
+ if (0 == endpoint) {
+ CYG_ASSERTC(in_endpoint_in_use[0] && out_endpoint_in_use[0]);
+ in_endpoint_in_use[0] = false;
+ out_endpoint_in_use[0] = false;
+ } else if (USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN == direction) {
+ CYG_ASSERTC(in_endpoint_in_use[endpoint]);
+ in_endpoint_in_use[endpoint] = false;
+ } else {
+ CYG_ASSERTC(out_endpoint_in_use[endpoint]);
+ out_endpoint_in_use[endpoint] = false;
+ }
+}
+
+static cyg_bool
+is_endpoint_locked(int endpoint, int direction)
+{
+ cyg_bool result = false;
+
+ if (0 == endpoint) {
+ result = in_endpoint_in_use[0];
+ } else if (USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN == direction) {
+ result = in_endpoint_in_use[endpoint];
+ } else {
+ result = out_endpoint_in_use[endpoint];
+ }
+ return result;
+}
+
+// For a given endpoint number, direction and protocol, search through the table
+// supplied by the device driver of all available endpoints. This can be used
+// to e.g. get hold of the name of the devtab entry or a pointer to the endpoint
+// data structure itself.
+static int
+lookup_endpoint(int endpoint_number, int direction, int protocol)
+{
+ int result = -1;
+ int i;
+
+ for (i = 0; !USBS_TESTING_ENDPOINTS_IS_TERMINATOR(usbs_testing_endpoints[i]); i++) {
+ if ((usbs_testing_endpoints[i].endpoint_type == protocol) &&
+ (usbs_testing_endpoints[i].endpoint_number == endpoint_number) &&
+ (usbs_testing_endpoints[i].endpoint_direction == direction)) {
+ result = i;
+ break;
+ }
+ }
+ return result;
+}
+
+/*}}}*/
+/*{{{ Enumeration data */
+
+// ----------------------------------------------------------------------------
+// The enumeration data.
+//
+// For simplicity this configuration involves just a single interface.
+// The target has to list all the endpoints, or the Linux kernel will
+// not allow application code to access them. Hence the information
+// provided by the device drivers has to be turned into endpoint descriptors.
+
+usb_configuration_descriptor usb_configuration = {
+ length: USB_CONFIGURATION_DESCRIPTOR_LENGTH,
+ type: USB_CONFIGURATION_DESCRIPTOR_TYPE,
+ total_length_lo: USB_CONFIGURATION_DESCRIPTOR_TOTAL_LENGTH_LO(1, 0),
+ total_length_hi: USB_CONFIGURATION_DESCRIPTOR_TOTAL_LENGTH_HI(1, 0),
+ number_interfaces: 1,
+ configuration_id: 1, // id 0 is special according to the spec
+ configuration_str: 0,
+ attributes: USB_CONFIGURATION_DESCRIPTOR_ATTR_REQUIRED |
+ USB_CONFIGURATION_DESCRIPTOR_ATTR_SELF_POWERED,
+ max_power: 50
+};
+
+usb_interface_descriptor usb_interface = {
+ length: USB_INTERFACE_DESCRIPTOR_LENGTH,
+ type: USB_INTERFACE_DESCRIPTOR_TYPE,
+ interface_id: 0,
+ alternate_setting: 0,
+ number_endpoints: 0,
+ interface_class: USB_INTERFACE_DESCRIPTOR_CLASS_VENDOR,
+ interface_subclass: USB_INTERFACE_DESCRIPTOR_SUBCLASS_VENDOR,
+ interface_protocol: USB_INTERFACE_DESCRIPTOR_PROTOCOL_VENDOR,
+ interface_str: 0
+};
+
+usb_endpoint_descriptor usb_endpoints[USBTEST_MAX_ENDPOINTS];
+
+const unsigned char* usb_strings[] = {
+ "\004\003\011\004",
+ "\020\003R\000e\000d\000 \000H\000a\000t\000",
+ "\054\003R\000e\000d\000 \000H\000a\000t\000 \000e\000C\000o\000s\000 \000"
+ "U\000S\000B\000 \000t\000e\000s\000t\000"
+};
+
+usbs_enumeration_data usb_enum_data = {
+ {
+ length: USB_DEVICE_DESCRIPTOR_LENGTH,
+ type: USB_DEVICE_DESCRIPTOR_TYPE,
+ usb_spec_lo: USB_DEVICE_DESCRIPTOR_USB11_LO,
+ usb_spec_hi: USB_DEVICE_DESCRIPTOR_USB11_HI,
+ device_class: USB_DEVICE_DESCRIPTOR_CLASS_VENDOR,
+ device_subclass: USB_DEVICE_DESCRIPTOR_SUBCLASS_VENDOR,
+ device_protocol: USB_DEVICE_DESCRIPTOR_PROTOCOL_VENDOR,
+ max_packet_size: 8,
+ vendor_lo: 0x42, // Note: this is not an allocated vendor id
+ vendor_hi: 0x42,
+ product_lo: 0x00,
+ product_hi: 0x01,
+ device_lo: 0x00,
+ device_hi: 0x01,
+ manufacturer_str: 1,
+ product_str: 2,
+ serial_number_str: 0,
+ number_configurations: 1
+ },
+ total_number_interfaces: 1,
+ total_number_endpoints: 0,
+ total_number_strings: 3,
+ configurations: &usb_configuration,
+ interfaces: &usb_interface,
+ endpoints: usb_endpoints,
+ strings: usb_strings
+};
+
+static void
+provide_endpoint_enumeration_data(void)
+{
+ int enum_endpoint_count = 0;
+ int i;
+
+ for (i = 0; !USBS_TESTING_ENDPOINTS_IS_TERMINATOR(usbs_testing_endpoints[i]); i++) {
+
+ // The control endpoint need not appear in the enumeration data.
+ if (USB_ENDPOINT_DESCRIPTOR_ATTR_CONTROL == usbs_testing_endpoints[i].endpoint_type) {
+ continue;
+ }
+
+ usb_endpoints[enum_endpoint_count].length = USB_ENDPOINT_DESCRIPTOR_LENGTH;
+ usb_endpoints[enum_endpoint_count].type = USB_ENDPOINT_DESCRIPTOR_TYPE;
+ usb_endpoints[enum_endpoint_count].endpoint = usbs_testing_endpoints[i].endpoint_number |
+ usbs_testing_endpoints[i].endpoint_direction;
+
+ switch (usbs_testing_endpoints[i].endpoint_type) {
+ case USB_ENDPOINT_DESCRIPTOR_ATTR_BULK:
+ usb_endpoints[enum_endpoint_count].attributes = USB_ENDPOINT_DESCRIPTOR_ATTR_BULK;
+ usb_endpoints[enum_endpoint_count].max_packet_lo = 64;
+ usb_endpoints[enum_endpoint_count].max_packet_hi = 0;
+ usb_endpoints[enum_endpoint_count].interval = 0;
+ break;
+
+ case USB_ENDPOINT_DESCRIPTOR_ATTR_ISOCHRONOUS:
+ usb_endpoints[enum_endpoint_count].attributes = USB_ENDPOINT_DESCRIPTOR_ATTR_ISOCHRONOUS;
+ usb_endpoints[enum_endpoint_count].max_packet_lo = usbs_testing_endpoints[i].max_size & 0x0FF;
+ usb_endpoints[enum_endpoint_count].max_packet_hi = (usbs_testing_endpoints[i].max_size >> 8) & 0x0FF;
+ usb_endpoints[enum_endpoint_count].interval = 1;
+ break;
+
+ case USB_ENDPOINT_DESCRIPTOR_ATTR_INTERRUPT:
+ usb_endpoints[enum_endpoint_count].attributes = USB_ENDPOINT_DESCRIPTOR_ATTR_INTERRUPT;
+ usb_endpoints[enum_endpoint_count].max_packet_lo = (unsigned char) usbs_testing_endpoints[i].max_size;
+ usb_endpoints[enum_endpoint_count].max_packet_hi = 0;
+ usb_endpoints[enum_endpoint_count].interval = 1; // NOTE: possibly incorrect
+ break;
+ }
+
+ enum_endpoint_count++;
+ }
+
+ usb_interface.number_endpoints = enum_endpoint_count;
+ usb_enum_data.total_number_endpoints = enum_endpoint_count;
+ usb_configuration.total_length_lo = USB_CONFIGURATION_DESCRIPTOR_TOTAL_LENGTH_LO(1, enum_endpoint_count);
+ usb_configuration.total_length_hi = USB_CONFIGURATION_DESCRIPTOR_TOTAL_LENGTH_HI(1, enum_endpoint_count);
+}
+
+/*}}}*/
+/*{{{ Host/target common code */
+
+#define TARGET
+#include "common.c"
+
+/*}}}*/
+/*{{{ The tests */
+
+/*{{{ UsbTest structure */
+
+// ----------------------------------------------------------------------------
+// All the information associated with a particular testcase. Much of this
+// is identical to the equivalent host-side structure, but some additional
+// information is needed so the structure and associated routines are not
+// shared.
+typedef struct UsbTest {
+
+ // A unique identifier to make verbose output easier to understand
+ int id;
+
+ // Which test should be run
+ usbtest which_test;
+
+ // Test-specific details.
+ union {
+ UsbTest_Bulk bulk;
+ UsbTest_ControlIn control_in;
+ } test_params;
+
+ // How to recover from any problems. Specifically, what kind of message
+ // could the target send or receive that would unlock the thread on this
+ // side.
+ UsbTest_Recovery recovery;
+
+ // The test result, to be collected and passed back to the host.
+ int result_pass;
+ char result_message[USBTEST_MAX_MESSAGE];
+
+ // Support for synchronization. This allows the UsbTest structure to be
+ // used as the callback data for low-level USB calls.
+ cyg_sem_t sem;
+ int transferred;
+
+ // Some tests may need extra cancellation support
+ void (*cancel_fn)(struct UsbTest*);
+ unsigned char buffer[USBTEST_MAX_BULK_DATA + USBTEST_MAX_BULK_DATA_EXTRA];
+} UsbTest;
+
+// Reset the information in a given test. This is used by the pool allocation
+// code. The data union is left alone, filling in the appropriate union
+// member is left to other code.
+static void
+reset_usbtest(UsbTest* test)
+{
+ static int next_id = 1;
+ test->id = next_id++;
+ test->which_test = usbtest_invalid;
+ usbtest_recovery_reset(&(test->recovery));
+ test->result_pass = 0;
+ test->result_message[0] = '\0';
+ cyg_semaphore_init(&(test->sem), 0);
+ test->transferred = 0;
+ test->cancel_fn = (void (*)(UsbTest*)) 0;
+}
+
+// Forward declaration. The pool code depends on run_test(), setting up a test requires the pool.
+static UsbTest* pool_allocate(void);
+
+/*}}}*/
+/*{{{ Bulk transfers */
+
+/*{{{ handle_test_bulk() */
+
+// Prepare for a bulk transfer test. This means allocating a thread to do
+// the work, and extracting the test parameters from the current buffer.
+// The thread allocation code does not require any locking since all worker
+// threads should be idle when starting a new thread, so the work can be
+// done entirely at DSR level and no synch is required.
+static usbs_control_return
+handle_test_bulk(usb_devreq* req)
+{
+ UsbTest* test;
+ int index = 0;
+
+ test = pool_allocate();
+ unpack_usbtest_bulk(&(test->test_params.bulk), class_request, &index);
+ test->which_test = (USB_DEVREQ_DIRECTION_IN == (test->test_params.bulk.endpoint & USB_DEVREQ_DIRECTION_MASK)) ?
+ usbtest_bulk_in : usbtest_bulk_out;
+
+ VERBOSE(3, "Preparing USB bulk test on endpoint %d, direction %s, for %d packets\n", \
+ test->test_params.bulk.endpoint & ~USB_DEVREQ_DIRECTION_MASK, \
+ (usbtest_bulk_in == test->which_test) ? "IN" : "OUT", \
+ test->test_params.bulk.number_packets);
+ VERBOSE(3, " I/O mechanism is %s\n", \
+ (usb_io_mechanism_usb == test->test_params.bulk.io_mechanism) ? "low-level USB" : \
+ (usb_io_mechanism_dev == test->test_params.bulk.io_mechanism) ? "devtab" : "<invalid>");
+ VERBOSE(3, " Data format %s, data1 %d, data* %d, data+ %d, data1* %d, data1+ %d, data** %d, data*+ %d, data+* %d, data++ %d\n",\
+ (usbtestdata_none == test->test_params.bulk.data.format) ? "none" : \
+ (usbtestdata_bytefill == test->test_params.bulk.data.format) ? "bytefill" : \
+ (usbtestdata_wordfill == test->test_params.bulk.data.format) ? "wordfill" : \
+ (usbtestdata_byteseq == test->test_params.bulk.data.format) ? "byteseq" : \
+ (usbtestdata_wordseq == test->test_params.bulk.data.format) ? "wordseq" : "<invalid>", \
+ test->test_params.bulk.data.seed, \
+ test->test_params.bulk.data.multiplier, \
+ test->test_params.bulk.data.increment, \
+ test->test_params.bulk.data.transfer_seed_multiplier, \
+ test->test_params.bulk.data.transfer_seed_increment, \
+ test->test_params.bulk.data.transfer_multiplier_multiplier, \
+ test->test_params.bulk.data.transfer_multiplier_increment, \
+ test->test_params.bulk.data.transfer_increment_multiplier, \
+ test->test_params.bulk.data.transfer_increment_increment);
+ VERBOSE(3, " txsize1 %d, txsize>= %d, txsize<= %d, txsize* %d, txsize/ %d, txsize+ %d\n", \
+ test->test_params.bulk.tx_size, test->test_params.bulk.tx_size_min, \
+ test->test_params.bulk.tx_size_max, test->test_params.bulk.tx_size_multiplier, \
+ test->test_params.bulk.tx_size_divisor, test->test_params.bulk.tx_size_increment);
+ VERBOSE(3, " rxsize1 %d, rxsize>= %d, rxsize<= %d, rxsize* %d, rxsize/ %d, rxsize+ %d\n", \
+ test->test_params.bulk.rx_size, test->test_params.bulk.rx_size_min, \
+ test->test_params.bulk.rx_size_max, test->test_params.bulk.rx_size_multiplier, \
+ test->test_params.bulk.rx_size_divisor, test->test_params.bulk.rx_size_increment);
+ VERBOSE(3, " txdelay1 %d, txdelay>= %d, txdelay<= %d, txdelay* %d, txdelay/ %d, txdelay+ %d\n", \
+ test->test_params.bulk.tx_delay, test->test_params.bulk.tx_delay_min, \
+ test->test_params.bulk.tx_delay_max, test->test_params.bulk.tx_delay_multiplier, \
+ test->test_params.bulk.tx_delay_divisor, test->test_params.bulk.tx_delay_increment);
+ VERBOSE(3, " rxdelay1 %d, rxdelay>= %d, rxdelay<= %d, rxdelay* %d, rxdelay/ %d, rxdelay+ %d\n", \
+ test->test_params.bulk.rx_delay, test->test_params.bulk.rx_delay_min, \
+ test->test_params.bulk.rx_delay_max, test->test_params.bulk.rx_delay_multiplier, \
+ test->test_params.bulk.rx_delay_divisor, test->test_params.bulk.rx_delay_increment);
+
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+/*}}}*/
+/*{{{ run_test_bulk_out() */
+
+// The same callback can be used for IN and OUT transfers. Note that
+// starting the next transfer is left to the thread, it is not done
+// at DSR level.
+static void
+run_test_bulk_in_out_callback(void* callback_arg, int transferred)
+{
+ UsbTest* test = (UsbTest*) callback_arg;
+ test->transferred = transferred;
+ cyg_semaphore_post(&(test->sem));
+}
+
+// OUT transfers, i.e. the host will be sending some number of
+// packets. The I/O can happen in a number of different ways, e.g. via
+// the low-level USB API or via devtab routines.
+static void
+run_test_bulk_out(UsbTest* test)
+{
+ unsigned char* buf;
+ int endpoint_number = test->test_params.bulk.endpoint & ~USB_DEVREQ_DIRECTION_MASK;
+ int ep_index;
+ usbs_rx_endpoint* endpoint = 0;
+ cyg_io_handle_t io_handle = (cyg_io_handle_t)0;
+ int alignment;
+ int transferred;
+ int i;
+
+ VERBOSE(1, "Starting test %d, bulk out on endpoint %d\n", test->id, endpoint_number);
+
+ ep_index = lookup_endpoint(endpoint_number, USB_ENDPOINT_DESCRIPTOR_ENDPOINT_OUT, USB_ENDPOINT_DESCRIPTOR_ATTR_BULK);
+ if (ep_index == -1) {
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Target, bulk OUT transfer on endpoint %d: no such bulk endpoint", endpoint_number);
+ return;
+ }
+ endpoint = (usbs_rx_endpoint*) usbs_testing_endpoints[ep_index].endpoint;
+ alignment = usbs_testing_endpoints[ep_index].alignment;
+ if (0 != alignment) {
+ buf = (unsigned char*) ((((cyg_uint32)test->buffer) + alignment - 1) & ~(alignment - 1));
+ } else {
+ buf = test->buffer;
+ }
+
+ CYG_ASSERTC((usb_io_mechanism_usb == test->test_params.bulk.io_mechanism) || \
+ (usb_io_mechanism_dev == test->test_params.bulk.io_mechanism));
+ if (usb_io_mechanism_dev == test->test_params.bulk.io_mechanism) {
+ if (((const char*)0 == usbs_testing_endpoints[ep_index].devtab_entry) ||
+ (0 != cyg_io_lookup(usbs_testing_endpoints[ep_index].devtab_entry, &io_handle))) {
+
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Target, bulk OUT transfer on endpoint %d: no devtab entry", endpoint_number);
+ return;
+ }
+ }
+
+ // Make sure nobody else is using this endpoint
+ lock_endpoint(endpoint_number, USB_ENDPOINT_DESCRIPTOR_ENDPOINT_OUT);
+
+ for (i = 0; i < test->test_params.bulk.number_packets; i++) {
+ int rx_size = test->test_params.bulk.rx_size;
+ int tx_size = test->test_params.bulk.tx_size;
+
+ VERBOSE(2, "Bulk OUT test %d: iteration %d, rx size %d, tx size %d\n", test->id, i, rx_size, tx_size);
+
+ if (rx_size < tx_size) {
+ rx_size = tx_size;
+ VERBOSE(2, "Bulk OUT test %d: iteration %d, packet size reset to %d to match tx size\n",
+ test->id, i, rx_size);
+ }
+
+ test->recovery.endpoint = endpoint_number | USB_ENDPOINT_DESCRIPTOR_ENDPOINT_OUT;
+ test->recovery.protocol = USB_ENDPOINT_DESCRIPTOR_ATTR_BULK;
+ test->recovery.size = rx_size;
+
+ // Make sure there is no old data lying around
+ if (usbtestdata_none != test->test_params.bulk.data.format) {
+ memset(buf, 0, rx_size);
+ }
+
+ // Do the actual transfer, using the I/O mechanism specified for this test.
+ switch (test->test_params.bulk.io_mechanism)
+ {
+ case usb_io_mechanism_usb :
+ {
+ test->transferred = 0;
+ usbs_start_rx_buffer(endpoint, buf, rx_size, &run_test_bulk_in_out_callback, (void*) test);
+ cyg_semaphore_wait(&(test->sem));
+ transferred = test->transferred;
+ break;
+ }
+
+ case usb_io_mechanism_dev :
+ {
+ int result;
+ transferred = rx_size;
+ result = cyg_io_read(io_handle, (void*) buf, &transferred);
+ if (result < 0) {
+ transferred = result;
+ }
+ break;
+ }
+
+ default:
+ CYG_FAIL("Invalid test mechanism specified");
+ break;
+ }
+
+ // Has this test been aborted for some reason?
+ if (current_tests_terminated) {
+ VERBOSE(2, "Bulk OUT test %d: iteration %d, termination detected\n", test->id, i);
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Target, bulk OUT transfer on endpoint %d: transfer aborted after iteration %d", endpoint_number, i);
+ break;
+ }
+
+ // If an error occurred, abort this run
+ if (transferred < 0) {
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Target, bulk OUT transfer on endpoint %d: transfer failed with %d", endpoint_number, transferred);
+ VERBOSE(2, "Bulk OUT test %d: iteration %d, error:\n %s\n", test->id, i, test->result_message);
+ break;
+ }
+
+ // Did the host send the expected amount of data?
+ if (transferred < test->test_params.bulk.tx_size) {
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Target, bulk OUT transfer on endpoint %d : the host only sent %d bytes when %d were expected",
+ endpoint_number, transferred, tx_size);
+ VERBOSE(2, "Bulk OUT test %d: iteration %d, error:\n %s\n", test->id, i, test->result_message);
+ break;
+ }
+
+ if (verbose >= 3) {
+ // Output the first 32 bytes of data
+ char msg[256];
+ int index;
+ int j;
+ index = snprintf(msg, 255, "Bulk OUT test %d: iteration %d, transferred %d\n Data %s:",
+ test->id, i, transferred,
+ (usbtestdata_none == test->test_params.bulk.data.format) ? "(uninitialized)" : "");
+
+ for (j = 0; ((j + 3) < transferred) && (j < 32); j+= 4) {
+ index += snprintf(msg+index, 255-index, " %02x%02x%02x%02x",
+ buf[j], buf[j+1], buf[j+2], buf[j+3]);
+ }
+ if (j < 32) {
+ index += snprintf(msg+index, 255-index, " ");
+ for ( ; j < transferred; j++) {
+ index += snprintf(msg+index, 255-index, "%02x", buf[j]);
+ }
+
+ }
+ VERBOSE(3, "%s\n", msg);
+ }
+
+ // Is the data correct?
+ if (!usbtest_check_buffer(&(test->test_params.bulk.data), buf, transferred)) {
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Target, bulk OUT transfer on endpoint %d : mismatch between received and expected data", endpoint_number);
+ VERBOSE(2, "Bulk OUt test %d: iteration %d, error:\n %s\n", test->id, i, test->result_message);
+ break;
+ }
+
+ if (0 != test->test_params.bulk.rx_delay) {
+ VERBOSE(2, "Bulk OUT test %d: iteration %d, sleeping for %d nanoseconds\n", test->id, \
+ i, test->test_params.bulk.rx_delay);
+ usbs_nanosleep(test->test_params.bulk.rx_delay);
+ }
+
+ // Move on to the next transfer
+ USBTEST_BULK_NEXT(test->test_params.bulk);
+ }
+
+ // Always unlock the endpoint on completion
+ unlock_endpoint(endpoint_number, USB_ENDPOINT_DESCRIPTOR_ENDPOINT_OUT);
+
+ // If all the packets have been transferred this test has passed.
+ if (i >= test->test_params.bulk.number_packets) {
+ test->result_pass = 1;
+ }
+
+ VERBOSE(1, "Test %d bulk OUT on endpoint %d, result %d\n", test->id, endpoint_number, test->result_pass);
+}
+
+/*}}}*/
+/*{{{ run_test_bulk_in() */
+
+// IN transfers, i.e. the host is expected to receive some data. These are slightly
+// easier than OUT transfers because it is the host that will do the checking.
+static void
+run_test_bulk_in(UsbTest* test)
+{
+ unsigned char* buf;
+ int endpoint_number = test->test_params.bulk.endpoint & ~USB_DEVREQ_DIRECTION_MASK;
+ int ep_index;
+ usbs_tx_endpoint* endpoint = 0;
+ cyg_io_handle_t io_handle = (cyg_io_handle_t)0;
+ int alignment;
+ int transferred;
+ int i;
+
+ VERBOSE(1, "Starting test %d, bulk IN on endpoint %d\n", test->id, endpoint_number);
+
+ ep_index = lookup_endpoint(endpoint_number, USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN, USB_ENDPOINT_DESCRIPTOR_ATTR_BULK);
+ if (ep_index == -1) {
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Target, bulk IN transfer on endpoint %d: no such bulk endpoint", endpoint_number);
+ return;
+ }
+ endpoint = (usbs_tx_endpoint*) usbs_testing_endpoints[ep_index].endpoint;
+ alignment = usbs_testing_endpoints[ep_index].alignment;
+ if (0 != alignment) {
+ buf = (unsigned char*) ((((cyg_uint32)test->buffer) + alignment - 1) & ~(alignment - 1));
+ } else {
+ buf = test->buffer;
+ }
+
+ CYG_ASSERTC((usb_io_mechanism_usb == test->test_params.bulk.io_mechanism) || \
+ (usb_io_mechanism_dev == test->test_params.bulk.io_mechanism));
+ if (usb_io_mechanism_dev == test->test_params.bulk.io_mechanism) {
+ if (((const char*)0 == usbs_testing_endpoints[ep_index].devtab_entry) ||
+ (0 != cyg_io_lookup(usbs_testing_endpoints[ep_index].devtab_entry, &io_handle))) {
+
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Target, bulk IN transfer on endpoint %d: no devtab entry", endpoint_number);
+ return;
+ }
+ }
+
+ // Make sure nobody else is using this endpoint
+ lock_endpoint(endpoint_number, USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN);
+
+ for (i = 0; i < test->test_params.bulk.number_packets; i++) {
+ int packet_size = test->test_params.bulk.tx_size;
+
+ test->recovery.endpoint = endpoint_number | USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN;
+ test->recovery.protocol = USB_ENDPOINT_DESCRIPTOR_ATTR_BULK;
+ test->recovery.size = packet_size + usbs_testing_endpoints[ep_index].max_in_padding;
+
+ // Make sure the buffer contains the data expected by the host
+ usbtest_fill_buffer(&(test->test_params.bulk.data), buf, packet_size);
+
+ if (verbose < 3) {
+ VERBOSE(2, "Bulk OUT test %d: iteration %d, packet size %d\n", test->id, i, packet_size);
+ } else {
+ // Output the first 32 bytes of data as well.
+ char msg[256];
+ int index;
+ int j;
+ index = snprintf(msg, 255, "Bulk IN test %d: iteration %d, packet size %d\n Data %s:",
+ test->id, i, packet_size,
+ (usbtestdata_none == test->test_params.bulk.data.format) ? "(uninitialized)" : "");
+
+ for (j = 0; ((j + 3) < packet_size) && (j < 32); j+= 4) {
+ index += snprintf(msg+index, 255-index, " %02x%02x%02x%02x",
+ buf[j], buf[j+1], buf[j+2], buf[j+3]);
+ }
+ if (j < 32) {
+ index += snprintf(msg+index, 255-index, " ");
+ for ( ; j < packet_size; j++) {
+ index += snprintf(msg+index, 255-index, "%02x", buf[j]);
+ }
+
+ }
+ VERBOSE(3, "%s\n", msg);
+ }
+
+ // Do the actual transfer, using the I/O mechanism specified for this test.
+ switch (test->test_params.bulk.io_mechanism)
+ {
+ case usb_io_mechanism_usb :
+ {
+ test->transferred = 0;
+ usbs_start_tx_buffer(endpoint, buf, packet_size, &run_test_bulk_in_out_callback, (void*) test);
+ cyg_semaphore_wait(&(test->sem));
+ transferred = test->transferred;
+ break;
+ }
+
+ case usb_io_mechanism_dev :
+ {
+ int result;
+ transferred = packet_size;
+ result = cyg_io_write(io_handle, (void*) buf, &transferred);
+ if (result < 0) {
+ transferred = result;
+ }
+ break;
+ }
+
+ default:
+ CYG_FAIL("Invalid test mechanism specified");
+ break;
+ }
+
+ // Has this test been aborted for some reason?
+ if (current_tests_terminated) {
+ VERBOSE(2, "Bulk IN test %d: iteration %d, termination detected\n", test->id, i);
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Target, bulk IN transfer on endpoint %d : terminated on iteration %d, packet_size %d\n",
+ endpoint_number, i, packet_size);
+ break;
+ }
+
+ // If an error occurred, abort this run
+ if (transferred < 0) {
+ test->result_pass = 0;
+ snprintf(test->result_message, USBTEST_MAX_MESSAGE,
+ "Target, bulk IN transfer on endpoint %d: transfer failed with %d", endpoint_number, transferred);
+ VERBOSE(2, "Bulk IN test %d: iteration %d, error:\n %s\n", test->id, i, test->result_message);
+ break;
+ }
+
+ // No need to check the transfer size, the USB code is only
+ // allowed to send the exact amount of data requested.
+
+ if (0 != test->test_params.bulk.tx_delay) {
+ VERBOSE(2, "Bulk IN test %d: iteration %d, sleeping for %d nanoseconds\n", test->id, i, \
+ test->test_params.bulk.tx_delay);
+ usbs_nanosleep(test->test_params.bulk.tx_delay);
+ }
+
+ // Move on to the next transfer
+ USBTEST_BULK_NEXT(test->test_params.bulk);
+ }
+
+ // Always unlock the endpoint on completion
+ unlock_endpoint(endpoint_number, USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN);
+
+ // If all the packets have been transferred this test has passed.
+ if (i >= test->test_params.bulk.number_packets) {
+ test->result_pass = 1;
+ }
+
+ VERBOSE(1, "Test %d bulk IN on endpoint %d, result %d\n", test->id, endpoint_number, test->result_pass);
+}
+
+/*}}}*/
+
+/*}}}*/
+/*{{{ Control IN transfers */
+
+// Control-IN transfers. These have to be handled a little bit differently
+// from bulk transfers. The target never actually initiates anything. Instead
+// the host will send reserved control messages which are handled at DSR
+// level and passed to handle_reserved_control_messages() below. Assuming
+// a control-IN test is in progress, that will take appropriate action. The
+// thread will be woken up only once all packets have been transferred, or
+// on abnormal termination.
+
+// Is a control-IN test currently in progress?
+static UsbTest* control_in_test = 0;
+
+// What is the expected packet size?
+static int control_in_test_packet_size = 0;
+
+// How many packets have been transferred so far?
+static int control_in_packets_transferred = 0;
+
+// Cancel a control-in test. handle_test_control_in() will have updated the static
+// control_in_test so that handle_reserved_control_messages() knows what to do.
+// If the test is not actually going to be run then system consistency demands
+// that this update be undone. Also, the endpoint will have been locked to
+// detect concurrent tests on the control endpoint.
+static void
+cancel_test_control_in(UsbTest* test)
+{
+ CYG_ASSERTC(test == control_in_test);
+ control_in_test = (UsbTest*) 0;
+ control_in_test_packet_size = 0;
+ control_in_packets_transferred = 0;
+ unlock_endpoint(0, USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN);
+ test->cancel_fn = (void (*)(UsbTest*)) 0;
+}
+
+// Prepare for a control-IN transfer test.
+static usbs_control_return
+handle_test_control_in(usb_devreq* req)
+{
+ UsbTest* test;
+ int index = 0;
+
+ CYG_ASSERTC((UsbTest*)0 == control_in_test);
+
+ test = pool_allocate();
+ unpack_usbtest_control_in(&(test->test_params.control_in), class_request, &index);
+
+ lock_endpoint(0, USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN);
+ test->which_test = usbtest_control_in;
+ test->recovery.endpoint = 0;
+ test->recovery.protocol = USB_ENDPOINT_DESCRIPTOR_ATTR_CONTROL;
+ test->recovery.size = 0; // Does not actually matter
+ test->cancel_fn = &cancel_test_control_in;
+
+ // Assume a pass. Failures are easy to detect.
+ test->result_pass = 1;
+
+ control_in_test = test;
+ control_in_test_packet_size = test->test_params.control_in.packet_size_initial;
+ control_in_packets_transferred = 0;
+
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+// The thread for a control-in test. Actually all the hard work is done at DSR
+// level, so this thread serves simply to detect when the test has completed
+// and to perform some clean-ups.
+static void
+run_test_control_in(UsbTest* test)
+{
+ CYG_ASSERTC(test == control_in_test);
+
+ cyg_semaphore_wait(&(test->sem));
+
+ // The DSR has detected that the test is complete.
+ control_in_test = (UsbTest*) 0;
+ control_in_test_packet_size = 0;
+ control_in_packets_transferred = 0;
+ test->cancel_fn = (void (*)(UsbTest*)) 0;
+ unlock_endpoint(0, USB_ENDPOINT_DESCRIPTOR_ENDPOINT_IN);
+}
+
+// ----------------------------------------------------------------------------
+// This is installed from inside main() as the handler for reserved
+// control messages.
+static usbs_control_return
+handle_reserved_control_messages(usbs_control_endpoint* endpoint, void* data)
+{
+ usb_devreq* req = (usb_devreq*) endpoint->control_buffer;
+ usbs_control_return result;
+
+ CYG_ASSERT(endpoint == control_endpoint, "control endpoint mismatch");
+ switch(req->request) {
+ case USBTEST_RESERVED_CONTROL_IN:
+ {
+ unsigned char* buf;
+ int len;
+
+ if ((UsbTest*)0 == control_in_test) {
+ result = USBS_CONTROL_RETURN_STALL;
+ break;
+ }
+
+ // Is this test over? If so indicate a failure because we
+ // cannot have received all the control packets.
+ if (current_tests_terminated) {
+ control_in_test->result_pass = 0;
+ snprintf(control_in_test->result_message, USBTEST_MAX_MESSAGE,
+ "Target, control IN transfer: not all packets received.");
+ cyg_semaphore_post(&(control_in_test->sem));
+ control_in_test = (UsbTest*) 0;
+ result = USBS_CONTROL_RETURN_STALL;
+ break;
+ }
+
+ // A control-IN test is indeed in progress, and the current state is
+ // held in control_in_test and control_in_test_packet_size. Check that
+ // the packet size matches up, i.e. that host and target are in sync.
+ len = (req->length_hi << 8) || req->length_lo;
+ if (control_in_test_packet_size != len) {
+ control_in_test->result_pass = 0;
+ snprintf(control_in_test->result_message, USBTEST_MAX_MESSAGE,
+ "Target, control IN transfer on endpoint %d : the host only requested %d bytes instead of %d",
+ len, control_in_test_packet_size);
+ cyg_semaphore_post(&(control_in_test->sem));
+ control_in_test = (UsbTest*) 0;
+ result = USBS_CONTROL_RETURN_STALL;
+ break;
+ }
+
+ // Prepare a suitable reply buffer. This is happening at
+ // DSR level so runtime is important, but with an upper
+ // bound of 255 bytes the buffer should be small enough.
+ buf = control_in_test->buffer;
+ usbtest_fill_buffer(&(control_in_test->test_params.control_in.data), buf, control_in_test_packet_size);
+ control_endpoint->buffer_size = control_in_test_packet_size;
+ control_endpoint->buffer = buf;
+ USBTEST_CONTROL_NEXT_PACKET_SIZE(control_in_test_packet_size, control_in_test->test_params.control_in);
+
+ // Have all the packets been transferred?
+ control_in_packets_transferred++;
+ if (control_in_packets_transferred == control_in_test->test_params.control_in.number_packets) {
+ cyg_semaphore_post(&(control_in_test->sem));
+ control_in_test = (UsbTest*) 0;
+ }
+ result = USBS_CONTROL_RETURN_HANDLED;
+ break;
+ }
+ default:
+ CYG_FAIL("Unexpected reserved control message");
+ break;
+ }
+
+ return result;
+}
+
+/*}}}*/
+
+// FIXME: add more tests.
+
+// This utility is invoked from a thread in the thread pool whenever there is
+// work to be done. It simply dispatches to the appropriate handler.
+static void
+run_test(UsbTest* test)
+{
+ switch(test->which_test)
+ {
+ case usbtest_bulk_out : run_test_bulk_out(test); break;
+ case usbtest_bulk_in : run_test_bulk_in(test); break;
+ case usbtest_control_in: run_test_control_in(test); break;
+ default:
+ CYG_TEST_FAIL_EXIT("Internal error, attempt to run unknown test.\n");
+ break;
+ }
+}
+
+/*}}}*/
+/*{{{ The thread pool */
+
+// ----------------------------------------------------------------------------
+// Just like on the host side, it is desirable to have a pool of
+// threads available to perform test operations. Strictly speaking
+// some tests will run without needing a separate thread, since many
+// operations can be performed at DSR level. However typical
+// application code will involve threads and it is desirable for test
+// code to behave the same way. Also, some operations like validating
+// the transferred data are expensive, and best done in thread context.
+
+typedef struct PoolEntry {
+ cyg_sem_t wakeup;
+ cyg_thread thread_data;
+ cyg_handle_t thread_handle;
+ char thread_name[16];
+ char thread_stack[2 * CYGNUM_HAL_STACK_SIZE_TYPICAL];
+ cyg_bool in_use;
+ cyg_bool running;
+ UsbTest test;
+} PoolEntry;
+
+// This array must be uninitialized, or the executable size would
+// be ludicrous.
+PoolEntry pool[USBTEST_MAX_CONCURRENT_TESTS];
+
+// The entry point for every thread in the pool. It just loops forever,
+// waiting until it is supposed to run a test.
+static void
+pool_thread_function(cyg_addrword_t arg)
+{
+ PoolEntry* pool_entry = (PoolEntry*) arg;
+
+ for ( ; ; ) {
+ cyg_semaphore_wait(&(pool_entry->wakeup));
+ run_test(&(pool_entry->test));
+ pool_entry->running = 0;
+ }
+}
+
+// Initialize all threads in the pool.
+static void
+pool_initialize(void)
+{
+ int i;
+ for (i = 0; i < USBTEST_MAX_CONCURRENT_TESTS; i++) {
+ cyg_semaphore_init(&(pool[i].wakeup), 0);
+ pool[i].in_use = 0;
+ pool[i].running = 0;
+ sprintf(pool[i].thread_name, "worker%d", i);
+ cyg_thread_create( 0, &pool_thread_function, (cyg_addrword_t) &(pool[i]),
+ pool[i].thread_name, pool[i].thread_stack, 2 * CYGNUM_HAL_STACK_SIZE_TYPICAL,
+ &(pool[i].thread_handle), &(pool[i].thread_data));
+ cyg_thread_resume(pool[i].thread_handle);
+ }
+}
+
+// Allocate a single entry in the thread pool
+static UsbTest*
+pool_allocate(void)
+{
+ UsbTest* result = (UsbTest*) 0;
+
+ if (thread_counter == USBTEST_MAX_CONCURRENT_TESTS) {
+ CYG_TEST_FAIL_EXIT("Internal error, thread resources exhaused.\n");
+ }
+
+ result = &(pool[thread_counter].test);
+ thread_counter++;
+ reset_usbtest(result);
+ return result;
+}
+
+// Start all the threads that are supposed to be running tests.
+static void
+pool_start(void)
+{
+ int i;
+ for (i = 0; i < thread_counter; i++) {
+ pool[i].running = 1;
+ cyg_semaphore_post(&(pool[i].wakeup));
+ }
+}
+
+/*}}}*/
+/*{{{ Class control messages */
+
+// ----------------------------------------------------------------------------
+// Handle class control messages. These provide the primary form of
+// communication between host and target. There are requests to find out
+// the number of endpoints, details of each endpoint, prepare a test run,
+// abort a test run, get status, terminate the target-side, and so on.
+// The handlers for starting specific test cases are kept alongside
+// the test cases themselves.
+//
+// Note that these handlers will typically be invoked from DSR context
+// and hence they are subject to the usual DSR restrictions.
+//
+// Problems have been experienced in some hosts sending control messages
+// that involve additional host->target data. An ugly workaround is
+// in place whereby any such data is sent in advance using separate
+// control messages.
+
+/*{{{ endpoint count */
+
+// How many endpoints are supported by this device? That information is
+// determined during initialization.
+static usbs_control_return
+handle_endpoint_count(usb_devreq* req)
+{
+ CYG_ASSERTC((1 == req->length_lo) && (0 == req->length_hi) && \
+ ((req->type & USB_DEVREQ_DIRECTION_MASK) == USB_DEVREQ_DIRECTION_IN));
+ CYG_ASSERTC((0 == req->index_lo) && (0 == req->index_hi) && (0 == req->value_lo) && (0 == req->value_hi));
+
+ class_reply[0] = (unsigned char) number_endpoints;
+ control_endpoint->buffer = class_reply;
+ control_endpoint->buffer_size = 1;
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+/*}}}*/
+/*{{{ endpoint details */
+
+// The host wants to know the details of a specific USB endpoint.
+// The format is specified in protocol.h
+static usbs_control_return
+handle_endpoint_details(usb_devreq* req)
+{
+ int buf_index;
+
+ CYG_ASSERTC((req->type & USB_DEVREQ_DIRECTION_MASK) == USB_DEVREQ_DIRECTION_IN);
+ CYG_ASSERTC((USBTEST_MAX_CONTROL_DATA == req->length_lo) && (0 == req->length_hi));
+ CYG_ASSERTC(req->index_lo < number_endpoints);
+ CYG_ASSERTC((0 == req->index_hi) && (0 == req->value_lo) && (0 == req->value_hi));
+
+ class_reply[0] = (unsigned char) usbs_testing_endpoints[req->index_lo].endpoint_type;
+ class_reply[1] = (unsigned char) usbs_testing_endpoints[req->index_lo].endpoint_number;
+ class_reply[2] = (unsigned char) usbs_testing_endpoints[req->index_lo].endpoint_direction;
+ class_reply[3] = (unsigned char) usbs_testing_endpoints[req->index_lo].max_in_padding;
+ buf_index = 4;
+ pack_int(usbs_testing_endpoints[req->index_lo].min_size, class_reply, &buf_index);
+ pack_int(usbs_testing_endpoints[req->index_lo].max_size, class_reply, &buf_index);
+ if (NULL == usbs_testing_endpoints[req->index_lo].devtab_entry) {
+ class_reply[buf_index] = '\0';
+ control_endpoint->buffer_size = buf_index + 1;
+ } else {
+ int len = strlen(usbs_testing_endpoints[req->index_lo].devtab_entry) + buf_index + 1;
+ if (len > USBTEST_MAX_CONTROL_DATA) {
+ return USBS_CONTROL_RETURN_STALL;
+ } else {
+ strcpy(&(class_reply[buf_index]), usbs_testing_endpoints[req->index_lo].devtab_entry);
+ control_endpoint->buffer_size = len;
+ }
+ }
+ control_endpoint->buffer = class_reply;
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+/*}}}*/
+/*{{{ sync */
+
+// The host wants to know whether or not the target is currently busy doing
+// stuff. This information is held in a static.
+static usbs_control_return
+handle_sync(usb_devreq* req)
+{
+ CYG_ASSERTC((1 == req->length_lo) && (0 == req->length_hi) && \
+ ((req->type & USB_DEVREQ_DIRECTION_MASK) == USB_DEVREQ_DIRECTION_IN));
+ CYG_ASSERTC((0 == req->index_lo) && (0 == req->index_hi) && (0 == req->value_lo) && (0 == req->value_hi));
+ CYG_ASSERT(0 == class_request_size, "A sync operation should not involve any data");
+
+ class_reply[0] = (unsigned char) idle;
+ control_endpoint->buffer = class_reply;
+ control_endpoint->buffer_size = 1;
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+/*}}}*/
+/*{{{ pass/fail */
+
+// Allow the host to generate some pass or fail messages, and
+// optionally terminate the test. These are synchronous requests
+// so the data can be left in class_request.
+
+static int passfail_request = 0;
+
+// Invoked from thread context
+static void
+handle_passfail_action(void)
+{
+ switch (passfail_request) {
+ case USBTEST_PASS:
+ CYG_TEST_PASS(class_request);
+ break;
+ case USBTEST_PASS_EXIT:
+ CYG_TEST_PASS(class_request);
+ CYG_TEST_EXIT("Exiting normally as requested by the host");
+ break;
+ case USBTEST_FAIL:
+ CYG_TEST_FAIL(class_request);
+ break;
+ case USBTEST_FAIL_EXIT:
+ CYG_TEST_FAIL(class_request);
+ CYG_TEST_EXIT("Exiting normally as requested by the host");
+ break;
+ default:
+ CYG_FAIL("Bogus invocation of usbtest_main_passfail");
+ break;
+ }
+}
+
+// Invoked from DSR context
+static usbs_control_return
+handle_passfail(usb_devreq* req)
+{
+ CYG_ASSERTC((0 == req->length_lo) && (0 == req->length_hi));
+ CYG_ASSERTC((0 == req->index_lo) && (0 == req->index_hi) && (0 == req->value_lo) && (0 == req->value_hi));
+ CYG_ASSERT(class_request_size > 0, "A pass/fail message should be supplied");
+ CYG_ASSERT(idle, "Pass/fail messages are only allowed when idle");
+ CYG_ASSERT((void (*)(void))0 == main_thread_action, "No thread operation should be pending.");
+
+ passfail_request = req->request;
+ idle = false;
+ main_thread_action = &handle_passfail_action;
+ cyg_semaphore_post(&main_wakeup);
+
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+/*}}}*/
+/*{{{ abort */
+
+// The host has concluded that there is no easy way to get both target and
+// host back to a sensible state. For example there may be a thread that
+// is blocked waiting for some I/O that is not going to complete. The abort
+// should be handled at thread level, not DSR level, so that the host
+// still sees the low-level USB handshake.
+
+static void
+handle_abort_action(void)
+{
+ CYG_TEST_FAIL_EXIT("Test abort requested by host application");
+}
+
+static usbs_control_return
+handle_abort(usb_devreq* req)
+{
+ CYG_ASSERTC((0 == req->length_lo) && (0 == req->length_hi));
+ CYG_ASSERTC((0 == req->index_lo) && (0 == req->index_hi) && (0 == req->value_lo) && (0 == req->value_hi));
+ CYG_ASSERT(idle, "Abort messages are only allowed when idle");
+ CYG_ASSERT((void (*)(void))0 == main_thread_action, "No thread operation should be pending.");
+
+ idle = false;
+ main_thread_action = &handle_abort_action;
+ cyg_semaphore_post(&main_wakeup);
+
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+/*}}}*/
+/*{{{ cancel */
+
+// Invoked from thread context
+// Cancelling pending test cases simply involves iterating over the allocated
+// entries in the pool, invoking any cancellation functions that have been
+// defined, and then resetting the tread count. The actual tests have not
+// yet started so none of the threads will be active.
+static void
+handle_cancel_action(void)
+{
+ int i;
+ for (i = 0; i < thread_counter; i++) {
+ if ((void (*)(UsbTest*))0 != pool[i].test.cancel_fn) {
+ (*(pool[i].test.cancel_fn))(&(pool[i].test));
+ pool[i].test.cancel_fn = (void (*)(UsbTest*)) 0;
+ }
+ }
+ thread_counter = 0;
+}
+
+// Invoked from DSR context
+static usbs_control_return
+handle_cancel(usb_devreq* req)
+{
+ CYG_ASSERTC((0 == req->length_lo) && (0 == req->length_hi));
+ CYG_ASSERTC((0 == req->index_lo) && (0 == req->index_hi) && (0 == req->value_lo) && (0 == req->value_hi));
+ CYG_ASSERT(0 == class_request_size, "A cancel operation should not involve any data");
+ CYG_ASSERT(idle, "Cancel requests are only allowed when idle");
+ CYG_ASSERT(!running, "Cancel requests cannot be sent once the system is running");
+ CYG_ASSERT((void (*)(void))0 == main_thread_action, "No thread operation should be pending.");
+
+ idle = false;
+ main_thread_action = &handle_cancel_action;
+ cyg_semaphore_post(&main_wakeup);
+
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+/*}}}*/
+/*{{{ start */
+
+// Start the tests running. This just involves waking up the pool threads
+// and setting the running flag, with the latter serving primarily for
+// assertions.
+
+static usbs_control_return
+handle_start(usb_devreq* req)
+{
+ CYG_ASSERTC((0 == req->length_lo) && (0 == req->length_hi));
+ CYG_ASSERTC((0 == req->index_lo) && (0 == req->index_hi) && (0 == req->value_lo) && (0 == req->value_hi));
+ CYG_ASSERT(0 == class_request_size, "A start operation should not involve any data");
+ CYG_ASSERT(!running, "Start requests cannot be sent if the system is already running");
+
+ current_tests_terminated = false;
+ running = true;
+ pool_start();
+
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+/*}}}*/
+/*{{{ finished */
+
+// Have all the tests finished? This involves checking all the threads
+// involved in the current batch of tests and seeing whether or not
+// their running flag is still set.
+
+static usbs_control_return
+handle_finished(usb_devreq* req)
+{
+ int i;
+ int result = 1;
+
+ CYG_ASSERTC((1 == req->length_lo) && (0 == req->length_hi) && \
+ ((req->type & USB_DEVREQ_DIRECTION_MASK) == USB_DEVREQ_DIRECTION_IN));
+ CYG_ASSERTC((0 == req->index_lo) && (0 == req->index_hi) && (0 == req->value_lo) && (0 == req->value_hi));
+ CYG_ASSERT(0 == class_request_size, "A finished operation should not involve any data");
+ CYG_ASSERT(running, "Finished requests can only be sent if the system is already running");
+
+ for (i = 0; i < thread_counter; i++) {
+ if (pool[i].running) {
+ result = 0;
+ break;
+ }
+ }
+ class_reply[0] = (unsigned char) result;
+ control_endpoint->buffer = class_reply;
+ control_endpoint->buffer_size = 1;
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+/*}}}*/
+/*{{{ set terminated */
+
+// A timeout has occurred, or there is some other failure. The first step
+// in recovery is to set the terminated flag so that as recovery action
+// takes place and the threads wake up they make no attempt to continue
+// doing more transfers.
+
+static usbs_control_return
+handle_set_terminated(usb_devreq* req)
+{
+ CYG_ASSERTC((0 == req->length_lo) && (0 == req->length_hi));
+ CYG_ASSERTC((0 == req->index_lo) && (0 == req->index_hi) && (0 == req->value_lo) && (0 == req->value_hi));
+ CYG_ASSERT(0 == class_request_size, "A set-terminated operation should not involve any data");
+ CYG_ASSERT(running, "The terminated flag can only be set when there are running tests");
+
+ current_tests_terminated = 1;
+
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+/*}}}*/
+/*{{{ get recovery */
+
+// Return the recovery information for one of the threads involved in the
+// current batch of tests, so that the host can perform a USB operation
+// that will sort out that thread.
+static usbs_control_return
+handle_get_recovery(usb_devreq* req)
+{
+ int buffer_index;
+
+ CYG_ASSERT(current_tests_terminated, "Recovery should only be attempted when the terminated flag is set");
+ CYG_ASSERT(running, "If there are no tests running then recovery is impossible");
+ CYG_ASSERTC((12 == req->length_lo) && (0 == req->length_hi) && \
+ ((req->type & USB_DEVREQ_DIRECTION_MASK) == USB_DEVREQ_DIRECTION_IN));
+ CYG_ASSERTC(req->index_lo <= thread_counter);
+ CYG_ASSERTC((0 == req->index_hi) && (0 == req->value_lo) && (0 == req->value_hi));
+ CYG_ASSERT(0 == class_request_size, "A get-recovery operation should not involve any data");
+
+ control_endpoint->buffer = class_reply;
+ if (!pool[req->index_lo].running) {
+ // Actually, this particular thread has terminated so no recovery is needed.
+ control_endpoint->buffer_size = 0;
+ } else {
+ buffer_index = 0;
+ pack_usbtest_recovery(&(pool[req->index_lo].test.recovery), class_reply, &buffer_index);
+ control_endpoint->buffer_size = buffer_index;
+ }
+
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+/*}}}*/
+/*{{{ perform recovery */
+
+// The host has identified a course of action that could unlock a thread
+// on the host-side that is currently blocked performing a USB operation.
+// Typically this involves either sending or accepting some data. If the
+// endpoint is still locked, in other words if there is a still a local
+// thread attempting to communicate on the specified endpoint, then
+// things are messed up: both sides are trying to communicate, but nothing
+// is happening. The eCos USB API is such that attempting multiple
+// concurrent operations on a single endpoint is disallowed, so
+// the recovery request has to be ignored. If things do not sort themselves
+// out then the whole test run will have to be aborted.
+
+// A dummy completion function for when a recovery operation has completed.
+static void
+recovery_callback(void* callback_arg, int transferred)
+{
+ CYG_UNUSED_PARAM(void*, callback_arg);
+ CYG_UNUSED_PARAM(int, transferred);
+}
+
+static usbs_control_return
+handle_perform_recovery(usb_devreq* req)
+{
+ int buffer_index;
+ int endpoint_number;
+ int endpoint_direction;
+ UsbTest_Recovery recovery;
+
+ CYG_ASSERT(current_tests_terminated, "Recovery should only be attempted when the terminated flag is set");
+ CYG_ASSERT(running, "If there are no tests running then recovery is impossible");
+ CYG_ASSERTC((0 == req->length_lo) && (0 == req->length_hi));
+ CYG_ASSERTC((0 == req->index_lo) && (0 == req->index_hi) && (0 == req->value_lo) && (0 == req->value_hi));
+ CYG_ASSERT(12 == class_request_size, "A perform-recovery operation requires recovery data");
+
+ buffer_index = 0;
+ unpack_usbtest_recovery(&recovery, class_request, &buffer_index);
+ endpoint_number = recovery.endpoint & ~USB_DEVREQ_DIRECTION_MASK;
+ endpoint_direction = recovery.endpoint & USB_DEVREQ_DIRECTION_MASK;
+
+ if (!is_endpoint_locked(endpoint_number, endpoint_direction)) {
+ // Locking the endpoint here would be good, but the endpoint would then
+ // have to be unlocked again - probably in the recovery callback.
+ // This complication is ignored for now.
+
+ if (USB_ENDPOINT_DESCRIPTOR_ATTR_BULK == recovery.protocol) {
+ int ep_index = lookup_endpoint(endpoint_number, endpoint_direction, USB_ENDPOINT_DESCRIPTOR_ATTR_BULK);
+ CYG_ASSERTC(-1 != ep_index);
+
+ if (USB_DEVREQ_DIRECTION_IN == endpoint_direction) {
+ // The host wants some data. Supply it. A single byte will do fine to
+ // complete the transfer.
+ usbs_start_tx_buffer((usbs_tx_endpoint*) usbs_testing_endpoints[ep_index].endpoint,
+ recovery_buffer, 1, &recovery_callback, (void*) 0);
+ } else {
+ // The host is trying to send some data. Accept all of it.
+ usbs_start_rx_buffer((usbs_rx_endpoint*) usbs_testing_endpoints[ep_index].endpoint,
+ recovery_buffer, recovery.size, &recovery_callback, (void*) 0);
+ }
+ }
+
+ // No support for isochronous or interrupt transfers yet.
+ // handle_reserved_control_messages() should generate stalls which
+ // have the desired effect.
+ }
+
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+/*}}}*/
+/*{{{ get result */
+
+// Return the result of one the tests. This can be a single byte for
+// a pass, or a single byte plus a message for a failure.
+
+static usbs_control_return
+handle_get_result(usb_devreq* req)
+{
+ CYG_ASSERTC((USBTEST_MAX_CONTROL_DATA == req->length_lo) && (0 == req->length_hi) && \
+ ((req->type & USB_DEVREQ_DIRECTION_MASK) == USB_DEVREQ_DIRECTION_IN));
+ CYG_ASSERTC(req->index_lo <= thread_counter);
+ CYG_ASSERTC((0 == req->index_hi) && (0 == req->value_lo) && (0 == req->value_hi));
+ CYG_ASSERT(0 == class_request_size, "A get-result operation should not involve any data");
+ CYG_ASSERT(running, "Results can only be sent if a run is in progress");
+ CYG_ASSERT(!pool[req->index_lo].running, "Cannot request results for a test that has not completed");
+
+ class_reply[0] = pool[req->index_lo].test.result_pass;
+ if (class_reply[0]) {
+ control_endpoint->buffer_size = 1;
+ } else {
+ strncpy(&(class_reply[1]), pool[req->index_lo].test.result_message, USBTEST_MAX_CONTROL_DATA - 2);
+ class_reply[USBTEST_MAX_CONTROL_DATA - 1] = '\0';
+ control_endpoint->buffer_size = 1 + strlen(&(class_reply[1])) + 1;
+ }
+ control_endpoint->buffer = class_reply;
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+/*}}}*/
+/*{{{ batch done */
+
+// A batch of test has been completed - at least, the host thinks so.
+// If the host is correct then all that is required here is to reset
+// the thread pool and clear the global running flag - that is sufficient
+// to allow a new batch of tests to be started.
+
+static usbs_control_return
+handle_batch_done(usb_devreq* req)
+{
+ int i;
+
+ CYG_ASSERTC((0 == req->length_lo) && (0 == req->length_hi));
+ CYG_ASSERTC((0 == req->index_lo) && (0 == req->index_hi) && (0 == req->value_lo) && (0 == req->value_hi));
+ CYG_ASSERT(0 == class_request_size, "A batch-done operation should not involve any data");
+ CYG_ASSERT(running, "There must be a current batch of tests");
+
+ for (i = 0; i < thread_counter; i++) {
+ CYG_ASSERTC(!pool[i].running);
+ }
+ thread_counter = 0;
+ running = false;
+
+ return USBS_CONTROL_RETURN_HANDLED;
+
+}
+
+/*}}}*/
+/*{{{ verbosity */
+
+static usbs_control_return
+handle_verbose(usb_devreq* req)
+{
+ CYG_ASSERTC((0 == req->length_lo) && (0 == req->length_hi));
+ CYG_ASSERTC((0 == req->index_lo) && (0 == req->index_hi));
+ CYG_ASSERT(0 == class_request_size, "A set-verbosity operation should not involve any data");
+
+ verbose = (req->value_hi << 8) + req->value_lo;
+
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+/*}}}*/
+/*{{{ initialise bulk out endpoint */
+
+// ----------------------------------------------------------------------------
+// Accept an initial endpoint on a bulk endpoint. This avoids problems
+// on some hardware such as the SA11x0 which can start to accept data
+// before the software is ready for it.
+
+static void handle_init_callback(void* arg, int result)
+{
+ idle = true;
+}
+
+static usbs_control_return
+handle_init_bulk_out(usb_devreq* req)
+{
+ static char buf[64];
+ int ep_index;
+ usbs_rx_endpoint* endpoint;
+
+ CYG_ASSERTC((0 == req->length_lo) && (0 == req->length_hi));
+ CYG_ASSERTC((0 == req->index_lo) && (0 == req->index_hi));
+ CYG_ASSERTC((0 == req->value_hi) && (0 < req->value_lo) && (req->value_lo < 16));
+ CYG_ASSERT(0 == class_request_size, "An init_bulk_out operation should not involve any data");
+
+ ep_index = lookup_endpoint(req->value_lo, USB_ENDPOINT_DESCRIPTOR_ENDPOINT_OUT, USB_ENDPOINT_DESCRIPTOR_ATTR_BULK);
+ CYG_ASSERTC(-1 != ep_index);
+ endpoint = (usbs_rx_endpoint*) usbs_testing_endpoints[ep_index].endpoint;
+
+ idle = false;
+ usbs_start_rx_buffer(endpoint, buf, 64, &handle_init_callback, (void*) 0);
+
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+/*}}}*/
+/*{{{ additional control data */
+
+// Accumulate some more data in the control buffer, ahead of an upcoming
+// request.
+static usbs_control_return
+handle_control_data(usb_devreq* req)
+{
+ class_request[class_request_size + 0] = req->value_hi;
+ class_request[class_request_size + 1] = req->value_lo;
+ class_request[class_request_size + 2] = req->index_hi;
+ class_request[class_request_size + 3] = req->index_lo;
+
+ switch(req->request) {
+ case USBTEST_CONTROL_DATA1 : class_request_size += 1; break;
+ case USBTEST_CONTROL_DATA2 : class_request_size += 2; break;
+ case USBTEST_CONTROL_DATA3 : class_request_size += 3; break;
+ case USBTEST_CONTROL_DATA4 : class_request_size += 4; break;
+ }
+
+ return USBS_CONTROL_RETURN_HANDLED;
+}
+
+/*}}}*/
+
+typedef struct class_handler {
+ int request;
+ usbs_control_return (*handler)(usb_devreq*);
+} class_handler;
+static class_handler class_handlers[] = {
+ { USBTEST_ENDPOINT_COUNT, &handle_endpoint_count },
+ { USBTEST_ENDPOINT_DETAILS, &handle_endpoint_details },
+ { USBTEST_PASS, &handle_passfail },
+ { USBTEST_PASS_EXIT, &handle_passfail },
+ { USBTEST_FAIL, &handle_passfail },
+ { USBTEST_FAIL_EXIT, &handle_passfail },
+ { USBTEST_SYNCH, &handle_sync },
+ { USBTEST_ABORT, &handle_abort },
+ { USBTEST_CANCEL, &handle_cancel },
+ { USBTEST_START, &handle_start },
+ { USBTEST_FINISHED, &handle_finished },
+ { USBTEST_SET_TERMINATED, &handle_set_terminated },
+ { USBTEST_GET_RECOVERY, &handle_get_recovery },
+ { USBTEST_PERFORM_RECOVERY, &handle_perform_recovery },
+ { USBTEST_GET_RESULT, &handle_get_result },
+ { USBTEST_BATCH_DONE, &handle_batch_done },
+ { USBTEST_VERBOSE, &handle_verbose },
+ { USBTEST_INIT_BULK_OUT, &handle_init_bulk_out },
+ { USBTEST_TEST_BULK, &handle_test_bulk },
+ { USBTEST_TEST_CONTROL_IN, &handle_test_control_in },
+ { USBTEST_CONTROL_DATA1, &handle_control_data },
+ { USBTEST_CONTROL_DATA2, &handle_control_data },
+ { USBTEST_CONTROL_DATA3, &handle_control_data },
+ { USBTEST_CONTROL_DATA4, &handle_control_data },
+ { -1, (usbs_control_return (*)(usb_devreq*)) 0 }
+};
+
+static usbs_control_return
+handle_class_control_messages(usbs_control_endpoint* endpoint, void* data)
+{
+ usb_devreq* req = (usb_devreq*) endpoint->control_buffer;
+ int request = req->request;
+ usbs_control_return result;
+ int i;
+
+ VERBOSE(3, "Received control message %02x\n", request);
+
+ CYG_ASSERT(endpoint == control_endpoint, "control endpoint mismatch");
+ result = USBS_CONTROL_RETURN_UNKNOWN;
+ for (i = 0; (usbs_control_return (*)(usb_devreq*))0 != class_handlers[i].handler; i++) {
+ if (request == class_handlers[i].request) {
+ result = (*(class_handlers[i].handler))(req);
+ if ((USBTEST_CONTROL_DATA1 != request) &&
+ (USBTEST_CONTROL_DATA2 != request) &&
+ (USBTEST_CONTROL_DATA3 != request) &&
+ (USBTEST_CONTROL_DATA4 != request)) {
+ // Reset the request data buffer after all normal requests.
+ class_request_size = 0;
+ }
+ break;
+ }
+ }
+ CYG_UNUSED_PARAM(void*, data);
+ if (USBS_CONTROL_RETURN_HANDLED != result) {
+ VERBOSE(1, "Control message %02x not handled\n", request);
+ }
+
+ return result;
+}
+
+/*}}}*/
+/*{{{ main() */
+
+// ----------------------------------------------------------------------------
+// Initialization.
+int
+main(int argc, char** argv)
+{
+ int i;
+
+ CYG_TEST_INIT();
+
+ // The USB device driver should have provided an array of endpoint
+ // descriptors, usbs_testing_endpoints(). One entry in this array
+ // should be a control endpoint, which is needed for initialization.
+ // It is also useful to know how many endpoints there are.
+ for (i = 0; !USBS_TESTING_ENDPOINTS_IS_TERMINATOR(usbs_testing_endpoints[i]); i++) {
+ if ((0 == usbs_testing_endpoints[i].endpoint_number) &&
+ (USB_ENDPOINT_DESCRIPTOR_ATTR_CONTROL== usbs_testing_endpoints[i].endpoint_type)) {
+ CYG_ASSERT((usbs_control_endpoint*)0 == control_endpoint, "There should be only one control endpoint");
+ control_endpoint = (usbs_control_endpoint*) usbs_testing_endpoints[i].endpoint;
+ }
+ }
+ if ((usbs_control_endpoint*)0 == control_endpoint) {
+ CYG_TEST_FAIL_EXIT("Unable to find a USB control endpoint");
+ }
+ number_endpoints = i;
+ CYG_ASSERT(number_endpoints <= USBTEST_MAX_ENDPOINTS, "impossible number of endpoints");
+
+ // Some of the information provided may not match the actual capabilities
+ // of the testing code, e.g. max_size limits.
+ fix_driver_endpoint_data();
+
+ // This semaphore is used for communication between the DSRs that process control
+ // messages and the main thread
+ cyg_semaphore_init(&main_wakeup, 0);
+
+ // Take care of the pool of threads and related data.
+ pool_initialize();
+
+ // Start the heartbeat thread, to make sure that the gdb session stays
+ // alive.
+ start_heartbeat();
+
+ // Now it is possible to start up the USB device driver. The host can detect
+ // this, connect, get the enumeration data, and then testing will proceed
+ // in response to class control messages.
+ provide_endpoint_enumeration_data();
+ control_endpoint->enumeration_data = &usb_enum_data;
+ control_endpoint->class_control_fn = &handle_class_control_messages;
+ control_endpoint->reserved_control_fn = &handle_reserved_control_messages;
+ usbs_start(control_endpoint);
+
+ // Now it is over to the host to detect this target and start performing tests.
+ // Much of this is handled at DSR level, in response to USB control messages.
+ // Some of those control messages require action at thread level, and that is
+ // achieved by signalling a semaphore and waking up this thread. A static
+ // function pointer is used to keep track of what operation is actually required.
+ for (;;) {
+ void (*handler)(void);
+
+ cyg_semaphore_wait(&main_wakeup);
+ handler = main_thread_action;
+ main_thread_action = 0;
+ CYG_CHECK_FUNC_PTR(handler, "Main thread woken up when there is nothing to be done");
+ (*handler)();
+ idle = true;
+ }
+}
+
+/*}}}*/
diff --git a/cesar/ecos/packages/io/wallclock/current/ChangeLog b/cesar/ecos/packages/io/wallclock/current/ChangeLog
new file mode 100644
index 0000000000..bde368eb05
--- /dev/null
+++ b/cesar/ecos/packages/io/wallclock/current/ChangeLog
@@ -0,0 +1,322 @@
+2003-09-23 Dan Jakubiec <firstname.lastname@systech.com>
+
+ * src/emulate.cxx (get_hw_seconds): Modified the ticks-to-seconds
+ conversion in the wallclock emulator's get_hw_seconds() function.
+ The previous implementation would easily overflow for any
+ reasonable date/tick-resolution combinations.
+
+2003-09-19 Gary Thomas <gary@mlbassoc.com>
+
+ * tests/wallclock.cxx: Allow test to complete, even if it looses sync.
+ This is useful to determine how much drift is present.
+
+2003-03-25 Michael Checky <Michael_Checky@Thermoking.com>
+
+ * include/wallclock/wallclock.inl: Added parens to TO_BCD() and TO_DEC()
+ macros so macro argument is interpreted correctly.
+
+2001-07-30 Jesper Skov <jskov@redhat.com>
+
+ * include/wallclock/wallclock.inl (_simple_mktime): Fix assertion
+ for leap seconds.
+
+2001-07-27 Jesper Skov <jskov@redhat.com>
+
+ * include/wallclock/wallclock.inl (_simple_mktime): Added some assertions.
+ (_simple_mktime): Adjust assertions to correct and more sensible
+ values.
+ (_simple_mktime): A few more assertion tweaks.
+
+2001-06-21 Jonathan Larmour <jlarmour@redhat.com>
+
+ * tests/wallclock2.cxx: No need to check for CYGINT_LIBC_STARTUP_CONTEXT
+ as it is required by CYGPKG_LIBC_STARTUP.
+
+2001-04-06 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/wallclock/wallclock.inl (_simple_mkdate): Fix small
+ operator precedence bug.
+
+2001-04-05 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/wallclock.cxx: Don't run this test in any simulated
+ environment. It just takes far too long and is always timed out by
+ the testing infrastructure.
+
+2000-11-22 Jesper Skov <jskov@redhat.com>
+
+ * src/wallclock.cxx: User driver API instead of scheduler lock.
+
+ * cdl/wallclock.cdl: Emulation requires the kernel, as do the tests.
+
+2000-11-09 Jesper Skov <jskov@redhat.com>
+
+ * tests/wallclock2.cxx: Include string header.
+
+2000-10-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * tests/wallclock2.cxx: Play better with main() startup configury
+
+ * tests/wallclock.cxx: Ensure default priority constructors
+ are called.
+
+2000-07-24 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * tests/wallclock2.cxx: Depend on CYGPKG_LIBC_TIME not CYGPKG_LIBC
+
+2000-05-30 Jesper Skov <jskov@redhat.com>
+
+ * include/wallclock/wallclock.inl (_simple_mktime): Replaced
+ expression with algorithm.
+
+ * tests/wallclock2.cxx: Test wallclock's conversion functions for
+ Y2K safety.
+
+2000-05-26 Jesper Skov <jskov@redhat.com>
+
+ * include/wallclock/wallclock.inl:
+ (_simple_mkdate): Rewritten.
+
+ * src/wallclock.cxx:
+ * include/wallclock.hxx: low-level driver may need init call also
+ in set-get mode. Split helper functions out in new .inl header.
+
+ * cdl/wallclock.cdl: Added set-get/init-get option.
+
+ * tests/wallclock2.cxx: Allow HW calls to take one second.
+ * tests/wallclock.cxx: Don't set clock.
+
+2000-04-19 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/wallclock.cxx: Construct after kernel RTC since the
+ emulation implementation may have to use the RTC.
+
+2000-04-13 Jesper Skov <jskov@redhat.com>
+
+ * tests/wallclock.cxx: Use TEST_NA if N/A.
+ Split in two separate parts (accuracy & info).
+
+2000-04-12 Jesper Skov <jskov@redhat.com>
+
+ * cdl/wallclock.cdl: Don't let interfaces define anything.
+
+2000-04-06 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * tests/wallclock2.cxx: Test correct libc feature CDL
+
+2000-04-05 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/wallclock.cdl:
+
+ Implement wallclock implementations as radio buttons.
+
+2000-04-05 Jesper Skov <jskov@redhat.com>
+
+ * tests/wallclock.cxx:
+ Increase precision of test.
+
+ * src/wallclock.cxx:
+ * src/emulate.cxx:
+ * tests/wallclock.cxx:
+ * tests/wallclock2.cxx:
+
+ * Moved common code, emulation device and tests to io/wallclock.
+
+2000-04-04 Jesper Skov <jskov@redhat.com>
+
+ * tests/wallclock2.cxx: Include testcase.h before conditional NA.
+
+2000-03-29 Jesper Skov <jskov@redhat.com>
+
+ * tests/wallclock2.cxx:
+ * include/wallclock.hxx:
+ * src/sh3.cxx:
+ * src/wallclock.cxx:
+ * cdl/wallclock.cdl:
+ Reworked WallClock API. It should now be simpler to add new
+ wallclock drivers. Added a simple test to print out the current
+ wallclock value so a human can verify battery backup works.
+
+2000-03-17 Jesper Skov <jskov@redhat.com>
+
+ * cdl/wallclock.cdl:
+ * src/sh3.cxx:
+ Added wallclock driver for SH3 RTC module.
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/wallclock.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/wallclock.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/wallclock.cdl: Define build options.
+
+1999-07-14 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/emulate.cxx: Include pkgconf/kernel.h.
+
+1999-04-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/wallclock.cxx (cyg_start): Output message to show the test
+ has started
+ (wallclock_thread): Add call to CYG_TEST_STILL_ALIVE, so the user
+ can see that the test is still running.
+ Fix for PR 19870
+
+1999-04-12 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/wallclock.h: Add cdl_package doc attribute.
+
+1999-04-07 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19667
+ * tests/wallclock.cxx (cyg_start):
+ Changed to use the new Cyg_Thread constructor.
+
+1999-03-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/wallclock.cxx:
+ Use CYGNUM_HAL_STACK_SIZE_TYPICAL for the stack size instead of
+ CYGNUM_HAL_MINIMUM_STACK_SIZE.
+
+1999-03-12 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/wallclock.cxx:
+ Deal with CYGNUM_HAL_MINIMUM_STACK_SIZE requirement.
+
+
+1999-03-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/wallclock.hxx:
+ Remove dependency on cyg/kernel/ktypes.h
+ Tidy
+
+ * src/emulate.cxx:
+ Include cyg/kernel/ktypes.h since it isn't included in wallclock.hxx
+ any more
+
+1999-03-04 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/wallclock.h: Make package stand-alone (no "DEVICES").
+
+1999-02-02 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18970
+ * tests/wallclock.cxx (LOOPS_SIM): Only do two loops on
+ SIM. MN10300 sim takes 1min15secs to do one loop.
+
+1999-01-26 Jesper Skov <jskov@cygnus.co.uk>
+ (PR 18305)
+ * tests/wallclock.cxx: Removed MIPS specific hackery. Now
+ dependent on cyg_test_is_simulator state.
+
+1999-01-21 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18847
+ * tests/wallclock.cxx (LOOPS_HW): Reduce run-time to 20 seconds.
+
+1999-01-19 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/wallclock.cxx: Added test of cyg_test_is_simulator to
+ reduce time on simulated hardware. PR 18715.
+
+1998-12-17 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/wallclock.cxx: Do NOP test if kernel RTC disabled.
+
+1998-10-23 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/wallclock.cxx: Reduce test time on TX39 SIM.
+
+Tue Oct 20 15:54:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak:
+ Remove unnecessary override of PKGCONF_CXXFLAGS
+
+1998-09-26 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/wallclock.h:
+ PR17501: When using the emulation there is a requirement on the
+ kernel clock. This has been added to the configuration data.
+ If real hardware were used then this dependency would disappear,
+ but currently there is no easy way to express this, and there are
+ no hardware implementations.
+
+1998-09-12 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/wallclock.h:
+ Added missing descriptions (PR 17184)
+
+1998-09-02 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/wallclock.h:
+ Added minimal configuration data.
+
+Fri Aug 28 09:40:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/wallclock.cxx:
+ Rename int main(argc, argv) to void cyg_start( void ) under the
+ new entry point system. Therefore also remove return code.
+
+Tue Aug 18 16:49:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/wallclock.cxx:
+ Move inclusion of thread.inl before sched.hxx to prevent inline
+ warnings
+
+1998-07-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/wallclock.h:
+ Added this file to contain wallclock confiuration parameters.
+
+ * src/emulate.cxx:
+ Now uses pkgconf/wallclock.h for configuration.
+
+Wed Jul 22 21:04:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/emulate.cxx:
+ Remove unnecessary include of <cyg/devs/table.h> and remove an
+ unused variable (result) from get_current_time()
+
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+
+
diff --git a/cesar/ecos/packages/io/wallclock/current/cdl/wallclock.cdl b/cesar/ecos/packages/io/wallclock/current/cdl/wallclock.cdl
new file mode 100644
index 0000000000..3d990447a1
--- /dev/null
+++ b/cesar/ecos/packages/io/wallclock/current/cdl/wallclock.cdl
@@ -0,0 +1,175 @@
+# ====================================================================
+#
+# wallclock.cdl
+#
+# eCos wallclock configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: nickg
+# Contributors:
+# Date: 1999-07-13
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_IO_WALLCLOCK {
+ display "Wallclock device"
+ include_dir cyg/io
+
+ define_header wallclock.h
+ description "
+ The wallclock device provides real time stamps, as opposed
+ to the eCos kernel timers which typically just count the
+ number of clock ticks since the hardware was powered up.
+ Depending on the target platform this device may involve
+ interacting with a suitable clock chip, or it may be
+ emulated by using the kernel timers."
+
+ compile wallclock.cxx
+
+ cdl_interface CYGINT_WALLCLOCK_HW_IMPLEMENTATIONS {
+ display "Number of wallclock hardware implementations"
+ no_define
+ }
+
+ cdl_interface CYGINT_WALLCLOCK_IMPLEMENTATIONS {
+ display "Number of wallclock implementations"
+ no_define
+ requires 1 == CYGINT_WALLCLOCK_IMPLEMENTATIONS
+ }
+
+ cdl_interface CYGINT_WALLCLOCK_SET_GET_MODE_SUPPORTED {
+ display "Wallclock driver supports set/get mode"
+ no_define
+ }
+
+ cdl_option CYGSEM_WALLCLOCK_MODE {
+ display "Wallclock mode"
+ flavor data
+ legal_values { "init_get" "set_get" }
+ default_value { CYGINT_WALLCLOCK_SET_GET_MODE_SUPPORTED ? \
+ "set_get" : "init_get" }
+ requires { CYGINT_WALLCLOCK_SET_GET_MODE_SUPPORTED || \
+ CYGSEM_WALLCLOCK_MODE == "init_get" }
+ no_define
+ description "
+ The wallclock driver can be used in one of two
+ modes. Set/get mode allows time to be kept during power
+ off (assuming there's a battery backed clock). Init/get
+ mode is slightly smaller and can be used when there is no
+ battery backed clock - in this mode time 0 is the time of
+ the board power up."
+ }
+
+ cdl_option CYGSEM_WALLCLOCK_SET_GET_MODE {
+ display "Wallclock set/get mode"
+ calculated { CYGSEM_WALLCLOCK_MODE == "set_get" ? 1 : 0 }
+ }
+
+ cdl_component CYGPKG_IO_WALLCLOCK_IMPLEMENTATION {
+ display "Wallclock implementation"
+ flavor none
+ no_define
+ description "Implementations of the wallclock device."
+
+ cdl_option CYGPKG_WALLCLOCK_EMULATE {
+ default_value { 0 == CYGINT_WALLCLOCK_HW_IMPLEMENTATIONS }
+ display "Wallclock emulator"
+ implements CYGINT_WALLCLOCK_IMPLEMENTATIONS
+ compile emulate.cxx
+ requires CYGPKG_KERNEL
+ define_proc {
+ puts $::cdl_header "#undef CYGSEM_WALLCLOCK_SET_GET_MODE"
+ }
+ description "
+ When this option is enabled, a wallclock device will be
+ emulated using the kernel real-time clock."
+ }
+
+ cdl_option CYGIMP_WALLCLOCK_NONE {
+ display "No wallclock"
+ default_value { !CYGPKG_KERNEL && 0 == CYGINT_WALLCLOCK_HW_IMPLEMENTATIONS }
+ implements CYGINT_WALLCLOCK_IMPLEMENTATIONS
+ description "Disables the wallclock."
+ }
+ }
+
+ cdl_component CYGPKG_IO_WALLCLOCK_OPTIONS {
+ display "Wallclock build options"
+ flavor none
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_IO_WALLCLOCK_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the wallclock device. These flags are used in addition
+ to the set of global flags."
+ }
+
+ cdl_option CYGPKG_IO_WALLCLOCK_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the wallclock device. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_IO_WALLCLOCK_TESTS {
+ display "Wallclock tests"
+ flavor data
+ no_define
+ calculated { CYGPKG_KERNEL ? "tests/wallclock tests/wallclock2" : "" }
+ description "
+ This option specifies the set of tests for the
+ wallclock device."
+ }
+ }
+}
diff --git a/cesar/ecos/packages/io/wallclock/current/include/wallclock.hxx b/cesar/ecos/packages/io/wallclock/current/include/wallclock.hxx
new file mode 100644
index 0000000000..673972d08a
--- /dev/null
+++ b/cesar/ecos/packages/io/wallclock/current/include/wallclock.hxx
@@ -0,0 +1,112 @@
+#ifndef CYGONCE_IO_WALLCLOCK_HXX
+#define CYGONCE_IO_WALLCLOCK_HXX
+
+//==========================================================================
+//
+// wallclock.hxx
+//
+// Wallclock interface declaration
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1999-03-05
+// Purpose: Wall Clock declarations
+// Description: This file defines the interface to the wall clock device
+// that provides real time stamps. Actual implementations of
+// this driver can be found in devs/wallclock.
+// Usage: #include <cyg/io/wallclock.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/infra/cyg_type.h>
+
+// -------------------------------------------------------------------------
+// Wallclock class
+
+class Cyg_WallClock
+{
+
+public:
+
+ Cyg_WallClock();
+
+ // Returns the number of seconds elapsed since 1970-01-01 00:00:00.
+ // This may involve reading the hardware, so it may take anything
+ // up to a second to complete.
+ cyg_uint32 get_current_time();
+
+ // Sets the clock. Argument is seconds elapsed since 1970-01-01 00:00:00.
+ // This may involve writing to the hardware, so it may take
+ // anything up to a second to complete.
+ void set_current_time( cyg_uint32 time_stamp );
+
+ // A static pointer to the single system defined wall clock device.
+ static Cyg_WallClock *wallclock;
+
+private:
+
+ // Functions implemented by the hardware-specific part of the
+ // driver.
+
+ // Note: While the API specifies elapsed time since 1970-01-01
+ // 00:00:00 this is only an actual requirement if the driver is
+ // used in set-get mode - in init-get mode, the upper layer of the
+ // driver only needs to know the number of elapsed seconds between
+ // the init_hw_seconds and get_hw_seconds calls; the hardware
+ // epoch base is factored out, so the driver can use any base
+ // desired (see the emulated device).
+
+ // Called to initialize the hardware clock to a known sane state, or
+ // simply to make sure it can be accessed in set-get mode.
+ void init_hw_seconds( void );
+
+ // Returns the number of seconds elapsed since 1970-01-01 00:00:00.
+ // (or any desired epoch when in init-get mode)
+ cyg_uint32 get_hw_seconds( void );
+
+#ifdef CYGSEM_WALLCLOCK_SET_GET_MODE
+ // Sets the clock. Argument is seconds elapsed since 1970-01-01 00:00:00.
+ void set_hw_seconds( cyg_uint32 secs );
+#endif
+};
+
+#endif // ifndef CYGONCE_DEVS_WALLCLOCK_HXX
+// EOF wallclock.hxx
diff --git a/cesar/ecos/packages/io/wallclock/current/include/wallclock/wallclock.inl b/cesar/ecos/packages/io/wallclock/current/include/wallclock/wallclock.inl
new file mode 100644
index 0000000000..64e6e74669
--- /dev/null
+++ b/cesar/ecos/packages/io/wallclock/current/include/wallclock/wallclock.inl
@@ -0,0 +1,147 @@
+#ifndef CYGONCE_IO_WALLCLOCK_INL
+#define CYGONCE_IO_WALLCLOCK_INL
+
+//==========================================================================
+//
+// wallclock.inl
+//
+// Wallclock internal helper functions
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov
+// Date: 2000-05-26
+// Purpose: Wall Clock internal helper functions
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/cyg_ass.h> // assertions
+
+// -------------------------------------------------------------------------
+// Some helper functions
+
+#define is_leap(_y_) (((0==(_y_)%4 && 0!=(_y_)%100) || 0==(_y_)%400) ? 1 : 0)
+#define year_days(_y_) (is_leap(_y_) ? 366 : 365)
+
+static cyg_int32 days_per_month[2][12] = {
+ {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
+ {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
+};
+
+#ifndef time_t
+#define time_t cyg_uint32
+#endif
+
+static time_t
+_simple_mktime(cyg_uint32 year, cyg_uint32 mon,
+ cyg_uint32 day, cyg_uint32 hour,
+ cyg_uint32 min, cyg_uint32 sec)
+{
+ time_t secs;
+ cyg_uint32 y, m, days;
+
+ CYG_ASSERT(year <= 3124, "Year is unreasonably large");
+ CYG_ASSERT(mon <= 12, "Month is invalid");
+ CYG_ASSERT(day <= 31, "Day is invalid");
+ CYG_ASSERT(hour <= 23, "Hour is invalid");
+ CYG_ASSERT(min <= 59, "Minutes is invalid");
+ CYG_ASSERT(sec <= 61, "Seconds is invalid");
+
+ // Number of days due to years
+ days = 0;
+ for (y = 1970; y < year; y++)
+ days += year_days(y);
+
+ // Due to months
+ for (m = 0; m < mon-1; m++)
+ days += days_per_month[is_leap(year)][m];
+ // Add days
+ days += day - 1;
+
+ // Add hours, minutes, and seconds
+ secs = ((days * 24 + hour) * 60 + min) * 60 + sec;
+
+ return secs;
+}
+
+#ifdef CYGSEM_WALLCLOCK_SET_GET_MODE
+
+
+static void
+_simple_mkdate(time_t time,
+ cyg_uint32* year, cyg_uint32* mon,
+ cyg_uint32* day, cyg_uint32* hour,
+ cyg_uint32* min, cyg_uint32* sec)
+{
+ cyg_int32 days, hms, y, m, *dpm;
+
+ days = (cyg_int32) (time / (24*60*60));
+ hms = (cyg_int32) (time % (24*60*60));
+
+ // Nothing fancy about the time - no leap year magic involved
+ *sec = hms % 60;
+ *min = (hms % (60*60)) / 60;
+ *hour = hms / (60*60);
+
+ // Find year
+ for (y = 1970; days >= year_days(y); y++)
+ days -= year_days(y);
+ *year = y;
+ dpm = &days_per_month[is_leap(y)][0];
+
+ // Find month
+ for (m = 0; days >= dpm[m]; m++)
+ days -= dpm[m];
+ m++;
+ *mon = m;
+
+ *day = days+1;
+}
+
+#endif
+
+//-----------------------------------------------------------------------------
+// BCD helper macros
+#define TO_BCD(x) ((((x)/10)<<4) | ((x)%10))
+#define TO_DEC(x) ((((x)>>4)*10) + ((x)&0xf))
+
+#endif // ifndef CYGONCE_DEVS_WALLCLOCK_INL
+// EOF wallclock.inl
diff --git a/cesar/ecos/packages/io/wallclock/current/src/emulate.cxx b/cesar/ecos/packages/io/wallclock/current/src/emulate.cxx
new file mode 100644
index 0000000000..47f5ba524a
--- /dev/null
+++ b/cesar/ecos/packages/io/wallclock/current/src/emulate.cxx
@@ -0,0 +1,94 @@
+//==========================================================================
+//
+// io/wallclock/emulate.cxx
+//
+// Wallclock emulation implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1999-03-05
+// Purpose: Wallclock emulation
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/wallclock.h> // Wallclock device config
+#include <pkgconf/kernel.h> // Kernel config
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/kernel/ktypes.h>
+
+#include <cyg/io/wallclock.hxx> // The WallClock API
+
+#include <cyg/kernel/clock.hxx> // Access to kernel clock
+#include <cyg/kernel/clock.inl>
+
+
+// Remember the tick count at the time of initialization.
+static cyg_tick_count epoch_ticks;
+
+//-----------------------------------------------------------------------------
+// Called to initialize the hardware clock with a known valid
+// time. Which of course isn't required when doing emulation using the
+// kernel clock. But we set the private epoch base to "now".
+void
+Cyg_WallClock::init_hw_seconds( void )
+{
+ // Remember the current clock tick count.
+ epoch_ticks = Cyg_Clock::real_time_clock->current_value();
+}
+
+//-----------------------------------------------------------------------------
+// Returns the number of seconds elapsed since the init call.
+cyg_uint32
+Cyg_WallClock::get_hw_seconds( void )
+{
+ Cyg_Clock::cyg_resolution res =
+ Cyg_Clock::real_time_clock->get_resolution();
+ cyg_tick_count secs = Cyg_Clock::real_time_clock->current_value()
+ - epoch_ticks;
+
+ secs = secs / ( ( res.divisor * 1000000000LL ) / res.dividend );
+
+ return secs;
+}
+
+//-----------------------------------------------------------------------------
+// End of devs/wallclock/emulate.cxx
diff --git a/cesar/ecos/packages/io/wallclock/current/src/wallclock.cxx b/cesar/ecos/packages/io/wallclock/current/src/wallclock.cxx
new file mode 100644
index 0000000000..2a4dfcfff1
--- /dev/null
+++ b/cesar/ecos/packages/io/wallclock/current/src/wallclock.cxx
@@ -0,0 +1,146 @@
+//==========================================================================
+//
+// devs/wallclock/wallclock.cxx
+//
+// Wallclock base
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov
+// Date: 2000-03-28
+// Purpose: Wallclock base driver
+// Description: This provides a generic wallclock base driver which
+// relies on sub-drivers to provide the interface functions
+// to the hardware device (see wallclock.hxx for details).
+//
+// The driver can be configured to run in one of two modes:
+// init-get mode:
+// In this mode, the hardware driver only needs to
+// implement a function to read the hardware clock
+// and a (possibly empty) init function which makes
+// sure the hardware clock is properly initialized.
+// While the driver in this mode has a smaller memory
+// foot-print, it does not support battery-backed up
+// clocks.
+//
+// set-get mode:
+// Requires both set and get functions for the hardware
+// device. While bigger, it allows support of
+// battery-backed up clocks.
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/wallclock.h> // Wallclock device config
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+
+#include <cyg/hal/drv_api.h> // Driver API
+
+#include <cyg/io/wallclock.hxx> // The WallClock API
+
+
+//-----------------------------------------------------------------------------
+// Local static variables
+
+static Cyg_WallClock wallclock_instance CYGBLD_ATTRIB_INIT_AFTER( CYG_INIT_CLOCK );
+
+#ifndef CYGSEM_WALLCLOCK_SET_GET_MODE
+static cyg_uint32 epoch_ticks;
+static cyg_uint32 epoch_time_stamp;
+#endif
+
+Cyg_WallClock *Cyg_WallClock::wallclock;
+
+//-----------------------------------------------------------------------------
+// Constructor
+
+Cyg_WallClock::Cyg_WallClock()
+{
+ // install instance pointer
+ wallclock = &wallclock_instance;
+
+ // Always allow low-level driver to initialize clock, even though it
+ // may not be necessary for set-get mode.
+ init_hw_seconds();
+}
+
+//-----------------------------------------------------------------------------
+// Returns the number of seconds elapsed since 1970-01-01 00:00:00.
+// This may involve reading the hardware, so it may take anything up to
+// a second to complete.
+
+cyg_uint32 Cyg_WallClock::get_current_time()
+{
+ cyg_uint32 res;
+
+ cyg_drv_dsr_lock();
+
+#ifdef CYGSEM_WALLCLOCK_SET_GET_MODE
+ res = get_hw_seconds();
+#else
+ res = epoch_time_stamp + get_hw_seconds() - epoch_ticks;
+#endif
+
+ cyg_drv_dsr_unlock();
+
+ return res;
+}
+
+//-----------------------------------------------------------------------------
+// Sets the clock. Argument is seconds elapsed since 1970-01-01 00:00:00.
+// This may involve reading or writing to the hardware, so it may take
+// anything up to a second to complete.
+void Cyg_WallClock::set_current_time( cyg_uint32 time_stamp )
+{
+ cyg_drv_dsr_lock();
+
+#ifdef CYGSEM_WALLCLOCK_SET_GET_MODE
+ set_hw_seconds(time_stamp);
+#else
+ epoch_time_stamp = time_stamp;
+ epoch_ticks = get_hw_seconds();
+#endif
+
+ cyg_drv_dsr_unlock();
+}
+
+//-----------------------------------------------------------------------------
+// End of devs/wallclock/wallclock.cxx
diff --git a/cesar/ecos/packages/io/wallclock/current/tests/wallclock.cxx b/cesar/ecos/packages/io/wallclock/current/tests/wallclock.cxx
new file mode 100644
index 0000000000..31ea867501
--- /dev/null
+++ b/cesar/ecos/packages/io/wallclock/current/tests/wallclock.cxx
@@ -0,0 +1,237 @@
+//==========================================================================
+//
+// wallclock.cxx
+//
+// WallClock test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1998-07-20
+// Description: Tests the Kernel Wall Clock
+// This test exercises the WallClock class and checks that it
+// keeps time correctly.
+//####DESCRIPTIONEND####
+// -------------------------------------------------------------------------
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/mutex.hxx>
+#include <cyg/kernel/sema.hxx>
+#include <cyg/kernel/clock.hxx>
+
+#include <cyg/kernel/diag.h>
+
+#include <cyg/io/wallclock.hxx> // The WallClock API
+
+#include <cyg/infra/testcase.h>
+
+#if defined(CYGFUN_KERNEL_THREADS_TIMER) && \
+ defined(CYGVAR_KERNEL_COUNTERS_CLOCK)
+
+#include <cyg/kernel/sched.inl>
+
+// -------------------------------------------------------------------------
+// Data for the test
+
+#ifdef CYGNUM_HAL_STACK_SIZE_TYPICAL
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+#else
+#define STACKSIZE (2*1024) // size of thread stack
+#endif
+
+char thread_stack[STACKSIZE];
+
+inline void *operator new(size_t size, void *ptr) { return ptr; };
+
+// array of threads.
+char thread[sizeof(Cyg_Thread)];
+
+Cyg_Thread *th;
+
+// MN10300 sim takes 1min15secs to do one loop on 300MHz PII.
+#define LOOPS_SIM 2
+#define LOOPS_HW 10
+
+cyg_int32 loops = LOOPS_HW;
+cyg_tick_count one_sec;
+
+// -------------------------------------------------------------------------
+// Thread body
+
+
+void wallclock_thread( CYG_ADDRWORD id )
+{
+ cyg_uint32 base;
+ cyg_uint32 wtime;
+ cyg_tick_count ticks;
+ cyg_bool ok = true;
+
+ CYG_TEST_INFO("Testing accuracy of wallclock (10 seconds silence)");
+
+ // Check clock only every other second since the call itself may
+ // take about a second.
+
+ // Start by synchronizing to next wallclock increment, then wait for
+ // a bit to get away from the exact time of the increment (or minor
+ // inaccuracies in the HW clock will cause failures).
+ wtime = Cyg_WallClock::wallclock->get_current_time();
+ do {
+ base = Cyg_WallClock::wallclock->get_current_time();
+ } while (base == wtime);
+ th->delay( one_sec/10 );
+
+ for( int i = 0; i < loops; i += 2 )
+ {
+ // Make a note of the time
+ ticks = Cyg_Clock::real_time_clock->current_value();
+
+ wtime = Cyg_WallClock::wallclock->get_current_time();
+ if(wtime != base+i)
+ {
+ diag_printf("offset %d, read %d, expected %d\n", i, wtime, base+i);
+ ok = false;
+ }
+
+ // then calculate how much the above took so the delay
+ // below can be made accurate.
+ ticks = Cyg_Clock::real_time_clock->current_value() - ticks;
+
+ th->delay( 2*one_sec - ticks );
+ }
+
+ if ( ! cyg_test_is_simulator ) {
+ CYG_TEST_INFO("Tick output. Two seconds between each output.");
+
+ // Start by synchronizing to next wallclock increment, then
+ // wait for a bit to get away from the exact time of the
+ // increment (or minor inaccuracies in the HW clock will cause
+ // failures).
+ wtime = Cyg_WallClock::wallclock->get_current_time();
+ do {
+ base = Cyg_WallClock::wallclock->get_current_time();
+ } while (base == wtime);
+ th->delay( one_sec/10 );
+
+ for( int i = 0; i < loops; i += 2 )
+ {
+ // Make a note of the time
+ ticks = Cyg_Clock::real_time_clock->current_value();
+
+ wtime = Cyg_WallClock::wallclock->get_current_time();
+ if(wtime != base+i)
+ {
+ diag_printf("wallclock drift: saw %d expected %d\n",
+ wtime, base+i);
+ }
+ CYG_TEST_STILL_ALIVE(i, "2xtick...");
+
+ // then calculate how much the above took so the delay
+ // below can be made accurate.
+ ticks = Cyg_Clock::real_time_clock->current_value() - ticks;
+
+ th->delay( 2*one_sec - ticks );
+ }
+ }
+
+ if (ok)
+ CYG_TEST_PASS_FINISH("Wallclock OK");
+ else
+ CYG_TEST_FAIL_FINISH( "Clock out of sync" );
+
+}
+
+// -------------------------------------------------------------------------
+
+
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+externC void
+cyg_hal_invoke_constructors();
+#endif
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ CYG_TEST_INIT();
+
+ // Dont run this test if we are in a simulator, it just takes far too long.
+ if( cyg_test_is_simulator )
+ CYG_TEST_NA("Wallclock test takes too long in simulators");
+
+ CYG_TEST_INFO("Starting wallclock test");
+
+ Cyg_Clock::cyg_resolution res = Cyg_Clock::real_time_clock->get_resolution();
+
+ one_sec = ( res.divisor * 1000000000LL ) / res.dividend ;
+
+ th = new((void *)&thread) Cyg_Thread(CYG_SCHED_DEFAULT_INFO,
+ wallclock_thread,
+ 0,
+ "wallclock_thread",
+ (CYG_ADDRESS)thread_stack,
+ STACKSIZE
+ );
+
+ th->resume();
+
+ // Get the world going
+ Cyg_Scheduler::scheduler.start();
+
+}
+
+#else // if defined(CYGFUN_KERNEL_THREADS_TIMER) etc...
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Kernel real-time clock/threads timer disabled");
+}
+
+#endif // if defined(CYGFUN_KERNEL_THREADS_TIMER) etc...
+
+// -------------------------------------------------------------------------
+// EOF wallclock.cxx
diff --git a/cesar/ecos/packages/io/wallclock/current/tests/wallclock2.cxx b/cesar/ecos/packages/io/wallclock/current/tests/wallclock2.cxx
new file mode 100644
index 0000000000..85fd3faf1d
--- /dev/null
+++ b/cesar/ecos/packages/io/wallclock/current/tests/wallclock2.cxx
@@ -0,0 +1,129 @@
+//==========================================================================
+//
+// wallclock2.cxx
+//
+// WallClock battery backed up test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov
+// Date: 2000-03-29
+// Description: Tests the WallClock device.
+// Prints wallclock setting (for human verification that time
+// matches the expected value). Then tries to set/restore
+// clock value, and verifies that the WallClock epoch matches
+// that of the libc.
+//####DESCRIPTIONEND####
+// -------------------------------------------------------------------------
+
+#include <pkgconf/system.h>
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h>
+#ifdef CYGPKG_LIBC_TIME
+#include <pkgconf/libc_time.h>
+#endif
+#ifdef CYGPKG_LIBC_STARTUP
+#include <pkgconf/libc_startup.h>
+#endif
+
+#if !defined(CYGSEM_LIBC_TIME_CLOCK_WORKING)
+# define NA_MSG "Requires libc time functions"
+#elif !defined(CYGPKG_LIBC_STARTUP)
+# define NA_MSG "Requires libc startup package"
+#endif
+
+#ifndef NA_MSG
+#include <time.h>
+#include <string.h> // strcmp
+#include <cyg/io/wallclock.hxx> // The WallClock API
+
+// -------------------------------------------------------------------------
+
+
+externC int
+main (void )
+{
+ time_t now, test, test2;
+
+ CYG_TEST_INIT();
+
+ // make this predictable - independent of the user option
+ cyg_libc_time_setzoneoffsets(0, 3600);
+ cyg_libc_time_setdst( CYG_LIBC_TIME_DSTOFF );
+
+ // Print out current setting so a human can verify that clock state
+ // was valid.
+ now = (time_t) Cyg_WallClock::wallclock->get_current_time();
+ diag_printf("WallClock is set to: %s", ctime(&now));
+
+ // Check that set/get works
+ Cyg_WallClock::wallclock->set_current_time( 0 );
+ test = (time_t) Cyg_WallClock::wallclock->get_current_time();
+ // 2000.03.01 00:00:00 UTC
+ Cyg_WallClock::wallclock->set_current_time( 951868800 );
+ test2 = (time_t) Cyg_WallClock::wallclock->get_current_time();
+ // Should test 2100 and 2400 leap year calculations as well, but
+ // these would overflow with today's time_t.
+ Cyg_WallClock::wallclock->set_current_time( now );
+ CYG_TEST_PASS_FAIL(2 >= test, // each operation can take one second
+ "Can set WallClock to epoch");
+ CYG_TEST_PASS_FAIL(951868800+2 > test2 &&
+ 951868800 <= test2,
+ "WallClock date conversion Y2K safe");
+
+ // Test that the wallclock and libc use same epoch.
+ test = (time_t) 0;
+ CYG_TEST_PASS_FAIL(!strcmp(ctime(&test), "Thu Jan 01 00:00:00 1970\n"),
+ "WallClock epoch matches libc epoch");
+
+ CYG_TEST_FINISH("Finished wallclock battery test");
+}
+
+#else
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_PASS_FINISH(NA_MSG);
+}
+
+#endif // NA_MSG
+
+// -------------------------------------------------------------------------
+// EOF wallclock2.cxx
diff --git a/cesar/ecos/packages/io/watchdog/current/ChangeLog b/cesar/ecos/packages/io/watchdog/current/ChangeLog
new file mode 100644
index 0000000000..5027cb7591
--- /dev/null
+++ b/cesar/ecos/packages/io/watchdog/current/ChangeLog
@@ -0,0 +1,310 @@
+2003-11-05 Bob Koninckx <bob.koninckx@mech.kuleuven.ac.be>
+
+ * src/watchdog.cxx:
+ * include/watchdog.hxx:
+ * include/watchdog.h: New file - add "C" API for watchdog functions.
+
+2003-04-03 Thomas Koeller <thomas.koeller@baslerweb.com>
+
+ * cdl/watchdog.cdl: Turned 'wallclock' into 'watchdog' in string.
+
+2003-04-02 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/watchdog.cdl: Watchdog implementation requirement should be
+ in package, not interface itself. *Note* must be requires, not
+ active_if otherwise turning off the emulated watchdog means you
+ can never turn it on again!
+
+2000-05-31 Jesper Skov <jskov@redhat.com>
+
+ * tests/watchdog.cxx: fix comment.
+
+ * tests/watchdog2.cxx:
+ * cdl/watchdog.cdl:
+ watchdog2 tests timeout is not too fast (safe for both types of
+ watchdog semantics).
+
+ * tests/watchdog_reset.cxx:
+ * src/emulate.cxx:
+ * include/watchdog.hxx:
+ Fixed compile errors.
+
+ * cdl/watchdog.cdl: Only build test if the watchdog does not reset
+ the board.
+ Added build option for interactive reset test.
+
+2000-05-30 Jesper Skov <jskov@redhat.com>
+
+ * tests/watchdog_reset.cxx:
+ * tests/watchdog.cxx:
+ * src/emulate.cxx:
+ * src/watchdog.cxx:
+ * include/watchdog.hxx:
+ * cdl/watchdog.cdl:
+ Moved to io/watchdog.
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/watchdog.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/watchdog.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/watchdog.cdl: Define build options.
+
+1999-09-09 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/watchdog.h: Rename CYGPKG_HAL_MN10300_SIM to
+ CYGPKG_HAL_MN10300_AM31_SIM
+
+1999-09-07 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/watchdog.h:
+ * src/aeb1.cxx: [added]
+ * src/PKGconf.mak:
+ * tests/PKGconf.mak:
+ Added watchdog driver for AEB-1 board.
+
+1999-09-07 Jesper Skov <jskov@cygnus.co.uk>
+ PRs 20427, 20428, 20432
+ * tests/PKGconf.mak (TESTS): Clear on targets that reset the
+ board.
+
+1999-09-01 Jesper Skov <jskov@cygnus.co.uk>
+ * cdl/watchdog.cdl:
+ * include/pkgconf/watchdog.h:
+ * src/PKGconf.mak:
+ * src/sh.cxx:
+ Added watchdog driver for SH.
+
+1999-08-27 Jesper Skov <jskov@cygnus.co.uk>
+ * include/pkgconf/watchdog.h:
+ * src/PKGconf.mak:
+ * src/ebsa285.cxx:
+ Added watchdog device for 21285.
+
+ * tests/watchdog_reset.cxx:
+ * tests/PKGconf.mak (TESTS):
+ Added test for watchdog devices that reset the board.
+
+1999-08-24 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/mn10300.cxx: Turn watchdog off in Cyg_Watchdog::trigger() to
+ prevent it repeating.
+
+1999-08-18 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/watchdog.h: Made test for use of a non-emulated
+ watchdog more generic for MN10300 targets.
+
+ * src/emulate.cxx:
+ * include/watchdog.hxx (class Cyg_Watchdog):
+ Added get_resolution() to return maximum time, in nanoseconds,
+ between calls to reset().
+
+ * tests/watchdog.cxx:
+ Modified to use the value returned from get_resolution() to
+ control the timing of reset() calls.
+
+ * src/mn10300.cxx:
+ Added support for AM33 variant. Since the AM33 can only provide a
+ maximum watchdog cycle time of 621ms, this has motiviated the
+ addition of the get_resolution() call described above.
+
+1999-07-14 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/mn10300.cxx:
+ * src/emulate.cxx:
+ Include pkgconf/kernel.h.
+
+1999-04-21 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/watchdog.cxx: The 'keep alive' message was interfering
+ with the watchdog measurement. Some rearrangement fixes this.
+
+1999-04-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/watchdog.cxx:
+ Restrict number of loops, and number of seconds per loop when we
+ detect we are in a simulator. Do this instead of changing the
+ value of one_sec in the simulator, since this invalidates the test
+ somewhat.
+ Output occasional messages to reassure the user that the test is
+ still running.
+ Fix for PR 19865
+
+1999-04-14 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/watchdog.cxx (cyg_start): Added workaround for PR 17974.
+
+1999-04-12 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/watchdog.h: Add cdl_package doc attribute.
+
+1999-04-08 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/watchdog.cxx: PR 19773 - Loop over first test for better
+ coverage. Print some additional messages, especially if failure
+ detected. Reset watchdog after installing handler.
+ (watchdog_thread): Capture fail time before printing message.
+
+1999-04-07 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19667
+ * tests/watchdog.cxx (cyg_start):
+ Changed to use the new Cyg_Thread constructor.
+
+1999-03-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/watchdog.cxx:
+ Use CYGNUM_HAL_STACK_SIZE_TYPICAL for the stack size instead of
+ CYGNUM_HAL_MINIMUM_STACK_SIZE.
+
+1999-03-12 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/watchdog.cxx:
+ Deal with CYGNUM_HAL_MINIMUM_STACK_SIZE requirement.
+
+1999-03-04 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/watchdog.h: Make package stand-alone (no "DEVICES")
+
+1999-02-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/mn10300.cxx:
+ Change CYG_VECTOR_WATCHDOG to CYGNUM_HAL_INTERRUPT_WATCHDOG in line
+ with HAL changes.
+ General QA improvements
+
+1999-02-03 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19034
+ * tests/watchdog.cxx: Reduced run-time on SIM.
+
+1998-12-17 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/watchdog.cxx: Do NOP test if kernel RTC disabled.
+
+1998-10-23 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/watchdog.cxx (cyg_start): Reduce test time on TX39 SIM.
+
+ * include/pkgconf/watchdog.h: Use emulatation code for MN10300
+ SIM.
+
+Tue Oct 20 15:52:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/mn10300.cxx:
+ Include <pkgconf/watchdog.h> so that we get CYGIMP_WATCHDOG_EMULATE
+ defined appropriately
+
+ * src/PKGconf.mak:
+ Remove unnecessary override of PKGCONF_CXXFLAGS
+
+1998-09-26 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/watchdog.h:
+ PR17501: When using the emulation there is a requirement on the
+ kernel clock. This has been added to the configuration data. The
+ mn10300 hardware implementation does not have this requirement,
+ but there is no easy way to express this at present.
+
+1998-09-12 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/watchdog.h:
+ Added missing descriptions (PR 17184)
+
+1998-09-02 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/watchdog.h:
+ Added minimal configuration data.
+
+1998-09-01 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/mn10300.cxx:
+ Added include for <cyg/kernel/sched.inl>, for scheduler lock and
+ unlock functions.
+
+ * src/PKGconf.mak:
+ Added mn10300.cxx to COMPILE for mn10300.
+
+ * include/pkgconf/watchdog.h:
+ Default to using real hardware on MN10300.
+
+Fri Aug 28 09:42:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/watchdog.cxx:
+ Rename int main(argc, argv) to void cyg_start( void ) under the
+ new entry point system. Therefore also remove return code.
+
+Tue Aug 18 16:51:24 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/watchdog.cxx:
+ Move inclusion of thread.inl to before sched.hxx to prevent inline
+ warnings
+
+1998-08-14 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/emulate.cxx:
+ Added include for cyg/kernel/sched.inl.
+
+1998-07-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/PKGconf.mak:
+ Added mn10300.cxx to COMPILE list.
+
+ * src/mn10300.cxx:
+ Completed implementation using MN10300 watchdog timer.
+
+ * include/watchdog.hxx:
+ Renamed 'register' functions to 'install'. Added install() and
+ uninstall() to Cyg_Watchdog_Action class.
+
+ * include/pkgconf/watchdog.h:
+ Added this file to contain watchdog config options.
+
+1998-07-29 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/watchdog.hxx, src/emulate.cxx:
+ Created initial versions of watchdog device.
+
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
diff --git a/cesar/ecos/packages/io/watchdog/current/cdl/watchdog.cdl b/cesar/ecos/packages/io/watchdog/current/cdl/watchdog.cdl
new file mode 100644
index 0000000000..f0560cdf11
--- /dev/null
+++ b/cesar/ecos/packages/io/watchdog/current/cdl/watchdog.cdl
@@ -0,0 +1,177 @@
+# ====================================================================
+#
+# watchdog.cdl
+#
+# eCos watchdog configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: nickg
+# Contributors:
+# Date: 1999-07-13
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_IO_WATCHDOG {
+ display "Watchdog IO device"
+ define_header watchdog.h
+ include_dir cyg/io
+ requires 1 == CYGINT_WATCHDOG_IMPLEMENTATIONS
+ description "
+ The watchdog IO device allows applications to make use of a
+ timer facility. Depending on the underlying hardware device
+ driver, a watchdog timeout will either cause a board reset
+ or an action routine to be called. The application must call
+ the watchdog reset function at regular intervals, or else the
+ device will timeout. The assumption is that the watchdog timer
+ should never trigger unless there has been a serious fault in
+ either the hardware or the software."
+
+ compile watchdog.cxx
+
+ cdl_interface CYGINT_WATCHDOG_HW_IMPLEMENTATIONS {
+ display "Number of watchdog hardware implementations"
+ no_define
+ }
+
+ cdl_interface CYGINT_WATCHDOG_IMPLEMENTATIONS {
+ display "Number of watchdog implementations"
+ no_define
+ }
+
+ cdl_component CYGPKG_IO_WATCHDOG_IMPLEMENTATION {
+ display "Watchdog implementation"
+ flavor none
+ no_define
+ description "Implementations of the watchdog device."
+
+ cdl_option CYGPKG_WATCHDOG_EMULATE {
+ default_value { 0 == CYGINT_WATCHDOG_HW_IMPLEMENTATIONS }
+ display "Watchdog emulator"
+ implements CYGINT_WATCHDOG_IMPLEMENTATIONS
+ requires CYGVAR_KERNEL_COUNTERS_CLOCK
+ compile emulate.cxx
+ description "
+ When this option is enabled, a watchdog device will be
+ emulated using the kernel real-time clock."
+ }
+
+ cdl_option CYGIMP_WATCHDOG_NONE {
+ display "No watchdog"
+ default_value 0
+ implements CYGINT_WATCHDOG_IMPLEMENTATIONS
+ description "Disables the watchdog."
+ }
+ }
+
+ cdl_interface CYGINT_WATCHDOG_RESETS_ON_TIMEOUT {
+ display "Set if device causes a reset on timeout"
+ no_define
+ }
+
+ cdl_option CYGSEM_WATCHDOG_RESETS_ON_TIMEOUT {
+ display "Set if device causes a reset on timeout"
+ calculated { CYGINT_WATCHDOG_RESETS_ON_TIMEOUT == 1 }
+ description "
+ Some watchdog devices reset the board on timeout - for these
+ implementations it does not make sense to register timeout
+ actions so the code gets disabled when this option is set.
+ When this option is not set, it is the application's
+ responsibility to register an action handler which can force
+ a board reset when it gets called."
+ }
+
+ cdl_option CYGPKG_IO_WATCHDOG_BUILD_INTERACTIVE_TEST {
+ display "Build interactive watchdog test"
+ flavor bool
+ no_define
+ default_value 0
+ description "
+ This option enables the building of a watchdog test
+ which can be used to test that the board resets on
+ watchdog timeout. This test is built separately since
+ it only makes sense to use interactively."
+ }
+
+ cdl_component CYGPKG_IO_WATCHDOG_OPTIONS {
+ display "Watchdog build options"
+ flavor none
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_IO_WATCHDOG_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the watchdog IO device. These flags are used
+ in addition to the set of global flags."
+ }
+
+ cdl_option CYGPKG_IO_WATCHDOG_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the watchdog IO device. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_IO_WATCHDOG_TESTS {
+ display "Watchdog tests"
+ flavor data
+ no_define
+ calculated { CYGPKG_IO_WATCHDOG_BUILD_INTERACTIVE_TEST ?
+ CYGSEM_WATCHDOG_RESETS_ON_TIMEOUT ? "tests/watchdog2 tests/watchdog_reset" : "tests/watchdog tests/watchdog2 tests/watchdog_reset" :
+ CYGSEM_WATCHDOG_RESETS_ON_TIMEOUT ? "tests/watchdog2" : "tests/watchdog tests/watchdog2" }
+
+ description "
+ This option specifies the set of tests for the
+ watchdog IO device."
+ }
+ }
+}
diff --git a/cesar/ecos/packages/io/watchdog/current/include/watchdog.h b/cesar/ecos/packages/io/watchdog/current/include/watchdog.h
new file mode 100644
index 0000000000..a948471f91
--- /dev/null
+++ b/cesar/ecos/packages/io/watchdog/current/include/watchdog.h
@@ -0,0 +1,59 @@
+#ifndef _IO_WATCHDOG_H_
+#define _IO_WATCHDOG_H_
+
+//==========================================================================
+//
+// watchdog.h
+//
+// c-api to the watchdog.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Bob Koninckx
+// Contributors: Bob Koninckx
+// Date: 2003-05-24
+// Purpose: provide a c-api to the watchdog
+//
+//####DESCRIPTIONEND####
+
+#include <cyg/infra/cyg_type.h>
+
+externC void watchdog_start(void);
+externC void watchdog_reset(void);
+externC cyg_uint64 watchdog_get_resolution(void);
+
+#endif // _IO_WATCHDOG_H_
diff --git a/cesar/ecos/packages/io/watchdog/current/include/watchdog.hxx b/cesar/ecos/packages/io/watchdog/current/include/watchdog.hxx
new file mode 100644
index 0000000000..5e390053f6
--- /dev/null
+++ b/cesar/ecos/packages/io/watchdog/current/include/watchdog.hxx
@@ -0,0 +1,168 @@
+#ifndef CYGONCE_DEVS_WATCHDOG_HXX
+#define CYGONCE_DEVS_WATCHDOG_HXX
+
+//==========================================================================
+//
+// watchdog.hxx
+//
+// Watchdog interface declaration
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1998-07-14
+// Purpose: Watchdog declarations
+// Description: This file defines the interface to the watchdog device
+// that provides timer based recovery from software and
+// hardware faults.
+// Usage: #include <cyg/devs/watchdog.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+class Cyg_Watchdog_Action;
+
+// -------------------------------------------------------------------------
+// Watchdog class
+
+class Cyg_Watchdog
+{
+
+ Cyg_Watchdog_Action *action_list;
+
+ cyg_uint64 resolution;
+
+public:
+
+ Cyg_Watchdog();
+
+ // Return time interval allowed between resets before watchdog
+ // triggers, in nanoseconds.
+ cyg_uint64 get_resolution( void );
+
+ // Start the watchdog running.
+ void start( void );
+
+ // Reset watchdog timer. This needs to be called regularly to prevent
+ // the watchdog firing.
+ void reset( void );
+
+#ifndef CYGSEM_WATCHDOG_RESETS_ON_TIMEOUT
+ // Trigger the watchdog as if the timer had expired.
+ void trigger( void );
+
+ // Register an action routine that will be called when the timer
+ // triggers.
+ void install_action( Cyg_Watchdog_Action *wdaction );
+
+ // Deregister a previously registered action routine.
+ void uninstall_action( Cyg_Watchdog_Action *wdaction );
+#endif
+
+ // A static instance of the single system defined watchdog device.
+ static Cyg_Watchdog watchdog;
+
+private:
+ void init_hw( void );
+};
+
+#ifndef CYGSEM_WATCHDOG_RESETS_ON_TIMEOUT
+// -------------------------------------------------------------------------
+// Watchdog action class
+
+class Cyg_Watchdog_Action
+{
+ friend class Cyg_Watchdog;
+
+ Cyg_Watchdog_Action *next; // link in chain
+
+ void (*action)( CYG_ADDRWORD data ); // action function
+
+ CYG_ADDRWORD data; // data argument
+
+public:
+
+ Cyg_Watchdog_Action(
+ void (*action)( CYG_ADDRWORD data ),
+ CYG_ADDRWORD data
+ );
+
+ ~Cyg_Watchdog_Action();
+
+ void install();
+
+ void uninstall();
+};
+
+// -------------------------------------------------------------------------
+// Cyg_Watchdog_Action inlines
+
+inline Cyg_Watchdog_Action::Cyg_Watchdog_Action(
+ void (*action_arg)( CYG_ADDRWORD data ),
+ CYG_ADDRWORD data_arg
+ )
+{
+ next = NULL;
+ action = action_arg;
+ data = data_arg;
+}
+
+inline Cyg_Watchdog_Action::~Cyg_Watchdog_Action()
+{
+ Cyg_Watchdog::watchdog.uninstall_action( this );
+}
+
+inline void Cyg_Watchdog_Action::install()
+{
+ Cyg_Watchdog::watchdog.install_action( this );
+}
+
+inline void Cyg_Watchdog_Action::uninstall()
+{
+ Cyg_Watchdog::watchdog.uninstall_action( this );
+}
+
+#endif // CYGSEM_WATCHDOG_RESETS_ON_TIMEOUT
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_DEVS_WATCHDOG_HXX
+// EOF watchdog.hxx
diff --git a/cesar/ecos/packages/io/watchdog/current/src/emulate.cxx b/cesar/ecos/packages/io/watchdog/current/src/emulate.cxx
new file mode 100644
index 0000000000..f611f77109
--- /dev/null
+++ b/cesar/ecos/packages/io/watchdog/current/src/emulate.cxx
@@ -0,0 +1,149 @@
+//==========================================================================
+//
+// io/watchdog/emulate.cxx
+//
+// Watchdog implementation emulation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1998-07-29
+// Purpose: Watchdog class implementation
+// Description: Contains an implementation of the Watchdog class for use
+// when there is no hardware watchdog timer. Instead it is
+// emulated using an Alarm object.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/watchdog.h> // watchdog configuration file
+#include <pkgconf/kernel.h> // Kernel config
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/instrmnt.h> // instrumentation
+
+#include <cyg/kernel/clock.hxx> // clock and alarm
+#include <cyg/kernel/sched.hxx> // scheduler
+
+#include <cyg/io/watchdog.hxx> // watchdog API
+
+#include <cyg/kernel/sched.inl> // scheduler inlines
+
+// -------------------------------------------------------------------------
+// Forward definitions
+
+static cyg_alarm_fn watchdog_alarm;
+
+// -------------------------------------------------------------------------
+// Statics
+
+static Cyg_Alarm alarm( Cyg_Clock::real_time_clock, watchdog_alarm, 0 );
+
+// One second's worth of ticks.
+static cyg_tick_count one_sec;
+
+// -------------------------------------------------------------------------
+// HW init
+
+void
+Cyg_Watchdog::init_hw(void)
+{
+ CYG_REPORT_FUNCTION();
+
+ Cyg_Clock::cyg_resolution res = Cyg_Clock::real_time_clock->get_resolution();
+
+ one_sec = ( res.divisor * 1000000000LL ) / res.dividend ;
+
+ resolution = 1000000000LL;
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Start the watchdog running.
+
+void Cyg_Watchdog::start()
+{
+ CYG_REPORT_FUNCTION();
+
+ Cyg_Clock::cyg_resolution res = Cyg_Clock::real_time_clock->get_resolution();
+
+ // Set alarm to a one second single-shot trigger
+ alarm.initialize( Cyg_Clock::real_time_clock->current_value() + one_sec, 0 );
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Reset watchdog timer. This needs to be called regularly to prevent
+// the watchdog firing.
+
+void Cyg_Watchdog::reset()
+{
+ CYG_REPORT_FUNCTION();
+
+ Cyg_Clock::cyg_resolution res = Cyg_Clock::real_time_clock->get_resolution();
+
+ Cyg_Scheduler::lock();
+
+ // Set alarm to a one second single-shot trigger
+ alarm.initialize( Cyg_Clock::real_time_clock->current_value() + one_sec, 0 );
+
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Alarm function
+
+void watchdog_alarm( Cyg_Alarm *a, CYG_ADDRWORD data)
+{
+ CYG_REPORT_FUNCTION();
+
+ // Disable alarm just in case
+ alarm.disable();
+
+ Cyg_Watchdog::watchdog.trigger();
+}
+
+// -------------------------------------------------------------------------
+// EOF watchdog/emulate.cxx
diff --git a/cesar/ecos/packages/io/watchdog/current/src/watchdog.cxx b/cesar/ecos/packages/io/watchdog/current/src/watchdog.cxx
new file mode 100644
index 0000000000..e962616355
--- /dev/null
+++ b/cesar/ecos/packages/io/watchdog/current/src/watchdog.cxx
@@ -0,0 +1,194 @@
+//==========================================================================
+//
+// io/watchdog/watchdog.cxx
+//
+// Watchdog common code
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1999-02-18
+// Purpose: Watchdog class implementation
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h> // system configuration file
+#include <pkgconf/watchdog.h> // configuration for this package
+
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <cyg/hal/drv_api.h> // for locking
+
+#include <cyg/io/watchdog.hxx> // watchdog API
+#include <cyg/io/watchdog.h> // watchdog c-api
+
+// -------------------------------------------------------------------------
+// Statics
+
+// A static pointer to the single system defined watchdog device.
+Cyg_Watchdog Cyg_Watchdog::watchdog;
+
+// -------------------------------------------------------------------------
+// Constructor
+
+
+Cyg_Watchdog::Cyg_Watchdog()
+{
+ CYG_REPORT_FUNCTION();
+
+#ifndef CYGSEM_WATCHDOG_RESETS_ON_TIMEOUT
+ action_list = 0;
+#endif
+
+ // HW driver initialization. This must set the watchdog resolution.
+ init_hw();
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Return reset resolution
+
+cyg_uint64
+Cyg_Watchdog::get_resolution()
+{
+ return resolution;
+}
+
+#ifndef CYGSEM_WATCHDOG_RESETS_ON_TIMEOUT
+// -------------------------------------------------------------------------
+// Trigger the watchdog as if the timer had expired. This should be called
+// from the driver's ISR.
+
+void
+Cyg_Watchdog::trigger()
+{
+ CYG_REPORT_FUNCTION();
+
+ cyg_drv_dsr_lock();
+
+ Cyg_Watchdog_Action *act = action_list;
+
+ while( 0 != act )
+ {
+ act->action( act->data );
+
+ act = act->next;
+ }
+
+ cyg_drv_dsr_unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Register an action routine that will be called when the timer
+// triggers.
+
+void
+Cyg_Watchdog::install_action( Cyg_Watchdog_Action *action )
+{
+ CYG_REPORT_FUNCTION();
+
+ cyg_drv_dsr_lock();
+
+ action->next = action_list;
+ action_list = action;
+
+ cyg_drv_dsr_unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Deregister a previously registered action routine.
+
+void
+Cyg_Watchdog::uninstall_action( Cyg_Watchdog_Action *action )
+{
+ CYG_REPORT_FUNCTION();
+
+ cyg_drv_dsr_lock();
+
+ Cyg_Watchdog_Action **act_ptr = &action_list;
+
+ while( 0 != *act_ptr )
+ {
+ Cyg_Watchdog_Action *a = *act_ptr;
+
+ if( a == action )
+ {
+ *act_ptr = a->next;
+ break;
+ }
+ act_ptr = &a->next;
+ }
+
+ cyg_drv_dsr_unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+#endif // CYGSEM_WATCHDOG_RESETS_ON_TIMEOUT
+
+// -------------------------------------------------------------------------
+// Implementation of the C-api
+
+externC void
+watchdog_start(void)
+{
+ Cyg_Watchdog::watchdog.start();
+}
+
+externC void
+watchdog_reset(void)
+{
+ Cyg_Watchdog::watchdog.reset();
+}
+
+externC cyg_uint64
+watchdog_get_resolution(void)
+{
+ return Cyg_Watchdog::watchdog.get_resolution();
+}
+
+// -------------------------------------------------------------------------
+// EOF io/watchdog/watchdog.cxx
diff --git a/cesar/ecos/packages/io/watchdog/current/tests/watchdog.cxx b/cesar/ecos/packages/io/watchdog/current/tests/watchdog.cxx
new file mode 100644
index 0000000000..6b34f39466
--- /dev/null
+++ b/cesar/ecos/packages/io/watchdog/current/tests/watchdog.cxx
@@ -0,0 +1,238 @@
+//==========================================================================
+//
+// watchdog.cxx
+//
+// Watchdog test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1998-07-20
+// Description: This test exercises the Watchdog class and checks that it
+// works as advertised.
+//####DESCRIPTIONEND####
+// -------------------------------------------------------------------------
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/mutex.hxx>
+#include <cyg/kernel/sema.hxx>
+#include <cyg/kernel/clock.hxx>
+
+#include <cyg/kernel/diag.h>
+
+#include <cyg/io/watchdog.hxx>
+
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h>
+
+#if defined(CYGFUN_KERNEL_THREADS_TIMER) && \
+ defined(CYGVAR_KERNEL_COUNTERS_CLOCK)
+
+#include <cyg/kernel/sched.inl>
+
+// -------------------------------------------------------------------------
+// Data for the test
+
+#ifdef CYGNUM_HAL_STACK_SIZE_TYPICAL
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+#else
+#define STACKSIZE (2*1024) // size of thread stack
+#endif
+
+char thread_stack[STACKSIZE];
+
+inline void *operator new(size_t size, void *ptr) { return ptr; };
+
+// array of threads.
+char thread[sizeof(Cyg_Thread)];
+
+Cyg_Thread *th;
+
+//cyg_tick_count one_sec;
+cyg_tick_count watchdog_delay;
+volatile bool watchdog_fired;
+volatile cyg_tick_count watchdog_time;
+
+#define WATCHDOG_LOOPS_HW 5
+#define WATCHDOG_LOOPS_SIM 1
+#define WATCHDOG_CYCLES_PER_LOOP_HW 10
+#define WATCHDOG_CYCLES_PER_LOOP_SIM 2
+#define WATCHDOG_TICKS_TILL_TIMEOUT 10
+
+// -------------------------------------------------------------------------
+// Action functions:
+
+void watchdog_action1( CYG_ADDRWORD data )
+{
+ watchdog_fired = true;
+ watchdog_time = Cyg_Clock::real_time_clock->current_value();
+}
+
+void watchdog_action2( CYG_ADDRWORD data )
+{
+ CYG_TEST_PASS_FINISH("Watchdog OK");
+}
+
+// -------------------------------------------------------------------------
+// Thread body
+
+
+void watchdog_thread( CYG_ADDRWORD id )
+{
+ cyg_tick_count watchdog_start_time;
+ cyg_tick_count thread_start_time, thread_end_time;
+ cyg_ucount8 watchdog_loops, watchdog_cycles_per_loop;
+
+ if (cyg_test_is_simulator) {
+ watchdog_loops = WATCHDOG_LOOPS_SIM;
+ watchdog_cycles_per_loop = WATCHDOG_CYCLES_PER_LOOP_SIM;
+ } else {
+ watchdog_loops = WATCHDOG_LOOPS_HW;
+ watchdog_cycles_per_loop = WATCHDOG_CYCLES_PER_LOOP_HW;
+ }
+
+ watchdog_fired = false;
+ Cyg_Watchdog::watchdog.start();
+
+ CYG_TEST_INFO("Testing that watchdog does not fire early");
+
+ for (cyg_ucount8 tries = 0; tries < watchdog_loops; tries++) {
+ diag_printf("Iteration #%d (testing over %d cycles)\n",
+ tries, watchdog_cycles_per_loop);
+
+ // First test that the watchdog does not trigger when being reset.
+ Cyg_Watchdog_Action wdaction( watchdog_action1, 0 );
+
+ wdaction.install();
+ Cyg_Watchdog::watchdog.reset();
+
+ watchdog_start_time = Cyg_Clock::real_time_clock->current_value();
+ watchdog_fired = false;
+
+ for( cyg_ucount8 i = 0; i < watchdog_cycles_per_loop; i++ ) {
+ thread_start_time = Cyg_Clock::real_time_clock->current_value();
+ th->delay( watchdog_delay-2 );
+ Cyg_Watchdog::watchdog.reset();
+ if (watchdog_fired) {
+ thread_end_time = Cyg_Clock::real_time_clock->current_value();
+ diag_printf("Watchdog fired prematurely after %d ticks\n",
+ (int)(watchdog_time - watchdog_start_time));
+ diag_printf(" Thread slept for %d ticks, loop #%d\n",
+ (int)(thread_end_time - thread_start_time), i);
+ CYG_TEST_FAIL_FINISH("Watchdog triggered unexpectedly");
+ break;
+ } else {
+ CYG_TEST_STILL_ALIVE(i, "Resetting watchdog...");
+ Cyg_Watchdog::watchdog.reset();
+ watchdog_fired = false;
+ watchdog_start_time = Cyg_Clock::real_time_clock->current_value();
+ }
+ }
+ }
+
+ // Now check that it triggers when not reset
+ CYG_TEST_INFO("Testing that watchdog fires");
+ {
+ Cyg_Watchdog_Action wdaction( watchdog_action2, 0 );
+
+ wdaction.install();
+
+ Cyg_Watchdog::watchdog.reset();
+
+ th->delay( watchdog_delay*WATCHDOG_TICKS_TILL_TIMEOUT );
+ }
+
+ CYG_TEST_FAIL_FINISH("Watchdog failed to trigger");
+}
+
+// -------------------------------------------------------------------------
+
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+
+#if !defined(CYGIMP_WATCHDOG_EMULATE) && defined(CYGPKG_HAL_MN10300_STDEVAL1)
+ // Workaround for PR 17974
+ if( cyg_test_is_simulator )
+ CYG_TEST_NA("Watchdog device not implemented in MN10300 simulator.");
+#endif
+
+
+ Cyg_Clock::cyg_resolution res = Cyg_Clock::real_time_clock->get_resolution();
+
+ cyg_uint64 wres = Cyg_Watchdog::watchdog.get_resolution();
+
+ // Calculate how many clock ticks there are in a watchdog cycle.
+
+ watchdog_delay = ((cyg_tick_count)wres * (cyg_tick_count)res.divisor );
+ watchdog_delay /= res.dividend;
+
+ th = new((void *)&thread) Cyg_Thread(CYG_SCHED_DEFAULT_INFO,
+ watchdog_thread,
+ 0,
+ "watchdog_thread",
+ (CYG_ADDRESS)thread_stack,
+ STACKSIZE
+ );
+
+ th->resume();
+
+ // Get the world going
+ Cyg_Scheduler::scheduler.start();
+
+}
+
+#else // if defined(CYGFUN_KERNEL_THREADS_TIMER) etc...
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Kernel real-time clock/threads timer disabled");
+}
+
+#endif // if defined(CYGFUN_KERNEL_THREADS_TIMER) etc...
+
+// -------------------------------------------------------------------------
+// EOF watchdog.cxx
diff --git a/cesar/ecos/packages/io/watchdog/current/tests/watchdog2.cxx b/cesar/ecos/packages/io/watchdog/current/tests/watchdog2.cxx
new file mode 100644
index 0000000000..690254cc67
--- /dev/null
+++ b/cesar/ecos/packages/io/watchdog/current/tests/watchdog2.cxx
@@ -0,0 +1,220 @@
+//==========================================================================
+//
+// watchdog2.cxx
+//
+// Watchdog test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg, jskov
+// Date: 1998-07-20
+// Description: Tests the watchdog driver.
+// This test tries to make sure the watchdog does not trigger
+// early. On boards where the watchdog performs a reset on
+// timeout, there will be no FAIL message - but it should
+// PASS even on those boards when the driver implementation
+// is correct.
+//
+//####DESCRIPTIONEND####
+// -------------------------------------------------------------------------
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/mutex.hxx>
+#include <cyg/kernel/sema.hxx>
+#include <cyg/kernel/clock.hxx>
+
+#include <cyg/kernel/diag.h>
+
+#include <cyg/io/watchdog.hxx>
+
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h>
+
+#if defined(CYGFUN_KERNEL_THREADS_TIMER) && \
+ defined(CYGVAR_KERNEL_COUNTERS_CLOCK)
+
+#include <cyg/kernel/sched.inl>
+
+// -------------------------------------------------------------------------
+// Data for the test
+
+#ifdef CYGNUM_HAL_STACK_SIZE_TYPICAL
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+#else
+#define STACKSIZE (2*1024) // size of thread stack
+#endif
+
+char thread_stack[STACKSIZE];
+
+inline void *operator new(size_t size, void *ptr) { return ptr; };
+
+// array of threads.
+char thread[sizeof(Cyg_Thread)];
+
+Cyg_Thread *th;
+
+//cyg_tick_count one_sec;
+cyg_tick_count watchdog_delay;
+volatile bool watchdog_fired;
+volatile cyg_tick_count watchdog_time;
+
+#define WATCHDOG_CYCLES_PER_LOOP_HW 7
+#define WATCHDOG_CYCLES_PER_LOOP_SIM 2
+#define WATCHDOG_TICKS_TILL_TIMEOUT 10
+
+// -------------------------------------------------------------------------
+// Action functions:
+
+#ifdef CYGINT_WATCHDOG_RESETS_ON_TIMEOUT
+void watchdog_action1( CYG_ADDRWORD data )
+{
+ watchdog_fired = true;
+ watchdog_time = Cyg_Clock::real_time_clock->current_value();
+}
+#endif
+
+// -------------------------------------------------------------------------
+// Thread body
+
+void watchdog_thread( CYG_ADDRWORD id )
+{
+ cyg_tick_count watchdog_start_time;
+ cyg_tick_count thread_start_time, thread_end_time;
+ cyg_ucount8 watchdog_cycles_per_loop;
+
+ if (cyg_test_is_simulator) {
+ watchdog_cycles_per_loop = WATCHDOG_CYCLES_PER_LOOP_SIM;
+ } else {
+ watchdog_cycles_per_loop = WATCHDOG_CYCLES_PER_LOOP_HW;
+ }
+
+ CYG_TEST_INFO("Testing that watchdog does not fire early");
+
+ watchdog_fired = false;
+ Cyg_Watchdog::watchdog.start();
+
+#ifdef CYGINT_WATCHDOG_RESETS_ON_TIMEOUT
+ // First test that the watchdog does not trigger when being reset.
+ Cyg_Watchdog_Action wdaction( watchdog_action1, 0 );
+ wdaction.install();
+#endif
+ Cyg_Watchdog::watchdog.reset();
+
+ watchdog_start_time = Cyg_Clock::real_time_clock->current_value();
+ watchdog_fired = false;
+
+ for( cyg_ucount8 i = 0; i < watchdog_cycles_per_loop; i++ ) {
+ thread_start_time = Cyg_Clock::real_time_clock->current_value();
+ th->delay( watchdog_delay-2 );
+ Cyg_Watchdog::watchdog.reset();
+ if (watchdog_fired) {
+ thread_end_time = Cyg_Clock::real_time_clock->current_value();
+ diag_printf("Watchdog fired prematurely after %d ticks\n",
+ (int)(watchdog_time - watchdog_start_time));
+ diag_printf(" Thread slept for %d ticks, loop #%d\n",
+ (int)(thread_end_time - thread_start_time), i);
+ CYG_TEST_FAIL_FINISH("Watchdog triggered unexpectedly");
+ break;
+ } else {
+ // No printing - delays are fatal!
+ // CYG_TEST_STILL_ALIVE(i, "Resetting watchdog...");
+ Cyg_Watchdog::watchdog.reset();
+ watchdog_fired = false;
+ watchdog_start_time = Cyg_Clock::real_time_clock->current_value();
+ }
+ }
+
+ CYG_TEST_PASS_FINISH("Watchdog OK");
+}
+
+// -------------------------------------------------------------------------
+
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+
+#if !defined(CYGIMP_WATCHDOG_EMULATE) && defined(CYGPKG_HAL_MN10300_STDEVAL1)
+ // Workaround for PR 17974
+ if( cyg_test_is_simulator )
+ CYG_TEST_NA("Watchdog device not implemented in MN10300 simulator.");
+#endif
+
+
+ Cyg_Clock::cyg_resolution res = Cyg_Clock::real_time_clock->get_resolution();
+
+ cyg_uint64 wres = Cyg_Watchdog::watchdog.get_resolution();
+
+ // Calculate how many clock ticks there are in a watchdog cycle.
+
+ watchdog_delay = ((cyg_tick_count)wres * (cyg_tick_count)res.divisor );
+ watchdog_delay /= res.dividend;
+
+ th = new((void *)&thread) Cyg_Thread(CYG_SCHED_DEFAULT_INFO,
+ watchdog_thread,
+ 0,
+ "watchdog_thread",
+ (CYG_ADDRESS)thread_stack,
+ STACKSIZE
+ );
+
+ th->resume();
+
+ // Get the world going
+ Cyg_Scheduler::scheduler.start();
+
+}
+
+#else // if defined(CYGFUN_KERNEL_THREADS_TIMER) etc...
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Kernel real-time clock/threads timer disabled");
+}
+
+#endif // if defined(CYGFUN_KERNEL_THREADS_TIMER) etc...
+
+// -------------------------------------------------------------------------
+// EOF watchdog.cxx
diff --git a/cesar/ecos/packages/io/watchdog/current/tests/watchdog_reset.cxx b/cesar/ecos/packages/io/watchdog/current/tests/watchdog_reset.cxx
new file mode 100644
index 0000000000..4385c18fcf
--- /dev/null
+++ b/cesar/ecos/packages/io/watchdog/current/tests/watchdog_reset.cxx
@@ -0,0 +1,184 @@
+//==========================================================================
+//
+// watchdog_reset.cxx
+//
+// Watchdog reset test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov (based on watchdog.cxx)
+// Contributors: jskov, nickg
+// Date: 1999-08-27
+// Description: Tests that the watchdog timer resets the board.
+// This test needs to be run by an operator - automatic
+// testing not possible.
+//####DESCRIPTIONEND####
+// -------------------------------------------------------------------------
+
+#include <pkgconf/system.h>
+
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h>
+
+// Package requirements
+#if defined(CYGPKG_KERNEL)
+
+#include <pkgconf/kernel.h>
+
+// Package option requirements
+#if defined(CYGFUN_KERNEL_THREADS_TIMER) && \
+ defined(CYGVAR_KERNEL_COUNTERS_CLOCK)
+
+
+#include <cyg/kernel/thread.inl>
+
+#include <cyg/hal/hal_cache.h>
+
+#include <cyg/io/watchdog.hxx> // watchdog API
+
+
+// -------------------------------------------------------------------------
+// Data for the test
+
+#ifdef CYGNUM_HAL_STACK_SIZE_TYPICAL
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+#else
+#define STACKSIZE (2*1024) // size of thread stack
+#endif
+
+char thread_stack[STACKSIZE];
+
+inline void *operator new(size_t size, void *ptr) { return ptr; };
+
+// array of threads.
+char thread[sizeof(Cyg_Thread)];
+
+Cyg_Thread *th;
+
+//cyg_tick_count one_sec;
+cyg_tick_count watchdog_delay;
+
+// -------------------------------------------------------------------------
+// Thread body
+
+volatile int watchdog_accuracy = 50;
+
+void watchdog_thread( CYG_ADDRWORD id )
+{
+ diag_printf("Test of watchdog timer accuracy. Expect the test to run\n"
+ "for at least 10 times the watchdog timeout time. After\n"
+ "that time you may have to reset the board manually and/or\n"
+ "restart GDB which tends to get a little confused.\n");
+ diag_printf("When you get contact with the board again, read the value\n"
+ "in watchdog_accuracy - it should be close to 100 if the\n"
+ "watchdog timer is accurate.\n");
+
+ // Disable data cache so the variable in memory gets updated.
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+
+ Cyg_Watchdog::watchdog.start();
+ Cyg_Watchdog::watchdog.reset();
+
+ while (watchdog_accuracy < 400) {
+ Cyg_Watchdog::watchdog.reset();
+ th->delay( watchdog_delay*watchdog_accuracy/100 );
+ watchdog_accuracy += 5;
+ }
+
+ CYG_TEST_FAIL_FINISH("Watchdog failed to reset board. "
+ "Timer value is off by at least a factor of 4!");
+}
+
+// -------------------------------------------------------------------------
+
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+
+#if !defined(CYGIMP_WATCHDOG_EMULATE) && defined(CYGPKG_HAL_MN10300_STDEVAL1)
+ // Workaround for PR 17974
+ if( cyg_test_is_simulator )
+ CYG_TEST_NA("Watchdog device not implemented in MN10300 simulator.");
+#endif
+
+
+ Cyg_Clock::cyg_resolution res = Cyg_Clock::real_time_clock->get_resolution();
+
+ cyg_uint64 wres = Cyg_Watchdog::watchdog.get_resolution();
+
+ // Calculate how many clock ticks there are in a watchdog cycle.
+
+ watchdog_delay = ((cyg_tick_count)wres * (cyg_tick_count)res.divisor );
+ watchdog_delay /= res.dividend;
+
+ th = new((void *)&thread) Cyg_Thread(CYG_SCHED_DEFAULT_INFO,
+ watchdog_thread,
+ 0,
+ "watchdog_thread",
+ (CYG_ADDRESS)thread_stack,
+ STACKSIZE
+ );
+
+ th->resume();
+
+ // Get the world going
+ Cyg_Scheduler::scheduler.start();
+
+}
+
+#else // CYGFUN_KERNEL_THREADS_TIMER etc...
+#define N_A_MSG "Needs kernel RTC/threads timer"
+#endif
+
+#else // CYGPKG_KERNEL
+#define N_A_MSG "Needs Kernel"
+#endif
+
+#ifdef N_A_MSG
+void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG);
+}
+#endif // N_A_MSG
+
+// -------------------------------------------------------------------------
+// EOF watchdog_reset.cxx
diff --git a/cesar/ecos/packages/isoinfra/current/ChangeLog b/cesar/ecos/packages/isoinfra/current/ChangeLog
new file mode 100644
index 0000000000..f367eb0abf
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/ChangeLog
@@ -0,0 +1,433 @@
+2005-07-22 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/unistd.h: Const correctness to keep the compiler happy.
+
+2004-03-30 Alex Paulis and Cameron Taylor <ctaylor@waverider.com>
+
+ * include/sys/select.h: set FD_SETSIZE to CYGNUM_FILEIO_NFD
+ when appropriate.
+
+2004-03-12 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/isoinfra.cdl: Typo: CYGBLD_ISO_STDIO_FILEPOS ->
+ CYGBLD_ISO_STDIO_FILEPOS_HEADER.
+
+ * include/limits.h: Avoid potential illegal recursion if
+ already been included by GCC's limits.h.
+
+ * include/stdio.h: Include stdarg.h to save duplication.
+ Give fileno(),fdopen() throw specifiers.
+
+ * include/unistd.h: Prototype for rename() lives in stdio.h.
+
+2004-01-07 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * include/sys/select.h: Only declare pselect() when posix signals are
+ included.
+
+2003-07-15 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/sys/stat.h (S_ISGID): Please, somebody teach me to count!
+
+2003-07-10 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/sys/stat.h :S_I[RWX]{USR|GRP|OTH} etc changed so they
+ don't overlap with S_ISLINK and S_ISSOCK. Reported by Scott
+ Wilkinson.
+
+2003-06-10 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/sys/stat.h: S_IFFIFO defies logic and should be called
+ S_IFIFO!
+
+2003-05-26 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/sys/stat.h (S_IF*): Added macros to test the type of a
+ file.
+
+2003-05-23 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/sys/stat.h: Added various S_IF macros for the st_mode
+ flags.
+
+2003-01-13 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * include/mqueue.h: Define POSIX 1003.1d draft mq_timedsend() and
+ mq_timedreceive() functions.
+
+2002-12-12 Bart Veer <bartv@ecoscentric.com>
+
+ * include/stdlib.h: #include cyg_type.h, now that this header
+ uses NORET attributes
+
+2002-11-10 Nick Garnett <nickg@ecoscentric.com>
+
+ * include/sys/types.h: Add define/undefine for __NEED_FD_SETS_ONLY
+ around include of sys/select.h to avoid circular dependencies in
+ headers.
+
+ * include/sys/select.h: Reorganized definitions so that the
+ include from sys/types.h only defines the fd_set type and macros
+ and not the select() and pselect() functions. The latter needs
+ sigset_t from signal.h, which can result in circularity.
+
+2002-04-09 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/stdlib.h: use NORET attributes from cyg_type.h.
+
+2002-03-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/float.h: Don't have multiple inclusion protection. It is
+ unnecessary and can confuse things if the headers are subject to two
+ -I paths.
+ * include/stdarg.h: Ditto.
+ * include/float.h: Don't cover include_next with inclusion protection
+ for a similar reason.
+ * include/stddef.h: Use C comment.
+
+2002-01-17 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/unistd.h: ftruncate() should use an off_t argument.
+
+2002-01-15 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/sys/types.h: off_t should be signed.
+
+2001-12-05 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/netdb.h (gethostbyname): anonymous arguments aren't allowed
+ in C (I thought they were a GNU C extension, sigh).
+
+2001-11-30 Jonathan Larmour <jlarmour@redhat.com>
+2001-11-30 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/netdb.h: Provide a default NULL implementation of
+ struct hostent, gethostbyname and gethostbyaddr if a real implementation
+ doesn't exist. This makes life easier for legacy code.
+
+2001-10-17 Jesper Skov <jskov@redhat.com>
+
+ * cdl/isoinfra.cdl: Changed string interfaces to flavor booldata.
+
+ * include/string.h: Changed feature checks to ifdef.
+
+2001-10-09 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/isoinfra.cdl: Make all CYGPKG_ISO_TIME interfaces be booldata.
+ Add config for POSIX clock types and implementations.
+ Make all CYGPKG_ISO_PTHREAD interfaces be booldata.
+ Add POSIX sleep() config.
+
+ * include/pthread.h: Reflect booldata interfaces.
+ * include/time.h: Ditto.
+ Also add default struct itimerspec and POSIX clock includes.
+ * include/unistd.h: Add sleep includes, with default proto.
+
+2001-09-28 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/isoinfra.cdl: Add netdb services and proto function support.
+ * include/netdb.h: New file.
+
+2001-09-24 Jesper Skov <jskov@redhat.com>
+
+ * cdl/isoinfra.cdl: Added CYGINT_ISO_DNS and
+ CYGBLD_ISO_DNS_HEADER.
+
+2001-09-12 Jesper Skov <jskov@redhat.com>
+
+ * include/limits.h: Work around glibc header problem.
+
+2001-09-10 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/isoinfra.cdl: Add CYGINT_ISO_PTHREAD_MUTEX and
+ CYGBLD_ISO_PTHREAD_MUTEX_HEADER.
+ * include/pthread.h: Include above header if set.
+
+2001-08-06 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/isoinfra.cdl: Add a separate POSIX mutex types header option.
+ * include/sys/types.h: Include it.
+ * include/time.h: Provide a default struct timespec even if the
+ implementation doesn't provide something better.
+
+2001-07-26 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/sys/types.h: Move select() related stuff into separate
+ sys/select header. Include it still for now.
+ * include/sys/select.h: New header, as per upcoming POSIX 200x standard.
+
+ * cdl/isoinfra.cdl: Add configury for select() and poll().
+
+
+2001-07-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/stdlib.h: Use correct macro names for abs and div.
+
+2001-06-08 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/stdlib.h: Actually set MB_CUR_MAX in i18n package via header.
+ * cdl/isoinfra.cdl: Define multibyte char headers/interfaces
+
+2000-06-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * include/stdlib.h: Add code to set MB_CUR_MAX to __mb_cur_max
+ if CYGFUN_LIBC_I18N_MB is defined, otherwise set it to 1.
+
+2001-02-11 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/isoinfra.cdl: Add CYGPKG_ISO_UNISTD to deal with unistd.h
+ Include POSIX timer operations underneath it.
+
+ * include/unistd.h: Add support for conditional inclusion of
+ POSIX timer operations.
+
+2001-02-01 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/isoinfra.cdl: Add CYGINT_ISO_STDIO_POSIX_FDFUNCS and
+ CYGBLD_ISO_STDIO_POSIX_FDFUNCS_HEADER primarily for fileno()
+ and fdopen()
+ * include/stdio.h: Use above to provide default protos for fileno
+ and fdopen.
+
+2000-12-15 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/dlfcn.h:
+ * cdl/isoinfra.cdl:
+ Added support for dlfcn.h header that defines dynamic load API.
+
+2000-11-01 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/isoinfra.cdl: Add CYGINT_ISO_STDIO_STREAMS and
+ CYGBLD_ISO_STDIO_STREAMS_HEADER.
+ Change flavor of other stdio interfaces to booldata
+ * include/stdio.h: Use #ifdefs not #ifs on interfaces to reflect above
+ Add CYGINT_ISO_STDIO_STREAMS and CYGBLD_ISO_STDIO_STREAMS_HEADER.
+
+2000-10-05 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/sys/types.h: Changed type of pid_t to plain int. It
+ needs to be signed.
+
+ * include/unistd.h: Fixed prototypes of several functions to match
+ POSIX standard.
+
+2000-09-11 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/isoinfra.cdl: Add CYGBLD_ISO_{OPEN,LINK,NAME,PATH}_MAX_HEADER
+ * include/limits.h: Support definition of OPEN_MAX, LINK_MAX,
+ NAME_MAX, PATH_MAX
+
+2000-08-30 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/assert.h (assert): Fix logic
+
+2000-08-29 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/stddef.h: Don't use CYGONCE_ multiple header inclusion
+ protection for this file - this is special.
+
+2000-08-08 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/limits.h: Add SSIZE_MAX
+
+2000-08-03 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/sys/types.h: Make fd_mask unsigned int, not cyg_uint32 so
+ as to avoid including cyg_type.h
+
+2000-08-01 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/isoinfra.cdl: Support termios
+ * include/termios.h: Added
+
+2000-07-21 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/isoinfra.cdl: CYGNUM_ISO_MQUEUE_OPEN_MAX and
+ CYGNUM_ISO_MQUEUE_PRIO_MAX should only be active if CYGINT_ISO_MQUEUE
+ rather than them requiring it
+
+2000-07-20 Nick Garnett <nickg@cygnus.co.uk>
+
+ * cdl/isoinfra.cdl: Added configury for sys/utsname.h.
+
+ * include/unistd.h: Added _POSIX_VERSION constant.
+ Changed return type of sysconf() to long.
+
+ * include/sys/utsname.h: Added this file.
+
+2000-07-13 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/unistd.h: Added fsync() prototype.
+
+2000-07-13 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/isoinfra.cdl: Add CYGINT_ISO_MALLINFO and
+ CYGBLD_ISO_MALLINFO_HEADER to support mallinfo()
+
+ * include/stdlib.h: Support mallinfo()
+
+2000-06-28 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/sys/stat.h: Added prototypes for stat(), fstat() and
+ mkdir().
+
+ * include/dirent.h: Added this file to provide directory reading
+ support.
+
+ * cdl/isoinfra.cdl: Added dirent support.
+
+2000-06-21 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/isoinfra.cdl: Put in below requires line, but change to allow
+ 0 or 1 implementations
+
+2000-06-19 Nick Garnett <nickg@cygnus.co.uk>
+
+ * cdl/isoinfra.cdl: Commented out requires line in
+ CYGINT_POSIX_REALTIME_SIGNALS interface. This causes configuration
+ errors when the POSIX package is absent.
+
+ * include/sys/types.h: Reimplemented FD_COPY() and FD_ZERO() as
+ inline copy loops rather than calls to memcpy() and memset().
+
+2000-06-09 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/time.h: Following the below change, simply define struct
+ timeval, while allowing it to be overridden if necessary
+ * cdl/isoinfra.cdl (CYGBLD_ISO_STRUCTTIMEVAL_HEADER): define for this
+ purpose
+
+2000-06-09 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/time.h: Added definition of struct timeval. This is a
+ temporary home for this while we work out where definitions like
+ this should really live. Like the fd_set stuff in sys/types.h,
+ this is needed by two packages, both of which can operate
+ independently but which also need to co-operate when they are both
+ present.
+
+2000-06-07 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/sys/types.h: Added definitions for file descriptor sets
+ and inclusion of BSD specific types.
+
+ * include/stdlib.h: Added extern for environ variable in non-POSIX
+ builds.
+
+ * include/fcntl.h (O_WRONLY): Moved this to bit 1, leaving bit 2
+ for future expansion.
+
+ * cdl/isoinfra.cdl: Added CYGPKG_ISO_EXTRA_TYPES to control
+ inclusion of types into <sys/types.h> that are not specified by
+ POSIX. Mostly needed by the socket and BSD code.
+
+2000-06-02 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/unistd.h: Added this initial version of this file. Jifl
+ will probably want to rewrite it at some point.
+
+ * include/fcntl.h: Changed O_RDWR to (O_RDONLY|O_WRONLY).
+
+2000-05-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/fcntl.h: Fixed ifdefs around extern declaration of
+ fcntl().
+
+2000-05-20 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/fcntl.h: new file
+ * include/mqueue.h: new file
+ * include/sys/stat.h: new file
+
+ * cdl/isoinfra.cdl: No need for memcpy and memset interfaces - they're
+ always present
+ (CYGINT_ISO_POSIX_TIMERS): define _POSIX_TIMERS if enabled
+ (CYGINT_POSIX_REALTIME_SIGNALS): add
+ (CYGPKG_ISO_POSIX_FCNTL): Add a number of hooks for things that need
+ to control fcntl.h
+ (CYGPKG_ISO_MQUEUE): Add a number of hooks for things that need
+ to control mqueue.h
+ (CYGBLD_ISO_STAT_DEFS_HEADER): Add to override default sys/stat.h
+ contents
+
+ Fix some typos throughout, and a few other minor tidies
+
+ * include/limits.h: Move _POSIX_* macros here from POSIX package since
+ they are implementation independent
+
+ * include/time.h: Keep CLOCKS_PER_SEC at 1000000
+
+ * include/sys/types.h: Bring some of the types more in line with Linux
+
+ * include/ctype.h, include/errno.h, include/limits.h, include/locale.h,
+ include/pthread.h, include/sched.h, include/semaphore.h,
+ include/setjmp.h, include/signal.h, include/stdio.h, include/stdlib.h,
+ include/string.h, include/time.h, include/sys/types.h:
+ Don't need to explicitly check interface values > 0
+
+2000-05-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/time.h: Provide default definitions of time_t, clock_t and
+ CLOCKS_PER_SEC
+
+ * cdl/isoinfra.cdl: Remove CYGINT_ISO_TIME_T and CYGINT_ISO_CLOCK_T -
+ not really needed with a default definition
+
+ * New package isoinfra with the following files:
+ include/errno.h
+ include/sys/types.h
+ include/assert.h
+ include/stddef.h
+ include/string.h
+ include/setjmp.h
+ include/ctype.h
+ include/float.h
+ include/sched.h
+ include/stdarg.h
+ include/semaphore.h
+ include/time.h
+ include/signal.h
+ include/locale.h
+ include/pthread.h
+ include/stdio.h
+ include/stdlib.h
+ include/limits.h
+ cdl/isoinfra.cdl
+
+ This package manages the ISO standard (C and POSIX) top-level header
+ files
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/isoinfra/current/cdl/isoinfra.cdl b/cesar/ecos/packages/isoinfra/current/cdl/isoinfra.cdl
new file mode 100644
index 0000000000..0ca4f74fb7
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/cdl/isoinfra.cdl
@@ -0,0 +1,1246 @@
+# ====================================================================
+#
+# isoinfra.cdl
+#
+# ISO C and POSIX standards infrastructure package configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jlarmour
+# Contributors:
+# Date: 2000-04-07
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_ISOINFRA {
+ display "ISO C and POSIX infrastructure"
+ description "
+ eCos supports implementations of ISO C libraries and POSIX
+ implementations. This package provides infrastructure used by
+ all such implementations."
+
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_STARTUP {
+ display "Startup and termination"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_MAIN_STARTUP {
+ display "main() startup implementations"
+ description "
+ Implementations of this interface arrange for a user-supplied
+ main() to be called in an ISO compatible environment."
+ requires { 1 >= CYGINT_ISO_MAIN_STARTUP }
+ }
+
+ cdl_interface CYGINT_ISO_ENVIRON {
+ display "environ implementations"
+ description "
+ Implementations of this interface provide the environ
+ variable required by POSIX."
+ requires { 1 >= CYGINT_ISO_ENVIRON }
+ }
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_CTYPE_H {
+ display "ctype.h functions"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_CTYPE {
+ display "Number of implementations of ctype functions"
+ requires { 1 >= CYGINT_ISO_CTYPE }
+ }
+
+ cdl_option CYGBLD_ISO_CTYPE_HEADER {
+ display "Ctype implementation header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_ERRNO {
+ display "Error handling"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_ERRNO_CODES {
+ display "Number of implementations of error codes"
+ requires { 1 >= CYGINT_ISO_ERRNO_CODES }
+ }
+
+ cdl_option CYGBLD_ISO_ERRNO_CODES_HEADER {
+ display "Error codes implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_ERRNO {
+ display "Number of implementations of errno variable"
+ requires { 1 >= CYGINT_ISO_ERRNO }
+ }
+
+ cdl_option CYGBLD_ISO_ERRNO_HEADER {
+ display "errno variable implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_LOCALE {
+ display "Locale-related functions"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_LOCALE {
+ display "Number of implementations of locale functions"
+ requires { 1 >= CYGINT_ISO_LOCALE }
+ }
+
+ cdl_option CYGBLD_ISO_LOCALE_HEADER {
+ display "Locale implementation header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_STDIO {
+ display "Standard I/O-related functionality"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_STDIO_FILETYPES {
+ display "Number of implementations of stdio file types"
+ flavor booldata
+ requires { 1 >= CYGINT_ISO_STDIO_FILETYPES }
+ }
+
+ cdl_option CYGBLD_ISO_STDIO_FILETYPES_HEADER {
+ display "Stdio file types implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STDIO_STREAMS {
+ display "Stdio standard streams implementations"
+ flavor booldata
+ requires { 1 >= CYGINT_ISO_STDIO_STREAMS }
+ }
+
+ cdl_option CYGBLD_ISO_STDIO_STREAMS_HEADER {
+ display "Stdio standard streams implementation header"
+ description "This header file must define stdin, stdout
+ and stderr."
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STDIO_FILEOPS {
+ display "Number of implementations of stdio file operations"
+ flavor booldata
+ requires { 1 >= CYGINT_ISO_STDIO_FILEOPS }
+ }
+
+ cdl_option CYGBLD_ISO_STDIO_FILEOPS_HEADER {
+ display "Stdio file operations implementation header"
+ description "
+ This header controls the file system operations on a file
+ such as remove(), rename(), tmpfile(), tmpnam() and associated
+ constants."
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STDIO_FILEACCESS {
+ display "Number of implementations of stdio file access \
+ functionals"
+ flavor booldata
+ requires { 1 >= CYGINT_ISO_STDIO_FILEACCESS }
+ }
+
+ cdl_option CYGBLD_ISO_STDIO_FILEACCESS_HEADER {
+ display "Stdio file access implementation header"
+ description "
+ This header controls the file access operations
+ such as fclose(), fflush(), fopen(), freopen(), setbuf(),
+ setvbuf(), and associated constants."
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STDIO_FORMATTED_IO {
+ display "Number of implementations of stdio formatted I/O"
+ flavor booldata
+ requires { 1 >= CYGINT_ISO_STDIO_FORMATTED_IO }
+ }
+
+ cdl_option CYGBLD_ISO_STDIO_FORMATTED_IO_HEADER {
+ display "Stdio formatted I/O implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STDIO_CHAR_IO {
+ display "Number of implementations of stdio character I/O"
+ flavor booldata
+ requires { 1 >= CYGINT_ISO_STDIO_CHAR_IO }
+ }
+
+ cdl_option CYGBLD_ISO_STDIO_CHAR_IO_HEADER {
+ display "Stdio character I/O implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STDIO_DIRECT_IO {
+ display "Number of implementations of stdio direct I/O"
+ flavor booldata
+ requires { 1 >= CYGINT_ISO_STDIO_DIRECT_IO }
+ }
+
+ cdl_option CYGBLD_ISO_STDIO_DIRECT_IO_HEADER {
+ display "Stdio direct I/O implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STDIO_FILEPOS {
+ display "Number of implementations of stdio file positioning"
+ flavor booldata
+ requires { 1 >= CYGINT_ISO_STDIO_FILEPOS }
+ }
+
+ cdl_option CYGBLD_ISO_STDIO_FILEPOS_HEADER {
+ display "Stdio file positioning implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STDIO_ERROR {
+ display "Number of implementations of stdio error handling"
+ flavor booldata
+ requires { 1 >= CYGINT_ISO_STDIO_ERROR }
+ }
+
+ cdl_option CYGBLD_ISO_STDIO_ERROR_HEADER {
+ display "Stdio error handling implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STDIO_POSIX_FDFUNCS {
+ display "POSIX fd-related function implementations"
+ flavor booldata
+ requires { 1 >= CYGINT_ISO_STDIO_POSIX_FDFUNCS }
+ }
+
+ cdl_option CYGBLD_ISO_STDIO_POSIX_FDFUNCS_HEADER {
+ display "POSIX fd-related function implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_STDLIB {
+ display "Standard general utility functions"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_STDLIB_STRCONV {
+ display "String conversion function implementations"
+ requires { 1 >= CYGINT_ISO_STDLIB_STRCONV }
+ }
+
+ cdl_option CYGBLD_ISO_STDLIB_STRCONV_HEADER {
+ display "String conversion function implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STDLIB_STRCONV_FLOAT {
+ display "String to FP conversion function implementations"
+ requires { 1 >= CYGINT_ISO_STDLIB_STRCONV_FLOAT }
+ }
+
+ cdl_option CYGBLD_ISO_STDLIB_STRCONV_FLOAT_HEADER {
+ display "String to FP conversion function implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_RAND {
+ display "Random number generator implementations"
+ requires { 1 >= CYGINT_ISO_RAND }
+ }
+
+ cdl_option CYGBLD_ISO_RAND_HEADER {
+ display "Random number generator implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_MALLOC {
+ display "Malloc implementations"
+ requires { 1 >= CYGINT_ISO_MALLOC }
+ }
+
+ cdl_option CYGBLD_ISO_MALLOC_HEADER {
+ display "Malloc implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_MALLINFO {
+ display "Mallinfo() implementations"
+ requires { 1 >= CYGINT_ISO_MALLINFO }
+ }
+
+ cdl_option CYGBLD_ISO_MALLINFO_HEADER {
+ display "Mallinfo() implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_EXIT {
+ display "Program exit functionality implementations"
+ requires { 1 >= CYGINT_ISO_EXIT }
+ }
+
+ cdl_option CYGBLD_ISO_EXIT_HEADER {
+ display "Program exit functionality implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STDLIB_ENVIRON {
+ display "Program environment implementations"
+ requires { 1 >= CYGINT_ISO_STDLIB_ENVIRON }
+ }
+
+ cdl_option CYGBLD_ISO_STDLIB_ENVIRON_HEADER {
+ display "Program environment implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STDLIB_SYSTEM {
+ display "system() implementations"
+ requires { 1 >= CYGINT_ISO_STDLIB_SYSTEM }
+ }
+
+ cdl_option CYGBLD_ISO_STDLIB_SYSTEM_HEADER {
+ display "system() implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_BSEARCH {
+ display "bsearch() implementations"
+ requires { 1 >= CYGINT_ISO_BSEARCH }
+ }
+
+ cdl_option CYGBLD_ISO_BSEARCH_HEADER {
+ display "bsearch() implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_QSORT {
+ display "qsort() implementations"
+ requires { 1 >= CYGINT_ISO_STDLIB_QSORT }
+ }
+
+ cdl_option CYGBLD_ISO_QSORT_HEADER {
+ display "qsort() implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_ABS {
+ display "abs()/labs() implementations"
+ requires { 1 >= CYGINT_ISO_STDLIB_ABS }
+ }
+
+ cdl_option CYGBLD_ISO_STDLIB_ABS_HEADER {
+ display "abs()/labs() implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_DIV {
+ display "div()/ldiv() implementations"
+ requires { 1 >= CYGINT_ISO_STDLIB_DIV }
+ }
+
+ cdl_option CYGBLD_ISO_STDLIB_DIV_HEADER {
+ display "div()/ldiv() implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_option CYGBLD_ISO_STDLIB_MB_CUR_MAX_HEADER {
+ display "Header defining the implementation's MB_CUR_MAX"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STDLIB_MULTIBYTE {
+ display "Multibyte character implementations"
+ requires { 1 >= CYGINT_ISO_STDLIB_MULTIBYTE }
+ }
+
+ cdl_option CYGBLD_ISO_STDLIB_MULTIBYTE_HEADER {
+ display "Multibyte character implementation header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_STRING {
+ display "String functions"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_STRERROR {
+ display "Number of implementations of strerror() function"
+ requires { 1 >= CYGINT_ISO_STRERROR }
+ flavor booldata
+ }
+
+ cdl_option CYGBLD_ISO_STRERROR_HEADER {
+ display "strerror() implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_option CYGBLD_ISO_MEMCPY_HEADER {
+ display "memcpy() implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_option CYGBLD_ISO_MEMSET_HEADER {
+ display "memset() implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STRTOK_R {
+ display "Number of implementations of strtok_r() function"
+ requires { 1 >= CYGINT_ISO_STRTOK_R }
+ flavor booldata
+ }
+
+ cdl_option CYGBLD_ISO_STRTOK_R_HEADER {
+ display "strtok_r() implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STRING_LOCALE_FUNCS {
+ display "Number of implementations of locale-specific string \
+ functions"
+ description "
+ This covers locale-dependent string functions such as strcoll()
+ and strxfrm()."
+ requires { 1 >= CYGINT_ISO_STRING_LOCALE_FUNCS }
+ flavor booldata
+ }
+
+ cdl_option CYGBLD_ISO_STRING_LOCALE_FUNCS_HEADER {
+ display "Locale-specific string functions' implementation \
+ header"
+ description "
+ This covers locale-dependent string functions such as strcoll()
+ and strxfrm()."
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STRING_BSD_FUNCS {
+ display "Number of implementations of BSD string functions"
+ requires { 1 >= CYGINT_ISO_STRING_BSD_FUNCS }
+ flavor booldata
+ }
+
+ cdl_option CYGBLD_ISO_STRING_BSD_FUNCS_HEADER {
+ display "BSD string functions' implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STRING_MEMFUNCS {
+ display "Number of implementations of other mem*() functions"
+ requires { 1 >= CYGINT_ISO_STRING_MEMFUNCS }
+ flavor booldata
+ }
+
+ cdl_option CYGBLD_ISO_STRING_MEMFUNCS_HEADER {
+ display "Other mem*() functions' implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_STRING_STRFUNCS {
+ display "Number of implementations of other ISO C str*() \
+ functions"
+ description "
+ This covers the other str*() functions defined by ISO C."
+ requires { 1 >= CYGINT_ISO_STRING_STRFUNCS }
+ flavor booldata
+ }
+
+ cdl_option CYGBLD_ISO_STRING_STRFUNCS_HEADER {
+ display "Other ISO C str*() functions' implementation \
+ header"
+ description "
+ This covers the other str*() functions defined by ISO C."
+ flavor booldata
+ default_value 0
+ }
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_TIME {
+ display "Clock and time functionality"
+ flavor none
+ no_define
+
+ cdl_option CYGBLD_ISO_TIME_T_HEADER {
+ display "time_t implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_option CYGBLD_ISO_CLOCK_T_HEADER {
+ display "clock_t implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_option CYGBLD_ISO_STRUCTTIMEVAL_HEADER {
+ display "struct timeval implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_POSIX_TIMER_TYPES {
+ display "Number of implementations of POSIX timer types"
+ requires { 1 >= CYGINT_ISO_POSIX_TIMER_TYPES }
+ flavor booldata
+ }
+
+ cdl_option CYGBLD_ISO_POSIX_TIMER_TYPES_HEADER {
+ display "POSIX timer types implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_POSIX_CLOCK_TYPES {
+ display "Number of implementations of POSIX clock types"
+ requires { 1 >= CYGINT_ISO_POSIX_CLOCK_TYPES }
+ flavor booldata
+ }
+
+ cdl_option CYGBLD_ISO_POSIX_CLOCK_TYPES_HEADER {
+ display "POSIX clock types implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_C_TIME_TYPES {
+ display "Number of implementations of ISO C types"
+ requires { 1 >= CYGINT_ISO_C_TIME_TYPES }
+ flavor booldata
+ }
+
+ cdl_option CYGBLD_ISO_C_TIME_TYPES_HEADER {
+ display "ISO C time types implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_POSIX_TIMERS {
+ display "Number of implementations of POSIX timers"
+ requires { 1 >= CYGINT_ISO_POSIX_TIMERS }
+ define _POSIX_TIMERS
+ flavor booldata
+ }
+
+ cdl_option CYGBLD_ISO_POSIX_TIMERS_HEADER {
+ display "POSIX timer implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_POSIX_CLOCKS {
+ display "Number of implementations of POSIX clocks"
+ requires { 1 >= CYGINT_ISO_POSIX_CLOCKS }
+ flavor booldata
+ }
+
+ cdl_option CYGBLD_ISO_POSIX_CLOCKS_HEADER {
+ display "POSIX clocks implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_C_CLOCK_FUNCS {
+ display "Number of implementations of ISO C clock functions"
+ requires { 1 >= CYGINT_ISO_C_CLOCK_FUNCS }
+ flavor booldata
+ }
+
+ cdl_option CYGBLD_ISO_C_CLOCK_FUNCS_HEADER {
+ display "ISO C clock functions' implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_TZSET {
+ display "Number of implementations of tzset() function"
+ requires { 1 >= CYGINT_ISO_TZSET }
+ flavor booldata
+ }
+
+ cdl_option CYGBLD_ISO_TZSET_HEADER {
+ display "tzset() implementation header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_SIGNAL {
+ display "Signal functionality"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_SIGNAL_NUMBERS {
+ display "Number of implementations of signal numbers"
+ requires { 1 >= CYGINT_ISO_SIGNAL_NUMBERS }
+ }
+
+ cdl_option CYGBLD_ISO_SIGNAL_NUMBERS_HEADER {
+ display "Signal numbering implementation header"
+ description "This header provides the mapping of signal
+ names (e.g. SIGBUS) to numbers."
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_SIGNAL_IMPL {
+ display "Number of signal implementations"
+ requires { 1 >= CYGINT_ISO_SIGNAL_IMPL }
+ }
+
+ cdl_option CYGBLD_ISO_SIGNAL_IMPL_HEADER {
+ display "Signals implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_POSIX_REALTIME_SIGNALS {
+ display "POSIX real time signals feature test macro"
+ description "This defines the POSIX feature test macro
+ that indicates that the POSIX real time signals
+ are present."
+ requires { 1 >= CYGINT_POSIX_REALTIME_SIGNALS }
+# FIXME should use this: define _POSIX_REALTIME_SIGNALS
+ define_proc {
+ puts $::cdl_header "#if CYGINT_POSIX_REALTIME_SIGNALS"
+ puts $::cdl_header "# define _POSIX_REALTIME_SIGNALS 1"
+ puts $::cdl_header "#endif"
+ }
+ }
+
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_SETJMP {
+ display "Non-local jumps functionality"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_SETJMP {
+ display "setjmp() / longjmp() implementations"
+ requires { 1 >= CYGINT_ISO_SETJMP }
+ }
+
+ cdl_option CYGBLD_ISO_SETJMP_HEADER {
+ display "setjmp() / longjmp() implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_SIGSETJMP {
+ display "sigsetjmp() / siglongjmp() implementations"
+ requires { 1 >= CYGINT_ISO_SIGSETJMP }
+ }
+
+ cdl_option CYGBLD_ISO_SIGSETJMP_HEADER {
+ display "sigsetjmp() / siglongjmp() implementation header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+
+# ====================================================================
+
+ cdl_option CYGBLD_ISO_ASSERT_HEADER {
+ display "Assertions implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_POSIX_FCNTL {
+ display "POSIX file control"
+ description "This covers the POSIX file control definitions,
+ normally found in <fcntl.h>"
+ flavor none
+ no_define
+
+ cdl_option CYGBLD_ISO_OFLAG_HEADER {
+ display "POSIX open flags implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_FCNTL {
+ display "POSIX fcntl() implementations"
+ requires { 1 >= CYGINT_ISO_FCNTL }
+ }
+
+ cdl_option CYGBLD_ISO_FCNTL_HEADER {
+ display "POSIX fcntl() implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_OPEN {
+ display "POSIX file open implementations"
+ requires { 1 >= CYGINT_ISO_OPEN }
+ }
+
+ cdl_option CYGBLD_ISO_OPEN_HEADER {
+ display "POSIX file open implementation header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+# ====================================================================
+
+ cdl_option CYGBLD_ISO_STAT_DEFS_HEADER {
+ display "<sys/stat.h> definitions implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+
+# ====================================================================
+
+ cdl_interface CYGINT_ISO_DIRENT {
+ display "POSIX directory reading implementation"
+ requires { 1 >= CYGINT_ISO_DIRENT }
+ }
+
+ cdl_option CYGBLD_ISO_DIRENT_HEADER {
+ display "<dirent.h> definitions implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_POSIX_TYPES {
+ display "POSIX <sys/types.h> contents"
+ description "This covers the types required by POSIX to be in
+ <sys/types.h>"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_PTHREADTYPES {
+ display "POSIX thread types implementations"
+ requires { 1 >= CYGINT_ISO_PTHREADTYPES }
+ }
+
+ cdl_option CYGBLD_ISO_PTHREADTYPES_HEADER {
+ display "POSIX thread types implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_PMUTEXTYPES {
+ display "POSIX mutex types implementations"
+ requires { 1 >= CYGINT_ISO_PTHREADTYPES }
+ }
+
+ cdl_option CYGBLD_ISO_PMUTEXTYPES_HEADER {
+ display "POSIX mutex types implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_option CYGBLD_ISO_SSIZE_T_HEADER {
+ display "ssize_t implementation header"
+ flavor booldata
+ default_value 0
+ }
+ cdl_option CYGBLD_ISO_FSTYPES_HEADER {
+ display "Filesystem types implementation header"
+ flavor booldata
+ default_value 0
+ }
+ cdl_option CYGBLD_ISO_SCHEDTYPES_HEADER {
+ display "gid_t, pid_t, uid_t implementation header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_EXTRA_TYPES {
+ display "Non-POSIX <sys/types.h> contents"
+ description "This covers the extra types required by non-POSIX
+ packages to be in <sys/types.h>. These would normally
+ only be visible if _POSIX_SOURCE is not defined."
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_BSDTYPES {
+ display "BSD compatible types"
+ requires { 1 >= CYGINT_ISO_BSDTYPES }
+ }
+
+ cdl_option CYGBLD_ISO_BSDTYPES_HEADER {
+ display "BSD types header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_UTSNAME {
+ display "Utsname structure"
+ flavor none
+ no_define
+
+ cdl_option CYGBLD_ISO_UTSNAME_HEADER {
+ display "Utsname header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_SCHED {
+ display "POSIX scheduler"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_SCHED_IMPL {
+ display "POSIX scheduler implementations"
+ requires { 1 >= CYGINT_ISO_SCHED_IMPL }
+ }
+
+ cdl_option CYGBLD_ISO_SCHED_IMPL_HEADER {
+ display "POSIX scheduler implementation header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_SEMAPHORES {
+ display "POSIX semaphores"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_SEMAPHORES {
+ display "POSIX semaphore implementations"
+ requires { 1 >= CYGINT_ISO_SEMAPHORES }
+# FIXME should use this: define _POSIX_SEMAPHORES
+ define_proc {
+ puts $::cdl_header "#if CYGINT_ISO_SEMAPHORES"
+ puts $::cdl_header "# define _POSIX_SEMAPHORES 1"
+ puts $::cdl_header "#endif"
+ }
+ }
+
+ cdl_option CYGBLD_ISO_SEMAPHORES_HEADER {
+ display "POSIX semaphore implementation header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_MQUEUE {
+ display "POSIX message queues"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_MQUEUE {
+ display "Implementations"
+ requires { 1 >= CYGINT_ISO_MQUEUE }
+# FIXME should use this: define _POSIX_MESSAGE_PASSING
+ define_proc {
+ puts $::cdl_header "#if CYGINT_ISO_MQUEUE"
+ puts $::cdl_header "# define _POSIX_MESSAGE_PASSING 1"
+ puts $::cdl_header "#endif"
+ }
+ }
+
+ cdl_option CYGBLD_ISO_MQUEUE_HEADER {
+ display "Implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_option CYGNUM_ISO_MQUEUE_OPEN_MAX {
+ display "Maximum number of open message queues"
+ flavor booldata
+ active_if CYGINT_ISO_MQUEUE
+ define MQ_OPEN_MAX
+# FIXME: shouldn't be specific to the implementation, see CR
+ default_value { CYGNUM_POSIX_MQUEUE_OPEN_MAX > 0 ? CYGNUM_POSIX_MQUEUE_OPEN_MAX : 0 }
+ }
+
+ cdl_option CYGNUM_ISO_MQUEUE_PRIO_MAX {
+ display "Maximum number of message priorities"
+ flavor booldata
+# FIXME: again like CYGNUM_ISO_MQUEUE_OPEN_MAX, should be able to be set by
+# the implementation
+ default_value 65535
+ active_if CYGINT_ISO_MQUEUE
+ define MQ_PRIO_MAX
+ }
+
+
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_PTHREAD {
+ display "POSIX threads"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_PTHREAD_IMPL {
+ display "POSIX pthread implementations"
+ requires { 1 >= CYGINT_ISO_PTHREAD_IMPL }
+ flavor booldata
+ }
+
+ cdl_option CYGBLD_ISO_PTHREAD_IMPL_HEADER {
+ display "POSIX pthread implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_PTHREAD_MUTEX {
+ display "POSIX mutex/cond var implementations"
+ requires { 1 >= CYGINT_ISO_PTHREAD_MUTEX }
+ flavor booldata
+ }
+
+ cdl_option CYGBLD_ISO_PTHREAD_MUTEX_HEADER {
+ display "POSIX mutex/cond var implementation header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_LIMITS {
+ display "Limits"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_POSIX_LIMITS {
+ display "POSIX pthread limits implementations"
+ requires { 1 >= CYGINT_ISO_POSIX_LIMITS }
+ }
+
+ cdl_option CYGBLD_ISO_POSIX_LIMITS_HEADER {
+ display "POSIX pthread limits implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_option CYGBLD_ISO_OPEN_MAX_HEADER {
+ display "OPEN_MAX implementation header"
+ flavor booldata
+ default_value 0
+ }
+ cdl_option CYGBLD_ISO_LINK_MAX_HEADER {
+ display "LINK_MAX implementation header"
+ flavor booldata
+ default_value 0
+ }
+ cdl_option CYGBLD_ISO_NAME_MAX_HEADER {
+ display "NAME_MAX implementation header"
+ flavor booldata
+ default_value 0
+ }
+ cdl_option CYGBLD_ISO_PATH_MAX_HEADER {
+ display "PATH_MAX implementation header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_TERMIOS {
+ display "POSIX termios"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_TERMIOS {
+ display "POSIX termios implementations"
+ requires { 1 >= CYGINT_ISO_TERMIOS }
+ }
+
+ cdl_option CYGBLD_ISO_TERMIOS_HEADER {
+ display "POSIX termios implementation header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_DLFCN {
+ display "Dynamic load API"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_DLFCN {
+ display "Dynamic load implementations"
+ requires { 1 >= CYGINT_ISO_DLFCN }
+ }
+
+ cdl_option CYGBLD_ISO_DLFCN_HEADER {
+ display "Dynamic load implementation header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_UNISTD {
+ display "UNIX standard functions"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_POSIX_TIMER_OPS {
+ display "POSIX timer operations implementations"
+ flavor booldata
+ requires { 1 >= CYGINT_ISO_POSIX_TIMER_OPS }
+ }
+
+ cdl_option CYGBLD_ISO_POSIX_TIMER_OPS_HEADER {
+ display "POSIX timer operations implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_POSIX_SLEEP {
+ display "POSIX sleep() implementations"
+ flavor booldata
+ requires { 1 >= CYGINT_ISO_POSIX_SLEEP }
+ }
+
+ cdl_option CYGBLD_ISO_POSIX_SLEEP_HEADER {
+ display "POSIX sleep() implementation header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_SELECT {
+ display "select()/poll() functions"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_SELECT {
+ display "select() implementations"
+ flavor booldata
+ requires { 1 >= CYGINT_ISO_SELECT }
+ }
+
+ cdl_option CYGBLD_ISO_SELECT_HEADER {
+ display "select() implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_POLL {
+ display "poll() implementations"
+ flavor booldata
+ requires { 1 >= CYGINT_ISO_POLL }
+ }
+
+ cdl_option CYGBLD_ISO_POLL_HEADER {
+ display "poll() implementation header"
+ flavor booldata
+ default_value 0
+ }
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISO_NETDB {
+ display "NetDB utility functions"
+ flavor none
+ no_define
+
+ cdl_interface CYGINT_ISO_DNS {
+ display "DNS implementations"
+ flavor bool
+ requires { 1 >= CYGINT_ISO_DNS }
+ }
+
+ cdl_option CYGBLD_ISO_DNS_HEADER {
+ display "DNS implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_NETDB_PROTO {
+ display "Protocol network database implementations"
+ flavor bool
+ requires { 1 >= CYGINT_ISO_NETDB_PROTO }
+ }
+
+ cdl_option CYGBLD_ISO_NETDB_PROTO_HEADER {
+ display "Protocol network database implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ cdl_interface CYGINT_ISO_NETDB_SERV {
+ display "Services network database implementations"
+ flavor bool
+ requires { 1 >= CYGINT_ISO_NETDB_SERV }
+ }
+
+ cdl_option CYGBLD_ISO_NETDB_SERV_HEADER {
+ display "Services network database implementation header"
+ flavor booldata
+ default_value 0
+ }
+
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_ISOINFRA_OPTIONS {
+ display "Build options"
+ flavor none
+ no_define
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_ISOINFRA_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the ISO C and POSIX infrastructure package.
+ These flags are used in addition to the set of global flags."
+ }
+
+ cdl_option CYGPKG_ISOINFRA_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the ISO C and POSIX infrastructure package.
+ These flags are removed from the set of global flags
+ if present."
+ }
+ }
+}
+
+# ====================================================================
+# End of isoinfra.cdl
diff --git a/cesar/ecos/packages/isoinfra/current/include/assert.h b/cesar/ecos/packages/isoinfra/current/include/assert.h
new file mode 100644
index 0000000000..b17523a20b
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/assert.h
@@ -0,0 +1,121 @@
+#ifndef CYGONCE_ISO_ASSERT_H
+#define CYGONCE_ISO_ASSERT_H
+/*========================================================================
+//
+// assert.h
+//
+// ISO C assertions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the assert functions required by
+// ISO C and POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <assert.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+#include <pkgconf/infra.h> /* CYGDBG_USE_ASSERTS */
+
+/* INCLUDES */
+
+#ifdef CYGBLD_ISO_ASSERT_HEADER
+# include CYGBLD_ISO_ASSERT_HEADER
+#else
+
+# ifdef NDEBUG
+# define assert( __bool ) ((void)0)
+# else /* if NDEBUG is NOT defined */
+
+/* First preference is to be standards compliant */
+
+#if defined(CYGINT_ISO_STDIO_FORMATTED_IO) && defined(CYGINT_ISO_EXIT)
+
+# include <stdio.h>
+# include <stdlib.h>
+
+# define assert( __bool ) \
+ do { \
+ if (0 == (__bool)) { \
+ fprintf( stderr, "User assertion failed: \"%s\", at %s:%d\n", \
+ #__bool, __FILE__, __LINE__); \
+ abort(); \
+ } \
+ } while(0)
+
+
+/* Second preference is to use the common infra assertion support */
+
+#elif defined(CYGDBG_USE_ASSERTS)
+
+# include <cyg/infra/cyg_ass.h>
+
+# define assert( __bool ) \
+ CYG_MACRO_START \
+ CYG_ASSERT( __bool, "User assertion failed: \"" #__bool "\"" ); \
+ CYG_MACRO_END
+#else /* Fallback */
+
+# include <cyg/infra/diag.h>
+
+# define assert( __bool ) \
+ do { \
+ if (0 == (__bool)) { \
+ diag_printf( "User assertion failed: \"%s\", at %s:%d\n", \
+ #__bool, __FILE__, __LINE__); \
+ for (;;); \
+ } \
+ } while(0)
+
+#endif
+
+# endif /* NDEBUG not defined */
+#endif
+
+#endif /* CYGONCE_ISO_ASSERT_H multiple inclusion protection */
+
+/* EOF assert.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/ctype.h b/cesar/ecos/packages/isoinfra/current/include/ctype.h
new file mode 100644
index 0000000000..9e1958483f
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/ctype.h
@@ -0,0 +1,132 @@
+#ifndef CYGONCE_ISO_CTYPE_H
+#define CYGONCE_ISO_CTYPE_H
+/*========================================================================
+//
+// ctype.h
+//
+// ISO ctype functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the ctype functions required by
+// ISO C 9899:1990 and POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <ctype.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+/* INCLUDES */
+
+#if CYGINT_ISO_CTYPE
+# ifdef CYGBLD_ISO_CTYPE_HEADER
+# include CYGBLD_ISO_CTYPE_HEADER
+# else
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* FUNCTION PROTOTYPES */
+
+//=========================================================================*/
+
+/* 7.3.1 Character testing functions */
+
+extern int
+isalnum( int );
+
+extern int
+isalpha( int );
+
+extern int
+iscntrl( int );
+
+extern int
+isdigit( int );
+
+extern int
+isgraph( int );
+
+extern int
+islower( int );
+
+extern int
+isprint( int );
+
+extern int
+ispunct( int );
+
+extern int
+isspace( int );
+
+extern int
+isupper( int );
+
+extern int
+isxdigit( int );
+
+/*=========================================================================*/
+
+/* 7.3.2 Character case mapping functions */
+
+extern int
+tolower( int );
+
+extern int
+toupper( int );
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+# endif
+#endif
+
+#endif /* CYGONCE_ISO_CTYPE_H multiple inclusion protection */
+
+/* EOF ctype.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/dirent.h b/cesar/ecos/packages/isoinfra/current/include/dirent.h
new file mode 100644
index 0000000000..536f075f84
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/dirent.h
@@ -0,0 +1,95 @@
+#ifndef CYGONCE_ISO_DIRENT_H
+#define CYGONCE_ISO_DIRENT_H
+/*========================================================================
+//
+// dirent.h
+//
+// POSIX file control functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors:
+// Date: 2000-06-26
+// Purpose: This file provides the macros, types and functions
+// for directory operations required by POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <dirent.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* INCLUDES */
+
+#include <pkgconf/isoinfra.h>
+
+#include <sys/types.h>
+#include <limits.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if CYGINT_ISO_DIRENT
+#ifdef CYGBLD_ISO_DIRENT_HEADER
+# include CYGBLD_ISO_DIRENT_HEADER
+#endif
+
+/* PROTOTYPES */
+
+extern DIR *opendir( const char *dirname );
+
+extern struct dirent *readdir( DIR *dirp );
+
+extern int readdir_r( DIR *dirp, struct dirent *entry, struct dirent **result );
+
+extern void rewinddir( DIR *dirp );
+
+extern int closedir( DIR *dirp );
+
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* CYGONCE_ISO_DIRENT_H multiple inclusion protection */
+
+/* EOF dirent.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/dlfcn.h b/cesar/ecos/packages/isoinfra/current/include/dlfcn.h
new file mode 100644
index 0000000000..976fc10714
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/dlfcn.h
@@ -0,0 +1,65 @@
+#ifndef CYGONCE_ISO_DLFCN_H
+#define CYGONCE_ISO_DLFCN_H
+/*========================================================================
+//
+// dlfcn.h
+//
+// Dynamic load functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors:
+// Date: 2000-12-13
+// Purpose: This file provides the dynamic loading macros, types and functions
+// required by POSIX 1003.1.
+// Usage: #include <dlfcn.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+#ifdef CYGBLD_ISO_DLFCN_HEADER
+# include CYGBLD_ISO_DLFCN_HEADER
+#endif
+
+//======================================================================
+#endif /* CYGONCE_ISO_DLFCN_H multiple inclusion protection */
+/* EOF dlfcn.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/errno.h b/cesar/ecos/packages/isoinfra/current/include/errno.h
new file mode 100644
index 0000000000..d8f89057ca
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/errno.h
@@ -0,0 +1,76 @@
+#ifndef CYGONCE_ISO_ERRNO_H
+#define CYGONCE_ISO_ERRNO_H
+/*========================================================================
+//
+// errno.h
+//
+// ISO errno variable and constants
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-07
+// Purpose: This file provides the errno variable (or more strictly
+// expression) and the E* error codes required by ISO C
+// and POSIX 1003.1
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <errno.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+/* INCLUDES */
+
+#if CYGINT_ISO_ERRNO_CODES
+# include CYGBLD_ISO_ERRNO_CODES_HEADER
+#endif
+
+#if CYGINT_ISO_ERRNO
+# include CYGBLD_ISO_ERRNO_HEADER
+#endif
+
+#endif /* CYGONCE_ISO_ERRNO_H multiple inclusion protection */
+
+/* EOF errno.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/fcntl.h b/cesar/ecos/packages/isoinfra/current/include/fcntl.h
new file mode 100644
index 0000000000..92a9280685
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/fcntl.h
@@ -0,0 +1,169 @@
+#ifndef CYGONCE_ISO_FCNTL_H
+#define CYGONCE_ISO_FCNTL_H
+/*========================================================================
+//
+// fcntl.h
+//
+// POSIX file control functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-05-05
+// Purpose: This file provides the macros, types and functions
+// for file control required by POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <fcntl.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+/* INCLUDES */
+
+#ifdef CYGBLD_ISO_OFLAG_HEADER
+# include CYGBLD_ISO_OFLAG_HEADER
+#else
+
+/* File access modes used for open() and fnctl() */
+#define O_RDONLY (1<<0) /* Open for reading only */
+#define O_WRONLY (1<<1) /* Open for writing only */
+#define O_RDWR (O_RDONLY|O_WRONLY) /* Open for reading and writing */
+
+/* File access mode mask */
+#define O_ACCMODE (O_RDONLY|O_RDWR|O_WRONLY)
+
+/* open() mode flags */
+
+#define O_CREAT (1<<3) /* Create file it it does not exist */
+#define O_EXCL (1<<4) /* Exclusive use */
+#define O_NOCTTY (1<<5) /* Do not assign a controlling terminal */
+#define O_TRUNC (1<<6) /* Truncate */
+
+/* File status flags used for open() and fcntl() */
+#define O_APPEND (1<<7) /* Set append mode */
+#define O_DSYNC (1<<8) /* Synchronized I/O data integrity writes */
+#define O_NONBLOCK (1<<9) /* No delay */
+#define O_RSYNC (1<<10) /* Synchronized read I/O */
+#define O_SYNC (1<<11) /* Synchronized I/O file integrity writes */
+
+#endif /* ifndef CYGBLD_ISO_OFLAG_HEADER */
+
+
+#if CYGINT_ISO_FCNTL
+# ifdef CYGBLD_ISO_FCNTL_HEADER
+# include CYGBLD_ISO_FCNTL_HEADER
+# else
+
+/* fcntl() command values */
+
+#define F_DUPFD (1<<0) /* Duplicate file descriptor */
+#define F_GETFD (1<<1) /* Get file descriptor flags */
+#define F_SETFD (1<<2) /* Set file descriptor flags */
+#define F_GETFL (1<<3) /* Get file status flags */
+#define F_SETFL (1<<4) /* Set file status flags */
+#define F_GETLK (1<<5) /* Get record locking information */
+#define F_SETLK (1<<6) /* Set record locking information */
+#define F_SETLKW (1<<7) /* Set record locking info; wait if blocked */
+
+/* fd flags */
+#define FD_CLOEXEC (1<<0) /* Close fd on exec */
+
+/* Lock types */
+
+#define F_RDLCK (1<<0) /* Shared or read lock */
+#define F_UNLCK (1<<1) /* Unlock */
+#define F_WRLCK (1<<2) /* Exclusive or write lock */
+
+#include <sys/types.h> /* off_t, pid_t */
+
+struct flock {
+ short l_type; /* F_RDLCK, F_WRLCK, F_UNLCK */
+ short l_whence; /* Flag for starting offset */
+ off_t l_start; /* Relative offset in bytes */
+ off_t l_len; /* Size; if 0, then until EOF */
+ pid_t l_pid; /* Process ID of the process holding the lock,
+ * returned with F_GETLK. */
+};
+
+#ifdef __cplusplus
+extern "C"
+#else
+extern
+#endif
+
+int
+fcntl( int /* fildes */, int /* cmd */, ... );
+
+# endif /* ifndef CYGBLD_ISO_FCNTL_HEADER */
+#endif /* if CYGINT_ISO_FCNTL */
+
+
+#if CYGINT_ISO_OPEN
+# ifdef CYGBLD_ISO_OPEN_HEADER
+# include CYGBLD_ISO_OPEN_HEADER
+# else
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <sys/types.h> /* mode_t */
+
+extern int
+open( const char * /* path */, int /* oflag */, ... );
+
+extern int
+creat( const char * /* path */, mode_t /* mode */ );
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+# endif /* ifndef CYGBLD_ISO_OPEN_HEADER */
+#endif /* if CYGINT_ISO_OPEN */
+
+#endif /* CYGONCE_ISO_FCNTL_H multiple inclusion protection */
+
+/* EOF fcntl.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/float.h b/cesar/ecos/packages/isoinfra/current/include/float.h
new file mode 100644
index 0000000000..d50389d0b3
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/float.h
@@ -0,0 +1,67 @@
+/* Do not define CYGONCE_ISO_FLOAT_H. It is not appropriate for this file */
+/*========================================================================
+//
+// float.h
+//
+// ISO standard float-point properties
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the floating-point related properties
+// required by ISO C
+// Description: This file is really provided by the compiler, although in
+// due course we may override things here.
+//
+// The main purpose of this file is as a comment to the FAQ
+// about where float.h lives: it is provided by the compiler,
+// which for current gcc can be found by looking in the
+// include directory in the same place as the specs file
+// which you can determine from TARGET-gcc -v,
+// e.g. arm-elf-gcc -v
+// Usage: #include <float.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+#include_next <float.h>
+
+/* EOF float.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/limits.h b/cesar/ecos/packages/isoinfra/current/include/limits.h
new file mode 100644
index 0000000000..e428161fd0
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/limits.h
@@ -0,0 +1,225 @@
+#ifndef CYGONCE_ISO_LIMITS_H
+#define CYGONCE_ISO_LIMITS_H
+/*========================================================================
+//
+// limits.h
+//
+// ISO standard limits
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the limits properties
+// required by ISO C and POSIX 1003.1
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation), as well as
+// being partially provided by the compiler.
+//
+// Usage: #include <limits.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+/* DEFINES */
+
+/*-----------------------------------------------------------------------------
+ * Minimum values from POSIX.1 tables 2-3, 2-7 and 2-7a.
+
+ * These are the standard-mandated minimum values.
+ * These values do not vary with the implementation - they may
+ * simply be defined
+ */
+
+/* Minimum number of operations in one list I/O call. */
+#define _POSIX_AIO_LISTIO_MAX 2
+
+/* Minimal number of outstanding asynchronous I/O operations. */
+#define _POSIX_AIO_MAX 1
+
+/* Maximum length of arguments to `execve', including environment. */
+#define _POSIX_ARG_MAX 4096
+
+/* Maximum simultaneous processes per real user ID. */
+#define _POSIX_CHILD_MAX 6
+
+/* Minimal number of timer expiration overruns. */
+#define _POSIX_DELAYTIMER_MAX 32
+
+/* Maximum link count of a file. */
+#define _POSIX_LINK_MAX 8
+
+/* Size of storage required for a login name */
+#define _POSIX_LOGIN_NAME_MAX 9
+
+/* Number of bytes in a terminal canonical input queue. */
+#define _POSIX_MAX_CANON 255
+
+/* Number of bytes for which space will be
+ available in a terminal input queue. */
+#define _POSIX_MAX_INPUT 255
+
+/* Maximum number of message queues open for a process. */
+#define _POSIX_MQ_OPEN_MAX 8
+
+/* Maximum number of supported message priorities. */
+#define _POSIX_MQ_PRIO_MAX 32
+
+/* Number of bytes in a filename. */
+#define _POSIX_NAME_MAX 14
+
+/* Number of simultaneous supplementary group IDs per process. */
+#define _POSIX_NGROUPS_MAX 0
+
+/* Number of files one process can have open at once. */
+#define _POSIX_OPEN_MAX 16
+
+/* Number of bytes in a pathname. */
+#define _POSIX_PATH_MAX 255
+
+/* Number of bytes than can be written atomically to a pipe. */
+#define _POSIX_PIPE_BUF 512
+
+/* Minimal number of realtime signals reserved for the application. */
+#define _POSIX_RTSIG_MAX 8
+
+/* Number of semaphores a process can have. */
+#define _POSIX_SEM_NSEMS_MAX 256
+
+/* Maximal value of a semaphore. */
+#define _POSIX_SEM_VALUE_MAX 32767
+
+/* Number of pending realtime signals. */
+#define _POSIX_SIGQUEUE_MAX 32
+
+/* Largest value of a `ssize_t'. */
+#define _POSIX_SSIZE_MAX 32767
+
+/* Number of streams a process can have open at once. */
+#define _POSIX_STREAM_MAX 8
+
+/* Controlling the iterations of destructors for thread-specific data. */
+#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
+
+/* The number of data keys per process. */
+#define _POSIX_THREAD_KEYS_MAX 128
+
+/* The number of threads per process. */
+#define _POSIX_THREAD_THREADS_MAX 64
+
+/* Maximum number of characters in a tty name. */
+#define _POSIX_TTY_NAME_MAX 9
+
+/* Number of timer for a process. */
+#define _POSIX_TIMER_MAX 32
+
+/* Maximum length of a timezone name (element of `tzname'). */
+#define _POSIX_TZNAME_MAX 3
+
+/* Maximum clock resolution in nanoseconds. */
+#define _POSIX_CLOCKRES_MIN 20000000
+
+
+#ifdef CYGBLD_ISO_SSIZET_HEADER
+# include CYGBLD_ISO_SSIZET_HEADER
+#else
+# ifndef __STRICT_ANSI__
+# define SSIZE_MAX LONG_MAX
+# endif
+#endif
+
+/* INCLUDES */
+
+#ifdef CYGBLD_ISO_OPEN_MAX_HEADER
+# include CYGBLD_ISO_OPEN_MAX_HEADER
+#else
+# ifndef __STRICT_ANSI__
+# define OPEN_MAX _POSIX_OPEN_MAX
+# endif
+#endif
+
+#ifdef CYGBLD_ISO_LINK_MAX_HEADER
+# include CYGBLD_ISO_LINK_MAX_HEADER
+#else
+# ifndef __STRICT_ANSI__
+# define LINK_MAX _POSIX_LINK_MAX
+# endif
+#endif
+
+#ifdef CYGBLD_ISO_NAME_MAX_HEADER
+# include CYGBLD_ISO_NAME_MAX_HEADER
+#else
+# ifndef __STRICT_ANSI__
+# define NAME_MAX _POSIX_NAME_MAX
+# endif
+#endif
+
+#ifdef CYGBLD_ISO_PATH_MAX_HEADER
+# include CYGBLD_ISO_PATH_MAX_HEADER
+#else
+# ifndef __STRICT_ANSI__
+# define PATH_MAX _POSIX_PATH_MAX
+# endif
+#endif
+
+#if CYGINT_ISO_POSIX_LIMITS
+# ifdef CYGBLD_ISO_POSIX_LIMITS_HEADER
+# include CYGBLD_ISO_POSIX_LIMITS_HEADER
+# endif
+#endif
+
+#endif /* CYGONCE_ISO_LIMITS_H multiple inclusion protection */
+ /* Yes it must be ended here! */
+
+/* When using a crosscompiler targeting linux, the next limits.h file
+ in the include sequence may be the glibc header - which breaks our
+ world. So skip it by defining _LIBC_LIMITS_H_ */
+#define _LIBC_LIMITS_H_
+
+/* Secondly only include if we haven't already been included by it. */
+#ifndef _GCC_LIMITS_H_
+# include_next <limits.h>
+#endif
+
+/* EOF limits.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/locale.h b/cesar/ecos/packages/isoinfra/current/include/locale.h
new file mode 100644
index 0000000000..68b6897db0
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/locale.h
@@ -0,0 +1,148 @@
+#ifndef CYGONCE_ISO_LOCALE_H
+#define CYGONCE_ISO_LOCALE_H
+/*========================================================================
+//
+// locale.h
+//
+// ISO locale functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the locale functions required by
+// ISO C and POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <locale.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+/* INCLUDES */
+
+/* This is the "standard" way to get NULL from stddef.h,
+ * which is the canonical location of the definitions.
+ */
+#define __need_NULL
+#include <stddef.h>
+
+#if CYGINT_ISO_LOCALE
+# ifdef CYGBLD_ISO_LOCALE_HEADER
+# include CYGBLD_ISO_LOCALE_HEADER
+# else
+
+/* TYPE DEFINITIONS */
+
+/* struct lconv contains information about numeric and monetary numbers
+ * and is described in the ISO C standard section 7.4 */
+
+struct lconv {
+
+ /* the following affect formatted NONMONETARY QUANTITIES only */
+ char *decimal_point; /* decimal point */
+ char *thousands_sep; /* separates groups of digits before decimal
+ point */
+ char *grouping; /* string whose elements indicate the size */
+ /* of each group of digits */
+
+ /* the following affect formatted MONETARY QUANTITIES only */
+ char *int_curr_symbol; /* international curreny symbol */
+ char *currency_symbol; /* local currency symbol */
+ char *mon_decimal_point; /* decimal point */
+ char *mon_thousands_sep; /* separator for groups of digits
+ before the decimal point */
+ char *mon_grouping; /* string whose elements indicate the size
+ of each group of digits */
+ char *positive_sign; /* string to indicate zero or positive value */
+ char *negative_sign; /* string to indicate negative value */
+ char int_frac_digits; /* number of digits after decimal point for
+ internationally formatted monetary nums */
+ char frac_digits; /* number of digits after decimal point for
+ formatted monetary nums */
+ char p_cs_precedes; /* 1 if currency_symbol precedes non-negative
+ monetary quantity. 0 if succeeds */
+ char p_sep_by_space; /* 1 if currency_symbol separated from value
+ of non-negative monetary quantity by space.
+ Otherwise 0. */
+ char n_cs_precedes; /* 1 if currency_symbol precedes negative
+ monetary quantity. 0 if succeeds */
+ char n_sep_by_space; /* 1 if currency_symbol separated from value
+ of negative monetary quantity by space.
+ Otherwise 0. */
+ char p_sign_posn; /* set according to position of positive_sign */
+ char n_sign_posn; /* set according to position of negative_sign */
+};
+
+/* CONSTANTS */
+
+#define LC_COLLATE (1<<0)
+#define LC_CTYPE (1<<1)
+#define LC_MONETARY (1<<2)
+#define LC_NUMERIC (1<<3)
+#define LC_TIME (1<<4)
+#define LC_ALL (LC_COLLATE|LC_CTYPE|LC_MONETARY|LC_NUMERIC|LC_TIME)
+
+/* FUNCTION PROTOTYPES */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern char *
+setlocale( int /* category */, const char * /* locale */ );
+
+extern struct lconv *
+localeconv( void );
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+# endif /* #elif !defined(CYGBLD_ISO_LOCALE_HEADER) */
+#endif /* CYGINT_ISO_LOCALE */
+
+#endif /* CYGONCE_ISO_LOCALE_H multiple inclusion protection */
+
+/* EOF locale.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/mqueue.h b/cesar/ecos/packages/isoinfra/current/include/mqueue.h
new file mode 100644
index 0000000000..8d66928cb9
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/mqueue.h
@@ -0,0 +1,149 @@
+#ifndef CYGONCE_ISO_MQUEUE_H
+#define CYGONCE_ISO_MQUEUE_H
+/*========================================================================
+//
+// mqueue.h
+//
+// POSIX message queue functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-05-05
+// Purpose: This file provides the macros, types and functions
+// for message queues required by POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <mqueue.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+#include <pkgconf/kernel.h> /* CYGFUN_KERNEL_THREADS_TIMER */
+
+/* INCLUDES */
+
+#ifdef _POSIX_MESSAGE_PASSING
+# ifdef CYGBLD_ISO_MQUEUE_HEADER
+# include CYGBLD_ISO_MQUEUE_HEADER
+# else
+
+#include <sys/types.h> /* size_t and ssize_t */
+
+/* TYPES */
+
+struct mq_attr {
+ long mq_flags; /* mqueue flags */
+ long mq_maxmsg; /* max number of messages */
+ long mq_msgsize; /* max message size */
+ long mq_curmsgs; /* number of messages currently queued */
+};
+
+typedef void *mqd_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* FUNCTIONS */
+
+extern mqd_t
+mq_open( const char * /* name */, int /* oflag */, ... );
+
+extern int
+mq_close( mqd_t /* mqdes */ );
+
+extern int
+mq_unlink( const char * /* name */ );
+
+extern int
+mq_send( mqd_t /* mqdes */, const char * /* msg_ptr */, size_t /* msg_len */,
+ unsigned int /* msg_prio */ );
+
+extern ssize_t
+mq_receive( mqd_t /* mqdes */, char * /* msg_ptr */, size_t /* msg_len */,
+ unsigned int * /* msg_prio */ );
+
+#ifdef _POSIX_REALTIME_SIGNALS
+
+struct sigevent;
+
+extern int
+mq_notify( mqd_t /* mqdes */, const struct sigevent * /* notification */ );
+#endif
+
+extern int
+mq_setattr( mqd_t /* mqdes */, const struct mq_attr * /* mqstat */,
+ struct mq_attr * /* omqstat */ );
+
+extern int
+mq_getattr( mqd_t /* mqdes */, struct mq_attr * /* mqstat */ );
+
+# ifdef CYGFUN_KERNEL_THREADS_TIMER
+/* POSIX 1003.1d Draft functions - FIXME: should be conditionalized */
+
+struct timespec; /* forward declaration */
+
+extern int
+mq_timedsend( mqd_t /* mqdes */, const char * /* msg_ptr */,
+ size_t /* msg_len */, unsigned int /* msg_prio */,
+ const struct timespec * /* abs_timeout */ );
+
+extern ssize_t
+mq_timedreceive( mqd_t /* mqdes */, char * /* msg_ptr */,
+ size_t /* msg_len */, unsigned int * /* msg_prio */,
+ const struct timespec * /* abs_timeout */ );
+# endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+
+# endif /* ifndef CYGBLD_ISO_MQUEUE_HEADER */
+#endif /* ifdef _POSIX_MESSAGE_PASSING */
+
+
+#endif /* CYGONCE_ISO_MQUEUE_H multiple inclusion protection */
+
+/* EOF mqueue.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/netdb.h b/cesar/ecos/packages/isoinfra/current/include/netdb.h
new file mode 100644
index 0000000000..d7dc6e281e
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/netdb.h
@@ -0,0 +1,107 @@
+#ifndef CYGONCE_ISO_NETDB_H
+#define CYGONCE_ISO_NETDB_H
+/*==========================================================================
+//
+// netdb.h
+//
+// Network database functions
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov,jlarmour
+// Contributors:
+// Date: 2001-09-28
+// Purpose: Provides network database types and function API.
+// Description: Much of the real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <netdb.h>
+//
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================*/
+
+#include <pkgconf/isoinfra.h>
+
+#ifdef CYGINT_ISO_DNS
+# ifdef CYGBLD_ISO_DNS_HEADER
+# include CYGBLD_ISO_DNS_HEADER
+# endif
+#else
+
+/* Provide dummy entries so that legacy code that relies on the presence
+ of these types/functions still works. */
+
+/* Host name / IP mapping fallback when not using a real DNS implementation */
+struct hostent {
+ char *h_name; /* official name of host */
+ char **h_aliases; /* alias list */
+ int h_addrtype; /* host address type */
+ int h_length; /* length of address */
+ char **h_addr_list; /* list of addresses */
+};
+#define h_addr h_addr_list[0] /* for backward compatibility */
+
+static inline struct hostent *
+gethostbyname( const char *__host )
+{
+ return NULL;
+}
+
+static inline struct hostent *
+gethostbyaddr( const char * __addr, int __len, int __type )
+{
+ return NULL;
+}
+
+#endif /* ifdef CYGINT_ISO_DNS */
+
+#ifdef CYGINT_ISO_NETDB_PROTO
+# ifdef CYGBLD_ISO_NETDB_PROTO_HEADER
+# include CYGBLD_ISO_NETDB_PROTO_HEADER
+# endif
+#endif
+
+#ifdef CYGINT_ISO_NETDB_SERV
+# ifdef CYGBLD_ISO_NETDB_SERV_HEADER
+# include CYGBLD_ISO_NETDB_SERV_HEADER
+# endif
+#endif
+
+#endif /* CYGONCE_ISO_NETDB_H multiple inclusion protection */
+
+/* EOF netdb.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/pthread.h b/cesar/ecos/packages/isoinfra/current/include/pthread.h
new file mode 100644
index 0000000000..be4176dc97
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/pthread.h
@@ -0,0 +1,79 @@
+#ifndef CYGONCE_ISO_PTHREAD_H
+#define CYGONCE_ISO_PTHREAD_H
+/*========================================================================
+//
+// pthread.h
+//
+// POSIX pthread functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the macros, types and functions
+// for pthreads required by POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <pthread.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+/* INCLUDES */
+
+#ifdef CYGINT_ISO_PTHREAD_IMPL
+# ifdef CYGBLD_ISO_PTHREAD_IMPL_HEADER
+# include CYGBLD_ISO_PTHREAD_IMPL_HEADER
+# endif
+#endif
+
+#ifdef CYGINT_ISO_PTHREAD_MUTEX
+# ifdef CYGBLD_ISO_PTHREAD_MUTEX_HEADER
+# include CYGBLD_ISO_PTHREAD_MUTEX_HEADER
+# endif
+#endif
+
+#endif /* CYGONCE_ISO_PTHREAD_H multiple inclusion protection */
+
+/* EOF pthread.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/sched.h b/cesar/ecos/packages/isoinfra/current/include/sched.h
new file mode 100644
index 0000000000..9d4ecf4748
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/sched.h
@@ -0,0 +1,125 @@
+#ifndef CYGONCE_ISO_SCHED_H
+#define CYGONCE_ISO_SCHED_H
+/*========================================================================
+//
+// sched.h
+//
+// POSIX scheduler functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the scheduler macros, types and functions
+// required by POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <sched.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+/* INCLUDES */
+
+#include <time.h>
+
+#if CYGINT_ISO_SCHED_IMPL
+# ifdef CYGBLD_ISO_SCHED_IMPL_HEADER
+# include CYGBLD_ISO_SCHED_IMPL_HEADER
+# else
+
+//-----------------------------------------------------------------------------
+// Scheduling Policys
+
+#define SCHED_OTHER 1
+#define SCHED_FIFO 2
+#define SCHED_RR 3
+
+//-----------------------------------------------------------------------------
+//Process scheduling functions.
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Set scheduling parameters for given process.
+extern int sched_setparam (pid_t pid, const struct sched_param *param);
+
+// Get scheduling parameters for given process.
+extern int sched_getparam (pid_t pid, struct sched_param *param);
+
+// Set scheduling policy and/or parameters for given process.
+extern int sched_setscheduler (pid_t pid,
+ int policy,
+ const struct sched_param *param);
+
+// Get scheduling policy for given process.
+extern int sched_getscheduler (pid_t pid);
+
+// Force current thread to relinquish the processor.
+extern int sched_yield (void);
+
+//-----------------------------------------------------------------------------
+// Scheduler parameter limits.
+
+// Get maximum priority value for a policy.
+extern int sched_get_priority_max (int policy);
+
+// Get minimum priority value for a policy.
+extern int sched_get_priority_min (int policy);
+
+// Get the SCHED_RR interval for the given process.
+extern int sched_rr_get_interval (pid_t pid, struct timespec *t);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif
+
+#endif /* if CYGINT_ISO_SCHED_IMPL */
+
+#endif /* CYGONCE_ISO_SCHED_H multiple inclusion protection */
+
+/* EOF sched.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/semaphore.h b/cesar/ecos/packages/isoinfra/current/include/semaphore.h
new file mode 100644
index 0000000000..dc7dade3fa
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/semaphore.h
@@ -0,0 +1,73 @@
+#ifndef CYGONCE_ISO_SEMAPHORE_H
+#define CYGONCE_ISO_SEMAPHORE_H
+/*========================================================================
+//
+// semaphore.h
+//
+// POSIX semaphore functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the semaphor macros, types and functions
+// required by POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <semaphore.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+/* INCLUDES */
+
+#ifdef _POSIX_SEMAPHORES
+# ifdef CYGBLD_ISO_SEMAPHORES_HEADER
+# include CYGBLD_ISO_SEMAPHORES_HEADER
+# endif
+#endif
+
+#endif /* CYGONCE_ISO_SEMAPHORE_H multiple inclusion protection */
+
+/* EOF semaphore.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/setjmp.h b/cesar/ecos/packages/isoinfra/current/include/setjmp.h
new file mode 100644
index 0000000000..10a84dc46d
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/setjmp.h
@@ -0,0 +1,75 @@
+#ifndef CYGONCE_ISO_SETJMP_H
+#define CYGONCE_ISO_SETJMP_H
+/*========================================================================
+//
+// setjmp.h
+//
+// ISO non-local jump functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the setjmp macros, types and functions
+// required by ISO C and POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <setjmp.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+/* INCLUDES */
+
+#if CYGINT_ISO_SETJMP
+# include CYGBLD_ISO_SETJMP_HEADER
+#endif
+
+#if CYGINT_ISO_SIGSETJMP
+# include CYGBLD_ISO_SIGSETJMP_HEADER
+#endif
+
+#endif /* CYGONCE_ISO_SETJMP_H multiple inclusion protection */
+
+/* EOF setjmp.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/signal.h b/cesar/ecos/packages/isoinfra/current/include/signal.h
new file mode 100644
index 0000000000..c71ef63b08
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/signal.h
@@ -0,0 +1,76 @@
+#ifndef CYGONCE_ISO_SIGNAL_H
+#define CYGONCE_ISO_SIGNAL_H
+/*========================================================================
+//
+// signal.h
+//
+// ISO signal functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the signal macros, types and functions
+// required by ISO C and POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <signal.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+/* INCLUDES */
+
+#if CYGINT_ISO_SIGNAL_NUMBERS
+# include CYGBLD_ISO_SIGNAL_NUMBERS_HEADER
+#endif
+
+#if CYGINT_ISO_SIGNAL_IMPL
+# include CYGBLD_ISO_SIGNAL_IMPL_HEADER
+#endif
+
+
+#endif /* CYGONCE_ISO_SIGNAL_H multiple inclusion protection */
+
+/* EOF signal.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/stdarg.h b/cesar/ecos/packages/isoinfra/current/include/stdarg.h
new file mode 100644
index 0000000000..fdcaa458c7
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/stdarg.h
@@ -0,0 +1,67 @@
+/* Do not define CYGONCE_ISO_STDARG_H. It is not appropriate for this file */
+/*========================================================================
+//
+// stdarg.h
+//
+// ISO standard variable argument functionality
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the variable argument macros required
+// by ISO C
+// Description: This file is really provided by the compiler, although in
+// due course we may override things here.
+//
+// The main purpose of this file is as a comment to the FAQ
+// about where stdarg.h lives: it is provided by the compiler,
+// which for current gcc can be found by looking in the
+// include directory in the same place as the specs file
+// which you can determine from TARGET-gcc -v,
+// e.g. arm-elf-gcc -v
+// Usage: #include <stdarg.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+#include_next <stdarg.h>
+
+/* EOF stdarg.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/stddef.h b/cesar/ecos/packages/isoinfra/current/include/stddef.h
new file mode 100644
index 0000000000..e44a3d7853
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/stddef.h
@@ -0,0 +1,66 @@
+/* Do not define CYGONCE_ISO_STDDEF_H. It is not appropriate for this file */
+/*========================================================================
+//
+// stddef.h
+//
+// ISO standard defines
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the standard defines required by ISO C
+// Description: This file is really provided by the compiler, although in
+// due course we may override things here.
+//
+// The main purpose of this file is as a comment to the FAQ
+// about where stddef.h lives: it is provided by the compiler,
+// which for current gcc can be found by looking in the
+// include directory in the same place as the specs file
+// which you can determine from TARGET-gcc -v,
+// e.g. arm-elf-gcc -v
+// Usage: #include <stddef.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+#include_next <stddef.h>
+
+/* EOF stddef.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/stdint.h b/cesar/ecos/packages/isoinfra/current/include/stdint.h
new file mode 100644
index 0000000000..8db6c0bcb7
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/stdint.h
@@ -0,0 +1,48 @@
+#ifndef CYGONCE_ISO_STDINT_H
+#define CYGONCE_ISO_STDINT_H
+
+#include <cyg/infra/cyg_type.h>
+
+/* Exact integral types. */
+/* Signed. */
+typedef cyg_int8 int8_t;
+typedef cyg_int16 int16_t;
+typedef cyg_int32 int32_t;
+typedef cyg_int64 int64_t;
+/* Unsigned. */
+typedef cyg_uint8 uint8_t;
+typedef cyg_uint16 uint16_t;
+typedef cyg_uint32 uint32_t;
+typedef cyg_uint64 uint64_t;
+;
+/* Small types. */
+/* Signed. */
+typedef cyg_int8 int_least8_t;
+typedef cyg_int16 int_least16_t;
+typedef cyg_int32 int_least32_t;
+typedef cyg_int64 int_least64_t;
+/* Unsigned. */
+typedef cyg_uint8 uint_least8_t;
+typedef cyg_uint16 uint_least16_t;
+typedef cyg_uint32 uint_least32_t;
+typedef cyg_uint64 uint_least64_t;
+
+/* Fast types. */
+/* Signed. */
+typedef cyg_count8 int_fast8_t;
+typedef cyg_count16 int_fast16_t;
+typedef cyg_count32 int_fast32_t;
+typedef cyg_count64 int_fast64_t;
+/* Unsigned. */
+typedef cyg_ucount8 uint_fast8_t;
+typedef cyg_ucount16 uint_fast16_t;
+typedef cyg_ucount32 uint_fast32_t;
+typedef cyg_ucount64 uint_fast64_t;
+
+/* Largest integral types. */
+typedef cyg_int64 intmax_t;
+typedef cyg_uint64 uintmax_t;
+
+
+
+#endif /* EOF stdint.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/stdio.h b/cesar/ecos/packages/isoinfra/current/include/stdio.h
new file mode 100644
index 0000000000..bf9368ecf1
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/stdio.h
@@ -0,0 +1,156 @@
+#ifndef CYGONCE_ISO_STDIO_H
+#define CYGONCE_ISO_STDIO_H
+/*========================================================================
+//
+// stdio.h
+//
+// ISO standard I/O functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the stdio functions required by
+// ISO C and POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <stdio.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+/* INCLUDES */
+
+/* This is the "standard" way to get NULL and size_t from stddef.h,
+ * which is the canonical location of the definitions.
+ */
+#define __need_NULL
+#define __need_size_t
+#include <stddef.h>
+
+/* Misc functions below use varargs stuff, so pull it in from the compiler
+ * here to save duplication.
+ */
+
+#define __need___va_list
+#include <stdarg.h>
+
+#ifdef CYGINT_ISO_STDIO_FILETYPES
+# ifdef CYGBLD_ISO_STDIO_FILETYPES_HEADER
+# include CYGBLD_ISO_STDIO_FILETYPES_HEADER
+# endif
+#endif
+
+#ifdef CYGINT_ISO_STDIO_STREAMS
+# ifdef CYGBLD_ISO_STDIO_STREAMS_HEADER
+# include CYGBLD_ISO_STDIO_STREAMS_HEADER
+# endif
+#endif
+
+#ifdef CYGINT_ISO_STDIO_FILEOPS
+# ifdef CYGBLD_ISO_STDIO_FILEOPS_HEADER
+# include CYGBLD_ISO_STDIO_FILEOPS_HEADER
+# endif
+#endif
+
+#ifdef CYGINT_ISO_STDIO_FILEACCESS
+# ifdef CYGBLD_ISO_STDIO_FILEACCESS_HEADER
+# include CYGBLD_ISO_STDIO_FILEACCESS_HEADER
+# endif
+#endif
+
+#ifdef CYGINT_ISO_STDIO_FORMATTED_IO
+# ifdef CYGBLD_ISO_STDIO_FORMATTED_IO_HEADER
+# include CYGBLD_ISO_STDIO_FORMATTED_IO_HEADER
+# endif
+#endif
+
+#ifdef CYGINT_ISO_STDIO_CHAR_IO
+# ifdef CYGBLD_ISO_STDIO_CHAR_IO_HEADER
+# include CYGBLD_ISO_STDIO_CHAR_IO_HEADER
+# endif
+#endif
+
+#ifdef CYGINT_ISO_STDIO_DIRECT_IO
+# ifdef CYGBLD_ISO_STDIO_DIRECT_IO_HEADER
+# include CYGBLD_ISO_STDIO_DIRECT_IO_HEADER
+# endif
+#endif
+
+#ifdef CYGINT_ISO_STDIO_FILEPOS
+# ifdef CYGBLD_ISO_STDIO_FILEPOS_HEADER
+# include CYGBLD_ISO_STDIO_FILEPOS_HEADER
+# endif
+#endif
+
+#ifdef CYGINT_ISO_STDIO_ERROR
+# ifdef CYGBLD_ISO_STDIO_ERROR_HEADER
+# include CYGBLD_ISO_STDIO_ERROR_HEADER
+# endif
+#endif
+
+#ifdef CYGINT_ISO_STDIO_POSIX_FDFUNCS
+# ifdef CYGBLD_ISO_STDIO_POSIX_FDFUNCS_HEADER
+# include CYGBLD_ISO_STDIO_POSIX_FDFUNCS_HEADER
+# else
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+extern int
+fileno( FILE *__stream ) __THROW;
+
+extern FILE *
+fdopen( int __fildes, const char *__type ) __THROW;
+
+# ifdef __cplusplus
+} // extern "C"
+# endif
+# endif
+#endif
+
+#endif /* CYGONCE_ISO_STDIO_H multiple inclusion protection */
+
+/* EOF stdio.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/stdlib.h b/cesar/ecos/packages/isoinfra/current/include/stdlib.h
new file mode 100644
index 0000000000..e17f9200e3
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/stdlib.h
@@ -0,0 +1,508 @@
+#ifndef CYGONCE_ISO_STDLIB_H
+#define CYGONCE_ISO_STDLIB_H
+/*========================================================================
+//
+// stdlib.h
+//
+// ISO standard library functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the stdlib functions required by
+// ISO C and POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <stdlib.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+/* INCLUDES */
+
+/* This is the "standard" way to get NULL, wchar_t and size_t from stddef.h,
+ * which is the canonical location of the definitions.
+ */
+#define __need_NULL
+#define __need_size_t
+#define __need_wchar_t
+#include <stddef.h>
+
+#include <cyg/infra/cyg_type.h> /* For CYGBLD_ATTRIB_NORET etc. */
+
+/*==========================================================================*/
+
+#if CYGINT_ISO_STDLIB_STRCONV
+# ifdef CYGBLD_ISO_STDLIB_STRCONV_HEADER
+# include CYGBLD_ISO_STDLIB_STRCONV_HEADER
+# else
+
+/* ISO C 7.10.1 - String conversion functions */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int
+atoi( const char * /* int_str */ );
+
+extern long
+atol( const char * /* long_str */ );
+
+extern long
+strtol( const char * /* long_str */, char ** /* endptr */,
+ int /* base */ );
+
+extern unsigned long
+strtoul( const char * /* ulong_str */, char ** /* endptr */,
+ int /* base */ );
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+
+# endif
+#endif
+
+/*==========================================================================*/
+
+#if CYGINT_ISO_STDLIB_STRCONV_FLOAT
+# ifdef CYGBLD_ISO_STDLIB_STRCONV_FLOAT_HEADER
+# include CYGBLD_ISO_STDLIB_STRCONV_FLOAT_HEADER
+# else
+
+/* ISO C 7.10.1 - String conversion functions */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern double
+atof( const char * /* double_str */ );
+
+extern double
+strtod( const char * /* double_str */, char ** /* endptr */ );
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+
+# endif
+#endif
+
+/*==========================================================================*/
+
+#if CYGINT_ISO_RAND
+# ifdef CYGBLD_ISO_RAND_HEADER
+# include CYGBLD_ISO_RAND_HEADER
+# else
+
+/* ISO C 7.10.2 - Pseudo-random sequence generation functions */
+
+/* Maximum value returned by rand(). */
+#define RAND_MAX 2147483647
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int
+rand( void );
+
+extern void
+srand( unsigned int /* seed */ );
+
+/* POSIX 1003.1 section 8.3.8 rand_r() */
+extern int
+rand_r( unsigned int * /* seed */ );
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+# endif
+#endif
+
+/*==========================================================================*/
+
+#if CYGINT_ISO_MALLOC
+# ifdef CYGBLD_ISO_MALLOC_HEADER
+# include CYGBLD_ISO_MALLOC_HEADER
+# else
+
+/* ISO C 7.10.3 - Memory management functions */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void *
+calloc( size_t /* num_objects */, size_t /* object_size */ );
+
+extern void
+free( void * /* ptr */ );
+
+extern void *
+malloc( size_t /* size */ );
+
+extern void *
+realloc( void * /* ptr */, size_t /* size */ );
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+# endif
+#endif
+
+/*==========================================================================*/
+
+#if CYGINT_ISO_MALLINFO
+# ifdef CYGBLD_ISO_MALLINFO_HEADER
+# include CYGBLD_ISO_MALLINFO_HEADER
+# else
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* SVID2/XPG mallinfo structure */
+
+struct mallinfo {
+ int arena; /* total size of memory arena */
+ int ordblks; /* number of ordinary memory blocks */
+ int smblks; /* number of small memory blocks */
+ int hblks; /* number of mmapped regions */
+ int hblkhd; /* total space in mmapped regions */
+ int usmblks; /* space used by small memory blocks */
+ int fsmblks; /* space available for small memory blocks */
+ int uordblks; /* space used by ordinary memory blocks */
+ int fordblks; /* space free for ordinary blocks */
+ int keepcost; /* top-most, releasable (via malloc_trim) space */
+ int maxfree; /* (NON-STANDARD EXTENSION) size of largest free block */
+};
+
+extern struct mallinfo
+mallinfo( void );
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+# endif
+#endif
+
+/*==========================================================================*/
+
+#if CYGINT_ISO_EXIT
+# ifdef CYGBLD_ISO_EXIT_HEADER
+# include CYGBLD_ISO_EXIT_HEADER
+# else
+
+/* ISO C 7.10.4 - Communication with the environment */
+
+/* codes to pass to exit() */
+
+/* Successful exit status - must be zero (POSIX 1003.1 8.1) */
+#define EXIT_SUCCESS 0
+/* Failing exit status - must be non-zero (POSIX 1003.1 8.1) */
+#define EXIT_FAILURE 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Type of function used by atexit() */
+typedef void (*__atexit_fn_t)( void );
+
+extern void
+abort( void ) CYGBLD_ATTRIB_NORET;
+
+extern int
+atexit( __atexit_fn_t /* func_to_register */ );
+
+extern void
+exit( int /* status */ ) CYGBLD_ATTRIB_NORET;
+
+/* POSIX 1003.1 section 3.2.2 "Terminate a process" */
+
+//@@@ FIXME unistd.h
+extern void
+_exit( int /* status */ ) CYGBLD_ATTRIB_NORET;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+# endif
+#endif
+
+/*==========================================================================*/
+
+#if CYGINT_ISO_STDLIB_ENVIRON
+# ifdef CYGBLD_ISO_STDLIB_ENVIRON_HEADER
+# include CYGBLD_ISO_STDLIB_ENVIRON_HEADER
+# else
+
+/* ISO C 7.10.4 - Communication with the environment */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _POSIX_SOURCE
+
+extern char **environ; /* standard definition of environ */
+
+#endif
+
+extern char *
+getenv( const char * /* name */ );
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+# endif
+#endif
+
+/*==========================================================================*/
+
+#if CYGINT_ISO_STDLIB_SYSTEM
+# ifdef CYGBLD_ISO_STDLIB_SYSTEM_HEADER
+# include CYGBLD_ISO_STDLIB_SYSTEM_HEADER
+# else
+
+/* ISO C 7.10.4 - Communication with the environment */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int
+system( const char * /* command */ );
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+# endif
+#endif
+
+/*==========================================================================*/
+
+#if CYGINT_ISO_BSEARCH
+# ifdef CYGBLD_ISO_BSEARCH_HEADER
+# include CYGBLD_ISO_BSEARCH_HEADER
+# else
+
+/* ISO C 7.10.5 - Searching and sorting utilities */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef int (*__bsearch_comparison_fn_t)(const void * /* object1 */,
+ const void * /* object2 */);
+
+extern void *
+bsearch( const void * /* search_key */, const void * /* first_object */,
+ size_t /* num_objects */, size_t /* object_size */,
+ __bsearch_comparison_fn_t /* comparison_fn */ );
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+# endif
+#endif
+
+/*==========================================================================*/
+
+#if CYGINT_ISO_QSORT
+# ifdef CYGBLD_ISO_QSORT_HEADER
+# include CYGBLD_ISO_QSORT_HEADER
+# else
+
+/* ISO C 7.10.5 - Searching and sorting utilities */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef int (*__qsort_comparison_fn_t)(const void * /* object1 */,
+ const void * /* object2 */);
+
+extern void
+qsort( void * /* first_object */, size_t /* num_objects */,
+ size_t /* object_size */, __qsort_comparison_fn_t /* comparison_fn */ );
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+# endif
+#endif
+
+/*======================================================================*/
+
+#if CYGINT_ISO_ABS
+# ifdef CYGBLD_ISO_STDLIB_ABS_HEADER
+# include CYGBLD_ISO_STDLIB_ABS_HEADER
+# else
+
+/* TYPE DEFINITIONS */
+
+/* ISO C 7.10 and 7.10.6 - Integer Arithmetic Functions */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int
+abs( int /* val */ ) __attribute__((__const__));
+
+extern long
+labs( long /* val */ ) __attribute__((__const__));
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+# endif
+#endif
+
+/*======================================================================*/
+
+#if CYGINT_ISO_DIV
+# ifdef CYGBLD_ISO_STDLIB_DIV_HEADER
+# include CYGBLD_ISO_STDLIB_DIV_HEADER
+# else
+
+/* ISO C 7.10 and 7.10.6 - Integer Arithmetic Functions */
+
+/* return type of the div() function */
+
+typedef struct {
+ int quot; /* quotient */
+ int rem; /* remainder */
+} div_t;
+
+
+/* return type of the ldiv() function */
+
+typedef struct {
+ long quot; /* quotient */
+ long rem; /* remainder */
+} ldiv_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern div_t
+div( int /* numerator */, int /* denominator */ ) __attribute__((__const__));
+
+extern ldiv_t
+ldiv( long /* numerator */, long /* denominator */ ) __attribute__((__const__));
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+# endif
+#endif
+
+/*==========================================================================*/
+
+/* Maximum number of bytes in a multibyte character for the current locale */
+
+#ifdef CYGBLD_ISO_STDLIB_MB_CUR_MAX_HEADER
+# include CYGBLD_ISO_STDLIB_MB_CUR_MAX_HEADER
+#else
+# define MB_CUR_MAX 1
+#endif
+
+#if CYGINT_ISO_STDLIB_MULTIBYTE
+# ifdef CYGBLD_ISO_STDLIB_MULTIBYTE_HEADER
+# include CYGBLD_ISO_STDLIB_MULTIBYTE_HEADER
+# else
+
+/* ISO C 7.10.7 - Multibyte character functions */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int
+mblen( const char * /* s */, size_t /* n */ );
+
+extern int
+mbtowc( wchar_t * /* pwc */, const char * /* s */, size_t /* n */ );
+
+extern int
+wctomb( char * /* s */, wchar_t /* wchar */ );
+
+extern size_t
+mbstowcs( wchar_t * /* pwcs */, const char * /* s */, size_t /* n */ );
+
+extern size_t
+wcstombs( char * /* s */, const wchar_t * /* pwcs */, size_t /* n */ );
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+# endif
+#endif
+
+/*==========================================================================*/
+
+#endif /* CYGONCE_ISO_STDLIB_H multiple inclusion protection */
+
+/* EOF stdlib.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/string.h b/cesar/ecos/packages/isoinfra/current/include/string.h
new file mode 100644
index 0000000000..3eb8494515
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/string.h
@@ -0,0 +1,130 @@
+#ifndef CYGONCE_ISO_STRING_H
+#define CYGONCE_ISO_STRING_H
+/*========================================================================
+//
+// string.h
+//
+// ISO string functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the string macros, types and functions
+// required by ISO C and POSIX 1003.1. It may also provide
+// other compatibility functions like BSD-style string
+// functions
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <string.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+/* INCLUDES */
+
+/* This is the "standard" way to get NULL and size_t from stddef.h,
+ * which is the canonical location of the definitions.
+ */
+#define __need_NULL
+#define __need_size_t
+#include <stddef.h>
+
+#ifdef CYGINT_ISO_STRERROR
+# include CYGBLD_ISO_STRERROR_HEADER
+#endif
+
+/* memcpy() and memset() are special as they are used internally by
+ * the compiler, so they *must* exist. So if no-one claims to implement
+ * them, prototype them anyway */
+
+#ifdef CYGBLD_ISO_MEMCPY_HEADER
+# include CYGBLD_ISO_MEMCPY_HEADER
+#else
+
+extern
+# ifdef __cplusplus
+"C"
+# endif
+void *
+memcpy( void *, const void *, size_t );
+
+#endif
+
+#ifdef CYGBLD_ISO_MEMSET_HEADER
+# include CYGBLD_ISO_MEMSET_HEADER
+#else
+
+extern
+# ifdef __cplusplus
+"C"
+# endif
+void *
+memset( void *, int, size_t );
+
+#endif
+
+#ifdef CYGINT_ISO_STRTOK_R
+# include CYGBLD_ISO_STRTOK_R_HEADER
+#endif
+
+#ifdef CYGINT_ISO_STRING_LOCALE_FUNCS
+# include CYGBLD_ISO_STRING_LOCALE_FUNCS_HEADER
+#endif
+
+#ifdef CYGINT_ISO_STRING_BSD_FUNCS
+# include CYGBLD_ISO_STRING_BSD_FUNCS_HEADER
+#endif
+
+#ifdef CYGINT_ISO_STRING_MEMFUNCS
+# include CYGBLD_ISO_STRING_MEMFUNCS_HEADER
+#endif
+
+#ifdef CYGINT_ISO_STRING_STRFUNCS
+# include CYGBLD_ISO_STRING_STRFUNCS_HEADER
+#endif
+
+#endif /* CYGONCE_ISO_STRING_H multiple inclusion protection */
+
+/* EOF string.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/sys/select.h b/cesar/ecos/packages/isoinfra/current/include/sys/select.h
new file mode 100644
index 0000000000..2490dad0fa
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/sys/select.h
@@ -0,0 +1,164 @@
+/*========================================================================
+//
+// sys/select.h
+//
+// POSIX definitions for select()
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Nick Garnett
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2001-07-26
+// Purpose: This file provides the macros, types and functions
+// required by POSIX 1003.1.
+// Description: Much of the real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <sys/select.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/system.h>
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+#ifdef CYGPKG_IO_FILEIO
+ #include <pkgconf/io_fileio.h>
+ #define FD_SETSIZE CYGNUM_FILEIO_NFD
+#endif
+
+/* ------------------------------------------------------------------- */
+
+#if !defined(_POSIX_SOURCE)
+
+#ifdef CYGINT_ISO_SELECT
+# ifdef CYGBLD_ISO_SELECT_HEADER
+# include CYGBLD_ISO_SELECT_HEADER
+# else
+
+# ifndef CYGONCE_ISO_SYS_SELECT_FD_SETS
+# define CYGONCE_ISO_SYS_SELECT_FD_SETS
+
+#define NBBY 8 /* number of bits in a byte */
+
+/*
+ * Select uses bit masks of file descriptors in longs. These macros
+ * manipulate such bit fields (the filesystem macros use chars).
+ * FD_SETSIZE may be defined by the user, but the default here should
+ * be enough for most uses.
+ */
+#ifndef FD_SETSIZE
+#define FD_SETSIZE 256
+#endif
+
+typedef unsigned int fd_mask;
+#define __NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
+
+#ifndef __howmany
+#define __howmany(__x, __y) (((__x) + ((__y) - 1)) / (__y))
+#endif
+
+typedef struct fd_set {
+ fd_mask fds_bits[__howmany(FD_SETSIZE, __NFDBITS)];
+} fd_set;
+
+#define FD_SET(__n, __p) ((__p)->fds_bits[(__n)/__NFDBITS] |= (1 << ((__n) % __NFDBITS)))
+#define FD_CLR(__n, __p) ((__p)->fds_bits[(__n)/__NFDBITS] &= ~(1 << ((__n) % __NFDBITS)))
+#define FD_ISSET(__n, __p) ((__p)->fds_bits[(__n)/__NFDBITS] & (1 << ((__n) % __NFDBITS)))
+
+#define FD_COPY(__f, __t) \
+{ \
+ unsigned int _i; \
+ for( _i = 0; _i < __howmany(FD_SETSIZE, __NFDBITS) ; _i++ ) \
+ (__t)->fds_bits[_i] = (__f)->fds_bits[_i]; \
+}
+
+#define FD_ZERO(__p) \
+{ \
+ unsigned int _i; \
+ for( _i = 0; _i < __howmany(FD_SETSIZE, __NFDBITS) ; _i++ ) \
+ (__p)->fds_bits[_i] = 0; \
+}
+
+# endif /* CYGONCE_ISO_SYS_SELECT_FD_SETS */
+
+# ifndef __NEED_FD_SETS_ONLY
+
+# ifndef CYGONCE_ISO_SYS_SELECT_H
+# define CYGONCE_ISO_SYS_SELECT_H
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+struct timeval;
+extern int
+select( int /* nfd */, fd_set * /* in */, fd_set * /* out */,
+ fd_set * /* ex */, struct timeval * /* tv */ );
+
+#ifdef CYGPKG_POSIX
+# include <pkgconf/posix.h>
+# ifdef CYGPKG_POSIX_SIGNALS
+# include <signal.h>
+struct timespec;
+extern int
+pselect( int /* nfd */, fd_set * /* in */, fd_set * /* out */,
+ fd_set * /* ex */, const struct timespec * /* ts */,
+ const sigset_t * /* mask */);
+# endif
+#endif
+
+# ifdef __cplusplus
+} /* extern "C" */
+# endif
+
+# endif /* CYGONCE_ISO_SYS_SELECT_H multiple inclusion protection */
+
+# endif /* __NEED_FD_SETS_ONLY */
+
+# endif
+#endif
+
+
+#endif /* if !defined(_POSIX_SOURCE) */
+/* ------------------------------------------------------------------- */
+
+/* EOF sys/select.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/sys/stat.h b/cesar/ecos/packages/isoinfra/current/include/sys/stat.h
new file mode 100644
index 0000000000..eae88333be
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/sys/stat.h
@@ -0,0 +1,154 @@
+#ifndef CYGONCE_ISO_STAT_H
+#define CYGONCE_ISO_STAT_H
+/*========================================================================
+//
+// stat.h
+//
+// POSIX file characteristics
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-05-08
+// Purpose: This file provides the macros, types and functions
+// for file characteristics required by POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <sys/stat.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+/* INCLUDES */
+
+#ifdef CYGBLD_ISO_STAT_DEFS_HEADER
+# include CYGBLD_ISO_STAT_DEFS_HEADER
+#else
+
+#include <sys/types.h> /* ino_t, dev_t, etc. */
+#include <time.h> /* time_t */
+
+#define __stat_mode_DIR (1<<0)
+#define __stat_mode_CHR (1<<1)
+#define __stat_mode_BLK (1<<2)
+#define __stat_mode_REG (1<<3)
+#define __stat_mode_FIFO (1<<4)
+#define __stat_mode_MQ (1<<5)
+#define __stat_mode_SEM (1<<6)
+#define __stat_mode_SHM (1<<7)
+#define __stat_mode_LNK (1<<8)
+#define __stat_mode_SOCK (1<<9)
+
+#if !defined(_POSIX_C_SOURCE) || (_POSIX_C_SOURCE >= 200112L)
+#define S_IFDIR (__stat_mode_DIR)
+#define S_IFCHR (__stat_mode_CHR)
+#define S_IFBLK (__stat_mode_BLK)
+#define S_IFREG (__stat_mode_REG)
+#define S_IFIFO (__stat_mode_FIFO)
+#define S_IFLNK (__stat_mode_LNK)
+#define S_IFSOCK (__stat_mode_SOCK)
+#define S_IFMT (S_IFDIR|S_IFCHR|S_IFBLK|S_IFREG| \
+ S_IFIFO|S_IFLNK|S_IFSOCK)
+#endif
+
+#define S_ISDIR(__mode) ((__mode) & __stat_mode_DIR )
+#define S_ISCHR(__mode) ((__mode) & __stat_mode_CHR )
+#define S_ISBLK(__mode) ((__mode) & __stat_mode_BLK )
+#define S_ISREG(__mode) ((__mode) & __stat_mode_REG )
+#define S_ISFIFO(__mode) ((__mode) & __stat_mode_FIFO )
+#if !defined(_POSIX_C_SOURCE) || (_POSIX_C_SOURCE >= 200112L)
+#define S_ISLNK(__mode) ((__mode) & __stat_mode_LNK )
+#define S_ISSOCK(__mode) ((__mode) & __stat_mode_SOCK )
+#endif
+
+#define S_TYPEISMQ(__buf) ((__buf)->st_mode & __stat_mode_MQ )
+#define S_TYPEISSEM(__buf) ((__buf)->st_mode & __stat_mode_SEM )
+#define S_TYPEISSHM(__buf) ((__buf)->st_mode & __stat_mode_SHM )
+
+
+#define S_IRUSR (1<<16)
+#define S_IWUSR (1<<17)
+#define S_IXUSR (1<<18)
+#define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
+
+#define S_IRGRP (1<<19)
+#define S_IWGRP (1<<20)
+#define S_IXGRP (1<<21)
+#define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
+
+#define S_IROTH (1<<22)
+#define S_IWOTH (1<<23)
+#define S_IXOTH (1<<24)
+#define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
+
+#define S_ISUID (1<<25)
+#define S_ISGID (1<<26)
+
+
+struct stat {
+ mode_t st_mode; /* File mode */
+ ino_t st_ino; /* File serial number */
+ dev_t st_dev; /* ID of device containing file */
+ nlink_t st_nlink; /* Number of hard links */
+ uid_t st_uid; /* User ID of the file owner */
+ gid_t st_gid; /* Group ID of the file's group */
+ off_t st_size; /* File size (regular files only) */
+ time_t st_atime; /* Last access time */
+ time_t st_mtime; /* Last data modification time */
+ time_t st_ctime; /* Last file status change time */
+};
+
+#endif /* ifndef CYGBLD_ISO_STAT_DEFS_HEADER */
+
+/* PROTOTYPES */
+
+__externC int stat( const char *path, struct stat *buf );
+
+__externC int fstat( int fd, struct stat *buf );
+
+__externC int mkdir(const char *path, mode_t mode);
+
+#endif /* CYGONCE_ISO_STAT_H multiple inclusion protection */
+
+/* EOF stat.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/sys/types.h b/cesar/ecos/packages/isoinfra/current/include/sys/types.h
new file mode 100644
index 0000000000..3539e618d0
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/sys/types.h
@@ -0,0 +1,119 @@
+#ifndef CYGONCE_ISO_SYS_TYPES_H
+#define CYGONCE_ISO_SYS_TYPES_H
+/*========================================================================
+//
+// sys/types.h
+//
+// POSIX types
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Nick Garnett
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides various types required by POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <sys/types.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/system.h>
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+/* INCLUDES */
+
+/* This is the "standard" way to get size_t from stddef.h,
+ * which is the canonical location of the definition.
+ */
+#define __need_size_t
+#include <stddef.h>
+
+#ifdef CYGBLD_ISO_SSIZET_HEADER
+# include CYGBLD_ISO_SSIZET_HEADER
+#else
+typedef long ssize_t;
+#endif
+
+#ifdef CYGBLD_ISO_FSTYPES_HEADER
+# include CYGBLD_ISO_FSTYPES_HEADER
+#else
+typedef short dev_t;
+typedef unsigned int ino_t;
+typedef unsigned int mode_t;
+typedef unsigned short nlink_t;
+typedef long off_t;
+#endif
+
+#ifdef CYGBLD_ISO_SCHEDTYPES_HEADER
+# include CYGBLD_ISO_SCHEDTYPES_HEADER
+#else
+typedef unsigned short gid_t;
+typedef unsigned short uid_t;
+typedef int pid_t;
+#endif
+
+#if CYGINT_ISO_PMUTEXTYPES
+# include CYGBLD_ISO_PMUTEXTYPES_HEADER
+#endif
+
+#if CYGINT_ISO_PTHREADTYPES
+# include CYGBLD_ISO_PTHREADTYPES_HEADER
+#endif
+
+/* Include <sys/select.h> for backward compatibility for now */
+#define __NEED_FD_SETS_ONLY
+#include <sys/select.h>
+#undef __NEED_FD_SETS_ONLY
+
+#if !defined(_POSIX_SOURCE)
+# if CYGINT_ISO_BSDTYPES
+# ifdef CYGBLD_ISO_BSDTYPES_HEADER
+# include CYGBLD_ISO_BSDTYPES_HEADER
+# endif
+# endif
+#endif // !defined(_POSIX_SOURCE)
+
+#endif /* CYGONCE_ISO_SYS_TYPES_H multiple inclusion protection */
+
+/* EOF sys/types.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/sys/utsname.h b/cesar/ecos/packages/isoinfra/current/include/sys/utsname.h
new file mode 100644
index 0000000000..85be9f4842
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/sys/utsname.h
@@ -0,0 +1,69 @@
+#ifndef CYGONCE_ISO_SYS_UTSNAME_H
+#define CYGONCE_ISO_SYS_UTSNAME_H
+/*========================================================================
+//
+// sys/utsname.h
+//
+// POSIX utsname header
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the utsname struct required by POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <sys/utsname.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/system.h>
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+#ifdef CYGBLD_ISO_UTSNAME_HEADER
+# include CYGBLD_ISO_UTSNAME_HEADER
+#endif
+
+#endif /* CYGONCE_ISO_SYS_UTSNAME_H multiple inclusion protection */
+
+/* EOF sys/utsname.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/termios.h b/cesar/ecos/packages/isoinfra/current/include/termios.h
new file mode 100644
index 0000000000..0fca13c5bd
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/termios.h
@@ -0,0 +1,252 @@
+#ifndef CYGONCE_ISO_TERMIOS_H
+#define CYGONCE_ISO_TERMIOS_H
+/* ====================================================================
+//
+// termios.h
+//
+// POSIX termios
+//
+// ====================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+// ====================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-07-22
+// Purpose: POSIX termios support
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+// ==================================================================*/
+
+#include <pkgconf/isoinfra.h>
+
+#if CYGINT_ISO_TERMIOS
+# ifdef CYGBLD_ISO_TERMIOS_HEADER
+# include CYGBLD_ISO_TERMIOS_HEADER
+# else
+
+/* TYPES */
+
+typedef unsigned int tcflag_t; /* terminal flags type */
+typedef unsigned char cc_t; /* control chars type */
+typedef unsigned int speed_t; /* baud rate type */
+
+#define NCCS 16 /* May as well hard-code - ASCII isn't that configurable! */
+
+struct termios {
+ tcflag_t c_iflag; /* Input mode flags */
+ tcflag_t c_oflag; /* Output mode flags */
+ tcflag_t c_cflag; /* Control mode flags */
+ tcflag_t c_lflag; /* Local mode flags */
+ cc_t c_cc[NCCS]; /* Control characters */
+ speed_t c_ispeed; /* input speed */
+ speed_t c_ospeed; /* output speed */
+};
+
+/* CONSTANTS */
+
+/* Input mode flags */
+
+#define BRKINT (1<<0)
+#define ICRNL (1<<1)
+#define IGNBRK (1<<2)
+#define IGNCR (1<<3)
+#define IGNPAR (1<<4)
+#define INLCR (1<<5)
+#define INPCK (1<<6)
+#define ISTRIP (1<<7)
+#define IXOFF (1<<8)
+#define IXON (1<<9)
+#define PARMRK (1<<10)
+
+/* Output mode flags */
+
+#define OPOST (1<<0)
+#define ONLCR (1<<1) /* Note: This isn't POSIX */
+
+/* Control mode flags */
+
+#define CLOCAL (1<<0)
+#define CREAD (1<<1)
+#define CS5 (0)
+#define CS6 (1<<2)
+#define CS7 (1<<3)
+#define CS8 (CS6|CS7)
+#define CSIZE (CS8)
+#define CSTOPB (1<<4)
+#define HUPCL (1<<5)
+#define PARENB (1<<6)
+#define PARODD (1<<7)
+#ifndef _POSIX_SOURCE_
+# define CRTSCTS (1<<8)
+#endif
+
+/* Local mode flags */
+
+#define ECHO (1<<0)
+#define ECHOE (1<<1)
+#define ECHOK (1<<2)
+#define ECHONL (1<<3)
+#define ICANON (1<<4)
+#define IEXTEN (1<<5)
+#define ISIG (1<<6)
+#define NOFLSH (1<<7)
+#define TOSTOP (1<<8)
+
+/* Special control characters */
+
+#define VEOF 0
+#define VEOL 1
+#define VERASE 2
+#define VINTR 3
+#define VKILL 4
+#define VMIN 5
+#define VQUIT 6
+#define VSUSP 7
+#define VTIME 8
+#define VSTART 9
+#define VSTOP 10
+
+/* Baud rates */
+/* There may be tables in the implementation that rely on the
+ * values here, so only append to this table - do not insert values!
+ */
+#define B0 0
+#define B50 1
+#define B75 2
+#define B110 3
+#define B134 4
+#define B150 5
+#define B200 6
+#define B300 7
+#define B600 8
+#define B1200 9
+#define B1800 10
+#define B2400 11
+#define B3600 12
+#define B4800 13
+#define B7200 14
+#define B9600 15
+#define B14400 16
+#define B19200 17
+#define B38400 18
+#define B57600 19
+#define B115200 20
+#define B230400 21
+#define B460800 22
+#define B500000 23
+#define B576000 24
+#define B921600 25
+#define B1000000 26
+#define B1152000 27
+#define B1500000 28
+#define B2000000 29
+#define B2500000 30
+#define B3000000 31
+#define B3500000 32
+#define B4000000 33
+
+
+/* Optional actions to tcsetattr() */
+
+#define TCSANOW 0
+#define TCSADRAIN 1
+#define TCSAFLUSH 2
+
+/* Queue selectors for tcflush() */
+
+#define TCIFLUSH 0
+#define TCOFLUSH 1
+#define TCIOFLUSH 2
+
+/* Actions for tcflow() */
+
+#define TCOOFF 0
+#define TCOON 1
+#define TCIOFF 2
+#define TCION 3
+
+
+/* FUNCTIONS */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern speed_t
+cfgetospeed( const struct termios *__termios_p );
+
+extern int
+cfsetospeed( struct termios *__termios_p, speed_t __speed );
+
+extern speed_t
+cfgetispeed( const struct termios *__termios_p );
+
+extern int
+cfsetispeed( struct termios *__termios_p, speed_t __speed );
+
+extern int
+tcgetattr( int __fildes, struct termios *__termios_p );
+
+extern int
+tcsetattr( int __fildes, int __optact, const struct termios *__termios_p );
+
+extern int
+tcsendbreak( int __fildes, int __duration );
+
+extern int
+tcdrain( int __fildes );
+
+extern int
+tcflush( int __fildes, int __queue_sel );
+
+extern int
+tcflow( int __fildes, int __action );
+
+/* tcgetpgrp() and tcsetpgrp() not included in the absence of job control */
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+# endif /* ifndef CYGBLD_ISO_TERMIOS_HEADER */
+#endif /* if CYGINT_ISO_TERMIOS */
+
+
+#endif /* ifndef CYGONCE_ISO_TERMIOS_H */
+
+/* EOF termios.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/time.h b/cesar/ecos/packages/isoinfra/current/include/time.h
new file mode 100644
index 0000000000..24641eda46
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/time.h
@@ -0,0 +1,168 @@
+#ifndef CYGONCE_ISO_TIME_H
+#define CYGONCE_ISO_TIME_H
+/*========================================================================
+//
+// time.h
+//
+// ISO time functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides the time macros, types and functions
+// required by ISO C and POSIX 1003.1.
+// Description: The real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <time.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+/* INCLUDES */
+
+/* This is the "standard" way to get NULL and size_t from stddef.h,
+ * which is the canonical location of the definitions.
+ */
+#define __need_NULL
+#define __need_size_t
+#include <stddef.h>
+
+#ifdef CYGBLD_ISO_TIME_T_HEADER
+# include CYGBLD_ISO_TIME_T_HEADER
+#else
+
+/* Define time_t as per ISO C para 7.12.1
+ * It is conventionally given the meaning of seconds since the
+ * Epoch (00:00:00 GMT, 1970-01-01), but don't rely on this - always use
+ * the type opaquely
+ */
+typedef int time_t;
+# define __time_t_defined
+
+#endif
+
+#ifdef CYGBLD_ISO_CLOCK_T_HEADER
+# include CYGBLD_ISO_CLOCK_T_HEADER
+#else
+
+/* What to divide clock_t by to get seconds (para 7.12.1)
+ * According to SUS3, CLOCKS_PER_SEC must be 1 million on all
+ * XSI-conformant systems.
+ */
+# define CLOCKS_PER_SEC 1000000
+
+/* Define clock_t as per ISO C para 7.12.1 */
+
+typedef long clock_t;
+# define __clock_t_defined
+#endif
+
+#ifdef CYGBLD_ISO_STRUCTTIMEVAL_HEADER
+# include CYGBLD_ISO_STRUCTTIMEVAL_HEADER
+#else
+# ifndef _POSIX_SOURCE
+
+/*
+ * Structure returned by gettimeofday(2),
+ * and used in other calls such as select(2).
+ */
+struct timeval {
+ long tv_sec; /* seconds */
+ long tv_usec; /* and microseconds */
+};
+
+# endif /* _POSIX_SOURCE */
+#endif
+
+
+#ifdef CYGINT_ISO_POSIX_CLOCK_TYPES
+# include CYGBLD_ISO_POSIX_CLOCK_TYPES_HEADER
+#else
+
+/* Provide a default struct timespec. */
+
+struct timespec
+{
+ time_t tv_sec;
+ long tv_nsec;
+};
+#endif
+
+#ifdef CYGINT_ISO_POSIX_TIMER_TYPES
+# include CYGBLD_ISO_POSIX_TIMER_TYPES_HEADER
+#else
+
+/* Provide a default struct itimerspec. */
+struct itimerspec
+{
+ struct timespec it_interval;
+ struct timespec it_value;
+};
+
+#endif
+
+#ifdef CYGINT_ISO_C_TIME_TYPES
+# include CYGBLD_ISO_C_TIME_TYPES_HEADER
+#endif
+
+#ifdef CYGINT_ISO_POSIX_CLOCKS
+# include CYGBLD_ISO_POSIX_CLOCKS_HEADER
+#endif
+
+#ifdef CYGINT_ISO_POSIX_TIMERS
+# include CYGBLD_ISO_POSIX_TIMERS_HEADER
+#endif
+
+#ifdef CYGINT_ISO_C_CLOCK_FUNCS
+# include CYGBLD_ISO_C_CLOCK_FUNCS_HEADER
+#endif
+
+#ifdef CYGINT_ISO_TZSET
+# include CYGBLD_ISO_TZSET_HEADER
+#endif
+
+#endif /* CYGONCE_ISO_TIME_H multiple inclusion protection */
+
+/* EOF time.h */
diff --git a/cesar/ecos/packages/isoinfra/current/include/unistd.h b/cesar/ecos/packages/isoinfra/current/include/unistd.h
new file mode 100644
index 0000000000..07b18418bb
--- /dev/null
+++ b/cesar/ecos/packages/isoinfra/current/include/unistd.h
@@ -0,0 +1,277 @@
+#ifndef CYGONCE_ISO_UNISTD_H
+#define CYGONCE_ISO_UNISTD_H
+/*========================================================================
+//
+// unistd.h
+//
+// POSIX UNIX standard definitions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors:
+// Date: 2000-06-01
+// Purpose: This file provides the macros, types and functions
+// required by POSIX 1003.1.
+// Description: Much of the real contents of this file get set from the
+// configuration (set by the implementation)
+// Usage: #include <unistd.h>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/isoinfra.h> /* Configuration header */
+
+
+/* INCLUDES */
+
+#include <sys/types.h>
+
+/* This is the "standard" way to get NULL and size_t from stddef.h,
+ * which is the canonical location of the definitions.
+ */
+#define __need_NULL
+#define __need_size_t
+#include <stddef.h>
+
+
+#ifdef CYGINT_ISO_POSIX_TIMER_OPS
+# ifdef CYGBLD_ISO_POSIX_TIMER_OPS_HEADER
+# include CYGBLD_ISO_POSIX_TIMER_OPS_HEADER
+# else
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+extern unsigned int
+alarm( unsigned int /* seconds */ );
+
+extern int
+pause( void );
+
+# ifdef __cplusplus
+} /* extern "C" */
+# endif
+
+# endif
+#endif
+
+#ifdef CYGINT_ISO_POSIX_SLEEP
+# ifdef CYGBLD_ISO_POSIX_SLEEP_HEADER
+# include CYGBLD_ISO_POSIX_SLEEP_HEADER
+# else
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+unsigned int
+sleep( unsigned int /* seconds */ );
+
+# ifdef __cplusplus
+} /* extern "C" */
+# endif
+# endif
+#endif
+
+
+/* ------------------------------------------------------------------- */
+
+/* FIXME: The below was copied in verbatim by Nick, but needs to be grouped
+ by functionality and linked with interfaces as with everything else
+*/
+
+/* CONSTANTS */
+
+/* Configuration constants */
+
+#define _POSIX_VERSION 199506L
+
+/* constants for access() */
+#define R_OK 1
+#define W_OK 2
+#define X_OK 4
+#define F_OK 8
+
+/* constants for lseek */
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+#endif
+
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+
+/* Variable names for sysconf() */
+#define _SC_AIO_LISTIO_MAX 1
+#define _SC_AIO_MAX 2
+#define _SC_AIO_PRIO_DELTA_MAX 3
+#define _SC_ARG_MAX 4
+#define _SC_ASYNCHRONOUS_IO 5
+#define _SC_CHILD_MAX 6
+#define _SC_CLK_TCK 7
+#define _SC_DELAYTIMER_MAX 8
+#define _SC_FSYNC 9
+#define _SC_GETGR_R_SIZE_MAX 10
+#define _SC_GETPW_R_SIZE_MAX 11
+#define _SC_JOB_CONTROL 12
+#define _SC_LOGIN_NAME_MAX 13
+#define _SC_MAPPED_FILES 14
+#define _SC_MEMLOCK 15
+#define _SC_MEMLOCK_RANGE 16
+#define _SC_MEMORY_PROTECTION 17
+#define _SC_MESSAGE_PASSING 18
+#define _SC_MQ_OPEN_MAX 19
+#define _SC_MQ_PRIO_MAX 20
+#define _SC_NGROUPS_MAX 21
+#define _SC_OPEN_MAX 22
+#define _SC_PAGESIZE 23
+#define _SC_PRIORITIZED_IO 24
+#define _SC_PRIORITY_SCHEDULING 25
+#define _SC_REALTIME_SIGNALS 26
+#define _SC_RTSIG_MAX 27
+#define _SC_SAVED_IDS 28
+#define _SC_SEMAPHORES 29
+#define _SC_SEM_NSEMS_MAX 30
+#define _SC_SEM_VALUE_MAX 31
+#define _SC_SHARED_MEMORY_OBJECTS 32
+#define _SC_SIGQUEUE_MAX 33
+#define _SC_STREAM_MAX 34
+#define _SC_SYNCHRONIZED_IO 35
+#define _SC_THREADS 36
+#define _SC_THREAD_ATTR_STACKADDR 37
+#define _SC_THREAD_ATTR_STACKSIZE 38
+#define _SC_THREAD_DESTRUCTOR_ITERATIONS 39
+#define _SC_THREAD_KEYS_MAX 40
+#define _SC_THREAD_PRIO_INHERIT 41
+#define _SC_THREAD_PRIO_PROTECT 42
+#define _SC_THREAD_PRIORITY_SCHEDULING 43
+#define _SC_THREAD_PROCESS_SHARED 44
+#define _SC_THREAD_SAFE_FUNCTIONS 45
+#define _SC_THREAD_STACK_MIN 46
+#define _SC_THREAD_THREADS_MAX 47
+#define _SC_TIMERS 48
+#define _SC_TIMER_MAX 49
+#define _SC_TTY_NAME_MAX 50
+#define _SC_TZNAME_MAX 51
+#define _SC_VERSION 52
+
+/* Variable names for pathconf() */
+#define _PC_ASYNC_IO 1
+#define _PC_CHOWN_RESTRICTED 2
+#define _PC_LINK_MAX 3
+#define _PC_MAX_CANON 4
+#define _PC_MAX_INPUT 5
+#define _PC_NAME_MAX 6
+#define _PC_NO_TRUNC 7
+#define _PC_PATH_MAX 8
+#define _PC_PIPE_BUF 9
+#define _PC_PRIO_IO 10
+#define _PC_SYNC_IO 11
+#define _PC_VDISABLE 12
+
+
+/* Standard function prototypes */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+extern int link(const char *path1, const char *path2);
+extern int unlink(const char *path);
+extern int rmdir(const char *path);
+extern int access(const char *path, int amode);
+extern int chown(const char *path, uid_t owner, uid_t group);
+extern long pathconf(const char *path, int name);
+extern long fpathconf(int fd, int name);
+extern int pipe(int fildes[2]);
+extern int dup(int fd);
+extern int dup2(int fd,int fd2);
+extern int close(int fd);
+extern ssize_t read(int fd, void *buf, size_t nbyte);
+extern ssize_t write(int fd, const void *buf, size_t nbyte);
+extern off_t lseek(int fd, off_t offset, int whence);
+extern int fsync( int fd );
+extern int ftruncate(int fd, off_t length);
+
+extern int chdir(const char *path);
+extern char *getcwd(char *buf, size_t size);
+
+extern pid_t getpid(void);
+extern pid_t getppid(void);
+extern uid_t getuid(void);
+extern uid_t geteuid(void);
+extern uid_t getgid(void);
+extern uid_t getegid(void);
+extern int setuid(uid_t uid);
+extern int setgid(uid_t uid);
+extern int getgroups(int setsize, uid_t *list);
+extern char *getlogin(void);
+extern char *cuserid(char *s);
+extern pid_t getpgrp(void);
+extern pid_t setsid(void);
+extern int setpgid(pid_t pid, pid_t pgid);
+extern char *getenv(const char *name);
+extern char *ctermid(char *s);
+extern char *ttyname(int fd);
+extern int isatty(int fd);
+extern long sysconf(int name);
+
+extern int vfork(void);
+extern int execl(const char *path, const char *arg, ...);
+extern int execv(const char *path,char **argv);
+extern int execle(const char *path, const char *arg , ... );
+extern int execlp(const char *file, const char * argv, ...);
+extern int execvp(const char *file, char **argv);
+extern int execve(const char *name, char **argv, char **envv);
+extern void _exit(int code);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* CYGONCE_ISO_UNISTD_H multiple inclusion protection */
+
+/* EOF unistd.h */
diff --git a/cesar/ecos/packages/kernel/current/ChangeLog b/cesar/ecos/packages/kernel/current/ChangeLog
new file mode 100644
index 0000000000..84ccce3861
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/ChangeLog
@@ -0,0 +1,4606 @@
+2005-08-03 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * tests/ksem1.c: Type fix to fix a compiler warning.
+ * tests/mutex3.cxx: new cannot be both static and global.
+ * tests/testaux.hxx: Ditto
+
+2005-07-30 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/sync/mbox.cxx (tryget,peak_item): initialize local variable
+ to avoid compiler warning.
+
+2005-06-21 Peter Korsgaard <jacmet@sunsite.dk>
+
+ * tests/kcache2.c (test_dcache_operation): Fixed compiler warnings
+ about formats strings for diag_printf.
+
+2005-03-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * tests/tm_basic.cxx (_run_all_tests): Fixed compiler warning.
+
+2004-12-15 Sergei Organov <osv@topconrd.ru>
+
+ * cdl/scheduler.cdl: Correct the description of
+ CYGIMP_KERNEL_SCHED_SORTED_QUEUES
+
+2004-09-24 Nick Garnett <nickg@ecoscentric.com>
+
+ * src/sched/mlqueue.cxx (enqueue): Fix bug in sorted queue
+ insertion: priority test was inverted. Spotted by TomChen.
+
+2004-08-08 Bart Veer <bartv@ecoscentric.com>
+
+ * cdl/counters.cdl: add new option for the clock interrupt
+ priority.
+
+ * src/common/clock.cxx (Cyg_RealTimeClock): use this option.
+
+2004-04-15 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * tests/fptest.c (do_test): Silence aliasing warning when breaking
+ doubles into two ints.
+
+2004-04-11 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * doc/kernel.sgml: Expanded the documentation about the use of
+ CYG_FLAG_WAITMODE_CLR.
+
+2004-03-27 Sebastien Couret <sebastien.couret@elios-informatique.fr>
+
+ * src/debug/dbg-thread-demux.c (dbg_thread_syscall_rmt): Only
+ needed if CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT is enabled.
+
+2004-03-12 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * include/kapi.h: Add throw specifications throughout.
+ * src/kapi.cxx: Ditto.
+ * include/sched.inl: Move include of thread.inl further down to
+ allow Cyg_Scheduler inlines to be defined first.
+ * include/thread.inl: Reorder destructors section and include
+ sched.inl right before it to solve mutual header dependency
+ problems.
+
+2004-03-04 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/kernel.sgml: Document cyg_thread_delete return value.
+
+2004-02-19 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * tests/kmutex3.c (cyg_start): Use CYG_TEST_NA.
+ * tests/kmutex4.c (cyg_start): Ditto.
+ * tests/mutex2.cxx (cyg_start): Ditto.
+ * tests/mutex3.cxx (cyg_start): Ditto.
+ * tests/sync3.cxx (cyg_start): Ditto.
+ * tests/thread2.cxx (cyg_start): Ditto.
+
+ * tests/fptest.c (cyg_start): Use one line NA msg.
+ * tests/smp.cxx (cyg_start): Ditto.
+ * tests/timeslice.c (cyg_start): Ditto.
+ * tests/tm_basic.cxx (cyg_start): Ditto.
+
+2003-12-08 Dan Jakubiec <djakubiec@yahoo.com>
+
+ * src/common/kapi.cxx: Added new function cyg_thread_get_id().
+ This function returns the unique thread ID for a given thread
+ handle.
+
+ * include/kapi.h: Added function prototype for cyg_thread_get_id().
+
+ * doc/kernel.sgml: Added documentation for cyg_thread_get_id().
+
+2003-10-13 Nick Garnett <nickg@balti.calivar.com>
+
+ * src/common/clock.cxx (Cyg_Counter::tick): Changed code to deal
+ with manipulation of unsorted lists (see ChangeLogs passim). There
+ are several corner cases where the current code does not
+ work. Replaced with a more straightforward, but slightly more
+ expensive, implementation.
+
+2003-09-22 Reinhard Jessich <Reinhard.Jessich@frequentis.com>
+
+ * src/common/clock.cxx: Removed label/goto
+ add_alarm_unlock_return to get rid of compiler error when
+ CYGIMP_KERNEL_COUNTERS_SORT_LIST is enabled.
+
+2003-09-01 Bart Veer <bartv@ecoscentric.com>
+
+ * doc/kernel.sgml: fix typo, cyg_thread vs. cyg_thread_t
+
+2003-07-18 Nick Garnett <nickg@balti.calivar.com>
+
+ * cdl/counters.cdl: Removed the counters override CDL
+ options. These are no longer very useful, since too much
+ non-kernel code now uses the HAL options to get these values.
+
+2003-07-10 Nick Garnett <nickg@balti.calivar.com>
+
+ * src/common/clock.cxx (Cyg_Counter::tick): In unsorted list case:
+ moved saving of next node details to before re-insertion of alarms
+ with intervals. The call to add_alarm() can make enough of a
+ difference to the list to need to force a rescan.
+
+2003-07-06 Bart Veer <bartv@ecoscentric.com>
+
+ * include/test/stackmon.h (cyg_test_size_a_stack):
+ If stack checking is enabled, look for 0xdeadbeef rather than 0x0
+ to determine usage. Also reset the interrupt stack to that value.
+
+2003-07-02 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/kernel.sgml: Document that timeouts for timed functions are
+ absolute, not relative. Also document new semantics for
+ cyg_semaphore_timed_wait() for timeouts in the past.
+
+2003-07-01 Nick Garnett <nickg@balti.calivar.com>
+
+ * include/clock.hxx: Made Cyg_Counter::add_alarm() and
+ Cyg_Counter::rem_alarm() private functions. They no longer lock
+ the scheduler, so should not be called directly, only via the
+ Cyg_Alarm functions.
+
+ * include/clock.inl: Removed inline version of
+ Cyg_Alarm::disable(). It's no longer a one-liner and is thus
+ better as a proper function.
+
+ * src/common/clock.cxx (Cyg_Counter::tick): Rewrote the unsorted
+ list option. If the function of one alarm adds or removes other
+ alarms, then is was possible for the list to become corrupted. The
+ new implementation attempts to avoid this problem.
+ (Cyg_Alarm::initialize): Added scheduler locking to protect the
+ enabled flag.
+ (Cyg_Alarm::enable): Ditto.
+ (Cyg_Alarm::disable): Ditto. Moved here from clock.inl.
+ (Cyg_Alarm::add_alarm): Removed scheduler locking, it is now
+ always called from functions that have already locked it. Added an
+ assertion to double-check this.
+ (Cyg_Alarm::rem_alarm): Ditto.
+
+ * cdl/kernel.cdl:
+ * tests/kalarm0.c:
+ Added new test to test that alarms can be added and removed in
+ alarm functions safely.
+
+2003-06-25 Thomas Binder <Thomas.Binder@frequentis.com>
+
+ * src/common/clock.cxx (Cyg_Counter::rem_alarm): Bugfix: call
+ Cyg_Scheduler::lock() before calculation of index into alarm_list
+ array to avoid race condition with multi list counters.
+
+2003-06-06 David Brennan <eCos@brennanhome.com>
+2003-06-23 Nick Garnett <nickg@balti.calivar.com>
+
+ * cdl/kernel.cdl: Added tests/bin_sem3 to list of kernel tests.
+
+ * include/sema.hxx: Added declaration for wait with timeout for
+ Cyg_Binary_Semaphore.
+
+ * include/instrmnt.h: Added instrumentation point for binary semaphore
+ timeout.
+
+ * src/sync/bin_sem.cxx: Added wait with time-out function to
+ Cyg_Binary_Semaphore class.
+
+ * src/sync/cnt_sem.cxx: Modified semantics slightly to claim an
+ available semaphore even with a timeout in the past. This is in
+ line with the new timed wait in bin_sem.cxx.
+
+ * tests/bin_sem3.cxx: Created new test for timed wait binary
+ semaphore.
+
+2003-05-20 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/common/kapi.cxx (cyg_thread_get_next): Passing a *current
+ pointer as NULL if how you start the walk of the linked list. So
+ don't assert on NULL. Reported by Daniel Lidsten.
+
+2003-05-05 Gary Thomas <gary@mlbassoc.com>
+
+ * tests/tm_basic.cxx: Support new option controlling number of times
+ this test runs. This is useful for long-term stress and performance
+ analysis.
+
+2003-05-03 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * include/mqueue.inl (Cyg_Mqueue::get): Fix invalid loop termination
+ cheque for whether busy or not.
+ (Cyg_Mqueue::put): Ditto.
+
+2003-03-03 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * tests/fptest.c: Make all variables static to avoid any risk
+ of collisions with symbols defined elsewhere in eCos.
+
+2003-02-27 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * include/kapidata.h: Revert change of 2001-08-23 and instead make
+ it conditional on the GCC version. Also add comments explaining why
+ this file has been apparently obfuscated.
+
+2003-02-25 Nick Garnett <nickg@calivar.com>
+
+ * tests/fptest.c (alarm_fn): Added CYG_TEST_PASS() call to keep
+ configtool happy.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/kernel.cdl: Update doc links.
+ * cdl/synch.cdl: Ditto.
+ * cdl/thread.cdl: Ditto.
+
+2003-02-19 Nick Garnett <nickg@calivar.com>
+
+ * tests/fptest.c: Changed to run for a constant time rather than a
+ constant number of iterations, with a shorter run time for
+ simulated targets.
+
+2003-02-10 Gary Thomas <gary@mlbassoc.com>
+
+ * include/thread.inl: Add more debug info to thread stack checking.
+
+ * tests/clocktruth.cxx:
+ * tests/clockcnv.cxx: Use <cyg/infra/diag.h> for diag_printf()
+ prototype, rather than hard coding (because it was inconsistent).
+
+2003-02-05 Gary Thomas <gary@mlbassoc.com>
+
+ * tests/kcache2.c (test_dcache_operation): New test to verify
+ that the DATA cache syncs properly.
+
+2003-01-31 Nick Garnett <nickg@calivar.com>
+
+ * cdl/kernel.cdl:
+ * tests/fptest.c: Added this program to test interaction of FPU
+ with multiple threads.
+
+2003-01-30 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/common/thread.cxx: Fix potential warning and overflow with
+ CYGNUM_KERNEL_THREADS_DATA_MAX == 32.
+
+2003-01-28 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/common/kapi.cxx (cyg_thread_get_next): Be quite zealous about
+ checking the validity of passed in threads in debug mode.
+ (cyg_thread_get_info): Ditto.
+
+ * cdl/thread.cdl: Correct max legal value for
+ CYGNUM_KERNEL_THREADS_DATA_MAX.
+
+2003-01-22 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/kernel.sgml: Document cyg_thread_info type.
+
+2003-01-13 Dmitriy Korovkin <dkorovkin@rambler.ru>
+2003-01-13 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * include/mqueue.hxx: Allow get/put to return time out.
+ * include mqueue.inl: Ditto.
+
+2003-01-02 Gary Thomas <gary@mlbassoc.com>
+
+ * tests/kcache2.c: New subtest for raw data cache operations.
+
+2002-12-12 Nick Garnett <nickg@ecoscentric.com>
+
+ * src/common/kapi.cxx:
+ * include/kapi.h:
+ Added function cyg_thread_get_next(), cyg_thread_find() and
+ cyg_thread_get_info() to allow the current set of threads to be
+ enumerated, and per-thread information to be retrieved safely.
+
+ * doc/kernel.sgml: Documented new KAPI calls.
+
+ * src/common/thread.cxx: Zero unique_id in thread destructor so
+ that a stale thread pointer can be checked for validity.
+
+ * include/instrmnt.h:
+ Added cyg_instrument_state() to report the current state of an
+ instrumentation flag.
+ Moved ifdef for CYGDBG_KERNEL_INSTRUMENT_MSGS out of within FLAGS
+ ifdef. We can have messages without flags.
+
+ * src/instrmnt/meminst.cxx:
+ Added cyg_instrument_state() to report the current state of an
+ instrumentation flag.
+ Modified cyg_instrument_msg() in line with header and table
+ changes.
+
+ * host/instr/dump_instr.c:
+ * host/instr/instrument.sh:
+ * include/instrument_desc.h:
+ Added a final NULL element to the generated table in
+ instrument_desc.h to mark its end. Otherwise code that does not
+ have access to the table definition cannot find its end. Also
+ added ifdefs to allow instrument_desc.h to be used to acquire the
+ structure definition and table pointer.
+
+2002-12-03 Gary Thomas <gthomas@ecoscentric.com>
+
+ * tests/tm_basic.cxx: Add tests of 'flag' synchronizers.
+
+2002-10-28 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * tests/tm_basic.cxx: Include infra/diag.h and removed the
+ incorrect prototype for diag_printf
+
+2002-10-16 Gary Thomas <gthomas@ecoscentric.com>
+
+ * include/test/stackmon.h (STACKMON_PRINTF): Use #include to get
+ prototype for 'diag_printf()'.
+
+2002-10-01 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/common/clock.cxx (add_alarm): Tweak last change to allow
+ alarm order for identical alarms to be the same as it used to be.
+
+2002-09-30 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/common/clock.cxx (add_alarm): Fix bug resulting in alarms
+ not being added at all if a lower triggered alarm already exists.
+ Reported by Christoph Csebits.
+ Also fix bug when alarm is entered for the same time as tail.
+ These bugs only apply for CYGIMP_KERNEL_COUNTERS_SORT_LIST enabled.
+
+ * doc/kernel.sgml: document that order of callback for alarms at
+ identical times is unspecified.
+
+2002-08-08 Nick Garnett <nickg@calivar.demon.co.uk>
+
+ * src/sched/sched.cxx (unlock_inner): Removed initial
+ assertion. This has served its purpose and with the introduction
+ of routines such as unlock_reschedule() is prone to firing in
+ otherwise benign circumstances.
+
+2002-08-05 Bart Veer <bartv@tymora.demon.co.uk>
+
+ * cdl/kernel.cdl, include/kapidata.h, include/kapi.h:
+ Allow configurations with the kernel but no malloc
+
+2002-06-05 Gary Thomas <gary@chez-thomas.org>
+
+ * include/kapi.h: Fix prototype (to allow builds with net stack).
+
+2002-05-24 Jesper Skov <jskov@redhat.com>
+
+ * cdl/kernel.cdl: Fix typo.
+
+2002-05-23 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/kapi.h: Expose new cyg_thread_add_destructor and
+ cyg_thread_rem_destructor APIs.
+
+ * include/kapidata.h (struct Cyg_Destructor_Entry):
+ Change CYG_ADDRWORD to more correct cyg_addrword_t.
+
+ * include/thread.hxx (class Cyg_Thread): add_destructor and
+ rem_destructor are onyl static when not per-thread.
+
+ * include/thread.inl (add_destructor): Don't need to lock and unlock
+ scheduler when destructors are per-thread.
+ (rem_destructor): Ditto.
+
+ * src/common/thread.cxx (exit): No need to lock scheduler when
+ calling destructors.
+
+ * doc/kernel.sgml: Document thread destructor API.
+
+2002-05-23 Nick Garnett <nickg@redhat.com>
+
+ * doc/kernel.sgml: Some more edits to the kernel documentation:
+ changed all references to message boxes to mail boxes, clarified
+ some thing in various places, fixed a few typos.
+
+2002-05-23 Jesper Skov <jskov@redhat.com>
+
+ * cdl/kernel.cdl: Cleaned up kernel tests rule. Also remove tests
+ depending on the C API when its not present. And skip dhrystone
+ test when debug or instrumentation is enabled.
+
+ * tests/tm_basic.cxx: Fixed warning.
+
+2002-05-22 Nick Garnett <nickg@redhat.com>
+
+ * doc/kernel.sgml:
+ Fixed up SMP documentation.
+ Rewrote condtion variable documentation to make its relationship
+ to mutexes more apparent.
+
+2002-05-22 Jesper Skov <jskov@redhat.com>
+
+ * tests/smp.cxx: Move inclusion of testaux.hxx to below NA
+ checks.
+
+2002-05-21 Bart Veer <bartv@redhat.com>
+
+ * doc/kernel.sgml:
+ Major update to the kernel documentation.
+
+2002-05-21 Jesper Skov <jskov@redhat.com>
+
+ * src/common/clock.cxx (dsr): Fix latency ifdef guards.
+ * tests/tm_basic.cxx: Same.
+
+2002-05-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/sched/mlqueue.cxx: Don't force timeslice tracing on by default
+ against the user's wishes.
+ * cdl/scheduler.cdl: Instead provide an option controlling it.
+
+2002-05-09 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/kapidata.h (CYG_HARDWARETHREAD_MEMBERS): entry_point
+ should be a pointer to function not an addrword (which may be
+ different).
+ (cyg_reason_t): Define cyg_reason_t as an enum not an int.
+ (struct cyg_mutex_t): Define mutex protocol as an enum not a cyg_uint32.
+ Define locked member as a cyg_atomic, not a cyg_bool.
+
+2002-05-09 Nick Garnett <nickg@redhat.com>
+
+ * tests/timeslice.c: Modified test thread to accumulate run time
+ by reading HAL clock, and to detect and record changes of CPU. The
+ previous version of this code reported varying results - probably
+ as a consequence of cache effects.
+
+ * include/instrmnt.h: Fixed left-over debug edit to MLQ
+ instrumentation enable code.
+
+2002-04-29 Jesper Skov <jskov@redhat.com>
+
+ * include/kapi.h: Added cyg_alarm_get_times and
+ cyg_counter_multi_tick.
+ * src/common/kapi.cxx: Same. Er, fix oversight.
+ * doc/kernel.sgml: Doc update.
+
+2002-04-24 Yoshinori Sato <qzb04471@nifty.ne.jp>
+
+ * src/sync/flag.cxx: Don't set default args in func definitions.
+
+2002-04-24 Jesper Skov <jskov@redhat.com>
+
+ * tests/dhrystone.c: Moved platform max number of passes to CDL in
+ HALs.
+
+2002-04-23 Jesper Skov <jskov@redhat.com>
+
+ * tests/dhrystone.c: Allow platform to define max number of passes
+ via CYGPRI_KERNEL_TESTS_DHRYSTONE_PASSES.
+
+2002-04-09 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/kapi.h: Use NORET attributes from cyg_type.h.
+ * include/sched.hxx (class Cyg_Scheduler): Ditto.
+
+2002-04-08 Nick Garnett <nickg@redhat.com>
+
+ * src/sync/mutex.cxx: Added IF_PROTOCOL_ACTIVE macro to condition
+ use of the mutex counter. This means that a mutex that is not
+ configured to participate in a priority inversion protocol does not
+ count for operation of that protocol.
+
+2002-03-04 Lars Viklund <lars.viklund@axis.com>
+
+ * include/kapidata.h (CYG_SCHEDTHREAD_ASR_MEMBER):
+ asr_inhibit is cyg_ucount32 - must match
+
+2002-02-13 Hugo Tyson <hmt@redhat.com>
+
+ * doc/kernel.sgml: NEW FILE: Correct reference to uITRON doc.
+
+2002-01-28 Jesper Skov <jskov@redhat.com>
+
+ * tests/kexcept1.c: Fix warning.
+
+2002-01-24 Jesper Skov <jskov@redhat.com>
+
+ * tests/kcache1.c (time0DI): Disable interrupts around the
+ sync+invalidate process.
+ * tests/kcache2.c: Same.
+
+2002-01-23 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/intr/intr.cxx (mask_interrupt): Disable interrupts.
+ (unmask_interrupt): Ditto.
+ (mask_interrupt_intunsafe): New function to avoid disabled interrupts.
+ (unmask_interrupt_intunsafe): Ditto.
+ * include/intr.hxx (class Cyg_Interrupt): Declare above new funcs.
+ * src/common/kapi.cxx (cyg_interrupt_unmask_intunsafe): Above
+ replicated to KAPI.
+ (cyg_interrupt_mask_intunsafe): Ditto.
+ * include/kapi.h: Ditto.
+
+2002-01-07 Nick Garnett <nickg@redhat.com>
+
+ * tests/except1.cxx:
+ * tests/kexcept1.cxx:
+ Added ifdef to disable these tests in ARM PID platform. This
+ platform cannot generate any of the exceptions that this test
+ needs to work.
+
+2001-12-12 Jesper Skov <jskov@redhat.com>
+
+ * tests/kcache2.c (time_ilock): Put some dummy goto statements in
+ to prevent compiler from moving labels around.
+
+2001-11-29 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/sched/mlqueue.cxx (timeslice_cpu): Reset timeslice_count on
+ a timeslice.
+ Noticed by Tony Kho.
+
+2001-11-23 Jonathan Larmour <jlarmour@redhat.com>
+
+ * tests/klock.c (entry1): Support running with
+ CYGFUN_KERNEL_THREADS_TIMER disabled.
+
+2001-10-30 Nick Garnett <nickg@redhat.com>
+
+ * tests/kcache2.c (test_dsync):
+ Added call to HAL_ICACHE_INVALIDATE_ALL() just before DCACHE
+ disable. In platforms where both caches are controlled together,
+ such as the VR4300, not doing this can result in strange behaviour
+ as the ICACHE gets turned off under the program's feet, when it is
+ not ready for it.
+
+2001-10-17 Jesper Skov <jskov@redhat.com>
+
+ * tests/dhrystone.c: CYGINT_ISO_STRING_STRFUNCS check changed to
+ ifdef.
+
+2001-10-12 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/synch.cdl (CYGIMP_KERNEL_SYNCH_MQUEUE_NOT_INLINE): New option
+ to avoid inlining mqueue implementation.
+
+ * src/sync/mqueue.cxx: New file to provide non-inline version of
+ mqueue functions.
+
+ * include/mqueue.hxx: Don't include .inl if user doesn't want inlining.
+
+ * include/mqueue.inl: Allow choice of inlining or not to be
+ overridden by macro.
+
+ * tests/mqueue1.cxx: Never use inline version.
+
+2001-10-11 Jesper Skov <jskov@redhat.com>
+
+ * tests/kmutex3.c (new_thread): Fixed allocation: increase counter
+ before starting threads which have been allocated resources.
+ * tests/kmutex4.c (new_thread): Same.
+ * tests/mutex3.cxx (new_thread): Same.
+ * tests/testaux.hxx (new_thread): Same.
+
+ * tests/kcache2.c: Fixed warning.
+ * tests/stress_threads.c: Same.
+
+2001-09-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * host/instr/dump_instr.c (main): Fix argc check.
+
+2001-09-07 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/thread.inl (measure_stack_usage): Deal with stack limits.
+
+2001-09-07 Nick Garnett <nickg@redhat.com>
+
+ * src/common/thread.cxx (set_priority): Change argument to
+ instrumentation call to new_priority rather than current
+ priority. (Suggested by Andrew Lunn).
+
+2001-09-05 Jesper Skov <jskov@redhat.com>
+
+ * include/mqueue.inl (Cyg_Mqueue): Initialize busy flag of last
+ entry in the list.
+
+2001-09-04 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/instrument.cdl (CYGDBG_KERNEL_INSTRUMENT_BUILD_HOST_DUMP):
+ Remove redundant requires, and adjust make rule to be more portable
+ across hosts.
+ (CYGDBG_KERNEL_INSTRUMENT_MSGS_BUILD_HEADERFILE):
+ Invoke script with sh directly rather than rely on executable attribute.
+
+ * host/instr/readme.txt: Update build of host dump as per the changed
+ CDL.
+
+ * cdl/kernel.cdl: Don't build nullinst.cxx any more.
+ Build meminst.cxx only in CYGPKG_KERNEL_INSTRUMENT.
+ * src/instrmnt/nullinst.cxx: Delete. It causes confusion in the
+ library as it declares cyg_instrument like meminst.cxx does.
+
+2001-08-31 Nick Garnett <nickg@redhat.com>
+
+ * src/intr/intr.cxx: Clean up typo in DSR table
+ case. dsr_table_tail and dsr_table_head were not being subscripted
+ in a couple of places.
+
+2001-08-23 Hugo Tyson <hmt@redhat.com>
+2001-08-20 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/instrument_desc.h: New file. This contains the table of
+ events used to print the nice information. It should be
+ regenerated when the instrumentation numbers change.
+
+ * src/instrmnt/meminst.cxx (cyg_instrument_msg):
+ returns an ASCII string describing the type of event the
+ instrumentation code logged.
+
+ * include/instrmnt.h: Added function prototype.
+
+ * cdl/instrument.cdl: Configury for enabling the new function, and
+ optionally rebuilding its header file and building a host tool.
+
+ * host/instr/dump_instr.c: New file. A host program to print the
+ instrumentation information in a human readable form.
+
+ * host/instr/instrument.sh: New file. Script to generate table of
+ events with textual representation.
+
+ * host/instr/readme.txt: New file. Helpful information.
+
+2001-08-23 Nick Garnett <nickg@redhat.com>
+
+ * include/kapidata.h (CYG_THREADTIMER_MEMBERS):
+ Substituted an expicit cyg_alarm object for CYG_ALARM_MEMBERS in
+ this definition. In some architectures (MIPS in particular) the
+ structures need to be padded to a multiple of 64 bits. This was
+ not happening with the macro substituted versions.
+ This is just a temporary fix, I'll leave it to Jifl to sort out a
+ real patch when he returns.
+
+2001-08-23 Hugo Tyson <hmt@redhat.com>
+
+ * src/common/thread.cxx: Properly qualify Cyg_Thread::destructors
+ array so that it builds when destructors are not used.
+
+2001-08-23 Nick Garnett <nickg@redhat.com>
+
+ * src/sched/mlqueue.cxx: Added code to
+ Cyg_SchedThread_Implementation::to_queue_head() to handle a NULL
+ thread queue pointer. This compensates for a minor change in
+ behaviour of the scheduler.
+
+2001-08-22 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/thread.cdl: Add kernel thread destructor options.
+ * include/kapidata.h: Add thread destructor entries to cyg_thread
+ * include/thread.hxx (Cyg_Thread): Give per-thread data indexes
+ their own type, cyg_data_index.
+ Include new thread destructor data members, and new add_destructor
+ and rem_destructor member functions.
+ * include/thread.inl: Use a cyg_data_index for per-thread data handle.
+ (add_destructor): New Cyg_Thread member function.
+ (rem_destructor): Ditto.
+ * src/common/kapi.cxx: Use cyg_data_index type for per-thread data
+ functions.
+ * src/common/thread.cxx (Cyg_Thread): initialise per-thread
+ destructors if needed.
+ Define static destructors if needed.
+ (exit): Call destructors.
+ (new_data_index): Use cyg_data_index type.
+ (free_data_index): Ditto.
+
+2001-08-22 Hugo Tyson <hmt@redhat.com>
+
+ * src/sync/mutex.cxx (Cyg_Mutex): Add initialization of the
+ priority ceiling value in the non-dynamic protocol case.
+
+2001-08-22 Nick Garnett <nickg@redhat.com>
+
+ * tests/intr0.c:
+ * tests/kintr0.c:
+ Swapped order of interrupt enable/disable calls to keep kernel
+ happy when assertions are enabled. Otherwise the enable call
+ complains that interrupts have not been disabled.
+
+ * src/sched/mlqueue.cxx:
+ Simplified algorithm in set_need_reschedule().
+
+ * include/smp.hxx:
+ * include/kapidata.h: Change spinlock to be a cyg_uint32, rather
+ than a cyg_atomic.
+
+ * src/intr/intr.cxx:
+ * include/intr.hxx:
+ Now arrange for DSRs to be called on the same CPU as the ISR. This
+ is necessary if the DSR needs to access per-CPU hardware (such as
+ interrupt controllers). This is achieved by keeping a separate DSR
+ list/table for each CPU.
+
+ * tests/smp.cxx: Some modifications to make this test work in a
+ real SMP environment.
+
+ * tests/timeslice.c:
+ * cdl/kernel.cdl: Added timeslice test.
+
+2001-08-21 Hugo Tyson <hmt@redhat.com>
+
+ * src/sync/mutex.cxx (lock): Bugfix: a ceiling priority mutex
+ wasn't elevated until after it had acquired the mutex. This meant
+ it slept with a low priority, and so did not run when awakened by
+ the release of the mutex. The fix is to elevate the potential
+ claimant before it sleeps in contention.
+
+ * tests/kmutex4.c: New testcase - very similar to kmutex3 but it
+ loops a load more times using different mutex priority protocols.
+ This checks that dynamically set protos do in fact behave
+ differently from one another and as they are each intended to.
+
+ * tests/kmutex3.c: Remove FIXME comments - we now test dynamic
+ protocol.
+
+ * cdl/kernel.cdl: Build the new test.
+
+2001-08-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/kapidata.h: Reorganize most struct type definitions into
+ macros to allow compatible layout with all G++ implementations that
+ align non-POD types differently from included C structures.
+ * include/kapi.h: Similarly for cyg_resolution_t.
+
+2001-08-17 Nick Garnett <nickg@redhat.com>
+
+ * src/sched/mlqueue.cxx (timeslice): Fix timeslice_count comparison.
+
+2001-08-16 Hugo Tyson <hmt@redhat.com>
+
+ * include/kapi.h (cyg_mutex_protocol): Tidy up names of mutex
+ protocol type and values. These polluted rather in 'C'.
+
+ * src/common/kapi.cxx (cyg_mutex_set_protocol): ditto.
+
+2001-08-15 Hugo Tyson <hmt@redhat.com>
+2001-08-15 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/common/kapi.c (cyg_thread_get_current_priority): Export
+ this function into the C api.
+ * include/kapi.h: Declaration of new function.
+
+2001-08-14 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/common/kapi.cxx (cyg_spinlock_spin_intsave): Cast to istate
+ to CYG_INTERRUPT_STATE * since that's what is needed.
+ (cyg_spinlock_clear_intsave): Similarly.
+
+2001-08-10 Hugo Tyson <hmt@redhat.com>
+
+ * cdl/synch.cdl: Re-organize the options for mutexes so they are
+ active a bit more sensibly; place the default ceiling within
+ selection of ceiling protocol, and only have a default protocol if
+ there is more than one protocol active.
+
+ * tests/mutex3.cxx: More detailed handling of the possibility of
+ ceiling protocol instead of the inherit or none cases; we can run
+ the test ok and treat as inherit if the ceiling prio is higher
+ than 5, treat as none if lower than 15, and don't check anything
+ if in between - the test runs happily.
+
+ * tests/kmutex3.c (cyg_start): New test, a KAPI translation of the
+ now-classic mutex3.cxx.
+
+ * cdl/kernel.cdl: Build tests/kmutex3.c
+
+2001-08-06 Hugo Tyson <hmt@redhat.com>
+
+ * src/sched/sched.cxx (unlock_inner): Fix assignment to current,
+ wouldn't build if stack checking after merger from SMP branch.
+
+2001-08-06 Andrew Lunn <andrew.lunn@ascom.ch>
+2001-08-06 Hugo Tyson <hmt@redhat.com>
+
+ * src/sync/mutex.cxx: (set_protocol) Added a function to set the
+ priority inversion protocol for a mutex.
+
+ * src/common/kapi.cxx: Export the new function above and
+ set_ceiling into the C API.
+
+ * include/mutex.hxx (class Cyg_Mutex): New member function
+ set_protocol().
+
+ * include/kapi.h (cyg_protcol): Define new emumeration for mutex
+ priority protocol setting, and headers for the new function to set
+ it.
+
+2001-08-03 Nick Garnett <nickg@redhat.com>
+
+ Imported from a development branch:
+
+ 2001-07-11 Nick Garnett <nickg@redhat.com>
+
+ * src/sched/mlqueue.cxx: Changed behaviour of
+ set_need_reschedule() to a better implementation of the intended
+ algorithm.
+
+ * include/kapi.h:
+ * src/common/kapi.cxx:
+ Added API for controlling routing of interrupts to CPUs in SMP
+ configurations.
+
+ 2001-07-03 Nick Garnett <nickg@cygnus.co.uk>
+
+ * cdl/scheduler.cdl:
+ * include/bitmap.hxx:
+ * src/sched/bitmap.cxx:
+ Fixed up bitmap scheduler so it still works within the
+ SMP-modified scheduling infrastructure. The bitmap scheduler
+ is not currently SMP-enabled, only single CPU configurations are
+ supported - hence the CDL change to require this.
+
+ 2001-06-29 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/sched/sched.cxx:
+ Removed the call to Cyg_Interrupt::enable_interrupts() in
+ Cyg_Scheduler::start_cpu(). This was a relic from the days when
+ the interrupt enable state was not part of the thread state. Now
+ it is, and loading the first thread will cause interrupts to be
+ enabled.
+
+ * src/intr/intr.cxx:
+ Changed initial values of Cyg_Interrupt::disable_counter[]s to
+ zero as a result of the change in Cyg_Scheduler::start_cpu().
+
+ * include/kapi.h:
+ * include/kapidata.h:
+ * src/common/kapi.cxx:
+ Added API for using spinlocks. Largely so that it may be extended
+ to the driver API.
+
+ * include/mlqueue.hxx:
+ * include/intr.hxx:
+ * include/sched.hxx:
+ Added annotations to various static variables.
+
+ 2001-06-28 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/intr.hxx:
+ * src/intr/intr.cxx:
+ Changed behaviour of Cyg_Interrupt::disable_interrupts() and
+ Cyg_Interrupt::enable_interrupts(). These now claim and release a
+ spinlock in addition to disabling and enabling interrupts. The
+ original interrupt state is also preserved and restored. This is
+ necessary in SMP systems to allow drivers etc. to correctly
+ synchronize with threads and DSRs that may be running on different
+ CPUs. In the single CPU case this mechanism reduces to the
+ original simple interrupt disable code.
+ [Later change] Backed off addition of volatile modifier to
+ interrupt_disable_state.
+
+ * include/smp.hxx: Some minor tidies.
+
+ 2001-06-27 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/release.cxx: Added spin loop in thread1 to allow thread0
+ to execute its wait. This is necessary in SMP systems where the
+ threads will execute in parallel, but is also benign in single CPU
+ systems.
+
+ * tests/mutex2.cxx:
+ * tests/mutex3.cxx:
+ * tests/sync3.cxx:
+ * tests/thread2.cxx:
+ These tests depend on predicting the behaviour of threads at
+ different priorities to pass. In an SMP system, several threads
+ will run in parallel, and the execution order will not be as
+ expected. These tests are therefore disabled in SMP
+ configurations.
+
+ * src/sched/mlqueue.cxx (add_thread): Moved call to
+ set_need_reschedule() out of test for empty queue. In SMP systems,
+ any addition to a queue may require a reschedule on another CPU.
+
+ 2001-06-22 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/mlqueue.hxx:
+ * src/sched/mlqueue.cxx:
+ A major change to the way in which this scheduler works in SMP
+ systems. The previous version removed all runnable threads from
+ the run queues when they were executing. This resulted in serious
+ complications and messy code, particularly when dealing with
+ priority changes and timeslicing. The new version keeps running
+ threads in the run queues, just like the single-CPU version. The
+ main disadvantage of this is that we may have to search past
+ threads running on other CPUs before we find one available to run
+ on this CPU. However, the pending count array and map mean that we
+ only need search one run queue, and in any case the search remains
+ bounded by the number of CPUs available.
+ Another change is in the way that timeslicing is handled. Now, the
+ CPU that takes the clock interrupt decrements the timeslice counts
+ for all CPUs and if any go zero, sends a TIMESLICE message to
+ that CPU.
+
+ * src/sched/sched.cxx (unlock_inner):
+ Removed call to requeue(), no longer needed as a result of
+ scheduler reorganization.
+
+ * src/common/thread.cxx:
+ Added test in Cyg_Thread::exit() to check that the thread has not
+ already been killed. This is only an issue if the thread is
+ calling exit() when it is kill()ed from another CPU. The test is
+ redundant in single-CPU systems, but it does no harm having it.
+ Added code to Cyg_Thread::set_priority() to check for reschedule
+ when another thread is being changed in priority.
+ Added call in idle thread constructor to scheduler to install the
+ idle thread as the default current thread for a CPU.
+
+ * include/smp.hxx:
+ Added CYG_KERNEL_CPU_TIMESLICE_INTERRUPT(), did some miscellaneous
+ tidying.
+
+ * include/instrmnt.h: Added SMP_RESCHED_SEND and SMP_RESCHED_RECV
+ events.
+
+ * cdl/kernel.cdl: Added smp test program.
+
+ * tests/smp.cxx: Added this program to test SMP functionality.
+
+ 2001-06-13 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/sched/sched.cxx:
+ Removed code to set up initial current thread, this is now done
+ in the idle thread constructor.
+ Added code here to set up interrupts for SMP inter-processor
+ interrupts. This is not very tidy and may need to be
+ changed in the future.
+
+ * src/sched/mlqueue.cxx:
+ Added local set_need_reschedule() function to set the
+ need_reschedule flag on a suitable CPU.
+ Many more changes to cope with SMP systems.
+ NOTE: This code has all become somthing of a mess, it need to be
+ tidied up and the SMP-specific changes integrated better into the
+ code. Also, timesliceing currently only works on the CPU that
+ takes clock interrupts - this needs fixing.
+
+ * src/common/thread.cxx:
+ Moved assignment of initial current thread to here from sched.cxx.
+
+ * include/smp.hxx:
+ Changed CYG_KERNEL_CPU_INTERRUPT()
+ CYG_KERNEL_CPU_RESCHEDULE_INTERRUPT() since there may be other
+ interrupt types to worry about.
+ Added annotations to scheduler data items.
+
+ * include/sched.hxx:
+ Split set_current_thread() into two functions, the original works
+ only on the current CPU, the new one sets another CPU's current
+ thread. This latter function is only used to prime the current
+ threads during initialization.
+ Added second need_reschedule() function that takes a thread
+ argument. This is intended to be overridden by a scheduler
+ specific function that sets the need_reschedule flag if the
+ supplied thread is more deserving of CPU time that any current
+ thread.
+
+ * include/mlqueue.hxx:
+ Made cyg_scheduler_set_need_reschedule() a friend of
+ Cyg_Scheduler_Implementation class.
+ Added override set_need_reschedule() functions.
+
+ * include/kapidata.h: Added cpu field to cyg_thread structure when
+ in SMP systems.
+
+ * include/intr.hxx:
+ * src/intr/intr.cxx:
+ Added Cyg_Interrupt::set_cpu() and Cyg_Interrupt::get_cpu() for
+ SMP systems.
+
+ * include/instrmnt.h: Added events for INTR_GET_CPU and
+ INTR_SET_CPU.
+
+ 2001-05-29 Nick Garnett <nickg@cygnus.co.uk>
+
+ The following changes were all imported from the SMP branch:
+
+ * tests/tm_basic.cxx:
+ Modified to work in SMP configuration - mostly at present by
+ ifdeffing out code I didn't want to fix.
+
+ * include/sched.hxx:
+ Moved scheduler lock operation into Cyg_Scheduler_SchedLock class.
+ Converted current_thread, need_reschedule, and thread_switches
+ into CPU indexed arrays. Added member functions to get and set
+ these indirectly.
+ Added start_cpu() to do per-CPU scheduler startup.
+
+ * include/sched.inl:
+ Converted scheduler lock/unlock functions to use new schedlock
+ class.
+
+ * src/sched/sched.cxx:
+ Changed in line with sched.hxx.
+ Added call to requeue() in unlock_inner() to restore current
+ thread to run queue if necessary.
+ Moved most of scheduler startup to Cyg_Scheduler::start_cpu().
+ Cyg_Scheduler::start() now also starts secondary CPUs in SMP
+ systems.
+ Added cyg_kernel_smp_startup() as entry point from HAL into kernel
+ for secondary CPUs.
+
+ * include/mlqueue.hxx:
+ Added Cyg_RunQueue type and removed
+ Cyg_SchedulerThreadQueue_Implementation type.
+ Converted timeslice_count to CPU indexed array.
+ Added requeue() member function to scheduler class.
+ Added cpu member to thread implementation class, to record
+ thread's current CPU.
+
+ * src/sched/mlqueue.cxx:
+ Changed behaviour when in SMP system to remove scheduled thread
+ from run queue and replace it when preempted.
+ Added some extra asserts, and removed some that are no longer true
+ in an SMP system.
+
+ * src/instrmnt/meminst.cxx: In SMP systems: added spinlock to
+ protect instrument buffer, added CPU Id in top 4 bits of thread Id
+ field.
+
+ * src/common/thread.cxx:
+ Converted to use accessor functions for need_reschedule and
+ current_thread.
+ Rearranged idle thread creation to create one for each CPU.
+
+ * include/test/stackmon.h: Extended to handle stack usage for
+ multiple idle threads.
+
+ * include/thread.inl:
+ Added some extra instrumentation.
+
+ * include/smp.hxx:
+ Added this file to contain all kernel SMP support. The main
+ definitions exported by this file are spin lock and scheduler lock
+ implementation classes, for both SMP and uniprocessor
+ configurations.
+
+ * src/intr/intr.cxx:
+ * include/intr.hxx:
+ Converted interrupt disable counter to CPU indexed array. In
+ intr.cxx: added lock of scheduler lock in interrupt_end() rather
+ than in default interrupt VSR.
+
+ * cdl/kernel.cdl: Added option to enable SMP support.
+
+ * include/instrmnt.h:
+ * cdl/instrument.cdl: Added SMP instrumentation.
+
+ 2001-05-25 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/intr.hxx:
+ * src/intr/intr.cxx:
+ Added default definition of CYGNUM_HAL_ISR_TABLE_SIZE. This is now
+ used to declare the chain table so that architectures which have
+ different sizes for the interrupt table and vector count will work
+ correctly.
+
+ 2001-05-22 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/sched.hxx (class Cyg_Scheduler_Base):
+ Added annotation to sched_lock.
+
+ * cdl/instrument.cdl:
+ Rename CYGNUM_KERNEL_INSTRUMENT_BUFFER_WRAP to
+ CYGDBG_KERNEL_INSTRUMENT_BUFFER_WRAP as it appears in the code.
+
+2001-07-27 Jesper Skov <jskov@redhat.com>
+
+ * src/intr/intr.cxx (chain_isr): Return isr_ret so caller (which
+ may be an arbiter) can tell if the interrupt was handled.
+
+2001-07-26 Gary Thomas <gthomas@redhat.com>
+
+ * src/common/clock.cxx (dsr): Fix problems mixing signed and
+ unsigned values. Normally only generated warnings, but...
+
+2001-07-09 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/sched.inl (unlock_reschedule): Fix commenting.
+ * src/sched/sched.cxx: Improve description of unlock_inner().
+
+2001-06-21 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/common/thread.cxx (Cyg_Thread::Cyg_Thread): Initialize
+ wakeup_count
+
+2001-06-06 Hugo Tyson <hmt@redhat.com>
+
+ * tests/clocktruth.cxx: New file. A test to get a sanity check on
+ whether the clock is accurate to wallclock time, only useful for
+ humans to watch really. But important!
+
+2001-05-31 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/thread.hxx (class Cyg_HardwareThread): Remove unused
+ load_context() method.
+ * include/thread.inl: Ditto.
+
+2001-05-29 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/sched/bitmap.cxx (rem_thread): No need to set need_reschedule...
+ rescheduling will happen automatically when the state changes.
+
+ * src/sched/mlqueue.cxx (add_thread): No need to explicitly clear
+ thread->queue.
+
+2001-04-26 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/intr0.cxx:
+ * tests/kintr0.c:
+ Fixed these two tests so that they work properly on architectures
+ where CYGNUM_HAL_ISR_MIN is not zero. These include the x86 and
+ V850.
+
+2001-04-18 Bart Veer <bartv@redhat.com>
+
+ * tests/dhrystone.c:
+ Fix the conditional for STDIO_FORMATTED_IO
+
+2001-04-17 Bart Veer <bartv@redhat.com>
+
+ * tests/stress_threads.c (setup_death_alarm):
+ Cope with synthetic target reorg
+
+ * tests/except1.cxx, tests/kexcept1.c:
+ Reenable for the synthetic target
+
+ * tests/tm_basic.cxx:
+ Reenable for the synthetic target
+
+2001-04-17 Jesper Skov <jskov@redhat.com>
+
+ * cdl/kernel.cdl: Do cache tests on E7T.
+
+2001-04-05 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/flag1.cxx: Apply same changes here as were applied to
+ kflag1 on 2000-07-17. This allows this test to run to completion
+ in slow targets, especially simulators.
+
+ * tests/stress_threads.c: Reduce run time even further in
+ simulator runs where instrumentation is enabled.
+
+2001-04-03 Jesper Skov <jskov@redhat.com>
+
+ * tests/dhrystone.c: Fix feature check.
+
+2001-03-28 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/kernel.cdl: Only need to compile dbg_gdb.cxx with
+ CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+
+ * src/debug/dbg_gdb.cxx: Add new dbg_thread_id() function.
+
+2001-02-23 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/thread.inl (attach_stack): Check for non-NULL stack base.
+
+2001-02-11 Jonathan Larmour <jlarmour@redhat.com>
+
+ * tests/stress_threads.c: CYGINT_ISO_STDIO_FORMATTED_IO needs a
+ #ifdef not an #if.
+ * tests/dhrystone.c: Ditto.
+
+2001-02-04 Jonathan Larmour <jlarmour@redhat.com>
+
+ * tests/kill.cxx: Increase delay for all targets, just in case some
+ are slow.
+
+2001-01-30 Hugo Tyson <hmt@redhat.com>
+
+ * src/common/clock.cxx (rem_alarm): Must clear the enabled flag;
+ this disappeared in the changes to using clists of 2001-01-09.
+ Symptom was that an alarm, once disabled, could never be
+ re-attached to its counter because it claimed it already was.
+ Plus asserts with multiple disables - "bad counter object".
+
+2001-01-30 Hugo Tyson <hmt@redhat.com>
+
+ * src/common/thread.cxx (reinitialize): Following change of
+ 2000-12-05, if CYGFUN_KERNEL_THREADS_STACK_CHECKING, this was
+ using the stack_base/stack_size variables directly to reinitialize
+ the stack area. This was wrong, and leaked store off the top and
+ bottom of the stacks because the "buffer zone" was carved off
+ repeatedly. Fix is to use the published APIs which compensate.
+
+2001-01-26 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/mlqueue.hxx:
+ * src/sched/mlqueue.cxx:
+ Restored Cyg_ThreadQueue_Implementation::remove() since it must
+ clear the thread's queue pointer, which the base clist class
+ remove() does not.
+
+2001-01-24 Jesper Skov <jskov@redhat.com>
+
+ * src/sched/mlqueue.cxx (highpri): Fix trace call.
+
+2001-01-09 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/mlqueue.hxx:
+ * src/sched/mlqueue.cxx:
+ Converted to use clist.hxx list implementation. The main effect of
+ this is to clean up the code and class definitions since much of
+ what was part of the thread queue and thread classes now moves to
+ the DNode and CList classes.
+
+ * include/clock.hxx:
+ * src/common/clock.cxx:
+ Converted to use clist.hxx list implementation. This removes all
+ the explicit list manipulation code from the counter and alarm
+ classes, resulting in cleaner, easier to understand code.
+
+ * include/kapidata.h: Adjusted cyg_alarm struct to match Cyg_Alarm
+ using Cyg_DNode.
+
+2000-12-22 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/thread.inl (check_stack): check word alignment with CYG_WORD
+ not cyg_uint32
+ Add extra stack checking for when stack limits are used.
+ (measure_stack_usage): New function to measure stack usage of the thread
+ (attach_stack): check word alignment with CYG_WORD not cyg_uint32
+ Initialize stack to preset value when measuring stack usage
+ (increment_stack_limit): Conditionalize here wrt
+ CYGFUN_KERNEL_THREADS_STACK_CHECKING and use the version in thread.cxx
+ instead if CYGFUN_KERNEL_THREADS_STACK_CHECKING is defined.
+
+ * src/common/thread.cxx (exit): If verbose stack measurement enabled,
+ output stack usage
+ (increment_stack_limit): Add version of this method when
+ CYGFUN_KERNEL_THREADS_STACK_CHECKING *is* defined. This will add
+ padding above the stack limit as necessary.
+
+ * include/thread.hxx (class Cyg_HardwareThread): Add
+ measure_stack_usage() member
+
+ * cdl/thread.cdl (CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT):
+ Add to implement stack usage measurement.
+
+ * include/kapi.h (cyg_thread_measure_stack_usage): New function
+ * src/common/kapi.cxx (cyg_thread_measure_stack_usage): New function
+
+2000-12-08 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/thread.cdl (CYGFUN_KERNEL_ALL_THREADS_STACK_CHECKING):
+ Requires threads list, rather than active_if them so that
+ inference engine can do its thang.
+
+2000-12-07 Jesper Skov <jskov@redhat.com>
+
+ * src/debug/dbg-thread-demux.c: Add comment about the use of
+ DBG_SYSCALL_THREAD_VEC_NUM vs CYGNUM_CALL_IF_DBG_SYSCALL.
+
+2000-12-06 Hugo Tyson <hmt@redhat.com>
+
+ * include/thread.inl (attach_stack): Additional assert check for
+ unsigned wrap of the stack size in subtracting the signature
+ areas' size. Also round to whole words better.
+
+2000-12-05 Hugo Tyson <hmt@redhat.com>
+
+ * cdl/thread.cdl (CYGFUN_KERNEL_THREADS_STACK_CHECKING): New
+ option, to control new stack check features. Enabled by default,
+ but only active if CYGPKG_INFRA_DEBUG and CYGDBG_USE_ASSERTS
+ anyway, plus checking *all* threads is possible, but default off,
+ iff CYGVAR_KERNEL_THREADS_LIST.
+
+ * include/thread.hxx (class Cyg_HardwareThread): Define
+ check_stack() function.
+
+ * include/thread.inl (attach_stack): Add initialization of a
+ signature in the top and base of the stack, if so configured.
+ (check_stack): New function to check that signature for
+ correctness; minor re-ordering to permit more inlining.
+
+ * src/sched/sched.cxx (unlock_inner): Check departing and incoming
+ thread stacks if CYGFUN_KERNEL_THREADS_STACK_CHECKING. Also, if
+ CYGFUN_KERNEL_ALL_THREADS_STACK_CHECKING, check all registered
+ thread stacks. This is placed here to get executed every
+ clocktick and other interrupts that call DSRs, rather than messing
+ with interrupt_end() or the idle thread.
+
+2000-12-04 Hugo Tyson <hmt@redhat.com>
+
+ * tests/kcache2.c (entry0): Make this more robust against a
+ complete absence of useful caches. Previous change was not
+ careful enough.
+
+2000-12-01 Hugo Tyson <hmt@redhat.com>
+
+ * cdl/kernel.cdl: Build the kcache tests for SA11x0 family; they
+ were being omitted by default as part of ARM family. They work on
+ SA1110, so this should be OK. They're OK on EBSAs too. See
+ associated fix to cache macros in SA11x0 and EBSSA HALs.
+
+ * tests/kcache2.c (entry0): Fix the test; the problem was it
+ assumed that a write to a previously unseen location would end up
+ in the cache. It ain't so on StrongARMs. Also make tests safe
+ wrt interrupts possibly perturbing the cache, add explicit tests
+ for HAL_DCACHE_INVALIDATE_ALL(), ...DISABLE() and ...SYNC(), and
+ improve the tests for cache line invalidate and store.
+
+2000-10-30 Jesper Skov <jskov@redhat.com>
+
+ * cdl/synch.cdl: Replaced CYGINT_KERNEL_SCHEDULER_CAN_YIELD with
+ CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES.
+ * cdl/scheduler.cdl:
+ CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL requires
+ CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES.
+
+ * tests/thread2.cxx: Use new option.
+ * tests/klock.c: Same.
+ * src/common/thread.cxx: Same.
+ * src/common/clock.cxx: Same.
+
+ * include/bitmap.hxx: Leave unique priority setting to CDL.
+ * include/mlqueue.hxx: Same.
+ * include/sched.hxx: Let CDL do sanity check of config.
+
+2000-10-27 Jesper Skov <jskov@redhat.com>
+
+ * cdl/scheduler.cdl: Added CYGINT_KERNEL_SCHEDULER_CAN_YIELD
+
+ * tests/klock.c: Avoid use of disabled features. Require scheduler
+ that can yield.
+
+2000-10-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * tests/bin_sem0.cxx:
+ * tests/bin_sem1.cxx:
+ * tests/bin_sem2.cxx:
+ * tests/clock0.cxx:
+ * tests/clock1.cxx:
+ * tests/clockcnv.cxx:
+ * tests/cnt_sem0.cxx:
+ * tests/cnt_sem1.cxx:
+ * tests/except1.cxx:
+ * tests/flag0.cxx:
+ * tests/flag1.cxx:
+ * tests/intr0.cxx:
+ * tests/kill.cxx:
+ * tests/mbox1.cxx:
+ * tests/mqueue1.cxx:
+ * tests/mutex0.cxx:
+ * tests/mutex1.cxx:
+ * tests/mutex2.cxx:
+ * tests/mutex3.cxx:
+ * tests/philo.cxx:
+ * tests/release.cxx:
+ * tests/sched1.cxx:
+ * tests/sync2.cxx:
+ * tests/sync3.cxx:
+ * tests/testaux.hxx:
+ * tests/thread0.cxx:
+ * tests/thread1.cxx:
+ * tests/thread2.cxx:
+ * tests/tm_basic.cxx:
+ Make sure default priority constructors have been invoked.
+
+ * include/intr.hxx (class Cyg_Interrupt): Make dsr_count volatile
+ to prevent a potential race condition with overzealous C
+ compilers.
+
+2000-10-13 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/sched/sched.cxx (unlock_inner): Added condition to test for
+ DSRs to only call DSRs when the scheduler lock is making a 0->1
+ transition. Otherwise there is the danger of calling DSRs when the
+ scheduler lock is > 1. This violates our original assumptions
+ about how the scheduler lock worked with respect to DSR.
+
+ * src/intr/intr.cxx (call_pending_DSRs): Added assert to check
+ that DSRs are only called when the scheduler lock is exactly 1.
+
+2000-10-13 Jesper Skov <jskov@redhat.com>
+
+ * include/intr.hxx: Fixing syntax mistake; volatile keyword must
+ appear after the type for it to affect the pointer variable.
+ * src/intr/intr.cxx: Same. Remove volatile from local block.
+
+2000-10-05 Jesper Skov <jskov@redhat.co.uk>
+
+ * src/intr/intr.cxx: Made dsr_table_tail volatile as well.
+ * include/intr.hxx: Ditto.
+
+2000-10-05 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/sched/sched.cxx:
+ * include/sched.hxx: Converted asr_inhibit from a bool to a
+ counter. This is necessary to permit nesting of ASR inhibiting
+ functions.
+
+2000-10-04 Jesper Skov <jskov@redhat.co.uk>
+
+ * include/intr.hxx: Made dsr_list volatile.
+ * src/intr/intr.cxx: Same. Also fix compiler warning.
+
+2000-09-25 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/sched/mlqueue.cxx:
+ Added test for current thread not runnable in
+ Cyg_Scheduler_Implementation::timeslice(). This is possible if a
+ prior DSR has caused the current thread to be descheduled. Added
+ an assert to Cyg_ThreadQueue_Implementation::rotate() for
+ additional paranoia. (This problem was originally identified and
+ fixed (differently) by Andrew Lunn <andrew.lunn@ascom.ch>.)
+
+2000-09-13 Jesper Skov <jskov@redhat.com>
+
+ * tests/kexcept1.c (cause_exception): Use separate cause_fpe function.
+ * tests/except1.cxx (cause_exception): Same.
+
+ * tests/kexcept1.c (cause_exception): Do not use division at all.
+ * tests/except1.cxx (cause_exception): Same.
+
+ * tests/kexcept1.c (cause_exception): Do not cause div-by-zero.
+ * tests/except1.cxx (cause_exception): Same.
+
+2000-09-11 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/instrument.cdl (CYGVAR_KERNEL_INSTRUMENT_EXTERNAL_BUFFER):
+ Bring this option back from the dead
+
+2000-09-08 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/sched.hxx:
+ * include/sched.inl:
+ Added Cyg_Scheduler::unlock_reschedule() function. This decrements
+ the scheduler lock by one but also permits the current thread to
+ be rescheduled if it ready to sleep, or there is a higher priority
+ thread ready to run. This is to support use of various
+ synchronization objects while the scheduler lock is claimed.
+
+ * src/sched/sched.cxx (unlock_inner): Modified precondition to
+ allow for functionality of unlock_reschedule().
+
+ * src/sched/mlqueue.cxx:
+ Now uses Cyg_SchedulerThreadQueue_Implementation for all runqueue
+ pointers. It was using Cyg_ThreadQueue_Implementation in some
+ places which meant we were trying to sort the run queues!
+ Changed yield() so it can be called with the scheduler lock
+ claimed.
+ Changed Cyg_Scheduler_Implementation::timeslice() to rotate the
+ queue itself rather than call yield(). The changes to yield() make
+ it unsafe to call here any more.
+
+ * include/mlqueue.hxx (class Cyg_SchedulerThreadQueue_Implementation):
+ Made enqueue() member public.
+
+ * include/mboxt2.inl:
+ * src/common/thread.cxx:
+ * src/sync/mutex.cxx:
+ * src/sync/cnt_sem2.cxx:
+ Removed assertions for zero scheduler lock and replaced some
+ invocations of Cyg_Scheduler::unlock() with
+ Cyg_Scheduler::unlock_reschedule() or Cyg_Scheduler::reschedule()
+ where appropriate.
+
+ * tests/klock.c:
+ * cdl/kernel.cdl:
+ Added klock.c to test functionality while scheduler lock is claimed.
+
+2000-08-17 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/sched/sched.cxx (unlock_inner): Move an assert to some place
+ where it's true *all* the time! There was a narrow margin where a
+ DSR could confuse unlock_inner() by reanimating the current thread
+ before it had a chance to sleep - hence the call appears to be
+ pointless. Putting the assert before the DSR calls makes sense.
+
+ * include/mboxt.inl:
+ * src/sync/bin_sem.cxx:
+ * src/sync/cnt_sem.cxx:
+ * src/sync/flag.cxx:
+ * src/sync/mutex.cxx:
+ All of these now use Cyg_Scheduler::reschedule() rather than an
+ unlock/lock pair to yield in their functions which can sleep.
+ They therefore can be called safely and atomically with the
+ scheduler already locked. This is a Good Thing[tm]. Since the
+ network stack synch primitives now use this feature, the asserts
+ that the scheduler was not locked must disappear: this change.
+
+
+2000-08-07 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/mutex.hxx (class Cyg_Mutex): Add comment explaining
+ presence of locked.
+
+2000-08-04 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * tests/stress_threads.c (STACK_SIZE_HANDLER): Increase stack sizes
+ otherwise it crashes!
+
+2000-07-31 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/mempolt2.hxx: As per change of 2000-07-04, also delete - left
+ behind accidentally
+
+2000-07-20 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/mutex.hxx (class Cyg_Mutex): Added get_ceiling()
+ accessor function.
+
+ * src/sched/mlqueue.cxx: Fixed bug in sorted queue code that
+ resulted in an infinite loop if the thread being inserted is of
+ lower priority than all threads in the queue. This case is now
+ detected early.
+
+2000-07-17 Gary Thomas <gthomas@redhat.com>
+
+ * tests/kflag1.c (FIRST_THREAD_WAIT_TIME): Parameterize thread
+ synchronization wait times (for understanding) and adjust for
+ incredibly slow platforms. [Previous value allowed for the test
+ to get out of sync because the code ran so slowly]
+
+2000-07-04 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/kernel.cdl: Remove all configury related to memory allocators,
+ including tests. Make CYGFUN_KERNEL_API_C require CYGFUN_MEMALLOC_KAPI
+
+ * include/memfixed.hxx, include/mempolt2.inl, include/mempoolt.hxx,
+ include/mempoolt.inl, include/memvar.hxx, include/mfiximpl.hxx,
+ include/mfiximpl.inl, include/mvarimpl.hxx, include/mvarimpl.inl,
+ src/mem/memfixed.cxx, src/mem/memvar.cxx, tests/kmemfix1.c,
+ tests/kmemvar1.c, tests/memfix1.cxx, tests/memfix2.cxx,
+ tests/memvar1.cxx, tests/memvar2.cxx:
+ Move to separate memory allocator package CYGPKG_MEMALLOC
+
+ * include/kapi.h, include/kapidata.h, src/common/kapi.cxx:
+ Remove memory allocator functionality - now implemented in
+ CYGPKG_MEMALLOC
+
+ * tests/dhrystone.c:
+ Update configuration dependencies for new isoinfra design
+ * tests/stress_threads.c:
+ Likewise.
+ Also fix early termination after DEATH_TIME_LIMIT so that
+ allocated resources are freed, and so more appropriate
+ statistics are reported
+ Also update to use mallinfo() interface to memory allocator
+
+2000-06-23 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/kapi.h (cyg_scheduler_read_lock): New function, to
+ return the value of the scheduler lock; this for implementing SPLX
+ in the network stack.
+
+ * src/common/kapi.cxx (cyg_scheduler_read_lock): New function.
+
+2000-06-20 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/sched/mlqueue.cxx (Cyg_ThreadQueue_Implementation::enqueue):
+ Rewrote code to insert threads into priority sorted queue. The
+ original code could not cope with a queue all of whose members
+ were lower priority than the new thread - it looped for ever. Also
+ provided fast paths for common and easily detected cases such as
+ adding to a single element queue and adding at the front. By
+ taking these cases out early, we can also simplify the code to
+ search the queue.
+
+2000-06-16 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/kernel.cdl: Remove exception tests for CMA230 - not supported
+ by hardware.
+
+2000-06-16 Jesper Skov <jskov@redhat.com>
+
+ * src/intr/intr.cxx (chain_isr): Only call default_isr if no isrs
+ in the chain reacted to the interrupt.
+
+2000-06-15 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/mutex.hxx (class Cyg_Condition_Variable): Added an
+ inline function, get_queue(), to return a pointer to the
+ underlying thread queue. To be used mainly for comparing with a
+ thread's current queue to decide whether it is waiting for a
+ condition variable.
+
+ * include/kapi.h:
+ * src/common/kapi.cxx:
+ Changed return type of cyg_semaphore_wait() to match existing
+ behaviour of Cyg_Counting_Semaphore::wait().
+ Changed return type of cyg_cond_wait() to match new behaviour of
+ Cyg_Condition_Variable::wait().
+
+2000-06-09 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/mutex.hxx:
+ * src/sync/mutex.cxx:
+ Modified non-timeout condition variable wait() API to return
+ cyg_bool. A true result indicates that the wait() terminated
+ normally. A false result indicates that the wait() was terminated
+ as a result of a release() or destroy operation. For most uses
+ this distinction is irrelevant, but in some situations it is a
+ useful bit of information to have.
+ Also modified timeout condition variable wait to reacquire the
+ mutex under all circumstances. This is the correct and consistent
+ thing to do.
+
+2000-06-08 Jesper Skov <jskov@redhat.com>
+
+ * src/debug/dbg-thread-demux.c: Use generic HAL feature to allow
+ ROM/RAM intercalling.
+
+2000-06-06 Jesper Skov <jskov@redhat.com>
+
+ * tests/kcache1.c (entry0): Skip invalidate tests on TX49. Too slow.
+
+2000-05-30 Gary Thomas <gthomas@redhat.com>
+
+ * tests/dhrystone.c: Increase number of test loops for faster
+ StrongARM platforms.
+
+2000-05-22 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/scheduler.cdl (CYGIMP_KERNEL_SCHED_SORTED_QUEUES): Disable by
+ default
+
+ * src/sched/mlqueue.cxx (enqueue): Add to end of thread queue even
+ when not priority ordered
+
+2000-05-20 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/mqueue.hxx, include/mqueue.inl:
+ Add POSIX-style message queue implementation
+
+ * cdl/kernel.cdl: Add mqueue1 test
+ * cdl/scheduler.cdl: Add new CYGIMP_KERNEL_SCHED_SORTED_QUEUES option
+
+ * include/sema.hxx: Need thread.inl header, not just thread.hxx
+ Make Cyg_Counting_Semaphore::peek() const since it is
+
+ * src/sync/cnt_sem.cxx, src/sync/cnt_sem2.cxx, include/sema2.hxx:
+ Make Cyg_Counting_Semaphore{2}::peek() const since it is
+
+ * include/thread.hxx: don't want Cyg_Thread_queue::empty() to be marked
+ inline in the class def, otherwise we get warnings elsewhere
+
+ * include/mlqueue.hxx (Cyg_ThreadQueue_Implementation):
+ Add set_thread_queue private method
+ Add derived class Cyg_SchedulerThreadQueue_Implementation, and
+ make scheduler implementation use it instead of
+ Cyg_ThreadQueue_Implementation
+
+ * src/mlqueue.cxx: Fix typo
+ Support CYGIMP_KERNEL_SCHED_SORTED_QUEUES, i.e. allow insertion
+ into thread queue in order of thread priority, with oldest at the
+ front
+ (Cyg_ThreadQueue_Implementation::set_thread_queue): Add
+ (Cyg_SchedulerThreadQueue_Implementation::enqueue): Add, like old
+ one, except make it FIFO instead of LIFO by inserting at end of queue
+
+2000-05-16 Jesper Skov <jskov@redhat.com>
+
+ * tests/dhrystone.c: More loops on the TX49
+
+2000-05-15 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/counters.cdl (CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY):
+ Default to CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY
+
+2000-05-04 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/instrmnt.h: Remove all CYG_UNUSED_PARAMs as they could
+ cause problems when used with volatile arguments
+ * src/intr/intr.cxx: Use CYG_UNUSED_PARAM to silence warning that
+ appears because of the above change.
+
+2000-05-02 Gary Thomas <gthomas@redhat.com>
+
+ * tests/kintr0.c:
+ * tests/intr0.cxx: Correct test for cases when VSR_MIN or
+ ISR_MIN are not zero (bad assumption).
+
+2000-05-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/thread.cdl (CYGNUM_KERNEL_THREADS_DATA_LIBC): Don't need libc
+ slot. Replace with CYGNUM_KERNEL_THREADS_DATA_ERRNO slot instead.
+
+2000-04-28 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/sched/sched.cxx (unlock_inner):
+ A significant change to the behaviour of this function. The
+ new_lock argument contains the value that the scheduler lock
+ should have after this function has completed. If it is zero then
+ the lock is being released and some extra work (running ASRs,
+ checking for DSRs) is done before returning. If it is non-zero
+ then it must equal the current value of the lock, and is used to
+ indicate that we want to reacquire the scheduler lock before
+ returning. This latter option only makes any sense if the current
+ thread is no longer runnable, otherwise this function will do
+ nothing.
+
+ The result of this is that where we used to "blip" the scheduler
+ lock to force a sleep, we now call reschedule(), which calls
+ unlock_inner() with the current sched_lock value. The important
+ difference is that there is not now the brief window between the
+ calls where the lock is unclaimed. It also prevents ASRs being run
+ at inopportune moments. In future this will also allow us to force
+ threads to sleep even when they are deeply nested in the scheduler
+ lock.
+
+ * include/mutex.hxx:
+ Added Cyg_Mutex::get_owner() to return pointer to owning thread.
+
+ * include/sched.hxx:
+ * include/sched.inl:
+ Added new_lock argument to unlock_inner(), added reschedule().
+ Made set_asr_inhibit() and clear_asr_inhibit() available even when
+ ASRs are disabled.
+
+ * include/mboxt.inl:
+ * src/sync/bin_sem.cxx:
+ * src/sync/cnt_sem.cxx:
+ * src/sync/flag.cxx:
+ * src/sync/mutex.cxx:
+ Converted instances of "blipping" the scheduler lock into calls to
+ Cyg_Scheduler::reschedule(), which is better behaved. Some calls
+ to set_asr_inhibit() and clear_asr_inhibit() also added in various
+ places.
+
+2000-04-26 Jesper Skov <jskov@redhat.com>
+
+ * tests/kcache1.c: Also to flush testing with unified caches.
+
+2000-04-26 Jesper Skov <jskov@redhat.com>
+
+ * tests/clockcnv.cxx:
+ * tests/dhrystone.c:
+ Renamed 850 HAL package.
+
+2000-04-25 Jesper Skov <jskov@redhat.com>
+
+ * tests/kcache1.c: Fixed cache check to also look for unified
+ caches.
+
+2000-04-19 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/clockcnv.cxx:
+ * tests/dhrystone.c:
+ Only a few laps around the block on the v850...
+
+2000-04-13 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/clock.hxx:
+ * src/common/clock.cxx:
+ Added Cyg_Alarm::get_times() member function to allow reading of
+ trigger and interval values from an alarm.
+
+2000-04-12 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/sched.hxx:
+ * src/sched/sched.cxx:
+ Added ASR support.
+
+ * include/thread.hxx:
+ Made Cyg_ThreadQueue::empty() an inline in class definition.
+
+ * src/common/thread.cxx:
+ Added CYG_REPORT_FUNCTION() to Cyg_Thread::exit().
+
+ * include/kapidata.h:
+ Brought thread structures up to date with kernel objects.
+
+ * cdl/thread.cdl:
+ * cdl/scheduler.cdl:
+ Added ASR configuration, minor tidies.
+
+2000-04-12 Gary Thomas <gthomas@redhat.com>
+
+ * src/common/kapi.cxx (cyg_scheduler_safe_lock):
+ * include/kapi.h: Add 'cyg_scheduler_safe_lock()' function.
+
+2000-04-12 Jesper Skov <jskov@redhat.com>
+
+ * cdl/interrupts.cdl:
+ * cdl/scheduler.cdl:
+ * cdl/counters.cdl:
+ Don't let interfaces define anything.
+
+2000-04-07 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/sched.hxx:
+ * include/thread.inl:
+ * src/sync/mutex.cxx:
+ * src/sched/sched.cxx:
+ * src/common/thread.cxx:
+ General reorganization of priority inversion protocol support,
+ addition of priority ceiling protocol.
+
+ * include/mlqueue.hxx:
+ * src/sched/mlqueue.cxx:
+ Added timeslicing enable support.
+
+ * cdl/thread.cdl:
+ * cdl/synch.cdl:
+ Reorganized priority inversion protocol configuration to permit
+ different protocols and dynamic choice. Added configuration for
+ condition variables to use a user-specified mutex.
+
+ * cdl/scheduler.cdl:
+ Added dynamic timeslicing enable option.
+
+ * include/kapidata.h:
+ Adjusted to match changes in other header files.
+
+ * tests/mutex3.cxx:
+ * tests/sync3.cxx:
+ Modified these tests to match new priority inversion protocols
+ configuration options.
+
+2000-03-28 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/counters.cdl,
+ cdl/interrupts.cdl,
+ cdl/kernel.cdl,
+ cdl/scheduler.cdl,
+ cdl/synch.cdl,
+ cdl/thread.cdl:
+
+ Adjust documentation URLs.
+
+2000-03-27 Gary Thomas <gthomas@redhat.com>
+
+ * tests/except1.cxx:
+ * tests/kexcept1.c: Avoid trying to generate data access errors
+ on platforms that don't support them.
+
+ * tests/kcache1.c: Ignore test if no [data] caches defined.
+
+ * tests/stress_threads.c: Infer minimal configuration for platforms
+ with small amount of memory (as opposed to platform special cases).
+
+2000-03-27 Jesper Skov <jskov@redhat.com>
+
+ * src/sync/mutex.cxx:
+ * src/sched/sched.cxx:
+ * src/common/thread.cxx:
+ * src/common/clock.cxx:
+ Use cyg_bool instead of bool for check_this().
+
+ * tests/dhrystone.c: Requires CYGPKG_LIBC_MALLOC
+
+2000-03-07 Jesper Skov <jskov@redhat.com>
+
+ * tests/mutex3.cxx: Minor tweak from Hugo to allow reduced runtime
+ on sims.
+
+2000-02-29 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/debug/dbg-thread-demux.c:
+ CYG_HAL_SPARCLITE_SLEB -> CYGPKG_HAL_SPARCLITE_SLEB
+ Also fix a comment typo
+
+2000-02-29 Jesper Skov <jskov@redhat.com>
+
+ * tests/kcache1.c: Don't run last part of test on MIPS sim - it's
+ very slow.
+
+2000-02-25 Jesper Skov <jskov@redhat.com>
+
+ * tests/dhrystone.c:
+ * tests/tm_basic.cxx:
+ Don't allow use of devices for diag output when running performace
+ tests.
+
+2000-02-17 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/pkgconf/kernel.h: Make
+ CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE a cdl_component
+ since it has children now
+
+2000-02-17 Jesper Skov <jskov@redhat.com>
+ CR101202, CR902078
+ * include/mvarimpl.inl: Avoid unlinking the list from the head
+ during coalescing.
+
+2000-02-11 Jesper Skov <jskov@redhat.com>
+
+ * tests/dhrystone.c (PASSES): Reduced for MPC8xx targets.
+
+2000-02-10 Jesper Skov <jskov@redhat.com>
+
+ * tests/except1.cxx (except0_main):
+ * tests/kexcept1.c (except0_main):
+ Also reclaim DATA_TLB_MISS vector if available.
+
+2000-02-03 Jesper Skov <jskov@redhat.com>
+
+ * src/sched/lottery.cxx (schedule): CYG_HAL_POWERPC_x->CYGPKG_...
+
+2000-02-01 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * tests/tm_basic.cxx (NTEST_THREADS): Reduce further to fit on small
+ targets
+ (NMBOXES): Likewise
+ (NCOUNTERS): Likewise
+
+ * src/common/clock.cxx: Rework last change - change types of
+ clock_dsr_read and delta to unsigned instead
+
+2000-01-31 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/common/clock.cxx (isr): Use HAL_CLOCK_LATENCY, not HAL_CLOCK_READ
+ (dsr): Likewise
+
+ * cdl/counters.cdl (CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY):
+ Copy configury for this option here from include/pkgconf/kernel.h - it
+ was left behind by accident
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-31 Jesper Skov <jskov@redhat.com>
+
+ * tests/tm_basic.cxx: Use CYG_TEST_NA insetad of PASS when not
+ applicable.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-26 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/clock.hxx (class Cyg_Clock): Add members to convert to
+ and from this clock resolution and others.
+
+ * include/clock.inl (convert): New Cyg_Clock member.
+
+ * src/common/clock.cxx (construct_converter): New routine to
+ factorize a rational (or very near neighbour) to help with clock
+ tick conversions for a particular clock.
+ (get_other_to_clock_converter):
+ (get_clock_to_other_converter): Cyg_Clock member functions to
+ construct converters to or from this clock, using above routine.
+
+ * tests/clockcnv.cxx: New file: test the clock converters.
+
+ * tests/PKGconf.mak (TESTS): Add clockcnv to the tests.
+
+ * cdl/kernel.cdl: Add clockcnv to the tests.
+
+2000-01-20 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/synch.cdl
+ (CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE_RELAY):
+ Change this to an active_if on simple prio-inh. Was broken.
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+ Also reorganized calculated opts about per-thread-data in
+ thread.cdl; these are really for info only.
+
+2000-01-19 Jesper Skov <jskov@cygnus.co.uk>
+ CR 902054
+ * tests/stress_threads.c: Don't assert requested priority =
+ allocated. Allow some flexibility of handler priorities.
+
+2000-01-13 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/mutex3.cxx (control_thread): Add a CYG_TEST_INIT();
+ Whoops!
+
+2000-01-11 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/kernel.cdl: Add new kernel test mutex3, put in to test
+ RELAY prio inheritance extension.
+
+ * tests/mutex3.cxx: New test case. It tests mutex prio
+ inheritance - or not - in a multiple thread manner, depending only
+ on delays and the clock, so it tests that scheduling does the
+ right thing, rather than simply checking reported priorities.
+
+ * tests/PKGconf.mak: Add new kernel test mutex3, put in to test
+ RELAY prio inheritance extension.
+
+2000-01-11 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/synch.cdl: New config option added,
+ (CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE_RELAY).
+
+ * include/pkgconf/kernel.h: New config option added,
+ (CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE_RELAY).
+ It is a child of ..._PRIORITY_INHERITANCE_SIMPLE and is really
+ only there to turn off if you really want the old implementation.
+
+ * src/sync/mutex.cxx (unlock): Add call to
+ Cyg_SchedThread::relay_priority() when relinquishing the mutex, in
+ order to relay any raised priority to the new owner. Also count
+ the mutex we are waiting for as well as those held for correct
+ recovery in the case of inheriting priority then being killed, for
+ example.
+
+ * include/sched.hxx (class Cyg_SchedThread::relay_priority): New
+ member function declared.
+
+ * src/sched/sched.cxx (Cyg_SchedThread::relay_priority): New
+ member function to implement pass-it-on or "discovered ceiling"
+ priority inheritance extension to the simple algorithm. Also use
+ get_current_priority() in Cyg_SchedThread::inherit_priority() to
+ let this work.
+
+2000-01-11 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/clock.hxx (class Cyg_Counter::counter): make the counter
+ volatile, otherwise a busy-wait loop for the real time clock to
+ change never completes.
+
+1999-12-23 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/sched/sched.cxx (inherit_priority): Fix bug; inheriting a
+ 2nd time would overwrite the saved initial_priority, so
+ disinheriting had no effect.
+
+1999-12-13 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/tm_basic.cxx (run_alarm_tests): Add new measurement of
+ latency between alarm firing and thread resume
+
+1999-12-13 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * cdl/kernel.cdl: Fix some minor mistakes in the lists of tests to
+ build conditionally
+
+1999-12-08 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/kernel.cdl:
+
+ Conditionally build the tests 'stress_threads', 'kcache1' and
+ 'kcache2'.
+
+1999-11-30 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/common/kapi.cxx (cyg_scheduler_lock, cyg_scheduler_unlock):
+ assert good range for sched lock, and be defensive anyway. This
+ is in response to a long time taken to track down a "unlocked too
+ many times" bug.
+
+1999-11-24 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/tm_basic.cxx: Size tests based on available resources,
+ using MLT files. Fall back if not available.
+
+1999-11-22 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/sched/bitmap.cxx (Cyg_Scheduler_Implementation::add_thread):
+ Fixed typo in assertion, and moved it to a more useful place.
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/kernel.cdl: Define all tests.
+
+1999-10-29 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/PKGconf.mak: Enable cache tests for Cirrus Logic boards.
+
+1999-10-27 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/kernel.cdl:
+
+ Specify CYGPKG_KERNEL_TESTS in terms of testing
+ source files.
+
+1999-10-26 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/kernel.cdl:
+
+ Define initial version of CYGPKG_KERNEL_TESTS for
+ verification purposes.
+
+1999-10-19 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/kernel.cdl:
+
+ Define CDL options for package-specific CFLAGS.
+
+1999-10-08 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/kcache1.c: Fix array size.
+
+ * src/sched/bitmap.cxx (add_thread):
+ * src/sched/mlqueue.cxx (add_thread):
+ Check for valid thread priority.
+
+1999-10-07 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/counters.cdl,
+ cdl/interrupts.cdl,
+ cdl/scheduler.cdl:
+
+ Specify radio buttons using CDL interfaces.
+
+1999-10-06 Bart Veer <bartv@cygnus.co.uk>
+
+ * cdl/scheduler.cdl:
+ Make the schedulers mutually exclusive via a cdl_interface
+
+1999-10-05 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/kcache1.c: Reduced memory footprint.
+
+1999-09-25 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stress_threads.c: Added date header and flush() calls.
+
+1999-09-16 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/tm_basic.cxx (run_mutex_tests): Must unlock mutices before
+ destroying, given the change below.
+
+ * src/common/kapi.cxx (cyg_cond_destroy): Call the correct
+ destructor. As it happens, it didn't matter because all these
+ destructors do is assert the queue is empty, and the queue is the
+ 2nd word in every case.
+ (cyg_mutex_destroy): Call the destructor at all, so that
+ assertions are made.
+
+1999-09-13 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/intr/intr.cxx (call_pending_DSRs_inner): Add assert to check
+ for valid DSR (before trying to use it).
+
+1999-09-13 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stress_threads.c: Print out malloc system info.
+ (print_statistics): Fix buglet.
+
+1999-09-10 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stress_threads.c: Print out more info. Reduce dump
+ frequency as test runs.
+
+1999-08-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h: Add missing close brace in
+ CYGIMP_KERNEL_COUNTERS_CLOCK_LATENCY CDL.
+
+1999-08-24 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/kcache1.c (entry0): Depending on architecture, set
+ cyg_test_is_simulator for last two tests. Otherwise they take far
+ too long and time out.
+
+1999-08-23 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/intr0.cxx (vsr0):
+ * tests/kintr0.c (vsr0):
+ Add a comment to the effect that vsr0() is NOT a valid VSR on any
+ known platform; VSRs must be writ in assembler. Customer
+ requested this, the examples are rather confusing otherwise.
+
+1999-08-23 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ * src/common/clock.cxx:
+ * tests/tm_basic.cxx:
+ Added CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY to enable recording
+ of DSR latency figures. Added code controlled by this option to
+ clock and tm_basic. Also made interrupt latency measurement
+ primarily dependent on CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY since
+ whether HAL_CLOCK_LATENCY is defined is not sufficient.
+
+1999-08-17 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/counters.cdl, cdl/interrupts.cdl, cdl/scheduler.cdl:
+
+ Implement radio buttons using "FIXME radio" hack in
+ description field for now.
+
+1999-08-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/sload/sload.c: Rename AM32 to AM31
+
+1999-08-12 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/debug/dbg_gdb.cxx (dbg_make_threadref): Extended test for
+ uninitialized thread pointer.
+
+1999-07-29 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/sync/mutex.cxx (lock): Removed assertion again. Not possible
+ to determine if a violation wil cause a deadlock.
+
+1999-07-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/sync/mutex.cxx (lock): Added simple assertion check for
+ deadlocks.
+
+ * tests/stress_threads.c: Only allow printf from main thread to
+ prevent deadlocks.
+
+1999-07-14 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/kcache1.c (entry0): Also perform timing tests with
+ HAL_DCACHE_INVALIDATE_ALL and/or HAL_ICACHE_INVALIDATE_ALL in the
+ loop if provided by the HAL. Invalidating the Data cache can
+ spoil clock operation, so elapsed time appears to be 0.
+
+ * tests/kcache2.c (entry0): Replace the "if (0)" for having a
+ copy-back cache with a proper test on a HAL macro. Even though I
+ couldn't actually get those parts of the test to work on the
+ platform I'm currently working on.
+
+ * tests/PKGconf.mak (TESTS): Do build kcache1 and kcache2 for the
+ ARM_EBSA285; it seems kosher. kcache2 does absolutely nothing, of
+ course.
+
+1999-07-09 Jesper Skov <jskov@cygnus.co.uk>
+ PR 20210, 20142
+ * tests/stress_threads.c: Shifted thread priorities to make room
+ for main() at priority 0.
+
+ Fixed indentation.
+
+1999-07-08 Jesper Skov <jskov@cygnus.co.uk>
+ PR 20244
+ * tests/stress_threads.c: Changed cyg_user_start() to main()
+ ensuring a bigger stack (it calls sprintf).
+ Increased STACK_SIZE by 2kB for printf calls.
+
+1999-06-30 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/dhrystone.c: Also NA-quit if CYGPKG_INFRA_DEBUG or
+ CYGPKG_KERNEL_INSTRUMENT are enabled.
+
+1999-06-23 Jesper Skov <jskov@cygnus.co.uk>
+ PR 20209
+ * tests/dhrystone.c: Use fewer loops on ARM targets - they don't
+ have a cache.
+
+1999-06-22 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/intr/intr.cxx (Cyg_Interrupt::chain_isr): Was testing the wrong
+ macro for the default ISR. Fixed.
+
+ * src/common/clock.cxx (Cyg_RealTimeClock::isr): Add HANDLED bit
+ to returned value.
+
+1999-06-21 Jesper Skov <jskov@cygnus.co.uk>
+ PR 20209
+ * tests/dhrystone.c: Don't run test on sims or synthetic target.
+ Only run test when compiled with optimization.
+
+1999-06-18 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/dhrystone.c: Added unsupported header.
+
+1999-06-10 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/debug/dbg_gdb.cxx (dbg_threadinfo): Report counted sleep
+ correctly; both COUNTSLEEP and SLEEPING are set.
+
+1999-06-01 Hugo Tyson <hmt@masala.cygnus.co.uk>
+
+ * src/debug/dbg_gdb.cxx (dbg_threadinfo): Make the thread state
+ string a little more sensible when read as plain english.
+
+1999-05-31 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/dhrystone.c:
+ * tests/PKGconf.mak (TESTS):
+ Added dhrystone test.
+
+ Updated to 2.1 from ftp.nosc.mil
+
+1999-05-27 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/intr/intr.cxx (Cyg_Interrupt::chain_isr): Calls
+ HAL_DEFAULT_ISR if it is defined and no chained ISRs have
+ reported that they have handled the interrupt.
+
+ * src/debug/dbg_gdb.cxx (dbg_make_threadref): Fixed this routine
+ so that it copes with a NULL thread object.
+
+1999-05-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stress_threads.c: Output stackmon status
+ occasionally. Output (simple) run time.
+
+1999-05-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/kcache1.c: Added handling of unified caches.
+
+1999-05-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/test/stackmon.h: Fixed some typos and thinkos.
+
+ * tests/tm_basic.cxx: Include new stackmon header.
+
+ * src/common/kapi.cxx:
+ * include/kapi.h:
+ Added kapi support for stackmon requirements.
+
+ * include/stackmon.hxx: [deleted]
+ * include/test/stackmon.h: [added]
+ Made stackmon safe to use from both C and C++.
+
+1999-05-25 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stress_threads.c (setup_death_alarm): Only compile when
+ DEATH_TIME_LIMIT is defined.
+
+1999-05-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/except1.cxx:
+ * tests/intr0.cxx (intr0_main):
+ * tests/kexcept1.c:
+ * tests/kintr0.c (kintr0_main):
+ Change all mentions of CYG_HAL_TX39[_JMR3904] to
+ CYG_HAL_MIPS_TX39[_JMR3904]
+
+ * tests/kcache1.c: Use HAL_DCACHE_SYNC if possible
+
+1999-05-20 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/tm_basic.cxx (run_all_tests): Added some more stack stats
+ output using stackmon.hxx; also fixed a BUG associated with the
+ definition of stacks in testaux.hxx (within tests dir) that was
+ making the main stack usage bogus.
+
+ * include/stackmon.hxx: new file, to ease printing stuff about
+ stack usage, particularly of interrupt stacks and the idle
+ thread. It's not HAL specific, and it can apply to tests outside
+ of the kernel, which is why it's in a public include-place.
+ It just contains inline functions which define empty if there's no
+ handle on the symbols available, so should be safe enough.
+
+1999-05-18 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stress_threads.c (main_program): Changed behavior of
+ cyg_thread_delete caller.
+
+1999-05-18 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/kapi.h (cyg_thread_delete): is now a boolean function to
+ indicate success. Failure is when the thread needs to run in
+ order to become killed.
+
+ * src/common/kapi.cxx (cyg_thread_delete): Try killing the thread
+ if necessary before deleting; only run the destructor if it was
+ killed, and tell the caller so.
+ (cyg_thread_kill): Back to the simpler version with no priority
+ diddling; it's up to the called to determine that it _has_ died.
+
+ * src/common/thread.cxx (kill): Only perform the state-changes
+ implied by kill if the thread has not already been killed;
+ otherwise two kill()'s will remove a thread unconditionally,
+ whether it's in the middle of a wait that needs tidying up or not.
+ In other words, ensure idempotency.
+
+1999-05-17 Hugo Tyson <hmt@masala.cygnus.co.uk>
+
+ * src/common/kapi.cxx (cyg_thread_kill): Up the priority of the
+ killee to make it terminate *now* if we have priorities and they
+ are not unique, otherwise asserts are likely with the bitmap
+ scheduler. Likewise in thread delete. Condition out the bodies
+ of the priority ops if the scheduler does not support priorities.
+
+1999-05-16 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/intr/intr.cxx (call_pending_DSRs):
+ * include/intr.hxx: Change mechanism for defining HAL function
+ to run DSRs. This was a "weak" symbol with override, but is now
+ a macro in <cyg/hal/hal_intr.h>.
+
+1999-05-13 Nick Garnett <nickg@cygnus.co.uk>
+
+ The following changes were all made in a branch and are now being
+ merged:
+
+ 1999-05-06 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/debug/dbg-thread-demux.c:
+ Use dbg-thread-syscall.h from HAL rather than local version.
+ Made dbg_thread_syscall_rmt_1() generic to all MIPS targets.
+
+ * src/debug/dbg-thread-syscall.h:
+ Removed. Replaced by identical file in hal/common.
+
+ 1999-04-21 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Added CYGDBG_KERNEL_INSTRUMENT_BUFFER_WRAP option.
+ Changed CYGNUM_KERNEL_COUNTERS_RTC_PERIOD to the correct value for
+ VR4300.
+
+ * include/instrmnt.h: Added CYG_INSTRUMENT_EVENT_THREAD_ENTER
+ event.
+
+ * src/instrmnt/meminst.cxx (cyg_instrument): Added implementation
+ of CYGDBG_KERNEL_INSTRUMENT_BUFFER_WRAP option.
+
+ * src/common/thread.cxx: Added extra instrumentation point on
+ thread entry.
+
+1999-05-10 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stress_threads.c (main_program): Added workaround for a
+ few PRs.
+
+1999-05-07 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/common/kapi.cxx (cyg_scheduler_unlock, cyg_scheduler_lock):
+ Make these simple calls to the scheduler.
+
+1999-05-07 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stress_threads.c (setup_death_alarm): Reduce run time on
+ synthetic target.
+
+1999-05-06 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stress_threads.c: Reversed priorities of agents.
+
+1999-05-06 Jesper Skov <jskov@cygnus.co.uk>
+ PRs 20040, (20027), 19991
+ * tests/stress_threads.c: Added main_thread handling resource
+ deallocation and printing.
+
+1999-04-27 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stress_threads.c:
+ If there aren't enough priorities, output an N/A, rather than
+ stopping compilation with a #error
+
+1999-04-28 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19850
+ * tests/stress_threads.c: Don't print text from alarm handler.
+
+1999-04-28 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19945 workaround
+ * tests/kexcept1.c:
+ * tests/except1.cxx:
+ Made NA to PowerPC SIM.
+
+1999-04-27 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/tm_basic.cxx:
+ Use/test 'cyg_thread_delete()' function.
+ Add ability to compute statistics with first datum removed which
+ can show up cache effects.
+ Show thread stack usage.
+
+ Fix merge screwup :-(
+
+1999-04-26 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/kapi.h: Add missing function cyg_thread_delete();
+ otherwise there is no way in the C API to re-use thread memory
+ safely. It just calls the destructor of the Cyg_Thread class.
+
+ * src/common/kapi.cxx (cyg_thread_delete): Implement it.
+
+1999-04-26 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/stress_threads.c: Commit a better version for Mark since I
+ happen to have it here; having addressed the main concern of my
+ approval process. It runs better in sims so long as the
+ constructor execution isn't messed with, nor timeslicing nor
+ priority inheritance.
+
+1999-04-23 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/stress_threads.c (setup_death_alarm): shortened the
+ simulator time by another factor of 10, hoping that it will not
+ slow down nightly testing for simulator platforms too much.
+ (perform_stressful_tasks): added writing of a bit pattern to the
+ malloc()-ed spaces. Also reduced stack requirements for threads.
+
+1999-04-23 Hugo Tyson <hmt@masala.cygnus.co.uk>
+
+ * src/common/timer.cxx (Cyg_Timer::activate): we must also disable
+ the alarm when resetting it so as to remove it from its queue, so
+ that the enable afterwards places it on the right queue instead of
+ assuming that, being enabled, it's already there. (if not
+ enabling, the behaviour is unchanged and correct) This was
+ detected by uITRON tests[cx]4, with some random perms including
+ enable CYGIMP_KERNEL_COUNTERS_MULTI_LIST,
+ value CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE {8}.
+ The PR is 19475.
+
+1999-04-21 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/bin_sem1.cxx (bin_sem1_main): Doh! Use priorities 4 and 5
+ for the two threads so that they are unique (with a bitmap
+ scheduler, the threads had prios 0 and 1 resp, which causes an
+ assert in the attempt to set thread 0's prio to 1, "prios not
+ unique"). PR 19904.
+
+1999-04-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/kcache2.c:
+ Reduce iterations for time_ilock(), time_dlock(), and test_dzero()
+ if a simulated environment is detected
+ Fix for PR 19853
+
+1999-04-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/kill.cxx: Make delay ticks greater than 1 to prevent
+ scheduling problems if the clock rolls over immediately
+ Fix for PR 19516
+
+1999-04-20 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/stress_threads.c: applied Hugo's patch to fix stack sizes.
+
+1999-04-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/bin_sem1.cxx (bin_sem1_main): Add priorities to the
+ threads so that they run sequentially like the tester expected.
+ Otherwise simple timing, and shorter timeslicing, causes failure
+ to be reported; likewise if the kernel happens not to run entry0
+ first!
+ (another checkin)
+ (bin_sem1_main): Add conditional use of set_priority on
+ CYGIMP_THREAD_PRIORITY as it should be.
+
+1999-04-14 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/debug/dbg_gdb.cxx: Fixed compiler warnings, cleaned up stub
+ requirements (removed FIX ME).
+
+1999-04-14 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/intr.hxx:
+ * src/intr/intr.cxx (call_pending_DSRs_inner): Rework calling of
+ DSRs to allow calls from HAL code. This will allow for proper
+ use of a separate interrupt stack.
+
+1999-04-14 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/PKGconf.mak: added an ifndef for the AEB-1 board so that
+ stress_threads is only built conditionally.
+
+ * tests/stress_threads.c: added more config smarts suggested by
+ Jesper for his configurations.
+
+1999-04-13 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19822
+ * src/debug/dbg_gdb.cxx: Current thread's registers live in
+ registers, not _registers.
+
+1999-04-13 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/stress_threads.c: simple stressing of thread
+ creation/deletion with some memory-intensive and alarm-based
+ tasks. This version is set so that it dies after DEATH_TIME_LIMIT
+ seconds, currently set to 120. #undef-ing DEATH_TIME_LIMIT makes
+ the test run forever. This is currently not working with the
+ bitmap scheduler, probably for some simple reason, but I have not
+ yet broken it down to see why.
+
+1999-04-12 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/except1.cxx:
+ * tests/kexcept1.cxx:
+ Remove now unnecessary tx39-specific setting of
+ CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS VSR
+ Part of cleanup for PR 19731
+
+1999-04-09 Hugo Tyson <hmt@cygnus.co.uk>
+
+ Generally: thread->to_queue_head() moves a thread to the head of
+ whatever queue it is on, if relevant. This is so that a thread
+ can change priority and then put itself at the front of its new
+ run queue instead of the end; otherwise it yields too, which may
+ be undesirable. Particularly for internal use of priorities in
+ the uITRON compatibility layer.
+
+ * include/thread.hxx (class Cyg_Thread): to_queue_head(): new
+ function. Define Cyg_Thread::rotate_queue() for all schedulers.
+ Public inheritance of Cyg_ThreadQueue_Implementation.
+
+ * include/thread.inl (class Cyg_Thread): to_queue_head(): new
+ function. Define Cyg_Thread::rotate_queue() for all schedulers.
+
+ * include/mlqueue.hxx (class Cyg_SchedThread_Implementation):
+ to_queue_head(), ...ThreadQueue...::to_head(): new functions.
+
+ * src/sched/mlqueue.cxx (class Cyg_SchedThread_Implementation):
+ to_queue_head(), ...ThreadQueue...::to_head(): new functions.
+
+ * include/bitmap.hxx (class Cyg_SchedThread_Implementation):
+ Add empty placeholders for rotate_queue() and to_queue_head() to
+ maintain commonality of interface.
+
+1999-04-08 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19667
+ * kernel/current/src/common/thread.cxx:
+ Removed obsolete Cyg_Thread constructor.
+
+ * kernel/current/tests/testaux.hxx:
+ * kernel/current/tests/thread0.cxx:
+ * kernel/current/tests/thread1.cxx:
+ Changed to use the new Cyg_Thread constructor.
+
+1999-04-08 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/common/kapi.cxx: Minor indentation fixes.
+
+1999-04-07 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19743
+ * include/mfiximpl.inl (Cyg_Mempool_Fixed_Implementation): Moved
+ argument assertions before the first use of the arguments.
+
+1999-04-07 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/kexcept1.c (except0_main):
+ * tests/except1.cxx (except0_main):
+ Use macro HAL_VSR_SET_TO_ECOS_HANDLER() if defined, to reset
+ likely exception handler VSRs to eCos' default handlers - the
+ target side equivalent to CYG_TEST_GDBCMD("handle SIGBUS nostop");
+ The VSR may not be the eCos standard one in some implementations
+ of cooperation with CygMon.
+
+1999-03-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h (CYGNUM_KERNEL_COUNTERS_RTC_PERIOD):
+ Fixed value of this option for TX39 66MHz to correct number.
+
+1999-03-25 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/tm_basic.cxx: More adjustments to get clock latency correct.
+ Some fine tuning of messages and layout to fit well within 80 columns.
+
+1999-03-24 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h: Fixed an ifdef error.
+
+1999-03-24 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/tm_basic.cxx (NTEST_THREADS): Reduce # threads so test can
+ build on smaller machines. Also, only adjust timings by single
+ "overhead" value instead of the more generous 2*overhead.
+
+ * src/common/clock.cxx: Clock latency measurement defaults to 'off'.
+
+1999-03-23 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/kcache2.c: Reduced number of loops in time_ilock(). On the
+ MN10300 and TX39 this caused the test to timeout in the testing
+ farm.
+
+1999-03-23 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/tm_basic.cxx:
+ * src/common/clock.cxx: Add 'measure_clock_latency' boolean which
+ is used to turn clock latency measurements on/off.
+
+1999-03-23 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/tm_basic.cxx (run_all_tests): Changed initial delay from
+ 100 ticks to 2. This is adequate for the purpose of letting the
+ clock get going, while 100 ticks was too long on simulators.
+
+1999-03-23 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/kcache1.c:
+ * tests/kcache2.c:
+ * tests/kclock1.c:
+ * tests/kexcept1.c:
+ * tests/kflag1.c:
+ * tests/kmbox1.c:
+ * tests/kmemfix1.c:
+ * tests/kmemvar1.c:
+ * tests/kmutex1.c:
+ * tests/ksched1.c:
+ * tests/ksem1.c:
+ * tests/kthread0.c:
+ * tests/thread0.cxx:
+ Use CYGNUM_HAL_STACK_SIZE_TYPICAL instead of "4096" and include
+ hal_arch.h where necessary to get it.
+
+1999-03-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/thread.inl (attach_stack):
+ Fix typo in assert; missing comma.
+
+1999-03-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/debug/dbg-thread-syscall.h: Update copyright
+
+1999-03-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/thread.inl:
+ * src/common/thread.cxx:
+ * tests/kthread1.c:
+ * tests/testaux.hxx:
+ * tests/thread1.cxx:
+ * tests/thread_gdb.c:
+ * tests/tm_basic.cxx:
+ Use CYGNUM_HAL_STACK_SIZE_TYPICAL for the stack size instead of
+ CYGNUM_HAL_MINIMUM_STACK_SIZE.
+ Except for stack checking and the idle thread stack which uses
+ CYGNUM_HAL_STACK_SIZE_MINIMUM.
+
+1999-03-19 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/kcache1.c:
+ * tests/kcache2.c:
+ Made all CYG_INTERRUPT_STATE variables register variables. The
+ value of this variable has to survive cache invalidation and does
+ not in some testing permutations that are unoptimized.
+ Fixes PR 19165.
+
+ * include/kapi.h: Type of cyg_tick_count_t changed to cyg_uint64.
+ Response to PR 19320.
+
+1999-03-19 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/tm_basic.cxx: Much better analysis of clock interrupt times.
+ Print average deviation instead of variance. Also print "confidence"
+ numbers which are a measure of "how likely" a particular number would
+ be relative to the mean and min of the sample set.
+
+1999-03-17 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/tm_basic.cxx: Improve messages and layout.
+ Better message for 'hardware clock tick' value.
+
+ * src/common/clock.cxx: Be more careful about clock latency delta
+ values that are used/kept - some hardware can yield incorrect values.
+
+ * tests/testaux.hxx: Use HAL recommended stack size for default.
+
+1999-03-16 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/common/thread.cxx:
+ Removed MIPS specific definition of idle_thread_stack[]. This is
+ so it gets the benefit of the redefinition of
+ CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE. This definition has also
+ been made static, since the MIPS compiler would otherwise put it
+ in the .data section.
+
+ * include/intr.hxx (class Cyg_Interrupt):
+ Changed implementation of Cyg_Interrupt::interrupts_enabled() to
+ test the value of disable_counter, rather than the hardware.
+
+1999-03-15 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/kcache1.c:
+ * tests/kcache2.c:
+ Added interrupt disables around cache operations. If these take
+ too long, an inopportune interrupt can disrupt the cache contents,
+ or result in the interrupt seeing an inconsistent world.
+
+1999-03-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/tm_basic.cxx: Improved and cleaned up messages overall.
+
+1999-03-15 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19504
+ * tests/tm_basic.cxx: Kill created threads after mutex, mbox and
+ semaphore tests.
+
+1999-03-12 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/debug/dbg-thread-demux.c:
+ Only try handling the SPARClite-SLEB vector correctly if
+ CYG_HAL_USE_ROM_MONITOR_CYGMON ie. we are talking with CygMon.
+ Otherwise the code is wrong, but also not used. No matter.
+
+1999-03-12 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/kthread1.c:
+ * tests/thread1.cxx:
+ * tests/thread_gdb.c:
+ Deal with CYGNUM_HAL_MINIMUM_STACK_SIZE requirement.
+
+1999-03-12 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/thread.inl (attach_stack): Add check/assert for minimum
+ stack size (HAL defined)
+
+1999-03-11 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/debug/dbg-thread-demux.c (patch_dbg_syscalls):
+ Use the correct vector table slot for SPARClite-SLEB; it's not 15
+ on here, it's BSP_VEC_MT_DEBUG from the hal's hal_cygm.h
+
+1999-03-11 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/testaux.hxx:
+ Move definition of inline placement operator new outside of ifdef
+ for NTHREADS so that it can be used by other code.
+
+ * tests/intr0.cxx:
+ * tests/thread1.cxx:
+ Make use of placement operator new rather than dynamic one in
+ intr0. Removed duplicate definition from thread1.
+
+1999-03-11 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19472
+ * tests/kill.cxx: Increased delays for the synthetic target.
+
+1999-03-11 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19468
+ * tests/intr0.cxx (intr0_main):
+ * tests/kintr0.c (kintr0_main):
+ Only attach interrupt handlers to vectors not in use.
+
+1999-03-10 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19368
+ * src/sched/sched.cxx (start): Change the dependency for
+ referencing the RTC to make its inclusion independent of scheduler
+ choice.
+
+1999-03-10 Jesper Skov <jskov@cygnus.co.uk>
+ PR 17357
+ * src/intr/intr.cxx (attach): Assert that interrupt vector attach
+ will succeed.
+
+1999-03-10 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Changed names used to control clock frequency on TX39 target.
+
+1999-03-08 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/sync/mutex.cxx: Allow 'Cyg_Condition_Variable::wait()'
+ to be entered with the scheduler locked (and thsu exit in
+ the same state). This will allow for fully thread-safe use
+ of 'Cyg_Condition_Variable::wait()'.
+
+1999-02-26 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/except1.cxx (except0_main):
+ * tests/kexcept1.c (except0_main):
+ Move CYG_TEST_GDBCMD back to being before CYG_TEST_INIT
+
+1999-02-26 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19283
+
+ * src/common/kapi.cxx: Changed cyg_exception_call_handler
+ definition to be consistent with declaration.
+
+ * include/kapi.h: Change cyg_code_t to signed type.
+
+ * tests/except1.cxx (except0_main):
+ * tests/kexcept1.c (except0_main):
+ Init diag before making first output.
+
+1999-02-26 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19284
+ * tests/mutex2.cxx (mutex2_main): Set priorities in a different
+ order.
+
+1999-02-25 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/sched.hxx (class Cyg_Scheduler_Base):
+ Added CYGBLD_ATTRIB_ASM_ALIAS(cyg_scheduler_sched_lock) to
+ declaration of sched_lock member. This makes it have the given
+ name in the object and assembler files. This in turn eliminates
+ the need to have a C++ mangled name in the HAL.
+
+ * src/intr/intr.cxx:
+ Cyg_Interrupt::detach() was not translating the vector to a table
+ index correctly in the chained case. Fixed.
+
+1999-02-24 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/intr.hxx:
+ * src/intr/intr.cxx:
+ Added an interrupt disable counter to
+ Cyg_Interrupt::disable_interrupts() and
+ Cyg_Interrupt::enable_interrupts().
+
+1999-02-23 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Added support for 66MHz part.
+
+ * include/instrmnt.h:
+ Added CYG_INSTRUMENT_EVENT_MUTEX_RELEASE and
+ CYG_INSTRUMENT_EVENT_MUTEX_RELEASED. This should have been part of
+ the 1999-02-22 checkin.
+
+1999-02-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/clock0.cxx, tests/clock1.cxx, tests/except1.cxx,
+ tests/kcache1.c, tests/kcache2.c, tests/kclock0.c, tests/kclock1.c,
+ tests/kexcept1.c, tests/kflag0.c, tests/kflag1.c, tests/kill.cxx,
+ tests/kintr0.c, tests/kmbox1.c, tests/kmemfix1.c, tests/kmemvar1.c,
+ tests/kmutex0.c, tests/kmutex1.c, tests/ksched1.c, tests/ksem0.c,
+ tests/ksem1.c, tests/kthread0.c, tests/kthread1.c, tests/thread1.cxx:
+ Use CYG_TEST_NA() rather than CYG_TEST_PASS_FINISH() for tests that
+ are not applicable for this configuration
+
+1999-02-22 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/kapi.h:
+ * include/mutex.hxx:
+ * src/sync/mutex.cxx:
+ * src/common/kapi.cxx:
+ * tests/mutex2.cxx:
+ * tests/PKGconf.mak:
+ Added Kernel API support for thread release, which allows a thread
+ to be broken out of any wait. Also added support for releasing all
+ threads waiting to lock a mutex, both at C++ and Kernel API
+ levels. Added a test program, mutex2, to test this fuctionality
+ out.
+
+1999-02-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/except.hxx:
+ * include/kapidata.h
+ Rename CYG_EXCEPTION_COUNT -> CYGNUM_HAL_EXCEPTION_COUNT in line
+ with HAL changes
+ Rename deliver_exception() -> cyg_hal_deliver_exception()
+ QA improvements
+
+ * src/common/clock.cxx:
+ Rename CYG_VECTOR_RTC -> CYGNUM_HAL_INTERRUPT_RTC in line with
+ HAL changes
+
+ * src/common/except.cxx:
+ Rename CYG_EXCEPTION_* -> CYGNUM_HAL_EXCEPTION_* in line
+ with HAL changes
+ Allow for CYGNUM_HAL_EXCEPTION_MIN != 0
+ Rename deliver_exception() -> cyg_hal_deliver_exception()
+ Add more tracing, and fix some existing
+ QA improvements
+
+ * src/intr/intr.cxx:
+ Rename CYG_ISR_* -> CYGNUM_HAL_ISR_* in line with HAL changes
+ Add more tracing, and fix some existing
+ QA improvements
+
+ * src/sched/bitmap.cxx:
+ * src/sched/mlqueue.cxx:
+ * src/sync/mutex.cxx:
+ Add more tracing and fix some existing
+ QA improvements
+
+ * tests/except1.cxx:
+ * tests/kexcept1.c
+ Rename CYG_EXCEPTION_* -> CYGNUM_HAL_EXCEPTION_* in line
+ with HAL changes
+ QA improvements
+ Use new CYG_TEST_GDBCMD to tell GDB not to stop
+ Remove special simulator case as it should now work
+
+ * tests/intr0.cxx:
+ * tests/kintr0.c:
+ Rename CYG_ISR/VSR_* -> CYGNUM_HAL_ISR/VSR_* in line
+ with HAL changes
+ QA improvements
+
+1999-02-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/kexcept1.c (except0_main): Tell GDB to not stop on
+ SIGBUS or SIGSEGV since we know we're going to cause an exception
+
+1999-02-12 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/common/thread.cxx (idle_thread_stack):
+ Override CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE if
+ CYGNUM_HAL_MINIMUM_STACK_SIZE demands it.
+
+ * include/pkgconf/kernel.h (CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE):
+ Document that this option can be overridden by HALs demands.
+
+1999-02-11 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/debug/dbg-thread-syscall.h:
+ * src/debug/dbg-thread-demux.c:
+ Added handling of dbg_scheduler_func calls.
+
+1999-02-11 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/kapi.h:
+ * src/common/kapi.cxx:
+ Added API support for per-thread data.
+
+ * include/kapi.h:
+ * src/common/kapi.cxx:
+ * tests/ksem1.c:
+ * tests/tm_basic.cxx:
+ Changed arguments to Kernel C API semaphore functions to take
+ cyg_count32 rather than cyg_ucount32. This makes them consistent
+ with the underlying implementation and allows for negative counts
+ in the future. Changed some tests to match.
+ Fixes PR 17877.
+
+1999-02-08 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/kexcept1.c (entry0):
+ * tests/except1.cxx (entry0):
+ Don't call cause_exception on SIMs.
+
+1999-02-05 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/common/clock.cxx (isr): Ignore a latency of 0 when finding
+ min_clock_latency.
+
+1999-02-04 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19075
+ * include/instrmnt.h: Slightly overdid the use of CYG_UNUSED_PARAM
+ macros.
+
+1999-02-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/intr/intr.cxx:
+ Make instrumentation macros always use the parameters to avoid
+ compiler warnings.
+
+1999-02-03 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18075
+ * tests/memfix1.cxx:
+ * tests/kmemfix1.c:
+ Make timing less sensitive.
+
+1999-02-02 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/bin_sem2.cxx: Fixed compiler warning.
+
+1999-02-02 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18971
+ * tests/bin_sem2.cxx (bin_sem2_main): Reduce run time in SIM.
+
+1999-02-01 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/kcache2.c: Added calls to HAL_DCACHE_SYNC() before all
+ relevant calls to HAL_DCACHE_DISABLE(). This should have been done
+ on 1999-01-25 where is was only done to one instance.
+
+1999-02-01 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/tm_basic.cxx: Adjust stack sizes for platforms with
+ limited memory.
+
+1999-01-28 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/intr/intr.cxx: When using chained interrupts,
+ interrupt_end() is passed NULL as the intr argument. If
+ instrumentation is also enabled, the CYG_INSTRUMENT_INTR() calls
+ will try to indirect through zero. Added ifdefs to avoid
+ this. Also test intr for NULL before trying to post the DSR.
+ Fixes PR 18771.
+
+1999-01-28 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/tm_basic.cxx: Fixed strings.
+
+1999-01-26 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/kcache1.c (time0): Waste much less time if running in a
+ simulator. Do only 40 loops instead of 4000.
+ In consequence the nasty meddling with MAX_STRIDE depending on
+ HAL_xxx_SIM package definitions can go.
+
+1999-01-26 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18902
+ * src/debug/dbg-thread-demux.c: Oops. Undid my change of 1999-01-21.
+
+1999-01-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/common/except.cxx: Make global exception initialisation object
+ be constructed at INTERRUPT priority
+
+1999-01-25 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18002
+ * tests/thread_gdb.c: Ensure that there are enough priorities.
+
+1999-01-25 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18875
+ * tests/tm_basic.cxx: Ensure that there are enough priorities.
+
+1999-01-25 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/kcache2.c (test_dstore): Added call to HAL_DCACHE_SYNC()
+ before disabling cache. On some architectures disabling the cache
+ would cause the following call to do nothing.
+ Fixes PR 18849.
+
+1999-01-22 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/tm_basic.cxx: Don't run on Linux target.
+
+1999-01-21 Hugo Tyson <hmt@cygnus.co.uk>
+ These changes are to get tests working with the SPARClite port; it
+ doesn't do 8-byte register access unless it's properly aligned.
+
+ * tests/philo.cxx (cyg_start):
+ Use tests/testaux.hxx to get new threads, to get the alignment
+ required; see below.
+
+ * tests/thread2.cxx (thread2_main):
+ Use tests/testaux.hxx to get new threads, to get the alignment
+ required; see below.
+
+ * tests/tm_basic.cxx:
+ Larger stack for greedy processor.
+
+ * tests/testaux.hxx:
+ thread_obj[][] and stack[][] are now 8-byte aligned like certain
+ processors require; Cyg_Thread contains cyg_tick_count which is
+ 64-bit so any "standalone" C++ object would be so aligned. These
+ dynamically allocated ones should be too.
+
+1999-01-21 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18747
+ * tests/flag1.cxx: Increase delays/timeouts to prevent failure
+ when configured with full trace logging.
+
+1999-01-21 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/debug/dbg-thread-demux.c: Removed PR 17327 workarounds.
+
+1999-01-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/sched/sched.cxx (start):
+ CYG_REFERENCE_SYMBOL -> CYG_REFERENCE_OBJECT in line with
+ cyg_type.h change
+
+1999-01-19 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18824
+ * src/sync/mutex.cxx:
+ * include/pkgconf/kernel.h: Let
+ CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT require
+ CYGFUN_KERNEL_THREADS_TIMER.
+
+1999-01-18 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/debug/dbg-thread-demux.c (patch_dbg_syscalls): Added test
+ for CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT in patch_dbg_syscalls().
+
+1999-01-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/mvarimpl.inl (free): Memory list sort was incorrect.
+
+ * tests/PKGconf.mak (TESTS): Don't build cache tests on
+ some platforms.
+
+1999-01-15 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18768
+
+ * tests/kmbox1.c:
+ * tests/mbox1.cxx:
+ Increase delays used so the overhead of GDB packets doesn't make
+ the tests fail.
+
+1999-01-14 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/sched/sched.cxx (start): Use new CYG_REFERENCE_SYMBOL macro.
+
+1999-01-14 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/debug/dbg_gdb.cxx: Extended return types to include success,
+ fail and caller-do-it as required by msnyder.
+
+ * src/debug/dbg-thread-demux.c: Moved prototype of dbg_scheduler()
+ to dbg-threads-api.h.
+
+1999-01-13 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/sched/sched.cxx (start): Better implementation of the
+ real_time_clock reference.
+
+1999-01-13 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h: Disable CYGSEM_KERNEL_SCHED_TIMESLICE
+ in CYG_HAL_ROM_MONITOR magic.
+
+1999-01-07 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h: Added RTC values for i386/Linux.
+
+
+1999-01-12 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/debug/dbg-thread-demux.c:
+ Changed API of patch_dbg_syscalls() to take a pointer to the start
+ of the vector and insert several vectors.
+
+ * src/debug/dbg_gdb.cxx:
+ Added dbg_scheduler() function to allow debuggers to lock and
+ unlock the scheduler. This helps when stepping multithreaded code.
+
+ * include/sched.hxx:
+ * include/sched.inl:
+ Added Cyg_Scheduler::unlock_simple() to decrement the lock without
+ rescheduling.
+
+1999-01-05 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18574
+
+ * src/sched/sched.cxx (start): Reference the real time clock to
+ ensure it is included when linking.
+
+1999-01-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/thread1.cxx:
+ * tests/mbox1.cxx:
+ * tests/kmbox1.c:
+ * tests/kill.cxx:
+ * tests/kflag1.c:
+ * tests/kclock1.c:
+ * tests/flag1.cxx:
+ * src/common/thread.cxx:
+ CYGFUN_KERNEL_THREADS_TIMER requires CYGVAR_KERNEL_COUNTERS_CLOCK
+ so don't check for the latter explicitly.
+
+1999-01-04 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18573
+
+ * tests/thread1.cxx:
+ * tests/mbox1.cxx:
+ * tests/kmbox1.c:
+ * tests/kflag1.c:
+ * tests/flag1.cxx:
+ Don't run tests that rely on delay() when delay() is only defined
+ as an empty function.
+
+1998-12-24 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/sync/mutex.cxx:
+ * src/sync/mbox.cxx:
+ * src/sync/flag.cxx:
+ * src/sched/sched.cxx:
+ * src/mem/memvar.cxx:
+ * src/mem/memfixed.cxx:
+ * src/common/thread.cxx:
+ * src/common/clock.cxx:
+ * include/mempoolt.inl:
+ * include/mempolt2.inl:
+ * include/mboxt2.inl:
+ * include/mboxt.inl:
+ check_this() member functions should now be const
+
+1998-12-22 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/instrmnt.h: Fixed casts for arguments to
+ cyg_instrument() to work in C. Fixes PR 18413.
+
+1998-12-21 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h: Change AEB-1 clock scale.
+
+1998-12-17 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/tm_basic.cxx: Calculate system clock resolution
+ based on 'CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION'
+
+1998-12-16 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h (CYGNUM_KERNEL_COUNTERS_RTC_PERIOD):
+ Add support for new ARM AEB-1.
+
+1998-12-16 Hugo Tyson <hmt@masala.cygnus.co.uk>
+
+ * tests/intr0.cxx (intr0_main):
+ * tests/kintr0.c (kintr0_main):
+ Conditionally use a different interrupt vector number on tx39 when
+ in the simulator (according to cyg_test_is_simulator) so that
+ these tests execute correctly in simulators.
+
+1998-12-16 Jesper Skov <jskov@cygnus.co.uk>
+ PR 18546
+
+ * tests/kill.cxx (cyg_start): Do NOP test if required kernel
+ functionality is disabled.
+
+1998-12-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h: Changed
+ CYGDBG_KERNEL_DEBUG_GDB_INCLUDE_STUBS to
+ CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS.
+
+1998-12-14 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/tm_basic.cxx: Made use of cyg_mbox_get() conditional on
+ CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT.
+
+1998-12-14 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/tm_basic.cxx: Added requirement for kernel RTC.
+
+1998-12-11 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/kcache2.c: Added tests of three more macros.
+
+1998-12-10 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/kcache2.c: Added tests of three more macros.
+
+1998-12-10 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ * tests/kcache2.c:
+ Added new cache test.
+
+1998-12-04 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/intr.hxx:
+ * src/intr/intr.cxx (cyg_interrupt_post_dsr): Added this function
+ to allow functions in the HAL, which are always only in C, to call
+ Cyg_Interrupt::post_dsr(). Have also returned post_dsr() to
+ private parts of Cyg_Interrupt.
+
+1998-12-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/intr.hxx (class Cyg_Interrupt): Made post_dsr public so
+ it can be called from HAL interrupt arbiters.
+
+1998-12-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h (CYGNUM_KERNEL_COUNTERS_RTC_PERIOD):
+ Set to the correct value for a 33.333MHz clock.
+
+1998-12-02 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/intr/intr.cxx (interrupt_end, chain_isr): Got rid of magic
+ interrupt constants.
+
+1998-11-30 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h: Fix spelling of CYGVAR_KERNEL_COUNTERS_CLOCK
+
+1998-11-25 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/common/thread.cxx (check_this): Check that stack_ptr is
+ within its limits.
+
+Wed Nov 25 18:45:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/sched.inl (unlock) (lock):
+ * src/common/thread.cxx (thread_entry):
+ * src/sched/sched.cxx (unlock_inner):
+
+ Ensure all accesses to sched_lock cannot be reordered by the
+ optimiser
+
+1998-11-24 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/common/thread.cxx (thread_entry): Prevent scheduler lock
+ from being released too early.
+
+1998-11-23 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ * src/common/clock.cxx:
+ Added CYGIMP_KERNEL_COUNTERS_SORT_LIST option to determine whether
+ the alarm lists in counters are sorted or not.
+
+ * tests/tm_basic.cxx: Added a test for many alarms firing
+ separately.
+
+1998-11-23 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/kcache1.c: Only run with stride 1 on SIMs.
+
+1998-11-19 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/tm_basic.cxx: Insure appropriate kernel configuration for
+ building tool. Needs at least kernel C API and multi-level scheduler.
+
+1998-11-18 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * tests/tm_basic.cxx: Add interrupt latency support. Print
+ results to 10ns accuracy.
+
+ * tests/PKGconf.mak: Add 'tm_basic' (the kernel timing test
+ program) to list of built tests.
+
+ * src/intr/intr.cxx: Change usage of HAL_INTERRUPT_MASK to have
+ trailing ';' to match similar macros.
+
+ * src/common/clock.cxx:
+ * include/pkgconf/kernel.h: Add CDL option
+ CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY used to define if interrupt
+ latency measurements should be built into kernel.
+
+1998-11-17 Jesper Skov <jskov@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h: Renamed CYG_HAL_POWERPC_MP860 to
+ CYG_HAL_POWERPC_MPC860.
+
+
+1998-10-28 David Moore <dsm@keema.cygnus.co.uk>
+
+ * include/pkgconf/kernel.h
+ (CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION): Changed default value for
+ MIPS simulator to be 0.01 secs instead of 0.001 seconds.
+
+1998-10-28 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/kcache1.c (HAL_DCACHE_PURGE_ALL): Fixed compiler problem
+ on PowerPC.
+
+1998-10-27 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/kcache1.c:
+ Added calls to HAL_DCACHE_PURGE_ALL() before each test. Added
+ local version of HAL_DCACHE_PURGE_ALL() if this is not supplied by
+ the HAL.
+
+1998-10-27 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/common/thread.cxx (wake):
+ Remove the thread unconditionally from any queue it was on; for we
+ have just become not-asleep, so it must be OK. (Bug was: it
+ didn't happen in transit WAIT-SUSPEND -> SUSPEND, so synch object
+ still believed the task was waiting on it). PR#17998
+
+1998-10-26 Jesper Skov <jskov@cygnus.co.uk>
+ PR 17527, PR 17837
+
+ * tests/kcache1.c:
+ * tests/kclock0.c:
+ * tests/kclock1.c:
+ * tests/clock1.cxx:
+ * tests/clock0.cxx:
+ Do N/A PASS when kernel real-time clock is configured out.
+
+1998-10-26 Jesper Skov <jskov@lassi.cygnus.co.uk>
+ PR 17866
+
+ * include/pkgconf/kernel.h
+ (CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE): Doubled to prevent stack
+ overruns on PowerPC.
+
+1998-10-26 Jesper Skov <jskov@cygnus.co.uk>
+ PR 17987
+
+ * src/debug/dbg_gdb.cxx (dbg_threadinfo): Removed "more: <none>"
+ output.
+
+1998-10-23 John Dallaway <jld@cygnus.co.uk>
+
+ * tests/tm_basic.cxx: Added basic timing test.
+
+1998-10-23 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/instrmnt.h:
+ Improved documentation of cyg_instrument_enable() and
+ cyg_instrument_disable().
+
+ * src/instrmnt/meminst.cxx:
+ Added code to enable and disable whole groups of events.
+
+1998-10-23 Jesper Skov <jskov@lassi.cygnus.co.uk>
+
+ * include/generic-stub.h: Deleted. It was moved to hal common some
+ time ago.
+
+Fri Oct 23 04:45:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/kcache1.c:
+ Remove forced warning of a warning which no longer applies
+
+1998-10-22 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/common/clock.cxx:
+ Stop searching the alarm list when the current alarm is in the
+ future in Cyg_Counter::tick(). Changed sense of comparison in
+ Cyg_Counter::add_alarm() to sort alarms in ascending order.
+
+Thu Oct 22 18:21:50 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Fix commenting within CDL "comments"
+
+Thu Oct 22 17:25:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Remove CYGVAR_KERNEL_INSTRUMENT_EXTERNAL_BUFFER configuration
+ option. For PR 17838
+
+1998-10-21 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h (CYGNUM_KERNEL_COUNTERS_RTC_PERIOD):
+ Changed value for JMR3904 board to 15360 which is correct for a
+ 24.576MHz board rather than 25MHz as before.
+
+ * src/common/thread.cxx:
+ Exchanged stack_base and stack_size in idle thread constructor.
+
+1998-10-20 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/kflag1.c (kflag1_main):
+ Only mess with f2 if it exists, ie. CYGFUN_KERNEL_THREADS_TIMER.
+
+1998-10-19 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/kernel.h: updated the doc URL
+
+1998-10-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/kapi.h:
+ * include/kapidata.h (struct cyg_flag_t):
+ * src/common/kapi.cxx:
+ Add flags (Cyg_Flag, kernel.../flag.hxx) to the C API.
+
+ * tests/PKGconf.mak (TESTS):
+ Add new tests for flags via the C API.
+
+ * tests/kflag0.c:
+ * tests/kflag1.c:
+ New tests (well, versions of the plain C++ versions flag0.cxx and
+ flag1.cxx) for flags via the kernel C API.
+
+1998-10-19 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Fixed description of clock resolution.
+
+1998-10-17 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Added a way of configuring the clock interrupt frequency.
+
+Thu Oct 15 21:31:58 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Allow kernel to be disabled now
+
+ * src/common/delete.cxx, src/common/memcpy.c, src/common/memset.c:
+ Move these files to the infra package
+
+ * src/PKGconf.mak:
+ Don't build the above files any more
+
+ Above changes are required for PR 17229
+
+1998-10-15 Hugo Tyson <hmt@masala.cygnus.co.uk>
+
+ * include/mempoolt.inl (Cyg_Mempoolt):
+ * include/mempolt2.inl (Cyg_Mempolt2):
+ Flesh out the destructors to awaken any waiting threads
+ with reason Cyg_Thread::DESTRUCT to support uITRON
+ create and delete of memory pool objects.
+ Note that only template mempolt2 is actually used.
+
+Wed Oct 14 21:45:54 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/thread_gdb.c:
+ Remove unnecessary inclusion of <cyg/kernel/diag.h>
+
+ * tests/kcache1.c:
+ Add a warning to expect the "function declaration isn't a
+ prototype" warning from infra/diag.h
+
+1998-10-14 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/common/thread.cxx (kill,reinitialize):
+ Do not refer to member timer unless CYGFUN_KERNEL_THREADS_TIMER is
+ defined.
+
+1998-10-14 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/debug/dbg-thread-demux.c:
+ Now get dbg-threads-api.h from HAL.
+
+ * src/debug/dbg_gdb.cxx:
+ Tidied up info sent back by dbg_threadinfo().
+
+ * src/common/thread.cxx:
+ Changed constructor of idle thread to include initial priority and
+ a thread name.
+
+ * include/pkgconf/kernel.h:
+ Moved GDB stub configuration code out to hal.h.
+
+ * include/ktypes.h:
+ Moved definition of CYG_LABEL_NAME() out to cyg_type.h.
+
+ * src/debug/PKGconf.mak:
+ * src/debug/dbg-threads-api.h:
+ * src/debug/generic-stub.c:
+ * src/debug/stubrom.c:
+ * src/debug/thread-packets.c:
+ * src/debug/thread-pkts.h:
+ These files have all be relocated to hal/common.
+
+1998-10-14 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/thread.hxx (class Cyg_Thread):
+ Add public members get_stack_base(), get_stack_size() and
+ get_stack_limit();
+ Add private members add_to_list() and remove_from_list() to
+ centralize handling of the CYGVAR_KERNEL_THREADS_LIST as it is
+ known.
+
+ * include/thread.inl (class Cyg_Thread):
+ Add public members get_stack_base(), get_stack_size() and
+ get_stack_limit();
+
+ * src/common/thread.cxx:
+ Add private members add_to_list() and remove_from_list() to
+ centralize handling of the CYGVAR_KERNEL_THREADS_LIST as it is
+ known.
+ Tidy up the two constructors to use them.
+ Add CYG_REPORT_RETURN()/_RETVAL(...) logging throughout.
+ Tidy up reinitialize() to use the 6-argument constructor,
+ thus preserving the thread name.
+ Fix some bugs in the CYGVAR_KERNEL_THREADS_LIST stuff where
+ re-adding a thread caused loops in the list, and the like.
+ Fix bug in set_priority() when the thread is asleep but NOT on any
+ queue, such as a plain counted_sleep().
+
+1998-10-14 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/debug/thread-packets.c:
+ * src/debug/dbg_gdb.cxx:
+ Don't include hal_stub.h unless it's really, really, really
+ needed.
+
+1998-10-14 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/debug/dbg_gdb.cxx: Don't include hal_stub.h unless it's really
+ needed.
+
+1998-10-13 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/debug/generic-stub.c: Added thread support. Renaming a few
+ functions/variables to match the most recent libstub
+ generic-stub.c.
+ Use thread_get_register & thread_put_register when handling GDB
+ register packets.
+
+ * src/debug/dbg_gdb.cxx (dbg_getthreadreg, dbg_getthreadreg):
+ DTRT for current thread when CygMon is not configured.
+
+ * src/debug/dbg_gdb.cxx (dbg_threadlist, dbg_getthreadreg,
+ dbg_getthreadreg): return true/false rather than 0, 1, -1.
+
+ * src/debug/dbg_gdb.cxx:
+ * src/debug/dbg-threads-api.h:
+ Added dbg_currthread_id.
+
+1998-10-08 Jesper Skov <jskov@lassi.cygnus.co.uk>
+
+ * src/debug/generic-stub.c:
+ * src/debug/generic-stub.h:
+ Added control of interrupts.
+ Removed unused functions set_debug_trap and initialize_stub.
+
+Tue Oct 13 17:36:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/test/tsttracc.c (cyg_start):
+ Replace CYG_REPORT_FUNCARGSVOID with the correct
+ CYG_REPORT_FUNCARGVOID
+
+1998-10-09 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/common/thread.cxx:
+ clear_timer() is a static which always affects the executing
+ thread and none other. Removed the "foo->" from various
+ "foo->clear_timer()" calls to make this less confusing.
+ Ditto set_timer().
+ Changed a "clear_timer()" call to "timer.disable()" and added one
+ so that they affect _this_ thread, the thread which is being
+ kill()ed or reinitialize()d rather than the killer or the
+ resuscitator. Otherwise the alarm list can still get a loop in
+ it when a thread's killed when waiting with a timeout and
+ restarted soon enough.
+
+1998-10-08 Hugo Tyson <hmt@cygnus.co.uk>
+
+ In general, these changes are to support create/delete of uITRON
+ objects; this requires that an object can be destroyed whilst
+ there are threads waiting on it, and that they shall be awoken
+ with a specific return code.
+
+ * include/thread.hxx:
+ Cyg_Thread::DESTRUCT added to wake reasons, to deal with an object
+ being destroyed whilst a thread is waiting on it; it's handled in
+ a manner very similar to release() and BREAK wake_reason.
+
+ * src/common/thread.cxx:
+ thread_entry(): threads now exit() if the entry_point returns.
+ Cyg_Thread() constructors now initialize wake_reason to NONE.
+ reinitialize() clears any pending timeout before calling
+ constructors.
+ counted_sleep( [timeout] ) now both deal with the wake reason in
+ general, and with DESTRUCT in particular.
+ exit() now clears any pending timeout.
+ kill() now force_resumes the thread first.
+ kill() now does not explicitly remove the thread from any queue
+ it's on; wake() does that for you anyway.
+ delay() clears the timer just in case and handles DESTRUCT
+ properly.
+ DESTRUCT added to various switches for completeness.
+
+ The fixes to counted_sleep()[x2] and kill() are a bugfix for
+ PR#17688.
+
+ * include/flag.hxx:
+ * src/sync/flag.cxx:
+ Add an argument, defaulting to 0, to the constructor which sets
+ the initial flag value.
+ Add handing of DESTRUCT wake reason.
+ Add a destructor which wakes all threads with DESTRUCT
+ wake_reason.
+
+ * include/mboxt2.inl:
+ Add handing of DESTRUCT wake reason.
+ Add a destructor which wakes all threads with DESTRUCT
+ wake_reason.
+
+ * src/sync/cnt_sem2.cxx:
+ Add handing of DESTRUCT wake reason.
+ Add a destructor which wakes all threads with DESTRUCT
+ wake_reason.
+ Correct typo in logic for queueing a waiting thread in
+ Cyg_Counting_Semaphore2::wait( cyg_tick_count abs_timeout ).
+ This is a bugfix for PR#17687.
+
+ * include/mboxt.inl:
+ * include/mempoolt.inl:
+ * include/mempolt2.inl:
+ * src/sync/bin_sem.cxx:
+ * src/sync/cnt_sem.cxx:
+ * src/sync/mutex.cxx:
+ All these gain handling of the DESTRUCT wake_reason, that's all.
+
+1998-10-08 Gary Thomas <gthomas@penang.cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Add support for new architecture
+
+1998-10-07 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/kcache1.c (entry0):
+ Replaced CYG_TEST_FINISH() with CYG_TEST_PASS_FINISH().
+
+ * src/debug/dbg-thread-demux.c:
+ Added dbg_thread_syscall_rmt_1() to save/set and restore the $gp
+ register values when being called from Cygmon.
+
+Sun Sep 27 20:12:15 1998 David Moore <dsm@keema.cygnus.co.uk>
+
+ * include/mlqueue.hxx:
+ * include/bitmap.hxx:
+ Disallow more than 32 priority levels
+
+ * include/pkgconf/kernel.h:
+ Changed range of allowed levels from 64 to 32
+
+1998-09-27 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/memfix2.cxx:
+ Changed message to say "Fixed memory pool 2 OK" rather than
+ "Variable memory pool 2 OK".
+
+1998-09-26 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/intr.hxx (DSRs_pending):
+ PR 17500: if DSR support is disabled completely then this inline
+ function should not be defined at all.
+
+1998-09-26 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/kcache1.c:
+ Added this test program for cache API. Includes some performance
+ testing.
+
+1998-09-25 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/debug/dbg_gdb.cxx:
+ Removed some debugging code.
+
+ * tests/thread_gdb.c:
+ Added this test program to allow for GDB thread support testing.
+
+1998-09-25 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ The GDB thread support requires the kernel to keep track of all
+ threads on a linked list. This is a separate option. An additional
+ requires statement enforces the dependency.
+
+1998-09-25 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/debug/dbg-thread-demux.c:
+ Added include of <pkgconf/kernel.h>, removed debug code.
+
+1998-09-24 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/debug/dbg-thread-demux.c (dbg_thread_syscall_rmt):
+ PR 17327. If kernel gdb thread support is disabled, do not compile
+ in the relevant cases in the rmt switch statement. This is a
+ partial solution to the general problem of how the HAL, kernel,
+ cygmon, and gdb interact.
+
+1998-09-24 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/common/clock.cxx (Cyg_RealTimeClock):
+ Changed clock priority from zero to one, since it is now used to
+ set the hardware interrupt priority.
+
+ * src/intr/intr.cxx:
+ Cyg_Interrupt::chain_isr() now only calls interrupt objects that
+ have the matching vector number.
+ Call HAL_INTERRUPT_SET_LEVEL() when attaching interrupts using the
+ priority passed in the constructor.
+ Added call to HAL_TRANSLATE_VECTOR() for attaching chained
+ interrupts.
+
+ * include/instrmnt.h (CYG_INSTRUMENT_EVENT_INTR_CHAIN_ISR):
+ Added this event.
+
+Thu Sep 24 11:07:12 1998 David Moore <dsm@keema.cygnus.co.uk>
+
+ * tests/except1.cxx:
+ * tests/kexcept1.cxx:
+ Made exception tests detect when CYGPKG_KERNEL_EXCEPTIONS
+ is disabled.
+
+
+1998-09-22 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Changed the kernel package from type bool to type dummy, since
+ it is not yet possible to disable this package.
+
+1998-09-20 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/kernel.h: updated CDL doc strings.
+ fixed some typos in my doc strings.
+
+1998-09-18 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/common/thread.cxx:
+ * include/thread.inl:
+ Modified threads list from a LIFO stack to a ring so that we can
+ add new ones to the end and present the threads to GDB in an order
+ that more closely matches how it assigns thread ids.
+
+Wed Sep 16 19:11:22 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/thread.inl (get_unique_id):
+ Move this declaration to before its first use, so that the user
+ knows it is inline at the point of use. Avoids a warning.
+
+Wed Sep 16 08:49:48 1998 Jesper Skov <jskov@cygnus.co.uk>
+ PR 17269
+
+ * src/common/except.cxx (Cyg_Exception_Control): Replaced
+ CYGNUM_EXCEPTION_MAX (bug!) with CYG_EXCEPTION_COUNT.
+
+ * include/kapidata.h (struct cyg_exception_conrol): Replaced
+ CYG_EXCEPTION_MAX (bug!) with CYG_EXCEPTION_COUNT.
+
+ * src/intr/intr.cxx:
+ * include/intr.hxx (class Cyg_Interrupt): Replaced CYG_ISR_MAX+1
+ with CYG_ISR_COUNT.
+
+ * include/except.hxx: Replaced CYGNUM_EXCEPTION_COUNT with
+ CYG_EXCEPTION_COUNT.
+
+ * tests/kintr0.c:
+ * tests/intr0.cxx: Replaced CYG_ISR_MAX (bug!) with
+ CYG_ISR_COUNT.
+
+Tue Sep 15 19:19:37 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/mboxt2.hxx:
+ Add inclusion of thread.inl to silence warning
+
+ * tests/kexcept1.c:
+ Insert void as parameter list of __default_exception_vsr() to
+ silence warning
+
+Tue Sep 15 19:16:52 1998 David Moore <dsm@keema.cygnus.co.uk>
+
+ * src/sched/sched.cxx: Cleaned up comments.
+
+1998-09-15 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/debug/dbg-thread-demux.c:
+ Stubbed out led() function.
+
+ * src/debug/dbg_gdb.cxx:
+ Decide whether to byteswap thread id depending on reported byte
+ order of target.
+ Many small changes to debug code.
+
+ * include/thread.inl (init_context):
+ Changed CYG_DEBUG to CYGPKG_INFRA_DEBUG.
+
+Tue Sep 15 09:35:14 1998 Jesper Skov <jskov@cygnus.co.uk>
+ PR 17236
+
+ * src/common/clock.cxx (add_alarm): A retriggering alarm called
+ with a trigger time in the past or now will be assigned a new
+ trigger time. Don't find the counter list until the final trigger
+ time is known.
+ Also added a few #else error statements to catch a situation where
+ no CYGIMP_KERNEL_COUNTERS_x_LIST implementation config is
+ selected.
+
+ * tests/clock0.cxx: Added extra ASSERT to ensure alarms enabled
+ with a trigger time of now or in the past actually fire.
+ * tests/kclock0.c: Same.
+
+1998-09-15 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Cleaning up coonfiguration data (mostly improving the
+ descriptions).
+
+Mon Sep 14 11:08:59 1998 Jesper Skov <jskov@lassi.cygnus.co.uk>
+ PR 17230
+
+ * include/pkgconf/kernel.h: CYGIMP_KERNEL_INTERRUPTS_CHAIN
+ requires CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN.
+
+1998-09-14 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/kernel.h: started adding CDL doc fields.
+
+1998-09-12 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Sort out exception handling options (PR 16953)
+ Added missing descriptions (PR 17184)
+
+Fri Sep 11 19:18:28 1998 Hugo Tyson <hmt@masala.cygnus.co.uk>
+
+ * include/clock.hxx (class Cyg_Alarm):
+ * src/common/clock.cxx (Cyg_Alarm::add_alarm):
+ PR#17182
+ Move the code to synchronize a repeating alarm which had been
+ firing in the dim and distant past with times in the future, which
+ had been inline in Cyg_Alarm::enable(), into a function of its
+ own, Cyg_Alarm::synchronize(). Call it from Cyg_Alarm::enable()
+ and also from add_alarm() when the immediate time to fire is now
+ or in the past; otherwise an initial time of, say, NOW-10 with an
+ interval of 5 would just get lost. Also corrected/commented the
+ logic there to allow an alarm's handler to cancel itself.
+
+Wed Sep 9 17:43:26 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/common/delete.cxx:
+ Control the provision of empty delete functions rather better, via
+ an explicit option from the libc package. Read the rather lengthy
+ comment in delete.cxx for the explanation.
+ Also note that the correct place for this functionality is in the
+ infrastructure, and the same should be done for the C++ new
+ functions also.
+
+1998-09-09 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/common/thread.cxx:
+ combined separate next_unique_id variables in both constructors.
+ This would have caused duplicate thread ids to be generated.
+
+ * include/thread.inl:
+ Added code to initialize Cyg_HardwareThread::saved_context.
+
+ * src/debug/dbg-thread-demux.c:
+ * src/debug/dbg_gdb.cxx:
+ Many changes to get thread API working with Cygmon. Debug code
+ currently left in place until complete testing is possible.
+
+Tue Sep 8 17:17:32 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h (CYGNUM_KERNEL_COUNTERS_RTC_PERIOD):
+ Set up a sensible default RTC for CYG_HAL_MN10300_SIM different
+ from that for the MN103002 or CYG_HAL_MN10300_STDEVAL1, so that
+ sim tests run in less than geological time. This is the same as
+ the default value of before.
+
+Fri Sep 4 18:25:02 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/sched/mlqueue.cxx (timeslice):
+ * src/sched/sched.cxx (unlock_inner):
+ Condition out the tracing macros here by default, for tracing
+ these consumes the whole quantum.
+
+1998-09-04 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Commented out the ROM monitor-specific option settings for now.
+
+ * tests/kclock1.c:
+ * include/pkgconf/kernel.h:
+ * include/kapidata.h (struct cyg_counter):
+ Fixed typos in configuration option names.
+
+1998-09-03 David Moore <dsm@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h
+ (CYGNUM_KERNEL_INTERRUPTS_DSRS_TABLE_SIZE):
+ Fixed typo in configuration option name.
+
+ * src/intr/intr.cxx:
+ Fixed typo in configuration option name.
+ Fixed cast to incorrect type.
+
+1998-09-03 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/PKGconf.mak (COMPILE):
+ Added debug/dbg-thread-demux.c to COMPILE list.
+
+ * src/debug/dbg_gdb.cxx (dbg_threadinfo):
+ Added first cut at providing thread state string.
+
+ * src/debug/dbg-thread-syscall.h:
+ * src/debug/dbg-thread-demux.c:
+ Added these two files to implement the interface between Cygmon
+ and eCos.
+
+1998-09-03 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h (CYGSEM_KERNEL_MEMORY_COALESCE):
+ * include/mvarimpl.inl (Cyg_Mempool_Variable_Implementation):
+ Fixed typo in configuration option name.
+
+ * include/pkgconf/kernel.h:
+ Fixed type in configuration option name.
+
+Wed Sep 2 19:01:02 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/mboxt.hxx:
+ * include/mboxt.inl:
+ * include/mboxt2.hxx:
+ * include/mboxt2.inl:
+ * include/mempolt2.hxx:
+ * include/mempolt2.inl:
+ * include/mempoolt.hxx:
+ * include/mempoolt.inl:
+ * include/sema2.hxx:
+ * src/sync/cnt_sem2.cxx:
+ * include/flag.hxx:
+ * src/sync/flag.cxx:
+ * include/kapi.h:
+ * src/common/kapi.cxx:
+ * tests/kmbox1.c:
+ * tests/kmemfix1.c:
+ * tests/kmemvar1.c:
+ * tests/mbox1.cxx:
+ * tests/memfix1.cxx:
+ * tests/memvar1.cxx:
+ Memory pool (both types) and message boxes (both types) and flags
+ and cnt_sem2-type semaphores now all have absolute timeouts
+ instead of relative ones in the timely wait functions.
+ uITRON has changed to add the current time itself.
+ Kapi changes are mainly name changes to make it clear that
+ timeouts are now absolute.
+ The tests (incl. kapi) add in the time themselves now.
+
+1998-09-01 Tim Goodwin <tgoodwin@cygnus.co.uk>
+
+ * include/kapi.h:
+ * src/common/kapi.cxx:
+ * tests/kclock1.c:
+ * tests/kexcept1.c:
+ * tests/kmbox1.c:
+ * tests/kmemfix1.c:
+ * tests/kmemvar1.c:
+ * tests/kmutex1.c:
+ * tests/ksched1.c:
+ * tests/ksem1.c:
+ * tests/kthread0.c:
+ * tests/kthread1.c:
+ * src/test/kcache1.c:
+ * src/test/kphilo.c:
+ * tests/kphilo.c:
+ * tests/lottery.c:
+ Changes to cyg_thread_create() interface.
+
+Tue Sep 1 18:49:06 1998 Hugo Tyson <hmt@masala.cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Moved and renamed CYG_DIAG_USE_DEVICE to infra and to
+ CYGDBG_INFRA_DIAG_USE_DEVICE; kernel.h now includes infra.h as
+ well as hal.h to ensure all its clients get the info too.
+
+ * include/intr.hxx (class Cyg_Interrupt):
+ Add static member interrupts_enabled() to poll the current status;
+ just to avoid calling the HAL directly, really.
+
+ * include/diag.h:
+ Now just includes cyg/infra/diag.h, so that kernel-specific
+ features can be added later - original diag.h has moved to infra,
+ and is that includee.
+
+ * src/PKGconf.mak:
+ Trace folder and its contents elided, now in infra.
+
+ * src/trace/diag.c:
+ * src/trace/fancy.cxx:
+ * src/trace/null.cxx:
+ * src/trace/simple.cxx:
+ * src/trace/tcdiag.cxx:
+ Deleted; all moved to infra, actually.
+
+1998-09-01 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/debug/dbg-threads-api.h:
+ * src/debug/dbg_gdb.cxx:
+ Converted threadref from long long to char[8] as defined by Cygmon
+ guys.
+
+ * src/common/thread.cxx:
+ Added scheduler lock around manipulations of thread list.
+
+ * include/except.hxx:
+ Now use CYG_EXCEPTION_COUNT to size handler arrays.
+
+Mon Aug 31 17:53:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/memfixed.hxx, include/mempolt2.hxx, include/mempolt2.inl,
+ include/mempoolt.hxx, include/mempoolt.inl, include/memvar.hxx,
+ include/mvarimpl.hxx, include/mvarimpl.inl, src/mem/memfixed.cxx,
+ src/mem/memvar.cxx:
+
+ Add new get_allocation_size() method to return the size of a
+ previously allocated block - trivial for fixed block allocator, and
+ requiring a bit of poking around for the variable block allocator.
+
+ This is required for the C library realloc() implementation. Strictly
+ this only uses the variable block allocator, but the API can only be
+ enhanced by also updating the template. As a result, this also meant
+ doing it for the fixed block allocator.
+
+Mon Aug 31 09:51:37 1998 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/debug/stubrom.c (cyg_start): Renamed from main().
+
+Mon Aug 31 09:00:01 1998 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/common/thread.cxx: Fixed typo.
+
+1998-08-28 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h, include/bitmap.hxx, include/clock.hxx,
+ include/except.hxx, include/flag.hxx, include/instrmnt.h,
+ include/intr.hxx, include/kapi.h, include/kapidata.h,
+ include/mbox.hxx, include/mboxt.hxx, include/mboxt.inl,
+ include/mboxt2.hxx, include/mboxt2.inl, include/memfixed.hxx,
+ include/mempolt2.hxx, include/mempolt2.inl,
+ include/mempoolt.hxx, include/mempoolt.inl, include/memvar.hxx,
+ include/mlqueue.hxx, include/mutex.hxx, include/mvarimpl.inl,
+ include/sched.hxx, include/sema.hxx, include/sema2.hxx,
+ include/thread.hxx, include/thread.inl,
+ include/pkgconf/kernel.h:
+ src/common/clock.cxx, src/common/except.cxx,
+ src/common/kapi.cxx, src/common/thread.cxx,
+ src/debug/dbg_gdb.cxx, src/debug/generic-stub.c,
+ src/instrmnt/meminst.cxx, src/instrmnt/nullinst.cxx,
+ src/intr/intr.cxx, src/mem/memfixed.cxx, src/mem/memvar.cxx,
+ src/sched/bitmap.cxx, src/sched/lottery.cxx,
+ src/sched/mlqueue.cxx, src/sched/sched.cxx,
+ src/sync/cnt_sem.cxx, src/sync/cnt_sem2.cxx, src/sync/flag.cxx,
+ src/sync/mbox.cxx, src/sync/mutex.cxx, src/test/diag.cxx,
+ src/test/kcache1.c, src/test/main.cxx, src/test/timer.cxx,
+ src/test/tstmbox.cxx:
+ tests/clock0.cxx, tests/clock1.cxx, tests/except1.cxx,
+ tests/flag1.cxx, tests/intr0.cxx, tests/kclock0.c,
+ tests/kclock1.c, tests/kexcept1.c, tests/kintr0.c,
+ tests/kmbox1.c, tests/kmemfix1.c, tests/kmemvar1.c,
+ tests/kmutex0.c, tests/kmutex1.c, tests/ksched1.c,
+ tests/ksem0.c, tests/ksem1.c, tests/kthread0.c,
+ tests/kthread1.c, tests/lottery.c, tests/mbox1.cxx,
+ tests/memfix1.cxx, tests/memvar1.cxx, tests/sync3.cxx,
+ tests/thread2.cxx :
+ Provide configuration data and rename configuration options
+
+Fri Aug 28 15:27:31 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/trace/fancy.cxx:
+ * src/trace/simple.cxx:
+ * src/trace/null.cxx:
+ Condition on newly named symbols from the infra package, whence
+ these units will be moved soon.
+
+Fri Aug 28 09:33:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/test/demo.cxx, src/test/kcache1.c, src/test/kphilo.c,
+ src/test/main.cxx, src/test/philo.cxx, src/test/sload.c,
+ src/test/timer.cxx, src/test/tstflag.cxx, src/test/tstmbox.cxx,
+ src/test/tstmpf.cxx, src/test/tstmpool.cxx, src/test/tsttracc.c,
+ src/test/tsttrace.cxx, tests/bin_sem0.cxx, tests/bin_sem1.cxx,
+ tests/bin_sem2.cxx, tests/clock0.cxx, tests/clock1.cxx,
+ tests/cnt_sem0.cxx, tests/cnt_sem1.cxx, tests/except1.cxx,
+ tests/flag0.cxx, tests/flag1.cxx, tests/intr0.cxx, tests/kclock0.c,
+ tests/kclock1.c, tests/kexcept1.c, tests/kill.cxx, tests/kintr0.c,
+ tests/kmbox1.c, tests/kmemfix1.c, tests/kmemvar1.c, tests/kmutex0.c,
+ tests/kmutex1.c, tests/kphilo.c, tests/ksched1.c, tests/ksem0.c,
+ tests/ksem1.c, tests/kthread0.c, tests/kthread1.c, tests/lottery.c,
+ tests/mbox1.cxx, tests/memfix1.cxx, tests/memfix2.cxx,
+ tests/memvar1.cxx, tests/memvar2.cxx, tests/mutex0.cxx,
+ tests/mutex1.cxx, tests/philo.cxx, tests/release.cxx,
+ tests/sched1.cxx, tests/sync2.cxx, tests/sync3.cxx,
+ tests/thread0.cxx, tests/thread1.cxx, tests/thread2.cxx:
+ Change entry points from main() to cyg_start(), and remove return
+ codes - while main returned an int, cyg_start() returns void. It has
+ no meaning anyway - what could you do with the code?
+
+ * src/test/tsttracc.c, src/test/tsttrace.cxx:
+ Also change trace calls (CYG_REPORT_...) to reflect that it is a
+ function called cyg_start with no args returning void, rather than
+ what it was for main(argc, argv)
+
+Fri Aug 28 09:24:41 1998 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/debug/generic-stub.c: Moved strcpy/strlen from hal-stub to
+ generic-stub. Cleaned up a bit to avoid compiler warnings.
+
+Thu Aug 27 19:22:51 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/kphilo.c (Philosopher):
+ * tests/philo.cxx (Philosopher):
+ * src/test/philo.cxx (Philosopher):
+ * src/test/kphilo.c (Philosopher):
+ * src/common/kapi.cxx:
+ Change CYG_RELEASE_DEBUG to CYGPKG_INFRA_DEBUG.
+ These changes are self-contained, so they can go in right now.
+
+Thu Aug 27 15:20:31 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/mvarimpl.inl (free):
+ Remove a couple of warning due to pointer comparison without casts
+ in coallesce(sic.) code.
+
+1998-08-26 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/kapidata.h:
+ Added saved_context to cyg_hardwarethread structure to track
+ GDB support in rest of kernel.
+
+1998-08-25 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Added CYGIMP_KERNEL_THREAD_GDB_SUPPORT to configure for GDB
+ interactions with the kernel.
+
+ * src/debug/dbg-threads-api.h:
+ * src/debug/dbg_gdb.cxx:
+ Added these files to repository to support GDB interactions
+ with the kernel. Note that dbg-threads-api.h is a copy of a
+ file in devo/libstub. Any changes there must be merged in here
+ too.
+
+ * src/PKGconf.mak:
+ Added debug/dbg_gdb.cxx to COMPILE list.
+
+ * include/thread.inl:
+ * include/thread.hxx:
+ Added support for GDB, specifically for thread-aware debugging.
+
+ * include/intr.hxx:
+ * src/intr/intr.cxx:
+ Added an extra argument to interrupt_end(): a pointer to
+ the saved register state. This is optionally used to provide
+ a more interesting saved register state for GDB.
+
+Tue Aug 25 02:36:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/generic-stub.h:
+ Add void to empty prototype argument lists to silence compiler
+ warnings
+
+Fri Aug 21 18:46:34 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/common/clock.cxx (enable):
+ Make the maths work right if we only just set up the clock
+ thingy. Unsigned has a lot to answer for; when the next scheduled
+ tick was all correct, the delta was -1, which correctly rounds to
+ zero in the division. But it isn't -1 it's 18446744073709551615
+ which gave a shift of 15 in the the uITRON test programs.
+
+Fri Aug 21 11:40:50 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/mboxt2.inl (put):
+ * include/mempolt2.inl (alloc):
+ Tidy Nick's changes (1998-07-27) for set_timer() semantics a bit,
+ make it a bit more efficient and smaller code.
+
+Thu Aug 20 17:37:35 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * include/mvarimpl.inl, include/pkgconf/kernel.h:
+ Added memory coallecsing to the variable size memory allocator.
+ This option is enabled my default.
+
+ * tests/stdlib/malloc2.c: Only print 50 messages, not 500.
+
+1998-08-20 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Moved definition of CYG_KERNEL_USE_INIT_PRIORITY from here
+ to hal.h.
+
+ * include/thread.hxx:
+ Changed argument to cyg_thread_entry() to CYG_ADDRWORD from
+ CYG_ADDRESS.
+
+ * include/ktypes.h:
+ Moved constructor priority ordering stuff out to infra/cyg_type.h.
+
+ * include/kapi.h:
+ * src/common/kapi.cxx:
+ Added name and priority parameters to cyg_thread_create() and
+ swapped stack size and base parameters. These changes are
+ currently protected by DAY_OF_CHAOS ifdefs and are therefore
+ inactive.
+
+Wed Aug 19 19:06:16 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/bin_sem1.cxx, tests/bin_sem2.cxx, tests/cnt_sem1.cxx,
+ tests/flag1.cxx, tests/mbox1.cxx, tests/memfix2.cxx,
+ tests/memvar2.cxx, tests/sync2.cxx, tests/sync3.cxx,
+ tests/thread2.cxx, tests/release.cxx, tests/kill.cxx:
+ Reorder inclusion of thread.inl to silence warnings
+
+Wed Aug 19 18:48:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/kernel.hxx:
+ Reorder inclusion of thread.inl to silence warnings
+
+Wed Aug 19 18:21:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/common/kapi.cxx, src/sync/flag.cxx:
+ Reorder inclusion of thread.inl to silence warnings
+
+ * src/sync/bin_sem.cxx, src/sync/cnt_sem.cxx, src/sync/cnt_sem2.cxx,
+ src/sync/mbox.cxx:
+ Add inclusion of thread.inl to silence warnings
+
+ * src/common/memset.c:
+ Make pointer arithmetic be on char *, not void * to silence warnings
+
+ * include/diag.h, src/trace/diag.c:
+ Make diag_init take void parameter, and give diag_printf explicit
+ parameters in prototypes to silence warnings
+
+1998-08-19 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ * src/common/thread.cxx:
+ Added ifdef for CYGIMP_IDLE_THREAD_YIELD to support single
+ priority configurations.
+
+Tue Aug 18 16:56:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/thread.hxx, include/thread.inl:
+ To silence compiler warnings, move register_exception inline definition
+ from the .hxx to the .inl. Also move attach_stack to before the
+ constructor where it is invoked from.
+
+1998-08-18 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Moved all HAL specific config options out to a HAL config file.
+
+ * include/kapi.h:
+ * src/common/kapi.cxx:
+ Added cyg_scheduler_lock() and cyg_scheduler_unlock() to provide
+ user access to the scheduler lock.
+
+Mon Aug 17 21:39:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/kapi.h:
+ Insert "void" to empty parameter lists to silence warnings
+
+Fri Aug 14 18:10:20 1998 Hugo Tyson <hmt@masala.cygnus.co.uk>
+
+ * src/common/thread.cxx (exit):
+ Set the state explicitly to EXITED rather than or'ing
+ it in; should be safe cos it's what kill does in the normal case.
+ Needed to avoid suspend sort of states persisting after death.
+ One character changes are always aesthetically pleasing.
+
+Fri Aug 14 17:28:01 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/kernel.h:
+ Add config options as below:
+
+ * src/common/thread.cxx:
+ Add asserts of CYGNUM_KERNEL_MAX_COUNTED_WAKE_COUNT_ASSERT
+ and CYGNUM_KERNEL_MAX_SUSPEND_COUNT_ASSERT if they are defined.
+ Also lazily tidied format of func hdrs as per code review et al.
+
+1998-08-14 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/kapidata.h:
+ Added support for thread names and thread housekeeping list.
+
+ * src/common/delete.cxx:
+ Added include for cyg_type.h.
+
+ * include/pkgconf/kernel.h:
+ Added CYGIMP_THREAD_NAME and CYGIMP_THREAD_LIST options.
+
+ * include/thread.inl:
+ * include/thread.hxx:
+ Added support for thread names and thread housekeeping list.
+
+ * src/common/thread.cxx:
+ Added support for thread names and thread housekeeping list.
+ Fixed ordering bug in Cyg_Thread::delay().
+
+Thu Aug 13 15:33:48 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ktypes.h:
+ Remove inlined new and delete as they aren't strictly permitted and
+ they prevent a valid new and delete being defined anywhere else!
+
+ * src/common/delete.cxx, src/PKGconf.mak:
+ Add delete.cxx to provide default delete operation for when a C
+ library isn't present
+
+1998-07-28 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/thread.hxx, include/sched.hxx, include/mlqueue.hxx,
+ include/lottery.hxx, include/bitmap.hxx, src/common/thread.cxx,
+ src/sched/sched.cxx, src/sched/mlqueue.cxx, src/sched/lottery.cxx,
+ src/sched/bitmap.cxx:
+ Added an alternative constructor to Cyg_Thread which takes
+ arguments in new order, and includes a scheduling parameters
+ argument. Propagated effects of this through Cyg_SchedThread
+ and Cyg_SchedThread_Implementation. This mostly takes the form
+ of passing the scheduling parameters through to the constructors.
+
+1998-07-27 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/sync/flag.cxx, src/sync/cnt_sem2.cxx, include/mempoolt.inl,
+ include/mempolt2.inl, include/mboxt2.inl, include/mboxt.inl:
+ Modified code in API calls that take a timeout to allow for a
+ timeout in the past.
+ NOTE: The timeouts have for now been left as relative delays, they
+ should be converted to absolute timeouts.
+
+ * src/common/thread.cxx:
+ Modified code in counted_sleep to allow for a timeout in the past.
+ Added handling of EXIT wake_reason in delay().
+
+1998-07-24 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/thread.inl:
+ Reordered code in Cyg_Thread::set_timer() to init the timer after
+ wake_reason has been assigned.
+
+ * include/clock.inl:
+ Removed Cyg_Alarm::enable().
+
+ * src/sync/mutex.cxx (Cyg_Condition_Variable::wait):
+ Modified order of code in timed version of wait to allow for a
+ timout in the past.
+
+ * src/sync/cnt_sem.cxx (Cyg_Counting_Semaphore::wait):
+ Modified order of code in timed version of wait to allow for a
+ timout in the past. Also modified timeout to be absolute rather
+ than relative.
+
+ * src/common/thread.cxx (Cyg_Thread::wake):
+ Added test for whether a thread is actually asleep before waking
+ it. Allows us to apply wake() to awake threads without damage.
+
+ * src/common/clock.cxx:
+ Added code to Cyg_Counter::add_alarm() to deal with alarms
+ that trigger now or in the past.
+ Moved Cyg_Alarm::enable() here. Added code to do the right thing
+ when reenabling previously disabled interval alarms.
+
+1998-07-23 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/debug/stubrom.c: Added header comments.
+
+Thu Mar 26 18:25:36 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/test/philo.cxx:
+ Rename CYG_DEBUG ifdef to CYG_RELEASE_DEBUG
+
+Wed Mar 25 23:23:39 GMT 1998 Chris Provenzano <proven@cygnus.com>
+
+ * configure.in: Fix so non_arch.h is updated even if
+ config.cache does exists.
+
+ * include/kapi.h, include/kapidata.h, include/kernel.hxx
+ * include/mboxt.inl, include/sched.hxx:
+ #include <eccconf/kernel.h> instead of include <eccconf/kernel.h>
+
+ * include/eccconf/kernel.h: Added. This was old devo/config.h
+
+ * src/Makefile.am : Set CYG_CONFIGURATION to "<eccconf/kernel.h>"
+
+ * src/test/Makefile.am : Build .gdbinit from gdbinit.in
+ and tree from tree.in
+
+Wed Mar 25 18:24:48 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/Makefile.am, src/common/memcpy.c, src/common/memset.c:
+ Move memcpy and memset functions from C library into kernel to
+ satisfy the requirements of gcc - namely it must be available at
+ at all time. Changed memcpy and memset to sit more cleanly in the
+ kernel, and lose all dependencies on the C library
+ * src/Makefile.in: regenerated
+
+Fri Mar 13 18:36:42 GMT 1998 Chris Provenzano <proven@cygnus.com>
+
+ * configure.in : Add rule to get correct objcopy for target
+ * src/test/Makefile.am : Add rule to build philo.srec
+
+Fri Mar 13 11:47:23 GMT 1998 Chris Provenzano <proven@cygnus.com>
+
+ * configure.in, non_arch.h.in, non_arch.sh
+ Add support for the mn103000
+
+Thu Mar 12 11:38:28 GMT 1998 David Moore <dsm@cygnus.co.uk>
+
+ * src/Makefile.am:
+ Removed flag to leave comments in generated linker script.
+
+Thu Mar 12 10:55:20 GMT 1998 David Moore <dsm@cygnus.co.uk>
+
+ * configure.in:
+ Fixed setting of platform variable
+
+Wed Mar 11 16:54:28 GMT 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/test/Makefile.am, tests/Makefile.am:
+ Make sure CXXFLAGS from configure are also used
+
+Wed Mar 11 16:16:57 GMT 1998 Chris Provenzano <proven@cygnus.com>
+
+ * configure.in, non_arch.h.in. non_arch.sh:
+ Added build support for mips
+ * tests/Makefile.am, src/test/Makefile.am
+ Link with -nostdlib -lgcc
+
+Wed Mar 11 14:43:36 GMT 1998 Chris Provenzano <proven@cygnus.com>
+
+ * Makefile.am, configure.in, tests/Makefile.am
+ support building tests in the tests directory
+
+Wed Mar 11 13:18:17 GMT 1998 Chris Provenzano <proven@cygnus.com>
+
+ * acinclude.m4, stamp-h.in, non_arch.h.in, src/Makefile.am:
+ Added to support new kernel configure/make process
+
+ * Makefile.am: Modified to support new kernel configure/make
+ process.
+
+ * src/acinclude.m4, src/aclocal.m4, src/configure, src/configure.in
+ Deleted to support new kernel configure/make process
+
+ * Makefile.in, configure, aclocal.m4, src/Makefile.in,
+ src/configure: regenerated
+
+ * non_arch.sh: New shellscript to change platform/startup/debug
+ options after a configure is done.
+
+ * src/devo/config.h: include non_arch.h, for platform/startup/debug
+ options. This is generated at configure and modified by non_arch.sh
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/kernel/current/cdl/counters.cdl b/cesar/ecos/packages/kernel/current/cdl/counters.cdl
new file mode 100644
index 0000000000..bfa1483ad6
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/cdl/counters.cdl
@@ -0,0 +1,190 @@
+# ====================================================================
+#
+# counters.cdl
+#
+# configuration data related to the kernel counters and clocks
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: nickg
+# Contributors:
+# Date: 1999-07-05
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_option CYGVAR_KERNEL_COUNTERS_CLOCK {
+ display "Provide real-time clock"
+ requires CYGIMP_KERNEL_INTERRUPTS_DSRS
+ default_value 1
+ description "
+ On all current target systems the kernel can provide a
+ real-time clock. This clock serves two purposes. First it is
+ necessary to support clock and alarm related functions.
+ Second it is needed to implement timeslicing in some of the
+ schedulers including the mlqueue scheduler. If the
+ application does not require any of these facilities then it
+ is possible to disable the real time clock support
+ completely."
+}
+
+cdl_option CYGNUM_KERNEL_COUNTERS_CLOCK_ISR_PRIORITY {
+ display "Interrupt priority for the real-time clock"
+ active_if CYGVAR_KERNEL_COUNTERS_CLOCK
+ flavor data
+ default_value { is_loaded(CYGNUM_HAL_KERNEL_COUNTERS_CLOCK_ISR_DEFAULT_PRIORITY) ?
+ CYGNUM_HAL_KERNEL_COUNTERS_CLOCK_ISR_DEFAULT_PRIORITY : 1 }
+ description "
+ The implementation of the kernel's real-time clock typically
+ involves installing an interrupt handler on a suitable hardware
+ timer. This option controls the priority level used for that
+ interrupt. On most platforms the value is not important because
+ the clock ISR leaves most of the work to be done by the DSR.
+ However some processors have interrupt controllers with special
+ requirements for the interrupt priorities, in which case
+ application developers must be able to manipulate the clock's
+ priority."
+}
+
+cdl_interface CYGINT_KERNEL_COUNTERS {
+ requires 1 == CYGINT_KERNEL_COUNTERS
+ no_define
+}
+
+# NOTE: these option should really be a single enum.
+cdl_option CYGIMP_KERNEL_COUNTERS_SINGLE_LIST {
+ display "Implement counters using a single list"
+ default_value 1
+ implements CYGINT_KERNEL_COUNTERS
+ description "
+ There are two different implementations of the counter
+ objects. The first implementation stores all alarms in a
+ single linked list. The alternative implementation uses a
+ table of linked lists. A single list is more efficient in
+ terms of memory usage and is generally adequate when the
+ application only makes use of a small number of alarms."
+}
+
+cdl_component CYGIMP_KERNEL_COUNTERS_MULTI_LIST {
+ display "Implement counters using a table of lists"
+ default_value 0
+ implements CYGINT_KERNEL_COUNTERS
+ description "
+ There are two different implementations of the counter
+ objects. The first implementation stores all alarms in a
+ single linked list. The alternative implementation uses a
+ table of linked lists, with the size of the table being a
+ separate configurable option. For more complicated
+ operations it is better to have a table of lists since this
+ reduces the amount of computation whenever the timer goes
+ off. Assuming a table size of 8 (the default value) on
+ average the timer code will only need to check 1/8 of the
+ pending alarms instead of all of them."
+
+ cdl_option CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE {
+ display "Size of counter list table"
+ flavor data
+ legal_values 1 to 1024
+ default_value 8
+ description "
+ If counters are implemented using an array of linked lists
+ then this option controls the size of the array. A larger
+ size reduces the amount of computation that needs to take
+ place whenever the timer goes off, but requires extra
+ memory."
+ }
+}
+
+cdl_option CYGIMP_KERNEL_COUNTERS_SORT_LIST {
+ display "Sort the counter list"
+ default_value 0
+ description "
+ Sorting the counter lists reduces the amount of work that
+ has to be done when a counter tick is processed, since the
+ next alarm to expire is always at the front of the list.
+ However, it makes adding an alarm to the list more expensive
+ since a search must be done for the correct place to put it.
+ Many alarms are used to implement timeouts, which seldom trigger,
+ so it is worthwhile optimizing this case. For this reason
+ sorted list are disabled by default."
+}
+
+cdl_option CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY {
+ display "Measure real-time \[clock\] interrupt latency"
+ requires CYGVAR_KERNEL_COUNTERS_CLOCK
+ default_value 0
+ description "
+ Measure the interrupt latency as seen by the real-time clock
+ timer interrupt. This requires hardware support, defined by
+ the HAL_CLOCK_LATENCY() macro."
+}
+
+cdl_option CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY {
+ display "Measure real-time \[clock\] DSR latency"
+ requires CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY
+ default_value CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY
+ description "
+ Measure the DSR latency as seen by the real-time clock
+ timer interrupt. This requires hardware support, defined by
+ the HAL_CLOCK_LATENCY() macro."
+}
+
+cdl_option CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {
+ display "RTC resolution"
+ flavor data
+ calculated {"{CYGNUM_HAL_RTC_NUMERATOR, CYGNUM_HAL_RTC_DENOMINATOR}"}
+ description "
+ This option automatically defines the tuple which is used to
+ initialize the RTC resolution, consisting of a numerator and
+ denominator. The values of the numerator and denominator are
+ defined by the HAL."
+}
+
+cdl_option CYGNUM_KERNEL_COUNTERS_RTC_PERIOD {
+ display "RTC period"
+ flavor data
+ calculated {"CYGNUM_HAL_RTC_PERIOD"}
+ description "
+ This option defines the RTC period to be used in
+ setting the system clock hardware. It is essentially
+ an alias for CYGNUM_HAL_RTC_PERIOD, which is defined
+ in the HAL."
+}
+
+# EOF counters.cdl
diff --git a/cesar/ecos/packages/kernel/current/cdl/instrument.cdl b/cesar/ecos/packages/kernel/current/cdl/instrument.cdl
new file mode 100644
index 0000000000..da78a46047
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/cdl/instrument.cdl
@@ -0,0 +1,312 @@
+# ====================================================================
+#
+# instrument.cdl
+#
+# configuration data related to the kernel instrumentation
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: nickg
+# Contributors:
+# Date: 1999-07-05
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_option CYGVAR_KERNEL_INSTRUMENT_EXTERNAL_BUFFER {
+ display "Use buffer provided by the application"
+ flavor bool
+ default_value 0
+ description "
+ In most circumstances the kernel should provide the
+ instrumentation circular buffer itself. Occasionally
+ application code may wish to provide the buffer instead,
+ giving the application code more convenient access to the
+ buffer. This also makes it possible to put the circular
+ buffer in special areas of memory, for example a region that
+ is shared with the host."
+}
+
+cdl_option CYGNUM_KERNEL_INSTRUMENT_BUFFER_SIZE {
+ display "Size of instrumentation buffer size"
+ flavor data
+ legal_values 16 to 0x100000
+ default_value 256
+ description "
+ If kernel instrumentation is enabled then the instrumentation
+ data goes into a circular buffer. A larger buffer allows
+ more data to be stored, but at a significant cost in memory.
+ The value of this option corresponds to the number of entries
+ in the table, and typically each entry will require 16 bytes
+ of memory."
+}
+
+cdl_option CYGDBG_KERNEL_INSTRUMENT_BUFFER_WRAP {
+ display "Wrap instrument buffer"
+ default_value 1
+ description "
+ When the instrumentation buffer is full it can either be restarted
+ from the beginning, overwriting older data, or it can stop at the
+ end. The former is useful if you want to look at the last entries
+ made while the latter is useful if you want to look at the first
+ few."
+}
+
+cdl_option CYGDBG_KERNEL_INSTRUMENT_FLAGS {
+ display "Perform selective instrumentation"
+ default_value 1
+ description "
+ The kernel can either collect all instrumentation events, or
+ it can filter out events at runtime based on a set of flags.
+ For example it would be possible to decide at runtime that
+ only scheduler and interrupt instrumentation flags are of
+ interest and that all other flags should be ignored. This
+ flag mechanism involves extra code and processor cycle
+ overhead in the instrumentation code, so it can be disabled
+ if the application developer is interested in all
+ instrumentation events."
+}
+
+cdl_option CYGDBG_KERNEL_INSTRUMENT_SCHED {
+ display "Instrument the scheduler"
+ default_value 1
+ active_if CYGPKG_KERNEL_SCHED
+ description "
+ It is possible to perform selective instrumentation at
+ run-time. It is also possible to disable instrumentation
+ in various kernel components at compile-time, thus
+ reducing the code size overheads. This option controls
+ whether or not instrumentation support is compiled into
+ the scheduling code."
+}
+
+cdl_option CYGDBG_KERNEL_INSTRUMENT_THREAD {
+ display "Instrument thread operations"
+ default_value 1
+ active_if CYGPKG_KERNEL_THREADS
+ description "
+ It is possible to perform selective instrumentation at
+ run-time. It is also possible to disable instrumentation
+ in various kernel components at compile-time, thus
+ reducing the code size overheads. This option controls
+ whether or not instrumentation support is compiled into
+ the code that manipulates threads."
+}
+
+cdl_option CYGDBG_KERNEL_INSTRUMENT_INTR {
+ display "Instrument interrupts"
+ default_value 1
+ active_if CYGPKG_KERNEL_INTERRUPTS
+ description "
+ It is possible to perform selective instrumentation at
+ run-time. It is also possible to disable instrumentation
+ in various kernel components at compile-time, thus
+ reducing the code size overheads. This option controls
+ whether or not instrumentation support is compiled into
+ the interrupt handling code."
+}
+
+cdl_option CYGDBG_KERNEL_INSTRUMENT_MUTEX {
+ display "Instrument mutex operations"
+ default_value 1
+ active_if CYGPKG_KERNEL_SYNCH
+ description "
+ It is possible to perform selective instrumentation at
+ run-time. It is also possible to disable instrumentation
+ in various kernel components at compile-time, thus
+ reducing the code size overheads. This option controls
+ whether or not instrumentation support is compiled into
+ the mutex code."
+}
+
+cdl_option CYGDBG_KERNEL_INSTRUMENT_CONDVAR {
+ display "Instrument condition variable operations"
+ default_value 1
+ active_if CYGPKG_KERNEL_SYNCH
+ description "
+ It is possible to perform selective instrumentation at
+ run-time. It is also possible to disable instrumentation
+ in various kernel components at compile-time, thus
+ reducing the code size overheads. This option controls
+ whether or not instrumentation support is compiled into
+ the condition variable code."
+}
+
+cdl_option CYGDBG_KERNEL_INSTRUMENT_BINSEM {
+ display "Instrument binary semaphore operations"
+ default_value 1
+ active_if CYGPKG_KERNEL_SYNCH
+ description "
+ It is possible to perform selective instrumentation at
+ run-time. It is also possible to disable instrumentation
+ in various kernel components at compile-time, thus
+ reducing the code size overheads. This option controls
+ whether or not instrumentation support is compiled into
+ the binary semaphore code."
+}
+
+cdl_option CYGDBG_KERNEL_INSTRUMENT_CNTSEM {
+ display "Instrument counting semaphore operations"
+ default_value 1
+ active_if CYGPKG_KERNEL_SYNCH
+ description "
+ It is possible to perform selective instrumentation at
+ run-time. It is also possible to disable instrumentation
+ in various kernel components at compile-time, thus
+ reducing the code size overheads. This option controls
+ whether or not instrumentation support is compiled into
+ the counting semaphore code."
+}
+
+cdl_option CYGDBG_KERNEL_INSTRUMENT_MBOXT {
+ display "Instrument message box operations"
+ default_value 1
+ active_if CYGPKG_KERNEL_SYNCH
+ description "
+ It is possible to perform selective instrumentation at
+ run-time. It is also possible to disable instrumentation
+ in various kernel components at compile-time, thus
+ reducing the code size overheads. This option controls
+ whether or not instrumentation support is compiled into
+ the message box code."
+}
+
+cdl_option CYGDBG_KERNEL_INSTRUMENT_CLOCK {
+ display "Instrument clock operations"
+ default_value 1
+ active_if CYGVAR_KERNEL_COUNTERS_CLOCK
+ description "
+ It is possible to perform selective instrumentation at
+ run-time. It is also possible to disable instrumentation
+ in various kernel components at compile-time, thus
+ reducing the code size overheads. This option controls
+ whether or not instrumentation support is compiled into
+ the real-time clock code."
+}
+
+cdl_option CYGDBG_KERNEL_INSTRUMENT_ALARM {
+ display "Instrument alarm-related operations"
+ default_value 1
+ active_if CYGVAR_KERNEL_COUNTERS_CLOCK
+ description "
+ It is possible to perform selective instrumentation at
+ run-time. It is also possible to disable instrumentation
+ in various kernel components at compile-time, thus
+ reducing the code size overheads. This option controls
+ whether or not instrumentation support is compiled into
+ the code related to alarm operations."
+}
+
+cdl_option CYGDBG_KERNEL_INSTRUMENT_SMP {
+ display "Instrument SMP-related operations"
+ default_value 1
+ active_if CYGVAR_KERNEL_COUNTERS_CLOCK
+ description "
+ It is possible to perform selective instrumentation at
+ run-time. It is also possible to disable instrumentation
+ in various kernel components at compile-time, thus
+ reducing the code size overheads. This option controls
+ whether or not instrumentation support is compiled into
+ the code related to SMP operations."
+}
+
+cdl_option CYGDBG_KERNEL_INSTRUMENT_USER {
+ display "Support application-level instrumentation"
+ default_value 1
+ description "
+ It is possible to perform selective instrumentation at
+ run-time. It is also possible to disable instrumentation
+ in various kernel components at compile-time, thus
+ reducing the code size overheads. This option controls
+ whether or not application-level instrumentation gets
+ compiled in."
+}
+
+cdl_component CYGDBG_KERNEL_INSTRUMENT_MSGS {
+ display "Print user friendly instrument messages"
+ default_value 1
+ description "
+ Include code which will convert the instrument type field
+ into a more human understandable string"
+
+ cdl_option CYGDBG_KERNEL_INSTRUMENT_MSGS_BUILD_HEADERFILE {
+ display "Rebuild the header file"
+ default_value 0
+ description "
+
+ Make (using a shell script) include/cyg/kernel/instrument_desc.h in
+ your build tree; this is normally simply copied from the repository.
+ If you make a permanent change to include/instrmnt.h, such that
+ instrument_desc.h needs updating, it's up to you to first delete the
+ master file
+ ECOS_REPOSITORY/kernel/VERSION/include/instrument_desc.h
+ in your source repository, make the new version by enabling this
+ option then copy the new file
+ back from your build place to its source in
+ ECOS_REPOSITORY/kernel/VERSION/include/instrument_desc.h
+ and/or commit this to any version control system that you use."
+
+ make -priority 50 {
+ <PREFIX>/include/cyg/kernel/instrument_desc.h: <PACKAGE>/include/instrmnt.h <PACKAGE>/cdl/instrument.cdl
+ sh $(REPOSITORY)/$(PACKAGE)/host/instr/instrument.sh $< > $@
+ }
+ }
+
+ cdl_component CYGDBG_KERNEL_INSTRUMENT_BUILD_HOST_DUMP {
+ display "Build the host tool to print out a dump"
+ default_value 0
+ description "
+ Generate a host program which can dump the instrumentation
+ data in a human readable format. You have to somehow get the
+ instrumentation buffer into a file on the host. 'Exercise for
+ the reader' as university lecturers tend to say."
+
+ make -priority 51 {
+ <PREFIX>/bin/dump_instr: <PREFIX>/include/cyg/kernel/instrument_desc.h <PACKAGE>/cdl/instrument.cdl
+ @mkdir -p $(dir $@)
+ @mkdir -p tempinc
+ @cp -r $(PREFIX)/include/cyg tempinc
+ @cp -r $(PREFIX)/include/pkgconf tempinc
+ cc -I./tempinc $(REPOSITORY)/$(PACKAGE)/host/instr/dump_instr.c -o $(PREFIX)/bin/dump_instr
+ @rm -rf tempinc
+ }
+ }
+}
+
+# EOF instrument.cdl
diff --git a/cesar/ecos/packages/kernel/current/cdl/interrupts.cdl b/cesar/ecos/packages/kernel/current/cdl/interrupts.cdl
new file mode 100644
index 0000000000..f6c02c1222
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/cdl/interrupts.cdl
@@ -0,0 +1,129 @@
+# ====================================================================
+#
+# interrupts.cdl
+#
+# configuration data related to kernel interrupt handling
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Original data: nickg
+# Contributors:
+# Date: 1999-06-13
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+# NOTE: the choice of list vs table should not be two separate
+# options. There is a single option which must have one of
+# two legal values.
+cdl_component CYGIMP_KERNEL_INTERRUPTS_DSRS {
+ display "Use delayed service routines (DSRs)"
+ default_value 1
+ description "
+ In eCos the recommended way to handle device interrupts is to
+ do a minimum amount of work inside the low level interrupt
+ handler itself, and instead do as much as possible in a
+ Delayed Service Routine or DSR. If an application does not
+ make use of DSRs directly or indirectly then it is possible
+ to disable the DSR support completely, which reduces the
+ overheads of context switches and interrupt handling. Note
+ that the kernel real-time clock makes use of DSRs, as do many
+ of the device drivers. "
+
+ cdl_interface CYGINT_KERNEL_INTERRUPTS_DSRS {
+ requires 1 == CYGINT_KERNEL_INTERRUPTS_DSRS
+ no_define
+ }
+
+ # NOTE: the choice of list vs table should not be two separate
+ # options. There is a single option which must have one of
+ # two legal values.
+ cdl_option CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST {
+ display "Use linked lists for DSRs"
+ default_value 1
+ implements CYGINT_KERNEL_INTERRUPTS_DSRS
+ description "
+ When DSR support is enabled the kernel must keep track of all
+ the DSRs that are pending. This information can be kept in a
+ fixed-size table or in a linked list. The list implementation
+ requires that the kernel disable interrupts for a very short
+ period of time outside interrupt handlers, but there is no
+ possibility of a table overflow occurring."
+ }
+
+ cdl_component CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE {
+ display "Use fixed-size table for DSRs"
+ default_value 0
+ implements CYGINT_KERNEL_INTERRUPTS_DSRS
+ description "
+ When DSR support is enabled the kernel must keep track of all
+ the DSRs that are pending. This information can be kept in a
+ fixed-size table or in a linked list. The table
+ implementation involves a very small risk of overflow at
+ run-time if a given interrupt source is able to have more
+ than one pending DSR. However it has the advantage that
+ the kernel does not need to disable interrupts outside
+ interrupt handlers."
+
+ cdl_option CYGNUM_KERNEL_INTERRUPTS_DSRS_TABLE_SIZE {
+ display "Number of entries in fixed-size DSR table"
+ flavor data
+ legal_values 2 to 1024
+ default_value 32
+ description "
+ When DSR support is enabled the kernel must keep track of all
+ the DSRs that are pending. One approach involves a fixed-size
+ table, which involves a very small risk of overflow at
+ run-time. By increasing the table size it is possible to reduce
+ this risk."
+ }
+ }
+
+ cdl_option CYGIMP_KERNEL_INTERRUPTS_CHAIN {
+ display "Chain all interrupts together"
+ requires CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
+ default_value 0
+ description "
+ Interrupts can be attached to vectors either singly, or be
+ chained together. The latter is necessary if there is no way
+ of discovering which device has interrupted without
+ inspecting the device itself. It can also reduce the amount
+ of RAM needed for interrupt decoding tables and code."
+ }
+}
diff --git a/cesar/ecos/packages/kernel/current/cdl/kernel.cdl b/cesar/ecos/packages/kernel/current/cdl/kernel.cdl
new file mode 100644
index 0000000000..a258d2d7dc
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/cdl/kernel.cdl
@@ -0,0 +1,345 @@
+# ====================================================================
+#
+# kernel.cdl
+#
+# eCos kernel configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Original data: nickg
+# Contributors:
+# Date: 1999-06-13
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_KERNEL {
+ display "eCos kernel"
+ doc ref/kernel.html
+ include_dir cyg/kernel
+ description "
+ This package contains the core functionality of the eCos
+ kernel. It relies on functionality provided by various HAL
+ packages and by the eCos infrastructure. In turn the eCos
+ kernel provides support for other packages such as the device
+ drivers and the uITRON compatibility layer."
+ # FIXME: The compile statement should be split up and integrated as
+ # part of the components - so files only get comiled when they
+ # will actually be used.
+ compile common/clock.cxx common/timer.cxx common/kapi.cxx \
+ common/thread.cxx common/except.cxx \
+ intr/intr.cxx \
+ sched/bitmap.cxx sched/lottery.cxx sched/mlqueue.cxx \
+ sched/sched.cxx \
+ sync/bin_sem.cxx sync/cnt_sem.cxx sync/flag.cxx \
+ sync/cnt_sem2.cxx sync/mbox.cxx sync/mutex.cxx \
+ debug/dbg-thread-demux.c
+
+ # ---------------------------------------------------------------------
+ # The first component within the kernel is related to interrupt
+ # handling.
+ cdl_component CYGPKG_KERNEL_INTERRUPTS {
+ display "Kernel interrupt handling"
+ flavor none
+ doc ref/kernel-interrupts.html
+ description "
+ The majority of configuration options related to interrupt
+ handling are in the HAL packages, since usually the code has
+ to be platform-specific. There are a number of options
+ provided within the kernel related to slightly higher-level
+ concepts, for example Delayed Service Routines."
+
+ script interrupts.cdl
+ }
+
+ # ---------------------------------------------------------------------
+ # Exceptions. Currently there are only two options. The first
+ # determines whether or not exceptions are enabled at all. The
+ # second controls whether they apply globally or on a per-thread
+ # basis. There should probably be more options, but the boundary
+ # between the HAL and kernel becomes blurred.
+ cdl_component CYGPKG_KERNEL_EXCEPTIONS {
+ display "Exception handling"
+ requires CYGPKG_HAL_EXCEPTIONS
+ default_value 1
+ doc ref/kernel-exceptions.html
+ description "
+ In the context of the eCos kernel exceptions are unexpected
+ events detected by the hardware, for example an attempt to
+ execute an illegal instruction. There is no relation with
+ other forms of exception, for example the catch and throw
+ facilities of languages like C++. It is possible to disable
+ all support for exceptions and thus save some memory."
+
+ cdl_option CYGSEM_KERNEL_EXCEPTIONS_DECODE {
+ display "Decode exception types in kernel"
+ default_value 0
+ description "
+ On targets where several different types of exception are
+ possible, for example executing an illegal instruction and
+ division by zero, it is possible for the kernel to do some
+ decoding of the exception type and deliver the different
+ types of exception to different handlers in the application
+ code. Alternatively the kernel can simply pass all
+ exceptions directly to application code, leaving the
+ decoding to be done by the application"
+ }
+
+ cdl_option CYGSEM_KERNEL_EXCEPTIONS_GLOBAL {
+ display "Use global exception handlers"
+ default_value 1
+ description "
+ In the context of the eCos kernel exceptions are
+ unexpected events detected by the hardware, for
+ example an attempt to execute an illegal
+ instruction. If the kernel is configured
+ to support exceptions then two implementations are
+ possible. The default implementation involves a single set
+ of exception handlers that are in use for the entire
+ system. The alternative implementation allows different
+ exception handlers to be specified for each thread."
+ }
+ }
+
+ # ---------------------------------------------------------------------
+ cdl_component CYGPKG_KERNEL_SCHED {
+ display "Kernel schedulers"
+ flavor none
+ doc ref/kernel-overview.html#KERNEL-OVERVIEW-SCHEDULERS
+ description "
+ The eCos kernel provides a choice of schedulers. In addition
+ there are a number of configuration options to control the
+ detailed behaviour of these schedulers."
+
+ script scheduler.cdl
+ }
+
+ # ---------------------------------------------------------------------
+ # SMP support
+
+ cdl_component CYGPKG_KERNEL_SMP_SUPPORT {
+ display "SMP support"
+ flavor bool
+ requires CYGPKG_HAL_SMP_SUPPORT
+ default_value 0
+ }
+
+ cdl_component CYGPKG_KERNEL_SMP_TEST {
+ display "build SMP test"
+ flavor bool
+ requires CYGPKG_KERNEL_SMP_SUPPORT
+ default_value 0
+ }
+
+ # ---------------------------------------------------------------------
+ cdl_component CYGPKG_KERNEL_COUNTERS {
+ display "Counters and clocks"
+ flavor none
+ doc ref/kernel-counters.html
+ description "
+ The counter objects provided by the kernel provide an
+ abstraction of the clock facility that is generally provided.
+ Application code can associate alarms with counters, where an
+ alarm is identified by the number of ticks until it triggers,
+ the action to be taken on triggering, and whether or not the
+ alarm should be repeated."
+
+ script counters.cdl
+ }
+
+ # ---------------------------------------------------------------------
+ cdl_component CYGPKG_KERNEL_THREADS {
+ display "Thread-related options"
+ flavor none
+ description "
+ There are a number of configuration options related to the
+ implementation of threads, for example whether or not the
+ eCos kernel supports per-thread data."
+
+ script thread.cdl
+ }
+
+ # ---------------------------------------------------------------------
+ cdl_component CYGPKG_KERNEL_SYNCH {
+ display "Synchronization primitives"
+ flavor none
+ description "
+ The eCos kernel supports a number of different
+ synchronization primitives such as mutexes, semaphores,
+ condition variables, and message boxes. There are
+ configuration options to control the exact behaviour of some
+ of these synchronization primitives."
+
+ script synch.cdl
+ }
+
+ # ---------------------------------------------------------------------
+ cdl_component CYGPKG_KERNEL_INSTRUMENT {
+ display "Kernel instrumentation"
+ flavor bool
+ default_value 0
+ description "
+ The current release of the kernel contains an initial version
+ of instrumentation support. The various parts of the kernel
+ will invoke instrumentation routines whenever appropriate
+ events occur, and these will be stored in a circular buffer
+ for later reference."
+
+ compile instrmnt/meminst.cxx
+ script instrument.cdl
+ }
+
+ #===================================================================
+ # Options related to source-level debugging and diagnostics.
+ cdl_component CYGPKG_KERNEL_DEBUG {
+ display "Source-level debugging support"
+ flavor none
+ description "
+ If the source level debugger gdb is to be used for debugging
+ application code then it may be necessary to configure in support
+ for this in the kernel."
+
+ # NOTE: does this require any other support ?
+ cdl_option CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT {
+ display "Include GDB multi-threading debug support"
+ requires CYGVAR_KERNEL_THREADS_LIST
+ requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
+ default_value 1
+ compile debug/dbg_gdb.cxx
+ description "
+ This option enables some extra kernel code which is needed
+ to support multi-threaded source level debugging."
+ }
+ }
+
+ # ---------------------------------------------------------------------
+ # Kernel API's. The C++ one is the default. A C API is optional.
+ # Support for other languages is possible.
+ cdl_component CYGPKG_KERNEL_API {
+ display "Kernel APIs"
+ flavor none
+ description "
+ The eCos kernel is implemented in C++, so a C++ interface
+ to the kernel is always available. There is also an optional
+ C API. Additional API's may be provided in future versions."
+
+ cdl_option CYGFUN_KERNEL_API_C {
+ display "Provide C API"
+ default_value 1
+ description "
+ The eCos kernel is implemented in C++, but there is an
+ optional C API for use by application code. This C API can be
+ disabled if the application code does not invoke the kernel
+ directly, but instead uses higher level code such as the
+ uITRON compatibility layer."
+ }
+ }
+
+ define_proc {
+ puts $::cdl_header "/***** proc output start *****/"
+
+ # Clients of pkgconf/kernel.h expects system.h to be included.
+ puts $::cdl_header "#include <pkgconf/system.h>"
+ # FIXME: Some clients may rely on hal.h and infra.h being included.
+ # This should go away when any such client has been fixed.
+ puts $::cdl_header "#include <pkgconf/hal.h>"
+ puts $::cdl_header "#include <pkgconf/infra.h>"
+
+ # Include HAL/Platform specifics
+ puts $::cdl_header "#include CYGBLD_HAL_PLATFORM_H"
+ # Fallback defaults (in case HAL didn't define these)
+ puts $::cdl_header "#ifndef CYGNUM_HAL_RTC_NUMERATOR"
+ puts $::cdl_header "# define CYGNUM_HAL_RTC_NUMERATOR 1000000000"
+ puts $::cdl_header "# define CYGNUM_HAL_RTC_DENOMINATOR 100"
+ puts $::cdl_header "# define CYGNUM_HAL_RTC_PERIOD 9999"
+ puts $::cdl_header "#endif"
+
+ puts $::cdl_header "/***** proc output end *****/"
+ }
+
+ cdl_component CYGPKG_KERNEL_OPTIONS {
+ display "Kernel build options"
+ flavor none
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_KERNEL_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the eCos kernel. These flags are used in addition
+ to the set of global flags."
+ }
+
+ cdl_option CYGPKG_KERNEL_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the eCos kernel. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_KERNEL_TESTS {
+ display "Kernel tests"
+ flavor data
+ no_define
+ calculated {
+ "tests/bin_sem0 tests/bin_sem1 tests/bin_sem2 tests/bin_sem3 tests/clock0 tests/clock1 tests/clockcnv tests/clocktruth tests/cnt_sem0 tests/cnt_sem1 tests/except1 tests/flag0 tests/flag1 tests/intr0 tests/kill tests/mbox1 tests/mqueue1 tests/mutex0 tests/mutex1 tests/mutex2 tests/mutex3 tests/release tests/sched1 tests/sync2 tests/sync3 tests/thread0 tests/thread1 tests/thread2"
+ . ((CYGFUN_KERNEL_API_C) ? " tests/kclock0 tests/kclock1 tests/kexcept1 tests/kflag0 tests/kflag1 tests/kintr0 tests/klock tests/kmbox1 tests/kmutex0 tests/kmutex1 tests/kmutex3 tests/kmutex4 tests/ksched1 tests/ksem0 tests/ksem1 tests/kthread0 tests/kthread1 tests/stress_threads tests/thread_gdb tests/timeslice tests/tm_basic tests/fptest tests/kalarm0" : "")
+ . ((!CYGPKG_INFRA_DEBUG && !CYGPKG_KERNEL_INSTRUMENT && CYGFUN_KERNEL_API_C) ? " tests/dhrystone" : "")
+ . ((CYGPKG_KERNEL_SMP_SUPPORT && CYGFUN_KERNEL_API_C) ? " tests/smp" : "")
+ . ((!CYGINT_HAL_TESTS_NO_CACHES && CYGFUN_KERNEL_API_C) ? " tests/kcache1 tests/kcache2" : "")
+ . ((CYGPKG_KERNEL_SMP_TEST) ? " tests_smp/fft.c tests_smp/radix.c tests_smp/lu.c " : "")
+ }
+ description "
+ This option specifies the set of tests for the eCos kernel."
+ }
+ }
+}
+
+# EOF kernel.cdl
diff --git a/cesar/ecos/packages/kernel/current/cdl/scheduler.cdl b/cesar/ecos/packages/kernel/current/cdl/scheduler.cdl
new file mode 100644
index 0000000000..ecd7a76a58
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/cdl/scheduler.cdl
@@ -0,0 +1,256 @@
+# ====================================================================
+#
+# scheduler.cdl
+#
+# configuration data related to the kernel schedulers
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: nickg
+# Contributors:
+# Date: 1999-07-05
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_interface CYGINT_KERNEL_SCHEDULER {
+ display "Number of schedulers in this configuration"
+ no_define
+ requires 1 == CYGINT_KERNEL_SCHEDULER
+}
+
+cdl_interface CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES {
+ display "Non-zero if the active schedule only has unique priorities"
+ description "
+ Not all schedulers allow mutiple threads to use the same
+ priority. That property is signalled via this option, allowing
+ scheduler and tests to behave accordingly."
+}
+
+# FIXME: The two below options must be mutually exclusive
+cdl_component CYGSEM_KERNEL_SCHED_MLQUEUE {
+ display "Multi-level queue scheduler"
+ default_value 1
+ implements CYGINT_KERNEL_SCHEDULER
+ description "
+ The multi-level queue scheduler supports multiple priority
+ levels and multiple threads at each priority level.
+ Preemption between priority levels is automatic. Timeslicing
+ within a given priority level is controlled by a separate
+ configuration option."
+
+ cdl_option CYGDBG_KERNEL_TRACE_TIMESLICE {
+ display "Output timeslices when tracing"
+ active_if CYGDBG_USE_TRACING
+ requires !CYGDBG_INFRA_DEBUG_TRACE_ASSERT_SIMPLE
+ requires !CYGDBG_INFRA_DEBUG_TRACE_ASSERT_FANCY
+ default_value 0
+ description "
+ When tracing is enabled, output trace messages every
+ timeslice. This can be quite verbose so is disabled by
+ default."
+ }
+}
+
+cdl_option CYGSEM_KERNEL_SCHED_BITMAP {
+ display "Bitmap scheduler"
+ default_value 0
+ implements CYGINT_KERNEL_SCHEDULER
+ implements CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES
+ requires !CYGPKG_KERNEL_SMP_SUPPORT
+ description "
+ The bitmap scheduler supports multiple priority levels but
+ only one thread can exist at each priority level. This means
+ that scheduling decisions are very simple and hence the
+ scheduler is efficient. Preemption between priority levels is
+ automatic. Timeslicing within a given priority level is
+ irrelevant since there can be only one thread at each
+ priority level."
+}
+
+#cdl_option CYGSEM_KERNEL_SCHED_LOTTERY {
+# display "Lottery scheduler"
+# type radio
+# description "
+# This scheduler is not yet available."
+#}
+
+cdl_option CYGPRI_KERNEL_SCHED_IMPL_HXX {
+ display "Scheduler header file"
+ flavor data
+ description "
+ This option sets a preprocessor symbol which names the header
+ file for the selected scheduler. It is used internally by the
+ common scheduler code to include the correct header file."
+ calculated { \
+ CYGSEM_KERNEL_SCHED_BITMAP ? "<cyg/kernel/bitmap.hxx>" :\
+ CYGSEM_KERNEL_SCHED_MLQUEUE ? "<cyg/kernel/mlqueue.hxx>" :\
+ CYGSEM_KERNEL_SCHED_LOTTERY ? "<cyg/kernel/lottery.hxx>" :\
+ "!!!-- Configuration broken - no scheduler selected --!!!"}
+}
+
+
+
+# NOTE: This option only makes sense if the current scheduler
+# supports multiple priority levels.
+cdl_component CYGNUM_KERNEL_SCHED_PRIORITIES {
+ display "Number of priority levels"
+ flavor data
+ legal_values 1 to 32
+ default_value 32
+ #active_if CYGINT_KERNEL_SCHED_PRIORITY_SCHEDULER
+ description "
+ This option controls the number of priority levels that are
+ available. For some types of scheduler including the bitmap
+ scheduler this may impose an upper bound on the number of
+ threads in the system. For other schedulers such as the
+ mlqueue scheduler the number of threads is independent from
+ the number of priority levels. Note that the lowest priority
+ level is normally used only by the idle thread, although
+ application threads can run at this priority if necessary."
+
+ cdl_option CYGNUM_KERNEL_SCHED_BITMAP_SIZE {
+ display "Bitmap size"
+ flavor data
+ calculated {"CYGNUM_KERNEL_SCHED_PRIORITIES"}
+ description "
+ This option automatically defines the size of bitmap
+ used to track occupied priority levels."
+ }
+
+
+ cdl_option CYGIMP_KERNEL_SCHED_SORTED_QUEUES {
+ display "Dequeue highest priority threads first"
+ flavor bool
+ default_value 0
+ description "
+ With this option enabled, threads queued in a thread queue
+ will be dequeued in priority order, rather than first in,
+ first out (FIFO). Threads of equal priority are dequeued
+ oldest first. The only exception is the scheduler run
+ queues where order is less important as each is already
+ sorted by priority. Note that this makes the thread queueing
+ less deterministic."
+ }
+}
+
+# ---------------------------------------------------------------------
+# Timeslice options
+
+# NOTE: this option only makes sense for some of the schedulers.
+# Timeslicing is irrelevant for bitmap schedulers.
+cdl_component CYGSEM_KERNEL_SCHED_TIMESLICE {
+ display "Scheduler timeslicing"
+ requires !CYGSEM_KERNEL_SCHED_BITMAP
+ requires CYGVAR_KERNEL_COUNTERS_CLOCK
+ default_value 1
+ description "
+ Some schedulers including the mlqueue scheduler support
+ timeslicing. This means that the kernel will check regularly
+ whether or not there is another runnable thread with the
+ same priority, and if there is such a thread there will be
+ an automatic context switch. Not all applications require
+ timeslicing, for example because every thread performs a
+ blocking operation regularly. For these applications it is
+ possible to disable timeslicing, which reduces the overheads
+ associated with timer interrupts."
+
+ cdl_option CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS {
+ display "Number of clock ticks between timeslices"
+ flavor data
+ legal_values 1 to 65535
+ default_value 5
+ description "
+ Assuming timeslicing is enabled, how frequently should it
+ take place? The value of this option corresponds to the
+ number of clock ticks that should occur before a timeslice
+ takes place, so increasing the value reduces the frequency
+ of timeslices."
+ }
+
+ cdl_option CYGSEM_KERNEL_SCHED_TIMESLICE_ENABLE {
+ display "Support runtime enable of timeslice per-thread"
+ flavor bool
+ default_value false
+ description "This option makes timslicing a per-thread runtime
+ option. When enabled, threads may have timeslicing
+ turned on or off dynamically. This is generally used
+ by higher level APIs (such as POSIX) to implement
+ differing scheduling policies."
+
+ }
+}
+
+# ---------------------------------------------------------------------
+# ASR support options
+
+cdl_component CYGSEM_KERNEL_SCHED_ASR_SUPPORT {
+ display "Enable ASR support"
+ flavor bool
+ default_value false
+ description "
+ This component controls support for Asynchronous Service
+ Routines (ASRs). This is a function that may be called
+ from the scheduler when it has just exited the scheduler
+ lock. This is primarily for use by API compatibility layers."
+
+ cdl_option CYGSEM_KERNEL_SCHED_ASR_GLOBAL {
+ display "Make ASR function global"
+ flavor bool
+ default_value true
+ description "
+ This option controls whether the ASR function is shared by
+ all threads, or whether each thread may have its own ASR
+ function."
+ }
+
+ cdl_option CYGSEM_KERNEL_SCHED_ASR_DATA_GLOBAL {
+ display "Make ASR data global"
+ flavor bool
+ default_value true
+ description "
+ This option controls whether the ASR data is shared by
+ all threads, or whether each thread may have its own ASR
+ data. This is independent of the previous option because
+ it may be useful to pass per-thread data to a shared ASR
+ function."
+ }
+}
+
+# EOF scheduler.cdl
diff --git a/cesar/ecos/packages/kernel/current/cdl/synch.cdl b/cesar/ecos/packages/kernel/current/cdl/synch.cdl
new file mode 100644
index 0000000000..ab52d709d7
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/cdl/synch.cdl
@@ -0,0 +1,213 @@
+# ====================================================================
+#
+# synch.cdl
+#
+# configuration data related to the kernel synchronization primitives
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: nickg
+# Contributors:
+# Date: 1999-07-05
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+
+cdl_component CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL {
+ display "Priority inversion protection protocols"
+ flavor booldata
+ doc ref/kernel-mutexes.html
+ legal_values { "SIMPLE" }
+ default_value { "SIMPLE" }
+ active_if { CYGSEM_KERNEL_SCHED_MLQUEUE }
+ requires { CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES == 0 }
+ description "
+ This component controls the protocols used to protect mutexes against
+ priority inversion. If this option is enabled it defines which
+ algorithm is used to implement this protection. At present only
+ one such algorithm is defined: \"SIMPLE\". The implementation
+ will only work in the mlqueue scheduler, and it does not handle the
+ rare case of nested mutexes completely correctly. However it is
+ both fast and deterministic."
+
+ cdl_option CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT {
+ display "Enable priority inheritance protocol"
+ default_value 1
+ implements CYGINT_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_COUNT
+ description "
+ This option enables priority inheritance protocol. This protocol
+ causes the owner of a mutex to be executed at the highest priority
+ of the threads waiting for access to the mutex."
+ }
+
+ cdl_component CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING {
+ display "Enable priority ceiling protocol"
+ default_value 1
+ implements CYGINT_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_COUNT
+ description "
+ This option enables priority ceiling protocol. This protocol
+ causes the owner of a mutex to be executed at a priority
+ associated with the mutex."
+ cdl_option CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_PRIORITY {
+ display "Default priority ceiling"
+ flavor data
+ legal_values 0 to { CYGNUM_KERNEL_SCHED_PRIORITIES - 1 }
+ default_value 0
+ active_if CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+ description "
+ This option defines the default priority ceiling to be
+ used if the chosen default priority inversion protocol is
+ priority ceoptioniling protocol. The default value for this is zero,
+ making all such mutexes boost threads to the maximum priority."
+ }
+ }
+
+ cdl_option CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_NONE {
+ display "No priority inversion protocol"
+ default_value 1
+ implements CYGINT_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_COUNT
+ description "
+ This option enables the ability to have no priority inversion protocol.
+ It is equivalent to disabling the priority inversion protocol at
+ the top level, but is necessary for the runtime and default
+ selection options."
+ }
+
+ cdl_option CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT {
+ display "Default priority inversion protocol"
+ flavor data
+ active_if { CYGINT_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_COUNT > 1 }
+ legal_values { "INHERIT" "CEILING" "NONE" }
+ default_value { CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT ?
+ "INHERIT" :
+ CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING ?
+ "CEILING" : "NONE" }
+ description "
+ This option defines the default inversion protocol used for mutexes that
+ are created without an explicit protocol being specified. The protocol
+ chosen by default is to use priority inheritance if it is present otherwise
+ priority ceiling, or none if neither is present."
+ }
+
+ cdl_option CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC {
+ display "Specify mutex priority inversion protocol at runtime"
+ default_value 1
+ active_if { CYGINT_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_COUNT > 1 }
+ description "
+ This option controls whether the priority inversion protocol used by
+ a mutex can be specified when that mutex is created."
+ }
+
+ cdl_interface CYGINT_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_COUNT {
+ display "Number of protocols selected"
+ }
+
+}
+
+cdl_option CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT {
+ display "Message box blocking put support"
+ doc ref/kernel-mail-boxes.html
+ default_value 1
+ description "
+ Message boxes can support three different versions of the
+ put-message operation. The first is tryput(), which will fail
+ if the message box is already full. The other two are the
+ ordinary put() function which will block if the message box
+ is full, and a timed put() operation which will block for
+ upto a certain length of time if the message box is currently
+ full. The blocking versions require extra memory in the
+ message box data structure and extra code in the other
+ message box functions, so they can be disabled if the
+ application does not require them. If this option is enabled
+ then the system will always provide the blocking put()
+ function, and it will also provide the timed put() function
+ if thread timers are enabled."
+}
+
+cdl_option CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE {
+ display "Message box queue size"
+ doc ref/kernel-mail-boxes.html
+ flavor data
+ legal_values 1 to 65535
+ default_value 10
+ description "
+ This configuration option controls the number of messages
+ that can be queued in a message box before a non-blocking
+ put() operation will fail or a blocking put() operation will
+ block. The cost in memory is one pointer per message box for
+ each possible message."
+}
+
+cdl_option CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT {
+ display "Condition variable timed-wait support"
+ doc ref/kernel-condition-variables.html
+ requires CYGFUN_KERNEL_THREADS_TIMER
+ default_value 1
+ description "
+ This option enables the condition variable timed wait
+ facility."
+}
+
+cdl_option CYGMFN_KERNEL_SYNCH_CONDVAR_WAIT_MUTEX {
+ display "Condition variable explicit mutex wait support"
+ doc ref/kernel-condition-variables.html
+ default_value 1
+ description "
+ This option enables the condition variable explicit mutex wait
+ facility. By default condition variables in eCos are created with
+ a statically associated mutex. This option permits wait (and timed wait
+ if CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT is enabled) to provide a
+ different mutex as an argument. This makes no difference to the semantics
+ the wait operation except that a different mutex will be used during it."
+}
+
+cdl_option CYGIMP_KERNEL_SYNCH_MQUEUE_NOT_INLINE {
+ display "Avoid inlines in mqueue implementation"
+ default_value 0
+ description "
+ With this option disabled, the 'mqueue' message queue implementation
+ provides most of its implementation via inlines. However this can
+ adversely affect code size in application that make lots of mqueue
+ calls from different places, so enabling this option provides
+ non-inline versions to be used instead."
+ compile sync/mqueue.cxx
+}
+
+# EOF synch.cdl
diff --git a/cesar/ecos/packages/kernel/current/cdl/thread.cdl b/cesar/ecos/packages/kernel/current/cdl/thread.cdl
new file mode 100644
index 0000000000..f1766342c9
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/cdl/thread.cdl
@@ -0,0 +1,332 @@
+# ====================================================================
+#
+# thread.cdl
+#
+# configuration data related to the kernel threads
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: nickg
+# Contributors:
+# Date: 1999-07-05
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_option CYGFUN_KERNEL_THREADS_TIMER {
+ display "Allow per-thread timers"
+ requires CYGVAR_KERNEL_COUNTERS_CLOCK
+ default_value 1
+ description "
+ This option controls whether or not the kernel should support
+ per-thread clock and alarm related functions. Also some of
+ the synchronization primitives such as semaphore and
+ condition variable timed wait operations require per-thread
+ timer support. If none of these facilities are required then
+ the option can be disabled."
+}
+
+cdl_option CYGVAR_KERNEL_THREADS_NAME {
+ display "Support optional name for each thread"
+ default_value 1
+ description "
+ Threads may optionally be supplied with a name string that is
+ used to identify them during debugging. This name is only
+ present if `this option is defined. Disabling it reduces both
+ code and data size."
+}
+
+cdl_option CYGVAR_KERNEL_THREADS_LIST {
+ display "Keep track of all threads using a linked list"
+ default_value 1
+ description "
+ Threads may optionally be placed on a housekeeping list so
+ that all threads may be located easily. This is useful mainly
+ in conjunction with source-level debugging."
+}
+
+cdl_option CYGFUN_KERNEL_THREADS_STACK_LIMIT {
+ display "Keep track of the base of each thread's stack"
+ default_value 1
+ description "
+ This option makes the kernel keep track of the lower limit on
+ each thread's stack. It allows the kernel to adjust the lower
+ limit, thus making space for per-thread data. Note that it
+ does not imply any form of run-time stack overflow checking."
+}
+
+cdl_component CYGFUN_KERNEL_THREADS_STACK_CHECKING {
+ display "Check thread stacks for overflows"
+ active_if CYGPKG_INFRA_DEBUG
+ active_if CYGDBG_USE_ASSERTS
+ default_value 1
+ description "
+ This option enables a variety of checks for stack overflow
+ including signatures at the top and base of thread stacks,
+ which are asserted for correctness whenever a thread switches."
+
+ cdl_option CYGFUN_KERNEL_ALL_THREADS_STACK_CHECKING {
+ display "Check all threads whenever possible"
+ requires CYGVAR_KERNEL_THREADS_LIST
+ default_value 0
+ description "
+ This option enables more active checking of all threads for
+ wrongdoing. In theory, checking threads other than the old and new
+ executing threads in a thread-switch is pointless, because no other
+ thread has run, so no other stack can be exceeded. But errors such
+ as memory scribbling, dangling pointers, overlapping use of store
+ or errors accessing objects adjacent to a stack which can be very
+ hard to find can be detected this way, saving debug time."
+ }
+
+ cdl_option CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE {
+ display "Signature size in bytes, at stack top and bottom"
+ flavor data
+ default_value 32
+ legal_values 8 to 512
+ description "
+ This is the size of the area reserved for a signature at the top
+ and bottom of all stacks. It also provides a buffer zone for
+ detecting overflow before external objects are corrupted, hence the
+ ability to vary it here. But if you are short of stack, increasing
+ this value will make the overflow more, not less likely, of course."
+ }
+}
+
+cdl_component CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT {
+ display "Measure stack usage"
+ default_value { 0 != CYGPKG_INFRA_DEBUG }
+ description "
+ This option allows measurement of each thread's stack by initializing
+ it to a predefined value at thread creation time. Later use of the
+ cyg_thread_measure_stack_usage() function allows the maximum stack
+ usage of the thread so far to be obtained. Note that this is not
+ necessarily the true maximum stack usage that the thread will ever
+ use since all that has been measured is the stack usage corresponding
+ to the code path followed this time, and not the code path that may
+ be followed in future."
+
+ cdl_option CYGDBG_KERNEL_THREADS_STACK_MEASUREMENT_VERBOSE_EXIT {
+ display "Output stack usage on thread exit"
+ default_value 0
+ description "
+ This will output the measured stack usage on the diagnostic
+ output when a thread exits."
+ }
+}
+
+cdl_component CYGVAR_KERNEL_THREADS_DATA {
+ display "Support for per-thread data"
+ requires CYGFUN_KERNEL_THREADS_STACK_LIMIT
+ doc ref/kernel-thread-data.html
+ default_value 1
+ description "
+ It is possible for the kernel to support per-thread data, in
+ other words an area of memory specific to each thread which
+ can be used to store data for that thread. This per-thread
+ data can be used by applications or by other packages such as
+ the ISO C library."
+
+ cdl_option CYGNUM_KERNEL_THREADS_DATA_MAX {
+ display "Number of words of per-thread data"
+ flavor data
+ legal_values 4 to 32
+ default_value 6
+ description "
+ It is possible for the kernel to support per-thread data, in
+ other words an area of memory specific to each thread which
+ can be used to store data for that thread. This per-thread
+ data can be used by applications or by other packages such as
+ the ISO C library. This configuration option controls the
+ number of words of per-thread data that the kernel will
+ allow. In the current implementation a bitmask is used to identify
+ used per-thread data slots and so the maximum legal value must
+ remain 32."
+ }
+
+ cdl_component CYGNUM_KERNEL_THREADS_DATA_ALL {
+ display "Bitmap of preallocated slots of thread data"
+ flavor data
+ calculated 15
+ description "
+ Per thread data options. Per thread data support is based loosely
+ on that defined by POSIX. Each thread has an array of slots, up to
+ CYGNUM_KERNEL_THREADS_DATA_MAX, that may contain data. Some of the
+ slots have been preallocated to specific packages. Others may be
+ allocated dynamically."
+
+ cdl_option CYGNUM_KERNEL_THREADS_DATA_KERNEL {
+ display "Slot 0 preallocated for the kernel"
+ flavor data
+ calculated 0
+ description "
+ This option defines the index of a per-thread data
+ slot which is reserved by
+ the eCos kernel
+ for private use."
+ }
+ cdl_option CYGNUM_KERNEL_THREADS_DATA_ITRON {
+ display "Slot 1 preallocated for uITRON"
+ flavor data
+ calculated 1
+ description "
+ This option defines the index of a per-thread data
+ slot which is reserved by
+ the uITRON compatibility layer
+ for private use."
+ }
+ cdl_option CYGNUM_KERNEL_THREADS_DATA_ERRNO {
+ display "Slot 2 preallocated for errno"
+ flavor data
+ calculated 2
+ description "
+ This option defines the index of a per-thread data
+ slot which is reserved for use by an errno variable."
+ }
+ cdl_option CYGNUM_KERNEL_THREADS_DATA_POSIX {
+ display "Slot 3 preallocated for POSIX"
+ flavor data
+ calculated 3
+ description "
+ This option defines the index of a per-thread data
+ slot which is reserved by
+ POSIX
+ for private use."
+ }
+ }
+}
+
+cdl_component CYGPKG_KERNEL_THREADS_DESTRUCTORS {
+ display "Thread destructors"
+ doc ref/kernel-thread-destructors.html
+ default_value 0
+ description "
+ This option enables support for registered destructor functions to
+ be called on thread exit."
+
+
+ cdl_option CYGNUM_KERNEL_THREADS_DESTRUCTORS {
+ display "Number of possible destructors"
+ flavor data
+ legal_values 1 to 65535
+ default_value 8
+ description "
+ This option gives the number of possible destructors allowed.
+ Increasing this will increase the size of every
+ thread control structure if per-thread destructors are
+ enabled."
+ }
+
+ cdl_option CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD {
+ display "Per-thread destructors"
+ default_value 1
+ description "
+ Enabling this option makes the thread destructors a per-thread
+ property, with each thread having its own list of destructors.
+ Disabling this option makes the thread destructor list
+ global so all threads have the same destructors."
+ }
+
+}
+
+cdl_option CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE {
+ display "Stack size for the idle thread"
+ flavor data
+ legal_values 512 to 65536
+ default_value 2048
+ description "
+ This configuration option specifies the stack size in bytes
+ for the idle thread. Unless the HAL is configured to use a
+ separate interrupt stack this size must be sufficient to meet
+ the requirements of all interrupt handlers - these
+ requirements are cumulative if nested interrupted are
+ enabled. Depending on the target architecture, the stack size
+ typically has to be a multiple of eight or sixteen bytes.
+ This will be overridden where it is used if the
+ architectural HAL requires a minimum stack size
+ to handle interrupts correctly."
+}
+
+# ---------------------------------------------------------------------
+# Thread-related miscellania.
+
+cdl_option CYGNUM_KERNEL_MAX_SUSPEND_COUNT_ASSERT {
+ display "Maximal suspend count"
+ flavor data
+ default_value 500
+ description "
+ This option provides for an assertion that the count value for
+ counted thread suspends do not exceed set limits. This is to help
+ with debugging, to allow a runaway loop, for example, to be
+ detected more easily.
+
+ If the option is not defined, no assert is included. Whether asserts
+ are themselves included depends on infrastructure configury in
+ infra.h"
+}
+
+cdl_option CYGNUM_KERNEL_MAX_COUNTED_WAKE_COUNT_ASSERT {
+ display "Maximal wake count"
+ flavor data
+ default_value 500
+ description "
+ This option provides for an assertion that the count value for
+ counted thread wakeups do not exceed set limits. This is to
+ help with debugging, to allow a runaaway loop, for example, to
+ be detected more easily.
+
+ If the option is not defined, no assert is included. Whether asserts
+ are themselves included depends on infrastructure configury in
+ infra.h"
+}
+
+
+#if CYGNUM_KERNEL_SCHED_PRIORITIES == 1
+# define CYGIMP_IDLE_THREAD_YIELD
+#endif
+cdl_option CYGIMP_IDLE_THREAD_YIELD {
+ display "Idle thread must always yield"
+ calculated 1
+ active_if (CYGNUM_KERNEL_SCHED_PRIORITIES == 1)
+ description "
+ If the scheduler configuration only has a single priority
+ level, then the idle thread must yield each time around its loop."
+}
+
+# EOF thread.cdl
diff --git a/cesar/ecos/packages/kernel/current/doc/SMP.txt b/cesar/ecos/packages/kernel/current/doc/SMP.txt
new file mode 100644
index 0000000000..f7353e3da2
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/doc/SMP.txt
@@ -0,0 +1,544 @@
+
+eCos SMP Support
+================
+
+eCos contains support for limited Symmetric Multi-Processing
+(SMP). This is only available on selected architectures and platforms.
+
+This first part of this document describes the platform-independent
+parts of the SMP support. Annexes at the end of this document describe
+any details that are specific to a particular platform.
+
+Target Hardware Limitations
+---------------------------
+
+To allow a reasonable implementation of SMP, and to reduce the
+disruption to the existing source base, a number of assumptions have
+been made about the features of the target hardware.
+
+- Modest multiprocessing. The typical number of CPUs supported is two
+ to four, with an upper limit around eight. While there are no
+ inherent limits in the code, hardware and algorithmic limitations
+ will probably become significant beyond this point.
+
+- SMP synchronization support. The hardware must supply a mechanism to
+ allow software on two CPUs to synchronize. This is normally provided
+ as part of the instruction set in the form of test-and-set,
+ compare-and-swap or load-link/store-conditional instructions. An
+ alternative approach is the provision of hardware semaphore
+ registers which can be used to serialize implementations of these
+ operations. Whatever hardware facilities are available, they are
+ used in eCos to implement spinlocks.
+
+- Coherent caches. It is assumed that no extra effort will be required
+ to access shared memory from any processor. This means that either
+ there are no caches, they are shared by all processors, or are
+ maintained in a coherent state by the hardware. It would be too
+ disruptive to the eCos sources if every memory access had to be
+ bracketed by cache load/flush operations. Any hardware that requires
+ this is not supported.
+
+- Uniform addressing. It is assumed that all memory that is
+ shared between CPUs is addressed at the same location from all
+ CPUs. Like non-coherent caches, dealing with CPU-specific address
+ translation is considered too disruptive to the eCos source
+ base. This does not, however, preclude systems with non-uniform
+ access costs for different CPUs.
+
+- Uniform device addressing. As with access to memory, it is assumed
+ that all devices are equally accessible to all CPUs. Since device
+ access is often made from thread contexts, it is not possible to
+ restrict access to device control registers to certain CPUs, since
+ there is currently no support for binding or migrating threads to CPUs.
+
+- Interrupt routing. The target hardware must have an interrupt
+ controller that can route interrupts to specific CPUs. It is
+ acceptable for all interrupts to be delivered to just one CPU, or
+ for some interrupts to be bound to specific CPUs, or for some
+ interrupts to be local to each CPU. At present dynamic routing,
+ where a different CPU may be chosen each time an interrupt is
+ delivered, is not supported. ECos cannot support hardware where all
+ interrupts are delivered to all CPUs simultaneously with the
+ expectation that software will resolve any conflicts.
+
+- Inter-CPU interrupts. A mechanism to allow one CPU to interrupt
+ another is needed. This is necessary so that events on one CPU can
+ cause rescheduling on other CPUs.
+
+- CPU Identifiers. Code running on a CPU must be able to determine
+ which CPU it is running on. The CPU Id is usually provided either in
+ a CPU status register, or in a register associated with the
+ inter-CPU interrupt delivery subsystem. Ecos expects CPU Ids to be
+ small positive integers, although alternative representations, such
+ as bitmaps, can be converted relatively easily. Complex mechanisms
+ for getting the CPU Id cannot be supported. Getting the CPU Id must
+ be a cheap operation, since it is done often, and in performance
+ critical places such as interrupt handlers and the scheduler.
+
+Kernel Support
+--------------
+
+This section describes how SMP is handled in the kernel, and where
+system behaviour differs from a single CPU system.
+
+System Startup
+~~~~~~~~~~~~~~
+
+System startup takes place on only one CPU, called the primary
+CPU. All other CPUs, the secondary CPUs, are either placed in
+suspended state at reset, or are captured by the HAL and put into
+a spin as they start up.
+
+The primary CPU is responsible for copying the DATA segment and
+zeroing the BSS (if required), calling HAL variant and platform
+initialization routines and invoking constructors. It then calls
+cyg_start() to enter the application. The application may then create
+extra threads and other objects.
+
+It is only when the application calls Cyg_Scheduler::start() that the
+secondary CPUs are initialized. This routine scans the list of
+available secondary CPUs and calls HAL_SMP_CPU_START() to start each one.
+Finally it calls Cyg_Scheduler::start_cpu().
+
+Each secondary CPU starts in the HAL, where it completes any per-CPU
+initialization before calling into the kernel at
+cyg_kernel_cpu_startup(). Here it claims the scheduler lock and calls
+Cyg_Scheduler::start_cpu().
+
+Cyg_Scheduler::start_cpu() is common to both the primary and secondary
+CPUs. The first thing this code does is to install an interrupt object
+for this CPU's inter-CPU interrupt. From this point on the code is the
+same as for the single CPU case: an initial thread is chosen and
+entered.
+
+From this point on the CPUs are all equal, eCos makes no further
+distinction between the primary and secondary CPUs. However, the
+hardware may still distinguish them as far as interrupt delivery is
+concerned.
+
+
+Scheduling
+~~~~~~~~~~
+
+To function correctly an operating system kernel must protect its
+vital data structures, such as the run queues, from concurrent
+access. In a single CPU system the only concurrent activities to worry
+about are asynchronous interrupts. The kernel can easily guard its
+data structures against these by disabling interrupts. However, in a
+multi-CPU system, this is inadequate since it does not block access by
+other CPUs.
+
+The eCos kernel protects its vital data structures using the scheduler
+lock. In single CPU systems this is a simple counter that is
+atomically incremented to acquire the lock and decremented to release
+it. If the lock is decremented to zero then the scheduler may be
+invoked to choose a different thread to run. Because interrupts may
+continue to be serviced while the scheduler lock is claimed, ISRs are
+not allowed to access kernel data structures, or call kernel routines
+that can. Instead all such operations are deferred to an associated
+DSR routine that is run during the lock release operation, when the
+data structures are in a consistent state.
+
+By choosing a kernel locking mechanism that does not rely on interrupt
+manipulation to protect data structures, it is easier to convert eCos
+to SMP than would otherwise be the case. The principal change needed to
+make eCos SMP-safe is to convert the scheduler lock into a nestable
+spin lock. This is done by adding a spinlock and a CPU id to the
+original counter.
+
+The algorithm for acquiring the scheduler lock is very simple. If the
+scheduler lock's CPU id matches the current CPU then it can increment
+the counter and continue. If it does not match, the CPU must spin on
+the spinlock, after which it may increment the counter and store its
+own identity in the CPU id.
+
+To release the lock, the counter is decremented. If it goes to zero
+the CPU id value must be set to NONE and the spinlock cleared.
+
+To protect these sequences against interrupts, they must be performed
+with interrupts disabled. However, since these are very short code
+sequences, they will not have an adverse effect on the interrupt
+latency.
+
+Beyond converting the scheduler lock, further preparing the kernel for
+SMP is a relatively minor matter. The main changes are to convert
+various scalar housekeeping variables into arrays indexed by CPU
+id. These include the current thread pointer, the need_reschedule
+flag and the timeslice counter.
+
+At present only the Multi-Level Queue (MLQ) scheduler is capable of
+supporting SMP configurations. The main change made to this scheduler
+is to cope with having several threads in execution at the same
+time. Running threads are marked with the CPU they are executing on.
+When scheduling a thread, the scheduler skips past any running threads
+until it finds a thread that is pending. While not a constant-time
+algorithm, as in the single CPU case, this is still deterministic,
+since the worst case time is bounded by the number of CPUs in the
+system.
+
+A second change to the scheduler is in the code used to decide when
+the scheduler should be called to choose a new thread. The scheduler
+attempts to keep the *n* CPUs running the *n* highest priority
+threads. Since an event or interrupt on one CPU may require a
+reschedule on another CPU, there must be a mechanism for deciding
+this. The algorithm currently implemented is very simple. Given a
+thread that has just been awakened (or had its priority changed), the
+scheduler scans the CPUs, starting with the one it is currently
+running on, for a current thread that is of lower priority than the
+new one. If one is found then a reschedule interrupt is sent to that
+CPU and the scan continues, but now using the current thread of the
+rescheduled CPU as the candidate thread. In this way the new thread
+gets to run as quickly as possible, hopefully on the current CPU, and
+the remaining CPUs will pick up the remaining highest priority
+threads as a consequence of processing the reschedule interrupt.
+
+The final change to the scheduler is in the handling of
+timeslicing. Only one CPU receives timer interrupts, although all CPUs
+must handle timeslicing. To make this work, the CPU that receives the
+timer interrupt decrements the timeslice counter for all CPUs, not
+just its own. If the counter for a CPU reaches zero, then it sends a
+timeslice interrupt to that CPU. On receiving the interrupt the
+destination CPU enters the scheduler and looks for another thread at
+the same priority to run. This is somewhat more efficient than
+distributing clock ticks to all CPUs, since the interrupt is only
+needed when a timeslice occurs.
+
+Device Drivers
+~~~~~~~~~~~~~~
+
+The main area where the SMP nature of a system will be most apparent
+is in device drivers. It is quite possible for the ISR, DSR and thread
+components of a device driver to execute on different CPUs. For this
+reason it is much more important that SMP-capable device drivers use
+the driver API routines correctly.
+
+Synchronization between threads and DSRs continues to require that the
+thread-side code use cyg_drv_dsr_lock() and cyg_drv_dsr_unlock() to
+protect access to shared data. Synchronization between ISRs and DSRs
+or threads requires that access to sensitive data be protected, in all
+places, by calls to cyg_drv_isr_lock() and cyg_drv_isr_unlock().
+
+The ISR lock, for SMP systems, not only disables local interrupts, but
+also acquires a spinlock to protect against concurrent access from
+other CPUs. This is necessary because ISRs are not run with the
+scheduler lock claimed. Hence they can run in parallel with other
+components of the device driver.
+
+The ISR lock provided by the driver API is just a shared spinlock that
+is available for use by all drivers. If a driver needs to implement a
+finer grain of locking, it can use private spinlocks, accessed via the
+cyg_drv_spinlock_*() functions (see API later).
+
+
+API Extensions
+--------------
+
+In general, the SMP support is invisible to application code. All
+synchronization and communication operations function exactly as
+before. The main area where code needs to be SMP aware is in the
+handling of interrupt routing, and in the synchronization of ISRs,
+DSRs and threads.
+
+The following sections contain brief descriptions of the API
+extensions added for SMP support. More details will be found in the
+Kernel C API and Device Driver API documentation.
+
+Interrupt Routing
+~~~~~~~~~~~~~~~~~
+
+Two new functions have been added to the Kernel API and the device
+driver API to do interrupt routing. These are:
+
+void cyg_interrupt_set_cpu( cyg_vector_t vector, cyg_cpu_t cpu );
+void cyg_drv_interrupt_set_cpu( cyg_vector_t vector, cyg_cpu_t cpu );
+
+cyg_cpu_t cyg_interrupt_get_cpu( cyg_vector_t vector );
+cyg_cpu_t cyg_drv_interrupt_get_cpu( cyg_vector_t vector );
+
+the *_set_cpu() functions cause the given interrupt to be handled by
+the nominated CPU.
+
+The *_get_cpu() functions return the CPU to which the vector is
+routed.
+
+Although not currently supported, special values for the cpu argument
+may be used to indicate that the interrupt is being routed dynamically
+or is CPU-local.
+
+Once a vector has been routed to a new CPU, all other interrupt
+masking and configuration operations are relative to that CPU, where
+relevant.
+
+Synchronization
+~~~~~~~~~~~~~~~
+
+All existing synchronization mechanisms work as before in an SMP
+system. Additional synchronization mechanisms have been added to
+provide explicit synchronization for SMP.
+
+A set of functions have been added to the Kernel and device driver
+APIs to provide spinlocks:
+
+void cyg_spinlock_init( cyg_spinlock_t *lock, cyg_bool_t locked );
+void cyg_drv_spinlock_init( cyg_spinlock_t *lock, cyg_bool_t locked );
+
+void cyg_spinlock_destroy( cyg_spinlock_t *lock );
+void cyg_drv_spinlock_destroy( cyg_spinlock_t *lock );
+
+void cyg_spinlock_spin( cyg_spinlock_t *lock );
+void cyg_drv_spinlock_spin( cyg_spinlock_t *lock );
+
+void cyg_spinlock_clear( cyg_spinlock_t *lock );
+void cyg_drv_spinlock_clear( cyg_spinlock_t *lock );
+
+cyg_bool_t cyg_spinlock_try( cyg_spinlock_t *lock );
+cyg_bool_t cyg_drv_spinlock_try( cyg_spinlock_t *lock );
+
+cyg_bool_t cyg_spinlock_test( cyg_spinlock_t *lock );
+cyg_bool_t cyg_drv_spinlock_test( cyg_spinlock_t *lock );
+
+void cyg_spinlock_spin_intsave( cyg_spinlock_t *lock,
+ cyg_addrword_t *istate );
+void cyg_drv_spinlock_spin_intsave( cyg_spinlock_t *lock,
+ cyg_addrword_t *istate );
+
+void cyg_spinlock_clear_intsave( cyg_spinlock_t *lock,
+ cyg_addrword_t istate );
+void cyg_drv_spinlock_clear_intsave( cyg_spinlock_t *lock,
+ cyg_addrword_t istate );
+
+The *_init() functions initialize the lock, to either locked or clear,
+and the *_destroy() functions destroy the lock. Init() should be called
+before the lock is used and destroy() should be called when it is
+finished with.
+
+The *_spin() functions will cause the calling CPU to spin until it can
+claim the lock and the *_clear() functions clear the lock so that the
+next CPU can claim it. The *_try() functions attempts to claim the lock
+but returns false if it cannot. The *_test() functions simply return
+the state of the lock.
+
+None of these functions will necessarily block interrupts while they
+spin. If the spinlock is only to be used between threads on different
+CPUs, or in circumstances where it is known that the relevant
+interrupts are disabled, then these functions will suffice. However,
+if the spinlock is also to be used from an ISR, which may be called at
+any point, a straightforward spinlock may result in deadlock. Hence
+the *_intsave() variants are supplied to disable interrupts while the
+lock is held.
+
+The *_spin_intsave() function disables interrupts, saving the current
+state in *istate, and then claims the lock. The *_clear_intsave()
+function clears the spinlock and restores the interrupt enable state
+from *istate.
+
+
+HAL Support
+-----------
+
+SMP support in any platform depends on the HAL supplying the
+appropriate operations. All HAL SMP support is defined in the
+hal_smp.h header (and if necessary var_smp.h and plf_smp.h).
+
+SMP support falls into a number of functional groups.
+
+CPU Control
+~~~~~~~~~~~
+
+This group consists of descriptive and control macros for managing the
+CPUs in an SMP system.
+
+HAL_SMP_CPU_TYPE A type that can contain a CPU id. A CPU id is
+ usually a small integer that is used to index
+ arrays of variables that are managed on an
+ per-CPU basis.
+
+HAL_SMP_CPU_MAX The maximum number of CPUs that can be
+ supported. This is used to provide the size of
+ any arrays that have an element per CPU.
+
+HAL_SMP_CPU_COUNT() Returns the number of CPUs currently
+ operational. This may differ from
+ HAL_SMP_CPU_MAX depending on the runtime
+ environment.
+
+HAL_SMP_CPU_THIS() Returns the CPU id of the current CPU.
+
+HAL_SMP_CPU_NONE A value that does not match any real CPU
+ id. This is uses where a CPU type variable
+ must be set to a nul value.
+
+HAL_SMP_CPU_START( cpu )
+ Starts the given CPU executing at a defined
+ HAL entry point. After performing any HAL
+ level initialization, the CPU calls up into
+ the kernel at cyg_kernel_cpu_startup().
+
+HAL_SMP_CPU_RESCHEDULE_INTERRUPT( cpu, wait )
+ Sends the CPU a reschedule interrupt, and if
+ _wait_ is non-zero, waits for an
+ acknowledgment. The interrupted CPU should
+ call cyg_scheduler_set_need_reschedule() in
+ its DSR to cause the reschedule to occur.
+
+HAL_SMP_CPU_TIMESLICE_INTERRUPT( cpu, wait )
+ Sends the CPU a timeslice interrupt, and if
+ _wait_ is non-zero, waits for an
+ acknowledgment. The interrupted CPU should
+ call cyg_scheduler_timeslice_cpu() to cause
+ the timeslice event to be processed.
+
+Test-and-set Support
+~~~~~~~~~~~~~~~~~~~~
+
+Test-and-set is the foundation of the SMP synchronization
+mechanisms.
+
+HAL_TAS_TYPE The type for all test-and-set variables. The
+ test-and-set macros only support operations on
+ a single bit (usually the least significant
+ bit) of this location. This allows for maximum
+ flexibility in the implementation.
+
+HAL_TAS_SET( tas, oldb )
+ Performs a test and set operation on the
+ location _tas_. _oldb_ will contain *true* if
+ the location was already set, and *false* if
+ it was clear.
+
+HAL_TAS_CLEAR( tas, oldb )
+ Performs a test and clear operation on the
+ location _tas_. _oldb_ will contain *true* if
+ the location was already set, and *false* if
+ it was clear.
+
+Spinlocks
+~~~~~~~~~
+
+Spinlocks provide inter-CPU locking. Normally they will be implemented
+on top of the test-and-set mechanism above, but may also be
+implemented by other means if, for example, the hardware has more
+direct support for spinlocks.
+
+HAL_SPINLOCK_TYPE The type for all spinlock variables.
+
+HAL_SPINLOCK_INIT_CLEAR A value that may be assigned to a spinlock
+ variable to initialize it to clear.
+
+HAL_SPINLOCK_INIT_SET A value that may be assigned to a spinlock
+ variable to initialize it to set.
+
+HAL_SPINLOCK_SPIN( lock )
+ The caller spins in a busy loop waiting for
+ the lock to become clear. It then sets it and
+ continues. This is all handled atomically, so
+ that there are no race conditions between CPUs.
+
+HAL_SPINLOCK_CLEAR( lock )
+ The caller clears the lock. One of any waiting
+ spinners will then be able to proceed.
+
+HAL_SPINLOCK_TRY( lock, val )
+ Attempts to set the lock. The value put in
+ _val_ will be *true* if the lock was
+ claimed successfully, and *false* if it was
+ not.
+
+HAL_SPINLOCK_TEST( lock, val )
+ Tests the current value of the lock. The value
+ put in _val_ will be *true* if the lock is
+ claimed and *false* of it is clear.
+
+Scheduler Lock
+~~~~~~~~~~~~~~
+
+The scheduler lock is the main protection for all kernel data
+structures. By default the kernel implements the scheduler lock itself
+using a spinlock. However, if spinlocks cannot be supported by the
+hardware, or there is a more efficient implementation available, the
+HAL may provide macros to implement the scheduler lock.
+
+HAL_SMP_SCHEDLOCK_DATA_TYPE
+ A data type, possibly a structure, that
+ contains any data items needed by the
+ scheduler lock implementation. A variable of
+ this type will be instantiated as a static
+ member of the Cyg_Scheduler_SchedLock class
+ and passed to all the following macros.
+
+HAL_SMP_SCHEDLOCK_INIT( lock, data )
+ Initialize the scheduler lock. The _lock_
+ argument is the scheduler lock counter and the
+ _data_ argument is a variable of
+ HAL_SMP_SCHEDLOCK_DATA_TYPE type.
+
+HAL_SMP_SCHEDLOCK_INC( lock, data )
+ Increment the scheduler lock. The first
+ increment of the lock from zero to one for any
+ CPU may cause it to wait until the lock is
+ zeroed by another CPU. Subsequent increments
+ should be less expensive since this CPU
+ already holds the lock.
+
+HAL_SMP_SCHEDLOCK_ZERO( lock, data )
+ Zero the scheduler lock. This operation will
+ also clear the lock so that other CPUs may
+ claim it.
+
+HAL_SMP_SCHEDLOCK_SET( lock, data, new )
+
+ Set the lock to a different value, in
+ _new_. This is only called when the lock is
+ already known to be owned by the current
+ CPU. It is never called to zero the lock, or
+ to increment it from zero.
+
+
+Interrupt Routing
+~~~~~~~~~~~~~~~~~
+
+The routing of interrupts to different CPUs is supported by two new
+interfaces in hal_intr.h.
+
+Once an interrupt has been routed to a new CPU, the existing vector
+masking and configuration operations should take account of the CPU
+routing. For example, if the operation is not invoked on the
+destination CPU itself, then the HAL may need to arrange to transfer
+the operation to the destination CPU for correct application.
+
+HAL_INTERRUPT_SET_CPU( vector, cpu )
+ Route the interrupt for the given _vector_ to
+ the given _cpu_.
+
+HAL_INTERRUPT_GET_CPU( vector, cpu )
+ Set _cpu_ to the id of the CPU to which this
+ vector is routed.
+
+
+
+
+
+Annex 1 - Pentium SMP Support
+=============================
+
+ECos supports SMP working on Pentium class IA32 CPUs with integrated
+SMP support. It uses the per-CPU APIC's and the IOAPIC to provide CPU
+control and identification, and to distribute interrupts. Only PCI
+interrupts that map into the ISA interrupt space are currently
+supported. The code relies on the MP Configuration Table supplied by
+the BIOS to discover the number of CPUs, IOAPIC location and interrupt
+assignments - hardware based MP configuration discovery is
+not currently supported.
+
+Inter-CPU interrupts are mapped into interrupt vectors from 64
+up. Each CPU has its own vector at 64+CPUID.
+
+Interrupt delivery is initially configured to deliver all interrupts
+to the initial CPU. HAL_INTERRUPT_SET_CPU() currently only supports
+the ability to deliver interrupts to specific CPUs, dynamic CPU
+selection is not currently supported.
+
+eCos has only been tested in a dual processor configuration. While the
+code has been written to handle an arbitrary number of CPUs, this has
+not been tested.
+
diff --git a/cesar/ecos/packages/kernel/current/doc/kernel.sgml b/cesar/ecos/packages/kernel/current/doc/kernel.sgml
new file mode 100644
index 0000000000..694ecafee1
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/doc/kernel.sgml
@@ -0,0 +1,5456 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- kernel.sgml -->
+<!-- -->
+<!-- eCos kernel documentation. -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- Author(s): nickg, bartv, markg -->
+<!-- Contributors: eCos team -->
+<!-- Date: 2002/02/13 -->
+<!-- Version: 0.02 -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<part id="kernel">
+ <title>The eCos Kernel</title>
+
+<!-- {{{ Overview -->
+
+ <refentry id="kernel-overview">
+
+ <refmeta>
+ <refentrytitle>Kernel Overview</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>Kernel</refname>
+ <refpurpose>Overview of the eCos Kernel</refpurpose>
+ </refnamediv>
+
+<!-- {{{ Description -->
+
+ <refsect1 id="kernel-overview-description">
+ <title>Description</title>
+ <para>
+The kernel is one of the key packages in all of eCos. It provides the
+core functionality needed for developing multi-threaded applications:
+ </para>
+ <orderedlist>
+ <listitem><para>
+The ability to create new threads in the system, either during startup
+or when the system is already running.
+ </para></listitem>
+ <listitem><para>
+Control over the various threads in the system, for example
+manipulating their priorities.
+ </para></listitem>
+ <listitem><para>
+A choice of schedulers, determining which thread should currently be
+running.
+ </para></listitem>
+ <listitem><para>
+A range of synchronization primitives, allowing threads to interact
+and share data safely.
+ </para></listitem>
+ <listitem><para>
+Integration with the system's support for interrupts and exceptions.
+ </para></listitem>
+ </orderedlist>
+ <para>
+In some other operating systems the kernel provides additional
+functionality. For example the kernel may also provide memory
+allocation functionality, and device drivers may be part of the kernel
+as well. This is not the case for eCos. Memory allocation is handled
+by a separate package. Similary each device driver will typically be a
+separate package. Various packages are combined and configured using
+the eCos configuration technology to meet the requirements of the
+application.
+ </para>
+ <para>
+The eCos kernel package is optional. It is possible to write
+single-threaded applications which do not use any kernel
+functionality, for example RedBoot. Typically such applications are
+based around a central polling loop, continually checking all devices
+and taking appropriate action when I/O occurs. A small amount of
+calculation is possible every iteration, at the cost of an increased
+delay between an I/O event occurring and the polling loop detecting
+the event. When the requirements are straightforward it may well be
+easier to develop the application using a polling loop, avoiding the
+complexities of multiple threads and synchronization between threads.
+As requirements get more complicated a multi-threaded solution becomes
+more appropriate, requiring the use of the kernel. In fact some of the
+more advanced packages in eCos, for example the TCP/IP stack, use
+multi-threading internally. Therefore if the application uses any of
+those packages then the kernel becomes a required package, not an
+optional one.
+ </para>
+ <para>
+The kernel functionality can be used in one of two ways. The kernel
+provides its own C API, with functions like
+<function>cyg_thread_create</function> and
+<function>cyg_mutex_lock</function>. These can be called directly from
+application code or from other packages. Alternatively there are a
+number of packages which provide compatibility with existing API's,
+for example POSIX threads or &micro;ITRON. These allow application
+code to call standard functions such as
+<function>pthread_create</function>, and those functions are
+implemented using the basic functionality provided by the eCos kernel.
+Using compatibility packages in an eCos application can make it much
+easier to reuse code developed in other environments, and to share
+code.
+ </para>
+ <para>
+Although the different compatibility packages have similar
+requirements on the underlying kernel, for example the ability to
+create a new thread, there are differences in the exact semantics. For
+example, strict &micro;ITRON compliance requires that kernel
+timeslicing is disabled. This is achieved largely through the
+configuration technology. The kernel provides a number of
+configuration options that control the exact semantics that are
+provided, and the various compatibility packages require particular
+settings for those options. This has two important consequences.
+First, it is not usually possible to have two different compatibility
+packages in one eCos configuration because they will have conflicting
+requirements on the underlying kernel. Second, the semantics of the
+kernel's own API are only loosely defined because of the many
+configuration options. For example <function>cyg_mutex_lock</function>
+will always attempt to lock a mutex, but various configuration options
+determine the behaviour when the mutex is already locked and there is
+a possibility of priority inversion.
+ </para>
+ <para>
+The optional nature of the kernel package presents some complications
+for other code, especially device drivers. Wherever possible a device
+driver should work whether or not the kernel is present. However there
+are some parts of the system, especially those related to interrupt
+handling, which should be implemented differently in multi-threaded
+environments containing the eCos kernel and in single-threaded
+environments without the kernel. To cope with both scenarios the
+common HAL package provides a driver API, with functions such as
+<function>cyg_drv_interrupt_attach</function>. When the kernel package
+is present these driver API functions map directly on to the
+equivalent kernel functions such as
+<function>cyg_interrupt_attach</function>, using macros to avoid any
+overheads. When the kernel is absent the common HAL package implements
+the driver API directly, but this implementation is simpler than the
+one in the kernel because it can assume a single-threaded environment.
+ </para>
+ </refsect1>
+
+<!-- }}} -->
+<!-- {{{ Schedulers -->
+
+ <refsect1 id="kernel-overview-schedulers">
+ <title>Schedulers</title>
+ <para>
+When a system involves multiple threads, a scheduler is needed to
+determine which thread should currently be running. The eCos kernel
+can be configured with one of two schedulers, the bitmap scheduler and
+the multi-level queue (MLQ) scheduler. The bitmap scheduler is
+somewhat more efficient, but has a number of limitations. Most systems
+will instead use the MLQ scheduler. Other schedulers may be added in
+the future, either as extensions to the kernel package or in separate
+packages.
+ </para>
+ <para>
+Both the bitmap and the MLQ scheduler use a simple numerical priority
+to determine which thread should be running. The number of priority
+levels is configurable via the option
+<varname>CYGNUM_KERNEL_SCHED_PRIORITIES</varname>, but a typical
+system will have up to 32 priority levels. Therefore thread priorities
+will be in the range 0 to 31, with 0 being the highest priority and 31
+the lowest. Usually only the system's idle thread will run at the
+lowest priority. Thread priorities are absolute, so the kernel will
+only run a lower-priority thread if all higher-priority threads are
+currently blocked.
+ </para>
+ <para>
+The bitmap scheduler only allows one thread per priority level, so if
+the system is configured with 32 priority levels then it is limited to
+only 32 threads &mdash; still enough for many applications. A simple
+bitmap can be used to keep track of which threads are currently
+runnable. Bitmaps can also be used to keep track of threads waiting on
+a mutex or other synchronization primitive. Identifying the
+highest-priority runnable or waiting thread involves a simple
+operation on the bitmap, and an array index operation can then be used
+to get hold of the thread data structure itself. This makes the
+bitmap scheduler fast and totally deterministic.
+ </para>
+ <para>
+The MLQ scheduler allows multiple threads to run at the same priority.
+This means that there is no limit on the number of threads in the
+system, other than the amount of memory available. However operations
+such as finding the highest priority runnable thread are a little bit
+more expensive than for the bitmap scheduler.
+ </para>
+ <para>
+Optionally the MLQ scheduler supports timeslicing, where the scheduler
+automatically switches from one runnable thread to another when some
+number of clock ticks have occurred. Timeslicing only comes into play
+when there are two runnable threads at the same priority and no higher
+priority runnable threads. If timeslicing is disabled then a thread
+will not be preempted by another thread of the same priority, and will
+continue running until either it explicitly yields the processor or
+until it blocks by, for example, waiting on a synchronization
+primitive. The configuration options
+<varname>CYGSEM_KERNEL_SCHED_TIMESLICE</varname> and
+<varname>CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS</varname> control
+timeslicing. The bitmap scheduler does not provide timeslicing
+support. It only allows one thread per priority level, so it is not
+possible to preempt the current thread in favour of another one with
+the same priority.
+ </para>
+ <para>
+Another important configuration option that affects the MLQ scheduler
+is <varname>CYGIMP_KERNEL_SCHED_SORTED_QUEUES</varname>. This
+determines what happens when a thread blocks, for example by waiting
+on a semaphore which has no pending events. The default behaviour of
+the system is last-in-first-out queuing. For example if several
+threads are waiting on a semaphore and an event is posted, the thread
+that gets woken up is the last one that called
+<function>cyg_semaphore_wait</function>. This allows for a simple and
+fast implementation of both the queue and dequeue operations. However
+if there are several queued threads with different priorities, it may
+not be the highest priority one that gets woken up. In practice this
+is rarely a problem: usually there will be at most one thread waiting
+on a queue, or when there are several threads they will be of the same
+priority. However if the application does require strict priority
+queueing then the option
+<varname>CYGIMP_KERNEL_SCHED_SORTED_QUEUES</varname> should be
+enabled. There are disadvantages: more work is needed whenever a
+thread is queued, and the scheduler needs to be locked for this
+operation so the system's dispatch latency is worse. If the bitmap
+scheduler is used then priority queueing is automatic and does not
+involve any penalties.
+ </para>
+ <para>
+Some kernel functionality is currently only supported with the MLQ
+scheduler, not the bitmap scheduler. This includes support for SMP
+systems, and protection against priority inversion using either mutex
+priority ceilings or priority inheritance.
+ </para>
+ </refsect1>
+
+<!-- }}} -->
+<!-- {{{ Synch primitives -->
+
+ <refsect1 id="kernel-overview-synch-primitives">
+ <title>Synchronization Primitives</title>
+ <para>
+The eCos kernel provides a number of different synchronization
+primitives: <link linkend="kernel-mutexes">mutexes</link>,
+<link linkend="kernel-condition-variables">condition variables</link>,
+<link linkend="kernel-semaphores">counting semaphores</link>,
+<link linkend="kernel-mail-boxes">mail boxes</link> and
+<link linkend="kernel-flags">event flags</link>.
+ </para>
+ <para>
+Mutexes serve a very different purpose from the other primitives. A
+mutex allows multiple threads to share a resource safely: a thread
+locks a mutex, manipulates the shared resource, and then unlocks the
+mutex again. The other primitives are used to communicate information
+between threads, or alternatively from a DSR associated with an
+interrupt handler to a thread.
+ </para>
+ <para>
+When a thread that has locked a mutex needs to wait for some condition
+to become true, it should use a condition variable. A condition
+variable is essentially just a place for a thread to wait, and which
+another thread, or DSR, can use to wake it up. When a thread waits on
+a condition variable it releases the mutex before waiting, and when it
+wakes up it reacquires it before proceeding. These operations are
+atomic so that synchronization race conditions cannot be introduced.
+ </para>
+ <para>
+A counting semaphore is used to indicate that a particular event has
+occurred. A consumer thread can wait for this event to occur, and a
+producer thread or a DSR can post the event. There is a count
+associated with the semaphore so if the event occurs multiple times in
+quick succession this information is not lost, and the appropriate
+number of semaphore wait operations will succeed.
+ </para>
+ <para>
+Mail boxes are also used to indicate that a particular event has
+occurred, and allows for one item of data to be exchanged per event.
+Typically this item of data would be a pointer to some data structure.
+Because of the need to store this extra data, mail boxes have a
+finite capacity. If a producer thread generates mail box events
+faster than they can be consumed then, to avoid overflow, it will be
+blocked until space is again available in the mail box. This means
+that mail boxes usually cannot be used by a DSR to wake up a
+thread. Instead mail boxes are typically only used between threads.
+ </para>
+ <para>
+Event flags can be used to wait on some number of different events,
+and to signal that one or several of these events have occurred. This
+is achieved by associating bits in a bit mask with the different
+events. Unlike a counting semaphore no attempt is made to keep track
+of the number of events that have occurred, only the fact that an
+event has occurred at least once. Unlike a mail box it is not
+possible to send additional data with the event, but this does mean
+that there is no possibility of an overflow and hence event flags can
+be used between a DSR and a thread as well as between threads.
+ </para>
+ <para>
+The eCos common HAL package provides its own device driver API which
+contains some of the above synchronization primitives. These allow
+the DSR for an interrupt handler to signal events to higher-level
+code. If the configuration includes the eCos kernel package then
+the driver API routines map directly on to the equivalent kernel
+routines, allowing interrupt handlers to interact with threads. If the
+kernel package is not included and the application consists of just a
+single thread running in polled mode then the driver API is
+implemented entirely within the common HAL, and with no need to worry
+about multiple threads the implementation can obviously be rather
+simpler.
+ </para>
+ </refsect1>
+
+<!-- }}} -->
+<!-- {{{ Threads and interrupts -->
+
+ <refsect1 id="kernel-overview-threads-interrupts">
+ <title>Threads and Interrupt Handling</title>
+ <para>
+During normal operation the processor will be running one of the
+threads in the system. This may be an application thread, a system
+thread running inside say the TCP/IP stack, or the idle thread. From
+time to time a hardware interrupt will occur, causing control to be
+transferred briefly to an interrupt handler. When the interrupt has
+been completed the system's scheduler will decide whether to return
+control to the interrupted thread or to some other runnable thread.
+ </para>
+ <para>
+Threads and interrupt handlers must be able to interact. If a thread
+is waiting for some I/O operation to complete, the interrupt handler
+associated with that I/O must be able to inform the thread that the
+operation has completed. This can be achieved in a number of ways. One
+very simple approach is for the interrupt handler to set a volatile
+variable. A thread can then poll continuously until this flag is set,
+possibly sleeping for a clock tick in between. Polling continuously
+means that the cpu time is not available for other activities, which
+may be acceptable for some but not all applications. Polling once
+every clock tick imposes much less overhead, but means that the thread
+may not detect that the I/O event has occurred until an entire clock
+tick has elapsed. In typical systems this could be as long as 10
+milliseconds. Such a delay might be acceptable for some applications,
+but not all.
+ </para>
+ <para>
+A better solution would be to use one of the synchronization
+primitives. The interrupt handler could signal a condition variable,
+post to a semaphore, or use one of the other primitives. The thread
+would perform a wait operation on the same primitive. It would not
+consume any cpu cycles until the I/O event had occurred, and when the
+event does occur the thread can start running again immediately
+(subject to any higher priority threads that might also be runnable).
+ </para>
+ <para>
+Synchronization primitives constitute shared data, so care must be
+taken to avoid problems with concurrent access. If the thread that was
+interrupted was just performing some calculations then the interrupt
+handler could manipulate the synchronization primitive quite safely.
+However if the interrupted thread happened to be inside some kernel
+call then there is a real possibility that some kernel data structure
+will be corrupted.
+ </para>
+ <para>
+One way of avoiding such problems would be for the kernel functions to
+disable interrupts when executing any critical region. On most
+architectures this would be simple to implement and very fast, but it
+would mean that interrupts would be disabled often and for quite a
+long time. For some applications that might not matter, but many
+embedded applications require that the interrupt handler run as soon
+as possible after the hardware interrupt has occurred. If the kernel
+relied on disabling interrupts then it would not be able to support
+such applications.
+ </para>
+ <para>
+Instead the kernel uses a two-level approach to interrupt handling.
+Associated with every interrupt vector is an Interrupt Service Routine
+or ISR, which will run as quickly as possible so that it can service
+the hardware. However an ISR can make only a small number of kernel
+calls, mostly related to the interrupt subsystem, and it cannot make
+any call that would cause a thread to wake up. If an ISR detects that
+an I/O operation has completed and hence that a thread should be woken
+up, it can cause the associated Deferred Service Routine or DSR to
+run. A DSR is allowed to make more kernel calls, for example it can
+signal a condition variable or post to a semaphore.
+ </para>
+ <para>
+Disabling interrupts prevents ISRs from running, but very few parts of
+the system disable interrupts and then only for short periods of time.
+The main reason for a thread to disable interrupts is to manipulate
+some state that is shared with an ISR. For example if a thread needs
+to add another buffer to a linked list of free buffers and the ISR may
+remove a buffer from this list at any time, the thread would need to
+disable interrupts for the few instructions needed to manipulate the
+list. If the hardware raises an interrupt at this time, it remains
+pending until interrupts are reenabled.
+ </para>
+ <para>
+Analogous to interrupts being disabled or enabled, the kernel has a
+scheduler lock. The various kernel functions such as
+<function>cyg_mutex_lock</function> and
+<function>cyg_semaphore_post</function> will claim the scheduler lock,
+manipulate the kernel data structures, and then release the scheduler
+lock. If an interrupt results in a DSR being requested and the
+scheduler is currently locked, the DSR remains pending. When the
+scheduler lock is released any pending DSRs will run. These may post
+events to synchronization primitives, causing other higher priority
+threads to be woken up.
+ </para>
+ <para>
+For an example, consider the following scenario. The system has a high
+priority thread A, responsible for processing some data coming from an
+external device. This device will raise an interrupt when data is
+available. There are two other threads B and C which spend their time
+performing calculations and occasionally writing results to a display
+of some sort. This display is a shared resource so a mutex is used to
+control access.
+ </para>
+ <para>
+At a particular moment in time thread A is likely to be blocked,
+waiting on a semaphore or another synchronization primitive until data
+is available. Thread B might be running performing some calculations,
+and thread C is runnable waiting for its next timeslice. Interrupts
+are enabled, and the scheduler is unlocked because none of the threads
+are in the middle of a kernel operation. At this point the device
+raises an interrupt. The hardware transfers control to a low-level
+interrupt handler provided by eCos which works out exactly which
+interrupt occurs, and then the corresponding ISR is run. This ISR
+manipulates the hardware as appropriate, determines that there is now
+data available, and wants to wake up thread A by posting to the
+semaphore. However ISR's are not allowed to call
+<function>cyg_semaphore_post</function> directly, so instead the ISR
+requests that its associated DSR be run and returns. There are no more
+interrupts to be processed, so the kernel next checks for DSR's. One
+DSR is pending and the scheduler is currently unlocked, so the DSR can
+run immediately and post the semaphore. This will have the effect of
+making thread A runnable again, so the scheduler's data structures are
+adjusted accordingly. When the DSR returns thread B is no longer the
+highest priority runnable thread so it will be suspended, and instead
+thread A gains control over the cpu.
+ </para>
+ <para>
+In the above example no kernel data structures were being manipulated
+at the exact moment that the interrupt happened. However that cannot
+be assumed. Suppose that thread B had finished its current set of
+calculations and wanted to write the results to the display. It would
+claim the appropriate mutex and manipulate the display. Now suppose
+that thread B was timesliced in favour of thread C, and that thread C
+also finished its calculations and wanted to write the results to the
+display. It would call <function>cyg_mutex_lock</function>. This
+kernel call locks the scheduler, examines the current state of the
+mutex, discovers that the mutex is already owned by another thread,
+suspends the current thread, and switches control to another runnable
+thread. Another interrupt happens in the middle of this
+<function>cyg_mutex_lock</function> call, causing the ISR to run
+immediately. The ISR decides that thread A should be woken up so it
+requests that its DSR be run and returns back to the kernel. At this
+point there is a pending DSR, but the scheduler is still locked by the
+call to <function>cyg_mutex_lock</function> so the DSR cannot run
+immediately. Instead the call to <function>cyg_mutex_lock</function>
+is allowed to continue, which at some point involves unlocking the
+scheduler. The pending DSR can now run, safely post the semaphore, and
+thus wake up thread A.
+ </para>
+ <para>
+If the ISR had called <function>cyg_semaphore_post</function> directly
+rather than leaving it to a DSR, it is likely that there would have
+been some sort of corruption of a kernel data structure. For example
+the kernel might have completely lost track of one of the threads, and
+that thread would never have run again. The two-level approach to
+interrupt handling, ISR's and DSR's, prevents such problems with no
+need to disable interrupts.
+ </para>
+ </refsect1>
+
+<!-- }}} -->
+<!-- {{{ Calling contexts -->
+
+ <refsect1 id="kernel-overview-contexts">
+ <title>Calling Contexts</title>
+ <para>
+eCos defines a number of contexts. Only certain calls are allowed from
+inside each context, for example most operations on threads or
+synchronization primitives are not allowed from ISR context. The
+different contexts are initialization, thread, ISR and DSR.
+ </para>
+ <para>
+When eCos starts up it goes through a number of phases, including
+setting up the hardware and invoking C++ static constructors. During
+this time interrupts are disabled and the scheduler is locked. When a
+configuration includes the kernel package the final operation is a
+call to <link
+linkend="kernel-schedcontrol"><function>cyg_scheduler_start</function></link>.
+At this point interrupts are enabled, the scheduler is unlocked, and
+control is transferred to the highest priority runnable thread. If the
+configuration also includes the C library package then usually the C
+library startup package will have created a thread which will call the
+application's <function>main</function> entry point.
+ </para>
+ <para>
+Some application code can also run before the scheduler is started,
+and this code runs in initialization context. If the application is
+written partly or completely in C++ then the constructors for any
+static objects will be run. Alternatively application code can define
+a function <function>cyg_user_start</function> which gets called after
+any C++ static constructors. This allows applications to be written
+entirely in C.
+ </para>
+ <programlisting width=72>
+void
+cyg_user_start(void)
+{
+ /* Perform application-specific initialization here */
+}
+ </programlisting>
+ <para>
+It is not necessary for applications to provide a
+<function>cyg_user_start</function> function since the system will
+provide a default implementation which does nothing.
+ </para>
+ <para>
+Typical operations that are performed from inside static constructors
+or <function>cyg_user_start</function> include creating threads,
+synchronization primitives, setting up alarms, and registering
+application-specific interrupt handlers. In fact for many applications
+all such creation operations happen at this time, using statically
+allocated data, avoiding any need for dynamic memory allocation or
+other overheads.
+ </para>
+ <para>
+Code running in initialization context runs with interrupts disabled
+and the scheduler locked. It is not permitted to reenable interrupts
+or unlock the scheduler because the system is not guaranteed to be in
+a totally consistent state at this point. A consequence is that
+initialization code cannot use synchronization primitives such as
+<function>cyg_semaphore_wait</function> to wait for an external event.
+It is permitted to lock and unlock a mutex: there are no other threads
+running so it is guaranteed that the mutex is not yet locked, and
+therefore the lock operation will never block; this is useful when
+making library calls that may use a mutex internally.
+ </para>
+ <para>
+At the end of the startup sequence the system will call
+<function>cyg_scheduler_start</function> and the various threads will
+start running. In thread context nearly all of the kernel functions
+are available. There may be some restrictions on interrupt-related
+operations, depending on the target hardware. For example the hardware
+may require that interrupts be acknowledged in the ISR or DSR before
+control returns to thread context, in which case
+<filename>cyg_interrupt_acknowledge</filename> should not be called
+by a thread.
+ </para>
+ <para>
+At any time the processor may receive an external interrupt, causing
+control to be transferred from the current thread. Typically a VSR
+provided by eCos will run and determine exactly which interrupt
+occurred. Then the VSR will switch to the appropriate ISR, which can
+be provided by a HAL package, a device driver, or by the application.
+During this time the system is running at ISR context, and most of the
+kernel function calls are disallowed. This includes the various
+synchronization primitives, so for example an ISR is not allowed to
+post to a semaphore to indicate that an event has happened. Usually
+the only operations that should be performed from inside an ISR are
+ones related to the interrupt subsystem itself, for example masking an
+interrupt or acknowledging that an interrupt has been processed. On
+SMP systems it is also possible to use spinlocks from ISR context.
+ </para>
+ <para>
+When an ISR returns it can request that the corresponding DSR be run
+as soon as it is safe to do so, and that will run in DSR context. This
+context is also used for running alarm functions, and threads can
+switch temporarily to DSR context by locking the scheduler. Only
+certain kernel functions can be called from DSR context, although more
+than in ISR context. In particular it is possible to use any
+synchronization primitives which cannot block. These include
+<function>cyg_semaphore_post</function>,
+<filename>cyg_cond_signal</filename>,
+<function>cyg_cond_broadcast</function>,
+<function>cyg_flag_setbits</function>, and
+<function>cyg_mbox_tryput</function>. It is not possible to use any
+primitives that may block such as
+<function>cyg_semaphore_wait</function>,
+<function>cyg_mutex_lock</function>, or
+<function>cyg_mbox_put</function>. Calling such functions from inside
+a DSR may cause the system to hang.
+ </para>
+ <para>
+The specific documentation for the various kernel functions gives more
+details about valid contexts.
+ </para>
+ </refsect1>
+
+<!-- }}} -->
+<!-- {{{ Error handling -->
+
+ <refsect1 id="kernel-overview-errors">
+ <title>Error Handling and Assertions</title>
+ <para>
+In many APIs each function is expected to perform some validation of
+its parameters and possibly of the current state of the system. This
+is supposed to ensure that each function is used correctly, and that
+application code is not attempting to perform a semaphore operation on
+a mutex or anything like that. If an error is detected then a suitable
+error code is returned, for example the POSIX function
+<function>pthread_mutex_lock</function> can return various error codes
+including <literal>EINVAL</literal> and <literal>EDEADLK</literal>.
+There are a number of problems with this approach, especially in the
+context of deeply embedded systems:
+ </para>
+ <orderedlist>
+ <listitem><para>
+Performing these checks inside the mutex lock and all the other
+functions requires extra cpu cycles and adds significantly to the code
+size. Even if the application is written correctly and only makes
+system function calls with sensible arguments and under the right
+conditions, these overheads still exist.
+ </para></listitem>
+ <listitem><para>
+Returning an error code is only useful if the calling code detects
+these error codes and takes appropriate action. In practice the
+calling code will often ignore any errors because the programmer
+<emphasis>&ldquo;knows&rdquo;</emphasis> that the function is being
+used correctly. If the programmer is mistaken then an error condition
+may be detected and reported, but the application continues running
+anyway and is likely to fail some time later in mysterious ways.
+ </para></listitem>
+ <listitem><para>
+If the calling code does always check for error codes, that adds yet
+more cpu cycles and code size overhead.
+ </para></listitem>
+ <listitem><para>
+Usually there will be no way to recover from certain errors, so if the
+application code detected an error such as <literal>EINVAL</literal>
+then all it could do is abort the application somehow.
+ </para></listitem>
+ </orderedlist>
+ <para>
+The approach taken within the eCos kernel is different. Functions such
+as <function>cyg_mutex_lock</function> will not return an error code.
+Instead they contain various assertions, which can be enabled or
+disabled. During the development process assertions are normally left
+enabled, and the various kernel functions will perform parameter
+checks and other system consistency checks. If a problem is detected
+then an assertion failure will be reported and the application will be
+terminated. In a typical debug session a suitable breakpoint will have
+been installed and the developer can now examine the state of the
+system and work out exactly what is going on. Towards the end of the
+development cycle assertions will be disabled by manipulating
+configuration options within the eCos infrastructure package, and all
+assertions will be eliminated at compile-time. The assumption is that
+by this time the application code has been mostly debugged: the
+initial version of the code might have tried to perform a semaphore
+operation on a mutex, but any problems like that will have been fixed
+some time ago. This approach has a number of advantages:
+ </para>
+ <orderedlist>
+ <listitem><para>
+In the final application there will be no overheads for checking
+parameters and other conditions. All that code will have been
+eliminated at compile-time.
+ </para></listitem>
+ <listitem><para>
+Because the final application will not suffer any overheads, it is
+reasonable for the system to do more work during the development
+process. In particular the various assertions can test for more error
+conditions and more complicated errors. When an error is detected
+it is possible to give a text message describing the error rather than
+just return an error code.
+ </para></listitem>
+ <listitem><para>
+There is no need for application programmers to handle error codes
+returned by various kernel function calls. This simplifies the
+application code.
+ </para></listitem>
+ <listitem><para>
+If an error is detected then an assertion failure will be reported
+immediately and the application will be halted. There is no
+possibility of an error condition being ignored because application
+code did not check for an error code.
+ </para></listitem>
+ </orderedlist>
+ <para>
+Although none of the kernel functions return an error code, many of
+them do return a status condition. For example the function
+<function>cyg_semaphore_timed_wait</function> waits until either an
+event has been posted to a semaphore, or until a certain number of
+clock ticks have occurred. Usually the calling code will need to know
+whether the wait operation succeeded or whether a timeout occurred.
+<function>cyg_semaphore_timed_wait</function> returns a boolean: a
+return value of zero or false indicates a timeout, a non-zero return
+value indicates that the wait succeeded.
+ </para>
+ <para>
+In conventional APIs one common error conditions is lack of memory.
+For example the POSIX function <function>pthread_create</function>
+usually has to allocate some memory dynamically for the thread stack
+and other per-thread data. If the target hardware does not have enough
+memory to meet all demands, or more commonly if the application
+contains a memory leak, then there may not be enough memory available
+and the function call would fail. The eCos kernel avoids such problems
+by never performing any dynamic memory allocation. Instead it is the
+responsibility of the application code to provide all the memory
+required for kernel data structures and other needs. In the case of
+<function>cyg_thread_create</function> this means a
+<structname>cyg_thread</structname> data structure to hold the thread
+details, and a <type>char</type> array for the thread stack.
+ </para>
+ <para>
+In many applications this approach results in all data structures
+being allocated statically rather than dynamically. This has several
+advantages. If the application is in fact too large for the target
+hardware's memory then there will be an error at link-time rather than
+at run-time, making the problem much easier to diagnose. Static
+allocation does not involve any of the usual overheads associated with
+dynamic allocation, for example there is no need to keep track of the
+various free blocks in the system, and it may be possible to eliminate
+<function>malloc</function> from the system completely. Problems such
+as fragmentation and memory leaks cannot occur if all data is
+allocated statically. However, some applications are sufficiently
+complicated that dynamic memory allocation is required, and the
+various kernel functions do not distinguish between statically and
+dynamically allocated memory. It still remains the responsibility of
+the calling code to ensure that sufficient memory is available, and
+passing null pointers to the kernel will result in assertions or
+system failure.
+ </para>
+ </refsect1>
+
+<!-- }}} -->
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ SMP -->
+
+ <refentry id="kernel-SMP">
+
+ <refmeta>
+ <refentrytitle>SMP Support</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>SMP</refname>
+ <refpurpose>Support Symmetric Multiprocessing Systems</refpurpose>
+ </refnamediv>
+
+ <refsect1 id="kernel-smp-description">
+ <title>Description</title>
+ <para>
+eCos contains support for limited Symmetric Multi-Processing (SMP).
+This is only available on selected architectures and platforms.
+The implementation has a number of restrictions on the kind of
+hardware supported. These are described in <xref linkend="hal-smp-support">.
+ </para>
+
+ <para>
+The following sections describe the changes that have been made to the
+eCos kernel to support SMP operation.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-smp-startup">
+ <title>System Startup</title>
+ <para>
+The system startup sequence needs to be somewhat different on an SMP
+system, although this is largely transparent to application code. The
+main startup takes place on only one CPU, called the primary CPU. All
+other CPUs, the secondary CPUs, are either placed in suspended state
+at reset, or are captured by the HAL and put into a spin as they start
+up. The primary CPU is responsible for copying the DATA segment and
+zeroing the BSS (if required), calling HAL variant and platform
+initialization routines and invoking constructors. It then calls
+<function>cyg_start</function> to enter the application. The
+application may then create extra threads and other objects.
+ </para>
+ <para>
+It is only when the application calls
+<function>cyg_scheduler_start</function> that the secondary CPUs are
+initialized. This routine scans the list of available secondary CPUs
+and invokes <function>HAL_SMP_CPU_START</function> to start each
+CPU. Finally it calls an internal function
+<function>Cyg_Scheduler::start_cpu</function> to enter the scheduler
+for the primary CPU.
+ </para>
+ <para>
+Each secondary CPU starts in the HAL, where it completes any per-CPU
+initialization before calling into the kernel at
+<function>cyg_kernel_cpu_startup</function>. Here it claims the
+scheduler lock and calls
+<function>Cyg_Scheduler::start_cpu</function>.
+ </para>
+ <para>
+<function>Cyg_Scheduler::start_cpu</function> is common to both the
+primary and secondary CPUs. The first thing this code does is to
+install an interrupt object for this CPU's inter-CPU interrupt. From
+this point on the code is the same as for the single CPU case: an
+initial thread is chosen and entered.
+ </para>
+ <para>
+From this point on the CPUs are all equal, eCos makes no further
+distinction between the primary and secondary CPUs. However, the
+hardware may still distinguish between them as far as interrupt
+delivery is concerned.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-smp-scheduling">
+ <title>Scheduling</title>
+ <para>
+To function correctly an operating system kernel must protect its
+vital data structures, such as the run queues, from concurrent
+access. In a single CPU system the only concurrent activities to worry
+about are asynchronous interrupts. The kernel can easily guard its
+data structures against these by disabling interrupts. However, in a
+multi-CPU system, this is inadequate since it does not block access by
+other CPUs.
+ </para>
+ <para>
+The eCos kernel protects its vital data structures using the scheduler
+lock. In single CPU systems this is a simple counter that is
+atomically incremented to acquire the lock and decremented to release
+it. If the lock is decremented to zero then the scheduler may be
+invoked to choose a different thread to run. Because interrupts may
+continue to be serviced while the scheduler lock is claimed, ISRs are
+not allowed to access kernel data structures, or call kernel routines
+that can. Instead all such operations are deferred to an associated
+DSR routine that is run during the lock release operation, when the
+data structures are in a consistent state.
+ </para>
+ <para>
+By choosing a kernel locking mechanism that does not rely on interrupt
+manipulation to protect data structures, it is easier to convert eCos
+to SMP than would otherwise be the case. The principal change needed to
+make eCos SMP-safe is to convert the scheduler lock into a nestable
+spin lock. This is done by adding a spinlock and a CPU id to the
+original counter.
+ </para>
+ <para>
+The algorithm for acquiring the scheduler lock is very simple. If the
+scheduler lock's CPU id matches the current CPU then it can just increment
+the counter and continue. If it does not match, the CPU must spin on
+the spinlock, after which it may increment the counter and store its
+own identity in the CPU id.
+ </para>
+ <para>
+To release the lock, the counter is decremented. If it goes to zero
+the CPU id value must be set to NONE and the spinlock cleared.
+ </para>
+ <para>
+To protect these sequences against interrupts, they must be performed
+with interrupts disabled. However, since these are very short code
+sequences, they will not have an adverse effect on the interrupt
+latency.
+ </para>
+ <para>
+Beyond converting the scheduler lock, further preparing the kernel for
+SMP is a relatively minor matter. The main changes are to convert
+various scalar housekeeping variables into arrays indexed by CPU
+id. These include the current thread pointer, the need_reschedule
+flag and the timeslice counter.
+ </para>
+ <para>
+At present only the Multi-Level Queue (MLQ) scheduler is capable of
+supporting SMP configurations. The main change made to this scheduler
+is to cope with having several threads in execution at the same
+time. Running threads are marked with the CPU that they are executing on.
+When scheduling a thread, the scheduler skips past any running threads
+until it finds a thread that is pending. While not a constant-time
+algorithm, as in the single CPU case, this is still deterministic,
+since the worst case time is bounded by the number of CPUs in the
+system.
+ </para>
+ <para>
+A second change to the scheduler is in the code used to decide when
+the scheduler should be called to choose a new thread. The scheduler
+attempts to keep the <property>n</property> CPUs running the
+<property>n</property> highest priority threads. Since an event or
+interrupt on one CPU may require a reschedule on another CPU, there
+must be a mechanism for deciding this. The algorithm currently
+implemented is very simple. Given a thread that has just been awakened
+(or had its priority changed), the scheduler scans the CPUs, starting
+with the one it is currently running on, for a current thread that is
+of lower priority than the new one. If one is found then a reschedule
+interrupt is sent to that CPU and the scan continues, but now using
+the current thread of the rescheduled CPU as the candidate thread. In
+this way the new thread gets to run as quickly as possible, hopefully
+on the current CPU, and the remaining CPUs will pick up the remaining
+highest priority threads as a consequence of processing the reschedule
+interrupt.
+ </para>
+ <para>
+The final change to the scheduler is in the handling of
+timeslicing. Only one CPU receives timer interrupts, although all CPUs
+must handle timeslicing. To make this work, the CPU that receives the
+timer interrupt decrements the timeslice counter for all CPUs, not
+just its own. If the counter for a CPU reaches zero, then it sends a
+timeslice interrupt to that CPU. On receiving the interrupt the
+destination CPU enters the scheduler and looks for another thread at
+the same priority to run. This is somewhat more efficient than
+distributing clock ticks to all CPUs, since the interrupt is only
+needed when a timeslice occurs.
+ </para>
+ <para>
+All existing synchronization mechanisms work as before in an SMP
+system. Additional synchronization mechanisms have been added to
+provide explicit synchronization for SMP, in the form of
+<link linkend="kernel-spinlocks">spinlocks</link>.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-smp-interrupts">
+ <title>SMP Interrupt Handling</title>
+ <para>
+The main area where the SMP nature of a system requires special
+attention is in device drivers and especially interrupt handling. It
+is quite possible for the ISR, DSR and thread components of a device
+driver to execute on different CPUs. For this reason it is much more
+important that SMP-capable device drivers use the interrupt-related
+functions correctly. Typically a device driver would use the driver
+API rather than call the kernel directly, but it is unlikely that
+anybody would attempt to use a multiprocessor system without the
+kernel package.
+ </para>
+ <para>
+Two new functions have been added to the Kernel API
+to do <link linkend="kernel-interrupts-smp">interrupt
+routing</link>: <function>cyg_interrupt_set_cpu</function> and
+<function>cyg_interrupt_get_cpu</function>. Although not currently
+supported, special values for the cpu argument may be used in future
+to indicate that the interrupt is being routed dynamically or is
+CPU-local. Once a vector has been routed to a new CPU, all other
+interrupt masking and configuration operations are relative to that
+CPU, where relevant.
+ </para>
+
+ <para>
+There are more details of how interrupts should be handled in SMP
+systems in <xref linkend="devapi-smp-support">.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+
+<!-- {{{ cyg_thread_create() -->
+
+ <refentry id="kernel-thread-create">
+
+ <refmeta>
+ <refentrytitle>Thread creation</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_thread_create</refname>
+ <refpurpose>Create a new thread</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>void <function>cyg_thread_create</function></funcdef>
+ <paramdef>cyg_addrword_t <parameter>sched_info</parameter></paramdef>
+ <paramdef>cyg_thread_entry_t* <parameter>entry</parameter></paramdef>
+ <paramdef>cyg_addrword_t <parameter>entry_data</parameter></paramdef>
+ <paramdef>char* <parameter>name</parameter></paramdef>
+ <paramdef>void* <parameter>stack_base</parameter></paramdef>
+ <paramdef>cyg_ucount32 <parameter>stack_size</parameter></paramdef>
+ <paramdef>cyg_handle_t* <parameter>handle</parameter></paramdef>
+ <paramdef>cyg_thread* <parameter>thread</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="kernel-thread-create-description"><title>Description</title>
+ <para>
+The <function>cyg_thread_create</function> function allows application
+code and eCos packages to create new threads. In many applications
+this only happens during system initialization and all required data
+is allocated statically. However additional threads can be created at
+any time, if necessary. A newly created thread is always in suspended
+state and will not start running until it has been resumed via a call
+to <function>cyg_thread_resume</function>. Also, if threads are
+created during system initialization then they will not start running
+until the eCos scheduler has been started.
+ </para>
+ <para>
+The <parameter class="function">name</parameter> argument is used
+primarily for debugging purposes, making it easier to keep track of
+which <structname>cyg_thread</structname> structure is associated with
+which application-level thread. The kernel configuration option
+<varname>CYGVAR_KERNEL_THREADS_NAME</varname> controls whether or not
+this name is actually used.
+ </para>
+ <para>
+On creation each thread is assigned a unique handle, and this will be
+stored in the location pointed at by the <parameter
+class="function">handle</parameter> argument. Subsequent operations on
+this thread including the required
+<function>cyg_thread_resume</function> should use this handle to
+identify the thread.
+ </para>
+ <para>
+The kernel requires a small amount of space for each thread, in the
+form of a <structname>cyg_thread</structname> data structure, to hold
+information such as the current state of that thread. To avoid any
+need for dynamic memory allocation within the kernel this space has to
+be provided by higher-level code, typically in the form of a static
+variable. The <parameter class="function">thread</parameter> argument
+provides this space.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-thread-create-entry"><title>Thread Entry Point</title>
+ <para>
+The entry point for a thread takes the form:
+ </para>
+ <programlisting width=72>
+void
+thread_entry_function(cyg_addrword_t data)
+{
+ &hellip;
+}
+ </programlisting>
+ <para>
+The second argument to <function>cyg_thread_create</function> is a
+pointer to such a function. The third argument <parameter
+class="function">entry_data</parameter> is used to pass additional
+data to the function. Typically this takes the form of a pointer to
+some static data, or a small integer, or <literal>0</literal> if the
+thread does not require any additional data.
+ </para>
+ <para>
+If the thread entry function ever returns then this is equivalent to
+the thread calling <function>cyg_thread_exit</function>. Even though
+the thread will no longer run again, it remains registered with the
+scheduler. If the application needs to re-use the
+<structname>cyg_thread</structname> data structure then a call to
+<function>cyg_thread_delete</function> is required first.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-thread-create-priorities"><title>Thread Priorities</title>
+ <para>
+The <parameter class="function">sched_info</parameter> argument
+provides additional information to the scheduler. The exact details
+depend on the scheduler being used. For the bitmap and mlqueue
+schedulers it is a small integer, typically in the range 0 to 31, with
+0 being the highest priority. The lowest priority is normally used
+only by the system's idle thread. The exact number of priorities is
+controlled by the kernel configuration option
+<varname>CYGNUM_KERNEL_SCHED_PRIORITIES</varname>.
+ </para>
+ <para>
+It is the responsibility of the application developer to be aware of
+the various threads in the system, including those created by eCos
+packages, and to ensure that all threads run at suitable priorities.
+For threads created by other packages the documentation provided by
+those packages should indicate any requirements.
+ </para>
+ <para>
+The functions <function>cyg_thread_set_priority</function>,
+<function>cyg_thread_get_priority</function>, and
+<function>cyg_thread_get_current_priority</function> can be used to
+manipulate a thread's priority.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-thread-create-stack"><title>Stacks and Stack Sizes</title>
+ <para>
+Each thread needs its own stack for local variables and to keep track
+of function calls and returns. Again it is expected that this stack is
+provided by the calling code, usually in the form of static data, so
+that the kernel does not need any dynamic memory allocation
+facilities. <function>cyg_thread_create</function> takes two arguments
+related to the stack, a pointer to the base of the stack and the total
+size of this stack. On many processors stacks actually descend from the
+top down, so the kernel will add the stack size to the base address to
+determine the starting location.
+ </para>
+ <para>
+The exact stack size requirements for any given thread depend on a
+number of factors. The most important is of course the code that will
+be executed in the context of this code: if this involves significant
+nesting of function calls, recursion, or large local arrays, then the
+stack size needs to be set to a suitably high value. There are some
+architectural issues, for example the number of cpu registers and the
+calling conventions will have some effect on stack usage. Also,
+depending on the configuration, it is possible that some other code
+such as interrupt handlers will occasionally run on the current
+thread's stack. This depends in part on configuration options such as
+<varname>CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK</varname>
+and <varname>CYGSEM_HAL_COMMON_INTERRUPTS_ALLOW_NESTING</varname>.
+ </para>
+ <para>
+Determining an application's actual stack size requirements is the
+responsibility of the application developer, since the kernel cannot
+know in advance what code a given thread will run. However, the system
+does provide some hints about reasonable stack sizes in the form of
+two constants: <varname>CYGNUM_HAL_STACK_SIZE_MINIMUM</varname> and
+<varname>CYGNUM_HAL_STACK_SIZE_TYPICAL</varname>. These are defined by
+the appropriate HAL package. The <varname>MINIMUM</varname> value is
+appropriate for a thread that just runs a single function and makes
+very simple system calls. Trying to create a thread with a smaller
+stack than this is illegal. The <varname>TYPICAL</varname> value is
+appropriate for applications where application calls are nested no
+more than half a dozen or so levels, and there are no large arrays on
+the stack.
+ </para>
+ <para>
+If the stack sizes are not estimated correctly and a stack overflow
+occurs, the probably result is some form of memory corruption. This
+can be very hard to track down. The kernel does contain some code to
+help detect stack overflows, controlled by the configuration option
+<varname>CYGFUN_KERNEL_THREADS_STACK_CHECKING</varname>: a small
+amount of space is reserved at the stack limit and filled with a
+special signature: every time a thread context switch occurs this
+signature is checked, and if invalid that is a good indication (but
+not absolute proof) that a stack overflow has occurred. This form of
+stack checking is enabled by default when the system is built with
+debugging enabled. A related configuration option is
+<varname>CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT</varname>: enabling
+this option means that a thread can call the function
+<function>cyg_thread_measure_stack_usage</function> to find out the
+maximum stack usage to date. Note that this is not necessarily the
+true maximum because, for example, it is possible that in the current
+run no interrupt occurred at the worst possible moment.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-thread-create-context"><title>Valid contexts</title>
+ <para>
+<function>cyg_thread_create</function> may be called during
+initialization and from within thread context. It may not be called
+from inside a DSR.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-thread-create-example"><title>Example</title>
+ <para>
+A simple example of thread creation is shown below. This involves
+creating five threads, one producer and four consumers or workers. The
+threads are created in the system's
+<function>cyg_user_start</function>: depending on the configuration it
+might be more appropriate to do this elsewhere, for example inside
+<function>main</function>.
+ </para>
+ <programlisting width=72>
+#include &lt;cyg/hal/hal_arch.h&gt;
+#include &lt;cyg/kernel/kapi.h&gt;
+
+// These numbers depend entirely on your application
+#define NUMBER_OF_WORKERS 4
+#define PRODUCER_PRIORITY 10
+#define WORKER_PRIORITY 11
+#define PRODUCER_STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+#define WORKER_STACKSIZE (CYGNUM_HAL_STACK_SIZE_MINIMUM + 1024)
+
+static unsigned char producer_stack[PRODUCER_STACKSIZE];
+static unsigned char worker_stacks[NUMBER_OF_WORKERS][WORKER_STACKSIZE];
+static cyg_handle_t producer_handle, worker_handles[NUMBER_OF_WORKERS];
+static cyg_thread producer_thread, worker_threads[NUMBER_OF_WORKERS];
+
+static void
+producer(cyg_addrword_t data)
+{
+ &hellip;
+}
+
+static void
+worker(cyg_addrword_t data)
+{
+ &hellip;
+}
+
+void
+cyg_user_start(void)
+{
+ int i;
+
+ cyg_thread_create(PRODUCER_PRIORITY, &amp;producer, 0, "producer",
+ producer_stack, PRODUCER_STACKSIZE,
+ &amp;producer_handle, &amp;producer_thread);
+ cyg_thread_resume(producer_handle);
+ for (i = 0; i < NUMBER_OF_WORKERS; i++) {
+ cyg_thread_create(WORKER_PRIORITY, &amp;worker, i, "worker",
+ worker_stacks[i], WORKER_STACKSIZE,
+ &amp;(worker_handles[i]), &amp;(worker_threads[i]));
+ cyg_thread_resume(worker_handles[i]);
+ }
+}
+ </programlisting>
+ </refsect1>
+
+
+ <refsect1 id="kernel-thread-create-cxx"><title>Thread Entry Points and C++</title>
+ <para>
+For code written in C++ the thread entry function must be either a
+static member function of a class or an ordinary function outside any
+class. It cannot be a normal member function of a class because such
+member functions take an implicit additional argument
+<varname>this</varname>, and the kernel has no way of knowing what
+value to use for this argument. One way around this problem is to make
+use of a special static member function, for example:
+ </para>
+ <programlisting width=72>
+class fred {
+ public:
+ void thread_function();
+ static void static_thread_aux(cyg_addrword_t);
+};
+
+void
+fred::static_thread_aux(cyg_addrword_t objptr)
+{
+ fred* object = static_cast&lt;fred*&gt;(objptr);
+ object-&gt;thread_function();
+}
+
+static fred instance;
+
+extern "C" void
+cyg_start( void )
+{
+ &hellip;
+ cyg_thread_create( &hellip;,
+ &amp;fred::static_thread_aux,
+ static_cast&lt;cyg_addrword_t&gt;(&amp;instance),
+ &hellip;);
+ &hellip;
+}
+ </programlisting>
+ <para>
+Effectively this uses the <parameter
+class="function">entry_data</parameter> argument to
+<function>cyg_thread_create</function> to hold the
+<varname>this</varname> pointer. Unfortunately this approach does
+require the use of some C++ casts, so some of the type safety that can
+be achieved when programming in C++ is lost.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Thread info -->
+
+ <refentry id="kernel-thread-info">
+
+ <refmeta>
+ <refentrytitle>Thread information</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_thread_self</refname>
+ <refname>cyg_thread_idle_thread</refname>
+ <refname>cyg_thread_get_stack_base</refname>
+ <refname>cyg_thread_get_stack_size</refname>
+ <refname>cyg_thread_measure_stack_usage</refname>
+ <refname>cyg_thread_get_next</refname>
+ <refname>cyg_thread_get_info</refname>
+ <refname>cyg_thread_get_id</refname>
+ <refname>cyg_thread_find</refname>
+ <refpurpose>Get basic thread information</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>cyg_handle_t <function>cyg_thread_self</function></funcdef>
+ <void>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_handle_t <function>cyg_thread_idle_thread</function></funcdef>
+ <void>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_addrword_t <function>cyg_thread_get_stack_base</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>thread</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_uint32 <function>cyg_thread_get_stack_size</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>thread</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_uint32 <function>cyg_thread_measure_stack_usage</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>thread</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool <function>cyg_thread_get_next</function></funcdef>
+ <paramdef>cyg_handle_t *<parameter>thread</parameter></paramdef>
+ <paramdef>cyg_uint16 *<parameter>id</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool <function>cyg_thread_get_info</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>thread</parameter></paramdef>
+ <paramdef>cyg_uint16 <parameter>id</parameter></paramdef>
+ <paramdef>cyg_thread_info *<parameter>info</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_uint16 <function>cyg_thread_get_id</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>thread</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_handle_t <function>cyg_thread_find</function></funcdef>
+ <paramdef>cyg_uint16 <parameter>id</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="kernel-thread-info-description"><title>Description</title>
+ <para>
+These functions can be used to obtain some basic information about
+various threads in the system. Typically they serve little or no
+purpose in real applications, but they can be useful during debugging.
+ </para>
+ <para>
+<function>cyg_thread_self</function> returns a handle corresponding
+to the current thread. It will be the same as the value filled in by
+<function>cyg_thread_create</function> when the current thread was
+created. This handle can then be passed to other functions such as
+<function>cyg_thread_get_priority</function>.
+ </para>
+ <para>
+<function>cyg_thread_idle_thread</function> returns the handle
+corresponding to the idle thread. This thread is created automatically
+by the kernel, so application-code has no other way of getting hold of
+this information.
+ </para>
+ <para>
+<function>cyg_thread_get_stack_base</function> and
+<function>cyg_thread_get_stack_size</function> return information
+about a specific thread's stack. The values returned will match the
+values passed to <function>cyg_thread_create</function> when this
+thread was created.
+ </para>
+ <para>
+<function>cyg_thread_measure_stack_usage</function> is only available
+if the configuration option
+<varname>CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT</varname> is enabled.
+The return value is the maximum number of bytes of stack space used so
+far by the specified thread. Note that this should not be considered a
+true upper bound, for example it is possible that in the current test
+run the specified thread has not yet been interrupted at the deepest
+point in the function call graph. Never the less the value returned
+can give some useful indication of the thread's stack requirements.
+ </para>
+ <para>
+<function>cyg_thread_get_next</function> is used to enumerate all the
+current threads in the system. It should be called initially with the
+locations pointed to by <parameter>thread</parameter> and
+<parameter>id</parameter> set to zero. On return these will be set to
+the handle and ID of the first thread. On subsequent calls, these
+parameters should be left set to the values returned by the previous
+call. The handle and ID of the next thread in the system will be
+installed each time, until a <literal>false</literal> return value
+indicates the end of the list.
+ </para>
+ <para>
+<function>cyg_thread_get_info</function> fills in the
+<type>cyg_thread_info</type> structure with information about the
+thread described by the <parameter>thread</parameter> and
+<parameter>id</parameter> arguments. The information returned includes
+the thread's handle and id, its state and name, priorities and stack
+parameters. If the thread does not exist the function returns
+<literal>false</literal>.
+ </para>
+ <para>
+The <type>cyg_thread_info</type> structure is defined as follows by
+&lt;<filename class=headerfile>cyg/kernel/kapi.h</filename>&gt;, but may
+be extended in future with additional members, and so its size should
+not be relied upon:
+<programlisting>
+typedef struct
+{
+ <type>cyg_handle_t</type> <structfield>handle</structfield>;
+ <type>cyg_uint16</type> <structfield>id</structfield>;
+ <type>cyg_uint32</type> <structfield>state</structfield>;
+ <type>char</type> <structfield>*name</structfield>;
+ <type>cyg_priority_t</type> <structfield>set_pri</structfield>;
+ <type>cyg_priority_t</type> <structfield>cur_pri</structfield>;
+ <type>cyg_addrword_t</type> <structfield>stack_base</structfield>;
+ <type>cyg_uint32</type> <structfield>stack_size</structfield>;
+ <type>cyg_uint32</type> <structfield>stack_used</structfield>;
+} cyg_thread_info;
+</programlisting>
+ </para>
+ <para>
+<function>cyg_thread_get_id</function> returns the unique thread ID for
+the thread identified by <parameter>thread</parameter>.
+ </para>
+ <para>
+<function>cyg_thread_find</function> returns a handle for the thread
+whose ID is <parameter>id</parameter>. If no such thread exists, a
+zero handle is returned.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-thread-info-context"><title>Valid contexts</title>
+ <para>
+<function>cyg_thread_self</function> may only be called from thread
+context. <function>cyg_thread_idle_thread</function> may be called
+from thread or DSR context, but only after the system has been
+initialized. <function>cyg_thread_get_stack_base</function>,
+<function>cyg_thread_get_stack_size</function> and
+<function>cyg_thread_measure_stack_usage</function> may be called
+any time after the specified thread has been created, but measuring
+stack usage involves looping over at least part of the thread's stack
+so this should normally only be done from thread context.
+<function>cyg_thread_get_id</function> may be called from any context
+as long as the caller can guarantee that the supplied thread handle
+remains valid.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-thread-info-examples"><title>Examples</title>
+ <para>
+A simple example of the use of the
+<function>cyg_thread_get_next</function> and
+<function>cyg_thread_get_info</function> follows:
+ </para>
+ <programlisting width=72>
+
+#include &lt;cyg/kernel/kapi.h&gt;
+#include &lt;stdio.h&gt;
+
+void show_threads(void)
+{
+ cyg_handle_t thread = 0;
+ cyg_uint16 id = 0;
+
+ while( cyg_thread_get_next( &amp;thread, &amp;id ) )
+ {
+ cyg_thread_info info;
+
+ if( !cyg_thread_get_info( thread, id, &amp;info ) )
+ break;
+
+ printf("ID: %04x name: %10s pri: %d\n",
+ info.id, info.name?info.name:"----", info.set_pri );
+ }
+}
+
+ </programlisting>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Thread control -->
+
+ <refentry id="kernel-thread-control">
+
+ <refmeta>
+ <refentrytitle>Thread control</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_thread_yield</refname>
+ <refname>cyg_thread_delay</refname>
+ <refname>cyg_thread_suspend</refname>
+ <refname>cyg_thread_resume</refname>
+ <refname>cyg_thread_release</refname>
+ <refpurpose>Control whether or not a thread is running</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>void <function>cyg_thread_yield</function></funcdef>
+ <void>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_thread_delay</function></funcdef>
+ <paramdef>cyg_tick_count_t <parameter>delay</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_thread_suspend</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>thread</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_thread_resume</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>thread</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_thread_release</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>thread</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1><title id="kernel-thread-control-description">Description</title>
+ <para>
+These functions provide some control over whether or not a particular
+thread can run. Apart from the required use of
+<function>cyg_thread_resume</function> to start a newly-created
+thread, application code should normally use proper synchronization
+primitives such as condition variables or mail boxes.
+ </para>
+ </refsect1>
+
+ <refsect1><title id="kernel-thread-control-yield">Yield</title>
+ <para>
+<function>cyg_thread_yield</function> allows a thread to relinquish
+control of the processor to some other runnable thread which has the
+same priority. This can have no effect on any higher-priority thread
+since, if such a thread were runnable, the current thread would have
+been preempted in its favour. Similarly it can have no effect on any
+lower-priority thread because the current thread will always be run in
+preference to those. As a consequence this function is only useful
+in configurations with a scheduler that allows multiple threads to run
+at the same priority, for example the mlqueue scheduler. If instead
+the bitmap scheduler was being used then
+<function>cyg_thread_yield()</function> would serve no purpose.
+ </para>
+ <para>
+Even if a suitable scheduler such as the mlqueue scheduler has been
+configured, <function>cyg_thread_yield</function> will still rarely
+prove useful: instead timeslicing will be used to ensure that all
+threads of a given priority get a fair slice of the available
+processor time. However it is possible to disable timeslicing via the
+configuration option <varname>CYGSEM_KERNEL_SCHED_TIMESLICE</varname>,
+in which case <function>cyg_thread_yield</function> can be used to
+implement a form of cooperative multitasking.
+ </para>
+ </refsect1>
+
+ <refsect1><title id="kernel-thread-control-delay">Delay</title>
+ <para>
+<function>cyg_thread_delay</function> allows a thread to suspend until
+the specified number of clock ticks have occurred. For example, if a
+value of 1 is used and the system clock runs at a frequency of 100Hz
+then the thread will sleep for up to 10 milliseconds. This
+functionality depends on the presence of a real-time system clock, as
+controlled by the configuration option
+<varname>CYGVAR_KERNEL_COUNTERS_CLOCK</varname>.
+ </para>
+ <para>
+If the application requires delays measured in milliseconds or similar
+units rather than in clock ticks, some calculations are needed to
+convert between these units as described in <xref
+linkend="kernel-clocks">. Usually these calculations can be done by
+the application developer, or at compile-time. Performing such
+calculations prior to every call to
+<function>cyg_thread_delay</function> adds unnecessary overhead to the
+system.
+ </para>
+ </refsect1>
+
+ <refsect1><title id="kernel-thread-control-suspend">Suspend and Resume</title>
+ <para>
+Associated with each thread is a suspend counter. When a thread is
+first created this counter is initialized to 1.
+<function>cyg_thread_suspend</function> can be used to increment the
+suspend counter, and <function>cyg_thread_resume</function> decrements
+it. The scheduler will never run a thread with a non-zero suspend
+counter. Therefore a newly created thread will not run until it has
+been resumed.
+ </para>
+ <para>
+An occasional problem with the use of suspend and resume functionality
+is that a thread gets suspended more times than it is resumed and
+hence never becomes runnable again. This can lead to very confusing
+behaviour. To help with debugging such problems the kernel provides a
+configuration option
+<varname>CYGNUM_KERNEL_MAX_SUSPEND_COUNT_ASSERT</varname> which
+imposes an upper bound on the number of suspend calls without matching
+resumes, with a reasonable default value. This functionality depends
+on infrastructure assertions being enabled.
+ </para>
+ </refsect1>
+
+ <refsect1><title id="kernel-thread-control-release">Releasing a Blocked Thread</title>
+ <para>
+When a thread is blocked on a synchronization primitive such as a
+semaphore or a mutex, or when it is waiting for an alarm to trigger,
+it can be forcibly woken up using
+<function>cyg_thread_release</function>. Typically this will call the
+affected synchronization primitive to return false, indicating that
+the operation was not completed successfully. This function has to be
+used with great care, and in particular it should only be used on
+threads that have been designed appropriately and check all return
+codes. If instead it were to be used on, say, an arbitrary thread that
+is attempting to claim a mutex then that thread might not bother to
+check the result of the mutex lock operation - usually there would be
+no reason to do so. Therefore the thread will now continue running in
+the false belief that it has successfully claimed a mutex lock, and
+the resulting behaviour is undefined. If the system has been built
+with assertions enabled then it is possible that an assertion will
+trigger when the thread tries to release the mutex it does not
+actually own.
+ </para>
+ <para>
+The main use of <function>cyg_thread_release</function> is in the
+POSIX compatibility layer, where it is used in the implementation of
+per-thread signals and cancellation handlers.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-thread-control-context"><title>Valid contexts</title>
+ <para>
+<function>cyg_thread_yield</function> can only be called from thread
+context, A DSR must always run to completion and cannot yield the
+processor to some thread. <function>cyg_thread_suspend</function>,
+<function>cyg_thread_resume</function>, and
+<function>cyg_thread_release</function> may be called from thread or
+DSR context.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Thread termination -->
+
+ <refentry id="kernel-thread-termination">
+
+ <refmeta>
+ <refentrytitle>Thread termination</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_thread_exit</refname>
+ <refname>cyg_thread_kill</refname>
+ <refname>cyg_thread_delete</refname>
+ <refpurpose>Allow threads to terminate</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>void <function>cyg_thread_exit</function></funcdef>
+ <void>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_thread_kill</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>thread</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_thread_delete</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>thread</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1><title id="kernel-thread-termination-description">Description</title>
+ <para>
+In many embedded systems the various threads are allocated statically,
+created during initialization, and never need to terminate. This
+avoids any need for dynamic memory allocation or other resource
+management facilities. However if a given application does have a
+requirement that some threads be created dynamically, must terminate,
+and their resources such as the stack be reclaimed, then the kernel
+provides the functions <function>cyg_thread_exit</function>,
+<function>cyg_thread_kill</function>, and
+<function>cyg_thread_delete</function>.
+ </para>
+ <para>
+<function>cyg_thread_exit</function> allows a thread to terminate
+itself, thus ensuring that it will not be run again by the scheduler.
+However the <structname>cyg_thread</structname> data structure passed
+to <function>cyg_thread_create</function> remains in use, and the
+handle returned by <function>cyg_thread_create</function> remains
+valid. This allows other threads to perform certain operations on the
+terminated thread, for example to determine its stack usage via
+<function>cyg_thread_measure_stack_usage</function>. When the handle
+and <structname>cyg_thread</structname> structure are no longer
+required, <function>cyg_thread_delete</function> should be called to
+release these resources. If the stack was dynamically allocated then
+this should not be freed until after the call to
+<function>cyg_thread_delete</function>.
+ </para>
+ <para>
+Alternatively, one thread may use <function>cyg_thread_kill</function>
+on another This has much the same effect as the affected thread
+calling <function>cyg_thread_exit</function>. However killing a thread
+is generally rather dangerous because no attempt is made to unlock any
+synchronization primitives currently owned by that thread or release
+any other resources that thread may have claimed. Therefore use of
+this function should be avoided, and
+<function>cyg_thread_exit</function> is preferred.
+<function>cyg_thread_kill</function> cannot be used by a thread to
+kill itself.
+ </para>
+ <para>
+<function>cyg_thread_delete</function> should be used on a thread
+after it has exited and is no longer required. After this call the
+thread handle is no longer valid, and both the
+<structname>cyg_thread</structname> structure and the thread stack can
+be re-used or freed. If <function>cyg_thread_delete</function> is
+invoked on a thread that is still running then there is an implicit
+call to <function>cyg_thread_kill</function>. This function returns
+<literal>true</literal> if the delete was successful, and
+<literal>false</literal> if the delete did not happen. The delete
+may not happen for example if the thread being destroyed is a lower
+priority thread than the running thread, and will thus not wake up
+in order to exit until it is rescheduled.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-thread-termination-context"><title>Valid contexts</title>
+ <para>
+<function>cyg_thread_exit</function>,
+<function>cyg_thread_kill</function> and
+<function>cyg_thread_delete</function> can only be called from thread
+context.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Thread priorities -->
+
+ <refentry id="kernel-thread-priorities">
+
+ <refmeta>
+ <refentrytitle>Thread priorities</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_thread_get_priority</refname>
+ <refname>cyg_thread_get_current_priority</refname>
+ <refname>cyg_thread_set_priority</refname>
+ <refpurpose>Examine and manipulate thread priorities</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>cyg_priority_t <function>cyg_thread_get_priority</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>thread</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_priority_t <function>cyg_thread_get_current_priority</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>thread</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_thread_set_priority</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>thread</parameter></paramdef>
+ <paramdef>cyg_priority_t <parameter>priority</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1><title id="kernel-thread-priorities-description">Description</title>
+ <para>
+Typical schedulers use the concept of a thread priority to determine
+which thread should run next. Exactly what this priority consists of
+will depend on the scheduler, but a typical implementation would be a
+small integer in the range 0 to 31, with 0 being the highest priority.
+Usually only the idle thread will run at the lowest priority. The
+exact number of priority levels available depends on the
+configuration, typically the option
+<varname>CYGNUM_KERNEL_SCHED_PRIORITIES</varname>.
+ </para>
+ <para>
+<function>cyg_thread_get_priority</function> can be used to determine
+the priority of a thread, or more correctly the value last used in a
+<function>cyg_thread_set_priority</function> call or when the thread
+was first created. In some circumstances it is possible that the
+thread is actually running at a higher priority. For example, if it
+owns a mutex and priority ceilings or inheritance is being used to
+prevent priority inversion problems, then the thread's priority may
+have been boosted temporarily.
+<function>cyg_thread_get_current_priority</function> returns the real
+current priority.
+ </para>
+ <para>
+In many applications appropriate thread priorities can be determined
+and allocated statically. However, if it is necessary for a thread's
+priority to change at run-time then the
+<function>cyg_thread_set_priority</function> function provides this
+functionality.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-thread-priorities-context"><title>Valid contexts</title>
+ <para>
+<function>cyg_thread_get_priority</function> and
+<function>cyg_thread_get_current_priority</function> can be called
+from thread or DSR context, although the latter is rarely useful.
+<function>cyg_thread_set_priority</function> should also only be
+called from thread context.
+ </para>
+ </refsect1>
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Per-thread data -->
+
+ <refentry id="kernel-thread-data">
+
+ <refmeta>
+ <refentrytitle>Per-thread data</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_thread_new_data_index</refname>
+ <refname>cyg_thread_free_data_index</refname>
+ <refname>cyg_thread_get_data</refname>
+ <refname>cyg_thread_get_data_ptr</refname>
+ <refname>cyg_thread_set_data</refname>
+ <refpurpose>Manipulate per-thread data</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>cyg_ucount32 <function>cyg_thread_new_data_index</function></funcdef>
+ <void>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_thread_free_data_index</function></funcdef>
+ <paramdef>cyg_ucount32 <parameter>index</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_addrword_t <function>cyg_thread_get_data</function></funcdef>
+ <paramdef>cyg_ucount32 <parameter>index</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_addrword_t* <function>cyg_thread_get_data_ptr</function></funcdef>
+ <paramdef>cyg_ucount32 <parameter>index</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_thread_set_data</function></funcdef>
+ <paramdef>cyg_ucount32 <parameter>index</parameter></paramdef>
+ <paramdef>cyg_addrword_t <parameter>data</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1><title id="kernel-thread-data-description">Description</title>
+ <para>
+In some applications and libraries it is useful to have some data that
+is specific to each thread. For example, many of the functions in the
+POSIX compatibility package return -1 to indicate an error and store
+additional information in what appears to be a global variable
+<varname>errno</varname>. However, if multiple threads make concurrent
+calls into the POSIX library and if <varname>errno</varname> were
+really a global variable then a thread would have no way of knowing
+whether the current <varname>errno</varname> value really corresponded
+to the last POSIX call it made, or whether some other thread had run
+in the meantime and made a different POSIX call which updated the
+variable. To avoid such confusion <varname>errno</varname> is instead
+implemented as a per-thread variable, and each thread has its own
+instance.
+ </para>
+ <para>
+The support for per-thread data can be disabled via the configuration
+option <varname>CYGVAR_KERNEL_THREADS_DATA</varname>. If enabled, each
+<structname>cyg_thread</structname> data structure holds a small array
+of words. The size of this array is determined by the configuration
+option <varname>CYGNUM_KERNEL_THREADS_DATA_MAX</varname>. When a
+thread is created the array is filled with zeroes.
+ </para>
+ <para>
+If an application needs to use per-thread data then it needs an index
+into this array which has not yet been allocated to other code. This
+index can be obtained by calling
+<function>cyg_thread_new_data_index</function>, and then used in
+subsequent calls to <function>cyg_thread_get_data</function>.
+Typically indices are allocated during system initialization and
+stored in static variables. If for some reason a slot in the array is
+no longer required and can be re-used then it can be released by calling
+<function>cyg_thread_free_data_index</function>,
+ </para>
+ <para>
+The current per-thread data in a given slot can be obtained using
+<function>cyg_thread_get_data</function>. This implicitly operates on
+the current thread, and its single argument should be an index as
+returned by <function>cyg_thread_new_data_index</function>. The
+per-thread data can be updated using
+<function>cyg_thread_set_data</function>. If a particular item of
+per-thread data is needed repeatedly then
+<function>cyg_thread_get_data_ptr</function> can be used to obtain the
+address of the data, and indirecting through this pointer allows the
+data to be examined and updated efficiently.
+ </para>
+ <para>
+Some packages, for example the error and POSIX packages, have
+pre-allocated slots in the array of per-thread data. These slots
+should not normally be used by application code, and instead slots
+should be allocated during initialization by a call to
+<function>cyg_thread_new_data_index</function>. If it is known that,
+for example, the configuration will never include the POSIX
+compatibility package then application code may instead decide to
+re-use the slot allocated to that package,
+<varname>CYGNUM_KERNEL_THREADS_DATA_POSIX</varname>, but obviously
+this does involve a risk of strange and subtle bugs if the
+application's requirements ever change.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-thread-data-context"><title>Valid contexts</title>
+ <para>
+Typically <function>cyg_thread_new_data_index</function> is only
+called during initialization, but may also be called at any time in
+thread context. <function>cyg_thread_free_data_index</function>, if
+used at all, can also be called during initialization or from thread
+context. <function>cyg_thread_get_data</function>,
+<function>cyg_thread_get_data_ptr</function>, and
+<function>cyg_thread_set_data</function> may only be called from
+thread context because they implicitly operate on the current thread.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Thread destructors -->
+
+ <refentry id="kernel-thread-destructors">
+
+ <refmeta>
+ <refentrytitle>Thread destructors</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_thread_add_destructor</refname>
+ <refname>cyg_thread_rem_destructor</refname>
+ <refpurpose>Call functions on thread termination</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+typedef void (*<type>cyg_thread_destructor_fn</type>)(<type>cyg_addrword_t</type>);
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_thread_add_destructor</function></funcdef>
+ <paramdef>cyg_thread_destructor_fn <parameter>fn</parameter></paramdef>
+ <paramdef>cyg_addrword_t <parameter>data</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_thread_rem_destructor</function></funcdef>
+ <paramdef>cyg_thread_destructor_fn <parameter>fn</parameter></paramdef>
+ <paramdef>cyg_addrword_t <parameter>data</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1><title id="kernel-thread-destructors-description">Description</title>
+ <para>
+These functions are provided for cases when an application requires a
+function to be automatically called when a thread exits. This is often
+useful when, for example, freeing up resources allocated by the thread.
+ </para>
+ <para>
+This support must be enabled with the configuration option
+<varname>CYGPKG_KERNEL_THREADS_DESTRUCTORS</varname>. When enabled,
+you may register a function of type
+<type>cyg_thread_destructor_fn</type> to be called on thread
+termination using <function>cyg_thread_add_destructor</function>. You
+may also provide it with a piece of arbitrary information in the
+<parameter>data</parameter> argument which will be passed to the
+destructor function <parameter>fn</parameter> when the thread
+terminates. If you no longer wish to call a function previous
+registered with <function>cyg_thread_add_destructor</function>, you
+may call <function>cyg_thread_rem_destructor</function> with the same
+parameters used to register the destructor function. Both these
+functions return <literal>true</literal> on success and
+<literal>false</literal> on failure.
+ </para>
+ <para>
+By default, thread destructors are per-thread, which means that registering
+a destructor function only registers that function for the current thread.
+In other words, each thread has its own list of destructors.
+Alternatively you may disable the configuration option
+<varname>CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD</varname> in which
+case any registered destructors will be run when <emphasis>any</emphasis>
+threads exit. In other words, the thread destructor list is global and all
+threads have the same destructors.
+ </para>
+ <para>
+There is a limit to the number of destructors which may be registered,
+which can be controlled with the
+<varname>CYGNUM_KERNEL_THREADS_DESTRUCTORS</varname> configuration
+option. Increasing this value will very slightly increase the amount
+of memory in use, and when
+<varname>CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD</varname> is
+enabled, the amount of memory used per thread will increase. When the
+limit has been reached, <function>cyg_thread_add_destructor</function>
+will return <literal>false</literal>.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-thread-destructors-context"><title>Valid contexts</title>
+ <para>
+When <varname>CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD</varname>
+is enabled, these functions must only be called from a thread context
+as they implicitly operate on the current thread. When
+<varname>CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD</varname> is
+disabled, these functions may be called from thread or DSR context,
+or at initialization time.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Exceptions -->
+
+ <refentry id="kernel-exceptions">
+
+ <refmeta>
+ <refentrytitle>Exception handling</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_exception_set_handler</refname>
+ <refname>cyg_exception_clear_handler</refname>
+ <refname>cyg_exception_call_handler</refname>
+ <refpurpose>Handle processor exceptions</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>void <function>cyg_exception_set_handler</function></funcdef>
+ <paramdef>cyg_code_t <parameter>exception_number</parameter></paramdef>
+ <paramdef>cyg_exception_handler_t* <parameter>new_handler</parameter></paramdef>
+ <paramdef>cyg_addrword_t <parameter>new_data</parameter></paramdef>
+ <paramdef>cyg_exception_handler_t** <parameter>old_handler</parameter></paramdef>
+ <paramdef>cyg_addrword_t* <parameter>old_data</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_exception_clear_handler</function></funcdef>
+ <paramdef>cyg_code_t <parameter>exception_number</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_exception_call_handler</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>thread</parameter></paramdef>
+ <paramdef>cyg_code_t <parameter>exception_number</parameter></paramdef>
+ <paramdef>cyg_addrword_t <parameter>exception_info</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1><title id="kernel-exceptions-description">Description</title>
+ <para>
+Sometimes code attempts operations that are not legal on the current
+hardware, for example dividing by zero, or accessing data through a
+pointer that is not properly aligned. When this happens the hardware
+will raise an exception. This is very similar to an interrupt, but
+happens synchronously with code execution rather than asynchronously
+and hence can be tied to the thread that is currently running.
+ </para>
+ <para>
+The exceptions that can be raised depend very much on the hardware,
+especially the processor. The corresponding documentation should be
+consulted for more details. Alternatively the architectural HAL header
+file <filename class="headerfile">hal_intr.h</filename>, or one of the
+variant or platform header files it includes, will contain appropriate
+definitions. The details of how to handle exceptions, including
+whether or not it is possible to recover from them, also depend on the
+hardware.
+ </para>
+ <para>
+Exception handling is optional, and can be disabled through the
+configuration option <varname>CYGPKG_KERNEL_EXCEPTIONS</varname>. If
+an application has been exhaustively tested and is trusted never to
+raise a hardware exception then this option can be disabled and code
+and data sizes will be reduced somewhat. If exceptions are left
+enabled then the system will provide default handlers for the various
+exceptions, but these do nothing. Even the specific type of exception
+is ignored, so there is no point in attempting to decode this and
+distinguish between say a divide-by-zero and an unaligned access.
+If the application installs its own handlers and wants details of the
+specific exception being raised then the configuration option
+<varname>CYGSEM_KERNEL_EXCEPTIONS_DECODE</varname> has to be enabled.
+ </para>
+ <para>
+An alternative handler can be installed using
+<function>cyg_exception_set_handler</function>. This requires a code
+for the exception, a function pointer for the new exception handler,
+and a parameter to be passed to this handler. Details of the
+previously installed exception handler will be returned via the
+remaining two arguments, allowing that handler to be reinstated, or
+null pointers can be used if this information is of no interest. An
+exception handling function should take the following form:
+ </para>
+ <programlisting width=72>
+void
+my_exception_handler(cyg_addrword_t data, cyg_code_t exception, cyg_addrword_t info)
+{
+ &hellip;
+}
+ </programlisting>
+ <para>
+The data argument corresponds to the <parameter class="function">new_data</parameter>
+parameter supplied to <function>cyg_exception_set_handler</function>.
+The exception code is provided as well, in case a single handler is
+expected to support multiple exceptions. The <parameter class="function">info</parameter>
+argument will depend on the hardware and on the specific exception.
+ </para>
+ <para>
+<function>cyg_exception_clear_handler</function> can be used to
+restore the default handler, if desired. It is also possible for
+software to raise an exception and cause the current handler to be
+invoked, but generally this is useful only for testing.
+ </para>
+ <para>
+By default the system maintains a single set of global exception
+handlers. However, since exceptions occur synchronously it is
+sometimes useful to handle them on a per-thread basis, and have a
+different set of handlers for each thread. This behaviour can be
+obtained by disabling the configuration option
+<varname>CYGSEM_KERNEL_EXCEPTIONS_GLOBAL</varname>. If per-thread
+exception handlers are being used then
+<function>cyg_exception_set_handler</function> and
+<function>cyg_exception_clear_handler</function> apply to the current
+thread. Otherwise they apply to the global set of handlers.
+ </para>
+
+ <caution><para>
+In the current implementation
+<function>cyg_exception_call_handler</function> can only be used on
+the current thread. There is no support for delivering an exception to
+another thread.
+ </para></caution>
+ <note><para>
+Exceptions at the eCos kernel level refer specifically to
+hardware-related events such as unaligned accesses to memory or
+division by zero. There is no relation with other concepts that are
+also known as exceptions, for example the <literal>throw</literal> and
+<literal>catch</literal> facilities associated with C++.
+ </para></note>
+
+ </refsect1>
+
+ <refsect1 id="kernel-exceptions-context"><title>Valid contexts</title>
+ <para>
+If the system is configured with a single set of global exception
+handlers then
+<function>cyg_exception_set_handler</function> and
+<function>cyg_exception_clear_handler</function> may be called during
+initialization or from thread context. If instead per-thread exception
+handlers are being used then it is not possible to install new
+handlers during initialization because the functions operate
+implicitly on the current thread, so they can only be called from
+thread context. <function>cyg_exception_call_handler</function> should
+only be called from thread context.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Counters -->
+
+ <refentry id="kernel-counters">
+
+ <refmeta>
+ <refentrytitle>Counters</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_counter_create</refname>
+ <refname>cyg_counter_delete</refname>
+ <refname>cyg_counter_current_value</refname>
+ <refname>cyg_counter_set_value</refname>
+ <refname>cyg_counter_tick</refname>
+ <refpurpose>Count event occurrences</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>void <function>cyg_counter_create</function></funcdef>
+ <paramdef>cyg_handle_t* <parameter>handle</parameter></paramdef>
+ <paramdef>cyg_counter* <parameter>counter</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_counter_delete</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>counter</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_tick_count_t <function>cyg_counter_current_value</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>counter</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_counter_set_value</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>counter</parameter></paramdef>
+ <paramdef>cyg_tick_count_t <parameter>new_value</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_counter_tick</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>counter</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="kernel-counters-description"><title>Description</title>
+ <para>
+Kernel counters can be used to keep track of how many times a
+particular event has occurred. Usually this event is an external
+signal of some sort. The most common use of counters is in the
+implementation of clocks, but they can be useful with other event
+sources as well. Application code can attach <link
+linkend="kernel-alarms">alarms</link> to counters, causing a function
+to be called when some number of events have occurred.
+ </para>
+ <para>
+A new counter is initialized by a call to
+<function>cyg_counter_create</function>. The first argument is used to
+return a handle to the new counter which can be used for subsequent
+operations. The second argument allows the application to provide the
+memory needed for the object, thus eliminating any need for dynamic
+memory allocation within the kernel. If a counter is no longer
+required and does not have any alarms attached then
+<function>cyg_counter_delete</function> can be used to release the
+resources, allowing the <structname>cyg_counter</structname> data
+structure to be re-used.
+ </para>
+ <para>
+Initializing a counter does not automatically attach it to any source
+of events. Instead some other code needs to call
+<function>cyg_counter_tick</function> whenever a suitable event
+occurs, which will cause the counter to be incremented and may cause
+alarms to trigger. The current value associated with the counter can
+be retrieved using <function>cyg_counter_current_value</function> and
+modified with <function>cyg_counter_set_value</function>. Typically
+the latter function is only used during initialization, for example to
+set a clock to wallclock time, but it can be used to reset a counter
+if necessary. However <function>cyg_counter_set_value</function> will
+never trigger any alarms. A newly initialized counter has a starting
+value of 0.
+ </para>
+ <para>
+The kernel provides two different implementations of counters. The
+default is <varname>CYGIMP_KERNEL_COUNTERS_SINGLE_LIST</varname> which
+stores all alarms attached to the counter on a single list. This is
+simple and usually efficient. However when a tick occurs the kernel
+code has to traverse this list, typically at DSR level, so if there
+are a significant number of alarms attached to a single counter this
+will affect the system's dispatch latency. The alternative
+implementation, <varname>CYGIMP_KERNEL_COUNTERS_MULTI_LIST</varname>,
+stores each alarm in one of an array of lists such that at most one of
+the lists needs to be searched per clock tick. This involves extra
+code and data, but can improve real-time responsiveness in some
+circumstances. Another configuration option that is relevant here
+is <varname>CYGIMP_KERNEL_COUNTERS_SORT_LIST</varname>, which is
+disabled by default. This provides a trade off between doing work
+whenever a new alarm is added to a counter and doing work whenever a
+tick occurs. It is application-dependent which of these is more
+appropriate.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-counters-context"><title>Valid contexts</title>
+ <para>
+<function>cyg_counter_create</function> is typically called during
+system initialization but may also be called in thread context.
+Similarly <function>cyg_counter_delete</function> may be called during
+initialization or in thread context.
+<function>cyg_counter_current_value</function>,
+<function>cyg_counter_set_value</function> and
+<function>cyg_counter_tick</function> may be called during
+initialization or from thread or DSR context. In fact,
+<function>cyg_counter_tick</function> is usually called from inside a
+DSR in response to an external event of some sort.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Clocks -->
+
+ <refentry id="kernel-clocks">
+
+ <refmeta>
+ <refentrytitle>Clocks</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_clock_create</refname>
+ <refname>cyg_clock_delete</refname>
+ <refname>cyg_clock_to_counter</refname>
+ <refname>cyg_clock_set_resolution</refname>
+ <refname>cyg_clock_get_resolution</refname>
+ <refname>cyg_real_time_clock</refname>
+ <refname>cyg_current_time</refname>
+ <refpurpose>Provide system clocks</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>void <function>cyg_clock_create</function></funcdef>
+ <paramdef>cyg_resolution_t <parameter>resolution</parameter></paramdef>
+ <paramdef>cyg_handle_t* <parameter>handle</parameter></paramdef>
+ <paramdef>cyg_clock* <parameter>clock</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_clock_delete</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>clock</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_clock_to_counter</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>clock</parameter></paramdef>
+ <paramdef>cyg_handle_t* <parameter>counter</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_clock_set_resolution</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>clock</parameter></paramdef>
+ <paramdef>cyg_resolution_t <parameter>resolution</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_resolution_t <function>cyg_clock_get_resolution</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>clock</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_handle_t <function>cyg_real_time_clock</function></funcdef>
+ <void>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_tick_count_t <function>cyg_current_time</function></funcdef>
+ <void>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="kernel-clocks-description"><title>Description</title>
+ <para>
+In the eCos kernel clock objects are a special form of <link
+linkend="kernel-counters">counter</link> objects. They are attached to
+a specific type of hardware, clocks that generate ticks at very
+specific time intervals, whereas counters can be used with any event
+source.
+ </para>
+ <para>
+In a default configuration the kernel provides a single clock
+instance, the real-time clock. This gets used for timeslicing and for
+operations that involve a timeout, for example
+<function>cyg_semaphore_timed_wait</function>. If this functionality
+is not required it can be removed from the system using the
+configuration option <varname>CYGVAR_KERNEL_COUNTERS_CLOCK</varname>.
+Otherwise the real-time clock can be accessed by a call to
+<function>cyg_real_time_clock</function>, allowing applications to
+attach alarms, and the current counter value can be obtained using
+<function>cyg_current_time</function>.
+ </para>
+ <para>
+Applications can create and destroy additional clocks if desired,
+using <function>cyg_clock_create</function> and
+<function>cyg_clock_delete</function>. The first argument to
+<function>cyg_clock_create</function> specifies the
+<link linkend="kernel-clocks-resolution">resolution</link> this clock
+will run at. The second argument is used to return a handle for this
+clock object, and the third argument provides the kernel with the
+memory needed to hold this object. This clock will not actually tick
+by itself. Instead it is the responsibility of application code to
+initialize a suitable hardware timer to generate interrupts at the
+appropriate frequency, install an interrupt handler for this, and
+call <function>cyg_counter_tick</function> from inside the DSR.
+Associated with each clock is a kernel counter, a handle for which can
+be obtained using <function>cyg_clock_to_counter</function>.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-clocks-resolution"><title>Clock Resolutions and Ticks</title>
+ <para>
+At the kernel level all clock-related operations including delays,
+timeouts and alarms work in units of clock ticks, rather than in units
+of seconds or milliseconds. If the calling code, whether the
+application or some other package, needs to operate using units such
+as milliseconds then it has to convert from these units to clock
+ticks.
+ </para>
+ <para>
+The main reason for this is that it accurately reflects the
+hardware: calling something like <function>nanosleep</function> with a
+delay of ten nanoseconds will not work as intended on any real
+hardware because timer interrupts simply will not happen that
+frequently; instead calling <function>cyg_thread_delay</function> with
+the equivalent delay of 0 ticks gives a much clearer indication that
+the application is attempting something inappropriate for the target
+hardware. Similarly, passing a delay of five ticks to
+<function>cyg_thread_delay</function> makes it fairly obvious that
+the current thread will be suspended for somewhere between four and
+five clock periods, as opposed to passing 50000000 to
+<function>nanosleep</function> which suggests a granularity that is
+not actually provided.
+ </para>
+ <para>
+A secondary reason is that conversion between clock ticks and units
+such as milliseconds can be somewhat expensive, and whenever possible
+should be done at compile-time or by the application developer rather
+than at run-time. This saves code size and cpu cycles.
+ </para>
+ <para>
+The information needed to perform these conversions is the clock
+resolution. This is a structure with two fields, a dividend and a
+divisor, and specifies the number of nanoseconds between clock ticks.
+For example a clock that runs at 100Hz will have 10 milliseconds
+between clock ticks, or 10000000 nanoseconds. The ratio between the
+resolution's dividend and divisor will therefore be 10000000 to 1, and
+typical values for these might be 1000000000 and 100. If the clock
+runs at a different frequency, say 60Hz, the numbers could be
+1000000000 and 60 respectively. Given a delay in nanoseconds, this can
+be converted to clock ticks by multiplying with the the divisor and
+then dividing by the dividend. For example a delay of 50 milliseconds
+corresponds to 50000000 nanoseconds, and with a clock frequency of
+100Hz this can be converted to
+((50000000&nbsp;*&nbsp;100)&nbsp;/&nbsp;1000000000)&nbsp;=&nbsp;5
+clock ticks. Given the large numbers involved this arithmetic normally
+has to be done using 64-bit precision and the
+<type>long&nbsp;long</type> data type, but allows code to run on
+hardware with unusual clock frequencies.
+ </para>
+ <para>
+The default frequency for the real-time clock on any platform is
+usually about 100Hz, but platform-specific documentation should be
+consulted for this information. Usually it is possible to override
+this default by configuration options, but again this depends on the
+capabilities of the underlying hardware. The resolution for any clock
+can be obtained using <function>cyg_clock_get_resolution</function>.
+For clocks created by application code, there is also a function
+<function>cyg_clock_set_resolution</function>. This does not affect
+the underlying hardware timer in any way, it merely updates the
+information that will be returned in subsequent calls to
+<function>cyg_clock_get_resolution</function>: changing the actual
+underlying clock frequency will require appropriate manipulation of
+the timer hardware.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-clocks-context"><title>Valid contexts</title>
+ <para>
+<function>cyg_clock_create</function> is usually only called during
+system initialization (if at all), but may also be called from thread
+context. The same applies to <function>cyg_clock_delete</function>.
+The remaining functions may be called during initialization, from
+thread context, or from DSR context, although it should be noted that
+there is no locking between
+<function>cyg_clock_get_resolution</function> and
+<function>cyg_clock_set_resolution</function> so theoretically it is
+possible that the former returns an inconsistent data structure.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Alarms -->
+
+ <refentry id="kernel-alarms">
+
+ <refmeta>
+ <refentrytitle>Alarms</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_alarm_create</refname>
+ <refname>cyg_alarm_delete</refname>
+ <refname>cyg_alarm_initialize</refname>
+ <refname>cyg_alarm_enable</refname>
+ <refname>cyg_alarm_disable</refname>
+ <refpurpose>Run an alarm function when a number of events have occurred</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>void <function>cyg_alarm_create</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>counter</parameter></paramdef>
+ <paramdef>cyg_alarm_t* <parameter>alarmfn</parameter></paramdef>
+ <paramdef>cyg_addrword_t <parameter>data</parameter></paramdef>
+ <paramdef>cyg_handle_t* <parameter>handle</parameter></paramdef>
+ <paramdef>cyg_alarm* <parameter>alarm</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_alarm_delete</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>alarm</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_alarm_initialize</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>alarm</parameter></paramdef>
+ <paramdef>cyg_tick_count_t <parameter>trigger</parameter></paramdef>
+ <paramdef>cyg_tick_count_t <parameter>interval</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_alarm_enable</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>alarm</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_alarm_disable</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>alarm</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="kernel-alarms-description"><title>Description</title>
+ <para>
+Kernel alarms are used together with counters and allow for action to
+be taken when a certain number of events have occurred. If the counter
+is associated with a clock then the alarm action happens when the
+appropriate number of clock ticks have occurred, in other words after
+a certain period of time.
+ </para>
+ <para>
+Setting up an alarm involves a two-step process. First the alarm must
+be created with a call to <function>cyg_alarm_create</function>. This
+takes five arguments. The first identifies the counter to which the
+alarm should be attached. If the alarm should be attached to the
+system's real-time clock then <function>cyg_real_time_clock</function>
+and <function>cyg_clock_to_counter</function> can be used to get hold
+of the appropriate handle. The next two arguments specify the action
+to be taken when the alarm is triggered, in the form of a function
+pointer and some data. This function should take the form:
+ </para>
+ <programlisting width=72>
+void
+alarm_handler(cyg_handle_t alarm, cyg_addrword_t data)
+{
+ &hellip;
+}
+ </programlisting>
+ <para>
+The data argument passed to the alarm function corresponds to the
+third argument passed to <function>cyg_alarm_create</function>.
+The fourth argument to <function>cyg_alarm_create</function> is used
+to return a handle to the newly-created alarm object, and the final
+argument provides the memory needed for the alarm object and thus
+avoids any need for dynamic memory allocation within the kernel.
+ </para>
+ <para>
+Once an alarm has been created a further call to
+<function>cyg_alarm_initialize</function> is needed to activate it.
+The first argument specifies the alarm. The second argument indicates
+the number of events, for example clock ticks, that need to occur
+before the alarm triggers. If the third argument is 0 then the alarm
+will only trigger once. A non-zero value specifies that the alarm
+should trigger repeatedly, with an interval of the specified number of
+events.
+ </para>
+ <para>
+Alarms can be temporarily disabled and reenabled using
+<function>cyg_alarm_disable</function> and
+<function>cyg_alarm_enable</function>. Alternatively another call to
+<function>cyg_alarm_initialize</function> can be used to modify the
+behaviour of an existing alarm. If an alarm is no longer required then
+the associated resources can be released using
+<function>cyg_alarm_delete</function>.
+ </para>
+ <para>
+The alarm function is invoked when a counter tick occurs, in other
+words when there is a call to <function>cyg_counter_tick</function>,
+and will happen in the same context. If the alarm is associated with
+the system's real-time clock then this will be DSR context, following
+a clock interrupt. If the alarm is associated with some other
+application-specific counter then the details will depend on how that
+counter is updated.
+ </para>
+ <para>
+If two or more alarms are registered for precisely the same counter tick,
+the order of execution of the alarm functions is unspecified.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-alarms-context"><title>Valid contexts</title>
+ <para>
+<function>cyg_alarm_create</function>
+<function>cyg_alarm_initialize</function> is typically called during
+system initialization but may also be called in thread context. The
+same applies to <function>cyg_alarm_delete</function>.
+<function>cyg_alarm_initialize</function>,
+<function>cyg_alarm_disable</function> and
+<function>cyg_alarm_enable</function> may be called during
+initialization or from thread or DSR context, but
+<function>cyg_alarm_enable</function> and
+<function>cyg_alarm_initialize</function> may be expensive operations
+and should only be called when necessary.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Mutexes -->
+
+ <refentry id="kernel-mutexes">
+
+ <refmeta>
+ <refentrytitle>Mutexes</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_mutex_init</refname>
+ <refname>cyg_mutex_destroy</refname>
+ <refname>cyg_mutex_lock</refname>
+ <refname>cyg_mutex_trylock</refname>
+ <refname>cyg_mutex_unlock</refname>
+ <refname>cyg_mutex_release</refname>
+ <refname>cyg_mutex_set_ceiling</refname>
+ <refname>cyg_mutex_set_protocol</refname>
+ <refpurpose>Synchronization primitive</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>void <function>cyg_mutex_init</function></funcdef>
+ <paramdef>cyg_mutex_t* <parameter>mutex</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_mutex_destroy</function></funcdef>
+ <paramdef>cyg_mutex_t* <parameter>mutex</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_mutex_lock</function></funcdef>
+ <paramdef>cyg_mutex_t* <parameter>mutex</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_mutex_trylock</function></funcdef>
+ <paramdef>cyg_mutex_t* <parameter>mutex</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_mutex_unlock</function></funcdef>
+ <paramdef>cyg_mutex_t* <parameter>mutex</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_mutex_release</function></funcdef>
+ <paramdef>cyg_mutex_t* <parameter>mutex</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_mutex_set_ceiling</function></funcdef>
+ <paramdef>cyg_mutex_t* <parameter>mutex</parameter></paramdef>
+ <paramdef>cyg_priority_t <parameter>priority</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_mutex_set_protocol</function></funcdef>
+ <paramdef>cyg_mutex_t* <parameter>mutex</parameter></paramdef>
+ <paramdef>enum cyg_mutex_protocol <parameter>protocol/</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="kernel-mutexes-description"><title>Description</title>
+ <para>
+The purpose of mutexes is to let threads share resources safely. If
+two or more threads attempt to manipulate a data structure with no
+locking between them then the system may run for quite some time
+without apparent problems, but sooner or later the data structure will
+become inconsistent and the application will start behaving strangely
+and is quite likely to crash. The same can apply even when
+manipulating a single variable or some other resource. For example,
+consider:
+ </para>
+<programlisting width=72>
+static volatile int counter = 0;
+
+void
+process_event(void)
+{
+ &hellip;
+
+ counter++;
+}
+</programlisting>
+ <para>
+Assume that after a certain period of time <varname>counter</varname>
+has a value of 42, and two threads A and B running at the same
+priority call <function>process_event</function>. Typically thread A
+will read the value of <varname>counter</varname> into a register,
+increment this register to 43, and write this updated value back to
+memory. Thread B will do the same, so usually
+<varname>counter</varname> will end up with a value of 44. However if
+thread A is timesliced after reading the old value 42 but before
+writing back 43, thread B will still read back the old value and will
+also write back 43. The net result is that the counter only gets
+incremented once, not twice, which depending on the application may
+prove disastrous.
+ </para>
+ <para>
+Sections of code like the above which involve manipulating shared data
+are generally known as critical regions. Code should claim a lock
+before entering a critical region and release the lock when leaving.
+Mutexes provide an appropriate synchronization primitive for this.
+ </para>
+ <programlisting width=72>
+static volatile int counter = 0;
+static cyg_mutex_t lock;
+
+void
+process_event(void)
+{
+ &hellip;
+
+ cyg_mutex_lock(&amp;lock);
+ counter++;
+ cyg_mutex_unlock(&amp;lock);
+}
+ </programlisting>
+ <para>
+A mutex must be initialized before it can be used, by calling
+<function>cyg_mutex_init</function>. This takes a pointer to a
+<structname>cyg_mutex_t</structname> data structure which is typically
+statically allocated, and may be part of a larger data structure. If a
+mutex is no longer required and there are no threads waiting on it
+then <function>cyg_mutex_destroy</function> can be used.
+ </para>
+ <para>
+The main functions for using a mutex are
+<function>cyg_mutex_lock</function> and
+<function>cyg_mutex_unlock</function>. In normal operation
+<function>cyg_mutex_lock</function> will return success after claiming
+the mutex lock, blocking if another thread currently owns the mutex.
+However the lock operation may fail if other code calls
+<function>cyg_mutex_release</function> or
+<function>cyg_thread_release</function>, so if these functions may get
+used then it is important to check the return value. The current owner
+of a mutex should call <function>cyg_mutex_unlock</function> when a
+lock is no longer required. This operation must be performed by the
+owner, not by another thread.
+ </para>
+ <para>
+<function>cyg_mutex_trylock</function> is a variant of
+<function>cyg_mutex_lock</function> that will always return
+immediately, returning success or failure as appropriate. This
+function is rarely useful. Typical code locks a mutex just before
+entering a critical region, so if the lock cannot be claimed then
+there may be nothing else for the current thread to do. Use of this
+function may also cause a form of priority inversion if the owner
+owner runs at a lower priority, because the priority inheritance code
+will not be triggered. Instead the current thread continues running,
+preventing the owner from getting any cpu time, completing the
+critical region, and releasing the mutex.
+ </para>
+ <para>
+<function>cyg_mutex_release</function> can be used to wake up all
+threads that are currently blocked inside a call to
+<function>cyg_mutex_lock</function> for a specific mutex. These lock
+calls will return failure. The current mutex owner is not affected.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-mutexes-priority-inversion"><title>Priority Inversion</title>
+ <para>
+The use of mutexes gives rise to a problem known as priority
+inversion. In a typical scenario this requires three threads A, B, and
+C, running at high, medium and low priority respectively. Thread A and
+thread B are temporarily blocked waiting for some event, so thread C
+gets a chance to run, needs to enter a critical region, and locks
+a mutex. At this point threads A and B are woken up - the exact order
+does not matter. Thread A needs to claim the same mutex but has to
+wait until C has left the critical region and can release the mutex.
+Meanwhile thread B works on something completely different and can
+continue running without problems. Because thread C is running a lower
+priority than B it will not get a chance to run until B blocks for
+some reason, and hence thread A cannot run either. The overall effect
+is that a high-priority thread A cannot proceed because of a lower
+priority thread B, and priority inversion has occurred.
+ </para>
+ <para>
+In simple applications it may be possible to arrange the code such
+that priority inversion cannot occur, for example by ensuring that a
+given mutex is never shared by threads running at different priority
+levels. However this may not always be possible even at the
+application level. In addition mutexes may be used internally by
+underlying code, for example the memory allocation package, so careful
+analysis of the whole system would be needed to be sure that priority
+inversion cannot occur. Instead it is common practice to use one of
+two techniques: priority ceilings and priority inheritance.
+ </para>
+ <para>
+Priority ceilings involve associating a priority with each mutex.
+Usually this will match the highest priority thread that will ever
+lock the mutex. When a thread running at a lower priority makes a
+successful call to <function>cyg_mutex_lock</function> or
+<function>cyg_mutex_trylock</function> its priority will be boosted to
+that of the mutex. For example, given the previous example the
+priority associated with the mutex would be that of thread A, so for
+as long as it owns the mutex thread C will run in preference to thread
+B. When C releases the mutex its priority drops to the normal value
+again, allowing A to run and claim the mutex. Setting the
+priority for a mutex involves a call to
+<function>cyg_mutex_set_ceiling</function>, which is typically called
+during initialization. It is possible to change the ceiling
+dynamically but this will only affect subsequent lock operations, not
+the current owner of the mutex.
+ </para>
+ <para>
+Priority ceilings are very suitable for simple applications, where for
+every thread in the system it is possible to work out which mutexes
+will be accessed. For more complicated applications this may prove
+difficult, especially if thread priorities change at run-time. An
+additional problem occurs for any mutexes outside the application, for
+example used internally within eCos packages. A typical eCos package
+will be unaware of the details of the various threads in the system,
+so it will have no way of setting suitable ceilings for its internal
+mutexes. If those mutexes are not exported to application code then
+using priority ceilings may not be viable. The kernel does provide a
+configuration option
+<varname>CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_PRIORITY</varname>
+that can be used to set the default priority ceiling for all mutexes,
+which may prove sufficient.
+ </para>
+ <para>
+The alternative approach is to use priority inheritance: if a thread
+calls <function>cyg_mutex_lock</function> for a mutex that it
+currently owned by a lower-priority thread, then the owner will have
+its priority raised to that of the current thread. Often this is more
+efficient than priority ceilings because priority boosting only
+happens when necessary, not for every lock operation, and the required
+priority is determined at run-time rather than by static analysis.
+However there are complications when multiple threads running at
+different priorities try to lock a single mutex, or when the current
+owner of a mutex then tries to lock additional mutexes, and this makes
+the implementation significantly more complicated than priority
+ceilings.
+ </para>
+ <para>
+There are a number of configuration options associated with priority
+inversion. First, if after careful analysis it is known that priority
+inversion cannot arise then the component
+<function>CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL</function>
+can be disabled. More commonly this component will be enabled, and one
+of either
+<varname>CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT</varname>
+or
+<varname>CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING</varname>
+will be selected, so that one of the two protocols is available for
+all mutexes. It is possible to select multiple protocols, so that some
+mutexes can have priority ceilings while others use priority
+inheritance or no priority inversion protection at all. Obviously this
+flexibility will add to the code size and to the cost of mutex
+operations. The default for all mutexes will be controlled by
+<varname>CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT</varname>,
+and can be changed at run-time using
+<function>cyg_mutex_set_protocol</function>.
+ </para>
+ <para>
+Priority inversion problems can also occur with other synchronization
+primitives such as semaphores. For example there could be a situation
+where a high-priority thread A is waiting on a semaphore, a
+low-priority thread C needs to do just a little bit more work before
+posting the semaphore, but a medium priority thread B is running and
+preventing C from making progress. However a semaphore does not have
+the concept of an owner, so there is no way for the system to know
+that it is thread C which would next post to the semaphore. Hence
+there is no way for the system to boost the priority of C
+automatically and prevent the priority inversion. Instead situations
+like this have to be detected by application developers and
+appropriate precautions have to be taken, for example making sure that
+all the threads run at suitable priorities at all times.
+ </para>
+ <warning><para>
+The current implementation of priority inheritance within the eCos
+kernel does not handle certain exceptional circumstances completely
+correctly. Problems will only arise if a thread owns one mutex,
+then attempts to claim another mutex, and there are other threads
+attempting to lock these same mutexes. Although the system will
+continue running, the current owners of the various mutexes involved
+may not run at the priority they should. This situation never arises
+in typical code because a mutex will only be locked for a small
+critical region, and there is no need to manipulate other shared resources
+inside this region. A more complicated implementation of priority
+inheritance is possible but would add significant overhead and certain
+operations would no longer be deterministic.
+ </para></warning>
+ <warning><para>
+Support for priority ceilings and priority inheritance is not
+implemented for all schedulers. In particular neither priority
+ceilings nor priority inheritance are currently available for the
+bitmap scheduler.
+ </para></warning>
+ </refsect1>
+
+ <refsect1 id="kernel-mutexes-alternatives"><title>Alternatives</title>
+ <para>
+In nearly all circumstances, if two or more threads need to share some
+data then protecting this data with a mutex is the correct thing to
+do. Mutexes are the only primitive that combine a locking mechanism
+and protection against priority inversion problems. However this
+functionality is achieved at a cost, and in exceptional circumstances
+such as an application's most critical inner loop it may be desirable
+to use some other means of locking.
+ </para>
+ <para>
+When a critical region is very very small it is possible to lock the
+scheduler, thus ensuring that no other thread can run until the
+scheduler is unlocked again. This is achieved with calls to <link
+linkend="kernel-schedcontrol"><function>cyg_scheduler_lock</function></link>
+and <function>cyg_scheduler_unlock</function>. If the critical region
+is sufficiently small then this can actually improve both performance
+and dispatch latency because <function>cyg_mutex_lock</function> also
+locks the scheduler for a brief period of time. This approach will not
+work on SMP systems because another thread may already be running on a
+different processor and accessing the critical region.
+ </para>
+ <para>
+Another way of avoiding the use of mutexes is to make sure that all
+threads that access a particular critical region run at the same
+priority and configure the system with timeslicing disabled
+(<varname>CYGSEM_KERNEL_SCHED_TIMESLICE</varname>). Without
+timeslicing a thread can only be preempted by a higher-priority one,
+or if it performs some operation that can block. This approach
+requires that none of the operations in the critical region can block,
+so for example it is not legal to call
+<function>cyg_semaphore_wait</function>. It is also vulnerable to
+any changes in the configuration or to the various thread priorities:
+any such changes may now have unexpected side effects. It will not
+work on SMP systems.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-mutexes-recursive"><title>Recursive Mutexes</title>
+ <para>
+The implementation of mutexes within the eCos kernel does not support
+recursive locks. If a thread has locked a mutex and then attempts to
+lock the mutex again, typically as a result of some recursive call in
+a complicated call graph, then either an assertion failure will be
+reported or the thread will deadlock. This behaviour is deliberate.
+When a thread has just locked a mutex associated with some data
+structure, it can assume that that data structure is in a consistent
+state. Before unlocking the mutex again it must ensure that the data
+structure is again in a consistent state. Recursive mutexes allow a
+thread to make arbitrary changes to a data structure, then in a
+recursive call lock the mutex again while the data structure is still
+inconsistent. The net result is that code can no longer make any
+assumptions about data structure consistency, which defeats the
+purpose of using mutexes.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-mutexes-context"><title>Valid contexts</title>
+ <para>
+<function>cyg_mutex_init</function>,
+<function>cyg_mutex_set_ceiling</function> and
+<function>cyg_mutex_set_protocol</function> are normally called during
+initialization but may also be called from thread context. The
+remaining functions should only be called from thread context. Mutexes
+serve as a mutual exclusion mechanism between threads, and cannot be
+used to synchronize between threads and the interrupt handling
+subsystem. If a critical region is shared between a thread and a DSR
+then it must be protected using <link
+linkend="kernel-schedcontrol"><function>cyg_scheduler_lock</function></link>
+and <function>cyg_scheduler_unlock</function>. If a critical region is
+shared between a thread and an ISR, it must be protected by disabling
+or masking interrupts. Obviously these operations must be used with
+care because they can affect dispatch and interrupt latencies.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Condition variables -->
+
+ <refentry id="kernel-condition-variables">
+
+ <refmeta>
+ <refentrytitle>Condition Variables</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_cond_init</refname>
+ <refname>cyg_cond_destroy</refname>
+ <refname>cyg_cond_wait</refname>
+ <refname>cyg_cond_timed_wait</refname>
+ <refname>cyg_cond_signal</refname>
+ <refname>cyg_cond_broadcast</refname>
+ <refpurpose>Synchronization primitive</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>void <function>cyg_cond_init</function></funcdef>
+ <paramdef>cyg_cond_t* <parameter>cond</parameter></paramdef>
+ <paramdef>cyg_mutex_t* <parameter>mutex</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_cond_destroy</function></funcdef>
+ <paramdef>cyg_cond_t* <parameter>cond</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_cond_wait</function></funcdef>
+ <paramdef>cyg_cond_t* <parameter>cond</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_cond_timed_wait</function></funcdef>
+ <paramdef>cyg_cond_t* <parameter>cond</parameter></paramdef>
+ <paramdef>cyg_tick_count_t <parameter>abstime</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_cond_signal</function></funcdef>
+ <paramdef>cyg_cond_t* <parameter>cond</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_cond_broadcast</function></funcdef>
+ <paramdef>cyg_cond_t* <parameter>cond</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="kernel-condition-variables-description"><title>Description</title>
+
+ <para>
+Condition variables are used in conjunction with mutexes to implement
+long-term waits for some condition to become true. For example
+consider a set of functions that control access to a pool of
+resources:
+ </para>
+
+ <programlisting width=72>
+
+cyg_mutex_t res_lock;
+res_t res_pool[RES_MAX];
+int res_count = RES_MAX;
+
+void res_init(void)
+{
+ cyg_mutex_init(&amp;res_lock);
+ &lt;fill pool with resources&gt;
+}
+
+res_t res_allocate(void)
+{
+ res_t res;
+
+ cyg_mutex_lock(&amp;res_lock); // lock the mutex
+
+ if( res_count == 0 ) // check for free resource
+ res = RES_NONE; // return RES_NONE if none
+ else
+ {
+ res_count--; // allocate a resources
+ res = res_pool[res_count];
+ }
+
+ cyg_mutex_unlock(&amp;res_lock); // unlock the mutex
+
+ return res;
+}
+
+void res_free(res_t res)
+{
+ cyg_mutex_lock(&amp;res_lock); // lock the mutex
+
+ res_pool[res_count] = res; // free the resource
+ res_count++;
+
+ cyg_mutex_unlock(&amp;res_lock); // unlock the mutex
+}
+ </programlisting>
+
+ <para>
+These routines use the variable <varname>res_count</varname> to keep
+track of the resources available. If there are none then
+<function>res_allocate</function> returns <literal>RES_NONE</literal>,
+which the caller must check for and take appropriate error handling
+actions.
+ </para>
+
+ <para>
+Now suppose that we do not want to return
+<literal>RES_NONE</literal> when there are no resources, but want to
+wait for one to become available. This is where a condition variable
+can be used:
+ </para>
+
+ <programlisting width=72>
+
+cyg_mutex_t res_lock;
+cyg_cond_t res_wait;
+res_t res_pool[RES_MAX];
+int res_count = RES_MAX;
+
+void res_init(void)
+{
+ cyg_mutex_init(&amp;res_lock);
+ cyg_cond_init(&amp;res_wait, &amp;res_lock);
+ &lt;fill pool with resources&gt;
+}
+
+res_t res_allocate(void)
+{
+ res_t res;
+
+ cyg_mutex_lock(&amp;res_lock); // lock the mutex
+
+ while( res_count == 0 ) // wait for a resources
+ cyg_cond_wait(&amp;res_wait);
+
+ res_count--; // allocate a resource
+ res = res_pool[res_count];
+
+ cyg_mutex_unlock(&amp;res_lock); // unlock the mutex
+
+ return res;
+}
+
+void res_free(res_t res)
+{
+ cyg_mutex_lock(&amp;res_lock); // lock the mutex
+
+ res_pool[res_count] = res; // free the resource
+ res_count++;
+
+ cyg_cond_signal(&amp;res_wait); // wake up any waiting allocators
+
+ cyg_mutex_unlock(&amp;res_lock); // unlock the mutex
+}
+ </programlisting>
+
+ <para>
+In this version of the code, when <function>res_allocate</function>
+detects that there are no resources it calls
+<function>cyg_cond_wait</function>. This does two things: it unlocks
+the mutex, and puts the calling thread to sleep on the condition
+variable. When <function>res_free</function> is eventually called, it
+puts a resource back into the pool and calls
+<function>cyg_cond_signal</function> to wake up any thread waiting on
+the condition variable. When the waiting thread eventually gets to run again,
+it will re-lock the mutex before returning from
+<function>cyg_cond_wait</function>.
+ </para>
+
+ <para>
+There are two important things to note about the way in which this
+code works. The first is that the mutex unlock and wait in
+<function>cyg_cond_wait</function> are atomic: no other thread can run
+between the unlock and the wait. If this were not the case then a call
+to <function>res_free</function> by that thread would release the
+resource but the call to <function>cyg_cond_signal</function> would be
+lost, and the first thread would end up waiting when there were
+resources available.
+ </para>
+
+ <para>
+The second feature is that the call to
+<function>cyg_cond_wait</function> is in a <literal>while</literal>
+loop and not a simple <literal>if</literal> statement. This is because
+of the need to re-lock the mutex in <function>cyg_cond_wait</function>
+when the signalled thread reawakens. If there are other threads
+already queued to claim the lock then this thread must wait. Depending
+on the scheduler and the queue order, many other threads may have
+entered the critical section before this one gets to run. So the
+condition that it was waiting for may have been rendered false. Using
+a loop around all condition variable wait operations is the only way
+to guarantee that the condition being waited for is still true after
+waiting.
+ </para>
+
+ <para>
+Before a condition variable can be used it must be initialized with a
+call to <function>cyg_cond_init</function>. This requires two
+arguments, memory for the data structure and a pointer to an existing
+mutex. This mutex will not be initialized by
+<function>cyg_cond_init</function>, instead a separate call to
+<function>cyg_mutex_init</function> is required. If a condition
+variable is no longer required and there are no threads waiting on it
+then <function>cyg_cond_destroy</function> can be used.
+ </para>
+ <para>
+When a thread needs to wait for a condition to be satisfied it can
+call <function>cyg_cond_wait</function>. The thread must have already
+locked the mutex that was specified in the
+<function>cyg_cond_init</function> call. This mutex will be unlocked
+and the current thread will be suspended in an atomic operation. When
+some other thread performs a signal or broadcast operation the current
+thread will be woken up and automatically reclaim ownership of the mutex
+again, allowing it to examine global state and determine whether or
+not the condition is now satisfied.
+ </para>
+ <para>
+The kernel supplies a variant of this function,
+<function>cyg_cond_timed_wait</function>, which can be used to wait on
+the condition variable or until some number of clock ticks have
+occurred. The number of ticks is specified as an absolute, not
+relative tick count, and so in order to wait for a relative number of
+ticks, the return value of the <function>cyg_current_time()</function>
+function should be added to determine the absolute number of ticks.
+The mutex will always be reclaimed before
+<function>cyg_cond_timed_wait</function> returns, regardless of
+whether it was a result of a signal operation or a timeout.
+ </para>
+ <para>
+There is no <function>cyg_cond_trywait</function> function because
+this would not serve any purpose. If a thread has locked the mutex and
+determined that the condition is satisfied, it can just release the
+mutex and return. There is no need to perform any operation on the
+condition variable.
+ </para>
+ <para>
+When a thread changes shared state that may affect some other thread
+blocked on a condition variable, it should call either
+<function>cyg_cond_signal</function> or
+<function>cyg_cond_broadcast</function>. These calls do not require
+ownership of the mutex, but usually the mutex will have been claimed
+before updating the shared state. A signal operation only wakes up the
+first thread that is waiting on the condition variable, while a
+broadcast wakes up all the threads. If there are no threads waiting on
+the condition variable at the time, then the signal or broadcast will
+have no effect: past signals are not counted up or remembered in any
+way. Typically a signal should be used when all threads will check the
+same condition and at most one thread can continue running. A
+broadcast should be used if threads check slightly different
+conditions, or if the change to the global state might allow multiple
+threads to proceed.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-condition-variables-context"><title>Valid contexts</title>
+ <para>
+<function>cyg_cond_init</function> is typically called during system
+initialization but may also be called in thread context. The same
+applies to <function>cyg_cond_delete</function>.
+<function>cyg_cond_wait</function> and
+<function>cyg_cond_timedwait</function> may only be called from thread
+context since they may block. <function>cyg_cond_signal</function> and
+<function>cyg_cond_broadcast</function> may be called from thread or
+DSR context.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Semaphores -->
+
+ <refentry id="kernel-semaphores">
+
+ <refmeta>
+ <refentrytitle>Semaphores</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_semaphore_init</refname>
+ <refname>cyg_semaphore_destroy</refname>
+ <refname>cyg_semaphore_wait</refname>
+ <refname>cyg_semaphore_timed_wait</refname>
+ <refname>cyg_semaphore_post</refname>
+ <refname>cyg_semaphore_peek</refname>
+ <refpurpose>Synchronization primitive</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>void <function>cyg_semaphore_init</function></funcdef>
+ <paramdef>cyg_sem_t* <parameter>sem</parameter></paramdef>
+ <paramdef>cyg_count32 <parameter>val</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_semaphore_destroy</function></funcdef>
+ <paramdef>cyg_sem_t* <parameter>sem</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_semaphore_wait</function></funcdef>
+ <paramdef>cyg_sem_t* <parameter>sem</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_semaphore_timed_wait</function></funcdef>
+ <paramdef>cyg_sem_t* <parameter>sem</parameter></paramdef>
+ <paramdef>cyg_tick_count_t <parameter>abstime</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_semaphore_trywait</function></funcdef>
+ <paramdef>cyg_sem_t* <parameter>sem</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_semaphore_post</function></funcdef>
+ <paramdef>cyg_sem_t* <parameter>sem</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_semaphore_peek</function></funcdef>
+ <paramdef>cyg_sem_t* <parameter>sem</parameter></paramdef>
+ <paramdef>cyg_count32* <parameter>val</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="kernel-semaphores-description"><title>Description</title>
+ <para>
+Counting semaphores are a <link
+linkend="kernel-overview-synch-primitives">synchronization
+primitive</link> that allow threads to wait until an event has
+occurred. The event may be generated by a producer thread, or by a DSR
+in response to a hardware interrupt. Associated with each semaphore is
+an integer counter that keeps track of the number of events that have
+not yet been processed. If this counter is zero, an attempt by a
+consumer thread to wait on the semaphore will block until some other
+thread or a DSR posts a new event to the semaphore. If the counter is
+greater than zero then an attempt to wait on the semaphore will
+consume one event, in other words decrement the counter, and return
+immediately. Posting to a semaphore will wake up the first thread that
+is currently waiting, which will then resume inside the semaphore wait
+operation and decrement the counter again.
+ </para>
+ <para>
+Another use of semaphores is for certain forms of resource management.
+The counter would correspond to how many of a certain type of resource
+are currently available, with threads waiting on the semaphore to
+claim a resource and posting to release the resource again. In
+practice <link linkend="kernel-condition-variables">condition
+variables</link> are usually much better suited for operations like
+this.
+ </para>
+ <para>
+<function>cyg_semaphore_init</function> is used to initialize a
+semaphore. It takes two arguments, a pointer to a
+<structname>cyg_sem_t</structname> structure and an initial value for
+the counter. Note that semaphore operations, unlike some other parts
+of the kernel API, use pointers to data structures rather than
+handles. This makes it easier to embed semaphores in a larger data
+structure. The initial counter value can be any number, zero, positive
+or negative, but typically a value of zero is used to indicate that no
+events have occurred yet.
+ </para>
+ <para>
+<function>cyg_semaphore_wait</function> is used by a consumer thread
+to wait for an event. If the current counter is greater than 0, in
+other words if the event has already occurred in the past, then the
+counter will be decremented and the call will return immediately.
+Otherwise the current thread will be blocked until there is a
+<function>cyg_semaphore_post</function> call.
+ </para>
+ <para>
+<function>cyg_semaphore_post</function> is called when an event has
+occurs. This increments the counter and wakes up the first thread
+waiting on the semaphore (if any). Usually that thread will then
+continue running inside <function>cyg_semaphore_wait</function> and
+decrement the counter again. However other scenarioes are possible.
+For example the thread calling <function>cyg_semaphore_post</function>
+may be running at high priority, some other thread running at medium
+priority may be about to call <function>cyg_semaphore_wait</function>
+when it next gets a chance to run, and a low priority thread may be
+waiting on the semaphore. What will happen is that the current high
+priority thread continues running until it is descheduled for some
+reason, then the medium priority thread runs and its call to
+<function>cyg_semaphore_wait</function> succeeds immediately, and
+later on the low priority thread runs again, discovers a counter value
+of 0, and blocks until another event is posted. If there are multiple
+threads blocked on a semaphore then the configuration option
+<varname>CYGIMP_KERNEL_SCHED_SORTED_QUEUES</varname> determines which
+one will be woken up by a post operation.
+ </para>
+ <para>
+<function>cyg_semaphore_wait</function> returns a boolean. Normally it
+will block until it has successfully decremented the counter, retrying
+as necessary, and return success. However the wait operation may be
+aborted by a call to <link
+linkend="kernel-thread-control"><function>cyg_thread_release</function></link>,
+and <function>cyg_semaphore_wait</function> will then return false.
+ </para>
+ <para>
+<function>cyg_semaphore_timed_wait</function> is a variant of
+<function>cyg_semaphore_wait</function>. It can be used to wait until
+either an event has occurred or a number of clock ticks have happened.
+The number of ticks is specified as an absolute, not relative tick
+count, and so in order to wait for a relative number of ticks, the
+return value of the <function>cyg_current_time()</function> function
+should be added to determine the absolute number of ticks. The
+function returns success if the semaphore wait operation succeeded, or
+false if the operation timed out or was aborted by
+<function>cyg_thread_release</function>.
+If support for the real-time
+clock has been removed from the current configuration then this
+function will not be available.
+<function>cyg_semaphore_trywait</function> is another variant which
+will always return immediately rather than block, again returning
+success or failure. If <function>cyg_semaphore_timedwait</function>
+is given a timeout in the past, it operates like
+<function>cyg_semaphore_trywait</function>.
+ </para>
+ <para>
+<function>cyg_semaphore_peek</function> can be used to get hold of the
+current counter value. This function is rarely useful except for
+debugging purposes since the counter value may change at any time if
+some other thread or a DSR performs a semaphore operation.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-semaphores-context"><title>Valid contexts</title>
+ <para>
+<function>cyg_semaphore_init</function> is normally called during
+initialization but may also be called from thread context.
+<function>cyg_semaphore_wait</function> and
+<function>cyg_semaphore_timed_wait</function> may only be called from
+thread context because these operations may block.
+<function>cyg_semaphore_trywait</function>,
+<function>cyg_semaphore_post</function> and
+<function>cyg_semaphore_peek</function> may be called from thread or
+DSR context.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Mail boxes -->
+
+ <refentry id="kernel-mail-boxes">
+
+ <refmeta>
+ <refentrytitle>Mail boxes</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_mbox_create</refname>
+ <refname>cyg_mbox_delete</refname>
+ <refname>cyg_mbox_get</refname>
+ <refname>cyg_mbox_timed_get</refname>
+ <refname>cyg_mbox_tryget</refname>
+ <refname>cyg_mbox_peek_item</refname>
+ <refname>cyg_mbox_put</refname>
+ <refname>cyg_mbox_timed_put</refname>
+ <refname>cyg_mbox_tryput</refname>
+ <refname>cyg_mbox_peek</refname>
+ <refname>cyg_mbox_waiting_to_get</refname>
+ <refname>cyg_mbox_waiting_to_put</refname>
+ <refpurpose>Synchronization primitive</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>void <function>cyg_mbox_create</function></funcdef>
+ <paramdef>cyg_handle_t* <parameter>handle</parameter></paramdef>
+ <paramdef>cyg_mbox* <parameter>mbox</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_mbox_delete</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>mbox</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void* <function>cyg_mbox_get</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>mbox</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void* <function>cyg_mbox_timed_get</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>mbox</parameter></paramdef>
+ <paramdef>cyg_tick_count_t <parameter>abstime</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void* <function>cyg_mbox_tryget</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>mbox</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_count32 <function>cyg_mbox_peek</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>mbox</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void* <function>cyg_mbox_peek_item</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>mbox</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_mbox_put</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>mbox</parameter></paramdef>
+ <paramdef>void* <parameter>item</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_mbox_timed_put</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>mbox</parameter></paramdef>
+ <paramdef>void* <parameter>item</parameter></paramdef>
+ <paramdef>cyg_tick_count_t <parameter>abstime</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_mbox_tryput</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>mbox</parameter></paramdef>
+ <paramdef>void* <parameter>item</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_mbox_waiting_to_get</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>mbox</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_mbox_waiting_to_put</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>mbox</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="kernel-mail-boxes-description"><title>Description</title>
+ <para>
+Mail boxes are a synchronization primitive. Like semaphores they
+can be used by a consumer thread to wait until a certain event has
+occurred, but the producer also has the ability to transmit some data
+along with each event. This data, the message, is normally a pointer
+to some data structure. It is stored in the mail box itself, so the
+producer thread that generates the event and provides the data usually
+does not have to block until some consumer thread is ready to receive
+the event. However a mail box will only have a finite capacity,
+typically ten slots. Even if the system is balanced and events are
+typically consumed at least as fast as they are generated, a burst of
+events can cause the mail box to fill up and the generating thread
+will block until space is available again. This behaviour is very
+different from semaphores, where it is only necessary to maintain a
+counter and hence an overflow is unlikely.
+ </para>
+ <para>
+Before a mail box can be used it must be created with a call to
+<function>cyg_mbox_create</function>. Each mail box has a unique
+handle which will be returned via the first argument and which should
+be used for subsequent operations.
+<function>cyg_mbox_create</function> also requires an area of memory
+for the kernel structure, which is provided by the
+<structname>cyg_mbox</structname> second argument. If a mail box is
+no longer required then <function>cyg_mbox_delete</function> can be
+used. This will simply discard any messages that remain posted.
+ </para>
+ <para>
+The main function for waiting on a mail box is
+<function>cyg_mbox_get</function>. If there is a pending message
+because of a call to <function>cyg_mbox_put</function> then
+<function>cyg_mbox_get</function> will return immediately with the
+message that was put into the mail box. Otherwise this function
+will block until there is a put operation. Exceptionally the thread
+can instead be unblocked by a call to
+<function>cyg_thread_release</function>, in which case
+<function>cyg_mbox_get</function> will return a null pointer. It is
+assumed that there will never be a call to
+<function>cyg_mbox_put</function> with a null pointer, because it
+would not be possible to distinguish between that and a release
+operation. Messages are always retrieved in the order in which they
+were put into the mail box, and there is no support for messages
+with different priorities.
+ </para>
+ <para>
+There are two variants of <function>cyg_mbox_get</function>. The
+first, <function>cyg_mbox_timed_get</function> will wait until either
+a message is available or until a number of clock ticks have occurred.
+The number of ticks is specified as an absolute, not relative tick
+count, and so in order to wait for a relative number of ticks, the
+return value of the <function>cyg_current_time()</function> function
+should be added to determine the absolute number of ticks. If no
+message is posted within the timeout then a null pointer will be
+returned. <function>cyg_mbox_tryget</function> is a non-blocking
+operation which will either return a message if one is available or a
+null pointer.
+ </para>
+ <para>
+New messages are placed in the mail box by calling
+<function>cyg_mbox_put</function> or one of its variants. The main put
+function takes two arguments, a handle to the mail box and a
+pointer for the message itself. If there is a spare slot in the
+mail box then the new message can be placed there immediately, and
+if there is a waiting thread it will be woken up so that it can
+receive the message. If the mail box is currently full then
+<function>cyg_mbox_put</function> will block until there has been a
+get operation and a slot is available. The
+<function>cyg_mbox_timed_put</function> variant imposes a time limit
+on the put operation, returning false if the operation cannot be
+completed within the specified number of clock ticks and as for
+<function>cyg_mbox_timed_get</function> this is an absolute tick
+count. The <function>cyg_mbox_tryput</function> variant is
+non-blocking, returning false if there are no free slots available and
+the message cannot be posted without blocking.
+ </para>
+ <para>
+There are a further four functions available for examining the current
+state of a mailbox. The results of these functions must be used with
+care because usually the state can change at any time as a result of
+activity within other threads, but they may prove occasionally useful
+during debugging or in special situations.
+<function>cyg_mbox_peek</function> returns a count of the number of
+messages currently stored in the mail box.
+<function>cyg_mbox_peek_item</function> retrieves the first message,
+but it remains in the mail box until a get operation is performed.
+<function>cyg_mbox_waiting_to_get</function> and
+<function>cyg_mbox_waiting_to_put</function> indicate whether or not
+there are currently threads blocked in a get or a put operation on a
+given mail box.
+ </para>
+ <para>
+The number of slots in each mail box is controlled by a
+configuration option
+<varname>CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE</varname>, with a default
+value of 10. All mail boxes are the same size.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-mail-boxes-context"><title>Valid contexts</title>
+ <para>
+<function>cyg_mbox_create</function> is typically called during
+system initialization but may also be called in thread context.
+The remaining functions are normally called only during thread
+context. Of special note is <function>cyg_mbox_put</function> which
+can be a blocking operation when the mail box is full, and which
+therefore must never be called from DSR context. It is permitted to
+call <function>cyg_mbox_tryput</function>,
+<function>cyg_mbox_tryget</function>, and the information functions
+from DSR context but this is rarely useful.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Flags -->
+
+ <refentry id="kernel-flags">
+
+ <refmeta>
+ <refentrytitle>Event Flags</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_flag_init</refname>
+ <refname>cyg_flag_destroy</refname>
+ <refname>cyg_flag_setbits</refname>
+ <refname>cyg_flag_maskbits</refname>
+ <refname>cyg_flag_wait</refname>
+ <refname>cyg_flag_timed_wait</refname>
+ <refname>cyg_flag_poll</refname>
+ <refname>cyg_flag_peek</refname>
+ <refname>cyg_flag_waiting</refname>
+ <refpurpose>Synchronization primitive</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>void <function>cyg_flag_init</function></funcdef>
+ <paramdef>cyg_flag_t* <parameter>flag</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_flag_destroy</function></funcdef>
+ <paramdef>cyg_flag_t* <parameter>flag</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_flag_setbits</function></funcdef>
+ <paramdef>cyg_flag_t* <parameter>flag</parameter></paramdef>
+ <paramdef>cyg_flag_value_t <parameter>value</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_flag_maskbits</function></funcdef>
+ <paramdef>cyg_flag_t* <parameter>flag</parameter></paramdef>
+ <paramdef>cyg_flag_value_t <parameter>value</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_flag_value_t <function>cyg_flag_wait</function></funcdef>
+ <paramdef>cyg_flag_t* <parameter>flag</parameter></paramdef>
+ <paramdef>cyg_flag_value_t <parameter>pattern</parameter></paramdef>
+ <paramdef>cyg_flag_mode_t <parameter>mode</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_flag_value_t <function>cyg_flag_timed_wait</function></funcdef>
+ <paramdef>cyg_flag_t* <parameter>flag</parameter></paramdef>
+ <paramdef>cyg_flag_value_t <parameter>pattern</parameter></paramdef>
+ <paramdef>cyg_flag_mode_t <parameter>mode</parameter></paramdef>
+ <paramdef>cyg_tick_count_t <parameter>abstime</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_flag_value_t <function>cyg_flag_poll</function></funcdef>
+ <paramdef>cyg_flag_t* <parameter>flag</parameter></paramdef>
+ <paramdef>cyg_flag_value_t <parameter>pattern</parameter></paramdef>
+ <paramdef>cyg_flag_mode_t <parameter>mode</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_flag_value_t <function>cyg_flag_peek</function></funcdef>
+ <paramdef>cyg_flag_t* <parameter>flag</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_flag_waiting</function></funcdef>
+ <paramdef>cyg_flag_t* <parameter>flag</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="kernel-flags-description"><title>Description</title>
+ <para>
+Event flags allow a consumer thread to wait for one of several
+different types of event to occur. Alternatively it is possible to
+wait for some combination of events. The implementation is relatively
+straightforward. Each event flag contains a 32-bit integer.
+Application code associates these bits with specific events, so for
+example bit 0 could indicate that an I/O operation has completed and
+data is available, while bit 1 could indicate that the user has
+pressed a start button. A producer thread or a DSR can cause one or
+more of the bits to be set, and a consumer thread currently waiting
+for these bits will be woken up.
+ </para>
+ <para>
+Unlike semaphores no attempt is made to keep track of event counts. It
+does not matter whether a given event occurs once or multiple times
+before being consumed, the corresponding bit in the event flag will
+change only once. However semaphores cannot easily be used to handle
+multiple event sources. Event flags can often be used as an
+alternative to condition variables, although they cannot be used for
+completely arbitrary conditions and they only support the equivalent
+of condition variable broadcasts, not signals.
+ </para>
+ <para>
+Before an event flag can be used it must be initialized by a call to
+<function>cyg_flag_init</function>. This takes a pointer to a
+<structname>cyg_flag_t</structname> data structure, which can be part of a
+larger structure. All 32 bits in the event flag will be set to 0,
+indicating that no events have yet occurred. If an event flag is no
+longer required it can be cleaned up with a call to
+<function>cyg_flag_destroy</function>, allowing the memory for the
+<structfield>cyg_flag_t</structfield> structure to be re-used.
+ </para>
+ <para>
+A consumer thread can wait for one or more events by calling
+<function>cyg_flag_wait</function>. This takes three arguments. The
+first identifies a particular event flag. The second is some
+combination of bits, indicating which events are of interest. The
+final argument should be one of the following:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><literal>CYG_FLAG_WAITMODE_AND</literal></term>
+ <listitem><para>
+The call to <function>cyg_flag_wait</function> will block until all
+the specified event bits are set. The event flag is not cleared when
+the wait succeeds, in other words all the bits remain set.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>CYG_FLAG_WAITMODE_OR</literal></term>
+ <listitem><para>
+The call will block until at least one of the specified event bits is
+set. The event flag is not cleared on return.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>CYG_FLAG_WAITMODE_AND | CYG_FLAG_WAITMODE_CLR</literal></term>
+ <listitem><para>
+The call will block until all the specified event bits are set, and
+the entire event flag is cleared when the call succeeds. Note that
+if this mode of operation is used then a single event flag cannot be
+used to store disjoint sets of events, even though enough bits might
+be available. Instead each disjoint set of events requires its own
+event flag.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>CYG_FLAG_WAITMODE_OR | CYG_FLAG_WAITMODE_CLR</literal></term>
+ <listitem><para>
+The call will block until at least one of the specified event bits is
+set, and the entire flag is cleared when the call succeeds.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+A call to <function>cyg_flag_wait</function> normally blocks until the
+required condition is satisfied. It will return the value of the event
+flag at the point that the operation succeeded, which may be a
+superset of the requested events. If
+<function>cyg_thread_release</function> is used to unblock a thread
+that is currently in a wait operation, the
+<function>cyg_flag_wait</function> call will instead return 0.
+ </para>
+ <para>
+<function>cyg_flag_timed_wait</function> is a variant of
+<function>cyg_flag_wait</function> which adds a timeout: the wait
+operation must succeed within the specified number of ticks, or it
+will fail with a return value of 0. The number of ticks is specified
+as an absolute, not relative tick count, and so in order to wait for a
+relative number of ticks, the return value of the
+<function>cyg_current_time()</function> function should be added to
+determine the absolute number of ticks.
+<function>cyg_flag_poll</function> is a non-blocking variant: if the
+wait operation can succeed immediately it acts like
+<function>cyg_flag_wait</function>, otherwise it returns immediately
+with a value of 0.
+ </para>
+ <para>
+<function>cyg_flag_setbits</function> is called by a producer thread
+or from inside a DSR when an event occurs. The specified bits are or'd
+into the current event flag value. This may cause one or more waiting
+threads to be woken up, if their conditions are now satisfied. How many
+threads are awoken depends on the use of <literal>CYG_FLAG_WAITMODE_CLR
+</literal>. The queue of threads waiting on the flag is walked to find
+threads which now have their wake condition fulfilled. If the awoken thread
+has passed <literal>CYG_FLAG_WAITMODE_CLR</literal> the walking of the queue
+is terminated, otherwise the walk continues. Thus if no threads have passed
+<literal>CYG_FLAG_WAITMORE_CLR</literal> all threads with fulfilled
+conditions will be awoken. If <literal>CYG_FLAG_WAITMODE_CLR</literal> is
+passed by threads with fulfilled conditions, the number of awoken threads
+will depend on the order the threads are in the queue.
+ </para>
+ <para>
+<function>cyg_flag_maskbits</function> can be used to clear one or
+more bits in the event flag. This can be called from a producer when a
+particular condition is no longer satisfied, for example when the user
+is no longer pressing a particular button. It can also be used by a
+consumer thread if <literal>CYG_FLAG_WAITMODE_CLR</literal> was not
+used as part of the wait operation, to indicate that some but not all
+of the active events have been consumed. If there are multiple
+consumer threads performing wait operations without using
+<function>CYG_FLAG_WAITMODE_CLR</function> then typically some
+additional synchronization such as a mutex is needed to prevent
+multiple threads consuming the same event.
+ </para>
+ <para>
+Two additional functions are provided to query the current state of an
+event flag. <function>cyg_flag_peek</function> returns the current
+value of the event flag, and <function>cyg_flag_waiting</function> can
+be used to find out whether or not there are any threads currently
+blocked on the event flag. Both of these functions must be used with
+care because other threads may be operating on the event flag.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-flags-context"><title>Valid contexts</title>
+ <para>
+<function>cyg_flag_init</function> is typically called during system
+initialization but may also be called in thread context. The same
+applies to <function>cyg_flag_destroy</function>.
+<function>cyg_flag_wait</function> and
+<function>cyg_flag_timed_wait</function> may only be called from
+thread context. The remaining functions may be called from thread or
+DSR context.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Spinlocks -->
+
+ <refentry id="kernel-spinlocks">
+
+ <refmeta>
+ <refentrytitle>Spinlocks</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_spinlock_create</refname>
+ <refname>cyg_spinlock_destroy</refname>
+ <refname>cyg_spinlock_spin</refname>
+ <refname>cyg_spinlock_clear</refname>
+ <refname>cyg_spinlock_test</refname>
+ <refname>cyg_spinlock_spin_intsave</refname>
+ <refname>cyg_spinlock_clear_intsave</refname>
+ <refpurpose>Low-level Synchronization Primitive</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>void <function>cyg_spinlock_init</function></funcdef>
+ <paramdef>cyg_spinlock_t* <parameter>lock</parameter></paramdef>
+ <paramdef>cyg_bool_t <parameter>locked</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_spinlock_destroy</function></funcdef>
+ <paramdef>cyg_spinlock_t* <parameter>lock</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_spinlock_spin</function></funcdef>
+ <paramdef>cyg_spinlock_t* <parameter>lock</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_spinlock_clear</function></funcdef>
+ <paramdef>cyg_spinlock_t* <parameter>lock</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_spinlock_try</function></funcdef>
+ <paramdef>cyg_spinlock_t* <parameter>lock</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_bool_t <function>cyg_spinlock_test</function></funcdef>
+ <paramdef>cyg_spinlock_t* <parameter>lock</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_spinlock_spin_intsave</function></funcdef>
+ <paramdef>cyg_spinlock_t* <parameter>lock</parameter></paramdef>
+ <paramdef>cyg_addrword_t* <parameter>istate</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_spinlock_clear_intsave</function></funcdef>
+ <paramdef>cyg_spinlock_t* <parameter>lock</parameter></paramdef>
+ <paramdef>cyg_addrword_t <parameter>istate</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="kernel-spinlocks-description"><title>Description</title>
+ <para>
+Spinlocks provide an additional synchronization primitive for
+applications running on SMP systems. They operate at a lower level
+than the other primitives such as mutexes, and for most purposes the
+higher-level primitives should be preferred. However there are some
+circumstances where a spinlock is appropriate, especially when
+interrupt handlers and threads need to share access to hardware, and
+on SMP systems the kernel implementation itself depends on spinlocks.
+ </para>
+ <para>
+Essentially a spinlock is just a simple flag. When code tries to claim
+a spinlock it checks whether or not the flag is already set. If not
+then the flag is set and the operation succeeds immediately. The exact
+implementation of this is hardware-specific, for example it may use a
+test-and-set instruction to guarantee the desired behaviour even if
+several processors try to access the spinlock at the exact same time.
+If it is not possible to claim a spinlock then the current thead spins
+in a tight loop, repeatedly checking the flag until it is clear. This
+behaviour is very different from other synchronization primitives such
+as mutexes, where contention would cause a thread to be suspended. The
+assumption is that a spinlock will only be held for a very short time.
+If claiming a spinlock could cause the current thread to be suspended
+then spinlocks could not be used inside interrupt handlers, which is
+not acceptable.
+ </para>
+ <para>
+This does impose a constraint on any code which uses spinlocks.
+Specifically it is important that spinlocks are held only for a short
+period of time, typically just some dozens of instructions. Otherwise
+another processor could be blocked on the spinlock for a long time,
+unable to do any useful work. It is also important that a thread which
+owns a spinlock does not get preempted because that might cause
+another processor to spin for a whole timeslice period, or longer. One
+way of achieving this is to disable interrupts on the current
+processor, and the function
+<function>cyg_spinlock_spin_intsave</function> is provided to
+facilitate this.
+ </para>
+ <para>
+Spinlocks should not be used on single-processor systems. Consider a
+high priority thread which attempts to claim a spinlock already held
+by a lower priority thread: it will just loop forever and the lower
+priority thread will never get another chance to run and release the
+spinlock. Even if the two threads were running at the same priority,
+the one attempting to claim the spinlock would spin until it was
+timesliced and a lot of cpu time would be wasted. If an interrupt
+handler tried to claim a spinlock owned by a thread, the interrupt
+handler would loop forever. Therefore spinlocks are only appropriate
+for SMP systems where the current owner of a spinlock can continue
+running on a different processor.
+ </para>
+ <para>
+Before a spinlock can be used it must be initialized by a call to
+<function>cyg_spinlock_init</function>. This takes two arguments, a
+pointer to a <function>cyg_spinlock_t</function> data structure, and
+a flag to specify whether the spinlock starts off locked or unlocked.
+If a spinlock is no longer required then it can be destroyed by a call
+to <function>cyg_spinlock_destroy</function>.
+ </para>
+ <para>
+There are two routines for claiming a spinlock:
+<function>cyg_spinlock_spin</function> and
+<function>cyg_spinlock_spin_intsave</function>. The former can be used
+when it is known the current code will not be preempted, for example
+because it is running in an interrupt handler or because interrupts
+are disabled. The latter will disable interrupts in addition to
+claiming the spinlock, so is safe to use in all circumstances. The
+previous interrupt state is returned via the second argument, and
+should be used in a subsequent call to
+<function>cyg_spinlock_clear_intsave</function>.
+ </para>
+ <para>
+Similarly there are two routines for releasing a spinlock:
+<function>cyg_spinlock_clear</function> and
+<function>cyg_spinlock_clear_intsave</function>. Typically
+the former will be used if the spinlock was claimed by a call to
+<function>cyg_spinlock_spin</function>, and the latter when
+<function>cyg_spinlock_intsave</function> was used.
+ </para>
+ <para>
+There are two additional routines.
+<function>cyg_spinlock_try</function> is a non-blocking version of
+<function>cyg_spinlock_spin</function>: if possible the lock will be
+claimed and the function will return <literal>true</literal>; otherwise the function
+will return immediately with failure.
+<function>cyg_spinlock_test</function> can be used to find out whether
+or not the spinlock is currently locked. This function must be used
+with care because, especially on a multiprocessor system, the state of
+the spinlock can change at any time.
+ </para>
+ <para>
+Spinlocks should only be held for a short period of time, and
+attempting to claim a spinlock will never cause a thread to be
+suspended. This means that there is no need to worry about priority
+inversion problems, and concepts such as priority ceilings and
+inheritance do not apply.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-spinlocks-context"><title>Valid contexts</title>
+ <para>
+All of the spinlock functions can be called from any context,
+including ISR and DSR context. Typically
+<function>cyg_spinlock_init</function> is only called during system
+initialization.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Scheduler control -->
+
+ <refentry id="kernel-schedcontrol">
+
+ <refmeta>
+ <refentrytitle>Scheduler Control</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_scheduler_start</refname>
+ <refname>cyg_scheduler_lock</refname>
+ <refname>cyg_scheduler_unlock</refname>
+ <refname>cyg_scheduler_safe_lock</refname>
+ <refname>cyg_scheduler_read_lock</refname>
+ <refpurpose>Control the state of the scheduler</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>void <function>cyg_scheduler_start</function></funcdef>
+ <void>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_scheduler_lock</function></funcdef>
+ <void>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_scheduler_unlock</function></funcdef>
+ <void>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_ucount32 <function>cyg_scheduler_read_lock</function></funcdef>
+ <void>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="kernel-schedcontrol-description"><title>Description</title>
+ <para>
+<function>cyg_scheduler_start</function> should only be called once,
+to mark the end of system initialization. In typical configurations it
+is called automatically by the system startup, but some applications
+may bypass the standard startup in which case
+<function>cyg_scheduler_start</function> will have to be called
+explicitly. The call will enable system interrupts, allowing I/O
+operations to commence. Then the scheduler will be invoked and control
+will be transferred to the highest priority runnable thread. The call
+will never return.
+ </para>
+ <para>
+The various data structures inside the eCos kernel must be protected
+against concurrent updates. Consider a call to
+<function>cyg_semaphore_post</function> which causes a thread to be
+woken up: the semaphore data structure must be updated to remove the
+thread from its queue; the scheduler data structure must also be
+updated to mark the thread as runnable; it is possible that the newly
+runnable thread has a higher priority than the current one, in which
+case preemption is required. If in the middle of the semaphore post
+call an interrupt occurred and the interrupt handler tried to
+manipulate the same data structures, for example by making another
+thread runnable, then it is likely that the structures will be left in
+an inconsistent state and the system will fail.
+ </para>
+ <para>
+To prevent such problems the kernel contains a special lock known as
+the scheduler lock. A typical kernel function such as
+<function>cyg_semaphore_post</function> will claim the scheduler lock,
+do all its manipulation of kernel data structures, and then release
+the scheduler lock. The current thread cannot be preempted while it
+holds the scheduler lock. If an interrupt occurs and a DSR is supposed
+to run to signal that some event has occurred, that DSR is postponed
+until the scheduler unlock operation. This prevents concurrent updates
+of kernel data structures.
+ </para>
+ <para>
+The kernel exports three routines for manipulating the scheduler lock.
+<function>cyg_scheduler_lock</function> can be called to claim the
+lock. On return it is guaranteed that the current thread will not be
+preempted, and that no other code is manipulating any kernel data
+structures. <function>cyg_scheduler_unlock</function> can be used to
+release the lock, which may cause the current thread to be preempted.
+<function>cyg_scheduler_read_lock</function> can be used to query the
+current state of the scheduler lock. This function should never be
+needed because well-written code should always know whether or not the
+scheduler is currently locked, but may prove useful during debugging.
+ </para>
+ <para>
+The implementation of the scheduler lock involves a simple counter.
+Code can call <function>cyg_scheduler_lock</function> multiple times,
+causing the counter to be incremented each time, as long as
+<function>cyg_scheduler_unlock</function> is called the same number of
+times. This behaviour is different from mutexes where an attempt by a
+thread to lock a mutex multiple times will result in deadlock or an
+assertion failure.
+ </para>
+ <para>
+Typical application code should not use the scheduler lock. Instead
+other synchronization primitives such as mutexes and semaphores should
+be used. While the scheduler is locked the current thread cannot be
+preempted, so any higher priority threads will not be able to run.
+Also no DSRs can run, so device drivers may not be able to service
+I/O requests. However there is one situation where locking the
+scheduler is appropriate: if some data structure needs to be shared
+between an application thread and a DSR associated with some interrupt
+source, the thread can use the scheduler lock to prevent concurrent
+invocations of the DSR and then safely manipulate the structure. It is
+desirable that the scheduler lock is held for only a short period of
+time, typically some tens of instructions. In exceptional cases there
+may also be some performance-critical code where it is more
+appropriate to use the scheduler lock rather than a mutex, because the
+former is more efficient.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-schedcontrol-context"><title>Valid contexts</title>
+ <para>
+<function>cyg_scheduler_start</function> can only be called during
+system initialization, since it marks the end of that phase. The
+remaining functions may be called from thread or DSR context. Locking
+the scheduler from inside the DSR has no practical effect because the
+lock is claimed automatically by the interrupt subsystem before
+running DSRs, but allows functions to be shared between normal thread
+code and DSRs.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ Interrupt handling -->
+
+ <refentry id="kernel-interrupts">
+
+ <refmeta>
+ <refentrytitle>Interrupt Handling</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cyg_interrupt_create</refname>
+ <refname>cyg_interrupt_delete</refname>
+ <refname>cyg_interrupt_attach</refname>
+ <refname>cyg_interrupt_detach</refname>
+ <refname>cyg_interrupt_configure</refname>
+ <refname>cyg_interrupt_acknowledge</refname>
+ <refname>cyg_interrupt_enable</refname>
+ <refname>cyg_interrupt_disable</refname>
+ <refname>cyg_interrupt_mask</refname>
+ <refname>cyg_interrupt_mask_intunsafe</refname>
+ <refname>cyg_interrupt_unmask</refname>
+ <refname>cyg_interrupt_unmask_intunsafe</refname>
+ <refname>cyg_interrupt_set_cpu</refname>
+ <refname>cyg_interrupt_get_cpu</refname>
+ <refname>cyg_interrupt_get_vsr</refname>
+ <refname>cyg_interrupt_set_vsr</refname>
+ <refpurpose>Manage interrupt handlers</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcsynopsisinfo>
+#include &lt;cyg/kernel/kapi.h&gt;
+ </funcsynopsisinfo>
+ <funcprototype>
+ <funcdef>void <function>cyg_interrupt_create</function></funcdef>
+ <paramdef>cyg_vector_t <parameter>vector</parameter></paramdef>
+ <paramdef>cyg_priority_t <parameter>priority</parameter></paramdef>
+ <paramdef>cyg_addrword_t <parameter>data</parameter></paramdef>
+ <paramdef>cyg_ISR_t* <parameter>isr</parameter></paramdef>
+ <paramdef>cyg_DSR_t* <parameter>dsr</parameter></paramdef>
+ <paramdef>cyg_handle_t* <parameter>handle</parameter></paramdef>
+ <paramdef>cyg_interrupt* <parameter>intr</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_interrupt_delete</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>interrupt</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_interrupt_attach</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>interrupt</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_interrupt_detach</function></funcdef>
+ <paramdef>cyg_handle_t <parameter>interrupt</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_interrupt_configure</function></funcdef>
+ <paramdef>cyg_vector_t <parameter>vector</parameter></paramdef>
+ <paramdef>cyg_bool_t <parameter>level</parameter></paramdef>
+ <paramdef>cyg_bool_t <parameter>up</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_interrupt_acknowledge</function></funcdef>
+ <paramdef>cyg_vector_t <parameter>vector</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_interrupt_disable</function></funcdef>
+ <void>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_interrupt_enable</function></funcdef>
+ <void>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_interrupt_mask</function></funcdef>
+ <paramdef>cyg_vector_t <parameter>vector</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_interrupt_mask_intunsafe</function></funcdef>
+ <paramdef>cyg_vector_t <parameter>vector</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_interrupt_unmask</function></funcdef>
+ <paramdef>cyg_vector_t <parameter>vector</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_interrupt_unmask_intunsafe</function></funcdef>
+ <paramdef>cyg_vector_t <parameter>vector</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_interrupt_set_cpu</function></funcdef>
+ <paramdef>cyg_vector_t <parameter>vector</parameter></paramdef>
+ <paramdef>cyg_cpu_t <parameter>cpu</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>cyg_cpu_t <function>cyg_interrupt_get_cpu</function></funcdef>
+ <paramdef>cyg_vector_t <parameter>vector</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_interrupt_get_vsr</function></funcdef>
+ <paramdef>cyg_vector_t <parameter>vector</parameter></paramdef>
+ <paramdef>cyg_VSR_t** <parameter>vsr</parameter></paramdef>
+ </funcprototype>
+ <funcprototype>
+ <funcdef>void <function>cyg_interrupt_set_vsr</function></funcdef>
+ <paramdef>cyg_vector_t <parameter>vector</parameter></paramdef>
+ <paramdef>cyg_VSR_t* <parameter>vsr</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="kernel-interrupts-description"><title>Description</title>
+ <para>
+The kernel provides an interface for installing interrupt handlers and
+controlling when interrupts occur. This functionality is used
+primarily by eCos device drivers and by any application code that
+interacts directly with hardware. However in most cases it is better
+to avoid using this kernel functionality directly, and instead the
+device driver API provided by the common HAL package should be used.
+Use of the kernel package is optional, and some applications such as
+RedBoot work with no need for multiple threads or synchronization
+primitives. Any code which calls the kernel directly rather than the
+device driver API will not function in such a configuration. When the
+kernel package is present the device driver API is implemented as
+<literal>#define</literal>'s to the equivalent kernel calls, otherwise
+it is implemented inside the common HAL package. The latter
+implementation can be simpler than the kernel one because there is no
+need to consider thread preemption and similar issues.
+ </para>
+ <para>
+The exact details of interrupt handling vary widely between
+architectures. The functionality provided by the kernel abstracts away
+from many of the details of the underlying hardware, thus simplifying
+application development. However this is not always successful. For
+example, if some hardware does not provide any support at all for
+masking specific interrupts then calling
+<function>cyg_interrupt_mask</function> may not behave as intended:
+instead of masking just the one interrupt source it might disable all
+interrupts, because that is as close to the desired behaviour as is
+possible given the hardware restrictions. Another possibility is that
+masking a given interrupt source also affects all lower-priority
+interrupts, but still allows higher-priority ones. The documentation
+for the appropriate HAL packages should be consulted for more
+information about exactly how interrupts are handled on any given
+hardware. The HAL header files will also contain useful information.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-interrupts-handlers"><title>Interrupt Handlers</title>
+ <para>
+Interrupt handlers are created by a call to
+<function>cyg_interrupt_create</function>. This takes the following
+arguments:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term>cyg_vector_t <parameter>vector</parameter></term>
+ <listitem><para>
+The interrupt vector, a small integer, identifies the specific
+interrupt source. The appropriate hardware documentation or HAL header
+files should be consulted for details of which vector corresponds to
+which device.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>cyg_priority_t <parameter>priority</parameter></term>
+ <listitem><para>
+Some hardware may support interrupt priorities, where a low priority
+interrupt handler can in turn be interrupted by a higher priority one.
+Again hardware-specific documentation should be consulted for details
+about what the valid interrupt priority levels are.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>cyg_addrword_t <parameter>data</parameter></term>
+ <listitem><para>
+When an interrupt occurs eCos will first call the associated
+interrupt service routine or ISR, then optionally a deferred service
+routine or DSR. The <parameter>data</parameter> argument to
+<function>cyg_interrupt_create</function> will be passed to both these
+functions. Typically it will be a pointer to some data structure.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>cyg_ISR_t <parameter>isr</parameter></term>
+ <listitem><para>
+When an interrupt occurs the hardware will transfer control to the
+appropriate vector service routine or VSR, which is usually provided
+by eCos. This performs any appropriate processing, for example to work
+out exactly which interrupt occurred, and then as quickly as possible
+transfers control the installed ISR. An ISR is a C function which
+takes the following form:
+ </para>
+ <programlisting width=72>
+cyg_uint32
+isr_function(cyg_vector_t vector, cyg_addrword_t data)
+{
+ cyg_bool_t dsr_required = 0;
+
+ &hellip;
+
+ return dsr_required ? CYG_ISR_CALL_DSR : CYG_ISR_HANDLED;
+}
+ </programlisting>
+ <para>
+The first argument identifies the particular interrupt source,
+especially useful if there multiple instances of a given device and a
+single ISR can be used for several different interrupt vectors. The
+second argument is the <parameter>data</parameter> field passed to
+<function>cyg_interrupt_create</function>, usually a pointer to some
+data structure. The exact conditions under which an ISR runs will
+depend partly on the hardware and partly on configuration options.
+Interrupts may currently be disabled globally, especially if the
+hardware does not support interrupt priorities. Alternatively
+interrupts may be enabled such that higher priority interrupts are
+allowed through. The ISR may be running on a separate interrupt stack,
+or on the stack of whichever thread was running at the time the
+interrupt happened.
+ </para>
+ <para>
+A typical ISR will do as little work as possible, just enough to meet
+the needs of the hardware and then acknowledge the interrupt by
+calling <function>cyg_interrupt_acknowledge</function>. This ensures
+that interrupts will be quickly reenabled, so higher priority devices
+can be serviced. For some applications there may be one device which
+is especially important and whose ISR can take much longer than
+normal. However eCos device drivers usually will not assume that they
+are especially important, so their ISRs will be as short as possible.
+ </para>
+ <para>
+The return value of an ISR is normally one of
+<literal>CYG_ISR_CALL_DSR</literal> or
+<literal>CYG_ISR_HANDLED</literal>. The former indicates that further
+processing is required at DSR level, and the interrupt handler's DSR
+will be run as soon as possible. The latter indicates that the
+interrupt has been fully handled and no further effort is required.
+ </para>
+ <para>
+An ISR is allowed to make very few kernel calls. It can manipulate the
+interrupt mask, and on SMP systems it can use spinlocks. However an
+ISR must not make higher-level kernel calls such as posting to a
+semaphore, instead any such calls must be made from the DSR. This
+avoids having to disable interrupts throughout the kernel and thus
+improves interrupt latency.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>cyg_DSR_t <parameter>dsr</parameter></term>
+ <listitem><para>
+If an interrupt has occurred and the ISR has returned a value
+<literal>CYG_ISR_CALL_DSR</literal>, the system will call the
+deferred service routine or DSR associated with this interrupt
+handler. If the scheduler is not currently locked then the DSR will
+run immediately. However if the interrupted thread was in the middle
+of a kernel call and had locked the scheduler, then the DSR will be
+deferred until the scheduler is again unlocked. This allows the
+DSR to make certain kernel calls safely, for example posting to a
+semaphore or signalling a condition variable. A DSR is a C function
+which takes the following form:
+ </para>
+ <programlisting width=72>
+void
+dsr_function(cyg_vector_t vector,
+ cyg_ucount32 count,
+ cyg_addrword_t data)
+{
+}
+ </programlisting>
+ <para>
+The first argument identifies the specific interrupt that has caused
+the DSR to run. The second argument indicates the number of these
+interrupts that have occurred and for which the ISR requested a DSR.
+Usually this will be <literal>1</literal>, unless the system is
+suffering from a very heavy load. The third argument is the
+<parameter>data</parameter> field passed to
+<function>cyg_interrupt_create</function>.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>cyg_handle_t* <parameter>handle</parameter></term>
+ <listitem><para>
+The kernel will return a handle to the newly created interrupt handler
+via this argument. Subsequent operations on the interrupt handler such
+as attaching it to the interrupt source will use this handle.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>cyg_interrupt* <parameter>intr</parameter></term>
+ <listitem><para>
+This provides the kernel with an area of memory for holding this
+interrupt handler and associated data.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+The call to <function>cyg_interrupt_create</function> simply fills in
+a kernel data structure. A typical next step is to call
+<function>cyg_interrupt_attach</function> using the handle returned by
+the create operation. This makes it possible to have several different
+interrupt handlers for a given vector, attaching whichever one is
+currently appropriate. Replacing an interrupt handler requires a call
+to <function>cyg_interrupt_detach</function>, followed by another call
+to <function>cyg_interrupt_attach</function> for the replacement
+handler. <function>cyg_interrupt_delete</function> can be used if an
+interrupt handler is no longer required.
+ </para>
+ <para>
+Some hardware may allow for further control over specific interrupts,
+for example whether an interrupt is level or edge triggered. Any such
+hardware functionality can be accessed using
+<function>cyg_interrupt_configure</function>: the
+<parameter>level</parameter> argument selects between level versus
+edge triggered; the <parameter>up</parameter> argument selects between
+high and low level, or between rising and falling edges.
+ </para>
+ <para>
+Usually interrupt handlers are created, attached and configured during
+system initialization, while global interrupts are still disabled. On
+most hardware it will also be necessary to call
+<function>cyg_interrupt_unmask</function>, since the sensible default
+for interrupt masking is to ignore any interrupts for which no handler
+is installed.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-interrupts-enable"><title>Controlling Interrupts</title>
+ <para>
+eCos provides two ways of controlling whether or not interrupts
+happen. It is possible to disable and reenable all interrupts
+globally, using <function>cyg_interrupt_disable</function> and
+<function>cyg_interrupt_enable</function>. Typically this works by
+manipulating state inside the cpu itself, for example setting a flag
+in a status register or executing special instructions. Alternatively
+it may be possible to mask a specific interrupt source by writing to
+one or to several interrupt mask registers. Hardware-specific
+documentation should be consulted for the exact details of how
+interrupt masking works, because a full implementation is not possible
+on all hardware.
+ </para>
+ <para>
+The primary use for these functions is to allow data to be shared
+between ISRs and other code such as DSRs or threads. If both a thread
+and an ISR need to manipulate either a data structure or the hardware
+itself, there is a possible conflict if an interrupt happens just when
+the thread is doing such manipulation. Problems can be avoided by the
+thread either disabling or masking interrupts during the critical
+region. If this critical region requires only a few instructions then
+usually it is more efficient to disable interrupts. For larger
+critical regions it may be more appropriate to use interrupt masking,
+allowing other interrupts to occur. There are other uses for interrupt
+masking. For example if a device is not currently being used by the
+application then it may be desirable to mask all interrupts generated
+by that device.
+ </para>
+ <para>
+There are two functions for masking a specific interrupt source,
+<function>cyg_interrupt_mask</function> and
+<function>cyg_interrupt_mask_intunsafe</function>. On typical hardware
+masking an interrupt is not an atomic operation, so if two threads
+were to perform interrupt masking operations at the same time there
+could be problems. <function>cyg_interrupt_mask</function> disables
+all interrupts while it manipulates the interrupt mask. In situations
+where interrupts are already know to be disabled,
+<function>cyg_interrupt_mask_intunsafe</function> can be used
+instead. There are matching functions
+<function>cyg_interrupt_unmask</function> and
+<function>cyg_interrupt_unmask_intsafe</function>.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-interrupts-smp"><title>SMP Support</title>
+ <para>
+On SMP systems the kernel provides an additional two functions related
+to interrupt handling. <function>cyg_interrupt_set_cpu</function>
+specifies that a particular hardware interrupt should always be
+handled on one specific processor in the system. In other words when
+the interrupt triggers it is only that processor which detects it, and
+it is only on that processor that the VSR and ISR will run. If a DSR
+is requested then it will also run on the same CPU. The
+function <function>cyg_interrupt_get_cpu</function> can be used to
+find out which interrupts are handled on which processor.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-interrupts-vsr"><title>VSR Support</title>
+ <para>
+When an interrupt occurs the hardware will transfer control to a piece
+of code known as the VSR, or Vector Service Routine. By default this
+code is provided by eCos. Usually it is written in assembler, but on
+some architectures it may be possible to implement VSRs in C by
+specifying an interrupt attribute. Compiler documentation should be
+consulted for more information on this. The default eCos VSR will work
+out which ISR function should process the interrupt, and set up a C
+environment suitable for this ISR.
+ </para>
+ <para>
+For some applications it may be desirable to replace the default eCos
+VSR and handle some interrupts directly. This minimizes interrupt
+latency, but it requires application developers to program at a lower
+level. Usually the best way to write a custom VSR is to copy the
+existing one supplied by eCos and then make appropriate modifications.
+The function <function>cyg_interrupt_get_vsr</function> can be used to
+get hold of the current VSR for a given interrupt vector, allowing it
+to be restored if the custom VSR is no longer required.
+<function>cyg_interrupt_set_vsr</function> can be used to install a
+replacement VSR. Usually the <parameter>vsr</parameter> argument will
+correspond to an exported label in an assembler source file.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-interrupts-context"><title>Valid contexts</title>
+ <para>
+In a typical configuration interrupt handlers are created and attached
+during system initialization, and never detached or deleted. However
+it is possible to perform these operations at thread level, if
+desired. Similarly <function>cyg_interrupt_configure</function>,
+<function>cyg_interrupt_set_vsr</function>, and
+<function>cyg_interrupt_set_cpu</function> are usually called only
+during system initialization, but on typical hardware may be called at
+any time. <function>cyg_interrupt_get_vsr</function> and
+<function>cyg_interrupt_get_cpu</function> may be called at any time.
+ </para>
+ <para>
+The functions for enabling, disabling, masking and unmasking
+interrupts can be called in any context, when appropriate. It is the
+responsibility of application developers to determine when the use of
+these functions is appropriate.
+ </para>
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+<!-- {{{ tm_basic -->
+
+ <refentry id="kernel-characterization">
+
+ <refmeta>
+ <refentrytitle>Kernel Real-time Characterization</refentrytitle>
+ </refmeta>
+ <refnamediv>
+ <refname>tm_basic</refname>
+ <refpurpose>Measure the performance of the eCos kernel</refpurpose>
+ </refnamediv>
+
+ <refsect1 id="kernel-characterization-description">
+ <title>Description</title>
+ <para>
+When building a real-time system, care must be taken to ensure that
+the system will be able to perform properly within the constraints of
+that system. One of these constraints may be how fast certain
+operations can be performed. Another might be how deterministic the
+overall behavior of the system is. Lastly the memory footprint (size)
+and unit cost may be important.
+ </para>
+ <para>
+One of the major problems encountered while evaluating a system will
+be how to compare it with possible alternatives. Most manufacturers of
+real-time systems publish performance numbers, ostensibly so that
+users can compare the different offerings. However, what these numbers
+mean and how they were gathered is often not clear. The values are
+typically measured on a particular piece of hardware, so in order to
+truly compare, one must obtain measurements for exactly the same set
+of hardware that were gathered in a similar fashion.
+ </para>
+ <para>
+Two major items need to be present in any given set of measurements.
+First, the raw values for the various operations; these are typically
+quite easy to measure and will be available for most systems. Second,
+the determinacy of the numbers; in other words how much the value
+might change depending on other factors within the system. This value
+is affected by a number of factors: how long interrupts might be
+masked, whether or not the function can be interrupted, even very
+hardware-specific effects such as cache locality and pipeline usage.
+It is very difficult to measure the determinacy of any given
+operation, but that determinacy is fundamentally important to proper
+overall characterization of a system.
+ </para>
+ <para>
+In the discussion and numbers that follow, three key measurements are
+provided. The first measurement is an estimate of the interrupt
+latency: this is the length of time from when a hardware interrupt
+occurs until its Interrupt Service Routine (ISR) is called. The second
+measurement is an estimate of overall interrupt overhead: this is the
+length of time average interrupt processing takes, as measured by the
+real-time clock interrupt (other interrupt sources will certainly take
+a different amount of time, but this data cannot be easily gathered).
+The third measurement consists of the timings for the various kernel
+primitives.
+ </para>
+ </refsect1>
+ <refsect1 id="kernel-characterization-methodology">
+ <title>Methodology</title>
+ <para>
+Key operations in the kernel were measured by using a simple test
+program which exercises the various kernel primitive operations. A
+hardware timer, normally the one used to drive the real-time clock,
+was used for these measurements. In most cases this timer can be read
+with quite high resolution, typically in the range of a few
+microseconds. For each measurement, the operation was repeated a
+number of times. Time stamps were obtained directly before and after
+the operation was performed. The data gathered for the entire set of
+operations was then analyzed, generating average (mean), maximum and
+minimum values. The sample variance (a measure of how close most
+samples are to the mean) was also calculated. The cost of obtaining
+the real-time clock timer values was also measured, and was subtracted
+from all other times.
+ </para>
+ <para>
+Most kernel functions can be measured separately. In each case, a
+reasonable number of iterations are performed. Where the test case
+involves a kernel object, for example creating a task, each iteration
+is performed on a different object. There is also a set of tests which
+measures the interactions between multiple tasks and certain kernel
+primitives. Most functions are tested in such a way as to determine
+the variations introduced by varying numbers of objects in the system.
+For example, the mailbox tests measure the cost of a 'peek' operation
+when the mailbox is empty, has a single item, and has multiple items
+present. In this way, any effects of the state of the object or how
+many items it contains can be determined.
+ </para>
+ <para>
+There are a few things to consider about these measurements. Firstly,
+they are quite micro in scale and only measure the operation in
+question. These measurements do not adequately describe how the
+timings would be perturbed in a real system with multiple interrupting
+sources. Secondly, the possible aberration incurred by the real-time
+clock (system heartbeat tick) is explicitly avoided. Virtually all
+kernel functions have been designed to be interruptible. Thus the
+times presented are typical, but best case, since any particular
+function may be interrupted by the clock tick processing. This number
+is explicitly calculated so that the value may be included in any
+deadline calculations required by the end user. Lastly, the reported
+measurements were obtained from a system built with all options at
+their default values. Kernel instrumentation and asserts are also
+disabled for these measurements. Any number of configuration options
+can change the measured results, sometimes quite dramatically. For
+example, mutexes are using priority inheritance in these measurements.
+The numbers will change if the system is built with priority
+inheritance on mutex variables turned off.
+ </para>
+ <para>
+The final value that is measured is an estimate of interrupt latency.
+This particular value is not explicitly calculated in the test program
+used, but rather by instrumenting the kernel itself. The raw number of
+timer ticks that elapse between the time the timer generates an
+interrupt and the start of the timer ISR is kept in the kernel. These
+values are printed by the test program after all other operations have
+been tested. Thus this should be a reasonable estimate of the
+interrupt latency over time.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-characterization-using-measurements">
+ <title>Using these Measurements</title>
+ <para>
+These measurements can be used in a number of ways. The most typical
+use will be to compare different real-time kernel offerings on similar
+hardware, another will be to estimate the cost of implementing a task
+using eCos (applications can be examined to see what effect the kernel
+operations will have on the total execution time). Another use would
+be to observe how the tuning of the kernel affects overall operation.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-characterization-influences">
+ <title>Influences on Performance</title>
+ <para>
+A number of factors can affect real-time performance in a system. One
+of the most common factors, yet most difficult to characterize, is the
+effect of device drivers and interrupts on system timings. Different
+device drivers will have differing requirements as to how long
+interrupts are suppressed, for example. The eCos system has been
+designed with this in mind, by separating the management of interrupts
+(ISR handlers) and the processing required by the interrupt
+(DSR&mdash;Deferred Service Routine&mdash; handlers). However, since
+there is so much variability here, and indeed most device drivers will
+come from the end users themselves, these effects cannot be reliably
+measured. Attempts have been made to measure the overhead of the
+single interrupt that eCos relies on, the real-time clock timer. This
+should give you a reasonable idea of the cost of executing interrupt
+handling for devices.
+ </para>
+ </refsect1>
+
+ <refsect1 id="kernel-characterization-measured-items">
+ <title>Measured Items</title>
+ <para>
+This section describes the various tests and the numbers presented.
+All tests use the C kernel API (available by way of
+<filename>cyg/kernel/kapi.h</filename>). There is a single main thread
+in the system that performs the various tests. Additional threads may
+be created as part of the testing, but these are short lived and are
+destroyed between tests unless otherwise noted. The terminology
+&ldquo;lower priority&rdquo; means a priority that is less important,
+not necessarily lower in numerical value. A higher priority thread
+will run in preference to a lower priority thread even though the
+priority value of the higher priority thread may be numerically less
+than that of the lower priority thread.
+ </para>
+
+ <refsect2 id="kernel-characterization-measure-threads">
+ <title>Thread Primitives</title>
+ <variablelist>
+ <varlistentry>
+ <term>Create thread</term>
+ <listitem><para>
+This test measures the <function>cyg_thread_create()</function> call.
+Each call creates a totally new thread. The set of threads created by
+this test will be reused in the subsequent thread primitive tests.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Yield thread</term>
+ <listitem><para>
+This test measures the <function>cyg_thread_yield()</function> call.
+For this test, there are no other runnable threads, thus the test
+should just measure the overhead of trying to give up the CPU.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Suspend &lsqb;suspended&rsqb; thread</term>
+ <listitem><para>
+This test measures the <function>cyg_thread_suspend()</function> call.
+A thread may be suspended multiple times; each thread is already
+suspended from its initial creation, and is suspended again.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Resume thread</term>
+ <listitem><para>
+This test measures the <function>cyg_thread_resume()</function> call.
+All of the threads have a suspend count of 2, thus this call does not
+make them runnable. This test just measures the overhead of resuming a
+thread.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Set priority</term>
+ <listitem><para>
+This test measures the <function>cyg_thread_set_priority()</function>
+call. Each thread, currently suspended, has its priority set to a new
+value.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Get priority</term>
+ <listitem><para>
+This test measures the <function>cyg_thread_get_priority()</function>
+call.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Kill &lsqb;suspended&rsqb; thread</term>
+ <listitem><para>
+This test measures the <function>cyg_thread_kill()</function> call.
+Each thread in the set is killed. All threads are known to be
+suspended before being killed.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Yield &lsqb;no other&rsqb; thread</term>
+ <listitem><para>
+This test measures the <function>cyg_thread_yield()</function> call
+again. This is to demonstrate that the
+<function>cyg_thread_yield()</function> call has a fixed overhead,
+regardless of whether there are other threads in the system.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Resume &lsqb;suspended low priority&rsqb; thread</term>
+ <listitem><para>
+This test measures the <function>cyg_thread_resume()</function> call
+again. In this case, the thread being resumed is lower priority than
+the main thread, thus it will simply become ready to run but not be
+granted the CPU. This test measures the cost of making a thread ready
+to run.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Resume &lsqb;runnable low priority&rsqb; thread</term>
+ <listitem><para>
+This test measures the <function>cyg_thread_resume()</function> call
+again. In this case, the thread being resumed is lower priority than
+the main thread and has already been made runnable, so in fact the
+resume call has no effect.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Suspend &lsqb;runnable&rsqb; thread</term>
+ <listitem><para>
+This test measures the <function>cyg_thread_suspend()</function> call
+again. In this case, each thread has already been made runnable (by
+previous tests).
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Yield &lsqb;only low priority&rsqb; thread</term>
+ <listitem><para>
+This test measures the <function>cyg_thread_yield()</function> call.
+In this case, there are many other runnable threads, but they are all
+lower priority than the main thread, thus no thread switches will take
+place.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Suspend &lsqb;runnable-&gt;not runnable&rsqb; thread</term>
+ <listitem><para>
+This test measures the <function>cyg_thread_suspend()</function> call
+again. The thread being suspended will become non-runnable by this
+action.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Kill &lsqb;runnable&rsqb; thread</term>
+ <listitem><para>
+This test measures the <function>cyg_thread_kill()</function> call
+again. In this case, the thread being killed is currently runnable,
+but lower priority than the main thread.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Resume &lsqb;high priority&rsqb; thread</term>
+ <listitem><para>
+This test measures the <function>cyg_thread_resume()</function> call.
+The thread being resumed is higher priority than the main thread, thus
+a thread switch will take place on each call. In fact there will be
+two thread switches; one to the new higher priority thread and a
+second back to the test thread. The test thread exits immediately.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Thread switch</term>
+ <listitem><para>
+This test attempts to measure the cost of switching from one thread to
+another. Two equal priority threads are started and they will each
+yield to the other for a number of iterations. A time stamp is
+gathered in one thread before the
+<function>cyg_thread_yield()</function> call and after the call in the
+other thread.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="kernel-characterization-measure-scheduler"
+ <title>Scheduler Primitives</title>
+ <variablelist>
+ <varlistentry>
+ <term>Scheduler lock</term>
+ <listitem><para>
+This test measures the <function>cyg_scheduler_lock()</function> call.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Scheduler unlock &lsqb;0 threads&rsqb;</term>
+ <listitem><para>
+This test measures the <function>cyg_scheduler_unlock()</function>
+call. There are no other threads in the system and the unlock happens
+immediately after a lock so there will be no pending DSR&rsquo;s to
+run.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Scheduler unlock &lsqb;1 suspended thread&rsqb;</term>
+ <listitem><para>
+This test measures the <function>cyg_scheduler_unlock()</function>
+call. There is one other thread in the system which is currently
+suspended.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Scheduler unlock &lsqb;many suspended threads&rsqb;</term>
+ <listitem><para>
+This test measures the <function>cyg_scheduler_unlock()</function>
+call. There are many other threads in the system which are currently
+suspended. The purpose of this test is to determine the cost of having
+additional threads in the system when the scheduler is activated by
+way of <function>cyg_scheduler_unlock()</function>.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Scheduler unlock &lsqb;many low priority threads&rsqb;</term>
+ <listitem><para>
+This test measures the <function>cyg_scheduler_unlock()</function>
+call. There are many other threads in the system which are runnable
+but are lower priority than the main thread. The purpose of this test
+is to determine the cost of having additional threads in the system
+when the scheduler is activated by way of
+<function>cyg_scheduler_unlock()</function>.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="kernel-characterization-measure-mutex">
+ <title>Mutex Primitives</title>
+ <variablelist>
+ <varlistentry>
+ <term>Init mutex</term>
+ <listitem><para>
+This test measures the <function>cyg_mutex_init()</function> call. A
+number of separate mutex variables are created. The purpose of this
+test is to measure the cost of creating a new mutex and introducing it
+to the system.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Lock &lsqb;unlocked&rsqb; mutex</term>
+ <listitem><para>
+This test measures the <function>cyg_mutex_lock()</function> call. The
+purpose of this test is to measure the cost of locking a mutex which
+is currently unlocked. There are no other threads executing in the
+system while this test runs.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Unlock &lsqb;locked&rsqb; mutex</term>
+ <listitem><para>
+This test measures the <function>cyg_mutex_unlock()</function> call.
+The purpose of this test is to measure the cost of unlocking a mutex
+which is currently locked. There are no other threads executing in the
+system while this test runs.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Trylock &lsqb;unlocked&rsqb; mutex</term>
+ <listitem><para>
+This test measures the <function>cyg_mutex_trylock()</function> call.
+The purpose of this test is to measure the cost of locking a mutex
+which is currently unlocked. There are no other threads executing in
+the system while this test runs.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Trylock &lsqb;locked&rsqb; mutex</term>
+ <listitem><para>
+This test measures the <function>cyg_mutex_trylock()</function> call.
+The purpose of this test is to measure the cost of locking a mutex
+which is currently locked. There are no other threads executing in the
+system while this test runs.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Destroy mutex</term>
+ <listitem><para>
+This test measures the <function>cyg_mutex_destroy()</function> call.
+The purpose of this test is to measure the cost of deleting a mutex
+from the system. There are no other threads executing in the system
+while this test runs.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Unlock/Lock mutex</term>
+ <listitem><para>
+This test attempts to measure the cost of unlocking a mutex for which
+there is another higher priority thread waiting. When the mutex is
+unlocked, the higher priority waiting thread will immediately take the
+lock. The time from when the unlock is issued until after the lock
+succeeds in the second thread is measured, thus giving the round-trip
+or circuit time for this type of synchronizer.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="kernel-characterization-measure-mailbox">
+ <title>Mailbox Primitives</title>
+ <variablelist>
+ <varlistentry>
+ <term>Create mbox</term>
+ <listitem><para>
+This test measures the <function>cyg_mbox_create()</function> call. A
+number of separate mailboxes is created. The purpose of this test is
+to measure the cost of creating a new mailbox and introducing it to
+the system.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Peek &lsqb;empty&rsqb; mbox</term>
+ <listitem><para>
+This test measures the <function>cyg_mbox_peek()</function> call. An
+attempt is made to peek the value in each mailbox, which is currently
+empty. The purpose of this test is to measure the cost of checking a
+mailbox for a value without blocking.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Put &lsqb;first&rsqb; mbox</term>
+ <listitem><para>
+This test measures the <function>cyg_mbox_put()</function> call. One
+item is added to a currently empty mailbox. The purpose of this test
+is to measure the cost of adding an item to a mailbox. There are no
+other threads currently waiting for mailbox items to arrive.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Peek &lsqb;1 msg&rsqb; mbox</term>
+ <listitem><para>
+This test measures the <function>cyg_mbox_peek()</function> call. An
+attempt is made to peek the value in each mailbox, which contains a
+single item. The purpose of this test is to measure the cost of
+checking a mailbox which has data to deliver.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Put &lsqb;second&rsqb; mbox</term>
+ <listitem><para>
+This test measures the <function>cyg_mbox_put()</function> call. A
+second item is added to a mailbox. The purpose of this test is to
+measure the cost of adding an additional item to a mailbox. There are
+no other threads currently waiting for mailbox items to arrive.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Peek &lsqb;2 msgs&rsqb; mbox</term>
+ <listitem><para>
+This test measures the <function>cyg_mbox_peek()</function> call. An
+attempt is made to peek the value in each mailbox, which contains two
+items. The purpose of this test is to measure the cost of checking a
+mailbox which has data to deliver.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Get &lsqb;first&rsqb; mbox</term>
+ <listitem><para>
+This test measures the <function>cyg_mbox_get()</function> call. The
+first item is removed from a mailbox that currently contains two
+items. The purpose of this test is to measure the cost of obtaining an
+item from a mailbox without blocking.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Get &lsqb;second&rsqb; mbox</term>
+ <listitem><para>
+This test measures the <function>cyg_mbox_get()</function> call. The
+last item is removed from a mailbox that currently contains one item.
+The purpose of this test is to measure the cost of obtaining an item
+from a mailbox without blocking.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Tryput &lsqb;first&rsqb; mbox</term>
+ <listitem><para>
+This test measures the <function>cyg_mbox_tryput()</function> call. A
+single item is added to a currently empty mailbox. The purpose of this
+test is to measure the cost of adding an item to a mailbox.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Peek item &lsqb;non-empty&rsqb; mbox</term>
+ <listitem><para>
+This test measures the <function>cyg_mbox_peek_item()</function> call.
+A single item is fetched from a mailbox that contains a single item.
+The purpose of this test is to measure the cost of obtaining an item
+without disturbing the mailbox.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Tryget &lsqb;non-empty&rsqb; mbox</term>
+ <listitem><para>
+This test measures the <function>cyg_mbox_tryget()</function> call. A
+single item is removed from a mailbox that contains exactly one item.
+The purpose of this test is to measure the cost of obtaining one item
+from a non-empty mailbox.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Peek item &lsqb;empty&rsqb; mbox</term>
+ <listitem><para>
+This test measures the <function>cyg_mbox_peek_item()</function> call.
+An attempt is made to fetch an item from a mailbox that is empty. The
+purpose of this test is to measure the cost of trying to obtain an
+item when the mailbox is empty.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Tryget &lsqb;empty&rsqb; mbox</term>
+ <listitem><para>
+This test measures the <function>cyg_mbox_tryget()</function> call. An
+attempt is made to fetch an item from a mailbox that is empty. The
+purpose of this test is to measure the cost of trying to obtain an
+item when the mailbox is empty.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Waiting to get mbox</term>
+ <listitem><para>
+This test measures the <function>cyg_mbox_waiting_to_get()</function>
+call. The purpose of this test is to measure the cost of determining
+how many threads are waiting to obtain a message from this mailbox.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Waiting to put mbox</term>
+ <listitem><para>
+This test measures the <function>cyg_mbox_waiting_to_put()</function>
+call. The purpose of this test is to measure the cost of determining
+how many threads are waiting to put a message into this mailbox.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Delete mbox</term>
+ <listitem><para>
+This test measures the <function>cyg_mbox_delete()</function> call.
+The purpose of this test is to measure the cost of destroying a
+mailbox and removing it from the system.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Put/Get mbox</term>
+ <listitem><para>
+In this round-trip test, one thread is sending data to a mailbox that
+is being consumed by another thread. The time from when the data is
+put into the mailbox until it has been delivered to the waiting thread
+is measured. Note that this time will contain a thread switch.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="kernel-characterization-measure-semaphore">
+ <title>Semaphore Primitives</title>
+ <variablelist>
+ <varlistentry>
+ <term>Init semaphore</term>
+ <listitem><para>
+This test measures the <function>cyg_semaphore_init()</function> call.
+A number of separate semaphore objects are created and introduced to
+the system. The purpose of this test is to measure the cost of
+creating a new semaphore.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Post &lsqb;0&rsqb; semaphore</term>
+ <listitem><para>
+This test measures the <function>cyg_semaphore_post()</function> call.
+Each semaphore currently has a value of 0 and there are no other
+threads in the system. The purpose of this test is to measure the
+overhead cost of posting to a semaphore. This cost will differ if
+there is a thread waiting for the semaphore.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Wait &lsqb;1&rsqb; semaphore</term>
+ <listitem><para>
+This test measures the <function>cyg_semaphore_wait()</function> call.
+The semaphore has a current value of 1 so the call is non-blocking.
+The purpose of the test is to measure the overhead of
+&ldquo;taking&rdquo; a semaphore.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Trywait &lsqb;0&rsqb; semaphore</term>
+ <listitem><para>
+This test measures the <function>cyg_semaphore_trywait()</function>
+call. The semaphore has a value of 0 when the call is made. The
+purpose of this test is to measure the cost of seeing if a semaphore
+can be &ldquo;taken&rdquo; without blocking. In this case, the answer
+would be no.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Trywait &lsqb;1&rsqb; semaphore</term>
+ <listitem><para>
+This test measures the <function>cyg_semaphore_trywait()</function>
+call. The semaphore has a value of 1 when the call is made. The
+purpose of this test is to measure the cost of seeing if a semaphore
+can be &ldquo;taken&rdquo; without blocking. In this case, the answer
+would be yes.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Peek semaphore</term>
+ <listitem><para>
+This test measures the <function>cyg_semaphore_peek()</function> call.
+The purpose of this test is to measure the cost of obtaining the
+current semaphore count value.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Destroy semaphore</term>
+ <listitem><para>
+This test measures the <function>cyg_semaphore_destroy()</function>
+call. The purpose of this test is to measure the cost of deleting a
+semaphore from the system.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Post/Wait semaphore</term>
+ <listitem><para>
+In this round-trip test, two threads are passing control back and
+forth by using a semaphore. The time from when one thread calls
+<function>cyg_semaphore_post()</function> until the other thread
+completes its <function>cyg_semaphore_wait()</function> is measured.
+Note that each iteration of this test will involve a thread switch.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="kernel-characterization-measure-counters">
+ <title>Counters</title>
+ <variablelist>
+ <varlistentry>
+ <term>Create counter</term>
+ <listitem><para>
+This test measures the <function>cyg_counter_create()</function> call.
+A number of separate counters are created. The purpose of this test is
+to measure the cost of creating a new counter and introducing it to
+the system.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Get counter value</term>
+ <listitem><para>
+This test measures the
+<function>cyg_counter_current_value()</function> call. The current
+value of each counter is obtained.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Set counter value</term>
+ <listitem><para>
+This test measures the <function>cyg_counter_set_value()</function>
+call. Each counter is set to a new value.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Tick counter</term>
+ <listitem><para>
+This test measures the <function>cyg_counter_tick()</function> call.
+Each counter is &ldquo;ticked&rdquo; once.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Delete counter</term>
+ <listitem><para>
+This test measures the <function>cyg_counter_delete()</function> call.
+Each counter is deleted from the system. The purpose of this test is
+to measure the cost of deleting a counter object.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="kernel-characterization-measure-alarms">
+ <title>Alarms</title>
+ <variablelist>
+ <varlistentry>
+ <term>Create alarm</term>
+ <listitem><para>
+This test measures the <function>cyg_alarm_create()</function> call. A
+number of separate alarms are created, all attached to the same
+counter object. The purpose of this test is to measure the cost of
+creating a new counter and introducing it to the system.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Initialize alarm</term>
+ <listitem><para>
+This test measures the <function>cyg_alarm_initialize()</function>
+call. Each alarm is initialized to a small value.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Disable alarm</term>
+ <listitem><para>
+This test measures the <function>cyg_alarm_disable()</function> call.
+Each alarm is explicitly disabled.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Enable alarm</term>
+ <listitem><para>
+This test measures the <function>cyg_alarm_enable()</function> call.
+Each alarm is explicitly enabled.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Delete alarm</term>
+ <listitem><para>
+This test measures the <function>cyg_alarm_delete()</function> call.
+Each alarm is destroyed. The purpose of this test is to measure the
+cost of deleting an alarm and removing it from the system.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Tick counter &lsqb;1 alarm&rsqb;</term>
+ <listitem><para>
+This test measures the <function>cyg_counter_tick()</function> call. A
+counter is created that has a single alarm attached to it. The purpose
+of this test is to measure the cost of &ldquo;ticking&rdquo; a counter
+when it has a single attached alarm. In this test, the alarm is not
+activated (fired).
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Tick counter &lsqb;many alarms&rsqb;</term>
+ <listitem><para>
+This test measures the <function>cyg_counter_tick()</function> call. A
+counter is created that has multiple alarms attached to it. The
+purpose of this test is to measure the cost of &ldquo;ticking&rdquo; a
+counter when it has many attached alarms. In this test, the alarms are
+not activated (fired).
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Tick &amp; fire counter &lsqb;1 alarm&rsqb;</term>
+ <listitem><para>
+This test measures the <function>cyg_counter_tick()</function> call. A
+counter is created that has a single alarm attached to it. The purpose
+of this test is to measure the cost of &ldquo;ticking&rdquo; a counter
+when it has a single attached alarm. In this test, the alarm is
+activated (fired). Thus the measured time will include the overhead of
+calling the alarm callback function.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Tick &amp; fire counter &lsqb;many alarms&rsqb;</term>
+ <listitem><para>
+This test measures the <function>cyg_counter_tick()</function> call. A
+counter is created that has multiple alarms attached to it. The
+purpose of this test is to measure the cost of &ldquo;ticking&rdquo; a
+counter when it has many attached alarms. In this test, the alarms are
+activated (fired). Thus the measured time will include the overhead of
+calling the alarm callback function.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Alarm latency &lsqb;0 threads&rsqb;</term>
+ <listitem><para>
+This test attempts to measure the latency in calling an alarm callback
+function. The time from the clock interrupt until the alarm function
+is called is measured. In this test, there are no threads that can be
+run, other than the system idle thread, when the clock interrupt
+occurs (all threads are suspended).
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Alarm latency &lsqb;2 threads&rsqb;</term>
+ <listitem><para>
+This test attempts to measure the latency in calling an alarm callback
+function. The time from the clock interrupt until the alarm function
+is called is measured. In this test, there are exactly two threads
+which are running when the clock interrupt occurs. They are simply
+passing back and forth by way of the
+<function>cyg_thread_yield()</function> call. The purpose of this test
+is to measure the variations in the latency when there are executing
+threads.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Alarm latency &lsqb;many threads&rsqb;</term>
+ <listitem><para>
+This test attempts to measure the latency in calling an alarm callback
+function. The time from the clock interrupt until the alarm function
+is called is measured. In this test, there are a number of threads
+which are running when the clock interrupt occurs. They are simply
+passing back and forth by way of the
+<function>cyg_thread_yield()</function> call. The purpose of this test
+is to measure the variations in the latency when there are many
+executing threads.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ </refsect1>
+
+ </refentry>
+
+<!-- }}} -->
+
+</part>
diff --git a/cesar/ecos/packages/kernel/current/host/instr/dump_instr.c b/cesar/ecos/packages/kernel/current/host/instr/dump_instr.c
new file mode 100644
index 0000000000..0bdb7b0e39
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/host/instr/dump_instr.c
@@ -0,0 +1,106 @@
+
+#include <pkgconf/kernel.h>
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/kernel/instrmnt.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+// -------------------------------------------------------------------------
+// Instrumentation record.
+
+struct Instrument_Record
+{
+ CYG_WORD16 type; // record type
+ CYG_WORD16 thread; // current thread id
+ CYG_WORD timestamp; // 32 bit timestamp
+ CYG_WORD arg1; // first arg
+ CYG_WORD arg2; // second arg
+};
+
+// -------------------------------------------------------------------------
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_MSGS
+#define CYGDBG_KERNEL_INSTRUMENT_MSGS_DEFINE_TABLE
+#include <cyg/kernel/instrument_desc.h>
+#define NELEM(x) (sizeof(x)/sizeof*(x))
+externC char * cyg_instrument_msg(CYG_WORD16 type) {
+
+ struct instrument_desc_s *record;
+ struct instrument_desc_s *end_record;
+ CYG_WORD cl, event;
+
+ record = instrument_desc;
+ end_record = &instrument_desc[NELEM(instrument_desc)-1];
+ cl = type & 0xff00;
+ event = type & 0x00ff;
+
+ while ((record != end_record) && (record->num != cl)) {
+ record++;
+ }
+
+ if (record->num == cl) {
+ record++;
+ while ((record != end_record) && (record->num != event) &&
+ (record->num < 0xff)) {
+ record++;
+ }
+
+ if (record->num == event) {
+ return (record->msg);
+ }
+ }
+ return("Unknown event");
+}
+#endif // CYGDBG_KERNEL_INSTRUMENT_MSGS
+
+void usage(char *myname)
+{
+ fprintf(stderr,"Usage: %s <filename>\n",myname);
+ fprintf(stderr,"where filename is that of the instrumentation data");
+}
+
+int main(int argc, char * argv[])
+{
+
+ FILE * file;
+ char * filename;
+ struct Instrument_Record record;
+ int cnt=0;
+
+ if (argc != 2) {
+ usage(argv[0]);
+ exit(1);
+ }
+
+ filename = argv[1];
+
+ file = fopen(filename, "r");
+ if (!file) {
+ fprintf(stderr,"Error opening file %s: ",filename);
+ perror("");
+ exit(1);
+ }
+
+ while (!feof(file)) {
+ fread(&record,sizeof(record),1,file);
+ if (record.type == 0) {
+ break;
+ }
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_MSGS
+ printf("%4d Record type (0x%04x): %-20s thread %2d, ",
+ cnt++,record.type,cyg_instrument_msg(record.type),
+ record.thread);
+#else
+ printf("%4d Record type 0x%04x, thread %2d, ",
+ cnt++,record.type, record.thread);
+#endif
+ printf("time %5d, arg1 0x%08x, arg2 0x%08x\n",
+ record.timestamp, record.arg1,
+ record.arg2);
+ }
+
+ fclose(file);
+ return (0);
+}
diff --git a/cesar/ecos/packages/kernel/current/host/instr/instrument.sh b/cesar/ecos/packages/kernel/current/host/instr/instrument.sh
new file mode 100755
index 0000000000..14c64e3689
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/host/instr/instrument.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+echo "/* This is an automatically generated file. Do not edit. */"
+echo "/* Repository name: PACKAGES/kernel/VERSION/include/instrument_desc.h */"
+echo "/* Install tree : INSTALL/include/cyg/kernel/instrument_desc.h */"
+echo
+echo "struct instrument_desc_s { "
+echo " char * msg; "
+echo " CYG_WORD num; "
+echo "}; "
+echo
+echo "#ifdef CYGDBG_KERNEL_INSTRUMENT_MSGS_DEFINE_TABLE "
+echo struct instrument_desc_s instrument_desc[] = {
+
+grep -e \#define.CYG_INSTRUMENT_EVENT -e \#define.CYG_INSTRUMENT_CLASS $1 | grep -v MAX | cut -d " " -f 2- | cut -d "_" -f 4- | sort | awk '{ print("{\""$1"\", " $2 "},") }'
+
+echo { 0, 0 }
+echo }\;
+echo "#else /* CYGDBG_KERNEL_INSTRUMENT_MSGS_DEFINE_TABLE */ "
+echo "extern struct instrument_desc_s instrument_desc[]; "
+echo "#endif /* CYGDBG_KERNEL_INSTRUMENT_MSGS_DEFINE_TABLE */ "
+echo
+echo "/* EOF instrument_desc.h */"
+
diff --git a/cesar/ecos/packages/kernel/current/host/instr/readme.txt b/cesar/ecos/packages/kernel/current/host/instr/readme.txt
new file mode 100644
index 0000000000..51c3b99546
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/host/instr/readme.txt
@@ -0,0 +1,80 @@
+
+README for User Friendly Instrumentation Messages
+=================================================
+
+The CDL option CYGDBG_KERNEL_INSTRUMENT_MSGS controls whether the
+system is capable of displaying user friendly instrumentation
+messages. To do this it needs to know what event numbers mean
+what events - as a text string to print for you.
+
+It gets the information from a table created by the header file
+instrument_desc.h in the kernel. If the instrumentation numbers
+change, you must rebuild that header to match.
+
+A further CDL option is provided to help you with that. The
+procedure is as follows:
+
+1) Remove kernel/VERSION/include/instrument_desc.h from your
+ repository. Is is probably a good idea to move it away rather
+ than deleting it in case the next stages fail.
+
+2) Make a build configuration, enabling options
+ CYGDBG_KERNEL_INSTRUMENT, CYGDBG_KERNEL_INSTRUMENT_MSGS and
+ CYGDBG_KERNEL_INSTRUMENT_MSGS_BUILD_HEADERFILE in the kernel.
+ Viewed in the GUI configtool, "Kernel instrumentation", "Print
+ user friendly instrument messages" and "Rebuild the header
+ file" respectively.
+
+3) Make eCos within this build configuration. It should create
+ install/include/cyg/kernel/instrument_desc.h
+
+4) Copy that new file back to your repository, to
+ kernel/VERSION/include/instrument_desc.h replacing the file
+ you moved aside in step 1.
+
+5) Commit the new file to your version control system or whatever
+ you use.
+
+If you wish to rebuild the file "by hand" the command to use, in
+a suitable shell, is this:
+
+ $ECOS_REPOSITORY/kernel/$ECOS_VERSION/host/instr/instrument.sh
+ $ECOS_REPOSITORY/kernel/$ECOS_VERSION/include/instrmnt.h
+ > $ECOS_BUILD_PREFIX/include/cyg/kernel/instrument_desc.h
+
+(all on one line of course) or to rebuild it directly into the
+kernel source repository:
+
+ $ECOS_REPOSITORY/kernel/$ECOS_VERSION/host/instr/instrument.sh
+ $ECOS_REPOSITORY/kernel/$ECOS_VERSION/include/instrmnt.h
+ > $ECOS_REPOSITORY/kernel/$ECOS_VERSION/include/instrument_desc.h
+
+It's up to you to sort out file permissions for this to work, and
+to set environment variables as required or edit these lines as
+you type them.
+
+
+There is also a host-based program which can print a buffer
+nicely for you - if you can get the data into your host.
+Enabling CDL option CYGDBG_KERNEL_INSTRUMENT_BUILD_HOST_DUMP or
+"Build the host tool to print out a dump" will build it for you
+in install/bin. To build it instead "by hand", use
+
+ mkdir -p tempinc
+ cp -r $(ECOS_BUILD_PREFIX)/include/cyg tempinc
+ cp -r $(ECOS_BUILD_PREFIX)/include/pkgconf tempinc
+ cc -I./tempinc
+ $(ECOS_REPOSITORY)/kernel/${ECOS_VERSION}/host/instr/dump_instr.c
+ -o $(PREFIX)/bin/dump_instr
+
+again with environment variables as required, or type in whatever
+is appropriate. You still have to somehow get the
+instrumentation buffer into a file on the host. 'Exercise for the
+reader' as university lecturers tend to say.
+
+One possibility is to set up a tftp *server* in the target which
+will serve the instrumentation buffer. This hint is as far as
+support for this goes.
+
+
+
diff --git a/cesar/ecos/packages/kernel/current/include/bitmap.hxx b/cesar/ecos/packages/kernel/current/include/bitmap.hxx
new file mode 100644
index 0000000000..2941f3ec99
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/bitmap.hxx
@@ -0,0 +1,201 @@
+#ifndef CYGONCE_KERNEL_BITMAP_HXX
+#define CYGONCE_KERNEL_BITMAP_HXX
+
+//==========================================================================
+//
+// bitmap.hxx
+//
+// Bitmap scheduler class declaration(s)
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-10
+// Purpose: Define bitmap scheduler implementation
+// Description: The classes defined here are used as base classes
+// by the common classes that define schedulers and thread
+// things.
+// Usage: Included according to configuration by
+// <cyg/kernel/sched.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+
+// -------------------------------------------------------------------------
+// The macro CYGNUM_KERNEL_SCHED_BITMAP_SIZE contains the number of bits
+// that the scheduler bitmap should contain. It is derived from the number
+// of threads that the system is allowed to use during configuration.
+
+#ifndef CYGNUM_KERNEL_SCHED_BITMAP_SIZE
+#define CYGNUM_KERNEL_SCHED_BITMAP_SIZE 32
+#endif
+
+#if CYGNUM_KERNEL_SCHED_BITMAP_SIZE <= 8
+typedef cyg_ucount8 cyg_sched_bitmap;
+#elif CYGNUM_KERNEL_SCHED_BITMAP_SIZE <= 16
+typedef cyg_ucount16 cyg_sched_bitmap;
+#elif CYGNUM_KERNEL_SCHED_BITMAP_SIZE <= 32
+typedef cyg_ucount32 cyg_sched_bitmap;
+#else
+#error Bitmaps greater than 32 bits not currently allowed
+#endif
+
+// -------------------------------------------------------------------------
+// Customize the scheduler
+
+#define CYGIMP_THREAD_PRIORITY 1
+
+#define CYG_THREAD_MIN_PRIORITY (CYGNUM_KERNEL_SCHED_BITMAP_SIZE-1)
+#define CYG_THREAD_MAX_PRIORITY 0
+
+// set default scheduling info value for thread constructors.
+#define CYG_SCHED_DEFAULT_INFO CYG_THREAD_MAX_PRIORITY
+
+// -------------------------------------------------------------------------
+// This class contains the implementation details of the scheduler, and
+// provides a standard API for accessing it.
+
+class Cyg_Scheduler_Implementation
+ : public Cyg_Scheduler_Base
+{
+ friend class Cyg_ThreadQueue_Implementation;
+ friend class Cyg_SchedThread_Implementation;
+
+ cyg_sched_bitmap run_queue;
+
+ Cyg_Thread *thread_table[CYGNUM_KERNEL_SCHED_BITMAP_SIZE];
+
+
+protected:
+
+ Cyg_Scheduler_Implementation(); // Constructor
+
+ // The following functions provide the scheduler implementation
+ // interface to the Cyg_Scheduler class. These are protected
+ // so that only the scheduler can call them.
+
+ // choose a new thread
+ Cyg_Thread *schedule();
+
+ // make thread schedulable
+ void add_thread(Cyg_Thread *thread);
+
+ // make thread un-schedulable
+ void rem_thread(Cyg_Thread *thread);
+
+ // register thread with scheduler
+ void register_thread(Cyg_Thread *thread);
+
+ // deregister thread
+ void deregister_thread(Cyg_Thread *thread);
+
+ // Test the given priority for uniqueness
+ cyg_bool unique( cyg_priority priority);
+
+public:
+ void set_idle_thread( Cyg_Thread *thread, HAL_SMP_CPU_TYPE cpu );
+
+};
+
+// -------------------------------------------------------------------------
+// Scheduler thread implementation.
+// This class provides the implementation of the scheduler specific parts
+// of each thread.
+
+class Cyg_SchedThread_Implementation
+{
+ friend class Cyg_Scheduler_Implementation;
+ friend class Cyg_ThreadQueue_Implementation;
+
+protected:
+
+ cyg_priority priority; // current thread priority
+
+ Cyg_SchedThread_Implementation(CYG_ADDRWORD sched_info);
+
+ void yield(); // Yield CPU to next thread
+
+ // These are not applicable in a bitmap scheduler; placeholders:
+ inline void rotate_queue( cyg_priority pri ) { };
+ inline void to_queue_head( void ) { };
+};
+
+// -------------------------------------------------------------------------
+// Thread queue implementation.
+// This class provides the (scheduler specific) implementation of the
+// thread queue class.
+
+class Cyg_ThreadQueue_Implementation
+{
+ cyg_sched_bitmap wait_queue;
+
+protected:
+
+ // API used by Cyg_ThreadQueue
+
+ Cyg_ThreadQueue_Implementation(); // Constructor
+
+ // Add thread to queue
+ void enqueue(Cyg_Thread *thread);
+
+ // return first thread on queue
+ Cyg_Thread *highpri();
+
+ // remove first thread on queue
+ Cyg_Thread *dequeue();
+
+ // remove specified thread from queue
+ void remove(Cyg_Thread *thread);
+
+ // test if queue is empty
+ cyg_bool empty();
+
+};
+
+inline cyg_bool Cyg_ThreadQueue_Implementation::empty()
+{
+ return wait_queue == 0;
+}
+
+// -------------------------------------------------------------------------
+
+#endif // ifndef CYGONCE_KERNEL_BITMAP_HXX
+// EOF bitmap.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/clock.hxx b/cesar/ecos/packages/kernel/current/include/clock.hxx
new file mode 100644
index 0000000000..2ce6f93c09
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/clock.hxx
@@ -0,0 +1,261 @@
+#ifndef CYGONCE_KERNEL_CLOCK_HXX
+#define CYGONCE_KERNEL_CLOCK_HXX
+
+//==========================================================================
+//
+// clock.hxx
+//
+// Clock and Alarm class declaration(s)
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-09
+// Purpose: Define Clock and Alarm class interfaces
+// Description: The classes defined here collectively implement the
+// internal API used to create, configure and manage Counters,
+// Clocks and Alarms.
+// Usage: #include <cyg/kernel/clock.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <cyg/infra/clist.hxx>
+
+// -------------------------------------------------------------------------
+// Forward definitions and typedefs.
+
+class Cyg_Alarm;
+
+typedef void cyg_alarm_fn(Cyg_Alarm *alarm, CYG_ADDRWORD data);
+
+typedef Cyg_CList_T<Cyg_Alarm> Cyg_Alarm_List;
+
+// -------------------------------------------------------------------------
+// Counter object.
+
+class Cyg_Counter
+{
+
+ friend class Cyg_Alarm;
+
+#if defined(CYGIMP_KERNEL_COUNTERS_SINGLE_LIST)
+
+ Cyg_Alarm_List alarm_list; // Linear list of Alarms
+
+#elif defined(CYGIMP_KERNEL_COUNTERS_MULTI_LIST)
+
+ Cyg_Alarm_List alarm_list[CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE];
+
+#endif
+
+ volatile cyg_tick_count counter; // counter value
+
+ cyg_uint32 increment; // increment per tick
+
+ // Add an alarm to this counter
+ void add_alarm( Cyg_Alarm *alarm );
+
+ // Remove an alarm from this counter
+ void rem_alarm( Cyg_Alarm *alarm );
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ Cyg_Counter(
+ cyg_uint32 increment = 1
+ );
+
+ ~Cyg_Counter();
+
+ // Return current value of counter
+ cyg_tick_count current_value();
+
+ // Return low and high halves of the
+ // counter value.
+ cyg_uint32 current_value_lo();
+ cyg_uint32 current_value_hi();
+
+ // Set the counter's current value
+ void set_value( cyg_tick_count new_value);
+
+ // Advance counter by some number of ticks
+ void tick( cyg_uint32 ticks = 1);
+
+};
+
+// -------------------------------------------------------------------------
+// Clock class. This is derived from a Counter and defines extra
+// features to support clock-like behaviour.
+
+class Cyg_Clock
+ : public Cyg_Counter
+{
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ // This structure allows a more accurate representation
+ // of the resolution than a single integer would allow.
+ // The resolution is defined as dividend/divisor nanoseconds
+ // per tick.
+ struct cyg_resolution {
+ cyg_uint32 dividend;
+ cyg_uint32 divisor;
+ };
+
+private:
+
+ cyg_resolution resolution; // Current clock resolution
+
+public:
+
+ Cyg_Clock( // Create clock with given resolution
+ cyg_resolution resolution
+ );
+
+ ~Cyg_Clock(); // Destructor
+
+ cyg_resolution get_resolution(); // Return current resolution
+
+ void set_resolution( // Set new resolution
+ cyg_resolution resolution
+ );
+
+ // There is a need for converting from "other" ticks to clock ticks.
+ // We will construct 4 numbers to do the conversion as:
+ // clock_ticks = (((otherticks*mul1)/div1)*mul2/div2)
+ // with the values chosen to minimize the possibility of overflow.
+ // Do the arithmetic in cyg_uint64s throughout.
+ struct converter {
+ cyg_uint64 mul1, div1, mul2, div2;
+ };
+
+ // There are two of these because the 4 numbers are different depending
+ // on the direction of the conversion, to prevent loss of significance.
+ // NB these relate to the resolution of the clock object they are
+ // called against, not necessarily "the" system real time clock.
+ void get_other_to_clock_converter( cyg_uint64 ns_per_other_tick,
+ struct converter *pcc );
+
+ void get_clock_to_other_converter( cyg_uint64 ns_per_other_tick,
+ struct converter *pcc );
+
+ // A utility to perform the conversion in the obvious way, with
+ // rounding to nearest at each stage. Static because it uses a
+ // previously acquired converter.
+ static cyg_tick_count convert( cyg_tick_count value,
+ struct converter *pcc );
+
+#ifdef CYGVAR_KERNEL_COUNTERS_CLOCK
+
+ // There is a system supplied real time clock...
+
+ static Cyg_Clock *real_time_clock;
+
+#endif
+
+};
+
+// -------------------------------------------------------------------------
+// Alarm class. An alarm may be attached to a counter (or a clock) to be
+// called when the trigger value is reached.
+
+class Cyg_Alarm
+#if defined(CYGIMP_KERNEL_COUNTERS_SINGLE_LIST) || defined(CYGIMP_KERNEL_COUNTERS_MULTI_LIST)
+ : public Cyg_DNode_T<Cyg_Alarm>
+#endif
+{
+ friend class Cyg_Counter;
+
+protected:
+ Cyg_Counter *counter; // Attached to this counter/clock
+
+ cyg_alarm_fn *alarm; // Call-back function
+
+ CYG_ADDRWORD data; // Call-back data
+
+ cyg_tick_count trigger; // Absolute trigger time
+
+ cyg_tick_count interval; // Retrigger interval
+
+ cyg_bool enabled; // True if enabled
+
+ Cyg_Alarm();
+
+ void synchronize( void ); // deal with times in the past,
+ // make next alarm in synch.
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ Cyg_Alarm // Constructor
+ (
+ Cyg_Counter *counter, // Attached to this counter
+ cyg_alarm_fn *alarm, // Call-back function
+ CYG_ADDRWORD data // Call-back data
+ );
+
+ ~Cyg_Alarm(); // Destructor
+
+ void initialize( // Initialize Alarm
+ cyg_tick_count trigger, // Absolute trigger time
+ cyg_tick_count interval = 0 // Relative retrigger interval
+ );
+
+ void enable(); // Ensure alarm enabled
+
+ void disable(); // Ensure alarm disabled
+
+ void get_times(
+ cyg_tick_count *trigger, // Next trigger time
+ cyg_tick_count *interval // Current interval
+ );
+};
+
+// -------------------------------------------------------------------------
+
+#endif // ifndef CYGONCE_KERNEL_CLOCK_HXX
+// EOF clock.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/clock.inl b/cesar/ecos/packages/kernel/current/include/clock.inl
new file mode 100644
index 0000000000..15c7d43546
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/clock.inl
@@ -0,0 +1,125 @@
+#ifndef CYGONCE_KERNEL_CLOCK_INL
+#define CYGONCE_KERNEL_CLOCK_INL
+
+//==========================================================================
+//
+// clock.inl
+//
+// Clock and Alarm class inlines
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-30
+// Purpose: Define Clock and Alarm class inlines
+// Description: Define inline functions for counter, clock and alarm
+// classes.
+// Usage: #include <cyg/kernel/clock.hxx>
+// #include <cyg/kernel/clock.inl>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/clock.hxx>
+
+// -------------------------------------------------------------------------
+// -------------------------------------------------------------------------
+// Counter class inlines
+
+// Return current value of counter
+inline cyg_tick_count Cyg_Counter::current_value()
+{
+ return counter;
+}
+
+inline cyg_uint32 Cyg_Counter::current_value_lo()
+{
+ return counter&0xFFFFFFFF;
+}
+
+inline cyg_uint32 Cyg_Counter::current_value_hi()
+{
+ return (counter>>32)&0xFFFFFFFF;
+}
+
+// Set the counter's current value
+inline void Cyg_Counter::set_value( cyg_tick_count new_value)
+{
+ counter = new_value;
+}
+
+// -------------------------------------------------------------------------
+// -------------------------------------------------------------------------
+// Clock class inlines
+
+// Return current resolution
+inline Cyg_Clock::cyg_resolution Cyg_Clock::get_resolution()
+{
+ return resolution;
+}
+
+// Set new resolution
+inline void Cyg_Clock::set_resolution(
+ Cyg_Clock::cyg_resolution new_resolution
+ )
+{
+ resolution = new_resolution;
+}
+
+inline cyg_tick_count Cyg_Clock::convert(
+ cyg_tick_count value,
+ struct converter *pcc )
+{
+ cyg_uint64 t = (cyg_uint64)value;
+ // Do this in an order to prevent overflow at the expense of
+ // accuracy:
+ t *= pcc->mul1;
+ t += pcc->div1 / 2;
+ t /= pcc->div1;
+ t *= pcc->mul2;
+ t += pcc->div2 / 2;
+ t /= pcc->div2;
+ // The alternative would be to do the 2 multiplies first
+ // for smaller arguments.
+ return (cyg_tick_count)t;
+}
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_CLOCK_INL
+// EOF clock.inl
diff --git a/cesar/ecos/packages/kernel/current/include/diag.h b/cesar/ecos/packages/kernel/current/include/diag.h
new file mode 100644
index 0000000000..ac0cfb205c
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/diag.h
@@ -0,0 +1,66 @@
+#ifndef CYGONCE_KERNEL_DIAG_H
+#define CYGONCE_KERNEL_DIAG_H
+
+/*=============================================================================
+//
+// diag.h
+//
+// Diagnostic Routines for Kernel Development
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1998-03-02
+// Purpose: Diagnostic Routines for Kernel Development
+// Description: Diagnostic routines for use during kernel development.
+// Usage: #include <cyg/kernel/diag.h>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================*/
+
+// These have now migrated to here:
+
+#include <cyg/infra/diag.h>
+
+// this file is retained for the kernel to add to the functionality
+// in the knowledge that there _is_ a kernel.
+
+/*---------------------------------------------------------------------------*/
+#endif /* CYGONCE_KERNEL_DIAG_H */
+/* EOF diag.h */
diff --git a/cesar/ecos/packages/kernel/current/include/errors.h b/cesar/ecos/packages/kernel/current/include/errors.h
new file mode 100644
index 0000000000..26d797828d
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/errors.h
@@ -0,0 +1,83 @@
+#ifndef CYGONCE_KERNEL_ERRORS_H
+#define CYGONCE_KERNEL_ERRORS_H
+
+//==========================================================================
+//
+// errors.h
+//
+// Error values from kernel
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-10-07
+// Purpose: Define error codes
+// Description: Error codes returned by various bits of the kernel.
+// Usage: #include <cyg/kernel/errors.h>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+// General successful result:
+
+#define CYGERR_OK 0
+
+// -------------------------------------------------------------------------
+// Define base of codes:
+
+#define CYGERR_KERNEL_BASE 0xEE000000
+
+// -------------------------------------------------------------------------
+// Thread related errors
+
+#define CYGERR_KERNEL_THREAD_BASE (CYGERR_KERNEL_BASE+0x00010000)
+
+#define CYGERR_KERNEL_THREAD_PRIORITY_INVALID (CYGERR_KERNEL_THREAD_BASE+1)
+#define CYGERR_KERNEL_THREAD_PRIORITY_DUPLICATE (CYGERR_KERNEL_THREAD_BASE+2)
+
+// -------------------------------------------------------------------------
+// Interrupt related errors
+
+#define CYGERR_KERNEL_INTR_BASE (CYGERR_KERNEL_BASE+0x00020000)
+
+#define CYGERR_KERNEL_INTR_VECTOR_INVALID (CYGERR_KERNEL_INTR_BASE+1)
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_ERRORS_H
+// EOF errors.h
diff --git a/cesar/ecos/packages/kernel/current/include/except.hxx b/cesar/ecos/packages/kernel/current/include/except.hxx
new file mode 100644
index 0000000000..38ed3ea5b8
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/except.hxx
@@ -0,0 +1,128 @@
+#ifndef CYGONCE_KERNEL_EXCEPT_HXX
+#define CYGONCE_KERNEL_EXCEPT_HXX
+
+//==========================================================================
+//
+// except.hxx
+//
+// Exception handling declarations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg, jlarmour
+// Date: 1999-02-16
+// Purpose: Define exception interfaces
+// Description: The classes defined here collectively implement the
+// internal API used to register, manage and deliver
+// exceptions.
+// Usage: #include <cyg/kernel/thread.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/hal/hal_intr.h> // exception defines
+
+// -------------------------------------------------------------------------
+// Exception handler function prototype
+
+typedef void cyg_exception_handler(
+ CYG_ADDRWORD data, // user supplied data
+ cyg_code exception_number, // exception being raised
+ CYG_ADDRWORD exception_info // any exception specific info
+ );
+
+// -------------------------------------------------------------------------
+// Exception delivery interface. This function is exported to the HAL which
+// invokes it for all exceptions that it is not able to handle itself.
+
+externC void cyg_hal_deliver_exception( CYG_WORD code, CYG_ADDRWORD data );
+
+// -------------------------------------------------------------------------
+// Exception control class. Depending on the configuration there is either
+// one of these per thread, or one for the entire system.
+
+#ifdef CYGPKG_KERNEL_EXCEPTIONS
+
+class Cyg_Exception_Control
+{
+
+#ifdef CYGSEM_KERNEL_EXCEPTIONS_DECODE
+ cyg_exception_handler *exception_handler[CYGNUM_HAL_EXCEPTION_COUNT];
+
+ CYG_ADDRWORD exception_data[CYGNUM_HAL_EXCEPTION_COUNT];
+#else
+ cyg_exception_handler *exception_handler; // Handler function
+
+ CYG_ADDRWORD exception_data; // Handler data
+#endif
+
+public:
+
+ Cyg_Exception_Control();
+
+ // Register an exception handler for either the specific exception
+ // or for all exceptions.
+ void register_exception(
+ cyg_code exception_number, // exception number
+ cyg_exception_handler handler, // handler function
+ CYG_ADDRWORD data, // data argument
+ cyg_exception_handler **old_handler, // handler function
+ CYG_ADDRWORD *old_data // data argument
+ );
+
+ // Remove an exception handler.
+ void deregister_exception(
+ cyg_code exception_number // exception number
+ );
+
+ // Deliver the given exception now by invoking the appropriate
+ // exception handler.
+ void deliver_exception(
+ cyg_code exception_number, // exception being raised
+ CYG_ADDRWORD exception_info // exception specific info
+ );
+};
+
+#endif
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_EXCEPT_HXX
+// EOF except.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/flag.hxx b/cesar/ecos/packages/kernel/current/include/flag.hxx
new file mode 100644
index 0000000000..2f6a1ce35b
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/flag.hxx
@@ -0,0 +1,166 @@
+#ifndef CYGONCE_KERNEL_FLAG_HXX
+#define CYGONCE_KERNEL_FLAG_HXX
+
+//==========================================================================
+//
+// flag.hxx
+//
+// Flag object class declarations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1998-02-10
+// Purpose: Define Flag class interfaces
+// Description: The classes defined here provide the APIs for flags.
+// Usage: #include <cyg/kernel/flag.hxx>
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/thread.hxx> // Cyg_Thread
+
+// -------------------------------------------------------------------------
+
+// Flag object. This class implements a queue of threads waiting for a
+// boolean expression of the flag value (an integer) to become true; all
+// relevant threads are awoken, not just the first. A variant on this is
+// the single-bit flag, which is implemented by means of default arguments.
+
+#ifdef CYGIMP_FLAGS_16BIT
+typedef cyg_uint16 Cyg_FlagValue;
+#define CYG_FLAGS_SIZE 16
+#endif
+#ifdef CYGIMP_FLAGS_32BIT
+typedef cyg_uint32 Cyg_FlagValue;
+#define CYG_FLAGS_SIZE 32
+#endif
+#ifdef CYGIMP_FLAGS_64BIT
+typedef cyg_uint64 Cyg_FlagValue;
+#define CYG_FLAGS_SIZE 64
+#endif
+
+#ifndef CYG_FLAGS_SIZE
+typedef cyg_uint32 Cyg_FlagValue;
+#define CYG_FLAGS_SIZE 32
+#endif
+
+
+
+class Cyg_Flag
+{
+private:
+ Cyg_FlagValue value;
+
+ class FlagWaitInfo
+ {
+ public:
+ Cyg_FlagValue allmask; // these are separate words to
+ Cyg_FlagValue anymask; // save time in wakeup.
+ Cyg_FlagValue value_out; // return the value that satisfied
+ cyg_bool do_clear;
+
+ FlagWaitInfo() { value_out = 0; }
+ };
+
+ Cyg_ThreadQueue queue; // Queue of waiting threads
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ Cyg_Flag( Cyg_FlagValue init = 0 ); // Constructor
+ ~Cyg_Flag(); // Destructor
+
+ void
+ setbits( Cyg_FlagValue arg = ~0 ); // -OR- the arg in
+ // not inlined; this function awakens affected threads.
+
+ void
+ maskbits( Cyg_FlagValue arg = 0 ); // -AND- it in
+ // this is not inlined because it needs to lock the scheduler;
+ // it only really does value &= arg; nobody can be awoken in consequence.
+
+ typedef cyg_uint8 WaitMode;
+ // These values are chosen to map directly to uITRON for emulation
+ // purposes:
+ static const WaitMode AND = 0; // all specified bits must be set
+ static const WaitMode OR = 2; // any specified bit must be set
+ static const WaitMode CLR = 1; // clear value when satisfied
+ static const WaitMode MASK= 3; // might be useful
+
+ // Wait for a match on our pattern, according to the flags given.
+ // Return the matching value, or zero if interrupted.
+ Cyg_FlagValue
+ wait( Cyg_FlagValue pattern, WaitMode mode );
+
+ // Wait for a match on our pattern, with an absolute timeout.
+ // Return the matching value, or zero if timed out/interrupted.
+ // (zero cannot match any pattern).
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ Cyg_FlagValue
+ wait( Cyg_FlagValue pattern, WaitMode mode,
+ cyg_tick_count abs_timeout );
+#endif
+ // Test for a match on our pattern, according to the flags given.
+ // Return the matching value if success, else zero.
+ Cyg_FlagValue
+ poll( Cyg_FlagValue pattern, WaitMode mode );
+
+ inline Cyg_FlagValue
+ peek() // Get current value
+ {
+ return value; // NOT atomic wrt threads
+ }
+
+ inline cyg_bool
+ waiting() // Any threads waiting?
+ {
+ return !queue.empty();
+ }
+};
+
+
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_FLAG_HXX
+// EOF flag.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/instrmnt.h b/cesar/ecos/packages/kernel/current/include/instrmnt.h
new file mode 100644
index 0000000000..d17b261d5e
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/instrmnt.h
@@ -0,0 +1,465 @@
+#ifndef CYGONCE_KERNEL_INSTRMNT_HXX
+#define CYGONCE_KERNEL_INSTRMNT_HXX
+
+//==========================================================================
+//
+// instrmnt.hxx
+//
+// Kernel Instrumentation mechanism
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg, andrew.lunn@ascom.ch
+// Date: 2000-05-04
+// Purpose: Define kernel instrumentation
+// Description: A set of definitions and macros used to implement an
+// instrumentation interface for the kernel.
+// NOTE: Don't use CYG_UNUSED_PARAM (or similar) here to
+// silence warnings about unused variables when using the
+// empty macro definitions. Otherwise this can cause problems
+// with volatile arguments and cause other side-effects.
+// Instead it is up to the caller to ensure that unused
+// arguments don't cause warnings
+// Usage: #include <cyg/kernel/instrmnt.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+// -------------------------------------------------------------------------
+// Underlying instrumentation function
+
+externC void cyg_instrument( cyg_uint32 type, CYG_ADDRWORD arg1, CYG_ADDRWORD arg2 );
+
+// -------------------------------------------------------------------------
+// The following functions are used to enable and disable specific
+// instrumentation classes and events. The class must be one of the
+// class defines below. The event may be one of the event defines below
+// or zero, in which case all of the events in the class are enabled or
+// disabled.
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_FLAGS
+
+externC void cyg_instrument_enable( cyg_uint32 cl, cyg_uint32 event );
+
+externC void cyg_instrument_disable( cyg_uint32 cl, cyg_uint32 event );
+
+externC cyg_bool cyg_instrument_state( cyg_uint32 cl, cyg_uint32 event );
+
+#endif
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_MSGS
+externC char * cyg_instrument_msg(CYG_WORD16 type);
+#endif
+
+// -------------------------------------------------------------------------
+// Instrumentation macros
+
+#ifdef CYGPKG_KERNEL_INSTRUMENT
+
+#define CYG_INSTRUMENT(_type_,_arg1_,_arg2_) cyg_instrument(_type_, (CYG_ADDRWORD)(_arg1_), (CYG_ADDRWORD)(_arg2_))
+
+#else // ifdef CYGPKG_KERNEL_INSTRUMENT
+
+#define CYG_INSTRUMENT(_type_,_arg1_,_arg2_)
+
+#endif // ifdef CYGPKG_KERNEL_INSTRUMENT
+
+// -------------------------------------------------------------------------
+// Type codes.
+// Each code is 16 bit with an event class in the top 8 bits
+// and an event code in the lower 8 bits.
+
+// Event classes
+#define CYG_INSTRUMENT_CLASS_SCHED 0x0100
+#define CYG_INSTRUMENT_CLASS_THREAD 0x0200
+#define CYG_INSTRUMENT_CLASS_INTR 0x0300
+#define CYG_INSTRUMENT_CLASS_MUTEX 0x0400
+#define CYG_INSTRUMENT_CLASS_CONDVAR 0x0500
+#define CYG_INSTRUMENT_CLASS_BINSEM 0x0600
+#define CYG_INSTRUMENT_CLASS_CNTSEM 0x0700
+#define CYG_INSTRUMENT_CLASS_CLOCK 0x0800
+#define CYG_INSTRUMENT_CLASS_ALARM 0x0900
+#define CYG_INSTRUMENT_CLASS_MBOXT 0x0a00
+#define CYG_INSTRUMENT_CLASS_SMP 0x0b00
+#define CYG_INSTRUMENT_CLASS_MLQ 0x0c00
+
+#define CYG_INSTRUMENT_CLASS_USER 0x0f00
+
+#define CYG_INSTRUMENT_CLASS_MAX CYG_INSTRUMENT_CLASS_USER
+
+// Scheduler events
+#define CYG_INSTRUMENT_EVENT_SCHED_LOCK 1
+#define CYG_INSTRUMENT_EVENT_SCHED_UNLOCK 2
+#define CYG_INSTRUMENT_EVENT_SCHED_RESCHEDULE 3
+#define CYG_INSTRUMENT_EVENT_SCHED_TIMESLICE 4
+
+// Thread events
+#define CYG_INSTRUMENT_EVENT_THREAD_SWITCH 1
+#define CYG_INSTRUMENT_EVENT_THREAD_SLEEP 2
+#define CYG_INSTRUMENT_EVENT_THREAD_WAKE 3
+#define CYG_INSTRUMENT_EVENT_THREAD_SUSPEND 4
+#define CYG_INSTRUMENT_EVENT_THREAD_RESUME 5
+#define CYG_INSTRUMENT_EVENT_THREAD_PRIORITY 6
+#define CYG_INSTRUMENT_EVENT_THREAD_DELAY 7
+#define CYG_INSTRUMENT_EVENT_THREAD_ALARM 8
+#define CYG_INSTRUMENT_EVENT_THREAD_ENTER 9
+#define CYG_INSTRUMENT_EVENT_THREAD_CHECK_STACK 10
+#define CYG_INSTRUMENT_EVENT_THREAD_ATTACH_STACK 11
+#define CYG_INSTRUMENT_EVENT_THREAD_CREATE 12
+
+// Interrupt events
+#define CYG_INSTRUMENT_EVENT_INTR_RAISE 1
+#define CYG_INSTRUMENT_EVENT_INTR_END 2
+#define CYG_INSTRUMENT_EVENT_INTR_RESTORE 3
+#define CYG_INSTRUMENT_EVENT_INTR_POST_DSR 4
+#define CYG_INSTRUMENT_EVENT_INTR_CALL_DSR 5
+#define CYG_INSTRUMENT_EVENT_INTR_ATTACH 6
+#define CYG_INSTRUMENT_EVENT_INTR_DETACH 7
+#define CYG_INSTRUMENT_EVENT_INTR_SET_VSR 8
+#define CYG_INSTRUMENT_EVENT_INTR_DISABLE 9
+#define CYG_INSTRUMENT_EVENT_INTR_ENABLE 10
+#define CYG_INSTRUMENT_EVENT_INTR_MASK 11
+#define CYG_INSTRUMENT_EVENT_INTR_UNMASK 12
+#define CYG_INSTRUMENT_EVENT_INTR_CONFIGURE 13
+#define CYG_INSTRUMENT_EVENT_INTR_ACK 14
+#define CYG_INSTRUMENT_EVENT_INTR_CHAIN_ISR 15
+#define CYG_INSTRUMENT_EVENT_INTR_SET_CPU 16
+#define CYG_INSTRUMENT_EVENT_INTR_GET_CPU 17
+
+// Mutex events
+#define CYG_INSTRUMENT_EVENT_MUTEX_LOCK 1
+#define CYG_INSTRUMENT_EVENT_MUTEX_WAIT 2
+#define CYG_INSTRUMENT_EVENT_MUTEX_LOCKED 3
+#define CYG_INSTRUMENT_EVENT_MUTEX_TRY 4
+#define CYG_INSTRUMENT_EVENT_MUTEX_UNLOCK 5
+#define CYG_INSTRUMENT_EVENT_MUTEX_WAKE 6
+#define CYG_INSTRUMENT_EVENT_MUTEX_RELEASE 7
+#define CYG_INSTRUMENT_EVENT_MUTEX_RELEASED 8
+
+// Condition variable events
+#define CYG_INSTRUMENT_EVENT_CONDVAR_WAIT 1
+#define CYG_INSTRUMENT_EVENT_CONDVAR_WOKE 2
+#define CYG_INSTRUMENT_EVENT_CONDVAR_SIGNAL 3
+#define CYG_INSTRUMENT_EVENT_CONDVAR_WAKE 4
+#define CYG_INSTRUMENT_EVENT_CONDVAR_BROADCAST 5
+#define CYG_INSTRUMENT_EVENT_CONDVAR_TIMED_WAIT 6
+
+// Binary semaphore events
+#define CYG_INSTRUMENT_EVENT_BINSEM_CLAIM 1
+#define CYG_INSTRUMENT_EVENT_BINSEM_WAIT 2
+#define CYG_INSTRUMENT_EVENT_BINSEM_WOKE 3
+#define CYG_INSTRUMENT_EVENT_BINSEM_TRY 4
+#define CYG_INSTRUMENT_EVENT_BINSEM_POST 5
+#define CYG_INSTRUMENT_EVENT_BINSEM_WAKE 6
+#define CYG_INSTRUMENT_EVENT_BINSEM_TIMEOUT 7
+
+// Counting semaphore events
+#define CYG_INSTRUMENT_EVENT_CNTSEM_CLAIM 1
+#define CYG_INSTRUMENT_EVENT_CNTSEM_WAIT 2
+#define CYG_INSTRUMENT_EVENT_CNTSEM_WOKE 3
+#define CYG_INSTRUMENT_EVENT_CNTSEM_TRY 4
+#define CYG_INSTRUMENT_EVENT_CNTSEM_POST 5
+#define CYG_INSTRUMENT_EVENT_CNTSEM_WAKE 6
+#define CYG_INSTRUMENT_EVENT_CNTSEM_TIMEOUT 7
+
+// Clock events
+#define CYG_INSTRUMENT_EVENT_CLOCK_TICK_START 1
+#define CYG_INSTRUMENT_EVENT_CLOCK_TICK_END 2
+#define CYG_INSTRUMENT_EVENT_CLOCK_ISR 3
+
+// Alarm events
+#define CYG_INSTRUMENT_EVENT_ALARM_ADD 1
+#define CYG_INSTRUMENT_EVENT_ALARM_REM 2
+#define CYG_INSTRUMENT_EVENT_ALARM_CALL 3
+#define CYG_INSTRUMENT_EVENT_ALARM_INIT 4
+#define CYG_INSTRUMENT_EVENT_ALARM_TRIGGER 5
+#define CYG_INSTRUMENT_EVENT_ALARM_INTERVAL 6
+
+// Mboxt events
+#define CYG_INSTRUMENT_EVENT_MBOXT_WAIT 1
+#define CYG_INSTRUMENT_EVENT_MBOXT_GET 2
+#define CYG_INSTRUMENT_EVENT_MBOXT_GOT 3
+#define CYG_INSTRUMENT_EVENT_MBOXT_TIMEOUT 4
+#define CYG_INSTRUMENT_EVENT_MBOXT_WAKE 5
+#define CYG_INSTRUMENT_EVENT_MBOXT_TRY 6
+#define CYG_INSTRUMENT_EVENT_MBOXT_PUT 7
+
+// SMP events
+#define CYG_INSTRUMENT_EVENT_SMP_LOCK_INC 1
+#define CYG_INSTRUMENT_EVENT_SMP_LOCK_ZERO 2
+#define CYG_INSTRUMENT_EVENT_SMP_LOCK_SET 3
+#define CYG_INSTRUMENT_EVENT_SMP_CPU_START 4
+#define CYG_INSTRUMENT_EVENT_SMP_LOCK_WAIT 5
+#define CYG_INSTRUMENT_EVENT_SMP_LOCK_GOT 6
+#define CYG_INSTRUMENT_EVENT_SMP_RESCHED_SEND 8
+#define CYG_INSTRUMENT_EVENT_SMP_RESCHED_RECV 9
+
+// MLQ scheduler events
+
+#define CYG_INSTRUMENT_EVENT_MLQ_SCHEDULE 1
+#define CYG_INSTRUMENT_EVENT_MLQ_RESCHEDULE 2
+#define CYG_INSTRUMENT_EVENT_MLQ_ADD 3
+#define CYG_INSTRUMENT_EVENT_MLQ_REM 4
+#define CYG_INSTRUMENT_EVENT_MLQ_TIMESLICE 5
+#define CYG_INSTRUMENT_EVENT_MLQ_YIELD 6
+#define CYG_INSTRUMENT_EVENT_MLQ_ENQUEUE 7
+#define CYG_INSTRUMENT_EVENT_MLQ_DEQUEUE 8
+#define CYG_INSTRUMENT_EVENT_MLQ_REMOVE 9
+
+
+// User events
+
+#define CYG_INSTRUMENT_EVENT_USER_1 1
+#define CYG_INSTRUMENT_EVENT_USER_2 2
+#define CYG_INSTRUMENT_EVENT_USER_3 3
+#define CYG_INSTRUMENT_EVENT_USER_4 4
+#define CYG_INSTRUMENT_EVENT_USER_5 5
+#define CYG_INSTRUMENT_EVENT_USER_6 6
+#define CYG_INSTRUMENT_EVENT_USER_7 7
+#define CYG_INSTRUMENT_EVENT_USER_8 8
+#define CYG_INSTRUMENT_EVENT_USER_9 9
+#define CYG_INSTRUMENT_EVENT_USER_10 10
+#define CYG_INSTRUMENT_EVENT_USER_11 11
+#define CYG_INSTRUMENT_EVENT_USER_12 12
+#define CYG_INSTRUMENT_EVENT_USER_13 13
+#define CYG_INSTRUMENT_EVENT_USER_14 14
+#define CYG_INSTRUMENT_EVENT_USER_15 15
+#define CYG_INSTRUMENT_EVENT_USER_16 16
+#define CYG_INSTRUMENT_EVENT_USER_17 17
+#define CYG_INSTRUMENT_EVENT_USER_18 18
+#define CYG_INSTRUMENT_EVENT_USER_19 19
+
+// -------------------------------------------------------------------------
+// Handy-dandy macro to make event codes.
+// Note that this relies on the definitions above
+// having a well defined form.
+
+#define CYGINST_EVENT(_class_,_event_) \
+((CYG_INSTRUMENT_CLASS_##_class_)|(CYG_INSTRUMENT_EVENT_##_class_##_##_event_))
+
+// -------------------------------------------------------------------------
+// Scheduler instrumentation macros
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_SCHED
+
+#define CYG_INSTRUMENT_SCHED(_event_,_arg1_,_arg2_) \
+ CYG_INSTRUMENT(CYGINST_EVENT(SCHED,_event_),_arg1_,_arg2_)
+
+#else
+
+#define CYG_INSTRUMENT_SCHED(_event_,_arg1_,_arg2_)
+
+#endif
+
+// -------------------------------------------------------------------------
+// Thread instrumentation macros
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_THREAD
+
+#define CYG_INSTRUMENT_THREAD(_event_,_arg1_,_arg2_) \
+ CYG_INSTRUMENT(CYGINST_EVENT(THREAD,_event_),_arg1_,_arg2_)
+
+#else
+
+#define CYG_INSTRUMENT_THREAD(_event_,_arg1_,_arg2_)
+
+#endif
+
+// -------------------------------------------------------------------------
+// Interrupt instrumentation macros
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_INTR
+
+#define CYG_INSTRUMENT_INTR(_event_,_arg1_,_arg2_) \
+ CYG_INSTRUMENT(CYGINST_EVENT(INTR,_event_),_arg1_,_arg2_)
+
+#else
+
+#define CYG_INSTRUMENT_INTR(_event_,_arg1_,_arg2_)
+
+#endif
+
+// -------------------------------------------------------------------------
+// Mutex instrumentation macros
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_MUTEX
+
+#define CYG_INSTRUMENT_MUTEX(_event_,_arg1_,_arg2_) \
+ CYG_INSTRUMENT(CYGINST_EVENT(MUTEX,_event_),_arg1_,_arg2_)
+
+#else
+
+#define CYG_INSTRUMENT_MUTEX(_event_,_arg1_,_arg2_)
+
+#endif
+
+// -------------------------------------------------------------------------
+// Condition variable instrumentation macros
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_CONDVAR
+
+#define CYG_INSTRUMENT_CONDVAR(_event_,_arg1_,_arg2_) \
+ CYG_INSTRUMENT(CYGINST_EVENT(CONDVAR,_event_),_arg1_,_arg2_)
+
+#else
+
+#define CYG_INSTRUMENT_CONDVAR(_event_,_arg1_,_arg2_)
+
+#endif
+
+// -------------------------------------------------------------------------
+// Binary semaphore instrumentation macros
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_BINSEM
+
+#define CYG_INSTRUMENT_BINSEM(_event_,_arg1_,_arg2_) \
+ CYG_INSTRUMENT(CYGINST_EVENT(BINSEM,_event_),_arg1_,_arg2_)
+
+#else
+
+#define CYG_INSTRUMENT_BINSEM(_event_,_arg1_,_arg2_)
+
+#endif
+
+// -------------------------------------------------------------------------
+// Counting semaphore instrumentation macros
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_CNTSEM
+
+#define CYG_INSTRUMENT_CNTSEM(_event_,_arg1_,_arg2_) \
+ CYG_INSTRUMENT(CYGINST_EVENT(CNTSEM,_event_),_arg1_,_arg2_)
+
+#else
+
+#define CYG_INSTRUMENT_CNTSEM(_event_,_arg1_,_arg2_)
+
+#endif
+
+// -------------------------------------------------------------------------
+// Clock instrumentation macros
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_CLOCK
+
+#define CYG_INSTRUMENT_CLOCK(_event_,_arg1_,_arg2_) \
+ CYG_INSTRUMENT(CYGINST_EVENT(CLOCK,_event_),_arg1_,_arg2_)
+
+#else
+
+#define CYG_INSTRUMENT_CLOCK(_event_,_arg1_,_arg2_)
+
+#endif
+
+// -------------------------------------------------------------------------
+// Alarm instrumentation macros
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_ALARM
+
+#define CYG_INSTRUMENT_ALARM(_event_,_arg1_,_arg2_) \
+ CYG_INSTRUMENT(CYGINST_EVENT(ALARM,_event_),_arg1_,_arg2_)
+
+#else
+
+#define CYG_INSTRUMENT_ALARM(_event_,_arg1_,_arg2_)
+
+#endif
+
+// -------------------------------------------------------------------------
+// Mboxt instrumentation macros
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_MBOXT
+
+#define CYG_INSTRUMENT_MBOXT(_event_,_arg1_,_arg2_) \
+ CYG_INSTRUMENT(CYGINST_EVENT(MBOXT,_event_),_arg1_,_arg2_)
+
+#else
+
+#define CYG_INSTRUMENT_MBOXT(_event_,_arg1_,_arg2_)
+
+#endif
+
+// -------------------------------------------------------------------------
+// SMP instrumentation
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_SMP
+
+#define CYG_INSTRUMENT_SMP(_event_,_arg1_,_arg2_) \
+ CYG_INSTRUMENT(CYGINST_EVENT(SMP,_event_),_arg1_,_arg2_)
+
+#else
+
+#define CYG_INSTRUMENT_SMP(_event_,_arg1_,_arg2_)
+
+#endif
+
+
+// -------------------------------------------------------------------------
+// MLQ instrumentation
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_MLQ
+
+#define CYG_INSTRUMENT_MLQ(_event_,_arg1_,_arg2_) \
+ CYG_INSTRUMENT(CYGINST_EVENT(MLQ,_event_),_arg1_,_arg2_)
+
+#else
+
+#define CYG_INSTRUMENT_MLQ(_event_,_arg1_,_arg2_)
+
+#endif
+
+// -------------------------------------------------------------------------
+// User instrumentation
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_USER
+
+#define CYG_INSTRUMENT_USER(_event_,_arg1_,_arg2_) \
+ CYG_INSTRUMENT((CYG_INSTRUMENT_CLASS_USER|(_event_)),_arg1_,_arg2_)
+
+#else
+
+#define CYG_INSTRUMENT_USER(_event_,_arg1_,_arg2_)
+
+#endif
+
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_INSTRMNT_HXX
+// EOF instrmnt.h
diff --git a/cesar/ecos/packages/kernel/current/include/instrument_desc.h b/cesar/ecos/packages/kernel/current/include/instrument_desc.h
new file mode 100644
index 0000000000..03d0445654
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/instrument_desc.h
@@ -0,0 +1,143 @@
+/* This is an automatically generated file. Do not edit. */
+/* Repository name: PACKAGES/kernel/VERSION/include/instrument_desc.h */
+/* Install tree : INSTALL/include/cyg/kernel/instrument_desc.h */
+
+struct instrument_desc_s {
+ char * msg;
+ CYG_WORD num;
+};
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_MSGS_DEFINE_TABLE
+struct instrument_desc_s instrument_desc[] = {
+{"ALARM", 0x0900},
+{"ALARM_ADD", 1},
+{"ALARM_CALL", 3},
+{"ALARM_INIT", 4},
+{"ALARM_INTERVAL", 6},
+{"ALARM_REM", 2},
+{"ALARM_TRIGGER", 5},
+{"BINSEM", 0x0600},
+{"BINSEM_CLAIM", 1},
+{"BINSEM_POST", 5},
+{"BINSEM_TRY", 4},
+{"BINSEM_WAIT", 2},
+{"BINSEM_WAKE", 6},
+{"BINSEM_WOKE", 3},
+{"CLOCK", 0x0800},
+{"CLOCK_ISR", 3},
+{"CLOCK_TICK_END", 2},
+{"CLOCK_TICK_START", 1},
+{"CNTSEM", 0x0700},
+{"CNTSEM_CLAIM", 1},
+{"CNTSEM_POST", 5},
+{"CNTSEM_TIMEOUT", 7},
+{"CNTSEM_TRY", 4},
+{"CNTSEM_WAIT", 2},
+{"CNTSEM_WAKE", 6},
+{"CNTSEM_WOKE", 3},
+{"CONDVAR", 0x0500},
+{"CONDVAR_BROADCAST", 5},
+{"CONDVAR_SIGNAL", 3},
+{"CONDVAR_TIMED_WAIT", 6},
+{"CONDVAR_WAIT", 1},
+{"CONDVAR_WAKE", 4},
+{"CONDVAR_WOKE", 2},
+{"INTR", 0x0300},
+{"INTR_ACK", 14},
+{"INTR_ATTACH", 6},
+{"INTR_CALL_DSR", 5},
+{"INTR_CHAIN_ISR", 15},
+{"INTR_CONFIGURE", 13},
+{"INTR_DETACH", 7},
+{"INTR_DISABLE", 9},
+{"INTR_ENABLE", 10},
+{"INTR_END", 2},
+{"INTR_GET_CPU", 17},
+{"INTR_MASK", 11},
+{"INTR_POST_DSR", 4},
+{"INTR_RAISE", 1},
+{"INTR_RESTORE", 3},
+{"INTR_SET_CPU", 16},
+{"INTR_SET_VSR", 8},
+{"INTR_UNMASK", 12},
+{"MBOXT", 0x0a00},
+{"MBOXT_GET", 2},
+{"MBOXT_GOT", 3},
+{"MBOXT_PUT", 7},
+{"MBOXT_TIMEOUT", 4},
+{"MBOXT_TRY", 6},
+{"MBOXT_WAIT", 1},
+{"MBOXT_WAKE", 5},
+{"MLQ", 0x0c00},
+{"MLQ_ADD", 3},
+{"MLQ_DEQUEUE", 8},
+{"MLQ_ENQUEUE", 7},
+{"MLQ_REM", 4},
+{"MLQ_REMOVE", 9},
+{"MLQ_RESCHEDULE", 2},
+{"MLQ_SCHEDULE", 1},
+{"MLQ_TIMESLICE", 5},
+{"MLQ_YIELD", 6},
+{"MUTEX", 0x0400},
+{"MUTEX_LOCK", 1},
+{"MUTEX_LOCKED", 3},
+{"MUTEX_RELEASE", 7},
+{"MUTEX_RELEASED", 8},
+{"MUTEX_TRY", 4},
+{"MUTEX_UNLOCK", 5},
+{"MUTEX_WAIT", 2},
+{"MUTEX_WAKE", 6},
+{"SCHED", 0x0100},
+{"SCHED_LOCK", 1},
+{"SCHED_RESCHEDULE", 3},
+{"SCHED_TIMESLICE", 4},
+{"SCHED_UNLOCK", 2},
+{"SMP", 0x0b00},
+{"SMP_CPU_START", 4},
+{"SMP_LOCK_GOT", 6},
+{"SMP_LOCK_INC", 1},
+{"SMP_LOCK_SET", 3},
+{"SMP_LOCK_WAIT", 5},
+{"SMP_LOCK_ZERO", 2},
+{"SMP_RESCHED_RECV", 9},
+{"SMP_RESCHED_SEND", 8},
+{"THREAD", 0x0200},
+{"THREAD_ALARM", 8},
+{"THREAD_ATTACH_STACK", 11},
+{"THREAD_CHECK_STACK", 10},
+{"THREAD_CREATE", 12},
+{"THREAD_DELAY", 7},
+{"THREAD_ENTER", 9},
+{"THREAD_PRIORITY", 6},
+{"THREAD_RESUME", 5},
+{"THREAD_SLEEP", 2},
+{"THREAD_SUSPEND", 4},
+{"THREAD_SWITCH", 1},
+{"THREAD_WAKE", 3},
+{"USER", 0x0f00},
+{"USER_10", 10},
+{"USER_1", 1},
+{"USER_11", 11},
+{"USER_12", 12},
+{"USER_13", 13},
+{"USER_14", 14},
+{"USER_15", 15},
+{"USER_16", 16},
+{"USER_17", 17},
+{"USER_18", 18},
+{"USER_19", 19},
+{"USER_2", 2},
+{"USER_3", 3},
+{"USER_4", 4},
+{"USER_5", 5},
+{"USER_6", 6},
+{"USER_7", 7},
+{"USER_8", 8},
+{"USER_9", 9},
+{ 0, 0 }
+};
+#else /* CYGDBG_KERNEL_INSTRUMENT_MSGS_DEFINE_TABLE */
+extern struct instrument_desc_s instrument_desc[];
+#endif /* CYGDBG_KERNEL_INSTRUMENT_MSGS_DEFINE_TABLE */
+
+/* EOF instrument_desc.h */
diff --git a/cesar/ecos/packages/kernel/current/include/intr.hxx b/cesar/ecos/packages/kernel/current/include/intr.hxx
new file mode 100644
index 0000000000..7c39d16a5d
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/intr.hxx
@@ -0,0 +1,371 @@
+#ifndef CYGONCE_KERNEL_INTR_HXX
+#define CYGONCE_KERNEL_INTR_HXX
+
+//==========================================================================
+//
+// intr.hxx
+//
+// Interrupt class declaration(s)
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-09
+// Purpose: Define Interrupt class interfaces
+// Description: The classes defined here provide the APIs for handling
+// interrupts.
+// Usage: #include "intr.hxx"
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+
+#include <cyg/kernel/smp.hxx>
+
+// -------------------------------------------------------------------------
+// Default definitions
+
+// Some HALs define the ISR table to be a different size to the number
+// of ISR vectors. These HALs will define CYGNUM_HAL_ISR_TABLE_SIZE. All
+// other HALs will have the table size equal to the number of vectors.
+
+#ifndef CYGNUM_HAL_ISR_TABLE_SIZE
+# define CYGNUM_HAL_ISR_TABLE_SIZE CYGNUM_HAL_ISR_COUNT
+#endif
+
+// -------------------------------------------------------------------------
+// Function prototype typedefs
+
+
+// VSR = Vector Service Routine. This is the code attached directly to an
+// interrupt vector. It is very architecture/platform specific and usually
+// must be written in assembler.
+
+typedef void cyg_VSR();
+
+// ISR = Interrupt Service Routine. This is called from the default
+// VSR in response to an interrupt. It may access shared data but may
+// not call kernel routines. The return value may be
+// Cyg_Interrupt::HANDLED and/or Cyg_Interrupt::CALL_DSR.
+
+typedef cyg_uint32 cyg_ISR(cyg_vector vector, CYG_ADDRWORD data);
+
+// DSR = Deferred Service Routine. This is called if the ISR returns
+// the Cyg_Interrupt::CALL_DSR bit. It is called at a "safe" point in
+// the kernel where it may make calls on kernel routines. The count
+// argument indicates how many times the ISR has asked for the DSR to
+// be posted since the last time the DSR ran.
+
+typedef void cyg_DSR(cyg_vector vector, cyg_ucount32 count, CYG_ADDRWORD data);
+
+// -------------------------------------------------------------------------
+// Include HAL definitions
+
+class Cyg_Interrupt;
+
+#include <cyg/hal/hal_arch.h>
+
+#include <cyg/hal/hal_intr.h>
+
+#ifndef HAL_INTERRUPT_STACK_CALL_PENDING_DSRS
+#define HAL_INTERRUPT_STACK_CALL_PENDING_DSRS() \
+ Cyg_Interrupt::call_pending_DSRs_inner()
+#endif
+
+externC void interrupt_end(
+ cyg_uint32 isr_ret,
+ Cyg_Interrupt *intr,
+ HAL_SavedRegisters *ctx
+ );
+
+externC void cyg_interrupt_post_dsr( CYG_ADDRWORD intr_obj );
+externC void cyg_interrupt_call_pending_DSRs( void );
+
+// -------------------------------------------------------------------------
+// Interrupt class. This both represents each interrupt and provides a static
+// interface for controlling the interrupt hardware.
+
+class Cyg_Interrupt
+{
+
+ friend class Cyg_Scheduler;
+ friend void interrupt_end( cyg_uint32,
+ Cyg_Interrupt *,
+ HAL_SavedRegisters *);
+ friend void cyg_interrupt_post_dsr( CYG_ADDRWORD intr_obj );
+ friend void cyg_interrupt_call_pending_DSRs( void );
+
+ cyg_vector vector; // Interrupt vector
+
+ cyg_priority priority; // Queuing priority
+
+ cyg_ISR *isr; // Pointer to ISR
+
+ cyg_DSR *dsr; // Pointer to DSR
+
+ CYG_ADDRWORD data; // Data pointer
+
+
+
+ // DSR handling interface called by the scheduler
+
+ // Check for pending DSRs
+ static cyg_bool DSRs_pending();
+
+ // Call any pending DSRs
+ static void call_pending_DSRs();
+ static void call_pending_DSRs_inner();
+
+ // DSR handling interface called by the scheduler and HAL
+ // interrupt arbiters.
+
+ void post_dsr(); // Post the DSR for this interrupt
+
+
+
+ // Data structures for handling DSR calls. We implement two DSR
+ // handling mechanisms, a list based one and a table based
+ // one. The list based mechanism is safe with respect to temporary
+ // overloads and will not run out of resource. However it requires
+ // extra data per interrupt object, and interrupts must be turned
+ // off briefly when delivering the DSR. The table based mechanism
+ // does not need unnecessary interrupt switching, but may be prone
+ // to overflow on overload. However, since a correctly programmed
+ // real time application should not experience such a condition,
+ // the table based mechanism is more efficient for real use. The
+ // list based mechainsm is enabled by default since it is safer to
+ // use during development.
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE
+
+ static Cyg_Interrupt *dsr_table[CYGNUM_KERNEL_CPU_MAX]
+ [CYGNUM_KERNEL_INTERRUPTS_DSRS_TABLE_SIZE]
+ CYGBLD_ANNOTATE_VARIABLE_INTR;
+
+ static cyg_ucount32 dsr_table_head[CYGNUM_KERNEL_CPU_MAX]
+ CYGBLD_ANNOTATE_VARIABLE_INTR;
+
+ static volatile cyg_ucount32 dsr_table_tail[CYGNUM_KERNEL_CPU_MAX]
+ CYGBLD_ANNOTATE_VARIABLE_INTR;
+
+#endif
+#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST
+
+ // Number of DSR posts made
+ volatile cyg_ucount32 dsr_count CYGBLD_ANNOTATE_VARIABLE_INTR;
+
+ // next DSR in list
+ Cyg_Interrupt* volatile next_dsr CYGBLD_ANNOTATE_VARIABLE_INTR;
+
+ // static list of pending DSRs
+ static Cyg_Interrupt* volatile dsr_list[CYGNUM_KERNEL_CPU_MAX]
+ CYGBLD_ANNOTATE_VARIABLE_INTR;
+
+#endif
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_CHAIN
+
+ // The default mechanism for handling interrupts is to attach just
+ // one Interrupt object to each vector. In some cases, and on some
+ // hardware, this is not possible, and each vector must carry a chain
+ // of interrupts.
+
+ Cyg_Interrupt *next; // Next Interrupt in list
+
+ // Chaining ISR inserted in HAL vector
+ static cyg_uint32 chain_isr(cyg_vector vector, CYG_ADDRWORD data);
+
+ // Table of interrupt chains
+ static Cyg_Interrupt *chain_list[CYGNUM_HAL_ISR_TABLE_SIZE];
+
+#endif
+
+ // Interrupt disable data. Interrupt disable can be nested. On
+ // each CPU this is controlled by disable_counter[cpu]. When the
+ // counter is first incremented from zero to one, the
+ // interrupt_disable_spinlock is claimed using spin_intsave(), the
+ // original interrupt enable state being saved in
+ // interrupt_disable_state[cpu]. When the counter is decremented
+ // back to zero the spinlock is cleared using clear_intsave().
+
+ // The spinlock is necessary in SMP systems since a thread
+ // accessing data shared with an ISR may be scheduled on a
+ // different CPU to the one that handles the interrupt. So, merely
+ // blocking local interrupts would be ineffective. SMP aware
+ // device drivers should either use their own spinlocks to protect
+ // data, or use the API supported by this class, via
+ // cyg_drv_isr_lock()/_unlock(). Note that it now becomes
+ // essential that ISRs do this if they are to be SMP-compatible.
+
+ // In a single CPU system, this mechanism reduces to just
+ // disabling/enabling interrupts.
+
+ // Disable level counter. This counts the number of times
+ // interrupts have been disabled.
+ static volatile cyg_int32 disable_counter[CYGNUM_KERNEL_CPU_MAX]
+ CYGBLD_ANNOTATE_VARIABLE_INTR;
+
+ // Interrupt disable spinlock. This is claimed by any CPU that has
+ // disabled interrupts via the Cyg_Interrupt API.
+ static Cyg_SpinLock interrupt_disable_spinlock CYGBLD_ANNOTATE_VARIABLE_INTR;
+
+ // Saved interrupt state. When each CPU first disables interrupts
+ // the original state of the interrupts are saved here to be
+ // restored later.
+ static CYG_INTERRUPT_STATE interrupt_disable_state[CYGNUM_KERNEL_CPU_MAX]
+ CYGBLD_ANNOTATE_VARIABLE_INTR;
+
+
+public:
+
+ Cyg_Interrupt // Initialize interrupt
+ (
+ cyg_vector vector, // Vector to attach to
+ cyg_priority priority, // Queue priority
+ CYG_ADDRWORD data, // Data pointer
+ cyg_ISR *isr, // Interrupt Service Routine
+ cyg_DSR *dsr // Deferred Service Routine
+ );
+
+ ~Cyg_Interrupt();
+
+ // ISR return values
+ enum {
+ HANDLED = 1, // Interrupt was handled
+ CALL_DSR = 2 // Schedule DSR
+ };
+
+ // Interrupt management
+
+ void attach(); // Attach to vector
+
+
+ void detach(); // Detach from vector
+
+
+ // Static Interrupt management functions
+
+ // Get the current service routine
+ static void get_vsr(cyg_vector vector, cyg_VSR **vsr);
+
+ // Install a vector service routine
+ static void set_vsr(
+ cyg_vector vector, // hardware vector to replace
+ cyg_VSR *vsr, // my new service routine
+ cyg_VSR **old = NULL // pointer to old vsr, if required
+ );
+
+
+ // Static interrupt masking functions
+
+ // Disable interrupts at the CPU
+ static void disable_interrupts();
+
+ // Re-enable CPU interrupts
+ static void enable_interrupts();
+
+ // Are interrupts enabled at the CPU?
+ static inline cyg_bool interrupts_enabled()
+ {
+ return (0 == disable_counter[CYG_KERNEL_CPU_THIS()]);
+ }
+
+ // Get the vector for the following calls
+ inline cyg_vector get_vector()
+ {
+ return vector;
+ }
+
+ // Static PIC control functions
+
+ // Mask a specific interrupt in a PIC
+ static void mask_interrupt(cyg_vector vector);
+ // The same but not interrupt safe
+ static void mask_interrupt_intunsafe(cyg_vector vector);
+
+ // Clear PIC mask
+ static void unmask_interrupt(cyg_vector vector);
+ // The same but not interrupt safe
+ static void unmask_interrupt_intunsafe(cyg_vector vector);
+
+ // Acknowledge interrupt at PIC
+ static void acknowledge_interrupt(cyg_vector vector);
+
+ // Change interrupt detection at PIC
+ static void configure_interrupt(
+ cyg_vector vector, // vector to control
+ cyg_bool level, // level or edge triggered
+ cyg_bool up // hi/lo level, rising/falling edge
+ );
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+
+ // SMP support for associating an interrupt with a specific CPU.
+
+ static void set_cpu( cyg_vector, HAL_SMP_CPU_TYPE cpu );
+ static HAL_SMP_CPU_TYPE get_cpu( cyg_vector );
+
+#endif
+};
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS
+// -------------------------------------------------------------------------
+// Check for pending DSRs
+
+inline cyg_bool Cyg_Interrupt::DSRs_pending()
+{
+ HAL_SMP_CPU_TYPE cpu = CYG_KERNEL_CPU_THIS();
+#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE
+
+ return dsr_table_head[cpu] != dsr_table_tail[cpu];
+
+#endif
+#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST
+
+ return dsr_list[cpu] != NULL;
+
+#endif
+};
+#endif // CYGIMP_KERNEL_INTERRUPTS_DSRS
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_INTR_HXX
+// EOF intr.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/kapi.h b/cesar/ecos/packages/kernel/current/include/kapi.h
new file mode 100644
index 0000000000..7b4964c698
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/kapi.h
@@ -0,0 +1,681 @@
+#ifndef CYGONCE_KERNEL_KAPI_H
+#define CYGONCE_KERNEL_KAPI_H
+
+/*==========================================================================
+//
+// kapi.h
+//
+// Native API for Kernel
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2002 Bart Veer
+// Copyright (C) 2002 Nick Garnett
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg, dsm
+// Contributors: nickg
+// Date: 1998-03-02
+// Purpose: Native API for Kernel
+// Description: This file describes the native API for using the kernel.
+// It is essentially a set of C wrappers for the C++ class
+// member functions.
+// Usage: #include <cyg/kernel/kapi.h>
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================*/
+
+#include <pkgconf/system.h>
+#include <pkgconf/kernel.h>
+
+#ifdef CYGFUN_KERNEL_API_C
+#include <cyg/infra/cyg_type.h>
+
+/*---------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* The following are derived types, they may have different */
+/* definitions from these depending on configuration. */
+
+typedef CYG_ADDRWORD cyg_addrword_t; /* May hold pointer or word */
+typedef cyg_addrword_t cyg_handle_t; /* Object handle */
+typedef cyg_uint32 cyg_priority_t; /* type for priorities */
+typedef cyg_int32 cyg_code_t; /* type for various codes */
+typedef cyg_uint32 cyg_vector_t; /* Interrupt vector id */
+typedef cyg_uint32 cyg_cpu_t; /* CPU id type */
+
+typedef cyg_uint64 cyg_tick_count_t;
+
+typedef int cyg_bool_t;
+
+/* Exception handler function definition */
+typedef void cyg_exception_handler_t(
+ cyg_addrword_t data,
+ cyg_code_t exception_number,
+ cyg_addrword_t info
+);
+
+/*---------------------------------------------------------------------------*/
+struct cyg_thread;
+typedef struct cyg_thread cyg_thread;
+
+struct cyg_interrupt;
+typedef struct cyg_interrupt cyg_interrupt;
+
+struct cyg_counter;
+typedef struct cyg_counter cyg_counter;
+
+struct cyg_clock;
+typedef struct cyg_clock cyg_clock;
+
+struct cyg_alarm;
+typedef struct cyg_alarm cyg_alarm;
+
+struct cyg_mbox;
+typedef struct cyg_mbox cyg_mbox;
+
+struct cyg_sem_t;
+typedef struct cyg_sem_t cyg_sem_t;
+
+struct cyg_flag_t;
+typedef struct cyg_flag_t cyg_flag_t;
+
+struct cyg_mutex_t;
+typedef struct cyg_mutex_t cyg_mutex_t;
+
+struct cyg_cond_t;
+typedef struct cyg_cond_t cyg_cond_t;
+
+struct cyg_spinlock_t;
+typedef struct cyg_spinlock_t cyg_spinlock_t;
+
+/*---------------------------------------------------------------------------*/
+/* Scheduler operations */
+
+/* Starts scheduler with created threads. Never returns. */
+void cyg_scheduler_start(void) __THROW CYGBLD_ATTRIB_NORET;
+
+/* Lock and unlock the scheduler. When the scheduler is */
+/* locked thread preemption is disabled. */
+void cyg_scheduler_lock(void) __THROW;
+
+void cyg_scheduler_unlock(void) __THROW;
+
+/* Just like 'cyg_scheduler_lock()', but never take the lock higher than 1 */
+/* Thus this call is safe even if the scheduler is already locked and a */
+/* subsequent call to 'cyg_scheduler_unlock()' will completely unlock. */
+void cyg_scheduler_safe_lock(void) __THROW;
+
+/* Read the scheduler lock value. */
+cyg_ucount32 cyg_scheduler_read_lock(void) __THROW;
+
+/*---------------------------------------------------------------------------*/
+/* Thread operations */
+
+typedef void cyg_thread_entry_t(cyg_addrword_t);
+
+void cyg_thread_create(
+ cyg_addrword_t sched_info, /* scheduling info (eg pri) */
+ cyg_thread_entry_t *entry, /* entry point function */
+ cyg_addrword_t entry_data, /* entry data */
+ char *name, /* optional thread name */
+ void *stack_base, /* stack base, NULL = alloc */
+ cyg_ucount32 stack_size, /* stack size, 0 = default */
+ cyg_handle_t *handle, /* returned thread handle */
+ cyg_thread *thread /* put thread here */
+) __THROW;
+
+void cyg_thread_exit(void) __THROW;
+
+/* It may be necessary to arrange for the victim to run for it to disappear */
+cyg_bool_t cyg_thread_delete(cyg_handle_t thread) __THROW; /* false if NOT deleted */
+
+void cyg_thread_suspend(cyg_handle_t thread) __THROW;
+
+void cyg_thread_resume(cyg_handle_t thread) __THROW;
+
+void cyg_thread_kill(cyg_handle_t thread) __THROW;
+
+void cyg_thread_release(cyg_handle_t thread) __THROW;
+
+void cyg_thread_yield(void) __THROW;
+
+cyg_handle_t cyg_thread_self(void) __THROW;
+
+cyg_handle_t cyg_thread_idle_thread(void) __THROW;
+
+/* Priority manipulation */
+
+void cyg_thread_set_priority(cyg_handle_t thread, cyg_priority_t priority ) __THROW;
+
+cyg_priority_t cyg_thread_get_priority(cyg_handle_t thread) __THROW;
+cyg_priority_t cyg_thread_get_current_priority(cyg_handle_t thread) __THROW;
+
+/* Deadline scheduling control (optional) */
+
+void cyg_thread_deadline_wait(
+ cyg_tick_count_t start_time, /* abs earliest start time */
+ cyg_tick_count_t run_time, /* worst case execution time */
+ cyg_tick_count_t deadline /* absolute deadline */
+) __THROW;
+
+void cyg_thread_delay(cyg_tick_count_t delay) __THROW;
+
+/* Stack information */
+cyg_addrword_t cyg_thread_get_stack_base(cyg_handle_t thread) __THROW;
+
+cyg_uint32 cyg_thread_get_stack_size(cyg_handle_t thread) __THROW;
+
+#ifdef CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT
+cyg_uint32 cyg_thread_measure_stack_usage(cyg_handle_t thread) __THROW;
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Thread enumeration and information */
+
+typedef struct
+{
+ cyg_handle_t handle;
+ cyg_uint16 id;
+ cyg_uint32 state;
+ char *name;
+ cyg_priority_t set_pri;
+ cyg_priority_t cur_pri;
+ cyg_addrword_t stack_base;
+ cyg_uint32 stack_size;
+ cyg_uint32 stack_used;
+} cyg_thread_info;
+
+cyg_bool_t cyg_thread_get_next( cyg_handle_t *thread, cyg_uint16 *id ) __THROW;
+
+cyg_bool_t cyg_thread_get_info( cyg_handle_t thread,
+ cyg_uint16 id,
+ cyg_thread_info *info ) __THROW;
+
+cyg_uint16 cyg_thread_get_id( cyg_handle_t thread ) __THROW;
+
+cyg_handle_t cyg_thread_find( cyg_uint16 id ) __THROW;
+
+/*---------------------------------------------------------------------------*/
+/* Per-thread Data */
+
+#ifdef CYGVAR_KERNEL_THREADS_DATA
+
+cyg_ucount32 cyg_thread_new_data_index(void) __THROW;
+
+void cyg_thread_free_data_index(cyg_ucount32 index) __THROW;
+
+CYG_ADDRWORD cyg_thread_get_data(cyg_ucount32 index) __THROW;
+
+CYG_ADDRWORD *cyg_thread_get_data_ptr(cyg_ucount32 index) __THROW;
+
+void cyg_thread_set_data(cyg_ucount32 index, CYG_ADDRWORD data) __THROW;
+
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Thread destructors */
+
+#ifdef CYGPKG_KERNEL_THREADS_DESTRUCTORS
+
+typedef void (*cyg_thread_destructor_fn)(cyg_addrword_t);
+
+cyg_bool_t cyg_thread_add_destructor( cyg_thread_destructor_fn fn,
+ cyg_addrword_t data ) __THROW;
+cyg_bool_t cyg_thread_rem_destructor( cyg_thread_destructor_fn fn,
+ cyg_addrword_t data ) __THROW;
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Exception handling. */
+
+/* Replace current exception handler, this may apply to either the */
+/* current thread, or to a global exception handler. The exception */
+/* number may be ignored, or used to specify a particular handler. */
+
+void cyg_exception_set_handler(
+ cyg_code_t exception_number,
+ cyg_exception_handler_t *new_handler,
+ cyg_addrword_t new_data,
+ cyg_exception_handler_t **old_handler,
+ cyg_addrword_t *old_data
+) __THROW;
+
+/* Clear exception hander to default value */
+void cyg_exception_clear_handler(
+ cyg_code_t exception_number
+) __THROW;
+
+/* Invoke exception handler */
+void cyg_exception_call_handler(
+ cyg_handle_t thread,
+ cyg_code_t exception_number,
+ cyg_addrword_t exception_info
+) __THROW;
+
+
+/*---------------------------------------------------------------------------*/
+/* Interrupt handling */
+typedef void cyg_VSR_t(void);
+typedef cyg_uint32 cyg_ISR_t(cyg_vector_t vector, cyg_addrword_t data);
+typedef void cyg_DSR_t( cyg_vector_t vector,
+ cyg_ucount32 count,
+ cyg_addrword_t data);
+
+
+enum cyg_ISR_results
+{
+ CYG_ISR_HANDLED = 1, /* Interrupt was handled */
+ CYG_ISR_CALL_DSR = 2 /* Schedule DSR */
+};
+
+void cyg_interrupt_create(
+ cyg_vector_t vector, /* Vector to attach to */
+ cyg_priority_t priority, /* Queue priority */
+ cyg_addrword_t data, /* Data pointer */
+ cyg_ISR_t *isr, /* Interrupt Service Routine */
+ cyg_DSR_t *dsr, /* Deferred Service Routine */
+ cyg_handle_t *handle, /* returned handle */
+ cyg_interrupt *intr /* put interrupt here */
+) __THROW;
+
+void cyg_interrupt_delete( cyg_handle_t interrupt ) __THROW;
+
+void cyg_interrupt_attach( cyg_handle_t interrupt ) __THROW;
+
+void cyg_interrupt_detach( cyg_handle_t interrupt ) __THROW;
+
+/* VSR manipulation */
+
+void cyg_interrupt_get_vsr(
+ cyg_vector_t vector, /* vector to get */
+ cyg_VSR_t **vsr /* vsr got */
+) __THROW;
+
+void cyg_interrupt_set_vsr(
+ cyg_vector_t vector, /* vector to set */
+ cyg_VSR_t *vsr /* vsr to set */
+) __THROW;
+
+/* CPU level interrupt mask */
+void cyg_interrupt_disable(void) __THROW;
+
+void cyg_interrupt_enable(void) __THROW;
+
+/* Interrupt controller access */
+void cyg_interrupt_mask(cyg_vector_t vector) __THROW;
+void cyg_interrupt_mask_intunsafe(cyg_vector_t vector) __THROW;
+
+void cyg_interrupt_unmask(cyg_vector_t vector) __THROW;
+void cyg_interrupt_unmask_intunsafe(cyg_vector_t vector) __THROW;
+
+void cyg_interrupt_acknowledge(cyg_vector_t vector) __THROW;
+
+void cyg_interrupt_configure(
+ cyg_vector_t vector, /* vector to configure */
+ cyg_bool_t level, /* level or edge triggered */
+ cyg_bool_t up /* rising/faling edge, high/low level*/
+) __THROW;
+
+void cyg_interrupt_set_cpu(
+ cyg_vector_t vector, /* vector to control */
+ cyg_cpu_t cpu /* CPU to set */
+) __THROW;
+
+cyg_cpu_t cyg_interrupt_get_cpu(
+ cyg_vector_t vector /* vector to control */
+) __THROW;
+
+/*---------------------------------------------------------------------------*/
+/* Counters, Clocks and Alarms */
+
+void cyg_counter_create(
+ cyg_handle_t *handle, /* returned counter handle */
+ cyg_counter *counter /* put counter here */
+) __THROW;
+
+void cyg_counter_delete(cyg_handle_t counter) __THROW;
+
+/* Return current value of counter */
+cyg_tick_count_t cyg_counter_current_value(cyg_handle_t counter) __THROW;
+
+/* Set new current value */
+void cyg_counter_set_value(
+ cyg_handle_t counter,
+ cyg_tick_count_t new_value
+) __THROW;
+
+/* Advance counter by one tick */
+void cyg_counter_tick(cyg_handle_t counter) __THROW;
+
+/* Advance counter by multiple ticks */
+void cyg_counter_multi_tick(cyg_handle_t counter, cyg_tick_count_t _ticks) __THROW;
+
+
+#define CYG_RESOLUTION_T_MEMBERS \
+ cyg_uint32 dividend; \
+ cyg_uint32 divisor;
+
+typedef struct
+{
+ CYG_RESOLUTION_T_MEMBERS
+} cyg_resolution_t;
+
+/* Create a clock object */
+void cyg_clock_create(
+ cyg_resolution_t resolution, /* Initial resolution */
+ cyg_handle_t *handle, /* Returned clock handle */
+ cyg_clock *clock /* put clock here */
+) __THROW;
+
+void cyg_clock_delete(cyg_handle_t clock) __THROW;
+
+/* convert a clock handle to a counter handle so we can use the */
+/* counter API on it. */
+void cyg_clock_to_counter(
+ cyg_handle_t clock,
+ cyg_handle_t *counter
+) __THROW;
+
+void cyg_clock_set_resolution(
+ cyg_handle_t clock,
+ cyg_resolution_t resolution /* New resolution */
+) __THROW;
+
+cyg_resolution_t cyg_clock_get_resolution(cyg_handle_t clock) __THROW;
+
+/* handle of real time clock */
+cyg_handle_t cyg_real_time_clock(void) __THROW;
+
+/* returns value of real time clock's counter.
+ This is the same as:
+ (cyg_clock_to_counter(cyg_real_time_clock(), &h),
+ cyg_counter_current_value(h)) */
+cyg_tick_count_t cyg_current_time(void) __THROW;
+
+/* Alarm handler function */
+typedef void cyg_alarm_t(cyg_handle_t alarm, cyg_addrword_t data);
+
+void cyg_alarm_create(
+ cyg_handle_t counter, /* Attached to this counter */
+ cyg_alarm_t *alarmfn, /* Call-back function */
+ cyg_addrword_t data, /* Call-back data */
+ cyg_handle_t *handle, /* Returned alarm object */
+ cyg_alarm *alarm /* put alarm here */
+) __THROW;
+
+/* Disable alarm, detach from counter and invalidate handles */
+void cyg_alarm_delete( cyg_handle_t alarm) __THROW;
+
+void cyg_alarm_initialize(
+ cyg_handle_t alarm,
+ cyg_tick_count_t trigger, /* Absolute trigger time */
+ cyg_tick_count_t interval /* Relative retrigger interval */
+) __THROW;
+
+void cyg_alarm_get_times(
+ cyg_handle_t alarm,
+ cyg_tick_count_t *trigger, /* Next trigger time */
+ cyg_tick_count_t *interval /* Current interval */
+) __THROW;
+
+void cyg_alarm_enable( cyg_handle_t alarm ) __THROW;
+
+void cyg_alarm_disable( cyg_handle_t alarm ) __THROW;
+
+/*---------------------------------------------------------------------------*/
+/* Mail boxes */
+void cyg_mbox_create(
+ cyg_handle_t *handle,
+ cyg_mbox *mbox
+) __THROW;
+
+void cyg_mbox_delete(cyg_handle_t mbox) __THROW;
+
+void *cyg_mbox_get(cyg_handle_t mbox) __THROW;
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+void *cyg_mbox_timed_get(
+ cyg_handle_t mbox,
+ cyg_tick_count_t abstime
+ ) __THROW;
+#endif
+
+void *cyg_mbox_tryget(cyg_handle_t mbox) __THROW;
+
+void *cyg_mbox_peek_item(cyg_handle_t mbox) __THROW;
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+cyg_bool_t cyg_mbox_put(cyg_handle_t mbox, void *item) __THROW;
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+cyg_bool_t cyg_mbox_timed_put(
+ cyg_handle_t mbox,
+ void *item,
+ cyg_tick_count_t abstime
+ ) __THROW;
+#endif
+#endif
+
+cyg_bool_t cyg_mbox_tryput(cyg_handle_t mbox, void *item) __THROW;
+
+cyg_count32 cyg_mbox_peek(cyg_handle_t mbox) __THROW;
+
+cyg_bool_t cyg_mbox_waiting_to_get(cyg_handle_t mbox) __THROW;
+
+cyg_bool_t cyg_mbox_waiting_to_put(cyg_handle_t mbox) __THROW;
+
+
+/*-----------------------------------------------------------------------*/
+/* Memory pools */
+
+/* These definitions are found in the "memalloc" package as this is */
+/* where the implementation lives. */
+
+#ifdef CYGPKG_MEMALLOC
+# include <cyg/memalloc/kapi.h>
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Semaphores */
+
+void cyg_semaphore_init(
+ cyg_sem_t *sem, /* Semaphore to init */
+ cyg_count32 val /* Initial semaphore value */
+) __THROW;
+
+void cyg_semaphore_destroy( cyg_sem_t *sem ) __THROW;
+
+cyg_bool_t cyg_semaphore_wait( cyg_sem_t *sem ) __THROW;
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+cyg_bool_t cyg_semaphore_timed_wait(
+ cyg_sem_t *sem,
+ cyg_tick_count_t abstime
+ ) __THROW;
+#endif
+
+cyg_bool_t cyg_semaphore_trywait( cyg_sem_t *sem ) __THROW;
+
+void cyg_semaphore_post( cyg_sem_t *sem ) __THROW;
+
+void cyg_semaphore_peek( cyg_sem_t *sem, cyg_count32 *val ) __THROW;
+
+/*---------------------------------------------------------------------------*/
+/* Flags */
+
+typedef cyg_uint32 cyg_flag_value_t;
+typedef cyg_uint8 cyg_flag_mode_t;
+#define CYG_FLAG_WAITMODE_AND ((cyg_flag_mode_t)0) /* all bits must be set */
+#define CYG_FLAG_WAITMODE_OR ((cyg_flag_mode_t)2) /* any bit must be set */
+#define CYG_FLAG_WAITMODE_CLR ((cyg_flag_mode_t)1) /* clear when satisfied */
+
+void cyg_flag_init(
+ cyg_flag_t *flag /* Flag to init */
+) __THROW;
+
+void cyg_flag_destroy( cyg_flag_t *flag ) __THROW;
+
+/* bitwise-or in the bits in value; awaken any waiting tasks whose
+ condition is now satisfied */
+void cyg_flag_setbits( cyg_flag_t *flag, cyg_flag_value_t value) __THROW;
+
+/* bitwise-and with the the bits in value; this clears the bits which
+ are not set in value. No waiting task can be awoken. */
+void cyg_flag_maskbits( cyg_flag_t *flag, cyg_flag_value_t value) __THROW;
+
+/* wait for the flag value to match the pattern, according to the mode.
+ If mode includes CLR, set the flag value to zero when
+ our pattern is matched. The return value is that which matched
+ the request, or zero for an error/timeout return.
+ Value must not itself be zero. */
+cyg_flag_value_t cyg_flag_wait( cyg_flag_t *flag,
+ cyg_flag_value_t pattern,
+ cyg_flag_mode_t mode ) __THROW;
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+cyg_flag_value_t cyg_flag_timed_wait( cyg_flag_t *flag,
+ cyg_flag_value_t pattern,
+ cyg_flag_mode_t mode,
+ cyg_tick_count_t abstime ) __THROW;
+
+#endif
+
+cyg_flag_value_t cyg_flag_poll( cyg_flag_t *flag,
+ cyg_flag_value_t pattern,
+ cyg_flag_mode_t mode ) __THROW;
+
+cyg_flag_value_t cyg_flag_peek( cyg_flag_t *flag ) __THROW;
+
+cyg_bool_t cyg_flag_waiting( cyg_flag_t *flag ) __THROW;
+
+/*---------------------------------------------------------------------------*/
+/* Mutex */
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+enum cyg_mutex_protocol
+{
+ CYG_MUTEX_NONE = 0, // no inversion protocol
+ CYG_MUTEX_INHERIT, // priority inheritance protocol
+ CYG_MUTEX_CEILING // priority ceiling protocol
+};
+#endif
+
+void cyg_mutex_init(
+ cyg_mutex_t *mutex /* Mutex to init */
+) __THROW;
+
+void cyg_mutex_destroy( cyg_mutex_t *mutex ) __THROW;
+
+cyg_bool_t cyg_mutex_lock( cyg_mutex_t *mutex ) __THROW;
+
+cyg_bool_t cyg_mutex_trylock( cyg_mutex_t *mutex ) __THROW;
+
+void cyg_mutex_unlock( cyg_mutex_t *mutex ) __THROW;
+
+void cyg_mutex_release( cyg_mutex_t *mutex ) __THROW;
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+void cyg_mutex_set_ceiling( cyg_mutex_t *mutex, cyg_priority_t priority ) __THROW;
+#endif
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+void cyg_mutex_set_protocol ( cyg_mutex_t *mutex, enum cyg_mutex_protocol protocol ) __THROW;
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Condition Variables */
+
+void cyg_cond_init(
+ cyg_cond_t *cond, /* condition variable to init */
+ cyg_mutex_t *mutex /* associated mutex */
+) __THROW;
+
+void cyg_cond_destroy( cyg_cond_t *cond ) __THROW;
+
+cyg_bool_t cyg_cond_wait( cyg_cond_t *cond ) __THROW;
+
+void cyg_cond_signal( cyg_cond_t *cond ) __THROW;
+
+void cyg_cond_broadcast( cyg_cond_t *cond ) __THROW;
+
+#ifdef CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT
+cyg_bool_t cyg_cond_timed_wait(
+ cyg_cond_t *cond,
+ cyg_tick_count_t abstime
+ ) __THROW;
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Spinlocks */
+
+void cyg_spinlock_init(
+ cyg_spinlock_t *lock, /* spinlock to initialize */
+ cyg_bool_t locked /* init locked or unlocked */
+) __THROW;
+
+void cyg_spinlock_destroy( cyg_spinlock_t *lock ) __THROW;
+
+void cyg_spinlock_spin( cyg_spinlock_t *lock ) __THROW;
+
+void cyg_spinlock_clear( cyg_spinlock_t *lock ) __THROW;
+
+cyg_bool_t cyg_spinlock_try( cyg_spinlock_t *lock ) __THROW;
+
+cyg_bool_t cyg_spinlock_test( cyg_spinlock_t *lock ) __THROW;
+
+void cyg_spinlock_spin_intsave( cyg_spinlock_t *lock,
+ cyg_addrword_t *istate ) __THROW;
+
+void cyg_spinlock_clear_intsave( cyg_spinlock_t *lock,
+ cyg_addrword_t istate ) __THROW;
+
+/*---------------------------------------------------------------------------*/
+#ifdef __cplusplus
+}
+#endif
+
+/*---------------------------------------------------------------------------*/
+
+#include <cyg/kernel/kapidata.h>
+
+/*---------------------------------------------------------------------------*/
+/* EOF kapi.h */
+#endif /* CYGFUN_KERNEL_API_C */
+#endif /* CYGONCE_KERNEL_KAPI_H */
diff --git a/cesar/ecos/packages/kernel/current/include/kapidata.h b/cesar/ecos/packages/kernel/current/include/kapidata.h
new file mode 100644
index 0000000000..33efc7723d
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/kapidata.h
@@ -0,0 +1,554 @@
+#ifndef CYGONCE_KERNEL_KAPIDATA_H
+#define CYGONCE_KERNEL_KAPIDATA_H
+
+/*=============================================================================
+//
+// kapidata.h
+//
+// Native API data structures
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2002 Bart Veer
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1998-03-13
+// Purpose: Native API data structures
+// Description: This file defines the structures used in the native API. The
+// sizes of these structures are dependent on the system
+// configuration and must be kept in step with their real
+// counterparts in the C++ headers.
+// IMPORTANT: It is NOT guaranteed that the fields of these
+// structures correspond to the equivalent fields in the
+// C++ classes they shadow.
+//
+// One oddity with this file is that the way many of the "mirror"
+// classes are defined with macros. The resulting structures
+// then have a "flat" layout, rather than just declaring a
+// member structure directly in the structure. The reason for
+// this is that as of GCC 3.x, the C++ compiler will optimise
+// classes by removing padding and reusing it for subsequent
+// members defined in a derived class. This affects some targets
+// (including PowerPC and MIPS at least) when a C++ base class
+// includes a long long. By instead arranging for the C structure
+// to just list all the members directly, the compiler will then
+// behave the same for the C structures as the C++ classes.
+//
+// This means that care has to be taken to follow the same
+// methodology if new stuff is added to this file. Even if
+// it doesn't contain long longs for your target, it may for
+// others, depending on HAL definitions.
+//
+// Usage: included by kapi.h
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================*/
+
+#include <pkgconf/system.h>
+#include <pkgconf/kernel.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_intr.h> // exception defines
+
+/*---------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*---------------------------------------------------------------------------*/
+
+#ifndef CYGNUM_KERNEL_SCHED_BITMAP_SIZE
+#if defined(CYGSEM_KERNEL_SCHED_MLQUEUE)
+#define CYGNUM_KERNEL_SCHED_BITMAP_SIZE 32
+#elif defined(CYGSEM_KERNEL_SCHED_BITMAP)
+#define CYGNUM_KERNEL_SCHED_BITMAP_SIZE 32
+#endif
+#endif
+
+#if CYGNUM_KERNEL_SCHED_BITMAP_SIZE <= 8
+typedef cyg_ucount8 cyg_sched_bitmap;
+#elif CYGNUM_KERNEL_SCHED_BITMAP_SIZE <= 16
+typedef cyg_ucount16 cyg_sched_bitmap;
+#elif CYGNUM_KERNEL_SCHED_BITMAP_SIZE <= 32
+typedef cyg_ucount32 cyg_sched_bitmap;
+#elif CYGNUM_KERNEL_SCHED_BITMAP_SIZE <= 64
+typedef cyg_ucount64 cyg_sched_bitmap;
+#else
+#error Bitmaps greater than 64 bits not currently allowed
+#endif
+
+typedef struct
+{
+#if defined(CYGSEM_KERNEL_SCHED_BITMAP)
+
+ cyg_sched_bitmap map;
+
+#elif defined(CYGSEM_KERNEL_SCHED_MLQUEUE)
+
+ cyg_thread *queue;
+
+#elif defined(CYGSEM_KERNEL_SCHED_LOTTERY)
+
+ cyg_thread *queue;
+
+#else
+
+#error Undefined scheduler type
+
+#endif
+} cyg_threadqueue;
+
+/*---------------------------------------------------------------------------*/
+
+struct cyg_interrupt
+{
+ cyg_vector_t vector;
+ cyg_priority_t priority;
+ cyg_ISR_t *isr;
+ cyg_DSR_t *dsr;
+ CYG_ADDRWORD data;
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST
+ cyg_ucount32 dsr_count;
+ cyg_interrupt *next_dsr;
+#endif
+#ifdef CYGIMP_KERNEL_INTERRUPTS_CHAIN
+ cyg_interrupt *next;
+#endif
+};
+
+
+/*---------------------------------------------------------------------------*/
+
+
+#if defined(CYGIMP_KERNEL_COUNTERS_SINGLE_LIST)
+# define CYG_COUNTER_ALARM_LIST_MEMBER \
+ cyg_alarm *alarm_list;
+#elif defined(CYGIMP_KERNEL_COUNTERS_MULTI_LIST)
+# define CYG_COUNTER_ALARM_LIST_MEMBER \
+ cyg_alarm *alarm_list[CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE];
+#else
+# define CYG_COUNTER_ALARM_LIST_MEMBER
+#endif
+
+#define CYG_COUNTER_MEMBERS \
+ CYG_COUNTER_ALARM_LIST_MEMBER \
+ cyg_tick_count_t counter; \
+ cyg_uint32 increment;
+
+struct cyg_counter
+{
+ CYG_COUNTER_MEMBERS
+};
+
+/*---------------------------------------------------------------------------*/
+
+struct cyg_clock
+{
+ CYG_COUNTER_MEMBERS
+ CYG_RESOLUTION_T_MEMBERS
+};
+
+/*---------------------------------------------------------------------------*/
+
+
+#if defined(CYGIMP_KERNEL_COUNTERS_SINGLE_LIST) || \
+ defined(CYGIMP_KERNEL_COUNTERS_MULTI_LIST)
+# define CYG_ALARM_LIST_MEMBERS \
+ cyg_alarm *next; \
+ cyg_alarm *prev;
+#else
+# define CYG_ALARM_LIST_MEMBERS
+#endif
+
+#define CYG_ALARM_MEMBERS \
+ CYG_ALARM_LIST_MEMBERS \
+ cyg_counter *counter; \
+ cyg_alarm_t *alarm; \
+ CYG_ADDRWORD data; \
+ cyg_tick_count_t trigger; \
+ cyg_tick_count_t interval; \
+ cyg_bool enabled;
+
+struct cyg_alarm
+{
+ CYG_ALARM_MEMBERS
+};
+
+/*---------------------------------------------------------------------------*/
+/* Exception controller */
+
+#ifdef CYGPKG_KERNEL_EXCEPTIONS
+
+# ifdef CYGSEM_KERNEL_EXCEPTIONS_DECODE
+# define CYG_EXCEPTION_CONTROL_MEMBERS \
+ cyg_exception_handler_t *exception_handler[CYGNUM_HAL_EXCEPTION_COUNT]; \
+ CYG_ADDRWORD exception_data[CYGNUM_HAL_EXCEPTION_COUNT];
+# else
+# define CYG_EXCEPTION_CONTROL_MEMBERS \
+ cyg_exception_handler_t *exception_handler; /* Handler function */ \
+ CYG_ADDRWORD exception_data; /* Handler data */
+# endif
+
+typedef struct
+{
+ CYG_EXCEPTION_CONTROL_MEMBERS
+} cyg_exception_control;
+
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Hardware Thread structure */
+
+#ifdef CYGFUN_KERNEL_THREADS_STACK_LIMIT
+# define CYG_HARDWARETHREAD_STACK_LIMIT_MEMBER \
+ CYG_ADDRESS stack_limit; /* movable stack limit */
+#else
+# define CYG_HARDWARETHREAD_STACK_LIMIT_MEMBER
+#endif
+
+#ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+# define CYG_HARDWARETHREAD_SAVED_CONTEXT_MEMBER \
+ void *saved_context; // If non-zero, this points at a more
+ // interesting context than stack_ptr.
+#else
+# define CYG_HARDWARETHREAD_SAVED_CONTEXT_MEMBER
+#endif
+
+typedef void cyg_thread_entry(CYG_ADDRWORD data);
+
+#define CYG_HARDWARETHREAD_MEMBERS \
+ CYG_ADDRESS stack_base; /* pointer to base of stack area */ \
+ cyg_uint32 stack_size; /* size of stack area in bytes */ \
+ CYG_HARDWARETHREAD_STACK_LIMIT_MEMBER \
+ CYG_ADDRESS stack_ptr; /* pointer to saved state on stack */ \
+ cyg_thread_entry *entry_point; /* main entry point (code pointer!) */ \
+ CYG_ADDRWORD entry_data; /* entry point argument */ \
+ CYG_HARDWARETHREAD_SAVED_CONTEXT_MEMBER
+
+typedef struct
+{
+ CYG_HARDWARETHREAD_MEMBERS
+} cyg_hardwarethread;
+
+/*---------------------------------------------------------------------------*/
+/* Scheduler Thread structure */
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+# define CYG_SCHEDTHREAD_CPU_MEMBER \
+ cyg_uint32 cpu; // CPU id of cpu currently running
+#else
+# define CYG_SCHEDTHREAD_CPU_MEMBER
+#endif
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE_ENABLE
+# define CYG_SCHEDTHREAD_TIMESLICE_ENABLED_MEMBER \
+ cyg_bool timeslice_enabled; /* per-thread timeslice enable */
+#else
+# define CYG_SCHEDTHREAD_TIMESLICE_ENABLED_MEMBER
+#endif
+
+#if defined(CYGSEM_KERNEL_SCHED_BITMAP)
+# define CYG_SCHEDTHREAD_SCHEDIMP_MEMBERS \
+ cyg_priority_t priority; /* current thread priority */
+#elif defined(CYGSEM_KERNEL_SCHED_MLQUEUE)
+# define CYG_SCHEDTHREAD_SCHEDIMP_MEMBERS \
+ cyg_thread *next; \
+ cyg_thread *prev; \
+ cyg_priority_t priority; /* current thread priority */ \
+ CYG_SCHEDTHREAD_CPU_MEMBER \
+ CYG_SCHEDTHREAD_TIMESLICE_ENABLED_MEMBER
+#elif defined(CYGSEM_KERNEL_SCHED_LOTTERY)
+# define CYG_SCHEDTHREAD_SCHEDIMP_MEMBERS \
+ cyg_thread *next; \
+ cyg_thread *prev; \
+ cyg_priority_t priority; /* current thread priority */ \
+ cyg_priority_t compensation_tickets; /* sleep compensation */
+#else
+# error Undefined scheduler type
+#endif
+
+#ifndef CYGSEM_KERNEL_SCHED_ASR_GLOBAL
+# define CYG_SCHEDTHREAD_ASR_NONGLOBAL_MEMBER \
+ void (*asr)(CYG_ADDRWORD); // ASR function
+#else
+# define CYG_SCHEDTHREAD_ASR_NONGLOBAL_MEMBER
+#endif
+
+#ifndef CYGSEM_KERNEL_SCHED_ASR_DATA_GLOBAL
+# define CYG_SCHEDTHREAD_ASR_DATA_NONGLOBAL_MEMBER \
+ CYG_ADDRWORD asr_data; // ASR data pointer
+#else
+# define CYG_SCHEDTHREAD_ASR_DATA_NONGLOBAL_MEMBER
+#endif
+
+#ifdef CYGSEM_KERNEL_SCHED_ASR_SUPPORT
+# define CYG_SCHEDTHREAD_ASR_MEMBER \
+ volatile cyg_ucount32 asr_inhibit; /* If true, blocks calls to ASRs */ \
+ volatile cyg_bool asr_pending; /* If true, this thread's ASR */ \
+ /* should be called. */ \
+ CYG_SCHEDTHREAD_ASR_NONGLOBAL_MEMBER \
+ CYG_SCHEDTHREAD_ASR_DATA_NONGLOBAL_MEMBER
+#else
+# define CYG_SCHEDTHREAD_ASR_MEMBER
+#endif
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_SIMPLE
+# define CYG_SCHEDTHREAD_MUTEX_INV_PROTO_SIMPLE_MEMBERS \
+ cyg_priority_t original_priority; \
+ cyg_bool priority_inherited;
+#else
+# define CYG_SCHEDTHREAD_MUTEX_INV_PROTO_SIMPLE_MEMBERS
+#endif
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL
+# define CYG_SCHEDTHREAD_MUTEX_INV_PROTO_MEMBERS \
+ cyg_count32 mutex_count; \
+ CYG_SCHEDTHREAD_MUTEX_INV_PROTO_SIMPLE_MEMBERS
+#else
+# define CYG_SCHEDTHREAD_MUTEX_INV_PROTO_MEMBERS
+#endif
+
+#define CYG_SCHEDTHREAD_MEMBERS \
+ CYG_SCHEDTHREAD_SCHEDIMP_MEMBERS \
+ cyg_threadqueue *queue; \
+ CYG_SCHEDTHREAD_ASR_MEMBER \
+ CYG_SCHEDTHREAD_MUTEX_INV_PROTO_MEMBERS
+
+
+typedef struct
+{
+ CYG_SCHEDTHREAD_MEMBERS
+} cyg_schedthread;
+
+/* This compiler version test is required because the C++ ABI changed in
+ GCC v3.x and GCC could now reuse "spare" space from base classes in derived
+ classes, and in C++ land, cyg_alarm is a base class of cyg_threadtimer.
+*/
+#if defined(__GNUC__) && (__GNUC__ < 3)
+#define CYG_THREADTIMER_MEMBERS \
+ cyg_alarm alarm; \
+ cyg_thread *thread;
+#else
+#define CYG_THREADTIMER_MEMBERS \
+ CYG_ALARM_MEMBERS \
+ cyg_thread *thread;
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Thread structure */
+
+typedef struct
+{
+ CYG_THREADTIMER_MEMBERS
+} cyg_threadtimer;
+
+
+typedef enum
+{
+ CYG_REASON_NONE,
+ CYG_REASON_WAIT,
+ CYG_REASON_DELAY,
+ CYG_REASON_TIMEOUT,
+ CYG_REASON_BREAK,
+ CYG_REASON_DESTRUCT,
+ CYG_REASON_EXIT,
+ CYG_REASON_DONE
+} cyg_reason_t;
+
+#if defined(CYGPKG_KERNEL_EXCEPTIONS) && !defined(CYGSEM_KERNEL_EXCEPTIONS_GLOBAL)
+# define CYG_THREAD_EXCEPTION_CONTROL_MEMBER \
+ cyg_exception_control exception_control;
+#else
+# define CYG_THREAD_EXCEPTION_CONTROL_MEMBER
+#endif
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+# define CYG_THREAD_TIMER_MEMBER \
+ cyg_threadtimer timer;
+#else
+# define CYG_THREAD_TIMER_MEMBER
+#endif
+
+#ifdef CYGVAR_KERNEL_THREADS_DATA
+# define CYG_THREAD_THREAD_DATA_MEMBER \
+ CYG_ADDRWORD thread_data[CYGNUM_KERNEL_THREADS_DATA_MAX];
+#else
+# define CYG_THREAD_THREAD_DATA_MEMBER
+#endif
+
+#ifdef CYGVAR_KERNEL_THREADS_NAME
+# define CYG_THREAD_NAME_MEMBER \
+ char *name;
+#else
+# define CYG_THREAD_NAME_MEMBER
+#endif
+
+#ifdef CYGVAR_KERNEL_THREADS_LIST
+# define CYG_THREAD_LIST_NEXT_MEMBER \
+ cyg_thread *list_next;
+#else
+# define CYG_THREAD_LIST_NEXT_MEMBER
+#endif
+
+
+
+#ifdef CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD
+struct Cyg_Destructor_Entry {
+ cyg_thread_destructor_fn fn;
+ cyg_addrword_t data;
+};
+# define CYG_THREAD_DESTRUCTORS_MEMBER \
+ struct Cyg_Destructor_Entry destructors[ CYGNUM_KERNEL_THREADS_DESTRUCTORS ];
+#else
+# define CYG_THREAD_DESTRUCTORS_MEMBER
+#endif
+
+
+#define CYG_THREAD_MEMBERS \
+ CYG_HARDWARETHREAD_MEMBERS \
+ CYG_SCHEDTHREAD_MEMBERS \
+ \
+ cyg_uint32 state; \
+ cyg_ucount32 suspend_count; \
+ cyg_ucount32 wakeup_count; \
+ CYG_ADDRWORD wait_info; \
+ cyg_uint16 unique_id; \
+ \
+ CYG_THREAD_EXCEPTION_CONTROL_MEMBER \
+ CYG_THREAD_TIMER_MEMBER \
+ \
+ cyg_reason_t sleep_reason; \
+ cyg_reason_t wake_reason; \
+ \
+ CYG_THREAD_THREAD_DATA_MEMBER \
+ CYG_THREAD_DESTRUCTORS_MEMBER \
+ CYG_THREAD_NAME_MEMBER \
+ CYG_THREAD_LIST_NEXT_MEMBER
+
+
+struct cyg_thread
+{
+ CYG_THREAD_MEMBERS
+};
+
+/*---------------------------------------------------------------------------*/
+
+struct cyg_mbox
+{
+ cyg_count32 base; /* index of first used slot */
+ cyg_count32 count; /* count of used slots */
+ cyg_threadqueue get_threadq; /* Queue of waiting threads */
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ cyg_threadqueue put_threadq; /* Queue of waiting threads */
+#endif
+ void * itemqueue[ CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE ];
+};
+
+/*---------------------------------------------------------------------------*/
+
+struct cyg_sem_t
+{
+ cyg_count32 count; /* The semaphore count */
+ cyg_threadqueue queue; /* Queue of waiting threads */
+};
+
+/*---------------------------------------------------------------------------*/
+
+struct cyg_flag_t
+{
+ cyg_flag_value_t value; /* The flag value */
+ cyg_threadqueue queue; /* Queue of waiting threads */
+};
+
+/*---------------------------------------------------------------------------*/
+
+typedef enum
+{
+ CYG_MUTEX_PROTOCOL_NONE,
+ CYG_MUTEX_PROTOCOL_INHERIT,
+ CYG_MUTEX_PROTOCOL_CEILING
+} cyg_mutex_protocol_t;
+
+struct cyg_mutex_t
+{
+ cyg_atomic locked; /* true if locked */
+ cyg_thread *owner; /* Current locking thread */
+ cyg_threadqueue queue; /* Queue of waiting threads */
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+ cyg_mutex_protocol_t protocol; /* this mutex's protocol */
+#endif
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+ cyg_priority_t ceiling; /* mutex priority ceiling */
+#endif
+
+};
+
+/*---------------------------------------------------------------------------*/
+
+struct cyg_cond_t
+{
+ cyg_mutex_t *mutex; /* Associated mutex */
+ cyg_threadqueue queue; /* Queue of waiting threads */
+};
+
+/*------------------------------------------------------------------------*/
+
+struct cyg_spinlock_t
+{
+ cyg_uint32 lock; /* lock word */
+};
+
+/*------------------------------------------------------------------------*/
+
+/* Memory allocator types now come from the "memalloc" package which is */
+/* where the implementation lives. */
+
+#ifdef CYGPKG_MEMALLOC
+# include <cyg/memalloc/kapidata.h>
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* EOF kapidata.h */
+#endif /* CYGONCE_KERNEL_KAPIDATA_H */
diff --git a/cesar/ecos/packages/kernel/current/include/kernel.hxx b/cesar/ecos/packages/kernel/current/include/kernel.hxx
new file mode 100644
index 0000000000..eb5802962e
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/kernel.hxx
@@ -0,0 +1,86 @@
+#ifndef CYGONCE_KERNEL_KERNEL_HXX
+#define CYGONCE_KERNEL_KERNEL_HXX
+
+//==========================================================================
+//
+// kernel.hxx
+//
+// Kernel mega-include file
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-09
+// Purpose: Include all kernel files
+// Description: This file contains includes for all the kernel
+// headers. This simplifys things in the sources.
+// Usage: #include <cyg/kernel/kernel.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h>
+
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/infra/cyg_trac.h> // tracing macros
+
+#include <cyg/kernel/errors.h>
+
+#include <cyg/kernel/instrmnt.h>
+
+#include <cyg/kernel/diag.h>
+
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/intr.hxx>
+#include <cyg/kernel/clock.hxx>
+
+#include <cyg/kernel/sema.hxx>
+#include <cyg/kernel/mutex.hxx>
+
+#include <cyg/kernel/sched.inl>
+#include <cyg/kernel/clock.inl>
+
+// -------------------------------------------------------------------------
+#endif // #ifndef CYGONCE_KERNEL_KERNEL_HXX
+// EOF kernel.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/ktypes.h b/cesar/ecos/packages/kernel/current/include/ktypes.h
new file mode 100644
index 0000000000..d5d85cc0b7
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/ktypes.h
@@ -0,0 +1,129 @@
+#ifndef CYGONCE_KERNEL_KTYPES_H
+#define CYGONCE_KERNEL_KTYPES_H
+
+//==========================================================================
+//
+// ktypes.h
+//
+// Standard types used in the kernel and its interfaces
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg from an original by hmt
+// Contributors: nickg
+// Date: 1997-09-08
+// Purpose: Define kernel specific types
+// Description: Kernel specific types
+// Usage: #include <cyg/kernel/ktypes.h>
+// ...
+// cyg_priority priority; // etc
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+// -------------------------------------------------------------------------
+// Check that a configuration file is present.
+
+#ifndef CYGONCE_PKGCONF_KERNEL_H
+#error "No Configuration file included"
+#endif
+
+// -------------------------------------------------------------------------
+
+#include <cyg/infra/cyg_type.h>
+#include <stddef.h> // for size_t
+
+// -------------------------------------------------------------------------
+// Integer types:
+
+typedef cyg_int32 cyg_code; // General return/error/status code
+
+typedef cyg_count32 cyg_priority; // priority value
+
+typedef cyg_uint32 cyg_vector; // vector number/descriptor
+
+typedef cyg_uint64 cyg_tick_count; // clock tick count value
+
+// -------------------------------------------------------------------------
+// Predefinitions of various kernel classes
+
+#ifdef __cplusplus
+
+class Cyg_Scheduler;
+class Cyg_Scheduler_Implementation;
+
+class Cyg_HardwareThread;
+class Cyg_SchedThread;
+class Cyg_SchedThread_Implementation;
+class Cyg_Thread;
+
+class Cyg_ThreadQueue;
+class Cyg_ThreadQueue_Implementation;
+
+#endif
+
+
+// -------------------------------------------------------------------------
+// Class and structure conversion macros.
+// CYG_CLASSFROMFIELD translates a pointer to a field of a struct or
+// class into a pointer to the class.
+// CYG_OFFSETOFBASE yields the offset of a base class of a derived
+// class.
+// CYG_CLASSFROMBASE translates a pointer to a base class into a pointer
+// to a selected derived class. The base class object _must_ be part of
+// the specified derived class. This is essentially a poor mans version
+// of the RTTI dynamic_cast operator.
+// Caveat: These macros do not work for virtual base classes.
+
+#define CYG_CLASSFROMFIELD(_type_,_member_,_ptr_)\
+ ((_type_ *)((char *)(_ptr_)-((char *)&(((_type_ *)0)->_member_))))
+
+#ifdef __cplusplus
+
+#define CYG_OFFSETOFBASE(_type_,_base_)\
+ ((char *)((_base_ *)((_type_ *)4)) - (char *)4)
+
+# define CYG_CLASSFROMBASE(_class_,_base_,_ptr_)\
+ ((_class_ *)((char *)(_ptr_) - CYG_OFFSETOFBASE(_class_,_base_)))
+
+#endif
+
+// -------------------------------------------------------------------------
+#endif // CYGONCE_KERNEL_KTYPES_H
+// EOF ktypes.h
+
diff --git a/cesar/ecos/packages/kernel/current/include/llistt.hxx b/cesar/ecos/packages/kernel/current/include/llistt.hxx
new file mode 100644
index 0000000000..3aa45bed8b
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/llistt.hxx
@@ -0,0 +1,171 @@
+#ifndef CYGONCE_KERNEL_LLISTT_HXX
+#define CYGONCE_KERNEL_LLISTT_HXX
+
+//==========================================================================
+//
+// llistt.hxx
+//
+// Llistt linked list template class declarations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1998-02-10
+// Purpose: Define Llistt template class
+// Description: The classes defined here provide the APIs for llistts.
+// Usage: #include <cyg/kernel/llistt.hxx>
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/thread.hxx>
+
+// -------------------------------------------------------------------------
+// A simple linked list template; each item also contains a pointer of type
+// T, and you can search for a particular T* in a list.
+//
+// It is intended that this list be amenable to the trick of using the
+// address of the pointer that is the list head, cast to an item pointer,
+// as the "zeroth" element of the list; prev of the first item is the
+// address of the head pointer, and inserting before the first item works
+// correctly. For this reason, a "getprev" is not provided; iteration may
+// only be forwards, until a NULL is found.
+//
+// It is expected that derived classes will be used to hold other
+// information than just the T* but that is beyond our discussion here;
+// only the T* can be searched for using code provided here.
+//
+// This module is NOT thread-safe; it is expected that all clients will be
+// seeing that that themselves.
+
+template <class T>
+class Cyg_Llistt
+{
+private:
+ Cyg_Llistt<T> *next, *prev;
+ T *tptr;
+
+private:
+ // make initialisation _without_ a T* impossible.
+ Cyg_Llistt<T> &operator=(Cyg_Llistt<T> &);
+ Cyg_Llistt(Cyg_Llistt<T> &);
+ Cyg_Llistt();
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ Cyg_Llistt( T *tvalue ) // Constructor
+ {
+ tptr = tvalue;
+ next = prev = NULL;
+ }
+
+ ~Cyg_Llistt() // Destructor
+ {
+ CYG_ASSERT( NULL == next, "bad item next - still in list" );
+ CYG_ASSERT( NULL == prev, "bad item prev - still in list" );
+ }
+
+ // iterator, basically.
+ Cyg_Llistt<T> * getnext() { return next; }
+
+ // get the value
+ T * getitem() { return tptr; }
+
+ // look up a particular T value in the llist
+ static Cyg_Llistt<T> *
+ find( Cyg_Llistt<T> *list, T *tvalue )
+ {
+ for ( ; list ; list = list->next ) {
+ if ( list->tptr == tvalue )
+ break;
+ }
+ return list;
+ }
+
+ // unlink an item from the list
+ void
+ unlink()
+ {
+ CYG_ASSERT( prev, "not in a list" );
+ prev->next = next;
+ if ( next ) {
+ next->prev = prev;
+ }
+ next = prev = NULL;
+ }
+
+ // insert a new item in the list after "this"
+ void
+ insertafter( Cyg_Llistt<T> *item )
+ {
+ CYG_ASSERT( item, "null item" );
+ CYG_ASSERT( NULL == item->next, "bad item next - already linked" );
+ CYG_ASSERT( NULL == item->prev, "bad item prev - already linked" );
+ item->next = next;
+ item->prev = this;
+ if ( next )
+ next->prev = item;
+ next = item;
+ }
+
+ // insert a new item in the list before "this"
+ void
+ insertbefore( Cyg_Llistt<T> *item )
+ {
+ CYG_ASSERT( prev, "this not in a list" );
+ CYG_ASSERT( item, "null item" );
+ CYG_ASSERT( NULL == item->next, "bad item next - already linked" );
+ CYG_ASSERT( NULL == item->prev, "bad item prev - already linked" );
+ item->prev = prev;
+ item->next = this;
+ prev->next = item;
+ prev = item;
+ }
+};
+
+
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_LLISTT_HXX
+// EOF llistt.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/lottery.hxx b/cesar/ecos/packages/kernel/current/include/lottery.hxx
new file mode 100644
index 0000000000..38db7a65c9
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/lottery.hxx
@@ -0,0 +1,223 @@
+#ifndef CYGONCE_KERNEL_LOTTERY_HXX
+#define CYGONCE_KERNEL_LOTTERY_HXX
+
+//==========================================================================
+//
+// lottery.hxx
+//
+// Lottery scheduler class declarations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-10
+// Purpose: Define lottery scheduler implementation
+// Description: The classes defined here are used as base classes
+// by the common classes that define schedulers and thread
+// things. A lottery scheduler provides each thread with a
+// share of the processor based on the number of tickets that
+// it owns.
+// Usage: Included according to configuration by
+// <cyg/kernel/sched.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+
+// -------------------------------------------------------------------------
+// Customize the scheduler
+
+#define CYGIMP_THREAD_PRIORITY 1 // Threads have changable priorities
+
+#define CYG_THREAD_MIN_PRIORITY 1
+#define CYG_THREAD_MAX_PRIORITY 0x7FFFFFFF
+
+// set default scheduling info value for thread constructors.
+#define CYG_SCHED_DEFAULT_INFO CYG_THREAD_MAX_PRIORITY
+
+#error Lottery Scheduler not yet complete, do not use!!!
+
+// -------------------------------------------------------------------------
+// Thread queue implementation.
+// This class provides the (scheduler specific) implementation of the
+// thread queue class.
+
+class Cyg_ThreadQueue_Implementation
+{
+ friend class Cyg_Scheduler_Implementation;
+ friend class Cyg_SchedThread_Implementation;
+
+ Cyg_Thread *queue;
+
+protected:
+
+ // API used by Cyg_ThreadQueue
+
+ // Add thread to queue
+ void enqueue(Cyg_Thread *thread);
+
+ // return first thread on queue
+ Cyg_Thread *highpri();
+
+ // remove first thread on queue
+ Cyg_Thread *dequeue();
+
+ // remove specified thread from queue
+ void remove(Cyg_Thread *thread);
+
+ // test if queue is empty
+ cyg_bool empty();
+
+ void rotate(); // Rotate the queue
+};
+
+inline cyg_bool Cyg_ThreadQueue_Implementation::empty()
+{
+ return queue == NULL;
+}
+
+// -------------------------------------------------------------------------
+// This class contains the implementation details of the scheduler, and
+// provides a standard API for accessing it.
+
+class Cyg_Scheduler_Implementation
+ : public Cyg_Scheduler_Base
+{
+ friend class Cyg_ThreadQueue_Implementation;
+ friend class Cyg_SchedThread_Implementation;
+
+ // All runnable threads are kept on a single run queue
+ // in MRU order.
+ Cyg_ThreadQueue_Implementation run_queue;
+
+ cyg_uint32 rand_seed;
+
+ cyg_int32 total_tickets;
+
+protected:
+
+ Cyg_Scheduler_Implementation(); // Constructor
+
+ // The following functions provide the scheduler implementation
+ // interface to the Cyg_Scheduler class. These are protected
+ // so that only the scheduler can call them.
+
+ // choose a new thread
+ Cyg_Thread *schedule();
+
+ // make thread schedulable
+ void add_thread(Cyg_Thread *thread);
+
+ // make thread un-schedulable
+ void rem_thread(Cyg_Thread *thread);
+
+ // register thread with scheduler
+ void register_thread(Cyg_Thread *thread);
+
+ // deregister thread
+ void deregister_thread(Cyg_Thread *thread);
+
+ // Test the given priority for uniqueness
+ cyg_bool unique( cyg_priority priority);
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE
+
+ // If timeslicing is enbled, define a scheduler
+ // entry point to do timeslicing. This will be
+ // called from the RTC DSR.
+
+protected:
+
+ static cyg_count32 timeslice_count;
+
+public:
+ void timeslice();
+
+ static void reset_timeslice_count();
+
+#endif
+
+
+};
+
+// -------------------------------------------------------------------------
+// Cyg_Scheduler_Implementation inlines
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE
+
+inline void Cyg_Scheduler_Implementation::reset_timeslice_count()
+{
+ timeslice_count = CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// Scheduler thread implementation.
+// This class provides the implementation of the scheduler specific parts
+// of each thread.
+
+class Cyg_SchedThread_Implementation
+{
+ friend class Cyg_Scheduler_Implementation;
+ friend class Cyg_ThreadQueue_Implementation;
+
+ Cyg_Thread *next; // next thread in queue
+ Cyg_Thread *prev; // previous thread in queue
+
+ void insert( Cyg_Thread *thread ); // Insert thread in front of this
+
+ void remove(); // remove this from queue
+
+protected:
+
+ cyg_priority priority; // current thread priority == tickets held
+
+ cyg_priority compensation_tickets; // sleep compensation
+
+ Cyg_SchedThread_Implementation(CYG_ADDRWORD sched_info);
+
+ void yield(); // Yield CPU to next thread
+
+};
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_LOTTERY_HXX
+// EOF lottery.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/mbox.hxx b/cesar/ecos/packages/kernel/current/include/mbox.hxx
new file mode 100644
index 0000000000..2c41729d7a
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/mbox.hxx
@@ -0,0 +1,136 @@
+#ifndef CYGONCE_KERNEL_MBOX_HXX
+#define CYGONCE_KERNEL_MBOX_HXX
+
+//==========================================================================
+//
+// mbox.hxx
+//
+// Plain (void *) Mbox (Message Box/Mailbox) class declarations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1998-02-10
+// Purpose: Define Mbox class interfaces
+// Description: The classes defined here provide the APIs for mboxes.
+// Usage: #include <cyg/kernel/mbox.hxx>
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/thread.hxx>
+
+#ifdef CYGIMP_MBOX_USE_MBOXT_PLAIN
+#include <cyg/kernel/mboxt.hxx>
+#else
+#include <cyg/kernel/mboxt2.hxx>
+#endif
+
+// -------------------------------------------------------------------------
+// Message/Mail Box. This class implements a queue of void * items using
+// the Cyg_Mbox<Type, QSize> template class.
+
+#ifndef CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE
+// default is 10 elements
+#define CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE (10)
+#endif
+
+// Cyg_Mbox has a fixed size array of (void *)s; one size fits all.
+// Because of this, we can simplify the API by returning a NULL for
+// "failed" conditions. Ergo a NULL message is illegal. BFD.
+
+class Cyg_Mbox
+{
+private:
+#ifdef CYGIMP_MBOX_USE_MBOXT_PLAIN
+ Cyg_Mboxt<void *, CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE> m;
+#else
+ Cyg_Mboxt2<void *, CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE> m;
+#endif
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ Cyg_Mbox(); // Constructor
+ ~Cyg_Mbox(); // Destructor
+
+ void * get(); // get an item; wait if none
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ void * get( cyg_tick_count timeout );
+#endif
+ void * tryget(); // just one attempt
+
+ void * peek_item(); // Get next item to be returned
+ // without removing it
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT // then we support it too
+ cyg_bool put( void *item ); // put an item; wait if full
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ cyg_bool put( void *item, cyg_tick_count timeout );
+#endif
+#endif
+ cyg_bool tryput( void *item ); // fails if Q full
+
+ inline
+ cyg_count32 peek() // Get current count value
+ {
+ return m.peek();
+ }
+
+ inline
+ cyg_bool waiting_to_get() // Any threads waiting to get?
+ {
+ return m.waiting_to_get();
+ }
+ inline
+ cyg_bool waiting_to_put() // Any threads waiting to put?
+ {
+ return m.waiting_to_put();
+ }
+};
+
+
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_MBOX_HXX
+// End of mbox.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/mboxt.hxx b/cesar/ecos/packages/kernel/current/include/mboxt.hxx
new file mode 100644
index 0000000000..a2f1a71d71
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/mboxt.hxx
@@ -0,0 +1,138 @@
+#ifndef CYGONCE_KERNEL_MBOXT_HXX
+#define CYGONCE_KERNEL_MBOXT_HXX
+
+//==========================================================================
+//
+// mboxt.hxx
+//
+// Mboxt (Message Box/Mailbox) class declarations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1998-02-10
+// Purpose: Define Mboxt class interfaces
+// Description: The classes defined here provide the APIs for mboxtes.
+// Usage: #include <cyg/kernel/mboxt.hxx>
+// #include <cyg/kernel/mboxt.inl>
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/thread.hxx>
+
+// -------------------------------------------------------------------------
+// Message/Mail Box. This template implements a queue of T's.
+// Implemented as a template for maximal flexibility; one would hope
+// that only one, with T==(void *) and the same number of them,
+// is ever used without very good reason.
+
+// Cyg_Mboxt has a fixed size array of T's; one size fits all.
+
+template <class T, cyg_count32 QUEUE_SIZE>
+class Cyg_Mboxt
+{
+private:
+ cyg_count32 base; // index of first used slot
+ cyg_count32 count; // count of used slots
+ Cyg_ThreadQueue get_threadq; // Queue of waiting threads
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ Cyg_ThreadQueue put_threadq; // Queue of waiting threads
+#endif
+ static const
+ cyg_count32 size = QUEUE_SIZE;
+ T itemqueue[ QUEUE_SIZE ];
+ // queue of items
+ // private utility functions
+ // wake up a thread from some queue
+ inline void wakeup_waiter( Cyg_ThreadQueue &q );
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ Cyg_Mboxt(); // Constructor
+ ~Cyg_Mboxt(); // Destructor
+
+ cyg_bool get( T &ritem ); // get an item; wait if none
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ cyg_bool get( T &ritem, cyg_tick_count abs_timeout );
+#endif
+ cyg_bool tryget( T &ritem ); // just one attempt
+
+ cyg_bool peek_item( T &ritem ); // get next item without
+ // removing it
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ cyg_bool put( const T item ); // put an item; wait if full
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ cyg_bool put( const T item, cyg_tick_count abs_timeout );
+#endif
+#endif
+ cyg_bool tryput( const T item ); // fails if Q full
+
+ inline
+ cyg_count32 peek() // Get current count value
+ {
+ return count;
+ }
+
+ inline
+ cyg_bool waiting_to_get() // Any threads waiting?
+ {
+ return ! get_threadq.empty();
+ }
+
+ inline
+ cyg_bool waiting_to_put() // Any threads waiting?
+ {
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ return ! put_threadq.empty();
+#else
+ return false;
+#endif
+ }
+};
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_MBOXT_HXX
+// EOF mboxt.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/mboxt.inl b/cesar/ecos/packages/kernel/current/include/mboxt.inl
new file mode 100644
index 0000000000..e6e4f2554d
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/mboxt.inl
@@ -0,0 +1,634 @@
+#ifndef CYGONCE_KERNEL_MBOXT_INL
+#define CYGONCE_KERNEL_MBOXT_INL
+//==========================================================================
+//
+// mboxt.inl
+//
+// Mboxt mbox template class implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1998-02-10
+// Purpose: Mboxt template implementation
+// Description: This file contains the implementations of the mboxt
+// template classes.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/instrmnt.h> // instrumentation
+
+#include <cyg/kernel/mboxt.hxx> // our header
+
+#include <cyg/kernel/thread.inl> // thread inlines
+#include <cyg/kernel/sched.inl> // scheduler inlines
+#include <cyg/kernel/clock.inl> // clock inlines
+
+// -------------------------------------------------------------------------
+// inline function for awakening waiting threads
+
+template <class T, cyg_count32 QUEUE_SIZE>
+inline void
+Cyg_Mboxt<T,QUEUE_SIZE>::wakeup_waiter( Cyg_ThreadQueue &q )
+{
+ if( !q.empty() ) {
+ // The queue is non-empty, so grab the next thread and wake it up.
+ Cyg_Thread *thread = q.dequeue();
+
+ CYG_ASSERTCLASS( thread, "Bad thread pointer");
+
+ thread->set_wake_reason( Cyg_Thread::DONE );
+ thread->wake();
+ CYG_INSTRUMENT_MBOXT(WAKE, this, thread);
+ }
+}
+
+// -------------------------------------------------------------------------
+// Constructor
+
+template <class T, cyg_count32 QUEUE_SIZE>
+Cyg_Mboxt<T,QUEUE_SIZE>::Cyg_Mboxt()
+{
+ CYG_REPORT_FUNCTION();
+ base = 0;
+ count = 0;
+}
+
+// -------------------------------------------------------------------------
+// Destructor
+
+template <class T, cyg_count32 QUEUE_SIZE>
+Cyg_Mboxt<T,QUEUE_SIZE>::~Cyg_Mboxt()
+{
+ CYG_REPORT_FUNCTION();
+ CYG_ASSERT( 0 == count, "Deleting mboxt with messages");
+ CYG_ASSERT( get_threadq.empty(), "Deleting mboxt with threads waiting to get");
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ CYG_ASSERT( put_threadq.empty(), "Deleting mboxt with threads waiting to put");
+#endif
+}
+
+// -------------------------------------------------------------------------
+// debugging/assert function
+
+#ifdef CYGDBG_USE_ASSERTS
+
+template <class T, cyg_count32 QUEUE_SIZE>
+cyg_bool
+Cyg_Mboxt<T,QUEUE_SIZE>::check_this(cyg_assert_class_zeal zeal) const
+{
+ CYG_REPORT_FUNCTION();
+
+ if ( Cyg_Thread::DESTRUCT == Cyg_Thread::self()->get_wake_reason() )
+ // then the whole thing is invalid, and we know it.
+ // so return OK, since this check should NOT make an error.
+ return true;
+
+ // check that we have a non-NULL pointer first
+ if( this == NULL ) return false;
+
+#if 0 // thread queues do not have checking funcs.
+ if ( ! get_threadq.check_this( zeal ) ) return false;
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ if ( ! put_threadq.check_this( zeal ) ) return false;
+#endif
+#endif
+
+ switch( zeal )
+ {
+ case cyg_system_test:
+ case cyg_extreme:
+ case cyg_thorough:
+ case cyg_quick:
+ case cyg_trivial:
+ // plenty of scope for fencepost problems here
+ if ( size < count ) return false;
+ if ( size <= base ) return false;
+ if ( 0 > count ) return false;
+ if ( 0 > base ) return false;
+
+ // there was initially a test of the form
+ // (0 < count && count < size) && ! threadqueue.empty()
+ // here - ie. there should only be people waiting if the Q is full
+ // or empty. This is bogus, anyone else might run between a waiter
+ // being awoken, so there can be a 2nd waiter in the Q and a free
+ // slot (say) simultaneously.
+
+ // Further, we need 2 queues; imagine a 10-slot itemqueue with 25
+ // attempts to put to it, so 15 sleep. 10 other threads get,
+ // awakening 10 of the 15 put-sleepers. Another one gets, and
+ // can't because there is no data there _yet_; it sleeps, and the
+ // 10 awakened threads cycle through the run queue, each putting,
+ // the first awakens the get-sleeper, which in turn awakens a
+ // further put-sleeper.
+
+ // This requirement for 2 queue only holds if Ngetters > 2 * Nslots
+ // or Nputters > 2 * Nslots; if these are both false, one queue
+ // will suffice. This could be an optimisation for the future -
+ // wow, 4 bytes.
+
+ case cyg_none:
+ default:
+ break;
+ };
+
+ return true;
+}
+
+#endif
+
+
+// -------------------------------------------------------------------------
+// From here downwards, these are the major functions of the template; if
+// being genuinely used as a template they should probably not be inlined.
+// If being used to construct a specific class, with explicit functions,
+// then they should be. This is controlled by:
+
+#ifdef CYGIMP_MBOXT_INLINE
+#define CYG_MBOXT_INLINE inline
+#else
+#define CYG_MBOXT_INLINE
+#endif
+
+// -------------------------------------------------------------------------
+// Get an item, or wait for one to arrive
+
+template <class T, cyg_count32 QUEUE_SIZE>
+CYG_MBOXT_INLINE cyg_bool
+Cyg_Mboxt<T,QUEUE_SIZE>::get( T &ritem )
+{
+ CYG_REPORT_FUNCTION();
+ cyg_bool result = true;
+
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ CYG_INSTRUMENT_MBOXT(GET, this, count);
+
+ // Loop while the mboxt is empty, sleeping each time around
+ // the loop. This copes with the possibility of a higher priority
+ // thread grabbing the message between the wakeup in unlock() and
+ // this thread actually starting.
+
+ while( result && (0 == count) ) {
+ self->set_sleep_reason( Cyg_Thread::WAIT );
+ self->sleep();
+ get_threadq.enqueue( self );
+
+ CYG_INSTRUMENT_MBOXT(WAIT, this, count);
+
+ // Allow other threads to run
+ Cyg_Scheduler::reschedule();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ if ( result ) {
+ CYG_INSTRUMENT_MBOXT(GOT, this, count);
+
+ ritem = itemqueue[ (count--, base++) ];
+ CYG_ASSERT( 0 <= count, "Count went -ve" );
+ CYG_ASSERT( size >= base, "Base overflow" );
+
+ if ( size <= base )
+ base = 0;
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ wakeup_waiter( put_threadq );
+#endif
+ }
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_REPORT_RETVAL( result );
+ return result;
+}
+
+
+// -------------------------------------------------------------------------
+// Try to get an item with an absolute timeout and return success.
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+template <class T, cyg_count32 QUEUE_SIZE>
+CYG_MBOXT_INLINE cyg_bool
+Cyg_Mboxt<T,QUEUE_SIZE>::get( T &ritem, cyg_tick_count abs_timeout )
+{
+ CYG_REPORT_FUNCTION();
+ cyg_bool result = true;
+
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ CYG_INSTRUMENT_MBOXT(GET, this, count);
+
+ // Set the timer _once_ outside the loop.
+ self->set_timer( abs_timeout, Cyg_Thread::TIMEOUT );
+
+ // If the timeout is in the past, the wake reason will have been
+ // set to something other than NONE already. Set the result false
+ // to force an immediate return.
+
+ if( self->get_wake_reason() != Cyg_Thread::NONE )
+ result = false;
+
+ // Loop while the mboxt is empty, sleeping each time around the loop.
+ // This copes with the possibility of a higher priority thread grabbing
+ // the message between the wakeup in put()&c and this thread actually
+ // starting.
+ while ( result && (0 == count) ) {
+ // must reset the sleep reason every time
+ self->set_sleep_reason( Cyg_Thread::TIMEOUT );
+ self->sleep();
+ get_threadq.enqueue( self );
+
+ CYG_INSTRUMENT_MBOXT(WAIT, this, count);
+
+ // Allow other threads to run
+ Cyg_Scheduler::reschedule();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::TIMEOUT:
+ result = false;
+ CYG_INSTRUMENT_MBOXT(TIMEOUT, this, count);
+ break;
+
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ // clear the timer; if it actually fired, no worries.
+ self->clear_timer();
+
+ if ( result ) {
+
+ CYG_INSTRUMENT_MBOXT(GOT, this, count);
+
+ ritem = itemqueue[ (count--, base++) ];
+ CYG_ASSERT( 0 <= count, "Count went -ve" );
+ CYG_ASSERT( size >= base, "Base overflow" );
+
+ if ( size <= base )
+ base = 0;
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ wakeup_waiter( put_threadq );
+#endif
+ }
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_REPORT_RETVAL( result );
+ return result;
+}
+#endif // CYGFUN_KERNEL_THREADS_TIMER
+
+// -------------------------------------------------------------------------
+// Try to get an item and return success.
+
+template <class T, cyg_count32 QUEUE_SIZE>
+CYG_MBOXT_INLINE cyg_bool
+Cyg_Mboxt<T,QUEUE_SIZE>::tryget( T &ritem )
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_MBOXT(TRY, this, count);
+
+ cyg_bool result = ( 0 < count );
+ // If the mboxt is not empty, grab an item and return it.
+ if ( result ) {
+ ritem = itemqueue[ (count--, base++) ];
+ CYG_ASSERT( 0 <= count, "Count went -ve" );
+ CYG_ASSERT( size >= base, "Base overflow" );
+ if ( size <= base )
+ base = 0;
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ wakeup_waiter( put_threadq );
+#endif
+ }
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ return result;
+}
+
+// -------------------------------------------------------------------------
+// get next item without removing it
+template <class T, cyg_count32 QUEUE_SIZE>
+CYG_MBOXT_INLINE cyg_bool
+Cyg_Mboxt<T,QUEUE_SIZE>::peek_item( T &ritem )
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_MBOXT(TRY, this, count);
+
+ cyg_bool result = ( 0 < count );
+ // If the mboxt is not empty, grab an item and return it.
+ if ( result )
+ ritem = itemqueue[ base ];
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ return result;
+}
+
+// -------------------------------------------------------------------------
+// Put an item in the queue; wait if full.
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+template <class T, cyg_count32 QUEUE_SIZE>
+CYG_MBOXT_INLINE cyg_bool
+Cyg_Mboxt<T,QUEUE_SIZE>::put( const T item )
+{
+ CYG_REPORT_FUNCTION();
+ cyg_bool result = true;
+
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_MBOXT(PUT, this, count);
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ while ( result && (size == count) ) {
+ self->set_sleep_reason( Cyg_Thread::WAIT );
+ self->sleep();
+ put_threadq.enqueue( self );
+
+ CYG_INSTRUMENT_MBOXT(WAIT, this, count);
+
+ // Allow other threads to run
+ Cyg_Scheduler::reschedule();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ if ( result ) {
+ cyg_count32 in = base + (count++);
+ if ( size <= in )
+ in -= size;
+
+ CYG_ASSERT( size > in, "in overflow" );
+ CYG_ASSERT( 0 <= in, "in overflow" );
+ CYG_ASSERT( size >= count, "count overflow" );
+
+ itemqueue[ in ] = item;
+
+ wakeup_waiter( get_threadq );
+ }
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETVAL( result );
+ return result;
+}
+
+// -------------------------------------------------------------------------
+// Put an item in the queue; wait if full, with an absolute timeout;
+// return success.
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+template <class T, cyg_count32 QUEUE_SIZE>
+CYG_MBOXT_INLINE cyg_bool
+Cyg_Mboxt<T,QUEUE_SIZE>::put( const T item, cyg_tick_count abs_timeout )
+{
+ CYG_REPORT_FUNCTION();
+ cyg_bool result = true;
+
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_MBOXT(PUT, this, count);
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ // Set the timer _once_ outside the loop.
+ self->set_timer( abs_timeout, Cyg_Thread::TIMEOUT );
+
+ // If the timeout is in the past, the wake reason will have been
+ // set to something other than NONE already. Set the result false
+ // to force an immediate return.
+
+ if( self->get_wake_reason() != Cyg_Thread::NONE )
+ result = false;
+
+ // Loop while the mboxt is full, sleeping each time around the loop.
+ // This copes with the possibility of a higher priority thread filling
+ // the empty slot between the wakeup in get()&c and this thread
+ // actually starting.
+ while ( result && (size == count) ) {
+ // must reset the sleep reason every time
+ self->set_sleep_reason( Cyg_Thread::TIMEOUT );
+ self->sleep();
+ put_threadq.enqueue( self );
+
+ CYG_INSTRUMENT_MBOXT(WAIT, this, count);
+
+ // Allow other threads to run
+ Cyg_Scheduler::reschedule();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::TIMEOUT:
+ result = false;
+ CYG_INSTRUMENT_MBOXT(TIMEOUT, this, count);
+ break;
+
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ // clear the timer; if it actually fired, no worries.
+ self->clear_timer();
+
+ if ( result ) {
+ cyg_count32 in = base + (count++);
+ if ( size <= in )
+ in -= size;
+
+ CYG_ASSERT( size > in, "in overflow" );
+ CYG_ASSERT( 0 <= in, "in overflow" );
+ CYG_ASSERT( size >= count, "count overflow" );
+
+ itemqueue[ in ] = item;
+
+ wakeup_waiter( get_threadq );
+ }
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETVAL( result );
+ return result;
+}
+#endif // CYGFUN_KERNEL_THREADS_TIMER
+#endif // CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+
+// -------------------------------------------------------------------------
+// Try to put an item in the queue and return success; queue may be full.
+
+template <class T, cyg_count32 QUEUE_SIZE>
+CYG_MBOXT_INLINE cyg_bool
+Cyg_Mboxt<T,QUEUE_SIZE>::tryput( const T item )
+{
+ CYG_REPORT_FUNCTION();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_MBOXT(PUT, this, count);
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ if ( size == count ) {
+ Cyg_Scheduler::unlock(); // unlock, maybe switch threads
+ return false; // the mboxt is full
+ }
+
+ cyg_count32 in = base + (count++);
+ if ( size <= in )
+ in -= size;
+
+ CYG_ASSERT( size > in, "in overflow" );
+ CYG_ASSERT( 0 <= in, "in overflow" );
+ CYG_ASSERT( size >= count, "count overflow" );
+
+ itemqueue[ in ] = item;
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ wakeup_waiter( get_threadq );
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ return true;
+}
+
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_MBOXT_INL
+// EOF mboxt.inl
diff --git a/cesar/ecos/packages/kernel/current/include/mboxt2.hxx b/cesar/ecos/packages/kernel/current/include/mboxt2.hxx
new file mode 100644
index 0000000000..7f7058e79c
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/mboxt2.hxx
@@ -0,0 +1,142 @@
+#ifndef CYGONCE_KERNEL_MBOXT2_HXX
+#define CYGONCE_KERNEL_MBOXT2_HXX
+
+//==========================================================================
+//
+// mboxt2.hxx
+//
+// Mboxt2 (Message Box/Mailbox) class declarations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1998-02-10
+// Purpose: Define Mboxt2 class interfaces
+// Description: The classes defined here provide the APIs for mboxt2es.
+// Usage: #include <cyg/kernel/mboxt2.hxx>
+// #include <cyg/kernel/mboxt2.inl>
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/thread.inl>
+
+// -------------------------------------------------------------------------
+// Message/Mail Box. This template implements a queue of T's.
+// Implemented as a template for maximal flexibility; one would hope
+// that only one, with T==(void *) and the same number of them,
+// is ever used without very good reason.
+
+// Cyg_Mboxt2 has a fixed size array of T's; one size fits all.
+
+template <class T, cyg_count32 QUEUE_SIZE>
+class Cyg_Mboxt2
+{
+private:
+ cyg_count32 base; // index of first used slot
+ cyg_count32 count; // count of used slots
+ Cyg_ThreadQueue get_threadq; // Queue of waiting threads
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ Cyg_ThreadQueue put_threadq; // Queue of waiting threads
+#endif
+ static const
+ cyg_count32 size = QUEUE_SIZE;
+ T itemqueue[ QUEUE_SIZE ];
+ // queue of items
+ // private utility functions
+ // wake up a thread from some queue
+ inline void wakeup_winner( const T &msg );
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ inline void wakeup_putter( void );
+#endif
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ Cyg_Mboxt2(); // Constructor
+ ~Cyg_Mboxt2(); // Destructor
+
+ cyg_bool get( T &ritem ); // get an item; wait if none
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ cyg_bool get( T &ritem, cyg_tick_count abs_timeout );
+#endif
+ cyg_bool tryget( T &ritem ); // just one attempt
+
+ cyg_bool peek_item( T &ritem ); // get next item without
+ // removing it
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ cyg_bool put( const T item ); // put an item; wait if full
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ cyg_bool put( const T item, cyg_tick_count abs_timeout );
+#endif
+#endif
+ cyg_bool tryput( const T item ); // fails if Q full
+
+ inline
+ cyg_count32 peek() // Get current count value
+ {
+ return count;
+ }
+
+ inline
+ cyg_bool waiting_to_get() // Any threads waiting?
+ {
+ return ! get_threadq.empty();
+ }
+
+ inline
+ cyg_bool waiting_to_put() // Any threads waiting?
+ {
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ return ! put_threadq.empty();
+#else
+ return false;
+#endif
+ }
+};
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_MBOXT2_HXX
+// EOF mboxt2.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/mboxt2.inl b/cesar/ecos/packages/kernel/current/include/mboxt2.inl
new file mode 100644
index 0000000000..c453155674
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/mboxt2.inl
@@ -0,0 +1,683 @@
+#ifndef CYGONCE_KERNEL_MBOXT2_INL
+#define CYGONCE_KERNEL_MBOXT2_INL
+//==========================================================================
+//
+// mboxt2.inl
+//
+// Mboxt2 mbox template class implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1998-02-10
+// Purpose: Mboxt2 template implementation
+// Description: This file contains the implementations of the mboxt2
+// template classes.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/instrmnt.h> // instrumentation
+
+#include <cyg/kernel/mboxt2.hxx> // our header
+
+#include <cyg/kernel/thread.inl> // thread inlines
+#include <cyg/kernel/sched.inl> // scheduler inlines
+#include <cyg/kernel/clock.inl> // clock inlines
+
+// -------------------------------------------------------------------------
+// inline function for awakening waiting threads
+
+template <class T, cyg_count32 QUEUE_SIZE>
+inline void
+Cyg_Mboxt2<T,QUEUE_SIZE>::wakeup_winner( const T &msg )
+{
+ CYG_ASSERT( !get_threadq.empty(), "Where did the winner go?" );
+
+ // The queue is non-empty, so grab the next thread and wake it up.
+ Cyg_Thread *thread = get_threadq.dequeue();
+
+ CYG_ASSERTCLASS( thread, "Bad thread pointer");
+
+ T *msg_ret = (T *)(thread->get_wait_info());
+ *msg_ret = msg;
+
+ thread->set_wake_reason( Cyg_Thread::DONE );
+ thread->wake();
+
+ CYG_INSTRUMENT_MBOXT(WAKE, this, thread);
+}
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+template <class T, cyg_count32 QUEUE_SIZE>
+inline void
+Cyg_Mboxt2<T,QUEUE_SIZE>::wakeup_putter( void )
+{
+ if( !put_threadq.empty() ) {
+ // The queue is non-empty, so grab the next thread and wake it up.
+ Cyg_Thread *thread = put_threadq.dequeue();
+
+ CYG_ASSERTCLASS( thread, "Bad thread pointer");
+
+ T *new_msg = (T *)(thread->get_wait_info());
+
+ cyg_count32 in = base + (count++);
+ if ( size <= in )
+ in -= size;
+
+ CYG_ASSERT( size > in, "in overflow" );
+ CYG_ASSERT( 0 <= in, "in overflow" );
+ CYG_ASSERT( size >= count, "count overflow" );
+
+ itemqueue[ in ] = *new_msg;
+
+ thread->set_wake_reason( Cyg_Thread::DONE );
+ thread->wake();
+
+ CYG_INSTRUMENT_MBOXT(WAKE, this, thread);
+ }
+}
+#endif
+
+// -------------------------------------------------------------------------
+// Constructor
+
+template <class T, cyg_count32 QUEUE_SIZE>
+Cyg_Mboxt2<T,QUEUE_SIZE>::Cyg_Mboxt2()
+{
+ CYG_REPORT_FUNCTION();
+ base = 0;
+ count = 0;
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Destructor
+
+template <class T, cyg_count32 QUEUE_SIZE>
+Cyg_Mboxt2<T,QUEUE_SIZE>::~Cyg_Mboxt2()
+{
+ CYG_REPORT_FUNCTION();
+#if 0
+ CYG_ASSERT( 0 == count, "Deleting mboxt2 with messages");
+ CYG_ASSERT( get_threadq.empty(), "Deleting mboxt2 with threads waiting to get");
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ CYG_ASSERT( put_threadq.empty(), "Deleting mboxt2 with threads waiting to put");
+#endif
+#endif
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ while ( ! get_threadq.empty() ) {
+ Cyg_Thread *thread = get_threadq.dequeue();
+ thread->set_wake_reason( Cyg_Thread::DESTRUCT );
+ thread->wake();
+ }
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ while ( ! put_threadq.empty() ) {
+ Cyg_Thread *thread = put_threadq.dequeue();
+ thread->set_wake_reason( Cyg_Thread::DESTRUCT );
+ thread->wake();
+ }
+#endif
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// debugging/assert function
+
+#ifdef CYGDBG_USE_ASSERTS
+
+template <class T, cyg_count32 QUEUE_SIZE>
+cyg_bool
+Cyg_Mboxt2<T,QUEUE_SIZE>::check_this(cyg_assert_class_zeal zeal) const
+{
+ if ( Cyg_Thread::DESTRUCT == Cyg_Thread::self()->get_wake_reason() )
+ // then the whole thing is invalid, and we know it.
+ // so return OK, since this check should NOT make an error.
+ return true;
+
+ // check that we have a non-NULL pointer first
+ if( this == NULL ) return false;
+
+#if 0 // thread queues do not have checking funcs.
+ if ( ! get_threadq.check_this( zeal ) ) return false;
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ if ( ! put_threadq.check_this( zeal ) ) return false;
+#endif
+#endif
+
+ switch( zeal )
+ {
+ case cyg_system_test:
+ case cyg_extreme:
+ case cyg_thorough:
+ case cyg_quick:
+ case cyg_trivial:
+ // plenty of scope for fencepost problems here
+ if ( size < count ) return false;
+ if ( size <= base ) return false;
+ if ( 0 > count ) return false;
+ if ( 0 > base ) return false;
+
+ // Comments about needing 2 queues elided; they're not true in this
+ // immediate-dispatch model. I think we could get away with only
+ // one queue now, biut is it worth it? 4 bytes of redundant info
+ // buys a lot of correctness.
+
+ case cyg_none:
+ default:
+ break;
+ };
+
+ return true;
+}
+
+#endif
+
+
+// -------------------------------------------------------------------------
+// From here downwards, these are the major functions of the template; if
+// being genuinely used as a template they should probably not be inlined.
+// If being used to construct a specific class, with explicit functions,
+// then they should be. This is controlled by:
+
+#ifdef CYGIMP_MBOXT_INLINE
+#define CYG_MBOXT_INLINE inline
+#else
+#define CYG_MBOXT_INLINE
+#endif
+
+// -------------------------------------------------------------------------
+// Get an item, or wait for one to arrive
+
+template <class T, cyg_count32 QUEUE_SIZE>
+CYG_MBOXT_INLINE cyg_bool
+Cyg_Mboxt2<T,QUEUE_SIZE>::get( T &ritem )
+{
+ CYG_REPORT_FUNCTION();
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ CYG_INSTRUMENT_MBOXT(GET, this, count);
+
+ if ( 0 < count ) {
+ CYG_INSTRUMENT_MBOXT(GOT, this, count);
+
+ ritem = itemqueue[ (count--, base++) ];
+ CYG_ASSERT( 0 <= count, "Count went -ve" );
+ CYG_ASSERT( size >= base, "Base overflow" );
+
+ if ( size <= base )
+ base = 0;
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ wakeup_putter();
+#endif
+
+ // Unlock the scheduler and definitely switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_REPORT_RETVAL( true );
+ return true;
+ }
+
+ self->set_wait_info( (CYG_ADDRWORD)&ritem );
+ self->set_sleep_reason( Cyg_Thread::WAIT );
+ self->sleep();
+ get_threadq.enqueue( self );
+
+ CYG_INSTRUMENT_MBOXT(WAIT, this, count);
+
+ // Unlock scheduler and allow other threads to run
+ Cyg_Scheduler::unlock_reschedule();
+
+ cyg_bool result = true;
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_REPORT_RETVAL( result );
+ return result;
+}
+
+
+// -------------------------------------------------------------------------
+// Try to get an item with an absolute timeout and return success.
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+template <class T, cyg_count32 QUEUE_SIZE>
+CYG_MBOXT_INLINE cyg_bool
+Cyg_Mboxt2<T,QUEUE_SIZE>::get( T &ritem, cyg_tick_count abs_timeout )
+{
+ CYG_REPORT_FUNCTION();
+
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ CYG_INSTRUMENT_MBOXT(GET, this, count);
+
+ if ( 0 < count ) {
+ CYG_INSTRUMENT_MBOXT(GOT, this, count);
+
+ ritem = itemqueue[ (count--, base++) ];
+ CYG_ASSERT( 0 <= count, "Count went -ve" );
+ CYG_ASSERT( size >= base, "Base overflow" );
+
+ if ( size <= base )
+ base = 0;
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ wakeup_putter();
+#endif
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_REPORT_RETVAL( true );
+ return true;
+ }
+
+ // Set the timer
+ self->set_timer( abs_timeout, Cyg_Thread::TIMEOUT );
+
+ // If the timeout is in the past, the wake reason will have been set to
+ // something other than NONE already. If so, skip the wait and go
+ // straight to unlock.
+
+ if( Cyg_Thread::NONE == self->get_wake_reason() ) {
+ self->set_wait_info( (CYG_ADDRWORD)&ritem );
+ self->sleep();
+ get_threadq.enqueue( self );
+
+ CYG_INSTRUMENT_MBOXT(WAIT, this, count);
+ }
+
+ // Unlock scheduler and allow other threads to run
+ Cyg_Scheduler::unlock_reschedule();
+
+ // clear the timer; if it actually fired, no worries.
+ self->clear_timer();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ cyg_bool result = true;
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::TIMEOUT:
+ result = false;
+ CYG_INSTRUMENT_MBOXT(TIMEOUT, this, count);
+ break;
+
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+
+ CYG_REPORT_RETVAL( result );
+ return result;
+}
+#endif // CYGFUN_KERNEL_THREADS_TIMER
+
+// -------------------------------------------------------------------------
+// Try to get an item and return success.
+
+template <class T, cyg_count32 QUEUE_SIZE>
+CYG_MBOXT_INLINE cyg_bool
+Cyg_Mboxt2<T,QUEUE_SIZE>::tryget( T &ritem )
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_MBOXT(TRY, this, count);
+
+ cyg_bool result = ( 0 < count );
+ // If the mboxt2 is not empty, grab an item and return it.
+ if ( result ) {
+ ritem = itemqueue[ (count--, base++) ];
+ CYG_ASSERT( 0 <= count, "Count went -ve" );
+ CYG_ASSERT( size >= base, "Base overflow" );
+ if ( size <= base )
+ base = 0;
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ wakeup_putter();
+#endif
+ }
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETVAL( result );
+ return result;
+}
+
+// -------------------------------------------------------------------------
+// get next item without removing it
+template <class T, cyg_count32 QUEUE_SIZE>
+CYG_MBOXT_INLINE cyg_bool
+Cyg_Mboxt2<T,QUEUE_SIZE>::peek_item( T &ritem )
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_MBOXT(TRY, this, count);
+
+ cyg_bool result = ( 0 < count );
+ // If the mboxt2 is not empty, grab an item and return it.
+ if ( result )
+ ritem = itemqueue[ base ];
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETVAL( result );
+ return result;
+}
+
+// -------------------------------------------------------------------------
+// Put an item in the queue; wait if full.
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+template <class T, cyg_count32 QUEUE_SIZE>
+CYG_MBOXT_INLINE cyg_bool
+Cyg_Mboxt2<T,QUEUE_SIZE>::put( const T item )
+{
+ CYG_REPORT_FUNCTION();
+
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_MBOXT(PUT, this, count);
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ if ( size == count ) {
+ CYG_ASSERT( get_threadq.empty(), "Threads waiting AND queue full?" );
+
+ self->set_wait_info( (CYG_ADDRWORD)&item );
+ self->set_sleep_reason( Cyg_Thread::WAIT );
+ self->sleep();
+ put_threadq.enqueue( self );
+
+ CYG_INSTRUMENT_MBOXT(WAIT, this, count);
+
+ // when this returns, our item is in the queue.
+ Cyg_Scheduler::unlock_reschedule(); // unlock, switch threads
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ cyg_bool result = true;
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+ CYG_REPORT_RETVAL( result );
+ return result;
+ }
+
+ if ( !get_threadq.empty() ) {
+ wakeup_winner( item );
+ Cyg_Scheduler::unlock(); // unlock, maybe switch threads
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_REPORT_RETVAL( true );
+ return true;
+ }
+
+ cyg_count32 in = base + (count++);
+ if ( size <= in )
+ in -= size;
+
+ CYG_ASSERT( size > in, "in overflow" );
+ CYG_ASSERT( 0 <= in, "in overflow" );
+ CYG_ASSERT( size >= count, "count overflow" );
+
+ itemqueue[ in ] = item;
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETVAL( true );
+ return true;
+}
+
+// -------------------------------------------------------------------------
+// Put an item in the queue; wait if full, with an absolute timeout;
+// return success.
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+template <class T, cyg_count32 QUEUE_SIZE>
+CYG_MBOXT_INLINE cyg_bool
+Cyg_Mboxt2<T,QUEUE_SIZE>::put( const T item, cyg_tick_count abs_timeout )
+{
+ CYG_REPORT_FUNCTION();
+
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_MBOXT(PUT, this, count);
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ if ( size == count ) {
+
+ CYG_ASSERT( get_threadq.empty(), "Threads waiting AND queue full?" );
+
+ // Set the timer
+ self->set_timer( abs_timeout, Cyg_Thread::TIMEOUT );
+
+ // If the timeout is in the past, the wake reason will have been set to
+ // something other than NONE already. If so, skip the wait and go
+ // straight to unlock.
+
+ if( Cyg_Thread::NONE == self->get_wake_reason() ) {
+ self->set_wait_info( (CYG_ADDRWORD)&item );
+ self->sleep();
+ put_threadq.enqueue( self );
+
+ CYG_INSTRUMENT_MBOXT(WAIT, this, count);
+ }
+
+ // when this returns, our item is in the queue.
+ Cyg_Scheduler::unlock_reschedule(); // unlock, switch threads
+
+ // clear the timer; if it actually fired, no worries.
+ self->clear_timer();
+
+ cyg_bool result = true;
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::TIMEOUT:
+ result = false;
+ CYG_INSTRUMENT_MBOXT(TIMEOUT, this, count);
+ break;
+
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_REPORT_RETVAL( result );
+ return result;
+ }
+
+
+ if ( !get_threadq.empty() ) {
+ wakeup_winner( item );
+ Cyg_Scheduler::unlock(); // unlock, maybe switch threads
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_REPORT_RETVAL( true );
+ return true;
+ }
+
+ cyg_count32 in = base + (count++);
+ if ( size <= in )
+ in -= size;
+
+ CYG_ASSERT( size > in, "in overflow" );
+ CYG_ASSERT( 0 <= in, "in overflow" );
+ CYG_ASSERT( size >= count, "count overflow" );
+
+ itemqueue[ in ] = item;
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_REPORT_RETVAL( true );
+ return true;
+}
+#endif // CYGFUN_KERNEL_THREADS_TIMER
+#endif // CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+
+// -------------------------------------------------------------------------
+// Try to put an item in the queue and return success; queue may be full.
+
+template <class T, cyg_count32 QUEUE_SIZE>
+CYG_MBOXT_INLINE cyg_bool
+Cyg_Mboxt2<T,QUEUE_SIZE>::tryput( const T item )
+{
+ CYG_REPORT_FUNCTION();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_MBOXT(PUT, this, count);
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ if ( size == count ) {
+ CYG_ASSERT( get_threadq.empty(), "Threads waiting AND queue full?" );
+ Cyg_Scheduler::unlock(); // unlock, maybe switch threads
+ CYG_REPORT_RETVAL( false );
+ return false; // the mboxt2 is full
+ }
+
+ if ( !get_threadq.empty() ) {
+ CYG_ASSERT( 0 == count, "Threads waiting AND queue not empty" );
+ wakeup_winner( item );
+ Cyg_Scheduler::unlock(); // unlock, maybe switch threads
+ CYG_REPORT_RETVAL( true );
+ return true;
+ }
+
+ cyg_count32 in = base + (count++);
+ if ( size <= in )
+ in -= size;
+
+ CYG_ASSERT( size > in, "in overflow" );
+ CYG_ASSERT( 0 <= in, "in overflow" );
+ CYG_ASSERT( size >= count, "count overflow" );
+
+ itemqueue[ in ] = item;
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETVAL( true );
+ return true;
+}
+
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_MBOXT2_INL
+// EOF mboxt2.inl
diff --git a/cesar/ecos/packages/kernel/current/include/mlqueue.hxx b/cesar/ecos/packages/kernel/current/include/mlqueue.hxx
new file mode 100644
index 0000000000..88d07976cc
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/mlqueue.hxx
@@ -0,0 +1,318 @@
+#ifndef CYGONCE_KERNEL_MLQUEUE_HXX
+#define CYGONCE_KERNEL_MLQUEUE_HXX
+
+//==========================================================================
+//
+// mlqueue.hxx
+//
+// Multi-Level Queue scheduler class declarations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: jlarmour
+// Date: 1997-09-10
+// Purpose: Define multilevel queue scheduler implementation
+// Description: The classes defined here are used as base classes
+// by the common classes that define schedulers and thread
+// things. The MLQ scheduler in various configurations
+// provides standard FIFO, round-robin and single priority
+// schedulers.
+// Usage: Included according to configuration by
+// <cyg/kernel/sched.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+
+#include <cyg/infra/clist.hxx> // List implementation
+
+// -------------------------------------------------------------------------
+// The macro CYGNUM_KERNEL_SCHED_PRIORITIES contains the number of priorities
+// supported by the scheduler.
+
+#ifndef CYGNUM_KERNEL_SCHED_PRIORITIES
+#define CYGNUM_KERNEL_SCHED_PRIORITIES 32 // define a default
+#endif
+
+// set bitmap size
+#define CYGNUM_KERNEL_SCHED_BITMAP_SIZE CYGNUM_KERNEL_SCHED_PRIORITIES
+
+// -------------------------------------------------------------------------
+// The macro CYGNUM_KERNEL_SCHED_BITMAP_SIZE contains the number of bits that the
+// scheduler bitmap should contain. It is derived from the number of prioirity
+// levels defined by the configuration.
+
+#if CYGNUM_KERNEL_SCHED_BITMAP_SIZE <= 8
+typedef cyg_ucount8 cyg_sched_bitmap;
+#elif CYGNUM_KERNEL_SCHED_BITMAP_SIZE <= 16
+typedef cyg_ucount16 cyg_sched_bitmap;
+#elif CYGNUM_KERNEL_SCHED_BITMAP_SIZE <= 32
+typedef cyg_ucount32 cyg_sched_bitmap;
+#else
+#error Bitmaps greater than 32 bits not currently allowed
+#endif
+
+// -------------------------------------------------------------------------
+// Customize the scheduler
+
+#define CYGIMP_THREAD_PRIORITY 1 // Threads have changable priorities
+
+#define CYG_THREAD_MIN_PRIORITY (CYGNUM_KERNEL_SCHED_PRIORITIES-1)
+#define CYG_THREAD_MAX_PRIORITY 0
+
+// set default scheduling info value for thread constructors.
+#define CYG_SCHED_DEFAULT_INFO CYG_THREAD_MAX_PRIORITY
+
+// -------------------------------------------------------------------------
+// scheduler Run queue object
+
+typedef Cyg_CList_T<Cyg_Thread> Cyg_RunQueue;
+
+// -------------------------------------------------------------------------
+// Thread queue implementation.
+// This class provides the (scheduler specific) implementation of the
+// thread queue class.
+
+class Cyg_ThreadQueue_Implementation
+ : public Cyg_CList_T<Cyg_Thread>
+{
+ friend class Cyg_Scheduler_Implementation;
+ friend class Cyg_SchedThread_Implementation;
+
+ void set_thread_queue(Cyg_Thread *thread,
+ Cyg_ThreadQueue *tq );
+
+protected:
+
+ // API used by Cyg_ThreadQueue
+
+ Cyg_ThreadQueue_Implementation() {}; // Constructor
+
+ // Add thread to queue
+ void enqueue(Cyg_Thread *thread);
+
+ // return first thread on queue
+ Cyg_Thread *highpri();
+
+ // remove first thread on queue
+ Cyg_Thread *dequeue();
+
+ // Remove thread from queue
+ void remove(Cyg_Thread *thread);
+
+};
+
+// -------------------------------------------------------------------------
+// This class contains the implementation details of the scheduler, and
+// provides a standard API for accessing it.
+
+class Cyg_Scheduler_Implementation
+ : public Cyg_Scheduler_Base
+{
+ friend class Cyg_ThreadQueue_Implementation;
+ friend class Cyg_SchedThread_Implementation;
+ friend class Cyg_HardwareThread;
+ friend void cyg_scheduler_set_need_reschedule();
+
+ // Mask of which run queues have ready threads
+ cyg_sched_bitmap queue_map;
+
+ // Each run queue is a double linked circular list of threads.
+ // These pointers point to the head element of each list.
+ Cyg_RunQueue run_queue[CYGNUM_KERNEL_SCHED_PRIORITIES];
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+
+ // In SMP systems we additionally keep a counter for each priority
+ // of the number of pending but not running threads in each queue.
+
+ cyg_uint32 pending[CYGNUM_KERNEL_SCHED_PRIORITIES];
+
+ cyg_sched_bitmap pending_map;
+
+#endif
+
+protected:
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE
+
+ // Timeslice counter. This is decremented on each
+ // clock tick, and a timeslice is performed each
+ // time it zeroes.
+
+ static cyg_ucount32 timeslice_count[CYGNUM_KERNEL_CPU_MAX]
+ CYGBLD_ANNOTATE_VARIABLE_SCHED;
+
+ static void reset_timeslice_count();
+
+#endif
+
+ Cyg_Scheduler_Implementation(); // Constructor
+
+ // The following functions provide the scheduler implementation
+ // interface to the Cyg_Scheduler class. These are protected
+ // so that only the scheduler can call them.
+
+ // choose a new thread
+ Cyg_Thread *schedule();
+
+ // make thread schedulable
+ void add_thread(Cyg_Thread *thread);
+
+ // make thread un-schedulable
+ void rem_thread(Cyg_Thread *thread);
+
+ // register thread with scheduler
+ void register_thread(Cyg_Thread *thread);
+
+ // deregister thread
+ void deregister_thread(Cyg_Thread *thread);
+
+ // Test the given priority for uniqueness
+ cyg_bool unique( cyg_priority priority);
+
+ // Set need_reschedule if the supplied thread is of lower
+ // priority than any that are currently running.
+ static void set_need_reschedule( Cyg_Thread *thread );
+ static void set_need_reschedule();
+
+public:
+ void set_idle_thread( Cyg_Thread *thread, HAL_SMP_CPU_TYPE cpu );
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE
+
+ // If timeslicing is enbled, define a scheduler
+ // entry points to do timeslicing. This will be
+ // called from the RTC DSR.
+public:
+ void timeslice();
+ void timeslice_cpu();
+
+#endif
+
+};
+
+// -------------------------------------------------------------------------
+// Cyg_Scheduler_Implementation inlines
+
+inline void Cyg_Scheduler_Implementation::set_need_reschedule()
+{
+ need_reschedule[CYG_KERNEL_CPU_THIS()] = true;
+}
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE
+
+inline void Cyg_Scheduler_Implementation::reset_timeslice_count()
+{
+ timeslice_count[CYG_KERNEL_CPU_THIS()] = CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// Scheduler thread implementation.
+// This class provides the implementation of the scheduler specific parts
+// of each thread.
+
+class Cyg_SchedThread_Implementation
+ : public Cyg_DNode_T<Cyg_Thread>
+{
+ friend class Cyg_Scheduler_Implementation;
+ friend class Cyg_ThreadQueue_Implementation;
+
+protected:
+
+ cyg_priority priority; // current thread priority
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+ HAL_SMP_CPU_TYPE cpu; // CPU id of cpu currently running
+ // this thread, or CYG_KERNEL_CPU_NONE
+ // if not running.
+#endif
+
+ Cyg_SchedThread_Implementation(CYG_ADDRWORD sched_info);
+
+ void yield(); // Yield CPU to next thread
+
+ static void rotate_queue( cyg_priority pri );
+ // Rotate that run queue
+
+ void to_queue_head( void ); // Move this thread to the head
+ // of its queue (not necessarily
+ // a scheduler queue)
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE_ENABLE
+
+ // This defines whether this thread is subject to timeslicing.
+ // If false, timeslice expiry has no effect on the thread.
+
+ cyg_bool timeslice_enabled;
+
+public:
+
+ void timeslice_enable();
+
+ void timeslice_disable();
+
+#endif
+
+};
+
+// -------------------------------------------------------------------------
+// Cyg_SchedThread_Implementation inlines.
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE_ENABLE
+
+inline void Cyg_SchedThread_Implementation::timeslice_enable()
+{
+ timeslice_enabled = true;
+}
+
+inline void Cyg_SchedThread_Implementation::timeslice_disable()
+{
+ timeslice_enabled = false;
+}
+
+#endif
+
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_MLQUEUE_HXX
+// EOF mlqueue.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/mqueue.hxx b/cesar/ecos/packages/kernel/current/include/mqueue.hxx
new file mode 100644
index 0000000000..5099f47c9a
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/mqueue.hxx
@@ -0,0 +1,163 @@
+#ifndef CYGONCE_KERNEL_MQUEUE_HXX
+#define CYGONCE_KERNEL_MQUEUE_HXX
+/*========================================================================
+//
+// mqueue.hxx
+//
+// Message queues
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-05-09
+// Purpose: This file provides the interface for eCos message queues
+// Description: This differs from the message boxes also supported by
+// eCos primarily because the requirements of message
+// queues are driven by POSIX semantics. POSIX semantics are
+// more dynamic and therefore heavyweight than Mboxes,
+// including prioritization, and variable sized queues and
+// message lengths
+// Usage: #include <cyg/kernel/mqueue.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/kernel.h> /* Configuration header */
+
+/* INCLUDES */
+
+#include <stddef.h> /* size_t */
+#include <cyg/infra/cyg_type.h> /* Types */
+#include <cyg/infra/cyg_ass.h> /* CYGDBG_DEFINE_CHECK_THIS,
+ CYGDBG_USE_ASSERTS */
+#include <cyg/kernel/ktypes.h> /* Kernel package types */
+#include <cyg/kernel/sema.hxx> /* Cyg_Counting_Semaphore */
+
+/* CLASSES */
+
+class Cyg_Mqueue {
+public:
+ typedef void (*callback_fn_t)(Cyg_Mqueue &q, CYG_ADDRWORD data);
+ typedef void * (*qalloc_fn_t)(size_t len);
+ typedef void (*qfree_fn_t)(void *ptr, size_t len);
+
+ typedef enum {
+ OK=0,
+ NOMEM,
+ WOULDBLOCK,
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ TIMEOUT,
+#endif
+ INTR
+ } qerr_t;
+
+protected:
+ struct qentry {
+ struct qentry *next;
+ unsigned int priority;
+ size_t buflen;
+ volatile bool busy;
+ // data buffer follows here
+ char *buf() const { return (char *)this + sizeof(*this); }
+ };
+
+ Cyg_Counting_Semaphore putsem, getsem;
+
+ struct qentry *q; // q entries in use
+ struct qentry *freelist; // q entries not in use
+ void *queuespace; // placeholder for the dynamically allocated
+ // area
+
+ size_t queuespacesize;
+
+ qfree_fn_t free_fn; // how to free queuespace when we destruct
+
+ callback_fn_t callback;
+ CYG_ADDRWORD callback_data;
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+#ifdef CYGDBG_USE_ASSERTS
+ long qlen;
+ size_t msgsize;
+#endif
+
+public:
+
+ Cyg_Mqueue( long maxmsgs, long maxmsgsize,
+ qalloc_fn_t qalloc, qfree_fn_t qfree, qerr_t *err );
+ ~Cyg_Mqueue();
+ // put() copies len bytes of *buf into the queue at priority prio
+ qerr_t put( const char *buf, size_t len, unsigned int prio, bool block=true
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ ,cyg_tick_count timeout = 0
+#endif
+ );
+
+ // get() returns the oldest highest priority message in the queue in *buf
+ // and sets *prio to the priority (if prio is non-NULL) and *len to the
+ // actual message size
+ qerr_t get( char *buf, size_t *len, unsigned int *prio, bool block=true
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ ,cyg_tick_count timeout = 0
+#endif
+ );
+
+ // count() returns the number of messages in the queue
+ long count();
+
+ // Supply a callback function to call (with the supplied data argument)
+ // when the queue goes from empty to non-empty (unless someone's already
+ // doing a get()). This returns the old callback_fn, and if olddata is
+ // non-NULL sets it to the old data (yes, really!)
+ callback_fn_t setnotify( callback_fn_t callback_fn, CYG_ADDRWORD data,
+ CYG_ADDRWORD *olddata=NULL);
+
+}; /* class Cyg_Mqueue */
+
+#ifndef CYGIMP_KERNEL_SYNCH_MQUEUE_NOT_INLINE
+# include <cyg/kernel/mqueue.inl>
+#endif
+
+#endif /* CYGONCE_KERNEL_MQUEUE_HXX multiple inclusion protection */
+
+/* EOF mqueue.hxx */
diff --git a/cesar/ecos/packages/kernel/current/include/mqueue.inl b/cesar/ecos/packages/kernel/current/include/mqueue.inl
new file mode 100644
index 0000000000..da8ce24a4c
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/mqueue.inl
@@ -0,0 +1,543 @@
+#ifndef CYGONCE_KERNEL_MQUEUE_INL
+#define CYGONCE_KERNEL_MQUEUE_INL
+/*========================================================================
+//
+// mqueue.inl
+//
+// Message queues implementation
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-05-09
+// Purpose: This file provides the implementation for eCos message
+// queues
+// Description: This differs from the message boxes also supported
+// by eCos primarily because the requirements of message
+// queues are driven by POSIX semantics. POSIX semantics are
+// more dynamic and therefore heavyweight than Mboxes,
+// including prioritization, and variable sized queues and
+// message lengths
+// Usage: Do not include this file directly - instead
+// #include <cyg/kernel/mqueue.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/system.h>
+#include <pkgconf/kernel.h> // Configuration header
+
+/* INCLUDES */
+
+#include <stddef.h> // size_t, NULL
+#include <cyg/infra/cyg_type.h> // Types
+#include <cyg/kernel/mqueue.hxx> // Header for this file, just in case
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/kernel/sched.hxx> // scheduler
+#include <cyg/kernel/sched.inl> // scheduler inlines
+#include <cyg/kernel/sema.hxx> // Cyg_Counting_Semaphore
+
+#ifdef CYGPKG_ISOINFRA
+# include <string.h> // memcpy
+#else
+externC void * memcpy( void *, const void *, size_t );
+#endif
+
+// NOTE:
+// An alternative implementation based on mutexes and condition variables
+// rather than semaphores/scheduler locking was considered. But it was
+// not thought quite as good because it isn't driver safe. You would
+// also have to manage explicitly what counting semaphores do for you
+// intrinsically. Also with the mutex approach, the message queue would
+// be locked the whole time a new entry was being filled in, or copied out
+//
+// It also makes the non-blocking case properly non-blocking rather than
+// still being able to block while waiting for a mutex protecting
+// the message queue internal structures
+
+/* INLINE FUNCTIONS */
+
+#ifndef CYGPRI_KERNEL_SYNCH_MQUEUE_INLINE
+# define CYGPRI_KERNEL_SYNCH_MQUEUE_INLINE inline
+#endif
+
+//------------------------------------------------------------------------
+
+CYGPRI_KERNEL_SYNCH_MQUEUE_INLINE cyg_bool
+Cyg_Mqueue::check_this( cyg_assert_class_zeal zeal ) const
+{
+ if (zeal != cyg_none) {
+ CYG_CHECK_DATA_PTRC(this); // extreme paranoia
+
+#ifdef CYGDBG_USE_ASSERTS
+ if ( qlen <= 0 || msgsize <= 0 )
+ return false;
+#endif
+
+ if ( queuespacesize < sizeof(struct qentry)+1 )
+ return false;
+
+ CYG_CHECK_DATA_PTRC(queuespace);
+ CYG_CHECK_FUNC_PTRC(free_fn);
+
+ // prevent pre-emption through this. Not so bad since
+ // this is only a diagnostic function
+ Cyg_Scheduler::lock();
+
+ if (NULL != q)
+ CYG_CHECK_DATA_PTRC(q);
+ if (NULL != freelist)
+ CYG_CHECK_DATA_PTRC(freelist);
+ if (NULL != callback)
+ CYG_CHECK_FUNC_PTRC(callback);
+
+ // check each queue entry
+ long msgs=0, busymsgs=0;
+ unsigned int oldprio=0;
+ struct qentry *qtmp;
+
+ if ( NULL != q )
+ oldprio = q->priority;
+ for ( qtmp=q; NULL != qtmp; qtmp=qtmp->next ) {
+ if ( NULL != qtmp->next )
+ CYG_CHECK_DATA_PTRC( qtmp->next );
+
+ // queue should be priority ordered
+ if ( qtmp->priority > oldprio )
+ goto fail;
+ oldprio = qtmp->priority;
+
+#ifdef CYGDBG_USE_ASSERTS
+ // valid length
+ if ( !qtmp->busy )
+ if ( qtmp->buflen > msgsize )
+ goto fail;
+#endif
+ if ( qtmp->busy )
+ busymsgs++;
+ else
+ msgs++;
+ } // for
+
+ long freemsgs=0;
+
+ // check that number of used and unused messages == q length
+ for ( qtmp=freelist; NULL != qtmp; qtmp=qtmp->next ) {
+ if ( NULL != qtmp->next )
+ CYG_CHECK_DATA_PTRC( qtmp->next );
+ if ( qtmp->busy )
+ busymsgs++;
+ else
+ freemsgs++;
+ }
+
+#ifdef CYGDBG_USE_ASSERTS
+ // and sum of all messages should be the total q length
+ if ( qlen != (msgs+freemsgs+busymsgs) )
+ goto fail;
+#endif
+
+ Cyg_Scheduler::unlock();
+
+ }
+ return true; // object OK
+ fail:
+ Cyg_Scheduler::unlock();
+ return false; // object fubar'd
+}
+
+//------------------------------------------------------------------------
+
+CYGPRI_KERNEL_SYNCH_MQUEUE_INLINE
+Cyg_Mqueue::Cyg_Mqueue( long maxmsgs, long maxmsgsize,
+ qalloc_fn_t qalloc, qfree_fn_t qfree, qerr_t *err )
+ : putsem(maxmsgs), getsem(0)
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG5( "maxmsgs=%ld, maxmsgsize=%ld, qalloc=%08x, "
+ "qfree=%08x, &err=%08x", maxmsgs, maxmsgsize,
+ qalloc, qfree, err);
+ CYG_PRECONDITIONC( (maxmsgs > 0) && (maxmsgsize > 0) );
+ CYG_CHECK_DATA_PTRC( err );
+ CYG_CHECK_FUNC_PTRC( qalloc );
+ CYG_CHECK_FUNC_PTRC( qfree );
+
+ // mem to allocate for entire queue size. Also wants to be rounded
+ // up so that the structs are aligned.
+ const long addralign = sizeof(void *) - 1;
+ long entrysize = (sizeof(struct qentry) + maxmsgsize + addralign)
+ & ~addralign;
+
+ queuespacesize = entrysize * maxmsgs;
+ queuespace = qalloc( queuespacesize );
+
+ if (NULL == queuespace) {
+ *err=NOMEM;
+ CYG_REPORT_RETURN();
+ return;
+ }
+
+ // link up freelist
+ long i;
+ struct qentry *qtmp;
+ for ( i=0, qtmp=(struct qentry *)queuespace;
+ i<maxmsgs-1;
+ i++, qtmp=qtmp->next ) {
+ qtmp->busy = false;
+ qtmp->next = (struct qentry *)((char *)qtmp + entrysize);
+ } // for
+
+ freelist = (struct qentry *)queuespace;
+
+ // set the last entry in the chain to the start to make the list circular
+ qtmp->next = NULL;
+ qtmp->busy = false;
+ callback = NULL;
+ q = NULL;
+ free_fn = qfree;
+#ifdef CYGDBG_USE_ASSERTS
+ qlen = maxmsgs;
+ msgsize = maxmsgsize;
+#endif
+
+ *err = OK;
+
+ // object should be valid now
+ CYG_ASSERT_THISC();
+
+ CYG_REPORT_RETURN();
+}
+
+//------------------------------------------------------------------------
+
+CYGPRI_KERNEL_SYNCH_MQUEUE_INLINE
+Cyg_Mqueue::~Cyg_Mqueue()
+{
+ CYG_REPORT_FUNCTION();
+
+ if ( NULL != queuespace ) {
+ // object should be valid if queuespace was successfully allocated
+ CYG_ASSERT_THISC();
+ free_fn( queuespace, queuespacesize );
+ }
+
+#ifdef CYGDBG_USE_ASSERTS
+ qlen = msgsize = 0; // deliberately make it fail check_this() if used
+#endif
+
+ CYG_REPORT_RETURN();
+}
+
+//------------------------------------------------------------------------
+
+// put() copies len bytes of *buf into the queue at priority prio
+CYGPRI_KERNEL_SYNCH_MQUEUE_INLINE Cyg_Mqueue::qerr_t
+Cyg_Mqueue::put( const char *buf, size_t len, unsigned int prio, bool block
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ , cyg_tick_count timeout
+#endif
+ )
+{
+ CYG_REPORT_FUNCTYPE( "err=%d");
+ CYG_REPORT_FUNCARG4( "buf=%08x, len=%ld, prio=%ud, block=%d",
+ buf, len, prio, block==true );
+ CYG_CHECK_DATA_PTRC( buf );
+ CYG_ASSERT_THISC();
+ CYG_PRECONDITIONC( len <= (size_t)msgsize );
+
+ qerr_t err;
+ struct qentry *qtmp, *qent;
+
+ // wait till a freelist entry is available
+ if ( true == block ) {
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ if ( timeout != 0) {
+ if ( false == putsem.wait(timeout) ) {
+ err = TIMEOUT;
+ goto exit;
+ }
+ }
+ else
+#endif
+ if ( false == putsem.wait() ) {
+ err = INTR;
+ goto exit;
+ }
+ } else {
+ if ( false == putsem.trywait() ) {
+ err = WOULDBLOCK;
+ goto exit;
+ }
+ }
+
+ // prevent preemption when fiddling with important members
+ Cyg_Scheduler::lock();
+
+ CYG_ASSERT_THISC();
+
+ // get a queue entry from the freelist
+ // don't need to check the freelist - the semaphore tells us there's
+ // definitely a usable non-busy one there. It's just a question of
+ // locating it.
+
+ if (!freelist->busy) { // fast-track common case
+ qent = freelist;
+ freelist = freelist->next;
+ } else {
+ for ( qtmp=freelist; qtmp->next->busy; qtmp=qtmp->next )
+ CYG_EMPTY_STATEMENT; // skip through
+ qent = qtmp->next;
+ qtmp->next = qent->next;
+ }
+
+ // now put it in place in q
+
+ if ( NULL == q ) {
+ q = qent;
+ q->next = NULL;
+ } else {
+ struct qentry **qentp;
+
+ // insert into queue according to prio
+ for ( qentp=&q; NULL != *qentp; qentp = &((*qentp)->next) ) {
+ if ((*qentp)->priority < prio)
+ break;
+ } // for
+
+ qent->next = *qentp;
+ *qentp = qent;
+ } // else
+
+ qent->priority = prio; // have to set this now so when the sched is
+ // unlocked, other qent's can be added in the
+ // right place
+ qent->busy = true; // let things know this entry should be ignored until
+ // it's finished having its data copied
+
+ // unlock the scheduler, and potentially switch threads, but
+ // that's okay now. We don't want it locked for the expensive memcpy
+ Cyg_Scheduler::unlock();
+
+ qent->buflen = len;
+ memcpy( qent->buf(), buf, len );
+
+ // make available now - setting non-atomically is alright if you think
+ // about it - the only thing that matters is that it's completed before
+ // the post()
+ qent->busy = false;
+
+ // if we have to notify someone, we only do it if no-one's already
+ // sitting waiting for a message to appear, AND if it's a transition
+ // from empty to non-empty
+
+ if ( callback != NULL && !getsem.waiting() && (0 == getsem.peek()) ) {
+ getsem.post();
+ callback( *this, callback_data );
+ } else
+ getsem.post();
+
+ err = OK;
+
+ exit:
+ CYG_ASSERT_THISC();
+ CYG_REPORT_RETVAL(err);
+ return err;
+} // Cyg_Mqueue::put()
+
+//------------------------------------------------------------------------
+
+
+// get() returns the oldest highest priority message in the queue in *buf
+// and sets *prio to the priority (if prio is non-NULL) and *len to the
+// actual message size
+
+CYGPRI_KERNEL_SYNCH_MQUEUE_INLINE Cyg_Mqueue::qerr_t
+Cyg_Mqueue::get( char *buf, size_t *len, unsigned int *prio, bool block
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ , cyg_tick_count timeout
+#endif
+ )
+{
+ CYG_REPORT_FUNCTYPE( "err=%d");
+ CYG_REPORT_FUNCARG4( "buf=%08x, len=%08x, prio=%08x, block=%d",
+ buf, len, prio, block==true );
+ CYG_CHECK_DATA_PTRC( buf );
+ CYG_CHECK_DATA_PTRC( len );
+ if ( NULL != prio )
+ CYG_CHECK_DATA_PTRC( prio );
+ CYG_ASSERT_THISC();
+
+ qerr_t err;
+ struct qentry *qent;
+
+ // wait till a q entry is available
+ if ( true == block ) {
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ if ( timeout != 0) {
+ if ( false == getsem.wait(timeout) ) {
+ err = TIMEOUT;
+ goto exit;
+ }
+ }
+ else
+#endif
+ if ( false == getsem.wait() ) {
+ err = INTR;
+ goto exit;
+ }
+ } else {
+ if ( false == getsem.trywait() ) {
+ err = WOULDBLOCK;
+ goto exit;
+ }
+ }
+
+ // prevent preemption when fiddling with important members
+
+ Cyg_Scheduler::lock();
+
+ // don't need to check the q - the semaphore tells us there's
+ // definitely a usable non-busy one there. It's just a question of
+ // locating it.
+
+ if ( !q->busy ) { // fast-track the common case
+ qent = q;
+ q = qent->next;
+ } else {
+ struct qentry *qtmp;
+
+ for ( qtmp=q; qtmp->next->busy; qtmp=qtmp->next )
+ CYG_EMPTY_STATEMENT; // skip through
+
+ qent = qtmp->next;
+ qtmp->next = qent->next;
+ } // else
+
+ // now stick at front of freelist, but marked busy
+ qent->next = freelist;
+ freelist = qent;
+
+ qent->busy = true; // don't let it truly be part of the freelist just yet
+ // till the data is copied out
+
+ // unlock the scheduler, and potentially switch threads, but
+ // that's okay now. We don't want it locked for the expensive memcpy
+ Cyg_Scheduler::unlock();
+
+ *len = qent->buflen;
+ if ( NULL != prio )
+ *prio = qent->priority;
+ memcpy( buf, qent->buf(), *len );
+
+ // make available now - setting non-atomically is alright if you think
+ // about it - the only thing that matters is that it's completed before
+ // the post()
+ qent->busy = false;
+
+ putsem.post();
+
+ err = OK;
+
+ exit:
+ CYG_ASSERT_THISC();
+ CYG_REPORT_RETVAL(err);
+ return err;
+
+} // Cyg_Mqueue::get()
+
+//------------------------------------------------------------------------
+
+// count() returns the number of messages in the queue
+inline long
+Cyg_Mqueue::count()
+{
+ CYG_REPORT_FUNCTYPE("curmsgs=%d");
+
+ long curmsgs = (long)getsem.peek();
+
+ CYG_REPORT_RETVAL(curmsgs);
+ return curmsgs;
+} // Cyg_Mqueue::count()
+
+//------------------------------------------------------------------------
+
+
+// Supply a callback function to call (with the supplied data argument)
+// when the queue goes from empty to non-empty (unless someone's already
+// doing a get()). This returns the old callback_fn, and if olddata is
+// non-NULL sets it to the old data (yes, really!)
+CYGPRI_KERNEL_SYNCH_MQUEUE_INLINE Cyg_Mqueue::callback_fn_t
+Cyg_Mqueue::setnotify( callback_fn_t callback_fn, CYG_ADDRWORD data,
+ CYG_ADDRWORD *olddata)
+{
+ CYG_REPORT_FUNCTYPE("old callback=%08x");
+ CYG_REPORT_FUNCARG3XV( callback_fn, data, olddata );
+ if ( NULL != callback_fn )
+ CYG_CHECK_FUNC_PTRC( callback_fn );
+ if (NULL != olddata)
+ CYG_CHECK_DATA_PTRC( olddata );
+
+ callback_fn_t oldfn;
+
+ // Need to prevent preemption for accessing common structures
+ // Just locking the scheduler has the least overhead
+ Cyg_Scheduler::lock();
+
+ oldfn = callback;
+ if (NULL != olddata)
+ *olddata = callback_data;
+
+ callback_data = data;
+ callback = callback_fn;
+
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETVAL(oldfn);
+ return oldfn;
+}
+
+//------------------------------------------------------------------------
+
+#endif /* CYGONCE_KERNEL_MQUEUE_INL multiple inclusion protection */
+
+/* EOF mqueue.inl */
diff --git a/cesar/ecos/packages/kernel/current/include/mutex.hxx b/cesar/ecos/packages/kernel/current/include/mutex.hxx
new file mode 100644
index 0000000000..d37e001559
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/mutex.hxx
@@ -0,0 +1,217 @@
+#ifndef CYGONCE_KERNEL_MUTEX_HXX
+#define CYGONCE_KERNEL_MUTEX_HXX
+
+//==========================================================================
+//
+// mutex.hxx
+//
+// Mutex class declarations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-09
+// Purpose: Define Mutex class interfaces
+// Description: The classes defined here provide the APIs for mutexes
+// and condition variables.
+// Usage: #include <cyg/kernel/mutex.hxx>
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <cyg/kernel/thread.hxx>
+
+// -------------------------------------------------------------------------
+// Mutex.
+
+class Cyg_Mutex
+{
+ friend class Cyg_Condition_Variable;
+
+ cyg_atomic locked; // true if locked. This may seem
+ // redundant due to "owner" below,
+ // but is intentionally present for
+ // future SMP support.
+
+ Cyg_Thread *owner; // Current locking thread
+
+ Cyg_ThreadQueue queue; // Queue of waiting threads
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+
+public:
+ enum cyg_protcol
+ {
+ NONE = 0, // no inversion protocol
+ INHERIT, // priority inheritance protocol
+ CEILING // priority ceiling protocol
+ };
+
+private:
+ cyg_protcol protocol; // this mutex's protocol
+
+#endif
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+
+private:
+ cyg_priority ceiling; // mutex priority ceiling
+
+#endif
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ Cyg_Mutex(); // Create in unlocked state
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+
+ Cyg_Mutex( cyg_protcol protocol ); // Create with defined protocol
+
+#endif
+
+ ~Cyg_Mutex(); // Destructor
+
+ cyg_bool lock(); // lock and/or wait
+
+ cyg_bool trylock(); // try to lock and return success
+
+ void unlock(); // unlock
+
+ void release(); // release all waiting threads
+
+ // Get the current owning thread
+ inline Cyg_Thread *get_owner() { return owner; }
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+
+ // set ceiling priority for priority ceiling protocol
+ void set_ceiling( cyg_priority priority );
+
+ cyg_priority get_ceiling(void) { return ceiling; };
+
+#endif
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+
+ // set inversion protocol
+ void set_protocol( cyg_protcol new_protocol );
+#endif
+
+};
+
+// -------------------------------------------------------------------------
+// Condition variable.
+
+class Cyg_Condition_Variable
+{
+ Cyg_Mutex *mutex; // Associated mutex
+
+ Cyg_ThreadQueue queue; // Queue of waiting threads
+
+ // Private internal implementation function for wait operations
+ cyg_bool wait_inner( Cyg_Mutex *mutex );
+
+#ifdef CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT
+
+ // Private internal implementation function for timed wait operations
+ cyg_bool wait_inner( Cyg_Mutex *mutex, cyg_tick_count timeout );
+
+#endif
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ Cyg_Condition_Variable(); // simple constructor
+
+ Cyg_Condition_Variable(
+ Cyg_Mutex &mutex // linked mutex
+ );
+
+ ~Cyg_Condition_Variable(); // Destructor
+
+
+ void signal(); // Set cond true, wake one thread
+
+ void broadcast(); // Set cond true, wake all threads
+
+ // Wait for condition to be true
+ inline cyg_bool wait() { return wait_inner( mutex ); }
+
+#ifdef CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT
+
+ // Wait until a signal or timeout expiry
+ inline cyg_bool wait( cyg_tick_count timeout )
+ { return wait_inner( mutex, timeout ); }
+
+#endif
+
+#ifdef CYGMFN_KERNEL_SYNCH_CONDVAR_WAIT_MUTEX
+
+ // Wait for condition to be true using the supplied mutex
+ inline cyg_bool wait( Cyg_Mutex &mx ) { return wait_inner( &mx ); }
+
+
+#ifdef CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT
+
+ // Wait until a signal or timeout expiry, using the supplied mutex
+ inline cyg_bool wait( Cyg_Mutex &mx, cyg_tick_count timeout )
+ { return wait_inner( &mx, timeout ); }
+
+#endif
+#endif
+
+ // Return a pointer to this variables thread queue. Used mainly
+ // for testing whether a thread is on the queue for a particular
+ // cv.
+ inline Cyg_ThreadQueue *get_queue() { return &queue; };
+
+};
+
+
+// -------------------------------------------------------------------------
+
+#endif // ifndef CYGONCE_KERNEL_MUTEX_HXX
+// EOF mutex.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/sched.hxx b/cesar/ecos/packages/kernel/current/include/sched.hxx
new file mode 100644
index 0000000000..241363d10d
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/sched.hxx
@@ -0,0 +1,412 @@
+#ifndef CYGONCE_KERNEL_SCHED_HXX
+#define CYGONCE_KERNEL_SCHED_HXX
+
+//==========================================================================
+//
+// sched.hxx
+//
+// Scheduler class declaration(s)
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-09
+// Purpose: Define Scheduler class interfaces
+// Description: These class definitions supply the internal API
+// used to scheduler threads.
+// Usage: #include <cyg/kernel/sched.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <cyg/kernel/smp.hxx> // SMP support
+
+// -------------------------------------------------------------------------
+// Miscellaneous types
+
+#ifdef CYGSEM_KERNEL_SCHED_ASR_SUPPORT
+
+typedef void Cyg_ASR( CYG_ADDRWORD data ); // ASR type signature
+
+#endif
+
+__externC void cyg_scheduler_set_need_reschedule();
+
+// -------------------------------------------------------------------------
+// Scheduler base class. This defines stuff that is needed by the
+// specific scheduler implementation. Each scheduler comprises three
+// classes: Cyg_Scheduler_Base, Cyg_Scheduler_Implementation which
+// inherits from it and Cyg_Scheduler which inherits from _it_ in turn.
+
+class Cyg_Scheduler_Base
+ : public Cyg_Scheduler_SchedLock
+{
+ friend class Cyg_HardwareThread;
+ friend class Cyg_SchedThread;
+
+protected:
+ // The following variables are implicit in the API, but are
+ // not publically visible.
+
+ // Current running thread
+ static Cyg_Thread * volatile current_thread[CYGNUM_KERNEL_CPU_MAX]
+ CYGBLD_ANNOTATE_VARIABLE_SCHED;
+
+ // Set when reschedule needed
+ static volatile cyg_bool need_reschedule[CYGNUM_KERNEL_CPU_MAX]
+ CYGBLD_ANNOTATE_VARIABLE_SCHED;
+
+ // Count of number of thread switches
+ static volatile cyg_ucount32 thread_switches[CYGNUM_KERNEL_CPU_MAX]
+ CYGBLD_ANNOTATE_VARIABLE_SCHED;
+
+public:
+
+ // return a pointer to the current thread
+ static Cyg_Thread *get_current_thread();
+
+ // Set current thread pointer
+ static void set_current_thread(Cyg_Thread *thread);
+ static void set_current_thread(Cyg_Thread *thread, HAL_SMP_CPU_TYPE cpu);
+
+ // Set need_reschedule flag
+ static void set_need_reschedule();
+ static void set_need_reschedule(Cyg_Thread *thread);
+
+ // Get need_reschedule flag
+ static cyg_bool get_need_reschedule();
+
+ // Return current value of lock
+ static cyg_ucount32 get_sched_lock();
+
+ // Clear need_reschedule flag
+ static void clear_need_reschedule();
+
+ // Return current number of thread switches
+ static cyg_ucount32 get_thread_switches();
+
+};
+
+// -------------------------------------------------------------------------
+// Include the scheduler implementation header
+
+#include CYGPRI_KERNEL_SCHED_IMPL_HXX
+
+// Do some checking that we have a consistent universe.
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL
+# ifndef CYGIMP_THREAD_PRIORITY
+# error Priority inversion protocols will not work without priorities!!!
+# endif
+#endif
+
+// -------------------------------------------------------------------------
+// Scheduler class. This is the public scheduler interface seen by the
+// rest of the kernel.
+
+class Cyg_Scheduler
+ : public Cyg_Scheduler_Implementation
+{
+ friend class Cyg_Thread;
+
+ // This function is the actual implementation of the unlock
+ // function. The unlock() later is an inline shell that deals
+ // with the common case.
+
+ static void unlock_inner(cyg_uint32 new_lock = 0);
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ // The following API functions are common to all scheduler
+ // implementations.
+
+ // claim the preemption lock
+ static void lock();
+
+ // release the preemption lock and possibly reschedule
+ static void unlock();
+
+ // release and reclaim the lock atomically, keeping the old
+ // value on restart
+ static void reschedule();
+
+ // decrement the lock but also look for a reschedule opportunity
+ static void unlock_reschedule();
+
+ // release the preemption lock without rescheduling
+ static void unlock_simple();
+
+ // Start execution of the scheduler
+ static void start() CYGBLD_ATTRIB_NORET;
+
+ // Start execution of the scheduler on the current CPU
+ static void start_cpu() CYGBLD_ATTRIB_NORET;
+
+ // The only scheduler instance should be this one...
+ static Cyg_Scheduler scheduler CYGBLD_ANNOTATE_VARIABLE_SCHED;
+
+};
+
+// -------------------------------------------------------------------------
+// This class encapsulates the scheduling abstractions in a thread.
+// Cyg_SchedThread is included as a base class of Cyg_Thread. The actual
+// implementation of the abstractions is in Cyg_SchedThread_Implementation
+// so this class has little to do.
+
+class Cyg_SchedThread
+ : public Cyg_SchedThread_Implementation
+{
+ friend class Cyg_ThreadQueue_Implementation;
+ friend class Cyg_Scheduler_Implementation;
+ friend class Cyg_Scheduler;
+
+ Cyg_ThreadQueue *queue;
+
+
+public:
+
+ Cyg_SchedThread(Cyg_Thread *thread, CYG_ADDRWORD sched_info);
+
+ // Return current queue pointer
+
+ Cyg_ThreadQueue *get_current_queue();
+
+ // Remove this thread from current queue
+ void remove();
+
+#ifdef CYGSEM_KERNEL_SCHED_ASR_SUPPORT
+
+ // ASR support.
+ // An ASR is an Asynchronous Service Routine. When set pending it
+ // is called when the thread exits the scheduler. ASRs are mainly
+ // used by compatibility subsystems, such as POSIX, to implement
+ // such things as thread cancellation and signal delivery.
+
+private:
+
+ volatile cyg_ucount32 asr_inhibit; // If > 0, blocks calls to ASRs
+
+ volatile cyg_bool asr_pending; // If true, this thread's ASR should be called.
+
+#ifdef CYGSEM_KERNEL_SCHED_ASR_GLOBAL
+ static
+#endif
+ Cyg_ASR *asr; // ASR function
+#ifdef CYGSEM_KERNEL_SCHED_ASR_DATA_GLOBAL
+ static
+#endif
+ CYG_ADDRWORD asr_data; // ASR data pointer
+
+ // Default ASR function
+ static void asr_default(CYG_ADDRWORD data);
+
+public:
+
+ // Public interface to ASR mechanism
+
+ // Set, clear and get inhibit flag.
+ inline void set_asr_inhibit() { asr_inhibit++; }
+ inline void clear_asr_inhibit() { asr_inhibit--; }
+ inline cyg_ucount32 get_asr_inhibit() { return asr_inhibit; }
+
+ // Set and get pending flag. The flag is only cleared when the
+ // ASR is called.
+ inline void set_asr_pending() { asr_pending = true; }
+ inline cyg_bool get_asr_pending() { return asr_pending; }
+
+ // Set a new ASR, returning the old one.
+ void set_asr( Cyg_ASR *new_asr, CYG_ADDRWORD new_data,
+ Cyg_ASR **old_asr, CYG_ADDRWORD *old_data);
+
+ // Clear the ASR function back to the default.
+ void clear_asr();
+
+#else
+
+public:
+
+ // Even when we do not have ASRs enabled, we keep these functions
+ // available. This avoids excessive ifdefs in the rest of the
+ // kernel code.
+ inline void set_asr_inhibit() { }
+ inline void clear_asr_inhibit() { }
+
+#endif
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL
+
+private:
+
+ // For all priority inversion protocols we need to keep track of how
+ // many mutexes we have locked, including one which we are waiting to
+ // lock, because we can inherit priority while sleeping just prior to
+ // wakeup.
+
+ cyg_count32 mutex_count;
+
+protected:
+ // These are implementation functions that are common to all protocols.
+
+ // Inherit the given priority. If thread is non-NULL the priority is
+ // being inherited from it, otherwise it has come from the mutex.
+ void set_inherited_priority( cyg_priority pri, Cyg_Thread *thread = 0 );
+
+ // Relay the priority of the ex-owner thread or from the queue if it
+ // has a higher priority than ours.
+ void relay_inherited_priority( Cyg_Thread *ex_owner, Cyg_ThreadQueue *pqueue);
+
+ // Lose priority inheritance
+ void clear_inherited_priority();
+
+public:
+ // Count and uncount the number of mutexes held by
+ // this thread.
+ void count_mutex() { mutex_count++; };
+ void uncount_mutex() { mutex_count--; };
+
+#if defined(CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_SIMPLE)
+
+protected:
+
+ // The simple priority inversion protocols simply needs
+ // somewhere to store the base priority of the current thread.
+
+ cyg_priority original_priority; // our original priority
+
+ cyg_bool priority_inherited; // have we inherited?
+
+#endif
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT
+
+public:
+
+ // Inherit the priority of the provided thread if it
+ // has higher priority than this.
+ void inherit_priority( Cyg_Thread *thread);
+
+ // Relay the priority of the ex-owner thread or from the queue if it
+ // has a higher priority than ours.
+ void relay_priority( Cyg_Thread *ex_owner, Cyg_ThreadQueue *pqueue);
+
+ // Lose priority inheritance
+ void disinherit_priority();
+
+#endif
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+
+public:
+
+ // Set the priority of this thread to the given ceiling.
+ void set_priority_ceiling( cyg_priority pri );
+
+ // Clear the ceiling, if necessary.
+ void clear_priority_ceiling();
+
+#endif
+
+#endif
+
+};
+
+// -------------------------------------------------------------------------
+// Simple inline accessor functions
+
+inline Cyg_Thread *Cyg_Scheduler_Base::get_current_thread()
+{
+ return current_thread[CYG_KERNEL_CPU_THIS()];
+}
+
+inline void Cyg_Scheduler_Base::set_current_thread(Cyg_Thread *thread )
+{
+ current_thread[CYG_KERNEL_CPU_THIS()] = thread;
+}
+
+inline void Cyg_Scheduler_Base::set_current_thread(Cyg_Thread *thread,
+ HAL_SMP_CPU_TYPE cpu)
+{
+ current_thread[cpu] = thread;
+}
+
+inline cyg_bool Cyg_Scheduler_Base::get_need_reschedule()
+{
+ return need_reschedule[CYG_KERNEL_CPU_THIS()];
+}
+
+inline void Cyg_Scheduler_Base::set_need_reschedule()
+{
+ need_reschedule[CYG_KERNEL_CPU_THIS()] = true;
+}
+
+inline void Cyg_Scheduler_Base::set_need_reschedule(Cyg_Thread *thread)
+{
+ need_reschedule[CYG_KERNEL_CPU_THIS()] = true;
+}
+
+inline void Cyg_Scheduler_Base::clear_need_reschedule()
+{
+ need_reschedule[CYG_KERNEL_CPU_THIS()] = false;
+}
+
+inline cyg_ucount32 Cyg_Scheduler_Base::get_sched_lock()
+{
+ return Cyg_Scheduler_SchedLock::get_sched_lock();
+}
+
+// Return current number of thread switches
+inline cyg_ucount32 Cyg_Scheduler_Base::get_thread_switches()
+{
+ return thread_switches[CYG_KERNEL_CPU_THIS()];
+}
+
+// Return current queue pointer
+inline Cyg_ThreadQueue *Cyg_SchedThread::get_current_queue()
+{
+ return queue;
+}
+
+// -------------------------------------------------------------------------
+#endif // ifndef __SCHED_HXX__
+// EOF sched.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/sched.inl b/cesar/ecos/packages/kernel/current/include/sched.inl
new file mode 100644
index 0000000000..90b92fe0fb
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/sched.inl
@@ -0,0 +1,168 @@
+#ifndef CYGONCE_KERNEL_SCHED_INL
+#define CYGONCE_KERNEL_SCHED_INL
+
+//==========================================================================
+//
+// sched.inl
+//
+// Scheduler class inlines
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-09
+// Purpose: Define inlines for scheduler classes
+// Description: Inline functions for the scheduler classes. These are
+// not defined in the header so that we have the option
+// of making them non-inline.
+// Usage:
+// #include <cyg/kernel/sched.hxx>
+// ...
+// #include <cyg/kernel/sched.inl>
+// ...
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/instrmnt.h>
+#include <cyg/hal/hal_arch.h>
+
+// -------------------------------------------------------------------------
+// Inlines for Cyg_Scheduler class
+
+inline void Cyg_Scheduler::lock()
+{
+ // We do not need to do a read-modify-write sequence here because
+ // the scheduler lock is strictly nesting. Even if we are interrupted
+ // partway through the increment, the lock will be returned to the same
+ // value before we are resumed/rescheduled.
+
+ HAL_REORDER_BARRIER();
+
+ inc_sched_lock();
+
+ HAL_REORDER_BARRIER();
+
+ CYG_INSTRUMENT_SCHED(LOCK,get_sched_lock(),0);
+};
+
+inline void Cyg_Scheduler::unlock()
+{
+ // This is an inline wrapper for the real scheduler unlock function in
+ // Cyg_Scheduler::unlock_inner().
+
+ // Only do anything if the lock is about to go zero, otherwise we simply
+ // decrement and return. As with lock() we do not need any special code
+ // to decrement the lock counter.
+
+ CYG_INSTRUMENT_SCHED(UNLOCK,get_sched_lock(),0);
+
+ HAL_REORDER_BARRIER();
+
+ cyg_ucount32 __lock = get_sched_lock() - 1;
+
+ if( __lock == 0 ) unlock_inner(0);
+ else set_sched_lock(__lock);
+
+ HAL_REORDER_BARRIER();
+}
+
+inline void Cyg_Scheduler::reschedule()
+{
+ // This function performs the equivalent of calling unlock() and
+ // lock() is succession. Unlike that pair, however, it does not
+ // leave a brief window between the calls when the lock is unclaimed
+ // by the current thread.
+
+ CYG_INSTRUMENT_SCHED(RESCHEDULE,get_sched_lock(),0);
+
+ unlock_inner( get_sched_lock() );
+}
+
+inline void Cyg_Scheduler:: unlock_reschedule()
+{
+ // This function decrements the scheduler lock and also looks for
+ // a reschedule opportunity. When the lock is being decremented
+ // from 1 to zero this function is equivalent to unlock. When the
+ // lock is being decremented to a non-zero value, it is more or less
+ // equivalent to reschedule() followed by unlock().
+
+ CYG_INSTRUMENT_SCHED(UNLOCK,get_sched_lock(),0);
+
+ unlock_inner( get_sched_lock() - 1 );
+}
+
+inline void Cyg_Scheduler::unlock_simple()
+{
+ // This function decrements the lock, but does not call unlock_inner().
+ // Therefore does not immediately allow another thread to run:
+ // merely makes it possible for some other thread to run at some
+ // indeterminate future time. This is mainly for use by
+ // debuggers, it should not normally be used anywhere else.
+
+ CYG_INSTRUMENT_SCHED(UNLOCK,get_sched_lock(),0);
+
+ HAL_REORDER_BARRIER();
+
+ if (get_sched_lock() > 1)
+ set_sched_lock(get_sched_lock() - 1);
+ else zero_sched_lock();
+
+ HAL_REORDER_BARRIER();
+}
+
+
+// -------------------------------------------------------------------------
+// Inlines for Cyg_SchedThread class
+
+#include <cyg/kernel/thread.inl> // we use some thread inlines here
+
+inline void Cyg_SchedThread::remove()
+{
+ if( queue != NULL )
+ {
+ queue->remove((Cyg_Thread *)this);
+ queue = NULL;
+ }
+}
+
+// -------------------------------------------------------------------------
+
+#endif // ifndef CYGONCE_KERNEL_SCHED_INL
+// EOF sched.inl
diff --git a/cesar/ecos/packages/kernel/current/include/sema.hxx b/cesar/ecos/packages/kernel/current/include/sema.hxx
new file mode 100644
index 0000000000..d97ff13849
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/sema.hxx
@@ -0,0 +1,137 @@
+#ifndef CYGONCE_KERNEL_SEMA_HXX
+#define CYGONCE_KERNEL_SEMA_HXX
+
+//==========================================================================
+//
+// sema.hxx
+//
+// Semaphore class declarations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-09
+// Purpose: Define Semaphore class interfaces
+// Description: The classes defined here provide the APIs for binary
+// and counting semaphores.
+// Usage: #include <cyg/kernel/sema.hxx>
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/thread.inl> // thread inlines
+
+// -------------------------------------------------------------------------
+// Binary semaphore. This has only two states: posted and not-posted.
+
+class Cyg_Binary_Semaphore
+{
+ cyg_bool state; // The binary semaphore state
+
+ Cyg_ThreadQueue queue; // Queue of waiting threads
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ Cyg_Binary_Semaphore( // Constructor
+ cyg_bool init_state = false // Initial state value
+ );
+
+ ~Cyg_Binary_Semaphore(); // Destructor
+
+ cyg_bool wait(); // Wait until state == true
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ cyg_bool wait( cyg_tick_count timeout );
+#endif // Wait until state == true or timeout
+
+ cyg_bool trywait(); // Set state false if possible
+
+ void post(); // Increment count
+
+ cyg_bool posted(); // Get current state
+
+};
+
+// -------------------------------------------------------------------------
+// Counting semaphore. This implements the usual counter based semaphore.
+
+class Cyg_Counting_Semaphore
+{
+ cyg_count32 count; // The semaphore count
+
+ Cyg_ThreadQueue queue; // Queue of waiting threads
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ Cyg_Counting_Semaphore( // Constructor
+ cyg_count32 init_count = 0 // Initial count value
+ );
+
+ ~Cyg_Counting_Semaphore(); // Destructor
+
+ cyg_bool wait(); // Wait until decrement
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ cyg_bool wait( cyg_tick_count timeout );
+#endif // Wait until decrement or timeout
+
+ cyg_bool trywait(); // Try to decrement
+
+ void post(); // Increment count
+
+ cyg_count32 peek() const; // Get current count value
+
+ inline
+ cyg_bool waiting() // Is anyone waiting?
+ {
+ return !queue.empty();
+ }
+
+};
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_SEMA_HXX
+// EOF sema.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/sema2.hxx b/cesar/ecos/packages/kernel/current/include/sema2.hxx
new file mode 100644
index 0000000000..807f0cf3c8
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/sema2.hxx
@@ -0,0 +1,137 @@
+#ifndef CYGONCE_KERNEL_SEMA2_HXX
+#define CYGONCE_KERNEL_SEMA2_HXX
+
+//==========================================================================
+//
+// sema2.hxx
+//
+// Semaphore class declarations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-09
+// Purpose: Define Semaphore class interfaces
+// Description: The classes defined here provide the APIs for binary
+// and counting semaphores.
+// Usage: #include <cyg/kernel/sema2.hxx>
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/thread.hxx>
+
+#if 0
+// THERE IS NO BINARY-SEMAPHORE-2
+
+// -------------------------------------------------------------------------
+// Binary semaphore. This has only two states: posted and not-posted.
+
+class Cyg_Binary_Semaphore2
+{
+ cyg_bool state; // The binary semaphore state
+
+ Cyg_ThreadQueue queue; // Queue of waiting threads
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ Cyg_Binary_Semaphore2( // Constructor
+ cyg_bool init_state = false // Initial state value
+ );
+
+ ~Cyg_Binary_Semaphore2(); // Destructor
+
+ cyg_bool wait(); // Wait until state == true
+
+ cyg_bool trywait(); // Set state false if possible
+
+ void post(); // Increment count
+
+ cyg_bool posted(); // Get current state
+
+};
+#endif
+
+// -------------------------------------------------------------------------
+// Counting semaphore. This implements the usual counter based semaphore.
+
+class Cyg_Counting_Semaphore2
+{
+ cyg_count32 count; // The semaphore count
+
+ Cyg_ThreadQueue queue; // Queue of waiting threads
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ Cyg_Counting_Semaphore2( // Constructor
+ cyg_count32 init_count = 0 // Initial count value
+ );
+
+ ~Cyg_Counting_Semaphore2(); // Destructor
+
+ cyg_bool wait(); // Wait until decrement
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ cyg_bool wait( cyg_tick_count abs_timeout );
+#endif // Wait until decrement or timeout
+
+ cyg_bool trywait(); // Try to decrement
+
+ void post(); // Increment count
+
+ cyg_count32 peek() const; // Get current count value
+
+ inline
+ cyg_bool waiting() // Is anyone waiting?
+ {
+ return !queue.empty();
+ }
+
+};
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_SEMA2_HXX
+// EOF sema2.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/smp.hxx b/cesar/ecos/packages/kernel/current/include/smp.hxx
new file mode 100644
index 0000000000..ed18b1a1bb
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/smp.hxx
@@ -0,0 +1,468 @@
+#ifndef CYGONCE_KERNEL_SMP_HXX
+#define CYGONCE_KERNEL_SMP_HXX
+
+//==========================================================================
+//
+// smp.hxx
+//
+// SMP kernel support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors:nickg
+// Date: 2001-02-10
+// Purpose: Kernel SMP support
+// Description: If SMP support is configured into the kernel, then this file
+// translates HAL defined macros into C and C++ classes and methods
+// that can be called from the rest of the kernel. If SMP is not
+// configured in, then the same classes and methods are defined here
+// to operate correctly in a single CPU configuration.
+//
+// Usage: #include <cyg/kernel/smp.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <cyg/hal/hal_intr.h> // HAL_DISABLE_INTERRUPTS() etc.
+
+#include <cyg/kernel/instrmnt.h>
+
+//==========================================================================
+
+#if defined(CYGPKG_KERNEL_SMP_SUPPORT) && (CYGPKG_HAL_SMP_SUPPORT)
+
+//==========================================================================
+// SMP support is included
+
+#define CYG_KERNEL_SMP_ENABLED
+
+// -------------------------------------------------------------------------
+// Get HAL support
+
+#include <cyg/hal/hal_smp.h>
+
+// -------------------------------------------------------------------------
+// Defined values
+// These all just map straight through to the HAL.
+
+#define CYGNUM_KERNEL_CPU_MAX HAL_SMP_CPU_MAX
+
+#define CYG_KERNEL_CPU_COUNT() HAL_SMP_CPU_COUNT()
+
+#define CYG_KERNEL_CPU_START_COUNT() HAL_SMP_CPU_START_COUNT()
+
+#define CYG_KERNEL_CPU_THIS() HAL_SMP_CPU_THIS()
+
+#define CYG_KERNEL_CPU_NONE HAL_SMP_CPU_NONE
+
+// -------------------------------------------------------------------------
+// CPU control
+
+#define CYG_KERNEL_CPU_START( __cpu ) HAL_SMP_CPU_START( __cpu )
+
+#define CYG_KERNEL_CPU_RESCHEDULE_INTERRUPT( __cpu, __wait ) \
+ HAL_SMP_CPU_RESCHEDULE_INTERRUPT( __cpu, __wait )
+
+#define CYG_KERNEL_CPU_TIMESLICE_INTERRUPT( __cpu, __wait ) \
+ HAL_SMP_CPU_TIMESLICE_INTERRUPT( __cpu, __wait )
+
+// -------------------------------------------------------------------------
+// Scheduler lock default implementation.
+
+// This implementation should serve for most targets. However, some
+// targets may have hardware or other features that make simple
+// spinlocks impossible, or allow us to implement the scheduler lock
+// in a more efficient manner. If that is the case then the HAL will
+// implement these macros itself.
+
+#ifndef HAL_SMP_SCHEDLOCK_DATA_TYPE
+
+#define HAL_SMP_SCHEDLOCK_DATA_TYPE struct hal_smp_schedlock_data_type
+
+struct hal_smp_schedlock_data_type {
+ HAL_SPINLOCK_TYPE spinlock;
+ volatile HAL_SMP_CPU_TYPE holder;
+};
+
+#define HAL_SMP_SCHEDLOCK_INIT( __lock, __data ) \
+CYG_MACRO_START \
+{ \
+ __lock = 1; \
+ HAL_SPINLOCK_CLEAR(__data.spinlock); \
+ HAL_SPINLOCK_SPIN(__data.spinlock); \
+ __data.holder = HAL_SMP_CPU_THIS(); \
+} \
+CYG_MACRO_END
+
+
+#define HAL_SMP_SCHEDLOCK_INC( __lock, __data ) \
+CYG_MACRO_START \
+{ \
+ CYG_INTERRUPT_STATE __state; \
+ HAL_DISABLE_INTERRUPTS(__state); \
+ if( __data.holder == HAL_SMP_CPU_THIS() ) \
+ __lock++; \
+ else \
+ { \
+ CYG_INSTRUMENT_SMP(LOCK_WAIT,CYG_KERNEL_CPU_THIS(),0); \
+ HAL_SPINLOCK_SPIN(__data.spinlock); \
+ __data.holder = HAL_SMP_CPU_THIS(); \
+ __lock++; \
+ CYG_INSTRUMENT_SMP(LOCK_GOT,CYG_KERNEL_CPU_THIS(),0); \
+ } \
+ HAL_RESTORE_INTERRUPTS(__state); \
+} \
+CYG_MACRO_END
+
+#define HAL_SMP_SCHEDLOCK_ZERO( __lock, __data ) \
+CYG_MACRO_START \
+{ \
+ CYG_INTERRUPT_STATE __state; \
+ HAL_DISABLE_INTERRUPTS(__state); \
+ CYG_ASSERT( __data.holder == HAL_SMP_CPU_THIS(), "Zeroing schedlock not owned by me!"); \
+ __lock = 0; \
+ __data.holder = HAL_SMP_CPU_NONE; \
+ HAL_SPINLOCK_CLEAR(__data.spinlock); \
+ HAL_RESTORE_INTERRUPTS(__state); \
+} \
+CYG_MACRO_END
+
+#define HAL_SMP_SCHEDLOCK_SET( __lock, __data, __new ) \
+CYG_MACRO_START \
+{ \
+ CYG_ASSERT( __data.holder == HAL_SMP_CPU_THIS(), "Setting schedlock not owned by me!"); \
+ __lock = __new; \
+} \
+CYG_MACRO_END
+
+#endif
+
+// -------------------------------------------------------------------------
+// SpinLock class
+// This class supplies a C++ wrapper for the HAL spinlock API.
+
+#ifdef __cplusplus
+
+#ifdef HAL_SPINLOCK_SPIN
+
+class Cyg_SpinLock
+{
+ HAL_SPINLOCK_TYPE lock;
+
+public:
+
+ // Constructor, initialize the lock to clear
+ Cyg_SpinLock() { lock = HAL_SPINLOCK_INIT_CLEAR; };
+
+ ~Cyg_SpinLock()
+ {
+// CYG_ASSERT( !test(), "spinlock still claimed");
+ };
+
+ // Spin on the lock.
+ void spin()
+ {
+ HAL_SPINLOCK_SPIN(lock);
+ };
+
+ // Clear the lock.
+ void clear()
+ {
+ HAL_SPINLOCK_CLEAR(lock);
+ };
+
+ // Try to claim the lock. Return true if successful, false if not.
+ cyg_bool trylock()
+ {
+ cyg_bool testval;
+ HAL_SPINLOCK_TRY(lock,testval);
+ return testval;
+ };
+
+ // Test the current value of the lock
+ cyg_bool test()
+ {
+ cyg_bool testval;
+ HAL_SPINLOCK_TEST(lock, testval);
+ return testval;
+ };
+
+
+ // The following two member functions are only necessary if the
+ // spinlock is to be used in an ISR.
+
+ // Claim the spinlock, but also mask this CPU's interrupts while
+ // we have it.
+ void spin_intsave(CYG_INTERRUPT_STATE *state)
+ {
+ CYG_INTERRUPT_STATE s;
+ HAL_DISABLE_INTERRUPTS(s);
+ *state = s;
+ spin();
+ };
+
+ // Clear the lock, and restore the interrupt state saved in
+ // spin_intsave().
+ void clear_intsave(CYG_INTERRUPT_STATE state)
+ {
+ clear();
+ HAL_RESTORE_INTERRUPTS(state);
+ };
+};
+
+#endif
+
+// -------------------------------------------------------------------------
+// Scheduler lock class
+// This uses the scheduler lock API defined by the HAL, or the defaults
+// defined above.
+
+class Cyg_Scheduler_SchedLock
+{
+ static volatile cyg_ucount32 sched_lock // lock counter
+ CYGBLD_ATTRIB_ASM_ALIAS( cyg_scheduler_sched_lock )
+ CYGBLD_ANNOTATE_VARIABLE_SCHED
+ ;
+
+ static HAL_SMP_SCHEDLOCK_DATA_TYPE lock_data
+ CYGBLD_ANNOTATE_VARIABLE_SCHED;
+
+protected:
+
+ Cyg_Scheduler_SchedLock()
+ {
+ HAL_SMP_SCHEDLOCK_INIT( sched_lock, lock_data );
+ };
+
+ // Increment the scheduler lock. If this takes the lock from zero
+ // to one then this code must also do whatever is necessary to
+ // serialize CPUs through the scheduler.
+ static void inc_sched_lock()
+ {
+ CYG_INSTRUMENT_SMP(LOCK_INC,CYG_KERNEL_CPU_THIS(),0);
+ HAL_SMP_SCHEDLOCK_INC( sched_lock, lock_data );
+ };
+
+ // Zero the scheduler lock. This will release the CPU serializing
+ // lock and allow another CPU in.
+ static void zero_sched_lock()
+ {
+ CYG_INSTRUMENT_SMP(LOCK_ZERO,CYG_KERNEL_CPU_THIS(),0);
+ CYG_ASSERT( sched_lock != 0, "Scheduler lock already zero");
+ HAL_SMP_SCHEDLOCK_ZERO( sched_lock, lock_data );
+ };
+
+ // Set the scheduler lock to a non-zero value. Both the scheduler
+ // lock and the new value must be non-zero.
+ static void set_sched_lock(cyg_uint32 new_lock)
+ {
+ CYG_INSTRUMENT_SMP(LOCK_SET,CYG_KERNEL_CPU_THIS(),new_lock);
+ CYG_ASSERT( new_lock > 0, "New scheduler lock value == 0");
+ CYG_ASSERT( sched_lock > 0, "Scheduler lock == 0");
+ HAL_SMP_SCHEDLOCK_SET( sched_lock, lock_data, new_lock );
+ };
+
+ static cyg_ucount32 get_sched_lock()
+ {
+ return sched_lock;
+ };
+};
+
+#define CYGIMP_KERNEL_SCHED_LOCK_DEFINITIONS \
+volatile cyg_ucount32 Cyg_Scheduler_SchedLock::sched_lock = 1; \
+HAL_SMP_SCHEDLOCK_DATA_TYPE Cyg_Scheduler_SchedLock::lock_data;
+
+#endif // __cplusplus
+
+// -------------------------------------------------------------------------
+
+#else // defined(CYGSEM_KERNEL_SMP_SUPPORT) && (CYGSEM_HAL_SMP_SUPPORT)
+
+//==========================================================================
+// SMP support is NOT included.
+
+#undef CYG_KERNEL_SMP_ENABLED
+
+// -------------------------------------------------------------------------
+// Defined values
+// Supply a set of values that describe a single CPU system.
+
+#ifndef HAL_SMP_CPU_TYPE
+#define HAL_SMP_CPU_TYPE cyg_uint32
+#endif
+
+#define CYGNUM_KERNEL_CPU_MAX 1
+
+#define CYG_KERNEL_CPU_COUNT() 1
+
+#define CYG_KERNEL_CPU_THIS() 0
+
+#define CYG_KERNEL_CPU_NONE -1
+
+#define CYG_KERNEL_CPU_LOWPRI() CYG_KERNEL_CPU_THIS()
+
+// -------------------------------------------------------------------------
+// SpinLock class
+// This single CPU version simply goes through the motions of setting
+// and clearing the lock variable for debugging purposes.
+
+#ifdef __cplusplus
+
+class Cyg_SpinLock
+{
+ volatile cyg_uint32 lock;
+
+public:
+
+ // Constructor, initialize the lock to clear
+ Cyg_SpinLock() { lock = 0; };
+
+ ~Cyg_SpinLock()
+ {
+ CYG_ASSERT( lock == 0, "spinlock still claimed");
+ };
+
+ // Spin on the lock. In this case we just set it to 1 and proceed.
+ void spin()
+ {
+ CYG_ASSERT( lock == 0, "spinlock already claimed!");
+ lock = 1;
+ };
+
+ // Clear the lock. Again, just set the value.
+ void clear()
+ {
+ CYG_ASSERT( lock != 0, "spinlock already cleared!");
+ lock = 0;
+ };
+
+ // Try to claim the lock. Return true if successful, false if not.
+ cyg_bool trylock()
+ {
+ if( lock ) return false;
+ else { lock = 1; return true; }
+ };
+
+ // Test the current value of the lock
+ cyg_bool test() { return lock; };
+
+
+ // The following two member functions are only necessary if the
+ // spinlock is to be used in an ISR.
+
+ // Claim the spinlock, but also mask this CPU's interrupts while
+ // we have it.
+ void spin_intsave(CYG_INTERRUPT_STATE *state)
+ {
+ CYG_INTERRUPT_STATE s;
+ HAL_DISABLE_INTERRUPTS(s);
+ *state = s;
+ spin();
+ };
+
+ // Clear the lock, and restore the interrupt state saved in
+ // spin_intsave().
+ void clear_intsave(CYG_INTERRUPT_STATE state)
+ {
+ clear();
+ HAL_RESTORE_INTERRUPTS(state);
+ };
+
+};
+
+// -------------------------------------------------------------------------
+// Scheduler lock class
+
+class Cyg_Scheduler_SchedLock
+{
+ static volatile cyg_ucount32 sched_lock // lock counter
+ CYGBLD_ATTRIB_ASM_ALIAS( cyg_scheduler_sched_lock )
+ CYGBLD_ANNOTATE_VARIABLE_SCHED
+ ;
+
+ // For non-SMP versions, the code here does the basic and obvious things.
+protected:
+
+ Cyg_Scheduler_SchedLock()
+ {
+ sched_lock = 1;
+ };
+
+ // Increment the scheduler lock, possibly taking it from zero to
+ // one.
+ static void inc_sched_lock()
+ {
+ sched_lock++;
+ };
+
+ static void zero_sched_lock()
+ {
+ CYG_ASSERT( sched_lock != 0, "Scheduler lock already zero");
+ sched_lock = 0;
+ };
+
+ // Set the scheduler lock to a non-zero value. Both the scheduler
+ // lock and the new value must be non-zero.
+ static void set_sched_lock(cyg_uint32 new_lock)
+ {
+ CYG_ASSERT( new_lock > 0, "New scheduler lock value == 0");
+ CYG_ASSERT( sched_lock > 0, "Scheduler lock == 0");
+ sched_lock = new_lock;
+ };
+
+ static cyg_ucount32 get_sched_lock()
+ {
+ return sched_lock;
+ };
+};
+
+#define CYGIMP_KERNEL_SCHED_LOCK_DEFINITIONS \
+volatile cyg_ucount32 Cyg_Scheduler_SchedLock::sched_lock = 1;
+
+#endif // __cplusplus
+
+#endif // defined(CYGSEM_KERNEL_SMP_SUPPORT) && (CYGSEM_HAL_SMP_SUPPORT)
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_SMP_HXX
+
+// EOF smp.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/test/stackmon.h b/cesar/ecos/packages/kernel/current/include/test/stackmon.h
new file mode 100644
index 0000000000..6a7bd3df08
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/test/stackmon.h
@@ -0,0 +1,239 @@
+#ifndef CYGONCE_KERNEL_TEST_STACKMON_H
+#define CYGONCE_KERNEL_TEST_STACKMON_H
+
+/*=================================================================
+//
+// stackmon.h
+//
+// Auxiliary test header file
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1999-05-20
+// Description:
+// Defines some convenience functions for stack use output.
+// Note:
+// The functions are defined for both C and C++ usage - with different
+// argument types.
+//
+//####DESCRIPTIONEND####
+*/
+
+#include <pkgconf/system.h>
+#include <pkgconf/hal.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/infra/cyg_type.h>
+#ifdef CYGPKG_KERNEL
+#include <pkgconf/kernel.h>
+# if defined(CYGFUN_KERNEL_API_C)
+# include <cyg/kernel/kapi.h>
+# endif
+# if defined(__cplusplus)
+# include <cyg/kernel/sched.hxx>
+# include <cyg/kernel/thread.hxx>
+# include <cyg/kernel/thread.inl>
+# endif
+# include <cyg/kernel/smp.hxx>
+#endif
+
+#ifndef STACKMON_PRINTF
+#include <cyg/infra/diag.h>
+#define STACKMON_PRINTF diag_printf
+#endif
+
+// ------------------------------------------------------------------------
+// Utility function for actually counting a stack
+
+inline void cyg_test_size_a_stack( char *comment, char *format,
+ char *base, char *top )
+{
+#ifdef CYGFUN_KERNEL_THREADS_STACK_CHECKING
+ cyg_uint32* cur32 = (cyg_uint32*) ((((CYG_ADDRWORD)&(base[CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE])) + 3) & ~3);
+ cyg_uint32* top32 = (cyg_uint32*) ((((CYG_ADDRWORD)top) + 3) & ~3);
+ for ( ; cur32 < top32; cur32++) {
+ if (*cur32 != 0xDEADBEEF) {
+ break;
+ }
+ }
+ STACKMON_PRINTF( format, comment, (CYG_ADDRWORD)top32 - (CYG_ADDRWORD)cur32, top - base );
+#else
+ register char *p;
+ for ( p = base; p < top; p++ )
+ if ( *p )
+ break;
+ STACKMON_PRINTF( format, comment, top - p, top - base );
+#endif
+}
+
+// ------------------------------------------------------------------------
+
+inline void cyg_test_dump_stack_stats( char *comment,
+ char *base, char *top )
+{
+ cyg_test_size_a_stack( comment, "%31s : stack used %5d size %5d\n",
+ base, top );
+}
+
+// ------------------------------------------------------------------------
+
+#ifdef __cplusplus
+
+inline void cyg_test_dump_thread_stack_stats( char *comment,
+ Cyg_Thread *p )
+{
+#if defined(CYGPKG_KERNEL)
+ char *base, *top;
+ base = (char *)p->get_stack_base();
+ top = base + p->get_stack_size();
+ cyg_test_dump_stack_stats( comment, base, top );
+#endif
+}
+
+#else // __cplusplus
+
+inline void cyg_test_dump_thread_stack_stats( char *comment,
+ cyg_handle_t p )
+{
+#if defined(CYGPKG_KERNEL) && defined(CYGFUN_KERNEL_API_C)
+ char *base, *top;
+ base = (char *) cyg_thread_get_stack_base( p );
+ top = base + cyg_thread_get_stack_size( p );
+ cyg_test_dump_stack_stats( comment, base, top );
+#endif
+}
+
+#endif // __cplusplus
+
+// ------------------------------------------------------------------------
+// Print out size of idle thread stack usage since start-of-time. Only
+// meaningful if there is a scheduler.
+
+#ifdef __cplusplus
+
+inline void cyg_test_dump_idlethread_stack_stats( char *comment )
+{
+#if defined(CYGPKG_KERNEL)
+ int i;
+ extern Cyg_Thread idle_thread[CYGNUM_KERNEL_CPU_MAX];
+ for( i = 0; i < CYGNUM_KERNEL_CPU_MAX; i++ )
+ {
+ // idle thread is not really a plain CygThread; danger.
+ char *ibase = (char *)idle_thread[i].get_stack_base();
+ char *istack = ibase + idle_thread[i].get_stack_size();
+ cyg_test_size_a_stack( comment,
+ "%20s : Idlethread stack used %5d size %5d\n",
+ ibase, istack );
+ }
+#endif
+}
+
+#else // __cplusplus
+
+inline void cyg_test_dump_idlethread_stack_stats( char *comment )
+{
+#if defined(CYGPKG_KERNEL) && defined(CYGFUN_KERNEL_API_C)
+ cyg_handle_t idle_thread = cyg_thread_idle_thread();
+
+ char *ibase = (char *)cyg_thread_get_stack_base( idle_thread );
+ char *istack = ibase + cyg_thread_get_stack_size( idle_thread );
+ cyg_test_size_a_stack( comment,
+ "%20s : Idlethread stack used %5d size %5d\n",
+ ibase, istack );
+#endif
+}
+
+#endif // __cplusplus
+
+// ------------------------------------------------------------------------
+// Print out size of interrupt stack usage since start-of-time or since it
+// was last cleared. NB on some architectures and configurations, the
+// interrupt stack is the same as the bootup stack, so clear it in the
+// first first thread to execute. Clearing it before scheduler start would
+// be fatal!
+
+#if defined(HAL_INTERRUPT_STACK_BASE) && defined(HAL_INTERRUPT_STACK_TOP)
+externC char HAL_INTERRUPT_STACK_BASE[];
+externC char HAL_INTERRUPT_STACK_TOP[];
+#endif
+
+inline void cyg_test_dump_interrupt_stack_stats( char *comment )
+{
+#ifdef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
+#if defined(HAL_INTERRUPT_STACK_BASE) && defined(HAL_INTERRUPT_STACK_TOP)
+ cyg_test_size_a_stack( comment,
+ "%20s : Interrupt stack used %5d size %5d\n",
+ HAL_INTERRUPT_STACK_BASE, HAL_INTERRUPT_STACK_TOP );
+#endif
+#endif
+}
+
+// Clear interrupt stack to reset stats - only after sched has started.
+
+inline void cyg_test_clear_interrupt_stack( void )
+{
+#ifdef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
+#if defined(HAL_INTERRUPT_STACK_BASE) && defined(HAL_INTERRUPT_STACK_TOP)
+ cyg_uint32 old_intr;
+ HAL_DISABLE_INTERRUPTS(old_intr);
+# ifdef CYGFUN_KERNEL_THREADS_STACK_CHECKING
+ {
+ cyg_uint32* cur32 = (cyg_uint32*) ((((CYG_ADDRWORD)HAL_INTERRUPT_STACK_BASE) + 3) & ~3);
+ cyg_uint32* top32 = (cyg_uint32*) ((((CYG_ADDRWORD)HAL_INTERRUPT_STACK_TOP) + 3) & ~3);
+ for ( ; cur32 < top32; cur32++) {
+ *cur32 = 0xDEADBEEF;
+ }
+ }
+# else
+ {
+ register char *p;
+ for ( p = HAL_INTERRUPT_STACK_BASE; p < HAL_INTERRUPT_STACK_TOP; p++ )
+ *p = 0; // zero it for checking later
+ }
+# endif
+ HAL_RESTORE_INTERRUPTS(old_intr);
+#endif
+#endif
+}
+
+// ------------------------------------------------------------------------
+
+#endif // ifndef CYGONCE_KERNEL_TEST_STACKMON_H
+
+// EOF stackmon.h
diff --git a/cesar/ecos/packages/kernel/current/include/thread.hxx b/cesar/ecos/packages/kernel/current/include/thread.hxx
new file mode 100644
index 0000000000..e191aa5ce4
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/thread.hxx
@@ -0,0 +1,590 @@
+#ifndef CYGONCE_KERNEL_THREAD_HXX
+#define CYGONCE_KERNEL_THREAD_HXX
+
+//==========================================================================
+//
+// thread.hxx
+//
+// Thread class declarations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-09
+// Purpose: Define Thread class interfaces
+// Description: The classes defined here collectively implement the
+// internal API used to create, configure and manage threads.
+// Usage: #include <cyg/kernel/thread.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/clock.hxx>
+#include <cyg/kernel/except.hxx>
+
+#include <cyg/hal/hal_arch.h>
+
+// -------------------------------------------------------------------------
+// Miscellaneous types
+
+typedef void cyg_thread_entry(CYG_ADDRWORD data);// Thread entry point function
+
+// -------------------------------------------------------------------------
+// Hardware thread interface.
+// The implementation of this class is provided by the HAL.
+
+class Cyg_HardwareThread
+{
+ friend class Cyg_Scheduler;
+
+protected:
+
+ CYG_ADDRESS stack_base; // pointer to base of stack area
+
+ cyg_uint32 stack_size; // size of stack area in bytes
+
+#ifdef CYGFUN_KERNEL_THREADS_STACK_LIMIT
+ CYG_ADDRESS stack_limit; // movable stack limit
+#endif
+
+ CYG_ADDRESS stack_ptr; // pointer to saved state on stack
+
+ cyg_thread_entry *entry_point; // main entry point (code pointer!)
+
+ CYG_ADDRWORD entry_data; // entry point argument
+
+#ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+
+ HAL_SavedRegisters *saved_context; // If non-zero, this points at a more
+ // interesting context than stack_ptr.
+#endif
+
+ Cyg_HardwareThread(
+ cyg_thread_entry *entry_point, // entry point function
+ CYG_ADDRWORD entry_data, // entry data
+ cyg_ucount32 stack_size = 0, // stack size, 0 = use default
+ CYG_ADDRESS stack_base = 0 // stack base, NULL = allocate
+ );
+
+ // Thread entry point. This is where all threads begin execution.
+ // This routine does a little housekeeping and then call the main
+ // entry_point specified above.
+ static void thread_entry(Cyg_Thread *thread);
+
+ // Initialize the context of the thread to start execution at thread_entry
+ void init_context( Cyg_Thread *thread );
+
+ // Save current thread's context and load that of the given next thread.
+ void switch_context(Cyg_HardwareThread *next);
+
+ // attach a stack to this thread
+ void attach_stack(CYG_ADDRESS stack, cyg_uint32 stack_size);
+
+ // detach the stack from this thread
+ CYG_ADDRESS detach_stack();
+
+ // Adjust the thread's saved state to call the exception
+ // handler when next executed.
+ void prepare_exception (
+ cyg_exception_handler *exception_handler,
+ CYG_ADDRWORD exception_data,
+ cyg_code exception_number,
+ CYG_ADDRWORD exception_info
+ );
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ // Get and set entry_data.
+
+ void set_entry_data( CYG_ADDRWORD data );
+
+ CYG_ADDRWORD get_entry_data();
+
+#ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+ // Return the current saved state for this thread.
+ HAL_SavedRegisters *get_saved_context();
+
+ // Set the saved context pointer.
+ void set_saved_context(HAL_SavedRegisters *ctx);
+#endif
+
+ // get the size/base of this thread's stack
+ CYG_ADDRESS get_stack_base();
+
+ cyg_uint32 get_stack_size();
+
+#ifdef CYGFUN_KERNEL_THREADS_STACK_LIMIT
+ // Allocate some memory at the lower end of the stack
+ // by moving the stack limit pointer.
+
+ void *increment_stack_limit( cyg_ucount32 size);
+
+ CYG_ADDRESS get_stack_limit();
+#endif
+
+#ifdef CYGFUN_KERNEL_THREADS_STACK_CHECKING
+
+ inline void check_stack(void);
+
+#endif
+#ifdef CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT
+
+ inline cyg_uint32 measure_stack_usage(void);
+
+#endif
+};
+
+// -------------------------------------------------------------------------
+// Per-thread timer support class.
+// This is only included when required.
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+
+class Cyg_ThreadTimer
+ : public Cyg_Alarm
+{
+ friend class Cyg_Thread;
+
+ // Pointer to current thread
+ Cyg_Thread *thread;
+
+ // Constructor
+ Cyg_ThreadTimer(
+ Cyg_Thread *thread
+ );
+
+ // Alarm function
+ static void alarm( Cyg_Alarm *alarm, CYG_ADDRWORD data);
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+};
+
+#endif
+
+// -------------------------------------------------------------------------
+// Main Thread class.
+// This provides the public API for controlling threads.
+
+class Cyg_Thread
+ : public Cyg_HardwareThread, // provides hardware abstractions
+ public Cyg_SchedThread // provides scheduling abstractions
+{
+ friend class Cyg_Scheduler;
+ friend void deliver_exception( CYG_WORD code, CYG_ADDRWORD data );
+
+ // The following definitions are used by all variants of the
+ // basic thread object.
+
+public:
+ enum { // Thread state values
+
+ RUNNING = 0, // Thread is runnable or running
+ SLEEPING = 1, // Thread is waiting for something to happen
+ COUNTSLEEP = 2, // Sleep in counted manner
+ SUSPENDED = 4, // Suspend count is non-zero
+ CREATING = 8, // Thread is being created
+ EXITED = 16, // Thread has exited
+
+ // This is the set of bits that must be cleared by a generic
+ // wake() or release().
+ SLEEPSET = (SLEEPING | COUNTSLEEP)
+ };
+
+private:
+ // Current thread state, a logical OR of the above values.
+ // Only if this word is zero can the thread execute.
+ cyg_uint32 state;
+
+ // Suspension counter, if > 0, the thread is suspended
+ cyg_ucount32 suspend_count;
+
+ // Wakeup counter, if > 0, sleep will not sleep, just decrement
+ cyg_ucount32 wakeup_count;
+
+ // A word of data used in syncronization object to communicate
+ // information between sleepers and wakers.
+ CYG_ADDRWORD wait_info;
+
+ // Unique thread id assigned on creation
+ cyg_uint16 unique_id;
+
+#ifdef CYGPKG_KERNEL_EXCEPTIONS
+
+ // If exceptions are supported, define an exception control
+ // object that will be used to manage and deliver them. If
+ // exceptions are global there is a single static instance
+ // of this object, if they are per-thread then there is one
+ // for each thread.
+private:
+
+#ifdef CYGSEM_KERNEL_EXCEPTIONS_GLOBAL
+ static
+#endif
+ Cyg_Exception_Control exception_control;
+
+public:
+
+ static void register_exception(
+ cyg_code exception_number, // exception number
+ cyg_exception_handler handler, // handler function
+ CYG_ADDRWORD data, // data argument
+ cyg_exception_handler **old_handler, // handler function
+ CYG_ADDRWORD *old_data // data argument
+ );
+
+ static void deregister_exception(
+ cyg_code exception_number // exception number
+ );
+
+ void deliver_exception(
+ cyg_code exception_number, // exception being raised
+ CYG_ADDRWORD exception_info // exception specific info
+ );
+
+#endif
+
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ // Constructor, Initialize the thread structure. The thread is
+ // created in suspended state, and needs to be resumed to execute.
+ // It is also started at some (configurable) default priority, which
+ // may need to be changed before calling resume.
+
+ Cyg_Thread (
+ cyg_thread_entry *entry, // entry point function
+ CYG_ADDRWORD entry_data, // entry data
+ cyg_ucount32 stack_size = 0, // stack size, 0 = use default
+ CYG_ADDRESS stack_base = 0 // stack base, NULL = allocate
+ );
+
+ Cyg_Thread (
+ CYG_ADDRWORD sched_info, // Scheduling parameter(s)
+ cyg_thread_entry *entry, // entry point function
+ CYG_ADDRWORD entry_data, // entry data
+ char *name, // thread name
+ CYG_ADDRESS stack_base = 0, // stack base, NULL = allocate
+ cyg_ucount32 stack_size = 0 // stack size, 0 = use default
+ );
+
+ // Re-initialize the thread back to it's initial state.
+ void reinitialize();
+
+ ~Cyg_Thread();
+
+ // The following are invoked implicitly on the current thread,
+ // hence they are static member functions.
+
+ static void sleep(); // Put thread to sleep
+
+ static void counted_sleep();// Decrement counter or put
+ // thread to sleep
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ static void counted_sleep( cyg_tick_count delay );
+ // ...for delay ticks
+#endif
+
+ static void exit(); // Terminate thread
+
+ static void yield(); // Yield CPU to another thread
+
+ static void rotate_queue( cyg_priority pri );
+ // Rotate that run queue
+
+ void to_queue_head( void );
+ // Move to the head of its queue
+ // (not necessarily a scheduler q)
+
+ static Cyg_Thread *self(); // Return current thread
+
+
+ // The following are called on threads other than the current one.
+
+ void wake(); // Wake this thread from sleep.
+
+ void counted_wake(); // Increment counter or wake thread
+ cyg_uint32 cancel_counted_wake();
+ // Cancel counted wakeups for this
+ // thread and return how many were
+ // pending
+
+ void suspend(); // Suspend this thread: increment counter and
+ // deschedule.
+
+ void resume(); // Resume this thread: decrement counter and
+ // reschedule if counter is zero.
+
+ void release(); // Release thread from sleep with BREAK
+ // wake_reason.
+
+ void kill(); // Kill this thread
+
+ void force_resume(); // Resume this thread: set counter to zero.
+
+ cyg_uint32 get_state(); // Return current thread state.
+
+
+ // Accessor functions to set and get wait_info.
+
+ void set_wait_info(CYG_ADDRWORD data);
+
+ CYG_ADDRWORD get_wait_info();
+
+ // This part of the API is used if we have a clock and want
+ // per-thread timers for doing delays and timeouts.
+
+ // delay the given number of ticks
+ void delay( cyg_tick_count delay );
+
+
+ enum cyg_reason // sleep/wakeup reason codes
+ {
+ NONE, // No recorded reason
+ WAIT, // Wait with no timeout
+ DELAY, // Simple time delay
+ TIMEOUT, // Wait with timeout/timeout expired
+ BREAK, // forced break out of sleep
+ DESTRUCT, // wait object destroyed[note]
+ EXIT, // forced termination
+ DONE // Wait/delay complete
+ };
+ // [note] NOT the thread, some object it was waiting on.
+ // Thread destruction would first involve EXITing it.
+
+private:
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ Cyg_ThreadTimer timer; // per-thread timer
+#endif
+
+ cyg_reason sleep_reason; // reason for sleeping
+
+ cyg_reason wake_reason; // reason for waking
+
+#ifdef CYGIMP_THREAD_PRIORITY
+
+public:
+
+ // If the scheduler implements priorities, provide
+ // functions to set and get it.
+
+ void set_priority( cyg_priority pri );
+
+ cyg_priority get_priority();
+
+ // This returns the current dispatching priority of the
+ // thread. This may differ from the result of get_priority()
+ // in the presence of priority inheritance or certain
+ // scheduling algorithms.
+ cyg_priority get_current_priority();
+
+#endif
+
+#ifdef CYGVAR_KERNEL_THREADS_DATA
+
+private:
+ // Array of single word entries for each index.
+ CYG_ADDRWORD thread_data[CYGNUM_KERNEL_THREADS_DATA_MAX];
+
+ // Map of free thread_data indexes. Each bit represents an index
+ // and is 1 if that index is free, and 0 if it is in use.
+ static cyg_ucount32 thread_data_map;
+
+public:
+
+ typedef cyg_count32 cyg_data_index;
+
+ static CYG_ADDRWORD get_data( cyg_data_index index );
+
+ static CYG_ADDRWORD *get_data_ptr( cyg_data_index index );
+
+ void set_data( cyg_data_index index, CYG_ADDRWORD data );
+
+ // returns -1 if no more indexes available
+ static cyg_data_index new_data_index();
+
+ static void free_data_index( cyg_data_index index );
+
+#endif
+
+#ifdef CYGPKG_KERNEL_THREADS_DESTRUCTORS
+
+ // thread destructors, called on thread exit.
+private:
+ typedef void (*destructor_fn)(CYG_ADDRWORD);
+ struct Cyg_Destructor_Entry {
+ destructor_fn fn;
+ CYG_ADDRWORD data;
+ };
+#ifndef CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD
+ static
+#endif
+ Cyg_Destructor_Entry destructors[ CYGNUM_KERNEL_THREADS_DESTRUCTORS ];
+public:
+
+ // Add and remove destructors. Returns true on success, false on failure.
+#ifndef CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD
+ static
+#endif
+ cyg_bool add_destructor( destructor_fn fn, CYG_ADDRWORD data );
+#ifndef CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD
+ static
+#endif
+ cyg_bool rem_destructor( destructor_fn fn, CYG_ADDRWORD data );
+#endif
+
+#ifdef CYGVAR_KERNEL_THREADS_NAME
+
+private:
+ // An optional thread name string, for humans to read
+ char *name;
+
+public:
+ // function to get the name string
+ char *get_name();
+
+#endif
+
+
+#ifdef CYGVAR_KERNEL_THREADS_LIST
+
+ // Housekeeping list that tracks all threads
+private:
+ Cyg_Thread *list_next;
+ static Cyg_Thread *thread_list;
+
+ void add_to_list( void );
+ void remove_from_list( void );
+public:
+
+ static Cyg_Thread *get_list_head();
+
+ Cyg_Thread *get_list_next();
+
+#endif
+
+public:
+
+ // Set sleep reason to reason and wake reason to NONE
+ static void set_sleep_reason( cyg_reason reason = WAIT);
+
+ cyg_reason get_sleep_reason();
+
+ // Set the wakeup reason to the given value
+ void set_wake_reason( cyg_reason reason = DONE);
+
+ // Get current wake reason
+ cyg_reason get_wake_reason();
+
+ static void set_timer( // Set timeout and sleep reason
+ cyg_tick_count trigger, // Absolute wakeup time
+ cyg_reason sleep_reason // reason for sleeping
+ );
+
+ static void clear_timer(); // disable thread timer
+
+ // Get a 16 bit unique id for this thread. This is
+ // used in tracing and instrumentation to identify the
+ // current thread.
+
+ cyg_uint16 get_unique_id();
+
+};
+
+// -------------------------------------------------------------------------
+// Thread Queue class.
+// This defines the main API for manipulating queues of threads.
+
+class Cyg_ThreadQueue
+ : public Cyg_ThreadQueue_Implementation
+{
+
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ // API used by rest of kernel.
+
+ // Add thread to queue
+ void enqueue(Cyg_Thread *thread);
+
+ // return first thread on queue
+ Cyg_Thread *highpri();
+
+ // remove first thread on queue
+ Cyg_Thread *dequeue();
+
+ // remove specified thread from queue
+ void remove(Cyg_Thread *thread);
+
+ // test if queue is empty
+ inline cyg_bool empty();
+
+};
+
+// -------------------------------------------------------------------------
+// Thread inlines
+
+// Return current thread state.
+inline cyg_uint32 Cyg_Thread::get_state()
+{
+ return state;
+}
+
+inline void Cyg_Thread::set_wait_info(CYG_ADDRWORD data)
+{
+ wait_info = data;
+}
+
+inline CYG_ADDRWORD Cyg_Thread::get_wait_info()
+{
+ return wait_info;
+}
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_KERNEL_THREAD_HXX
+// EOF thread.hxx
diff --git a/cesar/ecos/packages/kernel/current/include/thread.inl b/cesar/ecos/packages/kernel/current/include/thread.inl
new file mode 100644
index 0000000000..da2523a5e5
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/thread.inl
@@ -0,0 +1,693 @@
+#ifndef CYGONCE_KERNEL_THREAD_INL
+#define CYGONCE_KERNEL_THREAD_INL
+
+//==========================================================================
+//
+// thread.inl
+//
+// Thread class inlines
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-09
+// Purpose: Define inlines for thread classes
+// Description: Inline implementations of various member functions defined
+// in various Thread classes.
+// Usage:
+// #include <cyg/kernel/thread.hxx>
+// ...
+// #include <cyg/kernel/thread.inl>
+// ...
+
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/thread.hxx>
+#include <cyg/hal/hal_arch.h>
+
+#include <cyg/kernel/clock.inl>
+#include <cyg/infra/diag.h>
+
+#ifndef CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE
+#define CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE (0)
+#endif
+
+//==========================================================================
+// Inlines for Cyg_HardwareThread
+
+// -------------------------------------------------------------------------
+// get the size/base of this thread's stack
+
+inline CYG_ADDRESS
+Cyg_HardwareThread::get_stack_base()
+{
+ return stack_base - CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE;
+}
+
+inline cyg_uint32
+Cyg_HardwareThread::get_stack_size()
+{
+ return stack_size + 2 * CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE;
+}
+
+// -------------------------------------------------------------------------
+// Check the stack bounds of this thread:
+#ifdef CYGFUN_KERNEL_THREADS_STACK_CHECKING
+inline void Cyg_HardwareThread::check_stack(void)
+{
+ cyg_uint32 sig = (cyg_uint32)this;
+ cyg_uint32 *base = (cyg_uint32 *)get_stack_base();
+ cyg_uint32 *top = (cyg_uint32 *)(stack_base + stack_size);
+ cyg_ucount32 i;
+
+ CYG_INSTRUMENT_THREAD(CHECK_STACK, base, top );
+
+ CYG_ASSERT( 0 == ((sizeof(CYG_WORD)-1) & (cyg_uint32)base), "stack base not word aligned" );
+ CYG_ASSERT( 0 == ((sizeof(CYG_WORD)-1) & (cyg_uint32)top), "stack top not word aligned" );
+
+ CYG_ASSERT( (cyg_uint32)stack_ptr > (cyg_uint32)stack_base,
+ "Stack_ptr below base" );
+ CYG_ASSERT( (cyg_uint32)stack_ptr <= ((cyg_uint32)stack_base + stack_size),
+ "Stack_ptr above top" );
+
+ for ( i = 0;
+ i < CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE/sizeof(cyg_uint32);
+ i++ ) {
+ if ((sig ^ (i * 0x01010101)) != base[i]) {
+ char *reason = "Stack base corrupt";
+ diag_printf("%s - i: %d\n", reason, i);
+ diag_dump_buf(base, CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE);
+ CYG_FAIL(reason);
+ }
+ if ((sig ^ (i * 0x10101010)) != top[i]) {
+ char *reason = "Stack top corrupt";
+ diag_printf("%s - i: %d\n", reason, i);
+ diag_dump_buf(top, CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE);
+ CYG_FAIL(reason);
+ }
+ }
+
+#ifdef CYGFUN_KERNEL_THREADS_STACK_LIMIT
+ // we won't have added check data above the stack limit if it hasn't
+ // been incremented
+ if (stack_limit != stack_base) {
+ CYG_ADDRESS limit = stack_limit;
+ // the limit will be off by the check data size, so lets correct it
+ limit -= CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE;
+
+ // determine base of check data by rounding up to nearest word aligned
+ // address if not already aligned
+ cyg_uint32 *p = (cyg_uint32 *)((limit + 3) & ~3);
+ // i.e. + sizeof(cyg_uint32)-1) & ~(sizeof(cyg_uint32)-1);
+
+ for ( i = 0;
+ i < CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE/sizeof(cyg_uint32);
+ i++ ) {
+ if ((sig ^ (i * 0x01010101)) != p[i]) {
+ char *reason = "Gap between stack limit and base corrupt";
+ diag_printf("%s - i: %d\n", reason, i);
+ diag_dump_buf(p, CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE);
+ CYG_FAIL(reason);
+ }
+ }
+ }
+#endif
+}
+#endif
+
+// -------------------------------------------------------------------------
+// Measure the stack usage of the thread
+#ifdef CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT
+inline cyg_uint32 Cyg_HardwareThread::measure_stack_usage(void)
+{
+#ifdef CYGFUN_KERNEL_THREADS_STACK_LIMIT
+ CYG_WORD *base = (CYG_WORD *)stack_limit;
+ cyg_uint32 size = (stack_size - (stack_limit-stack_base))/sizeof(CYG_WORD);
+#else
+ CYG_WORD *base = (CYG_WORD *)stack_base;
+ cyg_uint32 size = stack_size/sizeof(CYG_WORD);
+#endif
+ cyg_ucount32 i;
+
+ // Work up the stack comparing with the preset value
+ // We assume the stack grows downwards, hmm...
+ for (i=0; i<size; i++) {
+ if (base[i] != 0xDEADBEEF)
+ break;
+ }
+ return (size - i)*sizeof(CYG_WORD);
+}
+#endif
+
+// -------------------------------------------------------------------------
+// Attach a stack to this thread. If there is a HAL defined macro to
+// do this, then we use that, otherwise assume a falling stack.
+inline void Cyg_HardwareThread::attach_stack(CYG_ADDRESS s_base, cyg_uint32 s_size)
+{
+#ifdef CYGNUM_HAL_STACK_SIZE_MINIMUM
+ CYG_ASSERT( s_size >= CYGNUM_HAL_STACK_SIZE_MINIMUM,
+ "Stack size too small");
+#endif
+
+#ifdef CYGFUN_KERNEL_THREADS_STACK_CHECKING
+ {
+ cyg_uint32 sig = (cyg_uint32)this;
+ cyg_uint32 *base = (cyg_uint32 *)s_base;
+ cyg_uint32 *top = (cyg_uint32 *)(s_base + s_size -
+ CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE);
+
+ unsigned int i;
+
+ CYG_INSTRUMENT_THREAD(ATTACH_STACK, base, top );
+
+ CYG_ASSERT( NULL != base, "stack base non-NULL" );
+ CYG_ASSERT( 0 == ((sizeof(CYG_WORD)-1) & (cyg_uint32)base), "stack base alignment" );
+ CYG_ASSERT( 0 == ((sizeof(CYG_WORD)-1) & (cyg_uint32)top), "stack top alignment" );
+
+ for ( i = 0;
+ i < CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE/sizeof(cyg_uint32);
+ i++ ) {
+ base[i] = (sig ^ (i * 0x01010101));
+ top[i] = (sig ^ (i * 0x10101010));
+ }
+ // This check for overlap of the two signature areas also detects
+ // wrap round zero of the size in the unsigned subtraction below.
+ CYG_ASSERT( &base[i] < &top[0], "Stack is so small size wrapped" );
+ // Use this 'i' expression to round correctly to whole words.
+ s_base += i * sizeof(cyg_uint32);
+ s_size -= i * sizeof(cyg_uint32) * 2;
+ // This is a complete guess, the 256; the point is to assert early that
+ // this might go badly wrong. It would not detect wrap of unsigned size.
+ CYG_ASSERT( s_size >= 256,
+ "Stack size too small after allocating checking buffer");
+ }
+#endif
+#ifdef CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT
+ {
+ CYG_WORD *base = (CYG_WORD *)s_base;
+ cyg_uint32 size = s_size/sizeof(CYG_WORD);
+ cyg_ucount32 i;
+
+ // initialize all of stack with known value - don't choose 0
+ // could do with pseudo value as above, but this way, checking
+ // is faster
+ for (i=0; i<size; i++) {
+ base[i] = 0xDEADBEEF;
+ }
+ // Don't bother about the case when the stack isn't a multiple of
+ // CYG_WORD in size. Since it's at the top of the stack, it will
+ // almost certainly be overwritten the instant the thread starts
+ // anyway.
+ }
+#endif
+ stack_base = s_base;
+ stack_size = s_size;
+#ifdef CYGFUN_KERNEL_THREADS_STACK_LIMIT
+ stack_limit = s_base;
+#endif
+
+#ifdef HAL_THREAD_ATTACH_STACK
+
+ HAL_THREAD_ATTACH_STACK(stack_ptr, stack_base, stack_size);
+
+#else
+
+ stack_ptr = stack_base + stack_size;
+
+#endif
+
+#ifdef CYGFUN_KERNEL_THREADS_STACK_CHECKING
+ check_stack();
+#endif
+}
+
+// -------------------------------------------------------------------------
+
+inline Cyg_HardwareThread::Cyg_HardwareThread(
+ cyg_thread_entry *e_point, // entry point function
+ CYG_ADDRWORD e_data, // entry data
+ cyg_ucount32 s_size, // stack size, 0 = use default
+ CYG_ADDRESS s_base // stack base, NULL = allocate
+)
+{
+ entry_point = e_point;
+ entry_data = e_data;
+#ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+ saved_context = 0;
+#endif
+
+ attach_stack( s_base, s_size );
+};
+
+// -------------------------------------------------------------------------
+
+#ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+
+// Return the current saved state for this thread.
+inline HAL_SavedRegisters *Cyg_HardwareThread::get_saved_context()
+{
+ HAL_SavedRegisters *regs;
+ if( saved_context != 0 ) regs = saved_context;
+ else HAL_THREAD_GET_SAVED_REGISTERS( stack_ptr, regs );
+ return regs;
+}
+
+inline void Cyg_HardwareThread::set_saved_context(HAL_SavedRegisters *ctx)
+{
+ saved_context = ctx;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// (declare this inline before its first use)
+
+inline cyg_uint16 Cyg_Thread::get_unique_id()
+{
+ return unique_id;
+}
+
+// -------------------------------------------------------------------------
+// Initialize the context of this thread.
+
+inline void Cyg_HardwareThread::init_context(Cyg_Thread *thread)
+{
+#ifdef CYGPKG_INFRA_DEBUG
+ cyg_uint32 threadid = thread->get_unique_id()*0x01010000;
+#else
+ cyg_uint32 threadid = 0x11110000;
+#endif
+ HAL_THREAD_INIT_CONTEXT( stack_ptr, thread, thread_entry, threadid );
+}
+
+
+
+// -------------------------------------------------------------------------
+// Save current thread's context and load that of the given next thread.
+// This function is only really here for completeness, the
+// kernel generally calls the HAL macros directly.
+
+inline void Cyg_HardwareThread::switch_context(Cyg_HardwareThread *next)
+{
+ HAL_THREAD_SWITCH_CONTEXT( &stack_ptr, &next->stack_ptr );
+}
+
+// -------------------------------------------------------------------------
+// Get and set entry_data.
+
+inline void Cyg_HardwareThread::set_entry_data( CYG_ADDRWORD data )
+{
+ entry_data = data;
+}
+
+inline CYG_ADDRWORD Cyg_HardwareThread::get_entry_data()
+{
+ return entry_data;
+}
+
+// -------------------------------------------------------------------------
+// Allocate some memory at the lower end of the stack
+// by moving the stack limit pointer.
+
+#ifdef CYGFUN_KERNEL_THREADS_STACK_LIMIT
+
+#ifndef CYGFUN_KERNEL_THREADS_STACK_CHECKING
+// if stack checking, implementation is in thread.cxx
+inline void *Cyg_HardwareThread::increment_stack_limit( cyg_ucount32 size )
+{
+ void *ret = (void *)stack_limit;
+ stack_limit += size;
+ return ret;
+}
+#endif
+
+inline CYG_ADDRESS
+Cyg_HardwareThread::get_stack_limit()
+{
+ return stack_limit;
+}
+
+#endif
+
+//==========================================================================
+// Inlines for Cyg_Thread class
+
+inline Cyg_Thread *Cyg_Thread::self()
+{
+ return Cyg_Scheduler::get_current_thread();
+}
+
+// -------------------------------------------------------------------------
+
+inline void Cyg_Thread::yield()
+{
+ self()->Cyg_SchedThread::yield();
+}
+
+// -------------------------------------------------------------------------
+
+inline void
+Cyg_Thread::rotate_queue( cyg_priority pri )
+{
+ self()->Cyg_SchedThread::rotate_queue( pri );
+}
+
+// -------------------------------------------------------------------------
+
+inline void
+Cyg_Thread::to_queue_head( void )
+{
+ this->Cyg_SchedThread::to_queue_head();
+}
+
+// -------------------------------------------------------------------------
+
+#ifdef CYGIMP_THREAD_PRIORITY
+
+inline cyg_priority Cyg_Thread::get_priority()
+{
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_SIMPLE
+
+ // If we have an inherited priority, return our original
+ // priority rather than the current one.
+
+ if( priority_inherited ) return original_priority;
+
+#endif
+
+ return priority;
+}
+
+// Return the actual dispatching priority of the thread
+// regardless of inheritance or scheduling concerns.
+inline cyg_priority Cyg_Thread::get_current_priority()
+{
+ return priority;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+
+inline void Cyg_Thread::set_sleep_reason( cyg_reason reason)
+{
+ self()->sleep_reason = reason;
+ self()->wake_reason = NONE;
+}
+
+// -------------------------------------------------------------------------
+
+inline Cyg_Thread::cyg_reason Cyg_Thread::get_sleep_reason()
+{
+ return sleep_reason;
+}
+
+// -------------------------------------------------------------------------
+
+inline void Cyg_Thread::set_wake_reason( cyg_reason reason )
+{
+ sleep_reason = NONE;
+ wake_reason = reason;
+}
+
+// -------------------------------------------------------------------------
+
+inline Cyg_Thread::cyg_reason Cyg_Thread::get_wake_reason()
+{
+ return wake_reason;
+}
+
+// -------------------------------------------------------------------------
+
+inline void Cyg_Thread::set_timer(
+ cyg_tick_count trigger,
+ cyg_reason reason
+)
+{
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ self()->sleep_reason = reason;
+ self()->wake_reason = NONE;
+ self()->timer.initialize( trigger);
+#endif
+}
+
+// -------------------------------------------------------------------------
+
+inline void Cyg_Thread::clear_timer()
+{
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ self()->timer.disable();
+#endif
+}
+
+// -------------------------------------------------------------------------
+
+#ifdef CYGVAR_KERNEL_THREADS_DATA
+
+inline CYG_ADDRWORD Cyg_Thread::get_data( Cyg_Thread::cyg_data_index index )
+{
+ CYG_ASSERT( index < CYGNUM_KERNEL_THREADS_DATA_MAX,
+ "Per thread data index out of bounds");
+ CYG_ASSERT( (thread_data_map & (1<<index)) == 0,
+ "Unallocated index used");
+
+ return self()->thread_data[index];
+}
+
+inline CYG_ADDRWORD *Cyg_Thread::get_data_ptr( Cyg_Thread::cyg_data_index index )
+{
+ CYG_ASSERT( index < CYGNUM_KERNEL_THREADS_DATA_MAX,
+ "Per thread data index out of bounds");
+ CYG_ASSERT( (thread_data_map & (1<<index)) == 0,
+ "Unallocated index used");
+
+ return &(self()->thread_data[index]);
+}
+
+inline void Cyg_Thread::set_data( Cyg_Thread::cyg_data_index index,
+ CYG_ADDRWORD data )
+{
+ CYG_ASSERT( index < CYGNUM_KERNEL_THREADS_DATA_MAX,
+ "Per thread data index out of bounds");
+ CYG_ASSERT( (thread_data_map & (1<<index)) == 0,
+ "Unallocated index used");
+
+ thread_data[index] = data;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+
+#ifdef CYGVAR_KERNEL_THREADS_NAME
+
+inline char *Cyg_Thread::get_name()
+{
+ return name;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+
+#ifdef CYGVAR_KERNEL_THREADS_LIST
+
+inline Cyg_Thread *Cyg_Thread::get_list_head()
+{
+ return thread_list?thread_list->list_next:0;
+}
+
+inline Cyg_Thread *Cyg_Thread::get_list_next()
+{
+ return (this==thread_list)?0:list_next;
+}
+
+#endif
+
+
+// -------------------------------------------------------------------------
+
+#ifdef CYGPKG_KERNEL_EXCEPTIONS
+
+inline void Cyg_Thread::register_exception(
+ cyg_code exception_number, // exception number
+ cyg_exception_handler handler, // handler function
+ CYG_ADDRWORD data, // data argument
+ cyg_exception_handler **old_handler, // handler function
+ CYG_ADDRWORD *old_data // data argument
+ )
+{
+ self()->exception_control.register_exception(
+ exception_number,
+ handler,
+ data,
+ old_handler,
+ old_data
+ );
+}
+
+inline void Cyg_Thread::deregister_exception(
+ cyg_code exception_number // exception number
+ )
+{
+ self()->exception_control.deregister_exception(
+ exception_number
+ );
+}
+
+#endif
+
+//==========================================================================
+// Inlines for Cyg_ThreadTimer class
+
+// -------------------------------------------------------------------------
+#if defined(CYGFUN_KERNEL_THREADS_TIMER) && defined(CYGVAR_KERNEL_COUNTERS_CLOCK)
+
+inline Cyg_ThreadTimer::Cyg_ThreadTimer(
+ Cyg_Thread *th
+ )
+ : Cyg_Alarm(Cyg_Clock::real_time_clock,
+ &alarm,
+ CYG_ADDRWORD(this)
+ )
+{
+ thread = th;
+}
+
+#endif
+
+//==========================================================================
+// Inlines for Cyg_ThreadQueue class
+
+
+inline void Cyg_ThreadQueue::enqueue(Cyg_Thread *thread)
+{
+ Cyg_ThreadQueue_Implementation::enqueue(thread);
+}
+
+// -------------------------------------------------------------------------
+
+inline Cyg_Thread *Cyg_ThreadQueue::highpri()
+{
+ return Cyg_ThreadQueue_Implementation::highpri();
+}
+
+// -------------------------------------------------------------------------
+
+inline Cyg_Thread *Cyg_ThreadQueue::dequeue()
+{
+ return Cyg_ThreadQueue_Implementation::dequeue();
+}
+
+// -------------------------------------------------------------------------
+
+inline void Cyg_ThreadQueue::remove(Cyg_Thread *thread)
+{
+ Cyg_ThreadQueue_Implementation::remove(thread);
+}
+
+// -------------------------------------------------------------------------
+
+inline cyg_bool Cyg_ThreadQueue::empty()
+{
+ return Cyg_ThreadQueue_Implementation::empty();
+}
+
+// -------------------------------------------------------------------------
+
+#ifdef CYGPKG_KERNEL_THREADS_DESTRUCTORS
+
+#ifndef CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD
+# include <cyg/kernel/sched.inl>
+#endif
+
+// Add and remove destructors. Returns true on success, false on failure.
+inline cyg_bool
+Cyg_Thread::add_destructor( destructor_fn fn, CYG_ADDRWORD data )
+{
+ cyg_ucount16 i;
+#ifndef CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD
+ Cyg_Scheduler::lock();
+#endif
+ for (i=0; i<CYGNUM_KERNEL_THREADS_DESTRUCTORS; i++) {
+ if (NULL == destructors[i].fn) {
+ destructors[i].data = data;
+ destructors[i].fn = fn;
+#ifndef CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD
+ Cyg_Scheduler::unlock();
+#endif
+ return true;
+ }
+ }
+#ifndef CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD
+ Cyg_Scheduler::unlock();
+#endif
+ return false;
+}
+
+inline cyg_bool
+Cyg_Thread::rem_destructor( destructor_fn fn, CYG_ADDRWORD data )
+{
+ cyg_ucount16 i;
+#ifndef CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD
+ Cyg_Scheduler::lock();
+#endif
+ for (i=0; i<CYGNUM_KERNEL_THREADS_DESTRUCTORS; i++) {
+ if (destructors[i].fn == fn && destructors[i].data == data) {
+ destructors[i].fn = NULL;
+#ifndef CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD
+ Cyg_Scheduler::unlock();
+#endif
+ return true;
+ }
+ }
+#ifndef CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD
+ Cyg_Scheduler::unlock();
+#endif
+ return false;
+}
+#endif
+
+// -------------------------------------------------------------------------
+
+#endif // ifndef CYGONCE_KERNEL_THREAD_INL
+// EOF thread.inl
diff --git a/cesar/ecos/packages/kernel/current/include/timer.hxx b/cesar/ecos/packages/kernel/current/include/timer.hxx
new file mode 100644
index 0000000000..5ef94c8fa7
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/include/timer.hxx
@@ -0,0 +1,127 @@
+#ifndef CYGONCE_KERNEL_TIMER_HXX
+#define CYGONCE_KERNEL_TIMER_HXX
+
+//==========================================================================
+//
+// timer.hxx
+//
+// Timer handler class declaration(s)
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-06-10
+// Purpose: Define Timer class interfaces
+// Description: This file defines the Timer class which is derived from
+// the Alarm class to support uITRON type functionality
+// Usage: #include <cyg/kernel/timer.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/kernel/ktypes.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/clock.hxx> // Cyg_Alarm
+
+// -------------------------------------------------------------------------
+// Timer handler class
+
+class Cyg_Timer
+ : public Cyg_Alarm
+{
+public:
+
+ CYGDBG_DEFINE_CHECK_THIS
+
+ Cyg_Timer();
+
+ ~Cyg_Timer();
+
+ enum {
+ DISABLE = 0,
+ ENABLE = 1,
+ RESET = 2,
+ };
+
+ void initialize(
+ Cyg_Counter *counter,
+ cyg_alarm_fn alarm_fn,
+ CYG_ADDRWORD data,
+ cyg_tick_count trigger, // absolute time
+ cyg_tick_count interval, // 0 => one shot, else repeating
+ cyg_uint32 action // (DISABLE | ENABLE)
+ );
+
+ void activate(cyg_uint32 action); // (DISABLE | ENABLE) [|RESET]
+
+ cyg_tick_count get_trigger();
+ cyg_bool is_enabled();
+ cyg_bool is_initialized();
+ CYG_ADDRWORD get_data();
+};
+
+// -------------------------------------------------------------------------
+// Timer inlines
+
+inline cyg_tick_count
+Cyg_Timer::get_trigger()
+{
+ return trigger;
+}
+
+inline cyg_bool
+Cyg_Timer::is_initialized()
+{
+ return NULL != counter;
+}
+
+inline cyg_bool
+Cyg_Timer::is_enabled()
+{
+ return enabled;
+}
+
+inline CYG_ADDRWORD
+Cyg_Timer::get_data()
+{
+ return data;
+}
+
+#endif // ifndef CYGONCE_KERNEL_TIMER_HXX
+// EOF timer.hxx
diff --git a/cesar/ecos/packages/kernel/current/src/common/clock.cxx b/cesar/ecos/packages/kernel/current/src/common/clock.cxx
new file mode 100644
index 0000000000..917b588a39
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/common/clock.cxx
@@ -0,0 +1,946 @@
+//==========================================================================
+//
+// common/clock.cxx
+//
+// Clock class implementations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Jonathan Larmour
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-15
+// Purpose: Clock class implementation
+// Description: This file contains the definitions of the counter,
+// clock and alarm class member functions that are common
+// to all clock implementations.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <cyg/kernel/clock.hxx> // our header
+
+#include <cyg/kernel/sched.hxx> // scheduler definitions
+#include <cyg/kernel/thread.hxx> // thread definitions
+#include <cyg/kernel/intr.hxx> // interrupt definitions
+
+#include <cyg/kernel/sched.inl> // scheduler inlines
+#include <cyg/kernel/clock.inl> // Clock inlines
+
+// -------------------------------------------------------------------------
+// Static variables
+
+#ifdef CYGVAR_KERNEL_COUNTERS_CLOCK
+
+Cyg_Clock *Cyg_Clock::real_time_clock = NULL; // System real time clock
+
+#endif
+
+//==========================================================================
+// Constructor for counter object
+
+Cyg_Counter::Cyg_Counter(
+ cyg_uint32 incr
+ )
+{
+ CYG_REPORT_FUNCTION();
+
+ counter = 0;
+ increment = incr;
+
+}
+
+// -------------------------------------------------------------------------
+// Destructor for Counter object
+
+Cyg_Counter::~Cyg_Counter()
+{
+ CYG_REPORT_FUNCTION();
+
+
+}
+
+// -------------------------------------------------------------------------
+//
+
+#ifdef CYGDBG_USE_ASSERTS
+
+cyg_bool Cyg_Counter::check_this( cyg_assert_class_zeal zeal) const
+{
+ // check that we have a non-NULL pointer first
+ if( this == NULL ) return false;
+
+ switch( zeal )
+ {
+ case cyg_system_test:
+ case cyg_extreme:
+ case cyg_thorough:
+ case cyg_quick:
+ case cyg_trivial:
+ case cyg_none:
+ default:
+ break;
+ };
+
+ return true;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// Counter tick function
+
+void Cyg_Counter::tick( cyg_uint32 ticks )
+{
+// CYG_REPORT_FUNCTION();
+
+ CYG_ASSERTCLASS( this, "Bad counter object" );
+
+ // Increment the counter in a loop so we process
+ // each tick separately. This is easier than trying
+ // to cope with a range of increments.
+
+ while( ticks-- )
+ {
+ Cyg_Scheduler::lock();
+
+ // increment the counter, note that it is
+ // allowed to wrap.
+ counter += increment;
+
+ // now check for any expired alarms
+
+ Cyg_Alarm_List *alarm_list_ptr; // pointer to list
+
+#if defined(CYGIMP_KERNEL_COUNTERS_SINGLE_LIST)
+
+ alarm_list_ptr = &alarm_list;
+
+#elif defined(CYGIMP_KERNEL_COUNTERS_MULTI_LIST)
+
+ // With multiple lists, each one contains only the alarms
+ // that will expire at a given tick modulo the list number.
+ // So we only have a fraction of the alarms to check here.
+
+ alarm_list_ptr = &(alarm_list[
+ (counter/increment) % CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE ] );
+
+#else
+#error "No CYGIMP_KERNEL_COUNTERS_x_LIST config"
+#endif
+
+ // Now that we have the list pointer, we can use common code for
+ // both list organizations.
+
+#ifdef CYGIMP_KERNEL_COUNTERS_SORT_LIST
+
+ // With a sorted alarm list, we can simply pick alarms off the
+ // front of the list until we find one that is in the future.
+
+ while( !alarm_list_ptr->empty() )
+ {
+ Cyg_Alarm *alarm = alarm_list_ptr->get_head();
+
+ CYG_ASSERTCLASS(alarm, "Bad alarm in counter list" );
+
+ if( alarm->trigger <= counter )
+ {
+ // remove alarm from list
+ alarm_list_ptr->rem_head();
+
+ if( alarm->interval != 0 )
+ {
+ // The alarm has a retrigger interval.
+ // Reset the trigger time and requeue
+ // the alarm.
+ alarm->trigger += alarm->interval;
+ add_alarm( alarm );
+ }
+ else alarm->enabled = false;
+
+ CYG_INSTRUMENT_ALARM( CALL, this, alarm );
+
+ // call alarm function
+ alarm->alarm(alarm, alarm->data);
+
+ // all done, loop
+ }
+ else break;
+
+ }
+#else
+
+ // With unsorted lists we must scan the whole list for
+ // candidates. However, we must be careful here since it is
+ // possible for the function of one alarm to add or remove
+ // other alarms to/from this list. Having the list shift under
+ // our feet in this way could be disasterous. We solve this by
+ // restarting the scan from the beginning whenever we call an
+ // alarm function.
+
+ cyg_bool rescan = true;
+
+ while( rescan )
+ {
+ Cyg_DNode_T<Cyg_Alarm> *node = alarm_list_ptr->get_head();
+
+ rescan = false;
+
+ while( node != NULL )
+ {
+ Cyg_Alarm *alarm = CYG_CLASSFROMBASE( Cyg_Alarm, Cyg_DNode, node );
+ Cyg_DNode_T<Cyg_Alarm> *next = alarm->get_next();
+
+ CYG_ASSERTCLASS(alarm, "Bad alarm in counter list" );
+
+ if( alarm->trigger <= counter )
+ {
+ alarm_list_ptr->remove(alarm);
+
+ if( alarm->interval != 0 )
+ {
+ // The alarm has a retrigger interval.
+ // Reset the trigger time and requeue
+ // the alarm.
+ alarm->trigger += alarm->interval;
+ add_alarm( alarm );
+ }
+ else alarm->enabled = false;
+
+ CYG_INSTRUMENT_ALARM( CALL, this, alarm );
+
+ // Call alarm function
+ alarm->alarm(alarm, alarm->data);
+
+ rescan = true;
+
+ break;
+ }
+
+ // If the next node is the head of the list, then we have
+ // looped all the way around. The node == next test
+ // catches the case where we only had one element to start
+ // with.
+ if( next == alarm_list_ptr->get_head() || node == next )
+ node = NULL;
+ else
+ node = next;
+ }
+
+ }
+
+#endif
+ Cyg_Scheduler::unlock();
+
+ }
+
+}
+
+// -------------------------------------------------------------------------
+// Add an alarm to this counter
+
+void Cyg_Counter::add_alarm( Cyg_Alarm *alarm )
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERTCLASS( this, "Bad counter object" );
+ CYG_ASSERTCLASS( alarm, "Bad alarm passed" );
+ CYG_ASSERT( Cyg_Scheduler::get_sched_lock() > 0, "Scheduler not locked");
+
+ // set this now to allow an immediate handler call to manipulate
+ // this alarm sensibly.
+ alarm->enabled = true;
+
+ // Check here for an alarm that triggers now or in the past and
+ // call its alarm function immediately.
+ if( alarm->trigger <= counter )
+ {
+ CYG_INSTRUMENT_ALARM( CALL, this, alarm );
+
+ // call alarm function. Note that this is being
+ // called here before the add_alarm has returned.
+ // Note that this function may disable the alarm.
+
+ alarm->alarm(alarm, alarm->data);
+
+ // Note that this extra check on alarm->enabled is in case the
+ // handler function disables this alarm!
+ if( alarm->interval != 0 && alarm->enabled )
+ {
+ // The alarm has a retrigger interval.
+ // Reset the trigger interval and drop
+ // through to queue it.
+ alarm->trigger += alarm->interval;
+ // ensure the next alarm time is in our future, and in phase
+ // with the original time requested.
+ alarm->synchronize();
+ }
+ else
+ {
+ // The alarm is all done with, disable it
+ // unlock and return.
+ alarm->enabled = false;
+ return;
+ }
+ }
+
+ CYG_INSTRUMENT_ALARM( ADD, this, alarm );
+
+ // Find the pointer to the relevant list _after_ a retrigger
+ // alarm has been given its new trigger time.
+
+ Cyg_Alarm_List *alarm_list_ptr; // pointer to list
+
+#if defined(CYGIMP_KERNEL_COUNTERS_SINGLE_LIST)
+
+ alarm_list_ptr = &alarm_list;
+
+#elif defined(CYGIMP_KERNEL_COUNTERS_MULTI_LIST)
+
+ // Each alarm must go into the list that covers the tick that is
+ // going to happen _after_ the trigger time (or at it if trigger
+ // happens to fall on a tick.
+
+ alarm_list_ptr = &(alarm_list[
+ ((alarm->trigger+increment-1)/increment) %
+ CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE ] );
+
+#else
+#error "No CYGIMP_KERNEL_COUNTERS_x_LIST config"
+#endif
+
+#ifdef CYGIMP_KERNEL_COUNTERS_SORT_LIST
+
+ // Now that we have the list pointer, we can use common code for
+ // both list organizations.
+
+ Cyg_Alarm *list_alarm = alarm_list_ptr->get_head();
+
+ if( list_alarm != NULL )
+ {
+ do
+ {
+ CYG_ASSERTCLASS(list_alarm, "Bad alarm in counter list" );
+
+ // The alarms are in ascending trigger order. If we
+ // find an alarm that triggers later than us, we go
+ // in front of it.
+
+ if( list_alarm->trigger > alarm->trigger )
+ {
+ alarm_list_ptr->insert( list_alarm, alarm );
+ return;
+ }
+
+ list_alarm = list_alarm->get_next();
+
+ } while( list_alarm != alarm_list_ptr->get_head() );
+ // a lower or equal alarm time was not found, so drop through
+ // so it is added to the list tail
+ }
+#endif
+
+ alarm_list_ptr->add_tail( alarm );
+}
+
+// -------------------------------------------------------------------------
+// Remove an alarm from this counter
+
+void Cyg_Counter::rem_alarm( Cyg_Alarm *alarm )
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERTCLASS( this, "Bad counter object" );
+ CYG_ASSERTCLASS( alarm, "Bad alarm passed" );
+ CYG_ASSERT( Cyg_Scheduler::get_sched_lock() > 0, "Scheduler not locked");
+
+ Cyg_Alarm_List *alarm_list_ptr; // pointer to list
+
+#if defined(CYGIMP_KERNEL_COUNTERS_SINGLE_LIST)
+
+ alarm_list_ptr = &alarm_list;
+
+#elif defined(CYGIMP_KERNEL_COUNTERS_MULTI_LIST)
+
+ alarm_list_ptr = &(alarm_list[
+ ((alarm->trigger+increment-1)/increment) %
+ CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE ] );
+
+#else
+#error "No CYGIMP_KERNEL_COUNTERS_x_LIST config"
+#endif
+
+ // Now that we have the list pointer, we can use common code for
+ // both list organizations.
+
+ CYG_INSTRUMENT_ALARM( REM, this, alarm );
+
+ alarm_list_ptr->remove( alarm );
+
+ alarm->enabled = false;
+
+}
+
+//==========================================================================
+// Constructor for clock object
+
+Cyg_Clock::Cyg_Clock(
+ cyg_resolution res
+ )
+{
+ CYG_REPORT_FUNCTION();
+
+ resolution = res;
+}
+
+// -------------------------------------------------------------------------
+// Destructor for Clock objects
+
+Cyg_Clock::~Cyg_Clock()
+{
+ CYG_REPORT_FUNCTION();
+
+}
+
+// -------------------------------------------------------------------------
+//
+
+#ifdef CYGDBG_USE_ASSERTS
+
+cyg_bool Cyg_Clock::check_this( cyg_assert_class_zeal zeal) const
+{
+ // check that we have a non-NULL pointer first
+ if( this == NULL ) return false;
+
+ switch( zeal )
+ {
+ case cyg_system_test:
+ case cyg_extreme:
+ case cyg_thorough:
+ case cyg_quick:
+ case cyg_trivial:
+ case cyg_none:
+ default:
+ break;
+ };
+
+ return true;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+//
+// Clock Converters: split a rational into 4 factors to try to prevent
+// overflow whilst retaining reasonable accuracy.
+//
+// typically we get numbers like 1,000,000 for ns_per and
+// 100 and 1,000,000,000 for the dividend and divisor.
+// So we want answers like 1/10 and 10/1 out of these routines.
+
+static void construct_converter( Cyg_Clock::converter *pcc,
+ cyg_uint64 m1, cyg_uint64 d1,
+ cyg_uint64 m2, cyg_uint64 d2 )
+{
+ cyg_uint64 upper, lower;
+ unsigned int i;
+ static cyg_uint16 primes[] = {
+ 3,5,7,11,13,17,19,23,29,31,37,41,43,47,
+ 53,59,61,67,71,73,79,83,89,97,
+ 101,103,107,109,113,127,131,137,139,149,
+ 151,157,163,167,173,179,181,191,193,197,199,
+ 239, // for 1,111,111
+ 541, // for 10,101,011
+ 1667, // for 8,333,333
+ };
+
+ int rounding = 0;
+
+ // Here we assume that our workings will fit in a 64; the point is to
+ // allow calculations with a number of ticks that may be large.
+ upper = m1 * m2;
+ lower = d1 * d2;
+#ifdef CYGDBG_USE_ASSERTS
+ cyg_uint64 save_upper = upper;
+ cyg_uint64 save_lower = lower;
+#endif
+
+ retry_rounding:
+ // First strip out common powers of 2
+ while ( (0 == (1 & upper)) && ( 0 == (1 & lower)) ) {
+ upper >>= 1;
+ lower >>= 1;
+ }
+
+ // then common factors - use lazy table above
+ for ( i = 0 ; i < (sizeof( primes )/sizeof( primes[0] )); i++ ) {
+ cyg_uint64 j, k, p = (cyg_uint64)(primes[i]);
+ j = upper / p;
+ while ( j * p == upper ) {
+ k = lower / p;
+ if ( k * p != lower )
+ break;
+ upper = j;
+ lower = k;
+ j = upper / p;
+ }
+ }
+
+ m1 = upper;
+ d1 = lower;
+ m2 = 1;
+ d2 = 1;
+
+ if ( m1 > 0x10000 ) {
+ // only bother if there are more than 16 bits consumed here
+
+ // now move powers of 2 from d1 to d2
+ // keeping them the same order of magnitude
+ while ( (0 == (1 & d1)) && (d2 < d1) ) {
+ d1 >>= 1;
+ d2 <<= 1;
+ }
+
+ // and factors from the table - go too far, if anything
+ int cont = (d2 < d1);
+ for ( i = 0 ; cont && (i < (sizeof( primes )/sizeof( primes[0] ))); i++ ) {
+ cyg_uint64 k, p = (cyg_uint64)(primes[i]);
+ k = d1 / p;
+ while ( cont && ((k * p) == d1) ) {
+ // we can extract a prime
+ d1 = k;
+ d2 *= p;
+ k = d1 / p;
+ cont = (d2 < d1);
+ }
+ }
+
+ // move powers of 2 from m1 to m2 so long as we do not go less than d1
+ while ( (0 == (1 & m1)) && (m2 < m1) && (m1 > (d1 << 5)) ) {
+ m1 >>= 1;
+ m2 <<= 1;
+ if ( m1 < 0x10000 )
+ break;
+ }
+
+ // and factors from the table - ensure m1 stays well larger than d1
+ cont = ((m2 < m1) && (m1 > (d1 << 4)) && (m1 > 0x10000));
+ for ( i = 0 ; cont && (i < (sizeof( primes )/sizeof( primes[0] ))); i++ ) {
+ cyg_uint64 k, p = (cyg_uint64)(primes[i]);
+ k = m1 / p;
+ cont = cont && (k > (d1 << 4) && (k > 0x10000));
+ while ( cont && ((k * p) == m1) ) {
+ // we can extract a prime
+ m1 = k;
+ m2 *= p;
+ k = m1 / p; // examine k for getting too small
+ cont = ((m2 < m1) && (k > (d1 << 4)) && (k > 0x10000));
+ }
+ }
+
+ // if, after all that, m1 odd and unchanged, and too large,
+ // decrement it just the once and try again: then try it
+ // incremented once.
+ if ( (m1 & 1) && (m1 == upper) && (m1 > 0x10000) && (rounding < 2) ) {
+ CYG_ASSERT( 1 == m2, "m2 should be 1 to try rounding" );
+ m1--;
+ upper = m1;
+ rounding++;
+ goto retry_rounding;
+ }
+ // likewise for d1 - each of the pair can be odd only once each
+ if ( (d1 & 1) && (d1 == lower) && (d1 > 0x10000) && (rounding < 2) ) {
+ CYG_ASSERT( 1 == d2, "d2 should be 1 to try rounding" );
+ d1--;
+ lower = d1;
+ rounding++;
+ goto retry_rounding;
+ }
+ }
+
+ CYG_ASSERT( 0 != m1, "m1 zero" );
+ CYG_ASSERT( 0 != m2, "m2 zero" );
+ CYG_ASSERT( 0 != d1, "d1 zero" );
+ CYG_ASSERT( 0 != d2, "d2 zero" );
+ CYG_ASSERT( rounding || save_upper/save_lower == (m1 * m2)/(d1 * d2),
+ "Unequal in forwards direction" );
+ CYG_ASSERT( rounding || save_lower/save_upper == (d1 * d2)/(m1 * m2),
+ "Unequal in reverse direction" );
+
+ pcc->mul1 = m1;
+ pcc->div1 = d1;
+ pcc->mul2 = m2;
+ pcc->div2 = d2;
+}
+
+// other to clocks is (other * ns_per * dividend / divisor)
+void Cyg_Clock::get_other_to_clock_converter(
+ cyg_uint64 ns_per_other_tick,
+ struct converter *pcc )
+{
+ construct_converter( pcc,
+ ns_per_other_tick, 1,
+ resolution.divisor, resolution.dividend );
+}
+
+// clocks to other is (ticks * divisor / dividend / ns_per)
+void Cyg_Clock::get_clock_to_other_converter(
+ cyg_uint64 ns_per_other_tick,
+ struct converter *pcc )
+{
+ construct_converter( pcc,
+ 1, ns_per_other_tick,
+ resolution.dividend, resolution.divisor );
+}
+
+
+//==========================================================================
+// Constructor for alarm object
+
+Cyg_Alarm::Cyg_Alarm(
+ Cyg_Counter *c, // Attached to this counter
+ cyg_alarm_fn *a, // Call-back function
+ CYG_ADDRWORD d // Call-back data
+ )
+{
+ CYG_REPORT_FUNCTION();
+
+ counter = c;
+ alarm = a;
+ data = d;
+ trigger = 0;
+ interval = 0;
+ enabled = false;
+
+}
+
+Cyg_Alarm::Cyg_Alarm(){}
+
+// -------------------------------------------------------------------------
+// Destructor
+
+Cyg_Alarm::~Cyg_Alarm()
+{
+ CYG_REPORT_FUNCTION();
+
+ disable();
+}
+
+// -------------------------------------------------------------------------
+//
+
+#ifdef CYGDBG_USE_ASSERTS
+
+cyg_bool Cyg_Alarm::check_this( cyg_assert_class_zeal zeal) const
+{
+ // check that we have a non-NULL pointer first
+ if( this == NULL ) return false;
+
+ switch( zeal )
+ {
+ case cyg_system_test:
+ case cyg_extreme:
+ case cyg_thorough:
+ if( trigger != 0 && !enabled ) return false;
+ case cyg_quick:
+ case cyg_trivial:
+ case cyg_none:
+ default:
+ break;
+ };
+
+ return true;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// Initialize Alarm and enable
+
+void Cyg_Alarm::initialize(
+ cyg_tick_count t, // Absolute trigger time
+ cyg_tick_count i // Relative retrigger interval
+ )
+{
+ CYG_REPORT_FUNCTION();
+
+ Cyg_Scheduler::lock();
+
+ // If already enabled, remove from counter
+
+ if( enabled ) counter->rem_alarm(this);
+
+ CYG_INSTRUMENT_ALARM( INIT, this, 0 );
+ CYG_INSTRUMENT_ALARM( TRIGGER,
+ ((cyg_uint32 *)&t)[0],
+ ((cyg_uint32 *)&t)[1] );
+ CYG_INSTRUMENT_ALARM( INTERVAL,
+ ((cyg_uint32 *)&i)[0],
+ ((cyg_uint32 *)&i)[1] );
+
+ trigger = t;
+ interval = i;
+
+ counter->add_alarm(this);
+
+ Cyg_Scheduler::unlock();
+}
+
+// -------------------------------------------------------------------------
+// Synchronize with a past alarm stream that had been disabled,
+// bring past times into synch, and the like.
+
+void
+Cyg_Alarm::synchronize( void )
+{
+ if( interval != 0 ) {
+ // This expression sets the trigger to the next whole interval
+ // at or after the current time. This means that alarms will
+ // continue at the same intervals as if they had never been
+ // disabled. The alternative would be to just set trigger to
+ // (counter->counter + interval), but this is less satisfying
+ // than preserving the original intervals. That behaviour can
+ // always be obtained by using initialize() rather than
+ // enable(), while the current behaviour would be more
+ // difficult to achieve that way.
+ cyg_tick_count d;
+ d = counter->current_value() + interval - trigger;
+ if ( d > interval ) {
+ // then trigger was in the past, so resynchronize
+ trigger += interval * ((d - 1) / interval );
+ }
+ // otherwise, we were just set up, so no worries.
+ }
+}
+
+// -------------------------------------------------------------------------
+// Ensure alarm enabled
+
+void Cyg_Alarm::enable()
+{
+ Cyg_Scheduler::lock();
+
+ if( !enabled )
+ {
+ // ensure the alarm time is in our future:
+ synchronize();
+ enabled = true;
+ counter->add_alarm(this);
+ }
+
+ Cyg_Scheduler::unlock();
+}
+
+// -------------------------------------------------------------------------
+// Ensure alarm disabled
+
+void Cyg_Alarm::disable()
+{
+ Cyg_Scheduler::lock();
+
+ if( enabled ) counter->rem_alarm(this);
+
+ Cyg_Scheduler::unlock();
+}
+
+// -------------------------------------------------------------------------
+// Get the current time values from the alarm
+
+void Cyg_Alarm::get_times(
+ cyg_tick_count *t, // Next trigger time
+ cyg_tick_count *i // Current interval
+ )
+{
+ // Lock the scheduler while we do this to avoid
+ // race conditions.
+ Cyg_Scheduler::lock();
+
+ if( t != NULL ) *t = trigger;
+ if( i != NULL ) *i = interval;
+
+ Cyg_Scheduler::unlock();
+}
+
+//==========================================================================
+// System clock object
+
+#ifdef CYGVAR_KERNEL_COUNTERS_CLOCK
+
+class Cyg_RealTimeClock
+ : public Cyg_Clock
+{
+ Cyg_Interrupt interrupt;
+
+ static cyg_uint32 isr(cyg_vector vector, CYG_ADDRWORD data);
+
+ static void dsr(cyg_vector vector, cyg_ucount32 count, CYG_ADDRWORD data);
+
+ Cyg_RealTimeClock();
+
+ static Cyg_RealTimeClock rtc;
+};
+
+Cyg_Clock::cyg_resolution rtc_resolution = CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION;
+
+//Cyg_RealTimeClock Cyg_RealTimeClock::rtc __attribute__((init_priority (1)));
+
+Cyg_RealTimeClock Cyg_RealTimeClock::rtc CYG_INIT_PRIORITY( CLOCK );
+
+// -------------------------------------------------------------------------
+
+Cyg_RealTimeClock::Cyg_RealTimeClock()
+ : Cyg_Clock(rtc_resolution),
+ interrupt(CYGNUM_HAL_INTERRUPT_RTC,
+ CYGNUM_KERNEL_COUNTERS_CLOCK_ISR_PRIORITY,
+ (CYG_ADDRWORD)this, isr, dsr)
+{
+ CYG_REPORT_FUNCTION();
+
+ HAL_CLOCK_INITIALIZE( CYGNUM_KERNEL_COUNTERS_RTC_PERIOD );
+
+ interrupt.attach();
+
+ interrupt.unmask_interrupt(CYGNUM_HAL_INTERRUPT_RTC);
+
+ Cyg_Clock::real_time_clock = this;
+}
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY) && defined(HAL_CLOCK_LATENCY)
+cyg_tick_count total_clock_latency, total_clock_interrupts;
+cyg_int32 min_clock_latency = 0x7FFFFFFF;
+cyg_int32 max_clock_latency = 0;
+bool measure_clock_latency = false;
+#endif
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY)
+cyg_tick_count total_clock_dsr_latency, total_clock_dsr_calls;
+cyg_int32 min_clock_dsr_latency = 0x7FFFFFFF;
+cyg_int32 max_clock_dsr_latency = 0;
+cyg_uint32 clock_dsr_start = 0;
+#endif
+
+// -------------------------------------------------------------------------
+
+cyg_uint32 Cyg_RealTimeClock::isr(cyg_vector vector, CYG_ADDRWORD data)
+{
+// CYG_REPORT_FUNCTION();
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY) && defined(HAL_CLOCK_LATENCY)
+ if (measure_clock_latency) {
+ cyg_int32 delta;
+ HAL_CLOCK_LATENCY(&delta);
+ // Note: Ignore a latency of 0 when finding min_clock_latency.
+ if (delta > 0) {
+ // Valid delta measured
+ total_clock_latency += delta;
+ total_clock_interrupts++;
+ if (min_clock_latency > delta) min_clock_latency = delta;
+ if (max_clock_latency < delta) max_clock_latency = delta;
+ }
+ }
+#endif
+
+ CYG_INSTRUMENT_CLOCK( ISR, 0, 0);
+
+ HAL_CLOCK_RESET( CYGNUM_HAL_INTERRUPT_RTC, CYGNUM_KERNEL_COUNTERS_RTC_PERIOD );
+
+ Cyg_Interrupt::acknowledge_interrupt(CYGNUM_HAL_INTERRUPT_RTC);
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY)
+ HAL_CLOCK_READ(&clock_dsr_start);
+#endif
+ return Cyg_Interrupt::CALL_DSR|Cyg_Interrupt::HANDLED;
+}
+
+// -------------------------------------------------------------------------
+
+void Cyg_RealTimeClock::dsr(cyg_vector vector, cyg_ucount32 count, CYG_ADDRWORD data)
+{
+// CYG_REPORT_FUNCTION();
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY) && defined(HAL_CLOCK_LATENCY)
+ if (measure_clock_latency) {
+ cyg_int32 delta;
+ HAL_CLOCK_READ((cyg_uint32 *)&delta);
+ delta -= clock_dsr_start;
+ // Note: Ignore a latency of <= 0 when finding min_clock_latency.
+ if (delta > 0 ) {
+ // Valid delta measured
+ total_clock_dsr_latency += delta;
+ total_clock_dsr_calls++;
+ if (min_clock_dsr_latency > delta) min_clock_dsr_latency = delta;
+ if (max_clock_dsr_latency < delta) max_clock_dsr_latency = delta;
+ }
+ }
+#endif
+
+ Cyg_RealTimeClock *rtc = (Cyg_RealTimeClock *)data;
+
+ CYG_INSTRUMENT_CLOCK( TICK_START,
+ rtc->current_value_lo(),
+ rtc->current_value_hi());
+
+ rtc->tick( count );
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE
+#if 0 == CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES
+
+ // If timeslicing is enabled, call the scheduler to
+ // handle it. But not if we have unique priorities.
+
+ Cyg_Scheduler::scheduler.timeslice();
+
+#endif
+#endif
+
+ CYG_INSTRUMENT_CLOCK( TICK_END,
+ rtc->current_value_lo(),
+ rtc->current_value_hi());
+
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// EOF common/clock.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/common/except.cxx b/cesar/ecos/packages/kernel/current/src/common/except.cxx
new file mode 100644
index 0000000000..fac3847df8
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/common/except.cxx
@@ -0,0 +1,268 @@
+//==========================================================================
+//
+// common/except.cxx
+//
+// Exception handling implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg, jlarmour
+// Date: 1999-02-16
+// Purpose: Exception handling implementation
+// Description: This file contains the code that registers and delivers
+// exceptions.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/instrmnt.h> // instrumentation
+
+#include <cyg/kernel/except.hxx> // our header
+
+#include <cyg/hal/hal_arch.h> // architecture definitions
+#include <cyg/hal/hal_intr.h> // vector definitions
+
+#include <cyg/kernel/thread.hxx> // thread interface
+
+#include <cyg/kernel/thread.inl> // thread inlines
+
+#ifdef CYGPKG_KERNEL_EXCEPTIONS
+
+// -------------------------------------------------------------------------
+// Null exception handler. This is used to capture exceptions that are
+// not caught by user supplied handlers.
+
+void
+cyg_null_exception_handler(
+ CYG_ADDRWORD data, // user supplied data
+ cyg_code exception_number, // exception being raised
+ CYG_ADDRWORD exception_info // any exception specific info
+ )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG3("data=%08x, exception=%d, info=%08x", data,
+ exception_number, exception_info);
+ CYG_TRACE1( 1, "Uncaught exception: %d", exception_number);
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Exception Controller constructor.
+
+Cyg_Exception_Control::Cyg_Exception_Control()
+{
+ CYG_REPORT_FUNCTION();
+#ifdef CYGSEM_KERNEL_EXCEPTIONS_DECODE
+
+ for( int i = 0; i < CYGNUM_HAL_EXCEPTION_COUNT ; i++ )
+ exception_handler[i] = cyg_null_exception_handler,
+ exception_data[i] = 0;
+#else
+
+ exception_handler = cyg_null_exception_handler;
+ exception_data = 0;
+
+#endif
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Exception registation. Stores the handler function and data to be used
+// for handling the given exception number. Where exceptions are not decoded
+// only a single handler may be registered for all exceptions. This function
+// also returns the old values of the exception handler and data to allow
+// chaining to be implemented.
+
+void
+Cyg_Exception_Control::register_exception(
+ cyg_code exception_number, // exception number
+ cyg_exception_handler handler, // handler function
+ CYG_ADDRWORD data, // data argument
+ cyg_exception_handler **old_handler, // handler function
+ CYG_ADDRWORD *old_data // data argument
+ )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG5("exception=%d, handler func=%08x, data=%08x, "
+ "space for old handler=%08x,space for old data=%08x",
+ exception_number, handler, data, old_handler,
+ old_data);
+
+ CYG_ASSERT( exception_number <= CYGNUM_HAL_EXCEPTION_MAX,
+ "Out of range exception number");
+ CYG_ASSERT( exception_number >= CYGNUM_HAL_EXCEPTION_MIN,
+ "Out of range exception number");
+
+
+ // Should we complain if there is already a registered
+ // handler, or should we just replace is silently?
+
+#ifdef CYGSEM_KERNEL_EXCEPTIONS_DECODE
+
+ if( old_handler != NULL )
+ *old_handler = exception_handler[exception_number -
+ CYGNUM_HAL_EXCEPTION_MIN];
+ if( old_data != NULL )
+ *old_data = exception_data[exception_number -
+ CYGNUM_HAL_EXCEPTION_MIN];
+ exception_handler[exception_number - CYGNUM_HAL_EXCEPTION_MIN] = handler;
+ exception_data[exception_number - CYGNUM_HAL_EXCEPTION_MIN] = data;
+
+#else
+
+ if( old_handler != NULL )
+ *old_handler = exception_handler;
+ if( old_data != NULL )
+ *old_data = exception_data;
+ exception_handler = handler;
+ exception_data = data;
+
+#endif
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Exception deregistation. Revert the handler for the exception number
+// to the default.
+
+void
+Cyg_Exception_Control::deregister_exception(
+ cyg_code exception_number // exception number
+ )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("exception number=%d", exception_number);
+
+ CYG_ASSERT( exception_number <= CYGNUM_HAL_EXCEPTION_MAX,
+ "Out of range exception number");
+ CYG_ASSERT( exception_number >= CYGNUM_HAL_EXCEPTION_MIN,
+ "Out of range exception number");
+
+#ifdef CYGSEM_KERNEL_EXCEPTIONS_DECODE
+
+ exception_handler[exception_number - CYGNUM_HAL_EXCEPTION_MIN] =
+ cyg_null_exception_handler;
+ exception_data[exception_number - CYGNUM_HAL_EXCEPTION_MIN] = 0;
+
+#else
+
+ exception_handler = cyg_null_exception_handler;
+ exception_data = 0;
+
+#endif
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Exception delivery. Call the appropriate exception handler.
+
+void
+Cyg_Exception_Control::deliver_exception(
+ cyg_code exception_number, // exception being raised
+ CYG_ADDRWORD exception_info // exception specific info
+ )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG2("exception number=%d, exception info=%08x",
+ exception_number, exception_info);
+
+ cyg_exception_handler *handler = NULL;
+ CYG_ADDRWORD data = 0;
+
+ CYG_ASSERT( exception_number <= CYGNUM_HAL_EXCEPTION_MAX,
+ "Out of range exception number");
+ CYG_ASSERT( exception_number >= CYGNUM_HAL_EXCEPTION_MIN,
+ "Out of range exception number");
+
+#ifdef CYGSEM_KERNEL_EXCEPTIONS_DECODE
+
+ handler = exception_handler[exception_number - CYGNUM_HAL_EXCEPTION_MIN];
+ data = exception_data[exception_number - CYGNUM_HAL_EXCEPTION_MIN];
+
+#else
+
+ handler = exception_handler;
+ data = exception_data;
+
+#endif
+
+ // The handler will always be a callable function: either the user's
+ // registered function or the null handler. So it is always safe to
+ // just go ahead and call it.
+
+ handler( data, exception_number, exception_info );
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Exception delivery function called from the HAL as a result of a
+// hardware exception being raised.
+
+externC void
+cyg_hal_deliver_exception( CYG_WORD code, CYG_ADDRWORD data )
+{
+ CYG_REPORT_FUNCTION();
+ Cyg_Thread::self()->deliver_exception( (cyg_code)code, data );
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Where exceptions are global, there is a single static instance of the
+// exception control object. Define it here.
+
+#ifdef CYGSEM_KERNEL_EXCEPTIONS_GLOBAL
+
+Cyg_Exception_Control Cyg_Thread::exception_control
+ CYG_INIT_PRIORITY(INTERRUPTS);
+
+#endif
+
+// -------------------------------------------------------------------------
+
+#endif // ifdef CYGPKG_KERNEL_EXCEPTIONS
+
+// -------------------------------------------------------------------------
+// EOF common/except.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/common/kapi.cxx b/cesar/ecos/packages/kernel/current/src/common/kapi.cxx
new file mode 100644
index 0000000000..3801e94912
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/common/kapi.cxx
@@ -0,0 +1,1264 @@
+//==========================================================================
+//
+// common/kapi.cxx
+//
+// C API Implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Nick Garnett
+// Copyright (C) 2003 Jonathan Larmour
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg, dsm
+// Contributors: nickg
+// Date: 1998-03-02
+// Purpose: C API Implementation
+// Description: C++ implementation of the C API
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/instrmnt.h> // instrumentation
+#include <cyg/kernel/diag.h>
+
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/thread.inl> // thread inlines
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/intr.hxx>
+#include <cyg/kernel/clock.hxx>
+
+#include <cyg/kernel/sema.hxx>
+#include <cyg/kernel/flag.hxx>
+#include <cyg/kernel/mutex.hxx>
+#include <cyg/kernel/mbox.hxx>
+
+#include <cyg/kernel/sched.inl> // scheduler inlines
+#include <cyg/kernel/clock.inl> // clock inlines
+
+#include <cyg/kernel/kapi.h> // C API
+
+// -------------------------------------------------------------------------
+// Magic new function
+
+inline void *operator new(size_t size, void *ptr)
+{
+ CYG_CHECK_DATA_PTR( ptr, "Bad pointer" );
+ return ptr;
+}
+
+// -------------------------------------------------------------------------
+
+#ifdef CYGDBG_USE_ASSERTS
+
+#define CYG_ASSERT_SIZES(cstruct, cxxstruct) \
+CYG_MACRO_START \
+ char *msg = "Size of C struct " #cstruct \
+ " != size of C++ struct " #cxxstruct ; \
+ CYG_ASSERT( sizeof(cstruct) == sizeof(cxxstruct) , msg ); \
+CYG_MACRO_END
+
+#else
+
+#define CYG_ASSERT_SIZES(cstruct, cxxstruct)
+
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Scheduler operations */
+
+/* Starts scheduler with created threads. Never returns. */
+externC void cyg_scheduler_start(void) __THROW
+{
+ Cyg_Scheduler::start();
+}
+
+/* Lock the scheduler. */
+externC void cyg_scheduler_lock(void) __THROW
+{
+ Cyg_Scheduler::lock();
+ // get_sched_lock() is unsigned, see below "cyg_ucount32 lock"
+ CYG_ASSERT( (0xff000000 & (Cyg_Scheduler::get_sched_lock())) == 0,
+ "Scheduler overlocked" );
+}
+
+/* Lock the scheduler, but never more than level=1. */
+externC void cyg_scheduler_safe_lock(void) __THROW
+{
+ Cyg_Scheduler::lock();
+ cyg_ucount32 slock = Cyg_Scheduler::get_sched_lock();
+ if (slock > 1)
+ Cyg_Scheduler::unlock();
+ // get_sched_lock() is unsigned, see below "cyg_ucount32 lock"
+ CYG_ASSERT( (0xff000000 & (Cyg_Scheduler::get_sched_lock())) == 0,
+ "Scheduler overlocked" );
+}
+
+/* Unlock the scheduler. */
+externC void cyg_scheduler_unlock(void) __THROW
+{
+ cyg_ucount32 slock = Cyg_Scheduler::get_sched_lock();
+ CYG_ASSERT( 0 < slock, "Scheduler not locked" );
+ // And program defensively too:
+ if ( 0 < slock )
+ Cyg_Scheduler::unlock();
+}
+
+/* Read the scheduler lock value. */
+externC cyg_ucount32 cyg_scheduler_read_lock(void) __THROW
+{
+ cyg_ucount32 slock = Cyg_Scheduler::get_sched_lock();
+ return slock;
+}
+
+/*---------------------------------------------------------------------------*/
+/* Thread operations */
+
+externC void cyg_thread_create(
+ cyg_addrword_t sched_info, /* scheduling info (eg pri) */
+ cyg_thread_entry_t *entry, /* entry point function */
+ cyg_addrword_t entry_data, /* entry data */
+ char *name, /* optional thread name */
+ void *stack_base, /* stack base, NULL = alloc */
+ cyg_ucount32 stack_size, /* stack size, 0 = default */
+ cyg_handle_t *handle, /* returned thread handle */
+ cyg_thread *thread /* put thread here */
+) __THROW
+{
+ CYG_ASSERT_SIZES( cyg_thread, Cyg_Thread );
+
+ Cyg_Thread *t = new((void *)thread) Cyg_Thread (
+ (CYG_ADDRWORD) sched_info,
+ (cyg_thread_entry *)entry,
+ (CYG_ADDRWORD) entry_data,
+ name,
+ (CYG_ADDRWORD) stack_base,
+ stack_size
+ );
+ t=t;
+
+ CYG_CHECK_DATA_PTR( handle, "Bad handle pointer" );
+ *handle = (cyg_handle_t)thread;
+}
+
+externC void cyg_thread_exit() __THROW
+{
+ Cyg_Thread::exit();
+}
+
+externC cyg_bool_t cyg_thread_delete( cyg_handle_t thread ) __THROW
+{
+ Cyg_Thread *th = (Cyg_Thread *)thread;
+ if( th->get_state() != Cyg_Thread::EXITED )
+ th->kill(); // encourage it to terminate
+ if( th->get_state() != Cyg_Thread::EXITED )
+ return false; // it didn't run yet, leave it up to the app to fix
+ th->~Cyg_Thread();
+ return true;
+}
+
+externC void cyg_thread_suspend(cyg_handle_t thread) __THROW
+{
+ ((Cyg_Thread *)thread)->suspend();
+}
+
+externC void cyg_thread_resume(cyg_handle_t thread) __THROW
+{
+ Cyg_Thread *th = (Cyg_Thread *)thread;
+
+ // If we are resuming an exited thread then
+ // reinitialize it.
+
+ if( th->get_state() == Cyg_Thread::EXITED )
+ th->reinitialize();
+
+ th->resume();
+}
+
+externC void cyg_thread_kill( cyg_handle_t thread) __THROW
+{
+ ((Cyg_Thread *)thread)->kill();
+}
+
+externC void cyg_thread_release( cyg_handle_t thread) __THROW
+{
+ ((Cyg_Thread *)thread)->release();
+}
+
+externC void cyg_thread_yield() __THROW
+{
+ Cyg_Thread::yield();
+}
+
+externC cyg_handle_t cyg_thread_self() __THROW
+{
+ return (cyg_handle_t)Cyg_Thread::self();
+}
+
+externC cyg_uint16 cyg_thread_get_id( cyg_handle_t thread) __THROW
+{
+ return ((Cyg_Thread *)thread)->get_unique_id();
+}
+
+// idle thread is not really a plain CygThread; danger.
+externC cyg_handle_t cyg_thread_idle_thread() __THROW
+{
+ extern Cyg_Thread idle_thread;
+ return (cyg_handle_t)&idle_thread;
+}
+
+/* Priority manipulation */
+externC void cyg_thread_set_priority(
+ cyg_handle_t thread, cyg_priority_t priority ) __THROW
+{
+#ifdef CYGIMP_THREAD_PRIORITY
+ ((Cyg_Thread *)thread)->set_priority(priority);
+#endif
+}
+
+
+/* Get the normal priority, ie without any applied mutex inheritance or
+ * ceiling protocol. */
+externC cyg_priority_t cyg_thread_get_priority(cyg_handle_t thread) __THROW
+{
+#ifdef CYGIMP_THREAD_PRIORITY
+ return ((Cyg_Thread *)thread)->get_priority();
+#else
+ return 0;
+#endif
+}
+
+
+/* Get the current priority, ie any applied mutex inheritance or
+ * ceiling protocol. */
+externC cyg_priority_t cyg_thread_get_current_priority(cyg_handle_t thread) __THROW
+{
+#ifdef CYGIMP_THREAD_PRIORITY
+ return ((Cyg_Thread *)thread)->get_current_priority();
+#else
+ return 0;
+#endif
+}
+
+/* Deadline scheduling control (optional) */
+
+externC void cyg_thread_deadline_wait(
+ cyg_tick_count_t start_time, /* abs earliest start time */
+ cyg_tick_count_t run_time, /* worst case execution time */
+ cyg_tick_count_t deadline /* absolute deadline */
+) __THROW
+{
+ CYG_ASSERT(0,"Not implemented");
+}
+
+externC void cyg_thread_delay(cyg_tick_count_t delay) __THROW
+{
+ Cyg_Thread::self()->delay(delay);
+}
+
+/* Stack information */
+externC cyg_addrword_t cyg_thread_get_stack_base(cyg_handle_t thread) __THROW
+{
+ return ((Cyg_Thread *)thread)->get_stack_base();
+}
+
+externC cyg_uint32 cyg_thread_get_stack_size(cyg_handle_t thread) __THROW
+{
+ return ((Cyg_Thread *)thread)->get_stack_size();
+}
+
+#ifdef CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT
+externC cyg_uint32 cyg_thread_measure_stack_usage(cyg_handle_t thread) __THROW
+{
+ return ((Cyg_Thread *)thread)->measure_stack_usage();
+}
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Thread enumeration and information */
+
+#ifdef CYGVAR_KERNEL_THREADS_LIST
+
+cyg_bool_t cyg_thread_get_next( cyg_handle_t *current, cyg_uint16 *id ) __THROW
+{
+ cyg_bool_t result = true;
+
+ // There is a minute but finite chance that the thread could have
+ // exitted since the previous cyg_thread_get_next() call, and we can't
+ // detect the ID mismatch further down. So be quite zealous with checking.
+
+ CYG_CHECK_DATA_PTRC( current );
+ CYG_CHECK_DATA_PTRC( id );
+ if ( *current != 0 )
+ CYG_CHECK_DATA_PTRC( *current );
+
+ Cyg_Scheduler::lock();
+
+ Cyg_Thread *thread = (Cyg_Thread *)*current;
+ CYG_ASSERT_ZERO_OR_CLASSC( thread );
+ if( *current == 0 )
+ {
+ thread = Cyg_Thread::get_list_head();
+ *current = (cyg_handle_t)thread;
+ *id = thread->get_unique_id();
+ }
+ else if( (thread->get_unique_id() == *id) &&
+ (thread = thread->get_list_next()) != NULL )
+ {
+ CYG_CHECK_DATA_PTRC( thread );
+ CYG_ASSERT_CLASSC( thread );
+ *current = (cyg_handle_t)thread;
+ *id = thread->get_unique_id();
+ }
+ else
+ {
+ *current = 0;
+ *id = 0;
+ result = false;
+ }
+
+ Cyg_Scheduler::unlock();
+
+ return result;
+}
+
+cyg_handle_t cyg_thread_find( cyg_uint16 id ) __THROW
+{
+ Cyg_Scheduler::lock();
+
+ Cyg_Thread *thread = Cyg_Thread::get_list_head();
+
+ while( thread != NULL )
+ {
+ if( thread->get_unique_id() == id )
+ break;
+
+ thread = thread->get_list_next();
+ }
+
+ Cyg_Scheduler::unlock();
+
+ return (cyg_handle_t)thread;
+}
+
+#endif
+
+cyg_bool_t cyg_thread_get_info( cyg_handle_t threadh,
+ cyg_uint16 id,
+ cyg_thread_info *info ) __THROW
+{
+ cyg_bool_t result = true;
+ Cyg_Thread *thread = (Cyg_Thread *)threadh;
+ CYG_CHECK_DATA_PTRC( thread );
+ if ( NULL != info )
+ CYG_CHECK_DATA_PTRC( info );
+
+ Cyg_Scheduler::lock();
+
+ if( thread->get_unique_id() == id && info != NULL )
+ {
+ CYG_ASSERT_CLASSC( thread );
+ info->handle = threadh;
+ info->id = id;
+ info->state = thread->get_state();
+#ifdef CYGVAR_KERNEL_THREADS_NAME
+ info->name = thread->get_name();
+#else
+ info->name = NULL;
+#endif
+ info->set_pri = thread->get_priority();
+ info->cur_pri = thread->get_current_priority();
+ info->stack_base = thread->get_stack_base();
+ info->stack_size = thread->get_stack_size();
+
+#ifdef CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT
+ info->stack_used = thread->measure_stack_usage();
+#else
+ info->stack_used = 0;
+#endif
+ }
+ else result = false;
+
+ Cyg_Scheduler::unlock();
+
+ return result;
+}
+
+/*---------------------------------------------------------------------------*/
+/* Per-thread data */
+
+#ifdef CYGVAR_KERNEL_THREADS_DATA
+
+externC cyg_ucount32 cyg_thread_new_data_index() __THROW
+{
+ Cyg_Thread::cyg_data_index index = Cyg_Thread::new_data_index();
+ CYG_ASSERT(index >= 0, "failed to allocate data index" );
+ return index;
+}
+
+externC void cyg_thread_free_data_index(cyg_ucount32 index) __THROW
+{
+ Cyg_Thread::free_data_index(index);
+}
+
+externC CYG_ADDRWORD cyg_thread_get_data(cyg_ucount32 index) __THROW
+{
+ return Cyg_Thread::get_data(index);
+}
+
+externC CYG_ADDRWORD *cyg_thread_get_data_ptr(cyg_ucount32 index) __THROW
+{
+ return Cyg_Thread::get_data_ptr(index);
+}
+
+externC void cyg_thread_set_data(cyg_ucount32 index, CYG_ADDRWORD
+data) __THROW
+{
+ Cyg_Thread::self()->set_data(index, data);
+}
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Thread destructors */
+
+#ifdef CYGPKG_KERNEL_THREADS_DESTRUCTORS
+__externC cyg_bool_t
+cyg_thread_add_destructor( cyg_thread_destructor_fn fn,
+ cyg_addrword_t data ) __THROW
+{
+ return Cyg_Thread::self()->add_destructor( fn, data );
+}
+
+__externC cyg_bool_t
+cyg_thread_rem_destructor( cyg_thread_destructor_fn fn,
+ cyg_addrword_t data ) __THROW
+{
+ return Cyg_Thread::self()->rem_destructor( fn, data );
+}
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Exception handling. */
+
+#ifdef CYGPKG_KERNEL_EXCEPTIONS
+externC void cyg_exception_set_handler(
+ cyg_code_t exception_number,
+ cyg_exception_handler_t *new_handler,
+ cyg_addrword_t new_data,
+ cyg_exception_handler_t **old_handler,
+ cyg_addrword_t *old_data
+) __THROW
+{
+ Cyg_Thread::register_exception(
+ exception_number,
+ (cyg_exception_handler *)new_handler,
+ (CYG_ADDRWORD)new_data,
+ (cyg_exception_handler **)old_handler,
+ (CYG_ADDRWORD *)old_data
+ );
+}
+
+/* Clear exception handler to default */
+externC void cyg_exception_clear_handler(
+ cyg_code_t exception_number
+) __THROW
+{
+ Cyg_Thread::deregister_exception( exception_number );
+}
+
+/* Invoke exception handler */
+externC void cyg_exception_call_handler(
+ cyg_handle_t thread,
+ cyg_code_t exception_number,
+ cyg_addrword_t error_code
+) __THROW
+{
+ Cyg_Thread *t = (Cyg_Thread *)thread;
+
+ t->deliver_exception( exception_number, error_code );
+}
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Interrupt handling */
+
+externC void cyg_interrupt_create(
+ cyg_vector_t vector, /* Vector to attach to */
+ cyg_priority_t priority, /* Queue priority */
+ cyg_addrword_t data, /* Data pointer */
+ cyg_ISR_t *isr, /* Interrupt Service Routine */
+ cyg_DSR_t *dsr, /* Deferred Service Routine */
+ cyg_handle_t *handle, /* returned handle */
+ cyg_interrupt *intr /* put interrupt here */
+) __THROW
+{
+ CYG_ASSERT_SIZES( cyg_interrupt, Cyg_Interrupt );
+
+ Cyg_Interrupt *t = new((void *)intr) Cyg_Interrupt (
+ (cyg_vector)vector,
+ (cyg_priority)priority,
+ (CYG_ADDRWORD)data,
+ (cyg_ISR *)isr,
+ (cyg_DSR *)dsr );
+ t=t;
+
+ CYG_CHECK_DATA_PTR( handle, "Bad handle pointer" );
+ *handle = (cyg_handle_t)intr;
+}
+
+externC void cyg_interrupt_delete( cyg_handle_t interrupt) __THROW
+{
+ ((Cyg_Interrupt *)interrupt)->~Cyg_Interrupt();
+}
+
+void cyg_interrupt_attach( cyg_handle_t interrupt ) __THROW
+{
+ ((Cyg_Interrupt *)interrupt)->attach();
+}
+
+void cyg_interrupt_detach( cyg_handle_t interrupt ) __THROW
+{
+ ((Cyg_Interrupt *)interrupt)->detach();
+}
+
+/* VSR manipulation */
+
+externC void cyg_interrupt_get_vsr(
+ cyg_vector_t vector, /* vector to get */
+ cyg_VSR_t **vsr /* vsr got */
+) __THROW
+{
+ Cyg_Interrupt::get_vsr( (cyg_vector)vector, (cyg_VSR **)vsr);
+}
+
+externC void cyg_interrupt_set_vsr(
+ cyg_vector_t vector, /* vector to set */
+ cyg_VSR_t *vsr /* vsr to set */
+) __THROW
+{
+ Cyg_Interrupt::set_vsr( (cyg_vector)vector, (cyg_VSR *)vsr);
+}
+
+/* CPU level interrupt mask */
+externC void cyg_interrupt_disable() __THROW
+{
+ Cyg_Interrupt::disable_interrupts();
+}
+
+externC void cyg_interrupt_enable() __THROW
+{
+ Cyg_Interrupt::enable_interrupts();
+}
+
+/* Interrupt controller access */
+externC void cyg_interrupt_mask(cyg_vector_t vector) __THROW
+{
+ Cyg_Interrupt::mask_interrupt( (cyg_vector)vector);
+}
+
+externC void cyg_interrupt_mask_intunsafe(cyg_vector_t vector) __THROW
+{
+ Cyg_Interrupt::mask_interrupt_intunsafe( (cyg_vector)vector);
+}
+
+externC void cyg_interrupt_unmask(cyg_vector_t vector) __THROW
+{
+ Cyg_Interrupt::unmask_interrupt( (cyg_vector)vector);
+}
+
+externC void cyg_interrupt_unmask_intunsafe(cyg_vector_t vector) __THROW
+{
+ Cyg_Interrupt::unmask_interrupt_intunsafe( (cyg_vector)vector);
+}
+
+externC void cyg_interrupt_acknowledge(cyg_vector_t vector) __THROW
+{
+ Cyg_Interrupt::acknowledge_interrupt( (cyg_vector)vector);
+}
+
+
+externC void cyg_interrupt_configure(
+ cyg_vector_t vector, /* vector to configure */
+ cyg_bool_t level, /* level or edge triggered */
+ cyg_bool_t up /* rising/faling edge, high/low level*/
+) __THROW
+{
+ Cyg_Interrupt::configure_interrupt( (cyg_vector)vector, level, up );
+}
+
+externC void cyg_interrupt_set_cpu(
+ cyg_vector_t vector, /* vector to control */
+ cyg_cpu_t cpu /* CPU to set */
+) __THROW
+{
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+ Cyg_Interrupt::set_cpu( vector, cpu );
+#endif
+}
+
+externC cyg_cpu_t cyg_interrupt_get_cpu(
+ cyg_vector_t vector /* vector to control */
+) __THROW
+{
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+ return Cyg_Interrupt::get_cpu( vector );
+#else
+ return CYG_KERNEL_CPU_THIS();
+#endif
+
+}
+
+/*---------------------------------------------------------------------------*/
+/* Counters, Clocks and Alarms */
+
+externC void cyg_counter_create(
+ cyg_handle_t *handle, /* returned counter handle */
+ cyg_counter *counter /* put counter here */
+) __THROW
+{
+ CYG_ASSERT_SIZES( cyg_counter, Cyg_Counter );
+
+ Cyg_Counter *t = new((void *)counter) Cyg_Counter ();
+ t=t;
+
+ CYG_CHECK_DATA_PTR( handle, "Bad handle pointer" );
+ *handle = (cyg_handle_t)counter;
+}
+
+externC void cyg_counter_delete(cyg_handle_t counter) __THROW
+{
+ ((Cyg_Counter *)counter)->~Cyg_Counter();
+}
+
+/* Return current value of counter */
+externC cyg_tick_count_t cyg_counter_current_value(cyg_handle_t counter) __THROW
+{
+ return ((Cyg_Counter *)counter)->current_value();
+}
+
+/* Set new current value */
+externC void cyg_counter_set_value(
+ cyg_handle_t counter,
+ cyg_tick_count_t new_value
+) __THROW
+{
+ ((Cyg_Counter *)counter)->set_value( new_value );
+}
+
+/* Advance counter by one tick */
+externC void cyg_counter_tick(cyg_handle_t counter) __THROW
+{
+ ((Cyg_Counter *)counter)->tick();
+}
+
+/* Advance counter by multiple ticks */
+externC void cyg_counter_multi_tick(cyg_handle_t counter, cyg_tick_count_t ticks) __THROW
+{
+ ((Cyg_Counter *)counter)->tick(ticks);
+}
+
+/* Create a clock object */
+externC void cyg_clock_create(
+ cyg_resolution_t resolution, /* Initial resolution */
+ cyg_handle_t *handle, /* Returned clock handle */
+ cyg_clock *clock /* put clock here */
+) __THROW
+{
+ CYG_ASSERT_SIZES( cyg_clock, Cyg_Clock );
+
+ Cyg_Clock::cyg_resolution res;
+
+ res.dividend = resolution.dividend;
+ res.divisor = resolution.divisor;
+
+ Cyg_Clock *t = new((void *)clock) Cyg_Clock ( res );
+ t=t;
+
+ CYG_CHECK_DATA_PTR( handle, "Bad handle pointer" );
+ *handle = (cyg_handle_t)clock;
+}
+
+externC void cyg_clock_delete(cyg_handle_t clock) __THROW
+{
+ ((Cyg_Clock *)clock)->~Cyg_Clock();
+}
+
+/* convert a clock handle to a counter handle so we can use the */
+/* counter API on it. */
+externC void cyg_clock_to_counter(
+ cyg_handle_t clock,
+ cyg_handle_t *counter
+) __THROW
+{
+ CYG_CHECK_DATA_PTR( counter, "Bad counter handle pointer" );
+ *counter = (cyg_handle_t)(Cyg_Counter *)clock;
+}
+
+externC void cyg_clock_set_resolution(
+ cyg_handle_t clock,
+ cyg_resolution_t resolution /* New resolution */
+) __THROW
+{
+ Cyg_Clock::cyg_resolution res;
+
+ res.dividend = resolution.dividend;
+ res.divisor = resolution.divisor;
+
+ ((Cyg_Clock *)clock)->set_resolution( res );
+}
+
+externC cyg_resolution_t cyg_clock_get_resolution(cyg_handle_t clock) __THROW
+{
+ Cyg_Clock::cyg_resolution res =
+ ((Cyg_Clock *)clock)->get_resolution();
+
+ cyg_resolution_t resolution;
+
+ resolution.dividend = res.dividend;
+ resolution.divisor = res.divisor;
+
+ return resolution;
+}
+
+#ifdef CYGVAR_KERNEL_COUNTERS_CLOCK
+externC cyg_handle_t cyg_real_time_clock(void) __THROW
+{
+ return (cyg_handle_t)Cyg_Clock::real_time_clock;
+}
+
+externC cyg_tick_count_t cyg_current_time(void) __THROW
+{
+ return Cyg_Clock::real_time_clock->current_value();
+}
+#endif
+
+externC void cyg_alarm_create(
+ cyg_handle_t counter, /* Attached to this counter */
+ cyg_alarm_t *alarmfn, /* Call-back function */
+ cyg_addrword_t data, /* Call-back data */
+ cyg_handle_t *handle, /* Returned alarm object */
+ cyg_alarm *alarm /* put alarm here */
+) __THROW
+{
+ CYG_ASSERT_SIZES( cyg_alarm, Cyg_Alarm );
+
+ Cyg_Alarm *t = new((void *)alarm) Cyg_Alarm (
+ (Cyg_Counter *)counter,
+ (cyg_alarm_fn *)alarmfn,
+ (CYG_ADDRWORD)data
+ );
+ t=t;
+
+ CYG_CHECK_DATA_PTR( handle, "Bad handle pointer" );
+ *handle = (cyg_handle_t)alarm;
+}
+
+/* Disable alarm, detach from counter and invalidate handles */
+externC void cyg_alarm_delete( cyg_handle_t alarm) __THROW
+{
+ ((Cyg_Alarm *)alarm)->~Cyg_Alarm();
+}
+
+externC void cyg_alarm_initialize(
+ cyg_handle_t alarm,
+ cyg_tick_count_t trigger, /* Absolute trigger time */
+ cyg_tick_count_t interval /* Relative retrigger interval */
+) __THROW
+{
+ ((Cyg_Alarm *)alarm)->initialize(
+ (cyg_tick_count)trigger,
+ (cyg_tick_count)interval);
+}
+
+externC void cyg_alarm_get_times(
+ cyg_handle_t alarm,
+ cyg_tick_count_t *trigger, /* Next trigger time */
+ cyg_tick_count_t *interval /* Current interval */
+) __THROW
+{
+ ((Cyg_Alarm *)alarm)->get_times(
+ (cyg_tick_count*)trigger,
+ (cyg_tick_count*)interval);
+}
+
+externC void cyg_alarm_enable( cyg_handle_t alarm ) __THROW
+{
+ ((Cyg_Alarm *)alarm)->enable();
+}
+
+externC void cyg_alarm_disable( cyg_handle_t alarm ) __THROW
+{
+ ((Cyg_Alarm *)alarm)->disable();
+}
+
+/*---------------------------------------------------------------------------*/
+/* Mail boxes */
+
+externC void cyg_mbox_create(
+ cyg_handle_t *handle,
+ cyg_mbox *mbox
+) __THROW
+{
+ CYG_ASSERT_SIZES( cyg_mbox, Cyg_Mbox );
+
+ Cyg_Mbox *t = new((void *)mbox) Cyg_Mbox();
+ t=t;
+
+ CYG_CHECK_DATA_PTR( handle, "Bad handle pointer" );
+ *handle = (cyg_handle_t)mbox;
+}
+
+externC void cyg_mbox_delete(cyg_handle_t mbox) __THROW
+{
+ ((Cyg_Mbox *)mbox)->~Cyg_Mbox();
+}
+
+externC void *cyg_mbox_get(cyg_handle_t mbox) __THROW
+{
+ return ((Cyg_Mbox *)mbox)->get();
+}
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+void *cyg_mbox_timed_get(
+ cyg_handle_t mbox,
+ cyg_tick_count_t abstime
+ ) __THROW
+{
+ return ((Cyg_Mbox *)mbox)->get(abstime);
+}
+#endif
+
+externC void *cyg_mbox_tryget(cyg_handle_t mbox) __THROW
+{
+ return ((Cyg_Mbox *)mbox)->tryget();
+}
+
+externC void *cyg_mbox_peek_item(cyg_handle_t mbox) __THROW
+{
+ return ((Cyg_Mbox *)mbox)->peek_item();
+}
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+externC cyg_bool_t cyg_mbox_put(cyg_handle_t mbox, void *item) __THROW
+{
+ return ((Cyg_Mbox *)mbox)->put(item);
+}
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+externC cyg_bool_t cyg_mbox_timed_put(
+ cyg_handle_t mbox,
+ void *item,
+ cyg_tick_count_t abstime
+ ) __THROW
+{
+ return ((Cyg_Mbox *)mbox)->put(item, abstime);
+}
+#endif
+#endif
+
+externC cyg_bool_t cyg_mbox_tryput(cyg_handle_t mbox, void *item) __THROW
+{
+ return ((Cyg_Mbox *)mbox)->tryput(item);
+}
+
+externC cyg_count32 cyg_mbox_peek(cyg_handle_t mbox) __THROW
+{
+ return ((Cyg_Mbox *)mbox)->peek();
+}
+
+externC cyg_bool_t cyg_mbox_waiting_to_get(cyg_handle_t mbox) __THROW
+{
+ return ((Cyg_Mbox *)mbox)->waiting_to_get();
+}
+
+externC cyg_bool_t cyg_mbox_waiting_to_put(cyg_handle_t mbox) __THROW
+{
+ return ((Cyg_Mbox *)mbox)->waiting_to_put();
+}
+
+
+/*---------------------------------------------------------------------------*/
+/* Semaphores */
+
+externC void cyg_semaphore_init(
+ cyg_sem_t *sem, /* Semaphore to init */
+ cyg_count32 val /* Initial semaphore value */
+) __THROW
+{
+ CYG_ASSERT_SIZES( cyg_sem_t, Cyg_Counting_Semaphore );
+
+ Cyg_Counting_Semaphore *t = new((void *)sem) Cyg_Counting_Semaphore(val);
+ t=t;
+}
+
+externC void cyg_semaphore_destroy( cyg_sem_t *sem ) __THROW
+{
+ ((Cyg_Counting_Semaphore *)sem)->~Cyg_Counting_Semaphore();
+}
+
+externC cyg_bool_t cyg_semaphore_wait( cyg_sem_t *sem ) __THROW
+{
+ return ((Cyg_Counting_Semaphore *)sem)->wait();
+}
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+externC cyg_bool_t cyg_semaphore_timed_wait(
+ cyg_sem_t *sem,
+ cyg_tick_count_t abstime
+ ) __THROW
+{
+ return ((Cyg_Counting_Semaphore *)sem)->wait(abstime);
+}
+#endif
+
+
+externC int cyg_semaphore_trywait( cyg_sem_t *sem ) __THROW
+{
+ return ((Cyg_Counting_Semaphore *)sem)->trywait();
+}
+
+externC void cyg_semaphore_post( cyg_sem_t *sem ) __THROW
+{
+ ((Cyg_Counting_Semaphore *)sem)->post();
+}
+
+externC void cyg_semaphore_peek( cyg_sem_t *sem, cyg_count32 *val ) __THROW
+{
+ CYG_CHECK_DATA_PTR( val, "Bad val parameter" );
+
+ *val = ((Cyg_Counting_Semaphore *)sem)->peek();
+}
+
+
+/*---------------------------------------------------------------------------*/
+/* Flags */
+
+void cyg_flag_init(
+ cyg_flag_t *flag /* Flag to init */
+) __THROW
+{
+ CYG_ASSERT_SIZES( cyg_flag_t, Cyg_Flag );
+ CYG_ASSERT(
+ ( Cyg_Flag::AND == CYG_FLAG_WAITMODE_AND ) &&
+ ( Cyg_Flag::OR == CYG_FLAG_WAITMODE_OR ) &&
+ ( Cyg_Flag::CLR == CYG_FLAG_WAITMODE_CLR ),
+ "CYG_FLAG_WAITMODE_xxx definition != C++ Cyg_Flag::xxx" );
+
+ Cyg_Flag *t = new((void *)flag) Cyg_Flag();
+ t=t;
+}
+
+void cyg_flag_destroy( cyg_flag_t *flag ) __THROW
+{
+ ((Cyg_Flag *)flag)->~Cyg_Flag();
+}
+
+void cyg_flag_setbits( cyg_flag_t *flag, cyg_flag_value_t value) __THROW
+{
+ ((Cyg_Flag *)flag)->setbits( value );
+}
+
+void cyg_flag_maskbits( cyg_flag_t *flag, cyg_flag_value_t value) __THROW
+{
+ ((Cyg_Flag *)flag)->maskbits( value );
+}
+
+cyg_flag_value_t cyg_flag_wait( cyg_flag_t *flag,
+ cyg_flag_value_t pattern,
+ cyg_flag_mode_t mode ) __THROW
+{
+ if ( 0 == pattern || 0 != (mode & ~3) )
+ return 0;
+ return ((Cyg_Flag *)flag)->wait( pattern, mode );
+
+}
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+cyg_flag_value_t cyg_flag_timed_wait( cyg_flag_t *flag,
+ cyg_flag_value_t pattern,
+ cyg_flag_mode_t mode,
+ cyg_tick_count_t abstime ) __THROW
+{
+ if ( 0 == pattern || 0 != (mode & ~3) )
+ return 0;
+ return ((Cyg_Flag *)flag)->wait( pattern, mode, abstime );
+
+}
+#endif
+
+cyg_flag_value_t cyg_flag_poll( cyg_flag_t *flag,
+ cyg_flag_value_t pattern,
+ cyg_flag_mode_t mode ) __THROW
+{
+ if ( 0 == pattern || 0 != (mode & ~3) )
+ return 0;
+ return ((Cyg_Flag *)flag)->poll( pattern, mode );
+
+}
+
+cyg_flag_value_t cyg_flag_peek( cyg_flag_t *flag ) __THROW
+{
+ return ((Cyg_Flag *)flag)->peek();
+}
+
+cyg_bool_t cyg_flag_waiting( cyg_flag_t *flag ) __THROW
+{
+ return ((Cyg_Flag *)flag)->waiting();
+}
+
+/*---------------------------------------------------------------------------*/
+/* Mutex */
+
+externC void cyg_mutex_init(
+ cyg_mutex_t *mutex /* Mutex to init */
+) __THROW
+{
+ CYG_ASSERT_SIZES( cyg_mutex_t, Cyg_Mutex );
+
+ Cyg_Mutex *m = new((void *)mutex) Cyg_Mutex;
+
+ m=m;
+}
+
+externC void cyg_mutex_destroy( cyg_mutex_t *mutex ) __THROW
+{
+ ((Cyg_Mutex *)mutex)->~Cyg_Mutex();
+}
+
+externC cyg_bool_t cyg_mutex_lock( cyg_mutex_t *mutex ) __THROW
+{
+ return ((Cyg_Mutex *)mutex)->lock();
+}
+
+externC cyg_bool_t cyg_mutex_trylock( cyg_mutex_t *mutex ) __THROW
+{
+ return ((Cyg_Mutex *)mutex)->trylock();
+}
+
+externC void cyg_mutex_unlock( cyg_mutex_t *mutex ) __THROW
+{
+ ((Cyg_Mutex *)mutex)->unlock();
+}
+
+externC void cyg_mutex_release( cyg_mutex_t *mutex ) __THROW
+{
+ ((Cyg_Mutex *)mutex)->release();
+}
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+externC void cyg_mutex_set_ceiling(
+ cyg_mutex_t *mutex,
+ cyg_priority_t priority ) __THROW
+{
+ ((Cyg_Mutex *)mutex)->set_ceiling(priority);
+}
+#endif
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+externC void cyg_mutex_set_protocol(
+ cyg_mutex_t *mutex,
+ enum cyg_mutex_protocol protocol ) __THROW
+{
+ ((Cyg_Mutex *)mutex)->set_protocol((Cyg_Mutex::cyg_protcol)protocol);
+}
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Condition Variables */
+
+externC void cyg_cond_init(
+ cyg_cond_t *cond, /* condition variable to init */
+ cyg_mutex_t *mutex /* associated mutex */
+) __THROW
+{
+ CYG_ASSERT_SIZES( cyg_cond_t, Cyg_Condition_Variable );
+
+ Cyg_Condition_Variable *t = new((void *)cond) Cyg_Condition_Variable(
+ *(Cyg_Mutex *)mutex);
+ t=t;
+}
+
+externC void cyg_cond_destroy( cyg_cond_t *cond ) __THROW
+{
+ ((Cyg_Condition_Variable *)cond)->~Cyg_Condition_Variable();
+}
+
+externC cyg_bool_t cyg_cond_wait( cyg_cond_t *cond ) __THROW
+{
+ return ((Cyg_Condition_Variable *)cond)->wait();
+}
+
+externC void cyg_cond_signal( cyg_cond_t *cond ) __THROW
+{
+ ((Cyg_Condition_Variable *)cond)->signal();
+}
+
+externC void cyg_cond_broadcast( cyg_cond_t *cond ) __THROW
+{
+ ((Cyg_Condition_Variable *)cond)->broadcast();
+}
+
+#ifdef CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT
+externC cyg_bool_t cyg_cond_timed_wait(
+ cyg_cond_t *cond,
+ cyg_tick_count_t abstime
+ ) __THROW
+{
+ return ((Cyg_Condition_Variable *)cond)->wait(abstime);
+}
+
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Spinlocks */
+
+externC void cyg_spinlock_init(
+ cyg_spinlock_t *lock, /* spinlock to initialize */
+ cyg_bool_t locked /* init locked or unlocked */
+) __THROW
+{
+ CYG_ASSERT_SIZES( cyg_spinlock_t, Cyg_SpinLock );
+
+ // Create the spinlock in cleared state
+ Cyg_SpinLock *t = new((void *)lock) Cyg_SpinLock();
+
+ // If the lock is to start locked, then lock it now.
+ if( locked )
+ t->spin();
+}
+
+externC void cyg_spinlock_destroy( cyg_spinlock_t *lock ) __THROW
+{
+ ((Cyg_SpinLock *)lock)->~Cyg_SpinLock();
+}
+
+externC void cyg_spinlock_spin( cyg_spinlock_t *lock ) __THROW
+{
+ ((Cyg_SpinLock *)lock)->spin();
+}
+
+externC void cyg_spinlock_clear( cyg_spinlock_t *lock ) __THROW
+{
+ ((Cyg_SpinLock *)lock)->clear();
+}
+
+externC cyg_bool_t cyg_spinlock_try( cyg_spinlock_t *lock ) __THROW
+{
+ return ((Cyg_SpinLock *)lock)->trylock();
+}
+
+externC cyg_bool_t cyg_spinlock_test( cyg_spinlock_t *lock ) __THROW
+{
+ return ((Cyg_SpinLock *)lock)->test();
+}
+
+externC void cyg_spinlock_spin_intsave( cyg_spinlock_t *lock,
+ cyg_addrword_t *istate ) __THROW
+{
+ ((Cyg_SpinLock *)lock)->spin_intsave((CYG_INTERRUPT_STATE *)istate);
+}
+
+externC void cyg_spinlock_clear_intsave( cyg_spinlock_t *lock,
+ cyg_addrword_t istate ) __THROW
+{
+ ((Cyg_SpinLock *)lock)->clear_intsave((CYG_INTERRUPT_STATE)istate);
+}
+
+
+// -------------------------------------------------------------------------
+// Check structure sizes.
+// This class and constructor get run automatically in debug versions
+// of the kernel and check that the structures configured in the C
+// code are the same size as the C++ classes they should match.
+
+#ifdef CYGPKG_INFRA_DEBUG
+
+class Cyg_Check_Structure_Sizes
+{
+ int dummy;
+public:
+ Cyg_Check_Structure_Sizes( int x ) __THROW;
+
+};
+
+#define CYG_CHECK_SIZES(cstruct, cxxstruct) \
+if( sizeof(cstruct) != sizeof(cxxstruct) ) \
+{ \
+ char *fmt = "Size of C struct " #cstruct \
+ " != size of C++ struct " #cxxstruct ; \
+ CYG_TRACE2(1, fmt, sizeof(cstruct) , sizeof(cxxstruct) ); \
+ fail = true; \
+ fmt = fmt; \
+}
+
+Cyg_Check_Structure_Sizes::Cyg_Check_Structure_Sizes(int x) __THROW
+{
+ cyg_bool fail = false;
+
+ dummy = x+1;
+
+ CYG_CHECK_SIZES( cyg_thread, Cyg_Thread );
+ CYG_CHECK_SIZES( cyg_interrupt, Cyg_Interrupt );
+ CYG_CHECK_SIZES( cyg_counter, Cyg_Counter );
+ CYG_CHECK_SIZES( cyg_clock, Cyg_Clock );
+ CYG_CHECK_SIZES( cyg_alarm, Cyg_Alarm );
+ CYG_CHECK_SIZES( cyg_mbox, Cyg_Mbox );
+ CYG_CHECK_SIZES( cyg_sem_t, Cyg_Counting_Semaphore );
+ CYG_CHECK_SIZES( cyg_flag_t, Cyg_Flag );
+ CYG_CHECK_SIZES( cyg_mutex_t, Cyg_Mutex );
+ CYG_CHECK_SIZES( cyg_cond_t, Cyg_Condition_Variable );
+ CYG_CHECK_SIZES( cyg_spinlock_t, Cyg_SpinLock );
+
+ CYG_ASSERT( !fail, "Size checks failed");
+}
+
+static Cyg_Check_Structure_Sizes cyg_kapi_check_structure_sizes(1);
+
+#endif
+
+
+// -------------------------------------------------------------------------
+
+#endif
+// EOF common/kapi.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/common/thread.cxx b/cesar/ecos/packages/kernel/current/src/common/thread.cxx
new file mode 100644
index 0000000000..7888c66307
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/common/thread.cxx
@@ -0,0 +1,1299 @@
+//==========================================================================
+//
+// common/thread.cxx
+//
+// Thread class implementations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-15
+// Purpose: Thread class implementation
+// Description: This file contains the definitions of the thread class
+// member functions that are common to all thread implementations.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h> // kernel configuration file
+
+#include <cyg/hal/hal_arch.h> // HAL_REORDER_BARRIER &
+ // CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/instrmnt.h> // instrumentation
+
+#include <cyg/kernel/thread.hxx> // our header
+
+#include <cyg/kernel/intr.hxx> // Interrupt support
+
+#include <cyg/kernel/thread.inl> // thread inlines
+#include <cyg/kernel/sched.inl> // scheduler inlines
+#include <cyg/kernel/clock.inl> // clock inlines
+
+#ifdef CYGDBG_KERNEL_THREADS_STACK_MEASUREMENT_VERBOSE_EXIT
+#include <cyg/infra/diag.h>
+#endif
+
+// =========================================================================
+// Cyg_HardwareThread members
+
+// -------------------------------------------------------------------------
+// Thread entry point.
+// This is inserted as the PC value in all initial thread contexts.
+// It does some housekeeping and then calls the real entry point.
+
+void
+Cyg_HardwareThread::thread_entry( Cyg_Thread *thread )
+{
+ CYG_REPORT_FUNCTION();
+
+ Cyg_Scheduler::scheduler.clear_need_reschedule(); // finished rescheduling
+ Cyg_Scheduler::scheduler.set_current_thread(thread); // restore current thread pointer
+
+ CYG_INSTRUMENT_THREAD(ENTER,thread,0);
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE
+ // Reset the timeslice counter so that this thread gets a full
+ // quantum.
+ Cyg_Scheduler::reset_timeslice_count();
+#endif
+
+ // Zero the lock
+ HAL_REORDER_BARRIER (); // Prevent the compiler from moving
+ Cyg_Scheduler::zero_sched_lock(); // the assignment into the code above.
+ HAL_REORDER_BARRIER();
+
+ // Call entry point in a loop.
+
+ for(;;)
+ {
+ thread->entry_point(thread->entry_data);
+ thread->exit();
+ }
+}
+
+// =========================================================================
+// Cyg_Thread members
+
+// -------------------------------------------------------------------------
+// Statics and thread list functions
+
+#ifdef CYGVAR_KERNEL_THREADS_LIST
+
+// List of all extant threads
+Cyg_Thread *Cyg_Thread::thread_list = 0;
+
+inline void
+Cyg_Thread::add_to_list( void )
+{
+ // Add thread to housekeeping list
+ Cyg_Scheduler::lock();
+
+ if( thread_list == 0 )
+ list_next = this;
+ else {
+ Cyg_Thread *prev = thread_list;
+ do {
+ if ( this == prev )
+ break; // found it already!
+ prev = prev->list_next;
+ } while ( prev != thread_list );
+ if ( this != prev ) {
+ // insert it in the list:
+ list_next = thread_list->list_next;
+ thread_list->list_next = this;
+ }
+ }
+ thread_list = this;
+
+ Cyg_Scheduler::unlock();
+}
+
+inline void
+Cyg_Thread::remove_from_list( void )
+{
+ // remove thread from housekeeping list
+ Cyg_Scheduler::lock();
+
+ Cyg_Thread *prev = thread_list;
+
+ do {
+ if( prev->list_next == this ) {
+ prev->list_next = list_next;
+ if( thread_list == this )
+ thread_list = list_next;
+ break;
+ }
+ prev = prev->list_next;
+ } while ( prev != thread_list );
+
+ Cyg_Scheduler::unlock();
+}
+
+#endif
+
+static cyg_uint16 next_unique_id = 1;
+
+// -------------------------------------------------------------------------
+// Magic new operator to allow the thread constructor to be
+// recalled.
+
+inline void *
+operator new(size_t size, Cyg_Thread *ptr)
+{ return (void *)ptr; };
+
+// Constructor
+
+Cyg_Thread::Cyg_Thread(
+ CYG_ADDRWORD sched_info, // Scheduling parameter(s)
+ cyg_thread_entry *entry, // entry point function
+ CYG_ADDRWORD entry_data, // entry data
+ char *name_arg, // thread name cookie
+ CYG_ADDRESS stack_base, // stack base, NULL = allocate
+ cyg_ucount32 stack_size // stack size, 0 = use default
+ )
+: Cyg_HardwareThread(entry, entry_data, stack_size, stack_base),
+ Cyg_SchedThread(this, sched_info)
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ ,timer(this)
+#endif
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_INSTRUMENT_THREAD(CREATE,this,0);
+
+ // Start the thread in suspended state.
+ state = SUSPENDED;
+ suspend_count = 1;
+ wakeup_count = 0;
+
+ // Initialize sleep_reason which is used by kill, release
+ sleep_reason = NONE;
+ wake_reason = NONE;
+
+ // Assign a 16 bit id to the thread.
+ unique_id = next_unique_id++;
+
+#ifdef CYGVAR_KERNEL_THREADS_DATA
+ // Zero all per-thread data entries.
+ for( int i = 0; i < CYGNUM_KERNEL_THREADS_DATA_MAX; i++ )
+ thread_data[i] = 0;
+#endif
+#ifdef CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD
+ for (int j=0; j<CYGNUM_KERNEL_THREADS_DESTRUCTORS; j++) {
+ destructors[j].fn = NULL;
+ }
+#endif
+#ifdef CYGVAR_KERNEL_THREADS_NAME
+ name = name_arg;
+#endif
+#ifdef CYGVAR_KERNEL_THREADS_LIST
+ // Add thread to housekeeping list
+ add_to_list();
+#endif
+
+ Cyg_Scheduler::scheduler.register_thread(this);
+
+ init_context(this);
+
+ CYG_REPORT_RETURN();
+}
+
+
+// -------------------------------------------------------------------------
+// Re-initialize this thread.
+// We do this by re-invoking the constructor with the original
+// arguments, which are still available in the object.
+
+void
+Cyg_Thread::reinitialize()
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERTCLASS( this, "Bad thread");
+ CYG_ASSERT( this != Cyg_Scheduler::get_current_thread(),
+ "Attempt to reinitialize current thread");
+ CYG_ASSERT( get_current_queue() == NULL , "Thread is still on a queue");
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ // Clear the timeout. It is irrelevant whether there was
+ // actually a timeout pending.
+ timer.disable();
+#endif
+
+ // Ensure the scheduler has let go of us.
+ Cyg_Scheduler::scheduler.deregister_thread(this);
+
+ cyg_priority pri = get_priority();
+#ifdef CYGVAR_KERNEL_THREADS_NAME
+ char * name_arg = name;
+#else
+ char * name_arg = NULL;
+#endif
+
+ new(this) Cyg_Thread( pri,
+ entry_point, entry_data,
+ name_arg,
+ get_stack_base(), get_stack_size() );
+ // the constructor re-registers the thread with the scheduler.
+
+ CYG_ASSERTCLASS( this, "Thread corrupted by reinitialize");
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Destructor.
+
+Cyg_Thread::~Cyg_Thread()
+{
+ CYG_REPORT_FUNCTION();
+
+ Cyg_Scheduler::scheduler.deregister_thread(this);
+
+#ifdef CYGVAR_KERNEL_THREADS_LIST
+ // Remove thread from housekeeping list.
+ remove_from_list();
+#endif
+
+ // Zero the unique_id to render this thread inconsistent.
+ unique_id = 0;
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Thread consistency checker.
+
+#ifdef CYGDBG_USE_ASSERTS
+
+cyg_bool
+Cyg_Thread::check_this( cyg_assert_class_zeal zeal) const
+{
+// CYG_REPORT_FUNCTION();
+
+ // check that we have a non-NULL pointer first
+ if( this == NULL ) return false;
+
+ switch( zeal )
+ {
+ case cyg_system_test:
+ case cyg_extreme:
+ case cyg_thorough:
+ if( (state & SUSPENDED) && (suspend_count == 0) ) return false;
+ case cyg_quick:
+ // Check that the stackpointer is within its limits.
+ // Note: This does not check the current stackpointer value
+ // of the executing thread.
+ if( (stack_ptr > (stack_base + stack_size)) ||
+ (stack_ptr < stack_base) ) return false;
+#ifdef CYGFUN_KERNEL_THREADS_STACK_LIMIT
+ if( stack_ptr < stack_limit ) return false;
+#endif
+ case cyg_trivial:
+ case cyg_none:
+ default:
+ break;
+ };
+
+ return true;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// Put the thread to sleep.
+// This can only be called by the current thread on itself, hence
+// it is a static function.
+
+void
+Cyg_Thread::sleep()
+{
+ CYG_REPORT_FUNCTION();
+
+ Cyg_Thread *current = Cyg_Scheduler::get_current_thread();
+
+ CYG_ASSERTCLASS( current, "Bad current thread" );
+
+ CYG_INSTRUMENT_THREAD(SLEEP,current,0);
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ // If running, remove from run qs
+ if ( current->state == RUNNING )
+ Cyg_Scheduler::scheduler.rem_thread(current);
+
+ // Set the state
+ current->state |= SLEEPING;
+
+ // Unlock the scheduler and switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Awaken the thread from sleep.
+
+void
+Cyg_Thread::wake()
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_INSTRUMENT_THREAD(WAKE,this,Cyg_Scheduler::current_thread);
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ if( 0 != (state & SLEEPSET) )
+ {
+ // Set the state
+ state &= ~SLEEPSET;
+
+ // remove from any queue we were on
+ remove();
+
+ // If the thread is now runnable, return it to run queue
+ if( state == RUNNING )
+ Cyg_Scheduler::scheduler.add_thread(this);
+
+ }
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Put the thread to sleep, with wakeup count.
+// This can only be called by the current thread on itself, hence
+// it is a static function.
+
+void
+Cyg_Thread::counted_sleep()
+{
+ CYG_REPORT_FUNCTION();
+
+ Cyg_Thread *current = Cyg_Scheduler::get_current_thread();
+
+ CYG_ASSERTCLASS( current, "Bad current thread" );
+
+ CYG_INSTRUMENT_THREAD(SLEEP,current,0);
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ if ( 0 == current->wakeup_count ) {
+ set_sleep_reason( Cyg_Thread::WAIT );
+ current->sleep(); // prepare to sleep
+ current->state |= COUNTSLEEP; // Set the state
+ }
+ else
+ // there is a queued wakeup, do not sleep
+ current->wakeup_count--;
+
+ // Unlock the scheduler and switch threads
+ Cyg_Scheduler::unlock();
+
+ // and deal with anything we must do when we return
+ switch( current->wake_reason ) {
+ case DESTRUCT:
+ case EXIT:
+ current->exit();
+ break;
+
+ default:
+ break;
+ }
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Put the thread to sleep for a delay, with wakeup count.
+// This can only be called by the current thread on itself, hence
+// it is a static function.
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+void
+Cyg_Thread::counted_sleep( cyg_tick_count delay )
+{
+ CYG_REPORT_FUNCTION();
+
+ Cyg_Thread *current = Cyg_Scheduler::get_current_thread();
+
+ CYG_ASSERTCLASS( current, "Bad current thread" );
+
+ CYG_INSTRUMENT_THREAD(SLEEP,current,0);
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ if ( 0 == current->wakeup_count ) {
+
+ // Set the timer (once outside any waiting loop.)
+ set_timer( Cyg_Clock::real_time_clock->current_value()+delay,
+ Cyg_Thread::TIMEOUT );
+
+ // If the timeout is in the past, the wake reason will have been
+ // set to something other than NONE already.
+
+ if( current->get_wake_reason() == Cyg_Thread::NONE )
+ {
+ set_sleep_reason( Cyg_Thread::TIMEOUT );
+ current->sleep(); // prepare to sleep
+ current->state |= COUNTSLEEP; // Set the state
+
+ Cyg_Scheduler::reschedule();
+
+ // clear the timer; if it actually fired, no worries.
+ clear_timer();
+ }
+ }
+ else
+ // there is a queued wakeup, do not sleep
+ current->wakeup_count--;
+
+ // Unlock the scheduler and switch threads
+ Cyg_Scheduler::unlock();
+
+ // and deal with anything we must do when we return
+ switch( current->wake_reason ) {
+ case DESTRUCT:
+ case EXIT:
+ current->exit();
+ break;
+
+ default:
+ break;
+ }
+
+ CYG_REPORT_RETURN();
+}
+#endif
+
+// -------------------------------------------------------------------------
+// Awaken the thread from sleep.
+
+void
+Cyg_Thread::counted_wake()
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_INSTRUMENT_THREAD(WAKE,this,Cyg_Scheduler::current_thread);
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ if ( 0 == (state & COUNTSLEEP) ) // already awake, or waiting:
+ wakeup_count++; // not in a counted sleep anyway.
+ else {
+ sleep_reason = NONE;
+ wake_reason = DONE;
+ wake(); // and awaken the thread
+ }
+
+#ifdef CYGNUM_KERNEL_MAX_COUNTED_WAKE_COUNT_ASSERT
+ CYG_ASSERT( CYGNUM_KERNEL_MAX_COUNTED_WAKE_COUNT_ASSERT > wakeup_count,
+ "wakeup_count overflow" );
+#endif
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Cancel wakeups for this thread and return how many were pending
+cyg_uint32
+Cyg_Thread::cancel_counted_wake()
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_INSTRUMENT_THREAD(WAKE,this,Cyg_Scheduler::current_thread);
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ cyg_uint32 result = wakeup_count;
+ wakeup_count = 0;
+
+ // Unlock the scheduler
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETVAL( result );
+ return result;
+}
+
+// -------------------------------------------------------------------------
+// Suspend thread. Increment suspend count and deschedule thread
+// if still running.
+
+void
+Cyg_Thread::suspend()
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_INSTRUMENT_THREAD(SUSPEND,this,Cyg_Scheduler::current_thread);
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ suspend_count++;
+
+#ifdef CYGNUM_KERNEL_MAX_SUSPEND_COUNT_ASSERT
+ CYG_ASSERT( CYGNUM_KERNEL_MAX_SUSPEND_COUNT_ASSERT > suspend_count,
+ "suspend_count overflow" );
+#endif
+
+ // If running, remove from run qs
+ if( state == RUNNING )
+ Cyg_Scheduler::scheduler.rem_thread(this);
+
+ // Set the state
+ state |= SUSPENDED;
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Resume thread. Decrement suspend count and reschedule if it
+// is zero.
+
+void
+Cyg_Thread::resume()
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_INSTRUMENT_THREAD(RESUME,this,Cyg_Scheduler::current_thread);
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ // If we are about to zero the count, clear the state bit and
+ // reschedule the thread if possible.
+
+ if( suspend_count == 1 )
+ {
+ suspend_count = 0;
+
+ CYG_ASSERT( (state & SUSPENDED) != 0, "SUSPENDED bit not set" );
+
+ // Set the state
+ state &= ~SUSPENDED;
+
+ // Return thread to scheduler if runnable
+ if( state == RUNNING )
+ Cyg_Scheduler::scheduler.add_thread(this);
+ }
+ else
+ if( suspend_count > 0 )
+ suspend_count--;
+ // else ignore attempt to resume
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Forced Resume thread. Zero suspend count and reschedule...
+
+void
+Cyg_Thread::force_resume()
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_INSTRUMENT_THREAD(RESUME,this,Cyg_Scheduler::current_thread);
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ // If we are about to zero the count, clear the state bit and
+ // reschedule the thread if possible.
+
+ if ( 0 < suspend_count ) {
+ suspend_count = 0;
+
+ CYG_ASSERT( (state & SUSPENDED) != 0, "SUSPENDED bit not set" );
+
+ // Set the state
+ state &= ~SUSPENDED;
+
+ // Return thread to scheduler if runnable
+ if( state == RUNNING )
+ Cyg_Scheduler::scheduler.add_thread(this);
+ }
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Force thread to wake up from a sleep with a wake_reason of
+// BREAK. It is the responsibility of the woken thread to detect
+// the release() and do the right thing.
+
+void
+Cyg_Thread::release()
+{
+ CYG_REPORT_FUNCTION();
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ // If the thread is in any of the sleep states, set the
+ // wake reason and wake it up.
+
+ switch( sleep_reason )
+ {
+
+ case NONE:
+ // The thread is not sleeping for any reason, do nothing.
+ // drop through...
+
+ case DESTRUCT:
+ case BREAK:
+ case EXIT:
+ case DONE:
+ // Do nothing in any of these cases. They are here to
+ // keep the compiler happy.
+
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETURN();
+ return;
+
+ case WAIT:
+ // The thread was waiting for some sync object to do
+ // something.
+ // drop through...
+
+ case TIMEOUT:
+ // The thread was waiting on a sync object with a timeout.
+ // drop through...
+
+ case DELAY:
+ // The thread was simply delaying, unless it has been
+ // woken up for some other reason, wake it now.
+ sleep_reason = NONE;
+ wake_reason = BREAK;
+ break;
+ }
+
+ wake();
+
+ // Allow preemption
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Exit thread. This puts the thread into EXITED state.
+
+#ifdef CYGPKG_KERNEL_THREADS_DESTRUCTORS
+#ifndef CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD
+Cyg_Thread::Cyg_Destructor_Entry
+Cyg_Thread::destructors[ CYGNUM_KERNEL_THREADS_DESTRUCTORS ];
+#endif
+#endif
+
+void
+Cyg_Thread::exit()
+{
+ CYG_REPORT_FUNCTION();
+
+ // The thread should never return from this function.
+
+ Cyg_Thread *self = Cyg_Thread::self();
+
+#ifdef CYGPKG_KERNEL_THREADS_DESTRUCTORS
+ cyg_ucount16 i;
+ for (i=0; i<CYGNUM_KERNEL_THREADS_DESTRUCTORS; i++) {
+ if (NULL != self->destructors[i].fn) {
+ destructor_fn fn = self->destructors[i].fn;
+ CYG_ADDRWORD data = self->destructors[i].data;
+ fn(data);
+ }
+ }
+#endif
+#ifdef CYGDBG_KERNEL_THREADS_STACK_MEASUREMENT_VERBOSE_EXIT
+ diag_printf( "Stack usage for thread %08x: %d\n", self,
+ self->measure_stack_usage() );
+#endif
+
+ Cyg_Scheduler::lock();
+
+ // clear the timer; if there was none, no worries.
+ clear_timer();
+
+ // It is possible that we have already been killed by another
+ // thread, in which case we do not want to try and take ourself
+ // out of the scheduler again.
+ if( self->state != EXITED )
+ {
+ self->state = EXITED;
+
+ Cyg_Scheduler::scheduler.rem_thread(self);
+ }
+
+ Cyg_Scheduler::reschedule();
+}
+
+// -------------------------------------------------------------------------
+// Kill thread. Force the thread into EXITED state externally, or
+// make it wake up and call exit().
+
+void
+Cyg_Thread::kill()
+{
+ CYG_REPORT_FUNCTION();
+ // If this is called by the current thread on itself,
+ // just call exit(), which is what he should have done
+ // in the first place.
+ if( this == Cyg_Scheduler::get_current_thread() )
+ exit();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ // We are killing someone else. Find out what state he is
+ // in and force him to wakeup and call exit().
+
+ force_resume(); // this is necessary for when
+ // he is asleep AND suspended.
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ timer.disable(); // and make sure the timer
+ // does not persist.
+#endif
+
+ if ( EXIT != wake_reason ) switch( sleep_reason ) {
+ // Only do any of this if the thread is not in pending death already:
+
+ case NONE:
+ // The thread is not sleeping for any reason, it must be
+ // on a run queue.
+ // We can safely deschedule and set its state.
+ if( state == RUNNING ) Cyg_Scheduler::scheduler.rem_thread(this);
+ state = EXITED;
+ break;
+
+ case DESTRUCT:
+ case BREAK:
+ case EXIT:
+ case DONE:
+ // Do nothing in any of these cases. They are here to
+ // keep the compiler happy.
+
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETURN();
+ return;
+
+ case WAIT:
+ // The thread was waiting for some sync object to do
+ // something.
+ // drop through...
+
+ case TIMEOUT:
+ // The thread was waiting on a sync object with a timeout.
+ // drop through...
+
+ case DELAY:
+ // The thread was simply delaying, unless it has been
+ // woken up for some other reason, wake it now.
+ sleep_reason = NONE;
+ wake_reason = EXIT;
+ break;
+ }
+
+ wake();
+
+ // Allow preemption
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Set thread priority
+
+#ifdef CYGIMP_THREAD_PRIORITY
+
+void
+Cyg_Thread::set_priority( cyg_priority new_priority )
+{
+ CYG_REPORT_FUNCTION();
+
+// CYG_ASSERT( new_priority >= CYG_THREAD_MAX_PRIORITY, "Priority out of range");
+// CYG_ASSERT( new_priority <= CYG_THREAD_MIN_PRIORITY, "Priority out of range");
+
+ CYG_INSTRUMENT_THREAD(PRIORITY,this,new_priority);
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ Cyg_ThreadQueue *queue = NULL;
+
+ // If running, remove from run qs
+ if( state == RUNNING )
+ Cyg_Scheduler::scheduler.rem_thread(this);
+ else if( state & SLEEPING )
+ {
+ // Remove thread from current queue.
+ queue = get_current_queue();
+ // if indeed we are on a queue
+ if ( NULL != queue ) {
+ CYG_CHECK_DATA_PTR(queue, "Bad queue pointer");
+ remove();
+ }
+ }
+
+ Cyg_Scheduler::scheduler.deregister_thread(this);
+
+#if CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES
+
+ // Check that there are no other threads at this priority.
+ // If so, leave is as it is.
+
+ CYG_ASSERT( Cyg_Scheduler::scheduler.unique(new_priority), "Priority not unique");
+
+ if( Cyg_Scheduler::scheduler.unique(new_priority) )
+ priority = new_priority;
+
+#else // !CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_SIMPLE
+
+ // When we have priority inheritance, we must update the original
+ // priority and not the inherited one. If the new priority is
+ // better than the current inherited one, then use that
+ // immediately. We remain in inherited state to avoid problems
+ // with multiple mutex inheritances.
+
+ if( priority_inherited )
+ {
+ original_priority = new_priority;
+ if( priority > new_priority ) priority = new_priority;
+ }
+ else priority = new_priority;
+
+#else
+
+ priority = new_priority;
+
+#endif
+
+#endif // CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES
+
+ Cyg_Scheduler::scheduler.register_thread(this);
+
+ // Return thread to scheduler if runnable
+ if( state == RUNNING )
+ Cyg_Scheduler::scheduler.add_thread(this);
+ else if ( state & SLEEPING )
+ {
+ // return to current queue
+ // if indeed we are on a queue
+ if ( NULL != queue ) {
+ CYG_CHECK_DATA_PTR(queue, "Bad queue pointer");
+ queue->enqueue(this);
+ }
+ }
+
+ // If the current thread is being reprioritized, set the
+ // reschedule flag to ensure that it gets rescheduled if
+ // necessary. (Strictly we only need to do this if the new
+ // priority is less than that of some other runnable thread, in
+ // practice checking that is as expensive as what the scheduler
+ // will do anyway).
+ // If it is not the current thread then we need to see whether
+ // it is more worthy of execution than any current thread and
+ // rescheduled if necessary.
+
+ if( this == Cyg_Scheduler::get_current_thread() )
+ Cyg_Scheduler::set_need_reschedule();
+ else Cyg_Scheduler::set_need_reschedule(this);
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETURN();
+}
+
+#endif
+
+
+// -------------------------------------------------------------------------
+// Thread delay function
+
+void
+Cyg_Thread::delay( cyg_tick_count delay)
+{
+ CYG_REPORT_FUNCTION();
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+
+ CYG_INSTRUMENT_THREAD(DELAY,this,delay);
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ sleep();
+
+ set_timer( Cyg_Clock::real_time_clock->current_value()+delay, DELAY );
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ // Clear the timeout. It is irrelevant whether the alarm has
+ // actually gone off or not.
+ clear_timer();
+
+ // and deal with anything else we must do when we return
+ switch( wake_reason ) {
+ case DESTRUCT:
+ case EXIT:
+ exit();
+ break;
+
+ default:
+ break;
+ }
+#endif
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+//
+
+#ifdef CYGPKG_KERNEL_EXCEPTIONS
+
+void
+Cyg_Thread::deliver_exception(
+ cyg_code exception_number, // exception being raised
+ CYG_ADDRWORD exception_info // exception specific info
+ )
+{
+ if( this == Cyg_Scheduler::get_current_thread() )
+ {
+ // Delivering to current thread, probably as a result
+ // of a real hardware exception. Simply invoke the appropriate
+ // handler.
+
+ exception_control.deliver_exception( exception_number, exception_info );
+ }
+#ifdef CYGIMP_EXCEPTION_ASYNC
+ else
+ {
+ // Delivering to another thread, probably as a result of one thread
+ // invoking this function on another thread. Adjust the other thread's
+ // state to make it execute the exception routine when it next runs.
+
+ // At present there is an unresolved problem here. We do not know what
+ // state the destination thread is in. It may not be a suitable point at
+ // which to invoke an exception routine. In most cases the exception
+ // routine will be run in the scheduler thread switch code, where the world is
+ // in an inconsistent state. We really need to run the routine at the
+ // end of unlock_inner(). However this would add extra code to the scheduler,
+ // and require a way of storing pending exceptions. So for now this option is
+ // disabled and not yet implemented, it may never be.
+
+ }
+#endif
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// Per-thread data support
+
+#ifdef CYGVAR_KERNEL_THREADS_DATA
+
+// Set the data map bits for each free slot in the data array.
+cyg_ucount32 Cyg_Thread::thread_data_map = (~CYGNUM_KERNEL_THREADS_DATA_ALL) &
+ (1+(((cyg_ucount32)(1<<(CYGNUM_KERNEL_THREADS_DATA_MAX-1))-1)<<1));
+// the second expression is equivalent to ((1<<CYGNUM_KERNEL_THREADS_DATA_MAX)-1);
+// but avoids overflow. The compiler will compile to a constant just fine.
+
+Cyg_Thread::cyg_data_index
+Cyg_Thread::new_data_index()
+{
+ Cyg_Scheduler::lock();
+
+ Cyg_Thread::cyg_data_index index;
+
+ if (0 == thread_data_map)
+ return -1;
+
+ // find ls set bit
+ HAL_LSBIT_INDEX( index, thread_data_map );
+
+ // clear the bit
+ thread_data_map &= ~(1<<index);
+
+ Cyg_Scheduler::unlock();
+
+ return index;
+}
+
+void Cyg_Thread::free_data_index( Cyg_Thread::cyg_data_index index )
+{
+ Cyg_Scheduler::lock();
+
+ thread_data_map |= (1<<index);
+
+ Cyg_Scheduler::unlock();
+}
+
+
+#endif
+
+// -------------------------------------------------------------------------
+// Allocate some memory at the lower end of the stack
+// by moving the stack limit pointer.
+
+#if defined(CYGFUN_KERNEL_THREADS_STACK_LIMIT) && \
+ defined(CYGFUN_KERNEL_THREADS_STACK_CHECKING)
+// if not doing stack checking, implementation can be found in thread.inl
+// This implementation puts the magic buffer area (to watch for overruns
+// *above* the stack limit, i.e. there is no official demarcation between
+// the stack and the buffer. But that's okay if you think about it... having
+// a demarcation would not accomplish anything more.
+void *Cyg_HardwareThread::increment_stack_limit( cyg_ucount32 size )
+{
+ void *ret = (void *)stack_limit;
+
+ // First lock the scheduler because we're going to be tinkering with
+ // the check data
+ Cyg_Scheduler::lock();
+
+ // if we've inc'd the limit before, it will be off by the check data
+ // size, so lets correct it
+ if (stack_limit != stack_base)
+ stack_limit -= CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE;
+ stack_limit += size;
+
+ // determine base of check data by rounding up to nearest word aligned
+ // address if not already aligned
+ cyg_uint32 *p = (cyg_uint32 *)((stack_limit + 3) & ~3);
+ // i.e. + sizeof(cyg_uint32)-1) & ~(sizeof(cyg_uint32)-1);
+ cyg_ucount32 i;
+ cyg_uint32 sig = (cyg_uint32)this;
+
+ for ( i = 0;
+ i < CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE/sizeof(cyg_uint32);
+ i++ ) {
+ p[i] = (sig ^ (i * 0x01010101));
+ }
+
+ // increment limit by the check size. Note this will not necessarily
+ // reach the end of the check data. But that doesn't really matter.
+ // Doing this allows better checking of the saved stack pointer in
+ // Cyg_Thread::check_this()
+ stack_limit += CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE;
+
+ Cyg_Scheduler::unlock();
+
+ return ret;
+}
+#endif
+
+// =========================================================================
+// Cyg_ThreadTimer member functions
+
+// -------------------------------------------------------------------------
+// Timer alarm function. Inspect the sleep_reason and if necessary wake
+// up the thread with an appropriate wake_reason.
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+
+void
+Cyg_ThreadTimer::alarm(
+ Cyg_Alarm *alarm,
+ CYG_ADDRWORD data
+)
+{
+ CYG_REPORT_FUNCTION();
+
+ Cyg_ThreadTimer *self = (Cyg_ThreadTimer *)data;
+ Cyg_Thread *thread = self->thread;
+
+ CYG_INSTRUMENT_THREAD(ALARM, 0, 0);
+
+ Cyg_Scheduler::lock();
+
+ Cyg_Thread::cyg_reason sleep_reason = thread->get_sleep_reason();
+
+ switch( sleep_reason ) {
+
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ case Cyg_Thread::EXIT:
+ case Cyg_Thread::NONE:
+ case Cyg_Thread::WAIT:
+ case Cyg_Thread::DONE:
+ // Do nothing in any of these cases. Most are here to
+ // keep the compiler happy.
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETURN();
+ return;
+
+ case Cyg_Thread::DELAY:
+ // The thread was simply delaying, unless it has been
+ // woken up for some other reason, wake it now.
+ thread->set_wake_reason(Cyg_Thread::DONE);
+ break;
+
+ case Cyg_Thread::TIMEOUT:
+ // The thread has timed out, set the wake reason to
+ // TIMEOUT and restart.
+ thread->set_wake_reason(Cyg_Thread::TIMEOUT);
+ break;
+ }
+
+ thread->wake();
+
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETURN();
+}
+
+#endif
+
+// =========================================================================
+// The Idle thread
+// The idle thread is implemented as a single instance of the
+// Cyg_IdleThread class. This is so that it can be initialized before
+// main in a static constructor.
+
+// -------------------------------------------------------------------------
+// Data definitions
+
+// stack
+#ifdef CYGNUM_HAL_STACK_SIZE_MINIMUM
+# ifdef CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE
+# if CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE < CYGNUM_HAL_STACK_SIZE_MINIMUM
+
+// then override the configured stack size
+# undef CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE
+# define CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE CYGNUM_HAL_STACK_SIZE_MINIMUM
+
+# endif // CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE < CYGNUM_HAL_STACK_SIZE_MINIMUM
+# endif // CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE
+#endif // CYGNUM_HAL_STACK_SIZE_MINIMUM
+
+static char idle_thread_stack[CYGNUM_KERNEL_CPU_MAX][CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE];
+
+// Loop counter for debugging/housekeeping
+cyg_uint32 idle_thread_loops[CYGNUM_KERNEL_CPU_MAX];
+
+// -------------------------------------------------------------------------
+// Idle thread code.
+
+void
+idle_thread_main( CYG_ADDRESS data )
+{
+ CYG_REPORT_FUNCTION();
+
+ for(;;)
+ {
+ idle_thread_loops[CYG_KERNEL_CPU_THIS()]++;
+
+ HAL_IDLE_THREAD_ACTION(idle_thread_loops[CYG_KERNEL_CPU_THIS()]);
+
+#if 0
+ // For testing, it is useful to be able to fake
+ // clock interrupts in the idle thread.
+
+ Cyg_Clock::real_time_clock->tick();
+#endif
+#ifdef CYGIMP_IDLE_THREAD_YIELD
+ // In single priority and non-preemptive systems,
+ // the idle thread should yield repeatedly to
+ // other threads.
+ Cyg_Thread::yield();
+#endif
+ }
+}
+
+// -------------------------------------------------------------------------
+// Idle thread class
+
+class Cyg_IdleThread : public Cyg_Thread
+{
+public:
+ Cyg_IdleThread();
+
+};
+
+// -------------------------------------------------------------------------
+// Instantiate the idle thread
+
+Cyg_IdleThread idle_thread[CYGNUM_KERNEL_CPU_MAX] CYG_INIT_PRIORITY( IDLE_THREAD );
+
+// -------------------------------------------------------------------------
+// Idle threads constructor
+
+Cyg_IdleThread::Cyg_IdleThread()
+ : Cyg_Thread( CYG_THREAD_MIN_PRIORITY,
+ idle_thread_main,
+ 0,
+ "Idle Thread",
+ (CYG_ADDRESS)idle_thread_stack[this-&idle_thread[0]],
+ CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE)
+{
+ CYG_REPORT_FUNCTION();
+
+ // Call into scheduler to set up this thread as the default
+ // current thread for its CPU.
+
+ Cyg_Scheduler::scheduler.set_idle_thread( this, this-&idle_thread[0] );
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// EOF common/thread.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/common/timer.cxx b/cesar/ecos/packages/kernel/current/src/common/timer.cxx
new file mode 100644
index 0000000000..07caf3fc5f
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/common/timer.cxx
@@ -0,0 +1,129 @@
+//==========================================================================
+//
+// common/timer.cxx
+//
+// Timer class implementations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-06-11
+// Purpose: Clock class implementation
+// Description: This file implements the Timer class which is derived from
+// the Alarm class to support uITRON type functionality
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <cyg/kernel/clock.hxx>
+#include <cyg/kernel/timer.hxx>
+
+#include <cyg/kernel/clock.inl> // Clock inlines
+
+// -------------------------------------------------------------------------
+
+Cyg_Timer::Cyg_Timer()
+{
+}
+
+Cyg_Timer::~Cyg_Timer()
+{
+ CYG_REPORT_FUNCTION();
+
+ disable();
+ counter = NULL;
+}
+
+// -------------------------------------------------------------------------
+
+void
+Cyg_Timer::initialize(
+ Cyg_Counter *c,
+ cyg_alarm_fn a,
+ CYG_ADDRWORD d,
+ cyg_tick_count t, // absolute time
+ cyg_tick_count i, // 0 => one shot, else repeating
+ cyg_uint32 action // (DISABLE | ENABLE)
+ )
+{
+ CYG_REPORT_FUNCTION();
+
+ counter = c;
+ alarm = a;
+ data = d;
+ trigger = t;
+ interval = i;
+ enabled = false;
+
+ CYG_ASSERT(0 == (action & ~ENABLE), "unknown action");
+
+ if(action & ENABLE)
+ enable();
+}
+
+void
+Cyg_Timer::activate(cyg_uint32 action) // (DISABLE | ENABLE) [|RESET]
+{
+ // we must also disable the alarm when resetting it so as to remove it
+ // from its queue, so that the enable afterwards places it on the right
+ // queue instead of assuming that, being enabled, it's already there.
+ // (if not enabling, the behaviour is unchanged and correct)
+ if(!(action & ENABLE) || (action & RESET) )
+ disable(); // otherwise, the enable below does nothing...
+
+ if((action & RESET))
+ {
+ cyg_tick_count t;
+ t = counter->current_value();
+ trigger = t + interval;
+ }
+
+ if((action & ENABLE)) {
+ enable(); // ...when it should put the timer on a new queue.
+ }
+}
+
+// -------------------------------------------------------------------------
+// EOF common/timer.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/debug/dbg-thread-demux.c b/cesar/ecos/packages/kernel/current/src/debug/dbg-thread-demux.c
new file mode 100644
index 0000000000..285dae2c32
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/debug/dbg-thread-demux.c
@@ -0,0 +1,181 @@
+/*==========================================================================
+//
+// dbg-thread-demux.c
+//
+// GDB Stub ROM system calls
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors:
+// Date: 1998-09-03
+// Purpose: GDB Stub ROM system calls
+// Description:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================*/
+
+#include <cyg/hal/hal_arch.h>
+
+/* This file implements system calls out from the ROM debug stub into
+ the operating environment.
+ We assume they exist in the same address space.
+ This file should be linked into your operating environment, your O.S.
+ or whatever is managing multiple saved process contexts.
+ Your O.S. needs to implement and provide
+ dbg_thread_capabilities
+ dbg_currthread
+ dbg_threadlist
+ dbg_threadinfo
+ dbg_getthreadreg
+ dbg_setthreadreg
+
+ The debug stub will call this function by calling it indirectly
+ vis a pre-assigned location possably somthing like a virtual vector table.
+ Where this is exactly is platform specific.
+
+ The O.S. should call patch_dbg_syscalls() and pass the address of the
+ location to be patched with the dbg_thread_syscall_rmt function.
+ Nothing really calls this by name.
+
+ This scheme would also work if we wanted to use a real trapped system call.
+ */
+
+// -------------------------------------------------------------------------
+
+#include <pkgconf/system.h> // for CYGPKG... and STARTUP
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/infra/cyg_type.h>
+
+#include "cyg/hal/dbg-threads-api.h"
+#include "cyg/hal/dbg-thread-syscall.h"
+
+// -------------------------------------------------------------------------
+
+#ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+static int dbg_thread_syscall_rmt(
+ enum dbg_syscall_ids id,
+ union dbg_thread_syscall_parms * p
+ )
+{
+ int ret;
+ CYGARC_HAL_SAVE_GP();
+ switch (id)
+ {
+ case dbg_null_func :
+ ret = 1 ; /* test the syscall apparatus */
+ break;
+
+#ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+ case dbg_capabilities_func :
+ ret = dbg_thread_capabilities(p->cap_parms.abilities) ;
+ break ;
+ case dbg_currthread_func :
+ ret = dbg_currthread(p->currthread_parms.ref) ;
+ break ;
+ case dbg_threadlist_func :
+ ret = dbg_threadlist(p->threadlist_parms.startflag,
+ p->threadlist_parms.lastid,
+ p->threadlist_parms.nextthreadid) ;
+ break ;
+ case dbg_threadinfo_func :
+ ret = dbg_threadinfo(p->info_parms.ref,
+ p->info_parms.info ) ;
+ break ;
+ case dbg_getthreadreg_func :
+ ret = dbg_getthreadreg(p->reg_parms.thread,
+ p->reg_parms.regcount,
+ p->reg_parms.registers) ;
+ break ;
+ case dbg_setthreadreg_func :
+ ret = dbg_setthreadreg(p->reg_parms.thread,
+ p->reg_parms.regcount,
+ p->reg_parms.registers) ;
+ break ;
+ case dbg_scheduler_func :
+ ret = dbg_scheduler(p->scheduler_parms.thread,
+ p->scheduler_parms.lock,
+ p->scheduler_parms.mode) ;
+ break ;
+#endif /* CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT */
+ default :
+ ret = 0 ; /* failure due to non-implementation */
+ }
+ CYGARC_HAL_RESTORE_GP();
+ return ret;
+}
+#endif /* CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT */
+
+// Note: This constant is the same as the one defined in hal_if.h:
+// #define CYGNUM_CALL_IF_DBG_SYSCALL 15
+// But we don't have the hal_if on all the platforms we support this
+// intercalling on. Maintaining backwards compatibility is so much fun!
+
+#define DBG_SYSCALL_THREAD_VEC_NUM 15
+
+#ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+
+#ifdef CYGPKG_HAL_SPARCLITE_SLEB
+# include <cyg/hal/hal_cygm.h>
+# ifdef CYG_HAL_USE_ROM_MONITOR_CYGMON
+// then we support talking to CygMon...
+# undef DBG_SYSCALL_THREAD_VEC_NUM
+# define DBG_SYSCALL_THREAD_VEC_NUM BSP_VEC_MT_DEBUG
+# endif
+// otherwise this code is wrong for SPARClite but also not used.
+#endif
+
+#endif
+
+void patch_dbg_syscalls(void * vector)
+{
+ dbg_syscall_func * f ;
+ f = vector ;
+
+#ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+
+ f[DBG_SYSCALL_THREAD_VEC_NUM] = dbg_thread_syscall_rmt ;
+
+#endif
+
+}
+
+// -------------------------------------------------------------------------
+// End of dbg-thread-demux.c
diff --git a/cesar/ecos/packages/kernel/current/src/debug/dbg_gdb.cxx b/cesar/ecos/packages/kernel/current/src/debug/dbg_gdb.cxx
new file mode 100644
index 0000000000..935eb31d50
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/debug/dbg_gdb.cxx
@@ -0,0 +1,469 @@
+/*==========================================================================
+//
+// dbg_gdb.c
+//
+// GDB Debugging Interface
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1998-08-22
+// Purpose: GDB Debugging Interface
+// Description: Interface for calls from GDB stubs into the OS. These
+// currently mostly support thread awareness.
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================*/
+
+#include <pkgconf/kernel.h>
+#include <pkgconf/hal.h> // CYG_HAL_USE_ROM_MONITOR_CYGMON
+
+#ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+
+#include <cyg/kernel/ktypes.h>
+
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/sched.hxx>
+
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/sched.inl>
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_stub.h>
+
+extern "C"
+{
+#include <cyg/hal/dbg-threads-api.h>
+};
+
+#define USE_ID 1
+
+#if (CYG_BYTEORDER == CYG_LSBFIRST)
+
+unsigned long swap32(unsigned long x)
+{
+ unsigned long r = 0;
+
+ r |= (x>>24)&0xFF;
+ r |= ((x>>16)&0xFF)<<8;
+ r |= ((x>>8)&0xFF)<<16;
+ r |= ((x)&0xFF)<<24;
+
+ return r;
+}
+
+#else
+
+#define swap32(x) ((unsigned long)(x))
+
+#endif
+
+//--------------------------------------------------------------------------
+
+externC int dbg_thread_capabilities(struct dbg_capabilities * cpb)
+{
+ cpb->mask1 = has_thread_current |
+ has_thread_registers |
+ has_thread_reg_change |
+ has_thread_list |
+ has_thread_info ;
+ return 1 ;
+}
+
+//--------------------------------------------------------------------------
+
+static void dbg_make_threadref(Cyg_Thread *thread, threadref *ref )
+{
+ // The following test tries to avoid accessing uninitialized pointers.
+ // This can happen if we take a breakpoint before the data is copied
+ // or the BSS zeroed. We currently assume that RAM will reset to zero
+ // or 0xff. If it is random, we have no hope.
+
+ if( (CYG_ADDRWORD)thread == 0 || (CYG_ADDRWORD)thread == 0xffffffff )
+ {
+ ((unsigned long *)ref)[0] = 0;
+ ((unsigned long *)ref)[1] = 0;
+ }
+ else
+ {
+ cyg_uint16 id = thread->get_unique_id();
+
+#if USE_ID
+ ((unsigned long *)ref)[0] = (unsigned long)thread;
+ ((unsigned long *)ref)[1] = (unsigned long)swap32(id);
+#else
+ ((unsigned long *)ref)[1] = (unsigned long)thread;
+ ((unsigned long *)ref)[0] = (unsigned long)id;
+#endif
+ }
+}
+
+static Cyg_Thread *dbg_get_thread( threadref *ref)
+{
+#if USE_ID
+
+ cyg_uint16 id = 0;
+
+ id = (cyg_uint16)swap32(((unsigned long *)ref)[1]);
+
+ Cyg_Thread *th = Cyg_Thread::get_list_head();
+ while( th != 0 )
+ {
+ if( th->get_unique_id() == id ) break;
+ th = th->get_list_next();
+ }
+
+// if( thread->get_unique_id() != id ) th = 0;
+
+#else
+
+ cyg_uint16 id = 0;
+
+ Cyg_Thread *thread = (Cyg_Thread *)(((unsigned long *)ref)[1]);
+ id = (cyg_uint16)(((unsigned long *)ref)[0]);
+
+ // Validate the thread.
+ Cyg_Thread *th = Cyg_Thread::get_list_head();
+ while( th != 0 )
+ {
+ if( th == thread ) break;
+ th = th->get_list_next();
+ }
+
+// if( thread->get_unique_id() != id ) th = 0;
+
+#endif
+
+ return th;
+}
+
+//--------------------------------------------------------------------------
+
+externC int dbg_currthread(threadref * varparm)
+{
+ Cyg_Thread *thread = Cyg_Scheduler::get_current_thread();
+
+ dbg_make_threadref(thread, varparm );
+
+ return 1 ;
+}
+
+//--------------------------------------------------------------------------
+
+externC int dbg_thread_id(threadref *threadid)
+{
+ Cyg_Thread *thread = dbg_get_thread(threadid);
+ if( thread == 0 ) return 0;
+ return thread->get_unique_id ();
+}
+
+//--------------------------------------------------------------------------
+
+externC int dbg_currthread_id(void)
+{
+ Cyg_Thread *thread = Cyg_Scheduler::get_current_thread();
+ return thread->get_unique_id ();
+}
+
+//--------------------------------------------------------------------------
+
+externC int dbg_threadlist(int startflag,
+ threadref * lastthreadid,
+ threadref * next_thread)
+{
+ Cyg_Thread *thread;
+ if( startflag )
+ {
+ thread = Cyg_Thread::get_list_head();
+ dbg_make_threadref(thread, next_thread);
+ }
+ else
+ {
+ thread = dbg_get_thread(lastthreadid);
+
+ if( thread == 0 ) return 0;
+ thread = thread->get_list_next();
+
+ if( thread == 0 ) return 0;
+ dbg_make_threadref(thread, next_thread);
+ }
+ return 1 ;
+}
+
+//--------------------------------------------------------------------------
+// Some support routines for manufacturing thread info strings
+
+static char *dbg_addstr(char *s, char *t)
+{
+ while( (*s++ = *t++) != 0 );
+
+ return s-1;
+}
+
+static char *dbg_addint(char *s, int n, int base)
+{
+ char buf[16];
+ char sign = '+';
+ cyg_count8 bpos;
+ char *digits = "0123456789ABCDEF";
+
+ if( n < 0 ) n = -n, sign = '-';
+
+ /* Set pos to start */
+ bpos = 0;
+
+ /* construct digits into buffer in reverse order */
+ if( n == 0 ) buf[bpos++] = '0';
+ else while( n != 0 )
+ {
+ cyg_ucount8 d = n % base;
+ buf[bpos++] = digits[d];
+ n /= base;
+ }
+
+ /* set sign if negative. */
+ if( sign == '-' )
+ {
+ buf[bpos] = sign;
+ }
+ else bpos--;
+
+ /* Now write it out in correct order. */
+ while( bpos >= 0 )
+ *s++ = buf[bpos--];
+
+ *s = 0;
+
+ return s;
+}
+
+static char *dbg_adddec(char *s, int x)
+{
+ return dbg_addint(s, x, 10);
+}
+
+//--------------------------------------------------------------------------
+
+externC int dbg_threadinfo(
+ threadref * threadid,
+ struct cygmon_thread_debug_info * info)
+{
+ static char statebuf[60];
+
+ Cyg_Thread *thread = dbg_get_thread(threadid);
+ if( thread == 0 ) return 0;
+
+ info->context_exists = 1;
+
+ char *sbp = statebuf;
+ char *s;
+
+ if( thread->get_state() & Cyg_Thread::SUSPENDED )
+ {
+ sbp = dbg_addstr( sbp, "suspended+");
+ }
+
+ switch( thread->get_state() & ~Cyg_Thread::SUSPENDED )
+ {
+ case Cyg_Thread::RUNNING:
+ if ( Cyg_Scheduler::get_current_thread() == thread ) {
+ s = "running"; break;
+ }
+ else if ( thread->get_state() & Cyg_Thread::SUSPENDED ) {
+ s = ""; sbp--; /*kill '+'*/ break;
+ }
+ else {
+ s = "ready"; break;
+ }
+ case Cyg_Thread::SLEEPING:
+ s = "sleeping"; break;
+ case Cyg_Thread::COUNTSLEEP | Cyg_Thread::SLEEPING:
+ case Cyg_Thread::COUNTSLEEP:
+ s = "counted sleep"; break;
+ case Cyg_Thread::CREATING:
+ s = "creating"; sbp = statebuf; break;
+ case Cyg_Thread::EXITED:
+ s = "exited"; sbp = statebuf; break;
+ default:
+ s = "unknown state"; break;
+ }
+
+ sbp = dbg_addstr( sbp, s );
+ sbp = dbg_addstr( sbp, ", Priority: " );
+ sbp = dbg_adddec( sbp, thread->get_priority() );
+
+ info->thread_display = statebuf;
+
+#ifdef CYGVAR_KERNEL_THREADS_NAME
+ info->unique_thread_name = thread->get_name();
+#else
+ info->unique_thread_name = 0;
+#endif
+
+ info->more_display = 0;
+
+ return 1 ;
+}
+
+//--------------------------------------------------------------------------
+
+externC int dbg_getthreadreg(
+ threadref * osthreadid,
+ int regcount, /* count of registers in the array */
+ void * regval) /* fillin this array */
+{
+ Cyg_Thread *thread = dbg_get_thread(osthreadid);
+
+ if( thread == 0 ) return 0;
+
+ if( thread == Cyg_Scheduler::get_current_thread() )
+ {
+#if defined(CYG_HAL_USE_ROM_MONITOR_CYGMON)
+ // We have no state for the current thread, Cygmon has
+ // got that and we cannot get at it.
+ return 0;
+#elif defined(CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS)
+ // registers hold the state of the current thread.
+ __stub_copy_registers ((target_register_t *)regval, registers);
+#else
+ return 0;
+#endif
+ }
+ else
+ {
+ HAL_SavedRegisters *regs = thread->get_saved_context();
+ if( regs == 0 ) return 0;
+
+ HAL_GET_GDB_REGISTERS (regval, regs);
+ }
+
+ return 1 ;
+}
+
+//--------------------------------------------------------------------------
+
+externC int dbg_setthreadreg(
+ threadref * osthreadid,
+ int regcount , /* number of registers */
+ void * regval)
+{
+ Cyg_Thread *thread = dbg_get_thread(osthreadid);
+
+ if( thread == 0 ) return 0;
+
+ if( thread == Cyg_Scheduler::get_current_thread() )
+ {
+#if defined(CYG_HAL_USE_ROM_MONITOR_CYGMON)
+ // We have no state for the current thread, Cygmon has
+ // got that and we cannot get at it.
+ return 0;
+#elif defined(CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS)
+ // registers hold the state of the current thread.
+ __stub_copy_registers (registers, (target_register_t *)regval);
+#else
+ return 0;
+#endif
+ }
+ else
+ {
+ HAL_SavedRegisters *regs = thread->get_saved_context();
+ if( regs == 0 ) return 0;
+
+ HAL_SET_GDB_REGISTERS (regs, regval);
+ }
+
+ return 1;
+}
+
+//--------------------------------------------------------------------------
+// Thread scheduler control for debugger.
+// Arguments:
+// osthreadid : must match currently executing thread.
+// Future use: change the currently executing thread.
+// lock : 0 == unlock scheduler, 1 == lock scheduler
+// mode : 0 == single-instruction step, 1 == free running
+//
+// Return values:
+// 1 == success
+// 0 == failure
+// -1 == request that the caller handle this itself
+// (eg.by disabling interrupts)
+//
+
+externC int dbg_scheduler(
+ threadref * osthreadid,
+ int lock, /* 0 == unlock, 1 == lock */
+ int mode) /* 0 == step, 1 == continue */
+{
+#if 0
+ /* Minimal implementation: let stub do the work. */
+ return -1; // Stub will disable interrupts
+#else
+ Cyg_Thread *thread = dbg_get_thread(osthreadid);
+
+ if( thread == 0 ) return 0; // fail
+
+ if( thread == Cyg_Scheduler::get_current_thread() )
+ {
+ // OK to proceed
+
+ if (lock)
+ {
+ Cyg_Scheduler::lock();
+ }
+ else
+ {
+ if (Cyg_Scheduler::get_sched_lock() >= 1)
+ Cyg_Scheduler::unlock_simple();
+ }
+ return 1; // success
+ }
+ else
+ {
+ // Cannot accept any thread other than current one
+ return 0; // fail
+ }
+#endif
+}
+
+
+#endif // CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+
+//--------------------------------------------------------------------------
+// End of dbg_gdb.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/instrmnt/meminst.cxx b/cesar/ecos/packages/kernel/current/src/instrmnt/meminst.cxx
new file mode 100644
index 0000000000..dd86748bd4
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/instrmnt/meminst.cxx
@@ -0,0 +1,261 @@
+//==========================================================================
+//
+// instrmnt/meminst.cxx
+//
+// Memory buffer instrumentation functions
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg, andrew.lunn@ascom.ch
+// Date: 1997-10-27
+// Purpose: Instrumentation functions
+// Description: The functions in this file are implementations of the
+// standard instrumentation functions that place records
+// into a memory buffer.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/instrmnt.h> // instrumentation
+
+#include <cyg/kernel/intr.hxx> // interrupt control
+#include <cyg/kernel/sched.hxx> // scheduler defines
+
+#include <cyg/kernel/sched.inl> // scheduler inlines
+#include <cyg/kernel/clock.inl> // clock inlines
+
+#ifdef CYGPKG_KERNEL_INSTRUMENT
+
+// -------------------------------------------------------------------------
+// Instrumentation record.
+
+struct Instrument_Record
+{
+ CYG_WORD16 type; // record type
+ CYG_WORD16 thread; // current thread id
+ CYG_WORD timestamp; // 32 bit timestamp
+ CYG_WORD arg1; // first arg
+ CYG_WORD arg2; // second arg
+};
+
+// -------------------------------------------------------------------------
+// Buffer base and end. This buffer must be a whole number of
+
+#ifdef CYGVAR_KERNEL_INSTRUMENT_EXTERNAL_BUFFER
+
+externC Instrument_Record instrument_buffer[];
+externC cyg_uint32 instrument_buffer_size;
+
+#else
+
+extern "C"
+{
+
+Instrument_Record instrument_buffer[CYGNUM_KERNEL_INSTRUMENT_BUFFER_SIZE];
+
+cyg_uint32 instrument_buffer_size = CYGNUM_KERNEL_INSTRUMENT_BUFFER_SIZE;
+
+};
+
+#endif
+
+extern "C"
+{
+
+#define instrument_buffer_start instrument_buffer[0]
+#define instrument_buffer_end instrument_buffer[instrument_buffer_size]
+
+extern "C"
+{
+Instrument_Record *instrument_buffer_pointer = &instrument_buffer_start;
+};
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_FLAGS
+
+// This array contains a 32 bit word for each event class. The
+// bits in the word correspond to events. By setting or clearing
+// the appropriate bit, the selected instrumentation event may
+// be enabled or disabled dynamically.
+
+cyg_uint32 instrument_flags[(CYG_INSTRUMENT_CLASS_MAX>>8)+1];
+
+#endif
+
+};
+
+// -------------------------------------------------------------------------
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+
+HAL_SPINLOCK_TYPE instrument_lock = HAL_SPINLOCK_INIT_CLEAR;
+
+#else
+
+#define HAL_SPINLOCK_SPIN( __lock )
+
+#define HAL_SPINLOCK_CLEAR( __lock )
+
+#endif
+
+// -------------------------------------------------------------------------
+
+void cyg_instrument( cyg_uint32 type, CYG_ADDRWORD arg1, CYG_ADDRWORD arg2 )
+{
+
+ cyg_uint32 old_ints;
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_FLAGS
+
+ cyg_ucount8 cl = (type>>8)&0xff;
+ cyg_ucount8 event = type&0xff;
+
+ if( instrument_flags[cl] & (1<<event) )
+#endif
+ {
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ HAL_SPINLOCK_SPIN( instrument_lock );
+
+ Instrument_Record *p = instrument_buffer_pointer;
+ Cyg_Thread *t = Cyg_Scheduler::get_current_thread();
+ p->type = type;
+ p->thread = (t==0)?0x0FFF:t->get_unique_id();
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+ // Add CPU id to in top 4 bytes of thread id
+ p->thread = (p->thread&0x0FFF)|(CYG_KERNEL_CPU_THIS()<<12);
+#endif
+#ifdef CYGVAR_KERNEL_COUNTERS_CLOCK
+// p->timestamp = Cyg_Clock::real_time_clock->current_value_lo();
+ HAL_CLOCK_READ( &p->timestamp );
+#else
+ p->timestamp = 0;
+#endif
+ p->arg1 = arg1;
+ p->arg2 = arg2;
+
+ p++;
+#ifdef CYGDBG_KERNEL_INSTRUMENT_BUFFER_WRAP
+ if( p == &instrument_buffer_end )
+ instrument_buffer_pointer = &instrument_buffer_start;
+ else instrument_buffer_pointer = p;
+#else
+ // when not wrapping, just continue to put further entries
+ // in the last slot.
+ if( p != &instrument_buffer_end )
+ instrument_buffer_pointer = p;
+#endif
+ HAL_SPINLOCK_CLEAR( instrument_lock );
+ HAL_RESTORE_INTERRUPTS(old_ints);
+ }
+
+ return;
+}
+
+// -------------------------------------------------------------------------
+// Functions to enable and disable selected instrumentation events
+// when the flags are enabled.
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_FLAGS
+
+externC void cyg_instrument_enable( cyg_uint32 cl, cyg_uint32 event)
+{
+ if( 0 != event )
+ instrument_flags[cl>>8] |= 1<<event;
+ else
+ instrument_flags[cl>>8] = ~0;
+}
+
+externC void cyg_instrument_disable( cyg_uint32 cl, cyg_uint32 event)
+{
+ if( 0 != event )
+ instrument_flags[cl>>8] &= ~(1<<event);
+ else
+ instrument_flags[cl>>8] = 0;
+
+}
+
+externC cyg_bool cyg_instrument_state( cyg_uint32 cl, cyg_uint32 event)
+{
+ return (instrument_flags[cl>>8] & (1<<event)) != 0;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+
+#ifdef CYGDBG_KERNEL_INSTRUMENT_MSGS
+#define CYGDBG_KERNEL_INSTRUMENT_MSGS_DEFINE_TABLE
+#include <cyg/kernel/instrument_desc.h>
+#define NELEM(x) (sizeof(x)/sizeof*(x))
+externC char * cyg_instrument_msg(CYG_WORD16 type) {
+
+ struct instrument_desc_s *record;
+ struct instrument_desc_s *end_record;
+ CYG_WORD cl, event;
+
+ record = instrument_desc;
+ end_record = &instrument_desc[NELEM(instrument_desc)-1];
+ cl = type & 0xff00;
+ event = type & 0x00ff;
+
+ while ((record != end_record) && (record->num != cl)) {
+ record++;
+ }
+
+ if (record->num == cl) {
+ record++;
+ while ((record != end_record) && (record->num != event) &&
+ (record->num < 0xff)) {
+ record++;
+ }
+
+ if (record->num == event) {
+ return (record->msg);
+ }
+ }
+ return("Unknown event");
+}
+#endif // CYGDBG_KERNEL_INSTRUMENT_MSGS
+#endif // CYGPKG_KERNEL_INSTRUMENT
+
+// EOF instrmnt/meminst.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/intr/intr.cxx b/cesar/ecos/packages/kernel/current/src/intr/intr.cxx
new file mode 100644
index 0000000000..6443ed00c9
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/intr/intr.cxx
@@ -0,0 +1,784 @@
+//==========================================================================
+//
+// intr/intr.cxx
+//
+// Interrupt class implementations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1999-02-17
+// Purpose: Interrupt class implementation
+// Description: This file contains the definitions of the interrupt
+// class.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/instrmnt.h> // instrumentation
+
+#include <cyg/kernel/intr.hxx> // our header
+
+#include <cyg/kernel/sched.hxx> // scheduler
+
+#include <cyg/kernel/sched.inl>
+
+// -------------------------------------------------------------------------
+// Statics
+
+volatile cyg_int32 Cyg_Interrupt::disable_counter[CYGNUM_KERNEL_CPU_MAX];
+
+Cyg_SpinLock Cyg_Interrupt::interrupt_disable_spinlock CYG_INIT_PRIORITY( INTERRUPTS );
+
+CYG_INTERRUPT_STATE Cyg_Interrupt::interrupt_disable_state[CYGNUM_KERNEL_CPU_MAX];
+
+// -------------------------------------------------------------------------
+
+Cyg_Interrupt::Cyg_Interrupt(
+ cyg_vector vec, // Vector to attach to
+ cyg_priority pri, // Queue priority
+ CYG_ADDRWORD d, // Data pointer
+ cyg_ISR *ir, // Interrupt Service Routine
+ cyg_DSR *dr // Deferred Service Routine
+ )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG5("vector=%d, priority=%d, data=%08x, isr=%08x, "
+ "dsr=%08x", vec, pri, d, ir, dr);
+
+ vector = vec;
+ priority = pri;
+ isr = ir;
+ dsr = dr;
+ data = d;
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST
+
+ dsr_count = 0;
+ next_dsr = NULL;
+
+#endif
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_CHAIN
+
+ next = NULL;
+
+#endif
+
+ CYG_REPORT_RETURN();
+
+};
+
+// -------------------------------------------------------------------------
+
+Cyg_Interrupt::~Cyg_Interrupt()
+{
+ CYG_REPORT_FUNCTION();
+ detach();
+ CYG_REPORT_RETURN();
+};
+
+// -------------------------------------------------------------------------
+// DSR handling statics:
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE
+
+Cyg_Interrupt *
+Cyg_Interrupt::dsr_table[CYGNUM_KERNEL_CPU_MAX][CYGNUM_KERNEL_INTERRUPTS_DSRS_TABLE_SIZE];
+
+cyg_ucount32 Cyg_Interrupt::dsr_table_head[CYGNUM_KERNEL_CPU_MAX];
+
+volatile cyg_ucount32 Cyg_Interrupt::dsr_table_tail[CYGNUM_KERNEL_CPU_MAX];
+
+#endif
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST
+
+Cyg_Interrupt* volatile Cyg_Interrupt::dsr_list[CYGNUM_KERNEL_CPU_MAX];
+
+#endif
+
+// -------------------------------------------------------------------------
+// Call any pending DSRs
+
+void
+Cyg_Interrupt::call_pending_DSRs_inner(void)
+{
+// CYG_REPORT_FUNCTION();
+
+ HAL_SMP_CPU_TYPE cpu = CYG_KERNEL_CPU_THIS();
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE
+
+ while( dsr_table_head[cpu] != dsr_table_tail[cpu] )
+ {
+ Cyg_Interrupt *intr = dsr_table[cpu][dsr_table_head[cpu]];
+
+ dsr_table_head[cpu]++;
+ if( dsr_table_head[cpu] >= CYGNUM_KERNEL_INTERRUPTS_DSRS_TABLE_SIZE )
+ dsr_table_head[cpu] = 0;
+
+ CYG_INSTRUMENT_INTR(CALL_DSR, intr->vector, 0);
+
+ CYG_ASSERT( intr->dsr != NULL , "No DSR defined");
+
+ intr->dsr( intr->vector, 1, (CYG_ADDRWORD)intr->data );
+ }
+
+#endif
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST
+
+ while( dsr_list[cpu] != NULL )
+ {
+ Cyg_Interrupt* intr;
+ cyg_uint32 old_intr;
+ cyg_count32 count;
+
+ HAL_DISABLE_INTERRUPTS(old_intr);
+
+ intr = dsr_list[cpu];
+ dsr_list[cpu] = intr->next_dsr;
+ count = intr->dsr_count;
+ intr->dsr_count = 0;
+
+ HAL_RESTORE_INTERRUPTS(old_intr);
+
+ CYG_ASSERT( intr->dsr != NULL , "No DSR defined");
+
+ intr->dsr( intr->vector, count, (CYG_ADDRWORD)intr->data );
+
+ }
+
+#endif
+
+};
+
+externC void
+cyg_interrupt_call_pending_DSRs(void)
+{
+ Cyg_Interrupt::call_pending_DSRs_inner();
+}
+
+//
+// Use HAL supported function to run through the DSRs, but executing using
+// the separate interrupt stack if available. This function calls back
+// into this module via 'cyg_interrupt_call_pending_DSRs' above, to keep
+// the whole process as general as possible.
+
+void
+Cyg_Interrupt::call_pending_DSRs(void)
+{
+ CYG_ASSERT( Cyg_Scheduler::get_sched_lock() == 1,
+ "DSRs being called with sched_lock not equal to 1");
+ HAL_INTERRUPT_STACK_CALL_PENDING_DSRS();
+}
+
+
+// -------------------------------------------------------------------------
+
+void
+Cyg_Interrupt::post_dsr(void)
+{
+// CYG_REPORT_FUNCTION();
+ HAL_SMP_CPU_TYPE cpu = CYG_KERNEL_CPU_THIS();
+
+ CYG_INSTRUMENT_INTR(POST_DSR, vector, 0);
+
+ cyg_uint32 old_intr;
+
+ // We need to disable interrupts during this part to
+ // guard against nested interrupts.
+
+ HAL_DISABLE_INTERRUPTS(old_intr);
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE
+
+ dsr_table[cpu][dsr_table_tail[cpu]++] = this;
+ if( dsr_table_tail[cpu] >= CYGNUM_KERNEL_INTERRUPTS_DSRS_TABLE_SIZE )
+ dsr_table_tail[cpu] = 0;
+
+#endif
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST
+
+ // Only add the interrupt to the dsr list if this is
+ // the first DSR call.
+ // At present DSRs are pushed onto the list and will be
+ // called in reverse order. We do not define the order
+ // in which DSRs are called, so this is acceptable.
+
+ if( dsr_count++ == 0 )
+ {
+ next_dsr = dsr_list[cpu];
+ dsr_list[cpu] = this;
+ }
+
+#endif
+
+ HAL_RESTORE_INTERRUPTS(old_intr);
+};
+
+// -------------------------------------------------------------------------
+// A C callable interface to Cyg_Interrupt::post_dsr() that can be used from
+// the HAL.
+
+externC void
+cyg_interrupt_post_dsr( CYG_ADDRWORD intr_obj )
+{
+ Cyg_Interrupt* intr = (Cyg_Interrupt*) intr_obj;
+ intr->post_dsr ();
+}
+
+// -------------------------------------------------------------------------
+
+// FIXME: should have better name - Jifl
+externC void
+interrupt_end(
+ cyg_uint32 isr_ret,
+ Cyg_Interrupt *intr,
+ HAL_SavedRegisters *regs
+ )
+{
+// CYG_REPORT_FUNCTION();
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+ Cyg_Scheduler::lock();
+#endif
+
+ // Sometimes we have a NULL intr object pointer.
+ cyg_vector vector = (intr!=NULL)?intr->vector:0;
+
+ CYG_INSTRUMENT_INTR(END, vector, isr_ret);
+
+ CYG_UNUSED_PARAM( cyg_vector, vector ); // prevent compiler warning
+
+#ifndef CYGIMP_KERNEL_INTERRUPTS_CHAIN
+
+ // Only do this if we are in a non-chained configuration.
+ // If we are chained, then chain_isr below will do the DSR
+ // posting.
+
+ if( isr_ret & Cyg_Interrupt::CALL_DSR && intr != NULL ) intr->post_dsr();
+
+#endif
+
+#ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+
+ // If we have GDB support enabled, and there is the possibility
+ // that this thread will be context switched as a result of this
+ // interrupt, then save the pointer to the saved thread context in
+ // the thread object so that GDB can get a meaningful context to
+ // look at.
+
+ Cyg_Scheduler::get_current_thread()->set_saved_context(regs);
+
+#endif
+
+ // Now unlock the scheduler, which may also call DSRs
+ // and cause a thread switch to happen.
+
+ Cyg_Scheduler::unlock();
+
+#ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
+
+ Cyg_Scheduler::get_current_thread()->set_saved_context(0);
+
+#endif
+
+ CYG_INSTRUMENT_INTR(RESTORE, vector, 0);
+}
+
+// -------------------------------------------------------------------------
+// Interrupt chaining statics.
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_CHAIN
+
+Cyg_Interrupt *Cyg_Interrupt::chain_list[CYGNUM_HAL_ISR_TABLE_SIZE];
+
+#endif
+
+// -------------------------------------------------------------------------
+// Chaining ISR inserted in HAL vector
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_CHAIN
+
+cyg_uint32
+Cyg_Interrupt::chain_isr(cyg_vector vector, CYG_ADDRWORD data)
+{
+ Cyg_Interrupt *p = *(Cyg_Interrupt **)data;
+ register cyg_uint32 isr_ret = 0;
+ register cyg_uint32 isr_chain_ret = 0;
+
+ CYG_INSTRUMENT_INTR(CHAIN_ISR, vector, 0);
+
+ while( p != NULL )
+ {
+ if( p->vector == vector )
+ {
+ isr_ret = p->isr(vector, p->data);
+
+ isr_chain_ret |= isr_ret;
+
+ if( isr_ret & Cyg_Interrupt::CALL_DSR ) p->post_dsr();
+
+ if( isr_ret & Cyg_Interrupt::HANDLED ) break;
+ }
+
+ p = p->next;
+ }
+
+#ifdef HAL_DEFAULT_ISR
+ if( (isr_chain_ret & (Cyg_Interrupt::HANDLED|Cyg_Interrupt::CALL_DSR)) == 0 )
+ {
+ // If we finished the loop for some reason other than that an
+ // ISR has handled the interrupt, call any default ISR to either
+ // report the spurious interrupt, or do some other HAL level processing
+ // such as GDB interrupt detection etc.
+
+ HAL_DEFAULT_ISR( vector, 0 );
+ }
+#endif
+
+ return isr_ret & ~Cyg_Interrupt::CALL_DSR;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// Attach an ISR to an interrupt vector.
+
+void
+Cyg_Interrupt::attach(void)
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ CYG_INSTRUMENT_INTR(ATTACH, vector, 0);
+
+ HAL_INTERRUPT_SET_LEVEL( vector, priority );
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_CHAIN
+
+ CYG_ASSERT( next == NULL , "Cyg_Interrupt already on a list");
+
+ cyg_uint32 index;
+
+ HAL_TRANSLATE_VECTOR( vector, index );
+
+ if( chain_list[index] == NULL )
+ {
+ int in_use;
+ // First Interrupt on this chain, just assign it and register
+ // the chain_isr with the HAL.
+
+ chain_list[index] = this;
+
+ HAL_INTERRUPT_IN_USE( vector, in_use );
+ CYG_ASSERT( 0 == in_use, "Interrupt vector not free.");
+ HAL_INTERRUPT_ATTACH( vector, chain_isr, &chain_list[index], NULL );
+ }
+ else
+ {
+ // There are already interrupts chained, add this one into the
+ // chain in priority order.
+
+ Cyg_Interrupt **p = &chain_list[index];
+
+ while( *p != NULL )
+ {
+ Cyg_Interrupt *n = *p;
+
+ if( n->priority < priority ) break;
+
+ p = &n->next;
+ }
+ next = *p;
+ *p = this;
+ }
+
+#else
+
+ {
+ int in_use;
+
+
+ HAL_INTERRUPT_IN_USE( vector, in_use );
+ CYG_ASSERT( 0 == in_use, "Interrupt vector not free.");
+
+ HAL_INTERRUPT_ATTACH( vector, isr, data, this );
+ }
+
+#endif
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Detach the ISR from the vector
+
+void
+Cyg_Interrupt::detach(void)
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ CYG_INSTRUMENT_INTR(DETACH, vector, 0);
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_CHAIN
+
+ // Remove the interrupt object from the vector chain.
+
+ cyg_uint32 index;
+
+ HAL_TRANSLATE_VECTOR( vector, index );
+
+ Cyg_Interrupt **p = &chain_list[index];
+
+ while( *p != NULL )
+ {
+ Cyg_Interrupt *n = *p;
+
+ if( n == this )
+ {
+ *p = next;
+ break;
+ }
+
+ p = &n->next;
+ }
+
+ // If this was the last one, detach the vector.
+
+ if( chain_list[index] == NULL )
+ HAL_INTERRUPT_DETACH( vector, chain_isr );
+
+#else
+
+ HAL_INTERRUPT_DETACH( vector, isr );
+
+#endif
+
+ CYG_REPORT_RETURN();
+
+}
+
+// -------------------------------------------------------------------------
+// Get the current service routine
+
+void
+Cyg_Interrupt::get_vsr(cyg_vector vector, cyg_VSR **vsr)
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG2("vector = %d, mem to put VSR in is at %08x", vector,
+ vsr);
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_VSR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_VSR_MAX, "Invalid vector");
+
+ HAL_VSR_GET( vector, vsr );
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Install a vector service routine
+
+void
+Cyg_Interrupt::set_vsr(cyg_vector vector, cyg_VSR *vsr, cyg_VSR **old)
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_REPORT_FUNCARG3( "vector = %d, new vsr is at %08x, mem to put "
+ "old VSR in is at %08x", vector, vsr, old);
+
+ CYG_INSTRUMENT_INTR(SET_VSR, vector, vsr);
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_VSR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_VSR_MAX, "Invalid vector");
+
+ CYG_INTERRUPT_STATE old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+
+ HAL_VSR_SET( vector, vsr, old );
+
+ HAL_RESTORE_INTERRUPTS(old_ints);
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Disable interrupts at the CPU
+
+
+void
+Cyg_Interrupt::disable_interrupts(void)
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_INSTRUMENT_INTR(DISABLE, disable_counter[CYG_KERNEL_CPU_THIS()]+1, 0);
+
+ HAL_SMP_CPU_TYPE cpu_this = CYG_KERNEL_CPU_THIS();
+
+ // If the disable_counter is zero, disable interrupts and claim the spinlock.
+
+ if( 0 == disable_counter[cpu_this] )
+ {
+ // Claim the spinlock and disable interrupts. We save the original interrupt
+ // enable state to restore later.
+ interrupt_disable_spinlock.spin_intsave(&interrupt_disable_state[cpu_this]);
+ }
+
+ // Now increment our disable counter.
+
+ disable_counter[cpu_this]++;
+
+ CYG_REPORT_RETURN();
+}
+
+
+// -------------------------------------------------------------------------
+// Re-enable CPU interrupts
+
+void
+Cyg_Interrupt::enable_interrupts(void)
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_INSTRUMENT_INTR(ENABLE, disable_counter[CYG_KERNEL_CPU_THIS()], 0);
+
+ HAL_SMP_CPU_TYPE cpu_this = CYG_KERNEL_CPU_THIS();
+
+ CYG_ASSERT( disable_counter[cpu_this] > 0 , "Disable counter not greater than zero");
+
+ // If the disable counter goes to zero, then release the spinlock and restore
+ // the previous interrupt state.
+
+ if( --disable_counter[cpu_this] == 0 )
+ {
+ interrupt_disable_spinlock.clear_intsave(interrupt_disable_state[cpu_this]);
+ }
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Mask a specific interrupt in a PIC
+
+void
+Cyg_Interrupt::mask_interrupt(cyg_vector vector)
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("vector=%d", vector);
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ CYG_INSTRUMENT_INTR(MASK, vector, 0);
+
+ CYG_INTERRUPT_STATE old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ HAL_INTERRUPT_MASK( vector );
+ HAL_RESTORE_INTERRUPTS(old_ints);
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Mask a specific interrupt in a PIC (but not interrupt safe)
+
+void
+Cyg_Interrupt::mask_interrupt_intunsafe(cyg_vector vector)
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("vector=%d", vector);
+
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ CYG_INSTRUMENT_INTR(MASK, vector, 0);
+
+ HAL_INTERRUPT_MASK( vector );
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Clear PIC mask
+
+void
+Cyg_Interrupt::unmask_interrupt(cyg_vector vector)
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ CYG_INSTRUMENT_INTR(UNMASK, vector, 0);
+
+ CYG_INTERRUPT_STATE old_ints;
+
+ HAL_DISABLE_INTERRUPTS(old_ints);
+ HAL_INTERRUPT_UNMASK( vector );
+ HAL_RESTORE_INTERRUPTS(old_ints);
+
+ CYG_REPORT_RETURN();
+}
+
+
+// -------------------------------------------------------------------------
+// Clear PIC mask (but not interrupt safe)
+
+void
+Cyg_Interrupt::unmask_interrupt_intunsafe(cyg_vector vector)
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ CYG_INSTRUMENT_INTR(UNMASK, vector, 0);
+
+ HAL_INTERRUPT_UNMASK( vector );
+
+ CYG_REPORT_RETURN();
+}
+
+
+// -------------------------------------------------------------------------
+// Acknowledge interrupt at PIC
+
+void
+Cyg_Interrupt::acknowledge_interrupt(cyg_vector vector)
+{
+// CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ CYG_INSTRUMENT_INTR(ACK, vector, 0);
+
+ HAL_INTERRUPT_ACKNOWLEDGE( vector );
+}
+
+// -------------------------------------------------------------------------
+// Change interrupt detection at PIC
+
+void
+Cyg_Interrupt::configure_interrupt(
+ cyg_vector vector, // vector to control
+ cyg_bool level, // level or edge triggered
+ cyg_bool up // hi/lo level, rising/falling edge
+ )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG3("vector = %d, level = %d, up = %d", vector, level,
+ up);
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ CYG_INSTRUMENT_INTR(CONFIGURE, vector, (level<<1)|up);
+
+ HAL_INTERRUPT_CONFIGURE( vector, level, up );
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// SMP support for setting/getting interrupt CPU
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+
+void
+Cyg_Interrupt::set_cpu(
+ cyg_vector vector, // vector to control
+ HAL_SMP_CPU_TYPE cpu // CPU to set
+ )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG2("vector = %d, cpu = %d", vector, cpu );
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ CYG_INSTRUMENT_INTR(SET_CPU, vector, cpu);
+
+ HAL_INTERRUPT_SET_CPU( vector, cpu );
+
+ CYG_REPORT_RETURN();
+}
+
+HAL_SMP_CPU_TYPE
+Cyg_Interrupt::get_cpu(
+ cyg_vector vector // vector to control
+ )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("vector = %d", vector);
+
+ CYG_ASSERT( vector >= CYGNUM_HAL_ISR_MIN, "Invalid vector");
+ CYG_ASSERT( vector <= CYGNUM_HAL_ISR_MAX, "Invalid vector");
+
+ HAL_SMP_CPU_TYPE cpu = 0;
+
+ HAL_INTERRUPT_GET_CPU( vector, cpu );
+
+ CYG_INSTRUMENT_INTR(GET_CPU, vector, cpu);
+
+ CYG_REPORT_RETURN();
+
+ return cpu;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// EOF intr/intr.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/sched/bitmap.cxx b/cesar/ecos/packages/kernel/current/src/sched/bitmap.cxx
new file mode 100644
index 0000000000..5800e50ded
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/sched/bitmap.cxx
@@ -0,0 +1,323 @@
+//==========================================================================
+//
+// sched/bitmap.cxx
+//
+// Bitmap scheduler class implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-16
+// Purpose: Bitmap scheduler class implementation
+// Description: This file contains the implementations of
+// Cyg_Scheduler_Implementation and Cyg_SchedThread_Implementation.
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <cyg/kernel/sched.hxx> // our header
+
+#include <cyg/hal/hal_arch.h> // Architecture specific definitions
+
+#include <cyg/kernel/thread.inl> // thread inlines
+#include <cyg/kernel/sched.inl> // scheduler inlines
+
+#ifdef CYGSEM_KERNEL_SCHED_BITMAP
+
+//==========================================================================
+// Cyg_Scheduler_Implementation class members
+
+// -------------------------------------------------------------------------
+// Constructor.
+
+Cyg_Scheduler_Implementation::Cyg_Scheduler_Implementation()
+{
+ CYG_REPORT_FUNCTION();
+
+ // At present we cannot init run_queue here because the absence of
+ // ordering of static constructors means that we could do this
+ // after the static idle thread has been created. (Guess how I
+ // found this out!)
+// run_queue = 0;
+
+}
+
+// -------------------------------------------------------------------------
+// Choose the best thread to run next
+
+Cyg_Thread *Cyg_Scheduler_Implementation::schedule()
+{
+ CYG_REPORT_FUNCTION();
+
+ // The run queue may _never_ be empty, there is always
+ // an idle thread at the lowest priority.
+
+ CYG_ASSERT(run_queue != 0, "Run queue empty");
+
+ cyg_uint32 index;
+
+ HAL_LSBIT_INDEX(index, run_queue);
+
+ return thread_table[index];
+}
+
+// -------------------------------------------------------------------------
+
+void Cyg_Scheduler_Implementation::add_thread(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT((CYG_THREAD_MIN_PRIORITY >= thread->priority)
+ && (CYG_THREAD_MAX_PRIORITY <= thread->priority),
+ "Priority out of range!");
+
+ CYG_ASSERT( thread_table[thread->priority] == NULL ||
+ thread_table[thread->priority] == thread,
+ "Duplicate thread priorities" );
+
+ CYG_ASSERT( (run_queue & (1<<thread->priority)) == 0,
+ "Run queue bit already set" );
+
+ // If the thread is on some other queue, remove it
+ // here.
+ if( thread->queue != NULL )
+ {
+ thread->queue->remove(thread);
+ thread->queue = NULL;
+ }
+
+ run_queue |= 1<<thread->priority;
+
+ // If the new thread is higher priority than the
+ // current thread, request a reschedule.
+
+ if( thread->priority < Cyg_Scheduler::get_current_thread()->priority )
+ set_need_reschedule();
+}
+
+// -------------------------------------------------------------------------
+
+void Cyg_Scheduler_Implementation::rem_thread(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( thread_table[thread->priority] == thread,
+ "Invalid thread priority" );
+
+ CYG_ASSERT( (run_queue & (1<<thread->priority)) != 0,
+ "Run queue bit not set" );
+
+ run_queue &= ~(1<<thread->priority);
+
+ if( thread == Cyg_Scheduler::get_current_thread() )
+ set_need_reschedule();
+}
+
+// -------------------------------------------------------------------------
+// Set up initial idle thread
+
+void Cyg_Scheduler_Implementation::set_idle_thread( Cyg_Thread *thread, HAL_SMP_CPU_TYPE cpu )
+{
+ CYG_REPORT_FUNCTION();
+
+ // Make the thread the current thread for this CPU.
+
+ current_thread[cpu] = thread;
+
+ // This will insert the thread in the run queues and make it
+ // available to execute.
+ thread->resume();
+}
+
+// -------------------------------------------------------------------------
+// register thread with scheduler
+
+void Cyg_Scheduler_Implementation::register_thread(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+
+ thread_table[thread->priority] = thread;
+}
+
+// -------------------------------------------------------------------------
+
+// deregister thread
+void Cyg_Scheduler_Implementation::deregister_thread(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+
+ thread_table[thread->priority] = NULL;
+}
+
+// -------------------------------------------------------------------------
+// Test the given priority for uniqueness
+
+cyg_bool Cyg_Scheduler_Implementation::unique( cyg_priority priority)
+{
+ CYG_REPORT_FUNCTION();
+
+ return thread_table[priority] == NULL;
+}
+
+
+//==========================================================================
+// Cyg_Cyg_SchedThread_Implementation class members
+
+Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation
+(
+ CYG_ADDRWORD sched_info
+)
+{
+ CYG_REPORT_FUNCTION();
+
+#if 1
+ // Assign this thread's priority to the supplied sched_info
+ // or the next highest priority available.
+
+ priority = cyg_priority(sched_info);
+
+ while( !Cyg_Scheduler::scheduler.unique(priority) )
+ priority++;
+
+#else
+ // Assign initial priorities to threads in descending order of
+ // creation.
+
+ static cyg_priority init_priority = 0;
+
+ priority = init_priority++;
+#endif
+
+}
+
+// -------------------------------------------------------------------------
+
+void Cyg_SchedThread_Implementation::yield()
+{
+ CYG_REPORT_FUNCTION();
+
+ // We cannot yield in this scheduler
+}
+
+//==========================================================================
+// Cyg_ThreadQueue_Implementation class members
+
+Cyg_ThreadQueue_Implementation::Cyg_ThreadQueue_Implementation()
+{
+ CYG_REPORT_FUNCTION();
+
+ wait_queue = 0; // empty queue
+
+ CYG_REPORT_RETURN();
+}
+
+
+void Cyg_ThreadQueue_Implementation::enqueue(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+
+ wait_queue |= 1<<thread->priority;
+ thread->queue = CYG_CLASSFROMBASE(Cyg_ThreadQueue,
+ Cyg_ThreadQueue_Implementation,
+ this);
+}
+
+// -------------------------------------------------------------------------
+
+Cyg_Thread *Cyg_ThreadQueue_Implementation::dequeue()
+{
+ CYG_REPORT_FUNCTION();
+
+ // Isolate ls bit in run_queue.
+ cyg_sched_bitmap next_thread = wait_queue & -wait_queue;
+
+ if( next_thread == 0 ) return NULL;
+
+ wait_queue &= ~next_thread;
+
+ cyg_uint32 index;
+
+ HAL_LSBIT_INDEX(index, next_thread);
+
+ Cyg_Thread *thread = Cyg_Scheduler::scheduler.thread_table[index];
+
+ thread->queue = NULL;
+
+ return thread;
+}
+
+// -------------------------------------------------------------------------
+
+Cyg_Thread *Cyg_ThreadQueue_Implementation::highpri()
+{
+ CYG_REPORT_FUNCTION();
+
+ // Isolate ls bit in run_queue.
+ cyg_sched_bitmap next_thread = wait_queue & -wait_queue;
+
+ if( next_thread == 0 ) return NULL;
+
+ cyg_uint32 index;
+
+ HAL_LSBIT_INDEX(index, next_thread);
+
+ return Cyg_Scheduler::scheduler.thread_table[index];
+}
+
+// -------------------------------------------------------------------------
+
+void Cyg_ThreadQueue_Implementation::remove(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+
+ wait_queue &= ~(1<<thread->priority);
+ thread->queue = NULL;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// EOF sched/bitmap.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/sched/lottery.cxx b/cesar/ecos/packages/kernel/current/src/sched/lottery.cxx
new file mode 100644
index 0000000000..128f189e47
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/sched/lottery.cxx
@@ -0,0 +1,456 @@
+//==========================================================================
+//
+// sched/lottery.cxx
+//
+// Lottery scheduler class implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-16
+// Purpose: Lottery scheduler class implementation
+// Description: This file contains the implementations of
+// Cyg_Scheduler_Implementation and
+// Cyg_SchedThread_Implementation.
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <cyg/kernel/sched.hxx> // our header
+#include <cyg/kernel/intr.hxx> // interrupt defines, for Cyg_HAL_Clock
+
+#include <cyg/hal/hal_arch.h> // Architecture specific definitions
+
+
+#include <cyg/kernel/thread.inl> // thread inlines
+#include <cyg/kernel/sched.inl> // scheduler inlines
+
+#ifdef CYGSEM_KERNEL_SCHED_LOTTERY
+
+#define CYG_ENABLE_TRACE 1
+
+//==========================================================================
+// Cyg_Scheduler_Implementation class static members
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE
+
+cyg_count32 Cyg_Scheduler_Implementation::timeslice_count =
+ CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS;
+
+#endif
+
+//==========================================================================
+// Cyg_Scheduler_Implementation class members
+
+// -------------------------------------------------------------------------
+// Constructor.
+
+Cyg_Scheduler_Implementation::Cyg_Scheduler_Implementation()
+{
+ CYG_REPORT_FUNCTION();
+
+ total_tickets = 0;
+ rand_seed = 1;
+}
+
+// -------------------------------------------------------------------------
+// Choose the best thread to run next
+
+Cyg_Thread *Cyg_Scheduler_Implementation::schedule()
+{
+ CYG_REPORT_FUNCTION();
+
+#ifdef CYGPKG_HAL_POWERPC
+
+ // PowerPc specific version of random number generator.
+ register cyg_int32 r1 asm("r4");
+ r1 = rand_seed;
+ asm(
+ "li 7,0;"
+ "ori 7,7,33614;"
+ "mulhwu 5,7,%0;"
+ "mullw 6,7,%0;"
+ "srawi 6,6,1;"
+ "add %0,5,6;"
+ "cmpwi %0,0;"
+ "bge 1f;"
+ "slwi %0,%0,1;"
+ "srwi %0,%0,1;"
+ "addi %0,%0,1;"
+ "1:;"
+ : "=r"(r1)
+ : "0"(r1)
+ : "r5", "r6", "r7"
+ );
+ rand_seed = r1;
+
+#else
+#if 1
+ rand_seed = (rand_seed * 1103515245) + 1234;
+ cyg_int32 r1 = rand_seed & 0x7FFFFFFF;
+#else
+ // Generic implementation of RNG.
+#if( CYG_BYTEORDER == CYG_MSBFIRST )
+#define _LO 1
+#define _HI 0
+#else
+#define _LO 0
+#define _HI 1
+#endif
+ union { cyg_int64 r64; cyg_int32 r32[2]; } u;
+ u.r64 = (cyg_int64)rand_seed * 33614LL;
+ cyg_int32 r1 = u.r32[_HI] + (u.r32[_LO]>>1);
+ if( r1 < 0 )
+ r1 = (r1 & 0x7FFFFFFF) + 1;
+ rand_seed = r1;
+#undef _LO
+#undef _HI
+#endif
+#endif
+
+ cyg_int32 ticket = r1 % total_tickets;
+ cyg_int32 tick = ticket;
+ Cyg_Thread *thread = run_queue.highpri();
+
+ // Search the run queue for the thread with the
+ // given ticket.
+ while( ticket > 0 )
+ {
+ ticket -= thread->priority;
+ if( ticket <= 0 ) break;
+ thread = thread->next;
+
+ CYG_ASSERT( thread != run_queue.highpri(), "Looping in scheduler");
+ }
+
+ CYG_TRACE3( CYG_ENABLE_TRACE,
+ "seed %08x ticket %d thread %08x",
+ rand_seed, tick, thread);
+
+ // If the thread has any compensation tickets, take them away since
+ // it has just won.
+
+ if( thread->compensation_tickets > 0 )
+ {
+ thread->priority -= thread->compensation_tickets;
+ total_tickets -= thread->compensation_tickets;
+ thread->compensation_tickets = 0;
+ }
+
+ // Re-insert thread at head of list. This reduces runtime by
+ // putting the large ticket holders at the front of the list.
+
+// run_queue.remove(thread);
+// run_queue.enqueue(thread);
+
+ CYG_CHECK_DATA_PTR( thread, "Invalid next thread pointer");
+ CYG_ASSERTCLASS( thread, "Bad next thread" );
+
+ return thread;
+}
+
+// -------------------------------------------------------------------------
+
+void Cyg_Scheduler_Implementation::add_thread(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+
+ // If the thread is on some other queue, remove it
+ // here.
+ if( thread->queue != NULL )
+ {
+ thread->queue->remove(thread);
+ thread->queue = NULL;
+ }
+
+ total_tickets += thread->priority;
+
+ run_queue.enqueue(thread);
+}
+
+// -------------------------------------------------------------------------
+
+void Cyg_Scheduler_Implementation::rem_thread(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+
+ run_queue.remove(thread);
+
+ total_tickets -= thread->priority;
+
+ // Compensate the thread for the segment of the quantum that
+ // it used. This makes it more likely to win the lottery next time
+ // it is scheduled. We only do this for threads that have voluntarily
+ // given up the CPU.
+
+// if( thread->get_state() != Cyg_Thread::RUNNING )
+ {
+#if 0
+ cyg_uint32 hal_ticks;
+ HAL_CLOCK_READ( &hal_ticks );
+ thread->compensation_tickets = thread->priority *
+ CYGNUM_KERNEL_COUNTERS_RTC_PERIOD / hal_ticks;
+#else
+ thread->compensation_tickets = (thread->priority *
+ CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS) / timeslice_count;
+
+#endif
+ thread->priority += thread->compensation_tickets;
+ }
+}
+
+// -------------------------------------------------------------------------
+// register thread with scheduler
+
+void Cyg_Scheduler_Implementation::register_thread(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+
+ // No registration necessary in this scheduler
+}
+
+// -------------------------------------------------------------------------
+
+// deregister thread
+void Cyg_Scheduler_Implementation::deregister_thread(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+
+ // No registration necessary in this scheduler
+}
+
+// -------------------------------------------------------------------------
+// Test the given priority for uniqueness
+
+cyg_bool Cyg_Scheduler_Implementation::unique( cyg_priority priority)
+{
+ CYG_REPORT_FUNCTION();
+
+ // Priorities are not unique
+ return true;
+}
+
+//==========================================================================
+// Support for timeslicing option
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE
+
+void Cyg_Scheduler_Implementation::timeslice()
+{
+ CYG_REPORT_FUNCTION();
+
+ if( --timeslice_count <= 0 )
+ {
+ CYG_INSTRUMENT_SCHED(TIMESLICE,0,0);
+
+ // Force a reschedule on each timeslice
+ need_reschedule = true;
+ timeslice_count = CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS;
+ }
+}
+
+#endif
+
+//==========================================================================
+// Cyg_Cyg_SchedThread_Implementation class members
+
+Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation
+(
+ CYG_ADDRWORD sched_info
+)
+{
+ CYG_REPORT_FUNCTION();
+
+ priority = cyg_priority(sched_info);
+
+ // point the next and prev field at this thread.
+
+ next = prev = CYG_CLASSFROMBASE(Cyg_Thread,
+ Cyg_SchedThread_Implementation,
+ this);
+}
+
+// -------------------------------------------------------------------------
+// Insert thread in front of this
+
+void Cyg_SchedThread_Implementation::insert( Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+
+ thread->next = CYG_CLASSFROMBASE(Cyg_Thread,
+ Cyg_SchedThread_Implementation,
+ this);
+ thread->prev = prev;
+ prev->next = thread;
+ prev = thread;
+}
+
+// -------------------------------------------------------------------------
+// remove this from queue
+
+void Cyg_SchedThread_Implementation::remove()
+{
+ CYG_REPORT_FUNCTION();
+
+ next->prev = prev;
+ prev->next = next;
+ next = prev = CYG_CLASSFROMBASE(Cyg_Thread,
+ Cyg_SchedThread_Implementation,
+ this);
+}
+
+// -------------------------------------------------------------------------
+// Yield the processor to another thread
+
+void Cyg_SchedThread_Implementation::yield()
+{
+ CYG_REPORT_FUNCTION();
+
+
+}
+
+//==========================================================================
+// Cyg_ThreadQueue_Implementation class members
+
+void Cyg_ThreadQueue_Implementation::enqueue(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+
+ // Always put thread at head of queue
+ if( queue == NULL ) queue = thread;
+ else
+ {
+ queue->insert(thread);
+// queue->next->insert(thread);
+// queue = thread;
+ }
+
+ thread->queue = CYG_CLASSFROMBASE(Cyg_ThreadQueue,
+ Cyg_ThreadQueue_Implementation,
+ this);
+}
+
+// -------------------------------------------------------------------------
+
+Cyg_Thread *Cyg_ThreadQueue_Implementation::dequeue()
+{
+ CYG_REPORT_FUNCTION();
+
+ if( queue == NULL ) return NULL;
+
+ Cyg_Thread *thread = queue;
+
+ if( thread->next == thread )
+ {
+ // sole thread on list, NULL out ptr
+ queue = NULL;
+ }
+ else
+ {
+ // advance to next and remove thread
+ queue = thread->next;
+ thread->remove();
+ }
+
+ thread->queue = NULL;
+
+ return thread;
+}
+
+// -------------------------------------------------------------------------
+
+Cyg_Thread *Cyg_ThreadQueue_Implementation::highpri()
+{
+ CYG_REPORT_FUNCTION();
+
+ return queue;
+}
+
+// -------------------------------------------------------------------------
+
+void Cyg_ThreadQueue_Implementation::remove(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+
+ // If the thread we want is the at the head
+ // of the list, and is on its own, clear the
+ // list and return. Otherwise advance to the
+ // next thread and remove ours. If the thread
+ // is not at the head of the list, just dequeue
+ // it.
+
+ thread->queue = NULL;
+
+ if( queue == thread )
+ {
+ if( thread->next == thread )
+ {
+ queue = NULL;
+ return;
+ }
+ else queue = thread->next;
+ }
+
+ thread->Cyg_SchedThread_Implementation::remove();
+
+}
+
+// -------------------------------------------------------------------------
+// Rotate the front thread on the queue to the back.
+
+void Cyg_ThreadQueue_Implementation::rotate()
+{
+ CYG_REPORT_FUNCTION();
+
+ queue = queue->next;
+}
+
+// -------------------------------------------------------------------------
+
+#endif
+
+// -------------------------------------------------------------------------
+// EOF sched/lottery.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/sched/mlqueue.cxx b/cesar/ecos/packages/kernel/current/src/sched/mlqueue.cxx
new file mode 100644
index 0000000000..8acadf76a3
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/sched/mlqueue.cxx
@@ -0,0 +1,885 @@
+//==========================================================================
+//
+// sched/mlqueue.cxx
+//
+// Multi-level queue scheduler class implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: jlarmour
+// Date: 1999-02-17
+// Purpose: Multilevel queue scheduler class implementation
+// Description: This file contains the implementations of
+// Cyg_Scheduler_Implementation and
+// Cyg_SchedThread_Implementation.
+//
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#include <cyg/kernel/sched.hxx> // our header
+
+#include <cyg/hal/hal_arch.h> // Architecture specific definitions
+
+#include <cyg/kernel/thread.inl> // thread inlines
+#include <cyg/kernel/sched.inl> // scheduler inlines
+
+#ifdef CYGSEM_KERNEL_SCHED_MLQUEUE
+
+//==========================================================================
+// Cyg_Scheduler_Implementation class static members
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE
+
+cyg_ucount32 Cyg_Scheduler_Implementation::timeslice_count[CYGNUM_KERNEL_CPU_MAX];
+
+#endif
+
+
+//==========================================================================
+// Cyg_Scheduler_Implementation class members
+
+// -------------------------------------------------------------------------
+// Constructor.
+
+Cyg_Scheduler_Implementation::Cyg_Scheduler_Implementation()
+{
+ CYG_REPORT_FUNCTION();
+
+ queue_map = 0;
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+
+ pending_map = 0;
+
+ for( int i = 0; i < CYGNUM_KERNEL_SCHED_PRIORITIES; i++ )
+ pending[i] = 0;
+
+#endif
+
+ for( int i = 0; i < CYGNUM_KERNEL_CPU_MAX; i++ )
+ {
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE
+ timeslice_count[i] = CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS;
+#endif
+ need_reschedule[i] = true;
+ }
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Choose the best thread to run next
+
+Cyg_Thread *
+Cyg_Scheduler_Implementation::schedule(void)
+{
+ CYG_REPORT_FUNCTYPE("returning thread %08x");
+
+ // The run queue may _never_ be empty, there is always
+ // an idle thread at the lowest priority.
+
+ CYG_ASSERT( queue_map != 0, "Run queue empty");
+ CYG_ASSERT( queue_map & (1<<CYG_THREAD_MIN_PRIORITY), "Idle thread vanished!!!");
+ CYG_ASSERT( !run_queue[CYG_THREAD_MIN_PRIORITY].empty(), "Idle thread vanished!!!");
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+
+ Cyg_Thread *current = get_current_thread();
+ register cyg_uint32 index;
+
+ CYG_ASSERT( current->cpu != CYG_KERNEL_CPU_NONE, "Current thread does not have CPU set!");
+
+ // If the current thread is still runnable, return it to pending
+ // state so that it can be considered alongside any other threads
+ // for execution.
+ if( current->get_state() == Cyg_Thread::RUNNING )
+ {
+ current->cpu = CYG_KERNEL_CPU_NONE;
+ pending[current->priority]++;
+ pending_map |= (1<<current->priority);
+ }
+ else
+ {
+ // Otherwise, ensure that the thread is no longer marked as
+ // running.
+ current->cpu = CYG_KERNEL_CPU_NONE;
+ }
+
+
+ HAL_LSBIT_INDEX(index, pending_map);
+
+ Cyg_RunQueue *queue = &run_queue[index];
+
+ CYG_ASSERT( !queue->empty(), "Queue for index empty");
+ CYG_ASSERT( pending[index] > 0, "Pending array and map disagree");
+
+ Cyg_Thread *thread = queue->get_head();
+
+ // We know there is a runnable thread in this queue, If the thread
+ // we got is not it, scan until we find it. While not constant time,
+ // this search has an upper bound of the number of CPUs in the system.
+
+ while( thread->cpu != CYG_KERNEL_CPU_NONE )
+ thread = thread->get_next();
+
+ // Take newly scheduled thread out of pending map
+ thread->cpu = CYG_KERNEL_CPU_THIS();
+ if( --pending[index] == 0 )
+ pending_map &= ~(1<<index);
+
+#else
+
+ register cyg_uint32 index;
+
+ HAL_LSBIT_INDEX(index, queue_map);
+
+ Cyg_RunQueue *queue = &run_queue[index];
+
+ CYG_ASSERT( !queue->empty(), "Queue for index empty");
+
+ Cyg_Thread *thread = queue->get_head();
+
+#endif
+
+ CYG_INSTRUMENT_MLQ( SCHEDULE, thread, index);
+
+ CYG_ASSERT( thread != NULL , "No threads in run queue");
+ CYG_ASSERT( thread->queue == NULL , "Runnable thread on a queue!");
+
+ CYG_REPORT_RETVAL(thread);
+
+ return thread;
+}
+
+// -------------------------------------------------------------------------
+
+void
+Cyg_Scheduler_Implementation::add_thread(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("thread=%08x", thread);
+
+ cyg_priority pri = thread->priority;
+ Cyg_RunQueue *queue = &run_queue[pri];
+
+ CYG_INSTRUMENT_MLQ( ADD, thread, pri);
+
+ CYG_ASSERT((CYG_THREAD_MIN_PRIORITY >= pri)
+ && (CYG_THREAD_MAX_PRIORITY <= pri),
+ "Priority out of range!");
+
+ CYG_ASSERT( ((queue_map & (1<<pri))!=0) == ((!run_queue[pri].empty())!=0), "Map and queue disagree");
+
+ // If the thread is on some other queue, remove it
+ // here.
+ if( thread->queue != NULL )
+ {
+ thread->queue->remove(thread);
+ }
+
+ if( queue->empty() )
+ {
+ // set the map bit and ask for a reschedule if this is a
+ // new highest priority thread.
+
+ queue_map |= (1<<pri);
+
+ }
+ // else the queue already has an occupant, queue behind him
+
+ queue->add_tail(thread);
+
+ // If the new thread is higher priority than any
+ // current thread, request a reschedule.
+
+ set_need_reschedule(thread);
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+
+ // If the thread is not currently running, increment the pending
+ // count for the priority, and if necessary set the bit in the
+ // pending map.
+
+ if( thread->cpu == CYG_KERNEL_CPU_NONE )
+ {
+ if( pending[pri]++ == 0 )
+ pending_map |= (1<<pri);
+ }
+ // Otherwise the pending count will be dealt with in schedule().
+
+#endif
+
+ CYG_ASSERT( thread->queue == NULL , "Runnable thread on a queue!");
+ CYG_ASSERT( queue_map != 0, "Run queue empty");
+ CYG_ASSERT( queue_map & (1<<pri), "Queue map bit not set for pri");
+ CYG_ASSERT( !run_queue[pri].empty(), "Queue for pri empty");
+ CYG_ASSERT( ((queue_map & (1<<pri))!=0) == ((!run_queue[pri].empty())!=0), "Map and queue disagree");
+ CYG_ASSERT( queue_map & (1<<CYG_THREAD_MIN_PRIORITY), "Idle thread vanished!!!");
+ CYG_ASSERT( !run_queue[CYG_THREAD_MIN_PRIORITY].empty(), "Idle thread vanished!!!");
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+
+void
+Cyg_Scheduler_Implementation::rem_thread(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("thread=%08x", thread);
+
+ CYG_ASSERT( queue_map != 0, "Run queue empty");
+
+ cyg_priority pri = thread->priority;
+ Cyg_RunQueue *queue = &run_queue[pri];
+
+ CYG_INSTRUMENT_MLQ( REM, thread, pri);
+
+ CYG_ASSERT( pri != CYG_THREAD_MIN_PRIORITY, "Idle thread trying to sleep!");
+ CYG_ASSERT( !run_queue[CYG_THREAD_MIN_PRIORITY].empty(), "Idle thread vanished!!!");
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+
+ if( thread->cpu == CYG_KERNEL_CPU_NONE )
+ {
+ // If the thread is not running, then we need to adjust the
+ // pending count array and map if necessary.
+
+ if( --pending[pri] == 0 )
+ pending_map &= ~(1<<pri);
+ }
+ else
+ {
+ // If the target thread is currently running on a different
+ // CPU, send a reschedule interrupt there to deschedule it.
+ if( thread->cpu != CYG_KERNEL_CPU_THIS() )
+ CYG_KERNEL_CPU_RESCHEDULE_INTERRUPT( thread->cpu, 0 );
+ }
+ // If the thread is current running on this CPU, then the pending
+ // count will be dealt with in schedule().
+
+#endif
+
+ CYG_ASSERT( queue_map & (1<<pri), "Queue map bit not set for pri");
+ CYG_ASSERT( !run_queue[pri].empty(), "Queue for pri empty");
+
+ // remove thread from queue
+ queue->remove(thread);
+
+ if( queue->empty() )
+ {
+ // If this was only thread in
+ // queue, clear map.
+
+ queue_map &= ~(1<<pri);
+ }
+
+ CYG_ASSERT( queue_map != 0, "Run queue empty");
+ CYG_ASSERT( queue_map & (1<<CYG_THREAD_MIN_PRIORITY), "Idle thread vanished!!!");
+ CYG_ASSERT( !run_queue[CYG_THREAD_MIN_PRIORITY].empty(), "Idle thread vanished!!!");
+ CYG_ASSERT( ((queue_map & (1<<pri))!=0) == ((!run_queue[pri].empty())!=0), "Map and queue disagree");
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Set the need_reschedule flag
+// This function overrides the definition in Cyg_Scheduler_Base and tests
+// for a reschedule condition based on the priorities of the given thread
+// and the current thread(s).
+
+void Cyg_Scheduler_Implementation::set_need_reschedule(Cyg_Thread *thread)
+{
+#ifndef CYGPKG_KERNEL_SMP_SUPPORT
+
+ if( current_thread[0]->priority > thread->priority ||
+ current_thread[0]->get_state() != Cyg_Thread::RUNNING )
+ need_reschedule[0] = true;
+
+#else
+
+ HAL_SMP_CPU_TYPE cpu_this = CYG_KERNEL_CPU_THIS();
+ HAL_SMP_CPU_TYPE cpu_count = CYG_KERNEL_CPU_COUNT();
+
+ // Start with current CPU. If we can do the job locally then
+ // that is most efficient. Only go on to other CPUs if that is
+ // not possible.
+
+ for(int i = 0; i < cpu_count; i++)
+ {
+ HAL_SMP_CPU_TYPE cpu =
+ HAL_SMP_CPU_COUNT2IDX ( (i + HAL_SMP_CPU_IDX2COUNT( cpu_this ) ) % cpu_count );
+
+ // If a CPU is not already marked for rescheduling, and its
+ // current thread is of lower priority than _thread_, then
+ // set its need_reschedule flag.
+
+ Cyg_Thread *cur = current_thread[cpu];
+
+ if( (!need_reschedule[cpu]) &&
+ (cur->priority > thread->priority)
+ )
+ {
+ need_reschedule[cpu] = true;
+
+ if( cpu != cpu_this )
+ {
+ // All processors other than this one need to be sent
+ // a reschedule interrupt.
+
+ CYG_INSTRUMENT_SMP( RESCHED_SEND, cpu, 0 );
+ CYG_KERNEL_CPU_RESCHEDULE_INTERRUPT( cpu, 0 );
+ }
+
+ // Having notionally rescheduled _thread_ onto the cpu, we
+ // now see if we can reschedule the former current thread of
+ // that CPU onto another.
+
+ thread = cur;
+ }
+ }
+
+#endif
+}
+
+// -------------------------------------------------------------------------
+// Set up initial idle thread
+
+void Cyg_Scheduler_Implementation::set_idle_thread( Cyg_Thread *thread, HAL_SMP_CPU_TYPE cpu )
+{
+ // Make the thread the current thread for this CPU.
+
+ current_thread[cpu] = thread;
+
+ // This will insert the thread in the run queues and make it
+ // available to execute.
+ thread->resume();
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+
+ thread->cpu = cpu;
+
+ // In SMP, we need to take this thread out of the pending array
+ // and map.
+
+ cyg_priority pri = thread->priority;
+ if( --pending[pri] == 0 )
+ pending_map &= ~(1<<pri);
+#endif
+
+}
+
+// -------------------------------------------------------------------------
+// register thread with scheduler
+
+void
+Cyg_Scheduler_Implementation::register_thread(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("thread=%08x", thread);
+ // No registration necessary in this scheduler
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+
+// deregister thread
+void
+Cyg_Scheduler_Implementation::deregister_thread(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("thread=%08x", thread);
+ // No registration necessary in this scheduler
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Test the given priority for uniqueness
+
+cyg_bool
+Cyg_Scheduler_Implementation::unique( cyg_priority priority)
+{
+ CYG_REPORT_FUNCTYPE("returning %d");
+ CYG_REPORT_FUNCARG1("priority=%d", priority);
+ // Priorities are not unique
+ CYG_REPORT_RETVAL(true);
+ return true;
+}
+
+//==========================================================================
+// Support for timeslicing option
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE
+
+// -------------------------------------------------------------------------
+
+void
+Cyg_Scheduler_Implementation::timeslice(void)
+{
+#ifdef CYGDBG_KERNEL_TRACE_TIMESLICE
+ CYG_REPORT_FUNCTION();
+#endif
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+
+ int c;
+ HAL_SMP_CPU_TYPE cpu;
+ HAL_SMP_CPU_TYPE cpu_count = CYG_KERNEL_CPU_COUNT();
+ HAL_SMP_CPU_TYPE cpu_this = CYG_KERNEL_CPU_THIS();
+
+ for( c = 0; c < cpu_count; c++ )
+ {
+ cpu = HAL_SMP_CPU_COUNT2IDX(c);
+
+ if( --timeslice_count[cpu] == 0 )
+ if( cpu == cpu_this )
+ timeslice_cpu();
+ else CYG_KERNEL_CPU_TIMESLICE_INTERRUPT( cpu, 0 );
+ }
+
+#else
+
+ if( --timeslice_count[CYG_KERNEL_CPU_THIS()] == 0 )
+ timeslice_cpu();
+
+#endif
+
+#ifdef CYGDBG_KERNEL_TRACE_TIMESLICE
+ CYG_REPORT_RETURN();
+#endif
+}
+
+// -------------------------------------------------------------------------
+
+void
+Cyg_Scheduler_Implementation::timeslice_cpu(void)
+{
+#ifdef CYGDBG_KERNEL_TRACE_TIMESLICE
+ CYG_REPORT_FUNCTION();
+#endif
+
+ Cyg_Thread *thread = get_current_thread();
+ HAL_SMP_CPU_TYPE cpu_this = CYG_KERNEL_CPU_THIS();
+
+ CYG_ASSERT( queue_map != 0, "Run queue empty");
+ CYG_ASSERT( queue_map & (1<<CYG_THREAD_MIN_PRIORITY), "Idle thread vanished!!!");
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE_ENABLE
+ if( thread->timeslice_enabled &&
+ timeslice_count[cpu_this] == 0 )
+#else
+ if( timeslice_count[cpu_this] == 0 )
+#endif
+ {
+ CYG_INSTRUMENT_SCHED(TIMESLICE,0,0);
+#ifdef CYGDBG_KERNEL_TRACE_TIMESLICE
+ CYG_TRACE0( true, "quantum consumed, time to reschedule" );
+#endif
+
+ CYG_ASSERT( get_sched_lock() > 0 , "Timeslice called with zero sched_lock");
+
+ // Only try to rotate the run queue if the current thread is running.
+ // Otherwise we are going to reschedule anyway.
+ if( thread->get_state() == Cyg_Thread::RUNNING )
+ {
+ Cyg_Scheduler *sched = &Cyg_Scheduler::scheduler;
+
+ CYG_INSTRUMENT_MLQ( TIMESLICE, thread, 0);
+
+ CYG_ASSERTCLASS( thread, "Bad current thread");
+ CYG_ASSERTCLASS( sched, "Bad scheduler");
+
+ cyg_priority pri = thread->priority;
+ Cyg_RunQueue *queue = &sched->run_queue[pri];
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+
+ // In SMP systems we set the head of the queue to point to
+ // the thread immediately after the current
+ // thread. schedule() will then pick that thread, or one
+ // after it to run next.
+
+ queue->to_head( thread->get_next() );
+#else
+ queue->rotate();
+#endif
+
+ if( queue->get_head() != thread )
+ sched->set_need_reschedule();
+
+ timeslice_count[cpu_this] = CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS;
+ }
+ }
+
+
+ CYG_ASSERT( queue_map & (1<<CYG_THREAD_MIN_PRIORITY), "Idle thread vanished!!!");
+ CYG_ASSERT( !run_queue[CYG_THREAD_MIN_PRIORITY].empty(), "Idle thread vanished!!!");
+#ifdef CYGDBG_KERNEL_TRACE_TIMESLICE
+ CYG_REPORT_RETURN();
+#endif
+}
+
+// -------------------------------------------------------------------------
+
+__externC void cyg_scheduler_timeslice_cpu(void)
+{
+ Cyg_Scheduler::scheduler.timeslice_cpu();
+}
+
+#endif
+
+//==========================================================================
+// Cyg_SchedThread_Implementation class members
+
+Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation
+(
+ CYG_ADDRWORD sched_info
+)
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("sched_info=%08x", sched_info);
+
+ // Set priority to the supplied value.
+ priority = (cyg_priority)sched_info;
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE_ENABLE
+ // If timeslice_enabled exists, set it true by default
+ timeslice_enabled = true;
+#endif
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+ cpu = CYG_KERNEL_CPU_NONE;
+#endif
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Yield the processor to another thread
+
+void
+Cyg_SchedThread_Implementation::yield(void)
+{
+ CYG_REPORT_FUNCTION();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ Cyg_Thread *thread = CYG_CLASSFROMBASE(Cyg_Thread,
+ Cyg_SchedThread_Implementation,
+ this);
+
+ // Only do this if this thread is running. If it is not, there
+ // is no point.
+
+ if( thread->get_state() == Cyg_Thread::RUNNING )
+ {
+ // To yield we simply rotate the appropriate
+ // run queue to the next thread and reschedule.
+
+ CYG_INSTRUMENT_MLQ( YIELD, thread, 0);
+
+ CYG_ASSERTCLASS( thread, "Bad current thread");
+
+ Cyg_Scheduler *sched = &Cyg_Scheduler::scheduler;
+
+ CYG_ASSERTCLASS( sched, "Bad scheduler");
+
+ cyg_priority pri = thread->priority;
+ Cyg_RunQueue *queue = &sched->run_queue[pri];
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+
+ // In SMP systems we set the head of the queue to point to
+ // the thread immediately after the current
+ // thread. schedule() will then pick that thread, or one
+ // after it to run next.
+
+ queue->to_head( thread->get_next() );
+#else
+ queue->rotate();
+#endif
+
+ if( queue->get_head() != thread )
+ sched->set_need_reschedule();
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE
+ // Reset the timeslice counter so that this thread gets a full
+ // quantum.
+ else Cyg_Scheduler::reset_timeslice_count();
+#endif
+ }
+
+ // Unlock the scheduler and switch threads
+#ifdef CYGDBG_USE_ASSERTS
+ // This test keeps the assertions in unlock_inner() happy if
+ // need_reschedule was not set above.
+ if( !Cyg_Scheduler::get_need_reschedule() )
+ Cyg_Scheduler::unlock();
+ else
+#endif
+ Cyg_Scheduler::unlock_reschedule();
+
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Rotate the run queue at a specified priority.
+// (pri is the decider, not this, so the routine is static)
+
+void
+Cyg_SchedThread_Implementation::rotate_queue( cyg_priority pri )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("priority=%d", pri);
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ Cyg_Scheduler *sched = &Cyg_Scheduler::scheduler;
+
+ CYG_ASSERTCLASS( sched, "Bad scheduler");
+
+ Cyg_RunQueue *queue = &sched->run_queue[pri];
+
+ if ( !queue->empty() ) {
+ queue->rotate();
+ sched->set_need_reschedule();
+ }
+
+ // Unlock the scheduler and switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Move this thread to the head of its queue
+// (not necessarily a scheduler queue)
+
+void
+Cyg_SchedThread_Implementation::to_queue_head( void )
+{
+ CYG_REPORT_FUNCTION();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ Cyg_Thread *thread = CYG_CLASSFROMBASE(Cyg_Thread,
+ Cyg_SchedThread_Implementation,
+ this);
+
+ CYG_ASSERTCLASS( thread, "Bad current thread");
+
+ Cyg_ThreadQueue *q = thread->get_current_queue();
+ if( q != NULL )
+ q->to_head( thread );
+ else if( thread->in_list() )
+ {
+ // If the queue pointer is NULL then it is on a run
+ // queue. Move the thread to the head of it's priority list
+ // and force a reschedule.
+
+ Cyg_Scheduler *sched = &Cyg_Scheduler::scheduler;
+ sched->run_queue[thread->priority].to_head( thread );
+ sched->set_need_reschedule( thread );
+ }
+
+ // Unlock the scheduler and switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+//==========================================================================
+// Cyg_ThreadQueue_Implementation class members
+
+// -------------------------------------------------------------------------
+
+void
+Cyg_ThreadQueue_Implementation::enqueue(Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("thread=%08x", thread);
+
+ CYG_INSTRUMENT_MLQ( ENQUEUE, this, thread );
+
+#ifdef CYGIMP_KERNEL_SCHED_SORTED_QUEUES
+
+ // Insert the thread into the queue in priority order.
+
+ Cyg_Thread *qhead = get_head();
+
+ if( qhead == NULL ) add_tail( thread );
+ else if( qhead == qhead->get_next() )
+ {
+ // There is currently only one thread in the queue, join it
+ // and adjust the queue pointer to point to the highest
+ // priority of the two. If they are the same priority,
+ // leave the pointer pointing to the oldest.
+
+ qhead->insert( thread );
+
+ if( thread->priority < qhead->priority )
+ to_head(thread);
+ }
+ else
+ {
+ // There is more than one thread in the queue. First check
+ // whether we are of higher priority than the head and if
+ // so just jump in at the front. Also check whether we are
+ // lower priority than the tail and jump onto the end.
+ // Otherwise we really have to search the queue to find
+ // our place.
+
+ if( thread->priority < qhead->priority )
+ {
+ qhead->insert( thread );
+ to_head(thread);
+ }
+ else if( thread->priority > get_tail()->priority )
+ {
+ // We are lower priority than any thread in the queue,
+ // go in at the end.
+
+ add_tail( thread );
+ }
+ else
+ {
+ // Search the queue. We do this backwards so that we
+ // always add new threads after any that have the same
+ // priority.
+
+ // Because of the previous tests we know that this
+ // search will terminate before we hit the head of the
+ // queue, hence we do not need to check for that
+ // condition.
+
+ Cyg_Thread *qtmp = get_tail();
+
+ // Scan the queue until we find a higher or equal
+ // priority thread.
+
+ while( qtmp->priority > thread->priority )
+ qtmp = qtmp->get_prev();
+
+ // Append ourself after the node pointed to by qtmp.
+
+ qtmp->append( thread );
+ }
+ }
+#else
+ // Just add the thread to the tail of the list
+ add_tail( thread );
+#endif
+
+ thread->queue = CYG_CLASSFROMBASE(Cyg_ThreadQueue,
+ Cyg_ThreadQueue_Implementation,
+ this);
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+
+Cyg_Thread *
+Cyg_ThreadQueue_Implementation::dequeue(void)
+{
+ CYG_REPORT_FUNCTYPE("returning thread %08x");
+
+ Cyg_Thread *thread = rem_head();
+
+ CYG_INSTRUMENT_MLQ( DEQUEUE, this, thread );
+
+ if( thread != NULL )
+ thread->queue = NULL;
+
+ CYG_REPORT_RETVAL(thread);
+ return thread;
+}
+
+// -------------------------------------------------------------------------
+
+void
+Cyg_ThreadQueue_Implementation::remove( Cyg_Thread *thread )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_REPORT_FUNCARG1("thread=%08x", thread);
+
+ CYG_INSTRUMENT_MLQ( REMOVE, this, thread );
+
+ thread->queue = NULL;
+
+ Cyg_CList_T<Cyg_Thread>::remove( thread );
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+
+Cyg_Thread *
+Cyg_ThreadQueue_Implementation::highpri(void)
+{
+ CYG_REPORT_FUNCTYPE("returning thread %08x");
+ CYG_REPORT_RETVAL(get_head());
+ return get_head();
+}
+
+// -------------------------------------------------------------------------
+
+inline void
+Cyg_ThreadQueue_Implementation::set_thread_queue(Cyg_Thread *thread,
+ Cyg_ThreadQueue *tq )
+
+{
+ thread->queue = tq;
+}
+
+// -------------------------------------------------------------------------
+
+#endif
+
+// -------------------------------------------------------------------------
+// EOF sched/mlqueue.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/sched/sched.cxx b/cesar/ecos/packages/kernel/current/src/sched/sched.cxx
new file mode 100644
index 0000000000..cf8249f941
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/sched/sched.cxx
@@ -0,0 +1,741 @@
+//==========================================================================
+//
+// sched/sched.cxx
+//
+// Scheduler class implementations
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-15
+// Purpose: Scheduler class implementation
+// Description: This file contains the definitions of the scheduler class
+// member functions that are common to all scheduler
+// implementations.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/instrmnt.h> // instrumentation
+
+#include <cyg/kernel/sched.hxx> // our header
+
+#include <cyg/kernel/thread.hxx> // thread classes
+#include <cyg/kernel/intr.hxx> // Interrupt interface
+
+#include <cyg/hal/hal_arch.h> // Architecture specific definitions
+
+#include <cyg/kernel/thread.inl> // thread inlines
+#include <cyg/kernel/sched.inl> // scheduler inlines
+
+//-------------------------------------------------------------------------
+// Some local tracing control - a default.
+#ifdef CYGDBG_USE_TRACING
+# if !defined( CYGDBG_INFRA_DEBUG_TRACE_ASSERT_SIMPLE ) && \
+ !defined( CYGDBG_INFRA_DEBUG_TRACE_ASSERT_FANCY )
+ // ie. not a tracing implementation that takes a long time to output
+
+# ifndef CYGDBG_KERNEL_TRACE_UNLOCK_INNER
+# define CYGDBG_KERNEL_TRACE_UNLOCK_INNER
+# endif // control not already defined
+
+# endif // trace implementation not ..._SIMPLE && not ..._FANCY
+#endif // CYGDBG_USE_TRACING
+
+// -------------------------------------------------------------------------
+// Static Cyg_Scheduler class members
+
+// We start with sched_lock at 1 so that any kernel code we
+// call during initialization will not try to reschedule.
+
+CYGIMP_KERNEL_SCHED_LOCK_DEFINITIONS;
+
+Cyg_Thread *volatile Cyg_Scheduler_Base::current_thread[CYGNUM_KERNEL_CPU_MAX];
+
+volatile cyg_bool Cyg_Scheduler_Base::need_reschedule[CYGNUM_KERNEL_CPU_MAX];
+
+Cyg_Scheduler Cyg_Scheduler::scheduler CYG_INIT_PRIORITY( SCHEDULER );
+
+volatile cyg_ucount32 Cyg_Scheduler_Base::thread_switches[CYGNUM_KERNEL_CPU_MAX];
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+
+CYG_BYTE cyg_sched_cpu_interrupt[CYGNUM_KERNEL_CPU_MAX][sizeof(Cyg_Interrupt)]
+ CYGBLD_ANNOTATE_VARIABLE_SCHED;
+
+__externC cyg_ISR cyg_hal_cpu_message_isr;
+__externC cyg_DSR cyg_hal_cpu_message_dsr;
+
+inline void *operator new(size_t size, void *ptr) { return ptr; };
+
+#endif
+
+// -------------------------------------------------------------------------
+// Scheduler unlock function.
+
+// This is only called when there is the potential for real work to be
+// done. Other cases are handled in Cyg_Scheduler::unlock() which is
+// an inline; _or_ this function may have been called from
+// Cyg_Scheduler::reschedule(), or Cyg_Scheduler::unlock_reschedule. The
+// new_lock argument contains the value that the scheduler lock should
+// have after this function has completed. If it is zero then the lock is
+// being released and some extra work (running ASRs, checking for DSRs) is
+// done before returning. If it is non-zero then it must equal the
+// current value of the lock, and is used to indicate that we want to
+// reacquire the scheduler lock before returning. This latter option
+// only makes any sense if the current thread is no longer runnable,
+// e.g. sleeping, otherwise this function will do nothing.
+// This approach of passing in the lock value at the end effectively
+// makes the scheduler lock a form of per-thread variable. Each call
+// to unlock_inner() carries with it the value the scheduler should
+// have when it reschedules this thread back, and leaves this function.
+// When it is non-zero, and the thread is rescheduled, no ASRS are run,
+// or DSRs processed. By doing this, it makes it possible for threads
+// that want to go to sleep to wake up with the scheduler lock in the
+// same state it was in before.
+
+void Cyg_Scheduler::unlock_inner( cyg_ucount32 new_lock )
+{
+#ifdef CYGDBG_KERNEL_TRACE_UNLOCK_INNER
+ CYG_REPORT_FUNCTION();
+#endif
+
+ do {
+
+ CYG_PRECONDITION( new_lock==0 ? get_sched_lock() == 1 :
+ ((get_sched_lock() == new_lock) || (get_sched_lock() == new_lock+1)),
+ "sched_lock not at expected value" );
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS
+
+ // Call any pending DSRs. Do this here to ensure that any
+ // threads that get awakened are properly scheduled.
+
+ if( new_lock == 0 && Cyg_Interrupt::DSRs_pending() )
+ Cyg_Interrupt::call_pending_DSRs();
+#endif
+
+ Cyg_Thread *current = get_current_thread();
+
+ CYG_ASSERTCLASS( current, "Bad current thread" );
+
+#ifdef CYGFUN_KERNEL_ALL_THREADS_STACK_CHECKING
+ // should have CYGVAR_KERNEL_THREADS_LIST
+ current = Cyg_Thread::get_list_head();
+ while ( current ) {
+ current->check_stack();
+ current = current->get_list_next();
+ }
+ current = get_current_thread();
+#endif
+
+#ifdef CYGFUN_KERNEL_THREADS_STACK_CHECKING
+ current->check_stack();
+#endif
+
+ // If the current thread is going to sleep, or someone
+ // wants a reschedule, choose another thread to run
+
+ if( current->state != Cyg_Thread::RUNNING || get_need_reschedule() ) {
+
+ CYG_INSTRUMENT_SCHED(RESCHEDULE,0,0);
+
+ // Get the next thread to run from scheduler
+ Cyg_Thread *next = scheduler.schedule();
+
+ CYG_CHECK_DATA_PTR( next, "Invalid next thread pointer");
+ CYG_ASSERTCLASS( next, "Bad next thread" );
+
+ if( current != next )
+ {
+
+ CYG_INSTRUMENT_THREAD(SWITCH,current,next);
+
+ // Count this thread switch
+ thread_switches[CYG_KERNEL_CPU_THIS()]++;
+
+#ifdef CYGFUN_KERNEL_THREADS_STACK_CHECKING
+ next->check_stack(); // before running it
+#endif
+
+ // Switch contexts
+ HAL_THREAD_SWITCH_CONTEXT( &current->stack_ptr,
+ &next->stack_ptr );
+
+ // Worry here about possible compiler
+ // optimizations across the above call that may try to
+ // propogate common subexpresions. We would end up
+ // with the expression from one thread in its
+ // successor. This is only a worry if we do not save
+ // and restore the complete register set. We need a
+ // way of marking functions that return into a
+ // different context. A temporary fix would be to
+ // disable CSE (-fdisable-cse) in the compiler.
+
+ // We return here only when the current thread is
+ // rescheduled. There is a bit of housekeeping to do
+ // here before we are allowed to go on our way.
+
+ CYG_CHECK_DATA_PTR( current, "Invalid current thread pointer");
+ CYG_ASSERTCLASS( current, "Bad current thread" );
+
+ current_thread[CYG_KERNEL_CPU_THIS()] = current; // restore current thread pointer
+ }
+
+#ifdef CYGSEM_KERNEL_SCHED_TIMESLICE
+ // Reset the timeslice counter so that this thread gets a full
+ // quantum.
+ reset_timeslice_count();
+#endif
+
+ clear_need_reschedule(); // finished rescheduling
+ }
+
+ if( new_lock == 0 )
+ {
+
+#ifdef CYGSEM_KERNEL_SCHED_ASR_SUPPORT
+
+ // Check whether the ASR is pending and not inhibited. If
+ // we can call it, then transfer this info to a local
+ // variable (call_asr) and clear the pending flag. Note
+ // that we only do this if the scheduler lock is about to
+ // be zeroed. In any other circumstance we are not
+ // unlocking.
+
+ cyg_bool call_asr = false;
+
+ if( (current->asr_inhibit == 0) && current->asr_pending )
+ {
+ call_asr = true;
+ current->asr_pending = false;
+ }
+#endif
+
+ HAL_REORDER_BARRIER(); // Make sure everything above has happened
+ // by this point
+ zero_sched_lock(); // Clear the lock
+ HAL_REORDER_BARRIER();
+
+#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS
+
+ // Now check whether any DSRs got posted during the thread
+ // switch and if so, go around again. Making this test after
+ // the lock has been zeroed avoids a race condition in which
+ // a DSR could have been posted during a reschedule, but would
+ // not be run until the _next_ time we release the sched lock.
+
+ if( Cyg_Interrupt::DSRs_pending() ) {
+ inc_sched_lock(); // reclaim the lock
+ continue; // go back to head of loop
+ }
+
+#endif
+ // Otherwise the lock is zero, we can return.
+
+// CYG_POSTCONDITION( get_sched_lock() == 0, "sched_lock not zero" );
+
+#ifdef CYGSEM_KERNEL_SCHED_ASR_SUPPORT
+ // If the test within the sched_lock indicating that the ASR
+ // be called was true, call it here. Calling the ASR must be
+ // the very last thing we do here, since it must run as close
+ // to "user" state as possible.
+
+ if( call_asr ) current->asr(current->asr_data);
+#endif
+
+ }
+ else
+ {
+ // If new_lock is non-zero then we restore the sched_lock to
+ // the value given.
+
+ HAL_REORDER_BARRIER();
+
+ set_sched_lock(new_lock);
+
+ HAL_REORDER_BARRIER();
+ }
+
+#ifdef CYGDBG_KERNEL_TRACE_UNLOCK_INNER
+ CYG_REPORT_RETURN();
+#endif
+ return;
+
+ } while( 1 );
+
+ CYG_FAIL( "Should not be executed" );
+}
+
+// -------------------------------------------------------------------------
+// Start the scheduler. This is called after the initial threads have been
+// created to start scheduling. It gets any other CPUs running, and then
+// enters the scheduler.
+
+void Cyg_Scheduler::start()
+{
+ CYG_REPORT_FUNCTION();
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+
+ HAL_SMP_CPU_TYPE cpu;
+
+ for( cpu = 0; cpu < CYG_KERNEL_CPU_START_COUNT(); cpu++ )
+ {
+ // Don't start this CPU, it is running already!
+ if( cpu == CYG_KERNEL_CPU_THIS() )
+ continue;
+
+ CYG_KERNEL_CPU_START( cpu );
+ }
+
+#endif
+
+ start_cpu();
+}
+
+// -------------------------------------------------------------------------
+// Start scheduling on this CPU. This is called on each CPU in the system
+// when it is started.
+
+void Cyg_Scheduler::start_cpu()
+{
+ CYG_REPORT_FUNCTION();
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+
+ // Set up the inter-CPU interrupt for this CPU
+
+ Cyg_Interrupt * intr = new( (void *)&cyg_sched_cpu_interrupt[HAL_SMP_CPU_THIS()] )
+ Cyg_Interrupt( CYGNUM_HAL_SMP_CPU_INTERRUPT_VECTOR( HAL_SMP_CPU_THIS() ),
+ 0,
+ 0,
+ cyg_hal_cpu_message_isr,
+ cyg_hal_cpu_message_dsr
+ );
+
+ intr->set_cpu( intr->get_vector(), HAL_SMP_CPU_THIS() );
+
+ intr->attach();
+
+ intr->unmask_interrupt( intr->get_vector() );
+
+#endif
+
+ // Get the first thread to run from scheduler
+ register Cyg_Thread *next = scheduler.schedule();
+
+ CYG_ASSERTCLASS( next, "Bad initial thread" );
+
+ clear_need_reschedule(); // finished rescheduling
+ set_current_thread(next); // restore current thread pointer
+
+#ifdef CYGVAR_KERNEL_COUNTERS_CLOCK
+ // Reference the real time clock. This ensures that at least one
+ // reference to the kernel_clock.o object exists, without which
+ // the object will not be included while linking.
+ CYG_REFERENCE_OBJECT( Cyg_Clock::real_time_clock );
+#endif
+
+ // Load the first thread. This will also enable interrupts since
+ // the initial state of all threads is to have interrupts enabled.
+
+ HAL_THREAD_LOAD_CONTEXT( &next->stack_ptr );
+
+}
+
+// -------------------------------------------------------------------------
+// SMP support functions
+
+#ifdef CYGPKG_KERNEL_SMP_SUPPORT
+
+// This is called on each secondary CPU on its interrupt stack after
+// the initial CPU has initialized the world.
+
+externC void cyg_kernel_smp_startup()
+{
+ CYG_INSTRUMENT_SMP( CPU_START, CYG_KERNEL_CPU_THIS(), 0 );
+ Cyg_Scheduler::lock();
+ Cyg_Scheduler::start_cpu();
+}
+
+// This is called from the DSR of the inter-CPU interrupt to cause a
+// reschedule when the scheduler lock is zeroed.
+
+__externC void cyg_scheduler_set_need_reschedule()
+{
+ CYG_INSTRUMENT_SMP( RESCHED_RECV, 0, 0 );
+ Cyg_Scheduler::need_reschedule[HAL_SMP_CPU_THIS()] = true;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// Consistency checker
+
+#ifdef CYGDBG_USE_ASSERTS
+
+cyg_bool Cyg_Scheduler::check_this( cyg_assert_class_zeal zeal) const
+{
+ CYG_REPORT_FUNCTION();
+
+ // check that we have a non-NULL pointer first
+ if( this == NULL ) return false;
+
+ switch( zeal )
+ {
+ case cyg_system_test:
+ case cyg_extreme:
+ case cyg_thorough:
+ if( !get_current_thread()->check_this(zeal) ) return false;
+ case cyg_quick:
+ case cyg_trivial:
+ case cyg_none:
+ default:
+ break;
+ };
+
+ return true;
+}
+
+#endif
+
+//==========================================================================
+// SchedThread members
+
+// -------------------------------------------------------------------------
+// Static data members
+
+#ifdef CYGSEM_KERNEL_SCHED_ASR_SUPPORT
+
+# ifdef CYGSEM_KERNEL_SCHED_ASR_GLOBAL
+Cyg_ASR *Cyg_SchedThread::asr = &Cyg_SchedThread::asr_default;
+# endif
+
+# ifdef CYGSEM_KERNEL_SCHED_ASR_DATA_GLOBAL
+CYG_ADDRWORD Cyg_SchedThread::asr_data = 0;
+# endif
+
+#endif // CYGSEM_KERNEL_SCHED_ASR_SUPPORT
+
+// -------------------------------------------------------------------------
+// Constructor
+
+Cyg_SchedThread::Cyg_SchedThread(Cyg_Thread *thread, CYG_ADDRWORD sched_info)
+: Cyg_SchedThread_Implementation(sched_info)
+{
+ CYG_REPORT_FUNCTION();
+
+ queue = NULL;
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL
+
+ mutex_count = 0;
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_SIMPLE
+
+ priority_inherited = false;
+
+#endif
+#endif
+
+#ifdef CYGSEM_KERNEL_SCHED_ASR_SUPPORT
+
+ asr_inhibit = 0;
+ asr_pending = false;
+
+#ifndef CYGSEM_KERNEL_SCHED_ASR_GLOBAL
+ asr = asr_default;
+#endif
+#ifdef CYGSEM_KERNEL_SCHED_ASR_DATA_GLOBAL
+ asr_data = NULL
+#endif
+
+#endif
+}
+
+// -------------------------------------------------------------------------
+// ASR support functions
+
+#ifdef CYGSEM_KERNEL_SCHED_ASR_SUPPORT
+
+// -------------------------------------------------------------------------
+// Set ASR
+// Install a new ASR, returning the old one.
+
+void Cyg_SchedThread::set_asr( Cyg_ASR *new_asr, CYG_ADDRWORD new_data,
+ Cyg_ASR **old_asr, CYG_ADDRWORD *old_data)
+{
+ CYG_REPORT_FUNCTION();
+
+ // Do this with the scheduler locked...
+ Cyg_Scheduler::lock();
+
+ if( old_asr != NULL ) *old_asr = asr;
+ if( old_data != NULL ) *old_data = asr_data;
+
+ // If new_asr is NULL, do not change the ASR,
+ // but only change the data.
+ if( new_asr != NULL ) asr = new_asr;
+ asr_data = new_data;
+
+ Cyg_Scheduler::unlock();
+}
+
+// -------------------------------------------------------------------------
+// Clear ASR
+
+void Cyg_SchedThread::clear_asr()
+{
+ CYG_REPORT_FUNCTION();
+
+ // Do this with the scheduler locked...
+ Cyg_Scheduler::lock();
+
+ // Reset ASR to default.
+ asr = asr_default;
+ asr_data = 0;
+
+ Cyg_Scheduler::unlock();
+}
+
+// -------------------------------------------------------------------------
+// Default ASR function.
+// having this avoids our having to worry about ever seeing a NULL
+// pointer as the ASR function.
+
+void Cyg_SchedThread::asr_default(CYG_ADDRWORD data)
+{
+ CYG_REPORT_FUNCTION();
+
+ data=data;
+ return;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// Generic priority protocol support
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL
+
+void Cyg_SchedThread::set_inherited_priority( cyg_priority pri, Cyg_Thread *thread )
+{
+ CYG_REPORT_FUNCTION();
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_SIMPLE
+
+ // This is the comon code for priority inheritance and ceiling
+ // protocols. This implementation provides a simplified version of
+ // the protocol.
+
+ Cyg_Thread *self = CYG_CLASSFROMBASE(Cyg_Thread,
+ Cyg_SchedThread,
+ this);
+
+ CYG_ASSERT( mutex_count > 0, "Non-positive mutex count");
+
+ // Compare with *current* priority in case thread has already
+ // inherited - for relay case below.
+ if( pri < priority )
+ {
+ cyg_priority mypri = priority;
+ cyg_bool already_inherited = priority_inherited;
+
+ // If this is first inheritance, copy the old pri
+ // and set inherited flag. We clear it before setting the
+ // pri since set_priority() is inheritance aware.
+ // This is called with the sched locked, so no race conditions.
+
+ priority_inherited = false; // so that set_prio DTRT
+
+ self->set_priority( pri );
+
+ if( !already_inherited )
+ original_priority = mypri;
+
+ priority_inherited = true; // regardless, because it is now
+
+ }
+
+#endif
+}
+
+void Cyg_SchedThread::relay_inherited_priority( Cyg_Thread *ex_owner, Cyg_ThreadQueue *pqueue)
+{
+ CYG_REPORT_FUNCTION();
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_SIMPLE
+
+ // A simple implementation of priority inheritance.
+ // At its simplest, this member does nothing.
+
+ // If there is anyone else waiting, then the *new* owner inherits from
+ // the current one, since that is a maxima of the others waiting.
+ // (It's worth not doing if there's nobody waiting to prevent
+ // unneccessary priority skew.) This could be viewed as a discovered
+ // priority ceiling.
+
+ if ( !pqueue->empty() )
+ set_inherited_priority( ex_owner->get_current_priority(), ex_owner );
+
+#endif
+}
+
+void Cyg_SchedThread::clear_inherited_priority()
+{
+ CYG_REPORT_FUNCTION();
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_SIMPLE
+
+ // A simple implementation of priority inheritance/ceiling
+ // protocols. The simplification in this algorithm is that we do
+ // not reduce our priority until we have freed all mutexes
+ // claimed. Hence we can continue to run at an artificially high
+ // priority even when we should not. However, since nested
+ // mutexes are rare, the thread we have inherited from is likely
+ // to be locking the same mutexes we are, and mutex claim periods
+ // should be very short, the performance difference between this
+ // and a more complex algorithm should be negligible. The most
+ // important advantage of this algorithm is that it is fast and
+ // deterministic.
+
+ Cyg_Thread *self = CYG_CLASSFROMBASE(Cyg_Thread,
+ Cyg_SchedThread,
+ this);
+
+ CYG_ASSERT( mutex_count >= 0, "Non-positive mutex count");
+
+ if( mutex_count == 0 && priority_inherited )
+ {
+ priority_inherited = false;
+
+ // Only make an effort if the priority must change
+ if( priority < original_priority )
+ self->set_priority( original_priority );
+
+ }
+
+#endif
+}
+
+#endif // CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL
+
+// -------------------------------------------------------------------------
+// Priority inheritance support.
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT
+
+// -------------------------------------------------------------------------
+// Inherit the priority of the provided thread if it
+// has a higher priority than ours.
+
+void Cyg_SchedThread::inherit_priority( Cyg_Thread *thread)
+{
+ CYG_REPORT_FUNCTION();
+
+ Cyg_Thread *self = CYG_CLASSFROMBASE(Cyg_Thread,
+ Cyg_SchedThread,
+ this);
+
+ CYG_ASSERT( mutex_count > 0, "Non-positive mutex count");
+ CYG_ASSERT( self != thread, "Trying to inherit from self!");
+
+ self->set_inherited_priority( thread->get_current_priority(), thread );
+
+}
+
+// -------------------------------------------------------------------------
+// Inherit the priority of the ex-owner thread or from the queue if it
+// has a higher priority than ours.
+
+void Cyg_SchedThread::relay_priority( Cyg_Thread *ex_owner, Cyg_ThreadQueue *pqueue)
+{
+ CYG_REPORT_FUNCTION();
+
+ relay_inherited_priority( ex_owner, pqueue );
+}
+
+// -------------------------------------------------------------------------
+// Lose a priority inheritance
+
+void Cyg_SchedThread::disinherit_priority()
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( mutex_count >= 0, "Non-positive mutex count");
+
+ clear_inherited_priority();
+}
+
+#endif // CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT
+
+// -------------------------------------------------------------------------
+// Priority ceiling support
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+
+void Cyg_SchedThread::set_priority_ceiling( cyg_priority pri )
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( mutex_count > 0, "Non-positive mutex count");
+
+ set_inherited_priority( pri );
+
+}
+
+void Cyg_SchedThread::clear_priority_ceiling( )
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( mutex_count >= 0, "Non-positive mutex count");
+
+ clear_inherited_priority();
+}
+
+#endif // CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+
+// -------------------------------------------------------------------------
+// EOF sched/sched.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/sync/bin_sem.cxx b/cesar/ecos/packages/kernel/current/src/sync/bin_sem.cxx
new file mode 100644
index 0000000000..cfba947b33
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/sync/bin_sem.cxx
@@ -0,0 +1,276 @@
+//==========================================================================
+//
+// sync/bin_sem.cxx
+//
+// Binary semaphore implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-24
+// Purpose: Cyg_Binary_Semaphore implementation
+// Description: This file contains the implementations of the binary semaphore
+// class.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/instrmnt.h> // instrumentation
+
+#include <cyg/kernel/thread.inl> // Cyg_Thread inlines
+
+#include <cyg/kernel/sema.hxx> // our header
+
+#include <cyg/kernel/sched.inl> // scheduler inlines
+
+// -------------------------------------------------------------------------
+
+Cyg_Binary_Semaphore::Cyg_Binary_Semaphore (
+ cyg_bool init_state
+)
+{
+ state = init_state;
+}
+
+// -------------------------------------------------------------------------
+
+Cyg_Binary_Semaphore::~Cyg_Binary_Semaphore ( )
+{
+ CYG_ASSERT( queue.empty(), "Destroying semaphore with waiting threads");
+}
+
+// -------------------------------------------------------------------------
+
+cyg_bool Cyg_Binary_Semaphore::wait()
+{
+ cyg_bool result = true;
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_BINSEM( CLAIM, this, state );
+
+ while( !state && result )
+ {
+ self->set_sleep_reason( Cyg_Thread::WAIT );
+
+ self->sleep();
+
+ queue.enqueue( self );
+
+ CYG_INSTRUMENT_BINSEM( WAIT, this, 0 );
+
+ // Allow other threads to run
+ Cyg_Scheduler::reschedule();
+
+ CYG_INSTRUMENT_BINSEM( WOKE, this, state );
+
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+
+ }
+
+ if( result ) state = false;
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ return result;
+}
+
+// -------------------------------------------------------------------------
+// Wait until the state can be set false or timeout
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+
+cyg_bool
+Cyg_Binary_Semaphore::wait( cyg_tick_count timeout )
+{
+ cyg_bool result = true;
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_BINSEM( CLAIM, this, state );
+
+ // Set the timer _once_ outside the loop.
+ self->set_timer( timeout, Cyg_Thread::TIMEOUT );
+
+ // If the timeout is in the past, the wake reason will have been
+ // set to something other than NONE already. If the semaphore is
+ // not available, set the result false to force an immediate
+ // return. If it is available, then go ahead and claim it.
+
+ if( self->get_wake_reason() != Cyg_Thread::NONE && !state )
+ result = false;
+
+ while ( !state && result ) {
+
+ // must reset the sleep reason every time
+ self->set_sleep_reason( Cyg_Thread::TIMEOUT );
+
+ self->sleep();
+
+ queue.enqueue( self );
+
+ CYG_INSTRUMENT_BINSEM( WAIT, this, 0 );
+
+ // Allow other threads to run
+ Cyg_Scheduler::reschedule();
+
+ CYG_INSTRUMENT_BINSEM( WOKE, this, state );
+
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::TIMEOUT:
+ result = false;
+ CYG_INSTRUMENT_BINSEM( TIMEOUT, this, state);
+ break;
+
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ // Clear the timeout. It is irrelevant whether the alarm has
+ // actually gone off or not.
+ self->clear_timer();
+
+ if( result ) state = false;
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ return result;
+}
+
+#endif // CYGFUN_KERNEL_THREADS_TIMER
+
+// -------------------------------------------------------------------------
+
+cyg_bool Cyg_Binary_Semaphore::trywait()
+{
+ cyg_bool result = true;
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ if( state ) state = false;
+ else result = false;
+
+ CYG_INSTRUMENT_BINSEM( TRY, this, result );
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ return result;
+}
+
+// -------------------------------------------------------------------------
+
+void Cyg_Binary_Semaphore::post()
+{
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_BINSEM( POST, this, 0 );
+
+ state = true;
+
+ if( !queue.empty() ) {
+
+ // The queue is non-empty, so grab the next
+ // thread from it and wake it up. The waiter
+ // will clear the flag.
+
+ Cyg_Thread *thread = queue.dequeue();
+
+ thread->set_wake_reason( Cyg_Thread::DONE );
+
+ thread->wake();
+
+ CYG_INSTRUMENT_BINSEM( WAKE, this, thread );
+ }
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+}
+
+// -------------------------------------------------------------------------
+
+cyg_bool Cyg_Binary_Semaphore::posted()
+{
+ // This is a single read of the value of state.
+ // This is already atomic, hence there is no need
+ // to lock the scheduler.
+
+ return state;
+}
+
+// -------------------------------------------------------------------------
+// EOF sync/bin_sem.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/sync/cnt_sem.cxx b/cesar/ecos/packages/kernel/current/src/sync/cnt_sem.cxx
new file mode 100644
index 0000000000..b418d0aee1
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/sync/cnt_sem.cxx
@@ -0,0 +1,283 @@
+//==========================================================================
+//
+// sync/cnt_sem.cxx
+//
+// Counting semaphore implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-24
+// Purpose: Cyg_Counting_Semaphore implementation
+// Description: This file contains the implementations of the counting semaphore
+// class.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/instrmnt.h> // instrumentation
+
+#include <cyg/kernel/thread.inl> // Cyg_Thread inlines
+
+#include <cyg/kernel/sema.hxx> // our header
+
+#include <cyg/kernel/sched.inl> // scheduler inlines
+
+// -------------------------------------------------------------------------
+// Constructor
+
+Cyg_Counting_Semaphore::Cyg_Counting_Semaphore(
+ cyg_count32 init_count // Initial count value
+ )
+{
+ count = init_count;
+}
+
+// -------------------------------------------------------------------------
+// Destructor
+
+Cyg_Counting_Semaphore::~Cyg_Counting_Semaphore()
+{
+ CYG_ASSERT( queue.empty(), "Destroying semaphore with waiting threads");
+}
+
+// -------------------------------------------------------------------------
+// Wait until the count can be decremented without it becoming
+// negative.
+
+cyg_bool Cyg_Counting_Semaphore::wait()
+{
+ cyg_bool result = true;
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_CNTSEM( CLAIM, this, count );
+
+ while( count == 0 && result )
+ {
+ self->set_sleep_reason( Cyg_Thread::WAIT );
+
+ self->sleep();
+
+ queue.enqueue( self );
+
+ CYG_INSTRUMENT_CNTSEM( WAIT, this, 0 );
+
+ // Allow other threads to run
+ Cyg_Scheduler::reschedule();
+
+ CYG_INSTRUMENT_CNTSEM( WOKE, this, count );
+
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ if( result ) count--;
+
+ // Unlock the scheduler
+ Cyg_Scheduler::unlock();
+
+ return result;
+}
+
+// -------------------------------------------------------------------------
+// Wait until the count can be decremented without it becoming
+// negative.
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+
+cyg_bool
+Cyg_Counting_Semaphore::wait( cyg_tick_count timeout )
+{
+ cyg_bool result = true;
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_CNTSEM( CLAIM, this, count );
+
+ // Set the timer _once_ outside the loop.
+ self->set_timer( timeout, Cyg_Thread::TIMEOUT );
+
+ // If the timeout is in the past, the wake reason will have been
+ // set to something other than NONE already. If the count is zero,
+ // set the result false to force an immediate return. If the count
+ // is non-zero, then this wait will succeed anyway.
+
+ if( self->get_wake_reason() != Cyg_Thread::NONE &&
+ 0 == count )
+ result = false;
+
+ while ( 0 == count && result ) {
+
+ // must reset the sleep reason every time
+ self->set_sleep_reason( Cyg_Thread::TIMEOUT );
+
+ self->sleep();
+
+ queue.enqueue( self );
+
+ CYG_INSTRUMENT_CNTSEM( WAIT, this, 0 );
+
+ // Allow other threads to run
+ Cyg_Scheduler::reschedule();
+
+ CYG_INSTRUMENT_CNTSEM( WOKE, this, count );
+
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::TIMEOUT:
+ result = false;
+ CYG_INSTRUMENT_CNTSEM( TIMEOUT, this, count);
+ break;
+
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ // Clear the timeout. It is irrelevant whether the alarm has
+ // actually gone off or not.
+ self->clear_timer();
+
+ if ( result ) count--;
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ return result;
+}
+
+#endif // CYGFUN_KERNEL_THREADS_TIMER
+
+// -------------------------------------------------------------------------
+// Try to decrement, but fail if not possible
+
+cyg_bool Cyg_Counting_Semaphore::trywait()
+{
+ cyg_bool result = true;
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ if( count > 0 ) count--;
+ else result = false;
+
+ CYG_INSTRUMENT_CNTSEM( TRY, this, result );
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ return result;
+}
+
+// -------------------------------------------------------------------------
+// Increment count
+
+void Cyg_Counting_Semaphore::post()
+{
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_CNTSEM( POST, this, 0 );
+
+ count++;
+
+ if( !queue.empty() ) {
+
+ // The queue is non-empty, so grab the next
+ // thread from it and wake it up. The waiter
+ // will decrement the count when he is awakened.
+
+ Cyg_Thread *thread = queue.dequeue();
+
+ thread->set_wake_reason( Cyg_Thread::DONE );
+
+ thread->wake();
+
+ CYG_INSTRUMENT_CNTSEM( WAKE, this, thread );
+ }
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+}
+
+// -------------------------------------------------------------------------
+// Get current count value
+
+cyg_count32 Cyg_Counting_Semaphore::peek() const
+{
+ // This is a single read of the value of count.
+ // This is already atomic, hence there is no need
+ // to lock the scheduler.
+
+ return count;
+}
+
+// -------------------------------------------------------------------------
+// EOF sync/cnt_sem.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/sync/cnt_sem2.cxx b/cesar/ecos/packages/kernel/current/src/sync/cnt_sem2.cxx
new file mode 100644
index 0000000000..c1be327040
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/sync/cnt_sem2.cxx
@@ -0,0 +1,295 @@
+//==========================================================================
+//
+// sync/cnt_sem2.cxx
+//
+// Counting semaphore implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1997-09-24
+// Purpose: Cyg_Counting_Semaphore implementation
+// Description: This file contains the implementations of the counting semaphore
+// class.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/instrmnt.h> // instrumentation
+
+#include <cyg/kernel/thread.inl> // Cyg_Thread inlines
+
+#include <cyg/kernel/sema2.hxx> // our header
+
+#include <cyg/kernel/sched.inl> // scheduler inlines
+
+// -------------------------------------------------------------------------
+// Constructor
+
+Cyg_Counting_Semaphore2::Cyg_Counting_Semaphore2(
+ cyg_count32 init_count // Initial count value
+ )
+{
+ count = init_count;
+}
+
+// -------------------------------------------------------------------------
+// Destructor
+
+Cyg_Counting_Semaphore2::~Cyg_Counting_Semaphore2()
+{
+ CYG_REPORT_FUNCTION();
+#if 0
+ CYG_ASSERT( queue.empty(), "Destroying semaphore with waiting threads");
+#endif
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ while ( ! queue.empty() ) {
+ Cyg_Thread *thread = queue.dequeue();
+ thread->set_wake_reason( Cyg_Thread::DESTRUCT );
+ thread->wake();
+ }
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Wait until the count can be decremented without it becoming
+// negative.
+
+cyg_bool Cyg_Counting_Semaphore2::wait()
+{
+ CYG_REPORT_FUNCTION();
+ Cyg_Thread *self = Cyg_Thread::self();
+ cyg_bool result = true;
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_CNTSEM( CLAIM, this, count );
+
+ if ( 0 < count ) {
+ count--;
+ Cyg_Scheduler::unlock();
+ }
+ else {
+ self->set_sleep_reason( Cyg_Thread::WAIT );
+ self->sleep();
+ queue.enqueue( self );
+
+ CYG_INSTRUMENT_CNTSEM( WAIT, this, 0 );
+
+ Cyg_Scheduler::unlock();
+
+ CYG_INSTRUMENT_CNTSEM( WOKE, this, count );
+
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ CYG_REPORT_RETVAL( result );
+ return result;
+}
+
+// -------------------------------------------------------------------------
+// Wait until the count can be decremented without it becoming
+// negative.
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+
+cyg_bool
+Cyg_Counting_Semaphore2::wait( cyg_tick_count abs_timeout )
+{
+ CYG_REPORT_FUNCTION();
+ Cyg_Thread *self = Cyg_Thread::self();
+ cyg_bool result = true;
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_CNTSEM( CLAIM, this, count );
+
+ if ( 0 < count ) {
+ count--;
+ Cyg_Scheduler::unlock();
+ }
+ else {
+
+ // Put thread in sleep state before setting timer since if the
+ // timeout is in the past, it will be re-awoken
+ // immediately. If this happens then wake_reason will not be
+ // NONE.
+
+ self->sleep();
+
+ self->set_timer( abs_timeout, Cyg_Thread::TIMEOUT );
+
+ // only enqueue if the timeout did not already happen
+ if( Cyg_Thread::NONE == self->get_wake_reason() )
+ queue.enqueue( self );
+
+ CYG_INSTRUMENT_CNTSEM( WAIT, this, 0 );
+
+
+ Cyg_Scheduler::unlock();
+
+ // Clear the timeout. It is irrelevant whether the alarm has
+ // actually gone off or not.
+ self->clear_timer();
+
+ CYG_INSTRUMENT_CNTSEM( WOKE, this, count );
+
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::TIMEOUT:
+ result = false;
+ CYG_INSTRUMENT_CNTSEM( TIMEOUT, this, count);
+ break;
+
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ CYG_REPORT_RETVAL( result );
+ return result;
+}
+
+#endif // CYGFUN_KERNEL_THREADS_TIMER
+
+// -------------------------------------------------------------------------
+// Try to decrement, but fail if not possible
+
+cyg_bool Cyg_Counting_Semaphore2::trywait()
+{
+ CYG_REPORT_FUNCTION();
+ cyg_bool result = true;
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ if( 0 < count ) count--;
+ else result = false;
+
+ CYG_INSTRUMENT_CNTSEM( TRY, this, result );
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETVAL( result );
+ return result;
+}
+
+// -------------------------------------------------------------------------
+// Increment count
+
+void Cyg_Counting_Semaphore2::post()
+{
+ CYG_REPORT_FUNCTION();
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_CNTSEM( POST, this, 0 );
+
+ if( queue.empty() ) {
+ count++;
+ }
+ else {
+ // The queue is non-empty, so grab the next
+ // thread from it and wake it up. The waiter
+ // won't decrement the count when he is awakened,
+ // for we never incremented it in the first place
+
+ Cyg_Thread *thread = queue.dequeue();
+
+ thread->set_wake_reason( Cyg_Thread::DONE );
+
+ thread->wake();
+
+ CYG_INSTRUMENT_CNTSEM( WAKE, this, thread );
+ }
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Get current count value
+
+cyg_count32 Cyg_Counting_Semaphore2::peek() const
+{
+ // This is a single read of the value of count.
+ // This is already atomic, hence there is no need
+ // to lock the scheduler.
+
+ return count;
+}
+
+// -------------------------------------------------------------------------
+// EOF sync/cnt_sem2.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/sync/flag.cxx b/cesar/ecos/packages/kernel/current/src/sync/flag.cxx
new file mode 100644
index 0000000000..976d84dbc5
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/sync/flag.cxx
@@ -0,0 +1,418 @@
+//==========================================================================
+//
+// flag.cxx
+//
+// Flag class implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1998-02-11
+// Purpose: Flag implementation
+// Description: This file contains the implementations of the flag class
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/instrmnt.h> // instrumentation
+
+#include <cyg/kernel/thread.inl> // thread inlines
+
+#include <cyg/kernel/flag.hxx> // our own header
+
+#include <cyg/kernel/sched.inl> // scheduler inlines
+#include <cyg/kernel/clock.inl> // clock inlines
+
+// -------------------------------------------------------------------------
+// Constructor
+
+Cyg_Flag::Cyg_Flag( Cyg_FlagValue init )
+{
+ CYG_REPORT_FUNCTION();
+ value = init;
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Destructor
+
+Cyg_Flag::~Cyg_Flag()
+{
+ CYG_REPORT_FUNCTION();
+#if 0
+ CYG_ASSERT( queue.empty(), "Deleting flag with threads waiting");
+#endif
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ while ( ! queue.empty() ) {
+ Cyg_Thread *thread = queue.dequeue();
+ thread->set_wake_reason( Cyg_Thread::DESTRUCT );
+ thread->wake();
+ }
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// debugging/assert function
+
+#ifdef CYGDBG_USE_ASSERTS
+cyg_bool
+Cyg_Flag::check_this(cyg_assert_class_zeal zeal) const
+{
+ CYG_REPORT_FUNCTION();
+
+ if ( Cyg_Thread::DESTRUCT == Cyg_Thread::self()->get_wake_reason() )
+ // then the whole thing is invalid, and we know it.
+ // so return OK, since this check should NOT make an error.
+ return true;
+
+ // check that we have a non-NULL pointer first
+ if( this == NULL ) {
+ CYG_REPORT_RETVAL( false );
+ return false;
+ }
+
+ // there ain't a lot to check here.
+ CYG_REPORT_RETVAL( true );
+ return true;
+}
+#endif
+
+// -------------------------------------------------------------------------
+// now the members themselves:
+
+// clear some bits in the value (all of them by default) by ANDing with the
+// argument. This cannot make a wait condition become true, so there's not
+// much to it.
+void
+Cyg_Flag::maskbits( Cyg_FlagValue arg )
+{
+ CYG_REPORT_FUNCTION();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ value &= arg;
+ // no need to wake anyone up; no waiter can become valid in
+ // consequence of this operation.
+
+ // Unlock scheduler and allow other threads to run
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETURN();
+}
+
+
+// -------------------------------------------------------------------------
+// set some bits in the value (all of them by default) and wake up any
+// affected waiting threads; we do the decision making here so as to get
+// atomicity wrt the other threads waking up - the value might have changed
+// by the time they get to run.
+
+void
+Cyg_Flag::setbits( Cyg_FlagValue arg )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ // OR in the argument to get a new flag value.
+ value |= arg;
+
+ // anyone waiting?
+ if ( !(queue.empty()) ) {
+ FlagWaitInfo *p;
+ Cyg_Thread *thread;
+ Cyg_ThreadQueue holding;
+
+ do {
+ thread = queue.dequeue();
+ p = (FlagWaitInfo *)(thread->get_wait_info());
+
+ CYG_ASSERT( (p->allmask == 0) != (p->anymask == 0),
+ "Both masks set" );
+ CYG_ASSERT( 0 == p->value_out, "Thread already awoken?" );
+
+ if ( ((p->allmask != 0) && (p->allmask & value) == p->allmask) ||
+ ((p->anymask & value) != 0 ) ) {
+ // success! awaken the thread
+ thread->set_wake_reason( Cyg_Thread::DONE );
+ thread->wake();
+ // return the successful value to it
+ p->value_out = value;
+ // do we clear the value; is this the end?
+ if ( p->do_clear ) {
+ // we can break here but need to preserve ordering
+ value = 0;
+ // so let it cycle the whole queue regardless
+ }
+ }
+ else {
+ // preserve the entry on the holding queue
+ holding.enqueue( thread );
+ }
+ } while ( !(queue.empty()) );
+
+ // Now re-queue the unaffected threads back into the flag queue
+ while ( !(holding.empty()) ) {
+ queue.enqueue( holding.dequeue() );
+ }
+ }
+ // Unlock scheduler and allow other threads to run
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Wait for a match on our pattern, according to the flags given.
+// Return the matching value.
+Cyg_FlagValue
+Cyg_Flag::wait( Cyg_FlagValue pattern, WaitMode mode )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_ASSERT( Cyg_Flag::MASK >= mode, "Bad mode" );
+
+ Cyg_FlagValue result;
+
+ // Prevent preemption so that we compare atomically
+ Cyg_Scheduler::lock();
+
+ // try the current value
+ result = poll( pattern, mode );
+
+ if ( 0 != result ) {
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETVAL( result );
+ return result; // all done
+ }
+
+ // we have to wait until we are awoken
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ FlagWaitInfo saveme;
+ saveme.allmask = (Cyg_Flag::OR & mode) ? 0 : pattern;
+ saveme.anymask = (Cyg_Flag::OR & mode) ? pattern : 0;
+ saveme.do_clear = (0 != (Cyg_Flag::CLR & mode));
+
+ self->set_wait_info( (CYG_ADDRWORD)&saveme );
+
+ result = true; // just being used as an early-out flag now
+ // this loop allows us to deal correctly with spurious wakeups
+ while ( result && (0 == saveme.value_out) ) {
+ self->set_sleep_reason( Cyg_Thread::WAIT );
+ self->sleep();
+ // keep track of myself on the queue of waiting threads
+ queue.enqueue( self );
+
+ // Allow other threads to run
+ Cyg_Scheduler::reschedule();
+
+ CYG_ASSERT( ((CYG_ADDRWORD)&saveme) ==
+ Cyg_Thread::self()->get_wait_info(),
+ "Wait info lost" );
+
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ CYG_ASSERT( (false == result) ^ (0 != saveme.value_out),
+ "Break out but also good result!" );
+
+ // Unlock scheduler and allow other threads to run
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETVAL( saveme.value_out );
+ return saveme.value_out;
+}
+
+// -------------------------------------------------------------------------
+// Wait for a match on our pattern, with a timeout.
+// Return the matching value, or zero if timed out.
+// (zero cannot match any pattern).
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+Cyg_FlagValue
+Cyg_Flag::wait( Cyg_FlagValue pattern, WaitMode mode,
+ cyg_tick_count abs_timeout )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_ASSERT( Cyg_Flag::MASK >= mode, "Bad mode" );
+
+ Cyg_FlagValue result;
+
+ // Prevent preemption so that we compare atomically
+ Cyg_Scheduler::lock();
+
+ // try the current value
+ result = poll( pattern, mode );
+
+ if ( 0 != result ) {
+ Cyg_Scheduler::unlock();
+ CYG_REPORT_RETVAL( result );
+ return result; // all done
+ }
+
+ // we have to wait until we are awoken
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ FlagWaitInfo saveme;
+ saveme.allmask = (Cyg_Flag::OR & mode) ? 0 : pattern;
+ saveme.anymask = (Cyg_Flag::OR & mode) ? pattern : 0;
+ saveme.do_clear = (0 != (Cyg_Flag::CLR & mode));
+
+ self->set_wait_info( (CYG_ADDRWORD)&saveme );
+
+ // Set the timer _once_ outside the loop.
+ self->set_timer( abs_timeout, Cyg_Thread::TIMEOUT );
+
+ // If the timeout was in the past, it will have changed the value
+ // of wake_reason, so avoid going into the loop.
+ if( self->get_wake_reason() != Cyg_Thread::NONE )
+ result = false;
+ else result = true;
+
+ // Result is just being used as an early-out flag now. This loop
+ // allows us to deal correctly with spurious wakeups.
+
+ while ( result && (0 == saveme.value_out) ) {
+ self->set_sleep_reason( Cyg_Thread::TIMEOUT );
+ self->sleep();
+ // keep track of myself on the queue of waiting threads
+ queue.enqueue( self );
+
+ // Allow other threads to run
+ Cyg_Scheduler::reschedule();
+
+ CYG_ASSERT( ((CYG_ADDRWORD)&saveme) ==
+ Cyg_Thread::self()->get_wait_info(),
+ "Wait info lost" );
+
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::TIMEOUT:
+ result = false;
+ break;
+
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ CYG_ASSERT( (false == result) ^ (0 != saveme.value_out),
+ "Break out but also good result!" );
+
+ // clear the timer; if it actually fired, no worries.
+ self->clear_timer();
+
+ // Unlock scheduler and allow other threads to run
+ Cyg_Scheduler::unlock();
+ // in this version, value_out might be zero meaning timed out.
+ CYG_REPORT_RETVAL( saveme.value_out );
+ return saveme.value_out;
+}
+#endif // CYGFUN_KERNEL_THREADS_TIMER
+
+// -------------------------------------------------------------------------
+// Test for a match on our pattern, according to the flags given.
+// Return the matching value if success, else zero.
+Cyg_FlagValue
+Cyg_Flag::poll( Cyg_FlagValue pattern, WaitMode mode )
+{
+ CYG_REPORT_FUNCTION();
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_ASSERT( Cyg_Flag::MASK >= mode, "Bad mode" );
+
+ // Prevent preemption so that we compare atomically
+ Cyg_Scheduler::lock();
+
+ Cyg_FlagValue result = 0;
+
+ if ( Cyg_Flag::OR & mode ) {
+ if ( 0 != (value & pattern) )
+ result = value;
+ }
+ else { // Cyg_Flag::AND - all must be set
+ if ( (pattern != 0) && (pattern == (value & pattern)) )
+ result = value;
+ }
+
+ // result != 0 <=> test passed
+ if ( result && (Cyg_Flag::CLR & mode) )
+ value = 0;
+
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETVAL( result );
+ return result;
+}
+
+
+// -------------------------------------------------------------------------
+// EOF flag.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/sync/mbox.cxx b/cesar/ecos/packages/kernel/current/src/sync/mbox.cxx
new file mode 100644
index 0000000000..158f863469
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/sync/mbox.cxx
@@ -0,0 +1,170 @@
+//==========================================================================
+//
+// mbox.cxx
+//
+// Mbox mbox template class implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 1998-02-11
+// Purpose: Mbox implementation
+// Description: This file contains the implementations of the mbox class
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/instrmnt.h> // instrumentation
+
+#include <cyg/kernel/thread.inl> // Cyg_Thread inlines
+
+#include <cyg/kernel/mbox.hxx> // our own header
+
+#ifndef CYGIMP_MBOXT_INLINE // force inlining
+#define CYGIMP_MBOXT_INLINE // of implementation
+#endif
+
+#ifdef CYGIMP_MBOX_USE_MBOXT_PLAIN
+#include <cyg/kernel/mboxt.inl> // mbox template implementation
+#else
+#include <cyg/kernel/mboxt2.inl> // mbox template implementation
+#endif
+
+// -------------------------------------------------------------------------
+// This module exists to cause exactly one instance of these functions to
+// exist; this is just like a vanilla class, except we use the template
+// class to acquire an implementation. The template functions are inlined
+// in each of these methods.
+
+
+// -------------------------------------------------------------------------
+// Constructor
+
+Cyg_Mbox::Cyg_Mbox()
+{
+}
+
+// -------------------------------------------------------------------------
+// Destructor
+
+Cyg_Mbox::~Cyg_Mbox()
+{
+}
+
+// -------------------------------------------------------------------------
+// debugging/assert function
+
+#ifdef CYGDBG_USE_ASSERTS
+cyg_bool
+Cyg_Mbox::check_this(cyg_assert_class_zeal zeal) const
+{
+ return m.check_this(zeal);
+}
+#endif
+
+// -------------------------------------------------------------------------
+// now the members themselves:
+
+void *
+Cyg_Mbox::get()
+{
+ void * p;
+ if ( ! m.get( p ) )
+ return NULL;
+ return p;
+}
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+void *
+Cyg_Mbox::get( cyg_tick_count timeout )
+{
+ void * p;
+ if ( ! m.get( p, timeout ) )
+ return NULL;
+ return p;
+}
+#endif
+
+void *
+Cyg_Mbox::tryget()
+{
+ void * p=NULL;
+ if ( ! m.tryget( p ) )
+ return NULL;
+ return p;
+}
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+cyg_bool
+Cyg_Mbox::put( void *item )
+{
+ return m.put( item );
+}
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+cyg_bool
+Cyg_Mbox::put( void *item, cyg_tick_count timeout )
+{
+ return m.put( item, timeout );
+}
+#endif
+#endif // CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+
+cyg_bool
+Cyg_Mbox::tryput( void *item )
+{
+ return m.tryput( item );
+}
+
+void *
+Cyg_Mbox::peek_item() // Get next item to be returned
+{
+ void *p=NULL;
+ if ( ! m.peek_item( p ) )
+ return NULL;
+ return p;
+}
+
+// -------------------------------------------------------------------------
+// EOF mbox.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/sync/mqueue.cxx b/cesar/ecos/packages/kernel/current/src/sync/mqueue.cxx
new file mode 100644
index 0000000000..6e174ed89e
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/sync/mqueue.cxx
@@ -0,0 +1,65 @@
+//==========================================================================
+//
+// sync/mqueue.cxx
+//
+// Mqueue message queue non-inline implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2001-10-12
+// Purpose: Non-inlined implementation of mqueue message queue.
+// Description: This file contains the non-inlined instantiations of the
+// mqueue message queue implementation functions.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#ifdef CYGIMP_KERNEL_SYNCH_MQUEUE_NOT_INLINE
+
+#define CYGPRI_KERNEL_SYNCH_MQUEUE_INLINE
+#include <cyg/kernel/mqueue.hxx>
+#include <cyg/kernel/mqueue.inl>
+
+#endif
+
+// -------------------------------------------------------------------------
+// EOF sync/mqueue.cxx
diff --git a/cesar/ecos/packages/kernel/current/src/sync/mutex.cxx b/cesar/ecos/packages/kernel/current/src/sync/mutex.cxx
new file mode 100644
index 0000000000..f5af2fce25
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/src/sync/mutex.cxx
@@ -0,0 +1,863 @@
+//==========================================================================
+//
+// sync/mutex.cxx
+//
+// Mutex and condition variable implementation
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg, jlarmour
+// Date: 1999-02-17
+// Purpose: Mutex implementation
+// Description: This file contains the implementations of the mutex
+// and condition variable classes.
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/ktypes.h> // base kernel types
+#include <cyg/infra/cyg_trac.h> // tracing macros
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/kernel/instrmnt.h> // instrumentation
+
+#include <cyg/kernel/mutex.hxx> // our header
+
+#include <cyg/kernel/thread.inl> // thread inlines
+#include <cyg/kernel/sched.inl> // scheduler inlines
+#include <cyg/kernel/clock.inl> // clock inlines
+
+// -------------------------------------------------------------------------
+// Mutex protocol test macros.
+// If the dynamic protocol option is enabled, then these generate appropriate
+// tests on the protocol field. If there is no dynamic choice then they simply
+// result in empty statements.
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+
+#define IF_PROTOCOL_INHERIT if( protocol == INHERIT )
+#define IF_PROTOCOL_CEILING if( protocol == CEILING )
+#define IF_PROTOCOL_ACTIVE if( protocol != NONE )
+
+#else
+
+#define IF_PROTOCOL_INHERIT
+#define IF_PROTOCOL_CEILING
+#define IF_PROTOCOL_ACTIVE
+
+#endif
+
+// -------------------------------------------------------------------------
+// Constructor
+
+Cyg_Mutex::Cyg_Mutex()
+{
+ CYG_REPORT_FUNCTION();
+
+ locked = false;
+ owner = NULL;
+
+#if defined(CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT) && \
+ defined(CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC)
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_INHERIT
+ protocol = INHERIT;
+#endif
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_CEILING
+ protocol = CEILING;
+ ceiling = CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_PRIORITY;
+#endif
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_NONE
+ protocol = NONE;
+#endif
+
+#else // not (DYNAMIC and DEFAULT defined)
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_PRIORITY
+
+ // if there is a default priority ceiling defined, use that to initialize
+ // the ceiling.
+ ceiling = CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_PRIORITY;
+
+#else
+
+ // Otherwise set it to zero.
+ ceiling = 0;
+
+#endif
+#endif
+
+#endif // DYNAMIC and DEFAULT defined
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Construct with defined protocol
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+
+Cyg_Mutex::Cyg_Mutex( cyg_protcol protocol_arg )
+{
+ CYG_REPORT_FUNCTION();
+
+ locked = false;
+ owner = NULL;
+
+ protocol = protocol_arg;
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_PRIORITY
+
+ // if there is a default priority ceiling defined, use that to initialize
+ // the ceiling.
+ ceiling = CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_PRIORITY;
+
+#else
+
+ // Otherwise set it to zero.
+ ceiling = 0;
+
+#endif
+#endif
+
+ CYG_REPORT_RETURN();
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// Destructor
+
+Cyg_Mutex::~Cyg_Mutex()
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( owner == NULL, "Deleting mutex with owner");
+ CYG_ASSERT( queue.empty(), "Deleting mutex with waiting threads");
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+
+#ifdef CYGDBG_USE_ASSERTS
+
+cyg_bool
+Cyg_Mutex::check_this( cyg_assert_class_zeal zeal) const
+{
+// CYG_REPORT_FUNCTION();
+
+ // check that we have a non-NULL pointer first
+ if( this == NULL ) return false;
+
+ switch( zeal )
+ {
+ case cyg_system_test:
+ case cyg_extreme:
+ case cyg_thorough:
+ case cyg_quick:
+ case cyg_trivial:
+ if( locked && owner == NULL ) return false;
+ if( !locked && owner != NULL ) return false;
+ case cyg_none:
+ default:
+ break;
+ };
+
+ return true;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// Lock and/or wait
+
+cyg_bool
+Cyg_Mutex::lock(void)
+{
+ CYG_REPORT_FUNCTYPE("returning %d");
+
+ cyg_bool result = true;
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ CYG_INSTRUMENT_MUTEX(LOCK, this, 0);
+
+ // Loop while the mutex is locked, sleeping each time around
+ // the loop. This copes with the possibility of a higher priority
+ // thread grabbing the mutex between the wakeup in unlock() and
+ // this thread actually starting.
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL
+
+ IF_PROTOCOL_ACTIVE
+ self->count_mutex();
+
+#endif
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+
+ IF_PROTOCOL_CEILING
+ self->set_priority_ceiling(ceiling);
+
+#endif
+
+ while( locked && result )
+ {
+ CYG_ASSERT( self != owner, "Locking mutex I already own");
+
+ self->set_sleep_reason( Cyg_Thread::WAIT );
+
+ self->sleep();
+
+ queue.enqueue( self );
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT
+
+ IF_PROTOCOL_INHERIT
+ owner->inherit_priority(self);
+
+#endif
+
+ CYG_INSTRUMENT_MUTEX(WAIT, this, 0);
+
+ // Allow other threads to run
+ Cyg_Scheduler::reschedule();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::DESTRUCT:
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+
+ }
+
+ if( result )
+ {
+ locked = true;
+ owner = self;
+
+ CYG_INSTRUMENT_MUTEX(LOCKED, this, 0);
+ }
+ else
+ {
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL
+
+ IF_PROTOCOL_ACTIVE
+ self->uncount_mutex();
+
+#endif
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT
+
+ IF_PROTOCOL_INHERIT
+ self->disinherit_priority();
+
+#endif
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+
+ IF_PROTOCOL_CEILING
+ self->clear_priority_ceiling();
+
+#endif
+ }
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ CYG_REPORT_RETVAL(result);
+
+ return result;
+}
+
+// -------------------------------------------------------------------------
+// Try to lock and return success
+
+cyg_bool
+Cyg_Mutex::trylock(void)
+{
+ CYG_REPORT_FUNCTYPE("returning %d");
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ cyg_bool result = true;
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ // If the mutex is not locked, grab it
+ // for ourself. Otherwise return failure.
+ if( !locked )
+ {
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ locked = true;
+ owner = self;
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL
+
+ IF_PROTOCOL_ACTIVE
+ self->count_mutex();
+
+#endif
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+
+ IF_PROTOCOL_CEILING
+ self->set_priority_ceiling(ceiling);
+
+#endif
+
+ }
+ else result = false;
+
+ CYG_INSTRUMENT_MUTEX(TRY, this, result);
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETVAL(result);
+ return result;
+}
+
+// -------------------------------------------------------------------------
+// unlock
+
+void
+Cyg_Mutex::unlock(void)
+{
+ CYG_REPORT_FUNCTION();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_MUTEX(UNLOCK, this, 0);
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_ASSERT( locked, "Unlock mutex that is not locked");
+ CYG_ASSERT( owner == Cyg_Thread::self(), "Unlock mutex I do not own");
+
+ if( !queue.empty() ) {
+
+ // The queue is non-empty, so grab the next
+ // thread from it and wake it up.
+
+ Cyg_Thread *thread = queue.dequeue();
+
+ CYG_ASSERTCLASS( thread, "Bad thread pointer");
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT
+
+ // Give the owner-to-be a chance to inherit from the remaining
+ // queue or the relinquishing thread:
+
+ IF_PROTOCOL_INHERIT
+ thread->relay_priority(owner, &queue);
+
+#endif
+
+ thread->set_wake_reason( Cyg_Thread::DONE );
+
+ thread->wake();
+
+ CYG_INSTRUMENT_MUTEX(WAKE, this, thread);
+
+ }
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL
+
+ IF_PROTOCOL_ACTIVE
+ owner->uncount_mutex();
+
+#endif
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT
+
+ IF_PROTOCOL_INHERIT
+ owner->disinherit_priority();
+
+#endif
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+
+ IF_PROTOCOL_CEILING
+ owner->clear_priority_ceiling();
+
+#endif
+
+ locked = false;
+ owner = NULL;
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Release all waiting threads.
+
+void Cyg_Mutex::release()
+{
+ CYG_REPORT_FUNCTION();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_MUTEX(RELEASE, this, 0);
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ while( !queue.empty() )
+ {
+ // The queue is non-empty, so grab each
+ // thread from it and release it.
+
+ Cyg_Thread *thread = queue.dequeue();
+
+ CYG_ASSERTCLASS( thread, "Bad thread pointer");
+
+ thread->release();
+
+ CYG_INSTRUMENT_MUTEX(RELEASED, this, thread);
+
+ }
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Set ceiling priority for priority ceiling protocol
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+
+void Cyg_Mutex::set_ceiling( cyg_priority priority )
+{
+ CYG_REPORT_FUNCTION();
+
+// CYG_ASSERT( priority >= CYG_THREAD_MAX_PRIORITY, "Priority out of range");
+// CYG_ASSERT( priority <= CYG_THREAD_MIN_PRIORITY, "Priority out of range");
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ ceiling = priority;
+
+ // Unlock the scheduler
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// Set priority inversion protocol
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+void Cyg_Mutex::set_protocol( cyg_protcol new_protocol )
+{
+ CYG_REPORT_FUNCTION();
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ protocol = new_protocol;
+
+ // Unlock the scheduler
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+#endif
+
+
+//==========================================================================
+// Condition variables
+
+Cyg_Condition_Variable::Cyg_Condition_Variable(
+ Cyg_Mutex &mx // linked mutex
+ )
+{
+ CYG_REPORT_FUNCTION();
+
+ mutex = &mx;
+
+ CYG_ASSERTCLASS( mutex, "Invalid mutex argument");
+
+ CYG_REPORT_RETURN();
+}
+
+Cyg_Condition_Variable::Cyg_Condition_Variable()
+{
+ CYG_REPORT_FUNCTION();
+
+ mutex = NULL;
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Destructor
+
+Cyg_Condition_Variable::~Cyg_Condition_Variable()
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERT( queue.empty(), "Deleting condvar with waiting threads");
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+
+#ifdef CYGDBG_USE_ASSERTS
+
+cyg_bool
+Cyg_Condition_Variable::check_this( cyg_assert_class_zeal zeal) const
+{
+ bool result = true;
+
+ CYG_REPORT_FUNCTYPE("returning %d");
+ CYG_REPORT_FUNCARG1("zeal = %d", zeal);
+
+ // check that we have a non-NULL pointer first
+ if( this == NULL )
+ result = false;
+ else {
+
+ switch( zeal )
+ {
+ case cyg_system_test:
+ case cyg_extreme:
+ case cyg_thorough:
+ if( mutex != NULL && !mutex->check_this(zeal) )
+ result = false;
+ case cyg_quick:
+ case cyg_trivial:
+ case cyg_none:
+ default:
+ break;
+ }
+ }
+
+ CYG_REPORT_RETVAL(result);
+ return result;
+}
+
+#endif
+
+// -------------------------------------------------------------------------
+// Wait for condition to be true
+// Note: if this function is entered with the scheduler locked (e.g. to
+// suspend DSR processing) then there is no need to take the lock. Also
+// in this case, exit with the scheduler locked, which allows this function
+// to be used in a totally thread-safe manner.
+
+cyg_bool
+Cyg_Condition_Variable::wait_inner( Cyg_Mutex *mx )
+{
+ CYG_REPORT_FUNCTION();
+
+ cyg_bool result = true;
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ Cyg_Scheduler::lock();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_ASSERTCLASS( mx, "Corrupt mutex");
+ CYG_ASSERTCLASS( self, "Bad self thread");
+
+ CYG_INSTRUMENT_CONDVAR(WAIT, this, 0);
+
+ mx->unlock();
+
+ self->set_sleep_reason( Cyg_Thread::WAIT );
+
+ self->sleep();
+
+ queue.enqueue( self );
+
+ // Avoid calling ASRs during the following unlock.
+ self->set_asr_inhibit();
+
+ // Unlock the scheduler and switch threads
+ Cyg_Scheduler::unlock_reschedule();
+
+ // Allow ASRs again
+ self->clear_asr_inhibit();
+
+ CYG_INSTRUMENT_CONDVAR(WOKE, this, self->get_wake_reason());
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_ASSERTCLASS( mx, "Corrupt mutex");
+
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::DESTRUCT: // which, the cv or the mutex?
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+
+ // When we awake, we must re-acquire the mutex. Note that while
+ // it is essential to release the mutex and queue on the CV
+ // atomically relative to other threads, to avoid races, it is not
+ // necessary for us to re-acquire the mutex in the same atomic
+ // action. Hence we can do it after unlocking the scheduler.
+ // We need to loop here in case the thread is released while waiting
+ // for the mutex. It is essential that we exit this function with the
+ // mutex claimed.
+
+ while ( !mx->lock() )
+ continue;
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_ASSERTCLASS( mx, "Corrupt mutex");
+ CYG_ASSERT( mx->owner == self, "Not mutex owner");
+
+ CYG_REPORT_RETURN();
+
+ return result;
+}
+
+// -------------------------------------------------------------------------
+// Wake one thread
+
+void
+Cyg_Condition_Variable::signal(void)
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_CONDVAR(SIGNAL, this, 0);
+
+ if( !queue.empty() )
+ {
+ // The queue is non-empty, so grab the next
+ // thread from it and wake it up.
+
+ Cyg_Thread *thread = queue.dequeue();
+
+ CYG_ASSERTCLASS( thread, "Bad thread pointer");
+
+ thread->set_wake_reason( Cyg_Thread::DONE );
+
+ thread->wake();
+
+ CYG_INSTRUMENT_CONDVAR(WAKE, this, thread);
+
+ }
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Set cond true, wake all threads
+
+void
+Cyg_Condition_Variable::broadcast(void)
+{
+ CYG_REPORT_FUNCTION();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_CONDVAR(BROADCAST, this, 0);
+
+ // Grab all the threads from the queue and let them
+ // go.
+
+ while( !queue.empty() )
+ {
+ Cyg_Thread *thread = queue.dequeue();
+
+ CYG_ASSERTCLASS( thread, "Bad thread pointer");
+
+ thread->set_wake_reason( Cyg_Thread::DONE );
+
+ thread->wake();
+
+ CYG_INSTRUMENT_CONDVAR(WAKE, this, thread);
+ }
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
+ // Unlock the scheduler and maybe switch threads
+ Cyg_Scheduler::unlock();
+
+ CYG_REPORT_RETURN();
+}
+
+// -------------------------------------------------------------------------
+// Optional timed wait on a CV
+
+#if defined(CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT)
+
+cyg_bool
+Cyg_Condition_Variable::wait_inner( Cyg_Mutex *mx, cyg_tick_count timeout )
+{
+ CYG_REPORT_FUNCTYPE("returning %d");
+ CYG_REPORT_FUNCARG1("timeout = %d", timeout);
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_ASSERTCLASS( mx, "Corrupt mutex");
+
+ cyg_bool result = true;
+
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ CYG_ASSERTCLASS( self, "Bad self thread");
+
+ // Prevent preemption
+ Cyg_Scheduler::lock();
+
+ CYG_INSTRUMENT_CONDVAR(TIMED_WAIT, this, 0 );
+
+ mx->unlock();
+
+ // The ordering of sleep() and set_timer() here are
+ // important. If the timeout is in the past, the thread
+ // will be woken up immediately and will not sleep.
+
+ self->sleep();
+
+ // Set the timer and sleep reason
+ self->set_timer( timeout, Cyg_Thread::TIMEOUT );
+
+ // Only enqueue if the timeout has not already fired.
+ if( self->get_wake_reason() == Cyg_Thread::NONE )
+ queue.enqueue( self );
+
+ // Avoid calling ASRs during the following unlock.
+ self->set_asr_inhibit();
+
+ // Unlock the scheduler and switch threads
+ Cyg_Scheduler::unlock_reschedule();
+
+ // Allow ASRs again
+ self->clear_asr_inhibit();
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_ASSERTCLASS( mx, "Corrupt mutex");
+
+ self->clear_timer();
+
+ CYG_INSTRUMENT_CONDVAR(WOKE, this, self->get_wake_reason());
+
+ switch( self->get_wake_reason() )
+ {
+ case Cyg_Thread::TIMEOUT:
+ case Cyg_Thread::DESTRUCT: // which, the cv or the mutex?
+ case Cyg_Thread::BREAK:
+ result = false;
+ break;
+
+ case Cyg_Thread::EXIT:
+ self->exit();
+ break;
+
+ default:
+ break;
+ }
+
+
+ // When we awake, we must re-acquire the mutex. Note that while
+ // it is essential to release the mutex and queue on the CV
+ // atomically relative to other threads, to avoid races, it is not
+ // necessary for us to re-acquire the mutex in the same atomic
+ // action. Hence we can do it after unlocking the scheduler.
+
+ while ( !mx->lock() )
+ continue;
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+ CYG_ASSERTCLASS( mx, "Corrupt mutex");
+
+ CYG_REPORT_RETVAL(result);
+
+ return result;
+}
+
+#endif
+
+
+// -------------------------------------------------------------------------
+// EOF sync/mutex.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/bin_sem0.cxx b/cesar/ecos/packages/kernel/current/tests/bin_sem0.cxx
new file mode 100644
index 0000000000..06de873bc2
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/bin_sem0.cxx
@@ -0,0 +1,89 @@
+//==========================================================================
+//
+// bin_sem0.cxx
+//
+// Binary semaphore test 0
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-02-24
+// Description: Limited to checking constructors/destructors
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/sema.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include "testaux.hxx"
+
+static Cyg_Binary_Semaphore sema0, sema1(false), sema2(true);
+
+
+static bool flash( void )
+{
+ Cyg_Binary_Semaphore s0;
+
+ Cyg_Binary_Semaphore s1(true);
+
+ Cyg_Binary_Semaphore s2(false);
+
+ return true;
+}
+
+void bin_sem0_main( void )
+{
+ CYG_TEST_INIT();
+
+ CHECK(flash());
+ CHECK(flash());
+
+ CYG_TEST_PASS_FINISH("Binary Semaphore 0 OK");
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ bin_sem0_main();
+}
+// EOF bin_sem0.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/bin_sem1.cxx b/cesar/ecos/packages/kernel/current/tests/bin_sem1.cxx
new file mode 100644
index 0000000000..3bfd7deb4f
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/bin_sem1.cxx
@@ -0,0 +1,130 @@
+//==========================================================================
+//
+// bin_sem1.cxx
+//
+// Binary semaphore test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-02-24
+// Description: Tests basic binary semaphore functionality.
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/sched.hxx> // Cyg_Scheduler::start()
+#include <cyg/kernel/thread.hxx> // Cyg_Thread
+#include <cyg/kernel/thread.inl>
+
+#include <cyg/kernel/sema.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/sched.inl>
+
+#define NTHREADS 2
+
+#include "testaux.hxx"
+
+static Cyg_Binary_Semaphore s0(true), s1(false), s2;
+
+static volatile cyg_ucount8 q = 0;
+
+static void entry0( CYG_ADDRWORD data )
+{
+ s0.wait();
+ CHECK( 0 == q++ );
+ s1.post();
+ s0.wait();
+ CHECK( 2 == q++ );
+ CHECK( ! s0.posted() );
+ CHECK( ! s0.trywait() );
+ s0.post();
+ CHECK( 3 == q++ );
+ CHECK( s0.posted() );
+ s1.post();
+ CHECK( ! s2.posted() );
+ s2.wait();
+ CHECK( 5 == q++ );
+ CYG_TEST_PASS_FINISH("Binary Semaphore 1 OK");
+}
+
+static void entry1( CYG_ADDRWORD data )
+{
+ CHECK( s1.posted() );
+ s1.wait();
+ CHECK( 1 == q++ );
+ CHECK( ! s0.posted() );
+ s0.post();
+ s1.wait();
+ CHECK( 4 == q++ );
+ CHECK( s0.posted() );
+ CHECK( s0.trywait() );
+ CHECK( ! s0.posted() );
+ s2.post();
+ s0.wait();
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+void bin_sem1_main( void )
+{
+ CYG_TEST_INIT();
+
+ new_thread( entry0, 0);
+ new_thread( entry1, 1);
+
+#ifdef CYGIMP_THREAD_PRIORITY
+ thread[0]->set_priority( 4 );
+ thread[1]->set_priority( 5 ); // make sure the threads execute as intended
+#endif
+
+ Cyg_Scheduler::start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ bin_sem1_main();
+}
+// EOF bin_sem1.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/bin_sem2.cxx b/cesar/ecos/packages/kernel/current/tests/bin_sem2.cxx
new file mode 100644
index 0000000000..7be38e8fc9
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/bin_sem2.cxx
@@ -0,0 +1,224 @@
+//==========================================================================
+//
+// bin_sem2.cxx
+//
+// Binary semaphore test 2
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg,dsm
+// Contributors: dsm
+// Date: 1998-03-10
+// Description:
+// Dining philosophers test. Based on philo.cxx
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/mutex.hxx>
+
+#include <cyg/kernel/sema.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/sched.inl>
+
+static cyg_ucount16 PHILO_LOOPS = 1000;
+
+#define PHILOSOPHERS 15
+#define NTHREADS PHILOSOPHERS
+#include "testaux.hxx"
+
+static Cyg_Binary_Semaphore chopstick[PHILOSOPHERS];
+
+static char pstate[PHILOSOPHERS+1]; // state of each philosopher
+
+static cyg_ucount16 state_changes = 0;
+// state_changes keep track of number of changes to pstate so
+// we can exit after we've seen enough.
+
+
+static Cyg_Mutex pstate_mutex;
+static Cyg_Mutex cycle_mutex;
+
+static inline int left(cyg_count8 i)
+{
+ return (0 == i) ? PHILOSOPHERS-1 : i-1 ;
+}
+static inline int right(cyg_count8 i)
+{
+ return (PHILOSOPHERS == i+1) ? 0 : i+1 ;
+}
+
+void change_state(int id, char newstate)
+{
+ if (PHILO_LOOPS == state_changes++)
+ CYG_TEST_PASS_FINISH("Binary Semaphore 2 OK");
+
+
+ pstate_mutex.lock(); {
+ pstate[id] = newstate;
+ bool all_hungry = true; // until proved otherwise
+ for(cyg_ucount8 i=0; i < PHILOSOPHERS; i++) {
+ if('E' == pstate[i]) {
+ CHECK('E' != pstate[left(i)]);
+ CHECK('E' != pstate[right(i)]);
+ }
+ if('H' != pstate[i]) {
+ all_hungry = false;
+ }
+ }
+ // Theoretically it is possible for all the philosophers to be
+ // hungry but not waiting on semaphores. But in practice this
+ // means something is wrong.
+ CHECK(false == all_hungry);
+ } pstate_mutex.unlock();
+}
+
+char get_state(int id)
+{
+ pstate_mutex.lock();
+
+ char s = pstate[id];
+
+ pstate_mutex.unlock();
+
+ return s;
+}
+
+// -------------------------------------------------------------------------
+// Thread to behave like a philosopher
+
+void Philosopher( CYG_ADDRESS id )
+{
+ Cyg_Thread *self = Cyg_Thread::self();
+ Cyg_Binary_Semaphore *first_stick = &chopstick[id];
+ Cyg_Binary_Semaphore *second_stick = &chopstick[(id+1)%PHILOSOPHERS];
+
+ CHECK( id >= 0 && id < PHILOSOPHERS);
+
+ // Deadlock avoidance. The easiest way to make the philosophers
+ // behave is to make each pick up the lowest numbered stick
+ // first. This is how it works out anyway for all the philosophers
+ // except the last, who must have his sticks swapped.
+
+ if( id == PHILOSOPHERS-1 )
+ {
+ Cyg_Binary_Semaphore *t = first_stick;
+ first_stick = second_stick;
+ second_stick = t;
+ }
+
+
+ // The following variable is shared by all philosophers.
+ // It is incremented unprotected, but this does not matter
+ // since it is only present to introduce a little variability
+ // into the think and eat times.
+
+ static int cycle = 0;
+
+ for(;;)
+ {
+ // Think for a bit
+
+ self->delay((id+cycle++)%12); // Cogito ergo sum...
+
+ // I am now hungry, try to get the chopsticks
+ change_state(id,'H');
+
+ // Get the sticks
+ first_stick->wait();
+ second_stick->wait();
+
+ // Got them, now eat
+ change_state(id,'E');
+
+ // Check that the world is as I think it is...
+ CYG_TEST_CHECK( !first_stick->posted(),
+ "Not got first stick");
+ CYG_TEST_CHECK( !second_stick->posted(),
+ "Not got second stick");
+ CYG_TEST_CHECK( get_state(left(id)) != 'E',
+ "Left neighbour also eating!!");
+ CYG_TEST_CHECK( get_state(right(id)) != 'E',
+ "Right neighbour also eating!!");
+
+ self->delay((id+cycle++)%6); // munch munch
+
+ // Finished eating, put down sticks.
+
+ change_state(id,'T');
+
+ // put sticks back on table
+ first_stick->post();
+ second_stick->post();
+ }
+}
+
+// -------------------------------------------------------------------------
+
+void bin_sem2_main( void )
+{
+ CYG_TEST_INIT();
+
+ if (cyg_test_is_simulator)
+ PHILO_LOOPS = 100;
+
+ for( int i = 0; i < PHILOSOPHERS; i++ )
+ {
+ pstate[i] = 'T'; // starting state
+ new_thread(Philosopher, i);
+
+ // make the matching chopstick present
+ chopstick[i].post();
+ }
+
+ Cyg_Scheduler::scheduler.start();
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ bin_sem2_main();
+}
+// EOF bin_sem2.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/bin_sem3.cxx b/cesar/ecos/packages/kernel/current/tests/bin_sem3.cxx
new file mode 100644
index 0000000000..b72e1396e8
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/bin_sem3.cxx
@@ -0,0 +1,138 @@
+//==========================================================================
+//
+// bin_sem3.cxx
+//
+// Binary semaphore test 3
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): David Brennan
+// Contributors: David Brennan
+// Date: 2003-06-06
+// Description: Tests basic binary semaphore timeout functionality.
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/sched.hxx> // Cyg_Scheduler::start()
+#include <cyg/kernel/thread.hxx> // Cyg_Thread
+#include <cyg/kernel/thread.inl>
+
+#include <cyg/kernel/sema.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/sched.inl>
+
+#define NTHREADS 2
+
+#include "testaux.hxx"
+
+static Cyg_Binary_Semaphore s0(true), s1(false), s2;
+
+static volatile cyg_ucount8 q = 0;
+
+static void entry0( CYG_ADDRWORD data )
+{
+ s0.wait();
+ CHECK( 0 == q++ );
+ s1.post();
+ s0.wait();
+ CHECK( 2 == q++ );
+ CHECK( ! s0.posted() );
+#ifndef CYGFUN_KERNEL_THREADS_TIMER
+ CHECK( ! s0.trywait() );
+#else // !CYGFUN_KERNEL_THREADS_TIMER
+ CHECK( ! s0.wait(10) );
+#endif // !CYGFUN_KERNEL_THREADS_TIMER
+ s0.post();
+ CHECK( 3 == q++ );
+ CHECK( s0.posted() );
+ s1.post();
+ CHECK( ! s2.posted() );
+ s2.wait();
+ CHECK( 5 == q++ );
+ CYG_TEST_PASS_FINISH("Binary Semaphore 3 OK");
+}
+
+static void entry1( CYG_ADDRWORD data )
+{
+ CHECK( s1.posted() );
+ s1.wait();
+ CHECK( 1 == q++ );
+ CHECK( ! s0.posted() );
+ s0.post();
+ s1.wait();
+ CHECK( 4 == q++ );
+ CHECK( s0.posted() );
+#ifndef CYGFUN_KERNEL_THREADS_TIMER
+ CHECK( s0.trywait() );
+#else // !CYGFUN_KERNEL_THREADS_TIMER
+ CHECK( s0.wait(10) );
+#endif // !CYGFUN_KERNEL_THREADS_TIMER
+ CHECK( ! s0.posted() );
+ s2.post();
+ s0.wait();
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+void bin_sem3_main( void )
+{
+ CYG_TEST_INIT();
+
+ new_thread( entry0, 0);
+ new_thread( entry1, 1);
+
+#ifdef CYGIMP_THREAD_PRIORITY
+ thread[0]->set_priority( 4 );
+ thread[1]->set_priority( 5 ); // make sure the threads execute as intended
+#endif
+
+ Cyg_Scheduler::start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ bin_sem3_main();
+}
+// EOF bin_sem1.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/clock0.cxx b/cesar/ecos/packages/kernel/current/tests/clock0.cxx
new file mode 100644
index 0000000000..42bdbb3fd8
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/clock0.cxx
@@ -0,0 +1,286 @@
+//==========================================================================
+//
+// clock0.cxx
+//
+// Clock test 0
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-02-13
+// Description: Tests some basic clock functions.
+// Omissions: Doesn't test likely boundary conditions for
+// CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE
+// Real Time Clock Testing is limited
+// Options:
+// CYGIMP_KERNEL_COUNTERS_SINGLE_LIST
+// CYGIMP_KERNEL_COUNTERS_MULTI_LIST
+// CYGVAR_KERNEL_COUNTERS_CLOCK
+// CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE
+// Assumptions: This assumes we have long long support and
+// that counters are 64 bits.
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/clock.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/clock.inl>
+
+#include "testaux.hxx"
+
+#ifdef CYGVAR_KERNEL_COUNTERS_CLOCK
+
+cyg_alarm_fn call_me;
+
+bool flash( void )
+{
+ Cyg_Counter counter0 = Cyg_Counter();
+ Cyg_Counter counter1 = Cyg_Counter(723);
+
+ CYG_ASSERTCLASSO( counter0, "error" );
+ CYG_ASSERTCLASSO( counter1, "error" );
+
+ Cyg_Alarm alarm0 = Cyg_Alarm(&counter0, call_me, 12);
+
+ CYG_ASSERTCLASSO( alarm0, "error" );
+
+ Cyg_Clock::cyg_resolution res = {1,2};
+
+ Cyg_Clock clock0(res);
+
+ CYG_ASSERTCLASSO( clock0, "error" );
+
+ return true;
+}
+
+// Testing alarms
+//
+// call_me is a function that will be called when an alarm is
+// triggered. It updates a global variable called which is CHECKed
+// explicitly to see if the approriate alarms have been called.
+
+cyg_uint16 called = 0x0;
+
+void call_me(Cyg_Alarm *alarm, CYG_ADDRWORD data)
+{
+ called ^= data;
+}
+
+void call_me2(Cyg_Alarm *alarm, CYG_ADDRWORD data)
+{
+ call_me(alarm, data^0x10);
+}
+
+
+void clock0_main(void)
+{
+ CYG_TEST_INIT();
+
+ CHECK(flash());
+ CHECK(flash());
+
+ const cyg_uint32 big_number = 3333222111u;
+ Cyg_Counter counter0 = Cyg_Counter();
+
+ CHECK( 0 == counter0.current_value() );
+ CHECK( 0 == counter0.current_value_lo() );
+ CHECK( 0 == counter0.current_value_hi() );
+
+ counter0.tick();
+
+ CHECK( 1 == counter0.current_value() );
+ CHECK( 1 == counter0.current_value_lo() );
+ CHECK( 0 == counter0.current_value_hi() );
+
+ counter0.tick(6);
+
+ CHECK( 7 == counter0.current_value() );
+ CHECK( 7 == counter0.current_value_lo() );
+ CHECK( 0 == counter0.current_value_hi() );
+
+ counter0.set_value( 0xfffffffc );
+
+ CHECK( 0xfffffffc == counter0.current_value() );
+ CHECK( 0xfffffffc == counter0.current_value_lo() );
+ CHECK( 0 == counter0.current_value_hi() );
+
+ counter0.tick( 0x13 ); // Overflows 32 bits
+
+ CHECK( 0x10000000fULL == counter0.current_value() );
+ CHECK( 0xf == counter0.current_value_lo() );
+ CHECK( 0x1 == counter0.current_value_hi() );
+
+
+ Cyg_Counter counter1 = Cyg_Counter(big_number);
+
+ CHECK( 0 == counter1.current_value() );
+ CHECK( 0 == counter1.current_value_lo() );
+ CHECK( 0 == counter1.current_value_hi() );
+
+ counter1.tick(2);
+
+ CHECK( 2ll*big_number == counter1.current_value() );
+ CHECK( ((2ll*big_number) & 0xffffffff) ==
+ counter1.current_value_lo() );
+ CHECK( ((2ll*big_number) >> 32) == counter1.current_value_hi() );
+
+ counter1.tick();
+
+ CHECK( 3ll*big_number == counter1.current_value() );
+ CHECK( ((3ll*big_number) & 0xffffffff) ==
+ counter1.current_value_lo() );
+ CHECK( ((3ll*big_number) >> 32) == counter1.current_value_hi() );
+
+ counter1.tick();
+
+ CHECK( 4ll*big_number == counter1.current_value() );
+ CHECK( ((4ll*big_number) & 0xffffffff) ==
+ counter1.current_value_lo() );
+ CHECK( ((4ll*big_number) >> 32) == counter1.current_value_hi() );
+
+ counter1.set_value(1222333444555ll);
+ CHECK( 1222333444555ll == counter1.current_value() );
+
+ counter0.set_value(11);
+ CHECK( 11 == counter0.current_value() );
+
+ // the call_me functions cause the "called" bits to toggle
+ // CHECKing the value of called TEST_CHECKs the parity of # of calls
+ // made by each alarm.
+
+ Cyg_Alarm alarm0 = Cyg_Alarm(&counter0, call_me, 0x1);
+ Cyg_Alarm alarm1 = Cyg_Alarm(&counter0, call_me, 0x2);
+ Cyg_Alarm alarm2 = Cyg_Alarm(&counter0, call_me2, 0x4);
+
+ CHECK( 0x00 == called );
+ alarm0.initialize(12,3);
+ alarm2.initialize(21,2);
+ CHECK( 0x00 == called );
+
+ counter0.tick(); // 12 a0
+ CHECK( 0x01 == called );
+
+ alarm1.initialize(13,0);
+ counter0.tick(); // 13 a1
+ CHECK( 0x03 == called );
+
+ alarm1.initialize(17,0);
+ counter0.tick(); // 14
+ CHECK( 0x03 == called );
+
+ counter0.tick(); // 15 a0
+ CHECK( 0x02 == called );
+
+ counter0.tick(2); // 17 a1
+ CHECK( 0x00 == called );
+
+ counter0.tick(); // 18 a0
+ CHECK( 0x01 == called );
+
+ counter0.tick(3); // 21 a0 a2
+ CHECK( 0x14 == called );
+
+ counter0.tick(2); // 23 a2
+ CHECK( 0x00 == called );
+
+ alarm2.disable();
+
+ counter0.tick(2); // 25 a0(24)
+ CHECK( 0x01 == called );
+
+ alarm2.enable(); // a2 (enabled at 25)
+ CHECK( 0x15 == called );
+
+ counter0.tick(); // 26
+ CHECK( 0x15 == called );
+
+ counter0.tick(2); // 28 a0(27) a2(27)
+ CHECK( 0x00 == called );
+
+ counter0.tick(3); // 31 a0(30) a2(29 31)
+ CHECK( 0x01 == called );
+
+ Cyg_Clock::cyg_resolution res0;
+
+ res0.dividend = 100;
+ res0.divisor = 3;
+
+ Cyg_Clock::cyg_resolution res1;
+
+ Cyg_Clock clock0 = Cyg_Clock(res0);
+
+ res1 = clock0.get_resolution();
+ CHECK( res0.dividend == res1.dividend );
+ CHECK( res0.divisor == res1.divisor );
+
+ res1.dividend = 12;
+ res1.divisor = 25;
+
+ clock0.set_resolution(res1);
+ res0 = clock0.get_resolution();
+ CHECK( res0.dividend == res1.dividend );
+ CHECK( res0.divisor == res1.divisor );
+
+ res0 = Cyg_Clock::real_time_clock->get_resolution();
+
+ CYG_TEST_PASS_FINISH("Clock 0 OK");
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ clock0_main();
+}
+
+#else // def CYGVAR_KERNEL_COUNTERS_CLOCK
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( "Kernel real-time clock disabled");
+}
+
+#endif // def CYGVAR_KERNEL_COUNTERS_CLOCK
+// EOF clock0.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/clock1.cxx b/cesar/ecos/packages/kernel/current/tests/clock1.cxx
new file mode 100644
index 0000000000..bb8b2ae637
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/clock1.cxx
@@ -0,0 +1,132 @@
+//==========================================================================
+//
+// clock1.cxx
+//
+// Clock test 1 - Real Time Clock
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-02-16
+// Description: Tests the Kernel Real Time Clock
+// This test creates a thread, starts the scheduler and
+// delays for a time of about 5 seconds. This test should
+// be expected to run for about this length of time.
+// Omissions:
+// Doesn't test alarms attached to RTC.
+// Assumptions:
+// CYGVAR_KERNEL_COUNTERS_CLOCK must be set.
+// Resolution of clock small compared with 5s.
+// Overhead small compared with 5s.
+// Options:
+// CYGIMP_KERNEL_COUNTERS_SINGLE_LIST
+// CYGIMP_KERNEL_COUNTERS_MULTI_LIST
+// CYGVAR_KERNEL_COUNTERS_CLOCK
+// CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/clock.hxx>
+#include <cyg/kernel/thread.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/clock.inl>
+#include <cyg/kernel/thread.inl>
+
+#ifdef CYGVAR_KERNEL_COUNTERS_CLOCK
+
+
+#define NTHREADS 1
+#include "testaux.hxx"
+
+static cyg_uint32 ticks; // Number of ticks thread[0] will delay for
+
+static cyg_uint64 TEST_DELAY;
+
+static void entry0( CYG_ADDRWORD data )
+{
+ ((Cyg_Thread *)data)->delay(ticks);
+
+ CYG_TEST_PASS_FINISH("Clock 1 OK");
+}
+
+void clock1_main( void )
+{
+ CYG_TEST_INIT();
+
+ if (cyg_test_is_simulator) {
+ TEST_DELAY = 100000000ll;
+ } else {
+ TEST_DELAY = 3000000000ll;
+ }
+
+ new_thread(entry0, (CYG_ADDRWORD)&thread_obj[0]);
+
+ Cyg_Clock::cyg_resolution res;
+
+ res = Cyg_Clock::real_time_clock->get_resolution ();
+
+ // RTC takes res.dividend/res.divisor ns/tick
+ ticks = ((cyg_uint64)TEST_DELAY * res.divisor) / res.dividend;
+
+ Cyg_Scheduler::start();
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ clock1_main();
+}
+
+#else // def CYGVAR_KERNEL_COUNTERS_CLOCK
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( "Kernel real-time clock disabled");
+}
+
+#endif // def CYGVAR_KERNEL_COUNTERS_CLOCK
+
+// EOF clock1.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/clockcnv.cxx b/cesar/ecos/packages/kernel/current/tests/clockcnv.cxx
new file mode 100644
index 0000000000..0b47482814
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/clockcnv.cxx
@@ -0,0 +1,287 @@
+//==========================================================================
+//
+// clockcnv.cxx
+//
+// Clock Converter test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 2000-01-24
+// Description: Tests the Kernel Real Time Clock Converter subsystem
+//
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/clock.hxx>
+#include <cyg/kernel/thread.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/clock.inl>
+#include <cyg/kernel/thread.inl>
+
+#ifdef CYGVAR_KERNEL_COUNTERS_CLOCK
+
+#include <cyg/infra/diag.h>
+
+static void null_printf(const char *, ...)
+{ /* nothing */ }
+
+#define PRINTF0 diag_printf
+#define nPRINTF0 null_printf
+
+#define nPRINTF1 diag_printf
+#define PRINTF1 null_printf
+
+#define nPRINTF2 diag_printf
+#define PRINTF2 null_printf
+
+
+#define NTHREADS 1
+#include "testaux.hxx"
+
+static struct { cyg_uint32 ns; double scale; } ns_tickers[] = {
+ { 70000000, 7.0 }, // 7cS
+ { 50000000, 5.0 }, // 5cS
+ { 45000000, 4.5 }, // 4.5cS
+ { 30000000, 3.0 }, // 3cS
+ { 20000000, 2.0 }, // 2cS
+ { 10000000, 1.0 }, // 1cS - no change
+ { 5000000, 0.5 }, // 1/2 a cS
+ { 4900000, 0.49 }, // a bit below
+ { 3333333, 0.3333333 }, // 1/3 cS
+ { 1250000, 0.125 }, // 800Hz
+ { 1000000, 0.1 }, // 1000Hz
+ { 909090, 0.0909090 }, // 1100Hz
+ { 490000, 0.049 }, // 490uS
+ { 333333, 0.0333333 }, // 1/30 cS, 1/3mS
+ { 49000, 0.0049 }, // 49uS
+ { 33333, 0.0033333 }, // 1/30 mS
+ { 4900, 0.00049 }, // 4.9uS
+ // now some outlandish ones
+ { 170, 0.000017 }, // 170nS
+ { 11, 0.0000011 }, // 11nS
+ { 1000000000u, 100.0 }, // one second
+ { 1234567777u, 123.4567777 }, // 1.234... seconds
+ { 4294967291u, 429.4967291 }, // 4.3 seconds, nearly maxint.
+ // now some which are prime in the nS per tick field
+ { 909091, 0.0909091 }, // also 1100Hz - but 909091 is a prime!
+ // and some eye-pleasing primes from the www - if they're not actually
+ // prime, don't blame me. http://www.rsok.com/~jrm/printprimes.html
+ { 1000003, 0.1000003 },
+ { 1477771, 0.1477771 },
+ { 2000003, 0.2000003 },
+ { 2382001, 0.2382001 },
+ { 3333133, 0.3333133 },
+ { 3999971, 0.3999971 },
+ { 5555591, 0.5555591 },
+ { 6013919, 0.6013919 },
+ // That's enough
+};
+
+static void entry0( CYG_ADDRWORD data )
+{
+ // First just try it with the clock as default:
+ Cyg_Clock *rtc = Cyg_Clock::real_time_clock;
+
+ Cyg_Clock::converter cv, rcv;
+ Cyg_Clock::cyg_resolution res;
+
+ unsigned int counter = 0;
+ unsigned int skipped = 0;
+
+ unsigned int i;
+ for ( i = 0; i < sizeof( ns_tickers )/sizeof( ns_tickers[0] ); i++ ) {
+
+ unsigned int lcounter = 0;
+ unsigned int lskipped = 0;
+
+ rtc->get_other_to_clock_converter( ns_tickers[i].ns, &cv );
+ rtc->get_clock_to_other_converter( ns_tickers[i].ns, &rcv );
+
+ PRINTF1( "ns per tick: %d\n", ns_tickers[i].ns );
+ PRINTF1( " converter: * %d / %d * %d / %d\n",
+ (int)cv.mul1, (int)cv.div1, (int)cv.mul2,(int) cv.div2 );
+ PRINTF1( " reverser: * %d / %d * %d / %d\n",
+ (int)rcv.mul1, (int)rcv.div1, (int)rcv.mul2, (int)rcv.div2 );
+
+ double d = 1.0;
+ d *= (double)cv.mul1;
+ d /= (double)cv.div1;
+ d *= (double)cv.mul2;
+ d /= (double)cv.div2;
+ d *= (double)rcv.mul1;
+ d /= (double)rcv.div1;
+ d *= (double)rcv.mul2;
+ d /= (double)rcv.div2;
+ PRINTF1( " composite product %d.%d\n",
+ (int)d, ((int)(d * 1000000) % 1000000 ) );
+ d -= 1.0;
+ CYG_TEST_CHECK( d < +0.0001, "Overflow in composite product" );
+ CYG_TEST_CHECK( d > -0.0001, "Underflow in composite product" );
+
+ res = rtc->get_resolution();
+
+ double factor_other_to_clock;
+ double factor_clock_to_other;
+
+ // res.dividend/res.divisor is the number of nS in a system
+ // clock tick. So:
+ d = (double)res.dividend/(double)res.divisor;
+
+ factor_other_to_clock = ns_tickers[i].scale * 1.0e7 / d ;
+ factor_clock_to_other = d / (ns_tickers[i].scale * 1.0e7);
+
+ unsigned int j;
+ for ( j = 1; j < 100; j++ ) {
+ cyg_uint64 delay;
+ if (cyg_test_is_simulator)
+ j += 30; // test fewer values
+ /* tr.b..m..k.. */
+
+#ifdef CYGPKG_HAL_V85X_V850_CEB
+ j += 30; // test fewer values
+#endif
+
+ for ( delay = j; delay < 1000000000000ll; delay *= 10 ) {
+ // get the converted result
+ cyg_uint64 result = Cyg_Clock::convert( delay, &cv );
+
+ counter++; lcounter++;
+ if ( (double)delay * (double)cv.mul1 > 1.6e+19 ||
+ (double)delay * (double)rcv.mul1 > 1.6e+19 ) {
+ // in silly territory now, give up.
+ // (that's MAXINT squared, approx.)
+ skipped++; lskipped++;
+ continue; // so the counter is accurate
+ }
+
+ PRINTF2( "delay %x%08x to result %x%08x\n",
+ (int)(delay >> 32), (int)delay,
+ (int)(result >> 32), (int)result );
+
+ // get what it should be in double maths
+ double delta = factor_other_to_clock * (double)delay;
+ if ( delta > 1000.0 ) {
+ delta = (double)result - delta;
+ delta /= (double)result;
+ CYG_TEST_CHECK( delta <= +0.01,
+ "Proportional overflow in conversion to" );
+ CYG_TEST_CHECK( delta >= -0.01,
+ "Proportional underflow in conversion to" );
+ }
+ else {
+ cyg_uint64 lo = (cyg_uint64)(delta); // assume TRUNCATION
+ cyg_uint64 hi = lo + 1;
+ CYG_TEST_CHECK( hi >= result,
+ "Range overflow in conversion to" );
+ CYG_TEST_CHECK( lo <= result,
+ "Range underflow in conversion to" );
+ }
+
+ // get the converted result
+ result = Cyg_Clock::convert( delay, &rcv );
+
+ PRINTF2( "delay %x%08x from result %x%08x\n",
+ (int)(delay >> 32), (int)delay,
+ (int)(result >> 32), (int)result );
+
+ // get what it should be in double maths
+ delta = factor_clock_to_other * (double)delay;
+ if ( delta > 1000.0 ) {
+ delta = (double)result - delta;
+ delta /= (double)result;
+ CYG_TEST_CHECK( delta <= +0.01,
+ "Proportional overflow in conversion from" );
+ CYG_TEST_CHECK( delta >= -0.01,
+ "Proportional underflow in conversion from" );
+ }
+ else {
+ cyg_uint64 lo = (cyg_uint64)(delta); // assume TRUNCATION
+ cyg_uint64 hi = lo + 1;
+ CYG_TEST_CHECK( hi >= result,
+ "Range overflow in conversion from" );
+ CYG_TEST_CHECK( lo <= result,
+ "Range underflow in conversion from" );
+ }
+
+ if (cyg_test_is_simulator)
+ break;
+ }
+ }
+ PRINTF0( "INFO:<%d nS/tick: tested %d values, skipped %d because of overflow>\n",
+ ns_tickers[i].ns, lcounter, lskipped );
+ }
+
+ PRINTF0( "INFO:<tested %d values, total skipped %d because of overflow>\n",
+ counter, skipped );
+
+ CYG_TEST_PASS_FINISH("ClockCnv OK");
+}
+
+void clockcnv_main( void )
+{
+ CYG_TEST_INIT();
+ new_thread(entry0, (CYG_ADDRWORD)&thread_obj[0]);
+ Cyg_Scheduler::start();
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ clockcnv_main();
+}
+
+#else // def CYGVAR_KERNEL_COUNTERS_CLOCK
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( "Kernel real-time clock disabled");
+}
+
+#endif // def CYGVAR_KERNEL_COUNTERS_CLOCK
+
+// EOF clockcnv.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/clocktruth.cxx b/cesar/ecos/packages/kernel/current/tests/clocktruth.cxx
new file mode 100644
index 0000000000..c8dbad1ffd
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/clocktruth.cxx
@@ -0,0 +1,155 @@
+//==========================================================================
+//
+// clocktruth.cxx
+//
+// Clock Converter test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 2001-06-05
+// Description: Tests the Kernel Real Time Clock for accuracy using a human
+//
+//####DESCRIPTIONEND####
+
+
+// This is for a human to watch to sanity check the clock rate.
+// It's easier to see what's happening if you enable this:
+#define nRUNFOREVER
+
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/clock.hxx>
+#include <cyg/kernel/sema.hxx>
+#include <cyg/kernel/thread.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/clock.inl>
+#include <cyg/kernel/thread.inl>
+
+#ifdef CYGVAR_KERNEL_COUNTERS_CLOCK
+
+#include <cyg/infra/diag.h>
+
+#define NTHREADS 1
+#include "testaux.hxx"
+
+#ifdef RUNFOREVER
+#define ENDPOINT 8192
+#else
+#define ENDPOINT 20
+#endif
+
+static cyg_alarm_fn alarmfunc;
+static void alarmfunc( Cyg_Alarm *alarm, CYG_ADDRWORD data )
+{
+ Cyg_Binary_Semaphore *sp = (Cyg_Binary_Semaphore *)data;
+ sp->post();
+}
+
+
+static void entry0( CYG_ADDRWORD data )
+{
+ cyg_uint32 now, then;
+ int i;
+
+ Cyg_Clock *rtc = Cyg_Clock::real_time_clock;
+
+ Cyg_Binary_Semaphore sema;
+
+ Cyg_Alarm alarm( rtc, &alarmfunc, (CYG_ADDRWORD)&sema );
+
+ // First, print 100 lines as fast as you can, of distinct ticks.
+ for ( i = 0; i < 100; i++ ) {
+ now = rtc->current_value_lo();
+ then = now;
+ while ( then == now )
+ now = rtc->current_value_lo();
+
+ diag_printf( "INFO<time now %8d>\n", now );
+ }
+
+ diag_printf( "INFO<per-second times are: %8d>\n", rtc->current_value_lo() );
+ for ( i = 0; i < 20; i++ ) {
+ Cyg_Thread::counted_sleep( 100 );
+ diag_printf( "INFO<per-second time %2d is %8d>\n",
+ i, rtc->current_value_lo() );
+ }
+
+ alarm.initialize( rtc->current_value() + 100, 100 );
+ alarm.enable();
+ for ( i = 0; i < ENDPOINT; i++ ) {
+ sema.wait();
+ diag_printf( "INFO<alarm time %2d is %8d>\n",
+ i, rtc->current_value_lo() );
+ }
+
+ CYG_TEST_PASS_FINISH("Clock truth OK");
+}
+
+void clocktruth_main( void )
+{
+ CYG_TEST_INIT();
+ new_thread(entry0, (CYG_ADDRWORD)&thread_obj[0]);
+ Cyg_Scheduler::start();
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ clocktruth_main();
+}
+
+#else // def CYGVAR_KERNEL_COUNTERS_CLOCK
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( "Kernel real-time clock disabled");
+}
+
+#endif // def CYGVAR_KERNEL_COUNTERS_CLOCK
+
+// EOF clocktruth.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/cnt_sem0.cxx b/cesar/ecos/packages/kernel/current/tests/cnt_sem0.cxx
new file mode 100644
index 0000000000..8ef0f1656c
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/cnt_sem0.cxx
@@ -0,0 +1,89 @@
+//==========================================================================
+//
+// cnt_sem0.cxx
+//
+// Counting semaphore test 0
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-02-24
+// Description: Limited to checking constructors/destructors
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/sema.hxx>
+
+#include <cyg/infra/testcase.h>
+
+static Cyg_Counting_Semaphore sema0, sema1(0), sema2(1);
+
+#include "testaux.hxx"
+
+static bool flash( void )
+{
+ Cyg_Counting_Semaphore s0;
+
+ Cyg_Counting_Semaphore s1(97);
+
+ Cyg_Counting_Semaphore s2(0);
+
+ return true;
+}
+
+void cnt_sem0_main( void )
+{
+ CYG_TEST_INIT();
+
+ CHECK(flash());
+ CHECK(flash());
+
+ CYG_TEST_PASS_FINISH("Counting Semaphore 0 OK");
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ cnt_sem0_main();
+}
+
+// EOF cnt_sem0.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/cnt_sem1.cxx b/cesar/ecos/packages/kernel/current/tests/cnt_sem1.cxx
new file mode 100644
index 0000000000..f23b63f7d3
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/cnt_sem1.cxx
@@ -0,0 +1,135 @@
+//==========================================================================
+//
+// cnt_sem1.cxx
+//
+// Counting semaphore test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-02-24
+// Description: Tests basic counting semaphore functionality.
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/thread.hxx> // Cyg_Thread
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/sched.hxx> // Cyg_Scheduler::start()
+
+#include <cyg/kernel/sema.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/sched.inl>
+
+
+#define NTHREADS 2
+#include "testaux.hxx"
+
+static Cyg_Counting_Semaphore s0(0), s1(2), s2;
+
+static volatile cyg_ucount8 q = 0;
+
+static void entry0( CYG_ADDRWORD data )
+{
+ s0.wait();
+ CHECK( 1 == q++ );
+ s1.post();
+ s0.wait();
+ CHECK( 3 == q++ );
+ CHECK( 0 == s0.peek() );
+ CHECK( ! s0.trywait() );
+ s0.post();
+ CHECK( 4 == q++ );
+ CHECK( 1 == s0.peek() );
+ s0.post();
+ CHECK( 2 == s0.peek() );
+ s1.post();
+ CHECK( 0 == s2.peek() );
+ s2.wait();
+ CHECK( 6 == q++ );
+ CYG_TEST_PASS_FINISH("Counting Semaphore 1 OK");
+}
+
+static void entry1( CYG_ADDRWORD data )
+{
+ CHECK( 2 == s1.peek() );
+ s1.wait();
+ CHECK( 1 == s1.peek() );
+ s1.wait();
+ CHECK( 0 == q++ );
+ CHECK( 0 == s0.peek() );
+ s0.post();
+ s1.wait();
+ CHECK( 2 == q++ );
+ s0.post();
+ s1.wait();
+ CHECK( 5 == q++ );
+ CHECK( 2 == s0.peek() );
+ CHECK( s0.trywait() );
+ CHECK( 1 == s0.peek() );
+ CHECK( s0.trywait() );
+ CHECK( 0 == s0.peek() );
+ s2.post();
+ s0.wait();
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+void cnt_sem1_main( void )
+{
+ CYG_TEST_INIT();
+
+ new_thread(entry0, 0);
+ new_thread(entry1, 1);
+
+ Cyg_Scheduler::start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ cnt_sem1_main();
+}
+
+// EOF cnt_sem1.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/dhrystone.c b/cesar/ecos/packages/kernel/current/tests/dhrystone.c
new file mode 100644
index 0000000000..6eb3d0a4ec
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/dhrystone.c
@@ -0,0 +1,1176 @@
+//=============================================================================
+//####UNSUPPORTEDBEGIN####
+//
+// -------------------------------------------
+// This source file has been contributed to eCos/Red Hat. It may have been
+// changed slightly to provide an interface consistent with those of other
+// files.
+//
+// The functionality and contents of this file is supplied "AS IS"
+// without any form of support and will not necessarily be kept up
+// to date by Red Hat.
+//
+// The style of programming used in this file may not comply with the
+// eCos programming guidelines. Please do not use as a base for other
+// files.
+//
+// All inquiries about this file, or the functionality provided by it,
+// should be directed to the 'ecos-discuss' mailing list (see
+// http://ecos.sourceware.org/ecos/intouch.html for details).
+//
+// -------------------------------------------
+//
+//####UNSUPPORTEDEND####
+//=============================================================================
+// Originally three different files, dhry.h, dhry21a.c and dhry21b.c
+// Merged into one file and changed a little to avoid compilation warnings.
+// The files were found at:
+// FTP ftp.nosc.mil/pub/aburto/dhrystone
+//=============================================================================
+
+#include <pkgconf/system.h>
+#include <pkgconf/infra.h>
+#include <pkgconf/kernel.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/testcase.h>
+
+#if !defined(CYGPKG_ISOINFRA)
+# define NA_MSG "Requires CYGPKG_ISOINFRA"
+#else
+# include <pkgconf/isoinfra.h>
+
+# if !defined(CYGFUN_KERNEL_API_C) \
+ || !defined(CYGINT_ISO_STDIO_FORMATTED_IO) \
+ || CYGINT_ISO_MALLOC == 0 \
+ || !defined(CYGINT_ISO_STRING_STRFUNCS)
+
+# define NA_MSG "Requires CYGFUN_KERNEL_API_C && CYGINT_ISO_STDIO_FORMATTED_IO && CYGINT_ISO_MALLOC && CYGINT_ISO_STRING_STRFUNCS"
+
+# elif !defined(__OPTIMIZE__) \
+ || defined(CYGPKG_INFRA_DEBUG) \
+ || defined(CYGPKG_KERNEL_INSTRUMENT)
+# define NA_MSG "Only runs with optimized code, no tracing and no asserts"
+# elif defined(CYGDBG_INFRA_DIAG_USE_DEVICE)
+# define NA_MSG "Must use HAL diag output to avoid background DSR activity"
+# endif
+#endif
+
+#ifndef NA_MSG
+
+#include <cyg/hal/hal_cache.h>
+#include <cyg/kernel/kapi.h>
+#include <stdlib.h>
+#include <string.h>
+
+// Time in seconds.
+double
+dtime(void)
+{
+ return (double) cyg_current_time() / 100;
+}
+
+// Number of loops to run.
+#if defined(CYGPRI_KERNEL_TESTS_DHRYSTONE_PASSES)
+# define PASSES CYGPRI_KERNEL_TESTS_DHRYSTONE_PASSES
+#else
+# define PASSES 400000
+#endif
+
+// Used in the code below to mark changes to the code.
+#define __ECOS__
+
+#undef true
+#undef false
+
+
+/*
+ *************************************************************************
+ *
+ * "DHRYSTONE" Benchmark Program
+ * -----------------------------
+ *
+ * Version: C, Version 2.1
+ *
+ * File: dhry.h (part 1 of 3)
+ *
+ * Date: May 25, 1988
+ *
+ * Author: Reinhold P. Weicker
+ * Siemens Nixdorf Inf. Syst.
+ * STM OS 32
+ * Otto-Hahn-Ring 6
+ * W-8000 Muenchen 83
+ * Germany
+ * Phone: [+49]-89-636-42436
+ * (8-17 Central European Time)
+ * UUCP: weicker@ztivax.uucp@unido.uucp
+ * Internet: weicker@ztivax.siemens.com
+ *
+ * Original Version (in Ada) published in
+ * "Communications of the ACM" vol. 27., no. 10 (Oct. 1984),
+ * pp. 1013 - 1030, together with the statistics
+ * on which the distribution of statements etc. is based.
+ *
+ * In this C version, the following C library functions are
+ * used:
+ * - strcpy, strcmp (inside the measurement loop)
+ * - printf, scanf (outside the measurement loop)
+ *
+ * Collection of Results:
+ * Reinhold Weicker (address see above) and
+ *
+ * Rick Richardson
+ * PC Research. Inc.
+ * 94 Apple Orchard Drive
+ * Tinton Falls, NJ 07724
+ * Phone: (201) 834-1378 (9-17 EST)
+ * UUCP: ...!uunet!pcrat!rick
+ *
+ * Please send results to Rick Richardson and/or Reinhold Weicker.
+ * Complete information should be given on hardware and software
+ * used. Hardware information includes: Machine type, CPU, type and
+ * size of caches; for microprocessors: clock frequency, memory speed
+ * (number of wait states). Software information includes: Compiler
+ * (and runtime library) manufacturer and version, compilation
+ * switches, OS version. The Operating System version may give an
+ * indication about the compiler; Dhrystone itself performs no OS
+ * calls in the measurement loop.
+ *
+ * The complete output generated by the program should be mailed
+ * such that at least some checks for correctness can be made.
+ *
+ *************************************************************************
+ *
+ * History: This version C/2.1 has been made for two reasons:
+ *
+ * 1) There is an obvious need for a common C version of
+ * Dhrystone, since C is at present the most popular system
+ * programming language for the class of processors
+ * (microcomputers, minicomputers) where Dhrystone is used
+ * most. There should be, as far as possible, only one C
+ * version of Dhrystone such that results can be compared
+ * without restrictions. In the past, the C versions
+ * distributed by Rick Richardson (Version 1.1) and by
+ * Reinhold Weicker had small (though not significant)
+ * differences.
+ *
+ * 2) As far as it is possible without changes to the
+ * Dhrystone statistics, optimizing compilers should be
+ * prevented from removing significant statements.
+ *
+ * This C version has been developed in cooperation with
+ * Rick Richardson (Tinton Falls, NJ), it incorporates many
+ * ideas from the "Version 1.1" distributed previously by
+ * him over the UNIX network Usenet.
+ * I also thank Chaim Benedelac (National Semiconductor),
+ * David Ditzel (SUN), Earl Killian and John Mashey (MIPS),
+ * Alan Smith and Rafael Saavedra-Barrera (UC at Berkeley)
+ * for their help with comments on earlier versions of the
+ * benchmark.
+ *
+ * Changes: In the initialization part, this version follows mostly
+ * Rick Richardson's version distributed via Usenet, not the
+ * version distributed earlier via floppy disk by Reinhold
+ * Weicker. As a concession to older compilers, names have
+ * been made unique within the first 8 characters. Inside the
+ * measurement loop, this version follows the version
+ * previously distributed by Reinhold Weicker.
+ *
+ * At several places in the benchmark, code has been added,
+ * but within the measurement loop only in branches that
+ * are not executed. The intention is that optimizing
+ * compilers should be prevented from moving code out of the
+ * measurement loop, or from removing code altogether. Since
+ * the statements that are executed within the measurement
+ * loop have NOT been changed, the numbers defining the
+ * "Dhrystone distribution" (distribution of statements,
+ * operand types and locality) still hold. Except for
+ * sophisticated optimizing compilers, execution times for
+ * this version should be the same as for previous versions.
+ *
+ * Since it has proven difficult to subtract the time for the
+ * measurement loop overhead in a correct way, the loop check
+ * has been made a part of the benchmark. This does have
+ * an impact - though a very minor one - on the distribution
+ * statistics which have been updated for this version.
+ *
+ * All changes within the measurement loop are described
+ * and discussed in the companion paper "Rationale for
+ * Dhrystone version 2".
+ *
+ * Because of the self-imposed limitation that the order and
+ * distribution of the executed statements should not be
+ * changed, there are still cases where optimizing compilers
+ * may not generate code for some statements. To a certain
+ * degree, this is unavoidable for small synthetic
+ * benchmarks. Users of the benchmark are advised to check
+ * code listings whether code is generated for all statements
+ * of Dhrystone.
+ *
+ * Version 2.1 is identical to version 2.0 distributed via
+ * the UNIX network Usenet in March 1988 except that it
+ * corrects some minor deficiencies that were found by users
+ * of version 2.0. The only change within the measurement
+ * loop is that a non-executed "else" part was added to the
+ * "if" statement in Func_3, and a non-executed "else" part
+ * removed from Proc_3.
+ *
+ *************************************************************************
+ *
+ * Defines: The following "Defines" are possible:
+ * -DROPT (default: Not defined)
+ * As an approximation to what an average C
+ * programmer might do, the "register" storage class
+ * is applied (if enabled by -DROPT)
+ * - for local variables, if they are used
+ * (dynamically) five or more times
+ * - for parameters if they are used (dynamically)
+ * six or more times
+ * Note that an optimal "register" strategy is
+ * compiler-dependent, and that "register"
+ * declarations do not necessarily lead to faster
+ * execution.
+ * -DNOSTRUCTASSIGN (default: Not defined)
+ * Define if the C compiler does not support
+ * assignment of structures.
+ * -DNOENUMS (default: Not defined)
+ * Define if the C compiler does not support
+ * enumeration types.
+ *
+ *************************************************************************
+ *
+ * Compilation model and measurement (IMPORTANT):
+ *
+ * This C version of Dhrystone consists of three files:
+ * - dhry.h (this file, containing global definitions and comments)
+ * - dhry_1.c (containing the code corresponding to Ada package Pack_1)
+ * - dhry_2.c (containing the code corresponding to Ada package Pack_2)
+ *
+ * The following "ground rules" apply for measurements:
+ * - Separate compilation
+ * - No procedure merging
+ * - Otherwise, compiler optimizations are allowed but should be
+ * indicated
+ * - Default results are those without register declarations
+ * See the companion paper "Rationale for Dhrystone Version 2" for a more
+ * detailed discussion of these ground rules.
+ *
+ * For 16-Bit processors (e.g. 80186, 80286), times for all compilation
+ * models ("small", "medium", "large" etc.) should be given if possible,
+ * together with a definition of these models for the compiler system
+ * used.
+ *
+ *************************************************************************
+ *
+ * Dhrystone (C version) statistics:
+ *
+ * [Comment from the first distribution, updated for version 2.
+ * Note that because of language differences, the numbers are slightly
+ * different from the Ada version.]
+ *
+ * The following program contains statements of a high level programming
+ * language (here: C) in a distribution considered representative:
+ *
+ * assignments 52 (51.0 %)
+ * control statements 33 (32.4 %)
+ * procedure, function calls 17 (16.7 %)
+ *
+ * 103 statements are dynamically executed. The program is balanced with
+ * respect to the three aspects:
+ *
+ * - statement type
+ * - operand type
+ * - operand locality
+ * operand global, local, parameter, or constant.
+ *
+ * The combination of these three aspects is balanced only approximately.
+ *
+ * 1. Statement Type:
+ * ----------------- number
+ *
+ * V1 = V2 9
+ * (incl. V1 = F(..)
+ * V = Constant 12
+ * Assignment, 7
+ * with array element
+ * Assignment, 6
+ * with record component
+ * --
+ * 34 34
+ *
+ * X = Y +|-|"&&"|"|" Z 5
+ * X = Y +|-|"==" Constant 6
+ * X = X +|- 1 3
+ * X = Y *|/ Z 2
+ * X = Expression, 1
+ * two operators
+ * X = Expression, 1
+ * three operators
+ * --
+ * 18 18
+ *
+ * if .... 14
+ * with "else" 7
+ * without "else" 7
+ * executed 3
+ * not executed 4
+ * for ... 7 | counted every time
+ * while ... 4 | the loop condition
+ * do ... while 1 | is evaluated
+ * switch ... 1
+ * break 1
+ * declaration with 1
+ * initialization
+ * --
+ * 34 34
+ *
+ * P (...) procedure call 11
+ * user procedure 10
+ * library procedure 1
+ * X = F (...)
+ * function call 6
+ * user function 5
+ * library function 1
+ * --
+ * 17 17
+ * ---
+ * 103
+ *
+ * The average number of parameters in procedure or function calls
+ * is 1.82 (not counting the function values as implicit parameters).
+ *
+ *
+ * 2. Operators
+ * ------------
+ * number approximate
+ * percentage
+ *
+ * Arithmetic 32 50.8
+ *
+ * + 21 33.3
+ * - 7 11.1
+ * * 3 4.8
+ * / (int div) 1 1.6
+ *
+ * Comparison 27 42.8
+ *
+ * == 9 14.3
+ * /= 4 6.3
+ * > 1 1.6
+ * < 3 4.8
+ * >= 1 1.6
+ * <= 9 14.3
+ *
+ * Logic 4 6.3
+ *
+ * && (AND-THEN) 1 1.6
+ * | (OR) 1 1.6
+ * ! (NOT) 2 3.2
+ *
+ * -- -----
+ * 63 100.1
+ *
+ *
+ * 3. Operand Type (counted once per operand reference):
+ * ---------------
+ * number approximate
+ * percentage
+ *
+ * Integer 175 72.3 %
+ * Character 45 18.6 %
+ * Pointer 12 5.0 %
+ * String30 6 2.5 %
+ * Array 2 0.8 %
+ * Record 2 0.8 %
+ * --- -------
+ * 242 100.0 %
+ *
+ * When there is an access path leading to the final operand (e.g. a
+ * record component), only the final data type on the access path is
+ * counted.
+ *
+ *
+ * 4. Operand Locality:
+ * -------------------
+ * number approximate
+ * percentage
+ *
+ * local variable 114 47.1 %
+ * global variable 22 9.1 %
+ * parameter 45 18.6 %
+ * value 23 9.5 %
+ * reference 22 9.1 %
+ * function result 6 2.5 %
+ * constant 55 22.7 %
+ * --- -------
+ * 242 100.0 %
+ *
+ *
+ * The program does not compute anything meaningful, but it is
+ * syntactically and semantically correct. All variables have a value
+ * assigned to them before they are used as a source operand.
+ *
+ * There has been no explicit effort to account for the effects of a
+ * cache, or to balance the use of long or short displacements for code
+ * or data.
+ *
+ *************************************************************************
+ */
+
+/* Compiler and system dependent definitions: */
+
+#define Mic_secs_Per_Second 1000000.0
+ /* Berkeley UNIX C returns process times in seconds/HZ */
+
+#ifdef NOSTRUCTASSIGN
+#define structassign(d, s) memcpy(&(d), &(s), sizeof(d))
+#else
+#define structassign(d, s) d = s
+#endif
+
+#ifdef NOENUM
+#define Ident_1 0
+#define Ident_2 1
+#define Ident_3 2
+#define Ident_4 3
+#define Ident_5 4
+ typedef int Enumeration;
+#else
+ typedef enum {Ident_1, Ident_2, Ident_3, Ident_4, Ident_5}
+ Enumeration;
+#endif
+ /* for boolean and enumeration types in Ada, Pascal */
+
+/* General definitions: */
+
+#include <stdio.h>
+ /* for strcpy, strcmp */
+
+#define Null 0
+ /* Value of a Null pointer */
+#define true 1
+#define false 0
+
+typedef int One_Thirty;
+typedef int One_Fifty;
+typedef char Capital_Letter;
+typedef int Boolean;
+typedef char Str_30 [31];
+typedef int Arr_1_Dim [50];
+typedef int Arr_2_Dim [50] [50];
+
+typedef struct record
+ {
+ struct record *Ptr_Comp;
+ Enumeration Discr;
+ union {
+ struct {
+ Enumeration Enum_Comp;
+ int Int_Comp;
+ char Str_Comp [31];
+ } var_1;
+ struct {
+ Enumeration E_Comp_2;
+ char Str_2_Comp [31];
+ } var_2;
+ struct {
+ char Ch_1_Comp;
+ char Ch_2_Comp;
+ } var_3;
+ } variant;
+ } Rec_Type, *Rec_Pointer;
+
+#ifdef __ECOS__
+
+#ifndef ROPT
+#define REG
+ /* REG becomes defined as empty */
+ /* i.e. no register variables */
+#else
+#define REG register
+#endif
+
+Boolean Func_2 (Str_30 Str_1_Par_Ref, Str_30 Str_2_Par_Ref);
+Boolean Func_3 (Enumeration Enum_Par_Val);
+
+void Proc_1 (REG Rec_Pointer Ptr_Val_Par);
+void Proc_2 (One_Fifty* Int_Par_Ref);
+void Proc_3 (Rec_Pointer *Ptr_Ref_Par);
+void Proc_4 (void);
+void Proc_5 (void);
+void Proc_6 (Enumeration Enum_Val_Par, Enumeration* Enum_Ref_Par);
+void Proc_7 (One_Fifty Int_1_Par_Val, One_Fifty Int_2_Par_Val,
+ One_Fifty* Int_Par_Ref);
+void Proc_8 (Arr_1_Dim Arr_1_Par_Ref, Arr_2_Dim Arr_2_Par_Ref,
+ int Int_1_Par_Val, int Int_2_Par_Val);
+Enumeration Func_1 (Capital_Letter Ch_1_Par_Val, Capital_Letter Ch_2_Par_Val);
+
+#endif // __ECOS__
+
+/*
+ *************************************************************************
+ *
+ * "DHRYSTONE" Benchmark Program
+ * -----------------------------
+ *
+ * Version: C, Version 2.1
+ *
+ * File: dhry_1.c (part 2 of 3)
+ *
+ * Date: May 25, 1988
+ *
+ * Author: Reinhold P. Weicker
+ *
+ *************************************************************************
+ */
+
+#include <stdio.h>
+#ifndef __ECOS__
+#include "dhry.h"
+#endif // __ECOS__
+
+/* Global Variables: */
+
+Rec_Pointer Ptr_Glob,
+ Next_Ptr_Glob;
+int Int_Glob;
+Boolean Bool_Glob;
+char Ch_1_Glob,
+ Ch_2_Glob;
+int Arr_1_Glob [50];
+int Arr_2_Glob [50] [50];
+
+char Reg_Define[] = "Register option selected.";
+
+#ifndef __ECOS__
+extern char *malloc ();
+Enumeration Func_1 ();
+#endif
+ /*
+ forward declaration necessary since Enumeration may not simply be int
+ */
+
+#ifndef __ECOS__
+#ifndef ROPT
+#define REG
+ /* REG becomes defined as empty */
+ /* i.e. no register variables */
+#else
+#define REG register
+#endif
+#endif
+
+/* variables for time measurement: */
+
+#define Too_Small_Time 2
+ /* Measurements should last at least 2 seconds */
+
+double Begin_Time,
+ End_Time,
+ User_Time;
+
+double Microseconds,
+ Dhrystones_Per_Second,
+ Vax_Mips;
+
+/* end of variables for time measurement */
+
+
+#ifndef __ECOS__
+void main ()
+#else // __ECOS__
+int main (void)
+#endif // __ECOS__
+/*****/
+
+ /* main program, corresponds to procedures */
+ /* Main and Proc_0 in the Ada version */
+{
+#ifndef __ECOS__
+ double dtime();
+#endif // __ECOS__
+
+ One_Fifty Int_1_Loc;
+ REG One_Fifty Int_2_Loc;
+ One_Fifty Int_3_Loc;
+ REG char Ch_Index;
+ Enumeration Enum_Loc;
+ Str_30 Str_1_Loc;
+ Str_30 Str_2_Loc;
+ REG int Run_Index;
+ REG int Number_Of_Runs;
+
+
+#ifdef __ECOS__
+
+ CYG_TEST_INIT();
+
+#ifdef CYG_HAL_I386_LINUX
+ CYG_TEST_NA("Only runs on hardware...");
+#else
+ if (cyg_test_is_simulator)
+ CYG_TEST_NA("Only runs on hardware...");
+#endif
+
+#else // __ECOS__
+ FILE *Ap;
+
+ /* Initializations */
+
+ if ((Ap = fopen("dhry.res","a+")) == NULL)
+ {
+ printf("Can not open dhry.res\n\n");
+ exit(1);
+ }
+#endif // __ECOS__
+
+ Next_Ptr_Glob = (Rec_Pointer) malloc (sizeof (Rec_Type));
+ Ptr_Glob = (Rec_Pointer) malloc (sizeof (Rec_Type));
+
+ Ptr_Glob->Ptr_Comp = Next_Ptr_Glob;
+ Ptr_Glob->Discr = Ident_1;
+ Ptr_Glob->variant.var_1.Enum_Comp = Ident_3;
+ Ptr_Glob->variant.var_1.Int_Comp = 40;
+ strcpy (Ptr_Glob->variant.var_1.Str_Comp,
+ "DHRYSTONE PROGRAM, SOME STRING");
+ strcpy (Str_1_Loc, "DHRYSTONE PROGRAM, 1'ST STRING");
+
+ Arr_2_Glob [8][7] = 10;
+ /* Was missing in published program. Without this statement, */
+ /* Arr_2_Glob [8][7] would have an undefined value. */
+ /* Warning: With 16-Bit processors and Number_Of_Runs > 32000, */
+ /* overflow may occur for this array element. */
+
+ printf ("\n");
+ printf ("Dhrystone Benchmark, Version 2.1 (Language: C)\n");
+ printf ("\n");
+/*
+ if (Reg)
+ {
+ printf ("Program compiled with 'register' attribute\n");
+ printf ("\n");
+ }
+ else
+ {
+ printf ("Program compiled without 'register' attribute\n");
+ printf ("\n");
+ }
+*/
+#ifdef __ECOS__
+ Number_Of_Runs = PASSES;
+#else // __ECOS__
+ printf ("Please give the number of runs through the benchmark: ");
+ {
+ int n;
+ scanf ("%d", &n);
+ Number_Of_Runs = n;
+ }
+ printf ("\n");
+#endif // __ECOS__
+
+ printf ("Execution starts, %d runs through Dhrystone\n",Number_Of_Runs);
+
+ /***************/
+ /* Start timer */
+ /***************/
+
+ Begin_Time = dtime();
+
+ for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index)
+ {
+
+ Proc_5();
+ Proc_4();
+ /* Ch_1_Glob == 'A', Ch_2_Glob == 'B', Bool_Glob == true */
+ Int_1_Loc = 2;
+ Int_2_Loc = 3;
+ strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 2'ND STRING");
+ Enum_Loc = Ident_2;
+ Bool_Glob = ! Func_2 (Str_1_Loc, Str_2_Loc);
+ /* Bool_Glob == 1 */
+ while (Int_1_Loc < Int_2_Loc) /* loop body executed once */
+ {
+ Int_3_Loc = 5 * Int_1_Loc - Int_2_Loc;
+ /* Int_3_Loc == 7 */
+ Proc_7 (Int_1_Loc, Int_2_Loc, &Int_3_Loc);
+ /* Int_3_Loc == 7 */
+ Int_1_Loc += 1;
+ } /* while */
+ /* Int_1_Loc == 3, Int_2_Loc == 3, Int_3_Loc == 7 */
+ Proc_8 (Arr_1_Glob, Arr_2_Glob, Int_1_Loc, Int_3_Loc);
+ /* Int_Glob == 5 */
+ Proc_1 (Ptr_Glob);
+ for (Ch_Index = 'A'; Ch_Index <= Ch_2_Glob; ++Ch_Index)
+ /* loop body executed twice */
+ {
+ if (Enum_Loc == Func_1 (Ch_Index, 'C'))
+ /* then, not executed */
+ {
+ Proc_6 (Ident_1, &Enum_Loc);
+ strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 3'RD STRING");
+ Int_2_Loc = Run_Index;
+ Int_Glob = Run_Index;
+ }
+ }
+ /* Int_1_Loc == 3, Int_2_Loc == 3, Int_3_Loc == 7 */
+ Int_2_Loc = Int_2_Loc * Int_1_Loc;
+ Int_1_Loc = Int_2_Loc / Int_3_Loc;
+ Int_2_Loc = 7 * (Int_2_Loc - Int_3_Loc) - Int_1_Loc;
+ /* Int_1_Loc == 1, Int_2_Loc == 13, Int_3_Loc == 7 */
+ Proc_2 (&Int_1_Loc);
+ /* Int_1_Loc == 5 */
+
+ } /* loop "for Run_Index" */
+
+ /**************/
+ /* Stop timer */
+ /**************/
+
+ End_Time = dtime();
+
+ printf ("Execution ends\n");
+ printf ("\n");
+ printf ("Final values of the variables used in the benchmark:\n");
+ printf ("\n");
+ printf ("Int_Glob: %d\n", Int_Glob);
+ printf (" should be: %d\n", 5);
+ printf ("Bool_Glob: %d\n", Bool_Glob);
+ printf (" should be: %d\n", 1);
+ printf ("Ch_1_Glob: %c\n", Ch_1_Glob);
+ printf (" should be: %c\n", 'A');
+ printf ("Ch_2_Glob: %c\n", Ch_2_Glob);
+ printf (" should be: %c\n", 'B');
+ printf ("Arr_1_Glob[8]: %d\n", Arr_1_Glob[8]);
+ printf (" should be: %d\n", 7);
+ printf ("Arr_2_Glob[8][7]: %d\n", Arr_2_Glob[8][7]);
+ printf (" should be: Number_Of_Runs + 10\n");
+ printf ("Ptr_Glob->\n");
+ printf (" Ptr_Comp: %d\n", (int) Ptr_Glob->Ptr_Comp);
+ printf (" should be: (implementation-dependent)\n");
+ printf (" Discr: %d\n", Ptr_Glob->Discr);
+ printf (" should be: %d\n", 0);
+ printf (" Enum_Comp: %d\n", Ptr_Glob->variant.var_1.Enum_Comp);
+ printf (" should be: %d\n", 2);
+ printf (" Int_Comp: %d\n", Ptr_Glob->variant.var_1.Int_Comp);
+ printf (" should be: %d\n", 17);
+ printf (" Str_Comp: %s\n", Ptr_Glob->variant.var_1.Str_Comp);
+ printf (" should be: DHRYSTONE PROGRAM, SOME STRING\n");
+ printf ("Next_Ptr_Glob->\n");
+ printf (" Ptr_Comp: %d\n", (int) Next_Ptr_Glob->Ptr_Comp);
+ printf (" should be: (implementation-dependent), same as above\n");
+ printf (" Discr: %d\n", Next_Ptr_Glob->Discr);
+ printf (" should be: %d\n", 0);
+ printf (" Enum_Comp: %d\n", Next_Ptr_Glob->variant.var_1.Enum_Comp);
+ printf (" should be: %d\n", 1);
+ printf (" Int_Comp: %d\n", Next_Ptr_Glob->variant.var_1.Int_Comp);
+ printf (" should be: %d\n", 18);
+ printf (" Str_Comp: %s\n", Next_Ptr_Glob->variant.var_1.Str_Comp);
+ printf (" should be: DHRYSTONE PROGRAM, SOME STRING\n");
+ printf ("Int_1_Loc: %d\n", Int_1_Loc);
+ printf (" should be: %d\n", 5);
+ printf ("Int_2_Loc: %d\n", Int_2_Loc);
+ printf (" should be: %d\n", 13);
+ printf ("Int_3_Loc: %d\n", Int_3_Loc);
+ printf (" should be: %d\n", 7);
+ printf ("Enum_Loc: %d\n", Enum_Loc);
+ printf (" should be: %d\n", 1);
+ printf ("Str_1_Loc: %s\n", Str_1_Loc);
+ printf (" should be: DHRYSTONE PROGRAM, 1'ST STRING\n");
+ printf ("Str_2_Loc: %s\n", Str_2_Loc);
+ printf (" should be: DHRYSTONE PROGRAM, 2'ND STRING\n");
+ printf ("\n");
+
+ User_Time = End_Time - Begin_Time;
+
+ if (User_Time < Too_Small_Time)
+ {
+ printf ("Measured time too small to obtain meaningful results\n");
+ printf ("Please increase number of runs\n");
+ printf ("\n");
+ }
+ else
+ {
+ Microseconds = User_Time * Mic_secs_Per_Second
+ / (double) Number_Of_Runs;
+ Dhrystones_Per_Second = (double) Number_Of_Runs / User_Time;
+ Vax_Mips = Dhrystones_Per_Second / 1757.0;
+
+#ifdef ROPT
+ printf ("Register option selected? YES\n");
+#else
+ printf ("Register option selected? NO\n");
+#ifndef __ECOS__
+ strcpy(Reg_Define, "Register option not selected.");
+#endif // __ECOS__
+#endif
+ printf ("Microseconds for one run through Dhrystone: ");
+#ifdef __ECOS__
+ printf ("%7.1f \n", Microseconds);
+ printf ("Dhrystones per Second: ");
+ printf ("%10.1f \n", Dhrystones_Per_Second);
+ printf ("VAX MIPS rating = %10.3f \n",Vax_Mips);
+ printf ("\n");
+#else // __ECOS__
+ printf ("%7.1lf \n", Microseconds);
+ printf ("Dhrystones per Second: ");
+ printf ("%10.1lf \n", Dhrystones_Per_Second);
+ printf ("VAX MIPS rating = %10.3lf \n",Vax_Mips);
+ printf ("\n");
+
+ fprintf(Ap,"\n");
+ fprintf(Ap,"Dhrystone Benchmark, Version 2.1 (Language: C)\n");
+ fprintf(Ap,"%s\n",Reg_Define);
+ fprintf(Ap,"Microseconds for one loop: %7.1lf\n",Microseconds);
+ fprintf(Ap,"Dhrystones per second: %10.1lf\n",Dhrystones_Per_Second);
+ fprintf(Ap,"VAX MIPS rating: %10.3lf\n",Vax_Mips);
+ fclose(Ap);
+#endif // __ECOS__
+ }
+
+#ifdef __ECOS__
+ CYG_TEST_PASS_FINISH("Dhrystone test");
+#endif // __ECOS__
+}
+
+
+#ifdef __ECOS__
+void
+#endif // __ECOS__
+Proc_1 (Ptr_Val_Par)
+/******************/
+
+REG Rec_Pointer Ptr_Val_Par;
+ /* executed once */
+{
+ REG Rec_Pointer Next_Record = Ptr_Val_Par->Ptr_Comp;
+ /* == Ptr_Glob_Next */
+ /* Local variable, initialized with Ptr_Val_Par->Ptr_Comp, */
+ /* corresponds to "rename" in Ada, "with" in Pascal */
+
+ structassign (*Ptr_Val_Par->Ptr_Comp, *Ptr_Glob);
+ Ptr_Val_Par->variant.var_1.Int_Comp = 5;
+ Next_Record->variant.var_1.Int_Comp
+ = Ptr_Val_Par->variant.var_1.Int_Comp;
+ Next_Record->Ptr_Comp = Ptr_Val_Par->Ptr_Comp;
+ Proc_3 (&Next_Record->Ptr_Comp);
+ /* Ptr_Val_Par->Ptr_Comp->Ptr_Comp
+ == Ptr_Glob->Ptr_Comp */
+ if (Next_Record->Discr == Ident_1)
+ /* then, executed */
+ {
+ Next_Record->variant.var_1.Int_Comp = 6;
+ Proc_6 (Ptr_Val_Par->variant.var_1.Enum_Comp,
+ &Next_Record->variant.var_1.Enum_Comp);
+ Next_Record->Ptr_Comp = Ptr_Glob->Ptr_Comp;
+ Proc_7 (Next_Record->variant.var_1.Int_Comp, 10,
+ &Next_Record->variant.var_1.Int_Comp);
+ }
+ else /* not executed */
+ structassign (*Ptr_Val_Par, *Ptr_Val_Par->Ptr_Comp);
+} /* Proc_1 */
+
+
+#ifdef __ECOS__
+void
+#endif // __ECOS__
+Proc_2 (Int_Par_Ref)
+/******************/
+ /* executed once */
+ /* *Int_Par_Ref == 1, becomes 4 */
+
+One_Fifty *Int_Par_Ref;
+{
+ One_Fifty Int_Loc;
+#ifdef __ECOS__
+ Enumeration Enum_Loc = Ident_1;
+#else // __ECOS__
+ Enumeration Enum_Loc;
+#endif // __ECOS__
+
+ Int_Loc = *Int_Par_Ref + 10;
+ do /* executed once */
+ if (Ch_1_Glob == 'A')
+ /* then, executed */
+ {
+ Int_Loc -= 1;
+ *Int_Par_Ref = Int_Loc - Int_Glob;
+ Enum_Loc = Ident_1;
+ } /* if */
+ while (Enum_Loc != Ident_1); /* true */
+} /* Proc_2 */
+
+
+#ifdef __ECOS__
+void
+#endif // __ECOS__
+Proc_3 (Ptr_Ref_Par)
+/******************/
+ /* executed once */
+ /* Ptr_Ref_Par becomes Ptr_Glob */
+
+Rec_Pointer *Ptr_Ref_Par;
+
+{
+ if (Ptr_Glob != Null)
+ /* then, executed */
+ *Ptr_Ref_Par = Ptr_Glob->Ptr_Comp;
+ Proc_7 (10, Int_Glob, &Ptr_Glob->variant.var_1.Int_Comp);
+} /* Proc_3 */
+
+
+#ifdef __ECOS__
+void
+#endif // __ECOS__
+Proc_4 () /* without parameters */
+/*******/
+ /* executed once */
+{
+ Boolean Bool_Loc;
+
+ Bool_Loc = Ch_1_Glob == 'A';
+ Bool_Glob = Bool_Loc | Bool_Glob;
+ Ch_2_Glob = 'B';
+} /* Proc_4 */
+
+
+#ifdef __ECOS__
+void
+#endif // __ECOS__
+Proc_5 () /* without parameters */
+/*******/
+ /* executed once */
+{
+ Ch_1_Glob = 'A';
+ Bool_Glob = false;
+} /* Proc_5 */
+
+
+ /* Procedure for the assignment of structures, */
+ /* if the C compiler doesn't support this feature */
+#ifdef NOSTRUCTASSIGN
+memcpy (d, s, l)
+register char *d;
+register char *s;
+register int l;
+{
+ while (l--) *d++ = *s++;
+}
+#endif
+
+/*
+ *************************************************************************
+ *
+ * "DHRYSTONE" Benchmark Program
+ * -----------------------------
+ *
+ * Version: C, Version 2.1
+ *
+ * File: dhry_2.c (part 3 of 3)
+ *
+ * Date: May 25, 1988
+ *
+ * Author: Reinhold P. Weicker
+ *
+ *************************************************************************
+ */
+
+#ifndef __ECOS__
+#include "dhry.h"
+
+#ifndef REG
+#define REG
+ /* REG becomes defined as empty */
+ /* i.e. no register variables */
+#else
+#define REG register
+#endif
+#endif // __ECOS__
+
+extern int Int_Glob;
+extern char Ch_1_Glob;
+
+#ifdef __ECOS__
+void
+#endif // __ECOS__
+Proc_6 (Enum_Val_Par, Enum_Ref_Par)
+/*********************************/
+ /* executed once */
+ /* Enum_Val_Par == Ident_3, Enum_Ref_Par becomes Ident_2 */
+
+Enumeration Enum_Val_Par;
+Enumeration *Enum_Ref_Par;
+{
+ *Enum_Ref_Par = Enum_Val_Par;
+ if (! Func_3 (Enum_Val_Par))
+ /* then, not executed */
+ *Enum_Ref_Par = Ident_4;
+ switch (Enum_Val_Par)
+ {
+ case Ident_1:
+ *Enum_Ref_Par = Ident_1;
+ break;
+ case Ident_2:
+ if (Int_Glob > 100)
+ /* then */
+ *Enum_Ref_Par = Ident_1;
+ else *Enum_Ref_Par = Ident_4;
+ break;
+ case Ident_3: /* executed */
+ *Enum_Ref_Par = Ident_2;
+ break;
+ case Ident_4: break;
+ case Ident_5:
+ *Enum_Ref_Par = Ident_3;
+ break;
+ } /* switch */
+} /* Proc_6 */
+
+
+#ifdef __ECOS__
+void
+#endif // __ECOS__
+Proc_7 (Int_1_Par_Val, Int_2_Par_Val, Int_Par_Ref)
+/**********************************************/
+ /* executed three times */
+ /* first call: Int_1_Par_Val == 2, Int_2_Par_Val == 3, */
+ /* Int_Par_Ref becomes 7 */
+ /* second call: Int_1_Par_Val == 10, Int_2_Par_Val == 5, */
+ /* Int_Par_Ref becomes 17 */
+ /* third call: Int_1_Par_Val == 6, Int_2_Par_Val == 10, */
+ /* Int_Par_Ref becomes 18 */
+One_Fifty Int_1_Par_Val;
+One_Fifty Int_2_Par_Val;
+One_Fifty *Int_Par_Ref;
+{
+ One_Fifty Int_Loc;
+
+ Int_Loc = Int_1_Par_Val + 2;
+ *Int_Par_Ref = Int_2_Par_Val + Int_Loc;
+} /* Proc_7 */
+
+
+#ifdef __ECOS__
+void
+#endif // __ECOS__
+Proc_8 (Arr_1_Par_Ref, Arr_2_Par_Ref, Int_1_Par_Val, Int_2_Par_Val)
+/*********************************************************************/
+ /* executed once */
+ /* Int_Par_Val_1 == 3 */
+ /* Int_Par_Val_2 == 7 */
+Arr_1_Dim Arr_1_Par_Ref;
+Arr_2_Dim Arr_2_Par_Ref;
+int Int_1_Par_Val;
+int Int_2_Par_Val;
+{
+ REG One_Fifty Int_Index;
+ REG One_Fifty Int_Loc;
+
+ Int_Loc = Int_1_Par_Val + 5;
+ Arr_1_Par_Ref [Int_Loc] = Int_2_Par_Val;
+ Arr_1_Par_Ref [Int_Loc+1] = Arr_1_Par_Ref [Int_Loc];
+ Arr_1_Par_Ref [Int_Loc+30] = Int_Loc;
+ for (Int_Index = Int_Loc; Int_Index <= Int_Loc+1; ++Int_Index)
+ Arr_2_Par_Ref [Int_Loc] [Int_Index] = Int_Loc;
+ Arr_2_Par_Ref [Int_Loc] [Int_Loc-1] += 1;
+ Arr_2_Par_Ref [Int_Loc+20] [Int_Loc] = Arr_1_Par_Ref [Int_Loc];
+ Int_Glob = 5;
+} /* Proc_8 */
+
+
+Enumeration Func_1 (Ch_1_Par_Val, Ch_2_Par_Val)
+/*************************************************/
+ /* executed three times */
+ /* first call: Ch_1_Par_Val == 'H', Ch_2_Par_Val == 'R' */
+ /* second call: Ch_1_Par_Val == 'A', Ch_2_Par_Val == 'C' */
+ /* third call: Ch_1_Par_Val == 'B', Ch_2_Par_Val == 'C' */
+
+Capital_Letter Ch_1_Par_Val;
+Capital_Letter Ch_2_Par_Val;
+{
+ Capital_Letter Ch_1_Loc;
+ Capital_Letter Ch_2_Loc;
+
+ Ch_1_Loc = Ch_1_Par_Val;
+ Ch_2_Loc = Ch_1_Loc;
+ if (Ch_2_Loc != Ch_2_Par_Val)
+ /* then, executed */
+ return (Ident_1);
+ else /* not executed */
+ {
+ Ch_1_Glob = Ch_1_Loc;
+ return (Ident_2);
+ }
+} /* Func_1 */
+
+
+Boolean Func_2 (Str_1_Par_Ref, Str_2_Par_Ref)
+/*************************************************/
+ /* executed once */
+ /* Str_1_Par_Ref == "DHRYSTONE PROGRAM, 1'ST STRING" */
+ /* Str_2_Par_Ref == "DHRYSTONE PROGRAM, 2'ND STRING" */
+
+Str_30 Str_1_Par_Ref;
+Str_30 Str_2_Par_Ref;
+{
+ REG One_Thirty Int_Loc;
+#ifdef __ECOS__
+ Capital_Letter Ch_Loc = 'A';
+#else // __ECOS__
+ Capital_Letter Ch_Loc;
+#endif // __ECOS__
+
+ Int_Loc = 2;
+ while (Int_Loc <= 2) /* loop body executed once */
+ if (Func_1 (Str_1_Par_Ref[Int_Loc],
+ Str_2_Par_Ref[Int_Loc+1]) == Ident_1)
+ /* then, executed */
+ {
+ Ch_Loc = 'A';
+ Int_Loc += 1;
+ } /* if, while */
+ if (Ch_Loc >= 'W' && Ch_Loc < 'Z')
+ /* then, not executed */
+ Int_Loc = 7;
+ if (Ch_Loc == 'R')
+ /* then, not executed */
+ return (true);
+ else /* executed */
+ {
+ if (strcmp (Str_1_Par_Ref, Str_2_Par_Ref) > 0)
+ /* then, not executed */
+ {
+ Int_Loc += 7;
+ Int_Glob = Int_Loc;
+ return (true);
+ }
+ else /* executed */
+ return (false);
+ } /* if Ch_Loc */
+} /* Func_2 */
+
+
+Boolean Func_3 (Enum_Par_Val)
+/***************************/
+ /* executed once */
+ /* Enum_Par_Val == Ident_3 */
+Enumeration Enum_Par_Val;
+{
+ Enumeration Enum_Loc;
+
+ Enum_Loc = Enum_Par_Val;
+ if (Enum_Loc == Ident_3)
+ /* then, executed */
+ return (true);
+ else /* not executed */
+ return (false);
+} /* Func_3 */
+
+#else /* ifndef NA_MSG */
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA(NA_MSG);
+}
+#endif
diff --git a/cesar/ecos/packages/kernel/current/tests/except1.cxx b/cesar/ecos/packages/kernel/current/tests/except1.cxx
new file mode 100644
index 0000000000..4736bd3286
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/except1.cxx
@@ -0,0 +1,271 @@
+//=================================================================
+//
+// except1.cxx
+//
+// Exception test 1
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm, jlarmour
+// Date: 1999-02-16
+// Description: Test basic exception functionality
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGPKG_KERNEL_EXCEPTIONS
+
+#include <cyg/kernel/sched.hxx> // Cyg_Scheduler::start()
+#include <cyg/kernel/thread.hxx> // Cyg_Thread
+#include <cyg/kernel/intr.hxx> // cyg_VSR
+
+#include <cyg/hal/hal_intr.h> // exception ranges
+
+#include <cyg/kernel/sched.inl>
+#include <cyg/kernel/thread.inl>
+
+#define NTHREADS 1
+#include "testaux.hxx"
+
+#ifndef CYGPKG_HAL_ARM_PID
+#define EXCEPTION_DATA_ACCESS
+#endif
+
+static int d0;
+#ifdef EXCEPTION_DATA_ACCESS
+static cyg_exception_handler handler0;
+
+static void handler0(CYG_ADDRWORD data, cyg_code number, CYG_ADDRWORD info)
+{
+ CYG_TEST_INFO("handler 0 called");
+
+ CYG_TEST_CHECK((CYG_ADDRWORD)123 == data, "handler given wrong data");
+
+ // ignore machine specific stuff
+ CYG_UNUSED_PARAM(cyg_code, number);
+ CYG_UNUSED_PARAM(CYG_ADDRWORD, info);
+
+ CYG_TEST_PASS_FINISH("Except 1 OK");
+}
+#endif
+
+static void handler1(CYG_ADDRWORD data, cyg_code number, CYG_ADDRWORD info)
+{
+ CYG_TEST_INFO("handler 1 called");
+
+ CYG_TEST_CHECK((CYG_ADDRWORD)&d0 == data, "handler given wrong data");
+
+#ifdef CYGSEM_KERNEL_EXCEPTIONS_DECODE
+ CYG_TEST_CHECK(number == CYGNUM_HAL_EXCEPTION_MAX, "handler given wrong number");
+#else
+ CYG_UNUSED_PARAM(cyg_code, number);
+#endif
+
+ CYG_TEST_CHECK((CYG_ADDRWORD)99 == info, "handler given wrong info");
+}
+
+#ifdef EXCEPTION_DATA_ACCESS
+// The following function attempts to cause an exception in various
+// hacky ways. It is machine dependent what exception is generated.
+// It does reads rather than writes hoping not to corrupt anything
+// important.
+static int
+cause_fpe(int num)
+{
+ double a;
+
+ a = 1.0/num; // Depending on FPU emulation and/or
+ // the FPU architecture, this may
+ // cause an exception.
+ // (float division by zero)
+
+ return ((int)a)/num; // This may cause an exception if
+ // the architecture supports it.
+ // (integer division by zero).
+} // cause_fpe()
+
+void cause_exception(void)
+{
+ int x;
+ unsigned int p=0;
+
+ // First try for an address exception (unaligned access exception
+ // or SEGV/BUS exceptions)
+ do {
+ x=*(volatile int *)(p-1);
+ p+=0x100000;
+ } while(p != 0);
+
+ // Next try an integer or floating point divide-by-zero exception.
+ cause_fpe(0);
+}
+#endif
+
+static void entry0( CYG_ADDRWORD data )
+{
+#ifdef EXCEPTION_DATA_ACCESS
+ cyg_code n;
+#endif
+ cyg_exception_handler *old_handler, *old_handler1;
+ CYG_ADDRWORD old_data, old_data1;
+ Cyg_Thread *p=Cyg_Thread::self();
+
+ CYG_UNUSED_PARAM(CYG_ADDRESS, data);
+
+ p->register_exception(
+ CYGNUM_HAL_EXCEPTION_MAX,
+ &handler1,
+ (CYG_ADDRWORD)&d0,
+ &old_handler,
+ &old_data);
+
+ p->register_exception(
+ CYGNUM_HAL_EXCEPTION_MAX,
+ &handler1,
+ (CYG_ADDRWORD)&d0,
+ &old_handler1,
+ &old_data1);
+
+ CYG_TEST_CHECK(old_handler1 == &handler1,
+ "register exception: old_handler not the one previously registered");
+ CYG_TEST_CHECK(old_data1 == (CYG_ADDRWORD)&d0,
+ "register exception: old_data not those previously registered");
+
+ p->deliver_exception(CYGNUM_HAL_EXCEPTION_MAX, (CYG_ADDRWORD)99);
+
+ CYG_TEST_INFO("handler 1 returned");
+
+ p->deregister_exception(CYGNUM_HAL_EXCEPTION_MAX);
+ p->deregister_exception(CYGNUM_HAL_EXCEPTION_MAX);
+
+#ifdef EXCEPTION_DATA_ACCESS
+
+#if 0
+#elif defined(CYGPKG_HAL_POWERPC_SIM)
+ // The exception generated by the SIM is not recognized by GDB.
+ // PR 19945 workaround.
+ CYG_TEST_NA("Not applicable to PowerPC SIM");
+#endif
+
+ for(n = CYGNUM_HAL_EXCEPTION_MIN; n <= CYGNUM_HAL_EXCEPTION_MAX; n++) {
+ p->register_exception(
+ n,
+ handler0,
+ (CYG_ADDRWORD)123,
+ &old_handler1,
+ &old_data1);
+ }
+
+ CYG_TEST_PASS("Attempting to provoke exception");
+
+ cause_exception();
+
+ CYG_TEST_FAIL_FINISH("Couldn't cause exception");
+#else // EXCEPTION_DATA_ACCESS
+ CYG_TEST_NA("Platform does not support data exceptions");
+#endif
+
+}
+
+#ifdef CYG_HAL_MIPS_TX39_JMR3904
+
+externC cyg_VSR __default_exception_vsr;
+cyg_VSR *old_vsr;
+
+#endif
+
+void except0_main( void )
+{
+ // Use CYG_TEST_GDBCMD _before_ CYG_TEST_INIT()
+ CYG_TEST_GDBCMD("handle SIGBUS nostop");
+ CYG_TEST_GDBCMD("handle SIGSEGV nostop");
+ CYG_TEST_GDBCMD("handle SIGFPE nostop");
+
+ CYG_TEST_INIT();
+
+#ifdef HAL_VSR_SET_TO_ECOS_HANDLER
+ // Reclaim the VSR off CygMon possibly
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_ACCESS
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_DATA_ACCESS, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_TLBMISS_ACCESS
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_DATA_TLBMISS_ACCESS, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DIV_BY_ZERO
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_DIV_BY_ZERO, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_FPU, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU_DIV_BY_ZERO
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_FPU_DIV_BY_ZERO, NULL );
+#endif
+#endif
+
+ new_thread(entry0, 0);
+
+ Cyg_Scheduler::start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ except0_main();
+}
+#else // def CYGPKG_KERNEL_EXCEPTIONS
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Exceptions disabled");
+}
+#endif // def CYGPKG_KERNEL_EXCEPTIONS
+
+// EOF except1.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/flag0.cxx b/cesar/ecos/packages/kernel/current/tests/flag0.cxx
new file mode 100644
index 0000000000..aeb4b3c3cc
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/flag0.cxx
@@ -0,0 +1,88 @@
+//==========================================================================
+//
+// flag0.cxx
+//
+// Flag test 0
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-05-11
+// Description: Limited to checking constructors/destructors
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/flag.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include "testaux.hxx"
+
+static Cyg_Flag f0, f1;
+
+
+static bool flash( void )
+{
+ Cyg_Flag f0;
+
+ Cyg_Flag f1;
+
+ return true;
+}
+
+void flag0_main( void )
+{
+ CYG_TEST_INIT();
+
+ CHECK(flash());
+ CHECK(flash());
+
+ CYG_TEST_PASS_FINISH("Flag 0 OK");
+
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ flag0_main();
+}
+// EOF flag0.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/flag1.cxx b/cesar/ecos/packages/kernel/current/tests/flag1.cxx
new file mode 100644
index 0000000000..17274a197c
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/flag1.cxx
@@ -0,0 +1,219 @@
+//==========================================================================
+//
+// flag1.cxx
+//
+// Flag test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author: dsm
+// Contributors: dsm
+// Date: 1998-05-11
+// Description: Tests basic flag functionality.
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/thread.hxx> // Cyg_Thread
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/sched.hxx> // Cyg_Scheduler::start()
+
+#include <cyg/kernel/flag.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/sched.inl>
+
+
+#define NTHREADS 3
+#include "testaux.hxx"
+
+static Cyg_Flag f0, f1;
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+static Cyg_Flag f2;
+#endif
+
+static volatile cyg_atomic q = 0;
+#define FIRST_THREAD_WAIT_TIME 5
+#define SECOND_THREAD_WAIT_TIME 10
+#define THIRD_THREAD_WAIT_TIME 20
+
+static void entry0( CYG_ADDRWORD data )
+{
+ CYG_TEST_INFO("Testing setbits() and maskbits()");
+ CYG_TEST_CHECK(0==f0.peek(), "flag not initialized properly");
+ f0.setbits(0x1);
+ CYG_TEST_CHECK(1==f0.peek(), "setbits");
+ f0.setbits(0x3);
+ CYG_TEST_CHECK(3==f0.peek(), "setbits");
+ f0.maskbits(~0x5);
+ CYG_TEST_CHECK(2==f0.peek(), "maskbits");
+ f0.setbits();
+ CYG_TEST_CHECK(~0u==f0.peek(), "setbits no arg");
+ f0.maskbits();
+ CYG_TEST_CHECK(0==f0.peek(), "maskbits no arg");
+ CYG_TEST_CHECK(0==q++, "bad synchronization");
+
+ CYG_TEST_INFO("Testing wait()");
+ f1.setbits(0x4);
+ CYG_TEST_CHECK(0x4==f1.peek(), "maskbits no arg");
+ CYG_TEST_CHECK(1==q++, "bad synchronization");
+ f1.setbits(0x18); // wake t1
+ f1.wait(0x11, Cyg_Flag::AND | Cyg_Flag::CLR);
+ CYG_TEST_CHECK(0==f1.peek(), "flag value wrong");
+ CYG_TEST_CHECK(3==q++, "bad synchronization");
+ f0.setbits(0x2); // wake t1
+ f1.wait(0x10, Cyg_Flag::AND );
+ f0.setbits(0x1); // wake t1
+
+ f1.wait(0x11, Cyg_Flag::AND | Cyg_Flag::CLR);
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ f2.wait(0x2, Cyg_Flag::OR);
+ CYG_TEST_CHECK(20==q,"bad synchronization");
+ f2.wait(0x10, Cyg_Flag::AND,
+ Cyg_Clock::real_time_clock->current_value()+THIRD_THREAD_WAIT_TIME);
+ CYG_TEST_CHECK(21==q++,"bad synchronization");
+#endif
+ f0.wait(1, Cyg_Flag::OR);
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+static void entry1( CYG_ADDRWORD data )
+{
+ f1.wait(0xc, Cyg_Flag::AND);
+ CYG_TEST_CHECK(2==q++, "bad synchronization");
+ CYG_TEST_CHECK(0x1c==f1.peek(), "flag value wrong");
+ f1.setbits(0x1); // wake t0
+ f0.wait(0x3, Cyg_Flag::OR);
+ CYG_TEST_CHECK(4==q++, "bad synchronization");
+ CYG_TEST_CHECK(2==f0.peek(), "flag value wrong");
+
+ f1.setbits(0xf0); // wake t0,t2
+ f0.wait(0x5, Cyg_Flag::AND | Cyg_Flag::CLR); // wait for t0 & t2
+ CYG_TEST_CHECK(0==f0.peek(), "flag value wrong");
+ CYG_TEST_CHECK(0xf0==f1.peek(), "flag value wrong");
+ CYG_TEST_CHECK(5==q++, "bad synchronization");
+ f1.maskbits();
+ CYG_TEST_CHECK(0==f1.peek(), "flag value wrong");
+
+ CYG_TEST_INFO("Testing poll()");
+ f0.setbits(0x55);
+ CYG_TEST_CHECK(0x55==f0.peek(), "flag value wrong");
+ CYG_TEST_CHECK(0x55==f0.poll(0x3, Cyg_Flag::OR),"bad poll() return");
+ CYG_TEST_CHECK(0==f0.poll(0xf, Cyg_Flag::AND),"poll()");
+ CYG_TEST_CHECK(0==f0.poll(0xa, Cyg_Flag::OR),"poll()");
+ CYG_TEST_CHECK(0x55==f0.peek(), "flag value wrong");
+ CYG_TEST_CHECK(0x55==f0.poll(0xf, Cyg_Flag::OR | Cyg_Flag::CLR),"poll");
+ CYG_TEST_CHECK(0x0==f0.peek(), "flag value wrong");
+ f0.setbits(0x50);
+ CYG_TEST_CHECK(0x50==f0.poll(0x10, Cyg_Flag::AND | Cyg_Flag::CLR),"poll");
+ CYG_TEST_CHECK(0x0==f0.peek(), "flag value wrong");
+
+ CYG_TEST_INFO("Testing waiting()");
+ f0.maskbits();
+ CYG_TEST_CHECK(!f0.waiting(), "waiting()");
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ thread[1]->delay( 10 ); // allow other threads to reach wait on f1
+ CYG_TEST_CHECK(f1.waiting(), "waiting() not true");
+ f1.setbits(); // wake one of t0,t2
+ CYG_TEST_CHECK(f1.waiting(), "waiting() not true");
+#else
+ f1.setbits(0x11); // wake one of t0,t2
+#endif
+ f1.setbits(0x11); // wake other of t0,t2
+ CYG_TEST_CHECK(!f1.waiting(), "waiting not false");
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ CYG_TEST_INFO("Testing wait() with timeout");
+ q=20;
+ f2.setbits(0x2); // synchronize with t0,t2
+ CYG_TEST_CHECK(20==q,"bad synchronization");
+ f2.wait(0x20, Cyg_Flag::AND,
+ Cyg_Clock::real_time_clock->current_value()+SECOND_THREAD_WAIT_TIME);
+ CYG_TEST_CHECK(22==q++,"bad synchronization");
+#endif
+
+ CYG_TEST_PASS_FINISH("Flag 1 OK");
+}
+
+static void entry2( CYG_ADDRWORD data )
+{
+ f1.wait(0x60, Cyg_Flag::OR);
+ f0.setbits(0x4);
+
+ f1.wait(0x11, Cyg_Flag::AND | Cyg_Flag::CLR);
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ f2.wait(0x2, Cyg_Flag::OR);
+ CYG_TEST_CHECK(20==q,"bad synchronization");
+ CYG_TEST_CHECK(0==f2.wait(0x40, Cyg_Flag::AND,
+ Cyg_Clock::real_time_clock->current_value()+FIRST_THREAD_WAIT_TIME),
+ "timed wait() wrong");
+ CYG_TEST_CHECK(20==q++,"bad synchronization");
+ // Now wake t0 before it times out
+ f2.setbits(0x10);
+#endif
+ f0.wait(1, Cyg_Flag::OR);
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+void flag1_main( void )
+{
+ CYG_TEST_INIT();
+
+ new_thread(entry0, 0);
+ new_thread(entry1, 1);
+ new_thread(entry2, 2);
+
+ Cyg_Scheduler::start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ flag1_main();
+}
+
+// EOF flag1.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/fptest.c b/cesar/ecos/packages/kernel/current/tests/fptest.c
new file mode 100644
index 0000000000..f455c8b3b3
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/fptest.c
@@ -0,0 +1,364 @@
+//==========================================================================
+//
+// fptest.cxx
+//
+// Basic FPU test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003 Nick Garnett
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg@calivar.com
+// Contributors: nickg@calivar.com
+// Date: 2003-01-27
+// Description: Simple FPU test. This is not very sophisticated as far
+// as checking FPU performance or accuracy. It is more
+// concerned with checking that several threads doing FP
+// operations do not interfere with eachother's use of the
+// FPU.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+#include <pkgconf/hal.h>
+
+#include <cyg/hal/hal_arch.h>
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h>
+
+//#include <cyg/kernel/test/stackmon.h>
+//#include CYGHWR_MEMORY_LAYOUT_H
+
+//==========================================================================
+
+#if defined(CYGFUN_KERNEL_API_C) && \
+ defined(CYGSEM_KERNEL_SCHED_MLQUEUE) && \
+ (CYGNUM_KERNEL_SCHED_PRIORITIES > 12)
+
+//==========================================================================
+// Base priority for all threads.
+
+#define BASE_PRI 5
+
+//==========================================================================
+// Runtime
+//
+// This is the number of ticks that the program will run for. 3000
+// ticks is equal to 30 seconds in the default configuration. For
+// simulators we reduce the run time to 3 simulated seconds.
+
+#define RUN_TICKS 3000
+#define RUN_TICKS_SIM 300
+
+//==========================================================================
+// Thread parameters
+
+#define STACK_SIZE (CYGNUM_HAL_STACK_SIZE_MINIMUM)
+
+static cyg_uint8 stacks[3][STACK_SIZE];
+static cyg_handle_t thread[3];
+static cyg_thread thread_struct[3];
+
+//==========================================================================
+// Alarm parameters.
+
+static cyg_alarm alarm_struct;
+static cyg_handle_t alarm;
+
+static cyg_count8 cur_thread = 0;
+static cyg_count32 alarm_ticks = 0;
+static cyg_count32 run_ticks = RUN_TICKS;
+
+//==========================================================================
+
+static int errors = 0;
+
+//==========================================================================
+// Random number generator. Ripped out of the C library.
+
+static int rand( unsigned int *seed )
+{
+// This is the code supplied in Knuth Vol 2 section 3.6 p.185 bottom
+
+#define RAND_MAX 0x7fffffff
+#define MM 2147483647 // a Mersenne prime
+#define AA 48271 // this does well in the spectral test
+#define QQ 44488 // (long)(MM/AA)
+#define RR 3399 // MM % AA; it is important that RR<QQ
+
+ *seed = AA*(*seed % QQ) - RR*(unsigned int)(*seed/QQ);
+ if (*seed < 0)
+ *seed += MM;
+
+ return (int)( *seed & RAND_MAX );
+}
+
+//==========================================================================
+// Test calculation.
+//
+// Generates an array of random FP values and then repeatedly applies
+// a calculation to them and checks that the same result is reached
+// each time. The calculation, in the macro CALC, is intended to make
+// maximum use of the FPU registers. However, the i386 compiler
+// doesn't let this expression get very complex before it starts
+// spilling values out to memory.
+
+static void do_test( double *values,
+ int count,
+ int loops,
+ int test,
+ const char *name)
+{
+ unsigned int i, j;
+ // volatiles necessary to force
+ // values to 64 bits for comparison
+ volatile double sum = 1.0;
+ volatile double last_sum;
+ unsigned int seed;
+
+#define V(__i) (values[(__i)%count])
+#define CALC ((V(i-1)*V(i+1))*(V(i-2)*V(i+2))*(V(i-3)*sum))
+
+ seed = ((unsigned int)&i)*count;
+
+ // Set up an array of values...
+ for( i = 0; i < count; i++ )
+ values[i] = (double)rand( &seed )/(double)0x7fffffff;
+
+ // Now calculate something from them...
+ for( i = 0; i < count; i++ )
+ sum += CALC;
+ last_sum = sum;
+
+ // Now recalculate the sum in a loop and look for errors
+ for( j = 0; j < loops ; j++ )
+ {
+ sum = 1.0;
+ for( i = 0; i < count; i++ )
+ sum += CALC;
+
+ if( sum != last_sum )
+ {
+ union double_int_union {
+ double d;
+ cyg_uint32 i[2];
+ } diu_sum, diu_lastsum;
+
+ diu_sum.d = sum;
+ diu_lastsum.d = last_sum;
+
+ errors++;
+ if (sizeof(double) != 2*sizeof(cyg_uint32)) {
+ diag_printf("Warning: sizeof(double) != 2*sizeof(cyg_uint32), therefore next line may\n"
+ "have invalid sum/last_sum values\n");
+ }
+ diag_printf("%s: Sum mismatch! %d sum=[%08x:%08x] last_sum=[%08x:%08x]\n",
+ name,j, diu_sum.i[0], diu_sum.i[1], diu_lastsum.i[0], diu_lastsum.i[1] );
+ }
+
+#if 0
+ if( ((j*count)%1000000) == 0 )
+ diag_printf("INFO:<%s: %2d calculations done>\n",name,j*count);
+#endif
+ }
+
+}
+
+//==========================================================================
+// Alarm handler
+//
+// This is called every tick. It lowers the priority of the currently
+// running thread and raises the priority of the next. Thus we
+// implement a form of timelslicing between the threads at one tick
+// granularity.
+
+static void alarm_fn(cyg_handle_t alarm, cyg_addrword_t data)
+{
+ alarm_ticks++;
+
+ if( alarm_ticks >= run_ticks )
+ {
+ if( errors )
+ CYG_TEST_FAIL("Errors detected");
+ else
+ CYG_TEST_PASS("OK");
+
+ CYG_TEST_FINISH("FP Test done");
+ }
+ else
+ {
+ cyg_thread_set_priority( thread[cur_thread], BASE_PRI );
+
+ cur_thread = (cur_thread+1)%3;
+
+ cyg_thread_set_priority( thread[cur_thread], BASE_PRI-1 );
+ }
+}
+
+
+//==========================================================================
+
+#define FP1_COUNT 1000
+
+static double fpt1_values[FP1_COUNT];
+
+void fptest1( CYG_ADDRWORD id )
+{
+ while(1)
+ do_test( fpt1_values, FP1_COUNT, 2000000000, id, "fptest1" );
+}
+
+//==========================================================================
+
+#define FP2_COUNT 10000
+
+static double fpt2_values[FP2_COUNT];
+
+void fptest2( CYG_ADDRWORD id )
+{
+ while(1)
+ do_test( fpt2_values, FP2_COUNT, 2000000000, id, "fptest2" );
+}
+
+//==========================================================================
+
+#define FP3_COUNT 100
+
+static double fpt3_values[FP3_COUNT];
+
+void fptest3( CYG_ADDRWORD id )
+{
+ while(1)
+ do_test( fpt3_values, FP3_COUNT, 2000000000, id, "fptest3" );
+}
+
+//==========================================================================
+
+void fptest_main( void )
+{
+
+ CYG_TEST_INIT();
+
+ if( cyg_test_is_simulator )
+ {
+ run_ticks = RUN_TICKS_SIM;
+ }
+
+ CYG_TEST_INFO("Run fptest in cyg_start");
+ do_test( fpt3_values, FP3_COUNT, 1000, 0, "start" );
+ CYG_TEST_INFO( "cyg_start run done");
+
+ cyg_thread_create( BASE_PRI-1,
+ fptest1,
+ 0,
+ "fptest1",
+ &stacks[0][0],
+ STACK_SIZE,
+ &thread[0],
+ &thread_struct[0]);
+
+ cyg_thread_resume( thread[0] );
+
+ cyg_thread_create( BASE_PRI,
+ fptest2,
+ 1,
+ "fptest2",
+ &stacks[1][0],
+ STACK_SIZE,
+ &thread[1],
+ &thread_struct[1]);
+
+ cyg_thread_resume( thread[1] );
+
+ cyg_thread_create( BASE_PRI,
+ fptest3,
+ 2,
+ "fptest3",
+ &stacks[2][0],
+ STACK_SIZE,
+ &thread[2],
+ &thread_struct[2]);
+
+ cyg_thread_resume( thread[2] );
+
+ cyg_alarm_create( cyg_real_time_clock(),
+ alarm_fn,
+ 0,
+ &alarm,
+ &alarm_struct );
+
+ cyg_alarm_initialize( alarm, cyg_current_time()+1, 1 );
+
+ cyg_scheduler_start();
+
+}
+
+//==========================================================================
+
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+externC void
+cyg_hal_invoke_constructors();
+#endif
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ fptest_main();
+}
+
+//==========================================================================
+
+#else // CYGFUN_KERNEL_API_C...
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_INFO("FP test requires:\n"
+ "CYGFUN_KERNEL_API_C && \n"
+ "CYGSEM_KERNEL_SCHED_MLQUEUE && \n"
+ "(CYGNUM_KERNEL_SCHED_PRIORITIES > 12)\n");
+ CYG_TEST_NA("FP test requirements");
+}
+
+#endif // CYGFUN_KERNEL_API_C, etc.
+
+//==========================================================================
+// EOF fptest.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/intr0.cxx b/cesar/ecos/packages/kernel/current/tests/intr0.cxx
new file mode 100644
index 0000000000..f2be469e3b
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/intr0.cxx
@@ -0,0 +1,209 @@
+//=================================================================
+//
+// intr0.cxx
+//
+// Interrupt test 0
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm, jlarmour
+// Date: 1999-02-16
+// Description: Very basic test of interrupt objects
+// Options:
+// CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE
+// CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE_SIZE
+// CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/intr.hxx>
+#include <cyg/hal/hal_intr.h>
+
+#include <cyg/infra/testcase.h>
+
+#include "testaux.hxx"
+
+static cyg_ISR isr0, isr1;
+static cyg_DSR dsr0, dsr1;
+
+static char intr0_obj[sizeof(Cyg_Interrupt)];
+static char intr1_obj[sizeof(Cyg_Interrupt)];
+
+static cyg_uint32 isr0(cyg_vector vector, CYG_ADDRWORD data)
+{
+ CYG_UNUSED_PARAM(CYG_ADDRWORD, data);
+
+ Cyg_Interrupt::acknowledge_interrupt(vector);
+ return 0;
+}
+
+static void dsr0(cyg_vector vector, cyg_ucount32 count, CYG_ADDRWORD data)
+{
+ CYG_UNUSED_PARAM(cyg_vector, vector);
+ CYG_UNUSED_PARAM(cyg_ucount32, count);
+ CYG_UNUSED_PARAM(CYG_ADDRWORD, data);
+}
+
+static cyg_uint32 isr1(cyg_vector vector, CYG_ADDRWORD data)
+{
+ CYG_UNUSED_PARAM(cyg_vector, vector);
+ CYG_UNUSED_PARAM(CYG_ADDRWORD, data);
+ return 0;
+}
+
+static void dsr1(cyg_vector vector, cyg_ucount32 count, CYG_ADDRWORD data)
+{
+ CYG_UNUSED_PARAM(cyg_vector, vector);
+ CYG_UNUSED_PARAM(cyg_ucount32, count);
+ CYG_UNUSED_PARAM(CYG_ADDRWORD, data);
+}
+
+static bool flash( void )
+{
+ Cyg_Interrupt intr0 = Cyg_Interrupt(CYGNUM_HAL_ISR_MIN, 0, (CYG_ADDRWORD)333, isr0, dsr0 );
+
+ return true;
+}
+
+/* IMPORTANT: The calling convention for VSRs is target dependent. It is
+ * unlikely that a plain C or C++ routine would function correctly on any
+ * particular platform, even if it could correctly access the system
+ * resources necessary to handle the event that caused it to be called.
+ * VSRs usually must be written in assembly language.
+ *
+ * This is just a test program. The routine vsr0() below is defined simply
+ * to define an address that will be in executable memory. If an event
+ * causes this VSR to be called, all bets are off. If it is accidentally
+ * installed in the vector for the realtime clock, the system will likely
+ * freeze.
+ */
+
+static cyg_VSR vsr0;
+
+static void vsr0()
+{
+}
+
+void intr0_main( void )
+{
+ CYG_TEST_INIT();
+
+ CHECK(flash());
+ CHECK(flash());
+
+ // Make sure the chosen levels are not already in use.
+ int in_use;
+ cyg_vector lvl1 = CYGNUM_HAL_ISR_MIN + (1 % CYGNUM_HAL_ISR_COUNT);
+ HAL_INTERRUPT_IN_USE( lvl1, in_use );
+ Cyg_Interrupt* intr0 = NULL;
+ if (!in_use)
+ intr0 = new((void *)&intr0_obj[0]) Cyg_Interrupt( lvl1, 1, (CYG_ADDRWORD)777, isr0, dsr0 );
+
+ cyg_vector lvl2 = CYGNUM_HAL_ISR_MIN + ( 15 % CYGNUM_HAL_ISR_COUNT);
+ HAL_INTERRUPT_IN_USE( lvl2, in_use );
+ Cyg_Interrupt* intr1 = NULL;
+ if (!in_use && lvl1 != lvl2)
+ intr1 = new((void *)&intr1_obj[0]) Cyg_Interrupt( lvl2, 1, 888, isr1, dsr1 );
+
+ // Check these functions at least exist
+ Cyg_Interrupt::disable_interrupts();
+ Cyg_Interrupt::enable_interrupts();
+
+ if (intr0)
+ intr0->attach();
+ if (intr1)
+ intr1->attach();
+ if (intr0)
+ intr0->detach();
+ if (intr1)
+ intr1->detach();
+
+ // If this attaching interrupt replaces the previous interrupt
+ // instead of adding to it we could be in a big mess if the
+ // vector is being used by something important.
+
+ cyg_vector v = (CYGNUM_HAL_VSR_MIN + 11) % CYGNUM_HAL_VSR_COUNT;
+ cyg_VSR *old_vsr, *new_vsr;
+ Cyg_Interrupt::set_vsr( v, vsr0, &old_vsr );
+ Cyg_Interrupt::get_vsr( v, &new_vsr );
+ CHECK( vsr0 == new_vsr );
+
+ new_vsr = NULL;
+ Cyg_Interrupt::set_vsr( v, old_vsr, &new_vsr );
+ CHECK( new_vsr == vsr0 );
+
+ Cyg_Interrupt::set_vsr( v, new_vsr );
+ new_vsr = NULL;
+ Cyg_Interrupt::get_vsr( v, &new_vsr );
+ CHECK( vsr0 == new_vsr );
+
+ Cyg_Interrupt::set_vsr( v, old_vsr );
+ CHECK( vsr0 == new_vsr );
+ new_vsr = NULL;
+ Cyg_Interrupt::get_vsr( v, &new_vsr );
+ CHECK( old_vsr == new_vsr );
+
+ CHECK( NULL != vsr0 );
+
+ cyg_vector v1;
+#ifdef CYGPKG_HAL_MIPS_TX39
+ // This can be removed when PR 17831 is fixed
+ if ( cyg_test_is_simulator )
+ v1 = 12 % CYGNUM_HAL_ISR_COUNT;
+ else /* NOTE TRAILING ELSE... */
+#endif
+ v1 = CYGNUM_HAL_ISR_MIN + (6 % CYGNUM_HAL_ISR_COUNT);
+
+ Cyg_Interrupt::mask_interrupt(v1);
+ Cyg_Interrupt::unmask_interrupt(v1);
+
+ Cyg_Interrupt::configure_interrupt(v1, true, true);
+
+ CYG_TEST_PASS_FINISH("Intr 0 OK");
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ intr0_main();
+}
+// EOF intr0.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/kalarm0.c b/cesar/ecos/packages/kernel/current/tests/kalarm0.c
new file mode 100644
index 0000000000..d3d27e3097
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kalarm0.c
@@ -0,0 +1,191 @@
+//==========================================================================
+//
+// kalarm0
+//
+// Alarm functionality test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003 Nick Garnett <nickg@calivar.com>
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting the
+// copyright holders.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2003-06-25
+// Description: Tests the ability of alarms to be added and removed by the
+// alarm functions of other alarms.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+//==========================================================================
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK) && \
+ defined(CYGFUN_KERNEL_API_C)
+
+#include "testaux.h"
+
+//==========================================================================
+
+//#define db_printf diag_printf
+#define db_printf( fmt, ... )
+
+//==========================================================================
+
+static cyg_counter counter_obj;
+static cyg_handle_t counter;
+static cyg_alarm alarm_obj[3];
+static cyg_handle_t alarm[3];
+
+static cyg_uint32 alarmfn_called[3];
+
+//==========================================================================
+
+void alarmfn0(cyg_handle_t alarmh, cyg_addrword_t data)
+{
+ db_printf("%s: %d\n",__PRETTY_FUNCTION__,cyg_counter_current_value( counter ));
+
+ // alarmfn0 just counts how many times it has been called
+
+ alarmfn_called[0]++;
+}
+
+//==========================================================================
+
+void alarmfn1(cyg_handle_t alarmh, cyg_addrword_t data)
+{
+ db_printf("%s: %d\n",__PRETTY_FUNCTION__,cyg_counter_current_value( counter ));
+
+ alarmfn_called[1]++;
+
+ // Reschedule alarm[0] to run every tick until alarm[2] next runs.
+
+ cyg_alarm_initialize( alarm[0], cyg_counter_current_value( counter )+1, 1 );
+
+}
+
+//==========================================================================
+
+void alarmfn2(cyg_handle_t alarmh, cyg_addrword_t data)
+{
+ db_printf("%s: %d\n",__PRETTY_FUNCTION__,cyg_counter_current_value( counter ));
+
+ alarmfn_called[2]++;
+
+ // Reschedule alarm[0] to run every 2 ticks until alarm[1] next runs.
+
+ cyg_alarm_initialize( alarm[0], cyg_counter_current_value( counter )+1, 2 );
+
+ // Reschedule alarm[1] to run every 3 ticks starting in 6 ticks time.
+
+ cyg_alarm_initialize( alarm[1], cyg_counter_current_value( counter )+6, 3 );
+}
+
+//==========================================================================
+
+void alarm0_main(void)
+{
+ int i;
+
+ CYG_TEST_INIT();
+
+ // Create the counter
+ cyg_counter_create( &counter, &counter_obj );
+
+ // Create the alarms
+ cyg_alarm_create( counter,
+ alarmfn0,
+ 0,
+ &alarm[0],
+ &alarm_obj[0]);
+
+
+ cyg_alarm_create( counter,
+ alarmfn1,
+ 1,
+ &alarm[1],
+ &alarm_obj[1]);
+
+ cyg_alarm_create( counter,
+ alarmfn2,
+ 2,
+ &alarm[2],
+ &alarm_obj[2]);
+
+
+ // Kick it all off by starting alarm[2]
+ cyg_alarm_initialize( alarm[2], 0, 10 );
+
+ // Run the whole thing for 10000 ticks
+ for( i = 0; i < 10000; i++ )
+ cyg_counter_tick( counter );
+
+ db_printf("alarmfn_called: %d %d %d\n",
+ alarmfn_called[0],alarmfn_called[1],alarmfn_called[2]);
+
+ CYG_TEST_CHECK( alarmfn_called[0]==5000, "alarmfn0 not called 5000 times\n");
+ CYG_TEST_CHECK( alarmfn_called[1]==2000, "alarmfn1 not called 2000 times\n");
+ CYG_TEST_CHECK( alarmfn_called[2]==1001, "alarmfn2 not called 1001 times\n");
+
+ CYG_TEST_PASS_FINISH("KAlarm0");
+}
+
+//==========================================================================
+
+externC void
+cyg_start( void )
+{
+ alarm0_main();
+}
+
+//==========================================================================
+
+#else
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( "This test needs CYGVAR_KERNEL_COUNTERS_CLOCK "
+ "and CYGFUN_KERNEL_API_C" );
+}
+
+#endif
+
+//==========================================================================
+// End of kalarm0.c
diff --git a/cesar/ecos/packages/kernel/current/tests/kcache1.c b/cesar/ecos/packages/kernel/current/tests/kcache1.c
new file mode 100644
index 0000000000..dbb82a0c76
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kcache1.c
@@ -0,0 +1,422 @@
+/*=================================================================
+//
+// kcache1.c
+//
+// Cache timing test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm, nickg
+// Date: 1998-06-18
+//####DESCRIPTIONEND####
+*/
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/hal/hal_cache.h>
+
+#if defined(HAL_DCACHE_SIZE) || defined(HAL_UCACHE_SIZE)
+#ifdef CYGVAR_KERNEL_COUNTERS_CLOCK
+#ifdef CYGFUN_KERNEL_API_C
+
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_intr.h>
+
+// -------------------------------------------------------------------------
+// If the HAL does not supply this, we supply our own version
+
+#ifndef HAL_DCACHE_PURGE_ALL
+# ifdef HAL_DCACHE_SYNC
+
+#define HAL_DCACHE_PURGE_ALL() HAL_DCACHE_SYNC()
+
+# else
+
+static cyg_uint8 dca[HAL_DCACHE_SIZE + HAL_DCACHE_LINE_SIZE*2];
+
+#define HAL_DCACHE_PURGE_ALL() \
+CYG_MACRO_START \
+ volatile cyg_uint8 *addr = &dca[HAL_DCACHE_LINE_SIZE]; \
+ volatile cyg_uint8 tmp = 0; \
+ int i; \
+ for( i = 0; i < HAL_DCACHE_SIZE; i += HAL_DCACHE_LINE_SIZE ) \
+ { \
+ tmp = addr[i]; \
+ } \
+CYG_MACRO_END
+
+# endif
+#endif
+
+// -------------------------------------------------------------------------
+
+#define NTHREADS 1
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+static cyg_handle_t thread[NTHREADS];
+
+static cyg_thread thread_obj[NTHREADS];
+static char stack[NTHREADS][STACKSIZE];
+
+#ifndef MAX_STRIDE
+#define MAX_STRIDE 64
+#endif
+
+volatile char m[(HAL_DCACHE_SIZE/HAL_DCACHE_LINE_SIZE)*MAX_STRIDE];
+
+// -------------------------------------------------------------------------
+
+static void time0(register cyg_uint32 stride)
+{
+ register cyg_uint32 j,k;
+ cyg_tick_count_t count0, count1;
+ cyg_ucount32 t;
+ register char c;
+
+ count0 = cyg_current_time();
+
+ k = 0;
+ if ( cyg_test_is_simulator )
+ k = 3960;
+
+ for(; k<4000;k++) {
+ for(j=0; j<(HAL_DCACHE_SIZE/HAL_DCACHE_LINE_SIZE); j++) {
+ c=m[stride*j];
+ }
+ }
+
+ count1 = cyg_current_time();
+ t = count1 - count0;
+ diag_printf("stride=%d, time=%d\n", stride, t);
+}
+
+// -------------------------------------------------------------------------
+
+void time1(void)
+{
+ cyg_uint32 i;
+
+ for(i=1; i<=MAX_STRIDE; i+=i) {
+ time0(i);
+ }
+}
+
+// -------------------------------------------------------------------------
+// With an ICache invalidate in the middle:
+#ifdef HAL_ICACHE_INVALIDATE_ALL
+static void time0II(register cyg_uint32 stride)
+{
+ register cyg_uint32 j,k;
+ cyg_tick_count_t count0, count1;
+ cyg_ucount32 t;
+ register char c;
+
+ count0 = cyg_current_time();
+
+ k = 0;
+ if ( cyg_test_is_simulator )
+ k = 3960;
+
+ for(; k<4000;k++) {
+ for(j=0; j<(HAL_DCACHE_SIZE/HAL_DCACHE_LINE_SIZE); j++) {
+ HAL_ICACHE_INVALIDATE_ALL();
+ c=m[stride*j];
+ }
+ }
+
+ count1 = cyg_current_time();
+ t = count1 - count0;
+ diag_printf("stride=%d, time=%d\n", stride, t);
+}
+
+// -------------------------------------------------------------------------
+
+void time1II(void)
+{
+ cyg_uint32 i;
+
+ for(i=1; i<=MAX_STRIDE; i+=i) {
+ time0II(i);
+ }
+}
+#endif
+// -------------------------------------------------------------------------
+// With a DCache invalidate in the middle:
+// This is guaranteed to produce bogus timing results since interrupts
+// have to be disabled to prevent accidental loss of state.
+#ifdef HAL_DCACHE_INVALIDATE_ALL
+static void time0DI(register cyg_uint32 stride)
+{
+ register cyg_uint32 j,k;
+ volatile cyg_tick_count_t count0;
+ cyg_tick_count_t count1;
+ cyg_ucount32 t;
+ register char c;
+ register CYG_INTERRUPT_STATE oldints;
+
+ count0 = cyg_current_time();
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+
+ k = 0;
+ if ( cyg_test_is_simulator )
+ k = 3960;
+
+ for(; k<4000;k++) {
+ for(j=0; j<(HAL_DCACHE_SIZE/HAL_DCACHE_LINE_SIZE); j++) {
+ HAL_DCACHE_INVALIDATE_ALL();
+ c=m[stride*j];
+ }
+ }
+ HAL_RESTORE_INTERRUPTS(oldints);
+
+ count1 = cyg_current_time();
+ t = count1 - count0;
+ diag_printf("stride=%d, time=%d\n", stride, t);
+}
+
+// -------------------------------------------------------------------------
+
+void time1DI(void)
+{
+ cyg_uint32 i;
+
+ for(i=1; i<=MAX_STRIDE; i+=i) {
+ time0DI(i);
+ }
+}
+#endif
+// -------------------------------------------------------------------------
+// This test could be improved by counting number of passes possible
+// in a given number of ticks.
+
+static void entry0( cyg_addrword_t data )
+{
+ register CYG_INTERRUPT_STATE oldints;
+
+#ifdef HAL_CACHE_UNIFIED
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL(); // rely on above definition
+ HAL_UCACHE_INVALIDATE_ALL();
+ HAL_UCACHE_DISABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Cache off");
+ time1();
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL(); // rely on above definition
+ HAL_UCACHE_INVALIDATE_ALL();
+ HAL_UCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Cache on");
+ time1();
+
+#ifdef HAL_DCACHE_INVALIDATE_ALL
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL();
+ HAL_UCACHE_INVALIDATE_ALL();
+ HAL_UCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Cache on: invalidate Cache (expect bogus timing)");
+ time1DI();
+#endif
+
+#else // HAL_CACHE_UNIFIED
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL();
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_ICACHE_DISABLE();
+ HAL_DCACHE_DISABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Dcache off Icache off");
+ time1();
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL();
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_ICACHE_DISABLE();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Dcache on Icache off");
+ time1();
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL();
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_ICACHE_ENABLE();
+ HAL_DCACHE_DISABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Dcache off Icache on");
+ time1();
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL();
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_ICACHE_ENABLE();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Dcache on Icache on");
+ time1();
+
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL();
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_ICACHE_DISABLE();
+ HAL_DCACHE_DISABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Dcache off Icache off (again)");
+ time1();
+
+#if defined(HAL_DCACHE_INVALIDATE_ALL) || defined(HAL_ICACHE_INVALIDATE_ALL)
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL();
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_ICACHE_ENABLE();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Dcache on Icache on (again)");
+ time1();
+
+#if defined(CYGPKG_HAL_MIPS)
+ // In some architectures, the time taken for the next two tests is
+ // very long, partly because HAL_XCACHE_INVALIDATE_ALL() is implemented
+ // with a loop over the cache. Hence these tests take longer than the
+ // testing infrastructure is prepared to wait. The simplest way to get
+ // these tests to run quickly is to make them think they are running
+ // under a simulator.
+ // If the target actually is a simulator, skip the below - it's very
+ // slow on the simulator, even with reduced loop counts.
+ if (cyg_test_is_simulator)
+ CYG_TEST_PASS_FINISH("End of test");
+
+#if defined(CYGPKG_HAL_MIPS_TX49)
+ // The TX49 has a large cache, and even with reduced loop count,
+ // 90+ seconds elapses between each INFO output.
+ CYG_TEST_PASS_FINISH("End of test");
+#endif
+
+ cyg_test_is_simulator = 1;
+#endif
+
+#ifdef HAL_ICACHE_INVALIDATE_ALL
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL();
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_ICACHE_ENABLE();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Dcache on Icache on: invalidate ICache each time");
+ time1II();
+#endif
+#ifdef HAL_DCACHE_INVALIDATE_ALL
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_PURGE_ALL();
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_ICACHE_ENABLE();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ CYG_TEST_INFO("Dcache on Icache on: invalidate DCache (expect bogus times)");
+ time1DI();
+#endif
+#endif // either INVALIDATE_ALL macro
+
+#endif // HAL_CACHE_UNIFIED
+
+ CYG_TEST_PASS_FINISH("End of test");
+}
+
+// -------------------------------------------------------------------------
+
+void kcache2_main( void )
+{
+ CYG_TEST_INIT();
+
+ cyg_thread_create(4, entry0 , (cyg_addrword_t)0, "kcache1",
+ (void *)stack[0], STACKSIZE, &thread[0], &thread_obj[0]);
+ cyg_thread_resume(thread[0]);
+
+ cyg_scheduler_start();
+}
+
+// -------------------------------------------------------------------------
+
+externC void
+cyg_start( void )
+{
+ kcache2_main();
+}
+
+// -------------------------------------------------------------------------
+
+#else // def CYGFUN_KERNEL_API_C
+#define N_A_MSG "Kernel C API layer disabled"
+#endif // def CYGFUN_KERNEL_API_C
+#else // def CYGVAR_KERNEL_COUNTERS_CLOCK
+#define N_A_MSG "Kernel real-time clock disabled"
+#endif // def CYGVAR_KERNEL_COUNTERS_CLOCK
+#else // def HAL_DCACHE_SIZE
+#define N_A_MSG "No caches defined"
+#endif // def HAL_DCACHE_SIZE
+
+#ifdef N_A_MSG
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG );
+}
+#endif // N_A_MSG
+
+// -------------------------------------------------------------------------
+/* EOF kcache1.c */
diff --git a/cesar/ecos/packages/kernel/current/tests/kcache2.c b/cesar/ecos/packages/kernel/current/tests/kcache2.c
new file mode 100644
index 0000000000..da200d0fb9
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kcache2.c
@@ -0,0 +1,920 @@
+/*=================================================================
+//
+// kcache2.c
+//
+// Cache feature/timing tests
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov, based on kcache1.c by dsm
+// Contributors: jskov, gthomas
+// Date: 1998-12-10
+// Description: Tests some of the more exotic cache macros.
+//####DESCRIPTIONEND####
+*/
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGVAR_KERNEL_COUNTERS_CLOCK
+#ifdef CYGFUN_KERNEL_API_C
+
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_cache.h>
+
+// -------------------------------------------------------------------------
+
+#define NTHREADS 1
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+// The following are defaults for loop variables. Note they will be overriden
+// on simulator targets, where detected - there is no point testing a cache
+// which doesn't exist :-).
+
+#define TEST_DZERO_LOOPS 5000 // default number of loops for test_dzero()
+#define TIME_ILOCK_LOOPS 10000 // default number of loops for time_ilock()
+#define TIME_DLOCK_LOOPS 10000 // default number of loops for time_dlock()
+
+// Define this to enable a simple, but hopefully useful, data cache
+// test. It may help discover if the cache support has been defined
+// properly (in terms of size and shape)
+#ifdef HAL_DCACHE_LINE_SIZE
+#define _TEST_DCACHE_OPERATION
+#endif
+
+static cyg_handle_t thread[NTHREADS];
+
+static cyg_thread thread_obj[NTHREADS];
+static char stack[NTHREADS][STACKSIZE];
+
+#define MAXSIZE 1<<18
+
+volatile char m[MAXSIZE];
+
+// -------------------------------------------------------------------------
+// Test of data cache zero.
+// o Timing comparison with instructions doing the same amount of work.
+// o Check that area cleared with the DCACHE_ZERO macro contains zeros.
+#ifdef HAL_DCACHE_ZERO
+static void test_dzero(void)
+{
+ register cyg_uint32 k, i;
+ cyg_tick_count_t count0, count1;
+ cyg_ucount32 t;
+ volatile cyg_uint32* aligned_p;
+ volatile cyg_uint32* p;
+ register CYG_INTERRUPT_STATE oldints;
+ cyg_ucount32 test_dzero_loops = TEST_DZERO_LOOPS;
+
+ CYG_TEST_INFO("Data cache zero");
+
+ if (cyg_test_is_simulator)
+ test_dzero_loops=10;
+
+ aligned_p = (volatile cyg_uint32*)
+ (((unsigned long) &m[HAL_DCACHE_LINE_SIZE*2])
+ & ~(HAL_DCACHE_LINE_SIZE-1));
+
+ // Time with conventional instructions.
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ count0 = cyg_current_time();
+ for (k = 0; k < test_dzero_loops; k++) {
+ p = aligned_p;
+ for (i = 0; i < HAL_DCACHE_SETS; i++) {
+#if (16 == HAL_DCACHE_LINE_SIZE)
+ *p++ = 0;
+ *p++ = 0;
+ *p++ = 0;
+ *p++ = 0;
+#elif (32 == HAL_DCACHE_LINE_SIZE)
+ *p++ = 0;
+ *p++ = 0;
+ *p++ = 0;
+ *p++ = 0;
+ *p++ = 0;
+ *p++ = 0;
+ *p++ = 0;
+ *p++ = 0;
+#else
+#error "Not defined for this cache line size."
+#endif
+ }
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ }
+ count1 = cyg_current_time();
+ t = count1 - count0;
+ diag_printf("time with instructions: %d\n", t);
+
+ // Initialize the area with non-zero so we can check whether
+ // the macro cleared the area properly.
+ p = aligned_p;
+ for (i = 0;
+ i < HAL_DCACHE_SETS*HAL_DCACHE_LINE_SIZE/sizeof(cyg_uint32);
+ i++) {
+ *p++ = 0xdeadbeef;
+ }
+
+ // Time with DCACHE_ZERO.
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ count0 = cyg_current_time();
+ for (k = 0; k < test_dzero_loops; k++) {
+ HAL_DCACHE_ZERO(aligned_p, HAL_DCACHE_SETS*HAL_DCACHE_LINE_SIZE);
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ }
+ count1 = cyg_current_time();
+ t = count1 - count0;
+ diag_printf("time with HAL_DCACHE_ZERO: %d\n", t);
+
+ // Verify that the area was actually cleared.
+ {
+ cyg_uint32 d;
+
+ d = 0;
+ p = aligned_p;
+ for (i = 0;
+ i < HAL_DCACHE_SETS*HAL_DCACHE_LINE_SIZE/sizeof(cyg_uint32);
+ i++) {
+ d |= *p++;
+ }
+
+ CYG_TEST_CHECK(0 == d, "region not properly cleared");
+ }
+
+}
+#endif
+
+// -------------------------------------------------------------------------
+// Test of data cache write hint.
+// Just check that the macro compiles.
+#ifdef HAL_DCACHE_WRITE_HINT
+static void test_dwrite_hint(void)
+{
+ register cyg_uint32 k;
+ register CYG_INTERRUPT_STATE oldints;
+
+ CYG_TEST_INFO("Data cache write hint");
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+
+ HAL_DCACHE_WRITE_HINT(&m[HAL_DCACHE_LINE_SIZE*2], 2*HAL_DCACHE_LINE_SIZE);
+ for (k = 0; k < 20; k++);
+ m[HAL_DCACHE_LINE_SIZE*2] = 42;
+}
+#endif
+
+// -------------------------------------------------------------------------
+// Test of data cache read hint.
+// Just check that the macro compiles.
+#ifdef HAL_DCACHE_READ_HINT
+static void test_dread_hint(void)
+{
+ register char c;
+ register cyg_uint32 k;
+ register CYG_INTERRUPT_STATE oldints;
+
+ CYG_TEST_INFO("Data cache read hint");
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+
+ HAL_DCACHE_READ_HINT(&m[HAL_DCACHE_LINE_SIZE*2], 2*HAL_DCACHE_LINE_SIZE);
+ for (k = 0; k < 20; k++);
+ c = m[HAL_DCACHE_LINE_SIZE*2];
+}
+#endif
+
+// -------------------------------------------------------------------------
+// Test of data cache line store
+// o No semantic requirement.
+// o Check that flushed data is written to memory.
+// o Simple invocation check of macro.
+#ifdef HAL_DCACHE_STORE
+static void test_dstore(void)
+{
+ volatile cyg_uint8* aligned_p;
+ cyg_int32 i;
+ register CYG_INTERRUPT_STATE oldints;
+
+ CYG_TEST_INFO("Data cache store region");
+
+ for (i = 0; i < HAL_DCACHE_LINE_SIZE*16; i++)
+ m[i] = 0;
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_DCACHE_ENABLE();
+
+ aligned_p = (volatile cyg_uint8*)
+ (((unsigned long) &m[HAL_DCACHE_LINE_SIZE*2])
+ & ~(HAL_DCACHE_LINE_SIZE-1));
+
+ aligned_p[0] = 42 + aligned_p[1]; // Load causes cache to be used!
+
+ HAL_DCACHE_STORE(aligned_p, HAL_DCACHE_LINE_SIZE);
+
+ CYG_TEST_CHECK(42 == aligned_p[0],
+ "memory didn't contain flushed data");
+
+ HAL_DCACHE_INVALIDATE_ALL(); // Discard...
+
+ CYG_TEST_CHECK(42 == aligned_p[0],
+ "memory didn't contain flushed data after invalidate all");
+
+ HAL_RESTORE_INTERRUPTS(oldints);
+}
+#endif
+
+// -------------------------------------------------------------------------
+// Test of data cache total flush (sync).
+// o No semantic requirement.
+// o Check that flushed data is written to memory.
+// o Simple invocation check of macro.
+#ifdef HAL_DCACHE_LINE_SIZE // So we can find our way around memory
+
+#ifdef _TEST_DCACHE_OPERATION
+static void
+test_dcache_operation(void)
+{
+ long *lp = (long *)m;
+ int i, errs;
+ cyg_uint32 oldints;
+
+ CYG_TEST_INFO("Data cache basic");
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ // Fill test buffer
+ for (i = 0; i < sizeof(m)/sizeof(*lp); i++) {
+ lp[i] = i;
+ }
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_DCACHE_ENABLE();
+ // Now push data through the cache
+ // Note: 256 seems like a reasonable offset. It may be useful to actually
+ // compute this (and the size of the test region) based on cache geometry
+ for (i = 256; i < 256+HAL_DCACHE_SIZE/sizeof(*lp); i++) {
+ lp[i] = 0xFF000000 + i;
+ }
+ // Now force cache clean and off
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+ // Verify the data
+ diag_printf("Verify data with cache off\n");
+ errs = 0;
+ for (i = 0; i < sizeof(m)/sizeof(*lp); i++) {
+ if ((i >= 256) && (i < 256+HAL_DCACHE_SIZE/sizeof(*lp))) {
+ if (lp[i] != (0xFF000000 + i)) {
+ if (++errs < 16) {
+ diag_printf("Data inside test range changed - was: %x, is %lx, index: %x\n",
+ 0xFF000000+i, lp[i], i);
+ }
+ }
+ } else {
+ if (lp[i] != i) {
+ if (++errs < 16) {
+ diag_printf("Data outside test range changed - was: %x, is %lx, index: %x\n",
+ i, lp[i], i);
+ }
+ }
+ }
+ }
+ CYG_TEST_CHECK(0 == errs, "dcache basic failed");
+#if 0 // Additional information
+ diag_printf("%d total errors during compare\n", errs);
+ diag_dump_buf(&lp[240], 128);
+#endif
+ HAL_RESTORE_INTERRUPTS(oldints);
+}
+#endif
+
+static void test_dsync(void)
+{
+ volatile cyg_uint8* aligned_p;
+ cyg_int32 i;
+ register CYG_INTERRUPT_STATE oldints;
+
+ CYG_TEST_INFO("Data cache sync all");
+
+ for (i = 0; i < HAL_DCACHE_LINE_SIZE*16; i++)
+ m[i] = 0;
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_DCACHE_ENABLE();
+
+ aligned_p = (volatile cyg_uint8*)
+ (((unsigned long) &m[HAL_DCACHE_LINE_SIZE*2])
+ & ~(HAL_DCACHE_LINE_SIZE-1));
+
+ aligned_p[0] = 42 + aligned_p[1]; // Load causes cache to be used!
+ aligned_p[HAL_DCACHE_LINE_SIZE] = 43 + aligned_p[HAL_DCACHE_LINE_SIZE + 1];
+
+ HAL_DCACHE_SYNC();
+
+ CYG_TEST_CHECK(42 == aligned_p[0],
+ "memory didn't contain flushed data");
+ CYG_TEST_CHECK(43 == aligned_p[HAL_DCACHE_LINE_SIZE],
+ "memory didn't contain flushed data next block");
+
+ HAL_DCACHE_INVALIDATE_ALL();
+
+ CYG_TEST_CHECK(42 == aligned_p[0],
+ "memory didn't contain flushed data after invalidate");
+ CYG_TEST_CHECK(43 == aligned_p[HAL_DCACHE_LINE_SIZE],
+ "memory didn't contain flushed data next block after invalidate");
+
+ HAL_RESTORE_INTERRUPTS(oldints);
+
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_DISABLE();
+
+ CYG_TEST_CHECK(42 == aligned_p[0],
+ "memory didn't contain flushed data after disable");
+ CYG_TEST_CHECK(43 == aligned_p[HAL_DCACHE_LINE_SIZE],
+ "memory didn't contain flushed data next block after disable");
+
+ HAL_DCACHE_ENABLE();
+}
+#endif // HAL_DCACHE_LINE_SIZE
+
+// -------------------------------------------------------------------------
+// Test of data cache line flush.
+// o Requires write-back cache.
+// o Check that flushed data is written to memory.
+// o Simple range check of macro.
+#ifdef HAL_DCACHE_QUERY_WRITE_MODE // only if we know this, can we test:
+#ifdef HAL_DCACHE_FLUSH
+static void test_dflush(void)
+{
+ volatile cyg_uint8* aligned_p;
+ cyg_int32 i;
+ register CYG_INTERRUPT_STATE oldints;
+
+ CYG_TEST_INFO("Data cache flush region");
+
+ for (i = 0; i < HAL_DCACHE_LINE_SIZE*16; i++)
+ m[i] = 0;
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+
+ aligned_p = (volatile cyg_uint8*)
+ (((unsigned long) &m[HAL_DCACHE_LINE_SIZE*2])
+ & ~(HAL_DCACHE_LINE_SIZE-1));
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+
+ aligned_p[0] = 42 + aligned_p[1]; // Load causes cache to be used!
+ aligned_p[HAL_DCACHE_LINE_SIZE] = 43 + aligned_p[HAL_DCACHE_LINE_SIZE + 1];
+
+ HAL_DCACHE_FLUSH(aligned_p, HAL_DCACHE_LINE_SIZE);
+
+ HAL_DCACHE_DISABLE();
+
+ HAL_RESTORE_INTERRUPTS(oldints);
+
+ CYG_TEST_CHECK(42 == aligned_p[0],
+ "memory didn't contain flushed data");
+ CYG_TEST_CHECK(0 == aligned_p[HAL_DCACHE_LINE_SIZE],
+ "flushed beyond region");
+
+ HAL_DCACHE_ENABLE();
+}
+#endif
+#endif
+
+// -------------------------------------------------------------------------
+// Test of data cache disable (which does NOT force contents out to RAM)
+// o Requires write-back cache [so NOT invoked unconditionally]
+// o Check that dirty data is not written to memory and is invalidated
+// in the cache.
+// o Simple invocation check of macro.
+#ifdef HAL_DCACHE_QUERY_WRITE_MODE // only if we know this, can we test:
+static void test_ddisable(void)
+{
+ volatile cyg_uint8* aligned_p;
+ cyg_int32 i;
+ register CYG_INTERRUPT_STATE oldints;
+
+ CYG_TEST_INFO("Data cache gross disable");
+
+ for (i = 0; i < HAL_DCACHE_LINE_SIZE*16; i++)
+ m[i] = 0;
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+
+ aligned_p = (volatile cyg_uint8*)
+ (((unsigned long) &m[HAL_DCACHE_LINE_SIZE*2])
+ & ~(HAL_DCACHE_LINE_SIZE-1));
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+
+ aligned_p[0] = 43 + aligned_p[1]; // Load causes cache to be used!
+ aligned_p[HAL_DCACHE_LINE_SIZE-1] = 43;
+
+ aligned_p[HAL_DCACHE_LINE_SIZE] = 42 + aligned_p[HAL_DCACHE_LINE_SIZE + 1];
+
+ HAL_DCACHE_DISABLE();
+
+ HAL_RESTORE_INTERRUPTS(oldints);
+
+ CYG_TEST_CHECK(0 == aligned_p[0] &&
+ 0 == aligned_p[HAL_DCACHE_LINE_SIZE-1],
+ "cache/memory contained invalidated data");
+ CYG_TEST_CHECK(0 == aligned_p[HAL_DCACHE_LINE_SIZE],
+ "next block contained invalidated data");
+
+ HAL_DCACHE_ENABLE();
+}
+#endif // def HAL_DCACHE_QUERY_WRITE_MODE
+
+// -------------------------------------------------------------------------
+// Test of data cache total invalidate.
+// o Requires write-back cache.
+// o Check that invalidated data is not written to memory and is invalidated
+// in the cache.
+// o Simple invocation check of macro.
+#ifdef HAL_DCACHE_QUERY_WRITE_MODE // only if we know this, can we test:
+#ifdef HAL_DCACHE_INVALIDATE_ALL
+static void test_dinvalidate_all(void)
+{
+ volatile cyg_uint8* aligned_p;
+ cyg_int32 i;
+ register CYG_INTERRUPT_STATE oldints;
+
+ CYG_TEST_INFO("Data cache invalidate all");
+
+ for (i = 0; i < HAL_DCACHE_LINE_SIZE*16; i++)
+ m[i] = 0;
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_DCACHE_ENABLE();
+
+ aligned_p = (volatile cyg_uint8*)
+ (((unsigned long) &m[HAL_DCACHE_LINE_SIZE*2])
+ & ~(HAL_DCACHE_LINE_SIZE-1));
+
+ aligned_p[0] = 43 + aligned_p[1]; // Load causes cache to be used!
+ aligned_p[HAL_DCACHE_LINE_SIZE-1] = 43;
+
+ aligned_p[HAL_DCACHE_LINE_SIZE] = 42 + aligned_p[HAL_DCACHE_LINE_SIZE + 1];
+
+ HAL_DCACHE_INVALIDATE_ALL();
+
+ HAL_RESTORE_INTERRUPTS(oldints);
+
+ CYG_TEST_CHECK(0 == aligned_p[0] &&
+ 0 == aligned_p[HAL_DCACHE_LINE_SIZE-1],
+ "cache/memory contained invalidated data");
+ CYG_TEST_CHECK(0 == aligned_p[HAL_DCACHE_LINE_SIZE],
+ "next block contained invalidated data");
+}
+#endif
+#endif // def HAL_DCACHE_QUERY_WRITE_MODE
+
+// -------------------------------------------------------------------------
+// Test of data cache line invalidate.
+// o Requires write-back cache.
+// o Check that invalidated data is not written to memory and is invalidated
+// in the cache.
+// o Simple range check of macro.
+#ifdef HAL_DCACHE_QUERY_WRITE_MODE // only if we know this, can we test:
+#ifdef HAL_DCACHE_INVALIDATE
+static void test_dinvalidate(void)
+{
+ volatile cyg_uint8* aligned_p;
+ cyg_int32 i;
+ register CYG_INTERRUPT_STATE oldints;
+
+ CYG_TEST_INFO("Data cache invalidate region");
+
+ for (i = 0; i < HAL_DCACHE_LINE_SIZE*16; i++)
+ m[i] = 0;
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+
+ aligned_p = (volatile cyg_uint8*)
+ (((unsigned long) &m[HAL_DCACHE_LINE_SIZE*2])
+ & ~(HAL_DCACHE_LINE_SIZE-1));
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+
+ aligned_p[0] = 43 + aligned_p[1]; // Load causes cache to be used!
+ aligned_p[HAL_DCACHE_LINE_SIZE-1] = 43;
+
+ aligned_p[HAL_DCACHE_LINE_SIZE] = 42 + aligned_p[HAL_DCACHE_LINE_SIZE + 1];
+
+ HAL_DCACHE_INVALIDATE(aligned_p, HAL_DCACHE_LINE_SIZE);
+
+ HAL_RESTORE_INTERRUPTS(oldints);
+
+ CYG_TEST_CHECK(0 == aligned_p[0] &&
+ 0 == aligned_p[HAL_DCACHE_LINE_SIZE-1],
+ "cache/memory contained invalidated data");
+ CYG_TEST_CHECK(42 == aligned_p[HAL_DCACHE_LINE_SIZE],
+ "invalidated beyond range");
+
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+
+ CYG_TEST_CHECK(0 == aligned_p[0] &&
+ 0 == aligned_p[HAL_DCACHE_LINE_SIZE-1],
+ "cache/memory contained invalidated data after SYNC/DIS");
+ CYG_TEST_CHECK(42 == aligned_p[HAL_DCACHE_LINE_SIZE],
+ "invalidated beyond range after SYNC/DIS");
+
+ HAL_DCACHE_ENABLE();
+}
+#endif
+#endif // def HAL_DCACHE_QUERY_WRITE_MODE
+
+// -------------------------------------------------------------------------
+// Test of instruction cache locking.
+// o Time difference between repeatedly executing a bunch of instructions
+// with and without locking.
+#ifdef HAL_ICACHE_LOCK
+static void iloop(unsigned long* start, unsigned long* end, int dummy)
+{
+ // dummy is just used to fool the compiler to not move the labels
+ // around. All callers should call with dummy=0;
+
+ register char c;
+ register CYG_INTERRUPT_STATE oldints;
+
+ if (1 == dummy) goto label_end;
+
+ label_start:
+ // Invalidating shouldn't affect locked lines.
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_ICACHE_DISABLE();
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_ICACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+
+ c = m[HAL_DCACHE_LINE_SIZE*0];
+ c = m[HAL_DCACHE_LINE_SIZE*1];
+ c = m[HAL_DCACHE_LINE_SIZE*2];
+ c = m[HAL_DCACHE_LINE_SIZE*3];
+ c = m[HAL_DCACHE_LINE_SIZE*4];
+ c = m[HAL_DCACHE_LINE_SIZE*5];
+ c = m[HAL_DCACHE_LINE_SIZE*6];
+ c = m[HAL_DCACHE_LINE_SIZE*7];
+ c = m[HAL_DCACHE_LINE_SIZE*8];
+ c = m[HAL_DCACHE_LINE_SIZE*9];
+ c = m[HAL_DCACHE_LINE_SIZE*10];
+ c = m[HAL_DCACHE_LINE_SIZE*11];
+ c = m[HAL_DCACHE_LINE_SIZE*12];
+ c = m[HAL_DCACHE_LINE_SIZE*13];
+ c = m[HAL_DCACHE_LINE_SIZE*14];
+ c = m[HAL_DCACHE_LINE_SIZE*15];
+ c = m[HAL_DCACHE_LINE_SIZE*16];
+ c = m[HAL_DCACHE_LINE_SIZE*17];
+ c = m[HAL_DCACHE_LINE_SIZE*18];
+ c = m[HAL_DCACHE_LINE_SIZE*19];
+ c = m[HAL_DCACHE_LINE_SIZE*20];
+ c = m[HAL_DCACHE_LINE_SIZE*21];
+ c = m[HAL_DCACHE_LINE_SIZE*22];
+ c = m[HAL_DCACHE_LINE_SIZE*23];
+ c = m[HAL_DCACHE_LINE_SIZE*24];
+ c = m[HAL_DCACHE_LINE_SIZE*25];
+ c = m[HAL_DCACHE_LINE_SIZE*26];
+ c = m[HAL_DCACHE_LINE_SIZE*27];
+ c = m[HAL_DCACHE_LINE_SIZE*28];
+ c = m[HAL_DCACHE_LINE_SIZE*29];
+ c = m[HAL_DCACHE_LINE_SIZE*30];
+ c = m[HAL_DCACHE_LINE_SIZE*31];
+ c = m[HAL_DCACHE_LINE_SIZE*32];
+ c = m[HAL_DCACHE_LINE_SIZE*33];
+ c = m[HAL_DCACHE_LINE_SIZE*34];
+ c = m[HAL_DCACHE_LINE_SIZE*35];
+ c = m[HAL_DCACHE_LINE_SIZE*36];
+ c = m[HAL_DCACHE_LINE_SIZE*37];
+ c = m[HAL_DCACHE_LINE_SIZE*38];
+ c = m[HAL_DCACHE_LINE_SIZE*39];
+ c = m[HAL_DCACHE_LINE_SIZE*40];
+ c = m[HAL_DCACHE_LINE_SIZE*41];
+ c = m[HAL_DCACHE_LINE_SIZE*42];
+ c = m[HAL_DCACHE_LINE_SIZE*43];
+ c = m[HAL_DCACHE_LINE_SIZE*44];
+ c = m[HAL_DCACHE_LINE_SIZE*45];
+ c = m[HAL_DCACHE_LINE_SIZE*46];
+ c = m[HAL_DCACHE_LINE_SIZE*47];
+ c = m[HAL_DCACHE_LINE_SIZE*48];
+ c = m[HAL_DCACHE_LINE_SIZE*49];
+ c = m[HAL_DCACHE_LINE_SIZE*50];
+ c = m[HAL_DCACHE_LINE_SIZE*51];
+ c = m[HAL_DCACHE_LINE_SIZE*52];
+ c = m[HAL_DCACHE_LINE_SIZE*53];
+ c = m[HAL_DCACHE_LINE_SIZE*54];
+ c = m[HAL_DCACHE_LINE_SIZE*55];
+ c = m[HAL_DCACHE_LINE_SIZE*56];
+ c = m[HAL_DCACHE_LINE_SIZE*57];
+ c = m[HAL_DCACHE_LINE_SIZE*58];
+ c = m[HAL_DCACHE_LINE_SIZE*59];
+ c = m[HAL_DCACHE_LINE_SIZE*60];
+ c = m[HAL_DCACHE_LINE_SIZE*61];
+ c = m[HAL_DCACHE_LINE_SIZE*62];
+ c = m[HAL_DCACHE_LINE_SIZE*63];
+
+ label_end:
+
+ *start = (unsigned long) &&label_start;
+ *end = (unsigned long) &&label_end;
+
+ if (1 == dummy) goto label_start;
+}
+
+static void time_ilock(void)
+{
+ register cyg_ucount32 k;
+ cyg_tick_count_t count0, count1;
+ cyg_ucount32 t;
+ unsigned long start, end;
+ register cyg_ucount32 time_ilock_loops = TIME_ILOCK_LOOPS;
+
+ CYG_TEST_INFO("Instruction cache lock");
+
+ if (cyg_test_is_simulator)
+ time_ilock_loops = 10;
+
+ count0 = cyg_current_time();
+ for (k = 0; k < time_ilock_loops; k++) {
+ iloop(&start, &end, 0);
+ }
+ count1 = cyg_current_time();
+ t = count1 - count0;
+ diag_printf("time without lock: %d\n", t);
+
+ HAL_ICACHE_LOCK(start, end-start);
+
+ count0 = cyg_current_time();
+ for (k = 0; k < time_ilock_loops; k++) {
+ iloop(&start, &end, 0);
+ }
+ count1 = cyg_current_time();
+ t = count1 - count0;
+ diag_printf("time with lock: %d\n", t);
+
+ HAL_ICACHE_UNLOCK(start, end-start);
+}
+#endif // ifdef HAL_ICACHE_LOCK
+
+// -------------------------------------------------------------------------
+// Test of data cache locking.
+// o Time difference between repeatedly accessing a memory region
+// with and without locking.
+#ifdef HAL_DCACHE_LOCK
+static void dloop(void)
+{
+ register cyg_uint32 j;
+ register char c;
+ register CYG_INTERRUPT_STATE oldints;
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ for (j = 0; j < HAL_DCACHE_SETS; j++) {
+ c = m[HAL_DCACHE_LINE_SIZE*j];
+ }
+}
+
+static void time_dlock(void)
+{
+ register cyg_ucount32 k;
+ cyg_tick_count_t count0, count1;
+ cyg_ucount32 t;
+ register cyg_ucount32 time_dlock_loops = TIME_DLOCK_LOOPS;
+
+ CYG_TEST_INFO("Data cache lock");
+
+ if (cyg_test_is_simulator)
+ time_dlock_loops = 10;
+
+ count0 = cyg_current_time();
+ for (k = 0; k < time_dlock_loops; k++) {
+ dloop();
+ }
+ count1 = cyg_current_time();
+ t = count1 - count0;
+ diag_printf("time without lock: %d\n", t);
+
+ HAL_DCACHE_LOCK(&m[0], HAL_DCACHE_SETS*HAL_DCACHE_LINE_SIZE);
+
+ count0 = cyg_current_time();
+ for (k = 0; k < time_dlock_loops; k++) {
+ dloop();
+ }
+ count1 = cyg_current_time();
+ t = count1 - count0;
+ diag_printf("time with lock: %d\n", t);
+
+ HAL_DCACHE_UNLOCK(&m[0], HAL_DCACHE_SETS*HAL_DCACHE_LINE_SIZE);
+}
+#endif // ifdef HAL_DCACHE_LOCK
+
+// -------------------------------------------------------------------------
+static void entry0( cyg_addrword_t data )
+{
+ int numtests = 0;
+#ifdef HAL_DCACHE_QUERY_WRITE_MODE
+ int wmode;
+#endif
+#ifdef HAL_DCACHE_LOCK
+ time_dlock(); numtests++;
+#endif
+#ifdef HAL_ICACHE_LOCK
+ time_ilock(); numtests++;
+#endif
+#ifdef HAL_DCACHE_LINE_SIZE // So we can find our way around memory
+ test_dsync(); numtests++;
+#endif
+#ifdef HAL_DCACHE_STORE
+ test_dstore(); numtests++;
+#endif
+#ifdef _TEST_DCACHE_OPERATION
+ test_dcache_operation(); numtests++;
+#endif
+#ifdef HAL_DCACHE_READ_HINT
+ test_dread_hint(); numtests++;
+#endif
+#ifdef HAL_DCACHE_WRITE_HINT
+ test_dwrite_hint(); numtests++;
+#endif
+#ifdef HAL_DCACHE_ZERO
+ test_dzero(); numtests++;
+#endif
+
+ // The below tests only work on a copy-back cache.
+#ifdef HAL_DCACHE_QUERY_WRITE_MODE
+ HAL_DCACHE_QUERY_WRITE_MODE( wmode );
+
+ if ( HAL_DCACHE_WRITEBACK_MODE == wmode ) {
+ test_ddisable(); numtests++;
+#ifdef HAL_DCACHE_INVALIDATE
+ test_dinvalidate_all(); numtests++;
+#endif
+#ifdef HAL_DCACHE_FLUSH
+ test_dflush(); numtests++;
+#endif
+#ifdef HAL_DCACHE_INVALIDATE
+ test_dinvalidate(); numtests++;
+#endif
+ }
+#endif // def HAL_DCACHE_QUERY_WRITE_MODE
+ if ( numtests ) {
+ CYG_TEST_PASS_FINISH("End of test");
+ }
+ else {
+ CYG_TEST_NA( "No applicable cache tests" );
+ }
+}
+
+// -------------------------------------------------------------------------
+
+void kcache2_main( void )
+{
+ CYG_TEST_INIT();
+
+ cyg_thread_create(4, entry0 , (cyg_addrword_t)0, "kcache2",
+ (void *)stack[0], STACKSIZE, &thread[0], &thread_obj[0]);
+ cyg_thread_resume(thread[0]);
+
+ cyg_scheduler_start();
+}
+
+// -------------------------------------------------------------------------
+
+externC void
+cyg_start( void )
+{
+ kcache2_main();
+}
+
+// -------------------------------------------------------------------------
+
+#else // def CYGFUN_KERNEL_API_C
+#define N_A_MSG "Kernel C API layer disabled"
+#endif // def CYGFUN_KERNEL_API_C
+#else // def CYGVAR_KERNEL_COUNTERS_CLOCK
+#define N_A_MSG "Kernel real-time clock disabled"
+#endif // def CYGVAR_KERNEL_COUNTERS_CLOCK
+
+#ifdef N_A_MSG
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG );
+}
+#endif // N_A_MSG
+
+// -------------------------------------------------------------------------
+/* EOF kcache2.c */
diff --git a/cesar/ecos/packages/kernel/current/tests/kclock0.c b/cesar/ecos/packages/kernel/current/tests/kclock0.c
new file mode 100644
index 0000000000..91c126700c
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kclock0.c
@@ -0,0 +1,274 @@
+/*=================================================================
+//
+// kclock0.c
+//
+// Kernel C API Clock test 0
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-03-20
+// Description: Tests some basic clock functions.
+//####DESCRIPTIONEND####
+*/
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGVAR_KERNEL_COUNTERS_CLOCK
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#include "testaux.h"
+
+cyg_alarm_t call_me;
+
+cyg_counter counter0o, counter1o;
+cyg_handle_t counter0, counter1;
+
+cyg_alarm alarmo[3];
+cyg_handle_t alarm0, alarm1, alarm2;
+
+cyg_resolution_t res, res0, res1;
+
+cyg_clock clock0o;
+cyg_handle_t clock0;
+
+const cyg_uint32 big_number = 3333222111u;
+
+cyg_bool_t flash( void )
+{
+ cyg_counter_create( &counter0, &counter0o );
+ cyg_counter_create( &counter1, &counter1o );
+
+ cyg_alarm_create( counter0,
+ call_me,
+ (cyg_addrword_t)12,
+ &alarm0,
+ &alarmo[0]);
+
+ res.dividend = 1;
+ res.divisor = 2;
+
+ cyg_clock_create( res, &clock0, &clock0o );
+ cyg_clock_delete( clock0 );
+
+ cyg_alarm_delete( alarm0 );
+
+ cyg_counter_delete( counter0 );
+ cyg_counter_delete( counter1 );
+
+ return true;
+}
+
+/* Testing alarms
+//
+// call_me is a function that will be called when an alarm is
+// triggered. It updates a global variable called which is CHECKed
+// explicitly to see if the approriate alarms have been called.
+*/
+
+cyg_uint16 called = 0x0;
+
+void call_me(cyg_handle_t alarm, cyg_addrword_t data)
+{
+ called ^= (int)data;
+}
+
+void call_me2(cyg_handle_t alarm, cyg_addrword_t data)
+{
+ call_me(alarm, (cyg_addrword_t)((int)data^0x10));
+}
+
+
+void kclock0_main(void)
+{
+ CYG_TEST_INIT();
+
+ CHECK(flash());
+ CHECK(flash());
+
+ cyg_counter_create( &counter0, &counter0o);
+
+ CHECK( 0 == cyg_counter_current_value( counter0 ) );
+
+ cyg_counter_tick(counter0);
+
+ CHECK( 1 == cyg_counter_current_value(counter0) );
+
+ cyg_counter_tick(counter0);
+
+ CHECK( 2 == cyg_counter_current_value(counter0) );
+
+ cyg_counter_set_value( counter0, 0xffffffff );
+
+ CHECK( 0xffffffff == cyg_counter_current_value(counter0) );
+
+ cyg_counter_tick(counter0); // Overflows 32 bits
+
+ CHECK( 0x100000000ULL == cyg_counter_current_value(counter0) );
+
+ cyg_counter_set_value(counter0, 11);
+ CHECK( 11 == cyg_counter_current_value(counter0) );
+
+ /* the call_me functions cause the "called" bits to toggle
+ // checking the value of called checks the parity of # of calls
+ // made by each alarm.
+ */
+
+ cyg_alarm_create(counter0,
+ call_me, (cyg_addrword_t)0x1, &alarm0, &alarmo[0]);
+ cyg_alarm_create(counter0,
+ call_me, (cyg_addrword_t)0x2, &alarm1, &alarmo[1]);
+ cyg_alarm_create(counter0,
+ call_me2, (cyg_addrword_t)0x4, &alarm2, &alarmo[2]);
+
+ CHECK( 0x00 == called );
+ cyg_alarm_initialize(alarm0, 12,3);
+ cyg_alarm_initialize(alarm2, 21,2);
+ CHECK( 0x00 == called );
+
+ cyg_counter_tick(counter0); /* 12 a0 */
+ CHECK( 0x01 == called );
+
+ cyg_alarm_initialize(alarm1, 13,0);
+ cyg_counter_tick(counter0); /* 13 a1 */
+ CHECK( 0x03 == called );
+
+ cyg_alarm_initialize(alarm1, 17,0);
+ cyg_counter_tick(counter0); /* 14 */
+ CHECK( 0x03 == called );
+
+ cyg_counter_tick(counter0); /* 15 a0 */
+ CHECK( 0x02 == called );
+
+ cyg_counter_tick(counter0); /* 16 */
+ cyg_counter_tick(counter0); /* 17 a1 */
+ CHECK( 0x00 == called );
+
+ cyg_counter_tick(counter0); /* 18 a0 */
+ CHECK( 0x01 == called );
+
+ cyg_counter_tick(counter0); /* 19 */
+ cyg_counter_tick(counter0); /* 20 */
+ cyg_counter_tick(counter0); /* 21 a0 a2 */
+ CHECK( 0x14 == called );
+
+ cyg_counter_tick(counter0); /* 22 */
+ cyg_counter_tick(counter0); /* 23 a2 */
+ CHECK( 0x00 == called );
+
+ cyg_alarm_disable(alarm2);
+
+ cyg_counter_tick(counter0); /* 24 a0 */
+ cyg_counter_tick(counter0); /* 25 */
+ CHECK( 0x01 == called );
+
+ cyg_alarm_enable(alarm2); /* a2 (enabled at 25) */
+ CHECK( 0x15 == called );
+
+ cyg_counter_tick(counter0); /* 26 */
+ CHECK( 0x15 == called );
+
+ cyg_counter_tick(counter0); /* 27 a0 a2 */
+ cyg_counter_tick(counter0); /* 28 */
+ CHECK( 0x00 == called );
+
+ cyg_counter_tick(counter0); /* 29 a2 */
+ cyg_counter_tick(counter0); /* 30 a0 */
+ cyg_counter_tick(counter0); /* 31 a2 */
+ CHECK( 0x01 == called );
+
+ res0.dividend = 100;
+ res0.divisor = 3;
+
+ cyg_clock_create( res0, &clock0, &clock0o );
+
+ res1 = cyg_clock_get_resolution(clock0);
+ CHECK( res0.dividend == res1.dividend );
+ CHECK( res0.divisor == res1.divisor );
+
+ res1.dividend = 12;
+ res1.divisor = 25;
+
+ cyg_clock_set_resolution(clock0, res1);
+ res0 = cyg_clock_get_resolution(clock0);
+ CHECK( res0.dividend == res1.dividend );
+ CHECK( res0.divisor == res1.divisor );
+
+ cyg_clock_to_counter(clock0, &counter1);
+
+ CHECK( 0 == cyg_counter_current_value( counter1 ) );
+ CHECK( 0 == cyg_current_time() );
+
+ cyg_counter_tick(counter1);
+
+ CHECK( 1 == cyg_counter_current_value(counter1) );
+
+ res0 = cyg_clock_get_resolution(cyg_real_time_clock());
+
+ /* Current time should be 0 as interrupts will still be disabled */
+ CHECK( 0 == cyg_current_time() );
+
+ CYG_TEST_PASS_FINISH("Kernel C API Clock 0 OK");
+}
+
+externC void
+cyg_start( void )
+{
+ kclock0_main();
+}
+
+#else // def CYGFUN_KERNEL_API_C
+#define N_A_MSG "Kernel C API layer disabled"
+#endif // def CYGFUN_KERNEL_API_C
+#else // def CYGVAR_KERNEL_COUNTERS_CLOCK
+#define N_A_MSG "Kernel real-time clock disabled"
+#endif // def CYGVAR_KERNEL_COUNTERS_CLOCK
+
+#ifdef N_A_MSG
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG );
+}
+#endif // N_A_MSG
+
+// EOF kclock0.c
diff --git a/cesar/ecos/packages/kernel/current/tests/kclock1.c b/cesar/ecos/packages/kernel/current/tests/kclock1.c
new file mode 100644
index 0000000000..9eaf502516
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kclock1.c
@@ -0,0 +1,153 @@
+/*=================================================================
+//
+// kclock1.c
+//
+// Kernel C API Clock test 1 - Real Time Clock
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-03-20
+// Description: Tests the Kernel Real Time Clock
+// This test creates a thread, starts the scheduler and
+// delays for a time of about 5 seconds. This test should
+// be expected to run for about this length of time.
+// Omissions:
+// Doesn't test alarms attached to RTC.
+// Assumptions:
+// CYGVAR_KERNEL_COUNTERS_CLOCK must be set.
+// Resolution of clock small compared with 5s.
+// Overhead small compared with 5s.
+// Options:
+// CYGIMP_KERNEL_COUNTERS_SINGLE_LIST
+// CYGIMP_KERNEL_COUNTERS_MULTI_LIST
+// CYGVAR_KERNEL_COUNTERS_CLOCK
+// CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE
+//####DESCRIPTIONEND####
+*/
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+
+static cyg_uint64 TEST_DELAY;
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#include "testaux.h"
+
+#define NTHREADS 1
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+static cyg_handle_t thread[NTHREADS];
+
+static cyg_thread thread_obj[NTHREADS];
+static char stack[NTHREADS][STACKSIZE];
+
+static void entry0( cyg_addrword_t data )
+{
+ cyg_resolution_t res;
+ cyg_uint32 ticks;
+ cyg_tick_count_t count0, count1;
+ cyg_handle_t rtclock, rtcounter;
+
+ rtclock = cyg_real_time_clock();
+ cyg_clock_to_counter(rtclock, &rtcounter);
+
+ res = cyg_clock_get_resolution (rtclock);
+
+ /* RTC takes res.dividend/res.divisor ns/tick */
+ ticks = ((cyg_uint64)TEST_DELAY * res.divisor) / res.dividend;
+
+ count0 = cyg_counter_current_value(rtcounter);
+ cyg_thread_delay(ticks);
+ count1 = cyg_counter_current_value(rtcounter);
+
+ CYG_TEST_CHECK(count0+ticks <= count1,
+ "real time clock's counter not counting");
+
+ CYG_TEST_CHECK(count1 <= cyg_current_time(),"cyg_current_time()");
+
+ CYG_TEST_PASS_FINISH("Kernel C API Clock 1 OK");
+}
+
+void kclock1_main( void )
+{
+ CYG_TEST_INIT();
+
+ if (cyg_test_is_simulator) {
+ TEST_DELAY = 100000000ll;
+ } else {
+ TEST_DELAY = 3000000000ll;
+ }
+
+ cyg_thread_create(4, entry0 , (cyg_addrword_t)0, "kclock1",
+ (void *)stack[0], STACKSIZE, &thread[0], &thread_obj[0]);
+ cyg_thread_resume(thread[0]);
+
+ cyg_scheduler_start();
+}
+
+externC void
+cyg_start( void )
+{
+ kclock1_main();
+}
+
+#else // def CYGFUN_KERNEL_API_C
+#define N_A_MSG "Kernel C API layer disabled"
+#endif // def CYGFUN_KERNEL_API_C
+#else // def CYGFUN_KERNEL_THREADS_TIMER
+#define N_A_MSG "Kernel threads timer disabled"
+#endif // def CYGFUN_KERNEL_THREADS_TIMER
+
+#ifdef N_A_MSG
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG );
+}
+#endif // N_A_MSG
+
+// EOF kclock1.c
diff --git a/cesar/ecos/packages/kernel/current/tests/kexcept1.c b/cesar/ecos/packages/kernel/current/tests/kexcept1.c
new file mode 100644
index 0000000000..d85687f6a4
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kexcept1.c
@@ -0,0 +1,288 @@
+/*=================================================================
+//
+// kexcept1.cxx
+//
+// Kernel C API Exception test 1
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm, jlarmour
+// Date: 1999-02-16
+// Description: Test basic exception functionality
+//####DESCRIPTIONEND####
+*/
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGPKG_KERNEL_EXCEPTIONS
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#include <cyg/hal/hal_intr.h> // exception ranges
+
+#include "testaux.h"
+
+#ifndef CYGPKG_HAL_ARM_PID
+#define EXCEPTION_DATA_ACCESS
+#endif
+
+#define NTHREADS 1
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+static cyg_handle_t thread[NTHREADS];
+
+static cyg_thread thread_obj[NTHREADS];
+static char stack[NTHREADS][STACKSIZE];
+
+
+
+#ifdef EXCEPTION_DATA_ACCESS
+static cyg_exception_handler_t handler0;
+
+static void handler0(cyg_addrword_t data, cyg_code_t number, cyg_addrword_t info)
+{
+ CYG_TEST_INFO("handler 0 called");
+
+ CYG_TEST_CHECK((cyg_addrword_t)123 == data, "handler given wrong data");
+
+ // ignore machine specific stuff
+ CYG_UNUSED_PARAM(cyg_code_t, number);
+ CYG_UNUSED_PARAM(cyg_addrword_t, info);
+
+ CYG_TEST_PASS_FINISH("Except 1 OK");
+}
+#endif
+
+static int d0;
+
+static void handler1(cyg_addrword_t data, cyg_code_t number, cyg_addrword_t info)
+{
+ CYG_TEST_INFO("handler 1 called");
+
+ CYG_TEST_CHECK((cyg_addrword_t)&d0 == data, "handler given wrong data");
+
+#ifdef CYGSEM_KERNEL_EXCEPTIONS_DECODE
+ CYG_TEST_CHECK(number == CYGNUM_HAL_EXCEPTION_MAX, "handler given wrong number");
+#else
+ CYG_UNUSED_PARAM(cyg_code_t, number);
+#endif
+
+ CYG_TEST_CHECK((cyg_addrword_t)99 == info, "handler given wrong info");
+}
+
+
+#ifdef EXCEPTION_DATA_ACCESS
+// The following function attempts to cause an exception in various
+// hacky ways. It is machine dependent what exception is generated.
+// It does reads rather than writes hoping not to corrupt anything
+// important.
+static int
+cause_fpe(int num)
+{
+ double a;
+
+ a = 1.0/num; // Depending on FPU emulation and/or
+ // the FPU architecture, this may
+ // cause an exception.
+ // (float division by zero)
+
+ return ((int)a)/num; // This may cause an exception if
+ // the architecture supports it.
+ // (integer division by zero).
+} // cause_fpe()
+
+void cause_exception(void)
+{
+ int x;
+ unsigned int p=0;
+
+ // First try for an address exception (unaligned access exception
+ // or SEGV/BUS exceptions)
+ do {
+ x=*(volatile int *)(p-1);
+ p+=0x100000;
+ } while(p != 0);
+
+ // Next try an integer or floating point divide-by-zero exception.
+ cause_fpe(0);
+}
+#endif
+
+static void entry0( CYG_ADDRWORD data )
+{
+#ifdef EXCEPTION_DATA_ACCESS
+ cyg_code_t n;
+#endif
+ cyg_exception_handler_t *old_handler, *old_handler1;
+ cyg_addrword_t old_data, old_data1;
+
+ CYG_UNUSED_PARAM(CYG_ADDRESS, data);
+
+ cyg_exception_set_handler(
+ CYGNUM_HAL_EXCEPTION_MAX,
+ &handler1,
+ (cyg_addrword_t)&d0,
+ &old_handler,
+ &old_data);
+
+ cyg_exception_set_handler(
+ CYGNUM_HAL_EXCEPTION_MAX,
+ &handler1,
+ (cyg_addrword_t)&d0,
+ &old_handler1,
+ &old_data1);
+
+ CYG_TEST_CHECK(old_handler1 == &handler1,
+ "register exception: old_handler not the one previously registered");
+ CYG_TEST_CHECK(old_data1 == (cyg_addrword_t)&d0,
+ "register exception: old_data not those previously registered");
+
+ cyg_exception_call_handler(
+ cyg_thread_self(),
+ CYGNUM_HAL_EXCEPTION_MAX,
+ (cyg_addrword_t)99);
+
+ CYG_TEST_INFO("handler 1 returned");
+
+ cyg_exception_clear_handler(CYGNUM_HAL_EXCEPTION_MAX);
+ cyg_exception_clear_handler(CYGNUM_HAL_EXCEPTION_MAX);
+
+#ifdef EXCEPTION_DATA_ACCESS
+
+#if 0
+#elif defined(CYGPKG_HAL_POWERPC_SIM)
+ // The exception generated by the SIM is not recognized by GDB.
+ // PR 19945 workaround.
+ CYG_TEST_NA("Not applicable to PowerPC SIM");
+#endif
+
+ for(n = CYGNUM_HAL_EXCEPTION_MIN; n <= CYGNUM_HAL_EXCEPTION_MAX; n++) {
+ cyg_exception_set_handler(
+ n,
+ handler0,
+ (cyg_addrword_t)123,
+ &old_handler1,
+ &old_data1);
+ }
+
+ CYG_TEST_PASS("Attempting to provoke exception");
+
+ cause_exception();
+
+ CYG_TEST_FAIL_FINISH("Couldn't cause exception");
+#else // EXCEPTION_DATA_ACCESS
+ CYG_TEST_NA("Platform does not support data exceptions");
+#endif
+}
+
+#ifdef CYG_HAL_MIPS_TX39_JMR3904
+
+extern void __default_exception_vsr(void);
+
+#endif
+
+void except0_main( void )
+{
+ // Use CYG_TEST_GDBCMD _before_ CYG_TEST_INIT()
+ CYG_TEST_GDBCMD("handle SIGBUS nostop");
+ CYG_TEST_GDBCMD("handle SIGSEGV nostop");
+ CYG_TEST_GDBCMD("handle SIGFPE nostop");
+
+ CYG_TEST_INIT();
+
+#ifdef HAL_VSR_SET_TO_ECOS_HANDLER
+ // Reclaim the VSR off CygMon possibly
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_ACCESS
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_DATA_ACCESS, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_TLBMISS_ACCESS
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_DATA_TLBMISS_ACCESS, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DIV_BY_ZERO
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_DIV_BY_ZERO, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_FPU, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU_DIV_BY_ZERO
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_FPU_DIV_BY_ZERO, NULL );
+#endif
+#endif
+
+ cyg_thread_create(4, entry0 , (cyg_addrword_t)0, "kexcept1",
+ (void *)stack[0], STACKSIZE, &thread[0], &thread_obj[0]);
+ cyg_thread_resume(thread[0]);
+
+ cyg_scheduler_start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+ except0_main();
+}
+
+#else // def CYGFUN_KERNEL_API_C
+#define N_A_MSG "Kernel C API layer disabled"
+#endif // def CYGFUN_KERNEL_API_C
+#else // def CYGPKG_KERNEL_EXCEPTIONS
+#define N_A_MSG "Exceptions disabled"
+#endif // def CYGPKG_KERNEL_EXCEPTIONS
+
+#ifdef N_A_MSG
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG);
+}
+#endif // N_A_MSG
+
+/* EOF kexcept1.c */
diff --git a/cesar/ecos/packages/kernel/current/tests/kflag0.c b/cesar/ecos/packages/kernel/current/tests/kflag0.c
new file mode 100644
index 0000000000..d5483db11b
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kflag0.c
@@ -0,0 +1,99 @@
+/*==========================================================================
+//
+// kflag0.cxx
+//
+// Kernel C API Flag test 0
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: hmt
+// Date: 1998-10-19
+// Description: Limited to checking constructors/destructors
+//####DESCRIPTIONEND####
+*/
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#include "testaux.h"
+
+cyg_flag_t f0, f1, f2;
+
+static bool flash( void )
+{
+ cyg_flag_init( &f0 );
+ cyg_flag_init( &f1 );
+ cyg_flag_init( &f2 );
+
+ cyg_flag_destroy( &f0 );
+ cyg_flag_destroy( &f1 );
+ cyg_flag_destroy( &f2 );
+
+ return true;
+}
+
+void kflag0_main( void )
+{
+ CYG_TEST_INIT();
+
+ CHECK(flash());
+ CHECK(flash());
+
+ CYG_TEST_PASS_FINISH("Kernel C API Flag 0 OK");
+
+}
+
+externC void
+cyg_start( void )
+{
+ kflag0_main();
+}
+
+#else /* def CYGFUN_KERNEL_API_C */
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Kernel C API layer disabled");
+}
+#endif /* def CYGFUN_KERNEL_API_C */
+
+// EOF kflag0.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/kflag1.c b/cesar/ecos/packages/kernel/current/tests/kflag1.c
new file mode 100644
index 0000000000..d09ddec1ba
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kflag1.c
@@ -0,0 +1,244 @@
+/*==========================================================================
+//
+// kflag1.cxx
+//
+// Kernel C API Flag test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author: dsm
+// Contributors: hmt
+// Date: 1998-10-19
+// Description: Tests basic flag functionality.
+//####DESCRIPTIONEND####
+*/
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#include "testaux.h"
+
+
+#define NTHREADS 3
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+static cyg_handle_t thread[NTHREADS];
+
+static cyg_thread thread_obj[NTHREADS];
+static char stack[NTHREADS][STACKSIZE];
+
+static cyg_flag_t f0, f1;
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+static cyg_flag_t f2;
+#endif
+
+static volatile cyg_ucount8 q = 0;
+#define FIRST_THREAD_WAIT_TIME 5
+#define SECOND_THREAD_WAIT_TIME 10
+#define THIRD_THREAD_WAIT_TIME 20
+
+static void entry0( cyg_addrword_t data )
+{
+ CYG_TEST_INFO("Testing cyg_flag_setbits() and cyg_flag_maskbits()");
+ CYG_TEST_CHECK(0==cyg_flag_peek( &f0 ), "flag not initialized properly");
+ cyg_flag_setbits( &f0, 0x1);
+ CYG_TEST_CHECK(1==cyg_flag_peek( &f0 ), "setbits");
+ cyg_flag_setbits( &f0, 0x3);
+ CYG_TEST_CHECK(3==cyg_flag_peek( &f0 ), "setbits");
+ cyg_flag_maskbits( &f0, ~0x5);
+ CYG_TEST_CHECK(2==cyg_flag_peek( &f0 ), "maskbits");
+ cyg_flag_setbits( &f0, ~0 );
+ CYG_TEST_CHECK(~0u==cyg_flag_peek( &f0 ), "setbits all set");
+ cyg_flag_maskbits( &f0, 0 );
+ CYG_TEST_CHECK(0==cyg_flag_peek( &f0 ), "maskbits all clear");
+ CYG_TEST_CHECK(0==q++, "bad synchronization");
+
+ CYG_TEST_INFO("Testing cyg_flag_wait()");
+ cyg_flag_setbits( &f1, 0x4);
+ CYG_TEST_CHECK(0x4==cyg_flag_peek( &f1 ), "setbits");
+ CYG_TEST_CHECK(1==q++, "bad synchronization");
+ cyg_flag_setbits( &f1, 0x18); // wake t1
+ cyg_flag_wait( &f1, 0x11, CYG_FLAG_WAITMODE_AND | CYG_FLAG_WAITMODE_CLR);
+ CYG_TEST_CHECK(0==cyg_flag_peek( &f1 ), "flag value wrong");
+ CYG_TEST_CHECK(3==q++, "bad synchronization");
+ cyg_flag_setbits( &f0, 0x2); // wake t1
+ cyg_flag_wait( &f1, 0x10, CYG_FLAG_WAITMODE_AND );
+ cyg_flag_setbits( &f0, 0x1); // wake t1
+
+ cyg_flag_wait( &f1, 0x11, CYG_FLAG_WAITMODE_AND | CYG_FLAG_WAITMODE_CLR);
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ cyg_flag_wait( &f2, 0x2, CYG_FLAG_WAITMODE_OR);
+ CYG_TEST_CHECK(20==q,"bad synchronization");
+ cyg_flag_timed_wait( &f2, 0x10, CYG_FLAG_WAITMODE_AND,
+ cyg_current_time()+THIRD_THREAD_WAIT_TIME);
+ CYG_TEST_CHECK(21==q++,"bad synchronization");
+#endif
+ cyg_flag_wait( &f0, 1, CYG_FLAG_WAITMODE_OR);
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+static void entry1( cyg_addrword_t data )
+{
+ cyg_flag_wait( &f1, 0xc, CYG_FLAG_WAITMODE_AND);
+ CYG_TEST_CHECK(2==q++, "bad synchronization");
+ CYG_TEST_CHECK(0x1c==cyg_flag_peek( &f1 ), "flag value wrong");
+ cyg_flag_setbits( &f1, 0x1); // wake t0
+ cyg_flag_wait( &f0, 0x3, CYG_FLAG_WAITMODE_OR);
+ CYG_TEST_CHECK(4==q++, "bad synchronization");
+ CYG_TEST_CHECK(2==cyg_flag_peek( &f0 ), "flag value wrong");
+
+ cyg_flag_setbits( &f1, 0xf0); // wake t0,t2
+ cyg_flag_wait( &f0, 0x5, CYG_FLAG_WAITMODE_AND | CYG_FLAG_WAITMODE_CLR);
+ CYG_TEST_CHECK(0==cyg_flag_peek( &f0 ), "flag value wrong");
+ CYG_TEST_CHECK(0xf0==cyg_flag_peek( &f1 ), "flag value wrong");
+ CYG_TEST_CHECK(5==q++, "bad synchronization");
+ cyg_flag_maskbits( &f1, 0 );
+ CYG_TEST_CHECK(0==cyg_flag_peek( &f1 ), "flag value wrong");
+
+ CYG_TEST_INFO("Testing cyg_flag_poll()");
+ cyg_flag_setbits( &f0, 0x55);
+ CYG_TEST_CHECK(0x55==cyg_flag_peek( &f0 ), "flag value wrong");
+ CYG_TEST_CHECK(0x55==cyg_flag_poll( &f0, 0x3, CYG_FLAG_WAITMODE_OR),"bad poll() return");
+ CYG_TEST_CHECK(0==cyg_flag_poll( &f0, 0xf, CYG_FLAG_WAITMODE_AND),"poll()");
+ CYG_TEST_CHECK(0==cyg_flag_poll( &f0, 0xa, CYG_FLAG_WAITMODE_OR),"poll()");
+ CYG_TEST_CHECK(0x55==cyg_flag_peek( &f0 ), "flag value wrong");
+ CYG_TEST_CHECK(0x55==cyg_flag_poll( &f0, 0xf, CYG_FLAG_WAITMODE_OR | CYG_FLAG_WAITMODE_CLR),"poll");
+ CYG_TEST_CHECK(0x0==cyg_flag_peek( &f0 ), "flag value wrong");
+ cyg_flag_setbits( &f0, 0x50);
+ CYG_TEST_CHECK(0x50==cyg_flag_poll( &f0, 0x10, CYG_FLAG_WAITMODE_AND | CYG_FLAG_WAITMODE_CLR),"poll");
+ CYG_TEST_CHECK(0x0==cyg_flag_peek( &f0 ), "flag value wrong");
+
+ CYG_TEST_INFO("Testing cyg_flag_waiting()");
+ cyg_flag_maskbits( &f0, 0 );
+ CYG_TEST_CHECK(!cyg_flag_waiting( &f0 ), "waiting()");
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ cyg_thread_delay( 10 ); // allow other threads to reach wait on f1
+ CYG_TEST_CHECK(cyg_flag_waiting( &f1 ), "waiting() not true");
+ cyg_flag_setbits( &f1, ~0 ); // wake one of t0,t2
+ CYG_TEST_CHECK(cyg_flag_waiting( &f1 ),"waiting() not true");
+#else
+ cyg_flag_setbits( &f1, 0x11); // wake one of t0,t2
+#endif
+ cyg_flag_setbits( &f1, 0x11); // wake other of t0,t2
+ CYG_TEST_CHECK(!cyg_flag_waiting( &f1 ),"waiting not false");
+ CYG_TEST_CHECK(0x0==cyg_flag_peek( &f1 ), "flag value wrong");
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ CYG_TEST_INFO("Testing cyg_flag_timed_wait()");
+ q=20;
+ cyg_flag_setbits( &f2, 0x2); // synchronize with t0,t2
+ CYG_TEST_CHECK(20==q,"bad synchronization");
+ cyg_flag_timed_wait( &f2, 0x20, CYG_FLAG_WAITMODE_AND,
+ cyg_current_time()+SECOND_THREAD_WAIT_TIME);
+ CYG_TEST_CHECK(22==q++,"bad synchronization");
+#endif
+
+ CYG_TEST_PASS_FINISH("Kernel C API Flag 1 OK");
+}
+
+static void entry2( cyg_addrword_t data )
+{
+ cyg_flag_wait( &f1, 0x60, CYG_FLAG_WAITMODE_OR);
+ cyg_flag_setbits( &f0, 0x4);
+
+ cyg_flag_wait( &f1, 0x11, CYG_FLAG_WAITMODE_AND | CYG_FLAG_WAITMODE_CLR);
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ cyg_flag_wait( &f2, 0x2, CYG_FLAG_WAITMODE_OR);
+ CYG_TEST_CHECK(20==q,"bad synchronization");
+ CYG_TEST_CHECK(0==cyg_flag_timed_wait( &f2, 0x40, CYG_FLAG_WAITMODE_AND,
+ cyg_current_time()+FIRST_THREAD_WAIT_TIME),
+ "timed wait() wrong");
+ CYG_TEST_CHECK(20==q++,"bad synchronization");
+ // Now wake t0 before it times out
+ cyg_flag_setbits( &f2, 0x10);
+#endif
+ cyg_flag_wait( &f0, 1, CYG_FLAG_WAITMODE_OR);
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+void kflag1_main( void )
+{
+ CYG_TEST_INIT();
+
+ cyg_flag_init( &f0 );
+ cyg_flag_init( &f1 );
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ cyg_flag_init( &f2 );
+#endif
+
+ cyg_thread_create( 1, entry0 , (cyg_addrword_t)0, "kflag1-0",
+ (void *)stack[0], STACKSIZE, &thread[0], &thread_obj[0]);
+ cyg_thread_resume(thread[0]);
+
+ cyg_thread_create( 1, entry1 , (cyg_addrword_t)1, "kflag1-1",
+ (void *)stack[1], STACKSIZE, &thread[1], &thread_obj[1]);
+ cyg_thread_resume(thread[1]);
+
+ cyg_thread_create( 1, entry2 , (cyg_addrword_t)2, "kflag1-2",
+ (void *)stack[2], STACKSIZE, &thread[2], &thread_obj[2]);
+ cyg_thread_resume(thread[2]);
+
+ cyg_scheduler_start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+ kflag1_main();
+}
+
+#else /* def CYGFUN_KERNEL_API_C */
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Kernel C API layer disabled");
+}
+#endif /* def CYGFUN_KERNEL_API_C */
+
+// EOF flag1.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/kill.cxx b/cesar/ecos/packages/kernel/current/tests/kill.cxx
new file mode 100644
index 0000000000..032403b82e
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kill.cxx
@@ -0,0 +1,199 @@
+//==========================================================================
+//
+// kill.cxx
+//
+// Thread kill test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1998-04-24
+// Description: Tests the functionality of thread kill() and
+// reinitalize().
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/mutex.hxx>
+#include <cyg/kernel/sema.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+
+#include <cyg/kernel/sched.inl>
+
+#define NTHREADS 3
+
+#include "testaux.hxx"
+
+// In general, this delay has to be long enough to account for slow targets
+// and potential problems on e.g. the linux synthetic target to avoid
+// potential problems due to timing inaccuracy and scheduling of Linux
+// tasks. It is decreased further below for simulators.
+int delay_ticks = 5;
+
+
+static Cyg_Binary_Semaphore s0, s1;
+
+volatile cyg_atomic thread0_state;
+volatile cyg_atomic thread1_state;
+volatile cyg_atomic thread2_state;
+
+static void entry0( CYG_ADDRWORD data )
+{
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ thread0_state = 1;
+
+ s0.wait();
+
+ thread0_state = 2;
+
+ CYG_TEST_FAIL_FINISH("Thread not killed");
+
+ self->exit();
+}
+
+
+static void entry1( CYG_ADDRWORD data )
+{
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ thread1_state = 1;
+
+ self->delay(delay_ticks);
+
+ if( thread2_state != 1 )
+ CYG_TEST_FAIL_FINISH("Thread2 in wrong state");
+
+ thread1_state = 2;
+
+ thread[0]->kill();
+
+ thread1_state = 3;
+
+ thread[2]->kill();
+
+ thread1_state = 4;
+
+ self->delay(delay_ticks);
+
+ thread1_state = 5;
+ thread2_state = 0;
+
+ thread[2]->reinitialize();
+ thread[2]->resume();
+
+ self->delay(delay_ticks);
+
+ if( thread2_state != 1 )
+ CYG_TEST_FAIL_FINISH("Thread2 in wrong state");
+
+ thread1_state = 6;
+
+ self->delay(delay_ticks);
+
+ if( thread2_state != 2 )
+ CYG_TEST_FAIL_FINISH("Thread2 in wrong state");
+
+ thread[2]->kill();
+
+ thread1_state = 7;
+
+ CYG_TEST_PASS_FINISH("Kill OK");
+
+ Cyg_Thread::self()->exit();
+}
+
+static void entry2( CYG_ADDRWORD data )
+{
+ thread2_state = 1;
+
+ while( thread1_state != 6 ) continue;
+
+ thread2_state = 2;
+
+ for(;;) continue;
+
+}
+
+void release_main(void)
+{
+ CYG_TEST_INIT();
+
+ if (cyg_test_is_simulator)
+ delay_ticks = 2;
+
+ new_thread( entry0, 0);
+ new_thread( entry1, 1);
+ new_thread( entry2, 2);
+
+ thread[0]->set_priority(5);
+ thread[1]->set_priority(6);
+ thread[2]->set_priority(7);
+
+ Cyg_Scheduler::start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ release_main();
+}
+
+#else // ifdef CYGFUN_KERNEL_THREADS_TIMER
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Kernel threads timer disabled");
+}
+
+#endif // ifdef CYGFUN_KERNEL_THREADS_TIMER
+
+// EOF kill.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/kintr0.c b/cesar/ecos/packages/kernel/current/tests/kintr0.c
new file mode 100644
index 0000000000..6bc53f672b
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kintr0.c
@@ -0,0 +1,230 @@
+/*=================================================================
+//
+// kintr0.c
+//
+// Kernel C API Intr test 0
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm, jlarmour
+// Date: 1999-02-16
+// Description: Very basic test of interrupt objects
+// Options:
+// CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE
+// CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE_MAX
+// CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST
+//####DESCRIPTIONEND####
+*/
+
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_intr.h>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#include "testaux.h"
+
+static cyg_interrupt intr_obj[2];
+
+static cyg_handle_t intr0, intr1;
+
+
+static cyg_ISR_t isr0, isr1;
+static cyg_DSR_t dsr0, dsr1;
+
+static cyg_uint32 isr0(cyg_vector_t vector, cyg_addrword_t data)
+{
+ CYG_UNUSED_PARAM(cyg_addrword_t, data);
+
+ cyg_interrupt_acknowledge(vector);
+ return 0;
+}
+
+static void dsr0(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data)
+{
+ CYG_UNUSED_PARAM(cyg_vector_t, vector);
+ CYG_UNUSED_PARAM(cyg_ucount32, count);
+ CYG_UNUSED_PARAM(cyg_addrword_t, data);
+}
+
+static cyg_uint32 isr1(cyg_vector_t vector, cyg_addrword_t data)
+{
+ CYG_UNUSED_PARAM(cyg_vector_t, vector);
+ CYG_UNUSED_PARAM(cyg_addrword_t, data);
+ return 0;
+}
+
+static void dsr1(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data)
+{
+ CYG_UNUSED_PARAM(cyg_vector_t, vector);
+ CYG_UNUSED_PARAM(cyg_ucount32, count);
+ CYG_UNUSED_PARAM(cyg_addrword_t, data);
+}
+
+static bool flash( void )
+{
+ cyg_handle_t handle;
+ cyg_interrupt intr;
+
+ cyg_interrupt_create(CYGNUM_HAL_ISR_MIN, 0, (cyg_addrword_t)333,
+ isr0, dsr0, &handle, &intr );
+ cyg_interrupt_delete(handle);
+
+ return true;
+}
+
+/* IMPORTANT: The calling convention for VSRs is target dependent. It is
+ * unlikely that a plain C or C++ routine would function correctly on any
+ * particular platform, even if it could correctly access the system
+ * resources necessary to handle the event that caused it to be called.
+ * VSRs usually must be written in assembly language.
+ *
+ * This is just a test program. The routine vsr0() below is defined simply
+ * to define an address that will be in executable memory. If an event
+ * causes this VSR to be called, all bets are off. If it is accidentally
+ * installed in the vector for the realtime clock, the system will likely
+ * freeze.
+ */
+
+static cyg_VSR_t vsr0;
+
+static void vsr0()
+{
+}
+
+void kintr0_main( void )
+{
+ cyg_vector_t v = (CYGNUM_HAL_VSR_MIN + 11) % CYGNUM_HAL_VSR_COUNT;
+ cyg_vector_t v1;
+ cyg_vector_t lvl1 = CYGNUM_HAL_ISR_MIN + (1 % CYGNUM_HAL_ISR_COUNT);
+ cyg_vector_t lvl2 = CYGNUM_HAL_ISR_MIN + (15 % CYGNUM_HAL_ISR_COUNT);
+ int in_use;
+
+ cyg_VSR_t *old_vsr, *new_vsr;
+
+ CYG_TEST_INIT();
+
+#ifdef CYGPKG_HAL_MIPS_TX39
+ // This can be removed when PR 17831 is fixed
+ if ( cyg_test_is_simulator )
+ v1 = 12 % CYGNUM_HAL_ISR_COUNT;
+ else /* NOTE TRAILING ELSE... */
+#endif
+ v1 = CYGNUM_HAL_ISR_MIN + ( 6 % CYGNUM_HAL_ISR_COUNT);
+
+ CHECK(flash());
+ CHECK(flash());
+
+ // Make sure the chosen levels are not already in use.
+ HAL_INTERRUPT_IN_USE( lvl1, in_use );
+ intr0 = 0;
+ if (!in_use)
+ cyg_interrupt_create(lvl1, 1, (cyg_addrword_t)777, isr0, dsr0,
+ &intr0, &intr_obj[0]);
+
+ HAL_INTERRUPT_IN_USE( lvl2, in_use );
+ intr1 = 0;
+ if (!in_use && lvl1 != lvl2)
+ cyg_interrupt_create(lvl2, 1, 888, isr1, dsr1, &intr1, &intr_obj[1]);
+
+ // Check these functions at least exist
+
+ cyg_interrupt_disable();
+ cyg_interrupt_enable();
+
+ if (intr0)
+ cyg_interrupt_attach(intr0);
+ if (intr1)
+ cyg_interrupt_attach(intr1);
+ if (intr0)
+ cyg_interrupt_detach(intr0);
+ if (intr1)
+ cyg_interrupt_detach(intr1);
+
+ // If this attaching interrupt replaces the previous interrupt
+ // instead of adding to it we could be in a big mess if the
+ // vector is being used by something important.
+
+ cyg_interrupt_get_vsr( v, &old_vsr );
+ cyg_interrupt_set_vsr( v, vsr0 );
+ cyg_interrupt_get_vsr( v, &new_vsr );
+ CHECK( vsr0 == new_vsr );
+
+ new_vsr = NULL;
+ cyg_interrupt_get_vsr( v, &new_vsr );
+ cyg_interrupt_set_vsr( v, old_vsr );
+ CHECK( new_vsr == vsr0 );
+
+ cyg_interrupt_set_vsr( v, new_vsr );
+ new_vsr = NULL;
+ cyg_interrupt_get_vsr( v, &new_vsr );
+ CHECK( vsr0 == new_vsr );
+
+ cyg_interrupt_set_vsr( v, old_vsr );
+ CHECK( vsr0 == new_vsr );
+ new_vsr = NULL;
+ cyg_interrupt_get_vsr( v, &new_vsr );
+ CHECK( old_vsr == new_vsr );
+
+ CHECK( NULL != vsr0 );
+
+ cyg_interrupt_mask(v1);
+ cyg_interrupt_unmask(v1);
+
+ cyg_interrupt_configure(v1, true, true);
+
+ CYG_TEST_PASS_FINISH("Kernel C API Intr 0 OK");
+}
+
+externC void
+cyg_start( void )
+{
+ kintr0_main();
+}
+
+#else /* def CYGFUN_KERNEL_API_C */
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Kernel C API layer disabled");
+}
+#endif /* def CYGFUN_KERNEL_API_C */
+
+/* EOF kintr0.c */
diff --git a/cesar/ecos/packages/kernel/current/tests/klock.c b/cesar/ecos/packages/kernel/current/tests/klock.c
new file mode 100644
index 0000000000..fefc3cab11
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/klock.c
@@ -0,0 +1,318 @@
+/*=================================================================
+//
+// klock.c
+//
+// Kernel lock test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-03-18
+// Description: Tests some basic thread functions.
+//####DESCRIPTIONEND####
+*/
+//==========================================================================
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+//==========================================================================
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#if (CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES == 0)
+
+//==========================================================================
+
+#include "testaux.h"
+
+#include <cyg/hal/hal_arch.h> // for CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+//==========================================================================
+
+#ifdef CYGNUM_HAL_STACK_SIZE_TYPICAL
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+#else
+#define STACKSIZE 2000
+#endif
+
+//==========================================================================
+
+static char stack[2][STACKSIZE];
+
+static cyg_thread thread[2];
+
+static cyg_handle_t pt0,pt1;
+
+static cyg_mutex_t mx;
+static cyg_cond_t cv;
+static cyg_sem_t sem;
+static cyg_flag_t fl;
+static cyg_mbox mbox;
+static cyg_handle_t mbh;
+
+volatile static int thread0_state = 0;
+volatile static int thread1_state = 0;
+
+//==========================================================================
+
+static void entry0( cyg_addrword_t data )
+{
+ CHECK( 222 == (int)data );
+
+ // Do everything with the scheduler locked.
+ cyg_scheduler_lock();
+
+ // --------------------------------------------------
+ // Mutex test
+
+ cyg_mutex_lock( &mx );
+ thread0_state = 1;
+
+ // Get thread 2 running.
+ cyg_thread_resume(pt1);
+ thread0_state = 2;
+
+#ifdef CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT
+ cyg_cond_wait( &cv );
+ thread0_state = 3;
+
+ while( thread1_state < 2 ) cyg_thread_yield();
+
+ cyg_cond_broadcast( &cv );
+ thread0_state = 4;
+#endif
+
+ cyg_mutex_unlock( &mx );
+ thread0_state = 5;
+
+
+ // --------------------------------------------------
+ // Semaphore test
+
+ cyg_semaphore_wait( &sem );
+ thread0_state = 6;
+
+ cyg_semaphore_post( &sem );
+ thread0_state = 7;
+
+ while( thread1_state < 7 ) cyg_thread_yield();
+
+ // --------------------------------------------------
+ // Flags test
+
+ cyg_flag_wait( &fl, 1, CYG_FLAG_WAITMODE_OR|CYG_FLAG_WAITMODE_CLR);
+ thread0_state = 8;
+
+ cyg_flag_setbits( &fl, 2 );
+ thread0_state = 9;
+
+ // --------------------------------------------------
+ // Message box test
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ {
+ void *mbret;
+
+ mbret = cyg_mbox_get( mbh );
+ CYG_TEST_CHECK( mbret == (void *)0xAAAAAAAA , "bad result from cyg_mbox_timed_get()");
+ thread0_state = 10;
+
+ cyg_mbox_put( mbh, (void *)0xBBBBBBBB );
+ thread0_state = 11;
+ }
+#endif
+ // --------------------------------------------------
+
+ thread0_state = 999;
+
+ cyg_thread_yield();
+ cyg_thread_yield();
+ cyg_thread_yield();
+
+ CYG_TEST_CHECK( thread0_state == 999, "thread 0 not in exit state");
+ CYG_TEST_CHECK( thread1_state == 999, "thread 1 not in exit state");
+ CYG_TEST_PASS_FINISH("Kernel lock test OK");
+}
+
+//==========================================================================
+
+static void entry1( cyg_addrword_t data )
+{
+ cyg_bool res;
+
+ CHECK( 333 == (int)data );
+
+ // Do everything with the scheduler locked.
+ cyg_scheduler_lock();
+
+ // --------------------------------------------------
+ // Mutex test
+#ifdef CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT
+ cyg_mutex_lock( &mx );
+ thread1_state = 1;
+
+ while( thread0_state < 2 ) cyg_thread_yield();
+
+ cyg_cond_signal( &cv );
+ thread1_state = 2;
+
+ res = cyg_cond_timed_wait( &cv, cyg_current_time()+10 );
+ CYG_TEST_CHECK( res , "FALSE result from cyg_cond_timed_wait()" );
+ thread1_state = 3;
+
+ cyg_mutex_unlock( &mx );
+ thread1_state = 4;
+#endif
+
+ // --------------------------------------------------
+ // Semaphore test
+
+ while( thread0_state < 5 ) cyg_thread_yield();
+
+ cyg_semaphore_post( &sem );
+ thread1_state = 5;
+
+ while( thread0_state < 6 ) cyg_thread_yield();
+ thread1_state = 6;
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ res = cyg_semaphore_timed_wait( &sem, cyg_current_time()+10 );
+#else
+ res = cyg_semaphore_wait( &sem );
+#endif
+ CYG_TEST_CHECK( res , "FALSE result from cyg_semaphore[_timed]_wait()" );
+ thread1_state = 7;
+
+ // --------------------------------------------------
+ // Flags test
+
+ cyg_flag_setbits( &fl, 1 );
+ thread1_state = 8;
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ cyg_flag_timed_wait( &fl, 2, CYG_FLAG_WAITMODE_OR|CYG_FLAG_WAITMODE_CLR,
+ cyg_current_time()+10 );
+#else
+ cyg_flag_wait( &fl, 2, CYG_FLAG_WAITMODE_OR|CYG_FLAG_WAITMODE_CLR );
+#endif
+ thread1_state = 9;
+
+ // --------------------------------------------------
+ // Message box test
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ {
+ void *mbret;
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ cyg_mbox_timed_put( mbh, (void *)0xAAAAAAAA, cyg_current_time()+10 );
+#else
+ cyg_mbox_put( mbh, (void *)0xAAAAAAAA );
+#endif
+ thread1_state = 10;
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ mbret = cyg_mbox_timed_get( mbh, cyg_current_time()+10);
+#else
+ mbret = cyg_mbox_get( mbh );
+#endif
+ CYG_TEST_CHECK( mbret == (void *)0xBBBBBBBB , "bad result from cyg_mbox[_timed]_get()");
+ thread1_state = 9;
+ }
+#endif
+ // --------------------------------------------------
+
+ thread1_state = 999;
+ cyg_thread_exit();
+}
+
+//==========================================================================
+
+void kthread1_main( void )
+{
+ CYG_TEST_INIT();
+
+ cyg_thread_create(4, entry0, (cyg_addrword_t)222, "kthread1-0",
+ (void *)stack[0], STACKSIZE, &pt0, &thread[0] );
+ cyg_thread_create(4, entry1, (cyg_addrword_t)333, "kthread1-1",
+ (void *)stack[1], STACKSIZE, &pt1, &thread[1] );
+
+ // Init all the objects
+
+ cyg_mutex_init( &mx );
+ cyg_cond_init( &cv, &mx );
+ cyg_semaphore_init( &sem, 0 );
+ cyg_flag_init( &fl );
+ cyg_mbox_create( &mbh, &mbox );
+
+ cyg_thread_resume(pt0);
+
+ cyg_scheduler_start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+//==========================================================================
+
+externC void
+cyg_start( void )
+{
+ kthread1_main();
+}
+
+//==========================================================================
+
+#else /* CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES == 0 */
+# define NA_MSG "Schedule has unique priorities"
+#endif
+
+#else /* def CYGFUN_KERNEL_API_C */
+# define NA_MSG "Kernel C API layer disabled"
+#endif
+
+#ifdef NA_MSG
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA(NA_MSG);
+}
+#endif
+
+//==========================================================================
+/* EOF klock.c */
diff --git a/cesar/ecos/packages/kernel/current/tests/kmbox1.c b/cesar/ecos/packages/kernel/current/tests/kmbox1.c
new file mode 100644
index 0000000000..8b0983731a
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kmbox1.c
@@ -0,0 +1,217 @@
+/*==========================================================================
+//
+// kmbox1.cxx
+//
+// Kernel Mbox test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author: dsm
+// Contributors: dsm
+// Date: 1998-06-02
+// Description: Tests basic mbox functionality.
+//####DESCRIPTIONEND####
+*/
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#include "testaux.h"
+
+#define NTHREADS 2
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+static cyg_handle_t thread[NTHREADS];
+
+static cyg_thread thread_obj[NTHREADS];
+static char stack[NTHREADS][STACKSIZE];
+
+static cyg_handle_t m0, m1, m2;
+static cyg_mbox mbox0, mbox1, mbox2;
+
+static cyg_atomic q = 0;
+
+#ifndef CYGMTH_MBOX_PUT_CAN_WAIT
+#define cyg_mbox_PUT cyg_mbox_tryput
+#endif
+
+static void entry0( cyg_addrword_t data )
+{
+ cyg_count8 u,i,j;
+
+ CYG_TEST_INFO("Testing put() and tryput() without wakeup");
+ CYG_TEST_CHECK(!cyg_mbox_waiting_to_get(m0), "mbox not initialized properly");
+ CYG_TEST_CHECK(0==cyg_mbox_peek(m0), "mbox not initialized properly");
+ CYG_TEST_CHECK(NULL==cyg_mbox_peek_item(m0), "mbox not initialized properly");
+ cyg_mbox_PUT(m0, (void *)55);
+ CYG_TEST_CHECK(1==cyg_mbox_peek(m0), "peek() wrong");
+ CYG_TEST_CHECK(55==(cyg_count8)cyg_mbox_peek_item(m0), "peek_item() wrong");
+ for(u=1; cyg_mbox_tryput(m0, (void*)u); u++) {
+ CYG_TEST_CHECK(55==(cyg_count8)cyg_mbox_peek_item(m0), "peek_item() wrong");
+ CYG_TEST_CHECK(u+1==cyg_mbox_peek(m0), "peek() wrong");
+ }
+ CYG_TEST_CHECK(u == CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE, "mbox not configured size");
+
+ // m0 now contains ( 55 1 2 .. u-1 )
+ CYG_TEST_CHECK(u==cyg_mbox_peek(m0), "peek() wrong");
+ CYG_TEST_CHECK(55==(cyg_count8)cyg_mbox_peek_item(m0), "peek_item() wrong");
+
+ CYG_TEST_INFO("Testing get(), tryget()");
+
+ i = (cyg_count8)cyg_mbox_tryget(m0);
+ CYG_TEST_CHECK( 55 == i, "Got wrong message" );
+ for(j=1; j<u;j++) {
+ CYG_TEST_CHECK( j == (cyg_count8)cyg_mbox_peek_item(m0), "peek_item()" );
+ CYG_TEST_CHECK( cyg_mbox_peek(m0) == u - j, "peek() wrong" );
+ i = (cyg_count8)cyg_mbox_get(m0);
+ CYG_TEST_CHECK( j == i, "Got wrong message" );
+ }
+
+ CYG_TEST_CHECK( NULL == cyg_mbox_peek_item(m0), "peek_item()" );
+ CYG_TEST_CHECK( 0 == cyg_mbox_peek(m0), "peek()");
+
+ // m0 now empty
+
+ CYG_TEST_CHECK(!cyg_mbox_waiting_to_put(m0), "waiting_to_put()");
+ CYG_TEST_CHECK(!cyg_mbox_waiting_to_get(m0), "waiting_to_get()");
+
+ CYG_TEST_INFO("Testing get(), blocking");
+
+ CYG_TEST_CHECK(0==q++, "bad synchronization");
+ cyg_mbox_PUT(m1, (void*)99); // wakes t1
+ i = (cyg_count8)cyg_mbox_get(m0); // sent by t1
+ CYG_TEST_CHECK(3==i, "Recieved wrong message");
+ CYG_TEST_CHECK(2==q++, "bad synchronization");
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ CYG_TEST_CHECK(NULL==cyg_mbox_timed_get(m0, cyg_current_time()+10),
+ "unexpectedly found message");
+ CYG_TEST_CHECK(3==q++, "bad synchronization");
+ // Allow t1 to run as this get times out
+ // t1 must not be waiting...
+ CYG_TEST_CHECK(cyg_mbox_waiting_to_get(m0), "waiting_to_get()");
+
+ cyg_mbox_PUT(m0, (void*)7); // wake t1 from timed get
+#ifdef CYGMTH_MBOX_PUT_CAN_WAIT
+ q=10;
+ while(cyg_mbox_tryput(m0, (void*)6)) // fill m0's queue
+ ;
+ // m0 now contains ( 6 ... 6 )
+ CYG_TEST_CHECK(10==q++, "bad synchronization");
+ cyg_mbox_put(m1, (void*)4); // wake t1
+ CYG_TEST_CHECK(!cyg_mbox_timed_put(m0, (void*)8, cyg_current_time()+10),
+ "timed put() unexpectedly worked");
+ CYG_TEST_CHECK(12==q++, "bad synchronization");
+ // m0 still contains ( 6 ... 6 )
+ cyg_mbox_put(m0, (void*)9);
+ CYG_TEST_CHECK(13==q++, "bad synchronization");
+#endif
+#endif
+ i=(cyg_count8)cyg_mbox_get(m2);
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+static void entry1( cyg_addrword_t data )
+{
+ cyg_count8 i;
+ i = (cyg_count8)cyg_mbox_get(m1);
+ CYG_TEST_CHECK(1==q++, "bad synchronization");
+ cyg_mbox_PUT(m0, (void *)3); // wake t0
+
+#if defined(CYGFUN_KERNEL_THREADS_TIMER)
+ CYG_TEST_INFO("Testing timed functions");
+ CYG_TEST_CHECK(7==(cyg_count8)cyg_mbox_timed_get(m0,cyg_current_time()+20),
+ "timed get()");
+ CYG_TEST_CHECK(4==q++, "bad synchronization");
+#ifdef CYGMTH_MBOX_PUT_CAN_WAIT
+ CYG_TEST_CHECK(4==(cyg_count8)cyg_mbox_get(m1));
+
+ CYG_TEST_CHECK(11==q++, "bad synchronization");
+ thread[0]->delay(20); // allow t0 to reach put on m1
+ CYG_TEST_CHECK(14==q++, "bad synchronization");
+ CYG_TEST_CHECK(cyg_mbox_waiting_to_put(m0), "waiting_to_put()");
+ do {
+ // after first get m0 contains ( 6 .. 6 9 )
+ i=(cyg_count8)cyg_mbox_tryget(m0);
+ } while(6==i);
+ CYG_TEST_CHECK(9==i,"put gone awry");
+#endif
+#endif
+ CYG_TEST_PASS_FINISH("Kernel C API Mbox 1 OK");
+}
+
+void kmbox1_main( void )
+{
+ CYG_TEST_INIT();
+
+ cyg_thread_create(4, entry0 , (cyg_addrword_t)0, "kmbox1-0",
+ (void *)stack[0], STACKSIZE, &thread[0], &thread_obj[0]);
+ cyg_thread_resume(thread[0]);
+
+ cyg_thread_create(4, entry1 , (cyg_addrword_t)1, "kmbox1-1",
+ (void *)stack[1], STACKSIZE, &thread[1], &thread_obj[1]);
+ cyg_thread_resume(thread[1]);
+
+ cyg_mbox_create( &m0, &mbox0 );
+ cyg_mbox_create( &m1, &mbox1 );
+ cyg_mbox_create( &m2, &mbox2 );
+
+ cyg_scheduler_start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+ kmbox1_main();
+}
+#else /* def CYGFUN_KERNEL_API_C */
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Kernel C API layer disabled");
+}
+#endif /* def CYGFUN_KERNEL_API_C */
+
+/* EOF kmbox1.c */
diff --git a/cesar/ecos/packages/kernel/current/tests/kmutex0.c b/cesar/ecos/packages/kernel/current/tests/kmutex0.c
new file mode 100644
index 0000000000..465dfb811e
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kmutex0.c
@@ -0,0 +1,98 @@
+/*=================================================================
+//
+// kmutex0.c
+//
+// Kernel C API Mutex and condition variable test 0
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-03-23
+// Description: Limited to checking constructors/destructors
+//####DESCRIPTIONEND####
+*/
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#include "testaux.h"
+
+static cyg_mutex_t mutex0;
+
+static cyg_cond_t cvar0;
+
+static bool flash( void )
+{
+ cyg_mutex_init( &mutex0 );
+ cyg_cond_init( &cvar0, &mutex0 );
+
+ cyg_cond_destroy( &cvar0 );
+ cyg_mutex_destroy( &mutex0 );
+
+ return true;
+}
+
+void kmutex0_main( void )
+{
+ CYG_TEST_INIT();
+
+ CHECK(flash());
+ CHECK(flash());
+
+ CYG_TEST_PASS_FINISH("Kernel C API Mutex 0 OK");
+}
+
+externC void
+cyg_start( void )
+{
+ kmutex0_main();
+}
+
+#else /* def CYGFUN_KERNEL_API_C */
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Kernel C API layer disabled");
+}
+#endif /* def CYGFUN_KERNEL_API_C */
+
+/* EOF kmutex0.c */
diff --git a/cesar/ecos/packages/kernel/current/tests/kmutex1.c b/cesar/ecos/packages/kernel/current/tests/kmutex1.c
new file mode 100644
index 0000000000..dda80d0219
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kmutex1.c
@@ -0,0 +1,188 @@
+/*=================================================================
+//
+// kmutex1.c
+//
+// Kernel C API Mutex test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-03-23
+// Description: Tests basic mutex functionality.
+// Omissions: Timed wait.
+//####DESCRIPTIONEND####
+*/
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#include "testaux.h"
+
+#define NTHREADS 3
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+static cyg_handle_t thread[NTHREADS];
+
+static cyg_thread thread_obj[NTHREADS];
+static char stack[NTHREADS][STACKSIZE];
+
+
+static cyg_mutex_t m0, m1;
+static cyg_cond_t cvar0, cvar1, cvar2;
+
+static cyg_ucount8 m0d=0, m1d=0;
+
+static void finish( cyg_ucount8 t )
+{
+ cyg_mutex_lock( &m1 ); {
+ m1d |= 1<<t;
+ if( 0x7 == m1d )
+ CYG_TEST_PASS_FINISH("Kernel C API Mutex 1 OK");
+ cyg_cond_wait( &cvar2 );
+ } /* cyg_mutex_unlock( &m1 ); */
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+static void entry0( cyg_addrword_t data )
+{
+ cyg_mutex_lock( &m0 ); {
+ CHECK( ! cyg_mutex_trylock( &m0 ) );
+ cyg_mutex_lock( &m1 ); {
+ CHECK( ! cyg_mutex_trylock( &m0 ) );
+ } cyg_mutex_unlock( &m1 );
+ } cyg_mutex_unlock( &m0 );
+
+ cyg_mutex_lock( &m0 ); {
+ while ( 0 == m0d )
+ cyg_cond_wait( &cvar0 );
+ CHECK( 1 == m0d++ );
+ cyg_cond_signal( &cvar0 );
+ while ( 4 != m0d )
+ cyg_cond_wait( &cvar1 );
+ CHECK( 4 == m0d );
+ } cyg_mutex_unlock( &m0 );
+
+ finish( (cyg_ucount8)data );
+}
+
+static void entry1( cyg_addrword_t data )
+{
+ cyg_mutex_lock( &m0 ); {
+ CHECK( cyg_mutex_trylock( &m1 ) ); {
+ } cyg_mutex_unlock( &m1 );
+ } cyg_mutex_unlock( &m0 );
+
+ cyg_mutex_lock( &m0 ); {
+ CHECK( 0 == m0d++ );
+ cyg_cond_broadcast( &cvar0 );
+ } cyg_mutex_unlock( &m0 );
+
+ cyg_mutex_lock( &m0 ); {
+ while( 1 == m0d )
+ cyg_cond_wait( &cvar0 );
+ CHECK( 2 == m0d++ );
+ cyg_cond_signal( &cvar0 );
+ while( 3 == m0d )
+ cyg_cond_wait( &cvar1 );
+ } cyg_mutex_unlock( &m0 );
+
+ finish( (cyg_ucount8)data );
+}
+
+static void entry2( cyg_addrword_t data )
+{
+ cyg_mutex_lock( &m0 ); {
+ while( 3 != m0d ) {
+ cyg_cond_wait( &cvar0 );
+ }
+ CHECK( 3 == m0d++ );
+ cyg_cond_broadcast( &cvar1 );
+ } cyg_mutex_unlock( &m0 );
+
+ finish( (cyg_ucount8)data );
+}
+
+void kmutex1_main( void )
+{
+ CYG_TEST_INIT();
+
+ cyg_thread_create(4, entry0 , (cyg_addrword_t)0, "kmutex1-0",
+ (void *)stack[0], STACKSIZE, &thread[0], &thread_obj[0]);
+ cyg_thread_resume(thread[0]);
+
+ cyg_thread_create(4, entry1 , (cyg_addrword_t)1, "kmutex1-1",
+ (void *)stack[1], STACKSIZE, &thread[1], &thread_obj[1]);
+ cyg_thread_resume(thread[1]);
+
+ cyg_thread_create(4, entry2 , (cyg_addrword_t)2, "kmutex1-2",
+ (void *)stack[2], STACKSIZE, &thread[2], &thread_obj[2]);
+ cyg_thread_resume(thread[2]);
+
+ cyg_mutex_init( &m0 );
+ cyg_mutex_init( &m1 );
+
+ cyg_cond_init( &cvar0, &m0 );
+ cyg_cond_init( &cvar1, &m0 );
+ cyg_cond_init( &cvar2, &m1 );
+
+ cyg_scheduler_start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+ kmutex1_main();
+}
+
+#else /* def CYGFUN_KERNEL_API_C */
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Kernel C API layer disabled");
+}
+#endif /* def CYGFUN_KERNEL_API_C */
+
+/* EOF kmutex1.c */
diff --git a/cesar/ecos/packages/kernel/current/tests/kmutex3.c b/cesar/ecos/packages/kernel/current/tests/kmutex3.c
new file mode 100644
index 0000000000..5dba368b81
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kmutex3.c
@@ -0,0 +1,639 @@
+//==========================================================================
+//
+// kmutex3.c
+//
+// Mutex test 3 - priority inheritance
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 2000-01-06, 2001-08-10
+// Description: Tests mutex priority inheritance. This is simply a
+// translation of the similarly named kernel test to the
+// KAPI, with the intention of also testing the new
+// "set the protocol at run-time" extensions.
+//####DESCRIPTIONEND####
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+#include <cyg/infra/diag.h> // diag_printf
+
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+externC void
+cyg_hal_invoke_constructors();
+#endif
+
+// ------------------------------------------------------------------------
+//
+// These checks should be enough; any other scheduler which has priorities
+// should manifest as having no priority inheritance, but otherwise fine,
+// so the test should work correctly.
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK) && \
+ (CYGNUM_KERNEL_SCHED_PRIORITIES > 20) && \
+ defined(CYGFUN_KERNEL_API_C) && \
+ !defined(CYGPKG_KERNEL_SMP_SUPPORT)
+
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/cyg_trac.h>
+#include <cyg/infra/diag.h> // diag_printf
+
+
+// ------------------------------------------------------------------------
+// manufacture a simpler feature test macro for priority inheritance than
+// the configuration gives us. We have priority inheritance if it is configured
+// as the only protocol, or if it is the default protocol for dynamic protocol
+// choice.
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT
+# ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+# ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_INHERIT
+# define PRIORITY_INHERITANCE "dynamic-default-inherit"
+# endif
+# else
+# define PRIORITY_INHERITANCE "static-inherit"
+# endif
+#endif
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+# ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+# ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_CEILING
+# if CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_PRIORITY <= 5
+# define PRIORITY_INHERITANCE "dynamic-default-ceiling-high"
+# elif CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_PRIORITY >= 15
+# define NO_PRIORITY_INHERITANCE "dynamic-default-ceiling-low"
+# else
+# define PRIORITY_UNKNOWN "dynamic-default-ceiling-mid"
+# endif
+# endif
+# else
+# if CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_PRIORITY <= 5
+# define PRIORITY_INHERITANCE "static-ceiling-high"
+# elif CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_PRIORITY >= 15
+# define NO_PRIORITY_INHERITANCE "static-ceiling-low"
+# else
+# define PRIORITY_UNKNOWN "static-ceiling-mid"
+# endif
+# endif
+#endif
+
+#ifndef PRIORITY_INHERITANCE
+# ifndef NO_PRIORITY_INHERITANCE
+# define NO_PRIORITY_INHERITANCE "no scheme selected"
+# endif
+#endif
+
+// ------------------------------------------------------------------------
+// Management functions
+//
+// Stolen from testaux.hxx and copied in here because I want to be able to
+// reset the world also.
+//
+// Translated into KAPI also.
+
+#define NTHREADS 7
+
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+static cyg_handle_t thread[NTHREADS] = { 0 };
+
+typedef cyg_uint64 CYG_ALIGNMENT_TYPE;
+
+static cyg_thread thread_obj[NTHREADS];
+
+static CYG_ALIGNMENT_TYPE stack[NTHREADS] [
+ (STACKSIZE+sizeof(CYG_ALIGNMENT_TYPE)-1)
+ / sizeof(CYG_ALIGNMENT_TYPE) ];
+
+static volatile int nthreads = 0;
+
+#undef NULL
+#define NULL (0)
+
+static cyg_handle_t new_thread( cyg_thread_entry_t *entry,
+ cyg_addrword_t data,
+ cyg_addrword_t priority,
+ int do_resume )
+{
+ int _nthreads = nthreads++;
+
+ CYG_ASSERT(_nthreads < NTHREADS,
+ "Attempt to create more than NTHREADS threads");
+
+ cyg_thread_create( priority,
+ entry,
+ data,
+ NULL, // no name
+ (void *)(stack[_nthreads]),
+ STACKSIZE,
+ &thread[_nthreads],
+ &thread_obj[_nthreads] );
+
+ if ( do_resume )
+ cyg_thread_resume( thread[_nthreads] );
+
+ return thread[_nthreads];
+}
+
+
+static void kill_threads( void )
+{
+ CYG_ASSERT(nthreads <= NTHREADS,
+ "More than NTHREADS threads");
+ CYG_ASSERT( cyg_thread_self() == thread[0],
+ "kill_threads() not called from thread 0");
+ while ( nthreads > 1 ) {
+ nthreads--;
+ if ( NULL != thread[nthreads] ) {
+ do
+ cyg_thread_kill( thread[nthreads] );
+ while ( ! cyg_thread_delete ( thread[nthreads] ) );
+ thread[nthreads] = NULL;
+ }
+ }
+ CYG_ASSERT(nthreads == 1,
+ "No threads left");
+}
+
+// ------------------------------------------------------------------------
+
+#define DELAYFACTOR 1 // for debugging
+
+// ------------------------------------------------------------------------
+
+static cyg_mutex_t mutex_obj;
+static cyg_mutex_t *mutex;
+
+// These are for reporting back to the master thread
+volatile int got_it = 0;
+volatile int t3ran = 0;
+volatile int t3ended = 0;
+volatile int extras[4] = {0,0,0,0};
+
+volatile int go_flag = 0; // but this one controls thread 3 from thread 2
+
+// ------------------------------------------------------------------------
+// 0 to 3 of these run generally to interfere with the other processing,
+// to cause multiple prio inheritances, and clashes in any orders.
+
+static void extra_thread( cyg_addrword_t data )
+{
+ cyg_handle_t self = cyg_thread_self();
+
+#define XINFO( z ) \
+ do { z[13] = '0' + data; CYG_TEST_INFO( z ); } while ( 0 )
+
+ static char running[] = "Extra thread Xa running";
+ static char exiting[] = "Extra thread Xa exiting";
+ static char resumed[] = "Extra thread Xa resumed";
+ static char locked[] = "Extra thread Xa locked";
+ static char unlocked[] = "Extra thread Xa unlocked";
+
+ XINFO( running );
+
+ cyg_thread_suspend( self );
+
+ XINFO( resumed );
+
+ cyg_mutex_lock( mutex );
+
+ XINFO( locked );
+
+ cyg_mutex_unlock( mutex );
+
+ XINFO( unlocked );
+
+ extras[ data ] ++;
+
+ XINFO( exiting );
+
+}
+
+// ------------------------------------------------------------------------
+
+static void t1( cyg_addrword_t data )
+{
+ cyg_handle_t self = cyg_thread_self();
+
+ CYG_TEST_INFO( "Thread 1 running" );
+
+ cyg_thread_suspend( self );
+
+ cyg_mutex_lock( mutex );
+
+ got_it++;
+
+ CYG_TEST_CHECK( 0 == t3ended, "T3 ended prematurely [T1,1]" );
+
+ cyg_mutex_unlock( mutex );
+
+ CYG_TEST_CHECK( 0 == t3ended, "T3 ended prematurely [T1,2]" );
+
+ // That's all.
+
+ CYG_TEST_INFO( "Thread 1 exit" );
+}
+
+// ------------------------------------------------------------------------
+
+static void t2( cyg_addrword_t data )
+{
+ cyg_handle_t self = cyg_thread_self();
+ int i;
+ cyg_tick_count_t then, now;
+
+ CYG_TEST_INFO( "Thread 2 running" );
+
+ CYG_TEST_CHECK( 0 == (data & ~0x77), "Bad T2 arg: extra bits" );
+ CYG_TEST_CHECK( 0 == (data & (data >> 4)), "Bad T2 arg: overlap" );
+
+ cyg_thread_suspend( self );
+
+ // depending on our config argument, optionally restart some of the
+ // extra threads to throw noise into the scheduler:
+ for ( i = 0; i < 3; i++ )
+ if ( (1 << i) & data ) // bits 0-2 control
+ cyg_thread_resume( thread[i+4] ); // extras are thread[4-6]
+
+ cyg_thread_delay( DELAYFACTOR * 10 ); // let those threads run
+
+ cyg_scheduler_lock(); // do this next lot atomically
+
+ go_flag = 1; // unleash thread 3
+ cyg_thread_resume( thread[1] ); // resume thread 1
+
+ // depending on our config argument, optionally restart some of the
+ // extra threads to throw noise into the scheduler at this later point:
+ for ( i = 4; i < 7; i++ )
+ if ( (1 << i) & data ) // bits 4-6 control
+ cyg_thread_resume( thread[i] ); // extras are thread[4-6]
+
+ cyg_scheduler_unlock(); // let scheduling proceed
+
+ // Need a delay (but not a CPU yield) to allow t3 to awaken and act on
+ // the go_flag, otherwise we check these details below too soon.
+ // Actually, waiting for the clock to tick a couple of times would be
+ // better, so that is what we will do. Must be a busy-wait.
+ then = cyg_current_time();
+ do {
+ now = cyg_current_time();
+ // Wait longer than the delay in t3 waiting on go_flag
+ } while ( now < (then + 3) );
+
+#ifdef PRIORITY_UNKNOWN
+ CYG_TEST_INFO( "Not checking: " PRIORITY_UNKNOWN );
+#else
+#ifdef PRIORITY_INHERITANCE
+ CYG_TEST_INFO( "Checking priority scheme: " PRIORITY_INHERITANCE );
+ CYG_TEST_CHECK( 1 == t3ran, "Thread 3 did not run" );
+ CYG_TEST_CHECK( 1 == got_it, "Thread 1 did not get the mutex" );
+#else
+ CYG_TEST_INFO( "Checking NO priority scheme: " NO_PRIORITY_INHERITANCE );
+ CYG_TEST_CHECK( 0 == t3ran, "Thread 3 DID run" );
+ CYG_TEST_CHECK( 0 == got_it, "Thread 1 DID get the mutex" );
+#endif
+#endif
+
+ CYG_TEST_CHECK( 0 == t3ended, "Thread 3 ended prematurely [T2,1]" );
+
+ cyg_thread_delay( DELAYFACTOR * 20 ); // let those threads run
+
+ CYG_TEST_CHECK( 1 == t3ran, "Thread 3 did not run" );
+ CYG_TEST_CHECK( 1 == got_it, "Thread 1 did not get the mutex" );
+ CYG_TEST_CHECK( 1 == t3ended, "Thread 3 has not ended" );
+
+ for ( i = 0; i < 3; i++ )
+ if ( (1 << i) & (data | data >> 4) ) // bits 0-2 and 4-6 control
+ CYG_TEST_CHECK( 1 == extras[i+1], "Extra thread did not run" );
+ else
+ CYG_TEST_CHECK( 0 == extras[i+1], "Extra thread ran" );
+
+ CYG_TEST_PASS( "Thread 2 exiting, AOK" );
+ // That's all: restart the control thread.
+ cyg_thread_resume( thread[0] );
+}
+
+// ------------------------------------------------------------------------
+
+static void t3( cyg_addrword_t data )
+{
+ CYG_TEST_INFO( "Thread 3 running" );
+
+ cyg_mutex_lock( mutex );
+
+ cyg_thread_delay( DELAYFACTOR * 5 ); // let thread 3a run
+
+ cyg_thread_resume( thread[2] ); // resume thread 2
+
+ while ( 0 == go_flag )
+ cyg_thread_delay(1); // wait until we are told to go
+
+ t3ran ++; // record the fact
+
+ CYG_TEST_CHECK( 0 == got_it, "Thread 1 claims to have got my mutex" );
+
+ cyg_mutex_unlock( mutex );
+
+ t3ended ++; // record that we came back
+
+ CYG_TEST_CHECK( 1 == got_it, "Thread 1 did not get the mutex" );
+
+ CYG_TEST_INFO( "Thread 3 exit" );
+}
+
+// ------------------------------------------------------------------------
+
+static void control_thread( cyg_addrword_t data )
+{
+ cyg_handle_t self = cyg_thread_self();
+ int i, z;
+
+ CYG_TEST_INIT();
+ CYG_TEST_INFO( "Control Thread running" );
+
+ // Go through the 27 possibilities of resuming the extra threads
+ // 0: not at all
+ // 1: early in the process
+ // 2: later on
+ // which are represented by bits 0-3 and 4-6 resp in the argument to
+ // thread 2 (none set means no resume at all).
+ for ( i = 0; i < 27; i++ ) {
+ static int xx[] = { 0, 1, 16 };
+ int j = i % 3;
+ int k = (i / 3) % 3;
+ int l = (i / 9) % 3;
+
+ int d = xx[j] | (xx[k]<<1) | (xx[l]<<2) ;
+
+ if ( cyg_test_is_simulator && (0 != i && 13 != i && 26 != i) )
+ continue; // 13 is 111 base 3, 26 is 222 base 3
+
+#ifdef PRIORITY_INHERITANCE
+ // If the simple scheme plus relay enhancement, or any other
+ // *complete* scheme, we can run all three ancillary threads no
+ // problem, so no special action here.
+
+#else
+ // If no priority inheritance at all, running threads 1a and 2a is
+ // OK, but not thread 3a; it blocks the world.
+ if ( l ) // Cannot run thread 3a if no
+ break; // priority inheritance at all.
+#endif
+
+ mutex = &mutex_obj;
+ cyg_mutex_init( mutex );
+
+ got_it = 0;
+ t3ran = 0;
+ t3ended = 0;
+ for ( z = 0; z < 4; z++ ) extras[z] = 0;
+ go_flag = 0;
+
+ new_thread( t1, 0, 5, 1 ); // Slot 1
+ new_thread( t2, d, 10, 1 ); // Slot 2
+ new_thread( t3, 0, 15, 1 ); // Slot 3
+
+ new_thread( extra_thread, 1, 8, j ); // Slot 4
+ new_thread( extra_thread, 2, 12, k ); // Slot 5
+ new_thread( extra_thread, 3, 17, l ); // Slot 6
+
+ {
+ static char *a[] = { "inactive", "run early", "run late" };
+ diag_printf( "\n----- [%2d] New Cycle: 0x%02x, Threads 1a %s, 2a %s, 3a %s -----\n",
+ i, d, a[j], a[k], a[l] );
+ }
+
+ cyg_thread_suspend( self );
+
+ kill_threads();
+ cyg_mutex_destroy( mutex );
+ }
+ CYG_TEST_EXIT( "Control Thread exit" );
+}
+
+// ------------------------------------------------------------------------
+
+externC void
+cyg_user_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ new_thread( control_thread, 0, 2, 1 );
+}
+
+#else // CYGVAR_KERNEL_COUNTERS_CLOCK &c
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_INFO("KMutex3 test requires:\n"
+ "CYGFUN_KERNEL_API_C &&\n"
+ "CYGVAR_KERNEL_COUNTERS_CLOCK &&\n"
+ "(CYGNUM_KERNEL_SCHED_PRIORITIES > 20) &&\n"
+ "!defined(CYGPKG_KERNEL_SMP_SUPPORT)\n");
+ CYG_TEST_NA("KMutex3 test requirements");
+}
+#endif // CYGVAR_KERNEL_COUNTERS_CLOCK &c
+
+
+// ------------------------------------------------------------------------
+// Documentation: enclosed is the design of this test.
+//
+// It has been carefully constructed so that it does NOT use other kernel
+// facilities (aside from delay-task) to test that priority inheritance is
+// working, or not, as intended by the configuration.
+//
+// These notes describe the flow of control in one run of the test with the
+// ancillary tasks optionally interspersed. The details of how those extra
+// tasks are or are not allowed to run are not described.
+//
+//
+//
+// The only change in the test that depends on whether there is inheritance or
+// not is the check in thread 2 on "3-ran" and "got it" flags marked ****
+//
+//
+// volatile &c booleans:
+// "got it" = FALSE
+// "3-ran" = FALSE
+// "3-ended" = FALSE
+// "extras"[3] = FALSE
+//
+// thread 1. prio 5, self-suspend.
+//
+// thread 1a, prio 8, self-suspend.
+//
+// thread 2. prio 10, self-suspend.
+//
+// thread 2a, prio 12, self-suspend.
+//
+// thread 3. prio 15, runs, lock mutex, resume(2)
+//
+// thread 3a, prio 17, self-suspend.
+//
+// 2. runs,
+// 2. resume(3a) +++OPTIONAL
+// 2. resume(2a) +++OPTIONAL
+// 2. resume(1a) +++OPTIONAL
+// [1a lock-fail] thread 3->prio := 8
+//
+// [3. runs maybe, does the looping thing]
+//
+// 2. sleep a while...
+//
+// [2a lock-fail] thread 3->prio := 12
+//
+// [3. runs maybe, does the looping thing]
+//
+// [3a lock-fail] thread 3->prio unchanged
+//
+// [3. runs maybe, does the looping thing]
+//
+// 2. lock scheduler
+// 2. set "go-flag"
+// 2. resume(1)
+// 2. resume(1a) +++OPTIONAL
+// 2. resume(2a) +++OPTIONAL
+// 2. resume(3a) +++OPTIONAL
+// 2. unlock scheduler
+//
+// 1. runs, lock mutex - thread 3 has it locked
+//
+// 2. busy-waits a bit for thread 3 to come out of its delay() loop.
+// This must be a *busy*wait so that 3 can only run via the
+// inherited raised priority.
+//
+// [xa. all do the same: lock mutex, ]
+// [xa. unlock mutex ]
+// [xa. set a flag "extras"[x] to say we are done. ]
+// [xa. exit ]
+//
+//
+//
+// INHERIT
+// -------
+//
+// thread 3->prio := 5
+//
+// 3. runs,
+// 3. set a flag to say "3-ran",
+// 3. loop with a sleep(1) until "go-flag" is set.
+// 3. check "got it" is false,
+// 3. then unlock mutex,
+//
+// thread 3->prio := 15
+//
+// 1. runs, set a flag to say "got it",
+// 1. check "3-ended" flag is false
+// 1. unlock mutex,
+// 1. check "3-ended" flag is still false
+// 1. exit.
+//
+// [1a locks, unlocks, exits]
+//
+// 2. runs, check "3-ran" and "got it" flags are TRUE ****
+// 2. check "3-ended" flag is false
+// 2. sleeps for a while so that...
+//
+// [2a locks, unlocks, exits]
+//
+// 3. runs, set "3-ended" flag,
+// 3. check "3-ran" and "got it" flags
+// 3. exit
+//
+// [3a locks, unlocks, exits]
+//
+// 2. awakens, checks all flags true,
+// 2. check that all "extra" threads that we started have indeed run
+// 2. end of test.
+//
+//
+//
+//
+// NO-INHERIT
+// ----------
+// thread 1 is waiting on the mutex
+//
+// [1a lock-fail]
+//
+// 2. runs, checks that "3-ran" and "got it" flags are FALSE ****
+// 2. check "3-ended" flag is false
+// 2. sleeps for a while so that...
+//
+// [2a. lock-fail]
+//
+// 3. runs, set a flag to say "3-ran",
+// 3. check "got it" is false,
+// 3. then unlock mutex,
+//
+// 1. runs, set a flag to say "got it",
+// 1. check "3-ended" flag is false
+// 1. unlock mutex,
+// 1. check "3-ended" flag is still false
+// 1. exit.
+//
+// [1a locks, unlocks, exits]
+// [2a locks, unlocks, exits]
+//
+// 3. runs, set "3-ended" flag,
+// 3. check "3-ran" and "got it" flags
+// 3. exit
+//
+// [3a locks, unlocks, exits]
+//
+// 2. awakens, checks all flags true,
+// 2. check that all "extra" threads that we started have indeed run
+// 2. end of test.
+//
+//
+// (the end)
+//
+//
+// ------------------------------------------------------------------------
+
+// EOF mutex3.c
diff --git a/cesar/ecos/packages/kernel/current/tests/kmutex4.c b/cesar/ecos/packages/kernel/current/tests/kmutex4.c
new file mode 100644
index 0000000000..c7539176dd
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kmutex4.c
@@ -0,0 +1,526 @@
+//==========================================================================
+//
+// kmutex4.c
+//
+// Mutex test 4 - dynamic priority inheritance protocol
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 2000-01-06, 2001-08-10, 2001-08-21
+// Description: Tests mutex priority inheritance. This is an extension of
+// kmutex3.c, to test the new "set the protocol at run-time"
+// extensions.
+//####DESCRIPTIONEND####
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+#include <cyg/infra/diag.h> // diag_printf
+
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+externC void
+cyg_hal_invoke_constructors();
+#endif
+
+// ------------------------------------------------------------------------
+//
+// These checks should be enough; any other scheduler which has priorities
+// should manifest as having no priority inheritance, but otherwise fine,
+// so the test should work correctly.
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK) && \
+ (CYGNUM_KERNEL_SCHED_PRIORITIES > 20) && \
+ defined(CYGFUN_KERNEL_API_C) && \
+ !defined(CYGPKG_KERNEL_SMP_SUPPORT) && \
+ defined(CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC) \
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/cyg_trac.h>
+#include <cyg/infra/diag.h> // diag_printf
+
+// ------------------------------------------------------------------------
+
+#define nVERBOSE
+
+// ------------------------------------------------------------------------
+// We have dynamic protocol choice, so we can set the protocol to whatever
+// we want. We'll do these combinations:
+// NONE
+// INHERIT
+// CEILING = 4 = higher than any thread === INHERIT in behaviour
+// CEILING = 11 = mixed in with threads === cannot check anything
+// CEILING = 17 = lower than any threads === NONE in behaviour
+
+#define PROTO_NONE (0)
+#define PROTO_INHERIT (1)
+#define PROTO_CEILING_HIGH (2)
+#define PROTO_CEILING_MID (3)
+#define PROTO_CEILING_LOW (4)
+
+int proto;
+
+static char * protnames[] = {
+ "none",
+ "inherit",
+ "high ceiling",
+ "medium ceiling",
+ "low ceiling",
+};
+
+// ------------------------------------------------------------------------
+// Management functions
+//
+// Stolen from testaux.hxx and copied in here because I want to be able to
+// reset the world also.
+//
+// Translated into KAPI also.
+
+#define NTHREADS 7
+
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+static cyg_handle_t thread[NTHREADS] = { 0 };
+
+typedef cyg_uint64 CYG_ALIGNMENT_TYPE;
+
+static cyg_thread thread_obj[NTHREADS];
+
+static CYG_ALIGNMENT_TYPE stack[NTHREADS] [
+ (STACKSIZE+sizeof(CYG_ALIGNMENT_TYPE)-1)
+ / sizeof(CYG_ALIGNMENT_TYPE) ];
+
+static volatile int nthreads = 0;
+
+#undef NULL
+#define NULL (0)
+
+static cyg_handle_t new_thread( cyg_thread_entry_t *entry,
+ cyg_addrword_t data,
+ cyg_addrword_t priority,
+ int do_resume,
+ char *name )
+{
+ int _nthreads = nthreads++;
+
+ CYG_ASSERT(_nthreads < NTHREADS,
+ "Attempt to create more than NTHREADS threads");
+
+ cyg_thread_create( priority,
+ entry,
+ data,
+ name,
+ (void *)(stack[_nthreads]),
+ STACKSIZE,
+ &thread[_nthreads],
+ &thread_obj[_nthreads] );
+
+ if ( do_resume )
+ cyg_thread_resume( thread[_nthreads] );
+
+ return thread[_nthreads];
+}
+
+
+static void kill_threads( void )
+{
+ CYG_ASSERT(nthreads <= NTHREADS,
+ "More than NTHREADS threads");
+ CYG_ASSERT( cyg_thread_self() == thread[0],
+ "kill_threads() not called from thread 0");
+ while ( nthreads > 1 ) {
+ nthreads--;
+ if ( NULL != thread[nthreads] ) {
+ do
+ cyg_thread_kill( thread[nthreads] );
+ while ( ! cyg_thread_delete ( thread[nthreads] ) );
+ thread[nthreads] = NULL;
+ }
+ }
+ CYG_ASSERT(nthreads == 1,
+ "No threads left");
+}
+
+// ------------------------------------------------------------------------
+
+#define DELAYFACTOR 1 // for debugging
+
+// ------------------------------------------------------------------------
+
+static cyg_mutex_t mutex_obj;
+static cyg_mutex_t *mutex;
+
+// These are for reporting back to the master thread
+volatile int got_it = 0;
+volatile int t3ran = 0;
+volatile int t3ended = 0;
+volatile int extras[4] = {0,0,0,0};
+
+volatile int go_flag = 0; // but this one controls thread 3 from thread 2
+
+// ------------------------------------------------------------------------
+// 0 to 3 of these run generally to interfere with the other processing,
+// to cause multiple prio inheritances, and clashes in any orders.
+
+static void extra_thread( cyg_addrword_t data )
+{
+ cyg_handle_t self = cyg_thread_self();
+
+
+#ifdef VERBOSE
+#define xXINFO( z ) \
+ do { z[13] = '0' + data; CYG_TEST_INFO( z ); } while ( 0 )
+
+ static char running[] = "Extra thread Xa running";
+ static char exiting[] = "Extra thread Xa exiting";
+ static char resumed[] = "Extra thread Xa resumed";
+ static char locked[] = "Extra thread Xa locked";
+ static char unlocked[] = "Extra thread Xa unlocked";
+#else
+#define XINFO( z ) /* nothing */
+#endif
+
+ XINFO( running );
+
+ cyg_thread_suspend( self );
+
+ XINFO( resumed );
+
+ cyg_mutex_lock( mutex );
+
+ XINFO( locked );
+
+ cyg_mutex_unlock( mutex );
+
+ XINFO( unlocked );
+
+ extras[ data ] ++;
+
+ XINFO( exiting );
+
+}
+
+// ------------------------------------------------------------------------
+
+static void t1( cyg_addrword_t data )
+{
+ cyg_handle_t self = cyg_thread_self();
+#ifdef VERBOSE
+ CYG_TEST_INFO( "Thread 1 running" );
+#endif
+ cyg_thread_suspend( self );
+
+ cyg_mutex_lock( mutex );
+
+ got_it++;
+
+ CYG_TEST_CHECK( 0 == t3ended, "T3 ended prematurely [T1,1]" );
+
+ cyg_mutex_unlock( mutex );
+
+ CYG_TEST_CHECK( 0 == t3ended, "T3 ended prematurely [T1,2]" );
+
+ // That's all.
+#ifdef VERBOSE
+ CYG_TEST_INFO( "Thread 1 exit" );
+#endif
+}
+
+// ------------------------------------------------------------------------
+
+static void t2( cyg_addrword_t data )
+{
+ cyg_handle_t self = cyg_thread_self();
+ int i;
+ cyg_tick_count_t then, now;
+#ifdef VERBOSE
+ CYG_TEST_INFO( "Thread 2 running" );
+#endif
+ CYG_TEST_CHECK( 0 == (data & ~0x77), "Bad T2 arg: extra bits" );
+ CYG_TEST_CHECK( 0 == (data & (data >> 4)), "Bad T2 arg: overlap" );
+
+ cyg_thread_suspend( self );
+
+ // depending on our config argument, optionally restart some of the
+ // extra threads to throw noise into the scheduler:
+ for ( i = 0; i < 3; i++ )
+ if ( (1 << i) & data ) // bits 0-2 control
+ cyg_thread_resume( thread[i+4] ); // extras are thread[4-6]
+
+ cyg_thread_delay( DELAYFACTOR * 10 ); // let those threads run
+
+ cyg_scheduler_lock(); // do this next lot atomically
+
+ go_flag = 1; // unleash thread 3
+ cyg_thread_resume( thread[1] ); // resume thread 1
+
+ // depending on our config argument, optionally restart some of the
+ // extra threads to throw noise into the scheduler at this later point:
+ for ( i = 4; i < 7; i++ )
+ if ( (1 << i) & data ) // bits 4-6 control
+ cyg_thread_resume( thread[i] ); // extras are thread[4-6]
+
+ cyg_scheduler_unlock(); // let scheduling proceed
+
+ // Need a delay (but not a CPU yield) to allow t3 to awaken and act on
+ // the go_flag, otherwise we check these details below too soon.
+ // Actually, waiting for the clock to tick a couple of times would be
+ // better, so that is what we will do. Must be a busy-wait.
+ then = cyg_current_time();
+ do {
+ now = cyg_current_time();
+ // Wait longer than the delay in t3 waiting on go_flag
+ } while ( now < (then + 3) );
+
+ // Check for whatever result we expect from the protocol selected:
+ // This mirrors what is done in configury in kmutex3.c and mutex3.cxx
+ if ( PROTO_CEILING_MID == proto ) {
+ CYG_TEST_INFO( "Not checking: ceiling mid value" );
+ }
+ else if ( PROTO_INHERIT == proto ||
+ PROTO_CEILING_HIGH == proto ) {
+ CYG_TEST_INFO( "Checking priority scheme operating" );
+ CYG_TEST_CHECK( 1 == t3ran, "Thread 3 did not run" );
+ CYG_TEST_CHECK( 1 == got_it, "Thread 1 did not get the mutex" );
+ }
+ else {
+ CYG_TEST_INFO( "Checking NO priority scheme operating" );
+ CYG_TEST_CHECK( 0 == t3ran, "Thread 3 DID run" );
+ CYG_TEST_CHECK( 0 == got_it, "Thread 1 DID get the mutex" );
+ }
+
+ CYG_TEST_CHECK( 0 == t3ended, "Thread 3 ended prematurely [T2,1]" );
+
+ cyg_thread_delay( DELAYFACTOR * 20 ); // let those threads run
+
+ CYG_TEST_CHECK( 1 == t3ran, "Thread 3 did not run" );
+ CYG_TEST_CHECK( 1 == got_it, "Thread 1 did not get the mutex" );
+ CYG_TEST_CHECK( 1 == t3ended, "Thread 3 has not ended" );
+
+ for ( i = 0; i < 3; i++ )
+ if ( (1 << i) & (data | data >> 4) ) // bits 0-2 and 4-6 control
+ CYG_TEST_CHECK( 1 == extras[i+1], "Extra thread did not run" );
+ else
+ CYG_TEST_CHECK( 0 == extras[i+1], "Extra thread ran" );
+
+ CYG_TEST_PASS( "Thread 2 exiting, AOK" );
+ // That's all: restart the control thread.
+ cyg_thread_resume( thread[0] );
+}
+
+// ------------------------------------------------------------------------
+
+static void t3( cyg_addrword_t data )
+{
+#ifdef VERBOSE
+ CYG_TEST_INFO( "Thread 3 running" );
+#endif
+ cyg_mutex_lock( mutex );
+
+ cyg_thread_delay( DELAYFACTOR * 5 ); // let thread 3a run
+
+ cyg_thread_resume( thread[2] ); // resume thread 2
+
+ while ( 0 == go_flag )
+ cyg_thread_delay(1); // wait until we are told to go
+
+ t3ran ++; // record the fact
+
+ CYG_TEST_CHECK( 0 == got_it, "Thread 1 claims to have got my mutex" );
+
+ cyg_mutex_unlock( mutex );
+
+ t3ended ++; // record that we came back
+
+ CYG_TEST_CHECK( 1 == got_it, "Thread 1 did not get the mutex" );
+#ifdef VERBOSE
+ CYG_TEST_INFO( "Thread 3 exit" );
+#endif
+}
+
+// ------------------------------------------------------------------------
+
+static void control_thread( cyg_addrword_t data )
+{
+ cyg_handle_t self = cyg_thread_self();
+ int i, z;
+
+ CYG_TEST_INIT();
+ CYG_TEST_INFO( "Control Thread running" );
+
+ // Go through the 27 possibilities of resuming the extra threads
+ // 0: not at all
+ // 1: early in the process
+ // 2: later on
+ // which are represented by bits 0-3 and 4-6 resp in the argument to
+ // thread 2 (none set means no resume at all).
+ for ( i = 0; i < 27; i++ ) {
+ static int xx[] = { 0, 1, 16 };
+ int j = i % 3;
+ int k = (i / 3) % 3;
+ int l = (i / 9) % 3;
+
+ int d = xx[j] | (xx[k]<<1) | (xx[l]<<2) ;
+
+ if ( cyg_test_is_simulator && (0 != i && 13 != i && 26 != i) )
+ continue; // 13 is 111 base 3, 26 is 222 base 3
+
+ // Go through all these priority inversion prevention protocols:
+ // (if supported in this configuration)
+ // PROTO_NONE (0)
+ // PROTO_INHERIT (1)
+ // PROTO_CEILING_HIGH (2)
+ // PROTO_CEILING_MID (3)
+ // PROTO_CEILING_LOW (4)
+ for ( proto = PROTO_NONE; proto <= PROTO_CEILING_LOW; proto++ ) {
+
+ // If no priority inheritance at all, running threads 1a and 2a is
+ // OK, but not thread 3a; it blocks the world.
+ if ( PROTO_NONE == proto ||
+ PROTO_CEILING_MID == proto ||
+ PROTO_CEILING_LOW == proto )
+ if ( l ) // Cannot run thread 3a if no
+ continue; // priority inheritance at all.
+
+ mutex = &mutex_obj;
+
+ switch ( proto ) {
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_NONE
+ case PROTO_NONE:
+ cyg_mutex_init( mutex );
+ cyg_mutex_set_protocol( mutex, CYG_MUTEX_NONE );
+ break;
+#endif
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT
+ case PROTO_INHERIT:
+ cyg_mutex_init( mutex );
+ cyg_mutex_set_protocol( mutex, CYG_MUTEX_INHERIT );
+ break;
+#endif
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+ case PROTO_CEILING_HIGH:
+ cyg_mutex_init( mutex );
+ cyg_mutex_set_protocol( mutex, CYG_MUTEX_CEILING );
+ cyg_mutex_set_ceiling( mutex, (cyg_priority_t) 4 );
+ break;
+ case PROTO_CEILING_MID:
+ cyg_mutex_init( mutex );
+ cyg_mutex_set_protocol( mutex, CYG_MUTEX_CEILING );
+ cyg_mutex_set_ceiling( mutex, (cyg_priority_t) 11 );
+ break;
+ case PROTO_CEILING_LOW:
+ cyg_mutex_init( mutex );
+ cyg_mutex_set_protocol( mutex, CYG_MUTEX_CEILING );
+ cyg_mutex_set_ceiling( mutex, (cyg_priority_t) 17 );
+ break;
+#endif
+ default:
+ continue; // Break out of the prio for loop - do nothing
+ }
+
+ got_it = 0;
+ t3ran = 0;
+ t3ended = 0;
+ for ( z = 0; z < 4; z++ ) extras[z] = 0;
+ go_flag = 0;
+
+ new_thread( t1, 0, 5, 1, "test 1" ); // Slot 1
+ new_thread( t2, d, 10, 1, "test 2" ); // Slot 2
+ new_thread( t3, 0, 15, 1, "test 3" ); // Slot 3
+
+ new_thread( extra_thread, 1, 8, j, "extra 1" ); // Slot 4
+ new_thread( extra_thread, 2, 12, k, "extra 2" ); // Slot 5
+ new_thread( extra_thread, 3, 17, l, "extra 3" ); // Slot 6
+
+ {
+ static char *a[] = { "inactive", "run early", "run late" };
+ diag_printf( "\n----- %s [%2d] New Cycle: 0x%02x, Threads 1a %s, 2a %s, 3a %s -----\n",
+ protnames[proto], i, d, a[j], a[k], a[l] );
+ }
+
+ cyg_thread_suspend( self );
+
+ kill_threads();
+ cyg_mutex_destroy( mutex );
+ }
+ }
+ CYG_TEST_EXIT( "Control Thread exit" );
+}
+
+// ------------------------------------------------------------------------
+
+externC void
+cyg_user_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ new_thread( control_thread, 0, 2, 1, "control thread" );
+}
+
+#else // CYGVAR_KERNEL_COUNTERS_CLOCK &c
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_INFO("KMutex4 test requires:\n"
+ "CYGFUN_KERNEL_API_C &&\n"
+ "CYGVAR_KERNEL_COUNTERS_CLOCK &&\n"
+ "(CYGNUM_KERNEL_SCHED_PRIORITIES > 20) &&\n"
+ "!defined(CYGPKG_KERNEL_SMP_SUPPORT) &&\n"
+ "defined(CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC)\n"
+ );
+ CYG_TEST_NA("KMutex4 test requirements");
+}
+#endif // CYGVAR_KERNEL_COUNTERS_CLOCK &c
+
+
+// ------------------------------------------------------------------------
+// Documentation: enclosed is the design of this test.
+//
+// See mutex3.cxx or kmutex3.c
+
+// ------------------------------------------------------------------------
+// EOF mutex4.c
diff --git a/cesar/ecos/packages/kernel/current/tests/kphilo.c b/cesar/ecos/packages/kernel/current/tests/kphilo.c
new file mode 100644
index 0000000000..b21207ce86
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kphilo.c
@@ -0,0 +1,236 @@
+//==========================================================================
+//
+// kphilo.c
+//
+// A test of the dining philosophers problem
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-02-24
+// Description: A test of the dining philosophers problem
+//####DESCRIPTIONEND####
+//
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/kernel/diag.h>
+
+// -------------------------------------------------------------------------
+// Data for the philosophers problem
+
+#define PHILOSOPHERS 15 // number of philosophers
+#define STACKSIZE (2*1024) // size of thread stack
+
+// array of stacks for philosopher threads
+char thread_stack[PHILOSOPHERS][STACKSIZE];
+
+// array of threads.
+cyg_thread thread[PHILOSOPHERS];
+
+cyg_handle_t thread_handle[PHILOSOPHERS];
+
+// array of chopsticks
+cyg_sem_t chopstick[PHILOSOPHERS];
+
+cyg_ucount32 data_index;
+
+// -------------------------------------------------------------------------
+// State recording and display
+
+static char pstate[PHILOSOPHERS+1]; // state vector showing what each
+ // philosopher is doing
+
+cyg_mutex_t state_mutex;
+
+#ifdef CYG_HAL_MN10300_MN103002
+static cyg_count8 eaters = 0;
+#endif
+
+void change_state(int id, char newstate)
+{
+ cyg_mutex_lock(&state_mutex);
+
+#ifdef CYG_HAL_MN10300_MN103002
+ if( pstate[id] == 'E' ) eaters--;
+ if( newstate == 'E' ) eaters++;
+// led(eaters);
+#endif
+
+ pstate[id] = newstate;
+
+ diag_write_string(pstate);
+#if 0
+ diag_write_char(' ');
+ diag_write_dec(Cyg_Scheduler::get_thread_switches());
+#endif
+ diag_write_char('\n');
+
+ cyg_mutex_unlock(&state_mutex);
+
+}
+
+char get_state( int id)
+{
+ char s;
+ cyg_mutex_lock(&state_mutex);
+
+ s = pstate[id];
+
+ cyg_mutex_unlock(&state_mutex);
+
+ return s;
+}
+
+// -------------------------------------------------------------------------
+// Thread to behave like a philosopher
+
+void Philosopher( cyg_addrword_t vid )
+{
+ cyg_uint32 id = (cyg_uint32)vid;
+ cyg_sem_t *first_stick = &chopstick[id];
+ cyg_sem_t *second_stick = &chopstick[(id+1)%PHILOSOPHERS];
+#ifdef CYGPKG_INFRA_DEBUG
+ int left_philo = ((id==0)?PHILOSOPHERS:id)-1;
+ int right_philo = (id==PHILOSOPHERS-1)?0:(id+1);
+#endif
+
+ CYG_ASSERT( id >= 0 && id < PHILOSOPHERS, "Bad id");
+
+ // Deadlock avoidance. The easiest way to make the philosophers
+ // behave is to make each pick up the lowest numbered stick
+ // first. This is how it works out anyway for all the philosophers
+ // except the last, who must have his sticks swapped.
+
+ if( id == PHILOSOPHERS-1 )
+ {
+ cyg_sem_t *t = first_stick;
+ first_stick = second_stick;
+ second_stick = t;
+ }
+
+ for(;;)
+ {
+ cyg_ucount32 val;
+
+ // The following variable is shared by all philosophers.
+ // It is incremented unprotected, but this does not matter
+ // since it is only present to introduce a little variability
+ // into the think and eat times.
+
+ static volatile int cycle = 0;
+
+ // Think for a bit
+
+ cyg_thread_delay((id+cycle++)%12); // Cogito ergo sum...
+
+ // I am now hungry, try to get the chopsticks
+
+ change_state(id,'H');
+
+ // Get the first stick
+ cyg_semaphore_wait(first_stick);
+
+ // Get the second stick
+ cyg_semaphore_wait(second_stick);
+
+ // Got them, now eat
+
+ change_state(id,'E');
+
+ // Check that the world is as I think it is...
+ cyg_semaphore_peek( first_stick, &val);
+ CYG_ASSERT( val == 0, "Not got first stick");
+ cyg_semaphore_peek( second_stick, &val);
+ CYG_ASSERT( val == 0, "Not got second stick");
+ CYG_ASSERT( get_state(left_philo) != 'E', "Left neighbour also eating!!");
+ CYG_ASSERT( get_state(right_philo) != 'E', "Right neighbour also eating!!");
+
+ cyg_thread_delay((id+cycle++)%6); // munch munch
+
+ // Finished eating, put down sticks.
+
+ change_state(id,'T');
+
+ cyg_semaphore_post( first_stick );
+ cyg_semaphore_post( second_stick );
+
+ }
+}
+
+// -------------------------------------------------------------------------
+
+externC void
+cyg_start( void )
+{
+ int i;
+
+ diag_init();
+
+ diag_write_string("Philosophers\n");
+ diag_write_string("Started\n");
+
+ // Zero last element in state so it acts like
+ // a string.
+ pstate[PHILOSOPHERS] = 0;
+
+#if 1
+ for( i = 0; i < PHILOSOPHERS; i++ )
+ {
+ change_state(i,'T'); // starting state
+
+ cyg_thread_create(4, Philosopher, (cyg_addrword_t)i, "philosopher",
+ (void *)(&thread_stack[i]), STACKSIZE,
+ &thread_handle[i], &thread[i]);
+
+ // resume it
+ cyg_thread_resume(thread_handle[i]);
+
+ // and make the matching chopstick present
+ cyg_semaphore_init( &chopstick[i], 1);
+ }
+#endif
+
+ // Get the world going
+ cyg_scheduler_start();
+
+}
+
+// -------------------------------------------------------------------------
+// EOF kphilo.c
diff --git a/cesar/ecos/packages/kernel/current/tests/ksched1.c b/cesar/ecos/packages/kernel/current/tests/ksched1.c
new file mode 100644
index 0000000000..d1bf1c7d55
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/ksched1.c
@@ -0,0 +1,103 @@
+/*=================================================================
+//
+// ksched1.c
+//
+// Kernel C API Sched test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-03-23
+// Description: Simply checks the world starts
+//####DESCRIPTIONEND####
+*/
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#include "testaux.h"
+
+#define NTHREADS 2
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+static cyg_handle_t thread[NTHREADS];
+
+static cyg_thread thread_obj[NTHREADS];
+static char stack[NTHREADS][STACKSIZE];
+
+
+static void entry0( cyg_addrword_t data )
+{
+ CHECK( 222 == (int)data );
+ CYG_TEST_PASS_FINISH( "Kernel C API Sched 1 OK");
+}
+
+void ksched1_main(void)
+{
+ CYG_TEST_INIT();
+
+ cyg_thread_create( 4, entry0 , (cyg_addrword_t)222, "ksched1",
+ (void *)stack[0], STACKSIZE, &thread[0], &thread_obj[0]);
+ cyg_thread_resume(thread[0]);
+
+ cyg_scheduler_start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+ ksched1_main();
+}
+
+#else /* def CYGFUN_KERNEL_API_C */
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Kernel C API layer disabled");
+}
+#endif /* def CYGFUN_KERNEL_API_C */
+
+/* EOF ksched1.c */
diff --git a/cesar/ecos/packages/kernel/current/tests/ksem0.c b/cesar/ecos/packages/kernel/current/tests/ksem0.c
new file mode 100644
index 0000000000..4a7f359dc5
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/ksem0.c
@@ -0,0 +1,100 @@
+/*=================================================================
+//
+// ksem0.c
+//
+// Kernel C API Semaphore test 0
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-03-20
+// Description: Limited to checking initialisation/destruction
+//####DESCRIPTIONEND####
+*/
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#include "testaux.h"
+
+cyg_sem_t s0, s1, s2;
+
+static bool flash( void )
+{
+ cyg_semaphore_init( &s0, 0 );
+ cyg_semaphore_init( &s1, 1 );
+ cyg_semaphore_init( &s2, 17 );
+
+ cyg_semaphore_destroy( &s0 );
+ cyg_semaphore_destroy( &s1 );
+ cyg_semaphore_destroy( &s2 );
+
+ return true;
+}
+
+void ksem0_main( void )
+{
+ CYG_TEST_INIT();
+
+ CHECK(flash());
+ CHECK(flash());
+
+ CYG_TEST_PASS_FINISH("Kernel C API Semaphore 0 OK");
+
+}
+
+externC void
+cyg_start( void )
+{
+ ksem0_main();
+}
+
+
+#else /* def CYGFUN_KERNEL_API_C */
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Kernel C API layer disabled");
+}
+#endif /* def CYGFUN_KERNEL_API_C */
+
+/* EOF ksem0.c */
diff --git a/cesar/ecos/packages/kernel/current/tests/ksem1.c b/cesar/ecos/packages/kernel/current/tests/ksem1.c
new file mode 100644
index 0000000000..89ed2cc431
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/ksem1.c
@@ -0,0 +1,169 @@
+/*=================================================================
+//
+// ksem1.c
+//
+// C API semaphore test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-03-20
+// Description: Tests basic semaphore functionality.
+//####DESCRIPTIONEND####
+*/
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#include "testaux.h"
+
+#define NTHREADS 2
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+static cyg_handle_t thread[NTHREADS];
+
+static cyg_thread thread_obj[NTHREADS];
+static char stack[NTHREADS][STACKSIZE];
+
+
+static cyg_sem_t s0, s1, s2;
+
+static volatile cyg_ucount8 q = 0;
+
+static void entry0( cyg_addrword_t data )
+{
+ cyg_count32 val;
+
+ cyg_semaphore_wait(&s0);
+ CHECK( 1 == q++ );
+ cyg_semaphore_post(&s1);
+ cyg_semaphore_wait(&s0);
+ CHECK( 3 == q++ );
+ cyg_semaphore_peek(&s0, &val);
+ CHECK( 0 == val);
+ CHECK( ! cyg_semaphore_trywait(&s0) );
+ cyg_semaphore_post(&s0);
+ CHECK( 4 == q++ );
+ cyg_semaphore_peek(&s0, &val);
+ CHECK( 1 == val);
+ cyg_semaphore_post(&s0);
+ cyg_semaphore_peek(&s0, &val);
+ CHECK( 2 == val);
+ cyg_semaphore_post(&s1);
+ cyg_semaphore_peek(&s2, &val);
+ CHECK( 0 == val);
+ cyg_semaphore_wait(&s2);
+ CHECK( 6 == q++ );
+ CYG_TEST_PASS_FINISH("Kernel C API Semaphore 1 OK");
+}
+
+static void entry1( cyg_addrword_t data )
+{
+ cyg_count32 val;
+
+ cyg_semaphore_peek(&s1, &val);
+ CHECK( 2 == val);
+ cyg_semaphore_wait(&s1);
+ cyg_semaphore_peek(&s1, &val);
+ CHECK( 1 == val);
+ cyg_semaphore_wait(&s1);
+ CHECK( 0 == q++ );
+ cyg_semaphore_peek(&s0, &val);
+ CHECK( 0 == val);
+ cyg_semaphore_post(&s0);
+ cyg_semaphore_wait(&s1);
+ CHECK( 2 == q++ );
+ cyg_semaphore_post(&s0);
+ cyg_semaphore_wait(&s1);
+ CHECK( 5 == q++ );
+ cyg_semaphore_peek(&s0, &val);
+ CHECK( 2 == val);
+ CHECK( cyg_semaphore_trywait(&s0) );
+ cyg_semaphore_peek(&s0, &val);
+ CHECK( 1 == val);
+ CHECK( cyg_semaphore_trywait(&s0) );
+ cyg_semaphore_peek(&s0, &val);
+ CHECK( 0 == val);
+ cyg_semaphore_post(&s2);
+ cyg_semaphore_wait(&s0);
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+void ksem1_main( void )
+{
+ CYG_TEST_INIT();
+
+ cyg_semaphore_init( &s0, 0);
+ cyg_semaphore_init( &s1, 2);
+ cyg_semaphore_init( &s2, 0);
+
+ cyg_thread_create(4, entry0 , (cyg_addrword_t)0, "ksem1-0",
+ (void *)stack[0], STACKSIZE,&thread[0], &thread_obj[0]);
+ cyg_thread_resume(thread[0]);
+
+ cyg_thread_create(4, entry1 , (cyg_addrword_t)1, "ksem1-1",
+ (void *)stack[1], STACKSIZE, &thread[1], &thread_obj[1]);
+ cyg_thread_resume(thread[1]);
+
+ cyg_scheduler_start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+ ksem1_main();
+}
+
+
+#else /* def CYGFUN_KERNEL_API_C */
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Kernel C API layer disabled");
+}
+#endif /* def CYGFUN_KERNEL_API_C */
+
+/* EOF ksem1.c */
diff --git a/cesar/ecos/packages/kernel/current/tests/kthread0.c b/cesar/ecos/packages/kernel/current/tests/kthread0.c
new file mode 100644
index 0000000000..eb1deaa4b7
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kthread0.c
@@ -0,0 +1,120 @@
+/*=================================================================
+//
+// kthread0.c
+//
+// Kernel C API Thread test 0
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-03-18
+// Description: Limited to checking constructors/destructors
+//####DESCRIPTIONEND####
+*/
+
+#include <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#include "testaux.h"
+
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+static char stack[STACKSIZE];
+
+static cyg_thread_entry_t entry;
+
+static void entry( cyg_addrword_t data )
+{
+}
+
+static int *p;
+
+#if 0
+static cyg_handle_t t0,t1;
+static cyg_thread thread0, thread1;
+#endif
+
+static cyg_handle_t t2;
+static cyg_thread thread2;
+
+static bool flash( void )
+{
+#if 0 // no facility to allocate stack exists yet.
+ cyg_thread_create( entry, 0x111, NULL, 0, &t0, &thread0 );
+
+ cyg_thread_create( entry, (cyg_addrword_t)&t0, STACKSIZE, 0, &t1, &thread0 );
+#endif
+
+ cyg_thread_create(4, entry, (cyg_addrword_t)p, "kthread0",
+ (void *)stack, STACKSIZE, &t2, &thread2 );
+
+ return true;
+}
+
+void kthread0_main( void )
+{
+ CYG_TEST_INIT();
+
+ CHECK(flash());
+ CHECK(flash());
+
+ CYG_TEST_PASS_FINISH("Kernel C API Thread 0 OK");
+
+}
+
+externC void
+cyg_start( void )
+{
+ kthread0_main();
+}
+
+#else /* def CYGFUN_KERNEL_API_C */
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Kernel C API layer disabled");
+}
+#endif /* def CYGFUN_KERNEL_API_C */
+
+/* EOF kthread0.c */
diff --git a/cesar/ecos/packages/kernel/current/tests/kthread1.c b/cesar/ecos/packages/kernel/current/tests/kthread1.c
new file mode 100644
index 0000000000..3ceba97802
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/kthread1.c
@@ -0,0 +1,136 @@
+/*=================================================================
+//
+// kthread1.c
+//
+// Kernel C API Thread test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-03-18
+// Description: Tests some basic thread functions.
+//####DESCRIPTIONEND####
+*/
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGFUN_KERNEL_API_C
+
+#include "testaux.h"
+
+#include <cyg/hal/hal_arch.h> // for CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+#ifdef CYGNUM_HAL_STACK_SIZE_TYPICAL
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+#else
+#define STACKSIZE 2000
+#endif
+
+static char stack[2][STACKSIZE];
+
+static cyg_thread thread[2];
+
+static cyg_handle_t pt0,pt1;
+
+
+static void entry0( cyg_addrword_t data )
+{
+ CHECK( 222 == (int)data );
+
+ cyg_thread_suspend(pt1);
+ cyg_thread_resume(pt1);
+
+ cyg_thread_delay(1);
+
+ cyg_thread_resume(pt1);
+
+ cyg_thread_delay(1);
+
+ CYG_TEST_PASS_FINISH("Kernel C API Thread 1 OK");
+}
+
+static void entry1( cyg_addrword_t data )
+{
+ cyg_handle_t self;
+ CHECK( 333 == (int)data );
+
+ self = cyg_thread_self();
+
+ CHECK( self == pt1 );
+
+ cyg_thread_suspend(pt1);
+
+ cyg_thread_exit(); // no guarantee this will be called
+}
+
+void kthread1_main( void )
+{
+ CYG_TEST_INIT();
+
+ cyg_thread_create(4, entry0, (cyg_addrword_t)222, "kthread1-0",
+ (void *)stack[0], STACKSIZE, &pt0, &thread[0] );
+ cyg_thread_create(4, entry1, (cyg_addrword_t)333, "kthread1-1",
+ (void *)stack[1], STACKSIZE, &pt1, &thread[1] );
+
+ cyg_thread_resume(pt0);
+ cyg_thread_resume(pt1);
+
+ cyg_scheduler_start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+ kthread1_main();
+}
+
+
+#else /* def CYGFUN_KERNEL_API_C */
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Kernel C API layer disabled");
+}
+#endif /* def CYGFUN_KERNEL_API_C */
+
+/* EOF kthread1.c */
diff --git a/cesar/ecos/packages/kernel/current/tests/mbox1.cxx b/cesar/ecos/packages/kernel/current/tests/mbox1.cxx
new file mode 100644
index 0000000000..443b689bab
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/mbox1.cxx
@@ -0,0 +1,201 @@
+//==========================================================================
+//
+// mbox1.cxx
+//
+// Mbox test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author: dsm
+// Contributors: dsm
+// Date: 1998-05-19
+// Description: Tests basic mbox functionality.
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/thread.hxx> // Cyg_Thread
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/sched.hxx> // Cyg_Scheduler::start()
+
+#include <cyg/kernel/mbox.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/sched.inl>
+
+#include <cyg/kernel/timer.hxx> // Cyg_Timer
+#include <cyg/kernel/clock.inl> // Cyg_Clock
+
+#define NTHREADS 2
+#include "testaux.hxx"
+
+static Cyg_Mbox m0, m1, m2;
+
+static volatile cyg_atomic q = 0;
+
+#ifndef CYGMTH_MBOX_PUT_CAN_WAIT
+#define PUT tryput
+#endif
+
+static void entry0( CYG_ADDRWORD data )
+{
+ cyg_count8 u,i;
+
+ CYG_TEST_INFO("Testing put() and tryput() without wakeup");
+ CYG_TEST_CHECK(!m0.waiting_to_get(), "mbox not initialized properly");
+ CYG_TEST_CHECK(0==m0.peek(), "mbox not initialized properly");
+ CYG_TEST_CHECK(NULL==m0.peek_item(), "mbox not initialized properly");
+ m0.PUT((void *)55);
+ CYG_TEST_CHECK(1==m0.peek(), "peek() wrong");
+ CYG_TEST_CHECK(55==(cyg_count8)m0.peek_item(), "peek_item() wrong");
+ for(u=1; m0.tryput((void*)u); u++) {
+ CYG_TEST_CHECK(55==(cyg_count8)m0.peek_item(), "peek_item() wrong");
+ CYG_TEST_CHECK(u+1==m0.peek(), "peek() wrong");
+ }
+ CYG_TEST_CHECK(u == CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE, "mbox not configured size");
+
+ // m0 now contains ( 55 1 2 .. u-1 )
+ CYG_TEST_CHECK(u==m0.peek(), "peek() wrong");
+ CYG_TEST_CHECK(55==(cyg_count8)m0.peek_item(), "peek_item() wrong");
+
+ CYG_TEST_INFO("Testing get(), tryget()");
+
+ i = (cyg_count8)m0.tryget();
+ CYG_TEST_CHECK( 55 == i, "Got wrong message" );
+ for(cyg_count8 j=1; j<u;j++) {
+ CYG_TEST_CHECK( j == (cyg_count8)m0.peek_item(), "peek_item()" );
+ CYG_TEST_CHECK( m0.peek() == u - j, "peek() wrong" );
+ i = (cyg_count8)m0.get();
+ CYG_TEST_CHECK( j == i, "Got wrong message" );
+ }
+
+ CYG_TEST_CHECK( NULL == m0.peek_item(), "peek_item()" );
+ CYG_TEST_CHECK( 0 == m0.peek(), "peek()");
+
+ // m0 now empty
+
+ CYG_TEST_CHECK(!m0.waiting_to_put(), "waiting_to_put()");
+ CYG_TEST_CHECK(!m0.waiting_to_get(), "waiting_to_get()");
+
+ CYG_TEST_INFO("Testing get(), blocking");
+
+ CYG_TEST_CHECK(0==q++, "bad synchronization");
+ m1.PUT((void*)99); // wakes t1
+ i = (cyg_count8)m0.get(); // sent by t1
+ CYG_TEST_CHECK(3==i, "Recieved wrong message");
+ CYG_TEST_CHECK(2==q++, "bad synchronization");
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ CYG_TEST_CHECK(NULL==m0.get(
+ Cyg_Clock::real_time_clock->current_value() + 10),
+ "unexpectedly found message");
+ CYG_TEST_CHECK(3==q++, "bad synchronization");
+ // Allow t1 to run as this get times out
+ // t1 must not be waiting...
+ CYG_TEST_CHECK(m0.waiting_to_get(), "waiting_to_get()");
+
+ m0.PUT((void*)7); // wake t1 from timed get
+#ifdef CYGMTH_MBOX_PUT_CAN_WAIT
+ q=10;
+ while(m0.tryput((void*)6)) // fill m0's queue
+ ;
+ // m0 now contains ( 6 ... 6 )
+ CYG_TEST_CHECK(10==q++, "bad synchronization");
+ m1.put((void*)4); // wake t1
+ CYG_TEST_CHECK(!m0.put((void*)8, 2), "timed put() unexpectedly worked");
+ CYG_TEST_CHECK(12==q++, "bad synchronization");
+ // m0 still contains ( 6 ... 6 )
+ m0.put((void*)9);
+ CYG_TEST_CHECK(13==q++, "bad synchronization");
+#endif
+#endif
+ i=(cyg_count8)m2.get();
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+static void entry1( CYG_ADDRWORD data )
+{
+ cyg_count8 i;
+ i = (cyg_count8)m1.get();
+ CYG_TEST_CHECK(1==q++, "bad synchronization");
+ m0.PUT((void *)3); // wake t0
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+ CYG_TEST_INFO("Testing timed functions");
+ CYG_TEST_CHECK(7==(cyg_count8)m0.get(
+ Cyg_Clock::real_time_clock->current_value() + 20), "timed get()");
+ CYG_TEST_CHECK(4==q++, "bad synchronization");
+#ifdef CYGMTH_MBOX_PUT_CAN_WAIT
+ CYG_TEST_CHECK(4==(cyg_count8)m1.get());
+
+ CYG_TEST_CHECK(11==q++, "bad synchronization");
+ thread[0]->delay(20); // allow t0 to reach put on m1
+ CYG_TEST_CHECK(14==q++, "bad synchronization");
+ CYG_TEST_CHECK(m0.waiting_to_put(), "waiting_to_put()");
+ do {
+ // after first get m0 contains ( 6 .. 6 9 )
+ i=(cyg_count8)m0.tryget();
+ } while(6==i);
+ CYG_TEST_CHECK(9==i,"put gone awry");
+#endif
+#endif
+ CYG_TEST_PASS_FINISH("Mbox 1 OK");
+}
+
+void mbox1_main( void )
+{
+ CYG_TEST_INIT();
+
+ new_thread(entry0, 0);
+ new_thread(entry1, 1);
+
+ Cyg_Scheduler::start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ mbox1_main();
+}
+
+// EOF mbox1.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/mqueue1.cxx b/cesar/ecos/packages/kernel/current/tests/mqueue1.cxx
new file mode 100644
index 0000000000..3e392cc116
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/mqueue1.cxx
@@ -0,0 +1,411 @@
+/*========================================================================
+//
+// mqueue1.cxx
+//
+// Message queues tests
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-05-12
+// Purpose: This file provides tests for eCos mqueues
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//======================================================================
+*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/kernel.h>
+
+/* INCLUDES */
+
+#include <cyg/infra/cyg_type.h> // common types and externC
+#include <cyg/kernel/thread.hxx> // Cyg_Thread
+#include <cyg/kernel/thread.inl>
+// Specially avoid inlining here due to the way we abuse the mqueue
+// implementation by making lots and lots of calls.
+#define CYGPRI_KERNEL_SYNCH_MQUEUE_INLINE
+#include <cyg/kernel/mqueue.hxx> // Mqueue Header
+#include <cyg/kernel/sema.hxx> // semaphores
+#include <cyg/infra/testcase.h> // test API
+
+// use the common kernel test magic to define 2 threads
+#define NTHREADS 2
+#include "testaux.hxx"
+
+/* GLOBALS */
+
+static char mempool[500];
+static size_t storedmempoollen;
+Cyg_Mqueue *mq;
+static Cyg_Binary_Semaphore t0sem, t1sem;
+static int calledback;
+
+
+/* FUNCTIONS */
+
+static int
+my_memcmp(const void *m1, const void *m2, size_t n)
+{
+ char *s1 = (char *)m1;
+ char *s2 = (char *)m2;
+
+ while (n--) {
+ if (*s1 != *s2)
+ return *s1 - *s2;
+ s1++;
+ s2++;
+ }
+ return 0;
+} // my_memcmp()
+
+static void *
+my_alloc( size_t len )
+{
+ if ( len > sizeof(mempool) )
+ return NULL;
+
+ storedmempoollen = len;
+ return &mempool[0];
+}
+
+static void
+my_free( void *ptr, size_t len )
+{
+ CYG_TEST_PASS_FAIL( (ptr == &mempool[0]) && (len == storedmempoollen),
+ "Freed pool correctly");
+ mq = NULL; // invalidate
+}
+
+static void
+callback(Cyg_Mqueue &mq, CYG_ADDRWORD data)
+{
+ calledback += (int)data;
+}
+
+//************************************************************************
+//************************************************************************
+
+static void
+t0( CYG_ADDRWORD data )
+{
+ Cyg_Mqueue::qerr_t err;
+ char buf[35];
+ size_t len;
+ unsigned int prio;
+ bool b;
+
+ Cyg_Mqueue the_mq(4, 32, &my_alloc, &my_free, &err );
+ CYG_TEST_PASS_FAIL( Cyg_Mqueue::OK == err,
+ "Create queue" );
+ mq = &the_mq;
+
+//------------------------------------------------------------------------
+
+ err = mq->put( "Peter piper picked", sizeof("Peter piper picked"),
+ 5, true );
+ CYG_TEST_PASS_FAIL( Cyg_Mqueue::OK == err, "Simple (put)");
+
+ t1sem.post();
+
+//------------------------------------------------------------------------
+
+ t0sem.wait();
+
+ err = mq->get( buf, &len, &prio, true );
+ b = (err == Cyg_Mqueue::OK);
+ if (b)
+ b = (len == sizeof("a peck of"));
+ if (b)
+ b = (prio == 100);
+ if (b)
+ b = (0 ==
+ my_memcmp(buf, "a peck of", sizeof("a peck of"))
+ );
+ CYG_TEST_PASS_FAIL( b, "Blocking get");
+
+//------------------------------------------------------------------------
+
+ t0sem.wait();
+
+ CYG_TEST_PASS_FAIL( 4 == mq->count(), "mq count" );
+ err = mq->get( buf, &len, &prio, false );
+ b = (err == Cyg_Mqueue::OK);
+ if (b)
+ b = (len == sizeof("pickled peppers"));
+ if (b)
+ b = (prio == 300);
+ if (b)
+ b = (0 ==
+ my_memcmp(buf, "pickled peppers", sizeof("pickled peppers"))
+ );
+ if (b)
+ b = (3 == mq->count());
+ CYG_TEST_PASS_FAIL( b, "Prioritized (get 1)");
+
+ err = mq->get( buf, &len, &prio, false );
+ b = (err == Cyg_Mqueue::OK);
+ if (b)
+ b = (len == sizeof("."));
+ if (b)
+ b = (prio == 250);
+ if (b)
+ b = (0 ==
+ my_memcmp(buf, ".", sizeof("."))
+ );
+ if (b)
+ b = (2 == mq->count());
+ CYG_TEST_PASS_FAIL( b, "Prioritized (get 2)");
+
+ err = mq->get( buf, &len, &prio, false );
+ b = (err == Cyg_Mqueue::OK);
+ if (b)
+ b = (len == 1);
+ if (b)
+ b = (prio == 225);
+ if (b)
+ b = (0 ==
+ my_memcmp(buf, "", 1)
+ );
+ if (b)
+ b = (1 == mq->count());
+ CYG_TEST_PASS_FAIL( b, "Prioritized (get 3)");
+
+ err = mq->get( buf, &len, &prio, false );
+ b = (err == Cyg_Mqueue::OK);
+ if (b)
+ b = (len == sizeof("If Peter"));
+ if (b)
+ b = (prio == 200);
+ if (b)
+ b = (0 ==
+ my_memcmp(buf, "If Peter", sizeof("If Peter"))
+ );
+ if (b)
+ b = (0 == mq->count());
+ CYG_TEST_PASS_FAIL( b, "Prioritized (get 4)");
+
+//------------------------------------------------------------------------
+
+ err = mq->get( buf, &len, &prio, false );
+
+ CYG_TEST_PASS_FAIL( Cyg_Mqueue::WOULDBLOCK == err,
+ "Non-blocking get of empty queue" );
+
+//------------------------------------------------------------------------
+
+ Cyg_Mqueue::callback_fn_t oldcallback;
+
+ oldcallback = mq->setnotify( &callback, (CYG_ADDRWORD) 42 );
+
+ err = mq->put( "If Peter", sizeof("If Peter"),
+ 200, false );
+ CYG_TEST_PASS_FAIL( Cyg_Mqueue::OK == err,
+ "Prioritized (put in empty queue)");
+ CYG_TEST_PASS_FAIL( 42 == calledback, "callback" );
+ CYG_TEST_PASS_FAIL( NULL == oldcallback, "oldcallback" );
+
+ err = mq->get( buf, &len, &prio, false );
+ b = (err == Cyg_Mqueue::OK);
+ if (b)
+ b = (len == sizeof("If Peter"));
+ if (b)
+ b = (prio == 200);
+ if (b)
+ b = (0 ==
+ my_memcmp(buf, "If Peter", sizeof("If Peter"))
+ );
+ CYG_TEST_PASS_FAIL( b, "Prioritized (get 2)");
+
+ t1sem.post();
+
+ err = mq->get( buf, &len, &prio, true );
+ b = (err == Cyg_Mqueue::OK);
+ if (b)
+ b = (len == 32);
+ if (b)
+ b = (42 == calledback);
+ if (b)
+ b = (prio == 250);
+ if (b)
+ b = (0 ==
+ my_memcmp(buf, "12345678901234567890123456789012", 32)
+ );
+ CYG_TEST_PASS_FAIL( b, "callback (blocked wait)");
+
+//------------------------------------------------------------------------
+
+ t1sem.post();
+ t0sem.wait();
+
+} // t0()
+
+
+//************************************************************************
+//************************************************************************
+
+
+static void
+t1( CYG_ADDRWORD data )
+{
+ Cyg_Mqueue::qerr_t err;
+ char buf[35];
+ size_t len;
+ unsigned int prio;
+ bool b;
+
+//------------------------------------------------------------------------
+
+ // wait till t0 says we can go
+ t1sem.wait();
+
+ err = mq->get( buf, &len, &prio, true );
+ b = (err == Cyg_Mqueue::OK);
+ if (b)
+ b = (len == sizeof("Peter piper picked"));
+ if (b)
+ b = (prio == 5);
+ if (b)
+ b = (0 ==
+ my_memcmp(buf, "Peter piper picked", sizeof("Peter piper picked"))
+ );
+
+ CYG_TEST_PASS_FAIL( b, "Simple");
+
+//------------------------------------------------------------------------
+
+ t0sem.post(); // t0 should run straight away
+ Cyg_Thread::yield(); // but just in case we have a funny sched
+
+ // by now t0 is blocked in mq->get
+
+ err = mq->put( "a peck of", sizeof("a peck of"),
+ 100, false );
+ CYG_TEST_PASS_FAIL( Cyg_Mqueue::OK == err, "Block (put in empty queue)");
+
+//------------------------------------------------------------------------
+
+ err = mq->put( "If Peter", sizeof("If Peter"),
+ 200, false );
+ CYG_TEST_PASS_FAIL( Cyg_Mqueue::OK == err,
+ "Prioritized (put in empty queue)");
+
+ err = mq->put( "pickled peppers", sizeof("pickled peppers"),
+ 300, false );
+ CYG_TEST_PASS_FAIL( Cyg_Mqueue::OK == err,
+ "Prioritized (put in queue w/1)");
+
+ err = mq->put( ".", sizeof("."), 250, false );
+ CYG_TEST_PASS_FAIL( Cyg_Mqueue::OK == err,
+ "Prioritized (put in queue w/2)");
+
+ err = mq->put( "", 1, 225, false );
+ CYG_TEST_PASS_FAIL( Cyg_Mqueue::OK == err,
+ "Prioritized (put in queue w/3)");
+
+ err = mq->put( "foobar", 6, 1, false );
+ CYG_TEST_PASS_FAIL( Cyg_Mqueue::WOULDBLOCK == err,
+ "Prioritized (full queue)");
+
+ t0sem.post();
+
+//------------------------------------------------------------------------
+
+ t1sem.wait();
+ Cyg_Thread::yield(); // but just in case we have a funny sched
+
+ err = mq->put( "12345678901234567890123456789012xxxx", 32,
+ 250, false );
+ CYG_TEST_PASS_FAIL( Cyg_Mqueue::OK == err,
+ "callback (put in queue)");
+
+//------------------------------------------------------------------------
+
+ t1sem.wait();
+
+ // Create an oversized queue
+ {
+ Cyg_Mqueue huge_mq(99999, 99999, &my_alloc, &my_free, &err );
+ CYG_TEST_PASS_FAIL( Cyg_Mqueue::NOMEM == err,
+ "Oversized queue rejected" );
+ // and it now gets destructed - but that shouldn't call free
+ // to be called
+ }
+
+//------------------------------------------------------------------------
+
+ t0sem.post(); // t0 should run straight away
+ Cyg_Thread::yield(); // but just in case we have a funny sched
+
+ // check that mq was destroyed when t0 dropped off the end
+ CYG_TEST_PASS_FAIL( NULL == mq, "queue destroyed correctly" );
+
+ CYG_TEST_EXIT("kernel mqueue test 1");
+
+} // t1()
+
+
+//************************************************************************
+//************************************************************************
+
+externC void
+cyg_user_start(void)
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO( "Starting kernel mqueue test 1" );
+ new_thread( t0, 0);
+ new_thread( t1, 1);
+
+#ifdef CYGIMP_THREAD_PRIORITY
+ thread[0]->set_priority( 4 );
+ thread[1]->set_priority( 5 ); // make sure the threads execute as intended
+#endif
+} // cyg_user_start()
+
+//------------------------------------------------------------------------
+
+
+/* EOF mqueue1.cxx */
diff --git a/cesar/ecos/packages/kernel/current/tests/mutex0.cxx b/cesar/ecos/packages/kernel/current/tests/mutex0.cxx
new file mode 100644
index 0000000000..e8a208f0d7
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/mutex0.cxx
@@ -0,0 +1,96 @@
+//==========================================================================
+//
+// mutex0.cxx
+//
+// Mutex and condition variable test 0
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-02-24
+// Description: Limited to checking constructors/destructors
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/mutex.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include "testaux.hxx"
+
+static Cyg_Mutex mutex0;
+
+static Cyg_Condition_Variable cvar0( mutex0 );
+
+static bool flash( void )
+{
+ Cyg_Mutex m0;
+
+ CYG_ASSERTCLASSO(m0, "error");
+
+ Cyg_Condition_Variable cv0( m0 );
+
+ CYG_ASSERTCLASSO(cv0, "error");
+
+ return true;
+}
+
+void mutex0_main( void )
+{
+ CYG_TEST_INIT();
+
+ CHECK(flash());
+ CHECK(flash());
+
+ CYG_ASSERTCLASSO(mutex0, "error");
+ CYG_ASSERTCLASSO(cvar0, "error");
+
+ CYG_TEST_PASS_FINISH("Mutex 0 OK");
+
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ mutex0_main();
+}
+// EOF mutex0.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/mutex1.cxx b/cesar/ecos/packages/kernel/current/tests/mutex1.cxx
new file mode 100644
index 0000000000..5233a3e67d
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/mutex1.cxx
@@ -0,0 +1,162 @@
+//==========================================================================
+//
+// mutex1.cxx
+//
+// Mutex test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-02-24
+// Description: Tests basic mutex functionality.
+// Omissions: Timed wait.
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/sched.hxx> // Cyg_Scheduler::start()
+#include <cyg/kernel/thread.hxx> // Cyg_Thread
+
+#include <cyg/kernel/mutex.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/sched.inl>
+#include <cyg/kernel/thread.inl>
+
+
+#define NTHREADS 3
+#include "testaux.hxx"
+
+static Cyg_Mutex m0, m1;
+static Cyg_Condition_Variable cvar0( m0 ), cvar1( m0 ), cvar2( m1 );
+
+static cyg_ucount8 m0d=0, m1d=0;
+
+static void finish( cyg_ucount8 t )
+{
+ m1.lock(); {
+ m1d |= 1<<t;
+ if( 0x7 == m1d )
+ CYG_TEST_PASS_FINISH("Mutex 1 OK");
+ cvar2.wait();
+ }
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+static void entry0( CYG_ADDRWORD data )
+{
+ m0.lock(); {
+ CHECK( ! m0.trylock() );
+ m1.lock(); {
+ CHECK( ! m0.trylock() );
+ } m1.unlock();
+ } m0.unlock();
+
+ m0.lock(); {
+ while ( 0 == m0d )
+ cvar0.wait();
+ CHECK( 1 == m0d++ );
+ cvar0.signal();
+ while ( 4 != m0d )
+ cvar1.wait();
+ CHECK( 4 == m0d );
+ } m0.unlock();
+
+ finish( data );
+}
+
+static void entry1( CYG_ADDRWORD data )
+{
+ m0.lock(); {
+ CHECK( m1.trylock() ); {
+ } m1.unlock();
+ } m0.unlock();
+
+ m0.lock(); {
+ CHECK( 0 == m0d++ );
+ cvar0.broadcast();
+ } m0.unlock();
+
+ m0.lock(); {
+ while( 1 == m0d )
+ cvar0.wait();
+ CHECK( 2 == m0d++ );
+ cvar0.signal();
+ while (3 == m0d )
+ cvar1.wait();
+ } m0.unlock();
+
+ finish( data ); // At most 1 finish inside m0 lock
+}
+
+static void entry2( CYG_ADDRWORD data )
+{
+ m0.lock(); {
+ while( 3 != m0d ) {
+ cvar0.wait();
+ }
+ CHECK( 3 == m0d++ );
+ cvar1.broadcast();
+ } m0.unlock();
+
+ finish( data );
+}
+
+void mutex1_main( void )
+{
+ CYG_TEST_INIT();
+
+ new_thread(entry0, 0);
+ new_thread(entry1, 1);
+ new_thread(entry2, 2);
+
+ Cyg_Scheduler::start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ mutex1_main();
+}
+// EOF mutex1.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/mutex2.cxx b/cesar/ecos/packages/kernel/current/tests/mutex2.cxx
new file mode 100644
index 0000000000..cc23bd29f8
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/mutex2.cxx
@@ -0,0 +1,272 @@
+//==========================================================================
+//
+// mutex1.cxx
+//
+// Mutex test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1999-02-19
+// Description: Tests mutex release functionality
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/sched.hxx> // Cyg_Scheduler::start()
+#include <cyg/kernel/thread.hxx> // Cyg_Thread
+
+#include <cyg/kernel/mutex.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/sched.inl>
+#include <cyg/kernel/thread.inl>
+
+// ------------------------------------------------------------------------
+
+#if !defined(CYGPKG_KERNEL_SMP_SUPPORT)
+
+// ------------------------------------------------------------------------
+
+#define NTHREADS 4
+#include "testaux.hxx"
+#include "testaux.h"
+
+// ------------------------------------------------------------------------
+
+static Cyg_Mutex m0, m1;
+static Cyg_Condition_Variable cvar0( m0 ), cvar1( m0 ), cvar2( m1 );
+
+volatile int thread_state[NTHREADS];
+
+// ------------------------------------------------------------------------
+// This thread is meant to get hung up trying to re-acquire m0
+// after waiting on the cv.
+
+static void entry0( CYG_ADDRWORD data )
+{
+ CYG_TEST_INFO( "thread0: lock mutex 0");
+
+ m0.lock();
+
+ CYG_TEST_INFO( "thread0: wait cvar 0");
+
+ thread_state[data] = 1;
+
+ cvar0.wait();
+
+ thread_state[data] = 2;
+
+ CYG_TEST_INFO( "thread0: woke from cvar 0");
+
+ CYG_TEST_INFO( "thread0: unlock mutex 0");
+
+ m0.unlock();
+
+ thread_state[data] = 3;
+
+ CYG_TEST_INFO( "thread0: exit");
+
+ thread[data]->exit();
+}
+
+// ------------------------------------------------------------------------
+// This thread is meant to claim and keep m0.
+
+static void entry1( CYG_ADDRWORD data )
+{
+ CYG_TEST_INFO( "thread1: lock mutex 0");
+
+ m0.lock();
+
+ CYG_TEST_INFO( "thread1: lock mutex 1");
+
+ thread_state[data] = 1;
+
+ m1.lock();
+
+ thread_state[data] = 2;
+
+ CYG_TEST_INFO( "thread1: wait cvar 2");
+
+ cvar2.wait();
+
+ thread_state[data] = 3;
+
+ CYG_TEST_INFO( "thread1: woke from cvar 2");
+
+ CYG_TEST_INFO( "thread1: unlock mutex 1");
+
+ m1.unlock();
+
+ thread_state[data] = 4;
+
+ CYG_TEST_INFO( "thread1: unlock m0");
+
+ m0.unlock();
+
+ thread_state[data] = 5;
+
+ CYG_TEST_INFO( "thread1: exit");
+
+ thread[data]->exit();
+}
+
+// ------------------------------------------------------------------------
+// This thread is meant to get hung trying to acquire m0, and then get
+// released out of it by thread3.
+
+static void entry2( CYG_ADDRWORD data )
+{
+ CYG_TEST_INFO( "thread2: lock mutex 0");
+
+ thread_state[data] = 1;
+
+ if( m0.lock() )
+ {
+ thread_state[data] = 2;
+
+ CYG_TEST_INFO( "thread2: lock mutex 0 - returned TRUE");
+ CYG_TEST_FAIL_FINISH(" m0.lock() returned TRUE" );
+ }
+ else
+ {
+ thread_state[data] = 3;
+ CYG_TEST_INFO( "thread2: lock mutex 0 - returned FALSE");
+ }
+
+ CYG_TEST_INFO( "thread2: exit");
+
+ thread[data]->exit();
+}
+
+// ------------------------------------------------------------------------
+
+static void entry3( CYG_ADDRWORD data )
+{
+
+ CHECK( thread_state[0] == 1 );
+ CHECK( thread_state[1] == 2 );
+ CHECK( thread_state[2] == 1 );
+
+ CYG_TEST_INFO( "thread3: signal cvar 0");
+
+ cvar0.signal();
+
+ CHECK( thread_state[0] == 1 );
+ CHECK( thread_state[1] == 2 );
+ CHECK( thread_state[2] == 1 );
+
+ CYG_TEST_INFO( "thread3: release mutex 0");
+
+ m0.release();
+
+ CHECK( thread_state[0] == 1 );
+ CHECK( thread_state[1] == 2 );
+ CHECK( thread_state[2] == 3 );
+
+ CYG_TEST_INFO( "thread3: signal cvar 2");
+
+ cvar2.signal();
+
+ CHECK( thread_state[0] == 3 );
+ CHECK( thread_state[1] == 5 );
+ CHECK( thread_state[2] == 3 );
+
+ CYG_TEST_PASS_FINISH( "mutex2 finished OK");
+
+ CYG_TEST_INFO( "thread3: exit");
+
+ thread[data]->exit();
+}
+
+// ------------------------------------------------------------------------
+
+void mutex2_main( void )
+{
+ CYG_TEST_INIT();
+
+ new_thread(entry0, 0);
+ new_thread(entry1, 1);
+ new_thread(entry2, 2);
+ new_thread(entry3, 3);
+
+ // Set priorities from the top to prevent two threads getting
+ // the same priority: this causes an ASSERT on some configurations.
+ thread[3]->set_priority( 5 );
+ thread[2]->set_priority( 4 );
+ thread[1]->set_priority( 3 );
+ thread[0]->set_priority( 2 );
+
+ Cyg_Scheduler::start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+// ------------------------------------------------------------------------
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ mutex2_main();
+}
+
+// ------------------------------------------------------------------------
+
+#else // CYGPKG_KERNEL_SMP_SUPPORT
+
+// ------------------------------------------------------------------------
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Mutex2 test requires: !defined(CYGPKG_KERNEL_SMP_SUPPORT)");
+
+}
+
+// ------------------------------------------------------------------------
+
+#endif // CYGPKG_KERNEL_SMP_SUPPORT
+
+// ------------------------------------------------------------------------
+// EOF mutex2.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/mutex3.cxx b/cesar/ecos/packages/kernel/current/tests/mutex3.cxx
new file mode 100644
index 0000000000..7abeec8af3
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/mutex3.cxx
@@ -0,0 +1,631 @@
+//==========================================================================
+//
+// mutex3.cxx
+//
+// Mutex test 3 - priority inheritance
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): hmt
+// Contributors: hmt
+// Date: 2000-01-06
+// Description: Tests mutex priority inheritance
+//####DESCRIPTIONEND####
+
+#include <pkgconf/hal.h>
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/sched.hxx> // Cyg_Scheduler::start()
+#include <cyg/kernel/thread.hxx> // Cyg_Thread
+
+#include <cyg/kernel/mutex.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/sched.inl>
+#include <cyg/kernel/thread.inl>
+
+#include <cyg/infra/diag.h> // diag_printf
+
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+externC void
+cyg_hal_invoke_constructors();
+#endif
+
+// ------------------------------------------------------------------------
+//
+// These checks should be enough; any other scheduler which has priorities
+// should manifest as having no priority inheritance, but otherwise fine,
+// so the test should work correctly.
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK) && \
+ (CYGNUM_KERNEL_SCHED_PRIORITIES > 20) && \
+ !defined(CYGPKG_KERNEL_SMP_SUPPORT)
+
+// ------------------------------------------------------------------------
+// Manufacture a simpler feature test macro for priority inheritance than
+// the configuration gives us. We have priority inheritance if it is configured
+// as the only protocol, or if it is the default protocol for dynamic protocol
+// choice.
+// FIXME: If we have dynamic protocol choice, we can also set priority inheritance
+// as the protocol to be used on the mutexes we are interested in. At present we
+// do not do this.
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT
+# ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+# ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_INHERIT
+# define PRIORITY_INHERITANCE "dynamic-default-inherit"
+# endif
+# else
+# define PRIORITY_INHERITANCE "static-inherit"
+# endif
+#endif
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+# ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+# ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_CEILING
+# if CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_PRIORITY <= 5
+# define PRIORITY_INHERITANCE "dynamic-default-ceiling-high"
+# elif CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_PRIORITY >= 15
+# define NO_PRIORITY_INHERITANCE "dynamic-default-ceiling-low"
+# else
+# define PRIORITY_UNKNOWN "dynamic-default-ceiling-mid"
+# endif
+# endif
+# else
+# if CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_PRIORITY <= 5
+# define PRIORITY_INHERITANCE "static-ceiling-high"
+# elif CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_PRIORITY >= 15
+# define NO_PRIORITY_INHERITANCE "static-ceiling-low"
+# else
+# define PRIORITY_UNKNOWN "static-ceiling-mid"
+# endif
+# endif
+#endif
+
+#ifndef PRIORITY_INHERITANCE
+# ifndef NO_PRIORITY_INHERITANCE
+# define NO_PRIORITY_INHERITANCE "no scheme selected"
+# endif
+#endif
+
+// ------------------------------------------------------------------------
+// Management functions
+//
+// Stolen from testaux.hxx and copied in here because I want to be able to
+// reset the world also.
+
+#define NTHREADS 7
+
+inline void *operator new(size_t size, void *ptr) { return ptr; };
+
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+static Cyg_Thread *thread[NTHREADS] = { 0 };
+
+typedef CYG_WORD64 CYG_ALIGNMENT_TYPE;
+
+static CYG_ALIGNMENT_TYPE thread_obj[NTHREADS] [
+ (sizeof(Cyg_Thread)+sizeof(CYG_ALIGNMENT_TYPE)-1)
+ / sizeof(CYG_ALIGNMENT_TYPE) ];
+
+static CYG_ALIGNMENT_TYPE stack[NTHREADS] [
+ (STACKSIZE+sizeof(CYG_ALIGNMENT_TYPE)-1)
+ / sizeof(CYG_ALIGNMENT_TYPE) ];
+
+static volatile int nthreads = 0;
+
+static Cyg_Thread *new_thread( cyg_thread_entry *entry,
+ CYG_ADDRWORD data,
+ CYG_ADDRWORD priority,
+ int do_resume )
+{
+ int _nthreads = nthreads++;
+
+ CYG_ASSERT(_nthreads < NTHREADS,
+ "Attempt to create more than NTHREADS threads");
+
+ thread[_nthreads] = new( (void *)&thread_obj[_nthreads] )
+ Cyg_Thread(priority,
+ entry, data,
+ NULL, // no name
+ (CYG_ADDRESS)stack[_nthreads], STACKSIZE );
+
+ if ( do_resume )
+ thread[_nthreads]->resume();
+
+ return thread[_nthreads];
+}
+
+
+static void kill_threads( void )
+{
+ CYG_ASSERT(nthreads <= NTHREADS,
+ "More than NTHREADS threads");
+ CYG_ASSERT( Cyg_Thread::self() == thread[0],
+ "kill_threads() not called from thread 0");
+ while ( nthreads > 1 ) {
+ nthreads--;
+ if ( NULL != thread[nthreads] ) {
+ thread[nthreads]->kill();
+ thread[nthreads]->~Cyg_Thread();
+ thread[nthreads] = NULL;
+ }
+ }
+ CYG_ASSERT(nthreads == 1,
+ "No threads left");
+}
+
+// ------------------------------------------------------------------------
+
+#define DELAYFACTOR 1 // for debugging
+
+// ------------------------------------------------------------------------
+
+static Cyg_Mutex mutex;
+
+// These are for reporting back to the master thread
+volatile int got_it = 0;
+volatile int t3ran = 0;
+volatile int t3ended = 0;
+volatile int extras[4] = {0,0,0,0};
+
+volatile int go_flag = 0; // but this one controls thread 3 from thread 2
+
+// ------------------------------------------------------------------------
+// 0 to 3 of these run generally to interfere with the other processing,
+// to cause multiple prio inheritances, and clashes in any orders.
+
+static void extra_thread( CYG_ADDRWORD data )
+{
+#define XINFO( z ) \
+ do { z[13] = '0' + data; CYG_TEST_INFO( z ); } while ( 0 )
+
+ static char running[] = "Extra thread Xa running";
+ static char exiting[] = "Extra thread Xa exiting";
+ static char resumed[] = "Extra thread Xa resumed";
+ static char locked[] = "Extra thread Xa locked";
+ static char unlocked[] = "Extra thread Xa unlocked";
+
+ XINFO( running );
+
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ self->suspend();
+
+ XINFO( resumed );
+
+ mutex.lock();
+
+ XINFO( locked );
+
+ mutex.unlock();
+
+ XINFO( unlocked );
+
+ extras[ data ] ++;
+
+ XINFO( exiting );
+
+}
+
+// ------------------------------------------------------------------------
+
+static void t1( CYG_ADDRWORD data )
+{
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ CYG_TEST_INFO( "Thread 1 running" );
+
+ self->suspend();
+
+ mutex.lock();
+
+ got_it++;
+
+ CYG_TEST_CHECK( 0 == t3ended, "T3 ended prematurely [T1,1]" );
+
+ mutex.unlock();
+
+ CYG_TEST_CHECK( 0 == t3ended, "T3 ended prematurely [T1,2]" );
+
+ // That's all.
+
+ CYG_TEST_INFO( "Thread 1 exit" );
+}
+
+// ------------------------------------------------------------------------
+
+static void t2( CYG_ADDRWORD data )
+{
+ Cyg_Thread *self = Cyg_Thread::self();
+ int i;
+ cyg_tick_count then, now;
+
+
+ CYG_TEST_INFO( "Thread 2 running" );
+
+ CYG_TEST_CHECK( 0 == (data & ~0x77), "Bad T2 arg: extra bits" );
+ CYG_TEST_CHECK( 0 == (data & (data >> 4)), "Bad T2 arg: overlap" );
+
+ self->suspend();
+
+ // depending on our config argument, optionally restart some of the
+ // extra threads to throw noise into the scheduler:
+ for ( i = 0; i < 3; i++ )
+ if ( (1 << i) & data ) // bits 0-2 control
+ thread[i+4]->resume(); // made sure extras are thread[4-6]
+
+ self->delay( DELAYFACTOR * 10 ); // let those threads run
+
+ Cyg_Scheduler::lock(); // do this next lot atomically
+
+ go_flag = 1; // unleash thread 3
+ thread[1]->resume(); // resume thread 1
+
+ // depending on our config argument, optionally restart some of the
+ // extra threads to throw noise into the scheduler at this later point:
+ for ( i = 4; i < 7; i++ )
+ if ( (1 << i) & data ) // bits 4-6 control
+ thread[i]->resume(); // made sure extras are thread[4-6]
+
+ Cyg_Scheduler::unlock(); // let scheduling proceed
+
+ // Need a delay (but not a CPU yield) to allow t3 to awaken and act on
+ // the go_flag, otherwise we check these details below too soon.
+ // Actually, waiting for the clock to tick a couple of times would be
+ // better, so that is what we will do. Must be a busy-wait.
+ then = Cyg_Clock::real_time_clock->current_value();
+ do {
+ now = Cyg_Clock::real_time_clock->current_value();
+ // Wait longer than the delay in t3 waiting on go_flag
+ } while ( now < (then + 3) );
+
+#ifdef PRIORITY_UNKNOWN
+ CYG_TEST_INFO( "Not checking: " PRIORITY_UNKNOWN );
+#else
+#ifdef PRIORITY_INHERITANCE
+ CYG_TEST_INFO( "Checking priority scheme: " PRIORITY_INHERITANCE );
+ CYG_TEST_CHECK( 1 == t3ran, "Thread 3 did not run" );
+ CYG_TEST_CHECK( 1 == got_it, "Thread 1 did not get the mutex" );
+#else
+ CYG_TEST_INFO( "Checking NO priority scheme: " NO_PRIORITY_INHERITANCE );
+ CYG_TEST_CHECK( 0 == t3ran, "Thread 3 DID run" );
+ CYG_TEST_CHECK( 0 == got_it, "Thread 1 DID get the mutex" );
+#endif
+#endif
+
+ CYG_TEST_CHECK( 0 == t3ended, "Thread 3 ended prematurely [T2,1]" );
+
+ self->delay( DELAYFACTOR * 20 ); // let those threads run
+
+ CYG_TEST_CHECK( 1 == t3ran, "Thread 3 did not run" );
+ CYG_TEST_CHECK( 1 == got_it, "Thread 1 did not get the mutex" );
+ CYG_TEST_CHECK( 1 == t3ended, "Thread 3 has not ended" );
+
+ for ( i = 0; i < 3; i++ )
+ if ( (1 << i) & (data | data >> 4) ) // bits 0-2 and 4-6 control
+ CYG_TEST_CHECK( 1 == extras[i+1], "Extra thread did not run" );
+ else
+ CYG_TEST_CHECK( 0 == extras[i+1], "Extra thread ran" );
+
+ CYG_TEST_PASS( "Thread 2 exiting, AOK" );
+ // That's all: restart the control thread.
+ thread[0]->resume();
+}
+
+// ------------------------------------------------------------------------
+
+static void t3( CYG_ADDRWORD data )
+{
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ CYG_TEST_INFO( "Thread 3 running" );
+
+ mutex.lock();
+
+ self->delay( DELAYFACTOR * 5 ); // let thread 3a run
+
+ thread[2]->resume(); // resume thread 2
+
+ while ( 0 == go_flag )
+ self->delay(1); // wait until we are told to go
+
+ t3ran ++; // record the fact
+
+ CYG_TEST_CHECK( 0 == got_it, "Thread 1 claims to have got my mutex" );
+
+ mutex.unlock();
+
+ t3ended ++; // record that we came back
+
+ CYG_TEST_CHECK( 1 == got_it, "Thread 1 did not get the mutex" );
+
+ CYG_TEST_INFO( "Thread 3 exit" );
+}
+
+// ------------------------------------------------------------------------
+
+static void control_thread( CYG_ADDRWORD data )
+{
+ Cyg_Thread *self = Cyg_Thread::self();
+ int i;
+
+ CYG_TEST_INIT();
+ CYG_TEST_INFO( "Control Thread running" );
+
+ // Go through the 27 possibilitied of resuming the extra threads
+ // 0: not at all
+ // 1: early in the process
+ // 2: later on
+ // which are represented by bits 0-3 and 4-6 resp in the argument to
+ // thread 2 (none set means no resume at all).
+ for ( i = 0; i < 27; i++ ) {
+ static int xx[] = { 0, 1, 16 };
+ int j = i % 3;
+ int k = (i / 3) % 3;
+ int l = (i / 9) % 3;
+
+ int d = xx[j] | (xx[k]<<1) | (xx[l]<<2) ;
+
+ if ( cyg_test_is_simulator && (0 != i && 13 != i && 26 != i) )
+ continue; // 13 is 111 base 3, 26 is 222 base 3
+
+#ifdef PRIORITY_INHERITANCE
+ // If the simple scheme plus relay enhancement, or any other
+ // *complete* scheme, we can run all three ancillary threads no
+ // problem, so no special action here.
+
+#else
+ // If no priority inheritance at all, running threads 1a and 2a is
+ // OK, but not thread 3a; it blocks the world.
+ if ( l ) // Cannot run thread 3a if no
+ break; // priority inheritance at all.
+#endif
+
+ mutex = Cyg_Mutex(); // Reinitialize this
+
+ got_it = 0;
+ t3ran = 0;
+ t3ended = 0;
+ for ( int z = 0; z < 4; z++ ) extras[z] = 0;
+ go_flag = 0;
+
+ new_thread( t1, 0, 5, 1 ); // Slot 1
+ new_thread( t2, d, 10, 1 ); // Slot 2
+ new_thread( t3, 0, 15, 1 ); // Slot 3
+
+ new_thread( extra_thread, 1, 8, j ); // Slot 4
+ new_thread( extra_thread, 2, 12, k ); // Slot 5
+ new_thread( extra_thread, 3, 17, l ); // Slot 6
+
+ {
+ static char *a[] = { "inactive", "run early", "run late" };
+ diag_printf( "\n----- [%2d] New Cycle: 0x%02x, Threads 1a %s, 2a %s, 3a %s -----\n",
+ i, d, a[j], a[k], a[l] );
+ }
+
+ self->suspend();
+
+ kill_threads();
+ mutex.~Cyg_Mutex();
+ }
+ CYG_TEST_EXIT( "Control Thread exit" );
+}
+
+// ------------------------------------------------------------------------
+
+externC void
+cyg_user_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ new_thread( control_thread, 0, 2, 1 );
+}
+
+#else // CYGVAR_KERNEL_COUNTERS_CLOCK &c
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_INFO("Mutex3 test requires:\n"
+ "CYGVAR_KERNEL_COUNTERS_CLOCK &&\n"
+ "(CYGNUM_KERNEL_SCHED_PRIORITIES > 20) &&\n"
+ "!defined(CYGPKG_KERNEL_SMP_SUPPORT)\n");
+ CYG_TEST_NA("Mutex3 test requirements");
+}
+#endif // CYGVAR_KERNEL_COUNTERS_CLOCK &c
+
+
+// ------------------------------------------------------------------------
+// Documentation: enclosed is the design of this test.
+//
+// It has been carefully constructed so that it does NOT use other kernel
+// facilities (aside from delay-task) to test that priority inheritance is
+// working, or not, as intended by the configuration.
+//
+// These notes describe the flow of control in one run of the test with the
+// ancillary tasks optionally interspersed. The details of how those extra
+// tasks are or are not allowed to run are not described.
+//
+//
+//
+// The only change in the test that depends on whether there is inheritance or
+// not is the check in thread 2 on "3-ran" and "got it" flags marked ****
+//
+//
+// volatile &c booleans:
+// "got it" = FALSE
+// "3-ran" = FALSE
+// "3-ended" = FALSE
+// "extras"[3] = FALSE
+//
+// thread 1. prio 5, self-suspend.
+//
+// thread 1a, prio 8, self-suspend.
+//
+// thread 2. prio 10, self-suspend.
+//
+// thread 2a, prio 12, self-suspend.
+//
+// thread 3. prio 15, runs, lock mutex, resume(2)
+//
+// thread 3a, prio 17, self-suspend.
+//
+// 2. runs,
+// 2. resume(3a) +++OPTIONAL
+// 2. resume(2a) +++OPTIONAL
+// 2. resume(1a) +++OPTIONAL
+// [1a lock-fail] thread 3->prio := 8
+//
+// [3. runs maybe, does the looping thing]
+//
+// 2. sleep a while...
+//
+// [2a lock-fail] thread 3->prio := 12
+//
+// [3. runs maybe, does the looping thing]
+//
+// [3a lock-fail] thread 3->prio unchanged
+//
+// [3. runs maybe, does the looping thing]
+//
+// 2. lock scheduler
+// 2. set "go-flag"
+// 2. resume(1)
+// 2. resume(1a) +++OPTIONAL
+// 2. resume(2a) +++OPTIONAL
+// 2. resume(3a) +++OPTIONAL
+// 2. unlock scheduler
+//
+// 1. runs, lock mutex - thread 3 has it locked
+//
+// 2. busy-waits a bit for thread 3 to come out of its delay() loop.
+// This must be a *busy*wait so that 3 can only run via the
+// inherited raised priority.
+//
+// [xa. all do the same: lock mutex, ]
+// [xa. unlock mutex ]
+// [xa. set a flag "extras"[x] to say we are done. ]
+// [xa. exit ]
+//
+//
+//
+// INHERIT
+// -------
+//
+// thread 3->prio := 5
+//
+// 3. runs,
+// 3. set a flag to say "3-ran",
+// 3. loop with a sleep(1) until "go-flag" is set.
+// 3. check "got it" is false,
+// 3. then unlock mutex,
+//
+// thread 3->prio := 15
+//
+// 1. runs, set a flag to say "got it",
+// 1. check "3-ended" flag is false
+// 1. unlock mutex,
+// 1. check "3-ended" flag is still false
+// 1. exit.
+//
+// [1a locks, unlocks, exits]
+//
+// 2. runs, check "3-ran" and "got it" flags are TRUE ****
+// 2. check "3-ended" flag is false
+// 2. sleeps for a while so that...
+//
+// [2a locks, unlocks, exits]
+//
+// 3. runs, set "3-ended" flag,
+// 3. check "3-ran" and "got it" flags
+// 3. exit
+//
+// [3a locks, unlocks, exits]
+//
+// 2. awakens, checks all flags true,
+// 2. check that all "extra" threads that we started have indeed run
+// 2. end of test.
+//
+//
+//
+//
+// NO-INHERIT
+// ----------
+// thread 1 is waiting on the mutex
+//
+// [1a lock-fail]
+//
+// 2. runs, checks that "3-ran" and "got it" flags are FALSE ****
+// 2. check "3-ended" flag is false
+// 2. sleeps for a while so that...
+//
+// [2a. lock-fail]
+//
+// 3. runs, set a flag to say "3-ran",
+// 3. check "got it" is false,
+// 3. then unlock mutex,
+//
+// 1. runs, set a flag to say "got it",
+// 1. check "3-ended" flag is false
+// 1. unlock mutex,
+// 1. check "3-ended" flag is still false
+// 1. exit.
+//
+// [1a locks, unlocks, exits]
+// [2a locks, unlocks, exits]
+//
+// 3. runs, set "3-ended" flag,
+// 3. check "3-ran" and "got it" flags
+// 3. exit
+//
+// [3a locks, unlocks, exits]
+//
+// 2. awakens, checks all flags true,
+// 2. check that all "extra" threads that we started have indeed run
+// 2. end of test.
+//
+//
+// (the end)
+//
+//
+// ------------------------------------------------------------------------
+
+// EOF mutex3.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/philo.cxx b/cesar/ecos/packages/kernel/current/tests/philo.cxx
new file mode 100644
index 0000000000..892d0db72a
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/philo.cxx
@@ -0,0 +1,241 @@
+//==========================================================================
+//
+// philo.cxx
+//
+// A test of the dining philosophers problem
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-02-24
+// Description: A test of the dining philosophers problem
+//####DESCRIPTIONEND####
+//
+
+#include <cyg/kernel/kernel.hxx>
+
+#include <cyg/hal/hal_io.h>
+
+// -------------------------------------------------------------------------
+// Data for the philosophers problem
+
+#define PHILOSOPHERS 15 // number of philosophers
+#define STACKSIZE (2*1024) // size of thread stack
+
+#define NTHREADS PHILOSOPHERS
+#include "testaux.hxx"
+
+// array of chopsticks
+Cyg_Binary_Semaphore chopstick[PHILOSOPHERS];
+
+
+//cyg_thread_entry Philosopher;
+
+// -------------------------------------------------------------------------
+// State recording and display
+
+static char pstate[PHILOSOPHERS+1]; // state vector showing what each
+ // philosopher is doing
+
+Cyg_Mutex state_mutex;
+
+#ifdef CYG_HAL_MN10300_MN103002
+static cyg_count8 eaters = 0;
+#endif
+
+void change_state(int id, char newstate)
+{
+ CYG_INSTRUMENT_USER( 1, 0, 0);
+ state_mutex.lock();
+ CYG_INSTRUMENT_USER( 2, 0, 0);
+
+#ifdef CYG_HAL_MN10300_MN103002
+ if( pstate[id] == 'E' ) eaters--;
+ if( newstate == 'E' ) eaters++;
+// led(eaters);
+#endif
+
+ pstate[id] = newstate;
+
+ diag_write_string(pstate);
+#if 0
+ diag_write_char(' ');
+ diag_write_dec(Cyg_Scheduler::get_thread_switches());
+#endif
+ diag_write_char('\n');
+
+ CYG_INSTRUMENT_USER( 3, 0, 0);
+ state_mutex.unlock();
+ CYG_INSTRUMENT_USER( 4, 0, 0);
+
+}
+
+char get_state( int id)
+{
+ state_mutex.lock();
+
+ char s = pstate[id];
+
+ state_mutex.unlock();
+
+ return s;
+}
+
+// -------------------------------------------------------------------------
+// Thread to behave like a philosopher
+
+void Philosopher( CYG_ADDRESS id )
+{
+ Cyg_Thread *self = Cyg_Thread::self();
+ Cyg_Binary_Semaphore *first_stick = &chopstick[id];
+ Cyg_Binary_Semaphore *second_stick = &chopstick[(id+1)%PHILOSOPHERS];
+#ifdef CYGPKG_INFRA_DEBUG
+ int left_philo = ((id==0)?PHILOSOPHERS:id)-1;
+ int right_philo = (id==PHILOSOPHERS-1)?0:(id+1);
+#endif
+
+ CYG_ASSERT( id >= 0 && id < PHILOSOPHERS, "Bad id");
+
+ // Deadlock avoidance. The easiest way to make the philosophers
+ // behave is to make each pick up the lowest numbered stick
+ // first. This is how it works out anyway for all the philosophers
+ // except the last, who must have his sticks swapped.
+
+ if( id == PHILOSOPHERS-1 )
+ {
+ Cyg_Binary_Semaphore *t = first_stick;
+ first_stick = second_stick;
+ second_stick = t;
+ }
+
+ // The following variable is shared by all philosophers.
+ // It is incremented unprotected, but this does not matter
+ // since it is only present to introduce a little variability
+ // into the think and eat times.
+
+ static int cycle = 0;
+
+ for(;;)
+ {
+ // Think for a bit
+
+ self->delay((id+cycle++)%12); // Cogito ergo sum...
+
+ // I am now hungry, try to get the chopsticks
+
+ change_state(id,'H');
+
+ // Get the first stick
+ CYG_INSTRUMENT_USER( 5, 0, 0);
+ first_stick->wait();
+ CYG_INSTRUMENT_USER( 6, 0, 0);
+
+ // Get the second stick
+ CYG_INSTRUMENT_USER( 7, 0, 0);
+ second_stick->wait();
+ CYG_INSTRUMENT_USER( 8, 0, 0);
+
+ // Got them, now eat
+
+ change_state(id,'E');
+
+ // Check that the world is as I think it is...
+ CYG_ASSERT( !first_stick->posted(), "Not got first stick");
+ CYG_ASSERT( !second_stick->posted(), "Not got second stick");
+ CYG_ASSERT( get_state(left_philo) != 'E', "Left neighbour also eating!!");
+ CYG_ASSERT( get_state(right_philo) != 'E', "Right neighbour also eating!!");
+
+ self->delay((id+cycle++)%6); // munch munch
+
+ // Finished eating, put down sticks.
+
+ change_state(id,'T');
+
+ CYG_INSTRUMENT_USER( 9, 0, 0);
+ first_stick->post();
+ CYG_INSTRUMENT_USER( 10, 0, 0);
+ second_stick->post();
+ CYG_INSTRUMENT_USER( 11, 0, 0);
+
+// Cyg_Scheduler::lock();
+// Cyg_Scheduler::unlock();
+ CYG_INSTRUMENT_USER( 12, 0, 0);
+
+ }
+}
+
+// -------------------------------------------------------------------------
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ diag_init();
+
+ diag_write_string("Philosophers\n");
+ diag_write_string("Started\n");
+
+ // Zero last element in state so it acts like
+ // a string.
+ pstate[PHILOSOPHERS] = 0;
+
+#if 1
+ for( int i = 0; i < PHILOSOPHERS; i++ )
+ {
+ change_state(i,'T'); // starting state
+
+ // Start the philosopher
+ Cyg_Thread *t = new_thread( Philosopher, i );
+
+ // resume it
+ t->resume();
+
+ // and make the matching chopstick present
+ chopstick[i].post();
+ }
+#endif
+
+ // Get the world going
+ Cyg_Scheduler::scheduler.start();
+
+}
+
+// -------------------------------------------------------------------------
+// EOF philo.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/release.cxx b/cesar/ecos/packages/kernel/current/tests/release.cxx
new file mode 100644
index 0000000000..e65a46e605
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/release.cxx
@@ -0,0 +1,129 @@
+//==========================================================================
+//
+// release.cxx
+//
+// Thread release test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1998-04-24
+// Description: Tests the functionality of thread release().
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/mutex.hxx>
+#include <cyg/kernel/sema.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/sched.inl>
+
+#define NTHREADS 2
+
+#include "testaux.hxx"
+
+static Cyg_Binary_Semaphore s0, s1;
+
+static void entry0( CYG_ADDRWORD data )
+{
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ if (!s0.wait() )
+ {
+ if( self->get_wake_reason() != Cyg_Thread::BREAK )
+ CYG_TEST_FAIL_FINISH("Wake reason not BREAK");
+ }
+ else
+ {
+ CYG_TEST_FAIL_FINISH("Thread not released");
+ }
+
+ s1.post();
+
+ self->exit();
+}
+
+
+static void entry1( CYG_ADDRWORD data )
+{
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Give the other thread a chance to wait in SMP systems.
+ for( int i = 0; i < 100; i++ )
+ self->yield();
+
+ thread[0]->release();
+
+ s1.wait();
+
+ CYG_TEST_PASS_FINISH("Release OK");
+
+ Cyg_Thread::self()->exit();
+}
+
+void release_main(void)
+{
+ CYG_TEST_INIT();
+
+ new_thread( entry0, 0);
+ new_thread( entry1, 1);
+
+ thread[0]->set_priority(5);
+ thread[1]->set_priority(6);
+
+ Cyg_Scheduler::start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ release_main();
+}
+
+// EOF release.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/sched1.cxx b/cesar/ecos/packages/kernel/current/tests/sched1.cxx
new file mode 100644
index 0000000000..6b8865d8ed
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/sched1.cxx
@@ -0,0 +1,111 @@
+//==========================================================================
+//
+// sched1.cxx
+//
+// Sched test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-02-26
+// Description: Tests some basic sched functions.
+// Omissions:
+// Doesn't test Cyg_Scheduler::get_thread_switches() very well
+// Cyg_SchedThread
+// inherit_priority
+// disinherit_priority
+// Options:
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/sched.hxx> // Cyg_Scheduler::start()
+#include <cyg/kernel/thread.hxx> // Cyg_Thread
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/sched.inl>
+#include <cyg/kernel/thread.inl>
+
+#define NTHREADS 2
+
+#include "testaux.hxx"
+
+static void entry0( CYG_ADDRWORD data )
+{
+ CHECK( 0 == Cyg_Scheduler::get_sched_lock() );
+ Cyg_Scheduler::lock(); {
+ CHECK( 1 == Cyg_Scheduler::get_sched_lock() );
+ Cyg_Scheduler::lock(); {
+ CHECK( 2 == Cyg_Scheduler::get_sched_lock() );
+ } Cyg_Scheduler::unlock();
+ } Cyg_Scheduler::unlock();
+ cyg_ucount32 t0=Cyg_Scheduler::get_thread_switches();
+ cyg_ucount32 t1=Cyg_Scheduler::get_thread_switches();
+ CHECK( t1 >= t0 );
+ CHECK( Cyg_Scheduler::get_current_thread() ==
+ Cyg_Thread::self() );
+ CYG_TEST_PASS_FINISH( "Sched 1 OK");
+}
+
+static void entry1( CYG_ADDRWORD data )
+{
+ Cyg_Thread::self()->sleep();
+}
+
+void sched1_main(void)
+{
+ CYG_TEST_INIT();
+
+ new_thread(entry0, 222);
+ new_thread(entry1, 333);
+
+ Cyg_Scheduler::start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ sched1_main();
+}
+// EOF sched1.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/smp.cxx b/cesar/ecos/packages/kernel/current/tests/smp.cxx
new file mode 100644
index 0000000000..5f35abed41
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/smp.cxx
@@ -0,0 +1,474 @@
+//==========================================================================
+//
+// smp.cxx
+//
+// SMP tests
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2001-06-18
+// Description: Some basic SMP tests.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+#include <pkgconf/hal.h>
+
+#if 1
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/mutex.hxx>
+#include <cyg/kernel/sema.hxx>
+#include <cyg/kernel/sched.inl>
+#include <cyg/kernel/clock.hxx>
+#include <cyg/kernel/clock.inl>
+#endif
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h>
+
+//==========================================================================
+
+#if defined(CYGPKG_KERNEL_SMP_SUPPORT) && \
+ defined(CYGFUN_KERNEL_API_C) && \
+ defined(CYGSEM_KERNEL_SCHED_MLQUEUE) && \
+ defined(CYGVAR_KERNEL_COUNTERS_CLOCK) && \
+ !defined(CYGPKG_HAL_I386_LINUX) && \
+ !defined(CYGDBG_INFRA_DIAG_USE_DEVICE) && \
+ (CYGNUM_KERNEL_SCHED_PRIORITIES > 12)
+
+//==========================================================================
+
+#define NTHREADS 1
+#include "testaux.hxx"
+
+#define STACK_SIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+#define NTHREADS_MAX (CYGNUM_KERNEL_CPU_MAX*3)
+
+static int ncpus = CYGNUM_KERNEL_CPU_MAX;
+static int nthread = NTHREADS_MAX;
+
+static char stacks[NTHREADS_MAX][STACK_SIZE];
+static cyg_thread test_threads[NTHREADS_MAX];
+static cyg_handle_t threads[NTHREADS_MAX];
+
+static volatile cyg_uint32 cpu_run[CYGNUM_KERNEL_CPU_MAX];
+static volatile int failed = false;
+static volatile cyg_uint32 cpu_thread[CYGNUM_KERNEL_CPU_MAX];
+
+static volatile cyg_uint32 slicerun[NTHREADS_MAX][CYGNUM_KERNEL_CPU_MAX];
+
+
+static cyg_mutex_t mx;
+
+
+//==========================================================================
+// Compute a name for a thread
+char *
+thread_name(char *basename, int indx) {
+ return "<<NULL>>"; // Not currently used
+}
+
+//==========================================================================
+
+void
+test_thread_cpu(CYG_ADDRESS id)
+{
+ for(;;)
+ cpu_run[CYG_KERNEL_CPU_THIS()] = true;
+}
+
+//==========================================================================
+// First test: just run as many threads as CPUs and check that we
+// get to run on each CPU.
+
+void run_smp_test_cpus()
+{
+ int i;
+
+ CYG_TEST_INFO( "CPU Test: Check CPUs functional");
+
+ // Init flags.
+ for (i = 0; i < ncpus; i++)
+ cpu_run[i] = false;
+
+ // Set my priority higher than any I plan to create
+ cyg_thread_set_priority(cyg_thread_self(), 2);
+
+ for (i = 0; i < ncpus; i++) {
+ cyg_thread_create(10, // Priority - just a number
+ test_thread_cpu, // entry
+ i, // index
+ thread_name("thread", i), // Name
+ &stacks[i][0], // Stack
+ STACK_SIZE, // Size
+ &threads[i], // Handle
+ &test_threads[i] // Thread data structure
+ );
+ cyg_thread_resume( threads[i]);
+ }
+
+ // Just wait a while, until the threads have all run for a bit.
+ cyg_thread_delay( 10 );
+
+ // Delete all the threads
+ for (i = 0; i < ncpus; i++) {
+ cyg_thread_delete(threads[i]);
+ }
+
+ // And check that a thread ran on each CPU
+ for (i = 0; i < ncpus; i++) {
+// CYG_TEST_CHECK( cpu_run[i], "CPU didn't run");
+ if( !cpu_run[i] )
+ {
+ CYG_TEST_INFO( "CPU didn't run" );
+ failed++;
+ }
+ }
+
+ CYG_TEST_INFO( "CPU Test: done");
+}
+
+
+//==========================================================================
+
+void
+test_thread_pri(CYG_ADDRESS id)
+{
+ for(;;)
+ {
+ cpu_thread[CYG_KERNEL_CPU_THIS()] = id;
+ }
+}
+
+//==========================================================================
+// Second test: Run a thread on each CPU and then by manipulating the
+// priorities, get the current thread to migrate to each CPU in turn.
+
+
+void run_smp_test_pri()
+{
+ int i;
+
+ CYG_TEST_INFO( "Pri Test: Check set_priority functionality");
+
+ // Init flags.
+ for (i = 0; i < ncpus; i++)
+ cpu_run[i] = false;
+
+ // Set my priority higher than any I plan to creat
+ cyg_thread_set_priority(cyg_thread_self(), 2);
+
+ for (i = 0; i < ncpus; i++) {
+ cyg_thread_create(10, // Priority - just a number
+ test_thread_pri, // entry
+ i, // index
+ thread_name("thread", i), // Name
+ &stacks[i][0], // Stack
+ STACK_SIZE, // Size
+ &threads[i], // Handle
+ &test_threads[i] // Thread data structure
+ );
+ cyg_thread_resume( threads[i]);
+ }
+
+ cyg_thread_delay( 2 );
+
+ cyg_handle_t cthread = threads[0];
+ cyg_thread_set_priority(cthread, 25);
+
+ // Just wait a while, until the threads have all run for a bit.
+ cyg_thread_delay( 2 );
+
+ for (i = 0; i < ncpus*500; i++)
+ {
+ HAL_SMP_CPU_TYPE cpu = i % CYG_KERNEL_CPU_COUNT();
+
+ if( cpu != CYG_KERNEL_CPU_THIS() )
+ {
+ // At this point we have the current thread running on a
+ // CPU at priority 2, ncpus-1 threads running at priority
+ // 10 and the last thread (cthread) in the run queue at
+ // priority 25.
+
+ // Pick a thread on a different CPU
+ cyg_handle_t dthread;
+
+ do
+ {
+ dthread = threads[cpu_thread[cpu]];
+ } while( dthread == cthread );
+
+ // Change the priority of the victim thread to 20. It is
+ // still higher priority than cthread so it will continue
+ // running.
+
+ cyg_thread_set_priority(dthread, 20);
+
+ // Now change our priority to 15. We are still higher
+ // priority that cthread so we will still run.
+
+ cyg_thread_set_priority(cyg_thread_self(), 15);
+
+ // Finally change the priority of cthread to 10. This will
+ // cause it to preempt us on the current CPU. In turn we
+ // will preempt dthread on its CPU.
+
+ // NOTE: This relies somewhat on the SMP scheduler doing
+ // what we expect here. Specifically, that it will preempt
+ // the current thread with cthread locally. A more
+ // sophisticated scheduler might decide that the most
+ // efficient thing to do is to preempt dthread with
+ // cthread remotely, leaving the current thread where it
+ // is. If we ever bother to implement this, then this test
+ // will need to change.
+
+ cyg_thread_set_priority(cthread, 10);
+
+ // Spin here a while until the scheduler sorts itself out.
+
+ for( int j = 0; j < 100000; j++ );
+
+ // Indicate that we have run on this CPU
+ cpu_run[CYG_KERNEL_CPU_THIS()]++;
+
+ // Restore our priority to 2 and depress dthread to 25 and
+ // make it the new cthread.
+
+ cyg_thread_set_priority(cyg_thread_self(), 2);
+ cyg_thread_set_priority(dthread, 25);
+ cthread = dthread;
+ }
+ }
+
+
+ // Delete all the threads
+ for (i = 0; i < ncpus; i++) {
+ cyg_thread_delete(threads[i]);
+ }
+
+ // And check that a thread ran on each CPU
+ for (i = 0; i < ncpus; i++) {
+// CYG_TEST_CHECK( cpu_run[i], "CPU didn't run");
+ if( !cpu_run[i] )
+ {
+ CYG_TEST_INFO( "CPU didn't run" );
+ failed++;
+ }
+ }
+
+ CYG_TEST_INFO( "PRI Test: done");
+}
+
+//==========================================================================
+
+void
+test_thread_timeslice(CYG_ADDRESS id)
+{
+ for(;;)
+ slicerun[id][CYG_KERNEL_CPU_THIS()]++;
+}
+
+//==========================================================================
+// First test: just run as many threads as CPUs and check that we
+// get to run on each CPU.
+
+void run_smp_test_timeslice()
+{
+ int i;
+
+ CYG_TEST_INFO( "Timeslice Test: Check timeslicing works");
+
+ // Init flags.
+ for (i = 0; i < nthread; i++)
+ for( int j = 0; j < ncpus; j++ )
+ slicerun[i][j] = 0;
+
+ // Set my priority higher than any I plan to create
+ cyg_thread_set_priority(cyg_thread_self(), 2);
+
+ for (i = 0; i < nthread; i++) {
+ cyg_thread_create(10, // Priority - just a number
+ test_thread_timeslice, // entry
+ i, // index
+ thread_name("thread", i), // Name
+ &stacks[i][0], // Stack
+ STACK_SIZE, // Size
+ &threads[i], // Handle
+ &test_threads[i] // Thread data structure
+ );
+ cyg_thread_resume( threads[i]);
+ }
+
+ // Just wait a while, until the threads have all run for a bit.
+ cyg_thread_delay( 200 );
+
+ // Delete all the threads
+ for (i = 0; i < nthread; i++) {
+ cyg_thread_suspend(threads[i]);
+ }
+
+
+ // And check that a thread ran on each CPU
+
+ cyg_uint32 cpu_total[ncpus];
+ cyg_uint32 cpu_threads[ncpus];
+ cyg_uint32 thread_total[nthread];
+
+ diag_printf(" Thread ");
+ for( int j = 0; j < ncpus; j++ )
+ {
+ cpu_total[j] = 0;
+ cpu_threads[j] = 0;
+ diag_printf(" CPU %2d",j);
+ }
+ diag_printf(" Total\n");
+ for (i = 0; i < nthread; i++)
+ {
+ thread_total[i] = 0;
+ diag_printf(" %2d ",i);
+ for( int j = 0; j < ncpus; j++ )
+ {
+ thread_total[i] += slicerun[i][j];
+ cpu_total[j] += slicerun[i][j];
+ if( slicerun[i][j] > 0 )
+ cpu_threads[j]++;
+ diag_printf(" %8d",slicerun[i][j]);
+ }
+ diag_printf("%8d\n",thread_total[i]);
+ }
+ diag_printf(" Total ");
+ for( int j = 0; j < ncpus; j++ )
+ diag_printf(" %8d",cpu_total[j]);
+ diag_printf("\n");
+ diag_printf("Threads ");
+ for( int j = 0; j < ncpus; j++ )
+ {
+ diag_printf(" %8d",cpu_threads[j]);
+ if( cpu_threads[j] < 2 )
+ failed++;
+ }
+ diag_printf("\n");
+
+ // Delete all the threads
+ for (i = 0; i < nthread; i++) {
+ cyg_thread_delete(threads[i]);
+ }
+
+ CYG_TEST_INFO( "Timeslice Test: done");
+}
+
+
+//==========================================================================
+
+void
+run_smp_tests(CYG_ADDRESS id)
+{
+ cyg_mutex_init( &mx );
+
+ for( int i = 0; i < 100; i++ )
+ {
+ run_smp_test_cpus();
+ run_smp_test_pri();
+ run_smp_test_timeslice();
+ }
+
+ if( failed )
+ CYG_TEST_FAIL_FINISH("SMP tests failed\n");
+
+ CYG_TEST_PASS_FINISH("SMP tests OK");
+}
+
+//==========================================================================
+
+void smp_main( void )
+{
+ CYG_TEST_INIT();
+
+ // Work out how many CPUs we actually have.
+ ncpus = CYG_KERNEL_CPU_COUNT();
+
+ new_thread(run_smp_tests, 0);
+
+ cyg_scheduler_start();
+}
+
+//==========================================================================
+
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+externC void
+cyg_hal_invoke_constructors();
+#endif
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ smp_main();
+}
+
+//==========================================================================
+
+#else // CYGPKG_KERNEL_SMP_SUPPORT etc.
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_INFO("SMP test requires:\n"
+ "CYGPKG_KERNEL_SMP_SUPPORT &&\n"
+ "CYGFUN_KERNEL_API_C && \n"
+ "CYGSEM_KERNEL_SCHED_MLQUEUE &&\n"
+ "CYGVAR_KERNEL_COUNTERS_CLOCK &&\n"
+ "!CYGPKG_HAL_I386_LINUX &&\n"
+ "!CYGDBG_INFRA_DIAG_USE_DEVICE &&\n"
+ "(CYGNUM_KERNEL_SCHED_PRIORITIES > 12)\n");
+ CYG_TEST_NA("SMP test requirements");
+}
+#endif // CYGPKG_KERNEL_SMP_SUPPORT etc.
+
+//==========================================================================
+// EOF tm_basic.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/stress_threads.c b/cesar/ecos/packages/kernel/current/tests/stress_threads.c
new file mode 100644
index 0000000000..daedf7f54b
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/stress_threads.c
@@ -0,0 +1,859 @@
+//==========================================================================
+//
+// stress_threads.cxx
+//
+// Basic thread stress test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): rosalia
+// Contributors: rosalia, jskov
+// Date: 1999-04-13
+// Description: Very simple thread stress test, with some memory
+// allocation and alarm handling.
+//
+// Notes:
+// If client_makes_request is big, it means that there are made many more
+// client requests than can be serviced. Consequently, clients are wasting
+// CPU time and should be sleeping more.
+//
+// The list of handler invocations show how many threads are running
+// at the same time. The more powerful the CPU, the more the numbers
+// should spread out.
+//####DESCRIPTIONEND####
+
+#include <pkgconf/system.h>
+#include <cyg/infra/testcase.h>
+
+#include <cyg/hal/hal_arch.h>
+
+#if defined(CYGPKG_KERNEL) && defined(CYGPKG_IO) && defined(CYGPKG_ISOINFRA)
+
+#include <pkgconf/kernel.h>
+#include <pkgconf/isoinfra.h>
+#include CYGHWR_MEMORY_LAYOUT_H
+
+#if defined(CYGFUN_KERNEL_API_C)
+
+#include <cyg/kernel/kapi.h>
+
+#ifdef CYGINT_ISO_STDIO_FORMATTED_IO
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#if defined(CYGPKG_LIBM)
+
+#include <math.h>
+#include <assert.h>
+
+#include <cyg/kernel/test/stackmon.h>
+
+#if defined(CYGFUN_KERNEL_THREADS_TIMER)
+#if CYGINT_ISO_MALLOC
+
+/* if TIME_LIMIT is defined, it represents the number of seconds this
+ test should last; if it is undefined the test will go forever */
+#define DEATH_TIME_LIMIT 20
+/* #undef DEATH_TIME_LIMIT */
+
+// STACK_SIZE is typical +2kB for printf family calls which use big
+// auto variables. Add more for handler which calls perform_stressful_tasks()
+#define STACK_SIZE (2*1024 + CYGNUM_HAL_STACK_SIZE_TYPICAL)
+#define STACK_SIZE_HANDLER (STACK_SIZE + 30*CYGNUM_HAL_STACK_FRAME_SIZE)
+
+#define N_MAIN 1
+
+// If we have instrumentation enabled, make the execution time in the
+// simulator even shorter that we were going to anyway.
+#ifdef CYGPKG_KERNEL_INSTRUMENT
+#define SIM_DELAY_DIVISOR 100
+#else
+#define SIM_DELAY_DIVISOR 10
+#endif
+
+//-----------------------------------------------------------------------
+// Some targets need to define a smaller number of handlers due to
+// memory restrictions.
+#if defined(CYGMEM_REGION_ram_SIZE) && (CYGMEM_REGION_ram_SIZE < 0x80000)
+#define MAX_HANDLERS 4
+#define N_LISTENERS 1
+#define N_CLIENTS 1
+
+#undef STACK_SIZE
+#undef STACK_SIZE_HANDLER
+#define STACK_SIZE (1024 + CYGNUM_HAL_STACK_SIZE_TYPICAL)
+#define STACK_SIZE_HANDLER (STACK_SIZE + 10*CYGNUM_HAL_STACK_FRAME_SIZE)
+#endif
+
+//-----------------------------------------------------------------------
+// If no target specific definitions, use defaults
+#ifndef MAX_HANDLERS
+#define MAX_HANDLERS 19
+#define N_LISTENERS 4
+#define N_CLIENTS 4
+#endif
+
+/* Allocate priorities in this order. This ensures that handlers
+ (which are the ones using the CPU) get enough CPU time to actually
+ complete their tasks.
+
+ The empty space ensures that if libc main() thread should happen to
+ be in the priority range of the handlers, no handlers are
+ accidently reduced so much in priority to get below
+ listeners/clients. */
+
+#define P_MAIN_PROGRAM 1
+#define P_MAIN_PROGRAM_E (P_MAIN_PROGRAM+N_MAIN)
+
+#define P_BASE_HANDLER (P_MAIN_PROGRAM_E)
+#define P_BASE_HANDLER_E (P_BASE_HANDLER+MAX_HANDLERS)
+
+#define P_BASE_EMPTY (P_BASE_HANDLER_E)
+#define P_BASE_EMPTY_E (P_BASE_EMPTY+2)
+
+#define P_BASE_LISTENER (P_BASE_EMPTY_E)
+#define P_BASE_LISTENER_E (P_BASE_LISTENER+N_LISTENERS)
+
+#define P_BASE_CLIENT (P_BASE_LISTENER_E)
+#define P_BASE_CLIENT_E (P_BASE_CLIENT+N_CLIENTS)
+
+#define P_MAX (P_BASE_CLIENT_E)
+
+/* Ensure there's room for what we request */
+#if (CYGNUM_KERNEL_SCHED_PRIORITIES >= P_MAX)
+
+/* if we use the bitmap scheduler we must make sure we don't use the
+ same priority more than once, so we must store those already in use */
+static volatile char priority_in_use[P_MAX];
+
+/* We may not get the priority we ask for (scheduler may decide to ignore
+ schedule hint). So keep a table of priorities actually assigned to
+ the threads. This information may come in handy for debugging - it's
+ not actively used by the code. */
+static volatile int priority_translation[P_MAX];
+
+/* now declare (and allocate space for) some kernel objects, like the
+ threads we will use */
+cyg_thread main_thread_s;
+cyg_thread handler_thread_s[MAX_HANDLERS];
+cyg_thread listener_thread_s[N_LISTENERS];
+cyg_thread client_thread_s[N_CLIENTS];
+
+/* space for stacks for all threads */
+char main_stack[STACK_SIZE];
+char handler_stack[MAX_HANDLERS][STACK_SIZE_HANDLER];
+char listener_stack[N_LISTENERS][STACK_SIZE];
+char client_stack[N_CLIENTS][STACK_SIZE];
+
+/* now the handles for the threads */
+cyg_handle_t mainH;
+cyg_handle_t handlerH[MAX_HANDLERS];
+cyg_handle_t listenerH[N_LISTENERS];
+cyg_handle_t clientH[N_CLIENTS];
+
+/* space for thread names */
+char thread_name[P_MAX][20];
+
+/* and now variables for the procedure which is the thread */
+cyg_thread_entry_t main_program, client_program, listener_program,
+ handler_program;
+
+/* a few mutexes used in the code */
+cyg_mutex_t client_request_lock, handler_slot_lock, statistics_print_lock,
+ free_handler_lock;
+
+/* global variables with which the handler IDs and thread priorities
+ to free are communicated from handlers to main_program. Access to
+ these are protected by free_handler_lock. An id of -1 means the
+ that the variables are empty. */
+volatile int free_handler_pri = 0;
+volatile int free_handler_id = -1;
+
+/* a global variable with which the client and server coordinate */
+volatile int client_makes_request = 0;
+
+/* if this is true, clients will not make requests */
+volatile int clients_paused = 0;
+
+
+/* indicates that it's time to print out a report */
+volatile int time_to_report = 0;
+/* print status after a delay of this many secs. */
+int time_report_delay;
+
+/*** now application-specific variables ***/
+/* an array that stores whether the handler threads are in use */
+volatile int handler_thread_in_use[MAX_HANDLERS];
+/* total count of active handlers */
+volatile int handler_thread_in_use_count;
+
+
+/***** statistics-gathering variables *****/
+struct s_statistics {
+ /* store the number of times each handler has been invoked */
+ unsigned long handler_invocation_histogram[MAX_HANDLERS];
+
+ /* store how many times malloc has been attempted and how many times
+ it has failed */
+ unsigned long malloc_tries, malloc_failures;
+
+ /* how many threads have been created */
+ unsigned long thread_creations, thread_exits;
+};
+
+struct s_statistics statistics;
+
+/* some function prototypes; those with the sc_ prefix are
+ "statistics-collecting" versions of the cyg_ primitives */
+cyg_addrword_t sc_thread_create(
+ cyg_addrword_t sched_info, /* scheduling info (eg pri) */
+ cyg_thread_entry_t *entry, /* entry point function */
+ cyg_addrword_t entry_data, /* entry data */
+ char *name, /* optional thread name */
+ void *stack_base, /* stack base, NULL = alloc */
+ cyg_ucount32 stack_size, /* stack size, 0 = default */
+ cyg_handle_t *handle, /* returned thread handle */
+ cyg_thread *thread /* put thread here */
+ );
+
+void start_handler(void);
+void stop_handler(int handler_id, int handler_pri);
+void perform_stressful_tasks(void);
+void permute_array(char a[], int size, int seed);
+void setup_death_alarm(cyg_addrword_t data, cyg_handle_t *deathHp,
+ cyg_alarm *death_alarm_p, int *killed_p);
+void print_statistics(int print_full);
+
+/* we need to declare the alarm handling function (which is defined
+ below), so that we can pass it to cyg_alarm_initialize() */
+cyg_alarm_t report_alarm_func, death_alarm_func;
+
+/* handle and alarm for the report alarm */
+cyg_handle_t report_alarmH, counterH, system_clockH;
+cyg_alarm report_alarm;
+
+/* main launches all the threads of the test */
+int
+main(void)
+{
+ int i;
+
+ CYG_TEST_INIT();
+ CYG_TEST_INFO("Stress threads test compiled on " __DATE__);
+
+ cyg_mutex_init(&client_request_lock);
+ cyg_mutex_init(&statistics_print_lock);
+ cyg_mutex_init(&free_handler_lock);
+
+ /* initialize statistics */
+ memset(&statistics, 0, sizeof(statistics));
+
+ /* clear priority table */
+ for (i = 0; i < sizeof(priority_in_use); i++)
+ priority_in_use[i] = 0;
+
+ /* initialize main thread */
+ {
+ priority_translation[P_MAIN_PROGRAM] =
+ sc_thread_create(P_MAIN_PROGRAM, main_program, (cyg_addrword_t) 0,
+ "main_program", (void *) main_stack, STACK_SIZE,
+ &mainH, &main_thread_s);
+ priority_in_use[P_MAIN_PROGRAM]++;
+ }
+
+ /* initialize all handler threads to not be in use */
+ for (i = 0; i < MAX_HANDLERS; ++i) {
+ handler_thread_in_use[i] = 0;
+ }
+ handler_thread_in_use_count = 0;
+ for (i = 0; i < N_LISTENERS; ++i) {
+ int prio = P_BASE_LISTENER + i;
+ char* name = &thread_name[prio][0];
+ sprintf(name, "listener-%02d", i);
+ priority_translation[prio] =
+ sc_thread_create(prio, listener_program, (cyg_addrword_t) i,
+ name, (void *) listener_stack[i], STACK_SIZE,
+ &listenerH[i], &listener_thread_s[i]);
+ CYG_ASSERT(0 == priority_in_use[prio], "Priority already in use!");
+ priority_in_use[prio]++;
+ }
+ for (i = 0; i < N_CLIENTS; ++i) {
+ int prio = P_BASE_CLIENT + i;
+ char* name = &thread_name[prio][0];
+ sprintf(name, "client-%02d", i);
+ priority_translation[prio] =
+ sc_thread_create(prio, client_program, (cyg_addrword_t) i,
+ name, (void *) client_stack[i], STACK_SIZE,
+ &(clientH[i]), &client_thread_s[i]);
+ CYG_ASSERT(0 == priority_in_use[prio], "Priority already in use!");
+ priority_in_use[prio]++;
+ }
+
+ cyg_thread_resume(mainH);
+ for (i = 0; i < N_CLIENTS; ++i) {
+ cyg_thread_resume(clientH[i]);
+ }
+ for (i = 0; i < N_LISTENERS; ++i) {
+ cyg_thread_resume(listenerH[i]);
+ }
+
+ /* set up the alarm which gives periodic wakeups to say "time to
+ print a report */
+ system_clockH = cyg_real_time_clock();
+ cyg_clock_to_counter(system_clockH, &counterH);
+
+ cyg_alarm_create(counterH, report_alarm_func,
+ (cyg_addrword_t) 4000,
+ &report_alarmH, &report_alarm);
+ if (cyg_test_is_simulator) {
+ time_report_delay = 2;
+ } else {
+ time_report_delay = 60;
+ }
+
+ cyg_alarm_initialize(report_alarmH, cyg_current_time()+200,
+ time_report_delay*100);
+
+ return 0;
+}
+
+/* main_program() -- frees resources and prints status. */
+void main_program(cyg_addrword_t data)
+{
+#ifdef DEATH_TIME_LIMIT
+ cyg_handle_t deathH;
+ cyg_alarm death_alarm;
+ int is_dead = 0;
+
+ setup_death_alarm(0, &deathH, &death_alarm, &is_dead);
+#endif /* DEATH_TIME_LIMIT */
+
+ for (;;) {
+ int handler_id = -1;
+ int handler_pri = 0;
+
+ cyg_mutex_lock(&free_handler_lock); {
+ // If any handler has left its ID, copy the ID and
+ // priority values to local variables, and free up the
+ // global communication variables again.
+ if (-1 != free_handler_id) {
+ handler_id = free_handler_id;
+ handler_pri = free_handler_pri;
+ free_handler_id = -1;
+ }
+ } cyg_mutex_unlock(&free_handler_lock);
+
+ if (-1 != handler_id) {
+ stop_handler(handler_id, handler_pri);
+ }
+
+ // If it's time to report status or quit, set pause flag and
+ // keep looping until all handlers have stopped.
+ if (time_to_report) {
+ // Pause clients
+ cyg_mutex_lock(&client_request_lock); {
+ clients_paused = 1;
+ } cyg_mutex_unlock(&client_request_lock);
+
+ // When all handlers have stopped, we can print statistics
+ // knowing that all (handler allocated) resources should have
+ // been freed. That is, we should be able to determine leaks.
+ if (0 == handler_thread_in_use_count) {
+ print_statistics(0);
+
+ // We've done the printing now. Resume the system.
+ time_to_report = 0;
+ cyg_mutex_lock(&client_request_lock); {
+ clients_paused = 0;
+ } cyg_mutex_unlock(&client_request_lock);
+ }
+ }
+
+#ifdef DEATH_TIME_LIMIT
+ // Stop test if time.
+ if (is_dead) {
+ // Pause clients
+ cyg_mutex_lock(&client_request_lock); {
+ clients_paused = 1;
+ } cyg_mutex_unlock(&client_request_lock);
+
+ // When all handlers have stopped, we can print statistics
+ // knowing that all (handler allocated) resources should have
+ // been freed. That is, we should be able to determine leaks.
+ if (0 == handler_thread_in_use_count) {
+ print_statistics(1);
+ CYG_TEST_PASS_FINISH("Kernel thread stress test OK");
+ }
+ }
+#endif /* DEATH_TIME_LIMIT */
+
+ cyg_thread_delay(3);
+ }
+}
+
+/* client_program() -- an obnoxious client which makes a lot of requests */
+void client_program(cyg_addrword_t data)
+{
+ int delay;
+
+ system_clockH = cyg_real_time_clock();
+ cyg_clock_to_counter(system_clockH, &counterH);
+
+ for (;;) {
+ delay = (rand() % 20);
+
+ /* now send a request to the server */
+ cyg_mutex_lock(&client_request_lock); {
+ if (0 == clients_paused)
+ client_makes_request++;
+ } cyg_mutex_unlock(&client_request_lock);
+
+ cyg_thread_delay(10+delay);
+ }
+}
+
+/* listener_program() -- listens for a request and spawns a handler to
+ take care of the request */
+void listener_program(cyg_addrword_t data)
+{
+ for (;;) {
+ int make_request = 0;
+ cyg_mutex_lock(&client_request_lock); {
+ if (client_makes_request > 0) {
+ --client_makes_request;
+ make_request = 1;
+ }
+ } cyg_mutex_unlock(&client_request_lock);
+
+ if (make_request)
+ start_handler();
+
+ cyg_thread_delay(2 + (rand() % 10));
+ }
+}
+
+/* handler_program() -- is spawned to handle each incoming request */
+void handler_program(cyg_addrword_t data)
+{
+ /* here is where we perform specific stressful tasks */
+ perform_stressful_tasks();
+
+ cyg_thread_delay(4 + (int) (0.5*log(1.0 + fabs((rand() % 1000000)))));
+
+ {
+ // Loop until the handler id and priority can be communicated to
+ // the main_program.
+ int freed = 0;
+ do {
+ cyg_mutex_lock(&free_handler_lock); {
+ if (-1 == free_handler_id) {
+ free_handler_id = data;
+ free_handler_pri = P_BASE_HANDLER+(int) data;
+ freed = 1;
+ }
+ } cyg_mutex_unlock(&free_handler_lock);
+ if (!freed)
+ cyg_thread_delay(2);
+ } while (!freed);
+ }
+
+ // Then exit.
+ cyg_thread_exit();
+}
+
+/* start a new handler */
+void start_handler(void)
+{
+ int prio;
+ char* name;
+ int handler_slot = 0;
+ int found = 0;
+
+ while (!found) {
+ cyg_mutex_lock(&handler_slot_lock); {
+ for (handler_slot = 0; handler_slot < MAX_HANDLERS;++handler_slot){
+ if (!handler_thread_in_use[handler_slot]) {
+ found = 1;
+ handler_thread_in_use[handler_slot]++;
+ handler_thread_in_use_count++;
+ break;
+ }
+ }
+ } cyg_mutex_unlock(&handler_slot_lock);
+ if (!found)
+ cyg_thread_delay(1);
+ }
+
+ CYG_ASSERT(1 == handler_thread_in_use[handler_slot],
+ "Handler usage count wrong!");
+
+ prio = P_BASE_HANDLER+handler_slot;
+ CYG_ASSERT(0 == priority_in_use[prio], "Priority already in use!");
+ priority_in_use[prio]++;
+
+ name = &thread_name[prio][0];
+ sprintf(name, "handler-%02d/%02d", handler_slot, prio);
+
+ priority_translation[prio] =
+ sc_thread_create(prio, handler_program,
+ (cyg_addrword_t) handler_slot,
+ name, (void *) handler_stack[handler_slot],
+ STACK_SIZE_HANDLER, &handlerH[handler_slot],
+ &handler_thread_s[handler_slot]);
+ cyg_thread_resume(handlerH[handler_slot]);
+ ++statistics.handler_invocation_histogram[handler_slot];
+}
+
+/* free a locked handler thread */
+void stop_handler(int handler_id, int handler_pri)
+{
+ // Finally delete the handler thread. This must be done in a
+ // loop, waiting for the call to return true. If it returns
+ // false, go to sleep for a bit, so the killed thread gets a
+ // chance to run and complete its business.
+ while (!cyg_thread_delete(handlerH[handler_id])) {
+ cyg_thread_delay(1);
+ }
+ ++statistics.thread_exits;
+
+ // Free the handler resources.
+ cyg_mutex_lock(&handler_slot_lock); {
+ handler_thread_in_use[handler_id]--;
+ handler_thread_in_use_count--;
+ priority_in_use[handler_pri]--;
+ CYG_ASSERT(0 == priority_in_use[handler_pri],
+ "Priority not in use!");
+ CYG_ASSERT(0 == handler_thread_in_use[handler_id],
+ "Handler not in use!");
+ CYG_ASSERT(0 <= handler_thread_in_use_count,
+ "Stopped more handlers than was started!");
+ } cyg_mutex_unlock(&handler_slot_lock);
+
+}
+
+
+/* do things which will stress the system */
+void perform_stressful_tasks()
+{
+#define MAX_MALLOCED_SPACES 100 /* do this many mallocs at most */
+#define MALLOCED_BASE_SIZE 1 /* basic size in bytes */
+ char *spaces[MAX_MALLOCED_SPACES];
+ int sizes[MAX_MALLOCED_SPACES];
+ unsigned int i, j, size;
+
+ cyg_uint8 pool_space[10][100];
+ cyg_handle_t mempool_handles[10];
+ cyg_mempool_fix mempool_objects[10];
+
+ /* here I use malloc, which uses the kernel's variable memory pools.
+ note that malloc/free is a bit simple-minded here: it does not
+ try to really fragment things, and it does not try to make the
+ allocation/deallocation concurrent with other thread execution
+ (although I'm about to throw in a yield()) */
+ for (i = 0; i < MAX_MALLOCED_SPACES; ++i) {
+ ++statistics.malloc_tries;
+ size = (i*2+1)*MALLOCED_BASE_SIZE;
+ spaces[i] = (char *) malloc(size);
+ sizes[i] = size;
+
+ if (spaces[i] != NULL) {
+ // Fill with a known value (differs between chunk).
+ for (j = 0; j < size; ++j) {
+ spaces[i][j] = 0x50 | ((j+i) & 0x0f);
+ }
+ }
+
+ if (i % (MAX_MALLOCED_SPACES/10) == 0) {
+ cyg_thread_yield();
+ }
+ if (i % (MAX_MALLOCED_SPACES/15) == 0) {
+ cyg_thread_delay(i % 5);
+ }
+ }
+
+ cyg_thread_delay(5);
+
+ /* now free it all up */
+ for (i = 0; i < MAX_MALLOCED_SPACES; ++i) {
+ if (spaces[i] != NULL) {
+ size = sizes[i];
+ for (j = 0; j < size; ++j) {
+ // Validate chunk data.
+ if ((0x50 | ((j+i) & 0x0f)) != spaces[i][j]) {
+ printf("Bad byte in chunk\n");
+ }
+ spaces[i][j] = 0xAA; /* write a bit pattern */
+ }
+ free(spaces[i]);
+ } else {
+ ++statistics.malloc_failures;
+ }
+ }
+
+ /* now allocate and then free some fixed-size memory pools; for
+ now this is simple-minded because it does not have many threads
+ sharing the memory pools and racing for memory. */
+ for (i = 0; i < 10; ++i) {
+ cyg_mempool_fix_create(pool_space[i], 100, (i+1)*3,
+ &mempool_handles[i], &mempool_objects[i]);
+ }
+
+ for (i = 0; i < 10; ++i) {
+ spaces[i] = cyg_mempool_fix_try_alloc(mempool_handles[i]);
+ }
+
+ for (i = 0; i < 10; ++i) {
+ if (spaces[i]) {
+ cyg_mempool_fix_delete(mempool_handles[i]);
+ }
+ }
+}
+
+/* report_alarm_func() is invoked as an alarm handler, so it should be
+ quick and simple. in this case it sets a global flag which is
+ checked by main_program. */
+void report_alarm_func(cyg_handle_t alarmH, cyg_addrword_t data)
+{
+ time_to_report = 1;
+}
+
+#ifdef DEATH_TIME_LIMIT
+/* this sets up death alarms. it gets the handle and alarm from the
+ caller, since they must persist for the life of the alarm */
+void setup_death_alarm(cyg_addrword_t data, cyg_handle_t *deathHp,
+ cyg_alarm *death_alarm_p, int *killed_p)
+{
+ cyg_handle_t system_clockH, counterH;
+ cyg_resolution_t rtc_res;
+
+ system_clockH = cyg_real_time_clock();
+ cyg_clock_to_counter(system_clockH, &counterH);
+
+ cyg_alarm_create(counterH, death_alarm_func,
+ (cyg_addrword_t) killed_p,
+ deathHp, death_alarm_p);
+ rtc_res = cyg_clock_get_resolution(system_clockH);
+ {
+ cyg_tick_count_t tick_delay;
+ tick_delay = (long long)
+ ((1000000000.0*rtc_res.divisor)
+ *((double)DEATH_TIME_LIMIT)/((double)rtc_res.dividend));
+ if ( cyg_test_is_simulator )
+ tick_delay /= SIM_DELAY_DIVISOR;
+#ifdef CYGPKG_HAL_SYNTH
+ // 20 seconds is a long time compared to the run time of other tests.
+ // Reduce to 10 seconds, allowing more tests to get run.
+ tick_delay /= 2;
+#endif
+
+ cyg_alarm_initialize(*deathHp, cyg_current_time() + tick_delay, 0);
+ }
+}
+#endif
+
+/* death_alarm_func() is the alarm handler that kills the current
+ thread after a specified timeout. It does so by setting a flag the
+ thread is constantly checking. */
+void death_alarm_func(cyg_handle_t alarmH, cyg_addrword_t data)
+{
+ int *killed_p;
+ killed_p = (int *) data;
+ *killed_p = 1;
+}
+
+/* now I write the sc_ versions of the cyg_functions */
+cyg_addrword_t sc_thread_create(
+ cyg_addrword_t sched_info, /* scheduling info (eg pri) */
+ cyg_thread_entry_t *entry, /* entry point function */
+ cyg_addrword_t entry_data, /* entry data */
+ char *name, /* optional thread name */
+ void *stack_base, /* stack base, NULL = alloc */
+ cyg_ucount32 stack_size, /* stack size, 0 = default */
+ cyg_handle_t *handle, /* returned thread handle */
+ cyg_thread *thread /* put thread here */
+ )
+{
+ ++statistics.thread_creations;
+
+ cyg_thread_create(sched_info, entry, entry_data, name,
+ stack_base, stack_size, handle, thread);
+
+ return cyg_thread_get_priority(*handle);
+}
+
+
+#define MINS_HOUR (60)
+#define MINS_DAY (60*24)
+
+void print_statistics(int print_full)
+{
+ int i;
+ static int stat_dumps = 0;
+ static int print_count = 0;
+ static int shift_count = 0;
+ int minutes;
+
+ stat_dumps++;
+
+ // Find number of minutes.
+ minutes = time_report_delay*stat_dumps / 60;
+
+ if (!print_full) {
+ // Return if time/minutes not integer.
+ if ((time_report_delay*stat_dumps % 60) != 0)
+ return;
+
+ // After the first day, only dump stat once per day. Do print
+ // a . on the hour though.
+ if ((minutes > MINS_DAY) && ((minutes % MINS_DAY) != 0)) {
+ if ((minutes % MINS_HOUR) == 0) {
+ printf(".");
+ fflush(stdout);
+ }
+ return;
+ }
+
+ // After the first hour of the first day, only dump stat once
+ // per hour. Do print . each minute though.
+ if ((minutes < MINS_DAY) && (minutes > MINS_HOUR)
+ && ((minutes % MINS_HOUR) != 0)) {
+ printf(".");
+ fflush(stdout);
+ return;
+ }
+ }
+
+ printf("\nState dump %d (%d hours, %d minutes) [numbers >>%d]\n",
+ ++print_count, minutes / MINS_HOUR, minutes % MINS_HOUR,
+ shift_count);
+
+ cyg_mutex_lock(&statistics_print_lock); {
+ //--------------------------------
+ // Information private to this test:
+ printf(" Handler-invocations: ");
+ for (i = 0; i < MAX_HANDLERS; ++i) {
+ printf("%4lu ", statistics.handler_invocation_histogram[i]);
+ }
+ printf("\n");
+ printf(" malloc()-tries/failures: -- %7lu %7lu\n",
+ statistics.malloc_tries, statistics.malloc_failures);
+ printf(" client_makes_request: %d\n", client_makes_request);
+
+ // Check for big numbers and reduce if getting close to overflow
+ if (statistics.malloc_tries > 0x40000000) {
+ shift_count++;
+ for (i = 0; i < MAX_HANDLERS; ++i) {
+ statistics.handler_invocation_histogram[i] >>= 1;
+ }
+ statistics.malloc_tries >>= 1;
+ statistics.malloc_failures >>= 1;
+ }
+ } cyg_mutex_unlock(&statistics_print_lock);
+
+#if CYGINT_ISO_MALLINFO
+ //--------------------------------
+ // System information
+ {
+ struct mallinfo mem_info;
+
+ mem_info = mallinfo();
+
+ printf(" Memory system: Total=0x%08x Free=0x%08x Max=0x%08x\n",
+ mem_info.arena, mem_info.fordblks, mem_info.maxfree);
+ }
+#endif
+
+ // Dump stack status
+ printf(" Stack usage:\n");
+ cyg_test_dump_interrupt_stack_stats( " Interrupt" );
+ cyg_test_dump_idlethread_stack_stats( " Idle" );
+
+ cyg_test_dump_stack_stats(" Main", main_stack,
+ main_stack + sizeof(main_stack));
+ for (i = 0; i < MAX_HANDLERS; i++) {
+ cyg_test_dump_stack_stats(" Handler", handler_stack[i],
+ handler_stack[i] + sizeof(handler_stack[i]));
+ }
+ for (i = 0; i < N_LISTENERS; i++) {
+ cyg_test_dump_stack_stats(" Listener", listener_stack[i],
+ listener_stack[i] + sizeof(listener_stack[i]));
+ }
+ for (i = 0; i < N_CLIENTS; i++) {
+ cyg_test_dump_stack_stats(" Client", client_stack[i],
+ client_stack[i] + sizeof(client_stack[i]));
+ }
+}
+
+#else /* (CYGNUM_KERNEL_SCHED_PRIORITIES >= */
+/* (N_MAIN+N_CLIENTS+N_LISTENERS+MAX_HANDLERS)) */
+#define N_A_MSG "not enough priorities available"
+#endif /* (CYGNUM_KERNEL_SCHED_PRIORITIES >= */
+/* (N_MAIN+N_CLIENTS+N_LISTENERS+MAX_HANDLERS)) */
+
+#else /* CYGINT_ISO_MALLOC */
+# define N_A_MSG "this test needs malloc"
+#endif /* CYGINT_ISO_MALLOC */
+
+#else /* CYGFUN_KERNEL_THREADS_TIMER */
+# define N_A_MSG "this test needs kernel threads timer"
+#endif /* CYGFUN_KERNEL_THREADS_TIMER */
+
+#else /* CYGPKG_LIBM */
+# define N_A_MSG "this test needs libm"
+#endif /* CYGPKG_LIBM */
+
+#else /* CYGINT_ISO_STDIO_FORMATTED_IO */
+# define N_A_MSG "this test needs stdio formatted I/O"
+#endif /* CYGINT_ISO_STDIO_FORMATTED_IO */
+
+#else // def CYGFUN_KERNEL_API_C
+# define N_A_MSG "this test needs Kernel C API"
+#endif
+
+#else // def CYGPKG_KERNEL && CYGPKG_IO && CYGPKG_ISOINFRA
+# define N_A_MSG "this tests needs Kernel, isoinfra and IO"
+#endif
+
+#ifdef N_A_MSG
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( N_A_MSG);
+}
+#endif // N_A_MSG
diff --git a/cesar/ecos/packages/kernel/current/tests/sync2.cxx b/cesar/ecos/packages/kernel/current/tests/sync2.cxx
new file mode 100644
index 0000000000..d6e349a048
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/sync2.cxx
@@ -0,0 +1,201 @@
+//==========================================================================
+//
+// sync2.cxx
+//
+// Sync test 2 -- test of different locking mechanisms
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-02-18
+// Description:
+// Creates some threads and tests the various synchronization
+// mechanisms. Four threads are created t0..t3. t0 and t3 grab a
+// mutex and check they have exclusive access to shared variable.
+// t0,t1,t2 post each other in a loop with a semaphore so that
+// only one is running at any time. t1,t2,t3 do a similar thing
+// with counting semaphores, except that there are two active
+// threads.
+// Omissions:
+// Doesn't test condition variables
+//
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/mutex.hxx>
+#include <cyg/kernel/sema.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/sched.inl>
+
+#define NTHREADS 4
+
+#include "testaux.hxx"
+
+static Cyg_Mutex m0;
+static Cyg_Binary_Semaphore s0, s1, s2(1);
+static Cyg_Counting_Semaphore cs0, cs1, cs2, cs3;
+
+static const cyg_ucount16 n = 1000;
+static cyg_ucount8 m0d=99, sd=2, cd0=99, cd1=99;
+
+static void entry0( CYG_ADDRWORD data )
+{
+ for(cyg_ucount16 i=0; i<n; i++) {
+ s2.wait();
+ CHECK( 2 == sd );
+ sd = 0;
+ m0.lock(); {
+ m0d = 0;
+ s0.post();
+ CHECK( 0 == m0d );
+ } m0.unlock();
+ }
+ // wait for 3 explicit posts to indicate threads have stopped.
+ for(cyg_ucount8 i=0; i<3; i++)
+ cs3.wait();
+
+ CHECK( ! s0.posted() );
+ CHECK( ! s1.posted() );
+ CHECK( s2.posted() );
+
+ CHECK( 0 == cs0.peek() );
+ CHECK( 0 == cs1.peek() );
+ CHECK( 0 == cs2.peek() );
+ CHECK( 0 == cs3.peek() );
+
+ CHECK( 0 == cd0 );
+ CHECK( 0 == cd1 );
+ CYG_TEST_PASS_FINISH("Sync 2 OK");
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+static void entry1( CYG_ADDRWORD data )
+{
+ for(cyg_ucount16 i=0; i<n; i++) {
+ s0.wait();
+ CHECK( 0 == sd );
+ sd = 1;
+ cd0 = 1;
+ cs1.post();
+ cd1 = 1;
+ cs1.post();
+ s1.post();
+ cs0.wait();
+ CHECK( 0 == cd0 );
+ cs0.wait();
+ CHECK( 0 == cd1 );
+ }
+ cs3.post();
+ s0.wait();
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+static void entry2( CYG_ADDRWORD data )
+{
+ for(cyg_ucount16 i=0; i<n; i++) {
+ s1.wait();
+ CHECK( 1 == sd );
+ sd = 2;
+ cs1.wait();
+ CHECK( 1 == cd0 );
+ cd0 = 2;
+ cs2.post();
+ s2.post();
+ cs1.wait();
+ CHECK( 1 == cd1 );
+ cd1 = 2;
+ cs2.post();
+ }
+ cs3.post();
+ s1.wait();
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+static void entry3( CYG_ADDRWORD data )
+{
+ for(cyg_ucount16 i=0; i < n*2; i++) {
+ cs2.wait();
+ CHECK( 2 == cd0 || 2 == cd1 );
+ m0.lock(); {
+ m0d = 3;
+ if( 2 == cd0 )
+ cd0 = 0;
+ else {
+ CHECK( 2 == cd1 );
+ cd1 = 0;
+ }
+ cs0.post();
+ CHECK( 3 == m0d );
+ } m0.unlock();
+ }
+ cs3.post();
+ cs1.wait();
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+
+void sync2_main(void)
+{
+ CYG_TEST_INIT();
+
+ new_thread(entry0, 0);
+ new_thread(entry1, 1);
+ new_thread(entry2, 2);
+ new_thread(entry3, 3);
+
+ Cyg_Scheduler::start();
+
+ CYG_TEST_PASS_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ sync2_main();
+}
+
+// EOF sync2.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/sync3.cxx b/cesar/ecos/packages/kernel/current/tests/sync3.cxx
new file mode 100644
index 0000000000..f2c6e2ec13
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/sync3.cxx
@@ -0,0 +1,232 @@
+//==========================================================================
+//
+// sync3.cxx
+//
+// Sync test 3 -- tests priorities and priority inheritance
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-02-18
+// Description:
+// Creates mutexes and threads to set up starvation condition.
+// Checks simple priority inheritance cures this.
+//
+// The starvation condition is caused by the highest priority
+// thread, t0 waiting on a mutex which is never released because
+// it is held by t2. t2 never releases it because t1 will be
+// running at a priority level higher than t2 (but lower than t0).
+//
+// With priority inheritance enabled, t2 will inherit its priority
+// from t0 when t0 tries to grab the mutex.
+//
+// Options:
+// CYGIMP_THREAD_PRIORITY
+// CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT
+// CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_SIMPLE
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/mutex.hxx>
+#include <cyg/kernel/sema.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/sched.inl>
+
+#if defined(CYGIMP_THREAD_PRIORITY) && \
+ !defined(CYGPKG_KERNEL_SMP_SUPPORT)
+
+// ------------------------------------------------------------------------
+// Manufacture a simpler feature test macro for priority inheritance than
+// the configuration gives us. We have priority inheritance if it is configured
+// as the only protocol, or if it is the default protocol for dynamic protocol
+// choice.
+// FIXME: If we have dynamic protocol choice, we can also set priority inheritance
+// as the protocol to be used on the mutexes we are interested in. At present we
+// do not do this.
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT
+# ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+# ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DEFAULT_INHERIT
+# define PRIORITY_INHERITANCE
+# else
+# undef PRIORITY_INHERITANCE
+# endif
+# else
+# define PRIORITY_INHERITANCE
+# endif
+#else
+# undef PRIORITY_INHERITANCE
+#endif
+
+// ------------------------------------------------------------------------
+
+#define NTHREADS 3
+
+#include "testaux.hxx"
+
+static Cyg_Mutex m0;
+static Cyg_Binary_Semaphore s0, s1, s2;
+
+static cyg_ucount8 m0d = 9;
+
+static void check_priorities_normal()
+{
+ CHECK( 5 == thread[0]->get_priority());
+ CHECK( 6 == thread[1]->get_priority());
+ CHECK( 7 == thread[2]->get_priority());
+}
+
+static void check_priorities_inherited()
+{
+ CHECK( 5 == thread[0]->get_priority());
+ CHECK( 6 == thread[1]->get_priority());
+#ifdef PRIORITY_INHERITANCE
+ CHECK( 5 == thread[2]->get_current_priority());
+#endif
+ CHECK( 7 == thread[2]->get_priority());
+
+}
+
+static void entry0( CYG_ADDRWORD data )
+{
+ s0.wait(); // wait until t2 has gained m0.lock
+ check_priorities_normal();
+ m0.lock(); {
+ check_priorities_normal();
+ CHECK( 2 == m0d );
+ m0d = 0;
+ } m0.unlock();
+ check_priorities_normal();
+#ifdef PRIORITY_INHERITANCE
+ CYG_TEST_PASS_FINISH("Sync 3 OK -- priority inheritance worked");
+#else
+ CYG_TEST_FAIL_FINISH("Sync 3: thread not starved");
+#endif
+ // NOT REACHED
+}
+
+static void entry1( CYG_ADDRWORD data )
+{
+ s1.wait();
+ // The delay below will allow testing of the priority inheritance
+ // mechanism when scheduler does not guarantee to schedule threads
+ // in strict priority order.
+ for ( volatile cyg_ucount32 i=0; i < 100000; i++ )
+ ; // math is hard
+
+#ifdef PRIORITY_INHERITANCE
+ // thread0 should have stopped by this point
+ CYG_TEST_FAIL_FINISH("Sync 3: priority inheritance mechanism failed");
+#else
+ // With strict priority scheduling and no priority inheritance
+ // this is expected to happen.
+ CYG_TEST_PASS_FINISH("Sync 3 OK");
+#endif
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+void entry2( CYG_ADDRWORD data )
+{
+ m0.lock(); {
+ CHECK( 9 == m0d );
+ check_priorities_normal();
+ s0.post(); // Now I have lock on m0, wake t0 then t1
+ check_priorities_inherited();
+ s1.post();
+ check_priorities_inherited();
+ m0d = 2;
+ } m0.unlock();
+ check_priorities_normal();
+ m0.lock(); {
+ check_priorities_normal();
+ CHECK( 0 == m0d );
+ m0d = 21;
+ s2.wait(); // never posted
+ } m0.unlock();
+}
+
+
+
+void sync3_main(void)
+{
+ CYG_TEST_INIT();
+
+ new_thread( entry0, 0);
+ new_thread( entry1, 1);
+ new_thread( entry2, 2);
+
+ thread[0]->set_priority(5);
+ thread[1]->set_priority(6);
+ thread[2]->set_priority(7);
+
+ Cyg_Scheduler::start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ sync3_main();
+}
+
+#else // defined(CYGIMP_THREAD_PRIORITY) etc
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_INFO("Sync3 test requires:\n"
+ "defined(CYGIMP_THREAD_PRIORITY) &&\n"
+ "!defined(CYGPKG_KERNEL_SMP_SUPPORT)\n");
+ CYG_TEST_NA("Sync3 test requirements");
+
+}
+
+#endif // defined(CYGIMP_THREAD_PRIORITY) etc
+
+// EOF sync3.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/tcdiag.cxx b/cesar/ecos/packages/kernel/current/tests/tcdiag.cxx
new file mode 100644
index 0000000000..ea4d8c648d
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/tcdiag.cxx
@@ -0,0 +1,97 @@
+//==========================================================================
+//
+// tcdiag.cxx
+//
+// Kernel diag test harness.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-03-17
+// Description: Test harness implementation that uses the kernel's
+// diag channel. This is intended for manual testing
+// of the kernel.
+//####DESCRIPTIONEND####
+
+#include <testcase.h>
+#include <diag.h>
+
+bool cyg_test_is_simulator=false; // infrastructure changes as necessary
+
+void cyg_test_init()
+{
+ diag_init();
+}
+
+void cyg_test_output(int status, char *msg, int line, char *file)
+{
+ char *st;
+
+ switch (status) {
+ case 0:
+ st = "FAIL:";
+ break;
+ case 1:
+ st = "PASS:";
+ break;
+ case 2:
+ st = "EXIT:";
+ break;
+ case 3:
+ st = "INFO:";
+ break;
+ }
+
+ diag_write_string(st);
+ diag_write_char('<');
+ diag_write_string(msg);
+ diag_write_string("> Line: ");
+ diag_write_dec(line);
+ diag_write_string(", File: ");
+ diag_write_string(file);
+ diag_write_char('\n');
+
+}
+
+// This is an appropriate function to set a breakpoint on
+void cyg_test_exit()
+{
+ for(;;)
+ ;
+}
+// EOF tcdiag.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/testaux.h b/cesar/ecos/packages/kernel/current/tests/testaux.h
new file mode 100644
index 0000000000..10712c28a6
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/testaux.h
@@ -0,0 +1,62 @@
+#ifndef CYGONCE_KERNEL_TESTS_TESTAUX_H
+#define CYGONCE_KERNEL_TESTS_TESTAUX_H
+
+/*=================================================================
+//
+// testaux.h
+//
+// Auxiliary test header file
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-03-09
+// Description:
+// Defines some convenience functions to get us going. In
+// particular this file reserves space for NTHREADS threads,
+// which can be created by calls to aux_new_thread()
+// It also defines a CHECK function.
+//
+//####DESCRIPTIONEND####
+*/
+
+#define CHECK(b) CYG_TEST_CHECK(b,#b)
+
+#endif /* ifndef CYGONCE_KERNEL_TESTS_TESTAUX_H */
+
+/* EOF testaux.h */
diff --git a/cesar/ecos/packages/kernel/current/tests/testaux.hxx b/cesar/ecos/packages/kernel/current/tests/testaux.hxx
new file mode 100644
index 0000000000..b258600433
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/testaux.hxx
@@ -0,0 +1,110 @@
+#ifndef CYGONCE_KERNEL_TESTS_TESTAUX_HXX
+#define CYGONCE_KERNEL_TESTS_TESTAUX_HXX
+
+//==========================================================================
+//
+// testaux.hxx
+//
+// Auxiliary test header file
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-03-09
+// Description:
+// Defines some convenience functions to get us going. In
+// particular this file reserves space for NTHREADS threads,
+// which can be created by calls to aux_new_thread()
+// It also defines a CHECK function.
+//
+//####DESCRIPTIONEND####
+
+
+inline void *operator new(size_t size, void *ptr) { return ptr; };
+
+
+#include <pkgconf/hal.h>
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+externC void
+cyg_hal_invoke_constructors();
+#endif
+
+#ifdef NTHREADS
+
+#ifndef STACKSIZE
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+#endif
+
+static Cyg_Thread *thread[NTHREADS];
+
+typedef CYG_WORD64 CYG_ALIGNMENT_TYPE;
+
+static CYG_ALIGNMENT_TYPE thread_obj[NTHREADS] [
+ (sizeof(Cyg_Thread)+sizeof(CYG_ALIGNMENT_TYPE)-1)
+ / sizeof(CYG_ALIGNMENT_TYPE) ];
+
+static CYG_ALIGNMENT_TYPE stack[NTHREADS] [
+ (STACKSIZE+sizeof(CYG_ALIGNMENT_TYPE)-1)
+ / sizeof(CYG_ALIGNMENT_TYPE) ];
+
+static volatile int nthreads = 0;
+
+static Cyg_Thread *new_thread(cyg_thread_entry *entry, CYG_ADDRWORD data)
+{
+ int _nthreads = nthreads++;
+
+ CYG_ASSERT(_nthreads < NTHREADS,
+ "Attempt to create more than NTHREADS threads");
+
+ thread[_nthreads] = new( (void *)&thread_obj[_nthreads] )
+ Cyg_Thread(CYG_SCHED_DEFAULT_INFO,
+ entry, data,
+ NULL, // no name
+ (CYG_ADDRESS)stack[_nthreads], STACKSIZE );
+
+ thread[_nthreads]->resume();
+
+ return thread[_nthreads];
+}
+#endif // defined(NTHREADS)
+
+#define CHECK(b) CYG_TEST_CHECK(b,#b)
+
+#endif // ifndef CYGONCE_KERNEL_TESTS_TESTAUX_HXX
+
+// End of testaux.hxx
diff --git a/cesar/ecos/packages/kernel/current/tests/thread0.cxx b/cesar/ecos/packages/kernel/current/tests/thread0.cxx
new file mode 100644
index 0000000000..db0209e77e
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/thread0.cxx
@@ -0,0 +1,114 @@
+//==========================================================================
+//
+// thread0.cxx
+//
+// Thread test 0
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-02-11
+// Description: Limited to checking constructors/destructors
+// Omissions:
+// Thread constructors with 2 or 3 args are not supported at time
+// of writing test.
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/thread.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/thread.inl>
+
+#include "testaux.hxx"
+
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+static char stack[STACKSIZE];
+
+static cyg_thread_entry entry;
+
+static void entry( CYG_ADDRWORD data )
+{
+}
+
+static int *p;
+
+static bool flash( void )
+{
+#if 0 // no facility to allocate stack exists yet.
+ Cyg_Thread t0( entry, 0x111 );
+
+ CYG_ASSERTCLASS(&t0, "error");
+
+ Cyg_Thread t1( entry, (CYG_ADDRWORD)&t0, STACKSIZE );
+
+ CYG_ASSERTCLASS(&t1, "error");
+#endif
+ Cyg_Thread t2( CYG_SCHED_DEFAULT_INFO,
+ entry, (CYG_ADDRWORD)p,
+ "thread t2",
+ (CYG_ADDRESS)stack, STACKSIZE );
+
+ CYG_ASSERTCLASS(&t2, "error");
+
+ return true;
+}
+
+void thread0_main( void )
+{
+ CYG_TEST_INIT();
+
+ CHECK(flash());
+ CHECK(flash());
+
+ CYG_TEST_PASS_FINISH("Thread 0 OK");
+
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ thread0_main();
+}
+// EOF thread0.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/thread1.cxx b/cesar/ecos/packages/kernel/current/tests/thread1.cxx
new file mode 100644
index 0000000000..2596a1016a
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/thread1.cxx
@@ -0,0 +1,172 @@
+//==========================================================================
+//
+// thread1.cxx
+//
+// Thread test 1
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-02-11
+// Description: Tests some basic thread functions.
+// Omissions: Cyg_ThreadTimer
+// Cyg_Thread
+// exit -- not necessarily called
+// yield
+// set_priority
+// get_priority
+// get/set_sleep_reason
+// get/set_wake_reason
+// set/clear_timer
+// Cyg_ThreadQueue
+//
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/thread.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#ifdef CYGFUN_KERNEL_THREADS_TIMER
+
+#include <cyg/kernel/sched.inl>
+#include <cyg/kernel/thread.inl>
+
+#include "testaux.hxx"
+
+#ifdef CYGNUM_HAL_STACK_SIZE_TYPICAL
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+#else
+#define STACKSIZE 2000
+#endif
+
+static char stack[2][STACKSIZE];
+
+static char thread[2][sizeof(Cyg_Thread)];
+
+static Cyg_Thread *pt0,*pt1;
+static cyg_uint16 uid0,uid1;
+
+
+static void entry0( CYG_ADDRWORD data )
+{
+ CHECK( 222 == data );
+
+ uid0 = pt0->get_unique_id();
+
+ pt1->suspend();
+ pt1->resume();
+
+ do {
+ pt0->delay(1);
+ } while( Cyg_Thread::RUNNING == pt1->get_state() );
+
+ CHECK( Cyg_Thread::SLEEPING == pt1->get_state() );
+
+ pt1->wake();
+
+ CHECK( uid0 != uid1 );
+
+ CYG_TEST_PASS_FINISH("Thread 1 OK");
+}
+
+static void entry1( CYG_ADDRWORD data )
+{
+ CHECK( 333 == data );
+
+ uid1 = pt1->get_unique_id();
+
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ CHECK( self == pt1 );
+
+ pt1->sleep();
+ pt1->suspend();
+
+ Cyg_Thread::exit(); // no guarantee this will be called
+}
+
+void thread1_main( void )
+{
+ CYG_TEST_INIT();
+
+ pt0 = new((void *)&thread[0])
+ Cyg_Thread(CYG_SCHED_DEFAULT_INFO,
+ entry0, 222,
+ "thread 0",
+ (CYG_ADDRESS)stack[0], STACKSIZE );
+ pt1 = new((void *)&thread[1])
+ Cyg_Thread(CYG_SCHED_DEFAULT_INFO,
+ entry1, 333,
+ "thread 1",
+ (CYG_ADDRESS)stack[1], STACKSIZE );
+
+ CYG_ASSERTCLASS( pt0, "error" );
+ CYG_ASSERTCLASS( pt1, "error" );
+
+ pt0->resume();
+ pt1->resume();
+
+ Cyg_Scheduler::start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+}
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ thread1_main();
+}
+
+#else // ifdef CYGFUN_KERNEL_THREADS_TIMER
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA("Kernel threads timer disabled");
+}
+
+#endif // ifdef CYGFUN_KERNEL_THREADS_TIMER
+
+// EOF thread1.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/thread2.cxx b/cesar/ecos/packages/kernel/current/tests/thread2.cxx
new file mode 100644
index 0000000000..e53181987d
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/thread2.cxx
@@ -0,0 +1,236 @@
+//==========================================================================
+//
+// thread2.cxx
+//
+// Thread test 2
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dsm
+// Contributors: dsm
+// Date: 1998-02-19
+// Description:
+// tests scheduler & threads & priorities
+// + create multiple threads with various priorities
+// + check highest priority running thread is always running
+// + check next highest runs when highest suspended
+// + check several threads of equal priority share time
+// (only !CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES)
+// + check other threads are starved
+// + check setting priority dynamically causes a thread to
+// become/stay current/non-current
+// Omissions:
+// check yield
+// check can set threads with min and max priority
+// Options:
+// CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES
+// CYGIMP_THREAD_PRIORITY
+// CYGNUM_KERNEL_SCHED_PRIORITIES
+// CYGSEM_KERNEL_SCHED_BITMAP
+// CYGSEM_KERNEL_SCHED_MLQUEUE
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/mutex.hxx>
+#include <cyg/kernel/sema.hxx>
+
+#include <cyg/infra/testcase.h>
+
+#include <cyg/kernel/sched.inl>
+
+// ------------------------------------------------------------------------
+
+#if defined(CYGIMP_THREAD_PRIORITY) && \
+ !defined(CYGPKG_KERNEL_SMP_SUPPORT)
+
+// ------------------------------------------------------------------------
+
+static Cyg_Counting_Semaphore s0, s1, s2;
+
+static volatile cyg_ucount8 q = 0;
+
+static Cyg_Thread *thread0, *thread1, *thread2;
+
+#define NTHREADS 3
+#include "testaux.hxx"
+
+// ------------------------------------------------------------------------
+
+static void entry0( CYG_ADDRWORD data )
+{
+ CHECK( 0 == q++ );
+ s0.wait();
+ CHECK( 3 == q++ );
+ s1.post();
+ CHECK( 4 == q++ );
+ s0.wait();
+ s0.wait();
+ CYG_TEST_PASS_FINISH("Thread 2 OK");
+}
+
+// ------------------------------------------------------------------------
+
+static void entry1( CYG_ADDRWORD data )
+{
+ CHECK( 1 == q++ );
+ s1.wait();
+ CHECK( 5 == q++ );
+ thread0->set_priority(9);
+ s0.post();
+ CHECK( 6 == q++ );
+ thread2->set_priority(3);
+ CHECK( 8 == q++ );
+ s2.post();
+ CHECK( 12 == q++ );
+ CHECK( 9 == thread0->get_priority() );
+ CHECK( 6 == thread1->get_priority() );
+ CHECK( 7 == thread2->get_priority() );
+ q = 100;
+#if !(CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES) \
+ && defined(CYGSEM_KERNEL_SCHED_TIMESLICE)
+ thread2->set_priority(6);
+ CHECK( 6 == thread1->get_priority() );
+ CHECK( 6 == thread2->get_priority() );
+
+ while ( 100 == q )
+ ;
+ CHECK( 101 == q++ );
+ s1.wait();
+ CHECK( 103 == q++ );
+#endif
+ s0.post();
+ s1.wait();
+}
+
+// ------------------------------------------------------------------------
+
+static void entry2( CYG_ADDRWORD data )
+{
+ CHECK( 2 == q++ );
+ s0.post();
+ CHECK( 7 == q++ );
+ s2.wait();
+ CHECK( 9 == q++ );
+ thread1->set_priority(6);
+ CHECK( 10 == q++ );
+ thread2->set_priority(2);
+ CHECK( 11 == q++ );
+ thread2->set_priority(7);
+
+#if !(CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES) \
+ && defined(CYGSEM_KERNEL_SCHED_TIMESLICE)
+ CHECK( 6 == thread1->get_priority() );
+ CHECK( 6 == thread2->get_priority() );
+
+ CHECK( 100 == q++ );
+ while ( 101 == q )
+ ;
+ CHECK( 102 == q++ );
+ s1.post();
+#endif
+ s0.post();
+ s2.wait();
+}
+
+
+// ------------------------------------------------------------------------
+
+void thread2_main( void )
+{
+ CYG_TEST_INIT();
+
+ thread0 = new_thread( entry0, 0 );
+ thread1 = new_thread( entry1, 1 );
+ thread2 = new_thread( entry2, 2 );
+
+ thread0->resume();
+ thread1->resume();
+ thread2->resume();
+
+ thread0->set_priority(5);
+ thread1->set_priority(6);
+ thread2->set_priority(7);
+
+ if( 9 >= CYG_THREAD_MIN_PRIORITY )
+ CYG_TEST_FAIL_FINISH("Test requires priorities up to 9");
+
+ if( 2 <= CYG_THREAD_MAX_PRIORITY )
+ CYG_TEST_FAIL_FINISH("Test requires priorities as low as 2");
+
+ Cyg_Scheduler::start();
+
+ CYG_TEST_FAIL_FINISH("Unresolved");
+}
+
+// ------------------------------------------------------------------------
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ thread2_main();
+}
+// ------------------------------------------------------------------------
+
+
+#else // CYGPKG_KERNEL_SMP_SUPPORT etc
+
+// ------------------------------------------------------------------------
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_INFO("Thread2 test requires:\n"
+ "defined(CYGIMP_THREAD_PRIORITY) &&\n"
+ "!defined(CYGPKG_KERNEL_SMP_SUPPORT)\n");
+ CYG_TEST_NA("Thread2 test requirements");
+}
+
+// ------------------------------------------------------------------------
+
+#endif // CYGPKG_KERNEL_SMP_SUPPORT etc
+
+// ------------------------------------------------------------------------
+// EOF thread2.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests/thread_gdb.c b/cesar/ecos/packages/kernel/current/tests/thread_gdb.c
new file mode 100644
index 0000000000..15ca90a7f7
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/thread_gdb.c
@@ -0,0 +1,413 @@
+//==========================================================================
+//
+// thread_gdb.c
+//
+// A test for thread support in GDB
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 1998-09-21
+// Description: GDB thread support test.
+//####DESCRIPTIONEND####
+//
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/cyg_ass.h>
+
+#include <cyg/infra/testcase.h>
+
+#if defined(CYGFUN_KERNEL_API_C) && defined(CYGSEM_KERNEL_SCHED_MLQUEUE) &&\
+ (CYGNUM_KERNEL_SCHED_PRIORITIES > 26)
+
+#include <cyg/hal/hal_arch.h> // for CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+// -------------------------------------------------------------------------
+
+#define THREADS 10
+
+#ifdef CYGNUM_HAL_STACK_SIZE_TYPICAL
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+#else
+#define STACKSIZE (2*1024)
+#endif
+
+#define CONTROLLER_PRI_HI 0
+#define CONTROLLER_PRI_LO 25
+
+#define WORKER_PRI 3
+#define WORKER_PRI_RANGE 20
+
+
+// -------------------------------------------------------------------------
+
+// array of stacks for threads
+char thread_stack[THREADS][STACKSIZE];
+
+// array of threads.
+cyg_thread thread[THREADS];
+
+cyg_handle_t thread_handle[THREADS];
+
+volatile cyg_uint8 worker_state;
+
+#define WORKER_STATE_WAIT 1
+#define WORKER_STATE_BREAK 2
+#define WORKER_STATE_EXIT 9
+
+cyg_mutex_t worker_mutex;
+cyg_cond_t worker_cv;
+
+cyg_count32 workers_asleep = 0;
+
+cyg_count32 thread_count[THREADS];
+
+cyg_priority_t thread_pri[THREADS];
+
+
+
+// -------------------------------------------------------------------------
+
+extern void breakme(void)
+{
+}
+
+// -------------------------------------------------------------------------
+
+void worker( cyg_addrword_t id )
+{
+ for(;;)
+ {
+ thread_count[id]++;
+ thread_pri[id] = cyg_thread_get_priority( cyg_thread_self() );
+
+ switch( worker_state )
+ {
+ case WORKER_STATE_BREAK:
+ if( 0 == (id % 4) )
+ breakme();
+
+ case WORKER_STATE_WAIT:
+ cyg_mutex_lock( &worker_mutex );
+ workers_asleep++;
+ cyg_cond_wait( &worker_cv );
+ workers_asleep--;
+ cyg_mutex_unlock( &worker_mutex );
+ break;
+
+ case WORKER_STATE_EXIT:
+ cyg_thread_exit();
+
+ }
+ }
+}
+
+// -------------------------------------------------------------------------
+
+void controller( cyg_addrword_t id )
+{
+ cyg_priority_t pri;
+ int i;
+
+ cyg_mutex_init( &worker_mutex );
+ cyg_cond_init( &worker_cv, &worker_mutex );
+
+// 1 thread, it is running, it calls BREAKME();
+// +++ Thread status returned:
+// +++ 1 thread, running, is the current one
+
+ breakme();
+
+// Create N more threads; they are all suspended after creation. Adjust
+// the priorities of all the threads to lower than the controlling thread.
+// Make them all be distinct priorities as far as possible. BREAKME();
+// +++ 1 thread, running, + N suspended ones of different prios.
+
+ for( i = 1; i < THREADS; i++ )
+ {
+ pri = CONTROLLER_PRI_HI + 1 + i % WORKER_PRI_RANGE;
+
+ cyg_thread_create(pri, worker, (cyg_addrword_t)i, "worker",
+ (void *)(&thread_stack[i]), STACKSIZE,
+ &thread_handle[i], &thread[i]);
+
+ }
+
+ breakme();
+
+// Adjust the priorities of all the threads to lower than the controlling
+// thread. Make them all be THE SAME priority. BREAKME();
+// +++ 1 thread, running, + N suspended ones of same prio.
+
+ for( i = 1; i < THREADS; i++ )
+ {
+ cyg_thread_set_priority( thread_handle[i], WORKER_PRI );
+ }
+
+ breakme();
+
+// Release all the N threads, BREAKME();
+// +++ 1 thread, running, + N ready ones of same prio.
+
+ for( i = 1; i < THREADS; i++ )
+ {
+ cyg_thread_resume( thread_handle[i] );
+ }
+
+ breakme();
+
+// Adjust the priorities of all the threads, lower than the controlling
+// thread. Make them all be distinct priorities as far as possible.
+// BREAKME();
+// +++ 1 thread, running, + N ready ones of different prios.
+
+ for( i = 1; i < THREADS; i++ )
+ {
+ pri = CONTROLLER_PRI_HI + 1 + i % WORKER_PRI_RANGE;
+
+ cyg_thread_set_priority( thread_handle[i], pri );
+ }
+
+ breakme();
+
+// Command all the N threads to sleep; switch my own priority to lower
+// than theirs so that they all run and sleep, then I get back in and
+// BREAKME();
+// +++ 1 thread, running, + N sleeping ones of different prios.
+
+ worker_state = WORKER_STATE_WAIT;
+
+ cyg_thread_set_priority( thread_handle[0], CONTROLLER_PRI_LO );
+
+ breakme();
+
+// Make them all be THE SAME priority; BREAKME();
+// +++ 1 thread, running, + N sleeping ones of same prio.
+
+ for( i = 1; i < THREADS; i++ )
+ {
+ cyg_thread_set_priority( thread_handle[i], WORKER_PRI );
+ }
+
+ breakme();
+
+// Wake them all up, they'll loop once and sleep again; I get in and
+// BREAKME();
+// +++ 1 thread, running, + N sleeping ones of same prio.
+
+ cyg_cond_broadcast( &worker_cv );
+
+ breakme();
+
+// Adjust the priorities of all the threads, higher than the controlling
+// thread. Make them all be distinct priorities as far as possible.
+// BREAKME();
+// +++ 1 thread, running, + N sleeping ones of different prios.
+
+ for( i = 1; i < THREADS; i++ )
+ {
+ pri = CONTROLLER_PRI_HI + 1 + i % WORKER_PRI_RANGE;
+
+ cyg_thread_set_priority( thread_handle[i], pri );
+ }
+
+ breakme();
+
+// Wake them all up, they'll loop once and sleep again; I get in and
+// BREAKME();
+// +++ 1 thread, running, + N sleeping ones of different prios.
+
+ cyg_cond_broadcast( &worker_cv );
+
+ breakme();
+
+// Set them all the same prio, set me to the same prio, BREAKME();
+// +++ 1 running, + N sleeping, *all* the same prio.
+
+ for( i = 0; i < THREADS; i++ )
+ {
+ cyg_thread_set_priority( thread_handle[i], WORKER_PRI );
+ }
+
+ breakme();
+
+// Wake them all up, they'll loop once and sleep again; I get in and
+// BREAKME(); repeatedly until they have all slept again.
+// +++ 1 running, + some sleeping, some ready, *all* the same prio.
+
+ cyg_cond_broadcast( &worker_cv );
+
+// cyg_thread_yield();
+
+ do
+ {
+ breakme();
+
+ } while( workers_asleep != THREADS-1 );
+
+ breakme();
+
+// Suspend some of the threads, BREAKME();
+// +++ 1 running, + some sleeping, some suspended, *all* the same prio.
+
+ for( i = 1; i < THREADS; i++ )
+ {
+ // suspend every 3rd thread
+ if( 0 == (i % 3) ) cyg_thread_suspend( thread_handle[i] );
+ }
+
+ breakme();
+
+
+// Change the prios all different, change my prio to highest , BREAKME();
+// +++ 1 running, + some sleeping, some suspended, different prios.
+
+ cyg_thread_set_priority( thread_handle[0], CONTROLLER_PRI_HI );
+
+ for( i = 1; i < THREADS; i++ )
+ {
+ pri = CONTROLLER_PRI_HI + 1 + i % WORKER_PRI_RANGE;
+
+ cyg_thread_set_priority( thread_handle[i], pri );
+ }
+
+ breakme();
+
+// Wake up all the threads, BREAKME();
+// +++ 1 running, + some ready, some suspended/ready, different prios.
+
+ cyg_cond_broadcast( &worker_cv );
+
+ breakme();
+
+
+// Change my prio to lowest, let all the threads run, BREAKME().
+// +++ 1 running + some sleeping, some suspended/ready, different prios.
+
+ cyg_thread_set_priority( thread_handle[0], CONTROLLER_PRI_LO );
+
+ breakme();
+
+// Resume all the threads, BREAKME();
+// +++ 1 running, + N ready, different prios.
+
+ for( i = 1; i < THREADS; i++ )
+ {
+ cyg_thread_resume( thread_handle[i] );
+ }
+
+ breakme();
+
+// Command some of the N threads to call BREAKME(); themselves (then sleep
+// again). Change my prio to low, so that they all get to run and hit the
+// breakpoint.
+// +++ A different one running every time, others in a mixture of
+// ready and sleeping states.
+
+ worker_state = WORKER_STATE_BREAK;
+
+ cyg_cond_broadcast( &worker_cv );
+
+ cyg_thread_set_priority( thread_handle[0], CONTROLLER_PRI_LO );
+
+ breakme();
+
+// Command all the threads to exit; switch my own priority to lower
+// than theirs so that they all run and exit, then I get back in and
+// BREAKME();
+// +++ 1 thread, running, + N dormant ones.
+
+ worker_state = WORKER_STATE_EXIT;
+
+ cyg_cond_broadcast( &worker_cv );
+
+ breakme();
+
+#if 0
+
+// Cannot do this yet...
+
+// Destroy some of the N threads to invalidate their IDs. Re-create them
+// with new IDs, so that we get IDs 1,2,4,6,8,11,12,13,14,15 in use instead
+// of 1,2,3,4,5,6,7,8,9, if you see what I mean. Do all the above again.
+// Loop forever, or whatever...
+
+#endif
+
+ breakme();
+
+ CYG_TEST_PASS_FINISH("GDB Thread test OK");
+
+}
+
+// -------------------------------------------------------------------------
+
+externC void
+cyg_start( void )
+{
+
+ CYG_TEST_INIT();
+
+ cyg_thread_create(CONTROLLER_PRI_HI, controller, (cyg_addrword_t)0, "controller",
+ (void *)(&thread_stack[0]), STACKSIZE,
+ &thread_handle[0], &thread[0]);
+
+ // resume it
+ cyg_thread_resume(thread_handle[0]);
+
+
+ // Get the world going
+ cyg_scheduler_start();
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+
+}
+
+#else /* def CYGFUN_KERNEL_API_C */
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_PASS_FINISH("Incorrect configuration for this test");
+}
+#endif /* def CYGFUN_KERNEL_API_C && ... */
+
+// -------------------------------------------------------------------------
+// EOF thread_gdb.c
diff --git a/cesar/ecos/packages/kernel/current/tests/timeslice.c b/cesar/ecos/packages/kernel/current/tests/timeslice.c
new file mode 100644
index 0000000000..eb61fc488f
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/timeslice.c
@@ -0,0 +1,282 @@
+//==========================================================================
+//
+// timeslice.c
+//
+// Timeslice test
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2001-06-18
+// Description: A basic timeslicing test.
+//
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include <pkgconf/kernel.h>
+#include <pkgconf/hal.h>
+
+#include <cyg/hal/hal_arch.h>
+
+#include <cyg/kernel/smp.hxx>
+
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h>
+
+//==========================================================================
+
+#if defined(CYGSEM_KERNEL_SCHED_TIMESLICE) && \
+ defined(CYGFUN_KERNEL_API_C) && \
+ defined(CYGSEM_KERNEL_SCHED_MLQUEUE) && \
+ defined(CYGVAR_KERNEL_COUNTERS_CLOCK) && \
+ !defined(CYGDBG_INFRA_DIAG_USE_DEVICE) && \
+ (CYGNUM_KERNEL_SCHED_PRIORITIES > 12)
+
+//==========================================================================
+
+#define STACK_SIZE CYGNUM_HAL_STACK_SIZE_TYPICAL*5
+
+#define NTHREADS_MAX (CYGNUM_KERNEL_CPU_MAX*6)
+
+static int ncpus = CYGNUM_KERNEL_CPU_MAX;
+
+static char test_stack[STACK_SIZE];
+static cyg_thread test_thread;
+static cyg_handle_t main_thread;
+
+static char stacks[NTHREADS_MAX][STACK_SIZE];
+static cyg_thread test_threads[NTHREADS_MAX];
+static cyg_handle_t threads[NTHREADS_MAX];
+
+static volatile int failed = false;
+
+static volatile cyg_uint32 slicerun[NTHREADS_MAX][CYGNUM_KERNEL_CPU_MAX];
+
+//==========================================================================
+
+void
+test_thread_timeslice(CYG_ADDRESS id)
+{
+ for(;;)
+ slicerun[id][CYG_KERNEL_CPU_THIS()]++;
+}
+
+//==========================================================================
+
+void run_test_timeslice(int nthread)
+{
+ int i,j;
+ cyg_uint32 cpu_total[CYGNUM_KERNEL_CPU_MAX];
+ cyg_uint32 cpu_threads[CYGNUM_KERNEL_CPU_MAX];
+ cyg_uint32 thread_total[NTHREADS_MAX];
+
+ CYG_TEST_INFO( "Timeslice Test: Check timeslicing works");
+
+ // Init flags.
+ for (i = 0; i < nthread; i++)
+ for( j = 0; j < ncpus; j++ )
+ slicerun[i][j] = 0;
+
+ // Set my priority higher than any I plan to create
+ cyg_thread_set_priority(cyg_thread_self(), 2);
+
+ for (i = 0; i < nthread; i++) {
+ cyg_thread_create(10, // Priority - just a number
+ test_thread_timeslice, // entry
+ i, // index
+ "test_thread", // Name
+ &stacks[i][0], // Stack
+ STACK_SIZE, // Size
+ &threads[i], // Handle
+ &test_threads[i] // Thread data structure
+ );
+ cyg_thread_resume( threads[i]);
+ }
+
+ // Just wait a while, until the threads have all run for a bit.
+ cyg_thread_delay( CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS*100 );
+
+ // Suspend all the threads
+ for (i = 0; i < nthread; i++) {
+ cyg_thread_suspend(threads[i]);
+ }
+
+
+ // And check that a thread ran on each CPU, and that each thread
+ // ran.
+
+
+ diag_printf(" Thread ");
+ for( j = 0; j < ncpus; j++ )
+ {
+ cpu_total[j] = 0;
+ cpu_threads[j] = 0;
+ // " %11d" __123456789ab"
+ diag_printf(" CPU %2d",j);
+ }
+ // " %11d" __123456789ab"
+ diag_printf(" Total\n");
+ for (i = 0; i < nthread; i++)
+ {
+ thread_total[i] = 0;
+ diag_printf(" %2d ",i);
+ for( j = 0; j < ncpus; j++ )
+ {
+ thread_total[i] += slicerun[i][j];
+ cpu_total[j] += slicerun[i][j];
+ if( slicerun[i][j] > 0 )
+ cpu_threads[j]++;
+ diag_printf(" %11d",slicerun[i][j]);
+ }
+ diag_printf(" %11d\n",thread_total[i]);
+ if( thread_total[i] == 0 )
+ failed++;
+ }
+
+ diag_printf(" Total ");
+ for( j = 0; j < ncpus; j++ )
+ diag_printf(" %11d",cpu_total[j]);
+ diag_printf("\n");
+ diag_printf("Threads ");
+ for( j = 0; j < ncpus; j++ )
+ {
+ diag_printf(" %11d",cpu_threads[j]);
+ if( cpu_threads[j] < 2 )
+ failed++;
+ }
+ diag_printf("\n");
+
+ // Delete all the threads
+ for (i = 0; i < nthread; i++) {
+ cyg_thread_delete(threads[i]);
+ }
+
+ CYG_TEST_INFO( "Timeslice Test: done");
+}
+
+
+//==========================================================================
+
+void
+run_tests(CYG_ADDRESS id)
+{
+ int step;
+ int nthread;
+
+ // Try to run about 10 times in total, with varying numbers of threads
+ // from only one extra up to the full set:
+
+ step = (NTHREADS_MAX - (1 + CYG_KERNEL_CPU_COUNT()))/10;
+ if( step == 0 ) step = 1;
+
+ for( nthread = 1 + CYG_KERNEL_CPU_COUNT() ;
+ nthread <= NTHREADS_MAX ;
+ nthread += step )
+ run_test_timeslice(nthread);
+
+ if( failed )
+ CYG_TEST_FAIL_FINISH("Timeslice test failed\n");
+
+ CYG_TEST_PASS_FINISH("Timeslice test OK");
+}
+
+//==========================================================================
+
+void timeslice_main( void )
+{
+ CYG_TEST_INIT();
+
+ // Work out how many CPUs we actually have.
+ ncpus = CYGNUM_KERNEL_CPU_MAX; //CYG_KERNEL_CPU_COUNT();
+
+ cyg_thread_create(0, // Priority - just a number
+ run_tests, // entry
+ 0, // index
+ "run_tests", // Name
+ test_stack, // Stack
+ STACK_SIZE, // Size
+ &main_thread, // Handle
+ &test_thread // Thread data structure
+ );
+ cyg_thread_resume( main_thread);
+
+ cyg_scheduler_start();
+}
+
+//==========================================================================
+
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+externC void
+cyg_hal_invoke_constructors();
+#endif
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ timeslice_main();
+}
+
+//==========================================================================
+
+#else // CYGSEM_KERNEL_SCHED_TIMESLICE etc
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_INFO("SMP test requires:\n"
+ "CYGSEM_KERNEL_SCHED_TIMESLICE &&\n"
+ "CYGPKG_KERNEL_SMP_SUPPORT &&\n"
+ "CYGFUN_KERNEL_API_C && \n"
+ "CYGSEM_KERNEL_SCHED_MLQUEUE &&\n"
+ "CYGVAR_KERNEL_COUNTERS_CLOCK &&\n"
+ "!CYGPKG_HAL_I386_LINUX &&\n"
+ "!CYGDBG_INFRA_DIAG_USE_DEVICE &&\n"
+ "(CYGNUM_KERNEL_SCHED_PRIORITIES > 12)\n");
+ CYG_TEST_NA("SMP test requirements");
+}
+
+#endif // CYGSEM_KERNEL_SCHED_TIMESLICE etc.
+
+//==========================================================================
+// EOF timeslice.c
diff --git a/cesar/ecos/packages/kernel/current/tests/tm_basic.cxx b/cesar/ecos/packages/kernel/current/tests/tm_basic.cxx
new file mode 100644
index 0000000000..c9e34b5581
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests/tm_basic.cxx
@@ -0,0 +1,1880 @@
+//==========================================================================
+//
+// tm_basic.cxx
+//
+// Basic timing test / scaffolding
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 1998-10-19
+// Description: Very simple kernel timing test
+//####DESCRIPTIONEND####
+
+#include <pkgconf/kernel.h>
+#include <pkgconf/hal.h>
+
+#include <cyg/kernel/sched.hxx>
+#include <cyg/kernel/thread.hxx>
+#include <cyg/kernel/thread.inl>
+#include <cyg/kernel/mutex.hxx>
+#include <cyg/kernel/sema.hxx>
+#include <cyg/kernel/flag.hxx>
+#include <cyg/kernel/sched.inl>
+#include <cyg/kernel/clock.hxx>
+#include <cyg/kernel/clock.inl>
+#include <cyg/kernel/kapi.h>
+
+#include <cyg/infra/testcase.h>
+#include <cyg/infra/diag.h>
+
+#include <cyg/kernel/test/stackmon.h>
+#include CYGHWR_MEMORY_LAYOUT_H
+
+// Define this to see the statistics with the first sample datum removed.
+// This can expose the effects of caches on the speed of operations.
+#undef STATS_WITHOUT_FIRST_SAMPLE
+
+#if defined(CYGFUN_KERNEL_API_C) && \
+ defined(CYGSEM_KERNEL_SCHED_MLQUEUE) && \
+ defined(CYGVAR_KERNEL_COUNTERS_CLOCK) && \
+ !defined(CYGDBG_INFRA_DIAG_USE_DEVICE) && \
+ (CYGNUM_KERNEL_SCHED_PRIORITIES > 12)
+
+#define NTHREADS 1
+#include "testaux.hxx"
+
+// Structure used to keep track of times
+typedef struct fun_times {
+ cyg_uint32 start;
+ cyg_uint32 end;
+} fun_times;
+
+#define STACK_SIZE CYGNUM_HAL_STACK_SIZE_MINIMUM
+
+#if defined(CYGMEM_REGION_ram_SIZE) && !(defined(CYGPKG_HAL_SPARC_LEON3_OPTIONS) || defined(CYGPKG_HAL_SPARC_LEON_OPTIONS))
+#define CYG_THREAD_OVERHEAD (STACK_SIZE+sizeof(cyg_thread)+(sizeof(fun_times)*2))
+#define NTEST_THREADS ((CYGMEM_REGION_ram_SIZE/16)/CYG_THREAD_OVERHEAD)
+#define CYG_MUTEX_OVERHEAD (sizeof(cyg_mutex_t)+sizeof(fun_times))
+#define NMUTEXES ((CYGMEM_REGION_ram_SIZE/16)/CYG_MUTEX_OVERHEAD)
+#define CYG_MBOX_OVERHEAD (sizeof(cyg_mbox)+sizeof(fun_times))
+#define NMBOXES ((CYGMEM_REGION_ram_SIZE/24)/CYG_MBOX_OVERHEAD)
+#define CYG_SEMAPHORE_OVERHEAD (sizeof(cyg_sem_t)+sizeof(fun_times))
+#define NSEMAPHORES ((CYGMEM_REGION_ram_SIZE/16)/CYG_SEMAPHORE_OVERHEAD)
+#define CYG_COUNTER_OVERHEAD (sizeof(cyg_counter)+sizeof(fun_times))
+#define NCOUNTERS ((CYGMEM_REGION_ram_SIZE/24)/CYG_COUNTER_OVERHEAD)
+#define CYG_FLAG_OVERHEAD (sizeof(cyg_flag_t)+sizeof(fun_times))
+#define NFLAGS ((CYGMEM_REGION_ram_SIZE/24)/CYG_FLAG_OVERHEAD)
+#define CYG_ALARM_OVERHEAD (sizeof(cyg_alarm)+sizeof(fun_times))
+#define NALARMS ((CYGMEM_REGION_ram_SIZE/16)/CYG_ALARM_OVERHEAD)
+#else
+// Defaults
+#define NTEST_THREADS 16
+#define NMUTEXES 32
+#define NMBOXES 32
+#define NSEMAPHORES 32
+#define NFLAGS 32
+#define NCOUNTERS 32
+#define NALARMS 32
+#endif
+
+#define NSAMPLES 32
+#define NTHREAD_SWITCHES 128
+#define NSCHEDS 128
+
+#define NSAMPLES_SIM 2
+#define NTEST_THREADS_SIM 2
+#define NTHREAD_SWITCHES_SIM 4
+#define NMUTEXES_SIM 2
+#define NMBOXES_SIM 2
+#define NSEMAPHORES_SIM 2
+#define NSCHEDS_SIM 4
+#define NFLAGS_SIM 2
+#define NCOUNTERS_SIM 2
+#define NALARMS_SIM 2
+
+static int nsamples;
+static int ntest_threads;
+static int nthread_switches;
+static int nmutexes;
+static int nmboxes;
+static int nsemaphores;
+static int nscheds;
+static int nflags;
+static int ncounters;
+static int nalarms;
+
+static char stacks[NTEST_THREADS][STACK_SIZE];
+static cyg_thread test_threads[NTEST_THREADS];
+static cyg_handle_t threads[NTEST_THREADS];
+static int overhead;
+static cyg_sem_t synchro;
+static fun_times thread_ft[NTEST_THREADS];
+
+static fun_times test2_ft[NTHREAD_SWITCHES];
+
+static cyg_mutex_t test_mutexes[NMUTEXES];
+static fun_times mutex_ft[NMUTEXES];
+static cyg_thread mutex_test_thread;
+static cyg_handle_t mutex_test_thread_handle;
+
+static cyg_mbox test_mboxes[NMBOXES];
+static cyg_handle_t test_mbox_handles[NMBOXES];
+static fun_times mbox_ft[NMBOXES];
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+static cyg_thread mbox_test_thread;
+static cyg_handle_t mbox_test_thread_handle;
+#endif
+
+static cyg_sem_t test_semaphores[NSEMAPHORES];
+static fun_times semaphore_ft[NSEMAPHORES];
+static cyg_thread semaphore_test_thread;
+static cyg_handle_t semaphore_test_thread_handle;
+
+static fun_times sched_ft[NSCHEDS];
+
+static cyg_counter test_counters[NCOUNTERS];
+static cyg_handle_t counters[NCOUNTERS];
+static fun_times counter_ft[NCOUNTERS];
+
+static cyg_flag_t test_flags[NFLAGS];
+static fun_times flag_ft[NFLAGS];
+
+static cyg_alarm test_alarms[NALARMS];
+static cyg_handle_t alarms[NALARMS];
+static fun_times alarm_ft[NALARMS];
+
+static long rtc_resolution[] = CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION;
+static long ns_per_system_clock;
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY) && defined(HAL_CLOCK_LATENCY)
+// Data kept by kernel real time clock measuring clock interrupt latency
+extern cyg_tick_count total_clock_latency, total_clock_interrupts;
+extern cyg_int32 min_clock_latency, max_clock_latency;
+extern bool measure_clock_latency;
+#endif
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY) && defined(HAL_CLOCK_LATENCY)
+extern cyg_tick_count total_clock_dsr_latency, total_clock_dsr_calls;
+extern cyg_int32 min_clock_dsr_latency, max_clock_dsr_latency;
+extern bool measure_clock_latency;
+#endif
+
+void run_sched_tests(void);
+void run_thread_tests(void);
+void run_thread_switch_test(void);
+void run_mutex_tests(void);
+void run_mutex_circuit_test(void);
+void run_mbox_tests(void);
+void run_mbox_circuit_test(void);
+void run_semaphore_tests(void);
+void run_semaphore_circuit_test(void);
+void run_counter_tests(void);
+void run_flag_tests(void);
+void run_alarm_tests(void);
+
+#ifndef max
+#define max(n,m) (m > n ? n : m)
+#endif
+
+// Wait until a clock tick [real time clock] has passed. This should keep it
+// from happening again during a measurement, thus minimizing any fluctuations
+void
+wait_for_tick(void)
+{
+ cyg_tick_count_t tv0, tv1;
+ tv0 = cyg_current_time();
+ while (true) {
+ tv1 = cyg_current_time();
+ if (tv1 != tv0) break;
+ }
+}
+
+// Display a number of ticks as microseconds
+// Note: for improved calculation significance, values are kept in ticks*1000
+void
+show_ticks_in_us(cyg_uint32 ticks)
+{
+ long long ns;
+ ns = (ns_per_system_clock * (long long)ticks) / CYGNUM_KERNEL_COUNTERS_RTC_PERIOD;
+ ns += 5; // for rounding to .01us
+ diag_printf("%5d.%02d", (int)(ns/1000), (int)((ns%1000)/10));
+}
+
+//
+// If the kernel is instrumented to measure clock interrupt latency, these
+// measurements can be drastically perturbed by printing via "diag_printf()"
+// since that code may run with interrupts disabled for long periods.
+//
+// In order to get accurate/reasonable latency figures _for the kernel
+// primitive functions beint tested_, the kernel's latency measurements
+// are suspended while the printing actually takes place.
+//
+// The measurements are reenabled after the printing, thus allowing for
+// fair measurements of the kernel primitives, which are not distorted
+// by the printing mechanisms.
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY) && defined(HAL_CLOCK_LATENCY)
+void
+disable_clock_latency_measurement(void)
+{
+ wait_for_tick();
+ measure_clock_latency = false;
+}
+
+void
+enable_clock_latency_measurement(void)
+{
+ wait_for_tick();
+ measure_clock_latency = true;
+}
+
+// Ensure that the measurements are reasonable (no startup anomalies)
+void
+reset_clock_latency_measurement(void)
+{
+ disable_clock_latency_measurement();
+ total_clock_latency = 0;
+ total_clock_interrupts = 0;
+ min_clock_latency = 0x7FFFFFFF;
+ max_clock_latency = 0;
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY) && defined(HAL_CLOCK_LATENCY)
+ total_clock_dsr_latency = 0;
+ total_clock_dsr_calls = 0;
+ min_clock_dsr_latency = 0x7FFFFFFF;
+ max_clock_dsr_latency = 0;
+#endif
+ enable_clock_latency_measurement();
+
+}
+#else
+#define disable_clock_latency_measurement()
+#define enable_clock_latency_measurement()
+#define reset_clock_latency_measurement()
+#endif
+
+void
+show_times_hdr(void)
+{
+ disable_clock_latency_measurement();
+ diag_printf("\n");
+ diag_printf(" Confidence\n");
+ diag_printf(" Ave Min Max Var Ave Min Function\n");
+ diag_printf(" ====== ====== ====== ====== ========== ========\n");
+ enable_clock_latency_measurement();
+}
+
+void
+show_times_detail(fun_times ft[], int nsamples, char *title, bool ignore_first)
+{
+ int i, delta, min, max, con_ave, con_min, ave_dev;
+ int start_sample, total_samples;
+ cyg_int32 total, ave;
+
+ if (ignore_first) {
+ start_sample = 1;
+ total_samples = nsamples-1;
+ } else {
+ start_sample = 0;
+ total_samples = nsamples;
+ }
+ total = 0;
+ min = 0x7FFFFFFF;
+ max = 0;
+ for (i = start_sample; i < nsamples; i++) {
+ if (ft[i].end < ft[i].start) {
+ // Clock wrapped around (timer tick)
+ delta = (ft[i].end+CYGNUM_KERNEL_COUNTERS_RTC_PERIOD) - ft[i].start;
+ } else {
+ delta = ft[i].end - ft[i].start;
+ }
+ delta -= overhead;
+ if (delta < 0) delta = 0;
+ delta *= 1000;
+ total += delta;
+ if (delta < min) min = delta;
+ if (delta > max) max = delta;
+ }
+ ave = total / total_samples;
+ total = 0;
+ ave_dev = 0;
+ for (i = start_sample; i < nsamples; i++) {
+ if (ft[i].end < ft[i].start) {
+ // Clock wrapped around (timer tick)
+ delta = (ft[i].end+CYGNUM_KERNEL_COUNTERS_RTC_PERIOD) - ft[i].start;
+ } else {
+ delta = ft[i].end - ft[i].start;
+ }
+ delta -= overhead;
+ if (delta < 0) delta = 0;
+ delta *= 1000;
+ delta = delta - ave;
+ if (delta < 0) delta = -delta;
+ ave_dev += delta;
+ }
+ ave_dev /= total_samples;
+ con_ave = 0;
+ con_min = 0;
+ for (i = start_sample; i < nsamples; i++) {
+ if (ft[i].end < ft[i].start) {
+ // Clock wrapped around (timer tick)
+ delta = (ft[i].end+CYGNUM_KERNEL_COUNTERS_RTC_PERIOD) - ft[i].start;
+ } else {
+ delta = ft[i].end - ft[i].start;
+ }
+ delta -= overhead;
+ if (delta < 0) delta = 0;
+ delta *= 1000;
+ if ((delta <= (ave+ave_dev)) && (delta >= (ave-ave_dev))) con_ave++;
+ if ((delta <= (min+ave_dev)) && (delta >= (min-ave_dev))) con_min++;
+ }
+ con_ave = (con_ave * 100) / total_samples;
+ con_min = (con_min * 100) / total_samples;
+ show_ticks_in_us(ave);
+ show_ticks_in_us(min);
+ show_ticks_in_us(max);
+ show_ticks_in_us(ave_dev);
+ disable_clock_latency_measurement();
+ diag_printf(" %3d%% %3d%%", con_ave, con_min);
+ diag_printf(" %s\n", title);
+ enable_clock_latency_measurement();
+}
+
+void
+show_times(fun_times ft[], int nsamples, char *title)
+{
+ show_times_detail(ft, nsamples, title, false);
+#ifdef STATS_WITHOUT_FIRST_SAMPLE
+ show_times_detail(ft, nsamples, "", true);
+#endif
+}
+
+void
+show_test_parameters(void)
+{
+ disable_clock_latency_measurement();
+ diag_printf("\nTesting parameters:\n");
+ diag_printf(" Clock samples: %5d\n", nsamples);
+ diag_printf(" Threads: %5d\n", ntest_threads);
+ diag_printf(" Thread switches: %5d\n", nthread_switches);
+ diag_printf(" Mutexes: %5d\n", nmutexes);
+ diag_printf(" Mailboxes: %5d\n", nmboxes);
+ diag_printf(" Semaphores: %5d\n", nsemaphores);
+ diag_printf(" Scheduler operations: %5d\n", nscheds);
+ diag_printf(" Counters: %5d\n", ncounters);
+ diag_printf(" Flags: %5d\n", nflags);
+ diag_printf(" Alarms: %5d\n", nalarms);
+ diag_printf("\n");
+ enable_clock_latency_measurement();
+}
+
+void
+end_of_test_group(void)
+{
+ disable_clock_latency_measurement();
+ diag_printf("\n");
+ enable_clock_latency_measurement();
+}
+
+// Compute a name for a thread
+char *
+thread_name(char *basename, int indx) {
+ return "<<NULL>>"; // Not currently used
+}
+
+// test0 - null test, never executed
+void
+test0(cyg_uint32 indx)
+{
+#ifndef CYGPKG_KERNEL_SMP_SUPPORT
+ // In SMP, somw of these threads will execute
+ diag_printf("test0.%d executed?\n", indx);
+#endif
+ cyg_thread_exit();
+}
+
+// test1 - empty test, simply exit. Last thread signals parent.
+void
+test1(cyg_uint32 indx)
+{
+ if (indx == (cyg_uint32)(ntest_threads-1)) {
+ cyg_semaphore_post(&synchro); // Signal that last thread is dying
+ }
+ cyg_thread_exit();
+}
+
+// test2 - measure thread switch times
+void
+test2(cyg_uint32 indx)
+{
+ int i;
+ for (i = 0; i < nthread_switches; i++) {
+ if (indx == 0) {
+ HAL_CLOCK_READ(&test2_ft[i].start);
+ } else {
+ HAL_CLOCK_READ(&test2_ft[i].end);
+ }
+ cyg_thread_yield();
+ }
+ if (indx == 1) {
+ cyg_semaphore_post(&synchro);
+ }
+ cyg_thread_exit();
+}
+
+// Full-circuit mutex unlock/lock test
+void
+mutex_test(cyg_uint32 indx)
+{
+ int i;
+ cyg_mutex_lock(&test_mutexes[0]);
+ for (i = 0; i < nmutexes; i++) {
+ cyg_semaphore_wait(&synchro);
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ HAL_CLOCK_READ(&mutex_ft[i].start);
+ cyg_mutex_unlock(&test_mutexes[0]);
+ cyg_mutex_lock(&test_mutexes[0]);
+ cyg_semaphore_post(&synchro);
+ }
+ cyg_thread_exit();
+}
+
+// Full-circuit mbox put/get test
+void
+mbox_test(cyg_uint32 indx)
+{
+ void *item;
+ do {
+ item = cyg_mbox_get(test_mbox_handles[0]);
+ HAL_CLOCK_READ(&mbox_ft[(int)item].end);
+ cyg_semaphore_post(&synchro);
+ } while ((int)item != (nmboxes-1));
+ cyg_thread_exit();
+}
+
+// Full-circuit semaphore post/wait test
+void
+semaphore_test(cyg_uint32 indx)
+{
+ int i;
+ for (i = 0; i < nsemaphores; i++) {
+ cyg_semaphore_wait(&test_semaphores[0]);
+ HAL_CLOCK_READ(&semaphore_ft[i].end);
+ cyg_semaphore_post(&synchro);
+ }
+ cyg_thread_exit();
+}
+
+//
+// This set of tests is used to measure kernel primitives that deal with threads
+//
+void
+run_thread_tests(void)
+{
+ int i;
+ cyg_priority_t prio;
+
+ // Set my priority higher than any I plan to create
+ cyg_thread_set_priority(cyg_thread_self(), 2);
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ cyg_thread_create(10, // Priority - just a number
+ test0, // entry
+ i, // index
+ thread_name("thread", i), // Name
+ &stacks[i][0], // Stack
+ STACK_SIZE, // Size
+ &threads[i], // Handle
+ &test_threads[i] // Thread data structure
+ );
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Create thread");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ cyg_thread_yield();
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Yield thread [all suspended]");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ cyg_thread_suspend(threads[i]);
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Suspend [suspended] thread");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ cyg_thread_resume(threads[i]);
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Resume thread");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ cyg_thread_set_priority(threads[i], 11);
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Set priority");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ prio = cyg_thread_get_priority(threads[i]);
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Get priority");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ cyg_thread_kill(threads[i]);
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Kill [suspended] thread");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ cyg_thread_yield();
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Yield [no other] thread");
+
+ // Set my priority higher than any I plan to create
+ cyg_thread_set_priority(cyg_thread_self(), 2);
+
+ // Recreate the test set
+ for (i = 0; i < ntest_threads; i++) {
+ cyg_thread_create(10, // Priority - just a number
+ test0, // entry
+ i, // index
+ thread_name("thread", i), // Name
+ &stacks[i][0], // Stack
+ STACK_SIZE, // Size
+ &threads[i], // Handle
+ &test_threads[i] // Thread data structure
+ );
+ }
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ cyg_thread_resume(threads[i]);
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Resume [suspended low prio] thread");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ cyg_thread_resume(threads[i]);
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Resume [runnable low prio] thread");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ cyg_thread_suspend(threads[i]);
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Suspend [runnable] thread");
+
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ cyg_thread_yield();
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Yield [only low prio] thread");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ cyg_thread_suspend(threads[i]);
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Suspend [runnable->not runnable]");
+ for (i = 0; i < ntest_threads; i++) {
+ cyg_thread_resume(threads[i]);
+ }
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ cyg_thread_kill(threads[i]);
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Kill [runnable] thread");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ cyg_thread_delete(threads[i]);
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Destroy [dead] thread");
+
+ // Recreate the test set
+ for (i = 0; i < ntest_threads; i++) {
+ cyg_thread_create(10, // Priority - just a number
+ test0, // entry
+ i, // index
+ thread_name("thread", i), // Name
+ &stacks[i][0], // Stack
+ STACK_SIZE, // Size
+ &threads[i], // Handle
+ &test_threads[i] // Thread data structure
+ );
+ cyg_thread_resume(threads[i]);
+ }
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ cyg_thread_delete(threads[i]);
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Destroy [runnable] thread");
+
+ // Set my priority lower than any I plan to create
+ cyg_thread_set_priority(cyg_thread_self(), 3);
+
+ // Set up the end-of-threads synchronizer
+ cyg_semaphore_init(&synchro, 0);
+
+ // Recreate the test set
+ for (i = 0; i < ntest_threads; i++) {
+ cyg_thread_create(2, // Priority - just a number
+ test1, // entry
+ i, // index
+ thread_name("thread", i), // Name
+ &stacks[i][0], // Stack
+ STACK_SIZE, // Size
+ &threads[i], // Handle
+ &test_threads[i] // Thread data structure
+ );
+ }
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ntest_threads; i++) {
+ HAL_CLOCK_READ(&thread_ft[i].start);
+ cyg_thread_resume(threads[i]);
+ HAL_CLOCK_READ(&thread_ft[i].end);
+ }
+ show_times(thread_ft, ntest_threads, "Resume [high priority] thread");
+ cyg_semaphore_wait(&synchro); // Wait for all threads to finish
+ // Make sure they are all dead
+ for (i = 0; i < ntest_threads; i++) {
+ cyg_thread_delete(threads[i]);
+ }
+
+ run_thread_switch_test();
+ end_of_test_group();
+}
+
+void
+run_thread_switch_test(void)
+{
+ int i;
+
+ // Set up for thread context switch
+ for (i = 0; i < 2; i++) {
+ cyg_thread_create(10, // Priority - just a number
+ test2, // entry
+ i, // index
+ thread_name("thread", i), // Name
+ &stacks[i][0], // Stack
+ STACK_SIZE, // Size
+ &threads[i], // Handle
+ &test_threads[i] // Thread data structure
+ );
+ cyg_thread_resume(threads[i]);
+ }
+ // Set up the end-of-threads synchronizer
+ cyg_semaphore_init(&synchro, 0);
+ cyg_semaphore_wait(&synchro);
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ show_times(test2_ft, nthread_switches, "Thread switch");
+ // Clean up
+ for (i = 0; i < 2; i++) {
+ cyg_thread_delete(threads[i]);
+ }
+}
+
+void
+run_mutex_tests(void)
+{
+ int i;
+
+ // Mutex primitives
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmutexes; i++) {
+ HAL_CLOCK_READ(&mutex_ft[i].start);
+ cyg_mutex_init(&test_mutexes[i]);
+ HAL_CLOCK_READ(&mutex_ft[i].end);
+ }
+ show_times(mutex_ft, nmutexes, "Init mutex");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmutexes; i++) {
+ HAL_CLOCK_READ(&mutex_ft[i].start);
+ cyg_mutex_lock(&test_mutexes[i]);
+ HAL_CLOCK_READ(&mutex_ft[i].end);
+ }
+ show_times(mutex_ft, nmutexes, "Lock [unlocked] mutex");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmutexes; i++) {
+ HAL_CLOCK_READ(&mutex_ft[i].start);
+ cyg_mutex_unlock(&test_mutexes[i]);
+ HAL_CLOCK_READ(&mutex_ft[i].end);
+ }
+ show_times(mutex_ft, nmutexes, "Unlock [locked] mutex");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmutexes; i++) {
+ HAL_CLOCK_READ(&mutex_ft[i].start);
+ cyg_mutex_trylock(&test_mutexes[i]);
+ HAL_CLOCK_READ(&mutex_ft[i].end);
+ }
+ show_times(mutex_ft, nmutexes, "Trylock [unlocked] mutex");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmutexes; i++) {
+ HAL_CLOCK_READ(&mutex_ft[i].start);
+ cyg_mutex_trylock(&test_mutexes[i]);
+ HAL_CLOCK_READ(&mutex_ft[i].end);
+ }
+ show_times(mutex_ft, nmutexes, "Trylock [locked] mutex");
+
+ // Must unlock mutices before destroying them.
+ for (i = 0; i < nmutexes; i++) {
+ cyg_mutex_unlock(&test_mutexes[i]);
+ }
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmutexes; i++) {
+ HAL_CLOCK_READ(&mutex_ft[i].start);
+ cyg_mutex_destroy(&test_mutexes[i]);
+ HAL_CLOCK_READ(&mutex_ft[i].end);
+ }
+ show_times(mutex_ft, nmutexes, "Destroy mutex");
+ run_mutex_circuit_test();
+ end_of_test_group();
+}
+
+void
+run_mutex_circuit_test(void)
+{
+ int i;
+ // Set my priority lower than any I plan to create
+ cyg_thread_set_priority(cyg_thread_self(), 4);
+ // Set up for full mutex unlock/lock test
+ cyg_mutex_init(&test_mutexes[0]);
+ cyg_semaphore_init(&synchro, 0);
+ cyg_thread_create(3, // Priority - just a number
+ mutex_test, // entry
+ 0, // index
+ thread_name("thread", 0), // Name
+ &stacks[0][0], // Stack
+ STACK_SIZE, // Size
+ &mutex_test_thread_handle, // Handle
+ &mutex_test_thread // Thread data structure
+ );
+ cyg_thread_resume(mutex_test_thread_handle);
+ // Need to raise priority so that this thread will block on the "lock"
+ cyg_thread_set_priority(cyg_thread_self(), 2);
+ for (i = 0; i < nmutexes; i++) {
+ cyg_semaphore_post(&synchro);
+ cyg_mutex_lock(&test_mutexes[0]);
+ HAL_CLOCK_READ(&mutex_ft[i].end);
+ cyg_mutex_unlock(&test_mutexes[0]);
+ cyg_semaphore_wait(&synchro);
+ }
+ cyg_thread_delete(mutex_test_thread_handle);
+ show_times(mutex_ft, nmutexes, "Unlock/Lock mutex");
+}
+
+void
+run_mbox_tests(void)
+{
+ int i, cnt;
+ void *item;
+ // Mailbox primitives
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cyg_mbox_create(&test_mbox_handles[i], &test_mboxes[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Create mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cnt = cyg_mbox_peek(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Peek [empty] mbox");
+
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cyg_mbox_put(test_mbox_handles[i], (void *)i);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Put [first] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cnt = cyg_mbox_peek(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Peek [1 msg] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cyg_mbox_put(test_mbox_handles[i], (void *)i);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Put [second] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cnt = cyg_mbox_peek(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Peek [2 msgs] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ item = cyg_mbox_get(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Get [first] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ item = cyg_mbox_get(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Get [second] mbox");
+#endif // ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cyg_mbox_tryput(test_mbox_handles[i], (void *)i);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Tryput [first] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ item = cyg_mbox_peek_item(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Peek item [non-empty] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ item = cyg_mbox_tryget(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Tryget [non-empty] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ item = cyg_mbox_peek_item(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Peek item [empty] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ item = cyg_mbox_tryget(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Tryget [empty] mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cyg_mbox_waiting_to_get(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Waiting to get mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cyg_mbox_waiting_to_put(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Waiting to put mbox");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nmboxes; i++) {
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cyg_mbox_delete(test_mbox_handles[i]);
+ HAL_CLOCK_READ(&mbox_ft[i].end);
+ }
+ show_times(mbox_ft, nmboxes, "Delete mbox");
+
+ run_mbox_circuit_test();
+ end_of_test_group();
+}
+
+void
+run_mbox_circuit_test(void)
+{
+#ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
+ int i;
+ // Set my priority lower than any I plan to create
+ cyg_thread_set_priority(cyg_thread_self(), 3);
+ // Set up for full mbox put/get test
+ cyg_mbox_create(&test_mbox_handles[0], &test_mboxes[0]);
+ cyg_semaphore_init(&synchro, 0);
+ cyg_thread_create(2, // Priority - just a number
+ mbox_test, // entry
+ 0, // index
+ thread_name("thread", 0), // Name
+ &stacks[0][0], // Stack
+ STACK_SIZE, // Size
+ &mbox_test_thread_handle, // Handle
+ &mbox_test_thread // Thread data structure
+ );
+ cyg_thread_resume(mbox_test_thread_handle);
+ for (i = 0; i < nmboxes; i++) {
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ HAL_CLOCK_READ(&mbox_ft[i].start);
+ cyg_mbox_put(test_mbox_handles[0], (void *)i);
+ cyg_semaphore_wait(&synchro);
+ }
+ cyg_thread_delete(mbox_test_thread_handle);
+ show_times(mbox_ft, nmboxes, "Put/Get mbox");
+#endif
+}
+
+void
+run_semaphore_tests(void)
+{
+ int i;
+ cyg_count32 sem_val;
+ // Semaphore primitives
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nsemaphores; i++) {
+ HAL_CLOCK_READ(&semaphore_ft[i].start);
+ cyg_semaphore_init(&test_semaphores[i], 0);
+ HAL_CLOCK_READ(&semaphore_ft[i].end);
+ }
+ show_times(semaphore_ft, nsemaphores, "Init semaphore");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nsemaphores; i++) {
+ HAL_CLOCK_READ(&semaphore_ft[i].start);
+ cyg_semaphore_post(&test_semaphores[i]);
+ HAL_CLOCK_READ(&semaphore_ft[i].end);
+ }
+ show_times(semaphore_ft, nsemaphores, "Post [0] semaphore");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nsemaphores; i++) {
+ HAL_CLOCK_READ(&semaphore_ft[i].start);
+ cyg_semaphore_wait(&test_semaphores[i]);
+ HAL_CLOCK_READ(&semaphore_ft[i].end);
+ }
+ show_times(semaphore_ft, nsemaphores, "Wait [1] semaphore");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nsemaphores; i++) {
+ HAL_CLOCK_READ(&semaphore_ft[i].start);
+ cyg_semaphore_trywait(&test_semaphores[i]);
+ HAL_CLOCK_READ(&semaphore_ft[i].end);
+ }
+ show_times(semaphore_ft, nsemaphores, "Trywait [0] semaphore");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nsemaphores; i++) {
+ cyg_semaphore_post(&test_semaphores[i]);
+ HAL_CLOCK_READ(&semaphore_ft[i].start);
+ cyg_semaphore_trywait(&test_semaphores[i]);
+ HAL_CLOCK_READ(&semaphore_ft[i].end);
+ }
+ show_times(semaphore_ft, nsemaphores, "Trywait [1] semaphore");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nsemaphores; i++) {
+ HAL_CLOCK_READ(&semaphore_ft[i].start);
+ cyg_semaphore_peek(&test_semaphores[i], &sem_val);
+ HAL_CLOCK_READ(&semaphore_ft[i].end);
+ }
+ show_times(semaphore_ft, nsemaphores, "Peek semaphore");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nsemaphores; i++) {
+ HAL_CLOCK_READ(&semaphore_ft[i].start);
+ cyg_semaphore_destroy(&test_semaphores[i]);
+ HAL_CLOCK_READ(&semaphore_ft[i].end);
+ }
+ show_times(semaphore_ft, nsemaphores, "Destroy semaphore");
+
+ run_semaphore_circuit_test();
+ end_of_test_group();
+}
+
+void
+run_semaphore_circuit_test(void)
+{
+ int i;
+ // Set my priority lower than any I plan to create
+ cyg_thread_set_priority(cyg_thread_self(), 3);
+ // Set up for full semaphore post/wait test
+ cyg_semaphore_init(&test_semaphores[0], 0);
+ cyg_semaphore_init(&synchro, 0);
+ cyg_thread_create(2, // Priority - just a number
+ semaphore_test, // entry
+ 0, // index
+ thread_name("thread", 0), // Name
+ &stacks[0][0], // Stack
+ STACK_SIZE, // Size
+ &semaphore_test_thread_handle, // Handle
+ &semaphore_test_thread // Thread data structure
+ );
+ cyg_thread_resume(semaphore_test_thread_handle);
+ for (i = 0; i < nsemaphores; i++) {
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ HAL_CLOCK_READ(&semaphore_ft[i].start);
+ cyg_semaphore_post(&test_semaphores[0]);
+ cyg_semaphore_wait(&synchro);
+ }
+ cyg_thread_delete(semaphore_test_thread_handle);
+ show_times(semaphore_ft, nsemaphores, "Post/Wait semaphore");
+}
+
+void
+run_counter_tests(void)
+{
+ int i;
+ cyg_tick_count_t val=0;
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ncounters; i++) {
+ HAL_CLOCK_READ(&counter_ft[i].start);
+ cyg_counter_create(&counters[i], &test_counters[i]);
+ HAL_CLOCK_READ(&counter_ft[i].end);
+ }
+ show_times(counter_ft, ncounters, "Create counter");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ncounters; i++) {
+ HAL_CLOCK_READ(&counter_ft[i].start);
+ val = cyg_counter_current_value(counters[i]);
+ HAL_CLOCK_READ(&counter_ft[i].end);
+ }
+ show_times(counter_ft, ncounters, "Get counter value");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ncounters; i++) {
+ HAL_CLOCK_READ(&counter_ft[i].start);
+ cyg_counter_set_value(counters[i], val);
+ HAL_CLOCK_READ(&counter_ft[i].end);
+ }
+ show_times(counter_ft, ncounters, "Set counter value");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ncounters; i++) {
+ HAL_CLOCK_READ(&counter_ft[i].start);
+ cyg_counter_tick(counters[i]);
+ HAL_CLOCK_READ(&counter_ft[i].end);
+ }
+ show_times(counter_ft, ncounters, "Tick counter");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ncounters; i++) {
+ HAL_CLOCK_READ(&counter_ft[i].start);
+ cyg_counter_delete(counters[i]);
+ HAL_CLOCK_READ(&counter_ft[i].end);
+ }
+ show_times(counter_ft, ncounters, "Delete counter");
+ end_of_test_group();
+}
+
+void
+run_flag_tests(void)
+{
+ int i;
+ cyg_flag_value_t val;
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nflags; i++) {
+ HAL_CLOCK_READ(&flag_ft[i].start);
+ cyg_flag_init(&test_flags[i]);
+ HAL_CLOCK_READ(&flag_ft[i].end);
+ }
+ show_times(flag_ft, nflags, "Init flag");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nflags; i++) {
+ HAL_CLOCK_READ(&flag_ft[i].start);
+ cyg_flag_destroy(&test_flags[i]);
+ HAL_CLOCK_READ(&flag_ft[i].end);
+ }
+ show_times(flag_ft, nflags, "Destroy flag");
+
+ // Recreate the flags - reused in the remaining tests
+ for (i = 0; i < nflags; i++) {
+ cyg_flag_init(&test_flags[i]);
+ }
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nflags; i++) {
+ HAL_CLOCK_READ(&flag_ft[i].start);
+ cyg_flag_maskbits(&test_flags[i], 0);
+ HAL_CLOCK_READ(&flag_ft[i].end);
+ }
+ show_times(flag_ft, nflags, "Mask bits in flag");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nflags; i++) {
+ HAL_CLOCK_READ(&flag_ft[i].start);
+ cyg_flag_setbits(&test_flags[i], 0x11);
+ HAL_CLOCK_READ(&flag_ft[i].end);
+ }
+ show_times(flag_ft, nflags, "Set bits in flag [no waiters]");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nflags; i++) {
+ cyg_flag_setbits(&test_flags[i], 0x11);
+ HAL_CLOCK_READ(&flag_ft[i].start);
+ cyg_flag_wait(&test_flags[i], 0x11, CYG_FLAG_WAITMODE_AND);
+ HAL_CLOCK_READ(&flag_ft[i].end);
+ }
+ show_times(flag_ft, nflags, "Wait for flag [AND]");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nflags; i++) {
+ cyg_flag_setbits(&test_flags[i], 0x11);
+ HAL_CLOCK_READ(&flag_ft[i].start);
+ cyg_flag_wait(&test_flags[i], 0x11, CYG_FLAG_WAITMODE_OR);
+ HAL_CLOCK_READ(&flag_ft[i].end);
+ }
+ show_times(flag_ft, nflags, "Wait for flag [OR]");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nflags; i++) {
+ cyg_flag_setbits(&test_flags[i], 0x11);
+ HAL_CLOCK_READ(&flag_ft[i].start);
+ cyg_flag_wait(&test_flags[i], 0x11, CYG_FLAG_WAITMODE_AND|CYG_FLAG_WAITMODE_CLR);
+ HAL_CLOCK_READ(&flag_ft[i].end);
+ }
+ show_times(flag_ft, nflags, "Wait for flag [AND/CLR]");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nflags; i++) {
+ cyg_flag_setbits(&test_flags[i], 0x11);
+ HAL_CLOCK_READ(&flag_ft[i].start);
+ cyg_flag_wait(&test_flags[i], 0x11, CYG_FLAG_WAITMODE_OR|CYG_FLAG_WAITMODE_CLR);
+ HAL_CLOCK_READ(&flag_ft[i].end);
+ }
+ show_times(flag_ft, nflags, "Wait for flag [OR/CLR]");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nflags; i++) {
+ cyg_flag_setbits(&test_flags[i], 0x11);
+ HAL_CLOCK_READ(&flag_ft[i].start);
+ val = cyg_flag_peek(&test_flags[i]);
+ HAL_CLOCK_READ(&flag_ft[i].end);
+ }
+ show_times(flag_ft, nflags, "Peek on flag");
+
+ // Destroy flags - no longer needed
+ for (i = 0; i < nflags; i++) {
+ cyg_flag_destroy(&test_flags[i]);
+ }
+ end_of_test_group();
+}
+
+// Alarm callback function
+void
+alarm_cb(cyg_handle_t alarm, cyg_addrword_t val)
+{
+ // empty call back
+}
+
+// Callback used to test determinancy
+static volatile int alarm_cnt;
+void
+alarm_cb2(cyg_handle_t alarm, cyg_addrword_t indx)
+{
+ if (alarm_cnt == nscheds) return;
+ sched_ft[alarm_cnt].start = 0;
+ HAL_CLOCK_READ(&sched_ft[alarm_cnt++].end);
+ if (alarm_cnt == nscheds) {
+ cyg_semaphore_post(&synchro);
+ }
+}
+
+static void
+alarm_cb3(cyg_handle_t alarm, cyg_addrword_t indx)
+{
+ if (alarm_cnt == nscheds) {
+ cyg_semaphore_post(&synchro);
+ } else {
+ sched_ft[alarm_cnt].start = 0;
+ cyg_thread_resume((cyg_handle_t)indx);
+ }
+}
+
+// Null thread, used to keep scheduler busy
+void
+alarm_test(cyg_uint32 id)
+{
+ while (true) {
+ cyg_thread_yield();
+ }
+}
+
+// Thread that suspends itself at the first opportunity
+void
+alarm_test2(cyg_uint32 id)
+{
+ cyg_handle_t me = cyg_thread_self();
+ while (true) {
+ HAL_CLOCK_READ(&sched_ft[alarm_cnt++].end);
+ cyg_thread_suspend(me);
+ }
+}
+
+void
+run_alarm_tests(void)
+{
+ int i;
+ cyg_tick_count_t init_val, step_val;
+ cyg_handle_t rtc_handle;
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < ncounters; i++) {
+ cyg_counter_create(&counters[i], &test_counters[i]);
+ }
+ for (i = 0; i < nalarms; i++) {
+ HAL_CLOCK_READ(&alarm_ft[i].start);
+ cyg_alarm_create(counters[0], alarm_cb, 0, &alarms[i], &test_alarms[i]);
+ HAL_CLOCK_READ(&alarm_ft[i].end);
+ }
+ show_times(alarm_ft, nalarms, "Create alarm");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ init_val = 0; step_val = 0;
+ for (i = 0; i < nalarms; i++) {
+ HAL_CLOCK_READ(&alarm_ft[i].start);
+ cyg_alarm_initialize(alarms[i], init_val, step_val);
+ HAL_CLOCK_READ(&alarm_ft[i].end);
+ }
+ show_times(alarm_ft, nalarms, "Initialize alarm");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ init_val = 0; step_val = 0;
+ for (i = 0; i < nalarms; i++) {
+ HAL_CLOCK_READ(&alarm_ft[i].start);
+ cyg_alarm_disable(alarms[i]);
+ HAL_CLOCK_READ(&alarm_ft[i].end);
+ }
+ show_times(alarm_ft, nalarms, "Disable alarm");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ init_val = 0; step_val = 0;
+ for (i = 0; i < nalarms; i++) {
+ HAL_CLOCK_READ(&alarm_ft[i].start);
+ cyg_alarm_enable(alarms[i]);
+ HAL_CLOCK_READ(&alarm_ft[i].end);
+ }
+ show_times(alarm_ft, nalarms, "Enable alarm");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nalarms; i++) {
+ HAL_CLOCK_READ(&alarm_ft[i].start);
+ cyg_alarm_delete(alarms[i]);
+ HAL_CLOCK_READ(&alarm_ft[i].end);
+ }
+ show_times(alarm_ft, nalarms, "Delete alarm");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ cyg_counter_create(&counters[0], &test_counters[0]);
+ cyg_alarm_create(counters[0], alarm_cb, 0, &alarms[0], &test_alarms[0]);
+ init_val = 9999; step_val = 9999;
+ cyg_alarm_initialize(alarms[0], init_val, step_val);
+ cyg_alarm_enable(alarms[0]);
+ for (i = 0; i < ncounters; i++) {
+ HAL_CLOCK_READ(&counter_ft[i].start);
+ cyg_counter_tick(counters[0]);
+ HAL_CLOCK_READ(&counter_ft[i].end);
+ }
+ show_times(counter_ft, ncounters, "Tick counter [1 alarm]");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ cyg_counter_create(&counters[0], &test_counters[0]);
+ for (i = 0; i < nalarms; i++) {
+ cyg_alarm_create(counters[0], alarm_cb, 0, &alarms[i], &test_alarms[i]);
+ init_val = 9999; step_val = 9999;
+ cyg_alarm_initialize(alarms[i], init_val, step_val);
+ cyg_alarm_enable(alarms[i]);
+ }
+ for (i = 0; i < ncounters; i++) {
+ HAL_CLOCK_READ(&counter_ft[i].start);
+ cyg_counter_tick(counters[0]);
+ HAL_CLOCK_READ(&counter_ft[i].end);
+ }
+ show_times(counter_ft, ncounters, "Tick counter [many alarms]");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ cyg_counter_create(&counters[0], &test_counters[0]);
+ cyg_alarm_create(counters[0], alarm_cb, 0, &alarms[0], &test_alarms[0]);
+ init_val = 1; step_val = 1;
+ cyg_alarm_initialize(alarms[0], init_val, step_val);
+ cyg_alarm_enable(alarms[0]);
+ for (i = 0; i < ncounters; i++) {
+ HAL_CLOCK_READ(&counter_ft[i].start);
+ cyg_counter_tick(counters[0]);
+ HAL_CLOCK_READ(&counter_ft[i].end);
+ }
+ show_times(counter_ft, ncounters, "Tick & fire counter [1 alarm]");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ cyg_counter_create(&counters[0], &test_counters[0]);
+ for (i = 0; i < nalarms; i++) {
+ cyg_alarm_create(counters[0], alarm_cb, i, &alarms[i], &test_alarms[i]);
+ init_val = 1; step_val = 1;
+ cyg_alarm_initialize(alarms[i], init_val, step_val);
+ cyg_alarm_enable(alarms[i]);
+ }
+ for (i = 0; i < nalarms; i++) {
+ HAL_CLOCK_READ(&alarm_ft[i].start);
+ cyg_counter_tick(counters[0]);
+ HAL_CLOCK_READ(&alarm_ft[i].end);
+ }
+ for (i = 0; i < nalarms; i++) {
+ cyg_alarm_delete(alarms[i]);
+ }
+ show_times(alarm_ft, nalarms, "Tick & fire counters [>1 together]");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ cyg_counter_create(&counters[0], &test_counters[0]);
+ for (i = 0; i < nalarms; i++) {
+ cyg_alarm_create(counters[0], alarm_cb, i, &alarms[i], &test_alarms[i]);
+ init_val = i+1; step_val = nalarms+1;
+ cyg_alarm_initialize(alarms[i], init_val, step_val);
+ cyg_alarm_enable(alarms[i]);
+ }
+ for (i = 0; i < nalarms; i++) {
+ HAL_CLOCK_READ(&alarm_ft[i].start);
+ cyg_counter_tick(counters[0]);
+ HAL_CLOCK_READ(&alarm_ft[i].end);
+ }
+ for (i = 0; i < nalarms; i++) {
+ cyg_alarm_delete(alarms[i]);
+ }
+ show_times(alarm_ft, nalarms, "Tick & fire counters [>1 separately]");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ cyg_clock_to_counter(cyg_real_time_clock(), &rtc_handle);
+ cyg_alarm_create(rtc_handle, alarm_cb2, 0, &alarms[0], &test_alarms[0]);
+ init_val = 5; step_val = 5; alarm_cnt = 0;
+ cyg_alarm_initialize(alarms[0], init_val, step_val);
+ cyg_semaphore_init(&synchro, 0);
+ cyg_alarm_enable(alarms[0]);
+ cyg_semaphore_wait(&synchro);
+ cyg_alarm_disable(alarms[0]);
+ cyg_alarm_delete(alarms[0]);
+ show_times(sched_ft, nscheds, "Alarm latency [0 threads]");
+
+ // Set my priority higher than any I plan to create
+ cyg_thread_set_priority(cyg_thread_self(), 2);
+ for (i = 0; i < 2; i++) {
+ cyg_thread_create(10, // Priority - just a number
+ alarm_test, // entry
+ i, // index
+ thread_name("thread", i), // Name
+ &stacks[i][0], // Stack
+ STACK_SIZE, // Size
+ &threads[i], // Handle
+ &test_threads[i] // Thread data structure
+ );
+ cyg_thread_resume(threads[i]);
+ }
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ cyg_clock_to_counter(cyg_real_time_clock(), &rtc_handle);
+ cyg_alarm_create(rtc_handle, alarm_cb2, 0, &alarms[0], &test_alarms[0]);
+ init_val = 5; step_val = 5; alarm_cnt = 0;
+ cyg_alarm_initialize(alarms[0], init_val, step_val);
+ cyg_semaphore_init(&synchro, 0);
+ cyg_alarm_enable(alarms[0]);
+ cyg_semaphore_wait(&synchro);
+ cyg_alarm_disable(alarms[0]);
+ cyg_alarm_delete(alarms[0]);
+ show_times(sched_ft, nscheds, "Alarm latency [2 threads]");
+ for (i = 0; i < 2; i++) {
+ cyg_thread_suspend(threads[i]);
+ cyg_thread_delete(threads[i]);
+ }
+
+ // Set my priority higher than any I plan to create
+ cyg_thread_set_priority(cyg_thread_self(), 2);
+ for (i = 0; i < ntest_threads; i++) {
+ cyg_thread_create(10, // Priority - just a number
+ alarm_test, // entry
+ i, // index
+ thread_name("thread", i), // Name
+ &stacks[i][0], // Stack
+ STACK_SIZE, // Size
+ &threads[i], // Handle
+ &test_threads[i] // Thread data structure
+ );
+ cyg_thread_resume(threads[i]);
+ }
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ cyg_clock_to_counter(cyg_real_time_clock(), &rtc_handle);
+ cyg_alarm_create(rtc_handle, alarm_cb2, 0, &alarms[0], &test_alarms[0]);
+ init_val = 5; step_val = 5; alarm_cnt = 0;
+ cyg_alarm_initialize(alarms[0], init_val, step_val);
+ cyg_semaphore_init(&synchro, 0);
+ cyg_alarm_enable(alarms[0]);
+ cyg_semaphore_wait(&synchro);
+ cyg_alarm_disable(alarms[0]);
+ cyg_alarm_delete(alarms[0]);
+ show_times(sched_ft, nscheds, "Alarm latency [many threads]");
+ for (i = 0; i < ntest_threads; i++) {
+ cyg_thread_suspend(threads[i]);
+ cyg_thread_delete(threads[i]);
+ }
+
+ // Set my priority higher than any I plan to create
+ cyg_thread_set_priority(cyg_thread_self(), 2);
+ cyg_thread_create(10, // Priority - just a number
+ alarm_test2, // entry
+ i, // index
+ thread_name("thread", 0), // Name
+ &stacks[0][0], // Stack
+ STACK_SIZE, // Size
+ &threads[0], // Handle
+ &test_threads[0] // Thread data structure
+ );
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ cyg_clock_to_counter(cyg_real_time_clock(), &rtc_handle);
+ cyg_alarm_create(rtc_handle, alarm_cb3, threads[0], &alarms[0],
+ &test_alarms[0]);
+ init_val = 5; step_val = 5; alarm_cnt = 0;
+ cyg_alarm_initialize(alarms[0], init_val, step_val);
+ cyg_semaphore_init(&synchro, 0);
+ cyg_alarm_enable(alarms[0]);
+ cyg_semaphore_wait(&synchro);
+ cyg_alarm_disable(alarms[0]);
+ cyg_alarm_delete(alarms[0]);
+ show_times(sched_ft, nscheds, "Alarm -> thread resume latency");
+ cyg_thread_suspend(threads[0]);
+ cyg_thread_delete(threads[0]);
+
+ end_of_test_group();
+}
+
+void
+run_sched_tests(void)
+{
+ int i;
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nscheds; i++) {
+ HAL_CLOCK_READ(&sched_ft[i].start);
+ cyg_scheduler_lock();
+ HAL_CLOCK_READ(&sched_ft[i].end);
+ cyg_scheduler_unlock();
+ }
+ show_times(sched_ft, nscheds, "Scheduler lock");
+
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nscheds; i++) {
+ cyg_scheduler_lock();
+ HAL_CLOCK_READ(&sched_ft[i].start);
+ cyg_scheduler_unlock();
+ HAL_CLOCK_READ(&sched_ft[i].end);
+ }
+ show_times(sched_ft, nscheds, "Scheduler unlock [0 threads]");
+
+ // Set my priority higher than any I plan to create
+ cyg_thread_set_priority(cyg_thread_self(), 2);
+ for (i = 0; i < 1; i++) {
+ cyg_thread_create(10, // Priority - just a number
+ test0, // entry
+ i, // index
+ thread_name("thread", i), // Name
+ &stacks[i][0], // Stack
+ STACK_SIZE, // Size
+ &threads[i], // Handle
+ &test_threads[i] // Thread data structure
+ );
+ }
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nscheds; i++) {
+ cyg_scheduler_lock();
+ HAL_CLOCK_READ(&sched_ft[i].start);
+ cyg_scheduler_unlock();
+ HAL_CLOCK_READ(&sched_ft[i].end);
+ }
+ show_times(sched_ft, nscheds, "Scheduler unlock [1 suspended]");
+ for (i = 0; i < 1; i++) {
+ cyg_thread_delete(threads[i]);
+ }
+
+ // Set my priority higher than any I plan to create
+ cyg_thread_set_priority(cyg_thread_self(), 2);
+ for (i = 0; i < ntest_threads; i++) {
+ cyg_thread_create(10, // Priority - just a number
+ test0, // entry
+ i, // index
+ thread_name("thread", i), // Name
+ &stacks[i][0], // Stack
+ STACK_SIZE, // Size
+ &threads[i], // Handle
+ &test_threads[i] // Thread data structure
+ );
+ }
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nscheds; i++) {
+ cyg_scheduler_lock();
+ HAL_CLOCK_READ(&sched_ft[i].start);
+ cyg_scheduler_unlock();
+ HAL_CLOCK_READ(&sched_ft[i].end);
+ }
+ show_times(sched_ft, nscheds, "Scheduler unlock [many suspended]");
+ for (i = 0; i < ntest_threads; i++) {
+ cyg_thread_delete(threads[i]);
+ }
+
+ // Set my priority higher than any I plan to create
+ cyg_thread_set_priority(cyg_thread_self(), 2);
+ for (i = 0; i < ntest_threads; i++) {
+ cyg_thread_create(10, // Priority - just a number
+ test0, // entry
+ i, // index
+ thread_name("thread", i), // Name
+ &stacks[i][0], // Stack
+ STACK_SIZE, // Size
+ &threads[i], // Handle
+ &test_threads[i] // Thread data structure
+ );
+ cyg_thread_resume(threads[i]);
+ }
+ wait_for_tick(); // Wait until the next clock tick to minimize aberations
+ for (i = 0; i < nscheds; i++) {
+ cyg_scheduler_lock();
+ HAL_CLOCK_READ(&sched_ft[i].start);
+ cyg_scheduler_unlock();
+ HAL_CLOCK_READ(&sched_ft[i].end);
+ }
+ show_times(sched_ft, nscheds, "Scheduler unlock [many low prio]");
+ for (i = 0; i < ntest_threads; i++) {
+ cyg_thread_delete(threads[i]);
+ }
+ end_of_test_group();
+}
+
+static void
+_run_all_tests(CYG_ADDRESS id)
+{
+ int i, j;
+ cyg_uint32 tv[nsamples], tv0, tv1;
+ cyg_uint32 min_stack, max_stack, total_stack, actual_stack;
+ cyg_tick_count_t ticks, tick0, tick1;
+#ifdef CYG_SCHEDULER_LOCK_TIMINGS
+ cyg_uint32 lock_ave, lock_max;
+#endif
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY) && defined(HAL_CLOCK_LATENCY)
+ cyg_int32 clock_ave;
+#endif
+
+ disable_clock_latency_measurement();
+
+#ifndef CYGPKG_KERNEL_SMP_SUPPORT
+ cyg_test_dump_thread_stack_stats( "Startup, main stack", thread[0] );
+ cyg_test_dump_interrupt_stack_stats( "Startup" );
+ cyg_test_dump_idlethread_stack_stats( "Startup" );
+ cyg_test_clear_interrupt_stack();
+#endif
+
+ diag_printf("\neCos Kernel Timings\n");
+ diag_printf("Notes: all times are in microseconds (.000001) unless otherwise stated\n");
+#ifdef STATS_WITHOUT_FIRST_SAMPLE
+ diag_printf(" second line of results have first sample removed\n");
+#endif
+
+ cyg_thread_delay(2); // Make sure the clock is actually running
+
+ ns_per_system_clock = 1000000/rtc_resolution[1];
+
+ wait_for_tick();
+ for (i = 0; i < nsamples; i++) {
+ HAL_CLOCK_READ(&tv[i]);
+ }
+ tv0 = 0;
+ for (i = 1; i < nsamples; i++) {
+ tv0 += tv[i] - tv[i-1];
+ }
+ end_of_test_group();
+
+ overhead = tv0 / (nsamples-1);
+ diag_printf("Reading the hardware clock takes %d 'ticks' overhead\n", overhead);
+ diag_printf("... this value will be factored out of all other measurements\n");
+
+ // Try and measure how long the clock interrupt handling takes
+ for (i = 0; i < nsamples; i++) {
+ tick0 = cyg_current_time();
+ while (true) {
+ tick1 = cyg_current_time();
+ if (tick0 != tick1) break;
+ }
+ HAL_CLOCK_READ(&tv[i]);
+ }
+ tv1 = 0;
+ for (i = 0; i < nsamples; i++) {
+ tv1 += tv[i] * 1000;
+ }
+ tv1 = tv1 / nsamples;
+ tv1 -= overhead; // Adjust out the cost of getting the timer value
+ diag_printf("Clock interrupt took");
+ show_ticks_in_us(tv1);
+ diag_printf(" microseconds (%d raw clock ticks)\n", tv1/1000);
+ enable_clock_latency_measurement();
+
+ ticks = cyg_current_time();
+
+ show_test_parameters();
+ show_times_hdr();
+
+ reset_clock_latency_measurement();
+
+ run_thread_tests();
+ run_sched_tests();
+ run_mutex_tests();
+ run_mbox_tests();
+ run_semaphore_tests();
+ run_counter_tests();
+ run_flag_tests();
+ run_alarm_tests();
+
+#ifdef CYG_SCHEDULER_LOCK_TIMINGS
+ Cyg_Scheduler::get_lock_times(&lock_ave, &lock_max);
+ diag_printf("\nMax lock:");
+ show_ticks_in_us(lock_max);
+ diag_printf(", Ave lock:");
+ show_ticks_in_us(lock_ave);
+ diag_printf("\n");
+#endif
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY) && defined(HAL_CLOCK_LATENCY)
+ // Display latency figures in same format as all other numbers
+ disable_clock_latency_measurement();
+ clock_ave = (total_clock_latency*1000) / total_clock_interrupts;
+ show_ticks_in_us(clock_ave);
+ show_ticks_in_us(min_clock_latency*1000);
+ show_ticks_in_us(max_clock_latency*1000);
+ show_ticks_in_us(0);
+ diag_printf(" Clock/interrupt latency\n\n");
+ enable_clock_latency_measurement();
+#endif
+
+#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY) && defined(HAL_CLOCK_LATENCY)
+ disable_clock_latency_measurement();
+ clock_ave = (total_clock_dsr_latency*1000) / total_clock_dsr_calls;
+ show_ticks_in_us(clock_ave);
+ show_ticks_in_us(min_clock_dsr_latency*1000);
+ show_ticks_in_us(max_clock_dsr_latency*1000);
+ show_ticks_in_us(0);
+ diag_printf(" Clock DSR latency\n\n");
+ enable_clock_latency_measurement();
+#endif
+
+#ifndef CYGPKG_KERNEL_SMP_SUPPORT
+ disable_clock_latency_measurement();
+ min_stack = STACK_SIZE;
+ max_stack = 0;
+ total_stack = 0;
+ for (i = 0; i < (int)NTEST_THREADS; i++) {
+ for (j = 0; j < STACK_SIZE; j++) {
+ if (stacks[i][j]) break;
+ }
+ actual_stack = STACK_SIZE-j;
+ if (actual_stack < min_stack) min_stack = actual_stack;
+ if (actual_stack > max_stack) max_stack = actual_stack;
+ total_stack += actual_stack;
+ }
+ for (j = 0; j < STACKSIZE; j++) {
+ if (((char *)stack[0])[j]) break;
+ }
+ diag_printf("%5ld %5d %5d (main stack: %5d) Thread stack used (%d total)\n",
+ (unsigned long) total_stack/NTEST_THREADS, min_stack, max_stack,
+ STACKSIZE - j, STACK_SIZE);
+
+ cyg_test_dump_thread_stack_stats( "All done, main stack", thread[0] );
+ cyg_test_dump_interrupt_stack_stats( "All done" );
+ cyg_test_dump_idlethread_stack_stats( "All done" );
+#endif
+
+ enable_clock_latency_measurement();
+
+ ticks = cyg_current_time();
+ diag_printf("\nTiming complete - %d ms total\n\n", (int)((ticks*ns_per_system_clock)/1000));
+}
+
+void
+run_all_tests(CYG_ADDRESS id)
+{
+#if CYGNUM_TESTS_RUN_COUNT < 0
+ while (1)
+#else
+ int i;
+ for (i = 0; i < CYGNUM_TESTS_RUN_COUNT; i++)
+#endif
+ _run_all_tests(id);
+ CYG_TEST_PASS_FINISH("Basic timing OK");
+}
+
+void tm_basic_main( void )
+{
+ CYG_TEST_INIT();
+
+ if (cyg_test_is_simulator) {
+ nsamples = NSAMPLES_SIM;
+ ntest_threads = NTEST_THREADS_SIM;
+ nthread_switches = NTHREAD_SWITCHES_SIM;
+ nmutexes = NMUTEXES_SIM;
+ nmboxes = NMBOXES_SIM;
+ nsemaphores = NSEMAPHORES_SIM;
+ nscheds = NSCHEDS_SIM;
+ nflags = NFLAGS_SIM;
+ ncounters = NCOUNTERS_SIM;
+ nalarms = NALARMS_SIM;
+ } else {
+ nsamples = NSAMPLES;
+ ntest_threads = NTEST_THREADS;
+ nthread_switches = NTHREAD_SWITCHES;
+ nmutexes = NMUTEXES;
+ nmboxes = NMBOXES;
+ nsemaphores = NSEMAPHORES;
+ nscheds = NSCHEDS;
+ nflags = NFLAGS;
+ ncounters = NCOUNTERS;
+ nalarms = NALARMS;
+ }
+
+ // Sanity
+#ifdef WORKHORSE_TEST
+ ntest_threads = max(512, ntest_threads);
+ nmutexes = max(1024, nmutexes);
+ nsemaphores = max(1024, nsemaphores);
+ nmboxes = max(1024, nmboxes);
+ ncounters = max(1024, ncounters);
+ nalarms = max(1024, nalarms);
+#else
+ ntest_threads = max(64, ntest_threads);
+ nmutexes = max(32, nmutexes);
+ nsemaphores = max(32, nsemaphores);
+ nmboxes = max(32, nmboxes);
+ ncounters = max(32, ncounters);
+ nflags = max(32, nflags);
+ nalarms = max(32, nalarms);
+#endif
+
+ new_thread(run_all_tests, 0);
+
+ Cyg_Scheduler::scheduler.start();
+
+}
+
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+externC void
+cyg_hal_invoke_constructors();
+#endif
+
+externC void
+cyg_start( void )
+{
+#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ cyg_hal_invoke_constructors();
+#endif
+ tm_basic_main();
+}
+
+#else // CYGFUN_KERNEL_API_C
+
+externC void
+cyg_start( void )
+{
+ CYG_TEST_INIT();
+ CYG_TEST_INFO("Timing tests require:\n"
+ "CYGFUN_KERNEL_API_C && \n"
+ "CYGSEM_KERNEL_SCHED_MLQUEUE &&\n"
+ "CYGVAR_KERNEL_COUNTERS_CLOCK &&\n"
+ "!CYGDBG_INFRA_DIAG_USE_DEVICE &&\n"
+ "(CYGNUM_KERNEL_SCHED_PRIORITIES > 12)\n");
+ CYG_TEST_NA("Timing tests requirements");
+}
+#endif // CYGFUN_KERNEL_API_C, etc.
+
+// EOF tm_basic.cxx
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/README.SPLASH2 b/cesar/ecos/packages/kernel/current/tests_smp/README.SPLASH2
new file mode 100644
index 0000000000..7fee72c9f0
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/README.SPLASH2
@@ -0,0 +1,349 @@
+Date: Oct 19, 1994
+
+This is the directory for the second release of the Stanford Parallel
+Applications for Shared-Memory (SPLASH-2) programs. For further
+information contact splash@mojave.stanford.edu.
+
+PLEASE NOTE: Due to our limited resources, we will be unable to spend
+much time answering questions about the applications.
+
+splash.tar contains the tared version of all the files. Grabbing this
+file will get you everything you need. We also keep the files
+individually untared for partial retrieval. The splash.tar file is not
+compressed, but the large files in it are. We attempted to compress the
+splash.tar file to reduce the file size further, but this resulted in
+a negative compression ratio.
+
+
+DIFFERENCES BETWEEN SPLASH AND SPLASH-2:
+----------------------------------------
+
+The SPLASH-2 suite contains two types of codes: full applications and
+kernels. Each of the codes utilizes the Argonne National Laboratories
+(ANL) parmacs macros for parallel constructs. Unlike the codes in the
+original SPLASH release, each of the codes assumes the use of a
+"lightweight threads" model (which we hereafter refer to as the "threads"
+model) in which child processes share the same virtual address space as
+their parent process. In order for the codes to function correctly,
+the CREATE macro should call the proper Unix system routine (e.g. "sproc"
+in the Silicon Graphics IRIX operating system) instead of the "fork"
+routine that was used for SPLASH. The difference is that processes
+created with the Unix fork command receive their own private copies of
+all global variables. In the threads model, child processes share the
+same virtual address space, and hence all global data. Some of the
+codes function correctly when the Unix "fork" command is used for child
+process creation as well. Comments in the code header denote those
+applications which function correctly with "fork."
+
+
+MACROS:
+-------
+
+Macros for the previous release of the SPLASH application suite can be
+obtained via anonymous ftp to www-flash.stanford.edu. The macros are
+contained in the pub/old_splash/splash/macros subdirectory. HOWEVER,
+THE MACRO FILES MUST BE MODIFIED IN ORDER TO BE USED WITH SPLASH-2 CODES.
+The CREATE macros must be changed so that they call the proper process
+creation routine (See DIFFERENCES section above) instead of "fork."
+
+In this macros subdirectory, macros and sample makefiles are provided
+for three machines:
+
+Encore Multimax (CMU Mach 2.5: C and Fortran)
+SGI 4D/240 (IRIX System V Release 3.3: C only)
+Alliant FX/8 (Alliant Rev. 5.0: C and Fortran)
+
+These macros work for us with the above operating systems. Unfortunately,
+our limited resources prevent us from supporting them in any way or
+even fielding questions about them. If they don't work for you, please
+contact Argonne National Labs for a version that will. An e-mail address
+to try might be monitor-users-request@mcs.anl.gov. An excerpt from
+a message, received from Argonne, concerning obtaining the macros follows:
+
+"The parmacs package is in the public domain. Approximately 15 people at
+Argonne (or associated with Argonne or students) have worked on the
+parmacs package at one time or another. The parmacs package is
+implemented via macros using the M4 macropreprocessor (standard on most
+Unix systems). Current distribution of the software is somewhat ad hoc.
+Most C versions can be obtained from netlib (send electronic mail to
+netlib@ornl.gov with the message send index from parmacs). Fortran
+versions have been emailed directly or sent on tape. The primary
+documentation for the parmacs package is the book ``Portable Programs for
+Parallel Processors'' by Lusk, et al, Holt, Rinehart, and Winston 1987."
+
+The makefiles provided in the individual program directories specify
+a null macro set that will turn the parallel programs into sequential
+ones. Note that we do not have a null macro set for FORTRAN.
+
+
+CODE ENHANCEMENTS:
+------------------
+
+All of the codes are designed for shared address space multiprocessors
+with physically distributed main memory. For these types of machines,
+process migration and poor data distribution can decrease performance
+to suboptimal levels. In the applications, comments indicating potential
+enhancements can be found which will improve performance. Each potential
+enhancement is denoted by a comment beginning with "POSSIBLE ENHANCEMENT".
+The potential enhancements which we identify are:
+
+ (1) Data Distribution
+
+ Comments are placed in the code indicating where directives should
+ be placed so that data can be migrated to the local memories of
+ nodes, thus allowing for remote communication to be minimized.
+
+ (2) Process-to-Processor Assignment
+
+ Comments are placed in the code indicating where directives should
+ be placed so that processes can be "pinned" to processors,
+ preventing them from migrating from processor to processor.
+
+In addition, to facilitate simulation studies, we note points in the
+codes where statistics gathering routines should be turned on so that
+cold-start and initialization effects can be avoided.
+
+As previously mentioned, processes are assumed to be created through calls
+to a "threads" model creation routine. One important side effect is that
+this model causes all global variables to be shared (whereas the fork model
+causes all processes to get their own private copy of global variables).
+In order to mimic the behavior of global variables in the fork model, many
+of the applications provide arrays of structures that can be accessed by
+process ID, such as:
+
+ struct per_process_info {
+ char pad[PAD_LENGTH];
+ unsigned start_time;
+ unsigned end_time;
+ char pad[PAD_LENGTH];
+ } PPI[MAX_PROCS];
+
+In these structures, padding is inserted to ensure that the structure
+information associated with each process can be placed on a different
+page of memory, and can thus be explicitly migrated to that processor's
+local memory system. We follow this strategy for certain variables since
+these data really belong to a process and should be allocated in its local
+memory. A programming model that had the ability to declare global private
+data would have automatically ensured that these data were private, and
+that false sharing did not occur across different structures in the
+array. However, since the threads model does not provide this capability,
+it is provided by explicitly introducing arrays of structures with padding.
+The padding constants used in the programs (PAD_LENGTH in this example)
+can easily be changed to suit the particular characteristics of a given
+system. The actual data that is manipulated by individual applications
+(e.g. grid points, particle data, etc) is not padded, however.
+
+Finally, for some applications we provide less-optimized versions of the
+codes. The less-optimized versions utilize data structures that lead to
+simpler implementations, but which do not allow for optimal data
+distribution (and can thus generate false-sharing).
+
+
+REPORT:
+-------
+
+A report will be put together shortly describing the structure, function,
+and performance characteristics of each application. The report will be
+similar to the original SPLASH report (see the original report for the
+issues discussed). The report will provide quantitative data (for two
+different cache line size) for characteristics such as working set size
+and miss rates (local versus remote, etc.). In addition, the report
+will discuss cache behavior and synchronization behavior of the
+applications as well. In the mean time, each application directory has
+a README file that describes how to run each application. In addition,
+most applications have comments in their headers describing how to run
+each application.
+
+
+README FILES:
+-------------
+
+Each application has an associated README file. It is VERY important to
+read these files carefully, as they discuss the important parameters to
+supply for each application, as well as other issues involved in running
+the programs. In each README file, we discuss the impact of explicitly
+distributing data on the Stanford DASH Multiprocessor. Unless otherwise
+specified, we assume that the default data distribution mechanism is
+through round-robin page allocation.
+
+
+PROBLEM SIZES:
+--------------
+
+For each application, the README file describes a recommended problem
+size that is a reasonable base problem size that both can be simulated
+and is not too small for reality on a machine with up to 64 processors.
+For the purposes of studying algorithm performance, the parameters
+associated with each application can be varied. However, for the
+purposes of comparing machine architectures, the README files describe
+which parameters can be varied, and which should remain constant (or at
+their default values) for comparability. If the specific "base"
+parameters that are specified are not used, then results which are
+reported should explicitly state which parameters were changed, what
+their new values are, and address why they were changed.
+
+
+CORE PROGRAMS:
+--------------
+
+Since the number of programs has increased over SPLASH, and since not
+everyone may be able to use all the programs in a given study, we
+identify some of the programs as "core" programs that should be used
+in most studies for comparability. In the currently available set, these
+core programs include:
+
+(1) Ocean Simulation
+(2) Hierarchical Radiosity
+(3) Water Simulation with Spatial data structure
+(4) Barnes-Hut
+(5) FFT
+(6) Blocked Sparse Cholesky Factorization
+(7) Radix Sort
+
+The less optimized versions of the programs, when provided, should be
+used only in addition to these.
+
+
+MAILING LIST:
+-------------
+
+Please send a note to splash@mojave.stanford.edu if you have copied over
+the programs, so that we can put you on a mailing list for update reports.
+
+
+AUTHORSHIP:
+-----------
+
+The applications provided in the SPLASH-2 suite were developed by a number
+of people. The report lists authors primarily responsible for the
+development of each application code. The codes were made ready for
+distribution and the README files were prepared by Steven Cameron Woo and
+Jaswinder Pal Singh.
+
+
+CODE CHANGES:
+-------------
+
+If modifications are made to the codes which improve their performance,
+we would like to hear about them. Please send email to
+splash@mojave.stanford.edu detailing the changes.
+
+
+UPDATE REPORTS:
+---------------
+
+Watch this file for information regarding changes to codes and additions
+to the application suite.
+
+
+CHANGES:
+-------
+
+10-21-94: Ocean code, contiguous partitions, line 247 of slave1.C changed
+ from
+
+ t2a[0][0] = hh3*t2a[0][0]+hh1*psi[procid][1][0][0];
+
+ to
+
+ t2a[0][0] = hh3*t2a[0][0]+hh1*t2c[0][0];
+
+ This change does not affect correctness; it is an optimization
+ that was performed elsewhere in the code but overlooked here.
+
+11-01-94: Barnes, file code_io.C, line 55 changed from
+
+ in_real(instr, tnow);
+
+ to
+
+ in_real(instr, &tnow);
+
+11-01-94: Raytrace, file main.C, lines 216-223 changed from
+
+ if ((pid == 0) || (dostats))
+ CLOCK(end);
+
+ gm->partime[0] = (end - begin) & 0x7FFFFFFF;
+ if (pid == 0) gm->par_start_time = begin;
+
+/* printf("Process %ld elapsed time %lu.\n", pid, lapsed); */
+
+ }
+
+ to
+
+ if ((pid == 0) || (dostats)) {
+ CLOCK(end);
+ gm->partime[pid] = (end - begin) & 0x7FFFFFFF;
+ if (pid == 0) gm->par_start_time = begin;
+ }
+
+11-13-94: Raytrace, file memory.C
+
+ The use of the word MAIN_INITENV in a comment in memory.c causes
+ m4 to expand this macro, and some implementations may get confused
+ and generate the wrong C code.
+
+11-13-94: Radiosity, file rad_main.C
+
+ rad_main.C uses the macro CREATE_LITE. All three instances of
+ CREATE_LITE should be changed to CREATE.
+
+11-13-94: Water-spatial and Water-nsquared, file makefile
+
+ makefiles were changed so that the compilation phases included the
+ CFLAGS options instead of the CCOPTS options, which did not exist.
+
+11-17-94: FMM, file particle.C
+
+ Comment regarding data distribution of particle_array data
+ structure is incorrect. Round-robin allocation should be used.
+
+11-18-94: OCEAN, contiguous partitions, files main.C and linkup.C
+
+ Eliminated a problem which caused non-doubleword aligned
+ accesses to doublewords for the uniprocessor case.
+
+ main.C: Added lines 467-471:
+
+ if (nprocs%2 == 1) { /* To make sure that the actual data
+ starts double word aligned, add an extra
+ pointer */
+ d_size += sizeof(double ***);
+ }
+
+ Added same lines in file linkup.C at line numbers 100 and 159.
+
+07-30-95: RADIX has been changed. A tree-structured parallel prefix
+ computation is now used instead of a linear one.
+
+ LU had been modified. A comment describing how to distribute
+ data (one of the POSSIBLE ENHANCEMENTS) was incorrect for the
+ contiguous_blocks version of LU. Also, a modification was made
+ that reduces false sharing at line 206 of lu.C:
+
+ last_malloc[i] = (double *) (((unsigned) last_malloc[i]) + PAGE_SIZE -
+ ((unsigned) last_malloc[i]) % PAGE_SIZE);
+
+ A subdirectory shmem_files was added under the codes directory.
+ This directory contains a file that can be compiled on SGI machines
+ which replaces the libsgi.a file distributed in the original SPLASH
+ release.
+
+09-26-95: Fixed a bug in LU. Line 201 was changed from
+
+ last_malloc[i] = (double *) G_MALLOC(proc_bytes[i])
+
+ to
+
+ last_malloc[i] = (double *) G_MALLOC(proc_bytes[i] + PAGE_SIZE)
+
+ Fixed similar bugs in WATER-NSQUARED and WATER-SPATIAL. Both
+ codes needed a barrier added into the mdmain.C files. In both
+ codes, the line
+
+ BARRIER(gl->start, NumProcs);
+
+ was added. In WATER-NSQUARED, it was added in mdmain.C at line
+ 84. In WATER-SPATIAL, it was added in mdmain.C at line 107.
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/README.fft b/cesar/ecos/packages/kernel/current/tests_smp/README.fft
new file mode 100644
index 0000000000..3de85e9239
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/README.fft
@@ -0,0 +1,62 @@
+GENERAL INFORMATION:
+
+The FFT program is a complex, one-dimensional version of the "Six-Step"
+FFT described in
+
+Bailey, D. H. FFTs in External or Hierarchical Memory.
+ Journal of Supercomputing, 4(1):23-35, March 1990.
+
+Specific optimizations in this implementation include: (1) Performing
+staggered, blocked transposes that exploit cache-line reuse; (2) The
+roots of unity data structure is arranged and distributed for only local
+accesses during application of the roots of unity step; (3) A small set of
+roots of unity elements are replicated locally at each processor for
+computation of the 1D FFTs; and (4) The matrix data structures are padded
+to reduce cache mapping conflicts. The algorithm used in this
+implementation is described in:
+
+Woo, S. C., Singh, J. P., and Hennessy, J. L. The Performance Advantages
+ of Integrating Block Data Transfer in Cache-Coherent Multiprocessors.
+ Proceedings of the 6th International Conference on Architectural
+ Support for Programming Languages and Operating Systems (ASPLOS-VI),
+ October 1994.
+
+This program works under both the Unix FORK and SPROC models.
+
+RUNNING THE PROGRAM:
+
+To see how to run the program, please see the comment at the top of the
+file fft.C, or run the application with the "-h" command line option.
+Four command-line parameters MUST be specified: The number of points
+to transform, the number of processors, the log base 2 of the cache
+line size, and the number of cache lines.
+
+The number of complex data points to be transformed and the number of
+processors being used can be varied according to the following rules.
+The number of data points must be an even power of 2 (2**16, 2**18,
+etc). The command-line option "-mM" specifies the even power of two (M),
+so for 65,536 data points, the command line option is "-m16." The number
+of processors must be a power of 2.
+
+The main data structures are padded to reduce cache mapping conflicts.
+The constant PAGE_SIZE should be changed to reflect the page size (in
+bytes) of the target system. In addition, the program uses a blocking
+technique to exploit cache line reuse. Both the log base 2 of the cache
+line size and the number of cache lines in the cache should be specified
+at the command line in order to allow the blocking algorithm to work
+effectively.
+
+BASE PROBLEM SIZE:
+
+The base problem size for an upto-64 processor machine is 65,536 complex
+data points (M=16). The PAGE_SIZE constant should be changed to reflect
+the page size (in bytes) of the target system. In addition, the log base
+2 of the cache line size, the number of cache lines, and the number of
+processors must be specified.
+
+DATA DISTRIBUTION:
+
+Our "POSSIBLE ENHANCEMENT" comments in the source code tell where one
+might want to distribute data and how. Data distribution has an impact
+on performance on the Stanford DASH multiprocessor.
+
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/README.lu b/cesar/ecos/packages/kernel/current/tests_smp/README.lu
new file mode 100644
index 0000000000..cce3108fb6
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/README.lu
@@ -0,0 +1,55 @@
+GENERAL INFORMATION:
+
+The LU program factors a dense matrix into the product of a lower
+triangular and an upper triangular matrix. The factorization uses
+blocking to exploit temporal locality on individual submatrix elements.
+The algorithm used in this implementation is described in
+
+Woo, S. C., Singh, J. P., and Hennessy, J. L. The Performance Advantages
+ of Integrating Block Data Transfer in Cache-Coherent Multiprocessors.
+ Proceedings of the 6th International Conference on Architectural
+ Support for Programming Languages and Operating Systems (ASPLOS-VI),
+ October 1994.
+
+Two implementations are provided in the SPLASH-2 distribution:
+
+ (1) Non-contiguous block allocation
+
+ This implementation (contained in the non_contiguous_blocks
+ subdirectory) implements the matrix to be factored with a
+ two-dimensional array. This data structure prevents blocks from
+ being allocated contiguously, but leads to a conceptually simple
+ programming implementation.
+
+ (2) Contiguous block allocation
+
+ This implementation (contained in the contiguous_blocks
+ subdirectory) implements the matrix to be factored as an array
+ of blocks. This data structure allows blocks to be allocated
+ contiguously and entirely in the local memory of processors that
+ "own" them, thus enhancing data locality properties.
+
+These programs work under both the Unix FORK and SPROC models.
+
+RUNNING THE PROGRAM:
+
+To see how to run the program, please see the comment at the top of the
+file lu.C, or run the application with the "-h" command line option.
+Three parameters may be specified on the command line, of which the
+ones that are normally changed are the matrix size and the number of
+processors. It is suggested that the block size be kept at the value
+B=16, since this value works well in practice. If this parameter is
+changed, the new value should be reported in any results that are
+presented.
+
+BASE PROBLEM SIZE:
+
+The base problem size for an upto-64 processor machine is a 512x512 matrix
+with a block size of B=16.
+
+DATA DISTRIBUTION:
+
+Our "POSSIBLE ENHANCEMENT" comments in the source code tell where one
+might want to distribute data and how. Data distribution has a small
+impact on performance on the Stanford DASH multiprocessor.
+
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/README.radix b/cesar/ecos/packages/kernel/current/tests_smp/README.radix
new file mode 100644
index 0000000000..3cd5b8026f
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/README.radix
@@ -0,0 +1,44 @@
+GENERAL INFORMATION:
+
+The RADIX program implements an integer radix sort based on the method
+described in:
+
+Blelloch, G. E., et. al. A Comparison of Sorting Algorithms for the
+ Connection Machine CM-2. In Symposium on Parallel Algorithms and
+ Architectures, pp. 3-16, July 1991.
+
+A description of this implementation can be found in:
+
+Woo, S. C., Singh, J. P., and Hennessy, J. L. The Performance Advantages
+ of Integrating Message Passing in Cache-Coherent Multiprocessors.
+ Technical Report CSL-TR-93-593, Stanford University, December 1993.
+
+This program works under both the Unix FORK and SPROC models.
+
+RUNNING THE PROGRAM:
+
+To see how to run the program, please see the comment at the top of the
+file radix.C, or run the application with the "-h" command line option.
+Four command line parameters can be specified, of which the ones which
+would normally be changed are the number of keys to sort, the radix
+for sorting, and the number of processors. The radix used for sorting
+must be a power of 2. Optional command line parameters allow timing
+information to be printed out at the end of the program, testing to
+make sure all keys are sorted correctly, and keys to be printed out
+in sorted order.
+
+BASE PROBLEM SIZE:
+
+The base problem size for an upto-64 processor machine is 256k (262,144)
+keys to be sorted and a radix of 1024. The default values should be
+used for other parameters (except the number of processors, which can
+be varied). For larger problems, the number of keys can also be
+increased by factors of 2. Any changes to these parameters should be
+reported when results are presented.
+
+DATA DISTRIBUTION:
+
+Our "POSSIBLE ENHANCEMENT" comments in the source code tell where one
+might want to distribute data and how. Data distribution has an impact
+on performance on the Stanford DASH multiprocessor.
+
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/SPLASH2.POSTING b/cesar/ecos/packages/kernel/current/tests_smp/SPLASH2.POSTING
new file mode 100644
index 0000000000..29dc8aed27
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/SPLASH2.POSTING
@@ -0,0 +1,124 @@
+We are pleased to announce the release of the SPLASH-2 suite of
+multiprocessor applications. SPLASH-2 is the successor to the SPLASH
+suite that we previously released, and the programs in it are also
+written assuming a coherent shared address space communication model.
+SPLASH-2 contains several new applications, as well as improved versions
+of applications from SPLASH. The suite is currently available via
+anonymous ftp to
+
+ www-flash.stanford.edu (in the pub/splash2 subdirectory)
+
+and via the World-Wide-Web at
+
+ http://www-flash.stanford.edu/apps/SPLASH/
+
+Several programs are currently available, and a few others will be added
+shortly. The programs fall into two categories: full applications and
+kernels. Additionally, we designate some of these as "core programs"
+(see below). The applications and kernels currently available in the
+SPLASH-2 suite include:
+
+Applications:
+ Ocean Simulation
+ Ray Tracer
+ Hierarchical Radiosity
+ Volume Renderer
+ Water Simulation with Spatial Data Structure
+ Water Simulation without Spatial Data Structure
+ Barnes-Hut (gravitational N-body simulation)
+ Adaptive Fast Multipole (gravitational N-body simulation)
+
+Kernels:
+ FFT
+ Blocked LU Decomposition
+ Blocked Sparse Cholesky Factorization
+ Radix Sort
+
+Programs that will appear soon include:
+
+ PSIM4 - Particle Dynamics Simulation (full application)
+ Conjugate Gradient (kernel)
+ LocusRoute (standard cell router from SPLASH)
+ Protein Structure Prediction
+ Protein Sequencing
+ Parallel Probabilistic Inference
+
+In some cases, we provide both well-optimized and less-optimized versions
+of the programs. For both the Ocean simulation and the Blocked LU
+Decomposition kernel, less optimized versions of the codes are currently
+available.
+
+There are important differences between applications in the SPLASH-2 suite
+and applications in the SPLASH suite. These differences are noted in the
+README.SPLASH2 file in the pub/splash2 directory. It is *VERY IMPORTANT*
+that you read the README.SPLASH2 file, as well as the individual README
+files in the program directories, before using the SPLASH-2 programs.
+These files describe how to run the programs, provide commented annotations
+about how to distribute data on a machine with physically distributed main
+memory, and provides guidelines on the baseline problem sizes to use when
+studying architectural interactions through simulation.
+
+Complete documentation of SPLASH2, including a detailed characterization
+of performance as well as memory system interactions and synchronization
+behavior, will appear in the SPLASH2 report that is currently being
+written.
+
+
+OPTIMIZATION STRATEGY:
+----------------------
+
+For each application and kernel, we note potential features or
+enhancements that are typically machine-specific. These potential
+enhancements are encapsulated within comments in the code starting with
+the string "POSSIBLE ENHANCEMENT." The potential enhancements which we
+identify are:
+
+ (1) Data Distribution
+
+ We note where data migration routines should be called in order to
+ enhance locality of data access. We do not distribute data by
+ default as different machines implement migration routines in
+ different ways, and on some machines this is not relevant.
+
+ (2) Process-to-Processor Assignment
+
+ We note where calls can be made to "pin" processes to specific
+ processors so that process migration can be avoided. We do not
+ do this by default, since different machines implement this
+ feature in different ways.
+
+In addition, to facilitate simulation studies, we note points in the
+codes where statistics gathering routines should be turned on so that
+cold-start and initialization effects can be avoided.
+
+For two programs (Ocean and LU), we provide less-optimized versions of
+the codes. The less-optimized versions utilize data structures that
+lead to simpler implementations, but which do not allow for optimal data
+distribution (and can generate false-sharing).
+
+
+CORE PROGRAMS:
+--------------
+
+Since the number of programs has increased over SPLASH, and since not
+everyone may be able to use all the programs in a given study, we
+identify some of the programs as "core" programs that should be used
+in most studies for comparability. In the currently available set,
+these core programs include:
+
+(1) Ocean Simulation
+(2) Hierarchical Radiosity
+(3) Water Simulation with Spatial data structure
+(4) Barnes-Hut
+(5) FFT
+(6) Blocked Sparse Cholesky Factorization
+(7) Radix Sort
+
+The less optimized versions of the programs, when available, should be
+used only in addition to these.
+
+The base problem sizes that we recommend are provided in the README files
+for individual applications. Please use at least these for experiments
+with upto 64 processors. If changes are made to these base parameters
+for further experimentation, these changes should be explicitly stated
+in any results that are presented.
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/c.m4.ecos b/cesar/ecos/packages/kernel/current/tests_smp/c.m4.ecos
new file mode 100644
index 0000000000..6b94263c89
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/c.m4.ecos
@@ -0,0 +1,290 @@
+divert(-1)
+define(NEWPROC,) dnl
+define(ENDLAB, 5283) dnl
+
+define(BARRIER, `{
+/*---------------------------------*/
+ LOCK( ( $1[0].lock ) );
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),$3,$1[0].count[0],$1[0].queue[0].count);
+ }
+ if ( $1[0].count[0] < ($2 -1) ) {
+ $1[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),$3,$1[0].count[0],$1[0].queue[0].count);
+ }
+ UNLOCK( $1[0].lock );
+ SEMWAIT( $1[0].queue[0] );
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),$3,$1[0].count[0],$1[0].queue[0].count);
+ }
+ if ( $1[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),$3,$1[0].count[0],$1[0].queue[0].count);
+ }
+
+ UNLOCK( $1[0].lock );
+
+ } else {
+ ( $1[0].count[0] )-- ;
+ //UNLOCK( $1[0].count_lock[0] );
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),$3,$1[0].count[0],$1[0].queue[0].count);
+ }
+ SEMPOST( $1[0].queue[0] );
+ }
+
+/*---------------------------------*/
+}')
+
+
+define(BARDEC, `DECVAR($1,1,1,)')
+define(BARINIT, `{MONINIT($1,1,1)}')
+
+define(GSDEC, `/*##########*/
+int ($1);')
+define(GSINIT, `/*##########*/
+{ ($1) = 0; }')
+define(GETSUB, `/*##########*/
+{
+ if (($1)<=($3))
+ ($2) = ($1)++;
+ else {
+ ($2) = -1;
+ ($1) = 0;
+ }
+}')
+
+define(NU_GSDEC, `int ($1);')
+define(NU_GSINIT, `{ ($1) = 0; }')
+define(NU_GETSUB, `GETSUB($1,$2,$3,$4)')
+
+define(ADEC, `int ($1);')
+define(AINIT, `{/*##########*/;}')
+define(PROBEND, `{/*##########*/;}')
+
+define(LOCKDEC, `cyg_spinlock_t $1;')
+define(LOCKINIT, `cyg_spinlock_init( &$1,0 );')
+define(LOCK, `cyg_spinlock_spin(&$1);')
+define(UNLOCK, `cyg_spinlock_clear(&$1);')
+
+define(SEMINIT, `{ cyg_semaphore_init(&$1,$2);}')
+define(SEMWAIT, `{ cyg_semaphore_wait(&$1);}')
+define(SEMPOST, `{ cyg_semaphore_post(&$1);}')
+define(SEMDEC, ` cyg_sem_t $1;')
+
+define(NLOCKDEC, `int ($1);')
+define(NLOCKINIT, `{/*##########*/;}')
+define(NLOCK, `{/*##########*/;}')
+define(NUNLOCK, `{/*##########*/;}')
+
+define(ALOCKDEC, `DECVAR($1,0,$2)')
+define(ALOCKINIT, `{ MONINIT($1,0,$2);}')
+define(ALOCK, `{ MENTER($1,$2);}')
+define(AULOCK, `{ MEXIT($1,$2);}')
+
+
+define(PAUSEDEC, ` ')
+define(PAUSEINIT, `{/*##########*/;}')
+define(CLEARPAUSE, `{/*##########*/;}')
+define(SETPAUSE, `{/*##########*/;}')
+define(EVENT, `{/*##########*/;}')
+define(WAITPAUSE, `{/*##########*/;}')
+define(PAUSE, `{/*##########*/;}')
+
+define(AUG_ON, ` ')
+define(AUG_OFF, ` ')
+define(TRACE_ON, ` ')
+define(TRACE_OFF, ` ')
+define(REF_TRACE_ON, ` ')
+define(REF_TRACE_OFF, ` ')
+define(DYN_TRACE_ON, `;')
+define(DYN_TRACE_OFF, `;')
+define(DYN_REF_TRACE_ON, `;')
+define(DYN_REF_TRACE_OFF, `;')
+define(DYN_SIM_ON, `;')
+define(DYN_SIM_OFF, `;')
+define(DYN_SCHED_ON, `;')
+define(DYN_SCHED_OFF, `;')
+define(AUG_SET_LOLIMIT, `;')
+define(AUG_SET_HILIMIT, `;')
+
+define(MENTER, `LOCK($1[$2].lock);')
+define(DELAY, `{$1[$3].count[$2]++;
+ UNLOCK($1[$3].lock)
+ SEMWAIT($1[$3].queue[$2]);}')
+define(CONTINUE, `{
+ if ($1[$3].count[$2]) {
+ ($1[$3].count[$2])--;
+ SEMPOST($1[$3].queue[$2])
+ } else
+ UNLOCK($1[$3].lock)
+ goto `L'ENDLAB;
+`LGO'ENDLAB: ;
+}')
+define(MEXIT, `{
+ UNLOCK($1[$2].lock); `L'ENDLAB: ;
+ define(`ENDLAB', eval(ENDLAB+1))
+}')
+
+define(WAIT_FOR_END, `{
+;}')
+
+/* create(<procedure>)*/
+define(CREATE,`
+{
+ /*---------------------------------------*/
+ stack[i] = calloc(STACK_SIZE, 1);
+ cyg_thread_create(10, // Priority - just a number
+ $1, // entry
+ 0, // index
+ "slave", // Name
+ stack[i], // Stack
+ STACK_SIZE, // Size
+ &threadh[i], // Handle
+ &thread[i] // Thread data structure
+ );
+ cyg_thread_resume( threadh[i] );
+ /*---------------------------------------*/
+}
+')
+
+define(MAIN_INITENV, `{;}')
+define(MAIN_END, `
+{
+ diag_printf("FP test end\n");
+ return 0;
+}
+')
+define(MAIN_ENV,`
+/*---------------------------------------*/
+#include <pkgconf/system.h>
+#include <pkgconf/infra.h>
+#include <pkgconf/kernel.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/testcase.h>
+#include <pkgconf/isoinfra.h>
+#include <cyg/hal/hal_cache.h>
+#include <cyg/hal/hal_smp.h>
+#include <cyg/kernel/kapi.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+int smp_cyg_test_main(int argc, char **argv);
+
+void smp_cyg_test_main_call(void *p) {
+ smp_cyg_test_main(smp_cyg_test_argc, smp_cyg_test_argv);
+}
+
+
+/* #define STACK_SIZE 0x1b000 */
+#define STACK_SIZE 8192
+static cyg_thread smp_cyg_test_thread;
+static char smp_cyg_test_stack[STACK_SIZE];
+static cyg_handle_t smp_cyg_test_threadh;
+
+
+
+cyg_handle_t threadh[64];
+char *stack[64];
+cyg_thread thread[64];
+
+
+externC void cyg_user_start( void )
+{
+ CYG_TEST_INIT();
+
+ diag_printf("Starting test app\n");
+
+ cyg_thread_create(10, // Priority - just a number
+ smp_cyg_test_main_call, // entry
+ 0, // index
+ "smp test", // Name
+ smp_cyg_test_stack, // Stack
+ STACK_SIZE, // Size
+ &smp_cyg_test_threadh, // Handle
+ &smp_cyg_test_thread // Thread data structure
+ );
+ cyg_thread_resume( smp_cyg_test_threadh );
+ /*cyg_scheduler_start();*/
+}
+
+
+/*---------------------------------------*/
+')
+
+define(ENV, ` ')
+define(EXTERN_ENV, `
+
+#include <pkgconf/system.h>
+#include <pkgconf/infra.h>
+#include <pkgconf/kernel.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/testcase.h>
+#include <pkgconf/isoinfra.h>
+#include <cyg/hal/hal_cache.h>
+#include <cyg/kernel/kapi.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+ ')
+
+define(G_MALLOC, `calloc($1, 1);')
+define(G_FREE, `;')
+define(G_MALLOC_F, `malloc($1);')
+define(NU_MALLOC, `malloc($1);')
+define(NU_FREE, `;')
+define(NU_MALLOC_F, `malloc($1)')
+
+define(GET_HOME, `{($1) = 0;}')
+define(GET_PID, `{($1) = 0;}')
+define(AUG_DELAY, `{sleep ($1);}')
+define(ST_LOG, `{;}')
+define(SET_HOME, `{;}')
+
+/* clock(<clock_val>)*/
+define(CLOCK, `{
+ ($1) = cyg_current_time()*10;
+}
+')
+divert(0)
+
+
+
+define(DECVAR,`
+/*---------------------------------------*/
+struct $1TYP {
+ LOCKDEC(lock);
+ ifelse(eval($2 > 0),1,int count[$2];,)
+ ifelse(eval($2 > 0),1, SEMDEC(queue[$2]);,)
+ $4
+ } $1[$3];
+/*---------------------------------------*/
+ '
+)
+
+define(MONINIT, `{
+/*---------------------------------------*/
+ int mon_dum1,mon_dum2;
+ ifelse(eval($2 > 0),1,
+ for (mon_dum1=0; mon_dum1 < $3; mon_dum1++)
+ for (mon_dum2=0; mon_dum2 < $2; mon_dum2++) {
+ $1[mon_dum1].count[mon_dum2] = 0;
+ SEMINIT($1[mon_dum1].queue[mon_dum2],0);
+ },,)
+ for (mon_dum1=0; mon_dum1 < $3; mon_dum1++) {
+ LOCKINIT($1[mon_dum1].lock);
+ }
+/*---------------------------------------*/
+}')
+
+
+
+
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/fft.C b/cesar/ecos/packages/kernel/current/tests_smp/fft.C
new file mode 100644
index 0000000000..e2b0f979af
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/fft.C
@@ -0,0 +1,1057 @@
+/*************************************************************************/
+/* */
+/* Copyright (c) 1994 Stanford University */
+/* */
+/* All rights reserved. */
+/* */
+/* Permission is given to use, copy, and modify this software for any */
+/* non-commercial purpose as long as this copyright notice is not */
+/* removed. All other uses, including redistribution in whole or in */
+/* part, are forbidden without prior written permission. */
+/* */
+/* This software is provided with absolutely no warranty and no */
+/* support. */
+/* */
+/*************************************************************************/
+
+/*************************************************************************/
+/* */
+/* Perform 1D fast Fourier transform using six-step FFT method */
+/* */
+/* 1) Performs staggered, blocked transposes for cache-line reuse */
+/* 2) Roots of unity rearranged and distributed for only local */
+/* accesses during application of roots of unity */
+/* 3) Small set of roots of unity elements replicated locally for */
+/* 1D FFTs (less than root N elements replicated at each node) */
+/* 4) Matrix data structures are padded to reduce cache mapping */
+/* conflicts */
+/* */
+/* Command line options: */
+/* */
+/* -mM : M = even integer; 2**M total complex data points transformed. */
+/* -pP : P = number of processors; Must be a power of 2. */
+/* -nN : N = number of cache lines. */
+/* -lL : L = Log base 2 of cache line length in bytes. */
+/* -s : Print individual processor timing statistics. */
+/* -t : Perform FFT and inverse FFT. Test output by comparing the */
+/* integral of the original data to the integral of the data */
+/* that results from performing the FFT and inverse FFT. */
+/* -o : Print out complex data points. */
+/* -h : Print out command line options. */
+/* */
+/* Note: This version works under both the FORK and SPROC models */
+/* */
+/*************************************************************************/
+
+#include <stdio.h>
+#include <math.h>
+#include <tests_smp/getopt.h>
+
+#define MAXRAND 2147483647
+#define PAGE_SIZE 4096
+#define NUM_CACHE_LINES 65536
+#define LOG2_LINE_SIZE 4
+#define PI 3.1416
+#define DEFAULT_M 10
+#define DEFAULT_P 1
+
+#include <tests_smp/fft_arg.c>
+
+MAIN_ENV
+
+#define SWAP(a,b) {double tmp; tmp=a; a=b; b=tmp;}
+
+struct GlobalMemory {
+ int id;
+ LOCKDEC(idlock)
+ BARDEC(start)
+ int *transtimes;
+ int *totaltimes;
+ int starttime;
+ int finishtime;
+ int initdonetime;
+} *Global;
+
+int dbg_on = 0;
+
+int P = DEFAULT_P;
+int M = DEFAULT_M;
+int N; /* N = 2^M */
+int rootN; /* rootN = N^1/2 */
+double *x; /* x is the original time-domain data */
+double *trans; /* trans is used as scratch space */
+double *umain; /* umain is roots of unity for 1D FFTs */
+double *umain2; /* umain2 is entire roots of unity matrix */
+int test_result = 0;
+int doprint = 0;
+int dostats = 0;
+int transtime = 0;
+int transtime2 = 0;
+int avgtranstime = 0;
+int avgcomptime = 0;
+unsigned int transstart = 0;
+unsigned int transend = 0;
+int maxtotal=0;
+int mintotal=0;
+double maxfrac=0;
+double minfrac=0;
+double avgfractime=0;
+int orig_num_lines = NUM_CACHE_LINES; /* number of cache lines */
+int num_cache_lines = NUM_CACHE_LINES; /* number of cache lines */
+int log2_line_size = LOG2_LINE_SIZE;
+int line_size;
+int rowsperproc;
+double ck1;
+double ck3; /* checksums for testing answer */
+int pad_length;
+
+void SlaveStart();
+double TouchArray(double *,double *,double *,double *,int,int,int,int);
+void FFT1D(int,int,int,double *,double *,double *,double *,int,int *,int,
+ int,int,int,int,int,int,struct GlobalMemory *);
+double CheckSum();
+double drand48();
+int log_2(int);
+void printerr(char *);
+volatile int thread_array[4] = {0, 0, 0, 0};
+
+int smp_cyg_test_main(int argc, char **argv)
+{
+ int i;
+ int j;
+ int c;
+ extern char *optarg;
+ int m1;
+ int factor;
+ int pages;
+ unsigned int start;
+ //memset (thread_array,0,sizeof(thread_array));
+
+ CLOCK(start);
+
+
+// extern Cyg_Mempool_dlmalloc *cygmem_memalloc_heaps[ 2 ];
+// cygmem_memalloc_heaps[0].
+
+
+ // printf("<cpu%d> thread %d Arguments (%d): ",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),argc);
+// for (i = 0;i < argc;i++){
+// printf("%s ",argv[i]);
+// }
+// printf("\n");
+
+ while ((c = getopt(argc, argv, "p:m:n:l:stoh")) != -1) {
+ switch(c) {
+ case 'p': P = atoi(optarg);
+ P = HAL_SMP_CPU_MAX;
+ if (P < 1) {
+ printerr("P must be >= 1\n");
+ exit(-1);
+ }
+ if (log_2(P) == -1) {
+ printerr("P must be a power of 2\n");
+ exit(-1);
+ }
+ break;
+ case 'm': M = atoi(optarg);
+ m1 = M/2;
+ if (2*m1 != M) {
+ printerr("M must be even\n");
+ exit(-1);
+ }
+ break;
+ case 'n': num_cache_lines = atoi(optarg);
+ orig_num_lines = num_cache_lines;
+ if (num_cache_lines < 1) {
+ printerr("Number of cache lines must be >= 1\n");
+ exit(-1);
+ }
+ break;
+ case 'l': log2_line_size = atoi(optarg);
+ if (log2_line_size < 0) {
+ printerr("Log base 2 of cache line length in bytes must be >= 0\n");
+ exit(-1);
+ }
+ break;
+ case 's': dostats = !dostats;
+ break;
+ case 't': test_result = !test_result;
+ break;
+ case 'o': doprint = !doprint;
+ break;
+ case 'h': printf("Usage: FFT <options>\n\n");
+ printf("options:\n");
+ printf(" -mM : M = even integer; 2**M total complex data points transformed.\n");
+ printf(" -pP : P = number of processors; Must be a power of 2.\n");
+ printf(" -nN : N = number of cache lines.\n");
+ printf(" -lL : L = Log base 2 of cache line length in bytes.\n");
+ printf(" -s : Print individual processor timing statistics.\n");
+ printf(" -t : Perform FFT and inverse FFT. Test output by comparing the\n");
+ printf(" integral of the original data to the integral of the data that\n");
+ printf(" results from performing the FFT and inverse FFT.\n");
+ printf(" -o : Print out complex data points.\n");
+ printf(" -h : Print out command line options.\n\n");
+ printf("Default: FFT -m%1d -p%1d -n%1d -l%1d\n",
+ DEFAULT_M,DEFAULT_P,NUM_CACHE_LINES,LOG2_LINE_SIZE);
+ exit(0);
+ break;
+ }
+ }
+
+ if (P > 64) {
+ printf("Maximal 64 processes\n");
+ exit(0);
+ }
+
+ MAIN_INITENV(,80000000);
+
+ N = 1<<M;
+ rootN = 1<<(M/2);
+ rowsperproc = rootN/P;
+ if (rowsperproc == 0) {
+ printerr("Matrix not large enough. 2**(M/2) must be >= P\n");
+ exit(-1);
+ }
+
+ line_size = 1 << log2_line_size;
+ if (line_size < 2*sizeof(double)) {
+ printf("WARNING: Each element is a complex double (%d bytes)\n",2*sizeof(double));
+ printf(" => Less than one element per cache line\n");
+ printf(" Computing transpose blocking factor\n");
+ factor = (2*sizeof(double)) / line_size;
+ num_cache_lines = orig_num_lines / factor;
+ }
+ if (line_size <= 2*sizeof(double)) {
+ pad_length = 1;
+ } else {
+ pad_length = line_size / (2*sizeof(double));
+ }
+
+ if (rowsperproc * rootN * 2 * sizeof(double) >= PAGE_SIZE) {
+ pages = (2 * pad_length * sizeof(double) * rowsperproc) / PAGE_SIZE;
+ if (pages * PAGE_SIZE != 2 * pad_length * sizeof(double) * rowsperproc) {
+ pages ++;
+ }
+ pad_length = (pages * PAGE_SIZE) / (2 * sizeof(double) * rowsperproc);
+ } else {
+ pad_length = (PAGE_SIZE - (rowsperproc * rootN * 2 * sizeof(double))) /
+
+ (2 * sizeof(double) * rowsperproc);
+ if (pad_length * (2 * sizeof(double) * rowsperproc) !=
+ (PAGE_SIZE - (rowsperproc * rootN * 2 * sizeof(double)))) {
+ printerr("Padding algorithm unsuccessful\n");
+ exit(-1);
+ }
+ }
+
+ Global = (struct GlobalMemory *) G_MALLOC(sizeof(struct GlobalMemory));
+ if (Global == NULL) {
+ printf("Could not malloc memory for Global (%d)\n",sizeof(struct GlobalMemory));
+ exit(-1);
+ }
+
+
+ x = (double *) G_MALLOC(2*(N+rootN*pad_length)*sizeof(double)+PAGE_SIZE);
+ trans = (double *) G_MALLOC(2*(N+rootN*pad_length)*sizeof(double)+PAGE_SIZE);
+ umain = (double *) G_MALLOC(2*rootN*sizeof(double));
+ umain2 = (double *) G_MALLOC(2*(N+rootN*pad_length)*sizeof(double)+PAGE_SIZE);
+
+
+ Global->transtimes = (int *) G_MALLOC(P*sizeof(int));
+ Global->totaltimes = (int *) G_MALLOC(P*sizeof(int));
+ if (x == NULL) {
+ printerr("Could not malloc memory for x\n");
+ exit(-1);
+ } else if (trans == NULL) {
+ printerr("Could not malloc memory for trans\n");
+ exit(-1);
+ } else if (umain == NULL) {
+ printerr("Could not malloc memory for umain\n");
+ exit(-1);
+ } else if (umain2 == NULL) {
+ printerr("Could not malloc memory for umain2\n");
+ exit(-1);
+ }
+
+ x = (double *) (((unsigned) x) + PAGE_SIZE - ((unsigned) x) % PAGE_SIZE);
+ trans = (double *) (((unsigned) trans) + PAGE_SIZE - ((unsigned) trans) % PAGE_SIZE);
+ umain2 = (double *) (((unsigned) umain2) + PAGE_SIZE - ((unsigned) umain2) % PAGE_SIZE);
+
+/* In order to optimize data distribution, the data structures x, trans,
+ and umain2 have been aligned so that each begins on a page boundary.
+ This ensures that the amount of padding calculated by the program is
+ such that each processor's partition ends on a page boundary, thus
+ ensuring that all data from these structures that are needed by a
+ processor can be allocated to its local memory */
+
+/* POSSIBLE ENHANCEMENT: Here is where one might distribute the x,
+ trans, and umain2 data structures across physically distributed
+ memories as desired.
+
+ One way to place data is as follows:
+
+ double *base;
+ int i;
+
+ i = ((N/P)+(rootN/P)*pad_length)*2;
+ base = &(x[0]);
+ for (j=0;j<P;j++) {
+ Place all addresses x such that (base <= x < base+i) on node j
+ base += i;
+ }
+
+ The trans and umain2 data structures can be placed in a similar manner.
+
+ */
+
+ printf("\n");
+ printf("FFT with Blocking Transpose\n");
+ printf(" %d Complex Doubles\n",N);
+ printf(" %d Threads\n",P);
+ if (num_cache_lines != orig_num_lines) {
+ printf(" %d Cache lines\n",orig_num_lines);
+ printf(" %d Cache lines for blocking transpose\n",num_cache_lines);
+ } else {
+ printf(" %d Cache lines\n",num_cache_lines);
+ }
+ printf(" %d Byte line size\n",(1 << log2_line_size));
+ printf(" %d Bytes per page\n",PAGE_SIZE);
+ printf("\n");
+
+ BARINIT(Global->start);
+ LOCKINIT(Global->idlock);
+ Global->id = 0;
+ InitX(N, x); /* place random values in x */
+
+ if (test_result) {
+ ck1 = CheckSum(N, x);
+ }
+ if (doprint) {
+ printf("Original data values:\n");
+ PrintArray(N, x);
+ }
+
+ InitU(N,umain); /* initialize u arrays*/
+ InitU2(N,umain2,rootN);
+
+ /* fire off P processes */
+ for (i=1; i<P; i++) {
+ CREATE(SlaveStart,thread_array[i]);
+ }
+
+ SlaveStart();
+
+ for (i=1; i<P; i++) {
+ while(!thread_array[i]) {};
+ }
+
+ if (doprint) {
+ if (test_result) {
+ printf("Data values after inverse FFT:\n");
+ } else {
+ printf("Data values after FFT:\n");
+ }
+ PrintArray(N, x);
+ }
+
+ transtime = Global->transtimes[0];
+ printf("\n");
+ printf(" PROCESS STATISTICS\n");
+ printf(" Computation Transpose Transpose\n");
+ printf(" Proc Time Time Fraction\n");
+ printf(" 0 %10d %10d %8.5f\n",
+ Global->totaltimes[0],Global->transtimes[0],
+ ((double)Global->transtimes[0])/Global->totaltimes[0]);
+ if (dostats) {
+ transtime2 = Global->transtimes[0];
+ avgtranstime = Global->transtimes[0];
+ avgcomptime = Global->totaltimes[0];
+ maxtotal = Global->totaltimes[0];
+ mintotal = Global->totaltimes[0];
+ maxfrac = ((double)Global->transtimes[0])/Global->totaltimes[0];
+ minfrac = ((double)Global->transtimes[0])/Global->totaltimes[0];
+ avgfractime = ((double)Global->transtimes[0])/Global->totaltimes[0];
+ for (i=1;i<P;i++) {
+ if (Global->transtimes[i] > transtime) {
+ transtime = Global->transtimes[i];
+ }
+ if (Global->transtimes[i] < transtime2) {
+ transtime2 = Global->transtimes[i];
+ }
+ if (Global->totaltimes[i] > maxtotal) {
+ maxtotal = Global->totaltimes[i];
+ }
+ if (Global->totaltimes[i] < mintotal) {
+ mintotal = Global->totaltimes[i];
+ }
+ if (((double)Global->transtimes[i])/Global->totaltimes[i] > maxfrac) {
+ maxfrac = ((double)Global->transtimes[i])/Global->totaltimes[i];
+ }
+ if (((double)Global->transtimes[i])/Global->totaltimes[i] < minfrac) {
+ minfrac = ((double)Global->transtimes[i])/Global->totaltimes[i];
+ }
+ printf(" %3d %10d %10d %f\n",
+ i,Global->totaltimes[i],Global->transtimes[i],
+ ((double)Global->transtimes[i])/Global->totaltimes[i]);
+ avgtranstime += Global->transtimes[i];
+ avgcomptime += Global->totaltimes[i];
+ avgfractime += ((double)Global->transtimes[i])/Global->totaltimes[i];
+ }
+ printf(" Avg %10f %10f %f\n",
+ ((double) avgcomptime)/P,((double) avgtranstime)/P,avgfractime/P);
+ printf(" Max %10d %10d %f\n",
+ maxtotal,transtime,maxfrac);
+ printf(" Min %10d %10d %f\n",
+ mintotal,transtime2,minfrac);
+ }
+ Global->starttime = start;
+ printf("\n");
+ printf(" TIMING INFORMATION\n");
+ printf("Start time : %16d\n",
+ Global->starttime);
+ printf("Initialization finish time : %16d\n",
+ Global->initdonetime);
+ printf("Overall finish time : %16d\n",
+ Global->finishtime);
+ printf("Total time with initialization : %16d\n",
+ Global->finishtime-Global->starttime);
+ printf("Total time without initialization : %16d\n",
+ Global->finishtime-Global->initdonetime);
+ printf("Overall transpose time : %16d\n",
+ transtime);
+ printf("Overall transpose fraction : %f\n",
+ ((double) transtime)/(Global->finishtime-Global->initdonetime));
+ printf("\n");
+
+ if (test_result) {
+ ck3 = CheckSum(N, x);
+ printf(" INVERSE FFT TEST RESULTS\n");
+ printf("Checksum difference is %f (%f, %f)\n",
+ ck1-ck3, ck1, ck3);
+ if (fabs(ck1-ck3) < 0.001) {
+ printf("TEST PASSED\n");
+ } else {
+ printf("TEST FAILED\n");
+ }
+ }
+
+ MAIN_END;
+}
+
+
+void SlaveStart()
+{
+ int i;
+ int j;
+ int MyNum;
+ double error;
+ double *upriv;
+ int initdone;
+ int finish;
+ int l_transtime=0;
+ int MyFirst;
+ int MyLast;
+
+ LOCK(Global->idlock);
+ MyNum = Global->id;
+ Global->id++;
+#ifdef FFT_DBG
+ printf("Slave %d started\n",MyNum);
+#endif
+ UNLOCK(Global->idlock);
+
+
+/* POSSIBLE ENHANCEMENT: Here is where one might pin processes to
+ processors to avoid migration */
+
+ BARRIER(Global->start, P, 1);
+#ifdef FFT_DBG
+ LOCK(Global->idlock); printf("Slave %d left barrier 1\n",MyNum); UNLOCK(Global->idlock);
+#endif
+
+ upriv = (double *) malloc(2*(rootN-1)*sizeof(double));
+ if (upriv == NULL) {
+ printf("Proc %d could not malloc memory for upriv\n",MyNum);
+ exit(-1);
+ }
+ for (i=0;i<2*(rootN-1);i++) {
+ upriv[i] = umain[i];
+ }
+
+ MyFirst = rootN*MyNum/P;
+ MyLast = rootN*(MyNum+1)/P;
+
+ TouchArray(x, trans, umain2, upriv, N, MyNum, MyFirst, MyLast);
+
+ BARRIER(Global->start, P, 2);
+#ifdef FFT_DBG
+ LOCK(Global->idlock); printf("Slave %d left barrier 2\n",MyNum); UNLOCK(Global->idlock);
+#endif
+
+/* POSSIBLE ENHANCEMENT: Here is where one might reset the
+ statistics that one is measuring about the parallel execution */
+
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(initdone);
+ }
+
+ /* perform forward FFT */
+ FFT1D(1, M, N, x, trans, upriv, umain2, MyNum, &l_transtime, MyFirst,
+ MyLast, pad_length, P, test_result, doprint, dostats, Global);
+
+ /* perform backward FFT */
+ if (test_result) {
+ FFT1D(-1, M, N, x, trans, upriv, umain2, MyNum, &l_transtime, MyFirst,
+ MyLast, pad_length, P, test_result, doprint, dostats, Global);
+ }
+
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(finish);
+ Global->transtimes[MyNum] = l_transtime;
+ Global->totaltimes[MyNum] = finish-initdone;
+ }
+ if (MyNum == 0) {
+ Global->finishtime = finish;
+ Global->initdonetime = initdone;
+ }
+
+ thread_array[MyNum] = 1;
+}
+
+
+double TouchArray(x, scratch, u, upriv, N, MyNum, MyFirst, MyLast)
+
+double *x;
+double *scratch;
+double *u;
+double *upriv;
+int N;
+int MyNum;
+int MyFirst;
+int MyLast;
+
+{
+ int i,j,k;
+ double tot = 0.0;
+
+ /* touch my data */
+ for (j=0;j<2*(rootN-1);j++) {
+ tot += upriv[j];
+ }
+ for (j=MyFirst; j<MyLast; j++) {
+ k = j * (rootN + pad_length);
+ for (i=0;i<rootN;i++) {
+ tot += x[2*(k+i)] + x[2*(k+i)+1] +
+ scratch[2*(k+i)] + scratch[2*(k+i)+1] +
+ u[2*(k+i)] + u[2*(k+i)+1];
+ }
+ }
+ return tot;
+}
+
+
+double CheckSum(N, x)
+
+int N;
+double *x;
+
+{
+ int i,j,k;
+ double cks;
+
+ cks = 0.0;
+ for (j=0; j<rootN; j++) {
+ k = j * (rootN + pad_length);
+ for (i=0;i<rootN;i++) {
+ cks += x[2*(k+i)] + x[2*(k+i)+1];
+ }
+ }
+
+ return(cks);
+}
+
+
+InitX(N, x)
+
+int N;
+double *x;
+
+{
+ int i,j,k;
+
+ srand(0);
+ for (j=0; j<rootN; j++) {
+ k = j * (rootN + pad_length);
+ for (i=0;i<rootN;i++) {
+ x[2*(k+i)] = rand()/MAXRAND;
+ x[2*(k+i)+1] = rand()/MAXRAND;
+ }
+ }
+}
+
+
+InitU(N, u)
+
+int N;
+double *u;
+
+{
+ int q;
+ int j;
+ int base;
+ int n1;
+
+ for (q=0; 1<<q<N; q++) {
+ n1 = 1<<q;
+ base = n1-1;
+ for (j=0; j<n1; j++) {
+ if (base+j > rootN-1) {
+ return;
+ }
+ u[2*(base+j)] = cos(2.0*PI*j/(2*n1));
+ u[2*(base+j)+1] = -sin(2.0*PI*j/(2*n1));
+ }
+ }
+}
+
+
+InitU2(N, u, n1)
+
+int N;
+double *u;
+int n1;
+
+{
+ int i,j,k;
+ int base;
+
+ for (j=0; j<n1; j++) {
+ k = j*(rootN+pad_length);
+ for (i=0; i<n1; i++) {
+ u[2*(k+i)] = cos(2.0*PI*i*j/(N));
+ u[2*(k+i)+1] = -sin(2.0*PI*i*j/(N));
+ }
+ }
+}
+
+
+BitReverse(M, k)
+
+int M;
+int k;
+
+{
+ int i;
+ int j;
+ int tmp;
+
+ j = 0;
+ tmp = k;
+ for (i=0; i<M; i++) {
+ j = 2*j + (tmp&0x1);
+ tmp = tmp>>1;
+ }
+ return(j);
+}
+
+
+void FFT1D(direction, M, N, x, scratch, upriv, umain2, MyNum, l_transtime,
+ MyFirst, MyLast, pad_length, P, test_result, doprint, dostats,
+ Global)
+
+int direction;
+int M;
+int N;
+int *l_transtime;
+double *x;
+double *upriv;
+double *scratch;
+double *umain2;
+int MyFirst;
+int MyLast;
+int pad_length;
+int P;
+int test_result;
+int doprint;
+int dostats;
+struct GlobalMemory *Global;
+
+{
+ int i;
+ int j;
+ int m1;
+ int n1;
+ int flag = 0;
+ unsigned int clocktime1;
+ unsigned int clocktime2;
+
+ m1 = M/2;
+ n1 = 1<<m1;
+
+ BARRIER(Global->start, P, 3);
+#ifdef FFT_DBG
+ LOCK(Global->idlock); printf("Slave %d left barrier 3\n",MyNum); UNLOCK(Global->idlock);
+#endif
+
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(clocktime1);
+ }
+
+ /* transpose from x into scratch */
+ Transpose(n1, x, scratch, MyNum, MyFirst, MyLast, pad_length);
+
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(clocktime2);
+ *l_transtime += (clocktime2-clocktime1);
+ }
+
+ /* do n1 1D FFTs on columns */
+ for (j=MyFirst; j<MyLast; j++) {
+ FFT1DOnce(direction, m1, n1, upriv, &scratch[2*j*(n1+pad_length)]);
+ TwiddleOneCol(direction, n1, N, j, umain2, &scratch[2*j*(n1+pad_length)],
+ pad_length);
+ }
+
+ BARRIER(Global->start, P, 4);
+#ifdef FFT_DBG
+ LOCK(Global->idlock); printf("Slave %d left barrier 4\n",MyNum); UNLOCK(Global->idlock);
+#endif
+
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(clocktime1);
+ }
+ /* transpose */
+ Transpose(n1, scratch, x, MyNum, MyFirst, MyLast, pad_length);
+
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(clocktime2);
+ *l_transtime += (clocktime2-clocktime1);
+ }
+
+ /* do n1 1D FFTs on columns again */
+ for (j=MyFirst; j<MyLast; j++) {
+ FFT1DOnce(direction, m1, n1, upriv, &x[2*j*(n1+pad_length)]);
+ if (direction == -1)
+ Scale(n1, N, &x[2*j*(n1+pad_length)]);
+ }
+
+ BARRIER(Global->start, P, 5);
+#ifdef FFT_DBG
+ LOCK(Global->idlock); printf("Slave %d left barrier 5\n",MyNum); UNLOCK(Global->idlock);
+#endif
+
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(clocktime1);
+ }
+
+ /* transpose back */
+ Transpose(n1, x, scratch, MyNum, MyFirst, MyLast, pad_length);
+
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(clocktime2);
+ *l_transtime += (clocktime2-clocktime1);
+ }
+
+ BARRIER(Global->start, P, 6);
+#ifdef FFT_DBG
+ LOCK(Global->idlock); printf("Slave %d left barrier 6\n",MyNum); UNLOCK(Global->idlock);
+#endif
+
+ /* copy columns from scratch to x */
+ if ((test_result) || (doprint)) {
+ for (j=MyFirst; j<MyLast; j++) {
+ CopyColumn(n1, &scratch[2*j*(n1+pad_length)], &x[2*j*(n1+pad_length)]);
+ }
+ }
+
+ BARRIER(Global->start, P, 7);
+}
+
+
+TwiddleOneCol(direction, n1, N, j, u, x, pad_length)
+
+int direction;
+int n1;
+int N;
+int j;
+double *u;
+double *x;
+int pad_length;
+
+{
+ int i;
+ double omega_r;
+ double omega_c;
+ double x_r;
+ double x_c;
+ double r1;
+ double c1;
+ double r2;
+ double c2;
+
+ for (i=0; i<n1; i++) {
+ omega_r = u[2*(j*(n1+pad_length)+i)];
+ omega_c = direction*u[2*(j*(n1+pad_length)+i)+1];
+ x_r = x[2*i];
+ x_c = x[2*i+1];
+ x[2*i] = omega_r*x_r - omega_c*x_c;
+ x[2*i+1] = omega_r*x_c + omega_c*x_r;
+ }
+}
+
+
+Scale(n1, N, x)
+
+int n1;
+int N;
+double *x;
+
+{
+ int i;
+
+ for (i=0; i<n1; i++) {
+ x[2*i] /= N;
+ x[2*i+1] /= N;
+ }
+}
+
+
+Transpose(n1, src, dest, MyNum, MyFirst, MyLast, pad_length)
+
+int n1;
+double *src;
+double *dest;
+int MyNum;
+int MyFirst;
+int MyLast;
+int pad_length;
+
+{
+ int i;
+ int j;
+ int k;
+ int l;
+ int m;
+ int blksize;
+ int numblks;
+ int firstfirst;
+ int h_off;
+ int v_off;
+ int v;
+ int h;
+ int n1p;
+ int row_count;
+
+ blksize = MyLast-MyFirst;
+ numblks = (2*blksize)/num_cache_lines;
+ if (numblks * num_cache_lines != 2 * blksize) {
+ numblks ++;
+ }
+ blksize = blksize / numblks;
+ firstfirst = MyFirst;
+ row_count = n1/P;
+ n1p = n1+pad_length;
+ for (l=MyNum+1;l<P;l++) {
+ v_off = l*row_count;
+ for (k=0; k<numblks; k++) {
+ h_off = firstfirst;
+ for (m=0; m<numblks; m++) {
+ for (i=0; i<blksize; i++) {
+ v = v_off + i;
+ for (j=0; j<blksize; j++) {
+ h = h_off + j;
+ dest[2*(h*n1p+v)] = src[2*(v*n1p+h)];
+ dest[2*(h*n1p+v)+1] = src[2*(v*n1p+h)+1];
+ }
+ }
+ h_off += blksize;
+ }
+ v_off+=blksize;
+ }
+ }
+
+ for (l=0;l<MyNum;l++) {
+ v_off = l*row_count;
+ for (k=0; k<numblks; k++) {
+ h_off = firstfirst;
+ for (m=0; m<numblks; m++) {
+ for (i=0; i<blksize; i++) {
+ v = v_off + i;
+ for (j=0; j<blksize; j++) {
+ h = h_off + j;
+ dest[2*(h*n1p+v)] = src[2*(v*n1p+h)];
+ dest[2*(h*n1p+v)+1] = src[2*(v*n1p+h)+1];
+ }
+ }
+ h_off += blksize;
+ }
+ v_off+=blksize;
+ }
+ }
+
+ v_off = MyNum*row_count;
+ for (k=0; k<numblks; k++) {
+ h_off = firstfirst;
+ for (m=0; m<numblks; m++) {
+ for (i=0; i<blksize; i++) {
+ v = v_off + i;
+ for (j=0; j<blksize; j++) {
+ h = h_off + j;
+ dest[2*(h*n1p+v)] = src[2*(v*n1p+h)];
+ dest[2*(h*n1p+v)+1] = src[2*(v*n1p+h)+1];
+ }
+ }
+ h_off += blksize;
+ }
+ v_off+=blksize;
+ }
+}
+
+
+CopyColumn(n1, src, dest)
+
+int n1;
+double *src;
+double *dest;
+
+{
+ int i;
+
+ for (i=0; i<n1; i++) {
+ dest[2*i] = src[2*i];
+ dest[2*i+1] = src[2*i+1];
+ }
+}
+
+
+Reverse(N, M, x)
+
+int N;
+int M;
+double *x;
+
+{
+ int j, k;
+
+ for (k=0; k<N; k++) {
+ j = BitReverse(M, k);
+ if (j > k) {
+ SWAP(x[2*j], x[2*k]);
+ SWAP(x[2*j+1], x[2*k+1]);
+ }
+ }
+}
+
+
+FFT1DOnce(direction, M, N, u, x)
+
+int direction;
+int M;
+int N;
+double *u;
+double *x;
+
+{
+ int j;
+ int k;
+ int q;
+ int L;
+ int r;
+ int Lstar;
+ double *u1;
+ double *x1;
+ double *x2;
+ double omega_r;
+ double omega_c;
+ double tau_r;
+ double tau_c;
+ double x_r;
+ double x_c;
+
+ Reverse(N, M, x);
+
+ for (q=1; q<=M; q++) {
+ L = 1<<q; r = N/L; Lstar = L/2;
+ u1 = &u[2*(Lstar-1)];
+ for (k=0; k<r; k++) {
+ x1 = &x[2*(k*L)];
+ x2 = &x[2*(k*L+Lstar)];
+ for (j=0; j<Lstar; j++) {
+ omega_r = u1[2*j];
+ omega_c = direction*u1[2*j+1];
+ x_r = x2[2*j];
+ x_c = x2[2*j+1];
+ tau_r = omega_r*x_r - omega_c*x_c;
+ tau_c = omega_r*x_c + omega_c*x_r;
+ x_r = x1[2*j];
+ x_c = x1[2*j+1];
+ x2[2*j] = x_r - tau_r;
+ x2[2*j+1] = x_c - tau_c;
+ x1[2*j] = x_r + tau_r;
+ x1[2*j+1] = x_c + tau_c;
+ }
+ }
+ }
+}
+
+
+PrintArray(N, x)
+
+int N;
+double *x;
+
+{
+ int i, j, k;
+
+ for (i=0; i<rootN; i++) {
+ k = i*(rootN+pad_length);
+ for (j=0; j<rootN; j++) {
+ printf(" %4.2f %4.2f", x[2*(k+j)], x[2*(k+j)+1]);
+ if (i*rootN+j != N-1) {
+ printf(",");
+ }
+ if ((i*rootN+j+1) % 8 == 0) {
+ printf("\n");
+ }
+ }
+ }
+ printf("\n");
+ printf("\n");
+}
+
+
+void printerr(s)
+
+char *s;
+
+{
+ printf("ERROR: %s\n",s);
+}
+
+
+int log_2(number)
+
+int number;
+
+{
+ int cumulative = 1;
+ int out = 0;
+ int done = 0;
+
+ while ((cumulative < number) && (!done) && (out < 50)) {
+ if (cumulative == number) {
+ done = 1;
+ } else {
+ cumulative = cumulative * 2;
+ out ++;
+ }
+ }
+
+ if (cumulative == number) {
+ return(out);
+ } else {
+ return(-1);
+ }
+}
+
+#include <tests_smp/getopt.c>
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/fft.c b/cesar/ecos/packages/kernel/current/tests_smp/fft.c
new file mode 100644
index 0000000000..0222677c33
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/fft.c
@@ -0,0 +1,1460 @@
+
+
+
+
+
+
+
+
+
+
+
+/*************************************************************************/
+/* */
+/* Copyright (c) 1994 Stanford University */
+/* */
+/* All rights reserved. */
+/* */
+/* Permission is given to use, copy, and modify this software for any */
+/* non-commercial purpose as long as this copyright notice is not */
+/* removed. All other uses, including redistribution in whole or in */
+/* part, are forbidden without prior written permission. */
+/* */
+/* This software is provided with absolutely no warranty and no */
+/* support. */
+/* */
+/*************************************************************************/
+
+/*************************************************************************/
+/* */
+/* Perform 1D fast Fourier transform using six-step FFT method */
+/* */
+/* 1) Performs staggered, blocked transposes for cache-line reuse */
+/* 2) Roots of unity rearranged and distributed for only local */
+/* accesses during application of roots of unity */
+/* 3) Small set of roots of unity elements replicated locally for */
+/* 1D FFTs (less than root N elements replicated at each node) */
+/* 4) Matrix data structures are padded to reduce cache mapping */
+/* conflicts */
+/* */
+/* Command line options: */
+/* */
+/* -mM : M = even integer; 2**M total complex data points transformed. */
+/* -pP : P = number of processors; Must be a power of 2. */
+/* -nN : N = number of cache lines. */
+/* -lL : L = Log base 2 of cache line length in bytes. */
+/* -s : Print individual processor timing statistics. */
+/* -t : Perform FFT and inverse FFT. Test output by comparing the */
+/* integral of the original data to the integral of the data */
+/* that results from performing the FFT and inverse FFT. */
+/* -o : Print out complex data points. */
+/* -h : Print out command line options. */
+/* */
+/* Note: This version works under both the FORK and SPROC models */
+/* */
+/*************************************************************************/
+
+#include <stdio.h>
+#include <math.h>
+#include <tests_smp/getopt.h>
+
+#define MAXRAND 2147483647
+#define PAGE_SIZE 4096
+#define NUM_CACHE_LINES 65536
+#define LOG2_LINE_SIZE 4
+#define PI 3.1416
+#define DEFAULT_M 10
+#define DEFAULT_P 1
+
+#include <tests_smp/fft_arg.c>
+
+
+/*---------------------------------------*/
+#include <pkgconf/system.h>
+#include <pkgconf/infra.h>
+#include <pkgconf/kernel.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/testcase.h>
+#include <pkgconf/isoinfra.h>
+#include <cyg/hal/hal_cache.h>
+#include <cyg/hal/hal_smp.h>
+#include <cyg/kernel/kapi.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+int smp_cyg_test_main(int argc, char **argv);
+
+void smp_cyg_test_main_call(void *p) {
+ smp_cyg_test_main(smp_cyg_test_argc, smp_cyg_test_argv);
+}
+
+
+/* #define STACK_SIZE 0x1b000 */
+#define STACK_SIZE 8192
+static cyg_thread smp_cyg_test_thread;
+static char smp_cyg_test_stack[STACK_SIZE];
+static cyg_handle_t smp_cyg_test_threadh;
+
+
+
+cyg_handle_t threadh[64];
+char *stack[64];
+cyg_thread thread[64];
+
+
+externC void cyg_user_start( void )
+{
+ CYG_TEST_INIT();
+
+ diag_printf("Starting test app\n");
+
+ cyg_thread_create(10, // Priority - just a number
+ smp_cyg_test_main_call, // entry
+ 0, // index
+ "smp test", // Name
+ smp_cyg_test_stack, // Stack
+ STACK_SIZE, // Size
+ &smp_cyg_test_threadh, // Handle
+ &smp_cyg_test_thread // Thread data structure
+ );
+ cyg_thread_resume( smp_cyg_test_threadh );
+ /*cyg_scheduler_start();*/
+}
+
+
+/*---------------------------------------*/
+
+
+#define SWAP(a,b) {double tmp; tmp=a; a=b; b=tmp;}
+
+struct GlobalMemory {
+ int id;
+ cyg_spinlock_t idlock;
+
+/*---------------------------------------*/
+struct startTYP {
+ cyg_spinlock_t lock;;
+ int count[1];
+ cyg_sem_t queue[1];;
+
+ } start[1];
+/*---------------------------------------*/
+
+
+ int *transtimes;
+ int *totaltimes;
+ int starttime;
+ int finishtime;
+ int initdonetime;
+} *Global;
+
+int dbg_on = 0;
+
+int P = DEFAULT_P;
+int M = DEFAULT_M;
+int N; /* N = 2^M */
+int rootN; /* rootN = N^1/2 */
+double *x; /* x is the original time-domain data */
+double *trans; /* trans is used as scratch space */
+double *umain; /* umain is roots of unity for 1D FFTs */
+double *umain2; /* umain2 is entire roots of unity matrix */
+int test_result = 0;
+int doprint = 0;
+int dostats = 0;
+int transtime = 0;
+int transtime2 = 0;
+int avgtranstime = 0;
+int avgcomptime = 0;
+unsigned int transstart = 0;
+unsigned int transend = 0;
+int maxtotal=0;
+int mintotal=0;
+double maxfrac=0;
+double minfrac=0;
+double avgfractime=0;
+int orig_num_lines = NUM_CACHE_LINES; /* number of cache lines */
+int num_cache_lines = NUM_CACHE_LINES; /* number of cache lines */
+int log2_line_size = LOG2_LINE_SIZE;
+int line_size;
+int rowsperproc;
+double ck1;
+double ck3; /* checksums for testing answer */
+int pad_length;
+
+void SlaveStart();
+double TouchArray(double *,double *,double *,double *,int,int,int,int);
+void FFT1D(int,int,int,double *,double *,double *,double *,int,int *,int,
+ int,int,int,int,int,int,struct GlobalMemory *);
+double CheckSum();
+double drand48();
+int log_2(int);
+void printerr(char *);
+volatile int thread_array[4] = {0, 0, 0, 0};
+
+int smp_cyg_test_main(int argc, char **argv)
+{
+ int i;
+ int j;
+ int c;
+ extern char *optarg;
+ int m1;
+ int factor;
+ int pages;
+ unsigned int start;
+ //memset (thread_array,0,sizeof(thread_array));
+
+ {
+ (start) = cyg_current_time()*10;
+}
+;
+
+
+// extern Cyg_Mempool_dlmalloc *cygmem_memalloc_heaps[ 2 ];
+// cygmem_memalloc_heaps[0].
+
+
+ // printf("<cpu%d> thread %d Arguments (%d): ",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),argc);
+// for (i = 0;i < argc;i++){
+// printf("%s ",argv[i]);
+// }
+// printf("\n");
+
+ while ((c = getopt(argc, argv, "p:m:n:l:stoh")) != -1) {
+ switch(c) {
+ case 'p': P = atoi(optarg);
+ P = HAL_SMP_CPU_MAX;
+ if (P < 1) {
+ printerr("P must be >= 1\n");
+ exit(-1);
+ }
+ if (log_2(P) == -1) {
+ printerr("P must be a power of 2\n");
+ exit(-1);
+ }
+ break;
+ case 'm': M = atoi(optarg);
+ m1 = M/2;
+ if (2*m1 != M) {
+ printerr("M must be even\n");
+ exit(-1);
+ }
+ break;
+ case 'n': num_cache_lines = atoi(optarg);
+ orig_num_lines = num_cache_lines;
+ if (num_cache_lines < 1) {
+ printerr("Number of cache lines must be >= 1\n");
+ exit(-1);
+ }
+ break;
+ case 'l': log2_line_size = atoi(optarg);
+ if (log2_line_size < 0) {
+ printerr("Log base 2 of cache line length in bytes must be >= 0\n");
+ exit(-1);
+ }
+ break;
+ case 's': dostats = !dostats;
+ break;
+ case 't': test_result = !test_result;
+ break;
+ case 'o': doprint = !doprint;
+ break;
+ case 'h': printf("Usage: FFT <options>\n\n");
+ printf("options:\n");
+ printf(" -mM : M = even integer; 2**M total complex data points transformed.\n");
+ printf(" -pP : P = number of processors; Must be a power of 2.\n");
+ printf(" -nN : N = number of cache lines.\n");
+ printf(" -lL : L = Log base 2 of cache line length in bytes.\n");
+ printf(" -s : Print individual processor timing statistics.\n");
+ printf(" -t : Perform FFT and inverse FFT. Test output by comparing the\n");
+ printf(" integral of the original data to the integral of the data that\n");
+ printf(" results from performing the FFT and inverse FFT.\n");
+ printf(" -o : Print out complex data points.\n");
+ printf(" -h : Print out command line options.\n\n");
+ printf("Default: FFT -m%1d -p%1d -n%1d -l%1d\n",
+ DEFAULT_M,DEFAULT_P,NUM_CACHE_LINES,LOG2_LINE_SIZE);
+ exit(0);
+ break;
+ }
+ }
+
+ if (P > 64) {
+ printf("Maximal 64 processes\n");
+ exit(0);
+ }
+
+ {;};
+
+ N = 1<<M;
+ rootN = 1<<(M/2);
+ rowsperproc = rootN/P;
+ if (rowsperproc == 0) {
+ printerr("Matrix not large enough. 2**(M/2) must be >= P\n");
+ exit(-1);
+ }
+
+ line_size = 1 << log2_line_size;
+ if (line_size < 2*sizeof(double)) {
+ printf("WARNING: Each element is a complex double (%d bytes)\n",2*sizeof(double));
+ printf(" => Less than one element per cache line\n");
+ printf(" Computing transpose blocking factor\n");
+ factor = (2*sizeof(double)) / line_size;
+ num_cache_lines = orig_num_lines / factor;
+ }
+ if (line_size <= 2*sizeof(double)) {
+ pad_length = 1;
+ } else {
+ pad_length = line_size / (2*sizeof(double));
+ }
+
+ if (rowsperproc * rootN * 2 * sizeof(double) >= PAGE_SIZE) {
+ pages = (2 * pad_length * sizeof(double) * rowsperproc) / PAGE_SIZE;
+ if (pages * PAGE_SIZE != 2 * pad_length * sizeof(double) * rowsperproc) {
+ pages ++;
+ }
+ pad_length = (pages * PAGE_SIZE) / (2 * sizeof(double) * rowsperproc);
+ } else {
+ pad_length = (PAGE_SIZE - (rowsperproc * rootN * 2 * sizeof(double))) /
+
+ (2 * sizeof(double) * rowsperproc);
+ if (pad_length * (2 * sizeof(double) * rowsperproc) !=
+ (PAGE_SIZE - (rowsperproc * rootN * 2 * sizeof(double)))) {
+ printerr("Padding algorithm unsuccessful\n");
+ exit(-1);
+ }
+ }
+
+ Global = (struct GlobalMemory *) calloc(sizeof(struct GlobalMemory), 1);;
+ if (Global == NULL) {
+ printf("Could not malloc memory for Global (%d)\n",sizeof(struct GlobalMemory));
+ exit(-1);
+ }
+
+
+ x = (double *) calloc(2*(N+rootN*pad_length)*sizeof(double)+PAGE_SIZE, 1);;
+ trans = (double *) calloc(2*(N+rootN*pad_length)*sizeof(double)+PAGE_SIZE, 1);;
+ umain = (double *) calloc(2*rootN*sizeof(double), 1);;
+ umain2 = (double *) calloc(2*(N+rootN*pad_length)*sizeof(double)+PAGE_SIZE, 1);;
+
+
+ Global->transtimes = (int *) calloc(P*sizeof(int), 1);;
+ Global->totaltimes = (int *) calloc(P*sizeof(int), 1);;
+ if (x == NULL) {
+ printerr("Could not malloc memory for x\n");
+ exit(-1);
+ } else if (trans == NULL) {
+ printerr("Could not malloc memory for trans\n");
+ exit(-1);
+ } else if (umain == NULL) {
+ printerr("Could not malloc memory for umain\n");
+ exit(-1);
+ } else if (umain2 == NULL) {
+ printerr("Could not malloc memory for umain2\n");
+ exit(-1);
+ }
+
+ x = (double *) (((unsigned) x) + PAGE_SIZE - ((unsigned) x) % PAGE_SIZE);
+ trans = (double *) (((unsigned) trans) + PAGE_SIZE - ((unsigned) trans) % PAGE_SIZE);
+ umain2 = (double *) (((unsigned) umain2) + PAGE_SIZE - ((unsigned) umain2) % PAGE_SIZE);
+
+/* In order to optimize data distribution, the data structures x, trans,
+ and umain2 have been aligned so that each begins on a page boundary.
+ This ensures that the amount of padding calculated by the program is
+ such that each processor's partition ends on a page boundary, thus
+ ensuring that all data from these structures that are needed by a
+ processor can be allocated to its local memory */
+
+/* POSSIBLE ENHANCEMENT: Here is where one might distribute the x,
+ trans, and umain2 data structures across physically distributed
+ memories as desired.
+
+ One way to place data is as follows:
+
+ double *base;
+ int i;
+
+ i = ((N/P)+(rootN/P)*pad_length)*2;
+ base = &(x[0]);
+ for (j=0;j<P;j++) {
+ Place all addresses x such that (base <= x < base+i) on node j
+ base += i;
+ }
+
+ The trans and umain2 data structures can be placed in a similar manner.
+
+ */
+
+ printf("\n");
+ printf("FFT with Blocking Transpose\n");
+ printf(" %d Complex Doubles\n",N);
+ printf(" %d Threads\n",P);
+ if (num_cache_lines != orig_num_lines) {
+ printf(" %d Cache lines\n",orig_num_lines);
+ printf(" %d Cache lines for blocking transpose\n",num_cache_lines);
+ } else {
+ printf(" %d Cache lines\n",num_cache_lines);
+ }
+ printf(" %d Byte line size\n",(1 << log2_line_size));
+ printf(" %d Bytes per page\n",PAGE_SIZE);
+ printf("\n");
+
+ {{
+/*---------------------------------------*/
+ int mon_dum1,mon_dum2;
+ for (mon_dum1=0; mon_dum1 < 1; mon_dum1++)
+ for (mon_dum2=0; mon_dum2 < 1; mon_dum2++) {
+ Global->start[mon_dum1].count[mon_dum2] = 0;
+ { cyg_semaphore_init(&Global->start[mon_dum1].queue[mon_dum2],0);};
+ }
+ for (mon_dum1=0; mon_dum1 < 1; mon_dum1++) {
+ cyg_spinlock_init( &Global->start[mon_dum1].lock,0 );;
+ }
+/*---------------------------------------*/
+}};
+ cyg_spinlock_init( &Global->idlock,0 );;
+ Global->id = 0;
+ InitX(N, x); /* place random values in x */
+
+ if (test_result) {
+ ck1 = CheckSum(N, x);
+ }
+ if (doprint) {
+ printf("Original data values:\n");
+ PrintArray(N, x);
+ }
+
+ InitU(N,umain); /* initialize u arrays*/
+ InitU2(N,umain2,rootN);
+
+ /* fire off P processes */
+ for (i=1; i<P; i++) {
+
+{
+ /*---------------------------------------*/
+ stack[i] = calloc(STACK_SIZE, 1);
+ cyg_thread_create(10, // Priority - just a number
+ SlaveStart, // entry
+ 0, // index
+ "slave", // Name
+ stack[i], // Stack
+ STACK_SIZE, // Size
+ &threadh[i], // Handle
+ &thread[i] // Thread data structure
+ );
+ cyg_thread_resume( threadh[i] );
+ /*---------------------------------------*/
+}
+;
+ }
+
+ SlaveStart();
+
+ for (i=1; i<P; i++) {
+ while(!thread_array[i]) {};
+ }
+
+ if (doprint) {
+ if (test_result) {
+ printf("Data values after inverse FFT:\n");
+ } else {
+ printf("Data values after FFT:\n");
+ }
+ PrintArray(N, x);
+ }
+
+ transtime = Global->transtimes[0];
+ printf("\n");
+ printf(" PROCESS STATISTICS\n");
+ printf(" Computation Transpose Transpose\n");
+ printf(" Proc Time Time Fraction\n");
+ printf(" 0 %10d %10d %8.5f\n",
+ Global->totaltimes[0],Global->transtimes[0],
+ ((double)Global->transtimes[0])/Global->totaltimes[0]);
+ if (dostats) {
+ transtime2 = Global->transtimes[0];
+ avgtranstime = Global->transtimes[0];
+ avgcomptime = Global->totaltimes[0];
+ maxtotal = Global->totaltimes[0];
+ mintotal = Global->totaltimes[0];
+ maxfrac = ((double)Global->transtimes[0])/Global->totaltimes[0];
+ minfrac = ((double)Global->transtimes[0])/Global->totaltimes[0];
+ avgfractime = ((double)Global->transtimes[0])/Global->totaltimes[0];
+ for (i=1;i<P;i++) {
+ if (Global->transtimes[i] > transtime) {
+ transtime = Global->transtimes[i];
+ }
+ if (Global->transtimes[i] < transtime2) {
+ transtime2 = Global->transtimes[i];
+ }
+ if (Global->totaltimes[i] > maxtotal) {
+ maxtotal = Global->totaltimes[i];
+ }
+ if (Global->totaltimes[i] < mintotal) {
+ mintotal = Global->totaltimes[i];
+ }
+ if (((double)Global->transtimes[i])/Global->totaltimes[i] > maxfrac) {
+ maxfrac = ((double)Global->transtimes[i])/Global->totaltimes[i];
+ }
+ if (((double)Global->transtimes[i])/Global->totaltimes[i] < minfrac) {
+ minfrac = ((double)Global->transtimes[i])/Global->totaltimes[i];
+ }
+ printf(" %3d %10d %10d %f\n",
+ i,Global->totaltimes[i],Global->transtimes[i],
+ ((double)Global->transtimes[i])/Global->totaltimes[i]);
+ avgtranstime += Global->transtimes[i];
+ avgcomptime += Global->totaltimes[i];
+ avgfractime += ((double)Global->transtimes[i])/Global->totaltimes[i];
+ }
+ printf(" Avg %10f %10f %f\n",
+ ((double) avgcomptime)/P,((double) avgtranstime)/P,avgfractime/P);
+ printf(" Max %10d %10d %f\n",
+ maxtotal,transtime,maxfrac);
+ printf(" Min %10d %10d %f\n",
+ mintotal,transtime2,minfrac);
+ }
+ Global->starttime = start;
+ printf("\n");
+ printf(" TIMING INFORMATION\n");
+ printf("Start time : %16d\n",
+ Global->starttime);
+ printf("Initialization finish time : %16d\n",
+ Global->initdonetime);
+ printf("Overall finish time : %16d\n",
+ Global->finishtime);
+ printf("Total time with initialization : %16d\n",
+ Global->finishtime-Global->starttime);
+ printf("Total time without initialization : %16d\n",
+ Global->finishtime-Global->initdonetime);
+ printf("Overall transpose time : %16d\n",
+ transtime);
+ printf("Overall transpose fraction : %f\n",
+ ((double) transtime)/(Global->finishtime-Global->initdonetime));
+ printf("\n");
+
+ if (test_result) {
+ ck3 = CheckSum(N, x);
+ printf(" INVERSE FFT TEST RESULTS\n");
+ printf("Checksum difference is %f (%f, %f)\n",
+ ck1-ck3, ck1, ck3);
+ if (fabs(ck1-ck3) < 0.001) {
+ printf("TEST PASSED\n");
+ } else {
+ printf("TEST FAILED\n");
+ }
+ }
+
+
+{
+ diag_printf("FP test end\n");
+ return 0;
+}
+;
+}
+
+
+void SlaveStart()
+{
+ int i;
+ int j;
+ int MyNum;
+ double error;
+ double *upriv;
+ int initdone;
+ int finish;
+ int l_transtime=0;
+ int MyFirst;
+ int MyLast;
+
+ cyg_spinlock_spin(&Global->idlock);;
+ MyNum = Global->id;
+ Global->id++;
+#ifdef FFT_DBG
+ printf("Slave %d started\n",MyNum);
+#endif
+ cyg_spinlock_clear(&Global->idlock);;
+
+
+/* POSSIBLE ENHANCEMENT: Here is where one might pin processes to
+ processors to avoid migration */
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( Global->start[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),1,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] < (P -1) ) {
+ Global->start[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),1,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&Global->start[0].lock );;
+ { cyg_semaphore_wait(&Global->start[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),1,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),1,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&Global->start[0].lock );;
+
+ } else {
+ ( Global->start[0].count[0] )-- ;
+ //cyg_spinlock_clear(&Global->start[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),1,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&Global->start[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+};
+#ifdef FFT_DBG
+ cyg_spinlock_spin(&Global->idlock);; printf("Slave %d left barrier 1\n",MyNum); cyg_spinlock_clear(&Global->idlock);;
+#endif
+
+ upriv = (double *) malloc(2*(rootN-1)*sizeof(double));
+ if (upriv == NULL) {
+ printf("Proc %d could not malloc memory for upriv\n",MyNum);
+ exit(-1);
+ }
+ for (i=0;i<2*(rootN-1);i++) {
+ upriv[i] = umain[i];
+ }
+
+ MyFirst = rootN*MyNum/P;
+ MyLast = rootN*(MyNum+1)/P;
+
+ TouchArray(x, trans, umain2, upriv, N, MyNum, MyFirst, MyLast);
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( Global->start[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),2,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] < (P -1) ) {
+ Global->start[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),2,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&Global->start[0].lock );;
+ { cyg_semaphore_wait(&Global->start[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),2,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),2,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&Global->start[0].lock );;
+
+ } else {
+ ( Global->start[0].count[0] )-- ;
+ //cyg_spinlock_clear(&Global->start[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),2,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&Global->start[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+};
+#ifdef FFT_DBG
+ cyg_spinlock_spin(&Global->idlock);; printf("Slave %d left barrier 2\n",MyNum); cyg_spinlock_clear(&Global->idlock);;
+#endif
+
+/* POSSIBLE ENHANCEMENT: Here is where one might reset the
+ statistics that one is measuring about the parallel execution */
+
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (initdone) = cyg_current_time()*10;
+}
+;
+ }
+
+ /* perform forward FFT */
+ FFT1D(1, M, N, x, trans, upriv, umain2, MyNum, &l_transtime, MyFirst,
+ MyLast, pad_length, P, test_result, doprint, dostats, Global);
+
+ /* perform backward FFT */
+ if (test_result) {
+ FFT1D(-1, M, N, x, trans, upriv, umain2, MyNum, &l_transtime, MyFirst,
+ MyLast, pad_length, P, test_result, doprint, dostats, Global);
+ }
+
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (finish) = cyg_current_time()*10;
+}
+;
+ Global->transtimes[MyNum] = l_transtime;
+ Global->totaltimes[MyNum] = finish-initdone;
+ }
+ if (MyNum == 0) {
+ Global->finishtime = finish;
+ Global->initdonetime = initdone;
+ }
+
+ thread_array[MyNum] = 1;
+}
+
+
+double TouchArray(x, scratch, u, upriv, N, MyNum, MyFirst, MyLast)
+
+double *x;
+double *scratch;
+double *u;
+double *upriv;
+int N;
+int MyNum;
+int MyFirst;
+int MyLast;
+
+{
+ int i,j,k;
+ double tot = 0.0;
+
+ /* touch my data */
+ for (j=0;j<2*(rootN-1);j++) {
+ tot += upriv[j];
+ }
+ for (j=MyFirst; j<MyLast; j++) {
+ k = j * (rootN + pad_length);
+ for (i=0;i<rootN;i++) {
+ tot += x[2*(k+i)] + x[2*(k+i)+1] +
+ scratch[2*(k+i)] + scratch[2*(k+i)+1] +
+ u[2*(k+i)] + u[2*(k+i)+1];
+ }
+ }
+ return tot;
+}
+
+
+double CheckSum(N, x)
+
+int N;
+double *x;
+
+{
+ int i,j,k;
+ double cks;
+
+ cks = 0.0;
+ for (j=0; j<rootN; j++) {
+ k = j * (rootN + pad_length);
+ for (i=0;i<rootN;i++) {
+ cks += x[2*(k+i)] + x[2*(k+i)+1];
+ }
+ }
+
+ return(cks);
+}
+
+
+InitX(N, x)
+
+int N;
+double *x;
+
+{
+ int i,j,k;
+
+ srand(0);
+ for (j=0; j<rootN; j++) {
+ k = j * (rootN + pad_length);
+ for (i=0;i<rootN;i++) {
+ x[2*(k+i)] = rand()/MAXRAND;
+ x[2*(k+i)+1] = rand()/MAXRAND;
+ }
+ }
+}
+
+
+InitU(N, u)
+
+int N;
+double *u;
+
+{
+ int q;
+ int j;
+ int base;
+ int n1;
+
+ for (q=0; 1<<q<N; q++) {
+ n1 = 1<<q;
+ base = n1-1;
+ for (j=0; j<n1; j++) {
+ if (base+j > rootN-1) {
+ return;
+ }
+ u[2*(base+j)] = cos(2.0*PI*j/(2*n1));
+ u[2*(base+j)+1] = -sin(2.0*PI*j/(2*n1));
+ }
+ }
+}
+
+
+InitU2(N, u, n1)
+
+int N;
+double *u;
+int n1;
+
+{
+ int i,j,k;
+ int base;
+
+ for (j=0; j<n1; j++) {
+ k = j*(rootN+pad_length);
+ for (i=0; i<n1; i++) {
+ u[2*(k+i)] = cos(2.0*PI*i*j/(N));
+ u[2*(k+i)+1] = -sin(2.0*PI*i*j/(N));
+ }
+ }
+}
+
+
+BitReverse(M, k)
+
+int M;
+int k;
+
+{
+ int i;
+ int j;
+ int tmp;
+
+ j = 0;
+ tmp = k;
+ for (i=0; i<M; i++) {
+ j = 2*j + (tmp&0x1);
+ tmp = tmp>>1;
+ }
+ return(j);
+}
+
+
+void FFT1D(direction, M, N, x, scratch, upriv, umain2, MyNum, l_transtime,
+ MyFirst, MyLast, pad_length, P, test_result, doprint, dostats,
+ Global)
+
+int direction;
+int M;
+int N;
+int *l_transtime;
+double *x;
+double *upriv;
+double *scratch;
+double *umain2;
+int MyFirst;
+int MyLast;
+int pad_length;
+int P;
+int test_result;
+int doprint;
+int dostats;
+struct GlobalMemory *Global;
+
+{
+ int i;
+ int j;
+ int m1;
+ int n1;
+ int flag = 0;
+ unsigned int clocktime1;
+ unsigned int clocktime2;
+
+ m1 = M/2;
+ n1 = 1<<m1;
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( Global->start[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),3,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] < (P -1) ) {
+ Global->start[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),3,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&Global->start[0].lock );;
+ { cyg_semaphore_wait(&Global->start[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),3,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),3,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&Global->start[0].lock );;
+
+ } else {
+ ( Global->start[0].count[0] )-- ;
+ //cyg_spinlock_clear(&Global->start[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),3,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&Global->start[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+};
+#ifdef FFT_DBG
+ cyg_spinlock_spin(&Global->idlock);; printf("Slave %d left barrier 3\n",MyNum); cyg_spinlock_clear(&Global->idlock);;
+#endif
+
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (clocktime1) = cyg_current_time()*10;
+}
+;
+ }
+
+ /* transpose from x into scratch */
+ Transpose(n1, x, scratch, MyNum, MyFirst, MyLast, pad_length);
+
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (clocktime2) = cyg_current_time()*10;
+}
+;
+ *l_transtime += (clocktime2-clocktime1);
+ }
+
+ /* do n1 1D FFTs on columns */
+ for (j=MyFirst; j<MyLast; j++) {
+ FFT1DOnce(direction, m1, n1, upriv, &scratch[2*j*(n1+pad_length)]);
+ TwiddleOneCol(direction, n1, N, j, umain2, &scratch[2*j*(n1+pad_length)],
+ pad_length);
+ }
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( Global->start[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),4,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] < (P -1) ) {
+ Global->start[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),4,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&Global->start[0].lock );;
+ { cyg_semaphore_wait(&Global->start[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),4,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),4,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&Global->start[0].lock );;
+
+ } else {
+ ( Global->start[0].count[0] )-- ;
+ //cyg_spinlock_clear(&Global->start[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),4,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&Global->start[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+};
+#ifdef FFT_DBG
+ cyg_spinlock_spin(&Global->idlock);; printf("Slave %d left barrier 4\n",MyNum); cyg_spinlock_clear(&Global->idlock);;
+#endif
+
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (clocktime1) = cyg_current_time()*10;
+}
+;
+ }
+ /* transpose */
+ Transpose(n1, scratch, x, MyNum, MyFirst, MyLast, pad_length);
+
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (clocktime2) = cyg_current_time()*10;
+}
+;
+ *l_transtime += (clocktime2-clocktime1);
+ }
+
+ /* do n1 1D FFTs on columns again */
+ for (j=MyFirst; j<MyLast; j++) {
+ FFT1DOnce(direction, m1, n1, upriv, &x[2*j*(n1+pad_length)]);
+ if (direction == -1)
+ Scale(n1, N, &x[2*j*(n1+pad_length)]);
+ }
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( Global->start[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),5,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] < (P -1) ) {
+ Global->start[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),5,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&Global->start[0].lock );;
+ { cyg_semaphore_wait(&Global->start[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),5,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),5,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&Global->start[0].lock );;
+
+ } else {
+ ( Global->start[0].count[0] )-- ;
+ //cyg_spinlock_clear(&Global->start[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),5,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&Global->start[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+};
+#ifdef FFT_DBG
+ cyg_spinlock_spin(&Global->idlock);; printf("Slave %d left barrier 5\n",MyNum); cyg_spinlock_clear(&Global->idlock);;
+#endif
+
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (clocktime1) = cyg_current_time()*10;
+}
+;
+ }
+
+ /* transpose back */
+ Transpose(n1, x, scratch, MyNum, MyFirst, MyLast, pad_length);
+
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (clocktime2) = cyg_current_time()*10;
+}
+;
+ *l_transtime += (clocktime2-clocktime1);
+ }
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( Global->start[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),6,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] < (P -1) ) {
+ Global->start[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),6,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&Global->start[0].lock );;
+ { cyg_semaphore_wait(&Global->start[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),6,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),6,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&Global->start[0].lock );;
+
+ } else {
+ ( Global->start[0].count[0] )-- ;
+ //cyg_spinlock_clear(&Global->start[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),6,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&Global->start[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+};
+#ifdef FFT_DBG
+ cyg_spinlock_spin(&Global->idlock);; printf("Slave %d left barrier 6\n",MyNum); cyg_spinlock_clear(&Global->idlock);;
+#endif
+
+ /* copy columns from scratch to x */
+ if ((test_result) || (doprint)) {
+ for (j=MyFirst; j<MyLast; j++) {
+ CopyColumn(n1, &scratch[2*j*(n1+pad_length)], &x[2*j*(n1+pad_length)]);
+ }
+ }
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( Global->start[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),7,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] < (P -1) ) {
+ Global->start[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),7,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&Global->start[0].lock );;
+ { cyg_semaphore_wait(&Global->start[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),7,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),7,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&Global->start[0].lock );;
+
+ } else {
+ ( Global->start[0].count[0] )-- ;
+ //cyg_spinlock_clear(&Global->start[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),7,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&Global->start[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+};
+}
+
+
+TwiddleOneCol(direction, n1, N, j, u, x, pad_length)
+
+int direction;
+int n1;
+int N;
+int j;
+double *u;
+double *x;
+int pad_length;
+
+{
+ int i;
+ double omega_r;
+ double omega_c;
+ double x_r;
+ double x_c;
+ double r1;
+ double c1;
+ double r2;
+ double c2;
+
+ for (i=0; i<n1; i++) {
+ omega_r = u[2*(j*(n1+pad_length)+i)];
+ omega_c = direction*u[2*(j*(n1+pad_length)+i)+1];
+ x_r = x[2*i];
+ x_c = x[2*i+1];
+ x[2*i] = omega_r*x_r - omega_c*x_c;
+ x[2*i+1] = omega_r*x_c + omega_c*x_r;
+ }
+}
+
+
+Scale(n1, N, x)
+
+int n1;
+int N;
+double *x;
+
+{
+ int i;
+
+ for (i=0; i<n1; i++) {
+ x[2*i] /= N;
+ x[2*i+1] /= N;
+ }
+}
+
+
+Transpose(n1, src, dest, MyNum, MyFirst, MyLast, pad_length)
+
+int n1;
+double *src;
+double *dest;
+int MyNum;
+int MyFirst;
+int MyLast;
+int pad_length;
+
+{
+ int i;
+ int j;
+ int k;
+ int l;
+ int m;
+ int blksize;
+ int numblks;
+ int firstfirst;
+ int h_off;
+ int v_off;
+ int v;
+ int h;
+ int n1p;
+ int row_count;
+
+ blksize = MyLast-MyFirst;
+ numblks = (2*blksize)/num_cache_lines;
+ if (numblks * num_cache_lines != 2 * blksize) {
+ numblks ++;
+ }
+ blksize = blksize / numblks;
+ firstfirst = MyFirst;
+ row_count = n1/P;
+ n1p = n1+pad_length;
+ for (l=MyNum+1;l<P;l++) {
+ v_off = l*row_count;
+ for (k=0; k<numblks; k++) {
+ h_off = firstfirst;
+ for (m=0; m<numblks; m++) {
+ for (i=0; i<blksize; i++) {
+ v = v_off + i;
+ for (j=0; j<blksize; j++) {
+ h = h_off + j;
+ dest[2*(h*n1p+v)] = src[2*(v*n1p+h)];
+ dest[2*(h*n1p+v)+1] = src[2*(v*n1p+h)+1];
+ }
+ }
+ h_off += blksize;
+ }
+ v_off+=blksize;
+ }
+ }
+
+ for (l=0;l<MyNum;l++) {
+ v_off = l*row_count;
+ for (k=0; k<numblks; k++) {
+ h_off = firstfirst;
+ for (m=0; m<numblks; m++) {
+ for (i=0; i<blksize; i++) {
+ v = v_off + i;
+ for (j=0; j<blksize; j++) {
+ h = h_off + j;
+ dest[2*(h*n1p+v)] = src[2*(v*n1p+h)];
+ dest[2*(h*n1p+v)+1] = src[2*(v*n1p+h)+1];
+ }
+ }
+ h_off += blksize;
+ }
+ v_off+=blksize;
+ }
+ }
+
+ v_off = MyNum*row_count;
+ for (k=0; k<numblks; k++) {
+ h_off = firstfirst;
+ for (m=0; m<numblks; m++) {
+ for (i=0; i<blksize; i++) {
+ v = v_off + i;
+ for (j=0; j<blksize; j++) {
+ h = h_off + j;
+ dest[2*(h*n1p+v)] = src[2*(v*n1p+h)];
+ dest[2*(h*n1p+v)+1] = src[2*(v*n1p+h)+1];
+ }
+ }
+ h_off += blksize;
+ }
+ v_off+=blksize;
+ }
+}
+
+
+CopyColumn(n1, src, dest)
+
+int n1;
+double *src;
+double *dest;
+
+{
+ int i;
+
+ for (i=0; i<n1; i++) {
+ dest[2*i] = src[2*i];
+ dest[2*i+1] = src[2*i+1];
+ }
+}
+
+
+Reverse(N, M, x)
+
+int N;
+int M;
+double *x;
+
+{
+ int j, k;
+
+ for (k=0; k<N; k++) {
+ j = BitReverse(M, k);
+ if (j > k) {
+ SWAP(x[2*j], x[2*k]);
+ SWAP(x[2*j+1], x[2*k+1]);
+ }
+ }
+}
+
+
+FFT1DOnce(direction, M, N, u, x)
+
+int direction;
+int M;
+int N;
+double *u;
+double *x;
+
+{
+ int j;
+ int k;
+ int q;
+ int L;
+ int r;
+ int Lstar;
+ double *u1;
+ double *x1;
+ double *x2;
+ double omega_r;
+ double omega_c;
+ double tau_r;
+ double tau_c;
+ double x_r;
+ double x_c;
+
+ Reverse(N, M, x);
+
+ for (q=1; q<=M; q++) {
+ L = 1<<q; r = N/L; Lstar = L/2;
+ u1 = &u[2*(Lstar-1)];
+ for (k=0; k<r; k++) {
+ x1 = &x[2*(k*L)];
+ x2 = &x[2*(k*L+Lstar)];
+ for (j=0; j<Lstar; j++) {
+ omega_r = u1[2*j];
+ omega_c = direction*u1[2*j+1];
+ x_r = x2[2*j];
+ x_c = x2[2*j+1];
+ tau_r = omega_r*x_r - omega_c*x_c;
+ tau_c = omega_r*x_c + omega_c*x_r;
+ x_r = x1[2*j];
+ x_c = x1[2*j+1];
+ x2[2*j] = x_r - tau_r;
+ x2[2*j+1] = x_c - tau_c;
+ x1[2*j] = x_r + tau_r;
+ x1[2*j+1] = x_c + tau_c;
+ }
+ }
+ }
+}
+
+
+PrintArray(N, x)
+
+int N;
+double *x;
+
+{
+ int i, j, k;
+
+ for (i=0; i<rootN; i++) {
+ k = i*(rootN+pad_length);
+ for (j=0; j<rootN; j++) {
+ printf(" %4.2f %4.2f", x[2*(k+j)], x[2*(k+j)+1]);
+ if (i*rootN+j != N-1) {
+ printf(",");
+ }
+ if ((i*rootN+j+1) % 8 == 0) {
+ printf("\n");
+ }
+ }
+ }
+ printf("\n");
+ printf("\n");
+}
+
+
+void printerr(s)
+
+char *s;
+
+{
+ printf("ERROR: %s\n",s);
+}
+
+
+int log_2(number)
+
+int number;
+
+{
+ int cumulative = 1;
+ int out = 0;
+ int done = 0;
+
+ while ((cumulative < number) && (!done) && (out < 50)) {
+ if (cumulative == number) {
+ done = 1;
+ } else {
+ cumulative = cumulative * 2;
+ out ++;
+ }
+ }
+
+ if (cumulative == number) {
+ return(out);
+ } else {
+ return(-1);
+ }
+}
+
+#include <tests_smp/getopt.c>
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/fft_arg.c b/cesar/ecos/packages/kernel/current/tests_smp/fft_arg.c
new file mode 100644
index 0000000000..acf764a06d
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/fft_arg.c
@@ -0,0 +1,18 @@
+
+//___________________________________________
+#define smp_cyg_test_argc 11
+char *_cyg_argv[] = {
+ "fft.exe",
+ "-s",
+ "-t",
+ "-l",
+ "5",
+ "-n",
+ "256",
+ "-p",
+ "2", /* not used, using HAL_SMP_CPU_MAX */
+ "-m",
+ "16"
+};
+#define smp_cyg_test_argv &_cyg_argv
+//'''''''''''''''''''''''''''''''''''''''''''
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/getopt.c b/cesar/ecos/packages/kernel/current/tests_smp/getopt.c
new file mode 100644
index 0000000000..7645ec44d6
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/getopt.c
@@ -0,0 +1,654 @@
+/* Getopt for GNU.
+ NOTE: getopt is now part of the C library, so if you don't know what
+ "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
+ before changing it!
+
+ Copyright (C) 1987, 88, 89, 90, 91, 92, 1993
+ Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifndef __STDC__
+# ifndef const
+# define const
+# endif
+#endif
+
+/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>. */
+#ifndef _NO_PROTO
+#define _NO_PROTO
+#endif
+
+#include <stdio.h>
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+ actually compiling the library itself. This code is part of the GNU C
+ Library, but also included in many other GNU distributions. Compiling
+ and linking in this code is a waste when using the GNU C library
+ (especially if it is a shared library). Rather than having every GNU
+ program understand `configure --with-gnu-libc' and omit the object files,
+ it is simpler to just do this in the source for each such file. */
+
+
+/* This needs to come after some library #include
+ to get __GNU_LIBRARY__ defined. */
+#ifdef __GNU_LIBRARY__
+/* Don't include stdlib.h for non-GNU C libraries because some of them
+ contain conflicting prototypes for getopt. */
+#include <stdlib.h>
+#endif /* GNU C library. */
+
+/* If GETOPT_COMPAT is defined, `+' as well as `--' can introduce a
+ long-named option. Because this is not POSIX.2 compliant, it is
+ being phased out. */
+/* #define GETOPT_COMPAT */
+
+/* This version of `getopt' appears to the caller like standard Unix `getopt'
+ but it behaves differently for the user, since it allows the user
+ to intersperse the options with the other arguments.
+
+ As `getopt' works, it permutes the elements of ARGV so that,
+ when it is done, all the options precede everything else. Thus
+ all application programs are extended to handle flexible argument order.
+
+ Setting the environment variable POSIXLY_CORRECT disables permutation.
+ Then the behavior is completely standard.
+
+ GNU application programs can use a third alternative mode in which
+ they can distinguish the relative order of options and other arguments. */
+
+
+/* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+char *optarg = 0;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+
+ On entry to `getopt', zero means this is the first call; initialize.
+
+ When `getopt' returns EOF, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+/* XXX 1003.2 says this must be 1 before any call. */
+int optind = 0;
+
+/* The next char to be scanned in the option-element
+ in which the last option character we returned was found.
+ This allows us to pick up the scan where we left off.
+
+ If this is zero, or a null string, it means resume the scan
+ by advancing to the next ARGV-element. */
+
+static char *nextchar;
+
+/* Callers store zero here to inhibit the error message
+ for unrecognized options. */
+
+int opterr = 1;
+
+/* Set to an option character which was unrecognized.
+ This must be initialized on some systems to avoid linking in the
+ system's own getopt implementation. */
+
+#define BAD_OPTION '\0'
+int optopt = BAD_OPTION;
+
+/* Describe how to deal with options that follow non-option ARGV-elements.
+
+ If the caller did not specify anything,
+ the default is REQUIRE_ORDER if the environment variable
+ POSIXLY_CORRECT is defined, PERMUTE otherwise.
+
+ REQUIRE_ORDER means don't recognize them as options;
+ stop option processing when the first non-option is seen.
+ This is what Unix does.
+ This mode of operation is selected by either setting the environment
+ variable POSIXLY_CORRECT, or using `+' as the first character
+ of the list of option characters.
+
+ PERMUTE is the default. We permute the contents of ARGV as we scan,
+ so that eventually all the non-options are at the end. This allows options
+ to be given in any order, even with programs that were not written to
+ expect this.
+
+ RETURN_IN_ORDER is an option available to programs that were written
+ to expect options and other ARGV-elements in any order and that care about
+ the ordering of the two. We describe each non-option ARGV-element
+ as if it were the argument of an option with character code 1.
+ Using `-' as the first character of the list of option characters
+ selects this mode of operation.
+
+ The special argument `--' forces an end of option-scanning regardless
+ of the value of `ordering'. In the case of RETURN_IN_ORDER, only
+ `--' can cause `getopt' to return EOF with `optind' != ARGC. */
+
+static enum
+{
+ REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+} ordering;
+
+static int
+my_strlen (str)
+ const char *str;
+{
+ int n = 0;
+ while (*str++)
+ n++;
+ return n;
+}
+
+static char *
+my_index (str, chr)
+ const char *str;
+ int chr;
+{
+ while (*str)
+ {
+ if (*str == chr)
+ return (char *) str;
+ str++;
+ }
+ return 0;
+}
+
+
+/* Handle permutation of arguments. */
+
+/* Describe the part of ARGV that contains non-options that have
+ been skipped. `first_nonopt' is the index in ARGV of the first of them;
+ `last_nonopt' is the index after the last of them. */
+
+static int first_nonopt;
+static int last_nonopt;
+
+/* Exchange two adjacent subsequences of ARGV.
+ One subsequence is elements [first_nonopt,last_nonopt)
+ which contains all the non-options that have been skipped so far.
+ The other is elements [last_nonopt,optind), which contains all
+ the options processed since those non-options were skipped.
+
+ `first_nonopt' and `last_nonopt' are relocated so that they describe
+ the new indices of the non-options in ARGV after they are moved.
+
+ To perform the swap, we first reverse the order of all elements. So
+ all options now come before all non options, but they are in the
+ wrong order. So we put back the options and non options in original
+ order by reversing them again. For example:
+ original input: a b c -x -y
+ reverse all: -y -x c b a
+ reverse options: -x -y c b a
+ reverse non options: -x -y a b c
+*/
+
+#if __STDC__ || defined(PROTO)
+static void exchange (char **argv);
+#endif
+
+static void
+exchange (argv)
+ char **argv;
+{
+ char *temp, **first, **last;
+
+ /* Reverse all the elements [first_nonopt, optind) */
+ first = &argv[first_nonopt];
+ last = &argv[optind-1];
+ while (first < last) {
+ temp = *first; *first = *last; *last = temp; first++; last--;
+ }
+ /* Put back the options in order */
+ first = &argv[first_nonopt];
+ first_nonopt += (optind - last_nonopt);
+ last = &argv[first_nonopt - 1];
+ while (first < last) {
+ temp = *first; *first = *last; *last = temp; first++; last--;
+ }
+
+ /* Put back the non options in order */
+ first = &argv[first_nonopt];
+ last_nonopt = optind;
+ last = &argv[last_nonopt-1];
+ while (first < last) {
+ temp = *first; *first = *last; *last = temp; first++; last--;
+ }
+}
+
+/* Scan elements of ARGV (whose length is ARGC) for option characters
+ given in OPTSTRING.
+
+ If an element of ARGV starts with '-', and is not exactly "-" or "--",
+ then it is an option element. The characters of this element
+ (aside from the initial '-') are option characters. If `getopt'
+ is called repeatedly, it returns successively each of the option characters
+ from each of the option elements.
+
+ If `getopt' finds another option character, it returns that character,
+ updating `optind' and `nextchar' so that the next call to `getopt' can
+ resume the scan with the following option character or ARGV-element.
+
+ If there are no more option characters, `getopt' returns `EOF'.
+ Then `optind' is the index in ARGV of the first ARGV-element
+ that is not an option. (The ARGV-elements have been permuted
+ so that those that are not options now come last.)
+
+ OPTSTRING is a string containing the legitimate option characters.
+ If an option character is seen that is not listed in OPTSTRING,
+ return BAD_OPTION after printing an error message. If you set `opterr' to
+ zero, the error message is suppressed but we still return BAD_OPTION.
+
+ If a char in OPTSTRING is followed by a colon, that means it wants an arg,
+ so the following text in the same ARGV-element, or the text of the following
+ ARGV-element, is returned in `optarg'. Two colons mean an option that
+ wants an optional arg; if there is text in the current ARGV-element,
+ it is returned in `optarg', otherwise `optarg' is set to zero.
+
+ If OPTSTRING starts with `-' or `+', it requests different methods of
+ handling the non-option ARGV-elements.
+ See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
+
+ Long-named options begin with `--' instead of `-'.
+ Their names may be abbreviated as long as the abbreviation is unique
+ or is an exact match for some defined option. If they have an
+ argument, it follows the option name in the same ARGV-element, separated
+ from the option name by a `=', or else the in next ARGV-element.
+ When `getopt' finds a long-named option, it returns 0 if that option's
+ `flag' field is nonzero, the value of the option's `val' field
+ if the `flag' field is zero.
+
+ The elements of ARGV aren't really const, because we permute them.
+ But we pretend they're const in the prototype to be compatible
+ with other systems.
+
+ LONGOPTS is a vector of `struct option' terminated by an
+ element containing a name which is zero.
+
+ LONGIND returns the index in LONGOPT of the long-named option found.
+ It is only valid when a long-named option has been found by the most
+ recent call.
+
+ If LONG_ONLY is nonzero, '-' as well as '--' can introduce
+ long-named options. */
+
+int
+_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
+ int argc;
+ char *const *argv;
+ const char *optstring;
+ const struct option *longopts;
+ int *longind;
+ int long_only;
+{
+ int option_index;
+
+ optarg = 0;
+
+ /* Initialize the internal data when the first call is made.
+ Start processing options with ARGV-element 1 (since ARGV-element 0
+ is the program name); the sequence of previously skipped
+ non-option ARGV-elements is empty. */
+
+ if (optind == 0)
+ {
+ first_nonopt = last_nonopt = optind = 1;
+
+ nextchar = NULL;
+
+ /* Determine how to handle the ordering of options and nonoptions. */
+
+ if (optstring[0] == '-')
+ {
+ ordering = RETURN_IN_ORDER;
+ ++optstring;
+ }
+ else if (optstring[0] == '+')
+ {
+ ordering = REQUIRE_ORDER;
+ ++optstring;
+ }
+ else if (getenv ("POSIXLY_CORRECT") != NULL)
+ ordering = REQUIRE_ORDER;
+ else
+ ordering = PERMUTE;
+ }
+
+ if (nextchar == NULL || *nextchar == '\0')
+ {
+ if (ordering == PERMUTE)
+ {
+ /* If we have just processed some options following some non-options,
+ exchange them so that the options come first. */
+
+ if (first_nonopt != last_nonopt && last_nonopt != optind)
+ exchange ((char **) argv);
+ else if (last_nonopt != optind)
+ first_nonopt = optind;
+
+ /* Now skip any additional non-options
+ and extend the range of non-options previously skipped. */
+
+ while (optind < argc
+ && (argv[optind][0] != '-' || argv[optind][1] == '\0')
+#ifdef GETOPT_COMPAT
+ && (longopts == NULL
+ || argv[optind][0] != '+' || argv[optind][1] == '\0')
+#endif /* GETOPT_COMPAT */
+ )
+ optind++;
+ last_nonopt = optind;
+ }
+
+ /* Special ARGV-element `--' means premature end of options.
+ Skip it like a null option,
+ then exchange with previous non-options as if it were an option,
+ then skip everything else like a non-option. */
+
+ if (optind != argc && !strcmp (argv[optind], "--"))
+ {
+ optind++;
+
+ if (first_nonopt != last_nonopt && last_nonopt != optind)
+ exchange ((char **) argv);
+ else if (first_nonopt == last_nonopt)
+ first_nonopt = optind;
+ last_nonopt = argc;
+
+ optind = argc;
+ }
+
+ /* If we have done all the ARGV-elements, stop the scan
+ and back over any non-options that we skipped and permuted. */
+
+ if (optind == argc)
+ {
+ /* Set the next-arg-index to point at the non-options
+ that we previously skipped, so the caller will digest them. */
+ if (first_nonopt != last_nonopt)
+ optind = first_nonopt;
+ return EOF;
+ }
+
+ /* If we have come to a non-option and did not permute it,
+ either stop the scan or describe it to the caller and pass it by. */
+
+ if ((argv[optind][0] != '-' || argv[optind][1] == '\0')
+#ifdef GETOPT_COMPAT
+ && (longopts == NULL
+ || argv[optind][0] != '+' || argv[optind][1] == '\0')
+#endif /* GETOPT_COMPAT */
+ )
+ {
+ if (ordering == REQUIRE_ORDER)
+ return EOF;
+ optarg = argv[optind++];
+ return 1;
+ }
+
+ /* We have found another option-ARGV-element.
+ Start decoding its characters. */
+
+ nextchar = (argv[optind] + 1
+ + (longopts != NULL && argv[optind][1] == '-'));
+ }
+
+ if (longopts != NULL
+ && ((argv[optind][0] == '-'
+ && (argv[optind][1] == '-' || long_only))
+#ifdef GETOPT_COMPAT
+ || argv[optind][0] == '+'
+#endif /* GETOPT_COMPAT */
+ ))
+ {
+ const struct option *p;
+ char *s = nextchar;
+ int exact = 0;
+ int ambig = 0;
+ const struct option *pfound = NULL;
+ int indfound = 0;
+
+ while (*s && *s != '=')
+ s++;
+
+ /* Test all options for either exact match or abbreviated matches. */
+ for (p = longopts, option_index = 0; p->name;
+ p++, option_index++)
+ if (!strncmp (p->name, nextchar, s - nextchar))
+ {
+ if (s - nextchar == my_strlen (p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ indfound = option_index;
+ exact = 1;
+ break;
+ }
+ else if (pfound == NULL)
+ {
+ /* First nonexact match found. */
+ pfound = p;
+ indfound = option_index;
+ }
+ else
+ /* Second nonexact match found. */
+ ambig = 1;
+ }
+
+ if (ambig && !exact)
+ {
+ if (opterr)
+ fprintf (stderr, "%s: option `%s' is ambiguous\n",
+ argv[0], argv[optind]);
+ nextchar += my_strlen (nextchar);
+ optind++;
+ return BAD_OPTION;
+ }
+
+ if (pfound != NULL)
+ {
+ option_index = indfound;
+ optind++;
+ if (*s)
+ {
+ /* Don't test has_arg with >, because some C compilers don't
+ allow it to be used on enums. */
+ if (pfound->has_arg)
+ optarg = s + 1;
+ else
+ {
+ if (opterr)
+ {
+ if (argv[optind - 1][1] == '-')
+ /* --option */
+ fprintf (stderr,
+ "%s: option `--%s' doesn't allow an argument\n",
+ argv[0], pfound->name);
+ else
+ /* +option or -option */
+ fprintf (stderr,
+ "%s: option `%c%s' doesn't allow an argument\n",
+ argv[0], argv[optind - 1][0], pfound->name);
+ }
+ nextchar += my_strlen (nextchar);
+ return BAD_OPTION;
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (optind < argc)
+ optarg = argv[optind++];
+ else
+ {
+ if (opterr)
+ fprintf (stderr, "%s: option `%s' requires an argument\n",
+ argv[0], argv[optind - 1]);
+ nextchar += my_strlen (nextchar);
+ return optstring[0] == ':' ? ':' : BAD_OPTION;
+ }
+ }
+ nextchar += my_strlen (nextchar);
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+ }
+ /* Can't find it as a long option. If this is not getopt_long_only,
+ or the option starts with '--' or is not a valid short
+ option, then it's an error.
+ Otherwise interpret it as a short option. */
+ if (!long_only || argv[optind][1] == '-'
+#ifdef GETOPT_COMPAT
+ || argv[optind][0] == '+'
+#endif /* GETOPT_COMPAT */
+ || my_index (optstring, *nextchar) == NULL)
+ {
+ if (opterr)
+ {
+ if (argv[optind][1] == '-')
+ /* --option */
+ fprintf (stderr, "%s: unrecognized option `--%s'\n",
+ argv[0], nextchar);
+ else
+ /* +option or -option */
+ fprintf (stderr, "%s: unrecognized option `%c%s'\n",
+ argv[0], argv[optind][0], nextchar);
+ }
+ nextchar = (char *) "";
+ optind++;
+ return BAD_OPTION;
+ }
+ }
+
+ /* Look at and handle the next option-character. */
+
+ {
+ char c = *nextchar++;
+ char *temp = my_index (optstring, c);
+
+ /* Increment `optind' when we start to process its last character. */
+ if (*nextchar == '\0')
+ ++optind;
+
+ if (temp == NULL || c == ':')
+ {
+ if (opterr)
+ {
+#if 0
+ if (c < 040 || c >= 0177)
+ fprintf (stderr, "%s: unrecognized option, character code 0%o\n",
+ argv[0], c);
+ else
+ fprintf (stderr, "%s: unrecognized option `-%c'\n", argv[0], c);
+#else
+ /* 1003.2 specifies the format of this message. */
+ fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c);
+#endif
+ }
+ optopt = c;
+ return BAD_OPTION;
+ }
+ if (temp[1] == ':')
+ {
+ if (temp[2] == ':')
+ {
+ /* This is an option that accepts an argument optionally. */
+ if (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ optind++;
+ }
+ else
+ optarg = 0;
+ nextchar = NULL;
+ }
+ else
+ {
+ /* This is an option that requires an argument. */
+ if (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ optind++;
+ }
+ else if (optind == argc)
+ {
+ if (opterr)
+ {
+#if 0
+ fprintf (stderr, "%s: option `-%c' requires an argument\n",
+ argv[0], c);
+#else
+ /* 1003.2 specifies the format of this message. */
+ fprintf (stderr, "%s: option requires an argument -- %c\n",
+ argv[0], c);
+#endif
+ }
+ optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = BAD_OPTION;
+ }
+ else
+ /* We already incremented `optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ optarg = argv[optind++];
+ nextchar = NULL;
+ }
+ }
+ return c;
+ }
+}
+
+int
+getopt (argc, argv, optstring)
+ int argc;
+ char *const *argv;
+ const char *optstring;
+{
+ return _getopt_internal (argc, argv, optstring,
+ (const struct option *) 0,
+ (int *) 0,
+ 0);
+}
+
+int
+getopt_long (argc, argv, options, long_options, opt_index)
+ int argc;
+ char *const *argv;
+ const char *options;
+ const struct option *long_options;
+ int *opt_index;
+{
+ return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
+}
+
+
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/getopt.h b/cesar/ecos/packages/kernel/current/tests_smp/getopt.h
new file mode 100644
index 0000000000..3c0b2930a6
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/getopt.h
@@ -0,0 +1,129 @@
+/* Declarations for getopt.
+ Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+//#define printf diag_printf
+
+#ifndef _GETOPT_H
+#define _GETOPT_H 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+extern char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+
+ On entry to `getopt', zero means this is the first call; initialize.
+
+ When `getopt' returns EOF, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+extern int optind;
+
+/* Callers store zero here to inhibit the error message `getopt' prints
+ for unrecognized options. */
+
+extern int opterr;
+
+/* Set to an option character which was unrecognized. */
+
+extern int optopt;
+
+/* Describe the long-named options requested by the application.
+ The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+ of `struct option' terminated by an element containing a name which is
+ zero.
+
+ The field `has_arg' is:
+ no_argument (or 0) if the option does not take an argument,
+ required_argument (or 1) if the option requires an argument,
+ optional_argument (or 2) if the option takes an optional argument.
+
+ If the field `flag' is not NULL, it points to a variable that is set
+ to the value given in the field `val' when the option is found, but
+ left unchanged if the option is not found.
+
+ To have a long-named option do something other than set an `int' to
+ a compiled-in constant, such as set a value from `optarg', set the
+ option's `flag' field to zero and its `val' field to a nonzero
+ value (the equivalent single-letter option character, if there is
+ one). For long options that have a zero `flag' field, `getopt'
+ returns the contents of the `val' field. */
+
+struct option
+{
+#if __STDC__
+ const char *name;
+#else
+ char *name;
+#endif
+ /* has_arg can't be an enum because some compilers complain about
+ type mismatches in all the code that assumes it is an int. */
+ int has_arg;
+ int *flag;
+ int val;
+};
+
+/* Names for the values of the `has_arg' field of `struct option'. */
+
+#define no_argument 0
+#define required_argument 1
+#define optional_argument 2
+
+#if __STDC__ || defined(PROTO)
+#if defined(__GNU_LIBRARY__)
+/* Many other libraries have conflicting prototypes for getopt, with
+ differences in the consts, in stdlib.h. To avoid compilation
+ errors, only prototype getopt for the GNU C library. */
+extern int getopt (int argc, char *const *argv, const char *shortopts);
+#endif /* not __GNU_LIBRARY__ */
+extern int getopt_long (int argc, char *const *argv, const char *shortopts,
+ const struct option *longopts, int *longind);
+extern int getopt_long_only (int argc, char *const *argv,
+ const char *shortopts,
+ const struct option *longopts, int *longind);
+
+/* Internal only. Users should not call this directly. */
+extern int _getopt_internal (int argc, char *const *argv,
+ const char *shortopts,
+ const struct option *longopts, int *longind,
+ int long_only);
+#else /* not __STDC__ */
+extern int getopt ();
+extern int getopt_long ();
+extern int getopt_long_only ();
+
+extern int _getopt_internal ();
+#endif /* not __STDC__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GETOPT_H */
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/lu.C b/cesar/ecos/packages/kernel/current/tests_smp/lu.C
new file mode 100644
index 0000000000..9a46678260
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/lu.C
@@ -0,0 +1,788 @@
+/*************************************************************************/
+/* */
+/* Copyright (c) 1994 Stanford University */
+/* */
+/* All rights reserved. */
+/* */
+/* Permission is given to use, copy, and modify this software for any */
+/* non-commercial purpose as long as this copyright notice is not */
+/* removed. All other uses, including redistribution in whole or in */
+/* part, are forbidden without prior written permission. */
+/* */
+/* This software is provided with absolutely no warranty and no */
+/* support. */
+/* */
+/*************************************************************************/
+
+/*************************************************************************/
+/* */
+/* Parallel dense blocked LU factorization (no pivoting) */
+/* */
+/* This version contains one dimensional arrays in which the matrix */
+/* to be factored is stored. */
+/* */
+/* Command line options: */
+/* */
+/* -nN : Decompose NxN matrix. */
+/* -pP : P = number of processors. */
+/* -bB : Use a block size of B. BxB elements should fit in cache for */
+/* good performance. Small block sizes (B=8, B=16) work well. */
+/* -s : Print individual processor timing statistics. */
+/* -t : Test output. */
+/* -o : Print out matrix values. */
+/* -h : Print out command line options. */
+/* */
+/* Note: This version works under both the FORK and SPROC models */
+/* */
+/*************************************************************************/
+
+#include <stdio.h>
+#include <math.h>
+#include <stdlib.h>
+#include <tests_smp/getopt.h>
+
+#include <tests_smp/lu_arg.c>
+
+MAIN_ENV
+
+#define MAXRAND 2147483647
+#define DEFAULT_N 128
+#define DEFAULT_P 1
+#define DEFAULT_B 16
+#define min(a,b) ((a) < (b) ? (a) : (b))
+
+struct GlobalMemory {
+ double *t_in_fac;
+ double *t_in_solve;
+ double *t_in_mod;
+ double *t_in_bar;
+ double *completion;
+ unsigned int starttime;
+ unsigned int rf;
+ unsigned int rs;
+ unsigned int done;
+ int id;
+ BARDEC(start)
+ LOCKDEC(idlock)
+} *Global;
+
+struct LocalCopies {
+ double t_in_fac;
+ double t_in_solve;
+ double t_in_mod;
+ double t_in_bar;
+};
+
+int dbg_on = 0;
+int n = DEFAULT_N; /* The size of the matrix */
+int P = DEFAULT_P; /* Number of processors */
+int block_size = DEFAULT_B; /* Block dimension */
+int nblocks; /* Number of blocks in each dimension */
+int num_rows; /* Number of processors per row of processor grid */
+int num_cols; /* Number of processors per col of processor grid */
+double *a; /* a = lu; l and u both placed back in a */
+double *rhs;
+int *proc_bytes; /* Bytes to malloc per processor to hold blocks
+ of A*/
+int test_result = 0; /* Test result of factorization? */
+int doprint = 0; /* Print out matrix values? */
+int dostats = 0; /* Print out individual processor statistics? */
+
+void SlaveStart();
+void OneSolve(int, int, double *, int, int);
+void lu0(double *,int, int);
+void bdiv(double *, double *, int, int, int, int);
+void bmodd(double *, double*, int, int, int, int);
+void bmod(double *, double *, double *, int, int, int, int);
+void daxpy(double *, double *, int, double);
+int BlockOwner(int, int);
+void lu(int, int, int, struct LocalCopies *, int);
+void InitA(double *);
+double TouchA(int, int);
+void PrintA();
+void CheckResult(int, double *, double *);
+void printerr(char *);
+volatile cyg_thread *thread_array[64];
+
+
+int smp_cyg_test_main(argc, argv)
+
+int argc;
+char **argv;
+
+{
+ int i, j;
+ int ch;
+ extern char *optarg;
+ int MyNum=0;
+ double mint, maxt, avgt;
+ double min_fac, min_solve, min_mod, min_bar;
+ double max_fac, max_solve, max_mod, max_bar;
+ double avg_fac, avg_solve, avg_mod, avg_bar;
+ int proc_num;
+ unsigned int start;
+
+ memset (thread_array,0,sizeof(thread_array));
+
+ CLOCK(start);
+
+ while ((ch = getopt(argc, argv, "n:p:b:cstoh")) != -1) {
+ switch(ch) {
+ case 'n': n = atoi(optarg); break;
+ case 'p': P = atoi(optarg);
+ P = HAL_SMP_CPU_MAX; break;
+ case 'b': block_size = atoi(optarg); break;
+ case 's': dostats = 1; break;
+ case 't': test_result = !test_result; break;
+ case 'o': doprint = !doprint; break;
+ case 'h': diag_printf("Usage: LU <options>\n\n");
+ diag_printf("options:\n");
+ diag_printf(" -nN : Decompose NxN matrix.\n");
+ diag_printf(" -pP : P = number of processors.\n");
+ diag_printf(" -bB : Use a block size of B. BxB elements should fit in cache for \n");
+ diag_printf(" good performance. Small block sizes (B=8, B=16) work well.\n");
+ diag_printf(" -c : Copy non-locally allocated blocks to local memory before use.\n");
+ diag_printf(" -s : Print individual processor timing statistics.\n");
+ diag_printf(" -t : Test output.\n");
+ diag_printf(" -o : Print out matrix values.\n");
+ diag_printf(" -h : Print out command line options.\n\n");
+ diag_printf("Default: LU -n%1d -p%1d -b%1d\n",
+ DEFAULT_N,DEFAULT_P,DEFAULT_B);
+ exit(0);
+ break;
+ }
+ }
+ if (P > 64) {
+ printf("Maximal 64 processes\n");
+ exit(0);
+ }
+
+ MAIN_INITENV(,150000000)
+
+ diag_printf("\n");
+ diag_printf("Blocked Dense LU Factorization\n");
+ diag_printf(" %d by %d Matrix\n",n,n);
+ diag_printf(" %d Processors\n",P);
+ diag_printf(" %d by %d Element Blocks\n",block_size,block_size);
+ diag_printf("\n");
+ diag_printf("\n");
+
+ num_rows = (int) sqrt((double) P);
+ for (;;) {
+ num_cols = P/num_rows;
+ if (num_rows*num_cols == P)
+ break;
+ num_rows--;
+ }
+ nblocks = n/block_size;
+ if (block_size * nblocks != n) {
+ nblocks++;
+ }
+
+ a = (double *) G_MALLOC(n*n*sizeof(double));
+ rhs = (double *) G_MALLOC(n*sizeof(double));
+
+ Global = (struct GlobalMemory *) G_MALLOC(sizeof(struct GlobalMemory));
+ Global->t_in_fac = (double *) G_MALLOC(P*sizeof(double));
+ Global->t_in_mod = (double *) G_MALLOC(P*sizeof(double));
+ Global->t_in_solve = (double *) G_MALLOC(P*sizeof(double));
+ Global->t_in_bar = (double *) G_MALLOC(P*sizeof(double));
+ Global->completion = (double *) G_MALLOC(P*sizeof(double));
+
+ if (Global == NULL) {
+ printerr("Could not malloc memory for Global\n");
+ exit(-1);
+ } else if (Global->t_in_fac == NULL) {
+ printerr("Could not malloc memory for Global->t_in_fac\n");
+ exit(-1);
+ } else if (Global->t_in_mod == NULL) {
+ printerr("Could not malloc memory for Global->t_in_mod\n");
+ exit(-1);
+ } else if (Global->t_in_solve == NULL) {
+ printerr("Could not malloc memory for Global->t_in_solve\n");
+ exit(-1);
+ } else if (Global->t_in_bar == NULL) {
+ printerr("Could not malloc memory for Global->t_in_bar\n");
+ exit(-1);
+ } else if (Global->completion == NULL) {
+ printerr("Could not malloc memory for Global->completion\n");
+ exit(-1);
+ }
+
+/* POSSIBLE ENHANCEMENT: Here is where one might distribute the a
+ matrix data across physically distributed memories in a
+ round-robin fashion as desired. */
+
+ BARINIT(Global->start);
+ LOCKINIT(Global->idlock);
+ Global->id = 0;
+
+ for (i=1; i<P; i++) {
+ CREATE(SlaveStart,thread_array[i])
+ }
+
+ InitA(rhs);
+ if (doprint) {
+ diag_printf("Matrix before decomposition:\n");
+ PrintA();
+ }
+
+
+ SlaveStart(MyNum);
+
+ for (i=1; i<P; i++) {
+ while(thread_array[i]) {};
+ }
+
+ if (doprint) {
+ diag_printf("\nMatrix after decomposition:\n");
+ PrintA();
+ }
+
+ if (dostats) {
+ maxt = avgt = mint = Global->completion[0];
+ for (i=1; i<P; i++) {
+ if (Global->completion[i] > maxt) {
+ maxt = Global->completion[i];
+ }
+ if (Global->completion[i] < mint) {
+ mint = Global->completion[i];
+ }
+ avgt += Global->completion[i];
+ }
+ avgt = avgt / P;
+
+ min_fac = max_fac = avg_fac = Global->t_in_fac[0];
+ min_solve = max_solve = avg_solve = Global->t_in_solve[0];
+ min_mod = max_mod = avg_mod = Global->t_in_mod[0];
+ min_bar = max_bar = avg_bar = Global->t_in_bar[0];
+
+ for (i=1; i<P; i++) {
+ if (Global->t_in_fac[i] > max_fac) {
+ max_fac = Global->t_in_fac[i];
+ }
+ if (Global->t_in_fac[i] < min_fac) {
+ min_fac = Global->t_in_fac[i];
+ }
+ if (Global->t_in_solve[i] > max_solve) {
+ max_solve = Global->t_in_solve[i];
+ }
+ if (Global->t_in_solve[i] < min_solve) {
+ min_solve = Global->t_in_solve[i];
+ }
+ if (Global->t_in_mod[i] > max_mod) {
+ max_mod = Global->t_in_mod[i];
+ }
+ if (Global->t_in_mod[i] < min_mod) {
+ min_mod = Global->t_in_mod[i];
+ }
+ if (Global->t_in_bar[i] > max_bar) {
+ max_bar = Global->t_in_bar[i];
+ }
+ if (Global->t_in_bar[i] < min_bar) {
+ min_bar = Global->t_in_bar[i];
+ }
+ avg_fac += Global->t_in_fac[i];
+ avg_solve += Global->t_in_solve[i];
+ avg_mod += Global->t_in_mod[i];
+ avg_bar += Global->t_in_bar[i];
+ }
+ avg_fac = avg_fac/P;
+ avg_solve = avg_solve/P;
+ avg_mod = avg_mod/P;
+ avg_bar = avg_bar/P;
+ }
+ diag_printf(" PROCESS STATISTICS\n");
+ diag_printf(" Total Diagonal Perimeter Interior Barrier\n");
+ diag_printf(" Proc Time Time Time Time Time\n");
+ diag_printf(" 0 %10.0f %10.0f %10.0f %10.0f %10.0f\n",
+ Global->completion[0],Global->t_in_fac[0],
+ Global->t_in_solve[0],Global->t_in_mod[0],
+ Global->t_in_bar[0]);
+ if (dostats) {
+ for (i=1; i<P; i++) {
+ diag_printf(" %3d %10.0f %10.0f %10.0f %10.0f %10.0f\n",
+ i,Global->completion[i],Global->t_in_fac[i],
+ Global->t_in_solve[i],Global->t_in_mod[i],
+ Global->t_in_bar[i]);
+ }
+ diag_printf(" Avg %10.0f %10.0f %10.0f %10.0f %10.0f\n",
+ avgt,avg_fac,avg_solve,avg_mod,avg_bar);
+ diag_printf(" Min %10.0f %10.0f %10.0f %10.0f %10.0f\n",
+ mint,min_fac,min_solve,min_mod,min_bar);
+ diag_printf(" Max %10.0f %10.0f %10.0f %10.0f %10.0f\n",
+ maxt,max_fac,max_solve,max_mod,max_bar);
+ }
+ diag_printf("\n");
+ Global->starttime = start;
+ diag_printf(" TIMING INFORMATION\n");
+ diag_printf("Start time : %16d\n",
+ Global->starttime);
+ diag_printf("Initialization finish time : %16d\n",
+ Global->rs);
+ diag_printf("Overall finish time : %16d\n",
+ Global->rf);
+ diag_printf("Total time with initialization : %16d\n",
+ Global->rf-Global->starttime);
+ diag_printf("Total time without initialization : %16d\n",
+ Global->rf-Global->rs);
+ diag_printf("\n");
+
+ if (test_result) {
+ diag_printf(" TESTING RESULTS\n");
+ CheckResult(n, a, rhs);
+ }
+
+ MAIN_END;
+}
+
+void SlaveStart()
+
+{
+ int i;
+ int j;
+ int cluster;
+ int max_block;
+ int MyNum;
+
+ LOCK(Global->idlock)
+ MyNum = Global->id;
+ Global->id ++;
+ UNLOCK(Global->idlock)
+
+/* POSSIBLE ENHANCEMENT: Here is where one might pin processes to
+ processors to avoid migration */
+
+ diag_printf("Slave start\n");
+
+ OneSolve(n, block_size, a, MyNum, dostats);
+
+ thread_array[MyNum] = 0;
+
+}
+
+
+void OneSolve(n, block_size, a, MyNum, dostats)
+
+double *a;
+int n;
+int block_size;
+int MyNum;
+int dostats;
+
+{
+ unsigned int i;
+ unsigned int myrs;
+ unsigned int myrf;
+ unsigned int mydone;
+ struct LocalCopies *lc;
+
+ lc = (struct LocalCopies *) malloc(sizeof(struct LocalCopies));
+ if (lc == NULL) {
+ diag_printf("Proc %d could not malloc memory for lc\n",MyNum);
+ exit(-1);
+ }
+ lc->t_in_fac = 0.0;
+ lc->t_in_solve = 0.0;
+ lc->t_in_mod = 0.0;
+ lc->t_in_bar = 0.0;
+
+ /* barrier to ensure all initialization is done */
+ BARRIER(Global->start, P, 1);
+
+ /* to remove cold-start misses, all processors begin by touching a[] */
+ TouchA(block_size, MyNum);
+
+ BARRIER(Global->start, P, 2);
+
+/* POSSIBLE ENHANCEMENT: Here is where one might reset the
+ statistics that one is measuring about the parallel execution */
+
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(myrs);
+ }
+
+ diag_printf("Start calc\n");
+ lu(n, block_size, MyNum, lc, dostats);
+ diag_printf("End calc\n");
+
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(mydone);
+ }
+
+ BARRIER(Global->start, P, 3);
+
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(myrf);
+ Global->t_in_fac[MyNum] = lc->t_in_fac;
+ Global->t_in_solve[MyNum] = lc->t_in_solve;
+ Global->t_in_mod[MyNum] = lc->t_in_mod;
+ Global->t_in_bar[MyNum] = lc->t_in_bar;
+ Global->completion[MyNum] = mydone-myrs;
+ }
+ if (MyNum == 0) {
+ Global->rs = myrs;
+ Global->done = mydone;
+ Global->rf = myrf;
+ }
+}
+
+
+void lu0(a, n, stride)
+
+double *a;
+int n;
+int stride;
+
+{
+ int j;
+ int k;
+ int length;
+ double alpha;
+
+ for (k=0; k<n; k++) {
+ /* modify subsequent columns */
+ for (j=k+1; j<n; j++) {
+ a[k+j*stride] /= a[k+k*stride];
+ alpha = -a[k+j*stride];
+ length = n-k-1;
+ daxpy(&a[k+1+j*stride], &a[k+1+k*stride], n-k-1, alpha);
+ }
+ }
+}
+
+
+void bdiv(a, diag, stride_a, stride_diag, dimi, dimk)
+
+double *a;
+double *diag;
+int stride_a;
+int stride_diag;
+int dimi;
+int dimk;
+
+{
+ int j;
+ int k;
+ double alpha;
+
+ for (k=0; k<dimk; k++) {
+ for (j=k+1; j<dimk; j++) {
+ alpha = -diag[k+j*stride_diag];
+ daxpy(&a[j*stride_a], &a[k*stride_a], dimi, alpha);
+ }
+ }
+}
+
+
+void bmodd(a, c, dimi, dimj, stride_a, stride_c)
+
+double *a;
+double *c;
+int dimi;
+int dimj;
+int stride_a;
+int stride_c;
+
+{
+ int i;
+ int j;
+ int k;
+ int length;
+ double alpha;
+
+ for (k=0; k<dimi; k++)
+ for (j=0; j<dimj; j++) {
+ c[k+j*stride_c] /= a[k+k*stride_a];
+ alpha = -c[k+j*stride_c];
+ length = dimi - k - 1;
+ daxpy(&c[k+1+j*stride_c], &a[k+1+k*stride_a], dimi-k-1, alpha);
+ }
+}
+
+
+void bmod(a, b, c, dimi, dimj, dimk, stride)
+
+double *a;
+double *b;
+double *c;
+int dimi;
+int dimj;
+int dimk;
+int stride;
+
+{
+ int i;
+ int j;
+ int k;
+ double alpha;
+
+ for (k=0; k<dimk; k++) {
+ for (j=0; j<dimj; j++) {
+ alpha = -b[k+j*stride];
+ daxpy(&c[j*stride], &a[k*stride], dimi, alpha);
+ }
+ }
+}
+
+
+void daxpy(a, b, n, alpha)
+
+double *a;
+double *b;
+double alpha;
+int n;
+
+{
+ int i;
+
+ for (i=0; i<n; i++) {
+ a[i] += alpha*b[i];
+ }
+}
+
+
+int BlockOwner(I, J)
+
+int I;
+int J;
+
+{
+ return((I%num_cols) + (J%num_rows)*num_cols);
+}
+
+
+void lu(n, bs, MyNum, lc, dostats)
+
+int n;
+int bs;
+int MyNum;
+struct LocalCopies *lc;
+int dostats;
+
+{
+ int i, il, j, jl, k, kl;
+ int I, J, K;
+ double *A, *B, *C, *D;
+ int dimI, dimJ, dimK;
+ int strI;
+ unsigned int t1, t2, t3, t4, t11, t22;
+ int diagowner;
+ int colowner;
+
+ strI = n;
+ for (k=0, K=0; k<n; k+=bs, K++) {
+ kl = k+bs;
+ if (kl>n) {
+ kl = n;
+ }
+
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(t1);
+ }
+
+ /* factor diagonal block */
+ diagowner = BlockOwner(K, K);
+ if (diagowner == MyNum) {
+ A = &(a[k+k*n]);
+ lu0(A, kl-k, strI);
+ }
+
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(t11);
+ }
+
+ BARRIER(Global->start, P, 4);
+
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(t2);
+ }
+
+ /* divide column k by diagonal block */
+ D = &(a[k+k*n]);
+ for (i=kl, I=K+1; i<n; i+=bs, I++) {
+ if (BlockOwner(I, K) == MyNum) { /* parcel out blocks */
+ il = i + bs;
+ if (il > n) {
+ il = n;
+ }
+ A = &(a[i+k*n]);
+ bdiv(A, D, strI, n, il-i, kl-k);
+ }
+ }
+ /* modify row k by diagonal block */
+ for (j=kl, J=K+1; j<n; j+=bs, J++) {
+ if (BlockOwner(K, J) == MyNum) { /* parcel out blocks */
+ jl = j+bs;
+ if (jl > n) {
+ jl = n;
+ }
+ A = &(a[k+j*n]);
+ bmodd(D, A, kl-k, jl-j, n, strI);
+ }
+ }
+
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(t22);
+ }
+
+ BARRIER(Global->start, P, 5);
+
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(t3);
+ }
+
+ /* modify subsequent block columns */
+ for (i=kl, I=K+1; i<n; i+=bs, I++) {
+ il = i+bs;
+ if (il > n) {
+ il = n;
+ }
+ colowner = BlockOwner(I,K);
+ A = &(a[i+k*n]);
+ for (j=kl, J=K+1; j<n; j+=bs, J++) {
+ jl = j + bs;
+ if (jl > n) {
+ jl = n;
+ }
+ if (BlockOwner(I, J) == MyNum) { /* parcel out blocks */
+ B = &(a[k+j*n]);
+ C = &(a[i+j*n]);
+ bmod(A, B, C, il-i, jl-j, kl-k, n);
+ }
+ }
+ }
+ if ((MyNum == 0) || (dostats)) {
+ CLOCK(t4);
+ lc->t_in_fac += (t11-t1);
+ lc->t_in_solve += (t22-t2);
+ lc->t_in_mod += (t4-t3);
+ lc->t_in_bar += (t2-t11) + (t3-t22);
+ }
+ }
+}
+
+
+void InitA(rhs)
+
+double *rhs;
+
+{
+ int i, j;
+
+ srand(1);
+ for (j=0; j<n; j++) {
+ for (i=0; i<n; i++) {
+ a[i+j*n] = (double) rand()/MAXRAND;
+ if (i == j) {
+ a[i+j*n] *= 10;
+ }
+ }
+ }
+
+ for (j=0; j<n; j++) {
+ rhs[j] = 0.0;
+ }
+ for (j=0; j<n; j++) {
+ for (i=0; i<n; i++) {
+ rhs[i] += a[i+j*n];
+ }
+ }
+}
+
+
+double TouchA(bs, MyNum)
+
+int bs;
+int MyNum;
+
+{
+ int i, j, I, J;
+ double tot = 0.0;
+
+ for (J=0; J*bs<n; J++) {
+ for (I=0; I*bs<n; I++) {
+ if (BlockOwner(I, J) == MyNum) {
+ for (j=J*bs; j<(J+1)*bs && j<n; j++) {
+ for (i=I*bs; i<(I+1)*bs && i<n; i++) {
+ tot += a[i+j*n];
+ }
+ }
+ }
+ }
+ }
+ return(tot);
+}
+
+
+void PrintA()
+{
+ int i, j;
+
+ for (i=0; i<n; i++) {
+ for (j=0; j<n; j++) {
+ diag_printf("%8.1f ", a[i+j*n]);
+ }
+ diag_printf("\n");
+ }
+}
+
+
+void CheckResult(n, a, rhs)
+
+int n;
+double *a;
+double *rhs;
+
+{
+ int i, j, bogus = 0;
+ double *y, diff, max_diff;
+
+ y = (double *) malloc(n*sizeof(double));
+ if (y == NULL) {
+ printerr("Could not malloc memory for y\n");
+ exit(-1);
+ }
+ for (j=0; j<n; j++) {
+ y[j] = rhs[j];
+ }
+ for (j=0; j<n; j++) {
+ y[j] = y[j]/a[j+j*n];
+ for (i=j+1; i<n; i++) {
+ y[i] -= a[i+j*n]*y[j];
+ }
+ }
+
+ for (j=n-1; j>=0; j--) {
+ for (i=0; i<j; i++) {
+ y[i] -= a[i+j*n]*y[j];
+ }
+ }
+
+ max_diff = 0.0;
+ for (j=0; j<n; j++) {
+ diff = y[j] - 1.0;
+ if (fabs(diff) > 0.00001) {
+ bogus = 1;
+ max_diff = diff;
+ }
+ }
+ if (bogus) {
+ diag_printf("TEST FAILED: (%.5f diff)\n", max_diff);
+ } else {
+ diag_printf("TEST PASSED\n");
+ }
+ free(y);
+}
+
+
+void printerr(s)
+
+char *s;
+
+{
+ diag_printf("ERROR: %s\n",s);
+}
+
+
+#include <tests_smp/getopt.c>
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/lu.c b/cesar/ecos/packages/kernel/current/tests_smp/lu.c
new file mode 100644
index 0000000000..9527c41ab3
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/lu.c
@@ -0,0 +1,1118 @@
+
+
+
+
+
+
+
+
+
+
+
+/*************************************************************************/
+/* */
+/* Copyright (c) 1994 Stanford University */
+/* */
+/* All rights reserved. */
+/* */
+/* Permission is given to use, copy, and modify this software for any */
+/* non-commercial purpose as long as this copyright notice is not */
+/* removed. All other uses, including redistribution in whole or in */
+/* part, are forbidden without prior written permission. */
+/* */
+/* This software is provided with absolutely no warranty and no */
+/* support. */
+/* */
+/*************************************************************************/
+
+/*************************************************************************/
+/* */
+/* Parallel dense blocked LU factorization (no pivoting) */
+/* */
+/* This version contains one dimensional arrays in which the matrix */
+/* to be factored is stored. */
+/* */
+/* Command line options: */
+/* */
+/* -nN : Decompose NxN matrix. */
+/* -pP : P = number of processors. */
+/* -bB : Use a block size of B. BxB elements should fit in cache for */
+/* good performance. Small block sizes (B=8, B=16) work well. */
+/* -s : Print individual processor timing statistics. */
+/* -t : Test output. */
+/* -o : Print out matrix values. */
+/* -h : Print out command line options. */
+/* */
+/* Note: This version works under both the FORK and SPROC models */
+/* */
+/*************************************************************************/
+
+#include <stdio.h>
+#include <math.h>
+#include <stdlib.h>
+#include <tests_smp/getopt.h>
+
+#include <tests_smp/lu_arg.c>
+
+
+/*---------------------------------------*/
+#include <pkgconf/system.h>
+#include <pkgconf/infra.h>
+#include <pkgconf/kernel.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/testcase.h>
+#include <pkgconf/isoinfra.h>
+#include <cyg/hal/hal_cache.h>
+#include <cyg/hal/hal_smp.h>
+#include <cyg/kernel/kapi.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+int smp_cyg_test_main(int argc, char **argv);
+
+void smp_cyg_test_main_call(void *p) {
+ smp_cyg_test_main(smp_cyg_test_argc, smp_cyg_test_argv);
+}
+
+
+/* #define STACK_SIZE 0x1b000 */
+#define STACK_SIZE 8192
+static cyg_thread smp_cyg_test_thread;
+static char smp_cyg_test_stack[STACK_SIZE];
+static cyg_handle_t smp_cyg_test_threadh;
+
+
+
+cyg_handle_t threadh[64];
+char *stack[64];
+cyg_thread thread[64];
+
+
+externC void cyg_user_start( void )
+{
+ CYG_TEST_INIT();
+
+ diag_printf("Starting test app\n");
+
+ cyg_thread_create(10, // Priority - just a number
+ smp_cyg_test_main_call, // entry
+ 0, // index
+ "smp test", // Name
+ smp_cyg_test_stack, // Stack
+ STACK_SIZE, // Size
+ &smp_cyg_test_threadh, // Handle
+ &smp_cyg_test_thread // Thread data structure
+ );
+ cyg_thread_resume( smp_cyg_test_threadh );
+ /*cyg_scheduler_start();*/
+}
+
+
+/*---------------------------------------*/
+
+
+#define MAXRAND 2147483647
+#define DEFAULT_N 128
+#define DEFAULT_P 1
+#define DEFAULT_B 16
+#define min(a,b) ((a) < (b) ? (a) : (b))
+
+struct GlobalMemory {
+ double *t_in_fac;
+ double *t_in_solve;
+ double *t_in_mod;
+ double *t_in_bar;
+ double *completion;
+ unsigned int starttime;
+ unsigned int rf;
+ unsigned int rs;
+ unsigned int done;
+ int id;
+
+/*---------------------------------------*/
+struct startTYP {
+ cyg_spinlock_t lock;;
+ int count[1];
+ cyg_sem_t queue[1];;
+
+ } start[1];
+/*---------------------------------------*/
+
+
+ cyg_spinlock_t idlock;
+} *Global;
+
+struct LocalCopies {
+ double t_in_fac;
+ double t_in_solve;
+ double t_in_mod;
+ double t_in_bar;
+};
+
+int dbg_on = 0;
+int n = DEFAULT_N; /* The size of the matrix */
+int P = DEFAULT_P; /* Number of processors */
+int block_size = DEFAULT_B; /* Block dimension */
+int nblocks; /* Number of blocks in each dimension */
+int num_rows; /* Number of processors per row of processor grid */
+int num_cols; /* Number of processors per col of processor grid */
+double *a; /* a = lu; l and u both placed back in a */
+double *rhs;
+int *proc_bytes; /* Bytes to malloc per processor to hold blocks
+ of A*/
+int test_result = 0; /* Test result of factorization? */
+int doprint = 0; /* Print out matrix values? */
+int dostats = 0; /* Print out individual processor statistics? */
+
+void SlaveStart();
+void OneSolve(int, int, double *, int, int);
+void lu0(double *,int, int);
+void bdiv(double *, double *, int, int, int, int);
+void bmodd(double *, double*, int, int, int, int);
+void bmod(double *, double *, double *, int, int, int, int);
+void daxpy(double *, double *, int, double);
+int BlockOwner(int, int);
+void lu(int, int, int, struct LocalCopies *, int);
+void InitA(double *);
+double TouchA(int, int);
+void PrintA();
+void CheckResult(int, double *, double *);
+void printerr(char *);
+volatile cyg_thread *thread_array[64];
+
+
+int smp_cyg_test_main(argc, argv)
+
+int argc;
+char **argv;
+
+{
+ int i, j;
+ int ch;
+ extern char *optarg;
+ int MyNum=0;
+ double mint, maxt, avgt;
+ double min_fac, min_solve, min_mod, min_bar;
+ double max_fac, max_solve, max_mod, max_bar;
+ double avg_fac, avg_solve, avg_mod, avg_bar;
+ int proc_num;
+ unsigned int start;
+
+ memset (thread_array,0,sizeof(thread_array));
+
+ {
+ (start) = cyg_current_time()*10;
+}
+;
+
+ while ((ch = getopt(argc, argv, "n:p:b:cstoh")) != -1) {
+ switch(ch) {
+ case 'n': n = atoi(optarg); break;
+ case 'p': P = atoi(optarg);
+ P = HAL_SMP_CPU_MAX; break;
+ case 'b': block_size = atoi(optarg); break;
+ case 's': dostats = 1; break;
+ case 't': test_result = !test_result; break;
+ case 'o': doprint = !doprint; break;
+ case 'h': diag_printf("Usage: LU <options>\n\n");
+ diag_printf("options:\n");
+ diag_printf(" -nN : Decompose NxN matrix.\n");
+ diag_printf(" -pP : P = number of processors.\n");
+ diag_printf(" -bB : Use a block size of B. BxB elements should fit in cache for \n");
+ diag_printf(" good performance. Small block sizes (B=8, B=16) work well.\n");
+ diag_printf(" -c : Copy non-locally allocated blocks to local memory before use.\n");
+ diag_printf(" -s : Print individual processor timing statistics.\n");
+ diag_printf(" -t : Test output.\n");
+ diag_printf(" -o : Print out matrix values.\n");
+ diag_printf(" -h : Print out command line options.\n\n");
+ diag_printf("Default: LU -n%1d -p%1d -b%1d\n",
+ DEFAULT_N,DEFAULT_P,DEFAULT_B);
+ exit(0);
+ break;
+ }
+ }
+ if (P > 64) {
+ printf("Maximal 64 processes\n");
+ exit(0);
+ }
+
+ {;}
+
+ diag_printf("\n");
+ diag_printf("Blocked Dense LU Factorization\n");
+ diag_printf(" %d by %d Matrix\n",n,n);
+ diag_printf(" %d Processors\n",P);
+ diag_printf(" %d by %d Element Blocks\n",block_size,block_size);
+ diag_printf("\n");
+ diag_printf("\n");
+
+ num_rows = (int) sqrt((double) P);
+ for (;;) {
+ num_cols = P/num_rows;
+ if (num_rows*num_cols == P)
+ break;
+ num_rows--;
+ }
+ nblocks = n/block_size;
+ if (block_size * nblocks != n) {
+ nblocks++;
+ }
+
+ a = (double *) calloc(n*n*sizeof(double), 1);;
+ rhs = (double *) calloc(n*sizeof(double), 1);;
+
+ Global = (struct GlobalMemory *) calloc(sizeof(struct GlobalMemory), 1);;
+ Global->t_in_fac = (double *) calloc(P*sizeof(double), 1);;
+ Global->t_in_mod = (double *) calloc(P*sizeof(double), 1);;
+ Global->t_in_solve = (double *) calloc(P*sizeof(double), 1);;
+ Global->t_in_bar = (double *) calloc(P*sizeof(double), 1);;
+ Global->completion = (double *) calloc(P*sizeof(double), 1);;
+
+ if (Global == NULL) {
+ printerr("Could not malloc memory for Global\n");
+ exit(-1);
+ } else if (Global->t_in_fac == NULL) {
+ printerr("Could not malloc memory for Global->t_in_fac\n");
+ exit(-1);
+ } else if (Global->t_in_mod == NULL) {
+ printerr("Could not malloc memory for Global->t_in_mod\n");
+ exit(-1);
+ } else if (Global->t_in_solve == NULL) {
+ printerr("Could not malloc memory for Global->t_in_solve\n");
+ exit(-1);
+ } else if (Global->t_in_bar == NULL) {
+ printerr("Could not malloc memory for Global->t_in_bar\n");
+ exit(-1);
+ } else if (Global->completion == NULL) {
+ printerr("Could not malloc memory for Global->completion\n");
+ exit(-1);
+ }
+
+/* POSSIBLE ENHANCEMENT: Here is where one might distribute the a
+ matrix data across physically distributed memories in a
+ round-robin fashion as desired. */
+
+ {{
+/*---------------------------------------*/
+ int mon_dum1,mon_dum2;
+ for (mon_dum1=0; mon_dum1 < 1; mon_dum1++)
+ for (mon_dum2=0; mon_dum2 < 1; mon_dum2++) {
+ Global->start[mon_dum1].count[mon_dum2] = 0;
+ { cyg_semaphore_init(&Global->start[mon_dum1].queue[mon_dum2],0);};
+ }
+ for (mon_dum1=0; mon_dum1 < 1; mon_dum1++) {
+ cyg_spinlock_init( &Global->start[mon_dum1].lock,0 );;
+ }
+/*---------------------------------------*/
+}};
+ cyg_spinlock_init( &Global->idlock,0 );;
+ Global->id = 0;
+
+ for (i=1; i<P; i++) {
+
+{
+ /*---------------------------------------*/
+ stack[i] = calloc(STACK_SIZE, 1);
+ cyg_thread_create(10, // Priority - just a number
+ SlaveStart, // entry
+ 0, // index
+ "slave", // Name
+ stack[i], // Stack
+ STACK_SIZE, // Size
+ &threadh[i], // Handle
+ &thread[i] // Thread data structure
+ );
+ cyg_thread_resume( threadh[i] );
+ /*---------------------------------------*/
+}
+
+ }
+
+ InitA(rhs);
+ if (doprint) {
+ diag_printf("Matrix before decomposition:\n");
+ PrintA();
+ }
+
+
+ SlaveStart(MyNum);
+
+ for (i=1; i<P; i++) {
+ while(thread_array[i]) {};
+ }
+
+ if (doprint) {
+ diag_printf("\nMatrix after decomposition:\n");
+ PrintA();
+ }
+
+ if (dostats) {
+ maxt = avgt = mint = Global->completion[0];
+ for (i=1; i<P; i++) {
+ if (Global->completion[i] > maxt) {
+ maxt = Global->completion[i];
+ }
+ if (Global->completion[i] < mint) {
+ mint = Global->completion[i];
+ }
+ avgt += Global->completion[i];
+ }
+ avgt = avgt / P;
+
+ min_fac = max_fac = avg_fac = Global->t_in_fac[0];
+ min_solve = max_solve = avg_solve = Global->t_in_solve[0];
+ min_mod = max_mod = avg_mod = Global->t_in_mod[0];
+ min_bar = max_bar = avg_bar = Global->t_in_bar[0];
+
+ for (i=1; i<P; i++) {
+ if (Global->t_in_fac[i] > max_fac) {
+ max_fac = Global->t_in_fac[i];
+ }
+ if (Global->t_in_fac[i] < min_fac) {
+ min_fac = Global->t_in_fac[i];
+ }
+ if (Global->t_in_solve[i] > max_solve) {
+ max_solve = Global->t_in_solve[i];
+ }
+ if (Global->t_in_solve[i] < min_solve) {
+ min_solve = Global->t_in_solve[i];
+ }
+ if (Global->t_in_mod[i] > max_mod) {
+ max_mod = Global->t_in_mod[i];
+ }
+ if (Global->t_in_mod[i] < min_mod) {
+ min_mod = Global->t_in_mod[i];
+ }
+ if (Global->t_in_bar[i] > max_bar) {
+ max_bar = Global->t_in_bar[i];
+ }
+ if (Global->t_in_bar[i] < min_bar) {
+ min_bar = Global->t_in_bar[i];
+ }
+ avg_fac += Global->t_in_fac[i];
+ avg_solve += Global->t_in_solve[i];
+ avg_mod += Global->t_in_mod[i];
+ avg_bar += Global->t_in_bar[i];
+ }
+ avg_fac = avg_fac/P;
+ avg_solve = avg_solve/P;
+ avg_mod = avg_mod/P;
+ avg_bar = avg_bar/P;
+ }
+ diag_printf(" PROCESS STATISTICS\n");
+ diag_printf(" Total Diagonal Perimeter Interior Barrier\n");
+ diag_printf(" Proc Time Time Time Time Time\n");
+ diag_printf(" 0 %10.0f %10.0f %10.0f %10.0f %10.0f\n",
+ Global->completion[0],Global->t_in_fac[0],
+ Global->t_in_solve[0],Global->t_in_mod[0],
+ Global->t_in_bar[0]);
+ if (dostats) {
+ for (i=1; i<P; i++) {
+ diag_printf(" %3d %10.0f %10.0f %10.0f %10.0f %10.0f\n",
+ i,Global->completion[i],Global->t_in_fac[i],
+ Global->t_in_solve[i],Global->t_in_mod[i],
+ Global->t_in_bar[i]);
+ }
+ diag_printf(" Avg %10.0f %10.0f %10.0f %10.0f %10.0f\n",
+ avgt,avg_fac,avg_solve,avg_mod,avg_bar);
+ diag_printf(" Min %10.0f %10.0f %10.0f %10.0f %10.0f\n",
+ mint,min_fac,min_solve,min_mod,min_bar);
+ diag_printf(" Max %10.0f %10.0f %10.0f %10.0f %10.0f\n",
+ maxt,max_fac,max_solve,max_mod,max_bar);
+ }
+ diag_printf("\n");
+ Global->starttime = start;
+ diag_printf(" TIMING INFORMATION\n");
+ diag_printf("Start time : %16d\n",
+ Global->starttime);
+ diag_printf("Initialization finish time : %16d\n",
+ Global->rs);
+ diag_printf("Overall finish time : %16d\n",
+ Global->rf);
+ diag_printf("Total time with initialization : %16d\n",
+ Global->rf-Global->starttime);
+ diag_printf("Total time without initialization : %16d\n",
+ Global->rf-Global->rs);
+ diag_printf("\n");
+
+ if (test_result) {
+ diag_printf(" TESTING RESULTS\n");
+ CheckResult(n, a, rhs);
+ }
+
+
+{
+ diag_printf("FP test end\n");
+ return 0;
+}
+;
+}
+
+void SlaveStart()
+
+{
+ int i;
+ int j;
+ int cluster;
+ int max_block;
+ int MyNum;
+
+ cyg_spinlock_spin(&Global->idlock);
+ MyNum = Global->id;
+ Global->id ++;
+ cyg_spinlock_clear(&Global->idlock);
+
+/* POSSIBLE ENHANCEMENT: Here is where one might pin processes to
+ processors to avoid migration */
+
+ diag_printf("Slave start\n");
+
+ OneSolve(n, block_size, a, MyNum, dostats);
+
+ thread_array[MyNum] = 0;
+
+}
+
+
+void OneSolve(n, block_size, a, MyNum, dostats)
+
+double *a;
+int n;
+int block_size;
+int MyNum;
+int dostats;
+
+{
+ unsigned int i;
+ unsigned int myrs;
+ unsigned int myrf;
+ unsigned int mydone;
+ struct LocalCopies *lc;
+
+ lc = (struct LocalCopies *) malloc(sizeof(struct LocalCopies));
+ if (lc == NULL) {
+ diag_printf("Proc %d could not malloc memory for lc\n",MyNum);
+ exit(-1);
+ }
+ lc->t_in_fac = 0.0;
+ lc->t_in_solve = 0.0;
+ lc->t_in_mod = 0.0;
+ lc->t_in_bar = 0.0;
+
+ /* barrier to ensure all initialization is done */
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( Global->start[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),1,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] < (P -1) ) {
+ Global->start[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),1,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&Global->start[0].lock );;
+ { cyg_semaphore_wait(&Global->start[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),1,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),1,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&Global->start[0].lock );;
+
+ } else {
+ ( Global->start[0].count[0] )-- ;
+ //cyg_spinlock_clear(&Global->start[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),1,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&Global->start[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+};
+
+ /* to remove cold-start misses, all processors begin by touching a[] */
+ TouchA(block_size, MyNum);
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( Global->start[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),2,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] < (P -1) ) {
+ Global->start[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),2,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&Global->start[0].lock );;
+ { cyg_semaphore_wait(&Global->start[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),2,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),2,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&Global->start[0].lock );;
+
+ } else {
+ ( Global->start[0].count[0] )-- ;
+ //cyg_spinlock_clear(&Global->start[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),2,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&Global->start[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+};
+
+/* POSSIBLE ENHANCEMENT: Here is where one might reset the
+ statistics that one is measuring about the parallel execution */
+
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (myrs) = cyg_current_time()*10;
+}
+;
+ }
+
+ diag_printf("Start calc\n");
+ lu(n, block_size, MyNum, lc, dostats);
+ diag_printf("End calc\n");
+
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (mydone) = cyg_current_time()*10;
+}
+;
+ }
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( Global->start[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),3,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] < (P -1) ) {
+ Global->start[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),3,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&Global->start[0].lock );;
+ { cyg_semaphore_wait(&Global->start[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),3,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),3,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&Global->start[0].lock );;
+
+ } else {
+ ( Global->start[0].count[0] )-- ;
+ //cyg_spinlock_clear(&Global->start[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),3,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&Global->start[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+};
+
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (myrf) = cyg_current_time()*10;
+}
+;
+ Global->t_in_fac[MyNum] = lc->t_in_fac;
+ Global->t_in_solve[MyNum] = lc->t_in_solve;
+ Global->t_in_mod[MyNum] = lc->t_in_mod;
+ Global->t_in_bar[MyNum] = lc->t_in_bar;
+ Global->completion[MyNum] = mydone-myrs;
+ }
+ if (MyNum == 0) {
+ Global->rs = myrs;
+ Global->done = mydone;
+ Global->rf = myrf;
+ }
+}
+
+
+void lu0(a, n, stride)
+
+double *a;
+int n;
+int stride;
+
+{
+ int j;
+ int k;
+ int length;
+ double alpha;
+
+ for (k=0; k<n; k++) {
+ /* modify subsequent columns */
+ for (j=k+1; j<n; j++) {
+ a[k+j*stride] /= a[k+k*stride];
+ alpha = -a[k+j*stride];
+ length = n-k-1;
+ daxpy(&a[k+1+j*stride], &a[k+1+k*stride], n-k-1, alpha);
+ }
+ }
+}
+
+
+void bdiv(a, diag, stride_a, stride_diag, dimi, dimk)
+
+double *a;
+double *diag;
+int stride_a;
+int stride_diag;
+int dimi;
+int dimk;
+
+{
+ int j;
+ int k;
+ double alpha;
+
+ for (k=0; k<dimk; k++) {
+ for (j=k+1; j<dimk; j++) {
+ alpha = -diag[k+j*stride_diag];
+ daxpy(&a[j*stride_a], &a[k*stride_a], dimi, alpha);
+ }
+ }
+}
+
+
+void bmodd(a, c, dimi, dimj, stride_a, stride_c)
+
+double *a;
+double *c;
+int dimi;
+int dimj;
+int stride_a;
+int stride_c;
+
+{
+ int i;
+ int j;
+ int k;
+ int length;
+ double alpha;
+
+ for (k=0; k<dimi; k++)
+ for (j=0; j<dimj; j++) {
+ c[k+j*stride_c] /= a[k+k*stride_a];
+ alpha = -c[k+j*stride_c];
+ length = dimi - k - 1;
+ daxpy(&c[k+1+j*stride_c], &a[k+1+k*stride_a], dimi-k-1, alpha);
+ }
+}
+
+
+void bmod(a, b, c, dimi, dimj, dimk, stride)
+
+double *a;
+double *b;
+double *c;
+int dimi;
+int dimj;
+int dimk;
+int stride;
+
+{
+ int i;
+ int j;
+ int k;
+ double alpha;
+
+ for (k=0; k<dimk; k++) {
+ for (j=0; j<dimj; j++) {
+ alpha = -b[k+j*stride];
+ daxpy(&c[j*stride], &a[k*stride], dimi, alpha);
+ }
+ }
+}
+
+
+void daxpy(a, b, n, alpha)
+
+double *a;
+double *b;
+double alpha;
+int n;
+
+{
+ int i;
+
+ for (i=0; i<n; i++) {
+ a[i] += alpha*b[i];
+ }
+}
+
+
+int BlockOwner(I, J)
+
+int I;
+int J;
+
+{
+ return((I%num_cols) + (J%num_rows)*num_cols);
+}
+
+
+void lu(n, bs, MyNum, lc, dostats)
+
+int n;
+int bs;
+int MyNum;
+struct LocalCopies *lc;
+int dostats;
+
+{
+ int i, il, j, jl, k, kl;
+ int I, J, K;
+ double *A, *B, *C, *D;
+ int dimI, dimJ, dimK;
+ int strI;
+ unsigned int t1, t2, t3, t4, t11, t22;
+ int diagowner;
+ int colowner;
+
+ strI = n;
+ for (k=0, K=0; k<n; k+=bs, K++) {
+ kl = k+bs;
+ if (kl>n) {
+ kl = n;
+ }
+
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (t1) = cyg_current_time()*10;
+}
+;
+ }
+
+ /* factor diagonal block */
+ diagowner = BlockOwner(K, K);
+ if (diagowner == MyNum) {
+ A = &(a[k+k*n]);
+ lu0(A, kl-k, strI);
+ }
+
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (t11) = cyg_current_time()*10;
+}
+;
+ }
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( Global->start[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),4,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] < (P -1) ) {
+ Global->start[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),4,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&Global->start[0].lock );;
+ { cyg_semaphore_wait(&Global->start[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),4,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),4,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&Global->start[0].lock );;
+
+ } else {
+ ( Global->start[0].count[0] )-- ;
+ //cyg_spinlock_clear(&Global->start[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),4,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&Global->start[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+};
+
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (t2) = cyg_current_time()*10;
+}
+;
+ }
+
+ /* divide column k by diagonal block */
+ D = &(a[k+k*n]);
+ for (i=kl, I=K+1; i<n; i+=bs, I++) {
+ if (BlockOwner(I, K) == MyNum) { /* parcel out blocks */
+ il = i + bs;
+ if (il > n) {
+ il = n;
+ }
+ A = &(a[i+k*n]);
+ bdiv(A, D, strI, n, il-i, kl-k);
+ }
+ }
+ /* modify row k by diagonal block */
+ for (j=kl, J=K+1; j<n; j+=bs, J++) {
+ if (BlockOwner(K, J) == MyNum) { /* parcel out blocks */
+ jl = j+bs;
+ if (jl > n) {
+ jl = n;
+ }
+ A = &(a[k+j*n]);
+ bmodd(D, A, kl-k, jl-j, n, strI);
+ }
+ }
+
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (t22) = cyg_current_time()*10;
+}
+;
+ }
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( Global->start[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),5,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] < (P -1) ) {
+ Global->start[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),5,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&Global->start[0].lock );;
+ { cyg_semaphore_wait(&Global->start[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),5,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ if ( Global->start[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),5,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&Global->start[0].lock );;
+
+ } else {
+ ( Global->start[0].count[0] )-- ;
+ //cyg_spinlock_clear(&Global->start[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),5,Global->start[0].count[0],Global->start[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&Global->start[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+};
+
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (t3) = cyg_current_time()*10;
+}
+;
+ }
+
+ /* modify subsequent block columns */
+ for (i=kl, I=K+1; i<n; i+=bs, I++) {
+ il = i+bs;
+ if (il > n) {
+ il = n;
+ }
+ colowner = BlockOwner(I,K);
+ A = &(a[i+k*n]);
+ for (j=kl, J=K+1; j<n; j+=bs, J++) {
+ jl = j + bs;
+ if (jl > n) {
+ jl = n;
+ }
+ if (BlockOwner(I, J) == MyNum) { /* parcel out blocks */
+ B = &(a[k+j*n]);
+ C = &(a[i+j*n]);
+ bmod(A, B, C, il-i, jl-j, kl-k, n);
+ }
+ }
+ }
+ if ((MyNum == 0) || (dostats)) {
+ {
+ (t4) = cyg_current_time()*10;
+}
+;
+ lc->t_in_fac += (t11-t1);
+ lc->t_in_solve += (t22-t2);
+ lc->t_in_mod += (t4-t3);
+ lc->t_in_bar += (t2-t11) + (t3-t22);
+ }
+ }
+}
+
+
+void InitA(rhs)
+
+double *rhs;
+
+{
+ int i, j;
+
+ srand(1);
+ for (j=0; j<n; j++) {
+ for (i=0; i<n; i++) {
+ a[i+j*n] = (double) rand()/MAXRAND;
+ if (i == j) {
+ a[i+j*n] *= 10;
+ }
+ }
+ }
+
+ for (j=0; j<n; j++) {
+ rhs[j] = 0.0;
+ }
+ for (j=0; j<n; j++) {
+ for (i=0; i<n; i++) {
+ rhs[i] += a[i+j*n];
+ }
+ }
+}
+
+
+double TouchA(bs, MyNum)
+
+int bs;
+int MyNum;
+
+{
+ int i, j, I, J;
+ double tot = 0.0;
+
+ for (J=0; J*bs<n; J++) {
+ for (I=0; I*bs<n; I++) {
+ if (BlockOwner(I, J) == MyNum) {
+ for (j=J*bs; j<(J+1)*bs && j<n; j++) {
+ for (i=I*bs; i<(I+1)*bs && i<n; i++) {
+ tot += a[i+j*n];
+ }
+ }
+ }
+ }
+ }
+ return(tot);
+}
+
+
+void PrintA()
+{
+ int i, j;
+
+ for (i=0; i<n; i++) {
+ for (j=0; j<n; j++) {
+ diag_printf("%8.1f ", a[i+j*n]);
+ }
+ diag_printf("\n");
+ }
+}
+
+
+void CheckResult(n, a, rhs)
+
+int n;
+double *a;
+double *rhs;
+
+{
+ int i, j, bogus = 0;
+ double *y, diff, max_diff;
+
+ y = (double *) malloc(n*sizeof(double));
+ if (y == NULL) {
+ printerr("Could not malloc memory for y\n");
+ exit(-1);
+ }
+ for (j=0; j<n; j++) {
+ y[j] = rhs[j];
+ }
+ for (j=0; j<n; j++) {
+ y[j] = y[j]/a[j+j*n];
+ for (i=j+1; i<n; i++) {
+ y[i] -= a[i+j*n]*y[j];
+ }
+ }
+
+ for (j=n-1; j>=0; j--) {
+ for (i=0; i<j; i++) {
+ y[i] -= a[i+j*n]*y[j];
+ }
+ }
+
+ max_diff = 0.0;
+ for (j=0; j<n; j++) {
+ diff = y[j] - 1.0;
+ if (fabs(diff) > 0.00001) {
+ bogus = 1;
+ max_diff = diff;
+ }
+ }
+ if (bogus) {
+ diag_printf("TEST FAILED: (%.5f diff)\n", max_diff);
+ } else {
+ diag_printf("TEST PASSED\n");
+ }
+ free(y);
+}
+
+
+void printerr(s)
+
+char *s;
+
+{
+ diag_printf("ERROR: %s\n",s);
+}
+
+
+#include <tests_smp/getopt.c>
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/lu_arg.c b/cesar/ecos/packages/kernel/current/tests_smp/lu_arg.c
new file mode 100644
index 0000000000..fb02575185
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/lu_arg.c
@@ -0,0 +1,12 @@
+//___________________________________________
+#define _str_HAL_SMP_CPU_MAX(x) #x
+#define smp_cyg_test_argc 5
+char *_cyg_argv[] = {
+ "fft.exe",
+ "-p",
+ "2", /* not used, using HAL_SMP_CPU_MAX */
+ "-n",
+ "64"
+};
+#define smp_cyg_test_argv &_cyg_argv
+//'''''''''''''''''''''''''''''''''''''''''''
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/makefile b/cesar/ecos/packages/kernel/current/tests_smp/makefile
new file mode 100644
index 0000000000..2c6df8b3d8
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/makefile
@@ -0,0 +1,13 @@
+MACROS = c.m4.ecos
+
+all: fft.c radix.c lu.c
+
+fft.c: fft.C $(MACROS)
+ m4 $(MACROS) fft.C > fft.c
+
+radix.c: radix.C $(MACROS)
+ m4 $(MACROS) radix.C > radix.c
+
+lu.c: lu.C $(MACROS)
+ m4 $(MACROS) lu.C > lu.c
+
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/radix.C b/cesar/ecos/packages/kernel/current/tests_smp/radix.C
new file mode 100644
index 0000000000..b23dd6d356
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/radix.C
@@ -0,0 +1,909 @@
+/*************************************************************************/
+/* */
+/* Copyright (c) 1994 Stanford University */
+/* */
+/* All rights reserved. */
+/* */
+/* Permission is given to use, copy, and modify this software for any */
+/* non-commercial purpose as long as this copyright notice is not */
+/* removed. All other uses, including redistribution in whole or in */
+/* part, are forbidden without prior written permission. */
+/* */
+/* This software is provided with absolutely no warranty and no */
+/* support. */
+/* */
+/*************************************************************************/
+
+/*************************************************************************/
+/* */
+/* Integer radix sort of non-negative integers. */
+/* */
+/* Command line options: */
+/* */
+/* -pP : P = number of processors. */
+/* -rR : R = radix for sorting. Must be power of 2. */
+/* -nN : N = number of keys to sort. */
+/* -mM : M = maximum key value. Integer keys k will be generated such */
+/* that 0 <= k <= M. */
+/* -s : Print individual processor timing statistics. */
+/* -t : Check to make sure all keys are sorted correctly. */
+/* -o : Print out sorted keys. */
+/* -h : Print out command line options. */
+/* */
+/* Default: RADIX -p1 -n262144 -r1024 -m524288 */
+/* */
+/* Note: This version works under both the FORK and SPROC models */
+/* */
+/*************************************************************************/
+
+#include <stdio.h>
+#include <math.h>
+#include <tests_smp/getopt.h>
+
+#define DEFAULT_P 1
+#define DEFAULT_N 262144
+#define DEFAULT_R 1024
+#define DEFAULT_M 524288
+#define MAX_PROCESSORS 64
+#define RADIX_S 8388608.0e0
+#define RADIX 70368744177664.0e0
+#define SEED 314159265.0e0
+#define RATIO 1220703125.0e0
+#define PAGE_SIZE 4096
+#define PAGE_MASK (~(PAGE_SIZE-1))
+#define MAX_RADIX 4096
+
+#include <tests_smp/radix_arg.c>
+
+MAIN_ENV
+
+struct prefix_node {
+ int densities[MAX_RADIX];
+ int ranks[MAX_RADIX];
+ PAUSEDEC(done)
+ char pad[PAGE_SIZE];
+};
+
+struct global_memory {
+ int Index; /* process ID */
+ LOCKDEC(lock_Index) /* for fetch and add to get ID */
+ LOCKDEC(rank_lock) /* for fetch and add to get ID */
+ ALOCKDEC(section_lock,MAX_PROCESSORS) /* key locks */
+ BARDEC(barrier_rank) /* for ranking process */
+ BARDEC(barrier_key) /* for key sorting process */
+ double *ranktime;
+ double *sorttime;
+ double *totaltime;
+ int final;
+ unsigned int starttime;
+ unsigned int rs;
+ unsigned int rf;
+ struct prefix_node prefix_tree[2 * MAX_PROCESSORS];
+} *global;
+
+struct global_private {
+ char pad[PAGE_SIZE];
+ int *rank_ff; /* overall processor ranks */
+} gp[MAX_PROCESSORS];
+
+int *key[2]; /* sort from one index into the other */
+int **rank_me; /* individual processor ranks */
+int *key_partition; /* keys a processor works on */
+int *rank_partition; /* ranks a processor works on */
+
+int number_of_processors = DEFAULT_P;
+int max_num_digits;
+int radix = DEFAULT_R;
+int num_keys = DEFAULT_N;
+int max_key = DEFAULT_M;
+int log2_radix;
+int log2_keys;
+int dostats = 0;
+int test_result = 0;
+int doprint = 0;
+volatile cyg_thread *thread_array[64];
+
+int dbg_on = 0;
+double ran_num_init(unsigned int,double,double);
+double product_mod_46(double,double);
+int get_max_digits(int);
+int get_log2_radix(int);
+int get_log2_keys(int);
+void slave_sort();
+int log_2(int);
+void printerr(char *);
+void init(int,int,int);
+void test_sort(int);
+void printout();
+
+
+int smp_cyg_test_main(argc, argv)
+
+int argc;
+char **argv;
+
+{
+ int i;
+ int p;
+ int quotient;
+ int remainder;
+ int sum_i;
+ int sum_f;
+ int mistake=0;
+ int size;
+ int **temp;
+ int **temp2;
+ int *a;
+ int c;
+ int n1;
+ extern char *optarg;
+ double mint, maxt, avgt;
+ double minrank, maxrank, avgrank;
+ double minsort, maxsort, avgsort;
+ unsigned int start;
+ int done = 0;
+ int start_p;
+ int end_p;
+ int level;
+ int index;
+ int base;
+ int offset;
+ int toffset;
+
+
+ memset (thread_array,0,sizeof(thread_array));
+
+ CLOCK(start)
+
+ while ((c = getopt(argc, argv, "p:r:n:m:stoh")) != -1) {
+ switch(c) {
+ case 'p': number_of_processors = atoi(optarg);
+ number_of_processors = HAL_SMP_CPU_MAX;
+ if (number_of_processors < 1) {
+ printerr("P must be >= 1\n");
+ exit(-1);
+ }
+ if (number_of_processors > MAX_PROCESSORS) {
+ printerr("Maximum processors (MAX_PROCESSORS) exceeded\n");
+ exit(-1);
+ }
+ break;
+ case 'r': radix = atoi(optarg);
+ if (radix < 1) {
+ printerr("Radix must be a power of 2 greater than 0\n");
+ exit(-1);
+ }
+ log2_radix = log_2(radix);
+ if (log2_radix == -1) {
+ printerr("Radix must be a power of 2\n");
+ exit(-1);
+ }
+ break;
+ case 'n': num_keys = atoi(optarg);
+ if (num_keys < 1) {
+ printerr("Number of keys must be >= 1\n");
+ exit(-1);
+ }
+ break;
+ case 'm': max_key = atoi(optarg);
+ if (max_key < 1) {
+ printerr("Maximum key must be >= 1\n");
+ exit(-1);
+ }
+ break;
+ case 's': dostats = !dostats;
+ break;
+ case 't': test_result = !test_result;
+ break;
+ case 'o': doprint = !doprint;
+ break;
+ case 'h': diag_printf("Usage: RADIX <options>\n\n");
+ diag_printf(" -pP : P = number of processors.\n");
+ diag_printf(" -rR : R = radix for sorting. Must be power of 2.\n");
+ diag_printf(" -nN : N = number of keys to sort.\n");
+ diag_printf(" -mM : M = maximum key value. Integer keys k will be generated such\n");
+ diag_printf(" that 0 <= k <= M.\n");
+ diag_printf(" -s : Print individual processor timing statistics.\n");
+ diag_printf(" -t : Check to make sure all keys are sorted correctly.\n");
+ diag_printf(" -o : Print out sorted keys.\n");
+ diag_printf(" -h : Print out command line options.\n\n");
+ diag_printf("Default: RADIX -p%1d -n%1d -r%1d -m%1d\n",
+ DEFAULT_P,DEFAULT_N,DEFAULT_R,DEFAULT_M);
+ exit(0);
+ }
+ }
+
+ if (number_of_processors > 64) {
+ printf("Maximal 64 processes\n");
+ exit(0);
+ }
+
+ MAIN_INITENV(,80000000)
+
+ log2_radix = log_2(radix);
+ log2_keys = log_2(num_keys);
+ global = (struct global_memory *) G_MALLOC(sizeof(struct global_memory))
+ key[0] = (int *) G_MALLOC(num_keys*sizeof(int));
+ key[1] = (int *) G_MALLOC(num_keys*sizeof(int));
+ key_partition = (int *) G_MALLOC((number_of_processors+1)*sizeof(int));
+ rank_partition = (int *) G_MALLOC((number_of_processors+1)*sizeof(int));
+
+ if ((global == NULL)) {
+ diag_printf("ERROR: Cannot malloc enough memory %d\n",sizeof(struct global_memory));
+ }
+
+ global->ranktime = (double *) G_MALLOC(number_of_processors*sizeof(double));
+ global->sorttime = (double *) G_MALLOC(number_of_processors*sizeof(double));
+ global->totaltime = (double *) G_MALLOC(number_of_processors*sizeof(double));
+ size = number_of_processors*(radix*sizeof(int)+sizeof(int *));
+ rank_me = (int **) G_MALLOC(size);
+
+ if ((global == NULL) || (key[0] == NULL) || (key[1] == NULL) ||
+ (key_partition == NULL) || (rank_partition == NULL) ||
+ (rank_me == NULL)) {
+ diag_printf("ERROR: Cannot malloc enough memory\n");
+ exit(-1);
+ }
+
+ temp = rank_me;
+ temp2 = temp + number_of_processors;
+ a = (int *) temp2;
+ for (i=0;i<number_of_processors;i++) {
+ *temp = (int *) a;
+ temp++;
+ a += radix;
+ }
+ for (i=0;i<number_of_processors;i++) {
+ gp[i].rank_ff = (int *) G_MALLOC(radix*sizeof(int)+PAGE_SIZE);
+ }
+ LOCKINIT(global->lock_Index)
+ LOCKINIT(global->rank_lock)
+ ALOCKINIT(global->section_lock,MAX_PROCESSORS)
+ BARINIT(global->barrier_rank)
+ BARINIT(global->barrier_key)
+
+ for (i=0; i<2*number_of_processors; i++) {
+ PAUSEINIT(global->prefix_tree[i].done);
+ }
+
+ global->Index = 0;
+ max_num_digits = get_max_digits(max_key);
+ diag_printf("\n");
+ diag_printf("Integer Radix Sort\n");
+ diag_printf(" %d Keys\n",num_keys);
+ diag_printf(" %d Processors\n",number_of_processors);
+ diag_printf(" Radix = %d\n",radix);
+ diag_printf(" Max key = %d\n",max_key);
+ diag_printf("\n");
+
+ quotient = num_keys / number_of_processors;
+ remainder = num_keys % number_of_processors;
+ sum_i = 0;
+ sum_f = 0;
+ p = 0;
+ diag_printf("key_partition\n",max_key);
+ while (sum_i < num_keys) {
+ key_partition[p] = sum_i;
+ p++;
+ sum_i = sum_i + quotient;
+ sum_f = sum_f + remainder;
+ sum_i = sum_i + sum_f / number_of_processors;
+ sum_f = sum_f % number_of_processors;
+ }
+ key_partition[p] = num_keys;
+
+ quotient = radix / number_of_processors;
+ remainder = radix % number_of_processors;
+ sum_i = 0;
+ sum_f = 0;
+ p = 0;
+ diag_printf("rank_partition\n",max_key);
+ while (sum_i < radix) {
+ rank_partition[p] = sum_i;
+ p++;
+ sum_i = sum_i + quotient;
+ sum_f = sum_f + remainder;
+ sum_i = sum_i + sum_f / number_of_processors;
+ sum_f = sum_f % number_of_processors;
+ }
+ rank_partition[p] = radix;
+
+/* POSSIBLE ENHANCEMENT: Here is where one might distribute the key,
+ rank_me, rank, and gp data structures across physically
+ distributed memories as desired.
+
+ One way to place data is as follows:
+
+ for (i=0;i<number_of_processors;i++) {
+ Place all addresses x such that:
+ &(key[0][key_partition[i]]) <= x < &(key[0][key_partition[i+1]])
+ on node i
+ &(key[1][key_partition[i]]) <= x < &(key[1][key_partition[i+1]])
+ on node i
+ &(rank_me[i][0]) <= x < &(rank_me[i][radix-1]) on node i
+ &(gp[i]) <= x < &(gp[i+1]) on node i
+ &(gp[i].rank_ff[0]) <= x < &(gp[i].rank_ff[radix]) on node i
+ }
+ start_p = 0;
+ i = 0;
+
+ for (toffset = 0; toffset < number_of_processors; toffset ++) {
+ offset = toffset;
+ level = number_of_processors >> 1;
+ base = number_of_processors;
+ while ((offset & 0x1) != 0) {
+ offset >>= 1;
+ index = base + offset;
+ Place all addresses x such that:
+ &(global->prefix_tree[index]) <= x <
+ &(global->prefix_tree[index + 1]) on node toffset
+ base += level;
+ level >>= 1;
+ }
+ } */
+
+ /* Fill the random-number array. */
+
+ for (i = 1; i < number_of_processors; i++) {
+ CREATE(slave_sort,thread_array[i])
+ }
+
+ slave_sort();
+
+ for (i = 1; i < number_of_processors; i++) {
+ while(thread_array[i]) {};
+ }
+
+ diag_printf("\n");
+ diag_printf(" PROCESS STATISTICS\n");
+ diag_printf(" Total Rank Sort\n");
+ diag_printf(" Proc Time Time Time\n");
+ diag_printf(" 0 %10.0f %10.0f %10.0f\n",
+ global->totaltime[0],global->ranktime[0],
+ global->sorttime[0]);
+ if (dostats) {
+ maxt = avgt = mint = global->totaltime[0];
+ maxrank = avgrank = minrank = global->ranktime[0];
+ maxsort = avgsort = minsort = global->sorttime[0];
+ for (i=1; i<number_of_processors; i++) {
+ if (global->totaltime[i] > maxt) {
+ maxt = global->totaltime[i];
+ }
+ if (global->totaltime[i] < mint) {
+ mint = global->totaltime[i];
+ }
+ if (global->ranktime[i] > maxrank) {
+ maxrank = global->ranktime[i];
+ }
+ if (global->ranktime[i] < minrank) {
+ minrank = global->ranktime[i];
+ }
+ if (global->sorttime[i] > maxsort) {
+ maxsort = global->sorttime[i];
+ }
+ if (global->sorttime[i] < minsort) {
+ minsort = global->sorttime[i];
+ }
+ avgt += global->totaltime[i];
+ avgrank += global->ranktime[i];
+ avgsort += global->sorttime[i];
+ }
+ avgt = avgt / number_of_processors;
+ avgrank = avgrank / number_of_processors;
+ avgsort = avgsort / number_of_processors;
+ for (i=1; i<number_of_processors; i++) {
+ diag_printf(" %3d %10.0f %10.0f %10.0f\n",
+ i,global->totaltime[i],global->ranktime[i],
+ global->sorttime[i]);
+ }
+ diag_printf(" Avg %10.0f %10.0f %10.0f\n",avgt,avgrank,avgsort);
+ diag_printf(" Min %10.0f %10.0f %10.0f\n",mint,minrank,minsort);
+ diag_printf(" Max %10.0f %10.0f %10.0f\n",maxt,maxrank,maxsort);
+ diag_printf("\n");
+ }
+
+ diag_printf("\n");
+ global->starttime = start;
+ diag_printf(" TIMING INFORMATION\n");
+ diag_printf("Start time : %16d\n",
+ global->starttime);
+ diag_printf("Initialization finish time : %16d\n",
+ global->rs);
+ diag_printf("Overall finish time : %16d\n",
+ global->rf);
+ diag_printf("Total time with initialization : %16d\n",
+ global->rf-global->starttime);
+ diag_printf("Total time without initialization : %16d\n",
+ global->rf-global->rs);
+ diag_printf("\n");
+
+ if (doprint) {
+ printout();
+ }
+ if (test_result) {
+ test_sort(global->final);
+ }
+
+ MAIN_END;
+}
+
+void slave_sort()
+{
+ int i, j, k, kk, Ind;
+ int MyNum;
+ int this_key;
+ int tmp;
+ int last_key;
+ int loopnum;
+ double ran_num;
+ double sum;
+ int shiftnum;
+ int bb;
+ int my_key;
+ int key_start;
+ int key_stop;
+ int rank_start;
+ int rank_stop;
+ int from=0;
+ int to=1;
+ int *key_density; /* individual processor key densities */
+ unsigned int time1;
+ unsigned int time2;
+ unsigned int time3;
+ unsigned int time4;
+ unsigned int time5;
+ unsigned int time6;
+ double ranktime=0;
+ double sorttime=0;
+ int *key_from;
+ int *key_to;
+ int *rank_me_mynum;
+ int *rank_me_i;
+ int *rank_ff_mynum;
+ int stats;
+ struct prefix_node* n;
+ struct prefix_node* r;
+ struct prefix_node* l;
+ struct prefix_node* my_node;
+ struct prefix_node* their_node;
+ volatile int* prefx;
+ int index;
+ int level;
+ int base;
+ int offset;
+
+ diag_printf("SlaveSort %d\n",cyg_hal_get_current_threadid());
+
+ stats = dostats;
+
+ LOCK(global->lock_Index)
+ MyNum = global->Index;
+ global->Index++;
+ UNLOCK(global->lock_Index)
+
+/* POSSIBLE ENHANCEMENT: Here is where one might pin processes to
+ processors to avoid migration */
+
+ key_density = (int *) malloc(radix*sizeof(int));
+
+ /* Fill the random-number array. */
+
+ key_start = key_partition[MyNum];
+ key_stop = key_partition[MyNum + 1];
+ rank_start = rank_partition[MyNum];
+ rank_stop = rank_partition[MyNum + 1];
+ if (rank_stop == radix) {
+ rank_stop--;
+ }
+
+ diag_printf("init %d, %d-%d\n",cyg_hal_get_current_threadid(),key_start,key_stop);
+ init(key_start,key_stop,from);
+
+ BARRIER(global->barrier_key, number_of_processors, 1 )
+
+/* POSSIBLE ENHANCEMENT: Here is where one might reset the
+ statistics that one is measuring about the parallel execution */
+
+ BARRIER(global->barrier_key, number_of_processors, 2)
+
+ if ((MyNum == 0) || (stats)) {
+ CLOCK(time1)
+ }
+
+/* Do 1 iteration per digit. */
+
+ rank_me_mynum = rank_me[MyNum];
+ rank_ff_mynum = gp[MyNum].rank_ff;
+ for (loopnum=0;loopnum<max_num_digits;loopnum++) {
+ shiftnum = (loopnum * log2_radix);
+ bb = (radix-1) << shiftnum;
+
+/* generate histograms based on one digit */
+
+ if ((MyNum == 0) || (stats)) {
+ CLOCK(time2)
+ }
+
+ for (i = 0; i < radix; i++) {
+ rank_me_mynum[i] = 0;
+ }
+ key_from = (int *) key[from];
+ key_to = (int *) key[to];
+ for (i=key_start;i<key_stop;i++) {
+ my_key = key_from[i] & bb;
+ my_key = my_key >> shiftnum;
+ rank_me_mynum[my_key]++;
+ }
+ key_density[0] = rank_me_mynum[0];
+ for (i=1;i<radix;i++) {
+ key_density[i] = key_density[i-1] + rank_me_mynum[i];
+ }
+
+ BARRIER(global->barrier_rank, number_of_processors,3)
+
+ n = &(global->prefix_tree[MyNum]);
+ for (i = 0; i < radix; i++) {
+ n->densities[i] = key_density[i];
+ n->ranks[i] = rank_me_mynum[i];
+ }
+ offset = MyNum;
+ level = number_of_processors >> 1;
+ base = number_of_processors;
+ if ((MyNum & 0x1) == 0) {
+ SETPAUSE(global->prefix_tree[base + (offset >> 1)].done);
+ }
+ while ((offset & 0x1) != 0) {
+ offset >>= 1;
+ r = n;
+ l = n - 1;
+ index = base + offset;
+ n = &(global->prefix_tree[index]);
+ WAITPAUSE(n->done);
+ CLEARPAUSE(n->done);
+ if (offset != (level - 1)) {
+ for (i = 0; i < radix; i++) {
+ n->densities[i] = r->densities[i] + l->densities[i];
+ n->ranks[i] = r->ranks[i] + l->ranks[i];
+ }
+ } else {
+ for (i = 0; i < radix; i++) {
+ n->densities[i] = r->densities[i] + l->densities[i];
+ }
+ }
+ base += level;
+ level >>= 1;
+ if ((offset & 0x1) == 0) {
+ SETPAUSE(global->prefix_tree[base + (offset >> 1)].done);
+ }
+ }
+ BARRIER(global->barrier_rank, number_of_processors,4);
+
+ if (MyNum != (number_of_processors - 1)) {
+ offset = MyNum;
+ level = number_of_processors;
+ base = 0;
+ while ((offset & 0x1) != 0) {
+ offset >>= 1;
+ base += level;
+ level >>= 1;
+ }
+ my_node = &(global->prefix_tree[base + offset]);
+ offset >>= 1;
+ base += level;
+ level >>= 1;
+ while ((offset & 0x1) != 0) {
+ offset >>= 1;
+ base += level;
+ level >>= 1;
+ }
+ their_node = &(global->prefix_tree[base + offset]);
+ WAITPAUSE(my_node->done);
+ CLEARPAUSE(my_node->done);
+ for (i = 0; i < radix; i++) {
+ my_node->densities[i] = their_node->densities[i];
+ }
+ } else {
+ my_node = &(global->prefix_tree[(2 * number_of_processors) - 2]);
+ }
+ offset = MyNum;
+ level = number_of_processors;
+ base = 0;
+ while ((offset & 0x1) != 0) {
+ SETPAUSE(global->prefix_tree[base + offset - 1].done);
+ offset >>= 1;
+ base += level;
+ level >>= 1;
+ }
+ offset = MyNum;
+ level = number_of_processors;
+ base = 0;
+ for(i = 0; i < radix; i++) {
+ rank_ff_mynum[i] = 0;
+ }
+ while (offset != 0) {
+ if ((offset & 0x1) != 0) {
+ /* Add ranks of node to your left at this level */
+ l = &(global->prefix_tree[base + offset - 1]);
+ for (i = 0; i < radix; i++) {
+ rank_ff_mynum[i] += l->ranks[i];
+ }
+ }
+ base += level;
+ level >>= 1;
+ offset >>= 1;
+ }
+ for (i = 1; i < radix; i++) {
+ rank_ff_mynum[i] += my_node->densities[i - 1];
+ }
+
+ if ((MyNum == 0) || (stats)) {
+ CLOCK(time3);
+ }
+
+ BARRIER(global->barrier_rank, number_of_processors,5);
+
+ if ((MyNum == 0) || (stats)) {
+ CLOCK(time4);
+ }
+
+ /* put it in order according to this digit */
+
+ for (i = key_start; i < key_stop; i++) {
+ this_key = key_from[i] & bb;
+ this_key = this_key >> shiftnum;
+ tmp = rank_ff_mynum[this_key];
+ key_to[tmp] = key_from[i];
+ rank_ff_mynum[this_key]++;
+ } /* i */
+
+ if ((MyNum == 0) || (stats)) {
+ CLOCK(time5);
+ }
+
+ if (loopnum != max_num_digits-1) {
+ from = from ^ 0x1;
+ to = to ^ 0x1;
+ }
+
+ BARRIER(global->barrier_rank, number_of_processors, 6)
+
+ if ((MyNum == 0) || (stats)) {
+ ranktime += (time3 - time2);
+ sorttime += (time5 - time4);
+ }
+ } /* for */
+
+ BARRIER(global->barrier_rank, number_of_processors, 7)
+ if ((MyNum == 0) || (stats)) {
+ CLOCK(time6)
+ global->ranktime[MyNum] = ranktime;
+ global->sorttime[MyNum] = sorttime;
+ global->totaltime[MyNum] = time6-time1;
+ }
+ if (MyNum == 0) {
+ global->rs = time1;
+ global->rf = time6;
+ global->final = to;
+ }
+
+ thread_array[MyNum] = 0;
+}
+
+double product_mod_46(t1, t2) /* product_mod_46() returns the product
+ (mod 2^46) of t1 and t2. */
+double t1;
+double t2;
+
+{
+ double a1;
+ double b1;
+ double a2;
+ double b2;
+
+ a1 = (double)((int)(t1 / RADIX_S)); /* Decompose the arguments. */
+ a2 = t1 - a1 * RADIX_S;
+ b1 = (double)((int)(t2 / RADIX_S));
+ b2 = t2 - b1 * RADIX_S;
+ t1 = a1 * b2 + a2 * b1; /* Multiply the arguments. */
+ t2 = (double)((int)(t1 / RADIX_S));
+ t2 = t1 - t2 * RADIX_S;
+ t1 = t2 * RADIX_S + a2 * b2;
+ t2 = (double)((int)(t1 / RADIX));
+
+ return (t1 - t2 * RADIX); /* Return the product. */
+}
+
+double ran_num_init(k, b, t) /* finds the (k)th random number,
+ given the seed, b, and the ratio, t. */
+unsigned int k;
+double b;
+double t;
+
+{
+ unsigned int j;
+
+ while (k != 0) { /* while() is executed m times
+ such that 2^m > k. */
+ j = k >> 1;
+ if ((j << 1) != k) {
+ b = product_mod_46(b, t);
+ }
+ t = product_mod_46(t, t);
+ k = j;
+ }
+
+ return b;
+}
+
+int get_max_digits(max_key)
+
+int max_key;
+
+{
+ int done = 0;
+ int temp = 1;
+ int key_val;
+
+ key_val = max_key;
+ while (!done) {
+ key_val = key_val / radix;
+ if (key_val == 0) {
+ done = 1;
+ } else {
+ temp ++;
+ }
+ }
+ return temp;
+}
+
+int get_log2_radix(rad)
+
+int rad;
+
+{
+ int cumulative=1;
+ int out;
+
+ for (out = 0; out < 20; out++) {
+ if (cumulative == rad) {
+ return(out);
+ } else {
+ cumulative = cumulative * 2;
+ }
+ }
+ diag_printf("ERROR: Radix %d not a power of 2\n", rad);
+ exit(-1);
+}
+
+int get_log2_keys(num_keys)
+
+int num_keys;
+
+{
+ int cumulative=1;
+ int out;
+
+ for (out = 0; out < 30; out++) {
+ if (cumulative == num_keys) {
+ return(out);
+ } else {
+ cumulative = cumulative * 2;
+ }
+ }
+ diag_printf("ERROR: Number of keys %d not a power of 2\n", num_keys);
+ exit(-1);
+}
+
+int log_2(number)
+
+int number;
+
+{
+ int cumulative = 1;
+ int out = 0;
+ int done = 0;
+
+ while ((cumulative < number) && (!done) && (out < 50)) {
+ if (cumulative == number) {
+ done = 1;
+ } else {
+ cumulative = cumulative * 2;
+ out ++;
+ }
+ }
+
+ if (cumulative == number) {
+ return(out);
+ } else {
+ return(-1);
+ }
+}
+
+void printerr(s)
+
+char *s;
+
+{
+ diag_printf("ERROR: %s\n",s);
+}
+
+void init(key_start,key_stop,from)
+
+int key_start;
+int key_stop;
+int from;
+
+{
+ double ran_num;
+ double sum;
+ int tmp;
+ int i;
+ int *key_from;
+
+ ran_num = ran_num_init((key_start << 2) + 1, SEED, RATIO);
+ sum = ran_num / RADIX;
+ key_from = (int *) key[from];
+ for (i = key_start; i < key_stop; i++) {
+ ran_num = product_mod_46(ran_num, RATIO);
+ sum = sum + ran_num / RADIX;
+ ran_num = product_mod_46(ran_num, RATIO);
+ sum = sum + ran_num / RADIX;
+ ran_num = product_mod_46(ran_num, RATIO);
+ sum = sum + ran_num / RADIX;
+ key_from[i] = (int) ((sum / 4.0) * max_key);
+ tmp = (int) ((key_from[i])/100);
+ ran_num = product_mod_46(ran_num, RATIO);
+ sum = ran_num / RADIX;
+ }
+
+}
+
+void test_sort(final)
+
+int final;
+
+{
+ int i;
+ int mistake = 0;
+ int *key_final;
+
+ diag_printf("\n");
+ diag_printf(" TESTING RESULTS\n");
+ key_final = key[final];
+ for (i = 0; i < num_keys-1; i++) {
+ if (key_final[i] > key_final[i + 1]) {
+ diag_printf("error with key %d, value %d %d \n",
+ i,key_final[i],key_final[i + 1]);
+ mistake++;
+ }
+ }
+
+ if (mistake) {
+ diag_printf("FAILED: %d keys out of place.\n", mistake);
+ } else {
+ diag_printf("PASSED: All keys in place.\n");
+ }
+ diag_printf("\n");
+}
+
+void printout()
+
+{
+ int i;
+ int mistake;
+ int *key_final;
+
+ key_final = (int *) key[global->final];
+ diag_printf("\n");
+ diag_printf(" SORTED KEY VALUES\n");
+ diag_printf("%8d ",key_final[0]);
+ for (i = 0; i < num_keys-1; i++) {
+ diag_printf("%8d ",key_final[i+1]);
+ if ((i+2)%5 == 0) {
+ diag_printf("\n");
+ }
+ }
+ diag_printf("\n");
+}
+
+#include <tests_smp/getopt.c>
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/radix.c b/cesar/ecos/packages/kernel/current/tests_smp/radix.c
new file mode 100644
index 0000000000..00a14fe9fb
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/radix.c
@@ -0,0 +1,1346 @@
+
+
+
+
+
+
+
+
+
+
+
+/*************************************************************************/
+/* */
+/* Copyright (c) 1994 Stanford University */
+/* */
+/* All rights reserved. */
+/* */
+/* Permission is given to use, copy, and modify this software for any */
+/* non-commercial purpose as long as this copyright notice is not */
+/* removed. All other uses, including redistribution in whole or in */
+/* part, are forbidden without prior written permission. */
+/* */
+/* This software is provided with absolutely no warranty and no */
+/* support. */
+/* */
+/*************************************************************************/
+
+/*************************************************************************/
+/* */
+/* Integer radix sort of non-negative integers. */
+/* */
+/* Command line options: */
+/* */
+/* -pP : P = number of processors. */
+/* -rR : R = radix for sorting. Must be power of 2. */
+/* -nN : N = number of keys to sort. */
+/* -mM : M = maximum key value. Integer keys k will be generated such */
+/* that 0 <= k <= M. */
+/* -s : Print individual processor timing statistics. */
+/* -t : Check to make sure all keys are sorted correctly. */
+/* -o : Print out sorted keys. */
+/* -h : Print out command line options. */
+/* */
+/* Default: RADIX -p1 -n262144 -r1024 -m524288 */
+/* */
+/* Note: This version works under both the FORK and SPROC models */
+/* */
+/*************************************************************************/
+
+#include <stdio.h>
+#include <math.h>
+#include <tests_smp/getopt.h>
+
+#define DEFAULT_P 1
+#define DEFAULT_N 262144
+#define DEFAULT_R 1024
+#define DEFAULT_M 524288
+#define MAX_PROCESSORS 64
+#define RADIX_S 8388608.0e0
+#define RADIX 70368744177664.0e0
+#define SEED 314159265.0e0
+#define RATIO 1220703125.0e0
+#define PAGE_SIZE 4096
+#define PAGE_MASK (~(PAGE_SIZE-1))
+#define MAX_RADIX 4096
+
+#include <tests_smp/radix_arg.c>
+
+
+/*---------------------------------------*/
+#include <pkgconf/system.h>
+#include <pkgconf/infra.h>
+#include <pkgconf/kernel.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/testcase.h>
+#include <pkgconf/isoinfra.h>
+#include <cyg/hal/hal_cache.h>
+#include <cyg/hal/hal_smp.h>
+#include <cyg/kernel/kapi.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+int smp_cyg_test_main(int argc, char **argv);
+
+void smp_cyg_test_main_call(void *p) {
+ smp_cyg_test_main(smp_cyg_test_argc, smp_cyg_test_argv);
+}
+
+
+/* #define STACK_SIZE 0x1b000 */
+#define STACK_SIZE 8192
+static cyg_thread smp_cyg_test_thread;
+static char smp_cyg_test_stack[STACK_SIZE];
+static cyg_handle_t smp_cyg_test_threadh;
+
+
+
+cyg_handle_t threadh[64];
+char *stack[64];
+cyg_thread thread[64];
+
+
+externC void cyg_user_start( void )
+{
+ CYG_TEST_INIT();
+
+ diag_printf("Starting test app\n");
+
+ cyg_thread_create(10, // Priority - just a number
+ smp_cyg_test_main_call, // entry
+ 0, // index
+ "smp test", // Name
+ smp_cyg_test_stack, // Stack
+ STACK_SIZE, // Size
+ &smp_cyg_test_threadh, // Handle
+ &smp_cyg_test_thread // Thread data structure
+ );
+ cyg_thread_resume( smp_cyg_test_threadh );
+ /*cyg_scheduler_start();*/
+}
+
+
+/*---------------------------------------*/
+
+
+struct prefix_node {
+ int densities[MAX_RADIX];
+ int ranks[MAX_RADIX];
+
+ char pad[PAGE_SIZE];
+};
+
+struct global_memory {
+ int Index; /* process ID */
+ cyg_spinlock_t lock_Index; /* for fetch and add to get ID */
+ cyg_spinlock_t rank_lock; /* for fetch and add to get ID */
+
+/*---------------------------------------*/
+struct section_lockTYP {
+ cyg_spinlock_t lock;;
+
+
+
+ } section_lock[MAX_PROCESSORS];
+/*---------------------------------------*/
+
+ /* key locks */
+
+/*---------------------------------------*/
+struct barrier_rankTYP {
+ cyg_spinlock_t lock;;
+ int count[1];
+ cyg_sem_t queue[1];;
+
+ } barrier_rank[1];
+/*---------------------------------------*/
+
+ /* for ranking process */
+
+/*---------------------------------------*/
+struct barrier_keyTYP {
+ cyg_spinlock_t lock;;
+ int count[1];
+ cyg_sem_t queue[1];;
+
+ } barrier_key[1];
+/*---------------------------------------*/
+
+ /* for key sorting process */
+ double *ranktime;
+ double *sorttime;
+ double *totaltime;
+ int final;
+ unsigned int starttime;
+ unsigned int rs;
+ unsigned int rf;
+ struct prefix_node prefix_tree[2 * MAX_PROCESSORS];
+} *global;
+
+struct global_private {
+ char pad[PAGE_SIZE];
+ int *rank_ff; /* overall processor ranks */
+} gp[MAX_PROCESSORS];
+
+int *key[2]; /* sort from one index into the other */
+int **rank_me; /* individual processor ranks */
+int *key_partition; /* keys a processor works on */
+int *rank_partition; /* ranks a processor works on */
+
+int number_of_processors = DEFAULT_P;
+int max_num_digits;
+int radix = DEFAULT_R;
+int num_keys = DEFAULT_N;
+int max_key = DEFAULT_M;
+int log2_radix;
+int log2_keys;
+int dostats = 0;
+int test_result = 0;
+int doprint = 0;
+volatile cyg_thread *thread_array[64];
+
+int dbg_on = 0;
+double ran_num_init(unsigned int,double,double);
+double product_mod_46(double,double);
+int get_max_digits(int);
+int get_log2_radix(int);
+int get_log2_keys(int);
+void slave_sort();
+int log_2(int);
+void printerr(char *);
+void init(int,int,int);
+void test_sort(int);
+void printout();
+
+
+int smp_cyg_test_main(argc, argv)
+
+int argc;
+char **argv;
+
+{
+ int i;
+ int p;
+ int quotient;
+ int remainder;
+ int sum_i;
+ int sum_f;
+ int mistake=0;
+ int size;
+ int **temp;
+ int **temp2;
+ int *a;
+ int c;
+ int n1;
+ extern char *optarg;
+ double mint, maxt, avgt;
+ double minrank, maxrank, avgrank;
+ double minsort, maxsort, avgsort;
+ unsigned int start;
+ int done = 0;
+ int start_p;
+ int end_p;
+ int level;
+ int index;
+ int base;
+ int offset;
+ int toffset;
+
+
+ memset (thread_array,0,sizeof(thread_array));
+
+ {
+ (start) = cyg_current_time()*10;
+}
+
+
+ while ((c = getopt(argc, argv, "p:r:n:m:stoh")) != -1) {
+ switch(c) {
+ case 'p': number_of_processors = atoi(optarg);
+ number_of_processors = HAL_SMP_CPU_MAX;
+ if (number_of_processors < 1) {
+ printerr("P must be >= 1\n");
+ exit(-1);
+ }
+ if (number_of_processors > MAX_PROCESSORS) {
+ printerr("Maximum processors (MAX_PROCESSORS) exceeded\n");
+ exit(-1);
+ }
+ break;
+ case 'r': radix = atoi(optarg);
+ if (radix < 1) {
+ printerr("Radix must be a power of 2 greater than 0\n");
+ exit(-1);
+ }
+ log2_radix = log_2(radix);
+ if (log2_radix == -1) {
+ printerr("Radix must be a power of 2\n");
+ exit(-1);
+ }
+ break;
+ case 'n': num_keys = atoi(optarg);
+ if (num_keys < 1) {
+ printerr("Number of keys must be >= 1\n");
+ exit(-1);
+ }
+ break;
+ case 'm': max_key = atoi(optarg);
+ if (max_key < 1) {
+ printerr("Maximum key must be >= 1\n");
+ exit(-1);
+ }
+ break;
+ case 's': dostats = !dostats;
+ break;
+ case 't': test_result = !test_result;
+ break;
+ case 'o': doprint = !doprint;
+ break;
+ case 'h': diag_printf("Usage: RADIX <options>\n\n");
+ diag_printf(" -pP : P = number of processors.\n");
+ diag_printf(" -rR : R = radix for sorting. Must be power of 2.\n");
+ diag_printf(" -nN : N = number of keys to sort.\n");
+ diag_printf(" -mM : M = maximum key value. Integer keys k will be generated such\n");
+ diag_printf(" that 0 <= k <= M.\n");
+ diag_printf(" -s : Print individual processor timing statistics.\n");
+ diag_printf(" -t : Check to make sure all keys are sorted correctly.\n");
+ diag_printf(" -o : Print out sorted keys.\n");
+ diag_printf(" -h : Print out command line options.\n\n");
+ diag_printf("Default: RADIX -p%1d -n%1d -r%1d -m%1d\n",
+ DEFAULT_P,DEFAULT_N,DEFAULT_R,DEFAULT_M);
+ exit(0);
+ }
+ }
+
+ if (number_of_processors > 64) {
+ printf("Maximal 64 processes\n");
+ exit(0);
+ }
+
+ {;}
+
+ log2_radix = log_2(radix);
+ log2_keys = log_2(num_keys);
+ global = (struct global_memory *) calloc(sizeof(struct global_memory), 1);
+ key[0] = (int *) calloc(num_keys*sizeof(int), 1);;
+ key[1] = (int *) calloc(num_keys*sizeof(int), 1);;
+ key_partition = (int *) calloc((number_of_processors+1)*sizeof(int), 1);;
+ rank_partition = (int *) calloc((number_of_processors+1)*sizeof(int), 1);;
+
+ if ((global == NULL)) {
+ diag_printf("ERROR: Cannot malloc enough memory %d\n",sizeof(struct global_memory));
+ }
+
+ global->ranktime = (double *) calloc(number_of_processors*sizeof(double), 1);;
+ global->sorttime = (double *) calloc(number_of_processors*sizeof(double), 1);;
+ global->totaltime = (double *) calloc(number_of_processors*sizeof(double), 1);;
+ size = number_of_processors*(radix*sizeof(int)+sizeof(int *));
+ rank_me = (int **) calloc(size, 1);;
+
+ if ((global == NULL) || (key[0] == NULL) || (key[1] == NULL) ||
+ (key_partition == NULL) || (rank_partition == NULL) ||
+ (rank_me == NULL)) {
+ diag_printf("ERROR: Cannot malloc enough memory\n");
+ exit(-1);
+ }
+
+ temp = rank_me;
+ temp2 = temp + number_of_processors;
+ a = (int *) temp2;
+ for (i=0;i<number_of_processors;i++) {
+ *temp = (int *) a;
+ temp++;
+ a += radix;
+ }
+ for (i=0;i<number_of_processors;i++) {
+ gp[i].rank_ff = (int *) calloc(radix*sizeof(int)+PAGE_SIZE, 1);;
+ }
+ cyg_spinlock_init( &global->lock_Index,0 );
+ cyg_spinlock_init( &global->rank_lock,0 );
+ { {
+/*---------------------------------------*/
+ int mon_dum1,mon_dum2;
+
+ for (mon_dum1=0; mon_dum1 < MAX_PROCESSORS; mon_dum1++) {
+ cyg_spinlock_init( &global->section_lock[mon_dum1].lock,0 );;
+ }
+/*---------------------------------------*/
+};}
+ {{
+/*---------------------------------------*/
+ int mon_dum1,mon_dum2;
+ for (mon_dum1=0; mon_dum1 < 1; mon_dum1++)
+ for (mon_dum2=0; mon_dum2 < 1; mon_dum2++) {
+ global->barrier_rank[mon_dum1].count[mon_dum2] = 0;
+ { cyg_semaphore_init(&global->barrier_rank[mon_dum1].queue[mon_dum2],0);};
+ }
+ for (mon_dum1=0; mon_dum1 < 1; mon_dum1++) {
+ cyg_spinlock_init( &global->barrier_rank[mon_dum1].lock,0 );;
+ }
+/*---------------------------------------*/
+}}
+ {{
+/*---------------------------------------*/
+ int mon_dum1,mon_dum2;
+ for (mon_dum1=0; mon_dum1 < 1; mon_dum1++)
+ for (mon_dum2=0; mon_dum2 < 1; mon_dum2++) {
+ global->barrier_key[mon_dum1].count[mon_dum2] = 0;
+ { cyg_semaphore_init(&global->barrier_key[mon_dum1].queue[mon_dum2],0);};
+ }
+ for (mon_dum1=0; mon_dum1 < 1; mon_dum1++) {
+ cyg_spinlock_init( &global->barrier_key[mon_dum1].lock,0 );;
+ }
+/*---------------------------------------*/
+}}
+
+ for (i=0; i<2*number_of_processors; i++) {
+ {/*##########*/;};
+ }
+
+ global->Index = 0;
+ max_num_digits = get_max_digits(max_key);
+ diag_printf("\n");
+ diag_printf("Integer Radix Sort\n");
+ diag_printf(" %d Keys\n",num_keys);
+ diag_printf(" %d Processors\n",number_of_processors);
+ diag_printf(" Radix = %d\n",radix);
+ diag_printf(" Max key = %d\n",max_key);
+ diag_printf("\n");
+
+ quotient = num_keys / number_of_processors;
+ remainder = num_keys % number_of_processors;
+ sum_i = 0;
+ sum_f = 0;
+ p = 0;
+ diag_printf("key_partition\n",max_key);
+ while (sum_i < num_keys) {
+ key_partition[p] = sum_i;
+ p++;
+ sum_i = sum_i + quotient;
+ sum_f = sum_f + remainder;
+ sum_i = sum_i + sum_f / number_of_processors;
+ sum_f = sum_f % number_of_processors;
+ }
+ key_partition[p] = num_keys;
+
+ quotient = radix / number_of_processors;
+ remainder = radix % number_of_processors;
+ sum_i = 0;
+ sum_f = 0;
+ p = 0;
+ diag_printf("rank_partition\n",max_key);
+ while (sum_i < radix) {
+ rank_partition[p] = sum_i;
+ p++;
+ sum_i = sum_i + quotient;
+ sum_f = sum_f + remainder;
+ sum_i = sum_i + sum_f / number_of_processors;
+ sum_f = sum_f % number_of_processors;
+ }
+ rank_partition[p] = radix;
+
+/* POSSIBLE ENHANCEMENT: Here is where one might distribute the key,
+ rank_me, rank, and gp data structures across physically
+ distributed memories as desired.
+
+ One way to place data is as follows:
+
+ for (i=0;i<number_of_processors;i++) {
+ Place all addresses x such that:
+ &(key[0][key_partition[i]]) <= x < &(key[0][key_partition[i+1]])
+ on node i
+ &(key[1][key_partition[i]]) <= x < &(key[1][key_partition[i+1]])
+ on node i
+ &(rank_me[i][0]) <= x < &(rank_me[i][radix-1]) on node i
+ &(gp[i]) <= x < &(gp[i+1]) on node i
+ &(gp[i].rank_ff[0]) <= x < &(gp[i].rank_ff[radix]) on node i
+ }
+ start_p = 0;
+ i = 0;
+
+ for (toffset = 0; toffset < number_of_processors; toffset ++) {
+ offset = toffset;
+ level = number_of_processors >> 1;
+ base = number_of_processors;
+ while ((offset & 0x1) != 0) {
+ offset >>= 1;
+ index = base + offset;
+ Place all addresses x such that:
+ &(global->prefix_tree[index]) <= x <
+ &(global->prefix_tree[index + 1]) on node toffset
+ base += level;
+ level >>= 1;
+ }
+ } */
+
+ /* Fill the random-number array. */
+
+ for (i = 1; i < number_of_processors; i++) {
+
+{
+ /*---------------------------------------*/
+ stack[i] = calloc(STACK_SIZE, 1);
+ cyg_thread_create(10, // Priority - just a number
+ slave_sort, // entry
+ 0, // index
+ "slave", // Name
+ stack[i], // Stack
+ STACK_SIZE, // Size
+ &threadh[i], // Handle
+ &thread[i] // Thread data structure
+ );
+ cyg_thread_resume( threadh[i] );
+ /*---------------------------------------*/
+}
+
+ }
+
+ slave_sort();
+
+ for (i = 1; i < number_of_processors; i++) {
+ while(thread_array[i]) {};
+ }
+
+ diag_printf("\n");
+ diag_printf(" PROCESS STATISTICS\n");
+ diag_printf(" Total Rank Sort\n");
+ diag_printf(" Proc Time Time Time\n");
+ diag_printf(" 0 %10.0f %10.0f %10.0f\n",
+ global->totaltime[0],global->ranktime[0],
+ global->sorttime[0]);
+ if (dostats) {
+ maxt = avgt = mint = global->totaltime[0];
+ maxrank = avgrank = minrank = global->ranktime[0];
+ maxsort = avgsort = minsort = global->sorttime[0];
+ for (i=1; i<number_of_processors; i++) {
+ if (global->totaltime[i] > maxt) {
+ maxt = global->totaltime[i];
+ }
+ if (global->totaltime[i] < mint) {
+ mint = global->totaltime[i];
+ }
+ if (global->ranktime[i] > maxrank) {
+ maxrank = global->ranktime[i];
+ }
+ if (global->ranktime[i] < minrank) {
+ minrank = global->ranktime[i];
+ }
+ if (global->sorttime[i] > maxsort) {
+ maxsort = global->sorttime[i];
+ }
+ if (global->sorttime[i] < minsort) {
+ minsort = global->sorttime[i];
+ }
+ avgt += global->totaltime[i];
+ avgrank += global->ranktime[i];
+ avgsort += global->sorttime[i];
+ }
+ avgt = avgt / number_of_processors;
+ avgrank = avgrank / number_of_processors;
+ avgsort = avgsort / number_of_processors;
+ for (i=1; i<number_of_processors; i++) {
+ diag_printf(" %3d %10.0f %10.0f %10.0f\n",
+ i,global->totaltime[i],global->ranktime[i],
+ global->sorttime[i]);
+ }
+ diag_printf(" Avg %10.0f %10.0f %10.0f\n",avgt,avgrank,avgsort);
+ diag_printf(" Min %10.0f %10.0f %10.0f\n",mint,minrank,minsort);
+ diag_printf(" Max %10.0f %10.0f %10.0f\n",maxt,maxrank,maxsort);
+ diag_printf("\n");
+ }
+
+ diag_printf("\n");
+ global->starttime = start;
+ diag_printf(" TIMING INFORMATION\n");
+ diag_printf("Start time : %16d\n",
+ global->starttime);
+ diag_printf("Initialization finish time : %16d\n",
+ global->rs);
+ diag_printf("Overall finish time : %16d\n",
+ global->rf);
+ diag_printf("Total time with initialization : %16d\n",
+ global->rf-global->starttime);
+ diag_printf("Total time without initialization : %16d\n",
+ global->rf-global->rs);
+ diag_printf("\n");
+
+ if (doprint) {
+ printout();
+ }
+ if (test_result) {
+ test_sort(global->final);
+ }
+
+
+{
+ diag_printf("FP test end\n");
+ return 0;
+}
+;
+}
+
+void slave_sort()
+{
+ int i, j, k, kk, Ind;
+ int MyNum;
+ int this_key;
+ int tmp;
+ int last_key;
+ int loopnum;
+ double ran_num;
+ double sum;
+ int shiftnum;
+ int bb;
+ int my_key;
+ int key_start;
+ int key_stop;
+ int rank_start;
+ int rank_stop;
+ int from=0;
+ int to=1;
+ int *key_density; /* individual processor key densities */
+ unsigned int time1;
+ unsigned int time2;
+ unsigned int time3;
+ unsigned int time4;
+ unsigned int time5;
+ unsigned int time6;
+ double ranktime=0;
+ double sorttime=0;
+ int *key_from;
+ int *key_to;
+ int *rank_me_mynum;
+ int *rank_me_i;
+ int *rank_ff_mynum;
+ int stats;
+ struct prefix_node* n;
+ struct prefix_node* r;
+ struct prefix_node* l;
+ struct prefix_node* my_node;
+ struct prefix_node* their_node;
+ volatile int* prefx;
+ int index;
+ int level;
+ int base;
+ int offset;
+
+ diag_printf("SlaveSort %d\n",cyg_hal_get_current_threadid());
+
+ stats = dostats;
+
+ cyg_spinlock_spin(&global->lock_Index);
+ MyNum = global->Index;
+ global->Index++;
+ cyg_spinlock_clear(&global->lock_Index);
+
+/* POSSIBLE ENHANCEMENT: Here is where one might pin processes to
+ processors to avoid migration */
+
+ key_density = (int *) malloc(radix*sizeof(int));
+
+ /* Fill the random-number array. */
+
+ key_start = key_partition[MyNum];
+ key_stop = key_partition[MyNum + 1];
+ rank_start = rank_partition[MyNum];
+ rank_stop = rank_partition[MyNum + 1];
+ if (rank_stop == radix) {
+ rank_stop--;
+ }
+
+ diag_printf("init %d, %d-%d\n",cyg_hal_get_current_threadid(),key_start,key_stop);
+ init(key_start,key_stop,from);
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( global->barrier_key[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),1 ,global->barrier_key[0].count[0],global->barrier_key[0].queue[0].count);
+ }
+ if ( global->barrier_key[0].count[0] < (number_of_processors -1) ) {
+ global->barrier_key[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),1 ,global->barrier_key[0].count[0],global->barrier_key[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&global->barrier_key[0].lock );;
+ { cyg_semaphore_wait(&global->barrier_key[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),1 ,global->barrier_key[0].count[0],global->barrier_key[0].queue[0].count);
+ }
+ if ( global->barrier_key[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),1 ,global->barrier_key[0].count[0],global->barrier_key[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&global->barrier_key[0].lock );;
+
+ } else {
+ ( global->barrier_key[0].count[0] )-- ;
+ //cyg_spinlock_clear(&global->barrier_key[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),1 ,global->barrier_key[0].count[0],global->barrier_key[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&global->barrier_key[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+}
+
+/* POSSIBLE ENHANCEMENT: Here is where one might reset the
+ statistics that one is measuring about the parallel execution */
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( global->barrier_key[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),2,global->barrier_key[0].count[0],global->barrier_key[0].queue[0].count);
+ }
+ if ( global->barrier_key[0].count[0] < (number_of_processors -1) ) {
+ global->barrier_key[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),2,global->barrier_key[0].count[0],global->barrier_key[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&global->barrier_key[0].lock );;
+ { cyg_semaphore_wait(&global->barrier_key[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),2,global->barrier_key[0].count[0],global->barrier_key[0].queue[0].count);
+ }
+ if ( global->barrier_key[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),2,global->barrier_key[0].count[0],global->barrier_key[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&global->barrier_key[0].lock );;
+
+ } else {
+ ( global->barrier_key[0].count[0] )-- ;
+ //cyg_spinlock_clear(&global->barrier_key[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),2,global->barrier_key[0].count[0],global->barrier_key[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&global->barrier_key[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+}
+
+ if ((MyNum == 0) || (stats)) {
+ {
+ (time1) = cyg_current_time()*10;
+}
+
+ }
+
+/* Do 1 iteration per digit. */
+
+ rank_me_mynum = rank_me[MyNum];
+ rank_ff_mynum = gp[MyNum].rank_ff;
+ for (loopnum=0;loopnum<max_num_digits;loopnum++) {
+ shiftnum = (loopnum * log2_radix);
+ bb = (radix-1) << shiftnum;
+
+/* generate histograms based on one digit */
+
+ if ((MyNum == 0) || (stats)) {
+ {
+ (time2) = cyg_current_time()*10;
+}
+
+ }
+
+ for (i = 0; i < radix; i++) {
+ rank_me_mynum[i] = 0;
+ }
+ key_from = (int *) key[from];
+ key_to = (int *) key[to];
+ for (i=key_start;i<key_stop;i++) {
+ my_key = key_from[i] & bb;
+ my_key = my_key >> shiftnum;
+ rank_me_mynum[my_key]++;
+ }
+ key_density[0] = rank_me_mynum[0];
+ for (i=1;i<radix;i++) {
+ key_density[i] = key_density[i-1] + rank_me_mynum[i];
+ }
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( global->barrier_rank[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),3,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ if ( global->barrier_rank[0].count[0] < (number_of_processors -1) ) {
+ global->barrier_rank[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),3,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&global->barrier_rank[0].lock );;
+ { cyg_semaphore_wait(&global->barrier_rank[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),3,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ if ( global->barrier_rank[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),3,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&global->barrier_rank[0].lock );;
+
+ } else {
+ ( global->barrier_rank[0].count[0] )-- ;
+ //cyg_spinlock_clear(&global->barrier_rank[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),3,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&global->barrier_rank[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+}
+
+ n = &(global->prefix_tree[MyNum]);
+ for (i = 0; i < radix; i++) {
+ n->densities[i] = key_density[i];
+ n->ranks[i] = rank_me_mynum[i];
+ }
+ offset = MyNum;
+ level = number_of_processors >> 1;
+ base = number_of_processors;
+ if ((MyNum & 0x1) == 0) {
+ {/*##########*/;};
+ }
+ while ((offset & 0x1) != 0) {
+ offset >>= 1;
+ r = n;
+ l = n - 1;
+ index = base + offset;
+ n = &(global->prefix_tree[index]);
+ {/*##########*/;};
+ {/*##########*/;};
+ if (offset != (level - 1)) {
+ for (i = 0; i < radix; i++) {
+ n->densities[i] = r->densities[i] + l->densities[i];
+ n->ranks[i] = r->ranks[i] + l->ranks[i];
+ }
+ } else {
+ for (i = 0; i < radix; i++) {
+ n->densities[i] = r->densities[i] + l->densities[i];
+ }
+ }
+ base += level;
+ level >>= 1;
+ if ((offset & 0x1) == 0) {
+ {/*##########*/;};
+ }
+ }
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( global->barrier_rank[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),4,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ if ( global->barrier_rank[0].count[0] < (number_of_processors -1) ) {
+ global->barrier_rank[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),4,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&global->barrier_rank[0].lock );;
+ { cyg_semaphore_wait(&global->barrier_rank[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),4,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ if ( global->barrier_rank[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),4,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&global->barrier_rank[0].lock );;
+
+ } else {
+ ( global->barrier_rank[0].count[0] )-- ;
+ //cyg_spinlock_clear(&global->barrier_rank[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),4,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&global->barrier_rank[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+};
+
+ if (MyNum != (number_of_processors - 1)) {
+ offset = MyNum;
+ level = number_of_processors;
+ base = 0;
+ while ((offset & 0x1) != 0) {
+ offset >>= 1;
+ base += level;
+ level >>= 1;
+ }
+ my_node = &(global->prefix_tree[base + offset]);
+ offset >>= 1;
+ base += level;
+ level >>= 1;
+ while ((offset & 0x1) != 0) {
+ offset >>= 1;
+ base += level;
+ level >>= 1;
+ }
+ their_node = &(global->prefix_tree[base + offset]);
+ {/*##########*/;};
+ {/*##########*/;};
+ for (i = 0; i < radix; i++) {
+ my_node->densities[i] = their_node->densities[i];
+ }
+ } else {
+ my_node = &(global->prefix_tree[(2 * number_of_processors) - 2]);
+ }
+ offset = MyNum;
+ level = number_of_processors;
+ base = 0;
+ while ((offset & 0x1) != 0) {
+ {/*##########*/;};
+ offset >>= 1;
+ base += level;
+ level >>= 1;
+ }
+ offset = MyNum;
+ level = number_of_processors;
+ base = 0;
+ for(i = 0; i < radix; i++) {
+ rank_ff_mynum[i] = 0;
+ }
+ while (offset != 0) {
+ if ((offset & 0x1) != 0) {
+ /* Add ranks of node to your left at this level */
+ l = &(global->prefix_tree[base + offset - 1]);
+ for (i = 0; i < radix; i++) {
+ rank_ff_mynum[i] += l->ranks[i];
+ }
+ }
+ base += level;
+ level >>= 1;
+ offset >>= 1;
+ }
+ for (i = 1; i < radix; i++) {
+ rank_ff_mynum[i] += my_node->densities[i - 1];
+ }
+
+ if ((MyNum == 0) || (stats)) {
+ {
+ (time3) = cyg_current_time()*10;
+}
+;
+ }
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( global->barrier_rank[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),5,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ if ( global->barrier_rank[0].count[0] < (number_of_processors -1) ) {
+ global->barrier_rank[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),5,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&global->barrier_rank[0].lock );;
+ { cyg_semaphore_wait(&global->barrier_rank[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),5,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ if ( global->barrier_rank[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),5,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&global->barrier_rank[0].lock );;
+
+ } else {
+ ( global->barrier_rank[0].count[0] )-- ;
+ //cyg_spinlock_clear(&global->barrier_rank[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),5,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&global->barrier_rank[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+};
+
+ if ((MyNum == 0) || (stats)) {
+ {
+ (time4) = cyg_current_time()*10;
+}
+;
+ }
+
+ /* put it in order according to this digit */
+
+ for (i = key_start; i < key_stop; i++) {
+ this_key = key_from[i] & bb;
+ this_key = this_key >> shiftnum;
+ tmp = rank_ff_mynum[this_key];
+ key_to[tmp] = key_from[i];
+ rank_ff_mynum[this_key]++;
+ } /* i */
+
+ if ((MyNum == 0) || (stats)) {
+ {
+ (time5) = cyg_current_time()*10;
+}
+;
+ }
+
+ if (loopnum != max_num_digits-1) {
+ from = from ^ 0x1;
+ to = to ^ 0x1;
+ }
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( global->barrier_rank[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),6,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ if ( global->barrier_rank[0].count[0] < (number_of_processors -1) ) {
+ global->barrier_rank[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),6,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&global->barrier_rank[0].lock );;
+ { cyg_semaphore_wait(&global->barrier_rank[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),6,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ if ( global->barrier_rank[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),6,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&global->barrier_rank[0].lock );;
+
+ } else {
+ ( global->barrier_rank[0].count[0] )-- ;
+ //cyg_spinlock_clear(&global->barrier_rank[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),6,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&global->barrier_rank[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+}
+
+ if ((MyNum == 0) || (stats)) {
+ ranktime += (time3 - time2);
+ sorttime += (time5 - time4);
+ }
+ } /* for */
+
+ {
+/*---------------------------------*/
+ cyg_spinlock_spin(&( global->barrier_rank[0].lock ) );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: >b (%d:%d:%d): Enter barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),7,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ if ( global->barrier_rank[0].count[0] < (number_of_processors -1) ) {
+ global->barrier_rank[0].count[0]++;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ?b (%d:%d:%d): Wait\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),7,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ cyg_spinlock_clear(&global->barrier_rank[0].lock );;
+ { cyg_semaphore_wait(&global->barrier_rank[0].queue[0] );};
+ }
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: <b (%d:%d:%d): Exit barrier\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),7,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ if ( global->barrier_rank[0].count[0] == 0 ) {
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: ^b (%d:%d:%d): unlock barrier \n-----------\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),7,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+
+ cyg_spinlock_clear(&global->barrier_rank[0].lock );;
+
+ } else {
+ ( global->barrier_rank[0].count[0] )-- ;
+ //cyg_spinlock_clear(&global->barrier_rank[0].count_lock[0] );;
+
+ if (dbg_on) {
+ diag_printf("<cpu%d> thread %d: @b (%d:%d:%d): unlock queue\n",cyg_hal_get_current_cpuid(),cyg_hal_get_current_threadid(),7,global->barrier_rank[0].count[0],global->barrier_rank[0].queue[0].count);
+ }
+ { cyg_semaphore_post(&global->barrier_rank[0].queue[0] );};
+ }
+
+/*---------------------------------*/
+}
+ if ((MyNum == 0) || (stats)) {
+ {
+ (time6) = cyg_current_time()*10;
+}
+
+ global->ranktime[MyNum] = ranktime;
+ global->sorttime[MyNum] = sorttime;
+ global->totaltime[MyNum] = time6-time1;
+ }
+ if (MyNum == 0) {
+ global->rs = time1;
+ global->rf = time6;
+ global->final = to;
+ }
+
+ thread_array[MyNum] = 0;
+}
+
+double product_mod_46(t1, t2) /* product_mod_46() returns the product
+ (mod 2^46) of t1 and t2. */
+double t1;
+double t2;
+
+{
+ double a1;
+ double b1;
+ double a2;
+ double b2;
+
+ a1 = (double)((int)(t1 / RADIX_S)); /* Decompose the arguments. */
+ a2 = t1 - a1 * RADIX_S;
+ b1 = (double)((int)(t2 / RADIX_S));
+ b2 = t2 - b1 * RADIX_S;
+ t1 = a1 * b2 + a2 * b1; /* Multiply the arguments. */
+ t2 = (double)((int)(t1 / RADIX_S));
+ t2 = t1 - t2 * RADIX_S;
+ t1 = t2 * RADIX_S + a2 * b2;
+ t2 = (double)((int)(t1 / RADIX));
+
+ return (t1 - t2 * RADIX); /* Return the product. */
+}
+
+double ran_num_init(k, b, t) /* finds the (k)th random number,
+ given the seed, b, and the ratio, t. */
+unsigned int k;
+double b;
+double t;
+
+{
+ unsigned int j;
+
+ while (k != 0) { /* while() is executed m times
+ such that 2^m > k. */
+ j = k >> 1;
+ if ((j << 1) != k) {
+ b = product_mod_46(b, t);
+ }
+ t = product_mod_46(t, t);
+ k = j;
+ }
+
+ return b;
+}
+
+int get_max_digits(max_key)
+
+int max_key;
+
+{
+ int done = 0;
+ int temp = 1;
+ int key_val;
+
+ key_val = max_key;
+ while (!done) {
+ key_val = key_val / radix;
+ if (key_val == 0) {
+ done = 1;
+ } else {
+ temp ++;
+ }
+ }
+ return temp;
+}
+
+int get_log2_radix(rad)
+
+int rad;
+
+{
+ int cumulative=1;
+ int out;
+
+ for (out = 0; out < 20; out++) {
+ if (cumulative == rad) {
+ return(out);
+ } else {
+ cumulative = cumulative * 2;
+ }
+ }
+ diag_printf("ERROR: Radix %d not a power of 2\n", rad);
+ exit(-1);
+}
+
+int get_log2_keys(num_keys)
+
+int num_keys;
+
+{
+ int cumulative=1;
+ int out;
+
+ for (out = 0; out < 30; out++) {
+ if (cumulative == num_keys) {
+ return(out);
+ } else {
+ cumulative = cumulative * 2;
+ }
+ }
+ diag_printf("ERROR: Number of keys %d not a power of 2\n", num_keys);
+ exit(-1);
+}
+
+int log_2(number)
+
+int number;
+
+{
+ int cumulative = 1;
+ int out = 0;
+ int done = 0;
+
+ while ((cumulative < number) && (!done) && (out < 50)) {
+ if (cumulative == number) {
+ done = 1;
+ } else {
+ cumulative = cumulative * 2;
+ out ++;
+ }
+ }
+
+ if (cumulative == number) {
+ return(out);
+ } else {
+ return(-1);
+ }
+}
+
+void printerr(s)
+
+char *s;
+
+{
+ diag_printf("ERROR: %s\n",s);
+}
+
+void init(key_start,key_stop,from)
+
+int key_start;
+int key_stop;
+int from;
+
+{
+ double ran_num;
+ double sum;
+ int tmp;
+ int i;
+ int *key_from;
+
+ ran_num = ran_num_init((key_start << 2) + 1, SEED, RATIO);
+ sum = ran_num / RADIX;
+ key_from = (int *) key[from];
+ for (i = key_start; i < key_stop; i++) {
+ ran_num = product_mod_46(ran_num, RATIO);
+ sum = sum + ran_num / RADIX;
+ ran_num = product_mod_46(ran_num, RATIO);
+ sum = sum + ran_num / RADIX;
+ ran_num = product_mod_46(ran_num, RATIO);
+ sum = sum + ran_num / RADIX;
+ key_from[i] = (int) ((sum / 4.0) * max_key);
+ tmp = (int) ((key_from[i])/100);
+ ran_num = product_mod_46(ran_num, RATIO);
+ sum = ran_num / RADIX;
+ }
+
+}
+
+void test_sort(final)
+
+int final;
+
+{
+ int i;
+ int mistake = 0;
+ int *key_final;
+
+ diag_printf("\n");
+ diag_printf(" TESTING RESULTS\n");
+ key_final = key[final];
+ for (i = 0; i < num_keys-1; i++) {
+ if (key_final[i] > key_final[i + 1]) {
+ diag_printf("error with key %d, value %d %d \n",
+ i,key_final[i],key_final[i + 1]);
+ mistake++;
+ }
+ }
+
+ if (mistake) {
+ diag_printf("FAILED: %d keys out of place.\n", mistake);
+ } else {
+ diag_printf("PASSED: All keys in place.\n");
+ }
+ diag_printf("\n");
+}
+
+void printout()
+
+{
+ int i;
+ int mistake;
+ int *key_final;
+
+ key_final = (int *) key[global->final];
+ diag_printf("\n");
+ diag_printf(" SORTED KEY VALUES\n");
+ diag_printf("%8d ",key_final[0]);
+ for (i = 0; i < num_keys-1; i++) {
+ diag_printf("%8d ",key_final[i+1]);
+ if ((i+2)%5 == 0) {
+ diag_printf("\n");
+ }
+ }
+ diag_printf("\n");
+}
+
+#include <tests_smp/getopt.c>
diff --git a/cesar/ecos/packages/kernel/current/tests_smp/radix_arg.c b/cesar/ecos/packages/kernel/current/tests_smp/radix_arg.c
new file mode 100644
index 0000000000..6858edd616
--- /dev/null
+++ b/cesar/ecos/packages/kernel/current/tests_smp/radix_arg.c
@@ -0,0 +1,12 @@
+//___________________________________________
+#define _str_HAL_SMP_CPU_MAX(x) #x
+#define smp_cyg_test_argc 5
+char *_cyg_argv[] = {
+ "radix.exe",
+ "-p",
+ "2", /* not used, using HAL_SMP_CPU_MAX */
+ "-m",
+ "10"
+};
+#define smp_cyg_test_argv &_cyg_argv
+//'''''''''''''''''''''''''''''''''''''''''''
diff --git a/cesar/ecos/packages/language/c/libc/common/current/ChangeLog b/cesar/ecos/packages/language/c/libc/common/current/ChangeLog
new file mode 100644
index 0000000000..14cc3611e9
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/common/current/ChangeLog
@@ -0,0 +1,46 @@
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/libc.cdl: Fix doc link.
+
+2000-05-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * New package
+ Separated original libc out into separate packages on functional
+ boundaries.
+ Header files are now managed by isoinfra package
+ Plenty of cleanups done, but no major functionality changes
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/common/current/ChangeLog.libc b/cesar/ecos/packages/language/c/libc/common/current/ChangeLog.libc
new file mode 100644
index 0000000000..88fb2f11f2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/common/current/ChangeLog.libc
@@ -0,0 +1,2736 @@
+This ChangeLog file is now obsolete. This is the original ChangeLog from when
+libc was one large package, before being separated. It is included for
+historical reasons.
+
+2000-04-05 Jesper Skov <jskov@redhat.com>
+
+ * src/time/settime.cxx:
+ * src/time/time.cxx:
+ Wallclock moved to io/.
+
+2000-03-28 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/string.cdl,
+ cdl/stdlib.cdl,
+ cdl/stdio.cdl,
+ cdl/libc.cdl:
+
+ Adjust documentation URLs.
+
+2000-03-27 Jesper Skov <jskov@redhat.com>
+
+ * src/clibincl/stream.inl (check_this): Use cyb_bool instead of bool.
+
+2000-03-06 Jesper Skov <jskov@redhat.com>
+
+ * tests/time/strftime.c (test): Adjust test to match below change.
+
+2000-03-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/time/strftime.cxx (do_format): Make sure %m counts from
+ 1..12 rather than 0..11. Fix for case 103300
+
+2000-02-29 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: Correctly use 'n' parameter to
+ restrict length. Credit due to Andrew Lunn here as well.
+ Resolves 103057-CR-1
+
+ * tests/stdio/sprintf2.c (test):
+ Add snprintf tests to verify the correct behaviour of restricting
+ output length
+
+2000-02-10 Jesper Skov <jskov@redhat.com>
+
+ * tests/signal/signal2.c (main):
+ Also reclaim DATA_TLB_MISS vector if available.
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+
+1999-11-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * cdl/string.cdl:
+ Switch to a single boolean configuration option for code size vs.
+ speed optimization.
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl: Define tests.
+
+1999-10-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: We can now remove Berkeley
+ advertising clause
+ * src/stdlib/div.cxx: ditto
+ * src/stdlib/ldiv.cxx: ditto
+ * src/stdlib/strtol.cxx: ditto
+ * src/stdlib/strtoul.cxx: ditto
+ * src/string/strtok.cxx: ditto
+
+1999-10-19 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl:
+
+ Define CDL options for package-specific CFLAGS.
+
+1999-10-08 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_THREAD_PRIORITY): Change
+ default to 10 to keep test farm happy
+ * cdl/startup.cdl: Likewise
+
+1999-10-07 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Specify radio buttons using CDL interfaces.
+
+1999-10-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * cdl/stdio.cdl: Change default to /dev/ttydiag as per 1999-10-01
+ change below
+ * cdl/startup.cdl: Add new form CDL for the startup changes as
+ per 1999-10-05
+
+1999-10-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/libc.h: Add CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM to allow
+ the user to supply their own stack.
+ Rename CYGNUM_LIBC_MAIN_STACK_SIZE to
+ CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE and reparent under
+ CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM
+ Add CYGNUM_LIBC_MAIN_THREAD_PRIORITY to provide main() thread
+ priority
+
+ * src/support/mainthread.cxx: Add support for user-supplied stack
+ Allow user to specify thread priority
+
+ These changes fix CR 101069
+
+1999-10-01 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE): Change
+ default to /dev/ttydiag to get correct console-like behaviour
+ Also don't preclude use if haldiag package isn't included
+ (case 102065)
+
+1999-09-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (cause_fpe): Try both float and integer
+ division by zero.
+
+1999-09-10 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx (cyg_libc_get_malloc_pool): Added for
+ stress_threads test.
+
+1999-09-07 Jesper Skov <jskov@cygnus.co.uk>
+ PRs 20243, 20433
+ * tests/signal/signal2.c: Disabled test3 on ARM.
+
+1999-09-02 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/assert.h: Make the sense of NDEBUG correct; it is "set"
+ when NOT debugging. Fix for CR 101983-CR-1
+ See Stroustrup, "The C++ Programming Language."
+
+1999-08-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen): Set buffer size 0 when not
+ buffering
+ Fix for case 101868
+
+1999-08-17 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Implement radio buttons using "FIXME radio" hack in
+ description field for now.
+
+1999-08-12 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl:
+ Take advantage of MACRONAME_ENUMVAL macros output by CDL.
+
+1999-08-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf2.c (test): Don't rely on 2.345 being exactly
+ representable in binary as a difference of 1 ulp will make it round
+ the wrong way.
+
+1999-07-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fgetc.cxx:
+ Include outline versions of getc() (actually just a symbol alias for
+ fgetc() ) and getchar()
+ Some minor clean-ups
+ Add tracing/assertions
+
+ * src/stdio/input/fputc.cxx:
+ Likewise (except applied to putc() and putchar())
+
+ * src/stdio/common/stdioinlines.cxx (_puts):
+ Call fputc() not _fputc()
+
+ * src/clibincl/stdiosupp.hxx:
+ Remove now obsolete prototypes for _fgetc() and _fputc()
+
+ * include/stdio.h:
+ Don't bother with getc()/putc() macros any more, just call
+ them as functions
+ Include protos for getc(), putc(), getchar() and putchar() functions
+
+1999-06-21 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for SH EDK7708.
+
+1999-06-11 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h: Make FILEs array types so they won't be
+ given $gp relocations on MIPS targets
+
+1999-05-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/ctime.c: Fixed compiler warning.
+
+1999-05-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main):
+ Update CYGPKG_HAL_TX39 -> CYGPKG_HAL_MIPS_TX39 due to recent MIPS
+ HAL changes
+ Fix for PR 20116
+
+1999-04-30 Jesper Skov <jskov@lassi.cygnus.co.uk>
+ PR 19945/19946 workaround
+ * tests/signal/signal2.c: Disabled test 3 for PowerPC sim.
+
+1999-04-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl:
+ Ensure all calls to cyg_libc_time_year_is_leap() are with the full
+ year, and not the direct contents of a struct tm, which are (year-1900)
+
+1999-04-19 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19308, 19410, 19528
+ * tests/time/clock.c (test): Also disable data cache which may
+ affect timing when tracing/assertions are enabled.
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ Add prototype for new cyg_libc_stdio_flush_all_but() function
+
+ * src/clibincl/stream.hxx:
+ Don't include stdiosupp.hxx any more to prevent circular dependency,
+ therefore manually provide _setvbuf prototype
+ Make sure pkgconf/kernel.h is included before mutex.hxx
+
+ * src/clibincl/stream.inl (Cyg_StdioStream::set_error()):
+ Add missing unlock_me()
+
+ * src/stdio/common/fflush.cxx:
+ Separate most of code for fflush(NULL) into separate
+ cyg_libc_stdio_flush_all_but() function, which has the extra
+ capability of omitting one stream
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Add missing clibincl/stdiosupp.hxx include
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::read()):
+ When reading, ensure we flush all output streams
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::flush_output_unlocked):
+ Flush the device as well
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * src/clibincl/streambuf.inl:
+ * src/clibincl/streambuf.hxx:
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ * include/pkgconf/libc.h:
+ * include/stdio.inl (setbuf):
+ Fix dumb typo: BUFSIZE -> BUFSIZ
+ This fixes PR19837
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * include/stdio.inl (setbuf):
+ Use _IONBF when buf==NULL, and _IOLBF otherwise.
+ Fix for PR 19836
+
+1999-04-15 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Tidy display string capitalization.
+
+1999-04-12 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Clarify CDL description of CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE
+
+ * tests/signal/signal2.c: Try harder to generate an exception by
+ accessing a misaligned address
+ Don't handle SIGTRAP any more
+ Part of fix for PRs 19731/19607
+
+1999-04-07 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19667
+ * src/support/mainthread.cxx:
+ Changed to use the new Cyg_Thread constructor.
+
+1999-04-07 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Use new macro
+ HAL_VSR_SET_TO_ECOS_HANDLER if defined, to wrest control from
+ CygMon, for example, by reinstalling eCos' default VSRs for
+ exceptions that we are provoking.
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx: Include stdlib.h for exit()
+ Fix for PR 19720
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/clock.c (test): Disable instruction cache
+ Hopefully fixes PR 19308
+
+1999-03-29 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for PPC as it cannot
+ trap division by zero.
+
+1999-03-26 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/main.cxx (main): Invoke cyg_user_start() if no kernel
+ Only sensible thing to do in our default main in a non-kernel config
+
+1999-03-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/time.c:
+ Increase MAX_TIMEOUT since the sparclite gets very close to overrunning
+ it even when working.
+ Should return -1 iff CYGSEM_LIBC_TIME_TIME_WORKING isn't defined
+ Cosmetic changes
+
+1999-03-25 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/time/time.c (test): Take into account setting of
+ CYGSEM_LIBC_TIME_SETTIME_WORKING ie. does cyg_libc_time_settime()
+ work? If not, check that it returns an error.
+ This was exposed by the random combo in PR#19479.
+
+1999-03-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1 to
+ CYGIMP_...
+
+ Add another rand implementation CYGIMP_LIBC_RAND_SIMPLE1 which is
+ the default
+
+ Part of fix for PR 19562
+
+ * include/sys/cstartup.h:
+ Tidy and remove unnecessary dependencies
+
+ * src/stdlib/rand.cxx:
+ Rename algorithms from CYGSEM_... to CYGIMP_...
+ Add new "simple1" algorithm
+
+ * tests/ctype/ctype.c:
+ Tidy
+
+ * tests/stdlib/rand3.c:
+ Fix so that 0..RAND_MAX is split evenly over buckets, which it wasn't
+ before
+ Deal with case of RAND_MAX not being divisible by NUM_BUCKETS
+ exactly
+ Increase TEST_LENGTH to 200000 to provide more representative sample
+ Add CYG_TEST_INFO output to help ensure it doesn't time out
+ Tidy
+
+ * tests/stdlib/rand4.c:
+ Only fail if more than _two_ thirds (rather than one third) match.
+ This is because half would match for a perfectly random distribution
+ This is the rest of the fix for PR 19562
+ Cosmetic changes
+
+1999-03-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/mainthread.cxx (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ Use CYGNUM_HAL_STACK_SIZE_TYPICAL for the stack size instead of
+ CYGNUM_HAL_MINIMUM_STACK_SIZE.
+
+1999-03-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak: Add -Wno-format when building strftime otherwise
+ it generates warnings for things that we do want to test (null
+ string, and %y format)
+
+1999-03-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Put brackets back round negative number since sdf says the config
+ tool is fixed now (PR 19537)
+
+ Add new CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1
+ options for different rand() algorithms in a so far failed attempt
+ to fix PR 19562
+
+ * src/stdlib/rand.cxx:
+ Add new optional algorithm from Knuth vol.2
+
+ * tests/stdlib/rand4.c:
+ Some tidies
+ Don't run test when using simplest algorithm
+
+ * tests/signal/signal2.c (main):
+ Don't try to make an FPE on tx39 - its possible to detect but requires
+ too much HAL work to be sensible
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Use HAL_ENABLE_INTERRUPTS() rather than kernel to enable interrupts
+
+1999-03-18 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/PKGconf.mak (TESTS): added rand4 compilation.
+
+ * tests/stdlib/rand4.c: added this test for periodicity in the
+ least significant bit of rand().
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Remove CYGFUN_LIBC_TIME_POSIX dependency
+ on CYGPKG_LIBC_STDIO
+
+ * src/stdlib/itoa.cxx:
+ New file to convert integers to ascii
+
+ * include/stdlib.h:
+ Add proto for new cyg_libc_itoa() function
+
+ * include/time.inl:
+ Rework __asctime_r() to use memcpy() and cyg_libc_itoa() rather than
+ sprintf()
+
+ * src/PKGconf.mak:
+ Build stdlib/itoa.cxx
+
+ The above changes fix PR 19448
+
+1999-03-17 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h: Add #define of __time_t_defined to placate newlib
+ if it is used by accident. This is just a temporary workaround though.
+
+1999-03-16 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/PKGconf.mak: Add compile option to step around ARM compiler bug.
+
+1999-03-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Don't use parentheses for now
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Silence bogus compiler warning
+
+1999-03-16 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Enable SIGSEGV test for
+ i386/Linux.
+
+
+1999-03-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Only enable interrupts if they were disabled
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx:
+ Add FIX ME line as a reminder that the workaround there can go away
+ in future
+
+ * include/pkgconf/libc.h:
+ Add proper define for CYGSEM_LIBC_EXIT_CALLS_FFLUSH
+ Put brackets round negative CYGNUM_LIBC_TIME_DST_DEFAULT_STATE define
+ Fix run time typo
+
+ * include/time.inl (__localtime_r):
+ Include sys/timeutil.h before this to get
+ cyg_libc_time_normalize_structtm()
+
+1999-03-12 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx: Remove 'const' from char arrays since
+ this fails [silently] on ARM when -fwritable-strings (PR19440)
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Compiler warnings fix was
+ slightly broken.
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c (main):
+ Disabling SIGTRAP handling on i386/Linux is not a good idea.
+1999-03-11 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c:
+ Added compiler warnings fix.
+ Added N/A handling for i386/Linux.
+
+1999-03-10 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Force "haldiag" device to be present.
+ 'asctime' and friends need 'stdio' as well.
+
+ * include/time.inl: Fix syntax error on difftime() declaration.
+
+1999-03-08 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx: <cyg/infra/cyg_ass.h> needed for this file.
+
+ * src/stdio/common/vsscanf.cxx (str_read): Fix problem with string
+ pointer [created by merge with new I/O package].
+
+1999-03-05 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add legal values for CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET
+ and CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET.
+
+1999-03-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl (cyg_libc_time_year_is_leap):
+ Fix bug with modulo year 400
+ Fix typo in asctime_r macro
+ Fix gmtime_r, and mktime as a result of testing
+
+ * tests/time/asctime.c, tests/time/ctime.c, tests/time/gmtime.c,
+ tests/time/gmtime.c, tests/time/localtime.c, tests/time/mktime.c,
+ tests/time/strftime.c, tests/time/time.c:
+ New tests
+
+ * tests/PKGconf.mak:
+ Build above new tests
+
+ * include/pkgconf/libc.h:
+ Add reminder FIX ME about extra config option
+
+ * src/time/strftime.cxx:
+ Fix %w and %Y parameters as a result of testing
+
+ * src/time/timeutil.cxx:
+ Fix cyg_libc_time_normalize_structtm() as a result of testing
+ of mktime()
+
+ * tests/time/clock.c:
+ Reformat, remove obsolete bits and tidy
+
+ * include/time.h:
+ Add Cyg_libc_time_dst type and new functions
+ cyg_libc_time_setzoneoffsets(), cyg_libc_time_setdst(),
+ cyg_libc_time_getzoneoffsets(), cyg_libc_time_settime()
+
+ * include/time.inl:
+ Implement the above functions. This allows us to adjust for timezone
+ diffences and set the time.
+ Change localtime() to adjust for STD/DST
+ Change mktime() to adjust for STD/DST
+
+ * include/libc.h:
+ Add new config options CYGSEM_LIBC_TIME_SETTIME_WORKING
+ and component CYGPKG_LIBC_TIME_ZONES containing options
+ CYGNUM_LIBC_TIME_DST_DEFAULT_STATE,
+ CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET,
+ CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET
+
+ * src/strftime.cxx:
+ Adjust handling of %Z to _not_ deal with STD/DST
+
+ * src/time/settime.cxx:
+ New file to implement cyg_libc_time_settime()
+
+ * src/PKGconf.mak:
+ Build settime.cxx
+
+ * src/time/timeutil.cxx:
+ Supply outline versions of cyg_libc_time_setzoneoffsets(),
+ cyg_libc_time_setdst(), and cyg_libc_time_getzoneoffsets()
+ Add variables for STD/DST state
+ Some minor comment changes
+
+ * include/errno.h:
+ Use CYGBLD_ATTRIB_CONST instead of __attribute__((const)) directly
+
+ * include/signal.h:
+ Change format of function comment headers
+
+ * include/signal.inl:
+ Restrict errno.h inclusion to when its actually used
+ Fix a spelling typo
+
+ * include/stdlib.h:
+ Add CYGBLD_ATTRIB_CONST to abs, div, labs, ldiv
+
+ * include/stdlib.inl:
+ Reformat and tidy
+ Include new versions of div and ldiv which are more portable and
+ are cleanly rewritten so aren't covered by the BSD licence, which
+ is now removed
+
+ * src/stdlib/div.cxx, src/stdlib/ldiv.cxx:
+ Non-inline, non-BSD and portable versions of the new versions of div
+ and ldiv from stdlib.inl
+
+ * include/time.h:
+ Much reformatting, tidying and improving comments
+ Change CLOCKS_PER_SEC from 1000 to 1000000
+ Add new functions asctime_r, ctime_r, gmtime_r, localtime_r, clock,
+ difftime, mktime, time, asctime, ctime, gmtime, localtime, strftime
+ Include new time.inl file
+
+ * include/pkgconf/libc.h:
+ Add new options CYGSEM_LIBC_TIME_CLOCK_WORKING,
+ CYGSEM_LIBC_TIME_TIME_WORKING, CYGFUN_LIBC_TIME_POSIX,
+ CYGNUM_LIBC_TIME_CLOCK_TRACE_LEVEL, CYGIMP_LIBC_TIME_ASCTIME_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_INLINE, CYGIMP_LIBC_TIME_DIFFTIME_INLINE,
+ CYGIMP_LIBC_TIME_GMTIME_INLINE, CYGIMP_LIBC_TIME_LOCALTIME_INLINE,
+ CYGIMP_LIBC_TIME_MKTIME_INLINE, CYGIMP_LIBC_TIME_ASCTIME_R_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_R_INLINE, CYGIMP_LIBC_TIME_GMTIME_R_INLINE,
+ and CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE
+
+ * time/asctime.cxx, time/asctime_r.cxx, time/clock.cxx, time/ctime.cxx,
+ time/ctime_r.cxx, time/difftime.cxx, time/gmtime.cxx,
+ time/gmtime_r.cxx, time/localtime.cxx, time/localtime_r.cxx,
+ time/mktime.cxx, time/strftime.cxx, time/time.cxx, time/timeutil.cxx,
+ include/time.inl:
+ New files to implement the new time functions. Many of them simply
+ provide the outline definitions, but the real body of the function
+ comes from time.inl
+
+ * src/PKGconf.mak:
+ Build new .cxx files
+
+ * src/clibincl/stdlibsupp.hxx:
+ Remove _div and _ldiv prototypes since they're no longer needed
+
+ * src/clibincl/timesupp.hxx:
+ Delete as its now obsolete
+
+ * src/time/clock.cxx:
+ Use new CYGSEM_LIBC_TIME_CLOCK_WORKING option to control whether it
+ just returns (clock_t)-1 or not.
+ Much reformatting and tidying
+ Change real imlpementation from _clock to __clock
+ Use CYGBLD_ATTRIB_WEAK_ALIAS now
+
+ * tests/stdlib/div.c, tests/stdlib/ldiv.c:
+ Add some extra tests for handling of negative numbers
+ Reformat and tidy a bit, including removing the test for CYGPKG_LIBC
+ since its now always defined if the test is to be compiled
+
+ * tests/time/clock.c:
+ Remove duplication CYG_TEST_INFO line
+ Check if unimplemented using "(clock_t)-1" and not just "-1"
+
+1999-03-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx:
+ Make sure system() is a weak alias for __system()
+
+ * include/pkgconf/libc.h: Rework CDL description for
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE and change its default to
+ "/dev/haldiag"
+
+ * src/stdio/common/stream.cxx:
+ Check that dev is valid when passed to stream constructor
+
+ * src/stdio/common/stdiosupp.cxx:
+ Tidy
+
+ * src/support/mainthread.cxx: Make this depend on
+ CYGSEM_LIBC_STARTUP_MAIN_THREAD rather than just CYGPKG_KERNEL
+
+1999-03-04 Gary Thomas <gthomas@cygnus.co.uk>
+
+ Merged in changes from 'ecos-new_devs-19990216-branch'
+
+ (1999-02-24 Jonathan Larmour <jlarmour@cygnus.co.uk>)
+
+ * src/stdio/common/stream.cxx:
+ Add "fix me" comments and remove a couple of commented out lines
+
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Revert to using pointer to string for private data, not just string.
+ This preserves the state across multiple calls
+
+ (1999-02-24 Gary Thomas <gthomas@cygnus.co.uk>)
+
+ * src/stdio/common/vsscanf.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/stream.cxx:
+ * src/stdio/common/stdiosupp.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/clibincl/stream.inl:
+ * src/clibincl/stream.hxx:
+ * src/clibincl/stdiosupp.hxx:
+ * include/pkgconf/libc.h: Changes for new I/O system.
+
+1999-03-03 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atexit.c: Forgot to config atexit test for
+ CYGFUN_LIBC_ATEXIT option
+
+ * include/pkgconf/libc.h:
+ Require CYGVAR_KERNEL_THREADS_DATA for CYGSEM_LIBC_PER_THREAD_STRTOK
+ This fixes PR 19362
+ Require CYGPKG_KERNEL for thread safe streams
+ Also don't need "requires CYGPKG_KERNEL" for per-thread rand and errno
+ if we already require a finer granularity kernel option
+
+1999-02-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Fix CYGNUM_LIBC_MAIN_STACK_SIZE by changing
+ CYGPKG_LIBC_STARTUP_MAIN_THREAD -> CYGSEM_LIBC_STARTUP_MAIN_THREAD
+ Fix for PR 19304
+
+1999-02-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx: Add to implement trivial system() call
+ * include/stdlib.h: Add system() prototype
+ * src/PKGconf.mak: Build system.cxx
+
+ * tests/ctype/ctype.c, tests/i18n/setlocale.c, tests/setjmp/setjmp.c,
+ tests/signal/signal1.c, tests/signal/signal2.c,
+ tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdio/stdiooutput.c, tests/stdlib/atexit.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/getenv.c, tests/stdlib/labs.c,
+ tests/stdlib/ldiv.c, tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/realloc.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+ Use CYG_TEST_NA() macro for non-applicable test configurations
+
+1999-02-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/signal.h:
+ * include/signal.inl:
+ * src/signal/raise.cxx:
+ * src/signal/siginit.cxx:
+ * src/signal/signal.cxx:
+ * tests/signal/signal1.c
+ * tests/signal/signal2.c:
+ New files to implement ISO standard signals
+
+ * src/PKGconf.mak (TESTS):
+ * tests/PKGconf.mak (TESTS):
+ Update to build new files above
+
+ * include/stdlib.h:
+ * src/clibincl/stdlibsupp.hxx:
+ Comment and QA changes (including giving better names to some types)
+
+ * include/libc.h:
+ Add new configuration options for signals
+ Add new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+ Add a note to CYGNUM_LIBC_MAIN_STACK_SIZE option that it may be
+ overriden by HAL
+ Add new CYGFUN_LIBC_ATEXIT option and move ...ATEXIT_HANDLERS under
+ it
+ Add new CYGSEM_LIBC_EXIT_CALLS_FFLUSH option
+ Require CYGSEM_LIBC_STARTUP_MAIN_THREAD for "Invoke default static
+ constructors" option
+
+ * src/stdlib/atexit.cxx:
+ Support above CYGFUN_LIBC_ATEXIT and QA changes
+
+ * src/stdlib/exit.cxx:
+ Support for above new libc.h options, and some QA changes
+
+ * src/support/cstartup.cxx:
+ Add support for new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+
+ * src/support/mainthread.cxx:
+ Override main stack size if the HAL has a minimum
+
+ * src/string/strncpy.cxx:
+ Use improved algorithm for aligned copies - imported from newlib
+ QA changes
+
+ * src/stdlib/abort.cxx:
+ Support raise(SIGABRT), and some QA
+
+ * include/errno.h:
+ Add const attribute
+
+ * tests/stdlib/abs.c:
+ QA improvements
+
+1999-02-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Only define cyg_libc_main_thread when
+ the kernel is around.
+
+1999-02-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/clock.c: Joined the two test/NOP checks into
+ one.
+ Increased tolerance in attempt to fix PRs 18737,18787,18846.
+ Fixed typo.
+
+1999-01-28 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ * src/stdlib/rand.cxx:
+ Include <pkgconf/kernel.h> if we use kernel header files
+
+1999-01-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c (test):
+ CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT should be
+ CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT
+ Fix for PR 18786
+
+ * src/string/strtok.cxx:
+ * src/stdio/common/stdiofiles.cxx:
+ * src/errno/errno.cxx:
+ * src/stdlib/rand.cxx:
+ Give mutex protection objects a libc constructor priority
+
+ * src/support/invokemain.cxx:
+ Add prototype for cyg_hal_invoke_constructors()
+
+ * src/support/mainthread.cxx:
+ Give cyg_libc_dummy_constructor_obj a libc constructor priority,
+ and make its class have a public constructor
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/stdin.cxx:
+ Give cyg_libc_stdio_stdin/out/err static objects a libc constructor
+ priority
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ Remove private copy constructor. Needed to make prioritised
+ static constructors work. Fix for PR 18898
+
+1999-01-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx:
+ Include pkgconf/kernel.h otherwise it fails with per-thread errno
+ enabled
+
+ * include/pkgconf/libc.h:
+ Enable per-thread errno by default since that is what POSIX would
+ want
+
+ * tests/time/clock.c (test):
+ Placate compiler by initializing clock_first/second/third anyway,
+ even though they won't be in practice. This is only a test program
+ so adding an extra instruction doesn't matter.
+
+ * src/i18n/locale.cxx (_setlocale):
+ Placate compiler, since it is dumb, by nesting, not serializing, if's
+ This is an idempotent change, but screws up the formatting :-(.
+
+ * src/string/strpbrk.cxx (_strpbrk):
+ Change while loop to do loop to placate compiler. It'll even save an
+ instruction too (wow!)
+
+1999-01-22 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add closing curly brace to CYGPKG_LIBC_STRING_STRTOK definition
+
+1999-01-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h:
+ Tidy up and add to header description
+ Change cyg_get_errno_p() to cyg_libc_get_errno_p()
+ Remove ifdef CYGPKG_LIBC
+
+ * include/sys/file_if.h:
+ Remove - move contents to stdio.h
+
+ * include/stdio.h:
+ Tidy up header description
+ Move FILE typedef here from sys/file_if.h
+ SEEK_SET, SEEK_CUR, SEEK_END defined to 0, 1, 2 respectively
+ for backwards compatibility with old UNIX
+ Change definitions of stdin/out/err to be addresses of FILE
+ globals - even though they're actually Cyg_StdioStream it'll work
+
+ * include/pkgconf/libc.h:
+ Make CYGPRI_LIBC_WEAK et al macros depend on new ones in infra
+ Reorganise trace options under the individual components they are
+ associated with.
+ Reorganise thread-safety options under the individual components
+ they are associated with.
+ Add new CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS option
+ Misc. reformatting
+ Remove dependency on pkgconf/kernel.h - Configuration Tool will
+ generate check macros anyway.
+ Remove CYGPKG_LIBC_TRACE, CYGFUN_LIBC_strtok, CYGPKG_LIBC_RAND
+ options
+ Tidy up description header
+
+ * src/clibincl/clibdata.hxx:
+ * src/clibincl/clibdata.inl:
+ * src/support/clibdata.cxx:
+ Remove and instead rely on each component to initialise its own data
+
+ * src/clibincl/stdiofiles.hxx, src/clibincl/stdiofiles.inl:
+ New files to contain global file list and lock (if applicable).
+ Implemented as class with member access functions
+
+ * src/errno/errno.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Rename cyg_get_errno_p() to cyg_libc_get_errno_p()
+
+ * src/stdio/common/fclose.cxx:
+ * src/stdio/common/fflush.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/stdio/common/freopen.cxx:
+ Remove ifdef CYGPKG_LIBC
+ Use new global file access method from stdiofiles.hxx
+ Tidy up description header
+ Use new CYGBLD_ATTRIB_WEAK_ALIAS
+ Access errno "normally" rather than clibdata way
+
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx
+ * src/stdio/common/stderr.cxx:
+ New files. Implement Cyg_StdioStream objects for each stream. In
+ separate self-contained files so using one doesn't bring in the
+ others
+
+ * src/stdio/common/stdiofiles.cxx:
+ New file. Implements global files array and lock
+
+ * src/stdlib/_exit.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Use infra CYGBLD* macros
+
+ * src/stdlib/malloc.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Add pkgconf/kernel.h now that pkgconf/libc.h doesn't have it
+ Use infra CYGBLD* macros
+ Make pool visible externally with weak attribute and new name
+ cyg_libc_malloc_memorypool
+
+ * src/stdlib/rand.cxx:
+ * src/stdlib/strtok.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Use infra CYGBLD* macros
+
+ * src/support/cstartup.cxx:
+ Split into smaller files to make selective linking work better,
+ fix i386 port problem and make GDB happy
+
+ * src/support/environ.cxx:
+ * src/support/invokemain.cxx:
+ * src/support/main.cxx:
+ * src/support/mainthread.cxx:
+ New files from bits of the old cstartup.cxx
+ Add support for CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+
+ * src/PKGconf.mak:
+ Update to reflect file additions/deletion
+
+ * tests/stdlib/rand1.c:
+ * tests/stdlib/rand2.c:
+ * tests/stdlib/rand3.c:
+ * tests/stdlib/srand.c:
+ Make conform to coding standards
+ Remove ifdef CYGPKG_LIBC_RAND
+ Tidy up description header
+
+ * tests/string/strtok.c:
+ Make conform to coding standards
+ Remove ifdef CYGFUN_LIBC_strtok
+ Tidy up description header
+
+1999-01-15 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/stdlib/getenv.c (main): added tests for the case in which
+ the user does not supply environ and in which the user supplies a
+ NULL environ.
+
+1999-01-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Added workaround for weak aliasing
+ problem in i386 gcc.
+
+
+1999-01-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ (CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE): Change defaults to be
+ more reasonable on small systems.
+
+1999-01-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Minor bug with environ not being initialised correctly by
+ default
+
+1998-12-24 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (Cyg_StdioStream):
+ check_this() member functions should now be const
+
+1998-12-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx (_memchr):
+ treat search value parameter to memchr as an unsigned byte,
+ not a signed int - copied fix from newlib PR 18471
+
+1998-12-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/realloc.c:
+ * tests/stdlib/malloc3.c:
+ * tests/stdlib/malloc2.c:
+ Warning cleanup
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c, tests/stdlib/malloc3.c,
+ tests/stdlib/realloc.c:
+ Only run these tests when we have a coalescing memory allocator
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Only check buffer init success if buffering
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ Check for diff of requested size against buffer_size, not
+ get_buffer_size(), since this may return -1, which won't be
+ equal to size, and will cause malloc to be called
+
+1998-12-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stdlib/getenv.c (main): Don't declare variables when they
+ are not used.
+
+Thu Nov 26 17:59:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/string/strncpy1.c:
+ Fix off-by-one error since it called my_strcmp() and not
+ my_strncmp(), which meant in included the trailing NULL when it
+ shouldn't have.
+
+1998-11-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/qsort.cxx (_qsort):
+ * src/stdlib/rand.cxx (_srand):
+ Changed CYG_REPORT_FUNCNAMETYPE to CYG_REPORT_FUNCNAME in void
+ functions.
+
+Mon Oct 26 18:49:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/cstartup.cxx (cyg_libc_dummy_main):
+ Silence compiler warning with cast of char * to CYG_ADDRWORD
+
+Wed Oct 28 17:31:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clock.cxx (_clock):
+ Reorder scaling expression as it was both incorrect and risked
+ overflow.
+ Fix for PR 18076
+
+Mon Oct 19 14:40:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h (EOF):
+ Change from -64 to (-1), to allow broken code to work :-/
+ Also change other negative defines to be within parentheses
+
+1998-10-19 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated the doc URL
+
+Thu Oct 15 21:33:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Only include kernel thread headers when we're in thread-safe mode
+
+ * src/time/clock.cxx:
+ Only include kernel clock headers if there's a kernel with the
+ right functionality available
+
+ * tests/time/clock.c:
+ Remove unnecessary inclusion of <pkgconf/kernel.h>
+
+ Above changes are required for PR 17229
+
+Wed Oct 14 16:38:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise inclusion of clibincl/stdiosupp.hxx and
+ clibincl/stream.hxx. Tidying up PR 17502
+
+Wed Oct 14 14:08:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGPKG_LIBC_STRING_OPTIMISATIONS to
+ CYGPKG_LIBC_STRING_OPTIMIZATIONS to make it truely merkin.
+
+Tue Oct 13 19:34:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_ARGUMENTS):
+ Add a default argv[0] of "" as many programs assume argc>0
+ The standard allows argv[0] to be "" if the program name
+ is not available
+
+1998-09-26 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ PR 17502: this header file now does nothing if the stdio option
+ is disabled completely. This is the same behaviour is
+ clibincl/stream.hxx, although arguably the #ifdef protection
+ should happen wherever the header file is #include'd rather than
+ in the header file itself.
+
+ * src/clibincl/clibdata.hxx:
+ PR 17502: this header file still #include's internal stdio-related
+ header files and references the FILE structure, even if stdio is
+ disabled. There were some #ifdef's for CYGPKG_LIBC_STDIO already.
+ One more has been added for _fopen() and _fclose().
+
+1998-09-25 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl (Cyg_StdioStreamBuffer):
+ PR 17487: Reorder the calls to initialize member fields, to
+ eliminate a compiler warning.
+
+Fri Sep 25 19:04:29 1998 Jonathan Larmour <jlarmour@peshwari.cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/string/strtok.cxx,
+ src/time/clock.cxx:
+ Only define tracing variable and tracing level macro when
+ the relevant tracing level config options are set. Otherwise
+ keep the tracing level fixed at 0
+ Fix for PR 17476
+
+ * include/pkgconf/libc.h:
+ Define trace levels only if parent CYGPKG_LIBC_TRACE is defined
+ for consistency with Configuration Tool
+
+
+Fri Sep 25 17:24:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Make definition of vscanf() dependent on CYGFUN_LIBC_STDIO_ungetc
+ otherwise _vfscanf() won't be compiled. This therefore would
+ cause a link fail iff selective linking is not enabled.
+ Fix for PR 17455
+
+Fri Sep 25 17:23:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/rand.cxx:
+ Make compilation dependent on CYGPKG_LIBC_RAND
+ Fix for PR 17473
+
+ * tests/stdlib/srand.c:
+ Make definition of dummy test pass conditional on CYGPKG_LIBC_RAND
+ not being defined, as well as CYGPKG_LIBC
+ Caused compilation failure when testing PR 17473 fix
+
+Mon Sep 21 17:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Make sscanf test conditional on CYGFUN_LIBC_STDIO_ungetc since
+ _vfscanf() only gets compiled if this is defined
+ Fix for PR 17346
+
+1998-09-20 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated CDL doc strings.
+
+Fri Sep 18 22:18:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_errno_p):
+ Rather than this function only being available in thread-safe mode,
+ instead make what it returns be either the per-thread errno, or
+ global errno depending on the configuration.
+ Include <errno.h> (conditionally) to support this change
+
+Wed Sep 16 11:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove "fix me" comment which I forgot to remove before
+
+Tue Sep 15 19:27:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Updated descriptions and a few other minor things after review.
+ Notably though, the NDEBUG config option has been removed
+
+1998-09-15 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ PR 17201: removed dependency on CYGPKG_KERNEL in the option
+ CYGNUM_LIBC_MAIN_STACK_SIZE, since the actual dependencies cannot
+ be expressed sensibly in the current system.
+
+1998-09-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Sorting out dependencies for error package.
+
+1998-09-10 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: started adding doc fields to the
+ cdl_package data, as a pilot for now.
+
+Wed Sep 9 17:41:23 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add option CYGIMP_LIBC_MALLOC_CXX_DELETE_CALLS_FREE to explicitly
+ control whether the empty delete functions (currently) in
+ kernel/.../common/delete.cxx are enabled; controls code bloat, see
+ the comments in delete.cxx.
+
+Fri Sep 4 16:43:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add a default CYG_TEST_PASS() to make sure the test infra doesn't
+ complain.
+ Also remove the unused string functionsa
+
+Fri Sep 4 15:43:48 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdlib/exit.cxx (__libc_exit):
+ * src/stdlib/_exit.cxx (__libc__exit):
+ * src/stdlib/malloc.cxx (_free):
+ * src/stdlib/abort.cxx (abort):
+ * src/support/cstartup.cxx (invoke_main):
+ Tracing system asserted cos it was being called incorrectly; these
+ are void functions so you shouldn't give a type to the function
+ reporting call.
+
+Fri Sep 4 15:03:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Fix CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE description to refer to
+ the table.cxx file, not table.h
+
+Fri Sep 4 14:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add description for CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE since
+ Proven won't be making any changes to the device driver
+ implementation after all.
+ Fix for PR 17148
+
+ * src/clibincl/stream.inl (set_position):
+ Remove "fix me" line. It is obvious that this will have to change
+ with a filesystem interface
+ Fix for PR 17147
+
+ * src/stdio/common/freopen.cxx:
+ Remove "fix me" - I know about this issue
+ Fix for PR 17145
+
+ * src/stdio/common/stream.cxx (read):
+ Remove "fix me" and change to use memcpy
+ Fix for PR 17144
+
+Fri Sep 4 14:36:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Actually add it this time!
+
+Fri Sep 4 13:48:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add new tests for misc stdio output functions
+
+ * tests/PKGconf.mak:
+ Build stdiooutput.c test
+
+Fri Sep 4 12:52:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (write_byte):
+ Remove bogus assert
+
+ * tests/stdlib/getenv.c (main):
+ Check whether str is NULL before doing a strcmp()
+
+ * tests/stdio/sprintf2.c (main):
+ Reformat to 76 columns
+
+Fri Sep 4 02:10:54 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/stdio/common/stream.cxx:
+ Add new peek_byte method to Cyg_StdioStream
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix up buffer access to work with new peek_byte method above
+ Fix for PR 16954
+
+Thu Sep 3 19:40:11 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/rand1.c, tests/stdlib/rand2.c,
+ tests/stdlib/rand3.c:
+ Add extra check for CYGPKG_LIBC_RAND to decide whether the test
+ is applicable or not
+
+ * tests/stdlib/rand2.c (test):
+ Use CYGNUM_LIBC_RAND_SEED for default seed, not 1
+
+ * tests/string/strtok.c:
+ Add extra check for CYGFUN_LIBC_strtok to decide whether the
+ test is applicable or not
+
+Wed Sep 2 19:11:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fread.cxx, src/stdio/output/fwrite.cxx:
+ Add fread() and fwrite() functions
+
+ * src/PKGconf.mak:
+ Build fread.cxx and fwrite.cxx from above
+
+ * src/stdio/common/stream.cxx:
+ Reformat to 76 columns
+ In write(), move initialisation of *bytes_written to start
+ In read(), move initialisation of *bytes_read to start
+
+ * include/stdio.h:
+ Reformat to 76 columns
+
+ Replace all references to the ANSI
+ standard to instead by the ISO C standard
+
+ Add commented argument names for "documentation"
+
+ Add fread() and fwrite() prototypes
+
+ * src/clibincl/stdiosupp.hxx:
+ Copy the above changes from stdio.h, and add _fread() and _fwrite()
+ prototypes
+
+ * src/stdio/output/fputs.cxx, src/stdio/input/fgets.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 15:41:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 14:46:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Use trylock_me() instead of lock_me(), and loop to prevent
+ deadlocks
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl:
+ Add trylock_me() method
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/fflush.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 12:24:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change 0x7fff to 0x7fffffff. Oops!
+ give main stack size option a legal_values field
+ Undefine tracing by default
+ Add some more description in the header
+
+Tue Sep 1 20:02:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/i18n/setlocale.c (cyg_package_start):
+ Fix typo - extra "x" for no reason at all! :-)
+
+Tue Sep 1 19:44:58 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx:
+ Fix bug in find_locale_data() that miscalculated size of
+ all_locales
+
+ Make find_locale_data() match the locale "" and add some
+ other things in _setlocale() to ensure that "C" gets returned
+ when the default locale "" is passed.
+
+ Only check the locale pointer when it is non-NULL
+
+ * tests/i18n/setlocale.c:
+ New tests for setlocale()
+
+ * tests/PKGconf.mak:
+ Update to build setlocale.c test
+
+ * src/support/cstartup.cxx:
+ Don't actually call system default main() "main" otherwise GDB
+ gets confused and thinks its the entry point. Instead make a weak
+ alias and call the real function something different.
+
+Tue Sep 1 18:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx (_setlocale):
+ Fix tracing macro name and remove "str maybe used before
+ initialised" warning
+
+ * tests/stdlib/qsort.c:
+ Correct file description header
+
+Tue Sep 1 17:04:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/locale.h, src/clibincl/i18nsupp.hxx, src/i18n/locale.cxx:
+ New files to add support for locales as defined by the ISO C
+ standard. i.e. setlocale() and localeconv() functions and some
+ other bits
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAX_LOCALE_NAME_SIZE config option for locale
+ support
+
+ * src/PKGconf.mak:
+ build locale.cxx
+
+ * include/errno.h, src/clibincl/ctypesupp.hxx:
+ Tidy up to 76 columns
+
+Tue Sep 1 00:24:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Move environment-related options from stdlib into new
+ CYGPKG_LIBC_STARTUP component. Also add options for main()'s
+ arguments (CYGPKG_LIBC_ARGUMENTS), main()'s default stack size
+ (CYGNUM_LIBC_MAIN_STACK_SIZE), number of atexit handlers
+ (CYGNUM_LIBC_ATEXIT_HANDLERS), and whether _exit() stops the
+ system (CYGSEM_LIBC_EXIT_STOPS_SYSTEM).
+
+ * src/clibincl/stdlibsupp.hxx:
+ Fix a few comment bugs, and add new
+ cyg_libc_invoke_atexit_handlers() function prototype
+
+ * src/stdlib/_exit.cxx, src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Implement exit(), atexit() and _exit() correctly now. Also
+ includes cyg_libc_invoke_atexit_handlers() in atexit.cxx. Now
+ we get the correct behaviour of atexit(), and exit() invokes the
+ atexit handlers and fflushs all the stdio streams. Add plenty of
+ tracing of asserts too.
+
+ * src/support/cstartup.cxx:
+ Make main_thread object an exported global. Allow user-settable
+ arguments. Add MUCH more tracing and asserts. Improve comments.
+ Tidy up to 76 columns
+
+ * tests/stdlib/atexit.c:
+ Add simple test for atexit() and it calling registered functions
+
+ * tests/PKGconf.mak:
+ Build atexit.c test
+
+Mon Aug 31 18:54:48 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/getenv.cxx, tests/stdlib/getenv.c:
+ Add support for getenv(), and some tests to ensure it works
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update to include getenv.cxx and getenv.c test
+
+ * src/clibincl/clibdata.hxx:
+ remove prototype for environ - we expect files needing it to
+ define it themselves
+
+ * src/support/clibdata.cxx:
+ Tidy up to 76 columns and add definition of char **environ, but
+ with a configurable initialiser (see libc.h below)
+
+ * tests/stdlib/abs.c (main):
+ Tidy up to 76 columns
+
+ * src/stdlib/malloc.cxx:
+ Tidy up to 76 columns and remove warning for undefined _memcpy()
+ by changing to memcpy(), and casting away signedness
+
+ * include/pkgconf/libc.h:
+ Add CYGPKG_LIBC_ENVIRONMENT and CYGDAT_LIBC_DEFAULT_ENVIRONMENT
+ configuration options
+
+ * include/pkgconf/libc.h, src/clibincl/clibdata.hxx:
+ Tidy up to 76 columns
+
+ * include/stdlib.h:
+ Add getenv() prototype and tidy up to 76 columns
+
+ * src/clibincl/stdlibsupp.hxx:
+ Add _getenv() prototype
+
+Mon Aug 31 13:37:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Add realloc()
+
+ * tests/stdlib/realloc.c:
+ Add this file to test new realloc() functionality
+
+ * tests/PKGconf.mak:
+ Build realloc test
+
+ * tests/stdlib/malloc3.c (main), tests/stdlib/malloc2.c (main),
+ tests/stdlib/malloc1.c (main):
+ Conditionalise local vars to prevent warnings
+
+ * tests/stdlib/malloc3.c (fill_with_data):
+ Move '{' into "verb" line
+
+ * include/pkgconf/libc.h:
+ Require infra tracing support to allow tracing
+
+ * include/stdlib.h:
+ Add realloc()
+
+ * src/clibincl/stdlibsupp.hxx:
+ Update the commented argument names from stdlib.h, including realloc()
+
+1998-08-28 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ * src/clibincl/clibdata.hxx, src/time/clock.cxx:
+
+ Updated for new kernel configuration option symbol names
+
+Fri Aug 28 19:18:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ Changed the entry below to sat "tx39" instead of "mn10300".
+ It's been a long week.
+
+Fri Aug 28 18:59:20 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Add a weakly named main to allow the
+ default configuration to link on the tx39 which has no
+ scalextric linking yet. The static Cyg_Thread main_thread object
+ below continues to exist, though unreferenced, so all its
+ descendants must exist too.
+
+Fri Aug 28 08:54:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h:
+ Add commented argument names Add exit(), and atexit(). And move
+ these along with abort() and _exit() to a new section.
+
+ * src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Add trivial versions of atexit() and exit()
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAIN_STACK_SIZE config option
+
+ * include/sys/cstartup.h, src/support/cstartup.cxx, src/PKGconf.mak:
+ New files to provide a new function cyg_iso_c_support(), which
+ invokes main "correctly".
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/srand.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcoll2.c, tests/string/strcpy1.c,
+ tests/string/strcpy2.c, tests/string/strcspn.c,
+ tests/string/strlen.c, tests/string/strncat1.c,
+ tests/string/strncat2.c, tests/string/strncpy1.c,
+ tests/string/strncpy2.c, tests/string/strpbrk.c,
+ tests/string/strrchr.c, tests/string/strspn.c,
+ tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c,
+ tests/time/clock.c:
+
+ Modify all tests to use new startup mechanism, and cyg_iso_c_start()
+
+Fri Aug 28 00:29:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Add #ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO around all accesses to
+ flags.last_buffer_op_was_read. Fix for PR 16997
+
+Thu Aug 27 01:12:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/sys/file_if.h:
+ Fix comments and remove cyg_get_file_star()
+
+Wed Aug 26 20:24:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove #define CYGPKG_LIBC is that is meant to live in
+ <pkgconf/system.h> after all
+
+Wed Aug 26 19:39:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ More fixes to CDL stuff to make it work better, and look better on
+ the screen
+
+Tue Aug 25 20:21:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Make some fixes after running the ConfigTool
+
+Tue Aug 25 16:46:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_STDIO_BUFSIZE):
+ Fix typo of CYGNUM_LIBC_STDIO_BUFSIZE
+
+Tue Aug 25 15:10:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Tidy up CDL stuff a bit more, prior to checking it actually works.
+
+Tue Aug 25 11:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c (main):
+ Prevent calls to CYG_TEST_STILL_ALIVE for now
+
+Tue Aug 25 05:39:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change cosmetic paragraph alignment.
+
+Tue Aug 25 03:11:34 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Make stderr initialise with buffer size 0.
+ For PR 16955
+
+Mon Aug 24 17:38:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ First pass at CDL-ifying the C library configuration. Currently
+ deliberately disabled as there a few outstanding issues.
+
+Mon Aug 24 16:14:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx (_vfnprintf):
+ clear up warning for unused argument
+
+ * tests/stdlib/malloc2.c (NUM_ITERATIONS):
+ Lower to 100 from 50000 so it won't take too long under the simulator
+
+Thu Aug 20 17:48:43 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Remove now unnecessary inclusion of kernel/ktypes.h
+
+Wed Aug 19 19:19:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c,
+ tests/stdio/sscanf.c, tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c,
+ tests/stdlib/strtoul.c, tests/string/strtok.c,
+ tests/time/clock.c:
+ Add parameters to "main()" to silence warnings
+
+Wed Aug 19 18:52:59 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Put conditional error check into same #ifdef and if as what was being
+ checked in the first place!
+
+Wed Aug 19 18:49:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl:
+ Reorder Cyg_StdioStream::check_this() to be first to silence
+ warnings
+
+Tue Aug 18 16:10:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * ecc/language/c/libc/current/src/clibincl/clibdata.hxx,
+ ecc/language/c/libc/current/src/errno/errno.cxx,
+ ecc/language/c/libc/current/src/stdio/common/fopen.cxx,
+ ecc/language/c/libc/current/src/stdlib/rand.cxx,
+ ecc/language/c/libc/current/src/string/strtok.cxx:
+ Rename CYGIMP_LIBC_INTERNAL_DATA_PREAMBLE,
+ CYGIMP_LIBC_INTERNAL_DATA_ALLOC_CHECK_PREAMBLE,
+ CYGVAR_LIBC_INTERNAL_DATA, and
+ CYGIMP_LIBC_INTERNAL_DATA_CHECK to all have CYGPRI_ prefix instead
+ as recommended by the config name rules
+
+
+Tue Aug 18 14:31:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/setvbuf.cxx (_setvbuf):
+ Rename variable names in assert line, otherwise doesn't build
+ with asserts on!
+
+Sun Aug 16 18:15:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix some bugs, although there are some left to fix still. Unrelated
+ to the rest of the checkins, so I will check the partial fix in now.
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx:
+ Add parameters to constructor to allow more things to be done at
+ construction time.
+
+ Now we have "new", remove separate "construct" method
+
+ Add more documentation on constructor
+
+ As requested by code review, where possible, move boolean flags
+ into separate packed bitfield structure for space efficiency
+
+ Make readbuf_char be usable all the time rather than when configured
+ not to be buffering, as it is also needed for non-buffered mode i.e.
+ _IONBF
+
+ * src/stdio/common/fopen.cxx:
+ Change to use new method of construction from above, using new
+
+ Use thread-specific data, rather than global. And so change errnos
+ to access errno entry specifically
+
+ Make process_mode() check for append mode too
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/stdio/common/setvbuf.cxx:
+
+ Change to cope with different way of dealing with buffering policy
+ flags etc. in Cyg_StdioStream
+
+ * src/stdio/common/vsnprintf.cxx, src/stdio/common/vsscanf.cxx,
+ src/support/clibdata.cxx:
+ Change construction of streams to use new parameters added above,
+ and change to use _IONBF mode for string stdio functions,
+ otherwise its a waste of memory. And use _IONBF for stderr as the
+ ISO standard tells us to!
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Change constructor so that it can be set with default size and
+ dynamic buffer (if applicable)
+
+ Fix minor bug in destructor - should only call free when allocated
+ dynamically
+
+ Change get_buffer_size to return -1 if the buffer was not allowed
+ to be set up
+
+ * src/stdio/common/streambuf.cxx:
+ Remove unnecessary stdio.h include and add extra comment to whether
+ to free bit in set_buffer()
+
+ * src/stdio/common/freopen.cxx:
+ Change @@@ to standard fix me string
+
+ * src/stdio/output/fputc.cxx:
+ Remove unnecessary "written" variable
+
+Thu Aug 13 15:37:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx:
+ Included use of "fix me" line to ensure this is discussed before
+ release
+
+ * include/stdlib.h, src/stdlib/abort.cxx, src/PKGconf.mak:
+ Add abort.cxx to implement abort(), albeit naively
+
+Thu Jul 30 18:03:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/vsscanf.cxx (_vsscanf),
+ src/stdio/common/vsnprintf.cxx (_vsnprintf):
+ Fix initialiser of pseudo string device table that didn't get updated
+ when the table changed (Bad proven, no biscuit).
+
+ * src/clibincl/stream.inl (~Cyg_StdioStream):
+ Move invalidation of magic_validity_word to after unlock_me(),
+ otherwise it always fails!
+
+Tue Jul 28 21:29:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Shorten over-long lines
+
+Tue Jul 28 20:28:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx (class Cyg_StdioStream),
+ src/clibincl/stream.inl, src/stdio/common/stream.cxx:
+ Clarify some comments and get the CYGDBG_DEFINE_CHECK_THIS and
+ CYG_ASSERTCLASS stuff going
+
+ * src/clibincl/stream.inl:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 15:31:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl, src/stdio/common/streambuf.cxx:
+ Move set_buffer() from streambuf.inl to new file streambuf.cxx
+
+ * src/PKGconf.mak (COMPILE):
+ Build new file streambuf.cxx
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ Add METHODS comment
+
+ * src/stdio/common/stream.cxx:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 00:26:36 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.inl, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/div.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/qsort.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/string/strtok.cxx:
+
+ Include proper Berkeley license inline in the file, rather than
+ referring to an external file
+
+ * doc/COPYING.UCB:
+ Remove, now that it isn't referred to any more
+
+Mon Jul 27 23:34:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl, include/errno.h,
+ include/stdio.h, include/stdio.inl, include/stdlib.h,
+ include/stdlib.inl, include/string.h, include/string.inl,
+ include/time.h, include/sys/file_if.h, src/PKGconf.mak,
+ src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/stdiosupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/streambuf.hxx,
+ src/clibincl/streambuf.inl, src/clibincl/stringsupp.hxx,
+ src/clibincl/timesupp.hxx, src/ctype/isalnum.cxx,
+ src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx,
+ src/ctype/islower.cxx, src/ctype/isprint.cxx,
+ src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx,
+ src/ctype/tolower.cxx, src/ctype/toupper.cxx,
+ src/errno/errno.cxx, src/stdio/common/snprintf.cxx,
+ src/stdio/common/sprintf.cxx, src/stdio/common/sscanf.cxx,
+ src/stdio/common/stdioinlines.cxx, src/stdio/common/stream.cxx,
+ src/stdio/common/ungetc.cxx, src/stdio/common/vsnprintf.cxx,
+ src/stdio/common/vsscanf.cxx, src/stdio/input/fgetc.cxx,
+ src/stdio/input/fgets.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/gets.cxx, src/stdio/input/scanf.cxx,
+ src/stdio/output/fnprintf.cxx, src/stdio/output/fprintf.cxx,
+ src/stdio/output/fputc.cxx, src/stdio/output/fputs.cxx,
+ src/stdio/output/printf.cxx, src/stdlib/_exit.cxx,
+ src/stdlib/abs.cxx, src/stdlib/atof.cxx, src/stdlib/atoi.cxx,
+ src/stdlib/atol.cxx, src/stdlib/div.cxx, src/stdlib/labs.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/rand.cxx, src/stdlib/strtod.cxx,
+ src/string/memchr.cxx, src/string/memcmp.cxx,
+ src/string/memmove.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx,
+ src/string/strcoll.cxx, src/string/strcpy.cxx,
+ src/string/strcspn.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx, src/string/strpbrk.cxx,
+ src/string/strrchr.cxx, src/string/strspn.cxx,
+ src/string/strstr.cxx, src/string/strsuppt.cxx,
+ src/string/strtok.cxx, src/string/strxfrm.cxx,
+ src/support/clibdata.cxx, src/time/clock.cxx:
+ Untabify
+
+Mon Jul 27 23:14:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/stdlib/malloc.cxx, src/stdlib/qsort.cxx,
+ tests/ctype/ctype.c, tests/stdlib/rand3.c, tests/stdlib/malloc3.c:
+ Remove all mentions of "register" in variable declarations. Also
+ untabify where needed
+
+ * src/stdlib/bsearch.cxx:
+ Untabify this too
+
+
+Mon Jul 27 22:18:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/fputc.cxx (_fputc):
+ Replace call to stream write() with call to write_byte()
+
+ * src/clibincl/stream.inl (write_byte):
+ Add asserts for stream write() returning odd values for how much has
+ been written
+
+ (bytes_available_to_read):
+ Remove "register" def for variable declaration
+
+Mon Jul 27 22:06:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdiosupp.cxx:
+ Remove #if 0'd cyg_get_file_star() and unnecessary pseudo string
+ device definition
+
+Mon Jul 27 21:57:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h, src/support/clibdata.cxx:
+ Change CYGXXX_LIBC_STDIO_DEFAULT_CONSOLE to
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE
+
+Mon Jul 27 21:49:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/setjmpsupp.hxx,
+ src/clibincl/stdiosupp.hxx, src/clibincl/stdlibsupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl,
+ src/clibincl/stringsupp.hxx, src/clibincl/timesupp.hxx:
+
+ Change CYGONCE_LIBC_*_{HXX,INL} to CYGONCE_LIBC_CLIBINCL_*_{HXX,INL}
+
+Mon Jul 27 21:34:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change #define XXXXX 1 to #define XXXXX where applicable as per code
+ review
+
+ Also remove obsolete CYGIMP_LIBC_THREAD_START_SUSPENDS_SELF
+
+Mon Jul 27 19:42:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen):
+ Use #ifdef, not #if for config options
+
+Mon Jul 27 15:01:51 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/stream.cxx, src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx:
+ Fixes to compile with the new Cyg_IORB field names.
+
+Thu Jul 9 03:40:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Adjust starting of tests to possibly start scheduler since
+ strtol/stroul rely on errno, which may be a per-thread variable
+
+Thu Jul 9 03:06:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx, src/stdio/common/setvbuf.cxx:
+ Consolidate read and write buffers into single buffer, as it should
+ have been all along
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Add drain_buffer() method to speed up the case when we want the
+ buffer completely emptied
+
+Tue Jul 7 21:26:33 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Add a couple of new tests that check that very long strings work too
+
+Wed Jul 1 19:52:39 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/streambuf.hxx:
+ Do not permit copy constructors
+
+ * src/clibincl/stream.inl, src/stdio/common/fclose.cxx:
+ Make sure we use #ifdef and not #if
+
+ * src/clibincl/streambuf.inl:
+ Use member initialisation list rather than explicit initialisation to
+ reduce warnings
+
+Wed Jul 1 19:17:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h and all files using config options:
+ Rename configuration defines to make them more standard
+
+Thu Jun 25 20:09:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strcat.cxx:
+ Add parentheses on check to silence warning
+ (Verified by proven)
+
+Thu Jun 25 19:30:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Make sure that the malloc pool is initialised before other things
+ can use it. This is done with the hot new constructor ordering
+ feature.
+
+Thu Jun 25 18:27:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Remove bogus ifdef if floating point is _not_ wanted
+
+Thu Jun 25 17:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Fix argument checking to allow first argument of NULL
+
+Thu Jun 25 04:18:50 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_strtok_last_p):
+ Remove bogus assertion
+
+ * src/stdlib/malloc.cxx:
+ Got sense of alignment check assertion the wrong way round, so negate
+ it
+
+Thu Jun 25 03:56:35 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx:
+ Fix argument checking assertions with legitimate nulls here too
+
+Thu Jun 25 03:46:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/strtoul.cxx, src/stdlib/strtol.cxx:
+ Fix argument checking assertions to cope with legitimate nulls
+
+Wed Jun 24 09:01:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Remove extraneous info messages
+
+Wed Jun 24 05:59:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c:
+
+ Change large automatic arrays to static arrays to prevent overuse
+ of a potentially small stack
+
+Wed Jun 24 05:45:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/string/strtok.c, tests/time/clock.c:
+
+ Increase thread stack size from 4K to 32K as in some cases it was
+ too small.
+
+
+Tue Jun 23 20:12:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Add extra tests, including floating point conversion testing
+
+Tue Jun 23 17:01:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Make sure this is only compiled if CYGFUN_LIBC_strtok is defined
+
+Tue Jun 23 06:10:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ add some comments - that's all
+
+ * src/stdio/common/stream.cxx:
+ fix case in refill_read_buffer() for what to do when there's nothing
+ left. Now return EAGAIN
+
+ * src/stdio/common/vsscanf.cxx, src/stdio/input/vfscanf.cxx:
+ Get sscanf working properly and passing tests. Also make sure it
+ ignores FP when its not configured
+
+ * src/stdlib/atof.cxx:
+ Only compile at all if strtod() is present
+
+
+Mon Jun 22 19:13:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise strtok_last and rand_seed better
+
+Mon Jun 22 14:14:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc3.c:
+ Add test for checking that mallocing and freeing repeatedly works
+
+ * tests/PKGconf.mak:
+ Update to reflect addition of the above
+
+Mon Jun 22 13:09:33 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/fopen.cxx
+ * src/stdio/common/stream.cxx
+ * src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx
+ Include cyg/devs/common/iorb.h instead of iorb.hxx
+
+ * src/stdio/common/stream.cxx
+ Use read_blocking and write_blocking instead of just read and
+ write when accessing devices through the virtual device table.
+
+Sun Jun 21 18:19:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Propagate change of return code handling for puts from stdio.inl
+ into here
+
+ * src/stdio/output/fputc.cxx:
+ make sure the right type is used for output - byte not int
+
+ * src/support/clibdata.cxx:
+ Fix #define config mistook. #endif was in wrong place
+
+Sun Jun 21 16:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Allow explicit construction to get around a bug when
+ dynamically allocating per-thread structure
+
+Sun Jun 21 16:02:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c, tests/stdlib/qsort.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+
+ Update tests to "do the right thing" with all configuration settings
+
+
+Sun Jun 21 04:54:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ I have to be careful not to use setjmp() in a way not exactly
+ defined by the standard, so make sure I do, and add a comment
+ documenting these ways.
+
+ Also ensure this test does the right thing in all configurations
+
+Sun Jun 21 04:38:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add extra checks for invalid configurations
+ Also make default for thread safety OFF
+
+ * src/clibincl/clibdata.inl:
+ Adjust indentation
+
+ * src/stdio/output/vfnprintf.cxx:
+ Make printf of -0.0 floating point do the right thing
+
+Sun Jun 21 04:28:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/snprintf.cxx, src/stdio/common/sprintf.cxx,
+ src/stdio/common/sscanf.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/scanf.cxx, src/stdio/output/fnprintf.cxx,
+ src/stdio/output/fprintf.cxx, src/stdio/output/printf.cxx:
+
+ Had to remove inline functions with varargs. Which means separating
+ out each function from stdioinlines.cxx into a separate file, as they
+ no longer belong there. So all the above files were created.
+
+ * include/stdio.inl, src/PKGconf.mak,
+ src/stdio/common/stdioinlines.cxx:
+ Changed to take account of the above
+
+
+Sun Jun 21 03:58:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c:
+ Update with floating-point tests. Also make sure they DTRT in all
+ configurations
+
+Fri Jun 19 19:33:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ accidentally initialised stdin/out/err twice
+
+Fri Jun 19 19:09:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Another typo
+
+Fri Jun 19 18:59:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Missing #endif typo
+
+Fri Jun 19 18:51:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Fix initialisation of static data members. Unsure how it worked at
+ all before!
+
+Fri Jun 19 18:01:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.inl:
+ puts should check whether fputs returns non-negative, rather than
+ non-zero
+
+Fri Jun 19 17:22:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl:
+ Make inclusion of get_errno_p conditional on thread-safety
+
+Wed Jun 17 10:55:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Add weak alias of vfscanf() to _vfscanf()
+
+Wed Jun 17 09:10:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Initialise err to silence compiler warning
+
+Wed Jun 17 08:59:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Most important is the addition of floating point support in
+ src/stdio/output/vfnprintf.cxx and src/stdio/input/vfscanf.cxx. This
+ also required the addition of atof() and strtod() in stdlib which is
+ definitely no bad thing! Other than that...
+
+ * Fix a whole bunch of stuff I messed up first time round. Also the
+ sprintf and sscanf tests are included again.
+
+Tue Jun 16 16:38:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Typo with not putting comment character at the beginning. Sigh.
+
+Tue Jun 16 14:53:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Forgot to (temporarily) remove fputs test for now
+
+Mon Jun 15 20:40:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ Everything to do with stdio has almost completely changed, so there's
+ not much point documenting individual changes.
+
+Mon Jun 15 18:36:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c:
+ Stop it moaning quite as much when it fails by making it exit sooner
+
+ * tests/time/clock.c :
+ This isn't a compound testcase
+
+Thu Jun 11 17:59:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h
+ Reverse sense of NDEBUG ifdef, that was left in accidentally due
+ to testing
+
+Thu Jun 11 04:58:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h, include/string.h, src/clibincl/stringsupp.hxx:
+ Modify as I've now added an "error" package which defines the error
+ codes and strerror()
+
+ * src/errno/strerror.cxx:
+ Moved to new error package and thus deleted
+
+Wed Jun 10 18:37:37 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h:
+ create this header and add assert() function
+
+Wed Jun 10 16:23:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h, src/clibincl/stdlibsupp.hxx, src/stdlib/malloc.cxx:
+ Add malloc(), calloc() and free() functions
+
+ * include/pkgconf/libc.h:
+ Add malloc memory pool size option
+
+ * tests/stdlib/malloc1.c, tests/stdlib/malloc2.c:
+ new tests for malloc
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for new files
+
+Wed Jun 10 15:06:16 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ Add another test
+
+Tue Jun 9 18:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add some setjmp config's and a macro for the noreturn attribute
+
+ * include/setjmp.h, include/setjmp.inl, src/clibincl/setjmpsupp.hxx,
+ src/setjmp/longjmp.cxx, tests/setjmp/setjmp.c:
+ Added to implement and test setjmp() and longjmp()
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for newly added files
+
+Thu Jun 4 01:29:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx, src/string/strcpy.cxx,
+ src/string/strlen.cxx, src/string/strncat.cxx,
+ src/string/strncmp.cxx, src/string/strncpy.cxx:
+ Rename CYGIMP_LIBC_PREFER_SMALL_TO_FAST to
+ CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST
+
+ Also use slower but smaller version when __OPTIMIZE_SIZE__ is
+ defined (which comes from using gcc -Os)
+
+Fri May 29 16:15:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl, src/ctype/isxdigit.cxx:
+ Fix bug that numerals aren't considered hex digits
+
+ * include/time.h:
+ Change clock_t and time_t to be signed so that they can accept -1, as
+ required by other libc functions
+
+ * src/clibincl/clibdata.hxx:
+ Fix typo that CYGIMP_LIBC_THREAD_SUPPORT should be ..._SAFETY
+ Also fix macro to allocate thread-specific data to not set variables
+ in a different stack-frame
+
+ * tests/ctype/ctype.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/stdlib/qsort.c:
+ make ctr unsigned to prevent warnings
+
+ * tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/string/strrchr.c:
+ Fix off by one error
+
+ * tests/string/strspn.c:
+ Fix case-sensitivity problem, and off-by-one error
+
+ * tests/string/strxfrm1.c:
+ Remove bogus bit of test that doesn't apply to strxfrm, and fix typo
+
+
+Fri May 22 16:33:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak
+ Remove CXXFLAGS line now that its redundant
+
+ * tests/everything!
+ Do a blitz change of all tests - break some of them down into
+ different files, add new tests, standardize format, fix bugs,
+ update for recent header file changes and much more!
+
+Wed May 20 17:50:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ interim checkin for different dir structure for Bart
+
+Fri May 15 20:30:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Tidy up some loose ends I forgot: rename src/include directory to
+ src/clibincl. And add clibdata.inl and timesupp.hxx in there.
+
+Thu May 14 19:56:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Basically everything has changed in the C library. Files have
+ been moved, renamed, deleted and reworked. This is a major
+ revision, and now starts from this new baseline rather than doing
+ incremental changes.
+
+Fri Apr 17 18:43:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ECCconf.mak:
+ added for new build system (actually Bart did this, but didn't
+ update this ChangeLog)
+
+Fri Apr 17 15:03:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdio/device/sim.cxx:
+ Make it build with CYG_EMPTY_STATEMENT; the unadorned one is being
+ removed.
+
+Thu Apr 16 00:24:24 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * All source files:
+ replace ECCIMP_LIBC_* conditional ifdef with CYGIMP_LIBC_*
+
+ * include/eccconf/libc.h:
+ improve comments and reorder a bit
+
+Wed Apr 8 14:35:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/Makefile.am, tests/Makefile.am, configure.in:
+ many changes to integrate build structure from release tree
+
+ * src/ctype/Makefile.am, src/ctype/Makefile.in, src/errno/Makefile.am,
+ src/errno/Makefile.in, src/stdio/Makefile.am, src/stdio/Makefile.in,
+ src/stdio/common/Makefile.am, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.am, src/stdio/device/Makefile.in,
+ src/stdio/output/Makefile.am, src/stdio/output/Makefile.in,
+ src/stdio/input/Makefile.am, src/stdio/input/Makefile.in,
+ src/stdlib/Makefile.am, src/stdlib/Makefile.in,
+ src/string/Makefile.am, src/string/Makefile.in,
+ src/support/Makefile.am, src/support/Makefile.in,
+ src/time/Makefile.am, src/time/Makefile.in:
+ Remove as they are now redundant with above changes
+
+ * include/Makefile.am:
+ Add to support above changes
+
+ * include/eccconf/libc.h:
+ Change include file for configuration from kernel to system
+
+ * src/include/kerndiag.hxx, src/stdio/device/kerndiag.cxx,
+ src/time/clockfn.cxx:
+ Change kernel include file to eccconf/kernel.h
+
+ * src/include/strngdev.h:
+ remove unnecessary kernel include
+
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in,
+ tests/Makefile.in, include/Makefile.in:
+ regenerate
+
+Mon Apr 6 20:55:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/abs.cxx, src/stdlib/atoi.cxx, src/stdlib/atol.cxx,
+ src/stdlib/div.cxx, src/stdlib/labs.cxx, src/stdlib/ldiv.cxx:
+ Separated out functions from stdlib.cxx into separate files
+
+ * src/stdlib/stdlib.cxx:
+ removed to be replaced by above files
+
+ * Makefile.am, src/stdlib/Makefile.am:
+ modified to support building above and not building stdlib.cxx
+
+ * src/support/tsd.cxx:
+ Remove unnecessary header file includes
+
+ * Makefile.in, src/stdlib/Makefile.in:
+ regenerated
+
+Mon Apr 6 19:19:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx, include/eccconf/libc.h:
+ remove lame hack for tx39 compiler now that its fixed
+
+ * src/include/sim.hxx:
+ define constants as static to placate compiler
+
+Thu Apr 2 21:01:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ctype/ctype.cxx:
+ deleted and separated out into below files
+
+ * src/ctype/isalnum.cxx, src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx, src/ctype/islower.cxx,
+ src/ctype/isprint.cxx, src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx, src/ctype/tolower.cxx,
+ src/ctype/toupper.cxx:
+ Separated out individual ctype functions from ctype.cxx into separate
+ files
+
+ * Makefile.am, src/ctype/Makefile.am:
+ modified to reflect above deletion/additions
+
+ * Makefile.in, src/ctype/Makefile.in:
+ regenerated
+
+Thu Apr 2 19:08:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: optimise using prefix increments
+
+Thu Apr 2 15:18:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strchr.cxx: optimise setting of mask a little
+
+Thu Mar 26 14:07:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx: fixed some typos
+
+Thu Mar 26 11:58:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/eccconf/libc.h, src/support/tsd.cxx:
+ Implement workaround for tx39 compiler bug.
+
+ * src/include/strsuppt.hxx:
+ remove prototypes for _memcpy() and _memset() as they are now in the
+ kernel
+
+Wed Mar 25 18:31:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/string/Makefile.am: memcpy() and memset() are
+ now in the kernel so remove them from build
+ * include/string.h: add a comment to say as much
+ * Makefile.in, src/string/Makefile.in: regenerate
+
+Wed Mar 25 15:30:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx, src/include/file_if.inl:
+ Change _exit workaround to not cause a compiler optimisation
+ problem. Now just references _exit rather than calls it.
+
+Wed Mar 25 14:59:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fix bug causing tests to fail completely
+ for this function
+
+Wed Mar 25 12:55:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/sim.hxx: add types to constants (oops!)
+ * Makefile.am: link src/stdio/device/sim.cxx
+ * Makefile.in: regenerated
+
+Wed Mar 25 04:14:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/file_if.hxx, src/include/file_if.inl,
+ src/include/kerndiag.hxx, src/include/sim.hxx,
+ src/include/stdio_if.hxx, src/include/strngdev.hxx,
+ src/include/tsd.hxx, src/stdio/common/clearerr.cxx,
+ src/stdio/common/clearerr.cxx, src/stdio/common/feof.cxx,
+ src/stdio/common/ferror.cxx, src/stdio/common/file_if.cxx,
+ src/stdio/common/vsprintf.cxx,
+ src/stdio/device/kerndiag.cxx, src/stdio/device/sim.cxx,
+ src/stdio/device/strngdev.cxx, src/stdio/output/fputc.cxx,
+ src/stdio/output/fputs.cxx, src/stdio/output/puts.cxx,
+ src/stdio/output/vfnprintf.cxx, src/support/tsd.cxx:
+ Modified to support buffered reads including renaming
+ _EccInternalFileStruct to __EccStdioStream which is what affects
+ most of these files
+ * src/include/file_if.inl, src/stdio/common/file_if.cxx: added for
+ the above reason
+ * src/stdio/common/sscanf.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/input/Makefile.am: added to provide sscanf() functionality
+ * include/ctype.h, include/stdio.h, include/stdlib.h,
+ include/string.h, include/eccconf/libc.h, src/ctype/ctype.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/stdio/common/stdio.cxx:
+ rename *_INLINES macros with prefix CYG rather than ECC
+ * include/errno.h, src/errno/errno.cxx, src/errno/strerror.cxx:
+ rename ErrNo to _ErrNo and add EAGAIN and EWOULDBLOCK error codes
+ * configure.in, Makefile.am, src/stdio/Makefile.am,
+ src/stdio/input/Makefile.am: add support for building
+ file_if.cxx sscanf.cxx and vfscanf.cxx
+ * src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/input/Makefile.in, configure, Makefile.in: regenerated
+
+Tue Mar 24 19:51:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clockfn.cxx, src/time/clock.cxx:
+ Renamed clock.cxx to clockfn.cxx (preserving CVS history)
+ * Makefile.am, src/time/Makefile.am: updated to reflect name change
+ * Makefile.in, src/time/Makefile.in: regenerated
+
+Tue Mar 24 16:28:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl: Swap around definitions to get right order so
+ inlining works
+
+Tue Mar 24 14:43:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/stdio.h, include/stdlib.h, include/string.h:
+ modify to only conditionally include inlines
+ * src/ctype/ctype.cxx, src/stdio/common/stdio.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/ctype/Makefile.am: Add to provide real linkable alternatives
+ to inline functions
+ * Makefile.am, configure.in, src/Makefile.am,
+ src/stdio/common/Makefile.am, src/stdlib/Makefile.am,
+ src/string/Makefile.am: modified to support previous additions
+ * include/eccconf/libc.h: redefine inline macro to add extern inline,
+ and add conditional defines for inline functions. Also rename
+ space vs. speed macro to have CYG instead of ECC prefix
+ * include/stdio.inl: fix comment typo
+ * src/stdlib/qsort.cxx: fix to define inline functions properly
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/memcpy.cxx,
+ src/string/memset.cxx, src/string/strcat.cxx, src/string/strchr.cxx,
+ src/string/strcmp.cxx, src/string/strcpy.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx
+ * Makefile.in, configure, src/Makefile.in, src/ctype/Makefile.in,
+ src/stdio/common/Makefile.in, src/stdlib/Makefile.in,
+ src/string/Makefile.in: regenerate
+
+
+Mon Mar 23 19:19:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx: added to support temporary _exit
+ * include/stdlib.h, include/stdlib.inl: added support for _exit and
+ added abs(), labs(), div() and ldiv() functions
+ * src/include/file_if.hxx: added support for _exit kludge
+ * src/stdlib/qsort.cxx: Added Berkeley copyright message
+ * src/time/clock.cxx: Include correct kernel config header as
+ CYG_CONFIGURATION rather than <config.h>
+ * Makefile.am src/stdlib/Makefile.am: added support for _exit
+ * Makefile.in, src/stdlib/Makefile.in: regenerated
+
+Mon Mar 23 14:41:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Replace ECCPKG_ANSI_LIBC with CYGPKG_ANSI_LIBC in all source files
+
+Mon Mar 23 14:28:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/string.inl: add file to provide strcoll()
+ * include/string.h: include string.inl
+ * ctype.h: include ctype.inl (oops!)
+ * include/stdlib.h: include stdlib.inl (oops!)
+
+Mon Mar 23 13:30:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl: added to provide ANSI ctype
+ functionality
+ * include/stdlib.h, include/stdlib.inl, src/include/stdlibbsp.hxx,
+ src/stdlib/Makefile.am, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/stdlib/srand.cxx,
+ src/stdlib/strtol.cxx, src/stdlib/strtoul.cxx: Added to provide
+ many stdlib functions
+ * src/include/tsd.hxx: modified to support rand() random number
+ seed, and added some comments
+ * configure.in, Makefile.am, src/Makefile.am: modified to support
+ addition of above new sources
+ * include/eccconf/libc.h: Add extra helpful comments, and #include
+ kernel config file
+ * src/time/clock.cxx: #include clock.inl and fix to call
+ get_resolution() properly now
+ * Makefile.in, configure, src/Makefile.in, src/errno/Makefile.in,
+ src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.in, src/stdio/output/Makefile.in,
+ src/stdlib/Makefile.in, src/strings/Makefile.in,
+ src/support/Makefile.in, src/time/Makefile.in,
+ tests/Makefile.in: regenerated
+
+
+Sun Mar 22 21:29:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h, src/include/timesupp.hxx, src/time/clock.cxx,
+ src/time/Makefile.am: added to provide clock() function
+ * src/Makefile.am: modified to try to build in src/time directory
+ * include/eccconf/libc.h: added and is now the main configuration
+ file for this package
+ * acconfig.h, include/libcconf.h.in, include/stamp-h.in: removed
+ due to usage of libc.h above instead
+ * Almost all *.h, *.hxx and *.cxx: replaced LIBC_CONFIG_HEADER
+ defined include with simple <pkgconf/libc.h>
+ * configure.in: remove AM_CONFIG_HEADER of libcconf.h and
+ LIBC_CONFIG_HEADER definition. Also remove usage of builtin
+ memcpy() etc. from gcc, and generate src/time/Makefile
+ * Makefile.am: link in src/time/clock.o
+ * src/include/file_if.hxx, src/include/sim.hxx: use config header
+ to decide whether C library is to be used
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in: regenerated
+
+Fri Mar 20 18:08:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fixed bug with ignoring terminating NULL
+
+1998-03-20 Chris Tarpy <ctarpy@bhaji.cygnus.co.uk>
+
+ * configure: - regenerated
+ * Makefile.am: - Support added for libc testcases
+ * Makefile.in: regenerated
+ * configure.in: set c compiler, descend test dir
+ * tests/Makefile.in: added
+ * tests/Makefile.am: added
+ * tests/tcdiag.cxx : added
+
+
+Thu Mar 19 11:41:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Initial check-in of everything
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/common/current/cdl/libc.cdl b/cesar/ecos/packages/language/c/libc/common/current/cdl/libc.cdl
new file mode 100644
index 0000000000..70d2972363
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/common/current/cdl/libc.cdl
@@ -0,0 +1,63 @@
+# ====================================================================
+#
+# libc.cdl
+#
+# C library common package configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jlarmour
+# Contributors:
+# Date: 2000-04-14
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_LIBC {
+ display "ISO C library"
+ description "
+The packages under this package enable compatibility with the ISO C
+standard - ISO/IEC 9899:1990. This allows the user application to use
+well known standard C library functions, and in eCos starts a thread
+to invoke the user function main(). This package is a top-level placeholder
+to contain the implementations."
+ doc ref/libc.html
+}
+
+# ====================================================================
+# EOF libc.cdl
diff --git a/cesar/ecos/packages/language/c/libc/common/current/doc/libc.sgml b/cesar/ecos/packages/language/c/libc/common/current/doc/libc.sgml
new file mode 100644
index 0000000000..c517b42d57
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/common/current/doc/libc.sgml
@@ -0,0 +1,561 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- libc.sgml -->
+<!-- -->
+<!-- eCos C Library -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<PART id="libc">
+<TITLE>The ISO Standard C and Math Libraries</TITLE>
+<CHAPTER id="c-and-math-library-overview">
+<TITLE><!-- <xref> -->C and math library overview</TITLE>
+<anchor id="iso-c-and-math-libraries">
+<PARA><EMPHASIS>eCos</EMPHASIS> provides compatibility with the
+ ISO 9899:1990 specification for the standard C library, which
+ is essentially the same as the better-known ANSI C3.159-1989
+ specification (C-89).</PARA>
+<PARA>There are three aspects of this compatibility supplied by <EMPHASIS>eCos</EMPHASIS>.
+First there is a <!-- <index></index> --><firstterm>C library</firstterm> which
+implements the functions defined by the ISO standard, except for the
+mathematical functions. This is provided by the eCos C library
+packages. </PARA>
+<PARA>Then <EMPHASIS>eCos</EMPHASIS> provides a <!-- <index></index> -->math
+library, which implements the mathematical functions from the ISO
+C library. This distinction between C and math libraries is frequently
+drawn &mdash; most standard C library implementations provide
+separate linkable files for the two, and the math library contains
+all the functions from the <filename>math.h</filename> header
+file.</PARA>
+<PARA>There is a third element to the ISO C library, which is the
+environment in which applications run when they use the standard
+C library. This environment is set up by the C library startup procedure
+(<xref linkend="c-library-startup">)
+and it provides (among other things) a <FUNCTION>main()</FUNCTION> entry
+point function, an <FUNCTION>exit()</FUNCTION> function that
+does the cleanup required by the standard (including handlers registered
+using the <FUNCTION>atexit()</FUNCTION> function), and an environment
+that can be read with <FUNCTION>getenv()</FUNCTION>. </PARA>
+<PARA>The description in this manual focuses on the <EMPHASIS>eCos</EMPHASIS>-specific
+aspects of the C library (mostly related to <EMPHASIS>eCos</EMPHASIS>'s
+configurability) as well as mentioning the omissions from the standard
+in this release. We do not attempt to define the semantics of each
+function, since that information can be found in the ISO, ANSI,
+POSIX and IEEE standards, and the many good books that have been
+written about the standard C library, that cover usage of these
+functions in a more general and useful way.</PARA>
+<SECT1 id="include-non-iso-functions">
+<TITLE>Included non-ISO functions</TITLE>
+<PARA>The following functions from the <!-- <index></index> -->POSIX specification
+are included for convenience: </PARA>
+<PARA> <literal>extern char **</literal><EMPHASIS>environ</EMPHASIS> variable
+(for setting up the environment for use with <FUNCTION>getenv()</FUNCTION>)</PARA>
+<PARA> <FUNCTION>_exit()</FUNCTION> </PARA>
+<PARA> <FUNCTION>strtok_r()</FUNCTION> </PARA>
+<PARA> <FUNCTION>rand_r()</FUNCTION> </PARA>
+<PARA> <FUNCTION>asctime_r()</FUNCTION> </PARA>
+<PARA> <FUNCTION>ctime_r()</FUNCTION> </PARA>
+<PARA> <FUNCTION>localtime_r()</FUNCTION> </PARA>
+<PARA> <FUNCTION>gmtime_r()</FUNCTION> </PARA>
+<PARA><EMPHASIS>eCos</EMPHASIS> provides the following additional
+implementation-specific functions within the standard C library
+to adjust the date and time settings:</PARA>
+<PROGRAMLISTING>void <FUNCTION>cyg_libc_time_setdst</FUNCTION>(
+ cyg_libc_time_dst state
+);</PROGRAMLISTING>
+<PARA>This function sets the state of Daylight Savings Time. The
+values for state are:</PARA>
+<PROGRAMLISTING>CYG_LIBC_TIME_DSTNA unknown
+CYG_LIBC_TIME_DSTOFF off
+CYG_LIBC_TIME_DSTON on</PROGRAMLISTING>
+
+<PROGRAMLISTING>void <FUNCTION>cyg_libc_time_setzoneoffsets</FUNCTION>(
+ time_t stdoffset, time_t dstoffset
+);</PROGRAMLISTING>
+<PARA>This function sets the offsets from UTC used when Daylight
+Savings Time is enabled or disabled. The offsets are in time_t&rsquo;s,
+which are seconds in the current inplementation.</PARA>
+<PROGRAMLISTING><FUNCTION>Cyg_libc_time_dst cyg_libc_time_getzoneoffsets</FUNCTION>(
+ time_t *stdoffset, time_t *dstoffset
+);</PROGRAMLISTING>
+<PARA>This function retrieves the current setting for Daylight Savings
+Time along with the offsets used for both STD and DST. The offsets
+are both in time_t&rsquo;s, which are seconds in the
+current implementation.</PARA>
+<PROGRAMLISTING><FUNCTION>cyg_bool cyg_libc_time_settime</FUNCTION>(
+ time_t utctime
+);</PROGRAMLISTING>
+<PARA>This function sets the current time for the system The time
+is specified as a <type>time_t</type> in UTC.
+It returns non-zero on error.</PARA>
+</SECT1>
+<SECT1 id="math-library-compatibility-modes">
+<TITLE>Math library compatibility modes</TITLE>
+<PARA>This math library is capable of being operated in several
+different compatibility modes. These options deal solely with how
+errors are handled. </PARA>
+<PARA>There are 4 compatibility modes: ANSI/POSIX 1003.1;
+IEEE-754; X/Open Portability Guide issue 3 (XPG3); and
+System V Interface Definition Edition 3. </PARA>
+<PARA>In <!-- <index></index> -->IEEE mode, the <function>matherr()</function> function
+(see below) is never called, no warning messages are printed on
+the stderr output stream, and errno is never set. </PARA>
+<PARA>In <!-- <index></index> -->ANSI/POSIX mode, errno is set correctly,
+but <function>matherr()</function> is never called and no warning messages
+are printed on the stderr output stream. </PARA>
+<PARA>In <!-- <index></index> -->X/Open mode, errno is set correctly,
+<function>matherr()</function> is called, but no warning messages are printed
+on the stderr output stream. </PARA>
+<PARA>In <!-- <index></index> -->SVID mode, functions which overflow return
+a value HUGE (defined in <filename>math.h</filename>), which is the maximum
+single precision floating point value (as opposed to
+HUGE_VAL which is meant to stand for infinity). errno is
+set correctly and <function>matherr()</function> is called. If
+<function>matherr()</function> returns 0, warning messages are printed on
+the stderr output stream for some errors. </PARA>
+<PARA>The mode can be compiled-in as IEEE-only, or any one of the
+above methods settable at run-time. </PARA>
+<NOTE>
+<PARA>This math library assumes that the hardware (or software floating
+point emulation) supports IEEE-754 style arithmetic, 32-bit 2's
+complement integer arithmetic, doubles are in 64-bit IEEE-754 format.</PARA>
+</NOTE>
+<SECT2>
+<TITLE><!-- <index></index> --> matherr()</TITLE>
+<PARA>As mentioned above, in X/Open or SVID modes, the user
+ can supply a function <FUNCTION>matherr()</FUNCTION> of
+ the form:</PARA>
+<PROGRAMLISTING>int <FUNCTION>matherr</FUNCTION>( struct exception *e )
+</PROGRAMLISTING>
+<PARA>where struct exception is defined as:</PARA>
+<PROGRAMLISTING>struct exception {
+ int type;
+ char *name;
+ double arg1, arg2, retval;
+}; </PROGRAMLISTING>
+<PARA>type is the exception type and is one of:</PARA>
+<VARIABLELIST>
+<VARLISTENTRY>
+<TERM>DOMAIN </TERM>
+<LISTITEM>
+
+<PARA>argument domain exception</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM>SING </TERM>
+<LISTITEM>
+
+<PARA>argument singularity</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM>OVERFLOW </TERM>
+<LISTITEM>
+
+<PARA>overflow range exception</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM>UNDERFLOW </TERM>
+<LISTITEM>
+
+<PARA>underflow range exception</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM>TLOSS </TERM>
+<LISTITEM>
+
+<PARA>total loss of significance</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+<VARLISTENTRY>
+<TERM>PLOSS </TERM>
+<LISTITEM>
+
+<PARA>partial loss of significance</PARA>
+</LISTITEM>
+</VARLISTENTRY>
+</VARIABLELIST>
+<PARA><parameter>name</parameter> is a string containing the name of the
+function</PARA>
+<PARA><parameter>arg1</parameter> and <parameter>arg2</parameter> are the
+arguments passed to the function</PARA>
+<PARA><parameter>retval</parameter> is the default value that will be returned
+by the function, and can be changed by <FUNCTION>matherr()</FUNCTION></PARA>
+<NOTE>
+<PARA>matherr must have &ldquo;C&rdquo; linkage, not &ldquo;C&plus;&plus;&rdquo; linkage.</PARA>
+</NOTE>
+<PARA>If matherr returns zero, or the user doesn't supply
+their own matherr, then the following <EMPHASIS>usually</EMPHASIS> happens
+in SVID mode:</PARA><!-- FIXME: must convert this table -->
+ <table>
+<title>Behavior of math exception handling</title>
+<tgroup cols="2">
+<thead>
+<row>
+ <entry>Type</entry>
+ <entry>Behavior</entry
+</row>
+</thead>
+<tbody>
+<row>
+<entry>DOMAIN</entry><entry>0.0 returned,
+errno=EDOM, and a message printed on stderr</entry></row>
+<row>
+<entry>SING</entry><entry>HUGE of appropriate
+sign is returned, errno=EDOM, and a message is printed
+on stderr</entry></row>
+<row>
+<entry>OVERFLOW</entry><entry>HUGE of
+appropriate sign is returned, and errno=ERANGE</entry></row>
+<row>
+<entry>UNDERFLOW</entry><entry>0.0 is
+returned and errno=ERANGE</entry></row>
+<row>
+<entry>TLOSS</entry><entry>0.0 is returned,
+errno=ERANGE, and a message is printed on stderr</entry></row>
+<row>
+<entry>PLOSS</entry><entry>The current
+implementation doesn't return this type</entry></row>
+</tbody>
+</tgroup>
+</table>
+<!-- -->
+<PARA>X/Open mode is similar except that the message is
+not printed on stderr and HUGE_VAL is used in place of
+HUGE</PARA>
+</SECT2>
+<SECT2>
+<TITLE>Thread-safety and re-entrancy</TITLE>
+<PARA>With the appropriate configuration options set below, the
+math library is fully thread-safe if:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>Depending on the compatibility mode, the
+ setting of the errno variable from the C library is
+ thread-safe</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Depending on the compatibility mode, sending error messages
+to the stderr output stream using the C library
+<FUNCTION>fputs()</FUNCTION>
+ function is thread-safe </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Depending on the compatibility mode, the user-supplied
+<FUNCTION>matherr()</FUNCTION>
+ function and anything it depends on are thread-safe </PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+<PARA>In addition, with the exception of the <FUNCTION>gamma*()</FUNCTION> and <FUNCTION>lgamma*()</FUNCTION> functions,
+the math library is reentrant (and thus safe to use from interrupt handlers)
+if the Math library is always in IEEE mode.</PARA>
+</SECT2>
+</SECT1>
+<SECT1 id="libc-implementation-details">
+<TITLE>Some implementation details</TITLE>
+<PARA>Here are some details about the <!-- <index></index> -->implementation
+which might be interesting, although they do not affect the ISO-defined
+semantics of the library. </PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA>It is possible to configure
+<EMPHASIS>eCos</EMPHASIS>
+ to have the standard C library without the kernel. You might want
+to do this to use less memory. But if you disable the kernel, you
+will be unable to use memory allocation, thread-safety and certain
+stdio functions such as input. Other C library functionality is
+unaffected.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>The opaque type returned by
+<FUNCTION>clock()</FUNCTION>
+ is called clock_t, and is implemented as a 64 bit integer.
+The value returned by
+<FUNCTION>clock()</FUNCTION>
+ is only correct if the kernel is configured with real-time clock
+support, as determined by the CYGVAR_KERNEL_COUNTERS_CLOCK
+configuration option in
+<FILENAME>kernel.h</FILENAME>
+.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>The FILE type is not implemented as a structure, but rather
+as a CYG_ADDRESS. </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>The GNU C compiler will place its own <EMPHASIS>built-in</EMPHASIS> implementations
+instead of some C library functions. This can be turned off with
+the <EMPHASIS>-fno-builtin</EMPHASIS> option. The functions affected
+by this are
+<FUNCTION>abs()</FUNCTION>
+,
+<FUNCTION>cos()</FUNCTION>
+,
+<FUNCTION>fabs()</FUNCTION>
+,
+<FUNCTION>labs()</FUNCTION>
+,
+<FUNCTION>memcmp()</FUNCTION>
+,
+<FUNCTION>memcpy()</FUNCTION>
+,
+<FUNCTION>sin()</FUNCTION>
+,
+<FUNCTION>sqrt()</FUNCTION>
+,
+<FUNCTION>strcmp()</FUNCTION>
+,
+<FUNCTION>strcpy()</FUNCTION>
+, and
+<FUNCTION>strlen()</FUNCTION>
+.</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>For faster execution speed you should avoid this option
+and let the compiler use its built-ins. This can be turned off by
+invoking
+<EMPHASIS>GCC</EMPHASIS>
+ with the <EMPHASIS>-fno-builtin</EMPHASIS> option. </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA><FUNCTION>memcpy()</FUNCTION>
+ and
+<FUNCTION>memset()</FUNCTION>
+ are located in the infrastructure package, not in the C library
+package. This is because the compiler calls these functions, and
+the kernel needs to resolve them even if the C library is not configured. </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Error codes such as EDOM and ERANGE, as well as
+<FUNCTION>strerror()</FUNCTION>
+, are implemented in the <EMPHASIS>error</EMPHASIS> package. The
+error package is separate from the rest of the C and math libraries
+so that the rest of
+<EMPHASIS>eCos</EMPHASIS>
+ can use these error handling facilities even if the C library is
+not configured. </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>When
+<FUNCTION>free()</FUNCTION>
+ is invoked, heap memory will normally be coalesced. If the CYGSEM_KERNEL_MEMORY_COALESCE
+configuration parameter is not set, memory will not be coalesced,
+which might cause programs to fail. </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>Signals, as implemented by
+<filename>&lt;signal.h&gt;</filename>, are guaranteed to work
+correctly if raised using the
+<FUNCTION>raise()</FUNCTION>
+ function from a normal working program context. Using signals from
+within an ISR or DSR context is not expected to work. Also, it is
+not guaranteed that if CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS
+is set, that handling a signal using
+<FUNCTION>signal()</FUNCTION>
+ will necessarily catch that form of exception. For example, it
+may be expected that a divide-by-zero error would be caught by handling
+<varname>SIGFPE</varname>. However it depends on the underlying HAL implementation to implement
+the required hardware exception. And indeed the hardware itself
+may not be capable of detecting these exceptions so it may not be
+possible for the HAL implementer to do this in any case. Despite
+this lack of guarantees in this respect, the signals implementation
+is still ISO C compliant since ISO C does not offer any such guarantees
+either. </PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>The
+<FUNCTION>getenv()</FUNCTION>
+ function is implemented (unless the CYGPKG_LIBC_ENVIRONMENT configuration
+option is turned off), but there is no shell or
+<FUNCTION>putenv()</FUNCTION>
+ function to set the environment dynamically. The environment is
+set in a global variable environ, declared as:</PARA>
+<PROGRAMLISTING>extern char **environ; // Standard environment definition</PROGRAMLISTING>
+<PARA>The environment can be statically initialized at startup time
+using the CYGDAT_LIBC_DEFAULT_ENVIRONMENT
+option. If so, remember that the final entry of the array initializer
+must be NULL. </PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+<PARA>Here is a minimal <EMPHASIS>eCos</EMPHASIS> program which
+demonstrates the use of environments (see also the test case in <filename>language/c/libc/current/tests/stdlib/getenv.c</filename>): </PARA>
+<PROGRAMLISTING>#include &lt;stdio.h&gt;
+#include &lt;stdlib.h&gt; // Main header for stdlib functions
+
+extern char **environ; // Standard environment definition
+
+int
+main( int argc, char *argv[] )
+{
+ char *str;
+ char *env[] = { "PATH=/usr/local/bin:/usr/bin",
+ "HOME=/home/fred",
+ "TEST=1234=5678",
+ "home=hatstand",
+ NULL };
+
+ printf("Display the current PATH environment variable\n");
+
+ environ = (char **)&amp;env;
+
+ str = getenv("PATH");
+
+ if (str==NULL) {
+ printf("The current PATH is unset\n");
+ } else {
+ printf("The current PATH is \"%s\"\n", str);
+ }
+ return 0;
+} </PROGRAMLISTING>
+</SECT1>
+<SECT1 id="libc-thread-safety">
+<TITLE><!-- <index></index> -->Thread safety</TITLE>
+<PARA>The ISO C library has configuration options that control thread
+safety, i.e. working behavior if multiple threads call the same
+function at the same time.</PARA>
+<PARA>The following functionality has to be configured correctly,
+or used carefully in a multi-threaded environment:</PARA>
+<ITEMIZEDLIST>
+<LISTITEM>
+<PARA><function>mblen()</function></para>
+</listitem>
+<listitem>
+<para><function>mbtowc()</function></para>
+</listitem>
+<listitem>
+<para><function>wctomb()</function></para>
+</listitem>
+<listitem>
+<para>
+<FUNCTION>printf()</FUNCTION>
+ (and all standard I/O functions except for
+<FUNCTION>sprintf()</FUNCTION>
+ and
+<FUNCTION>sscanf()</FUNCTION></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA><FUNCTION>strtok()</FUNCTION></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA><FUNCTION>rand()</FUNCTION>
+ and
+<FUNCTION>srand()</FUNCTION></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA><FUNCTION>signal()</FUNCTION>
+ and
+<FUNCTION>raise()</FUNCTION></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA><FUNCTION>asctime()</FUNCTION>
+,
+<FUNCTION>ctime()</FUNCTION>
+,
+<FUNCTION>gmtime()</FUNCTION>
+, and
+<FUNCTION>localtime()</FUNCTION></PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>the
+<FUNCTION>errno</FUNCTION>
+ variable</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>the
+<FUNCTION>environ</FUNCTION>
+ variable</PARA>
+</LISTITEM>
+<LISTITEM>
+<PARA>date and time settings</PARA>
+</LISTITEM>
+</ITEMIZEDLIST>
+<PARA>In some cases, to make <EMPHASIS>eCos</EMPHASIS> development
+easier, functions are provided (as specified by POSIX 1003.1) that define
+re-entrant alternatives, i.e. <FUNCTION>rand_r()</FUNCTION>, <FUNCTION>strtok_r()</FUNCTION>, <FUNCTION>asctime_r()</FUNCTION>, <FUNCTION>ctime_r()</FUNCTION>, <FUNCTION>gmtime_r()</FUNCTION>,
+and <FUNCTION>localtime_r()</FUNCTION>. In other cases,
+configuration options are provided that control either locking of functions
+or their shared data, such as with standard I/O streams,
+or by using per-thread data, such as with the <FUNCTION>errno</FUNCTION> variable.</PARA>
+<PARA>In some other cases, like the setting of date and time, no
+re-entrant or thread-safe alternative or configuration is provided
+as it is simply not a worthwhile addition (date and time should
+rarely need to be set.)</PARA>
+</SECT1>
+<SECT1 id="c-library-startup">
+<TITLE><!-- <index></index> --><!-- <xref> -->C library startup</TITLE>
+<PARA>The C library includes a function declared as:</PARA>
+<PROGRAMLISTING>void <FUNCTION>cyg_iso_c_start</FUNCTION>( void )</PROGRAMLISTING>
+<PARA>This function is used to start an environment in which an
+ISO C style program can run in the most compatible way.</PARA>
+<PARA>What this function does is to create a thread which will invoke <FUNCTION>main()</FUNCTION> &mdash; normally
+considered a program's entry point. In particular, it can
+supply arguments to <FUNCTION>main()</FUNCTION> using the CYGDAT_LIBC_ARGUMENTS
+configuration option, and when returning from <FUNCTION>main()</FUNCTION>,
+or calling <FUNCTION>exit()</FUNCTION>, pending stdio file output
+is flushed and any functions registered with <FUNCTION>atexit()</FUNCTION> are
+invoked. This is all compliant with the ISO C standard in this respect. </PARA>
+<PARA>This thread starts execution when the <EMPHASIS>eCos</EMPHASIS> scheduler
+is started. If the <EMPHASIS>eCos</EMPHASIS> kernel package is not
+available (and hence there is no scheduler), then <FUNCTION>cyg_iso_c_start()</FUNCTION> will
+invoke the <FUNCTION>main()</FUNCTION> function directly, i.e.
+it will not return until the <FUNCTION>main()</FUNCTION> function
+returns. </PARA>
+<PARA>The <FUNCTION>main()</FUNCTION> function should be defined
+as the following, and if defined in a C&plus;&plus; file,
+should have &ldquo;C&rdquo; linkage: </PARA>
+<PROGRAMLISTING>extern int <FUNCTION>main</FUNCTION>(
+ int <EMPHASIS>argc,</EMPHASIS>
+ char *<EMPHASIS>argv[] </EMPHASIS>)</PROGRAMLISTING>
+<PARA>The thread that is started by <FUNCTION>cyg_iso_c_start()</FUNCTION> can
+be manipulated directly, if you wish. For example you can suspend
+it. The kernel C API needs a handle to do this, which is available
+by including the following in your source code.</PARA>
+<PROGRAMLISTING>extern cyg_handle_t cyg_libc_main_thread;</PROGRAMLISTING>
+<PARA>Then for example, you can suspend the thread with the line:</PARA>
+<PROGRAMLISTING>cyg_thread_suspend( cyg_libc_main_thread );</PROGRAMLISTING>
+<PARA>If you call <FUNCTION>cyg_iso_c_start()</FUNCTION> and
+do not provide your own <FUNCTION>main()</FUNCTION> function,
+the system will provide a <FUNCTION>main()</FUNCTION> for you
+which will simply return immediately.</PARA>
+<PARA>In the default configuration, <FUNCTION>cyg_iso_c_start()</FUNCTION> is
+invoked automatically by the <FUNCTION>cyg_package_start()</FUNCTION> function
+in the infrastructure configuration. This means that in the simplest
+case, your program can indeed consist of simply:</PARA>
+<PROGRAMLISTING>int main( int argc, char *argv[] )
+{
+ printf("Hello eCos\n");
+}</PROGRAMLISTING>
+<PARA>If you override <FUNCTION>cyg_package_start()</FUNCTION> or <FUNCTION>cyg_start()</FUNCTION>,
+or disable the infrastructure configuration option CYGSEM_START_ISO_C_COMPATIBILITY
+then you must ensure that you call <FUNCTION>cyg_iso_c_start()</FUNCTION> yourself
+if you want to be able to have your program start at the entry point
+of <FUNCTION>main()</FUNCTION> automatically.</PARA>
+</SECT1>
+</CHAPTER>
+</PART>
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/ChangeLog b/cesar/ecos/packages/language/c/libc/i18n/current/ChangeLog
new file mode 100644
index 0000000000..9620ab01c2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/ChangeLog
@@ -0,0 +1,114 @@
+2005-07-30 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * tests/i18nmb.c (main): Really silence the warnings.
+
+2004-02-17 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/i18n.cdl: Add newlib style ctype implementation.
+ CYGSEM_LIBC_I18N_PER_THREAD_MB can be inactive when no kernel.
+ * include/newlibctype.h: New file.
+ * src/newlibctype.cxx: New file.
+ * src/ctype.cxx: Don't define functions if newlib style ctype
+ chosen instead.
+
+ * src/wctomb.cxx (wctomb): Use correct thread data type.
+ * src/mbtowc.cxx (mbtowc): Ditto.
+ * src/mblen.cxx (mblen): Ditto.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/i18n.cdl: Fix doc link.
+
+2001-06-28 Jesper Skov <jskov@redhat.com>
+
+ * tests/i18nmb.c: fix warning.
+
+2001-06-08 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/mbtowc_jp.cxx (__mbtowc_jp): Fix nasty bug for mblen(NULL, x);
+
+ Some other cleanups across the board to the below changes before
+ checking in.
+
+2001-06-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * cdl/i18n.cdl: Added implements CYGINT_ISO_STDLIB_MULTIBYTE.
+ (CYGPKG_LIBC_I18N_LOCALES): New component
+ encompassing supported locales.
+ (CYGFUN_LIBC_I18N_LOCALE_C_JIS): New configuration
+ item to support the new "C-JIS" C/Japanese locale. Option defines
+ CYGINT_LIBC_I18N_MB_REQUIRED.
+ (CYGFUN_LIBC_I18N_LOCALE_C_SJIS): Similar except it is "C-SJIS" locale.
+ (CYGFUN_LIBC_I18N_LOCALE_C_EUCJP): Ditto except it is "C-EUCJP" locale.
+ (CYGSEM_LIBC_I18N_PER_THREAD_MB): New option that determines
+ if multibyte functions will keep state data per thread or not.
+ (CYGNUM_LIBC_I18N_MAX_LOCALE_NAME_SIZE): Changed legal_values and
+ default_value to be dependent on whether the Japanese locales
+ were supported or not.
+ (CYGPKG_LIBC_I18N_TESTS): Add multibyte test.
+ * src/locale.cxx: Moved Cyg_libc_locale_t to internal.h.
+ Changed current ctype locale to be externally accessible variable.
+ Added MB_CUR_MAX value into locale as well as pointers to mbtowc
+ and wctomb functions.
+ [CYGINT_LIBC_I18N_MB_REQUIRED]: Added __mb_cur_max external variable.
+ (all_locales)[CYGFUN_LIBC_I18N_LOCALE_C_JIS]: New "C-JIS" locale
+ added to list.
+ (all_locales)[CYGFUN_LIBC_I18N_LOCALE_C_SJIS]: New "C-SJIS"
+ locale.
+ (all_locales)[CYGFUN_LIBC_I18N_LOCALE_C_EUCJP]: New "C-EUCJP"
+ locale.
+ (setlocale)[CYGINT_LIBC_I18N_MB_REQUIRED]: Added setting of __mb_cur_max
+ when locale changes ctype category.
+ (__get_current_locale_mbtowc_fn): New function.
+ * src/mblen.cxx: New file.
+ * src/mbtowc.cxx: Ditto.
+ * src/mbstowcs.cxx: Ditto.
+ * src/wctomb.cxx: Ditto.
+ * src/wcstombs.cxx: Ditto.
+ * src/mbtowc_jp.cxx: Ditto.
+ * src/mbtowc_c.cxx: Ditto.
+ * src/internal.h: New internal header file.
+ * tests/i18nmb.c: New test case for multibyte functionality.
+
+2000-05-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * New package
+ Separated original libc out into separate packages on functional
+ boundaries.
+ Header files are now managed by isoinfra package
+ Plenty of cleanups done, but no major functionality changes
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/ChangeLog.libc b/cesar/ecos/packages/language/c/libc/i18n/current/ChangeLog.libc
new file mode 100644
index 0000000000..88fb2f11f2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/ChangeLog.libc
@@ -0,0 +1,2736 @@
+This ChangeLog file is now obsolete. This is the original ChangeLog from when
+libc was one large package, before being separated. It is included for
+historical reasons.
+
+2000-04-05 Jesper Skov <jskov@redhat.com>
+
+ * src/time/settime.cxx:
+ * src/time/time.cxx:
+ Wallclock moved to io/.
+
+2000-03-28 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/string.cdl,
+ cdl/stdlib.cdl,
+ cdl/stdio.cdl,
+ cdl/libc.cdl:
+
+ Adjust documentation URLs.
+
+2000-03-27 Jesper Skov <jskov@redhat.com>
+
+ * src/clibincl/stream.inl (check_this): Use cyb_bool instead of bool.
+
+2000-03-06 Jesper Skov <jskov@redhat.com>
+
+ * tests/time/strftime.c (test): Adjust test to match below change.
+
+2000-03-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/time/strftime.cxx (do_format): Make sure %m counts from
+ 1..12 rather than 0..11. Fix for case 103300
+
+2000-02-29 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: Correctly use 'n' parameter to
+ restrict length. Credit due to Andrew Lunn here as well.
+ Resolves 103057-CR-1
+
+ * tests/stdio/sprintf2.c (test):
+ Add snprintf tests to verify the correct behaviour of restricting
+ output length
+
+2000-02-10 Jesper Skov <jskov@redhat.com>
+
+ * tests/signal/signal2.c (main):
+ Also reclaim DATA_TLB_MISS vector if available.
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+
+1999-11-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * cdl/string.cdl:
+ Switch to a single boolean configuration option for code size vs.
+ speed optimization.
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl: Define tests.
+
+1999-10-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: We can now remove Berkeley
+ advertising clause
+ * src/stdlib/div.cxx: ditto
+ * src/stdlib/ldiv.cxx: ditto
+ * src/stdlib/strtol.cxx: ditto
+ * src/stdlib/strtoul.cxx: ditto
+ * src/string/strtok.cxx: ditto
+
+1999-10-19 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl:
+
+ Define CDL options for package-specific CFLAGS.
+
+1999-10-08 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_THREAD_PRIORITY): Change
+ default to 10 to keep test farm happy
+ * cdl/startup.cdl: Likewise
+
+1999-10-07 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Specify radio buttons using CDL interfaces.
+
+1999-10-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * cdl/stdio.cdl: Change default to /dev/ttydiag as per 1999-10-01
+ change below
+ * cdl/startup.cdl: Add new form CDL for the startup changes as
+ per 1999-10-05
+
+1999-10-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/libc.h: Add CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM to allow
+ the user to supply their own stack.
+ Rename CYGNUM_LIBC_MAIN_STACK_SIZE to
+ CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE and reparent under
+ CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM
+ Add CYGNUM_LIBC_MAIN_THREAD_PRIORITY to provide main() thread
+ priority
+
+ * src/support/mainthread.cxx: Add support for user-supplied stack
+ Allow user to specify thread priority
+
+ These changes fix CR 101069
+
+1999-10-01 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE): Change
+ default to /dev/ttydiag to get correct console-like behaviour
+ Also don't preclude use if haldiag package isn't included
+ (case 102065)
+
+1999-09-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (cause_fpe): Try both float and integer
+ division by zero.
+
+1999-09-10 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx (cyg_libc_get_malloc_pool): Added for
+ stress_threads test.
+
+1999-09-07 Jesper Skov <jskov@cygnus.co.uk>
+ PRs 20243, 20433
+ * tests/signal/signal2.c: Disabled test3 on ARM.
+
+1999-09-02 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/assert.h: Make the sense of NDEBUG correct; it is "set"
+ when NOT debugging. Fix for CR 101983-CR-1
+ See Stroustrup, "The C++ Programming Language."
+
+1999-08-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen): Set buffer size 0 when not
+ buffering
+ Fix for case 101868
+
+1999-08-17 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Implement radio buttons using "FIXME radio" hack in
+ description field for now.
+
+1999-08-12 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl:
+ Take advantage of MACRONAME_ENUMVAL macros output by CDL.
+
+1999-08-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf2.c (test): Don't rely on 2.345 being exactly
+ representable in binary as a difference of 1 ulp will make it round
+ the wrong way.
+
+1999-07-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fgetc.cxx:
+ Include outline versions of getc() (actually just a symbol alias for
+ fgetc() ) and getchar()
+ Some minor clean-ups
+ Add tracing/assertions
+
+ * src/stdio/input/fputc.cxx:
+ Likewise (except applied to putc() and putchar())
+
+ * src/stdio/common/stdioinlines.cxx (_puts):
+ Call fputc() not _fputc()
+
+ * src/clibincl/stdiosupp.hxx:
+ Remove now obsolete prototypes for _fgetc() and _fputc()
+
+ * include/stdio.h:
+ Don't bother with getc()/putc() macros any more, just call
+ them as functions
+ Include protos for getc(), putc(), getchar() and putchar() functions
+
+1999-06-21 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for SH EDK7708.
+
+1999-06-11 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h: Make FILEs array types so they won't be
+ given $gp relocations on MIPS targets
+
+1999-05-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/ctime.c: Fixed compiler warning.
+
+1999-05-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main):
+ Update CYGPKG_HAL_TX39 -> CYGPKG_HAL_MIPS_TX39 due to recent MIPS
+ HAL changes
+ Fix for PR 20116
+
+1999-04-30 Jesper Skov <jskov@lassi.cygnus.co.uk>
+ PR 19945/19946 workaround
+ * tests/signal/signal2.c: Disabled test 3 for PowerPC sim.
+
+1999-04-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl:
+ Ensure all calls to cyg_libc_time_year_is_leap() are with the full
+ year, and not the direct contents of a struct tm, which are (year-1900)
+
+1999-04-19 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19308, 19410, 19528
+ * tests/time/clock.c (test): Also disable data cache which may
+ affect timing when tracing/assertions are enabled.
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ Add prototype for new cyg_libc_stdio_flush_all_but() function
+
+ * src/clibincl/stream.hxx:
+ Don't include stdiosupp.hxx any more to prevent circular dependency,
+ therefore manually provide _setvbuf prototype
+ Make sure pkgconf/kernel.h is included before mutex.hxx
+
+ * src/clibincl/stream.inl (Cyg_StdioStream::set_error()):
+ Add missing unlock_me()
+
+ * src/stdio/common/fflush.cxx:
+ Separate most of code for fflush(NULL) into separate
+ cyg_libc_stdio_flush_all_but() function, which has the extra
+ capability of omitting one stream
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Add missing clibincl/stdiosupp.hxx include
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::read()):
+ When reading, ensure we flush all output streams
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::flush_output_unlocked):
+ Flush the device as well
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * src/clibincl/streambuf.inl:
+ * src/clibincl/streambuf.hxx:
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ * include/pkgconf/libc.h:
+ * include/stdio.inl (setbuf):
+ Fix dumb typo: BUFSIZE -> BUFSIZ
+ This fixes PR19837
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * include/stdio.inl (setbuf):
+ Use _IONBF when buf==NULL, and _IOLBF otherwise.
+ Fix for PR 19836
+
+1999-04-15 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Tidy display string capitalization.
+
+1999-04-12 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Clarify CDL description of CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE
+
+ * tests/signal/signal2.c: Try harder to generate an exception by
+ accessing a misaligned address
+ Don't handle SIGTRAP any more
+ Part of fix for PRs 19731/19607
+
+1999-04-07 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19667
+ * src/support/mainthread.cxx:
+ Changed to use the new Cyg_Thread constructor.
+
+1999-04-07 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Use new macro
+ HAL_VSR_SET_TO_ECOS_HANDLER if defined, to wrest control from
+ CygMon, for example, by reinstalling eCos' default VSRs for
+ exceptions that we are provoking.
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx: Include stdlib.h for exit()
+ Fix for PR 19720
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/clock.c (test): Disable instruction cache
+ Hopefully fixes PR 19308
+
+1999-03-29 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for PPC as it cannot
+ trap division by zero.
+
+1999-03-26 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/main.cxx (main): Invoke cyg_user_start() if no kernel
+ Only sensible thing to do in our default main in a non-kernel config
+
+1999-03-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/time.c:
+ Increase MAX_TIMEOUT since the sparclite gets very close to overrunning
+ it even when working.
+ Should return -1 iff CYGSEM_LIBC_TIME_TIME_WORKING isn't defined
+ Cosmetic changes
+
+1999-03-25 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/time/time.c (test): Take into account setting of
+ CYGSEM_LIBC_TIME_SETTIME_WORKING ie. does cyg_libc_time_settime()
+ work? If not, check that it returns an error.
+ This was exposed by the random combo in PR#19479.
+
+1999-03-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1 to
+ CYGIMP_...
+
+ Add another rand implementation CYGIMP_LIBC_RAND_SIMPLE1 which is
+ the default
+
+ Part of fix for PR 19562
+
+ * include/sys/cstartup.h:
+ Tidy and remove unnecessary dependencies
+
+ * src/stdlib/rand.cxx:
+ Rename algorithms from CYGSEM_... to CYGIMP_...
+ Add new "simple1" algorithm
+
+ * tests/ctype/ctype.c:
+ Tidy
+
+ * tests/stdlib/rand3.c:
+ Fix so that 0..RAND_MAX is split evenly over buckets, which it wasn't
+ before
+ Deal with case of RAND_MAX not being divisible by NUM_BUCKETS
+ exactly
+ Increase TEST_LENGTH to 200000 to provide more representative sample
+ Add CYG_TEST_INFO output to help ensure it doesn't time out
+ Tidy
+
+ * tests/stdlib/rand4.c:
+ Only fail if more than _two_ thirds (rather than one third) match.
+ This is because half would match for a perfectly random distribution
+ This is the rest of the fix for PR 19562
+ Cosmetic changes
+
+1999-03-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/mainthread.cxx (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ Use CYGNUM_HAL_STACK_SIZE_TYPICAL for the stack size instead of
+ CYGNUM_HAL_MINIMUM_STACK_SIZE.
+
+1999-03-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak: Add -Wno-format when building strftime otherwise
+ it generates warnings for things that we do want to test (null
+ string, and %y format)
+
+1999-03-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Put brackets back round negative number since sdf says the config
+ tool is fixed now (PR 19537)
+
+ Add new CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1
+ options for different rand() algorithms in a so far failed attempt
+ to fix PR 19562
+
+ * src/stdlib/rand.cxx:
+ Add new optional algorithm from Knuth vol.2
+
+ * tests/stdlib/rand4.c:
+ Some tidies
+ Don't run test when using simplest algorithm
+
+ * tests/signal/signal2.c (main):
+ Don't try to make an FPE on tx39 - its possible to detect but requires
+ too much HAL work to be sensible
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Use HAL_ENABLE_INTERRUPTS() rather than kernel to enable interrupts
+
+1999-03-18 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/PKGconf.mak (TESTS): added rand4 compilation.
+
+ * tests/stdlib/rand4.c: added this test for periodicity in the
+ least significant bit of rand().
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Remove CYGFUN_LIBC_TIME_POSIX dependency
+ on CYGPKG_LIBC_STDIO
+
+ * src/stdlib/itoa.cxx:
+ New file to convert integers to ascii
+
+ * include/stdlib.h:
+ Add proto for new cyg_libc_itoa() function
+
+ * include/time.inl:
+ Rework __asctime_r() to use memcpy() and cyg_libc_itoa() rather than
+ sprintf()
+
+ * src/PKGconf.mak:
+ Build stdlib/itoa.cxx
+
+ The above changes fix PR 19448
+
+1999-03-17 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h: Add #define of __time_t_defined to placate newlib
+ if it is used by accident. This is just a temporary workaround though.
+
+1999-03-16 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/PKGconf.mak: Add compile option to step around ARM compiler bug.
+
+1999-03-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Don't use parentheses for now
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Silence bogus compiler warning
+
+1999-03-16 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Enable SIGSEGV test for
+ i386/Linux.
+
+
+1999-03-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Only enable interrupts if they were disabled
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx:
+ Add FIX ME line as a reminder that the workaround there can go away
+ in future
+
+ * include/pkgconf/libc.h:
+ Add proper define for CYGSEM_LIBC_EXIT_CALLS_FFLUSH
+ Put brackets round negative CYGNUM_LIBC_TIME_DST_DEFAULT_STATE define
+ Fix run time typo
+
+ * include/time.inl (__localtime_r):
+ Include sys/timeutil.h before this to get
+ cyg_libc_time_normalize_structtm()
+
+1999-03-12 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx: Remove 'const' from char arrays since
+ this fails [silently] on ARM when -fwritable-strings (PR19440)
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Compiler warnings fix was
+ slightly broken.
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c (main):
+ Disabling SIGTRAP handling on i386/Linux is not a good idea.
+1999-03-11 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c:
+ Added compiler warnings fix.
+ Added N/A handling for i386/Linux.
+
+1999-03-10 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Force "haldiag" device to be present.
+ 'asctime' and friends need 'stdio' as well.
+
+ * include/time.inl: Fix syntax error on difftime() declaration.
+
+1999-03-08 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx: <cyg/infra/cyg_ass.h> needed for this file.
+
+ * src/stdio/common/vsscanf.cxx (str_read): Fix problem with string
+ pointer [created by merge with new I/O package].
+
+1999-03-05 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add legal values for CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET
+ and CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET.
+
+1999-03-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl (cyg_libc_time_year_is_leap):
+ Fix bug with modulo year 400
+ Fix typo in asctime_r macro
+ Fix gmtime_r, and mktime as a result of testing
+
+ * tests/time/asctime.c, tests/time/ctime.c, tests/time/gmtime.c,
+ tests/time/gmtime.c, tests/time/localtime.c, tests/time/mktime.c,
+ tests/time/strftime.c, tests/time/time.c:
+ New tests
+
+ * tests/PKGconf.mak:
+ Build above new tests
+
+ * include/pkgconf/libc.h:
+ Add reminder FIX ME about extra config option
+
+ * src/time/strftime.cxx:
+ Fix %w and %Y parameters as a result of testing
+
+ * src/time/timeutil.cxx:
+ Fix cyg_libc_time_normalize_structtm() as a result of testing
+ of mktime()
+
+ * tests/time/clock.c:
+ Reformat, remove obsolete bits and tidy
+
+ * include/time.h:
+ Add Cyg_libc_time_dst type and new functions
+ cyg_libc_time_setzoneoffsets(), cyg_libc_time_setdst(),
+ cyg_libc_time_getzoneoffsets(), cyg_libc_time_settime()
+
+ * include/time.inl:
+ Implement the above functions. This allows us to adjust for timezone
+ diffences and set the time.
+ Change localtime() to adjust for STD/DST
+ Change mktime() to adjust for STD/DST
+
+ * include/libc.h:
+ Add new config options CYGSEM_LIBC_TIME_SETTIME_WORKING
+ and component CYGPKG_LIBC_TIME_ZONES containing options
+ CYGNUM_LIBC_TIME_DST_DEFAULT_STATE,
+ CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET,
+ CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET
+
+ * src/strftime.cxx:
+ Adjust handling of %Z to _not_ deal with STD/DST
+
+ * src/time/settime.cxx:
+ New file to implement cyg_libc_time_settime()
+
+ * src/PKGconf.mak:
+ Build settime.cxx
+
+ * src/time/timeutil.cxx:
+ Supply outline versions of cyg_libc_time_setzoneoffsets(),
+ cyg_libc_time_setdst(), and cyg_libc_time_getzoneoffsets()
+ Add variables for STD/DST state
+ Some minor comment changes
+
+ * include/errno.h:
+ Use CYGBLD_ATTRIB_CONST instead of __attribute__((const)) directly
+
+ * include/signal.h:
+ Change format of function comment headers
+
+ * include/signal.inl:
+ Restrict errno.h inclusion to when its actually used
+ Fix a spelling typo
+
+ * include/stdlib.h:
+ Add CYGBLD_ATTRIB_CONST to abs, div, labs, ldiv
+
+ * include/stdlib.inl:
+ Reformat and tidy
+ Include new versions of div and ldiv which are more portable and
+ are cleanly rewritten so aren't covered by the BSD licence, which
+ is now removed
+
+ * src/stdlib/div.cxx, src/stdlib/ldiv.cxx:
+ Non-inline, non-BSD and portable versions of the new versions of div
+ and ldiv from stdlib.inl
+
+ * include/time.h:
+ Much reformatting, tidying and improving comments
+ Change CLOCKS_PER_SEC from 1000 to 1000000
+ Add new functions asctime_r, ctime_r, gmtime_r, localtime_r, clock,
+ difftime, mktime, time, asctime, ctime, gmtime, localtime, strftime
+ Include new time.inl file
+
+ * include/pkgconf/libc.h:
+ Add new options CYGSEM_LIBC_TIME_CLOCK_WORKING,
+ CYGSEM_LIBC_TIME_TIME_WORKING, CYGFUN_LIBC_TIME_POSIX,
+ CYGNUM_LIBC_TIME_CLOCK_TRACE_LEVEL, CYGIMP_LIBC_TIME_ASCTIME_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_INLINE, CYGIMP_LIBC_TIME_DIFFTIME_INLINE,
+ CYGIMP_LIBC_TIME_GMTIME_INLINE, CYGIMP_LIBC_TIME_LOCALTIME_INLINE,
+ CYGIMP_LIBC_TIME_MKTIME_INLINE, CYGIMP_LIBC_TIME_ASCTIME_R_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_R_INLINE, CYGIMP_LIBC_TIME_GMTIME_R_INLINE,
+ and CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE
+
+ * time/asctime.cxx, time/asctime_r.cxx, time/clock.cxx, time/ctime.cxx,
+ time/ctime_r.cxx, time/difftime.cxx, time/gmtime.cxx,
+ time/gmtime_r.cxx, time/localtime.cxx, time/localtime_r.cxx,
+ time/mktime.cxx, time/strftime.cxx, time/time.cxx, time/timeutil.cxx,
+ include/time.inl:
+ New files to implement the new time functions. Many of them simply
+ provide the outline definitions, but the real body of the function
+ comes from time.inl
+
+ * src/PKGconf.mak:
+ Build new .cxx files
+
+ * src/clibincl/stdlibsupp.hxx:
+ Remove _div and _ldiv prototypes since they're no longer needed
+
+ * src/clibincl/timesupp.hxx:
+ Delete as its now obsolete
+
+ * src/time/clock.cxx:
+ Use new CYGSEM_LIBC_TIME_CLOCK_WORKING option to control whether it
+ just returns (clock_t)-1 or not.
+ Much reformatting and tidying
+ Change real imlpementation from _clock to __clock
+ Use CYGBLD_ATTRIB_WEAK_ALIAS now
+
+ * tests/stdlib/div.c, tests/stdlib/ldiv.c:
+ Add some extra tests for handling of negative numbers
+ Reformat and tidy a bit, including removing the test for CYGPKG_LIBC
+ since its now always defined if the test is to be compiled
+
+ * tests/time/clock.c:
+ Remove duplication CYG_TEST_INFO line
+ Check if unimplemented using "(clock_t)-1" and not just "-1"
+
+1999-03-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx:
+ Make sure system() is a weak alias for __system()
+
+ * include/pkgconf/libc.h: Rework CDL description for
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE and change its default to
+ "/dev/haldiag"
+
+ * src/stdio/common/stream.cxx:
+ Check that dev is valid when passed to stream constructor
+
+ * src/stdio/common/stdiosupp.cxx:
+ Tidy
+
+ * src/support/mainthread.cxx: Make this depend on
+ CYGSEM_LIBC_STARTUP_MAIN_THREAD rather than just CYGPKG_KERNEL
+
+1999-03-04 Gary Thomas <gthomas@cygnus.co.uk>
+
+ Merged in changes from 'ecos-new_devs-19990216-branch'
+
+ (1999-02-24 Jonathan Larmour <jlarmour@cygnus.co.uk>)
+
+ * src/stdio/common/stream.cxx:
+ Add "fix me" comments and remove a couple of commented out lines
+
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Revert to using pointer to string for private data, not just string.
+ This preserves the state across multiple calls
+
+ (1999-02-24 Gary Thomas <gthomas@cygnus.co.uk>)
+
+ * src/stdio/common/vsscanf.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/stream.cxx:
+ * src/stdio/common/stdiosupp.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/clibincl/stream.inl:
+ * src/clibincl/stream.hxx:
+ * src/clibincl/stdiosupp.hxx:
+ * include/pkgconf/libc.h: Changes for new I/O system.
+
+1999-03-03 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atexit.c: Forgot to config atexit test for
+ CYGFUN_LIBC_ATEXIT option
+
+ * include/pkgconf/libc.h:
+ Require CYGVAR_KERNEL_THREADS_DATA for CYGSEM_LIBC_PER_THREAD_STRTOK
+ This fixes PR 19362
+ Require CYGPKG_KERNEL for thread safe streams
+ Also don't need "requires CYGPKG_KERNEL" for per-thread rand and errno
+ if we already require a finer granularity kernel option
+
+1999-02-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Fix CYGNUM_LIBC_MAIN_STACK_SIZE by changing
+ CYGPKG_LIBC_STARTUP_MAIN_THREAD -> CYGSEM_LIBC_STARTUP_MAIN_THREAD
+ Fix for PR 19304
+
+1999-02-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx: Add to implement trivial system() call
+ * include/stdlib.h: Add system() prototype
+ * src/PKGconf.mak: Build system.cxx
+
+ * tests/ctype/ctype.c, tests/i18n/setlocale.c, tests/setjmp/setjmp.c,
+ tests/signal/signal1.c, tests/signal/signal2.c,
+ tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdio/stdiooutput.c, tests/stdlib/atexit.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/getenv.c, tests/stdlib/labs.c,
+ tests/stdlib/ldiv.c, tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/realloc.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+ Use CYG_TEST_NA() macro for non-applicable test configurations
+
+1999-02-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/signal.h:
+ * include/signal.inl:
+ * src/signal/raise.cxx:
+ * src/signal/siginit.cxx:
+ * src/signal/signal.cxx:
+ * tests/signal/signal1.c
+ * tests/signal/signal2.c:
+ New files to implement ISO standard signals
+
+ * src/PKGconf.mak (TESTS):
+ * tests/PKGconf.mak (TESTS):
+ Update to build new files above
+
+ * include/stdlib.h:
+ * src/clibincl/stdlibsupp.hxx:
+ Comment and QA changes (including giving better names to some types)
+
+ * include/libc.h:
+ Add new configuration options for signals
+ Add new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+ Add a note to CYGNUM_LIBC_MAIN_STACK_SIZE option that it may be
+ overriden by HAL
+ Add new CYGFUN_LIBC_ATEXIT option and move ...ATEXIT_HANDLERS under
+ it
+ Add new CYGSEM_LIBC_EXIT_CALLS_FFLUSH option
+ Require CYGSEM_LIBC_STARTUP_MAIN_THREAD for "Invoke default static
+ constructors" option
+
+ * src/stdlib/atexit.cxx:
+ Support above CYGFUN_LIBC_ATEXIT and QA changes
+
+ * src/stdlib/exit.cxx:
+ Support for above new libc.h options, and some QA changes
+
+ * src/support/cstartup.cxx:
+ Add support for new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+
+ * src/support/mainthread.cxx:
+ Override main stack size if the HAL has a minimum
+
+ * src/string/strncpy.cxx:
+ Use improved algorithm for aligned copies - imported from newlib
+ QA changes
+
+ * src/stdlib/abort.cxx:
+ Support raise(SIGABRT), and some QA
+
+ * include/errno.h:
+ Add const attribute
+
+ * tests/stdlib/abs.c:
+ QA improvements
+
+1999-02-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Only define cyg_libc_main_thread when
+ the kernel is around.
+
+1999-02-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/clock.c: Joined the two test/NOP checks into
+ one.
+ Increased tolerance in attempt to fix PRs 18737,18787,18846.
+ Fixed typo.
+
+1999-01-28 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ * src/stdlib/rand.cxx:
+ Include <pkgconf/kernel.h> if we use kernel header files
+
+1999-01-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c (test):
+ CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT should be
+ CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT
+ Fix for PR 18786
+
+ * src/string/strtok.cxx:
+ * src/stdio/common/stdiofiles.cxx:
+ * src/errno/errno.cxx:
+ * src/stdlib/rand.cxx:
+ Give mutex protection objects a libc constructor priority
+
+ * src/support/invokemain.cxx:
+ Add prototype for cyg_hal_invoke_constructors()
+
+ * src/support/mainthread.cxx:
+ Give cyg_libc_dummy_constructor_obj a libc constructor priority,
+ and make its class have a public constructor
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/stdin.cxx:
+ Give cyg_libc_stdio_stdin/out/err static objects a libc constructor
+ priority
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ Remove private copy constructor. Needed to make prioritised
+ static constructors work. Fix for PR 18898
+
+1999-01-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx:
+ Include pkgconf/kernel.h otherwise it fails with per-thread errno
+ enabled
+
+ * include/pkgconf/libc.h:
+ Enable per-thread errno by default since that is what POSIX would
+ want
+
+ * tests/time/clock.c (test):
+ Placate compiler by initializing clock_first/second/third anyway,
+ even though they won't be in practice. This is only a test program
+ so adding an extra instruction doesn't matter.
+
+ * src/i18n/locale.cxx (_setlocale):
+ Placate compiler, since it is dumb, by nesting, not serializing, if's
+ This is an idempotent change, but screws up the formatting :-(.
+
+ * src/string/strpbrk.cxx (_strpbrk):
+ Change while loop to do loop to placate compiler. It'll even save an
+ instruction too (wow!)
+
+1999-01-22 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add closing curly brace to CYGPKG_LIBC_STRING_STRTOK definition
+
+1999-01-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h:
+ Tidy up and add to header description
+ Change cyg_get_errno_p() to cyg_libc_get_errno_p()
+ Remove ifdef CYGPKG_LIBC
+
+ * include/sys/file_if.h:
+ Remove - move contents to stdio.h
+
+ * include/stdio.h:
+ Tidy up header description
+ Move FILE typedef here from sys/file_if.h
+ SEEK_SET, SEEK_CUR, SEEK_END defined to 0, 1, 2 respectively
+ for backwards compatibility with old UNIX
+ Change definitions of stdin/out/err to be addresses of FILE
+ globals - even though they're actually Cyg_StdioStream it'll work
+
+ * include/pkgconf/libc.h:
+ Make CYGPRI_LIBC_WEAK et al macros depend on new ones in infra
+ Reorganise trace options under the individual components they are
+ associated with.
+ Reorganise thread-safety options under the individual components
+ they are associated with.
+ Add new CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS option
+ Misc. reformatting
+ Remove dependency on pkgconf/kernel.h - Configuration Tool will
+ generate check macros anyway.
+ Remove CYGPKG_LIBC_TRACE, CYGFUN_LIBC_strtok, CYGPKG_LIBC_RAND
+ options
+ Tidy up description header
+
+ * src/clibincl/clibdata.hxx:
+ * src/clibincl/clibdata.inl:
+ * src/support/clibdata.cxx:
+ Remove and instead rely on each component to initialise its own data
+
+ * src/clibincl/stdiofiles.hxx, src/clibincl/stdiofiles.inl:
+ New files to contain global file list and lock (if applicable).
+ Implemented as class with member access functions
+
+ * src/errno/errno.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Rename cyg_get_errno_p() to cyg_libc_get_errno_p()
+
+ * src/stdio/common/fclose.cxx:
+ * src/stdio/common/fflush.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/stdio/common/freopen.cxx:
+ Remove ifdef CYGPKG_LIBC
+ Use new global file access method from stdiofiles.hxx
+ Tidy up description header
+ Use new CYGBLD_ATTRIB_WEAK_ALIAS
+ Access errno "normally" rather than clibdata way
+
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx
+ * src/stdio/common/stderr.cxx:
+ New files. Implement Cyg_StdioStream objects for each stream. In
+ separate self-contained files so using one doesn't bring in the
+ others
+
+ * src/stdio/common/stdiofiles.cxx:
+ New file. Implements global files array and lock
+
+ * src/stdlib/_exit.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Use infra CYGBLD* macros
+
+ * src/stdlib/malloc.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Add pkgconf/kernel.h now that pkgconf/libc.h doesn't have it
+ Use infra CYGBLD* macros
+ Make pool visible externally with weak attribute and new name
+ cyg_libc_malloc_memorypool
+
+ * src/stdlib/rand.cxx:
+ * src/stdlib/strtok.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Use infra CYGBLD* macros
+
+ * src/support/cstartup.cxx:
+ Split into smaller files to make selective linking work better,
+ fix i386 port problem and make GDB happy
+
+ * src/support/environ.cxx:
+ * src/support/invokemain.cxx:
+ * src/support/main.cxx:
+ * src/support/mainthread.cxx:
+ New files from bits of the old cstartup.cxx
+ Add support for CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+
+ * src/PKGconf.mak:
+ Update to reflect file additions/deletion
+
+ * tests/stdlib/rand1.c:
+ * tests/stdlib/rand2.c:
+ * tests/stdlib/rand3.c:
+ * tests/stdlib/srand.c:
+ Make conform to coding standards
+ Remove ifdef CYGPKG_LIBC_RAND
+ Tidy up description header
+
+ * tests/string/strtok.c:
+ Make conform to coding standards
+ Remove ifdef CYGFUN_LIBC_strtok
+ Tidy up description header
+
+1999-01-15 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/stdlib/getenv.c (main): added tests for the case in which
+ the user does not supply environ and in which the user supplies a
+ NULL environ.
+
+1999-01-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Added workaround for weak aliasing
+ problem in i386 gcc.
+
+
+1999-01-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ (CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE): Change defaults to be
+ more reasonable on small systems.
+
+1999-01-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Minor bug with environ not being initialised correctly by
+ default
+
+1998-12-24 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (Cyg_StdioStream):
+ check_this() member functions should now be const
+
+1998-12-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx (_memchr):
+ treat search value parameter to memchr as an unsigned byte,
+ not a signed int - copied fix from newlib PR 18471
+
+1998-12-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/realloc.c:
+ * tests/stdlib/malloc3.c:
+ * tests/stdlib/malloc2.c:
+ Warning cleanup
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c, tests/stdlib/malloc3.c,
+ tests/stdlib/realloc.c:
+ Only run these tests when we have a coalescing memory allocator
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Only check buffer init success if buffering
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ Check for diff of requested size against buffer_size, not
+ get_buffer_size(), since this may return -1, which won't be
+ equal to size, and will cause malloc to be called
+
+1998-12-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stdlib/getenv.c (main): Don't declare variables when they
+ are not used.
+
+Thu Nov 26 17:59:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/string/strncpy1.c:
+ Fix off-by-one error since it called my_strcmp() and not
+ my_strncmp(), which meant in included the trailing NULL when it
+ shouldn't have.
+
+1998-11-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/qsort.cxx (_qsort):
+ * src/stdlib/rand.cxx (_srand):
+ Changed CYG_REPORT_FUNCNAMETYPE to CYG_REPORT_FUNCNAME in void
+ functions.
+
+Mon Oct 26 18:49:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/cstartup.cxx (cyg_libc_dummy_main):
+ Silence compiler warning with cast of char * to CYG_ADDRWORD
+
+Wed Oct 28 17:31:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clock.cxx (_clock):
+ Reorder scaling expression as it was both incorrect and risked
+ overflow.
+ Fix for PR 18076
+
+Mon Oct 19 14:40:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h (EOF):
+ Change from -64 to (-1), to allow broken code to work :-/
+ Also change other negative defines to be within parentheses
+
+1998-10-19 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated the doc URL
+
+Thu Oct 15 21:33:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Only include kernel thread headers when we're in thread-safe mode
+
+ * src/time/clock.cxx:
+ Only include kernel clock headers if there's a kernel with the
+ right functionality available
+
+ * tests/time/clock.c:
+ Remove unnecessary inclusion of <pkgconf/kernel.h>
+
+ Above changes are required for PR 17229
+
+Wed Oct 14 16:38:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise inclusion of clibincl/stdiosupp.hxx and
+ clibincl/stream.hxx. Tidying up PR 17502
+
+Wed Oct 14 14:08:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGPKG_LIBC_STRING_OPTIMISATIONS to
+ CYGPKG_LIBC_STRING_OPTIMIZATIONS to make it truely merkin.
+
+Tue Oct 13 19:34:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_ARGUMENTS):
+ Add a default argv[0] of "" as many programs assume argc>0
+ The standard allows argv[0] to be "" if the program name
+ is not available
+
+1998-09-26 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ PR 17502: this header file now does nothing if the stdio option
+ is disabled completely. This is the same behaviour is
+ clibincl/stream.hxx, although arguably the #ifdef protection
+ should happen wherever the header file is #include'd rather than
+ in the header file itself.
+
+ * src/clibincl/clibdata.hxx:
+ PR 17502: this header file still #include's internal stdio-related
+ header files and references the FILE structure, even if stdio is
+ disabled. There were some #ifdef's for CYGPKG_LIBC_STDIO already.
+ One more has been added for _fopen() and _fclose().
+
+1998-09-25 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl (Cyg_StdioStreamBuffer):
+ PR 17487: Reorder the calls to initialize member fields, to
+ eliminate a compiler warning.
+
+Fri Sep 25 19:04:29 1998 Jonathan Larmour <jlarmour@peshwari.cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/string/strtok.cxx,
+ src/time/clock.cxx:
+ Only define tracing variable and tracing level macro when
+ the relevant tracing level config options are set. Otherwise
+ keep the tracing level fixed at 0
+ Fix for PR 17476
+
+ * include/pkgconf/libc.h:
+ Define trace levels only if parent CYGPKG_LIBC_TRACE is defined
+ for consistency with Configuration Tool
+
+
+Fri Sep 25 17:24:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Make definition of vscanf() dependent on CYGFUN_LIBC_STDIO_ungetc
+ otherwise _vfscanf() won't be compiled. This therefore would
+ cause a link fail iff selective linking is not enabled.
+ Fix for PR 17455
+
+Fri Sep 25 17:23:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/rand.cxx:
+ Make compilation dependent on CYGPKG_LIBC_RAND
+ Fix for PR 17473
+
+ * tests/stdlib/srand.c:
+ Make definition of dummy test pass conditional on CYGPKG_LIBC_RAND
+ not being defined, as well as CYGPKG_LIBC
+ Caused compilation failure when testing PR 17473 fix
+
+Mon Sep 21 17:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Make sscanf test conditional on CYGFUN_LIBC_STDIO_ungetc since
+ _vfscanf() only gets compiled if this is defined
+ Fix for PR 17346
+
+1998-09-20 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated CDL doc strings.
+
+Fri Sep 18 22:18:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_errno_p):
+ Rather than this function only being available in thread-safe mode,
+ instead make what it returns be either the per-thread errno, or
+ global errno depending on the configuration.
+ Include <errno.h> (conditionally) to support this change
+
+Wed Sep 16 11:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove "fix me" comment which I forgot to remove before
+
+Tue Sep 15 19:27:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Updated descriptions and a few other minor things after review.
+ Notably though, the NDEBUG config option has been removed
+
+1998-09-15 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ PR 17201: removed dependency on CYGPKG_KERNEL in the option
+ CYGNUM_LIBC_MAIN_STACK_SIZE, since the actual dependencies cannot
+ be expressed sensibly in the current system.
+
+1998-09-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Sorting out dependencies for error package.
+
+1998-09-10 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: started adding doc fields to the
+ cdl_package data, as a pilot for now.
+
+Wed Sep 9 17:41:23 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add option CYGIMP_LIBC_MALLOC_CXX_DELETE_CALLS_FREE to explicitly
+ control whether the empty delete functions (currently) in
+ kernel/.../common/delete.cxx are enabled; controls code bloat, see
+ the comments in delete.cxx.
+
+Fri Sep 4 16:43:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add a default CYG_TEST_PASS() to make sure the test infra doesn't
+ complain.
+ Also remove the unused string functionsa
+
+Fri Sep 4 15:43:48 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdlib/exit.cxx (__libc_exit):
+ * src/stdlib/_exit.cxx (__libc__exit):
+ * src/stdlib/malloc.cxx (_free):
+ * src/stdlib/abort.cxx (abort):
+ * src/support/cstartup.cxx (invoke_main):
+ Tracing system asserted cos it was being called incorrectly; these
+ are void functions so you shouldn't give a type to the function
+ reporting call.
+
+Fri Sep 4 15:03:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Fix CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE description to refer to
+ the table.cxx file, not table.h
+
+Fri Sep 4 14:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add description for CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE since
+ Proven won't be making any changes to the device driver
+ implementation after all.
+ Fix for PR 17148
+
+ * src/clibincl/stream.inl (set_position):
+ Remove "fix me" line. It is obvious that this will have to change
+ with a filesystem interface
+ Fix for PR 17147
+
+ * src/stdio/common/freopen.cxx:
+ Remove "fix me" - I know about this issue
+ Fix for PR 17145
+
+ * src/stdio/common/stream.cxx (read):
+ Remove "fix me" and change to use memcpy
+ Fix for PR 17144
+
+Fri Sep 4 14:36:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Actually add it this time!
+
+Fri Sep 4 13:48:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add new tests for misc stdio output functions
+
+ * tests/PKGconf.mak:
+ Build stdiooutput.c test
+
+Fri Sep 4 12:52:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (write_byte):
+ Remove bogus assert
+
+ * tests/stdlib/getenv.c (main):
+ Check whether str is NULL before doing a strcmp()
+
+ * tests/stdio/sprintf2.c (main):
+ Reformat to 76 columns
+
+Fri Sep 4 02:10:54 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/stdio/common/stream.cxx:
+ Add new peek_byte method to Cyg_StdioStream
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix up buffer access to work with new peek_byte method above
+ Fix for PR 16954
+
+Thu Sep 3 19:40:11 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/rand1.c, tests/stdlib/rand2.c,
+ tests/stdlib/rand3.c:
+ Add extra check for CYGPKG_LIBC_RAND to decide whether the test
+ is applicable or not
+
+ * tests/stdlib/rand2.c (test):
+ Use CYGNUM_LIBC_RAND_SEED for default seed, not 1
+
+ * tests/string/strtok.c:
+ Add extra check for CYGFUN_LIBC_strtok to decide whether the
+ test is applicable or not
+
+Wed Sep 2 19:11:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fread.cxx, src/stdio/output/fwrite.cxx:
+ Add fread() and fwrite() functions
+
+ * src/PKGconf.mak:
+ Build fread.cxx and fwrite.cxx from above
+
+ * src/stdio/common/stream.cxx:
+ Reformat to 76 columns
+ In write(), move initialisation of *bytes_written to start
+ In read(), move initialisation of *bytes_read to start
+
+ * include/stdio.h:
+ Reformat to 76 columns
+
+ Replace all references to the ANSI
+ standard to instead by the ISO C standard
+
+ Add commented argument names for "documentation"
+
+ Add fread() and fwrite() prototypes
+
+ * src/clibincl/stdiosupp.hxx:
+ Copy the above changes from stdio.h, and add _fread() and _fwrite()
+ prototypes
+
+ * src/stdio/output/fputs.cxx, src/stdio/input/fgets.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 15:41:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 14:46:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Use trylock_me() instead of lock_me(), and loop to prevent
+ deadlocks
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl:
+ Add trylock_me() method
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/fflush.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 12:24:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change 0x7fff to 0x7fffffff. Oops!
+ give main stack size option a legal_values field
+ Undefine tracing by default
+ Add some more description in the header
+
+Tue Sep 1 20:02:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/i18n/setlocale.c (cyg_package_start):
+ Fix typo - extra "x" for no reason at all! :-)
+
+Tue Sep 1 19:44:58 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx:
+ Fix bug in find_locale_data() that miscalculated size of
+ all_locales
+
+ Make find_locale_data() match the locale "" and add some
+ other things in _setlocale() to ensure that "C" gets returned
+ when the default locale "" is passed.
+
+ Only check the locale pointer when it is non-NULL
+
+ * tests/i18n/setlocale.c:
+ New tests for setlocale()
+
+ * tests/PKGconf.mak:
+ Update to build setlocale.c test
+
+ * src/support/cstartup.cxx:
+ Don't actually call system default main() "main" otherwise GDB
+ gets confused and thinks its the entry point. Instead make a weak
+ alias and call the real function something different.
+
+Tue Sep 1 18:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx (_setlocale):
+ Fix tracing macro name and remove "str maybe used before
+ initialised" warning
+
+ * tests/stdlib/qsort.c:
+ Correct file description header
+
+Tue Sep 1 17:04:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/locale.h, src/clibincl/i18nsupp.hxx, src/i18n/locale.cxx:
+ New files to add support for locales as defined by the ISO C
+ standard. i.e. setlocale() and localeconv() functions and some
+ other bits
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAX_LOCALE_NAME_SIZE config option for locale
+ support
+
+ * src/PKGconf.mak:
+ build locale.cxx
+
+ * include/errno.h, src/clibincl/ctypesupp.hxx:
+ Tidy up to 76 columns
+
+Tue Sep 1 00:24:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Move environment-related options from stdlib into new
+ CYGPKG_LIBC_STARTUP component. Also add options for main()'s
+ arguments (CYGPKG_LIBC_ARGUMENTS), main()'s default stack size
+ (CYGNUM_LIBC_MAIN_STACK_SIZE), number of atexit handlers
+ (CYGNUM_LIBC_ATEXIT_HANDLERS), and whether _exit() stops the
+ system (CYGSEM_LIBC_EXIT_STOPS_SYSTEM).
+
+ * src/clibincl/stdlibsupp.hxx:
+ Fix a few comment bugs, and add new
+ cyg_libc_invoke_atexit_handlers() function prototype
+
+ * src/stdlib/_exit.cxx, src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Implement exit(), atexit() and _exit() correctly now. Also
+ includes cyg_libc_invoke_atexit_handlers() in atexit.cxx. Now
+ we get the correct behaviour of atexit(), and exit() invokes the
+ atexit handlers and fflushs all the stdio streams. Add plenty of
+ tracing of asserts too.
+
+ * src/support/cstartup.cxx:
+ Make main_thread object an exported global. Allow user-settable
+ arguments. Add MUCH more tracing and asserts. Improve comments.
+ Tidy up to 76 columns
+
+ * tests/stdlib/atexit.c:
+ Add simple test for atexit() and it calling registered functions
+
+ * tests/PKGconf.mak:
+ Build atexit.c test
+
+Mon Aug 31 18:54:48 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/getenv.cxx, tests/stdlib/getenv.c:
+ Add support for getenv(), and some tests to ensure it works
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update to include getenv.cxx and getenv.c test
+
+ * src/clibincl/clibdata.hxx:
+ remove prototype for environ - we expect files needing it to
+ define it themselves
+
+ * src/support/clibdata.cxx:
+ Tidy up to 76 columns and add definition of char **environ, but
+ with a configurable initialiser (see libc.h below)
+
+ * tests/stdlib/abs.c (main):
+ Tidy up to 76 columns
+
+ * src/stdlib/malloc.cxx:
+ Tidy up to 76 columns and remove warning for undefined _memcpy()
+ by changing to memcpy(), and casting away signedness
+
+ * include/pkgconf/libc.h:
+ Add CYGPKG_LIBC_ENVIRONMENT and CYGDAT_LIBC_DEFAULT_ENVIRONMENT
+ configuration options
+
+ * include/pkgconf/libc.h, src/clibincl/clibdata.hxx:
+ Tidy up to 76 columns
+
+ * include/stdlib.h:
+ Add getenv() prototype and tidy up to 76 columns
+
+ * src/clibincl/stdlibsupp.hxx:
+ Add _getenv() prototype
+
+Mon Aug 31 13:37:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Add realloc()
+
+ * tests/stdlib/realloc.c:
+ Add this file to test new realloc() functionality
+
+ * tests/PKGconf.mak:
+ Build realloc test
+
+ * tests/stdlib/malloc3.c (main), tests/stdlib/malloc2.c (main),
+ tests/stdlib/malloc1.c (main):
+ Conditionalise local vars to prevent warnings
+
+ * tests/stdlib/malloc3.c (fill_with_data):
+ Move '{' into "verb" line
+
+ * include/pkgconf/libc.h:
+ Require infra tracing support to allow tracing
+
+ * include/stdlib.h:
+ Add realloc()
+
+ * src/clibincl/stdlibsupp.hxx:
+ Update the commented argument names from stdlib.h, including realloc()
+
+1998-08-28 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ * src/clibincl/clibdata.hxx, src/time/clock.cxx:
+
+ Updated for new kernel configuration option symbol names
+
+Fri Aug 28 19:18:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ Changed the entry below to sat "tx39" instead of "mn10300".
+ It's been a long week.
+
+Fri Aug 28 18:59:20 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Add a weakly named main to allow the
+ default configuration to link on the tx39 which has no
+ scalextric linking yet. The static Cyg_Thread main_thread object
+ below continues to exist, though unreferenced, so all its
+ descendants must exist too.
+
+Fri Aug 28 08:54:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h:
+ Add commented argument names Add exit(), and atexit(). And move
+ these along with abort() and _exit() to a new section.
+
+ * src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Add trivial versions of atexit() and exit()
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAIN_STACK_SIZE config option
+
+ * include/sys/cstartup.h, src/support/cstartup.cxx, src/PKGconf.mak:
+ New files to provide a new function cyg_iso_c_support(), which
+ invokes main "correctly".
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/srand.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcoll2.c, tests/string/strcpy1.c,
+ tests/string/strcpy2.c, tests/string/strcspn.c,
+ tests/string/strlen.c, tests/string/strncat1.c,
+ tests/string/strncat2.c, tests/string/strncpy1.c,
+ tests/string/strncpy2.c, tests/string/strpbrk.c,
+ tests/string/strrchr.c, tests/string/strspn.c,
+ tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c,
+ tests/time/clock.c:
+
+ Modify all tests to use new startup mechanism, and cyg_iso_c_start()
+
+Fri Aug 28 00:29:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Add #ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO around all accesses to
+ flags.last_buffer_op_was_read. Fix for PR 16997
+
+Thu Aug 27 01:12:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/sys/file_if.h:
+ Fix comments and remove cyg_get_file_star()
+
+Wed Aug 26 20:24:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove #define CYGPKG_LIBC is that is meant to live in
+ <pkgconf/system.h> after all
+
+Wed Aug 26 19:39:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ More fixes to CDL stuff to make it work better, and look better on
+ the screen
+
+Tue Aug 25 20:21:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Make some fixes after running the ConfigTool
+
+Tue Aug 25 16:46:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_STDIO_BUFSIZE):
+ Fix typo of CYGNUM_LIBC_STDIO_BUFSIZE
+
+Tue Aug 25 15:10:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Tidy up CDL stuff a bit more, prior to checking it actually works.
+
+Tue Aug 25 11:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c (main):
+ Prevent calls to CYG_TEST_STILL_ALIVE for now
+
+Tue Aug 25 05:39:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change cosmetic paragraph alignment.
+
+Tue Aug 25 03:11:34 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Make stderr initialise with buffer size 0.
+ For PR 16955
+
+Mon Aug 24 17:38:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ First pass at CDL-ifying the C library configuration. Currently
+ deliberately disabled as there a few outstanding issues.
+
+Mon Aug 24 16:14:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx (_vfnprintf):
+ clear up warning for unused argument
+
+ * tests/stdlib/malloc2.c (NUM_ITERATIONS):
+ Lower to 100 from 50000 so it won't take too long under the simulator
+
+Thu Aug 20 17:48:43 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Remove now unnecessary inclusion of kernel/ktypes.h
+
+Wed Aug 19 19:19:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c,
+ tests/stdio/sscanf.c, tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c,
+ tests/stdlib/strtoul.c, tests/string/strtok.c,
+ tests/time/clock.c:
+ Add parameters to "main()" to silence warnings
+
+Wed Aug 19 18:52:59 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Put conditional error check into same #ifdef and if as what was being
+ checked in the first place!
+
+Wed Aug 19 18:49:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl:
+ Reorder Cyg_StdioStream::check_this() to be first to silence
+ warnings
+
+Tue Aug 18 16:10:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * ecc/language/c/libc/current/src/clibincl/clibdata.hxx,
+ ecc/language/c/libc/current/src/errno/errno.cxx,
+ ecc/language/c/libc/current/src/stdio/common/fopen.cxx,
+ ecc/language/c/libc/current/src/stdlib/rand.cxx,
+ ecc/language/c/libc/current/src/string/strtok.cxx:
+ Rename CYGIMP_LIBC_INTERNAL_DATA_PREAMBLE,
+ CYGIMP_LIBC_INTERNAL_DATA_ALLOC_CHECK_PREAMBLE,
+ CYGVAR_LIBC_INTERNAL_DATA, and
+ CYGIMP_LIBC_INTERNAL_DATA_CHECK to all have CYGPRI_ prefix instead
+ as recommended by the config name rules
+
+
+Tue Aug 18 14:31:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/setvbuf.cxx (_setvbuf):
+ Rename variable names in assert line, otherwise doesn't build
+ with asserts on!
+
+Sun Aug 16 18:15:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix some bugs, although there are some left to fix still. Unrelated
+ to the rest of the checkins, so I will check the partial fix in now.
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx:
+ Add parameters to constructor to allow more things to be done at
+ construction time.
+
+ Now we have "new", remove separate "construct" method
+
+ Add more documentation on constructor
+
+ As requested by code review, where possible, move boolean flags
+ into separate packed bitfield structure for space efficiency
+
+ Make readbuf_char be usable all the time rather than when configured
+ not to be buffering, as it is also needed for non-buffered mode i.e.
+ _IONBF
+
+ * src/stdio/common/fopen.cxx:
+ Change to use new method of construction from above, using new
+
+ Use thread-specific data, rather than global. And so change errnos
+ to access errno entry specifically
+
+ Make process_mode() check for append mode too
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/stdio/common/setvbuf.cxx:
+
+ Change to cope with different way of dealing with buffering policy
+ flags etc. in Cyg_StdioStream
+
+ * src/stdio/common/vsnprintf.cxx, src/stdio/common/vsscanf.cxx,
+ src/support/clibdata.cxx:
+ Change construction of streams to use new parameters added above,
+ and change to use _IONBF mode for string stdio functions,
+ otherwise its a waste of memory. And use _IONBF for stderr as the
+ ISO standard tells us to!
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Change constructor so that it can be set with default size and
+ dynamic buffer (if applicable)
+
+ Fix minor bug in destructor - should only call free when allocated
+ dynamically
+
+ Change get_buffer_size to return -1 if the buffer was not allowed
+ to be set up
+
+ * src/stdio/common/streambuf.cxx:
+ Remove unnecessary stdio.h include and add extra comment to whether
+ to free bit in set_buffer()
+
+ * src/stdio/common/freopen.cxx:
+ Change @@@ to standard fix me string
+
+ * src/stdio/output/fputc.cxx:
+ Remove unnecessary "written" variable
+
+Thu Aug 13 15:37:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx:
+ Included use of "fix me" line to ensure this is discussed before
+ release
+
+ * include/stdlib.h, src/stdlib/abort.cxx, src/PKGconf.mak:
+ Add abort.cxx to implement abort(), albeit naively
+
+Thu Jul 30 18:03:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/vsscanf.cxx (_vsscanf),
+ src/stdio/common/vsnprintf.cxx (_vsnprintf):
+ Fix initialiser of pseudo string device table that didn't get updated
+ when the table changed (Bad proven, no biscuit).
+
+ * src/clibincl/stream.inl (~Cyg_StdioStream):
+ Move invalidation of magic_validity_word to after unlock_me(),
+ otherwise it always fails!
+
+Tue Jul 28 21:29:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Shorten over-long lines
+
+Tue Jul 28 20:28:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx (class Cyg_StdioStream),
+ src/clibincl/stream.inl, src/stdio/common/stream.cxx:
+ Clarify some comments and get the CYGDBG_DEFINE_CHECK_THIS and
+ CYG_ASSERTCLASS stuff going
+
+ * src/clibincl/stream.inl:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 15:31:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl, src/stdio/common/streambuf.cxx:
+ Move set_buffer() from streambuf.inl to new file streambuf.cxx
+
+ * src/PKGconf.mak (COMPILE):
+ Build new file streambuf.cxx
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ Add METHODS comment
+
+ * src/stdio/common/stream.cxx:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 00:26:36 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.inl, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/div.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/qsort.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/string/strtok.cxx:
+
+ Include proper Berkeley license inline in the file, rather than
+ referring to an external file
+
+ * doc/COPYING.UCB:
+ Remove, now that it isn't referred to any more
+
+Mon Jul 27 23:34:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl, include/errno.h,
+ include/stdio.h, include/stdio.inl, include/stdlib.h,
+ include/stdlib.inl, include/string.h, include/string.inl,
+ include/time.h, include/sys/file_if.h, src/PKGconf.mak,
+ src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/stdiosupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/streambuf.hxx,
+ src/clibincl/streambuf.inl, src/clibincl/stringsupp.hxx,
+ src/clibincl/timesupp.hxx, src/ctype/isalnum.cxx,
+ src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx,
+ src/ctype/islower.cxx, src/ctype/isprint.cxx,
+ src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx,
+ src/ctype/tolower.cxx, src/ctype/toupper.cxx,
+ src/errno/errno.cxx, src/stdio/common/snprintf.cxx,
+ src/stdio/common/sprintf.cxx, src/stdio/common/sscanf.cxx,
+ src/stdio/common/stdioinlines.cxx, src/stdio/common/stream.cxx,
+ src/stdio/common/ungetc.cxx, src/stdio/common/vsnprintf.cxx,
+ src/stdio/common/vsscanf.cxx, src/stdio/input/fgetc.cxx,
+ src/stdio/input/fgets.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/gets.cxx, src/stdio/input/scanf.cxx,
+ src/stdio/output/fnprintf.cxx, src/stdio/output/fprintf.cxx,
+ src/stdio/output/fputc.cxx, src/stdio/output/fputs.cxx,
+ src/stdio/output/printf.cxx, src/stdlib/_exit.cxx,
+ src/stdlib/abs.cxx, src/stdlib/atof.cxx, src/stdlib/atoi.cxx,
+ src/stdlib/atol.cxx, src/stdlib/div.cxx, src/stdlib/labs.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/rand.cxx, src/stdlib/strtod.cxx,
+ src/string/memchr.cxx, src/string/memcmp.cxx,
+ src/string/memmove.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx,
+ src/string/strcoll.cxx, src/string/strcpy.cxx,
+ src/string/strcspn.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx, src/string/strpbrk.cxx,
+ src/string/strrchr.cxx, src/string/strspn.cxx,
+ src/string/strstr.cxx, src/string/strsuppt.cxx,
+ src/string/strtok.cxx, src/string/strxfrm.cxx,
+ src/support/clibdata.cxx, src/time/clock.cxx:
+ Untabify
+
+Mon Jul 27 23:14:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/stdlib/malloc.cxx, src/stdlib/qsort.cxx,
+ tests/ctype/ctype.c, tests/stdlib/rand3.c, tests/stdlib/malloc3.c:
+ Remove all mentions of "register" in variable declarations. Also
+ untabify where needed
+
+ * src/stdlib/bsearch.cxx:
+ Untabify this too
+
+
+Mon Jul 27 22:18:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/fputc.cxx (_fputc):
+ Replace call to stream write() with call to write_byte()
+
+ * src/clibincl/stream.inl (write_byte):
+ Add asserts for stream write() returning odd values for how much has
+ been written
+
+ (bytes_available_to_read):
+ Remove "register" def for variable declaration
+
+Mon Jul 27 22:06:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdiosupp.cxx:
+ Remove #if 0'd cyg_get_file_star() and unnecessary pseudo string
+ device definition
+
+Mon Jul 27 21:57:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h, src/support/clibdata.cxx:
+ Change CYGXXX_LIBC_STDIO_DEFAULT_CONSOLE to
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE
+
+Mon Jul 27 21:49:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/setjmpsupp.hxx,
+ src/clibincl/stdiosupp.hxx, src/clibincl/stdlibsupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl,
+ src/clibincl/stringsupp.hxx, src/clibincl/timesupp.hxx:
+
+ Change CYGONCE_LIBC_*_{HXX,INL} to CYGONCE_LIBC_CLIBINCL_*_{HXX,INL}
+
+Mon Jul 27 21:34:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change #define XXXXX 1 to #define XXXXX where applicable as per code
+ review
+
+ Also remove obsolete CYGIMP_LIBC_THREAD_START_SUSPENDS_SELF
+
+Mon Jul 27 19:42:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen):
+ Use #ifdef, not #if for config options
+
+Mon Jul 27 15:01:51 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/stream.cxx, src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx:
+ Fixes to compile with the new Cyg_IORB field names.
+
+Thu Jul 9 03:40:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Adjust starting of tests to possibly start scheduler since
+ strtol/stroul rely on errno, which may be a per-thread variable
+
+Thu Jul 9 03:06:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx, src/stdio/common/setvbuf.cxx:
+ Consolidate read and write buffers into single buffer, as it should
+ have been all along
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Add drain_buffer() method to speed up the case when we want the
+ buffer completely emptied
+
+Tue Jul 7 21:26:33 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Add a couple of new tests that check that very long strings work too
+
+Wed Jul 1 19:52:39 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/streambuf.hxx:
+ Do not permit copy constructors
+
+ * src/clibincl/stream.inl, src/stdio/common/fclose.cxx:
+ Make sure we use #ifdef and not #if
+
+ * src/clibincl/streambuf.inl:
+ Use member initialisation list rather than explicit initialisation to
+ reduce warnings
+
+Wed Jul 1 19:17:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h and all files using config options:
+ Rename configuration defines to make them more standard
+
+Thu Jun 25 20:09:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strcat.cxx:
+ Add parentheses on check to silence warning
+ (Verified by proven)
+
+Thu Jun 25 19:30:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Make sure that the malloc pool is initialised before other things
+ can use it. This is done with the hot new constructor ordering
+ feature.
+
+Thu Jun 25 18:27:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Remove bogus ifdef if floating point is _not_ wanted
+
+Thu Jun 25 17:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Fix argument checking to allow first argument of NULL
+
+Thu Jun 25 04:18:50 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_strtok_last_p):
+ Remove bogus assertion
+
+ * src/stdlib/malloc.cxx:
+ Got sense of alignment check assertion the wrong way round, so negate
+ it
+
+Thu Jun 25 03:56:35 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx:
+ Fix argument checking assertions with legitimate nulls here too
+
+Thu Jun 25 03:46:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/strtoul.cxx, src/stdlib/strtol.cxx:
+ Fix argument checking assertions to cope with legitimate nulls
+
+Wed Jun 24 09:01:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Remove extraneous info messages
+
+Wed Jun 24 05:59:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c:
+
+ Change large automatic arrays to static arrays to prevent overuse
+ of a potentially small stack
+
+Wed Jun 24 05:45:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/string/strtok.c, tests/time/clock.c:
+
+ Increase thread stack size from 4K to 32K as in some cases it was
+ too small.
+
+
+Tue Jun 23 20:12:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Add extra tests, including floating point conversion testing
+
+Tue Jun 23 17:01:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Make sure this is only compiled if CYGFUN_LIBC_strtok is defined
+
+Tue Jun 23 06:10:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ add some comments - that's all
+
+ * src/stdio/common/stream.cxx:
+ fix case in refill_read_buffer() for what to do when there's nothing
+ left. Now return EAGAIN
+
+ * src/stdio/common/vsscanf.cxx, src/stdio/input/vfscanf.cxx:
+ Get sscanf working properly and passing tests. Also make sure it
+ ignores FP when its not configured
+
+ * src/stdlib/atof.cxx:
+ Only compile at all if strtod() is present
+
+
+Mon Jun 22 19:13:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise strtok_last and rand_seed better
+
+Mon Jun 22 14:14:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc3.c:
+ Add test for checking that mallocing and freeing repeatedly works
+
+ * tests/PKGconf.mak:
+ Update to reflect addition of the above
+
+Mon Jun 22 13:09:33 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/fopen.cxx
+ * src/stdio/common/stream.cxx
+ * src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx
+ Include cyg/devs/common/iorb.h instead of iorb.hxx
+
+ * src/stdio/common/stream.cxx
+ Use read_blocking and write_blocking instead of just read and
+ write when accessing devices through the virtual device table.
+
+Sun Jun 21 18:19:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Propagate change of return code handling for puts from stdio.inl
+ into here
+
+ * src/stdio/output/fputc.cxx:
+ make sure the right type is used for output - byte not int
+
+ * src/support/clibdata.cxx:
+ Fix #define config mistook. #endif was in wrong place
+
+Sun Jun 21 16:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Allow explicit construction to get around a bug when
+ dynamically allocating per-thread structure
+
+Sun Jun 21 16:02:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c, tests/stdlib/qsort.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+
+ Update tests to "do the right thing" with all configuration settings
+
+
+Sun Jun 21 04:54:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ I have to be careful not to use setjmp() in a way not exactly
+ defined by the standard, so make sure I do, and add a comment
+ documenting these ways.
+
+ Also ensure this test does the right thing in all configurations
+
+Sun Jun 21 04:38:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add extra checks for invalid configurations
+ Also make default for thread safety OFF
+
+ * src/clibincl/clibdata.inl:
+ Adjust indentation
+
+ * src/stdio/output/vfnprintf.cxx:
+ Make printf of -0.0 floating point do the right thing
+
+Sun Jun 21 04:28:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/snprintf.cxx, src/stdio/common/sprintf.cxx,
+ src/stdio/common/sscanf.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/scanf.cxx, src/stdio/output/fnprintf.cxx,
+ src/stdio/output/fprintf.cxx, src/stdio/output/printf.cxx:
+
+ Had to remove inline functions with varargs. Which means separating
+ out each function from stdioinlines.cxx into a separate file, as they
+ no longer belong there. So all the above files were created.
+
+ * include/stdio.inl, src/PKGconf.mak,
+ src/stdio/common/stdioinlines.cxx:
+ Changed to take account of the above
+
+
+Sun Jun 21 03:58:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c:
+ Update with floating-point tests. Also make sure they DTRT in all
+ configurations
+
+Fri Jun 19 19:33:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ accidentally initialised stdin/out/err twice
+
+Fri Jun 19 19:09:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Another typo
+
+Fri Jun 19 18:59:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Missing #endif typo
+
+Fri Jun 19 18:51:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Fix initialisation of static data members. Unsure how it worked at
+ all before!
+
+Fri Jun 19 18:01:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.inl:
+ puts should check whether fputs returns non-negative, rather than
+ non-zero
+
+Fri Jun 19 17:22:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl:
+ Make inclusion of get_errno_p conditional on thread-safety
+
+Wed Jun 17 10:55:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Add weak alias of vfscanf() to _vfscanf()
+
+Wed Jun 17 09:10:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Initialise err to silence compiler warning
+
+Wed Jun 17 08:59:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Most important is the addition of floating point support in
+ src/stdio/output/vfnprintf.cxx and src/stdio/input/vfscanf.cxx. This
+ also required the addition of atof() and strtod() in stdlib which is
+ definitely no bad thing! Other than that...
+
+ * Fix a whole bunch of stuff I messed up first time round. Also the
+ sprintf and sscanf tests are included again.
+
+Tue Jun 16 16:38:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Typo with not putting comment character at the beginning. Sigh.
+
+Tue Jun 16 14:53:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Forgot to (temporarily) remove fputs test for now
+
+Mon Jun 15 20:40:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ Everything to do with stdio has almost completely changed, so there's
+ not much point documenting individual changes.
+
+Mon Jun 15 18:36:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c:
+ Stop it moaning quite as much when it fails by making it exit sooner
+
+ * tests/time/clock.c :
+ This isn't a compound testcase
+
+Thu Jun 11 17:59:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h
+ Reverse sense of NDEBUG ifdef, that was left in accidentally due
+ to testing
+
+Thu Jun 11 04:58:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h, include/string.h, src/clibincl/stringsupp.hxx:
+ Modify as I've now added an "error" package which defines the error
+ codes and strerror()
+
+ * src/errno/strerror.cxx:
+ Moved to new error package and thus deleted
+
+Wed Jun 10 18:37:37 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h:
+ create this header and add assert() function
+
+Wed Jun 10 16:23:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h, src/clibincl/stdlibsupp.hxx, src/stdlib/malloc.cxx:
+ Add malloc(), calloc() and free() functions
+
+ * include/pkgconf/libc.h:
+ Add malloc memory pool size option
+
+ * tests/stdlib/malloc1.c, tests/stdlib/malloc2.c:
+ new tests for malloc
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for new files
+
+Wed Jun 10 15:06:16 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ Add another test
+
+Tue Jun 9 18:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add some setjmp config's and a macro for the noreturn attribute
+
+ * include/setjmp.h, include/setjmp.inl, src/clibincl/setjmpsupp.hxx,
+ src/setjmp/longjmp.cxx, tests/setjmp/setjmp.c:
+ Added to implement and test setjmp() and longjmp()
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for newly added files
+
+Thu Jun 4 01:29:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx, src/string/strcpy.cxx,
+ src/string/strlen.cxx, src/string/strncat.cxx,
+ src/string/strncmp.cxx, src/string/strncpy.cxx:
+ Rename CYGIMP_LIBC_PREFER_SMALL_TO_FAST to
+ CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST
+
+ Also use slower but smaller version when __OPTIMIZE_SIZE__ is
+ defined (which comes from using gcc -Os)
+
+Fri May 29 16:15:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl, src/ctype/isxdigit.cxx:
+ Fix bug that numerals aren't considered hex digits
+
+ * include/time.h:
+ Change clock_t and time_t to be signed so that they can accept -1, as
+ required by other libc functions
+
+ * src/clibincl/clibdata.hxx:
+ Fix typo that CYGIMP_LIBC_THREAD_SUPPORT should be ..._SAFETY
+ Also fix macro to allocate thread-specific data to not set variables
+ in a different stack-frame
+
+ * tests/ctype/ctype.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/stdlib/qsort.c:
+ make ctr unsigned to prevent warnings
+
+ * tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/string/strrchr.c:
+ Fix off by one error
+
+ * tests/string/strspn.c:
+ Fix case-sensitivity problem, and off-by-one error
+
+ * tests/string/strxfrm1.c:
+ Remove bogus bit of test that doesn't apply to strxfrm, and fix typo
+
+
+Fri May 22 16:33:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak
+ Remove CXXFLAGS line now that its redundant
+
+ * tests/everything!
+ Do a blitz change of all tests - break some of them down into
+ different files, add new tests, standardize format, fix bugs,
+ update for recent header file changes and much more!
+
+Wed May 20 17:50:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ interim checkin for different dir structure for Bart
+
+Fri May 15 20:30:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Tidy up some loose ends I forgot: rename src/include directory to
+ src/clibincl. And add clibdata.inl and timesupp.hxx in there.
+
+Thu May 14 19:56:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Basically everything has changed in the C library. Files have
+ been moved, renamed, deleted and reworked. This is a major
+ revision, and now starts from this new baseline rather than doing
+ incremental changes.
+
+Fri Apr 17 18:43:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ECCconf.mak:
+ added for new build system (actually Bart did this, but didn't
+ update this ChangeLog)
+
+Fri Apr 17 15:03:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdio/device/sim.cxx:
+ Make it build with CYG_EMPTY_STATEMENT; the unadorned one is being
+ removed.
+
+Thu Apr 16 00:24:24 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * All source files:
+ replace ECCIMP_LIBC_* conditional ifdef with CYGIMP_LIBC_*
+
+ * include/eccconf/libc.h:
+ improve comments and reorder a bit
+
+Wed Apr 8 14:35:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/Makefile.am, tests/Makefile.am, configure.in:
+ many changes to integrate build structure from release tree
+
+ * src/ctype/Makefile.am, src/ctype/Makefile.in, src/errno/Makefile.am,
+ src/errno/Makefile.in, src/stdio/Makefile.am, src/stdio/Makefile.in,
+ src/stdio/common/Makefile.am, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.am, src/stdio/device/Makefile.in,
+ src/stdio/output/Makefile.am, src/stdio/output/Makefile.in,
+ src/stdio/input/Makefile.am, src/stdio/input/Makefile.in,
+ src/stdlib/Makefile.am, src/stdlib/Makefile.in,
+ src/string/Makefile.am, src/string/Makefile.in,
+ src/support/Makefile.am, src/support/Makefile.in,
+ src/time/Makefile.am, src/time/Makefile.in:
+ Remove as they are now redundant with above changes
+
+ * include/Makefile.am:
+ Add to support above changes
+
+ * include/eccconf/libc.h:
+ Change include file for configuration from kernel to system
+
+ * src/include/kerndiag.hxx, src/stdio/device/kerndiag.cxx,
+ src/time/clockfn.cxx:
+ Change kernel include file to eccconf/kernel.h
+
+ * src/include/strngdev.h:
+ remove unnecessary kernel include
+
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in,
+ tests/Makefile.in, include/Makefile.in:
+ regenerate
+
+Mon Apr 6 20:55:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/abs.cxx, src/stdlib/atoi.cxx, src/stdlib/atol.cxx,
+ src/stdlib/div.cxx, src/stdlib/labs.cxx, src/stdlib/ldiv.cxx:
+ Separated out functions from stdlib.cxx into separate files
+
+ * src/stdlib/stdlib.cxx:
+ removed to be replaced by above files
+
+ * Makefile.am, src/stdlib/Makefile.am:
+ modified to support building above and not building stdlib.cxx
+
+ * src/support/tsd.cxx:
+ Remove unnecessary header file includes
+
+ * Makefile.in, src/stdlib/Makefile.in:
+ regenerated
+
+Mon Apr 6 19:19:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx, include/eccconf/libc.h:
+ remove lame hack for tx39 compiler now that its fixed
+
+ * src/include/sim.hxx:
+ define constants as static to placate compiler
+
+Thu Apr 2 21:01:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ctype/ctype.cxx:
+ deleted and separated out into below files
+
+ * src/ctype/isalnum.cxx, src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx, src/ctype/islower.cxx,
+ src/ctype/isprint.cxx, src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx, src/ctype/tolower.cxx,
+ src/ctype/toupper.cxx:
+ Separated out individual ctype functions from ctype.cxx into separate
+ files
+
+ * Makefile.am, src/ctype/Makefile.am:
+ modified to reflect above deletion/additions
+
+ * Makefile.in, src/ctype/Makefile.in:
+ regenerated
+
+Thu Apr 2 19:08:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: optimise using prefix increments
+
+Thu Apr 2 15:18:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strchr.cxx: optimise setting of mask a little
+
+Thu Mar 26 14:07:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx: fixed some typos
+
+Thu Mar 26 11:58:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/eccconf/libc.h, src/support/tsd.cxx:
+ Implement workaround for tx39 compiler bug.
+
+ * src/include/strsuppt.hxx:
+ remove prototypes for _memcpy() and _memset() as they are now in the
+ kernel
+
+Wed Mar 25 18:31:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/string/Makefile.am: memcpy() and memset() are
+ now in the kernel so remove them from build
+ * include/string.h: add a comment to say as much
+ * Makefile.in, src/string/Makefile.in: regenerate
+
+Wed Mar 25 15:30:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx, src/include/file_if.inl:
+ Change _exit workaround to not cause a compiler optimisation
+ problem. Now just references _exit rather than calls it.
+
+Wed Mar 25 14:59:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fix bug causing tests to fail completely
+ for this function
+
+Wed Mar 25 12:55:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/sim.hxx: add types to constants (oops!)
+ * Makefile.am: link src/stdio/device/sim.cxx
+ * Makefile.in: regenerated
+
+Wed Mar 25 04:14:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/file_if.hxx, src/include/file_if.inl,
+ src/include/kerndiag.hxx, src/include/sim.hxx,
+ src/include/stdio_if.hxx, src/include/strngdev.hxx,
+ src/include/tsd.hxx, src/stdio/common/clearerr.cxx,
+ src/stdio/common/clearerr.cxx, src/stdio/common/feof.cxx,
+ src/stdio/common/ferror.cxx, src/stdio/common/file_if.cxx,
+ src/stdio/common/vsprintf.cxx,
+ src/stdio/device/kerndiag.cxx, src/stdio/device/sim.cxx,
+ src/stdio/device/strngdev.cxx, src/stdio/output/fputc.cxx,
+ src/stdio/output/fputs.cxx, src/stdio/output/puts.cxx,
+ src/stdio/output/vfnprintf.cxx, src/support/tsd.cxx:
+ Modified to support buffered reads including renaming
+ _EccInternalFileStruct to __EccStdioStream which is what affects
+ most of these files
+ * src/include/file_if.inl, src/stdio/common/file_if.cxx: added for
+ the above reason
+ * src/stdio/common/sscanf.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/input/Makefile.am: added to provide sscanf() functionality
+ * include/ctype.h, include/stdio.h, include/stdlib.h,
+ include/string.h, include/eccconf/libc.h, src/ctype/ctype.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/stdio/common/stdio.cxx:
+ rename *_INLINES macros with prefix CYG rather than ECC
+ * include/errno.h, src/errno/errno.cxx, src/errno/strerror.cxx:
+ rename ErrNo to _ErrNo and add EAGAIN and EWOULDBLOCK error codes
+ * configure.in, Makefile.am, src/stdio/Makefile.am,
+ src/stdio/input/Makefile.am: add support for building
+ file_if.cxx sscanf.cxx and vfscanf.cxx
+ * src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/input/Makefile.in, configure, Makefile.in: regenerated
+
+Tue Mar 24 19:51:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clockfn.cxx, src/time/clock.cxx:
+ Renamed clock.cxx to clockfn.cxx (preserving CVS history)
+ * Makefile.am, src/time/Makefile.am: updated to reflect name change
+ * Makefile.in, src/time/Makefile.in: regenerated
+
+Tue Mar 24 16:28:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl: Swap around definitions to get right order so
+ inlining works
+
+Tue Mar 24 14:43:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/stdio.h, include/stdlib.h, include/string.h:
+ modify to only conditionally include inlines
+ * src/ctype/ctype.cxx, src/stdio/common/stdio.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/ctype/Makefile.am: Add to provide real linkable alternatives
+ to inline functions
+ * Makefile.am, configure.in, src/Makefile.am,
+ src/stdio/common/Makefile.am, src/stdlib/Makefile.am,
+ src/string/Makefile.am: modified to support previous additions
+ * include/eccconf/libc.h: redefine inline macro to add extern inline,
+ and add conditional defines for inline functions. Also rename
+ space vs. speed macro to have CYG instead of ECC prefix
+ * include/stdio.inl: fix comment typo
+ * src/stdlib/qsort.cxx: fix to define inline functions properly
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/memcpy.cxx,
+ src/string/memset.cxx, src/string/strcat.cxx, src/string/strchr.cxx,
+ src/string/strcmp.cxx, src/string/strcpy.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx
+ * Makefile.in, configure, src/Makefile.in, src/ctype/Makefile.in,
+ src/stdio/common/Makefile.in, src/stdlib/Makefile.in,
+ src/string/Makefile.in: regenerate
+
+
+Mon Mar 23 19:19:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx: added to support temporary _exit
+ * include/stdlib.h, include/stdlib.inl: added support for _exit and
+ added abs(), labs(), div() and ldiv() functions
+ * src/include/file_if.hxx: added support for _exit kludge
+ * src/stdlib/qsort.cxx: Added Berkeley copyright message
+ * src/time/clock.cxx: Include correct kernel config header as
+ CYG_CONFIGURATION rather than <config.h>
+ * Makefile.am src/stdlib/Makefile.am: added support for _exit
+ * Makefile.in, src/stdlib/Makefile.in: regenerated
+
+Mon Mar 23 14:41:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Replace ECCPKG_ANSI_LIBC with CYGPKG_ANSI_LIBC in all source files
+
+Mon Mar 23 14:28:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/string.inl: add file to provide strcoll()
+ * include/string.h: include string.inl
+ * ctype.h: include ctype.inl (oops!)
+ * include/stdlib.h: include stdlib.inl (oops!)
+
+Mon Mar 23 13:30:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl: added to provide ANSI ctype
+ functionality
+ * include/stdlib.h, include/stdlib.inl, src/include/stdlibbsp.hxx,
+ src/stdlib/Makefile.am, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/stdlib/srand.cxx,
+ src/stdlib/strtol.cxx, src/stdlib/strtoul.cxx: Added to provide
+ many stdlib functions
+ * src/include/tsd.hxx: modified to support rand() random number
+ seed, and added some comments
+ * configure.in, Makefile.am, src/Makefile.am: modified to support
+ addition of above new sources
+ * include/eccconf/libc.h: Add extra helpful comments, and #include
+ kernel config file
+ * src/time/clock.cxx: #include clock.inl and fix to call
+ get_resolution() properly now
+ * Makefile.in, configure, src/Makefile.in, src/errno/Makefile.in,
+ src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.in, src/stdio/output/Makefile.in,
+ src/stdlib/Makefile.in, src/strings/Makefile.in,
+ src/support/Makefile.in, src/time/Makefile.in,
+ tests/Makefile.in: regenerated
+
+
+Sun Mar 22 21:29:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h, src/include/timesupp.hxx, src/time/clock.cxx,
+ src/time/Makefile.am: added to provide clock() function
+ * src/Makefile.am: modified to try to build in src/time directory
+ * include/eccconf/libc.h: added and is now the main configuration
+ file for this package
+ * acconfig.h, include/libcconf.h.in, include/stamp-h.in: removed
+ due to usage of libc.h above instead
+ * Almost all *.h, *.hxx and *.cxx: replaced LIBC_CONFIG_HEADER
+ defined include with simple <pkgconf/libc.h>
+ * configure.in: remove AM_CONFIG_HEADER of libcconf.h and
+ LIBC_CONFIG_HEADER definition. Also remove usage of builtin
+ memcpy() etc. from gcc, and generate src/time/Makefile
+ * Makefile.am: link in src/time/clock.o
+ * src/include/file_if.hxx, src/include/sim.hxx: use config header
+ to decide whether C library is to be used
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in: regenerated
+
+Fri Mar 20 18:08:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fixed bug with ignoring terminating NULL
+
+1998-03-20 Chris Tarpy <ctarpy@bhaji.cygnus.co.uk>
+
+ * configure: - regenerated
+ * Makefile.am: - Support added for libc testcases
+ * Makefile.in: regenerated
+ * configure.in: set c compiler, descend test dir
+ * tests/Makefile.in: added
+ * tests/Makefile.am: added
+ * tests/tcdiag.cxx : added
+
+
+Thu Mar 19 11:41:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Initial check-in of everything
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/cdl/i18n.cdl b/cesar/ecos/packages/language/c/libc/i18n/current/cdl/i18n.cdl
new file mode 100644
index 0000000000..07ddf7ff23
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/cdl/i18n.cdl
@@ -0,0 +1,241 @@
+# ====================================================================
+#
+# i18n.cdl
+#
+# C library internationalization (i18n) related configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jlarmour
+# Contributors: jjohnstn
+# Date: 2000-04-14
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_LIBC_I18N {
+ display "ISO C library internationalization functions"
+ description "
+ This package provides internationalization functions specified by the
+ ISO C standard - ISO/IEC 9899:1990. These include locale-related
+ functionality and <ctype.h> functionality."
+ doc ref/libc.html
+ include_dir cyg/libc/i18n
+ parent CYGPKG_LIBC
+ implements CYGINT_ISO_LOCALE
+ implements CYGINT_ISO_CTYPE
+ implements CYGINT_ISO_STDLIB_MULTIBYTE
+ requires CYGPKG_ISOINFRA
+ compile ctype.cxx locale.cxx mblen.cxx mbtowc.cxx mbstowcs.cxx \
+ wctomb.cxx wcstombs.cxx mbtowc_jp.cxx wctomb_jp.cxx mbtowc_c.cxx
+
+# ====================================================================
+
+ cdl_component CYGPKG_LIBC_I18N_LOCALES {
+ display "Supported locales"
+ flavor none
+ description "
+ These options determine which locales other than the \"C\" locale
+ are supported and hence contribute to the size of the executable."
+
+ cdl_interface CYGINT_LIBC_I18N_MB_REQUIRED {
+ display "Support for multiple locales required"
+ flavor booldata
+ requires { CYGBLD_ISO_STDLIB_MB_CUR_MAX_HEADER == \
+ "<cyg/libc/i18n/mb.h>" }
+ }
+
+ cdl_option CYGFUN_LIBC_I18N_LOCALE_C_SJIS {
+ display "C-SJIS locale support"
+ default_value 0
+ implements CYGINT_LIBC_I18N_MB_REQUIRED
+ description "
+ This option controls if the \"C-SJIS\" locale will be
+ supported by setlocale(). The locale is a hybrid locale
+ that is mostly the \"C\" locale with Japanese SJIS multibyte
+ support added."
+ }
+
+ cdl_option CYGFUN_LIBC_I18N_LOCALE_C_JIS {
+ display "C-JIS locale support"
+ default_value 0
+ implements CYGINT_LIBC_I18N_MB_REQUIRED
+ description "
+ This option controls if the \"C-JIS\" locale will be
+ supported by setlocale(). The locale is a hybrid locale
+ that is mostly the \"C\" locale with Japanese JIS multibyte
+ support added."
+ }
+
+ cdl_option CYGFUN_LIBC_I18N_LOCALE_C_EUCJP {
+ display "C-EUCJP locale support"
+ default_value 0
+ implements CYGINT_LIBC_I18N_MB_REQUIRED
+ description "
+ This option controls if the \"C-EUCJP\" locale will be
+ supported by setlocale(). The locale is a hybrid locale
+ that is mostly the \"C\" locale with Japanese EUCJP multibyte
+ support added."
+ }
+ }
+
+# ====================================================================
+
+ cdl_option CYGPKG_LIBC_I18N_NEWLIB_CTYPE {
+ display "Newlib's ctype implementation"
+ default_value 0
+ requires { CYGBLD_ISO_CTYPE_HEADER == \
+ "<cyg/libc/i18n/newlibctype.h>" }
+ description "
+ This option enables the implementation of the ctype functions
+ that comes with newlib. It is table driven and therefore
+ exhibits different performance characteristics. It also offers
+ a limited amount of binary compatibility
+ with newlib so that programs linked against newlib ctype/locale
+ do not need to be recompiled when linked with eCos."
+ compile newlibctype.cxx
+ }
+
+ cdl_option CYGSEM_LIBC_I18N_PER_THREAD_MB {
+ display "Per-thread multibyte state"
+ active_if CYGPKG_KERNEL
+ requires CYGVAR_KERNEL_THREADS_DATA
+ default_value { CYGVAR_KERNEL_THREADS_DATA != 0 }
+ description "
+ This option controls whether the multibyte character
+ handling functions mblen(), mbtowc(), and wctomb(),
+ have their state recorded on a per-thread
+ basis rather than global. If this option is
+ disabled, some per-thread space can be saved.
+ Enabling this option will use three slots
+ of kernel per-thread data. You should ensure you
+ have enough slots configured for all your
+ per-thread data."
+ }
+
+# ====================================================================
+
+ cdl_option CYGNUM_LIBC_I18N_MAX_LOCALE_NAME_SIZE {
+ display "Size of locale name strings"
+ flavor data
+ legal_values { (CYGFUN_LIBC_I18N_LOCALE_C_EUCJP ? 8 : \
+ (CYGFUN_LIBC_I18N_LOCALE_C_SJIS ? 7 : \
+ (CYGFUN_LIBC_I18N_LOCALE_C_JIS ? 6 : 2))) to 0x7fffffff }
+ default_value { (CYGFUN_LIBC_I18N_LOCALE_C_EUCJP ? 8 : \
+ (CYGFUN_LIBC_I18N_LOCALE_C_SJIS ? 7 : \
+ (CYGFUN_LIBC_I18N_LOCALE_C_JIS ? 6 : 2))) }
+ description "
+ This option controls the maximum size of
+ locale names and is used, among other things
+ to instantiate a static string used
+ as a return value from the
+ setlocale() function. When requesting the
+ current locale settings with LC_ALL, a string
+ must be constructed to contain this data, rather
+ than just returning a constant string. This
+ string data is stored in the static string.
+ This depends on the length of locale names,
+ hence this option. If just the C locale is
+ present, this option can be set as low as 2."
+ }
+
+# ====================================================================
+
+ cdl_option CYGIMP_LIBC_I18N_CTYPE_INLINES {
+ display "Inline versions of <ctype.h> functions"
+ default_value 1
+ requires { CYGBLD_ISO_CTYPE_HEADER == \
+ "<cyg/libc/i18n/ctype.inl>" }
+ description "
+ This option chooses whether the simple character
+ classification and conversion functions (e.g.
+ isupper(), isalpha(), toupper(), etc.)
+ from <ctype.h> are available as inline
+ functions. This may improve performance and as
+ the functions are small, may even improve code
+ size."
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_LIBC_I18N_OPTIONS {
+ display "C library i18n functions build options"
+ flavor none
+ no_define
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_LIBC_I18N_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the C library. These flags are used in addition
+ to the set of global flags."
+ }
+
+ cdl_option CYGPKG_LIBC_I18N_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the C library. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_LIBC_I18N_TESTS {
+ display "C library i18n function tests"
+ flavor data
+ no_define
+ calculated { "tests/ctype tests/setlocale tests/i18nmb" }
+ description "
+ This option specifies the set of tests for the C library
+ i18n functions."
+ }
+ }
+}
+
+# ====================================================================
+# EOF i18n.cdl
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/include/ctype.inl b/cesar/ecos/packages/language/c/libc/i18n/current/include/ctype.inl
new file mode 100644
index 0000000000..7d00c4e1f7
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/include/ctype.inl
@@ -0,0 +1,189 @@
+#ifndef CYGONCE_LIBC_CTYPE_INL
+#define CYGONCE_LIBC_CTYPE_INL
+/*===========================================================================
+//
+// ctype.inl
+//
+// Inline implementations of ISO standard ctype routines defined in
+// section 7.3 of the standard
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage: Do not include this file directly - use #include <ctype.h>
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/libc_i18n.h> /* Configuration header */
+
+/* The outline implementation will override this to prevent inlining */
+#ifndef CYGPRI_LIBC_I18N_CTYPE_INLINE
+# define CYGPRI_LIBC_I18N_CTYPE_INLINE extern __inline__
+#endif
+
+/* FUNCTIONS */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*=========================================================================*/
+
+/* 7.3.1 Character testing functions */
+
+
+CYGPRI_LIBC_I18N_CTYPE_INLINE int
+isupper( int c )
+{
+ return (('A' <= c) && (c <= 'Z'));
+} /* isupper() */
+
+
+CYGPRI_LIBC_I18N_CTYPE_INLINE int
+islower( int c )
+{
+ return (('a' <= c) && (c <= 'z'));
+} /* islower() */
+
+
+CYGPRI_LIBC_I18N_CTYPE_INLINE int
+isalpha( int c )
+{
+ return ( islower(c) || isupper(c) );
+} /* isalpha() */
+
+
+CYGPRI_LIBC_I18N_CTYPE_INLINE int
+isdigit( int c )
+{
+ return ( ('0' <= c) && (c <= '9') );
+} /* isdigit() */
+
+
+CYGPRI_LIBC_I18N_CTYPE_INLINE int
+isalnum( int c )
+{
+ return ( isalpha(c) || isdigit(c) );
+} /* isalnum() */
+
+
+CYGPRI_LIBC_I18N_CTYPE_INLINE int
+iscntrl( int c )
+{
+ /* Simple standard 7-bit ASCII map is assumed */
+ return ( ((0 <= c) && (c <= 0x1F)) ||
+ (c == 0x7F) );
+} /* iscntrl() */
+
+
+CYGPRI_LIBC_I18N_CTYPE_INLINE int
+isgraph( int c )
+{
+ // Simple standard 7-bit ASCII map is assumed
+ return ( ('!' <= c) && (c <= '~') );
+} /* isgraph() */
+
+
+CYGPRI_LIBC_I18N_CTYPE_INLINE int
+isprint( int c )
+{
+ /* Simple standard 7-bit ASCII map is assumed */
+ return ( (' ' <= c) && (c <= '~') );
+} /* isprint() */
+
+
+CYGPRI_LIBC_I18N_CTYPE_INLINE int
+ispunct( int c )
+{
+ /* Simple standard 7-bit ASCII map is assumed */
+ return ( (('!' <= c) && (c <= '/')) || // ASCII 0x21 - 0x2F
+ ((':' <= c) && (c <= '@')) || // ASCII 0x3A - 0x40
+ (('[' <= c) && (c <= '`')) || // ASCII 0x5B - 0x60
+ (('{' <= c) && (c <= '~')) ); // ASCII 0x7B - 0x7E
+
+} /* ispunct() */
+
+
+CYGPRI_LIBC_I18N_CTYPE_INLINE int
+isspace( int c )
+{
+ return ( (c == ' ') || (c == '\f') || (c == '\n') || (c == '\r') ||
+ (c == '\t') || (c == '\v') );
+} /* isspace() */
+
+
+CYGPRI_LIBC_I18N_CTYPE_INLINE int
+isxdigit( int c )
+{
+ return ( isdigit(c) ||
+ (('a' <= c) && (c <= 'f')) ||
+ (('A' <= c) && (c <= 'F')) );
+} /* isxdigit() */
+
+/*========================================================================*/
+
+/* 7.3.2 Character case mapping functions */
+
+
+CYGPRI_LIBC_I18N_CTYPE_INLINE int
+tolower( int c )
+{
+ return isupper(c) ? c - 'A' + 'a' : c;
+} /* tolower() */
+
+
+CYGPRI_LIBC_I18N_CTYPE_INLINE int
+toupper( int c )
+{
+ return islower(c) ? c - 'a' + 'A' : c;
+} /* toupper() */
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* CYGONCE_LIBC_CTYPE_INL multiple inclusion protection */
+
+/* EOF ctype.inl */
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/include/mb.h b/cesar/ecos/packages/language/c/libc/i18n/current/include/mb.h
new file mode 100644
index 0000000000..e3af5c6f71
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/include/mb.h
@@ -0,0 +1,67 @@
+#ifndef CYGONCE_LIBC_I18N_MB_H
+#define CYGONCE_LIBC_I18N_MB_H
+/*===========================================================================
+//
+// mb.h
+//
+// Definition of MB_CUR_MAX when using multiple locales
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2001-06-08
+// Purpose:
+// Description:
+// Usage: Do not include this file directly - use #include <ctype.h>
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/libc_i18n.h> /* Configuration header */
+
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+extern int __mb_cur_max;
+# define MB_CUR_MAX (__mb_cur_max)
+#endif
+
+#endif /* CYGONCE_LIBC_I18N_MB_H multiple inclusion protection */
+
+/* EOF mb.h */
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/include/newlibctype.h b/cesar/ecos/packages/language/c/libc/i18n/current/include/newlibctype.h
new file mode 100644
index 0000000000..39b85ee9f4
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/include/newlibctype.h
@@ -0,0 +1,125 @@
+#ifndef CYGONCE_LIBC_I18N_NEWLIBCTYPE_H
+#define CYGONCE_LIBC_I18N_NEWLIBCTYPE_H
+/*===========================================================================
+//
+// newlibctype.h
+//
+// newlib's implementation of the ctype functions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2004 eCosCentric Ltd.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2004-02-16
+// Purpose:
+// Description:
+// Usage: Do not include this file directly - use #include <ctype.h>
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/libc_i18n.h> /* Configuration header */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int isalnum(int __c);
+extern int isalpha(int __c);
+extern int iscntrl(int __c);
+extern int isdigit(int __c);
+extern int isgraph(int __c);
+extern int islower(int __c);
+extern int isprint(int __c);
+extern int ispunct(int __c);
+extern int isspace(int __c);
+extern int isupper(int __c);
+extern int isxdigit(int __c);
+extern int tolower(int __c);
+extern int toupper(int __c);
+
+#ifndef __STRICT_ANSI__
+int isascii(int __c);
+int toascii(int __c);
+int _tolower(int __c);
+int _toupper(int __c);
+#endif
+
+#define _U 01
+#define _L 02
+#define _N 04
+#define _S 010
+#define _P 020
+#define _C 040
+#define _X 0100
+#define _B 0200
+
+extern const char _ctype_[];
+
+#ifndef __cplusplus
+#define isalpha(c) ((_ctype_+1)[(unsigned)(c)]&(_U|_L))
+#define isupper(c) ((_ctype_+1)[(unsigned)(c)]&_U)
+#define islower(c) ((_ctype_+1)[(unsigned)(c)]&_L)
+#define isdigit(c) ((_ctype_+1)[(unsigned)(c)]&_N)
+#define isxdigit(c) ((_ctype_+1)[(unsigned)(c)]&(_X|_N))
+#define isspace(c) ((_ctype_+1)[(unsigned)(c)]&_S)
+#define ispunct(c) ((_ctype_+1)[(unsigned)(c)]&_P)
+#define isalnum(c) ((_ctype_+1)[(unsigned)(c)]&(_U|_L|_N))
+#define isprint(c) ((_ctype_+1)[(unsigned)(c)]&(_P|_U|_L|_N|_B))
+#define isgraph(c) ((_ctype_+1)[(unsigned)(c)]&(_P|_U|_L|_N))
+#define iscntrl(c) ((_ctype_+1)[(unsigned)(c)]&_C)
+/* Non-gcc versions will get the library versions, and will be
+ slightly slower */
+#ifdef __GNUC__
+# define toupper(c) \
+ __extension__ ({ int __x = (c); islower(__x) ? (__x - 'a' + 'A') : __x;})
+# define tolower(c) \
+ __extension__ ({ int __x = (c); isupper(__x) ? (__x - 'A' + 'a') : __x;})
+#endif
+#endif /* !__cplusplus */
+
+#ifndef __STRICT_ANSI__
+#define isascii(c) ((unsigned)(c)<=0177)
+#define toascii(c) ((c)&0177)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* CYGONCE_LIBC_I18N_NEWLIBCTYPE_H multiple inclusion protection */
+
+/* EOF newlibctype.h */
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/src/ctype.cxx b/cesar/ecos/packages/language/c/libc/i18n/current/src/ctype.cxx
new file mode 100644
index 0000000000..d6c7ad5610
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/src/ctype.cxx
@@ -0,0 +1,70 @@
+/*===========================================================================
+//
+// ctype.cxx
+//
+// ISO C standard ctype functions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-28
+// Purpose:
+// Description: Real alternative for inline implementation of the ISO
+// standard ctype functions defined in section 7.3 of
+// the standard
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/libc_i18n.h> /* Configuration header */
+
+/* We don't want the inline versions of the ctype functions defined here */
+
+#define CYGPRI_LIBC_I18N_CTYPE_INLINE
+
+/* This means that including ctype.inl will make the outline functions */
+
+#ifndef CYGPKG_LIBC_I18N_NEWLIB_CTYPE
+# include <cyg/libc/i18n/ctype.inl>
+#endif
+
+/* EOF ctype.cxx */
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/src/internal.h b/cesar/ecos/packages/language/c/libc/i18n/current/src/internal.h
new file mode 100644
index 0000000000..672959c553
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/src/internal.h
@@ -0,0 +1,95 @@
+#ifndef CYGONCE_LIBC_I18N_INTERNAL_H
+#define CYGONCE_LIBC_I18N_INTERNAL_H
+
+/*===========================================================================
+//
+// internal.h
+//
+// Internal header file to support the i18n locale functions.
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jjohnstn
+// Contributors:
+// Date: 2000-11-16
+// Purpose:
+// Description:
+// Usage: This file is used internally by i18n functions.
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+
+/* escape character used for JIS encoding */
+#define ESC_CHAR 0x1b
+
+/* PROTOTYPES */
+
+typedef int (*mbtowc_fn_type)(wchar_t *pwc, const char *s, size_t n, int *state);
+typedef int (*wctomb_fn_type)(char *s, wchar_t wchar, int *state );
+
+extern int __mbtowc_jp ( wchar_t *__pwc, const char *__s, size_t __n, int *__state );
+extern int __mbtowc_c ( wchar_t *__pwc, const char *__s, size_t __n, int *__state );
+extern int __wctomb_jp ( char *__s, wchar_t __wchar, int *__state );
+
+/* MACROS used to support SHIFT_JIS, EUC-JP, and JIS multibyte encodings */
+
+#define _issjis1(c) (((c) >= 0x81 && (c) <= 0x9f) || ((c) >= 0xe0 && (c) <= 0xef))
+#define _issjis2(c) (((c) >= 0x40 && (c) <= 0x7e) || ((c) >= 0x80 && (c) <= 0xfc))
+#define _iseucjp(c) ((c) >= 0xa1 && (c) <= 0xfe)
+#define _isjis(c) ((c) >= 0x21 && (c) <= 0x7e)
+
+// TYPE DEFINITIONS
+
+// define a type to encapsulate the locale. In time this will get much
+// richer and complete
+
+typedef struct {
+ const char *name;
+ struct lconv numdata;
+ int mb_cur_max;
+ /* if next two fields are NULL, it implies the default "C" single-byte handling. */
+ mbtowc_fn_type mbtowc_fn;
+ wctomb_fn_type wctomb_fn;
+} Cyg_libc_locale_t;
+
+// ctype locale pointer shared between setlocale and mb routines
+extern const Cyg_libc_locale_t *__current_ctype_locale;
+
+#endif /* CYGONCE_LIBC_I18N_INTERNAL_H */
+
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/src/locale.cxx b/cesar/ecos/packages/language/c/libc/i18n/current/src/locale.cxx
new file mode 100644
index 0000000000..cbaf2a7640
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/src/locale.cxx
@@ -0,0 +1,444 @@
+//========================================================================
+//
+// locale.cxx
+//
+// Implementation of ISO C internationalisation (i18n) locales
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jjohnstn
+// Date: 2000-04-18
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_i18n.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Common tracing support
+#include <cyg/infra/cyg_ass.h> // Common assertion support
+#include <locale.h> // struct lconv
+#include <string.h> // several string functions
+#include <limits.h> // CHAR_MAX
+#include "internal.h" // locale type definitions
+
+// CONSTANTS
+
+// define the "C" locale
+static const Cyg_libc_locale_t
+C_locale = {
+ "C",
+ { ".", "", "", "", "", "", "", "", "", "",
+ CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX,
+ CHAR_MAX, CHAR_MAX
+ },
+ 1,
+ NULL,
+ NULL,
+};
+
+// define the "C-EUCJP" locale (C locale with Japanese EUCJP mb support)
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_EUCJP
+static const Cyg_libc_locale_t
+C_EUCJP_locale = {
+ "C-EUCJP",
+ { ".", "", "", "", "", "", "", "", "", "",
+ CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX,
+ CHAR_MAX, CHAR_MAX
+ },
+ 2,
+ &__mbtowc_jp,
+ &__wctomb_jp,
+};
+#endif
+
+// define the "C-SJIS" locale (C locale with Japanese SJIS mb support)
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_SJIS
+static const Cyg_libc_locale_t
+C_SJIS_locale = {
+ "C-SJIS",
+ { ".", "", "", "", "", "", "", "", "", "",
+ CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX,
+ CHAR_MAX, CHAR_MAX
+ },
+ 2,
+ &__mbtowc_jp,
+ &__wctomb_jp,
+};
+#endif
+
+// define the "C-JIS" locale (C locale with Japanese JIS mb support)
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_JIS
+static const Cyg_libc_locale_t
+C_JIS_locale = {
+ "C-JIS",
+ { ".", "", "", "", "", "", "", "", "", "",
+ CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX,
+ CHAR_MAX, CHAR_MAX
+ },
+ 8,
+ &__mbtowc_jp,
+ &__wctomb_jp,
+};
+#endif
+
+// only one locale now, but leave room for expansion
+static const Cyg_libc_locale_t *all_locales[] = { &C_locale,
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_EUCJP
+ &C_EUCJP_locale,
+#endif
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_SJIS
+ &C_SJIS_locale,
+#endif
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_JIS
+ &C_JIS_locale,
+#endif
+};
+
+// GLOBALS
+
+// the maximum size of a multibyte character including state info
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+int __mb_cur_max = 1;
+#endif
+
+// the current locales. Our default is the C locale
+static const Cyg_libc_locale_t *current_collate_locale = &C_locale;
+const Cyg_libc_locale_t *__current_ctype_locale = &C_locale;
+static const Cyg_libc_locale_t *current_monetary_locale = &C_locale;
+static const Cyg_libc_locale_t *current_numeric_locale = &C_locale;
+static const Cyg_libc_locale_t *current_time_locale = &C_locale;
+
+// FUNCTIONS
+
+static const Cyg_libc_locale_t *
+find_locale_data( const char *locale_str, cyg_ucount32 checklen )
+{
+ CYG_REPORT_FUNCNAMETYPE( "find_locale_data", "returning %08x" );
+ CYG_REPORT_FUNCARG1( "locale_str=%s", locale_str );
+
+ const Cyg_libc_locale_t *temp_locale, *curr_locale=NULL;
+ cyg_ucount32 i;
+
+ // is it "" i.e. use the default?
+ if (*locale_str=='\0') {
+ curr_locale = &C_locale;
+ CYG_REPORT_RETVAL( curr_locale );
+ return curr_locale;
+ } // if
+
+ for (i=0; i<sizeof(all_locales)/sizeof(Cyg_libc_locale_t *); i++ ) {
+
+ temp_locale = all_locales[i];
+
+ if ( !strncmp(temp_locale->name, locale_str, checklen) )
+ curr_locale = temp_locale;
+ } // for
+
+ CYG_REPORT_RETVAL( curr_locale );
+ return curr_locale;
+} // find_locale_data()
+
+typedef int (*mbtowc_fn_type)(wchar_t *, const char *, size_t, int *);
+// routine used to export mbtowc function to I/O routines
+externC mbtowc_fn_type
+__get_current_locale_mbtowc_fn ()
+{
+ if (__current_ctype_locale->mbtowc_fn)
+ return __current_ctype_locale->mbtowc_fn;
+ return &__mbtowc_c;
+}
+
+externC char *
+setlocale( int category, const char *locale )
+{
+ CYG_REPORT_FUNCNAMETYPE("setlocale", "returning %08x");
+ CYG_REPORT_FUNCARG2( "category=%d, locale=%s", category, locale );
+
+ if (locale != NULL)
+ CYG_CHECK_DATA_PTR( locale, "locale pointer is invalid!" );
+
+ const char *str;
+
+ // special case if locale==NULL, return current locale name
+ if (locale==NULL) {
+
+ CYG_TRACE0( true, "Getting current locale value" );
+
+ switch (category) {
+
+ case LC_COLLATE:
+ str = current_collate_locale->name;
+ break;
+ case LC_CTYPE:
+ str = __current_ctype_locale->name;
+ break;
+ case LC_MONETARY:
+ str = current_monetary_locale->name;
+ break;
+ case LC_NUMERIC:
+ str = current_numeric_locale->name;
+ break;
+ case LC_TIME:
+ str = current_time_locale->name;
+ break;
+ case LC_ALL:
+
+ // create static string to give a constructed string back
+ // to the user. The size is the number of categories other
+ // than LC_ALL times the maximum name size, and add a constant
+ // for the delimiting octothorpes
+ static char my_str[ CYGNUM_LIBC_I18N_MAX_LOCALE_NAME_SIZE*5+10 ];
+
+ strcpy( my_str, "#" );
+ strcat( my_str, current_collate_locale->name );
+ strcat( my_str, "#" );
+ strcat( my_str, __current_ctype_locale->name );
+ strcat( my_str, "#" );
+ strcat( my_str, current_monetary_locale->name );
+ strcat( my_str, "#" );
+ strcat( my_str, current_numeric_locale->name );
+ strcat( my_str, "#" );
+ strcat( my_str, current_time_locale->name );
+ strcat( my_str, "#" );
+
+ str = &my_str[0];
+ break;
+ default:
+ str=NULL;
+ CYG_FAIL("setlocale() passed bad category!" );
+ break;
+
+ } // switch
+
+ CYG_REPORT_RETVAL( (char *)str);
+ return (char *)str;
+ } // if
+
+ // we only get here if locale is non-NULL, i.e. we want to set it
+
+ const Cyg_libc_locale_t *loc;
+ cyg_bool default_locale = (*locale=='\0');
+
+ CYG_TRACE0( true, "Setting current locale value" );
+
+ switch( category ) {
+ case LC_COLLATE:
+ loc = find_locale_data( locale, CYGNUM_LIBC_I18N_MAX_LOCALE_NAME_SIZE );
+ if (loc != NULL) // found it
+ current_collate_locale=loc;
+ break;
+
+ case LC_CTYPE:
+ loc = find_locale_data( locale, CYGNUM_LIBC_I18N_MAX_LOCALE_NAME_SIZE );
+ if (loc != NULL) // found it
+ {
+ __current_ctype_locale=loc;
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+ __mb_cur_max = loc->mb_cur_max;
+#endif
+ }
+ break;
+
+ case LC_MONETARY:
+ loc = find_locale_data( locale, CYGNUM_LIBC_I18N_MAX_LOCALE_NAME_SIZE );
+ if (loc != NULL) // found it
+ current_monetary_locale=loc;
+ break;
+
+ case LC_NUMERIC:
+ loc = find_locale_data( locale, CYGNUM_LIBC_I18N_MAX_LOCALE_NAME_SIZE );
+ if (loc != NULL) // found it
+ current_numeric_locale=loc;
+ break;
+
+ case LC_TIME:
+ loc = find_locale_data( locale, CYGNUM_LIBC_I18N_MAX_LOCALE_NAME_SIZE );
+ if (loc != NULL) // found it
+ current_time_locale=loc;
+ break;
+
+ case LC_ALL:
+ // first try and match it exactly
+ loc = find_locale_data( locale, CYGNUM_LIBC_I18N_MAX_LOCALE_NAME_SIZE );
+ if (loc != NULL) { // found it
+
+ CYG_TRACE0(true, "Matched locale string exactly");
+ current_collate_locale = __current_ctype_locale = loc;
+ current_monetary_locale = current_numeric_locale = loc;
+ current_time_locale = loc;
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+ __mb_cur_max = loc->mb_cur_max;
+#endif
+ } // if
+ else {
+ CYG_TRACE0( true, "Attempting to parse string previously "
+ "returned from setlocale()" );
+ // now try and see if it is a compound string returned
+ // earlier by setlocale( LC_ALL, NULL );
+
+ // Note we don't do much checking here. This could be
+ // much more rigorous (but at the expense of speed/size?)
+
+ const Cyg_libc_locale_t *temp_collate_locale,
+ *temp_ctype_locale, *temp_monetary_locale,
+ *temp_numeric_locale, *temp_time_locale;
+
+ cyg_ucount32 token_len;
+
+ str = &locale[0];
+ if ( *str=='#' ) {
+ ++str;
+ token_len = strcspn( str, "#" );
+ loc = find_locale_data( str, token_len );
+
+ if (loc!=NULL) {
+ temp_collate_locale=loc;
+ str += token_len+1;
+ token_len = strcspn( str, "#" );
+ loc = find_locale_data( str, token_len );
+
+ if (loc!=NULL) {
+ temp_ctype_locale=loc;
+ str += token_len+1;
+ token_len = strcspn( str, "#" );
+ loc = find_locale_data( str, token_len );
+
+ if (loc!=NULL) {
+ temp_monetary_locale=loc;
+ str += token_len+1;
+ token_len = strcspn( str, "#" );
+ loc = find_locale_data( str, token_len );
+
+ if (loc!=NULL) {
+ temp_numeric_locale=loc;
+ str += token_len+1;
+ token_len = strcspn( str, "#" );
+ loc = find_locale_data( str, token_len );
+
+ if (loc!=NULL) {
+ temp_time_locale=loc;
+ str += token_len+1;
+ token_len = strcspn( str, "#" );
+ loc = find_locale_data( str, token_len );
+
+ if (loc!=NULL) {
+ // if we've got this far and loc still isn't NULL,
+ // then everything's fine, and we've matched everything
+
+ current_collate_locale = temp_collate_locale;
+ __current_ctype_locale = temp_ctype_locale;
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+ __mb_cur_max = temp_ctype_locale->mb_cur_max;
+#endif
+ current_monetary_locale = temp_monetary_locale;
+ current_numeric_locale = temp_numeric_locale;
+ current_time_locale = temp_time_locale;
+
+ } // if
+ } // if
+ } // if
+ } // if
+ } // if
+ } // if
+ } // if
+
+ } // else
+ break; // case LC_ALL
+
+ default:
+ CYG_FAIL("setlocale() passed bad category!" );
+ loc=NULL;
+ break;
+ } // switch
+
+ if (loc==NULL) {
+ CYG_REPORT_RETVAL( NULL );
+ return NULL;
+ } // if
+ else if (default_locale==true) {
+ CYG_REPORT_RETVAL(C_locale.name);
+ return (char *)C_locale.name;
+ } // else if
+ else {
+ CYG_REPORT_RETVAL(locale);
+ return (char *)locale;
+ } // else
+} // setlocale()
+
+externC struct lconv *
+localeconv( void )
+{
+ CYG_REPORT_FUNCNAMETYPE( "localeconv", "returning %08x" );
+ CYG_REPORT_FUNCARGVOID();
+
+ static struct lconv static_lconv;
+
+ static_lconv.decimal_point =
+ current_numeric_locale->numdata.decimal_point;
+
+ static_lconv.thousands_sep =
+ current_numeric_locale->numdata.thousands_sep;
+
+ static_lconv.grouping =
+ current_numeric_locale->numdata.grouping;
+
+ // we cheat a bit, but it should be worth it - a lot of these are
+ // constants which optimise nicely
+ cyg_ucount32 size_used;
+ size_used = (char *)&static_lconv.int_curr_symbol -
+ (char *)&static_lconv;
+
+ memcpy( &(static_lconv.int_curr_symbol),
+ &(current_monetary_locale->numdata.int_curr_symbol),
+ sizeof(struct lconv) - size_used );
+
+
+ CYG_REPORT_RETVAL( &static_lconv );
+ return &static_lconv;
+} // localeconv()
+
+// EOF locale.cxx
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/src/mblen.cxx b/cesar/ecos/packages/language/c/libc/i18n/current/src/mblen.cxx
new file mode 100644
index 0000000000..04beb49310
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/src/mblen.cxx
@@ -0,0 +1,210 @@
+//===========================================================================
+//
+// mblen.cxx
+//
+// ISO standard mblen() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jjohnstn
+// Contributors: jjohnstn
+// Date: 2000-11-01
+// Purpose: Provide ISO C mblen()
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+//
+// This code was based on newlib/libc/stdlib/mblen.c
+// The following is modified from the original newlib description:
+//
+/*
+FUNCTION
+<<mblen>>---multibyte length function
+
+INDEX
+ mblen
+
+ANSI_SYNOPSIS
+ #include <stdlib.h>
+ int mblen(const char *<[s]>, size_t <[n]>);
+
+TRAD_SYNOPSIS
+ #include <stdlib.h>
+ int mblen(<[s]>, <[n]>)
+ const char *<[s]>;
+ size_t <[n]>;
+
+DESCRIPTION
+When CYGINT_LIBC_I18N_MB_REQUIRED is not defined, this is a minimal ANSI-conforming
+implementation of <<mblen>>. In this case, the
+only ``multi-byte character sequences'' recognized are single bytes,
+and thus <<1>> is returned unless <[s]> is the null pointer or
+has a length of 0 or is the empty string.
+
+When CYGINT_LIBC_I18N_MB_REQUIRED is defined, this routine calls the locale's LC_CTYPE mbtowc_fn to perform
+the conversion, passing a state variable to allow state dependent
+decoding. The result is based on the locale setting which may
+be restricted to a defined set of locales.
+
+RETURNS
+This implementation of <<mblen>> returns <<0>> if
+<[s]> is <<NULL>> or the empty string; it returns <<1>> if not CYGINT_LIBC_I18N_MB_REQUIRED or
+the character is a single-byte character; it returns <<-1>>
+if the multi-byte character is invalid; otherwise it returns
+the number of bytes in the multibyte character.
+
+PORTABILITY
+<<mblen>> is required in the ANSI C standard. However, the precise
+effects vary with the locale.
+
+<<mblen>> requires no supporting OS subroutines.
+*/
+
+// CONFIGURATION
+
+#include <pkgconf/libc_i18n.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <locale.h>
+#include <stdlib.h> // Header for this file
+#include <string.h> // strcmp definition
+#include <stddef.h> // size_t definition
+#include "internal.h" // __current_ctype_locale definition
+
+#ifdef CYGSEM_LIBC_I18N_PER_THREAD_MB
+# include <pkgconf/kernel.h> // kernel configuration
+# include <cyg/kernel/thread.hxx> // per-thread data
+# include <cyg/kernel/thread.inl> // per-thread data
+# include <cyg/kernel/mutex.hxx> // mutexes
+#endif /* CYGSEM_LIBC_I18N_PER_THREAD_MB */
+
+// TRACE
+
+#if defined(CYGDBG_USE_TRACING) && defined(CYGNUM_LIBC_I18N_MBLEN_TRACE_LEVEL)
+static int mblen_trace = CYGNUM_LIBC_I18N_MBLEN_TRACE_LEVEL;
+# define TL1 (0 < mblen_trace)
+#else
+# define TL1 (0)
+#endif
+
+// STATICS
+
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+# ifdef CYGSEM_LIBC_I18N_PER_THREAD_MB
+static volatile Cyg_Thread::cyg_data_index
+mblen_data_index=CYGNUM_KERNEL_THREADS_DATA_MAX;
+
+static Cyg_Mutex mblen_data_mutex CYG_INIT_PRIORITY(LIBC);
+# else
+static int cyg_libc_mblen_last;
+# endif
+#endif
+
+// FUNCTIONS
+
+int
+mblen ( const char *s, size_t n )
+{
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+ int *state;
+#endif
+ int retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "mblen", "returning %d" );
+ CYG_REPORT_FUNCARG2( "s=%08x, n=%ud", s, n );
+
+ if (s != NULL)
+ CYG_CHECK_DATA_PTR( s, "s is not a valid pointer!" );
+
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+
+#ifdef CYGSEM_LIBC_I18N_PER_THREAD_MB
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Get a per-thread data slot if we haven't got one already
+ // Do a simple test before locking and retrying test, as this is a
+ // rare situation
+ if (CYGNUM_KERNEL_THREADS_DATA_MAX==mblen_data_index) {
+ mblen_data_mutex.lock();
+ if (CYGNUM_KERNEL_THREADS_DATA_MAX==mblen_data_index) {
+
+ // FIXME: Should use real CDL to pre-allocate a slot at compile
+ // time to ensure there are enough slots
+ mblen_data_index = self->new_data_index();
+
+ CYG_ASSERT(mblen_data_index >= 0, "failed to allocate data index" );
+ }
+ mblen_data_mutex.unlock();
+ } // if
+
+ // we have a valid index now
+
+ state = (int *)self->get_data_ptr(mblen_data_index);
+#else /* not CYGSEM_LIBC_I18N_PER_THREAD_MB */
+ state = &cyg_libc_mblen_last;
+#endif /* not CYGSEM_LIBC_I18N_PER_THREAD_MB */
+
+ CYG_TRACE2( TL1, "Retrieved mblen_last address %08x containing %d",
+ state, *state );
+
+ if (__current_ctype_locale->mbtowc_fn)
+ {
+ retval = __current_ctype_locale->mbtowc_fn (NULL, s, n, state);
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+#endif /* CYGINT_LIBC_I18N_MB_REQUIRED */
+
+ if (s == NULL || *s == '\0')
+ retval = 0;
+ else if (n == 0)
+ retval = -1;
+ else
+ retval = 1;
+
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+} // mblen()
+
+// EOF mblen.cxx
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/src/mbstowcs.cxx b/cesar/ecos/packages/language/c/libc/i18n/current/src/mbstowcs.cxx
new file mode 100644
index 0000000000..fd0363982a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/src/mbstowcs.cxx
@@ -0,0 +1,210 @@
+//===========================================================================
+//
+// mbstowcs.cxx
+//
+// ISO standard mbstowcs() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jjohnstn
+// Contributors: jjohnstn
+// Date: 2000-11-01
+// Purpose: Provide ISO C mbstowcs()
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+//
+// This code was based on newlib/libc/stdlib/mbstowcs.c and newlib/libc/stdlib/mbstowcs_r.c
+// The following is the modified from the original newlib description:
+//
+/*
+FUNCTION
+<<mbstowcs>>---multibyte string to wide char converter
+
+INDEX
+ mbstowcs
+
+ANSI_SYNOPSIS
+ #include <stdlib.h>
+ int mbstowcs(wchar_t *<[pwc]>, const char *<[s]>, size_t <[n]>);
+
+TRAD_SYNOPSIS
+ #include <stdlib.h>
+ int mbstowcs(<[pwc]>, <[s]>, <[n]>)
+ wchar_t *<[pwc]>;
+ const char *<[s]>;
+ size_t <[n]>;
+
+DESCRIPTION
+When CYGINT_LIBC_I18N_MB_REQUIRED is not defined, this is a minimal ANSI-conforming
+implementation of <<mbstowcs>>. In this case, the
+only ``multi-byte character sequences'' recognized are single bytes,
+and they are ``converted'' to wide-char versions simply by byte
+extension.
+
+When CYGINT_LIBC_I18N_MB_REQUIRED is defined, this routine calls the LC_CTYPE locale mbtowc_fn
+repeatedly to perform the conversion, passing a state variable to allow state dependent
+decoding. The result is based on the locale setting which may
+be restricted to a defined set of locales.
+
+RETURNS
+This implementation of <<mbstowcs>> returns <<0>> if
+<[s]> is <<NULL>> or is the empty string;
+it returns <<-1>> if CYGINT_LIBC_I18N_MB_REQUIRED and one of the
+multi-byte characters is invalid or incomplete;
+otherwise it returns the minimum of: <<n>> or the
+number of multi-byte characters in <<s>> plus 1 (to
+compensate for the nul character).
+If the return value is -1, the state of the <<pwc>> string is
+indeterminate. If the input has a length of 0, the output
+string will be modified to contain a wchar_t nul terminator.
+
+PORTABILITY
+<<mbstowcs>> is required in the ANSI C standard. However, the precise
+effects vary with the locale.
+
+<<mbstowcs>> requires no supporting OS subroutines.
+*/
+
+// CONFIGURATION
+
+#include <pkgconf/libc_i18n.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <locale.h>
+#include <stdlib.h> // Header for this file
+#include <string.h> // strcmp definition
+#include <stddef.h> // size_t definition
+#include "internal.h" // __current_ctype_locale
+
+#ifdef CYGSEM_LIBC_I18N_PER_THREAD_MBSTOWCS
+# include <pkgconf/kernel.h> // kernel configuration
+# include <cyg/kernel/thread.hxx> // per-thread data
+# include <cyg/kernel/thread.inl> // per-thread data
+# include <cyg/kernel/mutex.hxx> // mutexes
+#endif
+
+// TRACE
+
+#if defined(CYGDBG_USE_TRACING) && defined(CYGNUM_LIBC_I18N_MBSTOWCS_TRACE_LEVEL)
+static int mbstowcs_trace = CYGNUM_LIBC_I18N_MBSTOWCS_TRACE_LEVEL;
+# define TL1 (0 < mbstowcs_trace)
+#else
+# define TL1 (0)
+#endif
+
+// STATICS
+
+// FUNCTIONS
+
+size_t
+mbstowcs ( wchar_t *pwcs, const char *s, size_t n )
+{
+ size_t retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "mbstowcs", "returning %ud" );
+ CYG_REPORT_FUNCARG3( "pwcs=%08x, s=%08x, n=%ud", pwcs, s, n );
+
+ if (pwcs != NULL)
+ CYG_CHECK_DATA_PTR( pwcs, "pwcs is not a valid pointer!" );
+ if (s != NULL)
+ CYG_CHECK_DATA_PTR( s, "s is not a valid pointer!" );
+
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+
+ CYG_TRACE2( TL1, "Retrieved mbstowcs_last address %08x containing %d",
+ state, *state );
+
+ wchar_t *ptr = pwcs;
+ size_t max = n;
+ int state = 0;
+ char *t = (char *)s;
+ int bytes;
+ int (*mbtowc_fn)(wchar_t *, const char *, size_t, int *) = __current_ctype_locale->mbtowc_fn;
+
+ if (mbtowc_fn)
+ {
+ while (n > 0)
+ {
+ bytes = mbtowc_fn (ptr, t, MB_CUR_MAX, &state);
+ if (bytes == -1)
+ {
+ retval = (size_t)-1;
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+ else if (bytes == 0)
+ {
+ retval = ptr - pwcs;
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+ t += bytes;
+ ++ptr;
+ --n;
+ }
+
+ retval = max;
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+
+#endif /* CYGINT_LIBC_I18N_MB_REQUIRED */
+
+ int count = 0;
+
+ if (n != 0) {
+ do {
+ if ((*pwcs++ = (wchar_t) *s++) == 0)
+ break;
+ count++;
+ } while (--n != 0);
+ }
+
+ retval = count;
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+} // mbstowcs()
+
+// EOF mbstowcs.cxx
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/src/mbtowc.cxx b/cesar/ecos/packages/language/c/libc/i18n/current/src/mbtowc.cxx
new file mode 100644
index 0000000000..191f96d20e
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/src/mbtowc.cxx
@@ -0,0 +1,225 @@
+//===========================================================================
+//
+// mbtowc.cxx
+//
+// ISO standard mbtowc() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jjohnstn
+// Contributors: jjohnstn
+// Date: 2000-11-01
+// Purpose: Provide ISO C mbtowc() routine
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+//
+// This code was based upon newlib/libc/stdlib/mbtowc.c
+// The following is modified from the original newlib description:
+//
+/*
+FUNCTION
+<<mbtowc>>---multibyte to wide char converter
+
+INDEX
+ mbtowc
+
+ANSI_SYNOPSIS
+ #include <stdlib.h>
+ int mbtowc(wchar_t *<[pwc]>, const char *<[s]>, size_t <[n]>);
+
+TRAD_SYNOPSIS
+ #include <stdlib.h>
+ int mbtowc(<[pwc]>, <[s]>, <[n]>)
+ wchar_t *<[pwc]>;
+ const char *<[s]>;
+ size_t <[n]>;
+
+DESCRIPTION
+When CYGINT_LIBC_I18N_MB_REQUIRED is not defined, this is a minimal ANSI-conforming
+implementation of <<mbtowc>>. In this case,
+only ``multi-byte character sequences'' recognized are single bytes,
+and they are ``converted'' to themselves.
+Each call to <<mbtowc>> copies one character from <<*<[s]>>> to
+<<*<[pwc]>>>, unless <[s]> is a null pointer. The argument n
+is ignored.
+
+When CYGINT_LIBC_I18N_MB_REQUIRED is defined, this routine calls the LC_CTYPE locale mbtowc_fn to perform
+the conversion, passing a state variable to allow state dependent
+decoding. The result is based on the locale setting which may
+be restricted to a defined set of locales.
+
+RETURNS
+This implementation of <<mbtowc>> returns <<0>> if
+<[s]> is <<NULL>> or is the empty string;
+it returns <<1>> if not CYGINT_LIBC_I18N_MB_REQUIRED or
+the character is a single-byte character; it returns <<-1>>
+if n is <<0>> or the multi-byte character is invalid;
+otherwise it returns the number of bytes in the multibyte character.
+If the return value is -1, no changes are made to the <<pwc>>
+output string. If the input is the empty string, a wchar_t nul
+is placed in the output string and 0 is returned. If the input
+has a length of 0, no changes are made to the <<pwc>> output string.
+
+PORTABILITY
+<<mbtowc>> is required in the ANSI C standard. However, the precise
+effects vary with the locale.
+
+<<mbtowc>> requires no supporting OS subroutines.
+*/
+
+
+// CONFIGURATION
+
+#include <pkgconf/libc_i18n.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <locale.h>
+#include <stdlib.h> // Header for this file
+#include <string.h> // strcmp definition
+#include <stddef.h> // size_t definition
+#include "internal.h" // __current_ctype_locale
+
+#ifdef CYGSEM_LIBC_I18N_PER_THREAD_MB
+# include <pkgconf/kernel.h> // kernel configuration
+# include <cyg/kernel/thread.hxx> // per-thread data
+# include <cyg/kernel/thread.inl> // per-thread data
+# include <cyg/kernel/mutex.hxx> // mutexes
+#endif /* CYGSEM_LIBC_I18N_PER_THREAD_MB */
+
+// TRACE
+
+#if defined(CYGDBG_USE_TRACING) && defined(CYGNUM_LIBC_I18N_MBTOWC_TRACE_LEVEL)
+static int mbtowc_trace = CYGNUM_LIBC_I18N_MBTOWC_TRACE_LEVEL;
+# define TL1 (0 < mbtowc_trace)
+#else
+# define TL1 (0)
+#endif
+
+// STATICS
+
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+# ifdef CYGSEM_LIBC_I18N_PER_THREAD_MB
+static volatile Cyg_Thread::cyg_data_index
+mbtowc_data_index=CYGNUM_KERNEL_THREADS_DATA_MAX;
+
+static Cyg_Mutex mbtowc_data_mutex CYG_INIT_PRIORITY(LIBC);
+# else
+static int cyg_libc_mbtowc_last;
+# endif
+#endif
+
+// FUNCTIONS
+
+int
+mbtowc ( wchar_t *pwc, const char *s, size_t n )
+{
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+ int *state;
+#endif
+ int retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "mbtowc", "returning %d" );
+ CYG_REPORT_FUNCARG3( "pwc=%08x, s=%08x, n=%ud", pwc, s, n );
+
+ if (pwc != NULL)
+ CYG_CHECK_DATA_PTR( pwc, "pwc is not a valid pointer!" );
+ if (s != NULL)
+ CYG_CHECK_DATA_PTR( s, "s is not a valid pointer!" );
+
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+
+#ifdef CYGSEM_LIBC_I18N_PER_THREAD_MB
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Get a per-thread data slot if we haven't got one already
+ // Do a simple test before locking and retrying test, as this is a
+ // rare situation
+ if (CYGNUM_KERNEL_THREADS_DATA_MAX==mbtowc_data_index) {
+ mbtowc_data_mutex.lock();
+ if (CYGNUM_KERNEL_THREADS_DATA_MAX==mbtowc_data_index) {
+
+ // FIXME: Should use real CDL to pre-allocate a slot at compile
+ // time to ensure there are enough slots
+ mbtowc_data_index = self->new_data_index();
+
+ CYG_ASSERT(mbtowc_data_index >= 0, "failed to allocate data index" );
+ }
+ mbtowc_data_mutex.unlock();
+ } // if
+
+ // we have a valid index now
+
+ state = (int *)self->get_data_ptr(mbtowc_data_index);
+#else
+ state = &cyg_libc_mbtowc_last;
+#endif
+
+ CYG_TRACE2( TL1, "Retrieved mbtowc_last address %08x containing %d",
+ state, *state );
+
+ if (__current_ctype_locale->mbtowc_fn)
+ {
+ retval = __current_ctype_locale->mbtowc_fn (pwc, s, n, state);
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+#endif /* CYGINT_LIBC_I18N_MB_REQUIRED */
+
+ if (s == NULL)
+ retval = 0;
+ else if (n == 0)
+ retval = -1;
+ else
+ {
+ if (pwc)
+ *pwc = (wchar_t) *s;
+ retval = (*s != '\0');
+ }
+
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+} // mbtowc()
+
+// EOF mbtowc.cxx
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/src/mbtowc_c.cxx b/cesar/ecos/packages/language/c/libc/i18n/current/src/mbtowc_c.cxx
new file mode 100644
index 0000000000..65bb798cf4
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/src/mbtowc_c.cxx
@@ -0,0 +1,120 @@
+//===========================================================================
+//
+// mbtowc_c.cxx
+//
+// Internal __mbtowc_c() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jjohnstn
+// Contributors: jjohnstn
+// Date: 2000-11-24
+// Purpose: Provide internal use __mbtowc_c() routine
+// Description: C locale version of mbtowc()
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+//
+
+// CONFIGURATION
+
+#include <pkgconf/libc_i18n.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <locale.h>
+#include <stdlib.h> // Header for this file
+#include <string.h> // strcmp definition
+#include <stddef.h> // size_t definition
+#include "internal.h" // internal __isxxxx macros
+
+// TRACE
+
+#if defined(CYGDBG_USE_TRACING) && defined(CYGNUM_LIBC_STDLIB_MBTOWC_TRACE_LEVEL)
+static int mbtowc_trace = CYGNUM_LIBC_STDLIB_MBTOWC_TRACE_LEVEL;
+# define TL1 (0 < mbtowc_trace)
+#else
+# define TL1 (0)
+#endif
+
+// STATICS
+
+// FUNCTIONS
+
+int
+__mbtowc_c ( wchar_t *pwc, const char *s, size_t n, int *state )
+{
+ wchar_t dummy;
+ unsigned char *t = (unsigned char *)s;
+ int retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "__mbtowc_c", "returning %d" );
+ CYG_REPORT_FUNCARG4( "pwc=%08x, s=%08x, n=%ud, state=%08x", pwc, s, n, state );
+
+ if (pwc != NULL)
+ CYG_CHECK_DATA_PTR( pwc, "pwc is not a valid pointer!" );
+ if (s != NULL)
+ CYG_CHECK_DATA_PTR( s, "s is not a valid pointer!" );
+
+ if (pwc == NULL)
+ pwc = &dummy;
+
+ if (s != NULL && n == 0)
+ {
+ retval = -1;
+ CYG_REPORT_RETVAL (retval);
+ return retval;
+ }
+
+ if (s == NULL)
+ retval = 0; /* not state-dependent */
+ else
+ {
+ if (pwc)
+ *pwc = (wchar_t)*t;
+ retval = (*t != '\0');
+ }
+ CYG_REPORT_RETVAL (retval);
+ return retval;
+} // __mbtowc_c()
+
+// EOF mbtowc_c.cxx
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/src/mbtowc_jp.cxx b/cesar/ecos/packages/language/c/libc/i18n/current/src/mbtowc_jp.cxx
new file mode 100644
index 0000000000..1e3de5a4e6
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/src/mbtowc_jp.cxx
@@ -0,0 +1,331 @@
+//===========================================================================
+//
+// mbtowc_jp.cxx
+//
+// Internal __mbtowc_jp() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jjohnstn
+// Contributors: jjohnstn
+// Date: 2000-11-16
+// Purpose: Provide internal use __mbtowc_jp() routine
+// Description: Japanese locale version of mbtowc()
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+//
+// This code was taken from newlib/libc/stdlib/mbtowc_r.c
+
+
+// CONFIGURATION
+
+#include <pkgconf/libc_i18n.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <locale.h>
+#include <stdlib.h> // Header for this file
+#include <string.h> // strcmp definition
+#include <stddef.h> // size_t definition
+#include "internal.h" // internal __isxxxx macros
+
+// TRACE
+
+#if defined(CYGDBG_USE_TRACING) && defined(CYGNUM_LIBC_STDLIB_MBTOWC_TRACE_LEVEL)
+static int mbtowc_trace = CYGNUM_LIBC_STDLIB_MBTOWC_TRACE_LEVEL;
+# define TL1 (0 < mbtowc_trace)
+#else
+# define TL1 (0)
+#endif
+
+// STATICS
+
+
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_JIS
+typedef enum { ESCAPE, DOLLAR, BRACKET, AT, B, J,
+ NUL, JIS_CHAR, OTHER, JIS_C_NUM } JIS_CHAR_TYPE;
+typedef enum { ASCII, A_ESC, A_ESC_DL, JIS, JIS_1, JIS_2, J_ESC, J_ESC_BR,
+ J2_ESC, J2_ESC_BR, DONE, INV, JIS_S_NUM } JIS_STATE;
+typedef enum { COPY_A, COPY_J, COPY_J2, MAKE_A, MAKE_J, NOOP, EMPTY, ERROR } JIS_ACTION;
+
+/**************************************************************************************
+ * state/action tables for processing JIS encoding
+ * Where possible, switches to JIS are grouped with proceding JIS characters and switches
+ * to ASCII are grouped with preceding JIS characters. Thus, maximum returned length
+ * is 2 (switch to JIS) + 2 (JIS characters) + 2 (switch back to ASCII) = 6.
+ *************************************************************************************/
+
+static JIS_STATE JIS_state_table[JIS_S_NUM][JIS_C_NUM] = {
+/* ESCAPE DOLLAR BRACKET AT B J NUL JIS_CHAR OTHER */
+/* ASCII */ { A_ESC, DONE, DONE, DONE, DONE, DONE, DONE, DONE, DONE },
+/* A_ESC */ { DONE, A_ESC_DL, DONE, DONE, DONE, DONE, DONE, DONE, DONE },
+/* A_ESC_DL */{ DONE, DONE, DONE, JIS, JIS, DONE, DONE, DONE, DONE },
+/* JIS */ { J_ESC, JIS_1, JIS_1, JIS_1, JIS_1, JIS_1, INV, JIS_1, INV },
+/* JIS_1 */ { INV, JIS_2, JIS_2, JIS_2, JIS_2, JIS_2, INV, JIS_2, INV },
+/* JIS_2 */ { J2_ESC, DONE, DONE, DONE, DONE, DONE, INV, DONE, DONE },
+/* J_ESC */ { INV, INV, J_ESC_BR, INV, INV, INV, INV, INV, INV },
+/* J_ESC_BR */{ INV, INV, INV, INV, ASCII, ASCII, INV, INV, INV },
+/* J2_ESC */ { INV, INV, J2_ESC_BR,INV, INV, INV, INV, INV, INV },
+/* J2_ESC_BR*/{ INV, INV, INV, INV, DONE, DONE, INV, INV, INV },
+};
+
+static JIS_ACTION JIS_action_table[JIS_S_NUM][JIS_C_NUM] = {
+/* ESCAPE DOLLAR BRACKET AT B J NUL JIS_CHAR OTHER */
+/* ASCII */ { NOOP, COPY_A, COPY_A, COPY_A, COPY_A, COPY_A, EMPTY, COPY_A, COPY_A},
+/* A_ESC */ { COPY_A, NOOP, COPY_A, COPY_A, COPY_A, COPY_A, COPY_A, COPY_A, COPY_A},
+/* A_ESC_DL */{ COPY_A, COPY_A, COPY_A, MAKE_J, MAKE_J, COPY_A, COPY_A, COPY_A, COPY_A},
+/* JIS */ { NOOP, NOOP, NOOP, NOOP, NOOP, NOOP, ERROR, NOOP, ERROR },
+/* JIS_1 */ { ERROR, NOOP, NOOP, NOOP, NOOP, NOOP, ERROR, NOOP, ERROR },
+/* JIS_2 */ { NOOP, COPY_J2, COPY_J2, COPY_J2, COPY_J2, COPY_J2, ERROR, COPY_J2, COPY_J2},
+/* J_ESC */ { ERROR, ERROR, NOOP, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR },
+/* J_ESC_BR */{ ERROR, ERROR, ERROR, ERROR, NOOP, NOOP, ERROR, ERROR, ERROR },
+/* J2_ESC */ { ERROR, ERROR, NOOP, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR },
+/* J2_ESC_BR*/{ ERROR, ERROR, ERROR, ERROR, COPY_J, COPY_J, ERROR, ERROR, ERROR },
+};
+#endif // CYGFUN_LIBC_I18N_LOCALE_C_JIS
+
+// FUNCTIONS
+
+int
+__mbtowc_jp ( wchar_t *pwc, const char *s, size_t n, int *state )
+{
+ wchar_t dummy;
+ unsigned char *t = (unsigned char *)s;
+ int retval;
+ const char *cur_locale = __current_ctype_locale->name;
+
+ CYG_REPORT_FUNCNAMETYPE( "__mbtowc_jp", "returning %d" );
+ CYG_REPORT_FUNCARG4( "pwc=%08x, s=%08x, n=%ud, state=%08x", pwc, s, n, state );
+
+ if (pwc != NULL)
+ CYG_CHECK_DATA_PTR( pwc, "pwc is not a valid pointer!" );
+ if (s != NULL)
+ CYG_CHECK_DATA_PTR( s, "s is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( state, "state is not a valid pointer!" );
+
+ if (pwc == NULL)
+ pwc = &dummy;
+
+ if (s != NULL && n == 0)
+ {
+ retval = -1;
+ CYG_REPORT_RETVAL (retval);
+ return retval;
+ }
+
+ if (cur_locale == NULL ||
+ (strlen (cur_locale) <= 1))
+ { /* fall-through */ }
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_SJIS
+ else if (!strcmp (cur_locale, "C-SJIS"))
+ {
+ int char1;
+ if (s == NULL)
+ {
+ retval = 0;
+ CYG_REPORT_RETVAL (retval);
+ return retval; /* not state-dependent */
+ }
+ char1 = *t;
+ if (_issjis1 (char1))
+ {
+ int char2 = t[1];
+ if (n <= 1)
+ retval = -1;
+ else if (_issjis2 (char2))
+ {
+ *pwc = (((wchar_t)*t) << 8) + (wchar_t)(*(t+1));
+ retval = 2;
+ }
+ else
+ retval = -1;
+ CYG_REPORT_RETVAL (retval);
+ return retval;
+ }
+ }
+#endif /* CYGFUN_LIBC_I18N_LOCALE_C_SJIS */
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_EUCJP
+ else if (!strcmp (cur_locale, "C-EUCJP"))
+ {
+ int char1;
+ if (s == NULL)
+ {
+ retval = 0; /* not state-dependent */
+ CYG_REPORT_RETVAL (retval);
+ return retval; /* not state-dependent */
+ }
+ char1 = *t;
+ if (_iseucjp (char1))
+ {
+ int char2 = t[1];
+ if (n <= 1)
+ retval = -1;
+ if (_iseucjp (char2))
+ {
+ *pwc = (((wchar_t)*t) << 8) + (wchar_t)(*(t+1));
+ retval = 2;
+ }
+ else
+ retval = -1;
+ CYG_REPORT_RETVAL (retval);
+ return retval;
+ }
+ }
+#endif /* CYGFUN_LIBC_I18N_LOCALE_C_EUCJP */
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_JIS
+ else if (!strcmp (cur_locale, "C-JIS"))
+ {
+ JIS_STATE curr_state;
+ JIS_ACTION action;
+ JIS_CHAR_TYPE ch;
+ unsigned char *ptr;
+ int i, curr_ch;
+
+ if (s == NULL)
+ {
+ *state = 0;
+ retval = 1;
+ CYG_REPORT_RETVAL (retval);
+ return retval; /* state-dependent */
+ }
+
+ curr_state = (*state == 0 ? ASCII : JIS);
+ ptr = t;
+
+ for (i = 0; i < (int)n; ++i)
+ {
+ curr_ch = t[i];
+ switch (curr_ch)
+ {
+ case ESC_CHAR:
+ ch = ESCAPE;
+ break;
+ case '$':
+ ch = DOLLAR;
+ break;
+ case '@':
+ ch = AT;
+ break;
+ case '(':
+ ch = BRACKET;
+ break;
+ case 'B':
+ ch = B;
+ break;
+ case 'J':
+ ch = J;
+ break;
+ case '\0':
+ ch = NUL;
+ break;
+ default:
+ if (_isjis (curr_ch))
+ ch = JIS_CHAR;
+ else
+ ch = OTHER;
+ }
+
+ action = JIS_action_table[curr_state][ch];
+ curr_state = JIS_state_table[curr_state][ch];
+
+ switch (action)
+ {
+ case NOOP:
+ break;
+ case EMPTY:
+ *state = 0;
+ *pwc = (wchar_t)0;
+ retval = i;
+ CYG_REPORT_RETVAL (retval);
+ return retval;
+ case COPY_A:
+ *state = 0;
+ *pwc = (wchar_t)*ptr;
+ retval = i + 1;
+ CYG_REPORT_RETVAL (retval);
+ return retval;
+ case COPY_J:
+ *state = 0;
+ *pwc = (((wchar_t)*ptr) << 8) + (wchar_t)(*(ptr+1));
+ retval = i + 1;
+ CYG_REPORT_RETVAL (retval);
+ return retval;
+ case COPY_J2:
+ *state = 1;
+ *pwc = (((wchar_t)*ptr) << 8) + (wchar_t)(*(ptr+1));
+ retval = (ptr - t) + 2;
+ CYG_REPORT_RETVAL (retval);
+ return retval;
+ case MAKE_A:
+ case MAKE_J:
+ ptr = (unsigned char *)(t + i + 1);
+ break;
+ case ERROR:
+ default:
+ retval = -1;
+ CYG_REPORT_RETVAL (retval);
+ return retval;
+ }
+
+ }
+
+ retval = -1; /* n < bytes needed */
+ CYG_REPORT_RETVAL (retval);
+ return retval;
+ }
+#endif /* CYGFUN_LIBC_I18N_LOCALE_C_JIS */
+
+ /* otherwise this must be the "C" locale or unknown locale */
+ if (s == NULL)
+ retval = 0; /* not state-dependent */
+ else
+ {
+ if (pwc)
+ *pwc = (wchar_t)*t;
+ retval = (*t != '\0');
+ }
+ CYG_REPORT_RETVAL (retval);
+ return retval;
+} // __mbtowc_jp()
+
+// EOF mbtowc_jp.cxx
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/src/newlibctype.cxx b/cesar/ecos/packages/language/c/libc/i18n/current/src/newlibctype.cxx
new file mode 100644
index 0000000000..cd83f77305
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/src/newlibctype.cxx
@@ -0,0 +1,229 @@
+/*===========================================================================
+//
+// newlibctype.cxx
+//
+// newlib's implementation of the ctype functions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2004 eCosCentric Ltd.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2004-02-16
+// Purpose: Provides newlib's implementation of the ctype functions.
+// Description: Also provides a degree of binary compatibility with newlib
+// ctype functions, primarily for the benefit of libstdc++.
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/libc_i18n.h> // Configuration header
+
+#ifdef CYGPKG_LIBC_I18N_NEWLIB_CTYPE
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/libc/i18n/newlibctype.h>
+
+#define _CONST const // just for compatibility
+
+#define _CTYPE_DATA_0_127 \
+ _C, _C, _C, _C, _C, _C, _C, _C, \
+ _C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C, \
+ _C, _C, _C, _C, _C, _C, _C, _C, \
+ _C, _C, _C, _C, _C, _C, _C, _C, \
+ _S|_B, _P, _P, _P, _P, _P, _P, _P, \
+ _P, _P, _P, _P, _P, _P, _P, _P, \
+ _N, _N, _N, _N, _N, _N, _N, _N, \
+ _N, _N, _P, _P, _P, _P, _P, _P, \
+ _P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U, \
+ _U, _U, _U, _U, _U, _U, _U, _U, \
+ _U, _U, _U, _U, _U, _U, _U, _U, \
+ _U, _U, _U, _P, _P, _P, _P, _P, \
+ _P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L, \
+ _L, _L, _L, _L, _L, _L, _L, _L, \
+ _L, _L, _L, _L, _L, _L, _L, _L, \
+ _L, _L, _L, _P, _P, _P, _P, _C
+
+#define _CTYPE_DATA_128_256 \
+ 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0
+
+_CONST char _ctype_[1 + 256] = {
+ 0,
+ _CTYPE_DATA_0_127,
+ _CTYPE_DATA_128_256
+};
+_CONST char *__ctype_ptr = _ctype_ + 1;
+
+#undef _tolower
+#undef tolower
+#undef _toupper
+#undef toupper
+
+int
+_tolower(int c)
+{
+ return isupper(c) ? (c) - 'A' + 'a' : c;
+}
+
+int
+tolower(int c)
+{
+ return isupper(c) ? (c) - 'A' + 'a' : c;
+}
+
+int
+_toupper(int c)
+{
+ return islower(c) ? c - 'a' + 'A' : c;
+}
+
+int
+toupper(int c)
+{
+ return islower(c) ? c - 'a' + 'A' : c;
+}
+
+#undef isalnum
+#undef isalpha
+#undef isascii
+#undef iscntrl
+#undef isdigit
+#undef islower
+#undef isgraph
+#undef isprint
+#undef ispunct
+#undef isspace
+#undef isupper
+#undef isxdigit
+#undef toascii
+
+int
+isalnum(int c)
+{
+ return((_ctype_ + 1)[c] & (_U|_L|_N));
+}
+
+int
+isalpha(int c)
+{
+ return((_ctype_ + 1)[c] & (_U|_L));
+}
+
+int
+isascii(int c)
+{
+ return c >= 0 && c< 128;
+}
+
+int
+iscntrl(int c)
+{
+ return((_ctype_ + 1)[c] & _C);
+}
+
+int
+isdigit(int c)
+{
+ return((_ctype_ + 1)[c] & _N);
+}
+
+int
+islower(int c)
+{
+ return((_ctype_ + 1)[c] & _L);
+}
+
+int
+isgraph(int c)
+{
+ return((_ctype_ + 1)[c] & (_P|_U|_L|_N));
+}
+
+int
+isprint(int c)
+{
+ return((_ctype_ + 1)[c] & (_P|_U|_L|_N|_B));
+}
+
+int
+ispunct(int c)
+{
+ return((_ctype_ + 1)[c] & _P);
+}
+
+int
+isspace(int c)
+{
+ return((_ctype_ + 1)[c] & _S);
+}
+
+int
+isupper(int c)
+{
+ return((_ctype_ + 1)[c] & _U);
+}
+
+int
+isxdigit(int c)
+{
+ return((_ctype_ + 1)[c] & ((_X)|(_N)));
+}
+
+int
+toascii(int c)
+{
+ return (c)&0177;
+}
+
+#endif // ifdef CYGPKG_LIBC_I18N_NEWLIB_CTYPE
+
+/* EOF newlibctype.cxx */
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/src/wcstombs.cxx b/cesar/ecos/packages/language/c/libc/i18n/current/src/wcstombs.cxx
new file mode 100644
index 0000000000..dce94caceb
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/src/wcstombs.cxx
@@ -0,0 +1,210 @@
+//===========================================================================
+//
+// wcstombs.cxx
+//
+// ISO standard wcstombs() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jjohnstn
+// Contributors: jjohnstn
+// Date: 2000-11-02
+// Purpose: Provide ISO C wcstombs()
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+//
+// This code was based on newlib/libc/stdlib/wcstombs.c and newlib/libc/stdlib/wcstombs_r.c
+// The following is modified from the original newlib description:
+//
+/*
+FUNCTION
+<<wcstombs>>---wide char string to multibyte string converter
+
+INDEX
+ wcstombs
+
+ANSI_SYNOPSIS
+ #include <stdlib.h>
+ int wcstombs(const char *<[s]>, wchar_t *<[pwc]>, size_t <[n]>);
+
+TRAD_SYNOPSIS
+ #include <stdlib.h>
+ int wcstombs(<[s]>, <[pwc]>, <[n]>)
+ const char *<[s]>;
+ wchar_t *<[pwc]>;
+ size_t <[n]>;
+
+DESCRIPTION
+When CYGINT_LIBC_I18N_MB_REQUIRED is not defined, this is a minimal ANSI-conforming
+implementation of <<wcstombs>>. In this case,
+all wide-characters are expected to represent single bytes and so
+are converted simply by casting to char.
+
+When CYGINT_LIBC_I18N_MB_REQUIRED is defined, this routine calls the LC_CTYPE locale wcstomb_fn
+repeatedly to perform the conversion, passing a state variable to allow state dependent
+decoding. The result is based on the locale setting which may
+be restricted to a defined set of locales.
+
+RETURNS
+This implementation of <<wcstombs>> returns <<0>> if
+<[s]> is <<NULL>> or is the empty string;
+it returns <<-1>> if CYGINT_LIBC_I18N_MB_REQUIRED and one of the
+wide-char characters does not represent a valid multi-byte character;
+otherwise it returns the minimum of: <<n>> or the
+number of bytes that are transferred to <<s>>, not including the
+nul terminator.
+
+If the return value is -1, the state of the <<pwc>> string is
+indeterminate. If the input has a length of 0, the output
+string will be modified to contain a wchar_t nul terminator if
+<<n>> > 0.
+
+PORTABILITY
+<<wcstombs>> is required in the ANSI C standard. However, the precise
+effects vary with the locale.
+
+<<wcstombs>> requires no supporting OS subroutines.
+*/
+
+// CONFIGURATION
+
+#include <pkgconf/libc_i18n.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <locale.h>
+#include <stdlib.h> // Header for this file
+#include <string.h> // strcmp definition
+#include <stddef.h> // size_t definition
+#include "internal.h" // __current_ctype_locale
+
+#ifdef CYGSEM_LIBC_I18N_PER_THREAD_WCSTOMBS
+# include <pkgconf/kernel.h> // kernel configuration
+# include <cyg/kernel/thread.hxx> // per-thread data
+# include <cyg/kernel/thread.inl> // per-thread data
+# include <cyg/kernel/mutex.hxx> // mutexes
+#endif
+
+// TRACE
+
+#if defined(CYGDBG_USE_TRACING) && defined(CYGNUM_LIBC_I18N_WCSTOMBS_TRACE_LEVEL)
+static int wcstombs_trace = CYGNUM_LIBC_I18N_WCSTOMBS_TRACE_LEVEL;
+# define TL1 (0 < wcstombs_trace)
+#else
+# define TL1 (0)
+#endif
+
+// STATICS
+
+// FUNCTIONS
+
+size_t
+wcstombs ( char *s, const wchar_t *pwcs, size_t n )
+{
+ size_t retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "wcstombs", "returning %ud" );
+ CYG_REPORT_FUNCARG3( "s=%08x, pwcs=%08x, n=%ud", s, pwcs, n );
+
+ if (s != NULL)
+ CYG_CHECK_DATA_PTR( s, "s is not a valid pointer!" );
+ if (pwcs != NULL)
+ CYG_CHECK_DATA_PTR( pwcs, "pwcs is not a valid pointer!" );
+
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+
+ char *ptr = s;
+ size_t max = n;
+ int state = 0;
+ char buff[8];
+ int i, num_to_copy;
+ int (*wctomb_fn)(char *, wchar_t, int *) = __current_ctype_locale->wctomb_fn;
+
+ if (wctomb_fn)
+ {
+ while (n > 0)
+ {
+ int bytes = (size_t)(wctomb_fn (buff, *pwcs, &state));
+ if (bytes == -1)
+ {
+ retval = (size_t)-1;
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+ num_to_copy = ((int)n > bytes ? bytes : (int)n);
+ for (i = 0; i < num_to_copy; ++i)
+ *ptr++ = buff[i];
+
+ if (*pwcs == 0x00)
+ {
+ retval = ptr - s - ((int)n >= bytes);
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+ ++pwcs;
+ n -= num_to_copy;
+ }
+
+ retval = max;
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+#endif /* CYGINT_LIBC_I18N_MB_REQUIRED */
+
+ int count = 0;
+
+ if (n != 0) {
+ do {
+ if ((*s++ = (char) *pwcs++) == 0)
+ break;
+ count++;
+ } while (--n != 0);
+ }
+
+ retval = count;
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+} // wcstombs()
+
+// EOF wcstombs.cxx
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/src/wctomb.cxx b/cesar/ecos/packages/language/c/libc/i18n/current/src/wctomb.cxx
new file mode 100644
index 0000000000..23cb6715ae
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/src/wctomb.cxx
@@ -0,0 +1,213 @@
+//===========================================================================
+//
+// wctomb.cxx
+//
+// ISO standard wctomb() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jjohnstn
+// Contributors: jjohnstn
+// Date: 2000-11-02
+// Purpose: Provide ISO C wctomb() routine
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+//
+// This code was based on newlib/libc/stdlib/wctomb.c
+// The following is modified from the original newlib description:
+//
+/*
+FUNCTION
+<<wctomb>>---wide char to multibyte converter
+
+INDEX
+ wctomb
+
+ANSI_SYNOPSIS
+ #include <stdlib.h>
+ int wctomb(char *<[s]>, wchar_t <[wchar]>);
+
+TRAD_SYNOPSIS
+ #include <stdlib.h>
+ int wctomb(<[s]>, <[wchar]>)
+ char *<[s]>;
+ wchar_t <[wchar]>;
+
+DESCRIPTION
+When CYG_LIBC_MB_CAPABLE is not defined, this is a minimal ANSI-conforming
+implementation of <<wctomb>>. The
+only ``wide characters'' recognized are single bytes,
+and they are ``converted'' to themselves.
+
+When CYG_LIBC_MB_CAPABLE is defined, this routine calls the LC_CTYPE locale wctomb_fn to perform
+the conversion, passing a state variable to allow state dependent
+decoding. The result is based on the locale setting which may
+be restricted to a defined set of locales.
+
+Each call to <<wctomb>> modifies <<*<[s]>>> unless <[s]> is a null
+pointer or CYG_LIBC_MB_CAPABLE is defined and <[wchar]> is invalid.
+
+RETURNS
+This implementation of <<wctomb>> returns <<0>> if
+<[s]> is <<NULL>>; it returns <<-1>> if CYG_LIBC_MB_CAPABLE is enabled
+and the wchar is not a valid multi-byte character, it returns <<1>>
+if CYG_LIBC_MB_CAPABLE is not defined or the wchar is in reality a single
+byte character, otherwise it returns the number of bytes in the
+multi-byte character.
+
+PORTABILITY
+<<wctomb>> is required in the ANSI C standard. However, the precise
+effects vary with the locale.
+
+<<wctomb>> requires no supporting OS subroutines.
+*/
+
+
+// CONFIGURATION
+
+#include <pkgconf/libc_i18n.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <locale.h>
+#include <stdlib.h> // Header for this file
+#include <string.h> // strcmp definition
+#include <stddef.h> // size_t definition
+#include "internal.h" // __current_ctype_locale definition
+
+#ifdef CYGSEM_LIBC_I18N_PER_THREAD_MB
+# include <pkgconf/kernel.h> // kernel configuration
+# include <cyg/kernel/thread.hxx> // per-thread data
+# include <cyg/kernel/thread.inl> // per-thread data
+# include <cyg/kernel/mutex.hxx> // mutexes
+#endif /* CYGSEM_LIBC_I18N_PER_THREAD_MB */
+
+// TRACE
+
+#if defined(CYGDBG_USE_TRACING) && defined(CYGNUM_LIBC_I18N_WCTOMB_TRACE_LEVEL)
+static int wctomb_trace = CYGNUM_LIBC_I18N_WCTOMB_TRACE_LEVEL;
+# define TL1 (0 < wctomb_trace)
+#else
+# define TL1 (0)
+#endif
+
+// STATICS
+
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+# ifdef CYGSEM_LIBC_I18N_PER_THREAD_MB
+static volatile Cyg_Thread::cyg_data_index
+wctomb_data_index=CYGNUM_KERNEL_THREADS_DATA_MAX;
+static Cyg_Mutex wctomb_data_mutex CYG_INIT_PRIORITY(LIBC);
+# else
+static int cyg_libc_wctomb_last;
+# endif
+#endif
+
+int
+wctomb ( char *s, const wchar_t wchar )
+{
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+ int *state;
+#endif
+ int retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "wctomb", "returning %d" );
+ CYG_REPORT_FUNCARG2( "s=%08x, wchar=%08x", s, wchar );
+
+ if (s != NULL)
+ CYG_CHECK_DATA_PTR( s, "s is not a valid pointer!" );
+
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+
+#ifdef CYGSEM_LIBC_I18N_PER_THREAD_MB
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Get a per-thread data slot if we haven't got one already
+ // Do a simple test before locking and retrying test, as this is a
+ // rare situation
+ if (CYGNUM_KERNEL_THREADS_DATA_MAX==wctomb_data_index) {
+ wctomb_data_mutex.lock();
+ if (CYGNUM_KERNEL_THREADS_DATA_MAX==wctomb_data_index) {
+
+ // FIXME: Should use real CDL to pre-allocate a slot at compile
+ // time to ensure there are enough slots
+ wctomb_data_index = self->new_data_index();
+
+ CYG_ASSERT(wctomb_data_index >= 0, "failed to allocate data index" );
+ }
+ wctomb_data_mutex.unlock();
+ } // if
+
+ // we have a valid index now
+
+ state = (int *)self->get_data_ptr(wctomb_data_index);
+#else /* not CYGSEM_LIBC_I18N_PER_THREAD_MB */
+ state = &cyg_libc_wctomb_last;
+#endif /* not CYGSEM_LIBC_I18N_PER_THREAD_MB */
+
+ CYG_TRACE2( TL1, "Retrieved wctomb_last address %08x containing %d",
+ state, *state );
+
+ if (__current_ctype_locale->wctomb_fn)
+ {
+ retval = __current_ctype_locale->wctomb_fn (s, wchar, state);
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+#endif /* CYGINT_LIBC_I18N_MB_REQUIRED */
+
+ if (s == NULL)
+ retval = 0;
+ else
+ {
+ *s = (char) wchar;
+ retval = 1;
+ }
+
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+
+} // wctomb()
+
+// EOF wctomb.cxx
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/src/wctomb_jp.cxx b/cesar/ecos/packages/language/c/libc/i18n/current/src/wctomb_jp.cxx
new file mode 100644
index 0000000000..404a6becc6
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/src/wctomb_jp.cxx
@@ -0,0 +1,233 @@
+//===========================================================================
+//
+// wctomb_jp.cxx
+//
+// Internal __wctombc_jp() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jjohnstn
+// Contributors: jjohnstn
+// Date: 2000-11-16
+// Purpose: Provide internal use __wctomb_jp() routine
+// Description: Japanese locale version of wctomb()
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+//
+// This code was taken from newlib/libc/stdlib/wctomb_r.c
+//
+
+// CONFIGURATION
+
+#include <pkgconf/libc_i18n.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <locale.h>
+#include <stdlib.h> // Header for this file
+#include <string.h> // strcmp definition
+#include <stddef.h> // size_t definition
+#include "internal.h" // internal _isxxxx macros
+
+#ifdef CYGSEM_LIBC_STDLIB_PER_THREAD_WCTOMB
+# include <pkgconf/kernel.h> // kernel configuration
+# include <cyg/kernel/thread.hxx> // per-thread data
+# include <cyg/kernel/thread.inl> // per-thread data
+# include <cyg/kernel/mutex.hxx> // mutexes
+#endif
+
+// TRACE
+
+#if defined(CYGDBG_USE_TRACING) && defined(CYGNUM_LIBC_STDLIB_WCTOMB_TRACE_LEVEL)
+static int wctomb_trace = CYGNUM_LIBC_STDLIB_WCTOMB_TRACE_LEVEL;
+# define TL1 (0 < wctomb_trace)
+#else
+# define TL1 (0)
+#endif
+
+// FUNCTIONS
+
+int
+__wctomb_jp ( char *s, wchar_t wchar, int *state )
+{
+ const char *cur_locale = __current_ctype_locale->name;
+ int retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "__wctomb_jp", "returning %d" );
+ CYG_REPORT_FUNCARG3( "s=%08x, wchar=%08x, state=%08x", s, wchar, state );
+
+ if (s != NULL)
+ CYG_CHECK_DATA_PTR( s, "s is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( state, "state is not a valid pointer!" );
+
+ if (strlen (cur_locale) <= 1)
+ { /* fall-through */ }
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_SJIS
+ else if (!strcmp (cur_locale, "C-SJIS"))
+ {
+ unsigned char char2 = (unsigned char)wchar;
+ unsigned char char1 = (unsigned char)(wchar >> 8);
+
+ if (s == NULL)
+ {
+ retval = 0; /* not state-dependent */
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+
+ if (char1 != 0x00)
+ {
+ /* first byte is non-zero..validate multi-byte char */
+ if (_issjis1(char1) && _issjis2(char2))
+ {
+ *s++ = (char)char1;
+ *s = (char)char2;
+ retval = 2;
+ }
+ else
+ retval = -1;
+
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+ }
+#endif /* CYGFUN_LIBC_I18N_LOCALE_C_SJIS */
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_EUCJP
+ else if (!strcmp (cur_locale, "C-EUCJP"))
+ {
+ unsigned char char2 = (unsigned char)wchar;
+ unsigned char char1 = (unsigned char)(wchar >> 8);
+
+ if (s == NULL)
+ {
+ retval = 0; /* not state-dependent */
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+
+ if (char1 != 0x00)
+ {
+ /* first byte is non-zero..validate multi-byte char */
+ if (_iseucjp (char1) && _iseucjp (char2))
+ {
+ *s++ = (char)char1;
+ *s = (char)char2;
+ retval = 2;
+ }
+ else
+ retval = -1;
+
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+ }
+#endif /* CYGFUN_LIBC_I18N_LOCALE_C_EUCJP */
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_JIS
+ else if (!strcmp (cur_locale, "C-JIS"))
+ {
+ int cnt = 0;
+ unsigned char char2 = (unsigned char)wchar;
+ unsigned char char1 = (unsigned char)(wchar >> 8);
+
+ if (s == NULL)
+ {
+ retval = 1; /* state-dependent */
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+
+ if (char1 != 0x00)
+ {
+ /* first byte is non-zero..validate multi-byte char */
+ if (_isjis (char1) && _isjis (char2))
+ {
+ if (*state == 0)
+ {
+ /* must switch from ASCII to JIS state */
+ *state = 1;
+ *s++ = ESC_CHAR;
+ *s++ = '$';
+ *s++ = 'B';
+ cnt = 3;
+ }
+ *s++ = (char)char1;
+ *s = (char)char2;
+ retval = cnt + 2;
+ }
+ else
+ retval = -1;
+ }
+ else
+ {
+ if (*state != 0)
+ {
+ /* must switch from JIS to ASCII state */
+ *state = 0;
+ *s++ = ESC_CHAR;
+ *s++ = '(';
+ *s++ = 'B';
+ cnt = 3;
+ }
+ *s = (char)char2;
+ retval = cnt + 1;
+ }
+
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+#endif /* CYGFUN_LIBC_I18N_LOCALE_C_JIS */
+
+ if (s == NULL)
+ retval = 0;
+ else
+ {
+ *s = (char) wchar;
+ retval = 1;
+ }
+
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+
+} // __wctomb_jp()
+
+// EOF wctomb_jp.cxx
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/tests/ctype.c b/cesar/ecos/packages/language/c/libc/i18n/current/tests/ctype.c
new file mode 100644
index 0000000000..7865962a8e
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/tests/ctype.c
@@ -0,0 +1,220 @@
+//=================================================================
+//
+// ctype.c
+//
+// General testcase for C library ctype functions
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Description: Contains general testcode for C library ctype functions
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <stdlib.h>
+#include <ctype.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+int
+main( int argc, char *argv[] )
+{
+ int c; // character we use as a parameter
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO( "Starting tests from testcase " __FILE__ " for C library "
+ "<ctype.h> functions" );
+
+ // Check isalnum
+ c = 't';
+ CYG_TEST_PASS_FAIL( isalnum(c), "isalnum('t')");
+ c = '2';
+ CYG_TEST_PASS_FAIL( isalnum(c), "isalnum('2')");
+ c = 2;
+ CYG_TEST_PASS_FAIL( !isalnum(c), "!isalnum(2)");
+ c = 127;
+ CYG_TEST_PASS_FAIL( !isalnum(c), "!isalnum(127)");
+
+ // Check isalpha
+ c = 'A';
+ CYG_TEST_PASS_FAIL( isalpha(c), "isalpha('A')");
+ c = 'a';
+ CYG_TEST_PASS_FAIL( isalpha(c), "isalpha('a')");
+ c = '2';
+ CYG_TEST_PASS_FAIL( !isalpha(c), "!isalpha('2')");
+ c = '\n';
+ CYG_TEST_PASS_FAIL( !isalpha(c), "!isalpha('newline')");
+
+ // Check iscntrl
+ c = 'a';
+ CYG_TEST_PASS_FAIL( !iscntrl(c), "!iscntrl('a')");
+ c = 7;
+ CYG_TEST_PASS_FAIL( iscntrl(c), "iscntrl('7')");
+ c = '\n';
+ CYG_TEST_PASS_FAIL( iscntrl(c), "iscntrl(newline)");
+ c = 0x7F;
+ CYG_TEST_PASS_FAIL( iscntrl(c), "iscntrl(0x7F)");
+
+ // Check isdigit
+ c = '2';
+ CYG_TEST_PASS_FAIL( isdigit(c), "isdigit('2')");
+ c = '0';
+ CYG_TEST_PASS_FAIL( isdigit(c), "isdigit('0')");
+ c = 't';
+ CYG_TEST_PASS_FAIL( !isdigit(c), "!isdigit('t')");
+
+ // Check isgraph
+ c = ')';
+ CYG_TEST_PASS_FAIL( isgraph(c), "isgraph(')')");
+ c = '~';
+ CYG_TEST_PASS_FAIL( isgraph(c), "isgraph('~')");
+ c = '9';
+ CYG_TEST_PASS_FAIL( isgraph(c), "isgraph('9')");
+ c = 9;
+ CYG_TEST_PASS_FAIL( !isgraph(c), "!isgraph(9)");
+ c = ' ';
+ CYG_TEST_PASS_FAIL( !isgraph(c), "!isgraph(' ')");
+ c = '\t';
+ CYG_TEST_PASS_FAIL( !isgraph(c), "!isgraph(tab)");
+ c = '\n';
+ CYG_TEST_PASS_FAIL( !isgraph(c), "!isgraph(newline)");
+ c = 0x7F;
+ CYG_TEST_PASS_FAIL( !isgraph(c), "!isgraph(DEL)");
+ c = 200;
+ CYG_TEST_PASS_FAIL( !isgraph(c), "!isgraph(200)");
+ c = '\0';
+ CYG_TEST_PASS_FAIL( !isgraph(c), "!isgraph(NUL)");
+
+ // Check islower
+ c = 'J';
+ CYG_TEST_PASS_FAIL( !islower(c), "islower('J')");
+ c = 'j';
+ CYG_TEST_PASS_FAIL( islower(c), "islower('j')");
+ c = '5';
+ CYG_TEST_PASS_FAIL( !islower(c), "!islower(5)");
+
+ // Check isprint
+ c = ' ';
+ CYG_TEST_PASS_FAIL( isprint(c), "isprint(' ')");
+ c = 'x';
+ CYG_TEST_PASS_FAIL( isprint(c), "isprint('x')");
+ c = '\b';
+ CYG_TEST_PASS_FAIL( !isprint(c), "!isprint(backspace)");
+
+ // Check ispunct
+ c = '.';
+ CYG_TEST_PASS_FAIL( ispunct(c), "ispunct('.')");
+ c = '#';
+ CYG_TEST_PASS_FAIL( ispunct(c), "ispunct('#')");
+ c = '@';
+ CYG_TEST_PASS_FAIL( ispunct(c), "ispunct('@')");
+ c = 'f';
+ CYG_TEST_PASS_FAIL( !ispunct(c), "!ispunct('f')");
+ c = '7';
+ CYG_TEST_PASS_FAIL( !ispunct(c), "!ispunct('7')");
+ c = '\n';
+ CYG_TEST_PASS_FAIL( !ispunct(c), "!ispunct('newline')");
+
+ // Check isspace
+ c = ' ';
+ CYG_TEST_PASS_FAIL( isspace(c), "isspace(' ')");
+ c = '\t';
+ CYG_TEST_PASS_FAIL( isspace(c), "isspace(tab)");
+ c = '\r';
+ CYG_TEST_PASS_FAIL( isspace(c), "isspace(return)");
+ c = '\v';
+ CYG_TEST_PASS_FAIL( isspace(c), "isspace(vertical tab)");
+ c = '\n';
+ CYG_TEST_PASS_FAIL( isspace(c), "isspace(newline)");
+ c = 'd';
+ CYG_TEST_PASS_FAIL( !isspace(c), "!isspace('d')");
+ c = ',';
+ CYG_TEST_PASS_FAIL( !isspace(c), "!isspace(',')");
+
+ // Check isupper
+ c = 'A';
+ CYG_TEST_PASS_FAIL( isupper(c), "isupper('A')");
+ c = 'a';
+ CYG_TEST_PASS_FAIL( !isupper(c), "!isupper('a')");
+ c = '2';
+ CYG_TEST_PASS_FAIL( !isupper(c), "!isupper('2')");
+ c = '\b';
+ CYG_TEST_PASS_FAIL( !isupper(c), "!isupper(backspace)");
+
+ // Check isxdigit
+ c = 'f';
+ CYG_TEST_PASS_FAIL( isxdigit(c), "isxdigit('f')");
+ c = 'D';
+ CYG_TEST_PASS_FAIL( isxdigit(c), "isxdigit('D')");
+ c = '1';
+ CYG_TEST_PASS_FAIL( isxdigit(c), "isxdigit('1')");
+ c = '0';
+ CYG_TEST_PASS_FAIL( isxdigit(c), "isxdigit('0')");
+ c = 'g';
+ CYG_TEST_PASS_FAIL( !isxdigit(c), "!isxdigit('g')");
+ c = 'x';
+ CYG_TEST_PASS_FAIL( !isxdigit(c), "!isxdigit('x')");
+
+ // Check tolower
+ c = 'F';
+ CYG_TEST_PASS_FAIL( tolower(c) == 'f', "tolower('F')");
+ c = 'g';
+ CYG_TEST_PASS_FAIL( tolower(c) == 'g', "tolower('g')");
+ c = '3';
+ CYG_TEST_PASS_FAIL( tolower(c) == '3', "tolower('3')");
+
+ // Check toupper
+ c = 'f';
+ CYG_TEST_PASS_FAIL( toupper(c) == 'F', "toupper('f')");
+ c = 'G';
+ CYG_TEST_PASS_FAIL( toupper(c) == 'G', "toupper('G')");
+ c = ',';
+ CYG_TEST_PASS_FAIL( toupper(c) == ',', "toupper(',')");
+
+ CYG_TEST_FINISH( "Finished tests from testcase " __FILE__ " for C library "
+ "<ctype.h> functions" );
+} // main()
+
+// EOF ctype.c
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/tests/i18nmb.c b/cesar/ecos/packages/language/c/libc/i18n/current/tests/i18nmb.c
new file mode 100644
index 0000000000..76a13d184c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/tests/i18nmb.c
@@ -0,0 +1,673 @@
+//=================================================================
+//
+// i18nmb.c
+//
+// General testcase for C library multibyte functions
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jjohnstn
+// Contributors:
+// Date: 2000-11-24
+// Description: Contains general testcode for C library multibyte character functions
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <pkgconf/libc_i18n.h> // Configuration header
+#include <stdlib.h>
+#include <locale.h>
+#include <stdio.h>
+#include <cyg/infra/testcase.h>
+#include <string.h>
+
+// FUNCTIONS
+
+int
+main( int argc, char *argv[] )
+{
+
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_JIS
+ unsigned char in_jis[] =
+ "abcd\x1b$B\x23\x25\x45\x46\x1b(B23";
+ unsigned char fmt_jis[] =
+ "abcd\x1b$B\x23\x25\x45\x46\x1b(B%d";
+
+ unsigned char * testjis[] = {
+ "abcd\x1b$B\x23\x25\x45\x46\x1b(B",
+ "abcd\x1b$B\x23\x25\x1b(Befg",
+ "\x1b$B\x23\x7f\x1b(B",
+ "\x1b$B\x44\x45\x46\x1b(B",
+ "\x1b$B",
+ "\x1b$B\x1b(B",
+ "\x1b$B\x44\x45",
+ };
+
+ int mblenjis0[] = { 1, 1, 1, 1, 5, 5, 0};
+ int mblenjis1[] = { 1, 1, 1, 1, 8, 1, 1, 1, 0 };
+ int mblenjis2[] = { -1 };
+ int mblenjis3[] = { 5, -1 };
+ int mblenjis4[] = { -1 };
+ int mblenjis5[] = { -1 };
+ int mblenjis6[] = { -1 };
+
+ int *mblenjis[] = {
+ mblenjis0,
+ mblenjis1,
+ mblenjis2,
+ mblenjis3,
+ mblenjis4,
+ mblenjis5,
+ mblenjis6,
+ };
+
+ wchar_t mbtowcjis0[] = {
+ (wchar_t)'a',
+ (wchar_t)'b',
+ (wchar_t)'c',
+ (wchar_t)'d',
+ (wchar_t)0x2325,
+ (wchar_t)0x4546,
+ (wchar_t)0
+ };
+#endif /* CYGFUN_LIBC_I18N_LOCALE_C_JIS */
+
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_SJIS
+ unsigned char in_sjis[] =
+ "ab\x81\x40\x9f\x7e\xe0\x80\xef\xfcgh23";
+ unsigned char fmt_sjis[] =
+ "ab\x81\x40\x9f\x7e\xe0\x80\xef\xfcgh%d";
+
+ unsigned char * testsjis[] = {
+ "ab\x81\x40\x9f\x7e\xe0\x80\xef\xfcgh",
+ "\x80\x40",
+ "\xa0\x40",
+ "\xdf\x40",
+ "\xf0\x40",
+ "\x84\x3f",
+ "\x85\x7f",
+ "\x86\xfd",
+ "\x81",
+ };
+
+ int mblensjis0[] = { 1, 1, 2, 2, 2, 2, 1, 1, 0};
+ int mblensjis1[] = { 1, 1, 0 };
+ int mblensjis2[] = { 1, 1, 0 };
+ int mblensjis3[] = { 1, 1, 0 };
+ int mblensjis4[] = { 1, 1, 0 };
+ int mblensjis5[] = { -1 };
+ int mblensjis6[] = { -1 };
+ int mblensjis7[] = { -1 };
+ int mblensjis8[] = { -1 };
+
+ int *mblensjis[] = {
+ mblensjis0,
+ mblensjis1,
+ mblensjis2,
+ mblensjis3,
+ mblensjis4,
+ mblensjis5,
+ mblensjis6,
+ mblensjis7,
+ mblensjis8,
+ };
+
+ wchar_t mbtowcsjis0[] = {
+ (wchar_t)'a',
+ (wchar_t)'b',
+ (wchar_t)0x8140,
+ (wchar_t)0x9f7e,
+ (wchar_t)0xe080,
+ (wchar_t)0xeffc,
+ (wchar_t)'g',
+ (wchar_t)'h',
+ (wchar_t)0
+ };
+#endif /* CYGFUN_LIBC_I18N_LOCALE_C_SJIS */
+
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_EUCJP
+ unsigned char in_eucjp[] =
+ "ab\xa1\xa1\xa2\xfe\xe0\xfd\xef\xfcgh23";
+ unsigned char fmt_eucjp[] =
+ "ab\xa1\xa1\xa2\xfe\xe0\xfd\xef\xfcgh%d";
+
+ unsigned char * testeucjp[] = {
+ "ab\xa1\xa1\xa2\xfe\xe0\xfd\xef\xfcgh",
+ "\x80\xa1",
+ "\xa0\xa1",
+ "\xff\xa1",
+ "\x40\xa1",
+ "\xa3\x3f",
+ "\xa4\x7f",
+ "\xa5\xff",
+ "\xb1",
+ };
+
+ int mbleneucjp0[] = { 1, 1, 2, 2, 2, 2, 1, 1, 0};
+ int mbleneucjp1[] = { 1, -1 };
+ int mbleneucjp2[] = { 1, -1 };
+ int mbleneucjp3[] = { 1, -1 };
+ int mbleneucjp4[] = { 1, -1 };
+ int mbleneucjp5[] = { -1 };
+ int mbleneucjp6[] = { -1 };
+ int mbleneucjp7[] = { -1 };
+ int mbleneucjp8[] = { -1 };
+
+ int *mbleneucjp[] = {
+ mbleneucjp0,
+ mbleneucjp1,
+ mbleneucjp2,
+ mbleneucjp3,
+ mbleneucjp4,
+ mbleneucjp5,
+ mbleneucjp6,
+ mbleneucjp7,
+ mbleneucjp8,
+ };
+
+ wchar_t mbtowceucjp0[] = {
+ (wchar_t)'a',
+ (wchar_t)'b',
+ (wchar_t)0xa1a1,
+ (wchar_t)0xa2fe,
+ (wchar_t)0xe0fd,
+ (wchar_t)0xeffc,
+ (wchar_t)'g',
+ (wchar_t)'h',
+ (wchar_t)0
+ };
+#endif /* CYGFUN_LIBC_I18N_LOCALE_C_EUCJP */
+
+ wchar_t wcbuff[100];
+ char buff[100];
+
+ char *ptr, *locale;
+ int result, i, j, k;
+ wchar_t *wcptr;
+
+ k=0; locale=NULL; // silence warnings
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO( "Starting tests from testcase " __FILE__ " for C library "
+ "<stdlib.h> multi-byte character functions" );
+
+ setlocale (LC_ALL, "C");
+
+ CYG_TEST_PASS_FAIL( MB_CUR_MAX == 1, "MB_CUR_MAX");
+
+ CYG_TEST_PASS_FAIL( mblen(NULL, 0) == 0, "mblen(NULL, 0)");
+
+ CYG_TEST_PASS_FAIL( mbtowc(NULL, NULL, 0) == 0, "mbtowc(NULL, NULL, 0)");
+
+ CYG_TEST_PASS_FAIL( wctomb(NULL, 0) == 0, "wctomb(NULL, 0)");
+
+ ptr = "abcdefghijklmnop";
+ result = 1;
+ j = 0;
+ while (result > 0)
+ {
+ result = mblen (ptr, MB_CUR_MAX);
+ ptr += result;
+ ++j;
+ }
+
+ CYG_TEST_PASS_FAIL( result == 0, "mblen (ptr, MB_CUR_MAX)");
+ CYG_TEST_PASS_FAIL( j == strlen("abcdefghijklmnop") + 1, "j");
+
+ ptr = "1234567890";
+ wcptr = wcbuff;
+ memset(wcbuff, 'K', 40);
+ result = 1;
+ while (result > 0)
+ {
+ result = mbtowc (wcptr, ptr, MB_CUR_MAX);
+ CYG_TEST_PASS_FAIL( *wcptr == (wchar_t)*ptr, "*wcptr");
+ ptr += result;
+ wcptr++;
+ ++j;
+ }
+
+ CYG_TEST_PASS_FAIL( wcptr - wcbuff == 11, "wcptr - wcbuff");
+ CYG_TEST_PASS_FAIL( wcbuff[10] == 0, "wcbuff[10]");
+
+ memset (buff, 'K', 40);
+ ptr = buff;
+ wcptr = wcbuff;
+ result = 1;
+
+ for (i = 0; i < 11; ++i)
+ {
+ result = wctomb (ptr, *wcptr);
+ ptr += result;
+ wcptr++;
+ }
+
+ CYG_TEST_PASS_FAIL( strcmp("1234567890", buff) == 0, "strcmp(\"1234567890\", buff");
+
+ memset (wcbuff, 'K', 40);
+ result = mbstowcs (wcbuff, "abcdef", 7);
+ CYG_TEST_PASS_FAIL( result == 6, "mbstowcs (wcbuff, \"abcdef\", 7)");
+ CYG_TEST_PASS_FAIL(*((char *)(&wcbuff[7])) == 'K', "*((char *)(&wcbuff[7]))");
+ CYG_TEST_PASS_FAIL( wcbuff[6] == 0, "wcbuff[6]");
+
+ memset(buff, 'K', 20);
+ result = wcstombs (buff, wcbuff, 20);
+ CYG_TEST_PASS_FAIL( result == 6, "wcstombs (buff, wcbuff, 20)");
+ CYG_TEST_PASS_FAIL( strcmp(buff, "abcdef") == 0, "strcmp(buff, \"abcdef\")");
+
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_JIS
+
+ CYG_TEST_INFO( "Testing C-JIS locale" );
+
+ locale = setlocale (LC_CTYPE, "C-JIS");
+ CYG_TEST_PASS_FAIL( locale != NULL, "setlocale (LC_CTYPE, \"C-JIS\")");
+
+ CYG_TEST_PASS_FAIL( strcmp(locale, "C-JIS") == 0, "strcmp(locale, \"C-JIS\")");
+
+ locale = setlocale (LC_CTYPE, NULL);
+ CYG_TEST_PASS_FAIL( strcmp(locale, "C-JIS") == 0, "setlocale(LC_CTYPE, NULL)");
+
+ CYG_TEST_PASS_FAIL( MB_CUR_MAX == 8, "MB_CUR_MAX");
+
+ CYG_TEST_PASS_FAIL( mblen(NULL, 0) != 0, "mblen(NULL, 0)");
+
+ CYG_TEST_PASS_FAIL( mbtowc(NULL, NULL, 0) != 0, "mbtowc(NULL, NULL, 0)");
+
+ CYG_TEST_PASS_FAIL( wctomb(NULL, 0) != 0, "wctomb(NULL, 0)");
+
+ for (i = 0; i < sizeof(testjis) / sizeof(char *); ++i)
+ {
+ ptr = testjis[i];
+ result = 1;
+ j = 0;
+ while (result > 0)
+ {
+ result = mblen (ptr, MB_CUR_MAX);
+ CYG_TEST_PASS_FAIL( result == mblenjis[i][j], "mblen (ptr, MB_CUR_MAX)");
+ ptr += result;
+ ++j;
+ }
+ }
+
+ ptr = testjis[0];
+ wcptr = wcbuff;
+ memset(wcbuff, 'K', 40);
+ result = 1;
+ j = 0;
+ while (result > 0)
+ {
+ result = mbtowc (wcptr, ptr, MB_CUR_MAX);
+ CYG_TEST_PASS_FAIL( result == mblenjis0[j], "mbtowc (wcptr, ptr, MB_CUR_MAX)");
+ CYG_TEST_PASS_FAIL( *wcptr == mbtowcjis0[j], "*wcptr");
+ ptr += result;
+ wcptr++;
+ ++j;
+ }
+
+ CYG_TEST_PASS_FAIL( wcptr - wcbuff == 7, "wcptr - wcbuff");
+ CYG_TEST_PASS_FAIL( wcbuff[6] == 0, "wcbuff[6]");
+
+ memset (buff, 'K', 40);
+ ptr = buff;
+ wcptr = wcbuff;
+ result = 1;
+
+ for (i = 0; i < 7; ++i)
+ {
+ result = wctomb (ptr, *wcptr);
+ ptr += result;
+ wcptr++;
+ }
+
+ CYG_TEST_PASS_FAIL( strcmp(testjis[0], buff) == 0, "strcmp(testjis[0], buff");
+
+ result = wctomb (buff, (wchar_t)0x1111);
+ CYG_TEST_PASS_FAIL( result == -1, "wctomb(buff, (wchar_t)0x1111)");
+
+ result = mbstowcs (wcbuff, testjis[3], 8);
+ CYG_TEST_PASS_FAIL( result == -1, "mbstowcs(wcbuff, testjis[3], 8)");
+
+ memset (wcbuff, 'K', 40);
+ result = mbstowcs (wcbuff, testjis[0], 8);
+ CYG_TEST_PASS_FAIL( result == 6, "mbstowcs(wcbuff, testjis[0], 8)");
+ CYG_TEST_PASS_FAIL( *((char *)(&wcbuff[7])) == 'K', "*((char *)(&wcbuff[7]))");
+ CYG_TEST_PASS_FAIL( wcbuff[6] == 0, "wcbuff[6]");
+
+ memset (wcbuff, 'K', 40);
+ result = mbstowcs (wcbuff, testjis[0], 6);
+ CYG_TEST_PASS_FAIL( result == 6, "mbstowcs (wcbuff, testjis[0], 6)");
+ CYG_TEST_PASS_FAIL( *((char *)(&wcbuff[6])) == 'K', "*((char *)(&wcbuff[6]))");
+
+ memset (wcbuff, 'K', 40);
+ result = mbstowcs (wcbuff, testjis[0], 7);
+ CYG_TEST_PASS_FAIL( result == 6, "mbstowcs (wcbuff, testjis[0], 7)");
+ CYG_TEST_PASS_FAIL(*((char *)(&wcbuff[7])) == 'K', "*((char *)(&wcbuff[7]))");
+ CYG_TEST_PASS_FAIL( wcbuff[6] == 0, "wcbuff[6]");
+
+ memset(buff, 'K', 20);
+ result = wcstombs (buff, wcbuff, 20);
+ CYG_TEST_PASS_FAIL( result == 14, "wcstombs (buff, wcbuff, 20)");
+ CYG_TEST_PASS_FAIL( strcmp(buff, testjis[0]) == 0, "strcmp(buff, testjis[0])");
+
+ memset (buff, 'K', 20);
+ result = wcstombs (buff, wcbuff, 14);
+ CYG_TEST_PASS_FAIL( result == 14, "wcstombs (buff, wcbuff, 14)");
+ CYG_TEST_PASS_FAIL( memcmp (buff, testjis[0], 14) == 0, "memcmp (buff, testjis[0], 14)");
+ CYG_TEST_PASS_FAIL( buff[14] == 'K', "buff[14]");
+
+ memset (buff, 'K', 20);
+ result = wcstombs (buff, wcbuff, 15);
+ CYG_TEST_PASS_FAIL( result == 14, "wcstombs (buff, wcbuff, 15)");
+ CYG_TEST_PASS_FAIL( memcmp (buff, testjis[0], 14) == 0, "memcmp (buff, testjis[0], 14)");
+ CYG_TEST_PASS_FAIL( buff[14] == '\0', "buff[14]");
+
+ result = wcstombs (buff, (wchar_t *)"\x23\x10", 2);
+ CYG_TEST_PASS_FAIL( result == -1, "wcstombs (buff, (wchar_t *)\"\x23\x10\", 2)");
+
+ result = sscanf (in_jis, fmt_jis, &k);
+ CYG_TEST_PASS_FAIL( result == 1, "sscanf (in_jis, fmt_jis, &k)");
+ CYG_TEST_PASS_FAIL( k == 23, "k");
+
+ sprintf (buff, fmt_jis, 23);
+ CYG_TEST_PASS_FAIL( strcmp(buff, in_jis) == 0, "sprintf(buff, fmt_jis, 23)");
+
+ locale = setlocale(LC_ALL, "C");
+ locale = setlocale(LC_CTYPE, NULL);
+
+ CYG_TEST_PASS_FAIL( strcmp(locale, "C") == 0, "previous locale");
+ CYG_TEST_PASS_FAIL( MB_CUR_MAX == 1, "MB_CUR_MAX");
+
+#endif /* CYGFUN_LIBC_I18N_LOCALE_C_JIS */
+
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_SJIS
+
+ CYG_TEST_INFO( "Testing C-SJIS locale" );
+
+ locale = setlocale (LC_CTYPE, "C-SJIS");
+ CYG_TEST_PASS_FAIL( locale != NULL, "setlocale (LC_CTYPE, \"C-SJIS\")");
+
+ CYG_TEST_PASS_FAIL( strcmp(locale, "C-SJIS") == 0, "setlocale(LC_CTYPE, \"C-SJIS\")");
+
+ locale = setlocale (LC_CTYPE, NULL);
+ CYG_TEST_PASS_FAIL( strcmp(locale, "C-SJIS") == 0, "setlocale(LC_CTYPE, NULL)");
+
+ CYG_TEST_PASS_FAIL( MB_CUR_MAX == 2, "MB_CUR_MAX");
+
+ CYG_TEST_PASS_FAIL( mblen(NULL, 0) == 0, "mblen(NULL, 0)");
+
+ CYG_TEST_PASS_FAIL( mbtowc(NULL, NULL, 0) == 0, "mbtowc(NULL, NULL, 0)");
+
+ CYG_TEST_PASS_FAIL( wctomb(NULL, 0) == 0, "wctomb(NULL, 0)");
+
+ for (i = 0; i < sizeof(testsjis) / sizeof(char *); ++i)
+ {
+ ptr = testsjis[i];
+ result = 1;
+ j = 0;
+ while (result > 0)
+ {
+ result = mblen (ptr, MB_CUR_MAX);
+ CYG_TEST_PASS_FAIL( result == mblensjis[i][j], "mblen (ptr, MB_CUR_MAX)");
+ ptr += result;
+ ++j;
+ }
+ }
+
+ ptr = testsjis[0];
+ wcptr = wcbuff;
+ memset(wcbuff, 'K', 40);
+ result = 1;
+ j = 0;
+ while (result > 0)
+ {
+ result = mbtowc (wcptr, ptr, MB_CUR_MAX);
+ CYG_TEST_PASS_FAIL( result == mblensjis0[j], "mbtowc (wcptr, ptr, MB_CUR_MAX)");
+ CYG_TEST_PASS_FAIL( *wcptr == mbtowcsjis0[j], "*wcptr");
+ ptr += result;
+ wcptr++;
+ ++j;
+ }
+
+ CYG_TEST_PASS_FAIL( wcptr - wcbuff == 9, "wcptr - wcbuff");
+ CYG_TEST_PASS_FAIL( wcbuff[8] == 0, "wcbuff[8]");
+
+ memset (buff, 'K', 40);
+ ptr = buff;
+ wcptr = wcbuff;
+ result = 1;
+
+ for (i = 0; i < 9; ++i)
+ {
+ result = wctomb (ptr, *wcptr);
+ ptr += result;
+ wcptr++;
+ }
+
+ CYG_TEST_PASS_FAIL( strcmp(testsjis[0], buff) == 0, "strcmp(testsjis[0], buff");
+
+ result = wctomb (buff, (wchar_t)0x1111);
+ CYG_TEST_PASS_FAIL( result == -1, "wctomb(buff, (wchar_t)0x1111)");
+
+ result = mbstowcs (wcbuff, testsjis[5], 8);
+ CYG_TEST_PASS_FAIL( result == -1, "mbstowcs(wcbuff, testjis[3], 8)");
+
+ memset (wcbuff, 'K', 40);
+ result = mbstowcs (wcbuff, testsjis[0], 20);
+ CYG_TEST_PASS_FAIL( result == 8, "mbstowcs(wcbuff, testsjis[0], 20)");
+ CYG_TEST_PASS_FAIL( *((char *)(&wcbuff[9])) == 'K', "*((char *)(&wcbuff[9]))");
+ CYG_TEST_PASS_FAIL( wcbuff[8] == 0, "wcbuff[8]");
+
+ memset (wcbuff, 'K', 40);
+ result = mbstowcs (wcbuff, testsjis[0], 8);
+ CYG_TEST_PASS_FAIL( result == 8, "mbstowcs (wcbuff, testsjis[0], 8)");
+ CYG_TEST_PASS_FAIL( *((char *)(&wcbuff[8])) == 'K', "*((char *)(&wcbuff[8]))");
+
+ memset (wcbuff, 'K', 40);
+ result = mbstowcs (wcbuff, testsjis[0], 9);
+ CYG_TEST_PASS_FAIL( result == 8, "mbstowcs (wcbuff, testsjis[0], 9)");
+ CYG_TEST_PASS_FAIL(*((char *)(&wcbuff[9])) == 'K', "*((char *)(&wcbuff[9]))");
+ CYG_TEST_PASS_FAIL( wcbuff[8] == 0, "wcbuff[8]");
+
+ memset(buff, 'K', 20);
+ result = wcstombs (buff, wcbuff, 20);
+ CYG_TEST_PASS_FAIL( result == 12, "wcstombs (buff, wcbuff, 20)");
+ CYG_TEST_PASS_FAIL( strcmp(buff, testsjis[0]) == 0, "strcmp(buff, testjis[0])");
+
+ memset (buff, 'K', 20);
+ result = wcstombs (buff, wcbuff, 12);
+ CYG_TEST_PASS_FAIL( result == 12, "wcstombs (buff, wcbuff, 12)");
+ CYG_TEST_PASS_FAIL( memcmp (buff, testsjis[0], 12) == 0, "memcmp (buff, testsjis[0], 12)");
+ CYG_TEST_PASS_FAIL( buff[12] == 'K', "buff[12]");
+
+ memset (buff, 'K', 20);
+ result = wcstombs (buff, wcbuff, 13);
+ CYG_TEST_PASS_FAIL( result == 12, "wcstombs (buff, wcbuff, 12)");
+ CYG_TEST_PASS_FAIL( memcmp (buff, testsjis[0], 13) == 0, "memcmp (buff, testsjis[0], 13)");
+ CYG_TEST_PASS_FAIL( buff[12] == '\0', "buff[12]");
+
+ result = wcstombs (buff, (wchar_t *)"\x23\x10", 2);
+ CYG_TEST_PASS_FAIL( result == -1, "wcstombs (buff, (wchar_t *)\"\x23\x10\", 2)");
+
+ result = sscanf (in_sjis, fmt_sjis, &k);
+ CYG_TEST_PASS_FAIL( result == 1, "sscanf (in_sjis, fmt_sjis, &k)");
+ CYG_TEST_PASS_FAIL( k == 23, "k");
+
+ sprintf (buff, fmt_sjis, 23);
+ CYG_TEST_PASS_FAIL( strcmp(buff, in_sjis) == 0, "sprintf(buff, fmt_sjis, 23)");
+
+ locale = setlocale(LC_ALL, "C");
+ locale = setlocale(LC_CTYPE, NULL);
+
+ CYG_TEST_PASS_FAIL( strcmp(locale, "C") == 0, "previous locale");
+ CYG_TEST_PASS_FAIL( MB_CUR_MAX == 1, "MB_CUR_MAX");
+
+#endif /* CYGFUN_LIBC_I18N_LOCALE_C_SJIS */
+
+#ifdef CYGFUN_LIBC_I18N_LOCALE_C_EUCJP
+
+ CYG_TEST_INFO( "Testing C-EUCJP locale" );
+
+ locale = setlocale (LC_CTYPE, "C-EUCJP");
+ CYG_TEST_PASS_FAIL( locale != NULL, "setlocale (LC_CTYPE, \"C-EUCJP\")");
+
+ CYG_TEST_PASS_FAIL( strcmp(locale, "C-EUCJP") == 0, "setlocale(LC_CTYPE, \"C-EUCJP\")");
+
+ locale = setlocale (LC_CTYPE, NULL);
+ CYG_TEST_PASS_FAIL( strcmp(locale, "C-EUCJP") == 0, "current locale");
+
+ CYG_TEST_PASS_FAIL( MB_CUR_MAX == 2, "MB_CUR_MAX");
+
+ CYG_TEST_PASS_FAIL( mblen(NULL, 0) == 0, "mblen(NULL, 0)");
+
+ CYG_TEST_PASS_FAIL( mbtowc(NULL, NULL, 0) == 0, "mbtowc(NULL, NULL, 0)");
+
+ CYG_TEST_PASS_FAIL( wctomb(NULL, 0) == 0, "wctomb(NULL, 0)");
+
+ for (i = 0; i < sizeof(testeucjp) / sizeof(char *); ++i)
+ {
+ ptr = testeucjp[i];
+ result = 1;
+ j = 0;
+ while (result > 0)
+ {
+ result = mblen (ptr, MB_CUR_MAX);
+ CYG_TEST_PASS_FAIL( result == mbleneucjp[i][j], "mblen (ptr, MB_CUR_MAX)");
+ ptr += result;
+ ++j;
+ }
+ }
+
+ ptr = testeucjp[0];
+ wcptr = wcbuff;
+ memset(wcbuff, 'K', 40);
+ result = 1;
+ j = 0;
+ while (result > 0)
+ {
+ result = mbtowc (wcptr, ptr, MB_CUR_MAX);
+ CYG_TEST_PASS_FAIL( result == mbleneucjp0[j], "mbtowc (wcptr, ptr, MB_CUR_MAX)");
+ CYG_TEST_PASS_FAIL( *wcptr == mbtowceucjp0[j], "*wcptr");
+ ptr += result;
+ wcptr++;
+ ++j;
+ }
+
+ CYG_TEST_PASS_FAIL( wcptr - wcbuff == 9, "wcptr - wcbuff");
+ CYG_TEST_PASS_FAIL( wcbuff[8] == 0, "wcbuff[8]");
+
+ memset (buff, 'K', 40);
+ ptr = buff;
+ wcptr = wcbuff;
+ result = 1;
+
+ for (i = 0; i < 9; ++i)
+ {
+ result = wctomb (ptr, *wcptr);
+ ptr += result;
+ wcptr++;
+ }
+
+ CYG_TEST_PASS_FAIL( strcmp(testeucjp[0], buff) == 0, "strcmp(testeucjp[0], buff");
+
+ result = wctomb (buff, (wchar_t)0x1111);
+ CYG_TEST_PASS_FAIL( result == -1, "wctomb(buff, (wchar_t)0x1111)");
+
+ result = mbstowcs (wcbuff, testeucjp[5], 8);
+ CYG_TEST_PASS_FAIL( result == -1, "mbstowcs(wcbuff, testjis[3], 8)");
+
+ memset (wcbuff, 'K', 40);
+ result = mbstowcs (wcbuff, testeucjp[0], 20);
+ CYG_TEST_PASS_FAIL( result == 8, "mbstowcs(wcbuff, testeucjp[0], 20)");
+ CYG_TEST_PASS_FAIL( *((char *)(&wcbuff[9])) == 'K', "*((char *)(&wcbuff[9]))");
+ CYG_TEST_PASS_FAIL( wcbuff[8] == 0, "wcbuff[8]");
+
+ memset (wcbuff, 'K', 40);
+ result = mbstowcs (wcbuff, testeucjp[0], 8);
+ CYG_TEST_PASS_FAIL( result == 8, "mbstowcs (wcbuff, testeucjp[0], 8)");
+ CYG_TEST_PASS_FAIL( *((char *)(&wcbuff[8])) == 'K', "*((char *)(&wcbuff[8]))");
+
+ memset (wcbuff, 'K', 40);
+ result = mbstowcs (wcbuff, testeucjp[0], 9);
+ CYG_TEST_PASS_FAIL( result == 8, "mbstowcs (wcbuff, testeucjp[0], 9)");
+ CYG_TEST_PASS_FAIL(*((char *)(&wcbuff[9])) == 'K', "*((char *)(&wcbuff[9]))");
+ CYG_TEST_PASS_FAIL( wcbuff[8] == 0, "wcbuff[8]");
+
+ memset(buff, 'K', 20);
+ result = wcstombs (buff, wcbuff, 20);
+ CYG_TEST_PASS_FAIL( result == 12, "wcstombs (buff, wcbuff, 20)");
+ CYG_TEST_PASS_FAIL( strcmp(buff, testeucjp[0]) == 0, "strcmp(buff, testjis[0])");
+
+ memset (buff, 'K', 20);
+ result = wcstombs (buff, wcbuff, 12);
+ CYG_TEST_PASS_FAIL( result == 12, "wcstombs (buff, wcbuff, 12)");
+ CYG_TEST_PASS_FAIL( memcmp (buff, testeucjp[0], 12) == 0, "memcmp (buff, testeucjp[0], 12)");
+ CYG_TEST_PASS_FAIL( buff[12] == 'K', "buff[12]");
+
+ memset (buff, 'K', 20);
+ result = wcstombs (buff, wcbuff, 13);
+ CYG_TEST_PASS_FAIL( result == 12, "wcstombs (buff, wcbuff, 12)");
+ CYG_TEST_PASS_FAIL( memcmp (buff, testeucjp[0], 13) == 0, "memcmp (buff, testeucjp[0], 13)");
+ CYG_TEST_PASS_FAIL( buff[12] == '\0', "buff[12]");
+
+ result = wcstombs (buff, (wchar_t *)"\x23\x10", 2);
+ CYG_TEST_PASS_FAIL( result == -1, "wcstombs (buff, (wchar_t *)\"\x23\x10\", 2)");
+
+ result = sscanf (in_eucjp, fmt_eucjp, &k);
+ CYG_TEST_PASS_FAIL( result == 1, "sscanf (in_eucjp, fmt_eucjp, &k)");
+ CYG_TEST_PASS_FAIL( k == 23, "k");
+
+ sprintf (buff, fmt_eucjp, 23);
+ CYG_TEST_PASS_FAIL( strcmp(buff, in_eucjp) == 0, "sprintf(buff, fmt_eucjp, 23)");
+
+ locale = setlocale(LC_ALL, "C");
+ locale = setlocale(LC_CTYPE, NULL);
+
+ CYG_TEST_PASS_FAIL( strcmp(locale, "C") == 0, "previous locale");
+ CYG_TEST_PASS_FAIL( MB_CUR_MAX == 1, "MB_CUR_MAX");
+
+#endif /* CYGFUN_LIBC_I18N_LOCALE_C_EUCJP */
+
+
+ CYG_TEST_FINISH( "Finished tests from testcase " __FILE__ " for C library "
+ "<stdlib.h> multibyte character functions" );
+
+ return 0;
+
+}
diff --git a/cesar/ecos/packages/language/c/libc/i18n/current/tests/setlocale.c b/cesar/ecos/packages/language/c/libc/i18n/current/tests/setlocale.c
new file mode 100644
index 0000000000..ed451d44a2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/i18n/current/tests/setlocale.c
@@ -0,0 +1,127 @@
+//=================================================================
+//
+// setlocale.c
+//
+// Testcase for C library setlocale() function
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-18
+// Description: Contains testcode for C library setlocale() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <locale.h> // header for functions to test
+#include <cyg/infra/testcase.h> // Testcase API
+
+
+// FUNCTIONS
+
+static int
+my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+int
+main( int argc, char *argv[] )
+{
+ char *str;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C "
+ "library setlocale() function");
+
+ // Check 1
+ str = setlocale(LC_CTYPE, NULL);
+ CYG_TEST_PASS_FAIL( !my_strcmp(str, "C" ),
+ "Initial locale for LC_CTYPE is \"C\"" );
+
+ // Check 2
+ str = setlocale(LC_ALL, NULL);
+ CYG_TEST_PASS_FAIL( !my_strcmp(str, "#C#C#C#C#C#" ),
+ "Initial locale for LC_ALL is correct" );
+
+ // Check 3
+ str = setlocale(LC_COLLATE, "C");
+ CYG_TEST_PASS_FAIL( !my_strcmp(str, "C" ),
+ "Set locale for LC_COLLATE to \"C\"" );
+
+ // Check 4
+ str = setlocale(LC_MONETARY, "");
+ CYG_TEST_PASS_FAIL( !my_strcmp(str, "C" ),
+ "Set default locale for LC_MONETARY" );
+ str = setlocale(LC_MONETARY, NULL);
+ CYG_TEST_PASS_FAIL( !my_strcmp(str, "C" ),
+ "Stored default locale for LC_MONETARY" );
+
+ // Check 5
+ str = setlocale(LC_ALL, "C");
+ CYG_TEST_PASS_FAIL( !my_strcmp(str, "C" ),
+ "Set locale for LC_COLLATE to \"C\"" );
+
+ // Check 6
+ str = setlocale(LC_ALL, "");
+ CYG_TEST_PASS_FAIL( !my_strcmp(str, "C" ),
+ "Set locale for LC_COLLATE to default" );
+
+ // Check 7
+ str = setlocale(LC_ALL, NULL);
+ CYG_TEST_PASS_FAIL( !my_strcmp(str, "#C#C#C#C#C#" ),
+ "Get locale for LC_ALL" );
+ str = setlocale(LC_ALL, str);
+ CYG_TEST_PASS_FAIL( !my_strcmp(str, "#C#C#C#C#C#" ),
+ "Set locale for LC_ALL from retrieved locale" );
+
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C "
+ "library setlocale() function");
+} // main()
+
+// EOF setlocale.c
diff --git a/cesar/ecos/packages/language/c/libc/setjmp/current/ChangeLog b/cesar/ecos/packages/language/c/libc/setjmp/current/ChangeLog
new file mode 100644
index 0000000000..ac4567bbbc
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/setjmp/current/ChangeLog
@@ -0,0 +1,55 @@
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/setjmp.cdl: Fix doc link.
+
+2002-04-09 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/setjmp.h: Use NORET attributes from cyg_type.h.
+
+2000-05-16 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/longjmp.cxx: Was still including pkgconf/libc.h rather that
+ pkgconf/libc_setjmp.h.
+
+2000-05-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * New package
+ Separated original libc out into separate packages on functional
+ boundaries.
+ Header files are now managed by isoinfra package
+ Plenty of cleanups done, but no major functionality changes
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/setjmp/current/ChangeLog.libc b/cesar/ecos/packages/language/c/libc/setjmp/current/ChangeLog.libc
new file mode 100644
index 0000000000..88fb2f11f2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/setjmp/current/ChangeLog.libc
@@ -0,0 +1,2736 @@
+This ChangeLog file is now obsolete. This is the original ChangeLog from when
+libc was one large package, before being separated. It is included for
+historical reasons.
+
+2000-04-05 Jesper Skov <jskov@redhat.com>
+
+ * src/time/settime.cxx:
+ * src/time/time.cxx:
+ Wallclock moved to io/.
+
+2000-03-28 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/string.cdl,
+ cdl/stdlib.cdl,
+ cdl/stdio.cdl,
+ cdl/libc.cdl:
+
+ Adjust documentation URLs.
+
+2000-03-27 Jesper Skov <jskov@redhat.com>
+
+ * src/clibincl/stream.inl (check_this): Use cyb_bool instead of bool.
+
+2000-03-06 Jesper Skov <jskov@redhat.com>
+
+ * tests/time/strftime.c (test): Adjust test to match below change.
+
+2000-03-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/time/strftime.cxx (do_format): Make sure %m counts from
+ 1..12 rather than 0..11. Fix for case 103300
+
+2000-02-29 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: Correctly use 'n' parameter to
+ restrict length. Credit due to Andrew Lunn here as well.
+ Resolves 103057-CR-1
+
+ * tests/stdio/sprintf2.c (test):
+ Add snprintf tests to verify the correct behaviour of restricting
+ output length
+
+2000-02-10 Jesper Skov <jskov@redhat.com>
+
+ * tests/signal/signal2.c (main):
+ Also reclaim DATA_TLB_MISS vector if available.
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+
+1999-11-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * cdl/string.cdl:
+ Switch to a single boolean configuration option for code size vs.
+ speed optimization.
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl: Define tests.
+
+1999-10-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: We can now remove Berkeley
+ advertising clause
+ * src/stdlib/div.cxx: ditto
+ * src/stdlib/ldiv.cxx: ditto
+ * src/stdlib/strtol.cxx: ditto
+ * src/stdlib/strtoul.cxx: ditto
+ * src/string/strtok.cxx: ditto
+
+1999-10-19 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl:
+
+ Define CDL options for package-specific CFLAGS.
+
+1999-10-08 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_THREAD_PRIORITY): Change
+ default to 10 to keep test farm happy
+ * cdl/startup.cdl: Likewise
+
+1999-10-07 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Specify radio buttons using CDL interfaces.
+
+1999-10-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * cdl/stdio.cdl: Change default to /dev/ttydiag as per 1999-10-01
+ change below
+ * cdl/startup.cdl: Add new form CDL for the startup changes as
+ per 1999-10-05
+
+1999-10-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/libc.h: Add CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM to allow
+ the user to supply their own stack.
+ Rename CYGNUM_LIBC_MAIN_STACK_SIZE to
+ CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE and reparent under
+ CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM
+ Add CYGNUM_LIBC_MAIN_THREAD_PRIORITY to provide main() thread
+ priority
+
+ * src/support/mainthread.cxx: Add support for user-supplied stack
+ Allow user to specify thread priority
+
+ These changes fix CR 101069
+
+1999-10-01 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE): Change
+ default to /dev/ttydiag to get correct console-like behaviour
+ Also don't preclude use if haldiag package isn't included
+ (case 102065)
+
+1999-09-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (cause_fpe): Try both float and integer
+ division by zero.
+
+1999-09-10 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx (cyg_libc_get_malloc_pool): Added for
+ stress_threads test.
+
+1999-09-07 Jesper Skov <jskov@cygnus.co.uk>
+ PRs 20243, 20433
+ * tests/signal/signal2.c: Disabled test3 on ARM.
+
+1999-09-02 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/assert.h: Make the sense of NDEBUG correct; it is "set"
+ when NOT debugging. Fix for CR 101983-CR-1
+ See Stroustrup, "The C++ Programming Language."
+
+1999-08-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen): Set buffer size 0 when not
+ buffering
+ Fix for case 101868
+
+1999-08-17 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Implement radio buttons using "FIXME radio" hack in
+ description field for now.
+
+1999-08-12 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl:
+ Take advantage of MACRONAME_ENUMVAL macros output by CDL.
+
+1999-08-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf2.c (test): Don't rely on 2.345 being exactly
+ representable in binary as a difference of 1 ulp will make it round
+ the wrong way.
+
+1999-07-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fgetc.cxx:
+ Include outline versions of getc() (actually just a symbol alias for
+ fgetc() ) and getchar()
+ Some minor clean-ups
+ Add tracing/assertions
+
+ * src/stdio/input/fputc.cxx:
+ Likewise (except applied to putc() and putchar())
+
+ * src/stdio/common/stdioinlines.cxx (_puts):
+ Call fputc() not _fputc()
+
+ * src/clibincl/stdiosupp.hxx:
+ Remove now obsolete prototypes for _fgetc() and _fputc()
+
+ * include/stdio.h:
+ Don't bother with getc()/putc() macros any more, just call
+ them as functions
+ Include protos for getc(), putc(), getchar() and putchar() functions
+
+1999-06-21 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for SH EDK7708.
+
+1999-06-11 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h: Make FILEs array types so they won't be
+ given $gp relocations on MIPS targets
+
+1999-05-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/ctime.c: Fixed compiler warning.
+
+1999-05-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main):
+ Update CYGPKG_HAL_TX39 -> CYGPKG_HAL_MIPS_TX39 due to recent MIPS
+ HAL changes
+ Fix for PR 20116
+
+1999-04-30 Jesper Skov <jskov@lassi.cygnus.co.uk>
+ PR 19945/19946 workaround
+ * tests/signal/signal2.c: Disabled test 3 for PowerPC sim.
+
+1999-04-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl:
+ Ensure all calls to cyg_libc_time_year_is_leap() are with the full
+ year, and not the direct contents of a struct tm, which are (year-1900)
+
+1999-04-19 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19308, 19410, 19528
+ * tests/time/clock.c (test): Also disable data cache which may
+ affect timing when tracing/assertions are enabled.
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ Add prototype for new cyg_libc_stdio_flush_all_but() function
+
+ * src/clibincl/stream.hxx:
+ Don't include stdiosupp.hxx any more to prevent circular dependency,
+ therefore manually provide _setvbuf prototype
+ Make sure pkgconf/kernel.h is included before mutex.hxx
+
+ * src/clibincl/stream.inl (Cyg_StdioStream::set_error()):
+ Add missing unlock_me()
+
+ * src/stdio/common/fflush.cxx:
+ Separate most of code for fflush(NULL) into separate
+ cyg_libc_stdio_flush_all_but() function, which has the extra
+ capability of omitting one stream
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Add missing clibincl/stdiosupp.hxx include
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::read()):
+ When reading, ensure we flush all output streams
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::flush_output_unlocked):
+ Flush the device as well
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * src/clibincl/streambuf.inl:
+ * src/clibincl/streambuf.hxx:
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ * include/pkgconf/libc.h:
+ * include/stdio.inl (setbuf):
+ Fix dumb typo: BUFSIZE -> BUFSIZ
+ This fixes PR19837
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * include/stdio.inl (setbuf):
+ Use _IONBF when buf==NULL, and _IOLBF otherwise.
+ Fix for PR 19836
+
+1999-04-15 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Tidy display string capitalization.
+
+1999-04-12 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Clarify CDL description of CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE
+
+ * tests/signal/signal2.c: Try harder to generate an exception by
+ accessing a misaligned address
+ Don't handle SIGTRAP any more
+ Part of fix for PRs 19731/19607
+
+1999-04-07 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19667
+ * src/support/mainthread.cxx:
+ Changed to use the new Cyg_Thread constructor.
+
+1999-04-07 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Use new macro
+ HAL_VSR_SET_TO_ECOS_HANDLER if defined, to wrest control from
+ CygMon, for example, by reinstalling eCos' default VSRs for
+ exceptions that we are provoking.
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx: Include stdlib.h for exit()
+ Fix for PR 19720
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/clock.c (test): Disable instruction cache
+ Hopefully fixes PR 19308
+
+1999-03-29 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for PPC as it cannot
+ trap division by zero.
+
+1999-03-26 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/main.cxx (main): Invoke cyg_user_start() if no kernel
+ Only sensible thing to do in our default main in a non-kernel config
+
+1999-03-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/time.c:
+ Increase MAX_TIMEOUT since the sparclite gets very close to overrunning
+ it even when working.
+ Should return -1 iff CYGSEM_LIBC_TIME_TIME_WORKING isn't defined
+ Cosmetic changes
+
+1999-03-25 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/time/time.c (test): Take into account setting of
+ CYGSEM_LIBC_TIME_SETTIME_WORKING ie. does cyg_libc_time_settime()
+ work? If not, check that it returns an error.
+ This was exposed by the random combo in PR#19479.
+
+1999-03-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1 to
+ CYGIMP_...
+
+ Add another rand implementation CYGIMP_LIBC_RAND_SIMPLE1 which is
+ the default
+
+ Part of fix for PR 19562
+
+ * include/sys/cstartup.h:
+ Tidy and remove unnecessary dependencies
+
+ * src/stdlib/rand.cxx:
+ Rename algorithms from CYGSEM_... to CYGIMP_...
+ Add new "simple1" algorithm
+
+ * tests/ctype/ctype.c:
+ Tidy
+
+ * tests/stdlib/rand3.c:
+ Fix so that 0..RAND_MAX is split evenly over buckets, which it wasn't
+ before
+ Deal with case of RAND_MAX not being divisible by NUM_BUCKETS
+ exactly
+ Increase TEST_LENGTH to 200000 to provide more representative sample
+ Add CYG_TEST_INFO output to help ensure it doesn't time out
+ Tidy
+
+ * tests/stdlib/rand4.c:
+ Only fail if more than _two_ thirds (rather than one third) match.
+ This is because half would match for a perfectly random distribution
+ This is the rest of the fix for PR 19562
+ Cosmetic changes
+
+1999-03-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/mainthread.cxx (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ Use CYGNUM_HAL_STACK_SIZE_TYPICAL for the stack size instead of
+ CYGNUM_HAL_MINIMUM_STACK_SIZE.
+
+1999-03-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak: Add -Wno-format when building strftime otherwise
+ it generates warnings for things that we do want to test (null
+ string, and %y format)
+
+1999-03-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Put brackets back round negative number since sdf says the config
+ tool is fixed now (PR 19537)
+
+ Add new CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1
+ options for different rand() algorithms in a so far failed attempt
+ to fix PR 19562
+
+ * src/stdlib/rand.cxx:
+ Add new optional algorithm from Knuth vol.2
+
+ * tests/stdlib/rand4.c:
+ Some tidies
+ Don't run test when using simplest algorithm
+
+ * tests/signal/signal2.c (main):
+ Don't try to make an FPE on tx39 - its possible to detect but requires
+ too much HAL work to be sensible
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Use HAL_ENABLE_INTERRUPTS() rather than kernel to enable interrupts
+
+1999-03-18 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/PKGconf.mak (TESTS): added rand4 compilation.
+
+ * tests/stdlib/rand4.c: added this test for periodicity in the
+ least significant bit of rand().
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Remove CYGFUN_LIBC_TIME_POSIX dependency
+ on CYGPKG_LIBC_STDIO
+
+ * src/stdlib/itoa.cxx:
+ New file to convert integers to ascii
+
+ * include/stdlib.h:
+ Add proto for new cyg_libc_itoa() function
+
+ * include/time.inl:
+ Rework __asctime_r() to use memcpy() and cyg_libc_itoa() rather than
+ sprintf()
+
+ * src/PKGconf.mak:
+ Build stdlib/itoa.cxx
+
+ The above changes fix PR 19448
+
+1999-03-17 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h: Add #define of __time_t_defined to placate newlib
+ if it is used by accident. This is just a temporary workaround though.
+
+1999-03-16 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/PKGconf.mak: Add compile option to step around ARM compiler bug.
+
+1999-03-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Don't use parentheses for now
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Silence bogus compiler warning
+
+1999-03-16 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Enable SIGSEGV test for
+ i386/Linux.
+
+
+1999-03-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Only enable interrupts if they were disabled
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx:
+ Add FIX ME line as a reminder that the workaround there can go away
+ in future
+
+ * include/pkgconf/libc.h:
+ Add proper define for CYGSEM_LIBC_EXIT_CALLS_FFLUSH
+ Put brackets round negative CYGNUM_LIBC_TIME_DST_DEFAULT_STATE define
+ Fix run time typo
+
+ * include/time.inl (__localtime_r):
+ Include sys/timeutil.h before this to get
+ cyg_libc_time_normalize_structtm()
+
+1999-03-12 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx: Remove 'const' from char arrays since
+ this fails [silently] on ARM when -fwritable-strings (PR19440)
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Compiler warnings fix was
+ slightly broken.
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c (main):
+ Disabling SIGTRAP handling on i386/Linux is not a good idea.
+1999-03-11 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c:
+ Added compiler warnings fix.
+ Added N/A handling for i386/Linux.
+
+1999-03-10 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Force "haldiag" device to be present.
+ 'asctime' and friends need 'stdio' as well.
+
+ * include/time.inl: Fix syntax error on difftime() declaration.
+
+1999-03-08 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx: <cyg/infra/cyg_ass.h> needed for this file.
+
+ * src/stdio/common/vsscanf.cxx (str_read): Fix problem with string
+ pointer [created by merge with new I/O package].
+
+1999-03-05 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add legal values for CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET
+ and CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET.
+
+1999-03-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl (cyg_libc_time_year_is_leap):
+ Fix bug with modulo year 400
+ Fix typo in asctime_r macro
+ Fix gmtime_r, and mktime as a result of testing
+
+ * tests/time/asctime.c, tests/time/ctime.c, tests/time/gmtime.c,
+ tests/time/gmtime.c, tests/time/localtime.c, tests/time/mktime.c,
+ tests/time/strftime.c, tests/time/time.c:
+ New tests
+
+ * tests/PKGconf.mak:
+ Build above new tests
+
+ * include/pkgconf/libc.h:
+ Add reminder FIX ME about extra config option
+
+ * src/time/strftime.cxx:
+ Fix %w and %Y parameters as a result of testing
+
+ * src/time/timeutil.cxx:
+ Fix cyg_libc_time_normalize_structtm() as a result of testing
+ of mktime()
+
+ * tests/time/clock.c:
+ Reformat, remove obsolete bits and tidy
+
+ * include/time.h:
+ Add Cyg_libc_time_dst type and new functions
+ cyg_libc_time_setzoneoffsets(), cyg_libc_time_setdst(),
+ cyg_libc_time_getzoneoffsets(), cyg_libc_time_settime()
+
+ * include/time.inl:
+ Implement the above functions. This allows us to adjust for timezone
+ diffences and set the time.
+ Change localtime() to adjust for STD/DST
+ Change mktime() to adjust for STD/DST
+
+ * include/libc.h:
+ Add new config options CYGSEM_LIBC_TIME_SETTIME_WORKING
+ and component CYGPKG_LIBC_TIME_ZONES containing options
+ CYGNUM_LIBC_TIME_DST_DEFAULT_STATE,
+ CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET,
+ CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET
+
+ * src/strftime.cxx:
+ Adjust handling of %Z to _not_ deal with STD/DST
+
+ * src/time/settime.cxx:
+ New file to implement cyg_libc_time_settime()
+
+ * src/PKGconf.mak:
+ Build settime.cxx
+
+ * src/time/timeutil.cxx:
+ Supply outline versions of cyg_libc_time_setzoneoffsets(),
+ cyg_libc_time_setdst(), and cyg_libc_time_getzoneoffsets()
+ Add variables for STD/DST state
+ Some minor comment changes
+
+ * include/errno.h:
+ Use CYGBLD_ATTRIB_CONST instead of __attribute__((const)) directly
+
+ * include/signal.h:
+ Change format of function comment headers
+
+ * include/signal.inl:
+ Restrict errno.h inclusion to when its actually used
+ Fix a spelling typo
+
+ * include/stdlib.h:
+ Add CYGBLD_ATTRIB_CONST to abs, div, labs, ldiv
+
+ * include/stdlib.inl:
+ Reformat and tidy
+ Include new versions of div and ldiv which are more portable and
+ are cleanly rewritten so aren't covered by the BSD licence, which
+ is now removed
+
+ * src/stdlib/div.cxx, src/stdlib/ldiv.cxx:
+ Non-inline, non-BSD and portable versions of the new versions of div
+ and ldiv from stdlib.inl
+
+ * include/time.h:
+ Much reformatting, tidying and improving comments
+ Change CLOCKS_PER_SEC from 1000 to 1000000
+ Add new functions asctime_r, ctime_r, gmtime_r, localtime_r, clock,
+ difftime, mktime, time, asctime, ctime, gmtime, localtime, strftime
+ Include new time.inl file
+
+ * include/pkgconf/libc.h:
+ Add new options CYGSEM_LIBC_TIME_CLOCK_WORKING,
+ CYGSEM_LIBC_TIME_TIME_WORKING, CYGFUN_LIBC_TIME_POSIX,
+ CYGNUM_LIBC_TIME_CLOCK_TRACE_LEVEL, CYGIMP_LIBC_TIME_ASCTIME_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_INLINE, CYGIMP_LIBC_TIME_DIFFTIME_INLINE,
+ CYGIMP_LIBC_TIME_GMTIME_INLINE, CYGIMP_LIBC_TIME_LOCALTIME_INLINE,
+ CYGIMP_LIBC_TIME_MKTIME_INLINE, CYGIMP_LIBC_TIME_ASCTIME_R_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_R_INLINE, CYGIMP_LIBC_TIME_GMTIME_R_INLINE,
+ and CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE
+
+ * time/asctime.cxx, time/asctime_r.cxx, time/clock.cxx, time/ctime.cxx,
+ time/ctime_r.cxx, time/difftime.cxx, time/gmtime.cxx,
+ time/gmtime_r.cxx, time/localtime.cxx, time/localtime_r.cxx,
+ time/mktime.cxx, time/strftime.cxx, time/time.cxx, time/timeutil.cxx,
+ include/time.inl:
+ New files to implement the new time functions. Many of them simply
+ provide the outline definitions, but the real body of the function
+ comes from time.inl
+
+ * src/PKGconf.mak:
+ Build new .cxx files
+
+ * src/clibincl/stdlibsupp.hxx:
+ Remove _div and _ldiv prototypes since they're no longer needed
+
+ * src/clibincl/timesupp.hxx:
+ Delete as its now obsolete
+
+ * src/time/clock.cxx:
+ Use new CYGSEM_LIBC_TIME_CLOCK_WORKING option to control whether it
+ just returns (clock_t)-1 or not.
+ Much reformatting and tidying
+ Change real imlpementation from _clock to __clock
+ Use CYGBLD_ATTRIB_WEAK_ALIAS now
+
+ * tests/stdlib/div.c, tests/stdlib/ldiv.c:
+ Add some extra tests for handling of negative numbers
+ Reformat and tidy a bit, including removing the test for CYGPKG_LIBC
+ since its now always defined if the test is to be compiled
+
+ * tests/time/clock.c:
+ Remove duplication CYG_TEST_INFO line
+ Check if unimplemented using "(clock_t)-1" and not just "-1"
+
+1999-03-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx:
+ Make sure system() is a weak alias for __system()
+
+ * include/pkgconf/libc.h: Rework CDL description for
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE and change its default to
+ "/dev/haldiag"
+
+ * src/stdio/common/stream.cxx:
+ Check that dev is valid when passed to stream constructor
+
+ * src/stdio/common/stdiosupp.cxx:
+ Tidy
+
+ * src/support/mainthread.cxx: Make this depend on
+ CYGSEM_LIBC_STARTUP_MAIN_THREAD rather than just CYGPKG_KERNEL
+
+1999-03-04 Gary Thomas <gthomas@cygnus.co.uk>
+
+ Merged in changes from 'ecos-new_devs-19990216-branch'
+
+ (1999-02-24 Jonathan Larmour <jlarmour@cygnus.co.uk>)
+
+ * src/stdio/common/stream.cxx:
+ Add "fix me" comments and remove a couple of commented out lines
+
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Revert to using pointer to string for private data, not just string.
+ This preserves the state across multiple calls
+
+ (1999-02-24 Gary Thomas <gthomas@cygnus.co.uk>)
+
+ * src/stdio/common/vsscanf.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/stream.cxx:
+ * src/stdio/common/stdiosupp.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/clibincl/stream.inl:
+ * src/clibincl/stream.hxx:
+ * src/clibincl/stdiosupp.hxx:
+ * include/pkgconf/libc.h: Changes for new I/O system.
+
+1999-03-03 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atexit.c: Forgot to config atexit test for
+ CYGFUN_LIBC_ATEXIT option
+
+ * include/pkgconf/libc.h:
+ Require CYGVAR_KERNEL_THREADS_DATA for CYGSEM_LIBC_PER_THREAD_STRTOK
+ This fixes PR 19362
+ Require CYGPKG_KERNEL for thread safe streams
+ Also don't need "requires CYGPKG_KERNEL" for per-thread rand and errno
+ if we already require a finer granularity kernel option
+
+1999-02-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Fix CYGNUM_LIBC_MAIN_STACK_SIZE by changing
+ CYGPKG_LIBC_STARTUP_MAIN_THREAD -> CYGSEM_LIBC_STARTUP_MAIN_THREAD
+ Fix for PR 19304
+
+1999-02-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx: Add to implement trivial system() call
+ * include/stdlib.h: Add system() prototype
+ * src/PKGconf.mak: Build system.cxx
+
+ * tests/ctype/ctype.c, tests/i18n/setlocale.c, tests/setjmp/setjmp.c,
+ tests/signal/signal1.c, tests/signal/signal2.c,
+ tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdio/stdiooutput.c, tests/stdlib/atexit.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/getenv.c, tests/stdlib/labs.c,
+ tests/stdlib/ldiv.c, tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/realloc.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+ Use CYG_TEST_NA() macro for non-applicable test configurations
+
+1999-02-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/signal.h:
+ * include/signal.inl:
+ * src/signal/raise.cxx:
+ * src/signal/siginit.cxx:
+ * src/signal/signal.cxx:
+ * tests/signal/signal1.c
+ * tests/signal/signal2.c:
+ New files to implement ISO standard signals
+
+ * src/PKGconf.mak (TESTS):
+ * tests/PKGconf.mak (TESTS):
+ Update to build new files above
+
+ * include/stdlib.h:
+ * src/clibincl/stdlibsupp.hxx:
+ Comment and QA changes (including giving better names to some types)
+
+ * include/libc.h:
+ Add new configuration options for signals
+ Add new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+ Add a note to CYGNUM_LIBC_MAIN_STACK_SIZE option that it may be
+ overriden by HAL
+ Add new CYGFUN_LIBC_ATEXIT option and move ...ATEXIT_HANDLERS under
+ it
+ Add new CYGSEM_LIBC_EXIT_CALLS_FFLUSH option
+ Require CYGSEM_LIBC_STARTUP_MAIN_THREAD for "Invoke default static
+ constructors" option
+
+ * src/stdlib/atexit.cxx:
+ Support above CYGFUN_LIBC_ATEXIT and QA changes
+
+ * src/stdlib/exit.cxx:
+ Support for above new libc.h options, and some QA changes
+
+ * src/support/cstartup.cxx:
+ Add support for new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+
+ * src/support/mainthread.cxx:
+ Override main stack size if the HAL has a minimum
+
+ * src/string/strncpy.cxx:
+ Use improved algorithm for aligned copies - imported from newlib
+ QA changes
+
+ * src/stdlib/abort.cxx:
+ Support raise(SIGABRT), and some QA
+
+ * include/errno.h:
+ Add const attribute
+
+ * tests/stdlib/abs.c:
+ QA improvements
+
+1999-02-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Only define cyg_libc_main_thread when
+ the kernel is around.
+
+1999-02-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/clock.c: Joined the two test/NOP checks into
+ one.
+ Increased tolerance in attempt to fix PRs 18737,18787,18846.
+ Fixed typo.
+
+1999-01-28 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ * src/stdlib/rand.cxx:
+ Include <pkgconf/kernel.h> if we use kernel header files
+
+1999-01-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c (test):
+ CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT should be
+ CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT
+ Fix for PR 18786
+
+ * src/string/strtok.cxx:
+ * src/stdio/common/stdiofiles.cxx:
+ * src/errno/errno.cxx:
+ * src/stdlib/rand.cxx:
+ Give mutex protection objects a libc constructor priority
+
+ * src/support/invokemain.cxx:
+ Add prototype for cyg_hal_invoke_constructors()
+
+ * src/support/mainthread.cxx:
+ Give cyg_libc_dummy_constructor_obj a libc constructor priority,
+ and make its class have a public constructor
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/stdin.cxx:
+ Give cyg_libc_stdio_stdin/out/err static objects a libc constructor
+ priority
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ Remove private copy constructor. Needed to make prioritised
+ static constructors work. Fix for PR 18898
+
+1999-01-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx:
+ Include pkgconf/kernel.h otherwise it fails with per-thread errno
+ enabled
+
+ * include/pkgconf/libc.h:
+ Enable per-thread errno by default since that is what POSIX would
+ want
+
+ * tests/time/clock.c (test):
+ Placate compiler by initializing clock_first/second/third anyway,
+ even though they won't be in practice. This is only a test program
+ so adding an extra instruction doesn't matter.
+
+ * src/i18n/locale.cxx (_setlocale):
+ Placate compiler, since it is dumb, by nesting, not serializing, if's
+ This is an idempotent change, but screws up the formatting :-(.
+
+ * src/string/strpbrk.cxx (_strpbrk):
+ Change while loop to do loop to placate compiler. It'll even save an
+ instruction too (wow!)
+
+1999-01-22 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add closing curly brace to CYGPKG_LIBC_STRING_STRTOK definition
+
+1999-01-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h:
+ Tidy up and add to header description
+ Change cyg_get_errno_p() to cyg_libc_get_errno_p()
+ Remove ifdef CYGPKG_LIBC
+
+ * include/sys/file_if.h:
+ Remove - move contents to stdio.h
+
+ * include/stdio.h:
+ Tidy up header description
+ Move FILE typedef here from sys/file_if.h
+ SEEK_SET, SEEK_CUR, SEEK_END defined to 0, 1, 2 respectively
+ for backwards compatibility with old UNIX
+ Change definitions of stdin/out/err to be addresses of FILE
+ globals - even though they're actually Cyg_StdioStream it'll work
+
+ * include/pkgconf/libc.h:
+ Make CYGPRI_LIBC_WEAK et al macros depend on new ones in infra
+ Reorganise trace options under the individual components they are
+ associated with.
+ Reorganise thread-safety options under the individual components
+ they are associated with.
+ Add new CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS option
+ Misc. reformatting
+ Remove dependency on pkgconf/kernel.h - Configuration Tool will
+ generate check macros anyway.
+ Remove CYGPKG_LIBC_TRACE, CYGFUN_LIBC_strtok, CYGPKG_LIBC_RAND
+ options
+ Tidy up description header
+
+ * src/clibincl/clibdata.hxx:
+ * src/clibincl/clibdata.inl:
+ * src/support/clibdata.cxx:
+ Remove and instead rely on each component to initialise its own data
+
+ * src/clibincl/stdiofiles.hxx, src/clibincl/stdiofiles.inl:
+ New files to contain global file list and lock (if applicable).
+ Implemented as class with member access functions
+
+ * src/errno/errno.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Rename cyg_get_errno_p() to cyg_libc_get_errno_p()
+
+ * src/stdio/common/fclose.cxx:
+ * src/stdio/common/fflush.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/stdio/common/freopen.cxx:
+ Remove ifdef CYGPKG_LIBC
+ Use new global file access method from stdiofiles.hxx
+ Tidy up description header
+ Use new CYGBLD_ATTRIB_WEAK_ALIAS
+ Access errno "normally" rather than clibdata way
+
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx
+ * src/stdio/common/stderr.cxx:
+ New files. Implement Cyg_StdioStream objects for each stream. In
+ separate self-contained files so using one doesn't bring in the
+ others
+
+ * src/stdio/common/stdiofiles.cxx:
+ New file. Implements global files array and lock
+
+ * src/stdlib/_exit.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Use infra CYGBLD* macros
+
+ * src/stdlib/malloc.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Add pkgconf/kernel.h now that pkgconf/libc.h doesn't have it
+ Use infra CYGBLD* macros
+ Make pool visible externally with weak attribute and new name
+ cyg_libc_malloc_memorypool
+
+ * src/stdlib/rand.cxx:
+ * src/stdlib/strtok.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Use infra CYGBLD* macros
+
+ * src/support/cstartup.cxx:
+ Split into smaller files to make selective linking work better,
+ fix i386 port problem and make GDB happy
+
+ * src/support/environ.cxx:
+ * src/support/invokemain.cxx:
+ * src/support/main.cxx:
+ * src/support/mainthread.cxx:
+ New files from bits of the old cstartup.cxx
+ Add support for CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+
+ * src/PKGconf.mak:
+ Update to reflect file additions/deletion
+
+ * tests/stdlib/rand1.c:
+ * tests/stdlib/rand2.c:
+ * tests/stdlib/rand3.c:
+ * tests/stdlib/srand.c:
+ Make conform to coding standards
+ Remove ifdef CYGPKG_LIBC_RAND
+ Tidy up description header
+
+ * tests/string/strtok.c:
+ Make conform to coding standards
+ Remove ifdef CYGFUN_LIBC_strtok
+ Tidy up description header
+
+1999-01-15 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/stdlib/getenv.c (main): added tests for the case in which
+ the user does not supply environ and in which the user supplies a
+ NULL environ.
+
+1999-01-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Added workaround for weak aliasing
+ problem in i386 gcc.
+
+
+1999-01-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ (CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE): Change defaults to be
+ more reasonable on small systems.
+
+1999-01-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Minor bug with environ not being initialised correctly by
+ default
+
+1998-12-24 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (Cyg_StdioStream):
+ check_this() member functions should now be const
+
+1998-12-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx (_memchr):
+ treat search value parameter to memchr as an unsigned byte,
+ not a signed int - copied fix from newlib PR 18471
+
+1998-12-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/realloc.c:
+ * tests/stdlib/malloc3.c:
+ * tests/stdlib/malloc2.c:
+ Warning cleanup
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c, tests/stdlib/malloc3.c,
+ tests/stdlib/realloc.c:
+ Only run these tests when we have a coalescing memory allocator
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Only check buffer init success if buffering
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ Check for diff of requested size against buffer_size, not
+ get_buffer_size(), since this may return -1, which won't be
+ equal to size, and will cause malloc to be called
+
+1998-12-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stdlib/getenv.c (main): Don't declare variables when they
+ are not used.
+
+Thu Nov 26 17:59:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/string/strncpy1.c:
+ Fix off-by-one error since it called my_strcmp() and not
+ my_strncmp(), which meant in included the trailing NULL when it
+ shouldn't have.
+
+1998-11-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/qsort.cxx (_qsort):
+ * src/stdlib/rand.cxx (_srand):
+ Changed CYG_REPORT_FUNCNAMETYPE to CYG_REPORT_FUNCNAME in void
+ functions.
+
+Mon Oct 26 18:49:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/cstartup.cxx (cyg_libc_dummy_main):
+ Silence compiler warning with cast of char * to CYG_ADDRWORD
+
+Wed Oct 28 17:31:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clock.cxx (_clock):
+ Reorder scaling expression as it was both incorrect and risked
+ overflow.
+ Fix for PR 18076
+
+Mon Oct 19 14:40:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h (EOF):
+ Change from -64 to (-1), to allow broken code to work :-/
+ Also change other negative defines to be within parentheses
+
+1998-10-19 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated the doc URL
+
+Thu Oct 15 21:33:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Only include kernel thread headers when we're in thread-safe mode
+
+ * src/time/clock.cxx:
+ Only include kernel clock headers if there's a kernel with the
+ right functionality available
+
+ * tests/time/clock.c:
+ Remove unnecessary inclusion of <pkgconf/kernel.h>
+
+ Above changes are required for PR 17229
+
+Wed Oct 14 16:38:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise inclusion of clibincl/stdiosupp.hxx and
+ clibincl/stream.hxx. Tidying up PR 17502
+
+Wed Oct 14 14:08:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGPKG_LIBC_STRING_OPTIMISATIONS to
+ CYGPKG_LIBC_STRING_OPTIMIZATIONS to make it truely merkin.
+
+Tue Oct 13 19:34:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_ARGUMENTS):
+ Add a default argv[0] of "" as many programs assume argc>0
+ The standard allows argv[0] to be "" if the program name
+ is not available
+
+1998-09-26 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ PR 17502: this header file now does nothing if the stdio option
+ is disabled completely. This is the same behaviour is
+ clibincl/stream.hxx, although arguably the #ifdef protection
+ should happen wherever the header file is #include'd rather than
+ in the header file itself.
+
+ * src/clibincl/clibdata.hxx:
+ PR 17502: this header file still #include's internal stdio-related
+ header files and references the FILE structure, even if stdio is
+ disabled. There were some #ifdef's for CYGPKG_LIBC_STDIO already.
+ One more has been added for _fopen() and _fclose().
+
+1998-09-25 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl (Cyg_StdioStreamBuffer):
+ PR 17487: Reorder the calls to initialize member fields, to
+ eliminate a compiler warning.
+
+Fri Sep 25 19:04:29 1998 Jonathan Larmour <jlarmour@peshwari.cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/string/strtok.cxx,
+ src/time/clock.cxx:
+ Only define tracing variable and tracing level macro when
+ the relevant tracing level config options are set. Otherwise
+ keep the tracing level fixed at 0
+ Fix for PR 17476
+
+ * include/pkgconf/libc.h:
+ Define trace levels only if parent CYGPKG_LIBC_TRACE is defined
+ for consistency with Configuration Tool
+
+
+Fri Sep 25 17:24:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Make definition of vscanf() dependent on CYGFUN_LIBC_STDIO_ungetc
+ otherwise _vfscanf() won't be compiled. This therefore would
+ cause a link fail iff selective linking is not enabled.
+ Fix for PR 17455
+
+Fri Sep 25 17:23:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/rand.cxx:
+ Make compilation dependent on CYGPKG_LIBC_RAND
+ Fix for PR 17473
+
+ * tests/stdlib/srand.c:
+ Make definition of dummy test pass conditional on CYGPKG_LIBC_RAND
+ not being defined, as well as CYGPKG_LIBC
+ Caused compilation failure when testing PR 17473 fix
+
+Mon Sep 21 17:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Make sscanf test conditional on CYGFUN_LIBC_STDIO_ungetc since
+ _vfscanf() only gets compiled if this is defined
+ Fix for PR 17346
+
+1998-09-20 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated CDL doc strings.
+
+Fri Sep 18 22:18:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_errno_p):
+ Rather than this function only being available in thread-safe mode,
+ instead make what it returns be either the per-thread errno, or
+ global errno depending on the configuration.
+ Include <errno.h> (conditionally) to support this change
+
+Wed Sep 16 11:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove "fix me" comment which I forgot to remove before
+
+Tue Sep 15 19:27:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Updated descriptions and a few other minor things after review.
+ Notably though, the NDEBUG config option has been removed
+
+1998-09-15 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ PR 17201: removed dependency on CYGPKG_KERNEL in the option
+ CYGNUM_LIBC_MAIN_STACK_SIZE, since the actual dependencies cannot
+ be expressed sensibly in the current system.
+
+1998-09-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Sorting out dependencies for error package.
+
+1998-09-10 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: started adding doc fields to the
+ cdl_package data, as a pilot for now.
+
+Wed Sep 9 17:41:23 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add option CYGIMP_LIBC_MALLOC_CXX_DELETE_CALLS_FREE to explicitly
+ control whether the empty delete functions (currently) in
+ kernel/.../common/delete.cxx are enabled; controls code bloat, see
+ the comments in delete.cxx.
+
+Fri Sep 4 16:43:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add a default CYG_TEST_PASS() to make sure the test infra doesn't
+ complain.
+ Also remove the unused string functionsa
+
+Fri Sep 4 15:43:48 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdlib/exit.cxx (__libc_exit):
+ * src/stdlib/_exit.cxx (__libc__exit):
+ * src/stdlib/malloc.cxx (_free):
+ * src/stdlib/abort.cxx (abort):
+ * src/support/cstartup.cxx (invoke_main):
+ Tracing system asserted cos it was being called incorrectly; these
+ are void functions so you shouldn't give a type to the function
+ reporting call.
+
+Fri Sep 4 15:03:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Fix CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE description to refer to
+ the table.cxx file, not table.h
+
+Fri Sep 4 14:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add description for CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE since
+ Proven won't be making any changes to the device driver
+ implementation after all.
+ Fix for PR 17148
+
+ * src/clibincl/stream.inl (set_position):
+ Remove "fix me" line. It is obvious that this will have to change
+ with a filesystem interface
+ Fix for PR 17147
+
+ * src/stdio/common/freopen.cxx:
+ Remove "fix me" - I know about this issue
+ Fix for PR 17145
+
+ * src/stdio/common/stream.cxx (read):
+ Remove "fix me" and change to use memcpy
+ Fix for PR 17144
+
+Fri Sep 4 14:36:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Actually add it this time!
+
+Fri Sep 4 13:48:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add new tests for misc stdio output functions
+
+ * tests/PKGconf.mak:
+ Build stdiooutput.c test
+
+Fri Sep 4 12:52:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (write_byte):
+ Remove bogus assert
+
+ * tests/stdlib/getenv.c (main):
+ Check whether str is NULL before doing a strcmp()
+
+ * tests/stdio/sprintf2.c (main):
+ Reformat to 76 columns
+
+Fri Sep 4 02:10:54 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/stdio/common/stream.cxx:
+ Add new peek_byte method to Cyg_StdioStream
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix up buffer access to work with new peek_byte method above
+ Fix for PR 16954
+
+Thu Sep 3 19:40:11 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/rand1.c, tests/stdlib/rand2.c,
+ tests/stdlib/rand3.c:
+ Add extra check for CYGPKG_LIBC_RAND to decide whether the test
+ is applicable or not
+
+ * tests/stdlib/rand2.c (test):
+ Use CYGNUM_LIBC_RAND_SEED for default seed, not 1
+
+ * tests/string/strtok.c:
+ Add extra check for CYGFUN_LIBC_strtok to decide whether the
+ test is applicable or not
+
+Wed Sep 2 19:11:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fread.cxx, src/stdio/output/fwrite.cxx:
+ Add fread() and fwrite() functions
+
+ * src/PKGconf.mak:
+ Build fread.cxx and fwrite.cxx from above
+
+ * src/stdio/common/stream.cxx:
+ Reformat to 76 columns
+ In write(), move initialisation of *bytes_written to start
+ In read(), move initialisation of *bytes_read to start
+
+ * include/stdio.h:
+ Reformat to 76 columns
+
+ Replace all references to the ANSI
+ standard to instead by the ISO C standard
+
+ Add commented argument names for "documentation"
+
+ Add fread() and fwrite() prototypes
+
+ * src/clibincl/stdiosupp.hxx:
+ Copy the above changes from stdio.h, and add _fread() and _fwrite()
+ prototypes
+
+ * src/stdio/output/fputs.cxx, src/stdio/input/fgets.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 15:41:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 14:46:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Use trylock_me() instead of lock_me(), and loop to prevent
+ deadlocks
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl:
+ Add trylock_me() method
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/fflush.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 12:24:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change 0x7fff to 0x7fffffff. Oops!
+ give main stack size option a legal_values field
+ Undefine tracing by default
+ Add some more description in the header
+
+Tue Sep 1 20:02:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/i18n/setlocale.c (cyg_package_start):
+ Fix typo - extra "x" for no reason at all! :-)
+
+Tue Sep 1 19:44:58 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx:
+ Fix bug in find_locale_data() that miscalculated size of
+ all_locales
+
+ Make find_locale_data() match the locale "" and add some
+ other things in _setlocale() to ensure that "C" gets returned
+ when the default locale "" is passed.
+
+ Only check the locale pointer when it is non-NULL
+
+ * tests/i18n/setlocale.c:
+ New tests for setlocale()
+
+ * tests/PKGconf.mak:
+ Update to build setlocale.c test
+
+ * src/support/cstartup.cxx:
+ Don't actually call system default main() "main" otherwise GDB
+ gets confused and thinks its the entry point. Instead make a weak
+ alias and call the real function something different.
+
+Tue Sep 1 18:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx (_setlocale):
+ Fix tracing macro name and remove "str maybe used before
+ initialised" warning
+
+ * tests/stdlib/qsort.c:
+ Correct file description header
+
+Tue Sep 1 17:04:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/locale.h, src/clibincl/i18nsupp.hxx, src/i18n/locale.cxx:
+ New files to add support for locales as defined by the ISO C
+ standard. i.e. setlocale() and localeconv() functions and some
+ other bits
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAX_LOCALE_NAME_SIZE config option for locale
+ support
+
+ * src/PKGconf.mak:
+ build locale.cxx
+
+ * include/errno.h, src/clibincl/ctypesupp.hxx:
+ Tidy up to 76 columns
+
+Tue Sep 1 00:24:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Move environment-related options from stdlib into new
+ CYGPKG_LIBC_STARTUP component. Also add options for main()'s
+ arguments (CYGPKG_LIBC_ARGUMENTS), main()'s default stack size
+ (CYGNUM_LIBC_MAIN_STACK_SIZE), number of atexit handlers
+ (CYGNUM_LIBC_ATEXIT_HANDLERS), and whether _exit() stops the
+ system (CYGSEM_LIBC_EXIT_STOPS_SYSTEM).
+
+ * src/clibincl/stdlibsupp.hxx:
+ Fix a few comment bugs, and add new
+ cyg_libc_invoke_atexit_handlers() function prototype
+
+ * src/stdlib/_exit.cxx, src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Implement exit(), atexit() and _exit() correctly now. Also
+ includes cyg_libc_invoke_atexit_handlers() in atexit.cxx. Now
+ we get the correct behaviour of atexit(), and exit() invokes the
+ atexit handlers and fflushs all the stdio streams. Add plenty of
+ tracing of asserts too.
+
+ * src/support/cstartup.cxx:
+ Make main_thread object an exported global. Allow user-settable
+ arguments. Add MUCH more tracing and asserts. Improve comments.
+ Tidy up to 76 columns
+
+ * tests/stdlib/atexit.c:
+ Add simple test for atexit() and it calling registered functions
+
+ * tests/PKGconf.mak:
+ Build atexit.c test
+
+Mon Aug 31 18:54:48 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/getenv.cxx, tests/stdlib/getenv.c:
+ Add support for getenv(), and some tests to ensure it works
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update to include getenv.cxx and getenv.c test
+
+ * src/clibincl/clibdata.hxx:
+ remove prototype for environ - we expect files needing it to
+ define it themselves
+
+ * src/support/clibdata.cxx:
+ Tidy up to 76 columns and add definition of char **environ, but
+ with a configurable initialiser (see libc.h below)
+
+ * tests/stdlib/abs.c (main):
+ Tidy up to 76 columns
+
+ * src/stdlib/malloc.cxx:
+ Tidy up to 76 columns and remove warning for undefined _memcpy()
+ by changing to memcpy(), and casting away signedness
+
+ * include/pkgconf/libc.h:
+ Add CYGPKG_LIBC_ENVIRONMENT and CYGDAT_LIBC_DEFAULT_ENVIRONMENT
+ configuration options
+
+ * include/pkgconf/libc.h, src/clibincl/clibdata.hxx:
+ Tidy up to 76 columns
+
+ * include/stdlib.h:
+ Add getenv() prototype and tidy up to 76 columns
+
+ * src/clibincl/stdlibsupp.hxx:
+ Add _getenv() prototype
+
+Mon Aug 31 13:37:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Add realloc()
+
+ * tests/stdlib/realloc.c:
+ Add this file to test new realloc() functionality
+
+ * tests/PKGconf.mak:
+ Build realloc test
+
+ * tests/stdlib/malloc3.c (main), tests/stdlib/malloc2.c (main),
+ tests/stdlib/malloc1.c (main):
+ Conditionalise local vars to prevent warnings
+
+ * tests/stdlib/malloc3.c (fill_with_data):
+ Move '{' into "verb" line
+
+ * include/pkgconf/libc.h:
+ Require infra tracing support to allow tracing
+
+ * include/stdlib.h:
+ Add realloc()
+
+ * src/clibincl/stdlibsupp.hxx:
+ Update the commented argument names from stdlib.h, including realloc()
+
+1998-08-28 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ * src/clibincl/clibdata.hxx, src/time/clock.cxx:
+
+ Updated for new kernel configuration option symbol names
+
+Fri Aug 28 19:18:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ Changed the entry below to sat "tx39" instead of "mn10300".
+ It's been a long week.
+
+Fri Aug 28 18:59:20 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Add a weakly named main to allow the
+ default configuration to link on the tx39 which has no
+ scalextric linking yet. The static Cyg_Thread main_thread object
+ below continues to exist, though unreferenced, so all its
+ descendants must exist too.
+
+Fri Aug 28 08:54:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h:
+ Add commented argument names Add exit(), and atexit(). And move
+ these along with abort() and _exit() to a new section.
+
+ * src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Add trivial versions of atexit() and exit()
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAIN_STACK_SIZE config option
+
+ * include/sys/cstartup.h, src/support/cstartup.cxx, src/PKGconf.mak:
+ New files to provide a new function cyg_iso_c_support(), which
+ invokes main "correctly".
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/srand.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcoll2.c, tests/string/strcpy1.c,
+ tests/string/strcpy2.c, tests/string/strcspn.c,
+ tests/string/strlen.c, tests/string/strncat1.c,
+ tests/string/strncat2.c, tests/string/strncpy1.c,
+ tests/string/strncpy2.c, tests/string/strpbrk.c,
+ tests/string/strrchr.c, tests/string/strspn.c,
+ tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c,
+ tests/time/clock.c:
+
+ Modify all tests to use new startup mechanism, and cyg_iso_c_start()
+
+Fri Aug 28 00:29:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Add #ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO around all accesses to
+ flags.last_buffer_op_was_read. Fix for PR 16997
+
+Thu Aug 27 01:12:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/sys/file_if.h:
+ Fix comments and remove cyg_get_file_star()
+
+Wed Aug 26 20:24:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove #define CYGPKG_LIBC is that is meant to live in
+ <pkgconf/system.h> after all
+
+Wed Aug 26 19:39:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ More fixes to CDL stuff to make it work better, and look better on
+ the screen
+
+Tue Aug 25 20:21:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Make some fixes after running the ConfigTool
+
+Tue Aug 25 16:46:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_STDIO_BUFSIZE):
+ Fix typo of CYGNUM_LIBC_STDIO_BUFSIZE
+
+Tue Aug 25 15:10:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Tidy up CDL stuff a bit more, prior to checking it actually works.
+
+Tue Aug 25 11:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c (main):
+ Prevent calls to CYG_TEST_STILL_ALIVE for now
+
+Tue Aug 25 05:39:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change cosmetic paragraph alignment.
+
+Tue Aug 25 03:11:34 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Make stderr initialise with buffer size 0.
+ For PR 16955
+
+Mon Aug 24 17:38:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ First pass at CDL-ifying the C library configuration. Currently
+ deliberately disabled as there a few outstanding issues.
+
+Mon Aug 24 16:14:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx (_vfnprintf):
+ clear up warning for unused argument
+
+ * tests/stdlib/malloc2.c (NUM_ITERATIONS):
+ Lower to 100 from 50000 so it won't take too long under the simulator
+
+Thu Aug 20 17:48:43 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Remove now unnecessary inclusion of kernel/ktypes.h
+
+Wed Aug 19 19:19:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c,
+ tests/stdio/sscanf.c, tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c,
+ tests/stdlib/strtoul.c, tests/string/strtok.c,
+ tests/time/clock.c:
+ Add parameters to "main()" to silence warnings
+
+Wed Aug 19 18:52:59 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Put conditional error check into same #ifdef and if as what was being
+ checked in the first place!
+
+Wed Aug 19 18:49:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl:
+ Reorder Cyg_StdioStream::check_this() to be first to silence
+ warnings
+
+Tue Aug 18 16:10:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * ecc/language/c/libc/current/src/clibincl/clibdata.hxx,
+ ecc/language/c/libc/current/src/errno/errno.cxx,
+ ecc/language/c/libc/current/src/stdio/common/fopen.cxx,
+ ecc/language/c/libc/current/src/stdlib/rand.cxx,
+ ecc/language/c/libc/current/src/string/strtok.cxx:
+ Rename CYGIMP_LIBC_INTERNAL_DATA_PREAMBLE,
+ CYGIMP_LIBC_INTERNAL_DATA_ALLOC_CHECK_PREAMBLE,
+ CYGVAR_LIBC_INTERNAL_DATA, and
+ CYGIMP_LIBC_INTERNAL_DATA_CHECK to all have CYGPRI_ prefix instead
+ as recommended by the config name rules
+
+
+Tue Aug 18 14:31:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/setvbuf.cxx (_setvbuf):
+ Rename variable names in assert line, otherwise doesn't build
+ with asserts on!
+
+Sun Aug 16 18:15:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix some bugs, although there are some left to fix still. Unrelated
+ to the rest of the checkins, so I will check the partial fix in now.
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx:
+ Add parameters to constructor to allow more things to be done at
+ construction time.
+
+ Now we have "new", remove separate "construct" method
+
+ Add more documentation on constructor
+
+ As requested by code review, where possible, move boolean flags
+ into separate packed bitfield structure for space efficiency
+
+ Make readbuf_char be usable all the time rather than when configured
+ not to be buffering, as it is also needed for non-buffered mode i.e.
+ _IONBF
+
+ * src/stdio/common/fopen.cxx:
+ Change to use new method of construction from above, using new
+
+ Use thread-specific data, rather than global. And so change errnos
+ to access errno entry specifically
+
+ Make process_mode() check for append mode too
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/stdio/common/setvbuf.cxx:
+
+ Change to cope with different way of dealing with buffering policy
+ flags etc. in Cyg_StdioStream
+
+ * src/stdio/common/vsnprintf.cxx, src/stdio/common/vsscanf.cxx,
+ src/support/clibdata.cxx:
+ Change construction of streams to use new parameters added above,
+ and change to use _IONBF mode for string stdio functions,
+ otherwise its a waste of memory. And use _IONBF for stderr as the
+ ISO standard tells us to!
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Change constructor so that it can be set with default size and
+ dynamic buffer (if applicable)
+
+ Fix minor bug in destructor - should only call free when allocated
+ dynamically
+
+ Change get_buffer_size to return -1 if the buffer was not allowed
+ to be set up
+
+ * src/stdio/common/streambuf.cxx:
+ Remove unnecessary stdio.h include and add extra comment to whether
+ to free bit in set_buffer()
+
+ * src/stdio/common/freopen.cxx:
+ Change @@@ to standard fix me string
+
+ * src/stdio/output/fputc.cxx:
+ Remove unnecessary "written" variable
+
+Thu Aug 13 15:37:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx:
+ Included use of "fix me" line to ensure this is discussed before
+ release
+
+ * include/stdlib.h, src/stdlib/abort.cxx, src/PKGconf.mak:
+ Add abort.cxx to implement abort(), albeit naively
+
+Thu Jul 30 18:03:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/vsscanf.cxx (_vsscanf),
+ src/stdio/common/vsnprintf.cxx (_vsnprintf):
+ Fix initialiser of pseudo string device table that didn't get updated
+ when the table changed (Bad proven, no biscuit).
+
+ * src/clibincl/stream.inl (~Cyg_StdioStream):
+ Move invalidation of magic_validity_word to after unlock_me(),
+ otherwise it always fails!
+
+Tue Jul 28 21:29:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Shorten over-long lines
+
+Tue Jul 28 20:28:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx (class Cyg_StdioStream),
+ src/clibincl/stream.inl, src/stdio/common/stream.cxx:
+ Clarify some comments and get the CYGDBG_DEFINE_CHECK_THIS and
+ CYG_ASSERTCLASS stuff going
+
+ * src/clibincl/stream.inl:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 15:31:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl, src/stdio/common/streambuf.cxx:
+ Move set_buffer() from streambuf.inl to new file streambuf.cxx
+
+ * src/PKGconf.mak (COMPILE):
+ Build new file streambuf.cxx
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ Add METHODS comment
+
+ * src/stdio/common/stream.cxx:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 00:26:36 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.inl, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/div.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/qsort.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/string/strtok.cxx:
+
+ Include proper Berkeley license inline in the file, rather than
+ referring to an external file
+
+ * doc/COPYING.UCB:
+ Remove, now that it isn't referred to any more
+
+Mon Jul 27 23:34:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl, include/errno.h,
+ include/stdio.h, include/stdio.inl, include/stdlib.h,
+ include/stdlib.inl, include/string.h, include/string.inl,
+ include/time.h, include/sys/file_if.h, src/PKGconf.mak,
+ src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/stdiosupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/streambuf.hxx,
+ src/clibincl/streambuf.inl, src/clibincl/stringsupp.hxx,
+ src/clibincl/timesupp.hxx, src/ctype/isalnum.cxx,
+ src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx,
+ src/ctype/islower.cxx, src/ctype/isprint.cxx,
+ src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx,
+ src/ctype/tolower.cxx, src/ctype/toupper.cxx,
+ src/errno/errno.cxx, src/stdio/common/snprintf.cxx,
+ src/stdio/common/sprintf.cxx, src/stdio/common/sscanf.cxx,
+ src/stdio/common/stdioinlines.cxx, src/stdio/common/stream.cxx,
+ src/stdio/common/ungetc.cxx, src/stdio/common/vsnprintf.cxx,
+ src/stdio/common/vsscanf.cxx, src/stdio/input/fgetc.cxx,
+ src/stdio/input/fgets.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/gets.cxx, src/stdio/input/scanf.cxx,
+ src/stdio/output/fnprintf.cxx, src/stdio/output/fprintf.cxx,
+ src/stdio/output/fputc.cxx, src/stdio/output/fputs.cxx,
+ src/stdio/output/printf.cxx, src/stdlib/_exit.cxx,
+ src/stdlib/abs.cxx, src/stdlib/atof.cxx, src/stdlib/atoi.cxx,
+ src/stdlib/atol.cxx, src/stdlib/div.cxx, src/stdlib/labs.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/rand.cxx, src/stdlib/strtod.cxx,
+ src/string/memchr.cxx, src/string/memcmp.cxx,
+ src/string/memmove.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx,
+ src/string/strcoll.cxx, src/string/strcpy.cxx,
+ src/string/strcspn.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx, src/string/strpbrk.cxx,
+ src/string/strrchr.cxx, src/string/strspn.cxx,
+ src/string/strstr.cxx, src/string/strsuppt.cxx,
+ src/string/strtok.cxx, src/string/strxfrm.cxx,
+ src/support/clibdata.cxx, src/time/clock.cxx:
+ Untabify
+
+Mon Jul 27 23:14:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/stdlib/malloc.cxx, src/stdlib/qsort.cxx,
+ tests/ctype/ctype.c, tests/stdlib/rand3.c, tests/stdlib/malloc3.c:
+ Remove all mentions of "register" in variable declarations. Also
+ untabify where needed
+
+ * src/stdlib/bsearch.cxx:
+ Untabify this too
+
+
+Mon Jul 27 22:18:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/fputc.cxx (_fputc):
+ Replace call to stream write() with call to write_byte()
+
+ * src/clibincl/stream.inl (write_byte):
+ Add asserts for stream write() returning odd values for how much has
+ been written
+
+ (bytes_available_to_read):
+ Remove "register" def for variable declaration
+
+Mon Jul 27 22:06:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdiosupp.cxx:
+ Remove #if 0'd cyg_get_file_star() and unnecessary pseudo string
+ device definition
+
+Mon Jul 27 21:57:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h, src/support/clibdata.cxx:
+ Change CYGXXX_LIBC_STDIO_DEFAULT_CONSOLE to
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE
+
+Mon Jul 27 21:49:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/setjmpsupp.hxx,
+ src/clibincl/stdiosupp.hxx, src/clibincl/stdlibsupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl,
+ src/clibincl/stringsupp.hxx, src/clibincl/timesupp.hxx:
+
+ Change CYGONCE_LIBC_*_{HXX,INL} to CYGONCE_LIBC_CLIBINCL_*_{HXX,INL}
+
+Mon Jul 27 21:34:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change #define XXXXX 1 to #define XXXXX where applicable as per code
+ review
+
+ Also remove obsolete CYGIMP_LIBC_THREAD_START_SUSPENDS_SELF
+
+Mon Jul 27 19:42:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen):
+ Use #ifdef, not #if for config options
+
+Mon Jul 27 15:01:51 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/stream.cxx, src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx:
+ Fixes to compile with the new Cyg_IORB field names.
+
+Thu Jul 9 03:40:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Adjust starting of tests to possibly start scheduler since
+ strtol/stroul rely on errno, which may be a per-thread variable
+
+Thu Jul 9 03:06:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx, src/stdio/common/setvbuf.cxx:
+ Consolidate read and write buffers into single buffer, as it should
+ have been all along
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Add drain_buffer() method to speed up the case when we want the
+ buffer completely emptied
+
+Tue Jul 7 21:26:33 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Add a couple of new tests that check that very long strings work too
+
+Wed Jul 1 19:52:39 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/streambuf.hxx:
+ Do not permit copy constructors
+
+ * src/clibincl/stream.inl, src/stdio/common/fclose.cxx:
+ Make sure we use #ifdef and not #if
+
+ * src/clibincl/streambuf.inl:
+ Use member initialisation list rather than explicit initialisation to
+ reduce warnings
+
+Wed Jul 1 19:17:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h and all files using config options:
+ Rename configuration defines to make them more standard
+
+Thu Jun 25 20:09:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strcat.cxx:
+ Add parentheses on check to silence warning
+ (Verified by proven)
+
+Thu Jun 25 19:30:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Make sure that the malloc pool is initialised before other things
+ can use it. This is done with the hot new constructor ordering
+ feature.
+
+Thu Jun 25 18:27:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Remove bogus ifdef if floating point is _not_ wanted
+
+Thu Jun 25 17:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Fix argument checking to allow first argument of NULL
+
+Thu Jun 25 04:18:50 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_strtok_last_p):
+ Remove bogus assertion
+
+ * src/stdlib/malloc.cxx:
+ Got sense of alignment check assertion the wrong way round, so negate
+ it
+
+Thu Jun 25 03:56:35 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx:
+ Fix argument checking assertions with legitimate nulls here too
+
+Thu Jun 25 03:46:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/strtoul.cxx, src/stdlib/strtol.cxx:
+ Fix argument checking assertions to cope with legitimate nulls
+
+Wed Jun 24 09:01:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Remove extraneous info messages
+
+Wed Jun 24 05:59:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c:
+
+ Change large automatic arrays to static arrays to prevent overuse
+ of a potentially small stack
+
+Wed Jun 24 05:45:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/string/strtok.c, tests/time/clock.c:
+
+ Increase thread stack size from 4K to 32K as in some cases it was
+ too small.
+
+
+Tue Jun 23 20:12:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Add extra tests, including floating point conversion testing
+
+Tue Jun 23 17:01:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Make sure this is only compiled if CYGFUN_LIBC_strtok is defined
+
+Tue Jun 23 06:10:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ add some comments - that's all
+
+ * src/stdio/common/stream.cxx:
+ fix case in refill_read_buffer() for what to do when there's nothing
+ left. Now return EAGAIN
+
+ * src/stdio/common/vsscanf.cxx, src/stdio/input/vfscanf.cxx:
+ Get sscanf working properly and passing tests. Also make sure it
+ ignores FP when its not configured
+
+ * src/stdlib/atof.cxx:
+ Only compile at all if strtod() is present
+
+
+Mon Jun 22 19:13:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise strtok_last and rand_seed better
+
+Mon Jun 22 14:14:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc3.c:
+ Add test for checking that mallocing and freeing repeatedly works
+
+ * tests/PKGconf.mak:
+ Update to reflect addition of the above
+
+Mon Jun 22 13:09:33 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/fopen.cxx
+ * src/stdio/common/stream.cxx
+ * src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx
+ Include cyg/devs/common/iorb.h instead of iorb.hxx
+
+ * src/stdio/common/stream.cxx
+ Use read_blocking and write_blocking instead of just read and
+ write when accessing devices through the virtual device table.
+
+Sun Jun 21 18:19:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Propagate change of return code handling for puts from stdio.inl
+ into here
+
+ * src/stdio/output/fputc.cxx:
+ make sure the right type is used for output - byte not int
+
+ * src/support/clibdata.cxx:
+ Fix #define config mistook. #endif was in wrong place
+
+Sun Jun 21 16:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Allow explicit construction to get around a bug when
+ dynamically allocating per-thread structure
+
+Sun Jun 21 16:02:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c, tests/stdlib/qsort.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+
+ Update tests to "do the right thing" with all configuration settings
+
+
+Sun Jun 21 04:54:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ I have to be careful not to use setjmp() in a way not exactly
+ defined by the standard, so make sure I do, and add a comment
+ documenting these ways.
+
+ Also ensure this test does the right thing in all configurations
+
+Sun Jun 21 04:38:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add extra checks for invalid configurations
+ Also make default for thread safety OFF
+
+ * src/clibincl/clibdata.inl:
+ Adjust indentation
+
+ * src/stdio/output/vfnprintf.cxx:
+ Make printf of -0.0 floating point do the right thing
+
+Sun Jun 21 04:28:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/snprintf.cxx, src/stdio/common/sprintf.cxx,
+ src/stdio/common/sscanf.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/scanf.cxx, src/stdio/output/fnprintf.cxx,
+ src/stdio/output/fprintf.cxx, src/stdio/output/printf.cxx:
+
+ Had to remove inline functions with varargs. Which means separating
+ out each function from stdioinlines.cxx into a separate file, as they
+ no longer belong there. So all the above files were created.
+
+ * include/stdio.inl, src/PKGconf.mak,
+ src/stdio/common/stdioinlines.cxx:
+ Changed to take account of the above
+
+
+Sun Jun 21 03:58:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c:
+ Update with floating-point tests. Also make sure they DTRT in all
+ configurations
+
+Fri Jun 19 19:33:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ accidentally initialised stdin/out/err twice
+
+Fri Jun 19 19:09:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Another typo
+
+Fri Jun 19 18:59:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Missing #endif typo
+
+Fri Jun 19 18:51:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Fix initialisation of static data members. Unsure how it worked at
+ all before!
+
+Fri Jun 19 18:01:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.inl:
+ puts should check whether fputs returns non-negative, rather than
+ non-zero
+
+Fri Jun 19 17:22:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl:
+ Make inclusion of get_errno_p conditional on thread-safety
+
+Wed Jun 17 10:55:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Add weak alias of vfscanf() to _vfscanf()
+
+Wed Jun 17 09:10:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Initialise err to silence compiler warning
+
+Wed Jun 17 08:59:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Most important is the addition of floating point support in
+ src/stdio/output/vfnprintf.cxx and src/stdio/input/vfscanf.cxx. This
+ also required the addition of atof() and strtod() in stdlib which is
+ definitely no bad thing! Other than that...
+
+ * Fix a whole bunch of stuff I messed up first time round. Also the
+ sprintf and sscanf tests are included again.
+
+Tue Jun 16 16:38:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Typo with not putting comment character at the beginning. Sigh.
+
+Tue Jun 16 14:53:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Forgot to (temporarily) remove fputs test for now
+
+Mon Jun 15 20:40:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ Everything to do with stdio has almost completely changed, so there's
+ not much point documenting individual changes.
+
+Mon Jun 15 18:36:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c:
+ Stop it moaning quite as much when it fails by making it exit sooner
+
+ * tests/time/clock.c :
+ This isn't a compound testcase
+
+Thu Jun 11 17:59:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h
+ Reverse sense of NDEBUG ifdef, that was left in accidentally due
+ to testing
+
+Thu Jun 11 04:58:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h, include/string.h, src/clibincl/stringsupp.hxx:
+ Modify as I've now added an "error" package which defines the error
+ codes and strerror()
+
+ * src/errno/strerror.cxx:
+ Moved to new error package and thus deleted
+
+Wed Jun 10 18:37:37 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h:
+ create this header and add assert() function
+
+Wed Jun 10 16:23:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h, src/clibincl/stdlibsupp.hxx, src/stdlib/malloc.cxx:
+ Add malloc(), calloc() and free() functions
+
+ * include/pkgconf/libc.h:
+ Add malloc memory pool size option
+
+ * tests/stdlib/malloc1.c, tests/stdlib/malloc2.c:
+ new tests for malloc
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for new files
+
+Wed Jun 10 15:06:16 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ Add another test
+
+Tue Jun 9 18:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add some setjmp config's and a macro for the noreturn attribute
+
+ * include/setjmp.h, include/setjmp.inl, src/clibincl/setjmpsupp.hxx,
+ src/setjmp/longjmp.cxx, tests/setjmp/setjmp.c:
+ Added to implement and test setjmp() and longjmp()
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for newly added files
+
+Thu Jun 4 01:29:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx, src/string/strcpy.cxx,
+ src/string/strlen.cxx, src/string/strncat.cxx,
+ src/string/strncmp.cxx, src/string/strncpy.cxx:
+ Rename CYGIMP_LIBC_PREFER_SMALL_TO_FAST to
+ CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST
+
+ Also use slower but smaller version when __OPTIMIZE_SIZE__ is
+ defined (which comes from using gcc -Os)
+
+Fri May 29 16:15:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl, src/ctype/isxdigit.cxx:
+ Fix bug that numerals aren't considered hex digits
+
+ * include/time.h:
+ Change clock_t and time_t to be signed so that they can accept -1, as
+ required by other libc functions
+
+ * src/clibincl/clibdata.hxx:
+ Fix typo that CYGIMP_LIBC_THREAD_SUPPORT should be ..._SAFETY
+ Also fix macro to allocate thread-specific data to not set variables
+ in a different stack-frame
+
+ * tests/ctype/ctype.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/stdlib/qsort.c:
+ make ctr unsigned to prevent warnings
+
+ * tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/string/strrchr.c:
+ Fix off by one error
+
+ * tests/string/strspn.c:
+ Fix case-sensitivity problem, and off-by-one error
+
+ * tests/string/strxfrm1.c:
+ Remove bogus bit of test that doesn't apply to strxfrm, and fix typo
+
+
+Fri May 22 16:33:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak
+ Remove CXXFLAGS line now that its redundant
+
+ * tests/everything!
+ Do a blitz change of all tests - break some of them down into
+ different files, add new tests, standardize format, fix bugs,
+ update for recent header file changes and much more!
+
+Wed May 20 17:50:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ interim checkin for different dir structure for Bart
+
+Fri May 15 20:30:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Tidy up some loose ends I forgot: rename src/include directory to
+ src/clibincl. And add clibdata.inl and timesupp.hxx in there.
+
+Thu May 14 19:56:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Basically everything has changed in the C library. Files have
+ been moved, renamed, deleted and reworked. This is a major
+ revision, and now starts from this new baseline rather than doing
+ incremental changes.
+
+Fri Apr 17 18:43:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ECCconf.mak:
+ added for new build system (actually Bart did this, but didn't
+ update this ChangeLog)
+
+Fri Apr 17 15:03:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdio/device/sim.cxx:
+ Make it build with CYG_EMPTY_STATEMENT; the unadorned one is being
+ removed.
+
+Thu Apr 16 00:24:24 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * All source files:
+ replace ECCIMP_LIBC_* conditional ifdef with CYGIMP_LIBC_*
+
+ * include/eccconf/libc.h:
+ improve comments and reorder a bit
+
+Wed Apr 8 14:35:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/Makefile.am, tests/Makefile.am, configure.in:
+ many changes to integrate build structure from release tree
+
+ * src/ctype/Makefile.am, src/ctype/Makefile.in, src/errno/Makefile.am,
+ src/errno/Makefile.in, src/stdio/Makefile.am, src/stdio/Makefile.in,
+ src/stdio/common/Makefile.am, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.am, src/stdio/device/Makefile.in,
+ src/stdio/output/Makefile.am, src/stdio/output/Makefile.in,
+ src/stdio/input/Makefile.am, src/stdio/input/Makefile.in,
+ src/stdlib/Makefile.am, src/stdlib/Makefile.in,
+ src/string/Makefile.am, src/string/Makefile.in,
+ src/support/Makefile.am, src/support/Makefile.in,
+ src/time/Makefile.am, src/time/Makefile.in:
+ Remove as they are now redundant with above changes
+
+ * include/Makefile.am:
+ Add to support above changes
+
+ * include/eccconf/libc.h:
+ Change include file for configuration from kernel to system
+
+ * src/include/kerndiag.hxx, src/stdio/device/kerndiag.cxx,
+ src/time/clockfn.cxx:
+ Change kernel include file to eccconf/kernel.h
+
+ * src/include/strngdev.h:
+ remove unnecessary kernel include
+
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in,
+ tests/Makefile.in, include/Makefile.in:
+ regenerate
+
+Mon Apr 6 20:55:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/abs.cxx, src/stdlib/atoi.cxx, src/stdlib/atol.cxx,
+ src/stdlib/div.cxx, src/stdlib/labs.cxx, src/stdlib/ldiv.cxx:
+ Separated out functions from stdlib.cxx into separate files
+
+ * src/stdlib/stdlib.cxx:
+ removed to be replaced by above files
+
+ * Makefile.am, src/stdlib/Makefile.am:
+ modified to support building above and not building stdlib.cxx
+
+ * src/support/tsd.cxx:
+ Remove unnecessary header file includes
+
+ * Makefile.in, src/stdlib/Makefile.in:
+ regenerated
+
+Mon Apr 6 19:19:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx, include/eccconf/libc.h:
+ remove lame hack for tx39 compiler now that its fixed
+
+ * src/include/sim.hxx:
+ define constants as static to placate compiler
+
+Thu Apr 2 21:01:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ctype/ctype.cxx:
+ deleted and separated out into below files
+
+ * src/ctype/isalnum.cxx, src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx, src/ctype/islower.cxx,
+ src/ctype/isprint.cxx, src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx, src/ctype/tolower.cxx,
+ src/ctype/toupper.cxx:
+ Separated out individual ctype functions from ctype.cxx into separate
+ files
+
+ * Makefile.am, src/ctype/Makefile.am:
+ modified to reflect above deletion/additions
+
+ * Makefile.in, src/ctype/Makefile.in:
+ regenerated
+
+Thu Apr 2 19:08:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: optimise using prefix increments
+
+Thu Apr 2 15:18:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strchr.cxx: optimise setting of mask a little
+
+Thu Mar 26 14:07:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx: fixed some typos
+
+Thu Mar 26 11:58:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/eccconf/libc.h, src/support/tsd.cxx:
+ Implement workaround for tx39 compiler bug.
+
+ * src/include/strsuppt.hxx:
+ remove prototypes for _memcpy() and _memset() as they are now in the
+ kernel
+
+Wed Mar 25 18:31:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/string/Makefile.am: memcpy() and memset() are
+ now in the kernel so remove them from build
+ * include/string.h: add a comment to say as much
+ * Makefile.in, src/string/Makefile.in: regenerate
+
+Wed Mar 25 15:30:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx, src/include/file_if.inl:
+ Change _exit workaround to not cause a compiler optimisation
+ problem. Now just references _exit rather than calls it.
+
+Wed Mar 25 14:59:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fix bug causing tests to fail completely
+ for this function
+
+Wed Mar 25 12:55:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/sim.hxx: add types to constants (oops!)
+ * Makefile.am: link src/stdio/device/sim.cxx
+ * Makefile.in: regenerated
+
+Wed Mar 25 04:14:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/file_if.hxx, src/include/file_if.inl,
+ src/include/kerndiag.hxx, src/include/sim.hxx,
+ src/include/stdio_if.hxx, src/include/strngdev.hxx,
+ src/include/tsd.hxx, src/stdio/common/clearerr.cxx,
+ src/stdio/common/clearerr.cxx, src/stdio/common/feof.cxx,
+ src/stdio/common/ferror.cxx, src/stdio/common/file_if.cxx,
+ src/stdio/common/vsprintf.cxx,
+ src/stdio/device/kerndiag.cxx, src/stdio/device/sim.cxx,
+ src/stdio/device/strngdev.cxx, src/stdio/output/fputc.cxx,
+ src/stdio/output/fputs.cxx, src/stdio/output/puts.cxx,
+ src/stdio/output/vfnprintf.cxx, src/support/tsd.cxx:
+ Modified to support buffered reads including renaming
+ _EccInternalFileStruct to __EccStdioStream which is what affects
+ most of these files
+ * src/include/file_if.inl, src/stdio/common/file_if.cxx: added for
+ the above reason
+ * src/stdio/common/sscanf.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/input/Makefile.am: added to provide sscanf() functionality
+ * include/ctype.h, include/stdio.h, include/stdlib.h,
+ include/string.h, include/eccconf/libc.h, src/ctype/ctype.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/stdio/common/stdio.cxx:
+ rename *_INLINES macros with prefix CYG rather than ECC
+ * include/errno.h, src/errno/errno.cxx, src/errno/strerror.cxx:
+ rename ErrNo to _ErrNo and add EAGAIN and EWOULDBLOCK error codes
+ * configure.in, Makefile.am, src/stdio/Makefile.am,
+ src/stdio/input/Makefile.am: add support for building
+ file_if.cxx sscanf.cxx and vfscanf.cxx
+ * src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/input/Makefile.in, configure, Makefile.in: regenerated
+
+Tue Mar 24 19:51:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clockfn.cxx, src/time/clock.cxx:
+ Renamed clock.cxx to clockfn.cxx (preserving CVS history)
+ * Makefile.am, src/time/Makefile.am: updated to reflect name change
+ * Makefile.in, src/time/Makefile.in: regenerated
+
+Tue Mar 24 16:28:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl: Swap around definitions to get right order so
+ inlining works
+
+Tue Mar 24 14:43:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/stdio.h, include/stdlib.h, include/string.h:
+ modify to only conditionally include inlines
+ * src/ctype/ctype.cxx, src/stdio/common/stdio.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/ctype/Makefile.am: Add to provide real linkable alternatives
+ to inline functions
+ * Makefile.am, configure.in, src/Makefile.am,
+ src/stdio/common/Makefile.am, src/stdlib/Makefile.am,
+ src/string/Makefile.am: modified to support previous additions
+ * include/eccconf/libc.h: redefine inline macro to add extern inline,
+ and add conditional defines for inline functions. Also rename
+ space vs. speed macro to have CYG instead of ECC prefix
+ * include/stdio.inl: fix comment typo
+ * src/stdlib/qsort.cxx: fix to define inline functions properly
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/memcpy.cxx,
+ src/string/memset.cxx, src/string/strcat.cxx, src/string/strchr.cxx,
+ src/string/strcmp.cxx, src/string/strcpy.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx
+ * Makefile.in, configure, src/Makefile.in, src/ctype/Makefile.in,
+ src/stdio/common/Makefile.in, src/stdlib/Makefile.in,
+ src/string/Makefile.in: regenerate
+
+
+Mon Mar 23 19:19:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx: added to support temporary _exit
+ * include/stdlib.h, include/stdlib.inl: added support for _exit and
+ added abs(), labs(), div() and ldiv() functions
+ * src/include/file_if.hxx: added support for _exit kludge
+ * src/stdlib/qsort.cxx: Added Berkeley copyright message
+ * src/time/clock.cxx: Include correct kernel config header as
+ CYG_CONFIGURATION rather than <config.h>
+ * Makefile.am src/stdlib/Makefile.am: added support for _exit
+ * Makefile.in, src/stdlib/Makefile.in: regenerated
+
+Mon Mar 23 14:41:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Replace ECCPKG_ANSI_LIBC with CYGPKG_ANSI_LIBC in all source files
+
+Mon Mar 23 14:28:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/string.inl: add file to provide strcoll()
+ * include/string.h: include string.inl
+ * ctype.h: include ctype.inl (oops!)
+ * include/stdlib.h: include stdlib.inl (oops!)
+
+Mon Mar 23 13:30:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl: added to provide ANSI ctype
+ functionality
+ * include/stdlib.h, include/stdlib.inl, src/include/stdlibbsp.hxx,
+ src/stdlib/Makefile.am, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/stdlib/srand.cxx,
+ src/stdlib/strtol.cxx, src/stdlib/strtoul.cxx: Added to provide
+ many stdlib functions
+ * src/include/tsd.hxx: modified to support rand() random number
+ seed, and added some comments
+ * configure.in, Makefile.am, src/Makefile.am: modified to support
+ addition of above new sources
+ * include/eccconf/libc.h: Add extra helpful comments, and #include
+ kernel config file
+ * src/time/clock.cxx: #include clock.inl and fix to call
+ get_resolution() properly now
+ * Makefile.in, configure, src/Makefile.in, src/errno/Makefile.in,
+ src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.in, src/stdio/output/Makefile.in,
+ src/stdlib/Makefile.in, src/strings/Makefile.in,
+ src/support/Makefile.in, src/time/Makefile.in,
+ tests/Makefile.in: regenerated
+
+
+Sun Mar 22 21:29:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h, src/include/timesupp.hxx, src/time/clock.cxx,
+ src/time/Makefile.am: added to provide clock() function
+ * src/Makefile.am: modified to try to build in src/time directory
+ * include/eccconf/libc.h: added and is now the main configuration
+ file for this package
+ * acconfig.h, include/libcconf.h.in, include/stamp-h.in: removed
+ due to usage of libc.h above instead
+ * Almost all *.h, *.hxx and *.cxx: replaced LIBC_CONFIG_HEADER
+ defined include with simple <pkgconf/libc.h>
+ * configure.in: remove AM_CONFIG_HEADER of libcconf.h and
+ LIBC_CONFIG_HEADER definition. Also remove usage of builtin
+ memcpy() etc. from gcc, and generate src/time/Makefile
+ * Makefile.am: link in src/time/clock.o
+ * src/include/file_if.hxx, src/include/sim.hxx: use config header
+ to decide whether C library is to be used
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in: regenerated
+
+Fri Mar 20 18:08:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fixed bug with ignoring terminating NULL
+
+1998-03-20 Chris Tarpy <ctarpy@bhaji.cygnus.co.uk>
+
+ * configure: - regenerated
+ * Makefile.am: - Support added for libc testcases
+ * Makefile.in: regenerated
+ * configure.in: set c compiler, descend test dir
+ * tests/Makefile.in: added
+ * tests/Makefile.am: added
+ * tests/tcdiag.cxx : added
+
+
+Thu Mar 19 11:41:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Initial check-in of everything
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/setjmp/current/cdl/setjmp.cdl b/cesar/ecos/packages/language/c/libc/setjmp/current/cdl/setjmp.cdl
new file mode 100644
index 0000000000..ae013c94de
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/setjmp/current/cdl/setjmp.cdl
@@ -0,0 +1,115 @@
+# ====================================================================
+#
+# setjmp.cdl
+#
+# C library setjmp/longjmp related configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jlarmour
+# Contributors:
+# Date: 2000-04-14
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_LIBC_SETJMP {
+ display "ISO C library setjmp/longjmp functions"
+ description "
+ This package provides non-local jumps based on setjmp() and
+ longjmp() in <setjmp.h> as specified by the ISO C
+ standard - ISO/IEC 9899:1990."
+ doc ref/libc.html
+ include_dir cyg/libc/setjmp
+ parent CYGPKG_LIBC
+ requires CYGPKG_ISOINFRA
+ implements CYGINT_ISO_SETJMP
+ requires { CYGBLD_ISO_SETJMP_HEADER == "<cyg/libc/setjmp/setjmp.h>" }
+
+ compile longjmp.cxx
+
+# ====================================================================
+
+
+# ====================================================================
+
+ cdl_component CYGPKG_LIBC_SETJMP_OPTIONS {
+ display "C library setjmp build options"
+ flavor none
+ no_define
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_LIBC_SETJMP_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building this package. These flags are used in addition
+ to the set of global flags."
+ }
+
+ cdl_option CYGPKG_LIBC_SETJMP_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building this package. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_LIBC_SETJMP_TESTS {
+ display "C library setjmp tests"
+ flavor data
+ no_define
+ calculated { "tests/setjmp" }
+ description "
+ This option specifies the set of tests for this package."
+ }
+ }
+}
+
+# ====================================================================
+# EOF setjmp.cdl
diff --git a/cesar/ecos/packages/language/c/libc/setjmp/current/include/setjmp.h b/cesar/ecos/packages/language/c/libc/setjmp/current/include/setjmp.h
new file mode 100644
index 0000000000..ab88b7fbac
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/setjmp/current/include/setjmp.h
@@ -0,0 +1,92 @@
+#ifndef CYGONCE_LIBC_SETJMP_H
+#define CYGONCE_LIBC_SETJMP_H
+/*===========================================================================
+//
+// setjmp.h
+//
+// ISO C standard non-local jumps
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose:
+// Description: Header file to implement ISO C standard non-local jumps as
+// per ISO C para 7.6
+// Usage: #include <setjmp.h>
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/libc_setjmp.h> /* Configuration header */
+
+/* INCLUDES */
+
+#include <cyg/hal/hal_arch.h> /* HAL architecture specific implementation */
+
+/* TYPE DEFINITIONS */
+
+/* jmp_buf as per ANSI 7.6. This is simply the underlying HAL buffer */
+
+typedef hal_jmp_buf jmp_buf;
+
+/* MACROS */
+
+/* setjmp() function, as described in ANSI para 7.6.1.1 */
+#define setjmp( __env__ ) hal_setjmp( __env__ )
+
+/* FUNCTION PROTOTYPES */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* longjmp() function, as described in ANSI para 7.6.2.1 */
+extern void
+longjmp( jmp_buf, int ) CYGBLD_ATTRIB_NORET;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* CYGONCE_LIBC_SETJMP_H multiple inclusion protection */
+
+/* EOF setjmp.h */
diff --git a/cesar/ecos/packages/language/c/libc/setjmp/current/src/longjmp.cxx b/cesar/ecos/packages/language/c/libc/setjmp/current/src/longjmp.cxx
new file mode 100644
index 0000000000..3fa37ba370
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/setjmp/current/src/longjmp.cxx
@@ -0,0 +1,102 @@
+//===========================================================================
+//
+// longjmp.cxx
+//
+// ISO C standard longjmp() function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose:
+// Description: Implements ISO standard non-local jump function longjmp()
+// per ISO C para 7.6.2.1. This is the "real" alternative to
+// the inline version of longjmp()
+//
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_setjmp.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Common tracing code
+#include <cyg/infra/cyg_ass.h> // Common assertion code
+#include <cyg/hal/hal_arch.h> // HAL architecture specific implementation
+
+// We don't want the inline version of longjmp() defined here
+#ifdef CYGIMP_LIBC_SETJMP_INLINES
+# undef CYGIMP_LIBC_SETJMP_INLINES
+#endif
+
+#include <setjmp.h> // Header for setjmp/longjmp
+
+
+// FUNCTIONS
+
+void
+longjmp( jmp_buf cyg_buf, int cyg_val)
+{
+ CYG_REPORT_FUNCNAME( "longjmp" );
+ CYG_REPORT_FUNCARG2( "&cyg_buf=%08x, cyg_val=%d", &cyg_buf, cyg_val );
+
+ // ANSI says that if we are passed cyg_val==0, then we change it to 1
+ if (cyg_val == 0)
+ ++cyg_val;
+
+ // we let the HAL do the work
+
+ HAL_REORDER_BARRIER(); // prevent any chance of optimisation re-ordering
+ hal_longjmp( cyg_buf, cyg_val );
+ HAL_REORDER_BARRIER(); // prevent any chance of optimisation re-ordering
+
+#ifdef CYGDBG_USE_ASSERTS
+ CYG_ASSERT( 0, "longjmp should not have reached this point!" );
+#else
+ for (;;)
+ CYG_EMPTY_STATEMENT;
+#endif
+} // longjmp()
+
+// EOF longjmp.cxx
diff --git a/cesar/ecos/packages/language/c/libc/setjmp/current/tests/setjmp.c b/cesar/ecos/packages/language/c/libc/setjmp/current/tests/setjmp.c
new file mode 100644
index 0000000000..60756bd2d1
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/setjmp/current/tests/setjmp.c
@@ -0,0 +1,232 @@
+//===========================================================================
+//
+// setjmp.c
+//
+// Tests for ANSI standard setjmp() and longjmp() functions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose:
+// Description: Contains test code for C library setjmp() and longjmp()
+// functions
+// The ANSI standard allows setjmp calls to be used ONLY in the
+// forms:
+// while (setjmp (jumpbuf))
+// while (setjmp (jumpbuf) < 42)
+// while (!setjmp (jumpbuf))
+// setjmp (jumpbuf);
+// result = setjmp(jumpbuf);
+//
+// Or "while" can also be "if" or "switch" or the implicit
+// while of "for".
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// INCLUDES
+
+#include <cyg/infra/testcase.h> // Test infrastructure header
+#include <setjmp.h> // Header for what we're testing
+
+// GLOBALS
+
+static jmp_buf jbuf, jbuf2, jbuf3;
+
+
+// FUNCTIONS
+
+static int
+test_fun( void )
+{
+ volatile int i=0; // add something to the stack to confuse things
+
+ longjmp( jbuf, 5 );
+ i+=5;
+
+ return i;
+} // test_fun();
+
+
+int
+main( int argc, char *argv[] )
+{
+ static int static_i=0; // temporary variable
+ int j=0; // ditto
+ volatile int vol_k=0, vol_l=0; // ditto
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "setjmp()/longjmp() functions");
+
+ // Test 1
+ if ( setjmp(jbuf) == 0 )
+ {
+ static_i=1;
+ longjmp(jbuf, 1);
+ static_i=2;
+ } // if
+
+ CYG_TEST_PASS_FAIL( static_i==1, "Simple test 1" );
+
+ // Test 2
+ j=2;
+
+ if ( !setjmp(jbuf) )
+ {
+ static_i=3;
+ longjmp(jbuf, 1);
+ static_i=4;
+ j=3;
+ } // if
+
+ CYG_TEST_PASS_FAIL( (static_i==3) && (j==2), "Simple test 2" );
+
+ // Test 3
+
+ static_i=0;
+ switch (setjmp(jbuf))
+ {
+ case 0:
+ static_i++;
+ if (static_i!=1)
+ CYG_TEST_FAIL("Test of value passed to longjmp()");
+ else
+ longjmp(jbuf, 5);
+ break;
+ case 5:
+ static_i++;
+ CYG_TEST_PASS_FAIL( (static_i==2),"Test of value passed to longjmp()");
+ break;
+ default:
+ CYG_TEST_FAIL( "Test of value passed to longjmp()");
+ break;
+ } // switch
+
+ // Test 3
+
+ static_i=0;
+ switch (setjmp(jbuf))
+ {
+ case 0:
+ static_i++;
+ if (static_i!=1)
+ CYG_TEST_FAIL("Test of value passed to longjmp() being 0");
+ else
+ longjmp(jbuf, 0);
+ break;
+ case 1:
+ static_i++;
+ CYG_TEST_PASS_FAIL( (static_i==2),
+ "Test of value passed to longjmp() being 0");
+ break;
+ default:
+ CYG_TEST_FAIL( "Test of value passed to longjmp() being 0");
+ break;
+ } // switch
+
+
+ // Test 4
+
+ vol_k=0;
+ static_i=0;
+ setjmp( jbuf );
+
+ static_i++;
+ setjmp( jbuf2 );
+
+ static_i++;
+ setjmp( jbuf3 );
+
+ if (vol_k==0)
+ {
+ vol_k++;
+ longjmp( jbuf2, 1 );
+ }
+ else
+ {
+ CYG_TEST_PASS_FAIL( (vol_k==1) && (static_i==3), "Multiple setjmp's" );
+ }
+
+ // Test 5
+
+ vol_k=3;
+ if ( (j=setjmp(jbuf)) == 0 )
+ {
+ volatile int l; // put something extra on the stack to confuse things
+
+ vol_k++;
+ l=test_fun();
+ l++;
+ vol_k=l;
+ } // if
+
+ CYG_TEST_PASS_FAIL( (j==5) && (vol_k==4), "longjmp from a function" );
+
+ // Test 6
+
+ vol_k=0;
+
+ vol_l=setjmp(jbuf);
+
+ vol_k += 3;
+
+ if (!vol_l)
+ test_fun();
+
+ vol_l=setjmp(jbuf);
+
+ vol_k += 7;
+
+ if (!vol_l)
+ test_fun();
+
+ CYG_TEST_PASS_FAIL ( (vol_k == 20), "Repeated longjmps from a function" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "setjmp()/longjmp() functions");
+
+} // main()
+
+// EOF setjmp.c
diff --git a/cesar/ecos/packages/language/c/libc/signals/current/ChangeLog b/cesar/ecos/packages/language/c/libc/signals/current/ChangeLog
new file mode 100644
index 0000000000..a7a6729bcf
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/signals/current/ChangeLog
@@ -0,0 +1,106 @@
+2003-06-26 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * include/signal.h: Remove unused definitions that had been used
+ for embryonic POSIX signals support.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/signals.cdl: Fix doc link.
+
+2003-02-13 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * include/signal.inl (raise): Use if/else rather than switch to
+ avoid GCC 3.2 bug.
+
+2002-05-23 Jesper Skov <jskov@redhat.com>
+
+ * cdl/signals.cdl: Don't build signal2 test when it'll N/A
+ anyway.
+
+2002-04-30 Jesper Skov <jskov@redhat.com>
+
+ * cdl/signals.cdl: Added
+ CYGPKG_LIBC_SIGNALS_TESTS_SIGNAL2_TEST3_SKIP.
+ Removed again.
+
+ * tests/signal2.c: Instead check for
+ CYGNUM_HAL_EXCEPTION_FPU_DIV_BY_ZERO to decide if test3 is
+ appropriate.
+
+2001-05-02 Nick Garnett <nickg@cygnus.co.uk>
+
+ [x86 branch]
+ * tests/signal2.c (cause_memerror): Added code for I386
+ architecture to provoke General Protection Fault.
+
+2001-04-27 Bart Veer <bartv@redhat.com>
+
+ * tests/signal2.c (main):
+ The FPE test is applicable to the updated synthetic target.
+
+2001-04-17 Bart Veer <bartv@redhat.com>
+
+ * cdl/signals.cdl:
+ Synthetic target now supports exceptions
+
+2000-09-14 Jesper Skov <jskov@redhat.com>
+
+ * tests/signal/signal2.c: Prevent that GCC optimizes away the
+ cause_fpe call.
+
+2000-09-07 Jesper Skov <jskov@redhat.com>
+
+ * tests/signal2.c: Fix compiler warning. Also reset FPU exception
+ vectors. Check for SH7708, not EDK7708 in test3 skip code.
+ * tests/signal1.c: Fix compiler warning.
+
+2000-05-16 Jesper Skov <jskov@redhat.com>
+
+ * tests/signal2.c: Also reset DIV_BY_ZERO vector.
+
+2000-05-08 Jesper Skov <jskov@redhat.com>
+
+ * tests/signal2.c: Skip test3 on SH7709A.
+
+2000-05-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * New package
+ Separated original libc out into separate packages on functional
+ boundaries.
+ Header files are now managed by isoinfra package
+ Plenty of cleanups done, but no major functionality changes
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/signals/current/ChangeLog.libc b/cesar/ecos/packages/language/c/libc/signals/current/ChangeLog.libc
new file mode 100644
index 0000000000..88fb2f11f2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/signals/current/ChangeLog.libc
@@ -0,0 +1,2736 @@
+This ChangeLog file is now obsolete. This is the original ChangeLog from when
+libc was one large package, before being separated. It is included for
+historical reasons.
+
+2000-04-05 Jesper Skov <jskov@redhat.com>
+
+ * src/time/settime.cxx:
+ * src/time/time.cxx:
+ Wallclock moved to io/.
+
+2000-03-28 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/string.cdl,
+ cdl/stdlib.cdl,
+ cdl/stdio.cdl,
+ cdl/libc.cdl:
+
+ Adjust documentation URLs.
+
+2000-03-27 Jesper Skov <jskov@redhat.com>
+
+ * src/clibincl/stream.inl (check_this): Use cyb_bool instead of bool.
+
+2000-03-06 Jesper Skov <jskov@redhat.com>
+
+ * tests/time/strftime.c (test): Adjust test to match below change.
+
+2000-03-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/time/strftime.cxx (do_format): Make sure %m counts from
+ 1..12 rather than 0..11. Fix for case 103300
+
+2000-02-29 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: Correctly use 'n' parameter to
+ restrict length. Credit due to Andrew Lunn here as well.
+ Resolves 103057-CR-1
+
+ * tests/stdio/sprintf2.c (test):
+ Add snprintf tests to verify the correct behaviour of restricting
+ output length
+
+2000-02-10 Jesper Skov <jskov@redhat.com>
+
+ * tests/signal/signal2.c (main):
+ Also reclaim DATA_TLB_MISS vector if available.
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+
+1999-11-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * cdl/string.cdl:
+ Switch to a single boolean configuration option for code size vs.
+ speed optimization.
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl: Define tests.
+
+1999-10-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: We can now remove Berkeley
+ advertising clause
+ * src/stdlib/div.cxx: ditto
+ * src/stdlib/ldiv.cxx: ditto
+ * src/stdlib/strtol.cxx: ditto
+ * src/stdlib/strtoul.cxx: ditto
+ * src/string/strtok.cxx: ditto
+
+1999-10-19 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl:
+
+ Define CDL options for package-specific CFLAGS.
+
+1999-10-08 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_THREAD_PRIORITY): Change
+ default to 10 to keep test farm happy
+ * cdl/startup.cdl: Likewise
+
+1999-10-07 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Specify radio buttons using CDL interfaces.
+
+1999-10-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * cdl/stdio.cdl: Change default to /dev/ttydiag as per 1999-10-01
+ change below
+ * cdl/startup.cdl: Add new form CDL for the startup changes as
+ per 1999-10-05
+
+1999-10-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/libc.h: Add CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM to allow
+ the user to supply their own stack.
+ Rename CYGNUM_LIBC_MAIN_STACK_SIZE to
+ CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE and reparent under
+ CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM
+ Add CYGNUM_LIBC_MAIN_THREAD_PRIORITY to provide main() thread
+ priority
+
+ * src/support/mainthread.cxx: Add support for user-supplied stack
+ Allow user to specify thread priority
+
+ These changes fix CR 101069
+
+1999-10-01 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE): Change
+ default to /dev/ttydiag to get correct console-like behaviour
+ Also don't preclude use if haldiag package isn't included
+ (case 102065)
+
+1999-09-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (cause_fpe): Try both float and integer
+ division by zero.
+
+1999-09-10 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx (cyg_libc_get_malloc_pool): Added for
+ stress_threads test.
+
+1999-09-07 Jesper Skov <jskov@cygnus.co.uk>
+ PRs 20243, 20433
+ * tests/signal/signal2.c: Disabled test3 on ARM.
+
+1999-09-02 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/assert.h: Make the sense of NDEBUG correct; it is "set"
+ when NOT debugging. Fix for CR 101983-CR-1
+ See Stroustrup, "The C++ Programming Language."
+
+1999-08-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen): Set buffer size 0 when not
+ buffering
+ Fix for case 101868
+
+1999-08-17 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Implement radio buttons using "FIXME radio" hack in
+ description field for now.
+
+1999-08-12 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl:
+ Take advantage of MACRONAME_ENUMVAL macros output by CDL.
+
+1999-08-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf2.c (test): Don't rely on 2.345 being exactly
+ representable in binary as a difference of 1 ulp will make it round
+ the wrong way.
+
+1999-07-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fgetc.cxx:
+ Include outline versions of getc() (actually just a symbol alias for
+ fgetc() ) and getchar()
+ Some minor clean-ups
+ Add tracing/assertions
+
+ * src/stdio/input/fputc.cxx:
+ Likewise (except applied to putc() and putchar())
+
+ * src/stdio/common/stdioinlines.cxx (_puts):
+ Call fputc() not _fputc()
+
+ * src/clibincl/stdiosupp.hxx:
+ Remove now obsolete prototypes for _fgetc() and _fputc()
+
+ * include/stdio.h:
+ Don't bother with getc()/putc() macros any more, just call
+ them as functions
+ Include protos for getc(), putc(), getchar() and putchar() functions
+
+1999-06-21 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for SH EDK7708.
+
+1999-06-11 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h: Make FILEs array types so they won't be
+ given $gp relocations on MIPS targets
+
+1999-05-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/ctime.c: Fixed compiler warning.
+
+1999-05-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main):
+ Update CYGPKG_HAL_TX39 -> CYGPKG_HAL_MIPS_TX39 due to recent MIPS
+ HAL changes
+ Fix for PR 20116
+
+1999-04-30 Jesper Skov <jskov@lassi.cygnus.co.uk>
+ PR 19945/19946 workaround
+ * tests/signal/signal2.c: Disabled test 3 for PowerPC sim.
+
+1999-04-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl:
+ Ensure all calls to cyg_libc_time_year_is_leap() are with the full
+ year, and not the direct contents of a struct tm, which are (year-1900)
+
+1999-04-19 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19308, 19410, 19528
+ * tests/time/clock.c (test): Also disable data cache which may
+ affect timing when tracing/assertions are enabled.
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ Add prototype for new cyg_libc_stdio_flush_all_but() function
+
+ * src/clibincl/stream.hxx:
+ Don't include stdiosupp.hxx any more to prevent circular dependency,
+ therefore manually provide _setvbuf prototype
+ Make sure pkgconf/kernel.h is included before mutex.hxx
+
+ * src/clibincl/stream.inl (Cyg_StdioStream::set_error()):
+ Add missing unlock_me()
+
+ * src/stdio/common/fflush.cxx:
+ Separate most of code for fflush(NULL) into separate
+ cyg_libc_stdio_flush_all_but() function, which has the extra
+ capability of omitting one stream
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Add missing clibincl/stdiosupp.hxx include
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::read()):
+ When reading, ensure we flush all output streams
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::flush_output_unlocked):
+ Flush the device as well
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * src/clibincl/streambuf.inl:
+ * src/clibincl/streambuf.hxx:
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ * include/pkgconf/libc.h:
+ * include/stdio.inl (setbuf):
+ Fix dumb typo: BUFSIZE -> BUFSIZ
+ This fixes PR19837
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * include/stdio.inl (setbuf):
+ Use _IONBF when buf==NULL, and _IOLBF otherwise.
+ Fix for PR 19836
+
+1999-04-15 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Tidy display string capitalization.
+
+1999-04-12 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Clarify CDL description of CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE
+
+ * tests/signal/signal2.c: Try harder to generate an exception by
+ accessing a misaligned address
+ Don't handle SIGTRAP any more
+ Part of fix for PRs 19731/19607
+
+1999-04-07 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19667
+ * src/support/mainthread.cxx:
+ Changed to use the new Cyg_Thread constructor.
+
+1999-04-07 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Use new macro
+ HAL_VSR_SET_TO_ECOS_HANDLER if defined, to wrest control from
+ CygMon, for example, by reinstalling eCos' default VSRs for
+ exceptions that we are provoking.
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx: Include stdlib.h for exit()
+ Fix for PR 19720
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/clock.c (test): Disable instruction cache
+ Hopefully fixes PR 19308
+
+1999-03-29 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for PPC as it cannot
+ trap division by zero.
+
+1999-03-26 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/main.cxx (main): Invoke cyg_user_start() if no kernel
+ Only sensible thing to do in our default main in a non-kernel config
+
+1999-03-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/time.c:
+ Increase MAX_TIMEOUT since the sparclite gets very close to overrunning
+ it even when working.
+ Should return -1 iff CYGSEM_LIBC_TIME_TIME_WORKING isn't defined
+ Cosmetic changes
+
+1999-03-25 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/time/time.c (test): Take into account setting of
+ CYGSEM_LIBC_TIME_SETTIME_WORKING ie. does cyg_libc_time_settime()
+ work? If not, check that it returns an error.
+ This was exposed by the random combo in PR#19479.
+
+1999-03-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1 to
+ CYGIMP_...
+
+ Add another rand implementation CYGIMP_LIBC_RAND_SIMPLE1 which is
+ the default
+
+ Part of fix for PR 19562
+
+ * include/sys/cstartup.h:
+ Tidy and remove unnecessary dependencies
+
+ * src/stdlib/rand.cxx:
+ Rename algorithms from CYGSEM_... to CYGIMP_...
+ Add new "simple1" algorithm
+
+ * tests/ctype/ctype.c:
+ Tidy
+
+ * tests/stdlib/rand3.c:
+ Fix so that 0..RAND_MAX is split evenly over buckets, which it wasn't
+ before
+ Deal with case of RAND_MAX not being divisible by NUM_BUCKETS
+ exactly
+ Increase TEST_LENGTH to 200000 to provide more representative sample
+ Add CYG_TEST_INFO output to help ensure it doesn't time out
+ Tidy
+
+ * tests/stdlib/rand4.c:
+ Only fail if more than _two_ thirds (rather than one third) match.
+ This is because half would match for a perfectly random distribution
+ This is the rest of the fix for PR 19562
+ Cosmetic changes
+
+1999-03-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/mainthread.cxx (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ Use CYGNUM_HAL_STACK_SIZE_TYPICAL for the stack size instead of
+ CYGNUM_HAL_MINIMUM_STACK_SIZE.
+
+1999-03-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak: Add -Wno-format when building strftime otherwise
+ it generates warnings for things that we do want to test (null
+ string, and %y format)
+
+1999-03-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Put brackets back round negative number since sdf says the config
+ tool is fixed now (PR 19537)
+
+ Add new CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1
+ options for different rand() algorithms in a so far failed attempt
+ to fix PR 19562
+
+ * src/stdlib/rand.cxx:
+ Add new optional algorithm from Knuth vol.2
+
+ * tests/stdlib/rand4.c:
+ Some tidies
+ Don't run test when using simplest algorithm
+
+ * tests/signal/signal2.c (main):
+ Don't try to make an FPE on tx39 - its possible to detect but requires
+ too much HAL work to be sensible
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Use HAL_ENABLE_INTERRUPTS() rather than kernel to enable interrupts
+
+1999-03-18 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/PKGconf.mak (TESTS): added rand4 compilation.
+
+ * tests/stdlib/rand4.c: added this test for periodicity in the
+ least significant bit of rand().
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Remove CYGFUN_LIBC_TIME_POSIX dependency
+ on CYGPKG_LIBC_STDIO
+
+ * src/stdlib/itoa.cxx:
+ New file to convert integers to ascii
+
+ * include/stdlib.h:
+ Add proto for new cyg_libc_itoa() function
+
+ * include/time.inl:
+ Rework __asctime_r() to use memcpy() and cyg_libc_itoa() rather than
+ sprintf()
+
+ * src/PKGconf.mak:
+ Build stdlib/itoa.cxx
+
+ The above changes fix PR 19448
+
+1999-03-17 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h: Add #define of __time_t_defined to placate newlib
+ if it is used by accident. This is just a temporary workaround though.
+
+1999-03-16 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/PKGconf.mak: Add compile option to step around ARM compiler bug.
+
+1999-03-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Don't use parentheses for now
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Silence bogus compiler warning
+
+1999-03-16 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Enable SIGSEGV test for
+ i386/Linux.
+
+
+1999-03-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Only enable interrupts if they were disabled
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx:
+ Add FIX ME line as a reminder that the workaround there can go away
+ in future
+
+ * include/pkgconf/libc.h:
+ Add proper define for CYGSEM_LIBC_EXIT_CALLS_FFLUSH
+ Put brackets round negative CYGNUM_LIBC_TIME_DST_DEFAULT_STATE define
+ Fix run time typo
+
+ * include/time.inl (__localtime_r):
+ Include sys/timeutil.h before this to get
+ cyg_libc_time_normalize_structtm()
+
+1999-03-12 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx: Remove 'const' from char arrays since
+ this fails [silently] on ARM when -fwritable-strings (PR19440)
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Compiler warnings fix was
+ slightly broken.
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c (main):
+ Disabling SIGTRAP handling on i386/Linux is not a good idea.
+1999-03-11 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c:
+ Added compiler warnings fix.
+ Added N/A handling for i386/Linux.
+
+1999-03-10 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Force "haldiag" device to be present.
+ 'asctime' and friends need 'stdio' as well.
+
+ * include/time.inl: Fix syntax error on difftime() declaration.
+
+1999-03-08 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx: <cyg/infra/cyg_ass.h> needed for this file.
+
+ * src/stdio/common/vsscanf.cxx (str_read): Fix problem with string
+ pointer [created by merge with new I/O package].
+
+1999-03-05 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add legal values for CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET
+ and CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET.
+
+1999-03-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl (cyg_libc_time_year_is_leap):
+ Fix bug with modulo year 400
+ Fix typo in asctime_r macro
+ Fix gmtime_r, and mktime as a result of testing
+
+ * tests/time/asctime.c, tests/time/ctime.c, tests/time/gmtime.c,
+ tests/time/gmtime.c, tests/time/localtime.c, tests/time/mktime.c,
+ tests/time/strftime.c, tests/time/time.c:
+ New tests
+
+ * tests/PKGconf.mak:
+ Build above new tests
+
+ * include/pkgconf/libc.h:
+ Add reminder FIX ME about extra config option
+
+ * src/time/strftime.cxx:
+ Fix %w and %Y parameters as a result of testing
+
+ * src/time/timeutil.cxx:
+ Fix cyg_libc_time_normalize_structtm() as a result of testing
+ of mktime()
+
+ * tests/time/clock.c:
+ Reformat, remove obsolete bits and tidy
+
+ * include/time.h:
+ Add Cyg_libc_time_dst type and new functions
+ cyg_libc_time_setzoneoffsets(), cyg_libc_time_setdst(),
+ cyg_libc_time_getzoneoffsets(), cyg_libc_time_settime()
+
+ * include/time.inl:
+ Implement the above functions. This allows us to adjust for timezone
+ diffences and set the time.
+ Change localtime() to adjust for STD/DST
+ Change mktime() to adjust for STD/DST
+
+ * include/libc.h:
+ Add new config options CYGSEM_LIBC_TIME_SETTIME_WORKING
+ and component CYGPKG_LIBC_TIME_ZONES containing options
+ CYGNUM_LIBC_TIME_DST_DEFAULT_STATE,
+ CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET,
+ CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET
+
+ * src/strftime.cxx:
+ Adjust handling of %Z to _not_ deal with STD/DST
+
+ * src/time/settime.cxx:
+ New file to implement cyg_libc_time_settime()
+
+ * src/PKGconf.mak:
+ Build settime.cxx
+
+ * src/time/timeutil.cxx:
+ Supply outline versions of cyg_libc_time_setzoneoffsets(),
+ cyg_libc_time_setdst(), and cyg_libc_time_getzoneoffsets()
+ Add variables for STD/DST state
+ Some minor comment changes
+
+ * include/errno.h:
+ Use CYGBLD_ATTRIB_CONST instead of __attribute__((const)) directly
+
+ * include/signal.h:
+ Change format of function comment headers
+
+ * include/signal.inl:
+ Restrict errno.h inclusion to when its actually used
+ Fix a spelling typo
+
+ * include/stdlib.h:
+ Add CYGBLD_ATTRIB_CONST to abs, div, labs, ldiv
+
+ * include/stdlib.inl:
+ Reformat and tidy
+ Include new versions of div and ldiv which are more portable and
+ are cleanly rewritten so aren't covered by the BSD licence, which
+ is now removed
+
+ * src/stdlib/div.cxx, src/stdlib/ldiv.cxx:
+ Non-inline, non-BSD and portable versions of the new versions of div
+ and ldiv from stdlib.inl
+
+ * include/time.h:
+ Much reformatting, tidying and improving comments
+ Change CLOCKS_PER_SEC from 1000 to 1000000
+ Add new functions asctime_r, ctime_r, gmtime_r, localtime_r, clock,
+ difftime, mktime, time, asctime, ctime, gmtime, localtime, strftime
+ Include new time.inl file
+
+ * include/pkgconf/libc.h:
+ Add new options CYGSEM_LIBC_TIME_CLOCK_WORKING,
+ CYGSEM_LIBC_TIME_TIME_WORKING, CYGFUN_LIBC_TIME_POSIX,
+ CYGNUM_LIBC_TIME_CLOCK_TRACE_LEVEL, CYGIMP_LIBC_TIME_ASCTIME_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_INLINE, CYGIMP_LIBC_TIME_DIFFTIME_INLINE,
+ CYGIMP_LIBC_TIME_GMTIME_INLINE, CYGIMP_LIBC_TIME_LOCALTIME_INLINE,
+ CYGIMP_LIBC_TIME_MKTIME_INLINE, CYGIMP_LIBC_TIME_ASCTIME_R_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_R_INLINE, CYGIMP_LIBC_TIME_GMTIME_R_INLINE,
+ and CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE
+
+ * time/asctime.cxx, time/asctime_r.cxx, time/clock.cxx, time/ctime.cxx,
+ time/ctime_r.cxx, time/difftime.cxx, time/gmtime.cxx,
+ time/gmtime_r.cxx, time/localtime.cxx, time/localtime_r.cxx,
+ time/mktime.cxx, time/strftime.cxx, time/time.cxx, time/timeutil.cxx,
+ include/time.inl:
+ New files to implement the new time functions. Many of them simply
+ provide the outline definitions, but the real body of the function
+ comes from time.inl
+
+ * src/PKGconf.mak:
+ Build new .cxx files
+
+ * src/clibincl/stdlibsupp.hxx:
+ Remove _div and _ldiv prototypes since they're no longer needed
+
+ * src/clibincl/timesupp.hxx:
+ Delete as its now obsolete
+
+ * src/time/clock.cxx:
+ Use new CYGSEM_LIBC_TIME_CLOCK_WORKING option to control whether it
+ just returns (clock_t)-1 or not.
+ Much reformatting and tidying
+ Change real imlpementation from _clock to __clock
+ Use CYGBLD_ATTRIB_WEAK_ALIAS now
+
+ * tests/stdlib/div.c, tests/stdlib/ldiv.c:
+ Add some extra tests for handling of negative numbers
+ Reformat and tidy a bit, including removing the test for CYGPKG_LIBC
+ since its now always defined if the test is to be compiled
+
+ * tests/time/clock.c:
+ Remove duplication CYG_TEST_INFO line
+ Check if unimplemented using "(clock_t)-1" and not just "-1"
+
+1999-03-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx:
+ Make sure system() is a weak alias for __system()
+
+ * include/pkgconf/libc.h: Rework CDL description for
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE and change its default to
+ "/dev/haldiag"
+
+ * src/stdio/common/stream.cxx:
+ Check that dev is valid when passed to stream constructor
+
+ * src/stdio/common/stdiosupp.cxx:
+ Tidy
+
+ * src/support/mainthread.cxx: Make this depend on
+ CYGSEM_LIBC_STARTUP_MAIN_THREAD rather than just CYGPKG_KERNEL
+
+1999-03-04 Gary Thomas <gthomas@cygnus.co.uk>
+
+ Merged in changes from 'ecos-new_devs-19990216-branch'
+
+ (1999-02-24 Jonathan Larmour <jlarmour@cygnus.co.uk>)
+
+ * src/stdio/common/stream.cxx:
+ Add "fix me" comments and remove a couple of commented out lines
+
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Revert to using pointer to string for private data, not just string.
+ This preserves the state across multiple calls
+
+ (1999-02-24 Gary Thomas <gthomas@cygnus.co.uk>)
+
+ * src/stdio/common/vsscanf.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/stream.cxx:
+ * src/stdio/common/stdiosupp.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/clibincl/stream.inl:
+ * src/clibincl/stream.hxx:
+ * src/clibincl/stdiosupp.hxx:
+ * include/pkgconf/libc.h: Changes for new I/O system.
+
+1999-03-03 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atexit.c: Forgot to config atexit test for
+ CYGFUN_LIBC_ATEXIT option
+
+ * include/pkgconf/libc.h:
+ Require CYGVAR_KERNEL_THREADS_DATA for CYGSEM_LIBC_PER_THREAD_STRTOK
+ This fixes PR 19362
+ Require CYGPKG_KERNEL for thread safe streams
+ Also don't need "requires CYGPKG_KERNEL" for per-thread rand and errno
+ if we already require a finer granularity kernel option
+
+1999-02-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Fix CYGNUM_LIBC_MAIN_STACK_SIZE by changing
+ CYGPKG_LIBC_STARTUP_MAIN_THREAD -> CYGSEM_LIBC_STARTUP_MAIN_THREAD
+ Fix for PR 19304
+
+1999-02-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx: Add to implement trivial system() call
+ * include/stdlib.h: Add system() prototype
+ * src/PKGconf.mak: Build system.cxx
+
+ * tests/ctype/ctype.c, tests/i18n/setlocale.c, tests/setjmp/setjmp.c,
+ tests/signal/signal1.c, tests/signal/signal2.c,
+ tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdio/stdiooutput.c, tests/stdlib/atexit.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/getenv.c, tests/stdlib/labs.c,
+ tests/stdlib/ldiv.c, tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/realloc.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+ Use CYG_TEST_NA() macro for non-applicable test configurations
+
+1999-02-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/signal.h:
+ * include/signal.inl:
+ * src/signal/raise.cxx:
+ * src/signal/siginit.cxx:
+ * src/signal/signal.cxx:
+ * tests/signal/signal1.c
+ * tests/signal/signal2.c:
+ New files to implement ISO standard signals
+
+ * src/PKGconf.mak (TESTS):
+ * tests/PKGconf.mak (TESTS):
+ Update to build new files above
+
+ * include/stdlib.h:
+ * src/clibincl/stdlibsupp.hxx:
+ Comment and QA changes (including giving better names to some types)
+
+ * include/libc.h:
+ Add new configuration options for signals
+ Add new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+ Add a note to CYGNUM_LIBC_MAIN_STACK_SIZE option that it may be
+ overriden by HAL
+ Add new CYGFUN_LIBC_ATEXIT option and move ...ATEXIT_HANDLERS under
+ it
+ Add new CYGSEM_LIBC_EXIT_CALLS_FFLUSH option
+ Require CYGSEM_LIBC_STARTUP_MAIN_THREAD for "Invoke default static
+ constructors" option
+
+ * src/stdlib/atexit.cxx:
+ Support above CYGFUN_LIBC_ATEXIT and QA changes
+
+ * src/stdlib/exit.cxx:
+ Support for above new libc.h options, and some QA changes
+
+ * src/support/cstartup.cxx:
+ Add support for new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+
+ * src/support/mainthread.cxx:
+ Override main stack size if the HAL has a minimum
+
+ * src/string/strncpy.cxx:
+ Use improved algorithm for aligned copies - imported from newlib
+ QA changes
+
+ * src/stdlib/abort.cxx:
+ Support raise(SIGABRT), and some QA
+
+ * include/errno.h:
+ Add const attribute
+
+ * tests/stdlib/abs.c:
+ QA improvements
+
+1999-02-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Only define cyg_libc_main_thread when
+ the kernel is around.
+
+1999-02-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/clock.c: Joined the two test/NOP checks into
+ one.
+ Increased tolerance in attempt to fix PRs 18737,18787,18846.
+ Fixed typo.
+
+1999-01-28 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ * src/stdlib/rand.cxx:
+ Include <pkgconf/kernel.h> if we use kernel header files
+
+1999-01-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c (test):
+ CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT should be
+ CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT
+ Fix for PR 18786
+
+ * src/string/strtok.cxx:
+ * src/stdio/common/stdiofiles.cxx:
+ * src/errno/errno.cxx:
+ * src/stdlib/rand.cxx:
+ Give mutex protection objects a libc constructor priority
+
+ * src/support/invokemain.cxx:
+ Add prototype for cyg_hal_invoke_constructors()
+
+ * src/support/mainthread.cxx:
+ Give cyg_libc_dummy_constructor_obj a libc constructor priority,
+ and make its class have a public constructor
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/stdin.cxx:
+ Give cyg_libc_stdio_stdin/out/err static objects a libc constructor
+ priority
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ Remove private copy constructor. Needed to make prioritised
+ static constructors work. Fix for PR 18898
+
+1999-01-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx:
+ Include pkgconf/kernel.h otherwise it fails with per-thread errno
+ enabled
+
+ * include/pkgconf/libc.h:
+ Enable per-thread errno by default since that is what POSIX would
+ want
+
+ * tests/time/clock.c (test):
+ Placate compiler by initializing clock_first/second/third anyway,
+ even though they won't be in practice. This is only a test program
+ so adding an extra instruction doesn't matter.
+
+ * src/i18n/locale.cxx (_setlocale):
+ Placate compiler, since it is dumb, by nesting, not serializing, if's
+ This is an idempotent change, but screws up the formatting :-(.
+
+ * src/string/strpbrk.cxx (_strpbrk):
+ Change while loop to do loop to placate compiler. It'll even save an
+ instruction too (wow!)
+
+1999-01-22 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add closing curly brace to CYGPKG_LIBC_STRING_STRTOK definition
+
+1999-01-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h:
+ Tidy up and add to header description
+ Change cyg_get_errno_p() to cyg_libc_get_errno_p()
+ Remove ifdef CYGPKG_LIBC
+
+ * include/sys/file_if.h:
+ Remove - move contents to stdio.h
+
+ * include/stdio.h:
+ Tidy up header description
+ Move FILE typedef here from sys/file_if.h
+ SEEK_SET, SEEK_CUR, SEEK_END defined to 0, 1, 2 respectively
+ for backwards compatibility with old UNIX
+ Change definitions of stdin/out/err to be addresses of FILE
+ globals - even though they're actually Cyg_StdioStream it'll work
+
+ * include/pkgconf/libc.h:
+ Make CYGPRI_LIBC_WEAK et al macros depend on new ones in infra
+ Reorganise trace options under the individual components they are
+ associated with.
+ Reorganise thread-safety options under the individual components
+ they are associated with.
+ Add new CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS option
+ Misc. reformatting
+ Remove dependency on pkgconf/kernel.h - Configuration Tool will
+ generate check macros anyway.
+ Remove CYGPKG_LIBC_TRACE, CYGFUN_LIBC_strtok, CYGPKG_LIBC_RAND
+ options
+ Tidy up description header
+
+ * src/clibincl/clibdata.hxx:
+ * src/clibincl/clibdata.inl:
+ * src/support/clibdata.cxx:
+ Remove and instead rely on each component to initialise its own data
+
+ * src/clibincl/stdiofiles.hxx, src/clibincl/stdiofiles.inl:
+ New files to contain global file list and lock (if applicable).
+ Implemented as class with member access functions
+
+ * src/errno/errno.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Rename cyg_get_errno_p() to cyg_libc_get_errno_p()
+
+ * src/stdio/common/fclose.cxx:
+ * src/stdio/common/fflush.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/stdio/common/freopen.cxx:
+ Remove ifdef CYGPKG_LIBC
+ Use new global file access method from stdiofiles.hxx
+ Tidy up description header
+ Use new CYGBLD_ATTRIB_WEAK_ALIAS
+ Access errno "normally" rather than clibdata way
+
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx
+ * src/stdio/common/stderr.cxx:
+ New files. Implement Cyg_StdioStream objects for each stream. In
+ separate self-contained files so using one doesn't bring in the
+ others
+
+ * src/stdio/common/stdiofiles.cxx:
+ New file. Implements global files array and lock
+
+ * src/stdlib/_exit.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Use infra CYGBLD* macros
+
+ * src/stdlib/malloc.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Add pkgconf/kernel.h now that pkgconf/libc.h doesn't have it
+ Use infra CYGBLD* macros
+ Make pool visible externally with weak attribute and new name
+ cyg_libc_malloc_memorypool
+
+ * src/stdlib/rand.cxx:
+ * src/stdlib/strtok.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Use infra CYGBLD* macros
+
+ * src/support/cstartup.cxx:
+ Split into smaller files to make selective linking work better,
+ fix i386 port problem and make GDB happy
+
+ * src/support/environ.cxx:
+ * src/support/invokemain.cxx:
+ * src/support/main.cxx:
+ * src/support/mainthread.cxx:
+ New files from bits of the old cstartup.cxx
+ Add support for CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+
+ * src/PKGconf.mak:
+ Update to reflect file additions/deletion
+
+ * tests/stdlib/rand1.c:
+ * tests/stdlib/rand2.c:
+ * tests/stdlib/rand3.c:
+ * tests/stdlib/srand.c:
+ Make conform to coding standards
+ Remove ifdef CYGPKG_LIBC_RAND
+ Tidy up description header
+
+ * tests/string/strtok.c:
+ Make conform to coding standards
+ Remove ifdef CYGFUN_LIBC_strtok
+ Tidy up description header
+
+1999-01-15 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/stdlib/getenv.c (main): added tests for the case in which
+ the user does not supply environ and in which the user supplies a
+ NULL environ.
+
+1999-01-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Added workaround for weak aliasing
+ problem in i386 gcc.
+
+
+1999-01-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ (CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE): Change defaults to be
+ more reasonable on small systems.
+
+1999-01-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Minor bug with environ not being initialised correctly by
+ default
+
+1998-12-24 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (Cyg_StdioStream):
+ check_this() member functions should now be const
+
+1998-12-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx (_memchr):
+ treat search value parameter to memchr as an unsigned byte,
+ not a signed int - copied fix from newlib PR 18471
+
+1998-12-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/realloc.c:
+ * tests/stdlib/malloc3.c:
+ * tests/stdlib/malloc2.c:
+ Warning cleanup
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c, tests/stdlib/malloc3.c,
+ tests/stdlib/realloc.c:
+ Only run these tests when we have a coalescing memory allocator
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Only check buffer init success if buffering
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ Check for diff of requested size against buffer_size, not
+ get_buffer_size(), since this may return -1, which won't be
+ equal to size, and will cause malloc to be called
+
+1998-12-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stdlib/getenv.c (main): Don't declare variables when they
+ are not used.
+
+Thu Nov 26 17:59:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/string/strncpy1.c:
+ Fix off-by-one error since it called my_strcmp() and not
+ my_strncmp(), which meant in included the trailing NULL when it
+ shouldn't have.
+
+1998-11-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/qsort.cxx (_qsort):
+ * src/stdlib/rand.cxx (_srand):
+ Changed CYG_REPORT_FUNCNAMETYPE to CYG_REPORT_FUNCNAME in void
+ functions.
+
+Mon Oct 26 18:49:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/cstartup.cxx (cyg_libc_dummy_main):
+ Silence compiler warning with cast of char * to CYG_ADDRWORD
+
+Wed Oct 28 17:31:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clock.cxx (_clock):
+ Reorder scaling expression as it was both incorrect and risked
+ overflow.
+ Fix for PR 18076
+
+Mon Oct 19 14:40:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h (EOF):
+ Change from -64 to (-1), to allow broken code to work :-/
+ Also change other negative defines to be within parentheses
+
+1998-10-19 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated the doc URL
+
+Thu Oct 15 21:33:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Only include kernel thread headers when we're in thread-safe mode
+
+ * src/time/clock.cxx:
+ Only include kernel clock headers if there's a kernel with the
+ right functionality available
+
+ * tests/time/clock.c:
+ Remove unnecessary inclusion of <pkgconf/kernel.h>
+
+ Above changes are required for PR 17229
+
+Wed Oct 14 16:38:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise inclusion of clibincl/stdiosupp.hxx and
+ clibincl/stream.hxx. Tidying up PR 17502
+
+Wed Oct 14 14:08:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGPKG_LIBC_STRING_OPTIMISATIONS to
+ CYGPKG_LIBC_STRING_OPTIMIZATIONS to make it truely merkin.
+
+Tue Oct 13 19:34:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_ARGUMENTS):
+ Add a default argv[0] of "" as many programs assume argc>0
+ The standard allows argv[0] to be "" if the program name
+ is not available
+
+1998-09-26 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ PR 17502: this header file now does nothing if the stdio option
+ is disabled completely. This is the same behaviour is
+ clibincl/stream.hxx, although arguably the #ifdef protection
+ should happen wherever the header file is #include'd rather than
+ in the header file itself.
+
+ * src/clibincl/clibdata.hxx:
+ PR 17502: this header file still #include's internal stdio-related
+ header files and references the FILE structure, even if stdio is
+ disabled. There were some #ifdef's for CYGPKG_LIBC_STDIO already.
+ One more has been added for _fopen() and _fclose().
+
+1998-09-25 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl (Cyg_StdioStreamBuffer):
+ PR 17487: Reorder the calls to initialize member fields, to
+ eliminate a compiler warning.
+
+Fri Sep 25 19:04:29 1998 Jonathan Larmour <jlarmour@peshwari.cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/string/strtok.cxx,
+ src/time/clock.cxx:
+ Only define tracing variable and tracing level macro when
+ the relevant tracing level config options are set. Otherwise
+ keep the tracing level fixed at 0
+ Fix for PR 17476
+
+ * include/pkgconf/libc.h:
+ Define trace levels only if parent CYGPKG_LIBC_TRACE is defined
+ for consistency with Configuration Tool
+
+
+Fri Sep 25 17:24:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Make definition of vscanf() dependent on CYGFUN_LIBC_STDIO_ungetc
+ otherwise _vfscanf() won't be compiled. This therefore would
+ cause a link fail iff selective linking is not enabled.
+ Fix for PR 17455
+
+Fri Sep 25 17:23:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/rand.cxx:
+ Make compilation dependent on CYGPKG_LIBC_RAND
+ Fix for PR 17473
+
+ * tests/stdlib/srand.c:
+ Make definition of dummy test pass conditional on CYGPKG_LIBC_RAND
+ not being defined, as well as CYGPKG_LIBC
+ Caused compilation failure when testing PR 17473 fix
+
+Mon Sep 21 17:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Make sscanf test conditional on CYGFUN_LIBC_STDIO_ungetc since
+ _vfscanf() only gets compiled if this is defined
+ Fix for PR 17346
+
+1998-09-20 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated CDL doc strings.
+
+Fri Sep 18 22:18:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_errno_p):
+ Rather than this function only being available in thread-safe mode,
+ instead make what it returns be either the per-thread errno, or
+ global errno depending on the configuration.
+ Include <errno.h> (conditionally) to support this change
+
+Wed Sep 16 11:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove "fix me" comment which I forgot to remove before
+
+Tue Sep 15 19:27:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Updated descriptions and a few other minor things after review.
+ Notably though, the NDEBUG config option has been removed
+
+1998-09-15 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ PR 17201: removed dependency on CYGPKG_KERNEL in the option
+ CYGNUM_LIBC_MAIN_STACK_SIZE, since the actual dependencies cannot
+ be expressed sensibly in the current system.
+
+1998-09-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Sorting out dependencies for error package.
+
+1998-09-10 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: started adding doc fields to the
+ cdl_package data, as a pilot for now.
+
+Wed Sep 9 17:41:23 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add option CYGIMP_LIBC_MALLOC_CXX_DELETE_CALLS_FREE to explicitly
+ control whether the empty delete functions (currently) in
+ kernel/.../common/delete.cxx are enabled; controls code bloat, see
+ the comments in delete.cxx.
+
+Fri Sep 4 16:43:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add a default CYG_TEST_PASS() to make sure the test infra doesn't
+ complain.
+ Also remove the unused string functionsa
+
+Fri Sep 4 15:43:48 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdlib/exit.cxx (__libc_exit):
+ * src/stdlib/_exit.cxx (__libc__exit):
+ * src/stdlib/malloc.cxx (_free):
+ * src/stdlib/abort.cxx (abort):
+ * src/support/cstartup.cxx (invoke_main):
+ Tracing system asserted cos it was being called incorrectly; these
+ are void functions so you shouldn't give a type to the function
+ reporting call.
+
+Fri Sep 4 15:03:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Fix CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE description to refer to
+ the table.cxx file, not table.h
+
+Fri Sep 4 14:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add description for CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE since
+ Proven won't be making any changes to the device driver
+ implementation after all.
+ Fix for PR 17148
+
+ * src/clibincl/stream.inl (set_position):
+ Remove "fix me" line. It is obvious that this will have to change
+ with a filesystem interface
+ Fix for PR 17147
+
+ * src/stdio/common/freopen.cxx:
+ Remove "fix me" - I know about this issue
+ Fix for PR 17145
+
+ * src/stdio/common/stream.cxx (read):
+ Remove "fix me" and change to use memcpy
+ Fix for PR 17144
+
+Fri Sep 4 14:36:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Actually add it this time!
+
+Fri Sep 4 13:48:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add new tests for misc stdio output functions
+
+ * tests/PKGconf.mak:
+ Build stdiooutput.c test
+
+Fri Sep 4 12:52:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (write_byte):
+ Remove bogus assert
+
+ * tests/stdlib/getenv.c (main):
+ Check whether str is NULL before doing a strcmp()
+
+ * tests/stdio/sprintf2.c (main):
+ Reformat to 76 columns
+
+Fri Sep 4 02:10:54 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/stdio/common/stream.cxx:
+ Add new peek_byte method to Cyg_StdioStream
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix up buffer access to work with new peek_byte method above
+ Fix for PR 16954
+
+Thu Sep 3 19:40:11 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/rand1.c, tests/stdlib/rand2.c,
+ tests/stdlib/rand3.c:
+ Add extra check for CYGPKG_LIBC_RAND to decide whether the test
+ is applicable or not
+
+ * tests/stdlib/rand2.c (test):
+ Use CYGNUM_LIBC_RAND_SEED for default seed, not 1
+
+ * tests/string/strtok.c:
+ Add extra check for CYGFUN_LIBC_strtok to decide whether the
+ test is applicable or not
+
+Wed Sep 2 19:11:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fread.cxx, src/stdio/output/fwrite.cxx:
+ Add fread() and fwrite() functions
+
+ * src/PKGconf.mak:
+ Build fread.cxx and fwrite.cxx from above
+
+ * src/stdio/common/stream.cxx:
+ Reformat to 76 columns
+ In write(), move initialisation of *bytes_written to start
+ In read(), move initialisation of *bytes_read to start
+
+ * include/stdio.h:
+ Reformat to 76 columns
+
+ Replace all references to the ANSI
+ standard to instead by the ISO C standard
+
+ Add commented argument names for "documentation"
+
+ Add fread() and fwrite() prototypes
+
+ * src/clibincl/stdiosupp.hxx:
+ Copy the above changes from stdio.h, and add _fread() and _fwrite()
+ prototypes
+
+ * src/stdio/output/fputs.cxx, src/stdio/input/fgets.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 15:41:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 14:46:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Use trylock_me() instead of lock_me(), and loop to prevent
+ deadlocks
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl:
+ Add trylock_me() method
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/fflush.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 12:24:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change 0x7fff to 0x7fffffff. Oops!
+ give main stack size option a legal_values field
+ Undefine tracing by default
+ Add some more description in the header
+
+Tue Sep 1 20:02:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/i18n/setlocale.c (cyg_package_start):
+ Fix typo - extra "x" for no reason at all! :-)
+
+Tue Sep 1 19:44:58 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx:
+ Fix bug in find_locale_data() that miscalculated size of
+ all_locales
+
+ Make find_locale_data() match the locale "" and add some
+ other things in _setlocale() to ensure that "C" gets returned
+ when the default locale "" is passed.
+
+ Only check the locale pointer when it is non-NULL
+
+ * tests/i18n/setlocale.c:
+ New tests for setlocale()
+
+ * tests/PKGconf.mak:
+ Update to build setlocale.c test
+
+ * src/support/cstartup.cxx:
+ Don't actually call system default main() "main" otherwise GDB
+ gets confused and thinks its the entry point. Instead make a weak
+ alias and call the real function something different.
+
+Tue Sep 1 18:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx (_setlocale):
+ Fix tracing macro name and remove "str maybe used before
+ initialised" warning
+
+ * tests/stdlib/qsort.c:
+ Correct file description header
+
+Tue Sep 1 17:04:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/locale.h, src/clibincl/i18nsupp.hxx, src/i18n/locale.cxx:
+ New files to add support for locales as defined by the ISO C
+ standard. i.e. setlocale() and localeconv() functions and some
+ other bits
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAX_LOCALE_NAME_SIZE config option for locale
+ support
+
+ * src/PKGconf.mak:
+ build locale.cxx
+
+ * include/errno.h, src/clibincl/ctypesupp.hxx:
+ Tidy up to 76 columns
+
+Tue Sep 1 00:24:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Move environment-related options from stdlib into new
+ CYGPKG_LIBC_STARTUP component. Also add options for main()'s
+ arguments (CYGPKG_LIBC_ARGUMENTS), main()'s default stack size
+ (CYGNUM_LIBC_MAIN_STACK_SIZE), number of atexit handlers
+ (CYGNUM_LIBC_ATEXIT_HANDLERS), and whether _exit() stops the
+ system (CYGSEM_LIBC_EXIT_STOPS_SYSTEM).
+
+ * src/clibincl/stdlibsupp.hxx:
+ Fix a few comment bugs, and add new
+ cyg_libc_invoke_atexit_handlers() function prototype
+
+ * src/stdlib/_exit.cxx, src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Implement exit(), atexit() and _exit() correctly now. Also
+ includes cyg_libc_invoke_atexit_handlers() in atexit.cxx. Now
+ we get the correct behaviour of atexit(), and exit() invokes the
+ atexit handlers and fflushs all the stdio streams. Add plenty of
+ tracing of asserts too.
+
+ * src/support/cstartup.cxx:
+ Make main_thread object an exported global. Allow user-settable
+ arguments. Add MUCH more tracing and asserts. Improve comments.
+ Tidy up to 76 columns
+
+ * tests/stdlib/atexit.c:
+ Add simple test for atexit() and it calling registered functions
+
+ * tests/PKGconf.mak:
+ Build atexit.c test
+
+Mon Aug 31 18:54:48 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/getenv.cxx, tests/stdlib/getenv.c:
+ Add support for getenv(), and some tests to ensure it works
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update to include getenv.cxx and getenv.c test
+
+ * src/clibincl/clibdata.hxx:
+ remove prototype for environ - we expect files needing it to
+ define it themselves
+
+ * src/support/clibdata.cxx:
+ Tidy up to 76 columns and add definition of char **environ, but
+ with a configurable initialiser (see libc.h below)
+
+ * tests/stdlib/abs.c (main):
+ Tidy up to 76 columns
+
+ * src/stdlib/malloc.cxx:
+ Tidy up to 76 columns and remove warning for undefined _memcpy()
+ by changing to memcpy(), and casting away signedness
+
+ * include/pkgconf/libc.h:
+ Add CYGPKG_LIBC_ENVIRONMENT and CYGDAT_LIBC_DEFAULT_ENVIRONMENT
+ configuration options
+
+ * include/pkgconf/libc.h, src/clibincl/clibdata.hxx:
+ Tidy up to 76 columns
+
+ * include/stdlib.h:
+ Add getenv() prototype and tidy up to 76 columns
+
+ * src/clibincl/stdlibsupp.hxx:
+ Add _getenv() prototype
+
+Mon Aug 31 13:37:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Add realloc()
+
+ * tests/stdlib/realloc.c:
+ Add this file to test new realloc() functionality
+
+ * tests/PKGconf.mak:
+ Build realloc test
+
+ * tests/stdlib/malloc3.c (main), tests/stdlib/malloc2.c (main),
+ tests/stdlib/malloc1.c (main):
+ Conditionalise local vars to prevent warnings
+
+ * tests/stdlib/malloc3.c (fill_with_data):
+ Move '{' into "verb" line
+
+ * include/pkgconf/libc.h:
+ Require infra tracing support to allow tracing
+
+ * include/stdlib.h:
+ Add realloc()
+
+ * src/clibincl/stdlibsupp.hxx:
+ Update the commented argument names from stdlib.h, including realloc()
+
+1998-08-28 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ * src/clibincl/clibdata.hxx, src/time/clock.cxx:
+
+ Updated for new kernel configuration option symbol names
+
+Fri Aug 28 19:18:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ Changed the entry below to sat "tx39" instead of "mn10300".
+ It's been a long week.
+
+Fri Aug 28 18:59:20 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Add a weakly named main to allow the
+ default configuration to link on the tx39 which has no
+ scalextric linking yet. The static Cyg_Thread main_thread object
+ below continues to exist, though unreferenced, so all its
+ descendants must exist too.
+
+Fri Aug 28 08:54:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h:
+ Add commented argument names Add exit(), and atexit(). And move
+ these along with abort() and _exit() to a new section.
+
+ * src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Add trivial versions of atexit() and exit()
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAIN_STACK_SIZE config option
+
+ * include/sys/cstartup.h, src/support/cstartup.cxx, src/PKGconf.mak:
+ New files to provide a new function cyg_iso_c_support(), which
+ invokes main "correctly".
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/srand.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcoll2.c, tests/string/strcpy1.c,
+ tests/string/strcpy2.c, tests/string/strcspn.c,
+ tests/string/strlen.c, tests/string/strncat1.c,
+ tests/string/strncat2.c, tests/string/strncpy1.c,
+ tests/string/strncpy2.c, tests/string/strpbrk.c,
+ tests/string/strrchr.c, tests/string/strspn.c,
+ tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c,
+ tests/time/clock.c:
+
+ Modify all tests to use new startup mechanism, and cyg_iso_c_start()
+
+Fri Aug 28 00:29:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Add #ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO around all accesses to
+ flags.last_buffer_op_was_read. Fix for PR 16997
+
+Thu Aug 27 01:12:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/sys/file_if.h:
+ Fix comments and remove cyg_get_file_star()
+
+Wed Aug 26 20:24:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove #define CYGPKG_LIBC is that is meant to live in
+ <pkgconf/system.h> after all
+
+Wed Aug 26 19:39:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ More fixes to CDL stuff to make it work better, and look better on
+ the screen
+
+Tue Aug 25 20:21:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Make some fixes after running the ConfigTool
+
+Tue Aug 25 16:46:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_STDIO_BUFSIZE):
+ Fix typo of CYGNUM_LIBC_STDIO_BUFSIZE
+
+Tue Aug 25 15:10:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Tidy up CDL stuff a bit more, prior to checking it actually works.
+
+Tue Aug 25 11:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c (main):
+ Prevent calls to CYG_TEST_STILL_ALIVE for now
+
+Tue Aug 25 05:39:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change cosmetic paragraph alignment.
+
+Tue Aug 25 03:11:34 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Make stderr initialise with buffer size 0.
+ For PR 16955
+
+Mon Aug 24 17:38:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ First pass at CDL-ifying the C library configuration. Currently
+ deliberately disabled as there a few outstanding issues.
+
+Mon Aug 24 16:14:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx (_vfnprintf):
+ clear up warning for unused argument
+
+ * tests/stdlib/malloc2.c (NUM_ITERATIONS):
+ Lower to 100 from 50000 so it won't take too long under the simulator
+
+Thu Aug 20 17:48:43 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Remove now unnecessary inclusion of kernel/ktypes.h
+
+Wed Aug 19 19:19:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c,
+ tests/stdio/sscanf.c, tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c,
+ tests/stdlib/strtoul.c, tests/string/strtok.c,
+ tests/time/clock.c:
+ Add parameters to "main()" to silence warnings
+
+Wed Aug 19 18:52:59 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Put conditional error check into same #ifdef and if as what was being
+ checked in the first place!
+
+Wed Aug 19 18:49:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl:
+ Reorder Cyg_StdioStream::check_this() to be first to silence
+ warnings
+
+Tue Aug 18 16:10:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * ecc/language/c/libc/current/src/clibincl/clibdata.hxx,
+ ecc/language/c/libc/current/src/errno/errno.cxx,
+ ecc/language/c/libc/current/src/stdio/common/fopen.cxx,
+ ecc/language/c/libc/current/src/stdlib/rand.cxx,
+ ecc/language/c/libc/current/src/string/strtok.cxx:
+ Rename CYGIMP_LIBC_INTERNAL_DATA_PREAMBLE,
+ CYGIMP_LIBC_INTERNAL_DATA_ALLOC_CHECK_PREAMBLE,
+ CYGVAR_LIBC_INTERNAL_DATA, and
+ CYGIMP_LIBC_INTERNAL_DATA_CHECK to all have CYGPRI_ prefix instead
+ as recommended by the config name rules
+
+
+Tue Aug 18 14:31:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/setvbuf.cxx (_setvbuf):
+ Rename variable names in assert line, otherwise doesn't build
+ with asserts on!
+
+Sun Aug 16 18:15:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix some bugs, although there are some left to fix still. Unrelated
+ to the rest of the checkins, so I will check the partial fix in now.
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx:
+ Add parameters to constructor to allow more things to be done at
+ construction time.
+
+ Now we have "new", remove separate "construct" method
+
+ Add more documentation on constructor
+
+ As requested by code review, where possible, move boolean flags
+ into separate packed bitfield structure for space efficiency
+
+ Make readbuf_char be usable all the time rather than when configured
+ not to be buffering, as it is also needed for non-buffered mode i.e.
+ _IONBF
+
+ * src/stdio/common/fopen.cxx:
+ Change to use new method of construction from above, using new
+
+ Use thread-specific data, rather than global. And so change errnos
+ to access errno entry specifically
+
+ Make process_mode() check for append mode too
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/stdio/common/setvbuf.cxx:
+
+ Change to cope with different way of dealing with buffering policy
+ flags etc. in Cyg_StdioStream
+
+ * src/stdio/common/vsnprintf.cxx, src/stdio/common/vsscanf.cxx,
+ src/support/clibdata.cxx:
+ Change construction of streams to use new parameters added above,
+ and change to use _IONBF mode for string stdio functions,
+ otherwise its a waste of memory. And use _IONBF for stderr as the
+ ISO standard tells us to!
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Change constructor so that it can be set with default size and
+ dynamic buffer (if applicable)
+
+ Fix minor bug in destructor - should only call free when allocated
+ dynamically
+
+ Change get_buffer_size to return -1 if the buffer was not allowed
+ to be set up
+
+ * src/stdio/common/streambuf.cxx:
+ Remove unnecessary stdio.h include and add extra comment to whether
+ to free bit in set_buffer()
+
+ * src/stdio/common/freopen.cxx:
+ Change @@@ to standard fix me string
+
+ * src/stdio/output/fputc.cxx:
+ Remove unnecessary "written" variable
+
+Thu Aug 13 15:37:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx:
+ Included use of "fix me" line to ensure this is discussed before
+ release
+
+ * include/stdlib.h, src/stdlib/abort.cxx, src/PKGconf.mak:
+ Add abort.cxx to implement abort(), albeit naively
+
+Thu Jul 30 18:03:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/vsscanf.cxx (_vsscanf),
+ src/stdio/common/vsnprintf.cxx (_vsnprintf):
+ Fix initialiser of pseudo string device table that didn't get updated
+ when the table changed (Bad proven, no biscuit).
+
+ * src/clibincl/stream.inl (~Cyg_StdioStream):
+ Move invalidation of magic_validity_word to after unlock_me(),
+ otherwise it always fails!
+
+Tue Jul 28 21:29:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Shorten over-long lines
+
+Tue Jul 28 20:28:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx (class Cyg_StdioStream),
+ src/clibincl/stream.inl, src/stdio/common/stream.cxx:
+ Clarify some comments and get the CYGDBG_DEFINE_CHECK_THIS and
+ CYG_ASSERTCLASS stuff going
+
+ * src/clibincl/stream.inl:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 15:31:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl, src/stdio/common/streambuf.cxx:
+ Move set_buffer() from streambuf.inl to new file streambuf.cxx
+
+ * src/PKGconf.mak (COMPILE):
+ Build new file streambuf.cxx
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ Add METHODS comment
+
+ * src/stdio/common/stream.cxx:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 00:26:36 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.inl, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/div.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/qsort.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/string/strtok.cxx:
+
+ Include proper Berkeley license inline in the file, rather than
+ referring to an external file
+
+ * doc/COPYING.UCB:
+ Remove, now that it isn't referred to any more
+
+Mon Jul 27 23:34:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl, include/errno.h,
+ include/stdio.h, include/stdio.inl, include/stdlib.h,
+ include/stdlib.inl, include/string.h, include/string.inl,
+ include/time.h, include/sys/file_if.h, src/PKGconf.mak,
+ src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/stdiosupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/streambuf.hxx,
+ src/clibincl/streambuf.inl, src/clibincl/stringsupp.hxx,
+ src/clibincl/timesupp.hxx, src/ctype/isalnum.cxx,
+ src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx,
+ src/ctype/islower.cxx, src/ctype/isprint.cxx,
+ src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx,
+ src/ctype/tolower.cxx, src/ctype/toupper.cxx,
+ src/errno/errno.cxx, src/stdio/common/snprintf.cxx,
+ src/stdio/common/sprintf.cxx, src/stdio/common/sscanf.cxx,
+ src/stdio/common/stdioinlines.cxx, src/stdio/common/stream.cxx,
+ src/stdio/common/ungetc.cxx, src/stdio/common/vsnprintf.cxx,
+ src/stdio/common/vsscanf.cxx, src/stdio/input/fgetc.cxx,
+ src/stdio/input/fgets.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/gets.cxx, src/stdio/input/scanf.cxx,
+ src/stdio/output/fnprintf.cxx, src/stdio/output/fprintf.cxx,
+ src/stdio/output/fputc.cxx, src/stdio/output/fputs.cxx,
+ src/stdio/output/printf.cxx, src/stdlib/_exit.cxx,
+ src/stdlib/abs.cxx, src/stdlib/atof.cxx, src/stdlib/atoi.cxx,
+ src/stdlib/atol.cxx, src/stdlib/div.cxx, src/stdlib/labs.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/rand.cxx, src/stdlib/strtod.cxx,
+ src/string/memchr.cxx, src/string/memcmp.cxx,
+ src/string/memmove.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx,
+ src/string/strcoll.cxx, src/string/strcpy.cxx,
+ src/string/strcspn.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx, src/string/strpbrk.cxx,
+ src/string/strrchr.cxx, src/string/strspn.cxx,
+ src/string/strstr.cxx, src/string/strsuppt.cxx,
+ src/string/strtok.cxx, src/string/strxfrm.cxx,
+ src/support/clibdata.cxx, src/time/clock.cxx:
+ Untabify
+
+Mon Jul 27 23:14:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/stdlib/malloc.cxx, src/stdlib/qsort.cxx,
+ tests/ctype/ctype.c, tests/stdlib/rand3.c, tests/stdlib/malloc3.c:
+ Remove all mentions of "register" in variable declarations. Also
+ untabify where needed
+
+ * src/stdlib/bsearch.cxx:
+ Untabify this too
+
+
+Mon Jul 27 22:18:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/fputc.cxx (_fputc):
+ Replace call to stream write() with call to write_byte()
+
+ * src/clibincl/stream.inl (write_byte):
+ Add asserts for stream write() returning odd values for how much has
+ been written
+
+ (bytes_available_to_read):
+ Remove "register" def for variable declaration
+
+Mon Jul 27 22:06:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdiosupp.cxx:
+ Remove #if 0'd cyg_get_file_star() and unnecessary pseudo string
+ device definition
+
+Mon Jul 27 21:57:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h, src/support/clibdata.cxx:
+ Change CYGXXX_LIBC_STDIO_DEFAULT_CONSOLE to
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE
+
+Mon Jul 27 21:49:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/setjmpsupp.hxx,
+ src/clibincl/stdiosupp.hxx, src/clibincl/stdlibsupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl,
+ src/clibincl/stringsupp.hxx, src/clibincl/timesupp.hxx:
+
+ Change CYGONCE_LIBC_*_{HXX,INL} to CYGONCE_LIBC_CLIBINCL_*_{HXX,INL}
+
+Mon Jul 27 21:34:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change #define XXXXX 1 to #define XXXXX where applicable as per code
+ review
+
+ Also remove obsolete CYGIMP_LIBC_THREAD_START_SUSPENDS_SELF
+
+Mon Jul 27 19:42:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen):
+ Use #ifdef, not #if for config options
+
+Mon Jul 27 15:01:51 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/stream.cxx, src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx:
+ Fixes to compile with the new Cyg_IORB field names.
+
+Thu Jul 9 03:40:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Adjust starting of tests to possibly start scheduler since
+ strtol/stroul rely on errno, which may be a per-thread variable
+
+Thu Jul 9 03:06:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx, src/stdio/common/setvbuf.cxx:
+ Consolidate read and write buffers into single buffer, as it should
+ have been all along
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Add drain_buffer() method to speed up the case when we want the
+ buffer completely emptied
+
+Tue Jul 7 21:26:33 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Add a couple of new tests that check that very long strings work too
+
+Wed Jul 1 19:52:39 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/streambuf.hxx:
+ Do not permit copy constructors
+
+ * src/clibincl/stream.inl, src/stdio/common/fclose.cxx:
+ Make sure we use #ifdef and not #if
+
+ * src/clibincl/streambuf.inl:
+ Use member initialisation list rather than explicit initialisation to
+ reduce warnings
+
+Wed Jul 1 19:17:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h and all files using config options:
+ Rename configuration defines to make them more standard
+
+Thu Jun 25 20:09:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strcat.cxx:
+ Add parentheses on check to silence warning
+ (Verified by proven)
+
+Thu Jun 25 19:30:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Make sure that the malloc pool is initialised before other things
+ can use it. This is done with the hot new constructor ordering
+ feature.
+
+Thu Jun 25 18:27:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Remove bogus ifdef if floating point is _not_ wanted
+
+Thu Jun 25 17:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Fix argument checking to allow first argument of NULL
+
+Thu Jun 25 04:18:50 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_strtok_last_p):
+ Remove bogus assertion
+
+ * src/stdlib/malloc.cxx:
+ Got sense of alignment check assertion the wrong way round, so negate
+ it
+
+Thu Jun 25 03:56:35 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx:
+ Fix argument checking assertions with legitimate nulls here too
+
+Thu Jun 25 03:46:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/strtoul.cxx, src/stdlib/strtol.cxx:
+ Fix argument checking assertions to cope with legitimate nulls
+
+Wed Jun 24 09:01:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Remove extraneous info messages
+
+Wed Jun 24 05:59:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c:
+
+ Change large automatic arrays to static arrays to prevent overuse
+ of a potentially small stack
+
+Wed Jun 24 05:45:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/string/strtok.c, tests/time/clock.c:
+
+ Increase thread stack size from 4K to 32K as in some cases it was
+ too small.
+
+
+Tue Jun 23 20:12:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Add extra tests, including floating point conversion testing
+
+Tue Jun 23 17:01:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Make sure this is only compiled if CYGFUN_LIBC_strtok is defined
+
+Tue Jun 23 06:10:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ add some comments - that's all
+
+ * src/stdio/common/stream.cxx:
+ fix case in refill_read_buffer() for what to do when there's nothing
+ left. Now return EAGAIN
+
+ * src/stdio/common/vsscanf.cxx, src/stdio/input/vfscanf.cxx:
+ Get sscanf working properly and passing tests. Also make sure it
+ ignores FP when its not configured
+
+ * src/stdlib/atof.cxx:
+ Only compile at all if strtod() is present
+
+
+Mon Jun 22 19:13:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise strtok_last and rand_seed better
+
+Mon Jun 22 14:14:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc3.c:
+ Add test for checking that mallocing and freeing repeatedly works
+
+ * tests/PKGconf.mak:
+ Update to reflect addition of the above
+
+Mon Jun 22 13:09:33 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/fopen.cxx
+ * src/stdio/common/stream.cxx
+ * src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx
+ Include cyg/devs/common/iorb.h instead of iorb.hxx
+
+ * src/stdio/common/stream.cxx
+ Use read_blocking and write_blocking instead of just read and
+ write when accessing devices through the virtual device table.
+
+Sun Jun 21 18:19:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Propagate change of return code handling for puts from stdio.inl
+ into here
+
+ * src/stdio/output/fputc.cxx:
+ make sure the right type is used for output - byte not int
+
+ * src/support/clibdata.cxx:
+ Fix #define config mistook. #endif was in wrong place
+
+Sun Jun 21 16:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Allow explicit construction to get around a bug when
+ dynamically allocating per-thread structure
+
+Sun Jun 21 16:02:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c, tests/stdlib/qsort.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+
+ Update tests to "do the right thing" with all configuration settings
+
+
+Sun Jun 21 04:54:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ I have to be careful not to use setjmp() in a way not exactly
+ defined by the standard, so make sure I do, and add a comment
+ documenting these ways.
+
+ Also ensure this test does the right thing in all configurations
+
+Sun Jun 21 04:38:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add extra checks for invalid configurations
+ Also make default for thread safety OFF
+
+ * src/clibincl/clibdata.inl:
+ Adjust indentation
+
+ * src/stdio/output/vfnprintf.cxx:
+ Make printf of -0.0 floating point do the right thing
+
+Sun Jun 21 04:28:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/snprintf.cxx, src/stdio/common/sprintf.cxx,
+ src/stdio/common/sscanf.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/scanf.cxx, src/stdio/output/fnprintf.cxx,
+ src/stdio/output/fprintf.cxx, src/stdio/output/printf.cxx:
+
+ Had to remove inline functions with varargs. Which means separating
+ out each function from stdioinlines.cxx into a separate file, as they
+ no longer belong there. So all the above files were created.
+
+ * include/stdio.inl, src/PKGconf.mak,
+ src/stdio/common/stdioinlines.cxx:
+ Changed to take account of the above
+
+
+Sun Jun 21 03:58:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c:
+ Update with floating-point tests. Also make sure they DTRT in all
+ configurations
+
+Fri Jun 19 19:33:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ accidentally initialised stdin/out/err twice
+
+Fri Jun 19 19:09:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Another typo
+
+Fri Jun 19 18:59:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Missing #endif typo
+
+Fri Jun 19 18:51:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Fix initialisation of static data members. Unsure how it worked at
+ all before!
+
+Fri Jun 19 18:01:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.inl:
+ puts should check whether fputs returns non-negative, rather than
+ non-zero
+
+Fri Jun 19 17:22:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl:
+ Make inclusion of get_errno_p conditional on thread-safety
+
+Wed Jun 17 10:55:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Add weak alias of vfscanf() to _vfscanf()
+
+Wed Jun 17 09:10:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Initialise err to silence compiler warning
+
+Wed Jun 17 08:59:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Most important is the addition of floating point support in
+ src/stdio/output/vfnprintf.cxx and src/stdio/input/vfscanf.cxx. This
+ also required the addition of atof() and strtod() in stdlib which is
+ definitely no bad thing! Other than that...
+
+ * Fix a whole bunch of stuff I messed up first time round. Also the
+ sprintf and sscanf tests are included again.
+
+Tue Jun 16 16:38:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Typo with not putting comment character at the beginning. Sigh.
+
+Tue Jun 16 14:53:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Forgot to (temporarily) remove fputs test for now
+
+Mon Jun 15 20:40:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ Everything to do with stdio has almost completely changed, so there's
+ not much point documenting individual changes.
+
+Mon Jun 15 18:36:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c:
+ Stop it moaning quite as much when it fails by making it exit sooner
+
+ * tests/time/clock.c :
+ This isn't a compound testcase
+
+Thu Jun 11 17:59:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h
+ Reverse sense of NDEBUG ifdef, that was left in accidentally due
+ to testing
+
+Thu Jun 11 04:58:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h, include/string.h, src/clibincl/stringsupp.hxx:
+ Modify as I've now added an "error" package which defines the error
+ codes and strerror()
+
+ * src/errno/strerror.cxx:
+ Moved to new error package and thus deleted
+
+Wed Jun 10 18:37:37 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h:
+ create this header and add assert() function
+
+Wed Jun 10 16:23:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h, src/clibincl/stdlibsupp.hxx, src/stdlib/malloc.cxx:
+ Add malloc(), calloc() and free() functions
+
+ * include/pkgconf/libc.h:
+ Add malloc memory pool size option
+
+ * tests/stdlib/malloc1.c, tests/stdlib/malloc2.c:
+ new tests for malloc
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for new files
+
+Wed Jun 10 15:06:16 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ Add another test
+
+Tue Jun 9 18:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add some setjmp config's and a macro for the noreturn attribute
+
+ * include/setjmp.h, include/setjmp.inl, src/clibincl/setjmpsupp.hxx,
+ src/setjmp/longjmp.cxx, tests/setjmp/setjmp.c:
+ Added to implement and test setjmp() and longjmp()
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for newly added files
+
+Thu Jun 4 01:29:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx, src/string/strcpy.cxx,
+ src/string/strlen.cxx, src/string/strncat.cxx,
+ src/string/strncmp.cxx, src/string/strncpy.cxx:
+ Rename CYGIMP_LIBC_PREFER_SMALL_TO_FAST to
+ CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST
+
+ Also use slower but smaller version when __OPTIMIZE_SIZE__ is
+ defined (which comes from using gcc -Os)
+
+Fri May 29 16:15:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl, src/ctype/isxdigit.cxx:
+ Fix bug that numerals aren't considered hex digits
+
+ * include/time.h:
+ Change clock_t and time_t to be signed so that they can accept -1, as
+ required by other libc functions
+
+ * src/clibincl/clibdata.hxx:
+ Fix typo that CYGIMP_LIBC_THREAD_SUPPORT should be ..._SAFETY
+ Also fix macro to allocate thread-specific data to not set variables
+ in a different stack-frame
+
+ * tests/ctype/ctype.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/stdlib/qsort.c:
+ make ctr unsigned to prevent warnings
+
+ * tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/string/strrchr.c:
+ Fix off by one error
+
+ * tests/string/strspn.c:
+ Fix case-sensitivity problem, and off-by-one error
+
+ * tests/string/strxfrm1.c:
+ Remove bogus bit of test that doesn't apply to strxfrm, and fix typo
+
+
+Fri May 22 16:33:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak
+ Remove CXXFLAGS line now that its redundant
+
+ * tests/everything!
+ Do a blitz change of all tests - break some of them down into
+ different files, add new tests, standardize format, fix bugs,
+ update for recent header file changes and much more!
+
+Wed May 20 17:50:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ interim checkin for different dir structure for Bart
+
+Fri May 15 20:30:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Tidy up some loose ends I forgot: rename src/include directory to
+ src/clibincl. And add clibdata.inl and timesupp.hxx in there.
+
+Thu May 14 19:56:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Basically everything has changed in the C library. Files have
+ been moved, renamed, deleted and reworked. This is a major
+ revision, and now starts from this new baseline rather than doing
+ incremental changes.
+
+Fri Apr 17 18:43:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ECCconf.mak:
+ added for new build system (actually Bart did this, but didn't
+ update this ChangeLog)
+
+Fri Apr 17 15:03:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdio/device/sim.cxx:
+ Make it build with CYG_EMPTY_STATEMENT; the unadorned one is being
+ removed.
+
+Thu Apr 16 00:24:24 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * All source files:
+ replace ECCIMP_LIBC_* conditional ifdef with CYGIMP_LIBC_*
+
+ * include/eccconf/libc.h:
+ improve comments and reorder a bit
+
+Wed Apr 8 14:35:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/Makefile.am, tests/Makefile.am, configure.in:
+ many changes to integrate build structure from release tree
+
+ * src/ctype/Makefile.am, src/ctype/Makefile.in, src/errno/Makefile.am,
+ src/errno/Makefile.in, src/stdio/Makefile.am, src/stdio/Makefile.in,
+ src/stdio/common/Makefile.am, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.am, src/stdio/device/Makefile.in,
+ src/stdio/output/Makefile.am, src/stdio/output/Makefile.in,
+ src/stdio/input/Makefile.am, src/stdio/input/Makefile.in,
+ src/stdlib/Makefile.am, src/stdlib/Makefile.in,
+ src/string/Makefile.am, src/string/Makefile.in,
+ src/support/Makefile.am, src/support/Makefile.in,
+ src/time/Makefile.am, src/time/Makefile.in:
+ Remove as they are now redundant with above changes
+
+ * include/Makefile.am:
+ Add to support above changes
+
+ * include/eccconf/libc.h:
+ Change include file for configuration from kernel to system
+
+ * src/include/kerndiag.hxx, src/stdio/device/kerndiag.cxx,
+ src/time/clockfn.cxx:
+ Change kernel include file to eccconf/kernel.h
+
+ * src/include/strngdev.h:
+ remove unnecessary kernel include
+
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in,
+ tests/Makefile.in, include/Makefile.in:
+ regenerate
+
+Mon Apr 6 20:55:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/abs.cxx, src/stdlib/atoi.cxx, src/stdlib/atol.cxx,
+ src/stdlib/div.cxx, src/stdlib/labs.cxx, src/stdlib/ldiv.cxx:
+ Separated out functions from stdlib.cxx into separate files
+
+ * src/stdlib/stdlib.cxx:
+ removed to be replaced by above files
+
+ * Makefile.am, src/stdlib/Makefile.am:
+ modified to support building above and not building stdlib.cxx
+
+ * src/support/tsd.cxx:
+ Remove unnecessary header file includes
+
+ * Makefile.in, src/stdlib/Makefile.in:
+ regenerated
+
+Mon Apr 6 19:19:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx, include/eccconf/libc.h:
+ remove lame hack for tx39 compiler now that its fixed
+
+ * src/include/sim.hxx:
+ define constants as static to placate compiler
+
+Thu Apr 2 21:01:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ctype/ctype.cxx:
+ deleted and separated out into below files
+
+ * src/ctype/isalnum.cxx, src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx, src/ctype/islower.cxx,
+ src/ctype/isprint.cxx, src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx, src/ctype/tolower.cxx,
+ src/ctype/toupper.cxx:
+ Separated out individual ctype functions from ctype.cxx into separate
+ files
+
+ * Makefile.am, src/ctype/Makefile.am:
+ modified to reflect above deletion/additions
+
+ * Makefile.in, src/ctype/Makefile.in:
+ regenerated
+
+Thu Apr 2 19:08:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: optimise using prefix increments
+
+Thu Apr 2 15:18:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strchr.cxx: optimise setting of mask a little
+
+Thu Mar 26 14:07:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx: fixed some typos
+
+Thu Mar 26 11:58:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/eccconf/libc.h, src/support/tsd.cxx:
+ Implement workaround for tx39 compiler bug.
+
+ * src/include/strsuppt.hxx:
+ remove prototypes for _memcpy() and _memset() as they are now in the
+ kernel
+
+Wed Mar 25 18:31:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/string/Makefile.am: memcpy() and memset() are
+ now in the kernel so remove them from build
+ * include/string.h: add a comment to say as much
+ * Makefile.in, src/string/Makefile.in: regenerate
+
+Wed Mar 25 15:30:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx, src/include/file_if.inl:
+ Change _exit workaround to not cause a compiler optimisation
+ problem. Now just references _exit rather than calls it.
+
+Wed Mar 25 14:59:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fix bug causing tests to fail completely
+ for this function
+
+Wed Mar 25 12:55:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/sim.hxx: add types to constants (oops!)
+ * Makefile.am: link src/stdio/device/sim.cxx
+ * Makefile.in: regenerated
+
+Wed Mar 25 04:14:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/file_if.hxx, src/include/file_if.inl,
+ src/include/kerndiag.hxx, src/include/sim.hxx,
+ src/include/stdio_if.hxx, src/include/strngdev.hxx,
+ src/include/tsd.hxx, src/stdio/common/clearerr.cxx,
+ src/stdio/common/clearerr.cxx, src/stdio/common/feof.cxx,
+ src/stdio/common/ferror.cxx, src/stdio/common/file_if.cxx,
+ src/stdio/common/vsprintf.cxx,
+ src/stdio/device/kerndiag.cxx, src/stdio/device/sim.cxx,
+ src/stdio/device/strngdev.cxx, src/stdio/output/fputc.cxx,
+ src/stdio/output/fputs.cxx, src/stdio/output/puts.cxx,
+ src/stdio/output/vfnprintf.cxx, src/support/tsd.cxx:
+ Modified to support buffered reads including renaming
+ _EccInternalFileStruct to __EccStdioStream which is what affects
+ most of these files
+ * src/include/file_if.inl, src/stdio/common/file_if.cxx: added for
+ the above reason
+ * src/stdio/common/sscanf.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/input/Makefile.am: added to provide sscanf() functionality
+ * include/ctype.h, include/stdio.h, include/stdlib.h,
+ include/string.h, include/eccconf/libc.h, src/ctype/ctype.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/stdio/common/stdio.cxx:
+ rename *_INLINES macros with prefix CYG rather than ECC
+ * include/errno.h, src/errno/errno.cxx, src/errno/strerror.cxx:
+ rename ErrNo to _ErrNo and add EAGAIN and EWOULDBLOCK error codes
+ * configure.in, Makefile.am, src/stdio/Makefile.am,
+ src/stdio/input/Makefile.am: add support for building
+ file_if.cxx sscanf.cxx and vfscanf.cxx
+ * src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/input/Makefile.in, configure, Makefile.in: regenerated
+
+Tue Mar 24 19:51:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clockfn.cxx, src/time/clock.cxx:
+ Renamed clock.cxx to clockfn.cxx (preserving CVS history)
+ * Makefile.am, src/time/Makefile.am: updated to reflect name change
+ * Makefile.in, src/time/Makefile.in: regenerated
+
+Tue Mar 24 16:28:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl: Swap around definitions to get right order so
+ inlining works
+
+Tue Mar 24 14:43:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/stdio.h, include/stdlib.h, include/string.h:
+ modify to only conditionally include inlines
+ * src/ctype/ctype.cxx, src/stdio/common/stdio.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/ctype/Makefile.am: Add to provide real linkable alternatives
+ to inline functions
+ * Makefile.am, configure.in, src/Makefile.am,
+ src/stdio/common/Makefile.am, src/stdlib/Makefile.am,
+ src/string/Makefile.am: modified to support previous additions
+ * include/eccconf/libc.h: redefine inline macro to add extern inline,
+ and add conditional defines for inline functions. Also rename
+ space vs. speed macro to have CYG instead of ECC prefix
+ * include/stdio.inl: fix comment typo
+ * src/stdlib/qsort.cxx: fix to define inline functions properly
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/memcpy.cxx,
+ src/string/memset.cxx, src/string/strcat.cxx, src/string/strchr.cxx,
+ src/string/strcmp.cxx, src/string/strcpy.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx
+ * Makefile.in, configure, src/Makefile.in, src/ctype/Makefile.in,
+ src/stdio/common/Makefile.in, src/stdlib/Makefile.in,
+ src/string/Makefile.in: regenerate
+
+
+Mon Mar 23 19:19:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx: added to support temporary _exit
+ * include/stdlib.h, include/stdlib.inl: added support for _exit and
+ added abs(), labs(), div() and ldiv() functions
+ * src/include/file_if.hxx: added support for _exit kludge
+ * src/stdlib/qsort.cxx: Added Berkeley copyright message
+ * src/time/clock.cxx: Include correct kernel config header as
+ CYG_CONFIGURATION rather than <config.h>
+ * Makefile.am src/stdlib/Makefile.am: added support for _exit
+ * Makefile.in, src/stdlib/Makefile.in: regenerated
+
+Mon Mar 23 14:41:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Replace ECCPKG_ANSI_LIBC with CYGPKG_ANSI_LIBC in all source files
+
+Mon Mar 23 14:28:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/string.inl: add file to provide strcoll()
+ * include/string.h: include string.inl
+ * ctype.h: include ctype.inl (oops!)
+ * include/stdlib.h: include stdlib.inl (oops!)
+
+Mon Mar 23 13:30:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl: added to provide ANSI ctype
+ functionality
+ * include/stdlib.h, include/stdlib.inl, src/include/stdlibbsp.hxx,
+ src/stdlib/Makefile.am, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/stdlib/srand.cxx,
+ src/stdlib/strtol.cxx, src/stdlib/strtoul.cxx: Added to provide
+ many stdlib functions
+ * src/include/tsd.hxx: modified to support rand() random number
+ seed, and added some comments
+ * configure.in, Makefile.am, src/Makefile.am: modified to support
+ addition of above new sources
+ * include/eccconf/libc.h: Add extra helpful comments, and #include
+ kernel config file
+ * src/time/clock.cxx: #include clock.inl and fix to call
+ get_resolution() properly now
+ * Makefile.in, configure, src/Makefile.in, src/errno/Makefile.in,
+ src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.in, src/stdio/output/Makefile.in,
+ src/stdlib/Makefile.in, src/strings/Makefile.in,
+ src/support/Makefile.in, src/time/Makefile.in,
+ tests/Makefile.in: regenerated
+
+
+Sun Mar 22 21:29:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h, src/include/timesupp.hxx, src/time/clock.cxx,
+ src/time/Makefile.am: added to provide clock() function
+ * src/Makefile.am: modified to try to build in src/time directory
+ * include/eccconf/libc.h: added and is now the main configuration
+ file for this package
+ * acconfig.h, include/libcconf.h.in, include/stamp-h.in: removed
+ due to usage of libc.h above instead
+ * Almost all *.h, *.hxx and *.cxx: replaced LIBC_CONFIG_HEADER
+ defined include with simple <pkgconf/libc.h>
+ * configure.in: remove AM_CONFIG_HEADER of libcconf.h and
+ LIBC_CONFIG_HEADER definition. Also remove usage of builtin
+ memcpy() etc. from gcc, and generate src/time/Makefile
+ * Makefile.am: link in src/time/clock.o
+ * src/include/file_if.hxx, src/include/sim.hxx: use config header
+ to decide whether C library is to be used
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in: regenerated
+
+Fri Mar 20 18:08:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fixed bug with ignoring terminating NULL
+
+1998-03-20 Chris Tarpy <ctarpy@bhaji.cygnus.co.uk>
+
+ * configure: - regenerated
+ * Makefile.am: - Support added for libc testcases
+ * Makefile.in: regenerated
+ * configure.in: set c compiler, descend test dir
+ * tests/Makefile.in: added
+ * tests/Makefile.am: added
+ * tests/tcdiag.cxx : added
+
+
+Thu Mar 19 11:41:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Initial check-in of everything
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/signals/current/cdl/signals.cdl b/cesar/ecos/packages/language/c/libc/signals/current/cdl/signals.cdl
new file mode 100644
index 0000000000..ee96df0cd5
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/signals/current/cdl/signals.cdl
@@ -0,0 +1,280 @@
+# ====================================================================
+#
+# signals.cdl
+#
+# C library signal related configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jlarmour
+# Contributors:
+# Date: 2000-04-14
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_LIBC_SIGNALS {
+ display "ISO C library signal functions"
+ description "
+ This component controls signal functionality,
+ as implemented in ISO/IEC 9899:1990 chapter 7.7 with
+ the signal() and raise() functions. As well as
+ allowing a program to send itself signals, it is
+ also possible to cause hardware exceptions to
+ be signalled to the program in a similar way."
+ doc ref/libc.html
+ include_dir cyg/libc/signals
+ parent CYGPKG_LIBC
+ implements CYGINT_ISO_SIGNAL_NUMBERS
+ implements CYGINT_ISO_SIGNAL_IMPL
+ requires { CYGBLD_ISO_SIGNAL_NUMBERS_HEADER == \
+ "<cyg/libc/signals/signal.h>" }
+ requires { CYGBLD_ISO_SIGNAL_IMPL_HEADER == \
+ "<cyg/libc/signals/signal.h>" }
+ requires CYGPKG_ISOINFRA
+ compile raise.cxx siginit.cxx signal.cxx
+
+# ====================================================================
+
+ cdl_option CYGSEM_LIBC_SIGNALS_THREAD_SAFE {
+ display "Thread safe signals"
+ requires CYGPKG_KERNEL
+ default_value 1
+ description "
+ Because signal handlers are global, and not
+ thread-specific (as mandated by POSIX 1003.1)
+ it is possible for multiple threads to clash
+ and corrupt data if setting the same signal
+ handler at the same time. With this option
+ enabled, a kernel mutex will be used to protect
+ the shared data."
+ }
+
+ cdl_component CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS {
+ display "Hardware exceptions cause signals"
+ flavor bool
+ requires CYGSEM_KERNEL_EXCEPTIONS_GLOBAL
+ requires CYGSEM_KERNEL_EXCEPTIONS_DECODE
+ default_value 0
+ description "
+ This causes hardware exceptions like
+ arithmetic exceptions (e.g. divide by zero)
+ or bad memory accesses to be passed through as
+ signals. It is thus possible for a program to
+ handle these exceptions in a generic way using
+ the appropriate signal handlers. The details of
+ exactly which exceptions are passed through
+ under what circumstances depend on the
+ underlying HAL implementation. Consequently it
+ must be remembered that signal handlers cannot
+ be guaranteed to be invoked in the expected
+ circumstances if you do not know about the
+ underlying HAL implementation - it is possible
+ that the architecture is unable to detect that
+ exception."
+
+ cdl_option CYGSEM_LIBC_SIGNALS_CHAIN_HWEXCEPTIONS {
+ display "Chain old exception handlers"
+ default_value 1
+ description "
+ When hardware exceptions are generated, it
+ is possible to chain into the old kernel exception
+ handler before calling any registered signal
+ handler. If this is not required, disable this
+ option and only the signal handler will be
+ called when this exception occurs. Disabling
+ this option will also save some space and code
+ usage."
+ }
+ }
+
+ cdl_component CYGPKG_LIBC_SIGNALS_INLINE {
+ display "Inline versions of functions"
+ flavor none
+ description "
+ Some functions can be made inline instead of
+ being function calls. These can be set here."
+
+ cdl_option CYGIMP_LIBC_SIGNALS_RAISE_INLINE {
+ display "raise()"
+ default_value 1
+ description "
+ Enabling this option makes raise() an inline function."
+ }
+
+ cdl_option CYGIMP_LIBC_SIGNALS_SIGNAL_INLINE {
+ display "signal()"
+ default_value 1
+ description "
+ Enabling this option makes signal() an inline function."
+ }
+ }
+
+ cdl_component CYGPKG_LIBC_SIGNALS_ERROR_HANDLING {
+ display "Error handling"
+ flavor none
+ description "
+ You may or may not want errno to be set by
+ certain functions. Not using errno could save
+ both space, code, and avoid worrying about
+ interactions between multiple threads when
+ setting it."
+
+ cdl_option CYGSEM_LIBC_SIGNALS_BAD_SIGNAL_FATAL {
+ display "Bad signal fatal"
+ requires CYGDBG_USE_ASSERTS
+ default_value 0
+ description "
+ Enabling this option will cause an assertion
+ failure if the signal handling code is
+ passed a bad signal. Otherwise an error will
+ be returned, or in the case of a
+ hardware-generated exception it will be silently
+ ignored."
+ }
+
+ cdl_option CYGSEM_LIBC_SIGNALS_RAISE_SETS_ERRNO {
+ display "raise() sets errno"
+ requires CYGINT_ISO_ERRNO
+ requires CYGINT_ISO_ERRNO_CODES
+ default_value 1
+ description "
+ You may or may not want errno to be set by
+ raise() on error conditions. Not using errno
+ could save both space, code, and avoid worrying
+ about interactions between multiple threads when
+ setting it. Strictly ISO C does not mandate
+ that errno be set by raise()."
+ }
+
+ cdl_option CYGSEM_LIBC_SIGNALS_SIGNAL_SETS_ERRNO {
+ display "signal() sets errno"
+ requires CYGINT_ISO_ERRNO
+ requires CYGINT_ISO_ERRNO_CODES
+ default_value 1
+ description "
+ You may or may not want errno to be set by
+ signal() on error conditions. Not using errno
+ could save both space, code, and avoid worrying
+ about interactions between multiple threads when
+ setting it. Strictly ISO C mandates
+ that errno be set by signal()."
+ }
+ }
+
+ cdl_component CYGPKG_LIBC_SIGNALS_TRACING {
+ display "Tracing"
+ flavor none
+ description "
+ These options control the trace output for the C
+ library internal signal implementation."
+
+ cdl_option CYGNUM_LIBC_SIGNALS_RAISE_TRACE_LEVEL {
+ display "Default trace level for raise()"
+ flavor data
+ legal_values 0 to 1
+ default_value 0
+ description "
+ This gives the default tracing level for the
+ raise() function. Higher numbers are more
+ verbose."
+ }
+
+ cdl_option CYGNUM_LIBC_SIGNALS_HWHANDLER_TRACE_LEVEL {
+ display "Default hardware exception handler trace level"
+ flavor data
+ legal_values 0 to 1
+ default_value 0
+ description "
+ This gives the default tracing level for the
+ hardware exception handler function (if enabled).
+ Higher numbers are more verbose."
+ }
+ }
+
+# ====================================================================
+
+ cdl_component CYGPKG_LIBC_SIGNALS_OPTIONS {
+ display "C library signal functions build options"
+ flavor none
+ no_define
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_LIBC_SIGNALS_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the C library. These flags are used in addition
+ to the set of global flags."
+ }
+
+ cdl_option CYGPKG_LIBC_SIGNALS_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the C library. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_LIBC_SIGNALS_TESTS {
+ display "C library signal function tests"
+ flavor data
+ no_define
+ calculated {
+ "tests/signal1"
+ . ((CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS) ? " tests/signal2" : "")
+ }
+ description "
+ This option specifies the set of tests for the C library
+ signal functions."
+ }
+ }
+}
+
+# ====================================================================
+# EOF signals.cdl
diff --git a/cesar/ecos/packages/language/c/libc/signals/current/include/signal.h b/cesar/ecos/packages/language/c/libc/signals/current/include/signal.h
new file mode 100644
index 0000000000..24835e3fc2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/signals/current/include/signal.h
@@ -0,0 +1,152 @@
+#ifndef CYGONCE_LIBC_SIGNALS_SIGNAL_H
+#define CYGONCE_LIBC_SIGNALS_SIGNAL_H
+//========================================================================
+//
+// signal.h
+//
+// Definitions for ISO C and POSIX 1003.1 signals
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-18
+// Purpose: Provides description of interface to ISO C and POSIX 1003.1
+// signal functionality
+// Description:
+// Usage: Do not include this file directly - use #include <signal.h>
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_signals.h> // libc signals configuration
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+
+
+// TYPE DEFINITIONS
+
+// Integral type that can be accessed atomically - from ISO C 7.7
+typedef cyg_atomic sig_atomic_t;
+
+// Type of signal handler functions
+typedef void (*__sighandler_t)(int);
+
+
+
+// CONSTANTS
+
+// Signal handlers for use with signal(). We avoid 0 because in an embedded
+// system this may be e.g. start of ROM and thus a possible function pointer
+// for reset!
+
+#define SIG_DFL ((__sighandler_t) 1) // Default action
+#define SIG_IGN ((__sighandler_t) 2) // Ignore action
+#define SIG_ERR ((__sighandler_t)-1) // Error return
+
+// NB. We do not need to restrict SIG* definitions (e.g. by eliminating
+// POSIX signals) when using strict ISO C (permitted in 7.7)
+
+#define SIGNULL 0 // Reserved signal - do not use (POSIX 3.3.1.1)
+#define SIGHUP 1 // Hangup on controlling terminal (POSIX)
+#define SIGINT 2 // Interactive attention (ISO C)
+#define SIGQUIT 3 // Interactive termination (POSIX)
+#define SIGILL 4 // Illegal instruction (not reset when caught) (ISO C)
+#define SIGTRAP 5 // Trace trap (not reset when caught)
+#define SIGIOT 6 // IOT instruction
+#define SIGABRT 6 // Abnormal termination - used by abort() (ISO C)
+#define SIGEMT 7 // EMT instruction
+#define SIGFPE 8 // Floating Point Exception e.g. div by 0 (ISO C)
+#define SIGKILL 9 // Kill (cannot be caught or ignored) (POSIX)
+#define SIGBUS 10 // Bus error (POSIX)
+#define SIGSEGV 11 // Invalid memory reference (ISO C)
+#define SIGSYS 12 // Bad argument to system call (used by anything?)
+#define SIGPIPE 13 // Write on a pipe with no one to read it (POSIX)
+#define SIGALRM 14 // Alarm timeout (POSIX)
+#define SIGTERM 15 // Software termination request (ISO C)
+#define SIGUSR1 16 // Application-defined signal 1 (POSIX)
+#define SIGUSR2 17 // Application-defined signal 2 (POSIX)
+
+#define CYGNUM_LIBC_SIGNALS 18 // Maximum signal number + 1
+
+// FUNCTION PROTOTYPES
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//===========================================================================
+
+// ISO C functions
+
+//////////////////////////////
+// signal() - ISO C 7.7.1 //
+//////////////////////////////
+//
+// Installs a new signal handler for the specified signal, and returns
+// the old handler
+//
+
+extern __sighandler_t
+signal(int __sig, __sighandler_t __handler);
+
+///////////////////////////
+// raise() - ISO C 7.7.2 //
+///////////////////////////
+//
+// Raises the signal, which will cause the current signal handler for
+// that signal to be called
+//
+
+extern int
+raise(int __sig);
+
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#include <cyg/libc/signals/signal.inl>
+
+#endif // CYGONCE_LIBC_SIGNALS_SIGNAL_H multiple inclusion protection
+
+// EOF signal.h
diff --git a/cesar/ecos/packages/language/c/libc/signals/current/include/signal.inl b/cesar/ecos/packages/language/c/libc/signals/current/include/signal.inl
new file mode 100644
index 0000000000..988b8f3a1e
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/signals/current/include/signal.inl
@@ -0,0 +1,270 @@
+#ifndef CYGONCE_LIBC_SIGNALS_SIGNAL_INL
+#define CYGONCE_LIBC_SIGNALS_SIGNAL_INL
+//========================================================================
+//
+// signal.inl
+//
+// Inline functions for implementation of ISO C and POSIX signals
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-18
+// Purpose: Implements required inline functions of ISO C and
+// POSIX 1003.1 signals
+// Description:
+// Usage: Do not include this file directly, instead use <signal.h>
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_signals.h> // libc signals configuration
+
+// INCLUDES
+
+#include <signal.h> // Header for this file, just in case
+#include <cyg/infra/cyg_ass.h> // Assertion infrastructure
+#include <cyg/infra/cyg_trac.h> // Tracing infrastructure
+
+// GLOBALS
+
+extern __sighandler_t cyg_libc_signal_handlers[];
+#ifdef CYGDBG_USE_TRACING
+extern cyg_uint8 cyg_libc_signals_raise_trace_level;
+#endif
+
+// DEFINES
+
+// The following are overriden by the libc implementation to get a non-inline
+// version to prevent duplication of code
+#ifndef CYGPRI_LIBC_SIGNALS_RAISE_INLINE
+# define CYGPRI_LIBC_SIGNALS_RAISE_INLINE extern __inline__
+#endif
+
+#ifndef CYGPRI_LIBC_SIGNALS_SIGNAL_INLINE
+# define CYGPRI_LIBC_SIGNALS_SIGNAL_INLINE extern __inline__
+#endif
+
+// FUNCTION PROTOTYPES
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Default signal handler - SIG_DFL
+extern void cyg_libc_signals_default_handler(int __sig);
+
+#ifdef CYGSEM_LIBC_SIGNALS_THREAD_SAFE
+extern cyg_bool cyg_libc_signals_lock_do_lock(void);
+extern void cyg_libc_signals_lock_do_unlock(void);
+#endif
+
+// INLINE FUNCTIONS
+
+/////////////////////////////
+// cyg_libc_signals_lock() //
+/////////////////////////////
+
+static inline cyg_bool
+cyg_libc_signals_lock(void)
+{
+#ifdef CYGSEM_LIBC_SIGNALS_THREAD_SAFE
+ return cyg_libc_signals_lock_do_lock();
+#else
+ return true;
+#endif
+} // cyg_libc_signals_lock()
+
+///////////////////////////////
+// cyg_libc_signals_unlock() //
+///////////////////////////////
+
+static inline void
+cyg_libc_signals_unlock(void)
+{
+#ifdef CYGSEM_LIBC_SIGNALS_THREAD_SAFE
+ cyg_libc_signals_lock_do_unlock();
+#else
+ return;
+#endif
+} // cyg_libc_signals_unlock()
+
+// ISO C functions
+
+//////////////////////////////
+// signal() - ISO C 7.7.1 //
+//////////////////////////////
+
+
+#ifdef CYGIMP_LIBC_SIGNALS_SIGNAL_INLINE
+
+#ifdef CYGSEM_LIBC_SIGNALS_SIGNAL_SETS_ERRNO
+# include <errno.h> // errno
+#endif
+
+CYGPRI_LIBC_SIGNALS_SIGNAL_INLINE __sighandler_t
+signal(int __sig, __sighandler_t __handler)
+{
+ __sighandler_t __old_handler;
+ CYG_REPORT_FUNCNAMETYPE( "__signal", "returning %08x" );
+
+ CYG_REPORT_FUNCARG2( "signal number = %d, requested handler is at %08x",
+ __sig, __handler );
+
+ // check valid signal - raise should not raise the null signal either
+ if ( (__sig >= CYGNUM_LIBC_SIGNALS) || (__sig <= 0) ) {
+
+#ifdef CYGSEM_LIBC_SIGNALS_BAD_SIGNAL_FATAL
+ CYG_FAIL("__signal() passed bad signal number");
+#else
+# ifdef CYGSEM_LIBC_SIGNALS_SIGNAL_SETS_ERRNO
+ errno = EINVAL;
+# endif
+ return SIG_ERR;
+#endif
+ }
+
+ // paranoia
+ CYG_CHECK_DATA_PTR( cyg_libc_signal_handlers,
+ "signal handler array is invalid!" );
+ if ( (__handler != SIG_IGN) && (__handler != SIG_DFL) )
+ CYG_CHECK_FUNC_PTR( __handler, "__signal() passed invalid handler");
+
+ if (!cyg_libc_signals_lock()) {
+#ifdef CYGSEM_LIBC_SIGNALS_SIGNAL_SETS_ERRNO
+ errno = EINTR;
+#endif
+ return SIG_ERR;
+ } // if
+
+ __old_handler = cyg_libc_signal_handlers[__sig];
+ cyg_libc_signal_handlers[__sig] = __handler;
+
+ cyg_libc_signals_unlock();
+
+ CYG_REPORT_RETVAL( __old_handler );
+
+ return __old_handler;
+} // signal()
+#endif // ifdef CYGIMP_LIBC_SIGNALS_SIGNAL_INLINE
+
+
+///////////////////////////
+// raise() - ISO C 7.7.2 //
+///////////////////////////
+
+#ifdef CYGIMP_LIBC_SIGNALS_RAISE_INLINE
+
+#ifdef CYGSEM_LIBC_SIGNALS_RAISE_SETS_ERRNO
+# include <errno.h> // errno
+#endif
+
+CYGPRI_LIBC_SIGNALS_RAISE_INLINE int
+raise(int __sig)
+{
+ int __ret=0;
+ __sighandler_t __sigfun;
+
+ CYG_REPORT_FUNCNAMETYPE( "__raise", "returning %d" );
+
+ CYG_REPORT_FUNCARG1( "signal number = %d", __sig );
+
+ // check valid signal - raise should not raise the null signal either
+ if ( (__sig >= CYGNUM_LIBC_SIGNALS) || (__sig <= 0) ) {
+
+#ifdef CYGSEM_LIBC_SIGNALS_BAD_SIGNAL_FATAL
+ CYG_FAIL("__raise() passed bad signal number");
+#else
+# ifdef CYGSEM_LIBC_SIGNALS_RAISE_SETS_ERRNO
+ errno = EINVAL;
+# endif
+ return -1;
+#endif
+ }
+
+ // paranoia
+ CYG_CHECK_DATA_PTR( cyg_libc_signal_handlers,
+ "signal handler array is invalid!" );
+
+ if (!cyg_libc_signals_lock()) {
+#ifdef CYGSEM_LIBC_SIGNALS_RAISE_SETS_ERRNO
+ errno = EINTR;
+#endif
+ return -1;
+ } // if
+
+ __sigfun = cyg_libc_signal_handlers[__sig];
+
+ if ( __sigfun == SIG_DFL ) {
+ CYG_TRACE0(cyg_libc_signals_raise_trace_level,
+ "signal handler returned is SIG_DFL");
+ cyg_libc_signals_unlock();
+ cyg_libc_signals_default_handler(__sig);
+ } else if ( __sigfun == SIG_IGN ) {
+ CYG_TRACE0(cyg_libc_signals_raise_trace_level,
+ "signal handler returned is SIG_IGN");
+ cyg_libc_signals_unlock();
+ } else {
+ CYG_TRACE1(cyg_libc_signals_raise_trace_level,
+ "signal handler returned is at %08x", __sigfun);
+ // call the signal handler directly
+ cyg_libc_signal_handlers[__sig] = SIG_DFL;
+
+ cyg_libc_signals_unlock();
+ CYG_CHECK_FUNC_PTR( __sigfun, "returned signal handler invalid!");
+
+ (*__sigfun)(__sig);
+ }
+
+ CYG_REPORT_RETVAL( __ret );
+
+ return __ret;
+} // raise()
+#endif // ifdef CYGIMP_LIBC_SIGNALS_RAISE_INLINE
+
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // CYGONCE_LIBC_SIGNALS_SIGNAL_INL multiple inclusion protection
+
+// EOF signal.inl
diff --git a/cesar/ecos/packages/language/c/libc/signals/current/src/raise.cxx b/cesar/ecos/packages/language/c/libc/signals/current/src/raise.cxx
new file mode 100644
index 0000000000..59f35b0390
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/signals/current/src/raise.cxx
@@ -0,0 +1,78 @@
+//========================================================================
+//
+// raise.cxx
+//
+// ISO C and POSIX 1003.1 signals implementation for raise()
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-18
+// Purpose: Provide implementation of ISO C and POSIX 1003.1 raise()
+// Description: This file provides the linkable symbol version of raise()
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_signals.h> // libc signals configuration
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+
+// The following lines allow __raise() to be included non-inline which
+// actually defines it as a function here
+#define CYGPRI_LIBC_SIGNALS_RAISE_INLINE
+#ifndef CYGIMP_LIBC_SIGNALS_RAISE_INLINE
+# define CYGIMP_LIBC_SIGNALS_RAISE_INLINE
+#endif
+
+#include <signal.h> // Main signals definitions
+
+// GLOBALS
+
+#ifdef CYGDBG_USE_TRACING
+cyg_uint8
+cyg_libc_signals_raise_trace_level = CYGNUM_LIBC_SIGNALS_RAISE_TRACE_LEVEL;
+#endif
+
+// EOF raise.cxx
diff --git a/cesar/ecos/packages/language/c/libc/signals/current/src/siginit.cxx b/cesar/ecos/packages/language/c/libc/signals/current/src/siginit.cxx
new file mode 100644
index 0000000000..1048941964
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/signals/current/src/siginit.cxx
@@ -0,0 +1,434 @@
+//========================================================================
+//
+// siginit.cxx
+//
+// ISO C and POSIX 1003.1 signals implementation
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-18
+// Purpose: Provide implementation of ISO C and POSIX 1003.1 signals
+// Description: This file initializes all hardware exceptions,
+// initializes the signal handler table and provides the
+// default action function for signals
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_signals.h> // libc signals configuration
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <signal.h> // Main signals definitions
+#include <cyg/infra/cyg_ass.h> // Assertion infrastructure
+#include <cyg/infra/cyg_trac.h> // Tracing infrastructure
+#include <stdlib.h> // exit()
+
+#ifdef CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS
+# include <pkgconf/kernel.h> // required for kernel includes
+# include <cyg/kernel/except.hxx> // Kernel exception API
+# include <cyg/kernel/thread.hxx> // Cyg_Thread::self()
+# include <cyg/kernel/thread.inl> // inline definitions for above
+# include <cyg/kernel/intr.hxx> // Interrupt enable
+# include <cyg/hal/hal_intr.h> // HAL interrupt control
+#endif
+
+#ifdef CYGSEM_LIBC_SIGNALS_THREAD_SAFE
+# include <pkgconf/kernel.h> // required for kernel includes
+# include <cyg/kernel/mutex.hxx>
+#endif
+
+// TYPE DEFINITIONS
+
+// define dummy class to allow initialization of cyg_libc_signal_handlers
+
+class Cyg_libc_signals_dummy_init_class {
+public:
+ Cyg_libc_signals_dummy_init_class();
+};
+
+#ifdef CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS
+
+struct exception_signal_mapping_t {
+ cyg_code exception;
+ int signal;
+};
+
+// EXTERNS
+
+extern cyg_exception_handler cyg_null_exception_handler;
+
+#endif // ifdef CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS
+
+// GLOBALS
+
+// main signal handlers
+__sighandler_t cyg_libc_signal_handlers[CYGNUM_LIBC_SIGNALS];
+
+#ifdef CYGSEM_LIBC_SIGNALS_THREAD_SAFE
+Cyg_Mutex cyg_libc_signal_handlers_mutex CYG_INIT_PRIORITY(LIBC);
+#endif
+
+// STATICS
+
+// dummy object to invoke constructor
+static Cyg_libc_signals_dummy_init_class
+cyg_libc_signals_dummy_init_obj CYG_INIT_PRIORITY(LIBC);
+
+#ifdef CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS
+
+# ifdef CYGDBG_USE_TRACING
+static cyg_uint8 cyg_libc_signals_hwhandler_trace_level =
+ CYGNUM_LIBC_SIGNALS_HWHANDLER_TRACE_LEVEL;
+# define TL1 (0 < cyg_libc_signals_hwhandler_trace_level)
+# endif
+
+# ifdef CYGSEM_LIBC_SIGNALS_CHAIN_HWEXCEPTIONS
+// old exception info so we can chain
+// FIXME: consider malloced linked list config option
+static struct {
+ cyg_exception_handler *old_handler;
+ CYG_ADDRWORD old_data;
+} exception_chain_data[CYGNUM_HAL_EXCEPTION_COUNT];
+# endif
+
+// struct that maps exceptions to signals
+static const struct exception_signal_mapping_t
+exception_signal_mapping[] = {
+
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_ACCESS
+ {CYGNUM_HAL_EXCEPTION_DATA_ACCESS, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_WRITE
+ {CYGNUM_HAL_EXCEPTION_DATA_WRITE, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_CODE_ACCESS
+ {CYGNUM_HAL_EXCEPTION_CODE_ACCESS, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_CODE_WRITE
+ {CYGNUM_HAL_EXCEPTION_CODE_WRITE, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_CODE_EXECUTE
+ {CYGNUM_HAL_EXCEPTION_CODE_EXECUTE, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_IO_ACCESS
+ {CYGNUM_HAL_EXCEPTION_IO_ACCESS, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_IO_WRITE
+ {CYGNUM_HAL_EXCEPTION_IO_ACCESS, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_TLBMISS_ACCESS
+ {CYGNUM_HAL_EXCEPTION_DATA_TLBMISS_ACCESS, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_TLBMISS_WRITE
+ {CYGNUM_HAL_EXCEPTION_DATA_TLBMISS_WRITE, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_CODE_TLBMISS_ACCESS
+ {CYGNUM_HAL_EXCEPTION_CODE_TLBMISS_ACCESS, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_CODE_TLBMISS_WRITE
+ {CYGNUM_HAL_EXCEPTION_CODE_TLBMISS_WRITE, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_TLBERROR_ACCESS
+ {CYGNUM_HAL_EXCEPTION_DATA_TLBERROR_ACCESS, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_TLBERROR_WRITE
+ {CYGNUM_HAL_EXCEPTION_DATA_TLBERROR_WRITE, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_CODE_TLBERROR_ACCESS
+ {CYGNUM_HAL_EXCEPTION_CODE_TLBERROR_ACCESS, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_CODE_TLBERROR_WRITE
+ {CYGNUM_HAL_EXCEPTION_CODE_TLBERROR_WRITE, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS
+ {CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_WRITE
+ {CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_WRITE, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_IO_UNALIGNED_ACCESS
+ {CYGNUM_HAL_EXCEPTION_IO_UNALIGNED_ACCESS, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_IO_UNALIGNED_WRITE
+ {CYGNUM_HAL_EXCEPTION_IO_UNALIGNED_WRITE, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION
+ {CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION, SIGILL},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_INTERRUPT
+ {CYGNUM_HAL_EXCEPTION_INTERRUPT, SIGINT},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_TRAP
+ {CYGNUM_HAL_EXCEPTION_TRAP, SIGTRAP},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DIV_BY_ZERO
+ {CYGNUM_HAL_EXCEPTION_DIV_BY_ZERO, SIGFPE},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_OVERFLOW
+ {CYGNUM_HAL_EXCEPTION_OVERFLOW, SIGFPE},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_BOUNDS
+ {CYGNUM_HAL_EXCEPTION_BOUNDS, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_SINGLE_STEP
+ {CYGNUM_HAL_EXCEPTION_SINGLE_STEP, SIGTRAP},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_INSTRUCTION_BP
+ {CYGNUM_HAL_EXCEPTION_INSTRUCTION_BP, SIGTRAP},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_PERIPHERAL_BP
+ {CYGNUM_HAL_EXCEPTION_PERIPHERAL_BP, SIGTRAP},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_BP
+ {CYGNUM_HAL_EXCEPTION_DATA_BP, SIGTRAP},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DEVELOPMENT_BP
+ {CYGNUM_HAL_EXCEPTION_DEVELOPMENT_BP, SIGTRAP},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_STACK_OVERFLOW
+ {CYGNUM_HAL_EXCEPTION_STACK_OVERFLOW, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_STACK_FAULT
+ {CYGNUM_HAL_EXCEPTION_STACK_FAULT, SIGSEGV},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_PARITY
+ {CYGNUM_HAL_EXCEPTION_PARITY, SIGBUS},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU
+ {CYGNUM_HAL_EXCEPTION_FPU, SIGFPE},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU_NOT_AVAIL
+ {CYGNUM_HAL_EXCEPTION_FPU_NOT_AVAIL, SIGFPE},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU_OVERFLOW
+ {CYGNUM_HAL_EXCEPTION_FPU_OVERFLOW, SIGFPE},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU_UNDERFLOW
+ {CYGNUM_HAL_EXCEPTION_FPU_UNDERFLOW, SIGFPE},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU_DIV_BY_ZERO
+ {CYGNUM_HAL_EXCEPTION_FPU_DIV_BY_ZERO, SIGFPE},
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_SYSTEM_CALL
+ {CYGNUM_HAL_EXCEPTION_SYSTEM_CALL, SIGSYS},
+#endif
+ {0, 0} // dummy value to ensure compiler is happy
+};
+
+
+// FUNCTIONS
+
+/////////////////////////////////////////
+// cyg_libc_signals_hwexcept_handler() //
+/////////////////////////////////////////
+
+// FIXME: should be able to get this work with
+// CYGSEM_KERNEL_EXCEPTIONS_DECODE disabled as well as enabled
+static void
+cyg_libc_signals_hwexcept_handler( CYG_ADDRWORD data, cyg_code exception,
+ CYG_ADDRWORD info)
+{
+ int signal = (int)data;
+ int ret;
+
+ CYG_REPORT_FUNCNAME("cyg_libc_signals_hwexcept_handler");
+
+ CYG_REPORT_FUNCARG3( "data = %08x, exception = %d, info = %08x",
+ data, exception, info );
+
+#ifdef CYGSEM_LIBC_SIGNALS_BAD_SIGNAL_FATAL
+ CYG_PRECONDITION((signal > 0) && (signal < CYGNUM_LIBC_SIGNALS),
+ "Signal number not valid!");
+#endif
+
+// chain first as it may be more useful more low-level stuff needed
+#ifdef CYGSEM_LIBC_SIGNALS_CHAIN_HWEXCEPTIONS
+ // map exception to 0..CYGNUM_HAL_EXCEPTION_COUNT
+ exception -= CYGNUM_HAL_EXCEPTION_MIN;
+
+ // special case for null handler since it is only for uncaught exceptions
+
+ if (exception_chain_data[exception].old_handler !=
+ cyg_null_exception_handler) {
+ (*exception_chain_data[exception].old_handler)(
+ exception_chain_data[exception].old_data, exception, info);
+ CYG_TRACE0(TL1, "Chained exception handler returned");
+ } // if
+#endif
+
+#ifndef CYGSEM_LIBC_SIGNALS_BAD_SIGNAL_FATAL
+ // if not fatal, silently return
+ if ((signal <= 0) || (signal >= CYGNUM_LIBC_SIGNALS)) {
+ CYG_REPORT_RETURN();
+ return;
+ }
+#endif
+
+ CYG_TRACE0(TL1, "Enabling interrupts");
+ HAL_ENABLE_INTERRUPTS();
+
+ CYG_TRACE0(TL1, "Raising signal");
+ ret = raise(signal);
+
+ if (ret) {
+ CYG_TRACE1(TL1, "raise() returned non-zero value %d!!!", ret);
+ } // if
+
+ CYG_REPORT_RETURN();
+} // cyg_libc_signals_hwexcept_handler()
+
+
+//////////////////
+// reg_except() //
+//////////////////
+
+static void inline
+reg_except( cyg_code exception, int signal )
+{
+ Cyg_Thread::self()->register_exception(
+ exception, &cyg_libc_signals_hwexcept_handler, (CYG_ADDRWORD)signal,
+#ifdef CYGSEM_LIBC_SIGNALS_CHAIN_HWEXCEPTIONS
+ &exception_chain_data[exception -
+ CYGNUM_HAL_EXCEPTION_MIN].old_handler,
+ &exception_chain_data[exception - CYGNUM_HAL_EXCEPTION_MIN].old_data
+#else
+ NULL, NULL
+#endif
+ );
+
+} // reg_except();
+
+#endif // ifdef CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS
+
+///////////////////////////////////////////////////
+// Cyg_libc_signals_dummy_init_class constructor //
+///////////////////////////////////////////////////
+
+Cyg_libc_signals_dummy_init_class::Cyg_libc_signals_dummy_init_class()
+{
+ cyg_ucount8 i;
+
+ CYG_REPORT_FUNCNAME("Cyg_libc_signals_dummy_init_class constructor");
+
+ // FIXME: some should be SIG_IGN?
+ for (i=0; i<CYGNUM_LIBC_SIGNALS; i++)
+ cyg_libc_signal_handlers[i] = SIG_DFL;
+
+#ifdef CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS
+ // go through the entire array of exceptions, _but_ subtract 1 for
+ // the dummy at the end
+ for (i=0; i < (sizeof(exception_signal_mapping) /
+ sizeof(exception_signal_mapping_t) - 1); i++) {
+ CYG_ASSERT( (exception_signal_mapping[i].exception <=
+ CYGNUM_HAL_EXCEPTION_MAX) &&
+ (exception_signal_mapping[i].exception >=
+ CYGNUM_HAL_EXCEPTION_MIN),
+ "Asked to register bad exception");
+
+ CYG_ASSERT( (exception_signal_mapping[i].signal > 0) &&
+ (exception_signal_mapping[i].signal <
+ CYGNUM_LIBC_SIGNALS), "Asked to register bad signal" );
+
+ reg_except( exception_signal_mapping[i].exception,
+ exception_signal_mapping[i].signal);
+ }
+#endif
+
+ CYG_REPORT_RETURN();
+} // Cyg_libc_signals_dummy_init_class() constructor
+
+
+////////////////////////////////////////
+// cyg_libc_signals_default_handler() //
+////////////////////////////////////////
+
+// Default signal handler - SIG_DFL
+externC void
+cyg_libc_signals_default_handler(int sig)
+{
+ CYG_REPORT_FUNCNAME( "cyg_libc_signals_default_handler" );
+
+ CYG_REPORT_FUNCARG1( "signal number = %d", sig );
+
+ exit(1000 + sig); // FIXME
+
+ CYG_REPORT_RETURN();
+} // cyg_libc_signals_default_handler()
+
+#ifdef CYGSEM_LIBC_SIGNALS_THREAD_SAFE
+/////////////////////////////////////
+// cyg_libc_signals_lock_do_lock() //
+/////////////////////////////////////
+
+externC cyg_bool
+cyg_libc_signals_lock_do_lock(void)
+{
+ cyg_bool ret;
+ CYG_REPORT_FUNCNAMETYPE("cyg_libc_signals_lock_do_lock", "returning %d");
+
+ ret = cyg_libc_signal_handlers_mutex.lock();
+
+ CYG_REPORT_RETVAL(ret);
+
+ return ret;
+} // cyg_libc_signals_lock_do_lock()
+
+///////////////////////////////////////
+// cyg_libc_signals_lock_do_unlock() //
+///////////////////////////////////////
+
+externC void
+cyg_libc_signals_lock_do_unlock(void)
+{
+ CYG_REPORT_FUNCNAME("cyg_libc_signals_lock_do_unlock");
+
+ cyg_libc_signal_handlers_mutex.unlock();
+
+ CYG_REPORT_RETURN();
+} // cyg_libc_signals_lock_do_unlock()
+
+#endif // ifdef CYGSEM_LIBC_SIGNALS_THREAD_SAFE
+
+// EOF siginit.cxx
diff --git a/cesar/ecos/packages/language/c/libc/signals/current/src/signal.cxx b/cesar/ecos/packages/language/c/libc/signals/current/src/signal.cxx
new file mode 100644
index 0000000000..28c8307279
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/signals/current/src/signal.cxx
@@ -0,0 +1,71 @@
+//========================================================================
+//
+// signal.cxx
+//
+// ISO C and POSIX 1003.1 signals implementation
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-18
+// Purpose: Provide implementation of ISO C and POSIX 1003.1 signals
+// Description: This file provides the linkable symbol version of raise()
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_signals.h> // libc signals configuration
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+
+// The following lines allow __raise() to be included non-inline which
+// actually defines it as a function here
+#define CYGPRI_LIBC_SIGNALS_SIGNAL_INLINE
+#ifndef CYGIMP_LIBC_SIGNALS_SIGNAL_INLINE
+# define CYGIMP_LIBC_SIGNALS_SIGNAL_INLINE
+#endif
+
+#include <signal.h> // Main signals definitions
+
+// EOF signal.cxx
diff --git a/cesar/ecos/packages/language/c/libc/signals/current/tests/signal1.c b/cesar/ecos/packages/language/c/libc/signals/current/tests/signal1.c
new file mode 100644
index 0000000000..0c38d84454
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/signals/current/tests/signal1.c
@@ -0,0 +1,210 @@
+//========================================================================
+//
+// signal1.c
+//
+// ISO C signal handling test
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-18
+// Purpose: Test signal functionality
+// Description: This file contains a number of tests for ISO C signal
+// handling
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_signals.h> // libc signals configuration
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <signal.h> // Signal functions
+#include <setjmp.h> // setjmp(), longjmp()
+#include <stdlib.h> // abort()
+
+// STATICS
+
+static int state;
+static jmp_buf jbuf;
+
+// FUNCTIONS
+
+static void
+myhandler1(int signal)
+{
+ CYG_TEST_INFO("myhandler1 called");
+ ++state;
+} // myhandler1()
+
+static void
+myhandler2(int signal)
+{
+ CYG_TEST_INFO("myhandler2 called");
+ ++state;
+ longjmp(jbuf, 1);
+} // myhandler2()
+
+int
+main( int argc, char *argv[] )
+{
+ __sighandler_t handler1;
+ int rc;
+
+ // special callout to request GDB to alter its handling of signals
+ CYG_TEST_GDBCMD("handle SIGTERM nostop");
+ CYG_TEST_GDBCMD("handle SIGABRT nostop");
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C "
+ "library signal functions");
+
+ // Test 1
+
+ CYG_TEST_INFO("Test 1");
+ state = 1;
+ handler1 = signal(SIGTERM, &myhandler1);
+
+ CYG_TEST_PASS_FAIL(handler1 == SIG_DFL,
+ "SIGTERM handler initialized to default");
+
+ rc = raise(SIGTERM);
+
+ CYG_TEST_PASS_FAIL(0==rc, "raise(SIGTERM) did not return error");
+
+ CYG_TEST_PASS_FAIL(2==state, "SIGTERM handler returned correctly");
+
+ // Test 2
+
+ CYG_TEST_INFO("Test 2");
+
+ state = 2;
+ handler1 = signal(SIGTERM, &myhandler2);
+
+ CYG_TEST_PASS_FAIL(handler1 == SIG_DFL,
+ "SIGTERM handler reset to default after test 1");
+
+ handler1 = signal(SIGTERM, &myhandler1);
+
+ CYG_TEST_PASS_FAIL(handler1 == &myhandler2,
+ "SIGTERM handler was set correctly");
+
+ rc = raise(SIGTERM);
+
+ CYG_TEST_PASS_FAIL(0==rc, "raise(SIGTERM) did not return error");
+
+ CYG_TEST_PASS_FAIL(3==state, "SIGTERM handler returned correctly");
+
+ // Test 3
+
+ CYG_TEST_INFO("Test 3");
+
+ handler1 = signal(SIGTERM, &myhandler2);
+
+ CYG_TEST_PASS_FAIL(handler1 == SIG_DFL,
+ "SIGTERM handler reset to default after test 2");
+
+ handler1 = signal(SIGTERM, SIG_DFL);
+
+ CYG_TEST_PASS_FAIL(handler1 == &myhandler2,
+ "SIGTERM handler was set correctly");
+
+ // Test 4
+
+ CYG_TEST_INFO("Test 4");
+
+ state = 4;
+ handler1 = signal(SIGTERM, SIG_IGN);
+
+ CYG_TEST_PASS_FAIL(handler1 == SIG_DFL,
+ "SIGTERM handler was set correctly after test 3");
+ rc = raise(SIGTERM);
+
+ CYG_TEST_PASS_FAIL(0==rc, "raise(SIGTERM) did not return error");
+
+ CYG_TEST_PASS_FAIL(4==state, "SIGTERM ignored");
+
+ // Test 5
+
+ CYG_TEST_INFO("Test 5");
+
+ state = 5;
+ handler1 = signal(SIGTERM, &myhandler2);
+
+ // SIG_IGN doesn't reset back to SIG_DFL after a raise()
+ CYG_TEST_PASS_FAIL(handler1 == SIG_IGN,
+ "SIGTERM handler was set correctly after test 4");
+
+ if (0==setjmp(jbuf)) {
+ raise(SIGTERM);
+ CYG_TEST_FAIL("raise returned");
+ }
+
+ CYG_TEST_PASS_FAIL(6==state, "SIGTERM handler returned correctly");
+
+ // Test 6
+
+ CYG_TEST_INFO("Test 6");
+
+ state = 6;
+ handler1 = signal(SIGABRT, &myhandler2);
+
+ CYG_TEST_PASS_FAIL(handler1 == SIG_DFL,
+ "SIGABRT handler initialized to default");
+
+ if (0==setjmp(jbuf)) {
+ abort();
+ CYG_TEST_FAIL("abort returned");
+ }
+
+ CYG_TEST_PASS_FAIL(7==state, "SIGABRT handler returned correctly");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C "
+ "library signal functions");
+
+ return 0;
+} // main()
+
+// EOF signal1.c
diff --git a/cesar/ecos/packages/language/c/libc/signals/current/tests/signal2.c b/cesar/ecos/packages/language/c/libc/signals/current/tests/signal2.c
new file mode 100644
index 0000000000..202b4a93a1
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/signals/current/tests/signal2.c
@@ -0,0 +1,299 @@
+//========================================================================
+//
+// signal2.c
+//
+// ISO C signal handling test
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-18
+// Purpose: Test hardware signal functionality
+// Description: This file contains a number of tests for ISO C signal
+// handling when used with hardware exceptions
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/system.h>
+#include <pkgconf/libc_signals.h> // C library signals configuration
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+
+#ifdef CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS
+
+#include <cyg/hal/hal_intr.h> // exception ranges &
+ // HAL_VSR_SET_TO_ECOS_HANDLER
+
+#include <signal.h> // Signal functions
+#include <setjmp.h> // setjmp(), longjmp()
+
+// STATICS
+
+static int state;
+static jmp_buf jbuf;
+#endif
+
+// FUNCTIONS
+
+#ifdef CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS
+
+static void
+myhandler(int sig)
+{
+ __sighandler_t handler1;
+
+ CYG_TEST_INFO("myhandler() called");
+ ++state;
+
+ handler1 = signal(sig, &myhandler);
+
+ CYG_TEST_PASS_FAIL(handler1 == SIG_DFL,
+ "handler reset itself to default");
+
+ longjmp(jbuf, 1);
+} // myhandler()
+
+static void
+cause_memerror(void)
+{
+#ifdef CYGPKG_HAL_I386
+
+ // In the x86 architecture, although we have the DATA_ACCESS
+ // exception available, it is not possible to provoke it using the
+ // normal code of this test. This is because the normal segments we
+ // have installed in the segment registers cover all of memory. Instead we
+ // set GS to a descriptor that does not cover 0xF0000000-0xFFFFFFFF and
+ // poke at that.
+
+ __asm__ ( "movw $0x20,%%ax\n"
+ "movw %%ax,%%gs\n"
+ "movl %%gs:0xF0000000,%%eax\n"
+ :
+ :
+ : "eax"
+ );
+
+#else
+ volatile int x;
+ volatile CYG_ADDRESS p=(CYG_ADDRESS) &state;
+
+ do {
+ // do a read which prevents us accidentally writing over something
+ // important. Make it misaligned to increase the chances of an
+ // exception happening
+ x = *(volatile int *)(p+1);
+ p += (CYG_ADDRESS)0x100000;
+ } while(p != 0);
+#endif
+} // cause_memerror()
+
+// num must always be 0 - do it this way in case the optimizer tries to
+// get smart
+static int
+cause_fpe(int num)
+{
+ double a;
+
+ a = 1.0/num; // Depending on FPU emulation and/or
+ // the FPU architecture, this may
+ // cause an exception.
+ // (float division by zero)
+
+ return ((int)a)/num; // This may cause an exception if
+ // the architecture supports it.
+ // (integer division by zero).
+} // cause_fpe()
+
+volatile int tmp;
+
+#endif
+
+
+int
+main( int argc, char *argv[] )
+{
+#ifdef CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS
+ __sighandler_t handler1;
+
+ // special callout to request GDB to alter its handling of signals
+ CYG_TEST_GDBCMD("handle SIGBUS nostop");
+ CYG_TEST_GDBCMD("handle SIGSEGV nostop");
+ CYG_TEST_GDBCMD("handle SIGILL nostop");
+ CYG_TEST_GDBCMD("handle SIGFPE nostop");
+ CYG_TEST_GDBCMD("handle SIGSYS nostop");
+#endif // ifdef CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS
+
+ CYG_TEST_INIT();
+
+#ifdef CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS
+ // Avoid compiler warnings if tests are not applicable.
+ if (0) cause_memerror();
+ if (0) cause_fpe(0);
+#endif
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C "
+ "library signal functions");
+
+// Now reset the exception handlers various to eCos handlers so that we
+// have control; this is the target side equivalent of the CYG_TEST_GDBCMD
+// lines above:
+#ifdef HAL_VSR_SET_TO_ECOS_HANDLER
+ // Reclaim the VSR off CygMon possibly
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_ACCESS
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_DATA_ACCESS, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_TLBMISS_ACCESS
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_DATA_TLBMISS_ACCESS, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_DIV_BY_ZERO
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_DIV_BY_ZERO, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_FPU, NULL );
+#endif
+#ifdef CYGNUM_HAL_EXCEPTION_FPU_DIV_BY_ZERO
+ HAL_VSR_SET_TO_ECOS_HANDLER( CYGNUM_HAL_EXCEPTION_FPU_DIV_BY_ZERO, NULL );
+#endif
+#endif
+
+#ifdef CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS
+
+
+ // Test 1
+
+ CYG_TEST_INFO("Test 1");
+
+ handler1 = signal(SIGSEGV, &myhandler);
+
+ CYG_TEST_PASS_FAIL(handler1 == SIG_DFL,
+ "SIGSEGV handler initialized to default");
+
+
+ handler1 = signal(SIGBUS, &myhandler);
+
+ CYG_TEST_PASS_FAIL(handler1 == SIG_DFL,
+ "SIGBUS handler initialized to default");
+
+
+ handler1 = signal(SIGILL, &myhandler);
+
+ CYG_TEST_PASS_FAIL(handler1 == SIG_DFL,
+ "SIGILL handler initialized to default");
+
+ handler1 = signal(SIGSYS, &myhandler);
+
+ CYG_TEST_PASS_FAIL(handler1 == SIG_DFL,
+ "SIGSYS handler initialized to default");
+
+ handler1 = signal(SIGTRAP, &myhandler);
+
+ CYG_TEST_PASS_FAIL(handler1 == SIG_DFL,
+ "SIGTRAP handler initialized to default");
+
+ handler1 = signal(SIGFPE, &myhandler);
+
+ CYG_TEST_PASS_FAIL(handler1 == SIG_DFL,
+ "SIGFPE handler initialized to default");
+
+ // Test 2
+
+ CYG_TEST_INFO("Test 2");
+
+ state = 2;
+
+#if defined(CYGPKG_HAL_POWERPC_SIM)
+ // The exception generated by the SIM is not recognized by GDB.
+ // PR 19945 workaround.
+ CYG_TEST_PASS("Test 2 not applicable to PowerPC SIM");
+#else
+ if (0==setjmp(jbuf)) {
+ cause_memerror();
+ CYG_TEST_FAIL("Didn't cause exception");
+ }
+
+ CYG_TEST_PASS_FAIL(3==state, "handler returned correctly");
+#endif
+
+ // Test 3
+
+ CYG_TEST_INFO("Test 3");
+
+ state = 3;
+
+#ifdef CYGNUM_HAL_EXCEPTION_FPU_DIV_BY_ZERO
+
+ if (0==setjmp(jbuf)) {
+ // It is necessary to save the return value in a volatile
+ // variable, or GCC will get rid of the call.
+ tmp = cause_fpe(0);
+ CYG_TEST_FAIL("Didn't cause exception");
+ }
+
+ CYG_TEST_PASS_FAIL(4==state, "handler returned correctly");
+
+#else
+
+ CYG_TEST_INFO("Test 3 - provoke FP error - not supported");
+
+#endif
+
+#else
+ CYG_TEST_NA("Testing not applicable to this configuration");
+#endif
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C "
+ "library signal functions");
+
+ return 0;
+} // main()
+
+// EOF signal2.c
diff --git a/cesar/ecos/packages/language/c/libc/startup/current/ChangeLog b/cesar/ecos/packages/language/c/libc/startup/current/ChangeLog
new file mode 100644
index 0000000000..ecd0c6fbfa
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/startup/current/ChangeLog
@@ -0,0 +1,110 @@
+2003-03-07 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/mainthread.cxx: Align stack to relevant architecture alignment.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/startup.cdl: Fix doc link.
+
+2002-04-09 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/_exit.cxx (_exit): Assert on non-zero error.
+
+2001-10-09 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/invokemain.cxx (cyg_libc_invoke_main): CYGINT_ISO_PTHREAD_IMPL
+ needs #ifdef not #if now.
+
+2000-12-22 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/startup.cdl: Allow others to say whether main() can be invoked
+ elsewhere.
+ Use defaults for startup context implementor using above interface
+ rather than POSIX pthread package.
+ Allow main() stack to be visible for other implementors, except
+ when called from the init context since the stack size isn't used
+ there, or when the implementation says it doesn't use it.
+ Define an interface to express that the stack size option
+ isn't used in such cases.
+
+2000-10-12 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/startup.cdl (CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS):
+ Special case for POSIX package startup since we know it calls
+ cyg_libc_invoke_main() rather than main directly.
+
+2000-08-07 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/invokemain.cxx: Declare cyg_hal_stop_constructors
+
+2000-07-31 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/cstartup.cxx: Fix typo
+
+2000-07-19 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/startup.cdl:
+ Make a "radio button" choice between how main() gets invoked (eCos
+ thread vs. cyg_user_start vs. someone else doing it)
+
+ * src/mainthread.cxx: Move cyg_libc_dummy_constructor_class to
+ src/invokemain.cxx
+
+ * src/invokemain.cxx: Invoke pthread_exit() instead of exit() if
+ relevant
+
+ * src/cstartup.cxx:
+ Only fiddle with cyg_user_start() if
+ CYGSEM_LIBC_STARTUP_MAIN_INITCONTEXT defined
+
+2000-07-04 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/abort.cxx: Fix configuration dependency on CYGINT_ISO_SIGNAL_IMPL
+
+2000-05-20 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/startup.cdl (CYGSEM_LIBC_EXIT_STOPS_SYSTEM):
+ default to 0 always
+
+2000-05-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * New package
+ Separated original libc out into separate packages on functional
+ boundaries.
+ Header files are now managed by isoinfra package
+ Plenty of cleanups done, but no major functionality changes
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/startup/current/ChangeLog.libc b/cesar/ecos/packages/language/c/libc/startup/current/ChangeLog.libc
new file mode 100644
index 0000000000..88fb2f11f2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/startup/current/ChangeLog.libc
@@ -0,0 +1,2736 @@
+This ChangeLog file is now obsolete. This is the original ChangeLog from when
+libc was one large package, before being separated. It is included for
+historical reasons.
+
+2000-04-05 Jesper Skov <jskov@redhat.com>
+
+ * src/time/settime.cxx:
+ * src/time/time.cxx:
+ Wallclock moved to io/.
+
+2000-03-28 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/string.cdl,
+ cdl/stdlib.cdl,
+ cdl/stdio.cdl,
+ cdl/libc.cdl:
+
+ Adjust documentation URLs.
+
+2000-03-27 Jesper Skov <jskov@redhat.com>
+
+ * src/clibincl/stream.inl (check_this): Use cyb_bool instead of bool.
+
+2000-03-06 Jesper Skov <jskov@redhat.com>
+
+ * tests/time/strftime.c (test): Adjust test to match below change.
+
+2000-03-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/time/strftime.cxx (do_format): Make sure %m counts from
+ 1..12 rather than 0..11. Fix for case 103300
+
+2000-02-29 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: Correctly use 'n' parameter to
+ restrict length. Credit due to Andrew Lunn here as well.
+ Resolves 103057-CR-1
+
+ * tests/stdio/sprintf2.c (test):
+ Add snprintf tests to verify the correct behaviour of restricting
+ output length
+
+2000-02-10 Jesper Skov <jskov@redhat.com>
+
+ * tests/signal/signal2.c (main):
+ Also reclaim DATA_TLB_MISS vector if available.
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+
+1999-11-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * cdl/string.cdl:
+ Switch to a single boolean configuration option for code size vs.
+ speed optimization.
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl: Define tests.
+
+1999-10-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: We can now remove Berkeley
+ advertising clause
+ * src/stdlib/div.cxx: ditto
+ * src/stdlib/ldiv.cxx: ditto
+ * src/stdlib/strtol.cxx: ditto
+ * src/stdlib/strtoul.cxx: ditto
+ * src/string/strtok.cxx: ditto
+
+1999-10-19 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl:
+
+ Define CDL options for package-specific CFLAGS.
+
+1999-10-08 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_THREAD_PRIORITY): Change
+ default to 10 to keep test farm happy
+ * cdl/startup.cdl: Likewise
+
+1999-10-07 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Specify radio buttons using CDL interfaces.
+
+1999-10-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * cdl/stdio.cdl: Change default to /dev/ttydiag as per 1999-10-01
+ change below
+ * cdl/startup.cdl: Add new form CDL for the startup changes as
+ per 1999-10-05
+
+1999-10-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/libc.h: Add CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM to allow
+ the user to supply their own stack.
+ Rename CYGNUM_LIBC_MAIN_STACK_SIZE to
+ CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE and reparent under
+ CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM
+ Add CYGNUM_LIBC_MAIN_THREAD_PRIORITY to provide main() thread
+ priority
+
+ * src/support/mainthread.cxx: Add support for user-supplied stack
+ Allow user to specify thread priority
+
+ These changes fix CR 101069
+
+1999-10-01 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE): Change
+ default to /dev/ttydiag to get correct console-like behaviour
+ Also don't preclude use if haldiag package isn't included
+ (case 102065)
+
+1999-09-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (cause_fpe): Try both float and integer
+ division by zero.
+
+1999-09-10 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx (cyg_libc_get_malloc_pool): Added for
+ stress_threads test.
+
+1999-09-07 Jesper Skov <jskov@cygnus.co.uk>
+ PRs 20243, 20433
+ * tests/signal/signal2.c: Disabled test3 on ARM.
+
+1999-09-02 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/assert.h: Make the sense of NDEBUG correct; it is "set"
+ when NOT debugging. Fix for CR 101983-CR-1
+ See Stroustrup, "The C++ Programming Language."
+
+1999-08-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen): Set buffer size 0 when not
+ buffering
+ Fix for case 101868
+
+1999-08-17 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Implement radio buttons using "FIXME radio" hack in
+ description field for now.
+
+1999-08-12 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl:
+ Take advantage of MACRONAME_ENUMVAL macros output by CDL.
+
+1999-08-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf2.c (test): Don't rely on 2.345 being exactly
+ representable in binary as a difference of 1 ulp will make it round
+ the wrong way.
+
+1999-07-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fgetc.cxx:
+ Include outline versions of getc() (actually just a symbol alias for
+ fgetc() ) and getchar()
+ Some minor clean-ups
+ Add tracing/assertions
+
+ * src/stdio/input/fputc.cxx:
+ Likewise (except applied to putc() and putchar())
+
+ * src/stdio/common/stdioinlines.cxx (_puts):
+ Call fputc() not _fputc()
+
+ * src/clibincl/stdiosupp.hxx:
+ Remove now obsolete prototypes for _fgetc() and _fputc()
+
+ * include/stdio.h:
+ Don't bother with getc()/putc() macros any more, just call
+ them as functions
+ Include protos for getc(), putc(), getchar() and putchar() functions
+
+1999-06-21 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for SH EDK7708.
+
+1999-06-11 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h: Make FILEs array types so they won't be
+ given $gp relocations on MIPS targets
+
+1999-05-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/ctime.c: Fixed compiler warning.
+
+1999-05-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main):
+ Update CYGPKG_HAL_TX39 -> CYGPKG_HAL_MIPS_TX39 due to recent MIPS
+ HAL changes
+ Fix for PR 20116
+
+1999-04-30 Jesper Skov <jskov@lassi.cygnus.co.uk>
+ PR 19945/19946 workaround
+ * tests/signal/signal2.c: Disabled test 3 for PowerPC sim.
+
+1999-04-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl:
+ Ensure all calls to cyg_libc_time_year_is_leap() are with the full
+ year, and not the direct contents of a struct tm, which are (year-1900)
+
+1999-04-19 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19308, 19410, 19528
+ * tests/time/clock.c (test): Also disable data cache which may
+ affect timing when tracing/assertions are enabled.
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ Add prototype for new cyg_libc_stdio_flush_all_but() function
+
+ * src/clibincl/stream.hxx:
+ Don't include stdiosupp.hxx any more to prevent circular dependency,
+ therefore manually provide _setvbuf prototype
+ Make sure pkgconf/kernel.h is included before mutex.hxx
+
+ * src/clibincl/stream.inl (Cyg_StdioStream::set_error()):
+ Add missing unlock_me()
+
+ * src/stdio/common/fflush.cxx:
+ Separate most of code for fflush(NULL) into separate
+ cyg_libc_stdio_flush_all_but() function, which has the extra
+ capability of omitting one stream
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Add missing clibincl/stdiosupp.hxx include
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::read()):
+ When reading, ensure we flush all output streams
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::flush_output_unlocked):
+ Flush the device as well
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * src/clibincl/streambuf.inl:
+ * src/clibincl/streambuf.hxx:
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ * include/pkgconf/libc.h:
+ * include/stdio.inl (setbuf):
+ Fix dumb typo: BUFSIZE -> BUFSIZ
+ This fixes PR19837
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * include/stdio.inl (setbuf):
+ Use _IONBF when buf==NULL, and _IOLBF otherwise.
+ Fix for PR 19836
+
+1999-04-15 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Tidy display string capitalization.
+
+1999-04-12 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Clarify CDL description of CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE
+
+ * tests/signal/signal2.c: Try harder to generate an exception by
+ accessing a misaligned address
+ Don't handle SIGTRAP any more
+ Part of fix for PRs 19731/19607
+
+1999-04-07 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19667
+ * src/support/mainthread.cxx:
+ Changed to use the new Cyg_Thread constructor.
+
+1999-04-07 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Use new macro
+ HAL_VSR_SET_TO_ECOS_HANDLER if defined, to wrest control from
+ CygMon, for example, by reinstalling eCos' default VSRs for
+ exceptions that we are provoking.
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx: Include stdlib.h for exit()
+ Fix for PR 19720
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/clock.c (test): Disable instruction cache
+ Hopefully fixes PR 19308
+
+1999-03-29 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for PPC as it cannot
+ trap division by zero.
+
+1999-03-26 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/main.cxx (main): Invoke cyg_user_start() if no kernel
+ Only sensible thing to do in our default main in a non-kernel config
+
+1999-03-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/time.c:
+ Increase MAX_TIMEOUT since the sparclite gets very close to overrunning
+ it even when working.
+ Should return -1 iff CYGSEM_LIBC_TIME_TIME_WORKING isn't defined
+ Cosmetic changes
+
+1999-03-25 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/time/time.c (test): Take into account setting of
+ CYGSEM_LIBC_TIME_SETTIME_WORKING ie. does cyg_libc_time_settime()
+ work? If not, check that it returns an error.
+ This was exposed by the random combo in PR#19479.
+
+1999-03-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1 to
+ CYGIMP_...
+
+ Add another rand implementation CYGIMP_LIBC_RAND_SIMPLE1 which is
+ the default
+
+ Part of fix for PR 19562
+
+ * include/sys/cstartup.h:
+ Tidy and remove unnecessary dependencies
+
+ * src/stdlib/rand.cxx:
+ Rename algorithms from CYGSEM_... to CYGIMP_...
+ Add new "simple1" algorithm
+
+ * tests/ctype/ctype.c:
+ Tidy
+
+ * tests/stdlib/rand3.c:
+ Fix so that 0..RAND_MAX is split evenly over buckets, which it wasn't
+ before
+ Deal with case of RAND_MAX not being divisible by NUM_BUCKETS
+ exactly
+ Increase TEST_LENGTH to 200000 to provide more representative sample
+ Add CYG_TEST_INFO output to help ensure it doesn't time out
+ Tidy
+
+ * tests/stdlib/rand4.c:
+ Only fail if more than _two_ thirds (rather than one third) match.
+ This is because half would match for a perfectly random distribution
+ This is the rest of the fix for PR 19562
+ Cosmetic changes
+
+1999-03-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/mainthread.cxx (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ Use CYGNUM_HAL_STACK_SIZE_TYPICAL for the stack size instead of
+ CYGNUM_HAL_MINIMUM_STACK_SIZE.
+
+1999-03-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak: Add -Wno-format when building strftime otherwise
+ it generates warnings for things that we do want to test (null
+ string, and %y format)
+
+1999-03-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Put brackets back round negative number since sdf says the config
+ tool is fixed now (PR 19537)
+
+ Add new CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1
+ options for different rand() algorithms in a so far failed attempt
+ to fix PR 19562
+
+ * src/stdlib/rand.cxx:
+ Add new optional algorithm from Knuth vol.2
+
+ * tests/stdlib/rand4.c:
+ Some tidies
+ Don't run test when using simplest algorithm
+
+ * tests/signal/signal2.c (main):
+ Don't try to make an FPE on tx39 - its possible to detect but requires
+ too much HAL work to be sensible
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Use HAL_ENABLE_INTERRUPTS() rather than kernel to enable interrupts
+
+1999-03-18 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/PKGconf.mak (TESTS): added rand4 compilation.
+
+ * tests/stdlib/rand4.c: added this test for periodicity in the
+ least significant bit of rand().
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Remove CYGFUN_LIBC_TIME_POSIX dependency
+ on CYGPKG_LIBC_STDIO
+
+ * src/stdlib/itoa.cxx:
+ New file to convert integers to ascii
+
+ * include/stdlib.h:
+ Add proto for new cyg_libc_itoa() function
+
+ * include/time.inl:
+ Rework __asctime_r() to use memcpy() and cyg_libc_itoa() rather than
+ sprintf()
+
+ * src/PKGconf.mak:
+ Build stdlib/itoa.cxx
+
+ The above changes fix PR 19448
+
+1999-03-17 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h: Add #define of __time_t_defined to placate newlib
+ if it is used by accident. This is just a temporary workaround though.
+
+1999-03-16 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/PKGconf.mak: Add compile option to step around ARM compiler bug.
+
+1999-03-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Don't use parentheses for now
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Silence bogus compiler warning
+
+1999-03-16 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Enable SIGSEGV test for
+ i386/Linux.
+
+
+1999-03-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Only enable interrupts if they were disabled
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx:
+ Add FIX ME line as a reminder that the workaround there can go away
+ in future
+
+ * include/pkgconf/libc.h:
+ Add proper define for CYGSEM_LIBC_EXIT_CALLS_FFLUSH
+ Put brackets round negative CYGNUM_LIBC_TIME_DST_DEFAULT_STATE define
+ Fix run time typo
+
+ * include/time.inl (__localtime_r):
+ Include sys/timeutil.h before this to get
+ cyg_libc_time_normalize_structtm()
+
+1999-03-12 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx: Remove 'const' from char arrays since
+ this fails [silently] on ARM when -fwritable-strings (PR19440)
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Compiler warnings fix was
+ slightly broken.
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c (main):
+ Disabling SIGTRAP handling on i386/Linux is not a good idea.
+1999-03-11 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c:
+ Added compiler warnings fix.
+ Added N/A handling for i386/Linux.
+
+1999-03-10 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Force "haldiag" device to be present.
+ 'asctime' and friends need 'stdio' as well.
+
+ * include/time.inl: Fix syntax error on difftime() declaration.
+
+1999-03-08 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx: <cyg/infra/cyg_ass.h> needed for this file.
+
+ * src/stdio/common/vsscanf.cxx (str_read): Fix problem with string
+ pointer [created by merge with new I/O package].
+
+1999-03-05 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add legal values for CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET
+ and CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET.
+
+1999-03-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl (cyg_libc_time_year_is_leap):
+ Fix bug with modulo year 400
+ Fix typo in asctime_r macro
+ Fix gmtime_r, and mktime as a result of testing
+
+ * tests/time/asctime.c, tests/time/ctime.c, tests/time/gmtime.c,
+ tests/time/gmtime.c, tests/time/localtime.c, tests/time/mktime.c,
+ tests/time/strftime.c, tests/time/time.c:
+ New tests
+
+ * tests/PKGconf.mak:
+ Build above new tests
+
+ * include/pkgconf/libc.h:
+ Add reminder FIX ME about extra config option
+
+ * src/time/strftime.cxx:
+ Fix %w and %Y parameters as a result of testing
+
+ * src/time/timeutil.cxx:
+ Fix cyg_libc_time_normalize_structtm() as a result of testing
+ of mktime()
+
+ * tests/time/clock.c:
+ Reformat, remove obsolete bits and tidy
+
+ * include/time.h:
+ Add Cyg_libc_time_dst type and new functions
+ cyg_libc_time_setzoneoffsets(), cyg_libc_time_setdst(),
+ cyg_libc_time_getzoneoffsets(), cyg_libc_time_settime()
+
+ * include/time.inl:
+ Implement the above functions. This allows us to adjust for timezone
+ diffences and set the time.
+ Change localtime() to adjust for STD/DST
+ Change mktime() to adjust for STD/DST
+
+ * include/libc.h:
+ Add new config options CYGSEM_LIBC_TIME_SETTIME_WORKING
+ and component CYGPKG_LIBC_TIME_ZONES containing options
+ CYGNUM_LIBC_TIME_DST_DEFAULT_STATE,
+ CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET,
+ CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET
+
+ * src/strftime.cxx:
+ Adjust handling of %Z to _not_ deal with STD/DST
+
+ * src/time/settime.cxx:
+ New file to implement cyg_libc_time_settime()
+
+ * src/PKGconf.mak:
+ Build settime.cxx
+
+ * src/time/timeutil.cxx:
+ Supply outline versions of cyg_libc_time_setzoneoffsets(),
+ cyg_libc_time_setdst(), and cyg_libc_time_getzoneoffsets()
+ Add variables for STD/DST state
+ Some minor comment changes
+
+ * include/errno.h:
+ Use CYGBLD_ATTRIB_CONST instead of __attribute__((const)) directly
+
+ * include/signal.h:
+ Change format of function comment headers
+
+ * include/signal.inl:
+ Restrict errno.h inclusion to when its actually used
+ Fix a spelling typo
+
+ * include/stdlib.h:
+ Add CYGBLD_ATTRIB_CONST to abs, div, labs, ldiv
+
+ * include/stdlib.inl:
+ Reformat and tidy
+ Include new versions of div and ldiv which are more portable and
+ are cleanly rewritten so aren't covered by the BSD licence, which
+ is now removed
+
+ * src/stdlib/div.cxx, src/stdlib/ldiv.cxx:
+ Non-inline, non-BSD and portable versions of the new versions of div
+ and ldiv from stdlib.inl
+
+ * include/time.h:
+ Much reformatting, tidying and improving comments
+ Change CLOCKS_PER_SEC from 1000 to 1000000
+ Add new functions asctime_r, ctime_r, gmtime_r, localtime_r, clock,
+ difftime, mktime, time, asctime, ctime, gmtime, localtime, strftime
+ Include new time.inl file
+
+ * include/pkgconf/libc.h:
+ Add new options CYGSEM_LIBC_TIME_CLOCK_WORKING,
+ CYGSEM_LIBC_TIME_TIME_WORKING, CYGFUN_LIBC_TIME_POSIX,
+ CYGNUM_LIBC_TIME_CLOCK_TRACE_LEVEL, CYGIMP_LIBC_TIME_ASCTIME_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_INLINE, CYGIMP_LIBC_TIME_DIFFTIME_INLINE,
+ CYGIMP_LIBC_TIME_GMTIME_INLINE, CYGIMP_LIBC_TIME_LOCALTIME_INLINE,
+ CYGIMP_LIBC_TIME_MKTIME_INLINE, CYGIMP_LIBC_TIME_ASCTIME_R_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_R_INLINE, CYGIMP_LIBC_TIME_GMTIME_R_INLINE,
+ and CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE
+
+ * time/asctime.cxx, time/asctime_r.cxx, time/clock.cxx, time/ctime.cxx,
+ time/ctime_r.cxx, time/difftime.cxx, time/gmtime.cxx,
+ time/gmtime_r.cxx, time/localtime.cxx, time/localtime_r.cxx,
+ time/mktime.cxx, time/strftime.cxx, time/time.cxx, time/timeutil.cxx,
+ include/time.inl:
+ New files to implement the new time functions. Many of them simply
+ provide the outline definitions, but the real body of the function
+ comes from time.inl
+
+ * src/PKGconf.mak:
+ Build new .cxx files
+
+ * src/clibincl/stdlibsupp.hxx:
+ Remove _div and _ldiv prototypes since they're no longer needed
+
+ * src/clibincl/timesupp.hxx:
+ Delete as its now obsolete
+
+ * src/time/clock.cxx:
+ Use new CYGSEM_LIBC_TIME_CLOCK_WORKING option to control whether it
+ just returns (clock_t)-1 or not.
+ Much reformatting and tidying
+ Change real imlpementation from _clock to __clock
+ Use CYGBLD_ATTRIB_WEAK_ALIAS now
+
+ * tests/stdlib/div.c, tests/stdlib/ldiv.c:
+ Add some extra tests for handling of negative numbers
+ Reformat and tidy a bit, including removing the test for CYGPKG_LIBC
+ since its now always defined if the test is to be compiled
+
+ * tests/time/clock.c:
+ Remove duplication CYG_TEST_INFO line
+ Check if unimplemented using "(clock_t)-1" and not just "-1"
+
+1999-03-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx:
+ Make sure system() is a weak alias for __system()
+
+ * include/pkgconf/libc.h: Rework CDL description for
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE and change its default to
+ "/dev/haldiag"
+
+ * src/stdio/common/stream.cxx:
+ Check that dev is valid when passed to stream constructor
+
+ * src/stdio/common/stdiosupp.cxx:
+ Tidy
+
+ * src/support/mainthread.cxx: Make this depend on
+ CYGSEM_LIBC_STARTUP_MAIN_THREAD rather than just CYGPKG_KERNEL
+
+1999-03-04 Gary Thomas <gthomas@cygnus.co.uk>
+
+ Merged in changes from 'ecos-new_devs-19990216-branch'
+
+ (1999-02-24 Jonathan Larmour <jlarmour@cygnus.co.uk>)
+
+ * src/stdio/common/stream.cxx:
+ Add "fix me" comments and remove a couple of commented out lines
+
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Revert to using pointer to string for private data, not just string.
+ This preserves the state across multiple calls
+
+ (1999-02-24 Gary Thomas <gthomas@cygnus.co.uk>)
+
+ * src/stdio/common/vsscanf.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/stream.cxx:
+ * src/stdio/common/stdiosupp.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/clibincl/stream.inl:
+ * src/clibincl/stream.hxx:
+ * src/clibincl/stdiosupp.hxx:
+ * include/pkgconf/libc.h: Changes for new I/O system.
+
+1999-03-03 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atexit.c: Forgot to config atexit test for
+ CYGFUN_LIBC_ATEXIT option
+
+ * include/pkgconf/libc.h:
+ Require CYGVAR_KERNEL_THREADS_DATA for CYGSEM_LIBC_PER_THREAD_STRTOK
+ This fixes PR 19362
+ Require CYGPKG_KERNEL for thread safe streams
+ Also don't need "requires CYGPKG_KERNEL" for per-thread rand and errno
+ if we already require a finer granularity kernel option
+
+1999-02-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Fix CYGNUM_LIBC_MAIN_STACK_SIZE by changing
+ CYGPKG_LIBC_STARTUP_MAIN_THREAD -> CYGSEM_LIBC_STARTUP_MAIN_THREAD
+ Fix for PR 19304
+
+1999-02-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx: Add to implement trivial system() call
+ * include/stdlib.h: Add system() prototype
+ * src/PKGconf.mak: Build system.cxx
+
+ * tests/ctype/ctype.c, tests/i18n/setlocale.c, tests/setjmp/setjmp.c,
+ tests/signal/signal1.c, tests/signal/signal2.c,
+ tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdio/stdiooutput.c, tests/stdlib/atexit.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/getenv.c, tests/stdlib/labs.c,
+ tests/stdlib/ldiv.c, tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/realloc.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+ Use CYG_TEST_NA() macro for non-applicable test configurations
+
+1999-02-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/signal.h:
+ * include/signal.inl:
+ * src/signal/raise.cxx:
+ * src/signal/siginit.cxx:
+ * src/signal/signal.cxx:
+ * tests/signal/signal1.c
+ * tests/signal/signal2.c:
+ New files to implement ISO standard signals
+
+ * src/PKGconf.mak (TESTS):
+ * tests/PKGconf.mak (TESTS):
+ Update to build new files above
+
+ * include/stdlib.h:
+ * src/clibincl/stdlibsupp.hxx:
+ Comment and QA changes (including giving better names to some types)
+
+ * include/libc.h:
+ Add new configuration options for signals
+ Add new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+ Add a note to CYGNUM_LIBC_MAIN_STACK_SIZE option that it may be
+ overriden by HAL
+ Add new CYGFUN_LIBC_ATEXIT option and move ...ATEXIT_HANDLERS under
+ it
+ Add new CYGSEM_LIBC_EXIT_CALLS_FFLUSH option
+ Require CYGSEM_LIBC_STARTUP_MAIN_THREAD for "Invoke default static
+ constructors" option
+
+ * src/stdlib/atexit.cxx:
+ Support above CYGFUN_LIBC_ATEXIT and QA changes
+
+ * src/stdlib/exit.cxx:
+ Support for above new libc.h options, and some QA changes
+
+ * src/support/cstartup.cxx:
+ Add support for new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+
+ * src/support/mainthread.cxx:
+ Override main stack size if the HAL has a minimum
+
+ * src/string/strncpy.cxx:
+ Use improved algorithm for aligned copies - imported from newlib
+ QA changes
+
+ * src/stdlib/abort.cxx:
+ Support raise(SIGABRT), and some QA
+
+ * include/errno.h:
+ Add const attribute
+
+ * tests/stdlib/abs.c:
+ QA improvements
+
+1999-02-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Only define cyg_libc_main_thread when
+ the kernel is around.
+
+1999-02-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/clock.c: Joined the two test/NOP checks into
+ one.
+ Increased tolerance in attempt to fix PRs 18737,18787,18846.
+ Fixed typo.
+
+1999-01-28 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ * src/stdlib/rand.cxx:
+ Include <pkgconf/kernel.h> if we use kernel header files
+
+1999-01-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c (test):
+ CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT should be
+ CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT
+ Fix for PR 18786
+
+ * src/string/strtok.cxx:
+ * src/stdio/common/stdiofiles.cxx:
+ * src/errno/errno.cxx:
+ * src/stdlib/rand.cxx:
+ Give mutex protection objects a libc constructor priority
+
+ * src/support/invokemain.cxx:
+ Add prototype for cyg_hal_invoke_constructors()
+
+ * src/support/mainthread.cxx:
+ Give cyg_libc_dummy_constructor_obj a libc constructor priority,
+ and make its class have a public constructor
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/stdin.cxx:
+ Give cyg_libc_stdio_stdin/out/err static objects a libc constructor
+ priority
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ Remove private copy constructor. Needed to make prioritised
+ static constructors work. Fix for PR 18898
+
+1999-01-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx:
+ Include pkgconf/kernel.h otherwise it fails with per-thread errno
+ enabled
+
+ * include/pkgconf/libc.h:
+ Enable per-thread errno by default since that is what POSIX would
+ want
+
+ * tests/time/clock.c (test):
+ Placate compiler by initializing clock_first/second/third anyway,
+ even though they won't be in practice. This is only a test program
+ so adding an extra instruction doesn't matter.
+
+ * src/i18n/locale.cxx (_setlocale):
+ Placate compiler, since it is dumb, by nesting, not serializing, if's
+ This is an idempotent change, but screws up the formatting :-(.
+
+ * src/string/strpbrk.cxx (_strpbrk):
+ Change while loop to do loop to placate compiler. It'll even save an
+ instruction too (wow!)
+
+1999-01-22 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add closing curly brace to CYGPKG_LIBC_STRING_STRTOK definition
+
+1999-01-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h:
+ Tidy up and add to header description
+ Change cyg_get_errno_p() to cyg_libc_get_errno_p()
+ Remove ifdef CYGPKG_LIBC
+
+ * include/sys/file_if.h:
+ Remove - move contents to stdio.h
+
+ * include/stdio.h:
+ Tidy up header description
+ Move FILE typedef here from sys/file_if.h
+ SEEK_SET, SEEK_CUR, SEEK_END defined to 0, 1, 2 respectively
+ for backwards compatibility with old UNIX
+ Change definitions of stdin/out/err to be addresses of FILE
+ globals - even though they're actually Cyg_StdioStream it'll work
+
+ * include/pkgconf/libc.h:
+ Make CYGPRI_LIBC_WEAK et al macros depend on new ones in infra
+ Reorganise trace options under the individual components they are
+ associated with.
+ Reorganise thread-safety options under the individual components
+ they are associated with.
+ Add new CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS option
+ Misc. reformatting
+ Remove dependency on pkgconf/kernel.h - Configuration Tool will
+ generate check macros anyway.
+ Remove CYGPKG_LIBC_TRACE, CYGFUN_LIBC_strtok, CYGPKG_LIBC_RAND
+ options
+ Tidy up description header
+
+ * src/clibincl/clibdata.hxx:
+ * src/clibincl/clibdata.inl:
+ * src/support/clibdata.cxx:
+ Remove and instead rely on each component to initialise its own data
+
+ * src/clibincl/stdiofiles.hxx, src/clibincl/stdiofiles.inl:
+ New files to contain global file list and lock (if applicable).
+ Implemented as class with member access functions
+
+ * src/errno/errno.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Rename cyg_get_errno_p() to cyg_libc_get_errno_p()
+
+ * src/stdio/common/fclose.cxx:
+ * src/stdio/common/fflush.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/stdio/common/freopen.cxx:
+ Remove ifdef CYGPKG_LIBC
+ Use new global file access method from stdiofiles.hxx
+ Tidy up description header
+ Use new CYGBLD_ATTRIB_WEAK_ALIAS
+ Access errno "normally" rather than clibdata way
+
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx
+ * src/stdio/common/stderr.cxx:
+ New files. Implement Cyg_StdioStream objects for each stream. In
+ separate self-contained files so using one doesn't bring in the
+ others
+
+ * src/stdio/common/stdiofiles.cxx:
+ New file. Implements global files array and lock
+
+ * src/stdlib/_exit.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Use infra CYGBLD* macros
+
+ * src/stdlib/malloc.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Add pkgconf/kernel.h now that pkgconf/libc.h doesn't have it
+ Use infra CYGBLD* macros
+ Make pool visible externally with weak attribute and new name
+ cyg_libc_malloc_memorypool
+
+ * src/stdlib/rand.cxx:
+ * src/stdlib/strtok.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Use infra CYGBLD* macros
+
+ * src/support/cstartup.cxx:
+ Split into smaller files to make selective linking work better,
+ fix i386 port problem and make GDB happy
+
+ * src/support/environ.cxx:
+ * src/support/invokemain.cxx:
+ * src/support/main.cxx:
+ * src/support/mainthread.cxx:
+ New files from bits of the old cstartup.cxx
+ Add support for CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+
+ * src/PKGconf.mak:
+ Update to reflect file additions/deletion
+
+ * tests/stdlib/rand1.c:
+ * tests/stdlib/rand2.c:
+ * tests/stdlib/rand3.c:
+ * tests/stdlib/srand.c:
+ Make conform to coding standards
+ Remove ifdef CYGPKG_LIBC_RAND
+ Tidy up description header
+
+ * tests/string/strtok.c:
+ Make conform to coding standards
+ Remove ifdef CYGFUN_LIBC_strtok
+ Tidy up description header
+
+1999-01-15 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/stdlib/getenv.c (main): added tests for the case in which
+ the user does not supply environ and in which the user supplies a
+ NULL environ.
+
+1999-01-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Added workaround for weak aliasing
+ problem in i386 gcc.
+
+
+1999-01-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ (CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE): Change defaults to be
+ more reasonable on small systems.
+
+1999-01-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Minor bug with environ not being initialised correctly by
+ default
+
+1998-12-24 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (Cyg_StdioStream):
+ check_this() member functions should now be const
+
+1998-12-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx (_memchr):
+ treat search value parameter to memchr as an unsigned byte,
+ not a signed int - copied fix from newlib PR 18471
+
+1998-12-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/realloc.c:
+ * tests/stdlib/malloc3.c:
+ * tests/stdlib/malloc2.c:
+ Warning cleanup
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c, tests/stdlib/malloc3.c,
+ tests/stdlib/realloc.c:
+ Only run these tests when we have a coalescing memory allocator
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Only check buffer init success if buffering
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ Check for diff of requested size against buffer_size, not
+ get_buffer_size(), since this may return -1, which won't be
+ equal to size, and will cause malloc to be called
+
+1998-12-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stdlib/getenv.c (main): Don't declare variables when they
+ are not used.
+
+Thu Nov 26 17:59:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/string/strncpy1.c:
+ Fix off-by-one error since it called my_strcmp() and not
+ my_strncmp(), which meant in included the trailing NULL when it
+ shouldn't have.
+
+1998-11-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/qsort.cxx (_qsort):
+ * src/stdlib/rand.cxx (_srand):
+ Changed CYG_REPORT_FUNCNAMETYPE to CYG_REPORT_FUNCNAME in void
+ functions.
+
+Mon Oct 26 18:49:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/cstartup.cxx (cyg_libc_dummy_main):
+ Silence compiler warning with cast of char * to CYG_ADDRWORD
+
+Wed Oct 28 17:31:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clock.cxx (_clock):
+ Reorder scaling expression as it was both incorrect and risked
+ overflow.
+ Fix for PR 18076
+
+Mon Oct 19 14:40:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h (EOF):
+ Change from -64 to (-1), to allow broken code to work :-/
+ Also change other negative defines to be within parentheses
+
+1998-10-19 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated the doc URL
+
+Thu Oct 15 21:33:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Only include kernel thread headers when we're in thread-safe mode
+
+ * src/time/clock.cxx:
+ Only include kernel clock headers if there's a kernel with the
+ right functionality available
+
+ * tests/time/clock.c:
+ Remove unnecessary inclusion of <pkgconf/kernel.h>
+
+ Above changes are required for PR 17229
+
+Wed Oct 14 16:38:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise inclusion of clibincl/stdiosupp.hxx and
+ clibincl/stream.hxx. Tidying up PR 17502
+
+Wed Oct 14 14:08:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGPKG_LIBC_STRING_OPTIMISATIONS to
+ CYGPKG_LIBC_STRING_OPTIMIZATIONS to make it truely merkin.
+
+Tue Oct 13 19:34:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_ARGUMENTS):
+ Add a default argv[0] of "" as many programs assume argc>0
+ The standard allows argv[0] to be "" if the program name
+ is not available
+
+1998-09-26 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ PR 17502: this header file now does nothing if the stdio option
+ is disabled completely. This is the same behaviour is
+ clibincl/stream.hxx, although arguably the #ifdef protection
+ should happen wherever the header file is #include'd rather than
+ in the header file itself.
+
+ * src/clibincl/clibdata.hxx:
+ PR 17502: this header file still #include's internal stdio-related
+ header files and references the FILE structure, even if stdio is
+ disabled. There were some #ifdef's for CYGPKG_LIBC_STDIO already.
+ One more has been added for _fopen() and _fclose().
+
+1998-09-25 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl (Cyg_StdioStreamBuffer):
+ PR 17487: Reorder the calls to initialize member fields, to
+ eliminate a compiler warning.
+
+Fri Sep 25 19:04:29 1998 Jonathan Larmour <jlarmour@peshwari.cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/string/strtok.cxx,
+ src/time/clock.cxx:
+ Only define tracing variable and tracing level macro when
+ the relevant tracing level config options are set. Otherwise
+ keep the tracing level fixed at 0
+ Fix for PR 17476
+
+ * include/pkgconf/libc.h:
+ Define trace levels only if parent CYGPKG_LIBC_TRACE is defined
+ for consistency with Configuration Tool
+
+
+Fri Sep 25 17:24:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Make definition of vscanf() dependent on CYGFUN_LIBC_STDIO_ungetc
+ otherwise _vfscanf() won't be compiled. This therefore would
+ cause a link fail iff selective linking is not enabled.
+ Fix for PR 17455
+
+Fri Sep 25 17:23:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/rand.cxx:
+ Make compilation dependent on CYGPKG_LIBC_RAND
+ Fix for PR 17473
+
+ * tests/stdlib/srand.c:
+ Make definition of dummy test pass conditional on CYGPKG_LIBC_RAND
+ not being defined, as well as CYGPKG_LIBC
+ Caused compilation failure when testing PR 17473 fix
+
+Mon Sep 21 17:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Make sscanf test conditional on CYGFUN_LIBC_STDIO_ungetc since
+ _vfscanf() only gets compiled if this is defined
+ Fix for PR 17346
+
+1998-09-20 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated CDL doc strings.
+
+Fri Sep 18 22:18:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_errno_p):
+ Rather than this function only being available in thread-safe mode,
+ instead make what it returns be either the per-thread errno, or
+ global errno depending on the configuration.
+ Include <errno.h> (conditionally) to support this change
+
+Wed Sep 16 11:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove "fix me" comment which I forgot to remove before
+
+Tue Sep 15 19:27:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Updated descriptions and a few other minor things after review.
+ Notably though, the NDEBUG config option has been removed
+
+1998-09-15 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ PR 17201: removed dependency on CYGPKG_KERNEL in the option
+ CYGNUM_LIBC_MAIN_STACK_SIZE, since the actual dependencies cannot
+ be expressed sensibly in the current system.
+
+1998-09-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Sorting out dependencies for error package.
+
+1998-09-10 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: started adding doc fields to the
+ cdl_package data, as a pilot for now.
+
+Wed Sep 9 17:41:23 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add option CYGIMP_LIBC_MALLOC_CXX_DELETE_CALLS_FREE to explicitly
+ control whether the empty delete functions (currently) in
+ kernel/.../common/delete.cxx are enabled; controls code bloat, see
+ the comments in delete.cxx.
+
+Fri Sep 4 16:43:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add a default CYG_TEST_PASS() to make sure the test infra doesn't
+ complain.
+ Also remove the unused string functionsa
+
+Fri Sep 4 15:43:48 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdlib/exit.cxx (__libc_exit):
+ * src/stdlib/_exit.cxx (__libc__exit):
+ * src/stdlib/malloc.cxx (_free):
+ * src/stdlib/abort.cxx (abort):
+ * src/support/cstartup.cxx (invoke_main):
+ Tracing system asserted cos it was being called incorrectly; these
+ are void functions so you shouldn't give a type to the function
+ reporting call.
+
+Fri Sep 4 15:03:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Fix CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE description to refer to
+ the table.cxx file, not table.h
+
+Fri Sep 4 14:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add description for CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE since
+ Proven won't be making any changes to the device driver
+ implementation after all.
+ Fix for PR 17148
+
+ * src/clibincl/stream.inl (set_position):
+ Remove "fix me" line. It is obvious that this will have to change
+ with a filesystem interface
+ Fix for PR 17147
+
+ * src/stdio/common/freopen.cxx:
+ Remove "fix me" - I know about this issue
+ Fix for PR 17145
+
+ * src/stdio/common/stream.cxx (read):
+ Remove "fix me" and change to use memcpy
+ Fix for PR 17144
+
+Fri Sep 4 14:36:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Actually add it this time!
+
+Fri Sep 4 13:48:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add new tests for misc stdio output functions
+
+ * tests/PKGconf.mak:
+ Build stdiooutput.c test
+
+Fri Sep 4 12:52:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (write_byte):
+ Remove bogus assert
+
+ * tests/stdlib/getenv.c (main):
+ Check whether str is NULL before doing a strcmp()
+
+ * tests/stdio/sprintf2.c (main):
+ Reformat to 76 columns
+
+Fri Sep 4 02:10:54 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/stdio/common/stream.cxx:
+ Add new peek_byte method to Cyg_StdioStream
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix up buffer access to work with new peek_byte method above
+ Fix for PR 16954
+
+Thu Sep 3 19:40:11 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/rand1.c, tests/stdlib/rand2.c,
+ tests/stdlib/rand3.c:
+ Add extra check for CYGPKG_LIBC_RAND to decide whether the test
+ is applicable or not
+
+ * tests/stdlib/rand2.c (test):
+ Use CYGNUM_LIBC_RAND_SEED for default seed, not 1
+
+ * tests/string/strtok.c:
+ Add extra check for CYGFUN_LIBC_strtok to decide whether the
+ test is applicable or not
+
+Wed Sep 2 19:11:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fread.cxx, src/stdio/output/fwrite.cxx:
+ Add fread() and fwrite() functions
+
+ * src/PKGconf.mak:
+ Build fread.cxx and fwrite.cxx from above
+
+ * src/stdio/common/stream.cxx:
+ Reformat to 76 columns
+ In write(), move initialisation of *bytes_written to start
+ In read(), move initialisation of *bytes_read to start
+
+ * include/stdio.h:
+ Reformat to 76 columns
+
+ Replace all references to the ANSI
+ standard to instead by the ISO C standard
+
+ Add commented argument names for "documentation"
+
+ Add fread() and fwrite() prototypes
+
+ * src/clibincl/stdiosupp.hxx:
+ Copy the above changes from stdio.h, and add _fread() and _fwrite()
+ prototypes
+
+ * src/stdio/output/fputs.cxx, src/stdio/input/fgets.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 15:41:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 14:46:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Use trylock_me() instead of lock_me(), and loop to prevent
+ deadlocks
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl:
+ Add trylock_me() method
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/fflush.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 12:24:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change 0x7fff to 0x7fffffff. Oops!
+ give main stack size option a legal_values field
+ Undefine tracing by default
+ Add some more description in the header
+
+Tue Sep 1 20:02:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/i18n/setlocale.c (cyg_package_start):
+ Fix typo - extra "x" for no reason at all! :-)
+
+Tue Sep 1 19:44:58 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx:
+ Fix bug in find_locale_data() that miscalculated size of
+ all_locales
+
+ Make find_locale_data() match the locale "" and add some
+ other things in _setlocale() to ensure that "C" gets returned
+ when the default locale "" is passed.
+
+ Only check the locale pointer when it is non-NULL
+
+ * tests/i18n/setlocale.c:
+ New tests for setlocale()
+
+ * tests/PKGconf.mak:
+ Update to build setlocale.c test
+
+ * src/support/cstartup.cxx:
+ Don't actually call system default main() "main" otherwise GDB
+ gets confused and thinks its the entry point. Instead make a weak
+ alias and call the real function something different.
+
+Tue Sep 1 18:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx (_setlocale):
+ Fix tracing macro name and remove "str maybe used before
+ initialised" warning
+
+ * tests/stdlib/qsort.c:
+ Correct file description header
+
+Tue Sep 1 17:04:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/locale.h, src/clibincl/i18nsupp.hxx, src/i18n/locale.cxx:
+ New files to add support for locales as defined by the ISO C
+ standard. i.e. setlocale() and localeconv() functions and some
+ other bits
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAX_LOCALE_NAME_SIZE config option for locale
+ support
+
+ * src/PKGconf.mak:
+ build locale.cxx
+
+ * include/errno.h, src/clibincl/ctypesupp.hxx:
+ Tidy up to 76 columns
+
+Tue Sep 1 00:24:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Move environment-related options from stdlib into new
+ CYGPKG_LIBC_STARTUP component. Also add options for main()'s
+ arguments (CYGPKG_LIBC_ARGUMENTS), main()'s default stack size
+ (CYGNUM_LIBC_MAIN_STACK_SIZE), number of atexit handlers
+ (CYGNUM_LIBC_ATEXIT_HANDLERS), and whether _exit() stops the
+ system (CYGSEM_LIBC_EXIT_STOPS_SYSTEM).
+
+ * src/clibincl/stdlibsupp.hxx:
+ Fix a few comment bugs, and add new
+ cyg_libc_invoke_atexit_handlers() function prototype
+
+ * src/stdlib/_exit.cxx, src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Implement exit(), atexit() and _exit() correctly now. Also
+ includes cyg_libc_invoke_atexit_handlers() in atexit.cxx. Now
+ we get the correct behaviour of atexit(), and exit() invokes the
+ atexit handlers and fflushs all the stdio streams. Add plenty of
+ tracing of asserts too.
+
+ * src/support/cstartup.cxx:
+ Make main_thread object an exported global. Allow user-settable
+ arguments. Add MUCH more tracing and asserts. Improve comments.
+ Tidy up to 76 columns
+
+ * tests/stdlib/atexit.c:
+ Add simple test for atexit() and it calling registered functions
+
+ * tests/PKGconf.mak:
+ Build atexit.c test
+
+Mon Aug 31 18:54:48 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/getenv.cxx, tests/stdlib/getenv.c:
+ Add support for getenv(), and some tests to ensure it works
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update to include getenv.cxx and getenv.c test
+
+ * src/clibincl/clibdata.hxx:
+ remove prototype for environ - we expect files needing it to
+ define it themselves
+
+ * src/support/clibdata.cxx:
+ Tidy up to 76 columns and add definition of char **environ, but
+ with a configurable initialiser (see libc.h below)
+
+ * tests/stdlib/abs.c (main):
+ Tidy up to 76 columns
+
+ * src/stdlib/malloc.cxx:
+ Tidy up to 76 columns and remove warning for undefined _memcpy()
+ by changing to memcpy(), and casting away signedness
+
+ * include/pkgconf/libc.h:
+ Add CYGPKG_LIBC_ENVIRONMENT and CYGDAT_LIBC_DEFAULT_ENVIRONMENT
+ configuration options
+
+ * include/pkgconf/libc.h, src/clibincl/clibdata.hxx:
+ Tidy up to 76 columns
+
+ * include/stdlib.h:
+ Add getenv() prototype and tidy up to 76 columns
+
+ * src/clibincl/stdlibsupp.hxx:
+ Add _getenv() prototype
+
+Mon Aug 31 13:37:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Add realloc()
+
+ * tests/stdlib/realloc.c:
+ Add this file to test new realloc() functionality
+
+ * tests/PKGconf.mak:
+ Build realloc test
+
+ * tests/stdlib/malloc3.c (main), tests/stdlib/malloc2.c (main),
+ tests/stdlib/malloc1.c (main):
+ Conditionalise local vars to prevent warnings
+
+ * tests/stdlib/malloc3.c (fill_with_data):
+ Move '{' into "verb" line
+
+ * include/pkgconf/libc.h:
+ Require infra tracing support to allow tracing
+
+ * include/stdlib.h:
+ Add realloc()
+
+ * src/clibincl/stdlibsupp.hxx:
+ Update the commented argument names from stdlib.h, including realloc()
+
+1998-08-28 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ * src/clibincl/clibdata.hxx, src/time/clock.cxx:
+
+ Updated for new kernel configuration option symbol names
+
+Fri Aug 28 19:18:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ Changed the entry below to sat "tx39" instead of "mn10300".
+ It's been a long week.
+
+Fri Aug 28 18:59:20 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Add a weakly named main to allow the
+ default configuration to link on the tx39 which has no
+ scalextric linking yet. The static Cyg_Thread main_thread object
+ below continues to exist, though unreferenced, so all its
+ descendants must exist too.
+
+Fri Aug 28 08:54:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h:
+ Add commented argument names Add exit(), and atexit(). And move
+ these along with abort() and _exit() to a new section.
+
+ * src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Add trivial versions of atexit() and exit()
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAIN_STACK_SIZE config option
+
+ * include/sys/cstartup.h, src/support/cstartup.cxx, src/PKGconf.mak:
+ New files to provide a new function cyg_iso_c_support(), which
+ invokes main "correctly".
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/srand.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcoll2.c, tests/string/strcpy1.c,
+ tests/string/strcpy2.c, tests/string/strcspn.c,
+ tests/string/strlen.c, tests/string/strncat1.c,
+ tests/string/strncat2.c, tests/string/strncpy1.c,
+ tests/string/strncpy2.c, tests/string/strpbrk.c,
+ tests/string/strrchr.c, tests/string/strspn.c,
+ tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c,
+ tests/time/clock.c:
+
+ Modify all tests to use new startup mechanism, and cyg_iso_c_start()
+
+Fri Aug 28 00:29:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Add #ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO around all accesses to
+ flags.last_buffer_op_was_read. Fix for PR 16997
+
+Thu Aug 27 01:12:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/sys/file_if.h:
+ Fix comments and remove cyg_get_file_star()
+
+Wed Aug 26 20:24:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove #define CYGPKG_LIBC is that is meant to live in
+ <pkgconf/system.h> after all
+
+Wed Aug 26 19:39:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ More fixes to CDL stuff to make it work better, and look better on
+ the screen
+
+Tue Aug 25 20:21:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Make some fixes after running the ConfigTool
+
+Tue Aug 25 16:46:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_STDIO_BUFSIZE):
+ Fix typo of CYGNUM_LIBC_STDIO_BUFSIZE
+
+Tue Aug 25 15:10:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Tidy up CDL stuff a bit more, prior to checking it actually works.
+
+Tue Aug 25 11:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c (main):
+ Prevent calls to CYG_TEST_STILL_ALIVE for now
+
+Tue Aug 25 05:39:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change cosmetic paragraph alignment.
+
+Tue Aug 25 03:11:34 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Make stderr initialise with buffer size 0.
+ For PR 16955
+
+Mon Aug 24 17:38:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ First pass at CDL-ifying the C library configuration. Currently
+ deliberately disabled as there a few outstanding issues.
+
+Mon Aug 24 16:14:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx (_vfnprintf):
+ clear up warning for unused argument
+
+ * tests/stdlib/malloc2.c (NUM_ITERATIONS):
+ Lower to 100 from 50000 so it won't take too long under the simulator
+
+Thu Aug 20 17:48:43 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Remove now unnecessary inclusion of kernel/ktypes.h
+
+Wed Aug 19 19:19:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c,
+ tests/stdio/sscanf.c, tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c,
+ tests/stdlib/strtoul.c, tests/string/strtok.c,
+ tests/time/clock.c:
+ Add parameters to "main()" to silence warnings
+
+Wed Aug 19 18:52:59 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Put conditional error check into same #ifdef and if as what was being
+ checked in the first place!
+
+Wed Aug 19 18:49:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl:
+ Reorder Cyg_StdioStream::check_this() to be first to silence
+ warnings
+
+Tue Aug 18 16:10:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * ecc/language/c/libc/current/src/clibincl/clibdata.hxx,
+ ecc/language/c/libc/current/src/errno/errno.cxx,
+ ecc/language/c/libc/current/src/stdio/common/fopen.cxx,
+ ecc/language/c/libc/current/src/stdlib/rand.cxx,
+ ecc/language/c/libc/current/src/string/strtok.cxx:
+ Rename CYGIMP_LIBC_INTERNAL_DATA_PREAMBLE,
+ CYGIMP_LIBC_INTERNAL_DATA_ALLOC_CHECK_PREAMBLE,
+ CYGVAR_LIBC_INTERNAL_DATA, and
+ CYGIMP_LIBC_INTERNAL_DATA_CHECK to all have CYGPRI_ prefix instead
+ as recommended by the config name rules
+
+
+Tue Aug 18 14:31:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/setvbuf.cxx (_setvbuf):
+ Rename variable names in assert line, otherwise doesn't build
+ with asserts on!
+
+Sun Aug 16 18:15:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix some bugs, although there are some left to fix still. Unrelated
+ to the rest of the checkins, so I will check the partial fix in now.
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx:
+ Add parameters to constructor to allow more things to be done at
+ construction time.
+
+ Now we have "new", remove separate "construct" method
+
+ Add more documentation on constructor
+
+ As requested by code review, where possible, move boolean flags
+ into separate packed bitfield structure for space efficiency
+
+ Make readbuf_char be usable all the time rather than when configured
+ not to be buffering, as it is also needed for non-buffered mode i.e.
+ _IONBF
+
+ * src/stdio/common/fopen.cxx:
+ Change to use new method of construction from above, using new
+
+ Use thread-specific data, rather than global. And so change errnos
+ to access errno entry specifically
+
+ Make process_mode() check for append mode too
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/stdio/common/setvbuf.cxx:
+
+ Change to cope with different way of dealing with buffering policy
+ flags etc. in Cyg_StdioStream
+
+ * src/stdio/common/vsnprintf.cxx, src/stdio/common/vsscanf.cxx,
+ src/support/clibdata.cxx:
+ Change construction of streams to use new parameters added above,
+ and change to use _IONBF mode for string stdio functions,
+ otherwise its a waste of memory. And use _IONBF for stderr as the
+ ISO standard tells us to!
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Change constructor so that it can be set with default size and
+ dynamic buffer (if applicable)
+
+ Fix minor bug in destructor - should only call free when allocated
+ dynamically
+
+ Change get_buffer_size to return -1 if the buffer was not allowed
+ to be set up
+
+ * src/stdio/common/streambuf.cxx:
+ Remove unnecessary stdio.h include and add extra comment to whether
+ to free bit in set_buffer()
+
+ * src/stdio/common/freopen.cxx:
+ Change @@@ to standard fix me string
+
+ * src/stdio/output/fputc.cxx:
+ Remove unnecessary "written" variable
+
+Thu Aug 13 15:37:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx:
+ Included use of "fix me" line to ensure this is discussed before
+ release
+
+ * include/stdlib.h, src/stdlib/abort.cxx, src/PKGconf.mak:
+ Add abort.cxx to implement abort(), albeit naively
+
+Thu Jul 30 18:03:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/vsscanf.cxx (_vsscanf),
+ src/stdio/common/vsnprintf.cxx (_vsnprintf):
+ Fix initialiser of pseudo string device table that didn't get updated
+ when the table changed (Bad proven, no biscuit).
+
+ * src/clibincl/stream.inl (~Cyg_StdioStream):
+ Move invalidation of magic_validity_word to after unlock_me(),
+ otherwise it always fails!
+
+Tue Jul 28 21:29:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Shorten over-long lines
+
+Tue Jul 28 20:28:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx (class Cyg_StdioStream),
+ src/clibincl/stream.inl, src/stdio/common/stream.cxx:
+ Clarify some comments and get the CYGDBG_DEFINE_CHECK_THIS and
+ CYG_ASSERTCLASS stuff going
+
+ * src/clibincl/stream.inl:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 15:31:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl, src/stdio/common/streambuf.cxx:
+ Move set_buffer() from streambuf.inl to new file streambuf.cxx
+
+ * src/PKGconf.mak (COMPILE):
+ Build new file streambuf.cxx
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ Add METHODS comment
+
+ * src/stdio/common/stream.cxx:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 00:26:36 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.inl, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/div.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/qsort.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/string/strtok.cxx:
+
+ Include proper Berkeley license inline in the file, rather than
+ referring to an external file
+
+ * doc/COPYING.UCB:
+ Remove, now that it isn't referred to any more
+
+Mon Jul 27 23:34:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl, include/errno.h,
+ include/stdio.h, include/stdio.inl, include/stdlib.h,
+ include/stdlib.inl, include/string.h, include/string.inl,
+ include/time.h, include/sys/file_if.h, src/PKGconf.mak,
+ src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/stdiosupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/streambuf.hxx,
+ src/clibincl/streambuf.inl, src/clibincl/stringsupp.hxx,
+ src/clibincl/timesupp.hxx, src/ctype/isalnum.cxx,
+ src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx,
+ src/ctype/islower.cxx, src/ctype/isprint.cxx,
+ src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx,
+ src/ctype/tolower.cxx, src/ctype/toupper.cxx,
+ src/errno/errno.cxx, src/stdio/common/snprintf.cxx,
+ src/stdio/common/sprintf.cxx, src/stdio/common/sscanf.cxx,
+ src/stdio/common/stdioinlines.cxx, src/stdio/common/stream.cxx,
+ src/stdio/common/ungetc.cxx, src/stdio/common/vsnprintf.cxx,
+ src/stdio/common/vsscanf.cxx, src/stdio/input/fgetc.cxx,
+ src/stdio/input/fgets.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/gets.cxx, src/stdio/input/scanf.cxx,
+ src/stdio/output/fnprintf.cxx, src/stdio/output/fprintf.cxx,
+ src/stdio/output/fputc.cxx, src/stdio/output/fputs.cxx,
+ src/stdio/output/printf.cxx, src/stdlib/_exit.cxx,
+ src/stdlib/abs.cxx, src/stdlib/atof.cxx, src/stdlib/atoi.cxx,
+ src/stdlib/atol.cxx, src/stdlib/div.cxx, src/stdlib/labs.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/rand.cxx, src/stdlib/strtod.cxx,
+ src/string/memchr.cxx, src/string/memcmp.cxx,
+ src/string/memmove.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx,
+ src/string/strcoll.cxx, src/string/strcpy.cxx,
+ src/string/strcspn.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx, src/string/strpbrk.cxx,
+ src/string/strrchr.cxx, src/string/strspn.cxx,
+ src/string/strstr.cxx, src/string/strsuppt.cxx,
+ src/string/strtok.cxx, src/string/strxfrm.cxx,
+ src/support/clibdata.cxx, src/time/clock.cxx:
+ Untabify
+
+Mon Jul 27 23:14:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/stdlib/malloc.cxx, src/stdlib/qsort.cxx,
+ tests/ctype/ctype.c, tests/stdlib/rand3.c, tests/stdlib/malloc3.c:
+ Remove all mentions of "register" in variable declarations. Also
+ untabify where needed
+
+ * src/stdlib/bsearch.cxx:
+ Untabify this too
+
+
+Mon Jul 27 22:18:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/fputc.cxx (_fputc):
+ Replace call to stream write() with call to write_byte()
+
+ * src/clibincl/stream.inl (write_byte):
+ Add asserts for stream write() returning odd values for how much has
+ been written
+
+ (bytes_available_to_read):
+ Remove "register" def for variable declaration
+
+Mon Jul 27 22:06:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdiosupp.cxx:
+ Remove #if 0'd cyg_get_file_star() and unnecessary pseudo string
+ device definition
+
+Mon Jul 27 21:57:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h, src/support/clibdata.cxx:
+ Change CYGXXX_LIBC_STDIO_DEFAULT_CONSOLE to
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE
+
+Mon Jul 27 21:49:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/setjmpsupp.hxx,
+ src/clibincl/stdiosupp.hxx, src/clibincl/stdlibsupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl,
+ src/clibincl/stringsupp.hxx, src/clibincl/timesupp.hxx:
+
+ Change CYGONCE_LIBC_*_{HXX,INL} to CYGONCE_LIBC_CLIBINCL_*_{HXX,INL}
+
+Mon Jul 27 21:34:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change #define XXXXX 1 to #define XXXXX where applicable as per code
+ review
+
+ Also remove obsolete CYGIMP_LIBC_THREAD_START_SUSPENDS_SELF
+
+Mon Jul 27 19:42:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen):
+ Use #ifdef, not #if for config options
+
+Mon Jul 27 15:01:51 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/stream.cxx, src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx:
+ Fixes to compile with the new Cyg_IORB field names.
+
+Thu Jul 9 03:40:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Adjust starting of tests to possibly start scheduler since
+ strtol/stroul rely on errno, which may be a per-thread variable
+
+Thu Jul 9 03:06:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx, src/stdio/common/setvbuf.cxx:
+ Consolidate read and write buffers into single buffer, as it should
+ have been all along
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Add drain_buffer() method to speed up the case when we want the
+ buffer completely emptied
+
+Tue Jul 7 21:26:33 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Add a couple of new tests that check that very long strings work too
+
+Wed Jul 1 19:52:39 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/streambuf.hxx:
+ Do not permit copy constructors
+
+ * src/clibincl/stream.inl, src/stdio/common/fclose.cxx:
+ Make sure we use #ifdef and not #if
+
+ * src/clibincl/streambuf.inl:
+ Use member initialisation list rather than explicit initialisation to
+ reduce warnings
+
+Wed Jul 1 19:17:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h and all files using config options:
+ Rename configuration defines to make them more standard
+
+Thu Jun 25 20:09:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strcat.cxx:
+ Add parentheses on check to silence warning
+ (Verified by proven)
+
+Thu Jun 25 19:30:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Make sure that the malloc pool is initialised before other things
+ can use it. This is done with the hot new constructor ordering
+ feature.
+
+Thu Jun 25 18:27:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Remove bogus ifdef if floating point is _not_ wanted
+
+Thu Jun 25 17:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Fix argument checking to allow first argument of NULL
+
+Thu Jun 25 04:18:50 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_strtok_last_p):
+ Remove bogus assertion
+
+ * src/stdlib/malloc.cxx:
+ Got sense of alignment check assertion the wrong way round, so negate
+ it
+
+Thu Jun 25 03:56:35 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx:
+ Fix argument checking assertions with legitimate nulls here too
+
+Thu Jun 25 03:46:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/strtoul.cxx, src/stdlib/strtol.cxx:
+ Fix argument checking assertions to cope with legitimate nulls
+
+Wed Jun 24 09:01:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Remove extraneous info messages
+
+Wed Jun 24 05:59:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c:
+
+ Change large automatic arrays to static arrays to prevent overuse
+ of a potentially small stack
+
+Wed Jun 24 05:45:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/string/strtok.c, tests/time/clock.c:
+
+ Increase thread stack size from 4K to 32K as in some cases it was
+ too small.
+
+
+Tue Jun 23 20:12:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Add extra tests, including floating point conversion testing
+
+Tue Jun 23 17:01:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Make sure this is only compiled if CYGFUN_LIBC_strtok is defined
+
+Tue Jun 23 06:10:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ add some comments - that's all
+
+ * src/stdio/common/stream.cxx:
+ fix case in refill_read_buffer() for what to do when there's nothing
+ left. Now return EAGAIN
+
+ * src/stdio/common/vsscanf.cxx, src/stdio/input/vfscanf.cxx:
+ Get sscanf working properly and passing tests. Also make sure it
+ ignores FP when its not configured
+
+ * src/stdlib/atof.cxx:
+ Only compile at all if strtod() is present
+
+
+Mon Jun 22 19:13:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise strtok_last and rand_seed better
+
+Mon Jun 22 14:14:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc3.c:
+ Add test for checking that mallocing and freeing repeatedly works
+
+ * tests/PKGconf.mak:
+ Update to reflect addition of the above
+
+Mon Jun 22 13:09:33 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/fopen.cxx
+ * src/stdio/common/stream.cxx
+ * src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx
+ Include cyg/devs/common/iorb.h instead of iorb.hxx
+
+ * src/stdio/common/stream.cxx
+ Use read_blocking and write_blocking instead of just read and
+ write when accessing devices through the virtual device table.
+
+Sun Jun 21 18:19:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Propagate change of return code handling for puts from stdio.inl
+ into here
+
+ * src/stdio/output/fputc.cxx:
+ make sure the right type is used for output - byte not int
+
+ * src/support/clibdata.cxx:
+ Fix #define config mistook. #endif was in wrong place
+
+Sun Jun 21 16:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Allow explicit construction to get around a bug when
+ dynamically allocating per-thread structure
+
+Sun Jun 21 16:02:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c, tests/stdlib/qsort.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+
+ Update tests to "do the right thing" with all configuration settings
+
+
+Sun Jun 21 04:54:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ I have to be careful not to use setjmp() in a way not exactly
+ defined by the standard, so make sure I do, and add a comment
+ documenting these ways.
+
+ Also ensure this test does the right thing in all configurations
+
+Sun Jun 21 04:38:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add extra checks for invalid configurations
+ Also make default for thread safety OFF
+
+ * src/clibincl/clibdata.inl:
+ Adjust indentation
+
+ * src/stdio/output/vfnprintf.cxx:
+ Make printf of -0.0 floating point do the right thing
+
+Sun Jun 21 04:28:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/snprintf.cxx, src/stdio/common/sprintf.cxx,
+ src/stdio/common/sscanf.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/scanf.cxx, src/stdio/output/fnprintf.cxx,
+ src/stdio/output/fprintf.cxx, src/stdio/output/printf.cxx:
+
+ Had to remove inline functions with varargs. Which means separating
+ out each function from stdioinlines.cxx into a separate file, as they
+ no longer belong there. So all the above files were created.
+
+ * include/stdio.inl, src/PKGconf.mak,
+ src/stdio/common/stdioinlines.cxx:
+ Changed to take account of the above
+
+
+Sun Jun 21 03:58:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c:
+ Update with floating-point tests. Also make sure they DTRT in all
+ configurations
+
+Fri Jun 19 19:33:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ accidentally initialised stdin/out/err twice
+
+Fri Jun 19 19:09:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Another typo
+
+Fri Jun 19 18:59:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Missing #endif typo
+
+Fri Jun 19 18:51:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Fix initialisation of static data members. Unsure how it worked at
+ all before!
+
+Fri Jun 19 18:01:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.inl:
+ puts should check whether fputs returns non-negative, rather than
+ non-zero
+
+Fri Jun 19 17:22:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl:
+ Make inclusion of get_errno_p conditional on thread-safety
+
+Wed Jun 17 10:55:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Add weak alias of vfscanf() to _vfscanf()
+
+Wed Jun 17 09:10:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Initialise err to silence compiler warning
+
+Wed Jun 17 08:59:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Most important is the addition of floating point support in
+ src/stdio/output/vfnprintf.cxx and src/stdio/input/vfscanf.cxx. This
+ also required the addition of atof() and strtod() in stdlib which is
+ definitely no bad thing! Other than that...
+
+ * Fix a whole bunch of stuff I messed up first time round. Also the
+ sprintf and sscanf tests are included again.
+
+Tue Jun 16 16:38:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Typo with not putting comment character at the beginning. Sigh.
+
+Tue Jun 16 14:53:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Forgot to (temporarily) remove fputs test for now
+
+Mon Jun 15 20:40:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ Everything to do with stdio has almost completely changed, so there's
+ not much point documenting individual changes.
+
+Mon Jun 15 18:36:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c:
+ Stop it moaning quite as much when it fails by making it exit sooner
+
+ * tests/time/clock.c :
+ This isn't a compound testcase
+
+Thu Jun 11 17:59:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h
+ Reverse sense of NDEBUG ifdef, that was left in accidentally due
+ to testing
+
+Thu Jun 11 04:58:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h, include/string.h, src/clibincl/stringsupp.hxx:
+ Modify as I've now added an "error" package which defines the error
+ codes and strerror()
+
+ * src/errno/strerror.cxx:
+ Moved to new error package and thus deleted
+
+Wed Jun 10 18:37:37 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h:
+ create this header and add assert() function
+
+Wed Jun 10 16:23:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h, src/clibincl/stdlibsupp.hxx, src/stdlib/malloc.cxx:
+ Add malloc(), calloc() and free() functions
+
+ * include/pkgconf/libc.h:
+ Add malloc memory pool size option
+
+ * tests/stdlib/malloc1.c, tests/stdlib/malloc2.c:
+ new tests for malloc
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for new files
+
+Wed Jun 10 15:06:16 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ Add another test
+
+Tue Jun 9 18:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add some setjmp config's and a macro for the noreturn attribute
+
+ * include/setjmp.h, include/setjmp.inl, src/clibincl/setjmpsupp.hxx,
+ src/setjmp/longjmp.cxx, tests/setjmp/setjmp.c:
+ Added to implement and test setjmp() and longjmp()
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for newly added files
+
+Thu Jun 4 01:29:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx, src/string/strcpy.cxx,
+ src/string/strlen.cxx, src/string/strncat.cxx,
+ src/string/strncmp.cxx, src/string/strncpy.cxx:
+ Rename CYGIMP_LIBC_PREFER_SMALL_TO_FAST to
+ CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST
+
+ Also use slower but smaller version when __OPTIMIZE_SIZE__ is
+ defined (which comes from using gcc -Os)
+
+Fri May 29 16:15:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl, src/ctype/isxdigit.cxx:
+ Fix bug that numerals aren't considered hex digits
+
+ * include/time.h:
+ Change clock_t and time_t to be signed so that they can accept -1, as
+ required by other libc functions
+
+ * src/clibincl/clibdata.hxx:
+ Fix typo that CYGIMP_LIBC_THREAD_SUPPORT should be ..._SAFETY
+ Also fix macro to allocate thread-specific data to not set variables
+ in a different stack-frame
+
+ * tests/ctype/ctype.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/stdlib/qsort.c:
+ make ctr unsigned to prevent warnings
+
+ * tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/string/strrchr.c:
+ Fix off by one error
+
+ * tests/string/strspn.c:
+ Fix case-sensitivity problem, and off-by-one error
+
+ * tests/string/strxfrm1.c:
+ Remove bogus bit of test that doesn't apply to strxfrm, and fix typo
+
+
+Fri May 22 16:33:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak
+ Remove CXXFLAGS line now that its redundant
+
+ * tests/everything!
+ Do a blitz change of all tests - break some of them down into
+ different files, add new tests, standardize format, fix bugs,
+ update for recent header file changes and much more!
+
+Wed May 20 17:50:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ interim checkin for different dir structure for Bart
+
+Fri May 15 20:30:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Tidy up some loose ends I forgot: rename src/include directory to
+ src/clibincl. And add clibdata.inl and timesupp.hxx in there.
+
+Thu May 14 19:56:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Basically everything has changed in the C library. Files have
+ been moved, renamed, deleted and reworked. This is a major
+ revision, and now starts from this new baseline rather than doing
+ incremental changes.
+
+Fri Apr 17 18:43:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ECCconf.mak:
+ added for new build system (actually Bart did this, but didn't
+ update this ChangeLog)
+
+Fri Apr 17 15:03:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdio/device/sim.cxx:
+ Make it build with CYG_EMPTY_STATEMENT; the unadorned one is being
+ removed.
+
+Thu Apr 16 00:24:24 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * All source files:
+ replace ECCIMP_LIBC_* conditional ifdef with CYGIMP_LIBC_*
+
+ * include/eccconf/libc.h:
+ improve comments and reorder a bit
+
+Wed Apr 8 14:35:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/Makefile.am, tests/Makefile.am, configure.in:
+ many changes to integrate build structure from release tree
+
+ * src/ctype/Makefile.am, src/ctype/Makefile.in, src/errno/Makefile.am,
+ src/errno/Makefile.in, src/stdio/Makefile.am, src/stdio/Makefile.in,
+ src/stdio/common/Makefile.am, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.am, src/stdio/device/Makefile.in,
+ src/stdio/output/Makefile.am, src/stdio/output/Makefile.in,
+ src/stdio/input/Makefile.am, src/stdio/input/Makefile.in,
+ src/stdlib/Makefile.am, src/stdlib/Makefile.in,
+ src/string/Makefile.am, src/string/Makefile.in,
+ src/support/Makefile.am, src/support/Makefile.in,
+ src/time/Makefile.am, src/time/Makefile.in:
+ Remove as they are now redundant with above changes
+
+ * include/Makefile.am:
+ Add to support above changes
+
+ * include/eccconf/libc.h:
+ Change include file for configuration from kernel to system
+
+ * src/include/kerndiag.hxx, src/stdio/device/kerndiag.cxx,
+ src/time/clockfn.cxx:
+ Change kernel include file to eccconf/kernel.h
+
+ * src/include/strngdev.h:
+ remove unnecessary kernel include
+
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in,
+ tests/Makefile.in, include/Makefile.in:
+ regenerate
+
+Mon Apr 6 20:55:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/abs.cxx, src/stdlib/atoi.cxx, src/stdlib/atol.cxx,
+ src/stdlib/div.cxx, src/stdlib/labs.cxx, src/stdlib/ldiv.cxx:
+ Separated out functions from stdlib.cxx into separate files
+
+ * src/stdlib/stdlib.cxx:
+ removed to be replaced by above files
+
+ * Makefile.am, src/stdlib/Makefile.am:
+ modified to support building above and not building stdlib.cxx
+
+ * src/support/tsd.cxx:
+ Remove unnecessary header file includes
+
+ * Makefile.in, src/stdlib/Makefile.in:
+ regenerated
+
+Mon Apr 6 19:19:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx, include/eccconf/libc.h:
+ remove lame hack for tx39 compiler now that its fixed
+
+ * src/include/sim.hxx:
+ define constants as static to placate compiler
+
+Thu Apr 2 21:01:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ctype/ctype.cxx:
+ deleted and separated out into below files
+
+ * src/ctype/isalnum.cxx, src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx, src/ctype/islower.cxx,
+ src/ctype/isprint.cxx, src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx, src/ctype/tolower.cxx,
+ src/ctype/toupper.cxx:
+ Separated out individual ctype functions from ctype.cxx into separate
+ files
+
+ * Makefile.am, src/ctype/Makefile.am:
+ modified to reflect above deletion/additions
+
+ * Makefile.in, src/ctype/Makefile.in:
+ regenerated
+
+Thu Apr 2 19:08:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: optimise using prefix increments
+
+Thu Apr 2 15:18:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strchr.cxx: optimise setting of mask a little
+
+Thu Mar 26 14:07:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx: fixed some typos
+
+Thu Mar 26 11:58:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/eccconf/libc.h, src/support/tsd.cxx:
+ Implement workaround for tx39 compiler bug.
+
+ * src/include/strsuppt.hxx:
+ remove prototypes for _memcpy() and _memset() as they are now in the
+ kernel
+
+Wed Mar 25 18:31:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/string/Makefile.am: memcpy() and memset() are
+ now in the kernel so remove them from build
+ * include/string.h: add a comment to say as much
+ * Makefile.in, src/string/Makefile.in: regenerate
+
+Wed Mar 25 15:30:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx, src/include/file_if.inl:
+ Change _exit workaround to not cause a compiler optimisation
+ problem. Now just references _exit rather than calls it.
+
+Wed Mar 25 14:59:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fix bug causing tests to fail completely
+ for this function
+
+Wed Mar 25 12:55:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/sim.hxx: add types to constants (oops!)
+ * Makefile.am: link src/stdio/device/sim.cxx
+ * Makefile.in: regenerated
+
+Wed Mar 25 04:14:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/file_if.hxx, src/include/file_if.inl,
+ src/include/kerndiag.hxx, src/include/sim.hxx,
+ src/include/stdio_if.hxx, src/include/strngdev.hxx,
+ src/include/tsd.hxx, src/stdio/common/clearerr.cxx,
+ src/stdio/common/clearerr.cxx, src/stdio/common/feof.cxx,
+ src/stdio/common/ferror.cxx, src/stdio/common/file_if.cxx,
+ src/stdio/common/vsprintf.cxx,
+ src/stdio/device/kerndiag.cxx, src/stdio/device/sim.cxx,
+ src/stdio/device/strngdev.cxx, src/stdio/output/fputc.cxx,
+ src/stdio/output/fputs.cxx, src/stdio/output/puts.cxx,
+ src/stdio/output/vfnprintf.cxx, src/support/tsd.cxx:
+ Modified to support buffered reads including renaming
+ _EccInternalFileStruct to __EccStdioStream which is what affects
+ most of these files
+ * src/include/file_if.inl, src/stdio/common/file_if.cxx: added for
+ the above reason
+ * src/stdio/common/sscanf.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/input/Makefile.am: added to provide sscanf() functionality
+ * include/ctype.h, include/stdio.h, include/stdlib.h,
+ include/string.h, include/eccconf/libc.h, src/ctype/ctype.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/stdio/common/stdio.cxx:
+ rename *_INLINES macros with prefix CYG rather than ECC
+ * include/errno.h, src/errno/errno.cxx, src/errno/strerror.cxx:
+ rename ErrNo to _ErrNo and add EAGAIN and EWOULDBLOCK error codes
+ * configure.in, Makefile.am, src/stdio/Makefile.am,
+ src/stdio/input/Makefile.am: add support for building
+ file_if.cxx sscanf.cxx and vfscanf.cxx
+ * src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/input/Makefile.in, configure, Makefile.in: regenerated
+
+Tue Mar 24 19:51:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clockfn.cxx, src/time/clock.cxx:
+ Renamed clock.cxx to clockfn.cxx (preserving CVS history)
+ * Makefile.am, src/time/Makefile.am: updated to reflect name change
+ * Makefile.in, src/time/Makefile.in: regenerated
+
+Tue Mar 24 16:28:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl: Swap around definitions to get right order so
+ inlining works
+
+Tue Mar 24 14:43:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/stdio.h, include/stdlib.h, include/string.h:
+ modify to only conditionally include inlines
+ * src/ctype/ctype.cxx, src/stdio/common/stdio.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/ctype/Makefile.am: Add to provide real linkable alternatives
+ to inline functions
+ * Makefile.am, configure.in, src/Makefile.am,
+ src/stdio/common/Makefile.am, src/stdlib/Makefile.am,
+ src/string/Makefile.am: modified to support previous additions
+ * include/eccconf/libc.h: redefine inline macro to add extern inline,
+ and add conditional defines for inline functions. Also rename
+ space vs. speed macro to have CYG instead of ECC prefix
+ * include/stdio.inl: fix comment typo
+ * src/stdlib/qsort.cxx: fix to define inline functions properly
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/memcpy.cxx,
+ src/string/memset.cxx, src/string/strcat.cxx, src/string/strchr.cxx,
+ src/string/strcmp.cxx, src/string/strcpy.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx
+ * Makefile.in, configure, src/Makefile.in, src/ctype/Makefile.in,
+ src/stdio/common/Makefile.in, src/stdlib/Makefile.in,
+ src/string/Makefile.in: regenerate
+
+
+Mon Mar 23 19:19:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx: added to support temporary _exit
+ * include/stdlib.h, include/stdlib.inl: added support for _exit and
+ added abs(), labs(), div() and ldiv() functions
+ * src/include/file_if.hxx: added support for _exit kludge
+ * src/stdlib/qsort.cxx: Added Berkeley copyright message
+ * src/time/clock.cxx: Include correct kernel config header as
+ CYG_CONFIGURATION rather than <config.h>
+ * Makefile.am src/stdlib/Makefile.am: added support for _exit
+ * Makefile.in, src/stdlib/Makefile.in: regenerated
+
+Mon Mar 23 14:41:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Replace ECCPKG_ANSI_LIBC with CYGPKG_ANSI_LIBC in all source files
+
+Mon Mar 23 14:28:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/string.inl: add file to provide strcoll()
+ * include/string.h: include string.inl
+ * ctype.h: include ctype.inl (oops!)
+ * include/stdlib.h: include stdlib.inl (oops!)
+
+Mon Mar 23 13:30:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl: added to provide ANSI ctype
+ functionality
+ * include/stdlib.h, include/stdlib.inl, src/include/stdlibbsp.hxx,
+ src/stdlib/Makefile.am, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/stdlib/srand.cxx,
+ src/stdlib/strtol.cxx, src/stdlib/strtoul.cxx: Added to provide
+ many stdlib functions
+ * src/include/tsd.hxx: modified to support rand() random number
+ seed, and added some comments
+ * configure.in, Makefile.am, src/Makefile.am: modified to support
+ addition of above new sources
+ * include/eccconf/libc.h: Add extra helpful comments, and #include
+ kernel config file
+ * src/time/clock.cxx: #include clock.inl and fix to call
+ get_resolution() properly now
+ * Makefile.in, configure, src/Makefile.in, src/errno/Makefile.in,
+ src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.in, src/stdio/output/Makefile.in,
+ src/stdlib/Makefile.in, src/strings/Makefile.in,
+ src/support/Makefile.in, src/time/Makefile.in,
+ tests/Makefile.in: regenerated
+
+
+Sun Mar 22 21:29:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h, src/include/timesupp.hxx, src/time/clock.cxx,
+ src/time/Makefile.am: added to provide clock() function
+ * src/Makefile.am: modified to try to build in src/time directory
+ * include/eccconf/libc.h: added and is now the main configuration
+ file for this package
+ * acconfig.h, include/libcconf.h.in, include/stamp-h.in: removed
+ due to usage of libc.h above instead
+ * Almost all *.h, *.hxx and *.cxx: replaced LIBC_CONFIG_HEADER
+ defined include with simple <pkgconf/libc.h>
+ * configure.in: remove AM_CONFIG_HEADER of libcconf.h and
+ LIBC_CONFIG_HEADER definition. Also remove usage of builtin
+ memcpy() etc. from gcc, and generate src/time/Makefile
+ * Makefile.am: link in src/time/clock.o
+ * src/include/file_if.hxx, src/include/sim.hxx: use config header
+ to decide whether C library is to be used
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in: regenerated
+
+Fri Mar 20 18:08:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fixed bug with ignoring terminating NULL
+
+1998-03-20 Chris Tarpy <ctarpy@bhaji.cygnus.co.uk>
+
+ * configure: - regenerated
+ * Makefile.am: - Support added for libc testcases
+ * Makefile.in: regenerated
+ * configure.in: set c compiler, descend test dir
+ * tests/Makefile.in: added
+ * tests/Makefile.am: added
+ * tests/tcdiag.cxx : added
+
+
+Thu Mar 19 11:41:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Initial check-in of everything
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/startup/current/cdl/startup.cdl b/cesar/ecos/packages/language/c/libc/startup/current/cdl/startup.cdl
new file mode 100644
index 0000000000..30bc7476b2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/startup/current/cdl/startup.cdl
@@ -0,0 +1,362 @@
+# ====================================================================
+#
+# startup.cdl
+#
+# ISO environment startup/termination related configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jlarmour
+# Contributors:
+# Date: 2000-04-14
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_LIBC_STARTUP {
+ display "ISO environment startup/termination"
+ description "
+ This package manages the control of the
+ environment (in the general sense) that an
+ application would require for full ISO C / POSIX
+ compatibility, including a main() entry point
+ supplied with arguments and an environment
+ (as retrievable by the getenv() function).
+ It also includes at the other end of things,
+ what happens when main() returns or exit() is
+ called."
+ doc ref/c-library-startup.html
+ include_dir cyg/libc/startup
+ parent CYGPKG_LIBC
+ requires CYGPKG_ISOINFRA
+ requires { CYGINT_LIBC_STARTUP_CONTEXT == 1 }
+ implements CYGINT_ISO_EXIT
+ implements CYGINT_ISO_MAIN_STARTUP
+ implements CYGINT_ISO_ENVIRON
+
+ compile _exit.cxx abort.cxx atexit.cxx \
+ environ.cxx exit.cxx invokemain.cxx \
+ main.cxx mainthread.cxx
+
+ compile -library=libextras.a cstartup.cxx
+
+# ====================================================================
+
+ cdl_interface CYGINT_LIBC_STARTUP_EXTERNAL_INVOKE_MAIN_POSSIBLE {
+ display "main() can be invoked elsewhere"
+ description "Implementors of this interface show that they
+ allow main() to be invoked elsewhere."
+ flavor bool
+ no_define
+ }
+
+ cdl_option CYGDAT_LIBC_ARGUMENTS {
+ display "Arguments to main()"
+ flavor data
+ default_value {"{\"\", NULL}"}
+ description "
+ This option allows the setting of the arguments
+ to the main function. This only has any effect
+ when cyg_iso_c_start() is used to start the
+ ISO C compatibility. This will automatically
+ invoke main() in an ISO C compatible fashion.
+ This option is in fact used as argv, and so is
+ an n-tuple of string constants. The final
+ entry must be NULL. Conventionally if argv\[0\]
+ is supplied, it is used to inform the program
+ of its name."
+ }
+
+
+ cdl_component CYGPKG_LIBC_STARTUP_CONTEXT {
+ display "Startup context for main()"
+ flavor none
+ no_define
+ description "This component describes the options available for
+ what context main() is invoked in, such as in a thread
+ etc."
+
+ cdl_interface CYGINT_LIBC_STARTUP_CONTEXT {
+ display "Startup context implementors"
+ no_define
+ }
+
+
+ cdl_option CYGSEM_LIBC_STARTUP_MAIN_INITCONTEXT {
+ display "Invoked from initialization context"
+ description "With this option selected, main() will be
+ called via cyg_user_start() (unless the program
+ overrides the default cyg_user_start()). This
+ means it is run in the context of the system
+ initialization code, without the eCos kernel
+ scheduler running, and using the startup stack.
+ This means that any functions that may require
+ interactions with a running kernel will not
+ work (including libc functions, if configured
+ to be thread safe for example), so you should
+ restrict yourself to only calling fully
+ re-entrant functions from within main() in
+ this case."
+ flavor bool
+ default_value { 0 == CYGPKG_KERNEL && 0 ==
+ CYGINT_LIBC_STARTUP_EXTERNAL_INVOKE_MAIN_POSSIBLE }
+ implements CYGINT_LIBC_STARTUP_CONTEXT
+ implements CYGINT_LIBC_STARTUP_MAIN_NO_STACK_SIZE
+ }
+
+ cdl_component CYGSEM_LIBC_STARTUP_MAIN_THREAD {
+ display "Invoked as eCos thread"
+ requires CYGPKG_KERNEL
+ flavor bool
+ default_value { 0 != CYGPKG_KERNEL && 0 == \
+ CYGINT_LIBC_STARTUP_EXTERNAL_INVOKE_MAIN_POSSIBLE }
+ implements CYGINT_LIBC_STARTUP_CONTEXT
+ description "
+ With this option selected, main() is invoked from an eCos
+ thread."
+
+ cdl_option CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM {
+ display "System provides stack for main()'s thread"
+ description "
+ This option controls whether the stack of
+ main()'s thread is provided by the application or
+ provided by the system. When disabled, the
+ application must declare a pointer variable
+ cyg_libc_main_stack which is a pointer to an
+ appropriately aligned region of memory. The
+ application must also declare a variable of
+ type `int' called cyg_libc_main_stack_size
+ which contains the size of the stack in bytes.
+ This must be a multiple of 8."
+ flavor bool
+ default_value 1
+ }
+
+ cdl_option CYGNUM_LIBC_MAIN_THREAD_PRIORITY {
+ display "Priority of main()'s thread"
+ description "
+ This option is used to provide the thread
+ priority which main()'s thread runs at. Be
+ sure to check that this number is appropriate
+ for the kernel scheduler chosen. Different
+ kernel schedulers impose different restrictions
+ on the usable priorities."
+ flavor data
+ legal_values 0 to 0x7fffffff
+ default_value 10
+ }
+ }
+
+ cdl_option CYGSEM_LIBC_STARTUP_MAIN_OTHER {
+ display "Invoked elsewhere"
+ description "With this option selected, main() must be
+ invoked by a separate package, or by the user."
+ flavor bool
+ default_value { 0 != \
+ CYGINT_LIBC_STARTUP_EXTERNAL_INVOKE_MAIN_POSSIBLE }
+ requires CYGINT_LIBC_STARTUP_EXTERNAL_INVOKE_MAIN_POSSIBLE
+ implements CYGINT_LIBC_STARTUP_CONTEXT
+ }
+ }
+
+ cdl_interface CYGINT_LIBC_STARTUP_MAIN_NO_STACK_SIZE {
+ display "Don't allow main()'s stack size to be set"
+ description "This interface describes whether the stack size
+ value set in this package is supported by the
+ implementation that invokes main. If not, that
+ option is disabled."
+ flavor bool
+ no_define
+ }
+
+ cdl_option CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE {
+ display "main()'s default thread stack size"
+ flavor data
+ legal_values 16 to 0x7fffffff
+ default_value 8192
+ active_if !CYGINT_LIBC_STARTUP_MAIN_NO_STACK_SIZE
+ description "
+ This option sets the size of the stack used
+ in the context that invokes main(). For example,
+ with an eCos kernel, when the cyg_iso_c_start()
+ function is used to invoke the user-supplied
+ main() function in an ISO C compatible fashion,
+ a separate thread is created to call main().
+ This option controls the size of that thread's
+ stack, which is allocated in the BSS. It
+ must be a multiple of 8. Note, a low number
+ here may be overriden by the HAL if there is
+ a minimum requirement to process interrupts
+ etc. This option cannot be set if the implementation
+ that invokes main() does not use it."
+ }
+
+ cdl_component CYGFUN_LIBC_ATEXIT {
+ display "Include atexit() function"
+ flavor bool
+ default_value 1
+ description "
+ This option enables the use of the atexit()
+ function, and ensure that the atexit handlers
+ are invoked from within exit() as defined in
+ the ISO C standard."
+
+ cdl_option CYGNUM_LIBC_ATEXIT_HANDLERS {
+ display "Number of functions atexit() supports"
+ flavor data
+ legal_values 1 to 0x7fffffff
+ default_value 32
+ description "
+ This option sets the number of functions
+ that atexit() has room for. In other words,
+ the number of separate atexit() calls that
+ can be made before calling exit() or returning
+ from main() ( in an environment controlled by
+ cyg_iso_c_start() ). For strict compliance
+ with the ISO C standard this should be at
+ least 32."
+ }
+ }
+
+ cdl_option CYGSEM_LIBC_EXIT_CALLS_FFLUSH {
+ display "Make exit() call fflush()"
+ requires CYGINT_ISO_STDIO_FILEACCESS
+ default_value { 0 != CYGINT_ISO_STDIO_FILEACCESS }
+ description "
+ This option will ensure that all output
+ streams are flushed when exitting using
+ exit() as prescribed by the ISO C standard."
+ }
+
+ cdl_option CYGSEM_LIBC_EXIT_STOPS_SYSTEM {
+ display "_exit() stops all threads"
+ requires CYGPKG_KERNEL
+ default_value 0
+ description "
+ If this option is enabled then _exit(),
+ which is called from exit() which itself is
+ called on return from main(), stops the eCos
+ scheduler. For strict POSIX 1003.1
+ compatibility this would be the normal
+ behaviour. To allow the thread to simply
+ exit, without affecting other threads, simply
+ leave this option disabled. If there is no eCos
+ scheduler, then _exit() simply loops
+ irrespective of the setting of this option."
+ }
+
+ cdl_option CYGDAT_LIBC_DEFAULT_ENVIRONMENT {
+ display "Default environment"
+ flavor data
+ default_value {"{ NULL }"}
+ description "
+ This option allows the setting of the default
+ contents of the environment. This is in fact
+ the contents of the global environment pointer
+ char **environ defined by POSIX 1003.1. Strings
+ must be of the form NAME=VALUE, and the final
+ entry must be NULL."
+ }
+
+ cdl_option CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS {
+ display "Invoke default static constructors"
+ requires CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+ requires { CYGSEM_LIBC_STARTUP_MAIN_THREAD || \
+ (CYGSEM_LIBC_STARTUP_MAIN_OTHER && CYGPKG_POSIX_PTHREAD) }
+ default_value 0
+ description "
+ This option causes the C library to call
+ static constructors with default priority
+ from within the context of the main() thread,
+ working with the co-operation of the HAL.
+ This may be needed for environments that
+ expect static constructors to be run in a
+ thread context. Note that this uses an object
+ with priority 65534. Therefore do not use
+ priority 65534 for any other static objects
+ with this option enabled."
+ }
+
+
+# ====================================================================
+
+ cdl_component CYGPKG_LIBC_STARTUP_OPTIONS {
+ display "ISO environment startup/termination build options"
+ flavor none
+ no_define
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_LIBC_STARTUP_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building this package. These flags are used in addition
+ to the set of global flags."
+ }
+
+ cdl_option CYGPKG_LIBC_STARTUP_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building this package. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_LIBC_STARTUP_TESTS {
+ display "ISO environment startup/termination tests"
+ flavor data
+ no_define
+ calculated { "tests/atexit" }
+ description "
+ This option specifies the set of tests for this package."
+ }
+ }
+}
+
+# ====================================================================
+# EOF startup.cdl
diff --git a/cesar/ecos/packages/language/c/libc/startup/current/src/_exit.cxx b/cesar/ecos/packages/language/c/libc/startup/current/src/_exit.cxx
new file mode 100644
index 0000000000..032fe73f62
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/startup/current/src/_exit.cxx
@@ -0,0 +1,111 @@
+//========================================================================
+//
+// _exit.cxx
+//
+// _exit() as from POSIX 1003.1 section 3.2.2 "Terminate a process"
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-28
+// Purpose: Provides POSIX 1003.1 _exit() function
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_startup.h> // Configuration header
+#include <pkgconf/system.h>
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Common tracing support
+#include <cyg/infra/cyg_ass.h> // Common assertion support
+#include <stdlib.h> // Header for all stdlib functions
+ // (like this one)
+#ifdef CYGPKG_KERNEL
+# include <pkgconf/kernel.h> // kernel configuration
+# include <cyg/kernel/thread.hxx> // eCos kernel for thread termination
+# include <cyg/kernel/thread.inl> // and
+# include <cyg/kernel/sched.hxx> // for stopping the scheduler
+# include <cyg/kernel/sched.inl>
+#endif
+
+
+// FUNCTIONS
+
+externC void
+_exit( int status )
+{
+ CYG_REPORT_FUNCTION(); // shouldn't return, but CYG_FAIL will catch it
+ CYG_REPORT_FUNCARG1DV( status );
+
+ CYG_ASSERT( status == 0, "Program _exiting with non-zero error status");
+
+#ifdef CYGPKG_KERNEL
+
+# ifdef CYGSEM_LIBC_EXIT_STOPS_SYSTEM
+
+ Cyg_Scheduler::lock(); // prevent rescheduling
+
+ for (;;)
+ CYG_EMPTY_STATEMENT;
+
+# else
+
+ Cyg_Thread::exit();
+
+# endif
+#endif
+
+ // loop forever
+ for (;;)
+ CYG_EMPTY_STATEMENT;
+
+ CYG_FAIL( "_exit() returning!!!" );
+
+ CYG_REPORT_RETURN();
+} // _exit()
+
+
+// EOF _exit.cxx
diff --git a/cesar/ecos/packages/language/c/libc/startup/current/src/abort.cxx b/cesar/ecos/packages/language/c/libc/startup/current/src/abort.cxx
new file mode 100644
index 0000000000..8cfded845b
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/startup/current/src/abort.cxx
@@ -0,0 +1,98 @@
+//===========================================================================
+//
+// abort.cxx
+//
+// Implementation of the abort() function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-28
+// Purpose: Implement the ISO C abort() function from 7.10.4.1
+// Description: This implements abort() simply by raising SIGABRT as
+// required by ISO C
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_startup.h> // Configuration header
+#include <pkgconf/isoinfra.h> // CYGINT_ISO_SIGNAL_IMPL
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+
+#include <stdlib.h> // Header for all stdlib functions
+ // (like this one)
+#if CYGINT_ISO_SIGNAL_IMPL > 0
+# include <signal.h>
+#endif
+
+// FUNCTIONS
+
+externC void
+abort( void )
+{
+ CYG_REPORT_FUNCNAME( "abort" );
+
+#if CYGINT_ISO_SIGNAL_IMPL > 0
+ int rc;
+
+ rc = raise(SIGABRT);
+
+ CYG_TRACE1(1, "raise(SIGABRT) returned!!! rc=%d", rc);
+
+ CYG_FAIL("raise(SIGABRT) returned");
+
+#endif
+
+ // ISO C clearly says that abort() cannot return to its caller
+
+ // loop forever
+ for (;;)
+ CYG_EMPTY_STATEMENT;
+
+ CYG_REPORT_RETURN();
+} // abort()
+
+// EOF abort.cxx
diff --git a/cesar/ecos/packages/language/c/libc/startup/current/src/atexit.cxx b/cesar/ecos/packages/language/c/libc/startup/current/src/atexit.cxx
new file mode 100644
index 0000000000..2989c5a374
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/startup/current/src/atexit.cxx
@@ -0,0 +1,137 @@
+//========================================================================
+//
+// atexit.cxx
+//
+// Implementation of the atexit() function
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_startup.h> // Configuration header
+
+// Include atexit() ?
+#ifdef CYGFUN_LIBC_ATEXIT
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Common tracing support
+#include <cyg/infra/cyg_ass.h> // Common assertion support
+#include <stdlib.h> // Header for all stdlib functions
+ // (like this one)
+
+// STATICS
+
+// cyg_libc_atexit_handlers contains the functions to call.
+// cyg_libc_atexit_handlers_count contains the number of valid handlers
+// or you can consider the next free handler slot in
+// cyg_libc_atexit_handlers.
+
+static __atexit_fn_t
+cyg_libc_atexit_handlers[ CYGNUM_LIBC_ATEXIT_HANDLERS ];
+
+static cyg_ucount32 cyg_libc_atexit_handlers_count;
+
+
+// FUNCTIONS
+
+externC void
+cyg_libc_invoke_atexit_handlers( void )
+{
+ CYG_REPORT_FUNCNAME( "cyg_libc_invoke_atexit_handlers");
+ CYG_REPORT_FUNCARGVOID();
+
+ cyg_ucount32 i;
+
+ for (i=cyg_libc_atexit_handlers_count; i>0; --i) {
+
+ CYG_TRACE1( true,
+ "Calling function registered with atexit at addr %08x",
+ cyg_libc_atexit_handlers[i-1] );
+ CYG_CHECK_FUNC_PTR( cyg_libc_atexit_handlers[i-1],
+ "Function to call in atexit handler list "
+ "isn't valid! Even though it was when "
+ "entered!" );
+
+ (*cyg_libc_atexit_handlers[i-1])();
+
+ } // for
+
+ CYG_REPORT_RETURN();
+} // cyg_libc_invoke_atexit_handlers()
+
+
+externC int
+atexit( __atexit_fn_t func_to_register )
+{
+ CYG_REPORT_FUNCNAMETYPE( "atexit", "returning %d" );
+ CYG_REPORT_FUNCARG1XV( func_to_register );
+
+ CYG_CHECK_FUNC_PTR( func_to_register,
+ "atexit() not passed a valid function argument!" );
+
+ // have we any slots left?
+ if (cyg_libc_atexit_handlers_count >=
+ sizeof(cyg_libc_atexit_handlers)/sizeof(__atexit_fn_t) ) {
+
+ CYG_REPORT_RETVAL( 1 );
+ return 1; // failure
+ } // if
+
+ cyg_libc_atexit_handlers[cyg_libc_atexit_handlers_count++] =
+ func_to_register;
+
+ CYG_REPORT_RETVAL(0);
+ return 0;
+} // atexit()
+
+
+#endif // ifdef CYGFUN_LIBC_ATEXIT
+
+// EOF atexit.cxx
diff --git a/cesar/ecos/packages/language/c/libc/startup/current/src/cstartup.cxx b/cesar/ecos/packages/language/c/libc/startup/current/src/cstartup.cxx
new file mode 100644
index 0000000000..130b870cae
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/startup/current/src/cstartup.cxx
@@ -0,0 +1,145 @@
+//=======================================================================
+//
+// cstartup.cxx
+//
+// Support for startup of ISO C environment
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/system.h> // CYGPKG_KERNEL
+#include <pkgconf/libc_startup.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Common tracing support
+
+#ifdef CYGPKG_KERNEL
+# include <pkgconf/kernel.h> // eCos kernel configuration
+# include <cyg/kernel/thread.hxx> // eCos thread support
+# include <cyg/kernel/thread.inl>
+#endif
+
+
+// FUNCTION PROTOTYPES
+
+externC void
+cyg_libc_invoke_main( CYG_ADDRWORD );
+
+// EXTERNS
+
+#ifdef CYGSEM_LIBC_STARTUP_MAIN_THREAD
+extern Cyg_Thread cyg_libc_main_thread;
+
+// FUNCTIONS
+
+externC void
+cyg_iso_c_start( void )
+{
+ static int initialized=0;
+
+ CYG_REPORT_FUNCNAME( "cyg_iso_c_start" );
+ CYG_REPORT_FUNCARGVOID();
+
+ if (initialized++ == 0) {
+ CYG_TRACE0( true, "Resuming cyg_libc_main_thread" );
+ cyg_libc_main_thread.resume();
+ }
+ CYG_REPORT_RETURN();
+
+} // cyg_iso_c_start()
+
+// define an object that will automatically call cyg_iso_c_start()
+
+class cyg_libc_startup_dummy_constructor_class {
+public:
+ cyg_libc_startup_dummy_constructor_class() { cyg_iso_c_start(); }
+};
+
+static cyg_libc_startup_dummy_constructor_class cyg_libc_startup_obj
+ CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_LIBC);
+
+#elif defined( CYGSEM_LIBC_STARTUP_MAIN_INITCONTEXT )
+
+// otherwise replace the default cyg_user_start(), but of course keep
+// it a weak symbol in case the user wants to override
+
+externC void
+cyg_user_start(void) CYGBLD_ATTRIB_WEAK;
+
+externC void
+cyg_user_start(void)
+{
+ cyg_libc_invoke_main(0);
+}
+
+externC void
+cyg_iso_c_start( void )
+{
+ static int initialized=0;
+
+ CYG_REPORT_FUNCNAME( "cyg_iso_c_start" );
+ CYG_REPORT_FUNCARGVOID();
+
+ // In case they want to explicitly invoke the C library from
+ // cyg_user_start() themselves
+ if (initialized++ == 0) {
+ cyg_libc_invoke_main(0);
+ }
+ CYG_REPORT_RETURN();
+}
+#else
+
+externC void
+cyg_iso_c_start( void ) {}
+
+#endif
+
+// EOF cstartup.cxx
diff --git a/cesar/ecos/packages/language/c/libc/startup/current/src/environ.cxx b/cesar/ecos/packages/language/c/libc/startup/current/src/environ.cxx
new file mode 100644
index 0000000000..54ebb5c424
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/startup/current/src/environ.cxx
@@ -0,0 +1,71 @@
+//========================================================================
+//
+// environ.cxx
+//
+// C library definition and allocation of POSIX 1003.1 environ
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose: Provide extern char **environ as required by POSIX 1003.1
+// Description: C library definition and allocation of POSIX 1003.1 environ
+// Usage: You can override environ at startup if you wish simply
+// by redefining yourself. Setting the libc.h configuration
+// option is the intended method though.
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_startup.h> // Configuration header
+#include <stddef.h> // NULL
+
+// GLOBALS
+
+// The global environment. The default can be configured in
+// <pkgconf/libc_startup.h>
+
+static char * const
+cyg_libc_default_environ[] = CYGDAT_LIBC_DEFAULT_ENVIRONMENT;
+
+char **environ __attribute__((weak)) = (char **)cyg_libc_default_environ;
+
+// EOF environ.cxx
diff --git a/cesar/ecos/packages/language/c/libc/startup/current/src/exit.cxx b/cesar/ecos/packages/language/c/libc/startup/current/src/exit.cxx
new file mode 100644
index 0000000000..cd202f7a86
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/startup/current/src/exit.cxx
@@ -0,0 +1,107 @@
+//=========================================================================
+//
+// exit.cxx
+//
+// Implementation of the exit() function
+//
+//=========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_startup.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Common tracing support
+#include <cyg/infra/cyg_ass.h> // Common assertion support
+#include <stdio.h> // fflush()
+#include <errno.h> // errno
+#include <stdlib.h> // Header for all stdlib functions
+ // (like this one)
+// EXTERNAL PROTOTYPES
+
+externC void
+cyg_libc_invoke_atexit_handlers( void );
+
+// FUNCTIONS
+
+externC void
+exit( int status )
+{
+ CYG_REPORT_FUNCTION(); // shouldn't return, but CYG_FAIL will catch it
+ CYG_REPORT_FUNCARG1DV( status );
+
+ // Strictly the only thing exit() does is invoke the atexit handlers
+ // and flush stdio buffers. Anything else is for _exit()
+ // within the implementation)
+
+#ifdef CYGFUN_LIBC_ATEXIT
+ // we start with the atexit handlers
+ cyg_libc_invoke_atexit_handlers();
+#endif
+
+#ifdef CYGSEM_LIBC_EXIT_CALLS_FFLUSH
+
+ int rc;
+
+ CYG_TRACE0( true, "Calling fflush( NULL )" );
+ rc = fflush( NULL );
+
+ CYG_TRACE2( rc != 0, "fflush() returned non-zero. It returned %d and "
+ "errno indicates the error: %s", rc, strerror(errno) );
+#endif
+
+ _exit( status );
+
+ CYG_FAIL( "__libc_exit() returning!!!" );
+
+ CYG_REPORT_RETURN();
+} // __libc_exit()
+
+// EOF exit.cxx
diff --git a/cesar/ecos/packages/language/c/libc/startup/current/src/invokemain.cxx b/cesar/ecos/packages/language/c/libc/startup/current/src/invokemain.cxx
new file mode 100644
index 0000000000..565b0dbe72
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/startup/current/src/invokemain.cxx
@@ -0,0 +1,131 @@
+//=======================================================================
+//
+// invokemain.cxx
+//
+// Support for startup of ISO C environment
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose: Provide entry point for thread which then calls main()
+// Description: cyg_libc_invoke_main() is used as the entry point for
+// the thread object that is created to call the
+// user-supplied main() function. It sets up the arguments
+// (if any) and invokes exit() if main() returns
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_startup.h> // Configuration header
+#include <pkgconf/isoinfra.h>
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Common tracing support
+#include <cyg/infra/cyg_ass.h> // Common assertion support
+#include <stdlib.h> // exit()
+
+// EXTERNS
+
+externC cyg_bool cyg_hal_stop_constructors;
+
+// FUNCTION PROTOTYPES
+
+externC int
+main( int argc, char *argv[] );
+
+externC void
+cyg_hal_invoke_constructors(void);
+
+externC void
+pthread_exit( void *value_ptr );
+
+// STATICS
+
+#ifdef CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS
+class cyg_libc_dummy_constructor_class {
+public:
+ cyg_libc_dummy_constructor_class(void) { ++cyg_hal_stop_constructors; }
+};
+
+static cyg_libc_dummy_constructor_class cyg_libc_dummy_constructor_obj
+ CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_PREDEFAULT);
+#endif
+
+// FUNCTIONS
+
+externC void
+cyg_libc_invoke_main( CYG_ADDRWORD )
+{
+ CYG_REPORT_FUNCNAME( "cyg_libc_invoke_main" );
+ CYG_REPORT_FUNCARG1( "argument is %s", "ignored" );
+
+#ifdef CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS
+ // finish invoking constructors that weren't called by default
+ cyg_hal_invoke_constructors();
+#endif
+
+ // argv[argc] must be NULL according to the ISO C standard 5.1.2.2.1
+ char *temp_argv[] = CYGDAT_LIBC_ARGUMENTS ;
+ int rc;
+
+ rc = main( (sizeof(temp_argv)/sizeof(char *)) - 1, &temp_argv[0] );
+
+ CYG_TRACE1( true, "main() has returned with code %d. Calling exit()",
+ rc );
+
+#ifdef CYGINT_ISO_PTHREAD_IMPL
+ // It is up to pthread_exit() to call exit() if needed
+ pthread_exit( (void *)rc );
+ CYG_FAIL( "pthread_exit() returned!!!" );
+#else
+ exit(rc);
+ CYG_FAIL( "exit() returned!!!" );
+#endif
+
+ CYG_REPORT_RETURN();
+
+} // cyg_libc_invoke_main()
+
+// EOF invokemain.cxx
diff --git a/cesar/ecos/packages/language/c/libc/startup/current/src/main.cxx b/cesar/ecos/packages/language/c/libc/startup/current/src/main.cxx
new file mode 100644
index 0000000000..a43723ad52
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/startup/current/src/main.cxx
@@ -0,0 +1,112 @@
+//=======================================================================
+//
+// main.cxx
+//
+// Default main() function
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose: Provide a default empty main() function
+// Description: This file provides a default empty main() function so
+// that things don't fall apart if the user starts the
+// ISO C environment (the default setting) but doesn't
+// provide their own main(). This is taken advantage of
+// in some tests (for example)
+// Usage: Obviously simply override main() in your own program to
+// prevent the use of the one below
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/system.h> // for CYGPKG_KERNEL
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Common tracing support
+#include <cyg/infra/cyg_ass.h> // Common assertion support
+
+// FUNCTION PROTOTYPES
+
+// We provide a weakly named main to allow this to link if the user
+// doesn't provide their own main. This isn't strictly good behaviour,
+// but if the user wants good performance then of _course_ they should
+// play with the config options and this won't be called. Or it might
+// be "giving them enough rope" etc. :-)
+
+externC int
+main( int argc, char *argv[] ) __attribute__((weak));
+
+externC void
+cyg_user_start(void);
+
+// FUNCTIONS
+
+externC int
+main( int argc, char *argv[] )
+{
+ CYG_REPORT_FUNCNAMETYPE("main", "returning %d" );
+
+ // try to be helpful by diagnosing malformed arguments
+ CYG_PRECONDITION( argv != NULL, "argv is NULL!" );
+ CYG_PRECONDITION( argv[argc] == NULL, "argv[argc] isn't NULL!" );
+
+ CYG_REPORT_FUNCARG2("argc=%d, argv[0]=%s", argc,
+ (CYG_ADDRWORD)((argv[0]==NULL) ? "NULL" : argv[0]) );
+
+ CYG_TRACE0( true, "This is the system-supplied default main()" );
+
+ // If the kernel isn't present then cyg_libc_invoke_main() will have assumed
+ // main() is present and will call it. But if we're here, then
+ // evidently the user didn't supply one - which can't be right. So we
+ // assume that they have useful code to run in cyg_user_start() instead.
+ // Its better than just exiting
+#ifndef CYGPKG_KERNEL
+ cyg_user_start();
+#endif
+
+ CYG_REPORT_RETVAL(0);
+ return 0; // some CPUs have 0 hard-wired - faster than a reg
+} // main()
+
+// EOF main.cxx
diff --git a/cesar/ecos/packages/language/c/libc/startup/current/src/mainthread.cxx b/cesar/ecos/packages/language/c/libc/startup/current/src/mainthread.cxx
new file mode 100644
index 0000000000..03ba1912ae
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/startup/current/src/mainthread.cxx
@@ -0,0 +1,135 @@
+//=======================================================================
+//
+// mainthread.cxx
+//
+// Support for startup of ISO C environment
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose: Provides a thread object to call into a user-supplied
+// main()
+// Description: Here we define the thread object that calls
+// cyg_libc_invoke_main() which in turn will invoke
+// the user-supplied main() entry point function (or
+// alternatively the dummy empty one supplied by eCos)
+// Usage: Both the stack (cyg_libc_main_stack) and the thread
+// (cyg_libc_main_thread) can be overriden if you provide
+// your own symbols with those names. In the case of the
+// stack obviously you need to ensure
+// CYGNUM_LIBC_MAIN_STACK_SIZE corresponds to your own
+// stack.
+// The thread object is also available externally if you
+// want to control it (suspend/resume/etc.) either by
+// extern Cyg_Thread cyg_libc_main_thread; from C++, using
+// the kernel C++ API, or
+// extern cyg_handle_t cyg_libc_main_thread; from C using
+// the kernel C API.
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_startup.h> // C library configuration
+
+#ifdef CYGSEM_LIBC_STARTUP_MAIN_THREAD
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <pkgconf/kernel.h> // eCos kernel configuration
+#include <cyg/kernel/thread.hxx> // eCos thread support
+#include <cyg/kernel/thread.inl>
+#include <cyg/hal/hal_arch.h> // for CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+
+// EXTERNS
+
+#ifdef CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS
+extern cyg_bool cyg_hal_stop_constructors;
+#endif
+
+// FUNCTION PROTOTYPES
+
+externC void
+cyg_libc_invoke_main( CYG_ADDRWORD );
+
+// STATICS
+
+#ifdef CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM
+
+// override stack size on some platforms
+#ifdef CYGNUM_HAL_STACK_SIZE_TYPICAL
+# if CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE < CYGNUM_HAL_STACK_SIZE_TYPICAL
+# undef CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE
+# define CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+# endif
+#endif
+
+static cyg_uint8 cyg_libc_main_stack[ CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE ]
+ CYGBLD_ATTRIB_ALIGN(CYGARC_ALIGNMENT);
+
+#else // !ifdef CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM
+
+extern char *cyg_libc_main_stack;
+extern int cyg_libc_main_stack_size;
+
+#endif // !ifdef CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM
+
+// GLOBALS
+
+// let the main thread be global so people can play with it (e.g. suspend
+// or resume etc.) if that's what they want to do
+Cyg_Thread cyg_libc_main_thread CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_LIBC) =
+ Cyg_Thread(CYGNUM_LIBC_MAIN_THREAD_PRIORITY,
+ &cyg_libc_invoke_main, (CYG_ADDRWORD) 0,
+ "main",
+ (CYG_ADDRESS) &cyg_libc_main_stack[0],
+#ifdef CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM
+ CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE
+#else
+ cyg_libc_main_stack_size
+#endif
+ );
+
+#endif // ifdef CYGSEM_LIBC_STARTUP_MAIN_THREAD
+
+// EOF mainthread.cxx
diff --git a/cesar/ecos/packages/language/c/libc/startup/current/tests/atexit.c b/cesar/ecos/packages/language/c/libc/startup/current/tests/atexit.c
new file mode 100644
index 0000000000..c0e0448d48
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/startup/current/tests/atexit.c
@@ -0,0 +1,138 @@
+//=================================================================
+//
+// atexit.c
+//
+// Testcase for C library atexit()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library atexit() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/libc_startup.h> // Configuration header
+
+// INCLUDES
+
+#include <stdlib.h> // Main header for stdlib functions
+#include <cyg/infra/testcase.h> // Testcase API
+
+
+// STATICS
+
+static int stage;
+static int failed;
+
+// FUNCTIONS
+
+#if defined(CYGFUN_LIBC_ATEXIT)
+
+static void
+myfun1( void )
+{
+ if (!failed)
+ {
+ CYG_TEST_PASS_FAIL( stage==0, "first function called correctly" );
+ stage=1;
+ } // if
+} // myfun1()
+
+static void
+myfun2( void )
+{
+ if (!failed)
+ {
+ CYG_TEST_PASS_FAIL( stage==1, "Second function called correctly" );
+ stage=2;
+ } // if
+} // myfun2()
+
+static void
+myfun3( void )
+{
+ if (!failed)
+ {
+ CYG_TEST_PASS_FAIL( stage==2, "Second function called correctly" );
+ stage=3;
+ } // if
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C "
+ "library atexit() function");
+
+} // myfun3()
+
+#endif // if defined(CYGFUN_LIBC_ATEXIT)
+
+int
+main( int argc, char *argv[] )
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C "
+ "library atexit() function");
+
+#if defined(CYGFUN_LIBC_ATEXIT)
+
+ // we only have one test in us! We can only exit once :-)
+
+ CYG_TEST_PASS_FAIL( atexit(&myfun3)==0,
+ "Simple registration of first atexit() function" );
+
+ CYG_TEST_PASS_FAIL( atexit(&myfun2)==0,
+ "Simple registration of second atexit() function" );
+
+ CYG_TEST_PASS_FAIL( atexit(&myfun1)==0,
+ "Simple registration of third atexit() function" );
+
+ return 0;
+#else
+ CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C "
+ "library atexit() function");
+
+#endif // if defined(CYGFUN_LIBC_ATEXIT)
+
+} // main()
+
+// EOF atexit.c
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/ChangeLog b/cesar/ecos/packages/language/c/libc/stdio/current/ChangeLog
new file mode 100644
index 0000000000..56f57fe131
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/ChangeLog
@@ -0,0 +1,516 @@
+2005-07-22 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/common/fopen.cxx (fopen): Default the open mode to Read
+ until we have process the flags. Initialize the dev handle. These
+ keep the compiler happy.
+
+2005-04-11 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/common/stream.cxx (read): don't reference flags.buffering
+ when configured by CDL to be unbuffered.
+
+2005-03-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/stdio.h: Added CYGBLD_ATTRIB_{PRINTF|SCANF}_FORMAT where
+ appropriate so the compiler does more checking.
+
+2004-12-08 Daniel Neri <daniel.neri@sigicom.se>
+
+ * cdl/stdio.cdl (CYGPKG_LIBC_STDIO_FILEIO): The FILEIO variant of
+ vsnprintf breaks if CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF is disabled.
+
+2004-09-27 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/stdio.cdl (CYGFUN_LIBC_STDIO_OPEN_POSIX_FDFUNCS): New option,
+ to control whether or not fdopen()/fileno() are implemented.
+ Only build fopen/fclose if CYGPKG_LIBC_STDIO_OPEN.
+
+ * src/common/fclose.cxx: Can remove ifdef CYGPKG_LIBC_STDIO_OPEN since
+ file now isn't even built if not.
+ * src/common/fopen.cxx: Ditto. Also condition on
+ CYGFUN_LIBC_STDIO_OPEN_POSIX_FDFUNCS so decision is centralised in CDL.
+
+2004-08-18 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/stdio.cdl (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE): Only use
+ CYGDAT_IO_SERIAL_TTY_CONSOLE if set.
+
+2004-08-18 Fredrik Hederstierna <fredrik@wespot.com>
+2004-08-18 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/input/vfscanf.cxx (vfscanf): Add long long and long double
+ support.
+ * cdl/stdio.cdl (CYGFUN_LIBC_STDIO_LONGLONG): Make it a new option.
+
+2004-08-16 Oyvind Harboe <oyvind.harboe@zylin.com>
+
+ * src/common/stream.cxx (read): fixed performance problem with
+ unbuffered reads. Long unbuffered i/o read requests would cause
+ one roundtrip to the underlying file system for each byte, instead
+ of a single trip as intended.
+
+2004-03-29 Kelvin Lawson <klawson@ad-holdings.co.uk>
+
+ * src/common/fopen.cxx:
+ * src/common/stream.cxx:
+ * include/io.inl:
+ * include/stream.hxx:
+ Split CYGSTREAM_READWRITE into CYGSTREAM_READWRITE_CREATE and
+ CYGSTREAM_READWRITE_NOCREATE. This fixes fopen() with mode 'w+'
+ which previously did not allow file creation.
+
+2004-03-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/stream.inl (set_position): Flush the output buffer
+ before seeking the underlying file otherwise the writes ends up in
+ the wrong location in the file.
+
+2004-03-15 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/common/fileops.cxx (tmpnam): Only close if open() succeded.
+
+2004-03-12 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/input/vfscanf.cxx (vfscanf): Silence warning.
+
+ * include/stdio.h:
+ Add file operation functions which weren't here before!
+ While I'm here, add __THROW everywhere and use __externC not externC.
+
+ * cdl/stdio.cdl: We implement stdio fileops in isoinfra now.
+ Also set header for that.
+ Build fileops.cxx.
+ L_tmpnam must be at least 4.
+ TMP_MAX must be at least 1, and ISO C says it should be >=25.
+ Add description for CYGPKG_LIBC_STDIO_FILEIO and move up from
+ bottom so it goes with others.
+
+ * src/common/fileops.cxx: New file. Implements rename(), remove(),
+ tmpnam() and tmpfile().
+
+ * src/common/fclose.cxx: Add throw specifiers to match stdio.h.
+ * src/common/feof.cxx: Ditto.
+ * src/common/fflush.cxx: Ditto.
+ * src/common/fopen.cxx: Ditto.
+ * src/common/freopen.cxx: Ditto.
+ * src/common/fseek.cxx: Ditto.
+ * src/common/setvbuf.cxx: Ditto.
+ * src/common/snprintf.cxx: Ditto.
+ * src/common/sprintf.cxx: Ditto.
+ * src/common/sscanf.cxx: Ditto.
+ * src/common/stdioinlines.cxx: Ditto.
+ * src/common/ungetc.cxx: Ditto.
+ * src/common/vsnprintf.cxx: Ditto.
+ * src/common/vsscanf.cxx: Ditto.
+ * src/input/fgetc.cxx: Ditto.
+ * src/input/fgets.cxx: Ditto.
+ * src/input/fread.cxx: Ditto.
+ * src/input/fscanf.cxx: Ditto.
+ * src/input/gets.cxx: Ditto.
+ * src/input/scanf.cxx: Ditto.
+ * src/input/vfscanf.cxx: Ditto.
+ * src/output/fnprintf.cxx: Ditto.
+ * src/output/fprintf.cxx: Ditto.
+ * src/output/fputc.cxx: Ditto.
+ * src/output/fputs.cxx: Ditto.
+ * src/output/fwrite.cxx: Ditto.
+ * src/output/printf.cxx: Ditto.
+ * src/output/vfnprintf.cxx: Ditto.
+
+2004-02-17 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/stdio.cdl (CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS): Can
+ be inactive when no kernel.
+ * cdl/stdio.cdl: Implements file positioning functions in isoinfra.
+
+2003-09-03 Thomas Koeller <thomas.koeller@baslerweb.com>
+
+ * cdl/stdio.cdl: only require "/dev/haldiag" if actually using it.
+
+2003-08-12 Scott Wilkinson <scott@alliantnetworks.com>
+
+ * src/common/fclose.cxx (fclose): fclose would seg-fault if passed
+ NULL FILE pointer. Now returns error. Also cleaned up some exit
+ paths to call Cyg_libc_stdio_files::unlock()
+
+ * src/common/fopen.cxx (fopen): Cleaned up some exit paths to call
+ Cyg_libc_stdio_files::unlock()
+
+2003-06-10 Andrew Lunn <andrew.lunn@ascom.ch>
+ Knud Wöhler <woehler@ossi.fho-emden.de>
+
+ * src/output/vfnprintf.cxx (SARG): Cast size_t to long. This seems
+ to stop gcc from producing wrong code for the plain int clause. The
+ wrong code causes negative numbers to be printed as positive because
+ the sign extend from 32 bits to 64 bits is wrong.
+
+2003-03-06 Gary Thomas <gary@mlbassoc.com>
+
+ * src/input/fread.cxx (fread): Simple EOF should not set error.
+
+ * tests/fileio.c: New file.
+ * cdl/stdio.cdl: Add new file I/O tests.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/stdio.cdl: Fix doc link.
+
+2003-02-15 Fabrice Gautier <Fabrice_Gautier@sdesigns.com>
+
+ * include/stdio.inl (setbuf): Don't supply size with _IONBF.
+ * src/common/stdioinlines.cxx (setbuf): Ditto.
+
+2003-01-29 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/output/vfnprintf.cxx: Add support for C99 'z' flag (size_t).
+
+2002-09-02 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/stream.inl (set_position): Fixed typo in none buffered
+ case. Seek pos bytes, not whence bytes.
+
+2002-05-17 Martin Buck <martin.buck@ascom.ch>
+
+ * include/stdio.h (fnprintf): Added printf-format-checking using
+ CYGBLD_ATTRIB_PRINTF_FORMAT, since gcc does it automatically only for
+ ISO C90 functions.
+ (snprintf) Likewise.
+
+2002-04-24 Yoshinori Sato <qzb04471@nifty.ne.jp>
+
+ * include/streambuf.inl (Cyg_StdioStreamBuffer constructor):
+ Don't set default args in func definition.
+ (set_buffer): Ditto.
+
+2002-04-05 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/input/fgetc.cxx (fgetc): Silence conversion warning.
+
+2002-04-04 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/common/fopen.cxx (fopen_inner): Allocate memory using malloc and
+ placement new, not default new.
+
+ * src/input/fgetc.cxx (fgetc): Don't set error on true EOF.
+
+2002-04-04 Jurica Baricevic <jura@INTESIS.hr>
+
+ * src/common/fclose.cxx (fclose): Use delete if we can.
+
+2002-02-06 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/input/fread.cxx (fread): when looping read into ptrc, not ptr!
+
+2002-01-25 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/stream.inl (set_position): Fix the seek backwards case again.
+ Doh!
+
+2002-01-24 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/stream.inl (set_position): Fix the posdiff == 0 case.
+
+2002-01-24 Jesper Skov <jskov@redhat.com>
+
+ * include/stream.inl (set_position): Check that posdiff is >0
+ before taking the code path that assumes so.
+
+2002-01-17 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/stream.inl (set_position): Use an off_t for bytesavail to
+ prevent warnings.
+
+2001-12-05 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/common/fflush.cxx (cyg_libc_stdio_flush_all_but): Fix starvation
+ problem when waiting for threads to unlock of lower priority.
+ Fix for bug #57014.
+
+2001-11-23 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/stdio.cdl: Add dependency on stdlib string conversion functions
+ for *scanf.
+
+2001-08-10 Robin Farine <robin.farine@terminus.org>
+
+ * src/output/vfnprintf.cxx (cvt): Handles the cases of finite,
+ NaN and infinite numbers separately.
+
+ * src/common/stream.cxx (read): Read correct number of bytes when
+ a character has been "ungot".
+
+2001-08-03 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/streambuf.inl (~Cyg_StdioStreamBuffer): use correct configury
+ to decide when to call free.
+
+2001-07-27 Jesper Skov <jskov@redhat.com>
+
+ * src/common/fflush.cxx (cyg_libc_stdio_flush_all_but): The check
+ for last operation being a read is only valid in buffered IO mode.
+
+2001-07-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/stream.inl (set_position): Take read buffer into account
+ when seeking. Thanks to jjtsai <jjtsai@itri.org.tw> for the
+ help.
+
+2001-07-12 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/common/fflush.cxx (cyg_libc_stdio_flush_all_but): Don't
+ flush a stream that was last used for reading - it doesn't need it.
+ * include/stream.hxx: cyg_libc_stdio_flush_all_but needs to be a
+ friend of class Cyg_StdioStream to do the above.
+
+2001-06-18 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/input/fread.cxx (fread): Fix compilation problem with below
+ change.
+
+2001-06-15 Rob Jansen <rwjansen@planet.nl>
+
+ * src/input/fread.cxx (fread): Changed to read the requested amount
+ of data items instead of stopping on CYG_LIBC_STDIO_BUFSIZE boundaries.
+
+2001-06-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/input/vfscanf.cxx (vfscanf)[CYGINT_LIBC_I18N_MB_REQUIRED]: Added
+ call to mbtowc_fn for current locale to process format string.
+ Also added variable definitions needed in this circumstance.
+ * src/output/vfnprintf.cxx (vfnprintf)[CYGINT_LIBC_I18N_MB_REQUIRED]: Ditto.
+ (vfnprintf): Changed non-multibyte path to simply use the current
+ character rather than call the C mbtowc function since only
+ single byte characters would be possible.
+
+2001-03-19 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/common/stream.cxx (refill_read_buffer): Flush all streams here...
+ (read): ...rather than here, or...
+ (read_byte): ...here.
+ This means less flushing, which improves performance.
+
+ * src/input/fgets.cxx: Add a reminder comment to improve this later.
+ * src/input/gets.cxx: Ditto.
+
+
+2001-03-16 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/stream.hxx (class Cyg_StdioStream): Improve member visibility.
+
+ * src/common/stream.cxx (refill_read_buffer): Ensure eof is set.
+ * src/common/feof.cxx: New file. Implements the long lost
+ feof(), ferror() and clearerr() functions which were MIA for
+ no good reason.
+ * cdl/stdio.cdl: Build it.
+
+2001-03-15 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/stdio.cdl (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE): Default to
+ tty default console.
+
+ * src/input/fgets.cxx (fgets): Reimplement to work with EOF properly.
+ Add tracing.
+ * src/input/gets.cxx (gets): Ditto.
+
+ * include/io.hxx, include/io.inl, include/stream.hxx,
+ include/stream.inl, include/streambuf.hxx, include/streambuf.inl:
+ Silence warnings from recent compilers.
+
+2001-02-01 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/stdio.cdl (CYGPKG_LIBC_STDIO_OPEN): Implements
+ CYGINT_ISO_STDIO_POSIX_FDFUNCS ( fileno() and fdopen() ).
+
+2000-11-01 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/stdio.h: Make FILE array type larger to be more resistant
+ against small data sections.
+ Lose the cyg_libc_stdio_stdin/out/err definitions with macros for
+ stdin/stdout/err since it can cause problems with libgcc exception
+ code. Instead just make these extern FILE *s.
+ * src/common/stderr.cxx:
+ * src/common/stdin.cxx:
+ * src/common/stdout.cxx:
+ Define objects with init priority corresponding to order the fd's
+ should be allocated where applicable.
+ Define actual stdin, stdout, stderr externally visible constants to
+ point to the streams.
+
+ * cdl/stdio.cdl: Support CYGINT_ISO_STDIO_STREAMS interface
+
+ * src/common/fopen.cxx (fdopen): return f as intended
+
+2000-10-23 Jesper Skov <jskov@redhat.com>
+
+ * include/streambuf.inl: Adjust assertions to cope with buffers
+ generated by sprintf and similar non-bound-buffer calls.
+
+2000-08-09 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/io.inl: No need to include string.h
+
+ * cdl/stdio.cdl: Add some more requires statements
+
+2000-08-07 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/common/stream.cxx (Cyg_StdioStream::Cyg_StdioStream):
+ Only call io_buf members conditionally.
+
+2000-08-03 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/common/fseek.cxx: Include assertion and tracing support since
+ they are used.
+
+2000-07-20 Nick Garnett <nickg@cygnus.co.uk>
+
+ * include/stream.hxx (class Cyg_StdioStream): Added get_dev()
+ accessor member function to return underlying device handle.
+
+ * src/common/fopen.cxx: Added fdopen() and fileno(). Reorganized
+ fopen() so that code common with fdopen() is now in a separate
+ function.
+
+ * src/common/stdiosupp.cxx (Cyg_libc_stdio_find_filename): Removed
+ compiler warning.
+
+2000-07-13 Nick Garnett <nickg@cygnus.co.uk>
+
+ * cdl/stdio.cdl: Added common/fseek.cxx to compile list.
+ Reorganized options for stream buffering:
+ CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF now controls whether the user
+ can attach their own buffer to the stream.
+ CYGSEM_LIBC_STDIO_SETVBUF_MALLOC controls whether buffers can be
+ malloced or only statically defined.
+ Added CYGPKG_LIBC_STDIO_FILEIO option to control whether the STDIO
+ package uses the FILEIO package for all IO, or goes directly to
+ the device drivers as before.
+
+ * include/stdio.h: Added file positioning calls defined in section
+ 7.9.9 of the standard.
+
+ * include/io.hxx:
+ * include/io.inl:
+ Added these files to define an abstraction layer for access to the
+ real device underlying an IO stream. Depending on
+ CYGPKG_LIBC_STDIO_FILEIO this either goes to the FILEIO package or
+ directly to the device drivers.
+
+ * include/stream.hxx:
+ Modifications to use io.hxx abstractions.
+ Added second constructor for creating a buffer-only stream.
+ Added initialize() function which contains most of the common
+ stream initialization code.
+ Added a close() member function.
+
+ * include/stream.inl:
+ Modifications to use io.hxx abstractions.
+ Moved most of the work of the destructor into close() member.
+ Added FILEIO version of set_position() member function.
+
+ * include/streambuf.hxx:
+ * include/streambuf.inl:
+ * src/common/streambuf.cxx:
+ Rearranged to match new buffering configuration options.
+
+ * src/common/stream.cxx:
+ Modifications to use io.hxx abstractions.
+ Added second constructor, and moved common initialization code to
+ initialize() member function.
+ Added code to make position member correctly track current file
+ position.
+
+ * src/common/fopen.cxx:
+ Fixed handling of write/append in process_mode().
+ Moved call of process_mode() to before call to cyg_stdio_open() so
+ that stream modes may be passed in.
+ Added code to detect an interactive stream and choose non-buffered
+ mode - fully buffered is now the default.
+ Added calls to cyg_stdio_close() where appropriate.
+
+ * src/output/vfnprintf.cxx: Removed FLUSH() macro and its
+ uses. Deciding to flush should be in the hands of the buffer code,
+ or the user calling fflush().
+
+ * src/common/vsscanf.cxx:
+ Added FILEIO variant of vsscanf(). This uses a precharged stream
+ object to emulate input.
+
+ * src/common/vsnprintf.cxx:
+ Added FILEIO variant of vsnprintf(). This uses the standard stream
+ object to print into the supplied buffer.
+
+ * src/common/fseek.cxx:
+ Added this file to implement file positioning functions.
+
+ * src/common/fclose.cxx (fclose):
+ Added call to Cyg_StdioStream::close().
+
+ * include/stdiosupp.hxx:
+ * src/common/stdiosupp.cxx:
+ Modified Cyg_libc_stdio_find_filename() to take mode, binary and
+ append arguments.
+
+ * src/common/stdin.cxx:
+ * src/common/stdout.cxx:
+ * src/common/stderr.cxx:
+ Modified calls to Cyg_libc_stdio_find_filename() to pass
+ appropriate values for mode, binary and append arguments.
+
+2000-06-18 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/common/vsscanf.cxx: Add NULL select entry to DEVIO_TABLE
+ * src/common/vsnprintf.cxx: Likewise
+
+2000-05-25 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/stream.inl (set_error): If the error is EEOF, set
+ the EOF flag (flags.at_eof) so that clients know.
+
+ * src/input/fgetc.cxx (__fgetc):
+ * src/input/fgets.cxx (_fgets):
+ * src/input/fread.cxx (_fread): Correctly handle an error,
+ or EOF indication, from real_stream->refill_read_buffer().
+
+2000-05-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * New package
+ Separated original libc out into separate packages on functional
+ boundaries.
+ Header files are now managed by isoinfra package
+ Plenty of cleanups done, but no major functionality changes
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2004 eCosCentric Limited
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/ChangeLog.libc b/cesar/ecos/packages/language/c/libc/stdio/current/ChangeLog.libc
new file mode 100644
index 0000000000..88fb2f11f2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/ChangeLog.libc
@@ -0,0 +1,2736 @@
+This ChangeLog file is now obsolete. This is the original ChangeLog from when
+libc was one large package, before being separated. It is included for
+historical reasons.
+
+2000-04-05 Jesper Skov <jskov@redhat.com>
+
+ * src/time/settime.cxx:
+ * src/time/time.cxx:
+ Wallclock moved to io/.
+
+2000-03-28 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/string.cdl,
+ cdl/stdlib.cdl,
+ cdl/stdio.cdl,
+ cdl/libc.cdl:
+
+ Adjust documentation URLs.
+
+2000-03-27 Jesper Skov <jskov@redhat.com>
+
+ * src/clibincl/stream.inl (check_this): Use cyb_bool instead of bool.
+
+2000-03-06 Jesper Skov <jskov@redhat.com>
+
+ * tests/time/strftime.c (test): Adjust test to match below change.
+
+2000-03-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/time/strftime.cxx (do_format): Make sure %m counts from
+ 1..12 rather than 0..11. Fix for case 103300
+
+2000-02-29 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: Correctly use 'n' parameter to
+ restrict length. Credit due to Andrew Lunn here as well.
+ Resolves 103057-CR-1
+
+ * tests/stdio/sprintf2.c (test):
+ Add snprintf tests to verify the correct behaviour of restricting
+ output length
+
+2000-02-10 Jesper Skov <jskov@redhat.com>
+
+ * tests/signal/signal2.c (main):
+ Also reclaim DATA_TLB_MISS vector if available.
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+
+1999-11-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * cdl/string.cdl:
+ Switch to a single boolean configuration option for code size vs.
+ speed optimization.
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl: Define tests.
+
+1999-10-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: We can now remove Berkeley
+ advertising clause
+ * src/stdlib/div.cxx: ditto
+ * src/stdlib/ldiv.cxx: ditto
+ * src/stdlib/strtol.cxx: ditto
+ * src/stdlib/strtoul.cxx: ditto
+ * src/string/strtok.cxx: ditto
+
+1999-10-19 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl:
+
+ Define CDL options for package-specific CFLAGS.
+
+1999-10-08 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_THREAD_PRIORITY): Change
+ default to 10 to keep test farm happy
+ * cdl/startup.cdl: Likewise
+
+1999-10-07 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Specify radio buttons using CDL interfaces.
+
+1999-10-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * cdl/stdio.cdl: Change default to /dev/ttydiag as per 1999-10-01
+ change below
+ * cdl/startup.cdl: Add new form CDL for the startup changes as
+ per 1999-10-05
+
+1999-10-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/libc.h: Add CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM to allow
+ the user to supply their own stack.
+ Rename CYGNUM_LIBC_MAIN_STACK_SIZE to
+ CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE and reparent under
+ CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM
+ Add CYGNUM_LIBC_MAIN_THREAD_PRIORITY to provide main() thread
+ priority
+
+ * src/support/mainthread.cxx: Add support for user-supplied stack
+ Allow user to specify thread priority
+
+ These changes fix CR 101069
+
+1999-10-01 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE): Change
+ default to /dev/ttydiag to get correct console-like behaviour
+ Also don't preclude use if haldiag package isn't included
+ (case 102065)
+
+1999-09-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (cause_fpe): Try both float and integer
+ division by zero.
+
+1999-09-10 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx (cyg_libc_get_malloc_pool): Added for
+ stress_threads test.
+
+1999-09-07 Jesper Skov <jskov@cygnus.co.uk>
+ PRs 20243, 20433
+ * tests/signal/signal2.c: Disabled test3 on ARM.
+
+1999-09-02 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/assert.h: Make the sense of NDEBUG correct; it is "set"
+ when NOT debugging. Fix for CR 101983-CR-1
+ See Stroustrup, "The C++ Programming Language."
+
+1999-08-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen): Set buffer size 0 when not
+ buffering
+ Fix for case 101868
+
+1999-08-17 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Implement radio buttons using "FIXME radio" hack in
+ description field for now.
+
+1999-08-12 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl:
+ Take advantage of MACRONAME_ENUMVAL macros output by CDL.
+
+1999-08-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf2.c (test): Don't rely on 2.345 being exactly
+ representable in binary as a difference of 1 ulp will make it round
+ the wrong way.
+
+1999-07-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fgetc.cxx:
+ Include outline versions of getc() (actually just a symbol alias for
+ fgetc() ) and getchar()
+ Some minor clean-ups
+ Add tracing/assertions
+
+ * src/stdio/input/fputc.cxx:
+ Likewise (except applied to putc() and putchar())
+
+ * src/stdio/common/stdioinlines.cxx (_puts):
+ Call fputc() not _fputc()
+
+ * src/clibincl/stdiosupp.hxx:
+ Remove now obsolete prototypes for _fgetc() and _fputc()
+
+ * include/stdio.h:
+ Don't bother with getc()/putc() macros any more, just call
+ them as functions
+ Include protos for getc(), putc(), getchar() and putchar() functions
+
+1999-06-21 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for SH EDK7708.
+
+1999-06-11 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h: Make FILEs array types so they won't be
+ given $gp relocations on MIPS targets
+
+1999-05-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/ctime.c: Fixed compiler warning.
+
+1999-05-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main):
+ Update CYGPKG_HAL_TX39 -> CYGPKG_HAL_MIPS_TX39 due to recent MIPS
+ HAL changes
+ Fix for PR 20116
+
+1999-04-30 Jesper Skov <jskov@lassi.cygnus.co.uk>
+ PR 19945/19946 workaround
+ * tests/signal/signal2.c: Disabled test 3 for PowerPC sim.
+
+1999-04-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl:
+ Ensure all calls to cyg_libc_time_year_is_leap() are with the full
+ year, and not the direct contents of a struct tm, which are (year-1900)
+
+1999-04-19 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19308, 19410, 19528
+ * tests/time/clock.c (test): Also disable data cache which may
+ affect timing when tracing/assertions are enabled.
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ Add prototype for new cyg_libc_stdio_flush_all_but() function
+
+ * src/clibincl/stream.hxx:
+ Don't include stdiosupp.hxx any more to prevent circular dependency,
+ therefore manually provide _setvbuf prototype
+ Make sure pkgconf/kernel.h is included before mutex.hxx
+
+ * src/clibincl/stream.inl (Cyg_StdioStream::set_error()):
+ Add missing unlock_me()
+
+ * src/stdio/common/fflush.cxx:
+ Separate most of code for fflush(NULL) into separate
+ cyg_libc_stdio_flush_all_but() function, which has the extra
+ capability of omitting one stream
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Add missing clibincl/stdiosupp.hxx include
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::read()):
+ When reading, ensure we flush all output streams
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::flush_output_unlocked):
+ Flush the device as well
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * src/clibincl/streambuf.inl:
+ * src/clibincl/streambuf.hxx:
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ * include/pkgconf/libc.h:
+ * include/stdio.inl (setbuf):
+ Fix dumb typo: BUFSIZE -> BUFSIZ
+ This fixes PR19837
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * include/stdio.inl (setbuf):
+ Use _IONBF when buf==NULL, and _IOLBF otherwise.
+ Fix for PR 19836
+
+1999-04-15 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Tidy display string capitalization.
+
+1999-04-12 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Clarify CDL description of CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE
+
+ * tests/signal/signal2.c: Try harder to generate an exception by
+ accessing a misaligned address
+ Don't handle SIGTRAP any more
+ Part of fix for PRs 19731/19607
+
+1999-04-07 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19667
+ * src/support/mainthread.cxx:
+ Changed to use the new Cyg_Thread constructor.
+
+1999-04-07 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Use new macro
+ HAL_VSR_SET_TO_ECOS_HANDLER if defined, to wrest control from
+ CygMon, for example, by reinstalling eCos' default VSRs for
+ exceptions that we are provoking.
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx: Include stdlib.h for exit()
+ Fix for PR 19720
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/clock.c (test): Disable instruction cache
+ Hopefully fixes PR 19308
+
+1999-03-29 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for PPC as it cannot
+ trap division by zero.
+
+1999-03-26 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/main.cxx (main): Invoke cyg_user_start() if no kernel
+ Only sensible thing to do in our default main in a non-kernel config
+
+1999-03-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/time.c:
+ Increase MAX_TIMEOUT since the sparclite gets very close to overrunning
+ it even when working.
+ Should return -1 iff CYGSEM_LIBC_TIME_TIME_WORKING isn't defined
+ Cosmetic changes
+
+1999-03-25 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/time/time.c (test): Take into account setting of
+ CYGSEM_LIBC_TIME_SETTIME_WORKING ie. does cyg_libc_time_settime()
+ work? If not, check that it returns an error.
+ This was exposed by the random combo in PR#19479.
+
+1999-03-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1 to
+ CYGIMP_...
+
+ Add another rand implementation CYGIMP_LIBC_RAND_SIMPLE1 which is
+ the default
+
+ Part of fix for PR 19562
+
+ * include/sys/cstartup.h:
+ Tidy and remove unnecessary dependencies
+
+ * src/stdlib/rand.cxx:
+ Rename algorithms from CYGSEM_... to CYGIMP_...
+ Add new "simple1" algorithm
+
+ * tests/ctype/ctype.c:
+ Tidy
+
+ * tests/stdlib/rand3.c:
+ Fix so that 0..RAND_MAX is split evenly over buckets, which it wasn't
+ before
+ Deal with case of RAND_MAX not being divisible by NUM_BUCKETS
+ exactly
+ Increase TEST_LENGTH to 200000 to provide more representative sample
+ Add CYG_TEST_INFO output to help ensure it doesn't time out
+ Tidy
+
+ * tests/stdlib/rand4.c:
+ Only fail if more than _two_ thirds (rather than one third) match.
+ This is because half would match for a perfectly random distribution
+ This is the rest of the fix for PR 19562
+ Cosmetic changes
+
+1999-03-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/mainthread.cxx (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ Use CYGNUM_HAL_STACK_SIZE_TYPICAL for the stack size instead of
+ CYGNUM_HAL_MINIMUM_STACK_SIZE.
+
+1999-03-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak: Add -Wno-format when building strftime otherwise
+ it generates warnings for things that we do want to test (null
+ string, and %y format)
+
+1999-03-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Put brackets back round negative number since sdf says the config
+ tool is fixed now (PR 19537)
+
+ Add new CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1
+ options for different rand() algorithms in a so far failed attempt
+ to fix PR 19562
+
+ * src/stdlib/rand.cxx:
+ Add new optional algorithm from Knuth vol.2
+
+ * tests/stdlib/rand4.c:
+ Some tidies
+ Don't run test when using simplest algorithm
+
+ * tests/signal/signal2.c (main):
+ Don't try to make an FPE on tx39 - its possible to detect but requires
+ too much HAL work to be sensible
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Use HAL_ENABLE_INTERRUPTS() rather than kernel to enable interrupts
+
+1999-03-18 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/PKGconf.mak (TESTS): added rand4 compilation.
+
+ * tests/stdlib/rand4.c: added this test for periodicity in the
+ least significant bit of rand().
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Remove CYGFUN_LIBC_TIME_POSIX dependency
+ on CYGPKG_LIBC_STDIO
+
+ * src/stdlib/itoa.cxx:
+ New file to convert integers to ascii
+
+ * include/stdlib.h:
+ Add proto for new cyg_libc_itoa() function
+
+ * include/time.inl:
+ Rework __asctime_r() to use memcpy() and cyg_libc_itoa() rather than
+ sprintf()
+
+ * src/PKGconf.mak:
+ Build stdlib/itoa.cxx
+
+ The above changes fix PR 19448
+
+1999-03-17 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h: Add #define of __time_t_defined to placate newlib
+ if it is used by accident. This is just a temporary workaround though.
+
+1999-03-16 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/PKGconf.mak: Add compile option to step around ARM compiler bug.
+
+1999-03-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Don't use parentheses for now
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Silence bogus compiler warning
+
+1999-03-16 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Enable SIGSEGV test for
+ i386/Linux.
+
+
+1999-03-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Only enable interrupts if they were disabled
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx:
+ Add FIX ME line as a reminder that the workaround there can go away
+ in future
+
+ * include/pkgconf/libc.h:
+ Add proper define for CYGSEM_LIBC_EXIT_CALLS_FFLUSH
+ Put brackets round negative CYGNUM_LIBC_TIME_DST_DEFAULT_STATE define
+ Fix run time typo
+
+ * include/time.inl (__localtime_r):
+ Include sys/timeutil.h before this to get
+ cyg_libc_time_normalize_structtm()
+
+1999-03-12 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx: Remove 'const' from char arrays since
+ this fails [silently] on ARM when -fwritable-strings (PR19440)
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Compiler warnings fix was
+ slightly broken.
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c (main):
+ Disabling SIGTRAP handling on i386/Linux is not a good idea.
+1999-03-11 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c:
+ Added compiler warnings fix.
+ Added N/A handling for i386/Linux.
+
+1999-03-10 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Force "haldiag" device to be present.
+ 'asctime' and friends need 'stdio' as well.
+
+ * include/time.inl: Fix syntax error on difftime() declaration.
+
+1999-03-08 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx: <cyg/infra/cyg_ass.h> needed for this file.
+
+ * src/stdio/common/vsscanf.cxx (str_read): Fix problem with string
+ pointer [created by merge with new I/O package].
+
+1999-03-05 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add legal values for CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET
+ and CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET.
+
+1999-03-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl (cyg_libc_time_year_is_leap):
+ Fix bug with modulo year 400
+ Fix typo in asctime_r macro
+ Fix gmtime_r, and mktime as a result of testing
+
+ * tests/time/asctime.c, tests/time/ctime.c, tests/time/gmtime.c,
+ tests/time/gmtime.c, tests/time/localtime.c, tests/time/mktime.c,
+ tests/time/strftime.c, tests/time/time.c:
+ New tests
+
+ * tests/PKGconf.mak:
+ Build above new tests
+
+ * include/pkgconf/libc.h:
+ Add reminder FIX ME about extra config option
+
+ * src/time/strftime.cxx:
+ Fix %w and %Y parameters as a result of testing
+
+ * src/time/timeutil.cxx:
+ Fix cyg_libc_time_normalize_structtm() as a result of testing
+ of mktime()
+
+ * tests/time/clock.c:
+ Reformat, remove obsolete bits and tidy
+
+ * include/time.h:
+ Add Cyg_libc_time_dst type and new functions
+ cyg_libc_time_setzoneoffsets(), cyg_libc_time_setdst(),
+ cyg_libc_time_getzoneoffsets(), cyg_libc_time_settime()
+
+ * include/time.inl:
+ Implement the above functions. This allows us to adjust for timezone
+ diffences and set the time.
+ Change localtime() to adjust for STD/DST
+ Change mktime() to adjust for STD/DST
+
+ * include/libc.h:
+ Add new config options CYGSEM_LIBC_TIME_SETTIME_WORKING
+ and component CYGPKG_LIBC_TIME_ZONES containing options
+ CYGNUM_LIBC_TIME_DST_DEFAULT_STATE,
+ CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET,
+ CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET
+
+ * src/strftime.cxx:
+ Adjust handling of %Z to _not_ deal with STD/DST
+
+ * src/time/settime.cxx:
+ New file to implement cyg_libc_time_settime()
+
+ * src/PKGconf.mak:
+ Build settime.cxx
+
+ * src/time/timeutil.cxx:
+ Supply outline versions of cyg_libc_time_setzoneoffsets(),
+ cyg_libc_time_setdst(), and cyg_libc_time_getzoneoffsets()
+ Add variables for STD/DST state
+ Some minor comment changes
+
+ * include/errno.h:
+ Use CYGBLD_ATTRIB_CONST instead of __attribute__((const)) directly
+
+ * include/signal.h:
+ Change format of function comment headers
+
+ * include/signal.inl:
+ Restrict errno.h inclusion to when its actually used
+ Fix a spelling typo
+
+ * include/stdlib.h:
+ Add CYGBLD_ATTRIB_CONST to abs, div, labs, ldiv
+
+ * include/stdlib.inl:
+ Reformat and tidy
+ Include new versions of div and ldiv which are more portable and
+ are cleanly rewritten so aren't covered by the BSD licence, which
+ is now removed
+
+ * src/stdlib/div.cxx, src/stdlib/ldiv.cxx:
+ Non-inline, non-BSD and portable versions of the new versions of div
+ and ldiv from stdlib.inl
+
+ * include/time.h:
+ Much reformatting, tidying and improving comments
+ Change CLOCKS_PER_SEC from 1000 to 1000000
+ Add new functions asctime_r, ctime_r, gmtime_r, localtime_r, clock,
+ difftime, mktime, time, asctime, ctime, gmtime, localtime, strftime
+ Include new time.inl file
+
+ * include/pkgconf/libc.h:
+ Add new options CYGSEM_LIBC_TIME_CLOCK_WORKING,
+ CYGSEM_LIBC_TIME_TIME_WORKING, CYGFUN_LIBC_TIME_POSIX,
+ CYGNUM_LIBC_TIME_CLOCK_TRACE_LEVEL, CYGIMP_LIBC_TIME_ASCTIME_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_INLINE, CYGIMP_LIBC_TIME_DIFFTIME_INLINE,
+ CYGIMP_LIBC_TIME_GMTIME_INLINE, CYGIMP_LIBC_TIME_LOCALTIME_INLINE,
+ CYGIMP_LIBC_TIME_MKTIME_INLINE, CYGIMP_LIBC_TIME_ASCTIME_R_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_R_INLINE, CYGIMP_LIBC_TIME_GMTIME_R_INLINE,
+ and CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE
+
+ * time/asctime.cxx, time/asctime_r.cxx, time/clock.cxx, time/ctime.cxx,
+ time/ctime_r.cxx, time/difftime.cxx, time/gmtime.cxx,
+ time/gmtime_r.cxx, time/localtime.cxx, time/localtime_r.cxx,
+ time/mktime.cxx, time/strftime.cxx, time/time.cxx, time/timeutil.cxx,
+ include/time.inl:
+ New files to implement the new time functions. Many of them simply
+ provide the outline definitions, but the real body of the function
+ comes from time.inl
+
+ * src/PKGconf.mak:
+ Build new .cxx files
+
+ * src/clibincl/stdlibsupp.hxx:
+ Remove _div and _ldiv prototypes since they're no longer needed
+
+ * src/clibincl/timesupp.hxx:
+ Delete as its now obsolete
+
+ * src/time/clock.cxx:
+ Use new CYGSEM_LIBC_TIME_CLOCK_WORKING option to control whether it
+ just returns (clock_t)-1 or not.
+ Much reformatting and tidying
+ Change real imlpementation from _clock to __clock
+ Use CYGBLD_ATTRIB_WEAK_ALIAS now
+
+ * tests/stdlib/div.c, tests/stdlib/ldiv.c:
+ Add some extra tests for handling of negative numbers
+ Reformat and tidy a bit, including removing the test for CYGPKG_LIBC
+ since its now always defined if the test is to be compiled
+
+ * tests/time/clock.c:
+ Remove duplication CYG_TEST_INFO line
+ Check if unimplemented using "(clock_t)-1" and not just "-1"
+
+1999-03-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx:
+ Make sure system() is a weak alias for __system()
+
+ * include/pkgconf/libc.h: Rework CDL description for
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE and change its default to
+ "/dev/haldiag"
+
+ * src/stdio/common/stream.cxx:
+ Check that dev is valid when passed to stream constructor
+
+ * src/stdio/common/stdiosupp.cxx:
+ Tidy
+
+ * src/support/mainthread.cxx: Make this depend on
+ CYGSEM_LIBC_STARTUP_MAIN_THREAD rather than just CYGPKG_KERNEL
+
+1999-03-04 Gary Thomas <gthomas@cygnus.co.uk>
+
+ Merged in changes from 'ecos-new_devs-19990216-branch'
+
+ (1999-02-24 Jonathan Larmour <jlarmour@cygnus.co.uk>)
+
+ * src/stdio/common/stream.cxx:
+ Add "fix me" comments and remove a couple of commented out lines
+
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Revert to using pointer to string for private data, not just string.
+ This preserves the state across multiple calls
+
+ (1999-02-24 Gary Thomas <gthomas@cygnus.co.uk>)
+
+ * src/stdio/common/vsscanf.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/stream.cxx:
+ * src/stdio/common/stdiosupp.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/clibincl/stream.inl:
+ * src/clibincl/stream.hxx:
+ * src/clibincl/stdiosupp.hxx:
+ * include/pkgconf/libc.h: Changes for new I/O system.
+
+1999-03-03 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atexit.c: Forgot to config atexit test for
+ CYGFUN_LIBC_ATEXIT option
+
+ * include/pkgconf/libc.h:
+ Require CYGVAR_KERNEL_THREADS_DATA for CYGSEM_LIBC_PER_THREAD_STRTOK
+ This fixes PR 19362
+ Require CYGPKG_KERNEL for thread safe streams
+ Also don't need "requires CYGPKG_KERNEL" for per-thread rand and errno
+ if we already require a finer granularity kernel option
+
+1999-02-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Fix CYGNUM_LIBC_MAIN_STACK_SIZE by changing
+ CYGPKG_LIBC_STARTUP_MAIN_THREAD -> CYGSEM_LIBC_STARTUP_MAIN_THREAD
+ Fix for PR 19304
+
+1999-02-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx: Add to implement trivial system() call
+ * include/stdlib.h: Add system() prototype
+ * src/PKGconf.mak: Build system.cxx
+
+ * tests/ctype/ctype.c, tests/i18n/setlocale.c, tests/setjmp/setjmp.c,
+ tests/signal/signal1.c, tests/signal/signal2.c,
+ tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdio/stdiooutput.c, tests/stdlib/atexit.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/getenv.c, tests/stdlib/labs.c,
+ tests/stdlib/ldiv.c, tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/realloc.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+ Use CYG_TEST_NA() macro for non-applicable test configurations
+
+1999-02-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/signal.h:
+ * include/signal.inl:
+ * src/signal/raise.cxx:
+ * src/signal/siginit.cxx:
+ * src/signal/signal.cxx:
+ * tests/signal/signal1.c
+ * tests/signal/signal2.c:
+ New files to implement ISO standard signals
+
+ * src/PKGconf.mak (TESTS):
+ * tests/PKGconf.mak (TESTS):
+ Update to build new files above
+
+ * include/stdlib.h:
+ * src/clibincl/stdlibsupp.hxx:
+ Comment and QA changes (including giving better names to some types)
+
+ * include/libc.h:
+ Add new configuration options for signals
+ Add new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+ Add a note to CYGNUM_LIBC_MAIN_STACK_SIZE option that it may be
+ overriden by HAL
+ Add new CYGFUN_LIBC_ATEXIT option and move ...ATEXIT_HANDLERS under
+ it
+ Add new CYGSEM_LIBC_EXIT_CALLS_FFLUSH option
+ Require CYGSEM_LIBC_STARTUP_MAIN_THREAD for "Invoke default static
+ constructors" option
+
+ * src/stdlib/atexit.cxx:
+ Support above CYGFUN_LIBC_ATEXIT and QA changes
+
+ * src/stdlib/exit.cxx:
+ Support for above new libc.h options, and some QA changes
+
+ * src/support/cstartup.cxx:
+ Add support for new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+
+ * src/support/mainthread.cxx:
+ Override main stack size if the HAL has a minimum
+
+ * src/string/strncpy.cxx:
+ Use improved algorithm for aligned copies - imported from newlib
+ QA changes
+
+ * src/stdlib/abort.cxx:
+ Support raise(SIGABRT), and some QA
+
+ * include/errno.h:
+ Add const attribute
+
+ * tests/stdlib/abs.c:
+ QA improvements
+
+1999-02-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Only define cyg_libc_main_thread when
+ the kernel is around.
+
+1999-02-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/clock.c: Joined the two test/NOP checks into
+ one.
+ Increased tolerance in attempt to fix PRs 18737,18787,18846.
+ Fixed typo.
+
+1999-01-28 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ * src/stdlib/rand.cxx:
+ Include <pkgconf/kernel.h> if we use kernel header files
+
+1999-01-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c (test):
+ CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT should be
+ CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT
+ Fix for PR 18786
+
+ * src/string/strtok.cxx:
+ * src/stdio/common/stdiofiles.cxx:
+ * src/errno/errno.cxx:
+ * src/stdlib/rand.cxx:
+ Give mutex protection objects a libc constructor priority
+
+ * src/support/invokemain.cxx:
+ Add prototype for cyg_hal_invoke_constructors()
+
+ * src/support/mainthread.cxx:
+ Give cyg_libc_dummy_constructor_obj a libc constructor priority,
+ and make its class have a public constructor
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/stdin.cxx:
+ Give cyg_libc_stdio_stdin/out/err static objects a libc constructor
+ priority
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ Remove private copy constructor. Needed to make prioritised
+ static constructors work. Fix for PR 18898
+
+1999-01-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx:
+ Include pkgconf/kernel.h otherwise it fails with per-thread errno
+ enabled
+
+ * include/pkgconf/libc.h:
+ Enable per-thread errno by default since that is what POSIX would
+ want
+
+ * tests/time/clock.c (test):
+ Placate compiler by initializing clock_first/second/third anyway,
+ even though they won't be in practice. This is only a test program
+ so adding an extra instruction doesn't matter.
+
+ * src/i18n/locale.cxx (_setlocale):
+ Placate compiler, since it is dumb, by nesting, not serializing, if's
+ This is an idempotent change, but screws up the formatting :-(.
+
+ * src/string/strpbrk.cxx (_strpbrk):
+ Change while loop to do loop to placate compiler. It'll even save an
+ instruction too (wow!)
+
+1999-01-22 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add closing curly brace to CYGPKG_LIBC_STRING_STRTOK definition
+
+1999-01-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h:
+ Tidy up and add to header description
+ Change cyg_get_errno_p() to cyg_libc_get_errno_p()
+ Remove ifdef CYGPKG_LIBC
+
+ * include/sys/file_if.h:
+ Remove - move contents to stdio.h
+
+ * include/stdio.h:
+ Tidy up header description
+ Move FILE typedef here from sys/file_if.h
+ SEEK_SET, SEEK_CUR, SEEK_END defined to 0, 1, 2 respectively
+ for backwards compatibility with old UNIX
+ Change definitions of stdin/out/err to be addresses of FILE
+ globals - even though they're actually Cyg_StdioStream it'll work
+
+ * include/pkgconf/libc.h:
+ Make CYGPRI_LIBC_WEAK et al macros depend on new ones in infra
+ Reorganise trace options under the individual components they are
+ associated with.
+ Reorganise thread-safety options under the individual components
+ they are associated with.
+ Add new CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS option
+ Misc. reformatting
+ Remove dependency on pkgconf/kernel.h - Configuration Tool will
+ generate check macros anyway.
+ Remove CYGPKG_LIBC_TRACE, CYGFUN_LIBC_strtok, CYGPKG_LIBC_RAND
+ options
+ Tidy up description header
+
+ * src/clibincl/clibdata.hxx:
+ * src/clibincl/clibdata.inl:
+ * src/support/clibdata.cxx:
+ Remove and instead rely on each component to initialise its own data
+
+ * src/clibincl/stdiofiles.hxx, src/clibincl/stdiofiles.inl:
+ New files to contain global file list and lock (if applicable).
+ Implemented as class with member access functions
+
+ * src/errno/errno.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Rename cyg_get_errno_p() to cyg_libc_get_errno_p()
+
+ * src/stdio/common/fclose.cxx:
+ * src/stdio/common/fflush.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/stdio/common/freopen.cxx:
+ Remove ifdef CYGPKG_LIBC
+ Use new global file access method from stdiofiles.hxx
+ Tidy up description header
+ Use new CYGBLD_ATTRIB_WEAK_ALIAS
+ Access errno "normally" rather than clibdata way
+
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx
+ * src/stdio/common/stderr.cxx:
+ New files. Implement Cyg_StdioStream objects for each stream. In
+ separate self-contained files so using one doesn't bring in the
+ others
+
+ * src/stdio/common/stdiofiles.cxx:
+ New file. Implements global files array and lock
+
+ * src/stdlib/_exit.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Use infra CYGBLD* macros
+
+ * src/stdlib/malloc.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Add pkgconf/kernel.h now that pkgconf/libc.h doesn't have it
+ Use infra CYGBLD* macros
+ Make pool visible externally with weak attribute and new name
+ cyg_libc_malloc_memorypool
+
+ * src/stdlib/rand.cxx:
+ * src/stdlib/strtok.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Use infra CYGBLD* macros
+
+ * src/support/cstartup.cxx:
+ Split into smaller files to make selective linking work better,
+ fix i386 port problem and make GDB happy
+
+ * src/support/environ.cxx:
+ * src/support/invokemain.cxx:
+ * src/support/main.cxx:
+ * src/support/mainthread.cxx:
+ New files from bits of the old cstartup.cxx
+ Add support for CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+
+ * src/PKGconf.mak:
+ Update to reflect file additions/deletion
+
+ * tests/stdlib/rand1.c:
+ * tests/stdlib/rand2.c:
+ * tests/stdlib/rand3.c:
+ * tests/stdlib/srand.c:
+ Make conform to coding standards
+ Remove ifdef CYGPKG_LIBC_RAND
+ Tidy up description header
+
+ * tests/string/strtok.c:
+ Make conform to coding standards
+ Remove ifdef CYGFUN_LIBC_strtok
+ Tidy up description header
+
+1999-01-15 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/stdlib/getenv.c (main): added tests for the case in which
+ the user does not supply environ and in which the user supplies a
+ NULL environ.
+
+1999-01-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Added workaround for weak aliasing
+ problem in i386 gcc.
+
+
+1999-01-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ (CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE): Change defaults to be
+ more reasonable on small systems.
+
+1999-01-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Minor bug with environ not being initialised correctly by
+ default
+
+1998-12-24 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (Cyg_StdioStream):
+ check_this() member functions should now be const
+
+1998-12-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx (_memchr):
+ treat search value parameter to memchr as an unsigned byte,
+ not a signed int - copied fix from newlib PR 18471
+
+1998-12-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/realloc.c:
+ * tests/stdlib/malloc3.c:
+ * tests/stdlib/malloc2.c:
+ Warning cleanup
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c, tests/stdlib/malloc3.c,
+ tests/stdlib/realloc.c:
+ Only run these tests when we have a coalescing memory allocator
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Only check buffer init success if buffering
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ Check for diff of requested size against buffer_size, not
+ get_buffer_size(), since this may return -1, which won't be
+ equal to size, and will cause malloc to be called
+
+1998-12-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stdlib/getenv.c (main): Don't declare variables when they
+ are not used.
+
+Thu Nov 26 17:59:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/string/strncpy1.c:
+ Fix off-by-one error since it called my_strcmp() and not
+ my_strncmp(), which meant in included the trailing NULL when it
+ shouldn't have.
+
+1998-11-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/qsort.cxx (_qsort):
+ * src/stdlib/rand.cxx (_srand):
+ Changed CYG_REPORT_FUNCNAMETYPE to CYG_REPORT_FUNCNAME in void
+ functions.
+
+Mon Oct 26 18:49:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/cstartup.cxx (cyg_libc_dummy_main):
+ Silence compiler warning with cast of char * to CYG_ADDRWORD
+
+Wed Oct 28 17:31:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clock.cxx (_clock):
+ Reorder scaling expression as it was both incorrect and risked
+ overflow.
+ Fix for PR 18076
+
+Mon Oct 19 14:40:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h (EOF):
+ Change from -64 to (-1), to allow broken code to work :-/
+ Also change other negative defines to be within parentheses
+
+1998-10-19 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated the doc URL
+
+Thu Oct 15 21:33:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Only include kernel thread headers when we're in thread-safe mode
+
+ * src/time/clock.cxx:
+ Only include kernel clock headers if there's a kernel with the
+ right functionality available
+
+ * tests/time/clock.c:
+ Remove unnecessary inclusion of <pkgconf/kernel.h>
+
+ Above changes are required for PR 17229
+
+Wed Oct 14 16:38:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise inclusion of clibincl/stdiosupp.hxx and
+ clibincl/stream.hxx. Tidying up PR 17502
+
+Wed Oct 14 14:08:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGPKG_LIBC_STRING_OPTIMISATIONS to
+ CYGPKG_LIBC_STRING_OPTIMIZATIONS to make it truely merkin.
+
+Tue Oct 13 19:34:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_ARGUMENTS):
+ Add a default argv[0] of "" as many programs assume argc>0
+ The standard allows argv[0] to be "" if the program name
+ is not available
+
+1998-09-26 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ PR 17502: this header file now does nothing if the stdio option
+ is disabled completely. This is the same behaviour is
+ clibincl/stream.hxx, although arguably the #ifdef protection
+ should happen wherever the header file is #include'd rather than
+ in the header file itself.
+
+ * src/clibincl/clibdata.hxx:
+ PR 17502: this header file still #include's internal stdio-related
+ header files and references the FILE structure, even if stdio is
+ disabled. There were some #ifdef's for CYGPKG_LIBC_STDIO already.
+ One more has been added for _fopen() and _fclose().
+
+1998-09-25 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl (Cyg_StdioStreamBuffer):
+ PR 17487: Reorder the calls to initialize member fields, to
+ eliminate a compiler warning.
+
+Fri Sep 25 19:04:29 1998 Jonathan Larmour <jlarmour@peshwari.cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/string/strtok.cxx,
+ src/time/clock.cxx:
+ Only define tracing variable and tracing level macro when
+ the relevant tracing level config options are set. Otherwise
+ keep the tracing level fixed at 0
+ Fix for PR 17476
+
+ * include/pkgconf/libc.h:
+ Define trace levels only if parent CYGPKG_LIBC_TRACE is defined
+ for consistency with Configuration Tool
+
+
+Fri Sep 25 17:24:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Make definition of vscanf() dependent on CYGFUN_LIBC_STDIO_ungetc
+ otherwise _vfscanf() won't be compiled. This therefore would
+ cause a link fail iff selective linking is not enabled.
+ Fix for PR 17455
+
+Fri Sep 25 17:23:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/rand.cxx:
+ Make compilation dependent on CYGPKG_LIBC_RAND
+ Fix for PR 17473
+
+ * tests/stdlib/srand.c:
+ Make definition of dummy test pass conditional on CYGPKG_LIBC_RAND
+ not being defined, as well as CYGPKG_LIBC
+ Caused compilation failure when testing PR 17473 fix
+
+Mon Sep 21 17:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Make sscanf test conditional on CYGFUN_LIBC_STDIO_ungetc since
+ _vfscanf() only gets compiled if this is defined
+ Fix for PR 17346
+
+1998-09-20 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated CDL doc strings.
+
+Fri Sep 18 22:18:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_errno_p):
+ Rather than this function only being available in thread-safe mode,
+ instead make what it returns be either the per-thread errno, or
+ global errno depending on the configuration.
+ Include <errno.h> (conditionally) to support this change
+
+Wed Sep 16 11:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove "fix me" comment which I forgot to remove before
+
+Tue Sep 15 19:27:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Updated descriptions and a few other minor things after review.
+ Notably though, the NDEBUG config option has been removed
+
+1998-09-15 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ PR 17201: removed dependency on CYGPKG_KERNEL in the option
+ CYGNUM_LIBC_MAIN_STACK_SIZE, since the actual dependencies cannot
+ be expressed sensibly in the current system.
+
+1998-09-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Sorting out dependencies for error package.
+
+1998-09-10 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: started adding doc fields to the
+ cdl_package data, as a pilot for now.
+
+Wed Sep 9 17:41:23 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add option CYGIMP_LIBC_MALLOC_CXX_DELETE_CALLS_FREE to explicitly
+ control whether the empty delete functions (currently) in
+ kernel/.../common/delete.cxx are enabled; controls code bloat, see
+ the comments in delete.cxx.
+
+Fri Sep 4 16:43:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add a default CYG_TEST_PASS() to make sure the test infra doesn't
+ complain.
+ Also remove the unused string functionsa
+
+Fri Sep 4 15:43:48 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdlib/exit.cxx (__libc_exit):
+ * src/stdlib/_exit.cxx (__libc__exit):
+ * src/stdlib/malloc.cxx (_free):
+ * src/stdlib/abort.cxx (abort):
+ * src/support/cstartup.cxx (invoke_main):
+ Tracing system asserted cos it was being called incorrectly; these
+ are void functions so you shouldn't give a type to the function
+ reporting call.
+
+Fri Sep 4 15:03:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Fix CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE description to refer to
+ the table.cxx file, not table.h
+
+Fri Sep 4 14:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add description for CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE since
+ Proven won't be making any changes to the device driver
+ implementation after all.
+ Fix for PR 17148
+
+ * src/clibincl/stream.inl (set_position):
+ Remove "fix me" line. It is obvious that this will have to change
+ with a filesystem interface
+ Fix for PR 17147
+
+ * src/stdio/common/freopen.cxx:
+ Remove "fix me" - I know about this issue
+ Fix for PR 17145
+
+ * src/stdio/common/stream.cxx (read):
+ Remove "fix me" and change to use memcpy
+ Fix for PR 17144
+
+Fri Sep 4 14:36:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Actually add it this time!
+
+Fri Sep 4 13:48:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add new tests for misc stdio output functions
+
+ * tests/PKGconf.mak:
+ Build stdiooutput.c test
+
+Fri Sep 4 12:52:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (write_byte):
+ Remove bogus assert
+
+ * tests/stdlib/getenv.c (main):
+ Check whether str is NULL before doing a strcmp()
+
+ * tests/stdio/sprintf2.c (main):
+ Reformat to 76 columns
+
+Fri Sep 4 02:10:54 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/stdio/common/stream.cxx:
+ Add new peek_byte method to Cyg_StdioStream
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix up buffer access to work with new peek_byte method above
+ Fix for PR 16954
+
+Thu Sep 3 19:40:11 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/rand1.c, tests/stdlib/rand2.c,
+ tests/stdlib/rand3.c:
+ Add extra check for CYGPKG_LIBC_RAND to decide whether the test
+ is applicable or not
+
+ * tests/stdlib/rand2.c (test):
+ Use CYGNUM_LIBC_RAND_SEED for default seed, not 1
+
+ * tests/string/strtok.c:
+ Add extra check for CYGFUN_LIBC_strtok to decide whether the
+ test is applicable or not
+
+Wed Sep 2 19:11:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fread.cxx, src/stdio/output/fwrite.cxx:
+ Add fread() and fwrite() functions
+
+ * src/PKGconf.mak:
+ Build fread.cxx and fwrite.cxx from above
+
+ * src/stdio/common/stream.cxx:
+ Reformat to 76 columns
+ In write(), move initialisation of *bytes_written to start
+ In read(), move initialisation of *bytes_read to start
+
+ * include/stdio.h:
+ Reformat to 76 columns
+
+ Replace all references to the ANSI
+ standard to instead by the ISO C standard
+
+ Add commented argument names for "documentation"
+
+ Add fread() and fwrite() prototypes
+
+ * src/clibincl/stdiosupp.hxx:
+ Copy the above changes from stdio.h, and add _fread() and _fwrite()
+ prototypes
+
+ * src/stdio/output/fputs.cxx, src/stdio/input/fgets.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 15:41:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 14:46:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Use trylock_me() instead of lock_me(), and loop to prevent
+ deadlocks
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl:
+ Add trylock_me() method
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/fflush.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 12:24:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change 0x7fff to 0x7fffffff. Oops!
+ give main stack size option a legal_values field
+ Undefine tracing by default
+ Add some more description in the header
+
+Tue Sep 1 20:02:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/i18n/setlocale.c (cyg_package_start):
+ Fix typo - extra "x" for no reason at all! :-)
+
+Tue Sep 1 19:44:58 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx:
+ Fix bug in find_locale_data() that miscalculated size of
+ all_locales
+
+ Make find_locale_data() match the locale "" and add some
+ other things in _setlocale() to ensure that "C" gets returned
+ when the default locale "" is passed.
+
+ Only check the locale pointer when it is non-NULL
+
+ * tests/i18n/setlocale.c:
+ New tests for setlocale()
+
+ * tests/PKGconf.mak:
+ Update to build setlocale.c test
+
+ * src/support/cstartup.cxx:
+ Don't actually call system default main() "main" otherwise GDB
+ gets confused and thinks its the entry point. Instead make a weak
+ alias and call the real function something different.
+
+Tue Sep 1 18:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx (_setlocale):
+ Fix tracing macro name and remove "str maybe used before
+ initialised" warning
+
+ * tests/stdlib/qsort.c:
+ Correct file description header
+
+Tue Sep 1 17:04:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/locale.h, src/clibincl/i18nsupp.hxx, src/i18n/locale.cxx:
+ New files to add support for locales as defined by the ISO C
+ standard. i.e. setlocale() and localeconv() functions and some
+ other bits
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAX_LOCALE_NAME_SIZE config option for locale
+ support
+
+ * src/PKGconf.mak:
+ build locale.cxx
+
+ * include/errno.h, src/clibincl/ctypesupp.hxx:
+ Tidy up to 76 columns
+
+Tue Sep 1 00:24:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Move environment-related options from stdlib into new
+ CYGPKG_LIBC_STARTUP component. Also add options for main()'s
+ arguments (CYGPKG_LIBC_ARGUMENTS), main()'s default stack size
+ (CYGNUM_LIBC_MAIN_STACK_SIZE), number of atexit handlers
+ (CYGNUM_LIBC_ATEXIT_HANDLERS), and whether _exit() stops the
+ system (CYGSEM_LIBC_EXIT_STOPS_SYSTEM).
+
+ * src/clibincl/stdlibsupp.hxx:
+ Fix a few comment bugs, and add new
+ cyg_libc_invoke_atexit_handlers() function prototype
+
+ * src/stdlib/_exit.cxx, src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Implement exit(), atexit() and _exit() correctly now. Also
+ includes cyg_libc_invoke_atexit_handlers() in atexit.cxx. Now
+ we get the correct behaviour of atexit(), and exit() invokes the
+ atexit handlers and fflushs all the stdio streams. Add plenty of
+ tracing of asserts too.
+
+ * src/support/cstartup.cxx:
+ Make main_thread object an exported global. Allow user-settable
+ arguments. Add MUCH more tracing and asserts. Improve comments.
+ Tidy up to 76 columns
+
+ * tests/stdlib/atexit.c:
+ Add simple test for atexit() and it calling registered functions
+
+ * tests/PKGconf.mak:
+ Build atexit.c test
+
+Mon Aug 31 18:54:48 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/getenv.cxx, tests/stdlib/getenv.c:
+ Add support for getenv(), and some tests to ensure it works
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update to include getenv.cxx and getenv.c test
+
+ * src/clibincl/clibdata.hxx:
+ remove prototype for environ - we expect files needing it to
+ define it themselves
+
+ * src/support/clibdata.cxx:
+ Tidy up to 76 columns and add definition of char **environ, but
+ with a configurable initialiser (see libc.h below)
+
+ * tests/stdlib/abs.c (main):
+ Tidy up to 76 columns
+
+ * src/stdlib/malloc.cxx:
+ Tidy up to 76 columns and remove warning for undefined _memcpy()
+ by changing to memcpy(), and casting away signedness
+
+ * include/pkgconf/libc.h:
+ Add CYGPKG_LIBC_ENVIRONMENT and CYGDAT_LIBC_DEFAULT_ENVIRONMENT
+ configuration options
+
+ * include/pkgconf/libc.h, src/clibincl/clibdata.hxx:
+ Tidy up to 76 columns
+
+ * include/stdlib.h:
+ Add getenv() prototype and tidy up to 76 columns
+
+ * src/clibincl/stdlibsupp.hxx:
+ Add _getenv() prototype
+
+Mon Aug 31 13:37:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Add realloc()
+
+ * tests/stdlib/realloc.c:
+ Add this file to test new realloc() functionality
+
+ * tests/PKGconf.mak:
+ Build realloc test
+
+ * tests/stdlib/malloc3.c (main), tests/stdlib/malloc2.c (main),
+ tests/stdlib/malloc1.c (main):
+ Conditionalise local vars to prevent warnings
+
+ * tests/stdlib/malloc3.c (fill_with_data):
+ Move '{' into "verb" line
+
+ * include/pkgconf/libc.h:
+ Require infra tracing support to allow tracing
+
+ * include/stdlib.h:
+ Add realloc()
+
+ * src/clibincl/stdlibsupp.hxx:
+ Update the commented argument names from stdlib.h, including realloc()
+
+1998-08-28 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ * src/clibincl/clibdata.hxx, src/time/clock.cxx:
+
+ Updated for new kernel configuration option symbol names
+
+Fri Aug 28 19:18:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ Changed the entry below to sat "tx39" instead of "mn10300".
+ It's been a long week.
+
+Fri Aug 28 18:59:20 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Add a weakly named main to allow the
+ default configuration to link on the tx39 which has no
+ scalextric linking yet. The static Cyg_Thread main_thread object
+ below continues to exist, though unreferenced, so all its
+ descendants must exist too.
+
+Fri Aug 28 08:54:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h:
+ Add commented argument names Add exit(), and atexit(). And move
+ these along with abort() and _exit() to a new section.
+
+ * src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Add trivial versions of atexit() and exit()
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAIN_STACK_SIZE config option
+
+ * include/sys/cstartup.h, src/support/cstartup.cxx, src/PKGconf.mak:
+ New files to provide a new function cyg_iso_c_support(), which
+ invokes main "correctly".
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/srand.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcoll2.c, tests/string/strcpy1.c,
+ tests/string/strcpy2.c, tests/string/strcspn.c,
+ tests/string/strlen.c, tests/string/strncat1.c,
+ tests/string/strncat2.c, tests/string/strncpy1.c,
+ tests/string/strncpy2.c, tests/string/strpbrk.c,
+ tests/string/strrchr.c, tests/string/strspn.c,
+ tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c,
+ tests/time/clock.c:
+
+ Modify all tests to use new startup mechanism, and cyg_iso_c_start()
+
+Fri Aug 28 00:29:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Add #ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO around all accesses to
+ flags.last_buffer_op_was_read. Fix for PR 16997
+
+Thu Aug 27 01:12:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/sys/file_if.h:
+ Fix comments and remove cyg_get_file_star()
+
+Wed Aug 26 20:24:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove #define CYGPKG_LIBC is that is meant to live in
+ <pkgconf/system.h> after all
+
+Wed Aug 26 19:39:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ More fixes to CDL stuff to make it work better, and look better on
+ the screen
+
+Tue Aug 25 20:21:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Make some fixes after running the ConfigTool
+
+Tue Aug 25 16:46:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_STDIO_BUFSIZE):
+ Fix typo of CYGNUM_LIBC_STDIO_BUFSIZE
+
+Tue Aug 25 15:10:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Tidy up CDL stuff a bit more, prior to checking it actually works.
+
+Tue Aug 25 11:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c (main):
+ Prevent calls to CYG_TEST_STILL_ALIVE for now
+
+Tue Aug 25 05:39:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change cosmetic paragraph alignment.
+
+Tue Aug 25 03:11:34 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Make stderr initialise with buffer size 0.
+ For PR 16955
+
+Mon Aug 24 17:38:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ First pass at CDL-ifying the C library configuration. Currently
+ deliberately disabled as there a few outstanding issues.
+
+Mon Aug 24 16:14:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx (_vfnprintf):
+ clear up warning for unused argument
+
+ * tests/stdlib/malloc2.c (NUM_ITERATIONS):
+ Lower to 100 from 50000 so it won't take too long under the simulator
+
+Thu Aug 20 17:48:43 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Remove now unnecessary inclusion of kernel/ktypes.h
+
+Wed Aug 19 19:19:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c,
+ tests/stdio/sscanf.c, tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c,
+ tests/stdlib/strtoul.c, tests/string/strtok.c,
+ tests/time/clock.c:
+ Add parameters to "main()" to silence warnings
+
+Wed Aug 19 18:52:59 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Put conditional error check into same #ifdef and if as what was being
+ checked in the first place!
+
+Wed Aug 19 18:49:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl:
+ Reorder Cyg_StdioStream::check_this() to be first to silence
+ warnings
+
+Tue Aug 18 16:10:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * ecc/language/c/libc/current/src/clibincl/clibdata.hxx,
+ ecc/language/c/libc/current/src/errno/errno.cxx,
+ ecc/language/c/libc/current/src/stdio/common/fopen.cxx,
+ ecc/language/c/libc/current/src/stdlib/rand.cxx,
+ ecc/language/c/libc/current/src/string/strtok.cxx:
+ Rename CYGIMP_LIBC_INTERNAL_DATA_PREAMBLE,
+ CYGIMP_LIBC_INTERNAL_DATA_ALLOC_CHECK_PREAMBLE,
+ CYGVAR_LIBC_INTERNAL_DATA, and
+ CYGIMP_LIBC_INTERNAL_DATA_CHECK to all have CYGPRI_ prefix instead
+ as recommended by the config name rules
+
+
+Tue Aug 18 14:31:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/setvbuf.cxx (_setvbuf):
+ Rename variable names in assert line, otherwise doesn't build
+ with asserts on!
+
+Sun Aug 16 18:15:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix some bugs, although there are some left to fix still. Unrelated
+ to the rest of the checkins, so I will check the partial fix in now.
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx:
+ Add parameters to constructor to allow more things to be done at
+ construction time.
+
+ Now we have "new", remove separate "construct" method
+
+ Add more documentation on constructor
+
+ As requested by code review, where possible, move boolean flags
+ into separate packed bitfield structure for space efficiency
+
+ Make readbuf_char be usable all the time rather than when configured
+ not to be buffering, as it is also needed for non-buffered mode i.e.
+ _IONBF
+
+ * src/stdio/common/fopen.cxx:
+ Change to use new method of construction from above, using new
+
+ Use thread-specific data, rather than global. And so change errnos
+ to access errno entry specifically
+
+ Make process_mode() check for append mode too
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/stdio/common/setvbuf.cxx:
+
+ Change to cope with different way of dealing with buffering policy
+ flags etc. in Cyg_StdioStream
+
+ * src/stdio/common/vsnprintf.cxx, src/stdio/common/vsscanf.cxx,
+ src/support/clibdata.cxx:
+ Change construction of streams to use new parameters added above,
+ and change to use _IONBF mode for string stdio functions,
+ otherwise its a waste of memory. And use _IONBF for stderr as the
+ ISO standard tells us to!
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Change constructor so that it can be set with default size and
+ dynamic buffer (if applicable)
+
+ Fix minor bug in destructor - should only call free when allocated
+ dynamically
+
+ Change get_buffer_size to return -1 if the buffer was not allowed
+ to be set up
+
+ * src/stdio/common/streambuf.cxx:
+ Remove unnecessary stdio.h include and add extra comment to whether
+ to free bit in set_buffer()
+
+ * src/stdio/common/freopen.cxx:
+ Change @@@ to standard fix me string
+
+ * src/stdio/output/fputc.cxx:
+ Remove unnecessary "written" variable
+
+Thu Aug 13 15:37:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx:
+ Included use of "fix me" line to ensure this is discussed before
+ release
+
+ * include/stdlib.h, src/stdlib/abort.cxx, src/PKGconf.mak:
+ Add abort.cxx to implement abort(), albeit naively
+
+Thu Jul 30 18:03:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/vsscanf.cxx (_vsscanf),
+ src/stdio/common/vsnprintf.cxx (_vsnprintf):
+ Fix initialiser of pseudo string device table that didn't get updated
+ when the table changed (Bad proven, no biscuit).
+
+ * src/clibincl/stream.inl (~Cyg_StdioStream):
+ Move invalidation of magic_validity_word to after unlock_me(),
+ otherwise it always fails!
+
+Tue Jul 28 21:29:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Shorten over-long lines
+
+Tue Jul 28 20:28:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx (class Cyg_StdioStream),
+ src/clibincl/stream.inl, src/stdio/common/stream.cxx:
+ Clarify some comments and get the CYGDBG_DEFINE_CHECK_THIS and
+ CYG_ASSERTCLASS stuff going
+
+ * src/clibincl/stream.inl:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 15:31:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl, src/stdio/common/streambuf.cxx:
+ Move set_buffer() from streambuf.inl to new file streambuf.cxx
+
+ * src/PKGconf.mak (COMPILE):
+ Build new file streambuf.cxx
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ Add METHODS comment
+
+ * src/stdio/common/stream.cxx:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 00:26:36 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.inl, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/div.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/qsort.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/string/strtok.cxx:
+
+ Include proper Berkeley license inline in the file, rather than
+ referring to an external file
+
+ * doc/COPYING.UCB:
+ Remove, now that it isn't referred to any more
+
+Mon Jul 27 23:34:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl, include/errno.h,
+ include/stdio.h, include/stdio.inl, include/stdlib.h,
+ include/stdlib.inl, include/string.h, include/string.inl,
+ include/time.h, include/sys/file_if.h, src/PKGconf.mak,
+ src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/stdiosupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/streambuf.hxx,
+ src/clibincl/streambuf.inl, src/clibincl/stringsupp.hxx,
+ src/clibincl/timesupp.hxx, src/ctype/isalnum.cxx,
+ src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx,
+ src/ctype/islower.cxx, src/ctype/isprint.cxx,
+ src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx,
+ src/ctype/tolower.cxx, src/ctype/toupper.cxx,
+ src/errno/errno.cxx, src/stdio/common/snprintf.cxx,
+ src/stdio/common/sprintf.cxx, src/stdio/common/sscanf.cxx,
+ src/stdio/common/stdioinlines.cxx, src/stdio/common/stream.cxx,
+ src/stdio/common/ungetc.cxx, src/stdio/common/vsnprintf.cxx,
+ src/stdio/common/vsscanf.cxx, src/stdio/input/fgetc.cxx,
+ src/stdio/input/fgets.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/gets.cxx, src/stdio/input/scanf.cxx,
+ src/stdio/output/fnprintf.cxx, src/stdio/output/fprintf.cxx,
+ src/stdio/output/fputc.cxx, src/stdio/output/fputs.cxx,
+ src/stdio/output/printf.cxx, src/stdlib/_exit.cxx,
+ src/stdlib/abs.cxx, src/stdlib/atof.cxx, src/stdlib/atoi.cxx,
+ src/stdlib/atol.cxx, src/stdlib/div.cxx, src/stdlib/labs.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/rand.cxx, src/stdlib/strtod.cxx,
+ src/string/memchr.cxx, src/string/memcmp.cxx,
+ src/string/memmove.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx,
+ src/string/strcoll.cxx, src/string/strcpy.cxx,
+ src/string/strcspn.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx, src/string/strpbrk.cxx,
+ src/string/strrchr.cxx, src/string/strspn.cxx,
+ src/string/strstr.cxx, src/string/strsuppt.cxx,
+ src/string/strtok.cxx, src/string/strxfrm.cxx,
+ src/support/clibdata.cxx, src/time/clock.cxx:
+ Untabify
+
+Mon Jul 27 23:14:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/stdlib/malloc.cxx, src/stdlib/qsort.cxx,
+ tests/ctype/ctype.c, tests/stdlib/rand3.c, tests/stdlib/malloc3.c:
+ Remove all mentions of "register" in variable declarations. Also
+ untabify where needed
+
+ * src/stdlib/bsearch.cxx:
+ Untabify this too
+
+
+Mon Jul 27 22:18:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/fputc.cxx (_fputc):
+ Replace call to stream write() with call to write_byte()
+
+ * src/clibincl/stream.inl (write_byte):
+ Add asserts for stream write() returning odd values for how much has
+ been written
+
+ (bytes_available_to_read):
+ Remove "register" def for variable declaration
+
+Mon Jul 27 22:06:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdiosupp.cxx:
+ Remove #if 0'd cyg_get_file_star() and unnecessary pseudo string
+ device definition
+
+Mon Jul 27 21:57:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h, src/support/clibdata.cxx:
+ Change CYGXXX_LIBC_STDIO_DEFAULT_CONSOLE to
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE
+
+Mon Jul 27 21:49:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/setjmpsupp.hxx,
+ src/clibincl/stdiosupp.hxx, src/clibincl/stdlibsupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl,
+ src/clibincl/stringsupp.hxx, src/clibincl/timesupp.hxx:
+
+ Change CYGONCE_LIBC_*_{HXX,INL} to CYGONCE_LIBC_CLIBINCL_*_{HXX,INL}
+
+Mon Jul 27 21:34:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change #define XXXXX 1 to #define XXXXX where applicable as per code
+ review
+
+ Also remove obsolete CYGIMP_LIBC_THREAD_START_SUSPENDS_SELF
+
+Mon Jul 27 19:42:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen):
+ Use #ifdef, not #if for config options
+
+Mon Jul 27 15:01:51 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/stream.cxx, src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx:
+ Fixes to compile with the new Cyg_IORB field names.
+
+Thu Jul 9 03:40:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Adjust starting of tests to possibly start scheduler since
+ strtol/stroul rely on errno, which may be a per-thread variable
+
+Thu Jul 9 03:06:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx, src/stdio/common/setvbuf.cxx:
+ Consolidate read and write buffers into single buffer, as it should
+ have been all along
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Add drain_buffer() method to speed up the case when we want the
+ buffer completely emptied
+
+Tue Jul 7 21:26:33 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Add a couple of new tests that check that very long strings work too
+
+Wed Jul 1 19:52:39 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/streambuf.hxx:
+ Do not permit copy constructors
+
+ * src/clibincl/stream.inl, src/stdio/common/fclose.cxx:
+ Make sure we use #ifdef and not #if
+
+ * src/clibincl/streambuf.inl:
+ Use member initialisation list rather than explicit initialisation to
+ reduce warnings
+
+Wed Jul 1 19:17:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h and all files using config options:
+ Rename configuration defines to make them more standard
+
+Thu Jun 25 20:09:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strcat.cxx:
+ Add parentheses on check to silence warning
+ (Verified by proven)
+
+Thu Jun 25 19:30:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Make sure that the malloc pool is initialised before other things
+ can use it. This is done with the hot new constructor ordering
+ feature.
+
+Thu Jun 25 18:27:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Remove bogus ifdef if floating point is _not_ wanted
+
+Thu Jun 25 17:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Fix argument checking to allow first argument of NULL
+
+Thu Jun 25 04:18:50 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_strtok_last_p):
+ Remove bogus assertion
+
+ * src/stdlib/malloc.cxx:
+ Got sense of alignment check assertion the wrong way round, so negate
+ it
+
+Thu Jun 25 03:56:35 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx:
+ Fix argument checking assertions with legitimate nulls here too
+
+Thu Jun 25 03:46:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/strtoul.cxx, src/stdlib/strtol.cxx:
+ Fix argument checking assertions to cope with legitimate nulls
+
+Wed Jun 24 09:01:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Remove extraneous info messages
+
+Wed Jun 24 05:59:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c:
+
+ Change large automatic arrays to static arrays to prevent overuse
+ of a potentially small stack
+
+Wed Jun 24 05:45:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/string/strtok.c, tests/time/clock.c:
+
+ Increase thread stack size from 4K to 32K as in some cases it was
+ too small.
+
+
+Tue Jun 23 20:12:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Add extra tests, including floating point conversion testing
+
+Tue Jun 23 17:01:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Make sure this is only compiled if CYGFUN_LIBC_strtok is defined
+
+Tue Jun 23 06:10:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ add some comments - that's all
+
+ * src/stdio/common/stream.cxx:
+ fix case in refill_read_buffer() for what to do when there's nothing
+ left. Now return EAGAIN
+
+ * src/stdio/common/vsscanf.cxx, src/stdio/input/vfscanf.cxx:
+ Get sscanf working properly and passing tests. Also make sure it
+ ignores FP when its not configured
+
+ * src/stdlib/atof.cxx:
+ Only compile at all if strtod() is present
+
+
+Mon Jun 22 19:13:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise strtok_last and rand_seed better
+
+Mon Jun 22 14:14:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc3.c:
+ Add test for checking that mallocing and freeing repeatedly works
+
+ * tests/PKGconf.mak:
+ Update to reflect addition of the above
+
+Mon Jun 22 13:09:33 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/fopen.cxx
+ * src/stdio/common/stream.cxx
+ * src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx
+ Include cyg/devs/common/iorb.h instead of iorb.hxx
+
+ * src/stdio/common/stream.cxx
+ Use read_blocking and write_blocking instead of just read and
+ write when accessing devices through the virtual device table.
+
+Sun Jun 21 18:19:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Propagate change of return code handling for puts from stdio.inl
+ into here
+
+ * src/stdio/output/fputc.cxx:
+ make sure the right type is used for output - byte not int
+
+ * src/support/clibdata.cxx:
+ Fix #define config mistook. #endif was in wrong place
+
+Sun Jun 21 16:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Allow explicit construction to get around a bug when
+ dynamically allocating per-thread structure
+
+Sun Jun 21 16:02:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c, tests/stdlib/qsort.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+
+ Update tests to "do the right thing" with all configuration settings
+
+
+Sun Jun 21 04:54:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ I have to be careful not to use setjmp() in a way not exactly
+ defined by the standard, so make sure I do, and add a comment
+ documenting these ways.
+
+ Also ensure this test does the right thing in all configurations
+
+Sun Jun 21 04:38:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add extra checks for invalid configurations
+ Also make default for thread safety OFF
+
+ * src/clibincl/clibdata.inl:
+ Adjust indentation
+
+ * src/stdio/output/vfnprintf.cxx:
+ Make printf of -0.0 floating point do the right thing
+
+Sun Jun 21 04:28:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/snprintf.cxx, src/stdio/common/sprintf.cxx,
+ src/stdio/common/sscanf.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/scanf.cxx, src/stdio/output/fnprintf.cxx,
+ src/stdio/output/fprintf.cxx, src/stdio/output/printf.cxx:
+
+ Had to remove inline functions with varargs. Which means separating
+ out each function from stdioinlines.cxx into a separate file, as they
+ no longer belong there. So all the above files were created.
+
+ * include/stdio.inl, src/PKGconf.mak,
+ src/stdio/common/stdioinlines.cxx:
+ Changed to take account of the above
+
+
+Sun Jun 21 03:58:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c:
+ Update with floating-point tests. Also make sure they DTRT in all
+ configurations
+
+Fri Jun 19 19:33:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ accidentally initialised stdin/out/err twice
+
+Fri Jun 19 19:09:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Another typo
+
+Fri Jun 19 18:59:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Missing #endif typo
+
+Fri Jun 19 18:51:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Fix initialisation of static data members. Unsure how it worked at
+ all before!
+
+Fri Jun 19 18:01:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.inl:
+ puts should check whether fputs returns non-negative, rather than
+ non-zero
+
+Fri Jun 19 17:22:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl:
+ Make inclusion of get_errno_p conditional on thread-safety
+
+Wed Jun 17 10:55:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Add weak alias of vfscanf() to _vfscanf()
+
+Wed Jun 17 09:10:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Initialise err to silence compiler warning
+
+Wed Jun 17 08:59:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Most important is the addition of floating point support in
+ src/stdio/output/vfnprintf.cxx and src/stdio/input/vfscanf.cxx. This
+ also required the addition of atof() and strtod() in stdlib which is
+ definitely no bad thing! Other than that...
+
+ * Fix a whole bunch of stuff I messed up first time round. Also the
+ sprintf and sscanf tests are included again.
+
+Tue Jun 16 16:38:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Typo with not putting comment character at the beginning. Sigh.
+
+Tue Jun 16 14:53:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Forgot to (temporarily) remove fputs test for now
+
+Mon Jun 15 20:40:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ Everything to do with stdio has almost completely changed, so there's
+ not much point documenting individual changes.
+
+Mon Jun 15 18:36:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c:
+ Stop it moaning quite as much when it fails by making it exit sooner
+
+ * tests/time/clock.c :
+ This isn't a compound testcase
+
+Thu Jun 11 17:59:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h
+ Reverse sense of NDEBUG ifdef, that was left in accidentally due
+ to testing
+
+Thu Jun 11 04:58:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h, include/string.h, src/clibincl/stringsupp.hxx:
+ Modify as I've now added an "error" package which defines the error
+ codes and strerror()
+
+ * src/errno/strerror.cxx:
+ Moved to new error package and thus deleted
+
+Wed Jun 10 18:37:37 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h:
+ create this header and add assert() function
+
+Wed Jun 10 16:23:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h, src/clibincl/stdlibsupp.hxx, src/stdlib/malloc.cxx:
+ Add malloc(), calloc() and free() functions
+
+ * include/pkgconf/libc.h:
+ Add malloc memory pool size option
+
+ * tests/stdlib/malloc1.c, tests/stdlib/malloc2.c:
+ new tests for malloc
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for new files
+
+Wed Jun 10 15:06:16 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ Add another test
+
+Tue Jun 9 18:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add some setjmp config's and a macro for the noreturn attribute
+
+ * include/setjmp.h, include/setjmp.inl, src/clibincl/setjmpsupp.hxx,
+ src/setjmp/longjmp.cxx, tests/setjmp/setjmp.c:
+ Added to implement and test setjmp() and longjmp()
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for newly added files
+
+Thu Jun 4 01:29:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx, src/string/strcpy.cxx,
+ src/string/strlen.cxx, src/string/strncat.cxx,
+ src/string/strncmp.cxx, src/string/strncpy.cxx:
+ Rename CYGIMP_LIBC_PREFER_SMALL_TO_FAST to
+ CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST
+
+ Also use slower but smaller version when __OPTIMIZE_SIZE__ is
+ defined (which comes from using gcc -Os)
+
+Fri May 29 16:15:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl, src/ctype/isxdigit.cxx:
+ Fix bug that numerals aren't considered hex digits
+
+ * include/time.h:
+ Change clock_t and time_t to be signed so that they can accept -1, as
+ required by other libc functions
+
+ * src/clibincl/clibdata.hxx:
+ Fix typo that CYGIMP_LIBC_THREAD_SUPPORT should be ..._SAFETY
+ Also fix macro to allocate thread-specific data to not set variables
+ in a different stack-frame
+
+ * tests/ctype/ctype.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/stdlib/qsort.c:
+ make ctr unsigned to prevent warnings
+
+ * tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/string/strrchr.c:
+ Fix off by one error
+
+ * tests/string/strspn.c:
+ Fix case-sensitivity problem, and off-by-one error
+
+ * tests/string/strxfrm1.c:
+ Remove bogus bit of test that doesn't apply to strxfrm, and fix typo
+
+
+Fri May 22 16:33:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak
+ Remove CXXFLAGS line now that its redundant
+
+ * tests/everything!
+ Do a blitz change of all tests - break some of them down into
+ different files, add new tests, standardize format, fix bugs,
+ update for recent header file changes and much more!
+
+Wed May 20 17:50:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ interim checkin for different dir structure for Bart
+
+Fri May 15 20:30:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Tidy up some loose ends I forgot: rename src/include directory to
+ src/clibincl. And add clibdata.inl and timesupp.hxx in there.
+
+Thu May 14 19:56:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Basically everything has changed in the C library. Files have
+ been moved, renamed, deleted and reworked. This is a major
+ revision, and now starts from this new baseline rather than doing
+ incremental changes.
+
+Fri Apr 17 18:43:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ECCconf.mak:
+ added for new build system (actually Bart did this, but didn't
+ update this ChangeLog)
+
+Fri Apr 17 15:03:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdio/device/sim.cxx:
+ Make it build with CYG_EMPTY_STATEMENT; the unadorned one is being
+ removed.
+
+Thu Apr 16 00:24:24 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * All source files:
+ replace ECCIMP_LIBC_* conditional ifdef with CYGIMP_LIBC_*
+
+ * include/eccconf/libc.h:
+ improve comments and reorder a bit
+
+Wed Apr 8 14:35:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/Makefile.am, tests/Makefile.am, configure.in:
+ many changes to integrate build structure from release tree
+
+ * src/ctype/Makefile.am, src/ctype/Makefile.in, src/errno/Makefile.am,
+ src/errno/Makefile.in, src/stdio/Makefile.am, src/stdio/Makefile.in,
+ src/stdio/common/Makefile.am, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.am, src/stdio/device/Makefile.in,
+ src/stdio/output/Makefile.am, src/stdio/output/Makefile.in,
+ src/stdio/input/Makefile.am, src/stdio/input/Makefile.in,
+ src/stdlib/Makefile.am, src/stdlib/Makefile.in,
+ src/string/Makefile.am, src/string/Makefile.in,
+ src/support/Makefile.am, src/support/Makefile.in,
+ src/time/Makefile.am, src/time/Makefile.in:
+ Remove as they are now redundant with above changes
+
+ * include/Makefile.am:
+ Add to support above changes
+
+ * include/eccconf/libc.h:
+ Change include file for configuration from kernel to system
+
+ * src/include/kerndiag.hxx, src/stdio/device/kerndiag.cxx,
+ src/time/clockfn.cxx:
+ Change kernel include file to eccconf/kernel.h
+
+ * src/include/strngdev.h:
+ remove unnecessary kernel include
+
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in,
+ tests/Makefile.in, include/Makefile.in:
+ regenerate
+
+Mon Apr 6 20:55:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/abs.cxx, src/stdlib/atoi.cxx, src/stdlib/atol.cxx,
+ src/stdlib/div.cxx, src/stdlib/labs.cxx, src/stdlib/ldiv.cxx:
+ Separated out functions from stdlib.cxx into separate files
+
+ * src/stdlib/stdlib.cxx:
+ removed to be replaced by above files
+
+ * Makefile.am, src/stdlib/Makefile.am:
+ modified to support building above and not building stdlib.cxx
+
+ * src/support/tsd.cxx:
+ Remove unnecessary header file includes
+
+ * Makefile.in, src/stdlib/Makefile.in:
+ regenerated
+
+Mon Apr 6 19:19:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx, include/eccconf/libc.h:
+ remove lame hack for tx39 compiler now that its fixed
+
+ * src/include/sim.hxx:
+ define constants as static to placate compiler
+
+Thu Apr 2 21:01:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ctype/ctype.cxx:
+ deleted and separated out into below files
+
+ * src/ctype/isalnum.cxx, src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx, src/ctype/islower.cxx,
+ src/ctype/isprint.cxx, src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx, src/ctype/tolower.cxx,
+ src/ctype/toupper.cxx:
+ Separated out individual ctype functions from ctype.cxx into separate
+ files
+
+ * Makefile.am, src/ctype/Makefile.am:
+ modified to reflect above deletion/additions
+
+ * Makefile.in, src/ctype/Makefile.in:
+ regenerated
+
+Thu Apr 2 19:08:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: optimise using prefix increments
+
+Thu Apr 2 15:18:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strchr.cxx: optimise setting of mask a little
+
+Thu Mar 26 14:07:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx: fixed some typos
+
+Thu Mar 26 11:58:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/eccconf/libc.h, src/support/tsd.cxx:
+ Implement workaround for tx39 compiler bug.
+
+ * src/include/strsuppt.hxx:
+ remove prototypes for _memcpy() and _memset() as they are now in the
+ kernel
+
+Wed Mar 25 18:31:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/string/Makefile.am: memcpy() and memset() are
+ now in the kernel so remove them from build
+ * include/string.h: add a comment to say as much
+ * Makefile.in, src/string/Makefile.in: regenerate
+
+Wed Mar 25 15:30:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx, src/include/file_if.inl:
+ Change _exit workaround to not cause a compiler optimisation
+ problem. Now just references _exit rather than calls it.
+
+Wed Mar 25 14:59:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fix bug causing tests to fail completely
+ for this function
+
+Wed Mar 25 12:55:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/sim.hxx: add types to constants (oops!)
+ * Makefile.am: link src/stdio/device/sim.cxx
+ * Makefile.in: regenerated
+
+Wed Mar 25 04:14:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/file_if.hxx, src/include/file_if.inl,
+ src/include/kerndiag.hxx, src/include/sim.hxx,
+ src/include/stdio_if.hxx, src/include/strngdev.hxx,
+ src/include/tsd.hxx, src/stdio/common/clearerr.cxx,
+ src/stdio/common/clearerr.cxx, src/stdio/common/feof.cxx,
+ src/stdio/common/ferror.cxx, src/stdio/common/file_if.cxx,
+ src/stdio/common/vsprintf.cxx,
+ src/stdio/device/kerndiag.cxx, src/stdio/device/sim.cxx,
+ src/stdio/device/strngdev.cxx, src/stdio/output/fputc.cxx,
+ src/stdio/output/fputs.cxx, src/stdio/output/puts.cxx,
+ src/stdio/output/vfnprintf.cxx, src/support/tsd.cxx:
+ Modified to support buffered reads including renaming
+ _EccInternalFileStruct to __EccStdioStream which is what affects
+ most of these files
+ * src/include/file_if.inl, src/stdio/common/file_if.cxx: added for
+ the above reason
+ * src/stdio/common/sscanf.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/input/Makefile.am: added to provide sscanf() functionality
+ * include/ctype.h, include/stdio.h, include/stdlib.h,
+ include/string.h, include/eccconf/libc.h, src/ctype/ctype.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/stdio/common/stdio.cxx:
+ rename *_INLINES macros with prefix CYG rather than ECC
+ * include/errno.h, src/errno/errno.cxx, src/errno/strerror.cxx:
+ rename ErrNo to _ErrNo and add EAGAIN and EWOULDBLOCK error codes
+ * configure.in, Makefile.am, src/stdio/Makefile.am,
+ src/stdio/input/Makefile.am: add support for building
+ file_if.cxx sscanf.cxx and vfscanf.cxx
+ * src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/input/Makefile.in, configure, Makefile.in: regenerated
+
+Tue Mar 24 19:51:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clockfn.cxx, src/time/clock.cxx:
+ Renamed clock.cxx to clockfn.cxx (preserving CVS history)
+ * Makefile.am, src/time/Makefile.am: updated to reflect name change
+ * Makefile.in, src/time/Makefile.in: regenerated
+
+Tue Mar 24 16:28:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl: Swap around definitions to get right order so
+ inlining works
+
+Tue Mar 24 14:43:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/stdio.h, include/stdlib.h, include/string.h:
+ modify to only conditionally include inlines
+ * src/ctype/ctype.cxx, src/stdio/common/stdio.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/ctype/Makefile.am: Add to provide real linkable alternatives
+ to inline functions
+ * Makefile.am, configure.in, src/Makefile.am,
+ src/stdio/common/Makefile.am, src/stdlib/Makefile.am,
+ src/string/Makefile.am: modified to support previous additions
+ * include/eccconf/libc.h: redefine inline macro to add extern inline,
+ and add conditional defines for inline functions. Also rename
+ space vs. speed macro to have CYG instead of ECC prefix
+ * include/stdio.inl: fix comment typo
+ * src/stdlib/qsort.cxx: fix to define inline functions properly
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/memcpy.cxx,
+ src/string/memset.cxx, src/string/strcat.cxx, src/string/strchr.cxx,
+ src/string/strcmp.cxx, src/string/strcpy.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx
+ * Makefile.in, configure, src/Makefile.in, src/ctype/Makefile.in,
+ src/stdio/common/Makefile.in, src/stdlib/Makefile.in,
+ src/string/Makefile.in: regenerate
+
+
+Mon Mar 23 19:19:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx: added to support temporary _exit
+ * include/stdlib.h, include/stdlib.inl: added support for _exit and
+ added abs(), labs(), div() and ldiv() functions
+ * src/include/file_if.hxx: added support for _exit kludge
+ * src/stdlib/qsort.cxx: Added Berkeley copyright message
+ * src/time/clock.cxx: Include correct kernel config header as
+ CYG_CONFIGURATION rather than <config.h>
+ * Makefile.am src/stdlib/Makefile.am: added support for _exit
+ * Makefile.in, src/stdlib/Makefile.in: regenerated
+
+Mon Mar 23 14:41:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Replace ECCPKG_ANSI_LIBC with CYGPKG_ANSI_LIBC in all source files
+
+Mon Mar 23 14:28:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/string.inl: add file to provide strcoll()
+ * include/string.h: include string.inl
+ * ctype.h: include ctype.inl (oops!)
+ * include/stdlib.h: include stdlib.inl (oops!)
+
+Mon Mar 23 13:30:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl: added to provide ANSI ctype
+ functionality
+ * include/stdlib.h, include/stdlib.inl, src/include/stdlibbsp.hxx,
+ src/stdlib/Makefile.am, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/stdlib/srand.cxx,
+ src/stdlib/strtol.cxx, src/stdlib/strtoul.cxx: Added to provide
+ many stdlib functions
+ * src/include/tsd.hxx: modified to support rand() random number
+ seed, and added some comments
+ * configure.in, Makefile.am, src/Makefile.am: modified to support
+ addition of above new sources
+ * include/eccconf/libc.h: Add extra helpful comments, and #include
+ kernel config file
+ * src/time/clock.cxx: #include clock.inl and fix to call
+ get_resolution() properly now
+ * Makefile.in, configure, src/Makefile.in, src/errno/Makefile.in,
+ src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.in, src/stdio/output/Makefile.in,
+ src/stdlib/Makefile.in, src/strings/Makefile.in,
+ src/support/Makefile.in, src/time/Makefile.in,
+ tests/Makefile.in: regenerated
+
+
+Sun Mar 22 21:29:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h, src/include/timesupp.hxx, src/time/clock.cxx,
+ src/time/Makefile.am: added to provide clock() function
+ * src/Makefile.am: modified to try to build in src/time directory
+ * include/eccconf/libc.h: added and is now the main configuration
+ file for this package
+ * acconfig.h, include/libcconf.h.in, include/stamp-h.in: removed
+ due to usage of libc.h above instead
+ * Almost all *.h, *.hxx and *.cxx: replaced LIBC_CONFIG_HEADER
+ defined include with simple <pkgconf/libc.h>
+ * configure.in: remove AM_CONFIG_HEADER of libcconf.h and
+ LIBC_CONFIG_HEADER definition. Also remove usage of builtin
+ memcpy() etc. from gcc, and generate src/time/Makefile
+ * Makefile.am: link in src/time/clock.o
+ * src/include/file_if.hxx, src/include/sim.hxx: use config header
+ to decide whether C library is to be used
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in: regenerated
+
+Fri Mar 20 18:08:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fixed bug with ignoring terminating NULL
+
+1998-03-20 Chris Tarpy <ctarpy@bhaji.cygnus.co.uk>
+
+ * configure: - regenerated
+ * Makefile.am: - Support added for libc testcases
+ * Makefile.in: regenerated
+ * configure.in: set c compiler, descend test dir
+ * tests/Makefile.in: added
+ * tests/Makefile.am: added
+ * tests/tcdiag.cxx : added
+
+
+Thu Mar 19 11:41:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Initial check-in of everything
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/cdl/stdio.cdl b/cesar/ecos/packages/language/c/libc/stdio/current/cdl/stdio.cdl
new file mode 100644
index 0000000000..28021eee94
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/cdl/stdio.cdl
@@ -0,0 +1,449 @@
+# ====================================================================
+#
+# stdio.cdl
+#
+# C library stdio related configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jlarmour
+# Contributors:
+# Date: 2000-04-14
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_LIBC_STDIO {
+ display "ISO C library standard input/output functions"
+ description "
+ This package provides standard input/output functions associated
+ with the header file <stdio.h> as specified by the
+ ISO C standard - ISO/IEC 9899:1990."
+ doc ref/libc.html
+ include_dir cyg/libc/stdio
+ parent CYGPKG_LIBC
+ requires CYGPKG_IO
+ requires CYGPKG_LIBC_I18N
+ implements CYGINT_ISO_STDIO_FILETYPES
+ implements CYGINT_ISO_STDIO_FILEACCESS
+ implements CYGINT_ISO_STDIO_FILEPOS
+ implements CYGINT_ISO_STDIO_FILEOPS
+ implements CYGINT_ISO_STDIO_FORMATTED_IO
+ implements CYGINT_ISO_STDIO_CHAR_IO
+ implements CYGINT_ISO_STDIO_DIRECT_IO
+ implements CYGINT_ISO_STDIO_ERROR
+ implements CYGINT_ISO_STDIO_STREAMS
+ requires { (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE == "\"/dev/ttydiag\"" ? \
+ CYGPKG_IO_SERIAL_HALDIAG : 1) }
+ requires { CYGBLD_ISO_STDIO_FILETYPES_HEADER == \
+ "<cyg/libc/stdio/stdio.h>" }
+ requires { CYGBLD_ISO_STDIO_FILEACCESS_HEADER == \
+ "<cyg/libc/stdio/stdio.h>" }
+ requires { CYGBLD_ISO_STDIO_FILEPOS_HEADER == \
+ "<cyg/libc/stdio/stdio.h>" }
+ requires { CYGBLD_ISO_STDIO_FILEOPS_HEADER == \
+ "<cyg/libc/stdio/stdio.h>" }
+ requires { CYGBLD_ISO_STDIO_FORMATTED_IO_HEADER == \
+ "<cyg/libc/stdio/stdio.h>" }
+ requires { CYGBLD_ISO_STDIO_CHAR_IO_HEADER == \
+ "<cyg/libc/stdio/stdio.h>" }
+ requires { CYGBLD_ISO_STDIO_DIRECT_IO_HEADER == \
+ "<cyg/libc/stdio/stdio.h>" }
+ requires { CYGBLD_ISO_STDIO_ERROR_HEADER == \
+ "<cyg/libc/stdio/stdio.h>" }
+ requires { CYGBLD_ISO_STDIO_STREAMS_HEADER == \
+ "<cyg/libc/stdio/stdio.h>" }
+ requires CYGPKG_ISOINFRA
+ requires CYGINT_ISO_ERRNO_CODES
+ requires CYGINT_ISO_ERRNO
+ requires CYGINT_ISO_STRERROR
+ requires CYGINT_ISO_STRING_STRFUNCS
+ requires CYGINT_ISO_STRING_MEMFUNCS
+ # The following is for scanf only. We could express this better,
+ # particularly since scanf is also dependent on the optional ungetc.
+ requires CYGINT_ISO_STDLIB_STRCONV
+
+ compile common/fflush.cxx common/feof.cxx \
+ common/freopen.cxx common/setvbuf.cxx \
+ common/snprintf.cxx common/sprintf.cxx \
+ common/sscanf.cxx common/stderr.cxx \
+ common/stdin.cxx common/stdiofiles.cxx \
+ common/fseek.cxx common/stdioinlines.cxx\
+ common/stdiosupp.cxx common/stdout.cxx \
+ common/stream.cxx common/streambuf.cxx \
+ common/ungetc.cxx common/vsnprintf.cxx \
+ common/vsscanf.cxx common/fileops.cxx \
+ \
+ input/fgetc.cxx input/fgets.cxx \
+ input/fread.cxx input/fscanf.cxx \
+ input/gets.cxx input/scanf.cxx \
+ input/vfscanf.cxx \
+ \
+ output/fnprintf.cxx output/fprintf.cxx \
+ output/fputc.cxx output/fputs.cxx \
+ output/fwrite.cxx output/printf.cxx \
+ output/vfnprintf.cxx
+
+# ====================================================================
+
+ cdl_option CYGIMP_LIBC_STDIO_INLINES {
+ display "Inline versions of <stdio.h> functions"
+ default_value 1
+ description "
+ This option chooses whether some of the
+ particularly simple functions from
+ <stdio.h> are available as inline
+ functions. This may improve performance, and as
+ the functions are small, may even improve code
+ size."
+ }
+
+ cdl_option FOPEN_MAX {
+ display "Permitted number of open files"
+ flavor data
+ legal_values 3 to 0x7fffffff
+ default_value 8
+ description "
+ This option controls the guaranteed minimum
+ number of simultaneously open files. The ISO
+ C standard requires it to be defined (para
+ 7.9.1), and if strictly compliant, it must be
+ at least 8 (para 7.9.3). In practice it can be
+ as low as 3 - for stdin, stdout and stderr."
+ }
+
+ cdl_option FILENAME_MAX {
+ display "Maximum length of filename"
+ flavor data
+ legal_values 1 to 0x7fffffff
+ default_value 16
+ description "
+ This option defines the maximum allowed size of
+ a filename in characters. The ISO C standard
+ requires it to be defined (para 7.9.1)."
+ }
+
+ cdl_option L_tmpnam {
+ display "Maximum length of filenames for temporary files"
+ flavor data
+ legal_values 4 to 0x7fffffff
+ default_value 16
+ description "
+ This option defines the maximum allowed size of
+ filenames for temporary files as generated by
+ tmpnam(). It is measured in characters, and the
+ ISO C standard requires it to be defined (para
+ 7.9.1)."
+ }
+
+ cdl_option TMP_MAX {
+ display "Unique file names generated by tmpnam()"
+ flavor data
+ legal_values 1 to 0x7fffffff
+ default_value 25
+ description "
+ This option defines the minimum number of
+ unique file names generated by tmpnam(). The
+ ISO C standard requires it to be defined (para
+ 7.9.1) and for ISO compliance it should be at least
+ 25. Note that TMP_MAX names may not be generated
+ if L_tmpnam is too small."
+ }
+
+ cdl_component CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO {
+ display "Buffered I/O"
+ flavor bool
+ default_value 1
+ description "
+ This option controls whether input/output
+ through the <stdio.h> functions is buffered.
+ This may save some memory per file. It
+ is equivalent to putting every file into
+ non-buffered mode (_IONBF) through setvbuf(),
+ except now it can never be altered back to
+ buffered mode. Disabling buffering is strictly
+ non-compliant with the ISO C standard."
+
+ cdl_option CYGNUM_LIBC_STDIO_BUFSIZE {
+ display "Default buffer size"
+ flavor data
+ legal_values 1 to 0x7fffffff
+ default_value 256
+ description "
+ This option defines the default size of buffer
+ used with calls to setbuf(), and is the default
+ size for buffered streams that have not had
+ either setbuf() or setvbuf() invoked on them.
+ It is exactly equivalent to the standard
+ constant BUFSIZ, except that it is 0 if
+ CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO is disabled.
+ The ISO C standard requires this to be defined
+ (para 7.9.1), and says it must be at least 256
+ (para 7.9.2)."
+ }
+
+ cdl_option CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF {
+ display "setbuf()/setvbuf() allows dynamic setting"
+ default_value 1
+ description "
+ This option controls whether I/O buffers are
+ implemented dynamically within the stdio
+ implementation. Otherwise they will be static,
+ and cannot be changed by setbuf()/setvbuf(). If
+ they are static (i.e. this option is disabled),
+ any attempt to use an arbitrary buffer size, or
+ to pass a user-supplied buffer to setbuf() or
+ setvbuf() will fail - the buffer is implemented
+ internally as a static array taking the size
+ of the configuration option BUFSIZ. The only
+ exception is if a user buffer is not supplied,
+ and the buffer size requested is less than
+ BUFSIZ. In this case, the buffer will
+ be configured to only use that amount of
+ buffering. However the unused memory left over
+ will NOT be freed. If this option is enabled,
+ then setvbuf() can be used to assign a user supplied
+ buffer to the stream.
+ Either setting can be considered to
+ be compliant with the ISO C standard."
+ }
+
+ cdl_option CYGSEM_LIBC_STDIO_SETVBUF_MALLOC {
+ display "setbuf()/setvbuf() uses malloc()"
+ requires CYGINT_ISO_MALLOC
+ requires CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF
+ default_value { 0 != CYGINT_ISO_MALLOC }
+ description "
+ This option controls whether buffers set by setbuf() and
+ setvbuf() may be allocated using malloc()."
+ }
+
+ }
+ # Define BUFSIZ with same value as ..._BUFSIZE or 0
+ cdl_option BUFSIZ {
+ display "Default buffer size (BUFSIZ)"
+ flavor data
+ calculated CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO \
+ ? "CYGNUM_LIBC_STDIO_BUFSIZE" : 0
+ }
+
+ cdl_option CYGFUN_LIBC_STDIO_ungetc {
+ display "Support for ungetc()"
+ default_value 1
+ description "
+ This option controls whether ungetc() is
+ supported. If not, then some space can be
+ saved, and speed is improved. Note that you
+ MUST have this defined if you want to use the
+ scanf() family of functions."
+ }
+
+ cdl_component CYGPKG_LIBC_STDIO_OPEN {
+ display "Dynamic opening/closing of files"
+ requires CYGINT_ISO_MALLOC
+ default_value { 0 != CYGINT_ISO_MALLOC }
+ compile common/fopen.cxx common/fclose.cxx
+ description "
+ fopen() and fclose() use dynamic memory
+ allocation routines to allocate memory for
+ new FILE structure pointers. If a malloc
+ implementation is available, this option
+ may be enabled to use
+ fopen() and fclose(). If disabled, only the
+ default console streams - stdin, stdout and
+ stderr - will be available."
+
+ cdl_option CYGFUN_LIBC_STDIO_OPEN_POSIX_FDFUNCS {
+ display "POSIX fdopen/fileno functions"
+ active_if CYGPKG_LIBC_STDIO_FILEIO
+ implements CYGINT_ISO_STDIO_POSIX_FDFUNCS
+ calculated 1
+ description "This identifies to the rest of the system
+ whether the POSIX fdopen() and
+ fileno() functions are implemented."
+ }
+ }
+
+ cdl_option CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE {
+ display "Default console device"
+ flavor data
+ default_value { CYGDAT_IO_SERIAL_TTY_CONSOLE ? CYGDAT_IO_SERIAL_TTY_CONSOLE : "\"/dev/null\"" }
+ description "
+ This option allows you to choose the
+ default console device. In the current
+ implementation, all these devices begin
+ with the prefix /dev/ and are followed by
+ the name of a device. The name of the device
+ depends on the device drivers you have
+ configured in your system. For example,
+ /dev/ttydiag could be the HAL diagnostic output
+ pseudo-device, or /dev/tty0 could be your
+ first serial driver, depending on your
+ configuration."
+ }
+
+ cdl_component CYGPKG_LIBC_STDIO_FLOATING_POINT {
+ display "Floating point support"
+ flavor none
+ description "
+ This component allows floating point support
+ to be enabled in certain standard I/O
+ functions."
+
+ cdl_option CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT {
+ display "printf() family"
+ requires CYGPKG_LIBM
+ default_value { 0 != CYGPKG_LIBM }
+ description "
+ This option enables the use of floating point
+ number output in the printf() family (i.e.
+ printf(), sprintf(), vprintf(), etc.) of
+ functions. A substantial amount of code space
+ can be saved if this option is disabled. If it
+ is disabled then floating point specifiers
+ (%e, %f, %g) are ignored, and nothing is
+ output."
+ }
+
+ cdl_option CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT {
+ display "scanf() family"
+ requires CYGPKG_LIBM
+ requires CYGINT_ISO_STDLIB_STRCONV_FLOAT
+ default_value { 0 != CYGPKG_LIBM &&
+ 0 != CYGINT_ISO_STDLIB_STRCONV_FLOAT }
+ description "
+ This option enables the use of floating point
+ number conversion in the scanf() family (i.e.
+ scanf(), sscanf(), vscanf(), etc.) of
+ functions. A substantial amount of code space
+ can be saved if this option is disabled. If it
+ is disabled then floating point specifiers
+ (%e, %f, %g) are ignored, and nothing is
+ converted."
+ }
+ }
+
+ cdl_option CYGFUN_LIBC_STDIO_LONGLONG {
+ display "Long long support"
+ requires CYGFUN_LIBC_STDLIB_CONV_LONGLONG
+ default_value 1
+ description "
+ This option allows various functions in the C Standard I/O
+ library to support the 'long long' datatype. Doing so
+ will come with a noticeable code size penalty however."
+ }
+
+ cdl_option CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS {
+ display "Thread safe I/O streams"
+ doc ref/libc-thread-safety.html
+ active_if CYGPKG_KERNEL
+ default_value 1
+ description "
+ This option controls whether standard I/O streams
+ are thread-safe. Having this option set allows
+ the streams to be locked when accessed by
+ multiple threads simultaneously."
+ }
+
+
+# ====================================================================
+
+ cdl_option CYGPKG_LIBC_STDIO_FILEIO {
+ display "Enable use of FILEIO package for IO operations."
+ active_if CYGPKG_IO_FILEIO
+ requires CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ requires CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF
+ calculated 1
+ description "
+ This CDL exists to control how the standard I/O functions
+ interface to the underlying I/O system. Either using the
+ File I/O package, or the generic I/O package which is used
+ by fewer devices."
+ }
+}
+
+# ====================================================================
+
+ cdl_component CYGPKG_LIBC_STDIO_OPTIONS {
+ display "C library stdio functions build options"
+ flavor none
+ no_define
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_LIBC_STDIO_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the C library. These flags are used in addition
+ to the set of global flags."
+ }
+
+ cdl_option CYGPKG_LIBC_STDIO_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the C library. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_LIBC_STDIO_TESTS {
+ display "C library stdio function tests"
+ flavor data
+ no_define
+ calculated {
+ "tests/sprintf1 tests/sprintf2 tests/sscanf tests/stdiooutput "
+ . ((CYGPKG_IO_FILEIO && CYGPKG_FS_RAM) ? "tests/fileio " : "")
+ }
+ description "
+ This option specifies the set of tests for the C library
+ stdio functions."
+ }
+ }
+
+# ====================================================================
+# EOF stdio.cdl
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/include/io.hxx b/cesar/ecos/packages/language/c/libc/stdio/current/include/io.hxx
new file mode 100644
index 0000000000..4c059c1937
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/include/io.hxx
@@ -0,0 +1,90 @@
+#ifndef CYGONCE_LIBC_STDIO_IO_HXX
+#define CYGONCE_LIBC_STDIO_IO_HXX
+//========================================================================
+//
+// io.hxx
+//
+// Internal C library stdio io interface definitions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors:
+// Date: 2000-06-30
+// Purpose:
+// Description:
+// Usage: #include <cyg/libc/stdio/io.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+//========================================================================
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <cyg/infra/cyg_ass.h> // Get assertion macros, as appropriate
+#include <errno.h> // Cyg_ErrNo
+
+#ifdef CYGPKG_LIBC_STDIO_FILEIO
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <errno.h>
+#else
+#include <cyg/io/io.h> // Device I/O support
+#include <cyg/io/config_keys.h> // CYG_IO_GET_CONFIG_SERIAL_OUTPUT_DRAIN
+#endif
+
+//========================================================================
+// Stream handle type
+
+#ifdef CYGPKG_LIBC_STDIO_FILEIO
+typedef int cyg_stdio_handle_t;
+#define CYG_STDIO_HANDLE_NULL -1
+#else
+typedef cyg_io_handle_t cyg_stdio_handle_t;
+#define CYG_STDIO_HANDLE_NULL 0
+#endif
+
+//========================================================================
+#endif // CYGONCE_LIBC_STDIO_IO_HXX multiple inclusion protection
+// EOF io.hxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/include/io.inl b/cesar/ecos/packages/language/c/libc/stdio/current/include/io.inl
new file mode 100644
index 0000000000..6cd39dc424
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/include/io.inl
@@ -0,0 +1,258 @@
+#ifndef CYGONCE_LIBC_STDIO_IO_INL
+#define CYGONCE_LIBC_STDIO_IO_INL
+//========================================================================
+//
+// io.inl
+//
+// Internal C library stdio io interface inlines
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors:
+// Date: 2000-06-30
+// Purpose:
+// Description:
+// Usage: #include <cyg/libc/stdio/io.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+//========================================================================
+// INCLUDES
+
+#include <cyg/libc/stdio/io.hxx>
+
+//========================================================================
+// FileIO versions of IO functions
+
+#ifdef CYGPKG_LIBC_STDIO_FILEIO
+
+inline Cyg_ErrNo cyg_stdio_open( const char *filename,
+ const Cyg_StdioStream::OpenMode rw,
+ const cyg_bool binary,
+ const cyg_bool append,
+ cyg_stdio_handle_t *dev)
+{
+ mode_t mode = 0;
+ int fd;
+
+ switch( rw )
+ {
+ case Cyg_StdioStream::CYG_STREAM_WRITE:
+ mode = O_WRONLY|O_CREAT|O_TRUNC;
+ break;
+ case Cyg_StdioStream::CYG_STREAM_READ:
+ mode = O_RDONLY;
+ break;
+ case Cyg_StdioStream::CYG_STREAM_READWRITE_NOCREATE:
+ mode = O_RDWR;
+ break;
+ case Cyg_StdioStream::CYG_STREAM_READWRITE_CREATE:
+ mode = O_RDWR|O_CREAT|O_TRUNC;
+ break;
+ }
+
+ if( append )
+ {
+ mode |= O_APPEND;
+ mode &= ~O_TRUNC;
+ }
+
+ fd = open( filename, mode );
+
+ if( fd < 0 )
+ return errno;
+
+ *dev = fd;
+ return ENOERR;
+}
+
+inline Cyg_ErrNo cyg_stdio_close( cyg_stdio_handle_t dev )
+{
+ if( close( dev ) != ENOERR )
+ return errno;
+ return ENOERR;
+}
+
+inline Cyg_ErrNo cyg_stdio_read( cyg_stdio_handle_t dev,
+ void *buffer, cyg_uint32 *len )
+{
+ if( dev != CYG_STDIO_HANDLE_NULL )
+ {
+ ssize_t done = read( dev, buffer, *len );
+
+ if( done < 0 )
+ {
+ *len = 0;
+ return errno;
+ }
+
+ *len = done;
+ }
+ // If the device is NULL, just return EOF indication
+ else *len = 0;
+
+ return ENOERR;
+}
+
+inline Cyg_ErrNo cyg_stdio_write( cyg_stdio_handle_t dev,
+ const void *buffer, cyg_uint32 *len )
+{
+ if( dev != CYG_STDIO_HANDLE_NULL )
+ {
+ ssize_t done = write( dev, buffer, *len );
+
+ if( done < 0 )
+ {
+ *len = 0;
+ return errno;
+ }
+
+ *len = done;
+ }
+ // if the device is NULL, just absorb all writes.
+
+ return ENOERR;
+}
+
+inline Cyg_ErrNo cyg_stdio_lseek( cyg_stdio_handle_t dev,
+ off_t *pos, int whence )
+{
+ off_t newpos = lseek( dev, *pos, whence );
+
+ if( newpos < 0 )
+ return errno;
+
+ *pos = newpos;
+
+ return ENOERR;
+}
+
+inline Cyg_ErrNo cyg_stdio_flush( cyg_stdio_handle_t dev )
+{
+ int err = fsync( dev );
+
+ if( err < 0 )
+ return errno;
+
+ return ENOERR;
+}
+
+inline cyg_bool cyg_stdio_interactive( cyg_stdio_handle_t dev )
+{
+ struct stat buf;
+ int err;
+
+ err = fstat( dev, &buf );
+
+ // If we get an error, assume interactive.
+ if( err < 0 )
+ return true;
+
+ if( S_ISCHR(buf.st_mode) )
+ return true;
+
+ return false;
+}
+
+
+#endif // CYGPKG_LIBC_STDIO_FILEIO
+
+//========================================================================
+// Direct IO versions of IO functions
+
+#ifndef CYGPKG_LIBC_STDIO_FILEIO
+
+inline Cyg_ErrNo cyg_stdio_open( const char *filename,
+ const Cyg_StdioStream::OpenMode rw,
+ const cyg_bool binary,
+ const cyg_bool append,
+ cyg_stdio_handle_t *dev)
+{
+ return cyg_io_lookup( filename, dev );
+}
+
+inline Cyg_ErrNo cyg_stdio_close( cyg_stdio_handle_t dev )
+{
+ // Devices do not get closed
+ return ENOERR;
+}
+
+inline Cyg_ErrNo cyg_stdio_read( cyg_stdio_handle_t dev,
+ void *buffer, cyg_uint32 *len )
+{
+ return cyg_io_read( dev, buffer, len );
+}
+
+inline Cyg_ErrNo cyg_stdio_write( cyg_stdio_handle_t dev,
+ const void *buffer, cyg_uint32 *len )
+{
+ return cyg_io_write( dev, buffer, len );
+}
+
+inline cyg_uint32 cyg_stdio_lseek( cyg_stdio_handle_t dev,
+ cyg_uint32 *pos, int whence )
+{
+ // No seeking in raw devices, just return fake success
+ return ENOERR;
+}
+
+inline Cyg_ErrNo cyg_stdio_flush( cyg_stdio_handle_t dev )
+{
+ return cyg_io_get_config(dev,
+ CYG_IO_GET_CONFIG_SERIAL_OUTPUT_DRAIN,
+ NULL, NULL);
+}
+
+inline cyg_bool cyg_stdio_interactive( cyg_stdio_handle_t dev )
+{
+ return true;
+}
+
+
+#endif // !CYGPKG_LIBC_STDIO_FILEIO
+
+//========================================================================
+#endif // CYGONCE_LIBC_STDIO_IO_INL multiple inclusion protection
+// EOF io.inl
+
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/include/stdio.h b/cesar/ecos/packages/language/c/libc/stdio/current/include/stdio.h
new file mode 100644
index 0000000000..46b92083ac
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/include/stdio.h
@@ -0,0 +1,335 @@
+#ifndef CYGONCE_LIBC_STDIO_STDIO_H
+#define CYGONCE_LIBC_STDIO_STDIO_H
+//========================================================================
+//
+// stdio.h
+//
+// ISO C standard I/O routines - with some POSIX 1003.1 extensions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-19
+// Purpose: ISO C standard I/O routines
+// Description:
+// Usage: Do not include this file directly - use #include <stdio.h>
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // common type definitions and support
+#include <stdarg.h> // va_list from compiler
+
+// CONSTANTS
+
+// Some of these values are odd to ensure that asserts have better effect
+// should spurious values be passed to functions expecting these constants.
+
+// _IOFBF, _IOLBF, and _IONBF specify full, line or no buffering when used
+// with setvbuf() - ISO C standard chap 7.9.1
+
+#define _IOFBF (-2)
+#define _IOLBF (-4)
+#define _IONBF (-8)
+
+// EOF is a macro defined to any negative integer constant - ISO C standard
+// chap. 7.9.1
+#define EOF (-1)
+
+// SEEK_CUR, SEEK_END and SEEK_SET are used with fseek() as position
+// anchors - ISO C standard chap. 7.9.1
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+
+
+// TYPE DEFINITIONS
+
+// A type capable of specifying uniquely every file position - ISO C
+// standard chap 7.9.1
+typedef cyg_ucount32 fpos_t;
+
+
+// FILE is just cast to an address here. It is uncast internally to the
+// C library in stream.hxx as the C++ Cyg_StdioStream class.
+// Optional run-time checking can be enabled to ensure that the cast is
+// valid, using the standard assertion functionality.
+//
+// The array size is irrelevant other than being more than 8, and is present
+// to stop references to FILEs being marked as able to be put in the small
+// data section. We can't just mark it as in the ".data" section as on some
+// targets it may actually be ".common".
+typedef CYG_ADDRESS FILE[9999];
+
+// EXTERNAL VARIABLES
+
+// Default file streams for input/output. These only need to be
+// expressions, not l-values - ISO C standard chap. 7.9.1
+//
+// CYGPRI_LIBC_STDIO_NO_DEFAULT_STREAMS is used when initializing
+// stdin/out/err privately inside the C library
+
+#ifndef CYGPRI_LIBC_STDIO_NO_DEFAULT_STREAMS
+__externC FILE *stdin, *stdout, *stderr;
+#endif
+
+// FUNCTION PROTOTYPES
+
+//========================================================================
+
+// ISO C89 7.9.4 Functions for operations on files
+
+__externC int
+remove( const char * /* pathname */ ) __THROW;
+
+__externC int
+rename( const char * /* oldpath */, const char * /* newpath */ ) __THROW;
+
+__externC FILE *
+tmpfile( void ) __THROW;
+
+__externC char *
+tmpnam(char * /* s */ ) __THROW;
+
+//========================================================================
+
+// ISO C89 7.9.5 File access functions
+
+__externC int
+fclose( FILE * /* stream */ ) __THROW;
+
+__externC int
+fflush( FILE * /* stream */ ) __THROW;
+
+__externC FILE *
+fopen( const char * /* filename */, const char * /* mode */ ) __THROW;
+
+__externC FILE *
+freopen( const char * /* filename */, const char * /* mode */,
+ FILE * /* stream */ ) __THROW;
+
+__externC void
+setbuf( FILE * /* stream */, char * /* buffer */ ) __THROW;
+
+__externC int
+setvbuf( FILE * /* stream */, char * /* buffer */, int /* mode */,
+ size_t /* size */ ) __THROW;
+
+//========================================================================
+
+// ISO C89 7.9.6 Formatted input/output functions
+
+__externC int
+fprintf( FILE * /* stream */, const char * /* format */, ... ) __THROW
+ CYGBLD_ATTRIB_PRINTF_FORMAT(2, 3);
+
+__externC int
+fscanf( FILE * /* stream */, const char * /* format */, ... ) __THROW
+ CYGBLD_ATTRIB_SCANF_FORMAT(2, 3);
+
+__externC int
+printf( const char * /* format */, ... ) __THROW
+ CYGBLD_ATTRIB_PRINTF_FORMAT(1, 2);
+
+__externC int
+scanf( const char * /* format */, ... ) __THROW
+ CYGBLD_ATTRIB_SCANF_FORMAT(1, 2);;
+
+__externC int
+sprintf( char * /* str */, const char * /* format */, ... ) __THROW
+ CYGBLD_ATTRIB_PRINTF_FORMAT(2, 3);
+
+__externC int
+sscanf( const char * /* str */, const char * /* format */, ... ) __THROW
+ CYGBLD_ATTRIB_SCANF_FORMAT(2, 3);
+
+__externC int
+vfprintf( FILE * /* stream */, const char * /* format */,
+ va_list /* args */ ) __THROW CYGBLD_ATTRIB_PRINTF_FORMAT(2, 0);
+
+__externC int
+vprintf( const char * /* format */, va_list /* args */ ) __THROW
+ CYGBLD_ATTRIB_PRINTF_FORMAT(1, 0);
+
+__externC int
+vsprintf( char * /* str */, const char * /* format */,
+ va_list /* args */ ) __THROW CYGBLD_ATTRIB_PRINTF_FORMAT(2, 0);
+
+//========================================================================
+
+// ISO C89 7.9.7 Character input/output functions
+
+__externC int
+fgetc( FILE * /* stream */ ) __THROW;
+
+__externC char *
+fgets( char * /* str */, int /* length */, FILE * /* stream */ ) __THROW;
+
+__externC int
+fputc( int /* c */, FILE * /* stream */ ) __THROW;
+
+__externC int
+putc( int /* c */, FILE * /* stream */ ) __THROW;
+
+__externC int
+putchar( int /* c */ ) __THROW;
+
+__externC int
+fputs( const char * /* str */, FILE * /* stream */ ) __THROW;
+
+__externC char *
+gets( char * ) __THROW;
+
+__externC int
+getc( FILE * /* stream */ ) __THROW;
+
+__externC int
+getchar( void ) __THROW;
+
+__externC int
+puts( const char * /* str */ ) __THROW;
+
+__externC int
+ungetc( int /* c */, FILE * /* stream */ ) __THROW;
+
+// no function equivalent is required for getchar() or putchar(), so we can
+// just #define them
+
+#define getchar() fgetc( stdin )
+
+#define putchar(__c) fputc(__c, stdout)
+
+//========================================================================
+
+// ISO C89 7.9.8 Direct input/output functions
+
+__externC size_t
+fread( void * /* ptr */, size_t /* object_size */,
+ size_t /* num_objects */, FILE * /* stream */ ) __THROW;
+
+__externC size_t
+fwrite( const void * /* ptr */, size_t /* object_size */,
+ size_t /* num_objects */, FILE * /* stream */ ) __THROW;
+
+//========================================================================
+
+// ISO C89 7.9.9 File positioning functions
+
+__externC int
+fgetpos( FILE * /* stream */, fpos_t * /* pos */ ) __THROW;
+
+__externC int
+fseek( FILE * /* stream */, long int /* offset */, int /* whence */ ) __THROW;
+
+__externC int
+fsetpos( FILE * /* stream */, const fpos_t * /* pos */ ) __THROW;
+
+__externC long int
+ftell( FILE * /* stream */ ) __THROW;
+
+__externC void
+rewind( FILE * /* stream */ ) __THROW;
+
+//========================================================================
+
+// ISO C89 7.9.10 Error-handling functions
+
+__externC void
+clearerr( FILE * /* stream */ ) __THROW;
+
+__externC int
+feof( FILE * /* stream */ ) __THROW;
+
+__externC int
+ferror( FILE * /* stream */ ) __THROW;
+
+__externC void
+perror( const char * /* prefix_str */ ) __THROW;
+
+//========================================================================
+
+// Other non-ISO C functions
+
+__externC int
+fnprintf( FILE * /* stream */, size_t /* length */,
+ const char * /* format */, ... ) __THROW
+ CYGBLD_ATTRIB_PRINTF_FORMAT(3, 4);
+
+__externC int
+snprintf( char * /* str */, size_t /* length */, const char * /* format */,
+ ... ) __THROW CYGBLD_ATTRIB_PRINTF_FORMAT(3, 4);
+
+__externC int
+vfnprintf( FILE * /* stream */, size_t /* length */,
+ const char * /* format */, va_list /* args */ ) __THROW
+ CYGBLD_ATTRIB_PRINTF_FORMAT(3, 0);
+
+__externC int
+vsnprintf( char * /* str */, size_t /* length */,
+ const char * /* format */, va_list /* args */ ) __THROW
+ CYGBLD_ATTRIB_PRINTF_FORMAT(3, 0);
+
+__externC int
+vscanf( const char * /* format */, va_list /* args */ ) __THROW
+ CYGBLD_ATTRIB_SCANF_FORMAT(1, 0);
+
+__externC int
+vsscanf( const char * /* str */, const char * /* format */,
+ va_list /* args */ ) __THROW CYGBLD_ATTRIB_SCANF_FORMAT(2, 0);
+
+__externC int
+vfscanf( FILE * /* stream */, const char * /* format */,
+ va_list /* args */ ) __THROW CYGBLD_ATTRIB_PRINTF_FORMAT(2, 0);
+
+
+// INLINE FUNCTIONS
+
+#ifdef CYGIMP_LIBC_STDIO_INLINES
+# include <cyg/libc/stdio/stdio.inl>
+#endif
+
+#endif // CYGONCE_LIBC_STDIO_STDIO_H multiple inclusion protection
+
+// EOF stdio.h
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/include/stdio.inl b/cesar/ecos/packages/language/c/libc/stdio/current/include/stdio.inl
new file mode 100644
index 0000000000..e0fc7ee1cd
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/include/stdio.inl
@@ -0,0 +1,159 @@
+#ifndef CYGONCE_LIBC_STDIO_STDIO_INL
+#define CYGONCE_LIBC_STDIO_STDIO_INL
+//===========================================================================
+//
+// stdio.inl
+//
+// ANSI standard I/O routines - inlined functions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-19
+// Purpose:
+// Description:
+// Usage: Do not include this file directly - use #include <stdio.h>
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdarg.h> // va_list
+#include <stdio.h> // Just be sure it has been included
+#include <errno.h> // Definition of error codes and errno
+#include <string.h> // Definition of strerror() for perror()
+#include <limits.h> // INT_MAX
+
+// INLINE FUNCTION DEFINITIONS
+
+//===========================================================================
+
+// 7.9.5 File access functions
+
+extern __inline__ void
+setbuf( FILE *stream, char *buf ) __THROW
+{
+ if (buf == NULL)
+ setvbuf( stream, NULL, _IONBF, 0 );
+ else
+ // NB: Should use full buffering by default ordinarily, but in
+ // the current system we're always connected to an interactive
+ // terminal, so use line buffering
+ setvbuf( stream, buf, _IOLBF, BUFSIZ );
+
+} // setbuf()
+
+//===========================================================================
+
+// 7.9.6 Formatted input/output functions
+
+extern __inline__ int
+vfprintf( FILE *stream, const char *format, va_list arg ) __THROW
+{
+ return vfnprintf(stream, INT_MAX, format, arg);
+} // vfprintf()
+
+
+extern __inline__ int
+vprintf( const char *format, va_list arg ) __THROW
+{
+ return vfnprintf(stdout, INT_MAX, format, arg);
+} // vprintf()
+
+
+extern __inline__ int
+vsprintf( char *s, const char *format, va_list arg ) __THROW
+{
+ return vsnprintf(s, INT_MAX, format, arg);
+} // vsprintf()
+
+
+//===========================================================================
+
+// 7.9.7 Character input/output functions
+
+extern __inline__ int
+puts( const char *s ) __THROW
+{
+ int rc;
+
+ rc = fputs( s, stdout );
+
+ if (rc >= 0)
+ rc = fputc('\n', stdout );
+
+ return rc;
+} // puts()
+
+
+//===========================================================================
+
+// 7.9.10 Error-handling functions
+
+extern __inline__ void
+perror( const char *s ) __THROW
+{
+ if (s && *s)
+ fprintf( stderr, "%s: %s\n", s, strerror(errno) );
+ else
+ fputs( strerror(errno), stderr );
+
+} // perror()
+
+//===========================================================================
+
+// Other non-ANSI functions
+
+extern __inline__ int
+vscanf( const char *format, va_list arg ) __THROW
+{
+ return vfscanf( stdin, format, arg );
+} // vscanf()
+
+
+#endif // CYGONCE_LIBC_STDIO_STDIO_INL multiple inclusion protection
+
+// EOF stdio.inl
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/include/stdiofiles.hxx b/cesar/ecos/packages/language/c/libc/stdio/current/include/stdiofiles.hxx
new file mode 100644
index 0000000000..85c48308f3
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/include/stdiofiles.hxx
@@ -0,0 +1,117 @@
+#ifndef CYGONCE_LIBC_STDIO_STDIOFILES_HXX
+#define CYGONCE_LIBC_STDIO_STDIOFILES_HXX
+//========================================================================
+//
+// stdiofiles.hxx
+//
+// ISO C library stdio central file access
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-19
+// Purpose:
+// Description:
+// Usage: #include <cyg/libc/stdio/stdiosupp.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // libc stdio configuration
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // cyg_bool, cyg_ucount8, cyg_ucount16
+#include <cyg/libc/stdio/stream.hxx> // Cyg_StdioStream
+
+#ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+# include <cyg/kernel/mutex.hxx> // mutexes
+#endif
+
+// CLASSES
+
+class Cyg_libc_stdio_files
+{
+ // List of open files - global for now
+ static
+ Cyg_StdioStream *files[FOPEN_MAX];
+
+# ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+ // lock for the above
+ static
+ Cyg_Mutex files_lock;
+# endif
+
+public:
+
+# if FOPEN_MAX < 256
+ typedef cyg_ucount8 fd_t;
+# else
+ typedef cyg_ucount16 fd_t;
+# endif
+
+ static Cyg_StdioStream *
+ get_file_stream( fd_t fd );
+
+ static void
+ set_file_stream( fd_t fd, Cyg_StdioStream *stream );
+
+
+ // the following functions lock(), trylock() and unlock() do nothing
+ // if we haven't got thread-safe streams
+ static cyg_bool
+ lock(void);
+
+ static cyg_bool
+ trylock(void);
+
+ static void
+ unlock(void);
+
+}; // class Cyg_libc_stdio_files
+
+
+// Inline functions for this class
+#include <cyg/libc/stdio/stdiofiles.inl>
+
+#endif // CYGONCE_LIBC_STDIO_STDIOFILES_HXX multiple inclusion protection
+
+// EOF stdiofiles.hxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/include/stdiofiles.inl b/cesar/ecos/packages/language/c/libc/stdio/current/include/stdiofiles.inl
new file mode 100644
index 0000000000..2282c56d5e
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/include/stdiofiles.inl
@@ -0,0 +1,126 @@
+#ifndef CYGONCE_LIBC_STDIO_STDIOFILES_INL
+#define CYGONCE_LIBC_STDIO_STDIOFILES_INL
+//========================================================================
+//
+// stdiofiles.inl
+//
+// ISO C library stdio central file inlines
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-19
+// Purpose:
+// Description:
+// Usage: Do not include this file directly. Instead use:
+// #include <cyg/libc/stdio/stdiofiles.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // libc stdio configuration
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // cyg_bool
+#include <cyg/infra/cyg_ass.h> // Assert interface
+#include <cyg/libc/stdio/stdiofiles.hxx> // header for this file
+#include <cyg/libc/stdio/stream.hxx> // Cyg_StdioStream
+
+#ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+# include <cyg/kernel/mutex.hxx> // mutexes
+#endif
+
+// INLINE METHODS
+
+inline Cyg_StdioStream *
+Cyg_libc_stdio_files::get_file_stream( fd_t fd )
+{
+ CYG_PRECONDITION( (fd < FOPEN_MAX),
+ "Attempt to open larger file descriptor than FOPEN_MAX!" );
+
+ return files[fd];
+
+} // Cyg_libc_stdio_files::get_file_stream()
+
+inline void
+Cyg_libc_stdio_files::set_file_stream( fd_t fd, Cyg_StdioStream *stream )
+{
+ CYG_PRECONDITION( (fd < FOPEN_MAX),
+ "Attempt to set larger file descriptor than FOPEN_MAX!" );
+
+ files[fd] = stream;
+
+} // Cyg_libc_stdio_files::set_file_stream()
+
+
+inline cyg_bool
+Cyg_libc_stdio_files::lock(void)
+{
+# ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+ return files_lock.lock();
+# else
+ return true;
+# endif
+} // Cyg_libc_stdio_files::lock()
+
+inline cyg_bool
+Cyg_libc_stdio_files::trylock(void)
+{
+# ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+ return files_lock.trylock();
+# else
+ return true;
+# endif
+} // Cyg_libc_stdio_files::trylock()
+
+inline void
+Cyg_libc_stdio_files::unlock(void)
+{
+# ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+ files_lock.unlock();
+# endif
+} // Cyg_libc_stdio_files::unlock()
+
+
+#endif // CYGONCE_LIBC_STDIO_STDIOFILES_INL multiple inclusion protection
+
+// EOF stdiofiles.inl
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/include/stdiosupp.hxx b/cesar/ecos/packages/language/c/libc/stdio/current/include/stdiosupp.hxx
new file mode 100644
index 0000000000..0906f287e6
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/include/stdiosupp.hxx
@@ -0,0 +1,83 @@
+#ifndef CYGONCE_LIBC_STDIO_STDIOSUPP_HXX
+#define CYGONCE_LIBC_STDIO_STDIOSUPP_HXX
+//========================================================================
+//
+// stdiosupp.hxx
+//
+// Support for C library standard I/O routines
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-19
+// Purpose:
+// Description:
+// Usage: #include <cyg/libc/stdio/stdiosupp.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // common type definitions and support
+#include <stdio.h> // Main standard I/O header
+#include <cyg/libc/stdio/stream.hxx>// Cyg_StdioStream
+
+// FUNCTION PROTOTYPES
+
+//========================================================================
+
+// Miscellaneous support functions
+
+externC cyg_stdio_handle_t
+Cyg_libc_stdio_find_filename( const char *filename,
+ const Cyg_StdioStream::OpenMode rw,
+ const cyg_bool binary,
+ const cyg_bool append );
+
+externC Cyg_ErrNo
+cyg_libc_stdio_flush_all_but( Cyg_StdioStream *not_this_stream );
+
+#endif // CYGONCE_LIBC_STDIOL_STDIOSUPP_HXX multiple inclusion protection
+
+// EOF stdiosupp.hxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/include/stream.hxx b/cesar/ecos/packages/language/c/libc/stdio/current/include/stream.hxx
new file mode 100644
index 0000000000..01e428558b
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/include/stream.hxx
@@ -0,0 +1,322 @@
+#ifndef CYGONCE_LIBC_STDIO_STREAM_HXX
+#define CYGONCE_LIBC_STDIO_STREAM_HXX
+//========================================================================
+//
+// stream.hxx
+//
+// Internal C library stdio stream interface definitions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2001-03-16
+// Purpose:
+// Description:
+// Usage: #include <cyg/libc/stdio/stream.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <cyg/infra/cyg_ass.h> // Get assertion macros, as appropriate
+#include <errno.h> // Cyg_ErrNo
+#include <stdio.h> // fpos_t and IOBUF defines
+#include <cyg/libc/stdio/io.hxx> // Physical IO support
+#include <cyg/libc/stdio/streambuf.hxx> // Stdio stream file buffers
+
+#ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+#include <pkgconf/kernel.h>
+#include <cyg/kernel/mutex.hxx> // Cyg_Mutex
+#endif
+
+// TYPE DEFINITIONS
+
+class Cyg_StdioStream;
+__externC Cyg_ErrNo
+cyg_libc_stdio_flush_all_but( Cyg_StdioStream * );
+
+class Cyg_StdioStream
+{
+ friend int setvbuf( FILE *, char *, int, size_t ) __THROW;
+ friend Cyg_ErrNo
+ cyg_libc_stdio_flush_all_but( Cyg_StdioStream * );
+
+private:
+
+ // error status for this file
+ Cyg_ErrNo error;
+
+
+ cyg_stdio_handle_t my_device;
+
+#ifdef CYGFUN_LIBC_STDIO_ungetc
+ cyg_uint8 unread_char_buf;
+#endif
+
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ Cyg_StdioStreamBuffer io_buf; // read/write buffer
+#endif
+ cyg_uint8 readbuf_char; // a one character emergency "buffer"
+ // only used when configured to not buffer
+ // (i.e. !CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO)
+ // or set at runtime to not buffer (i.e.
+ // buffering mode is _IONBF)
+
+ // some flags indicating the state of the file. Some of it is internal
+ // state, which should not be public. Use bitfields to save
+ // space, which means using "unsigned int" rather than cyg_uintX
+ struct {
+ unsigned int at_eof : 1; // Have we reached eof?
+
+ unsigned int opened_for_read : 1; // opened_for_read and
+
+ unsigned int opened_for_write : 1; // opened_for_write can
+ // be set simultaneously
+
+ unsigned int binary : 1; // opened for binary or
+ // text mode?
+
+#ifdef CYGFUN_LIBC_STDIO_ungetc
+ unsigned int unread_char_buf_in_use : 1; // unget buf in use?
+#endif
+
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ unsigned int buffering : 1; // Is this file buffered?
+
+ unsigned int line_buffering : 1; // If so, is it line
+ // buffered? If it is
+ // buffered, but NOT line
+ // buffered, it must be
+ // fully buffered
+
+ unsigned int last_buffer_op_was_read : 1; // did we last read from
+ // the buffer. If not we
+ // must have written
+#endif
+ unsigned int readbuf_char_in_use : 1; // is the above
+ // readbuf_char in use?
+
+ } flags;
+
+ // current position for reading/writing
+ fpos_t position;
+
+#ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+ Cyg_Mutex stream_lock; // used for locking this stream
+#endif // ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+
+#ifdef CYGDBG_USE_ASSERTS
+ // a value to check that this class is hopefully valid
+ cyg_ucount32 magic_validity_word;
+#endif
+
+public:
+ // different modes when constructing (i.e. opening).
+ typedef enum {
+ CYG_STREAM_READ,
+ CYG_STREAM_WRITE,
+ CYG_STREAM_READWRITE_NOCREATE,
+ CYG_STREAM_READWRITE_CREATE
+ } OpenMode;
+
+ // CONSTRUCTORS
+
+ // This constructs the stream - effectively opens the file. This is
+ // used for static initialisation, and actually calls construct below
+ //
+ // dev is a valid Cyg_Device_Table_t, although it does not have to
+ // be a member of the device table object itself
+ //
+ // open_mode is one of CYG_STREAM_READ, CYG_STREAM_WRITE,
+ // CYG_STREAM_READWRITE_NOCREATE or CYG_STREAM_READWRITE_CREATE
+ //
+ // append is true if the file position should be set at EOF on opening
+ //
+ // binary is true if this is a binary stream. Otherwise it is a text
+ // stream and character conversions (especially newline) may occur
+ //
+ // buffer_mode is one of _IONBF, _IOLBF, _IOFBF (from <stdio.h>)
+ // If buffer_mode is _IONBF, buffer_size should still be set to 0
+ // and buffer_addr to NULL. If buffering is not configured, none
+ // of buffer_mode, buffer_size and buffer_addr have any effect
+ //
+ // buffer_size is the size of buffer to use
+ //
+ // buffer_addr is the address of a user supplied buffer. By default
+ // (when NULL) a system one is provided.
+ //
+ // The "return code" is set by assignment to the error member of this
+ // stream - use the get_error() method to check
+
+ Cyg_StdioStream( cyg_stdio_handle_t dev, OpenMode open_mode,
+ cyg_bool append, cyg_bool binary, int buffer_mode,
+ cyg_ucount32 buffer_size=BUFSIZ,
+ cyg_uint8 *buffer_addr=NULL );
+
+ Cyg_StdioStream( OpenMode open_mode,
+ cyg_ucount32 buffer_size=BUFSIZ,
+ cyg_uint8 *buffer_addr=NULL );
+
+private:
+ void initialize( cyg_stdio_handle_t dev, OpenMode open_mode,
+ cyg_bool append, cyg_bool binary, int buffer_mode,
+ cyg_ucount32 buffer_size=BUFSIZ,
+ cyg_uint8 *buffer_addr=NULL );
+public:
+
+ // DESTRUCTOR
+
+ ~Cyg_StdioStream();
+
+
+ // MEMBER FUNCTIONS
+
+ // Close the stream. This should be called before the destructor,
+ // so we can see and report any errors produced.
+ Cyg_ErrNo close();
+
+ // Refill read buffer from the stream - note this blocks until
+ // something arrives on the stream
+ Cyg_ErrNo
+ refill_read_buffer( void );
+
+
+ // Read not more than buffer_length bytes from the read buffer into the
+ // user buffer.
+ // The number of bytes put into the user buffer is written
+ // into *bytes_read
+ Cyg_ErrNo
+ read( cyg_uint8 *user_buffer, cyg_ucount32 buffer_length,
+ cyg_ucount32 *bytes_read );
+
+
+ // Read a single byte from the stream. Returns EAGAIN if no character
+ // available or EEOF if end of file (as well as setting the EOF state)
+ Cyg_ErrNo
+ read_byte( cyg_uint8 *c );
+
+ // Read a single byte from the stream, but don't remove it. Returns
+ // EAGAIN if no character available or EEOF if end of file (as well
+ // as setting the EOF state)
+ Cyg_ErrNo
+ peek_byte( cyg_uint8 *c );
+
+
+ // Return a byte into the stream - basically the same as ungetc()
+ Cyg_ErrNo
+ unread_byte( cyg_uint8 c );
+
+ // the number of bytes available to read without needing to refill the
+ // buffer
+ cyg_ucount32
+ bytes_available_to_read( void );
+
+ Cyg_ErrNo
+ write( const cyg_uint8 *buffer, cyg_ucount32 buffer_length,
+ cyg_ucount32 *bytes_written );
+
+ Cyg_ErrNo
+ write_byte( cyg_uint8 c );
+
+
+ Cyg_ErrNo
+ flush_output( void );
+
+ Cyg_ErrNo
+ flush_output_unlocked( void );
+
+ // prevent multiple access in thread safe mode
+
+ // lock_me() returns false if it couldn't be locked, which could
+ // happen if the file descriptor is bad
+
+ cyg_bool
+ lock_me( void );
+
+ // trylock_me() returns false if it couldn't be locked, probably
+ // because it is already locked
+ cyg_bool
+ trylock_me( void );
+
+ void
+ unlock_me( void );
+
+ // get error status for this file
+ Cyg_ErrNo
+ get_error( void );
+
+ // set error status for this file.
+ void
+ set_error( Cyg_ErrNo errno_to_set );
+
+ // are we at EOF? true means we are, false means no
+ cyg_bool
+ get_eof_state( void );
+
+ // Set whether we are at EOF.
+ void
+ set_eof_state( cyg_bool eof_to_set );
+
+ // retrieve position
+ Cyg_ErrNo
+ get_position( fpos_t *pos );
+
+ // set absolute position. whence is SEEK_SET, SEEK_CUR, or SEEK_END
+ Cyg_ErrNo
+ set_position( fpos_t pos, int whence );
+
+ // Return my_device
+ cyg_stdio_handle_t get_dev() { return my_device; };
+
+ CYGDBG_DEFINE_CHECK_THIS
+};
+
+// INLINE FUNCTIONS
+
+#include <cyg/libc/stdio/stream.inl>
+
+#endif // CYGONCE_LIBC_STDIO_STREAM_HXX multiple inclusion protection
+
+// EOF stream.hxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/include/stream.inl b/cesar/ecos/packages/language/c/libc/stdio/current/include/stream.inl
new file mode 100644
index 0000000000..31aa5ca175
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/include/stream.inl
@@ -0,0 +1,487 @@
+#ifndef CYGONCE_LIBC_STDIO_STREAM_INL
+#define CYGONCE_LIBC_STDIO_STREAM_INL
+//========================================================================
+//
+// stream.inl
+//
+// Inline functions for internal C library stdio stream interface
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-19
+// Purpose:
+// Description:
+// Usage: Do not include this file -
+// #include <cyg/libc/stdio/stream.hxx> instead.
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <errno.h> // Error codes
+#include <cyg/libc/stdio/stream.hxx> // Just be sure that this really is
+ // included
+
+#include <cyg/libc/stdio/io.inl> // I/O system inlines
+
+// FUNCTIONS
+
+#ifdef CYGDBG_USE_ASSERTS
+inline cyg_bool
+Cyg_StdioStream::check_this( cyg_assert_class_zeal zeal ) const
+{
+ // check that it has the magic word set meaning it is valid.
+ if ( magic_validity_word != 0x7b4321ce )
+ return false;
+ return true;
+} // check_this()
+
+#endif // ifdef CYGDBG_USE_ASSERTS
+
+
+
+// LOCKING FUNCTIONS
+
+// returns true on success
+inline cyg_bool
+Cyg_StdioStream::lock_me( void )
+{
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+#ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+ return stream_lock.lock();
+#else
+ // otherwise it "worked"
+ return true;
+#endif
+
+} // lock_me()
+
+
+// returns true on success
+inline cyg_bool
+Cyg_StdioStream::trylock_me( void )
+{
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+#ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+ return stream_lock.trylock();
+#else
+ // otherwise it "worked"
+ return true;
+#endif
+
+} // lock_me()
+
+
+inline void
+Cyg_StdioStream::unlock_me( void )
+{
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+#ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+ stream_lock.unlock();
+#endif
+} // unlock_me()
+
+
+// DESTRUCTOR
+
+inline Cyg_ErrNo
+Cyg_StdioStream::close()
+{
+ Cyg_ErrNo err = ENOERR;
+
+ if (!lock_me())
+ return EBADF;
+
+ if( my_device != CYG_STDIO_HANDLE_NULL )
+ {
+ flush_output_unlocked();
+
+ err = cyg_stdio_close( my_device );
+
+ if( err == ENOERR )
+ my_device = CYG_STDIO_HANDLE_NULL;
+ }
+
+ unlock_me();
+
+ return err;
+} // close()
+
+inline
+Cyg_StdioStream::~Cyg_StdioStream()
+{
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+ // Close the device if it has not already been closed.
+ if( my_device != CYG_STDIO_HANDLE_NULL )
+ close();
+
+#ifdef CYGDBG_USE_ASSERTS
+ magic_validity_word = 0xbadbad;
+#endif
+} // Cyg_StdioStream destructor
+
+
+// MEMBER FUNCTIONS
+
+
+// this is currently just a wrapper around write, but having this interface
+// leaves scope for optimisations in future
+inline Cyg_ErrNo
+Cyg_StdioStream::write_byte( cyg_uint8 c )
+{
+ cyg_ucount32 dummy_bytes_written;
+ Cyg_ErrNo err;
+
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+ err = write( &c, 1, &dummy_bytes_written );
+
+ CYG_ASSERT( (err!=ENOERR) || (dummy_bytes_written==1),
+ "Single byte not written, but no error returned!" );
+
+ return err;
+} // write_byte()
+
+
+inline Cyg_ErrNo
+Cyg_StdioStream::unread_byte( cyg_uint8 c )
+{
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+#ifdef CYGFUN_LIBC_STDIO_ungetc
+ if (!lock_me())
+ return EBADF; // assume file is now invalid
+
+ if (flags.unread_char_buf_in_use) {
+ unlock_me();
+ return ENOMEM;
+ } // if
+
+ flags.unread_char_buf_in_use = true;
+ unread_char_buf = c;
+
+ // can't be at EOF any more
+ flags.at_eof = false;
+
+ if (position) // position is always 0 for certain devices
+ --position;
+
+ unlock_me();
+
+ return ENOERR;
+
+#else // ifdef CYGFUN_LIBC_STDIO_ungetc
+
+ return ENOSYS;
+#endif // ifdef CYGFUN_LIBC_STDIO_ungetc
+} // unread_byte()
+
+
+inline cyg_ucount32
+Cyg_StdioStream::bytes_available_to_read( void )
+{
+ cyg_ucount32 bytes=0;
+
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+#ifdef CYGFUN_LIBC_STDIO_ungetc
+ if (flags.unread_char_buf_in_use)
+ ++bytes;
+#endif
+
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+
+ // either the last operation was a read, which attempted to read bytes
+ // into the buffer, or there are no bytes in the buffer
+
+ if (flags.buffering) {
+ if (flags.last_buffer_op_was_read == true)
+ bytes += io_buf.get_buffer_space_used();
+ }
+ else
+
+#endif
+
+ if (flags.readbuf_char_in_use)
+ ++bytes;
+
+ return bytes;
+} // bytes_available_to_read()
+
+
+
+inline Cyg_ErrNo
+Cyg_StdioStream::flush_output( void )
+{
+ Cyg_ErrNo err;
+
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+ if (!lock_me())
+ return EBADF; // assume file is now invalid
+
+ err = flush_output_unlocked();
+
+ unlock_me();
+
+ return err;
+} // flush_output()
+
+
+// get error status for this file
+inline Cyg_ErrNo
+Cyg_StdioStream::get_error( void )
+{
+ Cyg_ErrNo err_temp;
+
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+ if (!lock_me())
+ return EBADF; // well, we've certainly got an error now!
+
+ err_temp = error;
+
+ unlock_me();
+
+ return err_temp;
+} // get_error()
+
+
+// set error status for this file
+inline void
+Cyg_StdioStream::set_error( Cyg_ErrNo errno_to_set )
+{
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+ if (!lock_me())
+ {
+ errno = EBADF; // best we can do - we can't trust error to be there
+ return;
+ } // if
+
+ errno = error = errno_to_set;
+
+ if ( EEOF == error )
+ flags.at_eof = 1;
+
+ unlock_me();
+} // set_error()
+
+
+// are we at EOF? true means we are, false means no
+inline cyg_bool
+Cyg_StdioStream::get_eof_state( void )
+{
+ cyg_bool eof_temp;
+
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+ if (!lock_me())
+ return false; // not much we can do here
+
+ eof_temp = flags.at_eof;
+
+ unlock_me();
+
+ return eof_temp;
+} // get_eof_state()
+
+
+// Set whether we are at EOF.
+inline void
+Cyg_StdioStream::set_eof_state( cyg_bool eof_to_set )
+{
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+ if (!lock_me())
+ return; // not much we can do here
+
+ flags.at_eof = eof_to_set;
+
+ unlock_me();
+} // set_eof_state()
+
+
+// retrieve position
+inline Cyg_ErrNo
+Cyg_StdioStream::get_position( fpos_t *pos )
+{
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+ if (!lock_me())
+ return EBADF; // assume file is now invalid
+
+ *pos = position;
+
+ unlock_me();
+
+ return ENOERR;
+
+} // get_position()
+
+
+// set absolute position
+inline Cyg_ErrNo
+Cyg_StdioStream::set_position( fpos_t pos, int whence )
+{
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+#ifndef CYGPKG_LIBC_STDIO_FILEIO
+ // this is currently a workaround until we have real files
+ // this will be corrected when we decide the true filesystem interface
+
+ Cyg_ErrNo err;
+ cyg_uint8 c;
+
+ if ((whence != SEEK_CUR) || pos < 0)
+ return ENOSYS;
+
+ if (!lock_me())
+ return EBADF; // assume file is now invalid
+
+ // Drain read buffer
+
+ for ( ; pos > 0 ; pos-- ) {
+ err = read_byte( &c );
+ if (err == EAGAIN)
+ err=refill_read_buffer();
+
+ // if read_byte retured error, or refill_read_buffer returned error
+ if (err) {
+ unlock_me();
+ return err;
+ } // if
+ } // for
+
+ unlock_me();
+
+ return ENOERR;
+
+#else
+
+ if (!lock_me())
+ return EBADF; // assume file is now invalid
+
+ if ( whence != SEEK_END ) {
+ off_t bytesavail = (off_t)bytes_available_to_read();
+ off_t abspos = (whence == SEEK_CUR) ? position + pos : pos;
+ off_t posdiff = abspos - position;
+
+ if ( posdiff >= 0 && bytesavail > posdiff ) {
+ // can just "seek" within the existing buffer
+#ifdef CYGFUN_LIBC_STDIO_ungetc
+ if (posdiff>0 && flags.unread_char_buf_in_use) {
+ flags.unread_char_buf_in_use = false;
+ posdiff--;
+ }
+#endif
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ if (posdiff>0 && flags.buffering) {
+ io_buf.set_bytes_read(posdiff);
+ posdiff=0;
+ } else
+#endif
+ if (posdiff>0 && flags.readbuf_char_in_use) {
+ flags.readbuf_char_in_use = false;
+ posdiff--;
+ }
+ CYG_ASSERT(posdiff==0, "Failed to seek within buffer correctly");
+
+ position = abspos;
+ unlock_me();
+ return ENOERR;
+ } // endif (bytesavail > posdiff)
+
+ if (whence == SEEK_CUR) {
+ position += bytesavail;
+ }
+ } //endif (whence != SEEK_END)
+
+ Cyg_ErrNo err;
+
+ // Flush output if any present.
+ err = flush_output_unlocked();
+
+ if( err == ENOERR )
+ {
+ off_t newpos=pos;
+
+ // Clear any input out of input buffer and any ungot chars
+ // from unread buffer.
+ io_buf.drain_buffer();
+
+#ifdef CYGFUN_LIBC_STDIO_ungetc
+ flags.unread_char_buf_in_use = false;
+#endif
+
+ // Clear EOF indicator.
+ flags.at_eof = false;
+
+ // Seek the file to the correct place
+ err = cyg_stdio_lseek( my_device, &newpos, whence );
+
+ if ( err == ENOERR) {
+ // update stream pos
+ position = newpos;
+ }
+ }
+
+ unlock_me();
+
+ return err;
+#endif
+
+} // set_position()
+
+
+#endif // CYGONCE_LIBC_STDIO_STREAM_INL multiple inclusion protection
+
+// EOF stream.inl
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/include/streambuf.hxx b/cesar/ecos/packages/language/c/libc/stdio/current/include/streambuf.hxx
new file mode 100644
index 0000000000..0ca6b2143c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/include/streambuf.hxx
@@ -0,0 +1,164 @@
+#ifndef CYGONCE_LIBC_STDIO_STREAMBUF_HXX
+#define CYGONCE_LIBC_STDIO_STREAMBUF_HXX
+//===========================================================================
+//
+// streambuf.hxx
+//
+// Internal C library stdio stream buffer interface definitions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-19
+// Purpose:
+// Description: This file implements the buffer class used by Cyg_StdioStream
+// for file buffers. It is simple, and not thread-safe - that
+// is better done at a higher level for our purposes.
+// Usage: #include <cyg/libc/stdio/streambuf.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// Include buffered I/O?
+#if defined(CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO)
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <errno.h> // Cyg_ErrNo
+
+
+// TYPE DEFINITIONS
+
+
+class Cyg_StdioStreamBuffer
+{
+private:
+ // Buffering data
+
+#if defined(CYGSEM_LIBC_STDIO_SETVBUF_MALLOC)
+ cyg_bool call_free; // should we free the old buffer if set_buffer is
+ // called?
+#else
+ cyg_uint8 static_buffer[BUFSIZ]; // Static buffer used when we cannot
+ // use malloc()/free().
+#endif
+
+ cyg_uint8 *buffer_bottom;
+
+ cyg_ucount32 buffer_size;
+
+ cyg_uint8 *buffer_top;
+
+ cyg_uint8 *current_buffer_position;
+
+public:
+
+ // CONSTRUCTORS
+
+ // You can change the size, or even supply your own buffer, although
+ // this only has an effect with dynamic buffers. Otherwise it is
+ // silently ignored
+ Cyg_StdioStreamBuffer( cyg_ucount32 size=BUFSIZ,
+ cyg_uint8 *new_buffer=NULL );
+
+
+ // DESTRUCTORS
+
+ ~Cyg_StdioStreamBuffer();
+
+ // METHODS
+
+ // Set up the buffer. As with the constructor, supplying a new_buffer
+ // only has an effect with dynamic buffers, although EINVAL is returned
+ // in that case. ENOMEM may also be returned
+ Cyg_ErrNo
+ set_buffer( cyg_ucount32 size=BUFSIZ, cyg_uint8 *new_buffer=NULL );
+
+ // Find out how much buffer space is in use
+ cyg_ucount32
+ get_buffer_space_used( void );
+
+
+ // What total size is the current buffer set to be. Can be -1 if the
+ // the buffer is invalid
+ cyg_count32
+ get_buffer_size( void );
+
+
+ // get buffer address to read from, and return the number of bytes
+ // available to read
+ cyg_ucount32
+ get_buffer_addr_to_read( cyg_uint8 **buffer );
+
+ // when finished reading from said space, tell the buffer how much was
+ // actually read
+ void
+ set_bytes_read( cyg_ucount32 bytes );
+
+ // return address of buffer that can be used to write into, and its
+ // available capacity
+ cyg_ucount32
+ get_buffer_addr_to_write( cyg_uint8 **buffer );
+
+ // when finished writing into said space, tell the buffer how much was
+ // actually written
+ void
+ set_bytes_written( cyg_ucount32 bytes );
+
+ // just empty the whole buffer contents
+ void
+ drain_buffer( void );
+}; // class Cyg_StdioStreamBuffer
+
+// INLINE FUNCTIONS
+
+#include <cyg/libc/stdio/streambuf.inl>
+
+
+#endif // if defined(CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO)
+
+#endif // CYGONCE_LIBC_STDIO_STREAMBUF_HXX multiple inclusion protection
+
+// EOF streambuf.hxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/include/streambuf.inl b/cesar/ecos/packages/language/c/libc/stdio/current/include/streambuf.inl
new file mode 100644
index 0000000000..5c1b3a62c4
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/include/streambuf.inl
@@ -0,0 +1,186 @@
+#ifndef CYGONCE_LIBC_STDIO_STREAMBUF_INL
+#define CYGONCE_LIBC_STDIO_STREAMBUF_INL
+//===========================================================================
+//
+// streambuf.inl
+//
+// Internal C library stdio stream buffer inline functions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-19
+// Purpose:
+// Description:
+// Usage: Do not include this file directly, instead
+// #include <cyg/libc/stdio/streambuf.hxx>
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// Include buffered I/O?
+#if defined(CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO)
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <errno.h> // Cyg_ErrNo
+#include <stdio.h> // fpos_t and iobuf defines
+#include <stdlib.h> // free()
+#include <cyg/libc/stdio/streambuf.hxx> // header for this file, just in case
+#include <limits.h> // INT_MAX
+
+// FUNCTIONS
+
+inline
+Cyg_StdioStreamBuffer::Cyg_StdioStreamBuffer( cyg_ucount32 size,
+ cyg_uint8 *new_buffer ) :
+#if defined(CYGSEM_LIBC_STDIO_SETVBUF_MALLOC)
+ call_free(false),
+ buffer_bottom( NULL ),
+ buffer_size(0),
+#else
+ buffer_bottom( static_buffer ),
+ buffer_size(sizeof(static_buffer)),
+#endif
+ buffer_top(NULL),
+ current_buffer_position(NULL)
+{
+ // NB Many of the above members in the initialisation list may seem
+ // unnecessary, but it is to ensure a defined state if e.g. the malloc
+ // in set_buffer() should fail
+
+ (void)set_buffer(size, new_buffer);
+} // Cyg_StdioStreamBuffer constructor
+
+
+inline
+Cyg_StdioStreamBuffer::~Cyg_StdioStreamBuffer()
+{
+#ifdef CYGSEM_LIBC_STDIO_SETVBUF_MALLOC
+ if ((buffer_bottom != NULL) && call_free)
+ free( buffer_bottom );
+#endif
+} // Cyg_StdioStreamBuffer destructor
+
+
+inline cyg_ucount32
+Cyg_StdioStreamBuffer::get_buffer_space_used( void )
+{
+ return (buffer_top - current_buffer_position);
+} // get_buffer_space_used()
+
+
+inline cyg_count32
+Cyg_StdioStreamBuffer::get_buffer_size( void )
+{
+#ifdef CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF
+ if (buffer_bottom==NULL)
+ return -1;
+#endif
+ return buffer_size;
+} // get_buffer_size()
+
+
+inline cyg_ucount32
+Cyg_StdioStreamBuffer::get_buffer_addr_to_read( cyg_uint8 **buffer )
+{
+ *buffer = current_buffer_position;
+
+ return (buffer_top - current_buffer_position);
+} // get_buffer_addr_to_read()
+
+inline void
+Cyg_StdioStreamBuffer::set_bytes_read( cyg_ucount32 bytes )
+{
+ cyg_uint8 *buffer_max = &buffer_bottom[ get_buffer_size() ];
+
+ current_buffer_position += bytes;
+
+ // INT_MAX is used by some callers to mean infinite.
+ CYG_ASSERT( (current_buffer_position <= buffer_top)
+ || (get_buffer_size() == INT_MAX),
+ "read too many bytes from buffer" );
+
+ if (current_buffer_position == buffer_max)
+ current_buffer_position = buffer_top = &buffer_bottom[0];
+
+} // set_bytes_read()
+
+
+inline cyg_ucount32
+Cyg_StdioStreamBuffer::get_buffer_addr_to_write( cyg_uint8 **buffer )
+{
+ cyg_uint8 *buffer_max = &buffer_bottom[ get_buffer_size() ];
+
+ *buffer = buffer_top;
+
+ return (buffer_max - buffer_top);
+} // get_buffer_addr_to_write()
+
+
+inline void
+Cyg_StdioStreamBuffer::set_bytes_written( cyg_ucount32 bytes )
+{
+ buffer_top += bytes;
+
+ // INT_MAX is used by some callers to mean infinite.
+ CYG_ASSERT( (buffer_top <= &buffer_bottom[ get_buffer_size() ])
+ || (get_buffer_size() == INT_MAX),
+ "wrote too many bytes into buffer" );
+} // set_bytes_written()
+
+
+inline void
+Cyg_StdioStreamBuffer::drain_buffer( void )
+{
+ buffer_top = current_buffer_position = &buffer_bottom[0];
+} // drain_buffer()
+
+#endif // if defined(CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO)
+
+#endif // CYGONCE_LIBC_STDIO_STREAMBUF_INL multiple inclusion protection
+
+// EOF streambuf.inl
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/fclose.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/fclose.cxx
new file mode 100644
index 0000000000..248bce0508
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/fclose.cxx
@@ -0,0 +1,131 @@
+//===========================================================================
+//
+// fclose.cxx
+//
+// Implementation of C library file close function as per ANSI 7.9.5.1
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose: Implements ISO C fclose() function
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+#include <pkgconf/infra.h>
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <errno.h> // Error codes
+#include <stdio.h> // header for fclose()
+#include <stdlib.h> // free()
+#include <cyg/libc/stdio/stdiofiles.hxx> // C library files
+#include <cyg/libc/stdio/stream.hxx> // C library streams
+
+#include <cyg/libc/stdio/io.inl> // I/O system inlines
+
+// FUNCTIONS
+
+
+externC int
+fclose( FILE *stream ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+ int i;
+ Cyg_ErrNo err;
+
+ if (NULL == real_stream)
+ {
+ errno = EBADF;
+ return EOF;
+ }
+
+ Cyg_libc_stdio_files::lock();
+
+ // find the stream in the table
+ for (i=0; i < FOPEN_MAX; i++)
+ {
+ if (real_stream == Cyg_libc_stdio_files::get_file_stream(i))
+ break;
+ } // for
+
+ if (i == FOPEN_MAX) // didn't find it
+ {
+ Cyg_libc_stdio_files::unlock();
+ errno = EBADF;
+ return EOF;
+ } // if
+
+ err = real_stream->close();
+
+ if( err != ENOERR )
+ {
+ Cyg_libc_stdio_files::unlock();
+ errno = err;
+ return EOF;
+ }
+
+#ifdef CYGFUN_INFRA_EMPTY_DELETE_FUNCTIONS
+ // Explicitly call destructor - this flushes the output too
+ real_stream->~Cyg_StdioStream();
+
+ // and free it
+ free(real_stream);
+#else
+ delete real_stream;
+#endif // CYGFUN_INFRA_EMPTY_DELETE_FUNCTIONS
+
+ // and mark the stream available for use
+ Cyg_libc_stdio_files::set_file_stream(i, NULL);
+
+ Cyg_libc_stdio_files::unlock();
+
+ return 0;
+
+} // fclose()
+
+// EOF fclose.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/feof.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/feof.cxx
new file mode 100644
index 0000000000..aa3985a322
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/feof.cxx
@@ -0,0 +1,92 @@
+//========================================================================
+//
+// feof.cxx
+//
+// Implementations of ISO C feof(), ferror(), clearerr() functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2001-03-16
+// Purpose: Implementations of ISO C feof(), ferror(), clearerr()
+// functions
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <stdio.h> // Header for this file
+#include <cyg/libc/stdio/stream.hxx> // Cyg_StdioStream class
+
+externC int
+feof( FILE *stream ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+
+ return (real_stream->get_eof_state() != 0);
+} // feof()
+
+externC int
+ferror( FILE *stream ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+
+ return (real_stream->get_error() != 0);
+} // ferror()
+
+externC void
+clearerr( FILE *stream ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+
+ real_stream->set_error(0);
+ real_stream->set_eof_state(false);
+} // clearerr()
+
+
+
+// EOF feof.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/fflush.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/fflush.cxx
new file mode 100644
index 0000000000..5ee83c48ab
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/fflush.cxx
@@ -0,0 +1,151 @@
+//========================================================================
+//
+// fflush.cxx
+//
+// Implementation of C library file flush function as per ANSI 7.9.5.2
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose: Provides ISO C fflush() function
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <errno.h> // Error codes
+#include <stdio.h> // header for fflush()
+#include <cyg/libc/stdio/stream.hxx>// C library streams
+#include <cyg/libc/stdio/stdiofiles.hxx> // C library files
+#include <cyg/libc/stdio/stdiosupp.hxx> // support for stdio
+
+// FUNCTIONS
+
+// flush all but one stream
+externC Cyg_ErrNo
+cyg_libc_stdio_flush_all_but( Cyg_StdioStream *not_this_stream )
+{
+ cyg_bool files_flushed[FOPEN_MAX] = { false }; // sets all to 0
+ cyg_bool loop_again, looped = false;
+ cyg_ucount32 i;
+ Cyg_ErrNo err=ENOERR;
+ Cyg_StdioStream *stream;
+
+ do {
+ loop_again = false;
+
+ for (i=0; (i<FOPEN_MAX) && !err; i++) {
+ if (files_flushed[i] == false) {
+
+ stream = Cyg_libc_stdio_files::get_file_stream(i);
+
+ if ((stream == NULL) || (stream == not_this_stream)) {
+ // if it isn't a valid stream, set its entry in the
+ // list of files flushed since we don't want to
+ // flush it
+ // Ditto if its the one we're meant to miss
+
+ files_flushed[i] = true;
+ } // if
+ else {
+ // valid stream
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ // only buffers which we've written to need flushing
+ if ( !stream->flags.last_buffer_op_was_read)
+#endif
+ {
+ // we try to flush the first time through so that
+ // everything is flushed that can be flushed.
+ // The second time through we should just wait
+ // in case some other lowerpri thread has locked the
+ // stream, otherwise we will spin needlessly and
+ // never let the lower pri thread run!
+ if ( (looped && stream->lock_me()) ||
+ stream->trylock_me() ) {
+ err = stream->flush_output_unlocked();
+ stream->unlock_me();
+ files_flushed[i] = true;
+ } // if
+ else {
+ loop_again = true;
+ looped = true;
+ }
+ }
+ } // else
+ } // if
+ } // for
+ } // do
+ while(loop_again && !err);
+
+ return err;
+} // cyg_libc_stdio_flush_all_but()
+
+externC int
+fflush( FILE *stream ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+ Cyg_ErrNo err;
+
+ if (stream == NULL) { // tells us to flush ALL streams
+ err = cyg_libc_stdio_flush_all_but(NULL);
+ } // if
+ else {
+ err = real_stream->flush_output();
+ } // else
+
+ if (err) {
+ errno = err;
+ return EOF;
+ } // if
+
+ return 0;
+
+} // fflush()
+
+// EOF fflush.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/fileops.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/fileops.cxx
new file mode 100644
index 0000000000..cc6db6f052
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/fileops.cxx
@@ -0,0 +1,251 @@
+/*========================================================================
+//
+// fileops.cxx
+//
+// Implementation of ISO C rename(),remove(),tmpnam(),tmpfile() functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2004 eCosCentric Ltd.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2004-02-30
+// Purpose: Implementation of ISO C rename(),remove(),tmpnam(),tmpfile()
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//======================================================================*/
+
+// CONFIGURATION
+
+#include <pkgconf/system.h>
+#include <pkgconf/isoinfra.h>
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_ass.h> // Common assertion functions
+#include <cyg/infra/cyg_trac.h> // Common tracing functions
+#include <stdio.h> // Header for this file
+#include <errno.h> // errno
+#ifdef CYGPKG_LIBC_STDIO_FILEIO // unix-y functions, e.g. stat,rmdir,unlink,...
+# include <unistd.h>
+# include <fcntl.h>
+# include <sys/stat.h>
+#endif
+#include <cyg/libc/stdio/io.hxx> // I/O definitions
+#ifdef CYGPKG_POSIX
+# include <pkgconf/posix.h>
+# include <cyg/posix/export.h>
+#endif
+
+#if defined(CYGINT_ISO_EXIT) && (CYGINT_ISO_EXIT+0)
+# include <stdlib.h> // used by tmpfile() for atexit()
+#endif
+
+// DEFINES
+
+#ifdef CYGPKG_POSIX
+# define CYG_STDIO_FUNCTION_START() CYG_POSIX_FUNCTION_START()
+# define CYG_STDIO_FUNCTION_FINISH() CYG_POSIX_FUNCTION_FINISH()
+#else
+# define CYG_STDIO_FUNCTION_START() CYG_EMPTY_STATEMENT
+# define CYG_STDIO_FUNCTION_FINISH() CYG_EMPTY_STATEMENT
+#endif
+
+// Handle entry
+#define STDIO_ENTRY() \
+ CYG_REPORT_FUNCTYPE( "returning %d" ); \
+ CYG_STDIO_FUNCTION_START(); \
+
+#define STDIO_RETURN(err) \
+CYG_MACRO_START \
+ int __retval = 0; \
+ CYG_STDIO_FUNCTION_FINISH(); \
+ if( err != 0 ) __retval = -1, errno = err; \
+ CYG_REPORT_RETVAL( __retval ); \
+ return __retval; \
+CYG_MACRO_END
+
+#define STDIO_RETURN_VALUE(val) \
+CYG_MACRO_START \
+ CYG_STDIO_FUNCTION_FINISH(); \
+ CYG_REPORT_RETVAL( val ); \
+ return val; \
+CYG_MACRO_END
+
+// FUNCTIONS
+
+///////////////////////////////////////////////////////////////////////////
+// remove()
+
+__externC int remove( const char *path ) __THROW
+{
+ int ret;
+ STDIO_ENTRY();
+ CYG_CHECK_DATA_PTR( path, "path pointer invalid" );
+
+#ifdef CYGPKG_LIBC_STDIO_FILEIO
+ struct stat sbuf;
+ ret = stat( path, &sbuf );
+
+ if (0 == ret)
+ {
+ if ( S_ISDIR(sbuf.st_mode) )
+ {
+ ret = rmdir( path );
+ } else {
+ ret = unlink( path );
+ }
+ }
+#else // !defined(CYGPKG_LIBC_STDIO_FILEIO)
+ ret = ENOSYS;
+#endif
+ STDIO_RETURN(ret);
+} // remove()
+
+///////////////////////////////////////////////////////////////////////////
+// rename()
+//
+// The File I/O package supplies its own complete version of this, so we
+// only implement a dummy here.
+
+#ifndef CYGPKG_LIBC_STDIO_FILEIO
+__externC int rename( const char *oldname, const char *newname ) __THROW
+{
+ STDIO_ENTRY();
+ CYG_CHECK_DATA_PTR(oldname, "oldname pointer invalid");
+ CYG_CHECK_DATA_PTR(newname, "newname pointer invalid");
+ STDIO_RETURN(ENOSYS);
+}
+#endif // ifndef CYGPKG_LIBC_STDIO_FILEIO
+
+///////////////////////////////////////////////////////////////////////////
+// tmpnam()
+
+__externC char *tmpnam( char *s ) __THROW
+{
+ STDIO_ENTRY();
+ static char staticbuf[ L_tmpnam ];
+#if (TMP_MAX < 256)
+ typedef cyg_uint8 counttype;
+#elif (TMP_MAX < 65536)
+ typedef cyg_uint16 counttype;
+#else
+ typedef cyg_ucount32 counttype;
+#endif
+ static counttype count;
+ counttype totaliters=0;
+ int i;
+
+ if ( NULL != s )
+ CYG_CHECK_DATA_PTR( s, "supplied string pointer invalid" );
+ else
+ s = staticbuf;
+
+ // start off by making it "tmp00000" etc. so we can fill backwards
+ // from end without spaces
+ s[0] = 't'; s[1] = 'm'; s[2] = 'p';
+
+ while (totaliters < TMP_MAX)
+ {
+ for (i=3; i < (L_tmpnam-1); i++)
+ {
+ s[i] = '0';
+ }
+ s[i] = '\0';
+
+ counttype counttmp = count;
+ for (i=(L_tmpnam-1); i>2; i--)
+ {
+ const char tohex[] = "0123456789abcdef";
+ s[i] = tohex[counttmp & 0xf];
+ counttmp = counttmp >> 4;
+ }
+ count++;
+ count %= TMP_MAX; // cycle round
+ totaliters++;
+
+ // s now points to a name candidate
+#ifdef CYGPKG_LIBC_STDIO_FILEIO
+ int fd = open( s, O_RDONLY );
+ if (fd >= 0)
+ close(fd);
+ else if ( ENOENT == errno ) // we have a winner
+ break;
+#else
+ break; // no real filesystem, so just go with what we've come up with
+#endif
+ }
+
+ if ( totaliters == TMP_MAX ) // oops, looped right the way round
+ s = NULL;
+
+ STDIO_RETURN_VALUE( s );
+} // tmpnam()
+
+///////////////////////////////////////////////////////////////////////////
+// tmpfile()
+
+__externC FILE *tmpfile( void ) __THROW
+{
+ FILE *f;
+ char fname[L_tmpnam];
+ char *s;
+
+ STDIO_ENTRY();
+
+ s = tmpnam( fname );
+ if ( s == NULL)
+ f = NULL;
+ else
+ {
+ // fname is now a valid name to use
+ f = fopen( fname, "wb+" );
+#ifdef CYGPKG_LIBC_STDIO_FILEIO
+ // We can use remove which should mean the file is removed on program
+ // exit.We ignore the return code though - the standard seems to
+ // indicate that the return status from this function is solely
+ // dictated by whether the file could be created.
+ if (f)
+ remove( fname );
+#endif
+ }
+
+ STDIO_RETURN_VALUE( f );
+} // tmpfile()
+
+///////////////////////////////////////////////////////////////////////////
+// EOF fileops.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/fopen.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/fopen.cxx
new file mode 100644
index 0000000000..e097f7f3ff
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/fopen.cxx
@@ -0,0 +1,270 @@
+//===========================================================================
+//
+// fopen.cxx
+//
+// Implementation of C library file open function as per ANSI 7.9.5.3
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose: Implements ISO C fopen() function
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <errno.h> // Error codes
+#include <stdio.h> // header for fopen()
+#include <stdlib.h> // malloc()
+#include <string.h> // strncmp() and strcmp()
+#include <cyg/libc/stdio/stdiofiles.hxx> // C library files
+#include <cyg/libc/stdio/stream.hxx> // C library streams
+
+#include <cyg/libc/stdio/io.inl> // I/O system inlines
+
+// FUNCTIONS
+
+// placement new
+inline void *operator new(size_t size, void *ptr)
+{
+ CYG_CHECK_DATA_PTR( ptr, "Bad pointer" );
+ return ptr;
+}
+
+// process the mode string. Return true on error
+static cyg_bool
+process_mode( const char *mode, Cyg_StdioStream::OpenMode *rw,
+ cyg_bool *binary, cyg_bool *append )
+{
+ *binary = *append = false; // default
+
+ switch (mode[0]) {
+ case 'r':
+ *rw = Cyg_StdioStream::CYG_STREAM_READ;
+ break;
+
+ case 'a':
+ *append = true;
+ case 'w':
+ *rw = Cyg_StdioStream::CYG_STREAM_WRITE;
+ break;
+
+ default:
+ return true;
+ } // switch
+
+ // ANSI says additional characters may follow the sequences, that we
+ // don't necessarily recognise so we just ignore them, and pretend that
+ // its the end of the string
+
+ switch (mode[1]) {
+ case 'b':
+ *binary = true;
+ break;
+ case '+':
+ if (mode[0] == 'r')
+ *rw = Cyg_StdioStream::CYG_STREAM_READWRITE_NOCREATE;
+ else
+ *rw = Cyg_StdioStream::CYG_STREAM_READWRITE_CREATE;
+ break;
+ default:
+ return false;
+ } // switch
+
+ switch (mode[2]) {
+ case 'b':
+ *binary = true;
+ break;
+ case '+':
+ if (mode[0] == 'r')
+ *rw = Cyg_StdioStream::CYG_STREAM_READWRITE_NOCREATE;
+ else
+ *rw = Cyg_StdioStream::CYG_STREAM_READWRITE_CREATE;
+ break;
+ default:
+ return false;
+ } // switch
+
+ return false;
+} // process_mode()
+
+
+static FILE *fopen_inner( cyg_stdio_handle_t dev,
+ Cyg_StdioStream::OpenMode open_mode,
+ cyg_bool binary,
+ cyg_bool append)
+{
+ Cyg_StdioStream *curr_stream;
+ int i;
+ Cyg_ErrNo err;
+ int bufmode = _IOFBF;
+ cyg_ucount32 bufsize = BUFSIZ;
+
+ Cyg_libc_stdio_files::lock();
+
+ // find an empty slot
+ for (i=0; i < FOPEN_MAX; i++) {
+ curr_stream = Cyg_libc_stdio_files::get_file_stream(i);
+ if (curr_stream == NULL)
+ break;
+ } // for
+
+ if (i == FOPEN_MAX) { // didn't find an empty slot
+ errno = EMFILE;
+ cyg_stdio_close( dev );
+ Cyg_libc_stdio_files::unlock();
+ return NULL;
+ } // if
+
+ // Decide the buffering mode. The default is fully buffered, but if
+ // this is an interactive stream then set it to non buffered.
+ if( (dev != CYG_STDIO_HANDLE_NULL) &&
+ cyg_stdio_interactive( dev ) )
+ bufmode = _IONBF, bufsize = 0;
+
+ // Allocate it some memory and construct it.
+ curr_stream = (Cyg_StdioStream *)malloc(sizeof(*curr_stream));
+ if (curr_stream == NULL) {
+ cyg_stdio_close( dev );
+ Cyg_libc_stdio_files::unlock();
+ errno = ENOMEM;
+ return NULL;
+ } // if
+
+ curr_stream = new ((void *)curr_stream) Cyg_StdioStream( dev, open_mode,
+ append, binary,
+ bufmode, bufsize );
+ // it puts any error in its own error flag
+ if (( err=curr_stream->get_error() )) {
+
+ Cyg_libc_stdio_files::unlock();
+
+ free( curr_stream );
+
+ cyg_stdio_close( dev );
+
+ errno = err;
+
+ return NULL;
+
+ } // if
+
+ Cyg_libc_stdio_files::set_file_stream(i, curr_stream);
+
+ Cyg_libc_stdio_files::unlock();
+
+ return (FILE *)(curr_stream);
+
+} // fopen_inner()
+
+externC FILE *
+fopen( const char *filename, const char *mode ) __THROW
+{
+ cyg_stdio_handle_t dev = 0;
+ Cyg_ErrNo err;
+ Cyg_StdioStream::OpenMode open_mode = Cyg_StdioStream::CYG_STREAM_READ;
+ cyg_bool binary, append;
+
+ // process_mode returns true on error
+ if (process_mode( mode, &open_mode, &binary, &append )) {
+ errno = EINVAL;
+ return NULL;
+ } // if
+
+ err = cyg_stdio_open( filename, open_mode, binary, append, &dev );
+
+ // if not found
+ if (err != ENOERR) {
+ errno = ENOENT;
+ return NULL;
+ } // if
+
+ return fopen_inner( dev, open_mode, binary, append );
+
+} // fopen()
+
+
+#ifdef CYGFUN_LIBC_STDIO_OPEN_POSIX_FDFUNCS
+
+externC int fileno( FILE *stream ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+
+ return real_stream->get_dev();
+}
+
+externC FILE *fdopen( int fd, const char *mode ) __THROW
+{
+ Cyg_StdioStream::OpenMode open_mode;
+ cyg_bool binary, append;
+ FILE *f;
+
+ // process_mode returns true on error
+ if (process_mode( mode, &open_mode, &binary, &append )) {
+ errno = EINVAL;
+ return NULL;
+ } // if
+
+ f = fopen_inner( (cyg_stdio_handle_t)fd, open_mode, binary, append );
+
+ if( f == NULL )
+ return f;
+
+ // Do a null seek to initialize the file position.
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)f;
+ fpos_t pos = 0;
+ real_stream->set_position( pos, SEEK_CUR );
+ return f;
+}
+
+#endif // def CYGFUN_LIBC_STDIO_OPEN_POSIX_FDFUNCS
+
+
+// EOF fopen.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/freopen.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/freopen.cxx
new file mode 100644
index 0000000000..34a83d4b82
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/freopen.cxx
@@ -0,0 +1,79 @@
+//========================================================================
+//
+// freopen.cxx
+//
+// Implementation of C library freopen() function
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose: Provides ISO C freopen() function
+// Description: Implementation of C library freopen() function as per
+// ISO C standard chap. 7.9.5.4
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// We only want freopen() if we have fopen()
+#if defined(CYGPKG_LIBC_STDIO_OPEN)
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for freopen()
+
+// FUNCTIONS
+
+
+externC FILE *
+freopen( const char *, const char *, FILE * ) __THROW
+{
+ return NULL; // Returning NULL is valid! FIXME
+} // freopen()
+
+#endif // defined(CYGPKG_LIBC_STDIO_OPEN)
+
+// EOF freopen.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/fseek.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/fseek.cxx
new file mode 100644
index 0000000000..2b2dfb41cd
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/fseek.cxx
@@ -0,0 +1,167 @@
+//===========================================================================
+//
+// fseek.cxx
+//
+// Implementation of C library file positioning functions as per ANSI 7.9.9
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors:
+// Date: 2000-07-12
+// Purpose: Implements ISO C file positioning functions
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <stddef.h> // NULL and size_t from compiler
+#include <errno.h> // Error codes
+#include <stdio.h> // header for fseek() etc.
+#include <cyg/libc/stdio/stdiofiles.hxx> // C library files
+#include <cyg/libc/stdio/stream.hxx> // C library streams
+
+//========================================================================
+
+// ISO C 7.9.9 File positioning functions
+
+externC int
+fgetpos( FILE * stream , fpos_t *pos ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+ Cyg_ErrNo err;
+ int ret = 0;
+
+ CYG_REPORT_FUNCNAME( "fgetpos" );
+
+ err = real_stream->get_position( pos );
+
+ if( err != ENOERR )
+ {
+ errno = err;
+ ret = -1;
+ }
+
+ CYG_REPORT_RETVAL( ret );
+ return ret;
+}
+
+externC int
+fseek( FILE * stream , long int offset , int whence ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+ Cyg_ErrNo err;
+ int ret = 0;
+
+ CYG_REPORT_FUNCNAME( "fgetpos" );
+
+ err = real_stream->set_position( (fpos_t)offset, whence );
+
+ if( err != ENOERR )
+ {
+ errno = err;
+ ret = -1;
+ }
+
+ CYG_REPORT_RETVAL( ret );
+ return ret;
+}
+
+externC int
+fsetpos( FILE * stream , const fpos_t * pos ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+ Cyg_ErrNo err;
+ int ret = 0;
+
+ CYG_REPORT_FUNCNAME( "fgetpos" );
+
+ err = real_stream->set_position( *pos, SEEK_SET );
+
+ if( err != ENOERR )
+ {
+ errno = err;
+ ret = -1;
+ }
+
+ CYG_REPORT_RETVAL( ret );
+ return ret;
+}
+
+externC long int
+ftell( FILE * stream ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+ Cyg_ErrNo err;
+ long int ret = 0;
+ fpos_t pos;
+
+ CYG_REPORT_FUNCNAME( "ftell" );
+
+ err = real_stream->get_position( &pos );
+
+ if( err != ENOERR )
+ {
+ errno = err;
+ ret = -1;
+ }
+ else ret = pos;
+
+ CYG_REPORT_RETVAL( ret );
+ return ret;
+}
+
+externC void
+rewind( FILE * stream ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+ (void)fseek( stream, 0L, SEEK_SET );
+
+ real_stream->set_error( ENOERR );
+}
+
+
+// EOF fseek.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/setvbuf.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/setvbuf.cxx
new file mode 100644
index 0000000000..36c3883210
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/setvbuf.cxx
@@ -0,0 +1,129 @@
+//===========================================================================
+//
+// setvbuf.cxx
+//
+// Implementation of C library buffering setup as per ANSI 7.9.5.6
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <errno.h> // Error codes
+#include <stdio.h> // header for setvbuf()
+#include <cyg/libc/stdio/stream.hxx>// C libray streams
+
+// FUNCTIONS
+
+
+externC int
+setvbuf( FILE *stream, char *buf, int mode, size_t size ) __THROW
+{
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+ Cyg_ErrNo err;
+
+#ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+ if ( !real_stream->lock_me() ) {
+ errno = EBADF;
+ return EBADF;
+ } // if
+#endif
+
+ err = real_stream->io_buf.set_buffer( (cyg_ucount32) size,
+ (cyg_uint8 *) buf );
+ if (!err) {
+ switch (mode) {
+ case _IONBF:
+ CYG_ASSERT( (size == 0) && (buf == NULL),
+ "No buffering wanted but size/address specified!" );
+ real_stream->flags.buffering = false;
+ real_stream->flags.line_buffering = false;
+ break;
+ case _IOLBF:
+ real_stream->flags.buffering = true;
+ real_stream->flags.line_buffering = true;
+ break;
+ case _IOFBF:
+ real_stream->flags.buffering = true;
+ real_stream->flags.line_buffering = false;
+ break;
+ default:
+ err = EINVAL;
+ break;
+ } // switch
+ } // if
+
+#ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+ real_stream->unlock_me();
+#endif
+
+ if (err) {
+ errno = err;
+ return err;
+ } // if
+
+ return 0;
+
+#else // ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+
+ errno = ENOSUPP;
+ return ENOSUPP;
+
+#endif // ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+
+} // setvbuf()
+
+// EOF setvbuf.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/snprintf.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/snprintf.cxx
new file mode 100644
index 0000000000..2f2cdd2b35
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/snprintf.cxx
@@ -0,0 +1,81 @@
+//===========================================================================
+//
+// snprintf.cxx
+//
+// ANSI Stdio snprintf() function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+
+// FUNCTIONS
+
+externC int
+snprintf( char *s, size_t size, const char *format, ... ) __THROW
+{
+ int rc; // return code
+ va_list ap; // for variable args
+
+ va_start(ap, format); // init specifying last non-var arg
+
+ rc = vsnprintf(s, size, format, ap);
+
+ va_end(ap); // end var args
+
+ return rc;
+} // snprintf()
+
+// EOF snprintf.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/sprintf.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/sprintf.cxx
new file mode 100644
index 0000000000..177ef49380
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/sprintf.cxx
@@ -0,0 +1,82 @@
+//===========================================================================
+//
+// sprintf.cxx
+//
+// ANSI Stdio sprintf() function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+#include <limits.h> // INT_MAX
+
+// FUNCTIONS
+
+externC int
+sprintf( char *s, const char *format, ... ) __THROW
+{
+ int rc; // return code
+ va_list ap; // for variable args
+
+ va_start(ap, format); // init specifying last non-var arg
+
+ rc = vsnprintf(s, INT_MAX, format, ap);
+
+ va_end(ap); // end var args
+
+ return rc;
+} // sprintf()
+
+// EOF sprintf.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/sscanf.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/sscanf.cxx
new file mode 100644
index 0000000000..6107891831
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/sscanf.cxx
@@ -0,0 +1,81 @@
+//===========================================================================
+//
+// sscanf.cxx
+//
+// ANSI Stdio sscanf() function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+
+// FUNCTIONS
+
+externC int
+sscanf( const char *s, const char *format, ... ) __THROW
+{
+ int rc; // return code
+ va_list ap; // for variable args
+
+ va_start(ap, format); // init specifying last non-var arg
+
+ rc = vsscanf(s, format, ap);
+
+ va_end(ap); // end var args
+
+ return rc;
+} // sscanf()
+
+// EOF sscanf.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stderr.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stderr.cxx
new file mode 100644
index 0000000000..107790e555
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stderr.cxx
@@ -0,0 +1,110 @@
+//========================================================================
+//
+// stderr.cxx
+//
+// Initialization of stderr stream for ISO C library
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose: Initialization of stderr stream for ISO C library
+// Description: We put all this in a separate file in the hope that if
+// no-one uses stderr, then it is not included in the image
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// Don't let us get the stream definitions of stdin/out/err from stdio.h
+// since we are going to break the type safety :-(
+#define CYGPRI_LIBC_STDIO_NO_DEFAULT_STREAMS
+
+// And we don't need the stdio inlines, which will otherwise complain if
+// stdin/out/err are not available
+#ifdef CYGIMP_LIBC_STDIO_INLINES
+# undef CYGIMP_LIBC_STDIO_INLINES
+#endif
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/libc/stdio/stream.hxx> // Cyg_StdioStream class
+#include <cyg/libc/stdio/stdiofiles.hxx> // C library files
+#include <cyg/libc/stdio/stdiosupp.hxx> // Cyg_libc_stdio_find_filename()
+
+// CONSTANTS
+
+// add 2 to the priority to allow it to be the fd 2 if necessary
+#define PRIO (CYG_INIT_LIBC+2)
+
+// STATICS
+
+Cyg_StdioStream
+cyg_libc_stdio_stderr CYGBLD_ATTRIB_INIT_PRI(PRIO) = Cyg_StdioStream(
+ Cyg_libc_stdio_find_filename(CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE,
+ Cyg_StdioStream::CYG_STREAM_WRITE,
+ false, false),
+ Cyg_StdioStream::CYG_STREAM_WRITE, false, false, _IONBF, 0, NULL );
+
+// CLASSES
+
+// This is a dummy class just so we can execute arbitrary code when
+// stderr is requested
+
+class cyg_libc_dummy_stderr_init_class {
+public:
+ cyg_libc_dummy_stderr_init_class(void) {
+ Cyg_libc_stdio_files::set_file_stream(2, &cyg_libc_stdio_stderr);
+ }
+};
+
+// And here's an instance of the class just to make the code run
+static cyg_libc_dummy_stderr_init_class cyg_libc_dummy_stderr_init
+ CYGBLD_ATTRIB_INIT_PRI(PRIO);
+
+// and finally stderr itself
+__externC Cyg_StdioStream * const stderr;
+Cyg_StdioStream * const stderr=&cyg_libc_stdio_stderr;
+
+// EOF stderr.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdin.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdin.cxx
new file mode 100644
index 0000000000..210f4b0c15
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdin.cxx
@@ -0,0 +1,110 @@
+//========================================================================
+//
+// stdin.cxx
+//
+// Initialization of stdin stream for ISO C library
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose: Initialization of stdin stream for ISO C library
+// Description: We put all this in a separate file in the hope that if
+// no-one uses stdin, then it is not included in the image
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// Don't let us get the stream definitions of stdin/out/err from stdio.h
+// since we are going to break the type safety :-(
+#define CYGPRI_LIBC_STDIO_NO_DEFAULT_STREAMS
+
+// And we don't need the stdio inlines, which will otherwise complain if
+// stdin/out/err are not available
+#ifdef CYGIMP_LIBC_STDIO_INLINES
+# undef CYGIMP_LIBC_STDIO_INLINES
+#endif
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/libc/stdio/stream.hxx> // Cyg_StdioStream class
+#include <cyg/libc/stdio/stdiofiles.hxx> // C library files
+#include <cyg/libc/stdio/stdiosupp.hxx> // Cyg_libc_stdio_find_filename()
+
+// CONSTANTS
+
+// Use default libc priority to allow it to be the fd 0 if necessary
+#define PRIO (CYG_INIT_LIBC)
+
+// STATICS
+
+Cyg_StdioStream
+cyg_libc_stdio_stdin CYGBLD_ATTRIB_INIT_PRI(PRIO) = Cyg_StdioStream(
+ Cyg_libc_stdio_find_filename(CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE,
+ Cyg_StdioStream::CYG_STREAM_READ, false, false),
+ Cyg_StdioStream::CYG_STREAM_READ, false, false, _IOLBF );
+
+
+// CLASSES
+
+// This is a dummy class just so we can execute arbitrary code when
+// stdin is requested
+
+class cyg_libc_dummy_stdin_init_class {
+public:
+ cyg_libc_dummy_stdin_init_class(void) {
+ Cyg_libc_stdio_files::set_file_stream(0, &cyg_libc_stdio_stdin);
+ }
+};
+
+// And here's an instance of the class just to make the code run
+static cyg_libc_dummy_stdin_init_class cyg_libc_dummy_stdin_init
+ CYGBLD_ATTRIB_INIT_PRI(PRIO);
+
+// and finally stdin itself
+__externC Cyg_StdioStream * const stdin;
+Cyg_StdioStream * const stdin=&cyg_libc_stdio_stdin;
+
+// EOF stdin.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdiofiles.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdiofiles.cxx
new file mode 100644
index 0000000000..125256103e
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdiofiles.cxx
@@ -0,0 +1,82 @@
+//========================================================================
+//
+// stdiofiles.cxx
+//
+// ISO C library stdio central file data
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose: Allocate storage for central file data object
+// Description: This file allocates the actual objects used by the
+// Cyg_libc_stdio_files class defined in
+// <cyg/libc/stdio/stdiofiles.hxx>
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // C library configuration
+
+// INCLUDES
+
+#include <stddef.h> // NULL
+#include <cyg/libc/stdio/stream.hxx> // Cyg_StdioStream
+#include <cyg/libc/stdio/stdiofiles.hxx> // Class definition for
+ // Cyg_libc_stdio_files
+
+#ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+# include <cyg/infra/cyg_type.h> // CYGBLD_ATTRIB_INIT_PRI
+# include <cyg/kernel/mutex.hxx> // mutexes
+#endif
+
+
+// GLOBAL VARIABLES
+
+Cyg_StdioStream *Cyg_libc_stdio_files::files[FOPEN_MAX] = { NULL };
+
+# ifdef CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
+Cyg_Mutex Cyg_libc_stdio_files::files_lock
+ CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_LIBC);
+# endif
+
+// EOF stdiofiles.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdioinlines.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdioinlines.cxx
new file mode 100644
index 0000000000..ecc0d764ea
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdioinlines.cxx
@@ -0,0 +1,164 @@
+//===========================================================================
+//
+// stdioinlines.cxx
+//
+// ANSI standard I/O routines - real alternatives for inlined functions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+// We don't want the inline versions of stdio functions defined here
+
+#ifdef CYGIMP_LIBC_STDIO_INLINES
+#undef CYGIMP_LIBC_STDIO_INLINES
+#endif
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdarg.h> // va_list
+#include <stdio.h> // Header for this file
+#include <errno.h> // Definition of error codes and errno
+#include <string.h> // Definition of strerror() for perror()
+#include <limits.h> // INT_MAX
+
+
+// FUNCTIONS
+
+//===========================================================================
+
+// 7.9.5 File access functions
+
+externC void
+setbuf( FILE *stream, char *buf ) __THROW
+{
+ if (buf == NULL)
+ setvbuf( stream, NULL, _IONBF, 0 );
+ else
+ // NB: Should use full buffering by default ordinarily, but in
+ // the current system we're always connected to an interactive
+ // terminal, so use line buffering
+ setvbuf( stream, buf, _IOLBF, BUFSIZ );
+
+} // setbuf()
+
+//===========================================================================
+
+// 7.9.6 Formatted input/output functions
+
+
+externC int
+vfprintf( FILE *stream, const char *format, va_list arg ) __THROW
+{
+ return vfnprintf(stream, INT_MAX, format, arg);
+} // vfprintf()
+
+
+externC int
+vprintf( const char *format, va_list arg) __THROW
+{
+ return vfnprintf( stdout, INT_MAX, format, arg );
+} // vprintf()
+
+
+externC int
+vsprintf( char *s, const char *format, va_list arg ) __THROW
+{
+ return vsnprintf(s, INT_MAX, format, arg);
+} // vsprintf()
+
+
+//===========================================================================
+
+// 7.9.7 Character input/output functions
+
+externC int
+puts( const char *s ) __THROW
+{
+ int rc;
+
+ rc = fputs( s, stdout );
+
+ if (rc >= 0)
+ rc = fputc('\n', stdout );
+
+ return rc;
+} // puts()
+
+
+//===========================================================================
+
+// 7.9.10 Error-handling functions
+
+externC void
+perror( const char *s ) __THROW
+{
+ if (s && *s)
+ fprintf( stderr, "%s: %s\n", s, strerror(errno) );
+ else
+ fputs( strerror(errno), stderr );
+
+} // perror()
+
+//===========================================================================
+
+// Other non-ANSI functions
+
+#ifdef CYGFUN_LIBC_STDIO_ungetc
+externC int
+vscanf( const char *format, va_list arg ) __THROW
+{
+ return vfscanf( stdin, format, arg );
+} // vscanf()
+#endif
+
+// EOF stdioinlines.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdiosupp.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdiosupp.cxx
new file mode 100644
index 0000000000..54f9cf5bc9
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdiosupp.cxx
@@ -0,0 +1,83 @@
+//===========================================================================
+//
+// stdiosupp.cxx
+//
+// Helper C library functions for standard I/O
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <cyg/libc/stdio/io.hxx> // I/O system
+#include <cyg/libc/stdio/stdiosupp.hxx> // Header for this file
+
+#include <cyg/libc/stdio/io.inl> // I/O system inlines
+
+//externC void cyg_io_init(void);
+
+cyg_stdio_handle_t
+Cyg_libc_stdio_find_filename( const char *filename,
+ const Cyg_StdioStream::OpenMode rw,
+ const cyg_bool binary,
+ const cyg_bool append )
+{
+ cyg_stdio_handle_t dev = CYG_STDIO_HANDLE_NULL;
+
+ cyg_stdio_open(filename, rw, binary, append, &dev);
+
+ return dev;
+} // Cyg_libc_stdio_find_filename()
+
+
+// EOF stdiosupp.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdout.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdout.cxx
new file mode 100644
index 0000000000..67af5667a9
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stdout.cxx
@@ -0,0 +1,110 @@
+//========================================================================
+//
+// stdout.cxx
+//
+// Initialization of stdout stream for ISO C library
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose: Initialization of stdout stream for ISO C library
+// Description: We put all this in a separate file in the hope that if
+// no-one uses stdout, then it is not included in the image
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// Don't let us get the stream definitions of stdin/out/err from stdio.h
+// since we are going to break the type safety :-(
+#define CYGPRI_LIBC_STDIO_NO_DEFAULT_STREAMS
+
+// And we don't need the stdio inlines, which will otherwise complain if
+// stdin/out/err are not available
+#ifdef CYGIMP_LIBC_STDIO_INLINES
+# undef CYGIMP_LIBC_STDIO_INLINES
+#endif
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/libc/stdio/stream.hxx> // Cyg_StdioStream class
+#include <cyg/libc/stdio/stdiofiles.hxx> // C library files
+#include <cyg/libc/stdio/stdiosupp.hxx> // Cyg_libc_stdio_find_filename()
+
+// CONSTANTS
+
+// add 1 to the priority to allow it to be the fd 1 if necessary
+#define PRIO (CYG_INIT_LIBC+1)
+
+// STATICS
+
+Cyg_StdioStream
+cyg_libc_stdio_stdout CYGBLD_ATTRIB_INIT_PRI(PRIO) = Cyg_StdioStream(
+ Cyg_libc_stdio_find_filename(CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE,
+ Cyg_StdioStream::CYG_STREAM_WRITE,
+ false, false),
+ Cyg_StdioStream::CYG_STREAM_WRITE, false, false, _IOLBF );
+
+// CLASSES
+
+// This is a dummy class just so we can execute arbitrary code when
+// stdout is requested
+
+class cyg_libc_dummy_stdout_init_class {
+public:
+ cyg_libc_dummy_stdout_init_class(void) {
+ Cyg_libc_stdio_files::set_file_stream(1, &cyg_libc_stdio_stdout);
+ }
+};
+
+// And here's an instance of the class just to make the code run
+static cyg_libc_dummy_stdout_init_class cyg_libc_dummy_stdout_init
+ CYGBLD_ATTRIB_INIT_PRI(PRIO);
+
+// and finally stdout itself
+__externC Cyg_StdioStream * const stdout;
+Cyg_StdioStream * const stdout=&cyg_libc_stdio_stdout;
+
+// EOF stdout.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stream.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stream.cxx
new file mode 100644
index 0000000000..42891a2827
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/stream.cxx
@@ -0,0 +1,711 @@
+//========================================================================
+//
+// stream.cxx
+//
+// Implementations of internal C library stdio stream functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <cyg/infra/cyg_ass.h> // Assertion infrastructure
+#include <stddef.h> // NULL and size_t from compiler
+#include <errno.h> // Error codes
+#include <string.h> // memcpy() and memset()
+#include <cyg/libc/stdio/stream.hxx> // Header for this file
+#include <cyg/libc/stdio/stdiosupp.hxx> // Stdio support functions
+
+
+#include <cyg/libc/stdio/io.inl> // I/O system inlines
+
+
+// FUNCTIONS
+
+Cyg_StdioStream::Cyg_StdioStream(cyg_stdio_handle_t dev,
+ OpenMode open_mode,
+ cyg_bool append, cyg_bool binary,
+ int buffer_mode, cyg_ucount32 buffer_size,
+ cyg_uint8 *buffer_addr )
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ : io_buf( buffer_size, buffer_addr )
+#endif
+{
+ initialize( dev, open_mode, append, binary, buffer_mode,
+ buffer_size, buffer_addr);
+}
+
+void Cyg_StdioStream::initialize(cyg_stdio_handle_t dev,
+ OpenMode open_mode,
+ cyg_bool append, cyg_bool binary,
+ int buffer_mode, cyg_ucount32 buffer_size,
+ cyg_uint8 *buffer_addr )
+{
+
+#ifdef CYGDBG_USE_ASSERTS
+ magic_validity_word = 0xbadbad;
+#endif
+
+ my_device = dev;
+
+ // Clear all flags
+ memset( &flags, 0, sizeof(flags) );
+
+ switch (open_mode) {
+ case CYG_STREAM_READ:
+ flags.opened_for_read = true;
+ break;
+ case CYG_STREAM_WRITE:
+ flags.opened_for_write = true;
+ break;
+ case CYG_STREAM_READWRITE_NOCREATE:
+ case CYG_STREAM_READWRITE_CREATE:
+ flags.opened_for_read = true;
+ flags.opened_for_write = true;
+ break;
+ default:
+ error=EINVAL;
+ return;
+ } // switch
+
+
+ if (flags.opened_for_write) {
+#if 0
+ // FIXME: need some replacement for this
+ if (!my_device->write_blocking) {
+ error = EDEVNOSUPP;
+ return;
+ } // if
+#endif
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ flags.last_buffer_op_was_read = false;
+#endif
+ } // if
+
+
+ if (flags.opened_for_read) {
+#if 0
+ // FIXME: need some replacement for this
+ if (!my_device->read_blocking) {
+ error = EDEVNOSUPP;
+ return;
+ } // if
+#endif
+
+ // NB also if opened for read AND write, then say last op was read
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ flags.last_buffer_op_was_read = true;
+#endif
+ } // if
+
+ flags.binary = binary ? 1 : 0;
+
+ error = ENOERR;
+
+ // in due course we would do an equivalent to fseek(...,0, SEEK_END);
+ // when appending. for now, there's nothing, except set eof
+
+ flags.at_eof = append ? 1 : 0;
+
+ position = 0;
+
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+
+ switch (buffer_mode) {
+ case _IONBF:
+ CYG_ASSERT( (buffer_size == 0) && (buffer_addr == NULL),
+ "No buffering wanted but size/address specified!" );
+ flags.buffering = flags.line_buffering = false;
+ break;
+ case _IOLBF:
+ flags.buffering = true;
+ flags.line_buffering = true;
+ break;
+ case _IOFBF:
+ flags.buffering = true;
+ flags.line_buffering = false;
+ break;
+ default:
+ error = EINVAL;
+ return;
+ } // switch
+
+ // one way of checking the buffer was set up correctly
+ if (flags.buffering && io_buf.get_buffer_size()==-1) {
+ error = ENOMEM;
+ return;
+ }
+
+#endif
+
+#if 0 // FIXME - Need to set binary mode.
+ if (my_device->open) {
+ error = (*my_device->open)( my_device->cookie,
+ binary ? CYG_DEVICE_OPEN_MODE_RAW
+ : CYG_DEVICE_OPEN_MODE_TEXT );
+ if (error != ENOERR)
+ return; // keep error code the same
+ } // if
+
+#endif
+
+#ifdef CYGDBG_USE_ASSERTS
+ magic_validity_word = 0x7b4321ce;
+#endif
+
+} // Cyg_StdioStream constructor
+
+
+Cyg_StdioStream::Cyg_StdioStream( OpenMode open_mode,
+ cyg_ucount32 buffer_size,
+ cyg_uint8 *buffer_addr )
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ : io_buf( buffer_size, buffer_addr )
+#endif
+{
+ initialize( CYG_STDIO_HANDLE_NULL, open_mode, false, false, _IOFBF,
+ buffer_size, buffer_addr );
+
+ if( error != ENOERR )
+ return;
+
+ switch( open_mode )
+ {
+ case CYG_STREAM_READ:
+ // Fix up the stream so it looks like the buffer contents has just
+ // been read in.
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ io_buf.set_bytes_written( buffer_size );
+#endif
+ break;
+
+ case CYG_STREAM_WRITE:
+ // Fix up the stream so it looks like the buffer is ready to accept
+ // new data.
+ break;
+
+ default:
+ error = EINVAL;
+ return;
+ }
+}
+
+
+Cyg_ErrNo
+Cyg_StdioStream::refill_read_buffer( void )
+{
+ Cyg_ErrNo read_err;
+ cyg_uint8 *buffer;
+ cyg_uint32 len;
+
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+ if (!lock_me())
+ return EBADF; // assume file is now invalid
+
+ // first just check that we _can_ read this device!
+ if (!flags.opened_for_read) {
+ unlock_me();
+ return EINVAL;
+ }
+
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ // If there is pending output to write, then this will check and
+ // write it
+ if (flags.buffering) {
+ read_err = flush_output_unlocked();
+
+ // we're now reading
+ flags.last_buffer_op_was_read = true;
+
+ // flush ALL streams
+ if (read_err == ENOERR)
+ read_err = cyg_libc_stdio_flush_all_but(this);
+
+ if (read_err != ENOERR) {
+ unlock_me();
+ return read_err;
+ } // if
+
+ len = io_buf.get_buffer_addr_to_write( (cyg_uint8**)&buffer );
+ if (!len) { // no buffer space available
+ unlock_me();
+ return ENOERR; // isn't an error, just needs user to read out data
+ } // if
+ }
+ else
+#endif
+
+ if (!flags.readbuf_char_in_use) {
+ len = 1;
+ buffer = &readbuf_char;
+ }
+ else {
+ // no buffer space available
+ unlock_me();
+ return ENOERR; // isn't an error, just needs user to read out data
+ } // else
+
+ read_err = cyg_stdio_read(my_device, buffer, &len);
+
+
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ if (flags.buffering)
+ io_buf.set_bytes_written( len );
+ else
+#endif
+ flags.readbuf_char_in_use = len ? 1 : 0;
+
+ unlock_me();
+
+ if (read_err == ENOERR) {
+ if (len == 0) {
+ read_err = EAGAIN;
+ flags.at_eof = true;
+ }
+ else
+ flags.at_eof = false;
+ } // if
+
+ return read_err;
+} // refill_read_buffer()
+
+
+Cyg_ErrNo
+Cyg_StdioStream::read( cyg_uint8 *user_buffer, cyg_ucount32 buffer_length,
+ cyg_ucount32 *bytes_read )
+{
+ Cyg_ErrNo read_err=ENOERR;
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+ *bytes_read = 0;
+
+ if (!lock_me())
+ return EBADF; // assume file is now invalid
+
+ if (!flags.opened_for_read) {
+ unlock_me();
+ return EINVAL;
+ }
+
+#ifdef CYGFUN_LIBC_STDIO_ungetc
+ if (flags.unread_char_buf_in_use && buffer_length) {
+ *user_buffer++ = unread_char_buf;
+ ++*bytes_read;
+ flags.unread_char_buf_in_use = false;
+ --buffer_length;
+ } // if
+
+#endif // ifdef CYGFUN_LIBC_STDIO_ungetc
+
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ if (flags.buffering) {
+
+ // need to flush output if we were writing before
+ if (!flags.last_buffer_op_was_read) {
+ Cyg_ErrNo err = flush_output_unlocked();
+
+ if (ENOERR != err) {
+ unlock_me();
+ return err;
+ }
+ }
+
+ cyg_uint8 *buff_to_read_from;
+ cyg_ucount32 bytes_available;
+
+ bytes_available = io_buf.get_buffer_addr_to_read(
+ (cyg_uint8 **)&buff_to_read_from );
+
+ cyg_ucount32 count =
+ (bytes_available < buffer_length) ? bytes_available : buffer_length;
+
+ if (count) {
+ memcpy( user_buffer, buff_to_read_from, count );
+ io_buf.set_bytes_read( count );
+ *bytes_read += count;
+ } // if
+
+ } // if
+ else
+
+#endif
+
+ if (flags.readbuf_char_in_use && buffer_length) {
+ *user_buffer = readbuf_char;
+ *bytes_read = 1;
+ flags.readbuf_char_in_use = false;
+ }
+
+ position += *bytes_read;
+
+
+ // if we are unbuffered, we read as much as we can directly from the
+ // file system at this point.
+ //
+ // unless we do this, we could end up reading byte-by-byte from the filing system
+ // due to the readbuf_char scheme.
+ if (
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ !flags.buffering &&
+#endif
+ (*bytes_read<buffer_length)) {
+ cyg_uint32 len;
+ len=buffer_length-*bytes_read;
+ read_err = cyg_stdio_read(my_device, user_buffer + *bytes_read, &len);
+ *bytes_read+=len;
+ }
+
+ unlock_me();
+
+ return read_err;
+} // read()
+
+
+Cyg_ErrNo
+Cyg_StdioStream::read_byte( cyg_uint8 *c )
+{
+ Cyg_ErrNo err=ENOERR;
+
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+ if (!lock_me())
+ return EBADF; // assume file is now invalid
+
+ if (!flags.opened_for_read) {
+ unlock_me();
+ return EINVAL;
+ }
+
+# ifdef CYGFUN_LIBC_STDIO_ungetc
+ if (flags.unread_char_buf_in_use) {
+ *c = unread_char_buf;
+ flags.unread_char_buf_in_use = false;
+ position++;
+ unlock_me();
+ return ENOERR;
+ } // if
+# endif // ifdef CYGFUN_LIBC_STDIO_ungetc
+
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ if (flags.buffering) {
+ // need to flush output if we were writing before
+ if (!flags.last_buffer_op_was_read)
+ err = flush_output_unlocked();
+
+ if (ENOERR != err) {
+ unlock_me();
+ return err;
+ }
+
+ cyg_uint8 *buff_to_read_from;
+ cyg_ucount32 bytes_available;
+
+ bytes_available=io_buf.get_buffer_addr_to_read(&buff_to_read_from);
+
+ if (bytes_available) {
+ *c = *buff_to_read_from;
+ io_buf.set_bytes_read(1);
+ position++;
+ }
+ else
+ err = EAGAIN;
+ } // if
+ else
+
+#endif
+
+
+ if (flags.readbuf_char_in_use) {
+ *c = readbuf_char;
+ flags.readbuf_char_in_use = false;
+ position++;
+ }
+ else
+ err = EAGAIN;
+
+ unlock_me();
+
+ return err;
+} // read_byte()
+
+
+Cyg_ErrNo
+Cyg_StdioStream::peek_byte( cyg_uint8 *c )
+{
+ Cyg_ErrNo err=ENOERR;
+
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+ if (!lock_me())
+ return EBADF; // assume file is now invalid
+
+ if (!flags.opened_for_read) {
+ unlock_me();
+ return EINVAL;
+ }
+
+ // this should really only be called after refill_read_buffer, but just
+ // in case
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ if (flags.buffering)
+ err = flush_output_unlocked();
+
+ if (err != ENOERR)
+ return err;
+
+ // we're now reading
+ flags.last_buffer_op_was_read = true;
+#endif
+
+# ifdef CYGFUN_LIBC_STDIO_ungetc
+ if (flags.unread_char_buf_in_use) {
+ *c = unread_char_buf;
+ unlock_me();
+ return ENOERR;
+ } // if
+# endif // ifdef CYGFUN_LIBC_STDIO_ungetc
+
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ if (flags.buffering) {
+ cyg_uint8 *buff_to_read_from;
+ cyg_ucount32 bytes_available;
+
+ bytes_available=io_buf.get_buffer_addr_to_read(&buff_to_read_from);
+
+ if (bytes_available) {
+ *c = *buff_to_read_from;
+ }
+ else
+ err = EAGAIN;
+ } // if
+ else
+
+#endif
+
+
+ if (flags.readbuf_char_in_use) {
+ *c = readbuf_char;
+ }
+ else
+ err = EAGAIN;
+
+ unlock_me();
+
+ return err;
+} // peek_byte()
+
+
+Cyg_ErrNo
+Cyg_StdioStream::flush_output_unlocked( void )
+{
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ Cyg_ErrNo write_err=ENOERR;
+ cyg_uint8 *buffer;
+ cyg_uint32 len;
+
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+ if ( flags.last_buffer_op_was_read )
+ return ENOERR;
+
+ // first just check that we _can_ write to the device!
+ if ( !flags.opened_for_write )
+ return EINVAL;
+
+ // shortcut if nothing to do
+ if (io_buf.get_buffer_space_used() == 0)
+ return ENOERR;
+
+ len = io_buf.get_buffer_addr_to_read( (cyg_uint8 **)&buffer );
+
+ CYG_ASSERT( len > 0,
+ "There should be data to read but there isn't!");
+
+ write_err = cyg_stdio_write(my_device, buffer, &len);
+
+ // since we're doing a concerted flush, we tell the I/O layer to
+ // flush too, otherwise output may just sit there forever
+ if (!write_err)
+ cyg_stdio_flush( my_device );
+
+ // we've just read it all, so just wipe it out
+ io_buf.drain_buffer();
+
+ return write_err;
+
+#else // ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+ return ENOERR;
+
+#endif // ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+} // flush_output_unlocked()
+
+
+
+Cyg_ErrNo
+Cyg_StdioStream::write( const cyg_uint8 *buffer,
+ cyg_ucount32 buffer_length,
+ cyg_ucount32 *bytes_written )
+{
+ Cyg_ErrNo write_err = ENOERR;
+
+ CYG_ASSERTCLASS( this, "Stream object is not a valid stream!" );
+
+ *bytes_written = 0;
+
+ if (!lock_me())
+ return EBADF; // assume file is now invalid
+
+ // first just check that we _can_ write to the device!
+ if ( !flags.opened_for_write ) {
+ unlock_me();
+ return EINVAL;
+ }
+
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ if (flags.last_buffer_op_was_read == true)
+ io_buf.drain_buffer(); // nuke input bytes to prevent confusion
+
+ flags.last_buffer_op_was_read = false;
+
+ if (!flags.buffering) {
+#endif
+ cyg_uint32 len = buffer_length;
+
+ write_err = cyg_stdio_write(my_device, buffer, &len);
+
+ *bytes_written = len;
+
+#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+ } // if
+ else {
+ cyg_ucount32 bytes_available;
+ cyg_ucount32 bytes_to_write;
+ cyg_ucount32 newline_pos;
+ cyg_uint8 *write_addr;
+ cyg_bool must_flush = false;
+
+ while ( buffer_length > 0 ) {
+ bytes_available =
+ io_buf.get_buffer_addr_to_write( &write_addr );
+
+ // we need to flush if we've no room or the buffer has an up
+ // and coming newline
+ if ( !bytes_available || must_flush ) {
+ write_err = flush_output_unlocked();
+
+ // harmless even if there was an error
+ bytes_available =
+ io_buf.get_buffer_addr_to_write( &write_addr );
+
+ CYG_ASSERT( bytes_available > 0,
+ "Help! still no bytes available in "
+ "write buffer" );
+ } // if
+
+ if (write_err) {
+ unlock_me();
+ return write_err;
+ } // if
+
+ // choose the lower of the buffer available and the length
+ // to write
+ bytes_to_write=(bytes_available < buffer_length)
+ ? bytes_available
+ : buffer_length;
+
+ // if we're line buffered, we may want want to flush if there's
+ // a newline character, so lets find out
+
+ if (flags.line_buffering) {
+ for (newline_pos=0;
+ newline_pos<bytes_to_write;
+ newline_pos++) {
+ if (buffer[newline_pos] == '\n') {
+ break;
+ } // if
+ } // for
+ // if we didn't reach the end
+ if (newline_pos != bytes_to_write) {
+ // shrink bytes_to_write down to the bit we need to
+ // flush including the newline itself
+ bytes_to_write = newline_pos + 1;
+ must_flush = true;
+ } // if
+ } // if
+
+ memcpy( write_addr, buffer, bytes_to_write );
+
+ *bytes_written += bytes_to_write;
+ buffer += bytes_to_write;
+ buffer_length -= bytes_to_write;
+ io_buf.set_bytes_written( bytes_to_write );
+
+ position += bytes_to_write;
+
+ } // while
+
+ if ( must_flush ) {
+ write_err = flush_output_unlocked();
+ } // if
+ } // else
+#endif // ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
+
+ unlock_me();
+
+ return write_err;
+} // write()
+
+// EOF stream.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/streambuf.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/streambuf.cxx
new file mode 100644
index 0000000000..9c0a2bab01
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/streambuf.cxx
@@ -0,0 +1,141 @@
+//===========================================================================
+//
+// streambuf.cxx
+//
+// C library stdio stream buffer functions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// Include buffered I/O?
+#if defined(CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO)
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <errno.h> // Cyg_ErrNo
+#include <stdlib.h> // malloc() and free()
+#include <cyg/libc/stdio/streambuf.hxx> // header for this file, just in case
+
+// FUNCTIONS
+
+Cyg_ErrNo
+Cyg_StdioStreamBuffer::set_buffer( cyg_ucount32 size,
+ cyg_uint8 *new_buffer )
+{
+
+#ifdef CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF
+
+ // user-supplied buffer?
+ if (new_buffer != NULL) {
+ CYG_CHECK_DATA_PTR(new_buffer, "new_buffer not valid");
+#ifdef CYGSEM_LIBC_STDIO_SETVBUF_MALLOC
+ // first check if we were responsible for the old buffer
+ if (call_free) {
+ free(buffer_bottom);
+ call_free = false;
+ }
+#endif
+ buffer_bottom = new_buffer;
+ }
+#ifdef CYGSEM_LIBC_STDIO_SETVBUF_MALLOC
+ else if ( size != buffer_size ) { // as long as its different from
+ // what we've got now
+ cyg_uint8 *malloced_buf;
+
+ malloced_buf = (cyg_uint8 * )malloc( size );
+ if (malloced_buf == NULL)
+ return ENOMEM;
+
+ // should the old buffer be freed? This waits till after we know
+ // whether the malloc succeeded
+ if (call_free)
+ free( buffer_bottom );
+
+ buffer_bottom = malloced_buf;
+
+ call_free=true;
+
+ } // else if
+#else
+ // Here we have not been given a new buffer, but have been given
+ // a new buffer size. If possible, we just shrink what we already
+ // have.
+ else if( size > buffer_size )
+ return EINVAL;
+#endif
+
+#else // ifdef CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF
+
+ // In this config we can't use a different buffer, or set a
+ // size greater than now. We can pretend to shrink it though
+
+ // Note on the next line we compare it with the size of static_buffer
+ // and not the current size, as that's what is the limiting factor
+ if ( (new_buffer != NULL) || (size > sizeof(static_buffer)) )
+ return EINVAL;
+
+#endif // ifdef CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF
+
+ buffer_top = current_buffer_position = &buffer_bottom[0];
+ buffer_size = size;
+
+ return ENOERR;
+
+} // set_buffer()
+
+
+#endif // if defined(CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO)
+
+
+// EOF streambuf.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/ungetc.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/ungetc.cxx
new file mode 100644
index 0000000000..3b0e97a13c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/ungetc.cxx
@@ -0,0 +1,94 @@
+//===========================================================================
+//
+// ungetc.cxx
+//
+// ANSI Stdio ungetc() function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+#include <errno.h> // error codes
+#include <cyg/libc/stdio/stream.hxx> // Cyg_StdioStream
+
+
+// FUNCTIONS
+
+externC int
+ungetc( int c, FILE *stream ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+ Cyg_ErrNo err;
+ cyg_uint8 real_c;
+
+ if (c == EOF)
+ return EOF;
+
+ real_c = (cyg_uint8) c;
+
+ err = real_stream->unread_byte( real_c );
+
+ if (err)
+ {
+ errno = err;
+ return EOF;
+ } // if
+
+
+ return (int)real_c;
+
+} // ungetc()
+
+// EOF ungetc.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/vsnprintf.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/vsnprintf.cxx
new file mode 100644
index 0000000000..34c75c9946
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/vsnprintf.cxx
@@ -0,0 +1,154 @@
+//===========================================================================
+//
+// vsnprintf.cxx
+//
+// ANSI Stdio vsnprintf() function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+#include <errno.h> // error codes
+#include <cyg/io/devtab.h> // Device table
+#include <cyg/libc/stdio/stream.hxx>// Cyg_StdioStream
+
+#include <cyg/libc/stdio/io.inl> // I/O system inlines
+
+#ifndef CYGPKG_LIBC_STDIO_FILEIO
+
+// FUNCTIONS
+
+static Cyg_ErrNo
+str_write(cyg_stdio_handle_t handle, const void *buf, cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *dev = (cyg_devtab_entry_t *)handle;
+ cyg_uint8 **str_p = (cyg_uint8 **)dev->priv;
+ cyg_ucount32 i;
+
+ // I suspect most strings passed to vsnprintf will be relatively short,
+ // so we just take the simple approach rather than have the overhead
+ // of calling memcpy etc.
+
+ // simply copy string until we run out of user space
+
+ for (i = 0; i < *len; i++, (*str_p)++ )
+ {
+ **str_p = *((cyg_uint8 *)buf + i);
+ } // for
+
+ *len = i;
+
+ return ENOERR;
+
+} // str_write()
+
+static DEVIO_TABLE(devio_table,
+ str_write, // write
+ NULL, // read
+ NULL, // select
+ NULL, // get_config
+ NULL); // set_config
+
+externC int
+vsnprintf( char *s, size_t size, const char *format, va_list arg ) __THROW
+{
+ int rc;
+ // construct a fake device with the address of the string we've
+ // been passed as its private data. This way we can use the data
+ // directly
+ DEVTAB_ENTRY_NO_INIT(strdev,
+ "strdev", // Name
+ NULL, // Dependent name (layered device)
+ &devio_table, // I/O function table
+ NULL, // Init
+ NULL, // Lookup
+ &s); // private
+ Cyg_StdioStream my_stream( &strdev, Cyg_StdioStream::CYG_STREAM_WRITE,
+ false, false, _IONBF, 0, NULL );
+
+ rc = vfnprintf( (FILE *)&my_stream, size, format, arg );
+
+ // Null-terminate it, but note that s has been changed by str_write(), so
+ // that it now points to the end of the string
+ // NSc: should not write if size is 0.
+ if (size != 0)
+ s[0] = '\0';
+
+ return rc;
+
+} // vsnprintf()
+
+#else
+
+externC int
+vsnprintf( char *s, size_t size, const char *format, va_list arg ) __THROW
+{
+ int rc;
+
+ Cyg_StdioStream my_stream( Cyg_StdioStream::CYG_STREAM_WRITE,
+ size, (cyg_uint8 *)s );
+
+ rc = vfnprintf( (FILE *)&my_stream, size, format, arg );
+
+ if( rc > 0 )
+ s[rc] = '\0';
+
+ return rc;
+
+} // vsnprintf()
+
+#endif
+
+// EOF vsnprintf.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/common/vsscanf.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/vsscanf.cxx
new file mode 100644
index 0000000000..a0c4cafe4c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/common/vsscanf.cxx
@@ -0,0 +1,155 @@
+//===========================================================================
+//
+// vsscanf.cxx
+//
+// ANSI Stdio vsscanf() function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+#include <errno.h> // error codes
+#include <cyg/io/devtab.h> // Device table
+#include <cyg/libc/stdio/stream.hxx>// Cyg_StdioStream
+
+#include <cyg/libc/stdio/io.inl> // I/O system inlines
+
+#ifndef CYGPKG_LIBC_STDIO_FILEIO
+
+// FUNCTIONS
+
+static Cyg_ErrNo
+str_read(cyg_stdio_handle_t handle, void *buf, cyg_uint32 *len)
+{
+ cyg_devtab_entry_t *dev = (cyg_devtab_entry_t *)handle;
+ cyg_uint8 *str_p = (cyg_uint8 *)dev->priv;
+ cyg_ucount32 i;
+
+ // we set str_p to NULL further down when the string has finished being
+ // read
+ if (str_p == NULL)
+ {
+ *len = 0;
+ return ENOERR;
+ } // if
+
+ // I suspect most strings passed to sprintf will be relatively short,
+ // so we just take the simple approach rather than have the overhead
+ // of calling memcpy etc.
+
+ // copy string until run out of user space, or we reach its end
+ for (i = 0; i < *len ; ++i)
+ {
+ *((cyg_uint8 *)buf + i) = *str_p;
+
+ if (*str_p++ == '\0')
+ {
+ str_p = NULL;
+ ++i;
+ break;
+ } // if
+
+ } // for
+
+ *len = i;
+ dev->priv = (void *)str_p;
+
+ return ENOERR;
+
+} // str_read()
+
+static DEVIO_TABLE(devio_table,
+ NULL, // write
+ str_read, // read
+ NULL, // select
+ NULL, // get_config
+ NULL); // set_config
+
+
+externC int
+vsscanf( const char *s, const char *format, va_list arg ) __THROW
+{
+ // construct a fake device with the address of the string we've
+ // been passed as its private data. This way we can use the data
+ // directly
+ DEVTAB_ENTRY_NO_INIT(strdev,
+ "strdev", // Name
+ NULL, // Dependent name (layered device)
+ &devio_table, // I/O function table
+ NULL, // Init
+ NULL, // Lookup
+ (void *)s); // private
+ Cyg_StdioStream my_stream( &strdev, Cyg_StdioStream::CYG_STREAM_READ,
+ false, false, _IONBF, 0, NULL );
+
+ return vfscanf( (FILE *)&my_stream, format, arg );
+
+} // vsscanf()
+
+#else
+
+externC int
+vsscanf( const char *s, const char *format, va_list arg ) __THROW
+{
+ Cyg_StdioStream my_stream( Cyg_StdioStream::CYG_STREAM_READ,
+ strlen(s), (cyg_uint8 *)s );
+
+ return vfscanf( (FILE *)&my_stream, format, arg );
+
+} // vsscanf()
+
+#endif
+
+// EOF vsscanf.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/input/fgetc.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/input/fgetc.cxx
new file mode 100644
index 0000000000..14b4343f8c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/input/fgetc.cxx
@@ -0,0 +1,131 @@
+//===========================================================================
+//
+// fgetc.cxx
+//
+// ISO C standard I/O get character functions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose: Provide the fgetc() function. Also provides the function
+// version of getc() and getchar()
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <cyg/infra/cyg_ass.h> // Standard eCos assertion support
+#include <cyg/infra/cyg_trac.h> // Standard eCos tracing support
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+#include <errno.h> // error codes
+#include <cyg/libc/stdio/stream.hxx>// Cyg_StdioStream
+
+// FUNCTIONS
+
+externC int
+fgetc( FILE *stream ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+ cyg_ucount32 bytes_read;
+ Cyg_ErrNo err;
+ cyg_uint8 c;
+
+ CYG_REPORT_FUNCNAMETYPE("fgetc", "returning char %d");
+ CYG_REPORT_FUNCARG1XV( stream );
+
+ CYG_CHECK_DATA_PTR( stream, "stream is not a valid pointer" );
+
+ err = real_stream->read( &c, 1, &bytes_read );
+
+ // Why do we need this? Because the buffer might be empty.
+ if (!err && !bytes_read) { // if no err, but nothing to read, try again
+ err = real_stream->refill_read_buffer();
+ if ( !err )
+ err = real_stream->read( &c, 1, &bytes_read );
+ } // if
+
+ CYG_ASSERT( (ENOERR != err) || (1 == bytes_read), "Didn't read 1 byte!" );
+
+ if (err)
+ {
+ if ( EAGAIN != err ) {
+ real_stream->set_error( err );
+ errno = err;
+ }
+ CYG_REPORT_RETVAL(EOF);
+ return EOF;
+ } // if
+
+ CYG_REPORT_RETVAL((int)c);
+ return (int)c;
+
+} // fgetc()
+
+
+// Also define getc() even though it can be a macro.
+// Undefine it first though
+#undef getchar
+
+externC int
+getchar( void ) __THROW
+{
+ return fgetc( stdin );
+} // getchar()
+
+
+// EXPORTED SYMBOLS
+
+// Also define getc() even though it can be a macro.
+// Undefine it first though
+#undef getc
+
+externC int
+getc( FILE * ) __THROW CYGBLD_ATTRIB_WEAK_ALIAS(fgetc);
+
+// EOF fgetc.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/input/fgets.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/input/fgets.cxx
new file mode 100644
index 0000000000..36465e17eb
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/input/fgets.cxx
@@ -0,0 +1,126 @@
+//========================================================================
+//
+// fgets.cxx
+//
+// ISO C standard I/O fgets() function
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2001-03-14
+// Purpose: Implementation of ISO C standard I/O fgets() function
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//=======================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+#include <errno.h> // error codes
+#include <cyg/libc/stdio/stream.hxx>// Cyg_StdioStream
+
+// FUNCTIONS
+
+// FIXME: should be reworked to read buffer at a time, and scan that
+// for newlines, rather than reading byte at a time.
+
+externC char *
+fgets( char *s, int n, FILE *stream ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+ Cyg_ErrNo err=ENOERR;
+ cyg_uint8 c;
+ cyg_uint8 *str=(cyg_uint8 *)s;
+ int nch;
+
+ CYG_CHECK_DATA_PTRC( s );
+ CYG_CHECK_DATA_PTRC( stream );
+ CYG_PRECONDITION( n > 0, "requested 0 or negative chars");
+
+ CYG_REPORT_FUNCTYPE( "returning string %08x");
+ CYG_REPORT_FUNCARG3( "s=%08x, n=%d, stream=%08x", s, n, stream );
+
+ for (nch=1; nch < n; nch++) {
+ err = real_stream->read_byte( &c );
+
+ // if nothing to read, try again ONCE after refilling buffer
+ if (EAGAIN == err) {
+ err = real_stream->refill_read_buffer();
+ if ( !err )
+ err = real_stream->read_byte( &c );
+
+ if (EAGAIN == err) {
+ if (1 == nch) { // indicates EOF at start
+ CYG_REPORT_RETVAL( NULL );
+ return NULL;
+ } else
+ break; // EOF
+ } // if
+ } // if
+
+ *str++ = c;
+ if ('\n' == c)
+ break;
+ } // while
+
+ *str = '\0'; // NULL terminate it
+
+ if (err && EAGAIN != err) {
+ real_stream->set_error( err );
+ errno = err;
+ CYG_REPORT_RETVAL( NULL );
+ return NULL;
+ } // if
+
+ CYG_REPORT_RETVAL( s );
+ return s;
+
+} // fgets()
+
+// EOF fgets.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/input/fread.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/input/fread.cxx
new file mode 100644
index 0000000000..a3eb1cad62
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/input/fread.cxx
@@ -0,0 +1,125 @@
+//========================================================================
+//
+// fread.cxx
+//
+// ANSI Stdio fread() function
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//=======================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+#include <errno.h> // error codes
+#include <cyg/libc/stdio/stream.hxx>// Cyg_StdioStream
+
+// FUNCTIONS
+
+externC size_t
+fread( void *ptr, size_t object_size, size_t num_objects, FILE *stream ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+ cyg_ucount32 bytes_read;
+ cyg_ucount32 bytes_to_read;
+ cyg_ucount32 total_read;
+ Cyg_ErrNo err;
+ cyg_uint8 *ptrc = (cyg_uint8 *)ptr;
+
+
+ CYG_REPORT_FUNCNAMETYPE( "fread", "read %d objects" );
+ CYG_REPORT_FUNCARG4( "ptr=%08x, object_size=%d, num_objects=%d, "
+ "stream=%08x", ptr, object_size, num_objects,
+ stream );
+
+ bytes_to_read = object_size*num_objects;
+ total_read = 0;
+
+ if ( !bytes_to_read ) {
+ CYG_REPORT_RETVAL(0);
+ return 0;
+ } // if
+
+ err = real_stream->read( (cyg_uint8 *)ptr, bytes_to_read,
+ &bytes_read );
+ bytes_to_read -= bytes_read;
+ total_read += bytes_read;
+ ptrc += bytes_read;
+
+ while (!err && bytes_to_read) { // if no err, but not finished - get next
+ err = real_stream->refill_read_buffer();
+ if ( !err ) {
+ err = real_stream->read( (cyg_uint8 *)ptrc, bytes_to_read,
+ &bytes_read );
+ bytes_to_read -= bytes_read;
+ total_read += bytes_read;
+ ptrc += bytes_read;
+ } // if
+ } // while
+
+ if (err) {
+ if (err != EAGAIN) {
+ real_stream->set_error( err );
+ errno = err;
+ }
+ } // if
+
+ // we return the number of _objects_ read. Simple division is
+ // sufficient as this returns the quotient rather than rounding
+ CYG_REPORT_RETVAL( bytes_read/object_size );
+ return total_read/object_size;
+
+} // fread()
+
+// EOF fread.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/input/fscanf.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/input/fscanf.cxx
new file mode 100644
index 0000000000..e31bc8ee31
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/input/fscanf.cxx
@@ -0,0 +1,82 @@
+//===========================================================================
+//
+// fscanf.cxx
+//
+// ANSI Stdio fscanf() function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+#include <limits.h> // INT_MAX
+
+// FUNCTIONS
+
+externC int
+fscanf( FILE *stream, const char *format, ... ) __THROW
+{
+ int rc; // return code
+ va_list ap; // for variable args
+
+ va_start(ap, format); // init specifying last non-var arg
+
+ rc = vfscanf( stream, format, ap );
+
+ va_end(ap); // end var args
+
+ return rc;
+} // fscanf()
+
+// EOF fscanf.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/input/gets.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/input/gets.cxx
new file mode 100644
index 0000000000..7305cb2886
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/input/gets.cxx
@@ -0,0 +1,124 @@
+//===========================================================================
+//
+// gets.cxx
+//
+// ISO C standard I/O gets() function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2001-03-15
+// Purpose: Implementation of ISO C standard I/O gets() function
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+#include <errno.h> // error codes
+#include <cyg/libc/stdio/stream.hxx>// Cyg_StdioStream
+
+// FUNCTIONS
+
+// FIXME: should be reworked to read buffer at a time, and scan that
+// for newlines, rather than reading byte at a time.
+
+externC char *
+gets( char *s ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stdin;
+ Cyg_ErrNo err=ENOERR;
+ cyg_uint8 c;
+ cyg_uint8 *str=(cyg_uint8 *)s;
+ int nch;
+
+ CYG_CHECK_DATA_PTRC( s );
+ CYG_CHECK_DATA_PTRC( real_stream );
+
+ CYG_REPORT_FUNCTYPE( "returning string %08x");
+ CYG_REPORT_FUNCARG1( "s=%08x", s );
+
+ for (nch=1;; nch++) {
+ err = real_stream->read_byte( &c );
+
+ // if nothing to read, try again ONCE after refilling buffer
+ if (EAGAIN == err) {
+ err = real_stream->refill_read_buffer();
+ if ( !err )
+ err = real_stream->read_byte( &c );
+
+ if (EAGAIN == err) {
+ if (1 == nch) { // indicates EOF at start
+ CYG_REPORT_RETVAL( NULL );
+ return NULL;
+ } else
+ break; // EOF
+ } // if
+ } // if
+
+ if ('\n' == c) // discard newlines
+ break;
+ *str++ = c;
+ } // while
+
+ *str = '\0'; // NULL terminate it
+
+ if (err && EAGAIN != err) {
+ real_stream->set_error( err );
+ errno = err;
+ CYG_REPORT_RETVAL( NULL );
+ return NULL;
+ } // if
+
+ CYG_REPORT_RETVAL( s );
+ return s;
+} // gets()
+
+// EOF gets.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/input/scanf.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/input/scanf.cxx
new file mode 100644
index 0000000000..24f9940e65
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/input/scanf.cxx
@@ -0,0 +1,82 @@
+//===========================================================================
+//
+// scanf.cxx
+//
+// ANSI Stdio scanf() function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+
+// FUNCTIONS
+
+
+externC int
+scanf( const char *format, ... ) __THROW
+{
+ int rc; // return code
+ va_list ap; // for variable args
+
+ va_start(ap, format); // init specifying last non-var arg
+
+ rc = vfscanf( stdin, format, ap );
+
+ va_end(ap); // end var args
+
+ return rc;
+} // scanf()
+
+// EOF scanf.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/input/vfscanf.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/input/vfscanf.cxx
new file mode 100644
index 0000000000..ab7fcb1fce
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/input/vfscanf.cxx
@@ -0,0 +1,1059 @@
+//========================================================================
+//
+// vfscanf.cxx
+//
+// I/O routines for vfscanf() for use with ANSI C library
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+//
+// This code is based on original code with the following copyright:
+//
+/*
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley. The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+#include <pkgconf/libc_i18n.h> // Configuration header for mb support
+
+// We have to have ungetc for this to work
+#if defined(CYGFUN_LIBC_STDIO_ungetc)
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <stdarg.h> // Variable argument definitions
+#include <stdio.h> // Standard header for all stdio files
+#include <ctype.h> // isspace() and isupper()
+#include <stdlib.h> // standard utility functions e.g. strtol
+#include <cyg/libc/stdio/stream.hxx> // C library streams
+
+#ifdef CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT
+
+#include <float.h>
+
+# define MAXFRACT DBL_DIG
+# define MAXEXP DBL_MAX_10_EXP
+
+# define BUF (MAXEXP+MAXFRACT+3) /* 3 = sign + decimal point + NUL */
+
+#else // ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+
+# define BUF 40
+
+#endif // ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+
+/*
+ * Flags used during conversion.
+ */
+
+#define LONG 0x01 /* l: long or double */
+#define LONGDBL 0x02 /* L: long double */
+#define SHORT 0x04 /* h: short */
+#define SUPPRESS 0x08 /* suppress assignment */
+#define POINTER 0x10 /* weird %p pointer (`fake hex') */
+#define NOSKIP 0x20 /* do not skip blanks */
+
+/*
+ * The following are used in numeric conversions only:
+ * SIGNOK, NDIGITS, DPTOK, and EXPOK are for floating point;
+ * SIGNOK, NDIGITS, PFXOK, and NZDIGITS are for integral.
+ */
+
+#define SIGNOK 0x40 /* +/- is (still) legal */
+#define NDIGITS 0x80 /* no digits detected */
+
+#define DPTOK 0x100 /* (float) decimal point is still legal */
+#define EXPOK 0x200 /* (float) exponent (e+3, etc) still
+ legal */
+
+#define PFXOK 0x100 /* 0x prefix is (still) legal */
+#define NZDIGITS 0x200 /* no zero digits detected */
+
+/*
+ * Conversion types.
+ */
+
+#define CT_CHAR 0 /* %c conversion */
+#define CT_CCL 1 /* %[...] conversion */
+#define CT_STRING 2 /* %s conversion */
+#define CT_INT 3 /* integer, i.e., strtol or strtoul */
+#define CT_FLOAT 4 /* floating, i.e., strtod */
+
+#if 0
+#define u_char unsigned char
+#endif
+#define u_char char
+#define u_long unsigned long
+#define u_long_long unsigned long long
+
+typedef unsigned long (*strtoul_t)(const char *, char **endptr, int base);
+typedef unsigned long long (*strtoull_t)(const char *, char **endptr, int base);
+
+static u_char *
+__sccl (char *tab, u_char *fmt);
+
+
+/*
+ * vfscanf
+ */
+
+#define _CAST_VOID
+
+#define CURR_POS (file->peek_byte( (cyg_uint8 *)&curr_byte),&curr_byte )
+
+#define INC_CURR_POS ( file->read_byte( (cyg_uint8 *)&curr_byte ) )
+
+#define MOVE_CURR_POS(x) (file->set_position( (x), SEEK_CUR ))
+
+#define SPACE_LEFT (file->bytes_available_to_read())
+
+#define REFILL (file->refill_read_buffer())
+
+#define BufferEmpty ( !SPACE_LEFT && \
+ (REFILL, (!SPACE_LEFT)) )
+
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+typedef int (*mbtowc_fn_type)(wchar_t *, const char *, size_t, int *);
+externC mbtowc_fn_type __get_current_locale_mbtowc_fn();
+#endif
+
+externC int
+vfscanf (FILE *fp, const char *fmt0, va_list ap) __THROW
+{
+ u_char *fmt = (u_char *) fmt0;
+ int c; /* character from format, or conversion */
+ wchar_t wc; /* wide character from format */
+ size_t width; /* field width, or 0 */
+ char *p; /* points into all kinds of strings */
+ int n; /* handy integer */
+ int flags; /* flags as defined above */
+ char *p0; /* saves original value of p when necessary */
+ char *lptr; /* literal pointer */
+ int nassigned; /* number of fields assigned */
+ int nread; /* number of characters consumed from fp */
+ int base = 0; /* base argument to strtol/strtoul */
+ int nbytes = 1; /* number of bytes processed */
+
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+ mbtowc_fn_type mbtowc_fn;
+ int state = 0; /* used for mbtowc_fn */
+#endif
+
+ strtoul_t ccfn = NULL; /* conversion function (strtol/strtoul) */
+#ifdef CYGFUN_LIBC_STDIO_LONGLONG
+ strtoull_t ccfnL = NULL; /* conversion function (strtoll/strtoull) */
+ long long *ll;
+#endif
+ char ccltab[256]; /* character class table for %[...] */
+ char buf[BUF]; /* buffer for numeric conversions */
+
+ Cyg_StdioStream *file = (Cyg_StdioStream *)fp;
+ char curr_byte;
+
+ short *sp;
+ int *ip;
+ float *flp;
+ long double *ldp;
+ double *dp;
+ long *lp;
+
+ /* `basefix' is used to avoid `if' tests in the integer scanner */
+ static const short basefix[17] =
+ {10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
+
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+ mbtowc_fn = __get_current_locale_mbtowc_fn();
+#endif
+
+ nassigned = 0;
+ nread = 0;
+ for (;;)
+ {
+#ifndef CYGINT_LIBC_I18N_MB_REQUIRED
+ wc = *fmt;
+#else
+ nbytes = mbtowc_fn (&wc, fmt, MB_CUR_MAX, &state);
+#endif
+ fmt += nbytes;
+
+ if (wc == 0)
+ return nassigned;
+ if (nbytes == 1 && isspace (wc))
+ {
+ for (;;)
+ {
+ if (BufferEmpty)
+ return nassigned;
+ if (!isspace (*CURR_POS))
+ break;
+ nread++, INC_CURR_POS;
+ }
+ continue;
+ }
+ if (wc != '%')
+ goto literal;
+ width = 0;
+ flags = 0;
+
+ /*
+ * switch on the format. continue if done; break once format
+ * type is derived.
+ */
+
+again:
+ c = *fmt++;
+
+ switch (c)
+ {
+ case '%':
+literal:
+ lptr = fmt - nbytes;
+ for (n = 0; n < nbytes; ++n)
+ {
+ if (BufferEmpty)
+ goto input_failure;
+ if (*CURR_POS != *lptr)
+ goto match_failure;
+ INC_CURR_POS;
+ nread++;
+ ++lptr;
+ }
+ continue;
+
+ case '*':
+ flags |= SUPPRESS;
+ goto again;
+ case 'l':
+#ifdef CYGFUN_LIBC_STDIO_LONGLONG
+ // check if we are using long long 'll'
+ if (flags & LONG) {
+ // change to long long
+ flags &= ~LONG;
+ flags |= LONGDBL;
+ }
+ else
+#endif
+ flags |= LONG;
+
+ goto again;
+#ifdef CYGFUN_LIBC_STDIO_LONGLONG
+ case 'L':
+ flags |= LONGDBL;
+ goto again;
+#endif
+ case 'h':
+ flags |= SHORT;
+ goto again;
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ width = width * 10 + c - '0';
+ goto again;
+
+ /*
+ * Conversions. Those marked `compat' are for
+ * 4.[123]BSD compatibility.
+ *
+ * (According to ANSI, E and X formats are supposed to
+ * the same as e and x. Sorry about that.)
+ */
+
+ case 'D': /* compat */
+ flags |= LONG;
+ /* FALLTHROUGH */
+ case 'd':
+ c = CT_INT;
+ ccfn = (strtoul_t)strtol;
+#ifdef CYGFUN_LIBC_STDIO_LONGLONG
+ if (flags & LONGDBL)
+ ccfnL = (strtoull_t)strtoll;
+#endif
+ base = 10;
+ break;
+
+ case 'i':
+ c = CT_INT;
+ ccfn = (strtoul_t)strtol;
+#ifdef CYGFUN_LIBC_STDIO_LONGLONG
+ if (flags & LONGDBL)
+ ccfnL = (strtoull_t)strtoll;
+#endif
+ base = 0;
+ break;
+
+ case 'O': /* compat */
+ flags |= LONG;
+ /* FALLTHROUGH */
+ case 'o':
+ c = CT_INT;
+ ccfn = strtoul;
+#ifdef CYGFUN_LIBC_STDIO_LONGLONG
+ if (flags & LONGDBL)
+ ccfnL = strtoull;
+#endif
+ base = 8;
+ break;
+
+ case 'u':
+ c = CT_INT;
+ ccfn = strtoul;
+#ifdef CYGFUN_LIBC_STDIO_LONGLONG
+ if (flags & LONGDBL)
+ ccfnL = strtoull;
+#endif
+ base = 10;
+ break;
+
+ case 'X': /* compat XXX */
+ case 'x':
+ flags |= PFXOK; /* enable 0x prefixing */
+ c = CT_INT;
+ ccfn = strtoul;
+#ifdef CYGFUN_LIBC_STDIO_LONGLONG
+ if (flags & LONGDBL)
+ ccfnL = strtoull;
+#endif
+ base = 16;
+ break;
+
+ case 'E': /* compat XXX */
+ case 'G': /* compat XXX */
+/* ANSI says that E,G and X behave the same way as e,g,x */
+ /* FALLTHROUGH */
+ case 'e':
+ case 'f':
+ case 'g':
+ c = CT_FLOAT;
+ break;
+
+ case 's':
+ c = CT_STRING;
+ break;
+
+ case '[':
+ fmt = __sccl (ccltab, fmt);
+ flags |= NOSKIP;
+ c = CT_CCL;
+ break;
+
+ case 'c':
+ flags |= NOSKIP;
+ c = CT_CHAR;
+ break;
+
+ case 'p': /* pointer format is like hex */
+ flags |= POINTER | PFXOK;
+ c = CT_INT;
+ ccfn = strtoul;
+ base = 16;
+ break;
+
+ case 'n':
+ if (flags & SUPPRESS) /* ??? */
+ continue;
+ if (flags & SHORT)
+ {
+ sp = va_arg (ap, short *);
+ *sp = nread;
+ }
+ else if (flags & LONG)
+ {
+ lp = va_arg (ap, long *);
+ *lp = nread;
+ }
+ else
+ {
+ ip = va_arg (ap, int *);
+ *ip = nread;
+ }
+ continue;
+
+ /*
+ * Disgusting backwards compatibility hacks. XXX
+ */
+ case '\0': /* compat */
+ return EOF;
+
+ default: /* compat */
+ if (isupper (c))
+ flags |= LONG;
+ c = CT_INT;
+ ccfn = (strtoul_t)strtol;
+ base = 10;
+ break;
+ }
+
+ /*
+ * We have a conversion that requires input.
+ */
+ if (BufferEmpty)
+ goto input_failure;
+
+ /*
+ * Consume leading white space, except for formats that
+ * suppress this.
+ */
+ if ((flags & NOSKIP) == 0)
+ {
+ while (isspace (*CURR_POS))
+ {
+ nread++;
+ INC_CURR_POS;
+ if (SPACE_LEFT == 0)
+#ifndef REDHAT_NEC
+ if (REFILL)
+#endif
+ goto input_failure;
+ }
+ /*
+ * Note that there is at least one character in the
+ * buffer, so conversions that do not set NOSKIP ca
+ * no longer result in an input failure.
+ */
+ }
+
+ /*
+ * Do the conversion.
+ */
+ switch (c)
+ {
+
+ case CT_CHAR:
+ /* scan arbitrary characters (sets NOSKIP) */
+ if (width == 0)
+ width = 1;
+ if (flags & SUPPRESS)
+ {
+ size_t sum = 0;
+
+ for (;;)
+ {
+ if ((n = SPACE_LEFT) < (signed)width)
+ {
+ sum += n;
+ width -= n;
+ MOVE_CURR_POS(n-1);
+ INC_CURR_POS;
+#ifndef REDHAT_NEC
+ if (REFILL)
+ {
+#endif
+ if (sum == 0)
+ goto input_failure;
+ break;
+#ifndef REDHAT_NEC
+ }
+#endif
+ }
+ else
+ {
+ sum += width;
+ MOVE_CURR_POS(width - 1);
+ INC_CURR_POS;
+ break;
+ }
+ }
+ nread += sum;
+ }
+ else
+ {
+ /* Kludge city for the moment */
+ char *dest = va_arg (ap, char *);
+ int n = width;
+ if (SPACE_LEFT == 0)
+#ifndef REDHAT_NEC
+ if (REFILL)
+#endif
+ goto input_failure;
+
+ while (n && !BufferEmpty)
+ {
+ *dest++ = *CURR_POS;
+ INC_CURR_POS;
+ n--;
+ nread++;
+ }
+ nassigned++;
+ }
+ break;
+
+ case CT_CCL:
+ /* scan a (nonempty) character class (sets NOSKIP) */
+ if (width == 0)
+ width = ~0; /* `infinity' */
+ /* take only those things in the class */
+ if (flags & SUPPRESS)
+ {
+ n = 0;
+ while (ccltab[(int)*CURR_POS])
+ {
+ n++, INC_CURR_POS;
+ if (--width == 0)
+ break;
+ if (BufferEmpty)
+ {
+ if (n == 0)
+ goto input_failure;
+ break;
+ }
+ }
+ if (n == 0)
+ goto match_failure;
+ }
+ else
+ {
+ p0 = p = va_arg (ap, char *);
+ while (ccltab[(int)*CURR_POS])
+ {
+ *p++ = *CURR_POS;
+ INC_CURR_POS;
+ if (--width == 0)
+ break;
+ if (BufferEmpty)
+ {
+ if (p == p0)
+ goto input_failure;
+ break;
+ }
+ }
+ n = p - p0;
+ if (n == 0)
+ goto match_failure;
+ *p = 0;
+ nassigned++;
+ }
+ nread += n;
+ break;
+
+ case CT_STRING:
+ /* like CCL, but zero-length string OK, & no NOSKIP */
+ if (width == 0)
+ width = ~0;
+ if (flags & SUPPRESS)
+ {
+ n = 0;
+ while (!isspace (*CURR_POS))
+ {
+ n++, INC_CURR_POS;
+ if (--width == 0)
+ break;
+ if (BufferEmpty)
+ break;
+ }
+ nread += n;
+ }
+ else
+ {
+ p0 = p = va_arg (ap, char *);
+ while (!isspace (*CURR_POS))
+ {
+ *p++ = *CURR_POS;
+ INC_CURR_POS;
+ if (--width == 0)
+ break;
+ if (BufferEmpty)
+ break;
+ }
+ *p = 0;
+ nread += p - p0;
+ nassigned++;
+ }
+ continue;
+
+ case CT_INT:
+ /* scan an integer as if by strtol/strtoul */
+#ifdef hardway
+ if (width == 0 || width > sizeof (buf) - 1)
+ width = sizeof (buf) - 1;
+#else
+ /* size_t is unsigned, hence this optimisation */
+ if (--width > sizeof (buf) - 2)
+ width = sizeof (buf) - 2;
+ width++;
+#endif
+ flags |= SIGNOK | NDIGITS | NZDIGITS;
+ for (p = buf; width; width--)
+ {
+ c = *CURR_POS;
+ /*
+ * Switch on the character; `goto ok' if we
+ * accept it as a part of number.
+ */
+ switch (c)
+ {
+ /*
+ * The digit 0 is always legal, but is special.
+ * For %i conversions, if no digits (zero or nonzero)
+ * have been scanned (only signs), we will have base==0
+ * In that case, we should set it to 8 and enable 0x
+ * prefixing. Also, if we have not scanned zero digits
+ * before this, do not turn off prefixing (someone else
+ * will turn it off if we have scanned any nonzero
+ * digits).
+ */
+ case '0':
+ if (base == 0)
+ {
+ base = 8;
+ flags |= PFXOK;
+ }
+ if (flags & NZDIGITS)
+ flags &= ~(SIGNOK | NZDIGITS | NDIGITS);
+ else
+ flags &= ~(SIGNOK | PFXOK | NDIGITS);
+ goto ok;
+
+ /* 1 through 7 always legal */
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ base = basefix[base];
+ flags &= ~(SIGNOK | PFXOK | NDIGITS);
+ goto ok;
+
+ /* digits 8 and 9 ok iff decimal or hex */
+ case '8':
+ case '9':
+ base = basefix[base];
+ if (base <= 8)
+ break; /* not legal here */
+ flags &= ~(SIGNOK | PFXOK | NDIGITS);
+ goto ok;
+
+ /* letters ok iff hex */
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ /* no need to fix base here */
+ if (base <= 10)
+ break; /* not legal here */
+ flags &= ~(SIGNOK | PFXOK | NDIGITS);
+ goto ok;
+
+ /* sign ok only as first character */
+ case '+':
+ case '-':
+ if (flags & SIGNOK)
+ {
+ flags &= ~SIGNOK;
+ goto ok;
+ }
+ break;
+
+ /* x ok iff flag still set & 2nd char */
+ case 'x':
+ case 'X':
+ if (flags & PFXOK && p == buf + 1)
+ {
+ base = 16;/* if %i */
+ flags &= ~PFXOK;
+ goto ok;
+ }
+ break;
+ }
+
+ /*
+ * If we got here, c is not a legal character
+ * for a number. Stop accumulating digits.
+ */
+ break;
+ ok:
+ /*
+ * c is legal: store it and look at the next.
+ */
+ *p++ = c;
+ INC_CURR_POS;
+ if (SPACE_LEFT == 0)
+#ifndef REDHAT_NEC
+ if (REFILL)
+#endif
+ break; /* EOF */
+ }
+ /*
+ * If we had only a sign, it is no good; push back the sign.
+ * If the number ends in `x', it was [sign] '0' 'x', so push
+ * back the x and treat it as [sign] '0'.
+ */
+ if (flags & NDIGITS)
+ {
+ if (p > buf)
+ _CAST_VOID ungetc (*(u_char *)-- p, fp);
+ goto match_failure;
+ }
+ c = ((u_char *) p)[-1];
+ if (c == 'x' || c == 'X')
+ {
+ --p;
+ /*(void)*/ ungetc (c, fp);
+ }
+ if ((flags & SUPPRESS) == 0)
+ {
+#ifdef CYGFUN_LIBC_STDIO_LONGLONG
+ u_long_long res;
+#else
+ u_long res;
+#endif
+
+ *p = 0;
+
+#ifdef CYGFUN_LIBC_STDIO_LONGLONG
+ if (flags & LONGDBL)
+ res = (*ccfnL) (buf, (char **) NULL, base);
+ else
+#endif
+ res = (*ccfn) (buf, (char **) NULL, base);
+
+ if (flags & POINTER)
+ *(va_arg (ap, char **)) = (char *) (CYG_ADDRESS) res;
+ else if (flags & SHORT)
+ {
+ sp = va_arg (ap, short *);
+ *sp = res;
+ }
+ else if (flags & LONG)
+ {
+ lp = va_arg (ap, long *);
+ *lp = res;
+ }
+#ifdef CYGFUN_LIBC_STDIO_LONGLONG
+ else if (flags & LONGDBL)
+ {
+ ll = va_arg (ap, long long *);
+ *ll = res;
+ }
+#endif
+ else
+ {
+ ip = va_arg (ap, int *);
+ *ip = res;
+ }
+ nassigned++;
+ }
+ nread += p - buf;
+ break;
+
+ case CT_FLOAT:
+ /* scan a floating point number as if by strtod */
+
+#ifdef hardway
+ if (width == 0 || width > sizeof (buf) - 1)
+ width = sizeof (buf) - 1;
+#else
+ /* size_t is unsigned, hence this optimisation */
+ if (--width > sizeof (buf) - 2)
+ width = sizeof (buf) - 2;
+ width++;
+#endif // ifdef hardway
+
+ flags |= SIGNOK | NDIGITS | DPTOK | EXPOK;
+ for (p = buf; width; width--)
+ {
+ c = *CURR_POS;
+ /*
+ * This code mimicks the integer conversion
+ * code, but is much simpler.
+ */
+ switch (c)
+ {
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ flags &= ~(SIGNOK | NDIGITS);
+ goto fok;
+
+ case '+':
+ case '-':
+ if (flags & SIGNOK)
+ {
+ flags &= ~SIGNOK;
+ goto fok;
+ }
+ break;
+ case '.':
+ if (flags & DPTOK)
+ {
+ flags &= ~(SIGNOK | DPTOK);
+ goto fok;
+ }
+ break;
+ case 'e':
+ case 'E':
+ /* no exponent without some digits */
+ if ((flags & (NDIGITS | EXPOK)) == EXPOK)
+ {
+ flags =
+ (flags & ~(EXPOK | DPTOK)) |
+ SIGNOK | NDIGITS;
+ goto fok;
+ }
+ break;
+ }
+ break;
+ fok:
+ *p++ = c;
+ INC_CURR_POS;
+ if (SPACE_LEFT == 0)
+#ifndef REDHAT_NEC
+ if (REFILL)
+#endif
+ break; /* EOF */
+ }
+ /*
+ * If no digits, might be missing exponent digits
+ * (just give back the exponent) or might be missing
+ * regular digits, but had sign and/or decimal point.
+ */
+ if (flags & NDIGITS)
+ {
+ if (flags & EXPOK)
+ {
+ /* no digits at all */
+ while (p > buf)
+ ungetc (*(u_char *)-- p, fp);
+ goto match_failure;
+ }
+ /* just a bad exponent (e and maybe sign) */
+ c = *(u_char *)-- p;
+ if (c != 'e' && c != 'E')
+ {
+ _CAST_VOID ungetc (c, fp); /* sign */
+ c = *(u_char *)-- p;
+ }
+ _CAST_VOID ungetc (c, fp);
+ }
+ if ((flags & SUPPRESS) == 0)
+ {
+ double res;
+ *p = 0;
+#ifdef CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT
+ res = strtod( buf, NULL );
+#else
+ res = 0.0;
+#endif
+ if (flags & LONG)
+ {
+ dp = va_arg (ap, double *);
+ *dp = res;
+ }
+#ifdef CYGFUN_LIBC_STDIO_LONGLONG
+ else if (flags & LONGDBL)
+ {
+ ldp = va_arg (ap, long double *);
+ *ldp = res;
+ }
+#endif
+ else
+ {
+ flp = va_arg (ap, float *);
+ *flp = res;
+ }
+ nassigned++;
+ }
+ nread += p - buf;
+ break;
+ }
+ }
+
+input_failure:
+ return nassigned ? nassigned : -1;
+match_failure:
+ return nassigned;
+} // vfscanf()
+
+/*
+ * Fill in the given table from the scanset at the given format
+ * (just after `['). Return a pointer to the character past the
+ * closing `]'. The table has a 1 wherever characters should be
+ * considered part of the scanset.
+ */
+
+/*static*/
+u_char *
+__sccl (char *tab, u_char *fmt)
+{
+ int c, n, v;
+
+ /* first `clear' the whole table */
+ c = *fmt++; /* first char hat => negated scanset */
+ if (c == '^')
+ {
+ v = 1; /* default => accept */
+ c = *fmt++; /* get new first char */
+ }
+ else
+ v = 0; /* default => reject */
+ /* should probably use memset here */
+ for (n = 0; n < 256; n++)
+ tab[n] = v;
+ if (c == 0)
+ return fmt - 1; /* format ended before closing ] */
+
+ /*
+ * Now set the entries corresponding to the actual scanset to the
+ * opposite of the above.
+ *
+ * The first character may be ']' (or '-') without being special; the
+ * last character may be '-'.
+ */
+
+ v = 1 - v;
+ for (;;)
+ {
+ tab[c] = v; /* take character c */
+ doswitch:
+ n = *fmt++; /* and examine the next */
+ switch (n)
+ {
+
+ case 0: /* format ended too soon */
+ return fmt - 1;
+
+ case '-':
+ /*
+ * A scanset of the form [01+-] is defined as `the digit 0, the
+ * digit 1, the character +, the character -', but the effect
+ * of a scanset such as [a-zA-Z0-9] is implementation defined.
+ * The V7 Unix scanf treats `a-z' as `the letters a through z',
+ * but treats `a-a' as `the letter a, the character -, and the
+ * letter a'.
+ *
+ * For compatibility, the `-' is not considerd to define a
+ * range if the character following it is either a close
+ * bracket (required by ANSI) or is not numerically greater
+ * than the character we just stored in the table (c).
+ */
+ n = *fmt;
+ if (n == ']' || n < c)
+ {
+ c = '-';
+ break; /* resume the for(;;) */
+ }
+ fmt++;
+ do
+ { /* fill in the range */
+ tab[++c] = v;
+ }
+ while (c < n);
+#if 1 /* XXX another disgusting compatibility hack */
+ /*
+ * Alas, the V7 Unix scanf also treats formats such
+ * as [a-c-e] as `the letters a through e'. This too
+ * is permitted by the standard....
+ */
+ goto doswitch;
+#else
+ c = *fmt++;
+ if (c == 0)
+ return fmt - 1;
+ if (c == ']')
+ return fmt;
+#endif
+
+ break;
+
+
+ case ']': /* end of scanset */
+ return fmt;
+
+ default: /* just another character */
+ c = n;
+ break;
+ }
+ }
+ /* NOTREACHED */
+} // __sccl()
+
+#endif // if defined(CYGFUN_LIBC_STDIO_ungetc)
+
+// EOF vfscanf.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/output/fnprintf.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/output/fnprintf.cxx
new file mode 100644
index 0000000000..43ad39795c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/output/fnprintf.cxx
@@ -0,0 +1,81 @@
+//===========================================================================
+//
+// fnprintf.cxx
+//
+// ANSI Stdio fnprintf() function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+
+// FUNCTIONS
+
+externC int
+fnprintf( FILE *stream, size_t size, const char *format, ... ) __THROW
+{
+ int rc; // return code
+ va_list ap; // for variable args
+
+ va_start(ap, format); // init specifying last non-var arg
+
+ rc = vfnprintf(stream, size, format, ap);
+
+ va_end(ap); // end var args
+
+ return rc;
+} // fnprintf()
+
+// EOF fnprintf.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/output/fprintf.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/output/fprintf.cxx
new file mode 100644
index 0000000000..ee856e0f4a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/output/fprintf.cxx
@@ -0,0 +1,82 @@
+//===========================================================================
+//
+// fprintf.cxx
+//
+// ANSI Stdio fprintf() function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+#include <limits.h> // INT_MAX
+
+// FUNCTIONS
+
+externC int
+fprintf( FILE *stream, const char *format, ... ) __THROW
+{
+ int rc; // return code
+ va_list ap; // for variable args
+
+ va_start(ap, format); // init specifying last non-var arg
+
+ rc = vfnprintf(stream, INT_MAX, format, ap);
+
+ va_end(ap); // end var args
+
+ return rc;
+} // fprintf()
+
+// EOF fprintf.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/output/fputc.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/output/fputc.cxx
new file mode 100644
index 0000000000..7f778af8b9
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/output/fputc.cxx
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// fputc.cxx
+//
+// ISO Standard I/O character output functions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose: Provide the fputc() function. Also provides the function
+// versions of putc() and putchar()
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <cyg/infra/cyg_ass.h> // Standard eCos assertion support
+#include <cyg/infra/cyg_trac.h> // Standard eCos tracing support
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+#include <errno.h> // error codes
+#include <cyg/libc/stdio/stream.hxx>// Cyg_StdioStream
+
+// FUNCTIONS
+
+externC int
+fputc( int c, FILE *stream ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+ Cyg_ErrNo err;
+ cyg_uint8 real_c = (cyg_uint8) c;
+
+ CYG_REPORT_FUNCNAMETYPE("fputc", "wrote char %d");
+ CYG_REPORT_FUNCARG2( "c = %d, stream=%08x", c, stream );
+
+ CYG_CHECK_DATA_PTR( stream, "stream is not a valid pointer" );
+
+ err = real_stream->write_byte( real_c );
+
+ if (err)
+ {
+ real_stream->set_error( err );
+ errno = err;
+ CYG_REPORT_RETVAL(EOF);
+ return EOF;
+ } // if
+
+ CYG_REPORT_RETVAL((int)real_c);
+ return (int)real_c;
+
+} // fputc()
+
+
+// Also define putchar() even though it can be a macro.
+// Undefine the macro first though
+#undef putchar
+
+externC int
+putchar( int c ) __THROW
+{
+ return fputc( c, stdout );
+} // putchar()
+
+// Also define putc() even though it can be a macro.
+// Undefine the macro first though
+#undef putc
+
+externC int
+putc( int, FILE * ) __THROW CYGBLD_ATTRIB_WEAK_ALIAS(fputc);
+
+// EOF fputc.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/output/fputs.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/output/fputs.cxx
new file mode 100644
index 0000000000..f096c7ef1f
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/output/fputs.cxx
@@ -0,0 +1,90 @@
+//========================================================================
+//
+// fputs.cxx
+//
+// ANSI Stdio fputs() function
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+#include <errno.h> // error codes
+#include <cyg/libc/stdio/stream.hxx>// Cyg_StdioStream
+#include <string.h> // strlen()
+
+// FUNCTIONS
+
+externC int
+fputs( const char *s, FILE *stream ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+ cyg_ucount32 size = strlen(s);
+ cyg_ucount32 written;
+ Cyg_ErrNo err;
+
+ err = real_stream->write( (cyg_uint8 *)s, size, &written );
+
+ if (err) {
+ real_stream->set_error( err );
+ errno = err;
+ return EOF;
+ } // if
+
+
+ return written;
+
+} // fputs()
+
+// EOF fputs.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/output/fwrite.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/output/fwrite.cxx
new file mode 100644
index 0000000000..97047f7980
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/output/fwrite.cxx
@@ -0,0 +1,103 @@
+//========================================================================
+//
+// fwrite.cxx
+//
+// ANSI Stdio fwrite() function
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+#include <errno.h> // error codes
+#include <cyg/libc/stdio/stream.hxx>// Cyg_StdioStream
+
+// FUNCTIONS
+
+externC size_t
+fwrite( const void *ptr, size_t object_size, size_t num_objects,
+ FILE *stream ) __THROW
+{
+ Cyg_StdioStream *real_stream = (Cyg_StdioStream *)stream;
+ cyg_ucount32 written;
+ Cyg_ErrNo err;
+
+ CYG_REPORT_FUNCNAMETYPE( "fwrite", "wrote %d objects" );
+ CYG_REPORT_FUNCARG4( "ptr=%08x, object_size=%d, num_objects=%d, "
+ "stream=%08x", ptr, object_size, num_objects,
+ stream );
+
+ if ( (object_size==0) || (num_objects==0) ) {
+ CYG_REPORT_RETVAL(0);
+ return 0;
+ } // if
+
+ err = real_stream->write( (cyg_uint8 *)ptr, num_objects*object_size,
+ &written );
+
+ if (err) {
+ real_stream->set_error( err );
+ errno = err;
+ } // if
+
+ // we return the number of _objects_ written. Simple division is
+ // sufficient as this returns the quotient rather than rounding
+
+ CYG_REPORT_RETVAL( written/object_size );
+ return written/object_size;
+} // fwrite()
+
+// EOF fwrite.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/output/printf.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/output/printf.cxx
new file mode 100644
index 0000000000..79fc352e14
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/output/printf.cxx
@@ -0,0 +1,82 @@
+//===========================================================================
+//
+// printf.cxx
+//
+// ANSI Stdio printf() function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common project-wide type definitions
+#include <stddef.h> // NULL and size_t from compiler
+#include <stdio.h> // header for this file
+#include <limits.h> // INT_MAX
+
+// FUNCTIONS
+
+externC int
+printf( const char *format, ... ) __THROW
+{
+ int rc; // return code
+ va_list ap; // for variable args
+
+ va_start(ap, format); // init specifying last non-var arg
+
+ rc = vfnprintf(stdout, INT_MAX, format, ap);
+
+ va_end(ap); // end var args
+
+ return rc;
+} // printf()
+
+// EOF printf.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/src/output/vfnprintf.cxx b/cesar/ecos/packages/language/c/libc/stdio/current/src/output/vfnprintf.cxx
new file mode 100644
index 0000000000..2b345d14d2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/src/output/vfnprintf.cxx
@@ -0,0 +1,966 @@
+//===========================================================================
+//
+// vfnprintf.c
+//
+// I/O routines for vfnprintf() for use with ANSI C library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+//
+// This code is based on original code with the following copyright:
+//
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+#include <pkgconf/libc_i18n.h> // Configuration header for mb support
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <stdarg.h> // Variable argument definitions
+#include <stdio.h> // Standard header for all stdio files
+#include <string.h> // memchr() and strlen() functions
+#include <cyg/libc/stdio/stream.hxx> // C library streams
+
+#ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+
+# include <float.h> // for DBL_DIG etc. below
+# include <math.h> // for modf()
+# include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+
+# define MAXFRACT DBL_DIG
+# define MAXEXP DBL_MAX_10_EXP
+
+# define BUF (MAXEXP+MAXFRACT+1) /* + decimal point */
+# define DEFPREC 6
+
+static int
+cvt( double, int, int, char *, int, char *, char * );
+
+#else // ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+
+# define BUF 40
+
+#endif // ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+
+/*
+ * Actual printf innards.
+ *
+ * This code is large and complicated...
+ */
+
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+typedef int (*mbtowc_fn_type)(wchar_t *, const char *, size_t, int *);
+externC mbtowc_fn_type __get_current_locale_mbtowc_fn();
+#endif
+
+/*
+ * Macros for converting digits to letters and vice versa
+ */
+#define to_digit(c) ((c) - '0')
+#define is_digit(c) ((unsigned)to_digit(c) <= 9)
+#define to_char(n) ((n) + '0')
+
+/*
+ * Flags used during conversion.
+ */
+#define ALT 0x001 /* alternate form */
+#define HEXPREFIX 0x002 /* add 0x or 0X prefix */
+#define LADJUST 0x004 /* left adjustment */
+#define LONGDBL 0x008 /* long double; unimplemented */
+#define LONGINT 0x010 /* long integer */
+#define QUADINT 0x020 /* quad integer */
+#define SHORTINT 0x040 /* short integer */
+#define ZEROPAD 0x080 /* zero (as opposed to blank) pad */
+#define FPT 0x100 /* Floating point number */
+#define SIZET 0x200 /* size_t */
+
+externC int
+vfnprintf ( FILE *stream, size_t n, const char *format, va_list arg) __THROW
+{
+ char *fmt; /* format string */
+ int ch; /* character from fmt */
+ int x, y; /* handy integers (short term usage) */
+ char *cp; /* handy char pointer (short term usage) */
+ int flags; /* flags as above */
+
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+ int state = 0; /* state for mbtowc conversion */
+ mbtowc_fn_type mbtowc_fn;
+#endif
+
+ int ret; /* return value accumulator */
+ int width; /* width from format (%8d), or 0 */
+ int prec; /* precision from format (%.3d), or -1 */
+ char sign; /* sign prefix (' ', '+', '-', or \0) */
+ wchar_t wc;
+
+#define quad_t long long
+#define u_quad_t unsigned long long
+
+ u_quad_t _uquad; /* integer arguments %[diouxX] */
+ enum { OCT, DEC, HEX } base;/* base for [diouxX] conversion */
+ int dprec; /* a copy of prec if [diouxX], 0 otherwise */
+ int fieldsz; /* field size expanded by sign, etc */
+ int realsz; /* field size expanded by dprec */
+ int size; /* size of converted field or string */
+ char *xdigs; /* digits for [xX] conversion */
+#define NIOV 8
+ char buf[BUF]; /* space for %c, %[diouxX], %[eEfgG] */
+ char ox[2]; /* space for 0x hex-prefix */
+#ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+ char softsign; /* temporary negative sign for floats */
+ double _double; /* double precision arguments %[eEfgG] */
+ int fpprec; /* `extra' floating precision in [eEfgG] */
+#endif
+
+ /*
+ * Choose PADSIZE to trade efficiency vs. size. If larger printf
+ * fields occur frequently, increase PADSIZE and make the initialisers
+ * below longer.
+ */
+#define PADSIZE 16 /* pad chunk size */
+ static char blanks[PADSIZE] =
+ {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '};
+ static char zeroes[PADSIZE] =
+ {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'};
+
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+
+ /*
+ * BEWARE, these `goto error' on error, and PAD uses `n'.
+ */
+#define PRINT(ptr, len) \
+CYG_MACRO_START \
+ cyg_ucount32 length = MIN( (cyg_ucount32) len, n - ret - 1); \
+ if (((Cyg_StdioStream *)stream)->write( (const cyg_uint8 *)ptr, \
+ length, &length )) \
+ goto error; \
+ if (length < (cyg_ucount32)len) { \
+ ret += length; \
+ goto done; \
+ } \
+CYG_MACRO_END
+
+
+#define PAD(howmany, with) \
+CYG_MACRO_START \
+ if ((x = (howmany)) > 0) { \
+ while (x > PADSIZE) { \
+ PRINT(with, PADSIZE); \
+ x -= PADSIZE; \
+ } \
+ PRINT(with, x); \
+ } \
+CYG_MACRO_END
+
+ /*
+ * To extend shorts properly, we need both signed and unsigned
+ * argument extraction methods.
+ */
+
+#define SARG() \
+ (flags&QUADINT ? va_arg(arg, cyg_int64) : \
+ flags&LONGINT ? va_arg(arg, long) : \
+ flags&SHORTINT ? (long)(short)va_arg(arg, int) : \
+ flags&SIZET ? (long)va_arg(arg, size_t) : \
+ (long)va_arg(arg, int))
+#define UARG() \
+ (flags&QUADINT ? va_arg(arg, cyg_uint64) : \
+ flags&LONGINT ? va_arg(arg, unsigned long) : \
+ flags&SHORTINT ? (unsigned long)(unsigned short)va_arg(arg, int) : \
+ flags&SIZET ? va_arg(arg, size_t) : \
+ (unsigned long)va_arg(arg, unsigned int))
+
+
+ xdigs = NULL; // stop compiler whinging
+ fmt = (char *)format;
+ ret = 0;
+#ifdef CYGINT_LIBC_I18N_MB_REQUIRED
+ mbtowc_fn = __get_current_locale_mbtowc_fn();
+#endif
+
+ /*
+ * Scan the format for conversions (`%' character).
+ */
+ for (;;) {
+ cp = (char *)fmt;
+#ifndef CYGINT_LIBC_I18N_MB_REQUIRED
+ while ((x = ((wc = *fmt) != 0))) {
+#else
+ while ((x = mbtowc_fn (&wc, fmt, MB_CUR_MAX, &state)) > 0) {
+#endif
+ fmt += x;
+ if (wc == '%') {
+ fmt--;
+ break;
+ }
+ }
+ if ((y = fmt - cp) != 0) {
+ PRINT(cp, y);
+ ret += y;
+ }
+ if ((x <= 0) || (ret >= (int)n)) // @@@ this check with n isn't good enough
+ goto done;
+ fmt++; /* skip over '%' */
+
+ flags = 0;
+ dprec = 0;
+#ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+ fpprec = 0;
+#endif
+ width = 0;
+ prec = -1;
+ sign = '\0';
+
+rflag: ch = *fmt++;
+reswitch: switch (ch) {
+ case ' ':
+ /*
+ * ``If the space and + flags both appear, the space
+ * flag will be ignored.''
+ * -- ANSI X3J11
+ */
+ if (!sign)
+ sign = ' ';
+ goto rflag;
+ case '#':
+ flags |= ALT;
+ goto rflag;
+ case '*':
+ /*
+ * ``A negative field width argument is taken as a
+ * - flag followed by a positive field width.''
+ * -- ANSI X3J11
+ * They don't exclude field widths read from args.
+ */
+ if ((width = va_arg(arg, int)) >= 0)
+ goto rflag;
+ width = -width;
+ /* FALLTHROUGH */
+ case '-':
+ flags |= LADJUST;
+ goto rflag;
+ case '+':
+ sign = '+';
+ goto rflag;
+ case '.':
+ if ((ch = *fmt++) == '*') {
+ x = va_arg(arg, int);
+ prec = x < 0 ? -1 : x;
+ goto rflag;
+ }
+ x = 0;
+ while (is_digit(ch)) {
+ x = 10 * x + to_digit(ch);
+ ch = *fmt++;
+ }
+ prec = x < 0 ? -1 : x;
+ goto reswitch;
+ case '0':
+ /*
+ * ``Note that 0 is taken as a flag, not as the
+ * beginning of a field width.''
+ * -- ANSI X3J11
+ */
+ flags |= ZEROPAD;
+ goto rflag;
+ case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ x = 0;
+ do {
+ x = 10 * x + to_digit(ch);
+ ch = *fmt++;
+ } while (is_digit(ch));
+ width = x;
+ goto reswitch;
+#ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+ case 'L':
+ flags |= LONGDBL;
+ goto rflag;
+#endif
+ case 'h':
+ flags |= SHORTINT;
+ goto rflag;
+ case 'l':
+ if (*fmt == 'l') {
+ fmt++;
+ flags |= QUADINT;
+ } else {
+ flags |= LONGINT;
+ }
+ goto rflag;
+ case 'q':
+ flags |= QUADINT;
+ goto rflag;
+ case 'c':
+ *(cp = buf) = va_arg(arg, int);
+ size = 1;
+ sign = '\0';
+ break;
+ case 'D':
+ flags |= LONGINT;
+ /*FALLTHROUGH*/
+ case 'd':
+ case 'i':
+ _uquad = SARG();
+#ifndef _NO_LONGLONG
+ if ((quad_t)_uquad < 0)
+#else
+ if ((long) _uquad < 0)
+#endif
+ {
+
+ _uquad = -_uquad;
+ sign = '-';
+ }
+ base = DEC;
+ goto number;
+
+#ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+ case 'e':
+ case 'E':
+ case 'f':
+ case 'g':
+ case 'G':
+ _double = va_arg(arg, double);
+ /*
+ * don't do unrealistic precision; just pad it with
+ * zeroes later, so buffer size stays rational.
+ */
+ if (prec > MAXFRACT) {
+ if ((ch != 'g' && ch != 'G') || (flags&ALT))
+ fpprec = prec - MAXFRACT;
+ prec = MAXFRACT;
+ } else if (prec == -1)
+ prec = DEFPREC;
+ /*
+ * cvt may have to round up before the "start" of
+ * its buffer, i.e. ``intf("%.2f", (double)9.999);'';
+ * if the first character is still NUL, it did.
+ * softsign avoids negative 0 if _double < 0 but
+ * no significant digits will be shown.
+ */
+ cp = buf;
+ *cp = '\0';
+ size = cvt(_double, prec, flags, &softsign, ch,
+ cp, buf + sizeof(buf));
+ if (softsign)
+ sign = '-';
+ if (*cp == '\0')
+ cp++;
+ break;
+#else
+ case 'e':
+ case 'E':
+ case 'f':
+ case 'g':
+ case 'G':
+ // Output nothing at all
+ (void) va_arg(arg, double); // take off arg anyway
+ cp = "";
+ size = 0;
+ sign = '\0';
+ break;
+
+
+#endif // ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+
+ case 'n':
+#ifndef _NO_LONGLONG
+ if (flags & QUADINT)
+ *va_arg(arg, quad_t *) = ret;
+ else
+#endif
+ if (flags & LONGINT)
+ *va_arg(arg, long *) = ret;
+ else if (flags & SHORTINT)
+ *va_arg(arg, short *) = ret;
+ else if (flags & SIZET)
+ *va_arg(arg, size_t *) = ret;
+ else
+ *va_arg(arg, int *) = ret;
+ continue; /* no output */
+ case 'O':
+ flags |= LONGINT;
+ /*FALLTHROUGH*/
+ case 'o':
+ _uquad = UARG();
+ base = OCT;
+ goto nosign;
+ case 'p':
+ /*
+ * ``The argument shall be a pointer to void. The
+ * value of the pointer is converted to a sequence
+ * of printable characters, in an implementation-
+ * defined manner.''
+ * -- ANSI X3J11
+ */
+ /* NOSTRICT */
+ _uquad = (unsigned long)va_arg(arg, void *);
+ base = HEX;
+ xdigs = "0123456789abcdef";
+ flags |= HEXPREFIX;
+ ch = 'x';
+ goto nosign;
+ case 's':
+ if ((cp = va_arg(arg, char *)) == NULL)
+ cp = "(null)";
+ if (prec >= 0) {
+ /*
+ * can't use strlen; can only look for the
+ * NUL in the first `prec' characters, and
+ * strlen() will go further.
+ */
+ char *p = (char *)memchr(cp, 0, prec);
+
+ if (p != NULL) {
+ size = p - cp;
+ if (size > prec)
+ size = prec;
+ } else
+ size = prec;
+ } else
+ size = strlen(cp);
+ sign = '\0';
+ break;
+ case 'U':
+ flags |= LONGINT;
+ /*FALLTHROUGH*/
+ case 'u':
+ _uquad = UARG();
+ base = DEC;
+ goto nosign;
+ case 'X':
+ xdigs = "0123456789ABCDEF";
+ goto hex;
+ case 'x':
+ xdigs = "0123456789abcdef";
+hex: _uquad = UARG();
+ base = HEX;
+ /* leading 0x/X only if non-zero */
+ if (flags & ALT && _uquad != 0)
+ flags |= HEXPREFIX;
+
+ /* unsigned conversions */
+nosign: sign = '\0';
+ /*
+ * ``... diouXx conversions ... if a precision is
+ * specified, the 0 flag will be ignored.''
+ * -- ANSI X3J11
+ */
+number: if ((dprec = prec) >= 0)
+ flags &= ~ZEROPAD;
+
+ /*
+ * ``The result of converting a zero value with an
+ * explicit precision of zero is no characters.''
+ * -- ANSI X3J11
+ */
+ cp = buf + BUF;
+ if (_uquad != 0 || prec != 0) {
+ /*
+ * Unsigned mod is hard, and unsigned mod
+ * by a constant is easier than that by
+ * a variable; hence this switch.
+ */
+ switch (base) {
+ case OCT:
+ do {
+ *--cp = to_char(_uquad & 7);
+ _uquad >>= 3;
+ } while (_uquad);
+ /* handle octal leading 0 */
+ if (flags & ALT && *cp != '0')
+ *--cp = '0';
+ break;
+
+ case DEC:
+ /* many numbers are 1 digit */
+ while (_uquad >= 10) {
+ *--cp = to_char(_uquad % 10);
+ _uquad /= 10;
+ }
+ *--cp = to_char(_uquad);
+ break;
+
+ case HEX:
+ do {
+ *--cp = xdigs[_uquad & 15];
+ _uquad >>= 4;
+ } while (_uquad);
+ break;
+
+ default:
+ cp = "bug in vfprintf: bad base";
+ size = strlen(cp);
+ goto skipsize;
+ }
+ }
+ size = buf + BUF - cp;
+ skipsize:
+ break;
+ case 'z':
+ flags |= SIZET;
+ goto rflag;
+ default: /* "%?" prints ?, unless ? is NUL */
+ if (ch == '\0')
+ goto done;
+ /* pretend it was %c with argument ch */
+ cp = buf;
+ *cp = ch;
+ size = 1;
+ sign = '\0';
+ break;
+ }
+
+ /*
+ * All reasonable formats wind up here. At this point, `cp'
+ * points to a string which (if not flags&LADJUST) should be
+ * padded out to `width' places. If flags&ZEROPAD, it should
+ * first be prefixed by any sign or other prefix; otherwise,
+ * it should be blank padded before the prefix is emitted.
+ * After any left-hand padding and prefixing, emit zeroes
+ * required by a decimal [diouxX] precision, then print the
+ * string proper, then emit zeroes required by any leftover
+ * floating precision; finally, if LADJUST, pad with blanks.
+ *
+ * Compute actual size, so we know how much to pad.
+ * fieldsz excludes decimal prec; realsz includes it.
+ */
+#ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+ fieldsz = size + fpprec;
+#else
+ fieldsz = size;
+#endif
+ if (sign)
+ fieldsz++;
+ else if (flags & HEXPREFIX)
+ fieldsz+= 2;
+ realsz = dprec > fieldsz ? dprec : fieldsz;
+
+ /* right-adjusting blank padding */
+ if ((flags & (LADJUST|ZEROPAD)) == 0) {
+ if (width - realsz > 0) {
+ PAD(width - realsz, blanks);
+ ret += width - realsz;
+ }
+ }
+
+ /* prefix */
+ if (sign) {
+ PRINT(&sign, 1);
+ ret++;
+ } else if (flags & HEXPREFIX) {
+ ox[0] = '0';
+ ox[1] = ch;
+ PRINT(ox, 2);
+ ret += 2;
+ }
+
+ /* right-adjusting zero padding */
+ if ((flags & (LADJUST|ZEROPAD)) == ZEROPAD) {
+ if (width - realsz > 0) {
+ PAD(width - realsz, zeroes);
+ ret += width - realsz;
+ }
+ }
+
+ if (dprec - fieldsz > 0) {
+ /* leading zeroes from decimal precision */
+ PAD(dprec - fieldsz, zeroes);
+ ret += dprec - fieldsz;
+ }
+
+ /* the string or number proper */
+ PRINT(cp, size);
+ ret += size;
+
+#ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+ /* trailing f.p. zeroes */
+ PAD(fpprec, zeroes);
+ ret += fpprec;
+#endif
+
+ /* left-adjusting padding (always blank) */
+ if (flags & LADJUST) {
+ if (width - realsz > 0) {
+ PAD(width - realsz, blanks);
+ ret += width - realsz;
+ }
+ }
+
+ }
+done:
+error:
+ return (((Cyg_StdioStream *) stream)->get_error() ? EOF : ret);
+ /* NOTREACHED */
+}
+
+
+#ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+
+static char *
+round(double fract, int *exp, char *start, char *end, char ch, char *signp)
+{
+ double tmp;
+
+ if (fract)
+ (void)modf(fract * 10, &tmp);
+ else
+ tmp = to_digit(ch);
+ if (tmp > 4)
+ for (;; --end) {
+ if (*end == '.')
+ --end;
+ if (++*end <= '9')
+ break;
+ *end = '0';
+ if (end == start) {
+ if (exp) { /* e/E; increment exponent */
+ *end = '1';
+ ++*exp;
+ }
+ else { /* f; add extra digit */
+ *--end = '1';
+ --start;
+ }
+ break;
+ }
+ }
+ /* ``"%.3f", (double)-0.0004'' gives you a negative 0. */
+ else if (*signp == '-')
+ for (;; --end) {
+ if (*end == '.')
+ --end;
+ if (*end != '0')
+ break;
+ if (end == start)
+ *signp = 0;
+ }
+ return (start);
+} // round()
+
+
+static char *
+exponent(char *p, int exp, int fmtch)
+{
+ char *t;
+ char expbuf[MAXEXP];
+
+ *p++ = fmtch;
+ if (exp < 0) {
+ exp = -exp;
+ *p++ = '-';
+ }
+ else
+ *p++ = '+';
+ t = expbuf + MAXEXP;
+ if (exp > 9) {
+ do {
+ *--t = to_char(exp % 10);
+ } while ((exp /= 10) > 9);
+ *--t = to_char(exp);
+ for (; t < expbuf + MAXEXP; *p++ = *t++);
+ }
+ else {
+ *p++ = '0';
+ *p++ = to_char(exp);
+ }
+ return (p);
+} // exponent()
+
+
+static int
+cvt(double number, int prec, int flags, char *signp, int fmtch, char *startp,
+ char *endp)
+{
+ Cyg_libm_ieee_double_shape_type ieeefp;
+ char *t = startp;
+
+ ieeefp.value = number;
+ *signp = 0;
+ if ( ieeefp.number.sign ){ // this checks for <0.0 and -0.0
+ number = -number;
+ *signp = '-';
+ }
+
+ if (finite(number)) {
+ char *p;
+ double fract;
+ int dotrim, expcnt, gformat;
+ double integer, tmp;
+
+ dotrim = expcnt = gformat = 0;
+ fract = modf(number, &integer);
+
+ /* get an extra slot for rounding. */
+ t = ++startp;
+
+ /*
+ * get integer portion of number; put into the end of the buffer; the
+ * .01 is added for modf(356.0 / 10, &integer) returning .59999999...
+ */
+ for (p = endp - 1; integer; ++expcnt) {
+ tmp = modf(integer / 10, &integer);
+ *p-- = to_char((int)((tmp + .01) * 10));
+ }
+ switch (fmtch) {
+ case 'f':
+ /* reverse integer into beginning of buffer */
+ if (expcnt)
+ for (; ++p < endp; *t++ = *p);
+ else
+ *t++ = '0';
+ /*
+ * if precision required or alternate flag set, add in a
+ * decimal point.
+ */
+ if (prec || flags&ALT)
+ *t++ = '.';
+ /* if requires more precision and some fraction left */
+ if (fract) {
+ if (prec)
+ do {
+ fract = modf(fract * 10, &tmp);
+ *t++ = to_char((int)tmp);
+ } while (--prec && fract);
+ if (fract)
+ startp = round(fract, (int *)NULL, startp,
+ t - 1, (char)0, signp);
+ }
+ for (; prec--; *t++ = '0');
+ break;
+ case 'e':
+ case 'E':
+eformat: if (expcnt) {
+ *t++ = *++p;
+ if (prec || flags&ALT)
+ *t++ = '.';
+ /* if requires more precision and some integer left */
+ for (; prec && ++p < endp; --prec)
+ *t++ = *p;
+ /*
+ * if done precision and more of the integer component,
+ * round using it; adjust fract so we don't re-round
+ * later.
+ */
+ if (!prec && ++p < endp) {
+ fract = 0;
+ startp = round((double)0, &expcnt, startp,
+ t - 1, *p, signp);
+ }
+ /* adjust expcnt for digit in front of decimal */
+ --expcnt;
+ }
+ /* until first fractional digit, decrement exponent */
+ else if (fract) {
+ /* adjust expcnt for digit in front of decimal */
+ for (expcnt = -1;; --expcnt) {
+ fract = modf(fract * 10, &tmp);
+ if (tmp)
+ break;
+ }
+ *t++ = to_char((int)tmp);
+ if (prec || flags&ALT)
+ *t++ = '.';
+ }
+ else {
+ *t++ = '0';
+ if (prec || flags&ALT)
+ *t++ = '.';
+ }
+ /* if requires more precision and some fraction left */
+ if (fract) {
+ if (prec)
+ do {
+ fract = modf(fract * 10, &tmp);
+ *t++ = to_char((int)tmp);
+ } while (--prec && fract);
+ if (fract)
+ startp = round(fract, &expcnt, startp,
+ t - 1, (char)0, signp);
+ }
+ /* if requires more precision */
+ for (; prec--; *t++ = '0');
+
+ /* unless alternate flag, trim any g/G format trailing 0's */
+ if (gformat && !(flags&ALT)) {
+ while (t > startp && *--t == '0');
+ if (*t == '.')
+ --t;
+ ++t;
+ }
+ t = exponent(t, expcnt, fmtch);
+ break;
+ case 'g':
+ case 'G':
+ /* a precision of 0 is treated as a precision of 1. */
+ if (!prec)
+ ++prec;
+ /*
+ * ``The style used depends on the value converted; style e
+ * will be used only if the exponent resulting from the
+ * conversion is less than -4 or greater than the precision.''
+ * -- ANSI X3J11
+ */
+ if (expcnt > prec || (!expcnt && fract && fract < .0001)) {
+ /*
+ * g/G format counts "significant digits, not digits of
+ * precision; for the e/E format, this just causes an
+ * off-by-one problem, i.e. g/G considers the digit
+ * before the decimal point significant and e/E doesn't
+ * count it as precision.
+ */
+ --prec;
+ fmtch -= 2; /* G->E, g->e */
+ gformat = 1;
+ goto eformat;
+ }
+ /*
+ * reverse integer into beginning of buffer,
+ * note, decrement precision
+ */
+ if (expcnt)
+ for (; ++p < endp; *t++ = *p, --prec);
+ else
+ *t++ = '0';
+ /*
+ * if precision required or alternate flag set, add in a
+ * decimal point. If no digits yet, add in leading 0.
+ */
+ if (prec || flags&ALT) {
+ dotrim = 1;
+ *t++ = '.';
+ }
+ else
+ dotrim = 0;
+ /* if requires more precision and some fraction left */
+ if (fract) {
+ if (prec) {
+ do {
+ fract = modf(fract * 10, &tmp);
+ *t++ = to_char((int)tmp);
+ } while(!tmp);
+ while (--prec && fract) {
+ fract = modf(fract * 10, &tmp);
+ *t++ = to_char((int)tmp);
+ }
+ }
+ if (fract)
+ startp = round(fract, (int *)NULL, startp,
+ t - 1, (char)0, signp);
+ }
+ /* alternate format, adds 0's for precision, else trim 0's */
+ if (flags&ALT)
+ for (; prec--; *t++ = '0');
+ else if (dotrim) {
+ while (t > startp && *--t == '0');
+ if (*t != '.')
+ ++t;
+ }
+ }
+ } else {
+ unsigned case_adj;
+ switch (fmtch) {
+ case 'f':
+ case 'g':
+ case 'e':
+ case_adj = 'a' - 'A';
+ break;
+ default:
+ case_adj = 0;
+ }
+ if (isnan(number)) {
+ *t++ = 'N' + case_adj;
+ *t++ = 'A' + case_adj;
+ *t++ = 'N' + case_adj;
+ } else { // infinite
+ *t++ = 'I' + case_adj;
+ *t++ = 'N' + case_adj;
+ *t++ = 'F' + case_adj;
+ }
+ }
+ return (t - startp);
+} // cvt()
+
+#endif // ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+
+// EOF vfnprintf.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/tests/fileio.c b/cesar/ecos/packages/language/c/libc/stdio/current/tests/fileio.c
new file mode 100644
index 0000000000..5bdc3c1f39
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/tests/fileio.c
@@ -0,0 +1,207 @@
+//=================================================================
+//
+// fileio.c
+//
+// Testcase for C library file I/O functions
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Gary Thomas
+// Contributors:
+// Date: 2003-03-06
+// Description: Contains testcode for C library file I/O functions
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <stdio.h> // All the stdio functions
+#include <errno.h> // errno
+#include <cyg/infra/testcase.h> // Testcase API
+#include <unistd.h>
+#include <cyg/fileio/fileio.h>
+
+#define NUM_TEST_LINES 100
+#define TEST_DIR "/"
+#define TEST_FILE "test.file"
+
+static char errmsg[256];
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ int err, i, lines, len, total_len, expected_len;
+ FILE *fp;
+ char buf[512], *cp;
+
+ err = mount("", TEST_DIR, "ramfs");
+ if (err < 0) {
+ CYG_TEST_FAIL_FINISH("Can't mount '/' file system");
+ }
+
+ err = chdir(TEST_DIR);
+ if (err < 0) {
+ CYG_TEST_FAIL_FINISH("Can't chdir('/')");
+ }
+
+ fp = fopen(TEST_FILE, "w");
+ if (fp == (FILE *)NULL) {
+ CYG_TEST_FAIL_FINISH("Can't create test file");
+ }
+
+ for (i = 0; i < NUM_TEST_LINES; i++) {
+ len = fprintf(fp, "This is line: %4d\n", i+1);
+ if (len != 19) {
+ sprintf(errmsg, "Error writing data - line: %d, len: %d\n", i+1, len);
+ CYG_TEST_FAIL_FINISH(errmsg);
+ }
+ }
+
+ err = fclose(fp);
+ if (err) {
+ CYG_TEST_FAIL_FINISH("Error closingfile");
+ }
+
+ fp = fopen(TEST_FILE, "r");
+ if (fp == (FILE *)NULL) {
+ CYG_TEST_FAIL_FINISH("Can't open test file");
+ }
+
+ lines = 0;
+ total_len = 0;
+ while ((cp = fgets(buf, sizeof(buf), fp)) != NULL) {
+ lines++;
+ total_len += strlen(buf);
+ }
+ sprintf(errmsg, "Read %d lines, %d bytes", lines, total_len);
+ CYG_TEST_INFO(errmsg);
+ expected_len = total_len;
+
+ if (lines != NUM_TEST_LINES) {
+ sprintf(errmsg, "Read %d lines, not %d", lines, NUM_TEST_LINES);
+ CYG_TEST_FAIL_FINISH(errmsg);
+ }
+
+ if (ferror(fp)) {
+ CYG_TEST_FAIL_FINISH("ferror() set");
+ }
+
+ if (!feof(fp)) {
+ CYG_TEST_FAIL_FINISH("feof() not set");
+ }
+
+ err = fclose(fp);
+ if (err) {
+ CYG_TEST_FAIL_FINISH("Error closingfile");
+ }
+
+ fp = fopen(TEST_FILE, "r");
+ if (fp == (FILE *)NULL) {
+ CYG_TEST_FAIL_FINISH("Can't open test file");
+ }
+
+ // This tests whether or not it is possible to detect EOF separate
+ // from an error and recover from it. The buffer size is [probably]
+ // such that fread() will not be able to read the entire file in
+ // 512 byte chunks.
+ lines = 0;
+ total_len = 0;
+ while ((len = fread(buf, sizeof(buf), 1, fp)) == 1) {
+ lines++;
+ total_len += sizeof(buf);
+ }
+ sprintf(errmsg, "Read %d chunks, %d bytes, err: %d, eof: %d",
+ lines, total_len, ferror(fp), feof(fp));
+ CYG_TEST_INFO(errmsg);
+
+ if (ferror(fp)) {
+ CYG_TEST_FAIL_FINISH("ferror() set");
+ }
+
+ if (!feof(fp)) {
+ CYG_TEST_FAIL_FINISH("feof() not set");
+ }
+
+ if (expected_len != total_len) {
+ if (total_len > expected_len) {
+ CYG_TEST_FAIL_FINISH("Too many characters read");
+ }
+ // There should still be more characters left to read,
+ // but less than sizeof(buf)
+ clearerr(fp);
+ rewind(fp);
+ fseek(fp, total_len, SEEK_SET);
+ len = fread(buf, 1, sizeof(buf), fp);
+ if (len != (expected_len - total_len)) {
+ sprintf(errmsg, "Wrong number of residual bytes - read %d, should be %d",
+ len, expected_len-total_len);
+ CYG_TEST_FAIL_FINISH(errmsg);
+ }
+ }
+
+ err = fclose(fp);
+ if (err) {
+ CYG_TEST_FAIL_FINISH("Error closingfile");
+ }
+
+ CYG_TEST_PASS("Stdio file I/O tests completed");
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__
+ " for C library stdio file I/O functions");
+} // test()
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C "
+ "library stdio file I/O functions");
+
+ test(0);
+
+ return 0;
+
+} // main()
+
+// EOF fileio.c
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/tests/sprintf1.c b/cesar/ecos/packages/language/c/libc/stdio/current/tests/sprintf1.c
new file mode 100644
index 0000000000..ea8e98aaef
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/tests/sprintf1.c
@@ -0,0 +1,593 @@
+//=================================================================
+//
+// sprintf1.c
+//
+// Testcase for C library sprintf()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Description: Contains testcode for C library sprintf() function
+//
+//
+//####DESCRIPTIONEND####
+
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+
+// INCLUDES
+
+#include <stdio.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+
+static void test(CYG_ADDRWORD data)
+{
+ static char x[500];
+ static char y[500];
+ int ret;
+ int tmp;
+ int *ptr;
+
+
+ // Check 1
+ ret = sprintf(x, "%d", 20);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "20")==0, "%d test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%d test return code");
+
+ // Check 2
+ my_strcpy(y, "Pigs noses. Get 'em while there 'ot");
+ ret = sprintf(x, "%s", y);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%s test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%s test return code");
+
+ // Check 3
+ ret = sprintf(x, "||%7d||", 2378);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "|| 2378||")==0, "padding test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "padding test return code");
+
+ // Check 4
+ ret = sprintf(x, "%x", 3573);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "df5")==0, "hex conversion (lowercase)");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "hex conv (lowercase) return code");
+
+ // Check 5
+ ret = sprintf(x, "%X", 3573);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "DF5")==0, "hex conversion (uppercase)");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "hex conv (upperbase ) return code");
+
+ // Check 6
+ ret = sprintf(x, "%c", 65);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "A")==0, "%c test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%c test return code");
+
+ // Check 7
+ ret = sprintf(x, "%o",4628);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "11024")==0, "octal conversion");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "octal conversion return code");
+
+ // Check 8
+ ret = sprintf(x, "%u", (unsigned int) 4738);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "4738")==0, "%u test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%u test return code");
+
+ // Check 9
+ ptr = &tmp;
+ ret = sprintf(x, "1234567x%n||", ptr);
+ CYG_TEST_PASS_FAIL(tmp==8, "%n test");
+ CYG_TEST_PASS_FAIL(ret==10, "%n test return code");
+
+ // Check 10
+ ret = sprintf(x, "%%");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "%")==0, "%% test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%% test return code");
+
+ // Check 11
+ ret = sprintf(x, "%ld", (long)1<<30);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "1073741824")==0, "%ld test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%ld test return code");
+
+ // Check 12
+ ret = sprintf(x, "%lu", (unsigned long)(1<<31) + 100);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "2147483748")==0, "%lu test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%lu test return code");
+
+ // Check 13
+ ret = sprintf(x, "%x", 0x789a);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "789a")==0, "%x test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%x test return code");
+
+ // Check 14
+ ret = sprintf(x, "%X", 0x789ab2);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "789AB2")==0, "%X test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%x test return code");
+
+ // Check 15
+ ret = sprintf(x, "%08x", 0xdea2f2);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "00dea2f2")==0, "%0x test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%0x test return code");
+
+ // Check 16
+ ret = sprintf(x, "%09X", 0x12fa1c);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, "00012FA1C")==0, "%0X test");
+ CYG_TEST_PASS_FAIL(ret==my_strlen(x), "%0X test return code");
+
+ // Check 17
+ ptr=&tmp;
+ ret = sprintf(x, "%p", (void *)ptr);
+ // just check _something_ was returned
+ CYG_TEST_PASS_FAIL((ret==my_strlen(x)) && (ret > 0),
+ "%p test return code");
+
+#ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+
+ CYG_TEST_INFO("Starting floating point specific tests");
+
+ // Check 18
+ ret = sprintf(x, "%f", 2.5);
+ my_strcpy( y, "2.500000" );
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "simple %f test #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "simple %f test #1 return code");
+
+ // Check 19
+ ret = sprintf(x, "hello %f world", 1.234);
+ my_strcpy( y, "hello 1.234000 world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "simple %f test #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "simple %f test #2 return code");
+
+ // Check 20
+ ret = sprintf(x, "hello%fworld", 2.3456781);
+ my_strcpy( y, "hello2.345678world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "simple %f test #3");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "simple %f test #3 return code");
+
+ // Check 21
+ ret = sprintf(x, "%s%f%d%s", "testing", -0.591, 3, "123");
+ my_strcpy( y, "testing-0.5910003123");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%f mixed with others");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),"%f mixed with others return code");
+
+ // Check 22
+ ret = sprintf(x, "%s%f%d%s", "testing", -0.591, 3, "123");
+ my_strcpy( y, "testing-0.5910003123");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%f mixed with others");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),"%f mixed with others return code");
+
+ // Check 23
+ ret = sprintf(x, "hello%fworld", 2.3456786);
+ my_strcpy( y, "hello2.345679world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "rounding test #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "rounding test #1 return code");
+
+ // Check 24
+ ret = sprintf(x, "hello%fworld", -2.3456786);
+ my_strcpy( y, "hello-2.345679world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "rounding test #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "rounding test #2 return code");
+
+ // Check 25
+ ret = sprintf(x, "hello%+fworld", -6.54321);
+ my_strcpy( y, "hello-6.543210world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "+ modifier #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "+ modifier #1 return code");
+
+ // Check 26
+ ret = sprintf(x, "hello%+fworld", 6.54321);
+ my_strcpy( y, "hello+6.543210world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "+ modifier #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "+ modifier #2 return code");
+
+ // Check 27
+ ret = sprintf(x, "hello%5fworld", 6.5);
+ my_strcpy( y, "hello6.500000world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "width modifier #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "width modifier #1 return code");
+
+ // Check 28
+ ret = sprintf(x, "hello%2fworld", 4.3);
+ my_strcpy( y, "hello4.300000world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "width modifier #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "width modifier #2 return code");
+
+ // Check 29
+ ret = sprintf(x, "hello%2.1fworld", 5.6);
+ my_strcpy( y, "hello5.6world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "width and precision modifier #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "width and precision modifier #1 return code");
+
+ // Check 30
+ ret = sprintf(x, "hello%5.1fworld", 6.7);
+ my_strcpy( y, "hello 6.7world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "width and precision modifier #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "width and precision modifier #2 return code");
+
+ // Check 31
+ ret = sprintf(x, "hello%3.1fworld", 7.8);
+ my_strcpy( y, "hello7.8world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "width and precision modifier #3");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "width and precision modifier #3 return code");
+
+ // Check 32
+ ret = sprintf(x, "hello%3.2fworld", 7.8);
+ my_strcpy( y, "hello7.80world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "width and precision modifier #4");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "width and precision modifier #4 return code");
+
+ // Check 33
+ ret = sprintf(x, "hello%05.1fworld", 6.5);
+ my_strcpy( y, "hello006.5world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "0 modifier #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "0 modifier #1 return code");
+
+ // Check 34
+ ret = sprintf(x, "hello%03.0fworld", 6.2);
+ my_strcpy( y, "hello006world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "0 modifier #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "0 modifier #2 return code");
+
+ // Check 35
+ ret = sprintf(x, "hello%05.*fworld",2, 7.5);
+ my_strcpy( y, "hello07.50world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "0 modifier plus *");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "0 modifier plus * return code");
+
+ // Check 36
+ ret = sprintf(x, "hello%03.1fworld",-1.232);
+ my_strcpy( y, "hello-1.2world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "-ve number with 0 modifier #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "-ve number with 0 modifier #1 return code");
+
+ // Check 37
+ ret = sprintf(x, "hello%04.1fworld",-1.232);
+ my_strcpy( y, "hello-1.2world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "-ve number with 0 modifier #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "-ve number with 0 modifier #2 return code");
+
+ // Check 38
+ ret = sprintf(x, "hello%05.1fworld",-1.232);
+ my_strcpy( y, "hello-01.2world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "-ve number with 0 modifier #3");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "-ve number with 0 modifier #3 return code");
+
+ // Check 39
+ ret = sprintf(x, "hello%fworld",0.0);
+ my_strcpy( y, "hello0.000000world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "0.0 test #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "0.0 test #1 return code");
+
+ // Check 40
+ ret = sprintf(x, "hello%1.0fworld",0.0);
+ my_strcpy( y, "hello0world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "0.0 test #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "0.0 test #2 return code");
+
+ // Check 41
+ ret = sprintf(x, "hello%1.1fworld",0.0);
+ my_strcpy( y, "hello0.0world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "0.0 test #3");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "0.0 test #3 return code");
+
+ // Check 42
+ ret = sprintf(x, "hello%5.1fworld",0.0);
+ my_strcpy( y, "hello 0.0world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "0.0 test #4");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "0.0 test #4 return code");
+
+ // Check 43
+ ret = sprintf(x, "hello%fworld",-0.0);
+ my_strcpy( y, "hello-0.000000world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "-0.0 test #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "-0.0 test #1 return code");
+
+ // Check 44
+ ret = sprintf(x, "hello%fworld",0.234);
+ my_strcpy( y, "hello0.234000world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "number less than 1 #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "number less than 1 #1 return code");
+
+ // Check 45
+ ret = sprintf(x, "hello%02fworld",-0.234);
+ my_strcpy( y, "hello-0.234000world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "number less than 1 #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "number less than 1 #2 return code");
+
+ // Check 46
+ ret = sprintf(x, "hello%02.2fworld",-0.234);
+ my_strcpy( y, "hello-0.23world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "number less than 1 #3");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "number less than 1 #3 return code");
+
+ // Check 47
+ ret = sprintf(x, "hello%06.2fworld",-0.234);
+ my_strcpy( y, "hello-00.23world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "number less than 1 #4");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "number less than 1 #4 return code");
+
+ // Check 48
+ ret = sprintf(x, "hello%-6.2fworld",2.345);
+ my_strcpy( y, "hello2.35 world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "left justification #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "left justification #1 return code");
+
+ // Check 49
+ ret = sprintf(x, "hello%-6.2fworld",2.345);
+ my_strcpy( y, "hello2.35 world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "left justification #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "left justification #2 return code");
+
+ // Check 50
+ ret = sprintf(x, "hello%-3.2fworld",2.345);
+ my_strcpy( y, "hello2.35world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "left justification #3");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "left justification #3 return code");
+
+ // Check 51
+ ret = sprintf(x, "hello%#1.0fworld",2.12);
+ my_strcpy( y, "hello2.world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "# modifier #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "# modifier #1 return code");
+
+ // Check 52
+ ret = sprintf(x, "hello%#1.2fworld",2.0);
+ my_strcpy( y, "hello2.00world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "# modifier #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "# modifier #2 return code");
+
+ // Check 53
+ ret = sprintf(x, "hello%eworld",2.3456);
+ my_strcpy( y, "hello2.345600e+00world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%e #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "%e #1 return code");
+
+ // Check 54
+ ret = sprintf(x, "hello%4.3eworld",-2.3456e-1);
+ my_strcpy( y, "hello-2.346e-01world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%e #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "%e #2 return code");
+
+ // Check 55
+ ret = sprintf(x, "hello%4.2eworld",2.56e2);
+ my_strcpy( y, "hello2.56e+02world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%e #3");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "%e #3 return code");
+
+ // Check 56
+ ret = sprintf(x, "hello%09.2eworld",2.56e2);
+ my_strcpy( y, "hello02.56e+02world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%e #4");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "%e #4 return code");
+
+ // Check 57
+ ret = sprintf(x, "hello%09.2Eworld",4.23e19);
+ my_strcpy( y, "hello04.23E+19world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%e #5");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "%e #5 return code");
+
+ // Check 58
+ ret = sprintf(x, "hello%gworld",4.0);
+ my_strcpy( y, "hello4world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%g #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "%g #1 return code");
+
+ // Check 59
+ ret = sprintf(x, "hello%gworld",4.56);
+ my_strcpy( y, "hello4.56world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%g #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "%g #2 return code");
+
+ // Check 60
+ ret = sprintf(x, "hello%5.2gworld",4.56);
+ my_strcpy( y, "hello 4.6world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%g #3");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "%g #3 return code");
+
+ // Check 61
+ ret = sprintf(x, "hello%gworld",0.002);
+ my_strcpy( y, "hello0.002world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%g #4");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "%g #4 return code");
+
+ // Check 62
+ ret = sprintf(x, "hello%06.1gworld",0.0026);
+ my_strcpy( y, "hello00.003world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%g #5");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "%g #5 return code");
+
+ // Check 63
+ ret = sprintf(x, "hello%06gworld",0.000026);
+ my_strcpy( y, "hello2.6e-05world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%g #5");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "%g #5 return code");
+
+ // Check 64
+ ret = sprintf(x, "hello%06Gworld",0.000037);
+ my_strcpy( y, "hello3.7E-05world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%g #6");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "%g #6 return code");
+
+ // Check 65
+ ret = sprintf(x, "hello%08Gworld",-123456.0);
+ my_strcpy( y, "hello-0123456world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%g #7");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "%g #7 return code");
+
+ // Check 66
+ ret = sprintf(x, "hello%07gworld",-1234567.0);
+ my_strcpy( y, "hello-1.23457e+06world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%g #8");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "%g #8 return code");
+
+ // Check 67
+ ret = sprintf(x, "hello%013Gworld",-1234567.0);
+ my_strcpy( y, "hello-01.23457E+06world");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%g #9");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y), "%g #9 return code");
+
+
+#else
+ CYG_TEST_PASS("Floating point tests skipped - not configured");
+#endif // ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+
+ // Long string tests
+ ret = sprintf(x, "This is a very long string so I hope this works as "
+ "otherwise I would be very, very, sad. The cat sat on the "
+ "hat, and the mat sat on the rat. Quick brown fax, etc.etc. "
+ "blah, blah and all that jazz. Isn't he finished yet? My "
+ "old man's a dustman, why do I have to think up this "
+ "drivel, isn't that what summer students are for, if "
+ "anything that seems thinking up mindless drivel seems to "
+ "be their occupation in life. Yoof of today, eh? What, "
+ "what? %s So there.",
+ "And this is a middly bit.");
+ my_strcpy(y, "This is a very long string so I hope this works as "
+ "otherwise I would be very, very, sad. The cat sat on the "
+ "hat, and the mat sat on the rat. Quick brown fax, etc.etc. "
+ "blah, blah and all that jazz. Isn't he finished yet? My "
+ "old man's a dustman, why do I have to think up this "
+ "drivel, isn't that what summer students are for, if "
+ "anything that seems thinking up mindless drivel seems to "
+ "be their occupation in life. Yoof of today, eh? What, "
+ "what? And this is a middly bit. So there.");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "long (480 char) string output #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "long (480 char) string output #1 return code");
+
+ ret = sprintf(x, "Boo! This %s So there.",
+ "is a very long string so I hope this works as "
+ "otherwise I would be very, very, sad. The cat sat on the "
+ "hat, and the mat sat on the rat. Quick brown fax, etc.etc. "
+ "blah, blah and all that jazz. Isn't he finished yet? My "
+ "old man's a dustman, why do I have to think up this "
+ "drivel, isn't that what summer students are for, if "
+ "anything that seems thinking up mindless drivel seems to "
+ "be their occupation in life. Yoof of today, eh? What, "
+ "what? And this is a middly bit.");
+ my_strcpy(y, "Boo! This is a very long string so I hope this works as "
+ "otherwise I would be very, very, sad. The cat sat on the "
+ "hat, and the mat sat on the rat. Quick brown fax, etc.etc. "
+ "blah, blah and all that jazz. Isn't he finished yet? My "
+ "old man's a dustman, why do I have to think up this "
+ "drivel, isn't that what summer students are for, if "
+ "anything that seems thinking up mindless drivel seems to "
+ "be their occupation in life. Yoof of today, eh? What, "
+ "what? And this is a middly bit. So there.");
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "long (485 char) string output #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(y),
+ "long (485 char) string output #2 return code");
+
+
+
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "sprintf() function");
+
+} // test()
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "sprintf() function");
+ CYG_TEST_INFO("These test individual features separately");
+
+ test(0);
+
+ return 0;
+} // main()
+
+// EOF sprintf1.c
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/tests/sprintf2.c b/cesar/ecos/packages/language/c/libc/stdio/current/tests/sprintf2.c
new file mode 100644
index 0000000000..dcabb044f5
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/tests/sprintf2.c
@@ -0,0 +1,196 @@
+//=================================================================
+//
+// sprintf2.c
+//
+// Testcase for C library sprintf()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Description: Contains testcode for C library sprintf() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <stdio.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int
+my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static int
+my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *
+my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+
+static void
+test( CYG_ADDRWORD data )
+{
+ static char x[200];
+ static char y[200];
+ static char z[200];
+ int ret;
+ int tmp;
+ int *ptr;
+
+ // Check 1
+ my_strcpy(x, "I'm afraid the shield generator");
+ ptr = &tmp;
+ ret = sprintf(y, "%s%n will be quite operational - %5d%%%c%05X", x,
+ ptr, 13, '5', 0x89ab);
+ my_strcpy( z, "I'm afraid the shield generator will be "
+ "quite operational - 13%5089AB" );
+ CYG_TEST_PASS_FAIL(my_strcmp(y,z) == 0, "%s%n%d%%%c%0X test");
+
+ CYG_TEST_PASS_FAIL(ret == my_strlen(z),
+ "%s%n%d%%%c%0X test return code" );
+
+ CYG_TEST_PASS_FAIL(tmp==31, "%n test");
+
+ // Check 2
+ ret = sprintf(y, "|%5d|%10s|%03d|%c|%o|", 2, "times", 6, '=', 10 );
+ my_strcpy(z, "| 2| times|006|=|12|");
+
+ CYG_TEST_PASS_FAIL(my_strcmp(y,z) == 0, "|%5d|%10s|%03d|%c|%o| test");
+
+ CYG_TEST_PASS_FAIL(ret == my_strlen(z),
+ "|%5d|%10s|%03d|%c|%o| test return code" );
+
+ // Check 3
+ ret = snprintf(y, 19, "print up to here >< and not this bit" );
+ my_strcpy(z, "print up to here >");
+ CYG_TEST_PASS_FAIL(my_strcmp(y,z) == 0, "simple snprintf test #1");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(z),
+ "simple snprintf test #1 return code" );
+
+ // Check 4
+ ret = snprintf(y, 31, "print a bit of this number: %05d nyer", 1234);
+ my_strcpy(z, "print a bit of this number: 01");
+ CYG_TEST_PASS_FAIL(my_strcmp(y,z) == 0, "simple snprintf test #2");
+ CYG_TEST_PASS_FAIL(ret == my_strlen(z),
+ "simple snprintf test #2 return code" );
+
+#ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+
+ CYG_TEST_INFO("Starting floating point specific tests");
+
+ // Check 5
+ ret = sprintf(y, "|%5f|%10s|%03d|%c|%+-5.2G|%010.3G|",
+ 2.0, "times", 6, '=', 12.0, -2.3451e-6 );
+ my_strcpy(z, "|2.000000| times|006|=|+12 |-02.35E-06|");
+
+ CYG_TEST_PASS_FAIL(my_strcmp(y,z) == 0,
+ "|%5f|%10s|%03d|%c|%+-5.2G|%010.3G| test");
+
+ CYG_TEST_PASS_FAIL(ret == my_strlen(z),
+ "|%5f|%10s|%03d|%c|%+-5.2G|%010.3G| test "
+ "return code" );
+
+ // Check 6
+ ret = snprintf(y, 20, "bit of this: %g double", 6.431e8);
+ my_strcpy(z, "bit of this: 6.431e");
+ CYG_TEST_PASS_FAIL(my_strcmp(y,z) == 0,
+ "snprintf double test #1");
+
+ CYG_TEST_PASS_FAIL(ret == my_strlen(z),
+ "snprintf double test #1 return code");
+
+#endif // ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__
+ " for C library sprintf() function");
+
+} // test()
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C "
+ "library sprintf() function");
+ CYG_TEST_INFO("These test combinations of sprintf() features");
+
+ test(0);
+
+ return 0;
+} // main()
+
+// EOF sprintf2.c
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/tests/sscanf.c b/cesar/ecos/packages/language/c/libc/stdio/current/tests/sscanf.c
new file mode 100644
index 0000000000..3b9f8a8f6b
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/tests/sscanf.c
@@ -0,0 +1,316 @@
+//=================================================================
+//
+// sscanf.c
+//
+// Testcase for C library sscanf()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Description: Contains testcode for C library sscanf() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <stdio.h>
+#include <cyg/infra/testcase.h>
+
+// HOW TO START TESTS
+
+#if defined(CYGFUN_LIBC_STDIO_ungetc)
+
+# define START_TEST( test ) test(0)
+
+#else
+
+# define START_TEST( test ) CYG_EMPTY_STATEMENT
+
+#endif
+
+
+// FUNCTIONS
+
+#if defined(CYGFUN_LIBC_STDIO_ungetc)
+
+// Functions to avoid having to use libc strings
+
+static int
+my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0')
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *
+my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+static void
+test( CYG_ADDRWORD data )
+{
+ static char x[300];
+ static char y[300];
+ char z[20];
+ int ret;
+ int int_test, int_test2, int_test3, int_test4;
+
+ // Check 1
+ my_strcpy(x, "20");
+ ret = sscanf(x, "%d", &int_test);
+ CYG_TEST_PASS_FAIL(int_test==20, "%d test");
+ CYG_TEST_PASS_FAIL(ret == 1, "%d test return code");
+
+ // Check 2
+ my_strcpy(y, "PigsNoses");
+ ret = sscanf(y, "%s", x);
+ CYG_TEST_PASS_FAIL(my_strcmp(x, y)==0, "%s test");
+ CYG_TEST_PASS_FAIL(ret == 1, "%s test return code");
+
+ // Check 3
+ my_strcpy(x, "FE8C");
+ ret = sscanf(x, "%X", &int_test);
+ CYG_TEST_PASS_FAIL(int_test == 65164, "hex read leading zeroes");
+ CYG_TEST_PASS_FAIL(ret == 1, "hex read leading zeroes return code");
+
+ // Check 4
+ my_strcpy(x, "000053Ba");
+ ret = sscanf(x, "%x", &int_test);
+ CYG_TEST_PASS_FAIL(int_test == 21434, "hex read leading zeroes");
+ CYG_TEST_PASS_FAIL(ret == 1, "hex read leading zeros return code");
+
+ // Check 5
+ my_strcpy(x, "53Ba");
+ ret = sscanf(x, "%3x", &int_test);
+ CYG_TEST_PASS_FAIL(int_test == 1339, "hex read constrained width");
+ CYG_TEST_PASS_FAIL(ret == 1, "hex read constrained width return code");
+
+ // Check 6
+ my_strcpy(x, "get the first char test");
+ ret = sscanf(x, "%c", &y[0]);
+ CYG_TEST_PASS_FAIL(y[0] == 'g', "%c test");
+ CYG_TEST_PASS_FAIL(ret == 1, "%c test return code");
+
+ // Check 7
+ my_strcpy(x, "-5");
+ ret = sscanf(x, "%d", &int_test);
+ CYG_TEST_PASS_FAIL(int_test == -5, "negative integer");
+ CYG_TEST_PASS_FAIL(ret == 1, "negative integer return code");
+
+ // Check 8
+ my_strcpy(x, "53");
+ ret = sscanf(x, "%o", &int_test);
+ CYG_TEST_PASS_FAIL(int_test == 43, "%o test");
+ CYG_TEST_PASS_FAIL(ret == 1, "%o test return code");
+
+ // Check 9
+ int_test=10;
+ my_strcpy(x, "-5 0");
+ ret = sscanf(x, "%*d %d", &int_test);
+ CYG_TEST_PASS_FAIL(int_test == 0, "assignment suppression");
+ CYG_TEST_PASS_FAIL(ret == 1, "assignment suppression return code");
+
+ // Check 10
+ int_test=0;
+ my_strcpy(x, "052");
+ ret = sscanf(x, "%i", &int_test);
+ CYG_TEST_PASS_FAIL(int_test == 42, "octal with %i");
+ CYG_TEST_PASS_FAIL(ret == 1, "octal with %i return code");
+
+ // Check 10
+ int_test=0;
+ my_strcpy(x, "0x05f");
+ ret = sscanf(x, "%i", &int_test);
+ CYG_TEST_PASS_FAIL(int_test == 95, "hex with %i");
+ CYG_TEST_PASS_FAIL(ret == 1, "hex with %i return code");
+
+ // Check 11
+ int_test=0;
+ my_strcpy(x, "+023456");
+ ret = sscanf(x, "%u", &int_test);
+ CYG_TEST_PASS_FAIL(int_test == 23456, "unsigned int with %u");
+ CYG_TEST_PASS_FAIL(ret == 1, "unsigned int with %u return code");
+
+ // Check 12
+ my_strcpy(x, "aString 2747 D");
+ ret = sscanf(x, "%s %d %c", y, &int_test, z);
+ CYG_TEST_PASS_FAIL( (my_strcmp(y, "aString")==0) &&
+ (int_test == 2747) &&
+ (z[0] == 'D'), "A few combinations #1");
+ CYG_TEST_PASS_FAIL(ret == 3, "Combinations #1 return code");
+
+
+ // Check 13
+ my_strcpy(x, "-6 52 awurble 2747 xxx");
+ ret = sscanf(x, "%d %u %s %2d %n %c",
+ &int_test, &int_test2, y, &int_test3, &int_test4, z);
+ CYG_TEST_PASS_FAIL( (int_test == -6) && (int_test2 == 52) &&
+ (my_strcmp(y, "awurble")==0) &&
+ (int_test3 == 27) &&
+ (int_test4 == 16) &&
+ (z[0] == '4'), "A few combinations #2");
+ CYG_TEST_PASS_FAIL(ret == 5, "Combinations #2 return code");
+
+
+#ifdef CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT
+
+// How much _relative_ error do we allow?
+#define FLT_TOLERANCE 1.0e-3
+
+#define MY_FABS(x) ((x) < 0.0 ? -(x) : (x))
+
+ CYG_TEST_INFO("Starting floating point specific tests");
+
+ {
+ float flt_test, wanted;
+
+ // Check 14
+ my_strcpy(x, "2.5");
+ wanted = 2.5;
+ ret = sscanf(x, "%f", &flt_test);
+ CYG_TEST_PASS_FAIL( MY_FABS(flt_test - wanted) <
+ MY_FABS(wanted * FLT_TOLERANCE),
+ "Simple %f test #1" );
+ CYG_TEST_PASS_FAIL( ret == 1, "Simple %f test #1 return code" );
+
+
+ // Check 15
+ my_strcpy(x, "-23.472345");
+ wanted = -23.472345;
+ ret = sscanf(x, "%f", &flt_test);
+ CYG_TEST_PASS_FAIL( MY_FABS(flt_test - wanted) <
+ MY_FABS(wanted * FLT_TOLERANCE),
+ "Simple %f test #2" );
+ CYG_TEST_PASS_FAIL( ret == 1, "Simple %f test #2 return code" );
+
+ // Check 16
+ my_strcpy(x, "0.0");
+ ret = sscanf(x, "%f", &flt_test);
+ CYG_TEST_PASS_FAIL( flt_test==0.0, "Simple %f test 0.0" );
+ CYG_TEST_PASS_FAIL( ret == 1, "Simple %f test 0.0 return code" );
+
+
+ // Check 17
+ my_strcpy(x, "-2.6334e00");
+ wanted = -2.6334;
+ ret = sscanf(x, "%e", &flt_test);
+ CYG_TEST_PASS_FAIL( MY_FABS(flt_test - wanted) <
+ MY_FABS(wanted * FLT_TOLERANCE),
+ "Simple %e test #1" );
+ CYG_TEST_PASS_FAIL( ret == 1, "Simple %e test #1 return code" );
+
+
+ // Check 18
+ my_strcpy(x, "-2.56789e-06");
+ wanted = -2.56789e-06;
+ ret = sscanf(x, "%e", &flt_test);
+ CYG_TEST_PASS_FAIL( MY_FABS(flt_test-wanted) <
+ MY_FABS(wanted * FLT_TOLERANCE),
+ "Simple %e test #2" );
+ CYG_TEST_PASS_FAIL( ret == 1, "Simple %e test #2 return code" );
+
+
+ // Check 19
+ my_strcpy(x, "-2.12389e-06");
+ wanted = -2.12389e-06;
+ ret = sscanf(x, "%g", &flt_test);
+ CYG_TEST_PASS_FAIL( MY_FABS(flt_test-wanted) <
+ MY_FABS(wanted * FLT_TOLERANCE),
+ "Simple %g test #1" );
+ CYG_TEST_PASS_FAIL( ret == 1, "Simple %g test #1 return code" );
+
+ // Check 20
+ my_strcpy(x, "1.3423345");
+ wanted = 1.342335;
+ ret = sscanf(x, "%g", &flt_test);
+ CYG_TEST_PASS_FAIL( MY_FABS(flt_test-wanted) <
+ MY_FABS(wanted * FLT_TOLERANCE),
+ "Simple %g test #2" );
+ CYG_TEST_PASS_FAIL( ret == 1, "Simple %g test #2 return code" );
+
+
+ } // compound
+
+#else
+ CYG_TEST_PASS("Floating point tests skipped - not configured");
+#endif // ifdef CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT
+
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "sscanf() function");
+
+} // test()
+
+#endif // defined(CYGFUN_LIBC_STDIO_ungetc)
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "sscanf() function");
+
+ START_TEST( test );
+
+ CYG_TEST_NA("Testing is not applicable to this configuration");
+} // main()
+
+
+// EOF sscanf.c
diff --git a/cesar/ecos/packages/language/c/libc/stdio/current/tests/stdiooutput.c b/cesar/ecos/packages/language/c/libc/stdio/current/tests/stdiooutput.c
new file mode 100644
index 0000000000..6a8f245fb3
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdio/current/tests/stdiooutput.c
@@ -0,0 +1,208 @@
+//=================================================================
+//
+// stdiooutput.c
+//
+// Testcase for miscellaneous C library output functions
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-20
+// Description: Contains testcode for C library stdio output
+// functions
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdio.h> // Configuration header
+
+// INCLUDES
+
+#include <stdio.h> // All the stdio functions
+#include <errno.h> // errno
+#include <cyg/infra/testcase.h> // Testcase API
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ int i;
+
+
+ // Check 1
+ CYG_TEST_INFO("Expect: Hello printf world 42!");
+ printf("Hello printf %s %d!\n", "world", 42);
+
+ // Check 2
+ CYG_TEST_INFO("Expect: This is fprintf 0x07f!");
+ fprintf(stdout, "This is fprintf 0x%03x!\n", 0x7f);
+
+ // Check 3
+ CYG_TEST_INFO("Expect: char tests");
+ fputc( 'c', stderr );
+ putc( 'h', stdout );
+ putchar( 'a' );
+ fputc( 'r', stdout );
+ putchar( ' ' );
+ fflush(stdout);
+ putc( 't', stderr );
+ fputc( 'e', stdout );
+ putchar( 's' );
+ fflush( NULL );
+ putc( 't', stderr );
+ fputc( 's', stderr );
+ putchar( '\n' );
+
+ // Check 4
+ CYG_TEST_INFO("Expect: puts test");
+ puts("puts test");
+
+ // Check 5
+ CYG_TEST_INFO("Expect: fputs test");
+ fputs( "fputs test\n", stdout );
+
+ // Check 6
+ CYG_TEST_INFO("Expect: fwrite test");
+ fwrite( "fwrite test\n", 6, 2, stderr );
+
+ // Check 7
+ CYG_TEST_INFO("Expect: wibble: No error");
+ errno = ENOERR;
+ perror( "wibble" );
+
+ // Check 8
+ CYG_TEST_INFO("Expect: Long string test!\nSitting on the side of the "
+ "highway waiting to catch speeding drivers, a State "
+ "Police Officer sees a car puttering along at 22 MPH. "
+ "He thinks to himself, \"This driver is just as "
+ "dangerous as a speeder!\" So he turns on his lights "
+ "and pulls the driver over. Approaching the car, "
+ "he notices that there are five old ladies-two in "
+ "the front seat and three in the back-wide eyed and "
+ "white as ghosts. The driver, obviously confused, says "
+ "to him, \"Officer, I don't understand, I was doing "
+ "exactly the speed limit! What seems to be the "
+ "problem?\" \"Ma'am,\" the officer replies, \"you "
+ "weren't speeding, but you should know that driving "
+ "slower than the speed limit can also be a danger to "
+ "other drivers.\" \"Slower than the speed limit? No "
+ "sir, I was doing the speed limit exactly...Twenty-two "
+ "miles an hour!\" the old woman says a bit proudly. "
+ "The State Police officer, trying to contain a "
+ "chuckle explains to her that \"22\" was the route "
+ "number, not the speed limit. A bit embarrassed, the "
+ "woman grinned and thanked the officer for pointing "
+ "out her error. \"But before I let you go, Ma'am, I "
+ "have to ask... Is everyone in this car OK? These "
+ "women seem awfully shaken and they haven't muttered a "
+ "single peep this whole time,\" the officer asks. \"Oh, "
+ "they'll be all right in a minute officer. We just got "
+ "off Route 119\".");
+
+ printf("Long string test!\nSitting on the side of the "
+ "highway waiting to catch speeding drivers, a State "
+ "Police Officer sees a car puttering along at %d MPH. "
+ "He thinks to himself, \"This driver is just as "
+ "dangerous as a speeder!\" So he turns on his lights "
+ "and pulls the driver over. Approaching the car, "
+ "he notices that there are five old ladies-two in "
+ "the front seat and three in the back-wide eyed and "
+ "white as ghosts. The driver, obviously confused, says "
+ "to him, \"Officer, I don't understand, I was doing "
+ "exactly the speed limit! What seems to be the "
+ "problem?\" \"Ma'am,\" the officer replies, \"you "
+ "weren't speeding, but you should know that driving "
+ "slower than the speed limit can also be a danger to "
+ "other drivers.\" \"Slower than the speed limit? No "
+ "sir, I was doing the speed limit exactly...Twenty-two "
+ "miles an hour!\" the old woman says a bit proudly. "
+ "The State Police officer, trying to contain a "
+ "chuckle explains to her that \"%d\" was the route "
+ "number, not the speed limit. A bit embarrassed, the "
+ "%coman grinned and thanked the officer for pointing "
+ "out her error. \"But before I let you go, Ma'am, I "
+ "have to ask... Is everyone in this car OK? These "
+ "women seem awfully shaken and they haven't muttered a "
+ "single peep this whole time,\" the officer asks. \"Oh, "
+ "they'll be all right in a minute officer. We just got "
+ "off Route %d\".\n", 22, 22, 'w', 119);
+
+ // Check 9
+ CYG_TEST_INFO("Expect: Another puts test, just for fun");
+ puts("Another puts test, just for fun");
+
+ // Check 10
+ CYG_TEST_INFO("Expect: more fputs testing");
+ fputs( "more fputs testing\n", stderr );
+
+ // Check 11
+ CYG_TEST_INFO("Expect all the numbers from 1 to 100 in 5 columns");
+ for (i=1; i<101; ++i) {
+
+ printf("%5d ", i);
+ if (i%5 == 0)
+ fputc( '\n', stdout);
+
+ } // for
+
+ CYG_TEST_PASS("Stdio output tests completed");
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__
+ " for C library stdio output functions");
+
+} // test()
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C "
+ "library stdio output functions");
+ CYG_TEST_INFO("The output of these tests needs to be manually "
+ "verified.");
+
+ test(0);
+
+ return 0;
+
+} // main()
+
+// EOF stdiooutput.c
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/ChangeLog b/cesar/ecos/packages/language/c/libc/stdlib/current/ChangeLog
new file mode 100644
index 0000000000..ed5d53f310
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/ChangeLog
@@ -0,0 +1,99 @@
+2004-08-18 Fredrik Hederstierna <fredrik@wespot.com>
+2004-08-18 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/strtoll.cxx, src/strtoull.cxx: New files. Support for long long
+ string conversion.
+ * cdl/stdlib.cdl (CYGFUN_LIBC_STDLIB_CONV_LONGLONG): New option
+ to build above new files configurably.
+ * include/atox.inl: Prototype new functions from above. Add atoll()
+ inline.
+
+2004-02-17 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/rand.cxx (srand): Use correct thread data type.
+ (rand): Ditto.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/stdlib.cdl: Fix doc link.
+
+2001-06-28 Jesper Skov <jskov@redhat.com>
+
+ * tests/atoi.c (main): Fix warning.
+
+2001-06-18 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/stdlib.cdl: requires string functions, so say so.
+
+2001-02-14 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/rand.cxx: Fix typo
+
+2000-08-03 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/getenv.cxx: Revert nickg's change of 2000-06-07. environ is
+ meant to be determined by the startup environment (normally in
+ CYGPKG_LIBC_STARTUP), not getenv.
+
+2000-07-27 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/stdlib.cdl: Require CYGINT_ISO_CTYPE because we need the iswhite()
+ etc. funs
+
+2000-07-04 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/stdlib.cdl: Remove all parts of malloc implementation and
+ move to new separate package CYGPKG_MEMALLOC
+
+ * src/malloc.cxx, tests/malloc1.c, tests/malloc2.c, tests/malloc3.c,
+ tests/realloc.c: remove - moved to CYGPKG_MEMALLOC
+
+2000-06-07 Nick Garnett <nickg@cygnus.co.uk>
+
+ * tests/realloc.c: Include correct pkgconf file.
+
+ * src/getenv.cxx: Removed externC from definition of environ, so
+ that is actually gets defined.
+
+2000-05-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * New package
+ Separated original libc out into separate packages on functional
+ boundaries.
+ Header files are now managed by isoinfra package
+ Plenty of cleanups done, but no major functionality changes
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/ChangeLog.libc b/cesar/ecos/packages/language/c/libc/stdlib/current/ChangeLog.libc
new file mode 100644
index 0000000000..88fb2f11f2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/ChangeLog.libc
@@ -0,0 +1,2736 @@
+This ChangeLog file is now obsolete. This is the original ChangeLog from when
+libc was one large package, before being separated. It is included for
+historical reasons.
+
+2000-04-05 Jesper Skov <jskov@redhat.com>
+
+ * src/time/settime.cxx:
+ * src/time/time.cxx:
+ Wallclock moved to io/.
+
+2000-03-28 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/string.cdl,
+ cdl/stdlib.cdl,
+ cdl/stdio.cdl,
+ cdl/libc.cdl:
+
+ Adjust documentation URLs.
+
+2000-03-27 Jesper Skov <jskov@redhat.com>
+
+ * src/clibincl/stream.inl (check_this): Use cyb_bool instead of bool.
+
+2000-03-06 Jesper Skov <jskov@redhat.com>
+
+ * tests/time/strftime.c (test): Adjust test to match below change.
+
+2000-03-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/time/strftime.cxx (do_format): Make sure %m counts from
+ 1..12 rather than 0..11. Fix for case 103300
+
+2000-02-29 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: Correctly use 'n' parameter to
+ restrict length. Credit due to Andrew Lunn here as well.
+ Resolves 103057-CR-1
+
+ * tests/stdio/sprintf2.c (test):
+ Add snprintf tests to verify the correct behaviour of restricting
+ output length
+
+2000-02-10 Jesper Skov <jskov@redhat.com>
+
+ * tests/signal/signal2.c (main):
+ Also reclaim DATA_TLB_MISS vector if available.
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+
+1999-11-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * cdl/string.cdl:
+ Switch to a single boolean configuration option for code size vs.
+ speed optimization.
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl: Define tests.
+
+1999-10-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: We can now remove Berkeley
+ advertising clause
+ * src/stdlib/div.cxx: ditto
+ * src/stdlib/ldiv.cxx: ditto
+ * src/stdlib/strtol.cxx: ditto
+ * src/stdlib/strtoul.cxx: ditto
+ * src/string/strtok.cxx: ditto
+
+1999-10-19 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl:
+
+ Define CDL options for package-specific CFLAGS.
+
+1999-10-08 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_THREAD_PRIORITY): Change
+ default to 10 to keep test farm happy
+ * cdl/startup.cdl: Likewise
+
+1999-10-07 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Specify radio buttons using CDL interfaces.
+
+1999-10-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * cdl/stdio.cdl: Change default to /dev/ttydiag as per 1999-10-01
+ change below
+ * cdl/startup.cdl: Add new form CDL for the startup changes as
+ per 1999-10-05
+
+1999-10-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/libc.h: Add CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM to allow
+ the user to supply their own stack.
+ Rename CYGNUM_LIBC_MAIN_STACK_SIZE to
+ CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE and reparent under
+ CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM
+ Add CYGNUM_LIBC_MAIN_THREAD_PRIORITY to provide main() thread
+ priority
+
+ * src/support/mainthread.cxx: Add support for user-supplied stack
+ Allow user to specify thread priority
+
+ These changes fix CR 101069
+
+1999-10-01 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE): Change
+ default to /dev/ttydiag to get correct console-like behaviour
+ Also don't preclude use if haldiag package isn't included
+ (case 102065)
+
+1999-09-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (cause_fpe): Try both float and integer
+ division by zero.
+
+1999-09-10 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx (cyg_libc_get_malloc_pool): Added for
+ stress_threads test.
+
+1999-09-07 Jesper Skov <jskov@cygnus.co.uk>
+ PRs 20243, 20433
+ * tests/signal/signal2.c: Disabled test3 on ARM.
+
+1999-09-02 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/assert.h: Make the sense of NDEBUG correct; it is "set"
+ when NOT debugging. Fix for CR 101983-CR-1
+ See Stroustrup, "The C++ Programming Language."
+
+1999-08-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen): Set buffer size 0 when not
+ buffering
+ Fix for case 101868
+
+1999-08-17 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Implement radio buttons using "FIXME radio" hack in
+ description field for now.
+
+1999-08-12 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl:
+ Take advantage of MACRONAME_ENUMVAL macros output by CDL.
+
+1999-08-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf2.c (test): Don't rely on 2.345 being exactly
+ representable in binary as a difference of 1 ulp will make it round
+ the wrong way.
+
+1999-07-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fgetc.cxx:
+ Include outline versions of getc() (actually just a symbol alias for
+ fgetc() ) and getchar()
+ Some minor clean-ups
+ Add tracing/assertions
+
+ * src/stdio/input/fputc.cxx:
+ Likewise (except applied to putc() and putchar())
+
+ * src/stdio/common/stdioinlines.cxx (_puts):
+ Call fputc() not _fputc()
+
+ * src/clibincl/stdiosupp.hxx:
+ Remove now obsolete prototypes for _fgetc() and _fputc()
+
+ * include/stdio.h:
+ Don't bother with getc()/putc() macros any more, just call
+ them as functions
+ Include protos for getc(), putc(), getchar() and putchar() functions
+
+1999-06-21 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for SH EDK7708.
+
+1999-06-11 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h: Make FILEs array types so they won't be
+ given $gp relocations on MIPS targets
+
+1999-05-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/ctime.c: Fixed compiler warning.
+
+1999-05-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main):
+ Update CYGPKG_HAL_TX39 -> CYGPKG_HAL_MIPS_TX39 due to recent MIPS
+ HAL changes
+ Fix for PR 20116
+
+1999-04-30 Jesper Skov <jskov@lassi.cygnus.co.uk>
+ PR 19945/19946 workaround
+ * tests/signal/signal2.c: Disabled test 3 for PowerPC sim.
+
+1999-04-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl:
+ Ensure all calls to cyg_libc_time_year_is_leap() are with the full
+ year, and not the direct contents of a struct tm, which are (year-1900)
+
+1999-04-19 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19308, 19410, 19528
+ * tests/time/clock.c (test): Also disable data cache which may
+ affect timing when tracing/assertions are enabled.
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ Add prototype for new cyg_libc_stdio_flush_all_but() function
+
+ * src/clibincl/stream.hxx:
+ Don't include stdiosupp.hxx any more to prevent circular dependency,
+ therefore manually provide _setvbuf prototype
+ Make sure pkgconf/kernel.h is included before mutex.hxx
+
+ * src/clibincl/stream.inl (Cyg_StdioStream::set_error()):
+ Add missing unlock_me()
+
+ * src/stdio/common/fflush.cxx:
+ Separate most of code for fflush(NULL) into separate
+ cyg_libc_stdio_flush_all_but() function, which has the extra
+ capability of omitting one stream
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Add missing clibincl/stdiosupp.hxx include
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::read()):
+ When reading, ensure we flush all output streams
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::flush_output_unlocked):
+ Flush the device as well
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * src/clibincl/streambuf.inl:
+ * src/clibincl/streambuf.hxx:
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ * include/pkgconf/libc.h:
+ * include/stdio.inl (setbuf):
+ Fix dumb typo: BUFSIZE -> BUFSIZ
+ This fixes PR19837
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * include/stdio.inl (setbuf):
+ Use _IONBF when buf==NULL, and _IOLBF otherwise.
+ Fix for PR 19836
+
+1999-04-15 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Tidy display string capitalization.
+
+1999-04-12 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Clarify CDL description of CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE
+
+ * tests/signal/signal2.c: Try harder to generate an exception by
+ accessing a misaligned address
+ Don't handle SIGTRAP any more
+ Part of fix for PRs 19731/19607
+
+1999-04-07 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19667
+ * src/support/mainthread.cxx:
+ Changed to use the new Cyg_Thread constructor.
+
+1999-04-07 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Use new macro
+ HAL_VSR_SET_TO_ECOS_HANDLER if defined, to wrest control from
+ CygMon, for example, by reinstalling eCos' default VSRs for
+ exceptions that we are provoking.
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx: Include stdlib.h for exit()
+ Fix for PR 19720
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/clock.c (test): Disable instruction cache
+ Hopefully fixes PR 19308
+
+1999-03-29 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for PPC as it cannot
+ trap division by zero.
+
+1999-03-26 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/main.cxx (main): Invoke cyg_user_start() if no kernel
+ Only sensible thing to do in our default main in a non-kernel config
+
+1999-03-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/time.c:
+ Increase MAX_TIMEOUT since the sparclite gets very close to overrunning
+ it even when working.
+ Should return -1 iff CYGSEM_LIBC_TIME_TIME_WORKING isn't defined
+ Cosmetic changes
+
+1999-03-25 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/time/time.c (test): Take into account setting of
+ CYGSEM_LIBC_TIME_SETTIME_WORKING ie. does cyg_libc_time_settime()
+ work? If not, check that it returns an error.
+ This was exposed by the random combo in PR#19479.
+
+1999-03-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1 to
+ CYGIMP_...
+
+ Add another rand implementation CYGIMP_LIBC_RAND_SIMPLE1 which is
+ the default
+
+ Part of fix for PR 19562
+
+ * include/sys/cstartup.h:
+ Tidy and remove unnecessary dependencies
+
+ * src/stdlib/rand.cxx:
+ Rename algorithms from CYGSEM_... to CYGIMP_...
+ Add new "simple1" algorithm
+
+ * tests/ctype/ctype.c:
+ Tidy
+
+ * tests/stdlib/rand3.c:
+ Fix so that 0..RAND_MAX is split evenly over buckets, which it wasn't
+ before
+ Deal with case of RAND_MAX not being divisible by NUM_BUCKETS
+ exactly
+ Increase TEST_LENGTH to 200000 to provide more representative sample
+ Add CYG_TEST_INFO output to help ensure it doesn't time out
+ Tidy
+
+ * tests/stdlib/rand4.c:
+ Only fail if more than _two_ thirds (rather than one third) match.
+ This is because half would match for a perfectly random distribution
+ This is the rest of the fix for PR 19562
+ Cosmetic changes
+
+1999-03-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/mainthread.cxx (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ Use CYGNUM_HAL_STACK_SIZE_TYPICAL for the stack size instead of
+ CYGNUM_HAL_MINIMUM_STACK_SIZE.
+
+1999-03-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak: Add -Wno-format when building strftime otherwise
+ it generates warnings for things that we do want to test (null
+ string, and %y format)
+
+1999-03-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Put brackets back round negative number since sdf says the config
+ tool is fixed now (PR 19537)
+
+ Add new CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1
+ options for different rand() algorithms in a so far failed attempt
+ to fix PR 19562
+
+ * src/stdlib/rand.cxx:
+ Add new optional algorithm from Knuth vol.2
+
+ * tests/stdlib/rand4.c:
+ Some tidies
+ Don't run test when using simplest algorithm
+
+ * tests/signal/signal2.c (main):
+ Don't try to make an FPE on tx39 - its possible to detect but requires
+ too much HAL work to be sensible
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Use HAL_ENABLE_INTERRUPTS() rather than kernel to enable interrupts
+
+1999-03-18 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/PKGconf.mak (TESTS): added rand4 compilation.
+
+ * tests/stdlib/rand4.c: added this test for periodicity in the
+ least significant bit of rand().
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Remove CYGFUN_LIBC_TIME_POSIX dependency
+ on CYGPKG_LIBC_STDIO
+
+ * src/stdlib/itoa.cxx:
+ New file to convert integers to ascii
+
+ * include/stdlib.h:
+ Add proto for new cyg_libc_itoa() function
+
+ * include/time.inl:
+ Rework __asctime_r() to use memcpy() and cyg_libc_itoa() rather than
+ sprintf()
+
+ * src/PKGconf.mak:
+ Build stdlib/itoa.cxx
+
+ The above changes fix PR 19448
+
+1999-03-17 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h: Add #define of __time_t_defined to placate newlib
+ if it is used by accident. This is just a temporary workaround though.
+
+1999-03-16 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/PKGconf.mak: Add compile option to step around ARM compiler bug.
+
+1999-03-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Don't use parentheses for now
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Silence bogus compiler warning
+
+1999-03-16 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Enable SIGSEGV test for
+ i386/Linux.
+
+
+1999-03-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Only enable interrupts if they were disabled
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx:
+ Add FIX ME line as a reminder that the workaround there can go away
+ in future
+
+ * include/pkgconf/libc.h:
+ Add proper define for CYGSEM_LIBC_EXIT_CALLS_FFLUSH
+ Put brackets round negative CYGNUM_LIBC_TIME_DST_DEFAULT_STATE define
+ Fix run time typo
+
+ * include/time.inl (__localtime_r):
+ Include sys/timeutil.h before this to get
+ cyg_libc_time_normalize_structtm()
+
+1999-03-12 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx: Remove 'const' from char arrays since
+ this fails [silently] on ARM when -fwritable-strings (PR19440)
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Compiler warnings fix was
+ slightly broken.
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c (main):
+ Disabling SIGTRAP handling on i386/Linux is not a good idea.
+1999-03-11 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c:
+ Added compiler warnings fix.
+ Added N/A handling for i386/Linux.
+
+1999-03-10 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Force "haldiag" device to be present.
+ 'asctime' and friends need 'stdio' as well.
+
+ * include/time.inl: Fix syntax error on difftime() declaration.
+
+1999-03-08 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx: <cyg/infra/cyg_ass.h> needed for this file.
+
+ * src/stdio/common/vsscanf.cxx (str_read): Fix problem with string
+ pointer [created by merge with new I/O package].
+
+1999-03-05 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add legal values for CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET
+ and CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET.
+
+1999-03-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl (cyg_libc_time_year_is_leap):
+ Fix bug with modulo year 400
+ Fix typo in asctime_r macro
+ Fix gmtime_r, and mktime as a result of testing
+
+ * tests/time/asctime.c, tests/time/ctime.c, tests/time/gmtime.c,
+ tests/time/gmtime.c, tests/time/localtime.c, tests/time/mktime.c,
+ tests/time/strftime.c, tests/time/time.c:
+ New tests
+
+ * tests/PKGconf.mak:
+ Build above new tests
+
+ * include/pkgconf/libc.h:
+ Add reminder FIX ME about extra config option
+
+ * src/time/strftime.cxx:
+ Fix %w and %Y parameters as a result of testing
+
+ * src/time/timeutil.cxx:
+ Fix cyg_libc_time_normalize_structtm() as a result of testing
+ of mktime()
+
+ * tests/time/clock.c:
+ Reformat, remove obsolete bits and tidy
+
+ * include/time.h:
+ Add Cyg_libc_time_dst type and new functions
+ cyg_libc_time_setzoneoffsets(), cyg_libc_time_setdst(),
+ cyg_libc_time_getzoneoffsets(), cyg_libc_time_settime()
+
+ * include/time.inl:
+ Implement the above functions. This allows us to adjust for timezone
+ diffences and set the time.
+ Change localtime() to adjust for STD/DST
+ Change mktime() to adjust for STD/DST
+
+ * include/libc.h:
+ Add new config options CYGSEM_LIBC_TIME_SETTIME_WORKING
+ and component CYGPKG_LIBC_TIME_ZONES containing options
+ CYGNUM_LIBC_TIME_DST_DEFAULT_STATE,
+ CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET,
+ CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET
+
+ * src/strftime.cxx:
+ Adjust handling of %Z to _not_ deal with STD/DST
+
+ * src/time/settime.cxx:
+ New file to implement cyg_libc_time_settime()
+
+ * src/PKGconf.mak:
+ Build settime.cxx
+
+ * src/time/timeutil.cxx:
+ Supply outline versions of cyg_libc_time_setzoneoffsets(),
+ cyg_libc_time_setdst(), and cyg_libc_time_getzoneoffsets()
+ Add variables for STD/DST state
+ Some minor comment changes
+
+ * include/errno.h:
+ Use CYGBLD_ATTRIB_CONST instead of __attribute__((const)) directly
+
+ * include/signal.h:
+ Change format of function comment headers
+
+ * include/signal.inl:
+ Restrict errno.h inclusion to when its actually used
+ Fix a spelling typo
+
+ * include/stdlib.h:
+ Add CYGBLD_ATTRIB_CONST to abs, div, labs, ldiv
+
+ * include/stdlib.inl:
+ Reformat and tidy
+ Include new versions of div and ldiv which are more portable and
+ are cleanly rewritten so aren't covered by the BSD licence, which
+ is now removed
+
+ * src/stdlib/div.cxx, src/stdlib/ldiv.cxx:
+ Non-inline, non-BSD and portable versions of the new versions of div
+ and ldiv from stdlib.inl
+
+ * include/time.h:
+ Much reformatting, tidying and improving comments
+ Change CLOCKS_PER_SEC from 1000 to 1000000
+ Add new functions asctime_r, ctime_r, gmtime_r, localtime_r, clock,
+ difftime, mktime, time, asctime, ctime, gmtime, localtime, strftime
+ Include new time.inl file
+
+ * include/pkgconf/libc.h:
+ Add new options CYGSEM_LIBC_TIME_CLOCK_WORKING,
+ CYGSEM_LIBC_TIME_TIME_WORKING, CYGFUN_LIBC_TIME_POSIX,
+ CYGNUM_LIBC_TIME_CLOCK_TRACE_LEVEL, CYGIMP_LIBC_TIME_ASCTIME_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_INLINE, CYGIMP_LIBC_TIME_DIFFTIME_INLINE,
+ CYGIMP_LIBC_TIME_GMTIME_INLINE, CYGIMP_LIBC_TIME_LOCALTIME_INLINE,
+ CYGIMP_LIBC_TIME_MKTIME_INLINE, CYGIMP_LIBC_TIME_ASCTIME_R_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_R_INLINE, CYGIMP_LIBC_TIME_GMTIME_R_INLINE,
+ and CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE
+
+ * time/asctime.cxx, time/asctime_r.cxx, time/clock.cxx, time/ctime.cxx,
+ time/ctime_r.cxx, time/difftime.cxx, time/gmtime.cxx,
+ time/gmtime_r.cxx, time/localtime.cxx, time/localtime_r.cxx,
+ time/mktime.cxx, time/strftime.cxx, time/time.cxx, time/timeutil.cxx,
+ include/time.inl:
+ New files to implement the new time functions. Many of them simply
+ provide the outline definitions, but the real body of the function
+ comes from time.inl
+
+ * src/PKGconf.mak:
+ Build new .cxx files
+
+ * src/clibincl/stdlibsupp.hxx:
+ Remove _div and _ldiv prototypes since they're no longer needed
+
+ * src/clibincl/timesupp.hxx:
+ Delete as its now obsolete
+
+ * src/time/clock.cxx:
+ Use new CYGSEM_LIBC_TIME_CLOCK_WORKING option to control whether it
+ just returns (clock_t)-1 or not.
+ Much reformatting and tidying
+ Change real imlpementation from _clock to __clock
+ Use CYGBLD_ATTRIB_WEAK_ALIAS now
+
+ * tests/stdlib/div.c, tests/stdlib/ldiv.c:
+ Add some extra tests for handling of negative numbers
+ Reformat and tidy a bit, including removing the test for CYGPKG_LIBC
+ since its now always defined if the test is to be compiled
+
+ * tests/time/clock.c:
+ Remove duplication CYG_TEST_INFO line
+ Check if unimplemented using "(clock_t)-1" and not just "-1"
+
+1999-03-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx:
+ Make sure system() is a weak alias for __system()
+
+ * include/pkgconf/libc.h: Rework CDL description for
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE and change its default to
+ "/dev/haldiag"
+
+ * src/stdio/common/stream.cxx:
+ Check that dev is valid when passed to stream constructor
+
+ * src/stdio/common/stdiosupp.cxx:
+ Tidy
+
+ * src/support/mainthread.cxx: Make this depend on
+ CYGSEM_LIBC_STARTUP_MAIN_THREAD rather than just CYGPKG_KERNEL
+
+1999-03-04 Gary Thomas <gthomas@cygnus.co.uk>
+
+ Merged in changes from 'ecos-new_devs-19990216-branch'
+
+ (1999-02-24 Jonathan Larmour <jlarmour@cygnus.co.uk>)
+
+ * src/stdio/common/stream.cxx:
+ Add "fix me" comments and remove a couple of commented out lines
+
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Revert to using pointer to string for private data, not just string.
+ This preserves the state across multiple calls
+
+ (1999-02-24 Gary Thomas <gthomas@cygnus.co.uk>)
+
+ * src/stdio/common/vsscanf.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/stream.cxx:
+ * src/stdio/common/stdiosupp.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/clibincl/stream.inl:
+ * src/clibincl/stream.hxx:
+ * src/clibincl/stdiosupp.hxx:
+ * include/pkgconf/libc.h: Changes for new I/O system.
+
+1999-03-03 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atexit.c: Forgot to config atexit test for
+ CYGFUN_LIBC_ATEXIT option
+
+ * include/pkgconf/libc.h:
+ Require CYGVAR_KERNEL_THREADS_DATA for CYGSEM_LIBC_PER_THREAD_STRTOK
+ This fixes PR 19362
+ Require CYGPKG_KERNEL for thread safe streams
+ Also don't need "requires CYGPKG_KERNEL" for per-thread rand and errno
+ if we already require a finer granularity kernel option
+
+1999-02-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Fix CYGNUM_LIBC_MAIN_STACK_SIZE by changing
+ CYGPKG_LIBC_STARTUP_MAIN_THREAD -> CYGSEM_LIBC_STARTUP_MAIN_THREAD
+ Fix for PR 19304
+
+1999-02-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx: Add to implement trivial system() call
+ * include/stdlib.h: Add system() prototype
+ * src/PKGconf.mak: Build system.cxx
+
+ * tests/ctype/ctype.c, tests/i18n/setlocale.c, tests/setjmp/setjmp.c,
+ tests/signal/signal1.c, tests/signal/signal2.c,
+ tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdio/stdiooutput.c, tests/stdlib/atexit.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/getenv.c, tests/stdlib/labs.c,
+ tests/stdlib/ldiv.c, tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/realloc.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+ Use CYG_TEST_NA() macro for non-applicable test configurations
+
+1999-02-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/signal.h:
+ * include/signal.inl:
+ * src/signal/raise.cxx:
+ * src/signal/siginit.cxx:
+ * src/signal/signal.cxx:
+ * tests/signal/signal1.c
+ * tests/signal/signal2.c:
+ New files to implement ISO standard signals
+
+ * src/PKGconf.mak (TESTS):
+ * tests/PKGconf.mak (TESTS):
+ Update to build new files above
+
+ * include/stdlib.h:
+ * src/clibincl/stdlibsupp.hxx:
+ Comment and QA changes (including giving better names to some types)
+
+ * include/libc.h:
+ Add new configuration options for signals
+ Add new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+ Add a note to CYGNUM_LIBC_MAIN_STACK_SIZE option that it may be
+ overriden by HAL
+ Add new CYGFUN_LIBC_ATEXIT option and move ...ATEXIT_HANDLERS under
+ it
+ Add new CYGSEM_LIBC_EXIT_CALLS_FFLUSH option
+ Require CYGSEM_LIBC_STARTUP_MAIN_THREAD for "Invoke default static
+ constructors" option
+
+ * src/stdlib/atexit.cxx:
+ Support above CYGFUN_LIBC_ATEXIT and QA changes
+
+ * src/stdlib/exit.cxx:
+ Support for above new libc.h options, and some QA changes
+
+ * src/support/cstartup.cxx:
+ Add support for new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+
+ * src/support/mainthread.cxx:
+ Override main stack size if the HAL has a minimum
+
+ * src/string/strncpy.cxx:
+ Use improved algorithm for aligned copies - imported from newlib
+ QA changes
+
+ * src/stdlib/abort.cxx:
+ Support raise(SIGABRT), and some QA
+
+ * include/errno.h:
+ Add const attribute
+
+ * tests/stdlib/abs.c:
+ QA improvements
+
+1999-02-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Only define cyg_libc_main_thread when
+ the kernel is around.
+
+1999-02-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/clock.c: Joined the two test/NOP checks into
+ one.
+ Increased tolerance in attempt to fix PRs 18737,18787,18846.
+ Fixed typo.
+
+1999-01-28 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ * src/stdlib/rand.cxx:
+ Include <pkgconf/kernel.h> if we use kernel header files
+
+1999-01-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c (test):
+ CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT should be
+ CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT
+ Fix for PR 18786
+
+ * src/string/strtok.cxx:
+ * src/stdio/common/stdiofiles.cxx:
+ * src/errno/errno.cxx:
+ * src/stdlib/rand.cxx:
+ Give mutex protection objects a libc constructor priority
+
+ * src/support/invokemain.cxx:
+ Add prototype for cyg_hal_invoke_constructors()
+
+ * src/support/mainthread.cxx:
+ Give cyg_libc_dummy_constructor_obj a libc constructor priority,
+ and make its class have a public constructor
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/stdin.cxx:
+ Give cyg_libc_stdio_stdin/out/err static objects a libc constructor
+ priority
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ Remove private copy constructor. Needed to make prioritised
+ static constructors work. Fix for PR 18898
+
+1999-01-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx:
+ Include pkgconf/kernel.h otherwise it fails with per-thread errno
+ enabled
+
+ * include/pkgconf/libc.h:
+ Enable per-thread errno by default since that is what POSIX would
+ want
+
+ * tests/time/clock.c (test):
+ Placate compiler by initializing clock_first/second/third anyway,
+ even though they won't be in practice. This is only a test program
+ so adding an extra instruction doesn't matter.
+
+ * src/i18n/locale.cxx (_setlocale):
+ Placate compiler, since it is dumb, by nesting, not serializing, if's
+ This is an idempotent change, but screws up the formatting :-(.
+
+ * src/string/strpbrk.cxx (_strpbrk):
+ Change while loop to do loop to placate compiler. It'll even save an
+ instruction too (wow!)
+
+1999-01-22 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add closing curly brace to CYGPKG_LIBC_STRING_STRTOK definition
+
+1999-01-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h:
+ Tidy up and add to header description
+ Change cyg_get_errno_p() to cyg_libc_get_errno_p()
+ Remove ifdef CYGPKG_LIBC
+
+ * include/sys/file_if.h:
+ Remove - move contents to stdio.h
+
+ * include/stdio.h:
+ Tidy up header description
+ Move FILE typedef here from sys/file_if.h
+ SEEK_SET, SEEK_CUR, SEEK_END defined to 0, 1, 2 respectively
+ for backwards compatibility with old UNIX
+ Change definitions of stdin/out/err to be addresses of FILE
+ globals - even though they're actually Cyg_StdioStream it'll work
+
+ * include/pkgconf/libc.h:
+ Make CYGPRI_LIBC_WEAK et al macros depend on new ones in infra
+ Reorganise trace options under the individual components they are
+ associated with.
+ Reorganise thread-safety options under the individual components
+ they are associated with.
+ Add new CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS option
+ Misc. reformatting
+ Remove dependency on pkgconf/kernel.h - Configuration Tool will
+ generate check macros anyway.
+ Remove CYGPKG_LIBC_TRACE, CYGFUN_LIBC_strtok, CYGPKG_LIBC_RAND
+ options
+ Tidy up description header
+
+ * src/clibincl/clibdata.hxx:
+ * src/clibincl/clibdata.inl:
+ * src/support/clibdata.cxx:
+ Remove and instead rely on each component to initialise its own data
+
+ * src/clibincl/stdiofiles.hxx, src/clibincl/stdiofiles.inl:
+ New files to contain global file list and lock (if applicable).
+ Implemented as class with member access functions
+
+ * src/errno/errno.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Rename cyg_get_errno_p() to cyg_libc_get_errno_p()
+
+ * src/stdio/common/fclose.cxx:
+ * src/stdio/common/fflush.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/stdio/common/freopen.cxx:
+ Remove ifdef CYGPKG_LIBC
+ Use new global file access method from stdiofiles.hxx
+ Tidy up description header
+ Use new CYGBLD_ATTRIB_WEAK_ALIAS
+ Access errno "normally" rather than clibdata way
+
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx
+ * src/stdio/common/stderr.cxx:
+ New files. Implement Cyg_StdioStream objects for each stream. In
+ separate self-contained files so using one doesn't bring in the
+ others
+
+ * src/stdio/common/stdiofiles.cxx:
+ New file. Implements global files array and lock
+
+ * src/stdlib/_exit.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Use infra CYGBLD* macros
+
+ * src/stdlib/malloc.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Add pkgconf/kernel.h now that pkgconf/libc.h doesn't have it
+ Use infra CYGBLD* macros
+ Make pool visible externally with weak attribute and new name
+ cyg_libc_malloc_memorypool
+
+ * src/stdlib/rand.cxx:
+ * src/stdlib/strtok.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Use infra CYGBLD* macros
+
+ * src/support/cstartup.cxx:
+ Split into smaller files to make selective linking work better,
+ fix i386 port problem and make GDB happy
+
+ * src/support/environ.cxx:
+ * src/support/invokemain.cxx:
+ * src/support/main.cxx:
+ * src/support/mainthread.cxx:
+ New files from bits of the old cstartup.cxx
+ Add support for CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+
+ * src/PKGconf.mak:
+ Update to reflect file additions/deletion
+
+ * tests/stdlib/rand1.c:
+ * tests/stdlib/rand2.c:
+ * tests/stdlib/rand3.c:
+ * tests/stdlib/srand.c:
+ Make conform to coding standards
+ Remove ifdef CYGPKG_LIBC_RAND
+ Tidy up description header
+
+ * tests/string/strtok.c:
+ Make conform to coding standards
+ Remove ifdef CYGFUN_LIBC_strtok
+ Tidy up description header
+
+1999-01-15 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/stdlib/getenv.c (main): added tests for the case in which
+ the user does not supply environ and in which the user supplies a
+ NULL environ.
+
+1999-01-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Added workaround for weak aliasing
+ problem in i386 gcc.
+
+
+1999-01-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ (CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE): Change defaults to be
+ more reasonable on small systems.
+
+1999-01-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Minor bug with environ not being initialised correctly by
+ default
+
+1998-12-24 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (Cyg_StdioStream):
+ check_this() member functions should now be const
+
+1998-12-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx (_memchr):
+ treat search value parameter to memchr as an unsigned byte,
+ not a signed int - copied fix from newlib PR 18471
+
+1998-12-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/realloc.c:
+ * tests/stdlib/malloc3.c:
+ * tests/stdlib/malloc2.c:
+ Warning cleanup
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c, tests/stdlib/malloc3.c,
+ tests/stdlib/realloc.c:
+ Only run these tests when we have a coalescing memory allocator
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Only check buffer init success if buffering
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ Check for diff of requested size against buffer_size, not
+ get_buffer_size(), since this may return -1, which won't be
+ equal to size, and will cause malloc to be called
+
+1998-12-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stdlib/getenv.c (main): Don't declare variables when they
+ are not used.
+
+Thu Nov 26 17:59:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/string/strncpy1.c:
+ Fix off-by-one error since it called my_strcmp() and not
+ my_strncmp(), which meant in included the trailing NULL when it
+ shouldn't have.
+
+1998-11-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/qsort.cxx (_qsort):
+ * src/stdlib/rand.cxx (_srand):
+ Changed CYG_REPORT_FUNCNAMETYPE to CYG_REPORT_FUNCNAME in void
+ functions.
+
+Mon Oct 26 18:49:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/cstartup.cxx (cyg_libc_dummy_main):
+ Silence compiler warning with cast of char * to CYG_ADDRWORD
+
+Wed Oct 28 17:31:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clock.cxx (_clock):
+ Reorder scaling expression as it was both incorrect and risked
+ overflow.
+ Fix for PR 18076
+
+Mon Oct 19 14:40:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h (EOF):
+ Change from -64 to (-1), to allow broken code to work :-/
+ Also change other negative defines to be within parentheses
+
+1998-10-19 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated the doc URL
+
+Thu Oct 15 21:33:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Only include kernel thread headers when we're in thread-safe mode
+
+ * src/time/clock.cxx:
+ Only include kernel clock headers if there's a kernel with the
+ right functionality available
+
+ * tests/time/clock.c:
+ Remove unnecessary inclusion of <pkgconf/kernel.h>
+
+ Above changes are required for PR 17229
+
+Wed Oct 14 16:38:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise inclusion of clibincl/stdiosupp.hxx and
+ clibincl/stream.hxx. Tidying up PR 17502
+
+Wed Oct 14 14:08:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGPKG_LIBC_STRING_OPTIMISATIONS to
+ CYGPKG_LIBC_STRING_OPTIMIZATIONS to make it truely merkin.
+
+Tue Oct 13 19:34:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_ARGUMENTS):
+ Add a default argv[0] of "" as many programs assume argc>0
+ The standard allows argv[0] to be "" if the program name
+ is not available
+
+1998-09-26 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ PR 17502: this header file now does nothing if the stdio option
+ is disabled completely. This is the same behaviour is
+ clibincl/stream.hxx, although arguably the #ifdef protection
+ should happen wherever the header file is #include'd rather than
+ in the header file itself.
+
+ * src/clibincl/clibdata.hxx:
+ PR 17502: this header file still #include's internal stdio-related
+ header files and references the FILE structure, even if stdio is
+ disabled. There were some #ifdef's for CYGPKG_LIBC_STDIO already.
+ One more has been added for _fopen() and _fclose().
+
+1998-09-25 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl (Cyg_StdioStreamBuffer):
+ PR 17487: Reorder the calls to initialize member fields, to
+ eliminate a compiler warning.
+
+Fri Sep 25 19:04:29 1998 Jonathan Larmour <jlarmour@peshwari.cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/string/strtok.cxx,
+ src/time/clock.cxx:
+ Only define tracing variable and tracing level macro when
+ the relevant tracing level config options are set. Otherwise
+ keep the tracing level fixed at 0
+ Fix for PR 17476
+
+ * include/pkgconf/libc.h:
+ Define trace levels only if parent CYGPKG_LIBC_TRACE is defined
+ for consistency with Configuration Tool
+
+
+Fri Sep 25 17:24:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Make definition of vscanf() dependent on CYGFUN_LIBC_STDIO_ungetc
+ otherwise _vfscanf() won't be compiled. This therefore would
+ cause a link fail iff selective linking is not enabled.
+ Fix for PR 17455
+
+Fri Sep 25 17:23:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/rand.cxx:
+ Make compilation dependent on CYGPKG_LIBC_RAND
+ Fix for PR 17473
+
+ * tests/stdlib/srand.c:
+ Make definition of dummy test pass conditional on CYGPKG_LIBC_RAND
+ not being defined, as well as CYGPKG_LIBC
+ Caused compilation failure when testing PR 17473 fix
+
+Mon Sep 21 17:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Make sscanf test conditional on CYGFUN_LIBC_STDIO_ungetc since
+ _vfscanf() only gets compiled if this is defined
+ Fix for PR 17346
+
+1998-09-20 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated CDL doc strings.
+
+Fri Sep 18 22:18:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_errno_p):
+ Rather than this function only being available in thread-safe mode,
+ instead make what it returns be either the per-thread errno, or
+ global errno depending on the configuration.
+ Include <errno.h> (conditionally) to support this change
+
+Wed Sep 16 11:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove "fix me" comment which I forgot to remove before
+
+Tue Sep 15 19:27:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Updated descriptions and a few other minor things after review.
+ Notably though, the NDEBUG config option has been removed
+
+1998-09-15 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ PR 17201: removed dependency on CYGPKG_KERNEL in the option
+ CYGNUM_LIBC_MAIN_STACK_SIZE, since the actual dependencies cannot
+ be expressed sensibly in the current system.
+
+1998-09-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Sorting out dependencies for error package.
+
+1998-09-10 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: started adding doc fields to the
+ cdl_package data, as a pilot for now.
+
+Wed Sep 9 17:41:23 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add option CYGIMP_LIBC_MALLOC_CXX_DELETE_CALLS_FREE to explicitly
+ control whether the empty delete functions (currently) in
+ kernel/.../common/delete.cxx are enabled; controls code bloat, see
+ the comments in delete.cxx.
+
+Fri Sep 4 16:43:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add a default CYG_TEST_PASS() to make sure the test infra doesn't
+ complain.
+ Also remove the unused string functionsa
+
+Fri Sep 4 15:43:48 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdlib/exit.cxx (__libc_exit):
+ * src/stdlib/_exit.cxx (__libc__exit):
+ * src/stdlib/malloc.cxx (_free):
+ * src/stdlib/abort.cxx (abort):
+ * src/support/cstartup.cxx (invoke_main):
+ Tracing system asserted cos it was being called incorrectly; these
+ are void functions so you shouldn't give a type to the function
+ reporting call.
+
+Fri Sep 4 15:03:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Fix CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE description to refer to
+ the table.cxx file, not table.h
+
+Fri Sep 4 14:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add description for CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE since
+ Proven won't be making any changes to the device driver
+ implementation after all.
+ Fix for PR 17148
+
+ * src/clibincl/stream.inl (set_position):
+ Remove "fix me" line. It is obvious that this will have to change
+ with a filesystem interface
+ Fix for PR 17147
+
+ * src/stdio/common/freopen.cxx:
+ Remove "fix me" - I know about this issue
+ Fix for PR 17145
+
+ * src/stdio/common/stream.cxx (read):
+ Remove "fix me" and change to use memcpy
+ Fix for PR 17144
+
+Fri Sep 4 14:36:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Actually add it this time!
+
+Fri Sep 4 13:48:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add new tests for misc stdio output functions
+
+ * tests/PKGconf.mak:
+ Build stdiooutput.c test
+
+Fri Sep 4 12:52:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (write_byte):
+ Remove bogus assert
+
+ * tests/stdlib/getenv.c (main):
+ Check whether str is NULL before doing a strcmp()
+
+ * tests/stdio/sprintf2.c (main):
+ Reformat to 76 columns
+
+Fri Sep 4 02:10:54 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/stdio/common/stream.cxx:
+ Add new peek_byte method to Cyg_StdioStream
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix up buffer access to work with new peek_byte method above
+ Fix for PR 16954
+
+Thu Sep 3 19:40:11 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/rand1.c, tests/stdlib/rand2.c,
+ tests/stdlib/rand3.c:
+ Add extra check for CYGPKG_LIBC_RAND to decide whether the test
+ is applicable or not
+
+ * tests/stdlib/rand2.c (test):
+ Use CYGNUM_LIBC_RAND_SEED for default seed, not 1
+
+ * tests/string/strtok.c:
+ Add extra check for CYGFUN_LIBC_strtok to decide whether the
+ test is applicable or not
+
+Wed Sep 2 19:11:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fread.cxx, src/stdio/output/fwrite.cxx:
+ Add fread() and fwrite() functions
+
+ * src/PKGconf.mak:
+ Build fread.cxx and fwrite.cxx from above
+
+ * src/stdio/common/stream.cxx:
+ Reformat to 76 columns
+ In write(), move initialisation of *bytes_written to start
+ In read(), move initialisation of *bytes_read to start
+
+ * include/stdio.h:
+ Reformat to 76 columns
+
+ Replace all references to the ANSI
+ standard to instead by the ISO C standard
+
+ Add commented argument names for "documentation"
+
+ Add fread() and fwrite() prototypes
+
+ * src/clibincl/stdiosupp.hxx:
+ Copy the above changes from stdio.h, and add _fread() and _fwrite()
+ prototypes
+
+ * src/stdio/output/fputs.cxx, src/stdio/input/fgets.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 15:41:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 14:46:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Use trylock_me() instead of lock_me(), and loop to prevent
+ deadlocks
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl:
+ Add trylock_me() method
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/fflush.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 12:24:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change 0x7fff to 0x7fffffff. Oops!
+ give main stack size option a legal_values field
+ Undefine tracing by default
+ Add some more description in the header
+
+Tue Sep 1 20:02:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/i18n/setlocale.c (cyg_package_start):
+ Fix typo - extra "x" for no reason at all! :-)
+
+Tue Sep 1 19:44:58 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx:
+ Fix bug in find_locale_data() that miscalculated size of
+ all_locales
+
+ Make find_locale_data() match the locale "" and add some
+ other things in _setlocale() to ensure that "C" gets returned
+ when the default locale "" is passed.
+
+ Only check the locale pointer when it is non-NULL
+
+ * tests/i18n/setlocale.c:
+ New tests for setlocale()
+
+ * tests/PKGconf.mak:
+ Update to build setlocale.c test
+
+ * src/support/cstartup.cxx:
+ Don't actually call system default main() "main" otherwise GDB
+ gets confused and thinks its the entry point. Instead make a weak
+ alias and call the real function something different.
+
+Tue Sep 1 18:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx (_setlocale):
+ Fix tracing macro name and remove "str maybe used before
+ initialised" warning
+
+ * tests/stdlib/qsort.c:
+ Correct file description header
+
+Tue Sep 1 17:04:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/locale.h, src/clibincl/i18nsupp.hxx, src/i18n/locale.cxx:
+ New files to add support for locales as defined by the ISO C
+ standard. i.e. setlocale() and localeconv() functions and some
+ other bits
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAX_LOCALE_NAME_SIZE config option for locale
+ support
+
+ * src/PKGconf.mak:
+ build locale.cxx
+
+ * include/errno.h, src/clibincl/ctypesupp.hxx:
+ Tidy up to 76 columns
+
+Tue Sep 1 00:24:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Move environment-related options from stdlib into new
+ CYGPKG_LIBC_STARTUP component. Also add options for main()'s
+ arguments (CYGPKG_LIBC_ARGUMENTS), main()'s default stack size
+ (CYGNUM_LIBC_MAIN_STACK_SIZE), number of atexit handlers
+ (CYGNUM_LIBC_ATEXIT_HANDLERS), and whether _exit() stops the
+ system (CYGSEM_LIBC_EXIT_STOPS_SYSTEM).
+
+ * src/clibincl/stdlibsupp.hxx:
+ Fix a few comment bugs, and add new
+ cyg_libc_invoke_atexit_handlers() function prototype
+
+ * src/stdlib/_exit.cxx, src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Implement exit(), atexit() and _exit() correctly now. Also
+ includes cyg_libc_invoke_atexit_handlers() in atexit.cxx. Now
+ we get the correct behaviour of atexit(), and exit() invokes the
+ atexit handlers and fflushs all the stdio streams. Add plenty of
+ tracing of asserts too.
+
+ * src/support/cstartup.cxx:
+ Make main_thread object an exported global. Allow user-settable
+ arguments. Add MUCH more tracing and asserts. Improve comments.
+ Tidy up to 76 columns
+
+ * tests/stdlib/atexit.c:
+ Add simple test for atexit() and it calling registered functions
+
+ * tests/PKGconf.mak:
+ Build atexit.c test
+
+Mon Aug 31 18:54:48 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/getenv.cxx, tests/stdlib/getenv.c:
+ Add support for getenv(), and some tests to ensure it works
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update to include getenv.cxx and getenv.c test
+
+ * src/clibincl/clibdata.hxx:
+ remove prototype for environ - we expect files needing it to
+ define it themselves
+
+ * src/support/clibdata.cxx:
+ Tidy up to 76 columns and add definition of char **environ, but
+ with a configurable initialiser (see libc.h below)
+
+ * tests/stdlib/abs.c (main):
+ Tidy up to 76 columns
+
+ * src/stdlib/malloc.cxx:
+ Tidy up to 76 columns and remove warning for undefined _memcpy()
+ by changing to memcpy(), and casting away signedness
+
+ * include/pkgconf/libc.h:
+ Add CYGPKG_LIBC_ENVIRONMENT and CYGDAT_LIBC_DEFAULT_ENVIRONMENT
+ configuration options
+
+ * include/pkgconf/libc.h, src/clibincl/clibdata.hxx:
+ Tidy up to 76 columns
+
+ * include/stdlib.h:
+ Add getenv() prototype and tidy up to 76 columns
+
+ * src/clibincl/stdlibsupp.hxx:
+ Add _getenv() prototype
+
+Mon Aug 31 13:37:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Add realloc()
+
+ * tests/stdlib/realloc.c:
+ Add this file to test new realloc() functionality
+
+ * tests/PKGconf.mak:
+ Build realloc test
+
+ * tests/stdlib/malloc3.c (main), tests/stdlib/malloc2.c (main),
+ tests/stdlib/malloc1.c (main):
+ Conditionalise local vars to prevent warnings
+
+ * tests/stdlib/malloc3.c (fill_with_data):
+ Move '{' into "verb" line
+
+ * include/pkgconf/libc.h:
+ Require infra tracing support to allow tracing
+
+ * include/stdlib.h:
+ Add realloc()
+
+ * src/clibincl/stdlibsupp.hxx:
+ Update the commented argument names from stdlib.h, including realloc()
+
+1998-08-28 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ * src/clibincl/clibdata.hxx, src/time/clock.cxx:
+
+ Updated for new kernel configuration option symbol names
+
+Fri Aug 28 19:18:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ Changed the entry below to sat "tx39" instead of "mn10300".
+ It's been a long week.
+
+Fri Aug 28 18:59:20 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Add a weakly named main to allow the
+ default configuration to link on the tx39 which has no
+ scalextric linking yet. The static Cyg_Thread main_thread object
+ below continues to exist, though unreferenced, so all its
+ descendants must exist too.
+
+Fri Aug 28 08:54:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h:
+ Add commented argument names Add exit(), and atexit(). And move
+ these along with abort() and _exit() to a new section.
+
+ * src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Add trivial versions of atexit() and exit()
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAIN_STACK_SIZE config option
+
+ * include/sys/cstartup.h, src/support/cstartup.cxx, src/PKGconf.mak:
+ New files to provide a new function cyg_iso_c_support(), which
+ invokes main "correctly".
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/srand.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcoll2.c, tests/string/strcpy1.c,
+ tests/string/strcpy2.c, tests/string/strcspn.c,
+ tests/string/strlen.c, tests/string/strncat1.c,
+ tests/string/strncat2.c, tests/string/strncpy1.c,
+ tests/string/strncpy2.c, tests/string/strpbrk.c,
+ tests/string/strrchr.c, tests/string/strspn.c,
+ tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c,
+ tests/time/clock.c:
+
+ Modify all tests to use new startup mechanism, and cyg_iso_c_start()
+
+Fri Aug 28 00:29:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Add #ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO around all accesses to
+ flags.last_buffer_op_was_read. Fix for PR 16997
+
+Thu Aug 27 01:12:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/sys/file_if.h:
+ Fix comments and remove cyg_get_file_star()
+
+Wed Aug 26 20:24:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove #define CYGPKG_LIBC is that is meant to live in
+ <pkgconf/system.h> after all
+
+Wed Aug 26 19:39:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ More fixes to CDL stuff to make it work better, and look better on
+ the screen
+
+Tue Aug 25 20:21:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Make some fixes after running the ConfigTool
+
+Tue Aug 25 16:46:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_STDIO_BUFSIZE):
+ Fix typo of CYGNUM_LIBC_STDIO_BUFSIZE
+
+Tue Aug 25 15:10:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Tidy up CDL stuff a bit more, prior to checking it actually works.
+
+Tue Aug 25 11:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c (main):
+ Prevent calls to CYG_TEST_STILL_ALIVE for now
+
+Tue Aug 25 05:39:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change cosmetic paragraph alignment.
+
+Tue Aug 25 03:11:34 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Make stderr initialise with buffer size 0.
+ For PR 16955
+
+Mon Aug 24 17:38:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ First pass at CDL-ifying the C library configuration. Currently
+ deliberately disabled as there a few outstanding issues.
+
+Mon Aug 24 16:14:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx (_vfnprintf):
+ clear up warning for unused argument
+
+ * tests/stdlib/malloc2.c (NUM_ITERATIONS):
+ Lower to 100 from 50000 so it won't take too long under the simulator
+
+Thu Aug 20 17:48:43 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Remove now unnecessary inclusion of kernel/ktypes.h
+
+Wed Aug 19 19:19:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c,
+ tests/stdio/sscanf.c, tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c,
+ tests/stdlib/strtoul.c, tests/string/strtok.c,
+ tests/time/clock.c:
+ Add parameters to "main()" to silence warnings
+
+Wed Aug 19 18:52:59 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Put conditional error check into same #ifdef and if as what was being
+ checked in the first place!
+
+Wed Aug 19 18:49:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl:
+ Reorder Cyg_StdioStream::check_this() to be first to silence
+ warnings
+
+Tue Aug 18 16:10:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * ecc/language/c/libc/current/src/clibincl/clibdata.hxx,
+ ecc/language/c/libc/current/src/errno/errno.cxx,
+ ecc/language/c/libc/current/src/stdio/common/fopen.cxx,
+ ecc/language/c/libc/current/src/stdlib/rand.cxx,
+ ecc/language/c/libc/current/src/string/strtok.cxx:
+ Rename CYGIMP_LIBC_INTERNAL_DATA_PREAMBLE,
+ CYGIMP_LIBC_INTERNAL_DATA_ALLOC_CHECK_PREAMBLE,
+ CYGVAR_LIBC_INTERNAL_DATA, and
+ CYGIMP_LIBC_INTERNAL_DATA_CHECK to all have CYGPRI_ prefix instead
+ as recommended by the config name rules
+
+
+Tue Aug 18 14:31:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/setvbuf.cxx (_setvbuf):
+ Rename variable names in assert line, otherwise doesn't build
+ with asserts on!
+
+Sun Aug 16 18:15:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix some bugs, although there are some left to fix still. Unrelated
+ to the rest of the checkins, so I will check the partial fix in now.
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx:
+ Add parameters to constructor to allow more things to be done at
+ construction time.
+
+ Now we have "new", remove separate "construct" method
+
+ Add more documentation on constructor
+
+ As requested by code review, where possible, move boolean flags
+ into separate packed bitfield structure for space efficiency
+
+ Make readbuf_char be usable all the time rather than when configured
+ not to be buffering, as it is also needed for non-buffered mode i.e.
+ _IONBF
+
+ * src/stdio/common/fopen.cxx:
+ Change to use new method of construction from above, using new
+
+ Use thread-specific data, rather than global. And so change errnos
+ to access errno entry specifically
+
+ Make process_mode() check for append mode too
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/stdio/common/setvbuf.cxx:
+
+ Change to cope with different way of dealing with buffering policy
+ flags etc. in Cyg_StdioStream
+
+ * src/stdio/common/vsnprintf.cxx, src/stdio/common/vsscanf.cxx,
+ src/support/clibdata.cxx:
+ Change construction of streams to use new parameters added above,
+ and change to use _IONBF mode for string stdio functions,
+ otherwise its a waste of memory. And use _IONBF for stderr as the
+ ISO standard tells us to!
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Change constructor so that it can be set with default size and
+ dynamic buffer (if applicable)
+
+ Fix minor bug in destructor - should only call free when allocated
+ dynamically
+
+ Change get_buffer_size to return -1 if the buffer was not allowed
+ to be set up
+
+ * src/stdio/common/streambuf.cxx:
+ Remove unnecessary stdio.h include and add extra comment to whether
+ to free bit in set_buffer()
+
+ * src/stdio/common/freopen.cxx:
+ Change @@@ to standard fix me string
+
+ * src/stdio/output/fputc.cxx:
+ Remove unnecessary "written" variable
+
+Thu Aug 13 15:37:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx:
+ Included use of "fix me" line to ensure this is discussed before
+ release
+
+ * include/stdlib.h, src/stdlib/abort.cxx, src/PKGconf.mak:
+ Add abort.cxx to implement abort(), albeit naively
+
+Thu Jul 30 18:03:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/vsscanf.cxx (_vsscanf),
+ src/stdio/common/vsnprintf.cxx (_vsnprintf):
+ Fix initialiser of pseudo string device table that didn't get updated
+ when the table changed (Bad proven, no biscuit).
+
+ * src/clibincl/stream.inl (~Cyg_StdioStream):
+ Move invalidation of magic_validity_word to after unlock_me(),
+ otherwise it always fails!
+
+Tue Jul 28 21:29:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Shorten over-long lines
+
+Tue Jul 28 20:28:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx (class Cyg_StdioStream),
+ src/clibincl/stream.inl, src/stdio/common/stream.cxx:
+ Clarify some comments and get the CYGDBG_DEFINE_CHECK_THIS and
+ CYG_ASSERTCLASS stuff going
+
+ * src/clibincl/stream.inl:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 15:31:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl, src/stdio/common/streambuf.cxx:
+ Move set_buffer() from streambuf.inl to new file streambuf.cxx
+
+ * src/PKGconf.mak (COMPILE):
+ Build new file streambuf.cxx
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ Add METHODS comment
+
+ * src/stdio/common/stream.cxx:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 00:26:36 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.inl, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/div.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/qsort.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/string/strtok.cxx:
+
+ Include proper Berkeley license inline in the file, rather than
+ referring to an external file
+
+ * doc/COPYING.UCB:
+ Remove, now that it isn't referred to any more
+
+Mon Jul 27 23:34:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl, include/errno.h,
+ include/stdio.h, include/stdio.inl, include/stdlib.h,
+ include/stdlib.inl, include/string.h, include/string.inl,
+ include/time.h, include/sys/file_if.h, src/PKGconf.mak,
+ src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/stdiosupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/streambuf.hxx,
+ src/clibincl/streambuf.inl, src/clibincl/stringsupp.hxx,
+ src/clibincl/timesupp.hxx, src/ctype/isalnum.cxx,
+ src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx,
+ src/ctype/islower.cxx, src/ctype/isprint.cxx,
+ src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx,
+ src/ctype/tolower.cxx, src/ctype/toupper.cxx,
+ src/errno/errno.cxx, src/stdio/common/snprintf.cxx,
+ src/stdio/common/sprintf.cxx, src/stdio/common/sscanf.cxx,
+ src/stdio/common/stdioinlines.cxx, src/stdio/common/stream.cxx,
+ src/stdio/common/ungetc.cxx, src/stdio/common/vsnprintf.cxx,
+ src/stdio/common/vsscanf.cxx, src/stdio/input/fgetc.cxx,
+ src/stdio/input/fgets.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/gets.cxx, src/stdio/input/scanf.cxx,
+ src/stdio/output/fnprintf.cxx, src/stdio/output/fprintf.cxx,
+ src/stdio/output/fputc.cxx, src/stdio/output/fputs.cxx,
+ src/stdio/output/printf.cxx, src/stdlib/_exit.cxx,
+ src/stdlib/abs.cxx, src/stdlib/atof.cxx, src/stdlib/atoi.cxx,
+ src/stdlib/atol.cxx, src/stdlib/div.cxx, src/stdlib/labs.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/rand.cxx, src/stdlib/strtod.cxx,
+ src/string/memchr.cxx, src/string/memcmp.cxx,
+ src/string/memmove.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx,
+ src/string/strcoll.cxx, src/string/strcpy.cxx,
+ src/string/strcspn.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx, src/string/strpbrk.cxx,
+ src/string/strrchr.cxx, src/string/strspn.cxx,
+ src/string/strstr.cxx, src/string/strsuppt.cxx,
+ src/string/strtok.cxx, src/string/strxfrm.cxx,
+ src/support/clibdata.cxx, src/time/clock.cxx:
+ Untabify
+
+Mon Jul 27 23:14:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/stdlib/malloc.cxx, src/stdlib/qsort.cxx,
+ tests/ctype/ctype.c, tests/stdlib/rand3.c, tests/stdlib/malloc3.c:
+ Remove all mentions of "register" in variable declarations. Also
+ untabify where needed
+
+ * src/stdlib/bsearch.cxx:
+ Untabify this too
+
+
+Mon Jul 27 22:18:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/fputc.cxx (_fputc):
+ Replace call to stream write() with call to write_byte()
+
+ * src/clibincl/stream.inl (write_byte):
+ Add asserts for stream write() returning odd values for how much has
+ been written
+
+ (bytes_available_to_read):
+ Remove "register" def for variable declaration
+
+Mon Jul 27 22:06:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdiosupp.cxx:
+ Remove #if 0'd cyg_get_file_star() and unnecessary pseudo string
+ device definition
+
+Mon Jul 27 21:57:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h, src/support/clibdata.cxx:
+ Change CYGXXX_LIBC_STDIO_DEFAULT_CONSOLE to
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE
+
+Mon Jul 27 21:49:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/setjmpsupp.hxx,
+ src/clibincl/stdiosupp.hxx, src/clibincl/stdlibsupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl,
+ src/clibincl/stringsupp.hxx, src/clibincl/timesupp.hxx:
+
+ Change CYGONCE_LIBC_*_{HXX,INL} to CYGONCE_LIBC_CLIBINCL_*_{HXX,INL}
+
+Mon Jul 27 21:34:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change #define XXXXX 1 to #define XXXXX where applicable as per code
+ review
+
+ Also remove obsolete CYGIMP_LIBC_THREAD_START_SUSPENDS_SELF
+
+Mon Jul 27 19:42:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen):
+ Use #ifdef, not #if for config options
+
+Mon Jul 27 15:01:51 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/stream.cxx, src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx:
+ Fixes to compile with the new Cyg_IORB field names.
+
+Thu Jul 9 03:40:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Adjust starting of tests to possibly start scheduler since
+ strtol/stroul rely on errno, which may be a per-thread variable
+
+Thu Jul 9 03:06:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx, src/stdio/common/setvbuf.cxx:
+ Consolidate read and write buffers into single buffer, as it should
+ have been all along
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Add drain_buffer() method to speed up the case when we want the
+ buffer completely emptied
+
+Tue Jul 7 21:26:33 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Add a couple of new tests that check that very long strings work too
+
+Wed Jul 1 19:52:39 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/streambuf.hxx:
+ Do not permit copy constructors
+
+ * src/clibincl/stream.inl, src/stdio/common/fclose.cxx:
+ Make sure we use #ifdef and not #if
+
+ * src/clibincl/streambuf.inl:
+ Use member initialisation list rather than explicit initialisation to
+ reduce warnings
+
+Wed Jul 1 19:17:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h and all files using config options:
+ Rename configuration defines to make them more standard
+
+Thu Jun 25 20:09:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strcat.cxx:
+ Add parentheses on check to silence warning
+ (Verified by proven)
+
+Thu Jun 25 19:30:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Make sure that the malloc pool is initialised before other things
+ can use it. This is done with the hot new constructor ordering
+ feature.
+
+Thu Jun 25 18:27:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Remove bogus ifdef if floating point is _not_ wanted
+
+Thu Jun 25 17:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Fix argument checking to allow first argument of NULL
+
+Thu Jun 25 04:18:50 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_strtok_last_p):
+ Remove bogus assertion
+
+ * src/stdlib/malloc.cxx:
+ Got sense of alignment check assertion the wrong way round, so negate
+ it
+
+Thu Jun 25 03:56:35 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx:
+ Fix argument checking assertions with legitimate nulls here too
+
+Thu Jun 25 03:46:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/strtoul.cxx, src/stdlib/strtol.cxx:
+ Fix argument checking assertions to cope with legitimate nulls
+
+Wed Jun 24 09:01:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Remove extraneous info messages
+
+Wed Jun 24 05:59:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c:
+
+ Change large automatic arrays to static arrays to prevent overuse
+ of a potentially small stack
+
+Wed Jun 24 05:45:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/string/strtok.c, tests/time/clock.c:
+
+ Increase thread stack size from 4K to 32K as in some cases it was
+ too small.
+
+
+Tue Jun 23 20:12:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Add extra tests, including floating point conversion testing
+
+Tue Jun 23 17:01:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Make sure this is only compiled if CYGFUN_LIBC_strtok is defined
+
+Tue Jun 23 06:10:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ add some comments - that's all
+
+ * src/stdio/common/stream.cxx:
+ fix case in refill_read_buffer() for what to do when there's nothing
+ left. Now return EAGAIN
+
+ * src/stdio/common/vsscanf.cxx, src/stdio/input/vfscanf.cxx:
+ Get sscanf working properly and passing tests. Also make sure it
+ ignores FP when its not configured
+
+ * src/stdlib/atof.cxx:
+ Only compile at all if strtod() is present
+
+
+Mon Jun 22 19:13:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise strtok_last and rand_seed better
+
+Mon Jun 22 14:14:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc3.c:
+ Add test for checking that mallocing and freeing repeatedly works
+
+ * tests/PKGconf.mak:
+ Update to reflect addition of the above
+
+Mon Jun 22 13:09:33 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/fopen.cxx
+ * src/stdio/common/stream.cxx
+ * src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx
+ Include cyg/devs/common/iorb.h instead of iorb.hxx
+
+ * src/stdio/common/stream.cxx
+ Use read_blocking and write_blocking instead of just read and
+ write when accessing devices through the virtual device table.
+
+Sun Jun 21 18:19:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Propagate change of return code handling for puts from stdio.inl
+ into here
+
+ * src/stdio/output/fputc.cxx:
+ make sure the right type is used for output - byte not int
+
+ * src/support/clibdata.cxx:
+ Fix #define config mistook. #endif was in wrong place
+
+Sun Jun 21 16:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Allow explicit construction to get around a bug when
+ dynamically allocating per-thread structure
+
+Sun Jun 21 16:02:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c, tests/stdlib/qsort.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+
+ Update tests to "do the right thing" with all configuration settings
+
+
+Sun Jun 21 04:54:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ I have to be careful not to use setjmp() in a way not exactly
+ defined by the standard, so make sure I do, and add a comment
+ documenting these ways.
+
+ Also ensure this test does the right thing in all configurations
+
+Sun Jun 21 04:38:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add extra checks for invalid configurations
+ Also make default for thread safety OFF
+
+ * src/clibincl/clibdata.inl:
+ Adjust indentation
+
+ * src/stdio/output/vfnprintf.cxx:
+ Make printf of -0.0 floating point do the right thing
+
+Sun Jun 21 04:28:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/snprintf.cxx, src/stdio/common/sprintf.cxx,
+ src/stdio/common/sscanf.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/scanf.cxx, src/stdio/output/fnprintf.cxx,
+ src/stdio/output/fprintf.cxx, src/stdio/output/printf.cxx:
+
+ Had to remove inline functions with varargs. Which means separating
+ out each function from stdioinlines.cxx into a separate file, as they
+ no longer belong there. So all the above files were created.
+
+ * include/stdio.inl, src/PKGconf.mak,
+ src/stdio/common/stdioinlines.cxx:
+ Changed to take account of the above
+
+
+Sun Jun 21 03:58:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c:
+ Update with floating-point tests. Also make sure they DTRT in all
+ configurations
+
+Fri Jun 19 19:33:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ accidentally initialised stdin/out/err twice
+
+Fri Jun 19 19:09:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Another typo
+
+Fri Jun 19 18:59:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Missing #endif typo
+
+Fri Jun 19 18:51:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Fix initialisation of static data members. Unsure how it worked at
+ all before!
+
+Fri Jun 19 18:01:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.inl:
+ puts should check whether fputs returns non-negative, rather than
+ non-zero
+
+Fri Jun 19 17:22:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl:
+ Make inclusion of get_errno_p conditional on thread-safety
+
+Wed Jun 17 10:55:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Add weak alias of vfscanf() to _vfscanf()
+
+Wed Jun 17 09:10:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Initialise err to silence compiler warning
+
+Wed Jun 17 08:59:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Most important is the addition of floating point support in
+ src/stdio/output/vfnprintf.cxx and src/stdio/input/vfscanf.cxx. This
+ also required the addition of atof() and strtod() in stdlib which is
+ definitely no bad thing! Other than that...
+
+ * Fix a whole bunch of stuff I messed up first time round. Also the
+ sprintf and sscanf tests are included again.
+
+Tue Jun 16 16:38:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Typo with not putting comment character at the beginning. Sigh.
+
+Tue Jun 16 14:53:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Forgot to (temporarily) remove fputs test for now
+
+Mon Jun 15 20:40:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ Everything to do with stdio has almost completely changed, so there's
+ not much point documenting individual changes.
+
+Mon Jun 15 18:36:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c:
+ Stop it moaning quite as much when it fails by making it exit sooner
+
+ * tests/time/clock.c :
+ This isn't a compound testcase
+
+Thu Jun 11 17:59:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h
+ Reverse sense of NDEBUG ifdef, that was left in accidentally due
+ to testing
+
+Thu Jun 11 04:58:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h, include/string.h, src/clibincl/stringsupp.hxx:
+ Modify as I've now added an "error" package which defines the error
+ codes and strerror()
+
+ * src/errno/strerror.cxx:
+ Moved to new error package and thus deleted
+
+Wed Jun 10 18:37:37 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h:
+ create this header and add assert() function
+
+Wed Jun 10 16:23:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h, src/clibincl/stdlibsupp.hxx, src/stdlib/malloc.cxx:
+ Add malloc(), calloc() and free() functions
+
+ * include/pkgconf/libc.h:
+ Add malloc memory pool size option
+
+ * tests/stdlib/malloc1.c, tests/stdlib/malloc2.c:
+ new tests for malloc
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for new files
+
+Wed Jun 10 15:06:16 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ Add another test
+
+Tue Jun 9 18:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add some setjmp config's and a macro for the noreturn attribute
+
+ * include/setjmp.h, include/setjmp.inl, src/clibincl/setjmpsupp.hxx,
+ src/setjmp/longjmp.cxx, tests/setjmp/setjmp.c:
+ Added to implement and test setjmp() and longjmp()
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for newly added files
+
+Thu Jun 4 01:29:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx, src/string/strcpy.cxx,
+ src/string/strlen.cxx, src/string/strncat.cxx,
+ src/string/strncmp.cxx, src/string/strncpy.cxx:
+ Rename CYGIMP_LIBC_PREFER_SMALL_TO_FAST to
+ CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST
+
+ Also use slower but smaller version when __OPTIMIZE_SIZE__ is
+ defined (which comes from using gcc -Os)
+
+Fri May 29 16:15:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl, src/ctype/isxdigit.cxx:
+ Fix bug that numerals aren't considered hex digits
+
+ * include/time.h:
+ Change clock_t and time_t to be signed so that they can accept -1, as
+ required by other libc functions
+
+ * src/clibincl/clibdata.hxx:
+ Fix typo that CYGIMP_LIBC_THREAD_SUPPORT should be ..._SAFETY
+ Also fix macro to allocate thread-specific data to not set variables
+ in a different stack-frame
+
+ * tests/ctype/ctype.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/stdlib/qsort.c:
+ make ctr unsigned to prevent warnings
+
+ * tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/string/strrchr.c:
+ Fix off by one error
+
+ * tests/string/strspn.c:
+ Fix case-sensitivity problem, and off-by-one error
+
+ * tests/string/strxfrm1.c:
+ Remove bogus bit of test that doesn't apply to strxfrm, and fix typo
+
+
+Fri May 22 16:33:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak
+ Remove CXXFLAGS line now that its redundant
+
+ * tests/everything!
+ Do a blitz change of all tests - break some of them down into
+ different files, add new tests, standardize format, fix bugs,
+ update for recent header file changes and much more!
+
+Wed May 20 17:50:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ interim checkin for different dir structure for Bart
+
+Fri May 15 20:30:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Tidy up some loose ends I forgot: rename src/include directory to
+ src/clibincl. And add clibdata.inl and timesupp.hxx in there.
+
+Thu May 14 19:56:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Basically everything has changed in the C library. Files have
+ been moved, renamed, deleted and reworked. This is a major
+ revision, and now starts from this new baseline rather than doing
+ incremental changes.
+
+Fri Apr 17 18:43:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ECCconf.mak:
+ added for new build system (actually Bart did this, but didn't
+ update this ChangeLog)
+
+Fri Apr 17 15:03:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdio/device/sim.cxx:
+ Make it build with CYG_EMPTY_STATEMENT; the unadorned one is being
+ removed.
+
+Thu Apr 16 00:24:24 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * All source files:
+ replace ECCIMP_LIBC_* conditional ifdef with CYGIMP_LIBC_*
+
+ * include/eccconf/libc.h:
+ improve comments and reorder a bit
+
+Wed Apr 8 14:35:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/Makefile.am, tests/Makefile.am, configure.in:
+ many changes to integrate build structure from release tree
+
+ * src/ctype/Makefile.am, src/ctype/Makefile.in, src/errno/Makefile.am,
+ src/errno/Makefile.in, src/stdio/Makefile.am, src/stdio/Makefile.in,
+ src/stdio/common/Makefile.am, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.am, src/stdio/device/Makefile.in,
+ src/stdio/output/Makefile.am, src/stdio/output/Makefile.in,
+ src/stdio/input/Makefile.am, src/stdio/input/Makefile.in,
+ src/stdlib/Makefile.am, src/stdlib/Makefile.in,
+ src/string/Makefile.am, src/string/Makefile.in,
+ src/support/Makefile.am, src/support/Makefile.in,
+ src/time/Makefile.am, src/time/Makefile.in:
+ Remove as they are now redundant with above changes
+
+ * include/Makefile.am:
+ Add to support above changes
+
+ * include/eccconf/libc.h:
+ Change include file for configuration from kernel to system
+
+ * src/include/kerndiag.hxx, src/stdio/device/kerndiag.cxx,
+ src/time/clockfn.cxx:
+ Change kernel include file to eccconf/kernel.h
+
+ * src/include/strngdev.h:
+ remove unnecessary kernel include
+
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in,
+ tests/Makefile.in, include/Makefile.in:
+ regenerate
+
+Mon Apr 6 20:55:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/abs.cxx, src/stdlib/atoi.cxx, src/stdlib/atol.cxx,
+ src/stdlib/div.cxx, src/stdlib/labs.cxx, src/stdlib/ldiv.cxx:
+ Separated out functions from stdlib.cxx into separate files
+
+ * src/stdlib/stdlib.cxx:
+ removed to be replaced by above files
+
+ * Makefile.am, src/stdlib/Makefile.am:
+ modified to support building above and not building stdlib.cxx
+
+ * src/support/tsd.cxx:
+ Remove unnecessary header file includes
+
+ * Makefile.in, src/stdlib/Makefile.in:
+ regenerated
+
+Mon Apr 6 19:19:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx, include/eccconf/libc.h:
+ remove lame hack for tx39 compiler now that its fixed
+
+ * src/include/sim.hxx:
+ define constants as static to placate compiler
+
+Thu Apr 2 21:01:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ctype/ctype.cxx:
+ deleted and separated out into below files
+
+ * src/ctype/isalnum.cxx, src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx, src/ctype/islower.cxx,
+ src/ctype/isprint.cxx, src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx, src/ctype/tolower.cxx,
+ src/ctype/toupper.cxx:
+ Separated out individual ctype functions from ctype.cxx into separate
+ files
+
+ * Makefile.am, src/ctype/Makefile.am:
+ modified to reflect above deletion/additions
+
+ * Makefile.in, src/ctype/Makefile.in:
+ regenerated
+
+Thu Apr 2 19:08:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: optimise using prefix increments
+
+Thu Apr 2 15:18:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strchr.cxx: optimise setting of mask a little
+
+Thu Mar 26 14:07:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx: fixed some typos
+
+Thu Mar 26 11:58:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/eccconf/libc.h, src/support/tsd.cxx:
+ Implement workaround for tx39 compiler bug.
+
+ * src/include/strsuppt.hxx:
+ remove prototypes for _memcpy() and _memset() as they are now in the
+ kernel
+
+Wed Mar 25 18:31:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/string/Makefile.am: memcpy() and memset() are
+ now in the kernel so remove them from build
+ * include/string.h: add a comment to say as much
+ * Makefile.in, src/string/Makefile.in: regenerate
+
+Wed Mar 25 15:30:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx, src/include/file_if.inl:
+ Change _exit workaround to not cause a compiler optimisation
+ problem. Now just references _exit rather than calls it.
+
+Wed Mar 25 14:59:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fix bug causing tests to fail completely
+ for this function
+
+Wed Mar 25 12:55:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/sim.hxx: add types to constants (oops!)
+ * Makefile.am: link src/stdio/device/sim.cxx
+ * Makefile.in: regenerated
+
+Wed Mar 25 04:14:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/file_if.hxx, src/include/file_if.inl,
+ src/include/kerndiag.hxx, src/include/sim.hxx,
+ src/include/stdio_if.hxx, src/include/strngdev.hxx,
+ src/include/tsd.hxx, src/stdio/common/clearerr.cxx,
+ src/stdio/common/clearerr.cxx, src/stdio/common/feof.cxx,
+ src/stdio/common/ferror.cxx, src/stdio/common/file_if.cxx,
+ src/stdio/common/vsprintf.cxx,
+ src/stdio/device/kerndiag.cxx, src/stdio/device/sim.cxx,
+ src/stdio/device/strngdev.cxx, src/stdio/output/fputc.cxx,
+ src/stdio/output/fputs.cxx, src/stdio/output/puts.cxx,
+ src/stdio/output/vfnprintf.cxx, src/support/tsd.cxx:
+ Modified to support buffered reads including renaming
+ _EccInternalFileStruct to __EccStdioStream which is what affects
+ most of these files
+ * src/include/file_if.inl, src/stdio/common/file_if.cxx: added for
+ the above reason
+ * src/stdio/common/sscanf.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/input/Makefile.am: added to provide sscanf() functionality
+ * include/ctype.h, include/stdio.h, include/stdlib.h,
+ include/string.h, include/eccconf/libc.h, src/ctype/ctype.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/stdio/common/stdio.cxx:
+ rename *_INLINES macros with prefix CYG rather than ECC
+ * include/errno.h, src/errno/errno.cxx, src/errno/strerror.cxx:
+ rename ErrNo to _ErrNo and add EAGAIN and EWOULDBLOCK error codes
+ * configure.in, Makefile.am, src/stdio/Makefile.am,
+ src/stdio/input/Makefile.am: add support for building
+ file_if.cxx sscanf.cxx and vfscanf.cxx
+ * src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/input/Makefile.in, configure, Makefile.in: regenerated
+
+Tue Mar 24 19:51:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clockfn.cxx, src/time/clock.cxx:
+ Renamed clock.cxx to clockfn.cxx (preserving CVS history)
+ * Makefile.am, src/time/Makefile.am: updated to reflect name change
+ * Makefile.in, src/time/Makefile.in: regenerated
+
+Tue Mar 24 16:28:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl: Swap around definitions to get right order so
+ inlining works
+
+Tue Mar 24 14:43:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/stdio.h, include/stdlib.h, include/string.h:
+ modify to only conditionally include inlines
+ * src/ctype/ctype.cxx, src/stdio/common/stdio.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/ctype/Makefile.am: Add to provide real linkable alternatives
+ to inline functions
+ * Makefile.am, configure.in, src/Makefile.am,
+ src/stdio/common/Makefile.am, src/stdlib/Makefile.am,
+ src/string/Makefile.am: modified to support previous additions
+ * include/eccconf/libc.h: redefine inline macro to add extern inline,
+ and add conditional defines for inline functions. Also rename
+ space vs. speed macro to have CYG instead of ECC prefix
+ * include/stdio.inl: fix comment typo
+ * src/stdlib/qsort.cxx: fix to define inline functions properly
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/memcpy.cxx,
+ src/string/memset.cxx, src/string/strcat.cxx, src/string/strchr.cxx,
+ src/string/strcmp.cxx, src/string/strcpy.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx
+ * Makefile.in, configure, src/Makefile.in, src/ctype/Makefile.in,
+ src/stdio/common/Makefile.in, src/stdlib/Makefile.in,
+ src/string/Makefile.in: regenerate
+
+
+Mon Mar 23 19:19:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx: added to support temporary _exit
+ * include/stdlib.h, include/stdlib.inl: added support for _exit and
+ added abs(), labs(), div() and ldiv() functions
+ * src/include/file_if.hxx: added support for _exit kludge
+ * src/stdlib/qsort.cxx: Added Berkeley copyright message
+ * src/time/clock.cxx: Include correct kernel config header as
+ CYG_CONFIGURATION rather than <config.h>
+ * Makefile.am src/stdlib/Makefile.am: added support for _exit
+ * Makefile.in, src/stdlib/Makefile.in: regenerated
+
+Mon Mar 23 14:41:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Replace ECCPKG_ANSI_LIBC with CYGPKG_ANSI_LIBC in all source files
+
+Mon Mar 23 14:28:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/string.inl: add file to provide strcoll()
+ * include/string.h: include string.inl
+ * ctype.h: include ctype.inl (oops!)
+ * include/stdlib.h: include stdlib.inl (oops!)
+
+Mon Mar 23 13:30:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl: added to provide ANSI ctype
+ functionality
+ * include/stdlib.h, include/stdlib.inl, src/include/stdlibbsp.hxx,
+ src/stdlib/Makefile.am, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/stdlib/srand.cxx,
+ src/stdlib/strtol.cxx, src/stdlib/strtoul.cxx: Added to provide
+ many stdlib functions
+ * src/include/tsd.hxx: modified to support rand() random number
+ seed, and added some comments
+ * configure.in, Makefile.am, src/Makefile.am: modified to support
+ addition of above new sources
+ * include/eccconf/libc.h: Add extra helpful comments, and #include
+ kernel config file
+ * src/time/clock.cxx: #include clock.inl and fix to call
+ get_resolution() properly now
+ * Makefile.in, configure, src/Makefile.in, src/errno/Makefile.in,
+ src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.in, src/stdio/output/Makefile.in,
+ src/stdlib/Makefile.in, src/strings/Makefile.in,
+ src/support/Makefile.in, src/time/Makefile.in,
+ tests/Makefile.in: regenerated
+
+
+Sun Mar 22 21:29:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h, src/include/timesupp.hxx, src/time/clock.cxx,
+ src/time/Makefile.am: added to provide clock() function
+ * src/Makefile.am: modified to try to build in src/time directory
+ * include/eccconf/libc.h: added and is now the main configuration
+ file for this package
+ * acconfig.h, include/libcconf.h.in, include/stamp-h.in: removed
+ due to usage of libc.h above instead
+ * Almost all *.h, *.hxx and *.cxx: replaced LIBC_CONFIG_HEADER
+ defined include with simple <pkgconf/libc.h>
+ * configure.in: remove AM_CONFIG_HEADER of libcconf.h and
+ LIBC_CONFIG_HEADER definition. Also remove usage of builtin
+ memcpy() etc. from gcc, and generate src/time/Makefile
+ * Makefile.am: link in src/time/clock.o
+ * src/include/file_if.hxx, src/include/sim.hxx: use config header
+ to decide whether C library is to be used
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in: regenerated
+
+Fri Mar 20 18:08:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fixed bug with ignoring terminating NULL
+
+1998-03-20 Chris Tarpy <ctarpy@bhaji.cygnus.co.uk>
+
+ * configure: - regenerated
+ * Makefile.am: - Support added for libc testcases
+ * Makefile.in: regenerated
+ * configure.in: set c compiler, descend test dir
+ * tests/Makefile.in: added
+ * tests/Makefile.am: added
+ * tests/tcdiag.cxx : added
+
+
+Thu Mar 19 11:41:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Initial check-in of everything
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/cdl/stdlib.cdl b/cesar/ecos/packages/language/c/libc/stdlib/current/cdl/stdlib.cdl
new file mode 100644
index 0000000000..4506f93da6
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/cdl/stdlib.cdl
@@ -0,0 +1,297 @@
+# ====================================================================
+#
+# stdlib.cdl
+#
+# C library stdlib related configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jlarmour
+# Contributors:
+# Date: 2000-04-14
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_LIBC_STDLIB {
+ display "ISO C library general utility functions"
+ description "
+ This package provides general utility functions in <stdlib.h>
+ as specified by the ISO C standard - ISO/IEC 9899:1990."
+ doc ref/libc.html
+ include_dir cyg/libc/stdlib
+ parent CYGPKG_LIBC
+ requires CYGPKG_ISOINFRA
+ implements CYGINT_ISO_STDLIB_STRCONV
+ implements CYGINT_ISO_STDLIB_ENVIRON
+ implements CYGINT_ISO_STDLIB_SYSTEM
+ implements CYGINT_ISO_BSEARCH
+ implements CYGINT_ISO_QSORT
+ implements CYGINT_ISO_ABS
+ implements CYGINT_ISO_DIV
+ requires CYGINT_ISO_CTYPE
+ requires CYGINT_ISO_STRING_STRFUNCS
+
+ compile abs.cxx atox.cxx bsearch.cxx \
+ div.cxx getenv.cxx qsort.cxx \
+ rand.cxx strtod.cxx strtol.cxx \
+ strtoul.cxx system.cxx
+
+# ====================================================================
+
+ cdl_component CYGIMP_LIBC_STDLIB_INLINES {
+ display "Inline versions of <stdlib.h> functions"
+ flavor none
+ no_define
+ description "
+ This option chooses whether some of the
+ particularly simple standard utility functions
+ from <stdlib.h> are available as inline
+ functions. This may improve performance, and as
+ the functions are small, may even improve code
+ size."
+
+ cdl_option CYGIMP_LIBC_STDLIB_INLINE_ABS {
+ display "abs() / labs()"
+ default_value 1
+ no_define
+ requires { CYGBLD_ISO_STDLIB_ABS_HEADER == \
+ "<cyg/libc/stdlib/abs.inl>" }
+ }
+
+ cdl_option CYGIMP_LIBC_STDLIB_INLINE_DIV {
+ display "div() / ldiv()"
+ default_value 1
+ no_define
+ requires { CYGBLD_ISO_STDLIB_DIV_HEADER == \
+ "<cyg/libc/stdlib/div.inl>" }
+ }
+
+ cdl_option CYGIMP_LIBC_STDLIB_INLINE_ATOX {
+ display "atof() / atoi() / atol()"
+ default_value 1
+ no_define
+ requires { CYGBLD_ISO_STDLIB_STRCONV_HEADER == \
+ "<cyg/libc/stdlib/atox.inl>" }
+ }
+ }
+
+ cdl_component CYGPKG_LIBC_RAND {
+ display "Random number generation"
+ flavor none
+ description "
+ These options control the behaviour of the
+ functions rand(), srand() and rand_r()"
+
+ cdl_option CYGSEM_LIBC_PER_THREAD_RAND {
+ display "Per-thread random seed"
+ doc ref/libc-thread-safety.html
+ requires CYGVAR_KERNEL_THREADS_DATA
+ default_value 0
+ description "
+ This option controls whether the pseudo-random
+ number generation functions rand() and srand()
+ have their state recorded on a per-thread
+ basis rather than global. If this option is
+ disabled, some per-thread space can be saved.
+ Note there is also a POSIX-standard rand_r()
+ function to achieve a similar effect with user
+ support. Enabling this option will use one slot
+ of kernel per-thread data. You should ensure you
+ have enough slots configured for all your
+ per-thread data."
+ }
+
+ cdl_option CYGNUM_LIBC_RAND_SEED {
+ display "Random number seed"
+ flavor data
+ legal_values 0 to 0x7fffffff
+ default_value 1
+ description "
+ This selects the initial random number seed for
+ rand()'s pseudo-random number generator. For
+ strict ISO standard compliance, this should be 1,
+ as per section 7.10.2.2 of the standard."
+ }
+
+ cdl_option CYGNUM_LIBC_RAND_TRACE_LEVEL {
+ display "Tracing level"
+ flavor data
+ legal_values 0 to 1
+ default_value 0
+ description "
+ Trace verbosity level for debugging the rand(),
+ srand() and rand_r() functions. Increase this
+ value to get additional trace output."
+ }
+
+ cdl_option CYGIMP_LIBC_RAND_SIMPLEST {
+ display "Simplest implementation"
+ flavor bool
+ default_value 0
+ implements CYGINT_ISO_RAND
+ description "
+ This provides a very simple implementation of rand()
+ that does not perform well with randomness in the
+ lower significant bits. However it is exceptionally
+ fast. It uses the sample algorithm from the ISO C
+ standard itself."
+ }
+
+ cdl_option CYGIMP_LIBC_RAND_SIMPLE1 {
+ display "Simple implementation #1"
+ flavor bool
+ default_value 1
+ implements CYGINT_ISO_RAND
+ description "
+ This provides a very simple implementation of rand()
+ based on the simplest implementation above. However
+ it does try to work around the lack of randomness
+ in the lower significant bits, at the expense of a
+ little speed."
+ }
+
+ cdl_option CYGIMP_LIBC_RAND_KNUTH1 {
+ display "Knuth implementation #1"
+ flavor bool
+ default_value 0
+ implements CYGINT_ISO_RAND
+ description "
+ This implements a slightly more complex algorithm
+ published in Donald E. Knuth's Art of Computer
+ Programming Vol.2 section 3.6 (p.185 in the 3rd ed.).
+ This produces better random numbers than the
+ simplest approach but is slower."
+ }
+ }
+
+ cdl_option CYGFUN_LIBC_strtod {
+ display "Provides strtod()"
+ requires CYGPKG_LIBM
+ default_value { 0 != CYGPKG_LIBM }
+ implements CYGINT_ISO_STDLIB_STRCONV_FLOAT
+ description "
+ This option allows use of the utility function
+ strtod() (and consequently atof()) to convert
+ from string to double precision floating point
+ numbers. Disabling this option removes the
+ dependency on the math library package."
+ }
+
+ cdl_option CYGFUN_LIBC_STDLIB_CONV_LONGLONG {
+ display "Provides long long conversion functions"
+ default_value 1
+ compile strtoll.cxx strtoull.cxx
+ description "
+ Enabling this option will provide support for the strtoll(),
+ strtoull() and atoll() conversion functions, which are
+ the long long variants of the standard versions of these
+ functions. Supporting this requires extra code and compile
+ time."
+ }
+
+ cdl_option CYGNUM_LIBC_BSEARCH_TRACE_LEVEL {
+ display "bsearch() tracing level"
+ flavor data
+ legal_values 0 to 1
+ default_value 0
+ description "
+ Trace verbosity level for debugging the <stdlib.h>
+ binary search function bsearch(). Increase this
+ value to get additional trace output."
+ }
+
+ cdl_option CYGNUM_LIBC_QSORT_TRACE_LEVEL {
+ display "qsort() tracing level"
+ flavor data
+ legal_values 0 to 1
+ default_value 0
+ description "
+ Trace verbosity level for debugging the <stdlib.h>
+ quicksort function qsort(). Increase this value
+ to get additional trace output."
+ }
+
+
+# ====================================================================
+
+ cdl_component CYGPKG_LIBC_STDLIB_OPTIONS {
+ display "C library stdlib build options"
+ flavor none
+ no_define
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_LIBC_STDLIB_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building this package. These flags are used in addition
+ to the set of global flags."
+ }
+
+ cdl_option CYGPKG_LIBC_STDLIB_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building this package. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_LIBC_STDLIB_TESTS {
+ display "C library stdlib tests"
+ flavor data
+ no_define
+ calculated { "tests/abs tests/atoi tests/atol tests/bsearch tests/div tests/getenv tests/labs tests/ldiv tests/qsort tests/rand1 tests/rand2 tests/rand3 tests/rand4 tests/srand tests/strtol tests/strtoul" }
+ description "
+ This option specifies the set of tests for this package."
+ }
+ }
+}
+
+# ====================================================================
+# EOF stdlib.cdl
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/include/abs.inl b/cesar/ecos/packages/language/c/libc/stdlib/current/include/abs.inl
new file mode 100644
index 0000000000..4fabf941df
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/include/abs.inl
@@ -0,0 +1,114 @@
+#ifndef CYGONCE_LIBC_STDLIB_ABS_INL
+#define CYGONCE_LIBC_STDLIB_ABS_INL
+/*===========================================================================
+//
+// abs.inl
+//
+// Inline implementations for the ISO standard utility functions
+// abs() and labs() defined in section 7.10 of the standard
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-28
+// Purpose:
+// Description:
+// Usage: Do not include this file directly - include <stdlib.h> instead
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+/* INCLUDES */
+
+#include <cyg/infra/cyg_trac.h> /* Tracing support */
+
+/* FUNCTION PROTOTYPES */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int
+abs( int /* val */ ) __attribute__((__const__));
+
+extern long
+labs( long /* val */ ) __attribute__((__const__));
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+/* INLINE FUNCTIONS */
+
+#ifndef CYGPRI_LIBC_STDLIB_ABS_INLINE
+# define CYGPRI_LIBC_STDLIB_ABS_INLINE extern __inline__
+#endif
+
+CYGPRI_LIBC_STDLIB_ABS_INLINE int
+abs( int __j )
+{
+ int __retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "abs", "returning %d" );
+
+ __retval = (__j<0) ? -__j : __j;
+
+ CYG_REPORT_RETVAL( __retval );
+
+ return __retval;
+} /* abs() */
+
+CYGPRI_LIBC_STDLIB_ABS_INLINE long
+labs( long __j )
+{
+ long __retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "abs", "returning %ld" );
+
+ __retval = (__j<0) ? -__j : __j;
+
+ CYG_REPORT_RETVAL( __retval );
+
+ return __retval;
+} /* labs() */
+
+
+#endif /* CYGONCE_LIBC_STDLIB_ABS_INL multiple inclusion protection */
+
+/* EOF abs.inl */
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/include/atox.inl b/cesar/ecos/packages/language/c/libc/stdlib/current/include/atox.inl
new file mode 100644
index 0000000000..dfec7588b4
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/include/atox.inl
@@ -0,0 +1,193 @@
+#ifndef CYGONCE_LIBC_STDLIB_ATOX_INL
+#define CYGONCE_LIBC_STDLIB_ATOX_INL
+/*===========================================================================
+//
+// atox.inl
+//
+// Inline implementations for the ISO standard utility functions
+// atoi(), atol() and atof() defined in section 7.10 of the standard
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-28
+// Purpose:
+// Description:
+// Usage: Do not include this file directly - include <stdlib.h> instead
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/libc_stdlib.h> /* Configuration header */
+
+/* INCLUDES */
+
+#include <stddef.h> /* NULL */
+#include <cyg/infra/cyg_trac.h> /* Tracing support */
+
+/* FUNCTION PROTOTYPES */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef CYGFUN_LIBC_strtod
+extern double
+atof( const char * /* double_str */ );
+#endif
+
+extern int
+atoi( const char * /* int_str */ );
+
+extern long
+atol( const char * /* long_str */ );
+
+extern long long
+atoll( const char * /* long_long_str */ );
+
+#ifdef CYGFUN_LIBC_strtod
+extern double
+strtod( const char * /* double_str */, char ** /* endptr */ );
+#endif
+
+extern long
+strtol( const char * /* long_str */, char ** /* endptr */,
+ int /* base */ );
+
+extern unsigned long
+strtoul( const char * /* ulong_str */, char ** /* endptr */,
+ int /* base */ );
+
+#ifdef CYGFUN_LIBC_STDLIB_CONV_LONGLONG
+extern long long
+strtoll( const char * /* long_long_str */, char ** /* endptr */,
+ int /* base */ );
+
+extern unsigned long long
+strtoull( const char * /* ulong_long_str */, char ** /* endptr */,
+ int /* base */ );
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+/* INLINE FUNCTIONS */
+
+/* 7.10.1 String conversion functions */
+
+#ifndef CYGPRI_LIBC_STDLIB_ATOX_INLINE
+# define CYGPRI_LIBC_STDLIB_ATOX_INLINE extern __inline__
+#endif
+
+
+#ifdef CYGFUN_LIBC_strtod
+CYGPRI_LIBC_STDLIB_ATOX_INLINE double
+atof( const char *__nptr )
+{
+ double __retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "atof", "returning %f" );
+
+ CYG_CHECK_DATA_PTR( __nptr, "__nptr is an invalid pointer!" );
+
+ __retval = strtod( __nptr, (char **)NULL );
+
+ CYG_REPORT_RETVAL( __retval );
+
+ return __retval;
+} /* atof() */
+#endif
+
+CYGPRI_LIBC_STDLIB_ATOX_INLINE int
+atoi( const char *__nptr )
+{
+ int __retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "atoi", "returning %d" );
+
+ CYG_CHECK_DATA_PTR( __nptr, "__nptr is an invalid pointer!" );
+
+ __retval = (int)strtol( __nptr, (char **)NULL, 10 );
+
+ CYG_REPORT_RETVAL( __retval );
+
+ return __retval;
+} /* atoi() */
+
+
+CYGPRI_LIBC_STDLIB_ATOX_INLINE long
+atol( const char *__nptr )
+{
+ long __retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "atol", "returning %ld" );
+
+ CYG_CHECK_DATA_PTR( __nptr, "__nptr is an invalid pointer!" );
+
+ __retval = strtol( __nptr, (char **)NULL, 10 );
+
+ CYG_REPORT_RETVAL( __retval );
+
+ return __retval;
+} /* atol() */
+
+#ifdef CYGFUN_LIBC_STDLIB_CONV_LONGLONG
+CYGPRI_LIBC_STDLIB_ATOX_INLINE long long
+atoll( const char *__nptr )
+{
+ long long __retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "atoll", "returning %lld" );
+
+ CYG_CHECK_DATA_PTR( __nptr, "__nptr is an invalid pointer!" );
+
+ __retval = strtoll( __nptr, (char **)NULL, 10 );
+
+ CYG_REPORT_RETVAL( __retval );
+
+ return __retval;
+} /* atoll() */
+#endif
+
+#endif /* CYGONCE_LIBC_STDLIB_ATOX_INL multiple inclusion protection */
+
+/* EOF atox.inl */
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/include/div.inl b/cesar/ecos/packages/language/c/libc/stdlib/current/include/div.inl
new file mode 100644
index 0000000000..40ea34e515
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/include/div.inl
@@ -0,0 +1,218 @@
+#ifndef CYGONCE_LIBC_STDLIB_DIV_INL
+#define CYGONCE_LIBC_STDLIB_DIV_INL
+/*===========================================================================
+//
+// div.inl
+//
+// Inline implementations for the ISO standard utility functions
+// div() and ldiv()
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-28
+// Purpose:
+// Description:
+// Usage: Do not include this file directly - include <stdlib.h> instead
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdlib.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+
+/* TYPE DEFINITIONS */
+
+/* return type of the div() function */
+
+typedef struct {
+ int quot; /* quotient */
+ int rem; /* remainder */
+} div_t;
+
+
+/* return type of the ldiv() function */
+
+typedef struct {
+ long quot; /* quotient */
+ long rem; /* remainder */
+} ldiv_t;
+
+/* FUNCTION PROTOTYPES */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern div_t
+div( int /* numerator */, int /* denominator */ ) __attribute__((__const__));
+
+extern ldiv_t
+ldiv( long /* numerator */, long /* denominator */ ) __attribute__((__const__));
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+/* FUNCTIONS */
+
+#ifndef CYGPRI_LIBC_STDLIB_DIV_INLINE
+# define CYGPRI_LIBC_STDLIB_DIV_INLINE extern __inline__
+#endif
+
+CYGPRI_LIBC_STDLIB_DIV_INLINE div_t
+div( int __numer, int __denom )
+{
+ div_t __ret;
+
+ CYG_REPORT_FUNCNAMETYPE( "div", "quotient: %d");
+ CYG_REPORT_FUNCARG2DV( __numer, __denom );
+ // FIXME: what if they want it handled with SIGFPE? Should have option
+ CYG_PRECONDITION(__denom != 0, "division by zero attempted!");
+
+ __ret.quot = __numer / __denom;
+ __ret.rem = __numer % __denom;
+
+ // But the modulo is implementation-defined for -ve numbers (ISO C 6.3.5)
+ // and we are required to "round" to zero (ISO C 7.10.6.2)
+ //
+ // The cases we have to deal with are inexact division of:
+ // a) + div +
+ // b) + div -
+ // c) - div +
+ // d) - div -
+ //
+ // a) can never go wrong and the quotient and remainder are always positive
+ // b) only goes wrong if the negative quotient has been "rounded" to
+ // -infinity - if so then the remainder will be negative when it
+ // should be positive or zero
+ // c) only goes wrong if the negative quotient has been "rounded" to
+ // -infinity - if so then the remainder will be positive when it
+ // should be negative or zero
+ // d) only goes wrong if the positive quotient has been rounded to
+ // +infinity - if so then the remainder will be positive when it
+ // should be negative or zero
+ //
+ // So the correct sign of the remainder corresponds to the sign of the
+ // numerator. Which means we can say that the result needs adjusting
+ // iff the sign of the numerator is different from the sign of the
+ // remainder.
+ //
+ // You may be interested to know that the Berkeley version of div()
+ // would get this wrong for e.g. (c) and (d) on some targets.
+ // e.g. for (-5)/4 it could leave the result as -2R3
+
+ if ((__ret.rem < 0) && (__numer > 0)) {
+ ++__ret.quot;
+ __ret.rem -= __denom;
+ } else if ((__ret.rem > 0) && (__numer < 0)) {
+ --__ret.quot;
+ __ret.rem += __denom;
+ } // else
+
+ CYG_REPORT_RETVAL( __ret.quot );
+
+ return __ret;
+} // div()
+
+CYGPRI_LIBC_STDLIB_DIV_INLINE ldiv_t
+ldiv( long __numer, long __denom )
+{
+ ldiv_t __ret;
+
+ CYG_REPORT_FUNCNAMETYPE( "ldiv", "quotient: %d");
+ CYG_REPORT_FUNCARG2DV( __numer, __denom );
+ // FIXME: what if they want it handled with SIGFPE? Should have option
+ CYG_PRECONDITION(__denom != 0, "division by zero attempted!");
+
+ __ret.quot = __numer / __denom;
+ __ret.rem = __numer % __denom;
+
+ // But the modulo is implementation-defined for -ve numbers (ISO C 6.3.5)
+ // and we are required to "round" to zero (ISO C 7.10.6.2)
+ //
+ // The cases we have to deal with are inexact division of:
+ // a) + div +
+ // b) + div -
+ // c) - div +
+ // d) - div -
+ //
+ // a) can never go wrong and the quotient and remainder are always positive
+ // b) only goes wrong if the negative quotient has been "rounded" to
+ // -infinity - if so then the remainder will be negative when it
+ // should be positive or zero
+ // c) only goes wrong if the negative quotient has been "rounded" to
+ // -infinity - if so then the remainder will be positive when it
+ // should be negative or zero
+ // d) only goes wrong if the positive quotient has been rounded to
+ // +infinity - if so then the remainder will be positive when it
+ // should be negative or zero
+ //
+ // So the correct sign of the remainder corresponds to the sign of the
+ // numerator. Which means we can say that the result needs adjusting
+ // iff the sign of the numerator is different from the sign of the
+ // remainder.
+ //
+ // You may be interested to know that the Berkeley version of ldiv()
+ // would get this wrong for e.g. (c) and (d) on some targets.
+ // e.g. for (-5)/4 it could leave the result as -2R3
+
+ if ((__ret.rem < 0) && (__numer > 0)) {
+ ++__ret.quot;
+ __ret.rem -= __denom;
+ } else if ((__ret.rem > 0) && (__numer < 0)) {
+ --__ret.quot;
+ __ret.rem += __denom;
+ } // else
+
+ CYG_REPORT_RETVAL( __ret.quot );
+
+ return __ret;
+} // ldiv()
+
+
+#endif // CYGONCE_LIBC_STDLIB_DIV_INL multiple inclusion protection
+
+// EOF div.inl
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/src/abs.cxx b/cesar/ecos/packages/language/c/libc/stdlib/current/src/abs.cxx
new file mode 100644
index 0000000000..f303d67d4a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/src/abs.cxx
@@ -0,0 +1,64 @@
+//===========================================================================
+//
+// abs.cxx
+//
+// ISO C standard abs()/labs() utility functions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-28
+// Purpose:
+// Description: Real alternative for inline implementation of the ISO
+// standard abs()/labs() utility functions defined in
+// section 7.10.6.1 of the standard
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// We don't want the inline versions of abs/labs defined here
+
+#define CYGPRI_LIBC_STDLIB_ABS_INLINE
+
+/* This means that including abs.inl will make the outline functions */
+
+#include <cyg/libc/stdlib/abs.inl>
+
+// EOF abs.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/src/atox.cxx b/cesar/ecos/packages/language/c/libc/stdlib/current/src/atox.cxx
new file mode 100644
index 0000000000..5c90e4f8b5
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/src/atox.cxx
@@ -0,0 +1,64 @@
+//===========================================================================
+//
+// atox.cxx
+//
+// ISO C standard atoi(), atol() and atof() utility functions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-28
+// Purpose:
+// Description: Real alternative for inline implementation of the ISO
+// standard atoi(), atol() and atof() utility functions defined
+// in sections 7.10.1.1, 7.10.1.2 and 7.10.1.3 of the standard
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// We don't want the inline versions of atoi(), atol() and atof() defined here
+
+#define CYGPRI_LIBC_STDLIB_ATOX_INLINE
+
+/* This means that including atox.inl will make the outline functions */
+
+#include <cyg/libc/stdlib/atox.inl>
+
+// EOF atox.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/src/bsearch.cxx b/cesar/ecos/packages/language/c/libc/stdlib/current/src/bsearch.cxx
new file mode 100644
index 0000000000..4e91ada443
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/src/bsearch.cxx
@@ -0,0 +1,132 @@
+//===========================================================================
+//
+// bsearch.cxx
+//
+// ANSI standard binary search function defined in section 7.10.5.1
+// of the standard
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdlib.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <stdlib.h> // Header for all stdlib functions
+ // (like this one)
+
+// TRACING
+
+# if defined(CYGDBG_USE_TRACING) && \
+ defined(CYGNUM_LIBC_BSEARCH_TRACE_LEVEL)
+static int bsearch_trace = CYGNUM_LIBC_BSEARCH_TRACE_LEVEL;
+# define TL1 (0 < bsearch_trace)
+# else
+# define TL1 (0)
+# endif
+
+
+// FUNCTIONS
+
+externC void *
+bsearch( const void *key, const void *base, size_t nmemb, size_t size,
+ __bsearch_comparison_fn_t compar )
+{
+ CYG_REPORT_FUNCNAMETYPE( "bsearch", "returning %08x" );
+
+ CYG_REPORT_FUNCARG5( "key=%08x, base=%08x, nmemb=%d, size=%d, "
+ "compar=%08x", key, base, nmemb, size, compar );
+
+ CYG_CHECK_DATA_PTR( key, "key is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( base, "base is not a valid pointer!" );
+ CYG_CHECK_FUNC_PTR( compar, "compar is not a valid function pointer!" );
+
+ CYG_ADDRESS current;
+ size_t lower = 0;
+ size_t upper = nmemb;
+ size_t index;
+ int result;
+
+ if (nmemb == 0 || size == 0)
+ {
+ CYG_TRACE2( TL1, "Warning! either nmemb (%d) or size (%d) is 0",
+ nmemb, size );
+ CYG_REPORT_RETVAL( NULL );
+ return NULL;
+ } // if
+
+ while (lower < upper)
+ {
+ index = (lower + upper) / 2;
+ current = (CYG_ADDRESS) (((char *) base) + (index * size));
+
+ CYG_TRACE2( TL1, "About to call comparison function with "
+ "key=%08x, current=%08x", key, current );
+ result = compar (key, (void *) current);
+ CYG_TRACE1( TL1, "Comparison function returned %d", result );
+
+ if (result < 0)
+ upper = index;
+ else if (result > 0)
+ lower = index + 1;
+ else
+ {
+ CYG_REPORT_RETVAL( current );
+ return (void *)current;
+ } // else
+ } // while
+
+ CYG_REPORT_RETVAL( NULL );
+ return NULL;
+} // bsearch()
+
+// EOF bsearch.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/src/div.cxx b/cesar/ecos/packages/language/c/libc/stdlib/current/src/div.cxx
new file mode 100644
index 0000000000..da1161c8a5
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/src/div.cxx
@@ -0,0 +1,65 @@
+//===========================================================================
+//
+// div.cxx
+//
+// ISO C implementation for div()/ldiv() utility functions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-28
+// Description: Real alternative for inline implementation of the ISO
+// standard div()/ldiv() utility functions defined in
+// section 7.10.6.2 of the standard
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+//
+
+// We don't want the inline versions of div/ldiv defined here
+
+#define CYGPRI_LIBC_STDLIB_DIV_INLINE
+
+/* This means that including div.inl will make the outline functions */
+
+#include <cyg/libc/stdlib/div.inl>
+
+// EOF div.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/src/getenv.cxx b/cesar/ecos/packages/language/c/libc/stdlib/current/src/getenv.cxx
new file mode 100644
index 0000000000..fe149044be
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/src/getenv.cxx
@@ -0,0 +1,136 @@
+//========================================================================
+//
+// getenv.cxx
+//
+// Implementation of the ISO C standard getenv() function
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdlib.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_ass.h> // Tracing support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <stdlib.h> // Main header for stdlib functions
+#include <string.h> // strchr(), strlen() and strncmp()
+
+
+// VARIABLES
+
+externC char **environ; // standard definition of environ
+
+// FUNCTIONS
+
+extern char *
+getenv( const char *name )
+{
+ // This function assumes the POSIX 1003.1 layout of the environment
+ // in the environ variable, i.e. extern char **environ is a pointer
+ // to an array of character pointers to the environment strings
+ // (POSIX 3.1.2.2 and 2.6).
+ //
+ // getenv() searches the environment list for a string of the form
+ // "name=value" (POSIX 4.6.1). The strings must have this form
+ // (POSIX 2.6)
+
+ CYG_REPORT_FUNCNAMETYPE( "getenv", "returning %08x" );
+
+ CYG_PRECONDITION( name != NULL, "getenv() called with NULL string!" );
+
+ CYG_REPORT_FUNCARG1( "name=%s", name );
+
+ CYG_PRECONDITION( environ != NULL,
+ "environ not set i.e. environ == NULL" );
+
+ CYG_CHECK_DATA_PTR( environ, "environ isn't a valid pointer!" );
+
+ CYG_CHECK_DATA_PTR( name, "name isn't a valid pointer!" );
+
+ // check name doesn't contain '='
+ CYG_PRECONDITION( strchr(name, '=') == NULL,
+ "name contains '='!" );
+
+ char **env_str_p;
+ cyg_ucount32 len = strlen( name );
+
+ for (env_str_p = environ; *env_str_p != NULL; ++env_str_p ) {
+
+ CYG_CHECK_DATA_PTR( env_str_p,
+ "current environment string isn't valid!" );
+
+ CYG_CHECK_DATA_PTR( *env_str_p,
+ "current environment string isn't valid!" );
+
+ // do we have a match?
+ if ( !strncmp(*env_str_p, name, len) ) {
+ // but it could be just a prefix i.e. we could have
+ // matched MYNAMEFRED when we're looking for just MYNAME, so:
+
+ if ( (*env_str_p)[len] == '=' ) {
+ // we got a match
+ CYG_REPORT_RETVAL( *env_str_p + len + 1 );
+
+ return (*env_str_p + len + 1);
+ } // if
+ } // if
+
+ // check the next pointer isn't NULL, as we're about to dereference
+ // it
+ CYG_ASSERT( env_str_p+1 != NULL,
+ "environment contains a NULL pointer!" );
+ } // for
+
+ CYG_REPORT_RETVAL( NULL );
+ return NULL;
+} // getenv()
+
+// EOF getenv.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/src/qsort.cxx b/cesar/ecos/packages/language/c/libc/stdlib/current/src/qsort.cxx
new file mode 100644
index 0000000000..3f7d20bdf2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/src/qsort.cxx
@@ -0,0 +1,284 @@
+//===========================================================================
+//
+// qsort.cxx
+//
+// ANSI standard sorting function defined in section 7.10.5.2
+// of the standard
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+//
+// This code is based on original code with the following copyright:
+//
+/*-
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdlib.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <stdlib.h> // Header for all stdlib functions
+ // (like this one)
+
+// TRACING
+
+# if defined(CYGDBG_USE_TRACING) && defined(CYGNUM_LIBC_QSORT_TRACE_LEVEL)
+static int qsort_trace = CYGNUM_LIBC_QSORT_TRACE_LEVEL;
+# define TL1 (0 < qsort_trace)
+# else
+# define TL1 (0)
+# endif
+
+
+// FUNCTION PROTOTYPES
+
+static __inline__ char *med3(char *, char *, char *, __qsort_comparison_fn_t);
+static __inline__ void swapfunc(char *, char *, int, int);
+
+
+// MACRO FUNCTIONS
+
+#define min(a, b) ((a) < (b) ? (a) : (b))
+
+//
+// Qsort routine from Bentley & McIlroy's "Engineering a Sort Function".
+//
+
+#define swapcode(TYPE, parmi, parmj, n) do { \
+ long i = (n) / sizeof (TYPE); \
+ TYPE *pi = (TYPE *) (parmi); \
+ TYPE *pj = (TYPE *) (parmj); \
+ do { \
+ TYPE t = *pi; \
+ *pi++ = *pj; \
+ *pj++ = t; \
+ } while (--i > 0); \
+} while (0)
+
+#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \
+ es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1;
+
+
+#define swap(a, b) \
+ if (swaptype == 0) { \
+ long t = *(long *)(a); \
+ *(long *)(a) = *(long *)(b); \
+ *(long *)(b) = t; \
+ } else \
+ swapfunc(a, b, size, swaptype)
+
+#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype)
+
+
+// FUNCTIONS
+
+// Debug wrapper for comparison function
+static __inline__ int
+cmp_wrapper( __qsort_comparison_fn_t cmp, void *x, void *y )
+{
+ int retval;
+ CYG_TRACE3( TL1, "Calling comparison function address %08x with args "
+ "( %08x, %08x )", cmp, x, y );
+ retval = cmp(x, y);
+
+ CYG_TRACE1( TL1, "Comparison function returned %d", retval );
+
+ return retval;
+} // cmp_wrapper()
+
+static __inline__ void
+swapfunc( char *a, char *b, int n, int swaptype)
+{
+ if(swaptype <= 1)
+ swapcode(long, a, b, n);
+ else
+ swapcode(char, a, b, n);
+} // swapfunc()
+
+
+static __inline__ char *
+med3( char *a, char *b, char *c, __qsort_comparison_fn_t cmp )
+{
+ return cmp_wrapper(cmp, a, b) < 0 ?
+ (cmp_wrapper(cmp, b, c) < 0 ? b : (cmp_wrapper(cmp, a, c) < 0 ? c : a ))
+ :(cmp_wrapper(cmp, b, c) > 0 ? b : (cmp_wrapper(cmp, a, c) < 0 ? a : c ));
+} // med3()
+
+
+void
+qsort( void *base, size_t nmemb, size_t size, __qsort_comparison_fn_t compar )
+{
+ char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
+ int d, r, swaptype, swap_cnt;
+
+ CYG_REPORT_FUNCNAME( "qsort" );
+ CYG_REPORT_FUNCARG4( "base=%08x, nmemb=%d, size=%d, compar=%08x",
+ base, nmemb, size, compar );
+
+ CYG_CHECK_DATA_PTR( base, "base is not a valid pointer!" );
+ CYG_CHECK_FUNC_PTR( compar, "compar is not a valid function pointer!" );
+
+loop:
+ SWAPINIT(base, size);
+ swap_cnt = 0;
+ if (nmemb < 7) {
+ for (pm = (char *) base + size;
+ pm < (char *) base + nmemb * size;
+ pm += size)
+ for (pl = pm; pl > (char *) base && cmp_wrapper( compar, pl - size, pl) > 0;
+ pl -= size)
+ swap(pl, pl - size);
+ {
+ CYG_REPORT_RETURN();
+ return;
+ } // for
+ } // if
+ pm = (char *) base + (nmemb / 2) * size;
+ if (nmemb > 7) {
+ pl = (char *) base;
+ pn = (char *) base + (nmemb - 1) * size;
+ if (nmemb > 40) {
+ d = (nmemb / 8) * size;
+ pl = med3(pl, pl + d, pl + 2 * d, compar);
+ pm = med3(pm - d, pm, pm + d, compar);
+ pn = med3(pn - 2 * d, pn - d, pn, compar);
+ } // if
+ pm = med3(pl, pm, pn, compar);
+ } // if
+ swap( (char *)base, pm );
+ pa = pb = (char *) base + size;
+
+ pc = pd = (char *) base + (nmemb - 1) * size;
+ for (;;) {
+ while (pb <= pc && (r = cmp_wrapper( compar, pb, base)) <= 0) {
+ if (r == 0) {
+ swap_cnt = 1;
+ swap(pa, pb);
+ pa += size;
+ } // if
+ pb += size;
+ } // while
+ while (pb <= pc && (r = cmp_wrapper( compar, pc, base)) >= 0) {
+ if (r == 0) {
+ swap_cnt = 1;
+ swap(pc, pd);
+ pd -= size;
+ } // if
+ pc -= size;
+ } // while
+ if (pb > pc)
+ break;
+ swap(pb, pc);
+ swap_cnt = 1;
+ pb += size;
+ pc -= size;
+ } // for
+ if (swap_cnt == 0) { // Switch to insertion sort
+ for (pm = (char *) base + size;
+ pm < (char *) base + nmemb * size;
+ pm += size)
+ for (pl = pm; pl > (char *) base && cmp_wrapper( compar, pl - size, pl) > 0;
+ pl -= size)
+ swap(pl, pl - size);
+ {
+ CYG_REPORT_RETURN();
+ return;
+ } // for
+ } //if
+
+ pn = (char *) base + nmemb * size;
+ r = min(pa - (char *)base, pb - pa);
+ vecswap((char *)base, pb - r, r);
+ r = min( (unsigned)(pd - pc), pn - pd - size );
+ vecswap(pb, pn - r, r);
+ if ((unsigned)(r = pb - pa) > size)
+ qsort(base, r / size, size, compar);
+ if ((unsigned)(r = pd - pc) > size) {
+ // Iterate rather than recurse to save stack space
+ base = pn - r;
+ nmemb = r / size;
+ goto loop;
+ } // if
+/* qsort(pn - r, r / size, size, compar);*/
+
+ CYG_REPORT_RETURN();
+} // qsort()
+
+// EOF qsort.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/src/rand.cxx b/cesar/ecos/packages/language/c/libc/stdlib/current/src/rand.cxx
new file mode 100644
index 0000000000..1aac54fd9d
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/src/rand.cxx
@@ -0,0 +1,252 @@
+//===========================================================================
+//
+// rand.cxx
+//
+// ISO and POSIX 1003.1 standard random number generation functions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose: Provides ISO C rand() and srand() functions, along with
+// POSIX 1003.1 rand_r() function
+// Description: This implements rand() and srand() of section 7.10.2.1 of
+// the ISO C standard. Also rand_r() defined in section 8.3.8
+// of the POSIX 1003.1 standard
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdlib.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <stdlib.h> // Header for all stdlib functions
+ // (like this one)
+
+#ifdef CYGSEM_LIBC_PER_THREAD_RAND
+# include <pkgconf/kernel.h> // kernel configuration
+# include <cyg/kernel/thread.hxx> // per-thread data
+# include <cyg/kernel/thread.inl> // per-thread data
+# include <cyg/kernel/mutex.hxx> // mutexes
+#endif
+
+// TRACE
+
+#if defined(CYGDBG_USE_TRACING) && defined(CYGNUM_LIBC_RAND_TRACE_LEVEL)
+static int rand_trace = CYGNUM_LIBC_RAND_TRACE_LEVEL;
+# define TL1 (0 < rand_trace)
+#else
+# define TL1 (0)
+#endif
+
+
+// STATICS
+
+#ifdef CYGSEM_LIBC_PER_THREAD_RAND
+static Cyg_Thread::cyg_data_index
+rand_data_index=CYGNUM_KERNEL_THREADS_DATA_MAX;
+
+static Cyg_Mutex rand_data_mutex CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_LIBC);
+#else
+static unsigned int cyg_libc_rand_seed = CYGNUM_LIBC_RAND_SEED;
+#endif
+
+// FUNCTIONS
+
+int
+rand( void )
+{
+ unsigned int *seed_p;
+ int retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "rand", "returning %d" );
+
+ // get seed for this thread (if relevant )
+#ifdef CYGSEM_LIBC_PER_THREAD_RAND
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Get a per-thread data slot if we haven't got one already
+ // Do a simple test before locking and retrying test, as this is a
+ // rare situation
+ if (CYGNUM_KERNEL_THREADS_DATA_MAX==rand_data_index) {
+ rand_data_mutex.lock();
+ if (CYGNUM_KERNEL_THREADS_DATA_MAX==rand_data_index) {
+
+ // FIXME: Should use real CDL to pre-allocate a slot at compile
+ // time to ensure there are enough slots
+ rand_data_index = self->new_data_index();
+ CYG_ASSERT(rand_data_index >= 0, "failed to allocate data index" );
+
+ // Initialize seed
+ self->set_data(rand_data_index, CYGNUM_LIBC_RAND_SEED);
+ }
+ rand_data_mutex.unlock();
+ } // if
+
+ // we have a valid index now
+
+ seed_p = (unsigned int *)self->get_data_ptr(rand_data_index);
+#else
+ seed_p = &cyg_libc_rand_seed;
+#endif
+
+ CYG_TRACE2( TL1, "Retrieved seed address %08x containing %d",
+ seed_p, *seed_p );
+ CYG_CHECK_DATA_PTR( seed_p, "Help! Returned address of seed is invalid!" );
+
+ retval = rand_r( seed_p );
+
+ CYG_REPORT_RETVAL( retval );
+
+ return retval;
+
+} // rand()
+
+
+int
+rand_r( unsigned int *seed )
+{
+ int retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "rand_r", "returning %d" );
+
+ CYG_CHECK_DATA_PTR( seed, "pointer to seed invalid!" );
+
+#if defined(CYGIMP_LIBC_RAND_SIMPLEST)
+
+ // This algorithm sucks in the lower bits
+
+ *seed = (*seed * 1103515245) + 12345; // permutate seed
+
+ retval = (int)( *seed & RAND_MAX );
+
+#elif defined(CYGIMP_LIBC_RAND_SIMPLE1)
+
+ // The above algorithm sucks in the lower bits, so we shave them off
+ // and repeat a couple of times to make it up
+
+ unsigned int s=*seed;
+ unsigned int uret;
+
+ s = (s * 1103515245) + 12345; // permutate seed
+ // Only use top 11 bits
+ uret = s & 0xffe00000;
+
+ s = (s * 1103515245) + 12345; // permutate seed
+ // Only use top 14 bits
+ uret += (s & 0xfffc0000) >> 11;
+
+ s = (s * 1103515245) + 12345; // permutate seed
+ // Only use top 7 bits
+ uret += (s & 0xfe000000) >> (11+14);
+
+ retval = (int)(uret & RAND_MAX);
+ *seed = s;
+
+#elif defined(CYGIMP_LIBC_RAND_KNUTH1)
+
+// This is the code supplied in Knuth Vol 2 section 3.6 p.185 bottom
+
+#define MM 2147483647 // a Mersenne prime
+#define AA 48271 // this does well in the spectral test
+#define QQ 44488 // (long)(MM/AA)
+#define RR 3399 // MM % AA; it is important that RR<QQ
+
+ *seed = AA*(*seed % QQ) - RR*(unsigned int)(*seed/QQ);
+ if (*seed < 0)
+ *seed += MM;
+
+ retval = (int)( *seed & RAND_MAX );
+
+#else
+# error No valid implementation for rand()!
+#endif
+
+ CYG_REPORT_RETVAL( retval );
+
+ return retval;
+
+} // rand_r()
+
+
+void
+srand( unsigned int seed )
+{
+ CYG_REPORT_FUNCNAME( "srand" );
+
+ CYG_REPORT_FUNCARG1DV( (int)seed );
+
+ // get seed for this thread ( if relevant )
+#ifdef CYGSEM_LIBC_PER_THREAD_RAND
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Get a per-thread data slot if we haven't got one already
+ // Do a simple test before locking and retrying test, as this is a
+ // rare situation
+ if (CYGNUM_KERNEL_THREADS_DATA_MAX==rand_data_index) {
+ rand_data_mutex.lock();
+ if (CYGNUM_KERNEL_THREADS_DATA_MAX==rand_data_index) {
+
+ // FIXME: Should use real CDL to pre-allocate a slot at compile
+ // time to ensure there are enough slots
+ rand_data_index = self->new_data_index();
+ CYG_ASSERT(rand_data_index >= 0, "failed to allocate data index" );
+ }
+ rand_data_mutex.unlock();
+ } // if
+
+ // we have a valid index now
+
+ self->set_data(rand_data_index, (CYG_ADDRWORD) seed);
+#else
+ cyg_libc_rand_seed = seed;
+#endif
+
+ CYG_REPORT_RETURN();
+
+} // srand()
+
+// EOF rand.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/src/strtod.cxx b/cesar/ecos/packages/language/c/libc/stdlib/current/src/strtod.cxx
new file mode 100644
index 0000000000..d1c76ac51a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/src/strtod.cxx
@@ -0,0 +1,263 @@
+//===========================================================================
+//
+// strtod.cxx
+//
+// ISO String to double-precision floating point conversion
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdlib.h> // Configuration header
+
+// Include strtod()?
+#if defined(CYGFUN_LIBC_strtod)
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <stddef.h> // NULL, wchar_t and size_t from compiler
+#include <stdlib.h> // Main header for stdlib functions
+#include <ctype.h> // isspace() and isdigit()
+#include <float.h> // DBL_MIN_10_EXP and DBL_MAX_10_EXP
+#include <math.h> // HUGE_VAL
+#include <errno.h> // errno
+
+// CONSTANTS
+
+#define MAXE (DBL_MAX_10_EXP)
+#define MINE (DBL_MIN_10_EXP)
+
+// flags
+#define SIGN 0x01
+#define ESIGN 0x02
+#define DECP 0x04
+
+
+// MACROS
+
+#define Ise(c) ((c == 'e') || (c == 'E') || (c == 'd') || (c == 'D'))
+#define Issign(c) ((c == '-') || (c == '+'))
+#define Val(c) ((c - '0'))
+
+
+// FUNCTIONS
+
+/*
+ * [atw] multiply 64 bit accumulator by 10 and add digit.
+ * The KA/CA way to do this should be to use
+ * a 64-bit integer internally and use "adjust" to
+ * convert it to float at the end of processing.
+ */
+static int
+ten_mul(double *acc, int digit)
+{
+ /* [atw] Crude, but effective (at least on a KB)...
+ */
+ *acc *= 10;
+ *acc += digit;
+
+ return 0; /* no overflow */
+} // ten_mul()
+
+
+/*
+ * compute 10**x by successive squaring.
+ */
+
+static const double
+exp10(unsigned x)
+{
+ static double powtab[] = {1.0,
+ 10.0,
+ 100.0,
+ 1000.0,
+ 10000.0};
+
+ if (x < (sizeof(powtab)/sizeof(double)))
+ return powtab[x];
+ else if (x & 1)
+ return 10.0 * exp10(x-1);
+ else
+ return exp10(x/2) * exp10(x/2);
+} // exp10()
+
+
+/*
+ * return (*acc) scaled by 10**dexp.
+ */
+
+static double
+adjust(double *acc, int dexp, int sign)
+ /* *acc the 64 bit accumulator */
+ /* dexp decimal exponent */
+ /* sign sign flag */
+{
+ double r;
+
+ if (dexp > MAXE)
+ {
+ errno = ERANGE;
+ return (sign) ? -HUGE_VAL : HUGE_VAL;
+ }
+ else if (dexp < MINE)
+ {
+ errno = ERANGE;
+ return 0.0;
+ }
+
+ r = *acc;
+ if (sign)
+ r = -r;
+ if (dexp==0)
+ return r;
+
+ if (dexp < 0)
+ return r / exp10(abs(dexp));
+ else
+ return r * exp10(dexp);
+} // adjust()
+
+
+externC double
+strtod( const char *nptr, char **endptr )
+{
+ const char *start=nptr;
+ double accum = 0.0;
+ int flags = 0;
+ int texp = 0;
+ int e = 0;
+ int conv_done = 0;
+
+ double retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "strtod", "returning %f" );
+
+ CYG_CHECK_DATA_PTR( nptr, "nptr is an invalid pointer!" );
+
+ // endptr is allowed to be NULL, but if it isn't, we check it
+ if (endptr != NULL)
+ CYG_CHECK_DATA_PTR( endptr, "endptr is an invalid pointer!" );
+
+ while(isspace(*nptr)) nptr++;
+ if(*nptr == '\0')
+ { /* just leading spaces */
+ if(endptr != NULL) *endptr = (char *)start;
+ return 0.0;
+ }
+
+
+ if(Issign(*nptr))
+ {
+ if(*nptr == '-') flags = SIGN;
+ if(*++nptr == '\0')
+ { /* "+|-" : should be an error ? */
+ if(endptr != NULL) *endptr = (char *)start;
+ return 0.0;
+ }
+ }
+
+ for(; (isdigit(*nptr) || (*nptr == '.')); nptr++)
+ {
+ conv_done = 1;
+ if(*nptr == '.')
+ flags |= DECP;
+ else
+ {
+ if( ten_mul(&accum, Val(*nptr)) ) texp++;
+ if(flags & DECP) texp--;
+ }
+ }
+
+ if(Ise(*nptr))
+ {
+ conv_done = 1;
+ if(*++nptr != '\0') /* skip e|E|d|D */
+ { /* ! ([nptr]xxx[.[yyy]]e) */
+
+ while(isspace(*nptr)) nptr++; /* Ansi allows spaces after e */
+ if(*nptr != '\0')
+ { /* ! ([nptr]xxx[.[yyy]]e[space]) */
+
+ if(Issign(*nptr))
+ if(*nptr++ == '-') flags |= ESIGN;
+
+ if(*nptr != '\0')
+ { /* ! ([nptr]xxx[.[yyy]]e[nptr]) -- error?? */
+
+ for(; isdigit(*nptr); nptr++)
+ if (e < MAXE) /* prevent from grossly overflowing */
+ e = e*10 + Val(*nptr);
+
+ /* dont care what comes after this */
+ if(flags & ESIGN)
+ texp -= e;
+ else
+ texp += e;
+ }
+ }
+ }
+ }
+
+ if(endptr != NULL)
+ *endptr = (char *)((conv_done) ? nptr : start);
+
+ retval = adjust(&accum, (int)texp, (int)(flags & SIGN));
+
+
+ CYG_REPORT_RETVAL( retval );
+
+ return retval;
+} // strtod()
+
+
+#endif // if defined(CYGFUN_LIBC_strtod)
+
+// EOF strtod.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/src/strtol.cxx b/cesar/ecos/packages/language/c/libc/stdlib/current/src/strtol.cxx
new file mode 100644
index 0000000000..d7f92ccacf
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/src/strtol.cxx
@@ -0,0 +1,203 @@
+//===========================================================================
+//
+// strtol.cxx
+//
+// ISO standard string to long int conversion function defined in
+// section 7.10.1.5 of the standard
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+//
+// This code is based on original code with the following copyright:
+//
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdlib.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <limits.h> // Definition of LONG_MIN and LONG_MAX
+#include <ctype.h> // Definition of many ctype functions
+#include <errno.h> // Error code definitions
+#include <stdlib.h> // Header for all stdlib functions
+ // (like this one)
+
+
+// FUNCTIONS
+
+//
+// Convert a string to a long integer.
+//
+// Ignores `locale' stuff. Assumes that the upper and lower case
+// alphabets and digits are each contiguous.
+//
+
+long
+strtol( const char *nptr, char **endptr, int base )
+{
+ const char *s = nptr;
+ unsigned long acc;
+ int c;
+ unsigned long cutoff;
+ int neg = 0, any, cutlim;
+
+ CYG_REPORT_FUNCNAMETYPE( "strtol", "returning long %d" );
+ CYG_REPORT_FUNCARG3( "nptr=%08x, endptr=%08x, base=%d",
+ nptr, endptr, base );
+ CYG_CHECK_DATA_PTR( nptr, "nptr is not a valid pointer!" );
+
+ if (endptr != NULL)
+ CYG_CHECK_DATA_PTR( endptr, "endptr is not a valid pointer!" );
+
+ //
+ // Skip white space and pick up leading +/- sign if any.
+ // If base is 0, allow 0x for hex and 0 for octal, else
+ // assume decimal; if base is already 16, allow 0x.
+ //
+
+ do {
+ c = *s++;
+ } while (isspace(c));
+ if (c == '-') {
+ neg = 1;
+ c = *s++;
+ } else if (c == '+')
+ c = *s++;
+ if ((base == 0 || base == 16) &&
+ c == '0' && (*s == 'x' || *s == 'X')) {
+ c = s[1];
+ s += 2;
+ base = 16;
+ }
+ if (base == 0)
+ base = c == '0' ? 8 : 10;
+
+ //
+ // Compute the cutoff value between legal numbers and illegal
+ // numbers. That is the largest legal value, divided by the
+ // base. An input number that is greater than this value, if
+ // followed by a legal input character, is too big. One that
+ // is equal to this value may be valid or not; the limit
+ // between valid and invalid numbers is then based on the last
+ // digit. For instance, if the range for longs is
+ // [-2147483648..2147483647] and the input base is 10,
+ // cutoff will be set to 214748364 and cutlim to either
+ // 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated
+ // a value > 214748364, or equal but the next digit is > 7 (or 8),
+ // the number is too big, and we will return a range error.
+ //
+ // Set any if any `digits' consumed; make it negative to indicate
+ // overflow.
+ //
+
+ cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX;
+ cutlim = cutoff % (unsigned long)base;
+ cutoff /= (unsigned long)base;
+ for (acc = 0, any = 0;; c = *s++) {
+ if (isdigit(c))
+ c -= '0';
+ else if (isalpha(c))
+ c -= isupper(c) ? 'A' - 10 : 'a' - 10;
+ else
+ break;
+ if (c >= base)
+ break;
+ if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim)
+ any = -1;
+ else {
+ any = 1;
+ acc *= base;
+ acc += c;
+ }
+ }
+ if (any < 0) {
+ acc = neg ? LONG_MIN : LONG_MAX;
+ errno = ERANGE;
+ } else if (neg)
+ acc = -acc;
+ if (endptr != 0)
+ *endptr = (char *) (any ? s - 1 : nptr);
+
+ CYG_REPORT_RETVAL ( acc );
+
+ return acc;
+} // strtol()
+
+// EOF strtol.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/src/strtoll.cxx b/cesar/ecos/packages/language/c/libc/stdlib/current/src/strtoll.cxx
new file mode 100644
index 0000000000..51543ad3e0
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/src/strtoll.cxx
@@ -0,0 +1,199 @@
+//===========================================================================
+//
+// strtoll.cxx
+//
+// String to long long int conversion function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: Fredrik Hederstierna, converted file from long to long long.
+// Date: 2000-04-30, 2004-02-19
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+//
+// This code is based on original code with the following copyright:
+//
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdlib.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <limits.h> // Definition of LONG_LONG_MIN and LONG_LONG_MAX
+#include <ctype.h> // Definition of many ctype functions
+#include <errno.h> // Error code definitions
+#include <stdlib.h> // Header for all stdlib functions
+ // (like this one)
+
+
+// FUNCTIONS
+
+//
+// Convert a string to a long long integer.
+//
+// Ignores `locale' stuff. Assumes that the upper and lower case
+// alphabets and digits are each contiguous.
+//
+
+long long
+strtoll( const char *nptr, char **endptr, int base )
+{
+ const char *s = nptr;
+ unsigned long long acc;
+ int c;
+ unsigned long long cutoff;
+ int neg = 0, any, cutlim;
+
+ CYG_REPORT_FUNCNAMETYPE( "strtoll", "returning long long %lld" );
+ CYG_REPORT_FUNCARG3( "nptr=%08x, endptr=%08x, base=%d",
+ nptr, endptr, base );
+ CYG_CHECK_DATA_PTR( nptr, "nptr is not a valid pointer!" );
+
+ if (endptr != NULL)
+ CYG_CHECK_DATA_PTR( endptr, "endptr is not a valid pointer!" );
+
+ //
+ // Skip white space and pick up leading +/- sign if any.
+ // If base is 0, allow 0x for hex and 0 for octal, else
+ // assume decimal; if base is already 16, allow 0x.
+ //
+
+ do {
+ c = *s++;
+ } while (isspace(c));
+ if (c == '-') {
+ neg = 1;
+ c = *s++;
+ } else if (c == '+')
+ c = *s++;
+ if ((base == 0 || base == 16) &&
+ c == '0' && (*s == 'x' || *s == 'X')) {
+ c = s[1];
+ s += 2;
+ base = 16;
+ }
+ if (base == 0)
+ base = c == '0' ? 8 : 10;
+
+ //
+ // Compute the cutoff value between legal numbers and illegal
+ // numbers. That is the largest legal value, divided by the
+ // base. An input number that is greater than this value, if
+ // followed by a legal input character, is too big. One that
+ // is equal to this value may be valid or not; the limit
+ // between valid and invalid numbers is then based on the last
+ // digit. For instance, if the range for long longs is
+ // [-2147483648..2147483647] and the input base is 10,
+ // cutoff will be set to 214748364 and cutlim to either
+ // 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated
+ // a value > 214748364, or equal but the next digit is > 7 (or 8),
+ // the number is too big, and we will return a range error.
+ //
+ // Set any if any `digits' consumed; make it negative to indicate
+ // overflow.
+ //
+
+ cutoff = neg ? -(unsigned long long)LONG_LONG_MIN : LONG_LONG_MAX;
+ cutlim = cutoff % (unsigned long long)base;
+ cutoff /= (unsigned long long)base;
+ for (acc = 0, any = 0;; c = *s++) {
+ if (isdigit(c))
+ c -= '0';
+ else if (isalpha(c))
+ c -= isupper(c) ? 'A' - 10 : 'a' - 10;
+ else
+ break;
+ if (c >= base)
+ break;
+ if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim)
+ any = -1;
+ else {
+ any = 1;
+ acc *= base;
+ acc += c;
+ }
+ }
+ if (any < 0) {
+ acc = neg ? LONG_LONG_MIN : LONG_LONG_MAX;
+ errno = ERANGE;
+ } else if (neg)
+ acc = -acc;
+ if (endptr != 0)
+ *endptr = (char *) (any ? s - 1 : nptr);
+
+ CYG_REPORT_RETVAL ( acc );
+
+ return acc;
+} // strtoll()
+
+// EOF strtoll.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/src/strtoul.cxx b/cesar/ecos/packages/language/c/libc/stdlib/current/src/strtoul.cxx
new file mode 100644
index 0000000000..be2474d350
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/src/strtoul.cxx
@@ -0,0 +1,179 @@
+//===========================================================================
+//
+// strtoul.cxx
+//
+// ISO standard string to long int conversion function defined in
+// section 7.10.1.6 of the standard
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+//
+// This code is based on original code with the following copyright:
+//
+/*
+ * Copyright (c) 1990 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdlib.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <limits.h> // Definition of ULONG_MAX
+#include <ctype.h> // Definition of many ctype functions
+#include <errno.h> // Error code definitions
+#include <stdlib.h> // Header for all stdlib functions
+ // (like this one)
+
+
+// FUNCTIONS
+
+//
+// Convert a string to an unsigned long integer.
+//
+// Ignores `locale' stuff. Assumes that the upper and lower case
+// alphabets and digits are each contiguous.
+//
+
+unsigned long
+strtoul( const char *nptr, char **endptr, int base )
+{
+ const char *s = nptr;
+ unsigned long acc;
+ int c;
+ unsigned long cutoff;
+ int neg = 0, any, cutlim;
+
+ CYG_REPORT_FUNCNAMETYPE( "strtoul", "returning long %d" );
+ CYG_REPORT_FUNCARG3( "nptr=%08x, endptr=%08x, base=%d",
+ nptr, endptr, base );
+ CYG_CHECK_DATA_PTR( nptr, "nptr is not a valid pointer!" );
+
+ if (endptr != NULL)
+ CYG_CHECK_DATA_PTR( endptr, "endptr is not a valid pointer!" );
+ //
+ // See strtol for comments as to the logic used.
+ //
+ do {
+ c = *s++;
+ } while (isspace(c));
+ if (c == '-') {
+ neg = 1;
+ c = *s++;
+ } else if (c == '+')
+ c = *s++;
+ if ((base == 0 || base == 16) &&
+ c == '0' && (*s == 'x' || *s == 'X')) {
+ c = s[1];
+ s += 2;
+ base = 16;
+ }
+ if (base == 0)
+ base = c == '0' ? 8 : 10;
+ cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
+ cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
+ for (acc = 0, any = 0;; c = *s++) {
+ if (isdigit(c))
+ c -= '0';
+ else if (isalpha(c))
+ c -= isupper(c) ? 'A' - 10 : 'a' - 10;
+ else
+ break;
+ if (c >= base)
+ break;
+ if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim)
+ any = -1;
+ else {
+ any = 1;
+ acc *= base;
+ acc += c;
+ }
+ }
+ if (any < 0) {
+ acc = ULONG_MAX;
+ errno = ERANGE;
+ } else if (neg)
+ acc = -acc;
+ if (endptr != 0)
+ *endptr = (char *) (any ? s - 1 : nptr);
+
+ CYG_REPORT_RETVAL( acc );
+
+ return acc;
+} // strtoul()
+
+// EOF strtoul.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/src/strtoull.cxx b/cesar/ecos/packages/language/c/libc/stdlib/current/src/strtoull.cxx
new file mode 100644
index 0000000000..fbd0e2f52d
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/src/strtoull.cxx
@@ -0,0 +1,175 @@
+//===========================================================================
+//
+// strtoull.cxx
+//
+// String to unsigned long long int conversion function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: Fredrik Hederstierna, converted file from long to long long.
+// Date: 2000-04-30, 2004-02-19
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+//
+// This code is based on original code with the following copyright:
+//
+/*
+ * Copyright (c) 1990 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdlib.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <limits.h> // Definition of ULONG_LONG_MAX
+#include <ctype.h> // Definition of many ctype functions
+#include <errno.h> // Error code definitions
+#include <stdlib.h> // Header for all stdlib functions
+ // (like this one)
+
+
+// FUNCTIONS
+
+//
+// Convert a string to an unsigned long long integer.
+//
+// Ignores `locale' stuff. Assumes that the upper and lower case
+// alphabets and digits are each contiguous.
+//
+
+unsigned long long
+strtoull( const char *nptr, char **endptr, int base )
+{
+ const char *s = nptr;
+ unsigned long long acc;
+ int c;
+ unsigned long long cutoff;
+ int neg = 0, any, cutlim;
+
+ CYG_REPORT_FUNCNAMETYPE( "strtoull", "returning long long %lld" );
+ CYG_REPORT_FUNCARG3( "nptr=%08x, endptr=%08x, base=%d",
+ nptr, endptr, base );
+ CYG_CHECK_DATA_PTR( nptr, "nptr is not a valid pointer!" );
+
+ if (endptr != NULL)
+ CYG_CHECK_DATA_PTR( endptr, "endptr is not a valid pointer!" );
+ //
+ // See strtoll for comments as to the logic used.
+ //
+ do {
+ c = *s++;
+ } while (isspace(c));
+ if (c == '-') {
+ neg = 1;
+ c = *s++;
+ } else if (c == '+')
+ c = *s++;
+ if ((base == 0 || base == 16) &&
+ c == '0' && (*s == 'x' || *s == 'X')) {
+ c = s[1];
+ s += 2;
+ base = 16;
+ }
+ if (base == 0)
+ base = c == '0' ? 8 : 10;
+ cutoff = (unsigned long long)ULONG_LONG_MAX / (unsigned long long)base;
+ cutlim = (unsigned long long)ULONG_LONG_MAX % (unsigned long long)base;
+ for (acc = 0, any = 0;; c = *s++) {
+ if (isdigit(c))
+ c -= '0';
+ else if (isalpha(c))
+ c -= isupper(c) ? 'A' - 10 : 'a' - 10;
+ else
+ break;
+ if (c >= base)
+ break;
+ if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim)
+ any = -1;
+ else {
+ any = 1;
+ acc *= base;
+ acc += c;
+ }
+ }
+ if (any < 0) {
+ acc = ULONG_LONG_MAX;
+ errno = ERANGE;
+ } else if (neg)
+ acc = -acc;
+ if (endptr != 0)
+ *endptr = (char *) (any ? s - 1 : nptr);
+
+ CYG_REPORT_RETVAL( acc );
+
+ return acc;
+} // strtoull()
+
+// EOF strtoull.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/src/system.cxx b/cesar/ecos/packages/language/c/libc/stdlib/current/src/system.cxx
new file mode 100644
index 0000000000..fcdc75c6a0
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/src/system.cxx
@@ -0,0 +1,69 @@
+//========================================================================
+//
+// system.cxx
+//
+// Implementation of ISO C system() function from section 7.10.4.5
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Purpose: This file implements the ISO C system() function
+// Description: This file provides a trivial implementation of the
+// system() function from ISO C section 7.10.4.5. It
+// simply exists to show that a command processor is
+// not available
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// INCLUDES
+
+#include <stdlib.h> // Header for this file
+
+// FUNCTIONS
+
+extern "C" int
+system( const char * )
+{
+ return 0;
+} // system()
+
+// EOF system.cxx
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/tests/abs.c b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/abs.c
new file mode 100644
index 0000000000..2948320498
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/abs.c
@@ -0,0 +1,102 @@
+//=================================================================
+//
+// abs.c
+//
+// Testcase for C library abs()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library abs() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <stdlib.h>
+#include <limits.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+int
+main( int argc, char *argv[] )
+{
+ int x;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C "
+ "library abs() function");
+
+ // Check 1
+ x = 5;
+ CYG_TEST_PASS_FAIL( abs(x) == 5, "abs(5)");
+
+ // Check 2
+ x = -5;
+ CYG_TEST_PASS_FAIL( abs(x) == 5, "abs(-5)");
+
+ // Check 3
+ x = 12345;
+ CYG_TEST_PASS_FAIL( abs(x) == 12345, "abs(12345)");
+
+ // Check 4
+ x = -23456;
+ CYG_TEST_PASS_FAIL( abs(x) == 23456, "abs(-23456");
+
+ // Check 5
+ x = 0;
+ CYG_TEST_PASS_FAIL( abs(x) == 0, "abs(0)");
+
+ // Check 6
+ x = INT_MAX;
+ CYG_TEST_PASS_FAIL( abs(x) == INT_MAX, "abs(INT_MAX)");
+
+ // Check 7
+ x = -INT_MAX;
+ CYG_TEST_PASS_FAIL( abs(x) == INT_MAX, "abs(-INT_MAX)");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C "
+ "library abs() function");
+
+} // main()
+
+// EOF abs.c
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/tests/atoi.c b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/atoi.c
new file mode 100644
index 0000000000..f7e1b46620
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/atoi.c
@@ -0,0 +1,111 @@
+//=================================================================
+//
+// atoi.c
+//
+// Testcase for C library atoi()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library atoi() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <stdlib.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+static char *
+my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+static void
+test( CYG_ADDRWORD data )
+{
+ char x[30];
+
+ // Check 1
+ my_strcpy(x, "20");
+ CYG_TEST_PASS_FAIL( atoi(x) == 20, "atoi(20)");
+
+ // Check 2
+ my_strcpy(x, "1972");
+ CYG_TEST_PASS_FAIL( atoi(x) == 1972, "atoi(1972)");
+
+ // Check 3
+ my_strcpy(x, "-9876");
+ CYG_TEST_PASS_FAIL( atoi(x) == -9876, "atoi(-9876)");
+
+ // Check 4
+ my_strcpy(x, " -9876xxx");
+ CYG_TEST_PASS_FAIL( atoi(x) == -9876, "atoi( -9876xxx)");
+
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "atoi() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "atoi() function");
+
+ test(0);
+
+ CYG_TEST_FAIL_FINISH("Not reached");
+
+} // main()
+
+// EOF atoi.c
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/tests/atol.c b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/atol.c
new file mode 100644
index 0000000000..e9e51fb9b1
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/atol.c
@@ -0,0 +1,108 @@
+//=================================================================
+//
+// atol.c
+//
+// Testcase for C library atol()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library atol() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <stdlib.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+static char *
+my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+static void
+test( CYG_ADDRWORD data )
+{
+ char x[30];
+
+ // Check 1
+ my_strcpy(x, "20");
+ CYG_TEST_PASS_FAIL( atol(x) == 20, "atol(20)");
+
+ // Check 2
+ my_strcpy(x, "1972");
+ CYG_TEST_PASS_FAIL( atol(x) == 1972, "atol(1972)");
+
+ // Check 3
+ my_strcpy(x, "-98765");
+ CYG_TEST_PASS_FAIL( atol(x) == -98765, "atol(-98765)");
+
+ // Check 4
+ my_strcpy(x, " -98765xxx");
+ CYG_TEST_PASS_FAIL( atol(x) == -98765, "atol( -98765xxx)");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "atol() function");
+} // test()
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "atol() function");
+
+ test(0);
+
+ CYG_TEST_NA("Testing is not applicable to this configuration");
+} // main()
+
+// EOF atol.c
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/tests/bsearch.c b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/bsearch.c
new file mode 100644
index 0000000000..7dcd9af2ea
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/bsearch.c
@@ -0,0 +1,131 @@
+//=================================================================
+//
+// bsearch.c
+//
+// Testcase for C library bsearch()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library bsearch() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <stdlib.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+static int
+Compar( const void *int1, const void *int2 )
+{
+ if ( *(int*)int1 < *(int*)int2 )
+ return -1;
+ else if ( *(int*)int1 == *(int*)int2 )
+ return 0;
+ else
+ return 1;
+} // Compar()
+
+int
+main( int argc, char *argv[] )
+{
+ int key;
+ int *result;
+ int i_array[] = {1, 5, 8, 35, 84, 258, 1022, 1022, 5300, 7372, 9029};
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "bsearch() function");
+
+ // Test 1
+ key = 8;
+ result = bsearch(&key, i_array, sizeof(i_array)/sizeof(i_array[0]),
+ sizeof(i_array[0]), &Compar);
+ CYG_TEST_PASS_FAIL( (result!=NULL) && (*result == 8),
+ "bsearch() something in the middle");
+
+ // Test 2
+ key = 5300;
+ result = bsearch(&key, i_array, sizeof(i_array)/sizeof(i_array[0]),
+ sizeof(i_array[0]), &Compar);
+ CYG_TEST_PASS_FAIL( (result!=NULL) && (*result == 5300),
+ "bsearch() something else in the middle");
+
+ // Test 3
+ key = 1;
+ result = bsearch(&key, i_array, sizeof(i_array)/sizeof(i_array[0]),
+ sizeof(i_array[0]), &Compar);
+ CYG_TEST_PASS_FAIL( (result!=NULL) && (*result == 1),
+ "bsearch() first element");
+
+ // Test 4
+ key = 9029;
+ result = bsearch(&key, i_array, sizeof(i_array)/sizeof(i_array[0]),
+ sizeof(i_array[0]), &Compar);
+ CYG_TEST_PASS_FAIL( (result!=NULL) && (*result == 9029),
+ "bsearch() last element");
+
+ // Test 5
+ key = 1022;
+ result = bsearch(&key, i_array, sizeof(i_array)/sizeof(i_array[0]),
+ sizeof(i_array[0]), &Compar);
+ CYG_TEST_PASS_FAIL( (result!=NULL) && (*result == 1022),
+ "bsearch() duplicate element");
+
+ // Test 6
+ key = 2;
+ result = bsearch(&key, i_array, sizeof(i_array)/sizeof(i_array[0]),
+ sizeof(i_array[0]), &Compar);
+ CYG_TEST_PASS_FAIL( result==NULL, "bsearch() nonexistent element");
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "bsearch() function");
+
+} // main()
+
+
+// EOF bsearch.c
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/tests/div.c b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/div.c
new file mode 100644
index 0000000000..97a8f68942
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/div.c
@@ -0,0 +1,118 @@
+//=================================================================
+//
+// div.c
+//
+// Testcase for C library div()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library div() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <stdlib.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+int
+main( int argc, char *argv[] )
+{
+ int num, denom;
+ div_t result;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "div() function");
+
+ num = 10232;
+ denom = 43;
+ result = div(num, denom);
+ CYG_TEST_PASS_FAIL( (result.quot==237) && (result.rem==41),
+ "div( 10232, 43 )");
+
+ num = 4232;
+ denom = 2000;
+ result = div(num, denom);
+ CYG_TEST_PASS_FAIL( (result.quot==2) && (result.rem==232),
+ "div( 4232, 2000 )");
+
+
+ num = 20;
+ denom = 20;
+ result = div(num, denom);
+ CYG_TEST_PASS_FAIL( (result.quot==1) && (result.rem==0),
+ "div( 20, 20 )");
+
+ num = -5;
+ denom = 4;
+ result = div(num, denom);
+ CYG_TEST_PASS_FAIL( (result.quot==-1) && (result.rem==-1),
+ "div( -5, 4 )");
+
+ num = 5;
+ denom = -4;
+ result = div(num, denom);
+ CYG_TEST_PASS_FAIL( (result.quot==-1) && (result.rem==1),
+ "div( 5, -4 )");
+
+ num = -5;
+ denom = -3;
+ result = div(num, denom);
+ CYG_TEST_PASS_FAIL( (result.quot==1) && (result.rem==-2),
+ "div( -5, -3 )");
+
+ num = -7;
+ denom = -7;
+ result = div(num, denom);
+ CYG_TEST_PASS_FAIL( (result.quot==1) && (result.rem==0),
+ "div( -7, -7 )");
+
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "div() function");
+
+} // main()
+
+// EOF div.c
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/tests/getenv.c b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/getenv.c
new file mode 100644
index 0000000000..0b7a4bff7a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/getenv.c
@@ -0,0 +1,143 @@
+//=================================================================
+//
+// getenv.c
+//
+// Testcase for C library getenv()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library getenv() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <stdlib.h> // Main header for stdlib functions
+#include <cyg/infra/testcase.h> // Testcase API
+
+// GLOBALS
+
+extern char **environ; // Standard environment definition
+
+// FUNCTIONS
+
+static int
+my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+int
+main( int argc, char *argv[] )
+{
+ char *str;
+
+ char *env1[] = { NULL };
+ char *env2[] = { "WIBBLE=fred", NULL };
+ char *env3[] = { "PATH=/usr/local/bin:/usr/bin",
+ "HOME=/home/fred",
+ "TEST=1234=5678",
+ "home=hatstand",
+ NULL };
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C "
+ "library getenv() function");
+
+
+ // Check 1
+ str = getenv("ThisIsAVeryUnlikelyName");
+ CYG_TEST_PASS_FAIL( str==NULL, "Simple getenv() default environ" );
+
+ // Check 2
+ environ = (char **)&env1;
+ str = getenv("wibble");
+ CYG_TEST_PASS_FAIL( str==NULL, "Simple getenv() with empty environ" );
+
+ // Check 3
+ environ = (char **)&env2;
+ str = getenv("WIBBLE");
+ CYG_TEST_PASS_FAIL( (str != NULL) && !my_strcmp(str, "fred"),
+ "Simple getenv()" );
+
+ // Check 4
+ str = getenv("wibble");
+ CYG_TEST_PASS_FAIL( str==NULL,
+ "Simple getenv() for something not in the "
+ "environment" );
+
+ // Check 5
+ environ = (char **)&env3;
+ str = getenv("PATH");
+ CYG_TEST_PASS_FAIL( (str!= NULL) &&
+ !my_strcmp(str,"/usr/local/bin:/usr/bin"),
+ "Multiple string environment" );
+
+ // Check 6
+ str = getenv("PATh");
+ CYG_TEST_PASS_FAIL( str==NULL, "getenv() for something not in the "
+ "environment for multiple string environment" );
+
+ // Check 7
+ str = getenv("home");
+ CYG_TEST_PASS_FAIL( (str != NULL) && !my_strcmp(str, "hatstand"),
+ "Case-sensitive environment names" );
+
+ // Check 8
+ str = getenv("TEST");
+ CYG_TEST_PASS_FAIL( (str != NULL) && !my_strcmp(str, "1234=5678"),
+ "environment value containing '='" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C "
+ "library getenv() function");
+
+} // main()
+
+// EOF getenv.c
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/tests/labs.c b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/labs.c
new file mode 100644
index 0000000000..6bb5463bea
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/labs.c
@@ -0,0 +1,98 @@
+//=================================================================
+//
+// labs.c
+//
+// Testcase for C library labs()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library labs() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <stdlib.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+int
+main( int argc, char *argv[] )
+{
+ int x;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "labs() function");
+
+ // Check 1
+ x = 5;
+ CYG_TEST_PASS_FAIL( labs(x) == 5, "labs(5)");
+
+ // Check 2
+ x = -5;
+ CYG_TEST_PASS_FAIL( labs(x) == 5, "labs(-5)");
+
+ // Check 3
+ x = 12345;
+ CYG_TEST_PASS_FAIL( labs(x) == 12345, "labs(12345)");
+
+ // Check 4
+ x = -23456;
+ CYG_TEST_PASS_FAIL( labs(x) == 23456, "labs(-23456");
+
+ // Check 5
+ x = 3456789;
+ CYG_TEST_PASS_FAIL( labs(x) == 3456789, "labs(3456789");
+
+ // Check 6
+ x = -23456789;
+ CYG_TEST_PASS_FAIL( labs(x) == 23456789, "labs(-23456789");
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "labs() function");
+} // main()
+
+// EOF labs.c
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/tests/ldiv.c b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/ldiv.c
new file mode 100644
index 0000000000..fa20dceb24
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/ldiv.c
@@ -0,0 +1,129 @@
+//=================================================================
+//
+// ldiv.c
+//
+// Testcase for C library ldiv()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library ldiv() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <stdlib.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+int
+main( int argc, char *argv[] )
+{
+ long num, denom;
+ ldiv_t result;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "ldiv() function");
+
+ num = 10232;
+ denom = 43;
+ result = ldiv(num, denom);
+ CYG_TEST_PASS_FAIL( (result.quot==237) && (result.rem==41),
+ "ldiv( 10232, 43 )");
+
+ num = 4232;
+ denom = 2000;
+ result = ldiv(num, denom);
+ CYG_TEST_PASS_FAIL( (result.quot==2) && (result.rem==232),
+ "ldiv( 4232, 2000 )");
+
+ num = 20;
+ denom = 20;
+ result = ldiv(num, denom);
+ CYG_TEST_PASS_FAIL( (result.quot==1) && (result.rem==0),
+ "ldiv( 20, 20 )");
+
+ num = -5;
+ denom = 4;
+ result = ldiv(num, denom);
+ CYG_TEST_PASS_FAIL( (result.quot==-1) && (result.rem==-1),
+ "ldiv( -5, 4 )");
+
+ num = 5;
+ denom = -4;
+ result = ldiv(num, denom);
+ CYG_TEST_PASS_FAIL( (result.quot==-1) && (result.rem==1),
+ "ldiv( 5, -4 )");
+
+ num = -5;
+ denom = -3;
+ result = ldiv(num, denom);
+ CYG_TEST_PASS_FAIL( (result.quot==1) && (result.rem==-2),
+ "ldiv( -5, -3 )");
+
+ num = -7;
+ denom = -7;
+ result = ldiv(num, denom);
+ CYG_TEST_PASS_FAIL( (result.quot==1) && (result.rem==0),
+ "ldiv( -7, -7 )");
+
+ num = 90123456;
+ denom = 12345678;
+ result = ldiv(num, denom);
+ CYG_TEST_PASS_FAIL( (result.quot==7) && (result.rem==3703710),
+ "ldiv( 90123456, 12345678 )");
+
+ num = 90123456;
+ denom = 123;
+ result = ldiv(num, denom);
+ CYG_TEST_PASS_FAIL( (result.quot==732711) && (result.rem==3),
+ "ldiv( 90123456, 123 )");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "ldiv() function");
+
+} // main()
+
+// EOF ldiv.c
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/tests/qsort.c b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/qsort.c
new file mode 100644
index 0000000000..2d425b1d51
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/qsort.c
@@ -0,0 +1,105 @@
+//=================================================================
+//
+// qsort.c
+//
+// Testcase for C library qsort()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library qsort() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <stdlib.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+
+static int
+Compar( const void *int1, const void *int2 )
+{
+ if ( *(int*)int1 < *(int*)int2 )
+ return -1;
+ else if ( *(int*)int1 == *(int*)int2 )
+ return 0;
+ else
+ return 1;
+} // Compar()
+
+int
+main( int argc, char *argv[] )
+{
+ unsigned int ctr;
+ int fail=0;
+ int i_array_sorted[] = {1, 5, 8, 35, 84, 258, 1022, 5300, 7372, 9029};
+ int i_array_unsorted[] = {258, 8, 7372, 1, 5, 9029, 1022, 35, 5300, 84};
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "qsort() function");
+
+ qsort(i_array_unsorted,
+ sizeof(i_array_unsorted) / sizeof(i_array_unsorted[0]),
+ sizeof(int), &Compar);
+
+ for (ctr = 0;
+ ctr < (sizeof(i_array_unsorted) / sizeof(i_array_unsorted[0]));
+ ++ctr)
+ {
+ if (i_array_sorted[ctr] != i_array_unsorted[ctr])
+ ++fail;
+ } // for
+
+ CYG_TEST_PASS_FAIL( fail == 0, "qsort() sorts correctly" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "qsort() function");
+
+} // main()
+
+// EOF qsort.c
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/tests/rand1.c b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/rand1.c
new file mode 100644
index 0000000000..5807d78de5
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/rand1.c
@@ -0,0 +1,100 @@
+//=================================================================
+//
+// rand1.c
+//
+// Testcase for C library rand()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library rand() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <stdlib.h>
+#include <cyg/infra/testcase.h>
+
+// CONSTANTS
+
+// This is the max allowable hits, where a hit is an element
+// of a random array being the same as index+1 or index+2
+#define TOLERANCE 2
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ int ctr;
+ static int array[1024];
+ int hits=0;
+
+ for (ctr=0; ctr<1024; ctr++)
+ array[ctr] = rand();
+
+ for (ctr=0; ctr< 1021; ctr++)
+ if ((array[ctr]==array[ctr+1]) ||
+ (array[ctr]==array[ctr+2]) ||
+ (array[ctr]==array[ctr+3]))
+ hits++;
+
+ CYG_TEST_PASS_FAIL(hits <= TOLERANCE,
+ "Simple test for rand() repetition");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for "
+ "C library rand() function");
+} // test()
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "rand() function");
+
+ test(0);
+
+ CYG_TEST_NA("Testing is not applicable to this configuration");
+} // main()
+
+// EOF rand1.c
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/tests/rand2.c b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/rand2.c
new file mode 100644
index 0000000000..24626d186d
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/rand2.c
@@ -0,0 +1,107 @@
+//=================================================================
+//
+// rand2.c
+//
+// Testcase for C library rand()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library rand() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <pkgconf/libc_stdlib.h> // CYGNUM_LIBC_RAND_SEED
+#include <stdlib.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ static int rand_data1[100];
+ static int rand_data2[100];
+ int count;
+ int fail=0;
+
+ // Test that rand starts with the seed as CYGNUM_LIBC_RAND_SEED
+
+ for ( count=0; count < 100; ++count ) {
+ rand_data1[count] = rand();
+ } // for
+
+ // set seed to CYGNUM_LIBC_RAND_SEED
+ srand(CYGNUM_LIBC_RAND_SEED);
+
+ for ( count=0; count < 100; ++count ) {
+ rand_data2[count] = rand();
+ } // for
+
+ for ( count=0; count < 100; ++count ) {
+ if (rand_data1[count] != rand_data2[count])
+ ++fail;
+ } // for
+
+ CYG_TEST_PASS_FAIL(fail==0, "rand() has seed initialised to "
+ "CYGNUM_LIBC_RAND_SEED");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C "
+ "library rand() function");
+} // test()
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C "
+ "library rand() function");
+
+ test(0);
+
+ CYG_TEST_NA("Testing is not applicable to this configuration");
+} // main()
+
+
+// EOF rand2.c
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/tests/rand3.c b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/rand3.c
new file mode 100644
index 0000000000..0614042180
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/rand3.c
@@ -0,0 +1,147 @@
+//=================================================================
+//
+// rand3.c
+//
+// Testcase for C library rand()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library rand() function. This tests
+// that random numbers are distributed well between 0 and
+// RAND_MAX
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <stdlib.h>
+#include <cyg/infra/testcase.h>
+
+
+// CONSTANTS
+
+#define NUM_BUCKETS 1000 // how many categories to define
+#define TEST_LENGTH 200000 // how many samples to take - careful
+ // when reducing this since it also reduces
+ // BUCKET_DIFF_TOLERANCE below. If you reduce
+ // it too low, BUCKET_DIFF_TOLERANCE will need
+ // a fudge factor
+
+#define BUCKET_SIZE (RAND_MAX / NUM_BUCKETS) // number space allocated
+ // to bucket from 0..RAND_MAX
+#define NUM_PER_BUCKET (TEST_LENGTH/NUM_BUCKETS) // Expected number that went
+ // into each bucket at end
+
+// how much the buckets can vary at the end.
+#define BUCKET_DIFF_TOLERANCE (NUM_PER_BUCKET/4) // allowed to vary 25%
+
+
+
+// FUNCTIONS
+
+static __inline__ int
+my_abs(int i)
+{
+ return (i < 0) ? -i : i;
+} // my_abs()
+
+int
+main(int argc, char *argv[])
+{
+ // divide the space from 0..RAND_MAX into NUM_BUCKETS categories *BUT*
+ // RAND_MAX / NUM_BUCKETS may not divide exactly so we leave space for
+ // the bits left over, in case there are any! So we add 1.
+
+ static cyg_uint8 rand_bucket[NUM_BUCKETS+1];
+ cyg_ucount32 count; // loop variable
+ int r; // temp for rand() variable
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "rand() function");
+
+ CYG_TEST_INFO("This test tests the distribution of random numbers and");
+ CYG_TEST_INFO("may take some time");
+
+ for ( count=0; count < TEST_LENGTH; ++count ) {
+ r = rand();
+ ++rand_bucket[ r / BUCKET_SIZE ];
+ if ((count%10000)==0)
+ CYG_TEST_STILL_ALIVE(count, "Still testing...");
+ } // for
+
+ for ( count=0; count < NUM_BUCKETS; ++count ) {
+ cyg_ucount32 diff;
+
+ diff = my_abs( rand_bucket[count] - NUM_PER_BUCKET );
+ if ( diff > BUCKET_DIFF_TOLERANCE )
+ break;
+ } // for
+
+ // if the previous loop completed, we may want to check the "extra"
+ // bucket (see the comment at the top) that may have some bits in if
+ // RAND_MAX doesn't split into NUM_BUCKETS evenly. The number of random
+ // digits that fell into that bucket would be expected to be proportional
+ // to the ratio of the remainder of (RAND_MAX % NUM_BUCKETS) to
+ // NUM_BUCKETS.
+ if (count == NUM_BUCKETS) {
+ cyg_ucount32 rem;
+ cyg_ucount32 last_bucket_expected;
+ cyg_ucount32 diff;
+
+ rem = RAND_MAX % NUM_BUCKETS;
+
+ last_bucket_expected = (rem * NUM_PER_BUCKET) / BUCKET_SIZE;
+
+ diff = my_abs(last_bucket_expected - rand_bucket[count]);
+ CYG_TEST_PASS_FAIL(diff <= BUCKET_DIFF_TOLERANCE,
+ "Upper bound fencepost test");
+ }
+ CYG_TEST_PASS_FAIL( (count >= NUM_BUCKETS),
+ "even distribution of rand()");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for "
+ "C library rand() function");
+} // main()
+
+
+// EOF rand3.c
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/tests/rand4.c b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/rand4.c
new file mode 100644
index 0000000000..7b17f887e7
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/rand4.c
@@ -0,0 +1,120 @@
+//=================================================================
+//
+// rand4.c
+//
+// Testcase for C library rand()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): rosalia
+// Contributors: jlarmour
+// Date: 2000-04-30
+// Description: Contains testcode for C library rand() function. This tests
+// that random numbers do not have periodicity in the lower
+// bit
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/libc_stdlib.h> // Configuration header
+
+// INCLUDES
+
+#include <stdlib.h>
+#include <cyg/infra/testcase.h>
+
+// CONSTANTS
+
+#define TEST_LENGTH 100000 // how many samples to take
+
+// DEFINES
+
+#define TEST_VALID (!defined(CYGIMP_LIBC_RAND_SIMPLEST))
+
+// FUNCTIONS
+
+int
+main(int argc, char *argv[])
+{
+#if TEST_VALID
+ int i;
+ int r, prev, prevprev;
+ int how_many_periodics = 0;
+#endif
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "rand() function");
+
+ CYG_TEST_INFO("This test tests the distribution of random numbers and");
+ CYG_TEST_INFO("may take some time");
+
+#if TEST_VALID
+ r = rand() % 2;
+ prev = r;
+ r = rand() % 2;
+ for (i = 0; i < TEST_LENGTH; ++i) {
+ prevprev = prev;
+ prev = r;
+ r = rand() % 2;
+ if (r == prevprev) {
+ ++how_many_periodics;
+ }
+ if (how_many_periodics > (2*TEST_LENGTH)/3) {
+ break;
+ }
+ }
+
+ CYG_TEST_PASS_FAIL( (how_many_periodics <= (2*TEST_LENGTH)/3),
+ "periodicity of rand() in lowest bit");
+
+#else
+
+ // TODO: should be an _expected_ fail i.e. XFAIL
+ CYG_TEST_NA("Chosen rand algorithm is known to fail this test");
+
+#endif
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for "
+ "C library rand() function");
+} // main()
+
+
+// EOF rand4.c
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/tests/srand.c b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/srand.c
new file mode 100644
index 0000000000..89e6abff59
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/srand.c
@@ -0,0 +1,130 @@
+//=================================================================
+//
+// srand.c
+//
+// Testcase for C library srand()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library srand() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <stdlib.h>
+#include <cyg/infra/testcase.h>
+
+
+// CONSTANTS
+
+// Max cross correlation value of two sequences of
+// different seed
+#define X_CORREL 10
+
+// size of arrays to use for testing
+#define TEST_SIZE 1024
+
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ int ctr;
+ static int array_1[TEST_SIZE];
+ static int array_2[TEST_SIZE];
+ static int array_3[TEST_SIZE];
+ int hits;
+ int fail;
+
+
+ srand(3);
+ for (ctr=0; ctr<TEST_SIZE; ++ctr)
+ array_1[ctr] = rand();
+
+ srand(9);
+ for (ctr=0; ctr<TEST_SIZE; ++ctr)
+ array_2[ctr] = rand();
+
+ srand(3);
+ for (ctr=0; ctr<TEST_SIZE; ++ctr)
+ array_3[ctr] = rand();
+
+ // Make sure arrays 1 and 3 are the same
+ fail = 0;
+ for (ctr=0; ctr<TEST_SIZE; ++ctr) {
+ if (array_1[ctr] != array_3[ctr])
+ ++fail;
+ } // for
+
+ CYG_TEST_PASS_FAIL( fail == 0, "resetting the seed to the same value");
+
+ // Check sequences of different seeds are different
+ hits = 0;
+ for (ctr=0; ctr<TEST_SIZE; ++ctr) {
+ if (array_1[ctr] == array_2[ctr])
+ ++hits;
+ } // for
+
+ CYG_TEST_PASS_FAIL(hits < X_CORREL,
+ "random sequence for different seeds is different");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for "
+ "C library srand() function");
+} // test()
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "srand() function");
+
+ test(0);
+
+ CYG_TEST_NA("Testing is not applicable to this configuration");
+} // main()
+
+
+
+// EOF srand.c
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/tests/strtol.c b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/strtol.c
new file mode 100644
index 0000000000..8e32d28a88
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/strtol.c
@@ -0,0 +1,183 @@
+//=================================================================
+//
+// strtol.c
+//
+// Testcase for C library strtol()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strtol() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <stdlib.h>
+#include <errno.h>
+#include <limits.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+static char *
+my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+static void
+test( CYG_ADDRWORD data )
+{
+ char x[30];
+ long z;
+ char *endptr;
+
+ my_strcpy(x, "20");
+ CYG_TEST_PASS_FAIL( strtol(x, (char**)NULL, 10) == 20,
+ "Simple strtol(20 ,...)" );
+
+ my_strcpy(x, "1972100");
+ CYG_TEST_PASS_FAIL( strtol(x, (char**)NULL, 10) == 1972100,
+ "Simple strtol(1972100, ..." );
+
+ my_strcpy(x, "0xFFEE");
+ z = strtol(x, (char**)NULL, 16);
+ CYG_TEST_PASS_FAIL(z == 65518, "Hex base strtol()");
+
+ my_strcpy(x, "100111011");
+ z = strtol(x, (char**)NULL, 2);
+ CYG_TEST_PASS_FAIL(z == 315, "Binary base strtol()");
+
+ my_strcpy(x, "10372");
+ z = strtol(x, (char**)NULL, 8);
+ CYG_TEST_PASS_FAIL(z == 4346, "Octal base strtol()" );
+
+ my_strcpy(x, "317823");
+ z = strtol(x, (char**)NULL, 8);
+ CYG_TEST_PASS_FAIL(z == 207, "Partial string" );
+
+ my_strcpy(x, " 53ab823");
+ z = strtol(x, &endptr, 10);
+ CYG_TEST_PASS_FAIL((z == 53) && (endptr==&x[3]), "Correct end pointer" );
+
+ my_strcpy(x, "-479");
+ z = strtol(x, (char**)NULL, 10);
+ CYG_TEST_PASS_FAIL(z == -479, "Negative string");
+
+ my_strcpy(x, "+4796");
+ z = strtol(x, (char**)NULL, 10);
+ CYG_TEST_PASS_FAIL(z == 4796, "Positive string");
+
+ my_strcpy(x, "");
+ z = strtol(x, (char**)NULL, 10);
+ CYG_TEST_PASS_FAIL(z == 0, "Empty string");
+
+ my_strcpy(x, "");
+ z = strtol(x, &endptr, 10);
+ CYG_TEST_PASS_FAIL((z == 0) && (endptr==x),
+ "Empty string sets endptr correctly");
+
+ my_strcpy(x, " ");
+ z = strtol(x, &endptr, 10);
+ CYG_TEST_PASS_FAIL((z == 0) && (endptr==x),
+ "White space only string sets endptr correctly");
+
+ my_strcpy(x, "0XFFEE");
+ z = strtol(x, (char**)NULL, 0);
+ CYG_TEST_PASS_FAIL(z == 65518, "Base 0 but hex");
+
+ my_strcpy(x, "\t 0629");
+ z = strtol(x, (char**)NULL, 0);
+ CYG_TEST_PASS_FAIL(z == 50, "Base 0 but octal");
+
+ my_strcpy(x, "42");
+ z = strtol(x, (char**)NULL, 0);
+ CYG_TEST_PASS_FAIL(z == 42, "Base 0 but decimal");
+
+ my_strcpy(x, "hello");
+ z = strtol(x, &endptr, 0);
+ CYG_TEST_PASS_FAIL((z == 0) && (endptr==x),
+ "endptr set correctly on conversion failure");
+
+ my_strcpy(x, "z2f");
+ z = strtol(x, (char**)NULL, 36);
+ CYG_TEST_PASS_FAIL(z == 45447, "Base==36");
+
+ my_strcpy(x, "h547324");
+ z = strtol(x, (char**)NULL, 10);
+ CYG_TEST_PASS_FAIL(z == 0, "No valid number string");
+
+ my_strcpy(x, "545425876654547324");
+ z = strtol(x, (char**)NULL, 10);
+ CYG_TEST_PASS_FAIL( (z == LONG_MAX) && (errno == ERANGE),
+ "Number out of range");
+
+ my_strcpy(x, "-545425876654547324");
+ z = strtol(x, (char**)NULL, 10);
+ CYG_TEST_PASS_FAIL( (z == LONG_MIN) && (errno == ERANGE),
+ "Number out of range");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strtol() function");
+} // test()
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strtol() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ test(0);
+
+ CYG_TEST_NA("Testing is not applicable to this configuration");
+} // main()
+
+// EOF strtol.c
diff --git a/cesar/ecos/packages/language/c/libc/stdlib/current/tests/strtoul.c b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/strtoul.c
new file mode 100644
index 0000000000..df4dd219bd
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/stdlib/current/tests/strtoul.c
@@ -0,0 +1,179 @@
+//=================================================================
+//
+// strtoul.c
+//
+// Testcase for C library strtoul()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strtoul() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <stdlib.h>
+#include <errno.h>
+#include <limits.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+static char *
+my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+static void
+test( CYG_ADDRWORD data )
+{
+ char x[30];
+ unsigned long z;
+ char *endptr;
+
+ my_strcpy(x, "20");
+ CYG_TEST_PASS_FAIL( strtoul(x, (char**)NULL, 10) == 20,
+ "Simple strtoul(20 ,...)" );
+
+ my_strcpy(x, "1972100");
+ CYG_TEST_PASS_FAIL( strtoul(x, (char**)NULL, 10) == 1972100,
+ "Simple strtoul(1972100, ..." );
+
+ my_strcpy(x, "0xFFEE");
+ z = strtoul(x, (char**)NULL, 16);
+ CYG_TEST_PASS_FAIL(z == 65518, "Hex base strtoul()");
+
+ my_strcpy(x, "100111011");
+ z = strtoul(x, (char**)NULL, 2);
+ CYG_TEST_PASS_FAIL(z == 315, "Binary base strtoul()");
+
+ my_strcpy(x, "10372");
+ z = strtoul(x, (char**)NULL, 8);
+ CYG_TEST_PASS_FAIL(z == 4346, "Octal base strtoul()" );
+
+ my_strcpy(x, "317823");
+ z = strtoul(x, (char**)NULL, 8);
+ CYG_TEST_PASS_FAIL(z == 207, "Partial string" );
+
+ my_strcpy(x, " 53ab823");
+ z = strtoul(x, &endptr, 10);
+ CYG_TEST_PASS_FAIL( (z == 53) && (endptr==&x[3]), "Correct end pointer" );
+
+ my_strcpy(x, "-479");
+ z = strtoul(x, (char**)NULL, 0);
+ CYG_TEST_PASS_FAIL( (z == (unsigned long) -479),
+ "Negative string");
+
+ my_strcpy(x, "+4796");
+ z = strtoul(x, (char**)NULL, 10);
+ CYG_TEST_PASS_FAIL(z == 4796, "Positive string");
+
+ my_strcpy(x, "");
+ z = strtoul(x, (char**)NULL, 10);
+ CYG_TEST_PASS_FAIL(z == 0, "Empty string");
+
+ my_strcpy(x, "");
+ z = strtoul(x, &endptr, 10);
+ CYG_TEST_PASS_FAIL( (z == 0) && (endptr==x),
+ "Empty string sets endptr correctly");
+
+ my_strcpy(x, " ");
+ z = strtoul(x, &endptr, 10);
+ CYG_TEST_PASS_FAIL( (z == 0) && (endptr==x),
+ "White space only string sets endptr correctly");
+
+ my_strcpy(x, "0XFFEE");
+ z = strtoul(x, (char**)NULL, 0);
+ CYG_TEST_PASS_FAIL(z == 65518, "Base 0 but hex");
+
+ my_strcpy(x, "\t 0629");
+ z = strtoul(x, (char**)NULL, 0);
+ CYG_TEST_PASS_FAIL(z == 50, "Base 0 but octal");
+
+ my_strcpy(x, "42");
+ z = strtoul(x, (char**)NULL, 0);
+ CYG_TEST_PASS_FAIL(z == 42, "Base 0 but decimal");
+
+ my_strcpy(x, "hello");
+ z = strtoul(x, &endptr, 0);
+ CYG_TEST_PASS_FAIL((z == 0) && (endptr==x),
+ "endptr set correctly on conversion failure");
+
+ my_strcpy(x, "z2f");
+ z = strtoul(x, (char**)NULL, 36);
+ CYG_TEST_PASS_FAIL(z == 45447, "Base==36");
+
+ my_strcpy(x, "h547324");
+ z = strtoul(x, (char**)NULL, 10);
+ CYG_TEST_PASS_FAIL(z == 0, "No valid number string");
+
+ my_strcpy(x, "545425876654547324");
+ z = strtoul(x, (char**)NULL, 10);
+ CYG_TEST_PASS_FAIL( (z == ULONG_MAX) && (errno == ERANGE),
+ "Number out of range");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strtoul() function");
+} // test()
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strtoul() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ test(0);
+
+ CYG_TEST_NA("Testing is not applicable to this configuration");
+} // main()
+
+// EOF strtoul.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/ChangeLog b/cesar/ecos/packages/language/c/libc/string/current/ChangeLog
new file mode 100644
index 0000000000..3e1a3482eb
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/ChangeLog
@@ -0,0 +1,88 @@
+2005-07-22 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/strcmp.cxx (__strcmp): Set retval to zero to avoid compiler
+ warnings.
+
+2004-02-20 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * include/string.h: Prototype strdup().
+ * include/stringsupp.hxx: Prototype __strdup().
+ externC -> __externC while I'm here.
+ * src/strdup.cxx: New file implementing strdup()/__strdup().
+ * cdl/string.cdl: Build strdup.cxx if CYGINT_ISO_MALLOC.
+
+ * src/strtok.cxx (strtok): Use correct thread data type.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/string.cdl: Fix doc link.
+
+2001-11-27 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/string.cdl (CYGFUN_LIBC_STRING_BSD_FUNCS): New option to indicate
+ provision of BSD-ish string functions.
+ * include/bsdstring.h: New header to export BSD string func prototypes.
+ * src/bsdstring.cxx: New file.
+
+2001-08-21 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/string.cdl (CYGSEM_LIBC_STRING_PER_THREAD_STRTOK): Improve
+ dependencies.
+
+2001-08-10 Robin Farine <acnrf@dial.eunet.ch>
+
+ * src/memchr.cxx (__memchr): Don't check string validity if number
+ of bytes to operate on is 0.
+ * src/memcmp.cxx (__memcmp): Ditto.
+ * src/memmove.cxx (__memmove): Ditto.
+ * src/strncat.cxx (__strncat): Ditto.
+ * src/strncmp.cxx (__strncmp): Ditto.
+ * src/strncpy.cxx (__strncpy): Ditto.
+ * src/strxfrm.cxx (__strxfrm): Ditto.
+
+2000-05-20 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/strtok.cxx: Remove aliases
+
+2000-05-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * New package
+ Separated original libc out into separate packages on functional
+ boundaries.
+ Header files are now managed by isoinfra package
+ Plenty of cleanups done, but no major functionality changes
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/string/current/ChangeLog.libc b/cesar/ecos/packages/language/c/libc/string/current/ChangeLog.libc
new file mode 100644
index 0000000000..88fb2f11f2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/ChangeLog.libc
@@ -0,0 +1,2736 @@
+This ChangeLog file is now obsolete. This is the original ChangeLog from when
+libc was one large package, before being separated. It is included for
+historical reasons.
+
+2000-04-05 Jesper Skov <jskov@redhat.com>
+
+ * src/time/settime.cxx:
+ * src/time/time.cxx:
+ Wallclock moved to io/.
+
+2000-03-28 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/string.cdl,
+ cdl/stdlib.cdl,
+ cdl/stdio.cdl,
+ cdl/libc.cdl:
+
+ Adjust documentation URLs.
+
+2000-03-27 Jesper Skov <jskov@redhat.com>
+
+ * src/clibincl/stream.inl (check_this): Use cyb_bool instead of bool.
+
+2000-03-06 Jesper Skov <jskov@redhat.com>
+
+ * tests/time/strftime.c (test): Adjust test to match below change.
+
+2000-03-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/time/strftime.cxx (do_format): Make sure %m counts from
+ 1..12 rather than 0..11. Fix for case 103300
+
+2000-02-29 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: Correctly use 'n' parameter to
+ restrict length. Credit due to Andrew Lunn here as well.
+ Resolves 103057-CR-1
+
+ * tests/stdio/sprintf2.c (test):
+ Add snprintf tests to verify the correct behaviour of restricting
+ output length
+
+2000-02-10 Jesper Skov <jskov@redhat.com>
+
+ * tests/signal/signal2.c (main):
+ Also reclaim DATA_TLB_MISS vector if available.
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+
+1999-11-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * cdl/string.cdl:
+ Switch to a single boolean configuration option for code size vs.
+ speed optimization.
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl: Define tests.
+
+1999-10-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: We can now remove Berkeley
+ advertising clause
+ * src/stdlib/div.cxx: ditto
+ * src/stdlib/ldiv.cxx: ditto
+ * src/stdlib/strtol.cxx: ditto
+ * src/stdlib/strtoul.cxx: ditto
+ * src/string/strtok.cxx: ditto
+
+1999-10-19 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl:
+
+ Define CDL options for package-specific CFLAGS.
+
+1999-10-08 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_THREAD_PRIORITY): Change
+ default to 10 to keep test farm happy
+ * cdl/startup.cdl: Likewise
+
+1999-10-07 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Specify radio buttons using CDL interfaces.
+
+1999-10-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * cdl/stdio.cdl: Change default to /dev/ttydiag as per 1999-10-01
+ change below
+ * cdl/startup.cdl: Add new form CDL for the startup changes as
+ per 1999-10-05
+
+1999-10-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/libc.h: Add CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM to allow
+ the user to supply their own stack.
+ Rename CYGNUM_LIBC_MAIN_STACK_SIZE to
+ CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE and reparent under
+ CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM
+ Add CYGNUM_LIBC_MAIN_THREAD_PRIORITY to provide main() thread
+ priority
+
+ * src/support/mainthread.cxx: Add support for user-supplied stack
+ Allow user to specify thread priority
+
+ These changes fix CR 101069
+
+1999-10-01 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE): Change
+ default to /dev/ttydiag to get correct console-like behaviour
+ Also don't preclude use if haldiag package isn't included
+ (case 102065)
+
+1999-09-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (cause_fpe): Try both float and integer
+ division by zero.
+
+1999-09-10 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx (cyg_libc_get_malloc_pool): Added for
+ stress_threads test.
+
+1999-09-07 Jesper Skov <jskov@cygnus.co.uk>
+ PRs 20243, 20433
+ * tests/signal/signal2.c: Disabled test3 on ARM.
+
+1999-09-02 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/assert.h: Make the sense of NDEBUG correct; it is "set"
+ when NOT debugging. Fix for CR 101983-CR-1
+ See Stroustrup, "The C++ Programming Language."
+
+1999-08-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen): Set buffer size 0 when not
+ buffering
+ Fix for case 101868
+
+1999-08-17 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Implement radio buttons using "FIXME radio" hack in
+ description field for now.
+
+1999-08-12 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl:
+ Take advantage of MACRONAME_ENUMVAL macros output by CDL.
+
+1999-08-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf2.c (test): Don't rely on 2.345 being exactly
+ representable in binary as a difference of 1 ulp will make it round
+ the wrong way.
+
+1999-07-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fgetc.cxx:
+ Include outline versions of getc() (actually just a symbol alias for
+ fgetc() ) and getchar()
+ Some minor clean-ups
+ Add tracing/assertions
+
+ * src/stdio/input/fputc.cxx:
+ Likewise (except applied to putc() and putchar())
+
+ * src/stdio/common/stdioinlines.cxx (_puts):
+ Call fputc() not _fputc()
+
+ * src/clibincl/stdiosupp.hxx:
+ Remove now obsolete prototypes for _fgetc() and _fputc()
+
+ * include/stdio.h:
+ Don't bother with getc()/putc() macros any more, just call
+ them as functions
+ Include protos for getc(), putc(), getchar() and putchar() functions
+
+1999-06-21 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for SH EDK7708.
+
+1999-06-11 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h: Make FILEs array types so they won't be
+ given $gp relocations on MIPS targets
+
+1999-05-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/ctime.c: Fixed compiler warning.
+
+1999-05-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main):
+ Update CYGPKG_HAL_TX39 -> CYGPKG_HAL_MIPS_TX39 due to recent MIPS
+ HAL changes
+ Fix for PR 20116
+
+1999-04-30 Jesper Skov <jskov@lassi.cygnus.co.uk>
+ PR 19945/19946 workaround
+ * tests/signal/signal2.c: Disabled test 3 for PowerPC sim.
+
+1999-04-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl:
+ Ensure all calls to cyg_libc_time_year_is_leap() are with the full
+ year, and not the direct contents of a struct tm, which are (year-1900)
+
+1999-04-19 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19308, 19410, 19528
+ * tests/time/clock.c (test): Also disable data cache which may
+ affect timing when tracing/assertions are enabled.
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ Add prototype for new cyg_libc_stdio_flush_all_but() function
+
+ * src/clibincl/stream.hxx:
+ Don't include stdiosupp.hxx any more to prevent circular dependency,
+ therefore manually provide _setvbuf prototype
+ Make sure pkgconf/kernel.h is included before mutex.hxx
+
+ * src/clibincl/stream.inl (Cyg_StdioStream::set_error()):
+ Add missing unlock_me()
+
+ * src/stdio/common/fflush.cxx:
+ Separate most of code for fflush(NULL) into separate
+ cyg_libc_stdio_flush_all_but() function, which has the extra
+ capability of omitting one stream
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Add missing clibincl/stdiosupp.hxx include
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::read()):
+ When reading, ensure we flush all output streams
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::flush_output_unlocked):
+ Flush the device as well
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * src/clibincl/streambuf.inl:
+ * src/clibincl/streambuf.hxx:
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ * include/pkgconf/libc.h:
+ * include/stdio.inl (setbuf):
+ Fix dumb typo: BUFSIZE -> BUFSIZ
+ This fixes PR19837
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * include/stdio.inl (setbuf):
+ Use _IONBF when buf==NULL, and _IOLBF otherwise.
+ Fix for PR 19836
+
+1999-04-15 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Tidy display string capitalization.
+
+1999-04-12 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Clarify CDL description of CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE
+
+ * tests/signal/signal2.c: Try harder to generate an exception by
+ accessing a misaligned address
+ Don't handle SIGTRAP any more
+ Part of fix for PRs 19731/19607
+
+1999-04-07 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19667
+ * src/support/mainthread.cxx:
+ Changed to use the new Cyg_Thread constructor.
+
+1999-04-07 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Use new macro
+ HAL_VSR_SET_TO_ECOS_HANDLER if defined, to wrest control from
+ CygMon, for example, by reinstalling eCos' default VSRs for
+ exceptions that we are provoking.
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx: Include stdlib.h for exit()
+ Fix for PR 19720
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/clock.c (test): Disable instruction cache
+ Hopefully fixes PR 19308
+
+1999-03-29 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for PPC as it cannot
+ trap division by zero.
+
+1999-03-26 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/main.cxx (main): Invoke cyg_user_start() if no kernel
+ Only sensible thing to do in our default main in a non-kernel config
+
+1999-03-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/time.c:
+ Increase MAX_TIMEOUT since the sparclite gets very close to overrunning
+ it even when working.
+ Should return -1 iff CYGSEM_LIBC_TIME_TIME_WORKING isn't defined
+ Cosmetic changes
+
+1999-03-25 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/time/time.c (test): Take into account setting of
+ CYGSEM_LIBC_TIME_SETTIME_WORKING ie. does cyg_libc_time_settime()
+ work? If not, check that it returns an error.
+ This was exposed by the random combo in PR#19479.
+
+1999-03-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1 to
+ CYGIMP_...
+
+ Add another rand implementation CYGIMP_LIBC_RAND_SIMPLE1 which is
+ the default
+
+ Part of fix for PR 19562
+
+ * include/sys/cstartup.h:
+ Tidy and remove unnecessary dependencies
+
+ * src/stdlib/rand.cxx:
+ Rename algorithms from CYGSEM_... to CYGIMP_...
+ Add new "simple1" algorithm
+
+ * tests/ctype/ctype.c:
+ Tidy
+
+ * tests/stdlib/rand3.c:
+ Fix so that 0..RAND_MAX is split evenly over buckets, which it wasn't
+ before
+ Deal with case of RAND_MAX not being divisible by NUM_BUCKETS
+ exactly
+ Increase TEST_LENGTH to 200000 to provide more representative sample
+ Add CYG_TEST_INFO output to help ensure it doesn't time out
+ Tidy
+
+ * tests/stdlib/rand4.c:
+ Only fail if more than _two_ thirds (rather than one third) match.
+ This is because half would match for a perfectly random distribution
+ This is the rest of the fix for PR 19562
+ Cosmetic changes
+
+1999-03-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/mainthread.cxx (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ Use CYGNUM_HAL_STACK_SIZE_TYPICAL for the stack size instead of
+ CYGNUM_HAL_MINIMUM_STACK_SIZE.
+
+1999-03-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak: Add -Wno-format when building strftime otherwise
+ it generates warnings for things that we do want to test (null
+ string, and %y format)
+
+1999-03-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Put brackets back round negative number since sdf says the config
+ tool is fixed now (PR 19537)
+
+ Add new CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1
+ options for different rand() algorithms in a so far failed attempt
+ to fix PR 19562
+
+ * src/stdlib/rand.cxx:
+ Add new optional algorithm from Knuth vol.2
+
+ * tests/stdlib/rand4.c:
+ Some tidies
+ Don't run test when using simplest algorithm
+
+ * tests/signal/signal2.c (main):
+ Don't try to make an FPE on tx39 - its possible to detect but requires
+ too much HAL work to be sensible
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Use HAL_ENABLE_INTERRUPTS() rather than kernel to enable interrupts
+
+1999-03-18 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/PKGconf.mak (TESTS): added rand4 compilation.
+
+ * tests/stdlib/rand4.c: added this test for periodicity in the
+ least significant bit of rand().
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Remove CYGFUN_LIBC_TIME_POSIX dependency
+ on CYGPKG_LIBC_STDIO
+
+ * src/stdlib/itoa.cxx:
+ New file to convert integers to ascii
+
+ * include/stdlib.h:
+ Add proto for new cyg_libc_itoa() function
+
+ * include/time.inl:
+ Rework __asctime_r() to use memcpy() and cyg_libc_itoa() rather than
+ sprintf()
+
+ * src/PKGconf.mak:
+ Build stdlib/itoa.cxx
+
+ The above changes fix PR 19448
+
+1999-03-17 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h: Add #define of __time_t_defined to placate newlib
+ if it is used by accident. This is just a temporary workaround though.
+
+1999-03-16 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/PKGconf.mak: Add compile option to step around ARM compiler bug.
+
+1999-03-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Don't use parentheses for now
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Silence bogus compiler warning
+
+1999-03-16 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Enable SIGSEGV test for
+ i386/Linux.
+
+
+1999-03-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Only enable interrupts if they were disabled
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx:
+ Add FIX ME line as a reminder that the workaround there can go away
+ in future
+
+ * include/pkgconf/libc.h:
+ Add proper define for CYGSEM_LIBC_EXIT_CALLS_FFLUSH
+ Put brackets round negative CYGNUM_LIBC_TIME_DST_DEFAULT_STATE define
+ Fix run time typo
+
+ * include/time.inl (__localtime_r):
+ Include sys/timeutil.h before this to get
+ cyg_libc_time_normalize_structtm()
+
+1999-03-12 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx: Remove 'const' from char arrays since
+ this fails [silently] on ARM when -fwritable-strings (PR19440)
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Compiler warnings fix was
+ slightly broken.
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c (main):
+ Disabling SIGTRAP handling on i386/Linux is not a good idea.
+1999-03-11 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c:
+ Added compiler warnings fix.
+ Added N/A handling for i386/Linux.
+
+1999-03-10 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Force "haldiag" device to be present.
+ 'asctime' and friends need 'stdio' as well.
+
+ * include/time.inl: Fix syntax error on difftime() declaration.
+
+1999-03-08 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx: <cyg/infra/cyg_ass.h> needed for this file.
+
+ * src/stdio/common/vsscanf.cxx (str_read): Fix problem with string
+ pointer [created by merge with new I/O package].
+
+1999-03-05 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add legal values for CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET
+ and CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET.
+
+1999-03-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl (cyg_libc_time_year_is_leap):
+ Fix bug with modulo year 400
+ Fix typo in asctime_r macro
+ Fix gmtime_r, and mktime as a result of testing
+
+ * tests/time/asctime.c, tests/time/ctime.c, tests/time/gmtime.c,
+ tests/time/gmtime.c, tests/time/localtime.c, tests/time/mktime.c,
+ tests/time/strftime.c, tests/time/time.c:
+ New tests
+
+ * tests/PKGconf.mak:
+ Build above new tests
+
+ * include/pkgconf/libc.h:
+ Add reminder FIX ME about extra config option
+
+ * src/time/strftime.cxx:
+ Fix %w and %Y parameters as a result of testing
+
+ * src/time/timeutil.cxx:
+ Fix cyg_libc_time_normalize_structtm() as a result of testing
+ of mktime()
+
+ * tests/time/clock.c:
+ Reformat, remove obsolete bits and tidy
+
+ * include/time.h:
+ Add Cyg_libc_time_dst type and new functions
+ cyg_libc_time_setzoneoffsets(), cyg_libc_time_setdst(),
+ cyg_libc_time_getzoneoffsets(), cyg_libc_time_settime()
+
+ * include/time.inl:
+ Implement the above functions. This allows us to adjust for timezone
+ diffences and set the time.
+ Change localtime() to adjust for STD/DST
+ Change mktime() to adjust for STD/DST
+
+ * include/libc.h:
+ Add new config options CYGSEM_LIBC_TIME_SETTIME_WORKING
+ and component CYGPKG_LIBC_TIME_ZONES containing options
+ CYGNUM_LIBC_TIME_DST_DEFAULT_STATE,
+ CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET,
+ CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET
+
+ * src/strftime.cxx:
+ Adjust handling of %Z to _not_ deal with STD/DST
+
+ * src/time/settime.cxx:
+ New file to implement cyg_libc_time_settime()
+
+ * src/PKGconf.mak:
+ Build settime.cxx
+
+ * src/time/timeutil.cxx:
+ Supply outline versions of cyg_libc_time_setzoneoffsets(),
+ cyg_libc_time_setdst(), and cyg_libc_time_getzoneoffsets()
+ Add variables for STD/DST state
+ Some minor comment changes
+
+ * include/errno.h:
+ Use CYGBLD_ATTRIB_CONST instead of __attribute__((const)) directly
+
+ * include/signal.h:
+ Change format of function comment headers
+
+ * include/signal.inl:
+ Restrict errno.h inclusion to when its actually used
+ Fix a spelling typo
+
+ * include/stdlib.h:
+ Add CYGBLD_ATTRIB_CONST to abs, div, labs, ldiv
+
+ * include/stdlib.inl:
+ Reformat and tidy
+ Include new versions of div and ldiv which are more portable and
+ are cleanly rewritten so aren't covered by the BSD licence, which
+ is now removed
+
+ * src/stdlib/div.cxx, src/stdlib/ldiv.cxx:
+ Non-inline, non-BSD and portable versions of the new versions of div
+ and ldiv from stdlib.inl
+
+ * include/time.h:
+ Much reformatting, tidying and improving comments
+ Change CLOCKS_PER_SEC from 1000 to 1000000
+ Add new functions asctime_r, ctime_r, gmtime_r, localtime_r, clock,
+ difftime, mktime, time, asctime, ctime, gmtime, localtime, strftime
+ Include new time.inl file
+
+ * include/pkgconf/libc.h:
+ Add new options CYGSEM_LIBC_TIME_CLOCK_WORKING,
+ CYGSEM_LIBC_TIME_TIME_WORKING, CYGFUN_LIBC_TIME_POSIX,
+ CYGNUM_LIBC_TIME_CLOCK_TRACE_LEVEL, CYGIMP_LIBC_TIME_ASCTIME_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_INLINE, CYGIMP_LIBC_TIME_DIFFTIME_INLINE,
+ CYGIMP_LIBC_TIME_GMTIME_INLINE, CYGIMP_LIBC_TIME_LOCALTIME_INLINE,
+ CYGIMP_LIBC_TIME_MKTIME_INLINE, CYGIMP_LIBC_TIME_ASCTIME_R_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_R_INLINE, CYGIMP_LIBC_TIME_GMTIME_R_INLINE,
+ and CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE
+
+ * time/asctime.cxx, time/asctime_r.cxx, time/clock.cxx, time/ctime.cxx,
+ time/ctime_r.cxx, time/difftime.cxx, time/gmtime.cxx,
+ time/gmtime_r.cxx, time/localtime.cxx, time/localtime_r.cxx,
+ time/mktime.cxx, time/strftime.cxx, time/time.cxx, time/timeutil.cxx,
+ include/time.inl:
+ New files to implement the new time functions. Many of them simply
+ provide the outline definitions, but the real body of the function
+ comes from time.inl
+
+ * src/PKGconf.mak:
+ Build new .cxx files
+
+ * src/clibincl/stdlibsupp.hxx:
+ Remove _div and _ldiv prototypes since they're no longer needed
+
+ * src/clibincl/timesupp.hxx:
+ Delete as its now obsolete
+
+ * src/time/clock.cxx:
+ Use new CYGSEM_LIBC_TIME_CLOCK_WORKING option to control whether it
+ just returns (clock_t)-1 or not.
+ Much reformatting and tidying
+ Change real imlpementation from _clock to __clock
+ Use CYGBLD_ATTRIB_WEAK_ALIAS now
+
+ * tests/stdlib/div.c, tests/stdlib/ldiv.c:
+ Add some extra tests for handling of negative numbers
+ Reformat and tidy a bit, including removing the test for CYGPKG_LIBC
+ since its now always defined if the test is to be compiled
+
+ * tests/time/clock.c:
+ Remove duplication CYG_TEST_INFO line
+ Check if unimplemented using "(clock_t)-1" and not just "-1"
+
+1999-03-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx:
+ Make sure system() is a weak alias for __system()
+
+ * include/pkgconf/libc.h: Rework CDL description for
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE and change its default to
+ "/dev/haldiag"
+
+ * src/stdio/common/stream.cxx:
+ Check that dev is valid when passed to stream constructor
+
+ * src/stdio/common/stdiosupp.cxx:
+ Tidy
+
+ * src/support/mainthread.cxx: Make this depend on
+ CYGSEM_LIBC_STARTUP_MAIN_THREAD rather than just CYGPKG_KERNEL
+
+1999-03-04 Gary Thomas <gthomas@cygnus.co.uk>
+
+ Merged in changes from 'ecos-new_devs-19990216-branch'
+
+ (1999-02-24 Jonathan Larmour <jlarmour@cygnus.co.uk>)
+
+ * src/stdio/common/stream.cxx:
+ Add "fix me" comments and remove a couple of commented out lines
+
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Revert to using pointer to string for private data, not just string.
+ This preserves the state across multiple calls
+
+ (1999-02-24 Gary Thomas <gthomas@cygnus.co.uk>)
+
+ * src/stdio/common/vsscanf.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/stream.cxx:
+ * src/stdio/common/stdiosupp.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/clibincl/stream.inl:
+ * src/clibincl/stream.hxx:
+ * src/clibincl/stdiosupp.hxx:
+ * include/pkgconf/libc.h: Changes for new I/O system.
+
+1999-03-03 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atexit.c: Forgot to config atexit test for
+ CYGFUN_LIBC_ATEXIT option
+
+ * include/pkgconf/libc.h:
+ Require CYGVAR_KERNEL_THREADS_DATA for CYGSEM_LIBC_PER_THREAD_STRTOK
+ This fixes PR 19362
+ Require CYGPKG_KERNEL for thread safe streams
+ Also don't need "requires CYGPKG_KERNEL" for per-thread rand and errno
+ if we already require a finer granularity kernel option
+
+1999-02-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Fix CYGNUM_LIBC_MAIN_STACK_SIZE by changing
+ CYGPKG_LIBC_STARTUP_MAIN_THREAD -> CYGSEM_LIBC_STARTUP_MAIN_THREAD
+ Fix for PR 19304
+
+1999-02-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx: Add to implement trivial system() call
+ * include/stdlib.h: Add system() prototype
+ * src/PKGconf.mak: Build system.cxx
+
+ * tests/ctype/ctype.c, tests/i18n/setlocale.c, tests/setjmp/setjmp.c,
+ tests/signal/signal1.c, tests/signal/signal2.c,
+ tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdio/stdiooutput.c, tests/stdlib/atexit.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/getenv.c, tests/stdlib/labs.c,
+ tests/stdlib/ldiv.c, tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/realloc.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+ Use CYG_TEST_NA() macro for non-applicable test configurations
+
+1999-02-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/signal.h:
+ * include/signal.inl:
+ * src/signal/raise.cxx:
+ * src/signal/siginit.cxx:
+ * src/signal/signal.cxx:
+ * tests/signal/signal1.c
+ * tests/signal/signal2.c:
+ New files to implement ISO standard signals
+
+ * src/PKGconf.mak (TESTS):
+ * tests/PKGconf.mak (TESTS):
+ Update to build new files above
+
+ * include/stdlib.h:
+ * src/clibincl/stdlibsupp.hxx:
+ Comment and QA changes (including giving better names to some types)
+
+ * include/libc.h:
+ Add new configuration options for signals
+ Add new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+ Add a note to CYGNUM_LIBC_MAIN_STACK_SIZE option that it may be
+ overriden by HAL
+ Add new CYGFUN_LIBC_ATEXIT option and move ...ATEXIT_HANDLERS under
+ it
+ Add new CYGSEM_LIBC_EXIT_CALLS_FFLUSH option
+ Require CYGSEM_LIBC_STARTUP_MAIN_THREAD for "Invoke default static
+ constructors" option
+
+ * src/stdlib/atexit.cxx:
+ Support above CYGFUN_LIBC_ATEXIT and QA changes
+
+ * src/stdlib/exit.cxx:
+ Support for above new libc.h options, and some QA changes
+
+ * src/support/cstartup.cxx:
+ Add support for new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+
+ * src/support/mainthread.cxx:
+ Override main stack size if the HAL has a minimum
+
+ * src/string/strncpy.cxx:
+ Use improved algorithm for aligned copies - imported from newlib
+ QA changes
+
+ * src/stdlib/abort.cxx:
+ Support raise(SIGABRT), and some QA
+
+ * include/errno.h:
+ Add const attribute
+
+ * tests/stdlib/abs.c:
+ QA improvements
+
+1999-02-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Only define cyg_libc_main_thread when
+ the kernel is around.
+
+1999-02-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/clock.c: Joined the two test/NOP checks into
+ one.
+ Increased tolerance in attempt to fix PRs 18737,18787,18846.
+ Fixed typo.
+
+1999-01-28 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ * src/stdlib/rand.cxx:
+ Include <pkgconf/kernel.h> if we use kernel header files
+
+1999-01-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c (test):
+ CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT should be
+ CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT
+ Fix for PR 18786
+
+ * src/string/strtok.cxx:
+ * src/stdio/common/stdiofiles.cxx:
+ * src/errno/errno.cxx:
+ * src/stdlib/rand.cxx:
+ Give mutex protection objects a libc constructor priority
+
+ * src/support/invokemain.cxx:
+ Add prototype for cyg_hal_invoke_constructors()
+
+ * src/support/mainthread.cxx:
+ Give cyg_libc_dummy_constructor_obj a libc constructor priority,
+ and make its class have a public constructor
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/stdin.cxx:
+ Give cyg_libc_stdio_stdin/out/err static objects a libc constructor
+ priority
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ Remove private copy constructor. Needed to make prioritised
+ static constructors work. Fix for PR 18898
+
+1999-01-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx:
+ Include pkgconf/kernel.h otherwise it fails with per-thread errno
+ enabled
+
+ * include/pkgconf/libc.h:
+ Enable per-thread errno by default since that is what POSIX would
+ want
+
+ * tests/time/clock.c (test):
+ Placate compiler by initializing clock_first/second/third anyway,
+ even though they won't be in practice. This is only a test program
+ so adding an extra instruction doesn't matter.
+
+ * src/i18n/locale.cxx (_setlocale):
+ Placate compiler, since it is dumb, by nesting, not serializing, if's
+ This is an idempotent change, but screws up the formatting :-(.
+
+ * src/string/strpbrk.cxx (_strpbrk):
+ Change while loop to do loop to placate compiler. It'll even save an
+ instruction too (wow!)
+
+1999-01-22 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add closing curly brace to CYGPKG_LIBC_STRING_STRTOK definition
+
+1999-01-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h:
+ Tidy up and add to header description
+ Change cyg_get_errno_p() to cyg_libc_get_errno_p()
+ Remove ifdef CYGPKG_LIBC
+
+ * include/sys/file_if.h:
+ Remove - move contents to stdio.h
+
+ * include/stdio.h:
+ Tidy up header description
+ Move FILE typedef here from sys/file_if.h
+ SEEK_SET, SEEK_CUR, SEEK_END defined to 0, 1, 2 respectively
+ for backwards compatibility with old UNIX
+ Change definitions of stdin/out/err to be addresses of FILE
+ globals - even though they're actually Cyg_StdioStream it'll work
+
+ * include/pkgconf/libc.h:
+ Make CYGPRI_LIBC_WEAK et al macros depend on new ones in infra
+ Reorganise trace options under the individual components they are
+ associated with.
+ Reorganise thread-safety options under the individual components
+ they are associated with.
+ Add new CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS option
+ Misc. reformatting
+ Remove dependency on pkgconf/kernel.h - Configuration Tool will
+ generate check macros anyway.
+ Remove CYGPKG_LIBC_TRACE, CYGFUN_LIBC_strtok, CYGPKG_LIBC_RAND
+ options
+ Tidy up description header
+
+ * src/clibincl/clibdata.hxx:
+ * src/clibincl/clibdata.inl:
+ * src/support/clibdata.cxx:
+ Remove and instead rely on each component to initialise its own data
+
+ * src/clibincl/stdiofiles.hxx, src/clibincl/stdiofiles.inl:
+ New files to contain global file list and lock (if applicable).
+ Implemented as class with member access functions
+
+ * src/errno/errno.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Rename cyg_get_errno_p() to cyg_libc_get_errno_p()
+
+ * src/stdio/common/fclose.cxx:
+ * src/stdio/common/fflush.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/stdio/common/freopen.cxx:
+ Remove ifdef CYGPKG_LIBC
+ Use new global file access method from stdiofiles.hxx
+ Tidy up description header
+ Use new CYGBLD_ATTRIB_WEAK_ALIAS
+ Access errno "normally" rather than clibdata way
+
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx
+ * src/stdio/common/stderr.cxx:
+ New files. Implement Cyg_StdioStream objects for each stream. In
+ separate self-contained files so using one doesn't bring in the
+ others
+
+ * src/stdio/common/stdiofiles.cxx:
+ New file. Implements global files array and lock
+
+ * src/stdlib/_exit.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Use infra CYGBLD* macros
+
+ * src/stdlib/malloc.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Add pkgconf/kernel.h now that pkgconf/libc.h doesn't have it
+ Use infra CYGBLD* macros
+ Make pool visible externally with weak attribute and new name
+ cyg_libc_malloc_memorypool
+
+ * src/stdlib/rand.cxx:
+ * src/stdlib/strtok.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Use infra CYGBLD* macros
+
+ * src/support/cstartup.cxx:
+ Split into smaller files to make selective linking work better,
+ fix i386 port problem and make GDB happy
+
+ * src/support/environ.cxx:
+ * src/support/invokemain.cxx:
+ * src/support/main.cxx:
+ * src/support/mainthread.cxx:
+ New files from bits of the old cstartup.cxx
+ Add support for CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+
+ * src/PKGconf.mak:
+ Update to reflect file additions/deletion
+
+ * tests/stdlib/rand1.c:
+ * tests/stdlib/rand2.c:
+ * tests/stdlib/rand3.c:
+ * tests/stdlib/srand.c:
+ Make conform to coding standards
+ Remove ifdef CYGPKG_LIBC_RAND
+ Tidy up description header
+
+ * tests/string/strtok.c:
+ Make conform to coding standards
+ Remove ifdef CYGFUN_LIBC_strtok
+ Tidy up description header
+
+1999-01-15 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/stdlib/getenv.c (main): added tests for the case in which
+ the user does not supply environ and in which the user supplies a
+ NULL environ.
+
+1999-01-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Added workaround for weak aliasing
+ problem in i386 gcc.
+
+
+1999-01-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ (CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE): Change defaults to be
+ more reasonable on small systems.
+
+1999-01-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Minor bug with environ not being initialised correctly by
+ default
+
+1998-12-24 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (Cyg_StdioStream):
+ check_this() member functions should now be const
+
+1998-12-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx (_memchr):
+ treat search value parameter to memchr as an unsigned byte,
+ not a signed int - copied fix from newlib PR 18471
+
+1998-12-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/realloc.c:
+ * tests/stdlib/malloc3.c:
+ * tests/stdlib/malloc2.c:
+ Warning cleanup
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c, tests/stdlib/malloc3.c,
+ tests/stdlib/realloc.c:
+ Only run these tests when we have a coalescing memory allocator
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Only check buffer init success if buffering
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ Check for diff of requested size against buffer_size, not
+ get_buffer_size(), since this may return -1, which won't be
+ equal to size, and will cause malloc to be called
+
+1998-12-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stdlib/getenv.c (main): Don't declare variables when they
+ are not used.
+
+Thu Nov 26 17:59:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/string/strncpy1.c:
+ Fix off-by-one error since it called my_strcmp() and not
+ my_strncmp(), which meant in included the trailing NULL when it
+ shouldn't have.
+
+1998-11-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/qsort.cxx (_qsort):
+ * src/stdlib/rand.cxx (_srand):
+ Changed CYG_REPORT_FUNCNAMETYPE to CYG_REPORT_FUNCNAME in void
+ functions.
+
+Mon Oct 26 18:49:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/cstartup.cxx (cyg_libc_dummy_main):
+ Silence compiler warning with cast of char * to CYG_ADDRWORD
+
+Wed Oct 28 17:31:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clock.cxx (_clock):
+ Reorder scaling expression as it was both incorrect and risked
+ overflow.
+ Fix for PR 18076
+
+Mon Oct 19 14:40:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h (EOF):
+ Change from -64 to (-1), to allow broken code to work :-/
+ Also change other negative defines to be within parentheses
+
+1998-10-19 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated the doc URL
+
+Thu Oct 15 21:33:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Only include kernel thread headers when we're in thread-safe mode
+
+ * src/time/clock.cxx:
+ Only include kernel clock headers if there's a kernel with the
+ right functionality available
+
+ * tests/time/clock.c:
+ Remove unnecessary inclusion of <pkgconf/kernel.h>
+
+ Above changes are required for PR 17229
+
+Wed Oct 14 16:38:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise inclusion of clibincl/stdiosupp.hxx and
+ clibincl/stream.hxx. Tidying up PR 17502
+
+Wed Oct 14 14:08:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGPKG_LIBC_STRING_OPTIMISATIONS to
+ CYGPKG_LIBC_STRING_OPTIMIZATIONS to make it truely merkin.
+
+Tue Oct 13 19:34:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_ARGUMENTS):
+ Add a default argv[0] of "" as many programs assume argc>0
+ The standard allows argv[0] to be "" if the program name
+ is not available
+
+1998-09-26 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ PR 17502: this header file now does nothing if the stdio option
+ is disabled completely. This is the same behaviour is
+ clibincl/stream.hxx, although arguably the #ifdef protection
+ should happen wherever the header file is #include'd rather than
+ in the header file itself.
+
+ * src/clibincl/clibdata.hxx:
+ PR 17502: this header file still #include's internal stdio-related
+ header files and references the FILE structure, even if stdio is
+ disabled. There were some #ifdef's for CYGPKG_LIBC_STDIO already.
+ One more has been added for _fopen() and _fclose().
+
+1998-09-25 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl (Cyg_StdioStreamBuffer):
+ PR 17487: Reorder the calls to initialize member fields, to
+ eliminate a compiler warning.
+
+Fri Sep 25 19:04:29 1998 Jonathan Larmour <jlarmour@peshwari.cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/string/strtok.cxx,
+ src/time/clock.cxx:
+ Only define tracing variable and tracing level macro when
+ the relevant tracing level config options are set. Otherwise
+ keep the tracing level fixed at 0
+ Fix for PR 17476
+
+ * include/pkgconf/libc.h:
+ Define trace levels only if parent CYGPKG_LIBC_TRACE is defined
+ for consistency with Configuration Tool
+
+
+Fri Sep 25 17:24:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Make definition of vscanf() dependent on CYGFUN_LIBC_STDIO_ungetc
+ otherwise _vfscanf() won't be compiled. This therefore would
+ cause a link fail iff selective linking is not enabled.
+ Fix for PR 17455
+
+Fri Sep 25 17:23:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/rand.cxx:
+ Make compilation dependent on CYGPKG_LIBC_RAND
+ Fix for PR 17473
+
+ * tests/stdlib/srand.c:
+ Make definition of dummy test pass conditional on CYGPKG_LIBC_RAND
+ not being defined, as well as CYGPKG_LIBC
+ Caused compilation failure when testing PR 17473 fix
+
+Mon Sep 21 17:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Make sscanf test conditional on CYGFUN_LIBC_STDIO_ungetc since
+ _vfscanf() only gets compiled if this is defined
+ Fix for PR 17346
+
+1998-09-20 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated CDL doc strings.
+
+Fri Sep 18 22:18:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_errno_p):
+ Rather than this function only being available in thread-safe mode,
+ instead make what it returns be either the per-thread errno, or
+ global errno depending on the configuration.
+ Include <errno.h> (conditionally) to support this change
+
+Wed Sep 16 11:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove "fix me" comment which I forgot to remove before
+
+Tue Sep 15 19:27:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Updated descriptions and a few other minor things after review.
+ Notably though, the NDEBUG config option has been removed
+
+1998-09-15 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ PR 17201: removed dependency on CYGPKG_KERNEL in the option
+ CYGNUM_LIBC_MAIN_STACK_SIZE, since the actual dependencies cannot
+ be expressed sensibly in the current system.
+
+1998-09-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Sorting out dependencies for error package.
+
+1998-09-10 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: started adding doc fields to the
+ cdl_package data, as a pilot for now.
+
+Wed Sep 9 17:41:23 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add option CYGIMP_LIBC_MALLOC_CXX_DELETE_CALLS_FREE to explicitly
+ control whether the empty delete functions (currently) in
+ kernel/.../common/delete.cxx are enabled; controls code bloat, see
+ the comments in delete.cxx.
+
+Fri Sep 4 16:43:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add a default CYG_TEST_PASS() to make sure the test infra doesn't
+ complain.
+ Also remove the unused string functionsa
+
+Fri Sep 4 15:43:48 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdlib/exit.cxx (__libc_exit):
+ * src/stdlib/_exit.cxx (__libc__exit):
+ * src/stdlib/malloc.cxx (_free):
+ * src/stdlib/abort.cxx (abort):
+ * src/support/cstartup.cxx (invoke_main):
+ Tracing system asserted cos it was being called incorrectly; these
+ are void functions so you shouldn't give a type to the function
+ reporting call.
+
+Fri Sep 4 15:03:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Fix CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE description to refer to
+ the table.cxx file, not table.h
+
+Fri Sep 4 14:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add description for CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE since
+ Proven won't be making any changes to the device driver
+ implementation after all.
+ Fix for PR 17148
+
+ * src/clibincl/stream.inl (set_position):
+ Remove "fix me" line. It is obvious that this will have to change
+ with a filesystem interface
+ Fix for PR 17147
+
+ * src/stdio/common/freopen.cxx:
+ Remove "fix me" - I know about this issue
+ Fix for PR 17145
+
+ * src/stdio/common/stream.cxx (read):
+ Remove "fix me" and change to use memcpy
+ Fix for PR 17144
+
+Fri Sep 4 14:36:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Actually add it this time!
+
+Fri Sep 4 13:48:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add new tests for misc stdio output functions
+
+ * tests/PKGconf.mak:
+ Build stdiooutput.c test
+
+Fri Sep 4 12:52:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (write_byte):
+ Remove bogus assert
+
+ * tests/stdlib/getenv.c (main):
+ Check whether str is NULL before doing a strcmp()
+
+ * tests/stdio/sprintf2.c (main):
+ Reformat to 76 columns
+
+Fri Sep 4 02:10:54 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/stdio/common/stream.cxx:
+ Add new peek_byte method to Cyg_StdioStream
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix up buffer access to work with new peek_byte method above
+ Fix for PR 16954
+
+Thu Sep 3 19:40:11 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/rand1.c, tests/stdlib/rand2.c,
+ tests/stdlib/rand3.c:
+ Add extra check for CYGPKG_LIBC_RAND to decide whether the test
+ is applicable or not
+
+ * tests/stdlib/rand2.c (test):
+ Use CYGNUM_LIBC_RAND_SEED for default seed, not 1
+
+ * tests/string/strtok.c:
+ Add extra check for CYGFUN_LIBC_strtok to decide whether the
+ test is applicable or not
+
+Wed Sep 2 19:11:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fread.cxx, src/stdio/output/fwrite.cxx:
+ Add fread() and fwrite() functions
+
+ * src/PKGconf.mak:
+ Build fread.cxx and fwrite.cxx from above
+
+ * src/stdio/common/stream.cxx:
+ Reformat to 76 columns
+ In write(), move initialisation of *bytes_written to start
+ In read(), move initialisation of *bytes_read to start
+
+ * include/stdio.h:
+ Reformat to 76 columns
+
+ Replace all references to the ANSI
+ standard to instead by the ISO C standard
+
+ Add commented argument names for "documentation"
+
+ Add fread() and fwrite() prototypes
+
+ * src/clibincl/stdiosupp.hxx:
+ Copy the above changes from stdio.h, and add _fread() and _fwrite()
+ prototypes
+
+ * src/stdio/output/fputs.cxx, src/stdio/input/fgets.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 15:41:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 14:46:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Use trylock_me() instead of lock_me(), and loop to prevent
+ deadlocks
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl:
+ Add trylock_me() method
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/fflush.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 12:24:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change 0x7fff to 0x7fffffff. Oops!
+ give main stack size option a legal_values field
+ Undefine tracing by default
+ Add some more description in the header
+
+Tue Sep 1 20:02:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/i18n/setlocale.c (cyg_package_start):
+ Fix typo - extra "x" for no reason at all! :-)
+
+Tue Sep 1 19:44:58 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx:
+ Fix bug in find_locale_data() that miscalculated size of
+ all_locales
+
+ Make find_locale_data() match the locale "" and add some
+ other things in _setlocale() to ensure that "C" gets returned
+ when the default locale "" is passed.
+
+ Only check the locale pointer when it is non-NULL
+
+ * tests/i18n/setlocale.c:
+ New tests for setlocale()
+
+ * tests/PKGconf.mak:
+ Update to build setlocale.c test
+
+ * src/support/cstartup.cxx:
+ Don't actually call system default main() "main" otherwise GDB
+ gets confused and thinks its the entry point. Instead make a weak
+ alias and call the real function something different.
+
+Tue Sep 1 18:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx (_setlocale):
+ Fix tracing macro name and remove "str maybe used before
+ initialised" warning
+
+ * tests/stdlib/qsort.c:
+ Correct file description header
+
+Tue Sep 1 17:04:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/locale.h, src/clibincl/i18nsupp.hxx, src/i18n/locale.cxx:
+ New files to add support for locales as defined by the ISO C
+ standard. i.e. setlocale() and localeconv() functions and some
+ other bits
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAX_LOCALE_NAME_SIZE config option for locale
+ support
+
+ * src/PKGconf.mak:
+ build locale.cxx
+
+ * include/errno.h, src/clibincl/ctypesupp.hxx:
+ Tidy up to 76 columns
+
+Tue Sep 1 00:24:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Move environment-related options from stdlib into new
+ CYGPKG_LIBC_STARTUP component. Also add options for main()'s
+ arguments (CYGPKG_LIBC_ARGUMENTS), main()'s default stack size
+ (CYGNUM_LIBC_MAIN_STACK_SIZE), number of atexit handlers
+ (CYGNUM_LIBC_ATEXIT_HANDLERS), and whether _exit() stops the
+ system (CYGSEM_LIBC_EXIT_STOPS_SYSTEM).
+
+ * src/clibincl/stdlibsupp.hxx:
+ Fix a few comment bugs, and add new
+ cyg_libc_invoke_atexit_handlers() function prototype
+
+ * src/stdlib/_exit.cxx, src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Implement exit(), atexit() and _exit() correctly now. Also
+ includes cyg_libc_invoke_atexit_handlers() in atexit.cxx. Now
+ we get the correct behaviour of atexit(), and exit() invokes the
+ atexit handlers and fflushs all the stdio streams. Add plenty of
+ tracing of asserts too.
+
+ * src/support/cstartup.cxx:
+ Make main_thread object an exported global. Allow user-settable
+ arguments. Add MUCH more tracing and asserts. Improve comments.
+ Tidy up to 76 columns
+
+ * tests/stdlib/atexit.c:
+ Add simple test for atexit() and it calling registered functions
+
+ * tests/PKGconf.mak:
+ Build atexit.c test
+
+Mon Aug 31 18:54:48 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/getenv.cxx, tests/stdlib/getenv.c:
+ Add support for getenv(), and some tests to ensure it works
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update to include getenv.cxx and getenv.c test
+
+ * src/clibincl/clibdata.hxx:
+ remove prototype for environ - we expect files needing it to
+ define it themselves
+
+ * src/support/clibdata.cxx:
+ Tidy up to 76 columns and add definition of char **environ, but
+ with a configurable initialiser (see libc.h below)
+
+ * tests/stdlib/abs.c (main):
+ Tidy up to 76 columns
+
+ * src/stdlib/malloc.cxx:
+ Tidy up to 76 columns and remove warning for undefined _memcpy()
+ by changing to memcpy(), and casting away signedness
+
+ * include/pkgconf/libc.h:
+ Add CYGPKG_LIBC_ENVIRONMENT and CYGDAT_LIBC_DEFAULT_ENVIRONMENT
+ configuration options
+
+ * include/pkgconf/libc.h, src/clibincl/clibdata.hxx:
+ Tidy up to 76 columns
+
+ * include/stdlib.h:
+ Add getenv() prototype and tidy up to 76 columns
+
+ * src/clibincl/stdlibsupp.hxx:
+ Add _getenv() prototype
+
+Mon Aug 31 13:37:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Add realloc()
+
+ * tests/stdlib/realloc.c:
+ Add this file to test new realloc() functionality
+
+ * tests/PKGconf.mak:
+ Build realloc test
+
+ * tests/stdlib/malloc3.c (main), tests/stdlib/malloc2.c (main),
+ tests/stdlib/malloc1.c (main):
+ Conditionalise local vars to prevent warnings
+
+ * tests/stdlib/malloc3.c (fill_with_data):
+ Move '{' into "verb" line
+
+ * include/pkgconf/libc.h:
+ Require infra tracing support to allow tracing
+
+ * include/stdlib.h:
+ Add realloc()
+
+ * src/clibincl/stdlibsupp.hxx:
+ Update the commented argument names from stdlib.h, including realloc()
+
+1998-08-28 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ * src/clibincl/clibdata.hxx, src/time/clock.cxx:
+
+ Updated for new kernel configuration option symbol names
+
+Fri Aug 28 19:18:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ Changed the entry below to sat "tx39" instead of "mn10300".
+ It's been a long week.
+
+Fri Aug 28 18:59:20 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Add a weakly named main to allow the
+ default configuration to link on the tx39 which has no
+ scalextric linking yet. The static Cyg_Thread main_thread object
+ below continues to exist, though unreferenced, so all its
+ descendants must exist too.
+
+Fri Aug 28 08:54:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h:
+ Add commented argument names Add exit(), and atexit(). And move
+ these along with abort() and _exit() to a new section.
+
+ * src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Add trivial versions of atexit() and exit()
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAIN_STACK_SIZE config option
+
+ * include/sys/cstartup.h, src/support/cstartup.cxx, src/PKGconf.mak:
+ New files to provide a new function cyg_iso_c_support(), which
+ invokes main "correctly".
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/srand.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcoll2.c, tests/string/strcpy1.c,
+ tests/string/strcpy2.c, tests/string/strcspn.c,
+ tests/string/strlen.c, tests/string/strncat1.c,
+ tests/string/strncat2.c, tests/string/strncpy1.c,
+ tests/string/strncpy2.c, tests/string/strpbrk.c,
+ tests/string/strrchr.c, tests/string/strspn.c,
+ tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c,
+ tests/time/clock.c:
+
+ Modify all tests to use new startup mechanism, and cyg_iso_c_start()
+
+Fri Aug 28 00:29:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Add #ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO around all accesses to
+ flags.last_buffer_op_was_read. Fix for PR 16997
+
+Thu Aug 27 01:12:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/sys/file_if.h:
+ Fix comments and remove cyg_get_file_star()
+
+Wed Aug 26 20:24:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove #define CYGPKG_LIBC is that is meant to live in
+ <pkgconf/system.h> after all
+
+Wed Aug 26 19:39:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ More fixes to CDL stuff to make it work better, and look better on
+ the screen
+
+Tue Aug 25 20:21:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Make some fixes after running the ConfigTool
+
+Tue Aug 25 16:46:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_STDIO_BUFSIZE):
+ Fix typo of CYGNUM_LIBC_STDIO_BUFSIZE
+
+Tue Aug 25 15:10:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Tidy up CDL stuff a bit more, prior to checking it actually works.
+
+Tue Aug 25 11:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c (main):
+ Prevent calls to CYG_TEST_STILL_ALIVE for now
+
+Tue Aug 25 05:39:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change cosmetic paragraph alignment.
+
+Tue Aug 25 03:11:34 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Make stderr initialise with buffer size 0.
+ For PR 16955
+
+Mon Aug 24 17:38:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ First pass at CDL-ifying the C library configuration. Currently
+ deliberately disabled as there a few outstanding issues.
+
+Mon Aug 24 16:14:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx (_vfnprintf):
+ clear up warning for unused argument
+
+ * tests/stdlib/malloc2.c (NUM_ITERATIONS):
+ Lower to 100 from 50000 so it won't take too long under the simulator
+
+Thu Aug 20 17:48:43 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Remove now unnecessary inclusion of kernel/ktypes.h
+
+Wed Aug 19 19:19:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c,
+ tests/stdio/sscanf.c, tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c,
+ tests/stdlib/strtoul.c, tests/string/strtok.c,
+ tests/time/clock.c:
+ Add parameters to "main()" to silence warnings
+
+Wed Aug 19 18:52:59 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Put conditional error check into same #ifdef and if as what was being
+ checked in the first place!
+
+Wed Aug 19 18:49:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl:
+ Reorder Cyg_StdioStream::check_this() to be first to silence
+ warnings
+
+Tue Aug 18 16:10:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * ecc/language/c/libc/current/src/clibincl/clibdata.hxx,
+ ecc/language/c/libc/current/src/errno/errno.cxx,
+ ecc/language/c/libc/current/src/stdio/common/fopen.cxx,
+ ecc/language/c/libc/current/src/stdlib/rand.cxx,
+ ecc/language/c/libc/current/src/string/strtok.cxx:
+ Rename CYGIMP_LIBC_INTERNAL_DATA_PREAMBLE,
+ CYGIMP_LIBC_INTERNAL_DATA_ALLOC_CHECK_PREAMBLE,
+ CYGVAR_LIBC_INTERNAL_DATA, and
+ CYGIMP_LIBC_INTERNAL_DATA_CHECK to all have CYGPRI_ prefix instead
+ as recommended by the config name rules
+
+
+Tue Aug 18 14:31:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/setvbuf.cxx (_setvbuf):
+ Rename variable names in assert line, otherwise doesn't build
+ with asserts on!
+
+Sun Aug 16 18:15:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix some bugs, although there are some left to fix still. Unrelated
+ to the rest of the checkins, so I will check the partial fix in now.
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx:
+ Add parameters to constructor to allow more things to be done at
+ construction time.
+
+ Now we have "new", remove separate "construct" method
+
+ Add more documentation on constructor
+
+ As requested by code review, where possible, move boolean flags
+ into separate packed bitfield structure for space efficiency
+
+ Make readbuf_char be usable all the time rather than when configured
+ not to be buffering, as it is also needed for non-buffered mode i.e.
+ _IONBF
+
+ * src/stdio/common/fopen.cxx:
+ Change to use new method of construction from above, using new
+
+ Use thread-specific data, rather than global. And so change errnos
+ to access errno entry specifically
+
+ Make process_mode() check for append mode too
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/stdio/common/setvbuf.cxx:
+
+ Change to cope with different way of dealing with buffering policy
+ flags etc. in Cyg_StdioStream
+
+ * src/stdio/common/vsnprintf.cxx, src/stdio/common/vsscanf.cxx,
+ src/support/clibdata.cxx:
+ Change construction of streams to use new parameters added above,
+ and change to use _IONBF mode for string stdio functions,
+ otherwise its a waste of memory. And use _IONBF for stderr as the
+ ISO standard tells us to!
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Change constructor so that it can be set with default size and
+ dynamic buffer (if applicable)
+
+ Fix minor bug in destructor - should only call free when allocated
+ dynamically
+
+ Change get_buffer_size to return -1 if the buffer was not allowed
+ to be set up
+
+ * src/stdio/common/streambuf.cxx:
+ Remove unnecessary stdio.h include and add extra comment to whether
+ to free bit in set_buffer()
+
+ * src/stdio/common/freopen.cxx:
+ Change @@@ to standard fix me string
+
+ * src/stdio/output/fputc.cxx:
+ Remove unnecessary "written" variable
+
+Thu Aug 13 15:37:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx:
+ Included use of "fix me" line to ensure this is discussed before
+ release
+
+ * include/stdlib.h, src/stdlib/abort.cxx, src/PKGconf.mak:
+ Add abort.cxx to implement abort(), albeit naively
+
+Thu Jul 30 18:03:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/vsscanf.cxx (_vsscanf),
+ src/stdio/common/vsnprintf.cxx (_vsnprintf):
+ Fix initialiser of pseudo string device table that didn't get updated
+ when the table changed (Bad proven, no biscuit).
+
+ * src/clibincl/stream.inl (~Cyg_StdioStream):
+ Move invalidation of magic_validity_word to after unlock_me(),
+ otherwise it always fails!
+
+Tue Jul 28 21:29:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Shorten over-long lines
+
+Tue Jul 28 20:28:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx (class Cyg_StdioStream),
+ src/clibincl/stream.inl, src/stdio/common/stream.cxx:
+ Clarify some comments and get the CYGDBG_DEFINE_CHECK_THIS and
+ CYG_ASSERTCLASS stuff going
+
+ * src/clibincl/stream.inl:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 15:31:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl, src/stdio/common/streambuf.cxx:
+ Move set_buffer() from streambuf.inl to new file streambuf.cxx
+
+ * src/PKGconf.mak (COMPILE):
+ Build new file streambuf.cxx
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ Add METHODS comment
+
+ * src/stdio/common/stream.cxx:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 00:26:36 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.inl, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/div.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/qsort.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/string/strtok.cxx:
+
+ Include proper Berkeley license inline in the file, rather than
+ referring to an external file
+
+ * doc/COPYING.UCB:
+ Remove, now that it isn't referred to any more
+
+Mon Jul 27 23:34:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl, include/errno.h,
+ include/stdio.h, include/stdio.inl, include/stdlib.h,
+ include/stdlib.inl, include/string.h, include/string.inl,
+ include/time.h, include/sys/file_if.h, src/PKGconf.mak,
+ src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/stdiosupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/streambuf.hxx,
+ src/clibincl/streambuf.inl, src/clibincl/stringsupp.hxx,
+ src/clibincl/timesupp.hxx, src/ctype/isalnum.cxx,
+ src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx,
+ src/ctype/islower.cxx, src/ctype/isprint.cxx,
+ src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx,
+ src/ctype/tolower.cxx, src/ctype/toupper.cxx,
+ src/errno/errno.cxx, src/stdio/common/snprintf.cxx,
+ src/stdio/common/sprintf.cxx, src/stdio/common/sscanf.cxx,
+ src/stdio/common/stdioinlines.cxx, src/stdio/common/stream.cxx,
+ src/stdio/common/ungetc.cxx, src/stdio/common/vsnprintf.cxx,
+ src/stdio/common/vsscanf.cxx, src/stdio/input/fgetc.cxx,
+ src/stdio/input/fgets.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/gets.cxx, src/stdio/input/scanf.cxx,
+ src/stdio/output/fnprintf.cxx, src/stdio/output/fprintf.cxx,
+ src/stdio/output/fputc.cxx, src/stdio/output/fputs.cxx,
+ src/stdio/output/printf.cxx, src/stdlib/_exit.cxx,
+ src/stdlib/abs.cxx, src/stdlib/atof.cxx, src/stdlib/atoi.cxx,
+ src/stdlib/atol.cxx, src/stdlib/div.cxx, src/stdlib/labs.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/rand.cxx, src/stdlib/strtod.cxx,
+ src/string/memchr.cxx, src/string/memcmp.cxx,
+ src/string/memmove.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx,
+ src/string/strcoll.cxx, src/string/strcpy.cxx,
+ src/string/strcspn.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx, src/string/strpbrk.cxx,
+ src/string/strrchr.cxx, src/string/strspn.cxx,
+ src/string/strstr.cxx, src/string/strsuppt.cxx,
+ src/string/strtok.cxx, src/string/strxfrm.cxx,
+ src/support/clibdata.cxx, src/time/clock.cxx:
+ Untabify
+
+Mon Jul 27 23:14:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/stdlib/malloc.cxx, src/stdlib/qsort.cxx,
+ tests/ctype/ctype.c, tests/stdlib/rand3.c, tests/stdlib/malloc3.c:
+ Remove all mentions of "register" in variable declarations. Also
+ untabify where needed
+
+ * src/stdlib/bsearch.cxx:
+ Untabify this too
+
+
+Mon Jul 27 22:18:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/fputc.cxx (_fputc):
+ Replace call to stream write() with call to write_byte()
+
+ * src/clibincl/stream.inl (write_byte):
+ Add asserts for stream write() returning odd values for how much has
+ been written
+
+ (bytes_available_to_read):
+ Remove "register" def for variable declaration
+
+Mon Jul 27 22:06:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdiosupp.cxx:
+ Remove #if 0'd cyg_get_file_star() and unnecessary pseudo string
+ device definition
+
+Mon Jul 27 21:57:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h, src/support/clibdata.cxx:
+ Change CYGXXX_LIBC_STDIO_DEFAULT_CONSOLE to
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE
+
+Mon Jul 27 21:49:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/setjmpsupp.hxx,
+ src/clibincl/stdiosupp.hxx, src/clibincl/stdlibsupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl,
+ src/clibincl/stringsupp.hxx, src/clibincl/timesupp.hxx:
+
+ Change CYGONCE_LIBC_*_{HXX,INL} to CYGONCE_LIBC_CLIBINCL_*_{HXX,INL}
+
+Mon Jul 27 21:34:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change #define XXXXX 1 to #define XXXXX where applicable as per code
+ review
+
+ Also remove obsolete CYGIMP_LIBC_THREAD_START_SUSPENDS_SELF
+
+Mon Jul 27 19:42:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen):
+ Use #ifdef, not #if for config options
+
+Mon Jul 27 15:01:51 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/stream.cxx, src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx:
+ Fixes to compile with the new Cyg_IORB field names.
+
+Thu Jul 9 03:40:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Adjust starting of tests to possibly start scheduler since
+ strtol/stroul rely on errno, which may be a per-thread variable
+
+Thu Jul 9 03:06:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx, src/stdio/common/setvbuf.cxx:
+ Consolidate read and write buffers into single buffer, as it should
+ have been all along
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Add drain_buffer() method to speed up the case when we want the
+ buffer completely emptied
+
+Tue Jul 7 21:26:33 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Add a couple of new tests that check that very long strings work too
+
+Wed Jul 1 19:52:39 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/streambuf.hxx:
+ Do not permit copy constructors
+
+ * src/clibincl/stream.inl, src/stdio/common/fclose.cxx:
+ Make sure we use #ifdef and not #if
+
+ * src/clibincl/streambuf.inl:
+ Use member initialisation list rather than explicit initialisation to
+ reduce warnings
+
+Wed Jul 1 19:17:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h and all files using config options:
+ Rename configuration defines to make them more standard
+
+Thu Jun 25 20:09:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strcat.cxx:
+ Add parentheses on check to silence warning
+ (Verified by proven)
+
+Thu Jun 25 19:30:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Make sure that the malloc pool is initialised before other things
+ can use it. This is done with the hot new constructor ordering
+ feature.
+
+Thu Jun 25 18:27:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Remove bogus ifdef if floating point is _not_ wanted
+
+Thu Jun 25 17:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Fix argument checking to allow first argument of NULL
+
+Thu Jun 25 04:18:50 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_strtok_last_p):
+ Remove bogus assertion
+
+ * src/stdlib/malloc.cxx:
+ Got sense of alignment check assertion the wrong way round, so negate
+ it
+
+Thu Jun 25 03:56:35 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx:
+ Fix argument checking assertions with legitimate nulls here too
+
+Thu Jun 25 03:46:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/strtoul.cxx, src/stdlib/strtol.cxx:
+ Fix argument checking assertions to cope with legitimate nulls
+
+Wed Jun 24 09:01:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Remove extraneous info messages
+
+Wed Jun 24 05:59:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c:
+
+ Change large automatic arrays to static arrays to prevent overuse
+ of a potentially small stack
+
+Wed Jun 24 05:45:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/string/strtok.c, tests/time/clock.c:
+
+ Increase thread stack size from 4K to 32K as in some cases it was
+ too small.
+
+
+Tue Jun 23 20:12:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Add extra tests, including floating point conversion testing
+
+Tue Jun 23 17:01:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Make sure this is only compiled if CYGFUN_LIBC_strtok is defined
+
+Tue Jun 23 06:10:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ add some comments - that's all
+
+ * src/stdio/common/stream.cxx:
+ fix case in refill_read_buffer() for what to do when there's nothing
+ left. Now return EAGAIN
+
+ * src/stdio/common/vsscanf.cxx, src/stdio/input/vfscanf.cxx:
+ Get sscanf working properly and passing tests. Also make sure it
+ ignores FP when its not configured
+
+ * src/stdlib/atof.cxx:
+ Only compile at all if strtod() is present
+
+
+Mon Jun 22 19:13:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise strtok_last and rand_seed better
+
+Mon Jun 22 14:14:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc3.c:
+ Add test for checking that mallocing and freeing repeatedly works
+
+ * tests/PKGconf.mak:
+ Update to reflect addition of the above
+
+Mon Jun 22 13:09:33 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/fopen.cxx
+ * src/stdio/common/stream.cxx
+ * src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx
+ Include cyg/devs/common/iorb.h instead of iorb.hxx
+
+ * src/stdio/common/stream.cxx
+ Use read_blocking and write_blocking instead of just read and
+ write when accessing devices through the virtual device table.
+
+Sun Jun 21 18:19:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Propagate change of return code handling for puts from stdio.inl
+ into here
+
+ * src/stdio/output/fputc.cxx:
+ make sure the right type is used for output - byte not int
+
+ * src/support/clibdata.cxx:
+ Fix #define config mistook. #endif was in wrong place
+
+Sun Jun 21 16:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Allow explicit construction to get around a bug when
+ dynamically allocating per-thread structure
+
+Sun Jun 21 16:02:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c, tests/stdlib/qsort.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+
+ Update tests to "do the right thing" with all configuration settings
+
+
+Sun Jun 21 04:54:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ I have to be careful not to use setjmp() in a way not exactly
+ defined by the standard, so make sure I do, and add a comment
+ documenting these ways.
+
+ Also ensure this test does the right thing in all configurations
+
+Sun Jun 21 04:38:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add extra checks for invalid configurations
+ Also make default for thread safety OFF
+
+ * src/clibincl/clibdata.inl:
+ Adjust indentation
+
+ * src/stdio/output/vfnprintf.cxx:
+ Make printf of -0.0 floating point do the right thing
+
+Sun Jun 21 04:28:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/snprintf.cxx, src/stdio/common/sprintf.cxx,
+ src/stdio/common/sscanf.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/scanf.cxx, src/stdio/output/fnprintf.cxx,
+ src/stdio/output/fprintf.cxx, src/stdio/output/printf.cxx:
+
+ Had to remove inline functions with varargs. Which means separating
+ out each function from stdioinlines.cxx into a separate file, as they
+ no longer belong there. So all the above files were created.
+
+ * include/stdio.inl, src/PKGconf.mak,
+ src/stdio/common/stdioinlines.cxx:
+ Changed to take account of the above
+
+
+Sun Jun 21 03:58:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c:
+ Update with floating-point tests. Also make sure they DTRT in all
+ configurations
+
+Fri Jun 19 19:33:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ accidentally initialised stdin/out/err twice
+
+Fri Jun 19 19:09:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Another typo
+
+Fri Jun 19 18:59:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Missing #endif typo
+
+Fri Jun 19 18:51:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Fix initialisation of static data members. Unsure how it worked at
+ all before!
+
+Fri Jun 19 18:01:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.inl:
+ puts should check whether fputs returns non-negative, rather than
+ non-zero
+
+Fri Jun 19 17:22:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl:
+ Make inclusion of get_errno_p conditional on thread-safety
+
+Wed Jun 17 10:55:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Add weak alias of vfscanf() to _vfscanf()
+
+Wed Jun 17 09:10:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Initialise err to silence compiler warning
+
+Wed Jun 17 08:59:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Most important is the addition of floating point support in
+ src/stdio/output/vfnprintf.cxx and src/stdio/input/vfscanf.cxx. This
+ also required the addition of atof() and strtod() in stdlib which is
+ definitely no bad thing! Other than that...
+
+ * Fix a whole bunch of stuff I messed up first time round. Also the
+ sprintf and sscanf tests are included again.
+
+Tue Jun 16 16:38:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Typo with not putting comment character at the beginning. Sigh.
+
+Tue Jun 16 14:53:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Forgot to (temporarily) remove fputs test for now
+
+Mon Jun 15 20:40:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ Everything to do with stdio has almost completely changed, so there's
+ not much point documenting individual changes.
+
+Mon Jun 15 18:36:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c:
+ Stop it moaning quite as much when it fails by making it exit sooner
+
+ * tests/time/clock.c :
+ This isn't a compound testcase
+
+Thu Jun 11 17:59:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h
+ Reverse sense of NDEBUG ifdef, that was left in accidentally due
+ to testing
+
+Thu Jun 11 04:58:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h, include/string.h, src/clibincl/stringsupp.hxx:
+ Modify as I've now added an "error" package which defines the error
+ codes and strerror()
+
+ * src/errno/strerror.cxx:
+ Moved to new error package and thus deleted
+
+Wed Jun 10 18:37:37 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h:
+ create this header and add assert() function
+
+Wed Jun 10 16:23:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h, src/clibincl/stdlibsupp.hxx, src/stdlib/malloc.cxx:
+ Add malloc(), calloc() and free() functions
+
+ * include/pkgconf/libc.h:
+ Add malloc memory pool size option
+
+ * tests/stdlib/malloc1.c, tests/stdlib/malloc2.c:
+ new tests for malloc
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for new files
+
+Wed Jun 10 15:06:16 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ Add another test
+
+Tue Jun 9 18:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add some setjmp config's and a macro for the noreturn attribute
+
+ * include/setjmp.h, include/setjmp.inl, src/clibincl/setjmpsupp.hxx,
+ src/setjmp/longjmp.cxx, tests/setjmp/setjmp.c:
+ Added to implement and test setjmp() and longjmp()
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for newly added files
+
+Thu Jun 4 01:29:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx, src/string/strcpy.cxx,
+ src/string/strlen.cxx, src/string/strncat.cxx,
+ src/string/strncmp.cxx, src/string/strncpy.cxx:
+ Rename CYGIMP_LIBC_PREFER_SMALL_TO_FAST to
+ CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST
+
+ Also use slower but smaller version when __OPTIMIZE_SIZE__ is
+ defined (which comes from using gcc -Os)
+
+Fri May 29 16:15:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl, src/ctype/isxdigit.cxx:
+ Fix bug that numerals aren't considered hex digits
+
+ * include/time.h:
+ Change clock_t and time_t to be signed so that they can accept -1, as
+ required by other libc functions
+
+ * src/clibincl/clibdata.hxx:
+ Fix typo that CYGIMP_LIBC_THREAD_SUPPORT should be ..._SAFETY
+ Also fix macro to allocate thread-specific data to not set variables
+ in a different stack-frame
+
+ * tests/ctype/ctype.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/stdlib/qsort.c:
+ make ctr unsigned to prevent warnings
+
+ * tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/string/strrchr.c:
+ Fix off by one error
+
+ * tests/string/strspn.c:
+ Fix case-sensitivity problem, and off-by-one error
+
+ * tests/string/strxfrm1.c:
+ Remove bogus bit of test that doesn't apply to strxfrm, and fix typo
+
+
+Fri May 22 16:33:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak
+ Remove CXXFLAGS line now that its redundant
+
+ * tests/everything!
+ Do a blitz change of all tests - break some of them down into
+ different files, add new tests, standardize format, fix bugs,
+ update for recent header file changes and much more!
+
+Wed May 20 17:50:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ interim checkin for different dir structure for Bart
+
+Fri May 15 20:30:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Tidy up some loose ends I forgot: rename src/include directory to
+ src/clibincl. And add clibdata.inl and timesupp.hxx in there.
+
+Thu May 14 19:56:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Basically everything has changed in the C library. Files have
+ been moved, renamed, deleted and reworked. This is a major
+ revision, and now starts from this new baseline rather than doing
+ incremental changes.
+
+Fri Apr 17 18:43:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ECCconf.mak:
+ added for new build system (actually Bart did this, but didn't
+ update this ChangeLog)
+
+Fri Apr 17 15:03:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdio/device/sim.cxx:
+ Make it build with CYG_EMPTY_STATEMENT; the unadorned one is being
+ removed.
+
+Thu Apr 16 00:24:24 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * All source files:
+ replace ECCIMP_LIBC_* conditional ifdef with CYGIMP_LIBC_*
+
+ * include/eccconf/libc.h:
+ improve comments and reorder a bit
+
+Wed Apr 8 14:35:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/Makefile.am, tests/Makefile.am, configure.in:
+ many changes to integrate build structure from release tree
+
+ * src/ctype/Makefile.am, src/ctype/Makefile.in, src/errno/Makefile.am,
+ src/errno/Makefile.in, src/stdio/Makefile.am, src/stdio/Makefile.in,
+ src/stdio/common/Makefile.am, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.am, src/stdio/device/Makefile.in,
+ src/stdio/output/Makefile.am, src/stdio/output/Makefile.in,
+ src/stdio/input/Makefile.am, src/stdio/input/Makefile.in,
+ src/stdlib/Makefile.am, src/stdlib/Makefile.in,
+ src/string/Makefile.am, src/string/Makefile.in,
+ src/support/Makefile.am, src/support/Makefile.in,
+ src/time/Makefile.am, src/time/Makefile.in:
+ Remove as they are now redundant with above changes
+
+ * include/Makefile.am:
+ Add to support above changes
+
+ * include/eccconf/libc.h:
+ Change include file for configuration from kernel to system
+
+ * src/include/kerndiag.hxx, src/stdio/device/kerndiag.cxx,
+ src/time/clockfn.cxx:
+ Change kernel include file to eccconf/kernel.h
+
+ * src/include/strngdev.h:
+ remove unnecessary kernel include
+
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in,
+ tests/Makefile.in, include/Makefile.in:
+ regenerate
+
+Mon Apr 6 20:55:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/abs.cxx, src/stdlib/atoi.cxx, src/stdlib/atol.cxx,
+ src/stdlib/div.cxx, src/stdlib/labs.cxx, src/stdlib/ldiv.cxx:
+ Separated out functions from stdlib.cxx into separate files
+
+ * src/stdlib/stdlib.cxx:
+ removed to be replaced by above files
+
+ * Makefile.am, src/stdlib/Makefile.am:
+ modified to support building above and not building stdlib.cxx
+
+ * src/support/tsd.cxx:
+ Remove unnecessary header file includes
+
+ * Makefile.in, src/stdlib/Makefile.in:
+ regenerated
+
+Mon Apr 6 19:19:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx, include/eccconf/libc.h:
+ remove lame hack for tx39 compiler now that its fixed
+
+ * src/include/sim.hxx:
+ define constants as static to placate compiler
+
+Thu Apr 2 21:01:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ctype/ctype.cxx:
+ deleted and separated out into below files
+
+ * src/ctype/isalnum.cxx, src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx, src/ctype/islower.cxx,
+ src/ctype/isprint.cxx, src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx, src/ctype/tolower.cxx,
+ src/ctype/toupper.cxx:
+ Separated out individual ctype functions from ctype.cxx into separate
+ files
+
+ * Makefile.am, src/ctype/Makefile.am:
+ modified to reflect above deletion/additions
+
+ * Makefile.in, src/ctype/Makefile.in:
+ regenerated
+
+Thu Apr 2 19:08:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: optimise using prefix increments
+
+Thu Apr 2 15:18:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strchr.cxx: optimise setting of mask a little
+
+Thu Mar 26 14:07:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx: fixed some typos
+
+Thu Mar 26 11:58:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/eccconf/libc.h, src/support/tsd.cxx:
+ Implement workaround for tx39 compiler bug.
+
+ * src/include/strsuppt.hxx:
+ remove prototypes for _memcpy() and _memset() as they are now in the
+ kernel
+
+Wed Mar 25 18:31:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/string/Makefile.am: memcpy() and memset() are
+ now in the kernel so remove them from build
+ * include/string.h: add a comment to say as much
+ * Makefile.in, src/string/Makefile.in: regenerate
+
+Wed Mar 25 15:30:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx, src/include/file_if.inl:
+ Change _exit workaround to not cause a compiler optimisation
+ problem. Now just references _exit rather than calls it.
+
+Wed Mar 25 14:59:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fix bug causing tests to fail completely
+ for this function
+
+Wed Mar 25 12:55:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/sim.hxx: add types to constants (oops!)
+ * Makefile.am: link src/stdio/device/sim.cxx
+ * Makefile.in: regenerated
+
+Wed Mar 25 04:14:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/file_if.hxx, src/include/file_if.inl,
+ src/include/kerndiag.hxx, src/include/sim.hxx,
+ src/include/stdio_if.hxx, src/include/strngdev.hxx,
+ src/include/tsd.hxx, src/stdio/common/clearerr.cxx,
+ src/stdio/common/clearerr.cxx, src/stdio/common/feof.cxx,
+ src/stdio/common/ferror.cxx, src/stdio/common/file_if.cxx,
+ src/stdio/common/vsprintf.cxx,
+ src/stdio/device/kerndiag.cxx, src/stdio/device/sim.cxx,
+ src/stdio/device/strngdev.cxx, src/stdio/output/fputc.cxx,
+ src/stdio/output/fputs.cxx, src/stdio/output/puts.cxx,
+ src/stdio/output/vfnprintf.cxx, src/support/tsd.cxx:
+ Modified to support buffered reads including renaming
+ _EccInternalFileStruct to __EccStdioStream which is what affects
+ most of these files
+ * src/include/file_if.inl, src/stdio/common/file_if.cxx: added for
+ the above reason
+ * src/stdio/common/sscanf.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/input/Makefile.am: added to provide sscanf() functionality
+ * include/ctype.h, include/stdio.h, include/stdlib.h,
+ include/string.h, include/eccconf/libc.h, src/ctype/ctype.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/stdio/common/stdio.cxx:
+ rename *_INLINES macros with prefix CYG rather than ECC
+ * include/errno.h, src/errno/errno.cxx, src/errno/strerror.cxx:
+ rename ErrNo to _ErrNo and add EAGAIN and EWOULDBLOCK error codes
+ * configure.in, Makefile.am, src/stdio/Makefile.am,
+ src/stdio/input/Makefile.am: add support for building
+ file_if.cxx sscanf.cxx and vfscanf.cxx
+ * src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/input/Makefile.in, configure, Makefile.in: regenerated
+
+Tue Mar 24 19:51:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clockfn.cxx, src/time/clock.cxx:
+ Renamed clock.cxx to clockfn.cxx (preserving CVS history)
+ * Makefile.am, src/time/Makefile.am: updated to reflect name change
+ * Makefile.in, src/time/Makefile.in: regenerated
+
+Tue Mar 24 16:28:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl: Swap around definitions to get right order so
+ inlining works
+
+Tue Mar 24 14:43:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/stdio.h, include/stdlib.h, include/string.h:
+ modify to only conditionally include inlines
+ * src/ctype/ctype.cxx, src/stdio/common/stdio.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/ctype/Makefile.am: Add to provide real linkable alternatives
+ to inline functions
+ * Makefile.am, configure.in, src/Makefile.am,
+ src/stdio/common/Makefile.am, src/stdlib/Makefile.am,
+ src/string/Makefile.am: modified to support previous additions
+ * include/eccconf/libc.h: redefine inline macro to add extern inline,
+ and add conditional defines for inline functions. Also rename
+ space vs. speed macro to have CYG instead of ECC prefix
+ * include/stdio.inl: fix comment typo
+ * src/stdlib/qsort.cxx: fix to define inline functions properly
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/memcpy.cxx,
+ src/string/memset.cxx, src/string/strcat.cxx, src/string/strchr.cxx,
+ src/string/strcmp.cxx, src/string/strcpy.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx
+ * Makefile.in, configure, src/Makefile.in, src/ctype/Makefile.in,
+ src/stdio/common/Makefile.in, src/stdlib/Makefile.in,
+ src/string/Makefile.in: regenerate
+
+
+Mon Mar 23 19:19:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx: added to support temporary _exit
+ * include/stdlib.h, include/stdlib.inl: added support for _exit and
+ added abs(), labs(), div() and ldiv() functions
+ * src/include/file_if.hxx: added support for _exit kludge
+ * src/stdlib/qsort.cxx: Added Berkeley copyright message
+ * src/time/clock.cxx: Include correct kernel config header as
+ CYG_CONFIGURATION rather than <config.h>
+ * Makefile.am src/stdlib/Makefile.am: added support for _exit
+ * Makefile.in, src/stdlib/Makefile.in: regenerated
+
+Mon Mar 23 14:41:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Replace ECCPKG_ANSI_LIBC with CYGPKG_ANSI_LIBC in all source files
+
+Mon Mar 23 14:28:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/string.inl: add file to provide strcoll()
+ * include/string.h: include string.inl
+ * ctype.h: include ctype.inl (oops!)
+ * include/stdlib.h: include stdlib.inl (oops!)
+
+Mon Mar 23 13:30:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl: added to provide ANSI ctype
+ functionality
+ * include/stdlib.h, include/stdlib.inl, src/include/stdlibbsp.hxx,
+ src/stdlib/Makefile.am, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/stdlib/srand.cxx,
+ src/stdlib/strtol.cxx, src/stdlib/strtoul.cxx: Added to provide
+ many stdlib functions
+ * src/include/tsd.hxx: modified to support rand() random number
+ seed, and added some comments
+ * configure.in, Makefile.am, src/Makefile.am: modified to support
+ addition of above new sources
+ * include/eccconf/libc.h: Add extra helpful comments, and #include
+ kernel config file
+ * src/time/clock.cxx: #include clock.inl and fix to call
+ get_resolution() properly now
+ * Makefile.in, configure, src/Makefile.in, src/errno/Makefile.in,
+ src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.in, src/stdio/output/Makefile.in,
+ src/stdlib/Makefile.in, src/strings/Makefile.in,
+ src/support/Makefile.in, src/time/Makefile.in,
+ tests/Makefile.in: regenerated
+
+
+Sun Mar 22 21:29:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h, src/include/timesupp.hxx, src/time/clock.cxx,
+ src/time/Makefile.am: added to provide clock() function
+ * src/Makefile.am: modified to try to build in src/time directory
+ * include/eccconf/libc.h: added and is now the main configuration
+ file for this package
+ * acconfig.h, include/libcconf.h.in, include/stamp-h.in: removed
+ due to usage of libc.h above instead
+ * Almost all *.h, *.hxx and *.cxx: replaced LIBC_CONFIG_HEADER
+ defined include with simple <pkgconf/libc.h>
+ * configure.in: remove AM_CONFIG_HEADER of libcconf.h and
+ LIBC_CONFIG_HEADER definition. Also remove usage of builtin
+ memcpy() etc. from gcc, and generate src/time/Makefile
+ * Makefile.am: link in src/time/clock.o
+ * src/include/file_if.hxx, src/include/sim.hxx: use config header
+ to decide whether C library is to be used
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in: regenerated
+
+Fri Mar 20 18:08:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fixed bug with ignoring terminating NULL
+
+1998-03-20 Chris Tarpy <ctarpy@bhaji.cygnus.co.uk>
+
+ * configure: - regenerated
+ * Makefile.am: - Support added for libc testcases
+ * Makefile.in: regenerated
+ * configure.in: set c compiler, descend test dir
+ * tests/Makefile.in: added
+ * tests/Makefile.am: added
+ * tests/tcdiag.cxx : added
+
+
+Thu Mar 19 11:41:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Initial check-in of everything
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/string/current/cdl/string.cdl b/cesar/ecos/packages/language/c/libc/string/current/cdl/string.cdl
new file mode 100644
index 0000000000..dc55ef6129
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/cdl/string.cdl
@@ -0,0 +1,216 @@
+# ====================================================================
+#
+# string.cdl
+#
+# C library string related configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jlarmour
+# Contributors:
+# Date: 2000-04-14
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_LIBC_STRING {
+ display "ISO C library string functions"
+ description "
+ This package provides string functions specified by the
+ ISO C standard - ISO/IEC 9899:1990."
+ doc ref/libc.html
+ include_dir cyg/libc/string
+ parent CYGPKG_LIBC
+ implements CYGINT_ISO_STRTOK_R
+ implements CYGINT_ISO_STRING_LOCALE_FUNCS
+ implements CYGINT_ISO_STRING_MEMFUNCS
+ implements CYGINT_ISO_STRING_STRFUNCS
+ requires { CYGBLD_ISO_STRING_LOCALE_FUNCS_HEADER == \
+ "<cyg/libc/string/string.h>" }
+ requires { CYGBLD_ISO_STRING_MEMFUNCS_HEADER == \
+ "<cyg/libc/string/string.h>" }
+ requires { CYGBLD_ISO_STRING_STRFUNCS_HEADER == \
+ "<cyg/libc/string/string.h>" }
+ requires { CYGBLD_ISO_STRTOK_R_HEADER == \
+ "<cyg/libc/string/string.h>" }
+ requires CYGPKG_ISOINFRA
+
+ compile memchr.cxx memcmp.cxx memmove.cxx \
+ strcat.cxx strchr.cxx strcmp.cxx \
+ strcoll.cxx strcpy.cxx strcspn.cxx \
+ strlen.cxx strncat.cxx strncmp.cxx \
+ strncpy.cxx strpbrk.cxx strrchr.cxx \
+ strspn.cxx strstr.cxx strsuppt.cxx \
+ strtok.cxx strxfrm.cxx
+
+
+# ====================================================================
+
+ cdl_option CYGIMP_LIBC_STRING_INLINES {
+ display "Inline versions of <string.h> functions"
+ default_value 1
+ description "
+ This option chooses whether some of the
+ particularly simple string functions from
+ <string.h> are available as inline
+ functions. This may improve performance, and as
+ the functions are small, may even improve code
+ size."
+ }
+
+ cdl_option CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST {
+ display "Optimize string functions for code size"
+ flavor bool
+ default_value 0
+ description "
+ This option tries to reduce string function
+ code size at the expense of execution speed. The
+ same effect can be produced if the code is
+ compiled with the -Os option to the compiler."
+ }
+
+ cdl_option CYGFUN_LIBC_STRING_BSD_FUNCS {
+ display "Provide BSD compatibility functions"
+ flavor bool
+ default_value 1
+ implements CYGINT_ISO_STRING_BSD_FUNCS
+ requires { CYGBLD_ISO_STRING_BSD_FUNCS_HEADER == \
+ "<cyg/libc/string/bsdstring.h>" }
+ requires CYGINT_ISO_CTYPE
+ compile bsdstring.cxx
+ description "
+ Enabling this option causes various compatibility functions
+ commonly found in the BSD UNIX operating system to be included.
+ These are functions such as bzero, bcmp, bcopy, bzero, strcasecmp,
+ strncasecmp, index, rindex and swab."
+ }
+
+ cdl_component CYGPKG_LIBC_STRING_STRTOK {
+ display "strtok"
+ flavor none
+ description "
+ These options control the behaviour of the
+ strtok() and strtok_r() string tokenization
+ functions."
+
+ cdl_option CYGSEM_LIBC_STRING_PER_THREAD_STRTOK {
+ display "Per-thread strtok()"
+ active_if CYGPKG_KERNEL
+ requires CYGVAR_KERNEL_THREADS_DATA
+ default_value CYGVAR_KERNEL_THREADS_DATA
+ description "
+ This option controls whether the string function
+ strtok() has its state recorded on a per-thread
+ basis rather than global. If this option is
+ disabled, some per-thread space can be saved.
+ Note there is also a POSIX-standard strtok_r()
+ function to achieve a similar effect with user
+ support. Enabling this option will use one slot
+ of kernel per-thread data. You should ensure you
+ have enough slots configured for all your
+ per-thread data."
+ }
+
+ cdl_option CYGNUM_LIBC_STRING_STRTOK_TRACE_LEVEL {
+ display "Tracing level"
+ flavor data
+ legal_values 0 to 1
+ default_value 0
+ description "
+ Trace verbosity level for debugging the <string.h>
+ functions strtok() and strtok_r(). Increase this
+ value to get additional trace output."
+ }
+ }
+
+ cdl_option CYGFUN_LIBC_STRING_STRDUP {
+ display "strdup"
+ active_if CYGINT_ISO_MALLOC
+ calculated 1
+ compile strdup.cxx
+ description "
+ This option indicates whether strdup() is to be supported."
+ }
+
+ cdl_component CYGPKG_LIBC_STRING_OPTIONS {
+ display "C library string functions build options"
+ flavor none
+ no_define
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_LIBC_STRING_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the C library. These flags are used in addition
+ to the set of global flags."
+ }
+
+ cdl_option CYGPKG_LIBC_STRING_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the C library. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_LIBC_STRING_TESTS {
+ display "C library string function tests"
+ flavor data
+ no_define
+ calculated { "tests/memchr tests/memcmp1 tests/memcmp2 tests/memcpy1 tests/memcpy2 tests/memmove1 tests/memmove2 tests/memset tests/strcat1 tests/strcat2 tests/strchr tests/strcmp1 tests/strcmp2 tests/strcoll1 tests/strcoll2 tests/strcpy1 tests/strcpy2 tests/strcspn tests/strcspn tests/strlen tests/strncat1 tests/strncat2 tests/strncpy1 tests/strncpy2 tests/strpbrk tests/strrchr tests/strspn tests/strstr tests/strtok tests/strxfrm1 tests/strxfrm2" }
+ description "
+ This option specifies the set of tests for the C library
+ string functions."
+ }
+ }
+}
+
+# ====================================================================
+# EOF string.cdl
+
diff --git a/cesar/ecos/packages/language/c/libc/string/current/include/bsdstring.h b/cesar/ecos/packages/language/c/libc/string/current/include/bsdstring.h
new file mode 100644
index 0000000000..3cd757f87b
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/include/bsdstring.h
@@ -0,0 +1,109 @@
+#ifndef CYGONCE_LIBC_BSDSTRING_H
+#define CYGONCE_LIBC_BSDSTRING_H
+/*===========================================================================
+//
+// bsdstring.h
+//
+// BSD standard string and memory area manipulation routines
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2001-11-27
+// Purpose: This file provides various string functions normally
+// provided in the BSD UNIX operating system.
+// Description:
+// Usage: Do not include this file directly - use #include <string.h>
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/libc_string.h> /* Configuration header */
+
+#ifdef CYGFUN_LIBC_STRING_BSD_FUNCS
+
+#define __need_size_t
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*=========================================================================*/
+
+/* FUNCTION PROTOTYPES */
+
+
+extern int
+strcasecmp( const char * /* s1 */, const char * /* s2 */ );
+
+extern int
+strncasecmp( const char * /* s1 */, const char * /* s2 */, size_t /* n */ );
+
+extern int
+bcmp( const void * /* s1 */, const void * /* s2 */, size_t /* n */ );
+
+extern void
+bcopy( const void * /* src */, void * /* dest */, size_t /* n */ );
+
+extern void
+bzero( void * /* s */, size_t /* n */ );
+
+extern char *
+index( const char * /* s */, int /* c */ );
+
+extern char *
+rindex( const char * /* s */, int /* c */ );
+
+extern void
+swab( const void * /* from */, void * /* to */, size_t /* n */ );
+
+/*=========================================================================*/
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* ifdef CYGFUN_LIBC_STRING_BSD_FUNCS */
+
+#endif /* CYGONCE_LIBC_BSDSTRING_H multiple inclusion protection */
+
+/* EOF bsdstring.h */
diff --git a/cesar/ecos/packages/language/c/libc/string/current/include/string.h b/cesar/ecos/packages/language/c/libc/string/current/include/string.h
new file mode 100644
index 0000000000..f8d5669c99
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/include/string.h
@@ -0,0 +1,171 @@
+#ifndef CYGONCE_LIBC_STRING_H
+#define CYGONCE_LIBC_STRING_H
+/*===========================================================================
+//
+// string.h
+//
+// ANSI standard string and memory area manipulation routines
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: This file provides various string functions required by
+// ISO C 9899:1990
+// Description: The real contents of this file get filled in from the
+// configuration set by the implementation
+// Usage: Do not include this file directly - use #include <string.h>
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+/* CONFIGURATION */
+
+#include <pkgconf/libc_string.h> /* Configuration header */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* FUNCTION PROTOTYPES */
+
+/*=========================================================================*/
+
+/* 7.11.2 Copying functions */
+
+extern void *
+memmove( void *, const void *, size_t );
+
+extern char *
+strcpy( char *, const char * );
+
+extern char *
+strncpy( char *, const char *, size_t );
+
+/*=========================================================================*/
+
+/* 7.11.3 Concatenation functions */
+
+extern char *
+strcat( char *, const char * );
+
+extern char *
+strncat( char *, const char *, size_t );
+
+
+/*=========================================================================*/
+
+/* 7.11.4 Comparison functions */
+
+extern int
+memcmp( const void *, const void *, size_t );
+
+extern int
+strcmp( const char *, const char * );
+
+extern int
+strcoll( const char *, const char * );
+
+extern int
+strncmp( const char *, const char *, size_t );
+
+extern size_t
+strxfrm( char *, const char *, size_t );
+
+
+/*=========================================================================*/
+
+/* 7.11.5 Search functions */
+
+extern void *
+memchr( const void *, int, size_t );
+
+extern char *
+strchr( const char *, int );
+
+extern size_t
+strcspn( const char *, const char * );
+
+extern char *
+strpbrk( const char *, const char * );
+
+extern char *
+strrchr( const char *, int );
+
+extern size_t
+strspn( const char *, const char * );
+
+extern char *
+strstr( const char *, const char * );
+
+extern char *
+strtok( char *, const char * );
+
+/* POSIX 1003.1 section 8.3.3 strtok_r() */
+
+extern char *
+strtok_r( char *, const char *, char ** );
+
+
+/*=========================================================================*/
+
+/* 7.11.6 Miscellaneous functions */
+
+extern size_t
+strlen( const char * );
+
+// NB This is a BSD function
+#ifndef __STRICT_ANSI__
+extern char *
+strdup( const char * );
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+/* INLINE FUNCTIONS */
+
+#ifdef CYGIMP_LIBC_STRING_INLINES
+#include <cyg/libc/string/string.inl>
+#endif
+
+#endif /* CYGONCE_LIBC_STRING_H multiple inclusion protection */
+
+/* EOF string.h */
diff --git a/cesar/ecos/packages/language/c/libc/string/current/include/string.inl b/cesar/ecos/packages/language/c/libc/string/current/include/string.inl
new file mode 100644
index 0000000000..5aba4fabf2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/include/string.inl
@@ -0,0 +1,72 @@
+#ifndef CYGONCE_LIBC_STRING_STRING_INL
+#define CYGONCE_LIBC_STRING_STRING_INL
+//===========================================================================
+//
+// string.inl
+//
+// Inline functions for ANSI standard string and memory area
+// manipulation routines described in ANSI para 7.11
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage: #include <string.h> - do not include this file directly
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// FUNCTIONS
+
+extern __inline__ int
+strcoll( const char *s1, const char *s2 )
+{
+ return strcmp(s1, s2);
+} // strcoll()
+
+
+#endif // CYGONCE_LIBC_STRING_STRING_INL multiple inclusion protection
+
+// EOF string.inl
diff --git a/cesar/ecos/packages/language/c/libc/string/current/include/stringsupp.hxx b/cesar/ecos/packages/language/c/libc/string/current/include/stringsupp.hxx
new file mode 100644
index 0000000000..cde5c6b461
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/include/stringsupp.hxx
@@ -0,0 +1,218 @@
+#ifndef CYGONCE_LIBC_STRING_STRINGSUPP_HXX
+#define CYGONCE_LIBC_STRING_STRINGSUPP_HXX
+//===========================================================================
+//
+// stringsupp.hxx
+//
+// Support for the ANSI standard string functions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 2000-04-14
+// Purpose: Internal support for the libc string function implementations
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <stddef.h> // Compiler definitions such as
+ // size_t, NULL etc.
+
+// CONSTANTS
+
+#ifndef CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST
+
+// Masks for CYG_LIBC_STR_DETECTNULL below
+__externC const cyg_uint64 Cyg_libc_str_null_mask_1;
+__externC const cyg_uint64 Cyg_libc_str_null_mask_2;
+
+#endif
+
+// MACROS
+
+// Nonzero if X is not aligned on a word boundary.
+#define CYG_LIBC_STR_UNALIGNED(X) ((CYG_WORD)(X) & (sizeof (CYG_WORD) - 1))
+
+// Nonzero if either X or Y is not aligned on a word boundary.
+#define CYG_LIBC_STR_UNALIGNED2(X , Y) \
+ (((CYG_WORD)(X) & (sizeof (CYG_WORD) - 1)) | \
+ ((CYG_WORD)(Y) & (sizeof (CYG_WORD) - 1)))
+
+// Nonzero if any byte of X contains a NULL.
+#define CYG_LIBC_STR_DETECTNULL(X) \
+ (((X) - (CYG_WORD)Cyg_libc_str_null_mask_1) & \
+ ~(X) & (CYG_WORD)Cyg_libc_str_null_mask_2)
+
+// How many bytes are copied each iteration of the 4X unrolled loop in the
+// optimised string implementations
+#define CYG_LIBC_STR_OPT_BIGBLOCKSIZE (sizeof(CYG_WORD) << 2)
+
+// How many bytes are copied each iteration of the word copy loop in the
+// optimised string implementations
+#define CYG_LIBC_STR_OPT_LITTLEBLOCKSIZE (sizeof (CYG_WORD))
+
+// Threshold for punting to the byte copier in the optimised string
+// implementations
+#define CYG_LIBC_STR_OPT_TOO_SMALL(LEN) \
+ ((LEN) < CYG_LIBC_STR_OPT_LITTLEBLOCKSIZE)
+
+
+// FUNCTION PROTOTYPES
+
+// These are function prototypes for the aliased functions that actually
+// implement the string functions
+
+//===========================================================================
+
+// 7.11.2 Copying functions
+
+__externC void *
+__memmove( void *, const void *, size_t );
+
+
+__externC char *
+__strcpy( char *, const char * );
+
+
+__externC char *
+__strncpy( char *, const char *, size_t );
+
+
+//===========================================================================
+
+// 7.11.3 Concatenation functions
+
+
+__externC char *
+__strcat( char *, const char * );
+
+
+__externC char *
+__strncat( char *, const char *, size_t );
+
+
+//===========================================================================
+
+// 7.11.4 Comparison functions
+
+__externC int
+__memcmp( const void *, const void *, size_t );
+
+
+__externC int
+__strcmp( const char *, const char * );
+
+
+__externC int
+__strcoll( const char *, const char * );
+
+
+__externC int
+__strncmp( const char *, const char *, size_t );
+
+
+__externC size_t
+__strxfrm( char *, const char *, size_t );
+
+
+//===========================================================================
+
+// 7.11.5 Search functions
+
+
+__externC void *
+__memchr( const void *, int , size_t );
+
+
+__externC char *
+__strchr( const char *, int );
+
+
+__externC size_t
+__strcspn( const char *, const char * );
+
+
+__externC char *
+__strpbrk( const char *, const char * );
+
+
+__externC char *
+__strrchr( const char *, int );
+
+
+__externC size_t
+__strspn( const char *, const char * );
+
+
+__externC char *
+__strstr( const char *, const char * );
+
+
+__externC char *
+__strtok( char *, const char * );
+
+// For POSIX 1003.1 section 8.3.3 strtok_r()
+
+__externC char *
+__strtok_r( char *, const char *, char ** );
+
+
+//===========================================================================
+
+// 7.11.6 Miscellaneous functions
+
+__externC size_t
+__strlen( const char * );
+
+// NB This is a BSD function
+__externC char *
+__strdup( const char * );
+
+#endif // CYGONCE_LIBC_STRING_STRINGSUPP_HXX multiple inclusion protection
+
+// EOF stringsupp.hxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/bsdstring.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/bsdstring.cxx
new file mode 100644
index 0000000000..5255ad0190
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/bsdstring.cxx
@@ -0,0 +1,235 @@
+//===========================================================================
+//
+// bsdstring.cxx
+//
+// BSD string routines
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2001-11-27
+// Purpose: Provide string functions derived from BSD
+// Description:
+// Usage: #include <string.h>
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // size_t, NULL etc.
+#include <ctype.h> // toupper/tolower
+
+// FUNCTIONS
+
+/*---------------------------------------------------------------------*/
+/* strcasecmp */
+
+__externC int
+__strcasecmp( const char *s1, const char *s2 )
+{
+ CYG_REPORT_FUNCNAMETYPE( "strcasecmp", "returning %d" );
+ CYG_REPORT_FUNCARG2( "s1=%08x, s2=%08x", s1, s2 );
+
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+
+ while (*s1 != '\0' && tolower(*s1) == tolower(*s2))
+ {
+ s1++;
+ s2++;
+ }
+
+ int ret = tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2);
+ CYG_REPORT_RETVAL( ret );
+ return ret;
+}
+
+__externC int
+strcasecmp( const char *s1, const char *s2 ) \
+ CYGBLD_ATTRIB_WEAK_ALIAS(__strcasecmp);
+
+
+/*---------------------------------------------------------------------*/
+/* strncasecmp */
+
+__externC int
+__strncasecmp( const char *s1, const char *s2, size_t n )
+{
+ CYG_REPORT_FUNCNAMETYPE( "strncasecmp", "returning %d" );
+ CYG_REPORT_FUNCARG3( "s1=%08x, s2=%08x, n=%d", s1, s2, n );
+
+ if (n == 0)
+ {
+ CYG_REPORT_RETVAL(0);
+ return 0;
+ }
+
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+
+ while (n-- != 0 && tolower(*s1) == tolower(*s2))
+ {
+ if (n == 0 || *s1 == '\0' || *s2 == '\0')
+ break;
+ s1++;
+ s2++;
+ }
+
+ int ret = tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2);
+ CYG_REPORT_RETVAL( ret );
+ return ret;
+}
+
+__externC int
+strncasecmp( const char *s1, const char *s2, size_t n ) \
+ CYGBLD_ATTRIB_WEAK_ALIAS(__strncasecmp);
+
+/*---------------------------------------------------------------------*/
+/* bcmp */
+
+__externC int
+__bcmp( const void *s1, const void *s2, size_t n )
+{
+ // Don't bother tracing - memcmp can do that
+ return memcmp (s1, s2, n);
+}
+
+__externC int
+bcmp( const void *s1, const void *s2, size_t n ) \
+ CYGBLD_ATTRIB_WEAK_ALIAS(__bcmp);
+
+/*---------------------------------------------------------------------*/
+/* bcopy */
+
+__externC void
+__bcopy( const void *src, void *dest, size_t n )
+{
+ // Don't bother tracing - memmove can do that
+ memmove (dest, src, n);
+}
+
+__externC void
+bcopy( const void *src, void *dest, size_t n ) \
+ CYGBLD_ATTRIB_WEAK_ALIAS(__bcopy);
+
+/*---------------------------------------------------------------------*/
+/* bzero */
+
+__externC void
+__bzero( void *s, size_t n )
+{
+ // Don't bother tracing - memset can do that
+ memset( s, 0, n );
+}
+
+__externC void
+bzero( void *s, size_t n ) CYGBLD_ATTRIB_WEAK_ALIAS(__bzero);
+
+/*---------------------------------------------------------------------*/
+/* index */
+
+__externC char *
+__index( const char *s, int c )
+{
+ // Don't bother tracing - strchr can do that
+ return strchr(s, c);
+}
+
+__externC char *
+index( const char *s, int c ) CYGBLD_ATTRIB_WEAK_ALIAS(__index);
+
+/*---------------------------------------------------------------------*/
+/* rindex */
+
+__externC char *
+__rindex( const char *s, int c )
+{
+ // Don't bother tracing - strrchr can do that
+ return strrchr(s, c);
+}
+
+__externC char *
+rindex( const char *s, int c ) CYGBLD_ATTRIB_WEAK_ALIAS(__rindex);
+
+/*---------------------------------------------------------------------*/
+/* swab */
+
+__externC void
+__swab( const void *from, void *to, size_t n )
+{
+ const char *f = (const char *)from;
+ char *t = (char *)to;
+ size_t ptr;
+
+ CYG_REPORT_FUNCNAME( "swab" );
+ CYG_REPORT_FUNCARG3( "from=%08x, to=%08x, n=%d", from, to, n );
+
+ if (n) {
+ CYG_CHECK_DATA_PTR( from, "from is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( to, "to is not a valid pointer!" );
+ }
+
+ for (ptr = 1; ptr < n; ptr += 2)
+ {
+ char p = f[ptr];
+ char q = f[ptr-1];
+ t[ptr-1] = p;
+ t[ptr ] = q;
+ }
+ if (ptr == n) /* I.e., if n is odd, */
+ t[ptr-1] = '\0'; /* then pad with a NUL. */
+
+ CYG_REPORT_RETURN();
+}
+
+__externC void
+swab( const void *from, void *to, size_t n ) \
+ CYGBLD_ATTRIB_WEAK_ALIAS(__swab);
+
+/*---------------------------------------------------------------------*/
+// EOF bsdstring.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/memchr.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/memchr.cxx
new file mode 100644
index 0000000000..bc11bc5307
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/memchr.cxx
@@ -0,0 +1,181 @@
+//===========================================================================
+//
+// memchr.cxx
+//
+// ANSI standard memchr() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+externC void *
+memchr( const void *s, int c, size_t n ) CYGBLD_ATTRIB_WEAK_ALIAS(__memchr);
+
+// FUNCTIONS
+
+void *
+__memchr( const void *s, int c, size_t n )
+{
+ CYG_REPORT_FUNCNAMETYPE( "__memchr", "returning addr %08x" );
+ CYG_REPORT_FUNCARG3( "s=%08x, c=%d, n=%d", s, c, n );
+
+ if (n)
+ {
+ CYG_CHECK_DATA_PTR( s, "s is not a valid pointer!" );
+ }
+
+#if defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) || defined(__OPTIMIZE_SIZE__)
+ const unsigned char *src = (const unsigned char *) s;
+
+ c &= 0xff;
+
+ while (n--)
+ {
+ if (*src == c)
+ {
+ CYG_REPORT_RETVAL( src );
+ return (void *) src;
+ } // if
+ src++;
+ }
+ CYG_REPORT_RETVAL( NULL );
+ return NULL;
+#else
+ const unsigned char *src = (const unsigned char *) s;
+ CYG_WORD *aligned_src;
+ CYG_WORD buffer;
+ CYG_WORD mask;
+ cyg_ucount8 i;
+
+ c &= 0xff;
+
+ // If the size is small, or src is unaligned, then
+ // use the bytewise loop. We can hope this is rare.
+ if (CYG_LIBC_STR_OPT_TOO_SMALL (n) || CYG_LIBC_STR_UNALIGNED (src))
+ {
+ while (n--)
+ {
+ if (*src == c)
+ {
+ CYG_REPORT_RETVAL( src );
+ return (void *) src;
+ } // if
+ src++;
+ }
+ CYG_REPORT_RETVAL( NULL );
+ return NULL;
+ }
+
+ // The fast code reads the ASCII one word at a time and only
+ // performs the bytewise search on word-sized segments if they
+ // contain the search character, which is detected by XORing
+ // the word-sized segment with a word-sized block of the search
+ // character and then detecting for the presence of NULL in the
+ // result.
+
+ aligned_src = (CYG_WORD *) src;
+ mask = 0;
+ for (i = 0; i < CYG_LIBC_STR_OPT_LITTLEBLOCKSIZE; i++)
+ mask = (mask << 8) + c;
+
+ while (n > CYG_LIBC_STR_OPT_LITTLEBLOCKSIZE)
+ {
+ buffer = *aligned_src;
+ buffer ^= mask;
+ if (CYG_LIBC_STR_DETECTNULL (buffer))
+ {
+ src = (unsigned char*) aligned_src;
+ for ( i = 0; i < CYG_LIBC_STR_OPT_LITTLEBLOCKSIZE; i++ )
+ {
+ if (*src == c)
+ {
+ CYG_REPORT_RETVAL( src );
+ return (void *) src;
+ } // if
+ src++;
+ }
+ }
+ n -= CYG_LIBC_STR_OPT_LITTLEBLOCKSIZE;
+ aligned_src++;
+ }
+
+ // If there are fewer than CYG_LIBC_STR_OPT_LITTLEBLOCKSIZE characters
+ // left, then we resort to the bytewise loop.
+
+ src = (const unsigned char *) aligned_src;
+ while (n--)
+ {
+ if (*src == c)
+ {
+ CYG_REPORT_RETVAL( src );
+ return (void *) src;
+ } // if
+ src++;
+ }
+
+ CYG_REPORT_RETVAL( NULL );
+ return NULL;
+#endif // not defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) ||
+ // defined(__OPTIMIZE_SIZE__)
+} // __memchr()
+
+// EOF memchr.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/memcmp.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/memcmp.cxx
new file mode 100644
index 0000000000..2b0354e115
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/memcmp.cxx
@@ -0,0 +1,188 @@
+//===========================================================================
+//
+// memcmp.cxx
+//
+// ANSI standard memcmp() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+
+// EXPORTED SYMBOLS
+
+externC int
+memcmp( const void *s1, const void *s2, size_t n ) \
+ CYGBLD_ATTRIB_WEAK_ALIAS(__memcmp);
+
+// FUNCTIONS
+
+int
+__memcmp( const void *s1, const void *s2, size_t n )
+{
+ int retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "__memcmp", "returning %d" );
+ CYG_REPORT_FUNCARG3( "s1=%08x, s2=%08x, n=%d", s1, s2, n );
+
+ if (n)
+ {
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+ }
+
+#if defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) || defined(__OPTIMIZE_SIZE__)
+ const unsigned char *m1 = (const unsigned char *) s1;
+ const unsigned char *m2 = (const unsigned char *) s2;
+
+ while (n--)
+ {
+ if (*m1 != *m2)
+ {
+ retval = *m1 - *m2;
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+ m1++;
+ m2++;
+ }
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+#else
+ const unsigned char *m1 = (const unsigned char *) s1;
+ const unsigned char *m2 = (const unsigned char *) s2;
+ const CYG_WORD *aligned_m1;
+ const CYG_WORD *aligned_m2;
+
+ // If the size is too small, or either pointer is unaligned,
+ // then we punt to the byte compare loop. Hopefully this will
+ // not turn up in inner loops.
+ if (CYG_LIBC_STR_OPT_TOO_SMALL(n) || CYG_LIBC_STR_UNALIGNED2(m1,m2))
+ {
+ while (n--)
+ {
+ if (*m1 != *m2)
+ {
+ retval = *m1 - *m2;
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+ m1++;
+ m2++;
+ }
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+ }
+
+ // Otherwise, load and compare the blocks of memory one
+ // word at a time.
+ aligned_m1 = (const CYG_WORD *) m1;
+ aligned_m2 = (const CYG_WORD *) m2;
+ while (n > CYG_LIBC_STR_OPT_LITTLEBLOCKSIZE)
+ {
+ if (*aligned_m1 != *aligned_m2)
+ {
+ // This block of characters has a mismatch, somewhere.
+ // xoring them together and then testing for null would
+ // be fastest, but this is clearer code.
+ m1 = (const unsigned char *)aligned_m1;
+ m2 = (const unsigned char *)aligned_m2;
+ while (n--)
+ {
+ if (*m1 != *m2)
+ {
+ retval = *m1 - *m2;
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+ m1++;
+ m2++;
+ }
+ // NOT REACHED
+ }
+ aligned_m1++;
+ aligned_m2++;
+ n -= CYG_LIBC_STR_OPT_LITTLEBLOCKSIZE;
+ }
+
+ // checking the last few characters
+
+ m1 = (const unsigned char *)aligned_m1;
+ m2 = (const unsigned char *)aligned_m2;
+
+ while (n--)
+ {
+ if (*m1 != *m2)
+ {
+ retval = *m1 - *m2;
+ CYG_REPORT_RETVAL( retval );
+ return retval;
+ }
+ m1++;
+ m2++;
+ }
+
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+#endif // not defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) ||
+ // defined(__OPTIMIZE_SIZE__)
+} // __memcmp()
+
+// EOF memcmp.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/memmove.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/memmove.cxx
new file mode 100644
index 0000000000..3f7eecf2da
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/memmove.cxx
@@ -0,0 +1,114 @@
+//===========================================================================
+//
+// memmove.cxx
+//
+// ANSI standard memmove() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+externC void *
+memmove( void *s1, const void *s2, size_t n ) \
+ CYGBLD_ATTRIB_WEAK_ALIAS(__memmove);
+
+// FUNCTIONS
+
+void *
+__memmove( void *s1, const void *s2, size_t n )
+{
+ char *dst = (char *)s1;
+ const char *src = (const char *)s2;
+
+ CYG_REPORT_FUNCNAMETYPE( "__memmove", "returning %08x" );
+ CYG_REPORT_FUNCARG3( "s1=%08x, s2=%08x, n=%d", s1, s2, n );
+
+ if (n)
+ {
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+ }
+
+ if ((src < dst) && (dst < (src + n)))
+ {
+ // Have to copy backwards
+ src += n;
+ dst += n;
+ while (n--)
+ {
+ *--dst = *--src;
+ }
+ }
+ else
+ {
+ while (n--)
+ {
+ *dst++ = *src++;
+ }
+ }
+
+ CYG_REPORT_RETVAL( s1 );
+
+ return s1;
+} // __memmove()
+
+// EOF memmove.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strcat.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strcat.cxx
new file mode 100644
index 0000000000..7a7ffb897c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strcat.cxx
@@ -0,0 +1,129 @@
+//===========================================================================
+//
+// strcat.cxx
+//
+// ANSI standard strcat() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+externC char *
+strcat( char *s1, const char *s2 ) CYGBLD_ATTRIB_WEAK_ALIAS(__strcat);
+
+// FUNCTIONS
+
+char *
+__strcat( char *s1, const char *s2 )
+{
+ CYG_REPORT_FUNCNAMETYPE( "__strcat", "returning %08x" );
+ CYG_REPORT_FUNCARG2( "s1=%08x, s2=%08x", s1, s2 );
+
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+
+#if defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) || defined(__OPTIMIZE_SIZE__)
+ char *s = s1;
+
+ while (*s1)
+ s1++;
+
+ while ((*s1++ = *s2++))
+ ;
+
+ CYG_REPORT_RETVAL( s );
+
+ return s;
+#else
+ char *s = s1;
+
+
+ // Skip over the data in s1 as quickly as possible.
+ if (!CYG_LIBC_STR_UNALIGNED (s1))
+ {
+ CYG_WORD *aligned_s1 = (CYG_WORD *)s1;
+ while (!CYG_LIBC_STR_DETECTNULL (*aligned_s1))
+ aligned_s1++;
+
+ s1 = (char *)aligned_s1;
+ }
+
+ while (*s1)
+ s1++;
+
+ // s1 now points to the its trailing null character, we can
+ // just use strcpy to do the work for us now.
+ //
+ // ?!? We might want to just include strcpy here.
+ // Also, this will cause many more unaligned string copies because
+ // s1 is much less likely to be aligned. I don't know if its worth
+ // tweaking strcpy to handle this better.
+ strcpy (s1, s2);
+
+ CYG_REPORT_RETVAL( s );
+
+ return s;
+#endif // not defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) ||
+ // defined(__OPTIMIZE_SIZE__)
+} // __strcat()
+
+// EOF strcat.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strchr.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strchr.cxx
new file mode 100644
index 0000000000..05f40fb54a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strchr.cxx
@@ -0,0 +1,148 @@
+//===========================================================================
+//
+// strchr.cxx
+//
+// ANSI standard strchr() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+externC char *
+strchr( const char *s, int c ) CYGBLD_ATTRIB_WEAK_ALIAS(__strchr);
+
+// MACROS
+
+// DETECTCHAR returns nonzero if X contains the byte used
+// to fill MASK.
+#define DETECTCHAR(X,MASK) (CYG_LIBC_STR_DETECTNULL( (X) ^ (MASK) ))
+
+// FUNCTIONS
+
+char *
+__strchr( const char *s, int c )
+{
+ CYG_REPORT_FUNCNAMETYPE( "__strchr", "returning %08x" );
+ CYG_REPORT_FUNCARG2( "s=%08x, c=%d", s, c );
+
+ CYG_CHECK_DATA_PTR( s, "s is not a valid pointer!" );
+
+#if defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) || defined(__OPTIMIZE_SIZE__)
+ char charc = c;
+
+ while (*s && *s != charc)
+ {
+ s++;
+ }
+
+ if (*s != charc)
+ {
+ s = NULL;
+ }
+
+ CYG_REPORT_RETVAL( s );
+
+ return (char *) s;
+#else
+ char charc = c;
+ CYG_WORD mask;
+ CYG_WORD j;
+ CYG_WORD *aligned_addr;
+
+ if (CYG_LIBC_STR_UNALIGNED (s))
+ {
+ while (*s && *s != charc)
+ s++;
+ if (*s != charc)
+ s = NULL;
+
+ CYG_REPORT_RETVAL( s );
+
+ return (char *) s;
+ }
+
+ for (j = 0, mask = 0; j < sizeof(mask); j++)
+ mask = (mask << 8) + charc;
+
+ aligned_addr = (CYG_WORD *)s;
+ while (!CYG_LIBC_STR_DETECTNULL (*aligned_addr) &&
+ !DETECTCHAR (*aligned_addr, mask))
+ aligned_addr++;
+
+ // The block of bytes currently pointed to by aligned_addr
+ // contains either a null or the target char, or both. We
+ // catch it using the bytewise search.
+
+ s = (char *)aligned_addr;
+ while (*s && *s != charc)
+ s++;
+ if (*s != charc)
+ s = NULL;
+
+ CYG_REPORT_RETVAL( s );
+
+ return (char *)s;
+#endif // not defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) ||
+ // defined(__OPTIMIZE_SIZE__)
+} // __strchr()
+
+// EOF strchr.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strcmp.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strcmp.cxx
new file mode 100644
index 0000000000..358d03fb1a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strcmp.cxx
@@ -0,0 +1,157 @@
+//===========================================================================
+//
+// strcmp.cxx
+//
+// ANSI standard strcmp() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+externC int
+strcmp( const char *s1, const char *s2 ) CYGBLD_ATTRIB_WEAK_ALIAS(__strcmp);
+
+// FUNCTIONS
+
+int
+__strcmp( const char *s1, const char *s2 )
+{
+ CYG_REPORT_FUNCNAMETYPE( "__strcmp", "returning %d" );
+ CYG_REPORT_FUNCARG2( "s1=%08x, s2=%08x", s1, s2 );
+
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+
+ int retval = 0;
+
+ CYG_UNUSED_PARAM( int, retval ); // in case tracing is off
+
+#if defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) || defined(__OPTIMIZE_SIZE__)
+ while (*s1 != '\0' && *s1 == *s2)
+ {
+ s1++;
+ s2++;
+ }
+
+ retval = (*(unsigned char *) s1) - (*(unsigned char *) s2);
+
+ CYG_REPORT_RETVAL( retval );
+
+ return retval;
+#else
+ const CYG_WORD *aligned_s1;
+ const CYG_WORD *aligned_s2;
+
+ // If s1 or s2 are unaligned, then compare bytes.
+ if (CYG_LIBC_STR_UNALIGNED2 (s1, s2))
+ {
+ while (*s1 != '\0' && *s1 == *s2)
+ {
+ s1++;
+ s2++;
+ }
+ retval = (*(unsigned char *) s1) - (*(unsigned char *) s2);
+
+ CYG_REPORT_RETVAL( retval );
+
+ return retval;
+ }
+
+ // If s1 and s2 are word-aligned, compare them a word at a time.
+ aligned_s1 = (const CYG_WORD *)s1;
+ aligned_s2 = (const CYG_WORD *)s2;
+ while (*aligned_s1 == *aligned_s2)
+ {
+ // To get here, *aligned_s1 == *aligned_s2, thus if we find a
+ // null in *aligned_s1, then the strings must be equal, so return
+ // zero.
+ if (CYG_LIBC_STR_DETECTNULL (*aligned_s1))
+ {
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+ } // if
+
+ aligned_s1++;
+ aligned_s2++;
+ }
+
+ // A difference was detected in last few bytes of s1, so search bytewise
+ s1 = (const char *)aligned_s1;
+ s2 = (const char *)aligned_s2;
+
+ while (*s1 != '\0' && *s1 == *s2)
+ {
+ s1++;
+ s2++;
+ }
+
+ retval = (*(unsigned char *) s1) - (*(unsigned char *) s2);
+
+ CYG_REPORT_RETVAL( retval );
+
+ return retval;
+
+#endif // not defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) ||
+ // defined(__OPTIMIZE_SIZE__)
+} // __strcmp()
+
+// EOF strcmp.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strcoll.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strcoll.cxx
new file mode 100644
index 0000000000..5571f86085
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strcoll.cxx
@@ -0,0 +1,96 @@
+//===========================================================================
+//
+// strcoll.cxx
+//
+// Real function definition for ANSI string strcoll() function - not
+// that there is an inline alternative
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+// We don't want the inline versions of string functions defined here
+
+#ifdef CYGIMP_LIBC_STRING_INLINES
+#undef CYGIMP_LIBC_STRING_INLINES
+#endif
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+// EXPORTED SYMBOLS
+
+externC int
+strcoll( const char *s1, const char *s2 ) CYGBLD_ATTRIB_WEAK_ALIAS(__strcoll);
+
+
+int
+__strcoll( const char *s1, const char *s2 )
+{
+ int retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "__strcoll", "returning %d" );
+ CYG_REPORT_FUNCARG2( "s1=%08x, s2=%d", s1, s2 );
+
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+
+ retval = strcmp(s1, s2);
+
+ return retval;
+} // __strcoll()
+
+
+// EOF strcoll.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strcpy.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strcpy.cxx
new file mode 100644
index 0000000000..1cbc367aae
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strcpy.cxx
@@ -0,0 +1,133 @@
+//===========================================================================
+//
+// strcpy.cxx
+//
+// ANSI standard strcpy() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+externC char *
+strcpy( char *s1, const char *s2 ) CYGBLD_ATTRIB_WEAK_ALIAS(__strcpy);
+
+// FUNCTIONS
+
+char *
+__strcpy( char *s1, const char *s2 )
+{
+ CYG_REPORT_FUNCNAMETYPE( "__strcpy", "returning addr %08x" );
+ CYG_REPORT_FUNCARG2( "s1=%08x, s2=%08x", s1, s2 );
+
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+
+#if defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) || defined(__OPTIMIZE_SIZE__)
+ char *s = s1;
+
+ while ((*s1++ = *s2++) != '\0')
+ ;
+
+ CYG_REPORT_RETVAL( s );
+
+ return s;
+#else
+ char *dst = s1;
+ const char *src = s2;
+ CYG_WORD *aligned_dst;
+ const CYG_WORD *aligned_src;
+
+ // If SRC or DEST is unaligned, then copy bytes.
+ if (CYG_LIBC_STR_UNALIGNED2 (src, dst))
+ {
+ while ((*dst++ = *src++) != '\0')
+ ;
+
+ CYG_REPORT_RETVAL( s1 );
+
+ return s1;
+ }
+
+ aligned_dst = (CYG_WORD *)dst;
+ aligned_src = (const CYG_WORD *)src;
+
+ // SRC and DEST are both "CYG_WORD" aligned, try to do "CYG_WORD"
+ // sized copies.
+ while (!CYG_LIBC_STR_DETECTNULL(*aligned_src))
+ {
+ *aligned_dst++ = *aligned_src++;
+ }
+
+ dst = (char*)aligned_dst;
+ src = (char*)aligned_src;
+
+ while ((*dst++ = *src++) != '\0')
+ ;
+
+ CYG_REPORT_RETVAL( s1 );
+
+ return s1;
+#endif // not defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) ||
+ // defined(__OPTIMIZE_SIZE__)
+} // __strcpy()
+
+// EOF strcpy.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strcspn.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strcspn.cxx
new file mode 100644
index 0000000000..70179bd847
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strcspn.cxx
@@ -0,0 +1,107 @@
+//===========================================================================
+//
+// strcspn.cxx
+//
+// ANSI standard strcspn() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+externC size_t
+strcspn( const char *s1, const char *s2 ) CYGBLD_ATTRIB_WEAK_ALIAS(__strcspn);
+
+// FUNCTIONS
+
+size_t
+__strcspn( const char *s1, const char *s2 )
+{
+ const char *s = s1;
+ const char *c;
+ size_t retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "__strcspn", "returning size %d" );
+ CYG_REPORT_FUNCARG2( "s1=%08x, s2=%08x", s1, s2 );
+
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+
+ while (*s1)
+ {
+ for (c = s2; *c; c++)
+ {
+ if (*s1 == *c)
+ break;
+ }
+ if (*c)
+ break;
+ s1++;
+ }
+
+ retval = s1 - s;
+
+ CYG_REPORT_RETVAL( retval );
+
+ return retval;
+} // __strcspn()
+
+// EOF strcspn.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strdup.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strdup.cxx
new file mode 100644
index 0000000000..80ac9c1e0c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strdup.cxx
@@ -0,0 +1,96 @@
+//===========================================================================
+//
+// strdup.cxx
+//
+// BSD strdup() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2004 eCosCentric Ltd.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2004-02-17
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <stdlib.h> // malloc()
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+__externC char *
+strdup( const char * ) CYGBLD_ATTRIB_WEAK_ALIAS(__strdup);
+
+// FUNCTIONS
+
+char *
+__strdup( const char *s1 )
+{
+ char *newstring;
+ size_t len;
+
+ CYG_REPORT_FUNCNAMETYPE( "__strdup", "returning addr %08x" );
+ CYG_REPORT_FUNCARG1( "s1=%08x", s1 );
+
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+
+ len = strlen( s1 ) + 1;
+ newstring = (char *)malloc( len );
+ if ( newstring )
+ {
+ memcpy( newstring, s1, len );
+ } // if
+
+ CYG_REPORT_RETVAL( newstring );
+
+ return newstring;
+} // __strdup()
+
+// EOF strdup.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strlen.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strlen.cxx
new file mode 100644
index 0000000000..468bb2cf7b
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strlen.cxx
@@ -0,0 +1,134 @@
+//===========================================================================
+//
+// strlen.cxx
+//
+// ANSI standard strlen() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+externC size_t
+strlen( const char *s ) CYGBLD_ATTRIB_WEAK_ALIAS(__strlen);
+
+// FUNCTIONS
+
+size_t
+__strlen( const char *s )
+{
+ int retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "__strlen", "returning length %d" );
+ CYG_REPORT_FUNCARG1( "s=%08x", s );
+
+ CYG_CHECK_DATA_PTR( s, "s is not a valid pointer!" );
+
+#if defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) || defined(__OPTIMIZE_SIZE__)
+ const char *start = s;
+
+ while (*s)
+ s++;
+
+ retval = s - start;
+
+ CYG_REPORT_RETVAL( retval );
+
+ return retval;
+
+#else
+
+ const char *start = s;
+ CYG_WORD *aligned_addr;
+
+ if (CYG_LIBC_STR_UNALIGNED (s))
+ {
+ while (*s)
+ s++;
+ retval = s - start;
+
+ CYG_REPORT_RETVAL( retval );
+
+ return retval;
+ }
+
+ // If the string is word-aligned, we can check for the presence of
+ // a null in each word-sized block.
+
+ aligned_addr = (CYG_WORD *)s;
+ while (!CYG_LIBC_STR_DETECTNULL (*aligned_addr))
+ aligned_addr++;
+
+ // Once a null is detected, we check each byte in that block for a
+ // precise position of the null.
+ s = (char*)aligned_addr;
+ while (*s)
+ s++;
+ retval = s - start;
+
+ CYG_REPORT_RETVAL( retval );
+
+ return retval;
+#endif // not defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) ||
+ // defined(__OPTIMIZE_SIZE__)
+} // __strlen()
+
+// EOF strlen.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strncat.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strncat.cxx
new file mode 100644
index 0000000000..1c7296cc0c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strncat.cxx
@@ -0,0 +1,138 @@
+//===========================================================================
+//
+// strncat.cxx
+//
+// ANSI standard strncat() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+externC char *
+strncat( char *s1, const char *s2, size_t n ) \
+ CYGBLD_ATTRIB_WEAK_ALIAS(__strncat);
+
+// FUNCTIONS
+
+char *
+__strncat( char *s1, const char *s2, size_t n)
+{
+ CYG_REPORT_FUNCNAMETYPE( "__strncat", "returning %08x" );
+ CYG_REPORT_FUNCARG3( "s1=%08x, s2=%08x, n=%d", s1, s2, n );
+
+ if (n)
+ {
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+ }
+
+#if defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) || defined(__OPTIMIZE_SIZE__)
+ char *s = s1;
+
+ while (*s1)
+ s1++;
+ while (n-- != 0 && (*s1++ = *s2++))
+ {
+ if (n == 0)
+ *s1 = '\0';
+ }
+
+ CYG_REPORT_RETVAL( s );
+
+ return s;
+#else
+ char *s = s1;
+
+ // Skip over the data in s1 as quickly as possible.
+ if (!CYG_LIBC_STR_UNALIGNED (s1))
+ {
+ CYG_WORD *aligned_s1 = (CYG_WORD *)s1;
+ while (!CYG_LIBC_STR_DETECTNULL (*aligned_s1))
+ aligned_s1++;
+
+ s1 = (char *)aligned_s1;
+ }
+
+ while (*s1)
+ s1++;
+
+ // s1 now points to the its trailing null character, now copy
+ // up to N bytes from S2 into S1 stopping if a NULL is encountered
+ // in S2.
+ //
+ // It is not safe to use strncpy here since it copies EXACTLY N
+ // characters, NULL padding if necessary.
+
+ while (n-- != 0 && (*s1++ = *s2++))
+ {
+ if (n == 0)
+ *s1 = '\0';
+ }
+
+ CYG_REPORT_RETVAL( s );
+
+ return s;
+#endif // not defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) ||
+ // defined(__OPTIMIZE_SIZE__)
+} // __strncat()
+
+// EOF strncat.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strncmp.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strncmp.cxx
new file mode 100644
index 0000000000..9e5755352c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strncmp.cxx
@@ -0,0 +1,176 @@
+//===========================================================================
+//
+// strncmp.cxx
+//
+// ANSI standard strncmp() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+externC int
+strncmp( const char *s1, const char *s2, size_t n ) \
+ CYGBLD_ATTRIB_WEAK_ALIAS(__strncmp);
+
+// FUNCTIONS
+
+int
+__strncmp( const char *s1, const char *s2, size_t n )
+{
+ int retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "__strncmp", "returning %d" );
+ CYG_REPORT_FUNCARG3( "s1=%08x, s2=%08x, n=%d", s1, s2, n );
+
+ if (n == 0)
+ {
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+ }
+
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+
+#if defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) || defined(__OPTIMIZE_SIZE__)
+ while (n-- != 0 && *s1 == *s2)
+ {
+ if (n == 0 || *s1 == '\0' || *s2 == '\0')
+ break;
+ s1++;
+ s2++;
+ }
+
+ retval = (*(unsigned char *) s1) - (*(unsigned char *) s2);
+
+ CYG_REPORT_RETVAL( retval );
+
+ return retval;
+#else
+ const CYG_WORD *aligned_s1;
+ const CYG_WORD *aligned_s2;
+
+ // If s1 or s2 are unaligned, then compare bytes.
+ if (CYG_LIBC_STR_UNALIGNED2 (s1, s2))
+ {
+ while (n-- != 0 && *s1 == *s2)
+ {
+ // If we've run out of bytes or hit a null, return zero
+ // since we already know *s1 == *s2.
+ if (n == 0 || *s1 == '\0')
+ return 0;
+ s1++;
+ s2++;
+ }
+ retval = (*(unsigned char *) s1) - (*(unsigned char *) s2);
+
+ CYG_REPORT_RETVAL( retval );
+
+ return retval;
+ } //if
+
+ // If s1 and s2 are word-aligned, compare them a word at a time.
+ aligned_s1 = (const CYG_WORD *)s1;
+ aligned_s2 = (const CYG_WORD *)s2;
+ while (n >= sizeof(CYG_WORD) && *aligned_s1 == *aligned_s2)
+ {
+ n -= sizeof (CYG_WORD);
+
+ // If we've run out of bytes or hit a null, return zero
+ // since we already know *aligned_s1 == *aligned_s2.
+ if (n == 0 || CYG_LIBC_STR_DETECTNULL (*aligned_s1))
+ {
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+ } // if
+
+ aligned_s1++;
+ aligned_s2++;
+ } // while
+
+ // A difference was detected in last few bytes of s1, so search bytewise
+ s1 = (const char *)aligned_s1;
+ s2 = (const char *)aligned_s2;
+
+ while (n-- > 0 && *s1 == *s2)
+ {
+ // If we've run out of bytes or hit a null, return zero
+ // since we already know *s1 == *s2.
+ if (n == 0 || *s1 == '\0')
+ {
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+ } // if
+ s1++;
+ s2++;
+ } // while
+
+ retval = (*(unsigned char *) s1) - (*(unsigned char *) s2);
+
+ CYG_REPORT_RETVAL( retval );
+
+ return retval;
+
+#endif // not defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) ||
+ // defined(__OPTIMIZE_SIZE__)
+} // __strncmp()
+
+// EOF strncmp.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strncpy.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strncpy.cxx
new file mode 100644
index 0000000000..0ce0344c6e
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strncpy.cxx
@@ -0,0 +1,149 @@
+//===========================================================================
+//
+// strncpy.cxx
+//
+// ISO C standard strncpy() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+externC char *
+strncpy( char *s1, const char *s2, size_t n ) \
+ CYGBLD_ATTRIB_WEAK_ALIAS(__strncpy);
+
+// FUNCTIONS
+
+char *
+__strncpy( char *s1, const char *s2, size_t n)
+{
+ CYG_REPORT_FUNCNAMETYPE( "__strncpy", "returning %08x" );
+ CYG_REPORT_FUNCARG3( "s1=%08x, s2=%08x, n=%d", s1, s2, n );
+
+ if (n)
+ {
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+ }
+
+#if defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) || defined(__OPTIMIZE_SIZE__)
+ char *dscan;
+ const char *sscan;
+
+ dscan = s1;
+ sscan = s2;
+ while (n > 0)
+ {
+ --n;
+ if ((*dscan++ = *sscan++) == '\0')
+ break;
+ }
+ while (n-- > 0)
+ *dscan++ = '\0';
+
+ CYG_REPORT_RETVAL( s1 );
+
+ return s1;
+#else
+ char *dst = s1;
+ const char *src = s2;
+ CYG_WORD *aligned_dst;
+ const CYG_WORD *aligned_src;
+
+ // If SRC and DEST is aligned and count large enough, then copy words.
+ if (!CYG_LIBC_STR_UNALIGNED2 (src, dst) &&
+ !CYG_LIBC_STR_OPT_TOO_SMALL (n)) {
+
+ aligned_dst = (CYG_WORD *)dst;
+ aligned_src = (CYG_WORD *)src;
+
+ // SRC and DEST are both "CYG_WORD" aligned, try to do "CYG_WORD"
+ // sized copies.
+ while (n >= sizeof (CYG_WORD) &&
+ !CYG_LIBC_STR_DETECTNULL(*aligned_src)) {
+
+ n -= sizeof (CYG_WORD);
+ *aligned_dst++ = *aligned_src++;
+ }
+
+ dst = (char *)aligned_dst;
+ src = (const char *)aligned_src;
+ } // if
+
+ while (n > 0)
+ {
+ --n;
+ if ((*dst++ = *src++) == '\0')
+ break;
+ }
+
+ while (n-- > 0)
+ *dst++ = '\0';
+
+ CYG_REPORT_RETVAL( s1 );
+
+ return s1;
+#endif // not defined(CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST) ||
+ // defined(__OPTIMIZE_SIZE__)
+} // __strncpy()
+
+// EOF strncpy.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strpbrk.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strpbrk.cxx
new file mode 100644
index 0000000000..47f4538076
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strpbrk.cxx
@@ -0,0 +1,113 @@
+//===========================================================================
+//
+// strpbrk.cxx
+//
+// ANSI standard strpbrk() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+externC char *
+strpbrk( const char *s1, const char *s2 ) CYGBLD_ATTRIB_WEAK_ALIAS(__strpbrk);
+
+// FUNCTIONS
+
+char *
+__strpbrk( const char *s1, const char *s2 )
+{
+ const char *c;
+
+ CYG_REPORT_FUNCNAMETYPE( "__strpbrk", "returning %08x" );
+ CYG_REPORT_FUNCARG2( "s1=%08x, s2=%08x", s1, s2 );
+
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+
+ if (!*s1)
+ {
+ CYG_REPORT_RETVAL( NULL );
+ return (char *) NULL;
+ } // if
+
+ do
+ {
+ for (c = s2; *c; c++)
+ {
+ if (*s1 == *c)
+ break;
+ }
+ if (*c)
+ break;
+ s1++;
+ }
+ while (*s1);
+
+ if (*c == '\0')
+ s1 = NULL;
+
+ CYG_REPORT_RETVAL( s1 );
+
+ return (char *) s1;
+} // __strpbrk()
+
+// EOF strpbrk.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strrchr.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strrchr.cxx
new file mode 100644
index 0000000000..64a923a37d
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strrchr.cxx
@@ -0,0 +1,105 @@
+//===========================================================================
+//
+// strrchr.cxx
+//
+// ANSI standard strrchr() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+externC char *
+strrchr( const char *s, int c ) CYGBLD_ATTRIB_WEAK_ALIAS(__strrchr);
+
+// FUNCTIONS
+
+char *
+__strrchr( const char *s, int c )
+{
+ const char *last = NULL;
+ const char charc = c;
+
+ CYG_REPORT_FUNCNAMETYPE( "__strrchr", "returning %08x" );
+ CYG_REPORT_FUNCARG2( "s=%08x, c=%d", s, c );
+
+ CYG_CHECK_DATA_PTR( s, "s is not a valid pointer!" );
+
+ while (*s)
+ {
+ if (*s == charc)
+ {
+ last = s;
+ }
+ s++;
+ }
+
+ if (*s == charc)
+ {
+ last = s;
+ }
+
+ CYG_REPORT_RETVAL( last );
+
+ return (char *) last;
+} // __strrchr()
+
+// EOF strrchr.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strspn.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strspn.cxx
new file mode 100644
index 0000000000..de683f5fc2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strspn.cxx
@@ -0,0 +1,107 @@
+//===========================================================================
+//
+// strspn.cxx
+//
+// ANSI standard strspn() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+externC size_t
+strspn( const char *s1, const char *s2 ) CYGBLD_ATTRIB_WEAK_ALIAS(__strspn);
+
+// FUNCTIONS
+
+size_t
+__strspn( const char *s1, const char *s2 )
+{
+ const char *s = s1;
+ const char *c;
+ size_t retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "__strspn", "returning size %d" );
+ CYG_REPORT_FUNCARG2( "s1=%08x, s2=%08x", s1, s2 );
+
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+
+ while (*s1)
+ {
+ for (c = s2; *c; c++)
+ {
+ if (*s1 == *c)
+ break;
+ }
+ if (*c == '\0')
+ break;
+ s1++;
+ }
+
+ retval = s1 - s;
+
+ CYG_REPORT_RETVAL( retval );
+
+ return retval;
+} // __strspn()
+
+// EOF strspn.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strstr.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strstr.cxx
new file mode 100644
index 0000000000..2165e22b77
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strstr.cxx
@@ -0,0 +1,123 @@
+//===========================================================================
+//
+// strstr.cxx
+//
+// ANSI standard strstr() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+externC char *
+strstr( const char *s1, const char *s2 ) CYGBLD_ATTRIB_WEAK_ALIAS(__strstr);
+
+// FUNCTIONS
+
+char *
+__strstr( const char *s1, const char *s2 )
+{
+ CYG_REPORT_FUNCNAMETYPE( "__strstr", "returning %08x" );
+ CYG_REPORT_FUNCARG2( "s1=%08x, s2=%08x", s1, s2 );
+
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+
+ if (*s1 == '\0')
+ {
+ if (*s2)
+ {
+ CYG_REPORT_RETVAL( NULL );
+ return (char *) NULL;
+ } // if
+ else
+ {
+ CYG_REPORT_RETVAL( s1 );
+ return (char *) s1;
+ } // else
+ } // if
+
+ while (*s1)
+ {
+ cyg_ucount32 i;
+
+ for (i=0 ; ; i++)
+ {
+ if (s2[i] == '\0')
+ {
+ CYG_REPORT_RETVAL( s1 );
+ return (char *) s1;
+ } // if
+
+ if (s2[i] != s1[i])
+ {
+ break;
+ } // if
+ } // for
+ s1++;
+ } // while
+
+ CYG_REPORT_RETVAL( NULL );
+
+ return (char *) NULL;
+} // __strstr()
+
+// EOF strstr.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strsuppt.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strsuppt.cxx
new file mode 100644
index 0000000000..2a3331724c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strsuppt.cxx
@@ -0,0 +1,70 @@
+//===========================================================================
+//
+// strsuppt.cxx
+//
+// Support for the ANSI standard string functions
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/libc/string/stringsupp.hxx> // Header for this file
+
+// CONSTANTS
+
+// Masks for CYG_LIBC_DETECTNULL macro so they are only defined once in
+// the library
+const cyg_uint64 Cyg_libc_str_null_mask_1 = 0x0101010101010101LL;
+const cyg_uint64 Cyg_libc_str_null_mask_2 = 0x8080808080808080LL;
+
+// EOF strsuppt.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strtok.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strtok.cxx
new file mode 100644
index 0000000000..c051741960
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strtok.cxx
@@ -0,0 +1,242 @@
+//===========================================================================
+//
+// strtok.cxx
+//
+// ISO standard strtok() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 2000-04-14
+// Purpose: Provide ISO C strtok() and POSIX strtok_r() routines
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+//
+// This code is based on original code with the following copyright:
+//
+/*
+ * Copyright (c) 1988 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+#ifdef CYGSEM_LIBC_STRING_PER_THREAD_STRTOK
+# include <pkgconf/kernel.h> // kernel configuration
+# include <cyg/kernel/thread.hxx> // per-thread data
+# include <cyg/kernel/thread.inl> // per-thread data
+# include <cyg/kernel/mutex.hxx> // mutexes
+#endif
+
+// TRACE
+
+#if defined(CYGDBG_USE_TRACING) && defined(CYGNUM_LIBC_STRING_STRTOK_TRACE_LEVEL)
+static int strtok_trace = CYGNUM_LIBC_STRING_STRTOK_TRACE_LEVEL;
+# define TL1 (0 < strtok_trace)
+#else
+# define TL1 (0)
+#endif
+
+// STATICS
+
+#ifdef CYGSEM_LIBC_STRING_PER_THREAD_STRTOK
+static Cyg_Thread::cyg_data_index
+strtok_data_index=CYGNUM_KERNEL_THREADS_DATA_MAX;
+
+static Cyg_Mutex strtok_data_mutex CYG_INIT_PRIORITY(LIBC);
+#else
+static char *cyg_libc_strtok_last;
+#endif
+
+// FUNCTIONS
+
+char *
+strtok( char *s1, const char *s2 )
+{
+ char **lasts;
+ char *retval;
+
+ CYG_REPORT_FUNCNAMETYPE( "strtok", "returning %08x" );
+ CYG_REPORT_FUNCARG2( "s1=%08x, s2=%08x", s1, s2 );
+
+ if (s1 != NULL)
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+
+#ifdef CYGSEM_LIBC_STRING_PER_THREAD_STRTOK
+ Cyg_Thread *self = Cyg_Thread::self();
+
+ // Get a per-thread data slot if we haven't got one already
+ // Do a simple test before locking and retrying test, as this is a
+ // rare situation
+ if (CYGNUM_KERNEL_THREADS_DATA_MAX==strtok_data_index) {
+ strtok_data_mutex.lock();
+ if (CYGNUM_KERNEL_THREADS_DATA_MAX==strtok_data_index) {
+
+ // FIXME: Should use real CDL to pre-allocate a slot at compile
+ // time to ensure there are enough slots
+ strtok_data_index = self->new_data_index();
+ CYG_ASSERT(strtok_data_index >= 0,
+ "failed to allocate data index" );
+ }
+ strtok_data_mutex.unlock();
+ } // if
+
+ // we have a valid index now
+
+ lasts = (char **)self->get_data_ptr(strtok_data_index);
+#else
+ lasts = &cyg_libc_strtok_last;
+#endif
+
+ CYG_TRACE2( TL1, "Retrieved strtok_last address %08x containing %s",
+ lasts, *lasts );
+
+ retval = strtok_r( s1, s2, lasts );
+
+ CYG_REPORT_RETVAL( retval );
+
+ return retval;
+} // strtok()
+
+char *
+strtok_r( char *s1, const char *s2, char **lasts )
+{
+ char *spanp;
+ int c, sc;
+ char *tok;
+
+ CYG_REPORT_FUNCNAMETYPE( "strtok_r", "returning %08x" );
+ CYG_REPORT_FUNCARG3( "s1=%08x, s2=%08x, lasts=%08x", s1, s2, lasts );
+
+ if (s1 != NULL)
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+ CYG_CHECK_DATA_PTR( lasts, "lasts is not a valid pointer!" );
+
+
+ if (s1 == NULL && (s1 = *lasts) == NULL)
+ {
+ CYG_REPORT_RETVAL( NULL );
+ return NULL;
+ } // if
+
+ //
+ // Skip (span) leading delimiters (s += strspn(s, delim), sort of).
+ //
+cont:
+ c = *s1++;
+ for (spanp = (char *)s2; (sc = *spanp++) != 0;) {
+ if (c == sc)
+ goto cont;
+ } // for
+
+ if (c == 0) { // no non-delimiter characters
+ *lasts = NULL;
+
+ CYG_REPORT_RETVAL( NULL );
+ return NULL;
+ } // if
+ tok = s1 - 1;
+
+ //
+ // Scan token (scan for delimiters: s += strcspn(s, delim), sort of).
+ // Note that delim must have one NUL; we stop if we see that, too.
+ //
+ for (;;) {
+ c = *s1++;
+ spanp = (char *)s2;
+ do {
+ if ((sc = *spanp++) == c) {
+ if (c == 0)
+ s1 = NULL;
+ else
+ s1[-1] = 0;
+ *lasts = s1;
+
+ CYG_REPORT_RETVAL( tok );
+
+ return (tok);
+ } // if
+ } while (sc != 0);
+ } // for
+ // NOTREACHED
+} // strtok_r()
+
+// EOF strtok.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/src/strxfrm.cxx b/cesar/ecos/packages/language/c/libc/string/current/src/strxfrm.cxx
new file mode 100644
index 0000000000..3967b5dec3
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/src/strxfrm.cxx
@@ -0,0 +1,112 @@
+//===========================================================================
+//
+// strxfrm.cxx
+//
+// ANSI standard strxfrm() routine
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions
+#include <cyg/infra/cyg_trac.h> // Tracing support
+#include <cyg/infra/cyg_ass.h> // Assertion support
+#include <string.h> // Header for this file
+#include <stddef.h> // Compiler definitions such as size_t, NULL etc.
+#include <cyg/libc/string/stringsupp.hxx> // Useful string function support and
+ // prototypes
+
+// EXPORTED SYMBOLS
+
+externC size_t
+strxfrm( char *s1, const char *s2, size_t n ) \
+ CYGBLD_ATTRIB_WEAK_ALIAS(__strxfrm);
+
+// FUNCTIONS
+
+size_t
+__strxfrm( char *s1, const char *s2, size_t n )
+{
+ size_t res = 0;
+
+ CYG_REPORT_FUNCNAMETYPE( "__strxfrm", "returning size %d" );
+ CYG_REPORT_FUNCARG3( "s1=%08x, s2=%08x, n=%d", s1, s2, n );
+
+ if (n)
+ {
+ CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" );
+ }
+ CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" );
+
+ while (n-- > 0)
+ {
+ if ((*s1++ = *s2++) != '\0')
+ ++res;
+ else
+ {
+ CYG_REPORT_RETVAL( res );
+ return res;
+ } // else
+ } // while
+
+ while (*s2)
+ {
+ ++s2;
+ ++res;
+ } // while
+
+ CYG_REPORT_RETVAL( res );
+
+ return res;
+} // __strxfrm()
+
+// EOF strxfrm.cxx
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/memchr.c b/cesar/ecos/packages/language/c/libc/string/current/tests/memchr.c
new file mode 100644
index 0000000000..72b2a2b33c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/memchr.c
@@ -0,0 +1,112 @@
+//=================================================================
+//
+// memchr.c
+//
+// Testcase for C library memchr()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library memchr() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+int main( int argc, char *argv[] )
+{
+ char x[] = "Your feeble skills are no match for the power of "
+ "the dark side!";
+ void *ret;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "memchr() function");
+
+ // Check 1
+ ret = memchr(x, (int)'k', sizeof(x));
+ CYG_TEST_PASS_FAIL( (my_strcmp(ret, x+13) == 0), "Simple test 1" );
+
+ // Check 2
+ ret = memchr(x, (int)'p', sizeof(x));
+ CYG_TEST_PASS_FAIL( (my_strcmp(ret, x+40) == 0), "Simple test 2" );
+
+ // Check 3
+ ret = memchr(x, (int)'z', sizeof(x));
+ CYG_TEST_PASS_FAIL( (ret == NULL), "Simple test 3" );
+
+ // Check 4 (boundary condition)
+ ret = memchr(x, (int)'\0', sizeof(x));
+ CYG_TEST_PASS_FAIL( ret == (x+sizeof(x)-1), "Boundary test 1" );
+
+ // Check 5 (boundary condition)
+ ret = memchr(x, (int)'\0', sizeof(x)-1);
+ CYG_TEST_PASS_FAIL( ret == NULL, "Boundary test 2" );
+
+ // Check 6 (boundary condition)
+ ret = memchr( (void *)"", (int)'\0', 0 );
+ CYG_TEST_PASS_FAIL( ret == NULL, "Boundary test 3" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "memchr() function");
+} // main()
+
+// EOF memchr.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/memcmp1.c b/cesar/ecos/packages/language/c/libc/string/current/tests/memcmp1.c
new file mode 100644
index 0000000000..f5848f25ca
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/memcmp1.c
@@ -0,0 +1,142 @@
+//=================================================================
+//
+// memcmp1.c
+//
+// Testcase for C library memcmp()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library memcmp() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "memcmp() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ // Check 1
+ my_strcpy(x, "I have become, comfortably numb");
+ my_strcpy(y, "I have become, comfortably numb");
+ CYG_TEST_PASS_FAIL( (memcmp(x, y, my_strlen(x)) == 0), "Simple compare");
+
+
+ // Check 2
+ my_strcpy(x, "");
+ my_strcpy(y, "");
+ CYG_TEST_PASS_FAIL( (memcmp(x, y, 0) == 0), "Simple empty string compare");
+
+
+ // Check 3
+ my_strcpy(x, "..shall snuff it. And the Lord did grin");
+ my_strcpy(y, "..shall snuff it. And the Lord did grio");
+ CYG_TEST_PASS_FAIL( (memcmp(x, y, my_strlen(x)) < 0),
+ "Memory less than #1" );
+
+
+ // Check 4
+ my_strcpy(x, "A reading from the Book of Armaments, Chapter 4, "
+ "Verses 16 to 20:");
+ my_strcpy(y, "Bless this, O Lord, that with it thou mayst blow thine "
+ "enemies to tiny bits, in thy mercy.");
+ CYG_TEST_PASS_FAIL( (memcmp(x, y, my_strlen(x)) < 0),
+ "Memory less than #2");
+
+ // Check 5
+ my_strcpy(x, "Lobeth this thy holy hand grenade at thy foe");
+ my_strcpy(y, "Lobeth this thy holy hand grenade at thy fod");
+ CYG_TEST_PASS_FAIL( (memcmp(x, y, my_strlen(x)) > 0),
+ "Memory greater than #1" );
+
+
+ // Check 6
+ my_strcpy(y, "Three shall be the number of the counting and the");
+ my_strcpy(x, "number of the counting shall be three");
+ CYG_TEST_PASS_FAIL( (memcmp(x, y, my_strlen(x)) > 0),
+ "Memory greater than #2" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "memcmp() function");
+} // main()
+
+
+
+// EOF memcmp1.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/memcmp2.c b/cesar/ecos/packages/language/c/libc/string/current/tests/memcmp2.c
new file mode 100644
index 0000000000..d4143661b8
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/memcmp2.c
@@ -0,0 +1,130 @@
+//=================================================================
+//
+// memcmp2.c
+//
+// Testcase for C library memcmp()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library memcmp() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// CONSTANTS
+
+#define NUM_ROBUSTNESS_RUNS 300
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ char z[300];
+ int ctr;
+ int fail;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "memcmp() function");
+ CYG_TEST_INFO("This testcase tests robustness, and may take some time");
+
+
+ fail = 0;
+ for (ctr = 0; ctr < NUM_ROBUSTNESS_RUNS; ctr++)
+ {
+ my_strcpy(x, "Spare a talent for an old ex-leper");
+ my_strcpy(y, "Spare a talent for an old ex-leper");
+ my_strcpy(z, "I was hopping along, when suddenly he");
+
+ if (memcmp(x, y,my_strlen(x)) != 0)
+ {
+ fail = 1;
+ break;
+ }
+ if (memcmp(x, z, my_strlen(z)) == 0)
+ {
+ fail = 1;
+ break;
+ } // if
+ } // for
+
+ CYG_TEST_PASS_FAIL( (fail==0), "Robustness test");
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "memcmp() function");
+} // main()
+
+
+// EOF memcmp2.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/memcpy1.c b/cesar/ecos/packages/language/c/libc/string/current/tests/memcpy1.c
new file mode 100644
index 0000000000..2c41be3ae4
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/memcpy1.c
@@ -0,0 +1,150 @@
+//=================================================================
+//
+// memcpy1.c
+//
+// Testcase for C library memcpy()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library memcpy() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ void *ret, *ptr1, *ptr2;
+ char *c_ret;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "memcpy() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ // Check 1
+ ptr1 = x;
+ ptr2 = y;
+ my_strcpy(x, "Great shot kid! That was one in a million!");
+ ret = memcpy(ptr2, ptr1, my_strlen(x) + 1);
+ CYG_TEST_PASS_FAIL( (my_strcmp(x, ptr2)==0), "Simple copy" );
+
+ // Check return value
+ CYG_TEST_PASS_FAIL( (my_strcmp(ret, ptr2)==0), "Simple copy return value");
+
+
+ // Check 2
+ ptr1 = x;
+ ptr2 = y;
+ my_strcpy(x, "");
+ my_strcpy(y, "xxxx"); // Bogus val to get overwritten
+ ret = memcpy(ptr2, ptr1, 1);
+ c_ret = ret;
+ if ((*c_ret == '\0') && (y[0] == '\0') && (y[1] == 'x'))
+ CYG_TEST_PASS("Simple copy with boundary check worked");
+ else
+ CYG_TEST_FAIL("Simple copy with boundary check failed");
+
+ // Check 3
+ ptr1 = x;
+ ptr2 = y;
+ my_strcpy(x, "xxxx");
+ my_strcpy(y, "yyyy");
+ ret = memcpy(ptr1, ptr2, 0);
+ c_ret = ret;
+ if ((*c_ret =='x') && (x[0] == 'x'))
+ CYG_TEST_PASS("Simple copy with size=0 worked");
+ else
+ CYG_TEST_FAIL("Simple copy with size=0 failed");
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "memcpy() function");
+} // main()
+
+
+// EOF memcpy1.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/memcpy2.c b/cesar/ecos/packages/language/c/libc/string/current/tests/memcpy2.c
new file mode 100644
index 0000000000..c51240b242
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/memcpy2.c
@@ -0,0 +1,138 @@
+//=================================================================
+//
+// memcpy2.c
+//
+// Testcase for C library memcpy()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library memcpy() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// CONSTANTS
+
+#define NUM_ROBUSTNESS_RUNS 300
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ void *ret, *ptr1, *ptr2;
+ char *c_ret;
+ int ctr;
+ int fail;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "memcpy() function");
+ CYG_TEST_INFO("This testcase tests robustness, and may take some time");
+
+
+ fail = 0;
+ for (ctr = 0; ctr < NUM_ROBUSTNESS_RUNS; ctr++) {
+ my_strcpy(x, "in the land of Mordor");
+ my_strcpy(y, " ");
+ ptr1 = x;
+ ptr2 = y;
+ ret = memcpy(ptr2, ptr1, my_strlen(x) + 1);
+ c_ret = ret;
+ if ((my_strcmp(y, x) != 0) || (my_strcmp(c_ret, x)!=0)) {
+ fail = 1;
+ break;
+ }
+ }
+
+ CYG_TEST_PASS_FAIL( (fail == 0), "Robustness test");
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "memcpy() function");
+} // main()
+
+
+// EOF memcpy2.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/memmove1.c b/cesar/ecos/packages/language/c/libc/string/current/tests/memmove1.c
new file mode 100644
index 0000000000..c1696dd5d8
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/memmove1.c
@@ -0,0 +1,171 @@
+//=================================================================
+//
+// memmove1.c
+//
+// Testcase for C library memmove()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library memmove() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ void *ret, *ptr1, *ptr2;
+ char *c_ret;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "memmove() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ // Check 1
+ ptr1 = x;
+ ptr2 = y;
+ my_strcpy(x, "Great shot kid! That was one in a million!");
+ ret = memmove(ptr2, ptr1, my_strlen(x) + 1);
+ CYG_TEST_PASS_FAIL( (my_strcmp(x, ptr2)==0), "Simple copy" );
+
+ // Check return value
+ CYG_TEST_PASS_FAIL( (my_strcmp(ret, ptr2)==0), "Simple copy return value");
+
+
+ // Check 2
+ ptr1 = x;
+ ptr2 = y;
+ my_strcpy(x, "");
+ my_strcpy(y, "xxxx"); // Bogus val to get overwritten
+ ret = memmove(ptr2, ptr1, 1);
+ c_ret = ret;
+ if ((*c_ret == '\0') && (y[0] == '\0') && (y[1] == 'x'))
+ CYG_TEST_PASS("Simple copy with boundary check worked");
+ else
+ CYG_TEST_FAIL("Simple copy with boundary check failed");
+
+ // Check 3
+ ptr1 = x;
+ ptr2 = y;
+ my_strcpy(x, "xxxx");
+ my_strcpy(y, "yyyy");
+ ret = memmove(ptr1, ptr2, 0);
+ c_ret = ret;
+ if ((*c_ret =='x') && (x[0] == 'x'))
+ CYG_TEST_PASS("Simple copy with size=0 worked");
+ else
+ CYG_TEST_FAIL("Simple copy with size=0 failed");
+
+ // Check 4
+ ptr1 = &x[0];
+ ptr2 = &x[1];
+ my_strcpy(x, "abcd");
+ ret = memmove(ptr1, ptr2, 4);
+ c_ret = ret;
+ if ( (c_ret==x) && (my_strcmp(x, "bcd")==0) )
+ CYG_TEST_PASS("Overlapping copy #1 worked");
+ else
+ CYG_TEST_FAIL("Overlapping copy #1 worked");
+
+ // Check 5
+ ptr1 = &x[0];
+ ptr2 = &x[4];
+ my_strcpy(x, "abcdefghijk");
+ ret = memmove(ptr1, ptr2, 6);
+ c_ret = ret;
+ if ( (c_ret==x) && (my_strcmp(x, "efghijghijk")==0) )
+ CYG_TEST_PASS("Overlapping copy #2 worked");
+ else
+ CYG_TEST_FAIL("Overlapping copy #2 worked");
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "memmove() function");
+} // main()
+
+
+// EOF memmove1.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/memmove2.c b/cesar/ecos/packages/language/c/libc/string/current/tests/memmove2.c
new file mode 100644
index 0000000000..dd9e9b8013
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/memmove2.c
@@ -0,0 +1,137 @@
+//=================================================================
+//
+// memmove2.c
+//
+// Testcase for C library memmove()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library memmove() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// CONSTANTS
+
+#define NUM_ROBUSTNESS_RUNS 300
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ void *ret, *ptr1, *ptr2;
+ char *c_ret;
+ int ctr;
+ int fail;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "memmove() function");
+ CYG_TEST_INFO("This testcase tests robustness, and may take some time");
+
+ fail = 0;
+ for (ctr = 0; ctr < NUM_ROBUSTNESS_RUNS; ctr++) {
+ my_strcpy(x, "in the land of Mordor");
+ my_strcpy(y, " ");
+ ptr1 = x;
+ ptr2 = y;
+ ret = memmove(ptr2, ptr1, my_strlen(x) + 1);
+ c_ret = ret;
+ if ((my_strcmp(y, x) != 0) || (my_strcmp(c_ret, x)!=0)) {
+ fail = 1;
+ break;
+ }
+ }
+
+ CYG_TEST_PASS_FAIL( (fail == 0), "Robustness test");
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "memmove() function");
+} // main()
+
+
+// EOF memmove2.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/memset.c b/cesar/ecos/packages/language/c/libc/string/current/tests/memset.c
new file mode 100644
index 0000000000..505ba63526
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/memset.c
@@ -0,0 +1,118 @@
+//=================================================================
+//
+// memset.c
+//
+// Testcase for C library memset() function
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library memset() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char *ret;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "memset() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ // Check 1
+ my_strcpy(x, " ");
+ ret = memset(x, 'X', 5);
+ if ((my_strcmp(x, "XXXXX ") == 0) && (ret == x))
+ CYG_TEST_PASS("Simple memset");
+ else
+ CYG_TEST_FAIL("Simple memset");
+
+ // Check 2
+ my_strcpy(x, "XXXXX ");
+ ret = memset(x, 'Y', 0);
+ if ((my_strcmp(x, "XXXXX ") == 0) && (ret == x))
+ CYG_TEST_PASS("Boundary case of 0 bytes");
+ else
+ CYG_TEST_FAIL("Boundary case of 0 bytes");
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "memset() function");
+
+} // main()
+
+// EOF memset.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strcat1.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strcat1.c
new file mode 100644
index 0000000000..4b52a85f00
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strcat1.c
@@ -0,0 +1,140 @@
+//=================================================================
+//
+// strcat1.c
+//
+// Testcase for C library strcat()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strcat() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ char *ret;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strcat() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ // Check 1
+ my_strcpy(x, "One ring to rule them all.");
+ my_strcpy(y, "One ring to find them.");
+ ret = strcat(x, y);
+ if ( my_strcmp(x, "One ring to rule them all.One ring to find them.")==0 )
+ CYG_TEST_PASS("Simple concatenation");
+ else
+ CYG_TEST_FAIL("Simple concatenation");
+ // Check return val
+ CYG_TEST_PASS_FAIL( ( ret == x ), "Simple concatenation return value" );
+
+
+ // Check 2
+ my_strcpy(x, "One ring to bring them all,");
+ my_strcpy(y, "");
+ ret = strcat(x, y);
+ if ( my_strcmp(x, "One ring to bring them all,")==0 )
+ CYG_TEST_PASS("Concatenation of empty string");
+ else
+ CYG_TEST_FAIL("Concatenation of empty string");
+ // Check return val
+ CYG_TEST_PASS_FAIL( ( ret == x ),
+ "Concatenation of empty string return value" );
+
+
+ // Check 3
+ my_strcpy(x, "and in the darkness bind them");
+ my_strcpy(y, "");
+ ret = strcat(y, x);
+ if ( my_strcmp(x, "and in the darkness bind them")==0 )
+ CYG_TEST_PASS("Concatenation to empty string");
+ else
+ CYG_TEST_FAIL("Concatenation to empty string");
+ // Check return val
+ CYG_TEST_PASS_FAIL( ( ret == y ),
+ "Concatenation to empty string return value" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strcat() function");
+} // main()
+
+
+// EOF strcat1.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strcat2.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strcat2.c
new file mode 100644
index 0000000000..d633644084
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strcat2.c
@@ -0,0 +1,128 @@
+//=================================================================
+//
+// strcat2.c
+//
+// Testcase for C library strcat()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strcat() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// CONSTANTS
+
+#define NUM_ROBUSTNESS_RUNS 300
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ char *ret;
+ int ctr;
+ int fail;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strcat() function");
+ CYG_TEST_INFO("This testcase tests robustness, and may take some time");
+
+ fail = 0;
+ for (ctr = 0; ctr < NUM_ROBUSTNESS_RUNS; ctr++)
+ {
+ my_strcpy(x, "in the land of Mordor, ");
+ my_strcpy(y, "where the shadows lie.");
+ ret = strcat(x, y);
+ if ((my_strcmp(x, "in the land of Mordor, where the shadows lie.")!=0))
+ {
+ fail = 1;
+ break;
+ } // if
+ if (ret != x)
+ {
+ fail = 1;
+ break;
+ } // if
+ }
+ CYG_TEST_PASS_FAIL( (fail == 0), "Robustness test passed" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strcat() function");
+
+} // main()
+
+
+// EOF strcat2.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strchr.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strchr.c
new file mode 100644
index 0000000000..ab238750b6
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strchr.c
@@ -0,0 +1,109 @@
+//=================================================================
+//
+// strchr.c
+//
+// Testcase for C library strchr()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strchr() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[] = "Your feeble skills are no match for the power of "
+ "the dark side!";
+ char empty_str[] = "";
+ char *ret;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strchr() function");
+
+ // Check 1
+ ret = strchr(x, (int)'k');
+ CYG_TEST_PASS_FAIL( (my_strcmp(ret, x+13) == 0), "Simple test 1" );
+
+ // Check 2
+ ret = strchr(x, (int)'p');
+ CYG_TEST_PASS_FAIL( (my_strcmp(ret, x+40) == 0), "Simple test 2" );
+
+ // Check 3
+ ret = strchr(x, (int)'z');
+ CYG_TEST_PASS_FAIL( (ret == NULL), "Simple test 3" );
+
+ // Check 4 (boundary condition)
+ ret = strchr(x, (int)'\0');
+ CYG_TEST_PASS_FAIL( ret == (x+sizeof(x)-1), "Boundary test 1" );
+
+ // Check 5 (boundary condition)
+ ret = strchr( empty_str, (int)'\0' );
+ CYG_TEST_PASS_FAIL( ret == empty_str, "Boundary test 2" );
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strchr() function");
+} // main()
+
+// EOF strchr.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strcmp1.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strcmp1.c
new file mode 100644
index 0000000000..f8c8ecdea9
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strcmp1.c
@@ -0,0 +1,130 @@
+//=================================================================
+//
+// strcmp1.c
+//
+// Testcase for C library strcmp()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strcmp() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strcmp() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ // Check 1
+ my_strcpy(x, "I have become, comfortably numb");
+ my_strcpy(y, "I have become, comfortably numb");
+ CYG_TEST_PASS_FAIL( (strcmp(x, y) == 0), "Simple compare");
+
+
+ // Check 2
+ my_strcpy(x, "");
+ my_strcpy(y, "");
+ CYG_TEST_PASS_FAIL( (strcmp(x, y) == 0), "Simple empty string compare");
+
+
+ // Check 3
+ my_strcpy(x, "..shall snuff it. And the Lord did grin");
+ my_strcpy(y, "..shall snuff it. And the Lord did grio");
+ CYG_TEST_PASS_FAIL( (strcmp(x, y) < 0),
+ "Memory less than #1" );
+
+
+ // Check 4
+ my_strcpy(x, "A reading from the Book of Armaments, Chapter 4, "
+ "Verses 16 to 20:");
+ my_strcpy(y, "Bless this, O Lord, that with it thou mayst blow thine "
+ "enemies to tiny bits, in thy mercy.");
+ CYG_TEST_PASS_FAIL( (strcmp(x, y) < 0),
+ "Memory less than #2");
+
+ // Check 5
+ my_strcpy(x, "Lobeth this thy holy hand grenade at thy foe");
+ my_strcpy(y, "Lobeth this thy holy hand grenade at thy fod");
+ CYG_TEST_PASS_FAIL( (strcmp(x, y) > 0),
+ "Memory greater than #1" );
+
+
+ // Check 6
+ my_strcpy(y, "Three shall be the number of the counting and the");
+ my_strcpy(x, "number of the counting shall be three");
+ CYG_TEST_PASS_FAIL( (strcmp(x, y) > 0),
+ "Memory greater than #2" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strcmp() function");
+} // main()
+
+
+
+// EOF strcmp1.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strcmp2.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strcmp2.c
new file mode 100644
index 0000000000..be4dcb9d9a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strcmp2.c
@@ -0,0 +1,117 @@
+//=================================================================
+//
+// strcmp2.c
+//
+// Testcase for C library strcmp()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strcmp() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// CONSTANTS
+
+#define NUM_ROBUSTNESS_RUNS 300
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ char z[300];
+ int ctr;
+ int fail;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strcmp() function");
+ CYG_TEST_INFO("This testcase tests robustness, and may take some time");
+
+ fail = 0;
+ for (ctr = 0; ctr < NUM_ROBUSTNESS_RUNS; ctr++)
+ {
+ my_strcpy(x, "Spare a talent for an old ex-leper");
+ my_strcpy(y, "Spare a talent for an old ex-leper");
+ my_strcpy(z, "I was hopping along, when suddenly he");
+
+ if (strcmp(x, y) != 0)
+ {
+ fail = 1;
+ break;
+ }
+ if (strcmp(x, z) == 0)
+ {
+ fail = 1;
+ break;
+ } // if
+ } // for
+
+ CYG_TEST_PASS_FAIL( (fail==0), "Robustness test");
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strcmp() function");
+} // main()
+
+
+// EOF strcmp2.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strcoll1.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strcoll1.c
new file mode 100644
index 0000000000..d5cf490747
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strcoll1.c
@@ -0,0 +1,132 @@
+//=================================================================
+//
+// strcoll1.c
+//
+// Testcase for C library strcoll()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strcoll() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strcoll() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ // Check 1
+ my_strcpy(x, "I have become, comfortably numb");
+ my_strcpy(y, "I have become, comfortably numb");
+ CYG_TEST_PASS_FAIL( (strcoll(x, y) == 0), "Simple compare");
+
+
+ // Check 2
+ my_strcpy(x, "");
+ my_strcpy(y, "");
+ CYG_TEST_PASS_FAIL( (strcoll(x, y) == 0), "Simple empty string compare");
+
+
+ // Check 3
+ my_strcpy(x, "..shall snuff it. And the Lord did grin");
+ my_strcpy(y, "..shall snuff it. And the Lord did grio");
+ CYG_TEST_PASS_FAIL( (strcoll(x, y) < 0),
+ "Memory less than #1" );
+
+
+ // Check 4
+ my_strcpy(x, "A reading from the Book of Armaments, Chapter 4, "
+ "Verses 16 to 20:");
+ my_strcpy(y, "Bless this, O Lord, that with it thou mayst blow thine "
+ "enemies to tiny bits, in thy mercy.");
+ CYG_TEST_PASS_FAIL( (strcoll(x, y) < 0),
+ "Memory less than #2");
+
+ // Check 5
+ my_strcpy(x, "Lobeth this thy holy hand grenade at thy foe");
+ my_strcpy(y, "Lobeth this thy holy hand grenade at thy fod");
+ CYG_TEST_PASS_FAIL( (strcoll(x, y) > 0),
+ "Memory greater than #1" );
+
+
+ // Check 6
+ my_strcpy(y, "Three shall be the number of the counting and the");
+ my_strcpy(x, "number of the counting shall be three");
+ CYG_TEST_PASS_FAIL( (strcoll(x, y) > 0),
+ "Memory greater than #2" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strcoll() function");
+} // main()
+
+
+
+// EOF strcoll1.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strcoll2.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strcoll2.c
new file mode 100644
index 0000000000..dd53817de8
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strcoll2.c
@@ -0,0 +1,115 @@
+//=================================================================
+//
+// strcoll2.c
+//
+// Testcase for C library strcoll()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strcoll() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// CONSTANTS
+
+#define NUM_ROBUSTNESS_RUNS 300
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ char z[300];
+ int ctr;
+ int fail;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strcoll() function");
+ CYG_TEST_INFO("This testcase tests robustness, and may take some time");
+
+ fail = 0;
+ for (ctr = 0; ctr < NUM_ROBUSTNESS_RUNS; ctr++)
+ {
+ my_strcpy(x, "Spare a talent for an old ex-leper");
+ my_strcpy(y, "Spare a talent for an old ex-leper");
+ my_strcpy(z, "I was hopping along, when suddenly he");
+
+ if (strcoll(x, y) != 0)
+ {
+ fail = 1;
+ break;
+ }
+ if (strcoll(x, z) == 0)
+ {
+ fail = 1;
+ break;
+ } // if
+ } // for
+
+ CYG_TEST_PASS_FAIL( (fail==0), "Robustness test");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strcoll() function");
+} // main()
+
+
+// EOF strcoll2.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strcpy1.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strcpy1.c
new file mode 100644
index 0000000000..509206dd10
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strcpy1.c
@@ -0,0 +1,119 @@
+//=================================================================
+//
+// strcpy1.c
+//
+// Testcase for C library strcpy()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strcpy() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ char *ret;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strcpy() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ // Check 1
+ my_strcpy(x, "Nine rings for men doomed to die");
+ ret = strcpy(y, "Nine rings for men doomed to die");
+ CYG_TEST_PASS_FAIL( (my_strcmp(x, y) == 0), "Simple copy" );
+ // Check return value
+ CYG_TEST_PASS_FAIL( (y == ret), "Simple copy return value" );
+
+
+ // Check 2
+ my_strcpy(x, "");
+ my_strcpy(y, "Seven rings for the dwarves in their halls of stone");
+ ret = strcpy(y, x);
+ CYG_TEST_PASS_FAIL( (my_strcmp(y, "") == 0), "Copy empty string" );
+ // Check return value
+ CYG_TEST_PASS_FAIL( (y == ret), "Copy empty string return value" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strcpy() function");
+
+} // main()
+
+// EOF strcpy1.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strcpy2.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strcpy2.c
new file mode 100644
index 0000000000..4ae481ca2e
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strcpy2.c
@@ -0,0 +1,123 @@
+//=================================================================
+//
+// strcpy2.c
+//
+// Testcase for C library strcpy()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strcpy() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// CONSTANTS
+
+#define NUM_ROBUSTNESS_RUNS 300
+
+// FUNCTIONS
+
+
+// Functions to avoid having to use libc strings
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ char *ret;
+ int ctr;
+ int fail;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strcpy() function");
+ CYG_TEST_INFO("This testcase tests robustness, and may take some time");
+
+ fail = 0;
+ for (ctr = 0; ctr < NUM_ROBUSTNESS_RUNS; ctr++) {
+ my_strcpy(x, "Green plastic watering can, ");
+ my_strcpy(y, "for her fake Chineese rubber plant");
+ ret = strcpy(x, y);
+ if ( (my_strcmp(x, "for her fake Chineese rubber plant") != 0) ||
+ ( ret != x ) )
+ {
+ fail = 1;
+ break;
+ } // if
+ } // for
+ CYG_TEST_PASS_FAIL( (fail == 0), "Robustness test" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strcpy() function");
+} // main()
+
+// EOF strcpy2.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strcspn.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strcspn.c
new file mode 100644
index 0000000000..b47863dfe0
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strcspn.c
@@ -0,0 +1,141 @@
+//=================================================================
+//
+// strcspn.c
+//
+// Testcase for C library strcspn()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strcspn() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ int ret;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strcspn() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ // Check 1
+ my_strcpy(x, "ah blow my nose at you, so-called Arthur king!");
+ my_strcpy(y, "A");
+ ret = strcspn(x, y);
+ CYG_TEST_PASS_FAIL( (ret == 34), "Simple strcspn() for one char" );
+
+
+ // Check 2
+ my_strcpy(x, "Not bad for a little fur ball. You! Stay here.");
+ my_strcpy(y, "fd");
+ ret = strcspn(x, y);
+ CYG_TEST_PASS_FAIL( (ret == 6), "Simple strcspn() for two chars" );
+
+ // Check 3 (boundary condition)
+ my_strcpy(x, "");
+ my_strcpy(y, "zx");
+ ret = strcspn(x, y);
+ CYG_TEST_PASS_FAIL( (ret == 0), "Empty string to search");
+
+
+ // Check 4 (boundary condition)
+ my_strcpy(x, "So, if she weighs the same as a duck, she's made of wood!");
+ my_strcpy(y, "zx");
+ ret = strcspn(x, y);
+ CYG_TEST_PASS_FAIL( (ret == my_strlen(x)), "Characters not in string" );
+
+ // Check 5 (boundary condition)
+ my_strcpy(x, "So, if she weighs the same as a duck, she's made of wood!");
+ my_strcpy(y, "S");
+ ret = strcspn(x, y);
+ CYG_TEST_PASS_FAIL( (ret == 0), "First character of string" );
+
+ // Check 6 (boundary condition)
+ my_strcpy(x, "So, if she weighs the same as a duck, she's made of wood!");
+ my_strcpy(y, "!");
+ ret = strcspn(x, y);
+ CYG_TEST_PASS_FAIL( (ret == (my_strlen(x) - 1)),
+ "Penultimate character of string" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strcspn() function");
+} // main()
+
+// EOF strcspn.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strlen.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strlen.c
new file mode 100644
index 0000000000..901ea0ecf9
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strlen.c
@@ -0,0 +1,85 @@
+//=================================================================
+//
+// strlen.c
+//
+// Testcase for C library strlen()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strlen() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+int main( int argc, char *argv[] )
+{
+ char x[]="";
+ char y[]="The force is strong in this one";
+ char z[]="I told you. We're an anarcho-cynicalist commune";
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strlen() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ CYG_TEST_PASS_FAIL( (strlen(x) == 0), "strlen(\"\")" );
+
+ CYG_TEST_PASS_FAIL( (strlen(y) == 31), "Simple length check #1" );
+
+ CYG_TEST_PASS_FAIL( (strlen(z) == 47), "Simple length check #2" );
+
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strlen() function");
+} // main()
+
+
+// EOF strlen.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strncat1.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strncat1.c
new file mode 100644
index 0000000000..529e29e3cc
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strncat1.c
@@ -0,0 +1,169 @@
+//=================================================================
+//
+// strncat1.c
+//
+// Testcase for C library strncat()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strncat() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/system.h>
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ char *ret;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "memmove() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ // Check 1
+ my_strcpy(x, "One ring to rule them all.");
+ my_strcpy(y, "One ring to find them.");
+ ret = strncat(x, y, my_strlen(y)+1);
+ if ( my_strcmp(x, "One ring to rule them all.One ring to find them.")==0 )
+ CYG_TEST_PASS("Simple concatenation");
+ else
+ CYG_TEST_FAIL("Simple concatenation");
+ // Check return val
+ CYG_TEST_PASS_FAIL( ( ret == x ), "Simple concatenation return value" );
+
+
+ // Check 2
+ my_strcpy(x, "One ring to bring them all,");
+ my_strcpy(y, "");
+ ret = strncat(x, y, my_strlen(y)+1);
+ if ( my_strcmp(x, "One ring to bring them all,")==0 )
+ CYG_TEST_PASS("Concatenation of empty string");
+ else
+ CYG_TEST_FAIL("Concatenation of empty string");
+ // Check return val
+ CYG_TEST_PASS_FAIL( ( ret == x ),
+ "Concatenation of empty string return value" );
+
+
+ // Check 3
+ my_strcpy(x, "and in the darkness bind them");
+ my_strcpy(y, "");
+ ret = strncat(y, x, my_strlen(x)+1 );
+ if ( my_strcmp(x, "and in the darkness bind them")==0 )
+ CYG_TEST_PASS("Concatenation to empty string");
+ else
+ CYG_TEST_FAIL("Concatenation to empty string");
+ // Check return val
+ CYG_TEST_PASS_FAIL( ( ret == y ),
+ "Concatenation to empty string return value" );
+
+ // Check 4
+ my_strcpy(x, "in the land of ");
+ my_strcpy(y, "Mordor, where the shadows lie");
+ ret = strncat(x, y, 6 );
+ if ( my_strcmp(x, "in the land of Mordor")==0 )
+ CYG_TEST_PASS("Concatenation of partial string string");
+ else
+ CYG_TEST_FAIL("Concatenation of partial string");
+ // Check return val
+ CYG_TEST_PASS_FAIL( ( ret == x ),
+ "Concatenation to empty string return value" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strncat() function");
+} // main()
+
+
+// EOF strncat1.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strncat2.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strncat2.c
new file mode 100644
index 0000000000..6eae341b85
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strncat2.c
@@ -0,0 +1,141 @@
+//=================================================================
+//
+// strncat2.c
+//
+// Testcase for C library strncat()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strncat() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// CONSTANTS
+
+#define NUM_ROBUSTNESS_RUNS 300
+
+// FUNCTIONS
+
+
+// Functions to avoid having to use libc strings
+
+static int my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ char *ret;
+ int ctr;
+ int fail;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strncat() function");
+ CYG_TEST_INFO("This testcase tests robustness, and may take some time");
+
+ fail = 0;
+ for (ctr = 0; ctr < NUM_ROBUSTNESS_RUNS; ctr++)
+ {
+ my_strcpy(x, "in the land of Mordor, ");
+ my_strcpy(y, "where the shadows lie.");
+ ret = strncat(x, y, my_strlen(y)+1 );
+ if ((my_strcmp(x, "in the land of Mordor, where the shadows lie.")!=0))
+ {
+ fail = 1;
+ break;
+ } // if
+ if (ret != x)
+ {
+ fail = 1;
+ break;
+ } // if
+ }
+ CYG_TEST_PASS_FAIL( (fail == 0), "Robustness test passed" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strncat() function");
+
+} // main()
+
+
+// EOF strncat2.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strncpy1.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strncpy1.c
new file mode 100644
index 0000000000..64c5ce186a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strncpy1.c
@@ -0,0 +1,162 @@
+//=================================================================
+//
+// strncpy1.c
+//
+// Testcase for C library strncpy()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strncpy() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static int my_strncmp(const char *s1, const char *s2, size_t n)
+{
+ if (n==0)
+ return 0;
+
+ while (n-- != 0 && *s1 == *s2)
+ {
+ if (n == 0 || *s1 == '\0' || *s2 == '\0')
+ break;
+ s1++;
+ s2++;
+ }
+
+ return (*s1 - *s2);
+} // my_strncmp()
+
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int
+main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ char *ret;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strncpy() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ // Check 1
+ my_strcpy(x, "Nine rings for men doomed to die");
+ ret = strncpy(y, "Nine rings for men doomed to die", my_strlen(x));
+ CYG_TEST_PASS_FAIL( (my_strncmp(x, y, my_strlen(x)) == 0),
+ "Simple copy" );
+ // Check return value
+ CYG_TEST_PASS_FAIL( (y == ret), "Simple copy return value" );
+
+
+ // Check 2
+ my_strcpy(x, "");
+ my_strcpy(y, "Seven rings for the dwarves in their halls of stone");
+ ret = strncpy(y, x, 1);
+ CYG_TEST_PASS_FAIL( (my_strcmp(y, "") == 0), "Copy empty string" );
+ // Check return value
+ CYG_TEST_PASS_FAIL( (y == ret), "Copy empty string return value" );
+
+ // Check 3
+ my_strcpy(x, "");
+ my_strcpy(y, "Seven rings for the dwarves in their halls of stone");
+ ret = strncpy(y, x, 0);
+ if (my_strcmp(y, "Seven rings for the dwarves "
+ "in their halls of stone") == 0)
+ CYG_TEST_PASS("Copy 0 characters");
+ else
+ CYG_TEST_FAIL("Copy 0 characters");
+ // Check return value
+ CYG_TEST_PASS_FAIL( (y == ret), "Copy empty string return value" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strncpy() function");
+
+} // main()
+
+// EOF strncpy1.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strncpy2.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strncpy2.c
new file mode 100644
index 0000000000..a150844971
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strncpy2.c
@@ -0,0 +1,133 @@
+//=================================================================
+//
+// strncpy2.c
+//
+// Testcase for C library strncpy()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strncpy() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// CONSTANTS
+
+#define NUM_ROBUSTNESS_RUNS 300
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ char *ret;
+ int ctr;
+ int fail;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strncpy() function");
+ CYG_TEST_INFO("This testcase tests robustness, and may take some time");
+
+ fail = 0;
+ for (ctr = 0; ctr < NUM_ROBUSTNESS_RUNS; ctr++) {
+ my_strcpy(x, "Green plastic watering can, ");
+ my_strcpy(y, "for her fake Chineese rubber plant");
+ ret = strncpy(x, y, my_strlen(y)+1);
+ if ( (my_strcmp(x, "for her fake Chineese rubber plant") != 0) ||
+ ( ret != x ) )
+ {
+ fail = 1;
+ break;
+ } // if
+ } // for
+ CYG_TEST_PASS_FAIL( (fail == 0), "Robustness test" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strncpy() function");
+} // main()
+
+// EOF strncpy2.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strpbrk.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strpbrk.c
new file mode 100644
index 0000000000..120a5b3cf2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strpbrk.c
@@ -0,0 +1,121 @@
+//=================================================================
+//
+// strpbrk.c
+//
+// Testcase for C library strpbrk()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strpbrk() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ char *ret;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strpbrk() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ // Check 1
+ my_strcpy(x, "I will not have my fwends widiculed by the common soldiewy");
+ my_strcpy(y, "zpm1"); // Finds the 'm'
+ ret = strpbrk(x, y);
+ CYG_TEST_PASS_FAIL( (ret == &x[16]), "Simple strpbrk()" );
+
+ // Check 2
+ my_strcpy(x, "Not bad for a little fur ball. You! Stay here.");
+ my_strcpy(y, "zx");
+ ret = strpbrk(x, y);
+ CYG_TEST_PASS_FAIL( (ret == NULL), "Letters not found");
+
+ // Check 3 (boundary condition)
+ my_strcpy(x, "");
+ my_strcpy(y, "zx");
+ ret = strpbrk(x, y);
+ CYG_TEST_PASS_FAIL( (ret == NULL), "String to search empty" );
+
+ // Check 4 (boundary condition)
+ my_strcpy(x, "zx");
+ my_strcpy(y, "");
+ ret = strpbrk(x, y);
+ CYG_TEST_PASS_FAIL( (ret == NULL), "Empty search string" );
+
+ // Check 5 (boundary condition)
+ my_strcpy(x, "");
+ my_strcpy(y, "");
+ ret = strpbrk(x, y);
+ CYG_TEST_PASS_FAIL( (ret == NULL), "Both strings empty" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strpbrk() function");
+
+} // main()
+
+// EOF strpbrk.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strrchr.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strrchr.c
new file mode 100644
index 0000000000..483dc8f9e3
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strrchr.c
@@ -0,0 +1,116 @@
+//=================================================================
+//
+// strrchr.c
+//
+// Testcase for C library strrchr()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strrchr() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char *ret;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strrchr() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ // Check 1
+ my_strcpy(x, "I will not have my fwends widiculed by the common soldiewy");
+ ret = strrchr(x, (int) 'c');
+ CYG_TEST_PASS_FAIL( (ret == &x[43]), "Simple strrchr()" );
+
+ // Check 2
+ my_strcpy(x, "Not bad for a little fur ball. You! Stay here.");
+ ret = strrchr(x, (int) 'z');
+ CYG_TEST_PASS_FAIL( (ret == NULL), "Character not found");
+
+ // Check 3 (boundary condition)
+ my_strcpy(x, "");
+ ret = strrchr(x, (int) 'c');
+ CYG_TEST_PASS_FAIL( (ret == NULL), "String to search empty" );
+
+ // Check 4 (boundary condition)
+ my_strcpy(x, "zx");
+ ret = strrchr(x, '\0');
+ CYG_TEST_PASS_FAIL( (ret == &x[2]), "Null search character" );
+
+ // Check 5 (boundary condition)
+ my_strcpy(x, "");
+ ret = strrchr(x, '\0');
+ CYG_TEST_PASS_FAIL( (ret == x), "String empty and null search char" );
+
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strrchr() function");
+
+} // main()
+
+// EOF strrchr.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strspn.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strspn.c
new file mode 100644
index 0000000000..ef9db569c3
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strspn.c
@@ -0,0 +1,128 @@
+//=================================================================
+//
+// strspn.c
+//
+// Testcase for C library strspn()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strspn() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+
+// FUNCTIONS
+
+
+// Functions to avoid having to use libc strings
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ int ret;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strspn() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ // Check 1
+ my_strcpy(x, "ah blow my nose at you, so-called Arthur king!");
+ my_strcpy(y, "wolbah ");
+ ret = strspn(x, y);
+ CYG_TEST_PASS_FAIL( (ret == 8), "Simple strspn() #1" );
+
+
+ // Check 2
+ my_strcpy(x, "Not bad for a little fur ball. You! Stay here.");
+ my_strcpy(y, "litea rofdbN");
+ ret = strspn(x, y);
+ CYG_TEST_PASS_FAIL( (ret == 22), "Simple strspn() #2" );
+
+ // Check 3
+ my_strcpy(x, "Not bad for a little fur ball. You! Stay here.");
+ my_strcpy(y, "litearofdbN");
+ ret = strspn(x, y);
+ CYG_TEST_PASS_FAIL( (ret == 3), "Simple strspn() #3");
+
+ // Check 4 (boundary condition)
+ my_strcpy(x, "Not bad for a little fur ball. You! Stay here.");
+ my_strcpy(y, "litearofdb");
+ ret = strspn(x, y);
+ CYG_TEST_PASS_FAIL( (ret == 0), "First character not in string");
+
+
+ // Check 5 (boundary condition)
+ my_strcpy(x, "So, if she weighs the same as a duck, she's made of wood!");
+ my_strcpy(y, "zx");
+ ret = strspn(x, y);
+ CYG_TEST_PASS_FAIL( (ret == 0), "No characters in string" );
+
+ // Check 6 (boundary condition)
+ my_strcpy(x, "");
+ my_strcpy(y, "qwerty");
+ ret = strspn(x, y);
+ CYG_TEST_PASS_FAIL( (ret == 0), "Empty search string" );
+
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strspn() function");
+} // main()
+
+// EOF strspn.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strstr.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strstr.c
new file mode 100644
index 0000000000..089eb44b96
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strstr.c
@@ -0,0 +1,124 @@
+//=================================================================
+//
+// strstr.c
+//
+// Testcase for C library strstr()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strstr() function
+//
+//
+//####DESCRIPTIONEND####
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ char *ret;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strstr() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ // Check 1
+ my_strcpy(x, "I will not have my fwends widiculed by the common soldiewy");
+ my_strcpy(y, "fwends");
+ ret = strstr(x, y);
+ CYG_TEST_PASS_FAIL( (ret == &x[19]), "Simple strstr()" );
+
+
+ // Check 2 (boundary condition)
+ my_strcpy(x, "Not bad for a little fur ball. You! Stay here.");
+ my_strcpy(y, "ball ");
+ ret = strstr(x, y);
+ CYG_TEST_PASS_FAIL( (ret == NULL), "String to search for not present" );
+
+
+ // Check 3 (boundary condition)
+ my_strcpy(x, "");
+ my_strcpy(y, "zx");
+ ret = strstr(x, y);
+ CYG_TEST_PASS_FAIL( (ret == NULL), "Empty string to search" );
+
+
+ // Check 4 (boundary condition)
+ my_strcpy(x, "fdafdafdfahjgf");
+ my_strcpy(y, "");
+ ret = strstr(x, y);
+ CYG_TEST_PASS_FAIL( (ret == x), "Empty search string" );
+
+ // Check 5 (boundary condition)
+ my_strcpy(x, "");
+ my_strcpy(y, "");
+ ret = strstr(x, y);
+ CYG_TEST_PASS_FAIL( (ret == x), "Both strings empty" );
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strstr() function");
+
+} // main()
+
+// EOF strstr.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strtok.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strtok.c
new file mode 100644
index 0000000000..f589a68b28
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strtok.c
@@ -0,0 +1,164 @@
+//=================================================================
+//
+// strtok.c
+//
+// Testcase for C library strtok()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 1999-01-20
+// Description: Contains testcode for C library strtok() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/system.h>
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+
+static int
+my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ ) {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *
+my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+static void
+test( CYG_ADDRWORD data )
+{
+ char x[300];
+
+ // Check 1
+ my_strcpy(x, "tok1 tok2 3kot");
+ if (( my_strcmp("tok1", strtok(x, " ")) == 0 ) &&
+ ( my_strcmp("tok2", strtok(NULL, " ")) == 0 ) &&
+ ( my_strcmp("3kot", strtok(NULL, " ")) == 0 ))
+
+ CYG_TEST_PASS("Simple strtok() #1");
+ else
+ CYG_TEST_FAIL("Simple strtok() #1");
+
+ // Check 2
+ my_strcpy(x, "Hitteth@ye *not, the vicar");
+ if (( my_strcmp("Hitteth", strtok(x, "@,*")) == 0 ) &&
+ ( my_strcmp("ye ", strtok(NULL, ",@*")) == 0 ) &&
+ ( my_strcmp("not", strtok(NULL, "*@,")) == 0 ) &&
+ ( my_strcmp(" the vicar", strtok(NULL, "*@,")) == 0 ) )
+
+ CYG_TEST_PASS("Simple strtok() #2");
+ else
+ CYG_TEST_FAIL("Simple strtok() #2");
+
+ // Check 3
+ my_strcpy(x, "on his bonce, with thine football");
+ if ( my_strcmp(strtok(x, "@*"), x) == 0 )
+ CYG_TEST_PASS("strtok() with token delimiters not found");
+ else
+ CYG_TEST_FAIL("strtok() with token delimiters not found");
+
+ // Check 4
+ my_strcpy(x, "@@@,,,...@,.,.@");
+ if (strtok(x, "@,.") == NULL)
+ CYG_TEST_PASS("All characters of string are token delimiters");
+ else
+ CYG_TEST_FAIL("All characters of string are token delimiters");
+
+ // Check 5
+ my_strcpy(x, "");
+ if (strtok(x, "@,.") == NULL)
+ CYG_TEST_PASS("String to tokenize empty");
+ else
+ CYG_TEST_FAIL("String to tokenize empty");
+
+ // Check 6
+ my_strcpy(x, "fdafda");
+ if (strtok(x, "") == x)
+ CYG_TEST_PASS("String to tokenize empty");
+ else
+ CYG_TEST_FAIL("String to tokenize empty");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strtok() function");
+
+} // test()
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strtok() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ test(0);
+
+ CYG_TEST_NA("Testing is not applicable to this configuration");
+} // main()
+
+
+// EOF strtok.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strxfrm1.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strxfrm1.c
new file mode 100644
index 0000000000..f1d45338e2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strxfrm1.c
@@ -0,0 +1,151 @@
+//=================================================================
+//
+// strxfrm1.c
+//
+// Testcase for C library strxfrm()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strxfrm() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/system.h>
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// FUNCTIONS
+
+
+// Functions to avoid having to use libc strings
+
+static int my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ int ret;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strxfrm() function");
+ CYG_TEST_INFO("This testcase provides simple basic tests");
+
+ // Check 1
+ my_strcpy(x, "Nine rings for men doomed to die");
+ ret = strxfrm(y, x, my_strlen(x)+1);
+ if (my_strcmp(x, y) == 0)
+ CYG_TEST_PASS("Simple strxfrm()");
+ else
+ CYG_TEST_FAIL("Simple strxfrm()");
+ // Check return value
+ CYG_TEST_PASS_FAIL( (my_strlen(x) == ret),
+ "Simple strxfrm() return value");
+
+ // Check 2
+ x[0] = '\0';
+ my_strcpy(y, "Seven rings for the dwarves in their halls of stone");
+ ret = strxfrm(y, x, my_strlen(x)+1);
+ if (my_strcmp(y, "") == 0)
+ CYG_TEST_PASS("strxfrm() of empty string");
+ else
+ CYG_TEST_FAIL("strxfrm() of empty string");
+ // Check return value
+ CYG_TEST_PASS_FAIL( (my_strlen(x) == ret),
+ "strxfrm() of empty string return value");
+
+ // Check 3
+ my_strcpy(y, "Seven rings for the dwarves in their halls of stone");
+ ret = strxfrm(NULL, y, 0);
+
+ // Check return value
+ CYG_TEST_PASS_FAIL( (my_strlen(y) == ret),
+ "strxfrm() of NULL string for 0 bytes return value");
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strxfrm() function");
+} // main()
+
+
+// EOF strxfrm1.c
diff --git a/cesar/ecos/packages/language/c/libc/string/current/tests/strxfrm2.c b/cesar/ecos/packages/language/c/libc/string/current/tests/strxfrm2.c
new file mode 100644
index 0000000000..187b20c9d8
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/string/current/tests/strxfrm2.c
@@ -0,0 +1,138 @@
+//=================================================================
+//
+// strxfrm2.c
+//
+// Testcase for C library strxfrm()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 2000-04-30
+// Description: Contains testcode for C library strxfrm() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/system.h>
+#include <pkgconf/libc_string.h> // Configuration header
+
+// INCLUDES
+
+#include <string.h>
+#include <cyg/infra/testcase.h>
+
+// CONSTANTS
+
+#define NUM_ROBUSTNESS_RUNS 300
+
+
+// FUNCTIONS
+
+// Functions to avoid having to use libc strings
+
+static int my_strlen(const char *s)
+{
+ const char *ptr;
+
+ ptr = s;
+ for ( ptr=s ; *ptr != '\0' ; ptr++ )
+ ;
+
+ return (int)(ptr-s);
+} // my_strlen()
+
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static char *my_strcpy(char *s1, const char *s2)
+{
+ while (*s2 != '\0') {
+ *(s1++) = *(s2++);
+ }
+ *s1 = '\0';
+
+ return s1;
+} // my_strcpy()
+
+int main( int argc, char *argv[] )
+{
+ char x[300];
+ char y[300];
+ int ret;
+ int ctr;
+ int fail;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strxfrm() function");
+ CYG_TEST_INFO("This testcase tests robustness, and may take some time");
+
+ fail = 0;
+ for (ctr = 0; ctr < NUM_ROBUSTNESS_RUNS; ctr++) {
+ my_strcpy(x, "Green plastic watering can, ");
+ my_strcpy(y, "for her fake Chineese rubber plant");
+ ret = strxfrm(x, y, my_strlen(y)+1);
+ if ( (my_strcmp(x, "for her fake Chineese rubber plant") != 0) ||
+ (my_strlen(y) != ret) ) {
+ fail = 1;
+ break;
+ }
+ }
+ CYG_TEST_PASS_FAIL( (fail == 0), "Robustness test" );
+
+
+// CYG_TEST_NA("Testing is not applicable to this configuration");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strxfrm() function");
+} // main()
+
+// EOF strxfrm2.c
diff --git a/cesar/ecos/packages/language/c/libc/time/current/ChangeLog b/cesar/ecos/packages/language/c/libc/time/current/ChangeLog
new file mode 100644
index 0000000000..05a0af332d
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/ChangeLog
@@ -0,0 +1,193 @@
+2005-03-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/time.h: Added CYGBLD_ATTRIB_STRFTIME_FORMAT where
+ appropriate so the compiler does more checking.
+
+2004-08-08 Bart Veer <bartv@ecoscentric.com>
+
+ * src/strptime.cxx: fix spelling
+
+2003-08-18 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/strptime.cxx: Added string.h to fix compile warnings.
+ * cdl/time.cdl: Updated the requires statement for BSD string
+ functions to use the interface rather than the option name.
+
+2003-06-26 Brij Bihari Pandey <fuzzhead012@yahoo.com>
+2003-06-26 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * tests/clock.c (main): Add a fudge factor in case the absolute values
+ from clock() are small, in which case the percentage variation
+ would be large.
+
+2003-06-13 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * tests/clock.c (main): Avoid div-by-zero if mean==0.
+
+ * cdl/time.cdl: build all POSIX files all the time because they
+ are used internally by the standard ISO C functions even if not
+ exported.
+ [Bug 1000001]
+
+2003-04-24 Robert Cragie <rcc@jennic.com>
+
+ * include/time.inl:
+ * include/timeutil.h:
+ * src/timeutil.cxx:
+ Change return type of cyg_libc_time_itoa() to cyg_ucount8.
+ * src/strftime.cxx:
+ Change return type of do_format() to cyg_count8.
+ These benign changes get around a compiler bug using or32-elf-gcc
+
+2003-03-18 Gary Thomas <gary@mlbassoc.com>
+
+ * src/strptime.cxx: Initialize time structure to a well known, valid,
+ time/date so even if there is an error, it still makes [some] sense.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/time.cdl: Fix doc link.
+
+2003-01-28 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/time.cdl: Correct reference to
+ CYGSEM_LIBC_TIME_POSIX_TIME_ROUTINES in CYGPKG_LIBC_TIME_TESTS to
+ CYGFUN_LIBC_TIME_POSIX.
+
+2003-01-27 Gary Thomas <gary@mlbassoc.com>
+
+ * tests/strptime.c:
+ * src/strptime.cxx:
+ * include/time.h:
+ * cdl/time.cdl: Add support for strptime().
+
+2002-05-14 Jesper Skov <jskov@redhat.com>
+
+ * cdl/time.cdl: Added -Wno-format to the compiler flags. This is
+ to avoid warnings about Y2K problems with the format specifiers
+ used in the strftime test.
+
+2002-01-09 Nick Garnett <nickg@redhat.com>
+
+ * tests/clock.c (cyg_start): Added CYG_TEST_INIT() to
+ NOTAPPLICABLE version of cyg_start() so that the breakpoints are
+ correctly sequenced in the testfarm and it does not think that
+ this is a failure.
+
+2001-06-22 Jesper Skov <jskov@redhat.com>
+
+ * cdl/time.cdl (CYGFUN_LIBC_TIME_SUS_EXTNS): Added.
+ * src/strftime.cxx (do_format): Added some Single UNIX
+ extensions.
+
+2001-04-25 Bart Veer <bartv@redhat.com>
+
+ * tests/time.c (MAX_TIMEOUT):
+ Increase timeout to cope with fast architectures such as the
+ synthetic target.
+
+2001-04-17 Bart Veer <bartv@redhat.com>
+
+ * tests/clock.c:
+ Cope with synthetic target reorg
+
+2000-11-29 Jonathan Larmour <jlarmour@redhat.com>
+
+ * tests/clock.c: Some targets are quite inconsistent, so skip
+ 6 samples now, and increase the tolerance to 40%.
+ Also NA if tracing enabled.
+ Also output the mean and maximum error reached, even when passing.
+
+2000-11-27 Jesper Skov <jskov@redhat.com>
+
+ * tests/clock.c: Skip fourth sample too.
+
+2000-11-14 Jesper Skov <jskov@redhat.com>
+
+ * tests/clock.c: Skip first three samples.
+
+2000-10-30 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/time.inl: Ensure POSIX *_r functions can be accessed by
+ non-POSIX implementation even when CYGFUN_LIBC_TIME_POSIX is off.
+
+ * src/asctime_r.cxx: No need to make conditional on posix CDL option -
+ we may want to define an internal-only function.
+ * src/ctime_r.cxx: Ditto
+ * src/gmtime_r.cxx: Ditto
+ * src/localtime_r.cxx: Ditto
+
+ * cdl/time.cdl: abs() is also a requirement
+
+ * src/clock.cxx (clock): Always use unsigned long longs for temp
+ variables (and make sure it's used), rather than making
+ assumptions about clock_t.
+
+ * tests/clock.c: Rewrite
+
+2000-07-26 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/time.cdl: Add CYGINT_ISO_DIV dependency
+
+2000-07-24 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/time.cxx:
+ * src/settime.cxx:
+ Wallclock moved to io/
+
+2000-06-20 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/time.inl (__gmtime_r): Don't save leap year status when
+ calculating tm_wday
+
+2000-06-17 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/time.inl (gmtime_r): Deal with boundary case correctly
+
+ * tests/gmtime.c (test): Add a couple more test cases
+
+2000-05-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * include/time.h: Just use the defaults for time_t, clock_t and
+ CLOCKS_PER_SEC in isoinfra
+
+ * New package
+ Separated original libc out into separate packages on functional
+ boundaries.
+ Header files are now managed by isoinfra package
+ Plenty of cleanups done, but no major functionality changes
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/time/current/ChangeLog.libc b/cesar/ecos/packages/language/c/libc/time/current/ChangeLog.libc
new file mode 100644
index 0000000000..88fb2f11f2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/ChangeLog.libc
@@ -0,0 +1,2736 @@
+This ChangeLog file is now obsolete. This is the original ChangeLog from when
+libc was one large package, before being separated. It is included for
+historical reasons.
+
+2000-04-05 Jesper Skov <jskov@redhat.com>
+
+ * src/time/settime.cxx:
+ * src/time/time.cxx:
+ Wallclock moved to io/.
+
+2000-03-28 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/string.cdl,
+ cdl/stdlib.cdl,
+ cdl/stdio.cdl,
+ cdl/libc.cdl:
+
+ Adjust documentation URLs.
+
+2000-03-27 Jesper Skov <jskov@redhat.com>
+
+ * src/clibincl/stream.inl (check_this): Use cyb_bool instead of bool.
+
+2000-03-06 Jesper Skov <jskov@redhat.com>
+
+ * tests/time/strftime.c (test): Adjust test to match below change.
+
+2000-03-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/time/strftime.cxx (do_format): Make sure %m counts from
+ 1..12 rather than 0..11. Fix for case 103300
+
+2000-02-29 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: Correctly use 'n' parameter to
+ restrict length. Credit due to Andrew Lunn here as well.
+ Resolves 103057-CR-1
+
+ * tests/stdio/sprintf2.c (test):
+ Add snprintf tests to verify the correct behaviour of restricting
+ output length
+
+2000-02-10 Jesper Skov <jskov@redhat.com>
+
+ * tests/signal/signal2.c (main):
+ Also reclaim DATA_TLB_MISS vector if available.
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+
+1999-11-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * cdl/string.cdl:
+ Switch to a single boolean configuration option for code size vs.
+ speed optimization.
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl: Define tests.
+
+1999-10-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx: We can now remove Berkeley
+ advertising clause
+ * src/stdlib/div.cxx: ditto
+ * src/stdlib/ldiv.cxx: ditto
+ * src/stdlib/strtol.cxx: ditto
+ * src/stdlib/strtoul.cxx: ditto
+ * src/string/strtok.cxx: ditto
+
+1999-10-19 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libc.cdl:
+
+ Define CDL options for package-specific CFLAGS.
+
+1999-10-08 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_THREAD_PRIORITY): Change
+ default to 10 to keep test farm happy
+ * cdl/startup.cdl: Likewise
+
+1999-10-07 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Specify radio buttons using CDL interfaces.
+
+1999-10-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * cdl/stdio.cdl: Change default to /dev/ttydiag as per 1999-10-01
+ change below
+ * cdl/startup.cdl: Add new form CDL for the startup changes as
+ per 1999-10-05
+
+1999-10-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/libc.h: Add CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM to allow
+ the user to supply their own stack.
+ Rename CYGNUM_LIBC_MAIN_STACK_SIZE to
+ CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE and reparent under
+ CYGSEM_LIBC_MAIN_STACK_FROM_SYSTEM
+ Add CYGNUM_LIBC_MAIN_THREAD_PRIORITY to provide main() thread
+ priority
+
+ * src/support/mainthread.cxx: Add support for user-supplied stack
+ Allow user to specify thread priority
+
+ These changes fix CR 101069
+
+1999-10-01 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE): Change
+ default to /dev/ttydiag to get correct console-like behaviour
+ Also don't preclude use if haldiag package isn't included
+ (case 102065)
+
+1999-09-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (cause_fpe): Try both float and integer
+ division by zero.
+
+1999-09-10 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx (cyg_libc_get_malloc_pool): Added for
+ stress_threads test.
+
+1999-09-07 Jesper Skov <jskov@cygnus.co.uk>
+ PRs 20243, 20433
+ * tests/signal/signal2.c: Disabled test3 on ARM.
+
+1999-09-02 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/assert.h: Make the sense of NDEBUG correct; it is "set"
+ when NOT debugging. Fix for CR 101983-CR-1
+ See Stroustrup, "The C++ Programming Language."
+
+1999-08-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen): Set buffer size 0 when not
+ buffering
+ Fix for case 101868
+
+1999-08-17 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl, cdl/string.cdl:
+
+ Implement radio buttons using "FIXME radio" hack in
+ description field for now.
+
+1999-08-12 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/stdlib.cdl:
+ Take advantage of MACRONAME_ENUMVAL macros output by CDL.
+
+1999-08-06 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf2.c (test): Don't rely on 2.345 being exactly
+ representable in binary as a difference of 1 ulp will make it round
+ the wrong way.
+
+1999-07-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fgetc.cxx:
+ Include outline versions of getc() (actually just a symbol alias for
+ fgetc() ) and getchar()
+ Some minor clean-ups
+ Add tracing/assertions
+
+ * src/stdio/input/fputc.cxx:
+ Likewise (except applied to putc() and putchar())
+
+ * src/stdio/common/stdioinlines.cxx (_puts):
+ Call fputc() not _fputc()
+
+ * src/clibincl/stdiosupp.hxx:
+ Remove now obsolete prototypes for _fgetc() and _fputc()
+
+ * include/stdio.h:
+ Don't bother with getc()/putc() macros any more, just call
+ them as functions
+ Include protos for getc(), putc(), getchar() and putchar() functions
+
+1999-06-21 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for SH EDK7708.
+
+1999-06-11 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h: Make FILEs array types so they won't be
+ given $gp relocations on MIPS targets
+
+1999-05-27 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/ctime.c: Fixed compiler warning.
+
+1999-05-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main):
+ Update CYGPKG_HAL_TX39 -> CYGPKG_HAL_MIPS_TX39 due to recent MIPS
+ HAL changes
+ Fix for PR 20116
+
+1999-04-30 Jesper Skov <jskov@lassi.cygnus.co.uk>
+ PR 19945/19946 workaround
+ * tests/signal/signal2.c: Disabled test 3 for PowerPC sim.
+
+1999-04-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl:
+ Ensure all calls to cyg_libc_time_year_is_leap() are with the full
+ year, and not the direct contents of a struct tm, which are (year-1900)
+
+1999-04-19 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19308, 19410, 19528
+ * tests/time/clock.c (test): Also disable data cache which may
+ affect timing when tracing/assertions are enabled.
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ Add prototype for new cyg_libc_stdio_flush_all_but() function
+
+ * src/clibincl/stream.hxx:
+ Don't include stdiosupp.hxx any more to prevent circular dependency,
+ therefore manually provide _setvbuf prototype
+ Make sure pkgconf/kernel.h is included before mutex.hxx
+
+ * src/clibincl/stream.inl (Cyg_StdioStream::set_error()):
+ Add missing unlock_me()
+
+ * src/stdio/common/fflush.cxx:
+ Separate most of code for fflush(NULL) into separate
+ cyg_libc_stdio_flush_all_but() function, which has the extra
+ capability of omitting one stream
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Add missing clibincl/stdiosupp.hxx include
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::read()):
+ When reading, ensure we flush all output streams
+
+ * src/stdio/common/stream.cxx (Cyg_StdioStream::flush_output_unlocked):
+ Flush the device as well
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * src/clibincl/streambuf.inl:
+ * src/clibincl/streambuf.hxx:
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ * include/pkgconf/libc.h:
+ * include/stdio.inl (setbuf):
+ Fix dumb typo: BUFSIZE -> BUFSIZ
+ This fixes PR19837
+
+1999-04-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx (_setbuf):
+ * include/stdio.inl (setbuf):
+ Use _IONBF when buf==NULL, and _IOLBF otherwise.
+ Fix for PR 19836
+
+1999-04-15 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Tidy display string capitalization.
+
+1999-04-12 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Clarify CDL description of CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE
+
+ * tests/signal/signal2.c: Try harder to generate an exception by
+ accessing a misaligned address
+ Don't handle SIGTRAP any more
+ Part of fix for PRs 19731/19607
+
+1999-04-07 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19667
+ * src/support/mainthread.cxx:
+ Changed to use the new Cyg_Thread constructor.
+
+1999-04-07 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Use new macro
+ HAL_VSR_SET_TO_ECOS_HANDLER if defined, to wrest control from
+ CygMon, for example, by reinstalling eCos' default VSRs for
+ exceptions that we are provoking.
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx: Include stdlib.h for exit()
+ Fix for PR 19720
+
+1999-03-29 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/clock.c (test): Disable instruction cache
+ Hopefully fixes PR 19308
+
+1999-03-29 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c: Disabled test 3 for PPC as it cannot
+ trap division by zero.
+
+1999-03-26 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/main.cxx (main): Invoke cyg_user_start() if no kernel
+ Only sensible thing to do in our default main in a non-kernel config
+
+1999-03-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/time/time.c:
+ Increase MAX_TIMEOUT since the sparclite gets very close to overrunning
+ it even when working.
+ Should return -1 iff CYGSEM_LIBC_TIME_TIME_WORKING isn't defined
+ Cosmetic changes
+
+1999-03-25 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * tests/time/time.c (test): Take into account setting of
+ CYGSEM_LIBC_TIME_SETTIME_WORKING ie. does cyg_libc_time_settime()
+ work? If not, check that it returns an error.
+ This was exposed by the random combo in PR#19479.
+
+1999-03-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1 to
+ CYGIMP_...
+
+ Add another rand implementation CYGIMP_LIBC_RAND_SIMPLE1 which is
+ the default
+
+ Part of fix for PR 19562
+
+ * include/sys/cstartup.h:
+ Tidy and remove unnecessary dependencies
+
+ * src/stdlib/rand.cxx:
+ Rename algorithms from CYGSEM_... to CYGIMP_...
+ Add new "simple1" algorithm
+
+ * tests/ctype/ctype.c:
+ Tidy
+
+ * tests/stdlib/rand3.c:
+ Fix so that 0..RAND_MAX is split evenly over buckets, which it wasn't
+ before
+ Deal with case of RAND_MAX not being divisible by NUM_BUCKETS
+ exactly
+ Increase TEST_LENGTH to 200000 to provide more representative sample
+ Add CYG_TEST_INFO output to help ensure it doesn't time out
+ Tidy
+
+ * tests/stdlib/rand4.c:
+ Only fail if more than _two_ thirds (rather than one third) match.
+ This is because half would match for a perfectly random distribution
+ This is the rest of the fix for PR 19562
+ Cosmetic changes
+
+1999-03-22 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/mainthread.cxx (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ Use CYGNUM_HAL_STACK_SIZE_TYPICAL for the stack size instead of
+ CYGNUM_HAL_MINIMUM_STACK_SIZE.
+
+1999-03-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak: Add -Wno-format when building strftime otherwise
+ it generates warnings for things that we do want to test (null
+ string, and %y format)
+
+1999-03-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Put brackets back round negative number since sdf says the config
+ tool is fixed now (PR 19537)
+
+ Add new CYGSEM_LIBC_RAND_SIMPLEST and CYGSEM_LIBC_RAND_KNUTH1
+ options for different rand() algorithms in a so far failed attempt
+ to fix PR 19562
+
+ * src/stdlib/rand.cxx:
+ Add new optional algorithm from Knuth vol.2
+
+ * tests/stdlib/rand4.c:
+ Some tidies
+ Don't run test when using simplest algorithm
+
+ * tests/signal/signal2.c (main):
+ Don't try to make an FPE on tx39 - its possible to detect but requires
+ too much HAL work to be sensible
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Use HAL_ENABLE_INTERRUPTS() rather than kernel to enable interrupts
+
+1999-03-18 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/PKGconf.mak (TESTS): added rand4 compilation.
+
+ * tests/stdlib/rand4.c: added this test for periodicity in the
+ least significant bit of rand().
+
+1999-03-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Remove CYGFUN_LIBC_TIME_POSIX dependency
+ on CYGPKG_LIBC_STDIO
+
+ * src/stdlib/itoa.cxx:
+ New file to convert integers to ascii
+
+ * include/stdlib.h:
+ Add proto for new cyg_libc_itoa() function
+
+ * include/time.inl:
+ Rework __asctime_r() to use memcpy() and cyg_libc_itoa() rather than
+ sprintf()
+
+ * src/PKGconf.mak:
+ Build stdlib/itoa.cxx
+
+ The above changes fix PR 19448
+
+1999-03-17 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h: Add #define of __time_t_defined to placate newlib
+ if it is used by accident. This is just a temporary workaround though.
+
+1999-03-16 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/PKGconf.mak: Add compile option to step around ARM compiler bug.
+
+1999-03-16 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_TIME_DST_DEFAULT_STATE):
+ Don't use parentheses for now
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Silence bogus compiler warning
+
+1999-03-16 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Enable SIGSEGV test for
+ i386/Linux.
+
+
+1999-03-15 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/signal/siginit.cxx (cyg_libc_signals_hwexcept_handler):
+ Only enable interrupts if they were disabled
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx:
+ Add FIX ME line as a reminder that the workaround there can go away
+ in future
+
+ * include/pkgconf/libc.h:
+ Add proper define for CYGSEM_LIBC_EXIT_CALLS_FFLUSH
+ Put brackets round negative CYGNUM_LIBC_TIME_DST_DEFAULT_STATE define
+ Fix run time typo
+
+ * include/time.inl (__localtime_r):
+ Include sys/timeutil.h before this to get
+ cyg_libc_time_normalize_structtm()
+
+1999-03-12 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/sys/timeutil.h:
+ * src/time/timeutil.cxx: Remove 'const' from char arrays since
+ this fails [silently] on ARM when -fwritable-strings (PR19440)
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/signal/signal2.c (main): Compiler warnings fix was
+ slightly broken.
+
+1999-03-12 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c (main):
+ Disabling SIGTRAP handling on i386/Linux is not a good idea.
+1999-03-11 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19473
+ * tests/signal/signal2.c:
+ Added compiler warnings fix.
+ Added N/A handling for i386/Linux.
+
+1999-03-10 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Force "haldiag" device to be present.
+ 'asctime' and friends need 'stdio' as well.
+
+ * include/time.inl: Fix syntax error on difftime() declaration.
+
+1999-03-08 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx: <cyg/infra/cyg_ass.h> needed for this file.
+
+ * src/stdio/common/vsscanf.cxx (str_read): Fix problem with string
+ pointer [created by merge with new I/O package].
+
+1999-03-05 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add legal values for CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET
+ and CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET.
+
+1999-03-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.inl (cyg_libc_time_year_is_leap):
+ Fix bug with modulo year 400
+ Fix typo in asctime_r macro
+ Fix gmtime_r, and mktime as a result of testing
+
+ * tests/time/asctime.c, tests/time/ctime.c, tests/time/gmtime.c,
+ tests/time/gmtime.c, tests/time/localtime.c, tests/time/mktime.c,
+ tests/time/strftime.c, tests/time/time.c:
+ New tests
+
+ * tests/PKGconf.mak:
+ Build above new tests
+
+ * include/pkgconf/libc.h:
+ Add reminder FIX ME about extra config option
+
+ * src/time/strftime.cxx:
+ Fix %w and %Y parameters as a result of testing
+
+ * src/time/timeutil.cxx:
+ Fix cyg_libc_time_normalize_structtm() as a result of testing
+ of mktime()
+
+ * tests/time/clock.c:
+ Reformat, remove obsolete bits and tidy
+
+ * include/time.h:
+ Add Cyg_libc_time_dst type and new functions
+ cyg_libc_time_setzoneoffsets(), cyg_libc_time_setdst(),
+ cyg_libc_time_getzoneoffsets(), cyg_libc_time_settime()
+
+ * include/time.inl:
+ Implement the above functions. This allows us to adjust for timezone
+ diffences and set the time.
+ Change localtime() to adjust for STD/DST
+ Change mktime() to adjust for STD/DST
+
+ * include/libc.h:
+ Add new config options CYGSEM_LIBC_TIME_SETTIME_WORKING
+ and component CYGPKG_LIBC_TIME_ZONES containing options
+ CYGNUM_LIBC_TIME_DST_DEFAULT_STATE,
+ CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET,
+ CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET
+
+ * src/strftime.cxx:
+ Adjust handling of %Z to _not_ deal with STD/DST
+
+ * src/time/settime.cxx:
+ New file to implement cyg_libc_time_settime()
+
+ * src/PKGconf.mak:
+ Build settime.cxx
+
+ * src/time/timeutil.cxx:
+ Supply outline versions of cyg_libc_time_setzoneoffsets(),
+ cyg_libc_time_setdst(), and cyg_libc_time_getzoneoffsets()
+ Add variables for STD/DST state
+ Some minor comment changes
+
+ * include/errno.h:
+ Use CYGBLD_ATTRIB_CONST instead of __attribute__((const)) directly
+
+ * include/signal.h:
+ Change format of function comment headers
+
+ * include/signal.inl:
+ Restrict errno.h inclusion to when its actually used
+ Fix a spelling typo
+
+ * include/stdlib.h:
+ Add CYGBLD_ATTRIB_CONST to abs, div, labs, ldiv
+
+ * include/stdlib.inl:
+ Reformat and tidy
+ Include new versions of div and ldiv which are more portable and
+ are cleanly rewritten so aren't covered by the BSD licence, which
+ is now removed
+
+ * src/stdlib/div.cxx, src/stdlib/ldiv.cxx:
+ Non-inline, non-BSD and portable versions of the new versions of div
+ and ldiv from stdlib.inl
+
+ * include/time.h:
+ Much reformatting, tidying and improving comments
+ Change CLOCKS_PER_SEC from 1000 to 1000000
+ Add new functions asctime_r, ctime_r, gmtime_r, localtime_r, clock,
+ difftime, mktime, time, asctime, ctime, gmtime, localtime, strftime
+ Include new time.inl file
+
+ * include/pkgconf/libc.h:
+ Add new options CYGSEM_LIBC_TIME_CLOCK_WORKING,
+ CYGSEM_LIBC_TIME_TIME_WORKING, CYGFUN_LIBC_TIME_POSIX,
+ CYGNUM_LIBC_TIME_CLOCK_TRACE_LEVEL, CYGIMP_LIBC_TIME_ASCTIME_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_INLINE, CYGIMP_LIBC_TIME_DIFFTIME_INLINE,
+ CYGIMP_LIBC_TIME_GMTIME_INLINE, CYGIMP_LIBC_TIME_LOCALTIME_INLINE,
+ CYGIMP_LIBC_TIME_MKTIME_INLINE, CYGIMP_LIBC_TIME_ASCTIME_R_INLINE,
+ CYGIMP_LIBC_TIME_CTIME_R_INLINE, CYGIMP_LIBC_TIME_GMTIME_R_INLINE,
+ and CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE
+
+ * time/asctime.cxx, time/asctime_r.cxx, time/clock.cxx, time/ctime.cxx,
+ time/ctime_r.cxx, time/difftime.cxx, time/gmtime.cxx,
+ time/gmtime_r.cxx, time/localtime.cxx, time/localtime_r.cxx,
+ time/mktime.cxx, time/strftime.cxx, time/time.cxx, time/timeutil.cxx,
+ include/time.inl:
+ New files to implement the new time functions. Many of them simply
+ provide the outline definitions, but the real body of the function
+ comes from time.inl
+
+ * src/PKGconf.mak:
+ Build new .cxx files
+
+ * src/clibincl/stdlibsupp.hxx:
+ Remove _div and _ldiv prototypes since they're no longer needed
+
+ * src/clibincl/timesupp.hxx:
+ Delete as its now obsolete
+
+ * src/time/clock.cxx:
+ Use new CYGSEM_LIBC_TIME_CLOCK_WORKING option to control whether it
+ just returns (clock_t)-1 or not.
+ Much reformatting and tidying
+ Change real imlpementation from _clock to __clock
+ Use CYGBLD_ATTRIB_WEAK_ALIAS now
+
+ * tests/stdlib/div.c, tests/stdlib/ldiv.c:
+ Add some extra tests for handling of negative numbers
+ Reformat and tidy a bit, including removing the test for CYGPKG_LIBC
+ since its now always defined if the test is to be compiled
+
+ * tests/time/clock.c:
+ Remove duplication CYG_TEST_INFO line
+ Check if unimplemented using "(clock_t)-1" and not just "-1"
+
+1999-03-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx:
+ Make sure system() is a weak alias for __system()
+
+ * include/pkgconf/libc.h: Rework CDL description for
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE and change its default to
+ "/dev/haldiag"
+
+ * src/stdio/common/stream.cxx:
+ Check that dev is valid when passed to stream constructor
+
+ * src/stdio/common/stdiosupp.cxx:
+ Tidy
+
+ * src/support/mainthread.cxx: Make this depend on
+ CYGSEM_LIBC_STARTUP_MAIN_THREAD rather than just CYGPKG_KERNEL
+
+1999-03-04 Gary Thomas <gthomas@cygnus.co.uk>
+
+ Merged in changes from 'ecos-new_devs-19990216-branch'
+
+ (1999-02-24 Jonathan Larmour <jlarmour@cygnus.co.uk>)
+
+ * src/stdio/common/stream.cxx:
+ Add "fix me" comments and remove a couple of commented out lines
+
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/vsscanf.cxx:
+ Revert to using pointer to string for private data, not just string.
+ This preserves the state across multiple calls
+
+ (1999-02-24 Gary Thomas <gthomas@cygnus.co.uk>)
+
+ * src/stdio/common/vsscanf.cxx:
+ * src/stdio/common/vsnprintf.cxx:
+ * src/stdio/common/stream.cxx:
+ * src/stdio/common/stdiosupp.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/clibincl/stream.inl:
+ * src/clibincl/stream.hxx:
+ * src/clibincl/stdiosupp.hxx:
+ * include/pkgconf/libc.h: Changes for new I/O system.
+
+1999-03-03 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atexit.c: Forgot to config atexit test for
+ CYGFUN_LIBC_ATEXIT option
+
+ * include/pkgconf/libc.h:
+ Require CYGVAR_KERNEL_THREADS_DATA for CYGSEM_LIBC_PER_THREAD_STRTOK
+ This fixes PR 19362
+ Require CYGPKG_KERNEL for thread safe streams
+ Also don't need "requires CYGPKG_KERNEL" for per-thread rand and errno
+ if we already require a finer granularity kernel option
+
+1999-02-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h: Fix CYGNUM_LIBC_MAIN_STACK_SIZE by changing
+ CYGPKG_LIBC_STARTUP_MAIN_THREAD -> CYGSEM_LIBC_STARTUP_MAIN_THREAD
+ Fix for PR 19304
+
+1999-02-23 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/system.cxx: Add to implement trivial system() call
+ * include/stdlib.h: Add system() prototype
+ * src/PKGconf.mak: Build system.cxx
+
+ * tests/ctype/ctype.c, tests/i18n/setlocale.c, tests/setjmp/setjmp.c,
+ tests/signal/signal1.c, tests/signal/signal2.c,
+ tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdio/stdiooutput.c, tests/stdlib/atexit.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/getenv.c, tests/stdlib/labs.c,
+ tests/stdlib/ldiv.c, tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/realloc.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+ Use CYG_TEST_NA() macro for non-applicable test configurations
+
+1999-02-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/signal.h:
+ * include/signal.inl:
+ * src/signal/raise.cxx:
+ * src/signal/siginit.cxx:
+ * src/signal/signal.cxx:
+ * tests/signal/signal1.c
+ * tests/signal/signal2.c:
+ New files to implement ISO standard signals
+
+ * src/PKGconf.mak (TESTS):
+ * tests/PKGconf.mak (TESTS):
+ Update to build new files above
+
+ * include/stdlib.h:
+ * src/clibincl/stdlibsupp.hxx:
+ Comment and QA changes (including giving better names to some types)
+
+ * include/libc.h:
+ Add new configuration options for signals
+ Add new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+ Add a note to CYGNUM_LIBC_MAIN_STACK_SIZE option that it may be
+ overriden by HAL
+ Add new CYGFUN_LIBC_ATEXIT option and move ...ATEXIT_HANDLERS under
+ it
+ Add new CYGSEM_LIBC_EXIT_CALLS_FFLUSH option
+ Require CYGSEM_LIBC_STARTUP_MAIN_THREAD for "Invoke default static
+ constructors" option
+
+ * src/stdlib/atexit.cxx:
+ Support above CYGFUN_LIBC_ATEXIT and QA changes
+
+ * src/stdlib/exit.cxx:
+ Support for above new libc.h options, and some QA changes
+
+ * src/support/cstartup.cxx:
+ Add support for new CYGSEM_LIBC_STARTUP_MAIN_THREAD option
+
+ * src/support/mainthread.cxx:
+ Override main stack size if the HAL has a minimum
+
+ * src/string/strncpy.cxx:
+ Use improved algorithm for aligned copies - imported from newlib
+ QA changes
+
+ * src/stdlib/abort.cxx:
+ Support raise(SIGABRT), and some QA
+
+ * include/errno.h:
+ Add const attribute
+
+ * tests/stdlib/abs.c:
+ QA improvements
+
+1999-02-04 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Only define cyg_libc_main_thread when
+ the kernel is around.
+
+1999-02-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/time/clock.c: Joined the two test/NOP checks into
+ one.
+ Increased tolerance in attempt to fix PRs 18737,18787,18846.
+ Fixed typo.
+
+1999-01-28 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ * src/stdlib/rand.cxx:
+ Include <pkgconf/kernel.h> if we use kernel header files
+
+1999-01-25 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c (test):
+ CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT should be
+ CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT
+ Fix for PR 18786
+
+ * src/string/strtok.cxx:
+ * src/stdio/common/stdiofiles.cxx:
+ * src/errno/errno.cxx:
+ * src/stdlib/rand.cxx:
+ Give mutex protection objects a libc constructor priority
+
+ * src/support/invokemain.cxx:
+ Add prototype for cyg_hal_invoke_constructors()
+
+ * src/support/mainthread.cxx:
+ Give cyg_libc_dummy_constructor_obj a libc constructor priority,
+ and make its class have a public constructor
+
+ * src/stdio/common/stderr.cxx:
+ * src/stdio/common/stdout.cxx:
+ * src/stdio/common/stdin.cxx:
+ Give cyg_libc_stdio_stdin/out/err static objects a libc constructor
+ priority
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ * src/clibincl/stream.hxx (class Cyg_StdioStream):
+ Remove private copy constructor. Needed to make prioritised
+ static constructors work. Fix for PR 18898
+
+1999-01-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx:
+ Include pkgconf/kernel.h otherwise it fails with per-thread errno
+ enabled
+
+ * include/pkgconf/libc.h:
+ Enable per-thread errno by default since that is what POSIX would
+ want
+
+ * tests/time/clock.c (test):
+ Placate compiler by initializing clock_first/second/third anyway,
+ even though they won't be in practice. This is only a test program
+ so adding an extra instruction doesn't matter.
+
+ * src/i18n/locale.cxx (_setlocale):
+ Placate compiler, since it is dumb, by nesting, not serializing, if's
+ This is an idempotent change, but screws up the formatting :-(.
+
+ * src/string/strpbrk.cxx (_strpbrk):
+ Change while loop to do loop to placate compiler. It'll even save an
+ instruction too (wow!)
+
+1999-01-22 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add closing curly brace to CYGPKG_LIBC_STRING_STRTOK definition
+
+1999-01-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h:
+ Tidy up and add to header description
+ Change cyg_get_errno_p() to cyg_libc_get_errno_p()
+ Remove ifdef CYGPKG_LIBC
+
+ * include/sys/file_if.h:
+ Remove - move contents to stdio.h
+
+ * include/stdio.h:
+ Tidy up header description
+ Move FILE typedef here from sys/file_if.h
+ SEEK_SET, SEEK_CUR, SEEK_END defined to 0, 1, 2 respectively
+ for backwards compatibility with old UNIX
+ Change definitions of stdin/out/err to be addresses of FILE
+ globals - even though they're actually Cyg_StdioStream it'll work
+
+ * include/pkgconf/libc.h:
+ Make CYGPRI_LIBC_WEAK et al macros depend on new ones in infra
+ Reorganise trace options under the individual components they are
+ associated with.
+ Reorganise thread-safety options under the individual components
+ they are associated with.
+ Add new CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS option
+ Misc. reformatting
+ Remove dependency on pkgconf/kernel.h - Configuration Tool will
+ generate check macros anyway.
+ Remove CYGPKG_LIBC_TRACE, CYGFUN_LIBC_strtok, CYGPKG_LIBC_RAND
+ options
+ Tidy up description header
+
+ * src/clibincl/clibdata.hxx:
+ * src/clibincl/clibdata.inl:
+ * src/support/clibdata.cxx:
+ Remove and instead rely on each component to initialise its own data
+
+ * src/clibincl/stdiofiles.hxx, src/clibincl/stdiofiles.inl:
+ New files to contain global file list and lock (if applicable).
+ Implemented as class with member access functions
+
+ * src/errno/errno.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Rename cyg_get_errno_p() to cyg_libc_get_errno_p()
+
+ * src/stdio/common/fclose.cxx:
+ * src/stdio/common/fflush.cxx:
+ * src/stdio/common/fopen.cxx:
+ * src/stdio/common/freopen.cxx:
+ Remove ifdef CYGPKG_LIBC
+ Use new global file access method from stdiofiles.hxx
+ Tidy up description header
+ Use new CYGBLD_ATTRIB_WEAK_ALIAS
+ Access errno "normally" rather than clibdata way
+
+ * src/stdio/common/stdin.cxx:
+ * src/stdio/common/stdout.cxx
+ * src/stdio/common/stderr.cxx:
+ New files. Implement Cyg_StdioStream objects for each stream. In
+ separate self-contained files so using one doesn't bring in the
+ others
+
+ * src/stdio/common/stdiofiles.cxx:
+ New file. Implements global files array and lock
+
+ * src/stdlib/_exit.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Use infra CYGBLD* macros
+
+ * src/stdlib/malloc.cxx:
+ Tidy up description header
+ Remove ifdef CYGPKG_LIBC
+ Add pkgconf/kernel.h now that pkgconf/libc.h doesn't have it
+ Use infra CYGBLD* macros
+ Make pool visible externally with weak attribute and new name
+ cyg_libc_malloc_memorypool
+
+ * src/stdlib/rand.cxx:
+ * src/stdlib/strtok.cxx:
+ Reorganise with self-contained per-thread data, if applicable
+ Remove ifdef CYGPKG_LIBC
+ Tidy up description header
+ Use infra CYGBLD* macros
+
+ * src/support/cstartup.cxx:
+ Split into smaller files to make selective linking work better,
+ fix i386 port problem and make GDB happy
+
+ * src/support/environ.cxx:
+ * src/support/invokemain.cxx:
+ * src/support/main.cxx:
+ * src/support/mainthread.cxx:
+ New files from bits of the old cstartup.cxx
+ Add support for CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
+
+ * src/PKGconf.mak:
+ Update to reflect file additions/deletion
+
+ * tests/stdlib/rand1.c:
+ * tests/stdlib/rand2.c:
+ * tests/stdlib/rand3.c:
+ * tests/stdlib/srand.c:
+ Make conform to coding standards
+ Remove ifdef CYGPKG_LIBC_RAND
+ Tidy up description header
+
+ * tests/string/strtok.c:
+ Make conform to coding standards
+ Remove ifdef CYGFUN_LIBC_strtok
+ Tidy up description header
+
+1999-01-15 Mark Galassi <rosalia@cygnus.com>
+
+ * tests/stdlib/getenv.c (main): added tests for the case in which
+ the user does not supply environ and in which the user supplies a
+ NULL environ.
+
+1999-01-15 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Added workaround for weak aliasing
+ problem in i386 gcc.
+
+
+1999-01-15 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_MAIN_STACK_SIZE):
+ (CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE): Change defaults to be
+ more reasonable on small systems.
+
+1999-01-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Minor bug with environ not being initialised correctly by
+ default
+
+1998-12-24 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (Cyg_StdioStream):
+ check_this() member functions should now be const
+
+1998-12-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx (_memchr):
+ treat search value parameter to memchr as an unsigned byte,
+ not a signed int - copied fix from newlib PR 18471
+
+1998-12-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/realloc.c:
+ * tests/stdlib/malloc3.c:
+ * tests/stdlib/malloc2.c:
+ Warning cleanup
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c, tests/stdlib/malloc3.c,
+ tests/stdlib/realloc.c:
+ Only run these tests when we have a coalescing memory allocator
+
+1998-12-14 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Only check buffer init success if buffering
+
+ * src/stdio/common/streambuf.cxx (set_buffer):
+ Check for diff of requested size against buffer_size, not
+ get_buffer_size(), since this may return -1, which won't be
+ equal to size, and will cause malloc to be called
+
+1998-12-01 Jesper Skov <jskov@cygnus.co.uk>
+
+ * tests/stdlib/getenv.c (main): Don't declare variables when they
+ are not used.
+
+Thu Nov 26 17:59:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/string/strncpy1.c:
+ Fix off-by-one error since it called my_strcmp() and not
+ my_strncmp(), which meant in included the trailing NULL when it
+ shouldn't have.
+
+1998-11-26 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/stdlib/qsort.cxx (_qsort):
+ * src/stdlib/rand.cxx (_srand):
+ Changed CYG_REPORT_FUNCNAMETYPE to CYG_REPORT_FUNCNAME in void
+ functions.
+
+Mon Oct 26 18:49:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/cstartup.cxx (cyg_libc_dummy_main):
+ Silence compiler warning with cast of char * to CYG_ADDRWORD
+
+Wed Oct 28 17:31:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clock.cxx (_clock):
+ Reorder scaling expression as it was both incorrect and risked
+ overflow.
+ Fix for PR 18076
+
+Mon Oct 19 14:40:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.h (EOF):
+ Change from -64 to (-1), to allow broken code to work :-/
+ Also change other negative defines to be within parentheses
+
+1998-10-19 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated the doc URL
+
+Thu Oct 15 21:33:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Only include kernel thread headers when we're in thread-safe mode
+
+ * src/time/clock.cxx:
+ Only include kernel clock headers if there's a kernel with the
+ right functionality available
+
+ * tests/time/clock.c:
+ Remove unnecessary inclusion of <pkgconf/kernel.h>
+
+ Above changes are required for PR 17229
+
+Wed Oct 14 16:38:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise inclusion of clibincl/stdiosupp.hxx and
+ clibincl/stream.hxx. Tidying up PR 17502
+
+Wed Oct 14 14:08:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Rename CYGPKG_LIBC_STRING_OPTIMISATIONS to
+ CYGPKG_LIBC_STRING_OPTIMIZATIONS to make it truely merkin.
+
+Tue Oct 13 19:34:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGDAT_LIBC_ARGUMENTS):
+ Add a default argv[0] of "" as many programs assume argc>0
+ The standard allows argv[0] to be "" if the program name
+ is not available
+
+1998-09-26 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/stdiosupp.hxx:
+ PR 17502: this header file now does nothing if the stdio option
+ is disabled completely. This is the same behaviour is
+ clibincl/stream.hxx, although arguably the #ifdef protection
+ should happen wherever the header file is #include'd rather than
+ in the header file itself.
+
+ * src/clibincl/clibdata.hxx:
+ PR 17502: this header file still #include's internal stdio-related
+ header files and references the FILE structure, even if stdio is
+ disabled. There were some #ifdef's for CYGPKG_LIBC_STDIO already.
+ One more has been added for _fopen() and _fclose().
+
+1998-09-25 Bart Veer <bartv@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl (Cyg_StdioStreamBuffer):
+ PR 17487: Reorder the calls to initialize member fields, to
+ eliminate a compiler warning.
+
+Fri Sep 25 19:04:29 1998 Jonathan Larmour <jlarmour@peshwari.cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/string/strtok.cxx,
+ src/time/clock.cxx:
+ Only define tracing variable and tracing level macro when
+ the relevant tracing level config options are set. Otherwise
+ keep the tracing level fixed at 0
+ Fix for PR 17476
+
+ * include/pkgconf/libc.h:
+ Define trace levels only if parent CYGPKG_LIBC_TRACE is defined
+ for consistency with Configuration Tool
+
+
+Fri Sep 25 17:24:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Make definition of vscanf() dependent on CYGFUN_LIBC_STDIO_ungetc
+ otherwise _vfscanf() won't be compiled. This therefore would
+ cause a link fail iff selective linking is not enabled.
+ Fix for PR 17455
+
+Fri Sep 25 17:23:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/rand.cxx:
+ Make compilation dependent on CYGPKG_LIBC_RAND
+ Fix for PR 17473
+
+ * tests/stdlib/srand.c:
+ Make definition of dummy test pass conditional on CYGPKG_LIBC_RAND
+ not being defined, as well as CYGPKG_LIBC
+ Caused compilation failure when testing PR 17473 fix
+
+Mon Sep 21 17:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Make sscanf test conditional on CYGFUN_LIBC_STDIO_ungetc since
+ _vfscanf() only gets compiled if this is defined
+ Fix for PR 17346
+
+1998-09-20 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: updated CDL doc strings.
+
+Fri Sep 18 22:18:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_errno_p):
+ Rather than this function only being available in thread-safe mode,
+ instead make what it returns be either the per-thread errno, or
+ global errno depending on the configuration.
+ Include <errno.h> (conditionally) to support this change
+
+Wed Sep 16 11:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove "fix me" comment which I forgot to remove before
+
+Tue Sep 15 19:27:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Updated descriptions and a few other minor things after review.
+ Notably though, the NDEBUG config option has been removed
+
+1998-09-15 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ PR 17201: removed dependency on CYGPKG_KERNEL in the option
+ CYGNUM_LIBC_MAIN_STACK_SIZE, since the actual dependencies cannot
+ be expressed sensibly in the current system.
+
+1998-09-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Sorting out dependencies for error package.
+
+1998-09-10 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libc.h: started adding doc fields to the
+ cdl_package data, as a pilot for now.
+
+Wed Sep 9 17:41:23 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add option CYGIMP_LIBC_MALLOC_CXX_DELETE_CALLS_FREE to explicitly
+ control whether the empty delete functions (currently) in
+ kernel/.../common/delete.cxx are enabled; controls code bloat, see
+ the comments in delete.cxx.
+
+Fri Sep 4 16:43:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add a default CYG_TEST_PASS() to make sure the test infra doesn't
+ complain.
+ Also remove the unused string functionsa
+
+Fri Sep 4 15:43:48 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdlib/exit.cxx (__libc_exit):
+ * src/stdlib/_exit.cxx (__libc__exit):
+ * src/stdlib/malloc.cxx (_free):
+ * src/stdlib/abort.cxx (abort):
+ * src/support/cstartup.cxx (invoke_main):
+ Tracing system asserted cos it was being called incorrectly; these
+ are void functions so you shouldn't give a type to the function
+ reporting call.
+
+Fri Sep 4 15:03:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Fix CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE description to refer to
+ the table.cxx file, not table.h
+
+Fri Sep 4 14:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add description for CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE since
+ Proven won't be making any changes to the device driver
+ implementation after all.
+ Fix for PR 17148
+
+ * src/clibincl/stream.inl (set_position):
+ Remove "fix me" line. It is obvious that this will have to change
+ with a filesystem interface
+ Fix for PR 17147
+
+ * src/stdio/common/freopen.cxx:
+ Remove "fix me" - I know about this issue
+ Fix for PR 17145
+
+ * src/stdio/common/stream.cxx (read):
+ Remove "fix me" and change to use memcpy
+ Fix for PR 17144
+
+Fri Sep 4 14:36:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Actually add it this time!
+
+Fri Sep 4 13:48:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/stdiooutput.c:
+ Add new tests for misc stdio output functions
+
+ * tests/PKGconf.mak:
+ Build stdiooutput.c test
+
+Fri Sep 4 12:52:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl (write_byte):
+ Remove bogus assert
+
+ * tests/stdlib/getenv.c (main):
+ Check whether str is NULL before doing a strcmp()
+
+ * tests/stdio/sprintf2.c (main):
+ Reformat to 76 columns
+
+Fri Sep 4 02:10:54 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/stdio/common/stream.cxx:
+ Add new peek_byte method to Cyg_StdioStream
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix up buffer access to work with new peek_byte method above
+ Fix for PR 16954
+
+Thu Sep 3 19:40:11 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/rand1.c, tests/stdlib/rand2.c,
+ tests/stdlib/rand3.c:
+ Add extra check for CYGPKG_LIBC_RAND to decide whether the test
+ is applicable or not
+
+ * tests/stdlib/rand2.c (test):
+ Use CYGNUM_LIBC_RAND_SEED for default seed, not 1
+
+ * tests/string/strtok.c:
+ Add extra check for CYGFUN_LIBC_strtok to decide whether the
+ test is applicable or not
+
+Wed Sep 2 19:11:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/fread.cxx, src/stdio/output/fwrite.cxx:
+ Add fread() and fwrite() functions
+
+ * src/PKGconf.mak:
+ Build fread.cxx and fwrite.cxx from above
+
+ * src/stdio/common/stream.cxx:
+ Reformat to 76 columns
+ In write(), move initialisation of *bytes_written to start
+ In read(), move initialisation of *bytes_read to start
+
+ * include/stdio.h:
+ Reformat to 76 columns
+
+ Replace all references to the ANSI
+ standard to instead by the ISO C standard
+
+ Add commented argument names for "documentation"
+
+ Add fread() and fwrite() prototypes
+
+ * src/clibincl/stdiosupp.hxx:
+ Copy the above changes from stdio.h, and add _fread() and _fwrite()
+ prototypes
+
+ * src/stdio/output/fputs.cxx, src/stdio/input/fgets.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 15:41:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 14:46:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Use trylock_me() instead of lock_me(), and loop to prevent
+ deadlocks
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl:
+ Add trylock_me() method
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/fflush.cxx:
+ Reformat to 76 columns
+
+Wed Sep 2 12:24:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change 0x7fff to 0x7fffffff. Oops!
+ give main stack size option a legal_values field
+ Undefine tracing by default
+ Add some more description in the header
+
+Tue Sep 1 20:02:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/i18n/setlocale.c (cyg_package_start):
+ Fix typo - extra "x" for no reason at all! :-)
+
+Tue Sep 1 19:44:58 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx:
+ Fix bug in find_locale_data() that miscalculated size of
+ all_locales
+
+ Make find_locale_data() match the locale "" and add some
+ other things in _setlocale() to ensure that "C" gets returned
+ when the default locale "" is passed.
+
+ Only check the locale pointer when it is non-NULL
+
+ * tests/i18n/setlocale.c:
+ New tests for setlocale()
+
+ * tests/PKGconf.mak:
+ Update to build setlocale.c test
+
+ * src/support/cstartup.cxx:
+ Don't actually call system default main() "main" otherwise GDB
+ gets confused and thinks its the entry point. Instead make a weak
+ alias and call the real function something different.
+
+Tue Sep 1 18:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/i18n/locale.cxx (_setlocale):
+ Fix tracing macro name and remove "str maybe used before
+ initialised" warning
+
+ * tests/stdlib/qsort.c:
+ Correct file description header
+
+Tue Sep 1 17:04:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/locale.h, src/clibincl/i18nsupp.hxx, src/i18n/locale.cxx:
+ New files to add support for locales as defined by the ISO C
+ standard. i.e. setlocale() and localeconv() functions and some
+ other bits
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAX_LOCALE_NAME_SIZE config option for locale
+ support
+
+ * src/PKGconf.mak:
+ build locale.cxx
+
+ * include/errno.h, src/clibincl/ctypesupp.hxx:
+ Tidy up to 76 columns
+
+Tue Sep 1 00:24:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Move environment-related options from stdlib into new
+ CYGPKG_LIBC_STARTUP component. Also add options for main()'s
+ arguments (CYGPKG_LIBC_ARGUMENTS), main()'s default stack size
+ (CYGNUM_LIBC_MAIN_STACK_SIZE), number of atexit handlers
+ (CYGNUM_LIBC_ATEXIT_HANDLERS), and whether _exit() stops the
+ system (CYGSEM_LIBC_EXIT_STOPS_SYSTEM).
+
+ * src/clibincl/stdlibsupp.hxx:
+ Fix a few comment bugs, and add new
+ cyg_libc_invoke_atexit_handlers() function prototype
+
+ * src/stdlib/_exit.cxx, src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Implement exit(), atexit() and _exit() correctly now. Also
+ includes cyg_libc_invoke_atexit_handlers() in atexit.cxx. Now
+ we get the correct behaviour of atexit(), and exit() invokes the
+ atexit handlers and fflushs all the stdio streams. Add plenty of
+ tracing of asserts too.
+
+ * src/support/cstartup.cxx:
+ Make main_thread object an exported global. Allow user-settable
+ arguments. Add MUCH more tracing and asserts. Improve comments.
+ Tidy up to 76 columns
+
+ * tests/stdlib/atexit.c:
+ Add simple test for atexit() and it calling registered functions
+
+ * tests/PKGconf.mak:
+ Build atexit.c test
+
+Mon Aug 31 18:54:48 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/getenv.cxx, tests/stdlib/getenv.c:
+ Add support for getenv(), and some tests to ensure it works
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update to include getenv.cxx and getenv.c test
+
+ * src/clibincl/clibdata.hxx:
+ remove prototype for environ - we expect files needing it to
+ define it themselves
+
+ * src/support/clibdata.cxx:
+ Tidy up to 76 columns and add definition of char **environ, but
+ with a configurable initialiser (see libc.h below)
+
+ * tests/stdlib/abs.c (main):
+ Tidy up to 76 columns
+
+ * src/stdlib/malloc.cxx:
+ Tidy up to 76 columns and remove warning for undefined _memcpy()
+ by changing to memcpy(), and casting away signedness
+
+ * include/pkgconf/libc.h:
+ Add CYGPKG_LIBC_ENVIRONMENT and CYGDAT_LIBC_DEFAULT_ENVIRONMENT
+ configuration options
+
+ * include/pkgconf/libc.h, src/clibincl/clibdata.hxx:
+ Tidy up to 76 columns
+
+ * include/stdlib.h:
+ Add getenv() prototype and tidy up to 76 columns
+
+ * src/clibincl/stdlibsupp.hxx:
+ Add _getenv() prototype
+
+Mon Aug 31 13:37:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Add realloc()
+
+ * tests/stdlib/realloc.c:
+ Add this file to test new realloc() functionality
+
+ * tests/PKGconf.mak:
+ Build realloc test
+
+ * tests/stdlib/malloc3.c (main), tests/stdlib/malloc2.c (main),
+ tests/stdlib/malloc1.c (main):
+ Conditionalise local vars to prevent warnings
+
+ * tests/stdlib/malloc3.c (fill_with_data):
+ Move '{' into "verb" line
+
+ * include/pkgconf/libc.h:
+ Require infra tracing support to allow tracing
+
+ * include/stdlib.h:
+ Add realloc()
+
+ * src/clibincl/stdlibsupp.hxx:
+ Update the commented argument names from stdlib.h, including realloc()
+
+1998-08-28 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ * src/clibincl/clibdata.hxx, src/time/clock.cxx:
+
+ Updated for new kernel configuration option symbol names
+
+Fri Aug 28 19:18:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ Changed the entry below to sat "tx39" instead of "mn10300".
+ It's been a long week.
+
+Fri Aug 28 18:59:20 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/support/cstartup.cxx: Add a weakly named main to allow the
+ default configuration to link on the tx39 which has no
+ scalextric linking yet. The static Cyg_Thread main_thread object
+ below continues to exist, though unreferenced, so all its
+ descendants must exist too.
+
+Fri Aug 28 08:54:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h:
+ Add commented argument names Add exit(), and atexit(). And move
+ these along with abort() and _exit() to a new section.
+
+ * src/stdlib/atexit.cxx, src/stdlib/exit.cxx:
+ Add trivial versions of atexit() and exit()
+
+ * include/pkgconf/libc.h:
+ Add CYGNUM_LIBC_MAIN_STACK_SIZE config option
+
+ * include/sys/cstartup.h, src/support/cstartup.cxx, src/PKGconf.mak:
+ New files to provide a new function cyg_iso_c_support(), which
+ invokes main "correctly".
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c,
+ tests/stdlib/malloc3.c, tests/stdlib/qsort.c, tests/stdlib/rand1.c,
+ tests/stdlib/rand2.c, tests/stdlib/rand3.c, tests/stdlib/srand.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcoll2.c, tests/string/strcpy1.c,
+ tests/string/strcpy2.c, tests/string/strcspn.c,
+ tests/string/strlen.c, tests/string/strncat1.c,
+ tests/string/strncat2.c, tests/string/strncpy1.c,
+ tests/string/strncpy2.c, tests/string/strpbrk.c,
+ tests/string/strrchr.c, tests/string/strspn.c,
+ tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c,
+ tests/time/clock.c:
+
+ Modify all tests to use new startup mechanism, and cyg_iso_c_start()
+
+Fri Aug 28 00:29:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx:
+ Add #ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO around all accesses to
+ flags.last_buffer_op_was_read. Fix for PR 16997
+
+Thu Aug 27 01:12:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/sys/file_if.h:
+ Fix comments and remove cyg_get_file_star()
+
+Wed Aug 26 20:24:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Remove #define CYGPKG_LIBC is that is meant to live in
+ <pkgconf/system.h> after all
+
+Wed Aug 26 19:39:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ More fixes to CDL stuff to make it work better, and look better on
+ the screen
+
+Tue Aug 25 20:21:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Make some fixes after running the ConfigTool
+
+Tue Aug 25 16:46:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h (CYGNUM_LIBC_STDIO_BUFSIZE):
+ Fix typo of CYGNUM_LIBC_STDIO_BUFSIZE
+
+Tue Aug 25 15:10:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Tidy up CDL stuff a bit more, prior to checking it actually works.
+
+Tue Aug 25 11:38:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c (main):
+ Prevent calls to CYG_TEST_STILL_ALIVE for now
+
+Tue Aug 25 05:39:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change cosmetic paragraph alignment.
+
+Tue Aug 25 03:11:34 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Make stderr initialise with buffer size 0.
+ For PR 16955
+
+Mon Aug 24 17:38:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ First pass at CDL-ifying the C library configuration. Currently
+ deliberately disabled as there a few outstanding issues.
+
+Mon Aug 24 16:14:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/vfnprintf.cxx (_vfnprintf):
+ clear up warning for unused argument
+
+ * tests/stdlib/malloc2.c (NUM_ITERATIONS):
+ Lower to 100 from 50000 so it won't take too long under the simulator
+
+Thu Aug 20 17:48:43 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Remove now unnecessary inclusion of kernel/ktypes.h
+
+Wed Aug 19 19:19:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c,
+ tests/stdio/sscanf.c, tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c,
+ tests/stdlib/strtoul.c, tests/string/strtok.c,
+ tests/time/clock.c:
+ Add parameters to "main()" to silence warnings
+
+Wed Aug 19 18:52:59 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stream.cxx (refill_read_buffer):
+ Put conditional error check into same #ifdef and if as what was being
+ checked in the first place!
+
+Wed Aug 19 18:49:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.inl:
+ Reorder Cyg_StdioStream::check_this() to be first to silence
+ warnings
+
+Tue Aug 18 16:10:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * ecc/language/c/libc/current/src/clibincl/clibdata.hxx,
+ ecc/language/c/libc/current/src/errno/errno.cxx,
+ ecc/language/c/libc/current/src/stdio/common/fopen.cxx,
+ ecc/language/c/libc/current/src/stdlib/rand.cxx,
+ ecc/language/c/libc/current/src/string/strtok.cxx:
+ Rename CYGIMP_LIBC_INTERNAL_DATA_PREAMBLE,
+ CYGIMP_LIBC_INTERNAL_DATA_ALLOC_CHECK_PREAMBLE,
+ CYGVAR_LIBC_INTERNAL_DATA, and
+ CYGIMP_LIBC_INTERNAL_DATA_CHECK to all have CYGPRI_ prefix instead
+ as recommended by the config name rules
+
+
+Tue Aug 18 14:31:19 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/setvbuf.cxx (_setvbuf):
+ Rename variable names in assert line, otherwise doesn't build
+ with asserts on!
+
+Sun Aug 16 18:15:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx (_vfscanf):
+ Fix some bugs, although there are some left to fix still. Unrelated
+ to the rest of the checkins, so I will check the partial fix in now.
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx:
+ Add parameters to constructor to allow more things to be done at
+ construction time.
+
+ Now we have "new", remove separate "construct" method
+
+ Add more documentation on constructor
+
+ As requested by code review, where possible, move boolean flags
+ into separate packed bitfield structure for space efficiency
+
+ Make readbuf_char be usable all the time rather than when configured
+ not to be buffering, as it is also needed for non-buffered mode i.e.
+ _IONBF
+
+ * src/stdio/common/fopen.cxx:
+ Change to use new method of construction from above, using new
+
+ Use thread-specific data, rather than global. And so change errnos
+ to access errno entry specifically
+
+ Make process_mode() check for append mode too
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/stdio/common/setvbuf.cxx:
+
+ Change to cope with different way of dealing with buffering policy
+ flags etc. in Cyg_StdioStream
+
+ * src/stdio/common/vsnprintf.cxx, src/stdio/common/vsscanf.cxx,
+ src/support/clibdata.cxx:
+ Change construction of streams to use new parameters added above,
+ and change to use _IONBF mode for string stdio functions,
+ otherwise its a waste of memory. And use _IONBF for stderr as the
+ ISO standard tells us to!
+
+ Reformat for coding standards to have { in same line as "verb"
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Change constructor so that it can be set with default size and
+ dynamic buffer (if applicable)
+
+ Fix minor bug in destructor - should only call free when allocated
+ dynamically
+
+ Change get_buffer_size to return -1 if the buffer was not allowed
+ to be set up
+
+ * src/stdio/common/streambuf.cxx:
+ Remove unnecessary stdio.h include and add extra comment to whether
+ to free bit in set_buffer()
+
+ * src/stdio/common/freopen.cxx:
+ Change @@@ to standard fix me string
+
+ * src/stdio/output/fputc.cxx:
+ Remove unnecessary "written" variable
+
+Thu Aug 13 15:37:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx:
+ Included use of "fix me" line to ensure this is discussed before
+ release
+
+ * include/stdlib.h, src/stdlib/abort.cxx, src/PKGconf.mak:
+ Add abort.cxx to implement abort(), albeit naively
+
+Thu Jul 30 18:03:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/vsscanf.cxx (_vsscanf),
+ src/stdio/common/vsnprintf.cxx (_vsnprintf):
+ Fix initialiser of pseudo string device table that didn't get updated
+ when the table changed (Bad proven, no biscuit).
+
+ * src/clibincl/stream.inl (~Cyg_StdioStream):
+ Move invalidation of magic_validity_word to after unlock_me(),
+ otherwise it always fails!
+
+Tue Jul 28 21:29:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx:
+ Shorten over-long lines
+
+Tue Jul 28 20:28:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx (class Cyg_StdioStream),
+ src/clibincl/stream.inl, src/stdio/common/stream.cxx:
+ Clarify some comments and get the CYGDBG_DEFINE_CHECK_THIS and
+ CYG_ASSERTCLASS stuff going
+
+ * src/clibincl/stream.inl:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 15:31:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/streambuf.inl, src/stdio/common/streambuf.cxx:
+ Move set_buffer() from streambuf.inl to new file streambuf.cxx
+
+ * src/PKGconf.mak (COMPILE):
+ Build new file streambuf.cxx
+
+ * src/clibincl/streambuf.hxx (class Cyg_StdioStreamBuffer):
+ Add METHODS comment
+
+ * src/stdio/common/stream.cxx:
+ Put '{'s on same line as "action" as per coding standards
+ Shorten over-long lines
+
+Tue Jul 28 00:26:36 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.inl, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/div.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/qsort.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/string/strtok.cxx:
+
+ Include proper Berkeley license inline in the file, rather than
+ referring to an external file
+
+ * doc/COPYING.UCB:
+ Remove, now that it isn't referred to any more
+
+Mon Jul 27 23:34:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl, include/errno.h,
+ include/stdio.h, include/stdio.inl, include/stdlib.h,
+ include/stdlib.inl, include/string.h, include/string.inl,
+ include/time.h, include/sys/file_if.h, src/PKGconf.mak,
+ src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/stdiosupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/streambuf.hxx,
+ src/clibincl/streambuf.inl, src/clibincl/stringsupp.hxx,
+ src/clibincl/timesupp.hxx, src/ctype/isalnum.cxx,
+ src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx,
+ src/ctype/islower.cxx, src/ctype/isprint.cxx,
+ src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx,
+ src/ctype/tolower.cxx, src/ctype/toupper.cxx,
+ src/errno/errno.cxx, src/stdio/common/snprintf.cxx,
+ src/stdio/common/sprintf.cxx, src/stdio/common/sscanf.cxx,
+ src/stdio/common/stdioinlines.cxx, src/stdio/common/stream.cxx,
+ src/stdio/common/ungetc.cxx, src/stdio/common/vsnprintf.cxx,
+ src/stdio/common/vsscanf.cxx, src/stdio/input/fgetc.cxx,
+ src/stdio/input/fgets.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/gets.cxx, src/stdio/input/scanf.cxx,
+ src/stdio/output/fnprintf.cxx, src/stdio/output/fprintf.cxx,
+ src/stdio/output/fputc.cxx, src/stdio/output/fputs.cxx,
+ src/stdio/output/printf.cxx, src/stdlib/_exit.cxx,
+ src/stdlib/abs.cxx, src/stdlib/atof.cxx, src/stdlib/atoi.cxx,
+ src/stdlib/atol.cxx, src/stdlib/div.cxx, src/stdlib/labs.cxx,
+ src/stdlib/ldiv.cxx, src/stdlib/rand.cxx, src/stdlib/strtod.cxx,
+ src/string/memchr.cxx, src/string/memcmp.cxx,
+ src/string/memmove.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx,
+ src/string/strcoll.cxx, src/string/strcpy.cxx,
+ src/string/strcspn.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx, src/string/strpbrk.cxx,
+ src/string/strrchr.cxx, src/string/strspn.cxx,
+ src/string/strstr.cxx, src/string/strsuppt.cxx,
+ src/string/strtok.cxx, src/string/strxfrm.cxx,
+ src/support/clibdata.cxx, src/time/clock.cxx:
+ Untabify
+
+Mon Jul 27 23:14:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/errno/errno.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/output/vfnprintf.cxx, src/stdlib/strtol.cxx,
+ src/stdlib/strtoul.cxx, src/stdlib/malloc.cxx, src/stdlib/qsort.cxx,
+ tests/ctype/ctype.c, tests/stdlib/rand3.c, tests/stdlib/malloc3.c:
+ Remove all mentions of "register" in variable declarations. Also
+ untabify where needed
+
+ * src/stdlib/bsearch.cxx:
+ Untabify this too
+
+
+Mon Jul 27 22:18:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/output/fputc.cxx (_fputc):
+ Replace call to stream write() with call to write_byte()
+
+ * src/clibincl/stream.inl (write_byte):
+ Add asserts for stream write() returning odd values for how much has
+ been written
+
+ (bytes_available_to_read):
+ Remove "register" def for variable declaration
+
+Mon Jul 27 22:06:22 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdiosupp.cxx:
+ Remove #if 0'd cyg_get_file_star() and unnecessary pseudo string
+ device definition
+
+Mon Jul 27 21:57:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h, src/support/clibdata.cxx:
+ Change CYGXXX_LIBC_STDIO_DEFAULT_CONSOLE to
+ CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE
+
+Mon Jul 27 21:49:23 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl,
+ src/clibincl/ctypesupp.hxx, src/clibincl/setjmpsupp.hxx,
+ src/clibincl/stdiosupp.hxx, src/clibincl/stdlibsupp.hxx,
+ src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl,
+ src/clibincl/stringsupp.hxx, src/clibincl/timesupp.hxx:
+
+ Change CYGONCE_LIBC_*_{HXX,INL} to CYGONCE_LIBC_CLIBINCL_*_{HXX,INL}
+
+Mon Jul 27 21:34:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Change #define XXXXX 1 to #define XXXXX where applicable as per code
+ review
+
+ Also remove obsolete CYGIMP_LIBC_THREAD_START_SUSPENDS_SELF
+
+Mon Jul 27 19:42:27 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fopen.cxx (_fopen):
+ Use #ifdef, not #if for config options
+
+Mon Jul 27 15:01:51 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/stream.cxx, src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx:
+ Fixes to compile with the new Cyg_IORB field names.
+
+Thu Jul 9 03:40:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/atoi.c, tests/stdlib/atol.c,
+ tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Adjust starting of tests to possibly start scheduler since
+ strtol/stroul rely on errno, which may be a per-thread variable
+
+Thu Jul 9 03:06:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/stream.inl,
+ src/stdio/common/stream.cxx, src/stdio/common/setvbuf.cxx:
+ Consolidate read and write buffers into single buffer, as it should
+ have been all along
+
+ * src/clibincl/streambuf.hxx, src/clibincl/streambuf.inl:
+ Add drain_buffer() method to speed up the case when we want the
+ buffer completely emptied
+
+Tue Jul 7 21:26:33 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Add a couple of new tests that check that very long strings work too
+
+Wed Jul 1 19:52:39 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/stream.hxx, src/clibincl/streambuf.hxx:
+ Do not permit copy constructors
+
+ * src/clibincl/stream.inl, src/stdio/common/fclose.cxx:
+ Make sure we use #ifdef and not #if
+
+ * src/clibincl/streambuf.inl:
+ Use member initialisation list rather than explicit initialisation to
+ reduce warnings
+
+Wed Jul 1 19:17:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h and all files using config options:
+ Rename configuration defines to make them more standard
+
+Thu Jun 25 20:09:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strcat.cxx:
+ Add parentheses on check to silence warning
+ (Verified by proven)
+
+Thu Jun 25 19:30:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/malloc.cxx:
+ Make sure that the malloc pool is initialised before other things
+ can use it. This is done with the hot new constructor ordering
+ feature.
+
+Thu Jun 25 18:27:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Remove bogus ifdef if floating point is _not_ wanted
+
+Thu Jun 25 17:31:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Fix argument checking to allow first argument of NULL
+
+Thu Jun 25 04:18:50 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl (get_strtok_last_p):
+ Remove bogus assertion
+
+ * src/stdlib/malloc.cxx:
+ Got sense of alignment check assertion the wrong way round, so negate
+ it
+
+Thu Jun 25 03:56:35 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx:
+ Fix argument checking assertions with legitimate nulls here too
+
+Thu Jun 25 03:46:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/strtoul.cxx, src/stdlib/strtol.cxx:
+ Fix argument checking assertions to cope with legitimate nulls
+
+Wed Jun 24 09:01:45 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c:
+ Remove extraneous info messages
+
+Wed Jun 24 05:59:17 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c:
+
+ Change large automatic arrays to static arrays to prevent overuse
+ of a potentially small stack
+
+Wed Jun 24 05:45:28 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c, tests/stdio/sscanf.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/string/strtok.c, tests/time/clock.c:
+
+ Increase thread stack size from 4K to 32K as in some cases it was
+ too small.
+
+
+Tue Jun 23 20:12:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sscanf.c:
+ Add extra tests, including floating point conversion testing
+
+Tue Jun 23 17:01:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strtok.cxx:
+ Make sure this is only compiled if CYGFUN_LIBC_strtok is defined
+
+Tue Jun 23 06:10:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ add some comments - that's all
+
+ * src/stdio/common/stream.cxx:
+ fix case in refill_read_buffer() for what to do when there's nothing
+ left. Now return EAGAIN
+
+ * src/stdio/common/vsscanf.cxx, src/stdio/input/vfscanf.cxx:
+ Get sscanf working properly and passing tests. Also make sure it
+ ignores FP when its not configured
+
+ * src/stdlib/atof.cxx:
+ Only compile at all if strtod() is present
+
+
+Mon Jun 22 19:13:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Conditionalise strtok_last and rand_seed better
+
+Mon Jun 22 14:14:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc3.c:
+ Add test for checking that mallocing and freeing repeatedly works
+
+ * tests/PKGconf.mak:
+ Update to reflect addition of the above
+
+Mon Jun 22 13:09:33 BST 1998 Chris Provenzano <proven@cygnus.com>
+
+ * src/stdio/common/fopen.cxx
+ * src/stdio/common/stream.cxx
+ * src/stdio/common/vsnprintf.cxx
+ * src/stdio/common/vsscanf.cxx
+ Include cyg/devs/common/iorb.h instead of iorb.hxx
+
+ * src/stdio/common/stream.cxx
+ Use read_blocking and write_blocking instead of just read and
+ write when accessing devices through the virtual device table.
+
+Sun Jun 21 18:19:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/stdioinlines.cxx:
+ Propagate change of return code handling for puts from stdio.inl
+ into here
+
+ * src/stdio/output/fputc.cxx:
+ make sure the right type is used for output - byte not int
+
+ * src/support/clibdata.cxx:
+ Fix #define config mistook. #endif was in wrong place
+
+Sun Jun 21 16:11:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.hxx, src/clibincl/clibdata.inl:
+ Allow explicit construction to get around a bug when
+ dynamically allocating per-thread structure
+
+Sun Jun 21 16:02:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/ctype/ctype.c, tests/setjmp/setjmp.c, tests/stdio/sprintf1.c,
+ tests/stdio/sprintf2.c, tests/stdio/sscanf.c, tests/stdlib/abs.c,
+ tests/stdlib/atoi.c, tests/stdlib/atol.c, tests/stdlib/bsearch.c,
+ tests/stdlib/div.c, tests/stdlib/labs.c, tests/stdlib/ldiv.c,
+ tests/stdlib/malloc1.c, tests/stdlib/malloc2.c, tests/stdlib/qsort.c,
+ tests/stdlib/rand1.c, tests/stdlib/rand2.c, tests/stdlib/rand3.c,
+ tests/stdlib/srand.c, tests/stdlib/strtol.c, tests/stdlib/strtoul.c,
+ tests/string/memchr.c, tests/string/memcmp1.c,
+ tests/string/memcmp2.c, tests/string/memcpy1.c,
+ tests/string/memcpy2.c, tests/string/memmove1.c,
+ tests/string/memmove2.c, tests/string/memset.c,
+ tests/string/strcat1.c, tests/string/strcat2.c,
+ tests/string/strchr.c, tests/string/strcmp1.c,
+ tests/string/strcmp2.c, tests/string/strcoll1.c,
+ tests/string/strcpy1.c, tests/string/strcpy2.c,
+ tests/string/strcspn.c, tests/string/strlen.c,
+ tests/string/strncat1.c, tests/string/strncat2.c,
+ tests/string/strncpy1.c, tests/string/strncpy2.c,
+ tests/string/strpbrk.c, tests/string/strrchr.c,
+ tests/string/strspn.c, tests/string/strstr.c, tests/string/strtok.c,
+ tests/string/strxfrm1.c, tests/string/strxfrm2.c, tests/time/clock.c:
+
+ Update tests to "do the right thing" with all configuration settings
+
+
+Sun Jun 21 04:54:14 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ I have to be careful not to use setjmp() in a way not exactly
+ defined by the standard, so make sure I do, and add a comment
+ documenting these ways.
+
+ Also ensure this test does the right thing in all configurations
+
+Sun Jun 21 04:38:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add extra checks for invalid configurations
+ Also make default for thread safety OFF
+
+ * src/clibincl/clibdata.inl:
+ Adjust indentation
+
+ * src/stdio/output/vfnprintf.cxx:
+ Make printf of -0.0 floating point do the right thing
+
+Sun Jun 21 04:28:00 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/snprintf.cxx, src/stdio/common/sprintf.cxx,
+ src/stdio/common/sscanf.cxx, src/stdio/input/fscanf.cxx,
+ src/stdio/input/scanf.cxx, src/stdio/output/fnprintf.cxx,
+ src/stdio/output/fprintf.cxx, src/stdio/output/printf.cxx:
+
+ Had to remove inline functions with varargs. Which means separating
+ out each function from stdioinlines.cxx into a separate file, as they
+ no longer belong there. So all the above files were created.
+
+ * include/stdio.inl, src/PKGconf.mak,
+ src/stdio/common/stdioinlines.cxx:
+ Changed to take account of the above
+
+
+Sun Jun 21 03:58:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdio/sprintf1.c, tests/stdio/sprintf2.c:
+ Update with floating-point tests. Also make sure they DTRT in all
+ configurations
+
+Fri Jun 19 19:33:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ accidentally initialised stdin/out/err twice
+
+Fri Jun 19 19:09:29 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Another typo
+
+Fri Jun 19 18:59:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Missing #endif typo
+
+Fri Jun 19 18:51:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/clibdata.cxx:
+ Fix initialisation of static data members. Unsure how it worked at
+ all before!
+
+Fri Jun 19 18:01:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdio.inl:
+ puts should check whether fputs returns non-negative, rather than
+ non-zero
+
+Fri Jun 19 17:22:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/clibincl/clibdata.inl:
+ Make inclusion of get_errno_p conditional on thread-safety
+
+Wed Jun 17 10:55:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/input/vfscanf.cxx:
+ Add weak alias of vfscanf() to _vfscanf()
+
+Wed Jun 17 09:10:41 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdio/common/fflush.cxx:
+ Initialise err to silence compiler warning
+
+Wed Jun 17 08:59:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Most important is the addition of floating point support in
+ src/stdio/output/vfnprintf.cxx and src/stdio/input/vfscanf.cxx. This
+ also required the addition of atof() and strtod() in stdlib which is
+ definitely no bad thing! Other than that...
+
+ * Fix a whole bunch of stuff I messed up first time round. Also the
+ sprintf and sscanf tests are included again.
+
+Tue Jun 16 16:38:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Typo with not putting comment character at the beginning. Sigh.
+
+Tue Jun 16 14:53:09 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ Forgot to (temporarily) remove fputs test for now
+
+Mon Jun 15 20:40:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ Everything to do with stdio has almost completely changed, so there's
+ not much point documenting individual changes.
+
+Mon Jun 15 18:36:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/stdlib/malloc2.c:
+ Stop it moaning quite as much when it fails by making it exit sooner
+
+ * tests/time/clock.c :
+ This isn't a compound testcase
+
+Thu Jun 11 17:59:13 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h
+ Reverse sense of NDEBUG ifdef, that was left in accidentally due
+ to testing
+
+Thu Jun 11 04:58:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/errno.h, include/string.h, src/clibincl/stringsupp.hxx:
+ Modify as I've now added an "error" package which defines the error
+ codes and strerror()
+
+ * src/errno/strerror.cxx:
+ Moved to new error package and thus deleted
+
+Wed Jun 10 18:37:37 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/assert.h:
+ create this header and add assert() function
+
+Wed Jun 10 16:23:57 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/stdlib.h, src/clibincl/stdlibsupp.hxx, src/stdlib/malloc.cxx:
+ Add malloc(), calloc() and free() functions
+
+ * include/pkgconf/libc.h:
+ Add malloc memory pool size option
+
+ * tests/stdlib/malloc1.c, tests/stdlib/malloc2.c:
+ new tests for malloc
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for new files
+
+Wed Jun 10 15:06:16 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/setjmp/setjmp.c:
+ Add another test
+
+Tue Jun 9 18:20:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libc.h:
+ Add some setjmp config's and a macro for the noreturn attribute
+
+ * include/setjmp.h, include/setjmp.inl, src/clibincl/setjmpsupp.hxx,
+ src/setjmp/longjmp.cxx, tests/setjmp/setjmp.c:
+ Added to implement and test setjmp() and longjmp()
+
+ * src/PKGconf.mak, tests/PKGconf.mak:
+ Update for newly added files
+
+Thu Jun 4 01:29:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/strcat.cxx,
+ src/string/strchr.cxx, src/string/strcmp.cxx, src/string/strcpy.cxx,
+ src/string/strlen.cxx, src/string/strncat.cxx,
+ src/string/strncmp.cxx, src/string/strncpy.cxx:
+ Rename CYGIMP_LIBC_PREFER_SMALL_TO_FAST to
+ CYGIMP_LIBC_STRING_PREFER_SMALL_TO_FAST
+
+ Also use slower but smaller version when __OPTIMIZE_SIZE__ is
+ defined (which comes from using gcc -Os)
+
+Fri May 29 16:15:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl, src/ctype/isxdigit.cxx:
+ Fix bug that numerals aren't considered hex digits
+
+ * include/time.h:
+ Change clock_t and time_t to be signed so that they can accept -1, as
+ required by other libc functions
+
+ * src/clibincl/clibdata.hxx:
+ Fix typo that CYGIMP_LIBC_THREAD_SUPPORT should be ..._SAFETY
+ Also fix macro to allocate thread-specific data to not set variables
+ in a different stack-frame
+
+ * tests/ctype/ctype.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/stdlib/qsort.c:
+ make ctr unsigned to prevent warnings
+
+ * tests/stdlib/strtol.c, tests/stdlib/strtoul.c:
+ Fix some misunderstandings in tests, and add a few new ones
+
+ * tests/string/strrchr.c:
+ Fix off by one error
+
+ * tests/string/strspn.c:
+ Fix case-sensitivity problem, and off-by-one error
+
+ * tests/string/strxfrm1.c:
+ Remove bogus bit of test that doesn't apply to strxfrm, and fix typo
+
+
+Fri May 22 16:33:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak
+ Remove CXXFLAGS line now that its redundant
+
+ * tests/everything!
+ Do a blitz change of all tests - break some of them down into
+ different files, add new tests, standardize format, fix bugs,
+ update for recent header file changes and much more!
+
+Wed May 20 17:50:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/PKGconf.mak:
+ interim checkin for different dir structure for Bart
+
+Fri May 15 20:30:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Tidy up some loose ends I forgot: rename src/include directory to
+ src/clibincl. And add clibdata.inl and timesupp.hxx in there.
+
+Thu May 14 19:56:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Basically everything has changed in the C library. Files have
+ been moved, renamed, deleted and reworked. This is a major
+ revision, and now starts from this new baseline rather than doing
+ incremental changes.
+
+Fri Apr 17 18:43:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ECCconf.mak:
+ added for new build system (actually Bart did this, but didn't
+ update this ChangeLog)
+
+Fri Apr 17 15:03:25 1998 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/stdio/device/sim.cxx:
+ Make it build with CYG_EMPTY_STATEMENT; the unadorned one is being
+ removed.
+
+Thu Apr 16 00:24:24 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * All source files:
+ replace ECCIMP_LIBC_* conditional ifdef with CYGIMP_LIBC_*
+
+ * include/eccconf/libc.h:
+ improve comments and reorder a bit
+
+Wed Apr 8 14:35:20 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/Makefile.am, tests/Makefile.am, configure.in:
+ many changes to integrate build structure from release tree
+
+ * src/ctype/Makefile.am, src/ctype/Makefile.in, src/errno/Makefile.am,
+ src/errno/Makefile.in, src/stdio/Makefile.am, src/stdio/Makefile.in,
+ src/stdio/common/Makefile.am, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.am, src/stdio/device/Makefile.in,
+ src/stdio/output/Makefile.am, src/stdio/output/Makefile.in,
+ src/stdio/input/Makefile.am, src/stdio/input/Makefile.in,
+ src/stdlib/Makefile.am, src/stdlib/Makefile.in,
+ src/string/Makefile.am, src/string/Makefile.in,
+ src/support/Makefile.am, src/support/Makefile.in,
+ src/time/Makefile.am, src/time/Makefile.in:
+ Remove as they are now redundant with above changes
+
+ * include/Makefile.am:
+ Add to support above changes
+
+ * include/eccconf/libc.h:
+ Change include file for configuration from kernel to system
+
+ * src/include/kerndiag.hxx, src/stdio/device/kerndiag.cxx,
+ src/time/clockfn.cxx:
+ Change kernel include file to eccconf/kernel.h
+
+ * src/include/strngdev.h:
+ remove unnecessary kernel include
+
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in,
+ tests/Makefile.in, include/Makefile.in:
+ regenerate
+
+Mon Apr 6 20:55:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/abs.cxx, src/stdlib/atoi.cxx, src/stdlib/atol.cxx,
+ src/stdlib/div.cxx, src/stdlib/labs.cxx, src/stdlib/ldiv.cxx:
+ Separated out functions from stdlib.cxx into separate files
+
+ * src/stdlib/stdlib.cxx:
+ removed to be replaced by above files
+
+ * Makefile.am, src/stdlib/Makefile.am:
+ modified to support building above and not building stdlib.cxx
+
+ * src/support/tsd.cxx:
+ Remove unnecessary header file includes
+
+ * Makefile.in, src/stdlib/Makefile.in:
+ regenerated
+
+Mon Apr 6 19:19:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx, include/eccconf/libc.h:
+ remove lame hack for tx39 compiler now that its fixed
+
+ * src/include/sim.hxx:
+ define constants as static to placate compiler
+
+Thu Apr 2 21:01:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/ctype/ctype.cxx:
+ deleted and separated out into below files
+
+ * src/ctype/isalnum.cxx, src/ctype/isalpha.cxx, src/ctype/iscntrl.cxx,
+ src/ctype/isdigit.cxx, src/ctype/isgraph.cxx, src/ctype/islower.cxx,
+ src/ctype/isprint.cxx, src/ctype/ispunct.cxx, src/ctype/isspace.cxx,
+ src/ctype/isupper.cxx, src/ctype/isxdigit.cxx, src/ctype/tolower.cxx,
+ src/ctype/toupper.cxx:
+ Separated out individual ctype functions from ctype.cxx into separate
+ files
+
+ * Makefile.am, src/ctype/Makefile.am:
+ modified to reflect above deletion/additions
+
+ * Makefile.in, src/ctype/Makefile.in:
+ regenerated
+
+Thu Apr 2 19:08:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: optimise using prefix increments
+
+Thu Apr 2 15:18:15 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strchr.cxx: optimise setting of mask a little
+
+Thu Mar 26 14:07:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/support/tsd.cxx: fixed some typos
+
+Thu Mar 26 11:58:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/eccconf/libc.h, src/support/tsd.cxx:
+ Implement workaround for tx39 compiler bug.
+
+ * src/include/strsuppt.hxx:
+ remove prototypes for _memcpy() and _memset() as they are now in the
+ kernel
+
+Wed Mar 25 18:31:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Makefile.am, src/string/Makefile.am: memcpy() and memset() are
+ now in the kernel so remove them from build
+ * include/string.h: add a comment to say as much
+ * Makefile.in, src/string/Makefile.in: regenerate
+
+Wed Mar 25 15:30:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx, src/include/file_if.inl:
+ Change _exit workaround to not cause a compiler optimisation
+ problem. Now just references _exit rather than calls it.
+
+Wed Mar 25 14:59:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fix bug causing tests to fail completely
+ for this function
+
+Wed Mar 25 12:55:53 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/sim.hxx: add types to constants (oops!)
+ * Makefile.am: link src/stdio/device/sim.cxx
+ * Makefile.in: regenerated
+
+Wed Mar 25 04:14:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/include/file_if.hxx, src/include/file_if.inl,
+ src/include/kerndiag.hxx, src/include/sim.hxx,
+ src/include/stdio_if.hxx, src/include/strngdev.hxx,
+ src/include/tsd.hxx, src/stdio/common/clearerr.cxx,
+ src/stdio/common/clearerr.cxx, src/stdio/common/feof.cxx,
+ src/stdio/common/ferror.cxx, src/stdio/common/file_if.cxx,
+ src/stdio/common/vsprintf.cxx,
+ src/stdio/device/kerndiag.cxx, src/stdio/device/sim.cxx,
+ src/stdio/device/strngdev.cxx, src/stdio/output/fputc.cxx,
+ src/stdio/output/fputs.cxx, src/stdio/output/puts.cxx,
+ src/stdio/output/vfnprintf.cxx, src/support/tsd.cxx:
+ Modified to support buffered reads including renaming
+ _EccInternalFileStruct to __EccStdioStream which is what affects
+ most of these files
+ * src/include/file_if.inl, src/stdio/common/file_if.cxx: added for
+ the above reason
+ * src/stdio/common/sscanf.cxx, src/stdio/input/vfscanf.cxx,
+ src/stdio/input/Makefile.am: added to provide sscanf() functionality
+ * include/ctype.h, include/stdio.h, include/stdlib.h,
+ include/string.h, include/eccconf/libc.h, src/ctype/ctype.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/stdio/common/stdio.cxx:
+ rename *_INLINES macros with prefix CYG rather than ECC
+ * include/errno.h, src/errno/errno.cxx, src/errno/strerror.cxx:
+ rename ErrNo to _ErrNo and add EAGAIN and EWOULDBLOCK error codes
+ * configure.in, Makefile.am, src/stdio/Makefile.am,
+ src/stdio/input/Makefile.am: add support for building
+ file_if.cxx sscanf.cxx and vfscanf.cxx
+ * src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/input/Makefile.in, configure, Makefile.in: regenerated
+
+Tue Mar 24 19:51:40 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/time/clockfn.cxx, src/time/clock.cxx:
+ Renamed clock.cxx to clockfn.cxx (preserving CVS history)
+ * Makefile.am, src/time/Makefile.am: updated to reflect name change
+ * Makefile.in, src/time/Makefile.in: regenerated
+
+Tue Mar 24 16:28:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.inl: Swap around definitions to get right order so
+ inlining works
+
+Tue Mar 24 14:43:05 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/stdio.h, include/stdlib.h, include/string.h:
+ modify to only conditionally include inlines
+ * src/ctype/ctype.cxx, src/stdio/common/stdio.cxx,
+ src/stdlib/stdlib.cxx, src/string/strcoll.cxx,
+ src/ctype/Makefile.am: Add to provide real linkable alternatives
+ to inline functions
+ * Makefile.am, configure.in, src/Makefile.am,
+ src/stdio/common/Makefile.am, src/stdlib/Makefile.am,
+ src/string/Makefile.am: modified to support previous additions
+ * include/eccconf/libc.h: redefine inline macro to add extern inline,
+ and add conditional defines for inline functions. Also rename
+ space vs. speed macro to have CYG instead of ECC prefix
+ * include/stdio.inl: fix comment typo
+ * src/stdlib/qsort.cxx: fix to define inline functions properly
+ * src/string/memchr.cxx, src/string/memcmp.cxx, src/string/memcpy.cxx,
+ src/string/memset.cxx, src/string/strcat.cxx, src/string/strchr.cxx,
+ src/string/strcmp.cxx, src/string/strcpy.cxx, src/string/strlen.cxx,
+ src/string/strncat.cxx, src/string/strncmp.cxx,
+ src/string/strncpy.cxx
+ * Makefile.in, configure, src/Makefile.in, src/ctype/Makefile.in,
+ src/stdio/common/Makefile.in, src/stdlib/Makefile.in,
+ src/string/Makefile.in: regenerate
+
+
+Mon Mar 23 19:19:49 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/stdlib/_exit.cxx: added to support temporary _exit
+ * include/stdlib.h, include/stdlib.inl: added support for _exit and
+ added abs(), labs(), div() and ldiv() functions
+ * src/include/file_if.hxx: added support for _exit kludge
+ * src/stdlib/qsort.cxx: Added Berkeley copyright message
+ * src/time/clock.cxx: Include correct kernel config header as
+ CYG_CONFIGURATION rather than <config.h>
+ * Makefile.am src/stdlib/Makefile.am: added support for _exit
+ * Makefile.in, src/stdlib/Makefile.in: regenerated
+
+Mon Mar 23 14:41:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Replace ECCPKG_ANSI_LIBC with CYGPKG_ANSI_LIBC in all source files
+
+Mon Mar 23 14:28:44 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/string.inl: add file to provide strcoll()
+ * include/string.h: include string.inl
+ * ctype.h: include ctype.inl (oops!)
+ * include/stdlib.h: include stdlib.inl (oops!)
+
+Mon Mar 23 13:30:38 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/ctype.h, include/ctype.inl: added to provide ANSI ctype
+ functionality
+ * include/stdlib.h, include/stdlib.inl, src/include/stdlibbsp.hxx,
+ src/stdlib/Makefile.am, src/stdlib/bsearch.cxx,
+ src/stdlib/qsort.cxx, src/stdlib/rand.cxx, src/stdlib/srand.cxx,
+ src/stdlib/strtol.cxx, src/stdlib/strtoul.cxx: Added to provide
+ many stdlib functions
+ * src/include/tsd.hxx: modified to support rand() random number
+ seed, and added some comments
+ * configure.in, Makefile.am, src/Makefile.am: modified to support
+ addition of above new sources
+ * include/eccconf/libc.h: Add extra helpful comments, and #include
+ kernel config file
+ * src/time/clock.cxx: #include clock.inl and fix to call
+ get_resolution() properly now
+ * Makefile.in, configure, src/Makefile.in, src/errno/Makefile.in,
+ src/stdio/Makefile.in, src/stdio/common/Makefile.in,
+ src/stdio/device/Makefile.in, src/stdio/output/Makefile.in,
+ src/stdlib/Makefile.in, src/strings/Makefile.in,
+ src/support/Makefile.in, src/time/Makefile.in,
+ tests/Makefile.in: regenerated
+
+
+Sun Mar 22 21:29:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/time.h, src/include/timesupp.hxx, src/time/clock.cxx,
+ src/time/Makefile.am: added to provide clock() function
+ * src/Makefile.am: modified to try to build in src/time directory
+ * include/eccconf/libc.h: added and is now the main configuration
+ file for this package
+ * acconfig.h, include/libcconf.h.in, include/stamp-h.in: removed
+ due to usage of libc.h above instead
+ * Almost all *.h, *.hxx and *.cxx: replaced LIBC_CONFIG_HEADER
+ defined include with simple <pkgconf/libc.h>
+ * configure.in: remove AM_CONFIG_HEADER of libcconf.h and
+ LIBC_CONFIG_HEADER definition. Also remove usage of builtin
+ memcpy() etc. from gcc, and generate src/time/Makefile
+ * Makefile.am: link in src/time/clock.o
+ * src/include/file_if.hxx, src/include/sim.hxx: use config header
+ to decide whether C library is to be used
+ * Makefile.in, aclocal.m4, configure, src/Makefile.in: regenerated
+
+Fri Mar 20 18:08:10 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/string/strxfrm.cxx: Fixed bug with ignoring terminating NULL
+
+1998-03-20 Chris Tarpy <ctarpy@bhaji.cygnus.co.uk>
+
+ * configure: - regenerated
+ * Makefile.am: - Support added for libc testcases
+ * Makefile.in: regenerated
+ * configure.in: set c compiler, descend test dir
+ * tests/Makefile.in: added
+ * tests/Makefile.am: added
+ * tests/tcdiag.cxx : added
+
+
+Thu Mar 19 11:41:56 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Initial check-in of everything
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libc/time/current/cdl/time.cdl b/cesar/ecos/packages/language/c/libc/time/current/cdl/time.cdl
new file mode 100644
index 0000000000..7c661dbbb6
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/cdl/time.cdl
@@ -0,0 +1,342 @@
+# ====================================================================
+#
+# time.cdl
+#
+# C library time related configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jlarmour
+# Contributors:
+# Date: 2000-04-14
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_LIBC_TIME {
+ display "ISO C library date and time functions"
+ description "
+ This package provides time functions specified by the
+ ISO C standard - ISO/IEC 9899:1990."
+ doc ref/libc.html
+ include_dir cyg/libc/time
+ parent CYGPKG_LIBC
+ implements CYGINT_ISO_C_TIME_TYPES
+ implements CYGINT_ISO_C_CLOCK_FUNCS
+ requires { CYGBLD_ISO_C_TIME_TYPES_HEADER == "<cyg/libc/time/time.h>" }
+ requires { CYGBLD_ISO_C_CLOCK_FUNCS_HEADER == \
+ "<cyg/libc/time/time.h>" }
+ requires CYGPKG_ISOINFRA
+ requires CYGINT_ISO_DIV
+ requires CYGINT_ISO_ABS
+
+ # Note: the POSIX files asctime_r,ctime_r,gmtime_r and
+ # localtime_r should be built all the time, not just in
+ # CYGFUN_LIBC_TIME_POSIX because the internal definitions
+ # are used by the ISO C functions regardless. Otherwise we
+ # get problems with certain inlining combinations. [Bug 1000001]
+
+ compile asctime.cxx clock.cxx \
+ ctime.cxx difftime.cxx \
+ gmtime.cxx localtime.cxx \
+ mktime.cxx settime.cxx \
+ strftime.cxx time.cxx \
+ timeutil.cxx asctime_r.cxx \
+ ctime_r.cxx gmtime_r.cxx \
+ localtime_r.cxx
+
+
+# ====================================================================
+
+ cdl_option CYGSEM_LIBC_TIME_CLOCK_WORKING {
+ display "Working clock() function"
+ requires CYGFUN_KERNEL_THREADS_TIMER
+ requires CYGVAR_KERNEL_COUNTERS_CLOCK
+ default_value 1
+ description "
+ This option controls whether clock() will
+ actually try and determine the process time
+ usage. With this option disabled, clock() does
+ not disappear, but will permanently return
+ (clock_t)-1 as mandated by the ISO C standard."
+ }
+
+ cdl_option CYGSEM_LIBC_TIME_TIME_WORKING {
+ display "Working time() function"
+ requires CYGPKG_IO_WALLCLOCK
+ default_value 1
+ description "
+ This option controls whether time() will
+ actually try and determine the current calendar
+ time. With this option disabled, time() does
+ not disappear, but will permanently return
+ (time_t)-1 as mandated by the ISO C standard."
+ }
+
+ cdl_option CYGSEM_LIBC_TIME_SETTIME_WORKING {
+ display "Working cyg_libc_time_settime() function"
+ requires CYGPKG_IO_WALLCLOCK
+ default_value 1
+ description "
+ This option controls whether cyg_libc_time_settime()
+ will actually try and set the current calendar
+ time. With this option disabled,
+ cyg_libc_time_settime() does not disappear, but
+ will permanently return an error."
+ }
+
+ cdl_option CYGFUN_LIBC_TIME_POSIX {
+ display "POSIX time functions"
+ default_value 1
+ requires CYGINT_ISO_STRING_BSD_FUNCS
+ compile strptime.cxx
+ description "
+ Enabling this option allows the use of the
+ following functions defined in POSIX 1003.1:
+ asctime_r(), ctime_r(), gmtime_r(), strptime(), and
+ localtime_r()."
+ }
+
+ cdl_option CYGFUN_LIBC_TIME_SUS_EXTNS {
+ display "Single UNIX extensions"
+ default_value 0
+ description "
+ Enabling this option allows the use of
+ certain additional conversion specifiers
+ in the strftime function."
+ }
+
+ cdl_component CYGPKG_LIBC_TIME_ZONES {
+ display "Time zone offsets"
+ flavor none
+ description "
+ These options control the default STandarD (STD)
+ and Daylight Savings Time (DST)
+ time offsets so that dates can be set correctly
+ for the local environment."
+
+ cdl_option CYGNUM_LIBC_TIME_DST_DEFAULT_STATE {
+ display "Default Daylight Savings Time state"
+ flavor data
+ legal_values -- -1 to 1
+ default_value -- -1
+ description "
+ This option controls whether the initial
+ time environment is set up as STD, DST or
+ unknown. Use the value 1 for DST, 0 for STD,
+ and (-1) for unknown. This can also be set at
+ runtime using the cyg_libc_time_setdst()
+ function."
+ }
+
+ cdl_option CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET {
+ display "Default Standard Time offset"
+ flavor data
+ legal_values -- -90000 to 90000
+ default_value -- 0
+ description "
+ This option controls the offset from UTC in
+ seconds when in local Standard Time. This
+ value can be positive or negative. It
+ can also be set at run time using the
+ cyg_libc_time_setzoneoffsets() function."
+ }
+
+ cdl_option CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET {
+ display "Default Daylight Savings Time offset"
+ flavor data
+ legal_values -- -90000 to 90000
+ default_value -- 3600
+ description "
+ This option controls the offset from UTC in
+ seconds when in local Daylight Savings Time. This
+ value can be positive or negative. It
+ can also be set at run time using the
+ cyg_libc_time_setzoneoffsets() function."
+ }
+ }
+
+ cdl_component CYGPKG_LIBC_TIME_INLINES {
+ display "Inline functions"
+ flavor none
+ description "
+ These options control whether certain functions
+ are available in inline form. This may lead to
+ faster code at the expense of code space. But for
+ some functions, or some functions with constant
+ arguments, it may in fact lead to smaller code."
+
+ cdl_option CYGIMP_LIBC_TIME_ASCTIME_INLINE {
+ display "asctime()"
+ default_value 1
+ description "
+ Allow the asctime() function to be inlined"
+ }
+
+ cdl_option CYGIMP_LIBC_TIME_CTIME_INLINE {
+ display "ctime()"
+ default_value 1
+ description "
+ Allow the ctime() function to be inlined"
+ }
+
+ cdl_option CYGIMP_LIBC_TIME_DIFFTIME_INLINE {
+ display "difftime()"
+ default_value 1
+ description "
+ Allow the difftime() function to be inlined"
+ }
+
+ cdl_option CYGIMP_LIBC_TIME_GMTIME_INLINE {
+ display "gmtime()"
+ default_value 1
+ description "
+ Allow the gmtime() function to be inlined"
+ }
+
+ cdl_option CYGIMP_LIBC_TIME_LOCALTIME_INLINE {
+ display "localtime()"
+ default_value 1
+ description "
+ Allow the localtime() function to be inlined"
+ }
+
+ cdl_option CYGIMP_LIBC_TIME_MKTIME_INLINE {
+ display "mktime()"
+ default_value 1
+ description "
+ Allow the mktime() function to be inlined"
+ }
+
+ cdl_option CYGIMP_LIBC_TIME_ASCTIME_R_INLINE {
+ display "asctime_r()"
+ requires CYGFUN_LIBC_TIME_POSIX
+ default_value 1
+ description "
+ Allow the asctime_r() function to be inlined"
+ }
+
+ cdl_option CYGIMP_LIBC_TIME_CTIME_R_INLINE {
+ display "ctime_r()"
+ requires CYGFUN_LIBC_TIME_POSIX
+ default_value 1
+ description "
+ Allow the ctime_r() function to be inlined"
+ }
+
+ cdl_option CYGIMP_LIBC_TIME_GMTIME_R_INLINE {
+ display "gmtime_r()"
+ requires CYGFUN_LIBC_TIME_POSIX
+ default_value 1
+ description "
+ Allow the gmtime_r() function to be inlined"
+ }
+
+ cdl_option CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE {
+ display "localtime_r()"
+ requires CYGFUN_LIBC_TIME_POSIX
+ default_value 1
+ description "
+ Allow the localtime_r() function to be inlined"
+ }
+ }
+# FIXME: Also want "inline all" and "don't inline any" options which requires
+# (or not) all the above, but
+# if we do that then we will require the ones that also depend on
+# CYGFUN_LIBC_TIME_POSIX :-( Wait for full CDL to fix this
+
+ cdl_option CYGNUM_LIBC_TIME_CLOCK_TRACE_LEVEL {
+ display "clock() tracing level"
+ flavor data
+ legal_values 0 to 1
+ default_value 0
+ description "
+ Trace verbosity level for debugging the clock()
+ function. Increase this value to get
+ additional trace output when tracing is enabled."
+ }
+
+ cdl_component CYGPKG_LIBC_TIME_OPTIONS {
+ display "C library time functions build options"
+ flavor none
+ no_define
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_LIBC_TIME_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { "-Wno-format" }
+ description "
+ This option modifies the set of compiler flags for
+ building the C library. These flags are used in addition
+ to the set of global flags."
+ }
+
+ cdl_option CYGPKG_LIBC_TIME_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the C library. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_LIBC_TIME_TESTS {
+ display "C library time and date function tests"
+ flavor data
+ no_define
+ calculated {
+ "tests/asctime tests/clock tests/ctime tests/gmtime tests/localtime tests/mktime tests/strftime tests/time "
+ . (CYGFUN_LIBC_TIME_POSIX ? "tests/strptime" : "")
+ }
+ description "
+ This option specifies the set of tests for the C library
+ time and date functions."
+ }
+ }
+}
+
+# ====================================================================
+# EOF time.cdl
diff --git a/cesar/ecos/packages/language/c/libc/time/current/include/time.h b/cesar/ecos/packages/language/c/libc/time/current/include/time.h
new file mode 100644
index 0000000000..1b5e091a7a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/include/time.h
@@ -0,0 +1,321 @@
+#ifndef CYGONCE_LIBC_TIME_TIME_H
+#define CYGONCE_LIBC_TIME_TIME_H
+/*===========================================================================
+//
+// time.h
+//
+// Date and time routines from ISO C section 7.12 and POSIX 1003.1
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-14
+// Purpose: Provide definitions required by ISO C section 7.12 and
+// POSIX 1003.1 8.3.4-8.3.7
+// Description:
+// Usage: Do not include this file directly - use #include <time.h>
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+
+// TYPE DEFINITIONS
+
+// Define struct tm as per ISO C para 7.12.1
+struct tm {
+ int tm_sec; // seconds after the minute - [0..61]
+ // (note 61 allows for two leap seconds)
+ int tm_min; // minutes after the hour - [0..59]
+ int tm_hour; // hours since midnight - [0..23]
+ int tm_mday; // days of the month - [1..31]
+ int tm_mon; // months since January - [0..11]
+ int tm_year; // years since 1900
+ int tm_wday; // days since Sunday - [0..6]
+ int tm_yday; // days since January 1 - [0..365]
+ int tm_isdst; // Daylight Saving Time flag - positive if DST is in
+ // effect, 0 if not in effect, and negative if the info
+ // is not available
+};
+
+// The following struct is used by the implementation-defined functions
+// to manipulate the Daylight Savings Time state
+typedef enum {
+ CYG_LIBC_TIME_DSTNA = -1,
+ CYG_LIBC_TIME_DSTOFF = 0,
+ CYG_LIBC_TIME_DSTON = 1
+} Cyg_libc_time_dst;
+
+// FUNCTION PROTOTYPES
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//===========================================================================
+//
+// POSIX 1003.1 functions
+
+#ifdef CYGFUN_LIBC_TIME_POSIX
+
+/////////////////////////////////
+// asctime_r() - POSIX.1 8.3.4 //
+/////////////////////////////////
+//
+// This returns a textual representation of a struct tm, and writes
+// the string to return into __buf
+//
+
+extern char *
+asctime_r( const struct tm *__timeptr, char *__buf );
+
+///////////////////////////////
+// ctime_r() - POSIX.1 8.3.5 //
+///////////////////////////////
+//
+// This returns the equivalent of ctime() but writes to __buf
+// to store the returned string
+//
+
+extern char *
+ctime_r( const time_t *__timer, char *__buf );
+
+////////////////////////////////
+// gmtime_r() - POSIX.1 8.3.6 //
+////////////////////////////////
+//
+// This converts a time_t into a struct tm expressed in UTC, and stores
+// the result in the space occupied by __result
+//
+
+extern struct tm *
+gmtime_r( const time_t *__timer, struct tm *__result );
+
+///////////////////////////////////
+// localtime_r() - POSIX.1 8.3.7 //
+///////////////////////////////////
+//
+// This converts a time_t into a struct tm expressed in local time, and
+// stores the result in the space occupied by __result
+//
+
+extern struct tm *
+localtime_r( const time_t *__timer, struct tm *__result );
+
+/////////////////////////////////////////////////////////
+// strptime() -
+/////////////////////////////////////////////////////////
+//
+// Parse a time string into a struct tm
+//
+
+extern char *
+strptime( const char *__s, const char *__format,
+ struct tm *__timeptr) CYGBLD_ATTRIB_STRFTIME_FORMAT(2,0);
+
+
+#endif // ifdef CYGFUN_LIBC_TIME_POSIX
+
+//===========================================================================
+
+// ISO C functions
+
+// Time manipulation functions - ISO C 7.12.2
+
+//////////////////////////////
+// clock() - ISO C 7.12.2.1 //
+//////////////////////////////
+//
+// Returns processor time used in "clock"s. For a single process,
+// multi-threaded system this will just be the time since booting
+//
+
+extern clock_t
+clock( void );
+
+/////////////////////////////////
+// difftime() - ISO C 7.12.2.2 //
+/////////////////////////////////
+//
+// This returns (__time1 - __time0) in seconds
+//
+
+extern double
+difftime( time_t __time1, time_t __time0 );
+
+///////////////////////////////
+// mktime() - ISO C 7.12.2.3 //
+///////////////////////////////
+//
+// This converts a "struct tm" to a "time_t"
+//
+
+extern time_t
+mktime( struct tm *__timeptr );
+
+/////////////////////////////
+// time() - ISO C 7.12.2.4 //
+/////////////////////////////
+//
+// This returns calendar time as a time_t
+//
+
+extern time_t
+time( time_t *__timer );
+
+// Time conversion functions - ISO C 7.12.3
+
+////////////////////////////////
+// asctime() - ISO C 7.12.3.1 //
+////////////////////////////////
+//
+// This returns a textual representation of a struct tm
+//
+
+extern char *
+asctime( const struct tm *__timeptr );
+
+//////////////////////////////
+// ctime() - ISO C 7.12.3.2 //
+//////////////////////////////
+//
+// This returns asctime(localtime(__timeptr))
+//
+
+extern char *
+ctime( const time_t *__timer );
+
+///////////////////////////////
+// gmtime() - ISO C 7.12.3.3 //
+///////////////////////////////
+//
+// This converts a time_t into a struct tm expressed in UTC
+//
+
+extern struct tm *
+gmtime( const time_t *__timer );
+
+//////////////////////////////////
+// localtime() - ISO C 7.12.3.4 //
+//////////////////////////////////
+//
+// This converts a time_t into a struct tm expressed in local time
+//
+
+extern struct tm *
+localtime( const time_t *__timer );
+
+/////////////////////////////////
+// strftime() - ISO C 7.12.3.5 //
+/////////////////////////////////
+//
+// This converts a string using format specifiers that signify various
+// time-related quantities
+//
+
+extern size_t
+strftime( char *__s, size_t __maxsize, const char *__format,
+ const struct tm *__timeptr) CYGBLD_ATTRIB_STRFTIME_FORMAT(3,0);
+
+//===========================================================================
+
+// Implementation-specific functions
+
+////////////////////////////////////
+// cyg_libc_time_setzoneoffsets() //
+////////////////////////////////////
+//
+// This function sets the offsets used when Daylight Savings Time is enabled
+// or disabled. The offsets are in time_t's
+//
+
+extern void
+cyg_libc_time_setzoneoffsets( time_t __stdoffset, time_t __dstoffset );
+
+////////////////////////////
+// cyg_libc_time_setdst() //
+////////////////////////////
+//
+// This function sets the state of Daylight Savings Time: on, off, or unknown
+//
+
+extern void
+cyg_libc_time_setdst( Cyg_libc_time_dst __state );
+
+
+////////////////////////////////////
+// cyg_libc_time_getzoneoffsets() //
+////////////////////////////////////
+//
+// This function retrieves the current state of the Daylight Savings Time
+// and the offsets of both STD and DST
+// The offsets are both in time_t's
+//
+
+extern Cyg_libc_time_dst
+cyg_libc_time_getzoneoffsets( time_t *__stdoffset, time_t *__dstoffset );
+
+/////////////////////////////
+// cyg_libc_time_settime() //
+/////////////////////////////
+//
+// This function sets the current time for the system. The time is
+// specified as a time_t in UTC. It returns non-zero on error.
+//
+
+extern cyg_bool
+cyg_libc_time_settime( time_t __utctime );
+
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#include <cyg/libc/time/time.inl>
+
+#endif // CYGONCE_LIBC_TIME_TIME_H multiple inclusion protection
+
+// EOF time.h
diff --git a/cesar/ecos/packages/language/c/libc/time/current/include/time.inl b/cesar/ecos/packages/language/c/libc/time/current/include/time.inl
new file mode 100644
index 0000000000..684e06e98e
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/include/time.inl
@@ -0,0 +1,820 @@
+#ifndef CYGONCE_LIBC_TIME_INL
+#define CYGONCE_LIBC_TIME_INL
+//===========================================================================
+//
+// time.inl
+//
+// Inline implementations of date and time routines from <time.h>
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 1999-02-25
+// Purpose: Provide inline implementations for some of the date and time
+// routines declared in <time.h> for ISO C section 7.12 and
+// POSIX 1003.1 8.3.4-8.3.7
+// Description:
+// Usage: Do not include this file directly. Instead include <time.h>
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <time.h> // Header for this file
+#include <cyg/infra/cyg_ass.h> // Assertion infrastructure
+#include <cyg/infra/cyg_trac.h> // Tracing infrastructure
+
+// DEFINES
+
+// The following are overriden by the libc implementation to get a non-inline
+// version to prevent duplication of code
+
+#ifndef CYGPRI_LIBC_TIME_ASCTIME_R_INLINE
+# define CYGPRI_LIBC_TIME_ASCTIME_R_INLINE extern __inline__
+#endif
+
+#ifndef CYGPRI_LIBC_TIME_CTIME_R_INLINE
+# define CYGPRI_LIBC_TIME_CTIME_R_INLINE extern __inline__
+#endif
+
+#ifndef CYGPRI_LIBC_TIME_GMTIME_R_INLINE
+# define CYGPRI_LIBC_TIME_GMTIME_R_INLINE extern __inline__
+#endif
+
+#ifndef CYGPRI_LIBC_TIME_LOCALTIME_R_INLINE
+# define CYGPRI_LIBC_TIME_LOCALTIME_R_INLINE extern __inline__
+#endif
+
+#ifndef CYGPRI_LIBC_TIME_DIFFTIME_INLINE
+# define CYGPRI_LIBC_TIME_DIFFTIME_INLINE extern __inline__
+#endif
+
+#ifndef CYGPRI_LIBC_TIME_MKTIME_INLINE
+# define CYGPRI_LIBC_TIME_MKTIME_INLINE extern __inline__
+#endif
+
+#ifndef CYGPRI_LIBC_TIME_ASCTIME_INLINE
+# define CYGPRI_LIBC_TIME_ASCTIME_INLINE extern __inline__
+#endif
+
+#ifndef CYGPRI_LIBC_TIME_CTIME_INLINE
+# define CYGPRI_LIBC_TIME_CTIME_INLINE extern __inline__
+#endif
+
+#ifndef CYGPRI_LIBC_TIME_GMTIME_INLINE
+# define CYGPRI_LIBC_TIME_GMTIME_INLINE extern __inline__
+#endif
+
+#ifndef CYGPRI_LIBC_TIME_LOCALTIME_INLINE
+# define CYGPRI_LIBC_TIME_LOCALTIME_INLINE extern __inline__
+#endif
+
+#ifndef CYGPRI_LIBC_TIME_GETZONEOFFSETS_INLINE
+# define CYGPRI_LIBC_TIME_GETZONEOFFSETS_INLINE extern __inline__
+#endif
+
+#ifndef CYGPRI_LIBC_TIME_SETZONEOFFSETS_INLINE
+# define CYGPRI_LIBC_TIME_SETZONEOFFSETS_INLINE extern __inline__
+#endif
+
+#ifndef CYGPRI_LIBC_TIME_SETDST_INLINE
+# define CYGPRI_LIBC_TIME_SETDST_INLINE extern __inline__
+#endif
+
+#define CYGNUM_LIBC_TIME_EPOCH_WDAY 4 // Jan 1st 1970 was a Thursday
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// EXTERNS
+
+// These are used in the dst access functions below. Do not access these
+// directly - use the functions declared in time.h instead
+
+extern Cyg_libc_time_dst cyg_libc_time_current_dst_stat;
+extern time_t cyg_libc_time_current_std_offset;
+extern time_t cyg_libc_time_current_dst_offset;
+
+// INLINE FUNCTIONS
+
+//===========================================================================
+//
+// Utility functions
+
+//////////////////////////////////
+// cyg_libc_time_year_is_leap() //
+//////////////////////////////////
+//
+// This returns true if the year is a leap year.
+// The argument is of type int in line with struct tm
+//
+
+static __inline__ cyg_bool
+cyg_libc_time_year_is_leap( int __year )
+{
+ cyg_bool _leap=false;
+
+ if (!(__year % 400))
+ _leap = true;
+ else if (!(__year % 4) && (__year % 100))
+ _leap = true;
+ return _leap;
+} // cyg_libc_time_year_is_leap()
+
+
+////////////////////////////////////
+// cyg_libc_time_getzoneoffsets() //
+////////////////////////////////////
+//
+// This function retrieves the current state of the Daylight Savings Time
+// and the offsets of both STD and DST
+// The offsets are both in time_t's i.e. seconds
+//
+
+CYGPRI_LIBC_TIME_GETZONEOFFSETS_INLINE Cyg_libc_time_dst
+cyg_libc_time_getzoneoffsets( time_t *__stdoffset, time_t *__dstoffset )
+{
+ CYG_REPORT_FUNCNAMETYPE("cyg_libc_time_getzoneoffsets",
+ "returning DST state %d");
+ CYG_REPORT_FUNCARG2("__stdoffset is at address %08x, "
+ "__dstoffset is at %08x", __stdoffset, __dstoffset);
+
+ CYG_CHECK_DATA_PTR(__stdoffset, "__stdoffset is not a valid pointer!");
+ CYG_CHECK_DATA_PTR(__dstoffset, "__dstoffset is not a valid pointer!");
+
+ *__stdoffset = cyg_libc_time_current_std_offset;
+ *__dstoffset = cyg_libc_time_current_dst_offset;
+
+ CYG_REPORT_RETVAL(cyg_libc_time_current_dst_stat);
+
+ return cyg_libc_time_current_dst_stat;
+} // cyg_libc_time_getzoneoffsets()
+
+
+////////////////////////////////////
+// cyg_libc_time_setzoneoffsets() //
+////////////////////////////////////
+//
+// This function sets the offsets used when Daylight Savings Time is enabled
+// or disabled. The offsets are in time_t's i.e. seconds
+//
+
+CYGPRI_LIBC_TIME_SETZONEOFFSETS_INLINE void
+cyg_libc_time_setzoneoffsets( time_t __stdoffset, time_t __dstoffset )
+{
+ CYG_REPORT_FUNCNAME("cyg_libc_time_setzoneoffsets");
+ CYG_REPORT_FUNCARG2DV(__stdoffset, __dstoffset);
+
+ cyg_libc_time_current_std_offset = __stdoffset;
+ cyg_libc_time_current_dst_offset = __dstoffset;
+
+ CYG_REPORT_RETURN();
+} // cyg_libc_time_setzoneoffsets()
+
+
+////////////////////////////
+// cyg_libc_time_setdst() //
+////////////////////////////
+//
+// This function sets the state of Daylight Savings Time: on, off, or unknown
+//
+
+CYGPRI_LIBC_TIME_SETDST_INLINE void
+cyg_libc_time_setdst( Cyg_libc_time_dst __state )
+{
+ CYG_REPORT_FUNCNAME("cyg_libc_time_setdst");
+ CYG_REPORT_FUNCARG1("__state=%d", __state);
+
+ cyg_libc_time_current_dst_stat = __state;
+
+ CYG_REPORT_RETURN();
+} // cyg_libc_time_setdst()
+
+
+
+//===========================================================================
+//
+// POSIX 1003.1 functions
+
+/////////////////////////////////
+// asctime_r() - POSIX.1 8.3.4 //
+/////////////////////////////////
+//
+// This returns a textual representation of a struct tm, and writes
+// the string to return into __buf
+//
+
+#ifdef CYGFUN_LIBC_TIME_POSIX
+# define __asctime_r asctime_r
+#else
+// prototype internal function
+__externC char *
+__asctime_r( const struct tm *__timeptr, char *__buf );
+#endif
+
+#ifdef CYGIMP_LIBC_TIME_ASCTIME_R_INLINE
+
+#include <cyg/libc/time/timeutil.h> // for cyg_libc_time_{day,month}_name
+ // and cyg_libc_time_itoa()
+#include <string.h> // for memcpy()
+
+CYGPRI_LIBC_TIME_ASCTIME_R_INLINE char *
+__asctime_r( const struct tm *__timeptr, char *__buf )
+{
+ cyg_ucount8 __i;
+
+ // These initializers are [4] since C++ dictates you _must_ leave space
+ // for the trailing '\0', even though ISO C says you don't need to!
+
+ CYG_REPORT_FUNCNAMETYPE("asctime_r", "returning \"%s\"");
+ CYG_REPORT_FUNCARG2("__timeptr = %08x, __buf = %08x", __timeptr, __buf);
+
+ // paranoia - most of these aren't required but could be helpful to
+ // a programmer debugging their own app.
+ CYG_CHECK_DATA_PTR(__timeptr, "__timeptr is not a valid pointer!");
+ CYG_CHECK_DATA_PTR(__buf, "__buf is not a valid pointer!");
+
+ CYG_PRECONDITION((__timeptr->tm_sec >= 0) && (__timeptr->tm_sec < 62),
+ "__timeptr->tm_sec out of range!");
+ CYG_PRECONDITION((__timeptr->tm_min >= 0) && (__timeptr->tm_min < 60),
+ "__timeptr->tm_min out of range!");
+ CYG_PRECONDITION((__timeptr->tm_hour >= 0) && (__timeptr->tm_hour < 24),
+ "__timeptr->tm_hour out of range!");
+ // Currently I don't check _actual_ numbers of days in each month here
+ // FIXME: No reason why not though
+ CYG_PRECONDITION((__timeptr->tm_mday >= 1) && (__timeptr->tm_mday < 32),
+ "__timeptr->tm_mday out of range!");
+ CYG_PRECONDITION((__timeptr->tm_mon >= 0) && (__timeptr->tm_mon < 12),
+ "__timeptr->tm_mon out of range!");
+ CYG_PRECONDITION((__timeptr->tm_wday >= 0) && (__timeptr->tm_wday < 7),
+ "__timeptr->tm_wday out of range!");
+ CYG_PRECONDITION((__timeptr->tm_yday >= 0) && (__timeptr->tm_yday < 366),
+ "__timeptr->tm_yday out of range!");
+ CYG_PRECONDITION((__timeptr->tm_year > -1900) &&
+ (__timeptr->tm_year < 8100),
+ "__timeptr->tm_year out of range!");
+
+ // we can't use strftime because ISO C is stupid enough not to allow
+ // the strings in asctime() to be localized. Duh.
+
+ // day of the week
+ memcpy(&__buf[0], cyg_libc_time_day_name[__timeptr->tm_wday], 3);
+ __buf[3] = ' ';
+
+ // month
+ memcpy(&__buf[4], cyg_libc_time_month_name[__timeptr->tm_mon], 3);
+ __buf[7] = ' ';
+
+ __i = 8;
+
+ // day of the month
+ __i += cyg_libc_time_itoa( (cyg_uint8 *)&__buf[__i], __timeptr->tm_mday, 2,
+ true);
+ __buf[__i++] = ' ';
+
+ // hour
+ __i += cyg_libc_time_itoa( (cyg_uint8 *)&__buf[__i], __timeptr->tm_hour, 2,
+ true);
+ __buf[__i++] = ':';
+
+ // minute
+ __i += cyg_libc_time_itoa( (cyg_uint8 *)&__buf[__i], __timeptr->tm_min, 2,
+ true);
+ __buf[__i++] = ':';
+
+ // second
+ __i += cyg_libc_time_itoa((cyg_uint8 *) &__buf[__i], __timeptr->tm_sec, 2,
+ true);
+ __buf[__i++] = ' ';
+
+ // year
+ __i += cyg_libc_time_itoa( (cyg_uint8 *)&__buf[__i],
+ 1900+__timeptr->tm_year, 0, true);
+
+ __buf[__i++] = '\n';
+ __buf[__i++] = '\0';
+
+ CYG_REPORT_RETVAL(__buf);
+ return __buf;
+} // asctime_r()
+
+#endif // ifdef CYGIMP_LIBC_TIME_ASCTIME_R_INLINE
+
+////////////////////////////////
+// gmtime_r() - POSIX.1 8.3.6 //
+////////////////////////////////
+//
+// This converts a time_t into a struct tm expressed in UTC, and stores
+// the result in the space occupied by __result
+//
+
+#ifdef CYGFUN_LIBC_TIME_POSIX
+# define __gmtime_r gmtime_r
+#else
+// prototype internal function
+__externC struct tm *
+__gmtime_r( const time_t *__timer, struct tm *__result );
+#endif
+
+#ifdef CYGIMP_LIBC_TIME_GMTIME_R_INLINE
+
+#include <cyg/libc/time/timeutil.h> // for cyg_libc_time_month_lengths
+
+CYGPRI_LIBC_TIME_GMTIME_R_INLINE struct tm *
+__gmtime_r( const time_t *__timer, struct tm *__result )
+{
+ time_t _tim;
+ const cyg_uint8 *_months_p;
+
+ CYG_REPORT_FUNCNAMETYPE("gmtime_r", "returning %08x");
+ CYG_CHECK_DATA_PTR(__timer, "__timer is not a valid pointer!");
+ CYG_CHECK_DATA_PTR(__result, "__result is not a valid pointer!");
+ CYG_REPORT_FUNCARG2("*__timer=%d, __result is at %08x",
+ *__timer, __result);
+
+#define CYGNUM_LIBC_TIME_SECSPERDAY (60*60*24)
+#define CYGNUM_LIBC_TIME_SECSPERYEAR (CYGNUM_LIBC_TIME_SECSPERDAY * 365)
+#define CYGNUM_LIBC_TIME_SECSPERLEAPYEAR (CYGNUM_LIBC_TIME_SECSPERDAY * 366)
+
+ _tim = *__timer;
+
+ // First, work out year. Start off with 1970 and work forwards or backwards
+ // depending on the sign of _tim
+ __result->tm_year = 70;
+
+ // we also work out the day of the week of the start of the year as we
+ // go along
+ __result->tm_wday = CYGNUM_LIBC_TIME_EPOCH_WDAY;
+
+ while (_tim < 0) {
+ // Work backwards
+
+ --__result->tm_year;
+
+ // Check for a leap year.
+ if (cyg_libc_time_year_is_leap(1900 + __result->tm_year)) {
+ _tim += CYGNUM_LIBC_TIME_SECSPERLEAPYEAR;
+ __result->tm_wday -= 366;
+ } // if
+ else {
+ _tim += CYGNUM_LIBC_TIME_SECSPERYEAR;
+ __result->tm_wday -= 365;
+ } // else
+
+ } // while
+
+ while (_tim >= CYGNUM_LIBC_TIME_SECSPERYEAR) {
+ // Work forwards
+
+ if (cyg_libc_time_year_is_leap(1900 + __result->tm_year)) {
+
+ // But if this is a leap year, its possible that we are in the
+ // middle of the last "extra" day
+ if (_tim < CYGNUM_LIBC_TIME_SECSPERLEAPYEAR)
+ break;
+
+ _tim -= CYGNUM_LIBC_TIME_SECSPERLEAPYEAR;
+ __result->tm_wday += 366;
+ } // if
+ else {
+ _tim -= CYGNUM_LIBC_TIME_SECSPERYEAR;
+ __result->tm_wday += 365;
+ }
+ ++__result->tm_year;
+ } // while
+
+ // Day of the year. We know _tim is +ve now
+ CYG_ASSERT(_tim >= 0,
+ "Number of seconds since start of year is negative!");
+ __result->tm_yday = _tim / CYGNUM_LIBC_TIME_SECSPERDAY;
+
+ // Day of the week. Normalize to be 0..6, and note that it might
+ // be negative, so we have to deal with the modulus being
+ // implementation-defined for -ve numbers (ISO C 6.3.5)
+ __result->tm_wday = (((__result->tm_wday + __result->tm_yday)%7)+7)%7;
+
+ // Month and Day of the month
+
+ _months_p = cyg_libc_time_month_lengths[
+ cyg_libc_time_year_is_leap(1900 + __result->tm_year) ? 1 : 0 ];
+
+ __result->tm_mday = __result->tm_yday+1;
+
+ for (__result->tm_mon = 0;
+ __result->tm_mday > _months_p[__result->tm_mon];
+ ++__result->tm_mon) {
+
+ __result->tm_mday -= _months_p[__result->tm_mon];
+
+ } // for
+
+ _tim -= __result->tm_yday*CYGNUM_LIBC_TIME_SECSPERDAY;
+
+ // hours, mins secs
+ __result->tm_hour = (int) (_tim / 3600);
+ _tim %= 3600;
+ __result->tm_min = (int) (_tim / 60);
+ __result->tm_sec = (int) (_tim % 60);
+
+ __result->tm_isdst = 0; // gmtime always returns non-DST
+
+ CYG_REPORT_RETVAL(__result);
+
+ return __result;
+} // gmtime_r()
+
+#endif // ifdef CYGIMP_LIBC_TIME_GMTIME_R_INLINE
+
+///////////////////////////////////
+// localtime_r() - POSIX.1 8.3.7 //
+///////////////////////////////////
+//
+// This converts a time_t into a struct tm expressed in local time, and
+// stores the result in the space occupied by __result
+//
+
+#ifdef CYGFUN_LIBC_TIME_POSIX
+# define __localtime_r localtime_r
+#else
+// prototype internal function
+__externC struct tm *
+__localtime_r( const time_t *__timer, struct tm *__result );
+#endif
+
+#ifdef CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE
+
+#include <cyg/libc/time/timeutil.h> // for cyg_libc_time_normalize_structtm()
+
+CYGPRI_LIBC_TIME_LOCALTIME_R_INLINE struct tm *
+__localtime_r( const time_t *__timer, struct tm *__result )
+{
+ time_t __stdoffset, __dstoffset;
+ CYG_REPORT_FUNCNAMETYPE("localtime_r", "returning %08x");
+ CYG_CHECK_DATA_PTR(__timer, "__timer is not a valid pointer!");
+ CYG_CHECK_DATA_PTR(__result, "__result is not a valid pointer!");
+ CYG_REPORT_FUNCARG2("*__timer=%d, __result is at %08x",
+ *__timer, __result);
+
+ __gmtime_r(__timer, __result);
+
+ // Adjust for STD/DST
+ __result->tm_isdst = cyg_libc_time_getzoneoffsets(&__stdoffset,
+ &__dstoffset);
+
+ if (__result->tm_isdst == 0) { // STD
+ __result->tm_sec += __stdoffset;
+ cyg_libc_time_normalize_structtm( __result );
+ } // if
+ else if (__result->tm_isdst > 0) { // DST
+ __result->tm_sec += __dstoffset;
+ cyg_libc_time_normalize_structtm( __result );
+ } // if
+ // Don't do anything for tm_isdst == -1
+
+ CYG_REPORT_RETVAL(__result);
+
+ return __result;
+} // localtime_r()
+
+#endif // ifdef CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE
+
+
+///////////////////////////////
+// ctime_r() - POSIX.1 8.3.5 //
+///////////////////////////////
+//
+// This returns the equivalent of ctime() but writes to __buf
+// to store the returned string
+//
+
+#ifdef CYGFUN_LIBC_TIME_POSIX
+# define __ctime_r ctime_r
+#else
+// prototype internal function
+__externC char *
+__ctime_r( const time_t *__timer, char *__buf );
+#endif
+
+#ifdef CYGIMP_LIBC_TIME_CTIME_R_INLINE
+
+CYGPRI_LIBC_TIME_CTIME_R_INLINE char *
+__ctime_r( const time_t *__timer, char *__buf )
+{
+ struct tm _mytm;
+
+ CYG_REPORT_FUNCNAMETYPE("ctime_r", "returning \"%s\"");
+
+ CYG_CHECK_DATA_PTR(__timer, "__timer is not a valid pointer!");
+ CYG_CHECK_DATA_PTR(__buf, "__buf is not a valid pointer!");
+
+ CYG_REPORT_FUNCARG2("*__timer = %d, __buf=%08x", *__timer, __buf);
+
+ __localtime_r( __timer, &_mytm );
+
+ __asctime_r(&_mytm, __buf);
+
+ CYG_REPORT_RETVAL(__buf);
+
+ return __buf;
+} // ctime_r()
+
+#endif // ifdef CYGIMP_LIBC_TIME_CTIME_R_INLINE
+
+
+//===========================================================================
+//
+// ISO C functions
+
+// Time manipulation functions - ISO C 7.12.2
+
+/////////////////////////////////
+// difftime() - ISO C 7.12.2.2 //
+/////////////////////////////////
+//
+// This returns (__time1 - __time0) in seconds
+//
+
+#ifdef CYGIMP_LIBC_TIME_DIFFTIME_INLINE
+
+CYGPRI_LIBC_TIME_DIFFTIME_INLINE double
+difftime( time_t __time1, time_t __time0 )
+{
+ double _ret;
+
+ CYG_REPORT_FUNCNAMETYPE("difftime", "returning %f");
+ CYG_REPORT_FUNCARG2("__time1=%d, __time0=%d", __time1, __time0);
+
+ _ret = (double)(__time1 - __time0);
+
+ CYG_REPORT_RETVAL(_ret);
+
+ return _ret;
+} // difftime()
+
+#endif // ifdef CYGIMP_LIBC_TIME_DIFFTIME_INLINE
+
+///////////////////////////////
+// mktime() - ISO C 7.12.2.3 //
+///////////////////////////////
+//
+// This converts a "struct tm" to a "time_t"
+//
+
+#ifdef CYGIMP_LIBC_TIME_MKTIME_INLINE
+
+#include <cyg/libc/time/timeutil.h> // for cyg_libc_time_normalize_structtm()
+ // and cyg_libc_time_month_lengths
+
+CYGPRI_LIBC_TIME_MKTIME_INLINE time_t
+mktime( struct tm *__timeptr )
+{
+ time_t _ret;
+ cyg_count16 _i;
+ cyg_count32 _daycount;
+ cyg_bool _leap;
+
+ CYG_REPORT_FUNCNAMETYPE("mktime", "returning %d");
+ CYG_REPORT_FUNCARG1( "__timeptr is at address %08x", __timeptr);
+
+ CYG_CHECK_DATA_PTR(__timeptr, "__timeptr is not a valid pointer!");
+
+ // First deal with STD/DST. If tm_isdst==-1 (the "autodetect" value)
+ // we assume its already in UTC. FIXME: is this correct behaviour? Hmm....
+
+#if 0
+// FIXME: This doesn't seem to be the way to go
+ if (__timeptr->tm_isdst == 0) { // STD
+ // take _off_ the std offset to get us back to UTC from localtime
+ __timeptr->tm_sec -= (int)cyg_libc_time_current_std_offset;
+ } // if
+ else if (__timeptr->tm_isdst > 0) { // DST
+ // take _off_ the dst offset to get us back to UTC from localtime
+ __timeptr->tm_sec -= (int)cyg_libc_time_current_dst_offset;
+ } // if
+#endif
+
+ cyg_libc_time_normalize_structtm(__timeptr);
+
+ // check if a time_t can hold the year. FIXME: we assume it is
+ // 32 bits which gives the year range 1902 - 2038
+ if ( (__timeptr->tm_year <= 2) || (__timeptr->tm_year >= 138) ) {
+ CYG_REPORT_RETVAL(-1);
+ return (time_t)-1;
+ }
+
+ // fill in the rest of the struct tm i.e. tm_wday and tm_yday
+
+ _leap = cyg_libc_time_year_is_leap(1900 + __timeptr->tm_year);
+
+ for (_i=0, _daycount=0; _i<12; ++_i) {
+ if (_i == __timeptr->tm_mon) {
+ _daycount += __timeptr->tm_mday - 1;
+ break;
+ } // if
+ else {
+ _daycount += cyg_libc_time_month_lengths[_leap][_i];
+ } // else
+ } // for
+
+ CYG_ASSERT(_i<12, "Reached end of year. __timeptr->tm_mon must be bad");
+
+ __timeptr->tm_yday = _daycount;
+
+ // now tm_wday
+
+ if (__timeptr->tm_year > 70) {
+ for (_i=70; _i < __timeptr->tm_year; ++_i)
+ _daycount += (cyg_libc_time_year_is_leap(1900 + _i) ? 366 : 365);
+ } // if
+ else if (__timeptr->tm_year < 70) {
+ for (_i=70; _i > __timeptr->tm_year; --_i)
+ _daycount -= (cyg_libc_time_year_is_leap(1900 + _i-1) ? 366 : 365);
+ } // else if
+
+ __timeptr->tm_wday = (_daycount + CYGNUM_LIBC_TIME_EPOCH_WDAY) % 7;
+
+ // if _daycount was negative, on some targets the modulo operator will
+ // return negative, so we adjust for that
+
+ if (__timeptr->tm_wday < 0)
+ __timeptr->tm_wday += 7;
+
+ // now finally work out return value
+
+ _ret = __timeptr->tm_sec + 60*__timeptr->tm_min + 60*60*__timeptr->tm_hour;
+ _ret += _daycount*24*60*60;
+
+ CYG_REPORT_RETVAL(_ret);
+
+ return _ret;
+} // mktime()
+
+#endif // ifdef CYGIMP_LIBC_TIME_MKTIME_INLINE
+
+
+// Time conversion functions - ISO C 7.12.3
+
+////////////////////////////////
+// asctime() - ISO C 7.12.3.1 //
+////////////////////////////////
+//
+// This returns a textual representation of a struct tm
+//
+
+#ifdef CYGIMP_LIBC_TIME_ASCTIME_INLINE
+
+extern char cyg_libc_time_asctime_buf[];
+
+CYGPRI_LIBC_TIME_ASCTIME_INLINE char *
+asctime( const struct tm *__timeptr )
+{
+ CYG_REPORT_FUNCNAMETYPE("__asctime", "returning \"%s\"");
+ CYG_REPORT_FUNCARG1("__timeptr = %08x", __timeptr);
+
+ // paranoia
+ CYG_CHECK_DATA_PTR(__timeptr, "__timeptr is not a valid pointer!");
+
+ (void)__asctime_r( __timeptr, cyg_libc_time_asctime_buf );
+
+ CYG_REPORT_RETVAL(cyg_libc_time_asctime_buf);
+
+ return cyg_libc_time_asctime_buf;
+} // asctime()
+
+#endif // ifdef CYGIMP_LIBC_TIME_ASCTIME_INLINE
+
+
+///////////////////////////////
+// gmtime() - ISO C 7.12.3.3 //
+///////////////////////////////
+//
+// This converts a time_t into a struct tm expressed in UTC
+//
+
+#ifdef CYGIMP_LIBC_TIME_GMTIME_INLINE
+
+extern struct tm cyg_libc_time_gmtime_buf;
+
+CYGPRI_LIBC_TIME_GMTIME_INLINE struct tm *
+gmtime( const time_t *__timer )
+{
+ CYG_REPORT_FUNCNAMETYPE("gmtime", "returning %08x");
+ CYG_CHECK_DATA_PTR(__timer, "__timer is not a valid pointer!");
+ CYG_REPORT_FUNCARG1("*__timer=%d", *__timer);
+
+ __gmtime_r(__timer, &cyg_libc_time_gmtime_buf);
+
+ CYG_REPORT_RETVAL(&cyg_libc_time_gmtime_buf);
+
+ return &cyg_libc_time_gmtime_buf;
+} // gmtime()
+
+#endif // ifdef CYGIMP_LIBC_TIME_GMTIME_INLINE
+
+
+//////////////////////////////////
+// localtime() - ISO C 7.12.3.4 //
+//////////////////////////////////
+//
+// This converts a time_t into a struct tm expressed in local time
+//
+
+#ifdef CYGIMP_LIBC_TIME_LOCALTIME_INLINE
+
+extern struct tm cyg_libc_time_localtime_buf;
+
+CYGPRI_LIBC_TIME_LOCALTIME_INLINE struct tm *
+localtime( const time_t *__timer )
+{
+ CYG_REPORT_FUNCNAMETYPE("localtime", "returning %08x");
+ CYG_CHECK_DATA_PTR(__timer, "__timer is not a valid pointer!");
+ CYG_REPORT_FUNCARG1("*__timer=%d", *__timer);
+
+ __localtime_r(__timer, &cyg_libc_time_localtime_buf);
+
+ CYG_REPORT_RETVAL(&cyg_libc_time_localtime_buf);
+
+ return &cyg_libc_time_localtime_buf;
+} // localtime()
+
+#endif // ifdef CYGIMP_LIBC_TIME_LOCALTIME_INLINE
+
+
+//////////////////////////////
+// ctime() - ISO C 7.12.3.2 //
+//////////////////////////////
+//
+// This returns asctime(localtime(__timeptr))
+//
+
+#ifdef CYGIMP_LIBC_TIME_CTIME_INLINE
+
+CYGPRI_LIBC_TIME_CTIME_INLINE char *
+ctime( const time_t *__timer )
+{
+ char *_str;
+
+ CYG_REPORT_FUNCNAMETYPE("ctime", "returning \"%s\"");
+ CYG_CHECK_DATA_PTR( __timer, "__timer is not a valid pointer!");
+ CYG_REPORT_FUNCARG1("*__timer = %d", *__timer);
+
+ _str = asctime(localtime(__timer));
+
+ CYG_REPORT_RETVAL(_str);
+
+ return _str;
+} // ctime()
+
+#endif // ifdef CYGIMP_LIBC_TIME_CTIME_INLINE
+
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // CYGONCE_LIBC_TIME_INL multiple inclusion protection
+
+// EOF time.inl
diff --git a/cesar/ecos/packages/language/c/libc/time/current/include/timeutil.h b/cesar/ecos/packages/language/c/libc/time/current/include/timeutil.h
new file mode 100644
index 0000000000..27e39c043c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/include/timeutil.h
@@ -0,0 +1,111 @@
+#ifndef CYGONCE_LIBC_TIME_TIMEUTIL_H
+#define CYGONCE_LIBC_TIME_TIMEUTIL_H
+//========================================================================
+//
+// timeutil.h
+//
+// ISO C date and time implementation support functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-03-03
+// Purpose: Provide declarations for support functions used by the
+// ISO C date and time implementation
+// Description:
+// Usage: #include <cyg/libc/time/timeutil.h>
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// GLOBALS
+
+// Strings of the days and month names
+// FIXME: should comment out "const" in multi-dimensional arrays until
+// PR 19440 is fixed
+extern const char cyg_libc_time_day_name[7][10];
+extern const cyg_uint8 cyg_libc_time_day_name_len[7];
+extern const char cyg_libc_time_month_name[12][10];
+extern const cyg_uint8 cyg_libc_time_month_name_len[12];
+
+// number of days in each month, defined for normal and leap years
+extern const cyg_uint8 cyg_libc_time_month_lengths[2][12];
+
+
+// FUNCTION PROTOTYPES
+
+////////////////////////////////////////
+// cyg_libc_time_normalize_structtm() //
+////////////////////////////////////////
+//
+// cyg_libc_time_normalize_structtm() will adjust the fields of a struct tm
+// so that they are within the normal ranges expected.
+// tm_wday, tm_yday, and tm_isdst are ignored
+
+extern void
+cyg_libc_time_normalize_structtm( struct tm *__timeptr );
+
+//////////////////////////
+// cyg_libc_time_itoa() //
+//////////////////////////
+//
+// This converts num to a string and puts it into s padding with
+// "0"'s if padzero is set, or spaces otherwise if necessary.
+// The number of chars written to s is returned
+//
+
+extern cyg_ucount8
+cyg_libc_time_itoa( cyg_uint8 *__s, cyg_int32 __num, cyg_uint8 __width,
+ cyg_bool __padzero );
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // CYGONCE_LIBC_TIME_TIMEUTIL_H multiple inclusion protection
+
+// EOF timeutil.h
diff --git a/cesar/ecos/packages/language/c/libc/time/current/src/asctime.cxx b/cesar/ecos/packages/language/c/libc/time/current/src/asctime.cxx
new file mode 100644
index 0000000000..dd333abeed
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/src/asctime.cxx
@@ -0,0 +1,77 @@
+//========================================================================
+//
+// asctime.cxx
+//
+// ISO C date and time implementation for asctime()
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-02-26
+// Purpose: Provide implementation of ISO C asctime()
+// Description: This file provides the linkable symbol version of asctime()
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+
+// The following lines allow asctime() to be included non-inline which
+// actually defines it as a function here
+#define CYGPRI_LIBC_TIME_ASCTIME_INLINE
+#ifndef CYGIMP_LIBC_TIME_ASCTIME_INLINE
+# define CYGIMP_LIBC_TIME_ASCTIME_INLINE
+#endif
+
+#include <time.h> // Main date and time definitions
+
+// GLOBALS
+
+// 26 isn't such a magic value if you work out what asctime is returning
+// It should do until 23:59:59 31st Dec 9999 anyway :-)
+char cyg_libc_time_asctime_buf[26];
+
+// EOF asctime.cxx
diff --git a/cesar/ecos/packages/language/c/libc/time/current/src/asctime_r.cxx b/cesar/ecos/packages/language/c/libc/time/current/src/asctime_r.cxx
new file mode 100644
index 0000000000..a1d5df854e
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/src/asctime_r.cxx
@@ -0,0 +1,71 @@
+//========================================================================
+//
+// asctime_r.cxx
+//
+// POSIX 1003.1 date and time implementation for asctime_r()
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-02-26
+// Purpose: Provide implementation of POSIX 1003.1 asctime()
+// Description: This file provides the linkable symbol version of asctime_r()
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+
+// The following lines allow asctime_r() to be included non-inline which
+// actually defines it as a function here
+#define CYGPRI_LIBC_TIME_ASCTIME_R_INLINE
+#ifndef CYGIMP_LIBC_TIME_ASCTIME_R_INLINE
+# define CYGIMP_LIBC_TIME_ASCTIME_R_INLINE
+#endif
+
+#include <time.h> // Main date and time definitions
+
+// EOF asctime_r.cxx
diff --git a/cesar/ecos/packages/language/c/libc/time/current/src/clock.cxx b/cesar/ecos/packages/language/c/libc/time/current/src/clock.cxx
new file mode 100644
index 0000000000..c38d8e84f2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/src/clock.cxx
@@ -0,0 +1,135 @@
+//===========================================================================
+//
+// clock.cxx
+//
+// ISO C date and time implementation for clock()
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-03-05
+// Purpose: Provides an implementation of the ISO C function clock()
+// from ISO C section 7.12.2.1
+// Description: This file uses the kernel real time clock to determine
+// the complete running time of the system - since we only
+// have one task, even though there are perhaps multiple threads
+// that is still the running time of the "program"
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // Configuration header
+
+#ifdef CYGSEM_LIBC_TIME_CLOCK_WORKING
+# include <pkgconf/kernel.h> // Kernel config header
+#endif
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_ass.h> // Assertion infrastructure
+#include <cyg/infra/cyg_trac.h> // Tracing infrastructure
+
+#include <time.h> // Header for all time-related functions
+
+#ifdef CYGSEM_LIBC_TIME_CLOCK_WORKING
+# include <cyg/kernel/clock.hxx> // Kernel clock definitions
+# include <cyg/kernel/clock.inl> // Kernel clock inline functions
+#endif
+
+
+// TRACE
+
+# if defined(CYGDBG_USE_TRACING) && defined(CYGNUM_LIBC_TIME_CLOCK_TRACE_LEVEL)
+static int clock_trace = CYGNUM_LIBC_TIME_CLOCK_TRACE_LEVEL;
+# define TL1 (0 < clock_trace)
+# else
+# define TL1 (0)
+# endif
+
+// FUNCTIONS
+
+externC clock_t
+clock( void )
+{
+ CYG_REPORT_FUNCNAMETYPE( "clock", "returning clock tick %d" );
+ CYG_REPORT_FUNCARGVOID();
+
+#ifdef CYGSEM_LIBC_TIME_CLOCK_WORKING
+ cyg_tick_count curr_clock; // kernel clock value
+ Cyg_Clock::cyg_resolution resolution; // kernel clock resolution
+ clock_t clocks;
+ unsigned long long temp;
+
+ CYG_TRACE0( TL1, "getting clock resolution" );
+
+ // get the resolution
+ resolution = Cyg_Clock::real_time_clock->get_resolution();
+
+ CYG_TRACE2( TL1, "got resolution dividend %d divisor %d. Getting "
+ "clock value", resolution.dividend, resolution.divisor );
+
+ // get the value
+ curr_clock = Cyg_Clock::real_time_clock->current_value();
+
+ CYG_TRACE1( TL1, "got clock value %d", curr_clock );
+
+ // scale the value so that clock()/CLOCKS_PER_SEC works
+ // We use an unsigned long long to avoid overflow as the dividend
+ // and divisors tend to be huge
+ temp = (1000000000 / CLOCKS_PER_SEC);
+ temp *= resolution.divisor;
+ temp = (unsigned long long)curr_clock * resolution.dividend / temp;
+ clocks = (clock_t)temp;
+
+ CYG_REPORT_RETVAL( clocks );
+ return clocks;
+
+#else // i.e. ifndef CYGSEM_LIBC_TIME_CLOCK_WORKING
+ CYG_REPORT_RETVAL( -1 );
+ return (clock_t) -1;
+#endif
+
+} // clock()
+
+
+// EOF clock.cxx
diff --git a/cesar/ecos/packages/language/c/libc/time/current/src/ctime.cxx b/cesar/ecos/packages/language/c/libc/time/current/src/ctime.cxx
new file mode 100644
index 0000000000..01345b6232
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/src/ctime.cxx
@@ -0,0 +1,67 @@
+//========================================================================
+//
+// ctime.cxx
+//
+// ISO C date and time implementation for ctime()
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-02-26
+// Purpose: Provide implementation of ISO C ctime()
+// Description: This file provides the linkable symbol version of ctime()
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// The following lines allow ctime() to be included non-inline which
+// actually defines it as a function here
+#define CYGPRI_LIBC_TIME_CTIME_INLINE
+#ifndef CYGIMP_LIBC_TIME_CTIME_INLINE
+# define CYGIMP_LIBC_TIME_CTIME_INLINE
+#endif
+
+#include <time.h> // Main date and time definitions
+
+// EOF ctime.cxx
diff --git a/cesar/ecos/packages/language/c/libc/time/current/src/ctime_r.cxx b/cesar/ecos/packages/language/c/libc/time/current/src/ctime_r.cxx
new file mode 100644
index 0000000000..a3995777f2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/src/ctime_r.cxx
@@ -0,0 +1,67 @@
+//========================================================================
+//
+// ctime_r.cxx
+//
+// POSIX 1003.1 date and time implementation for ctime_r()
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-02-26
+// Purpose: Provide implementation of POSIX 1003.1 ctime()
+// Description: This file provides the linkable symbol version of ctime_r()
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// The following lines allow ctime_r() to be included non-inline which
+// actually defines it as a function here
+#define CYGPRI_LIBC_TIME_CTIME_R_INLINE
+#ifndef CYGIMP_LIBC_TIME_CTIME_R_INLINE
+# define CYGIMP_LIBC_TIME_CTIME_R_INLINE
+#endif
+
+#include <time.h> // Main date and time definitions
+
+// EOF ctime_r.cxx
diff --git a/cesar/ecos/packages/language/c/libc/time/current/src/difftime.cxx b/cesar/ecos/packages/language/c/libc/time/current/src/difftime.cxx
new file mode 100644
index 0000000000..fdaf037f10
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/src/difftime.cxx
@@ -0,0 +1,67 @@
+//========================================================================
+//
+// difftime.cxx
+//
+// ISO C date and time implementation for difftime()
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-02-26
+// Purpose: Provide implementation of ISO C difftime()
+// Description: This file provides the linkable symbol version of difftime()
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// The following lines allow difftime() to be included non-inline which
+// actually defines it as a function here
+#define CYGPRI_LIBC_TIME_DIFFTIME_INLINE
+#ifndef CYGIMP_LIBC_TIME_DIFFTIME_INLINE
+# define CYGIMP_LIBC_TIME_DIFFTIME_INLINE
+#endif
+
+#include <time.h> // Main date and time definitions
+
+// EOF difftime.cxx
diff --git a/cesar/ecos/packages/language/c/libc/time/current/src/gmtime.cxx b/cesar/ecos/packages/language/c/libc/time/current/src/gmtime.cxx
new file mode 100644
index 0000000000..932694e9ca
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/src/gmtime.cxx
@@ -0,0 +1,75 @@
+//========================================================================
+//
+// gmtime.cxx
+//
+// ISO C date and time implementation for gmtime()
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-02-26
+// Purpose: Provide implementation of ISO C gmtime()
+// Description: This file provides the linkable symbol version of gmtime()
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+
+// The following lines allow gmtime() to be included non-inline which
+// actually defines it as a function here
+#define CYGPRI_LIBC_TIME_GMTIME_INLINE
+#ifndef CYGIMP_LIBC_TIME_GMTIME_INLINE
+# define CYGIMP_LIBC_TIME_GMTIME_INLINE
+#endif
+
+#include <time.h> // Main date and time definitions
+
+// GLOBALS
+
+struct tm cyg_libc_time_gmtime_buf;
+
+// EOF gmtime.cxx
diff --git a/cesar/ecos/packages/language/c/libc/time/current/src/gmtime_r.cxx b/cesar/ecos/packages/language/c/libc/time/current/src/gmtime_r.cxx
new file mode 100644
index 0000000000..584dcbf020
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/src/gmtime_r.cxx
@@ -0,0 +1,67 @@
+//========================================================================
+//
+// gmtime_r.cxx
+//
+// POSIX 1003.1 date and time implementation for gmtime_r()
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-02-26
+// Purpose: Provide implementation of POSIX 1003.1 gmtime()
+// Description: This file provides the linkable symbol version of gmtime_r()
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// The following lines allow gmtime_r() to be included non-inline which
+// actually defines it as a function here
+#define CYGPRI_LIBC_TIME_GMTIME_R_INLINE
+#ifndef CYGIMP_LIBC_TIME_GMTIME_R_INLINE
+# define CYGIMP_LIBC_TIME_GMTIME_R_INLINE
+#endif
+
+#include <time.h> // Main date and time definitions
+
+// EOF gmtime_r.cxx
diff --git a/cesar/ecos/packages/language/c/libc/time/current/src/localtime.cxx b/cesar/ecos/packages/language/c/libc/time/current/src/localtime.cxx
new file mode 100644
index 0000000000..d7b39eb381
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/src/localtime.cxx
@@ -0,0 +1,71 @@
+//========================================================================
+//
+// localtime.cxx
+//
+// ISO C date and time implementation for localtime()
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-02-26
+// Purpose: Provide implementation of ISO C localtime()
+// Description: This file provides the linkable symbol version of localtime()
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// The following lines allow localtime() to be included non-inline which
+// actually defines it as a function here
+#define CYGPRI_LIBC_TIME_LOCALTIME_INLINE
+#ifndef CYGIMP_LIBC_TIME_LOCALTIME_INLINE
+# define CYGIMP_LIBC_TIME_LOCALTIME_INLINE
+#endif
+
+#include <time.h> // Main date and time definitions
+
+// GLOBALS
+
+struct tm cyg_libc_time_localtime_buf;
+
+// EOF localtime.cxx
diff --git a/cesar/ecos/packages/language/c/libc/time/current/src/localtime_r.cxx b/cesar/ecos/packages/language/c/libc/time/current/src/localtime_r.cxx
new file mode 100644
index 0000000000..6df5877828
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/src/localtime_r.cxx
@@ -0,0 +1,68 @@
+//========================================================================
+//
+// localtime_r.cxx
+//
+// POSIX 1003.1 date and time implementation for localtime_r()
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-02-26
+// Purpose: Provide implementation of POSIX 1003.1 localtime()
+// Description: This file provides the linkable symbol version of
+// localtime_r()
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// The following lines allow localtime_r() to be included non-inline which
+// actually defines it as a function here
+#define CYGPRI_LIBC_TIME_LOCALTIME_R_INLINE
+#ifndef CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE
+# define CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE
+#endif
+
+#include <time.h> // Main date and time definitions
+
+// EOF localtime_r.cxx
diff --git a/cesar/ecos/packages/language/c/libc/time/current/src/mktime.cxx b/cesar/ecos/packages/language/c/libc/time/current/src/mktime.cxx
new file mode 100644
index 0000000000..4128f370b4
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/src/mktime.cxx
@@ -0,0 +1,67 @@
+//========================================================================
+//
+// mktime.cxx
+//
+// ISO C date and time implementation for mktime()
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-02-26
+// Purpose: Provide implementation of ISO C mktime()
+// Description: This file provides the linkable symbol version of mktime()
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// The following lines allow mktime() to be included non-inline which
+// actually defines it as a function here
+#define CYGPRI_LIBC_TIME_MKTIME_INLINE
+#ifndef CYGIMP_LIBC_TIME_MKTIME_INLINE
+# define CYGIMP_LIBC_TIME_MKTIME_INLINE
+#endif
+
+#include <time.h> // Main date and time definitions
+
+// EOF mktime.cxx
diff --git a/cesar/ecos/packages/language/c/libc/time/current/src/settime.cxx b/cesar/ecos/packages/language/c/libc/time/current/src/settime.cxx
new file mode 100644
index 0000000000..4efc93b3e7
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/src/settime.cxx
@@ -0,0 +1,97 @@
+//========================================================================
+//
+// settime.cxx
+//
+// Date and time support function to set time
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-02-26
+// Purpose: Provide support function to set the time
+// Description: The wallclock device is used to store the time in UTC
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <time.h> // Main date and time definitions
+#include <cyg/infra/cyg_ass.h> // Assertion infrastructure
+#include <cyg/infra/cyg_trac.h> // Tracing infrastructure
+#ifdef CYGSEM_LIBC_TIME_SETTIME_WORKING
+# include <cyg/io/wallclock.hxx> // Wallclock class definitions
+#endif
+
+// FUNCTIONS
+
+/////////////////////////////
+// cyg_libc_time_settime() //
+/////////////////////////////
+//
+// This function sets the current time for the system. The time is
+// specified as a time_t in UTC. It returns non-zero on error.
+//
+
+externC cyg_bool
+cyg_libc_time_settime( time_t utctime )
+{
+ CYG_REPORT_FUNCNAMETYPE("cyg_libc_time_settime", "returning status %d");
+ CYG_REPORT_FUNCARG1DV(utctime);
+
+#ifdef CYGSEM_LIBC_TIME_SETTIME_WORKING
+
+ Cyg_WallClock::wallclock->set_current_time((cyg_uint32) utctime);
+
+ CYG_REPORT_RETVAL(false);
+ return false;
+#else
+ CYG_REPORT_RETVAL(true);
+ return true;
+#endif
+
+} // cyg_libc_time_settime()
+
+// EOF settime.cxx
diff --git a/cesar/ecos/packages/language/c/libc/time/current/src/strftime.cxx b/cesar/ecos/packages/language/c/libc/time/current/src/strftime.cxx
new file mode 100644
index 0000000000..c6e7bc3ac7
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/src/strftime.cxx
@@ -0,0 +1,334 @@
+//========================================================================
+//
+// strftime.cxx
+//
+// ISO C date and time implementation for strftime()
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-02-26
+// Purpose: Provide implementation of the ISO C function strftime()
+// from ISO C section 7.12.3.5
+// Description: This file provides the implementation of strftime()
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_ass.h> // Assertion infrastructure
+#include <cyg/infra/cyg_trac.h> // Tracing infrastructure
+#include <time.h> // Main date and time definitions
+#include <cyg/libc/time/timeutil.h>// For cyg_libc_time_{day,month}_name{,_len}
+
+// FUNCTION PROTOTYPES
+
+// FIXME: This all needs to be internationalized and localized, both in
+// terms of reading and writing multibyte characters, and that it should
+// refer to the settings of LC_TIME
+
+// FUNCTIONS
+
+// This helper function actually processes the format. Which format to insert
+// is indicated by fmtchar, sizeleft is the maximum space allowed to be used
+// in buf. The number of bytes written is returned, or -1 if there was no
+// space
+
+static cyg_count8
+do_format(cyg_uint8 fmtchar, cyg_ucount32 sizeleft, char *buf,
+ const struct tm *timeptr)
+{
+ cyg_count8 i;
+
+ switch (fmtchar) {
+ case 'a':
+ if (sizeleft<3)
+ return -1;
+ buf[0] = cyg_libc_time_day_name[timeptr->tm_wday][0];
+ buf[1] = cyg_libc_time_day_name[timeptr->tm_wday][1];
+ buf[2] = cyg_libc_time_day_name[timeptr->tm_wday][2];
+ return 3;
+ case 'A':
+ if (sizeleft < cyg_libc_time_day_name_len[timeptr->tm_wday])
+ return -1;
+ for (i=0; i<cyg_libc_time_day_name_len[timeptr->tm_wday]; ++i)
+ buf[i] = cyg_libc_time_day_name[timeptr->tm_wday][i];
+ return i;
+#ifdef CYGFUN_LIBC_TIME_SUS_EXTNS
+ case 'h':
+ // ** fall through **
+#endif
+ case 'b':
+ if (sizeleft<3)
+ return -1;
+ buf[0] = cyg_libc_time_month_name[timeptr->tm_mon][0];
+ buf[1] = cyg_libc_time_month_name[timeptr->tm_mon][1];
+ buf[2] = cyg_libc_time_month_name[timeptr->tm_mon][2];
+ return 3;
+ case 'B':
+ if (sizeleft < cyg_libc_time_month_name_len[timeptr->tm_mon])
+ return -1;
+ for (i=0; i<cyg_libc_time_month_name_len[timeptr->tm_mon]; ++i)
+ buf[i] = cyg_libc_time_month_name[timeptr->tm_mon][i];
+ return i;
+ case 'c':
+ if (sizeleft < 26)
+ return -1;
+
+ // Recurse! Note that we know that we will have left room for the
+ // trailing NULL in the strftime body
+
+ i = strftime( buf, sizeleft+1, "%a %b %d %I:%M:%S%p %Y", timeptr);
+
+ return ((0==i) ? -1 : i);
+ case 'd':
+ if (sizeleft < 2)
+ return -1;
+ buf[0] = (timeptr->tm_mday / 10) + '0';
+ buf[1] = (timeptr->tm_mday % 10) + '0';
+ return 2;
+#ifdef CYGFUN_LIBC_TIME_SUS_EXTNS
+ case 'e':
+ if (sizeleft < 2)
+ return -1;
+ i = (timeptr->tm_mday / 10);
+ buf[0] = (0 == i) ? ' ' : i + '0';
+ buf[1] = (timeptr->tm_mday % 10) + '0';
+ return 2;
+#endif
+ case 'H':
+ if (sizeleft < 2)
+ return -1;
+ buf[0] = (timeptr->tm_hour / 10) + '0';
+ buf[1] = (timeptr->tm_hour % 10) + '0';
+ return 2;
+ case 'I':
+ if (sizeleft < 2)
+ return -1;
+ buf[0] = ((timeptr->tm_hour%12 + 1) / 10) + '0';
+ buf[1] = ((timeptr->tm_hour%12 + 1) % 10) + '0';
+ return 2;
+ case 'j':
+ if (sizeleft < 3)
+ return -1;
+ buf[0] = (timeptr->tm_yday / 100) + '0';
+ buf[1] = ((timeptr->tm_yday % 100) / 10) + '0';
+ buf[2] = (timeptr->tm_yday % 10) + '0';
+ return 3;
+ case 'm':
+ if (sizeleft < 2)
+ return -1;
+ buf[0] = ((timeptr->tm_mon+1) / 10) + '0';
+ buf[1] = ((timeptr->tm_mon+1) % 10) + '0';
+ return 2;
+ case 'M':
+ if (sizeleft < 2)
+ return -1;
+ buf[0] = (timeptr->tm_min / 10) + '0';
+ buf[1] = (timeptr->tm_min % 10) + '0';
+ return 2;
+ case 'p':
+ if (sizeleft < 2)
+ return -1;
+ buf[0] = (timeptr->tm_hour > 11) ? 'p' : 'a';
+ buf[1] = 'm';
+ return 2;
+ case 'S':
+ if (sizeleft < 2)
+ return -1;
+ buf[0] = (timeptr->tm_sec / 10) + '0';
+ buf[1] = (timeptr->tm_sec % 10) + '0';
+ return 2;
+#ifdef CYGFUN_LIBC_TIME_SUS_EXTNS
+ case 'T':
+ if (sizeleft < 8)
+ return -1;
+
+ // Recurse! Note that we know that we will have left room for the
+ // trailing NULL in the strftime body
+
+ i = strftime( buf, sizeleft+1, "%H:%M:%S", timeptr);
+
+ return ((0==i) ? -1 : i);
+#endif
+ case 'U':
+ if (sizeleft < 2)
+ return -1;
+ i = (timeptr->tm_yday - timeptr->tm_wday + 7) / 7;
+ buf[0] = (i / 10) + '0';
+ buf[1] = (i % 10) + '0';
+ return 2;
+ case 'w':
+ // Don't need to check size - we'll always be called with sizeleft > 0
+ buf[0] = timeptr->tm_wday + '0';
+ return 1;
+ case 'W':
+ if (sizeleft < 2)
+ return -1;
+ i = (timeptr->tm_yday + ((8-timeptr->tm_wday) % 7)) / 7;
+ buf[0] = (i / 10) + '0';
+ buf[1] = (i % 10) + '0';
+ return 2;
+ case 'x':
+ if (sizeleft < 15)
+ return -1;
+
+ // Recurse! Note that we know that we will have left room for the
+ // trailing NULL in the strftime body
+
+ i = strftime( buf, sizeleft+1, "%a %b %d %Y", timeptr);
+
+ return (0==i) ? -1 : i;
+ case 'X':
+ if (sizeleft < 10)
+ return -1;
+
+ // Recurse! Note that we know that we will have left room for the
+ // trailing NULL in the strftime body
+
+ i = strftime( buf, sizeleft+1, "%I:%M:%S%p", timeptr);
+
+ return (0==i) ? -1 : i;
+ case 'y':
+ if (sizeleft < 2)
+ return -1;
+ buf[0] = ((timeptr->tm_year % 100) / 10) + '0';
+ buf[1] = ((timeptr->tm_year % 100) % 10) + '0';
+ return 2;
+ case 'Y':
+ if (sizeleft < 4)
+ return -1;
+ buf[0] = ((1900+timeptr->tm_year) / 1000) + '0';
+ buf[1] = (((1900+timeptr->tm_year) % 1000) / 100) + '0';
+ buf[2] = ((timeptr->tm_year % 100) / 10) + '0';
+ buf[3] = (timeptr->tm_year % 10) + '0';
+ return 4;
+ case 'Z':
+ // FIXME: Should store zone in timeptr->tm_zone, or failing that
+ // read TZ env variable using tzset()
+ return 0;
+ case '%':
+ // Don't need to check size - we'll always be called with sizeleft > 0
+ buf[0] = '%';
+ return 1;
+ default:
+ CYG_FAIL("invalid format character!");
+ return -1;
+ } // switch
+
+} // do_format()
+
+externC size_t
+strftime( char *s, size_t maxsize, const char *format,
+ const struct tm *timeptr)
+{
+ CYG_REPORT_FUNCNAMETYPE("strftime", "returning string length %d");
+ CYG_CHECK_DATA_PTR(s, "string s is not a valid address!");
+ CYG_CHECK_DATA_PTR(format, "format string is not at a valid address!");
+ CYG_CHECK_DATA_PTR(timeptr,
+ "struct tm argument is not at a valid address!");
+ CYG_REPORT_FUNCARG4("s is at address %08x, maxsize=%d, format=\"%s\", "
+ "timeptr is at address %08x",
+ s, maxsize, format, timeptr);
+
+ CYG_PRECONDITION((timeptr->tm_sec >= 0) && (timeptr->tm_sec < 62),
+ "timeptr->tm_sec out of range!");
+ CYG_PRECONDITION((timeptr->tm_min >= 0) && (timeptr->tm_min < 60),
+ "timeptr->tm_min out of range!");
+ CYG_PRECONDITION((timeptr->tm_hour >= 0) && (timeptr->tm_hour < 24),
+ "timeptr->tm_hour out of range!");
+ // Currently I don't check _actual_ numbers of days in each month here
+ // FIXME: No reason why not though
+ CYG_PRECONDITION((timeptr->tm_mday >= 1) && (timeptr->tm_mday < 32),
+ "timeptr->tm_mday out of range!");
+ CYG_PRECONDITION((timeptr->tm_mon >= 0) && (timeptr->tm_mon < 12),
+ "timeptr->tm_mon out of range!");
+ CYG_PRECONDITION((timeptr->tm_wday >= 0) && (timeptr->tm_wday < 7),
+ "timeptr->tm_wday out of range!");
+ CYG_PRECONDITION((timeptr->tm_yday >= 0) && (timeptr->tm_yday < 366),
+ "timeptr->tm_yday out of range!");
+ CYG_PRECONDITION((timeptr->tm_year > -1900) &&
+ (timeptr->tm_year < 8100),
+ "timeptr->tm_year out of range!");
+
+ if (!maxsize) {
+ CYG_REPORT_RETVAL(0);
+ return 0;
+ } // if
+
+ // lets leave the room for the trailing null up front
+ --maxsize;
+
+ cyg_ucount32 i, spos;
+ cyg_count8 dof_ret;
+
+ for (i=0, spos=0; (spos<maxsize) && (format[i] != '\0'); ++i) {
+ if (format[i] == '%') {
+ if (format[++i] == '\0')
+ break;
+ dof_ret = do_format(format[i], maxsize - spos, &s[spos], timeptr);
+ // was there room to write _anything_?
+ if (dof_ret < 0) {
+ spos=0; // ISO says we must return 0 and the contents of s
+ // are indeterminate
+ break;
+ }
+ spos += dof_ret;
+ }
+ else {
+ s[spos++] = format[i];
+ } // else
+ } // for
+
+ s[spos] = '\0';
+
+ CYG_REPORT_RETVAL(spos);
+ return spos;
+
+} // strftime()
+
+
+// EOF strftime.cxx
diff --git a/cesar/ecos/packages/language/c/libc/time/current/src/strptime.cxx b/cesar/ecos/packages/language/c/libc/time/current/src/strptime.cxx
new file mode 100644
index 0000000000..6c857e735d
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/src/strptime.cxx
@@ -0,0 +1,436 @@
+//
+// Adapted for use in eCos by Gary Thomas
+// Copyright (C) 2003 Gary Thomas
+//
+
+/*
+ * Copyright (c) 1999 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of KTH nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY KTH AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KTH OR ITS CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <time.h>
+
+static const char *weekdays[] = {
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday",
+ NULL
+};
+
+static const char *month[] = {
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December",
+ NULL,
+};
+
+static const char *ampm[] = {
+ "am",
+ "pm",
+ NULL
+};
+
+/*
+ * Try to match `*buf' to one of the strings in `strs'. Return the
+ * index of the matching string (or -1 if none). Also advance buf.
+ */
+
+static int
+match_string (const char **buf, const char **strs, int ablen)
+{
+ int i = 0;
+
+ for (i = 0; strs[i] != NULL; ++i) {
+ int len = ablen > 0 ? ablen : strlen (strs[i]);
+
+ if (strncasecmp (*buf, strs[i], len) == 0) {
+ *buf += len;
+ return i;
+ }
+ }
+ return -1;
+}
+
+/*
+ * tm_year is relative this year
+ */
+
+const int tm_year_base = 1900;
+
+/*
+ * Return TRUE iff `year' was a leap year.
+ */
+
+static int
+is_leap_year (int year)
+{
+ return (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0);
+}
+
+/*
+ * Return the weekday [0,6] (0 = Sunday) of the first day of `year'
+ */
+
+static int
+first_day (int year)
+{
+ int ret = 4; // Jan 1, 1970 was on Thursday
+
+ for (; year > 1970; --year)
+ ret = (ret + 365 + is_leap_year (year) ? 1 : 0) % 7;
+ return ret;
+}
+
+/*
+ * Set `timeptr' given `wnum' (week number [0, 53])
+ */
+
+static void
+set_week_number_sun (struct tm *timeptr, int wnum)
+{
+ int fday = first_day (timeptr->tm_year + tm_year_base);
+
+ timeptr->tm_yday = wnum * 7 + timeptr->tm_wday - fday;
+ if (timeptr->tm_yday < 0) {
+ timeptr->tm_wday = fday;
+ timeptr->tm_yday = 0;
+ }
+}
+
+/*
+ * Set `timeptr' given `wnum' (week number [0, 53])
+ */
+
+static void
+set_week_number_mon (struct tm *timeptr, int wnum)
+{
+ int fday = (first_day (timeptr->tm_year + tm_year_base) + 6) % 7;
+
+ timeptr->tm_yday = wnum * 7 + (timeptr->tm_wday + 6) % 7 - fday;
+ if (timeptr->tm_yday < 0) {
+ timeptr->tm_wday = (fday + 1) % 7;
+ timeptr->tm_yday = 0;
+ }
+}
+
+/*
+ * Set `timeptr' given `wnum' (week number [0, 53])
+ */
+
+static void
+set_week_number_mon4 (struct tm *timeptr, int wnum)
+{
+ int fday = (first_day (timeptr->tm_year + tm_year_base) + 6) % 7;
+ int offset = 0;
+
+ if (fday < 4)
+ offset += 7;
+
+ timeptr->tm_yday = offset + (wnum - 1) * 7 + timeptr->tm_wday - fday;
+ if (timeptr->tm_yday < 0) {
+ timeptr->tm_wday = fday;
+ timeptr->tm_yday = 0;
+ }
+}
+
+/*
+ *
+ */
+
+char *
+strptime (const char *buf, const char *format, struct tm *timeptr)
+{
+ char c;
+
+ timeptr->tm_yday = 1; // Initialize to a well known, valid date
+ timeptr->tm_isdst = 0; // Tuesday March 18 14:05:00 2003 UTC
+ timeptr->tm_sec = 0;
+ timeptr->tm_min = 5;
+ timeptr->tm_hour = 14;
+ timeptr->tm_mday = 18;
+ timeptr->tm_mon = 2;
+ timeptr->tm_year = 103;
+ timeptr->tm_wday = 2;
+ timeptr->tm_yday = 77;
+
+ for (; (c = *format) != '\0'; ++format) {
+ char *s;
+ int ret;
+
+ if (isspace (c)) {
+ while (isspace (*buf))
+ ++buf;
+ } else if (c == '%' && format[1] != '\0') {
+ c = *++format;
+ if (c == 'E' || c == 'O')
+ c = *++format;
+ switch (c) {
+ case 'A' :
+ ret = match_string (&buf, weekdays, 0);
+ if (ret < 0)
+ return NULL;
+ timeptr->tm_wday = ret;
+ break;
+ case 'a' :
+ ret = match_string (&buf, weekdays, 3);
+ if (ret < 0)
+ return NULL;
+ timeptr->tm_wday = ret;
+ break;
+ case 'B' :
+ ret = match_string (&buf, month, 0);
+ if (ret < 0)
+ return NULL;
+ timeptr->tm_mon = ret;
+ break;
+ case 'b' :
+ case 'h' :
+ ret = match_string (&buf, month, 3);
+ if (ret < 0)
+ return NULL;
+ timeptr->tm_mon = ret;
+ break;
+ case 'C' :
+ ret = strtol (buf, &s, 10);
+ if (s == buf)
+ return NULL;
+ timeptr->tm_year = (ret * 100) - tm_year_base;
+ buf = s;
+ break;
+ case 'c' :
+ // Date and Time in the current locale - unsupported
+ return NULL;
+ case 'D' : /* %m/%d/%y */
+ s = strptime (buf, "%m/%d/%y", timeptr);
+ if (s == NULL)
+ return NULL;
+ buf = s;
+ break;
+ case 'd' :
+ case 'e' :
+ ret = strtol (buf, &s, 10);
+ if (s == buf)
+ return NULL;
+ timeptr->tm_mday = ret;
+ buf = s;
+ break;
+ case 'H' :
+ case 'k' :
+ ret = strtol (buf, &s, 10);
+ if (s == buf)
+ return NULL;
+ timeptr->tm_hour = ret;
+ buf = s;
+ break;
+ case 'I' :
+ case 'l' :
+ ret = strtol (buf, &s, 10);
+ if (s == buf)
+ return NULL;
+ if (ret == 12)
+ timeptr->tm_hour = 0;
+ else
+ timeptr->tm_hour = ret;
+ buf = s;
+ break;
+ case 'j' :
+ ret = strtol (buf, &s, 10);
+ if (s == buf)
+ return NULL;
+ timeptr->tm_yday = ret - 1;
+ buf = s;
+ break;
+ case 'm' :
+ ret = strtol (buf, &s, 10);
+ if (s == buf)
+ return NULL;
+ timeptr->tm_mon = ret - 1;
+ buf = s;
+ break;
+ case 'M' :
+ ret = strtol (buf, &s, 10);
+ if (s == buf)
+ return NULL;
+ timeptr->tm_min = ret;
+ buf = s;
+ break;
+ case 'n' :
+ if (*buf == '\n')
+ ++buf;
+ else
+ return NULL;
+ break;
+ case 'p' :
+ ret = match_string (&buf, ampm, 0);
+ if (ret < 0)
+ return NULL;
+ if (timeptr->tm_hour == 0) {
+ if (ret == 1)
+ timeptr->tm_hour = 12;
+ } else
+ timeptr->tm_hour += 12;
+ break;
+ case 'r' : /* %I:%M:%S %p */
+ s = strptime (buf, "%I:%M:%S %p", timeptr);
+ if (s == NULL)
+ return NULL;
+ buf = s;
+ break;
+ case 'R' : /* %H:%M */
+ s = strptime (buf, "%H:%M", timeptr);
+ if (s == NULL)
+ return NULL;
+ buf = s;
+ break;
+ case 'S' :
+ ret = strtol (buf, &s, 10);
+ if (s == buf)
+ return NULL;
+ timeptr->tm_sec = ret;
+ buf = s;
+ break;
+ case 't' :
+ if (*buf == '\t')
+ ++buf;
+ else
+ return NULL;
+ break;
+ case 'T' : /* %H:%M:%S */
+ case 'X' :
+ s = strptime (buf, "%H:%M:%S", timeptr);
+ if (s == NULL)
+ return NULL;
+ buf = s;
+ break;
+ case 'u' :
+ ret = strtol (buf, &s, 10);
+ if (s == buf)
+ return NULL;
+ timeptr->tm_wday = ret - 1;
+ buf = s;
+ break;
+ case 'w' :
+ ret = strtol (buf, &s, 10);
+ if (s == buf)
+ return NULL;
+ timeptr->tm_wday = ret;
+ buf = s;
+ break;
+ case 'U' :
+ ret = strtol (buf, &s, 10);
+ if (s == buf)
+ return NULL;
+ set_week_number_sun (timeptr, ret);
+ buf = s;
+ break;
+ case 'V' :
+ ret = strtol (buf, &s, 10);
+ if (s == buf)
+ return NULL;
+ set_week_number_mon4 (timeptr, ret);
+ buf = s;
+ break;
+ case 'W' :
+ ret = strtol (buf, &s, 10);
+ if (s == buf)
+ return NULL;
+ set_week_number_mon (timeptr, ret);
+ buf = s;
+ break;
+ case 'x' :
+ s = strptime (buf, "%Y:%m:%d", timeptr);
+ if (s == NULL)
+ return NULL;
+ buf = s;
+ break;
+ case 'y' :
+ ret = strtol (buf, &s, 10);
+ if (s == buf)
+ return NULL;
+ if (ret < 70)
+ timeptr->tm_year = 100 + ret;
+ else
+ timeptr->tm_year = ret;
+ buf = s;
+ break;
+ case 'Y' :
+ ret = strtol (buf, &s, 10);
+ if (s == buf)
+ return NULL;
+ timeptr->tm_year = ret - tm_year_base;
+ buf = s;
+ break;
+ case 'Z' :
+ // Timezone spec not handled
+ return NULL;
+ case '\0' :
+ --format;
+ /* FALLTHROUGH */
+ case '%' :
+ if (*buf == '%')
+ ++buf;
+ else
+ return NULL;
+ break;
+ default :
+ if (*buf == '%' || *++buf == c)
+ ++buf;
+ else
+ return NULL;
+ break;
+ }
+ } else {
+ if (*buf == c)
+ ++buf;
+ else
+ return NULL;
+ }
+ }
+ return (char *)buf;
+}
+
+// strptime.cxx
diff --git a/cesar/ecos/packages/language/c/libc/time/current/src/time.cxx b/cesar/ecos/packages/language/c/libc/time/current/src/time.cxx
new file mode 100644
index 0000000000..1f388d75b0
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/src/time.cxx
@@ -0,0 +1,105 @@
+//========================================================================
+//
+// time.cxx
+//
+// ISO C date and time implementation for time()
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-03-04
+// Purpose: Provide implementation of ISO C time() as defined in
+// ISO C section 7.12.2.4
+// Description: This file provides an implementation of time() using
+// the "wallclock" device
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_ass.h> // Assertion infrastructure
+#include <cyg/infra/cyg_trac.h> // Tracing infrastructure
+#include <time.h> // Main date and time definitions
+
+#ifdef CYGSEM_LIBC_TIME_TIME_WORKING
+# include <cyg/io/wallclock.hxx> // Wallclock class definitions
+#endif
+
+// FUNCTIONS
+
+externC time_t
+time( time_t *timer )
+{
+ CYG_REPORT_FUNCNAMETYPE("time", "returning %d");
+ if (timer) // its allowed to be NULL
+ CYG_CHECK_DATA_PTR( timer, "timer is not a valid pointer!");
+ CYG_REPORT_FUNCARG1("timer = %08x", timer);
+
+#ifdef CYGSEM_LIBC_TIME_TIME_WORKING
+ time_t ret;
+
+ ret = (time_t) Cyg_WallClock::wallclock->get_current_time();
+
+ if (timer)
+ *timer = ret;
+
+ CYG_REPORT_RETVAL(ret);
+
+ return ret;
+
+#else // i.e. ifndef CYGSEM_LIBC_TIME_TIME_WORKING
+
+ if (timer)
+ *timer = (time_t)-1;
+ CYG_REPORT_RETVAL(-1);
+ return (time_t)-1;
+
+#endif
+
+} // time()
+
+
+// EOF time.cxx
diff --git a/cesar/ecos/packages/language/c/libc/time/current/src/timeutil.cxx b/cesar/ecos/packages/language/c/libc/time/current/src/timeutil.cxx
new file mode 100644
index 0000000000..f005ee31d8
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/src/timeutil.cxx
@@ -0,0 +1,295 @@
+//========================================================================
+//
+// timeutil.cxx
+//
+// ISO C date and time implementation support functions
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2000-04-28
+// Purpose: Provide support functions used by the ISO C date and time
+// implementation
+// Description: This file provides the functions:
+// cyg_libc_time_normalize_structtm()
+// cyg_libc_time_getzoneoffsets()
+// cyg_libc_time_setzoneoffsets()
+// cyg_libc_time_setdst()
+// cyg_libc_time_itoa()
+// and the globals:
+// cyg_libc_time_day_name
+// cyg_libc_time_day_name_len
+// cyg_libc_time_month_name
+// cyg_libc_time_month_name_len
+// cyg_libc_time_month_lengths
+// cyg_libc_time_current_dst_stat
+// cyg_libc_time_current_std_offset
+// cyg_libc_time_current_dst_offset
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// INCLUDES
+
+// define these functions as outline, not inline, functions in this file
+#define CYGPRI_LIBC_TIME_GETZONEOFFSETS_INLINE extern "C"
+#define CYGPRI_LIBC_TIME_SETZONEOFFSETS_INLINE extern "C"
+#define CYGPRI_LIBC_TIME_SETDST_INLINE extern "C"
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/libc/time/timeutil.h>// Header for this file
+#include <time.h> // Main date and time definitions
+#include <stdlib.h> // for div() and abs()
+
+
+// GLOBALS
+
+// FIXME: PR19440 - const char & -fwritable-strings don't mix
+const char cyg_libc_time_day_name[7][10] = {
+ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
+ "Saturday"
+};
+const cyg_uint8 cyg_libc_time_day_name_len[7] = { 6, 6, 7, 9, 8, 6, 8 };
+
+// FIXME: PR19440 - const char & -fwritable-strings don't mix
+const char cyg_libc_time_month_name[12][10] = {
+ "January", "February", "March", "April", "May", "June",
+ "July", "August", "September", "October", "November", "December"
+};
+const cyg_uint8 cyg_libc_time_month_name_len[12] = { 7, 8, 5, 5, 3, 4,
+ 4, 6, 9, 7, 8, 8 };
+
+const cyg_uint8 cyg_libc_time_month_lengths[2][12] = {
+ {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
+ {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
+};
+
+Cyg_libc_time_dst cyg_libc_time_current_dst_stat =
+ (Cyg_libc_time_dst)CYGNUM_LIBC_TIME_DST_DEFAULT_STATE;
+time_t cyg_libc_time_current_std_offset =
+ (time_t)CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET;
+time_t cyg_libc_time_current_dst_offset =
+ (time_t)CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET;
+
+
+// FUNCTIONS
+
+////////////////////////////////////////
+// cyg_libc_time_normalize_structtm() //
+////////////////////////////////////////
+//
+// cyg_libc_time_normalize_structtm() will adjust the fields of a struct tm
+// so that they are within the normal ranges expected.
+// tm_wday, tm_yday and tm_isdst are ignored
+
+externC void
+cyg_libc_time_normalize_structtm( struct tm *timeptr )
+{
+ div_t t;
+
+ CYG_REPORT_FUNCNAME("cyg_libc_time_normalize_structtm");
+ CYG_REPORT_FUNCARG1("timeptr is at address %08x", timeptr);
+
+ // normalize seconds to 0..59
+ if ((timeptr->tm_sec < 0) || (timeptr->tm_sec > 59)) {
+ t = div(timeptr->tm_sec, 60);
+ while (t.rem < 0) {
+ t.rem += 60;
+ --t.quot;
+ }
+ timeptr->tm_min += t.quot;
+ timeptr->tm_sec = t.rem;
+ } // if
+
+ // normalize minutes to 0..59
+ if ((timeptr->tm_min < 0) || (timeptr->tm_min > 59)) {
+ t = div(timeptr->tm_min, 60);
+ while (t.rem < 0) {
+ t.rem += 60;
+ --t.quot;
+ }
+ timeptr->tm_hour += t.quot;
+ timeptr->tm_min = t.rem;
+ } // if
+
+ // normalize hours to 0..23
+ if ((timeptr->tm_hour < 0) || (timeptr->tm_hour > 23)) {
+ t = div(timeptr->tm_hour, 24);
+ while (t.rem < 0) {
+ t.rem += 24;
+ --t.quot;
+ }
+ timeptr->tm_mday += t.quot;
+ timeptr->tm_hour = t.rem;
+ } // if
+
+ // we wait before normalizing tm_mday as per ISO C 7.12.2.3 (although
+ // actually it only makes sense if you think about it
+
+ // normalize months to 0..11
+ if ((timeptr->tm_mon < 0) || (timeptr->tm_mon > 11)) {
+ t = div(timeptr->tm_mon, 12);
+ while (t.rem < 0) {
+ t.rem += 12;
+ --t.quot;
+ }
+ timeptr->tm_year += t.quot;
+ timeptr->tm_mon = t.rem;
+ } // if
+
+ // now tm_mday which needs to go to 1..31
+ cyg_bool leap = cyg_libc_time_year_is_leap(timeptr->tm_year);
+
+ while (timeptr->tm_mday < 1) {
+ // move back a month
+
+ if (--timeptr->tm_mon < 0) {
+ --timeptr->tm_year;
+ timeptr->tm_mon = 11;
+ leap = cyg_libc_time_year_is_leap(timeptr->tm_year);
+ } // if
+
+ // we move backward the number of days in the _new_ current month
+ timeptr->tm_mday += cyg_libc_time_month_lengths[leap][timeptr->tm_mon];
+
+ } // while
+
+ while (timeptr->tm_mday >
+ cyg_libc_time_month_lengths[leap][timeptr->tm_mon]) {
+
+ // move forward a month
+
+ // we move forward the number of days in the _old_ current month
+ timeptr->tm_mday -= cyg_libc_time_month_lengths[leap][timeptr->tm_mon];
+
+ if (++timeptr->tm_mon > 11) {
+ ++timeptr->tm_year;
+ timeptr->tm_mon = 0;
+ leap = cyg_libc_time_year_is_leap(timeptr->tm_year);
+ } // if
+
+ } // while
+
+ CYG_REPORT_RETURN();
+
+} // cyg_libc_time_normalize_structtm()
+
+
+//////////////////////////
+// cyg_libc_time_itoa() //
+//////////////////////////
+//
+// This converts num to a string and puts it into s padding with
+// "0"'s if padzero is set, or spaces otherwise if necessary.
+// The number of chars written to s is returned
+//
+
+// This implementation is probably suboptimal in terms of performance
+// but there wouldn't be much in it with only 11 chars max to convert :-/.
+// Actually FIXME: what if someone passes a width >11
+
+externC cyg_ucount8
+cyg_libc_time_itoa( cyg_uint8 *s, cyg_int32 num, cyg_uint8 width,
+ cyg_bool padzero )
+{
+ CYG_REPORT_FUNCNAMETYPE("cyg_libc_time_itoa", "returning %d");
+ CYG_REPORT_FUNCARG4( "s=%08x, num=%d, width=%d, padzero=%d",
+ s, num, width, padzero );
+
+ CYG_CHECK_DATA_PTR(s, "input string not a valid pointer");
+
+ // special case for zero otherwise we'd have to treat it specially later
+ // on anyway
+
+ if (num==0) {
+ cyg_ucount8 i;
+
+ for (i=0; i<width; ++i)
+ s[i] = padzero ? '0' : ' ';
+ CYG_REPORT_RETVAL(i);
+ return i;
+ }
+
+ // return value
+ cyg_ucount8 ret=0;
+
+ // Pre-fiddle for negative numbers
+ if ((num < 0) && (width > 0)) {
+ *s++ = '-';
+ --width;
+ num = abs(num);
+ ++ret;
+ }
+
+ cyg_ucount32 i;
+ cyg_bool reachednum = false;
+ cyg_uint8 c, j;
+
+ // i starts off with factor of 10 digits - which is the string length
+ // of a positive 32-bit number
+ for (i=1000000000, j=10; i>0; i/=10, --j) {
+ c = (num / i);
+
+ if (!reachednum && c==0) {
+ if (j <= width) {
+ *s++ = padzero ? '0' : ' ';
+ ++ret;
+ }
+ } // if
+ else {
+ *s++ = c + '0';
+ ++ret;
+ reachednum = true;
+ }
+ num %= i;
+ } // for
+
+ CYG_POSTCONDITION(ret >= width, "Didn't output enough chars!");
+
+ CYG_REPORT_RETVAL(ret);
+ return ret;
+} // cyg_libc_time_itoa()
+
+
+// EOF timeutil.cxx
diff --git a/cesar/ecos/packages/language/c/libc/time/current/tests/asctime.c b/cesar/ecos/packages/language/c/libc/time/current/tests/asctime.c
new file mode 100644
index 0000000000..65c4013ac8
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/tests/asctime.c
@@ -0,0 +1,205 @@
+//=================================================================
+//
+// asctime.c
+//
+// Testcase for C library asctime() function
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 1999-03-05
+// Description: Contains testcode for C library asctime() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// INCLUDES
+
+#include <time.h>
+#include <cyg/infra/testcase.h>
+
+// HOW TO START TESTS
+
+# define START_TEST( test ) test(0)
+
+// FUNCTIONS
+
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static void
+test( CYG_ADDRWORD data )
+{
+ struct tm tm1;
+ char *ret;
+
+ tm1.tm_sec = 4;
+ tm1.tm_min = 23;
+ tm1.tm_hour = 20;
+ tm1.tm_mday = 21;
+ tm1.tm_mon = 1;
+ tm1.tm_year = 74;
+ tm1.tm_wday = 4;
+ tm1.tm_yday = 51;
+ tm1.tm_isdst = 0;
+
+ ret = asctime(&tm1);
+
+ CYG_TEST_PASS_FAIL(!my_strcmp(ret, "Thu Feb 21 20:23:04 1974\n"),
+ "asctime test #1");
+ tm1.tm_sec = 3;
+ tm1.tm_min = 51;
+ tm1.tm_hour = 5;
+ tm1.tm_mday = 2;
+ tm1.tm_mon = 11;
+ tm1.tm_year = 68;
+ tm1.tm_wday = 1;
+ tm1.tm_yday = 336;
+ tm1.tm_isdst = 0;
+
+ ret = asctime(&tm1);
+
+ CYG_TEST_PASS_FAIL(!my_strcmp(ret, "Mon Dec 02 05:51:03 1968\n"),
+ "asctime test #2");
+
+ // make this predictable - independent of the user option
+ cyg_libc_time_setzoneoffsets(0, 3600);
+
+ tm1.tm_sec = 3;
+ tm1.tm_min = 51;
+ tm1.tm_hour = 5;
+ tm1.tm_mday = 2;
+ tm1.tm_mon = 6;
+ tm1.tm_year = 68;
+ tm1.tm_wday = 2;
+ tm1.tm_yday = 183;
+ tm1.tm_isdst = 1;
+
+ ret = asctime(&tm1);
+
+ CYG_TEST_PASS_FAIL(!my_strcmp(ret, "Tue Jul 02 05:51:03 1968\n"),
+ "asctime test #3");
+
+ tm1.tm_sec = 0;
+ tm1.tm_min = 0;
+ tm1.tm_hour = 0;
+ tm1.tm_mday = 1;
+ tm1.tm_mon = 0;
+ tm1.tm_year = 0;
+ tm1.tm_wday = 1;
+ tm1.tm_yday = 0;
+ tm1.tm_isdst = 0;
+
+ ret = asctime(&tm1);
+
+ CYG_TEST_PASS_FAIL(!my_strcmp(ret, "Mon Jan 01 00:00:00 1900\n"),
+ "asctime test #4");
+
+ tm1.tm_sec = 0;
+ tm1.tm_min = 0;
+ tm1.tm_hour = 0;
+ tm1.tm_mday = 1;
+ tm1.tm_mon = 0;
+ tm1.tm_year = 100;
+ tm1.tm_wday = 6;
+ tm1.tm_yday = 0;
+ tm1.tm_isdst = 0;
+
+ ret = asctime(&tm1);
+
+ CYG_TEST_PASS_FAIL(!my_strcmp(ret, "Sat Jan 01 00:00:00 2000\n"),
+ "asctime Y2K test #5");
+
+#ifdef CYGFUN_LIBC_TIME_POSIX
+ {
+ char ret2[100];
+
+ tm1.tm_sec = 3;
+ tm1.tm_min = 51;
+ tm1.tm_hour = 5;
+ tm1.tm_mday = 2;
+ tm1.tm_mon = 11;
+ tm1.tm_year = 68;
+ tm1.tm_wday = 1;
+ tm1.tm_yday = 336;
+ tm1.tm_isdst = 0;
+
+ ret = asctime_r(&tm1, ret2);
+
+ CYG_TEST_PASS_FAIL((ret==ret2) &&
+ !my_strcmp(ret, "Mon Dec 02 05:51:03 1968\n"),
+ "asctime_r test #1");
+
+ }
+#endif
+
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "asctime() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "asctime() function");
+
+ START_TEST( test );
+
+ CYG_TEST_NA("Testing is not applicable to this configuration");
+
+} // main()
+
+// EOF asctime.c
diff --git a/cesar/ecos/packages/language/c/libc/time/current/tests/clock.c b/cesar/ecos/packages/language/c/libc/time/current/tests/clock.c
new file mode 100644
index 0000000000..db65ec4bdf
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/tests/clock.c
@@ -0,0 +1,249 @@
+//=================================================================
+//
+// clock.c
+//
+// Testcase for C library clock()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): ctarpy, jlarmour
+// Contributors:
+// Date: 1999-03-05
+// Description: Contains testcode for C library clock() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // Configuration header
+#include <pkgconf/system.h>
+#include <pkgconf/isoinfra.h>
+#include <pkgconf/infra.h>
+
+#include <cyg/infra/testcase.h>
+
+// This test is bound to fail often on the synthetic target -- we
+// don't have exclusive access to the CPU.
+
+#if defined(CYGPKG_HAL_SYNTH)
+# define NA_MSG "Timing accuracy not guaranteed on synthetic target"
+#elif !defined(CYGINT_ISO_MAIN_STARTUP)
+# define NA_MSG "Requires main() startup"
+#elif defined(CYGDBG_USE_TRACING)
+# define NA_MSG "Cannot give an accurate test when tracing is enabled"
+#endif
+
+#ifdef NA_MSG
+void
+cyg_start(void)
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( NA_MSG );
+}
+
+#else
+
+
+// INCLUDES
+
+#include <time.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_cache.h>
+#include <cyg/hal/hal_intr.h>
+
+
+// CONSTANTS
+
+// This defines how many loops before we decide that
+// the clock doesnt work
+#define MAX_TIMEOUT 100000
+
+// Percentage error before we declare fail: range 0 - 100
+#define TOLERANCE 40
+
+// Permissible absolute deviation from mean value to take care of incorrect
+// failure conclusions in case of small mean values (if absolute values of
+// clock() are small, percentage variation can be large)
+#define FUDGE_FACTOR 6
+
+// Number of samples to take
+#define SAMPLES 30
+
+// We ignore ctrs[0] because it's always 0
+// We ignore ctrs[1] because it will always be odd since it was
+// the first measurement taken at the start of the looping, and
+// the initial clock measurement (in clocks[0]) was not treated as
+// part of the loop and therefore can't be considered to take the same
+// time.
+// We ignore ctrs[2] because it always seems to be substantially faster
+// that the other samples. Probably due to cache/timing effect after the
+// previous loop.
+// Finally, ctrs[3] is skipped because it's also very fast on ARM targets.
+
+#define SKIPPED_SAMPLES 6
+
+
+// FUNCTIONS
+
+static int
+my_abs(int i)
+{
+ return (i < 0) ? -i : i;
+} // my_abs()
+
+
+// Clock measurement is done in a separate function so that alignment
+// constraints are deterministic - some processors may perform better
+// in loops that are better aligned, so by making it always the same
+// function, this is prevented.
+// FIXME: how do we guarantee the compiler won't inline this on -O3?
+static unsigned long
+clock_loop( const int timeout, clock_t prevclock, clock_t *newclock )
+{
+ clock_t c=0;
+ long i;
+
+ for (i=0; i<timeout; i++) {
+ c = clock();
+ if ( c != prevclock )
+ break; // Hit the next clock pulse
+ }
+
+ if (i==timeout)
+ CYG_TEST_FAIL_FINISH("No change in clock state!");
+
+ // it should not overflow in the lifetime of this test
+ if (c < prevclock)
+ CYG_TEST_FAIL_FINISH("Clock decremented!");
+
+ *newclock = c;
+
+ return i;
+} // clock_loop()
+
+// both of these get zeroed out
+static unsigned long ctrs[SAMPLES];
+static clock_t clocks[SAMPLES];
+
+int
+main(int argc, char *argv[])
+{
+ unsigned long mean=0, sum=0, maxerr=0;
+ int i;
+ unsigned int absdev;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "clock() function");
+
+ // First disable the caches - they may affect the timing loops
+ // below - causing the elapsed time during the clock() call to vary.
+ {
+ register CYG_INTERRUPT_STATE oldints;
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ HAL_ICACHE_DISABLE();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ }
+
+ // This waits for a clock tick, to ensure that we are at the
+ // start of a clock period. Then sit in a tight loop to get
+ // the clock period. Repeat this, and make sure that it the
+ // two timed periods are acceptably close.
+
+ clocks[0] = clock();
+
+ if (clocks[0] == (clock_t)-1) // unimplemented is potentially valid.
+ {
+#ifdef CYGSEM_LIBC_TIME_CLOCK_WORKING
+ CYG_TEST_FAIL_FINISH( "clock() returns -1, meaning unimplemented");
+#else
+ CYG_TEST_PASS_FINISH( "clock() returns -1, meaning unimplemented");
+#endif
+ } // if
+
+ // record clocks in a tight consistent loop to avoid random variations
+ for (i=1; i<SAMPLES; i++) {
+ ctrs[i] = clock_loop( MAX_TIMEOUT, clocks[i-1], &clocks[i] );
+ }
+
+ for (i=0;i<SAMPLES;i++) {
+ // output what we got - useful for diagnostics of occasional
+ // test failures
+ diag_printf("clocks[%d] = %d, ctrs[%d] = %d\n", i, clocks[i],
+ i, ctrs[i]);
+
+ // Now we work out the error etc.
+ if (i>=SKIPPED_SAMPLES) {
+ sum += ctrs[i];
+ }
+ }
+
+ // deduce out the average
+ mean = sum / (SAMPLES-SKIPPED_SAMPLES);
+
+ // now go through valid results and compare against average
+ for (i=SKIPPED_SAMPLES;i<SAMPLES;i++) {
+ unsigned long err;
+
+ absdev = my_abs(ctrs[i]-mean);
+ // use mean+1 as divisor to avoid div-by-zero
+ err = (100 * absdev) / (mean+1);
+ if (err > TOLERANCE && absdev > FUDGE_FACTOR) {
+ diag_printf("mean=%d, ctrs[%d]=%d, err=%d\n", mean, i, ctrs[i],
+ err);
+ CYG_TEST_FAIL_FINISH("clock() within tolerance");
+ }
+ if (err > maxerr)
+ maxerr=err;
+ }
+
+ diag_printf("mean=%d, maxerr=%d\n", mean, maxerr);
+ CYG_TEST_PASS_FINISH("clock() stable");
+
+} // main()
+
+#endif // ifndef NA_MSG
+
+// EOF clock.c
diff --git a/cesar/ecos/packages/language/c/libc/time/current/tests/ctime.c b/cesar/ecos/packages/language/c/libc/time/current/tests/ctime.c
new file mode 100644
index 0000000000..840018dede
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/tests/ctime.c
@@ -0,0 +1,141 @@
+//=================================================================
+//
+// ctime.c
+//
+// Testcase for C library ctime() function
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-03-05
+// Description: Contains testcode for C library ctime() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// INCLUDES
+
+#include <time.h>
+#include <cyg/infra/testcase.h>
+
+// HOW TO START TESTS
+
+# define START_TEST( test ) test(0)
+
+// FUNCTIONS
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+
+static void
+test( CYG_ADDRWORD data )
+{
+ time_t t;
+ char *ret;
+
+ // make this predictable - independent of the user option
+ cyg_libc_time_setzoneoffsets(0, 3600);
+ cyg_libc_time_setdst( CYG_LIBC_TIME_DSTOFF );
+
+ t = (time_t)130710184;
+
+ ret = ctime(&t);
+ CYG_TEST_PASS_FAIL(!my_strcmp(ret, "Thu Feb 21 20:23:04 1974\n"),
+ "ctime test #1");
+
+ t = (time_t)946689894;
+
+ ret = ctime(&t);
+ CYG_TEST_PASS_FAIL(!my_strcmp(ret, "Sat Jan 01 01:24:54 2000\n"),
+ "ctime Y2K test #2");
+
+ cyg_libc_time_setdst( CYG_LIBC_TIME_DSTON );
+
+ t = (time_t)-113186106;
+
+ ret = ctime(&t);
+ CYG_TEST_PASS_FAIL(!my_strcmp(ret, "Tue Jun 01 00:24:54 1966\n"),
+ "ctime test #3");
+
+#ifdef CYGFUN_LIBC_TIME_POSIX
+ cyg_libc_time_setdst( CYG_LIBC_TIME_DSTOFF );
+
+ t = (time_t)915510061;
+
+ {
+ char ret2[26];
+
+ ret = ctime_r(&t, ret2);
+ CYG_TEST_PASS_FAIL(!my_strcmp(ret2, "Tue Jan 05 04:21:01 1999\n"),
+ "ctime_r test #1");
+ }
+#endif
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "ctime() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "ctime() function");
+
+ START_TEST( test );
+
+ CYG_TEST_NA("Testing is not applicable to this configuration");
+
+} // main()
+
+// EOF ctime.c
diff --git a/cesar/ecos/packages/language/c/libc/time/current/tests/gmtime.c b/cesar/ecos/packages/language/c/libc/time/current/tests/gmtime.c
new file mode 100644
index 0000000000..77e591e17c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/tests/gmtime.c
@@ -0,0 +1,205 @@
+//=================================================================
+//
+// gmtime.c
+//
+// Testcase for C library gmtime() function
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 1999-03-05
+// Description: Contains testcode for C library gmtime() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// INCLUDES
+
+#include <time.h>
+#include <cyg/infra/testcase.h>
+
+// HOW TO START TESTS
+
+# define START_TEST( test ) test(0)
+
+// FUNCTIONS
+
+static int
+cmp_structtm(struct tm *tm1, struct tm *tm2)
+{
+ if ((tm1->tm_sec != tm2->tm_sec) ||
+ (tm1->tm_min != tm2->tm_min) ||
+ (tm1->tm_hour != tm2->tm_hour) ||
+ (tm1->tm_mday != tm2->tm_mday) ||
+ (tm1->tm_mon != tm2->tm_mon) ||
+ (tm1->tm_year != tm2->tm_year) ||
+ (tm1->tm_wday != tm2->tm_wday) ||
+ (tm1->tm_yday != tm2->tm_yday) ||
+ (tm1->tm_isdst != tm2->tm_isdst))
+ return 1;
+ else
+ return 0;
+}
+
+static void
+test( CYG_ADDRWORD data )
+{
+ struct tm tm1, *tm2;
+ time_t t;
+
+ // make this predictable - independent of the user option
+ cyg_libc_time_setzoneoffsets(0, 3600);
+ cyg_libc_time_setdst( CYG_LIBC_TIME_DSTOFF );
+
+ tm1.tm_sec = 4;
+ tm1.tm_min = 23;
+ tm1.tm_hour = 20;
+ tm1.tm_mday = 21;
+ tm1.tm_mon = 1;
+ tm1.tm_year = 74;
+ tm1.tm_wday = 4;
+ tm1.tm_yday = 51;
+ tm1.tm_isdst = 0;
+
+ t = (time_t)130710184;
+
+ tm2 = gmtime(&t);
+ CYG_TEST_PASS_FAIL(!cmp_structtm(&tm1, tm2), "gmtime test #1");
+
+
+ tm1.tm_sec = 1;
+ tm1.tm_min = 21;
+ tm1.tm_hour = 4;
+ tm1.tm_mday = 5;
+ tm1.tm_mon = 0;
+ tm1.tm_wday = 2;
+ tm1.tm_yday = 4;
+ tm1.tm_year = 99;
+ tm1.tm_isdst = 0;
+
+ t = (time_t)915510061;
+
+ tm2 = gmtime(&t);
+ CYG_TEST_PASS_FAIL(!cmp_structtm(&tm1, tm2), "gmtime test #2");
+
+ tm1.tm_sec = 54;
+ tm1.tm_min = 24;
+ tm1.tm_hour = 1;
+ tm1.tm_mday = 1;
+ tm1.tm_mon = 0;
+ tm1.tm_year = 100;
+ tm1.tm_wday = 6;
+ tm1.tm_yday = 0;
+ tm1.tm_isdst = 0;
+
+ t = (time_t)946689894;
+
+ tm2 = gmtime(&t);
+ CYG_TEST_PASS_FAIL(!cmp_structtm(&tm1, tm2), "gmtime Y2K test #3");
+
+ cyg_libc_time_setdst( CYG_LIBC_TIME_DSTON );
+
+ tm1.tm_sec = 54;
+ tm1.tm_min = 24;
+ tm1.tm_hour = 23;
+ tm1.tm_mday = 31;
+ tm1.tm_mon = 4;
+ tm1.tm_wday = 2;
+ tm1.tm_yday = 150;
+ tm1.tm_year = 66;
+ tm1.tm_isdst = 0;
+
+ t = (time_t)-113186106;
+
+ tm2 = gmtime(&t);
+ CYG_TEST_PASS_FAIL(!cmp_structtm(&tm1, tm2), "gmtime test #4");
+
+ tm1.tm_sec = 59;
+ tm1.tm_min = 59;
+ tm1.tm_hour = 23;
+ tm1.tm_mday = 31;
+ tm1.tm_mon = 4;
+ tm1.tm_wday = 3;
+ tm1.tm_yday = 151;
+ tm1.tm_year = 100;
+ tm1.tm_isdst = 0;
+
+ t = (time_t)959817599;
+
+ tm2 = gmtime(&t);
+ CYG_TEST_PASS_FAIL(!cmp_structtm(&tm1, tm2), "gmtime test #5");
+
+ tm1.tm_sec = 0;
+ tm1.tm_min = 0;
+ tm1.tm_hour = 0;
+ tm1.tm_mday = 1;
+ tm1.tm_mon = 5;
+ tm1.tm_wday = 4;
+ tm1.tm_yday = 152;
+ tm1.tm_year = 100;
+ tm1.tm_isdst = 0;
+
+ t = (time_t)959817600;
+
+ tm2 = gmtime(&t);
+ CYG_TEST_PASS_FAIL(!cmp_structtm(&tm1, tm2), "gmtime test #6");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "gmtime() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "gmtime() function");
+
+ START_TEST( test );
+
+ CYG_TEST_NA("Testing is not applicable to this configuration");
+
+} // main()
+
+// EOF gmtime.c
diff --git a/cesar/ecos/packages/language/c/libc/time/current/tests/localtime.c b/cesar/ecos/packages/language/c/libc/time/current/tests/localtime.c
new file mode 100644
index 0000000000..0eba40d02b
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/tests/localtime.c
@@ -0,0 +1,175 @@
+//=================================================================
+//
+// localtime.c
+//
+// Testcase for C library localtime() function
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-03-05
+// Description: Contains testcode for C library localtime() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// INCLUDES
+
+#include <time.h>
+#include <cyg/infra/testcase.h>
+
+// HOW TO START TESTS
+
+# define START_TEST( test ) test(0)
+
+// FUNCTIONS
+
+static int
+cmp_structtm(struct tm *tm1, struct tm *tm2)
+{
+ if ((tm1->tm_sec != tm2->tm_sec) ||
+ (tm1->tm_min != tm2->tm_min) ||
+ (tm1->tm_hour != tm2->tm_hour) ||
+ (tm1->tm_mday != tm2->tm_mday) ||
+ (tm1->tm_mon != tm2->tm_mon) ||
+ (tm1->tm_year != tm2->tm_year) ||
+ (tm1->tm_wday != tm2->tm_wday) ||
+ (tm1->tm_yday != tm2->tm_yday) ||
+ (tm1->tm_isdst != tm2->tm_isdst))
+ return 1;
+ else
+ return 0;
+}
+
+static void
+test( CYG_ADDRWORD data )
+{
+ struct tm tm1, *tm2;
+ time_t t;
+
+ // make this predictable - independent of the user option
+ cyg_libc_time_setzoneoffsets(0, 3600);
+ cyg_libc_time_setdst( CYG_LIBC_TIME_DSTOFF );
+
+ tm1.tm_sec = 4;
+ tm1.tm_min = 23;
+ tm1.tm_hour = 20;
+ tm1.tm_mday = 21;
+ tm1.tm_mon = 1;
+ tm1.tm_year = 74;
+ tm1.tm_wday = 4;
+ tm1.tm_yday = 51;
+ tm1.tm_isdst = 0;
+
+ t = (time_t)130710184;
+
+ tm2 = localtime(&t);
+ CYG_TEST_PASS_FAIL(!cmp_structtm(&tm1, tm2), "localtime test #1");
+
+
+ tm1.tm_sec = 1;
+ tm1.tm_min = 21;
+ tm1.tm_hour = 4;
+ tm1.tm_mday = 5;
+ tm1.tm_mon = 0;
+ tm1.tm_wday = 2;
+ tm1.tm_yday = 4;
+ tm1.tm_year = 99;
+ tm1.tm_isdst = 0;
+
+ t = (time_t)915510061;
+
+ tm2 = localtime(&t);
+ CYG_TEST_PASS_FAIL(!cmp_structtm(&tm1, tm2), "localtime test #2");
+
+ tm1.tm_sec = 54;
+ tm1.tm_min = 24;
+ tm1.tm_hour = 1;
+ tm1.tm_mday = 1;
+ tm1.tm_mon = 0;
+ tm1.tm_year = 100;
+ tm1.tm_wday = 6;
+ tm1.tm_yday = 0;
+ tm1.tm_isdst = 0;
+
+ t = (time_t)946689894;
+
+ tm2 = localtime(&t);
+ CYG_TEST_PASS_FAIL(!cmp_structtm(&tm1, tm2), "localtime Y2K test #3");
+
+ cyg_libc_time_setdst( CYG_LIBC_TIME_DSTON );
+
+ tm1.tm_sec = 54;
+ tm1.tm_min = 24;
+ tm1.tm_hour = 0;
+ tm1.tm_mday = 1;
+ tm1.tm_mon = 5;
+ tm1.tm_wday = 2;
+ tm1.tm_yday = 150;
+ tm1.tm_year = 66;
+ tm1.tm_isdst = 1;
+
+ t = (time_t)-113186106;
+
+ tm2 = localtime(&t);
+ CYG_TEST_PASS_FAIL(!cmp_structtm(&tm1, tm2), "localtime test #4");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "localtime() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "localtime() function");
+
+ START_TEST( test );
+
+ CYG_TEST_NA("Testing is not applicable to this configuration");
+
+} // main()
+
+// EOF localtime.c
diff --git a/cesar/ecos/packages/language/c/libc/time/current/tests/mktime.c b/cesar/ecos/packages/language/c/libc/time/current/tests/mktime.c
new file mode 100644
index 0000000000..7baabfb6a4
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/tests/mktime.c
@@ -0,0 +1,177 @@
+//=================================================================
+//
+// mktime.c
+//
+// Testcase for C library mktime() function
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-03-05
+// Description: Contains testcode for C library mktime() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// INCLUDES
+
+#include <time.h>
+#include <cyg/infra/testcase.h>
+
+// HOW TO START TESTS
+
+# define START_TEST( test ) test(0)
+
+// FUNCTIONS
+
+static int
+cmp_structtm(struct tm *tm1, struct tm *tm2)
+{
+ if ((tm1->tm_sec != tm2->tm_sec) ||
+ (tm1->tm_min != tm2->tm_min) ||
+ (tm1->tm_hour != tm2->tm_hour) ||
+ (tm1->tm_mday != tm2->tm_mday) ||
+ (tm1->tm_mon != tm2->tm_mon) ||
+ (tm1->tm_year != tm2->tm_year) ||
+ (tm1->tm_wday != tm2->tm_wday) ||
+ (tm1->tm_yday != tm2->tm_yday) ||
+ (tm1->tm_isdst != tm2->tm_isdst))
+ return 1;
+ else
+ return 0;
+}
+
+static void
+test( CYG_ADDRWORD data )
+{
+ struct tm tm1, tm2;
+ time_t t;
+
+ // make this predictable - independent of the user option
+ cyg_libc_time_setzoneoffsets(0, 3600);
+
+ tm1.tm_sec = 4;
+ tm1.tm_min = 23;
+ tm1.tm_hour = 20;
+ tm1.tm_mday = 21;
+ tm1.tm_mon = 1;
+ tm1.tm_year = 74;
+ tm1.tm_isdst = 0;
+
+ tm2 = tm1;
+ tm2.tm_wday = 4;
+ tm2.tm_yday = 51;
+
+ t = mktime(&tm1);
+ CYG_TEST_PASS_FAIL(!cmp_structtm(&tm1, &tm2), "mktime test #1");
+ CYG_TEST_PASS_FAIL(t == 130710184, "mktime return test #1");
+
+ tm1.tm_sec = 61;
+ tm1.tm_min = 20;
+ tm1.tm_hour = 4;
+ tm1.tm_mday = 5;
+ tm1.tm_mon = 0;
+ tm1.tm_year = 99;
+ tm1.tm_isdst = 0;
+
+ tm2 = tm1;
+ tm2.tm_sec=1;
+ tm2.tm_min = 21;
+ tm2.tm_wday = 2;
+ tm2.tm_yday = 4;
+
+ t = mktime(&tm1);
+ CYG_TEST_PASS_FAIL(!cmp_structtm(&tm1, &tm2), "mktime test #2");
+ CYG_TEST_PASS_FAIL(t == 915510061, "mktime return test #2");
+
+ tm1.tm_sec = 54;
+ tm1.tm_min = 24;
+ tm1.tm_hour = 1;
+ tm1.tm_mday = 1;
+ tm1.tm_mon = 0;
+ tm1.tm_year = 100;
+ tm1.tm_isdst = 0;
+
+ tm2 = tm1;
+ tm2.tm_wday = 6;
+ tm2.tm_yday = 0;
+
+ t = mktime(&tm1);
+ CYG_TEST_PASS_FAIL(!cmp_structtm(&tm1, &tm2), "mktime Y2K test #3");
+ CYG_TEST_PASS_FAIL(t == 946689894, "mktime Y2K return test #3");
+
+ tm1.tm_sec = 54;
+ tm1.tm_min = 24;
+ tm1.tm_hour = 23;
+ tm1.tm_mday = 31;
+ tm1.tm_mon = 4;
+ tm1.tm_year = 66;
+ tm1.tm_isdst = 1;
+
+ tm2 = tm1;
+ tm2.tm_wday = 2;
+ tm2.tm_yday = 150;
+
+ t = mktime(&tm1);
+ CYG_TEST_PASS_FAIL(!cmp_structtm(&tm1, &tm2), "mktime test #4");
+ CYG_TEST_PASS_FAIL(t == -113186106, "mktime return test #4");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "mktime() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "mktime() function");
+
+ START_TEST( test );
+
+ CYG_TEST_NA("Testing is not applicable to this configuration");
+
+} // main()
+
+// EOF mktime.c
diff --git a/cesar/ecos/packages/language/c/libc/time/current/tests/strftime.c b/cesar/ecos/packages/language/c/libc/time/current/tests/strftime.c
new file mode 100644
index 0000000000..6e2ce2fd92
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/tests/strftime.c
@@ -0,0 +1,195 @@
+//=================================================================
+//
+// strftime.c
+//
+// Testcase for C library strftime() function
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 1999-03-05
+// Description: Contains testcode for C library strftime() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// INCLUDES
+
+#include <time.h>
+#include <cyg/infra/testcase.h>
+
+// HOW TO START TESTS
+
+# define START_TEST( test ) test(0)
+
+// FUNCTIONS
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+static void
+test( CYG_ADDRWORD data )
+{
+ struct tm tm1;
+ char s[1000];
+ size_t size;
+
+ tm1.tm_sec = 4;
+ tm1.tm_min = 23;
+ tm1.tm_hour = 20;
+ tm1.tm_mday = 21;
+ tm1.tm_mon = 1;
+ tm1.tm_year = 74;
+ tm1.tm_wday = 4;
+ tm1.tm_yday = 51;
+ tm1.tm_isdst = 0;
+
+ size = strftime(s, 1000, "", &tm1);
+ CYG_TEST_PASS_FAIL((size==0) && (*s=='\0'), "strftime test #1");
+
+ size = strftime(s, 1000, "%a", &tm1);
+ CYG_TEST_PASS_FAIL((size==3) && !my_strcmp(s, "Thu"), "strftime test #2");
+
+ size = strftime(s, 1000, "%A", &tm1);
+ CYG_TEST_PASS_FAIL((size==8) && !my_strcmp(s, "Thursday"),
+ "strftime test #3");
+
+ size = strftime(s, 1000, "%b", &tm1);
+ CYG_TEST_PASS_FAIL((size==3) && !my_strcmp(s, "Feb"),
+ "strftime test #4");
+
+ size = strftime(s, 1000, "%B", &tm1);
+ CYG_TEST_PASS_FAIL((size==8) && !my_strcmp(s, "February"),
+ "strftime test #5");
+
+ size = strftime(s, 1000, "%d", &tm1);
+ CYG_TEST_PASS_FAIL((size==2) && !my_strcmp(s, "21"),
+ "strftime test #6");
+
+ size = strftime(s, 1000, "%H", &tm1);
+ CYG_TEST_PASS_FAIL((size==2) && !my_strcmp(s, "20"),
+ "strftime test #7");
+
+ size = strftime(s, 1000, "%I", &tm1);
+ CYG_TEST_PASS_FAIL((size==2) && !my_strcmp(s, "09"),
+ "strftime test #8");
+
+ size = strftime(s, 1000, "%j", &tm1);
+ CYG_TEST_PASS_FAIL((size==3) && !my_strcmp(s, "051"),
+ "strftime test #9");
+
+ size = strftime(s, 1000, "%m", &tm1);
+ CYG_TEST_PASS_FAIL((size==2) && !my_strcmp(s, "02"),
+ "strftime test #10");
+
+ size = strftime(s, 1000, "%M", &tm1);
+ CYG_TEST_PASS_FAIL((size==2) && !my_strcmp(s, "23"),
+ "strftime test #11");
+
+ size = strftime(s, 1000, "%p", &tm1);
+ CYG_TEST_PASS_FAIL((size==2) && !my_strcmp(s, "pm"),
+ "strftime test #12");
+
+ size = strftime(s, 1000, "%S", &tm1);
+ CYG_TEST_PASS_FAIL((size==2) && !my_strcmp(s, "04"),
+ "strftime test #13");
+
+ size = strftime(s, 1000, "%U", &tm1);
+ CYG_TEST_PASS_FAIL((size==2) && !my_strcmp(s, "07"),
+ "strftime test #14");
+
+ size = strftime(s, 1000, "%w", &tm1);
+ CYG_TEST_PASS_FAIL((size==1) && !my_strcmp(s, "4"),
+ "strftime test #15");
+
+ size = strftime(s, 1000, "%W", &tm1);
+ CYG_TEST_PASS_FAIL((size==2) && !my_strcmp(s, "07"),
+ "strftime test #16");
+
+ size = strftime(s, 1000, "%y", &tm1);
+ CYG_TEST_PASS_FAIL((size==2) && !my_strcmp(s, "74"),
+ "strftime test #17");
+
+ size = strftime(s, 1000, "%Y", &tm1);
+ CYG_TEST_PASS_FAIL((size==4) && !my_strcmp(s, "1974"),
+ "strftime test #18");
+
+ size = strftime(s, 1000, "%%", &tm1);
+ CYG_TEST_PASS_FAIL((size==1) && !my_strcmp(s, "%"),
+ "strftime test #19");
+
+ size = strftime(s, 5, "%Y", &tm1);
+ CYG_TEST_PASS_FAIL((size==4) && !my_strcmp(s, "1974"),
+ "strftime test #20");
+
+ size = strftime(s, 4, "%Y", &tm1);
+ CYG_TEST_PASS_FAIL((size==0), "strftime test #21");
+
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strftime() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strftime() function");
+
+ START_TEST( test );
+
+ CYG_TEST_NA("Testing is not applicable to this configuration");
+
+} // main()
+
+// EOF strftime.c
diff --git a/cesar/ecos/packages/language/c/libc/time/current/tests/strptime.c b/cesar/ecos/packages/language/c/libc/time/current/tests/strptime.c
new file mode 100644
index 0000000000..3bb547da4e
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/tests/strptime.c
@@ -0,0 +1,118 @@
+//=================================================================
+//
+// strptime.c
+//
+// Testcase for C library strptime() function
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: gthomas
+// Date: 1999-03-05
+// Description: Contains testcode for C library strptime() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // C library configuration
+
+// INCLUDES
+
+#include <time.h>
+#include <cyg/infra/testcase.h>
+
+// HOW TO START TESTS
+
+# define START_TEST( test ) test(0)
+
+// FUNCTIONS
+
+static int my_strcmp(const char *s1, const char *s2)
+{
+ for ( ; *s1 == *s2 ; s1++,s2++ )
+ {
+ if ( *s1 == '\0' )
+ break;
+ } // for
+
+ return (*s1 - *s2);
+} // my_strcmp()
+
+static void
+test( CYG_ADDRWORD data )
+{
+ struct tm tm1;
+ char s[1000], *sp, *dp, *fp;
+ size_t size;
+
+ dp = "Fri Jan 24 08:33:14 2003";
+ fp = "%a %b %d %H:%M:%S %Y";
+ sp = strptime(dp, fp, &tm1);
+ CYG_TEST_PASS_FAIL(((sp!=NULL) && (*sp=='\0')), "strptime test #1");
+ size = strftime(s, sizeof(s), fp, &tm1);
+ CYG_TEST_PASS_FAIL(((size==strlen(dp)) && (my_strcmp(s, dp) == 0)), "strptime test #2");
+
+ dp = "Friday January 24 08:33:14 2003";
+ fp = "%A %B %d %H:%M:%S %Y";
+ sp = strptime(dp, fp, &tm1);
+ CYG_TEST_PASS_FAIL(((sp!=NULL) && (*sp=='\0')), "strptime test #3");
+ size = strftime(s, sizeof(s), fp, &tm1);
+ CYG_TEST_PASS_FAIL(((size==strlen(dp)) && (my_strcmp(s, dp) == 0)), "strptime test #4");
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "strptime() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "strptime() function");
+
+ START_TEST( test );
+
+ CYG_TEST_NA("Testing is not applicable to this configuration");
+
+} // main()
+
+// EOF strptime.c
diff --git a/cesar/ecos/packages/language/c/libc/time/current/tests/time.c b/cesar/ecos/packages/language/c/libc/time/current/tests/time.c
new file mode 100644
index 0000000000..ca8f49ec2f
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libc/time/current/tests/time.c
@@ -0,0 +1,123 @@
+//=================================================================
+//
+// time.c
+//
+// Testcase for C library time()
+//
+//=================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-03-05
+// Description: Contains testcode for C library time() function
+//
+//
+//####DESCRIPTIONEND####
+
+// CONFIGURATION
+
+#include <pkgconf/libc_time.h> // Configuration header
+
+// INCLUDES
+
+#include <time.h>
+#include <cyg/infra/testcase.h>
+
+// CONSTANTS
+
+// This defines how many loops before we decide that
+// time() doesn't work
+#define MAX_TIMEOUT 50000000
+
+
+// FUNCTIONS
+
+int
+main(int argc, char *argv[])
+{
+ time_t t1, t2;
+ unsigned long ctr;
+
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
+ "time() function");
+
+ t1 = time(&t2);
+
+ CYG_TEST_PASS_FAIL(t1==t2, "time() return value == argument");
+
+ if (t1 == (time_t)-1) // unimplemented is just as valid
+ {
+#ifndef CYGSEM_LIBC_TIME_TIME_WORKING
+ CYG_TEST_PASS_FINISH( "time() returns -1, meaning unimplemented");
+#else
+ CYG_TEST_FAIL("time() returned -1 unnecessarily");
+#endif
+ } // if
+
+ // First wait for a clock tick
+
+ for (ctr = 0; ctr<MAX_TIMEOUT; ctr++) {
+ if ((t2=time(NULL)) > t1)
+ break; // Hit the next time pulse
+ }
+ CYG_TEST_PASS_FAIL( ctr< MAX_TIMEOUT, "time()'s state changes");
+
+#ifdef CYGSEM_LIBC_TIME_SETTIME_WORKING
+ CYG_TEST_PASS_FAIL(cyg_libc_time_settime(0)==0, "Set time to 0");
+
+ t1 = time(NULL);
+
+ // give it a small amount of tolerance
+ CYG_TEST_PASS_FAIL(t1 < 3, "t1 remembered setting");
+
+ CYG_TEST_PASS_FAIL(cyg_libc_time_settime(1000)==0, "Set time to 1000");
+
+ // give it a small amount of tolerance
+ CYG_TEST_PASS_FAIL(t1 < 1003, "t1 remembered setting");
+
+#else // ! CYGSEM_LIBC_TIME_SETTIME_WORKING
+ CYG_TEST_PASS_FAIL(cyg_libc_time_settime(0)!=0,
+ "Set time expected fail");
+#endif // CYGSEM_LIBC_TIME_SETTIME_WORKING
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
+ "time() function");
+} // main()
+
+// EOF time.c
diff --git a/cesar/ecos/packages/language/c/libm/current/ChangeLog b/cesar/ecos/packages/language/c/libm/current/ChangeLog
new file mode 100644
index 0000000000..ec1ebf7c64
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/ChangeLog
@@ -0,0 +1,834 @@
+2004-04-14 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/double/ieee754-core/e_cosh.c (__ieee754_cosh):
+ * src/double/ieee754-core/e_sinh.c (__ieee754_sinh): Make use of
+ the CYG_LIBM_LO() macro which does not generate a compiler warning.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/libm.cdl: Fix doc link.
+
+2001-09-28 Jesper Skov <jskov@redhat.com>
+
+ * src/double/portable-api/s_expm1.c (expm1): Init c before it's used.
+
+2001-07-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/double/portable-api/s_expm1.c: Reimport from newlib
+ * src/double/ieee754-core/e_pow.c: Ditto.
+ * src/mathincl/fdlibm.h: Define macros and types required for
+ newlib versions of libm files.
+
+2001-04-25 Bart Veer <bartv@redhat.com>
+
+ * cdl/libm.cdl:
+ Ensure -ffloat-store is also used for the updated synthetic target
+ when running on x86 hardware.
+
+2000-09-11 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/misc/infconst.c: Revert below two changes - the gcc problem
+ that provoked it is now fixed.
+
+2000-09-01 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/misc/infconst.c: Silence warning about number of brackets
+
+2000-08-31 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/math.h: Declare cyg_libm_infinity as an array type for correct
+ relocations
+ * src/misc/infconst.c: Define it likewise
+
+2000-05-30 Jesper Skov <jskov@redhat.com>
+
+ * include/sys/ieeefp.h: Undo below change.
+
+2000-05-26 Jesper Skov <jskov@redhat.com>
+
+ * include/sys/ieeefp.h: Support FPU double-LE layout in BE mode.
+ Fix paste bug.
+
+2000-05-02 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * tests/vectors/vector_support.h:
+ Update startup configury to reflect changes in libc startup.
+ Use default stacksize of CYGNUM_HAL_STACK_SIZE_TYPICAL rather than 32K
+
+2000-03-28 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libm.cdl:
+
+ Adjust documentation URLs.
+
+2000-03-16 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/libm.cdl (CYGPKG_LIBM_CFLAGS_ADD): Add -ffloat-store for i386
+ targets. The math library implementation relies on accurate IEEE FP.
+
+2000-01-31 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Simon FitzMaurice <sdf@cygnus.co.uk>
+ * cdl/*.cdl:
+
+ Adjust help URLs in line with new doc layout.
+
+2000-01-28 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * cdl/libm.cdl: Don't need to compile with -O1 any more
+
+2000-01-19 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * cdl/*.cdl: Add descriptions to a number of options &c which were
+ lacking same, also tidied up other typos as noticed en passant.
+
+1999-11-23 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * include/pkgconf/libm.h: Cooperate with permtest combo10 setting
+ an intermediate variable CYGNUM_LIBM_COMPAT_DEFAULT directly.
+
+1999-11-03 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libm.cdl: Define tests.
+
+1999-10-18 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libm.cdl:
+ Parent CYGPKG_LIBM_CFLAGS_ADD and CYGPKG_LIBM_CFLAGS_REMOVE
+ under a CDL component.
+
+1999-10-15 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libm.cdl:
+ Define CYGPKG_LIBM_CFLAGS_ADD and CYGPKG_LIBM_CFLAGS_REMOVE.
+
+1999-10-07 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/compat.cdl: Specify radio buttons using CDL interfaces.
+
+1999-08-24 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak: Optimize by default everywhere, except when compiling
+ e_pow.c, in which case use -fno-schedule-insns
+
+1999-08-17 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/compat.cdl:
+
+ Implement radio buttons using "FIXME radio" hack in
+ description field for now.
+
+1999-08-14 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/compat.cdl:
+ Change CYGNUM_LIBM_COMPATIBILITY flavor to 'booldata'.
+
+1999-08-12 John Dallaway <jld@cygnus.co.uk>
+
+ * cdl/libm.cdl, cdl/compat.cdl:
+ Take advantage of MACRONAME_ENUMVAL macros output by CDL.
+
+1999-06-17 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak: Disable optimization completely until CR 100802 is
+ fixed
+
+1999-06-07 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/mathincl/fdlibm.h: Fix for alias problem
+ Fix for PR 19698
+ * src/PKGconf.mak: workaround no longer needed
+
+1999-06-04 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak:
+ Only use -fno-strict-aliasing if we have enough a recent toolchain
+ Default is that we have
+
+1999-06-03 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak:
+ Finally found the option to do the right workaround:
+ -fno-strict-aliasing
+
+1999-06-02 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak (SPECIAL_FLAGS): Don't use -fschedule-insns[2] on
+ mn10300
+
+1999-05-27 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak (SPECIAL_FLAGS): Add workaround flags for new
+ toolchains for all targets
+
+1999-05-24 Jesper Skov <jskov@cygnus.co.uk>
+
+ * src/PKGconf.mak: Same workaround for sh.
+
+1999-05-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak: Make below workaround be the other way around by
+ using -O1 and adding more explicit -O2 optimizations, just so we
+ don't lose very many optimizations. This is for sparclite
+
+1999-05-19 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak: Make below workaround be the other way around by
+ using -O1 and adding more explicit -O2 optimizations, just so we
+ don't lose very many optimizations. This is for ARM
+
+1999-05-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak: For the sparclite, prevent insn scheduling -
+ workaround for PR 19698
+
+1999-05-18 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/PKGconf.mak: For the ARM, change from -O1 to just prevent insn
+ scheduling - workaround for PR 19698
+
+1999-04-15 John Dallaway <jld@cygnus.co.uk>
+
+ * include/pkgconf/libm.h: Tidy display string capitalization.
+
+1999-04-07 Jesper Skov <jskov@cygnus.co.uk>
+ PR 19442
+ * tests/vectors/vector_support.h: Make an occasional chirp to keep
+ the testing infra interested.
+
+1999-04-06 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/PKGconf.mak: More brute-force fix for ARM compiler
+ problems - PR 19772
+
+1999-03-31 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libm.h: Remove unnecessary define
+ Fix for PR 19423
+
+1999-03-29 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/PKGconf.mak: Add special compile options to work around ARM
+ compiler bugs.
+
+1999-02-09 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/mathincl/fdlibm.h:
+ Change definition of CYG_LIBM_HI/CYG_LIBM_LO to use inline
+ function
+ Fix for PR 18859
+
+1999-01-28 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/misc/signgam.cxx:
+ * src/misc/compatmode.cxx:
+ Include <pkgconf/kernel.h> if we use kernel header files
+
+1999-01-21 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/vectors/vector_support.h (doTestVec): Makes more
+ sense to output vector number than array index
+
+ * src/double/portable-api/s_ceil.c: Fix comment s/+inf/-inf/
+
+1999-01-20 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/vectors/vector_support.h (doTestVec):
+ Add output to let you know which vectors failed
+
+1999-01-12 Gary Thomas <gthomas@cygnus.co.uk>
+
+ * src/mathincl/fdlibm.h:
+ * include/sys/ieeefp.h: Add different structure layouts for
+ machines that have doubles that aren't pure big/little endian.
+
+Fri Oct 23 19:27:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/vectors/vector_support.h (START_TEST):
+ Ensure that dummy START_TEST (the one used when the test should
+ *not* be run) does have a reference to the test function. And
+ make sure that there is a default one if there's no C API
+
+ * src/mathincl/fdlibm.h:
+ Add matherr() prototype if no namespace pollution
+
+ Fixes for PR 17972
+
+1998-10-22 Jesper Skov <jskov@cygnus.co.uk>
+ PR 17925
+
+ * include/pkgconf/libm.h:
+ * src/misc/matherr.c:
+ Removed the CYGFUN_LIBM_matherr config. The function is already
+ weakly defined so shouldn't need to be configured out.
+
+1998-10-19 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libm.h: updated the doc URL
+
+Thu Oct 15 21:36:12 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/misc/compatmode.cxx, src/misc/signgam.cxx:
+ Only include kernel headers if we want thread-safe operation
+ Required for PR 17229
+
+Wed Oct 14 17:24:46 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ Make CYGPKG_LIBM_COMPATIBILITY_DEFAULT require CYGPKG_LIBC
+ rather than all of libm, and put a check (with #error) that
+ this is the case
+
+ * src/double/ieee754-api/w_scalb.c:
+ Only include errno.h if we aren't IEEE-only
+
+ * src/double/portable-api/s_ldexp.c, src/misc/standard.c:
+ Make the error checking in s_ldexp.c more like every other libm
+ sources by putting the actual error handling into standard.c.
+ The error handling is just like scalb
+
+ * tests/vectors/acos.c, tests/vectors/asin.c,
+ tests/vectors/atan.c, tests/vectors/atan2.c,
+ tests/vectors/ceil.c, tests/vectors/cos.c, tests/vectors/cosh.c,
+ tests/vectors/exp.c, tests/vectors/fabs.c,
+ tests/vectors/floor.c, tests/vectors/fmod.c,
+ tests/vectors/frexp.c, tests/vectors/ldexp.c,
+ tests/vectors/log.c, tests/vectors/log10.c,
+ tests/vectors/modf.c, tests/vectors/pow.c, tests/vectors/sin.c,
+ tests/vectors/sinh.c, tests/vectors/sqrt.c, tests/vectors/tan.c,
+ tests/vectors/tanh.c:
+ Remove unnecessary include of <errno.h>
+
+ * tests/vectors/vector_support.h:
+ Only include errno.h if we aren't IEEE-only.
+ If we don't have Cyg_ErrNo, just use a cyg_int32 instead, to
+ make sure that the fields are still correct for the input
+ test vector.
+ In doTestVec(), before checking errno, check if we're
+ in IEEE mode (either compiled in or set at runtime) because if
+ so, and errno is set in the errno field of the input test
+ vector, then we have to skip this, since we can't validate the
+ output.
+ In all modes, if errno is set in the input test vector, don't
+ bother checking the actual values
+
+ All of the above changes are for PR 17503
+
+ * tests/vectors/pow.c:
+ Remove requirement of being in POSIX mode, as the change to
+ vector_support.h should make this work better now.
+
+
+Sun Sep 27 20:46:09 1998 David Moore <dsm@keema.cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ PR 17515: Corrected notcdl doc string.
+
+1998-09-26 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ PR 17503: there are uses of errno in a couple of places in libm,
+ and errno will only be available if the C library is present.
+ Therefore libm requires libc.
+
+
+Fri Sep 25 19:00:35 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/misc/compatmode.cxx:
+ Make sure CYGNUM_LIBM_COMPATMODE_TRACE_LEVEL is defined before
+ we attempt tracing, otherwise set trace level to 0 i.e. never
+
+ * src/misc/signgam.cxx:
+ Make sure CYGNUM_LIBM_SIGNGAM_TRACE_LEVEL is defined before
+ we attempt tracing, otherwise set trace level to 0 i.e. never
+ Fix for PR 17478
+
+ * include/pkgconf/libm.h:
+ Define trace levels only if parent CYGPKG_LIBM_TRACE is defined
+ for consistency with Configuration Tool
+
+Fri Sep 25 18:25:02 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ Only check valid compatibility setting if we aren't IEEE-only
+ mode
+ Fix for PR 17481
+
+Fri Sep 25 18:13:24 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/mathincl/fdlibm.h:
+ * src/double/ieee754-core/e_scalb.c:
+ * src/double/ieee754-api/w_scalb.c:
+ Use CYGFUN_LIBM_SVID3_scalb for whether 2nd arg of scalb is
+ double or int, rather than _SCALB_INT.
+ Fix for PR 17479
+
+Wed Sep 23 08:07:48 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/vectors/pow.c (test):
+ Make pow test conditional on being in POSIX compatibility mode.
+ This is the only mode that can set errno correctly, in
+ relation to what the tests expect.
+ Fix for PR 16933
+
+1998-09-20 Mark Galassi <rosalia@cygnus.com>
+
+ * include/pkgconf/libm.h: updated CDL doc strings.
+
+Thu Sep 17 17:10:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/vectors/vector_support.h (checkErrorAcceptable):
+ Move check for signed-ness after all of the special cases
+ Fix for PR 16933
+
+Tue Sep 15 19:26:32 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ Updated descriptions and a few other minor things after review
+
+1998-09-11 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ Sorting out dependencies for error package.
+
+Fri Sep 4 14:20:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ Fix thread-safe modes "requires" lines not to be associated
+ with the dummy parent package, but with the options themselves.
+ Also we don't need "requires CYGPKG_KERNEL" if we already require
+ a particular kernel option anyway.
+
+Thu Sep 3 09:50:20 1998 Tim Goodwin <tgoodwin@cygnus.co.uk>
+
+ * tests/vectors/vector_support.h
+ Change to cyg_thread_create() interface.
+
+Wed Sep 2 14:41:54 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ Add default define for CYGPKG_LIBM_COMPATIBILITY_DEFAULT,
+ and shorten some display texts
+
+Wed Sep 2 13:15:43 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/double/ieee754-core/e_pow.c:
+ Fix bug for when x is negative and y isn't an integer. A CYGNUS
+ LOCAL change got it wrong when casting a signed integer to
+ unsigned before right shifting.
+
+ Reformat for 76 columns
+
+ * src/double/ieee754-api/w_pow.c:
+ Reformat for 76 columns
+
+
+Wed Sep 2 12:30:11 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ Default tracing to off
+ Reformat for 76 columns
+
+ * tests/vectors/vector_support.h:
+ Align '{'s and "verbs" on the same line. Tidy to 76 columns
+
+Mon Aug 31 13:38:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ Require infra tracing support to allow tracing
+
+1998-08-28 Bart Veer <bartv@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ * src/misc/compatmode.cxx, src/misc/signgam.cxx:
+ * tests/vectors/vector_support.h
+
+ Updated for new kernel configuration option symbol names
+
+Fri Aug 28 09:07:07 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/vectors/vector_support.h:
+ Change START_TEST macro, adjust config options and add
+ cyg_package_start() to get tests working correctly with new entry
+ point mechanism, including cyg_iso_c_start() if available
+
+Wed Aug 26 20:25:36 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ Remove #define CYGPKG_LIBM is that is meant to live in
+ <pkgconf/system.h> after all
+
+
+Wed Aug 26 19:38:54 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ More fixes to CDL stuff to make it work better, and look better on
+ the screen
+
+Tue Aug 25 20:23:25 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ Make some fixes after running the ConfigTool
+
+Tue Aug 25 16:59:11 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ Turns out the nesting wasn't quite right. Correct it, and replace
+ the "not" prefix on CFG_DATA, which slipped in to the previous change.
+
+Tue Aug 25 16:53:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ Ensure there is a default compatibility mode and fix the
+ ifdef nesting for the compat modes
+
+Tue Aug 25 15:24:51 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ Tidy up CDL stuff prior to checking if it all actually works!
+
+Tue Aug 25 05:17:55 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ Do a first pass of CDLification of configuration data
+
+ * include/pkgconf/libm.h, src/misc/matherr.c:
+ Rename CYGFUN_LIBC_matherr to CYGFUN_LIBM_matherr
+
+Wed Aug 19 19:35:16 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/vectors/acos.c, tests/vectors/cosh.c, tests/vectors/ldexp.c,
+ tests/vectors/sinh.c, tests/vectors/asin.c, tests/vectors/exp.c,
+ tests/vectors/log.c, tests/vectors/sqrt.c, tests/vectors/atan.c,
+ tests/vectors/fabs.c, tests/vectors/log10.c, tests/vectors/tan.c,
+ tests/vectors/atan2.c, tests/vectors/floor.c, tests/vectors/modf.c,
+ tests/vectors/tanh.c, tests/vectors/ceil.c, tests/vectors/fmod.c,
+ tests/vectors/pow.c, tests/vectors/cos.c, tests/vectors/frexp.c,
+ tests/vectors/sin.c
+
+ * tests/vectors/vector_support.h (doTestVec):
+ Remove "register" on variable
+
+Wed Aug 19 18:59:47 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/double/ieee754-core/e_gamma.c,
+ src/double/ieee754-core/e_lgamma.c,
+ src/double/ieee754-api/w_gamma.c,
+ src/double/ieee754-api/w_lgamma.c:
+ Remove direct reference to extern int signgam and include <math.h>
+ instead
+
+Mon Jul 27 23:47:52 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/math.h, include/pkgconf/libm.h,
+ src/double/ieee754-api/w_acos.c, src/double/ieee754-api/w_acosh.c,
+ src/double/ieee754-api/w_asin.c, src/double/ieee754-api/w_atan2.c,
+ src/double/ieee754-api/w_atanh.c, src/double/ieee754-api/w_cosh.c,
+ src/double/ieee754-api/w_exp.c, src/double/ieee754-api/w_fmod.c,
+ src/double/ieee754-api/w_gamma.c,
+ src/double/ieee754-api/w_gamma_r.c,
+ src/double/ieee754-api/w_hypot.c, src/double/ieee754-api/w_j0.c,
+ src/double/ieee754-api/w_j1.c, src/double/ieee754-api/w_jn.c,
+ src/double/ieee754-api/w_lgamma.c,
+ src/double/ieee754-api/w_lgamma_r.c,
+ src/double/ieee754-api/w_log.c,
+ src/double/ieee754-api/w_log10.c, src/double/ieee754-api/w_pow.c,
+ src/double/ieee754-api/w_remainder.c,
+ src/double/ieee754-api/w_scalb.c, src/double/ieee754-api/w_sinh.c,
+ src/double/ieee754-api/w_sqrt.c, src/double/ieee754-core/e_acos.c,
+ src/double/ieee754-core/e_acosh.c,
+ src/double/ieee754-core/e_asin.c,
+ src/double/ieee754-core/e_atan2.c,
+ src/double/ieee754-core/e_atanh.c,
+ src/double/ieee754-core/e_cosh.c,
+ src/double/ieee754-core/e_exp.c, src/double/ieee754-core/e_fmod.c,
+ src/double/ieee754-core/e_gamma.c,
+ src/double/ieee754-core/e_gamma_r.c,
+ src/double/ieee754-core/e_hypot.c, src/double/ieee754-core/e_j0.c,
+ src/double/ieee754-core/e_j1.c, src/double/ieee754-core/e_jn.c,
+ src/double/ieee754-core/e_lgamma.c,
+ src/double/ieee754-core/e_lgamma_r.c,
+ src/double/ieee754-core/e_log.c, src/double/ieee754-core/e_log10.c,
+ src/double/ieee754-core/e_pow.c,
+ src/double/ieee754-core/e_rem_pio2.c,
+ src/double/ieee754-core/e_remainder.c,
+ src/double/ieee754-core/e_scalb.c,
+ src/double/ieee754-core/e_sinh.c,
+ src/double/ieee754-core/e_sqrt.c, src/double/internal/k_cos.c,
+ src/double/internal/k_rem_pio2.c, src/double/internal/k_sin.c,
+ src/double/internal/k_tan.c, src/double/portable-api/s_asinh.c,
+ src/double/portable-api/s_atan.c, src/double/portable-api/s_cbrt.c,
+ src/double/portable-api/s_ceil.c,
+ src/double/portable-api/s_copysign.c,
+ src/double/portable-api/s_cos.c, src/double/portable-api/s_erf.c,
+ src/double/portable-api/s_expm1.c,
+ src/double/portable-api/s_fabs.c,
+ src/double/portable-api/s_finite.c,
+ src/double/portable-api/s_floor.c,
+ src/double/portable-api/s_frexp.c,
+ src/double/portable-api/s_ilogb.c,
+ src/double/portable-api/s_isnan.c,
+ src/double/portable-api/s_ldexp.c,
+ src/double/portable-api/s_log1p.c,
+ src/double/portable-api/s_logb.c,
+ src/double/portable-api/s_modf.c,
+ src/double/portable-api/s_nextafter.c,
+ src/double/portable-api/s_rint.c,
+ src/double/portable-api/s_scalbn.c,
+ src/double/portable-api/s_significand.c,
+ src/double/portable-api/s_sin.c, src/double/portable-api/s_tan.c,
+ src/double/portable-api/s_tanh.c, src/mathincl/fdlibm.h,
+ src/misc/standard.c:
+
+ Untabify
+
+Mon Jul 27 22:52:24 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/vectors/vector_support.h (doTestVec):
+ Remove "register" when declaring variable i
+
+ * host/acosgen.c, host/cosgen.c, host/fmodgen.c, host/modfgen.c,
+ host/tangen.c, host/asingen.c, host/coshgen.c, host/frexpgen.c,
+ host/powgen.c, host/tanhgen.c, host/atan2gen.c, host/expgen.c,
+ host/ldexpgen.c, host/singen.c, host/atangen.c, host/fabsgen.c,
+ host/log10gen.c, host/sinhgen.c, host/ceilgen.c, host/floorgen.c,
+ host/loggen.c, host/sqrtgen.c:
+ Remove "register" when declaring variable "int x"
+
+Mon Jul 27 22:45:01 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/vectors/vector_support.h (checkErrorAcceptable):
+ Add extra check for tolerance acceptance so it behaves correctly with
+ underflow and overflow
+
+ Also reverse sense of checkErrorAcceptable() so it now returns
+ false on success and true on failure, as suggested by hmt. Change
+ this in doTestVec() (which is where it is called) too.
+
+ * tests/vectors/vector_support.h:
+ Remove #if 0'd shift_double() function
+
+Mon Jul 27 21:55:04 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/mathincl/fdlibm.h:
+ Rename CYGONCE_LIBM_FDLIBM_H to CYGONCE_LIBM_MATHINCL_FDLIBM_H as per
+ code review comments
+
+Fri Jul 24 22:20:42 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/math.h, include/pkgconf/libm.h,
+ src/double/ieee754-api/w_acos.c, src/double/ieee754-api/w_acosh.c,
+ src/double/ieee754-api/w_asin.c, src/double/ieee754-api/w_atan2.c,
+ src/double/ieee754-api/w_atanh.c, src/double/ieee754-api/w_cosh.c,
+ src/double/ieee754-api/w_exp.c, src/double/ieee754-api/w_fmod.c,
+ src/double/ieee754-api/w_gamma.c, src/double/ieee754-api/w_gamma_r.c,
+ src/double/ieee754-api/w_hypot.c, src/double/ieee754-api/w_j0.c,
+ src/double/ieee754-api/w_j1.c, src/double/ieee754-api/w_jn.c,
+ src/double/ieee754-api/w_lgamma.c,
+ src/double/ieee754-api/w_lgamma_r.c, src/double/ieee754-api/w_log.c,
+ src/double/ieee754-api/w_log10.c, src/double/ieee754-api/w_pow.c,
+ src/double/ieee754-api/w_remainder.c,
+ src/double/ieee754-api/w_scalb.c, src/double/ieee754-api/w_sinh.c,
+ src/double/ieee754-api/w_sqrt.c, src/mathincl/fdlibm.h,
+ src/misc/compatmode.cxx, src/misc/matherr.c, src/misc/signgam.cxx,
+ src/misc/standard.c:
+
+ Rename libm config option names as per the libm coding standard
+ review. Chiefly ensuring that CYGXXX_ prefixes are correct
+
+ * src/misc/matherr.c, include/pkgconf/libm.h:
+ Add new CYGFUN_LIBC_matherr config option to prevent inclusion of
+ default matherr
+
+Mon Jul 20 18:07:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/misc/infconst.c:
+ Oops. Don't let cyg_libm_infinity be static!
+
+Thu Jul 16 20:07:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/math.h, include/sys/ieeefp.h, src/misc/infconst.c:
+ Remove union Cyg_libm_int_double from math.h, which was used to
+ define infinity, and replace with use of
+ Cyg_libm_ieee_double_shape_type from ieeefp.h
+
+ That type (which is a union) is now reordered so that it can be
+ initialised in terms of two int's
+
+Mon Jul 13 21:55:06 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/double/ieee754-api/w_acos.c, src/double/ieee754-api/w_acosh.c,
+ src/double/ieee754-api/w_asin.c, src/double/ieee754-api/w_atan2.c,
+ src/double/ieee754-api/w_atanh.c, src/double/ieee754-api/w_cosh.c,
+ src/double/ieee754-api/w_exp.c, src/double/ieee754-api/w_fmod.c,
+ src/double/ieee754-api/w_gamma.c, src/double/ieee754-api/w_gamma_r.c,
+ src/double/ieee754-api/w_hypot.c, src/double/ieee754-api/w_j0.c,
+ src/double/ieee754-api/w_j1.c, src/double/ieee754-api/w_jn.c,
+ src/double/ieee754-api/w_lgamma.c,
+ src/double/ieee754-api/w_lgamma_r.c, src/double/ieee754-api/w_log.c,
+ src/double/ieee754-api/w_log10.c, src/double/ieee754-api/w_pow.c,
+ src/double/ieee754-api/w_remainder.c,
+ src/double/ieee754-api/w_scalb.c, src/double/ieee754-api/w_sinh.c,
+ src/double/ieee754-api/w_sqrt.c, src/double/ieee754-core/e_acos.c,
+ src/double/ieee754-core/e_acosh.c, src/double/ieee754-core/e_asin.c,
+ src/double/ieee754-core/e_atan2.c, src/double/ieee754-core/e_atanh.c,
+ src/double/ieee754-core/e_cosh.c, src/double/ieee754-core/e_exp.c,
+ src/double/ieee754-core/e_fmod.c, src/double/ieee754-core/e_gamma.c,
+ src/double/ieee754-core/e_gamma_r.c,
+ src/double/ieee754-core/e_hypot.c, src/double/ieee754-core/e_j0.c,
+ src/double/ieee754-core/e_j1.c, src/double/ieee754-core/e_jn.c,
+ src/double/ieee754-core/e_lgamma.c,
+ src/double/ieee754-core/e_lgamma_r.c,
+ src/double/ieee754-core/e_log.c, src/double/ieee754-core/e_log10.c,
+ src/double/ieee754-core/e_pow.c,
+ src/double/ieee754-core/e_rem_pio2.c,
+ src/double/ieee754-core/e_remainder.c,
+ src/double/ieee754-core/e_scalb.c, src/double/ieee754-core/e_sinh.c,
+ src/double/ieee754-core/e_sqrt.c, src/double/internal/k_cos.c,
+ src/double/internal/k_rem_pio2.c, src/double/internal/k_sin.c,
+ src/double/internal/k_tan.c, src/double/portable-api/s_asinh.c,
+ src/double/portable-api/s_atan.c, src/double/portable-api/s_cbrt.c,
+ src/double/portable-api/s_ceil.c,
+ src/double/portable-api/s_copysign.c,
+ src/double/portable-api/s_cos.c, src/double/portable-api/s_erf.c,
+ src/double/portable-api/s_expm1.c, src/double/portable-api/s_fabs.c,
+ src/double/portable-api/s_finite.c,
+ src/double/portable-api/s_floor.c, src/double/portable-api/s_frexp.c,
+ src/double/portable-api/s_ilogb.c, src/double/portable-api/s_isnan.c,
+ src/double/portable-api/s_ldexp.c, src/double/portable-api/s_log1p.c,
+ src/double/portable-api/s_logb.c, src/double/portable-api/s_modf.c,
+ src/double/portable-api/s_nextafter.c,
+ src/double/portable-api/s_rint.c, src/double/portable-api/s_scalbn.c,
+ src/double/portable-api/s_significand.c,
+ src/double/portable-api/s_sin.c, src/double/portable-api/s_tan.c,
+ src/double/portable-api/s_tanh.c, src/misc/standard.c:
+
+ Make #ifdef __STDC__ bits compulsory and remove the associated #else
+ clause. We know that gcc is ISO C compatible!
+
+Tue Jul 7 16:05:48 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/misc/compatmode.cxx:
+ Fix conditionalisation to prevent unused variable warning for tracing
+
+Thu Jun 25 04:58:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * tests/vectors/acos.c, tests/vectors/acos.h, tests/vectors/asin.c,
+ tests/vectors/asin.h, tests/vectors/atan.c, tests/vectors/atan.h,
+ tests/vectors/atan2.c, tests/vectors/atan2.h, tests/vectors/ceil.c,
+ tests/vectors/ceil.h, tests/vectors/cos.c, tests/vectors/cos.h,
+ tests/vectors/cosh.c, tests/vectors/cosh.h, tests/vectors/exp.c,
+ tests/vectors/exp.h, tests/vectors/fabs.c, tests/vectors/fabs.h,
+ tests/vectors/floor.c, tests/vectors/floor.h, tests/vectors/fmod.c,
+ tests/vectors/fmod.h, tests/vectors/frexp.c, tests/vectors/frexp.h,
+ tests/vectors/ldexp.c, tests/vectors/ldexp.h, tests/vectors/log.c,
+ tests/vectors/log.h, tests/vectors/log10.c, tests/vectors/log10.h,
+ tests/vectors/modf.c, tests/vectors/modf.h, tests/vectors/pow.c,
+ tests/vectors/pow.h, tests/vectors/sin.c, tests/vectors/sin.h,
+ tests/vectors/sinh.c, tests/vectors/sinh.h, tests/vectors/sqrt.c,
+ tests/vectors/sqrt.h, tests/vectors/tan.c, tests/vectors/tan.h,
+ tests/vectors/tanh.c, tests/vectors/tanh.h,
+ tests/vectors/vector_support.h:
+ Add math library tests for functions specified in the ISO standard.
+ These are based on precomputed test vectors
+
+ * tests/PKGconf.mak:
+ Create with above files being built
+
+ * host/acosgen.c, host/asingen.c, host/atan2gen.c, host/atangen.c,
+ host/ceilgen.c, host/cosgen.c, host/coshgen.c, host/expgen.c,
+ host/fabsgen.c, host/floorgen.c, host/fmodgen.c, host/frexpgen.c,
+ host/ldexpgen.c, host/log10gen.c, host/loggen.c, host/modfgen.c,
+ host/powgen.c, host/singen.c, host/sinhgen.c, host/sqrtgen.c,
+ host/tangen.c, host/tanhgen.c:
+ Host-side (and currently linux-specific) sources to automatically
+ generate test vector data used by the above tests.
+
+ * include/pkgconf/libm.h:
+ Ensure the kernel C API is available if we want thread safety
+
+Wed Jun 24 15:42:31 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/misc/standard.c:
+ Fix typo in ifdef
+
+Wed Jun 24 13:04:30 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/misc/standard.c:
+ Fix #defines for IEEE mode, revealed by permutation testing
+
+Mon Jun 22 14:42:50 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/misc/infconst.c:
+ Fix compiler warning
+
+Sun Jun 21 04:42:18 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/sys/ieeefp.h:
+ Add this to allow bitfield break down of IEEE floating point doubles
+
+Wed Jun 17 08:55:21 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * include/pkgconf/libm.h:
+ Make the use of stderr for messages _not_ the default
+ Make thread safety the default
+
+ * src/misc/standard.c:
+ Change alternative for fprintf(stderr,...) _not_ being used from
+ "CYG_EMPTY_STATEMENT" to just "0" to placate compiler.
+
+Mon Jun 15 19:59:36 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/misc/compatmode.cxx:
+ Fix typo in compatibility mode name
+
+Fri Jun 5 16:31:26 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * src/misc/signgam.cxx, src/misc/compatmode.cxx:
+ Fix some minor typos when thread safety is turned on
+
+ * src/misc/matherr.c
+ Correct syntax of weak attribute
+
+Fri Jun 5 07:07:03 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * Initial check-in of all math library sources. Based on fdlibm-5.2.
+
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/language/c/libm/current/cdl/compat.cdl b/cesar/ecos/packages/language/c/libm/current/cdl/compat.cdl
new file mode 100644
index 0000000000..0093d60e41
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/cdl/compat.cdl
@@ -0,0 +1,142 @@
+# ====================================================================
+#
+# compat.cdl
+#
+# Maths library compatibility related configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jskov
+# Original data: jlarmour
+# Contributors:
+# Date: 1999-07-07
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_interface CYGINT_LIBM_COMPAT {
+ requires 1 == CYGINT_LIBM_COMPAT
+}
+
+cdl_option CYGSEM_LIBM_COMPAT_IEEE_ONLY {
+ display "IEEE-only"
+ default_value 0
+ implements CYGINT_LIBM_COMPAT
+ description "
+ The math library can be hard-coded to only
+ behave in one compatibility mode - IEEE. This
+ cannot be changed at run-time. IEEE mode is the
+ most minimal of the compatibility modes, and so
+ this will best help code size and speed, as well
+ as omitting the code for other compatibility
+ modes. If not defined, the math library can be
+ set at run-time to any of the supported
+ compatibility modes."
+}
+
+cdl_component CYGNUM_LIBM_COMPATIBILITY {
+ display "Default mode"
+ flavor booldata
+ requires CYGPKG_LIBC
+ implements CYGINT_LIBM_COMPAT
+ legal_values { "POSIX" "IEEE" "XOPEN" "SVID" }
+ default_value { "POSIX" }
+ define CYGPKG_LIBM_COMPATIBILITY_DEFAULT
+ description "
+ If you want to have support for more than one
+ compatibility mode settable at run-time, rather
+ than hard-coded IEEE mode, this component lets
+ you choose which mode should be the default."
+
+ cdl_option CYGNUM_LIBM_COMPAT_DEFAULT {
+ display "Numeric representation"
+ flavor data
+ calculated { \
+ CYGNUM_LIBM_COMPATIBILITY == "POSIX" ? "CYGNUM_LIBM_COMPAT_POSIX" :\
+ CYGNUM_LIBM_COMPATIBILITY == "IEEE" ? "CYGNUM_LIBM_COMPAT_IEEE" :\
+ CYGNUM_LIBM_COMPATIBILITY == "XOPEN" ? "CYGNUM_LIBM_COMPAT_XOPEN" :\
+ CYGNUM_LIBM_COMPATIBILITY == "SVID" ? "CYGNUM_LIBM_COMPAT_SVID" :\
+ "<undefined>" \
+ }
+ description "
+ This option automatically defines the default compatibility
+ mode for numeric representation in terms of the values used
+ to set that mode at run-time."
+ }
+}
+
+cdl_option CYGFUN_LIBM_SVID3_scalb {
+ display "SVID3-style scalb()"
+ default_value 1
+ description "
+ SVID3 defined the scalb() function as double
+ scalb(double, double) rather than double
+ scalb(double, int) which is used by IBM, DEC, and
+ probably others. Enabling this option chooses
+ the (double, double) version. Note there is a
+ function double scalbn(double, int) which is
+ unaffected by this choice."
+}
+
+cdl_option CYGSYM_LIBM_NO_XOPEN_SVID_NAMESPACE_POLLUTION {
+ display "Reduce namespace pollution"
+ default_value 0
+ description "
+ If you do not want to use either the X/Open or
+ SVID3 compatibility modes, you may want to define
+ this option to reduce the chance of namespace
+ pollution. This is particularly likely to occur
+ here as these standards define symbols with
+ names that often appear in applications, such as
+ exception, DOMAIN, OVERFLOW, etc. If your
+ application also used these names, it may cause
+ problems."
+}
+
+cdl_option CYGSEM_LIBM_USE_STDERR {
+ display "Output to stderr for math errors"
+ requires !CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ requires CYGPKG_LIBC_STDIO
+ default_value 0
+ description "
+ The SVID3 standard says that error
+ messages should be output on the stderr console
+ output stream. This option allows this ability
+ to be explicitly controlled. However, this still
+ only has an effect in SVID3 compatibility mode."
+}
diff --git a/cesar/ecos/packages/language/c/libm/current/cdl/libm.cdl b/cesar/ecos/packages/language/c/libm/current/cdl/libm.cdl
new file mode 100644
index 0000000000..3e2f43f621
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/cdl/libm.cdl
@@ -0,0 +1,259 @@
+# ====================================================================
+#
+# libm.cdl
+#
+# Maths library configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Original data: jlarmour
+# Contributors:
+# Date: 1999-06-13
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_LIBM {
+ display "Math library"
+ doc ref/libc.html
+ description "
+ ISO standard floating point mathematical library
+ containing many useful functions for mathematical
+ calculations."
+
+ compile misc/matherr.c misc/standard.c misc/compatmode.cxx \
+ misc/infconst.c \
+ \
+ double/ieee754-core/e_acos.c double/ieee754-core/e_asin.c \
+ double/ieee754-core/e_atan2.c double/ieee754-core/e_cosh.c \
+ double/ieee754-core/e_exp.c double/ieee754-core/e_fmod.c \
+ double/ieee754-core/e_log.c double/ieee754-core/e_log10.c \
+ double/ieee754-core/e_pow.c \
+ double/ieee754-core/e_rem_pio2.c \
+ double/ieee754-core/e_scalb.c double/ieee754-core/e_sinh.c \
+ double/ieee754-core/e_sqrt.c \
+ \
+ double/ieee754-api/w_acos.c double/ieee754-api/w_asin.c \
+ double/ieee754-api/w_atan2.c double/ieee754-api/w_cosh.c \
+ double/ieee754-api/w_exp.c double/ieee754-api/w_fmod.c \
+ double/ieee754-api/w_log.c double/ieee754-api/w_log10.c \
+ double/ieee754-api/w_pow.c double/ieee754-api/w_scalb.c \
+ double/ieee754-api/w_sinh.c double/ieee754-api/w_sqrt.c \
+ \
+ double/internal/k_cos.c double/internal/k_rem_pio2.c \
+ double/internal/k_sin.c double/internal/k_tan.c \
+ \
+ double/portable-api/s_atan.c double/portable-api/s_ceil.c \
+ double/portable-api/s_copysign.c \
+ double/portable-api/s_cos.c double/portable-api/s_expm1.c \
+ double/portable-api/s_fabs.c double/portable-api/s_finite.c \
+ double/portable-api/s_floor.c double/portable-api/s_frexp.c \
+ double/portable-api/s_isnan.c double/portable-api/s_ldexp.c \
+ double/portable-api/s_rint.c double/portable-api/s_scalbn.c \
+ double/portable-api/s_sin.c double/portable-api/s_tan.c \
+ double/portable-api/s_modf.c double/portable-api/s_tanh.c
+
+
+ # COMPATIBILITY-MODE RELATED CONFIGURATION OPTIONS
+ cdl_component CYGPKG_LIBM_COMPATIBILITY {
+ display "Compatibility mode"
+ flavor none
+ description "
+ These options deal with behaviour related to
+ the various compatibility modes - POSIX, IEEE,
+ X/OPEN and SVID."
+
+ script compat.cdl
+ }
+
+ # THREAD-SAFETY CONFIGURATION OPTIONS
+ cdl_component CYGPKG_LIBM_THREAD_SAFETY {
+ display "Thread safety"
+ flavor none
+ description "
+ This option controls whether the C library has
+ support for thread safe operation in general.
+ This requires eCos kernel support for per-thread
+ data, and adjustment of the stack limit."
+
+ cdl_option CYGSEM_LIBM_THREAD_SAFE_COMPAT_MODE {
+ display "Compatibility mode setting"
+ requires !CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ requires CYGVAR_KERNEL_THREADS_DATA
+ default_value 0
+ description "
+ This option makes the setting of the compatiblity
+ mode be a per-thread property. This directly
+ implies that it also becomes thread-safe."
+ }
+
+ cdl_option CYGSEM_LIBM_THREAD_SAFE_GAMMA_FUNCTIONS {
+ display "gamma() and lgamma()"
+ requires CYGVAR_KERNEL_THREADS_DATA
+ default_value 0
+ description "
+ This option makes the gamma() and lgamma()
+ functions be thread-safe. Note that these
+ functions are identical - they take the log of
+ the absolute value of their argument. The sign
+ of the argument is stored in a variable called
+ signgam. Enabling this option makes signgam
+ a per-thread variable. Note there are also
+ gamma_r() and lgamma_r() alternatives that
+ allow signgam to be passed in by reference as
+ an argument."
+ }
+ }
+
+ # TRACING OPTIONS
+ cdl_component CYGPKG_LIBM_TRACE {
+ display "Tracing output levels in math library"
+ flavor bool
+ requires CYGDBG_USE_TRACING
+ default_value 0
+ description "
+ Tracing support is useful for debugging. Some
+ Math library modules can be configured with
+ different levels of tracing verbosity. These
+ levels can be configured here."
+
+
+ cdl_option CYGNUM_LIBM_COMPATMODE_TRACE_LEVEL {
+ display "Compatibility mode get/set"
+ requires CYGSEM_LIBM_THREAD_SAFE_COMPAT_MODE
+ flavor data
+ legal_values 0 to 1
+ default_value 0
+ description "
+ Trace level for debugging the getting and
+ setting of the compatibility mode when it is
+ configured to be thread-safe."
+ }
+
+ cdl_option CYGNUM_LIBM_SIGNGAM_TRACE_LEVEL {
+ display "signgam variable access"
+ requires CYGSEM_LIBM_THREAD_SAFE_GAMMA_FUNCTIONS
+ flavor data
+ legal_values 0 to 1
+ default_value 0
+ description "
+ Trace level for debugging all accesses to the
+ signgam variable in thread-safe mode."
+ }
+ }
+
+ # OTHER CONFIGURATION SETTINGS
+ cdl_option X_TLOSS {
+ display "Bessel function limit of significance"
+ flavor data
+ default_value 1.41484755040568800000e+16; # pi*(2**52)
+ legal_values 1 to 1e308; # FIXME
+ description "
+ For the Bessel functions (j0(), j1(), jn(),
+ y0(), y1(), yn()) this option defines the
+ maximum absolute value of the ordinate
+ before we assume total loss of significance.
+ This number must be a floating-point number (e.g.
+ contains a decimal point), and should be
+ large."
+ }
+
+ define_proc {
+ puts $::cdl_header "/***** proc output start *****/"
+
+ puts $::cdl_header "#include <pkgconf/system.h>"
+
+ # TYPE DEFINITIONS
+ # Compatibility mode selector - required for default below
+
+ puts $::cdl_header "typedef enum {"
+ puts $::cdl_header " CYGNUM_LIBM_COMPAT_UNINIT= 0, // Default state. DO NOT set it to this"
+ puts $::cdl_header " CYGNUM_LIBM_COMPAT_POSIX = 1, // ANSI/POSIX 1003.1"
+ puts $::cdl_header " CYGNUM_LIBM_COMPAT_IEEE = 2, // IEEE-754"
+ puts $::cdl_header " CYGNUM_LIBM_COMPAT_XOPEN = 3, // X/OPEN Portability guide issue 3"
+ puts $::cdl_header " // (XPG3)"
+ puts $::cdl_header " CYGNUM_LIBM_COMPAT_SVID = 4 // System V Interface Definition 3rd"
+ puts $::cdl_header " // edition"
+ puts $::cdl_header "} Cyg_libm_compat_t;"
+ puts $::cdl_header ""
+
+ puts $::cdl_header "/****** proc output end ******/"
+ }
+
+ cdl_component CYGPKG_LIBM_OPTIONS {
+ display "Math library build options"
+ flavor none
+ description "
+ Package specific build options including control over
+ compiler flags used only in building this package,
+ and details of which tests are built."
+
+
+ cdl_option CYGPKG_LIBM_CFLAGS_ADD {
+ display "Additional compiler flags"
+ flavor data
+ no_define
+ default_value { ((0 == CYGPKG_HAL_I386) && (0 == CYGPKG_HAL_SYNTH_I386)) ? "" : "-ffloat-store" }
+ description "
+ This option modifies the set of compiler flags for
+ building the math library. These flags are used in addition
+ to the set of global flags."
+ }
+
+ cdl_option CYGPKG_LIBM_CFLAGS_REMOVE {
+ display "Suppressed compiler flags"
+ flavor data
+ no_define
+ default_value { "" }
+ description "
+ This option modifies the set of compiler flags for
+ building the math library. These flags are removed from
+ the set of global flags if present."
+ }
+
+ cdl_option CYGPKG_LIBM_TESTS {
+ display "Math library tests"
+ flavor data
+ no_define
+ calculated { "tests/vectors/acos tests/vectors/asin tests/vectors/atan tests/vectors/atan2 tests/vectors/ceil tests/vectors/cos tests/vectors/cosh tests/vectors/exp tests/vectors/fabs tests/vectors/floor tests/vectors/fmod tests/vectors/frexp tests/vectors/ldexp tests/vectors/log tests/vectors/log10 tests/vectors/modf tests/vectors/pow tests/vectors/sin tests/vectors/sinh tests/vectors/sqrt tests/vectors/tan tests/vectors/tanh" }
+ description "
+ This option specifies the set of tests for the math library."
+ }
+ }
+}
diff --git a/cesar/ecos/packages/language/c/libm/current/include/math.h b/cesar/ecos/packages/language/c/libm/current/include/math.h
new file mode 100644
index 0000000000..5422069647
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/include/math.h
@@ -0,0 +1,416 @@
+#ifndef CYGONCE_LIBM_MATH_H
+#define CYGONCE_LIBM_MATH_H
+//===========================================================================
+//
+// math.h
+//
+// Standard mathematical functions conforming to ANSI and other standards
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description: Standard mathematical functions. These can be
+// configured to conform to ANSI section 7.5. There are also
+// a number of extensions conforming to IEEE-754 and behaviours
+// compatible with other standards
+// Usage: #include <math.h>
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <float.h> // Properties of FP representation on this
+ // platform
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+
+// CONSTANT DEFINITIONS
+
+
+// HUGE_VAL is a positive double (not necessarily representable as a float)
+// representing infinity as specified in ANSI 7.5. cyg_libm_infinity is
+// defined further down
+#define HUGE_VAL (cyg_libm_infinity.value)
+
+
+#ifndef CYGSYM_LIBM_NO_XOPEN_SVID_NAMESPACE_POLLUTION
+// HUGE is defined in System V Interface Definition 3 (SVID3) as the largest
+// finite single precision number
+#define HUGE FLT_MAX // from float.h
+
+
+// Values used in the type field of struct exception below
+
+#define DOMAIN 1
+#define SING 2
+#define OVERFLOW 3
+#define UNDERFLOW 4
+#define TLOSS 5
+#define PLOSS 6
+
+
+// TYPE DEFINITIONS
+
+// Things required to support matherr() ( see comments in <pkgconf/libm.h>)
+
+struct exception {
+ int type; // One of DOMAIN, SING, OVERFLOW, UNDERFLOW, TLOSS, PLOSS
+ char *name; // Name of the function generating the exception
+ double arg1; // First argument to the function
+ double arg2; // Second argument to the function
+ double retval; // Value to be returned - can be altered by matherr()
+};
+
+#endif // ifndef CYGSYM_LIBM_NO_XOPEN_SVID_NAMESPACE_POLLUTION
+
+
+// GLOBALS
+
+externC const Cyg_libm_ieee_double_shape_type cyg_libm_infinity;
+
+//===========================================================================
+// FUNCTION PROTOTYPES
+
+// Functions not part of a standard
+
+// This retrieves a pointer to the current compatibility mode of the Math
+// library. See <pkgconf/libm.h> for the definition of Cyg_libm_compat_t
+
+#ifdef CYGSEM_LIBM_THREAD_SAFE_COMPAT_MODE
+
+externC Cyg_libm_compat_t
+cyg_libm_get_compat_mode( void );
+
+externC Cyg_libm_compat_t
+cyg_libm_set_compat_mode( Cyg_libm_compat_t );
+
+#else
+
+externC Cyg_libm_compat_t cygvar_libm_compat_mode;
+
+// Defined as static inline as it is unlikely that anyone wants to take the
+// address of these functions.
+//
+// This returns the current compatibility mode
+
+static inline Cyg_libm_compat_t
+cyg_libm_get_compat_mode( void )
+{
+ return cygvar_libm_compat_mode;
+}
+
+// This sets the compatibility mode, and returns the previous mode
+static inline Cyg_libm_compat_t
+cyg_libm_set_compat_mode( Cyg_libm_compat_t math_compat_mode)
+{
+ Cyg_libm_compat_t oldmode;
+
+ oldmode = cygvar_libm_compat_mode;
+ cygvar_libm_compat_mode = math_compat_mode;
+ return oldmode;
+}
+
+#endif // ifdef CYGSEM_LIBM_THREAD_SAFE_COMPAT_MODE
+
+#ifdef CYGSEM_LIBM_THREAD_SAFE_GAMMA_FUNCTIONS
+
+// FIXME: these need to be documented and signgam mentioned as non-ISO
+// This returns the address of the signgam variable used by the gamma*() and
+// lgamma*() functions
+externC int *
+cyg_libm_get_signgam_p( void );
+
+#define signgam (*cyg_libm_get_signgam_p())
+
+#else
+
+externC int signgam;
+
+#endif // ifdef CYGSEM_LIBM_THREAD_SAFE_GAMMA_FUNCTIONS
+
+//===========================================================================
+// Standard ANSI functions. Angles are always in radians
+
+// Trigonometric functions - ANSI 7.5.2
+
+externC double
+acos( double ); // arc cosine i.e. inverse cos
+
+externC double
+asin( double ); // arc sine i.e. inverse sin
+
+externC double
+atan( double ); // arc tan i.e. inverse tan
+
+externC double
+atan2( double, double ); // arc tan of (first arg/second arg) using signs
+ // of args to determine quadrant
+
+externC double
+cos( double ); // cosine
+
+externC double
+sin( double ); // sine
+
+externC double
+tan( double ); // tangent
+
+// Hyperbolic functions - ANSI 7.5.3
+
+externC double
+cosh( double ); // hyperbolic cosine
+
+externC double
+sinh( double ); // hyperbolic sine
+
+externC double
+tanh( double ); // hyperbolic tangent
+
+// Exponential and Logarithmic Functions - ANSI 7.5.4
+
+externC double
+exp( double ); // exponent
+
+externC double
+frexp( double, int * ); // break number into normalized fraction (returned)
+ // and integral power of 2 (second arg)
+
+externC double
+ldexp( double, int ); // multiples number by integral power of 2
+
+externC double
+log( double ); // natural logarithm
+
+externC double
+log10( double ); // base ten logarithm
+
+externC double
+modf( double, double * ); // break number into integral and fractional
+ // parts, each of which has same sign as arg.
+ // It returns signed fractional part, and
+ // puts integral part in second arg
+
+// Power Functions - ANSI 7.5.5
+
+externC double
+pow( double, double ); // (1st arg) to the power of (2nd arg)
+
+externC double
+sqrt( double ); // square root
+
+// Nearest integer, absolute value and remainder functions - ANSI 7.5.6
+
+externC double
+ceil( double ); // smallest integer >= arg
+
+externC double
+fabs( double ); // absolute value
+
+externC double
+floor( double ); // largest integer <= arg
+
+externC double
+fmod( double, double ); // remainder of (1st arg)/(2nd arg)
+
+//===========================================================================
+// Other standard functions
+
+#ifndef CYGSYM_LIBM_NO_XOPEN_SVID_NAMESPACE_POLLUTION
+externC int
+matherr( struct exception * ); // User-overridable error handling - see
+#endif // <pkgconf/libm.h> for a discussion
+
+// FIXME: from here needs to be documented and mentioned as non-ISO
+// Arc Hyperbolic trigonometric functions
+
+externC double
+acosh( double ); // Arc hyperbolic cos i.e. inverse cosh
+
+externC double
+asinh( double ); // Arc hyperbolic sin i.e. inverse sinh
+
+externC double
+atanh( double ); // Arc hyperbolic tan i.e. inverse tanh
+
+// Error functions
+
+externC double // Error function, such that
+erf( double ); // erf(x) = 2/sqrt(pi) * integral from
+ // 0 to x of e**(-t**2) dt
+
+externC double // Complementary error function - simply
+erfc( double ); // 1.0 - erf(x)
+
+// Gamma functions
+
+externC double // Logarithm of the absolute value of the
+lgamma( double ); // gamma function of the argument. The
+ // integer signgam is used to store the
+ // sign of the gamma function of the arg
+
+externC double
+lgamma_r( double, int * ); // Re-entrant version of the above, where
+ // the user passes the location of signgam
+ // as the second argument
+
+externC double // Identical to lgamma()!
+gamma( double ); // The reasons for this are historical,
+ // and may be changed in future standards
+ //
+ // To get the real gamma function, you should
+ // use: l=lgamma(x); g=signgam*exp(l);
+ //
+ // Do not just do signgam*exp(lgamma(x))
+ // as lgamma() modifies signgam
+
+externC double
+gamma_r( double, int * ); // Identical to lgamma_r(). See above.
+
+
+// Bessel functions
+
+externC double // Zero-th order Bessel function of the
+j0( double ); // first kind at the ordinate of the argument
+
+externC double // First-order Bessel function of the
+j1( double ); // first kind at the ordinate of the argument
+
+externC double // Bessel function of the first kind of the
+jn( int, double ); // order of the first argument at the
+ // ordinate of the second argument
+
+externC double // Zero-th order Bessel function of the
+y0( double ); // second kind at the ordinate of the
+ // argument
+
+externC double // First-order Bessel function of the
+y1( double ); // second kind at the ordinate of the
+ // argument
+
+externC double // Bessel function of the second kind of the
+yn( int, double ); // order of the first argument at the
+ // ordinate of the second argument
+
+// scalb*()
+
+externC double // scalbn(x,n) returns x*(2**n)
+scalbn( double, int );
+
+#ifdef CYGFUN_LIBM_SVID3_scalb
+
+externC double
+scalb( double, double ); // as above except n is a floating point arg
+
+#else
+externC double
+scalb( double, int ); // as scalbn()
+
+#endif // ifdef CYGFUN_LIBM_SVID3_scalb
+
+// And the rest
+
+externC double
+cbrt( double ); // Cube Root
+
+externC double // hypotenuse function, defined such that:
+hypot( double, double ); // hypot(x,y)==sqrt(x**2 + y**2)
+
+externC int // whether the argument is NaN
+isnan( double );
+
+externC int
+finite( double ); // whether the argument is finite
+
+externC double // logb returns the binary exponent of its
+logb( double ); // argument as an integral value
+ // This is not recommended - use ilogb
+ // instead
+
+externC int // As for logb, but has the more correct
+ilogb( double ); // return value type of int
+
+
+externC double // nextafter(x,y) returns the next
+nextafter( double, double ); // representable floating point number
+ // adjacent to x in the direction of y
+ // i.e. the next greater FP if y>x, the next
+ // less FP if y<x, or just x if y==x
+
+externC double // remainder(x,y) returns the remainder
+remainder( double, double ); // when x is divided by y
+
+externC double // IEEE Test Vector
+significand( double ); // significand(x) computes:
+ // scalb(x, (double) -ilogb(x))
+
+//===========================================================================
+// Non-standard functions
+
+externC double // copysign(x,y) returns a number with
+copysign ( double, double ); // the absolute value of x and the sign of y
+
+externC double // rounds to an integer according to the
+rint( double ); // current rounding mode
+
+
+// BSD functions
+
+externC double // expm1(x) returns the equivalent of
+expm1( double ); // (exp(x) - 1) but more accurately when
+ // x tends to zero
+
+externC double // log1p(x) returns the equivalent of
+log1p( double ); // log(1+x) but more accurately when
+ // x tends to zero
+
+#endif // ifdef CYGPKG_LIBM
+
+#endif // CYGONCE_LIBM_MATH_H multiple inclusion protection
+
+// EOF math.h
diff --git a/cesar/ecos/packages/language/c/libm/current/include/sys/ieeefp.h b/cesar/ecos/packages/language/c/libm/current/include/sys/ieeefp.h
new file mode 100644
index 0000000000..de17bb2cc2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/include/sys/ieeefp.h
@@ -0,0 +1,235 @@
+#ifndef CYGONCE_LIBM_SYS_IEEEFP_H
+#define CYGONCE_LIBM_SYS_IEEEFP_H
+//===========================================================================
+//
+// ieeefp.h
+//
+// Definitions specific to IEEE-754 floating-point format
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description: Definitions specific to IEEE-754 floating-point format
+// Usage: #include <sys/ieeefp.h>
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+ // including endian-ness
+
+#if (CYG_BYTEORDER == CYG_MSBFIRST) // Big endian
+
+// Note: there do not seem to be any current machines which are Big Endian but
+// have a mixed up double layout.
+
+typedef union
+{
+ cyg_int32 asi32[2];
+
+ cyg_int64 asi64;
+
+ double value;
+
+ struct
+ {
+ unsigned int sign : 1;
+ unsigned int exponent: 11;
+ unsigned int fraction0:4;
+ unsigned int fraction1:16;
+ unsigned int fraction2:16;
+ unsigned int fraction3:16;
+
+ } number;
+
+ struct
+ {
+ unsigned int sign : 1;
+ unsigned int exponent: 11;
+ unsigned int quiet:1;
+ unsigned int function0:3;
+ unsigned int function1:16;
+ unsigned int function2:16;
+ unsigned int function3:16;
+ } nan;
+
+ struct
+ {
+ cyg_uint32 msw;
+ cyg_uint32 lsw;
+ } parts;
+
+
+} Cyg_libm_ieee_double_shape_type;
+
+
+typedef union
+{
+ cyg_int32 asi32;
+
+ float value;
+
+ struct
+ {
+ unsigned int sign : 1;
+ unsigned int exponent: 8;
+ unsigned int fraction0: 7;
+ unsigned int fraction1: 16;
+ } number;
+
+ struct
+ {
+ unsigned int sign:1;
+ unsigned int exponent:8;
+ unsigned int quiet:1;
+ unsigned int function0:6;
+ unsigned int function1:16;
+ } nan;
+
+} Cyg_libm_ieee_float_shape_type;
+
+
+#else // Little endian
+
+typedef union
+{
+ cyg_int32 asi32[2];
+
+ cyg_int64 asi64;
+
+ double value;
+
+ struct
+ {
+#if (CYG_DOUBLE_BYTEORDER == CYG_MSBFIRST) // Big endian
+ unsigned int fraction1:16;
+ unsigned int fraction0: 4;
+ unsigned int exponent :11;
+ unsigned int sign : 1;
+ unsigned int fraction3:16;
+ unsigned int fraction2:16;
+#else
+ unsigned int fraction3:16;
+ unsigned int fraction2:16;
+ unsigned int fraction1:16;
+ unsigned int fraction0: 4;
+ unsigned int exponent :11;
+ unsigned int sign : 1;
+#endif
+ } number;
+
+ struct
+ {
+#if (CYG_DOUBLE_BYTEORDER == CYG_MSBFIRST) // Big endian
+ unsigned int function1:16;
+ unsigned int function0:3;
+ unsigned int quiet:1;
+ unsigned int exponent: 11;
+ unsigned int sign : 1;
+ unsigned int function3:16;
+ unsigned int function2:16;
+#else
+ unsigned int function3:16;
+ unsigned int function2:16;
+ unsigned int function1:16;
+ unsigned int function0:3;
+ unsigned int quiet:1;
+ unsigned int exponent: 11;
+ unsigned int sign : 1;
+#endif
+ } nan;
+
+ struct
+ {
+#if (CYG_DOUBLE_BYTEORDER == CYG_MSBFIRST) // Big endian
+ cyg_uint32 msw;
+ cyg_uint32 lsw;
+#else
+ cyg_uint32 lsw;
+ cyg_uint32 msw;
+#endif
+ } parts;
+
+} Cyg_libm_ieee_double_shape_type;
+
+
+typedef union
+{
+ cyg_int32 asi32;
+
+ float value;
+
+ struct
+ {
+ unsigned int fraction0: 7;
+ unsigned int fraction1: 16;
+ unsigned int exponent: 8;
+ unsigned int sign : 1;
+ } number;
+
+ struct
+ {
+ unsigned int function1:16;
+ unsigned int function0:6;
+ unsigned int quiet:1;
+ unsigned int exponent:8;
+ unsigned int sign:1;
+ } nan;
+
+} Cyg_libm_ieee_float_shape_type;
+
+#endif // little-endian
+
+
+#endif // ifdef CYGPKG_LIBM
+
+#endif // CYGONCE_LIBM_SYS_IEEEFP_H multiple inclusion protection
+
+// EOF ieeefp.h
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_acos.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_acos.c
new file mode 100644
index 0000000000..32b16b096a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_acos.c
@@ -0,0 +1,100 @@
+//===========================================================================
+//
+// w_acos.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_acos.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrap_acos(x)
+ */
+
+#include "mathincl/fdlibm.h"
+
+
+ double acos(double x) /* wrapper acos */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_acos(x);
+#else
+ double z;
+ z = __ieee754_acos(x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnan(x)) return z;
+ if(fabs(x)>1.0) {
+ return __kernel_standard(x,x,1); /* acos(|x|>1) */
+ } else
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_acos.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_acosh.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_acosh.c
new file mode 100644
index 0000000000..119aadd64e
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_acosh.c
@@ -0,0 +1,100 @@
+//===========================================================================
+//
+// w_acosh.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_acosh.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ *
+ */
+
+/*
+ * wrapper acosh(x)
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double acosh(double x) /* wrapper acosh */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_acosh(x);
+#else
+ double z;
+ z = __ieee754_acosh(x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnan(x)) return z;
+ if(x<1.0) {
+ return __kernel_standard(x,x,29); /* acosh(x<1) */
+ } else
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_acosh.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_asin.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_asin.c
new file mode 100644
index 0000000000..40850867da
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_asin.c
@@ -0,0 +1,102 @@
+//===========================================================================
+//
+// w_asin.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_asin.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ *
+ */
+
+/*
+ * wrapper asin(x)
+ */
+
+
+#include "mathincl/fdlibm.h"
+
+
+ double asin(double x) /* wrapper asin */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_asin(x);
+#else
+ double z;
+ z = __ieee754_asin(x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnan(x)) return z;
+ if(fabs(x)>1.0) {
+ return __kernel_standard(x,x,2); /* asin(|x|>1) */
+ } else
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_asin.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_atan2.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_atan2.c
new file mode 100644
index 0000000000..150a529408
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_atan2.c
@@ -0,0 +1,101 @@
+//===========================================================================
+//
+// w_atan2.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_atan2.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ *
+ */
+
+/*
+ * wrapper atan2(y,x)
+ */
+
+#include "mathincl/fdlibm.h"
+
+
+ double atan2(double y, double x) /* wrapper atan2 */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_atan2(y,x);
+#else
+ double z;
+ z = __ieee754_atan2(y,x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE||isnan(x)||isnan(y)) return z;
+ if(x==0.0&&y==0.0) {
+ return __kernel_standard(y,x,3); /* atan2(+-0,+-0) */
+ } else
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_atan2.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_atanh.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_atanh.c
new file mode 100644
index 0000000000..71345b781a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_atanh.c
@@ -0,0 +1,103 @@
+//===========================================================================
+//
+// w_atanh.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_atanh.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+/*
+ * wrapper atanh(x)
+ */
+
+#include "mathincl/fdlibm.h"
+
+
+ double atanh(double x) /* wrapper atanh */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_atanh(x);
+#else
+ double z,y;
+ z = __ieee754_atanh(x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnan(x)) return z;
+ y = fabs(x);
+ if(y>=1.0) {
+ if(y>1.0)
+ return __kernel_standard(x,x,30); /* atanh(|x|>1) */
+ else
+ return __kernel_standard(x,x,31); /* atanh(|x|==1) */
+ } else
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_atanh.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_cosh.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_cosh.c
new file mode 100644
index 0000000000..73d03ef3ac
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_cosh.c
@@ -0,0 +1,99 @@
+//===========================================================================
+//
+// w_cosh.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_cosh.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper cosh(x)
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double cosh(double x) /* wrapper cosh */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_cosh(x);
+#else
+ double z;
+ z = __ieee754_cosh(x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnan(x)) return z;
+ if(fabs(x)>7.10475860073943863426e+02) {
+ return __kernel_standard(x,x,5); /* cosh overflow */
+ } else
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_cosh.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_exp.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_exp.c
new file mode 100644
index 0000000000..a65ec1cb37
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_exp.c
@@ -0,0 +1,106 @@
+//===========================================================================
+//
+// w_exp.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_exp.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper exp(x)
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double
+o_threshold= 7.09782712893383973096e+02, /* 0x40862E42, 0xFEFA39EF */
+u_threshold= -7.45133219101941108420e+02; /* 0xc0874910, 0xD52D3051 */
+
+ double exp(double x) /* wrapper exp */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_exp(x);
+#else
+ double z;
+ z = __ieee754_exp(x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE) return z;
+ if(finite(x)) {
+ if(x>o_threshold)
+ return __kernel_standard(x,x,6); /* exp overflow */
+ else if(x<u_threshold)
+ return __kernel_standard(x,x,7); /* exp underflow */
+ }
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_exp.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_fmod.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_fmod.c
new file mode 100644
index 0000000000..ca6a62c5ec
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_fmod.c
@@ -0,0 +1,100 @@
+//===========================================================================
+//
+// w_fmod.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_fmod.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper fmod(x,y)
+ */
+
+#include "mathincl/fdlibm.h"
+
+
+ double fmod(double x, double y) /* wrapper fmod */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_fmod(x,y);
+#else
+ double z;
+ z = __ieee754_fmod(x,y);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE ||isnan(y)||isnan(x)) return z;
+ if(y==0.0) {
+ return __kernel_standard(x,y,27); /* fmod(x,0) */
+ } else
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_fmod.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_gamma.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_gamma.c
new file mode 100644
index 0000000000..979ba8e25f
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_gamma.c
@@ -0,0 +1,108 @@
+//===========================================================================
+//
+// w_gamma.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_gamma.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ *
+ */
+
+/* double gamma(double x)
+ * Return the logarithm of the Gamma function of x.
+ *
+ * Method: call gamma_r
+ */
+
+#include <math.h>
+#include "mathincl/fdlibm.h"
+
+
+double
+gamma(double x)
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_gamma_r(x,&signgam);
+#else
+ double y;
+ y = __ieee754_gamma_r(x,&signgam);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE) return y;
+ if(!finite(y)&&finite(x)) {
+ if(floor(x)==x&&x<=0.0)
+ return __kernel_standard(x,x,41); /* gamma pole */
+ else
+ return __kernel_standard(x,x,40); /* gamma overflow */
+ } else
+ return y;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_gamma.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_gamma_r.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_gamma_r.c
new file mode 100644
index 0000000000..04f445cbe8
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_gamma_r.c
@@ -0,0 +1,103 @@
+//===========================================================================
+//
+// w_gamma_r.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_gamma_r.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper double gamma_r(double x, int *signgamp)
+ */
+
+#include "mathincl/fdlibm.h"
+
+
+ double gamma_r(double x, int *signgamp) /* wrapper lgamma_r */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_gamma_r(x,signgamp);
+#else
+ double y;
+ y = __ieee754_gamma_r(x,signgamp);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE) return y;
+ if(!finite(y)&&finite(x)) {
+ if(floor(x)==x&&x<=0.0)
+ return __kernel_standard(x,x,41); /* gamma pole */
+ else
+ return __kernel_standard(x,x,40); /* gamma overflow */
+ } else
+ return y;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_gamma_r.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_hypot.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_hypot.c
new file mode 100644
index 0000000000..e2c398b07d
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_hypot.c
@@ -0,0 +1,100 @@
+//===========================================================================
+//
+// w_hypot.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_hypot.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper hypot(x,y)
+ */
+
+#include "mathincl/fdlibm.h"
+
+
+ double hypot(double x, double y)/* wrapper hypot */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_hypot(x,y);
+#else
+ double z;
+ z = __ieee754_hypot(x,y);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE) return z;
+ if((!finite(z))&&finite(x)&&finite(y))
+ return __kernel_standard(x,y,4); /* hypot overflow */
+ else
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_hypot.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_j0.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_j0.c
new file mode 100644
index 0000000000..9645dd216f
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_j0.c
@@ -0,0 +1,121 @@
+//===========================================================================
+//
+// w_j0.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_j0.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper j0(double x), y0(double x)
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double j0(double x) /* wrapper j0 */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_j0(x);
+#else
+ double z = __ieee754_j0(x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnan(x)) return z;
+ if(fabs(x)>X_TLOSS) {
+ return __kernel_standard(x,x,34); /* j0(|x|>X_TLOSS) */
+ } else
+ return z;
+#endif
+}
+
+ double y0(double x) /* wrapper y0 */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_y0(x);
+#else
+ double z;
+ z = __ieee754_y0(x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnan(x) ) return z;
+ if(x <= 0.0){
+ if(x==0.0)
+ /* d= -one/(x-x); */
+ return __kernel_standard(x,x,8);
+ else
+ /* d = zero/(x-x); */
+ return __kernel_standard(x,x,9);
+ }
+ if(x>X_TLOSS) {
+ return __kernel_standard(x,x,35); /* y0(x>X_TLOSS) */
+ } else
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_j0.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_j1.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_j1.c
new file mode 100644
index 0000000000..733799cd3b
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_j1.c
@@ -0,0 +1,122 @@
+//===========================================================================
+//
+// w_j1.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_j1.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper of j1,y1
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double j1(double x) /* wrapper j1 */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_j1(x);
+#else
+ double z;
+ z = __ieee754_j1(x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnan(x) ) return z;
+ if(fabs(x)>X_TLOSS) {
+ return __kernel_standard(x,x,36); /* j1(|x|>X_TLOSS) */
+ } else
+ return z;
+#endif
+}
+
+ double y1(double x) /* wrapper y1 */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_y1(x);
+#else
+ double z;
+ z = __ieee754_y1(x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnan(x) ) return z;
+ if(x <= 0.0){
+ if(x==0.0)
+ /* d= -one/(x-x); */
+ return __kernel_standard(x,x,10);
+ else
+ /* d = zero/(x-x); */
+ return __kernel_standard(x,x,11);
+ }
+ if(x>X_TLOSS) {
+ return __kernel_standard(x,x,37); /* y1(x>X_TLOSS) */
+ } else
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_j1.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_jn.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_jn.c
new file mode 100644
index 0000000000..65586adfdf
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_jn.c
@@ -0,0 +1,144 @@
+//===========================================================================
+//
+// w_jn.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_jn.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper jn(int n, double x), yn(int n, double x)
+ * floating point Bessel's function of the 1st and 2nd kind
+ * of order n
+ *
+ * Special cases:
+ * y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal;
+ * y0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal.
+ * Note 2. About jn(n,x), yn(n,x)
+ * For n=0, j0(x) is called,
+ * for n=1, j1(x) is called,
+ * for n<x, forward recursion us used starting
+ * from values of j0(x) and j1(x).
+ * for n>x, a continued fraction approximation to
+ * j(n,x)/j(n-1,x) is evaluated and then backward
+ * recursion is used starting from a supposed value
+ * for j(n,x). The resulting value of j(0,x) is
+ * compared with the actual value to correct the
+ * supposed value of j(n,x).
+ *
+ * yn(n,x) is similar in all respects, except
+ * that forward recursion is used for all
+ * values of n>1.
+ *
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double jn(int n, double x) /* wrapper jn */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_jn(n,x);
+#else
+ double z;
+ z = __ieee754_jn(n,x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnan(x) ) return z;
+ if(fabs(x)>X_TLOSS) {
+ return __kernel_standard((double)n,x,38); /* jn(|x|>X_TLOSS,n) */
+ } else
+ return z;
+#endif
+}
+
+ double yn(int n, double x) /* wrapper yn */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_yn(n,x);
+#else
+ double z;
+ z = __ieee754_yn(n,x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnan(x) ) return z;
+ if(x <= 0.0){
+ if(x==0.0)
+ /* d= -one/(x-x); */
+ return __kernel_standard((double)n,x,12);
+ else
+ /* d = zero/(x-x); */
+ return __kernel_standard((double)n,x,13);
+ }
+ if(x>X_TLOSS) {
+ return __kernel_standard((double)n,x,39); /* yn(x>X_TLOSS,n) */
+ } else
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_jn.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_lgamma.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_lgamma.c
new file mode 100644
index 0000000000..d694f26ec7
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_lgamma.c
@@ -0,0 +1,108 @@
+//===========================================================================
+//
+// w_lgamma.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_lgamma.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ *
+ */
+
+/* double lgamma(double x)
+ * Return the logarithm of the Gamma function of x.
+ *
+ * Method: call __ieee754_lgamma_r
+ */
+
+#include <math.h>
+#include "mathincl/fdlibm.h"
+
+
+double
+lgamma(double x)
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_lgamma_r(x,&signgam);
+#else
+ double y;
+ y = __ieee754_lgamma_r(x,&signgam);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE) return y;
+ if(!finite(y)&&finite(x)) {
+ if(floor(x)==x&&x<=0.0)
+ return __kernel_standard(x,x,15); /* lgamma pole */
+ else
+ return __kernel_standard(x,x,14); /* lgamma overflow */
+ } else
+ return y;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_lgamma.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_lgamma_r.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_lgamma_r.c
new file mode 100644
index 0000000000..6fd8a4f528
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_lgamma_r.c
@@ -0,0 +1,103 @@
+//===========================================================================
+//
+// w_lgamma_r.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_lgamma_r.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper double lgamma_r(double x, int *signgamp)
+ */
+
+#include "mathincl/fdlibm.h"
+
+
+ double lgamma_r(double x, int *signgamp) /* wrapper lgamma_r */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_lgamma_r(x,signgamp);
+#else
+ double y;
+ y = __ieee754_lgamma_r(x,signgamp);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE) return y;
+ if(!finite(y)&&finite(x)) {
+ if(floor(x)==x&&x<=0.0)
+ return __kernel_standard(x,x,15); /* lgamma pole */
+ else
+ return __kernel_standard(x,x,14); /* lgamma overflow */
+ } else
+ return y;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_lgamma_r.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_log.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_log.c
new file mode 100644
index 0000000000..eeafa873d8
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_log.c
@@ -0,0 +1,100 @@
+//===========================================================================
+//
+// w_log.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_log.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper log(x)
+ */
+
+#include "mathincl/fdlibm.h"
+
+
+ double log(double x) /* wrapper log */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_log(x);
+#else
+ double z;
+ z = __ieee754_log(x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnan(x) || x > 0.0) return z;
+ if(x==0.0)
+ return __kernel_standard(x,x,16); /* log(0) */
+ else
+ return __kernel_standard(x,x,17); /* log(x<0) */
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_log.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_log10.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_log10.c
new file mode 100644
index 0000000000..5436886b53
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_log10.c
@@ -0,0 +1,103 @@
+//===========================================================================
+//
+// w_log10.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_log10.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper log10(X)
+ */
+
+#include "mathincl/fdlibm.h"
+
+
+ double log10(double x) /* wrapper log10 */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_log10(x);
+#else
+ double z;
+ z = __ieee754_log10(x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnan(x)) return z;
+ if(x<=0.0) {
+ if(x==0.0)
+ return __kernel_standard(x,x,18); /* log10(0) */
+ else
+ return __kernel_standard(x,x,19); /* log10(x<0) */
+ } else
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_log10.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_pow.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_pow.c
new file mode 100644
index 0000000000..9401d0f8a6
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_pow.c
@@ -0,0 +1,123 @@
+//========================================================================
+//
+// w_pow.c
+//
+// Part of the standard mathematical function library
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+
+/* @(#)w_pow.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper pow(x,y) return x**y
+ */
+
+#include "mathincl/fdlibm.h"
+
+
+ double pow(double x, double y) /* wrapper pow */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_pow(x,y);
+#else
+ double z;
+ z=__ieee754_pow(x,y);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE||
+ isnan(y))
+ return z;
+ if(isnan(x)) {
+ if(y==0.0)
+ return __kernel_standard(x,y,42); /* pow(NaN,0.0) */
+ else
+ return z;
+ }
+ if(x==0.0){
+ if(y==0.0)
+ return __kernel_standard(x,y,20); /* pow(0.0,0.0) */
+ if(finite(y)&&y<0.0)
+ return __kernel_standard(x,y,23); /* pow(0.0,negative) */
+ return z;
+ }
+ if(!finite(z)) {
+ if(finite(x)&&finite(y)) {
+ if(isnan(z))
+ return __kernel_standard(x,y,24);/* pow neg**non-int */
+ else
+ return __kernel_standard(x,y,21); /* pow overflow */
+ }
+ }
+ if(z==0.0&&finite(x)&&finite(y))
+ return __kernel_standard(x,y,22); /* pow underflow */
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_pow.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_remainder.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_remainder.c
new file mode 100644
index 0000000000..0eee1b4509
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_remainder.c
@@ -0,0 +1,99 @@
+//===========================================================================
+//
+// w_remainder.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_remainder.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper remainder(x,p)
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double remainder(double x, double y) /* wrapper remainder */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_remainder(x,y);
+#else
+ double z;
+ z = __ieee754_remainder(x,y);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnan(y)) return z;
+ if(y==0.0)
+ return __kernel_standard(x,y,28); /* remainder(x,0) */
+ else
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_remainder.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_scalb.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_scalb.c
new file mode 100644
index 0000000000..9e9319d2e6
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_scalb.c
@@ -0,0 +1,115 @@
+//===========================================================================
+//
+// w_scalb.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_scalb.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper scalb(double x, double fn) is provide for
+ * passing various standard test suite. One
+ * should use scalbn() instead.
+ */
+
+#include "mathincl/fdlibm.h"
+
+#ifndef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+# include <errno.h>
+#endif
+
+#ifdef CYGFUN_LIBM_SVID3_scalb
+ double scalb(double x, double fn) /* wrapper scalb */
+#else
+ double scalb(double x, int fn) /* wrapper scalb */
+#endif
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_scalb(x,fn);
+#else
+ double z;
+ z = __ieee754_scalb(x,fn);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE) return z;
+ if(!(finite(z)||isnan(z))&&finite(x)) {
+ return __kernel_standard(x,(double)fn,32); /* scalb overflow */
+ }
+ if(z==0.0&&z!=x) {
+ return __kernel_standard(x,(double)fn,33); /* scalb underflow */
+ }
+#ifdef CYGFUN_LIBM_SVID3_scalb
+ if(!finite(fn)) errno = ERANGE;
+#endif
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_scalb.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_sinh.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_sinh.c
new file mode 100644
index 0000000000..61295a0269
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_sinh.c
@@ -0,0 +1,99 @@
+//===========================================================================
+//
+// w_sinh.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_sinh.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper sinh(x)
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double sinh(double x) /* wrapper sinh */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_sinh(x);
+#else
+ double z;
+ z = __ieee754_sinh(x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE) return z;
+ if(!finite(z)&&finite(x)) {
+ return __kernel_standard(x,x,25); /* sinh overflow */
+ } else
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_sinh.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_sqrt.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_sqrt.c
new file mode 100644
index 0000000000..248f72b7e8
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-api/w_sqrt.c
@@ -0,0 +1,99 @@
+//===========================================================================
+//
+// w_sqrt.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)w_sqrt.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * wrapper sqrt(x)
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double sqrt(double x) /* wrapper sqrt */
+{
+#ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ return __ieee754_sqrt(x);
+#else
+ double z;
+ z = __ieee754_sqrt(x);
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnan(x)) return z;
+ if(x<0.0) {
+ return __kernel_standard(x,x,26); /* sqrt(negative) */
+ } else
+ return z;
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF w_sqrt.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_acos.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_acos.c
new file mode 100644
index 0000000000..36e296e3e6
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_acos.c
@@ -0,0 +1,162 @@
+//===========================================================================
+//
+// e_acos.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_acos.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_acos(x)
+ * Method :
+ * acos(x) = pi/2 - asin(x)
+ * acos(-x) = pi/2 + asin(x)
+ * For |x|<=0.5
+ * acos(x) = pi/2 - (x + x*x^2*R(x^2)) (see asin.c)
+ * For x>0.5
+ * acos(x) = pi/2 - (pi/2 - 2asin(sqrt((1-x)/2)))
+ * = 2asin(sqrt((1-x)/2))
+ * = 2s + 2s*z*R(z) ...z=(1-x)/2, s=sqrt(z)
+ * = 2f + (2c + 2s*z*R(z))
+ * where f=hi part of s, and c = (z-f*f)/(s+f) is the correction term
+ * for f so that f+c ~ sqrt(z).
+ * For x<-0.5
+ * acos(x) = pi - 2asin(sqrt((1-|x|)/2))
+ * = pi - 0.5*(s+s*z*R(z)), where z=(1-|x|)/2,s=sqrt(z)
+ *
+ * Special cases:
+ * if x is NaN, return x itself;
+ * if |x|>1, return NaN with invalid signal.
+ *
+ * Function needed: sqrt
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double
+one= 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
+pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */
+pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */
+pio2_lo = 6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */
+pS0 = 1.66666666666666657415e-01, /* 0x3FC55555, 0x55555555 */
+pS1 = -3.25565818622400915405e-01, /* 0xBFD4D612, 0x03EB6F7D */
+pS2 = 2.01212532134862925881e-01, /* 0x3FC9C155, 0x0E884455 */
+pS3 = -4.00555345006794114027e-02, /* 0xBFA48228, 0xB5688F3B */
+pS4 = 7.91534994289814532176e-04, /* 0x3F49EFE0, 0x7501B288 */
+pS5 = 3.47933107596021167570e-05, /* 0x3F023DE1, 0x0DFDF709 */
+qS1 = -2.40339491173441421878e+00, /* 0xC0033A27, 0x1C8A2D4B */
+qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */
+qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
+qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
+
+ double __ieee754_acos(double x)
+{
+ double z,p,q,r,w,s,c,df;
+ int hx,ix;
+ hx = CYG_LIBM_HI(x);
+ ix = hx&0x7fffffff;
+ if(ix>=0x3ff00000) { /* |x| >= 1 */
+ if(((ix-0x3ff00000)|CYG_LIBM_LO(x))==0) { /* |x|==1 */
+ if(hx>0) return 0.0; /* acos(1) = 0 */
+ else return pi+2.0*pio2_lo; /* acos(-1)= pi */
+ }
+ return (x-x)/(x-x); /* acos(|x|>1) is NaN */
+ }
+ if(ix<0x3fe00000) { /* |x| < 0.5 */
+ if(ix<=0x3c600000) return pio2_hi+pio2_lo;/*if|x|<2**-57*/
+ z = x*x;
+ p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
+ q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
+ r = p/q;
+ return pio2_hi - (x - (pio2_lo-x*r));
+ } else if (hx<0) { /* x < -0.5 */
+ z = (one+x)*0.5;
+ p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
+ q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
+ s = sqrt(z);
+ r = p/q;
+ w = r*s-pio2_lo;
+ return pi - 2.0*(s+w);
+ } else { /* x > 0.5 */
+ z = (one-x)*0.5;
+ s = sqrt(z);
+ df = s;
+ CYG_LIBM_LO(df) = 0;
+ c = (z-df*df)/(s+df);
+ p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
+ q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
+ r = p/q;
+ w = r*s+c;
+ return 2.0*(df+w);
+ }
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_acos.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_acosh.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_acosh.c
new file mode 100644
index 0000000000..7f390b0916
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_acosh.c
@@ -0,0 +1,122 @@
+//===========================================================================
+//
+// e_acosh.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_acosh.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ *
+ */
+
+/* __ieee754_acosh(x)
+ * Method :
+ * Based on
+ * acosh(x) = log [ x + sqrt(x*x-1) ]
+ * we have
+ * acosh(x) := log(x)+ln2, if x is large; else
+ * acosh(x) := log(2x-1/(sqrt(x*x-1)+x)) if x>2; else
+ * acosh(x) := log1p(t+sqrt(2.0*t+t*t)); where t=x-1.
+ *
+ * Special cases:
+ * acosh(x) is NaN with signal if x<1.
+ * acosh(NaN) is NaN without signal.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double
+one = 1.0,
+ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */
+
+ double __ieee754_acosh(double x)
+{
+ double t;
+ int hx;
+ hx = CYG_LIBM_HI(x);
+ if(hx<0x3ff00000) { /* x < 1 */
+ return (x-x)/(x-x);
+ } else if(hx >=0x41b00000) { /* x > 2**28 */
+ if(hx >=0x7ff00000) { /* x is inf of NaN */
+ return x+x;
+ } else
+ return __ieee754_log(x)+ln2; /* acosh(huge)=log(2x) */
+ } else if(((hx-0x3ff00000)|CYG_LIBM_LO(x))==0) {
+ return 0.0; /* acosh(1) = 0 */
+ } else if (hx > 0x40000000) { /* 2**28 > x > 2 */
+ t=x*x;
+ return __ieee754_log(2.0*x-one/(x+sqrt(t-one)));
+ } else { /* 1<x<2 */
+ t = x-one;
+ return log1p(t+sqrt(2.0*t+t*t));
+ }
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_acosh.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_asin.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_asin.c
new file mode 100644
index 0000000000..108ae7787a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_asin.c
@@ -0,0 +1,173 @@
+//===========================================================================
+//
+// e_asin.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_asin.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_asin(x)
+ * Method :
+ * Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ...
+ * we approximate asin(x) on [0,0.5] by
+ * asin(x) = x + x*x^2*R(x^2)
+ * where
+ * R(x^2) is a rational approximation of (asin(x)-x)/x^3
+ * and its remez error is bounded by
+ * |(asin(x)-x)/x^3 - R(x^2)| < 2^(-58.75)
+ *
+ * For x in [0.5,1]
+ * asin(x) = pi/2-2*asin(sqrt((1-x)/2))
+ * Let y = (1-x), z = y/2, s := sqrt(z), and pio2_hi+pio2_lo=pi/2;
+ * then for x>0.98
+ * asin(x) = pi/2 - 2*(s+s*z*R(z))
+ * = pio2_hi - (2*(s+s*z*R(z)) - pio2_lo)
+ * For x<=0.98, let pio4_hi = pio2_hi/2, then
+ * f = hi part of s;
+ * c = sqrt(z) - f = (z-f*f)/(s+f) ...f+c=sqrt(z)
+ * and
+ * asin(x) = pi/2 - 2*(s+s*z*R(z))
+ * = pio4_hi+(pio4-2s)-(2s*z*R(z)-pio2_lo)
+ * = pio4_hi+(pio4-2f)-(2s*z*R(z)-(pio2_lo+2c))
+ *
+ * Special cases:
+ * if x is NaN, return x itself;
+ * if |x|>1, return NaN with invalid signal.
+ *
+ */
+
+
+#include "mathincl/fdlibm.h"
+
+static const double
+one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
+huge = 1.000e+300,
+pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */
+pio2_lo = 6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */
+pio4_hi = 7.85398163397448278999e-01, /* 0x3FE921FB, 0x54442D18 */
+ /* coefficient for R(x^2) */
+pS0 = 1.66666666666666657415e-01, /* 0x3FC55555, 0x55555555 */
+pS1 = -3.25565818622400915405e-01, /* 0xBFD4D612, 0x03EB6F7D */
+pS2 = 2.01212532134862925881e-01, /* 0x3FC9C155, 0x0E884455 */
+pS3 = -4.00555345006794114027e-02, /* 0xBFA48228, 0xB5688F3B */
+pS4 = 7.91534994289814532176e-04, /* 0x3F49EFE0, 0x7501B288 */
+pS5 = 3.47933107596021167570e-05, /* 0x3F023DE1, 0x0DFDF709 */
+qS1 = -2.40339491173441421878e+00, /* 0xC0033A27, 0x1C8A2D4B */
+qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */
+qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
+qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
+
+ double __ieee754_asin(double x)
+{
+ double t,w,p,q,c,r,s;
+ int hx,ix;
+
+ hx = CYG_LIBM_HI(x);
+ ix = hx&0x7fffffff;
+ if(ix>= 0x3ff00000) { /* |x|>= 1 */
+ if(((ix-0x3ff00000)|CYG_LIBM_LO(x))==0)
+ /* asin(1)=+-pi/2 with inexact */
+ return x*pio2_hi+x*pio2_lo;
+ return (x-x)/(x-x); /* asin(|x|>1) is NaN */
+ } else if (ix<0x3fe00000) { /* |x|<0.5 */
+ if(ix<0x3e400000) { /* if |x| < 2**-27 */
+ if(huge+x>one) return x;/* return x with inexact if x!=0*/
+ } else {
+ t = x*x;
+ p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));
+ q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));
+ w = p/q;
+ return x+x*w;
+ }
+ }
+ /* 1> |x|>= 0.5 */
+ w = one-fabs(x);
+ t = w*0.5;
+ p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));
+ q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));
+ s = sqrt(t);
+ if(ix>=0x3FEF3333) { /* if |x| > 0.975 */
+ w = p/q;
+ t = pio2_hi-(2.0*(s+s*w)-pio2_lo);
+ } else {
+ w = s;
+ CYG_LIBM_LO(w) = 0;
+ c = (t-w*w)/(s+w);
+ r = p/q;
+ p = 2.0*s*r-(pio2_lo-2.0*c);
+ q = pio4_hi-2.0*w;
+ t = pio4_hi-(p-q);
+ }
+ if(hx>0) return t; else return -t;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_asin.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_atan2.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_atan2.c
new file mode 100644
index 0000000000..4e791edca4
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_atan2.c
@@ -0,0 +1,180 @@
+//===========================================================================
+//
+// e_atan2.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_atan2.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ *
+ */
+
+/* __ieee754_atan2(y,x)
+ * Method :
+ * 1. Reduce y to positive by atan2(y,x)=-atan2(-y,x).
+ * 2. Reduce x to positive by (if x and y are unexceptional):
+ * ARG (x+iy) = arctan(y/x) ... if x > 0,
+ * ARG (x+iy) = pi - arctan[y/(-x)] ... if x < 0,
+ *
+ * Special cases:
+ *
+ * ATAN2((anything), NaN ) is NaN;
+ * ATAN2(NAN , (anything) ) is NaN;
+ * ATAN2(+-0, +(anything but NaN)) is +-0 ;
+ * ATAN2(+-0, -(anything but NaN)) is +-pi ;
+ * ATAN2(+-(anything but 0 and NaN), 0) is +-pi/2;
+ * ATAN2(+-(anything but INF and NaN), +INF) is +-0 ;
+ * ATAN2(+-(anything but INF and NaN), -INF) is +-pi;
+ * ATAN2(+-INF,+INF ) is +-pi/4 ;
+ * ATAN2(+-INF,-INF ) is +-3pi/4;
+ * ATAN2(+-INF, (anything but,0,NaN, and INF)) is +-pi/2;
+ *
+ * Constants:
+ * The hexadecimal values are the intended ones for the following
+ * constants. The decimal values may be used, provided that the
+ * compiler will convert from decimal to binary accurately enough
+ * to produce the hexadecimal values shown.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double
+tiny = 1.0e-300,
+zero = 0.0,
+pi_o_4 = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */
+pi_o_2 = 1.5707963267948965580E+00, /* 0x3FF921FB, 0x54442D18 */
+pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */
+pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
+
+ double __ieee754_atan2(double y, double x)
+{
+ double z;
+ int k,m,hx,hy,ix,iy;
+ unsigned lx,ly;
+
+ hx = CYG_LIBM_HI(x); ix = hx&0x7fffffff;
+ lx = CYG_LIBM_LO(x);
+ hy = CYG_LIBM_HI(y); iy = hy&0x7fffffff;
+ ly = CYG_LIBM_LO(y);
+ if(((ix|((lx|-lx)>>31))>0x7ff00000)||
+ ((iy|((ly|-ly)>>31))>0x7ff00000)) /* x or y is NaN */
+ return x+y;
+ if(((hx-0x3ff00000)|lx)==0) return atan(y); /* x=1.0 */
+ m = ((hy>>31)&1)|((hx>>30)&2); /* 2*sign(x)+sign(y) */
+
+ /* when y = 0 */
+ if((iy|ly)==0) {
+ switch(m) {
+ case 0:
+ case 1: return y; /* atan(+-0,+anything)=+-0 */
+ case 2: return pi+tiny;/* atan(+0,-anything) = pi */
+ case 3: return -pi-tiny;/* atan(-0,-anything) =-pi */
+ }
+ }
+ /* when x = 0 */
+ if((ix|lx)==0) return (hy<0)? -pi_o_2-tiny: pi_o_2+tiny;
+
+ /* when x is INF */
+ if(ix==0x7ff00000) {
+ if(iy==0x7ff00000) {
+ switch(m) {
+ case 0: return pi_o_4+tiny;/* atan(+INF,+INF) */
+ case 1: return -pi_o_4-tiny;/* atan(-INF,+INF) */
+ case 2: return 3.0*pi_o_4+tiny;/*atan(+INF,-INF)*/
+ case 3: return -3.0*pi_o_4-tiny;/*atan(-INF,-INF)*/
+ }
+ } else {
+ switch(m) {
+ case 0: return zero ; /* atan(+...,+INF) */
+ case 1: return -zero ; /* atan(-...,+INF) */
+ case 2: return pi+tiny ; /* atan(+...,-INF) */
+ case 3: return -pi-tiny ; /* atan(-...,-INF) */
+ }
+ }
+ }
+ /* when y is INF */
+ if(iy==0x7ff00000) return (hy<0)? -pi_o_2-tiny: pi_o_2+tiny;
+
+ /* compute y/x */
+ k = (iy-ix)>>20;
+ if(k > 60) z=pi_o_2+0.5*pi_lo; /* |y/x| > 2**60 */
+ else if(hx<0&&k<-60) z=0.0; /* |y|/x < -2**60 */
+ else z=atan(fabs(y/x)); /* safe to do y/x */
+ switch (m) {
+ case 0: return z ; /* atan(+,+) */
+ case 1: CYG_LIBM_HI(z) ^= 0x80000000;
+ return z ; /* atan(-,+) */
+ case 2: return pi-(z-pi_lo);/* atan(+,-) */
+ default: /* case 3 */
+ return (z-pi_lo)-pi;/* atan(-,-) */
+ }
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_atan2.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_atanh.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_atanh.c
new file mode 100644
index 0000000000..b23c848e2e
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_atanh.c
@@ -0,0 +1,125 @@
+//===========================================================================
+//
+// e_atanh.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_atanh.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ *
+ */
+
+/* __ieee754_atanh(x)
+ * Method :
+ * 1.Reduced x to positive by atanh(-x) = -atanh(x)
+ * 2.For x>=0.5
+ * 1 2x x
+ * atanh(x) = --- * log(1 + -------) = 0.5 * log1p(2 * --------)
+ * 2 1 - x 1 - x
+ *
+ * For x<0.5
+ * atanh(x) = 0.5*log1p(2x+2x*x/(1-x))
+ *
+ * Special cases:
+ * atanh(x) is NaN if |x| > 1 with signal;
+ * atanh(NaN) is that NaN with no signal;
+ * atanh(+-1) is +-INF with signal.
+ *
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double one = 1.0, huge = 1e300;
+
+static double zero = 0.0;
+
+ double __ieee754_atanh(double x)
+{
+ double t;
+ int hx,ix;
+ unsigned lx;
+ hx = CYG_LIBM_HI(x); /* high word */
+ lx = CYG_LIBM_LO(x); /* low word */
+ ix = hx&0x7fffffff;
+ if ((ix|((lx|(-lx))>>31))>0x3ff00000) /* |x|>1 */
+ return (x-x)/(x-x);
+ if(ix==0x3ff00000)
+ return x/zero;
+ if(ix<0x3e300000&&(huge+x)>zero) return x; /* x<2**-28 */
+ CYG_LIBM_HI(x) = ix; /* x <- |x| */
+ if(ix<0x3fe00000) { /* x < 0.5 */
+ t = x+x;
+ t = 0.5*log1p(t+t*x/(one-x));
+ } else
+ t = 0.5*log1p((x+x)/(one-x));
+ if(hx>=0) return t; else return -t;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_atanh.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_cosh.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_cosh.c
new file mode 100644
index 0000000000..f0d8630ed1
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_cosh.c
@@ -0,0 +1,146 @@
+//===========================================================================
+//
+// e_cosh.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_cosh.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_cosh(x)
+ * Method :
+ * mathematically cosh(x) if defined to be (exp(x)+exp(-x))/2
+ * 1. Replace x by |x| (cosh(x) = cosh(-x)).
+ * 2.
+ * [ exp(x) - 1 ]^2
+ * 0 <= x <= ln2/2 : cosh(x) := 1 + -------------------
+ * 2*exp(x)
+ *
+ * exp(x) + 1/exp(x)
+ * ln2/2 <= x <= 22 : cosh(x) := -------------------
+ * 2
+ * 22 <= x <= lnovft : cosh(x) := exp(x)/2
+ * lnovft <= x <= ln2ovft: cosh(x) := exp(x/2)/2 * exp(x/2)
+ * ln2ovft < x : cosh(x) := huge*huge (overflow)
+ *
+ * Special cases:
+ * cosh(x) is |x| if x is +INF, -INF, or NaN.
+ * only cosh(0)=1 is exact for finite x.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double one = 1.0, half=0.5, huge = 1.0e300;
+
+ double __ieee754_cosh(double x)
+{
+ double t,w;
+ int ix;
+ unsigned lx;
+
+ /* High word of |x|. */
+ ix = CYG_LIBM_HI(x);
+ ix &= 0x7fffffff;
+
+ /* x is INF or NaN */
+ if(ix>=0x7ff00000) return x*x;
+
+ /* |x| in [0,0.5*ln2], return 1+expm1(|x|)^2/(2*exp(|x|)) */
+ if(ix<0x3fd62e43) {
+ t = expm1(fabs(x));
+ w = one+t;
+ if (ix<0x3c800000) return w; /* cosh(tiny) = 1 */
+ return one+(t*t)/(w+w);
+ }
+
+ /* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|)/2; */
+ if (ix < 0x40360000) {
+ t = __ieee754_exp(fabs(x));
+ return half*t+half/t;
+ }
+
+ /* |x| in [22, log(maxdouble)] return half*exp(|x|) */
+ if (ix < 0x40862E42) return half*__ieee754_exp(fabs(x));
+
+ /* |x| in [log(maxdouble), overflowthresold] */
+ lx = CYG_LIBM_LO(x);
+ if (ix<0x408633CE ||
+ ((ix==0x408633ce)&&(lx<=(unsigned)0x8fb9f87d))) {
+ w = __ieee754_exp(half*fabs(x));
+ t = half*w;
+ return t*w;
+ }
+
+ /* |x| > overflowthresold, cosh(x) overflow */
+ return huge*huge;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_cosh.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_exp.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_exp.c
new file mode 100644
index 0000000000..5d6f67d1df
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_exp.c
@@ -0,0 +1,218 @@
+//===========================================================================
+//
+// e_exp.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_exp.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_exp(x)
+ * Returns the exponential of x.
+ *
+ * Method
+ * 1. Argument reduction:
+ * Reduce x to an r so that |r| <= 0.5*ln2 ~ 0.34658.
+ * Given x, find r and integer k such that
+ *
+ * x = k*ln2 + r, |r| <= 0.5*ln2.
+ *
+ * Here r will be represented as r = hi-lo for better
+ * accuracy.
+ *
+ * 2. Approximation of exp(r) by a special rational function on
+ * the interval [0,0.34658]:
+ * Write
+ * R(r**2) = r*(exp(r)+1)/(exp(r)-1) = 2 + r*r/6 - r**4/360 + ...
+ * We use a special Reme algorithm on [0,0.34658] to generate
+ * a polynomial of degree 5 to approximate R. The maximum error
+ * of this polynomial approximation is bounded by 2**-59. In
+ * other words,
+ * R(z) ~ 2.0 + P1*z + P2*z**2 + P3*z**3 + P4*z**4 + P5*z**5
+ * (where z=r*r, and the values of P1 to P5 are listed below)
+ * and
+ * | 5 | -59
+ * | 2.0+P1*z+...+P5*z - R(z) | <= 2
+ * | |
+ * The computation of exp(r) thus becomes
+ * 2*r
+ * exp(r) = 1 + -------
+ * R - r
+ * r*R1(r)
+ * = 1 + r + ----------- (for better accuracy)
+ * 2 - R1(r)
+ * where
+ * 2 4 10
+ * R1(r) = r - (P1*r + P2*r + ... + P5*r ).
+ *
+ * 3. Scale back to obtain exp(x):
+ * From step 1, we have
+ * exp(x) = 2^k * exp(r)
+ *
+ * Special cases:
+ * exp(INF) is INF, exp(NaN) is NaN;
+ * exp(-INF) is 0, and
+ * for finite argument, only exp(0)=1 is exact.
+ *
+ * Accuracy:
+ * according to an error analysis, the error is always less than
+ * 1 ulp (unit in the last place).
+ *
+ * Misc. info.
+ * For IEEE double
+ * if x > 7.09782712893383973096e+02 then exp(x) overflow
+ * if x < -7.45133219101941108420e+02 then exp(x) underflow
+ *
+ * Constants:
+ * The hexadecimal values are the intended ones for the following
+ * constants. The decimal values may be used, provided that the
+ * compiler will convert from decimal to binary accurately enough
+ * to produce the hexadecimal values shown.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double
+one = 1.0,
+halF[2] = {0.5,-0.5,},
+huge = 1.0e+300,
+twom1000= 9.33263618503218878990e-302, /* 2**-1000=0x01700000,0*/
+o_threshold= 7.09782712893383973096e+02, /* 0x40862E42, 0xFEFA39EF */
+u_threshold= -7.45133219101941108420e+02, /* 0xc0874910, 0xD52D3051 */
+ln2HI[2] ={ 6.93147180369123816490e-01, /* 0x3fe62e42, 0xfee00000 */
+ -6.93147180369123816490e-01,},/* 0xbfe62e42, 0xfee00000 */
+ln2LO[2] ={ 1.90821492927058770002e-10, /* 0x3dea39ef, 0x35793c76 */
+ -1.90821492927058770002e-10,},/* 0xbdea39ef, 0x35793c76 */
+invln2 = 1.44269504088896338700e+00, /* 0x3ff71547, 0x652b82fe */
+P1 = 1.66666666666666019037e-01, /* 0x3FC55555, 0x5555553E */
+P2 = -2.77777777770155933842e-03, /* 0xBF66C16C, 0x16BEBD93 */
+P3 = 6.61375632143793436117e-05, /* 0x3F11566A, 0xAF25DE2C */
+P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */
+P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */
+
+
+ double __ieee754_exp(double x) /* default IEEE double exp */
+{
+ double y,hi,lo,c,t;
+ int k,xsb;
+ unsigned hx;
+
+ hi=lo=0.0; /* to placate compiler */
+ hx = CYG_LIBM_HI(x); /* high word of x */
+ xsb = (hx>>31)&1; /* sign bit of x */
+ hx &= 0x7fffffff; /* high word of |x| */
+
+ /* filter out non-finite argument */
+ if(hx >= 0x40862E42) { /* if |x|>=709.78... */
+ if(hx>=0x7ff00000) {
+ if(((hx&0xfffff)|CYG_LIBM_LO(x))!=0)
+ return x+x; /* NaN */
+ else return (xsb==0)? x:0.0; /* exp(+-inf)={inf,0} */
+ }
+ if(x > o_threshold) return huge*huge; /* overflow */
+ if(x < u_threshold) return twom1000*twom1000; /* underflow */
+ }
+
+ /* argument reduction */
+ if(hx > 0x3fd62e42) { /* if |x| > 0.5 ln2 */
+ if(hx < 0x3FF0A2B2) { /* and |x| < 1.5 ln2 */
+ hi = x-ln2HI[xsb]; lo=ln2LO[xsb]; k = 1-xsb-xsb;
+ } else {
+ k = invln2*x+halF[xsb];
+ t = k;
+ hi = x - t*ln2HI[0]; /* t*ln2HI is exact here */
+ lo = t*ln2LO[0];
+ }
+ x = hi - lo;
+ }
+ else if(hx < 0x3e300000) { /* when |x|<2**-28 */
+ if(huge+x>one)
+ return one+x;/* trigger inexact */
+ else
+ k = 0;
+ }
+ else k = 0;
+
+ /* x is now in primary range */
+ t = x*x;
+ c = x - t*(P1+t*(P2+t*(P3+t*(P4+t*P5))));
+ if(k==0) return one-((x*c)/(c-2.0)-x);
+ else y = one-((lo-(x*c)/(2.0-c))-hi);
+ if(k >= -1021) {
+ CYG_LIBM_HI(y) += (k<<20); /* add k to y's exponent */
+ return y;
+ } else {
+ CYG_LIBM_HI(y) += ((k+1000)<<20);/* add k to y's exponent */
+ return y*twom1000;
+ }
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_exp.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_fmod.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_fmod.c
new file mode 100644
index 0000000000..6716776bf1
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_fmod.c
@@ -0,0 +1,197 @@
+//===========================================================================
+//
+// e_fmod.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_fmod.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * __ieee754_fmod(x,y)
+ * Return x mod y in exact arithmetic
+ * Method: shift and subtract
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double one = 1.0, Zero[] = {0.0, -0.0,};
+
+ double __ieee754_fmod(double x, double y)
+{
+ int n,hx,hy,hz,ix,iy,sx,i;
+ unsigned lx,ly,lz;
+
+ hx = CYG_LIBM_HI(x); /* high word of x */
+ lx = CYG_LIBM_LO(x); /* low word of x */
+ hy = CYG_LIBM_HI(y); /* high word of y */
+ ly = CYG_LIBM_LO(y); /* low word of y */
+ sx = hx&0x80000000; /* sign of x */
+ hx ^=sx; /* |x| */
+ hy &= 0x7fffffff; /* |y| */
+
+ /* purge off exception values */
+ if((hy|ly)==0||(hx>=0x7ff00000)|| /* y=0,or x not finite */
+ ((hy|((ly|-ly)>>31))>0x7ff00000)) /* or y is NaN */
+ return (x*y)/(x*y);
+ if(hx<=hy) {
+ if((hx<hy)||(lx<ly)) return x; /* |x|<|y| return x */
+ if(lx==ly)
+ return Zero[(unsigned)sx>>31]; /* |x|=|y| return x*0*/
+ }
+
+ /* determine ix = ilogb(x) */
+ if(hx<0x00100000) { /* subnormal x */
+ if(hx==0) {
+ for (ix = -1043, i=lx; i>0; i<<=1) ix -=1;
+ } else {
+ for (ix = -1022,i=(hx<<11); i>0; i<<=1) ix -=1;
+ }
+ } else ix = (hx>>20)-1023;
+
+ /* determine iy = ilogb(y) */
+ if(hy<0x00100000) { /* subnormal y */
+ if(hy==0) {
+ for (iy = -1043, i=ly; i>0; i<<=1) iy -=1;
+ } else {
+ for (iy = -1022,i=(hy<<11); i>0; i<<=1) iy -=1;
+ }
+ } else iy = (hy>>20)-1023;
+
+ /* set up {hx,lx}, {hy,ly} and align y to x */
+ if(ix >= -1022)
+ hx = 0x00100000|(0x000fffff&hx);
+ else { /* subnormal x, shift x to normal */
+ n = -1022-ix;
+ if(n<=31) {
+ hx = (hx<<n)|(lx>>(32-n));
+ lx <<= n;
+ } else {
+ hx = lx<<(n-32);
+ lx = 0;
+ }
+ }
+ if(iy >= -1022)
+ hy = 0x00100000|(0x000fffff&hy);
+ else { /* subnormal y, shift y to normal */
+ n = -1022-iy;
+ if(n<=31) {
+ hy = (hy<<n)|(ly>>(32-n));
+ ly <<= n;
+ } else {
+ hy = ly<<(n-32);
+ ly = 0;
+ }
+ }
+
+ /* fix point fmod */
+ n = ix - iy;
+ while(n--) {
+ hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
+ if(hz<0){hx = hx+hx+(lx>>31); lx = lx+lx;}
+ else {
+ if((hz|lz)==0) /* return sign(x)*0 */
+ return Zero[(unsigned)sx>>31];
+ hx = hz+hz+(lz>>31); lx = lz+lz;
+ }
+ }
+ hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
+ if(hz>=0) {hx=hz;lx=lz;}
+
+ /* convert back to floating value and restore the sign */
+ if((hx|lx)==0) /* return sign(x)*0 */
+ return Zero[(unsigned)sx>>31];
+ while(hx<0x00100000) { /* normalize x */
+ hx = hx+hx+(lx>>31); lx = lx+lx;
+ iy -= 1;
+ }
+ if(iy>= -1022) { /* normalize output */
+ hx = ((hx-0x00100000)|((iy+1023)<<20));
+ CYG_LIBM_HI(x) = hx|sx;
+ CYG_LIBM_LO(x) = lx;
+ } else { /* subnormal output */
+ n = -1022 - iy;
+ if(n<=20) {
+ lx = (lx>>n)|((unsigned)hx<<(32-n));
+ hx >>= n;
+ } else if (n<=31) {
+ lx = (hx<<(32-n))|(lx>>n); hx = sx;
+ } else {
+ lx = hx>>(n-32); hx = sx;
+ }
+ CYG_LIBM_HI(x) = hx|sx;
+ CYG_LIBM_LO(x) = lx;
+ x *= one; /* create necessary signal */
+ }
+ return x; /* exact output */
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_fmod.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_gamma.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_gamma.c
new file mode 100644
index 0000000000..9c88b20eda
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_gamma.c
@@ -0,0 +1,94 @@
+//===========================================================================
+//
+// e_gamma.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_gamma.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ *
+ */
+
+/* __ieee754_gamma(x)
+ * Return the logarithm of the Gamma function of x.
+ *
+ * Method: call __ieee754_gamma_r
+ */
+
+#include <math.h>
+#include "mathincl/fdlibm.h"
+
+double
+__ieee754_gamma(double x)
+{
+ return __ieee754_gamma_r(x,&signgam);
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_gamma.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_gamma_r.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_gamma_r.c
new file mode 100644
index 0000000000..984d21548d
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_gamma_r.c
@@ -0,0 +1,93 @@
+//===========================================================================
+//
+// e_gamma_r.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_gamma_r.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ *
+ */
+
+/* __ieee754_gamma_r(x, signgamp)
+ * Reentrant version of the logarithm of the Gamma function
+ * with user provide pointer for the sign of Gamma(x).
+ *
+ * Method: See __ieee754_lgamma_r
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double __ieee754_gamma_r(double x, int *signgamp)
+{
+ return __ieee754_lgamma_r(x,signgamp);
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_gamma_r.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_hypot.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_hypot.c
new file mode 100644
index 0000000000..311767bf72
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_hypot.c
@@ -0,0 +1,176 @@
+//===========================================================================
+//
+// e_hypot.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_hypot.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_hypot(x,y)
+ *
+ * Method :
+ * If (assume round-to-nearest) z=x*x+y*y
+ * has error less than sqrt(2)/2 ulp, than
+ * sqrt(z) has error less than 1 ulp (exercise).
+ *
+ * So, compute sqrt(x*x+y*y) with some care as
+ * follows to get the error below 1 ulp:
+ *
+ * Assume x>y>0;
+ * (if possible, set rounding to round-to-nearest)
+ * 1. if x > 2y use
+ * x1*x1+(y*y+(x2*(x+x1))) for x*x+y*y
+ * where x1 = x with lower 32 bits cleared, x2 = x-x1; else
+ * 2. if x <= 2y use
+ * t1*y1+((x-y)*(x-y)+(t1*y2+t2*y))
+ * where t1 = 2x with lower 32 bits cleared, t2 = 2x-t1,
+ * y1= y with lower 32 bits chopped, y2 = y-y1.
+ *
+ * NOTE: scaling may be necessary if some argument is too
+ * large or too tiny
+ *
+ * Special cases:
+ * hypot(x,y) is INF if x or y is +INF or -INF; else
+ * hypot(x,y) is NAN if x or y is NAN.
+ *
+ * Accuracy:
+ * hypot(x,y) returns sqrt(x^2+y^2) with error less
+ * than 1 ulps (units in the last place)
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double __ieee754_hypot(double x, double y)
+{
+ double a=x,b=y,t1,t2,y1,y2,w;
+ int j,k,ha,hb;
+
+ ha = CYG_LIBM_HI(x)&0x7fffffff; /* high word of x */
+ hb = CYG_LIBM_HI(y)&0x7fffffff; /* high word of y */
+ if(hb > ha) {a=y;b=x;j=ha; ha=hb;hb=j;} else {a=x;b=y;}
+ CYG_LIBM_HI(a) = ha; /* a <- |a| */
+ CYG_LIBM_HI(b) = hb; /* b <- |b| */
+ if((ha-hb)>0x3c00000) {return a+b;} /* x/y > 2**60 */
+ k=0;
+ if(ha > 0x5f300000) { /* a>2**500 */
+ if(ha >= 0x7ff00000) { /* Inf or NaN */
+ w = a+b; /* for sNaN */
+ if(((ha&0xfffff)|CYG_LIBM_LO(a))==0) w = a;
+ if(((hb^0x7ff00000)|CYG_LIBM_LO(b))==0) w = b;
+ return w;
+ }
+ /* scale a and b by 2**-600 */
+ ha -= 0x25800000; hb -= 0x25800000; k += 600;
+ CYG_LIBM_HI(a) = ha;
+ CYG_LIBM_HI(b) = hb;
+ }
+ if(hb < 0x20b00000) { /* b < 2**-500 */
+ if(hb <= 0x000fffff) { /* subnormal b or 0 */
+ if((hb|(CYG_LIBM_LO(b)))==0) return a;
+ t1=0;
+ CYG_LIBM_HI(t1) = 0x7fd00000; /* t1=2^1022 */
+ b *= t1;
+ a *= t1;
+ k -= 1022;
+ } else { /* scale a and b by 2^600 */
+ ha += 0x25800000; /* a *= 2^600 */
+ hb += 0x25800000; /* b *= 2^600 */
+ k -= 600;
+ CYG_LIBM_HI(a) = ha;
+ CYG_LIBM_HI(b) = hb;
+ }
+ }
+ /* medium size a and b */
+ w = a-b;
+ if (w>b) {
+ t1 = 0;
+ CYG_LIBM_HI(t1) = ha;
+ t2 = a-t1;
+ w = sqrt(t1*t1-(b*(-b)-t2*(a+t1)));
+ } else {
+ a = a+a;
+ y1 = 0;
+ CYG_LIBM_HI(y1) = hb;
+ y2 = b - y1;
+ t1 = 0;
+ CYG_LIBM_HI(t1) = ha+0x00100000;
+ t2 = a - t1;
+ w = sqrt(t1*y1-(w*(-w)-(t1*y2+t2*b)));
+ }
+ if(k!=0) {
+ t1 = 1.0;
+ CYG_LIBM_HI(t1) += (k<<20);
+ return t1*w;
+ } else return w;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_hypot.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_j0.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_j0.c
new file mode 100644
index 0000000000..7766326fd5
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_j0.c
@@ -0,0 +1,440 @@
+//===========================================================================
+//
+// e_j0.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_j0.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_j0(x), __ieee754_y0(x)
+ * Bessel function of the first and second kinds of order zero.
+ * Method -- j0(x):
+ * 1. For tiny x, we use j0(x) = 1 - x^2/4 + x^4/64 - ...
+ * 2. Reduce x to |x| since j0(x)=j0(-x), and
+ * for x in (0,2)
+ * j0(x) = 1-z/4+ z^2*R0/S0, where z = x*x;
+ * (precision: |j0-1+z/4-z^2R0/S0 |<2**-63.67 )
+ * for x in (2,inf)
+ * j0(x) = sqrt(2/(pi*x))*(p0(x)*cos(x0)-q0(x)*sin(x0))
+ * where x0 = x-pi/4. It is better to compute sin(x0),cos(x0)
+ * as follow:
+ * cos(x0) = cos(x)cos(pi/4)+sin(x)sin(pi/4)
+ * = 1/sqrt(2) * (cos(x) + sin(x))
+ * sin(x0) = sin(x)cos(pi/4)-cos(x)sin(pi/4)
+ * = 1/sqrt(2) * (sin(x) - cos(x))
+ * (To avoid cancellation, use
+ * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
+ * to compute the worse one.)
+ *
+ * 3 Special cases
+ * j0(nan)= nan
+ * j0(0) = 1
+ * j0(inf) = 0
+ *
+ * Method -- y0(x):
+ * 1. For x<2.
+ * Since
+ * y0(x) = 2/pi*(j0(x)*(ln(x/2)+Euler) + x^2/4 - ...)
+ * therefore y0(x)-2/pi*j0(x)*ln(x) is an even function.
+ * We use the following function to approximate y0,
+ * y0(x) = U(z)/V(z) + (2/pi)*(j0(x)*ln(x)), z= x^2
+ * where
+ * U(z) = u00 + u01*z + ... + u06*z^6
+ * V(z) = 1 + v01*z + ... + v04*z^4
+ * with absolute approximation error bounded by 2**-72.
+ * Note: For tiny x, U/V = u0 and j0(x)~1, hence
+ * y0(tiny) = u0 + (2/pi)*ln(tiny), (choose tiny<2**-27)
+ * 2. For x>=2.
+ * y0(x) = sqrt(2/(pi*x))*(p0(x)*cos(x0)+q0(x)*sin(x0))
+ * where x0 = x-pi/4. It is better to compute sin(x0),cos(x0)
+ * by the method mentioned above.
+ * 3. Special cases: y0(0)=-inf, y0(x<0)=NaN, y0(inf)=0.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static double pzero(double), qzero(double);
+
+static const double
+huge = 1e300,
+one = 1.0,
+invsqrtpi= 5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */
+tpi = 6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */
+ /* R0/S0 on [0, 2.00] */
+R02 = 1.56249999999999947958e-02, /* 0x3F8FFFFF, 0xFFFFFFFD */
+R03 = -1.89979294238854721751e-04, /* 0xBF28E6A5, 0xB61AC6E9 */
+R04 = 1.82954049532700665670e-06, /* 0x3EBEB1D1, 0x0C503919 */
+R05 = -4.61832688532103189199e-09, /* 0xBE33D5E7, 0x73D63FCE */
+S01 = 1.56191029464890010492e-02, /* 0x3F8FFCE8, 0x82C8C2A4 */
+S02 = 1.16926784663337450260e-04, /* 0x3F1EA6D2, 0xDD57DBF4 */
+S03 = 5.13546550207318111446e-07, /* 0x3EA13B54, 0xCE84D5A9 */
+S04 = 1.16614003333790000205e-09; /* 0x3E1408BC, 0xF4745D8F */
+
+static double zero = 0.0;
+
+ double __ieee754_j0(double x)
+{
+ double z, s,c,ss,cc,r,u,v;
+ int hx,ix;
+
+ hx = CYG_LIBM_HI(x);
+ ix = hx&0x7fffffff;
+ if(ix>=0x7ff00000) return one/(x*x);
+ x = fabs(x);
+ if(ix >= 0x40000000) { /* |x| >= 2.0 */
+ s = sin(x);
+ c = cos(x);
+ ss = s-c;
+ cc = s+c;
+ if(ix<0x7fe00000) { /* make sure x+x not overflow */
+ z = -cos(x+x);
+ if ((s*c)<zero) cc = z/ss;
+ else ss = z/cc;
+ }
+ /*
+ * j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
+ * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)
+ */
+ if(ix>0x48000000) z = (invsqrtpi*cc)/sqrt(x);
+ else {
+ u = pzero(x); v = qzero(x);
+ z = invsqrtpi*(u*cc-v*ss)/sqrt(x);
+ }
+ return z;
+ }
+ if(ix<0x3f200000) { /* |x| < 2**-13 */
+ if(huge+x>one) { /* raise inexact if x != 0 */
+ if(ix<0x3e400000) return one; /* |x|<2**-27 */
+ else return one - 0.25*x*x;
+ }
+ }
+ z = x*x;
+ r = z*(R02+z*(R03+z*(R04+z*R05)));
+ s = one+z*(S01+z*(S02+z*(S03+z*S04)));
+ if(ix < 0x3FF00000) { /* |x| < 1.00 */
+ return one + z*(-0.25+(r/s));
+ } else {
+ u = 0.5*x;
+ return((one+u)*(one-u)+z*(r/s));
+ }
+}
+
+static const double
+u00 = -7.38042951086872317523e-02, /* 0xBFB2E4D6, 0x99CBD01F */
+u01 = 1.76666452509181115538e-01, /* 0x3FC69D01, 0x9DE9E3FC */
+u02 = -1.38185671945596898896e-02, /* 0xBF8C4CE8, 0xB16CFA97 */
+u03 = 3.47453432093683650238e-04, /* 0x3F36C54D, 0x20B29B6B */
+u04 = -3.81407053724364161125e-06, /* 0xBECFFEA7, 0x73D25CAD */
+u05 = 1.95590137035022920206e-08, /* 0x3E550057, 0x3B4EABD4 */
+u06 = -3.98205194132103398453e-11, /* 0xBDC5E43D, 0x693FB3C8 */
+v01 = 1.27304834834123699328e-02, /* 0x3F8A1270, 0x91C9C71A */
+v02 = 7.60068627350353253702e-05, /* 0x3F13ECBB, 0xF578C6C1 */
+v03 = 2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */
+v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */
+
+ double __ieee754_y0(double x)
+{
+ double z, s,c,ss,cc,u,v;
+ int hx,ix,lx;
+
+ hx = CYG_LIBM_HI(x);
+ ix = 0x7fffffff&hx;
+ lx = CYG_LIBM_LO(x);
+ /* Y0(NaN) is NaN, y0(-inf) is Nan, y0(inf) is 0 */
+ if(ix>=0x7ff00000) return one/(x+x*x);
+ if((ix|lx)==0) return -one/zero;
+ if(hx<0) return zero/zero;
+ if(ix >= 0x40000000) { /* |x| >= 2.0 */
+ /* y0(x) = sqrt(2/(pi*x))*(p0(x)*sin(x0)+q0(x)*cos(x0))
+ * where x0 = x-pi/4
+ * Better formula:
+ * cos(x0) = cos(x)cos(pi/4)+sin(x)sin(pi/4)
+ * = 1/sqrt(2) * (sin(x) + cos(x))
+ * sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
+ * = 1/sqrt(2) * (sin(x) - cos(x))
+ * To avoid cancellation, use
+ * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
+ * to compute the worse one.
+ */
+ s = sin(x);
+ c = cos(x);
+ ss = s-c;
+ cc = s+c;
+ /*
+ * j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
+ * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)
+ */
+ if(ix<0x7fe00000) { /* make sure x+x not overflow */
+ z = -cos(x+x);
+ if ((s*c)<zero) cc = z/ss;
+ else ss = z/cc;
+ }
+ if(ix>0x48000000) z = (invsqrtpi*ss)/sqrt(x);
+ else {
+ u = pzero(x); v = qzero(x);
+ z = invsqrtpi*(u*ss+v*cc)/sqrt(x);
+ }
+ return z;
+ }
+ if(ix<=0x3e400000) { /* x < 2**-27 */
+ return(u00 + tpi*__ieee754_log(x));
+ }
+ z = x*x;
+ u = u00+z*(u01+z*(u02+z*(u03+z*(u04+z*(u05+z*u06)))));
+ v = one+z*(v01+z*(v02+z*(v03+z*v04)));
+ return(u/v + tpi*(__ieee754_j0(x)*__ieee754_log(x)));
+}
+
+/* The asymptotic expansions of pzero is
+ * 1 - 9/128 s^2 + 11025/98304 s^4 - ..., where s = 1/x.
+ * For x >= 2, We approximate pzero by
+ * pzero(x) = 1 + (R/S)
+ * where R = pR0 + pR1*s^2 + pR2*s^4 + ... + pR5*s^10
+ * S = 1 + pS0*s^2 + ... + pS4*s^10
+ * and
+ * | pzero(x)-1-R/S | <= 2 ** ( -60.26)
+ */
+static const double pR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
+ 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
+ -7.03124999999900357484e-02, /* 0xBFB1FFFF, 0xFFFFFD32 */
+ -8.08167041275349795626e+00, /* 0xC02029D0, 0xB44FA779 */
+ -2.57063105679704847262e+02, /* 0xC0701102, 0x7B19E863 */
+ -2.48521641009428822144e+03, /* 0xC0A36A6E, 0xCD4DCAFC */
+ -5.25304380490729545272e+03, /* 0xC0B4850B, 0x36CC643D */
+};
+static const double pS8[5] = {
+ 1.16534364619668181717e+02, /* 0x405D2233, 0x07A96751 */
+ 3.83374475364121826715e+03, /* 0x40ADF37D, 0x50596938 */
+ 4.05978572648472545552e+04, /* 0x40E3D2BB, 0x6EB6B05F */
+ 1.16752972564375915681e+05, /* 0x40FC810F, 0x8F9FA9BD */
+ 4.76277284146730962675e+04, /* 0x40E74177, 0x4F2C49DC */
+};
+
+static const double pR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
+ -1.14125464691894502584e-11, /* 0xBDA918B1, 0x47E495CC */
+ -7.03124940873599280078e-02, /* 0xBFB1FFFF, 0xE69AFBC6 */
+ -4.15961064470587782438e+00, /* 0xC010A370, 0xF90C6BBF */
+ -6.76747652265167261021e+01, /* 0xC050EB2F, 0x5A7D1783 */
+ -3.31231299649172967747e+02, /* 0xC074B3B3, 0x6742CC63 */
+ -3.46433388365604912451e+02, /* 0xC075A6EF, 0x28A38BD7 */
+};
+static const double pS5[5] = {
+ 6.07539382692300335975e+01, /* 0x404E6081, 0x0C98C5DE */
+ 1.05125230595704579173e+03, /* 0x40906D02, 0x5C7E2864 */
+ 5.97897094333855784498e+03, /* 0x40B75AF8, 0x8FBE1D60 */
+ 9.62544514357774460223e+03, /* 0x40C2CCB8, 0xFA76FA38 */
+ 2.40605815922939109441e+03, /* 0x40A2CC1D, 0xC70BE864 */
+};
+
+static const double pR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
+ -2.54704601771951915620e-09, /* 0xBE25E103, 0x6FE1AA86 */
+ -7.03119616381481654654e-02, /* 0xBFB1FFF6, 0xF7C0E24B */
+ -2.40903221549529611423e+00, /* 0xC00345B2, 0xAEA48074 */
+ -2.19659774734883086467e+01, /* 0xC035F74A, 0x4CB94E14 */
+ -5.80791704701737572236e+01, /* 0xC04D0A22, 0x420A1A45 */
+ -3.14479470594888503854e+01, /* 0xC03F72AC, 0xA892D80F */
+};
+static const double pS3[5] = {
+ 3.58560338055209726349e+01, /* 0x4041ED92, 0x84077DD3 */
+ 3.61513983050303863820e+02, /* 0x40769839, 0x464A7C0E */
+ 1.19360783792111533330e+03, /* 0x4092A66E, 0x6D1061D6 */
+ 1.12799679856907414432e+03, /* 0x40919FFC, 0xB8C39B7E */
+ 1.73580930813335754692e+02, /* 0x4065B296, 0xFC379081 */
+};
+
+static const double pR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
+ -8.87534333032526411254e-08, /* 0xBE77D316, 0xE927026D */
+ -7.03030995483624743247e-02, /* 0xBFB1FF62, 0x495E1E42 */
+ -1.45073846780952986357e+00, /* 0xBFF73639, 0x8A24A843 */
+ -7.63569613823527770791e+00, /* 0xC01E8AF3, 0xEDAFA7F3 */
+ -1.11931668860356747786e+01, /* 0xC02662E6, 0xC5246303 */
+ -3.23364579351335335033e+00, /* 0xC009DE81, 0xAF8FE70F */
+};
+static const double pS2[5] = {
+ 2.22202997532088808441e+01, /* 0x40363865, 0x908B5959 */
+ 1.36206794218215208048e+02, /* 0x4061069E, 0x0EE8878F */
+ 2.70470278658083486789e+02, /* 0x4070E786, 0x42EA079B */
+ 1.53875394208320329881e+02, /* 0x40633C03, 0x3AB6FAFF */
+ 1.46576176948256193810e+01, /* 0x402D50B3, 0x44391809 */
+};
+
+ static double pzero(double x)
+{
+ const double *p,*q;
+ double z,r,s;
+ int ix;
+ ix = 0x7fffffff&CYG_LIBM_HI(x);
+ if(ix>=0x40200000) {p = pR8; q= pS8;}
+ else if(ix>=0x40122E8B){p = pR5; q= pS5;}
+ else if(ix>=0x4006DB6D){p = pR3; q= pS3;}
+ else {p = pR2; q= pS2;} /*if (ix>=0x40000000) */
+ z = one/(x*x);
+ r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
+ s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4]))));
+ return one+ r/s;
+}
+
+
+/* For x >= 8, the asymptotic expansions of qzero is
+ * -1/8 s + 75/1024 s^3 - ..., where s = 1/x.
+ * We approximate pzero by
+ * qzero(x) = s*(-1.25 + (R/S))
+ * where R = qR0 + qR1*s^2 + qR2*s^4 + ... + qR5*s^10
+ * S = 1 + qS0*s^2 + ... + qS5*s^12
+ * and
+ * | qzero(x)/s +1.25-R/S | <= 2 ** ( -61.22)
+ */
+static const double qR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
+ 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
+ 7.32421874999935051953e-02, /* 0x3FB2BFFF, 0xFFFFFE2C */
+ 1.17682064682252693899e+01, /* 0x40278952, 0x5BB334D6 */
+ 5.57673380256401856059e+02, /* 0x40816D63, 0x15301825 */
+ 8.85919720756468632317e+03, /* 0x40C14D99, 0x3E18F46D */
+ 3.70146267776887834771e+04, /* 0x40E212D4, 0x0E901566 */
+};
+static const double qS8[6] = {
+ 1.63776026895689824414e+02, /* 0x406478D5, 0x365B39BC */
+ 8.09834494656449805916e+03, /* 0x40BFA258, 0x4E6B0563 */
+ 1.42538291419120476348e+05, /* 0x41016652, 0x54D38C3F */
+ 8.03309257119514397345e+05, /* 0x412883DA, 0x83A52B43 */
+ 8.40501579819060512818e+05, /* 0x4129A66B, 0x28DE0B3D */
+ -3.43899293537866615225e+05, /* 0xC114FD6D, 0x2C9530C5 */
+};
+
+static const double qR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
+ 1.84085963594515531381e-11, /* 0x3DB43D8F, 0x29CC8CD9 */
+ 7.32421766612684765896e-02, /* 0x3FB2BFFF, 0xD172B04C */
+ 5.83563508962056953777e+00, /* 0x401757B0, 0xB9953DD3 */
+ 1.35111577286449829671e+02, /* 0x4060E392, 0x0A8788E9 */
+ 1.02724376596164097464e+03, /* 0x40900CF9, 0x9DC8C481 */
+ 1.98997785864605384631e+03, /* 0x409F17E9, 0x53C6E3A6 */
+};
+static const double qS5[6] = {
+ 8.27766102236537761883e+01, /* 0x4054B1B3, 0xFB5E1543 */
+ 2.07781416421392987104e+03, /* 0x40A03BA0, 0xDA21C0CE */
+ 1.88472887785718085070e+04, /* 0x40D267D2, 0x7B591E6D */
+ 5.67511122894947329769e+04, /* 0x40EBB5E3, 0x97E02372 */
+ 3.59767538425114471465e+04, /* 0x40E19118, 0x1F7A54A0 */
+ -5.35434275601944773371e+03, /* 0xC0B4EA57, 0xBEDBC609 */
+};
+
+static const double qR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
+ 4.37741014089738620906e-09, /* 0x3E32CD03, 0x6ADECB82 */
+ 7.32411180042911447163e-02, /* 0x3FB2BFEE, 0x0E8D0842 */
+ 3.34423137516170720929e+00, /* 0x400AC0FC, 0x61149CF5 */
+ 4.26218440745412650017e+01, /* 0x40454F98, 0x962DAEDD */
+ 1.70808091340565596283e+02, /* 0x406559DB, 0xE25EFD1F */
+ 1.66733948696651168575e+02, /* 0x4064D77C, 0x81FA21E0 */
+};
+static const double qS3[6] = {
+ 4.87588729724587182091e+01, /* 0x40486122, 0xBFE343A6 */
+ 7.09689221056606015736e+02, /* 0x40862D83, 0x86544EB3 */
+ 3.70414822620111362994e+03, /* 0x40ACF04B, 0xE44DFC63 */
+ 6.46042516752568917582e+03, /* 0x40B93C6C, 0xD7C76A28 */
+ 2.51633368920368957333e+03, /* 0x40A3A8AA, 0xD94FB1C0 */
+ -1.49247451836156386662e+02, /* 0xC062A7EB, 0x201CF40F */
+};
+
+static const double qR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
+ 1.50444444886983272379e-07, /* 0x3E84313B, 0x54F76BDB */
+ 7.32234265963079278272e-02, /* 0x3FB2BEC5, 0x3E883E34 */
+ 1.99819174093815998816e+00, /* 0x3FFFF897, 0xE727779C */
+ 1.44956029347885735348e+01, /* 0x402CFDBF, 0xAAF96FE5 */
+ 3.16662317504781540833e+01, /* 0x403FAA8E, 0x29FBDC4A */
+ 1.62527075710929267416e+01, /* 0x403040B1, 0x71814BB4 */
+};
+static const double qS2[6] = {
+ 3.03655848355219184498e+01, /* 0x403E5D96, 0xF7C07AED */
+ 2.69348118608049844624e+02, /* 0x4070D591, 0xE4D14B40 */
+ 8.44783757595320139444e+02, /* 0x408A6645, 0x22B3BF22 */
+ 8.82935845112488550512e+02, /* 0x408B977C, 0x9C5CC214 */
+ 2.12666388511798828631e+02, /* 0x406A9553, 0x0E001365 */
+ -5.31095493882666946917e+00, /* 0xC0153E6A, 0xF8B32931 */
+};
+
+ static double qzero(double x)
+{
+ const double *p,*q;
+ double s,r,z;
+ int ix;
+ ix = 0x7fffffff&CYG_LIBM_HI(x);
+ if(ix>=0x40200000) {p = qR8; q= qS8;}
+ else if(ix>=0x40122E8B){p = qR5; q= qS5;}
+ else if(ix>=0x4006DB6D){p = qR3; q= qS3;}
+ else {p = qR2; q= qS2;} /* if(ix>=0x40000000) */
+ z = one/(x*x);
+ r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
+ s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5])))));
+ return (-.125 + r/s)/x;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_j0.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_j1.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_j1.c
new file mode 100644
index 0000000000..9a015cec45
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_j1.c
@@ -0,0 +1,435 @@
+//===========================================================================
+//
+// e_j1.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_j1.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_j1(x), __ieee754_y1(x)
+ * Bessel function of the first and second kinds of order zero.
+ * Method -- j1(x):
+ * 1. For tiny x, we use j1(x) = x/2 - x^3/16 + x^5/384 - ...
+ * 2. Reduce x to |x| since j1(x)=-j1(-x), and
+ * for x in (0,2)
+ * j1(x) = x/2 + x*z*R0/S0, where z = x*x;
+ * (precision: |j1/x - 1/2 - R0/S0 |<2**-61.51 )
+ * for x in (2,inf)
+ * j1(x) = sqrt(2/(pi*x))*(p1(x)*cos(x1)-q1(x)*sin(x1))
+ * y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x1)+q1(x)*cos(x1))
+ * where x1 = x-3*pi/4. It is better to compute sin(x1),cos(x1)
+ * as follow:
+ * cos(x1) = cos(x)cos(3pi/4)+sin(x)sin(3pi/4)
+ * = 1/sqrt(2) * (sin(x) - cos(x))
+ * sin(x1) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
+ * = -1/sqrt(2) * (sin(x) + cos(x))
+ * (To avoid cancellation, use
+ * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
+ * to compute the worse one.)
+ *
+ * 3 Special cases
+ * j1(nan)= nan
+ * j1(0) = 0
+ * j1(inf) = 0
+ *
+ * Method -- y1(x):
+ * 1. screen out x<=0 cases: y1(0)=-inf, y1(x<0)=NaN
+ * 2. For x<2.
+ * Since
+ * y1(x) = 2/pi*(j1(x)*(ln(x/2)+Euler)-1/x-x/2+5/64*x^3-...)
+ * therefore y1(x)-2/pi*j1(x)*ln(x)-1/x is an odd function.
+ * We use the following function to approximate y1,
+ * y1(x) = x*U(z)/V(z) + (2/pi)*(j1(x)*ln(x)-1/x), z= x^2
+ * where for x in [0,2] (abs err less than 2**-65.89)
+ * U(z) = U0[0] + U0[1]*z + ... + U0[4]*z^4
+ * V(z) = 1 + v0[0]*z + ... + v0[4]*z^5
+ * Note: For tiny x, 1/x dominate y1 and hence
+ * y1(tiny) = -2/pi/tiny, (choose tiny<2**-54)
+ * 3. For x>=2.
+ * y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x1)+q1(x)*cos(x1))
+ * where x1 = x-3*pi/4. It is better to compute sin(x1),cos(x1)
+ * by method mentioned above.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static double pone(double), qone(double);
+
+static const double
+huge = 1e300,
+one = 1.0,
+invsqrtpi= 5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */
+tpi = 6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */
+ /* R0/S0 on [0,2] */
+r00 = -6.25000000000000000000e-02, /* 0xBFB00000, 0x00000000 */
+r01 = 1.40705666955189706048e-03, /* 0x3F570D9F, 0x98472C61 */
+r02 = -1.59955631084035597520e-05, /* 0xBEF0C5C6, 0xBA169668 */
+r03 = 4.96727999609584448412e-08, /* 0x3E6AAAFA, 0x46CA0BD9 */
+s01 = 1.91537599538363460805e-02, /* 0x3F939D0B, 0x12637E53 */
+s02 = 1.85946785588630915560e-04, /* 0x3F285F56, 0xB9CDF664 */
+s03 = 1.17718464042623683263e-06, /* 0x3EB3BFF8, 0x333F8498 */
+s04 = 5.04636257076217042715e-09, /* 0x3E35AC88, 0xC97DFF2C */
+s05 = 1.23542274426137913908e-11; /* 0x3DAB2ACF, 0xCFB97ED8 */
+
+static double zero = 0.0;
+
+ double __ieee754_j1(double x)
+{
+ double z, s,c,ss,cc,r,u,v,y;
+ int hx,ix;
+
+ hx = CYG_LIBM_HI(x);
+ ix = hx&0x7fffffff;
+ if(ix>=0x7ff00000) return one/x;
+ y = fabs(x);
+ if(ix >= 0x40000000) { /* |x| >= 2.0 */
+ s = sin(y);
+ c = cos(y);
+ ss = -s-c;
+ cc = s-c;
+ if(ix<0x7fe00000) { /* make sure y+y not overflow */
+ z = cos(y+y);
+ if ((s*c)>zero) cc = z/ss;
+ else ss = z/cc;
+ }
+ /*
+ * j1(x) = 1/sqrt(pi) * (P(1,x)*cc - Q(1,x)*ss) / sqrt(x)
+ * y1(x) = 1/sqrt(pi) * (P(1,x)*ss + Q(1,x)*cc) / sqrt(x)
+ */
+ if(ix>0x48000000) z = (invsqrtpi*cc)/sqrt(y);
+ else {
+ u = pone(y); v = qone(y);
+ z = invsqrtpi*(u*cc-v*ss)/sqrt(y);
+ }
+ if(hx<0) return -z;
+ else return z;
+ }
+ if(ix<0x3e400000) { /* |x|<2**-27 */
+ if(huge+x>one) return 0.5*x;/* inexact if x!=0 necessary */
+ }
+ z = x*x;
+ r = z*(r00+z*(r01+z*(r02+z*r03)));
+ s = one+z*(s01+z*(s02+z*(s03+z*(s04+z*s05))));
+ r *= x;
+ return(x*0.5+r/s);
+}
+
+static const double U0[5] = {
+ -1.96057090646238940668e-01, /* 0xBFC91866, 0x143CBC8A */
+ 5.04438716639811282616e-02, /* 0x3FA9D3C7, 0x76292CD1 */
+ -1.91256895875763547298e-03, /* 0xBF5F55E5, 0x4844F50F */
+ 2.35252600561610495928e-05, /* 0x3EF8AB03, 0x8FA6B88E */
+ -9.19099158039878874504e-08, /* 0xBE78AC00, 0x569105B8 */
+};
+static const double V0[5] = {
+ 1.99167318236649903973e-02, /* 0x3F94650D, 0x3F4DA9F0 */
+ 2.02552581025135171496e-04, /* 0x3F2A8C89, 0x6C257764 */
+ 1.35608801097516229404e-06, /* 0x3EB6C05A, 0x894E8CA6 */
+ 6.22741452364621501295e-09, /* 0x3E3ABF1D, 0x5BA69A86 */
+ 1.66559246207992079114e-11, /* 0x3DB25039, 0xDACA772A */
+};
+
+ double __ieee754_y1(double x)
+{
+ double z, s,c,ss,cc,u,v;
+ int hx,ix,lx;
+
+ hx = CYG_LIBM_HI(x);
+ ix = 0x7fffffff&hx;
+ lx = CYG_LIBM_LO(x);
+ /* if Y1(NaN) is NaN, Y1(-inf) is NaN, Y1(inf) is 0 */
+ if(ix>=0x7ff00000) return one/(x+x*x);
+ if((ix|lx)==0) return -one/zero;
+ if(hx<0) return zero/zero;
+ if(ix >= 0x40000000) { /* |x| >= 2.0 */
+ s = sin(x);
+ c = cos(x);
+ ss = -s-c;
+ cc = s-c;
+ if(ix<0x7fe00000) { /* make sure x+x not overflow */
+ z = cos(x+x);
+ if ((s*c)>zero) cc = z/ss;
+ else ss = z/cc;
+ }
+ /* y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x0)+q1(x)*cos(x0))
+ * where x0 = x-3pi/4
+ * Better formula:
+ * cos(x0) = cos(x)cos(3pi/4)+sin(x)sin(3pi/4)
+ * = 1/sqrt(2) * (sin(x) - cos(x))
+ * sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
+ * = -1/sqrt(2) * (cos(x) + sin(x))
+ * To avoid cancellation, use
+ * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
+ * to compute the worse one.
+ */
+ if(ix>0x48000000) z = (invsqrtpi*ss)/sqrt(x);
+ else {
+ u = pone(x); v = qone(x);
+ z = invsqrtpi*(u*ss+v*cc)/sqrt(x);
+ }
+ return z;
+ }
+ if(ix<=0x3c900000) { /* x < 2**-54 */
+ return(-tpi/x);
+ }
+ z = x*x;
+ u = U0[0]+z*(U0[1]+z*(U0[2]+z*(U0[3]+z*U0[4])));
+ v = one+z*(V0[0]+z*(V0[1]+z*(V0[2]+z*(V0[3]+z*V0[4]))));
+ return(x*(u/v) + tpi*(__ieee754_j1(x)*__ieee754_log(x)-one/x));
+}
+
+/* For x >= 8, the asymptotic expansions of pone is
+ * 1 + 15/128 s^2 - 4725/2^15 s^4 - ..., where s = 1/x.
+ * We approximate pone by
+ * pone(x) = 1 + (R/S)
+ * where R = pr0 + pr1*s^2 + pr2*s^4 + ... + pr5*s^10
+ * S = 1 + ps0*s^2 + ... + ps4*s^10
+ * and
+ * | pone(x)-1-R/S | <= 2 ** ( -60.06)
+ */
+
+static const double pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
+ 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
+ 1.17187499999988647970e-01, /* 0x3FBDFFFF, 0xFFFFFCCE */
+ 1.32394806593073575129e+01, /* 0x402A7A9D, 0x357F7FCE */
+ 4.12051854307378562225e+02, /* 0x4079C0D4, 0x652EA590 */
+ 3.87474538913960532227e+03, /* 0x40AE457D, 0xA3A532CC */
+ 7.91447954031891731574e+03, /* 0x40BEEA7A, 0xC32782DD */
+};
+static const double ps8[5] = {
+ 1.14207370375678408436e+02, /* 0x405C8D45, 0x8E656CAC */
+ 3.65093083420853463394e+03, /* 0x40AC85DC, 0x964D274F */
+ 3.69562060269033463555e+04, /* 0x40E20B86, 0x97C5BB7F */
+ 9.76027935934950801311e+04, /* 0x40F7D42C, 0xB28F17BB */
+ 3.08042720627888811578e+04, /* 0x40DE1511, 0x697A0B2D */
+};
+
+static const double pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
+ 1.31990519556243522749e-11, /* 0x3DAD0667, 0xDAE1CA7D */
+ 1.17187493190614097638e-01, /* 0x3FBDFFFF, 0xE2C10043 */
+ 6.80275127868432871736e+00, /* 0x401B3604, 0x6E6315E3 */
+ 1.08308182990189109773e+02, /* 0x405B13B9, 0x452602ED */
+ 5.17636139533199752805e+02, /* 0x40802D16, 0xD052D649 */
+ 5.28715201363337541807e+02, /* 0x408085B8, 0xBB7E0CB7 */
+};
+static const double ps5[5] = {
+ 5.92805987221131331921e+01, /* 0x404DA3EA, 0xA8AF633D */
+ 9.91401418733614377743e+02, /* 0x408EFB36, 0x1B066701 */
+ 5.35326695291487976647e+03, /* 0x40B4E944, 0x5706B6FB */
+ 7.84469031749551231769e+03, /* 0x40BEA4B0, 0xB8A5BB15 */
+ 1.50404688810361062679e+03, /* 0x40978030, 0x036F5E51 */
+};
+
+static const double pr3[6] = {
+ 3.02503916137373618024e-09, /* 0x3E29FC21, 0xA7AD9EDD */
+ 1.17186865567253592491e-01, /* 0x3FBDFFF5, 0x5B21D17B */
+ 3.93297750033315640650e+00, /* 0x400F76BC, 0xE85EAD8A */
+ 3.51194035591636932736e+01, /* 0x40418F48, 0x9DA6D129 */
+ 9.10550110750781271918e+01, /* 0x4056C385, 0x4D2C1837 */
+ 4.85590685197364919645e+01, /* 0x4048478F, 0x8EA83EE5 */
+};
+static const double ps3[5] = {
+ 3.47913095001251519989e+01, /* 0x40416549, 0xA134069C */
+ 3.36762458747825746741e+02, /* 0x40750C33, 0x07F1A75F */
+ 1.04687139975775130551e+03, /* 0x40905B7C, 0x5037D523 */
+ 8.90811346398256432622e+02, /* 0x408BD67D, 0xA32E31E9 */
+ 1.03787932439639277504e+02, /* 0x4059F26D, 0x7C2EED53 */
+};
+
+static const double pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
+ 1.07710830106873743082e-07, /* 0x3E7CE9D4, 0xF65544F4 */
+ 1.17176219462683348094e-01, /* 0x3FBDFF42, 0xBE760D83 */
+ 2.36851496667608785174e+00, /* 0x4002F2B7, 0xF98FAEC0 */
+ 1.22426109148261232917e+01, /* 0x40287C37, 0x7F71A964 */
+ 1.76939711271687727390e+01, /* 0x4031B1A8, 0x177F8EE2 */
+ 5.07352312588818499250e+00, /* 0x40144B49, 0xA574C1FE */
+};
+static const double ps2[5] = {
+ 2.14364859363821409488e+01, /* 0x40356FBD, 0x8AD5ECDC */
+ 1.25290227168402751090e+02, /* 0x405F5293, 0x14F92CD5 */
+ 2.32276469057162813669e+02, /* 0x406D08D8, 0xD5A2DBD9 */
+ 1.17679373287147100768e+02, /* 0x405D6B7A, 0xDA1884A9 */
+ 8.36463893371618283368e+00, /* 0x4020BAB1, 0xF44E5192 */
+};
+
+ static double pone(double x)
+{
+ const double *p,*q;
+ double z,r,s;
+ int ix;
+ ix = 0x7fffffff&CYG_LIBM_HI(x);
+ if(ix>=0x40200000) {p = pr8; q= ps8;}
+ else if(ix>=0x40122E8B){p = pr5; q= ps5;}
+ else if(ix>=0x4006DB6D){p = pr3; q= ps3;}
+ else {p = pr2; q= ps2;} /* if(ix>=0x40000000) */
+ z = one/(x*x);
+ r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
+ s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4]))));
+ return one+ r/s;
+}
+
+
+/* For x >= 8, the asymptotic expansions of qone is
+ * 3/8 s - 105/1024 s^3 - ..., where s = 1/x.
+ * We approximate pone by
+ * qone(x) = s*(0.375 + (R/S))
+ * where R = qr1*s^2 + qr2*s^4 + ... + qr5*s^10
+ * S = 1 + qs1*s^2 + ... + qs6*s^12
+ * and
+ * | qone(x)/s -0.375-R/S | <= 2 ** ( -61.13)
+ */
+
+static const double qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
+ 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
+ -1.02539062499992714161e-01, /* 0xBFBA3FFF, 0xFFFFFDF3 */
+ -1.62717534544589987888e+01, /* 0xC0304591, 0xA26779F7 */
+ -7.59601722513950107896e+02, /* 0xC087BCD0, 0x53E4B576 */
+ -1.18498066702429587167e+04, /* 0xC0C724E7, 0x40F87415 */
+ -4.84385124285750353010e+04, /* 0xC0E7A6D0, 0x65D09C6A */
+};
+static const double qs8[6] = {
+ 1.61395369700722909556e+02, /* 0x40642CA6, 0xDE5BCDE5 */
+ 7.82538599923348465381e+03, /* 0x40BE9162, 0xD0D88419 */
+ 1.33875336287249578163e+05, /* 0x4100579A, 0xB0B75E98 */
+ 7.19657723683240939863e+05, /* 0x4125F653, 0x72869C19 */
+ 6.66601232617776375264e+05, /* 0x412457D2, 0x7719AD5C */
+ -2.94490264303834643215e+05, /* 0xC111F969, 0x0EA5AA18 */
+};
+
+static const double qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
+ -2.08979931141764104297e-11, /* 0xBDB6FA43, 0x1AA1A098 */
+ -1.02539050241375426231e-01, /* 0xBFBA3FFF, 0xCB597FEF */
+ -8.05644828123936029840e+00, /* 0xC0201CE6, 0xCA03AD4B */
+ -1.83669607474888380239e+02, /* 0xC066F56D, 0x6CA7B9B0 */
+ -1.37319376065508163265e+03, /* 0xC09574C6, 0x6931734F */
+ -2.61244440453215656817e+03, /* 0xC0A468E3, 0x88FDA79D */
+};
+static const double qs5[6] = {
+ 8.12765501384335777857e+01, /* 0x405451B2, 0xFF5A11B2 */
+ 1.99179873460485964642e+03, /* 0x409F1F31, 0xE77BF839 */
+ 1.74684851924908907677e+04, /* 0x40D10F1F, 0x0D64CE29 */
+ 4.98514270910352279316e+04, /* 0x40E8576D, 0xAABAD197 */
+ 2.79480751638918118260e+04, /* 0x40DB4B04, 0xCF7C364B */
+ -4.71918354795128470869e+03, /* 0xC0B26F2E, 0xFCFFA004 */
+};
+
+static const double qr3[6] = {
+ -5.07831226461766561369e-09, /* 0xBE35CFA9, 0xD38FC84F */
+ -1.02537829820837089745e-01, /* 0xBFBA3FEB, 0x51AEED54 */
+ -4.61011581139473403113e+00, /* 0xC01270C2, 0x3302D9FF */
+ -5.78472216562783643212e+01, /* 0xC04CEC71, 0xC25D16DA */
+ -2.28244540737631695038e+02, /* 0xC06C87D3, 0x4718D55F */
+ -2.19210128478909325622e+02, /* 0xC06B66B9, 0x5F5C1BF6 */
+};
+static const double qs3[6] = {
+ 4.76651550323729509273e+01, /* 0x4047D523, 0xCCD367E4 */
+ 6.73865112676699709482e+02, /* 0x40850EEB, 0xC031EE3E */
+ 3.38015286679526343505e+03, /* 0x40AA684E, 0x448E7C9A */
+ 5.54772909720722782367e+03, /* 0x40B5ABBA, 0xA61D54A6 */
+ 1.90311919338810798763e+03, /* 0x409DBC7A, 0x0DD4DF4B */
+ -1.35201191444307340817e+02, /* 0xC060E670, 0x290A311F */
+};
+
+static const double qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
+ -1.78381727510958865572e-07, /* 0xBE87F126, 0x44C626D2 */
+ -1.02517042607985553460e-01, /* 0xBFBA3E8E, 0x9148B010 */
+ -2.75220568278187460720e+00, /* 0xC0060484, 0x69BB4EDA */
+ -1.96636162643703720221e+01, /* 0xC033A9E2, 0xC168907F */
+ -4.23253133372830490089e+01, /* 0xC04529A3, 0xDE104AAA */
+ -2.13719211703704061733e+01, /* 0xC0355F36, 0x39CF6E52 */
+};
+static const double qs2[6] = {
+ 2.95333629060523854548e+01, /* 0x403D888A, 0x78AE64FF */
+ 2.52981549982190529136e+02, /* 0x406F9F68, 0xDB821CBA */
+ 7.57502834868645436472e+02, /* 0x4087AC05, 0xCE49A0F7 */
+ 7.39393205320467245656e+02, /* 0x40871B25, 0x48D4C029 */
+ 1.55949003336666123687e+02, /* 0x40637E5E, 0x3C3ED8D4 */
+ -4.95949898822628210127e+00, /* 0xC013D686, 0xE71BE86B */
+};
+
+ static double qone(double x)
+{
+ const double *p,*q;
+ double s,r,z;
+ int ix;
+ ix = 0x7fffffff&CYG_LIBM_HI(x);
+ if(ix>=0x40200000) {p = qr8; q= qs8;}
+ else if(ix>=0x40122E8B){p = qr5; q= qs5;}
+ else if(ix>=0x4006DB6D){p = qr3; q= qs3;}
+ else {p = qr2; q= qs2;} /* if(ix>=0x40000000) */
+ z = one/(x*x);
+ r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
+ s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5])))));
+ return (.375 + r/s)/x;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_j1.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_jn.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_jn.c
new file mode 100644
index 0000000000..b63ec1028d
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_jn.c
@@ -0,0 +1,328 @@
+//===========================================================================
+//
+// e_jn.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_jn.c 1.4 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * __ieee754_jn(n, x), __ieee754_yn(n, x)
+ * floating point Bessel's function of the 1st and 2nd kind
+ * of order n
+ *
+ * Special cases:
+ * y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal;
+ * y0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal.
+ * Note 2. About jn(n,x), yn(n,x)
+ * For n=0, j0(x) is called,
+ * for n=1, j1(x) is called,
+ * for n<x, forward recursion us used starting
+ * from values of j0(x) and j1(x).
+ * for n>x, a continued fraction approximation to
+ * j(n,x)/j(n-1,x) is evaluated and then backward
+ * recursion is used starting from a supposed value
+ * for j(n,x). The resulting value of j(0,x) is
+ * compared with the actual value to correct the
+ * supposed value of j(n,x).
+ *
+ * yn(n,x) is similar in all respects, except
+ * that forward recursion is used for all
+ * values of n>1.
+ *
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double
+invsqrtpi= 5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */
+two = 2.00000000000000000000e+00, /* 0x40000000, 0x00000000 */
+one = 1.00000000000000000000e+00; /* 0x3FF00000, 0x00000000 */
+
+static double zero = 0.00000000000000000000e+00;
+
+ double __ieee754_jn(int n, double x)
+{
+ int i,hx,ix,lx, sgn;
+ double a, b, temp, di;
+ double z, w;
+
+ /* J(-n,x) = (-1)^n * J(n, x), J(n, -x) = (-1)^n * J(n, x)
+ * Thus, J(-n,x) = J(n,-x)
+ */
+ hx = CYG_LIBM_HI(x);
+ ix = 0x7fffffff&hx;
+ lx = CYG_LIBM_LO(x);
+ /* if J(n,NaN) is NaN */
+ if((ix|((unsigned)(lx|-lx))>>31)>0x7ff00000) return x+x;
+ if(n<0){
+ n = -n;
+ x = -x;
+ hx ^= 0x80000000;
+ }
+ if(n==0) return(__ieee754_j0(x));
+ if(n==1) return(__ieee754_j1(x));
+ sgn = (n&1)&(hx>>31); /* even n -- 0, odd n -- sign(x) */
+ x = fabs(x);
+ if((ix|lx)==0||ix>=0x7ff00000) /* if x is 0 or inf */
+ b = zero;
+ else if((double)n<=x) {
+ /* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */
+ if(ix>=0x52D00000) { /* x > 2**302 */
+ /* (x >> n**2)
+ * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
+ * Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)
+ * Let s=sin(x), c=cos(x),
+ * xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then
+ *
+ * n sin(xn)*sqt2 cos(xn)*sqt2
+ * ----------------------------------
+ * 0 s-c c+s
+ * 1 -s-c -c+s
+ * 2 -s+c -c-s
+ * 3 s+c c-s
+ */
+ switch(n&3) {
+ case 0: temp = cos(x)+sin(x); break;
+ case 1: temp = -cos(x)+sin(x); break;
+ case 2: temp = -cos(x)-sin(x); break;
+ case 3: temp = cos(x)-sin(x); break;
+ default: temp = 0.0; break; /* not used - purely to
+ * placate compiler */
+ }
+ b = invsqrtpi*temp/sqrt(x);
+ } else {
+ a = __ieee754_j0(x);
+ b = __ieee754_j1(x);
+ for(i=1;i<n;i++){
+ temp = b;
+ b = b*((double)(i+i)/x) - a; /* avoid underflow */
+ a = temp;
+ }
+ }
+ } else {
+ if(ix<0x3e100000) { /* x < 2**-29 */
+ /* x is tiny, return the first Taylor expansion of J(n,x)
+ * J(n,x) = 1/n!*(x/2)^n - ...
+ */
+ if(n>33) /* underflow */
+ b = zero;
+ else {
+ temp = x*0.5; b = temp;
+ for (a=one,i=2;i<=n;i++) {
+ a *= (double)i; /* a = n! */
+ b *= temp; /* b = (x/2)^n */
+ }
+ b = b/a;
+ }
+ } else {
+ /* use backward recurrence */
+ /* x x^2 x^2
+ * J(n,x)/J(n-1,x) = ---- ------ ------ .....
+ * 2n - 2(n+1) - 2(n+2)
+ *
+ * 1 1 1
+ * (for large x) = ---- ------ ------ .....
+ * 2n 2(n+1) 2(n+2)
+ * -- - ------ - ------ -
+ * x x x
+ *
+ * Let w = 2n/x and h=2/x, then the above quotient
+ * is equal to the continued fraction:
+ * 1
+ * = -----------------------
+ * 1
+ * w - -----------------
+ * 1
+ * w+h - ---------
+ * w+2h - ...
+ *
+ * To determine how many terms needed, let
+ * Q(0) = w, Q(1) = w(w+h) - 1,
+ * Q(k) = (w+k*h)*Q(k-1) - Q(k-2),
+ * When Q(k) > 1e4 good for single
+ * When Q(k) > 1e9 good for double
+ * When Q(k) > 1e17 good for quadruple
+ */
+ /* determine k */
+ double t,v;
+ double q0,q1,h,tmp; int k,m;
+ w = (n+n)/(double)x; h = 2.0/(double)x;
+ q0 = w; z = w+h; q1 = w*z - 1.0; k=1;
+ while(q1<1.0e9) {
+ k += 1; z += h;
+ tmp = z*q1 - q0;
+ q0 = q1;
+ q1 = tmp;
+ }
+ m = n+n;
+ for(t=zero, i = 2*(n+k); i>=m; i -= 2) t = one/(i/x-t);
+ a = t;
+ b = one;
+ /* estimate log((2/x)^n*n!) = n*log(2/x)+n*ln(n)
+ * Hence, if n*(log(2n/x)) > ...
+ * single 8.8722839355e+01
+ * double 7.09782712893383973096e+02
+ * long double 1.1356523406294143949491931077970765006170e+04
+ * then recurrent value may overflow and the result is
+ * likely underflow to zero
+ */
+ tmp = n;
+ v = two/x;
+ tmp = tmp*__ieee754_log(fabs(v*tmp));
+ if(tmp<7.09782712893383973096e+02) {
+ for(i=n-1,di=(double)(i+i);i>0;i--){
+ temp = b;
+ b *= di;
+ b = b/x - a;
+ a = temp;
+ di -= two;
+ }
+ } else {
+ for(i=n-1,di=(double)(i+i);i>0;i--){
+ temp = b;
+ b *= di;
+ b = b/x - a;
+ a = temp;
+ di -= two;
+ /* scale b to avoid spurious overflow */
+ if(b>1e100) {
+ a /= b;
+ t /= b;
+ b = one;
+ }
+ }
+ }
+ b = (t*__ieee754_j0(x)/b);
+ }
+ }
+ if(sgn==1) return -b; else return b;
+}
+
+ double __ieee754_yn(int n, double x)
+{
+ int i,hx,ix,lx;
+ int sign;
+ double a, b, temp;
+
+ hx = CYG_LIBM_HI(x);
+ ix = 0x7fffffff&hx;
+ lx = CYG_LIBM_LO(x);
+ /* if Y(n,NaN) is NaN */
+ if((ix|((unsigned)(lx|-lx))>>31)>0x7ff00000) return x+x;
+ if((ix|lx)==0) return -one/zero;
+ if(hx<0) return zero/zero;
+ sign = 1;
+ if(n<0){
+ n = -n;
+ sign = 1 - ((n&1)<<1);
+ }
+ if(n==0) return(__ieee754_y0(x));
+ if(n==1) return(sign*__ieee754_y1(x));
+ if(ix==0x7ff00000) return zero;
+ if(ix>=0x52D00000) { /* x > 2**302 */
+ /* (x >> n**2)
+ * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
+ * Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)
+ * Let s=sin(x), c=cos(x),
+ * xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then
+ *
+ * n sin(xn)*sqt2 cos(xn)*sqt2
+ * ----------------------------------
+ * 0 s-c c+s
+ * 1 -s-c -c+s
+ * 2 -s+c -c-s
+ * 3 s+c c-s
+ */
+ switch(n&3) {
+ case 0: temp = sin(x)-cos(x); break;
+ case 1: temp = -sin(x)-cos(x); break;
+ case 2: temp = -sin(x)+cos(x); break;
+ case 3: temp = sin(x)+cos(x); break;
+ default: temp = 0.0; break; /* not used - purely to
+ * placate compiler */
+ }
+ b = invsqrtpi*temp/sqrt(x);
+ } else {
+ a = __ieee754_y0(x);
+ b = __ieee754_y1(x);
+ /* quit if b is -inf */
+ for(i=1;i<n&&((unsigned)CYG_LIBM_HI(b) != 0xfff00000);i++){
+ temp = b;
+ b = ((double)(i+i)/x)*b - a;
+ a = temp;
+ }
+ }
+ if(sign>0) return b; else return -b;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_jn.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_lgamma.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_lgamma.c
new file mode 100644
index 0000000000..3b9dcc4129
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_lgamma.c
@@ -0,0 +1,94 @@
+//===========================================================================
+//
+// e_lgamma.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_lgamma.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ *
+ */
+
+/* __ieee754_lgamma(x)
+ * Return the logarithm of the Gamma function of x.
+ *
+ * Method: call __ieee754_lgamma_r
+ */
+
+#include <math.h>
+#include "mathincl/fdlibm.h"
+
+double
+__ieee754_lgamma(double x)
+{
+ return __ieee754_lgamma_r(x,&signgam);
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_lgamma.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_lgamma_r.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_lgamma_r.c
new file mode 100644
index 0000000000..615efc8068
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_lgamma_r.c
@@ -0,0 +1,357 @@
+//===========================================================================
+//
+// e_lgamma_r.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_lgamma_r.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ *
+ */
+
+/* __ieee754_lgamma_r(x, signgamp)
+ * Reentrant version of the logarithm of the Gamma function
+ * with user provide pointer for the sign of Gamma(x).
+ *
+ * Method:
+ * 1. Argument Reduction for 0 < x <= 8
+ * Since gamma(1+s)=s*gamma(s), for x in [0,8], we may
+ * reduce x to a number in [1.5,2.5] by
+ * lgamma(1+s) = log(s) + lgamma(s)
+ * for example,
+ * lgamma(7.3) = log(6.3) + lgamma(6.3)
+ * = log(6.3*5.3) + lgamma(5.3)
+ * = log(6.3*5.3*4.3*3.3*2.3) + lgamma(2.3)
+ * 2. Polynomial approximation of lgamma around its
+ * minimun ymin=1.461632144968362245 to maintain monotonicity.
+ * On [ymin-0.23, ymin+0.27] (i.e., [1.23164,1.73163]), use
+ * Let z = x-ymin;
+ * lgamma(x) = -1.214862905358496078218 + z^2*poly(z)
+ * where
+ * poly(z) is a 14 degree polynomial.
+ * 2. Rational approximation in the primary interval [2,3]
+ * We use the following approximation:
+ * s = x-2.0;
+ * lgamma(x) = 0.5*s + s*P(s)/Q(s)
+ * with accuracy
+ * |P/Q - (lgamma(x)-0.5s)| < 2**-61.71
+ * Our algorithms are based on the following observation
+ *
+ * zeta(2)-1 2 zeta(3)-1 3
+ * lgamma(2+s) = s*(1-Euler) + --------- * s - --------- * s + ...
+ * 2 3
+ *
+ * where Euler = 0.5771... is the Euler constant, which is very
+ * close to 0.5.
+ *
+ * 3. For x>=8, we have
+ * lgamma(x)~(x-0.5)log(x)-x+0.5*log(2pi)+1/(12x)-1/(360x**3)+....
+ * (better formula:
+ * lgamma(x)~(x-0.5)*(log(x)-1)-.5*(log(2pi)-1) + ...)
+ * Let z = 1/x, then we approximation
+ * f(z) = lgamma(x) - (x-0.5)(log(x)-1)
+ * by
+ * 3 5 11
+ * w = w0 + w1*z + w2*z + w3*z + ... + w6*z
+ * where
+ * |w - f(z)| < 2**-58.74
+ *
+ * 4. For negative x, since (G is gamma function)
+ * -x*G(-x)*G(x) = pi/sin(pi*x),
+ * we have
+ * G(x) = pi/(sin(pi*x)*(-x)*G(-x))
+ * since G(-x) is positive, sign(G(x)) = sign(sin(pi*x)) for x<0
+ * Hence, for x<0, signgam = sign(sin(pi*x)) and
+ * lgamma(x) = log(|Gamma(x)|)
+ * = log(pi/(|x*sin(pi*x)|)) - lgamma(-x);
+ * Note: one should avoid compute pi*(-x) directly in the
+ * computation of sin(pi*(-x)).
+ *
+ * 5. Special Cases
+ * lgamma(2+s) ~ s*(1-Euler) for tiny s
+ * lgamma(1)=lgamma(2)=0
+ * lgamma(x) ~ -log(x) for tiny x
+ * lgamma(0) = lgamma(inf) = inf
+ * lgamma(-integer) = +-inf
+ *
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double
+two52= 4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */
+half= 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */
+one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
+pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */
+a0 = 7.72156649015328655494e-02, /* 0x3FB3C467, 0xE37DB0C8 */
+a1 = 3.22467033424113591611e-01, /* 0x3FD4A34C, 0xC4A60FAD */
+a2 = 6.73523010531292681824e-02, /* 0x3FB13E00, 0x1A5562A7 */
+a3 = 2.05808084325167332806e-02, /* 0x3F951322, 0xAC92547B */
+a4 = 7.38555086081402883957e-03, /* 0x3F7E404F, 0xB68FEFE8 */
+a5 = 2.89051383673415629091e-03, /* 0x3F67ADD8, 0xCCB7926B */
+a6 = 1.19270763183362067845e-03, /* 0x3F538A94, 0x116F3F5D */
+a7 = 5.10069792153511336608e-04, /* 0x3F40B6C6, 0x89B99C00 */
+a8 = 2.20862790713908385557e-04, /* 0x3F2CF2EC, 0xED10E54D */
+a9 = 1.08011567247583939954e-04, /* 0x3F1C5088, 0x987DFB07 */
+a10 = 2.52144565451257326939e-05, /* 0x3EFA7074, 0x428CFA52 */
+a11 = 4.48640949618915160150e-05, /* 0x3F07858E, 0x90A45837 */
+tc = 1.46163214496836224576e+00, /* 0x3FF762D8, 0x6356BE3F */
+tf = -1.21486290535849611461e-01, /* 0xBFBF19B9, 0xBCC38A42 */
+/* tt = -(tail of tf) */
+tt = -3.63867699703950536541e-18, /* 0xBC50C7CA, 0xA48A971F */
+t0 = 4.83836122723810047042e-01, /* 0x3FDEF72B, 0xC8EE38A2 */
+t1 = -1.47587722994593911752e-01, /* 0xBFC2E427, 0x8DC6C509 */
+t2 = 6.46249402391333854778e-02, /* 0x3FB08B42, 0x94D5419B */
+t3 = -3.27885410759859649565e-02, /* 0xBFA0C9A8, 0xDF35B713 */
+t4 = 1.79706750811820387126e-02, /* 0x3F9266E7, 0x970AF9EC */
+t5 = -1.03142241298341437450e-02, /* 0xBF851F9F, 0xBA91EC6A */
+t6 = 6.10053870246291332635e-03, /* 0x3F78FCE0, 0xE370E344 */
+t7 = -3.68452016781138256760e-03, /* 0xBF6E2EFF, 0xB3E914D7 */
+t8 = 2.25964780900612472250e-03, /* 0x3F6282D3, 0x2E15C915 */
+t9 = -1.40346469989232843813e-03, /* 0xBF56FE8E, 0xBF2D1AF1 */
+t10 = 8.81081882437654011382e-04, /* 0x3F4CDF0C, 0xEF61A8E9 */
+t11 = -5.38595305356740546715e-04, /* 0xBF41A610, 0x9C73E0EC */
+t12 = 3.15632070903625950361e-04, /* 0x3F34AF6D, 0x6C0EBBF7 */
+t13 = -3.12754168375120860518e-04, /* 0xBF347F24, 0xECC38C38 */
+t14 = 3.35529192635519073543e-04, /* 0x3F35FD3E, 0xE8C2D3F4 */
+u0 = -7.72156649015328655494e-02, /* 0xBFB3C467, 0xE37DB0C8 */
+u1 = 6.32827064025093366517e-01, /* 0x3FE4401E, 0x8B005DFF */
+u2 = 1.45492250137234768737e+00, /* 0x3FF7475C, 0xD119BD6F */
+u3 = 9.77717527963372745603e-01, /* 0x3FEF4976, 0x44EA8450 */
+u4 = 2.28963728064692451092e-01, /* 0x3FCD4EAE, 0xF6010924 */
+u5 = 1.33810918536787660377e-02, /* 0x3F8B678B, 0xBF2BAB09 */
+v1 = 2.45597793713041134822e+00, /* 0x4003A5D7, 0xC2BD619C */
+v2 = 2.12848976379893395361e+00, /* 0x40010725, 0xA42B18F5 */
+v3 = 7.69285150456672783825e-01, /* 0x3FE89DFB, 0xE45050AF */
+v4 = 1.04222645593369134254e-01, /* 0x3FBAAE55, 0xD6537C88 */
+v5 = 3.21709242282423911810e-03, /* 0x3F6A5ABB, 0x57D0CF61 */
+s0 = -7.72156649015328655494e-02, /* 0xBFB3C467, 0xE37DB0C8 */
+s1 = 2.14982415960608852501e-01, /* 0x3FCB848B, 0x36E20878 */
+s2 = 3.25778796408930981787e-01, /* 0x3FD4D98F, 0x4F139F59 */
+s3 = 1.46350472652464452805e-01, /* 0x3FC2BB9C, 0xBEE5F2F7 */
+s4 = 2.66422703033638609560e-02, /* 0x3F9B481C, 0x7E939961 */
+s5 = 1.84028451407337715652e-03, /* 0x3F5E26B6, 0x7368F239 */
+s6 = 3.19475326584100867617e-05, /* 0x3F00BFEC, 0xDD17E945 */
+r1 = 1.39200533467621045958e+00, /* 0x3FF645A7, 0x62C4AB74 */
+r2 = 7.21935547567138069525e-01, /* 0x3FE71A18, 0x93D3DCDC */
+r3 = 1.71933865632803078993e-01, /* 0x3FC601ED, 0xCCFBDF27 */
+r4 = 1.86459191715652901344e-02, /* 0x3F9317EA, 0x742ED475 */
+r5 = 7.77942496381893596434e-04, /* 0x3F497DDA, 0xCA41A95B */
+r6 = 7.32668430744625636189e-06, /* 0x3EDEBAF7, 0xA5B38140 */
+w0 = 4.18938533204672725052e-01, /* 0x3FDACFE3, 0x90C97D69 */
+w1 = 8.33333333333329678849e-02, /* 0x3FB55555, 0x5555553B */
+w2 = -2.77777777728775536470e-03, /* 0xBF66C16C, 0x16B02E5C */
+w3 = 7.93650558643019558500e-04, /* 0x3F4A019F, 0x98CF38B6 */
+w4 = -5.95187557450339963135e-04, /* 0xBF4380CB, 0x8C0FE741 */
+w5 = 8.36339918996282139126e-04, /* 0x3F4B67BA, 0x4CDAD5D1 */
+w6 = -1.63092934096575273989e-03; /* 0xBF5AB89D, 0x0B9E43E4 */
+
+static double zero= 0.00000000000000000000e+00;
+
+ static double sin_pi(double x)
+{
+ double y,z;
+ int n,ix;
+
+ ix = 0x7fffffff&CYG_LIBM_HI(x);
+
+ if(ix<0x3fd00000) return __kernel_sin(pi*x,zero,0);
+ y = -x; /* x is assume negative */
+
+ /*
+ * argument reduction, make sure inexact flag not raised if input
+ * is an integer
+ */
+ z = floor(y);
+ if(z!=y) { /* inexact anyway */
+ y *= 0.5;
+ y = 2.0*(y - floor(y)); /* y = |x| mod 2.0 */
+ n = (int) (y*4.0);
+ } else {
+ if(ix>=0x43400000) {
+ y = zero; n = 0; /* y must be even */
+ } else {
+ if(ix<0x43300000) z = y+two52; /* exact */
+ n = CYG_LIBM_LO(z)&1; /* lower word of z */
+ y = n;
+ n<<= 2;
+ }
+ }
+ switch (n) {
+ case 0: y = __kernel_sin(pi*y,zero,0); break;
+ case 1:
+ case 2: y = __kernel_cos(pi*(0.5-y),zero); break;
+ case 3:
+ case 4: y = __kernel_sin(pi*(one-y),zero,0); break;
+ case 5:
+ case 6: y = -__kernel_cos(pi*(y-1.5),zero); break;
+ default: y = __kernel_sin(pi*(y-2.0),zero,0); break;
+ }
+ return -y;
+}
+
+
+ double __ieee754_lgamma_r(double x, int *signgamp)
+{
+ double t,y,z,nadj,p,p1,p2,p3,q,r,w;
+ int i,hx,lx,ix;
+
+ nadj = 0.0; /* to placate compiler */
+ hx = CYG_LIBM_HI(x);
+ lx = CYG_LIBM_LO(x);
+
+ /* purge off +-inf, NaN, +-0, and negative arguments */
+ *signgamp = 1;
+ ix = hx&0x7fffffff;
+ if(ix>=0x7ff00000) return x*x;
+ if((ix|lx)==0) return one/zero;
+ if(ix<0x3b900000) { /* |x|<2**-70, return -log(|x|) */
+ if(hx<0) {
+ *signgamp = -1;
+ return -__ieee754_log(-x);
+ } else return -__ieee754_log(x);
+ }
+ if(hx<0) {
+ if(ix>=0x43300000) /* |x|>=2**52, must be -integer */
+ return one/zero;
+ t = sin_pi(x);
+ if(t==zero) return one/zero; /* -integer */
+ nadj = __ieee754_log(pi/fabs(t*x));
+ if(t<zero) *signgamp = -1;
+ x = -x;
+ }
+
+ /* purge off 1 and 2 */
+ if((((ix-0x3ff00000)|lx)==0)||(((ix-0x40000000)|lx)==0)) r = 0;
+ /* for x < 2.0 */
+ else if(ix<0x40000000) {
+ if(ix<=0x3feccccc) { /* lgamma(x) = lgamma(x+1)-log(x) */
+ r = -__ieee754_log(x);
+ if(ix>=0x3FE76944) {y = one-x; i= 0;}
+ else if(ix>=0x3FCDA661) {y= x-(tc-one); i=1;}
+ else {y = x; i=2;}
+ } else {
+ r = zero;
+ if(ix>=0x3FFBB4C3) {y=2.0-x;i=0;} /* [1.7316,2] */
+ else if(ix>=0x3FF3B4C4) {y=x-tc;i=1;} /* [1.23,1.73] */
+ else {y=x-one;i=2;}
+ }
+ switch(i) {
+ case 0:
+ z = y*y;
+ p1 = a0+z*(a2+z*(a4+z*(a6+z*(a8+z*a10))));
+ p2 = z*(a1+z*(a3+z*(a5+z*(a7+z*(a9+z*a11)))));
+ p = y*p1+p2;
+ r += (p-0.5*y); break;
+ case 1:
+ z = y*y;
+ w = z*y;
+ p1 = t0+w*(t3+w*(t6+w*(t9 +w*t12))); /* parallel comp */
+ p2 = t1+w*(t4+w*(t7+w*(t10+w*t13)));
+ p3 = t2+w*(t5+w*(t8+w*(t11+w*t14)));
+ p = z*p1-(tt-w*(p2+y*p3));
+ r += (tf + p); break;
+ case 2:
+ p1 = y*(u0+y*(u1+y*(u2+y*(u3+y*(u4+y*u5)))));
+ p2 = one+y*(v1+y*(v2+y*(v3+y*(v4+y*v5))));
+ r += (-0.5*y + p1/p2);
+ }
+ }
+ else if(ix<0x40200000) { /* x < 8.0 */
+ i = (int)x;
+ t = zero;
+ y = x-(double)i;
+ p = y*(s0+y*(s1+y*(s2+y*(s3+y*(s4+y*(s5+y*s6))))));
+ q = one+y*(r1+y*(r2+y*(r3+y*(r4+y*(r5+y*r6)))));
+ r = half*y+p/q;
+ z = one; /* lgamma(1+s) = log(s) + lgamma(s) */
+ switch(i) {
+ case 7: z *= (y+6.0); /* FALLTHRU */
+ case 6: z *= (y+5.0); /* FALLTHRU */
+ case 5: z *= (y+4.0); /* FALLTHRU */
+ case 4: z *= (y+3.0); /* FALLTHRU */
+ case 3: z *= (y+2.0); /* FALLTHRU */
+ r += __ieee754_log(z); break;
+ }
+ /* 8.0 <= x < 2**58 */
+ } else if (ix < 0x43900000) {
+ t = __ieee754_log(x);
+ z = one/x;
+ y = z*z;
+ w = w0+z*(w1+y*(w2+y*(w3+y*(w4+y*(w5+y*w6)))));
+ r = (x-half)*(t-one)+w;
+ } else
+ /* 2**58 <= x <= inf */
+ r = x*(__ieee754_log(x)-one);
+ if(hx<0) r = nadj - r;
+ return r;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_lgamma_r.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_log.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_log.c
new file mode 100644
index 0000000000..ccd83c851d
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_log.c
@@ -0,0 +1,204 @@
+//===========================================================================
+//
+// e_log.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_log.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_log(x)
+ * Return the logrithm of x
+ *
+ * Method :
+ * 1. Argument Reduction: find k and f such that
+ * x = 2^k * (1+f),
+ * where sqrt(2)/2 < 1+f < sqrt(2) .
+ *
+ * 2. Approximation of log(1+f).
+ * Let s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s)
+ * = 2s + 2/3 s**3 + 2/5 s**5 + .....,
+ * = 2s + s*R
+ * We use a special Reme algorithm on [0,0.1716] to generate
+ * a polynomial of degree 14 to approximate R The maximum error
+ * of this polynomial approximation is bounded by 2**-58.45. In
+ * other words,
+ * 2 4 6 8 10 12 14
+ * R(z) ~ Lg1*s +Lg2*s +Lg3*s +Lg4*s +Lg5*s +Lg6*s +Lg7*s
+ * (the values of Lg1 to Lg7 are listed in the program)
+ * and
+ * | 2 14 | -58.45
+ * | Lg1*s +...+Lg7*s - R(z) | <= 2
+ * | |
+ * Note that 2s = f - s*f = f - hfsq + s*hfsq, where hfsq = f*f/2.
+ * In order to guarantee error in log below 1ulp, we compute log
+ * by
+ * log(1+f) = f - s*(f - R) (if f is not too large)
+ * log(1+f) = f - (hfsq - s*(hfsq+R)). (better accuracy)
+ *
+ * 3. Finally, log(x) = k*ln2 + log(1+f).
+ * = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo)))
+ * Here ln2 is split into two floating point number:
+ * ln2_hi + ln2_lo,
+ * where n*ln2_hi is always exact for |n| < 2000.
+ *
+ * Special cases:
+ * log(x) is NaN with signal if x < 0 (including -INF) ;
+ * log(+INF) is +INF; log(0) is -INF with signal;
+ * log(NaN) is that NaN with no signal.
+ *
+ * Accuracy:
+ * according to an error analysis, the error is always less than
+ * 1 ulp (unit in the last place).
+ *
+ * Constants:
+ * The hexadecimal values are the intended ones for the following
+ * constants. The decimal values may be used, provided that the
+ * compiler will convert from decimal to binary accurately enough
+ * to produce the hexadecimal values shown.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double
+ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */
+ln2_lo = 1.90821492927058770002e-10, /* 3dea39ef 35793c76 */
+two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */
+Lg1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */
+Lg2 = 3.999999999940941908e-01, /* 3FD99999 9997FA04 */
+Lg3 = 2.857142874366239149e-01, /* 3FD24924 94229359 */
+Lg4 = 2.222219843214978396e-01, /* 3FCC71C5 1D8E78AF */
+Lg5 = 1.818357216161805012e-01, /* 3FC74664 96CB03DE */
+Lg6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */
+Lg7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */
+
+static double zero = 0.0;
+
+ double __ieee754_log(double x)
+{
+ double hfsq,f,s,z,R,w,t1,t2,dk;
+ int k,hx,i,j;
+ unsigned lx;
+
+ hx = CYG_LIBM_HI(x); /* high word of x */
+ lx = CYG_LIBM_LO(x); /* low word of x */
+
+ k=0;
+ if (hx < 0x00100000) { /* x < 2**-1022 */
+ if (((hx&0x7fffffff)|lx)==0)
+ return -two54/zero; /* log(+-0)=-inf */
+ if (hx<0) return (x-x)/zero; /* log(-#) = NaN */
+ k -= 54; x *= two54; /* subnormal number, scale up x */
+ hx = CYG_LIBM_HI(x); /* high word of x */
+ }
+ if (hx >= 0x7ff00000) return x+x;
+ k += (hx>>20)-1023;
+ hx &= 0x000fffff;
+ i = (hx+0x95f64)&0x100000;
+ CYG_LIBM_HI(x) = hx|(i^0x3ff00000); /* normalize x or x/2 */
+ k += (i>>20);
+ f = x-1.0;
+ if((0x000fffff&(2+hx))<3) { /* |f| < 2**-20 */
+ if(f==zero) {
+ if(k==0) return zero;
+ else {
+ dk=(double)k;
+ return dk*ln2_hi+dk*ln2_lo;
+ }
+ }
+ R = f*f*(0.5-0.33333333333333333*f);
+ if(k==0) return f-R;
+ else {
+ dk=(double)k;
+ return dk*ln2_hi-((R-dk*ln2_lo)-f);
+ }
+ }
+ s = f/(2.0+f);
+ dk = (double)k;
+ z = s*s;
+ i = hx-0x6147a;
+ w = z*z;
+ j = 0x6b851-hx;
+ t1= w*(Lg2+w*(Lg4+w*Lg6));
+ t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7)));
+ i |= j;
+ R = t2+t1;
+ if(i>0) {
+ hfsq=0.5*f*f;
+ if(k==0) return f-(hfsq-s*(hfsq+R)); else
+ return dk*ln2_hi-((hfsq-(s*(hfsq+R)+dk*ln2_lo))-f);
+ } else {
+ if(k==0) return f-s*(f-R); else
+ return dk*ln2_hi-((s*(f-R)-dk*ln2_lo)-f);
+ }
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_log.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_log10.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_log10.c
new file mode 100644
index 0000000000..497cbd58ab
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_log10.c
@@ -0,0 +1,148 @@
+//===========================================================================
+//
+// e_log10.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_log10.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_log10(x)
+ * Return the base 10 logarithm of x
+ *
+ * Method :
+ * Let log10_2hi = leading 40 bits of log10(2) and
+ * log10_2lo = log10(2) - log10_2hi,
+ * ivln10 = 1/log(10) rounded.
+ * Then
+ * n = ilogb(x),
+ * if(n<0) n = n+1;
+ * x = scalbn(x,-n);
+ * log10(x) := n*log10_2hi + (n*log10_2lo + ivln10*log(x))
+ *
+ * Note 1:
+ * To guarantee log10(10**n)=n, where 10**n is normal, the rounding
+ * mode must set to Round-to-Nearest.
+ * Note 2:
+ * [1/log(10)] rounded to 53 bits has error .198 ulps;
+ * log10 is monotonic at all binary break points.
+ *
+ * Special cases:
+ * log10(x) is NaN with signal if x < 0;
+ * log10(+INF) is +INF with no signal; log10(0) is -INF with signal;
+ * log10(NaN) is that NaN with no signal;
+ * log10(10**N) = N for N=0,1,...,22.
+ *
+ * Constants:
+ * The hexadecimal values are the intended ones for the following constants.
+ * The decimal values may be used, provided that the compiler will convert
+ * from decimal to binary accurately enough to produce the hexadecimal values
+ * shown.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double
+two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */
+ivln10 = 4.34294481903251816668e-01, /* 0x3FDBCB7B, 0x1526E50E */
+log10_2hi = 3.01029995663611771306e-01, /* 0x3FD34413, 0x509F6000 */
+log10_2lo = 3.69423907715893078616e-13; /* 0x3D59FEF3, 0x11F12B36 */
+
+static double zero = 0.0;
+
+ double __ieee754_log10(double x)
+{
+ double y,z;
+ int i,k,hx;
+ unsigned lx;
+
+ hx = CYG_LIBM_HI(x); /* high word of x */
+ lx = CYG_LIBM_LO(x); /* low word of x */
+
+ k=0;
+ if (hx < 0x00100000) { /* x < 2**-1022 */
+ if (((hx&0x7fffffff)|lx)==0)
+ return -two54/zero; /* log(+-0)=-inf */
+ if (hx<0) return (x-x)/zero; /* log(-#) = NaN */
+ k -= 54; x *= two54; /* subnormal number, scale up x */
+ hx = CYG_LIBM_HI(x); /* high word of x */
+ }
+ if (hx >= 0x7ff00000) return x+x;
+ k += (hx>>20)-1023;
+ i = ((unsigned)k&0x80000000)>>31;
+ hx = (hx&0x000fffff)|((0x3ff-i)<<20);
+ y = (double)(k+i);
+ CYG_LIBM_HI(x) = hx;
+ z = y*log10_2lo + ivln10*__ieee754_log(x);
+ return z+y*log10_2hi;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_log10.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_pow.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_pow.c
new file mode 100644
index 0000000000..12109541af
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_pow.c
@@ -0,0 +1,371 @@
+//========================================================================
+//
+// e_pow.c
+//
+// Part of the standard mathematical function library
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2001-07-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+/* @(#)e_pow.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_pow(x,y) return x**y
+ *
+ * n
+ * Method: Let x = 2 * (1+f)
+ * 1. Compute and return log2(x) in two pieces:
+ * log2(x) = w1 + w2,
+ * where w1 has 53-24 = 29 bit trailing zeros.
+ * 2. Perform y*log2(x) = n+y' by simulating muti-precision
+ * arithmetic, where |y'|<=0.5.
+ * 3. Return x**y = 2**n*exp(y'*log2)
+ *
+ * Special cases:
+ * 1. (anything) ** 0 is 1
+ * 2. (anything) ** 1 is itself
+ * 3. (anything) ** NAN is NAN
+ * 4. NAN ** (anything except 0) is NAN
+ * 5. +-(|x| > 1) ** +INF is +INF
+ * 6. +-(|x| > 1) ** -INF is +0
+ * 7. +-(|x| < 1) ** +INF is +0
+ * 8. +-(|x| < 1) ** -INF is +INF
+ * 9. +-1 ** +-INF is NAN
+ * 10. +0 ** (+anything except 0, NAN) is +0
+ * 11. -0 ** (+anything except 0, NAN, odd integer) is +0
+ * 12. +0 ** (-anything except 0, NAN) is +INF
+ * 13. -0 ** (-anything except 0, NAN, odd integer) is +INF
+ * 14. -0 ** (odd integer) = -( +0 ** (odd integer) )
+ * 15. +INF ** (+anything except 0,NAN) is +INF
+ * 16. +INF ** (-anything except 0,NAN) is +0
+ * 17. -INF ** (anything) = -0 ** (-anything)
+ * 18. (-anything) ** (integer) is (-1)**(integer)*(+anything**integer)
+ * 19. (-anything except 0 and inf) ** (non-integer) is NAN
+ *
+ * Accuracy:
+ * pow(x,y) returns x**y nearly rounded. In particular
+ * pow(integer,integer)
+ * always returns the correct integer provided it is
+ * representable.
+ *
+ * Constants :
+ * The hexadecimal values are the intended ones for the following
+ * constants. The decimal values may be used, provided that the
+ * compiler will convert from decimal to binary accurately enough
+ * to produce the hexadecimal values shown.
+ */
+
+#include "mathincl/fdlibm.h"
+
+#ifndef _DOUBLE_IS_32BITS
+
+#ifdef __STDC__
+static const double
+#else
+static double
+#endif
+bp[] = {1.0, 1.5,},
+dp_h[] = { 0.0, 5.84962487220764160156e-01,}, /* 0x3FE2B803, 0x40000000 */
+dp_l[] = { 0.0, 1.35003920212974897128e-08,}, /* 0x3E4CFDEB, 0x43CFD006 */
+zero = 0.0,
+one = 1.0,
+two = 2.0,
+two53 = 9007199254740992.0, /* 0x43400000, 0x00000000 */
+huge = 1.0e300,
+tiny = 1.0e-300,
+ /* poly coefs for (3/2)*(log(x)-2s-2/3*s**3 */
+L1 = 5.99999999999994648725e-01, /* 0x3FE33333, 0x33333303 */
+L2 = 4.28571428578550184252e-01, /* 0x3FDB6DB6, 0xDB6FABFF */
+L3 = 3.33333329818377432918e-01, /* 0x3FD55555, 0x518F264D */
+L4 = 2.72728123808534006489e-01, /* 0x3FD17460, 0xA91D4101 */
+L5 = 2.30660745775561754067e-01, /* 0x3FCD864A, 0x93C9DB65 */
+L6 = 2.06975017800338417784e-01, /* 0x3FCA7E28, 0x4A454EEF */
+P1 = 1.66666666666666019037e-01, /* 0x3FC55555, 0x5555553E */
+P2 = -2.77777777770155933842e-03, /* 0xBF66C16C, 0x16BEBD93 */
+P3 = 6.61375632143793436117e-05, /* 0x3F11566A, 0xAF25DE2C */
+P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */
+P5 = 4.13813679705723846039e-08, /* 0x3E663769, 0x72BEA4D0 */
+lg2 = 6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */
+lg2_h = 6.93147182464599609375e-01, /* 0x3FE62E43, 0x00000000 */
+lg2_l = -1.90465429995776804525e-09, /* 0xBE205C61, 0x0CA86C39 */
+ovt = 8.0085662595372944372e-0017, /* -(1024-log2(ovfl+.5ulp)) */
+cp = 9.61796693925975554329e-01, /* 0x3FEEC709, 0xDC3A03FD =2/(3ln2) */
+cp_h = 9.61796700954437255859e-01, /* 0x3FEEC709, 0xE0000000 =(float)cp */
+cp_l = -7.02846165095275826516e-09, /* 0xBE3E2FE0, 0x145B01F5 =tail of cp_h*/
+ivln2 = 1.44269504088896338700e+00, /* 0x3FF71547, 0x652B82FE =1/ln2 */
+ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/
+ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
+
+#ifdef __STDC__
+ double __ieee754_pow(double x, double y)
+#else
+ double __ieee754_pow(x,y)
+ double x, y;
+#endif
+{
+ double z,ax,z_h,z_l,p_h,p_l;
+ double y1,t1,t2,r,s,t,u,v,w;
+ __int32_t i,j,k,yisint,n;
+ __int32_t hx,hy,ix,iy;
+ __uint32_t lx,ly;
+
+ EXTRACT_WORDS(hx,lx,x);
+ EXTRACT_WORDS(hy,ly,y);
+ ix = hx&0x7fffffff; iy = hy&0x7fffffff;
+
+ /* y==zero: x**0 = 1 */
+ if((iy|ly)==0) return one;
+
+ /* +-NaN return x+y */
+ if(ix > 0x7ff00000 || ((ix==0x7ff00000)&&(lx!=0)) ||
+ iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0)))
+ return x+y;
+
+ /* determine if y is an odd int when x < 0
+ * yisint = 0 ... y is not an integer
+ * yisint = 1 ... y is an odd int
+ * yisint = 2 ... y is an even int
+ */
+ yisint = 0;
+ if(hx<0) {
+ if(iy>=0x43400000) yisint = 2; /* even integer y */
+ else if(iy>=0x3ff00000) {
+ k = (iy>>20)-0x3ff; /* exponent */
+ if(k>20) {
+ j = ly>>(52-k);
+ if((j<<(52-k))==ly) yisint = 2-(j&1);
+ } else if(ly==0) {
+ j = iy>>(20-k);
+ if((j<<(20-k))==iy) yisint = 2-(j&1);
+ }
+ }
+ }
+
+ /* special value of y */
+ if(ly==0) {
+ if (iy==0x7ff00000) { /* y is +-inf */
+ if(((ix-0x3ff00000)|lx)==0)
+ return y - y; /* inf**+-1 is NaN */
+ else if (ix >= 0x3ff00000)/* (|x|>1)**+-inf = inf,0 */
+ return (hy>=0)? y: zero;
+ else /* (|x|<1)**-,+inf = inf,0 */
+ return (hy<0)?-y: zero;
+ }
+ if(iy==0x3ff00000) { /* y is +-1 */
+ if(hy<0) return one/x; else return x;
+ }
+ if(hy==0x40000000) return x*x; /* y is 2 */
+ if(hy==0x3fe00000) { /* y is 0.5 */
+ if(hx>=0) /* x >= +0 */
+ return __ieee754_sqrt(x);
+ }
+ }
+
+ ax = fabs(x);
+ /* special value of x */
+ if(lx==0) {
+ if(ix==0x7ff00000||ix==0||ix==0x3ff00000){
+ z = ax; /*x is +-0,+-inf,+-1*/
+ if(hy<0) z = one/z; /* z = (1/|x|) */
+ if(hx<0) {
+ if(((ix-0x3ff00000)|yisint)==0) {
+ z = (z-z)/(z-z); /* (-1)**non-int is NaN */
+ } else if(yisint==1)
+ z = -z; /* (x<0)**odd = -(|x|**odd) */
+ }
+ return z;
+ }
+ }
+
+ /* (x<0)**(non-int) is NaN */
+ /* CYGNUS LOCAL: This used to be
+ if((((hx>>31)+1)|yisint)==0) return (x-x)/(x-x);
+ but ANSI C says a right shift of a signed negative quantity is
+ implementation defined. */
+ if(((((__uint32_t)hx>>31)-1)|yisint)==0) return (x-x)/(x-x);
+
+ /* |y| is huge */
+ if(iy>0x41e00000) { /* if |y| > 2**31 */
+ if(iy>0x43f00000){ /* if |y| > 2**64, must o/uflow */
+ if(ix<=0x3fefffff) return (hy<0)? huge*huge:tiny*tiny;
+ if(ix>=0x3ff00000) return (hy>0)? huge*huge:tiny*tiny;
+ }
+ /* over/underflow if x is not close to one */
+ if(ix<0x3fefffff) return (hy<0)? huge*huge:tiny*tiny;
+ if(ix>0x3ff00000) return (hy>0)? huge*huge:tiny*tiny;
+ /* now |1-x| is tiny <= 2**-20, suffice to compute
+ log(x) by x-x^2/2+x^3/3-x^4/4 */
+ t = x-1; /* t has 20 trailing zeros */
+ w = (t*t)*(0.5-t*(0.3333333333333333333333-t*0.25));
+ u = ivln2_h*t; /* ivln2_h has 21 sig. bits */
+ v = t*ivln2_l-w*ivln2;
+ t1 = u+v;
+ SET_LOW_WORD(t1,0);
+ t2 = v-(t1-u);
+ } else {
+ double s2,s_h,s_l,t_h,t_l;
+ n = 0;
+ /* take care subnormal number */
+ if(ix<0x00100000)
+ {ax *= two53; n -= 53; GET_HIGH_WORD(ix,ax); }
+ n += ((ix)>>20)-0x3ff;
+ j = ix&0x000fffff;
+ /* determine interval */
+ ix = j|0x3ff00000; /* normalize ix */
+ if(j<=0x3988E) k=0; /* |x|<sqrt(3/2) */
+ else if(j<0xBB67A) k=1; /* |x|<sqrt(3) */
+ else {k=0;n+=1;ix -= 0x00100000;}
+ SET_HIGH_WORD(ax,ix);
+
+ /* compute s = s_h+s_l = (x-1)/(x+1) or (x-1.5)/(x+1.5) */
+ u = ax-bp[k]; /* bp[0]=1.0, bp[1]=1.5 */
+ v = one/(ax+bp[k]);
+ s = u*v;
+ s_h = s;
+ SET_LOW_WORD(s_h,0);
+ /* t_h=ax+bp[k] High */
+ t_h = zero;
+ SET_HIGH_WORD(t_h,((ix>>1)|0x20000000)+0x00080000+(k<<18));
+ t_l = ax - (t_h-bp[k]);
+ s_l = v*((u-s_h*t_h)-s_h*t_l);
+ /* compute log(ax) */
+ s2 = s*s;
+ r = s2*s2*(L1+s2*(L2+s2*(L3+s2*(L4+s2*(L5+s2*L6)))));
+ r += s_l*(s_h+s);
+ s2 = s_h*s_h;
+ t_h = 3.0+s2+r;
+ SET_LOW_WORD(t_h,0);
+ t_l = r-((t_h-3.0)-s2);
+ /* u+v = s*(1+...) */
+ u = s_h*t_h;
+ v = s_l*t_h+t_l*s;
+ /* 2/(3log2)*(s+...) */
+ p_h = u+v;
+ SET_LOW_WORD(p_h,0);
+ p_l = v-(p_h-u);
+ z_h = cp_h*p_h; /* cp_h+cp_l = 2/(3*log2) */
+ z_l = cp_l*p_h+p_l*cp+dp_l[k];
+ /* log2(ax) = (s+..)*2/(3*log2) = n + dp_h + z_h + z_l */
+ t = (double)n;
+ t1 = (((z_h+z_l)+dp_h[k])+t);
+ SET_LOW_WORD(t1,0);
+ t2 = z_l-(((t1-t)-dp_h[k])-z_h);
+ }
+
+ s = one; /* s (sign of result -ve**odd) = -1 else = 1 */
+ if(((((__uint32_t)hx>>31)-1)|(yisint-1))==0)
+ s = -one;/* (-ve)**(odd int) */
+
+ /* split up y into y1+y2 and compute (y1+y2)*(t1+t2) */
+ y1 = y;
+ SET_LOW_WORD(y1,0);
+ p_l = (y-y1)*t1+y*t2;
+ p_h = y1*t1;
+ z = p_l+p_h;
+ EXTRACT_WORDS(j,i,z);
+ if (j>=0x40900000) { /* z >= 1024 */
+ if(((j-0x40900000)|i)!=0) /* if z > 1024 */
+ return s*huge*huge; /* overflow */
+ else {
+ if(p_l+ovt>z-p_h) return s*huge*huge; /* overflow */
+ }
+ } else if((j&0x7fffffff)>=0x4090cc00 ) { /* z <= -1075 */
+ if(((j-0xc090cc00)|i)!=0) /* z < -1075 */
+ return s*tiny*tiny; /* underflow */
+ else {
+ if(p_l<=z-p_h) return s*tiny*tiny; /* underflow */
+ }
+ }
+ /*
+ * compute 2**(p_h+p_l)
+ */
+ i = j&0x7fffffff;
+ k = (i>>20)-0x3ff;
+ n = 0;
+ if(i>0x3fe00000) { /* if |z| > 0.5, set n = [z+0.5] */
+ n = j+(0x00100000>>(k+1));
+ k = ((n&0x7fffffff)>>20)-0x3ff; /* new k for n */
+ t = zero;
+ SET_HIGH_WORD(t,n&~(0x000fffff>>k));
+ n = ((n&0x000fffff)|0x00100000)>>(20-k);
+ if(j<0) n = -n;
+ p_h -= t;
+ }
+ t = p_l+p_h;
+ SET_LOW_WORD(t,0);
+ u = t*lg2_h;
+ v = (p_l-(t-p_h))*lg2+t*lg2_l;
+ z = u+v;
+ w = v-(z-u);
+ t = z*z;
+ t1 = z - t*(P1+t*(P2+t*(P3+t*(P4+t*P5))));
+ r = (z*t1)/(t1-two)-(w+z*w);
+ z = one-(r-z);
+ GET_HIGH_WORD(j,z);
+ j += (n<<20);
+ if((j>>20)<=0) z = scalbn(z,(int)n); /* subnormal output */
+ else SET_HIGH_WORD(z,j);
+ return s*z;
+}
+
+#endif /* defined(_DOUBLE_IS_32BITS) */
+
+// EOF e_pow.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_rem_pio2.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_rem_pio2.c
new file mode 100644
index 0000000000..e68f6ad397
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_rem_pio2.c
@@ -0,0 +1,224 @@
+//===========================================================================
+//
+// e_rem_pio2.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_rem_pio2.c 1.4 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ *
+ */
+
+/* __ieee754_rem_pio2(x,y)
+ *
+ * return the remainder of x rem pi/2 in y[0]+y[1]
+ * use __kernel_rem_pio2()
+ */
+
+#include "mathincl/fdlibm.h"
+
+/*
+ * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi
+ */
+static const int two_over_pi[] = {
+0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62,
+0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A,
+0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129,
+0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41,
+0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8,
+0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF,
+0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5,
+0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08,
+0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3,
+0x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880,
+0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B,
+};
+
+static const int npio2_hw[] = {
+0x3FF921FB, 0x400921FB, 0x4012D97C, 0x401921FB, 0x401F6A7A, 0x4022D97C,
+0x4025FDBB, 0x402921FB, 0x402C463A, 0x402F6A7A, 0x4031475C, 0x4032D97C,
+0x40346B9C, 0x4035FDBB, 0x40378FDB, 0x403921FB, 0x403AB41B, 0x403C463A,
+0x403DD85A, 0x403F6A7A, 0x40407E4C, 0x4041475C, 0x4042106C, 0x4042D97C,
+0x4043A28C, 0x40446B9C, 0x404534AC, 0x4045FDBB, 0x4046C6CB, 0x40478FDB,
+0x404858EB, 0x404921FB,
+};
+
+/*
+ * invpio2: 53 bits of 2/pi
+ * pio2_1: first 33 bit of pi/2
+ * pio2_1t: pi/2 - pio2_1
+ * pio2_2: second 33 bit of pi/2
+ * pio2_2t: pi/2 - (pio2_1+pio2_2)
+ * pio2_3: third 33 bit of pi/2
+ * pio2_3t: pi/2 - (pio2_1+pio2_2+pio2_3)
+ */
+
+static const double
+zero = 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
+half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */
+two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
+invpio2 = 6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */
+pio2_1 = 1.57079632673412561417e+00, /* 0x3FF921FB, 0x54400000 */
+pio2_1t = 6.07710050650619224932e-11, /* 0x3DD0B461, 0x1A626331 */
+pio2_2 = 6.07710050630396597660e-11, /* 0x3DD0B461, 0x1A600000 */
+pio2_2t = 2.02226624879595063154e-21, /* 0x3BA3198A, 0x2E037073 */
+pio2_3 = 2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */
+pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
+
+ int __ieee754_rem_pio2(double x, double *y)
+{
+ double z,w,t,r,fn;
+ double tx[3];
+ int e0,i,j,nx,n,ix,hx;
+
+ hx = CYG_LIBM_HI(x); /* high word of x */
+ ix = hx&0x7fffffff;
+ if(ix<=0x3fe921fb) /* |x| ~<= pi/4 , no need for reduction */
+ {y[0] = x; y[1] = 0; return 0;}
+ if(ix<0x4002d97c) { /* |x| < 3pi/4, special case with n=+-1 */
+ if(hx>0) {
+ z = x - pio2_1;
+ if(ix!=0x3ff921fb) { /* 33+53 bit pi is good enough */
+ y[0] = z - pio2_1t;
+ y[1] = (z-y[0])-pio2_1t;
+ } else { /* near pi/2, use 33+33+53 bit pi */
+ z -= pio2_2;
+ y[0] = z - pio2_2t;
+ y[1] = (z-y[0])-pio2_2t;
+ }
+ return 1;
+ } else { /* negative x */
+ z = x + pio2_1;
+ if(ix!=0x3ff921fb) { /* 33+53 bit pi is good enough */
+ y[0] = z + pio2_1t;
+ y[1] = (z-y[0])+pio2_1t;
+ } else { /* near pi/2, use 33+33+53 bit pi */
+ z += pio2_2;
+ y[0] = z + pio2_2t;
+ y[1] = (z-y[0])+pio2_2t;
+ }
+ return -1;
+ }
+ }
+ if(ix<=0x413921fb) { /* |x| ~<= 2^19*(pi/2), medium size */
+ t = fabs(x);
+ n = (int) (t*invpio2+half);
+ fn = (double)n;
+ r = t-fn*pio2_1;
+ w = fn*pio2_1t; /* 1st round good to 85 bit */
+ if(n<32&&ix!=npio2_hw[n-1]) {
+ y[0] = r-w; /* quick check no cancellation */
+ } else {
+ j = ix>>20;
+ y[0] = r-w;
+ i = j-(((CYG_LIBM_HI(y[0]))>>20)&0x7ff);
+ if(i>16) { /* 2nd iteration needed, good to 118 */
+ t = r;
+ w = fn*pio2_2;
+ r = t-w;
+ w = fn*pio2_2t-((t-r)-w);
+ y[0] = r-w;
+ i = j-(((CYG_LIBM_HI(y[0]))>>20)&0x7ff);
+ if(i>49) { /* 3rd iteration need, 151 bits acc */
+ t = r; /* will cover all possible cases */
+ w = fn*pio2_3;
+ r = t-w;
+ w = fn*pio2_3t-((t-r)-w);
+ y[0] = r-w;
+ }
+ }
+ }
+ y[1] = (r-y[0])-w;
+ if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
+ else return n;
+ }
+ /*
+ * all other (large) arguments
+ */
+ if(ix>=0x7ff00000) { /* x is inf or NaN */
+ y[0]=y[1]=x-x; return 0;
+ }
+ /* set z = scalbn(|x|,ilogb(x)-23) */
+ CYG_LIBM_LO(z) = CYG_LIBM_LO(x);
+ e0 = (ix>>20)-1046; /* e0 = ilogb(z)-23; */
+ CYG_LIBM_HI(z) = ix - (e0<<20);
+ for(i=0;i<2;i++) {
+ tx[i] = (double)((int)(z));
+ z = (z-tx[i])*two24;
+ }
+ tx[2] = z;
+ nx = 3;
+ while(tx[nx-1]==zero) nx--; /* skip zero term */
+ n = __kernel_rem_pio2(tx,y,e0,nx,2,two_over_pi);
+ if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
+ return n;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_rem_pio2.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_remainder.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_remainder.c
new file mode 100644
index 0000000000..6d8fb7ac54
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_remainder.c
@@ -0,0 +1,134 @@
+//===========================================================================
+//
+// e_remainder.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_remainder.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_remainder(x,p)
+ * Return :
+ * returns x REM p = x - [x/p]*p as if in infinite
+ * precise arithmetic, where [x/p] is the (infinite bit)
+ * integer nearest x/p (in half way case choose the even one).
+ * Method :
+ * Based on fmod() return x-[x/p]chopped*p exactlp.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double zero = 0.0;
+
+
+ double __ieee754_remainder(double x, double p)
+{
+ int hx,hp;
+ unsigned sx,lx,lp;
+ double p_half;
+
+ hx = CYG_LIBM_HI(x); /* high word of x */
+ lx = CYG_LIBM_LO(x); /* low word of x */
+ hp = CYG_LIBM_HI(p); /* high word of p */
+ lp = CYG_LIBM_LO(p); /* low word of p */
+ sx = hx&0x80000000;
+ hp &= 0x7fffffff;
+ hx &= 0x7fffffff;
+
+ /* purge off exception values */
+ if((hp|lp)==0) return (x*p)/(x*p); /* p = 0 */
+ if((hx>=0x7ff00000)|| /* x not finite */
+ ((hp>=0x7ff00000)&& /* p is NaN */
+ (((hp-0x7ff00000)|lp)!=0)))
+ return (x*p)/(x*p);
+
+
+ if (hp<=0x7fdfffff) x = __ieee754_fmod(x,p+p); /* now x < 2p */
+ if (((hx-hp)|(lx-lp))==0) return zero*x;
+ x = fabs(x);
+ p = fabs(p);
+ if (hp<0x00200000) {
+ if(x+x>p) {
+ x-=p;
+ if(x+x>=p) x -= p;
+ }
+ } else {
+ p_half = 0.5*p;
+ if(x>p_half) {
+ x-=p;
+ if(x>=p_half) x -= p;
+ }
+ }
+ CYG_LIBM_HI(x) ^= sx;
+ return x;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_remainder.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_scalb.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_scalb.c
new file mode 100644
index 0000000000..19ebac26eb
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_scalb.c
@@ -0,0 +1,107 @@
+//===========================================================================
+//
+// e_scalb.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_scalb.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * __ieee754_scalb(x, fn) is provide for
+ * passing various standard test suite. One
+ * should use scalbn() instead.
+ */
+
+#include "mathincl/fdlibm.h"
+
+#ifdef CYGFUN_LIBM_SVID3_scalb
+ double __ieee754_scalb(double x, double fn)
+#else
+ double __ieee754_scalb(double x, int fn)
+#endif
+{
+#ifdef CYGFUN_LIBM_SVID3_scalb
+ if (isnan(x)||isnan(fn)) return x*fn;
+ if (!finite(fn)) {
+ if(fn>0.0) return x*fn;
+ else return x/(-fn);
+ }
+ if (rint(fn)!=fn) return (fn-fn)/(fn-fn);
+ if ( fn > 65000.0) return scalbn(x, 65000);
+ if (-fn > 65000.0) return scalbn(x,-65000);
+ return scalbn(x,(int)fn);
+#else
+ return scalbn(x,fn);
+#endif
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_scalb.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_sinh.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_sinh.c
new file mode 100644
index 0000000000..205e774598
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_sinh.c
@@ -0,0 +1,139 @@
+//===========================================================================
+//
+// e_sinh.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)e_sinh.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_sinh(x)
+ * Method :
+ * mathematically sinh(x) if defined to be (exp(x)-exp(-x))/2
+ * 1. Replace x by |x| (sinh(-x) = -sinh(x)).
+ * 2.
+ * E + E/(E+1)
+ * 0 <= x <= 22 : sinh(x) := --------------, E=expm1(x)
+ * 2
+ *
+ * 22 <= x <= lnovft : sinh(x) := exp(x)/2
+ * lnovft <= x <= ln2ovft: sinh(x) := exp(x/2)/2 * exp(x/2)
+ * ln2ovft < x : sinh(x) := x*shuge (overflow)
+ *
+ * Special cases:
+ * sinh(x) is |x| if x is +INF, -INF, or NaN.
+ * only sinh(0)=0 is exact for finite x.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double one = 1.0, shuge = 1.0e307;
+
+ double __ieee754_sinh(double x)
+{
+ double t,w,h;
+ int ix,jx;
+ unsigned lx;
+
+ /* High word of |x|. */
+ jx = CYG_LIBM_HI(x);
+ ix = jx&0x7fffffff;
+
+ /* x is INF or NaN */
+ if(ix>=0x7ff00000) return x+x;
+
+ h = 0.5;
+ if (jx<0) h = -h;
+ /* |x| in [0,22], return sign(x)*0.5*(E+E/(E+1))) */
+ if (ix < 0x40360000) { /* |x|<22 */
+ if (ix<0x3e300000) /* |x|<2**-28 */
+ if(shuge+x>one) return x;/* sinh(tiny) = tiny with inexact */
+ t = expm1(fabs(x));
+ if(ix<0x3ff00000) return h*(2.0*t-t*t/(t+one));
+ return h*(t+t/(t+one));
+ }
+
+ /* |x| in [22, log(maxdouble)] return 0.5*exp(|x|) */
+ if (ix < 0x40862E42) return h*__ieee754_exp(fabs(x));
+
+ /* |x| in [log(maxdouble), overflowthresold] */
+ lx = CYG_LIBM_LO(x);
+ if (ix<0x408633CE || ((ix==0x408633ce)&&(lx<=(unsigned)0x8fb9f87d))) {
+ w = __ieee754_exp(0.5*fabs(x));
+ t = h*w;
+ return t*w;
+ }
+
+ /* |x| > overflowthresold, sinh(x) overflow */
+ return x*shuge;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_sinh.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_sqrt.c b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_sqrt.c
new file mode 100644
index 0000000000..79cb0b052d
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/ieee754-core/e_sqrt.c
@@ -0,0 +1,507 @@
+//===========================================================================
+//
+// e_sqrt.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+/* @(#)e_sqrt.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_sqrt(x)
+ * Return correctly rounded sqrt.
+ * ------------------------------------------
+ * | Use the hardware sqrt if you have one |
+ * ------------------------------------------
+ * Method:
+ * Bit by bit method using integer arithmetic. (Slow, but portable)
+ * 1. Normalization
+ * Scale x to y in [1,4) with even powers of 2:
+ * find an integer k such that 1 <= (y=x*2^(2k)) < 4, then
+ * sqrt(x) = 2^k * sqrt(y)
+ * 2. Bit by bit computation
+ * Let q = sqrt(y) truncated to i bit after binary point (q = 1),
+ * i 0
+ * i+1 2
+ * s = 2*q , and y = 2 * ( y - q ). (1)
+ * i i i i
+ *
+ * To compute q from q , one checks whether
+ * i+1 i
+ *
+ * -(i+1) 2
+ * (q + 2 ) <= y. (2)
+ * i
+ * -(i+1)
+ * If (2) is false, then q = q ; otherwise q = q + 2 .
+ * i+1 i i+1 i
+ *
+ * With some algebric manipulation, it is not difficult to see
+ * that (2) is equivalent to
+ * -(i+1)
+ * s + 2 <= y (3)
+ * i i
+ *
+ * The advantage of (3) is that s and y can be computed by
+ * i i
+ * the following recurrence formula:
+ * if (3) is false
+ *
+ * s = s , y = y ; (4)
+ * i+1 i i+1 i
+ *
+ * otherwise,
+ * -i -(i+1)
+ * s = s + 2 , y = y - s - 2 (5)
+ * i+1 i i+1 i i
+ *
+ * One may easily use induction to prove (4) and (5).
+ * Note. Since the left hand side of (3) contain only i+2 bits,
+ * it does not necessary to do a full (53-bit) comparison
+ * in (3).
+ * 3. Final rounding
+ * After generating the 53 bits result, we compute one more bit.
+ * Together with the remainder, we can decide whether the
+ * result is exact, bigger than 1/2ulp, or less than 1/2ulp
+ * (it will never equal to 1/2ulp).
+ * The rounding mode can be detected by checking whether
+ * huge + tiny is equal to huge, and whether huge - tiny is
+ * equal to huge for some floating point number "huge" and "tiny".
+ *
+ * Special cases:
+ * sqrt(+-0) = +-0 ... exact
+ * sqrt(inf) = inf
+ * sqrt(-ve) = NaN ... with invalid signal
+ * sqrt(NaN) = NaN ... with invalid signal for signaling NaN
+ *
+ * Other methods : see the appended file at the end of the program below.
+ *---------------
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double one = 1.0, tiny=1.0e-300;
+
+ double __ieee754_sqrt(double x)
+{
+ double z;
+ int sign = (int)0x80000000;
+ unsigned r,t1,s1,ix1,q1;
+ int ix0,s0,q,m,t,i;
+
+ ix0 = CYG_LIBM_HI(x); /* high word of x */
+ ix1 = CYG_LIBM_LO(x); /* low word of x */
+
+ /* take care of Inf and NaN */
+ if((ix0&0x7ff00000)==0x7ff00000) {
+ return x*x+x; /* sqrt(NaN)=NaN, sqrt(+inf)=+inf
+ sqrt(-inf)=sNaN */
+ }
+ /* take care of zero */
+ if(ix0<=0) {
+ if(((ix0&(~sign))|ix1)==0) return x;/* sqrt(+-0) = +-0 */
+ else if(ix0<0)
+ return (x-x)/(x-x); /* sqrt(-ve) = sNaN */
+ }
+ /* normalize x */
+ m = (ix0>>20);
+ if(m==0) { /* subnormal x */
+ while(ix0==0) {
+ m -= 21;
+ ix0 |= (ix1>>11); ix1 <<= 21;
+ }
+ for(i=0;(ix0&0x00100000)==0;i++) ix0<<=1;
+ m -= i-1;
+ ix0 |= (ix1>>(32-i));
+ ix1 <<= i;
+ }
+ m -= 1023; /* unbias exponent */
+ ix0 = (ix0&0x000fffff)|0x00100000;
+ if(m&1){ /* odd m, double x to make it even */
+ ix0 += ix0 + ((ix1&sign)>>31);
+ ix1 += ix1;
+ }
+ m >>= 1; /* m = [m/2] */
+
+ /* generate sqrt(x) bit by bit */
+ ix0 += ix0 + ((ix1&sign)>>31);
+ ix1 += ix1;
+ q = q1 = s0 = s1 = 0; /* [q,q1] = sqrt(x) */
+ r = 0x00200000; /* r = moving bit from right to left */
+
+ while(r!=0) {
+ t = s0+r;
+ if(t<=ix0) {
+ s0 = t+r;
+ ix0 -= t;
+ q += r;
+ }
+ ix0 += ix0 + ((ix1&sign)>>31);
+ ix1 += ix1;
+ r>>=1;
+ }
+
+ r = sign;
+ while(r!=0) {
+ t1 = s1+r;
+ t = s0;
+ if((t<ix0)||((t==ix0)&&(t1<=ix1))) {
+ s1 = t1+r;
+ if(((t1&sign)==(unsigned)sign)&&(s1&sign)==0) s0 += 1;
+ ix0 -= t;
+ if (ix1 < t1) ix0 -= 1;
+ ix1 -= t1;
+ q1 += r;
+ }
+ ix0 += ix0 + ((ix1&sign)>>31);
+ ix1 += ix1;
+ r>>=1;
+ }
+
+ /* use floating add to find out rounding direction */
+ if((ix0|ix1)!=0) {
+ z = one-tiny; /* trigger inexact flag */
+ if (z>=one) {
+ z = one+tiny;
+ if (q1==(unsigned)0xffffffff) { q1=0; q += 1;}
+ else if (z>one) {
+ if (q1==(unsigned)0xfffffffe) q+=1;
+ q1+=2;
+ } else
+ q1 += (q1&1);
+ }
+ }
+ ix0 = (q>>1)+0x3fe00000;
+ ix1 = q1>>1;
+ if ((q&1)==1) ix1 |= sign;
+ ix0 += (m <<20);
+ CYG_LIBM_HI(z) = ix0;
+ CYG_LIBM_LO(z) = ix1;
+ return z;
+}
+
+/*
+Other methods (use floating-point arithmetic)
+-------------
+(This is a copy of a drafted paper by Prof W. Kahan
+and K.C. Ng, written in May, 1986)
+
+ Two algorithms are given here to implement sqrt(x)
+ (IEEE double precision arithmetic) in software.
+ Both supply sqrt(x) correctly rounded. The first algorithm (in
+ Section A) uses newton iterations and involves four divisions.
+ The second one uses reciproot iterations to avoid division, but
+ requires more multiplications. Both algorithms need the ability
+ to chop results of arithmetic operations instead of round them,
+ and the INEXACT flag to indicate when an arithmetic operation
+ is executed exactly with no roundoff error, all part of the
+ standard (IEEE 754-1985). The ability to perform shift, add,
+ subtract and logical AND operations upon 32-bit words is needed
+ too, though not part of the standard.
+
+A. sqrt(x) by Newton Iteration
+
+ (1) Initial approximation
+
+ Let x0 and x1 be the leading and the trailing 32-bit words of
+ a floating point number x (in IEEE double format) respectively
+
+ 1 11 52 ...widths
+ ------------------------------------------------------
+ x: |s| e | f |
+ ------------------------------------------------------
+ msb lsb msb lsb ...order
+
+
+ ------------------------ ------------------------
+ x0: |s| e | f1 | x1: | f2 |
+ ------------------------ ------------------------
+
+ By performing shifts and subtracts on x0 and x1 (both regarded
+ as integers), we obtain an 8-bit approximation of sqrt(x) as
+ follows.
+
+ k := (x0>>1) + 0x1ff80000;
+ y0 := k - T1[31&(k>>15)]. ... y ~ sqrt(x) to 8 bits
+ Here k is a 32-bit integer and T1[] is an integer array containing
+ correction terms. Now magically the floating value of y (y's
+ leading 32-bit word is y0, the value of its trailing word is 0)
+ approximates sqrt(x) to almost 8-bit.
+
+ Value of T1:
+ static int T1[32]= {
+ 0, 1024, 3062, 5746, 9193, 13348, 18162, 23592,
+ 29598, 36145, 43202, 50740, 58733, 67158, 75992, 85215,
+ 83599, 71378, 60428, 50647, 41945, 34246, 27478, 21581,
+ 16499, 12183, 8588, 5674, 3403, 1742, 661, 130,};
+
+ (2) Iterative refinement
+
+ Apply Heron's rule three times to y, we have y approximates
+ sqrt(x) to within 1 ulp (Unit in the Last Place):
+
+ y := (y+x/y)/2 ... almost 17 sig. bits
+ y := (y+x/y)/2 ... almost 35 sig. bits
+ y := y-(y-x/y)/2 ... within 1 ulp
+
+
+ Remark 1.
+ Another way to improve y to within 1 ulp is:
+
+ y := (y+x/y) ... almost 17 sig. bits to 2*sqrt(x)
+ y := y - 0x00100006 ... almost 18 sig. bits to sqrt(x)
+
+ 2
+ (x-y )*y
+ y := y + 2* ---------- ...within 1 ulp
+ 2
+ 3y + x
+
+
+ This formula has one division fewer than the one above; however,
+ it requires more multiplications and additions. Also x must be
+ scaled in advance to avoid spurious overflow in evaluating the
+ expression 3y*y+x. Hence it is not recommended uless division
+ is slow. If division is very slow, then one should use the
+ reciproot algorithm given in section B.
+
+ (3) Final adjustment
+
+ By twiddling y's last bit it is possible to force y to be
+ correctly rounded according to the prevailing rounding mode
+ as follows. Let r and i be copies of the rounding mode and
+ inexact flag before entering the square root program. Also we
+ use the expression y+-ulp for the next representable floating
+ numbers (up and down) of y. Note that y+-ulp = either fixed
+ point y+-1, or multiply y by nextafter(1,+-inf) in chopped
+ mode.
+
+ I := FALSE; ... reset INEXACT flag I
+ R := RZ; ... set rounding mode to round-toward-zero
+ z := x/y; ... chopped quotient, possibly inexact
+ If(not I) then { ... if the quotient is exact
+ if(z=y) {
+ I := i; ... restore inexact flag
+ R := r; ... restore rounded mode
+ return sqrt(x):=y.
+ } else {
+ z := z - ulp; ... special rounding
+ }
+ }
+ i := TRUE; ... sqrt(x) is inexact
+ If (r=RN) then z=z+ulp ... rounded-to-nearest
+ If (r=RP) then { ... round-toward-+inf
+ y = y+ulp; z=z+ulp;
+ }
+ y := y+z; ... chopped sum
+ y0:=y0-0x00100000; ... y := y/2 is correctly rounded.
+ I := i; ... restore inexact flag
+ R := r; ... restore rounded mode
+ return sqrt(x):=y.
+
+ (4) Special cases
+
+ Square root of +inf, +-0, or NaN is itself;
+ Square root of a negative number is NaN with invalid signal.
+
+
+B. sqrt(x) by Reciproot Iteration
+
+ (1) Initial approximation
+
+ Let x0 and x1 be the leading and the trailing 32-bit words of
+ a floating point number x (in IEEE double format) respectively
+ (see section A). By performing shifs and subtracts on x0 and y0,
+ we obtain a 7.8-bit approximation of 1/sqrt(x) as follows.
+
+ k := 0x5fe80000 - (x0>>1);
+ y0:= k - T2[63&(k>>14)]. ... y ~ 1/sqrt(x) to 7.8 bits
+
+ Here k is a 32-bit integer and T2[] is an integer array
+ containing correction terms. Now magically the floating
+ value of y (y's leading 32-bit word is y0, the value of
+ its trailing word y1 is set to zero) approximates 1/sqrt(x)
+ to almost 7.8-bit.
+
+ Value of T2:
+ static int T2[64]= {
+ 0x1500, 0x2ef8, 0x4d67, 0x6b02, 0x87be, 0xa395, 0xbe7a, 0xd866,
+ 0xf14a, 0x1091b,0x11fcd,0x13552,0x14999,0x15c98,0x16e34,0x17e5f,
+ 0x18d03,0x19a01,0x1a545,0x1ae8a,0x1b5c4,0x1bb01,0x1bfde,0x1c28d,
+ 0x1c2de,0x1c0db,0x1ba73,0x1b11c,0x1a4b5,0x1953d,0x18266,0x16be0,
+ 0x1683e,0x179d8,0x18a4d,0x19992,0x1a789,0x1b445,0x1bf61,0x1c989,
+ 0x1d16d,0x1d77b,0x1dddf,0x1e2ad,0x1e5bf,0x1e6e8,0x1e654,0x1e3cd,
+ 0x1df2a,0x1d635,0x1cb16,0x1be2c,0x1ae4e,0x19bde,0x1868e,0x16e2e,
+ 0x1527f,0x1334a,0x11051,0xe951, 0xbe01, 0x8e0d, 0x5924, 0x1edd,};
+
+ (2) Iterative refinement
+
+ Apply Reciproot iteration three times to y and multiply the
+ result by x to get an approximation z that matches sqrt(x)
+ to about 1 ulp. To be exact, we will have
+ -1ulp < sqrt(x)-z<1.0625ulp.
+
+ ... set rounding mode to Round-to-nearest
+ y := y*(1.5-0.5*x*y*y) ... almost 15 sig. bits to 1/sqrt(x)
+ y := y*((1.5-2^-30)+0.5*x*y*y)... about 29 sig. bits to 1/sqrt(x)
+ ... special arrangement for better accuracy
+ z := x*y ... 29 bits to sqrt(x), with z*y<1
+ z := z + 0.5*z*(1-z*y) ... about 1 ulp to sqrt(x)
+
+ Remark 2. The constant 1.5-2^-30 is chosen to bias the error so that
+ (a) the term z*y in the final iteration is always less than 1;
+ (b) the error in the final result is biased upward so that
+ -1 ulp < sqrt(x) - z < 1.0625 ulp
+ instead of |sqrt(x)-z|<1.03125ulp.
+
+ (3) Final adjustment
+
+ By twiddling y's last bit it is possible to force y to be
+ correctly rounded according to the prevailing rounding mode
+ as follows. Let r and i be copies of the rounding mode and
+ inexact flag before entering the square root program. Also we
+ use the expression y+-ulp for the next representable floating
+ numbers (up and down) of y. Note that y+-ulp = either fixed
+ point y+-1, or multiply y by nextafter(1,+-inf) in chopped
+ mode.
+
+ R := RZ; ... set rounding mode to round-toward-zero
+ switch(r) {
+ case RN: ... round-to-nearest
+ if(x<= z*(z-ulp)...chopped) z = z - ulp; else
+ if(x<= z*(z+ulp)...chopped) z = z; else z = z+ulp;
+ break;
+ case RZ:case RM: ... round-to-zero or round-to--inf
+ R:=RP; ... reset rounding mod to round-to-+inf
+ if(x<z*z ... rounded up) z = z - ulp; else
+ if(x>=(z+ulp)*(z+ulp) ...rounded up) z = z+ulp;
+ break;
+ case RP: ... round-to-+inf
+ if(x>(z+ulp)*(z+ulp)...chopped) z = z+2*ulp; else
+ if(x>z*z ...chopped) z = z+ulp;
+ break;
+ }
+
+ Remark 3. The above comparisons can be done in fixed point. For
+ example, to compare x and w=z*z chopped, it suffices to compare
+ x1 and w1 (the trailing parts of x and w), regarding them as
+ two's complement integers.
+
+ ...Is z an exact square root?
+ To determine whether z is an exact square root of x, let z1 be the
+ trailing part of z, and also let x0 and x1 be the leading and
+ trailing parts of x.
+
+ If ((z1&0x03ffffff)!=0) ... not exact if trailing 26 bits of z!=0
+ I := 1; ... Raise Inexact flag: z is not exact
+ else {
+ j := 1 - [(x0>>20)&1] ... j = logb(x) mod 2
+ k := z1 >> 26; ... get z's 25-th and 26-th
+ fraction bits
+ I := i or (k&j) or ((k&(j+j+1))!=(x1&3));
+ }
+ R:= r ... restore rounded mode
+ return sqrt(x):=z.
+
+ If multiplication is cheaper then the foregoing red tape, the
+ Inexact flag can be evaluated by
+
+ I := i;
+ I := (z*z!=x) or I.
+
+ Note that z*z can overwrite I; this value must be sensed if it is
+ True.
+
+ Remark 4. If z*z = x exactly, then bit 25 to bit 0 of z1 must be
+ zero.
+
+ --------------------
+ z1: | f2 |
+ --------------------
+ bit 31 bit 0
+
+ Further more, bit 27 and 26 of z1, bit 0 and 1 of x1, and the odd
+ or even of logb(x) have the following relations:
+
+ -------------------------------------------------
+ bit 27,26 of z1 bit 1,0 of x1 logb(x)
+ -------------------------------------------------
+ 00 00 odd and even
+ 01 01 even
+ 10 10 odd
+ 10 00 even
+ 11 01 even
+ -------------------------------------------------
+
+ (4) Special cases (see (4) of Section A).
+
+ */
+
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF e_sqrt.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/internal/k_cos.c b/cesar/ecos/packages/language/c/libm/current/src/double/internal/k_cos.c
new file mode 100644
index 0000000000..df609cfe53
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/internal/k_cos.c
@@ -0,0 +1,149 @@
+//===========================================================================
+//
+// k_cos.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)k_cos.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * __kernel_cos( x, y )
+ * kernel cos function on [-pi/4, pi/4], pi/4 ~ 0.785398164
+ * Input x is assumed to be bounded by ~pi/4 in magnitude.
+ * Input y is the tail of x.
+ *
+ * Algorithm
+ * 1. Since cos(-x) = cos(x), we need only to consider positive x.
+ * 2. if x < 2^-27 (hx<0x3e400000 0), return 1 with inexact if x!=0.
+ * 3. cos(x) is approximated by a polynomial of degree 14 on
+ * [0,pi/4]
+ * 4 14
+ * cos(x) ~ 1 - x*x/2 + C1*x + ... + C6*x
+ * where the remez error is
+ *
+ * | 2 4 6 8 10 12 14 | -58
+ * |cos(x)-(1-.5*x +C1*x +C2*x +C3*x +C4*x +C5*x +C6*x )| <= 2
+ * | |
+ *
+ * 4 6 8 10 12 14
+ * 4. let r = C1*x +C2*x +C3*x +C4*x +C5*x +C6*x , then
+ * cos(x) = 1 - x*x/2 + r
+ * since cos(x+y) ~ cos(x) - sin(x)*y
+ * ~ cos(x) - x*y,
+ * a correction term is necessary in cos(x) and hence
+ * cos(x+y) = 1 - (x*x/2 - (r - x*y))
+ * For better accuracy when x > 0.3, let qx = |x|/4 with
+ * the last 32 bits mask off, and if x > 0.78125, let qx = 0.28125.
+ * Then
+ * cos(x+y) = (1-qx) - ((x*x/2-qx) - (r-x*y)).
+ * Note that 1-qx and (x*x/2-qx) is EXACT here, and the
+ * magnitude of the latter is at least a quarter of x*x/2,
+ * thus, reducing the rounding error in the subtraction.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double
+one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
+C1 = 4.16666666666666019037e-02, /* 0x3FA55555, 0x5555554C */
+C2 = -1.38888888888741095749e-03, /* 0xBF56C16C, 0x16C15177 */
+C3 = 2.48015872894767294178e-05, /* 0x3EFA01A0, 0x19CB1590 */
+C4 = -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */
+C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */
+C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */
+
+ double __kernel_cos(double x, double y)
+{
+ double a,hz,z,r,qx;
+ int ix;
+ ix = CYG_LIBM_HI(x)&0x7fffffff; /* ix = |x|'s high word*/
+ if(ix<0x3e400000) { /* if x < 2**27 */
+ if(((int)x)==0) return one; /* generate inexact */
+ }
+ z = x*x;
+ r = z*(C1+z*(C2+z*(C3+z*(C4+z*(C5+z*C6)))));
+ if(ix < 0x3FD33333) /* if |x| < 0.3 */
+ return one - (0.5*z - (z*r - x*y));
+ else {
+ if(ix > 0x3fe90000) { /* x > 0.78125 */
+ qx = 0.28125;
+ } else {
+ CYG_LIBM_HI(qx) = ix-0x00200000; /* x/4 */
+ CYG_LIBM_LO(qx) = 0;
+ }
+ hz = 0.5*z-qx;
+ a = one-qx;
+ return a - (hz - (z*r-x*y));
+ }
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF k_cos.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/internal/k_rem_pio2.c b/cesar/ecos/packages/language/c/libm/current/src/double/internal/k_rem_pio2.c
new file mode 100644
index 0000000000..23cb8de7dd
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/internal/k_rem_pio2.c
@@ -0,0 +1,365 @@
+//===========================================================================
+//
+// k_rem_pio2.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)k_rem_pio2.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * __kernel_rem_pio2(x,y,e0,nx,prec,ipio2)
+ * double x[],y[]; int e0,nx,prec; int ipio2[];
+ *
+ * __kernel_rem_pio2 return the last three digits of N with
+ * y = x - N*pi/2
+ * so that |y| < pi/2.
+ *
+ * The method is to compute the integer (mod 8) and fraction parts of
+ * (2/pi)*x without doing the full multiplication. In general we
+ * skip the part of the product that are known to be a huge integer (
+ * more accurately, = 0 mod 8 ). Thus the number of operations are
+ * independent of the exponent of the input.
+ *
+ * (2/pi) is represented by an array of 24-bit integers in ipio2[].
+ *
+ * Input parameters:
+ * x[] The input value (must be positive) is broken into nx
+ * pieces of 24-bit integers in double precision format.
+ * x[i] will be the i-th 24 bit of x. The scaled exponent
+ * of x[0] is given in input parameter e0 (i.e., x[0]*2^e0
+ * match x's up to 24 bits.
+ *
+ * Example of breaking a double positive z into x[0]+x[1]+x[2]:
+ * e0 = ilogb(z)-23
+ * z = scalbn(z,-e0)
+ * for i = 0,1,2
+ * x[i] = floor(z)
+ * z = (z-x[i])*2**24
+ *
+ *
+ * y[] ouput result in an array of double precision numbers.
+ * The dimension of y[] is:
+ * 24-bit precision 1
+ * 53-bit precision 2
+ * 64-bit precision 2
+ * 113-bit precision 3
+ * The actual value is the sum of them. Thus for 113-bit
+ * precison, one may have to do something like:
+ *
+ * long double t,w,r_head, r_tail;
+ * t = (long double)y[2] + (long double)y[1];
+ * w = (long double)y[0];
+ * r_head = t+w;
+ * r_tail = w - (r_head - t);
+ *
+ * e0 The exponent of x[0]
+ *
+ * nx dimension of x[]
+ *
+ * prec an integer indicating the precision:
+ * 0 24 bits (single)
+ * 1 53 bits (double)
+ * 2 64 bits (extended)
+ * 3 113 bits (quad)
+ *
+ * ipio2[]
+ * integer array, contains the (24*i)-th to (24*i+23)-th
+ * bit of 2/pi after binary point. The corresponding
+ * floating value is
+ *
+ * ipio2[i] * 2^(-24(i+1)).
+ *
+ * External function:
+ * double scalbn(), floor();
+ *
+ *
+ * Here is the description of some local variables:
+ *
+ * jk jk+1 is the initial number of terms of ipio2[] needed
+ * in the computation. The recommended value is 2,3,4,
+ * 6 for single, double, extended,and quad.
+ *
+ * jz local integer variable indicating the number of
+ * terms of ipio2[] used.
+ *
+ * jx nx - 1
+ *
+ * jv index for pointing to the suitable ipio2[] for the
+ * computation. In general, we want
+ * ( 2^e0*x[0] * ipio2[jv-1]*2^(-24jv) )/8
+ * is an integer. Thus
+ * e0-3-24*jv >= 0 or (e0-3)/24 >= jv
+ * Hence jv = max(0,(e0-3)/24).
+ *
+ * jp jp+1 is the number of terms in PIo2[] needed, jp = jk.
+ *
+ * q[] double array with integral value, representing the
+ * 24-bits chunk of the product of x and 2/pi.
+ *
+ * q0 the corresponding exponent of q[0]. Note that the
+ * exponent for q[i] would be q0-24*i.
+ *
+ * PIo2[] double precision array, obtained by cutting pi/2
+ * into 24 bits chunks.
+ *
+ * f[] ipio2[] in floating point
+ *
+ * iq[] integer array by breaking up q[] in 24-bits chunk.
+ *
+ * fq[] final product of x*(2/pi) in fq[0],..,fq[jk]
+ *
+ * ih integer. If >0 it indicates q[] is >= 0.5, hence
+ * it also indicates the *sign* of the result.
+ *
+ */
+
+
+/*
+ * Constants:
+ * The hexadecimal values are the intended ones for the following
+ * constants. The decimal values may be used, provided that the
+ * compiler will convert from decimal to binary accurately enough
+ * to produce the hexadecimal values shown.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const int init_jk[] = {2,3,4,6}; /* initial value for jk */
+
+static const double PIo2[] = {
+ 1.57079625129699707031e+00, /* 0x3FF921FB, 0x40000000 */
+ 7.54978941586159635335e-08, /* 0x3E74442D, 0x00000000 */
+ 5.39030252995776476554e-15, /* 0x3CF84698, 0x80000000 */
+ 3.28200341580791294123e-22, /* 0x3B78CC51, 0x60000000 */
+ 1.27065575308067607349e-29, /* 0x39F01B83, 0x80000000 */
+ 1.22933308981111328932e-36, /* 0x387A2520, 0x40000000 */
+ 2.73370053816464559624e-44, /* 0x36E38222, 0x80000000 */
+ 2.16741683877804819444e-51, /* 0x3569F31D, 0x00000000 */
+};
+
+static const double
+zero = 0.0,
+one = 1.0,
+two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
+twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
+
+ int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int *ipio2)
+{
+ int jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
+ double z,fw,f[20],fq[20],q[20];
+
+ /* initialize jk*/
+ jk = init_jk[prec];
+ jp = jk;
+
+ /* determine jx,jv,q0, note that 3>q0 */
+ jx = nx-1;
+ jv = (e0-3)/24; if(jv<0) jv=0;
+ q0 = e0-24*(jv+1);
+
+ /* set up f[0] to f[jx+jk] where f[jx+jk] = ipio2[jv+jk] */
+ j = jv-jx; m = jx+jk;
+ for(i=0;i<=m;i++,j++) f[i] = (j<0)? zero : (double) ipio2[j];
+
+ /* compute q[0],q[1],...q[jk] */
+ for (i=0;i<=jk;i++) {
+ for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw;
+ }
+
+ jz = jk;
+recompute:
+ /* distill q[] into iq[] reversingly */
+ for(i=0,j=jz,z=q[jz];j>0;i++,j--) {
+ fw = (double)((int)(twon24* z));
+ iq[i] = (int)(z-two24*fw);
+ z = q[j-1]+fw;
+ }
+
+ /* compute n */
+ z = scalbn(z,q0); /* actual value of z */
+ z -= 8.0*floor(z*0.125); /* trim off integer >= 8 */
+ n = (int) z;
+ z -= (double)n;
+ ih = 0;
+ if(q0>0) { /* need iq[jz-1] to determine n */
+ i = (iq[jz-1]>>(24-q0)); n += i;
+ iq[jz-1] -= i<<(24-q0);
+ ih = iq[jz-1]>>(23-q0);
+ }
+ else if(q0==0) ih = iq[jz-1]>>23;
+ else if(z>=0.5) ih=2;
+
+ if(ih>0) { /* q > 0.5 */
+ n += 1; carry = 0;
+ for(i=0;i<jz ;i++) { /* compute 1-q */
+ j = iq[i];
+ if(carry==0) {
+ if(j!=0) {
+ carry = 1; iq[i] = 0x1000000- j;
+ }
+ } else iq[i] = 0xffffff - j;
+ }
+ if(q0>0) { /* rare case: chance is 1 in 12 */
+ switch(q0) {
+ case 1:
+ iq[jz-1] &= 0x7fffff; break;
+ case 2:
+ iq[jz-1] &= 0x3fffff; break;
+ }
+ }
+ if(ih==2) {
+ z = one - z;
+ if(carry!=0) z -= scalbn(one,q0);
+ }
+ }
+
+ /* check if recomputation is needed */
+ if(z==zero) {
+ j = 0;
+ for (i=jz-1;i>=jk;i--) j |= iq[i];
+ if(j==0) { /* need recomputation */
+ for(k=1;iq[jk-k]==0;k++); /* k = no. of terms needed */
+
+ for(i=jz+1;i<=jz+k;i++) { /* add q[jz+1] to q[jz+k] */
+ f[jx+i] = (double) ipio2[jv+i];
+ for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j];
+ q[i] = fw;
+ }
+ jz += k;
+ goto recompute;
+ }
+ }
+
+ /* chop off zero terms */
+ if(z==0.0) {
+ jz -= 1; q0 -= 24;
+ while(iq[jz]==0) { jz--; q0-=24;}
+ } else { /* break z into 24-bit if necessary */
+ z = scalbn(z,-q0);
+ if(z>=two24) {
+ fw = (double)((int)(twon24*z));
+ iq[jz] = (int)(z-two24*fw);
+ jz += 1; q0 += 24;
+ iq[jz] = (int) fw;
+ } else iq[jz] = (int) z ;
+ }
+
+ /* convert integer "bit" chunk to floating-point value */
+ fw = scalbn(one,q0);
+ for(i=jz;i>=0;i--) {
+ q[i] = fw*(double)iq[i]; fw*=twon24;
+ }
+
+ /* compute PIo2[0,...,jp]*q[jz,...,0] */
+ for(i=jz;i>=0;i--) {
+ for(fw=0.0,k=0;k<=jp&&k<=jz-i;k++) fw += PIo2[k]*q[i+k];
+ fq[jz-i] = fw;
+ }
+
+ /* compress fq[] into y[] */
+ switch(prec) {
+ case 0:
+ fw = 0.0;
+ for (i=jz;i>=0;i--) fw += fq[i];
+ y[0] = (ih==0)? fw: -fw;
+ break;
+ case 1:
+ case 2:
+ fw = 0.0;
+ for (i=jz;i>=0;i--) fw += fq[i];
+ y[0] = (ih==0)? fw: -fw;
+ fw = fq[0]-fw;
+ for (i=1;i<=jz;i++) fw += fq[i];
+ y[1] = (ih==0)? fw: -fw;
+ break;
+ case 3: /* painful */
+ for (i=jz;i>0;i--) {
+ fw = fq[i-1]+fq[i];
+ fq[i] += fq[i-1]-fw;
+ fq[i-1] = fw;
+ }
+ for (i=jz;i>1;i--) {
+ fw = fq[i-1]+fq[i];
+ fq[i] += fq[i-1]-fw;
+ fq[i-1] = fw;
+ }
+ for (fw=0.0,i=jz;i>=2;i--) fw += fq[i];
+ if(ih==0) {
+ y[0] = fq[0]; y[1] = fq[1]; y[2] = fw;
+ } else {
+ y[0] = -fq[0]; y[1] = -fq[1]; y[2] = -fw;
+ }
+ }
+ return n&7;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF k_rem_pio2.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/internal/k_sin.c b/cesar/ecos/packages/language/c/libm/current/src/double/internal/k_sin.c
new file mode 100644
index 0000000000..d677bd3b71
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/internal/k_sin.c
@@ -0,0 +1,131 @@
+//===========================================================================
+//
+// k_sin.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)k_sin.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __kernel_sin( x, y, iy)
+ * kernel sin function on [-pi/4, pi/4], pi/4 ~ 0.7854
+ * Input x is assumed to be bounded by ~pi/4 in magnitude.
+ * Input y is the tail of x.
+ * Input iy indicates whether y is 0. (if iy=0, y assume to be 0).
+ *
+ * Algorithm
+ * 1. Since sin(-x) = -sin(x), we need only to consider positive x.
+ * 2. if x < 2^-27 (hx<0x3e400000 0), return x with inexact if x!=0.
+ * 3. sin(x) is approximated by a polynomial of degree 13 on
+ * [0,pi/4]
+ * 3 13
+ * sin(x) ~ x + S1*x + ... + S6*x
+ * where
+ *
+ * |sin(x) 2 4 6 8 10 12 | -58
+ * |----- - (1+S1*x +S2*x +S3*x +S4*x +S5*x +S6*x )| <= 2
+ * | x |
+ *
+ * 4. sin(x+y) = sin(x) + sin'(x')*y
+ * ~ sin(x) + (1-x*x/2)*y
+ * For better accuracy, let
+ * 3 2 2 2 2
+ * r = x *(S2+x *(S3+x *(S4+x *(S5+x *S6))))
+ * then 3 2
+ * sin(x) = x + (S1*x + (x *(r-y/2)+y))
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double
+half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */
+S1 = -1.66666666666666324348e-01, /* 0xBFC55555, 0x55555549 */
+S2 = 8.33333333332248946124e-03, /* 0x3F811111, 0x1110F8A6 */
+S3 = -1.98412698298579493134e-04, /* 0xBF2A01A0, 0x19C161D5 */
+S4 = 2.75573137070700676789e-06, /* 0x3EC71DE3, 0x57B1FE7D */
+S5 = -2.50507602534068634195e-08, /* 0xBE5AE5E6, 0x8A2B9CEB */
+S6 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */
+
+ double __kernel_sin(double x, double y, int iy)
+{
+ double z,r,v;
+ int ix;
+ ix = CYG_LIBM_HI(x)&0x7fffffff; /* high word of x */
+ if(ix<0x3e400000) /* |x| < 2**-27 */
+ {if((int)x==0) return x;} /* generate inexact */
+ z = x*x;
+ v = z*x;
+ r = S2+z*(S3+z*(S4+z*(S5+z*S6)));
+ if(iy==0) return x+v*(S1+z*r);
+ else return x-((z*(half*y-v*r)-y)-v*S1);
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF k_sin.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/internal/k_tan.c b/cesar/ecos/packages/language/c/libm/current/src/double/internal/k_tan.c
new file mode 100644
index 0000000000..7719f6670a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/internal/k_tan.c
@@ -0,0 +1,182 @@
+//===========================================================================
+//
+// k_tan.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)k_tan.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __kernel_tan( x, y, k )
+ * kernel tan function on [-pi/4, pi/4], pi/4 ~ 0.7854
+ * Input x is assumed to be bounded by ~pi/4 in magnitude.
+ * Input y is the tail of x.
+ * Input k indicates whether tan (if k=1) or
+ * -1/tan (if k= -1) is returned.
+ *
+ * Algorithm
+ * 1. Since tan(-x) = -tan(x), we need only to consider positive x.
+ * 2. if x < 2^-28 (hx<0x3e300000 0), return x with inexact if x!=0.
+ * 3. tan(x) is approximated by a odd polynomial of degree 27 on
+ * [0,0.67434]
+ * 3 27
+ * tan(x) ~ x + T1*x + ... + T13*x
+ * where
+ *
+ * |tan(x) 2 4 26 | -59.2
+ * |----- - (1+T1*x +T2*x +.... +T13*x )| <= 2
+ * | x |
+ *
+ * Note: tan(x+y) = tan(x) + tan'(x)*y
+ * ~ tan(x) + (1+x*x)*y
+ * Therefore, for better accuracy in computing tan(x+y), let
+ * 3 2 2 2 2
+ * r = x *(T2+x *(T3+x *(...+x *(T12+x *T13))))
+ * then
+ * 3 2
+ * tan(x+y) = x + (T1*x + (x *(r+y)+y))
+ *
+ * 4. For x in [0.67434,pi/4], let y = pi/4 - x, then
+ * tan(x) = tan(pi/4-y) = (1-tan(y))/(1+tan(y))
+ * = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y)))
+ */
+
+#include "mathincl/fdlibm.h"
+static const double
+one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
+pio4 = 7.85398163397448278999e-01, /* 0x3FE921FB, 0x54442D18 */
+pio4lo= 3.06161699786838301793e-17, /* 0x3C81A626, 0x33145C07 */
+T[] = {
+ 3.33333333333334091986e-01, /* 0x3FD55555, 0x55555563 */
+ 1.33333333333201242699e-01, /* 0x3FC11111, 0x1110FE7A */
+ 5.39682539762260521377e-02, /* 0x3FABA1BA, 0x1BB341FE */
+ 2.18694882948595424599e-02, /* 0x3F9664F4, 0x8406D637 */
+ 8.86323982359930005737e-03, /* 0x3F8226E3, 0xE96E8493 */
+ 3.59207910759131235356e-03, /* 0x3F6D6D22, 0xC9560328 */
+ 1.45620945432529025516e-03, /* 0x3F57DBC8, 0xFEE08315 */
+ 5.88041240820264096874e-04, /* 0x3F4344D8, 0xF2F26501 */
+ 2.46463134818469906812e-04, /* 0x3F3026F7, 0x1A8D1068 */
+ 7.81794442939557092300e-05, /* 0x3F147E88, 0xA03792A6 */
+ 7.14072491382608190305e-05, /* 0x3F12B80F, 0x32F0A7E9 */
+ -1.85586374855275456654e-05, /* 0xBEF375CB, 0xDB605373 */
+ 2.59073051863633712884e-05, /* 0x3EFB2A70, 0x74BF7AD4 */
+};
+
+ double __kernel_tan(double x, double y, int iy)
+{
+ double z,r,v,w,s;
+ int ix,hx;
+ hx = CYG_LIBM_HI(x); /* high word of x */
+ ix = hx&0x7fffffff; /* high word of |x| */
+ if(ix<0x3e300000) /* x < 2**-28 */
+ {if((int)x==0) { /* generate inexact */
+ if(((ix|CYG_LIBM_LO(x))|(iy+1))==0) return one/fabs(x);
+ else return (iy==1)? x: -one/x;
+ }
+ }
+ if(ix>=0x3FE59428) { /* |x|>=0.6744 */
+ if(hx<0) {x = -x; y = -y;}
+ z = pio4-x;
+ w = pio4lo-y;
+ x = z+w; y = 0.0;
+ }
+ z = x*x;
+ w = z*z;
+ /* Break x^5*(T[1]+x^2*T[2]+...) into
+ * x^5(T[1]+x^4*T[3]+...+x^20*T[11]) +
+ * x^5(x^2*(T[2]+x^4*T[4]+...+x^22*[T12]))
+ */
+ r = T[1]+w*(T[3]+w*(T[5]+w*(T[7]+w*(T[9]+w*T[11]))));
+ v = z*(T[2]+w*(T[4]+w*(T[6]+w*(T[8]+w*(T[10]+w*T[12])))));
+ s = z*x;
+ r = y + z*(s*(r+v)+y);
+ r += T[0]*s;
+ w = x+r;
+ if(ix>=0x3FE59428) {
+ v = (double)iy;
+ return (double)(1-((hx>>30)&2))*(v-2.0*(x-(w*w/(w+v)-r)));
+ }
+ if(iy==1) return w;
+ else { /* if allow error up to 2 ulp,
+ simply return -1.0/(x+r) here */
+ /* compute -1.0/(x+r) accurately */
+ double a,t;
+ z = w;
+ CYG_LIBM_LO(z) = 0;
+ v = r-(z - x); /* z+v = r+x */
+ t = a = -1.0/w; /* a = -1.0/w */
+ CYG_LIBM_LO(t) = 0;
+ s = 1.0+t*z;
+ return t+a*(s+t*v);
+ }
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF k_tan.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_asinh.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_asinh.c
new file mode 100644
index 0000000000..5f703f1a4f
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_asinh.c
@@ -0,0 +1,118 @@
+//===========================================================================
+//
+// s_asinh.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_asinh.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* asinh(x)
+ * Method :
+ * Based on
+ * asinh(x) = sign(x) * log [ |x| + sqrt(x*x+1) ]
+ * we have
+ * asinh(x) := x if 1+x*x=1,
+ * := sign(x)*(log(x)+ln2)) for large |x|, else
+ * := sign(x)*log(2|x|+1/(|x|+sqrt(x*x+1))) if|x|>2, else
+ * := sign(x)*log1p(|x| + x^2/(1 + sqrt(1+x^2)))
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double
+one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
+ln2 = 6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */
+huge= 1.00000000000000000000e+300;
+
+ double asinh(double x)
+{
+ double t,w;
+ int hx,ix;
+ hx = CYG_LIBM_HI(x);
+ ix = hx&0x7fffffff;
+ if(ix>=0x7ff00000) return x+x; /* x is inf or NaN */
+ if(ix< 0x3e300000) { /* |x|<2**-28 */
+ if(huge+x>one) return x; /* return x inexact except 0 */
+ }
+ if(ix>0x41b00000) { /* |x| > 2**28 */
+ w = __ieee754_log(fabs(x))+ln2;
+ } else if (ix>0x40000000) { /* 2**28 > |x| > 2.0 */
+ t = fabs(x);
+ w = __ieee754_log(2.0*t+one/(sqrt(x*x+one)+t));
+ } else { /* 2.0 > |x| > 2**-28 */
+ t = x*x;
+ w =log1p(fabs(x)+t/(one+sqrt(one+t)));
+ }
+ if(hx>0) return w; else return -w;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_asinh.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_atan.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_atan.c
new file mode 100644
index 0000000000..191b3639a3
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_atan.c
@@ -0,0 +1,179 @@
+//===========================================================================
+//
+// s_atan.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_atan.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ *
+ */
+
+/* atan(x)
+ * Method
+ * 1. Reduce x to positive by atan(x) = -atan(-x).
+ * 2. According to the integer k=4t+0.25 chopped, t=x, the argument
+ * is further reduced to one of the following intervals and the
+ * arctangent of t is evaluated by the corresponding formula:
+ *
+ * [0,7/16] atan(x) = t-t^3*(a1+t^2*(a2+...(a10+t^2*a11)...)
+ * [7/16,11/16] atan(x) = atan(1/2) + atan( (t-0.5)/(1+t/2) )
+ * [11/16.19/16] atan(x) = atan( 1 ) + atan( (t-1)/(1+t) )
+ * [19/16,39/16] atan(x) = atan(3/2) + atan( (t-1.5)/(1+1.5t) )
+ * [39/16,INF] atan(x) = atan(INF) + atan( -1/t )
+ *
+ * Constants:
+ * The hexadecimal values are the intended ones for the following
+ * constants. The decimal values may be used, provided that the
+ * compiler will convert from decimal to binary accurately enough
+ * to produce the hexadecimal values shown.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double atanhi[] = {
+ 4.63647609000806093515e-01, /* atan(0.5)hi 0x3FDDAC67, 0x0561BB4F */
+ 7.85398163397448278999e-01, /* atan(1.0)hi 0x3FE921FB, 0x54442D18 */
+ 9.82793723247329054082e-01, /* atan(1.5)hi 0x3FEF730B, 0xD281F69B */
+ 1.57079632679489655800e+00, /* atan(inf)hi 0x3FF921FB, 0x54442D18 */
+};
+
+static const double atanlo[] = {
+ 2.26987774529616870924e-17, /* atan(0.5)lo 0x3C7A2B7F, 0x222F65E2 */
+ 3.06161699786838301793e-17, /* atan(1.0)lo 0x3C81A626, 0x33145C07 */
+ 1.39033110312309984516e-17, /* atan(1.5)lo 0x3C700788, 0x7AF0CBBD */
+ 6.12323399573676603587e-17, /* atan(inf)lo 0x3C91A626, 0x33145C07 */
+};
+
+static const double aT[] = {
+ 3.33333333333329318027e-01, /* 0x3FD55555, 0x5555550D */
+ -1.99999999998764832476e-01, /* 0xBFC99999, 0x9998EBC4 */
+ 1.42857142725034663711e-01, /* 0x3FC24924, 0x920083FF */
+ -1.11111104054623557880e-01, /* 0xBFBC71C6, 0xFE231671 */
+ 9.09088713343650656196e-02, /* 0x3FB745CD, 0xC54C206E */
+ -7.69187620504482999495e-02, /* 0xBFB3B0F2, 0xAF749A6D */
+ 6.66107313738753120669e-02, /* 0x3FB10D66, 0xA0D03D51 */
+ -5.83357013379057348645e-02, /* 0xBFADDE2D, 0x52DEFD9A */
+ 4.97687799461593236017e-02, /* 0x3FA97B4B, 0x24760DEB */
+ -3.65315727442169155270e-02, /* 0xBFA2B444, 0x2C6A6C2F */
+ 1.62858201153657823623e-02, /* 0x3F90AD3A, 0xE322DA11 */
+};
+
+ static const double
+one = 1.0,
+huge = 1.0e300;
+
+ double atan(double x)
+{
+ double w,s1,s2,z;
+ int ix,hx,id;
+
+ hx = CYG_LIBM_HI(x);
+ ix = hx&0x7fffffff;
+ if(ix>=0x44100000) { /* if |x| >= 2^66 */
+ if(ix>0x7ff00000||
+ (ix==0x7ff00000&&(CYG_LIBM_LO(x)!=0)))
+ return x+x; /* NaN */
+ if(hx>0) return atanhi[3]+atanlo[3];
+ else return -atanhi[3]-atanlo[3];
+ } if (ix < 0x3fdc0000) { /* |x| < 0.4375 */
+ if (ix < 0x3e200000) { /* |x| < 2^-29 */
+ if(huge+x>one) return x; /* raise inexact */
+ }
+ id = -1;
+ } else {
+ x = fabs(x);
+ if (ix < 0x3ff30000) { /* |x| < 1.1875 */
+ if (ix < 0x3fe60000) { /* 7/16 <=|x|<11/16 */
+ id = 0; x = (2.0*x-one)/(2.0+x);
+ } else { /* 11/16<=|x|< 19/16 */
+ id = 1; x = (x-one)/(x+one);
+ }
+ } else {
+ if (ix < 0x40038000) { /* |x| < 2.4375 */
+ id = 2; x = (x-1.5)/(one+1.5*x);
+ } else { /* 2.4375 <= |x| < 2^66 */
+ id = 3; x = -1.0/x;
+ }
+ }}
+ /* end of argument reduction */
+ z = x*x;
+ w = z*z;
+ /* break sum from i=0 to 10 aT[i]z**(i+1) into odd and even poly */
+ s1 = z*(aT[0]+w*(aT[2]+w*(aT[4]+w*(aT[6]+w*(aT[8]+w*aT[10])))));
+ s2 = w*(aT[1]+w*(aT[3]+w*(aT[5]+w*(aT[7]+w*aT[9]))));
+ if (id<0) return x - x*(s1+s2);
+ else {
+ z = atanhi[id] - ((x*(s1+s2) - atanlo[id]) - x);
+ return (hx<0)? -z:z;
+ }
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_atan.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_cbrt.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_cbrt.c
new file mode 100644
index 0000000000..620917786d
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_cbrt.c
@@ -0,0 +1,140 @@
+//===========================================================================
+//
+// s_cbrt.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_cbrt.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ *
+ */
+
+#include "mathincl/fdlibm.h"
+
+/* cbrt(x)
+ * Return cube root of x
+ */
+static const unsigned
+ B1 = 715094163, /* B1 = (682-0.03306235651)*2**20 */
+ B2 = 696219795; /* B2 = (664-0.03306235651)*2**20 */
+
+static const double
+C = 5.42857142857142815906e-01, /* 19/35 = 0x3FE15F15, 0xF15F15F1 */
+D = -7.05306122448979611050e-01, /* -864/1225 = 0xBFE691DE, 0x2532C834 */
+E = 1.41428571428571436819e+00, /* 99/70 = 0x3FF6A0EA, 0x0EA0EA0F */
+F = 1.60714285714285720630e+00, /* 45/28 = 0x3FF9B6DB, 0x6DB6DB6E */
+G = 3.57142857142857150787e-01; /* 5/14 = 0x3FD6DB6D, 0xB6DB6DB7 */
+
+ double cbrt(double x)
+{
+ int hx;
+ double r,s,t=0.0,w;
+ unsigned sign;
+
+
+ hx = CYG_LIBM_HI(x); /* high word of x */
+ sign=hx&0x80000000; /* sign= sign(x) */
+ hx ^=sign;
+ if(hx>=0x7ff00000) return(x+x); /* cbrt(NaN,INF) is itself */
+ if((hx|CYG_LIBM_LO(x))==0)
+ return(x); /* cbrt(0) is itself */
+
+ CYG_LIBM_HI(x) = hx; /* x <- |x| */
+ /* rough cbrt to 5 bits */
+ if(hx<0x00100000) /* subnormal number */
+ {CYG_LIBM_HI(t)=0x43500000; /* set t= 2**54 */
+ t*=x; CYG_LIBM_HI(t)=CYG_LIBM_HI(t)/3+B2;
+ }
+ else
+ CYG_LIBM_HI(t)=hx/3+B1;
+
+
+ /* new cbrt to 23 bits, may be implemented in single precision */
+ r=t*t/x;
+ s=C+r*t;
+ t*=G+F/(s+E+D/s);
+
+ /* chopped to 20 bits and make it larger than cbrt(x) */
+ CYG_LIBM_LO(t)=0; CYG_LIBM_HI(t)+=0x00000001;
+
+
+ /* one step newton iteration to 53 bits with error less than 0.667 ulps */
+ s=t*t; /* t*t is exact */
+ r=x/s;
+ w=t+t;
+ r=(r-t)/(w+r); /* r-s is exact */
+ t=t+t*r;
+
+ /* retore the sign bit */
+ CYG_LIBM_HI(t) |= sign;
+ return(t);
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_cbrt.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_ceil.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_ceil.c
new file mode 100644
index 0000000000..4cd48519bb
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_ceil.c
@@ -0,0 +1,135 @@
+//===========================================================================
+//
+// s_ceil.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_ceil.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * ceil(x)
+ * Return x rounded toward +inf to integral value
+ * Method:
+ * Bit twiddling.
+ * Exception:
+ * Inexact flag raised if x not equal to ceil(x).
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double huge = 1.0e300;
+
+ double ceil(double x)
+{
+ int i0,i1,j0;
+ unsigned i,j;
+ i0 = CYG_LIBM_HI(x);
+ i1 = CYG_LIBM_LO(x);
+ j0 = ((i0>>20)&0x7ff)-0x3ff;
+ if(j0<20) {
+ if(j0<0) { /* raise inexact if x != 0 */
+ if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
+ if(i0<0) {i0=0x80000000;i1=0;}
+ else if((i0|i1)!=0) { i0=0x3ff00000;i1=0;}
+ }
+ } else {
+ i = (0x000fffff)>>j0;
+ if(((i0&i)|i1)==0) return x; /* x is integral */
+ if(huge+x>0.0) { /* raise inexact flag */
+ if(i0>0) i0 += (0x00100000)>>j0;
+ i0 &= (~i); i1=0;
+ }
+ }
+ } else if (j0>51) {
+ if(j0==0x400) return x+x; /* inf or NaN */
+ else return x; /* x is integral */
+ } else {
+ i = ((unsigned)(0xffffffff))>>(j0-20);
+ if((i1&i)==0) return x; /* x is integral */
+ if(huge+x>0.0) { /* raise inexact flag */
+ if(i0>0) {
+ if(j0==20) i0+=1;
+ else {
+ j = i1 + (1<<(52-j0));
+ if(j<(unsigned)i1) i0+=1; /* got a carry */
+ i1 = j;
+ }
+ }
+ i1 &= (~i);
+ }
+ }
+ CYG_LIBM_HI(x) = i0;
+ CYG_LIBM_LO(x) = i1;
+ return x;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_ceil.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_copysign.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_copysign.c
new file mode 100644
index 0000000000..306d1bc83c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_copysign.c
@@ -0,0 +1,92 @@
+//===========================================================================
+//
+// s_copysign.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_copysign.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * copysign(double x, double y)
+ * copysign(x,y) returns a value with the magnitude of x and
+ * with the sign bit of y.
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double copysign(double x, double y)
+{
+ CYG_LIBM_HI(x) = (CYG_LIBM_HI(x)&0x7fffffff)|(CYG_LIBM_HI(y)&0x80000000);
+ return x;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_copysign.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_cos.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_cos.c
new file mode 100644
index 0000000000..d51d8ce9fe
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_cos.c
@@ -0,0 +1,139 @@
+//===========================================================================
+//
+// s_cos.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_cos.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* cos(x)
+ * Return cosine function of x.
+ *
+ * kernel function:
+ * __kernel_sin ... sine function on [-pi/4,pi/4]
+ * __kernel_cos ... cosine function on [-pi/4,pi/4]
+ * __ieee754_rem_pio2 ... argument reduction routine
+ *
+ * Method.
+ * Let S,C and T denote the sin, cos and tan respectively on
+ * [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2
+ * in [-pi/4 , +pi/4], and let n = k mod 4.
+ * We have
+ *
+ * n sin(x) cos(x) tan(x)
+ * ----------------------------------------------------------
+ * 0 S C T
+ * 1 C -S -1/T
+ * 2 -S -C T
+ * 3 -C S -1/T
+ * ----------------------------------------------------------
+ *
+ * Special cases:
+ * Let trig be any of sin, cos, or tan.
+ * trig(+-INF) is NaN, with signals;
+ * trig(NaN) is that NaN;
+ *
+ * Accuracy:
+ * TRIG(x) returns trig(x) nearly rounded
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double cos(double x)
+{
+ double y[2],z=0.0;
+ int n, ix;
+
+ /* High word of x. */
+ ix = CYG_LIBM_HI(x);
+
+ /* |x| ~< pi/4 */
+ ix &= 0x7fffffff;
+ if(ix <= 0x3fe921fb) return __kernel_cos(x,z);
+
+ /* cos(Inf or NaN) is NaN */
+ else if (ix>=0x7ff00000) return x-x;
+
+ /* argument reduction needed */
+ else {
+ n = __ieee754_rem_pio2(x,y);
+ switch(n&3) {
+ case 0: return __kernel_cos(y[0],y[1]);
+ case 1: return -__kernel_sin(y[0],y[1],1);
+ case 2: return -__kernel_cos(y[0],y[1]);
+ default:
+ return __kernel_sin(y[0],y[1],1);
+ }
+ }
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_cos.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_erf.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_erf.c
new file mode 100644
index 0000000000..30a451f63a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_erf.c
@@ -0,0 +1,362 @@
+//===========================================================================
+//
+// s_erf.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_erf.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* double erf(double x)
+ * double erfc(double x)
+ * x
+ * 2 |\
+ * erf(x) = --------- | exp(-t*t)dt
+ * sqrt(pi) \|
+ * 0
+ *
+ * erfc(x) = 1-erf(x)
+ * Note that
+ * erf(-x) = -erf(x)
+ * erfc(-x) = 2 - erfc(x)
+ *
+ * Method:
+ * 1. For |x| in [0, 0.84375]
+ * erf(x) = x + x*R(x^2)
+ * erfc(x) = 1 - erf(x) if x in [-.84375,0.25]
+ * = 0.5 + ((0.5-x)-x*R) if x in [0.25,0.84375]
+ * where R = P/Q where P is an odd poly of degree 8 and
+ * Q is an odd poly of degree 10.
+ * -57.90
+ * | R - (erf(x)-x)/x | <= 2
+ *
+ *
+ * Remark. The formula is derived by noting
+ * erf(x) = (2/sqrt(pi))*(x - x^3/3 + x^5/10 - x^7/42 + ....)
+ * and that
+ * 2/sqrt(pi) = 1.128379167095512573896158903121545171688
+ * is close to one. The interval is chosen because the fix
+ * point of erf(x) is near 0.6174 (i.e., erf(x)=x when x is
+ * near 0.6174), and by some experiment, 0.84375 is chosen to
+ * guarantee the error is less than one ulp for erf.
+ *
+ * 2. For |x| in [0.84375,1.25], let s = |x| - 1, and
+ * c = 0.84506291151 rounded to single (24 bits)
+ * erf(x) = sign(x) * (c + P1(s)/Q1(s))
+ * erfc(x) = (1-c) - P1(s)/Q1(s) if x > 0
+ * 1+(c+P1(s)/Q1(s)) if x < 0
+ * |P1/Q1 - (erf(|x|)-c)| <= 2**-59.06
+ * Remark: here we use the taylor series expansion at x=1.
+ * erf(1+s) = erf(1) + s*Poly(s)
+ * = 0.845.. + P1(s)/Q1(s)
+ * That is, we use rational approximation to approximate
+ * erf(1+s) - (c = (single)0.84506291151)
+ * Note that |P1/Q1|< 0.078 for x in [0.84375,1.25]
+ * where
+ * P1(s) = degree 6 poly in s
+ * Q1(s) = degree 6 poly in s
+ *
+ * 3. For x in [1.25,1/0.35(~2.857143)],
+ * erfc(x) = (1/x)*exp(-x*x-0.5625+R1/S1)
+ * erf(x) = 1 - erfc(x)
+ * where
+ * R1(z) = degree 7 poly in z, (z=1/x^2)
+ * S1(z) = degree 8 poly in z
+ *
+ * 4. For x in [1/0.35,28]
+ * erfc(x) = (1/x)*exp(-x*x-0.5625+R2/S2) if x > 0
+ * = 2.0 - (1/x)*exp(-x*x-0.5625+R2/S2) if -6<x<0
+ * = 2.0 - tiny (if x <= -6)
+ * erf(x) = sign(x)*(1.0 - erfc(x)) if x < 6, else
+ * erf(x) = sign(x)*(1.0 - tiny)
+ * where
+ * R2(z) = degree 6 poly in z, (z=1/x^2)
+ * S2(z) = degree 7 poly in z
+ *
+ * Note1:
+ * To compute exp(-x*x-0.5625+R/S), let s be a single
+ * precision number and s := x; then
+ * -x*x = -s*s + (s-x)*(s+x)
+ * exp(-x*x-0.5626+R/S) =
+ * exp(-s*s-0.5625)*exp((s-x)*(s+x)+R/S);
+ * Note2:
+ * Here 4 and 5 make use of the asymptotic series
+ * exp(-x*x)
+ * erfc(x) ~ ---------- * ( 1 + Poly(1/x^2) )
+ * x*sqrt(pi)
+ * We use rational approximation to approximate
+ * g(s)=f(1/x^2) = log(erfc(x)*x) - x*x + 0.5625
+ * Here is the error bound for R1/S1 and R2/S2
+ * |R1/S1 - f(x)| < 2**(-62.57)
+ * |R2/S2 - f(x)| < 2**(-61.52)
+ *
+ * 5. For inf > x >= 28
+ * erf(x) = sign(x) *(1 - tiny) (raise inexact)
+ * erfc(x) = tiny*tiny (raise underflow) if x > 0
+ * = 2 - tiny if x<0
+ *
+ * 7. Special case:
+ * erf(0) = 0, erf(inf) = 1, erf(-inf) = -1,
+ * erfc(0) = 1, erfc(inf) = 0, erfc(-inf) = 2,
+ * erfc/erf(NaN) is NaN
+ */
+
+
+#include "mathincl/fdlibm.h"
+
+static const double
+tiny = 1e-300,
+half= 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */
+one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
+two = 2.00000000000000000000e+00, /* 0x40000000, 0x00000000 */
+ /* c = (float)0.84506291151 */
+erx = 8.45062911510467529297e-01, /* 0x3FEB0AC1, 0x60000000 */
+/*
+ * Coefficients for approximation to erf on [0,0.84375]
+ */
+efx = 1.28379167095512586316e-01, /* 0x3FC06EBA, 0x8214DB69 */
+efx8= 1.02703333676410069053e+00, /* 0x3FF06EBA, 0x8214DB69 */
+pp0 = 1.28379167095512558561e-01, /* 0x3FC06EBA, 0x8214DB68 */
+pp1 = -3.25042107247001499370e-01, /* 0xBFD4CD7D, 0x691CB913 */
+pp2 = -2.84817495755985104766e-02, /* 0xBF9D2A51, 0xDBD7194F */
+pp3 = -5.77027029648944159157e-03, /* 0xBF77A291, 0x236668E4 */
+pp4 = -2.37630166566501626084e-05, /* 0xBEF8EAD6, 0x120016AC */
+qq1 = 3.97917223959155352819e-01, /* 0x3FD97779, 0xCDDADC09 */
+qq2 = 6.50222499887672944485e-02, /* 0x3FB0A54C, 0x5536CEBA */
+qq3 = 5.08130628187576562776e-03, /* 0x3F74D022, 0xC4D36B0F */
+qq4 = 1.32494738004321644526e-04, /* 0x3F215DC9, 0x221C1A10 */
+qq5 = -3.96022827877536812320e-06, /* 0xBED09C43, 0x42A26120 */
+/*
+ * Coefficients for approximation to erf in [0.84375,1.25]
+ */
+pa0 = -2.36211856075265944077e-03, /* 0xBF6359B8, 0xBEF77538 */
+pa1 = 4.14856118683748331666e-01, /* 0x3FDA8D00, 0xAD92B34D */
+pa2 = -3.72207876035701323847e-01, /* 0xBFD7D240, 0xFBB8C3F1 */
+pa3 = 3.18346619901161753674e-01, /* 0x3FD45FCA, 0x805120E4 */
+pa4 = -1.10894694282396677476e-01, /* 0xBFBC6398, 0x3D3E28EC */
+pa5 = 3.54783043256182359371e-02, /* 0x3FA22A36, 0x599795EB */
+pa6 = -2.16637559486879084300e-03, /* 0xBF61BF38, 0x0A96073F */
+qa1 = 1.06420880400844228286e-01, /* 0x3FBB3E66, 0x18EEE323 */
+qa2 = 5.40397917702171048937e-01, /* 0x3FE14AF0, 0x92EB6F33 */
+qa3 = 7.18286544141962662868e-02, /* 0x3FB2635C, 0xD99FE9A7 */
+qa4 = 1.26171219808761642112e-01, /* 0x3FC02660, 0xE763351F */
+qa5 = 1.36370839120290507362e-02, /* 0x3F8BEDC2, 0x6B51DD1C */
+qa6 = 1.19844998467991074170e-02, /* 0x3F888B54, 0x5735151D */
+/*
+ * Coefficients for approximation to erfc in [1.25,1/0.35]
+ */
+ra0 = -9.86494403484714822705e-03, /* 0xBF843412, 0x600D6435 */
+ra1 = -6.93858572707181764372e-01, /* 0xBFE63416, 0xE4BA7360 */
+ra2 = -1.05586262253232909814e+01, /* 0xC0251E04, 0x41B0E726 */
+ra3 = -6.23753324503260060396e+01, /* 0xC04F300A, 0xE4CBA38D */
+ra4 = -1.62396669462573470355e+02, /* 0xC0644CB1, 0x84282266 */
+ra5 = -1.84605092906711035994e+02, /* 0xC067135C, 0xEBCCABB2 */
+ra6 = -8.12874355063065934246e+01, /* 0xC0545265, 0x57E4D2F2 */
+ra7 = -9.81432934416914548592e+00, /* 0xC023A0EF, 0xC69AC25C */
+sa1 = 1.96512716674392571292e+01, /* 0x4033A6B9, 0xBD707687 */
+sa2 = 1.37657754143519042600e+02, /* 0x4061350C, 0x526AE721 */
+sa3 = 4.34565877475229228821e+02, /* 0x407B290D, 0xD58A1A71 */
+sa4 = 6.45387271733267880336e+02, /* 0x40842B19, 0x21EC2868 */
+sa5 = 4.29008140027567833386e+02, /* 0x407AD021, 0x57700314 */
+sa6 = 1.08635005541779435134e+02, /* 0x405B28A3, 0xEE48AE2C */
+sa7 = 6.57024977031928170135e+00, /* 0x401A47EF, 0x8E484A93 */
+sa8 = -6.04244152148580987438e-02, /* 0xBFAEEFF2, 0xEE749A62 */
+/*
+ * Coefficients for approximation to erfc in [1/.35,28]
+ */
+rb0 = -9.86494292470009928597e-03, /* 0xBF843412, 0x39E86F4A */
+rb1 = -7.99283237680523006574e-01, /* 0xBFE993BA, 0x70C285DE */
+rb2 = -1.77579549177547519889e+01, /* 0xC031C209, 0x555F995A */
+rb3 = -1.60636384855821916062e+02, /* 0xC064145D, 0x43C5ED98 */
+rb4 = -6.37566443368389627722e+02, /* 0xC083EC88, 0x1375F228 */
+rb5 = -1.02509513161107724954e+03, /* 0xC0900461, 0x6A2E5992 */
+rb6 = -4.83519191608651397019e+02, /* 0xC07E384E, 0x9BDC383F */
+sb1 = 3.03380607434824582924e+01, /* 0x403E568B, 0x261D5190 */
+sb2 = 3.25792512996573918826e+02, /* 0x40745CAE, 0x221B9F0A */
+sb3 = 1.53672958608443695994e+03, /* 0x409802EB, 0x189D5118 */
+sb4 = 3.19985821950859553908e+03, /* 0x40A8FFB7, 0x688C246A */
+sb5 = 2.55305040643316442583e+03, /* 0x40A3F219, 0xCEDF3BE6 */
+sb6 = 4.74528541206955367215e+02, /* 0x407DA874, 0xE79FE763 */
+sb7 = -2.24409524465858183362e+01; /* 0xC03670E2, 0x42712D62 */
+
+ double erf(double x)
+{
+ int hx,ix,i;
+ double R,S,P,Q,s,y,z,r;
+ hx = CYG_LIBM_HI(x);
+ ix = hx&0x7fffffff;
+ if(ix>=0x7ff00000) { /* erf(nan)=nan */
+ i = ((unsigned)hx>>31)<<1;
+ return (double)(1-i)+one/x; /* erf(+-inf)=+-1 */
+ }
+
+ if(ix < 0x3feb0000) { /* |x|<0.84375 */
+ if(ix < 0x3e300000) { /* |x|<2**-28 */
+ if (ix < 0x00800000)
+ return 0.125*(8.0*x+efx8*x); /*avoid underflow */
+ return x + efx*x;
+ }
+ z = x*x;
+ r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4)));
+ s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5))));
+ y = r/s;
+ return x + x*y;
+ }
+ if(ix < 0x3ff40000) { /* 0.84375 <= |x| < 1.25 */
+ s = fabs(x)-one;
+ P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6)))));
+ Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6)))));
+ if(hx>=0) return erx + P/Q; else return -erx - P/Q;
+ }
+ if (ix >= 0x40180000) { /* inf>|x|>=6 */
+ if(hx>=0) return one-tiny; else return tiny-one;
+ }
+ x = fabs(x);
+ s = one/(x*x);
+ if(ix< 0x4006DB6E) { /* |x| < 1/0.35 */
+ R=ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*(
+ ra5+s*(ra6+s*ra7))))));
+ S=one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*(
+ sa5+s*(sa6+s*(sa7+s*sa8)))))));
+ } else { /* |x| >= 1/0.35 */
+ R=rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*(
+ rb5+s*rb6)))));
+ S=one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*(
+ sb5+s*(sb6+s*sb7))))));
+ }
+ z = x;
+ CYG_LIBM_LO(z) = 0;
+ r = __ieee754_exp(-z*z-0.5625)*__ieee754_exp((z-x)*(z+x)+R/S);
+ if(hx>=0) return one-r/x; else return r/x-one;
+}
+
+ double erfc(double x)
+{
+ int hx,ix;
+ double R,S,P,Q,s,y,z,r;
+ hx = CYG_LIBM_HI(x);
+ ix = hx&0x7fffffff;
+ if(ix>=0x7ff00000) { /* erfc(nan)=nan */
+ /* erfc(+-inf)=0,2 */
+ return (double)(((unsigned)hx>>31)<<1)+one/x;
+ }
+
+ if(ix < 0x3feb0000) { /* |x|<0.84375 */
+ if(ix < 0x3c700000) /* |x|<2**-56 */
+ return one-x;
+ z = x*x;
+ r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4)));
+ s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5))));
+ y = r/s;
+ if(hx < 0x3fd00000) { /* x<1/4 */
+ return one-(x+x*y);
+ } else {
+ r = x*y;
+ r += (x-half);
+ return half - r ;
+ }
+ }
+ if(ix < 0x3ff40000) { /* 0.84375 <= |x| < 1.25 */
+ s = fabs(x)-one;
+ P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6)))));
+ Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6)))));
+ if(hx>=0) {
+ z = one-erx; return z - P/Q;
+ } else {
+ z = erx+P/Q; return one+z;
+ }
+ }
+ if (ix < 0x403c0000) { /* |x|<28 */
+ x = fabs(x);
+ s = one/(x*x);
+ if(ix< 0x4006DB6D) { /* |x| < 1/.35 ~ 2.857143*/
+ R=ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*(
+ ra5+s*(ra6+s*ra7))))));
+ S=one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*(
+ sa5+s*(sa6+s*(sa7+s*sa8)))))));
+ } else { /* |x| >= 1/.35 ~ 2.857143 */
+ if(hx<0&&ix>=0x40180000) return two-tiny;/* x < -6 */
+ R=rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*(
+ rb5+s*rb6)))));
+ S=one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*(
+ sb5+s*(sb6+s*sb7))))));
+ }
+ z = x;
+ CYG_LIBM_LO(z) = 0;
+ r = __ieee754_exp(-z*z-0.5625)*
+ __ieee754_exp((z-x)*(z+x)+R/S);
+ if(hx>0) return r/x; else return two-r/x;
+ } else {
+ if(hx>0) return tiny*tiny; else return two-tiny;
+ }
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_erf.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_expm1.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_expm1.c
new file mode 100644
index 0000000000..93f172a3c1
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_expm1.c
@@ -0,0 +1,331 @@
+//===========================================================================
+//
+// s_expm1.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors:
+// Date: 2001-07-20
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+/* @(#)s_expm1.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+FUNCTION
+ <<expm1>>, <<expm1f>>---exponential minus 1
+INDEX
+ expm1
+INDEX
+ expm1f
+
+ANSI_SYNOPSIS
+ #include <math.h>
+ double expm1(double <[x]>);
+ float expm1f(float <[x]>);
+
+TRAD_SYNOPSIS
+ #include <math.h>
+ double expm1(<[x]>);
+ double <[x]>;
+
+ float expm1f(<[x]>);
+ float <[x]>;
+
+DESCRIPTION
+ <<expm1>> and <<expm1f>> calculate the exponential of <[x]>
+ and subtract 1, that is,
+ @ifinfo
+ e raised to the power <[x]> minus 1 (where e
+ @end ifinfo
+ @tex
+ $e^x - 1$ (where $e$
+ @end tex
+ is the base of the natural system of logarithms, approximately
+ 2.71828). The result is accurate even for small values of
+ <[x]>, where using <<exp(<[x]>)-1>> would lose many
+ significant digits.
+
+RETURNS
+ e raised to the power <[x]>, minus 1.
+
+PORTABILITY
+ Neither <<expm1>> nor <<expm1f>> is required by ANSI C or by
+ the System V Interface Definition (Issue 2).
+*/
+
+/* expm1(x)
+ * Returns exp(x)-1, the exponential of x minus 1.
+ *
+ * Method
+ * 1. Argument reduction:
+ * Given x, find r and integer k such that
+ *
+ * x = k*ln2 + r, |r| <= 0.5*ln2 ~ 0.34658
+ *
+ * Here a correction term c will be computed to compensate
+ * the error in r when rounded to a floating-point number.
+ *
+ * 2. Approximating expm1(r) by a special rational function on
+ * the interval [0,0.34658]:
+ * Since
+ * r*(exp(r)+1)/(exp(r)-1) = 2+ r^2/6 - r^4/360 + ...
+ * we define R1(r*r) by
+ * r*(exp(r)+1)/(exp(r)-1) = 2+ r^2/6 * R1(r*r)
+ * That is,
+ * R1(r**2) = 6/r *((exp(r)+1)/(exp(r)-1) - 2/r)
+ * = 6/r * ( 1 + 2.0*(1/(exp(r)-1) - 1/r))
+ * = 1 - r^2/60 + r^4/2520 - r^6/100800 + ...
+ * We use a special Reme algorithm on [0,0.347] to generate
+ * a polynomial of degree 5 in r*r to approximate R1. The
+ * maximum error of this polynomial approximation is bounded
+ * by 2**-61. In other words,
+ * R1(z) ~ 1.0 + Q1*z + Q2*z**2 + Q3*z**3 + Q4*z**4 + Q5*z**5
+ * where Q1 = -1.6666666666666567384E-2,
+ * Q2 = 3.9682539681370365873E-4,
+ * Q3 = -9.9206344733435987357E-6,
+ * Q4 = 2.5051361420808517002E-7,
+ * Q5 = -6.2843505682382617102E-9;
+ * (where z=r*r, and the values of Q1 to Q5 are listed below)
+ * with error bounded by
+ * | 5 | -61
+ * | 1.0+Q1*z+...+Q5*z - R1(z) | <= 2
+ * | |
+ *
+ * expm1(r) = exp(r)-1 is then computed by the following
+ * specific way which minimize the accumulation rounding error:
+ * 2 3
+ * r r [ 3 - (R1 + R1*r/2) ]
+ * expm1(r) = r + --- + --- * [--------------------]
+ * 2 2 [ 6 - r*(3 - R1*r/2) ]
+ *
+ * To compensate the error in the argument reduction, we use
+ * expm1(r+c) = expm1(r) + c + expm1(r)*c
+ * ~ expm1(r) + c + r*c
+ * Thus c+r*c will be added in as the correction terms for
+ * expm1(r+c). Now rearrange the term to avoid optimization
+ * screw up:
+ * ( 2 2 )
+ * ({ ( r [ R1 - (3 - R1*r/2) ] ) } r )
+ * expm1(r+c)~r - ({r*(--- * [--------------------]-c)-c} - --- )
+ * ({ ( 2 [ 6 - r*(3 - R1*r/2) ] ) } 2 )
+ * ( )
+ *
+ * = r - E
+ * 3. Scale back to obtain expm1(x):
+ * From step 1, we have
+ * expm1(x) = either 2^k*[expm1(r)+1] - 1
+ * = or 2^k*[expm1(r) + (1-2^-k)]
+ * 4. Implementation notes:
+ * (A). To save one multiplication, we scale the coefficient Qi
+ * to Qi*2^i, and replace z by (x^2)/2.
+ * (B). To achieve maximum accuracy, we compute expm1(x) by
+ * (i) if x < -56*ln2, return -1.0, (raise inexact if x!=inf)
+ * (ii) if k=0, return r-E
+ * (iii) if k=-1, return 0.5*(r-E)-0.5
+ * (iv) if k=1 if r < -0.25, return 2*((r+0.5)- E)
+ * else return 1.0+2.0*(r-E);
+ * (v) if (k<-2||k>56) return 2^k(1-(E-r)) - 1 (or exp(x)-1)
+ * (vi) if k <= 20, return 2^k((1-2^-k)-(E-r)), else
+ * (vii) return 2^k(1-((E+2^-k)-r))
+ *
+ * Special cases:
+ * expm1(INF) is INF, expm1(NaN) is NaN;
+ * expm1(-INF) is -1, and
+ * for finite argument, only expm1(0)=0 is exact.
+ *
+ * Accuracy:
+ * according to an error analysis, the error is always less than
+ * 1 ulp (unit in the last place).
+ *
+ * Misc. info.
+ * For IEEE double
+ * if x > 7.09782712893383973096e+02 then expm1(x) overflow
+ *
+ * Constants:
+ * The hexadecimal values are the intended ones for the following
+ * constants. The decimal values may be used, provided that the
+ * compiler will convert from decimal to binary accurately enough
+ * to produce the hexadecimal values shown.
+ */
+
+#include "mathincl/fdlibm.h"
+
+#ifndef _DOUBLE_IS_32BITS
+
+#ifdef __STDC__
+static const double
+#else
+static double
+#endif
+one = 1.0,
+huge = 1.0e+300,
+tiny = 1.0e-300,
+o_threshold = 7.09782712893383973096e+02,/* 0x40862E42, 0xFEFA39EF */
+ln2_hi = 6.93147180369123816490e-01,/* 0x3fe62e42, 0xfee00000 */
+ln2_lo = 1.90821492927058770002e-10,/* 0x3dea39ef, 0x35793c76 */
+invln2 = 1.44269504088896338700e+00,/* 0x3ff71547, 0x652b82fe */
+ /* scaled coefficients related to expm1 */
+Q1 = -3.33333333333331316428e-02, /* BFA11111 111110F4 */
+Q2 = 1.58730158725481460165e-03, /* 3F5A01A0 19FE5585 */
+Q3 = -7.93650757867487942473e-05, /* BF14CE19 9EAADBB7 */
+Q4 = 4.00821782732936239552e-06, /* 3ED0CFCA 86E65239 */
+Q5 = -2.01099218183624371326e-07; /* BE8AFDB7 6E09C32D */
+
+#ifdef __STDC__
+ double expm1(double x)
+#else
+ double expm1(x)
+ double x;
+#endif
+{
+ double y,hi,lo,c,t,e,hxs,hfx,r1;
+ __int32_t k,xsb;
+ __uint32_t hx;
+
+ GET_HIGH_WORD(hx,x);
+ xsb = hx&0x80000000; /* sign bit of x */
+ if(xsb==0) y=x; else y= -x; /* y = |x| */
+ hx &= 0x7fffffff; /* high word of |x| */
+
+ /* filter out huge and non-finite argument */
+ if(hx >= 0x4043687A) { /* if |x|>=56*ln2 */
+ if(hx >= 0x40862E42) { /* if |x|>=709.78... */
+ if(hx>=0x7ff00000) {
+ __uint32_t low;
+ GET_LOW_WORD(low,x);
+ if(((hx&0xfffff)|low)!=0)
+ return x+x; /* NaN */
+ else return (xsb==0)? x:-1.0;/* exp(+-inf)={inf,-1} */
+ }
+ if(x > o_threshold) return huge*huge; /* overflow */
+ }
+ if(xsb!=0) { /* x < -56*ln2, return -1.0 with inexact */
+ if(x+tiny<0.0) /* raise inexact */
+ return tiny-one; /* return -1 */
+ }
+ }
+
+ /* argument reduction */
+ if(hx > 0x3fd62e42) { /* if |x| > 0.5 ln2 */
+ if(hx < 0x3FF0A2B2) { /* and |x| < 1.5 ln2 */
+ if(xsb==0)
+ {hi = x - ln2_hi; lo = ln2_lo; k = 1;}
+ else
+ {hi = x + ln2_hi; lo = -ln2_lo; k = -1;}
+ } else {
+ k = invln2*x+((xsb==0)?0.5:-0.5);
+ t = k;
+ hi = x - t*ln2_hi; /* t*ln2_hi is exact here */
+ lo = t*ln2_lo;
+ }
+ x = hi - lo;
+ c = (hi-x)-lo;
+ }
+ else if(hx < 0x3c900000) { /* when |x|<2**-54, return x */
+ t = huge+x; /* return x with inexact flags when x!=0 */
+ return x - (t-(huge+x));
+ }
+ else k = 0, c = 0;
+
+ /* x is now in primary range */
+ hfx = 0.5*x;
+ hxs = x*hfx;
+ r1 = one+hxs*(Q1+hxs*(Q2+hxs*(Q3+hxs*(Q4+hxs*Q5))));
+ t = 3.0-r1*hfx;
+ e = hxs*((r1-t)/(6.0 - x*t));
+ if(k==0) return x - (x*e-hxs); /* c is 0 */
+ else {
+ e = (x*(e-c)-c);
+ e -= hxs;
+ if(k== -1) return 0.5*(x-e)-0.5;
+ if(k==1) {
+ if(x < -0.25) return -2.0*(e-(x+0.5));
+ else return one+2.0*(x-e);
+ }
+ if (k <= -2 || k>56) { /* suffice to return exp(x)-1 */
+ __uint32_t high;
+ y = one-(e-x);
+ GET_HIGH_WORD(high,y);
+ SET_HIGH_WORD(y,high+(k<<20)); /* add k to y's exponent */
+ return y-one;
+ }
+ t = one;
+ if(k<20) {
+ __uint32_t high;
+ SET_HIGH_WORD(t,0x3ff00000 - (0x200000>>k)); /* t=1-2^-k */
+ y = t-(e-x);
+ GET_HIGH_WORD(high,y);
+ SET_HIGH_WORD(y,high+(k<<20)); /* add k to y's exponent */
+ } else {
+ __uint32_t high;
+ SET_HIGH_WORD(t,((0x3ff-k)<<20)); /* 2^-k */
+ y = x-(e+t);
+ y += one;
+ GET_HIGH_WORD(high,y);
+ SET_HIGH_WORD(y,high+(k<<20)); /* add k to y's exponent */
+ }
+ }
+ return y;
+}
+
+#endif /* _DOUBLE_IS_32BITS */
+
+// EOF s_expm1.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_fabs.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_fabs.c
new file mode 100644
index 0000000000..39c46b0572
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_fabs.c
@@ -0,0 +1,90 @@
+//===========================================================================
+//
+// s_fabs.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_fabs.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * fabs(x) returns the absolute value of x.
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double fabs(double x)
+{
+ CYG_LIBM_HI(x) &= 0x7fffffff;
+ return x;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_fabs.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_finite.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_finite.c
new file mode 100644
index 0000000000..05d37992f2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_finite.c
@@ -0,0 +1,92 @@
+//===========================================================================
+//
+// s_finite.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_finite.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * finite(x) returns 1 is x is finite, else 0;
+ * no branching!
+ */
+
+#include "mathincl/fdlibm.h"
+
+ int finite(double x)
+{
+ int hx;
+ hx = CYG_LIBM_HI(x);
+ return (unsigned)((hx&0x7fffffff)-0x7ff00000)>>31;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_finite.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_floor.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_floor.c
new file mode 100644
index 0000000000..0ff47c9125
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_floor.c
@@ -0,0 +1,136 @@
+//===========================================================================
+//
+// s_floor.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_floor.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * floor(x)
+ * Return x rounded toward -inf to integral value
+ * Method:
+ * Bit twiddling.
+ * Exception:
+ * Inexact flag raised if x not equal to floor(x).
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double huge = 1.0e300;
+
+ double floor(double x)
+{
+ int i0,i1,j0;
+ unsigned i,j;
+ i0 = CYG_LIBM_HI(x);
+ i1 = CYG_LIBM_LO(x);
+ j0 = ((i0>>20)&0x7ff)-0x3ff;
+ if(j0<20) {
+ if(j0<0) { /* raise inexact if x != 0 */
+ if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
+ if(i0>=0) {i0=i1=0;}
+ else if(((i0&0x7fffffff)|i1)!=0)
+ { i0=0xbff00000;i1=0;}
+ }
+ } else {
+ i = (0x000fffff)>>j0;
+ if(((i0&i)|i1)==0) return x; /* x is integral */
+ if(huge+x>0.0) { /* raise inexact flag */
+ if(i0<0) i0 += (0x00100000)>>j0;
+ i0 &= (~i); i1=0;
+ }
+ }
+ } else if (j0>51) {
+ if(j0==0x400) return x+x; /* inf or NaN */
+ else return x; /* x is integral */
+ } else {
+ i = ((unsigned)(0xffffffff))>>(j0-20);
+ if((i1&i)==0) return x; /* x is integral */
+ if(huge+x>0.0) { /* raise inexact flag */
+ if(i0<0) {
+ if(j0==20) i0+=1;
+ else {
+ j = i1+(1<<(52-j0));
+ if(j<(unsigned)i1) i0 +=1 ; /* got a carry */
+ i1=j;
+ }
+ }
+ i1 &= (~i);
+ }
+ }
+ CYG_LIBM_HI(x) = i0;
+ CYG_LIBM_LO(x) = i1;
+ return x;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_floor.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_frexp.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_frexp.c
new file mode 100644
index 0000000000..b7147af6dd
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_frexp.c
@@ -0,0 +1,113 @@
+//===========================================================================
+//
+// s_frexp.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_frexp.c 1.4 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * for non-zero x
+ * x = frexp(arg,&exp);
+ * return a double fp quantity x such that 0.5 <= |x| <1.0
+ * and the corresponding binary exponent "exp". That is
+ * arg = x*2^exp.
+ * If arg is inf, 0.0, or NaN, then frexp(arg,&exp) returns arg
+ * with *exp=0.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double
+two54 = 1.80143985094819840000e+16; /* 0x43500000, 0x00000000 */
+
+ double frexp(double x, int *eptr)
+{
+ int hx, ix, lx;
+ hx = CYG_LIBM_HI(x);
+ ix = 0x7fffffff&hx;
+ lx = CYG_LIBM_LO(x);
+ *eptr = 0;
+ if(ix>=0x7ff00000||((ix|lx)==0)) return x; /* 0,inf,nan */
+ if (ix<0x00100000) { /* subnormal */
+ x *= two54;
+ hx = CYG_LIBM_HI(x);
+ ix = hx&0x7fffffff;
+ *eptr = -54;
+ }
+ *eptr += (ix>>20)-1022;
+ hx = (hx&0x800fffff)|0x3fe00000;
+ CYG_LIBM_HI(x) = hx;
+ return x;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_frexp.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_ilogb.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_ilogb.c
new file mode 100644
index 0000000000..6c3750d17d
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_ilogb.c
@@ -0,0 +1,107 @@
+//===========================================================================
+//
+// s_ilogb.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_ilogb.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* ilogb(double x)
+ * return the binary exponent of non-zero x
+ * ilogb(0) = 0x80000001
+ * ilogb(inf/NaN) = 0x7fffffff (no signal is raised)
+ */
+
+#include "mathincl/fdlibm.h"
+
+ int ilogb(double x)
+{
+ int hx,lx,ix;
+
+ hx = (CYG_LIBM_HI(x))&0x7fffffff; /* high word of x */
+ if(hx<0x00100000) {
+ lx = CYG_LIBM_LO(x);
+ if((hx|lx)==0)
+ return 0x80000001; /* ilogb(0) = 0x80000001 */
+ else /* subnormal x */
+ if(hx==0) {
+ for (ix = -1043; lx>0; lx<<=1) ix -=1;
+ } else {
+ for (ix = -1022,hx<<=11; hx>0; hx<<=1) ix -=1;
+ }
+ return ix;
+ }
+ else if (hx<0x7ff00000) return (hx>>20)-1023;
+ else return 0x7fffffff;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_ilogb.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_isnan.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_isnan.c
new file mode 100644
index 0000000000..13bb4073aa
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_isnan.c
@@ -0,0 +1,95 @@
+//===========================================================================
+//
+// s_isnan.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_isnan.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * isnan(x) returns 1 is x is nan, else 0;
+ * no branching!
+ */
+
+#include "mathincl/fdlibm.h"
+
+ int isnan(double x)
+{
+ int hx,lx;
+ hx = (CYG_LIBM_HI(x)&0x7fffffff);
+ lx = CYG_LIBM_LO(x);
+ hx |= (unsigned)(lx|(-lx))>>31;
+ hx = 0x7ff00000 - hx;
+ return ((unsigned)(hx))>>31;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_isnan.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_ldexp.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_ldexp.c
new file mode 100644
index 0000000000..9a8b06e7d8
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_ldexp.c
@@ -0,0 +1,100 @@
+//===========================================================================
+//
+// s_ldexp.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_ldexp.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#include "mathincl/fdlibm.h"
+
+double
+ldexp(double x, int exp)
+{
+ double z;
+
+ z = scalbn(x,exp);
+
+#ifndef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE) return z;
+ if(!(finite(z)||isnan(z))&&finite(x)) {
+ return __kernel_standard(x,(double)exp,43); /* ldexp overflow */
+ }
+ if(z==0.0&&z!=x) {
+ return __kernel_standard(x,(double)exp,44); /* ldexp underflow */
+ }
+#endif
+
+ return z;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_ldexp.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_log1p.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_log1p.c
new file mode 100644
index 0000000000..2a021424cd
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_log1p.c
@@ -0,0 +1,227 @@
+//===========================================================================
+//
+// s_log1p.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_log1p.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* double log1p(double x)
+ *
+ * Method :
+ * 1. Argument Reduction: find k and f such that
+ * 1+x = 2^k * (1+f),
+ * where sqrt(2)/2 < 1+f < sqrt(2) .
+ *
+ * Note. If k=0, then f=x is exact. However, if k!=0, then f
+ * may not be representable exactly. In that case, a correction
+ * term is need. Let u=1+x rounded. Let c = (1+x)-u, then
+ * log(1+x) - log(u) ~ c/u. Thus, we proceed to compute log(u),
+ * and add back the correction term c/u.
+ * (Note: when x > 2**53, one can simply return log(x))
+ *
+ * 2. Approximation of log1p(f).
+ * Let s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s)
+ * = 2s + 2/3 s**3 + 2/5 s**5 + .....,
+ * = 2s + s*R
+ * We use a special Reme algorithm on [0,0.1716] to generate
+ * a polynomial of degree 14 to approximate R The maximum error
+ * of this polynomial approximation is bounded by 2**-58.45. In
+ * other words,
+ * 2 4 6 8 10 12 14
+ * R(z) ~ Lp1*s +Lp2*s +Lp3*s +Lp4*s +Lp5*s +Lp6*s +Lp7*s
+ * (the values of Lp1 to Lp7 are listed in the program)
+ * and
+ * | 2 14 | -58.45
+ * | Lp1*s +...+Lp7*s - R(z) | <= 2
+ * | |
+ * Note that 2s = f - s*f = f - hfsq + s*hfsq, where hfsq = f*f/2.
+ * In order to guarantee error in log below 1ulp, we compute log
+ * by
+ * log1p(f) = f - (hfsq - s*(hfsq+R)).
+ *
+ * 3. Finally, log1p(x) = k*ln2 + log1p(f).
+ * = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo)))
+ * Here ln2 is split into two floating point number:
+ * ln2_hi + ln2_lo,
+ * where n*ln2_hi is always exact for |n| < 2000.
+ *
+ * Special cases:
+ * log1p(x) is NaN with signal if x < -1 (including -INF) ;
+ * log1p(+INF) is +INF; log1p(-1) is -INF with signal;
+ * log1p(NaN) is that NaN with no signal.
+ *
+ * Accuracy:
+ * according to an error analysis, the error is always less than
+ * 1 ulp (unit in the last place).
+ *
+ * Constants:
+ * The hexadecimal values are the intended ones for the following
+ * constants. The decimal values may be used, provided that the
+ * compiler will convert from decimal to binary accurately enough
+ * to produce the hexadecimal values shown.
+ *
+ * Note: Assuming log() return accurate answer, the following
+ * algorithm can be used to compute log1p(x) to within a few ULP:
+ *
+ * u = 1+x;
+ * if(u==1.0) return x ; else
+ * return log(u)*(x/(u-1.0));
+ *
+ * See HP-15C Advanced Functions Handbook, p.193.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double
+ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */
+ln2_lo = 1.90821492927058770002e-10, /* 3dea39ef 35793c76 */
+two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */
+Lp1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */
+Lp2 = 3.999999999940941908e-01, /* 3FD99999 9997FA04 */
+Lp3 = 2.857142874366239149e-01, /* 3FD24924 94229359 */
+Lp4 = 2.222219843214978396e-01, /* 3FCC71C5 1D8E78AF */
+Lp5 = 1.818357216161805012e-01, /* 3FC74664 96CB03DE */
+Lp6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */
+Lp7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */
+
+static double zero = 0.0;
+
+ double log1p(double x)
+{
+ double hfsq,f,c,s,z,R,u;
+ int k,hx,hu,ax;
+
+ c=f=hu=0.0; /* to placate compiler */
+ hx = CYG_LIBM_HI(x); /* high word of x */
+ ax = hx&0x7fffffff;
+
+ k = 1;
+ if (hx < 0x3FDA827A) { /* x < 0.41422 */
+ if(ax>=0x3ff00000) { /* x <= -1.0 */
+ if(x==-1.0) return -two54/zero; /* log1p(-1)=+inf */
+ else return (x-x)/(x-x); /* log1p(x<-1)=NaN */
+ }
+ if(ax<0x3e200000) { /* |x| < 2**-29 */
+ if(two54+x>zero /* raise inexact */
+ &&ax<0x3c900000) /* |x| < 2**-54 */
+ return x;
+ else
+ return x - x*x*0.5;
+ }
+ if(hx>0||hx<=((int)0xbfd2bec3)) {
+ k=0;f=x;hu=1;} /* -0.2929<x<0.41422 */
+ }
+ if (hx >= 0x7ff00000) return x+x;
+ if(k!=0) {
+ if(hx<0x43400000) {
+ u = 1.0+x;
+ hu = CYG_LIBM_HI(u); /* high word of u */
+ k = (hu>>20)-1023;
+ c = (k>0)? 1.0-(u-x):x-(u-1.0);/* correction term */
+ c /= u;
+ } else {
+ u = x;
+ hu = CYG_LIBM_HI(u); /* high word of u */
+ k = (hu>>20)-1023;
+ c = 0;
+ }
+ hu &= 0x000fffff;
+ if(hu<0x6a09e) {
+ CYG_LIBM_HI(u) = hu|0x3ff00000; /* normalize u */
+ } else {
+ k += 1;
+ CYG_LIBM_HI(u) = hu|0x3fe00000; /* normalize u/2 */
+ hu = (0x00100000-hu)>>2;
+ }
+ f = u-1.0;
+ }
+ hfsq=0.5*f*f;
+ if(hu==0) { /* |f| < 2**-20 */
+ if(f==zero) {
+ if(k==0) return zero;
+ else {
+ c += k*ln2_lo; return k*ln2_hi+c;
+ }
+ }
+ R = hfsq*(1.0-0.66666666666666666*f);
+ if(k==0) return f-R;
+ else return k*ln2_hi-((R-(k*ln2_lo+c))-f);
+ }
+ s = f/(2.0+f);
+ z = s*s;
+ R = z*(Lp1+z*(Lp2+z*(Lp3+z*(Lp4+z*(Lp5+z*(Lp6+z*Lp7))))));
+ if(k==0) return f-(hfsq-s*(hfsq+R));
+ else return k*ln2_hi-((hfsq-(s*(hfsq+R)+(k*ln2_lo+c)))-f);
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_log1p.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_logb.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_logb.c
new file mode 100644
index 0000000000..e4320ec58e
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_logb.c
@@ -0,0 +1,99 @@
+//===========================================================================
+//
+// s_logb.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_logb.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * double logb(x)
+ * IEEE 754 logb. Included to pass IEEE test suite. Not recommend.
+ * Use ilogb instead.
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double logb(double x)
+{
+ int lx,ix;
+ ix = (CYG_LIBM_HI(x))&0x7fffffff; /* high |x| */
+ lx = CYG_LIBM_LO(x); /* low x */
+ if((ix|lx)==0) return -1.0/fabs(x);
+ if(ix>=0x7ff00000) return x*x;
+ if((ix>>=20)==0) /* IEEE 754 logb */
+ return -1022.0;
+ else
+ return (double) (ix-1023);
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_logb.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_modf.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_modf.c
new file mode 100644
index 0000000000..97dc0199c8
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_modf.c
@@ -0,0 +1,137 @@
+//===========================================================================
+//
+// s_modf.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_modf.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * modf(double x, double *iptr)
+ * return fraction part of x, and return x's integral part in *iptr.
+ * Method:
+ * Bit twiddling.
+ *
+ * Exception:
+ * No exception.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double one = 1.0;
+
+ double modf(double x, double *iptr)
+{
+ int i0,i1,j0;
+ unsigned i;
+ i0 = CYG_LIBM_HI(x); /* high x */
+ i1 = CYG_LIBM_LO(x); /* low x */
+ j0 = ((i0>>20)&0x7ff)-0x3ff; /* exponent of x */
+ if(j0<20) { /* integer part in high x */
+ if(j0<0) { /* |x|<1 */
+ CYG_LIBM_HIp(iptr) = i0&0x80000000;
+ CYG_LIBM_LOp(iptr) = 0; /* *iptr = +-0 */
+ return x;
+ } else {
+ i = (0x000fffff)>>j0;
+ if(((i0&i)|i1)==0) { /* x is integral */
+ *iptr = x;
+ CYG_LIBM_HI(x) &= 0x80000000;
+ CYG_LIBM_LO(x) = 0; /* return +-0 */
+ return x;
+ } else {
+ CYG_LIBM_HIp(iptr) = i0&(~i);
+ CYG_LIBM_LOp(iptr) = 0;
+ return x - *iptr;
+ }
+ }
+ } else if (j0>51) { /* no fraction part */
+ *iptr = x*one;
+ CYG_LIBM_HI(x) &= 0x80000000;
+ CYG_LIBM_LO(x) = 0; /* return +-0 */
+ return x;
+ } else { /* fraction part in low x */
+ i = ((unsigned)(0xffffffff))>>(j0-20);
+ if((i1&i)==0) { /* x is integral */
+ *iptr = x;
+ CYG_LIBM_HI(x) &= 0x80000000;
+ CYG_LIBM_LO(x) = 0; /* return +-0 */
+ return x;
+ } else {
+ CYG_LIBM_HIp(iptr) = i0;
+ CYG_LIBM_LOp(iptr) = i1&(~i);
+ return x - *iptr;
+ }
+ }
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_modf.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_nextafter.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_nextafter.c
new file mode 100644
index 0000000000..1c2b484da1
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_nextafter.c
@@ -0,0 +1,139 @@
+//===========================================================================
+//
+// s_nextafter.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_nextafter.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* IEEE functions
+ * nextafter(x,y)
+ * return the next machine floating-point number of x in the
+ * direction toward y.
+ * Special cases:
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double nextafter(double x, double y)
+{
+ int hx,hy,ix,iy;
+ unsigned lx,ly;
+
+ hx = CYG_LIBM_HI(x); /* high word of x */
+ lx = CYG_LIBM_LO(x); /* low word of x */
+ hy = CYG_LIBM_HI(y); /* high word of y */
+ ly = CYG_LIBM_LO(y); /* low word of y */
+ ix = hx&0x7fffffff; /* |x| */
+ iy = hy&0x7fffffff; /* |y| */
+
+ if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) || /* x is nan */
+ ((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0)) /* y is nan */
+ return x+y;
+ if(x==y) return x; /* x=y, return x */
+ if((ix|lx)==0) { /* x == 0 */
+ CYG_LIBM_HI(x) = hy&0x80000000; /* return +-minsubnormal */
+ CYG_LIBM_LO(x) = 1;
+ y = x*x;
+ if(y==x) return y; else return x; /* raise underflow flag */
+ }
+ if(hx>=0) { /* x > 0 */
+ if(hx>hy||((hx==hy)&&(lx>ly))) { /* x > y, x -= ulp */
+ if(lx==0) hx -= 1;
+ lx -= 1;
+ } else { /* x < y, x += ulp */
+ lx += 1;
+ if(lx==0) hx += 1;
+ }
+ } else { /* x < 0 */
+ if(hy>=0||hx>hy||((hx==hy)&&(lx>ly))){/* x < y, x -= ulp */
+ if(lx==0) hx -= 1;
+ lx -= 1;
+ } else { /* x > y, x += ulp */
+ lx += 1;
+ if(lx==0) hx += 1;
+ }
+ }
+ hy = hx&0x7ff00000;
+ if(hy>=0x7ff00000) return x+x; /* overflow */
+ if(hy<0x00100000) { /* underflow */
+ y = x*x;
+ if(y!=x) { /* raise underflow flag */
+ CYG_LIBM_HI(y) = hx; CYG_LIBM_LO(y) = lx;
+ return y;
+ }
+ }
+ CYG_LIBM_HI(x) = hx; CYG_LIBM_LO(x) = lx;
+ return x;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_nextafter.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_rint.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_rint.c
new file mode 100644
index 0000000000..98470796c1
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_rint.c
@@ -0,0 +1,141 @@
+//===========================================================================
+//
+// s_rint.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_rint.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * rint(x)
+ * Return x rounded to integral value according to the prevailing
+ * rounding mode.
+ * Method:
+ * Using floating addition.
+ * Exception:
+ * Inexact flag raised if x not equal to rint(x).
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double
+TWO52[2]={
+ 4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */
+ -4.50359962737049600000e+15, /* 0xC3300000, 0x00000000 */
+};
+
+ double rint(double x)
+{
+ int i0,j0,sx;
+ unsigned i,i1;
+ double w,t;
+ i0 = CYG_LIBM_HI(x);
+ sx = (i0>>31)&1;
+ i1 = CYG_LIBM_LO(x);
+ j0 = ((i0>>20)&0x7ff)-0x3ff;
+ if(j0<20) {
+ if(j0<0) {
+ if(((i0&0x7fffffff)|i1)==0) return x;
+ i1 |= (i0&0x0fffff);
+ i0 &= 0xfffe0000;
+ i0 |= ((i1|-i1)>>12)&0x80000;
+ CYG_LIBM_HI(x)=i0;
+ w = TWO52[sx]+x;
+ t = w-TWO52[sx];
+ i0 = CYG_LIBM_HI(t);
+ CYG_LIBM_HI(t) = (i0&0x7fffffff)|(sx<<31);
+ return t;
+ } else {
+ i = (0x000fffff)>>j0;
+ if(((i0&i)|i1)==0) return x; /* x is integral */
+ i>>=1;
+ if(((i0&i)|i1)!=0) {
+ if(j0==19) i1 = 0x40000000; else
+ i0 = (i0&(~i))|((0x20000)>>j0);
+ }
+ }
+ } else if (j0>51) {
+ if(j0==0x400) return x+x; /* inf or NaN */
+ else return x; /* x is integral */
+ } else {
+ i = ((unsigned)(0xffffffff))>>(j0-20);
+ if((i1&i)==0) return x; /* x is integral */
+ i>>=1;
+ if((i1&i)!=0) i1 = (i1&(~i))|((0x40000000)>>(j0-20));
+ }
+ CYG_LIBM_HI(x) = i0;
+ CYG_LIBM_LO(x) = i1;
+ w = TWO52[sx]+x;
+ return w-TWO52[sx];
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_rint.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_scalbn.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_scalbn.c
new file mode 100644
index 0000000000..275561cbac
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_scalbn.c
@@ -0,0 +1,121 @@
+//===========================================================================
+//
+// s_scalbn.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_scalbn.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * scalbn (double x, int n)
+ * scalbn(x,n) returns x* 2**n computed by exponent
+ * manipulation rather than by actually performing an
+ * exponentiation or a multiplication.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double
+two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */
+twom54 = 5.55111512312578270212e-17, /* 0x3C900000, 0x00000000 */
+huge = 1.0e+300,
+tiny = 1.0e-300;
+
+ double scalbn (double x, int n)
+{
+ int k,hx,lx;
+ hx = CYG_LIBM_HI(x);
+ lx = CYG_LIBM_LO(x);
+ k = (hx&0x7ff00000)>>20; /* extract exponent */
+ if (k==0) { /* 0 or subnormal x */
+ if ((lx|(hx&0x7fffffff))==0) return x; /* +-0 */
+ x *= two54;
+ hx = CYG_LIBM_HI(x);
+ k = ((hx&0x7ff00000)>>20) - 54;
+ if (n< -50000) return tiny*x; /*underflow*/
+ }
+ if (k==0x7ff) return x+x; /* NaN or Inf */
+ k = k+n;
+ if (k > 0x7fe) return huge*copysign(huge,x); /* overflow */
+ if (k > 0) /* normal result */
+ {CYG_LIBM_HI(x) = (hx&0x800fffff)|(k<<20); return x;}
+ if (k <= -54) {
+ if (n > 50000) /* in case integer overflow in n+k */
+ return huge*copysign(huge,x); /*overflow*/
+ else return tiny*copysign(tiny,x); /*underflow*/
+ }
+ k += 54; /* subnormal result */
+ CYG_LIBM_HI(x) = (hx&0x800fffff)|(k<<20);
+ return x*twom54;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_scalbn.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_significand.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_significand.c
new file mode 100644
index 0000000000..559d215044
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_significand.c
@@ -0,0 +1,91 @@
+//===========================================================================
+//
+// s_significand.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_significand.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * significand(x) computes just
+ * scalb(x, (double) -ilogb(x)),
+ * for exercising the fraction-part(F) IEEE 754-1985 test vector.
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double significand(double x)
+{
+ return __ieee754_scalb(x,(double) -ilogb(x));
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_significand.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_sin.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_sin.c
new file mode 100644
index 0000000000..4a23439332
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_sin.c
@@ -0,0 +1,139 @@
+//===========================================================================
+//
+// s_sin.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_sin.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* sin(x)
+ * Return sine function of x.
+ *
+ * kernel function:
+ * __kernel_sin ... sine function on [-pi/4,pi/4]
+ * __kernel_cos ... cose function on [-pi/4,pi/4]
+ * __ieee754_rem_pio2 ... argument reduction routine
+ *
+ * Method.
+ * Let S,C and T denote the sin, cos and tan respectively on
+ * [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2
+ * in [-pi/4 , +pi/4], and let n = k mod 4.
+ * We have
+ *
+ * n sin(x) cos(x) tan(x)
+ * ----------------------------------------------------------
+ * 0 S C T
+ * 1 C -S -1/T
+ * 2 -S -C T
+ * 3 -C S -1/T
+ * ----------------------------------------------------------
+ *
+ * Special cases:
+ * Let trig be any of sin, cos, or tan.
+ * trig(+-INF) is NaN, with signals;
+ * trig(NaN) is that NaN;
+ *
+ * Accuracy:
+ * TRIG(x) returns trig(x) nearly rounded
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double sin(double x)
+{
+ double y[2],z=0.0;
+ int n, ix;
+
+ /* High word of x. */
+ ix = CYG_LIBM_HI(x);
+
+ /* |x| ~< pi/4 */
+ ix &= 0x7fffffff;
+ if(ix <= 0x3fe921fb) return __kernel_sin(x,z,0);
+
+ /* sin(Inf or NaN) is NaN */
+ else if (ix>=0x7ff00000) return x-x;
+
+ /* argument reduction needed */
+ else {
+ n = __ieee754_rem_pio2(x,y);
+ switch(n&3) {
+ case 0: return __kernel_sin(y[0],y[1],1);
+ case 1: return __kernel_cos(y[0],y[1]);
+ case 2: return -__kernel_sin(y[0],y[1],1);
+ default:
+ return -__kernel_cos(y[0],y[1]);
+ }
+ }
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_sin.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_tan.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_tan.c
new file mode 100644
index 0000000000..9bf51fd29a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_tan.c
@@ -0,0 +1,133 @@
+//===========================================================================
+//
+// s_tan.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_tan.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* tan(x)
+ * Return tangent function of x.
+ *
+ * kernel function:
+ * __kernel_tan ... tangent function on [-pi/4,pi/4]
+ * __ieee754_rem_pio2 ... argument reduction routine
+ *
+ * Method.
+ * Let S,C and T denote the sin, cos and tan respectively on
+ * [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2
+ * in [-pi/4 , +pi/4], and let n = k mod 4.
+ * We have
+ *
+ * n sin(x) cos(x) tan(x)
+ * ----------------------------------------------------------
+ * 0 S C T
+ * 1 C -S -1/T
+ * 2 -S -C T
+ * 3 -C S -1/T
+ * ----------------------------------------------------------
+ *
+ * Special cases:
+ * Let trig be any of sin, cos, or tan.
+ * trig(+-INF) is NaN, with signals;
+ * trig(NaN) is that NaN;
+ *
+ * Accuracy:
+ * TRIG(x) returns trig(x) nearly rounded
+ */
+
+#include "mathincl/fdlibm.h"
+
+ double tan(double x)
+{
+ double y[2],z=0.0;
+ int n, ix;
+
+ /* High word of x. */
+ ix = CYG_LIBM_HI(x);
+
+ /* |x| ~< pi/4 */
+ ix &= 0x7fffffff;
+ if(ix <= 0x3fe921fb) return __kernel_tan(x,z,1);
+
+ /* tan(Inf or NaN) is NaN */
+ else if (ix>=0x7ff00000) return x-x; /* NaN */
+
+ /* argument reduction needed */
+ else {
+ n = __ieee754_rem_pio2(x,y);
+ return __kernel_tan(y[0],y[1],1-((n&1)<<1)); /* 1 -- n even
+ -1 -- n odd */
+ }
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_tan.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_tanh.c b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_tanh.c
new file mode 100644
index 0000000000..7e7731f6fe
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/double/portable-api/s_tanh.c
@@ -0,0 +1,139 @@
+//===========================================================================
+//
+// s_tanh.c
+//
+// Part of the standard mathematical function library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// Derived from code with the following copyright
+
+
+/* @(#)s_tanh.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* Tanh(x)
+ * Return the Hyperbolic Tangent of x
+ *
+ * Method :
+ * x -x
+ * e - e
+ * 0. tanh(x) is defined to be -----------
+ * x -x
+ * e + e
+ * 1. reduce x to non-negative by tanh(-x) = -tanh(x).
+ * 2. 0 <= x <= 2**-55 : tanh(x) := x*(one+x)
+ * -t
+ * 2**-55 < x <= 1 : tanh(x) := -----; t = expm1(-2x)
+ * t + 2
+ * 2
+ * 1 <= x <= 22.0 : tanh(x) := 1- ----- ; t=expm1(2x)
+ * t + 2
+ * 22.0 < x <= INF : tanh(x) := 1.
+ *
+ * Special cases:
+ * tanh(NaN) is NaN;
+ * only tanh(0)=0 is exact for finite argument.
+ */
+
+#include "mathincl/fdlibm.h"
+
+static const double one=1.0, two=2.0, tiny = 1.0e-300;
+
+ double tanh(double x)
+{
+ double t,z;
+ int jx,ix;
+
+ /* High word of |x|. */
+ jx = CYG_LIBM_HI(x);
+ ix = jx&0x7fffffff;
+
+ /* x is INF or NaN */
+ if(ix>=0x7ff00000) {
+ if (jx>=0) return one/x+one; /* tanh(+-inf)=+-1 */
+ else return one/x-one; /* tanh(NaN) = NaN */
+ }
+
+ /* |x| < 22 */
+ if (ix < 0x40360000) { /* |x|<22 */
+ if (ix<0x3c800000) /* |x|<2**-55 */
+ return x*(one+x); /* tanh(small) = small */
+ if (ix>=0x3ff00000) { /* |x|>=1 */
+ t = expm1(two*fabs(x));
+ z = one - two/(t+two);
+ } else {
+ t = expm1(-two*fabs(x));
+ z= -t/(t+two);
+ }
+ /* |x| > 22, return +-1 */
+ } else {
+ z = one - tiny; /* raised inexact flag */
+ }
+ return (jx>=0)? z: -z;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF s_tanh.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/mathincl/fdlibm.h b/cesar/ecos/packages/language/c/libm/current/src/mathincl/fdlibm.h
new file mode 100644
index 0000000000..8338678133
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/mathincl/fdlibm.h
@@ -0,0 +1,297 @@
+#ifndef CYGONCE_LIBM_MATHINCL_FDLIBM_H
+#define CYGONCE_LIBM_MATHINCL_FDLIBM_H
+//===========================================================================
+//
+// fdlibm.h
+//
+// Internal definitions for math library implementation based on fdlibm
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-02-09
+// Purpose:
+// Description: Internal implementation-specific header for math library
+// based on fdlibm
+// Usage: From within this package, #include "mathincl/fdlibm.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <math.h> // Main header for math library
+#include <float.h> // Properties of FP representation on this
+ // platform
+
+// SANITY CHECKS
+
+// Just check that we support IEEE-style 64-bit doubles. If not, this
+// math library will not work
+// This check will go away when support for single-precision alternatives are
+// provided
+
+#if DBL_MAX_EXP != 1024
+# error IEEE-style 64-bit doubles are required to use the math library
+#endif // if DBL_MAX_EXP == 1024
+
+
+// TYPES
+
+typedef cyg_int32 __int32_t;
+typedef cyg_uint32 __uint32_t;
+typedef Cyg_libm_ieee_double_shape_type ieee_double_shape_type;
+
+// MACRO DEFINITIONS
+
+#ifndef __STDC__
+# define __STDC__ 1
+#endif
+#define CYG_LIBM_HI(__x) (((Cyg_libm_ieee_double_shape_type *)&__x)->parts.msw)
+#define CYG_LIBM_LO(__x) (((Cyg_libm_ieee_double_shape_type *)&__x)->parts.lsw)
+#define CYG_LIBM_HIp(__x) (((Cyg_libm_ieee_double_shape_type *)__x)->parts.msw)
+#define CYG_LIBM_LOp(__x) (((Cyg_libm_ieee_double_shape_type *)__x)->parts.lsw)
+
+
+
+/* Get two 32 bit ints from a double. */
+
+#define EXTRACT_WORDS(ix0,ix1,d) \
+do { \
+ Cyg_libm_ieee_double_shape_type ew_u; \
+ ew_u.value = (d); \
+ (ix0) = ew_u.parts.msw; \
+ (ix1) = ew_u.parts.lsw; \
+} while (0)
+
+/* Get the more significant 32 bit int from a double. */
+
+#define GET_HIGH_WORD(i,d) \
+do { \
+ Cyg_libm_ieee_double_shape_type gh_u; \
+ gh_u.value = (d); \
+ (i) = gh_u.parts.msw; \
+} while (0)
+
+/* Get the less significant 32 bit int from a double. */
+
+#define GET_LOW_WORD(i,d) \
+do { \
+ Cyg_libm_ieee_double_shape_type gl_u; \
+ gl_u.value = (d); \
+ (i) = gl_u.parts.lsw; \
+} while (0)
+
+/* Set a double from two 32 bit ints. */
+
+#define INSERT_WORDS(d,ix0,ix1) \
+do { \
+ Cyg_libm_ieee_double_shape_type iw_u; \
+ iw_u.parts.msw = (ix0); \
+ iw_u.parts.lsw = (ix1); \
+ (d) = iw_u.value; \
+} while (0)
+
+/* Set the more significant 32 bits of a double from an int. */
+
+#define SET_HIGH_WORD(d,v) \
+do { \
+ Cyg_libm_ieee_double_shape_type sh_u; \
+ sh_u.value = (d); \
+ sh_u.parts.msw = (v); \
+ (d) = sh_u.value; \
+} while (0)
+
+/* Set the less significant 32 bits of a double from an int. */
+
+#define SET_LOW_WORD(d,v) \
+do { \
+ Cyg_libm_ieee_double_shape_type sl_u; \
+ sl_u.value = (d); \
+ sl_u.parts.lsw = (v); \
+ (d) = sl_u.value; \
+} while (0)
+
+
+// REPLACEMENTS FOR STUFF FROM MATH.H DUE TO CONFIG OPTION
+
+#ifdef CYGSYM_LIBM_NO_XOPEN_SVID_NAMESPACE_POLLUTION
+
+#define HUGE FLT_MAX // from float.h
+#define DOMAIN 1
+#define SING 2
+#define OVERFLOW 3
+#define UNDERFLOW 4
+#define TLOSS 5
+#define PLOSS 6
+
+struct exception {
+ int type; // One of DOMAIN, SING, OVERFLOW, UNDERFLOW, TLOSS, PLOSS
+ char *name; // Name of the function generating the exception
+ double arg1; // First argument to the function
+ double arg2; // Second argument to the function
+ double retval; // Value to be returned - can be altered by matherr()
+};
+
+externC int
+matherr( struct exception * ); // User-overridable error handling - see
+ // <pkgconf/libm.h> for a discussion
+#endif // ifdef CYGSYM_LIBM_NO_XOPEN_SVID_NAMESPACE_POLLUTION
+
+
+// FUNCTION PROTOTYPES
+
+// IEEE-754 style elementary functions */
+
+externC double
+__ieee754_sqrt( double );
+
+externC double
+__ieee754_acos( double );
+
+externC double
+__ieee754_acosh( double );
+
+externC double
+__ieee754_log( double );
+
+externC double
+__ieee754_atanh( double );
+
+externC double
+__ieee754_asin( double );
+
+externC double
+__ieee754_atan2( double, double );
+
+externC double
+__ieee754_exp( double );
+
+externC double
+__ieee754_cosh( double );
+
+externC double
+__ieee754_fmod( double, double );
+
+externC double
+__ieee754_pow( double, double );
+
+externC double
+__ieee754_lgamma_r( double, int * );
+
+externC double
+__ieee754_gamma_r( double, int * );
+
+externC double
+__ieee754_lgamma( double );
+
+externC double
+__ieee754_gamma( double );
+
+externC double
+__ieee754_log10( double );
+
+externC double
+__ieee754_sinh( double );
+
+externC double
+__ieee754_hypot( double, double );
+
+externC double
+__ieee754_j0( double );
+
+externC double
+__ieee754_j1( double );
+
+externC double
+__ieee754_y0( double );
+
+externC double
+__ieee754_y1( double );
+
+externC double
+__ieee754_jn( int, double );
+
+externC double
+__ieee754_yn( int, double );
+
+externC double
+__ieee754_remainder( double, double );
+
+externC int
+__ieee754_rem_pio2( double, double * );
+
+#ifdef CYGFUN_LIBM_SVID3_scalb
+externC double
+__ieee754_scalb( double, double );
+#else
+externC double
+__ieee754_scalb( double, int );
+#endif
+
+// FDLIBM kernel functions
+
+externC double
+__kernel_standard( double, double, int );
+
+externC double
+__kernel_sin( double, double, int );
+
+externC double
+__kernel_cos( double, double );
+
+externC double
+__kernel_tan( double, double, int );
+
+externC int
+__kernel_rem_pio2( double *, double *, int, int, int, const int * );
+
+#endif // ifdef CYGPKG_LIBM
+
+#endif // CYGONCE_LIBM_MATHINCL_FDLIBM_H multiple inclusion protection
+
+// EOF fdlibm.h
diff --git a/cesar/ecos/packages/language/c/libm/current/src/misc/compatmode.cxx b/cesar/ecos/packages/language/c/libm/current/src/misc/compatmode.cxx
new file mode 100644
index 0000000000..20c8840482
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/misc/compatmode.cxx
@@ -0,0 +1,215 @@
+//===========================================================================
+//
+// compatmode.cxx
+//
+// Compatibility mode setting for Math library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description: Contains the accessor functions to get and set the standards
+// compatibility mode of the Math library
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Tracing macros
+
+#include <math.h> // Main header for math library
+
+#ifdef CYGSEM_LIBM_THREAD_SAFE_COMPAT_MODE
+# include <pkgconf/kernel.h> // Kernel configuration
+# include <cyg/kernel/thread.hxx> // Kernel thread header
+# include <cyg/kernel/thread.inl> // and its associated inlines
+# include <cyg/kernel/mutex.hxx> // We need mutexes too
+#endif
+
+// GLOBAL VARIABLES
+
+#ifndef CYGSEM_LIBM_THREAD_SAFE_COMPAT_MODE
+
+# ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+Cyg_libm_compat_t cygvar_libm_compat_mode = CYGNUM_LIBM_COMPAT_IEEE;
+# else
+Cyg_libm_compat_t cygvar_libm_compat_mode = CYGNUM_LIBM_COMPAT_DEFAULT;
+# endif
+
+#else // ifndef CYGSEM_LIBM_THREAD_SAFE_COMPAT_MODE
+
+static Cyg_Mutex cyg_libm_mode_thread_data_index_mutex;
+static cyg_count32 cyg_libm_mode_thread_data_index = CYGNUM_KERNEL_THREADS_DATA_MAX;
+
+
+# if defined(CYGDBG_USE_TRACING) && \
+ defined(CYGNUM_LIBM_COMPATMODE_TRACE_LEVEL)
+static int libm_compatmode_trace = CYGNUM_LIBM_COMPATMODE_TRACE_LEVEL;
+# define TL1 (0 < libm_compatmode_trace )
+# else
+# define TL1 (0)
+# endif
+
+// FUNCTIONS
+
+
+Cyg_libm_compat_t
+cyg_libm_get_compat_mode( void )
+{
+ Cyg_Thread *self = Cyg_Thread::self();
+ CYG_ADDRWORD current_val;
+
+ CYG_REPORT_FUNCNAMETYPE( "Cyg_libm_get_compat_mode", "mode is %d" );
+
+ // First check if this is the first thread to get here, and if so,
+ // initialise the thread data index
+
+ if (cyg_libm_mode_thread_data_index == CYGNUM_KERNEL_THREADS_DATA_MAX)
+ {
+ CYG_TRACE0( TL1, "Index unset, locking mutex to allocate" );
+
+ // Lock mutex and then check again - less overhead for normal
+ // execution path
+ cyg_libm_mode_thread_data_index_mutex.lock();
+
+ if (cyg_libm_mode_thread_data_index == CYGNUM_KERNEL_THREADS_DATA_MAX)
+ {
+ CYG_TRACE0( TL1, "Allocating index" );
+ cyg_libm_mode_thread_data_index = self->new_data_index();
+
+ } // if
+
+ cyg_libm_mode_thread_data_index_mutex.unlock();
+
+ self->set_data( cyg_libm_mode_thread_data_index,
+ CYGNUM_LIBM_COMPAT_DEFAULT );
+
+ // But if we've gone through this, then we know what the mode is!
+ CYG_REPORT_RETVAL( CYGNUM_LIBM_COMPAT_DEFAULT );
+ return CYGNUM_LIBM_COMPAT_DEFAULT;
+ } // if
+
+ CYG_TRACE0( TL1, "Index set, now fetching per-thread data" );
+
+ // If we're here, then the index is set up
+
+ current_val = self->get_data( cyg_libm_mode_thread_data_index );
+
+ // If its at the "default" setting, then return the default
+ if (current_val == CYGNUM_LIBM_COMPAT_UNINIT)
+ {
+ CYG_REPORT_RETVAL( CYGNUM_LIBM_COMPAT_DEFAULT );
+ return CYGNUM_LIBM_COMPAT_DEFAULT;
+ } // if
+
+ CYG_REPORT_RETVAL( current_val );
+ return (Cyg_libm_compat_t) current_val;
+} // cyg_libm_get_compat_mode()
+
+
+Cyg_libm_compat_t
+cyg_libm_set_compat_mode( Cyg_libm_compat_t new_mode )
+{
+ Cyg_Thread *self = Cyg_Thread::self();
+ CYG_ADDRWORD current_val;
+
+ CYG_REPORT_FUNCNAMETYPE( "Cyg_libm_set_compat_mode", "old mode was %d" );
+ CYG_REPORT_FUNCARG1DV( new_mode );
+
+ // First check if this is the first thread to get here, and if so,
+ // initialise the thread data index
+
+ if (cyg_libm_mode_thread_data_index == CYGNUM_KERNEL_THREADS_DATA_MAX)
+ {
+ CYG_TRACE0( TL1, "Index unset, locking mutex to allocate" );
+
+ // Lock mutex and then check again - less overhead for normal
+ // execution path
+ cyg_libm_mode_thread_data_index_mutex.lock();
+
+ if (cyg_libm_mode_thread_data_index == CYGNUM_KERNEL_THREADS_DATA_MAX)
+ {
+ CYG_TRACE0( TL1, "Allocating index" );
+ cyg_libm_mode_thread_data_index = self->new_data_index();
+
+ } // if
+
+ cyg_libm_mode_thread_data_index_mutex.unlock();
+
+ self->set_data( cyg_libm_mode_thread_data_index,
+ new_mode );
+
+ // But if we've gone through this, then we know what the old mode was!
+
+ CYG_REPORT_RETVAL( CYGNUM_LIBM_COMPAT_UNINIT );
+ return CYGNUM_LIBM_COMPAT_UNINIT;
+
+ } // if
+
+ // If we're here, then the index is set up
+
+ CYG_TRACE0( TL1, "Index set, now fetching per-thread data" );
+
+ current_val = self->get_data( cyg_libm_mode_thread_data_index );
+
+ self->set_data( cyg_libm_mode_thread_data_index,
+ new_mode );
+
+ CYG_REPORT_RETVAL( current_val );
+ return (Cyg_libm_compat_t) current_val;
+
+} // cyg_libm_set_compat_mode()
+
+#endif // ifdef CYGSEM_LIBM_THREAD_SAFE_COMPAT_MODE
+
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF compatmode.cxx
diff --git a/cesar/ecos/packages/language/c/libm/current/src/misc/infconst.c b/cesar/ecos/packages/language/c/libm/current/src/misc/infconst.c
new file mode 100644
index 0000000000..96c491c5fd
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/misc/infconst.c
@@ -0,0 +1,84 @@
+//===========================================================================
+//
+// infconst.c
+//
+// Infinity constant
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description: Defines a constant cyg_libm_infinity so that we can define
+// HUGE_VAL
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+ // including endian-ness
+#include <math.h> // Main header for math library
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+
+
+// GLOBALS
+
+#if (CYG_BYTEORDER == CYG_MSBFIRST) // Big endian
+
+const Cyg_libm_ieee_double_shape_type cyg_libm_infinity = { {0x7ff00000, 0} };
+
+#else // Little endian
+
+const Cyg_libm_ieee_double_shape_type cyg_libm_infinity = { {0, 0x7ff00000} };
+
+#endif
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF infconst.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/misc/matherr.c b/cesar/ecos/packages/language/c/libm/current/src/misc/matherr.c
new file mode 100644
index 0000000000..0ae47479fa
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/misc/matherr.c
@@ -0,0 +1,88 @@
+//===========================================================================
+//
+// matherr.c
+//
+// Default matherr() error handler
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description: Contains an empty default matherr() function which the user
+// can override if they want
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#if defined(CYGPKG_LIBM)
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Tracing macros
+
+#include <math.h> // Main header for math library
+#include "mathincl/fdlibm.h" // Internal header for math library
+
+int
+matherr( struct exception *x ) __attribute__ ((weak));
+
+int
+matherr( struct exception *x )
+{
+ CYG_REPORT_FUNCNAMETYPE( "matherr", "returning %d" );
+
+ CYG_UNUSED_PARAM( struct exception *, x );
+ CYG_EMPTY_STATEMENT;
+
+ CYG_REPORT_RETVAL( 0 );
+ return 0;
+} // matherr()
+
+
+#endif // if defined(CYGPKG_LIBM)
+
+// EOF matherr.c
diff --git a/cesar/ecos/packages/language/c/libm/current/src/misc/signgam.cxx b/cesar/ecos/packages/language/c/libm/current/src/misc/signgam.cxx
new file mode 100644
index 0000000000..d4590f4ee5
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/misc/signgam.cxx
@@ -0,0 +1,147 @@
+//===========================================================================
+//
+// signgam.cxx
+//
+// Support sign of the gamma*() functions in Math library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description: Contains the accessor functions to get and set the stored sign
+// of the gamma*() functions in the math library
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Tracing macros
+
+#include <math.h> // Main header for math library
+
+#ifdef CYGSEM_LIBM_THREAD_SAFE_GAMMA_FUNCTIONS
+# include <pkgconf/kernel.h> // Kernel configuration
+# include <cyg/kernel/thread.hxx> // Kernel thread header
+# include <cyg/kernel/thread.inl> // and its associated inlines
+# include <cyg/kernel/mutex.hxx> // We need mutexes too
+#endif
+
+
+// GLOBAL VARIABLES
+
+#ifndef CYGSEM_LIBM_THREAD_SAFE_GAMMA_FUNCTIONS
+
+int signgam = 0;
+
+#else // ifndef CYGSEM_LIBM_THREAD_SAFE_GAMMA_FUNCTIONS
+
+static Cyg_Mutex cyg_libm_signgam_thread_data_index_mutex;
+static cyg_count32 cyg_libm_signgam_thread_data_index = CYGNUM_KERNEL_THREADS_DATA_MAX;
+
+# if defined(CYGDBG_USE_TRACING) && \
+ defined(CYGNUM_LIBM_SIGNGAM_TRACE_LEVEL)
+static int libm_signgam_trace = CYGNUM_LIBM_SIGNGAM_TRACE_LEVEL;
+# define TL1 (0 < libm_signgam_trace )
+# else
+# define TL1 (0)
+# endif
+
+#endif // ifndef CYGSEM_LIBM_THREAD_SAFE_GAMMA_FUNCTIONS
+
+// FUNCTIONS
+
+#ifdef CYGSEM_LIBM_THREAD_SAFE_GAMMA_FUNCTIONS
+
+int *
+cyg_libm_get_signgam_p( void )
+{
+ Cyg_Thread *self = Cyg_Thread::self();
+ CYG_ADDRWORD *current_val_p;
+
+ CYG_REPORT_FUNCNAMETYPE( "Cyg_libm_get_signgam_p", "&signgam is %08x" );
+
+ // First check if this is the first thread to get here, and if so,
+ // initialise the thread data index
+
+ if (cyg_libm_signgam_thread_data_index == CYGNUM_KERNEL_THREADS_DATA_MAX)
+ {
+ CYG_TRACE0( TL1, "Index unset, locking mutex to allocate" );
+
+ // Lock mutex and then check again - less overhead for normal
+ // execution path
+ cyg_libm_signgam_thread_data_index_mutex.lock();
+
+ if (cyg_libm_signgam_thread_data_index == CYGNUM_KERNEL_THREADS_DATA_MAX)
+ {
+ CYG_TRACE0( TL1, "Allocating index" );
+ cyg_libm_signgam_thread_data_index = self->new_data_index();
+
+ } // if
+
+ cyg_libm_signgam_thread_data_index_mutex.unlock();
+
+ } // if
+
+ CYG_TRACE0( TL1, "Index set, now fetching per-thread data" );
+
+ // If we're here, then the index is set up
+
+ current_val_p = self->get_data_ptr( cyg_libm_signgam_thread_data_index );
+
+ CYG_REPORT_RETVAL( current_val_p );
+ return (int *) current_val_p;
+} // cyg_libm_get_signgam_p()
+
+#endif // ifdef CYGSEM_LIBM_THREAD_SAFE_GAMMA_FUNCTIONS
+
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF signgam.cxx
diff --git a/cesar/ecos/packages/language/c/libm/current/src/misc/standard.c b/cesar/ecos/packages/language/c/libm/current/src/misc/standard.c
new file mode 100644
index 0000000000..291db071db
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/src/misc/standard.c
@@ -0,0 +1,832 @@
+//===========================================================================
+//
+// signgam.cxx
+//
+// Support sign of the gamma*() functions in Math library
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description: Contains the accessor functions to get and set the stored sign
+// of the gamma*() functions in the math library
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+/* @(#)k_standard.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ *
+ */
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+// Include the Math library?
+#ifdef CYGPKG_LIBM
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/cyg_trac.h> // Tracing macros
+
+#include <math.h> // Main header for math library
+#include "mathincl/fdlibm.h" // Internal header for math library
+
+#include <cyg/error/codes.h> // standard error codes
+
+#ifndef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+#include <errno.h>
+#else
+static int errno; // this whole file won't be used if we're IEEE only, but
+ // doing this keeps the compiler happy
+#endif
+
+#ifdef CYGSEM_LIBM_USE_STDERR
+
+#include <stdio.h>
+#define WRITE2(u,v) fputs(u, stderr)
+
+#else
+
+#define WRITE2(u,v) 0
+
+#endif // ifdef CYGSEM_LIBM_USE_STDERR
+
+
+// GLOBALS
+
+static const double zero = 0.0;
+
+// FUNCTIONS
+
+/*
+ * Standard conformance (non-IEEE) on exception cases.
+ * Mapping:
+ * 1 -- acos(|x|>1)
+ * 2 -- asin(|x|>1)
+ * 3 -- atan2(+-0,+-0)
+ * 4 -- hypot overflow
+ * 5 -- cosh overflow
+ * 6 -- exp overflow
+ * 7 -- exp underflow
+ * 8 -- y0(0)
+ * 9 -- y0(-ve)
+ * 10-- y1(0)
+ * 11-- y1(-ve)
+ * 12-- yn(0)
+ * 13-- yn(-ve)
+ * 14-- lgamma(finite) overflow
+ * 15-- lgamma(-integer)
+ * 16-- log(0)
+ * 17-- log(x<0)
+ * 18-- log10(0)
+ * 19-- log10(x<0)
+ * 20-- pow(0.0,0.0)
+ * 21-- pow(x,y) overflow
+ * 22-- pow(x,y) underflow
+ * 23-- pow(0,negative)
+ * 24-- pow(neg,non-integral)
+ * 25-- sinh(finite) overflow
+ * 26-- sqrt(negative)
+ * 27-- fmod(x,0)
+ * 28-- remainder(x,0)
+ * 29-- acosh(x<1)
+ * 30-- atanh(|x|>1)
+ * 31-- atanh(|x|=1)
+ * 32-- scalb overflow
+ * 33-- scalb underflow
+ * 34-- j0(|x|>X_TLOSS)
+ * 35-- y0(x>X_TLOSS)
+ * 36-- j1(|x|>X_TLOSS)
+ * 37-- y1(x>X_TLOSS)
+ * 38-- jn(|x|>X_TLOSS, n)
+ * 39-- yn(x>X_TLOSS, n)
+ * 40-- gamma(finite) overflow
+ * 41-- gamma(-integer)
+ * 42-- pow(NaN,0.0)
+ * 43-- ldexp overflow
+ * 44-- ldexp underflow
+ */
+
+
+double
+__kernel_standard(double x, double y, int type)
+{
+ struct exception exc;
+
+#ifdef CYGSEM_LIBM_USE_STDERR
+ (void) fflush(stdout);
+#endif
+ exc.arg1 = x;
+ exc.arg2 = y;
+ switch(type) {
+ case 1:
+ /* acos(|x|>1) */
+ exc.type = DOMAIN;
+ exc.name = "acos";
+ exc.retval = zero;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("acos: DOMAIN error\n", 19);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 2:
+ /* asin(|x|>1) */
+ exc.type = DOMAIN;
+ exc.name = "asin";
+ exc.retval = zero;
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("asin: DOMAIN error\n", 19);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 3:
+ /* atan2(+-0,+-0) */
+ exc.arg1 = y;
+ exc.arg2 = x;
+ exc.type = DOMAIN;
+ exc.name = "atan2";
+ exc.retval = zero;
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("atan2: DOMAIN error\n", 20);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 4:
+ /* hypot(finite,finite) overflow */
+ exc.type = OVERFLOW;
+ exc.name = "hypot";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = HUGE;
+ else
+ exc.retval = HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ errno = ERANGE;
+ }
+ break;
+ case 5:
+ /* cosh(finite) overflow */
+ exc.type = OVERFLOW;
+ exc.name = "cosh";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = HUGE;
+ else
+ exc.retval = HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ errno = ERANGE;
+ }
+ break;
+ case 6:
+ /* exp(finite) overflow */
+ exc.type = OVERFLOW;
+ exc.name = "exp";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = HUGE;
+ else
+ exc.retval = HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ errno = ERANGE;
+ }
+ break;
+ case 7:
+ /* exp(finite) underflow */
+ exc.type = UNDERFLOW;
+ exc.name = "exp";
+ exc.retval = zero;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ errno = ERANGE;
+ }
+ break;
+ case 8:
+ /* y0(0) = -inf */
+ exc.type = DOMAIN; /* should be SING for IEEE */
+ exc.name = "y0";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = -HUGE;
+ else
+ exc.retval = -HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("y0: DOMAIN error\n", 17);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 9:
+ /* y0(x<0) = NaN */
+ exc.type = DOMAIN;
+ exc.name = "y0";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = -HUGE;
+ else
+ exc.retval = -HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("y0: DOMAIN error\n", 17);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 10:
+ /* y1(0) = -inf */
+ exc.type = DOMAIN; /* should be SING for IEEE */
+ exc.name = "y1";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = -HUGE;
+ else
+ exc.retval = -HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("y1: DOMAIN error\n", 17);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 11:
+ /* y1(x<0) = NaN */
+ exc.type = DOMAIN;
+ exc.name = "y1";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = -HUGE;
+ else
+ exc.retval = -HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("y1: DOMAIN error\n", 17);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 12:
+ /* yn(n,0) = -inf */
+ exc.type = DOMAIN; /* should be SING for IEEE */
+ exc.name = "yn";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = -HUGE;
+ else
+ exc.retval = -HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("yn: DOMAIN error\n", 17);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 13:
+ /* yn(x<0) = NaN */
+ exc.type = DOMAIN;
+ exc.name = "yn";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = -HUGE;
+ else
+ exc.retval = -HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("yn: DOMAIN error\n", 17);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 14:
+ /* lgamma(finite) overflow */
+ exc.type = OVERFLOW;
+ exc.name = "lgamma";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = HUGE;
+ else
+ exc.retval = HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ errno = ERANGE;
+ }
+ break;
+ case 15:
+ /* lgamma(-integer) or lgamma(0) */
+ exc.type = SING;
+ exc.name = "lgamma";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = HUGE;
+ else
+ exc.retval = HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("lgamma: SING error\n", 19);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 16:
+ /* log(0) */
+ exc.type = SING;
+ exc.name = "log";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = -HUGE;
+ else
+ exc.retval = -HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("log: SING error\n", 16);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 17:
+ /* log(x<0) */
+ exc.type = DOMAIN;
+ exc.name = "log";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = -HUGE;
+ else
+ exc.retval = -HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("log: DOMAIN error\n", 18);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 18:
+ /* log10(0) */
+ exc.type = SING;
+ exc.name = "log10";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = -HUGE;
+ else
+ exc.retval = -HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("log10: SING error\n", 18);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 19:
+ /* log10(x<0) */
+ exc.type = DOMAIN;
+ exc.name = "log10";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = -HUGE;
+ else
+ exc.retval = -HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("log10: DOMAIN error\n", 20);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 20:
+ /* pow(0.0,0.0) */
+ /* error only if cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID */
+ exc.type = DOMAIN;
+ exc.name = "pow";
+ exc.retval = zero;
+ if (cyg_libm_get_compat_mode() != CYGNUM_LIBM_COMPAT_SVID) exc.retval = 1.0;
+ else if (!matherr(&exc)) {
+ (void) WRITE2("pow(0,0): DOMAIN error\n", 23);
+ errno = EDOM;
+ }
+ break;
+ case 21:
+ /* pow(x,y) overflow */
+ exc.type = OVERFLOW;
+ exc.name = "pow";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ exc.retval = HUGE;
+ y *= 0.5;
+ if(x<zero&&rint(y)!=y) exc.retval = -HUGE;
+ } else {
+ exc.retval = HUGE_VAL;
+ y *= 0.5;
+ if(x<zero&&rint(y)!=y) exc.retval = -HUGE_VAL;
+ }
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ errno = ERANGE;
+ }
+ break;
+ case 22:
+ /* pow(x,y) underflow */
+ exc.type = UNDERFLOW;
+ exc.name = "pow";
+ exc.retval = zero;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ errno = ERANGE;
+ }
+ break;
+ case 23:
+ /* 0**neg */
+ exc.type = DOMAIN;
+ exc.name = "pow";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = zero;
+ else
+ exc.retval = -HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("pow(0,neg): DOMAIN error\n", 25);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 24:
+ /* neg**non-integral */
+ exc.type = DOMAIN;
+ exc.name = "pow";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = zero;
+ else
+ exc.retval = zero/zero; /* X/Open allow NaN */
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("neg**non-integral: DOMAIN error\n", 32);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 25:
+ /* sinh(finite) overflow */
+ exc.type = OVERFLOW;
+ exc.name = "sinh";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = ( (x>zero) ? HUGE : -HUGE);
+ else
+ exc.retval = ( (x>zero) ? HUGE_VAL : -HUGE_VAL);
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ errno = ERANGE;
+ }
+ break;
+ case 26:
+ /* sqrt(x<0) */
+ exc.type = DOMAIN;
+ exc.name = "sqrt";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = zero;
+ else
+ exc.retval = zero/zero;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("sqrt: DOMAIN error\n", 19);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 27:
+ /* fmod(x,0) */
+ exc.type = DOMAIN;
+ exc.name = "fmod";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = x;
+ else
+ exc.retval = zero/zero;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("fmod: DOMAIN error\n", 20);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 28:
+ /* remainder(x,0) */
+ exc.type = DOMAIN;
+ exc.name = "remainder";
+ exc.retval = zero/zero;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("remainder: DOMAIN error\n", 24);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 29:
+ /* acosh(x<1) */
+ exc.type = DOMAIN;
+ exc.name = "acosh";
+ exc.retval = zero/zero;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("acosh: DOMAIN error\n", 20);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 30:
+ /* atanh(|x|>1) */
+ exc.type = DOMAIN;
+ exc.name = "atanh";
+ exc.retval = zero/zero;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("atanh: DOMAIN error\n", 20);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 31:
+ /* atanh(|x|=1) */
+ exc.type = SING;
+ exc.name = "atanh";
+ exc.retval = x/zero; /* sign(x)*inf */
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("atanh: SING error\n", 18);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 32:
+ /* scalb overflow; SVID also returns +-HUGE_VAL */
+ exc.type = OVERFLOW;
+ exc.name = "scalb";
+ exc.retval = x > zero ? HUGE_VAL : -HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ errno = ERANGE;
+ }
+ break;
+ case 33:
+ /* scalb underflow */
+ exc.type = UNDERFLOW;
+ exc.name = "scalb";
+ exc.retval = copysign(zero,x);
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ errno = ERANGE;
+ }
+ break;
+ case 34:
+ /* j0(|x|>X_TLOSS) */
+ exc.type = TLOSS;
+ exc.name = "j0";
+ exc.retval = zero;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2(exc.name, 2);
+ (void) WRITE2(": TLOSS error\n", 14);
+ }
+ errno = ERANGE;
+ }
+ break;
+ case 35:
+ /* y0(x>X_TLOSS) */
+ exc.type = TLOSS;
+ exc.name = "y0";
+ exc.retval = zero;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2(exc.name, 2);
+ (void) WRITE2(": TLOSS error\n", 14);
+ }
+ errno = ERANGE;
+ }
+ break;
+ case 36:
+ /* j1(|x|>X_TLOSS) */
+ exc.type = TLOSS;
+ exc.name = "j1";
+ exc.retval = zero;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2(exc.name, 2);
+ (void) WRITE2(": TLOSS error\n", 14);
+ }
+ errno = ERANGE;
+ }
+ break;
+ case 37:
+ /* y1(x>X_TLOSS) */
+ exc.type = TLOSS;
+ exc.name = "y1";
+ exc.retval = zero;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2(exc.name, 2);
+ (void) WRITE2(": TLOSS error\n", 14);
+ }
+ errno = ERANGE;
+ }
+ break;
+ case 38:
+ /* jn(|x|>X_TLOSS) */
+ exc.type = TLOSS;
+ exc.name = "jn";
+ exc.retval = zero;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2(exc.name, 2);
+ (void) WRITE2(": TLOSS error\n", 14);
+ }
+ errno = ERANGE;
+ }
+ break;
+ case 39:
+ /* yn(x>X_TLOSS) */
+ exc.type = TLOSS;
+ exc.name = "yn";
+ exc.retval = zero;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2(exc.name, 2);
+ (void) WRITE2(": TLOSS error\n", 14);
+ }
+ errno = ERANGE;
+ }
+ break;
+ case 40:
+ /* gamma(finite) overflow */
+ exc.type = OVERFLOW;
+ exc.name = "gamma";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = HUGE;
+ else
+ exc.retval = HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ errno = ERANGE;
+ }
+ break;
+ case 41:
+ /* gamma(-integer) or gamma(0) */
+ exc.type = SING;
+ exc.name = "gamma";
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID)
+ exc.retval = HUGE;
+ else
+ exc.retval = HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = EDOM;
+ else if (!matherr(&exc)) {
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID) {
+ (void) WRITE2("gamma: SING error\n", 18);
+ }
+ errno = EDOM;
+ }
+ break;
+ case 42:
+ /* pow(NaN,0.0) */
+ /* error only if cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_SVID & CYGNUM_LIBM_COMPAT_XOPEN */
+ exc.type = DOMAIN;
+ exc.name = "pow";
+ exc.retval = x;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE ||
+ cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX) exc.retval = 1.0;
+ else if (!matherr(&exc)) {
+ errno = EDOM;
+ }
+ break;
+ case 43:
+ /* ldexp overflow; SVID also returns +-HUGE_VAL */
+ exc.type = OVERFLOW;
+ exc.name = "ldexp";
+ exc.retval = x > zero ? HUGE_VAL : -HUGE_VAL;
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ errno = ERANGE;
+ }
+ break;
+ case 44:
+ /* ldexp underflow */
+ exc.type = UNDERFLOW;
+ exc.name = "ldexp";
+ exc.retval = copysign(zero,x);
+ if (cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_POSIX)
+ errno = ERANGE;
+ else if (!matherr(&exc)) {
+ errno = ERANGE;
+ }
+ break;
+ }
+ return exc.retval;
+}
+
+#endif // ifdef CYGPKG_LIBM
+
+// EOF standard.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/acos.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/acos.c
new file mode 100644
index 0000000000..c526aa6631
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/acos.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// acos.c
+//
+// Test of acos() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/acos.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(acos_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &acos, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_NONE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &acos_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("acos() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("acos() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library acos() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "acos() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF acos.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/acos.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/acos.h
new file mode 100644
index 0000000000..490f68d4a0
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/acos.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_ACOS_H
+#define CYGONCE_LIBM_ACOS_H
+//===========================================================================
+//
+// acos.h
+//
+// Test vectors for testing of acos() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/acos.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define ACOS_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t acos_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 604042796u, 2506787616u, 3214772338u, 2077734866u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 2, 182169888u, 3065862417u, 1106988572u, 4273582707u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 3, 2664755801u, 1226547830u, 1071032732u, 3857964939u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 4, 94291757u, 4010703484u, 1081727025u, 4287567452u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 5, 118911615u, 2977931045u, 1104283808u, 3843658091u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 6, 2656608405u, 3088088668u, 1073408149u, 2318866154u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 7, 263730613u, 2451317798u, 3210911814u, 1038562750u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 8, 580821368u, 2221564313u, 1059115557u, 977275158u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 9, 399687375u, 97950278u, 3204919842u, 1605286142u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 10, 460757591u, 4233776869u, 1087533966u, 1919858904u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 11, 2870376804u, 1472965721u, 3230691143u, 2574511435u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 12, 2882092039u, 1204637550u, 3213143089u, 2421516003u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 13, 3037750340u, 3337705339u, 3238331976u, 3183442542u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 14, 2949649050u, 1086075996u, 1067714579u, 3477152375u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 15, 535591366u, 247024800u, 1040265469u, 3354345619u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 16, 63178737u, 2781269805u, 3188799281u, 3391715197u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 17, 768313194u, 865544864u, 3230216062u, 1200273272u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 18, 591877388u, 3157038143u, 3249401130u, 314151656u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 19, 3219509280u, 1564829925u, 1065671376u, 3088950051u, 1073910026u, 254064179u, 0, ACOS_TOLERANCE, 0},
+{ 20, 141374533u, 3933975298u, 1065991760u, 2304772640u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 21, 2396283075u, 1799495751u, 1094899225u, 1827380665u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 22, 2598153594u, 1112370977u, 1061103890u, 196988907u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 23, 1040851532u, 490122851u, 3216810265u, 576637874u, 1073291771u, 1410328704u, 0, ACOS_TOLERANCE, 0},
+{ 24, 849190915u, 1390621543u, 1055043150u, 915412872u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 25, 488493877u, 2591320551u, 1070339013u, 1237443094u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 26, 3077582663u, 3936235618u, 1099376266u, 1904940295u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 27, 71827124u, 222155510u, 1044902177u, 252085215u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 28, 2583183683u, 4139068910u, 3215004552u, 4245048106u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 29, 32118299u, 168794155u, 1090475726u, 3160414606u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 30, 975557826u, 4157503437u, 1104600163u, 1792103377u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 31, 137283993u, 1382645956u, 3240285101u, 4024164216u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 32, 118046910u, 3480120317u, 1100404348u, 478417819u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 33, 2828521286u, 2549311006u, 1055917530u, 3778440054u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 34, 2530903114u, 1593784258u, 1069213493u, 1951351053u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 35, 3103251986u, 631744430u, 3206072611u, 1047143174u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 36, 722650436u, 1584726864u, 3215417793u, 624695933u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 37, 2434300838u, 705725219u, 3217662205u, 1967294577u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 38, 664091785u, 2952818482u, 3239402263u, 1848641259u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 39, 642185311u, 1370937055u, 1055482637u, 2410810400u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 40, 889092079u, 1330047076u, 1093469262u, 1857263512u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 41, 2562391789u, 1246486570u, 1067165665u, 743938884u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 42, 1013509315u, 3107531809u, 1058433800u, 958446936u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 43, 2379321348u, 1698195744u, 3234826710u, 1808768063u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 44, 223594865u, 2594747457u, 1045397427u, 3927603841u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 45, 2251329048u, 348093397u, 1064733299u, 1710279345u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 46, 3162272236u, 3528946000u, 1045927362u, 1602290403u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 47, 2415703348u, 398813542u, 1052866292u, 1436851684u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 48, 1033199706u, 3319748577u, 3227196113u, 3607301229u, 1073291771u, 1413732247u, 0, ACOS_TOLERANCE, 0},
+{ 49, 23891811u, 2548745907u, 1105253912u, 370162110u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 50, 764517244u, 4204294028u, 3192923960u, 2626702805u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 51, 173888262u, 390319448u, 1104422077u, 120202647u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 52, 2730779741u, 2815627218u, 1099019491u, 731750493u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 53, 864070021u, 3900661840u, 3200970392u, 2907096477u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 54, 842667049u, 4269246624u, 3222902057u, 2762779203u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 55, 2347188326u, 184131949u, 3225314008u, 2237882876u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 56, 2323813472u, 4276663739u, 3254076585u, 4265258845u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 57, 560407162u, 1656691045u, 3252113914u, 4132573504u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 58, 271448936u, 1052817888u, 1061186300u, 352861436u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 59, 2742827957u, 636068836u, 1093702210u, 4149510462u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 60, 3110435514u, 1869774195u, 1056841761u, 2029664212u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 61, 2782135403u, 481356510u, 1098012633u, 1760061418u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 62, 2210852465u, 2918398424u, 1066749948u, 3643952367u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 63, 2255864064u, 3722025458u, 3192516074u, 1732245037u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 64, 984980019u, 1533536108u, 3226159655u, 3412938290u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 65, 2302294008u, 3539403428u, 1044896671u, 2743023547u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 66, 2437282418u, 965485575u, 1074677964u, 2239092099u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 67, 3161462367u, 479602785u, 3245398415u, 1570702137u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 68, 454239397u, 3987656554u, 3201134469u, 2639458165u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 69, 270690192u, 902270460u, 3200236493u, 2060263082u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 70, 3101979469u, 119561873u, 1067242459u, 4238218095u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 71, 342005410u, 1489535917u, 1052674720u, 3229843554u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 72, 2431479818u, 1372780257u, 1087299442u, 2877794600u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 73, 749807578u, 547642046u, 1068507828u, 2261901967u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 74, 2886390034u, 2655610998u, 1063417350u, 3897975437u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 75, 250812866u, 3444039742u, 3204905205u, 72985499u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 76, 2855285209u, 685471642u, 1052893000u, 3994091533u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 77, 438792265u, 3273039144u, 3234242951u, 2105125638u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 78, 2645727074u, 1149591862u, 1079300031u, 2852890893u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 79, 2752966212u, 964007987u, 1089046728u, 3863233156u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 80, 512535166u, 27186676u, 1092292231u, 131338606u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 81, 670177097u, 2614232599u, 3216359929u, 1186945904u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 82, 3154698801u, 1896750851u, 3253696392u, 920368431u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 83, 2442691738u, 29704081u, 3253306050u, 1477489465u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 84, 2226625355u, 1908380994u, 1041152721u, 3015183476u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 85, 681844560u, 470785250u, 3211309660u, 1296080311u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 86, 3173267991u, 3766553196u, 1063117318u, 3703961407u, 1073291771u, 1413754298u, 0, ACOS_TOLERANCE, 0},
+{ 87, 2455017061u, 4149594176u, 1090202405u, 3293225914u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 88, 313616459u, 77747397u, 3224848375u, 1095737976u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 89, 3083383675u, 594138985u, 3217133121u, 1435082240u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 90, 2240663447u, 1803548147u, 3240157452u, 4122845725u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 91, 692524862u, 311336721u, 1045850005u, 536548906u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 92, 39331613u, 1667857221u, 1062792545u, 2329662186u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 93, 2957138228u, 1918705224u, 1059647808u, 2861487662u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 94, 3070750532u, 3709104626u, 3220237199u, 997732637u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 95, 2444448896u, 1774627130u, 3192826790u, 2597228841u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 96, 702397604u, 2705552003u, 1041691115u, 3314033947u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 97, 2530979608u, 820086279u, 1085001393u, 3341643348u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 98, 481329467u, 3136820894u, 1093140313u, 4023285864u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 99, 2613158354u, 443835590u, 3197412883u, 166402802u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 100, 2939403391u, 3572369260u, 3225005050u, 1183942370u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 101, 456836645u, 2446986142u, 1100226690u, 3561788365u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 102, 995574146u, 279968558u, 1056612692u, 605059609u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 103, 2720425755u, 1360758659u, 1045149981u, 3634982365u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 104, 219648965u, 4068690904u, 3212392076u, 3185930294u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 105, 245268713u, 1440185463u, 1067865294u, 2959231845u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 106, 3124081158u, 3352139409u, 3211602972u, 64439686u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 107, 2799322658u, 1508169460u, 3213875925u, 3893561170u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 108, 2966132661u, 146763905u, 1061635587u, 1173102190u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 109, 2950948333u, 2882725208u, 1046547680u, 3137609802u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 110, 281607514u, 2987408195u, 1104831334u, 2360906919u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 111, 583237163u, 2272922429u, 3230247604u, 3220743043u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 112, 2279259017u, 486798710u, 1051847313u, 1164056378u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 113, 2707413568u, 14851197u, 3194383659u, 2622433447u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 114, 2729877535u, 1346176789u, 1059030682u, 1585821890u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 115, 925396515u, 1008663444u, 3253626162u, 1058337847u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 116, 2213579028u, 3506658319u, 3219431539u, 543446309u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 117, 3163196851u, 3413687955u, 1072253426u, 343404215u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 118, 334409439u, 4266232536u, 3240608065u, 4109813813u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 119, 3177753519u, 1144242316u, 1071012025u, 2790944540u, 1073291771u, 1413757294u, 0, ACOS_TOLERANCE, 0},
+{ 120, 2754858880u, 265926617u, 1095794063u, 1345870736u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 121, 49590943u, 3193385121u, 1097323612u, 2009367488u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 122, 2389359641u, 1233370553u, 1064565351u, 322637795u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 123, 954404777u, 3410634251u, 3243916607u, 4042570547u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 124, 2849680709u, 2524001714u, 1072116817u, 3983083207u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 125, 959555327u, 3501343645u, 3237287213u, 1887353658u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 126, 2934409098u, 689800034u, 3246333414u, 2135700283u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 127, 263792941u, 4171919805u, 3238308636u, 3129081398u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 128, 926728083u, 1550999328u, 3219525990u, 2031663879u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 129, 2989628620u, 949669377u, 3226383614u, 3948448651u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 130, 2243494997u, 4293630712u, 1060526636u, 438407499u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 131, 2756107420u, 1535381711u, 1054391309u, 4072415576u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 132, 3025827769u, 1347758084u, 3238820771u, 1059069486u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 133, 3294258u, 3498512759u, 1092903052u, 2047817298u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 134, 2919775476u, 1226560794u, 1069263873u, 685537815u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 135, 982026620u, 4000990876u, 1076297936u, 3803689997u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 136, 499108416u, 2263729518u, 3254424928u, 3450332551u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 137, 347296393u, 1637536851u, 3238793417u, 747232103u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 138, 34763760u, 902498990u, 3205956257u, 245434170u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 139, 3201690145u, 1482770161u, 3244873095u, 2292235133u, 1073291776u, 3469509425u, 0, ACOS_TOLERANCE, 0},
+{ 140, 2990655242u, 36045768u, 1071182448u, 3868790688u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 141, 3083340050u, 1885951730u, 3207806174u, 2553919637u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 142, 2693238911u, 4059459408u, 1055146851u, 2731735627u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 143, 2290935302u, 3819720014u, 3203031655u, 4218515595u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 144, 2348280948u, 3038411370u, 3236511256u, 2472176453u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 145, 2880785553u, 182132862u, 3252592387u, 1793714415u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 146, 2799656331u, 4227997622u, 1087681073u, 3265812129u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 147, 801513493u, 1010183244u, 1091844280u, 675001864u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 148, 318478599u, 4193366103u, 1056610361u, 3831235255u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 149, 2378498000u, 465836562u, 3189131504u, 1330642846u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 150, 43741656u, 1192547728u, 1080448013u, 2251835756u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 151, 172875845u, 2123384287u, 3198090050u, 2528390848u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 152, 911443207u, 3964517760u, 3252496130u, 1755935266u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 153, 844811578u, 2753105123u, 3223721534u, 3995725873u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 154, 151452687u, 777231627u, 1042074674u, 36182517u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 155, 3158956730u, 3937520057u, 3230206414u, 1507556284u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 156, 910363913u, 1910829179u, 1052726418u, 90890556u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 157, 3107838682u, 1962827704u, 1080960105u, 1706263669u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 158, 2177675826u, 3863498922u, 1084020789u, 2439263794u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 159, 2909835385u, 2329801749u, 1098707350u, 2852802137u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 160, 2979393160u, 3548991905u, 3213586763u, 3269946829u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 161, 790744031u, 2009174302u, 1097495331u, 312449728u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 162, 2160628293u, 648730712u, 3246307879u, 4265764460u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 163, 1000831562u, 366653268u, 1051541874u, 1478215551u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 164, 2470023790u, 2605647918u, 1042539011u, 969681033u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 165, 2322196276u, 1909222641u, 1092825252u, 3029685419u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 166, 3159166635u, 1128432313u, 3200082887u, 2582838060u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 167, 2525309230u, 546560372u, 1070003814u, 2343707656u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 168, 849110626u, 309618405u, 3246395018u, 3002005209u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 169, 2706804529u, 3151760818u, 3196548461u, 1969485838u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 170, 639469972u, 3667631361u, 3196181592u, 3743448274u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 171, 2658009958u, 3097521578u, 3216630070u, 1141349287u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 172, 918158805u, 3403438584u, 3208257181u, 2221276438u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 173, 2401852086u, 1683102397u, 3250341256u, 108768173u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 174, 2343899229u, 564813835u, 1064153550u, 3058531228u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 175, 2813220880u, 131949913u, 1090262840u, 2146798879u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 176, 2465897203u, 1934391255u, 3188783235u, 1341236714u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 177, 1070130951u, 418478585u, 3248733961u, 5029000u, 1073086461u, 494572026u, 0, ACOS_TOLERANCE, 0},
+{ 178, 453997460u, 2676092597u, 1105486693u, 1833595891u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 179, 522042376u, 1030769844u, 1071155175u, 2766628533u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 180, 2635141434u, 1153943376u, 3209762784u, 953839852u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 181, 1029467775u, 143071571u, 1050966579u, 2318822594u, 1073291771u, 1413752317u, 0, ACOS_TOLERANCE, 0},
+{ 182, 287910954u, 1347533411u, 3242337825u, 3256720041u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 183, 444067826u, 1840809642u, 1105293543u, 639604076u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 184, 37282545u, 113530717u, 3194758036u, 699784099u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 185, 435549826u, 2950098243u, 1061587493u, 3565445501u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 186, 2385974507u, 2103316697u, 1076082218u, 4043789060u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 187, 811546601u, 1521715421u, 3251785075u, 651105558u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 188, 491306771u, 2545467538u, 3213898932u, 3889824094u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 189, 503065027u, 4133138143u, 3246676260u, 2160225215u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 190, 994621531u, 836655570u, 3245194924u, 2865254908u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 191, 2309344440u, 1678396836u, 3226762726u, 424413376u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 192, 2164934365u, 2155776900u, 3222643433u, 2889736031u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 193, 3003862757u, 33676353u, 1090754016u, 4128530794u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 194, 2386204171u, 3176672093u, 1052578754u, 2282864811u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 195, 446288958u, 2747259961u, 1103923331u, 1909074501u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 196, 3119895314u, 482497137u, 3223384022u, 3259766501u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 197, 2460401984u, 1710626079u, 3222593534u, 834878686u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 198, 3041977808u, 4271421721u, 1047020885u, 1742757458u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 199, 2215391645u, 1265459564u, 1080678447u, 685348463u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 200, 2688170568u, 4066044320u, 1054128905u, 376413109u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 201, 716821218u, 3237497681u, 3242751645u, 260260645u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 202, 2385659123u, 2882820086u, 1085407846u, 2301658312u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 203, 420514989u, 3656359254u, 3203021744u, 2817965308u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 204, 2841879402u, 2859722465u, 3197490752u, 3892072777u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 205, 2665431021u, 2538156443u, 3215734057u, 831239754u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 206, 953028035u, 3071308141u, 3231671892u, 30345936u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 207, 2210978501u, 3595439756u, 3214985609u, 739408315u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 208, 3029757061u, 3298589427u, 3196131526u, 2084665197u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 209, 2823345962u, 3955601456u, 1076543910u, 3304852042u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 210, 640515933u, 2419975459u, 1073769087u, 1988016581u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 211, 2453833475u, 2659973204u, 3216007439u, 2731594173u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 212, 697318369u, 3938264868u, 1062532020u, 2975148216u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 213, 225366869u, 453215326u, 3200044385u, 467903731u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 214, 499614828u, 372130653u, 3235313361u, 3772501596u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 215, 2298173054u, 2406734491u, 1099766912u, 3221574013u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 216, 211434314u, 2841672781u, 3228298587u, 2623399873u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 217, 2562278951u, 2034292219u, 3248774822u, 699680428u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 218, 1030621435u, 1386943632u, 1088782030u, 3724905992u, 1073291771u, 1413750292u, 0, ACOS_TOLERANCE, 0},
+{ 219, 217306301u, 1495300013u, 3240548807u, 1518804038u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 220, 362076244u, 3050489517u, 1049468975u, 2940604216u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 221, 516072020u, 387594449u, 3238538261u, 3010872301u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 222, 2417270868u, 1683571756u, 1098214271u, 3243467912u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 223, 2453871840u, 547789874u, 1074621795u, 671680995u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 224, 819681449u, 2315535361u, 1076278343u, 3851723081u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 225, 925396663u, 2690952636u, 3195785827u, 1648844317u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 226, 835916575u, 2105507379u, 1060210356u, 2061848524u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 227, 2882329693u, 1771437899u, 1102743884u, 4195142780u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 228, 547945591u, 1310074754u, 1072476006u, 1313198415u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 229, 979656894u, 3914592621u, 3228159980u, 2457917034u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 230, 2718226491u, 2240965174u, 3236288087u, 3605857252u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 231, 41761399u, 196714912u, 1054040628u, 3084755276u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 232, 2665587864u, 2058851477u, 1052873711u, 1233598120u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 233, 101299669u, 1909994277u, 3220384775u, 2863812374u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 234, 532015965u, 3697551156u, 1083211400u, 2869735287u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 235, 2830857894u, 2697221770u, 1092525956u, 2160271449u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 236, 230734239u, 2762796844u, 1059257507u, 3160137573u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 237, 247044829u, 1758968847u, 1101109420u, 3270770898u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 238, 73012604u, 4005141897u, 3216213297u, 4129052985u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 239, 2970233606u, 137758261u, 1060349030u, 3082136857u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 240, 1068792039u, 2371653203u, 3211892131u, 3951914469u, 1073207827u, 951674575u, 0, ACOS_TOLERANCE, 0},
+{ 241, 3109437504u, 3213595557u, 1043958672u, 2986160931u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 242, 575927156u, 2540046258u, 3208370548u, 2048583911u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 243, 546830286u, 2264504930u, 3228769528u, 1854181735u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 244, 2183016286u, 3809768956u, 1054933586u, 595351688u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 245, 723947614u, 3071069520u, 3207129696u, 3120974660u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 246, 945283056u, 1952618732u, 3236532520u, 1540955277u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 247, 747620529u, 1438803217u, 1049266525u, 957676449u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 248, 92767291u, 4222295662u, 1076131984u, 2183319069u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 249, 334611718u, 3887074118u, 3191649564u, 3233378721u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 250, 771768198u, 2099099488u, 3222430705u, 2071674991u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 251, 2409204087u, 2295269094u, 3196265320u, 3987032629u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 252, 2377503648u, 4200095882u, 1086809994u, 1339996745u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 253, 797809565u, 2431996507u, 1102017594u, 242934189u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 254, 2312749311u, 2330084417u, 1043172813u, 4043102110u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 255, 988771849u, 1106978707u, 1082509751u, 2520765777u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 256, 864960887u, 3192168224u, 1066340820u, 3603945646u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 257, 2589695756u, 1952396835u, 3199434577u, 3703639356u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 258, 320682810u, 1198219673u, 3230438668u, 2418060633u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 259, 551093026u, 2638353760u, 1093840413u, 1751560711u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 260, 540797521u, 180987057u, 1085420898u, 530063370u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 261, 2760303516u, 3179145654u, 1048020008u, 3061407249u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 262, 162525363u, 1884787302u, 1068713554u, 1737020797u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 263, 214216231u, 3459566012u, 3251200938u, 4126298722u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 264, 2764328342u, 1036370112u, 3235918644u, 3898933279u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 265, 653867113u, 3276084832u, 3189072211u, 1864601262u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 266, 298324788u, 263075055u, 1100754245u, 1667825741u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 267, 3015536039u, 2387220960u, 3253010819u, 3505575323u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 268, 642739166u, 3154304623u, 1063475914u, 3150741666u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 269, 332025563u, 4200269406u, 3194288972u, 3577694711u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 270, 2339885777u, 2064011737u, 1089860833u, 3657008595u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 271, 842190281u, 210665237u, 3197168874u, 510714829u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 272, 728283504u, 1589701259u, 3251310843u, 17001602u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 273, 975043445u, 2928317152u, 3246958541u, 122162205u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 274, 3101610657u, 1288582346u, 1071556960u, 4177188454u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 275, 151289169u, 3962848462u, 3243017171u, 3661038757u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 276, 2755192415u, 2162985241u, 3226640955u, 1639319068u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 277, 2942384609u, 1996676305u, 1099130747u, 3840380763u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 278, 134315769u, 550040067u, 3241901241u, 3372594924u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 279, 3137373248u, 3164451169u, 1076627605u, 317246751u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 280, 2423768299u, 784217153u, 1066058157u, 1225003160u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 281, 2378706924u, 1715871558u, 1101460352u, 3401958038u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 282, 363631767u, 4086269531u, 1102279679u, 2517481591u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 283, 2329360168u, 2624677381u, 1085107111u, 1970804718u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 284, 1010793546u, 3379532114u, 3249898830u, 3723025783u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 285, 999588552u, 2651435439u, 3229039621u, 1030985387u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 286, 3145033808u, 1199535056u, 1077836259u, 3604666660u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 287, 2548507371u, 3115209742u, 3237451386u, 3863935859u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 288, 2398143146u, 4209496277u, 3199416183u, 1216202995u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 289, 614398964u, 2544695332u, 3210577461u, 596332114u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 290, 514278395u, 1338323803u, 1041925718u, 99526924u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 291, 856573491u, 3149653097u, 1103058665u, 2483495776u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 292, 2339743312u, 280536835u, 1044395245u, 3715707641u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 293, 128894757u, 3670016377u, 1050809029u, 3775007802u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 294, 3109073100u, 3526859225u, 3222673081u, 4030462447u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 295, 640779949u, 1602527268u, 3242467576u, 2018361566u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 296, 957271688u, 3985805054u, 1088518381u, 1679321540u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 297, 2801498828u, 1663896708u, 3248819198u, 4229852270u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 298, 467728155u, 2346627527u, 3239438934u, 2290493820u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 299, 2208629720u, 2296736794u, 3207683799u, 1456667044u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 300, 2958022504u, 4132454009u, 1106540396u, 4243490703u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 301, 235395447u, 1359445676u, 3190130903u, 1569883678u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 302, 277859320u, 333214083u, 1076552006u, 1385185236u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 303, 2942645471u, 950097945u, 1041232546u, 3621700966u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 304, 370898672u, 149336372u, 3191764868u, 2940199511u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 305, 2384610875u, 2875684421u, 3249377056u, 4253432396u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 306, 837504978u, 2081484836u, 3199314748u, 2264912911u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 307, 632882934u, 3967859615u, 3229710481u, 2667348142u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 308, 2181979516u, 3630082248u, 3227364534u, 4156569147u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 309, 946956756u, 2993509124u, 1091331299u, 4018898246u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 310, 338207615u, 1642285349u, 3208379731u, 1196091123u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 311, 4693283u, 3356597889u, 1040231079u, 2420753479u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 312, 2762118529u, 977967943u, 3228887283u, 807395730u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 313, 2919435607u, 2730725979u, 3207120390u, 3867917386u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 314, 999294480u, 3504746045u, 1075794770u, 665882260u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 315, 2269075155u, 3385464702u, 1049896268u, 2757059958u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 316, 536095951u, 1299923384u, 1101872081u, 2574386817u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 317, 2675071145u, 3171042375u, 1078533152u, 2312086600u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 318, 2360735442u, 4236561530u, 1068042271u, 256515531u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 319, 2609926553u, 4152554926u, 1100304772u, 3545562886u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 320, 2403546570u, 350924105u, 1040286251u, 1468770658u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 321, 544551146u, 3000822699u, 3232925779u, 2540988650u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 322, 2780107631u, 2928199244u, 3245167989u, 44275991u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 323, 2165210001u, 1174874204u, 1057110584u, 848081004u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 324, 2354568060u, 1412948540u, 3239110676u, 3215002775u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 325, 863277892u, 2701562677u, 1065879622u, 2897481417u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 326, 199312991u, 2980401690u, 3216742908u, 2549609731u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 327, 2827983212u, 585456984u, 3201746087u, 638714580u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 328, 575008531u, 4260896505u, 1089137884u, 4274648992u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 329, 2728904219u, 4055046173u, 3198391736u, 3482894513u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 330, 341009704u, 2493198836u, 3198094528u, 2484800635u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 331, 3153287889u, 599921010u, 1103847606u, 1674254897u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 332, 104926329u, 217148561u, 1097066495u, 3536010689u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 333, 933395812u, 1605519917u, 3225218243u, 2732577078u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 334, 573219110u, 417261654u, 3246267157u, 3401343872u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 335, 1039272770u, 2150330697u, 1080405602u, 3197535445u, 1073291771u, 1412571606u, 0, ACOS_TOLERANCE, 0},
+{ 336, 1065739247u, 2334624779u, 1070288136u, 147709079u, 1073280563u, 1049296574u, 0, ACOS_TOLERANCE, 0},
+{ 337, 3178645135u, 665848401u, 3235013045u, 2195099382u, 1073291771u, 1413759839u, 0, ACOS_TOLERANCE, 0},
+{ 338, 364316788u, 238721142u, 3238780023u, 2612316049u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 339, 2974180417u, 328119069u, 3231550903u, 696220816u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 340, 649641437u, 2886210843u, 1055433962u, 3331415058u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 341, 335135121u, 2420250111u, 3214614526u, 510850312u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 342, 2216193203u, 1658541647u, 1071956366u, 53496813u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 343, 2567194005u, 3872563165u, 1098494887u, 2790313039u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 344, 3219733872u, 3859621368u, 3205775949u, 4015749711u, 1073993256u, 2063983841u, 0, ACOS_TOLERANCE, 0},
+{ 345, 311334852u, 1732769560u, 1052132915u, 2774541952u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 346, 317917675u, 1689088021u, 1066883290u, 3270546122u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 347, 491335395u, 1959705843u, 1106618962u, 4198868105u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 348, 124503353u, 3906315805u, 3235289682u, 1109820549u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 349, 3036818075u, 3370448446u, 1063890856u, 4022784584u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 350, 323334929u, 3264056381u, 1104622566u, 3697934821u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 351, 82666680u, 2912871781u, 3242116859u, 1560571600u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 352, 2776916990u, 3103325650u, 3237224234u, 3681651958u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 353, 333678608u, 3330581237u, 1086856468u, 3110345659u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 354, 2487169180u, 2478706589u, 1099546513u, 4177071445u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 355, 3183204741u, 3514067221u, 3247338343u, 585148435u, 1073291771u, 1413868209u, 0, ACOS_TOLERANCE, 0},
+{ 356, 2811486197u, 3689342853u, 3208758774u, 200507809u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 357, 3116462959u, 1049872171u, 3210445232u, 1453705582u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 358, 3129943472u, 1932668626u, 1098808013u, 1044068983u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 359, 2295964401u, 4093388677u, 3210795947u, 1617393713u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 360, 2293016564u, 778812087u, 3246232571u, 731905539u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 361, 2907822649u, 4050829759u, 1086605180u, 1863848117u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 362, 6647363u, 718161191u, 1071063889u, 2637291484u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 363, 224521970u, 1909842364u, 1102747575u, 3614304657u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 364, 761500166u, 895493977u, 3236485375u, 1701194116u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 365, 2171563276u, 1493115846u, 3233339987u, 296022762u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 366, 2783624899u, 4099447408u, 3187790416u, 3564720305u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 367, 848425142u, 2404172709u, 3219922640u, 2284484846u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 368, 2654315895u, 3240896015u, 3208621510u, 1226668421u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 369, 2488218361u, 4127752456u, 3200753143u, 2161953369u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 370, 489605006u, 1168774591u, 3191311819u, 2375467787u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 371, 347845914u, 2883145553u, 3234998320u, 3286468014u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 372, 2588007471u, 3007671464u, 1102234703u, 1209628408u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 373, 127334109u, 571692916u, 3243349276u, 1910625797u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 374, 524138712u, 2510184860u, 1089525631u, 2209639467u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 375, 2615466346u, 1945605229u, 3227105252u, 3777119615u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 376, 398493829u, 215226593u, 3235434773u, 224271737u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 377, 2242993828u, 2134662911u, 1080232319u, 1056746021u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 378, 2923358085u, 1099524039u, 1085032107u, 3905384073u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 379, 842579915u, 985866260u, 3225437419u, 3120783698u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 380, 2589795066u, 1700432859u, 3230345428u, 3505263023u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 381, 2297683903u, 953966053u, 1090810641u, 151959421u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 382, 2887420078u, 1520016810u, 1096148013u, 1974161688u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 383, 2738297064u, 1577726432u, 1080717542u, 3407236142u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 384, 3154840433u, 358621181u, 3214344145u, 3735144364u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 385, 2521491907u, 4023613376u, 1095386964u, 959640601u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 386, 2369008919u, 4136915018u, 1042238319u, 1264360404u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 387, 2906418341u, 3543839161u, 1093859356u, 2852227162u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 388, 2218509603u, 2154399659u, 3218171985u, 2610173674u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 389, 165687034u, 2502718011u, 1105407582u, 4037997673u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 390, 3034344010u, 2429891750u, 3220651893u, 3433646170u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 391, 397029567u, 1233242847u, 3233842223u, 1978947905u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 392, 32753845u, 3055512924u, 1085895689u, 2569766862u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 393, 498004465u, 3103627383u, 1075642950u, 676014010u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 394, 2622487710u, 3587249671u, 1050343198u, 2034180320u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 395, 2559467693u, 1175750283u, 3228052153u, 441772035u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 396, 639279177u, 1096886368u, 1067186387u, 4256284279u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 397, 208471934u, 2746455711u, 3243186220u, 383175406u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 398, 2829822244u, 1056466374u, 3247450556u, 3263564076u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 399, 2468230336u, 1734210936u, 3195265560u, 514072505u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 400, 758811245u, 1728341051u, 1092832248u, 3823410158u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 401, 2347191449u, 1235712656u, 3219475794u, 3622129011u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 402, 79742765u, 1575194991u, 3197615492u, 3446988115u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 403, 2161423950u, 2362441752u, 1088255327u, 270039934u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 404, 3010727959u, 3063626339u, 1105039555u, 1845818221u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 405, 192788472u, 3718151518u, 3240183167u, 3113149567u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 406, 313112913u, 3686096237u, 3199484638u, 191185038u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 407, 195422631u, 3680158556u, 1105637038u, 349436087u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 408, 2844026099u, 150975354u, 1100107824u, 729077351u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 409, 3016106050u, 2974566906u, 1091481543u, 195479384u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 410, 2820952232u, 953930448u, 3232752339u, 1009878771u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 411, 179600265u, 3369386607u, 1057414346u, 1319431804u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 412, 586131522u, 3279403983u, 3223631624u, 3404608264u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 413, 937427869u, 559918757u, 1105263000u, 1026957442u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 414, 128542208u, 2658716822u, 1104708872u, 996387212u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 415, 2731512332u, 3244026687u, 1047704829u, 2987820261u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 416, 829571115u, 1205633467u, 3212336151u, 731560768u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 417, 2850353849u, 3269211356u, 3233229218u, 2632041754u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 418, 1070113635u, 1007200508u, 1086406456u, 1484610595u, 1073088667u, 1300367880u, 0, ACOS_TOLERANCE, 0},
+{ 419, 968866968u, 3805991624u, 1101562011u, 3292762908u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 420, 2437809818u, 3314105762u, 3211254740u, 3489200637u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 421, 2571363594u, 3198252706u, 3200980182u, 558779875u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 422, 2377866012u, 2338464653u, 1083319346u, 4167405697u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 423, 2919015115u, 2320792999u, 3245310028u, 2734025087u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 424, 2318992495u, 832495279u, 3189857572u, 919851193u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 425, 3116721767u, 594640291u, 1077503330u, 976536412u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 426, 3139145310u, 79400523u, 3241084263u, 3353474633u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 427, 3132785785u, 1078965987u, 3233772596u, 3496966466u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 428, 892587941u, 4243435186u, 1078663150u, 2446827483u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 429, 644490711u, 699817447u, 1081268534u, 2111588814u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 430, 536635513u, 177265199u, 3233855943u, 965677531u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 431, 624474831u, 3957229084u, 1065403841u, 3870961932u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 432, 2495519163u, 2768873929u, 3212244708u, 4127917680u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 433, 445621604u, 3639227340u, 1068863190u, 4192848976u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 434, 2543806408u, 2824651320u, 1092946600u, 2150743372u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 435, 417715333u, 1542109195u, 3223841580u, 2386809036u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 436, 192029360u, 1374810628u, 3218415587u, 1623455911u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 437, 733790955u, 226433601u, 1048463914u, 2667067819u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 438, 768579443u, 1339325351u, 1074062507u, 701901582u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 439, 2920705365u, 3631553324u, 1068350633u, 1231934926u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 440, 2933708324u, 603977748u, 1098802865u, 1502493757u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 441, 852954796u, 4255242031u, 1076182326u, 2417637015u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 442, 3089857028u, 3270297477u, 1057486942u, 2885336275u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 443, 2809553007u, 1162164397u, 3250508564u, 2047944882u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 444, 2875372587u, 129658419u, 3243244851u, 817360375u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 445, 286421081u, 4166988101u, 3246796270u, 1780823036u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 446, 668574270u, 418009120u, 1081026514u, 909013508u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 447, 3082072506u, 4186670845u, 1073362089u, 2619129420u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 448, 795252317u, 1348987467u, 3217165795u, 4162017137u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 449, 2946795826u, 2808968027u, 1057864611u, 275397670u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 450, 513174607u, 240711581u, 3188571226u, 991292615u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 451, 2439023326u, 1881121353u, 1082366688u, 3029043132u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 452, 192508083u, 4250650421u, 3246612558u, 2498768625u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 453, 3180747941u, 2999983605u, 1096654323u, 2577373394u, 1073291771u, 1413777035u, 0, ACOS_TOLERANCE, 0},
+{ 454, 868314815u, 1300140379u, 3213491585u, 55226854u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 455, 49966445u, 13489454u, 3217461344u, 1447224005u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 456, 2210271568u, 180789028u, 3221481024u, 2263184048u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 457, 2397088667u, 426293588u, 3239818611u, 1789635787u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 458, 302342406u, 1048286093u, 3227133745u, 2920139253u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 459, 540854981u, 287184966u, 1093076159u, 1371882685u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 460, 770805810u, 2474797470u, 1065280366u, 1506889536u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 461, 2555731452u, 345487446u, 1053421486u, 1197157341u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 462, 2628226629u, 515700445u, 3214016873u, 2783826669u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 463, 467959892u, 1025779807u, 3217947229u, 937205825u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 464, 3185898801u, 503864881u, 1076822915u, 2345033570u, 1073291771u, 1414440881u, 0, ACOS_TOLERANCE, 0},
+{ 465, 393896468u, 596014050u, 3250464728u, 3171536734u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 466, 2267420964u, 3948135817u, 3235208235u, 557360557u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 467, 2954074298u, 110029735u, 1081878271u, 658156641u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 468, 566438875u, 2733782773u, 1068148429u, 2141208212u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 469, 2666943954u, 790308557u, 1107048971u, 563615979u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 470, 2405996540u, 2566307075u, 1083723970u, 1428203311u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 471, 2270749356u, 3880424699u, 3236471057u, 2886278126u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 472, 524758414u, 2701977458u, 1043006318u, 4263191658u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 473, 2942114697u, 1360096867u, 3234511235u, 722957892u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 474, 3154505042u, 1993420044u, 1095357710u, 2156133394u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 475, 2461372509u, 3917014693u, 3239137997u, 3218865041u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 476, 2423614376u, 3840388050u, 1044708748u, 3339981792u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 477, 68664930u, 2548196869u, 1075650752u, 2503792874u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 478, 27003265u, 3589631476u, 3235077884u, 2445744426u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 479, 520248228u, 203410210u, 1058974455u, 4258595472u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 480, 191352353u, 3053913996u, 1043884546u, 2757616601u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 481, 2602287836u, 1038998189u, 3205430458u, 3695555540u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 482, 2449136794u, 4118722076u, 1042468417u, 3583005947u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 483, 2166884388u, 1539535238u, 3246934215u, 508708967u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 484, 2298893886u, 1355147861u, 3251354609u, 4133432965u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 485, 826309703u, 1630207738u, 3189562989u, 2643371954u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 486, 1044987158u, 3806259293u, 3242741783u, 15657985u, 1073291771u, 1360824892u, 0, ACOS_TOLERANCE, 0},
+{ 487, 497456897u, 151607638u, 3227697753u, 467630898u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 488, 3017637501u, 1016107066u, 1077142954u, 2195497000u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 489, 2893082164u, 605010161u, 1050995677u, 3081653542u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 490, 469011148u, 4071435209u, 3207925259u, 1894382776u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 491, 2531356920u, 1522707251u, 3218735666u, 1578075186u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 492, 431642664u, 1500392608u, 3190947192u, 3634607405u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 493, 2582144456u, 3646244007u, 3197852749u, 3808681655u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 494, 233126338u, 1821773119u, 1094752155u, 1757234723u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 495, 2765502023u, 3794954283u, 3238755664u, 1209121339u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 496, 2342622984u, 1775878726u, 1096028209u, 221183908u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 497, 231520693u, 615054313u, 1105995987u, 1405024657u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 498, 2401381272u, 2784860416u, 1074009275u, 787419698u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 499, 943699878u, 2079960298u, 1074123223u, 2100091620u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 500, 592542034u, 311050208u, 3211234312u, 806358659u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 501, 554939259u, 898080849u, 1106754706u, 2510882902u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 502, 2949198761u, 2015533813u, 1089275809u, 298982001u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 503, 989540066u, 914741728u, 1092886795u, 464054401u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 504, 2304253208u, 3863739765u, 3214711653u, 3915767823u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 505, 958251880u, 3239739200u, 1104805370u, 2971054003u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 506, 2670649374u, 2491104644u, 3198242303u, 2559304728u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 507, 939123286u, 684435317u, 1055177809u, 2787628393u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 508, 2541359251u, 1636085321u, 1069717586u, 4235233108u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 509, 1044593898u, 202708387u, 3196003256u, 482423661u, 1073291771u, 1373409239u, 0, ACOS_TOLERANCE, 0},
+{ 510, 139626925u, 2518164801u, 3206911657u, 1250530357u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 511, 2850784019u, 3737313137u, 1045922781u, 3136078996u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 512, 2263385372u, 2650572904u, 3215945256u, 2341430700u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 513, 2703884311u, 4279456618u, 1045375126u, 3817511514u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 514, 2332933790u, 1898920133u, 3238856617u, 3322385778u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 515, 628125129u, 769863378u, 3205646293u, 3033900668u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 516, 3150112853u, 2363605017u, 1057042323u, 3607277737u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 517, 453059902u, 2102433536u, 1073687186u, 1772007848u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 518, 3088101403u, 1756195518u, 3225902960u, 1222779056u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 519, 936228020u, 1142293403u, 3242693386u, 741039297u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 520, 1034983355u, 2830408439u, 1041913758u, 3306391490u, 1073291771u, 1413686173u, 0, ACOS_TOLERANCE, 0},
+{ 521, 2352979086u, 2205233857u, 1075419064u, 4008575827u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 522, 445518797u, 2566866389u, 1094655457u, 4036587454u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 523, 311145393u, 1824828952u, 3243078353u, 4292530873u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 524, 2553824191u, 4155068217u, 3207589361u, 3447729183u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 525, 2798856384u, 2756570858u, 1076273685u, 3333057399u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 526, 2550428645u, 1207089191u, 1092166391u, 1769908602u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 527, 554295846u, 859290299u, 1041428225u, 1286082196u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 528, 246159230u, 2207831048u, 1106576697u, 1339163028u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 529, 2239899566u, 1165991857u, 3203879091u, 4174125604u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 530, 182461702u, 2169701868u, 3241819561u, 4227279451u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 531, 2888196098u, 2123622490u, 1052662593u, 2279271809u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 532, 702835388u, 695374285u, 1047701002u, 522745399u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 533, 280094216u, 1510677208u, 1076782817u, 1111322288u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 534, 179077993u, 2623205988u, 1103171923u, 4172761053u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 535, 2177736938u, 4217535562u, 1105411820u, 178360855u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 536, 682463458u, 3302529767u, 3204908280u, 3960051056u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 537, 398729522u, 3128926115u, 3230393394u, 689920399u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 538, 2611898873u, 2975884353u, 1080874032u, 706326922u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 539, 893776139u, 198291836u, 1095644375u, 1686271744u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 540, 2380685920u, 3678973777u, 3196054178u, 2497695971u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 541, 2240996065u, 3714083293u, 3243953714u, 2851269113u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 542, 7542429u, 2117586075u, 1087270529u, 1032855763u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 543, 2223653732u, 3495001046u, 1086693149u, 4162905644u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 544, 2567370325u, 2825204949u, 3197807718u, 3067810875u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 545, 2595670946u, 3719019697u, 1095625346u, 658578931u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 546, 387363057u, 2429869396u, 3239113006u, 3188949762u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 547, 396063874u, 322135328u, 3248332291u, 1527590526u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 548, 2461424020u, 2823164069u, 3201760069u, 602345917u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 549, 654769735u, 720378027u, 1076110022u, 259686655u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 550, 2360883068u, 625961575u, 1060816217u, 2476435835u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 551, 788830837u, 606139429u, 3232916885u, 3326100828u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 552, 3212982376u, 2141060868u, 1067726443u, 252856858u, 1073301100u, 1153746486u, 0, ACOS_TOLERANCE, 0},
+{ 553, 3127084040u, 474202816u, 1089644854u, 1764399210u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 554, 1019198392u, 2947116437u, 1041572001u, 3959708969u, 1073291771u, 1413754134u, 0, ACOS_TOLERANCE, 0},
+{ 555, 3213251752u, 4230614930u, 1056210276u, 3150822221u, 1073303204u, 3762064379u, 0, ACOS_TOLERANCE, 0},
+{ 556, 696157297u, 3263173528u, 1080112083u, 1228319033u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 557, 124362722u, 500312015u, 1063102682u, 2095470952u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 558, 2571317678u, 989529088u, 1056203473u, 3527737002u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 559, 2250338535u, 1703579132u, 3224570219u, 634351649u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 560, 2855421441u, 66133u, 3240749422u, 3515147331u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 561, 2627889255u, 2627336059u, 1089793281u, 1944911728u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 562, 759942356u, 2319970119u, 3249679385u, 445677602u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 563, 2547610355u, 3313890389u, 1096842854u, 754196284u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 564, 2871033704u, 1726998596u, 3210485282u, 4166556675u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 565, 501872914u, 486863841u, 3218994498u, 2509132460u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 566, 1002164234u, 2205707903u, 1085826634u, 3041478081u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 567, 525633549u, 4009409345u, 1040942443u, 2147611409u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 568, 2251207280u, 2036870072u, 1084696514u, 3107506430u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 569, 756690877u, 690866455u, 3226560542u, 2431563109u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 570, 998557361u, 3129862588u, 3198582472u, 2304023232u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 571, 2906016865u, 3579751536u, 3209420505u, 975391569u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 572, 2560287784u, 546279008u, 1081489128u, 2489420520u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 573, 31598644u, 3355765111u, 3194253290u, 994990765u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 574, 2828168124u, 1040855381u, 1043794244u, 3259056345u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 575, 2926398160u, 3002823940u, 1089005277u, 3148403594u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 576, 860472364u, 4135775260u, 1062496213u, 1421204191u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 577, 2375372972u, 1772673503u, 1068413298u, 3250253780u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 578, 2382680286u, 1058735200u, 3198812726u, 2912456147u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 579, 207257772u, 3116809444u, 3228961207u, 1489607764u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 580, 3161255502u, 3193356522u, 1098081503u, 3349879051u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 581, 2263814703u, 3863515794u, 3224248078u, 811645039u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 582, 2558000392u, 257027843u, 3188376713u, 3688710472u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 583, 1047583344u, 1618589681u, 3252953815u, 1796441468u, 1073291771u, 1131003064u, 0, ACOS_TOLERANCE, 0},
+{ 584, 963715447u, 2772711004u, 1068817762u, 1417472413u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 585, 2899022012u, 3229431619u, 1048945392u, 2667359336u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 586, 39332833u, 3031365654u, 3254047221u, 3088152449u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 587, 2400099045u, 1889351944u, 1105391374u, 3778764776u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 588, 2853164987u, 2277852166u, 3203738947u, 1874699830u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 589, 2730925178u, 341842475u, 1075005257u, 146768835u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 590, 2308700527u, 2872887668u, 1084601028u, 2879218577u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 591, 2587566446u, 1935797167u, 1071669036u, 2712989912u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 592, 253790896u, 1441615044u, 1092569414u, 3235243477u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 593, 2246162369u, 3221475559u, 1076923264u, 1614189331u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 594, 883591469u, 1521698692u, 1063187098u, 2905773788u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 595, 578813437u, 1875339612u, 1097776841u, 3512997257u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 596, 313284539u, 1310991474u, 1042232933u, 315006632u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 597, 2187872770u, 400944269u, 1084139528u, 1113187101u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 598, 2196755783u, 4228884820u, 1086244087u, 4239134992u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 599, 625667119u, 3885190346u, 1076394312u, 1081883031u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 600, 102978620u, 1185360438u, 1047721048u, 3255616886u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 601, 253870868u, 3242646057u, 3206743917u, 2797651324u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 602, 2741016991u, 2374818327u, 3200069106u, 409774909u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 603, 541948600u, 129626762u, 3222418776u, 3265842151u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 604, 409023275u, 2563211098u, 3195891786u, 3312029907u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 605, 590108432u, 2326742435u, 1061528026u, 3658027611u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 606, 47946496u, 4130434851u, 1086613209u, 1406937614u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 607, 2203282384u, 694337229u, 1098392210u, 673996985u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 608, 383120483u, 2165782899u, 3201118320u, 755437166u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 609, 2738514249u, 1631447464u, 1073129346u, 1109813769u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 610, 996195808u, 1404490212u, 3191965790u, 388374829u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 611, 621407424u, 1187403069u, 3249235911u, 2333348025u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 612, 2238876819u, 3949359805u, 3217090542u, 278931643u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 613, 122205568u, 3433131795u, 3216075884u, 1048643019u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 614, 378630966u, 2161249988u, 1080050285u, 1886767872u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 615, 2469519430u, 56508471u, 1101093005u, 3134765996u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 616, 2160574759u, 390814486u, 3252597757u, 4155481783u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 617, 244834788u, 2634623473u, 1106605935u, 3462407026u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 618, 3068667858u, 1081553801u, 3212510682u, 3597193645u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 619, 2681145113u, 2712139310u, 1067397110u, 3991830201u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 620, 2469611210u, 1021245839u, 1043439185u, 1476242017u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 621, 605118806u, 3027425274u, 1057959382u, 1693579371u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 622, 723258643u, 890268116u, 3208358957u, 2499328701u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 623, 3012075542u, 2762939960u, 1094140192u, 1946947338u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 624, 2624504981u, 2848774892u, 1043728239u, 1868742480u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 625, 631395565u, 2118639219u, 3208384560u, 392586300u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 626, 3100564519u, 3212404590u, 3227625019u, 2217276325u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 627, 2726525578u, 3155371392u, 1098886483u, 418306480u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 628, 404732165u, 2073105109u, 3222252812u, 4126276047u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 629, 666104043u, 3942715706u, 3225850891u, 2149087853u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 630, 691861022u, 2516919494u, 1054814504u, 3292931762u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 631, 158110000u, 1551415022u, 3207905213u, 640268289u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 632, 3017186687u, 576149615u, 1089986684u, 1988363455u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 633, 2189052396u, 3827250147u, 1092018604u, 3082769758u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 634, 2963530013u, 2640124381u, 3224863391u, 3684597672u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 635, 2674433095u, 3504206450u, 3208001954u, 1486636350u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 636, 172271302u, 3087550224u, 1050189716u, 1104066383u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 637, 2937291508u, 3152457596u, 3248116497u, 1671039260u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 638, 743510680u, 3745833360u, 1104273854u, 220649566u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 639, 455612679u, 3044998553u, 3244012440u, 3016971473u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 640, 2707727413u, 3615317113u, 1060844794u, 880769846u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 641, 91972307u, 663715669u, 1063876456u, 1939925527u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 642, 1031258381u, 3544355485u, 1082114513u, 2610512411u, 1073291771u, 1413748055u, 0, ACOS_TOLERANCE, 0},
+{ 643, 3062260532u, 4072884955u, 1076396408u, 1001273000u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 644, 169240433u, 1808609104u, 3232187528u, 3260138616u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 645, 982018300u, 1018873491u, 3222306114u, 3725685935u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 646, 601770903u, 200987283u, 1044223733u, 3512285706u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 647, 2542854589u, 4073670723u, 1077133533u, 2092229545u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 648, 2434772723u, 1045739827u, 1099698978u, 2401260358u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 649, 513980741u, 4127547980u, 1041823582u, 96012619u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 650, 2244412580u, 685986273u, 3236054528u, 743504842u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 651, 3152410687u, 3762173332u, 3229804761u, 4257281451u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 652, 2398221552u, 883225705u, 1052657715u, 3748197546u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 653, 2914372880u, 1745689276u, 3189483003u, 3144701638u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 654, 584466975u, 1188703132u, 3241765574u, 2567092606u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 655, 3142928545u, 1507281554u, 1093182670u, 3093165197u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 656, 525538133u, 2853215019u, 1102960933u, 4219424176u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 657, 743378254u, 3350157882u, 3218026125u, 3380902958u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 658, 2920865644u, 3965656635u, 1041729367u, 1488955390u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 659, 76342162u, 4066317764u, 3250193636u, 3709306303u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 660, 778187300u, 3648159195u, 1060671775u, 4137599200u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 661, 298140314u, 1730811304u, 3218425255u, 3228251203u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 662, 548008019u, 1112642402u, 1046926075u, 2339033206u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 663, 373953465u, 3920135590u, 1068578082u, 3455242298u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 664, 466000998u, 171021716u, 1104170032u, 643991456u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 665, 2888399469u, 2072550721u, 3230599505u, 973021091u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 666, 50905317u, 2724027649u, 1085564300u, 4142466137u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 667, 143727064u, 2551822580u, 3246069024u, 1987298072u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 668, 890335217u, 3397840241u, 3222713245u, 1041924997u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 669, 2679007644u, 1492572480u, 1050371810u, 2325437597u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 670, 114124970u, 2135762681u, 3203689878u, 3625230590u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 671, 2580021722u, 3462823473u, 1042304476u, 902729486u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 672, 2558456833u, 652173352u, 1093628675u, 363109783u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 673, 2931846653u, 3131010476u, 3195084967u, 2163853087u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 674, 2860857242u, 2962422808u, 3191806742u, 291534500u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 675, 3180910087u, 148717545u, 3227570855u, 1176638793u, 1073291771u, 1413779568u, 0, ACOS_TOLERANCE, 0},
+{ 676, 846507519u, 592218494u, 3236967859u, 3643659929u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 677, 799992724u, 3637018510u, 1096065187u, 2759677467u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 678, 2669496048u, 1394154169u, 3225515010u, 2895919661u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 679, 2888699650u, 2576460670u, 3195138207u, 278693366u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 680, 2397030301u, 3525993125u, 1046206559u, 960482701u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 681, 566728356u, 3623493345u, 3245957327u, 2358092842u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 682, 2920406944u, 1470157513u, 1068598730u, 2360266862u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 683, 287105933u, 2673272949u, 3190126532u, 3307152371u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 684, 2190509100u, 3554040933u, 3243091661u, 1074231128u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 685, 2949859096u, 506000682u, 1099596445u, 3719284608u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 686, 143293603u, 1500851201u, 1079029789u, 395506977u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 687, 2216398316u, 2396922893u, 3215773801u, 3631674284u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 688, 94791165u, 265423085u, 1064366729u, 2757995135u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 689, 2260683291u, 3335726874u, 3204388695u, 1913160810u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 690, 985593981u, 177525642u, 1089544219u, 1163479070u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 691, 1059251204u, 1356562406u, 3218720719u, 3954981400u, 1073291620u, 874618229u, 0, ACOS_TOLERANCE, 0},
+{ 692, 199560954u, 2411049585u, 3200282058u, 4212977532u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 693, 3115392997u, 1969400668u, 1082838033u, 792484989u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 694, 413791550u, 3185069889u, 1102744820u, 1679200952u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 695, 816641623u, 2092563199u, 1077400892u, 3625477257u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 696, 990732070u, 3645477920u, 3233940628u, 730323504u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 697, 2640158643u, 1955024619u, 3229376333u, 3062236193u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 698, 748924276u, 673553144u, 3222681322u, 3821101717u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 699, 872312580u, 2833907590u, 1087265939u, 2570284543u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 700, 531712086u, 2911302424u, 1088378861u, 3400401866u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 701, 541730201u, 552676385u, 1048022712u, 1642148205u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 702, 323876482u, 3259465719u, 1063427827u, 4168942284u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 703, 2757624524u, 757177023u, 3224829944u, 54374532u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 704, 25847614u, 3253287925u, 3239197056u, 3859570507u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 705, 2460961478u, 3154974007u, 1089011136u, 3913013165u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 706, 311234957u, 2785357403u, 1103967007u, 2809598610u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 707, 484603275u, 3644503084u, 1071705136u, 2739219317u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 708, 2578002590u, 3518663743u, 1085926548u, 3708967464u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 709, 3007242152u, 731479478u, 1076236288u, 2805941787u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 710, 2619048947u, 779131141u, 3197589176u, 237706897u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 711, 2641650858u, 2888131473u, 3245067887u, 2007039966u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 712, 878934658u, 2219795442u, 1097959451u, 920385234u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 713, 970070259u, 1786246284u, 3210593296u, 3141517655u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 714, 28474706u, 1268866168u, 1056332378u, 3807437549u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 715, 593283356u, 2441697849u, 1095257734u, 352511160u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 716, 537273837u, 3291810518u, 1078085447u, 381074875u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 717, 466362499u, 387817055u, 3243585398u, 409681933u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 718, 337512666u, 139599181u, 1104463616u, 3501253426u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 719, 152302801u, 1804177501u, 1107025740u, 30866148u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 720, 2982215560u, 793748989u, 1082924614u, 1001569450u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 721, 3089760601u, 959143764u, 1058620462u, 2685722619u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 722, 2594786226u, 1587148467u, 1069298743u, 2465926195u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 723, 932092665u, 2374376082u, 1041131964u, 1275798358u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 724, 3064898943u, 732591095u, 1105513168u, 188500721u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 725, 833576046u, 2203077164u, 1086779764u, 2814822707u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 726, 414881598u, 3478844638u, 1064472491u, 3289144186u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 727, 964227992u, 2435698269u, 3249016304u, 440309030u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 728, 2567296069u, 3788040806u, 3187722224u, 3342255097u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 729, 723295838u, 2455751020u, 1103514973u, 3245053142u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 730, 844693850u, 4056651767u, 3239516201u, 4169582895u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 731, 550385160u, 2093642662u, 1100623425u, 792491672u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 732, 2816313046u, 83889365u, 1087600688u, 1006331335u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 733, 2572367713u, 1140517802u, 3243890765u, 4090711271u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 734, 666576601u, 2418701513u, 3216964687u, 1555649649u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 735, 2251046969u, 1215163489u, 1051353113u, 3503287900u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 736, 3159618610u, 641457589u, 1051716814u, 4121125128u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 737, 401932052u, 321857207u, 3250350790u, 1246006125u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 738, 2953696013u, 120564990u, 1097266968u, 300149226u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 739, 2254220803u, 3244980052u, 1076924215u, 847775621u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 740, 2771951028u, 112839452u, 3212858842u, 1569943525u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 741, 2165404842u, 2934678057u, 3212657738u, 3091042797u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 742, 2704093164u, 547060795u, 1079752403u, 4043827022u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 743, 244578012u, 1790462845u, 1067969586u, 2345441039u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 744, 2182959566u, 2353653565u, 1049624664u, 882286568u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 745, 462586144u, 1186302263u, 1078662178u, 2626148789u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 746, 279527707u, 4121656076u, 3224287260u, 1299277508u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 747, 470047975u, 2010385858u, 3233120941u, 4186702461u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 748, 2221693080u, 1323708810u, 3211281520u, 1640799315u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 749, 3124323904u, 3503897938u, 3210262651u, 258643165u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 750, 2619485313u, 2959074653u, 1058897059u, 4239182527u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 751, 302551175u, 153547307u, 1099812861u, 3156123094u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 752, 420210788u, 3996883503u, 1071341265u, 72657681u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 753, 158488136u, 1698212750u, 1068334402u, 160302703u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 754, 289138234u, 2257686389u, 1051856116u, 430357614u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 755, 2795510903u, 395145384u, 1046317717u, 1912800227u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 756, 935515004u, 674021561u, 3222496667u, 743247292u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 757, 2822969173u, 1075007837u, 3222487779u, 639284837u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 758, 924678051u, 3492386324u, 3251519349u, 1241408247u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 759, 2881777125u, 3998363272u, 3228147294u, 365769855u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 760, 2662939411u, 4030509561u, 1066028735u, 1163947030u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 761, 564717585u, 1914428658u, 3214617694u, 4147847493u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 762, 993107584u, 2889684117u, 1042972779u, 1225674604u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 763, 750290683u, 273406410u, 3206108502u, 145234164u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 764, 3157290800u, 912384201u, 3237262916u, 3366320623u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 765, 3022814103u, 349339167u, 3197347448u, 3262060258u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 766, 393652178u, 2097272974u, 1064845294u, 1630215394u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 767, 2250994257u, 3355589350u, 3243019072u, 2316123825u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 768, 307759713u, 1457407347u, 1101422760u, 4120356538u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 769, 2168158322u, 3228185359u, 3198251445u, 3743078041u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 770, 880898735u, 1289357713u, 3230160936u, 2794962547u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 771, 903112316u, 1699456459u, 1083794396u, 4195811825u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 772, 129746399u, 1949114369u, 1084908557u, 1325384361u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 773, 709313868u, 3979168763u, 1049036668u, 2542947959u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 774, 776361251u, 676749439u, 3192662415u, 4013712036u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 775, 255079628u, 3701636708u, 1042322101u, 3983171212u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 776, 2885977639u, 3830039616u, 3239465315u, 175489420u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 777, 2871663155u, 2897269792u, 3230650366u, 3102389747u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 778, 515647990u, 582170006u, 1068093936u, 3324264433u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 779, 870187117u, 3574970337u, 1061955111u, 637826033u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 780, 2474474250u, 1733806710u, 3216760526u, 3188307974u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 781, 25157138u, 2296028823u, 1096788400u, 1413568905u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 782, 967771954u, 1627289946u, 1046506286u, 1860326351u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 783, 876029804u, 1139086265u, 3242570406u, 3276908361u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 784, 444923881u, 3323762166u, 3206918506u, 946766885u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 785, 2438959626u, 188768962u, 1088324147u, 4105901663u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 786, 2731858209u, 460037366u, 3227174677u, 2159793181u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 787, 647960579u, 2589781051u, 3243737020u, 107237481u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 788, 342985206u, 3519881651u, 1057272132u, 2685921459u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 789, 620434247u, 1169160155u, 3206674485u, 3139856281u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 790, 1000422649u, 1898254525u, 3196770014u, 2458988443u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 791, 756268268u, 2023065054u, 1050415907u, 4070768353u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 792, 284716157u, 3336260906u, 3237972475u, 3524355405u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 793, 2520138858u, 3298979042u, 3250099033u, 1003322861u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 794, 780415343u, 1629423892u, 1061722650u, 2396420130u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 795, 2512306741u, 1945417606u, 3192839521u, 1585136212u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 796, 2649414854u, 1527139640u, 1076681917u, 4150904895u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 797, 315452952u, 267572666u, 1088475235u, 1517640973u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 798, 948438656u, 1100855041u, 3229298529u, 2451533501u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 799, 2280476280u, 853088805u, 1050931318u, 3551516956u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 800, 927051214u, 1317953425u, 3217154900u, 431061758u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 801, 803065499u, 2317271661u, 1070436470u, 4014139535u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 802, 2766450812u, 3959292396u, 3249638947u, 906232948u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 803, 475259033u, 1939780068u, 3253991906u, 906880052u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 804, 174037547u, 4170524292u, 3237763507u, 4075099457u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 805, 3111709674u, 3520923293u, 1067530616u, 2252399455u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 806, 705974097u, 1097415680u, 1055600706u, 2690540698u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 807, 465450487u, 3086226264u, 3213898048u, 3220232067u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 808, 2906752413u, 2955360278u, 1051258339u, 557182478u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 809, 2407140190u, 186287752u, 1104388811u, 1727111982u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 810, 3170043637u, 4057007843u, 1076281145u, 2008293104u, 1073291771u, 1413754155u, 0, ACOS_TOLERANCE, 0},
+{ 811, 3198834469u, 2741338484u, 3252544447u, 1207037505u, 1073291772u, 654137907u, 0, ACOS_TOLERANCE, 0},
+{ 812, 625923799u, 102938901u, 3218894213u, 3620282197u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 813, 2527426501u, 763746284u, 1060949875u, 80236875u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 814, 3055119358u, 1117970157u, 1084109014u, 939675744u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 815, 1002709241u, 3478694019u, 1105453279u, 2493398454u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 816, 278925941u, 2014323735u, 1096417600u, 1077078168u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 817, 22160783u, 1569149351u, 1091835152u, 3751608506u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 818, 2855839310u, 930375071u, 1084274438u, 1096450032u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 819, 949603377u, 4197396799u, 3220768028u, 3419252837u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 820, 2427096043u, 2553375912u, 3237078043u, 1357572894u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 821, 2946808178u, 703318468u, 3198897773u, 3216391250u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 822, 682409255u, 3167959965u, 1069972300u, 4099039274u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 823, 551957760u, 1199490036u, 1047137152u, 2723130471u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 824, 2635855937u, 933683213u, 3243757155u, 1468458131u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 825, 954259401u, 763829445u, 3190480801u, 1772616584u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 826, 1017324786u, 3416067384u, 1056206159u, 172017902u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 827, 2553315334u, 2799176222u, 1099022088u, 1324575553u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 828, 54501096u, 2237472662u, 3202361378u, 1770080863u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 829, 697886575u, 1509098263u, 3227321831u, 3313535397u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 830, 2834201307u, 1157206501u, 3201667023u, 2771836065u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 831, 2845352423u, 841047693u, 3220229941u, 3851041620u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 832, 2559038255u, 1637635007u, 1096670395u, 363436727u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 833, 895812927u, 544867276u, 3250055151u, 2005291812u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 834, 613660095u, 1577788839u, 3213516258u, 3678234583u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 835, 2787880976u, 3005922702u, 1060624530u, 3900344258u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 836, 369490497u, 4206745890u, 3212325607u, 3363748875u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 837, 547531448u, 2586849496u, 3195881612u, 1817038482u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 838, 2947779739u, 3675119568u, 3217354316u, 1280515099u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 839, 2360207944u, 3785128270u, 3206980957u, 986337114u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 840, 30415045u, 1959045465u, 3205100821u, 2165602568u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 841, 2874345345u, 4164694429u, 3228096442u, 1919088329u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 842, 430207315u, 1381882442u, 3215734246u, 2587666792u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 843, 721933456u, 3295845115u, 1099763106u, 4189733918u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 844, 1020902692u, 528513718u, 3241318094u, 2446416887u, 1073291771u, 1413754130u, 0, ACOS_TOLERANCE, 0},
+{ 845, 23459988u, 2336116589u, 1065985897u, 3314083915u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 846, 666699893u, 3946191348u, 3195771050u, 906783975u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 847, 2277669009u, 1307551746u, 3210796216u, 988905760u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 848, 659686858u, 3690487540u, 1056058539u, 3252665112u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 849, 42479044u, 1832665932u, 1055271260u, 2605540156u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 850, 158726331u, 4095344603u, 3215114657u, 3444794506u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 851, 2383875900u, 1287837711u, 3242597773u, 4213798139u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 852, 3153341967u, 2816125725u, 1059414555u, 1477859711u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 853, 935772631u, 714564399u, 3193282956u, 2533012202u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 854, 626995971u, 3592268374u, 1058283383u, 2901729097u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 855, 793386186u, 3559004137u, 1068514800u, 3160920849u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 856, 292955800u, 691190239u, 3222935981u, 1615104840u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 857, 239139675u, 2475984769u, 1103239897u, 703637359u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 858, 710643921u, 441140946u, 3190536898u, 3492228424u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 859, 161483935u, 3877369975u, 3202400099u, 3215202168u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 860, 2961770699u, 1491180815u, 3239294185u, 1154272588u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 861, 3205774388u, 3583450204u, 1087671320u, 674510731u, 1073291852u, 1159169230u, 0, ACOS_TOLERANCE, 0},
+{ 862, 2732840881u, 3456820098u, 1089546472u, 2907918480u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 863, 685577817u, 81928569u, 1075278180u, 1990416786u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 864, 1038142999u, 1400620994u, 3225378967u, 1180415269u, 1073291771u, 1413203469u, 0, ACOS_TOLERANCE, 0},
+{ 865, 821776812u, 2762887697u, 3211549123u, 335890509u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 866, 3188234303u, 1362922028u, 3190091315u, 3628762502u, 1073291771u, 1416977815u, 0, ACOS_TOLERANCE, 0},
+{ 867, 721900432u, 3813492886u, 3202458179u, 1901070055u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 868, 2869411161u, 242471816u, 1098704131u, 1526904338u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 869, 1027232266u, 671155008u, 1093002146u, 4241764136u, 1073291771u, 1413753715u, 0, ACOS_TOLERANCE, 0},
+{ 870, 2277521859u, 4097248738u, 1056810493u, 578681886u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 871, 277897075u, 2743813242u, 1048038468u, 2228686199u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 872, 2669729433u, 777624847u, 3204357191u, 721009894u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 873, 900729335u, 724757172u, 1074804044u, 1443361721u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 874, 2794978652u, 1829019782u, 1092425225u, 921360204u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 875, 1055573469u, 599714409u, 3252379270u, 4008804686u, 1073291757u, 4048919351u, 0, ACOS_TOLERANCE, 0},
+{ 876, 2335315701u, 1009458928u, 1083845809u, 4245287698u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 877, 407962355u, 1393652229u, 3198335362u, 477976573u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 878, 119992u, 617334033u, 3226883256u, 1392617441u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 879, 2526781811u, 3189972160u, 1058939729u, 1442809487u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 880, 2785887182u, 1497507448u, 3207820115u, 1605709634u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 881, 400505812u, 1497124553u, 1056018407u, 1916183627u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 882, 379250418u, 187810760u, 1045258725u, 2282203450u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 883, 619840292u, 3486351235u, 3238811394u, 4182495542u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 884, 2587166700u, 1845445426u, 1101440582u, 1926724082u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 885, 2208479151u, 3630948001u, 3210436304u, 3757166747u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 886, 156467129u, 2426945694u, 1100551290u, 691736139u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 887, 3176502800u, 648364171u, 1041433075u, 4184885944u, 1073291771u, 1413755518u, 0, ACOS_TOLERANCE, 0},
+{ 888, 1000987303u, 4288583860u, 1088664697u, 2475611219u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 889, 1063779408u, 1032586628u, 1093050016u, 1335820726u, 1073288701u, 721808240u, 0, ACOS_TOLERANCE, 0},
+{ 890, 2203998268u, 1808427032u, 1080779860u, 3408316613u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 891, 2973050448u, 377900895u, 3246382680u, 3547565419u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 892, 2189796743u, 2323627716u, 1059972652u, 2094048557u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 893, 3196853156u, 698816446u, 3234028118u, 1825626029u, 1073291771u, 2356901228u, 0, ACOS_TOLERANCE, 0},
+{ 894, 3053056428u, 4246800079u, 3198693322u, 1124410156u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 895, 418318520u, 2453135589u, 1055899444u, 314708747u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 896, 2903016736u, 3296787864u, 1068197912u, 3000361169u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 897, 3078102424u, 2237367418u, 1089582486u, 4042266354u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 898, 3141633458u, 3484406269u, 3222793392u, 1868977643u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 899, 551079618u, 3353193428u, 1046058481u, 1204175477u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 900, 372140985u, 2936300483u, 3219636923u, 3841711417u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 901, 673975119u, 1967394048u, 1058351548u, 460961975u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 902, 186542430u, 2037284927u, 3201399531u, 2969937827u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 903, 605316943u, 4193097538u, 3187909191u, 3039418420u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 904, 560007813u, 3490045229u, 1095745195u, 4291149159u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 905, 2719344253u, 2428281947u, 3244840847u, 1401325941u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 906, 3086950621u, 2958762056u, 1053682542u, 1079751324u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 907, 2586448231u, 4153073282u, 3242138780u, 2976596113u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 908, 2225350223u, 3033242648u, 3218615502u, 4046734098u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 909, 144835976u, 3784918863u, 3247369913u, 2134568674u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 910, 1037093430u, 2677404300u, 1085544968u, 741961444u, 1073291771u, 1413479051u, 0, ACOS_TOLERANCE, 0},
+{ 911, 3191671070u, 3184472282u, 1092761713u, 2878921656u, 1073291771u, 1444200196u, 0, ACOS_TOLERANCE, 0},
+{ 912, 2174282657u, 3434230759u, 3221702019u, 3917984952u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 913, 2545165920u, 2576188896u, 3242449625u, 1091446541u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 914, 331286912u, 1182911629u, 3252138078u, 370659473u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 915, 2176330507u, 1444733769u, 1073172315u, 1980291498u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 916, 2678247043u, 2360783610u, 3208952465u, 1231254630u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 917, 2305545884u, 3838689849u, 1072879962u, 256746588u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 918, 2902784540u, 3667306355u, 3251214292u, 749864809u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 919, 2604503669u, 507891905u, 1053625983u, 2704533753u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 920, 1030839861u, 3584765547u, 3245124397u, 2257447093u, 1073291771u, 1413749690u, 0, ACOS_TOLERANCE, 0},
+{ 921, 3066547476u, 3315149772u, 1066493112u, 1016007949u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 922, 449363956u, 825363580u, 3232843486u, 209798625u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 923, 835609236u, 3268577204u, 1096097376u, 1911303780u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 924, 2498038993u, 1753975943u, 1042812372u, 3813343580u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 925, 2711382061u, 729612230u, 3214799337u, 998858159u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 926, 362629194u, 436029885u, 1040410334u, 1429955158u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 927, 535596587u, 3221540113u, 1098769124u, 1388898057u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 928, 3182989542u, 324306108u, 3236216574u, 3657300235u, 1073291771u, 1413854759u, 0, ACOS_TOLERANCE, 0},
+{ 929, 2615512563u, 583339032u, 1059119779u, 2312064517u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 930, 1018901539u, 1094068533u, 3243006833u, 3107499181u, 1073291771u, 1413754135u, 0, ACOS_TOLERANCE, 0},
+{ 931, 621064893u, 2330095236u, 1045494806u, 3166363539u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 932, 848850921u, 2922855425u, 1055270013u, 3382352474u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 933, 2636544164u, 2042479846u, 1052493506u, 1108839173u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 934, 14409368u, 3796172167u, 1093571065u, 169360454u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 935, 792852082u, 1860101737u, 1103906352u, 1684270183u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 936, 857946959u, 1478693394u, 1081338739u, 2709296315u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 937, 148167699u, 2960729928u, 1099267383u, 1713640531u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 938, 385577172u, 3119726590u, 1073506160u, 3652712370u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 939, 2345316997u, 2223927344u, 1087592708u, 1855918127u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 940, 283564999u, 1025757067u, 1082898254u, 4130586757u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 941, 248963649u, 1732390968u, 3252871699u, 2342842299u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 942, 968306674u, 284897931u, 3252953804u, 1924892993u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 943, 2792404953u, 3037915642u, 3201314702u, 236884699u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 944, 2786424109u, 2193269825u, 1080777124u, 2443415975u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 945, 519195528u, 875427160u, 3254060908u, 2005185235u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 946, 2834778379u, 1185249950u, 3192573802u, 43728140u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 947, 941414883u, 1968452001u, 3208083074u, 2872106033u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 948, 1058483372u, 1955688296u, 1041438818u, 4288876237u, 1073291678u, 2710722764u, 0, ACOS_TOLERANCE, 0},
+{ 949, 260098041u, 1687624754u, 1047766046u, 3073412424u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 950, 3060253014u, 1209878394u, 1095484022u, 291364597u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 951, 468175369u, 3483008135u, 1104326057u, 3143994227u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 952, 2417131043u, 3223340235u, 1090336173u, 1399132887u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 953, 783617139u, 4188530565u, 1049645776u, 3448942728u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 954, 660957346u, 1627557770u, 1058246656u, 2945931719u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 955, 1018601337u, 3373123648u, 3197792793u, 672208537u, 1073291771u, 1413754135u, 0, ACOS_TOLERANCE, 0},
+{ 956, 408015225u, 3778617114u, 1062846388u, 1358342023u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 957, 410316381u, 2900182547u, 3199310787u, 414812664u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 958, 633591966u, 2464347659u, 3205131467u, 3988778663u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 959, 229808805u, 3135249601u, 1100087621u, 4100875262u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 960, 793399715u, 2358359525u, 1045184735u, 1183252266u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 961, 971564307u, 1400352853u, 3240053853u, 734055542u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 962, 348066411u, 1753967678u, 3224978909u, 1995531974u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 963, 2638555255u, 1500031970u, 3233676488u, 4052958340u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 964, 536164755u, 1866935720u, 3200756597u, 3746696244u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 965, 91363664u, 2978288684u, 1106515721u, 564707827u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 966, 447397583u, 1517077030u, 1044934689u, 4156529635u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 967, 884390674u, 1427263585u, 3247549500u, 559009887u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 968, 709965825u, 427386166u, 3224310223u, 2897984604u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 969, 748422445u, 984833499u, 1086168339u, 3414464869u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 970, 3037316018u, 1275655663u, 1051250192u, 1788042252u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 971, 647298401u, 1752811522u, 1054424401u, 3069200833u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 972, 336691782u, 4159629802u, 3227935989u, 905739373u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 973, 840207318u, 3449457931u, 1053675501u, 651755324u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 974, 588654397u, 824950980u, 1063835328u, 2970166564u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 975, 1002643220u, 3980858800u, 1097889355u, 860102770u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 976, 2925126437u, 3352952738u, 1087086428u, 1202852913u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 977, 3153295755u, 3493096285u, 3210665381u, 1226230602u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 978, 2861370199u, 2237153875u, 1063605905u, 2592496943u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 979, 812704965u, 1204681469u, 1084151922u, 928193012u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 980, 717902981u, 1892558657u, 3188880850u, 472712482u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 981, 206133394u, 1107589453u, 3240016549u, 2840254081u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 982, 645145771u, 1760994629u, 3217094564u, 2931138356u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 983, 2682176516u, 3313118532u, 1095060283u, 1256408484u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 984, 958852249u, 2822240883u, 3191644368u, 1759139386u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 985, 3064303449u, 3148616726u, 3216643810u, 4033784566u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 986, 2672549129u, 50508488u, 3234572856u, 2196737134u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 987, 199760205u, 1739301489u, 1047113374u, 2964036605u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 988, 2742280838u, 32766355u, 1078278376u, 684801414u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 989, 860036812u, 2725458084u, 3197542874u, 3768641510u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 990, 602166919u, 2877639205u, 3248394899u, 2733580401u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 991, 217158246u, 3237117913u, 1086314718u, 1194088701u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 992, 507701220u, 2969027390u, 3254737744u, 2845466153u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 993, 39202927u, 1308825168u, 3231339694u, 1185199746u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 994, 2538930797u, 3429306274u, 3236439133u, 3100989857u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 995, 2251277391u, 4179597430u, 1060231463u, 2735521684u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 996, 863742433u, 1926531024u, 1040565159u, 1724549325u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 997, 344684868u, 1215071411u, 1068384117u, 483238293u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 998, 317818997u, 197061949u, 1043473339u, 249253513u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+{ 999, 2250299688u, 1410107326u, 3198269248u, 2880209598u, 1073291771u, 1413754136u, 0, ACOS_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_ACOS_H multiple inclusion protection
+
+// EOF acos.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/asin.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/asin.c
new file mode 100644
index 0000000000..ab108efc2e
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/asin.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// asin.c
+//
+// Test of asin() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/asin.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(asin_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &asin, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_NONE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &asin_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("asin() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("asin() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library asin() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "asin() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF asin.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/asin.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/asin.h
new file mode 100644
index 0000000000..6050cb2839
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/asin.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_ASIN_H
+#define CYGONCE_LIBM_ASIN_H
+//===========================================================================
+//
+// asin.h
+//
+// Test vectors for testing of asin() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/asin.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define ASIN_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t asin_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 604042796u, 2506787616u, 3214772338u, 2077734866u, 604042796u, 2506787616u, 0, ASIN_TOLERANCE, 0},
+{ 2, 182169888u, 3065862417u, 1106988572u, 4273582707u, 182169888u, 3065862417u, 0, ASIN_TOLERANCE, 0},
+{ 3, 2664755801u, 1226547830u, 1071032732u, 3857964939u, 2664755801u, 1226547830u, 0, ASIN_TOLERANCE, 0},
+{ 4, 94291757u, 4010703484u, 1081727025u, 4287567452u, 94291757u, 4010703484u, 0, ASIN_TOLERANCE, 0},
+{ 5, 118911615u, 2977931045u, 1104283808u, 3843658091u, 118911615u, 2977931045u, 0, ASIN_TOLERANCE, 0},
+{ 6, 2656608405u, 3088088668u, 1073408149u, 2318866154u, 2656608405u, 3088088668u, 0, ASIN_TOLERANCE, 0},
+{ 7, 263730613u, 2451317798u, 3210911814u, 1038562750u, 263730613u, 2451317798u, 0, ASIN_TOLERANCE, 0},
+{ 8, 580821368u, 2221564313u, 1059115557u, 977275158u, 580821368u, 2221564313u, 0, ASIN_TOLERANCE, 0},
+{ 9, 399687375u, 97950278u, 3204919842u, 1605286142u, 399687375u, 97950278u, 0, ASIN_TOLERANCE, 0},
+{ 10, 460757591u, 4233776869u, 1087533966u, 1919858904u, 460757591u, 4233776869u, 0, ASIN_TOLERANCE, 0},
+{ 11, 2870376804u, 1472965721u, 3230691143u, 2574511435u, 2870376804u, 1472965721u, 0, ASIN_TOLERANCE, 0},
+{ 12, 2882092039u, 1204637550u, 3213143089u, 2421516003u, 2882092039u, 1204637550u, 0, ASIN_TOLERANCE, 0},
+{ 13, 3037750340u, 3337705339u, 3238331976u, 3183442542u, 3037750340u, 3337705339u, 0, ASIN_TOLERANCE, 0},
+{ 14, 2949649050u, 1086075996u, 1067714579u, 3477152375u, 2949649050u, 1086075996u, 0, ASIN_TOLERANCE, 0},
+{ 15, 535591366u, 247024800u, 1040265469u, 3354345619u, 535591366u, 247024800u, 0, ASIN_TOLERANCE, 0},
+{ 16, 63178737u, 2781269805u, 3188799281u, 3391715197u, 63178737u, 2781269805u, 0, ASIN_TOLERANCE, 0},
+{ 17, 768313194u, 865544864u, 3230216062u, 1200273272u, 768313194u, 865544864u, 0, ASIN_TOLERANCE, 0},
+{ 18, 591877388u, 3157038143u, 3249401130u, 314151656u, 591877388u, 3157038143u, 0, ASIN_TOLERANCE, 0},
+{ 19, 3219509280u, 1564829925u, 1065671376u, 3088950051u, 3219652657u, 2483715739u, 0, ASIN_TOLERANCE, 0},
+{ 20, 141374533u, 3933975298u, 1065991760u, 2304772640u, 141374533u, 3933975298u, 0, ASIN_TOLERANCE, 0},
+{ 21, 2396283075u, 1799495751u, 1094899225u, 1827380665u, 2396283075u, 1799495751u, 0, ASIN_TOLERANCE, 0},
+{ 22, 2598153594u, 1112370977u, 1061103890u, 196988907u, 2598153594u, 1112370977u, 0, ASIN_TOLERANCE, 0},
+{ 23, 1040851532u, 490122851u, 3216810265u, 576637874u, 1040851532u, 490122851u, 0, ASIN_TOLERANCE, 0},
+{ 24, 849190915u, 1390621543u, 1055043150u, 915412872u, 849190915u, 1390621543u, 0, ASIN_TOLERANCE, 0},
+{ 25, 488493877u, 2591320551u, 1070339013u, 1237443094u, 488493877u, 2591320551u, 0, ASIN_TOLERANCE, 0},
+{ 26, 3077582663u, 3936235618u, 1099376266u, 1904940295u, 3077582663u, 3936235618u, 0, ASIN_TOLERANCE, 0},
+{ 27, 71827124u, 222155510u, 1044902177u, 252085215u, 71827124u, 222155510u, 0, ASIN_TOLERANCE, 0},
+{ 28, 2583183683u, 4139068910u, 3215004552u, 4245048106u, 2583183683u, 4139068910u, 0, ASIN_TOLERANCE, 0},
+{ 29, 32118299u, 168794155u, 1090475726u, 3160414606u, 32118299u, 168794155u, 0, ASIN_TOLERANCE, 0},
+{ 30, 975557826u, 4157503437u, 1104600163u, 1792103377u, 975557826u, 4157503437u, 0, ASIN_TOLERANCE, 0},
+{ 31, 137283993u, 1382645956u, 3240285101u, 4024164216u, 137283993u, 1382645956u, 0, ASIN_TOLERANCE, 0},
+{ 32, 118046910u, 3480120317u, 1100404348u, 478417819u, 118046910u, 3480120317u, 0, ASIN_TOLERANCE, 0},
+{ 33, 2828521286u, 2549311006u, 1055917530u, 3778440054u, 2828521286u, 2549311006u, 0, ASIN_TOLERANCE, 0},
+{ 34, 2530903114u, 1593784258u, 1069213493u, 1951351053u, 2530903114u, 1593784258u, 0, ASIN_TOLERANCE, 0},
+{ 35, 3103251986u, 631744430u, 3206072611u, 1047143174u, 3103251986u, 631744430u, 0, ASIN_TOLERANCE, 0},
+{ 36, 722650436u, 1584726864u, 3215417793u, 624695933u, 722650436u, 1584726864u, 0, ASIN_TOLERANCE, 0},
+{ 37, 2434300838u, 705725219u, 3217662205u, 1967294577u, 2434300838u, 705725219u, 0, ASIN_TOLERANCE, 0},
+{ 38, 664091785u, 2952818482u, 3239402263u, 1848641259u, 664091785u, 2952818482u, 0, ASIN_TOLERANCE, 0},
+{ 39, 642185311u, 1370937055u, 1055482637u, 2410810400u, 642185311u, 1370937055u, 0, ASIN_TOLERANCE, 0},
+{ 40, 889092079u, 1330047076u, 1093469262u, 1857263512u, 889092079u, 1330047076u, 0, ASIN_TOLERANCE, 0},
+{ 41, 2562391789u, 1246486570u, 1067165665u, 743938884u, 2562391789u, 1246486570u, 0, ASIN_TOLERANCE, 0},
+{ 42, 1013509315u, 3107531809u, 1058433800u, 958446936u, 1013509315u, 3107531809u, 0, ASIN_TOLERANCE, 0},
+{ 43, 2379321348u, 1698195744u, 3234826710u, 1808768063u, 2379321348u, 1698195744u, 0, ASIN_TOLERANCE, 0},
+{ 44, 223594865u, 2594747457u, 1045397427u, 3927603841u, 223594865u, 2594747457u, 0, ASIN_TOLERANCE, 0},
+{ 45, 2251329048u, 348093397u, 1064733299u, 1710279345u, 2251329048u, 348093397u, 0, ASIN_TOLERANCE, 0},
+{ 46, 3162272236u, 3528946000u, 1045927362u, 1602290403u, 3162272236u, 3528946000u, 0, ASIN_TOLERANCE, 0},
+{ 47, 2415703348u, 398813542u, 1052866292u, 1436851684u, 2415703348u, 398813542u, 0, ASIN_TOLERANCE, 0},
+{ 48, 1033199706u, 3319748577u, 3227196113u, 3607301229u, 1033199706u, 3319748577u, 0, ASIN_TOLERANCE, 0},
+{ 49, 23891811u, 2548745907u, 1105253912u, 370162110u, 23891811u, 2548745907u, 0, ASIN_TOLERANCE, 0},
+{ 50, 764517244u, 4204294028u, 3192923960u, 2626702805u, 764517244u, 4204294028u, 0, ASIN_TOLERANCE, 0},
+{ 51, 173888262u, 390319448u, 1104422077u, 120202647u, 173888262u, 390319448u, 0, ASIN_TOLERANCE, 0},
+{ 52, 2730779741u, 2815627218u, 1099019491u, 731750493u, 2730779741u, 2815627218u, 0, ASIN_TOLERANCE, 0},
+{ 53, 864070021u, 3900661840u, 3200970392u, 2907096477u, 864070021u, 3900661840u, 0, ASIN_TOLERANCE, 0},
+{ 54, 842667049u, 4269246624u, 3222902057u, 2762779203u, 842667049u, 4269246624u, 0, ASIN_TOLERANCE, 0},
+{ 55, 2347188326u, 184131949u, 3225314008u, 2237882876u, 2347188326u, 184131949u, 0, ASIN_TOLERANCE, 0},
+{ 56, 2323813472u, 4276663739u, 3254076585u, 4265258845u, 2323813472u, 4276663739u, 0, ASIN_TOLERANCE, 0},
+{ 57, 560407162u, 1656691045u, 3252113914u, 4132573504u, 560407162u, 1656691045u, 0, ASIN_TOLERANCE, 0},
+{ 58, 271448936u, 1052817888u, 1061186300u, 352861436u, 271448936u, 1052817888u, 0, ASIN_TOLERANCE, 0},
+{ 59, 2742827957u, 636068836u, 1093702210u, 4149510462u, 2742827957u, 636068836u, 0, ASIN_TOLERANCE, 0},
+{ 60, 3110435514u, 1869774195u, 1056841761u, 2029664212u, 3110435514u, 1869774195u, 0, ASIN_TOLERANCE, 0},
+{ 61, 2782135403u, 481356510u, 1098012633u, 1760061418u, 2782135403u, 481356510u, 0, ASIN_TOLERANCE, 0},
+{ 62, 2210852465u, 2918398424u, 1066749948u, 3643952367u, 2210852465u, 2918398424u, 0, ASIN_TOLERANCE, 0},
+{ 63, 2255864064u, 3722025458u, 3192516074u, 1732245037u, 2255864064u, 3722025458u, 0, ASIN_TOLERANCE, 0},
+{ 64, 984980019u, 1533536108u, 3226159655u, 3412938290u, 984980019u, 1533536108u, 0, ASIN_TOLERANCE, 0},
+{ 65, 2302294008u, 3539403428u, 1044896671u, 2743023547u, 2302294008u, 3539403428u, 0, ASIN_TOLERANCE, 0},
+{ 66, 2437282418u, 965485575u, 1074677964u, 2239092099u, 2437282418u, 965485575u, 0, ASIN_TOLERANCE, 0},
+{ 67, 3161462367u, 479602785u, 3245398415u, 1570702137u, 3161462367u, 479602785u, 0, ASIN_TOLERANCE, 0},
+{ 68, 454239397u, 3987656554u, 3201134469u, 2639458165u, 454239397u, 3987656554u, 0, ASIN_TOLERANCE, 0},
+{ 69, 270690192u, 902270460u, 3200236493u, 2060263082u, 270690192u, 902270460u, 0, ASIN_TOLERANCE, 0},
+{ 70, 3101979469u, 119561873u, 1067242459u, 4238218095u, 3101979469u, 119561873u, 0, ASIN_TOLERANCE, 0},
+{ 71, 342005410u, 1489535917u, 1052674720u, 3229843554u, 342005410u, 1489535917u, 0, ASIN_TOLERANCE, 0},
+{ 72, 2431479818u, 1372780257u, 1087299442u, 2877794600u, 2431479818u, 1372780257u, 0, ASIN_TOLERANCE, 0},
+{ 73, 749807578u, 547642046u, 1068507828u, 2261901967u, 749807578u, 547642046u, 0, ASIN_TOLERANCE, 0},
+{ 74, 2886390034u, 2655610998u, 1063417350u, 3897975437u, 2886390034u, 2655610998u, 0, ASIN_TOLERANCE, 0},
+{ 75, 250812866u, 3444039742u, 3204905205u, 72985499u, 250812866u, 3444039742u, 0, ASIN_TOLERANCE, 0},
+{ 76, 2855285209u, 685471642u, 1052893000u, 3994091533u, 2855285209u, 685471642u, 0, ASIN_TOLERANCE, 0},
+{ 77, 438792265u, 3273039144u, 3234242951u, 2105125638u, 438792265u, 3273039144u, 0, ASIN_TOLERANCE, 0},
+{ 78, 2645727074u, 1149591862u, 1079300031u, 2852890893u, 2645727074u, 1149591862u, 0, ASIN_TOLERANCE, 0},
+{ 79, 2752966212u, 964007987u, 1089046728u, 3863233156u, 2752966212u, 964007987u, 0, ASIN_TOLERANCE, 0},
+{ 80, 512535166u, 27186676u, 1092292231u, 131338606u, 512535166u, 27186676u, 0, ASIN_TOLERANCE, 0},
+{ 81, 670177097u, 2614232599u, 3216359929u, 1186945904u, 670177097u, 2614232599u, 0, ASIN_TOLERANCE, 0},
+{ 82, 3154698801u, 1896750851u, 3253696392u, 920368431u, 3154698801u, 1896750851u, 0, ASIN_TOLERANCE, 0},
+{ 83, 2442691738u, 29704081u, 3253306050u, 1477489465u, 2442691738u, 29704081u, 0, ASIN_TOLERANCE, 0},
+{ 84, 2226625355u, 1908380994u, 1041152721u, 3015183476u, 2226625355u, 1908380994u, 0, ASIN_TOLERANCE, 0},
+{ 85, 681844560u, 470785250u, 3211309660u, 1296080311u, 681844560u, 470785250u, 0, ASIN_TOLERANCE, 0},
+{ 86, 3173267991u, 3766553196u, 1063117318u, 3703961407u, 3173267991u, 3766553196u, 0, ASIN_TOLERANCE, 0},
+{ 87, 2455017061u, 4149594176u, 1090202405u, 3293225914u, 2455017061u, 4149594176u, 0, ASIN_TOLERANCE, 0},
+{ 88, 313616459u, 77747397u, 3224848375u, 1095737976u, 313616459u, 77747397u, 0, ASIN_TOLERANCE, 0},
+{ 89, 3083383675u, 594138985u, 3217133121u, 1435082240u, 3083383675u, 594138985u, 0, ASIN_TOLERANCE, 0},
+{ 90, 2240663447u, 1803548147u, 3240157452u, 4122845725u, 2240663447u, 1803548147u, 0, ASIN_TOLERANCE, 0},
+{ 91, 692524862u, 311336721u, 1045850005u, 536548906u, 692524862u, 311336721u, 0, ASIN_TOLERANCE, 0},
+{ 92, 39331613u, 1667857221u, 1062792545u, 2329662186u, 39331613u, 1667857221u, 0, ASIN_TOLERANCE, 0},
+{ 93, 2957138228u, 1918705224u, 1059647808u, 2861487662u, 2957138228u, 1918705224u, 0, ASIN_TOLERANCE, 0},
+{ 94, 3070750532u, 3709104626u, 3220237199u, 997732637u, 3070750532u, 3709104626u, 0, ASIN_TOLERANCE, 0},
+{ 95, 2444448896u, 1774627130u, 3192826790u, 2597228841u, 2444448896u, 1774627130u, 0, ASIN_TOLERANCE, 0},
+{ 96, 702397604u, 2705552003u, 1041691115u, 3314033947u, 702397604u, 2705552003u, 0, ASIN_TOLERANCE, 0},
+{ 97, 2530979608u, 820086279u, 1085001393u, 3341643348u, 2530979608u, 820086279u, 0, ASIN_TOLERANCE, 0},
+{ 98, 481329467u, 3136820894u, 1093140313u, 4023285864u, 481329467u, 3136820894u, 0, ASIN_TOLERANCE, 0},
+{ 99, 2613158354u, 443835590u, 3197412883u, 166402802u, 2613158354u, 443835590u, 0, ASIN_TOLERANCE, 0},
+{ 100, 2939403391u, 3572369260u, 3225005050u, 1183942370u, 2939403391u, 3572369260u, 0, ASIN_TOLERANCE, 0},
+{ 101, 456836645u, 2446986142u, 1100226690u, 3561788365u, 456836645u, 2446986142u, 0, ASIN_TOLERANCE, 0},
+{ 102, 995574146u, 279968558u, 1056612692u, 605059609u, 995574146u, 279968558u, 0, ASIN_TOLERANCE, 0},
+{ 103, 2720425755u, 1360758659u, 1045149981u, 3634982365u, 2720425755u, 1360758659u, 0, ASIN_TOLERANCE, 0},
+{ 104, 219648965u, 4068690904u, 3212392076u, 3185930294u, 219648965u, 4068690904u, 0, ASIN_TOLERANCE, 0},
+{ 105, 245268713u, 1440185463u, 1067865294u, 2959231845u, 245268713u, 1440185463u, 0, ASIN_TOLERANCE, 0},
+{ 106, 3124081158u, 3352139409u, 3211602972u, 64439686u, 3124081158u, 3352139409u, 0, ASIN_TOLERANCE, 0},
+{ 107, 2799322658u, 1508169460u, 3213875925u, 3893561170u, 2799322658u, 1508169460u, 0, ASIN_TOLERANCE, 0},
+{ 108, 2966132661u, 146763905u, 1061635587u, 1173102190u, 2966132661u, 146763905u, 0, ASIN_TOLERANCE, 0},
+{ 109, 2950948333u, 2882725208u, 1046547680u, 3137609802u, 2950948333u, 2882725208u, 0, ASIN_TOLERANCE, 0},
+{ 110, 281607514u, 2987408195u, 1104831334u, 2360906919u, 281607514u, 2987408195u, 0, ASIN_TOLERANCE, 0},
+{ 111, 583237163u, 2272922429u, 3230247604u, 3220743043u, 583237163u, 2272922429u, 0, ASIN_TOLERANCE, 0},
+{ 112, 2279259017u, 486798710u, 1051847313u, 1164056378u, 2279259017u, 486798710u, 0, ASIN_TOLERANCE, 0},
+{ 113, 2707413568u, 14851197u, 3194383659u, 2622433447u, 2707413568u, 14851197u, 0, ASIN_TOLERANCE, 0},
+{ 114, 2729877535u, 1346176789u, 1059030682u, 1585821890u, 2729877535u, 1346176789u, 0, ASIN_TOLERANCE, 0},
+{ 115, 925396515u, 1008663444u, 3253626162u, 1058337847u, 925396515u, 1008663444u, 0, ASIN_TOLERANCE, 0},
+{ 116, 2213579028u, 3506658319u, 3219431539u, 543446309u, 2213579028u, 3506658319u, 0, ASIN_TOLERANCE, 0},
+{ 117, 3163196851u, 3413687955u, 1072253426u, 343404215u, 3163196851u, 3413687955u, 0, ASIN_TOLERANCE, 0},
+{ 118, 334409439u, 4266232536u, 3240608065u, 4109813813u, 334409439u, 4266232536u, 0, ASIN_TOLERANCE, 0},
+{ 119, 3177753519u, 1144242316u, 1071012025u, 2790944540u, 3177753519u, 1144242316u, 0, ASIN_TOLERANCE, 0},
+{ 120, 2754858880u, 265926617u, 1095794063u, 1345870736u, 2754858880u, 265926617u, 0, ASIN_TOLERANCE, 0},
+{ 121, 49590943u, 3193385121u, 1097323612u, 2009367488u, 49590943u, 3193385121u, 0, ASIN_TOLERANCE, 0},
+{ 122, 2389359641u, 1233370553u, 1064565351u, 322637795u, 2389359641u, 1233370553u, 0, ASIN_TOLERANCE, 0},
+{ 123, 954404777u, 3410634251u, 3243916607u, 4042570547u, 954404777u, 3410634251u, 0, ASIN_TOLERANCE, 0},
+{ 124, 2849680709u, 2524001714u, 1072116817u, 3983083207u, 2849680709u, 2524001714u, 0, ASIN_TOLERANCE, 0},
+{ 125, 959555327u, 3501343645u, 3237287213u, 1887353658u, 959555327u, 3501343645u, 0, ASIN_TOLERANCE, 0},
+{ 126, 2934409098u, 689800034u, 3246333414u, 2135700283u, 2934409098u, 689800034u, 0, ASIN_TOLERANCE, 0},
+{ 127, 263792941u, 4171919805u, 3238308636u, 3129081398u, 263792941u, 4171919805u, 0, ASIN_TOLERANCE, 0},
+{ 128, 926728083u, 1550999328u, 3219525990u, 2031663879u, 926728083u, 1550999328u, 0, ASIN_TOLERANCE, 0},
+{ 129, 2989628620u, 949669377u, 3226383614u, 3948448651u, 2989628620u, 949669377u, 0, ASIN_TOLERANCE, 0},
+{ 130, 2243494997u, 4293630712u, 1060526636u, 438407499u, 2243494997u, 4293630712u, 0, ASIN_TOLERANCE, 0},
+{ 131, 2756107420u, 1535381711u, 1054391309u, 4072415576u, 2756107420u, 1535381711u, 0, ASIN_TOLERANCE, 0},
+{ 132, 3025827769u, 1347758084u, 3238820771u, 1059069486u, 3025827769u, 1347758084u, 0, ASIN_TOLERANCE, 0},
+{ 133, 3294258u, 3498512759u, 1092903052u, 2047817298u, 3294258u, 3498512759u, 0, ASIN_TOLERANCE, 0},
+{ 134, 2919775476u, 1226560794u, 1069263873u, 685537815u, 2919775476u, 1226560794u, 0, ASIN_TOLERANCE, 0},
+{ 135, 982026620u, 4000990876u, 1076297936u, 3803689997u, 982026620u, 4000990876u, 0, ASIN_TOLERANCE, 0},
+{ 136, 499108416u, 2263729518u, 3254424928u, 3450332551u, 499108416u, 2263729518u, 0, ASIN_TOLERANCE, 0},
+{ 137, 347296393u, 1637536851u, 3238793417u, 747232103u, 347296393u, 1637536851u, 0, ASIN_TOLERANCE, 0},
+{ 138, 34763760u, 902498990u, 3205956257u, 245434170u, 34763760u, 902498990u, 0, ASIN_TOLERANCE, 0},
+{ 139, 3201690145u, 1482770161u, 3244873095u, 2292235133u, 3201690145u, 1482798226u, 0, ASIN_TOLERANCE, 0},
+{ 140, 2990655242u, 36045768u, 1071182448u, 3868790688u, 2990655242u, 36045768u, 0, ASIN_TOLERANCE, 0},
+{ 141, 3083340050u, 1885951730u, 3207806174u, 2553919637u, 3083340050u, 1885951730u, 0, ASIN_TOLERANCE, 0},
+{ 142, 2693238911u, 4059459408u, 1055146851u, 2731735627u, 2693238911u, 4059459408u, 0, ASIN_TOLERANCE, 0},
+{ 143, 2290935302u, 3819720014u, 3203031655u, 4218515595u, 2290935302u, 3819720014u, 0, ASIN_TOLERANCE, 0},
+{ 144, 2348280948u, 3038411370u, 3236511256u, 2472176453u, 2348280948u, 3038411370u, 0, ASIN_TOLERANCE, 0},
+{ 145, 2880785553u, 182132862u, 3252592387u, 1793714415u, 2880785553u, 182132862u, 0, ASIN_TOLERANCE, 0},
+{ 146, 2799656331u, 4227997622u, 1087681073u, 3265812129u, 2799656331u, 4227997622u, 0, ASIN_TOLERANCE, 0},
+{ 147, 801513493u, 1010183244u, 1091844280u, 675001864u, 801513493u, 1010183244u, 0, ASIN_TOLERANCE, 0},
+{ 148, 318478599u, 4193366103u, 1056610361u, 3831235255u, 318478599u, 4193366103u, 0, ASIN_TOLERANCE, 0},
+{ 149, 2378498000u, 465836562u, 3189131504u, 1330642846u, 2378498000u, 465836562u, 0, ASIN_TOLERANCE, 0},
+{ 150, 43741656u, 1192547728u, 1080448013u, 2251835756u, 43741656u, 1192547728u, 0, ASIN_TOLERANCE, 0},
+{ 151, 172875845u, 2123384287u, 3198090050u, 2528390848u, 172875845u, 2123384287u, 0, ASIN_TOLERANCE, 0},
+{ 152, 911443207u, 3964517760u, 3252496130u, 1755935266u, 911443207u, 3964517760u, 0, ASIN_TOLERANCE, 0},
+{ 153, 844811578u, 2753105123u, 3223721534u, 3995725873u, 844811578u, 2753105123u, 0, ASIN_TOLERANCE, 0},
+{ 154, 151452687u, 777231627u, 1042074674u, 36182517u, 151452687u, 777231627u, 0, ASIN_TOLERANCE, 0},
+{ 155, 3158956730u, 3937520057u, 3230206414u, 1507556284u, 3158956730u, 3937520057u, 0, ASIN_TOLERANCE, 0},
+{ 156, 910363913u, 1910829179u, 1052726418u, 90890556u, 910363913u, 1910829179u, 0, ASIN_TOLERANCE, 0},
+{ 157, 3107838682u, 1962827704u, 1080960105u, 1706263669u, 3107838682u, 1962827704u, 0, ASIN_TOLERANCE, 0},
+{ 158, 2177675826u, 3863498922u, 1084020789u, 2439263794u, 2177675826u, 3863498922u, 0, ASIN_TOLERANCE, 0},
+{ 159, 2909835385u, 2329801749u, 1098707350u, 2852802137u, 2909835385u, 2329801749u, 0, ASIN_TOLERANCE, 0},
+{ 160, 2979393160u, 3548991905u, 3213586763u, 3269946829u, 2979393160u, 3548991905u, 0, ASIN_TOLERANCE, 0},
+{ 161, 790744031u, 2009174302u, 1097495331u, 312449728u, 790744031u, 2009174302u, 0, ASIN_TOLERANCE, 0},
+{ 162, 2160628293u, 648730712u, 3246307879u, 4265764460u, 2160628293u, 648730712u, 0, ASIN_TOLERANCE, 0},
+{ 163, 1000831562u, 366653268u, 1051541874u, 1478215551u, 1000831562u, 366653268u, 0, ASIN_TOLERANCE, 0},
+{ 164, 2470023790u, 2605647918u, 1042539011u, 969681033u, 2470023790u, 2605647918u, 0, ASIN_TOLERANCE, 0},
+{ 165, 2322196276u, 1909222641u, 1092825252u, 3029685419u, 2322196276u, 1909222641u, 0, ASIN_TOLERANCE, 0},
+{ 166, 3159166635u, 1128432313u, 3200082887u, 2582838060u, 3159166635u, 1128432313u, 0, ASIN_TOLERANCE, 0},
+{ 167, 2525309230u, 546560372u, 1070003814u, 2343707656u, 2525309230u, 546560372u, 0, ASIN_TOLERANCE, 0},
+{ 168, 849110626u, 309618405u, 3246395018u, 3002005209u, 849110626u, 309618405u, 0, ASIN_TOLERANCE, 0},
+{ 169, 2706804529u, 3151760818u, 3196548461u, 1969485838u, 2706804529u, 3151760818u, 0, ASIN_TOLERANCE, 0},
+{ 170, 639469972u, 3667631361u, 3196181592u, 3743448274u, 639469972u, 3667631361u, 0, ASIN_TOLERANCE, 0},
+{ 171, 2658009958u, 3097521578u, 3216630070u, 1141349287u, 2658009958u, 3097521578u, 0, ASIN_TOLERANCE, 0},
+{ 172, 918158805u, 3403438584u, 3208257181u, 2221276438u, 918158805u, 3403438584u, 0, ASIN_TOLERANCE, 0},
+{ 173, 2401852086u, 1683102397u, 3250341256u, 108768173u, 2401852086u, 1683102397u, 0, ASIN_TOLERANCE, 0},
+{ 174, 2343899229u, 564813835u, 1064153550u, 3058531228u, 2343899229u, 564813835u, 0, ASIN_TOLERANCE, 0},
+{ 175, 2813220880u, 131949913u, 1090262840u, 2146798879u, 2813220880u, 131949913u, 0, ASIN_TOLERANCE, 0},
+{ 176, 2465897203u, 1934391255u, 3188783235u, 1341236714u, 2465897203u, 1934391255u, 0, ASIN_TOLERANCE, 0},
+{ 177, 1070130951u, 418478585u, 3248733961u, 5029000u, 1070141425u, 3058489590u, 0, ASIN_TOLERANCE, 0},
+{ 178, 453997460u, 2676092597u, 1105486693u, 1833595891u, 453997460u, 2676092597u, 0, ASIN_TOLERANCE, 0},
+{ 179, 522042376u, 1030769844u, 1071155175u, 2766628533u, 522042376u, 1030769844u, 0, ASIN_TOLERANCE, 0},
+{ 180, 2635141434u, 1153943376u, 3209762784u, 953839852u, 2635141434u, 1153943376u, 0, ASIN_TOLERANCE, 0},
+{ 181, 1029467775u, 143071571u, 1050966579u, 2318822594u, 1029467775u, 143071571u, 0, ASIN_TOLERANCE, 0},
+{ 182, 287910954u, 1347533411u, 3242337825u, 3256720041u, 287910954u, 1347533411u, 0, ASIN_TOLERANCE, 0},
+{ 183, 444067826u, 1840809642u, 1105293543u, 639604076u, 444067826u, 1840809642u, 0, ASIN_TOLERANCE, 0},
+{ 184, 37282545u, 113530717u, 3194758036u, 699784099u, 37282545u, 113530717u, 0, ASIN_TOLERANCE, 0},
+{ 185, 435549826u, 2950098243u, 1061587493u, 3565445501u, 435549826u, 2950098243u, 0, ASIN_TOLERANCE, 0},
+{ 186, 2385974507u, 2103316697u, 1076082218u, 4043789060u, 2385974507u, 2103316697u, 0, ASIN_TOLERANCE, 0},
+{ 187, 811546601u, 1521715421u, 3251785075u, 651105558u, 811546601u, 1521715421u, 0, ASIN_TOLERANCE, 0},
+{ 188, 491306771u, 2545467538u, 3213898932u, 3889824094u, 491306771u, 2545467538u, 0, ASIN_TOLERANCE, 0},
+{ 189, 503065027u, 4133138143u, 3246676260u, 2160225215u, 503065027u, 4133138143u, 0, ASIN_TOLERANCE, 0},
+{ 190, 994621531u, 836655570u, 3245194924u, 2865254908u, 994621531u, 836655570u, 0, ASIN_TOLERANCE, 0},
+{ 191, 2309344440u, 1678396836u, 3226762726u, 424413376u, 2309344440u, 1678396836u, 0, ASIN_TOLERANCE, 0},
+{ 192, 2164934365u, 2155776900u, 3222643433u, 2889736031u, 2164934365u, 2155776900u, 0, ASIN_TOLERANCE, 0},
+{ 193, 3003862757u, 33676353u, 1090754016u, 4128530794u, 3003862757u, 33676353u, 0, ASIN_TOLERANCE, 0},
+{ 194, 2386204171u, 3176672093u, 1052578754u, 2282864811u, 2386204171u, 3176672093u, 0, ASIN_TOLERANCE, 0},
+{ 195, 446288958u, 2747259961u, 1103923331u, 1909074501u, 446288958u, 2747259961u, 0, ASIN_TOLERANCE, 0},
+{ 196, 3119895314u, 482497137u, 3223384022u, 3259766501u, 3119895314u, 482497137u, 0, ASIN_TOLERANCE, 0},
+{ 197, 2460401984u, 1710626079u, 3222593534u, 834878686u, 2460401984u, 1710626079u, 0, ASIN_TOLERANCE, 0},
+{ 198, 3041977808u, 4271421721u, 1047020885u, 1742757458u, 3041977808u, 4271421721u, 0, ASIN_TOLERANCE, 0},
+{ 199, 2215391645u, 1265459564u, 1080678447u, 685348463u, 2215391645u, 1265459564u, 0, ASIN_TOLERANCE, 0},
+{ 200, 2688170568u, 4066044320u, 1054128905u, 376413109u, 2688170568u, 4066044320u, 0, ASIN_TOLERANCE, 0},
+{ 201, 716821218u, 3237497681u, 3242751645u, 260260645u, 716821218u, 3237497681u, 0, ASIN_TOLERANCE, 0},
+{ 202, 2385659123u, 2882820086u, 1085407846u, 2301658312u, 2385659123u, 2882820086u, 0, ASIN_TOLERANCE, 0},
+{ 203, 420514989u, 3656359254u, 3203021744u, 2817965308u, 420514989u, 3656359254u, 0, ASIN_TOLERANCE, 0},
+{ 204, 2841879402u, 2859722465u, 3197490752u, 3892072777u, 2841879402u, 2859722465u, 0, ASIN_TOLERANCE, 0},
+{ 205, 2665431021u, 2538156443u, 3215734057u, 831239754u, 2665431021u, 2538156443u, 0, ASIN_TOLERANCE, 0},
+{ 206, 953028035u, 3071308141u, 3231671892u, 30345936u, 953028035u, 3071308141u, 0, ASIN_TOLERANCE, 0},
+{ 207, 2210978501u, 3595439756u, 3214985609u, 739408315u, 2210978501u, 3595439756u, 0, ASIN_TOLERANCE, 0},
+{ 208, 3029757061u, 3298589427u, 3196131526u, 2084665197u, 3029757061u, 3298589427u, 0, ASIN_TOLERANCE, 0},
+{ 209, 2823345962u, 3955601456u, 1076543910u, 3304852042u, 2823345962u, 3955601456u, 0, ASIN_TOLERANCE, 0},
+{ 210, 640515933u, 2419975459u, 1073769087u, 1988016581u, 640515933u, 2419975459u, 0, ASIN_TOLERANCE, 0},
+{ 211, 2453833475u, 2659973204u, 3216007439u, 2731594173u, 2453833475u, 2659973204u, 0, ASIN_TOLERANCE, 0},
+{ 212, 697318369u, 3938264868u, 1062532020u, 2975148216u, 697318369u, 3938264868u, 0, ASIN_TOLERANCE, 0},
+{ 213, 225366869u, 453215326u, 3200044385u, 467903731u, 225366869u, 453215326u, 0, ASIN_TOLERANCE, 0},
+{ 214, 499614828u, 372130653u, 3235313361u, 3772501596u, 499614828u, 372130653u, 0, ASIN_TOLERANCE, 0},
+{ 215, 2298173054u, 2406734491u, 1099766912u, 3221574013u, 2298173054u, 2406734491u, 0, ASIN_TOLERANCE, 0},
+{ 216, 211434314u, 2841672781u, 3228298587u, 2623399873u, 211434314u, 2841672781u, 0, ASIN_TOLERANCE, 0},
+{ 217, 2562278951u, 2034292219u, 3248774822u, 699680428u, 2562278951u, 2034292219u, 0, ASIN_TOLERANCE, 0},
+{ 218, 1030621435u, 1386943632u, 1088782030u, 3724905992u, 1030621435u, 1386943632u, 0, ASIN_TOLERANCE, 0},
+{ 219, 217306301u, 1495300013u, 3240548807u, 1518804038u, 217306301u, 1495300013u, 0, ASIN_TOLERANCE, 0},
+{ 220, 362076244u, 3050489517u, 1049468975u, 2940604216u, 362076244u, 3050489517u, 0, ASIN_TOLERANCE, 0},
+{ 221, 516072020u, 387594449u, 3238538261u, 3010872301u, 516072020u, 387594449u, 0, ASIN_TOLERANCE, 0},
+{ 222, 2417270868u, 1683571756u, 1098214271u, 3243467912u, 2417270868u, 1683571756u, 0, ASIN_TOLERANCE, 0},
+{ 223, 2453871840u, 547789874u, 1074621795u, 671680995u, 2453871840u, 547789874u, 0, ASIN_TOLERANCE, 0},
+{ 224, 819681449u, 2315535361u, 1076278343u, 3851723081u, 819681449u, 2315535361u, 0, ASIN_TOLERANCE, 0},
+{ 225, 925396663u, 2690952636u, 3195785827u, 1648844317u, 925396663u, 2690952636u, 0, ASIN_TOLERANCE, 0},
+{ 226, 835916575u, 2105507379u, 1060210356u, 2061848524u, 835916575u, 2105507379u, 0, ASIN_TOLERANCE, 0},
+{ 227, 2882329693u, 1771437899u, 1102743884u, 4195142780u, 2882329693u, 1771437899u, 0, ASIN_TOLERANCE, 0},
+{ 228, 547945591u, 1310074754u, 1072476006u, 1313198415u, 547945591u, 1310074754u, 0, ASIN_TOLERANCE, 0},
+{ 229, 979656894u, 3914592621u, 3228159980u, 2457917034u, 979656894u, 3914592621u, 0, ASIN_TOLERANCE, 0},
+{ 230, 2718226491u, 2240965174u, 3236288087u, 3605857252u, 2718226491u, 2240965174u, 0, ASIN_TOLERANCE, 0},
+{ 231, 41761399u, 196714912u, 1054040628u, 3084755276u, 41761399u, 196714912u, 0, ASIN_TOLERANCE, 0},
+{ 232, 2665587864u, 2058851477u, 1052873711u, 1233598120u, 2665587864u, 2058851477u, 0, ASIN_TOLERANCE, 0},
+{ 233, 101299669u, 1909994277u, 3220384775u, 2863812374u, 101299669u, 1909994277u, 0, ASIN_TOLERANCE, 0},
+{ 234, 532015965u, 3697551156u, 1083211400u, 2869735287u, 532015965u, 3697551156u, 0, ASIN_TOLERANCE, 0},
+{ 235, 2830857894u, 2697221770u, 1092525956u, 2160271449u, 2830857894u, 2697221770u, 0, ASIN_TOLERANCE, 0},
+{ 236, 230734239u, 2762796844u, 1059257507u, 3160137573u, 230734239u, 2762796844u, 0, ASIN_TOLERANCE, 0},
+{ 237, 247044829u, 1758968847u, 1101109420u, 3270770898u, 247044829u, 1758968847u, 0, ASIN_TOLERANCE, 0},
+{ 238, 73012604u, 4005141897u, 3216213297u, 4129052985u, 73012604u, 4005141897u, 0, ASIN_TOLERANCE, 0},
+{ 239, 2970233606u, 137758261u, 1060349030u, 3082136857u, 2970233606u, 137758261u, 0, ASIN_TOLERANCE, 0},
+{ 240, 1068792039u, 2371653203u, 3211892131u, 3951914469u, 1068793473u, 3098305686u, 0, ASIN_TOLERANCE, 0},
+{ 241, 3109437504u, 3213595557u, 1043958672u, 2986160931u, 3109437504u, 3213595557u, 0, ASIN_TOLERANCE, 0},
+{ 242, 575927156u, 2540046258u, 3208370548u, 2048583911u, 575927156u, 2540046258u, 0, ASIN_TOLERANCE, 0},
+{ 243, 546830286u, 2264504930u, 3228769528u, 1854181735u, 546830286u, 2264504930u, 0, ASIN_TOLERANCE, 0},
+{ 244, 2183016286u, 3809768956u, 1054933586u, 595351688u, 2183016286u, 3809768956u, 0, ASIN_TOLERANCE, 0},
+{ 245, 723947614u, 3071069520u, 3207129696u, 3120974660u, 723947614u, 3071069520u, 0, ASIN_TOLERANCE, 0},
+{ 246, 945283056u, 1952618732u, 3236532520u, 1540955277u, 945283056u, 1952618732u, 0, ASIN_TOLERANCE, 0},
+{ 247, 747620529u, 1438803217u, 1049266525u, 957676449u, 747620529u, 1438803217u, 0, ASIN_TOLERANCE, 0},
+{ 248, 92767291u, 4222295662u, 1076131984u, 2183319069u, 92767291u, 4222295662u, 0, ASIN_TOLERANCE, 0},
+{ 249, 334611718u, 3887074118u, 3191649564u, 3233378721u, 334611718u, 3887074118u, 0, ASIN_TOLERANCE, 0},
+{ 250, 771768198u, 2099099488u, 3222430705u, 2071674991u, 771768198u, 2099099488u, 0, ASIN_TOLERANCE, 0},
+{ 251, 2409204087u, 2295269094u, 3196265320u, 3987032629u, 2409204087u, 2295269094u, 0, ASIN_TOLERANCE, 0},
+{ 252, 2377503648u, 4200095882u, 1086809994u, 1339996745u, 2377503648u, 4200095882u, 0, ASIN_TOLERANCE, 0},
+{ 253, 797809565u, 2431996507u, 1102017594u, 242934189u, 797809565u, 2431996507u, 0, ASIN_TOLERANCE, 0},
+{ 254, 2312749311u, 2330084417u, 1043172813u, 4043102110u, 2312749311u, 2330084417u, 0, ASIN_TOLERANCE, 0},
+{ 255, 988771849u, 1106978707u, 1082509751u, 2520765777u, 988771849u, 1106978707u, 0, ASIN_TOLERANCE, 0},
+{ 256, 864960887u, 3192168224u, 1066340820u, 3603945646u, 864960887u, 3192168224u, 0, ASIN_TOLERANCE, 0},
+{ 257, 2589695756u, 1952396835u, 3199434577u, 3703639356u, 2589695756u, 1952396835u, 0, ASIN_TOLERANCE, 0},
+{ 258, 320682810u, 1198219673u, 3230438668u, 2418060633u, 320682810u, 1198219673u, 0, ASIN_TOLERANCE, 0},
+{ 259, 551093026u, 2638353760u, 1093840413u, 1751560711u, 551093026u, 2638353760u, 0, ASIN_TOLERANCE, 0},
+{ 260, 540797521u, 180987057u, 1085420898u, 530063370u, 540797521u, 180987057u, 0, ASIN_TOLERANCE, 0},
+{ 261, 2760303516u, 3179145654u, 1048020008u, 3061407249u, 2760303516u, 3179145654u, 0, ASIN_TOLERANCE, 0},
+{ 262, 162525363u, 1884787302u, 1068713554u, 1737020797u, 162525363u, 1884787302u, 0, ASIN_TOLERANCE, 0},
+{ 263, 214216231u, 3459566012u, 3251200938u, 4126298722u, 214216231u, 3459566012u, 0, ASIN_TOLERANCE, 0},
+{ 264, 2764328342u, 1036370112u, 3235918644u, 3898933279u, 2764328342u, 1036370112u, 0, ASIN_TOLERANCE, 0},
+{ 265, 653867113u, 3276084832u, 3189072211u, 1864601262u, 653867113u, 3276084832u, 0, ASIN_TOLERANCE, 0},
+{ 266, 298324788u, 263075055u, 1100754245u, 1667825741u, 298324788u, 263075055u, 0, ASIN_TOLERANCE, 0},
+{ 267, 3015536039u, 2387220960u, 3253010819u, 3505575323u, 3015536039u, 2387220960u, 0, ASIN_TOLERANCE, 0},
+{ 268, 642739166u, 3154304623u, 1063475914u, 3150741666u, 642739166u, 3154304623u, 0, ASIN_TOLERANCE, 0},
+{ 269, 332025563u, 4200269406u, 3194288972u, 3577694711u, 332025563u, 4200269406u, 0, ASIN_TOLERANCE, 0},
+{ 270, 2339885777u, 2064011737u, 1089860833u, 3657008595u, 2339885777u, 2064011737u, 0, ASIN_TOLERANCE, 0},
+{ 271, 842190281u, 210665237u, 3197168874u, 510714829u, 842190281u, 210665237u, 0, ASIN_TOLERANCE, 0},
+{ 272, 728283504u, 1589701259u, 3251310843u, 17001602u, 728283504u, 1589701259u, 0, ASIN_TOLERANCE, 0},
+{ 273, 975043445u, 2928317152u, 3246958541u, 122162205u, 975043445u, 2928317152u, 0, ASIN_TOLERANCE, 0},
+{ 274, 3101610657u, 1288582346u, 1071556960u, 4177188454u, 3101610657u, 1288582346u, 0, ASIN_TOLERANCE, 0},
+{ 275, 151289169u, 3962848462u, 3243017171u, 3661038757u, 151289169u, 3962848462u, 0, ASIN_TOLERANCE, 0},
+{ 276, 2755192415u, 2162985241u, 3226640955u, 1639319068u, 2755192415u, 2162985241u, 0, ASIN_TOLERANCE, 0},
+{ 277, 2942384609u, 1996676305u, 1099130747u, 3840380763u, 2942384609u, 1996676305u, 0, ASIN_TOLERANCE, 0},
+{ 278, 134315769u, 550040067u, 3241901241u, 3372594924u, 134315769u, 550040067u, 0, ASIN_TOLERANCE, 0},
+{ 279, 3137373248u, 3164451169u, 1076627605u, 317246751u, 3137373248u, 3164451169u, 0, ASIN_TOLERANCE, 0},
+{ 280, 2423768299u, 784217153u, 1066058157u, 1225003160u, 2423768299u, 784217153u, 0, ASIN_TOLERANCE, 0},
+{ 281, 2378706924u, 1715871558u, 1101460352u, 3401958038u, 2378706924u, 1715871558u, 0, ASIN_TOLERANCE, 0},
+{ 282, 363631767u, 4086269531u, 1102279679u, 2517481591u, 363631767u, 4086269531u, 0, ASIN_TOLERANCE, 0},
+{ 283, 2329360168u, 2624677381u, 1085107111u, 1970804718u, 2329360168u, 2624677381u, 0, ASIN_TOLERANCE, 0},
+{ 284, 1010793546u, 3379532114u, 3249898830u, 3723025783u, 1010793546u, 3379532114u, 0, ASIN_TOLERANCE, 0},
+{ 285, 999588552u, 2651435439u, 3229039621u, 1030985387u, 999588552u, 2651435439u, 0, ASIN_TOLERANCE, 0},
+{ 286, 3145033808u, 1199535056u, 1077836259u, 3604666660u, 3145033808u, 1199535056u, 0, ASIN_TOLERANCE, 0},
+{ 287, 2548507371u, 3115209742u, 3237451386u, 3863935859u, 2548507371u, 3115209742u, 0, ASIN_TOLERANCE, 0},
+{ 288, 2398143146u, 4209496277u, 3199416183u, 1216202995u, 2398143146u, 4209496277u, 0, ASIN_TOLERANCE, 0},
+{ 289, 614398964u, 2544695332u, 3210577461u, 596332114u, 614398964u, 2544695332u, 0, ASIN_TOLERANCE, 0},
+{ 290, 514278395u, 1338323803u, 1041925718u, 99526924u, 514278395u, 1338323803u, 0, ASIN_TOLERANCE, 0},
+{ 291, 856573491u, 3149653097u, 1103058665u, 2483495776u, 856573491u, 3149653097u, 0, ASIN_TOLERANCE, 0},
+{ 292, 2339743312u, 280536835u, 1044395245u, 3715707641u, 2339743312u, 280536835u, 0, ASIN_TOLERANCE, 0},
+{ 293, 128894757u, 3670016377u, 1050809029u, 3775007802u, 128894757u, 3670016377u, 0, ASIN_TOLERANCE, 0},
+{ 294, 3109073100u, 3526859225u, 3222673081u, 4030462447u, 3109073100u, 3526859225u, 0, ASIN_TOLERANCE, 0},
+{ 295, 640779949u, 1602527268u, 3242467576u, 2018361566u, 640779949u, 1602527268u, 0, ASIN_TOLERANCE, 0},
+{ 296, 957271688u, 3985805054u, 1088518381u, 1679321540u, 957271688u, 3985805054u, 0, ASIN_TOLERANCE, 0},
+{ 297, 2801498828u, 1663896708u, 3248819198u, 4229852270u, 2801498828u, 1663896708u, 0, ASIN_TOLERANCE, 0},
+{ 298, 467728155u, 2346627527u, 3239438934u, 2290493820u, 467728155u, 2346627527u, 0, ASIN_TOLERANCE, 0},
+{ 299, 2208629720u, 2296736794u, 3207683799u, 1456667044u, 2208629720u, 2296736794u, 0, ASIN_TOLERANCE, 0},
+{ 300, 2958022504u, 4132454009u, 1106540396u, 4243490703u, 2958022504u, 4132454009u, 0, ASIN_TOLERANCE, 0},
+{ 301, 235395447u, 1359445676u, 3190130903u, 1569883678u, 235395447u, 1359445676u, 0, ASIN_TOLERANCE, 0},
+{ 302, 277859320u, 333214083u, 1076552006u, 1385185236u, 277859320u, 333214083u, 0, ASIN_TOLERANCE, 0},
+{ 303, 2942645471u, 950097945u, 1041232546u, 3621700966u, 2942645471u, 950097945u, 0, ASIN_TOLERANCE, 0},
+{ 304, 370898672u, 149336372u, 3191764868u, 2940199511u, 370898672u, 149336372u, 0, ASIN_TOLERANCE, 0},
+{ 305, 2384610875u, 2875684421u, 3249377056u, 4253432396u, 2384610875u, 2875684421u, 0, ASIN_TOLERANCE, 0},
+{ 306, 837504978u, 2081484836u, 3199314748u, 2264912911u, 837504978u, 2081484836u, 0, ASIN_TOLERANCE, 0},
+{ 307, 632882934u, 3967859615u, 3229710481u, 2667348142u, 632882934u, 3967859615u, 0, ASIN_TOLERANCE, 0},
+{ 308, 2181979516u, 3630082248u, 3227364534u, 4156569147u, 2181979516u, 3630082248u, 0, ASIN_TOLERANCE, 0},
+{ 309, 946956756u, 2993509124u, 1091331299u, 4018898246u, 946956756u, 2993509124u, 0, ASIN_TOLERANCE, 0},
+{ 310, 338207615u, 1642285349u, 3208379731u, 1196091123u, 338207615u, 1642285349u, 0, ASIN_TOLERANCE, 0},
+{ 311, 4693283u, 3356597889u, 1040231079u, 2420753479u, 4693283u, 3356597889u, 0, ASIN_TOLERANCE, 0},
+{ 312, 2762118529u, 977967943u, 3228887283u, 807395730u, 2762118529u, 977967943u, 0, ASIN_TOLERANCE, 0},
+{ 313, 2919435607u, 2730725979u, 3207120390u, 3867917386u, 2919435607u, 2730725979u, 0, ASIN_TOLERANCE, 0},
+{ 314, 999294480u, 3504746045u, 1075794770u, 665882260u, 999294480u, 3504746045u, 0, ASIN_TOLERANCE, 0},
+{ 315, 2269075155u, 3385464702u, 1049896268u, 2757059958u, 2269075155u, 3385464702u, 0, ASIN_TOLERANCE, 0},
+{ 316, 536095951u, 1299923384u, 1101872081u, 2574386817u, 536095951u, 1299923384u, 0, ASIN_TOLERANCE, 0},
+{ 317, 2675071145u, 3171042375u, 1078533152u, 2312086600u, 2675071145u, 3171042375u, 0, ASIN_TOLERANCE, 0},
+{ 318, 2360735442u, 4236561530u, 1068042271u, 256515531u, 2360735442u, 4236561530u, 0, ASIN_TOLERANCE, 0},
+{ 319, 2609926553u, 4152554926u, 1100304772u, 3545562886u, 2609926553u, 4152554926u, 0, ASIN_TOLERANCE, 0},
+{ 320, 2403546570u, 350924105u, 1040286251u, 1468770658u, 2403546570u, 350924105u, 0, ASIN_TOLERANCE, 0},
+{ 321, 544551146u, 3000822699u, 3232925779u, 2540988650u, 544551146u, 3000822699u, 0, ASIN_TOLERANCE, 0},
+{ 322, 2780107631u, 2928199244u, 3245167989u, 44275991u, 2780107631u, 2928199244u, 0, ASIN_TOLERANCE, 0},
+{ 323, 2165210001u, 1174874204u, 1057110584u, 848081004u, 2165210001u, 1174874204u, 0, ASIN_TOLERANCE, 0},
+{ 324, 2354568060u, 1412948540u, 3239110676u, 3215002775u, 2354568060u, 1412948540u, 0, ASIN_TOLERANCE, 0},
+{ 325, 863277892u, 2701562677u, 1065879622u, 2897481417u, 863277892u, 2701562677u, 0, ASIN_TOLERANCE, 0},
+{ 326, 199312991u, 2980401690u, 3216742908u, 2549609731u, 199312991u, 2980401690u, 0, ASIN_TOLERANCE, 0},
+{ 327, 2827983212u, 585456984u, 3201746087u, 638714580u, 2827983212u, 585456984u, 0, ASIN_TOLERANCE, 0},
+{ 328, 575008531u, 4260896505u, 1089137884u, 4274648992u, 575008531u, 4260896505u, 0, ASIN_TOLERANCE, 0},
+{ 329, 2728904219u, 4055046173u, 3198391736u, 3482894513u, 2728904219u, 4055046173u, 0, ASIN_TOLERANCE, 0},
+{ 330, 341009704u, 2493198836u, 3198094528u, 2484800635u, 341009704u, 2493198836u, 0, ASIN_TOLERANCE, 0},
+{ 331, 3153287889u, 599921010u, 1103847606u, 1674254897u, 3153287889u, 599921010u, 0, ASIN_TOLERANCE, 0},
+{ 332, 104926329u, 217148561u, 1097066495u, 3536010689u, 104926329u, 217148561u, 0, ASIN_TOLERANCE, 0},
+{ 333, 933395812u, 1605519917u, 3225218243u, 2732577078u, 933395812u, 1605519917u, 0, ASIN_TOLERANCE, 0},
+{ 334, 573219110u, 417261654u, 3246267157u, 3401343872u, 573219110u, 417261654u, 0, ASIN_TOLERANCE, 0},
+{ 335, 1039272770u, 2150330697u, 1080405602u, 3197535445u, 1039272770u, 2150330697u, 0, ASIN_TOLERANCE, 0},
+{ 336, 1065739247u, 2334624779u, 1070288136u, 147709079u, 1065739274u, 3700895036u, 0, ASIN_TOLERANCE, 0},
+{ 337, 3178645135u, 665848401u, 3235013045u, 2195099382u, 3178645135u, 665848401u, 0, ASIN_TOLERANCE, 0},
+{ 338, 364316788u, 238721142u, 3238780023u, 2612316049u, 364316788u, 238721142u, 0, ASIN_TOLERANCE, 0},
+{ 339, 2974180417u, 328119069u, 3231550903u, 696220816u, 2974180417u, 328119069u, 0, ASIN_TOLERANCE, 0},
+{ 340, 649641437u, 2886210843u, 1055433962u, 3331415058u, 649641437u, 2886210843u, 0, ASIN_TOLERANCE, 0},
+{ 341, 335135121u, 2420250111u, 3214614526u, 510850312u, 335135121u, 2420250111u, 0, ASIN_TOLERANCE, 0},
+{ 342, 2216193203u, 1658541647u, 1071956366u, 53496813u, 2216193203u, 1658541647u, 0, ASIN_TOLERANCE, 0},
+{ 343, 2567194005u, 3872563165u, 1098494887u, 2790313039u, 2567194005u, 3872563165u, 0, ASIN_TOLERANCE, 0},
+{ 344, 3219733872u, 3859621368u, 3205775949u, 4015749711u, 3219985579u, 1133459795u, 0, ASIN_TOLERANCE, 0},
+{ 345, 311334852u, 1732769560u, 1052132915u, 2774541952u, 311334852u, 1732769560u, 0, ASIN_TOLERANCE, 0},
+{ 346, 317917675u, 1689088021u, 1066883290u, 3270546122u, 317917675u, 1689088021u, 0, ASIN_TOLERANCE, 0},
+{ 347, 491335395u, 1959705843u, 1106618962u, 4198868105u, 491335395u, 1959705843u, 0, ASIN_TOLERANCE, 0},
+{ 348, 124503353u, 3906315805u, 3235289682u, 1109820549u, 124503353u, 3906315805u, 0, ASIN_TOLERANCE, 0},
+{ 349, 3036818075u, 3370448446u, 1063890856u, 4022784584u, 3036818075u, 3370448446u, 0, ASIN_TOLERANCE, 0},
+{ 350, 323334929u, 3264056381u, 1104622566u, 3697934821u, 323334929u, 3264056381u, 0, ASIN_TOLERANCE, 0},
+{ 351, 82666680u, 2912871781u, 3242116859u, 1560571600u, 82666680u, 2912871781u, 0, ASIN_TOLERANCE, 0},
+{ 352, 2776916990u, 3103325650u, 3237224234u, 3681651958u, 2776916990u, 3103325650u, 0, ASIN_TOLERANCE, 0},
+{ 353, 333678608u, 3330581237u, 1086856468u, 3110345659u, 333678608u, 3330581237u, 0, ASIN_TOLERANCE, 0},
+{ 354, 2487169180u, 2478706589u, 1099546513u, 4177071445u, 2487169180u, 2478706589u, 0, ASIN_TOLERANCE, 0},
+{ 355, 3183204741u, 3514067221u, 3247338343u, 585148435u, 3183204741u, 3514067221u, 0, ASIN_TOLERANCE, 0},
+{ 356, 2811486197u, 3689342853u, 3208758774u, 200507809u, 2811486197u, 3689342853u, 0, ASIN_TOLERANCE, 0},
+{ 357, 3116462959u, 1049872171u, 3210445232u, 1453705582u, 3116462959u, 1049872171u, 0, ASIN_TOLERANCE, 0},
+{ 358, 3129943472u, 1932668626u, 1098808013u, 1044068983u, 3129943472u, 1932668626u, 0, ASIN_TOLERANCE, 0},
+{ 359, 2295964401u, 4093388677u, 3210795947u, 1617393713u, 2295964401u, 4093388677u, 0, ASIN_TOLERANCE, 0},
+{ 360, 2293016564u, 778812087u, 3246232571u, 731905539u, 2293016564u, 778812087u, 0, ASIN_TOLERANCE, 0},
+{ 361, 2907822649u, 4050829759u, 1086605180u, 1863848117u, 2907822649u, 4050829759u, 0, ASIN_TOLERANCE, 0},
+{ 362, 6647363u, 718161191u, 1071063889u, 2637291484u, 6647363u, 718161191u, 0, ASIN_TOLERANCE, 0},
+{ 363, 224521970u, 1909842364u, 1102747575u, 3614304657u, 224521970u, 1909842364u, 0, ASIN_TOLERANCE, 0},
+{ 364, 761500166u, 895493977u, 3236485375u, 1701194116u, 761500166u, 895493977u, 0, ASIN_TOLERANCE, 0},
+{ 365, 2171563276u, 1493115846u, 3233339987u, 296022762u, 2171563276u, 1493115846u, 0, ASIN_TOLERANCE, 0},
+{ 366, 2783624899u, 4099447408u, 3187790416u, 3564720305u, 2783624899u, 4099447408u, 0, ASIN_TOLERANCE, 0},
+{ 367, 848425142u, 2404172709u, 3219922640u, 2284484846u, 848425142u, 2404172709u, 0, ASIN_TOLERANCE, 0},
+{ 368, 2654315895u, 3240896015u, 3208621510u, 1226668421u, 2654315895u, 3240896015u, 0, ASIN_TOLERANCE, 0},
+{ 369, 2488218361u, 4127752456u, 3200753143u, 2161953369u, 2488218361u, 4127752456u, 0, ASIN_TOLERANCE, 0},
+{ 370, 489605006u, 1168774591u, 3191311819u, 2375467787u, 489605006u, 1168774591u, 0, ASIN_TOLERANCE, 0},
+{ 371, 347845914u, 2883145553u, 3234998320u, 3286468014u, 347845914u, 2883145553u, 0, ASIN_TOLERANCE, 0},
+{ 372, 2588007471u, 3007671464u, 1102234703u, 1209628408u, 2588007471u, 3007671464u, 0, ASIN_TOLERANCE, 0},
+{ 373, 127334109u, 571692916u, 3243349276u, 1910625797u, 127334109u, 571692916u, 0, ASIN_TOLERANCE, 0},
+{ 374, 524138712u, 2510184860u, 1089525631u, 2209639467u, 524138712u, 2510184860u, 0, ASIN_TOLERANCE, 0},
+{ 375, 2615466346u, 1945605229u, 3227105252u, 3777119615u, 2615466346u, 1945605229u, 0, ASIN_TOLERANCE, 0},
+{ 376, 398493829u, 215226593u, 3235434773u, 224271737u, 398493829u, 215226593u, 0, ASIN_TOLERANCE, 0},
+{ 377, 2242993828u, 2134662911u, 1080232319u, 1056746021u, 2242993828u, 2134662911u, 0, ASIN_TOLERANCE, 0},
+{ 378, 2923358085u, 1099524039u, 1085032107u, 3905384073u, 2923358085u, 1099524039u, 0, ASIN_TOLERANCE, 0},
+{ 379, 842579915u, 985866260u, 3225437419u, 3120783698u, 842579915u, 985866260u, 0, ASIN_TOLERANCE, 0},
+{ 380, 2589795066u, 1700432859u, 3230345428u, 3505263023u, 2589795066u, 1700432859u, 0, ASIN_TOLERANCE, 0},
+{ 381, 2297683903u, 953966053u, 1090810641u, 151959421u, 2297683903u, 953966053u, 0, ASIN_TOLERANCE, 0},
+{ 382, 2887420078u, 1520016810u, 1096148013u, 1974161688u, 2887420078u, 1520016810u, 0, ASIN_TOLERANCE, 0},
+{ 383, 2738297064u, 1577726432u, 1080717542u, 3407236142u, 2738297064u, 1577726432u, 0, ASIN_TOLERANCE, 0},
+{ 384, 3154840433u, 358621181u, 3214344145u, 3735144364u, 3154840433u, 358621181u, 0, ASIN_TOLERANCE, 0},
+{ 385, 2521491907u, 4023613376u, 1095386964u, 959640601u, 2521491907u, 4023613376u, 0, ASIN_TOLERANCE, 0},
+{ 386, 2369008919u, 4136915018u, 1042238319u, 1264360404u, 2369008919u, 4136915018u, 0, ASIN_TOLERANCE, 0},
+{ 387, 2906418341u, 3543839161u, 1093859356u, 2852227162u, 2906418341u, 3543839161u, 0, ASIN_TOLERANCE, 0},
+{ 388, 2218509603u, 2154399659u, 3218171985u, 2610173674u, 2218509603u, 2154399659u, 0, ASIN_TOLERANCE, 0},
+{ 389, 165687034u, 2502718011u, 1105407582u, 4037997673u, 165687034u, 2502718011u, 0, ASIN_TOLERANCE, 0},
+{ 390, 3034344010u, 2429891750u, 3220651893u, 3433646170u, 3034344010u, 2429891750u, 0, ASIN_TOLERANCE, 0},
+{ 391, 397029567u, 1233242847u, 3233842223u, 1978947905u, 397029567u, 1233242847u, 0, ASIN_TOLERANCE, 0},
+{ 392, 32753845u, 3055512924u, 1085895689u, 2569766862u, 32753845u, 3055512924u, 0, ASIN_TOLERANCE, 0},
+{ 393, 498004465u, 3103627383u, 1075642950u, 676014010u, 498004465u, 3103627383u, 0, ASIN_TOLERANCE, 0},
+{ 394, 2622487710u, 3587249671u, 1050343198u, 2034180320u, 2622487710u, 3587249671u, 0, ASIN_TOLERANCE, 0},
+{ 395, 2559467693u, 1175750283u, 3228052153u, 441772035u, 2559467693u, 1175750283u, 0, ASIN_TOLERANCE, 0},
+{ 396, 639279177u, 1096886368u, 1067186387u, 4256284279u, 639279177u, 1096886368u, 0, ASIN_TOLERANCE, 0},
+{ 397, 208471934u, 2746455711u, 3243186220u, 383175406u, 208471934u, 2746455711u, 0, ASIN_TOLERANCE, 0},
+{ 398, 2829822244u, 1056466374u, 3247450556u, 3263564076u, 2829822244u, 1056466374u, 0, ASIN_TOLERANCE, 0},
+{ 399, 2468230336u, 1734210936u, 3195265560u, 514072505u, 2468230336u, 1734210936u, 0, ASIN_TOLERANCE, 0},
+{ 400, 758811245u, 1728341051u, 1092832248u, 3823410158u, 758811245u, 1728341051u, 0, ASIN_TOLERANCE, 0},
+{ 401, 2347191449u, 1235712656u, 3219475794u, 3622129011u, 2347191449u, 1235712656u, 0, ASIN_TOLERANCE, 0},
+{ 402, 79742765u, 1575194991u, 3197615492u, 3446988115u, 79742765u, 1575194991u, 0, ASIN_TOLERANCE, 0},
+{ 403, 2161423950u, 2362441752u, 1088255327u, 270039934u, 2161423950u, 2362441752u, 0, ASIN_TOLERANCE, 0},
+{ 404, 3010727959u, 3063626339u, 1105039555u, 1845818221u, 3010727959u, 3063626339u, 0, ASIN_TOLERANCE, 0},
+{ 405, 192788472u, 3718151518u, 3240183167u, 3113149567u, 192788472u, 3718151518u, 0, ASIN_TOLERANCE, 0},
+{ 406, 313112913u, 3686096237u, 3199484638u, 191185038u, 313112913u, 3686096237u, 0, ASIN_TOLERANCE, 0},
+{ 407, 195422631u, 3680158556u, 1105637038u, 349436087u, 195422631u, 3680158556u, 0, ASIN_TOLERANCE, 0},
+{ 408, 2844026099u, 150975354u, 1100107824u, 729077351u, 2844026099u, 150975354u, 0, ASIN_TOLERANCE, 0},
+{ 409, 3016106050u, 2974566906u, 1091481543u, 195479384u, 3016106050u, 2974566906u, 0, ASIN_TOLERANCE, 0},
+{ 410, 2820952232u, 953930448u, 3232752339u, 1009878771u, 2820952232u, 953930448u, 0, ASIN_TOLERANCE, 0},
+{ 411, 179600265u, 3369386607u, 1057414346u, 1319431804u, 179600265u, 3369386607u, 0, ASIN_TOLERANCE, 0},
+{ 412, 586131522u, 3279403983u, 3223631624u, 3404608264u, 586131522u, 3279403983u, 0, ASIN_TOLERANCE, 0},
+{ 413, 937427869u, 559918757u, 1105263000u, 1026957442u, 937427869u, 559918757u, 0, ASIN_TOLERANCE, 0},
+{ 414, 128542208u, 2658716822u, 1104708872u, 996387212u, 128542208u, 2658716822u, 0, ASIN_TOLERANCE, 0},
+{ 415, 2731512332u, 3244026687u, 1047704829u, 2987820261u, 2731512332u, 3244026687u, 0, ASIN_TOLERANCE, 0},
+{ 416, 829571115u, 1205633467u, 3212336151u, 731560768u, 829571115u, 1205633467u, 0, ASIN_TOLERANCE, 0},
+{ 417, 2850353849u, 3269211356u, 3233229218u, 2632041754u, 2850353849u, 3269211356u, 0, ASIN_TOLERANCE, 0},
+{ 418, 1070113635u, 1007200508u, 1086406456u, 1484610595u, 1070123776u, 907090054u, 0, ASIN_TOLERANCE, 0},
+{ 419, 968866968u, 3805991624u, 1101562011u, 3292762908u, 968866968u, 3805991624u, 0, ASIN_TOLERANCE, 0},
+{ 420, 2437809818u, 3314105762u, 3211254740u, 3489200637u, 2437809818u, 3314105762u, 0, ASIN_TOLERANCE, 0},
+{ 421, 2571363594u, 3198252706u, 3200980182u, 558779875u, 2571363594u, 3198252706u, 0, ASIN_TOLERANCE, 0},
+{ 422, 2377866012u, 2338464653u, 1083319346u, 4167405697u, 2377866012u, 2338464653u, 0, ASIN_TOLERANCE, 0},
+{ 423, 2919015115u, 2320792999u, 3245310028u, 2734025087u, 2919015115u, 2320792999u, 0, ASIN_TOLERANCE, 0},
+{ 424, 2318992495u, 832495279u, 3189857572u, 919851193u, 2318992495u, 832495279u, 0, ASIN_TOLERANCE, 0},
+{ 425, 3116721767u, 594640291u, 1077503330u, 976536412u, 3116721767u, 594640291u, 0, ASIN_TOLERANCE, 0},
+{ 426, 3139145310u, 79400523u, 3241084263u, 3353474633u, 3139145310u, 79400523u, 0, ASIN_TOLERANCE, 0},
+{ 427, 3132785785u, 1078965987u, 3233772596u, 3496966466u, 3132785785u, 1078965987u, 0, ASIN_TOLERANCE, 0},
+{ 428, 892587941u, 4243435186u, 1078663150u, 2446827483u, 892587941u, 4243435186u, 0, ASIN_TOLERANCE, 0},
+{ 429, 644490711u, 699817447u, 1081268534u, 2111588814u, 644490711u, 699817447u, 0, ASIN_TOLERANCE, 0},
+{ 430, 536635513u, 177265199u, 3233855943u, 965677531u, 536635513u, 177265199u, 0, ASIN_TOLERANCE, 0},
+{ 431, 624474831u, 3957229084u, 1065403841u, 3870961932u, 624474831u, 3957229084u, 0, ASIN_TOLERANCE, 0},
+{ 432, 2495519163u, 2768873929u, 3212244708u, 4127917680u, 2495519163u, 2768873929u, 0, ASIN_TOLERANCE, 0},
+{ 433, 445621604u, 3639227340u, 1068863190u, 4192848976u, 445621604u, 3639227340u, 0, ASIN_TOLERANCE, 0},
+{ 434, 2543806408u, 2824651320u, 1092946600u, 2150743372u, 2543806408u, 2824651320u, 0, ASIN_TOLERANCE, 0},
+{ 435, 417715333u, 1542109195u, 3223841580u, 2386809036u, 417715333u, 1542109195u, 0, ASIN_TOLERANCE, 0},
+{ 436, 192029360u, 1374810628u, 3218415587u, 1623455911u, 192029360u, 1374810628u, 0, ASIN_TOLERANCE, 0},
+{ 437, 733790955u, 226433601u, 1048463914u, 2667067819u, 733790955u, 226433601u, 0, ASIN_TOLERANCE, 0},
+{ 438, 768579443u, 1339325351u, 1074062507u, 701901582u, 768579443u, 1339325351u, 0, ASIN_TOLERANCE, 0},
+{ 439, 2920705365u, 3631553324u, 1068350633u, 1231934926u, 2920705365u, 3631553324u, 0, ASIN_TOLERANCE, 0},
+{ 440, 2933708324u, 603977748u, 1098802865u, 1502493757u, 2933708324u, 603977748u, 0, ASIN_TOLERANCE, 0},
+{ 441, 852954796u, 4255242031u, 1076182326u, 2417637015u, 852954796u, 4255242031u, 0, ASIN_TOLERANCE, 0},
+{ 442, 3089857028u, 3270297477u, 1057486942u, 2885336275u, 3089857028u, 3270297477u, 0, ASIN_TOLERANCE, 0},
+{ 443, 2809553007u, 1162164397u, 3250508564u, 2047944882u, 2809553007u, 1162164397u, 0, ASIN_TOLERANCE, 0},
+{ 444, 2875372587u, 129658419u, 3243244851u, 817360375u, 2875372587u, 129658419u, 0, ASIN_TOLERANCE, 0},
+{ 445, 286421081u, 4166988101u, 3246796270u, 1780823036u, 286421081u, 4166988101u, 0, ASIN_TOLERANCE, 0},
+{ 446, 668574270u, 418009120u, 1081026514u, 909013508u, 668574270u, 418009120u, 0, ASIN_TOLERANCE, 0},
+{ 447, 3082072506u, 4186670845u, 1073362089u, 2619129420u, 3082072506u, 4186670845u, 0, ASIN_TOLERANCE, 0},
+{ 448, 795252317u, 1348987467u, 3217165795u, 4162017137u, 795252317u, 1348987467u, 0, ASIN_TOLERANCE, 0},
+{ 449, 2946795826u, 2808968027u, 1057864611u, 275397670u, 2946795826u, 2808968027u, 0, ASIN_TOLERANCE, 0},
+{ 450, 513174607u, 240711581u, 3188571226u, 991292615u, 513174607u, 240711581u, 0, ASIN_TOLERANCE, 0},
+{ 451, 2439023326u, 1881121353u, 1082366688u, 3029043132u, 2439023326u, 1881121353u, 0, ASIN_TOLERANCE, 0},
+{ 452, 192508083u, 4250650421u, 3246612558u, 2498768625u, 192508083u, 4250650421u, 0, ASIN_TOLERANCE, 0},
+{ 453, 3180747941u, 2999983605u, 1096654323u, 2577373394u, 3180747941u, 2999983605u, 0, ASIN_TOLERANCE, 0},
+{ 454, 868314815u, 1300140379u, 3213491585u, 55226854u, 868314815u, 1300140379u, 0, ASIN_TOLERANCE, 0},
+{ 455, 49966445u, 13489454u, 3217461344u, 1447224005u, 49966445u, 13489454u, 0, ASIN_TOLERANCE, 0},
+{ 456, 2210271568u, 180789028u, 3221481024u, 2263184048u, 2210271568u, 180789028u, 0, ASIN_TOLERANCE, 0},
+{ 457, 2397088667u, 426293588u, 3239818611u, 1789635787u, 2397088667u, 426293588u, 0, ASIN_TOLERANCE, 0},
+{ 458, 302342406u, 1048286093u, 3227133745u, 2920139253u, 302342406u, 1048286093u, 0, ASIN_TOLERANCE, 0},
+{ 459, 540854981u, 287184966u, 1093076159u, 1371882685u, 540854981u, 287184966u, 0, ASIN_TOLERANCE, 0},
+{ 460, 770805810u, 2474797470u, 1065280366u, 1506889536u, 770805810u, 2474797470u, 0, ASIN_TOLERANCE, 0},
+{ 461, 2555731452u, 345487446u, 1053421486u, 1197157341u, 2555731452u, 345487446u, 0, ASIN_TOLERANCE, 0},
+{ 462, 2628226629u, 515700445u, 3214016873u, 2783826669u, 2628226629u, 515700445u, 0, ASIN_TOLERANCE, 0},
+{ 463, 467959892u, 1025779807u, 3217947229u, 937205825u, 467959892u, 1025779807u, 0, ASIN_TOLERANCE, 0},
+{ 464, 3185898801u, 503864881u, 1076822915u, 2345033570u, 3185898801u, 503864881u, 0, ASIN_TOLERANCE, 0},
+{ 465, 393896468u, 596014050u, 3250464728u, 3171536734u, 393896468u, 596014050u, 0, ASIN_TOLERANCE, 0},
+{ 466, 2267420964u, 3948135817u, 3235208235u, 557360557u, 2267420964u, 3948135817u, 0, ASIN_TOLERANCE, 0},
+{ 467, 2954074298u, 110029735u, 1081878271u, 658156641u, 2954074298u, 110029735u, 0, ASIN_TOLERANCE, 0},
+{ 468, 566438875u, 2733782773u, 1068148429u, 2141208212u, 566438875u, 2733782773u, 0, ASIN_TOLERANCE, 0},
+{ 469, 2666943954u, 790308557u, 1107048971u, 563615979u, 2666943954u, 790308557u, 0, ASIN_TOLERANCE, 0},
+{ 470, 2405996540u, 2566307075u, 1083723970u, 1428203311u, 2405996540u, 2566307075u, 0, ASIN_TOLERANCE, 0},
+{ 471, 2270749356u, 3880424699u, 3236471057u, 2886278126u, 2270749356u, 3880424699u, 0, ASIN_TOLERANCE, 0},
+{ 472, 524758414u, 2701977458u, 1043006318u, 4263191658u, 524758414u, 2701977458u, 0, ASIN_TOLERANCE, 0},
+{ 473, 2942114697u, 1360096867u, 3234511235u, 722957892u, 2942114697u, 1360096867u, 0, ASIN_TOLERANCE, 0},
+{ 474, 3154505042u, 1993420044u, 1095357710u, 2156133394u, 3154505042u, 1993420044u, 0, ASIN_TOLERANCE, 0},
+{ 475, 2461372509u, 3917014693u, 3239137997u, 3218865041u, 2461372509u, 3917014693u, 0, ASIN_TOLERANCE, 0},
+{ 476, 2423614376u, 3840388050u, 1044708748u, 3339981792u, 2423614376u, 3840388050u, 0, ASIN_TOLERANCE, 0},
+{ 477, 68664930u, 2548196869u, 1075650752u, 2503792874u, 68664930u, 2548196869u, 0, ASIN_TOLERANCE, 0},
+{ 478, 27003265u, 3589631476u, 3235077884u, 2445744426u, 27003265u, 3589631476u, 0, ASIN_TOLERANCE, 0},
+{ 479, 520248228u, 203410210u, 1058974455u, 4258595472u, 520248228u, 203410210u, 0, ASIN_TOLERANCE, 0},
+{ 480, 191352353u, 3053913996u, 1043884546u, 2757616601u, 191352353u, 3053913996u, 0, ASIN_TOLERANCE, 0},
+{ 481, 2602287836u, 1038998189u, 3205430458u, 3695555540u, 2602287836u, 1038998189u, 0, ASIN_TOLERANCE, 0},
+{ 482, 2449136794u, 4118722076u, 1042468417u, 3583005947u, 2449136794u, 4118722076u, 0, ASIN_TOLERANCE, 0},
+{ 483, 2166884388u, 1539535238u, 3246934215u, 508708967u, 2166884388u, 1539535238u, 0, ASIN_TOLERANCE, 0},
+{ 484, 2298893886u, 1355147861u, 3251354609u, 4133432965u, 2298893886u, 1355147861u, 0, ASIN_TOLERANCE, 0},
+{ 485, 826309703u, 1630207738u, 3189562989u, 2643371954u, 826309703u, 1630207738u, 0, ASIN_TOLERANCE, 0},
+{ 486, 1044987158u, 3806259293u, 3242741783u, 15657985u, 1044987158u, 3806259293u, 0, ASIN_TOLERANCE, 0},
+{ 487, 497456897u, 151607638u, 3227697753u, 467630898u, 497456897u, 151607638u, 0, ASIN_TOLERANCE, 0},
+{ 488, 3017637501u, 1016107066u, 1077142954u, 2195497000u, 3017637501u, 1016107066u, 0, ASIN_TOLERANCE, 0},
+{ 489, 2893082164u, 605010161u, 1050995677u, 3081653542u, 2893082164u, 605010161u, 0, ASIN_TOLERANCE, 0},
+{ 490, 469011148u, 4071435209u, 3207925259u, 1894382776u, 469011148u, 4071435209u, 0, ASIN_TOLERANCE, 0},
+{ 491, 2531356920u, 1522707251u, 3218735666u, 1578075186u, 2531356920u, 1522707251u, 0, ASIN_TOLERANCE, 0},
+{ 492, 431642664u, 1500392608u, 3190947192u, 3634607405u, 431642664u, 1500392608u, 0, ASIN_TOLERANCE, 0},
+{ 493, 2582144456u, 3646244007u, 3197852749u, 3808681655u, 2582144456u, 3646244007u, 0, ASIN_TOLERANCE, 0},
+{ 494, 233126338u, 1821773119u, 1094752155u, 1757234723u, 233126338u, 1821773119u, 0, ASIN_TOLERANCE, 0},
+{ 495, 2765502023u, 3794954283u, 3238755664u, 1209121339u, 2765502023u, 3794954283u, 0, ASIN_TOLERANCE, 0},
+{ 496, 2342622984u, 1775878726u, 1096028209u, 221183908u, 2342622984u, 1775878726u, 0, ASIN_TOLERANCE, 0},
+{ 497, 231520693u, 615054313u, 1105995987u, 1405024657u, 231520693u, 615054313u, 0, ASIN_TOLERANCE, 0},
+{ 498, 2401381272u, 2784860416u, 1074009275u, 787419698u, 2401381272u, 2784860416u, 0, ASIN_TOLERANCE, 0},
+{ 499, 943699878u, 2079960298u, 1074123223u, 2100091620u, 943699878u, 2079960298u, 0, ASIN_TOLERANCE, 0},
+{ 500, 592542034u, 311050208u, 3211234312u, 806358659u, 592542034u, 311050208u, 0, ASIN_TOLERANCE, 0},
+{ 501, 554939259u, 898080849u, 1106754706u, 2510882902u, 554939259u, 898080849u, 0, ASIN_TOLERANCE, 0},
+{ 502, 2949198761u, 2015533813u, 1089275809u, 298982001u, 2949198761u, 2015533813u, 0, ASIN_TOLERANCE, 0},
+{ 503, 989540066u, 914741728u, 1092886795u, 464054401u, 989540066u, 914741728u, 0, ASIN_TOLERANCE, 0},
+{ 504, 2304253208u, 3863739765u, 3214711653u, 3915767823u, 2304253208u, 3863739765u, 0, ASIN_TOLERANCE, 0},
+{ 505, 958251880u, 3239739200u, 1104805370u, 2971054003u, 958251880u, 3239739200u, 0, ASIN_TOLERANCE, 0},
+{ 506, 2670649374u, 2491104644u, 3198242303u, 2559304728u, 2670649374u, 2491104644u, 0, ASIN_TOLERANCE, 0},
+{ 507, 939123286u, 684435317u, 1055177809u, 2787628393u, 939123286u, 684435317u, 0, ASIN_TOLERANCE, 0},
+{ 508, 2541359251u, 1636085321u, 1069717586u, 4235233108u, 2541359251u, 1636085321u, 0, ASIN_TOLERANCE, 0},
+{ 509, 1044593898u, 202708387u, 3196003256u, 482423661u, 1044593898u, 202708387u, 0, ASIN_TOLERANCE, 0},
+{ 510, 139626925u, 2518164801u, 3206911657u, 1250530357u, 139626925u, 2518164801u, 0, ASIN_TOLERANCE, 0},
+{ 511, 2850784019u, 3737313137u, 1045922781u, 3136078996u, 2850784019u, 3737313137u, 0, ASIN_TOLERANCE, 0},
+{ 512, 2263385372u, 2650572904u, 3215945256u, 2341430700u, 2263385372u, 2650572904u, 0, ASIN_TOLERANCE, 0},
+{ 513, 2703884311u, 4279456618u, 1045375126u, 3817511514u, 2703884311u, 4279456618u, 0, ASIN_TOLERANCE, 0},
+{ 514, 2332933790u, 1898920133u, 3238856617u, 3322385778u, 2332933790u, 1898920133u, 0, ASIN_TOLERANCE, 0},
+{ 515, 628125129u, 769863378u, 3205646293u, 3033900668u, 628125129u, 769863378u, 0, ASIN_TOLERANCE, 0},
+{ 516, 3150112853u, 2363605017u, 1057042323u, 3607277737u, 3150112853u, 2363605017u, 0, ASIN_TOLERANCE, 0},
+{ 517, 453059902u, 2102433536u, 1073687186u, 1772007848u, 453059902u, 2102433536u, 0, ASIN_TOLERANCE, 0},
+{ 518, 3088101403u, 1756195518u, 3225902960u, 1222779056u, 3088101403u, 1756195518u, 0, ASIN_TOLERANCE, 0},
+{ 519, 936228020u, 1142293403u, 3242693386u, 741039297u, 936228020u, 1142293403u, 0, ASIN_TOLERANCE, 0},
+{ 520, 1034983355u, 2830408439u, 1041913758u, 3306391490u, 1034983355u, 2830408439u, 0, ASIN_TOLERANCE, 0},
+{ 521, 2352979086u, 2205233857u, 1075419064u, 4008575827u, 2352979086u, 2205233857u, 0, ASIN_TOLERANCE, 0},
+{ 522, 445518797u, 2566866389u, 1094655457u, 4036587454u, 445518797u, 2566866389u, 0, ASIN_TOLERANCE, 0},
+{ 523, 311145393u, 1824828952u, 3243078353u, 4292530873u, 311145393u, 1824828952u, 0, ASIN_TOLERANCE, 0},
+{ 524, 2553824191u, 4155068217u, 3207589361u, 3447729183u, 2553824191u, 4155068217u, 0, ASIN_TOLERANCE, 0},
+{ 525, 2798856384u, 2756570858u, 1076273685u, 3333057399u, 2798856384u, 2756570858u, 0, ASIN_TOLERANCE, 0},
+{ 526, 2550428645u, 1207089191u, 1092166391u, 1769908602u, 2550428645u, 1207089191u, 0, ASIN_TOLERANCE, 0},
+{ 527, 554295846u, 859290299u, 1041428225u, 1286082196u, 554295846u, 859290299u, 0, ASIN_TOLERANCE, 0},
+{ 528, 246159230u, 2207831048u, 1106576697u, 1339163028u, 246159230u, 2207831048u, 0, ASIN_TOLERANCE, 0},
+{ 529, 2239899566u, 1165991857u, 3203879091u, 4174125604u, 2239899566u, 1165991857u, 0, ASIN_TOLERANCE, 0},
+{ 530, 182461702u, 2169701868u, 3241819561u, 4227279451u, 182461702u, 2169701868u, 0, ASIN_TOLERANCE, 0},
+{ 531, 2888196098u, 2123622490u, 1052662593u, 2279271809u, 2888196098u, 2123622490u, 0, ASIN_TOLERANCE, 0},
+{ 532, 702835388u, 695374285u, 1047701002u, 522745399u, 702835388u, 695374285u, 0, ASIN_TOLERANCE, 0},
+{ 533, 280094216u, 1510677208u, 1076782817u, 1111322288u, 280094216u, 1510677208u, 0, ASIN_TOLERANCE, 0},
+{ 534, 179077993u, 2623205988u, 1103171923u, 4172761053u, 179077993u, 2623205988u, 0, ASIN_TOLERANCE, 0},
+{ 535, 2177736938u, 4217535562u, 1105411820u, 178360855u, 2177736938u, 4217535562u, 0, ASIN_TOLERANCE, 0},
+{ 536, 682463458u, 3302529767u, 3204908280u, 3960051056u, 682463458u, 3302529767u, 0, ASIN_TOLERANCE, 0},
+{ 537, 398729522u, 3128926115u, 3230393394u, 689920399u, 398729522u, 3128926115u, 0, ASIN_TOLERANCE, 0},
+{ 538, 2611898873u, 2975884353u, 1080874032u, 706326922u, 2611898873u, 2975884353u, 0, ASIN_TOLERANCE, 0},
+{ 539, 893776139u, 198291836u, 1095644375u, 1686271744u, 893776139u, 198291836u, 0, ASIN_TOLERANCE, 0},
+{ 540, 2380685920u, 3678973777u, 3196054178u, 2497695971u, 2380685920u, 3678973777u, 0, ASIN_TOLERANCE, 0},
+{ 541, 2240996065u, 3714083293u, 3243953714u, 2851269113u, 2240996065u, 3714083293u, 0, ASIN_TOLERANCE, 0},
+{ 542, 7542429u, 2117586075u, 1087270529u, 1032855763u, 7542429u, 2117586075u, 0, ASIN_TOLERANCE, 0},
+{ 543, 2223653732u, 3495001046u, 1086693149u, 4162905644u, 2223653732u, 3495001046u, 0, ASIN_TOLERANCE, 0},
+{ 544, 2567370325u, 2825204949u, 3197807718u, 3067810875u, 2567370325u, 2825204949u, 0, ASIN_TOLERANCE, 0},
+{ 545, 2595670946u, 3719019697u, 1095625346u, 658578931u, 2595670946u, 3719019697u, 0, ASIN_TOLERANCE, 0},
+{ 546, 387363057u, 2429869396u, 3239113006u, 3188949762u, 387363057u, 2429869396u, 0, ASIN_TOLERANCE, 0},
+{ 547, 396063874u, 322135328u, 3248332291u, 1527590526u, 396063874u, 322135328u, 0, ASIN_TOLERANCE, 0},
+{ 548, 2461424020u, 2823164069u, 3201760069u, 602345917u, 2461424020u, 2823164069u, 0, ASIN_TOLERANCE, 0},
+{ 549, 654769735u, 720378027u, 1076110022u, 259686655u, 654769735u, 720378027u, 0, ASIN_TOLERANCE, 0},
+{ 550, 2360883068u, 625961575u, 1060816217u, 2476435835u, 2360883068u, 625961575u, 0, ASIN_TOLERANCE, 0},
+{ 551, 788830837u, 606139429u, 3232916885u, 3326100828u, 788830837u, 606139429u, 0, ASIN_TOLERANCE, 0},
+{ 552, 3212982376u, 2141060868u, 1067726443u, 252856858u, 3212982392u, 1078759082u, 0, ASIN_TOLERANCE, 0},
+{ 553, 3127084040u, 474202816u, 1089644854u, 1764399210u, 3127084040u, 474202816u, 0, ASIN_TOLERANCE, 0},
+{ 554, 1019198392u, 2947116437u, 1041572001u, 3959708969u, 1019198392u, 2947116437u, 0, ASIN_TOLERANCE, 0},
+{ 555, 3213251752u, 4230614930u, 1056210276u, 3150822221u, 3213251781u, 4230967581u, 0, ASIN_TOLERANCE, 0},
+{ 556, 696157297u, 3263173528u, 1080112083u, 1228319033u, 696157297u, 3263173528u, 0, ASIN_TOLERANCE, 0},
+{ 557, 124362722u, 500312015u, 1063102682u, 2095470952u, 124362722u, 500312015u, 0, ASIN_TOLERANCE, 0},
+{ 558, 2571317678u, 989529088u, 1056203473u, 3527737002u, 2571317678u, 989529088u, 0, ASIN_TOLERANCE, 0},
+{ 559, 2250338535u, 1703579132u, 3224570219u, 634351649u, 2250338535u, 1703579132u, 0, ASIN_TOLERANCE, 0},
+{ 560, 2855421441u, 66133u, 3240749422u, 3515147331u, 2855421441u, 66133u, 0, ASIN_TOLERANCE, 0},
+{ 561, 2627889255u, 2627336059u, 1089793281u, 1944911728u, 2627889255u, 2627336059u, 0, ASIN_TOLERANCE, 0},
+{ 562, 759942356u, 2319970119u, 3249679385u, 445677602u, 759942356u, 2319970119u, 0, ASIN_TOLERANCE, 0},
+{ 563, 2547610355u, 3313890389u, 1096842854u, 754196284u, 2547610355u, 3313890389u, 0, ASIN_TOLERANCE, 0},
+{ 564, 2871033704u, 1726998596u, 3210485282u, 4166556675u, 2871033704u, 1726998596u, 0, ASIN_TOLERANCE, 0},
+{ 565, 501872914u, 486863841u, 3218994498u, 2509132460u, 501872914u, 486863841u, 0, ASIN_TOLERANCE, 0},
+{ 566, 1002164234u, 2205707903u, 1085826634u, 3041478081u, 1002164234u, 2205707903u, 0, ASIN_TOLERANCE, 0},
+{ 567, 525633549u, 4009409345u, 1040942443u, 2147611409u, 525633549u, 4009409345u, 0, ASIN_TOLERANCE, 0},
+{ 568, 2251207280u, 2036870072u, 1084696514u, 3107506430u, 2251207280u, 2036870072u, 0, ASIN_TOLERANCE, 0},
+{ 569, 756690877u, 690866455u, 3226560542u, 2431563109u, 756690877u, 690866455u, 0, ASIN_TOLERANCE, 0},
+{ 570, 998557361u, 3129862588u, 3198582472u, 2304023232u, 998557361u, 3129862588u, 0, ASIN_TOLERANCE, 0},
+{ 571, 2906016865u, 3579751536u, 3209420505u, 975391569u, 2906016865u, 3579751536u, 0, ASIN_TOLERANCE, 0},
+{ 572, 2560287784u, 546279008u, 1081489128u, 2489420520u, 2560287784u, 546279008u, 0, ASIN_TOLERANCE, 0},
+{ 573, 31598644u, 3355765111u, 3194253290u, 994990765u, 31598644u, 3355765111u, 0, ASIN_TOLERANCE, 0},
+{ 574, 2828168124u, 1040855381u, 1043794244u, 3259056345u, 2828168124u, 1040855381u, 0, ASIN_TOLERANCE, 0},
+{ 575, 2926398160u, 3002823940u, 1089005277u, 3148403594u, 2926398160u, 3002823940u, 0, ASIN_TOLERANCE, 0},
+{ 576, 860472364u, 4135775260u, 1062496213u, 1421204191u, 860472364u, 4135775260u, 0, ASIN_TOLERANCE, 0},
+{ 577, 2375372972u, 1772673503u, 1068413298u, 3250253780u, 2375372972u, 1772673503u, 0, ASIN_TOLERANCE, 0},
+{ 578, 2382680286u, 1058735200u, 3198812726u, 2912456147u, 2382680286u, 1058735200u, 0, ASIN_TOLERANCE, 0},
+{ 579, 207257772u, 3116809444u, 3228961207u, 1489607764u, 207257772u, 3116809444u, 0, ASIN_TOLERANCE, 0},
+{ 580, 3161255502u, 3193356522u, 1098081503u, 3349879051u, 3161255502u, 3193356522u, 0, ASIN_TOLERANCE, 0},
+{ 581, 2263814703u, 3863515794u, 3224248078u, 811645039u, 2263814703u, 3863515794u, 0, ASIN_TOLERANCE, 0},
+{ 582, 2558000392u, 257027843u, 3188376713u, 3688710472u, 2558000392u, 257027843u, 0, ASIN_TOLERANCE, 0},
+{ 583, 1047583344u, 1618589681u, 3252953815u, 1796441468u, 1047583344u, 1618589684u, 0, ASIN_TOLERANCE, 0},
+{ 584, 963715447u, 2772711004u, 1068817762u, 1417472413u, 963715447u, 2772711004u, 0, ASIN_TOLERANCE, 0},
+{ 585, 2899022012u, 3229431619u, 1048945392u, 2667359336u, 2899022012u, 3229431619u, 0, ASIN_TOLERANCE, 0},
+{ 586, 39332833u, 3031365654u, 3254047221u, 3088152449u, 39332833u, 3031365654u, 0, ASIN_TOLERANCE, 0},
+{ 587, 2400099045u, 1889351944u, 1105391374u, 3778764776u, 2400099045u, 1889351944u, 0, ASIN_TOLERANCE, 0},
+{ 588, 2853164987u, 2277852166u, 3203738947u, 1874699830u, 2853164987u, 2277852166u, 0, ASIN_TOLERANCE, 0},
+{ 589, 2730925178u, 341842475u, 1075005257u, 146768835u, 2730925178u, 341842475u, 0, ASIN_TOLERANCE, 0},
+{ 590, 2308700527u, 2872887668u, 1084601028u, 2879218577u, 2308700527u, 2872887668u, 0, ASIN_TOLERANCE, 0},
+{ 591, 2587566446u, 1935797167u, 1071669036u, 2712989912u, 2587566446u, 1935797167u, 0, ASIN_TOLERANCE, 0},
+{ 592, 253790896u, 1441615044u, 1092569414u, 3235243477u, 253790896u, 1441615044u, 0, ASIN_TOLERANCE, 0},
+{ 593, 2246162369u, 3221475559u, 1076923264u, 1614189331u, 2246162369u, 3221475559u, 0, ASIN_TOLERANCE, 0},
+{ 594, 883591469u, 1521698692u, 1063187098u, 2905773788u, 883591469u, 1521698692u, 0, ASIN_TOLERANCE, 0},
+{ 595, 578813437u, 1875339612u, 1097776841u, 3512997257u, 578813437u, 1875339612u, 0, ASIN_TOLERANCE, 0},
+{ 596, 313284539u, 1310991474u, 1042232933u, 315006632u, 313284539u, 1310991474u, 0, ASIN_TOLERANCE, 0},
+{ 597, 2187872770u, 400944269u, 1084139528u, 1113187101u, 2187872770u, 400944269u, 0, ASIN_TOLERANCE, 0},
+{ 598, 2196755783u, 4228884820u, 1086244087u, 4239134992u, 2196755783u, 4228884820u, 0, ASIN_TOLERANCE, 0},
+{ 599, 625667119u, 3885190346u, 1076394312u, 1081883031u, 625667119u, 3885190346u, 0, ASIN_TOLERANCE, 0},
+{ 600, 102978620u, 1185360438u, 1047721048u, 3255616886u, 102978620u, 1185360438u, 0, ASIN_TOLERANCE, 0},
+{ 601, 253870868u, 3242646057u, 3206743917u, 2797651324u, 253870868u, 3242646057u, 0, ASIN_TOLERANCE, 0},
+{ 602, 2741016991u, 2374818327u, 3200069106u, 409774909u, 2741016991u, 2374818327u, 0, ASIN_TOLERANCE, 0},
+{ 603, 541948600u, 129626762u, 3222418776u, 3265842151u, 541948600u, 129626762u, 0, ASIN_TOLERANCE, 0},
+{ 604, 409023275u, 2563211098u, 3195891786u, 3312029907u, 409023275u, 2563211098u, 0, ASIN_TOLERANCE, 0},
+{ 605, 590108432u, 2326742435u, 1061528026u, 3658027611u, 590108432u, 2326742435u, 0, ASIN_TOLERANCE, 0},
+{ 606, 47946496u, 4130434851u, 1086613209u, 1406937614u, 47946496u, 4130434851u, 0, ASIN_TOLERANCE, 0},
+{ 607, 2203282384u, 694337229u, 1098392210u, 673996985u, 2203282384u, 694337229u, 0, ASIN_TOLERANCE, 0},
+{ 608, 383120483u, 2165782899u, 3201118320u, 755437166u, 383120483u, 2165782899u, 0, ASIN_TOLERANCE, 0},
+{ 609, 2738514249u, 1631447464u, 1073129346u, 1109813769u, 2738514249u, 1631447464u, 0, ASIN_TOLERANCE, 0},
+{ 610, 996195808u, 1404490212u, 3191965790u, 388374829u, 996195808u, 1404490212u, 0, ASIN_TOLERANCE, 0},
+{ 611, 621407424u, 1187403069u, 3249235911u, 2333348025u, 621407424u, 1187403069u, 0, ASIN_TOLERANCE, 0},
+{ 612, 2238876819u, 3949359805u, 3217090542u, 278931643u, 2238876819u, 3949359805u, 0, ASIN_TOLERANCE, 0},
+{ 613, 122205568u, 3433131795u, 3216075884u, 1048643019u, 122205568u, 3433131795u, 0, ASIN_TOLERANCE, 0},
+{ 614, 378630966u, 2161249988u, 1080050285u, 1886767872u, 378630966u, 2161249988u, 0, ASIN_TOLERANCE, 0},
+{ 615, 2469519430u, 56508471u, 1101093005u, 3134765996u, 2469519430u, 56508471u, 0, ASIN_TOLERANCE, 0},
+{ 616, 2160574759u, 390814486u, 3252597757u, 4155481783u, 2160574759u, 390814486u, 0, ASIN_TOLERANCE, 0},
+{ 617, 244834788u, 2634623473u, 1106605935u, 3462407026u, 244834788u, 2634623473u, 0, ASIN_TOLERANCE, 0},
+{ 618, 3068667858u, 1081553801u, 3212510682u, 3597193645u, 3068667858u, 1081553801u, 0, ASIN_TOLERANCE, 0},
+{ 619, 2681145113u, 2712139310u, 1067397110u, 3991830201u, 2681145113u, 2712139310u, 0, ASIN_TOLERANCE, 0},
+{ 620, 2469611210u, 1021245839u, 1043439185u, 1476242017u, 2469611210u, 1021245839u, 0, ASIN_TOLERANCE, 0},
+{ 621, 605118806u, 3027425274u, 1057959382u, 1693579371u, 605118806u, 3027425274u, 0, ASIN_TOLERANCE, 0},
+{ 622, 723258643u, 890268116u, 3208358957u, 2499328701u, 723258643u, 890268116u, 0, ASIN_TOLERANCE, 0},
+{ 623, 3012075542u, 2762939960u, 1094140192u, 1946947338u, 3012075542u, 2762939960u, 0, ASIN_TOLERANCE, 0},
+{ 624, 2624504981u, 2848774892u, 1043728239u, 1868742480u, 2624504981u, 2848774892u, 0, ASIN_TOLERANCE, 0},
+{ 625, 631395565u, 2118639219u, 3208384560u, 392586300u, 631395565u, 2118639219u, 0, ASIN_TOLERANCE, 0},
+{ 626, 3100564519u, 3212404590u, 3227625019u, 2217276325u, 3100564519u, 3212404590u, 0, ASIN_TOLERANCE, 0},
+{ 627, 2726525578u, 3155371392u, 1098886483u, 418306480u, 2726525578u, 3155371392u, 0, ASIN_TOLERANCE, 0},
+{ 628, 404732165u, 2073105109u, 3222252812u, 4126276047u, 404732165u, 2073105109u, 0, ASIN_TOLERANCE, 0},
+{ 629, 666104043u, 3942715706u, 3225850891u, 2149087853u, 666104043u, 3942715706u, 0, ASIN_TOLERANCE, 0},
+{ 630, 691861022u, 2516919494u, 1054814504u, 3292931762u, 691861022u, 2516919494u, 0, ASIN_TOLERANCE, 0},
+{ 631, 158110000u, 1551415022u, 3207905213u, 640268289u, 158110000u, 1551415022u, 0, ASIN_TOLERANCE, 0},
+{ 632, 3017186687u, 576149615u, 1089986684u, 1988363455u, 3017186687u, 576149615u, 0, ASIN_TOLERANCE, 0},
+{ 633, 2189052396u, 3827250147u, 1092018604u, 3082769758u, 2189052396u, 3827250147u, 0, ASIN_TOLERANCE, 0},
+{ 634, 2963530013u, 2640124381u, 3224863391u, 3684597672u, 2963530013u, 2640124381u, 0, ASIN_TOLERANCE, 0},
+{ 635, 2674433095u, 3504206450u, 3208001954u, 1486636350u, 2674433095u, 3504206450u, 0, ASIN_TOLERANCE, 0},
+{ 636, 172271302u, 3087550224u, 1050189716u, 1104066383u, 172271302u, 3087550224u, 0, ASIN_TOLERANCE, 0},
+{ 637, 2937291508u, 3152457596u, 3248116497u, 1671039260u, 2937291508u, 3152457596u, 0, ASIN_TOLERANCE, 0},
+{ 638, 743510680u, 3745833360u, 1104273854u, 220649566u, 743510680u, 3745833360u, 0, ASIN_TOLERANCE, 0},
+{ 639, 455612679u, 3044998553u, 3244012440u, 3016971473u, 455612679u, 3044998553u, 0, ASIN_TOLERANCE, 0},
+{ 640, 2707727413u, 3615317113u, 1060844794u, 880769846u, 2707727413u, 3615317113u, 0, ASIN_TOLERANCE, 0},
+{ 641, 91972307u, 663715669u, 1063876456u, 1939925527u, 91972307u, 663715669u, 0, ASIN_TOLERANCE, 0},
+{ 642, 1031258381u, 3544355485u, 1082114513u, 2610512411u, 1031258381u, 3544355485u, 0, ASIN_TOLERANCE, 0},
+{ 643, 3062260532u, 4072884955u, 1076396408u, 1001273000u, 3062260532u, 4072884955u, 0, ASIN_TOLERANCE, 0},
+{ 644, 169240433u, 1808609104u, 3232187528u, 3260138616u, 169240433u, 1808609104u, 0, ASIN_TOLERANCE, 0},
+{ 645, 982018300u, 1018873491u, 3222306114u, 3725685935u, 982018300u, 1018873491u, 0, ASIN_TOLERANCE, 0},
+{ 646, 601770903u, 200987283u, 1044223733u, 3512285706u, 601770903u, 200987283u, 0, ASIN_TOLERANCE, 0},
+{ 647, 2542854589u, 4073670723u, 1077133533u, 2092229545u, 2542854589u, 4073670723u, 0, ASIN_TOLERANCE, 0},
+{ 648, 2434772723u, 1045739827u, 1099698978u, 2401260358u, 2434772723u, 1045739827u, 0, ASIN_TOLERANCE, 0},
+{ 649, 513980741u, 4127547980u, 1041823582u, 96012619u, 513980741u, 4127547980u, 0, ASIN_TOLERANCE, 0},
+{ 650, 2244412580u, 685986273u, 3236054528u, 743504842u, 2244412580u, 685986273u, 0, ASIN_TOLERANCE, 0},
+{ 651, 3152410687u, 3762173332u, 3229804761u, 4257281451u, 3152410687u, 3762173332u, 0, ASIN_TOLERANCE, 0},
+{ 652, 2398221552u, 883225705u, 1052657715u, 3748197546u, 2398221552u, 883225705u, 0, ASIN_TOLERANCE, 0},
+{ 653, 2914372880u, 1745689276u, 3189483003u, 3144701638u, 2914372880u, 1745689276u, 0, ASIN_TOLERANCE, 0},
+{ 654, 584466975u, 1188703132u, 3241765574u, 2567092606u, 584466975u, 1188703132u, 0, ASIN_TOLERANCE, 0},
+{ 655, 3142928545u, 1507281554u, 1093182670u, 3093165197u, 3142928545u, 1507281554u, 0, ASIN_TOLERANCE, 0},
+{ 656, 525538133u, 2853215019u, 1102960933u, 4219424176u, 525538133u, 2853215019u, 0, ASIN_TOLERANCE, 0},
+{ 657, 743378254u, 3350157882u, 3218026125u, 3380902958u, 743378254u, 3350157882u, 0, ASIN_TOLERANCE, 0},
+{ 658, 2920865644u, 3965656635u, 1041729367u, 1488955390u, 2920865644u, 3965656635u, 0, ASIN_TOLERANCE, 0},
+{ 659, 76342162u, 4066317764u, 3250193636u, 3709306303u, 76342162u, 4066317764u, 0, ASIN_TOLERANCE, 0},
+{ 660, 778187300u, 3648159195u, 1060671775u, 4137599200u, 778187300u, 3648159195u, 0, ASIN_TOLERANCE, 0},
+{ 661, 298140314u, 1730811304u, 3218425255u, 3228251203u, 298140314u, 1730811304u, 0, ASIN_TOLERANCE, 0},
+{ 662, 548008019u, 1112642402u, 1046926075u, 2339033206u, 548008019u, 1112642402u, 0, ASIN_TOLERANCE, 0},
+{ 663, 373953465u, 3920135590u, 1068578082u, 3455242298u, 373953465u, 3920135590u, 0, ASIN_TOLERANCE, 0},
+{ 664, 466000998u, 171021716u, 1104170032u, 643991456u, 466000998u, 171021716u, 0, ASIN_TOLERANCE, 0},
+{ 665, 2888399469u, 2072550721u, 3230599505u, 973021091u, 2888399469u, 2072550721u, 0, ASIN_TOLERANCE, 0},
+{ 666, 50905317u, 2724027649u, 1085564300u, 4142466137u, 50905317u, 2724027649u, 0, ASIN_TOLERANCE, 0},
+{ 667, 143727064u, 2551822580u, 3246069024u, 1987298072u, 143727064u, 2551822580u, 0, ASIN_TOLERANCE, 0},
+{ 668, 890335217u, 3397840241u, 3222713245u, 1041924997u, 890335217u, 3397840241u, 0, ASIN_TOLERANCE, 0},
+{ 669, 2679007644u, 1492572480u, 1050371810u, 2325437597u, 2679007644u, 1492572480u, 0, ASIN_TOLERANCE, 0},
+{ 670, 114124970u, 2135762681u, 3203689878u, 3625230590u, 114124970u, 2135762681u, 0, ASIN_TOLERANCE, 0},
+{ 671, 2580021722u, 3462823473u, 1042304476u, 902729486u, 2580021722u, 3462823473u, 0, ASIN_TOLERANCE, 0},
+{ 672, 2558456833u, 652173352u, 1093628675u, 363109783u, 2558456833u, 652173352u, 0, ASIN_TOLERANCE, 0},
+{ 673, 2931846653u, 3131010476u, 3195084967u, 2163853087u, 2931846653u, 3131010476u, 0, ASIN_TOLERANCE, 0},
+{ 674, 2860857242u, 2962422808u, 3191806742u, 291534500u, 2860857242u, 2962422808u, 0, ASIN_TOLERANCE, 0},
+{ 675, 3180910087u, 148717545u, 3227570855u, 1176638793u, 3180910087u, 148717545u, 0, ASIN_TOLERANCE, 0},
+{ 676, 846507519u, 592218494u, 3236967859u, 3643659929u, 846507519u, 592218494u, 0, ASIN_TOLERANCE, 0},
+{ 677, 799992724u, 3637018510u, 1096065187u, 2759677467u, 799992724u, 3637018510u, 0, ASIN_TOLERANCE, 0},
+{ 678, 2669496048u, 1394154169u, 3225515010u, 2895919661u, 2669496048u, 1394154169u, 0, ASIN_TOLERANCE, 0},
+{ 679, 2888699650u, 2576460670u, 3195138207u, 278693366u, 2888699650u, 2576460670u, 0, ASIN_TOLERANCE, 0},
+{ 680, 2397030301u, 3525993125u, 1046206559u, 960482701u, 2397030301u, 3525993125u, 0, ASIN_TOLERANCE, 0},
+{ 681, 566728356u, 3623493345u, 3245957327u, 2358092842u, 566728356u, 3623493345u, 0, ASIN_TOLERANCE, 0},
+{ 682, 2920406944u, 1470157513u, 1068598730u, 2360266862u, 2920406944u, 1470157513u, 0, ASIN_TOLERANCE, 0},
+{ 683, 287105933u, 2673272949u, 3190126532u, 3307152371u, 287105933u, 2673272949u, 0, ASIN_TOLERANCE, 0},
+{ 684, 2190509100u, 3554040933u, 3243091661u, 1074231128u, 2190509100u, 3554040933u, 0, ASIN_TOLERANCE, 0},
+{ 685, 2949859096u, 506000682u, 1099596445u, 3719284608u, 2949859096u, 506000682u, 0, ASIN_TOLERANCE, 0},
+{ 686, 143293603u, 1500851201u, 1079029789u, 395506977u, 143293603u, 1500851201u, 0, ASIN_TOLERANCE, 0},
+{ 687, 2216398316u, 2396922893u, 3215773801u, 3631674284u, 2216398316u, 2396922893u, 0, ASIN_TOLERANCE, 0},
+{ 688, 94791165u, 265423085u, 1064366729u, 2757995135u, 94791165u, 265423085u, 0, ASIN_TOLERANCE, 0},
+{ 689, 2260683291u, 3335726874u, 3204388695u, 1913160810u, 2260683291u, 3335726874u, 0, ASIN_TOLERANCE, 0},
+{ 690, 985593981u, 177525642u, 1089544219u, 1163479070u, 985593981u, 177525642u, 0, ASIN_TOLERANCE, 0},
+{ 691, 1059251204u, 1356562406u, 3218720719u, 3954981400u, 1059251204u, 1374970644u, 0, ASIN_TOLERANCE, 0},
+{ 692, 199560954u, 2411049585u, 3200282058u, 4212977532u, 199560954u, 2411049585u, 0, ASIN_TOLERANCE, 0},
+{ 693, 3115392997u, 1969400668u, 1082838033u, 792484989u, 3115392997u, 1969400668u, 0, ASIN_TOLERANCE, 0},
+{ 694, 413791550u, 3185069889u, 1102744820u, 1679200952u, 413791550u, 3185069889u, 0, ASIN_TOLERANCE, 0},
+{ 695, 816641623u, 2092563199u, 1077400892u, 3625477257u, 816641623u, 2092563199u, 0, ASIN_TOLERANCE, 0},
+{ 696, 990732070u, 3645477920u, 3233940628u, 730323504u, 990732070u, 3645477920u, 0, ASIN_TOLERANCE, 0},
+{ 697, 2640158643u, 1955024619u, 3229376333u, 3062236193u, 2640158643u, 1955024619u, 0, ASIN_TOLERANCE, 0},
+{ 698, 748924276u, 673553144u, 3222681322u, 3821101717u, 748924276u, 673553144u, 0, ASIN_TOLERANCE, 0},
+{ 699, 872312580u, 2833907590u, 1087265939u, 2570284543u, 872312580u, 2833907590u, 0, ASIN_TOLERANCE, 0},
+{ 700, 531712086u, 2911302424u, 1088378861u, 3400401866u, 531712086u, 2911302424u, 0, ASIN_TOLERANCE, 0},
+{ 701, 541730201u, 552676385u, 1048022712u, 1642148205u, 541730201u, 552676385u, 0, ASIN_TOLERANCE, 0},
+{ 702, 323876482u, 3259465719u, 1063427827u, 4168942284u, 323876482u, 3259465719u, 0, ASIN_TOLERANCE, 0},
+{ 703, 2757624524u, 757177023u, 3224829944u, 54374532u, 2757624524u, 757177023u, 0, ASIN_TOLERANCE, 0},
+{ 704, 25847614u, 3253287925u, 3239197056u, 3859570507u, 25847614u, 3253287925u, 0, ASIN_TOLERANCE, 0},
+{ 705, 2460961478u, 3154974007u, 1089011136u, 3913013165u, 2460961478u, 3154974007u, 0, ASIN_TOLERANCE, 0},
+{ 706, 311234957u, 2785357403u, 1103967007u, 2809598610u, 311234957u, 2785357403u, 0, ASIN_TOLERANCE, 0},
+{ 707, 484603275u, 3644503084u, 1071705136u, 2739219317u, 484603275u, 3644503084u, 0, ASIN_TOLERANCE, 0},
+{ 708, 2578002590u, 3518663743u, 1085926548u, 3708967464u, 2578002590u, 3518663743u, 0, ASIN_TOLERANCE, 0},
+{ 709, 3007242152u, 731479478u, 1076236288u, 2805941787u, 3007242152u, 731479478u, 0, ASIN_TOLERANCE, 0},
+{ 710, 2619048947u, 779131141u, 3197589176u, 237706897u, 2619048947u, 779131141u, 0, ASIN_TOLERANCE, 0},
+{ 711, 2641650858u, 2888131473u, 3245067887u, 2007039966u, 2641650858u, 2888131473u, 0, ASIN_TOLERANCE, 0},
+{ 712, 878934658u, 2219795442u, 1097959451u, 920385234u, 878934658u, 2219795442u, 0, ASIN_TOLERANCE, 0},
+{ 713, 970070259u, 1786246284u, 3210593296u, 3141517655u, 970070259u, 1786246284u, 0, ASIN_TOLERANCE, 0},
+{ 714, 28474706u, 1268866168u, 1056332378u, 3807437549u, 28474706u, 1268866168u, 0, ASIN_TOLERANCE, 0},
+{ 715, 593283356u, 2441697849u, 1095257734u, 352511160u, 593283356u, 2441697849u, 0, ASIN_TOLERANCE, 0},
+{ 716, 537273837u, 3291810518u, 1078085447u, 381074875u, 537273837u, 3291810518u, 0, ASIN_TOLERANCE, 0},
+{ 717, 466362499u, 387817055u, 3243585398u, 409681933u, 466362499u, 387817055u, 0, ASIN_TOLERANCE, 0},
+{ 718, 337512666u, 139599181u, 1104463616u, 3501253426u, 337512666u, 139599181u, 0, ASIN_TOLERANCE, 0},
+{ 719, 152302801u, 1804177501u, 1107025740u, 30866148u, 152302801u, 1804177501u, 0, ASIN_TOLERANCE, 0},
+{ 720, 2982215560u, 793748989u, 1082924614u, 1001569450u, 2982215560u, 793748989u, 0, ASIN_TOLERANCE, 0},
+{ 721, 3089760601u, 959143764u, 1058620462u, 2685722619u, 3089760601u, 959143764u, 0, ASIN_TOLERANCE, 0},
+{ 722, 2594786226u, 1587148467u, 1069298743u, 2465926195u, 2594786226u, 1587148467u, 0, ASIN_TOLERANCE, 0},
+{ 723, 932092665u, 2374376082u, 1041131964u, 1275798358u, 932092665u, 2374376082u, 0, ASIN_TOLERANCE, 0},
+{ 724, 3064898943u, 732591095u, 1105513168u, 188500721u, 3064898943u, 732591095u, 0, ASIN_TOLERANCE, 0},
+{ 725, 833576046u, 2203077164u, 1086779764u, 2814822707u, 833576046u, 2203077164u, 0, ASIN_TOLERANCE, 0},
+{ 726, 414881598u, 3478844638u, 1064472491u, 3289144186u, 414881598u, 3478844638u, 0, ASIN_TOLERANCE, 0},
+{ 727, 964227992u, 2435698269u, 3249016304u, 440309030u, 964227992u, 2435698269u, 0, ASIN_TOLERANCE, 0},
+{ 728, 2567296069u, 3788040806u, 3187722224u, 3342255097u, 2567296069u, 3788040806u, 0, ASIN_TOLERANCE, 0},
+{ 729, 723295838u, 2455751020u, 1103514973u, 3245053142u, 723295838u, 2455751020u, 0, ASIN_TOLERANCE, 0},
+{ 730, 844693850u, 4056651767u, 3239516201u, 4169582895u, 844693850u, 4056651767u, 0, ASIN_TOLERANCE, 0},
+{ 731, 550385160u, 2093642662u, 1100623425u, 792491672u, 550385160u, 2093642662u, 0, ASIN_TOLERANCE, 0},
+{ 732, 2816313046u, 83889365u, 1087600688u, 1006331335u, 2816313046u, 83889365u, 0, ASIN_TOLERANCE, 0},
+{ 733, 2572367713u, 1140517802u, 3243890765u, 4090711271u, 2572367713u, 1140517802u, 0, ASIN_TOLERANCE, 0},
+{ 734, 666576601u, 2418701513u, 3216964687u, 1555649649u, 666576601u, 2418701513u, 0, ASIN_TOLERANCE, 0},
+{ 735, 2251046969u, 1215163489u, 1051353113u, 3503287900u, 2251046969u, 1215163489u, 0, ASIN_TOLERANCE, 0},
+{ 736, 3159618610u, 641457589u, 1051716814u, 4121125128u, 3159618610u, 641457589u, 0, ASIN_TOLERANCE, 0},
+{ 737, 401932052u, 321857207u, 3250350790u, 1246006125u, 401932052u, 321857207u, 0, ASIN_TOLERANCE, 0},
+{ 738, 2953696013u, 120564990u, 1097266968u, 300149226u, 2953696013u, 120564990u, 0, ASIN_TOLERANCE, 0},
+{ 739, 2254220803u, 3244980052u, 1076924215u, 847775621u, 2254220803u, 3244980052u, 0, ASIN_TOLERANCE, 0},
+{ 740, 2771951028u, 112839452u, 3212858842u, 1569943525u, 2771951028u, 112839452u, 0, ASIN_TOLERANCE, 0},
+{ 741, 2165404842u, 2934678057u, 3212657738u, 3091042797u, 2165404842u, 2934678057u, 0, ASIN_TOLERANCE, 0},
+{ 742, 2704093164u, 547060795u, 1079752403u, 4043827022u, 2704093164u, 547060795u, 0, ASIN_TOLERANCE, 0},
+{ 743, 244578012u, 1790462845u, 1067969586u, 2345441039u, 244578012u, 1790462845u, 0, ASIN_TOLERANCE, 0},
+{ 744, 2182959566u, 2353653565u, 1049624664u, 882286568u, 2182959566u, 2353653565u, 0, ASIN_TOLERANCE, 0},
+{ 745, 462586144u, 1186302263u, 1078662178u, 2626148789u, 462586144u, 1186302263u, 0, ASIN_TOLERANCE, 0},
+{ 746, 279527707u, 4121656076u, 3224287260u, 1299277508u, 279527707u, 4121656076u, 0, ASIN_TOLERANCE, 0},
+{ 747, 470047975u, 2010385858u, 3233120941u, 4186702461u, 470047975u, 2010385858u, 0, ASIN_TOLERANCE, 0},
+{ 748, 2221693080u, 1323708810u, 3211281520u, 1640799315u, 2221693080u, 1323708810u, 0, ASIN_TOLERANCE, 0},
+{ 749, 3124323904u, 3503897938u, 3210262651u, 258643165u, 3124323904u, 3503897938u, 0, ASIN_TOLERANCE, 0},
+{ 750, 2619485313u, 2959074653u, 1058897059u, 4239182527u, 2619485313u, 2959074653u, 0, ASIN_TOLERANCE, 0},
+{ 751, 302551175u, 153547307u, 1099812861u, 3156123094u, 302551175u, 153547307u, 0, ASIN_TOLERANCE, 0},
+{ 752, 420210788u, 3996883503u, 1071341265u, 72657681u, 420210788u, 3996883503u, 0, ASIN_TOLERANCE, 0},
+{ 753, 158488136u, 1698212750u, 1068334402u, 160302703u, 158488136u, 1698212750u, 0, ASIN_TOLERANCE, 0},
+{ 754, 289138234u, 2257686389u, 1051856116u, 430357614u, 289138234u, 2257686389u, 0, ASIN_TOLERANCE, 0},
+{ 755, 2795510903u, 395145384u, 1046317717u, 1912800227u, 2795510903u, 395145384u, 0, ASIN_TOLERANCE, 0},
+{ 756, 935515004u, 674021561u, 3222496667u, 743247292u, 935515004u, 674021561u, 0, ASIN_TOLERANCE, 0},
+{ 757, 2822969173u, 1075007837u, 3222487779u, 639284837u, 2822969173u, 1075007837u, 0, ASIN_TOLERANCE, 0},
+{ 758, 924678051u, 3492386324u, 3251519349u, 1241408247u, 924678051u, 3492386324u, 0, ASIN_TOLERANCE, 0},
+{ 759, 2881777125u, 3998363272u, 3228147294u, 365769855u, 2881777125u, 3998363272u, 0, ASIN_TOLERANCE, 0},
+{ 760, 2662939411u, 4030509561u, 1066028735u, 1163947030u, 2662939411u, 4030509561u, 0, ASIN_TOLERANCE, 0},
+{ 761, 564717585u, 1914428658u, 3214617694u, 4147847493u, 564717585u, 1914428658u, 0, ASIN_TOLERANCE, 0},
+{ 762, 993107584u, 2889684117u, 1042972779u, 1225674604u, 993107584u, 2889684117u, 0, ASIN_TOLERANCE, 0},
+{ 763, 750290683u, 273406410u, 3206108502u, 145234164u, 750290683u, 273406410u, 0, ASIN_TOLERANCE, 0},
+{ 764, 3157290800u, 912384201u, 3237262916u, 3366320623u, 3157290800u, 912384201u, 0, ASIN_TOLERANCE, 0},
+{ 765, 3022814103u, 349339167u, 3197347448u, 3262060258u, 3022814103u, 349339167u, 0, ASIN_TOLERANCE, 0},
+{ 766, 393652178u, 2097272974u, 1064845294u, 1630215394u, 393652178u, 2097272974u, 0, ASIN_TOLERANCE, 0},
+{ 767, 2250994257u, 3355589350u, 3243019072u, 2316123825u, 2250994257u, 3355589350u, 0, ASIN_TOLERANCE, 0},
+{ 768, 307759713u, 1457407347u, 1101422760u, 4120356538u, 307759713u, 1457407347u, 0, ASIN_TOLERANCE, 0},
+{ 769, 2168158322u, 3228185359u, 3198251445u, 3743078041u, 2168158322u, 3228185359u, 0, ASIN_TOLERANCE, 0},
+{ 770, 880898735u, 1289357713u, 3230160936u, 2794962547u, 880898735u, 1289357713u, 0, ASIN_TOLERANCE, 0},
+{ 771, 903112316u, 1699456459u, 1083794396u, 4195811825u, 903112316u, 1699456459u, 0, ASIN_TOLERANCE, 0},
+{ 772, 129746399u, 1949114369u, 1084908557u, 1325384361u, 129746399u, 1949114369u, 0, ASIN_TOLERANCE, 0},
+{ 773, 709313868u, 3979168763u, 1049036668u, 2542947959u, 709313868u, 3979168763u, 0, ASIN_TOLERANCE, 0},
+{ 774, 776361251u, 676749439u, 3192662415u, 4013712036u, 776361251u, 676749439u, 0, ASIN_TOLERANCE, 0},
+{ 775, 255079628u, 3701636708u, 1042322101u, 3983171212u, 255079628u, 3701636708u, 0, ASIN_TOLERANCE, 0},
+{ 776, 2885977639u, 3830039616u, 3239465315u, 175489420u, 2885977639u, 3830039616u, 0, ASIN_TOLERANCE, 0},
+{ 777, 2871663155u, 2897269792u, 3230650366u, 3102389747u, 2871663155u, 2897269792u, 0, ASIN_TOLERANCE, 0},
+{ 778, 515647990u, 582170006u, 1068093936u, 3324264433u, 515647990u, 582170006u, 0, ASIN_TOLERANCE, 0},
+{ 779, 870187117u, 3574970337u, 1061955111u, 637826033u, 870187117u, 3574970337u, 0, ASIN_TOLERANCE, 0},
+{ 780, 2474474250u, 1733806710u, 3216760526u, 3188307974u, 2474474250u, 1733806710u, 0, ASIN_TOLERANCE, 0},
+{ 781, 25157138u, 2296028823u, 1096788400u, 1413568905u, 25157138u, 2296028823u, 0, ASIN_TOLERANCE, 0},
+{ 782, 967771954u, 1627289946u, 1046506286u, 1860326351u, 967771954u, 1627289946u, 0, ASIN_TOLERANCE, 0},
+{ 783, 876029804u, 1139086265u, 3242570406u, 3276908361u, 876029804u, 1139086265u, 0, ASIN_TOLERANCE, 0},
+{ 784, 444923881u, 3323762166u, 3206918506u, 946766885u, 444923881u, 3323762166u, 0, ASIN_TOLERANCE, 0},
+{ 785, 2438959626u, 188768962u, 1088324147u, 4105901663u, 2438959626u, 188768962u, 0, ASIN_TOLERANCE, 0},
+{ 786, 2731858209u, 460037366u, 3227174677u, 2159793181u, 2731858209u, 460037366u, 0, ASIN_TOLERANCE, 0},
+{ 787, 647960579u, 2589781051u, 3243737020u, 107237481u, 647960579u, 2589781051u, 0, ASIN_TOLERANCE, 0},
+{ 788, 342985206u, 3519881651u, 1057272132u, 2685921459u, 342985206u, 3519881651u, 0, ASIN_TOLERANCE, 0},
+{ 789, 620434247u, 1169160155u, 3206674485u, 3139856281u, 620434247u, 1169160155u, 0, ASIN_TOLERANCE, 0},
+{ 790, 1000422649u, 1898254525u, 3196770014u, 2458988443u, 1000422649u, 1898254525u, 0, ASIN_TOLERANCE, 0},
+{ 791, 756268268u, 2023065054u, 1050415907u, 4070768353u, 756268268u, 2023065054u, 0, ASIN_TOLERANCE, 0},
+{ 792, 284716157u, 3336260906u, 3237972475u, 3524355405u, 284716157u, 3336260906u, 0, ASIN_TOLERANCE, 0},
+{ 793, 2520138858u, 3298979042u, 3250099033u, 1003322861u, 2520138858u, 3298979042u, 0, ASIN_TOLERANCE, 0},
+{ 794, 780415343u, 1629423892u, 1061722650u, 2396420130u, 780415343u, 1629423892u, 0, ASIN_TOLERANCE, 0},
+{ 795, 2512306741u, 1945417606u, 3192839521u, 1585136212u, 2512306741u, 1945417606u, 0, ASIN_TOLERANCE, 0},
+{ 796, 2649414854u, 1527139640u, 1076681917u, 4150904895u, 2649414854u, 1527139640u, 0, ASIN_TOLERANCE, 0},
+{ 797, 315452952u, 267572666u, 1088475235u, 1517640973u, 315452952u, 267572666u, 0, ASIN_TOLERANCE, 0},
+{ 798, 948438656u, 1100855041u, 3229298529u, 2451533501u, 948438656u, 1100855041u, 0, ASIN_TOLERANCE, 0},
+{ 799, 2280476280u, 853088805u, 1050931318u, 3551516956u, 2280476280u, 853088805u, 0, ASIN_TOLERANCE, 0},
+{ 800, 927051214u, 1317953425u, 3217154900u, 431061758u, 927051214u, 1317953425u, 0, ASIN_TOLERANCE, 0},
+{ 801, 803065499u, 2317271661u, 1070436470u, 4014139535u, 803065499u, 2317271661u, 0, ASIN_TOLERANCE, 0},
+{ 802, 2766450812u, 3959292396u, 3249638947u, 906232948u, 2766450812u, 3959292396u, 0, ASIN_TOLERANCE, 0},
+{ 803, 475259033u, 1939780068u, 3253991906u, 906880052u, 475259033u, 1939780068u, 0, ASIN_TOLERANCE, 0},
+{ 804, 174037547u, 4170524292u, 3237763507u, 4075099457u, 174037547u, 4170524292u, 0, ASIN_TOLERANCE, 0},
+{ 805, 3111709674u, 3520923293u, 1067530616u, 2252399455u, 3111709674u, 3520923293u, 0, ASIN_TOLERANCE, 0},
+{ 806, 705974097u, 1097415680u, 1055600706u, 2690540698u, 705974097u, 1097415680u, 0, ASIN_TOLERANCE, 0},
+{ 807, 465450487u, 3086226264u, 3213898048u, 3220232067u, 465450487u, 3086226264u, 0, ASIN_TOLERANCE, 0},
+{ 808, 2906752413u, 2955360278u, 1051258339u, 557182478u, 2906752413u, 2955360278u, 0, ASIN_TOLERANCE, 0},
+{ 809, 2407140190u, 186287752u, 1104388811u, 1727111982u, 2407140190u, 186287752u, 0, ASIN_TOLERANCE, 0},
+{ 810, 3170043637u, 4057007843u, 1076281145u, 2008293104u, 3170043637u, 4057007843u, 0, ASIN_TOLERANCE, 0},
+{ 811, 3198834469u, 2741338484u, 3252544447u, 1207037505u, 3198834469u, 2741339245u, 0, ASIN_TOLERANCE, 0},
+{ 812, 625923799u, 102938901u, 3218894213u, 3620282197u, 625923799u, 102938901u, 0, ASIN_TOLERANCE, 0},
+{ 813, 2527426501u, 763746284u, 1060949875u, 80236875u, 2527426501u, 763746284u, 0, ASIN_TOLERANCE, 0},
+{ 814, 3055119358u, 1117970157u, 1084109014u, 939675744u, 3055119358u, 1117970157u, 0, ASIN_TOLERANCE, 0},
+{ 815, 1002709241u, 3478694019u, 1105453279u, 2493398454u, 1002709241u, 3478694019u, 0, ASIN_TOLERANCE, 0},
+{ 816, 278925941u, 2014323735u, 1096417600u, 1077078168u, 278925941u, 2014323735u, 0, ASIN_TOLERANCE, 0},
+{ 817, 22160783u, 1569149351u, 1091835152u, 3751608506u, 22160783u, 1569149351u, 0, ASIN_TOLERANCE, 0},
+{ 818, 2855839310u, 930375071u, 1084274438u, 1096450032u, 2855839310u, 930375071u, 0, ASIN_TOLERANCE, 0},
+{ 819, 949603377u, 4197396799u, 3220768028u, 3419252837u, 949603377u, 4197396799u, 0, ASIN_TOLERANCE, 0},
+{ 820, 2427096043u, 2553375912u, 3237078043u, 1357572894u, 2427096043u, 2553375912u, 0, ASIN_TOLERANCE, 0},
+{ 821, 2946808178u, 703318468u, 3198897773u, 3216391250u, 2946808178u, 703318468u, 0, ASIN_TOLERANCE, 0},
+{ 822, 682409255u, 3167959965u, 1069972300u, 4099039274u, 682409255u, 3167959965u, 0, ASIN_TOLERANCE, 0},
+{ 823, 551957760u, 1199490036u, 1047137152u, 2723130471u, 551957760u, 1199490036u, 0, ASIN_TOLERANCE, 0},
+{ 824, 2635855937u, 933683213u, 3243757155u, 1468458131u, 2635855937u, 933683213u, 0, ASIN_TOLERANCE, 0},
+{ 825, 954259401u, 763829445u, 3190480801u, 1772616584u, 954259401u, 763829445u, 0, ASIN_TOLERANCE, 0},
+{ 826, 1017324786u, 3416067384u, 1056206159u, 172017902u, 1017324786u, 3416067384u, 0, ASIN_TOLERANCE, 0},
+{ 827, 2553315334u, 2799176222u, 1099022088u, 1324575553u, 2553315334u, 2799176222u, 0, ASIN_TOLERANCE, 0},
+{ 828, 54501096u, 2237472662u, 3202361378u, 1770080863u, 54501096u, 2237472662u, 0, ASIN_TOLERANCE, 0},
+{ 829, 697886575u, 1509098263u, 3227321831u, 3313535397u, 697886575u, 1509098263u, 0, ASIN_TOLERANCE, 0},
+{ 830, 2834201307u, 1157206501u, 3201667023u, 2771836065u, 2834201307u, 1157206501u, 0, ASIN_TOLERANCE, 0},
+{ 831, 2845352423u, 841047693u, 3220229941u, 3851041620u, 2845352423u, 841047693u, 0, ASIN_TOLERANCE, 0},
+{ 832, 2559038255u, 1637635007u, 1096670395u, 363436727u, 2559038255u, 1637635007u, 0, ASIN_TOLERANCE, 0},
+{ 833, 895812927u, 544867276u, 3250055151u, 2005291812u, 895812927u, 544867276u, 0, ASIN_TOLERANCE, 0},
+{ 834, 613660095u, 1577788839u, 3213516258u, 3678234583u, 613660095u, 1577788839u, 0, ASIN_TOLERANCE, 0},
+{ 835, 2787880976u, 3005922702u, 1060624530u, 3900344258u, 2787880976u, 3005922702u, 0, ASIN_TOLERANCE, 0},
+{ 836, 369490497u, 4206745890u, 3212325607u, 3363748875u, 369490497u, 4206745890u, 0, ASIN_TOLERANCE, 0},
+{ 837, 547531448u, 2586849496u, 3195881612u, 1817038482u, 547531448u, 2586849496u, 0, ASIN_TOLERANCE, 0},
+{ 838, 2947779739u, 3675119568u, 3217354316u, 1280515099u, 2947779739u, 3675119568u, 0, ASIN_TOLERANCE, 0},
+{ 839, 2360207944u, 3785128270u, 3206980957u, 986337114u, 2360207944u, 3785128270u, 0, ASIN_TOLERANCE, 0},
+{ 840, 30415045u, 1959045465u, 3205100821u, 2165602568u, 30415045u, 1959045465u, 0, ASIN_TOLERANCE, 0},
+{ 841, 2874345345u, 4164694429u, 3228096442u, 1919088329u, 2874345345u, 4164694429u, 0, ASIN_TOLERANCE, 0},
+{ 842, 430207315u, 1381882442u, 3215734246u, 2587666792u, 430207315u, 1381882442u, 0, ASIN_TOLERANCE, 0},
+{ 843, 721933456u, 3295845115u, 1099763106u, 4189733918u, 721933456u, 3295845115u, 0, ASIN_TOLERANCE, 0},
+{ 844, 1020902692u, 528513718u, 3241318094u, 2446416887u, 1020902692u, 528513718u, 0, ASIN_TOLERANCE, 0},
+{ 845, 23459988u, 2336116589u, 1065985897u, 3314083915u, 23459988u, 2336116589u, 0, ASIN_TOLERANCE, 0},
+{ 846, 666699893u, 3946191348u, 3195771050u, 906783975u, 666699893u, 3946191348u, 0, ASIN_TOLERANCE, 0},
+{ 847, 2277669009u, 1307551746u, 3210796216u, 988905760u, 2277669009u, 1307551746u, 0, ASIN_TOLERANCE, 0},
+{ 848, 659686858u, 3690487540u, 1056058539u, 3252665112u, 659686858u, 3690487540u, 0, ASIN_TOLERANCE, 0},
+{ 849, 42479044u, 1832665932u, 1055271260u, 2605540156u, 42479044u, 1832665932u, 0, ASIN_TOLERANCE, 0},
+{ 850, 158726331u, 4095344603u, 3215114657u, 3444794506u, 158726331u, 4095344603u, 0, ASIN_TOLERANCE, 0},
+{ 851, 2383875900u, 1287837711u, 3242597773u, 4213798139u, 2383875900u, 1287837711u, 0, ASIN_TOLERANCE, 0},
+{ 852, 3153341967u, 2816125725u, 1059414555u, 1477859711u, 3153341967u, 2816125725u, 0, ASIN_TOLERANCE, 0},
+{ 853, 935772631u, 714564399u, 3193282956u, 2533012202u, 935772631u, 714564399u, 0, ASIN_TOLERANCE, 0},
+{ 854, 626995971u, 3592268374u, 1058283383u, 2901729097u, 626995971u, 3592268374u, 0, ASIN_TOLERANCE, 0},
+{ 855, 793386186u, 3559004137u, 1068514800u, 3160920849u, 793386186u, 3559004137u, 0, ASIN_TOLERANCE, 0},
+{ 856, 292955800u, 691190239u, 3222935981u, 1615104840u, 292955800u, 691190239u, 0, ASIN_TOLERANCE, 0},
+{ 857, 239139675u, 2475984769u, 1103239897u, 703637359u, 239139675u, 2475984769u, 0, ASIN_TOLERANCE, 0},
+{ 858, 710643921u, 441140946u, 3190536898u, 3492228424u, 710643921u, 441140946u, 0, ASIN_TOLERANCE, 0},
+{ 859, 161483935u, 3877369975u, 3202400099u, 3215202168u, 161483935u, 3877369975u, 0, ASIN_TOLERANCE, 0},
+{ 860, 2961770699u, 1491180815u, 3239294185u, 1154272588u, 2961770699u, 1491180815u, 0, ASIN_TOLERANCE, 0},
+{ 861, 3205774388u, 3583450204u, 1087671320u, 674510731u, 3205774388u, 3589106472u, 0, ASIN_TOLERANCE, 0},
+{ 862, 2732840881u, 3456820098u, 1089546472u, 2907918480u, 2732840881u, 3456820098u, 0, ASIN_TOLERANCE, 0},
+{ 863, 685577817u, 81928569u, 1075278180u, 1990416786u, 685577817u, 81928569u, 0, ASIN_TOLERANCE, 0},
+{ 864, 1038142999u, 1400620994u, 3225378967u, 1180415269u, 1038142999u, 1400620994u, 0, ASIN_TOLERANCE, 0},
+{ 865, 821776812u, 2762887697u, 3211549123u, 335890509u, 821776812u, 2762887697u, 0, ASIN_TOLERANCE, 0},
+{ 866, 3188234303u, 1362922028u, 3190091315u, 3628762502u, 3188234303u, 1362922028u, 0, ASIN_TOLERANCE, 0},
+{ 867, 721900432u, 3813492886u, 3202458179u, 1901070055u, 721900432u, 3813492886u, 0, ASIN_TOLERANCE, 0},
+{ 868, 2869411161u, 242471816u, 1098704131u, 1526904338u, 2869411161u, 242471816u, 0, ASIN_TOLERANCE, 0},
+{ 869, 1027232266u, 671155008u, 1093002146u, 4241764136u, 1027232266u, 671155008u, 0, ASIN_TOLERANCE, 0},
+{ 870, 2277521859u, 4097248738u, 1056810493u, 578681886u, 2277521859u, 4097248738u, 0, ASIN_TOLERANCE, 0},
+{ 871, 277897075u, 2743813242u, 1048038468u, 2228686199u, 277897075u, 2743813242u, 0, ASIN_TOLERANCE, 0},
+{ 872, 2669729433u, 777624847u, 3204357191u, 721009894u, 2669729433u, 777624847u, 0, ASIN_TOLERANCE, 0},
+{ 873, 900729335u, 724757172u, 1074804044u, 1443361721u, 900729335u, 724757172u, 0, ASIN_TOLERANCE, 0},
+{ 874, 2794978652u, 1829019782u, 1092425225u, 921360204u, 2794978652u, 1829019782u, 0, ASIN_TOLERANCE, 0},
+{ 875, 1055573469u, 599714409u, 3252379270u, 4008804686u, 1055573469u, 599919108u, 0, ASIN_TOLERANCE, 0},
+{ 876, 2335315701u, 1009458928u, 1083845809u, 4245287698u, 2335315701u, 1009458928u, 0, ASIN_TOLERANCE, 0},
+{ 877, 407962355u, 1393652229u, 3198335362u, 477976573u, 407962355u, 1393652229u, 0, ASIN_TOLERANCE, 0},
+{ 878, 119992u, 617334033u, 3226883256u, 1392617441u, 119992u, 617334033u, 0, ASIN_TOLERANCE, 0},
+{ 879, 2526781811u, 3189972160u, 1058939729u, 1442809487u, 2526781811u, 3189972160u, 0, ASIN_TOLERANCE, 0},
+{ 880, 2785887182u, 1497507448u, 3207820115u, 1605709634u, 2785887182u, 1497507448u, 0, ASIN_TOLERANCE, 0},
+{ 881, 400505812u, 1497124553u, 1056018407u, 1916183627u, 400505812u, 1497124553u, 0, ASIN_TOLERANCE, 0},
+{ 882, 379250418u, 187810760u, 1045258725u, 2282203450u, 379250418u, 187810760u, 0, ASIN_TOLERANCE, 0},
+{ 883, 619840292u, 3486351235u, 3238811394u, 4182495542u, 619840292u, 3486351235u, 0, ASIN_TOLERANCE, 0},
+{ 884, 2587166700u, 1845445426u, 1101440582u, 1926724082u, 2587166700u, 1845445426u, 0, ASIN_TOLERANCE, 0},
+{ 885, 2208479151u, 3630948001u, 3210436304u, 3757166747u, 2208479151u, 3630948001u, 0, ASIN_TOLERANCE, 0},
+{ 886, 156467129u, 2426945694u, 1100551290u, 691736139u, 156467129u, 2426945694u, 0, ASIN_TOLERANCE, 0},
+{ 887, 3176502800u, 648364171u, 1041433075u, 4184885944u, 3176502800u, 648364171u, 0, ASIN_TOLERANCE, 0},
+{ 888, 1000987303u, 4288583860u, 1088664697u, 2475611219u, 1000987303u, 4288583860u, 0, ASIN_TOLERANCE, 0},
+{ 889, 1063779408u, 1032586628u, 1093050016u, 1335820726u, 1063779410u, 2088980724u, 0, ASIN_TOLERANCE, 0},
+{ 890, 2203998268u, 1808427032u, 1080779860u, 3408316613u, 2203998268u, 1808427032u, 0, ASIN_TOLERANCE, 0},
+{ 891, 2973050448u, 377900895u, 3246382680u, 3547565419u, 2973050448u, 377900895u, 0, ASIN_TOLERANCE, 0},
+{ 892, 2189796743u, 2323627716u, 1059972652u, 2094048557u, 2189796743u, 2323627716u, 0, ASIN_TOLERANCE, 0},
+{ 893, 3196853156u, 698816446u, 3234028118u, 1825626029u, 3196853156u, 698816504u, 0, ASIN_TOLERANCE, 0},
+{ 894, 3053056428u, 4246800079u, 3198693322u, 1124410156u, 3053056428u, 4246800079u, 0, ASIN_TOLERANCE, 0},
+{ 895, 418318520u, 2453135589u, 1055899444u, 314708747u, 418318520u, 2453135589u, 0, ASIN_TOLERANCE, 0},
+{ 896, 2903016736u, 3296787864u, 1068197912u, 3000361169u, 2903016736u, 3296787864u, 0, ASIN_TOLERANCE, 0},
+{ 897, 3078102424u, 2237367418u, 1089582486u, 4042266354u, 3078102424u, 2237367418u, 0, ASIN_TOLERANCE, 0},
+{ 898, 3141633458u, 3484406269u, 3222793392u, 1868977643u, 3141633458u, 3484406269u, 0, ASIN_TOLERANCE, 0},
+{ 899, 551079618u, 3353193428u, 1046058481u, 1204175477u, 551079618u, 3353193428u, 0, ASIN_TOLERANCE, 0},
+{ 900, 372140985u, 2936300483u, 3219636923u, 3841711417u, 372140985u, 2936300483u, 0, ASIN_TOLERANCE, 0},
+{ 901, 673975119u, 1967394048u, 1058351548u, 460961975u, 673975119u, 1967394048u, 0, ASIN_TOLERANCE, 0},
+{ 902, 186542430u, 2037284927u, 3201399531u, 2969937827u, 186542430u, 2037284927u, 0, ASIN_TOLERANCE, 0},
+{ 903, 605316943u, 4193097538u, 3187909191u, 3039418420u, 605316943u, 4193097538u, 0, ASIN_TOLERANCE, 0},
+{ 904, 560007813u, 3490045229u, 1095745195u, 4291149159u, 560007813u, 3490045229u, 0, ASIN_TOLERANCE, 0},
+{ 905, 2719344253u, 2428281947u, 3244840847u, 1401325941u, 2719344253u, 2428281947u, 0, ASIN_TOLERANCE, 0},
+{ 906, 3086950621u, 2958762056u, 1053682542u, 1079751324u, 3086950621u, 2958762056u, 0, ASIN_TOLERANCE, 0},
+{ 907, 2586448231u, 4153073282u, 3242138780u, 2976596113u, 2586448231u, 4153073282u, 0, ASIN_TOLERANCE, 0},
+{ 908, 2225350223u, 3033242648u, 3218615502u, 4046734098u, 2225350223u, 3033242648u, 0, ASIN_TOLERANCE, 0},
+{ 909, 144835976u, 3784918863u, 3247369913u, 2134568674u, 144835976u, 3784918863u, 0, ASIN_TOLERANCE, 0},
+{ 910, 1037093430u, 2677404300u, 1085544968u, 741961444u, 1037093430u, 2677404300u, 0, ASIN_TOLERANCE, 0},
+{ 911, 3191671070u, 3184472282u, 1092761713u, 2878921656u, 3191671070u, 3184472282u, 0, ASIN_TOLERANCE, 0},
+{ 912, 2174282657u, 3434230759u, 3221702019u, 3917984952u, 2174282657u, 3434230759u, 0, ASIN_TOLERANCE, 0},
+{ 913, 2545165920u, 2576188896u, 3242449625u, 1091446541u, 2545165920u, 2576188896u, 0, ASIN_TOLERANCE, 0},
+{ 914, 331286912u, 1182911629u, 3252138078u, 370659473u, 331286912u, 1182911629u, 0, ASIN_TOLERANCE, 0},
+{ 915, 2176330507u, 1444733769u, 1073172315u, 1980291498u, 2176330507u, 1444733769u, 0, ASIN_TOLERANCE, 0},
+{ 916, 2678247043u, 2360783610u, 3208952465u, 1231254630u, 2678247043u, 2360783610u, 0, ASIN_TOLERANCE, 0},
+{ 917, 2305545884u, 3838689849u, 1072879962u, 256746588u, 2305545884u, 3838689849u, 0, ASIN_TOLERANCE, 0},
+{ 918, 2902784540u, 3667306355u, 3251214292u, 749864809u, 2902784540u, 3667306355u, 0, ASIN_TOLERANCE, 0},
+{ 919, 2604503669u, 507891905u, 1053625983u, 2704533753u, 2604503669u, 507891905u, 0, ASIN_TOLERANCE, 0},
+{ 920, 1030839861u, 3584765547u, 3245124397u, 2257447093u, 1030839861u, 3584765547u, 0, ASIN_TOLERANCE, 0},
+{ 921, 3066547476u, 3315149772u, 1066493112u, 1016007949u, 3066547476u, 3315149772u, 0, ASIN_TOLERANCE, 0},
+{ 922, 449363956u, 825363580u, 3232843486u, 209798625u, 449363956u, 825363580u, 0, ASIN_TOLERANCE, 0},
+{ 923, 835609236u, 3268577204u, 1096097376u, 1911303780u, 835609236u, 3268577204u, 0, ASIN_TOLERANCE, 0},
+{ 924, 2498038993u, 1753975943u, 1042812372u, 3813343580u, 2498038993u, 1753975943u, 0, ASIN_TOLERANCE, 0},
+{ 925, 2711382061u, 729612230u, 3214799337u, 998858159u, 2711382061u, 729612230u, 0, ASIN_TOLERANCE, 0},
+{ 926, 362629194u, 436029885u, 1040410334u, 1429955158u, 362629194u, 436029885u, 0, ASIN_TOLERANCE, 0},
+{ 927, 535596587u, 3221540113u, 1098769124u, 1388898057u, 535596587u, 3221540113u, 0, ASIN_TOLERANCE, 0},
+{ 928, 3182989542u, 324306108u, 3236216574u, 3657300235u, 3182989542u, 324306108u, 0, ASIN_TOLERANCE, 0},
+{ 929, 2615512563u, 583339032u, 1059119779u, 2312064517u, 2615512563u, 583339032u, 0, ASIN_TOLERANCE, 0},
+{ 930, 1018901539u, 1094068533u, 3243006833u, 3107499181u, 1018901539u, 1094068533u, 0, ASIN_TOLERANCE, 0},
+{ 931, 621064893u, 2330095236u, 1045494806u, 3166363539u, 621064893u, 2330095236u, 0, ASIN_TOLERANCE, 0},
+{ 932, 848850921u, 2922855425u, 1055270013u, 3382352474u, 848850921u, 2922855425u, 0, ASIN_TOLERANCE, 0},
+{ 933, 2636544164u, 2042479846u, 1052493506u, 1108839173u, 2636544164u, 2042479846u, 0, ASIN_TOLERANCE, 0},
+{ 934, 14409368u, 3796172167u, 1093571065u, 169360454u, 14409368u, 3796172167u, 0, ASIN_TOLERANCE, 0},
+{ 935, 792852082u, 1860101737u, 1103906352u, 1684270183u, 792852082u, 1860101737u, 0, ASIN_TOLERANCE, 0},
+{ 936, 857946959u, 1478693394u, 1081338739u, 2709296315u, 857946959u, 1478693394u, 0, ASIN_TOLERANCE, 0},
+{ 937, 148167699u, 2960729928u, 1099267383u, 1713640531u, 148167699u, 2960729928u, 0, ASIN_TOLERANCE, 0},
+{ 938, 385577172u, 3119726590u, 1073506160u, 3652712370u, 385577172u, 3119726590u, 0, ASIN_TOLERANCE, 0},
+{ 939, 2345316997u, 2223927344u, 1087592708u, 1855918127u, 2345316997u, 2223927344u, 0, ASIN_TOLERANCE, 0},
+{ 940, 283564999u, 1025757067u, 1082898254u, 4130586757u, 283564999u, 1025757067u, 0, ASIN_TOLERANCE, 0},
+{ 941, 248963649u, 1732390968u, 3252871699u, 2342842299u, 248963649u, 1732390968u, 0, ASIN_TOLERANCE, 0},
+{ 942, 968306674u, 284897931u, 3252953804u, 1924892993u, 968306674u, 284897931u, 0, ASIN_TOLERANCE, 0},
+{ 943, 2792404953u, 3037915642u, 3201314702u, 236884699u, 2792404953u, 3037915642u, 0, ASIN_TOLERANCE, 0},
+{ 944, 2786424109u, 2193269825u, 1080777124u, 2443415975u, 2786424109u, 2193269825u, 0, ASIN_TOLERANCE, 0},
+{ 945, 519195528u, 875427160u, 3254060908u, 2005185235u, 519195528u, 875427160u, 0, ASIN_TOLERANCE, 0},
+{ 946, 2834778379u, 1185249950u, 3192573802u, 43728140u, 2834778379u, 1185249950u, 0, ASIN_TOLERANCE, 0},
+{ 947, 941414883u, 1968452001u, 3208083074u, 2872106033u, 941414883u, 1968452001u, 0, ASIN_TOLERANCE, 0},
+{ 948, 1058483372u, 1955688296u, 1041438818u, 4288876237u, 1058483372u, 1964184798u, 0, ASIN_TOLERANCE, 0},
+{ 949, 260098041u, 1687624754u, 1047766046u, 3073412424u, 260098041u, 1687624754u, 0, ASIN_TOLERANCE, 0},
+{ 950, 3060253014u, 1209878394u, 1095484022u, 291364597u, 3060253014u, 1209878394u, 0, ASIN_TOLERANCE, 0},
+{ 951, 468175369u, 3483008135u, 1104326057u, 3143994227u, 468175369u, 3483008135u, 0, ASIN_TOLERANCE, 0},
+{ 952, 2417131043u, 3223340235u, 1090336173u, 1399132887u, 2417131043u, 3223340235u, 0, ASIN_TOLERANCE, 0},
+{ 953, 783617139u, 4188530565u, 1049645776u, 3448942728u, 783617139u, 4188530565u, 0, ASIN_TOLERANCE, 0},
+{ 954, 660957346u, 1627557770u, 1058246656u, 2945931719u, 660957346u, 1627557770u, 0, ASIN_TOLERANCE, 0},
+{ 955, 1018601337u, 3373123648u, 3197792793u, 672208537u, 1018601337u, 3373123648u, 0, ASIN_TOLERANCE, 0},
+{ 956, 408015225u, 3778617114u, 1062846388u, 1358342023u, 408015225u, 3778617114u, 0, ASIN_TOLERANCE, 0},
+{ 957, 410316381u, 2900182547u, 3199310787u, 414812664u, 410316381u, 2900182547u, 0, ASIN_TOLERANCE, 0},
+{ 958, 633591966u, 2464347659u, 3205131467u, 3988778663u, 633591966u, 2464347659u, 0, ASIN_TOLERANCE, 0},
+{ 959, 229808805u, 3135249601u, 1100087621u, 4100875262u, 229808805u, 3135249601u, 0, ASIN_TOLERANCE, 0},
+{ 960, 793399715u, 2358359525u, 1045184735u, 1183252266u, 793399715u, 2358359525u, 0, ASIN_TOLERANCE, 0},
+{ 961, 971564307u, 1400352853u, 3240053853u, 734055542u, 971564307u, 1400352853u, 0, ASIN_TOLERANCE, 0},
+{ 962, 348066411u, 1753967678u, 3224978909u, 1995531974u, 348066411u, 1753967678u, 0, ASIN_TOLERANCE, 0},
+{ 963, 2638555255u, 1500031970u, 3233676488u, 4052958340u, 2638555255u, 1500031970u, 0, ASIN_TOLERANCE, 0},
+{ 964, 536164755u, 1866935720u, 3200756597u, 3746696244u, 536164755u, 1866935720u, 0, ASIN_TOLERANCE, 0},
+{ 965, 91363664u, 2978288684u, 1106515721u, 564707827u, 91363664u, 2978288684u, 0, ASIN_TOLERANCE, 0},
+{ 966, 447397583u, 1517077030u, 1044934689u, 4156529635u, 447397583u, 1517077030u, 0, ASIN_TOLERANCE, 0},
+{ 967, 884390674u, 1427263585u, 3247549500u, 559009887u, 884390674u, 1427263585u, 0, ASIN_TOLERANCE, 0},
+{ 968, 709965825u, 427386166u, 3224310223u, 2897984604u, 709965825u, 427386166u, 0, ASIN_TOLERANCE, 0},
+{ 969, 748422445u, 984833499u, 1086168339u, 3414464869u, 748422445u, 984833499u, 0, ASIN_TOLERANCE, 0},
+{ 970, 3037316018u, 1275655663u, 1051250192u, 1788042252u, 3037316018u, 1275655663u, 0, ASIN_TOLERANCE, 0},
+{ 971, 647298401u, 1752811522u, 1054424401u, 3069200833u, 647298401u, 1752811522u, 0, ASIN_TOLERANCE, 0},
+{ 972, 336691782u, 4159629802u, 3227935989u, 905739373u, 336691782u, 4159629802u, 0, ASIN_TOLERANCE, 0},
+{ 973, 840207318u, 3449457931u, 1053675501u, 651755324u, 840207318u, 3449457931u, 0, ASIN_TOLERANCE, 0},
+{ 974, 588654397u, 824950980u, 1063835328u, 2970166564u, 588654397u, 824950980u, 0, ASIN_TOLERANCE, 0},
+{ 975, 1002643220u, 3980858800u, 1097889355u, 860102770u, 1002643220u, 3980858800u, 0, ASIN_TOLERANCE, 0},
+{ 976, 2925126437u, 3352952738u, 1087086428u, 1202852913u, 2925126437u, 3352952738u, 0, ASIN_TOLERANCE, 0},
+{ 977, 3153295755u, 3493096285u, 3210665381u, 1226230602u, 3153295755u, 3493096285u, 0, ASIN_TOLERANCE, 0},
+{ 978, 2861370199u, 2237153875u, 1063605905u, 2592496943u, 2861370199u, 2237153875u, 0, ASIN_TOLERANCE, 0},
+{ 979, 812704965u, 1204681469u, 1084151922u, 928193012u, 812704965u, 1204681469u, 0, ASIN_TOLERANCE, 0},
+{ 980, 717902981u, 1892558657u, 3188880850u, 472712482u, 717902981u, 1892558657u, 0, ASIN_TOLERANCE, 0},
+{ 981, 206133394u, 1107589453u, 3240016549u, 2840254081u, 206133394u, 1107589453u, 0, ASIN_TOLERANCE, 0},
+{ 982, 645145771u, 1760994629u, 3217094564u, 2931138356u, 645145771u, 1760994629u, 0, ASIN_TOLERANCE, 0},
+{ 983, 2682176516u, 3313118532u, 1095060283u, 1256408484u, 2682176516u, 3313118532u, 0, ASIN_TOLERANCE, 0},
+{ 984, 958852249u, 2822240883u, 3191644368u, 1759139386u, 958852249u, 2822240883u, 0, ASIN_TOLERANCE, 0},
+{ 985, 3064303449u, 3148616726u, 3216643810u, 4033784566u, 3064303449u, 3148616726u, 0, ASIN_TOLERANCE, 0},
+{ 986, 2672549129u, 50508488u, 3234572856u, 2196737134u, 2672549129u, 50508488u, 0, ASIN_TOLERANCE, 0},
+{ 987, 199760205u, 1739301489u, 1047113374u, 2964036605u, 199760205u, 1739301489u, 0, ASIN_TOLERANCE, 0},
+{ 988, 2742280838u, 32766355u, 1078278376u, 684801414u, 2742280838u, 32766355u, 0, ASIN_TOLERANCE, 0},
+{ 989, 860036812u, 2725458084u, 3197542874u, 3768641510u, 860036812u, 2725458084u, 0, ASIN_TOLERANCE, 0},
+{ 990, 602166919u, 2877639205u, 3248394899u, 2733580401u, 602166919u, 2877639205u, 0, ASIN_TOLERANCE, 0},
+{ 991, 217158246u, 3237117913u, 1086314718u, 1194088701u, 217158246u, 3237117913u, 0, ASIN_TOLERANCE, 0},
+{ 992, 507701220u, 2969027390u, 3254737744u, 2845466153u, 507701220u, 2969027390u, 0, ASIN_TOLERANCE, 0},
+{ 993, 39202927u, 1308825168u, 3231339694u, 1185199746u, 39202927u, 1308825168u, 0, ASIN_TOLERANCE, 0},
+{ 994, 2538930797u, 3429306274u, 3236439133u, 3100989857u, 2538930797u, 3429306274u, 0, ASIN_TOLERANCE, 0},
+{ 995, 2251277391u, 4179597430u, 1060231463u, 2735521684u, 2251277391u, 4179597430u, 0, ASIN_TOLERANCE, 0},
+{ 996, 863742433u, 1926531024u, 1040565159u, 1724549325u, 863742433u, 1926531024u, 0, ASIN_TOLERANCE, 0},
+{ 997, 344684868u, 1215071411u, 1068384117u, 483238293u, 344684868u, 1215071411u, 0, ASIN_TOLERANCE, 0},
+{ 998, 317818997u, 197061949u, 1043473339u, 249253513u, 317818997u, 197061949u, 0, ASIN_TOLERANCE, 0},
+{ 999, 2250299688u, 1410107326u, 3198269248u, 2880209598u, 2250299688u, 1410107326u, 0, ASIN_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_ASIN_H multiple inclusion protection
+
+// EOF asin.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/atan.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/atan.c
new file mode 100644
index 0000000000..4e4c080de2
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/atan.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// atan.c
+//
+// Test of atan() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/atan.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(atan_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &atan, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_NONE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &atan_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("atan() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("atan() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library atan() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "atan() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF atan.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/atan.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/atan.h
new file mode 100644
index 0000000000..57c0eb9561
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/atan.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_ATAN_H
+#define CYGONCE_LIBM_ATAN_H
+//===========================================================================
+//
+// atan.h
+//
+// Test vectors for testing of atan() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/atan.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define ATAN_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t atan_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1077999148u, 2506787616u, 1090024059u, 3619148316u, 1073260870u, 80828740u, 0, ATAN_TOLERANCE, 0},
+{ 2, 3218153654u, 3176730980u, 1051524793u, 2993920299u, 3218127952u, 2148913948u, 0, ATAN_TOLERANCE, 0},
+{ 3, 3239659803u, 2725707538u, 3232101343u, 2346810316u, 3220775416u, 3427719722u, 0, ATAN_TOLERANCE, 0},
+{ 4, 1092554362u, 2088062470u, 3201242716u, 420891118u, 1073291769u, 1152807046u, 0, ATAN_TOLERANCE, 0},
+{ 5, 3221200677u, 2636405208u, 1100049309u, 471635570u, 3220284243u, 1650435225u, 0, ATAN_TOLERANCE, 0},
+{ 6, 1089363191u, 1746012320u, 1054478713u, 3333988501u, 1073291754u, 2004116794u, 0, ATAN_TOLERANCE, 0},
+{ 7, 1047953160u, 183014794u, 3202039382u, 2016785810u, 1047953160u, 183014779u, 0, ATAN_TOLERANCE, 0},
+{ 8, 3213486034u, 2688957927u, 1046089230u, 2709029994u, 3213485944u, 373769876u, 0, ATAN_TOLERANCE, 0},
+{ 9, 1058795730u, 624574473u, 1045840574u, 3473266330u, 1058795730u, 594792680u, 0, ATAN_TOLERANCE, 0},
+{ 10, 3204919842u, 1605286142u, 1068931671u, 4233776869u, 3204919842u, 1601026149u, 0, ATAN_TOLERANCE, 0},
+{ 11, 1060343410u, 1857607719u, 3222889559u, 3417070006u, 1060343410u, 1694216909u, 0, ATAN_TOLERANCE, 0},
+{ 12, 1103599987u, 3981151660u, 1088899021u, 1332651746u, 1073291771u, 1408066806u, 0, ATAN_TOLERANCE, 0},
+{ 13, 1085298022u, 3824988054u, 1066856791u, 2070129652u, 1073291520u, 2395617049u, 0, ATAN_TOLERANCE, 0},
+{ 14, 3207559790u, 1372884064u, 1080833116u, 3229926662u, 3207559790u, 1202538732u, 0, ATAN_TOLERANCE, 0},
+{ 15, 1093826501u, 3217805330u, 3191644264u, 2014578707u, 1073291770u, 1987690820u, 0, ATAN_TOLERANCE, 0},
+{ 16, 1102287487u, 265058758u, 3239903247u, 1630600647u, 1073291771u, 1400039033u, 0, ATAN_TOLERANCE, 0},
+{ 17, 1071124229u, 1946677669u, 3198462609u, 926009897u, 1071055683u, 2564295466u, 0, ATAN_TOLERANCE, 0},
+{ 18, 1072130299u, 2271884183u, 3203741999u, 2118617783u, 1071920653u, 944685799u, 0, ATAN_TOLERANCE, 0},
+{ 19, 3194849109u, 213658772u, 3249401130u, 314151656u, 3194849109u, 213658764u, 0, ATAN_TOLERANCE, 0},
+{ 20, 3254112288u, 1564829925u, 3197817016u, 497230814u, 3220775419u, 1412984998u, 0, ATAN_TOLERANCE, 0},
+{ 21, 3216262634u, 2075329122u, 3231746400u, 169900577u, 3216259867u, 2055429970u, 0, ATAN_TOLERANCE, 0},
+{ 22, 1049848642u, 541549344u, 1096608669u, 3119070100u, 1049848642u, 541549191u, 0, ATAN_TOLERANCE, 0},
+{ 23, 1085427055u, 567496114u, 1045286891u, 1969998540u, 1073291547u, 2294903094u, 0, ATAN_TOLERANCE, 0},
+{ 24, 1060548195u, 1299369769u, 1049342524u, 4167404066u, 1060548195u, 1044477369u, 0, ATAN_TOLERANCE, 0},
+{ 25, 3208865645u, 3348930841u, 1078472138u, 358457347u, 3208865645u, 2710529722u, 0, ATAN_TOLERANCE, 0},
+{ 26, 1071069297u, 2192461366u, 1099527247u, 3184735642u, 1071007346u, 3244807363u, 0, ATAN_TOLERANCE, 0},
+{ 27, 1052861772u, 331696577u, 3189610016u, 793242270u, 1052861772u, 331689558u, 0, ATAN_TOLERANCE, 0},
+{ 28, 3252528934u, 2322696981u, 1083791358u, 3020766674u, 3220775419u, 1411490992u, 0, ATAN_TOLERANCE, 0},
+{ 29, 1044902177u, 252085215u, 3214426435u, 4139068910u, 1044902177u, 252085215u, 0, ATAN_TOLERANCE, 0},
+{ 30, 3222505725u, 105589263u, 1056316170u, 261630827u, 3220563640u, 3145808599u, 0, ATAN_TOLERANCE, 0},
+{ 31, 1107213408u, 428765703u, 3251828686u, 2009972239u, 1073291771u, 1413208284u, 0, ATAN_TOLERANCE, 0},
+{ 32, 1098568019u, 3517376586u, 3240257920u, 3304487302u, 1073291771u, 1253599848u, 0, ATAN_TOLERANCE, 0},
+{ 33, 3233537912u, 237004814u, 3237899261u, 3364008659u, 3220775272u, 1617169199u, 0, ATAN_TOLERANCE, 0},
+{ 34, 3195247552u, 472004928u, 3226869477u, 1186387580u, 3195247552u, 472004918u, 0, ATAN_TOLERANCE, 0},
+{ 35, 1054226850u, 4085763910u, 1106394906u, 2684738273u, 1054226850u, 4085705359u, 0, ATAN_TOLERANCE, 0},
+{ 36, 1057053639u, 2055490142u, 3231581370u, 3879040079u, 1057053639u, 2053704821u, 0, ATAN_TOLERANCE, 0},
+{ 37, 3188976647u, 3725731239u, 1061652681u, 591292963u, 3188976647u, 3725731239u, 0, ATAN_TOLERANCE, 0},
+{ 38, 3225014981u, 1147041027u, 3215417793u, 624695933u, 3220734833u, 3583708004u, 0, ATAN_TOLERANCE, 0},
+{ 39, 3206052774u, 705725219u, 3238067573u, 1116238321u, 3206052774u, 685688214u, 0, ATAN_TOLERANCE, 0},
+{ 40, 3207367088u, 7287411u, 1045917232u, 116067742u, 3207367087u, 4175325358u, 0, ATAN_TOLERANCE, 0},
+{ 41, 3240055222u, 3604989074u, 1066381836u, 545298780u, 3220775417u, 1227029661u, 0, ATAN_TOLERANCE, 0},
+{ 42, 3219080936u, 1681476121u, 1060345752u, 3553822398u, 3218937769u, 460181535u, 0, ATAN_TOLERANCE, 0},
+{ 43, 1102831658u, 3410480388u, 1052460275u, 1660607230u, 1073291771u, 1404124390u, 0, ATAN_TOLERANCE, 0},
+{ 44, 1089216869u, 1494984673u, 3196647153u, 287894723u, 1073291753u, 550827505u, 0, ATAN_TOLERANCE, 0},
+{ 45, 1054885127u, 644548665u, 1081948134u, 2442134629u, 1054885127u, 644456791u, 0, ATAN_TOLERANCE, 0},
+{ 46, 1087554095u, 2312530895u, 3221584595u, 3379665576u, 1073291716u, 3181235278u, 0, ATAN_TOLERANCE, 0},
+{ 47, 1096085375u, 3018463866u, 1086226574u, 404012923u, 1073291771u, 593146344u, 0, ATAN_TOLERANCE, 0},
+{ 48, 1064733299u, 1710279345u, 3251401196u, 3528946000u, 1064733284u, 2087599474u, 0, ATAN_TOLERANCE, 0},
+{ 49, 1061536351u, 2164450219u, 1083520023u, 3312018966u, 1061536351u, 1264224322u, 0, ATAN_TOLERANCE, 0},
+{ 50, 1057248676u, 2648986431u, 1050330591u, 1474376550u, 1057248676u, 2646116431u, 0, ATAN_TOLERANCE, 0},
+{ 51, 3194422028u, 1839068700u, 1077406406u, 3013052171u, 3194422028u, 1839068696u, 0, ATAN_TOLERANCE, 0},
+{ 52, 1046493630u, 772102380u, 3220729740u, 4219039958u, 1046493630u, 772102379u, 0, ATAN_TOLERANCE, 0},
+{ 53, 3229472221u, 3058618779u, 1046304788u, 3338676024u, 3220773222u, 3213354261u, 0, ATAN_TOLERANCE, 0},
+{ 54, 1051172137u, 506286854u, 1094907481u, 2217000199u, 1051172137u, 506285757u, 0, ATAN_TOLERANCE, 0},
+{ 55, 1082428310u, 1147428263u, 1065432625u, 3034786717u, 1073290176u, 1772815414u, 0, ATAN_TOLERANCE, 0},
+{ 56, 1082016752u, 2844125311u, 1082985198u, 2561492677u, 1073289605u, 4100112063u, 0, ATAN_TOLERANCE, 0},
+{ 57, 3211536916u, 704542600u, 3222902057u, 2762779203u, 3211536908u, 3829698748u, 0, ATAN_TOLERANCE, 0},
+{ 58, 3199680614u, 184131949u, 3249723525u, 1667366082u, 3199680614u, 184127759u, 0, ATAN_TOLERANCE, 0},
+{ 59, 3223609598u, 3904224140u, 1067056698u, 2942159914u, 3220672839u, 3275979607u, 0, ATAN_TOLERANCE, 0},
+{ 60, 1100636863u, 426114282u, 3209056785u, 1083606355u, 1073291771u, 1373060099u, 0, ATAN_TOLERANCE, 0},
+{ 61, 1106165945u, 3774123863u, 1106787580u, 2722107965u, 1073291771u, 1412663036u, 0, ATAN_TOLERANCE, 0},
+{ 62, 1088005092u, 1377734762u, 1104232051u, 2377063483u, 1073291731u, 1683126600u, 0, ATAN_TOLERANCE, 0},
+{ 63, 1069380559u, 1029739074u, 1105467109u, 3062201018u, 1069372110u, 661828638u, 0, ATAN_TOLERANCE, 0},
+{ 64, 3234741597u, 773857656u, 3214251949u, 335833884u, 3220775351u, 2592582459u, 0, ATAN_TOLERANCE, 0},
+{ 65, 3203224610u, 1473865960u, 1103073830u, 4000427507u, 3203224610u, 1473327771u, 0, ATAN_TOLERANCE, 0},
+{ 66, 1103185231u, 4242092620u, 1067009473u, 14539161u, 1073291771u, 1405982747u, 0, ATAN_TOLERANCE, 0},
+{ 67, 3192516074u, 1732245037u, 1101371955u, 1533536108u, 3192516074u, 1732245037u, 0, ATAN_TOLERANCE, 0},
+{ 68, 3249153995u, 1833841275u, 1099430098u, 4144145552u, 3220775419u, 1393227976u, 0, ATAN_TOLERANCE, 0},
+{ 69, 3244270463u, 935007012u, 3188865420u, 604442938u, 3220775419u, 870751708u, 0, ATAN_TOLERANCE, 0},
+{ 70, 3206903253u, 2211464602u, 1046255144u, 1635910526u, 3206903253u, 2157488019u, 0, ATAN_TOLERANCE, 0},
+{ 71, 1077871417u, 2549219008u, 3231633258u, 3733639385u, 1073257971u, 3212130123u, 0, ATAN_TOLERANCE, 0},
+{ 72, 1082095089u, 1819374372u, 3202219056u, 2617077637u, 1073289688u, 970851516u, 0, ATAN_TOLERANCE, 0},
+{ 73, 1094345280u, 546465680u, 1048653554u, 532401530u, 1073291770u, 3104111779u, 0, ATAN_TOLERANCE, 0},
+{ 74, 1044571091u, 2759019783u, 3221570188u, 3554409630u, 1044571091u, 2759019783u, 0, ATAN_TOLERANCE, 0},
+{ 75, 3212931282u, 2527221960u, 1099107978u, 2696971136u, 3212931254u, 4118622275u, 0, ATAN_TOLERANCE, 0},
+{ 76, 1097158000u, 173134582u, 1087299442u, 2877794600u, 1073291771u, 1010517977u, 0, ATAN_TOLERANCE, 0},
+{ 77, 1086400474u, 547642046u, 3197285510u, 3521286127u, 1073291651u, 4087685810u, 0, ATAN_TOLERANCE, 0},
+{ 78, 1074860702u, 1231582831u, 1090971734u, 1653446832u, 1073050451u, 1298823045u, 0, ATAN_TOLERANCE, 0},
+{ 79, 1061342535u, 3762182190u, 3252967851u, 2615360375u, 1061342535u, 3181387989u, 0, ATAN_TOLERANCE, 0},
+{ 80, 3200834423u, 2588067350u, 3206610957u, 3551059728u, 3200834423u, 2588046871u, 0, ATAN_TOLERANCE, 0},
+{ 81, 3206978856u, 845263327u, 1073415902u, 1749010288u, 3206978856u, 782105851u, 0, ATAN_TOLERANCE, 0},
+{ 82, 3205576370u, 3092685191u, 3190678390u, 2872219490u, 3205576370u, 3085721192u, 0, ATAN_TOLERANCE, 0},
+{ 83, 3218315055u, 4107255722u, 3205337291u, 3069068345u, 3218277070u, 170982227u, 0, ATAN_TOLERANCE, 0},
+{ 84, 3243990857u, 2294867524u, 3216653996u, 2860384670u, 3220775419u, 786115172u, 0, ATAN_TOLERANCE, 0},
+{ 85, 3193326350u, 2265437201u, 3240198679u, 1234948614u, 3193326350u, 2265437200u, 0, ATAN_TOLERANCE, 0},
+{ 86, 3216359929u, 1186945904u, 3251167793u, 1896750851u, 3216356510u, 3130045131u, 0, ATAN_TOLERANCE, 0},
+{ 87, 1081575478u, 3686084548u, 1079286273u, 3309277689u, 1073288986u, 1599297092u, 0, ATAN_TOLERANCE, 0},
+{ 88, 3223476240u, 3006860614u, 3231412671u, 2504194724u, 3220661545u, 2360188947u, 0, ATAN_TOLERANCE, 0},
+{ 89, 3236149260u, 1948717780u, 1048317852u, 3791803982u, 3220775393u, 1564574150u, 0, ATAN_TOLERANCE, 0},
+{ 90, 1064345015u, 4272034420u, 3192982124u, 1526175922u, 1064345010u, 91354218u, 0, ATAN_TOLERANCE, 0},
+{ 91, 3245817826u, 4108948538u, 1104691287u, 640541190u, 3220775419u, 1229020839u, 0, ATAN_TOLERANCE, 0},
+{ 92, 3207257417u, 3259274853u, 1082507103u, 3677038020u, 3207257417u, 3153390830u, 0, ATAN_TOLERANCE, 0},
+{ 93, 1083132498u, 3781708548u, 1096584871u, 1207386447u, 1073290724u, 450646531u, 0, ATAN_TOLERANCE, 0},
+{ 94, 3188695272u, 3011191657u, 1103798670u, 1096124830u, 3188695272u, 3011191657u, 0, ATAN_TOLERANCE, 0},
+{ 95, 1063235023u, 2540404725u, 3240157452u, 4122845725u, 1063235021u, 18397155u, 0, ATAN_TOLERANCE, 0},
+{ 96, 1083643710u, 311336721u, 3214382367u, 4212533768u, 1073291061u, 3360101992u, 0, ATAN_TOLERANCE, 0},
+{ 97, 1051139427u, 1769686293u, 3240200923u, 3538602249u, 1051139427u, 1769685264u, 0, ATAN_TOLERANCE, 0},
+{ 98, 1078227549u, 508056696u, 1103793878u, 776520138u, 1073266134u, 3382378805u, 0, ATAN_TOLERANCE, 0},
+{ 99, 1102910577u, 4064962760u, 1077424413u, 819766631u, 1073291771u, 1404523163u, 0, ATAN_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 1072935915u, 2808066494u, 0, ATAN_TOLERANCE, 0},
+{ 101, 1082295059u, 2514398118u, 1076579751u, 870169764u, 1073290001u, 1019866120u, 0, ATAN_TOLERANCE, 0},
+{ 102, 3246851392u, 1190259653u, 1069112254u, 3417249840u, 3220775419u, 1320468477u, 0, ATAN_TOLERANCE, 0},
+{ 103, 3193663083u, 3467757357u, 3215075200u, 2168175352u, 3193663083u, 3467757355u, 0, ATAN_TOLERANCE, 0},
+{ 104, 3239643135u, 1508888184u, 1060430241u, 3524949092u, 3220775416u, 3317262141u, 0, ATAN_TOLERANCE, 0},
+{ 105, 3197412883u, 166402802u, 3237198975u, 3572369260u, 3197412883u, 166402619u, 0, ATAN_TOLERANCE, 0},
+{ 106, 1081866822u, 2441536203u, 3202753937u, 3658194573u, 1073289428u, 3826672040u, 0, ATAN_TOLERANCE, 0},
+{ 107, 1062392908u, 2479742828u, 1062342831u, 4214154303u, 1062392908u, 146390139u, 0, ATAN_TOLERANCE, 0},
+{ 108, 1082396794u, 426896765u, 1066474375u, 2201754442u, 1073290138u, 799707370u, 0, ATAN_TOLERANCE, 0},
+{ 109, 3195629021u, 2055773734u, 3239267288u, 291396537u, 3195629021u, 2055773713u, 0, ATAN_TOLERANCE, 0},
+{ 110, 3236968033u, 874125203u, 3210508124u, 4091098764u, 3220775403u, 2314140343u, 0, ATAN_TOLERANCE, 0},
+{ 111, 1065716026u, 120488169u, 3241241441u, 1985269424u, 1065715974u, 35998340u, 0, ATAN_TOLERANCE, 0},
+{ 112, 3206539410u, 2243036871u, 3243941101u, 740033495u, 3206539410u, 2198680371u, 0, ATAN_TOLERANCE, 0},
+{ 113, 3209424906u, 1176656356u, 1074261978u, 3588756231u, 3209424905u, 3566213783u, 0, ATAN_TOLERANCE, 0},
+{ 114, 3252816791u, 3037249392u, 1061635587u, 1173102190u, 3220775419u, 1411894679u, 0, ATAN_TOLERANCE, 0},
+{ 115, 3237209581u, 2882725208u, 1071440059u, 69225090u, 3220775406u, 1991373169u, 0, ATAN_TOLERANCE, 0},
+{ 116, 3212663474u, 272319256u, 1072073912u, 2493997123u, 3212663441u, 557352853u, 0, ATAN_TOLERANCE, 0},
+{ 117, 1057720186u, 188610379u, 3232757923u, 2209647371u, 1057720186u, 181489071u, 0, ATAN_TOLERANCE, 0},
+{ 118, 3236758517u, 1990439193u, 1078073146u, 622849962u, 3220775401u, 2935191220u, 0, ATAN_TOLERANCE, 0},
+{ 119, 1057135741u, 756052458u, 1081649113u, 2247475162u, 1057135741u, 753852027u, 0, ATAN_TOLERANCE, 0},
+{ 120, 1061623064u, 3878055211u, 3222407050u, 2979438623u, 1061623064u, 2803417540u, 0, ATAN_TOLERANCE, 0},
+{ 121, 3195290997u, 2676398686u, 1105124431u, 3631096636u, 3195290997u, 2676398675u, 0, ATAN_TOLERANCE, 0},
+{ 122, 1065079390u, 1697791764u, 3198136112u, 2299842819u, 1065079362u, 1525379125u, 0, ATAN_TOLERANCE, 0},
+{ 123, 1078084768u, 1931502677u, 3215264397u, 3016456382u, 1073263078u, 3456048071u, 0, ATAN_TOLERANCE, 0},
+{ 124, 1072253426u, 343404215u, 1061072607u, 4266232536u, 1071998637u, 1520446375u, 0, ATAN_TOLERANCE, 0},
+{ 125, 3241230836u, 4140316002u, 1082896196u, 868256971u, 3220775418u, 1726748208u, 0, ATAN_TOLERANCE, 0},
+{ 126, 1075422810u, 1864139509u, 3187675097u, 3084482407u, 1073129556u, 465493249u, 0, ATAN_TOLERANCE, 0},
+{ 127, 3220191323u, 2427162817u, 3234748208u, 2715105792u, 3219741172u, 402094487u, 0, ATAN_TOLERANCE, 0},
+{ 128, 1064600512u, 3943389284u, 1046724025u, 3626825684u, 1064600501u, 2906031848u, 0, ATAN_TOLERANCE, 0},
+{ 129, 1045423002u, 967350972u, 1093012318u, 448002663u, 1045423002u, 967350971u, 0, ATAN_TOLERANCE, 0},
+{ 130, 3251845859u, 105058217u, 1069733884u, 171786224u, 3220775419u, 1410264341u, 0, ATAN_TOLERANCE, 0},
+{ 131, 3189614508u, 2863482262u, 3204997271u, 877784425u, 3189614508u, 2863482262u, 0, ATAN_TOLERANCE, 0},
+{ 132, 3202629313u, 2801782962u, 3213604117u, 762347195u, 3202629313u, 2801605942u, 0, ATAN_TOLERANCE, 0},
+{ 133, 3233486727u, 2317950339u, 3246333414u, 2135700283u, 3220775268u, 601862620u, 0, ATAN_TOLERANCE, 0},
+{ 134, 1056516397u, 4171919805u, 1082858682u, 2180920863u, 1056516397u, 4170560568u, 0, ATAN_TOLERANCE, 0},
+{ 135, 3220149084u, 1918836931u, 1083603224u, 3137821660u, 3219712844u, 4031557243u, 0, ATAN_TOLERANCE, 0},
+{ 136, 1103902874u, 3456203663u, 3235600523u, 2335688936u, 1073291771u, 1408998203u, 0, ATAN_TOLERANCE, 0},
+{ 137, 1042279322u, 4170235262u, 1051824459u, 521583737u, 1042279322u, 4170235262u, 0, ATAN_TOLERANCE, 0},
+{ 138, 1081348303u, 1296623194u, 3250673860u, 2442872540u, 1073288505u, 1128617660u, 0, ATAN_TOLERANCE, 0},
+{ 139, 1061684277u, 289979405u, 1049514449u, 3865737145u, 1061684276u, 3374504276u, 0, ATAN_TOLERANCE, 0},
+{ 140, 1075298944u, 3699090239u, 1054539840u, 3259249360u, 1073116881u, 2973410148u, 0, ATAN_TOLERANCE, 0},
+{ 141, 1096418100u, 1619819023u, 1045993352u, 1022642459u, 1073291771u, 753307915u, 0, ATAN_TOLERANCE, 0},
+{ 142, 1081433004u, 19455098u, 3229182089u, 2096003654u, 1073288702u, 3862163748u, 0, ATAN_TOLERANCE, 0},
+{ 143, 1076297936u, 3803689997u, 1071630912u, 2263729518u, 1073200832u, 550615540u, 0, ATAN_TOLERANCE, 0},
+{ 144, 1101357261u, 2816837387u, 1063422305u, 2597606398u, 1073291771u, 1388641055u, 0, ATAN_TOLERANCE, 0},
+{ 145, 1069100169u, 3680967506u, 1040201163u, 179224723u, 1069094882u, 2881866002u, 0, ATAN_TOLERANCE, 0},
+{ 146, 3188629767u, 978126928u, 1101553990u, 4047893399u, 3188629767u, 978126928u, 0, ATAN_TOLERANCE, 0},
+{ 147, 3222322045u, 4059818629u, 1042678728u, 3640293589u, 3220529367u, 1621616907u, 0, ATAN_TOLERANCE, 0},
+{ 148, 3248464040u, 3383497159u, 1070002807u, 1527313008u, 3220775419u, 1379804590u, 0, ATAN_TOLERANCE, 0},
+{ 149, 3202707679u, 2599946514u, 1104170406u, 2738675352u, 3202707679u, 2599736239u, 0, ATAN_TOLERANCE, 0},
+{ 150, 1105232623u, 3616571377u, 1060859316u, 1130603218u, 1073291771u, 1411721947u, 0, ATAN_TOLERANCE, 0},
+{ 151, 1076028796u, 3859211180u, 1067940450u, 1744531824u, 1073181201u, 2704068544u, 0, ATAN_TOLERANCE, 0},
+{ 152, 1042831340u, 1958025850u, 3236511256u, 2472176453u, 1042831340u, 1958025850u, 0, ATAN_TOLERANCE, 0},
+{ 153, 3233107089u, 182132862u, 3250520938u, 3924356991u, 3220775227u, 87898411u, 0, ATAN_TOLERANCE, 0},
+{ 154, 3230501884u, 35632886u, 3209806504u, 1453402523u, 3220774310u, 1330759385u, 0, ATAN_TOLERANCE, 0},
+{ 155, 1083522102u, 743225214u, 3202890678u, 142917400u, 1073290999u, 3351093382u, 0, ATAN_TOLERANCE, 0},
+{ 156, 1080684976u, 1472665012u, 3203138231u, 256588219u, 1073286719u, 1180729218u, 0, ATAN_TOLERANCE, 0},
+{ 157, 1094982162u, 1062927000u, 1061134072u, 931677439u, 1073291770u, 3999438264u, 0, ATAN_TOLERANCE, 0},
+{ 158, 1058377732u, 2320910576u, 1055663370u, 288059864u, 1058377732u, 2307222569u, 0, ATAN_TOLERANCE, 0},
+{ 159, 1078958093u, 1448349062u, 3199478070u, 3454027134u, 1073275178u, 629967402u, 0, ATAN_TOLERANCE, 0},
+{ 160, 3237458798u, 4215445172u, 3196654963u, 2231888973u, 3220775408u, 2267284262u, 0, ATAN_TOLERANCE, 0},
+{ 161, 3246632231u, 40413554u, 3232578253u, 983832844u, 3220775419u, 1304613937u, 0, ATAN_TOLERANCE, 0},
+{ 162, 3223721534u, 3995725873u, 1050082319u, 777231627u, 3220680727u, 2268085707u, 0, ATAN_TOLERANCE, 0},
+{ 163, 1040986626u, 672789828u, 3253385962u, 2982787335u, 1040986626u, 672789828u, 0, ATAN_TOLERANCE, 0},
+{ 164, 1068390875u, 2075971825u, 1070166500u, 4034633931u, 1068388550u, 2060043978u, 0, ATAN_TOLERANCE, 0},
+{ 165, 3210046177u, 1018222907u, 3244621407u, 3090050495u, 3210046176u, 1879315059u, 0, ATAN_TOLERANCE, 0},
+{ 166, 1067680885u, 937732557u, 3200798890u, 2557898276u, 1067680266u, 836859157u, 0, ATAN_TOLERANCE, 0},
+{ 167, 1078342316u, 130346162u, 3223590310u, 275568693u, 1073268156u, 2368365124u, 0, ATAN_TOLERANCE, 0},
+{ 168, 1042898869u, 3807416441u, 1075961161u, 3706820266u, 1042898869u, 3807416441u, 0, ATAN_TOLERANCE, 0},
+{ 169, 3216099005u, 1710131411u, 1078123323u, 1900790503u, 3216097138u, 1587837360u, 0, ATAN_TOLERANCE, 0},
+{ 170, 3238819361u, 3420420033u, 3210844787u, 588423066u, 3220775414u, 3572787935u, 0, ATAN_TOLERANCE, 0},
+{ 171, 1049684114u, 1160162008u, 3246307879u, 4265764460u, 1049684114u, 1160161907u, 0, ATAN_TOLERANCE, 0},
+{ 172, 1102543434u, 366653268u, 3188814424u, 466059202u, 1073291771u, 1402320498u, 0, ATAN_TOLERANCE, 0},
+{ 173, 3226627739u, 1325936170u, 3221436876u, 680097612u, 3220761198u, 99640567u, 0, ATAN_TOLERANCE, 0},
+{ 174, 3240391116u, 1827735934u, 3200554324u, 2875599271u, 3220775417u, 3281157886u, 0, ATAN_TOLERANCE, 0},
+{ 175, 3191030402u, 3117037091u, 3239246636u, 15838845u, 3191030402u, 3117037091u, 0, ATAN_TOLERANCE, 0},
+{ 176, 1051974004u, 749718883u, 3223587064u, 1523766569u, 1051974004u, 749716276u, 0, ATAN_TOLERANCE, 0},
+{ 177, 1044833651u, 1966536294u, 3250158026u, 699164258u, 1044833651u, 1966536294u, 0, ATAN_TOLERANCE, 0},
+{ 178, 1098048435u, 3759049394u, 1106085272u, 1183789499u, 1073291771u, 1186380431u, 0, ATAN_TOLERANCE, 0},
+{ 179, 1081201623u, 1970107747u, 1095245453u, 2308233883u, 1073288095u, 975760224u, 0, ATAN_TOLERANCE, 0},
+{ 180, 1084756444u, 1491017852u, 1041444355u, 1723375725u, 1073291430u, 4231533096u, 0, ATAN_TOLERANCE, 0},
+{ 181, 3216630070u, 1141349287u, 1097465301u, 3403438584u, 3216624327u, 2984333214u, 0, ATAN_TOLERANCE, 0},
+{ 182, 3230571908u, 1711085243u, 3250239076u, 1377484108u, 3220774349u, 64738554u, 0, ATAN_TOLERANCE, 0},
+{ 183, 1098385019u, 2880275004u, 1084039594u, 1611394950u, 1073291771u, 1234985800u, 0, ATAN_TOLERANCE, 0},
+{ 184, 3234221435u, 2626629370u, 1063771493u, 1499080813u, 3220775327u, 2154288794u, 0, ATAN_TOLERANCE, 0},
+{ 185, 1055231263u, 3936262414u, 1103919063u, 3175668759u, 1055231263u, 3936048875u, 0, ATAN_TOLERANCE, 0},
+{ 186, 3207981719u, 1270950554u, 3194616071u, 3680565379u, 3207981719u, 1040984050u, 0, ATAN_TOLERANCE, 0},
+{ 187, 3208148223u, 1066985223u, 3221613219u, 4089383168u, 3208148223u, 747412838u, 0, ATAN_TOLERANCE, 0},
+{ 188, 3217058839u, 4017329311u, 3208334452u, 1667591498u, 3217052992u, 1555622102u, 0, ATAN_TOLERANCE, 0},
+{ 189, 1088164157u, 3154656624u, 1061894279u, 3886344038u, 1073291734u, 3631354939u, 0, ATAN_TOLERANCE, 0},
+{ 190, 1050652945u, 977586119u, 3209762784u, 953839852u, 1050652945u, 977585456u, 0, ATAN_TOLERANCE, 0},
+{ 191, 1104965247u, 143071571u, 3206165386u, 913097445u, 1073291771u, 1411393777u, 0, ATAN_TOLERANCE, 0},
+{ 192, 3190565456u, 1371169579u, 1057079837u, 2594818628u, 3190565456u, 1371169579u, 0, ATAN_TOLERANCE, 0},
+{ 193, 3251793336u, 2259342224u, 3217432469u, 1824221478u, 3220775419u, 1410112575u, 0, ATAN_TOLERANCE, 0},
+{ 194, 3246834775u, 1576604497u, 1079368611u, 185078728u, 3220775419u, 1319429561u, 0, ATAN_TOLERANCE, 0},
+{ 195, 3221679427u, 444800035u, 3243343143u, 1734989302u, 3220423383u, 4080038932u, 0, ATAN_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1072297380u, 2183099160u, 0, ATAN_TOLERANCE, 0},
+{ 197, 3234695968u, 1941318385u, 1045807374u, 792193370u, 3220775350u, 32520571u, 0, ATAN_TOLERANCE, 0},
+{ 198, 3238299666u, 1299392207u, 3212131720u, 3205732280u, 3220775413u, 407383253u, 0, ATAN_TOLERANCE, 0},
+{ 199, 1098698804u, 3035093505u, 1052187689u, 3287702190u, 1073291771u, 1264692187u, 0, ATAN_TOLERANCE, 0},
+{ 200, 3246676260u, 2160225215u, 1102624859u, 836655570u, 3220775419u, 1308217418u, 0, ATAN_TOLERANCE, 0},
+{ 201, 1096723626u, 3360816360u, 3246176356u, 172860634u, 1073291771u, 853683724u, 0, ATAN_TOLERANCE, 0},
+{ 202, 1070995788u, 146831910u, 1051558014u, 2340722078u, 1070942026u, 2210584062u, 0, ATAN_TOLERANCE, 0},
+{ 203, 3230416351u, 1603798153u, 3207725532u, 1099413093u, 3220774259u, 253905046u, 0, ATAN_TOLERANCE, 0},
+{ 204, 3246678378u, 2429340443u, 3190303581u, 3223770005u, 3220775419u, 1308384776u, 0, ATAN_TOLERANCE, 0},
+{ 205, 1075882959u, 955542166u, 3230415151u, 275583938u, 1073166574u, 1025940890u, 0, ATAN_TOLERANCE, 0},
+{ 206, 1092971882u, 513397822u, 1090646554u, 2089321329u, 1073291769u, 3589520410u, 0, ATAN_TOLERANCE, 0},
+{ 207, 3193169876u, 2782073372u, 1046063872u, 4023829068u, 3193169876u, 2782073371u, 0, ATAN_TOLERANCE, 0},
+{ 208, 1098564822u, 3242223094u, 3194111199u, 4264674108u, 1073291771u, 1253307985u, 0, ATAN_TOLERANCE, 0},
+{ 209, 3238510821u, 3506346169u, 1047020885u, 1742757458u, 3220775413u, 4039361968u, 0, ATAN_TOLERANCE, 0},
+{ 210, 3192664477u, 1265459564u, 3193450280u, 3650514880u, 3192664477u, 1265459564u, 0, ATAN_TOLERANCE, 0},
+{ 211, 1081755890u, 1525260440u, 3235452527u, 2612331392u, 1073289278u, 188086895u, 0, ATAN_TOLERANCE, 0},
+{ 212, 3248668920u, 1263613754u, 3219096387u, 635677201u, 3220775419u, 1385126805u, 0, ATAN_TOLERANCE, 0},
+{ 213, 3206272087u, 4140947288u, 3200792376u, 2013265346u, 3206272087u, 4111519788u, 0, ATAN_TOLERANCE, 0},
+{ 214, 3249974392u, 1912759945u, 3237045253u, 1351396825u, 3220775419u, 1401915076u, 0, ATAN_TOLERANCE, 0},
+{ 215, 3248205162u, 1001433078u, 3206926643u, 2741676659u, 3220775419u, 1374959245u, 0, ATAN_TOLERANCE, 0},
+{ 216, 1080923606u, 1088945233u, 1085095743u, 3986114865u, 1073287341u, 203181843u, 0, ATAN_TOLERANCE, 0},
+{ 217, 3215734057u, 831239754u, 1099828675u, 3071308141u, 3215732190u, 1095526509u, 0, ATAN_TOLERANCE, 0},
+{ 218, 3225834497u, 3473592372u, 1102759382u, 1309576357u, 3220751942u, 961394714u, 0, ATAN_TOLERANCE, 0},
+{ 219, 3251186706u, 2042340367u, 1091945628u, 2062772374u, 3220775419u, 1408422145u, 0, ATAN_TOLERANCE, 0},
+{ 220, 3194765687u, 1840632537u, 1096533424u, 807510337u, 3194765687u, 1840632530u, 0, ATAN_TOLERANCE, 0},
+{ 221, 3231451722u, 144814872u, 3212698915u, 2282965697u, 3220774835u, 107798951u, 0, ATAN_TOLERANCE, 0},
+{ 222, 1071236430u, 2552499583u, 3229111426u, 1470130815u, 1071153116u, 955946986u, 0, ATAN_TOLERANCE, 0},
+{ 223, 3243093065u, 2858583811u, 1089760910u, 6360994u, 3220775419u, 255807873u, 0, ATAN_TOLERANCE, 0},
+{ 224, 3198264929u, 1614537194u, 1075198900u, 4088705365u, 3198264929u, 1614536736u, 0, ATAN_TOLERANCE, 0},
+{ 225, 3250939070u, 3545570051u, 1065221325u, 1629217700u, 3220775419u, 1407480385u, 0, ATAN_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 1072293047u, 4133707511u, 0, ATAN_TOLERANCE, 0},
+{ 227, 3196802686u, 2406734491u, 1042055360u, 89226663u, 3196802686u, 2406734385u, 0, ATAN_TOLERANCE, 0},
+{ 228, 3195751081u, 1618759139u, 3194723421u, 3888234802u, 3195751081u, 1618759113u, 0, ATAN_TOLERANCE, 0},
+{ 229, 1055357248u, 3590035633u, 3212424262u, 2892456615u, 1055357248u, 3589759702u, 0, ATAN_TOLERANCE, 0},
+{ 230, 3189943060u, 2431246964u, 3241512456u, 183850734u, 3189943060u, 2431246964u, 0, ATAN_TOLERANCE, 0},
+{ 231, 1089501101u, 3088319870u, 3211544311u, 862225364u, 1073291755u, 3364626322u, 0, ATAN_TOLERANCE, 0},
+{ 232, 3235294664u, 3495352775u, 1058576726u, 596957268u, 3220775374u, 760015622u, 0, ATAN_TOLERANCE, 0},
+{ 233, 1046553348u, 1839214511u, 3205004060u, 1923240983u, 1046553348u, 1839214509u, 0, ATAN_TOLERANCE, 0},
+{ 234, 1058073864u, 739619702u, 3223356436u, 2689885273u, 1058073864u, 732999146u, 0, ATAN_TOLERANCE, 0},
+{ 235, 3200324971u, 2143376228u, 1098306332u, 3760236188u, 3200324971u, 2143369580u, 0, ATAN_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 1073013435u, 3897459075u, 0, ATAN_TOLERANCE, 0},
+{ 237, 3214165989u, 2493598049u, 3194927008u, 1689107592u, 3214165815u, 3584504723u, 0, ATAN_TOLERANCE, 0},
+{ 238, 3189989959u, 1578976988u, 1066368383u, 2117279163u, 3189989959u, 1578976988u, 0, ATAN_TOLERANCE, 0},
+{ 239, 3222988111u, 3425290087u, 1098487295u, 1263412017u, 3220620607u, 1469862024u, 0, ATAN_TOLERANCE, 0},
+{ 240, 3208432764u, 3635396812u, 1070999426u, 3965655689u, 3208432764u, 3113624660u, 0, ATAN_TOLERANCE, 0},
+{ 241, 1060196346u, 2183973116u, 1101098363u, 1118613350u, 1060196346u, 2070620457u, 0, ATAN_TOLERANCE, 0},
+{ 242, 3221946089u, 199516350u, 1078368488u, 164621458u, 3220473326u, 1149516223u, 0, ATAN_TOLERANCE, 0},
+{ 243, 3187706018u, 3570940805u, 3230316437u, 3596080877u, 3187706018u, 3570940805u, 0, ATAN_TOLERANCE, 0},
+{ 244, 3208209565u, 980880313u, 1079833442u, 884465057u, 3208209565u, 623194338u, 0, ATAN_TOLERANCE, 0},
+{ 245, 1099977124u, 2558179220u, 1052873711u, 1233598120u, 1073291771u, 1347956769u, 0, ATAN_TOLERANCE, 0},
+{ 246, 1047115221u, 1909994277u, 1085015978u, 2991527452u, 1047115221u, 1909994271u, 0, ATAN_TOLERANCE, 0},
+{ 247, 1060855260u, 1680290941u, 1074309900u, 2943870846u, 1060855260u, 1232553651u, 0, ATAN_TOLERANCE, 0},
+{ 248, 1059496132u, 1451927357u, 3228615456u, 1502585517u, 1059496132u, 1388651658u, 0, ATAN_TOLERANCE, 0},
+{ 249, 3236211951u, 751136990u, 3230392165u, 3493275472u, 3220775394u, 2429171461u, 0, ATAN_TOLERANCE, 0},
+{ 250, 1098365967u, 1209623292u, 3238056647u, 979495322u, 1073291771u, 1232796133u, 0, ATAN_TOLERANCE, 0},
+{ 251, 3250424296u, 1717672108u, 1048120593u, 531240316u, 3220775419u, 1404666552u, 0, ATAN_TOLERANCE, 0},
+{ 252, 1054174923u, 3548721654u, 1086112947u, 3391817224u, 1054174923u, 3548669145u, 0, ATAN_TOLERANCE, 0},
+{ 253, 1077836851u, 2758195125u, 1100880260u, 2028440924u, 1073257387u, 1653316307u, 0, ATAN_TOLERANCE, 0},
+{ 254, 1084223893u, 2750123373u, 3232200256u, 1086294931u, 1073291258u, 1832453141u, 0, ATAN_TOLERANCE, 0},
+{ 255, 1043958672u, 2986160931u, 1076097908u, 2540046258u, 1043958672u, 2986160931u, 0, ATAN_TOLERANCE, 0},
+{ 256, 3235476602u, 451471221u, 1064816262u, 4187644495u, 3220775379u, 435052465u, 0, ATAN_TOLERANCE, 0},
+{ 257, 1099460228u, 2439500162u, 1065280276u, 1979490284u, 1073291771u, 1325856743u, 0, ATAN_TOLERANCE, 0},
+{ 258, 1040415832u, 2283342035u, 1078398157u, 1345997553u, 1040415832u, 2283342035u, 0, ATAN_TOLERANCE, 0},
+{ 259, 3213249348u, 179066662u, 1103272172u, 1217337578u, 3213249290u, 1435325825u, 0, ATAN_TOLERANCE, 0},
+{ 260, 3211562377u, 3779303391u, 3210023352u, 3115946280u, 3211562370u, 1298984321u, 0, ATAN_TOLERANCE, 0},
+{ 261, 3192989874u, 286247089u, 1085153597u, 713645369u, 3192989874u, 286247089u, 0, ATAN_TOLERANCE, 0},
+{ 262, 1093670500u, 1468283899u, 1042831668u, 2022736418u, 1073291770u, 1437106148u, 0, ATAN_TOLERANCE, 0},
+{ 263, 1083139105u, 3305564080u, 1065483445u, 482392433u, 1073290727u, 2010468964u, 0, ATAN_TOLERANCE, 0},
+{ 264, 3201695807u, 2256346551u, 3222430705u, 2071674991u, 3201695807u, 2256289754u, 0, ATAN_TOLERANCE, 0},
+{ 265, 3204024695u, 2295269094u, 1084451053u, 2773103941u, 3204024695u, 2293847985u, 0, ATAN_TOLERANCE, 0},
+{ 266, 1078173946u, 1482721827u, 1092243422u, 3125409590u, 1073265066u, 4256021444u, 0, ATAN_TOLERANCE, 0},
+{ 267, 3221065973u, 1381740563u, 1071545057u, 2918235653u, 3220255295u, 271607952u, 0, ATAN_TOLERANCE, 0},
+{ 268, 3238715972u, 1105857967u, 3241990046u, 2703723225u, 3220775414u, 2439297396u, 0, ATAN_TOLERANCE, 0},
+{ 269, 1043015571u, 174689677u, 1079333374u, 3947057014u, 1043015571u, 174689677u, 0, ATAN_TOLERANCE, 0},
+{ 270, 1090461859u, 2023082423u, 3242081486u, 1169047927u, 1073291763u, 450648504u, 0, ATAN_TOLERANCE, 0},
+{ 271, 1064525899u, 3742487766u, 1043425732u, 194972788u, 1064525890u, 1715802635u, 0, ATAN_TOLERANCE, 0},
+{ 272, 3213791827u, 2136071361u, 3211529757u, 993675115u, 3213791678u, 3007257663u, 0, ATAN_TOLERANCE, 0},
+{ 273, 3213663381u, 210772141u, 3241441539u, 580731413u, 3213663259u, 311185822u, 0, ATAN_TOLERANCE, 0},
+{ 274, 1093840413u, 1751560711u, 1074522705u, 180987057u, 1073291770u, 2029975416u, 0, ATAN_TOLERANCE, 0},
+{ 275, 1066754591u, 2552236599u, 1088658621u, 2112468655u, 1066754387u, 4086493895u, 0, ATAN_TOLERANCE, 0},
+{ 276, 3189290617u, 1578223762u, 3224596567u, 2456166162u, 3189290617u, 1578223762u, 0, ATAN_TOLERANCE, 0},
+{ 277, 1058506965u, 2110924310u, 1086207177u, 3161208323u, 1058506965u, 2093127013u, 0, ATAN_TOLERANCE, 0},
+{ 278, 3231863394u, 2352173188u, 1079361728u, 4070222179u, 3220774972u, 910304915u, 0, ATAN_TOLERANCE, 0},
+{ 279, 1101012904u, 2481562701u, 1090937016u, 3809489716u, 1073291771u, 1380457062u, 0, ATAN_TOLERANCE, 0},
+{ 280, 3197002651u, 330905705u, 1086260896u, 90264431u, 3197002651u, 330905559u, 0, ATAN_TOLERANCE, 0},
+{ 281, 1040729961u, 4162008079u, 3194387916u, 759522153u, 1040729961u, 4162008079u, 0, ATAN_TOLERANCE, 0},
+{ 282, 1081015037u, 1839697482u, 3216442625u, 2211508949u, 1073287540u, 2371515359u, 0, ATAN_TOLERANCE, 0},
+{ 283, 3249807211u, 3736863454u, 1063475914u, 3150741666u, 3220775419u, 1400414230u, 0, ATAN_TOLERANCE, 0},
+{ 284, 1060785883u, 4200269406u, 3236646101u, 1061812176u, 1060785883u, 3802506466u, 0, ATAN_TOLERANCE, 0},
+{ 285, 1080217979u, 106027290u, 3234978297u, 2245237549u, 1073284806u, 1247593837u, 0, ATAN_TOLERANCE, 0},
+{ 286, 3246984334u, 2132131375u, 3250483427u, 3449276437u, 3220775419u, 1328022993u, 0, ATAN_TOLERANCE, 0},
+{ 287, 1089388778u, 2334440944u, 1105423490u, 4004336184u, 1073291754u, 2923568867u, 0, ATAN_TOLERANCE, 0},
+{ 288, 3218772704u, 4090088208u, 1042030013u, 3898658299u, 3218681850u, 1847050563u, 0, ATAN_TOLERANCE, 0},
+{ 289, 3207908064u, 2272831437u, 3253082595u, 2639188641u, 3207908064u, 2076460116u, 0, ATAN_TOLERANCE, 0},
+{ 290, 1054766684u, 1856594168u, 3189515294u, 4101853676u, 1054766684u, 1856443407u, 0, ATAN_TOLERANCE, 0},
+{ 291, 1076012412u, 2211699255u, 3195060344u, 3865018604u, 1073179730u, 1409096648u, 0, ATAN_TOLERANCE, 0},
+{ 292, 3242767010u, 996259334u, 3241496889u, 3782673116u, 3220775419u, 22547020u, 0, ATAN_TOLERANCE, 0},
+{ 293, 1099130747u, 3840380763u, 1048674041u, 550040067u, 1073291771u, 1303083258u, 0, ATAN_TOLERANCE, 0},
+{ 294, 3251419593u, 95874100u, 3237232828u, 2645647822u, 3220775419u, 1409081748u, 0, ATAN_TOLERANCE, 0},
+{ 295, 1043665640u, 3441419500u, 3252367038u, 876710419u, 1043665640u, 3441419500u, 0, ATAN_TOLERANCE, 0},
+{ 296, 3238593552u, 2560836004u, 3199616543u, 1180840586u, 3220775414u, 912315842u, 0, ATAN_TOLERANCE, 0},
+{ 297, 3221602966u, 2218230392u, 3227485787u, 3947214579u, 3220405998u, 2405698646u, 0, ATAN_TOLERANCE, 0},
+{ 298, 1079539654u, 1447312532u, 1081476588u, 780366847u, 1073281057u, 3850595125u, 0, ATAN_TOLERANCE, 0},
+{ 299, 1072569643u, 2842113832u, 3216156731u, 225159029u, 1072179536u, 576294670u, 0, ATAN_TOLERANCE, 0},
+{ 300, 1098117193u, 1601981129u, 3234628869u, 2236538344u, 1073291771u, 1198344675u, 0, ATAN_TOLERANCE, 0},
+{ 301, 1085173524u, 2194185737u, 3242362684u, 87913366u, 1073291502u, 668770754u, 0, ATAN_TOLERANCE, 0},
+{ 302, 3199083880u, 1346862963u, 1077836259u, 3604666660u, 3199083880u, 1346860680u, 0, ATAN_TOLERANCE, 0},
+{ 303, 3212255979u, 3115209742u, 1099332326u, 1325101950u, 3212255963u, 2575368903u, 0, ATAN_TOLERANCE, 0},
+{ 304, 3224546042u, 3889223100u, 1053247613u, 3371396923u, 3220719302u, 4010635913u, 0, ATAN_TOLERANCE, 0},
+{ 305, 3220477868u, 4163120793u, 1075022670u, 1387631215u, 3219988674u, 723943353u, 0, ATAN_TOLERANCE, 0},
+{ 306, 3205481779u, 1532426189u, 1063168268u, 3397022615u, 3205481779u, 1521480496u, 0, ATAN_TOLERANCE, 0},
+{ 307, 3201033321u, 89324166u, 1079206060u, 3429424710u, 3201033321u, 89295233u, 0, ATAN_TOLERANCE, 0},
+{ 308, 3192325102u, 747591401u, 1072238381u, 2803213904u, 3192325102u, 747591401u, 0, ATAN_TOLERANCE, 0},
+{ 309, 1091113780u, 271904221u, 1044258318u, 1858545114u, 1073291766u, 964142956u, 0, ATAN_TOLERANCE, 0},
+{ 310, 3228068914u, 314958082u, 3249912496u, 2966213175u, 3220770052u, 2371897689u, 0, ATAN_TOLERANCE, 0},
+{ 311, 3197179414u, 3119528953u, 3217179014u, 2908718240u, 3197179414u, 3119528849u, 0, ATAN_TOLERANCE, 0},
+{ 312, 3242467576u, 2018361566u, 1100926600u, 3985805054u, 3220775418u, 4001726821u, 0, ATAN_TOLERANCE, 0},
+{ 313, 1070132580u, 409584884u, 3239758947u, 755795129u, 1070112385u, 2324629516u, 0, ATAN_TOLERANCE, 0},
+{ 314, 1075772446u, 1819156379u, 3251342302u, 2982669005u, 1073157149u, 2384478230u, 0, ATAN_TOLERANCE, 0},
+{ 315, 1101563433u, 2080534280u, 3188254060u, 449171797u, 1073291771u, 1391862546u, 0, ATAN_TOLERANCE, 0},
+{ 316, 1095956900u, 168744837u, 3214950009u, 1322217822u, 1073291771u, 508366786u, 0, ATAN_TOLERANCE, 0},
+{ 317, 3254226900u, 3250487255u, 1062120700u, 1876195180u, 3220775419u, 1413042086u, 0, ATAN_TOLERANCE, 0},
+{ 318, 3226343480u, 1336400247u, 1098057903u, 3314079581u, 3220757999u, 2601919599u, 0, ATAN_TOLERANCE, 0},
+{ 319, 3203678820u, 265025555u, 1063854282u, 3779482256u, 3203678820u, 264315986u, 0, ATAN_TOLERANCE, 0},
+{ 320, 1067300501u, 887044257u, 1054789618u, 2732056261u, 1067299954u, 4125060907u, 0, ATAN_TOLERANCE, 0},
+{ 321, 1050106742u, 4027115185u, 3191764868u, 2940199511u, 1050106742u, 4027114920u, 0, ATAN_TOLERANCE, 0},
+{ 322, 3202500155u, 2875684421u, 3227459837u, 2251967570u, 3202500155u, 2875554229u, 0, ATAN_TOLERANCE, 0},
+{ 323, 1063244412u, 284173546u, 3238823679u, 3557800647u, 1063244409u, 1905701370u, 0, ATAN_TOLERANCE, 0},
+{ 324, 1101458560u, 3147771266u, 3220110464u, 2933364246u, 1073291771u, 1390334372u, 0, ATAN_TOLERANCE, 0},
+{ 325, 1064853160u, 3366183281u, 3234870843u, 537442654u, 1064853141u, 4034264880u, 0, ATAN_TOLERANCE, 0},
+{ 326, 3244118788u, 2529029548u, 3249882819u, 3781513577u, 3220775419u, 827896136u, 0, ATAN_TOLERANCE, 0},
+{ 327, 3213436354u, 1080845539u, 3206760016u, 911778687u, 3213436271u, 1847005657u, 0, ATAN_TOLERANCE, 0},
+{ 328, 3191951036u, 469586759u, 1091830022u, 3080528840u, 3191951036u, 469586759u, 0, ATAN_TOLERANCE, 0},
+{ 329, 1080249104u, 2863108169u, 3225605506u, 2508274250u, 1073284977u, 3192771017u, 0, ATAN_TOLERANCE, 0},
+{ 330, 3210826984u, 4080017377u, 3206492941u, 1470284690u, 3210826983u, 1096190575u, 0, ATAN_TOLERANCE, 0},
+{ 331, 3207120390u, 3867917386u, 1102054928u, 3504746045u, 3207120390u, 3784882034u, 0, ATAN_TOLERANCE, 0},
+{ 332, 1064522279u, 2962134101u, 3244741577u, 3390537350u, 1064522270u, 1282391261u, 0, ATAN_TOLERANCE, 0},
+{ 333, 1088201813u, 1702237980u, 1071598971u, 1102587474u, 1073291735u, 2479837516u, 0, ATAN_TOLERANCE, 0},
+{ 334, 3202970118u, 2180218657u, 3211592260u, 1206527853u, 3202970118u, 2179867188u, 0, ATAN_TOLERANCE, 0},
+{ 335, 3197084744u, 394130786u, 3242511482u, 2437699868u, 3197084744u, 394130621u, 0, ATAN_TOLERANCE, 0},
+{ 336, 1044237059u, 849581558u, 3252006507u, 2008614943u, 1044237059u, 849581558u, 0, ATAN_TOLERANCE, 0},
+{ 337, 3210140014u, 3128971673u, 3249137531u, 2773583059u, 3210140013u, 3254290288u, 0, ATAN_TOLERANCE, 0},
+{ 338, 1085029866u, 590727700u, 3248651761u, 2183878539u, 1073291481u, 1130560623u, 0, ATAN_TOLERANCE, 0},
+{ 339, 1101098629u, 820687580u, 3208143496u, 1402434664u, 1073291771u, 1382955631u, 0, ATAN_TOLERANCE, 0},
+{ 340, 3252290835u, 1873709254u, 3245167989u, 44275991u, 3220775419u, 1411174993u, 0, ATAN_TOLERANCE, 0},
+{ 341, 3189668753u, 1174874204u, 3208263730u, 2360372288u, 3189668753u, 1174874204u, 0, ATAN_TOLERANCE, 0},
+{ 342, 1103854676u, 937573440u, 3208953761u, 211240241u, 1073291771u, 1408870945u, 0, ATAN_TOLERANCE, 0},
+{ 343, 3243548934u, 2469774991u, 1043117070u, 3380071805u, 3220775419u, 580952561u, 0, ATAN_TOLERANCE, 0},
+{ 344, 1058121042u, 442507560u, 3254252803u, 3257889649u, 1058121042u, 435005828u, 0, ATAN_TOLERANCE, 0},
+{ 345, 1068850520u, 1854921625u, 1049810168u, 2729627545u, 1068847283u, 1453079796u, 0, ATAN_TOLERANCE, 0},
+{ 346, 3254712629u, 4001809575u, 3240128649u, 278261523u, 3220775419u, 1413212472u, 0, ATAN_TOLERANCE, 0},
+{ 347, 1087224694u, 1793907966u, 3238955714u, 398859249u, 1073291702u, 1923249299u, 0, ATAN_TOLERANCE, 0},
+{ 348, 3200952547u, 2511916952u, 3219195283u, 1697158299u, 3200952547u, 2511891688u, 0, ATAN_TOLERANCE, 0},
+{ 349, 1069985548u, 3230931724u, 3243897690u, 3508781585u, 1069970272u, 3725464389u, 0, ATAN_TOLERANCE, 0},
+{ 350, 1103847606u, 1674254897u, 1046547577u, 217148561u, 1073291771u, 1408851704u, 0, ATAN_TOLERANCE, 0},
+{ 351, 3211263954u, 3275604304u, 3194840159u, 2991205850u, 3211263950u, 1129887755u, 0, ATAN_TOLERANCE, 0},
+{ 352, 3195249375u, 3509997278u, 3248888030u, 3897986511u, 3195249375u, 3509997268u, 0, ATAN_TOLERANCE, 0},
+{ 353, 1047182435u, 2156824613u, 1042295665u, 1239257646u, 1047182435u, 2156824607u, 0, ATAN_TOLERANCE, 0},
+{ 354, 3213264085u, 1073153314u, 3250031627u, 2567234990u, 3213264025u, 3343823185u, 0, ATAN_TOLERANCE, 0},
+{ 355, 3190593412u, 4261696995u, 3197784432u, 323702024u, 3190593412u, 4261696995u, 0, ATAN_TOLERANCE, 0},
+{ 356, 3243690997u, 4075177615u, 3202791065u, 1919006082u, 3220775419u, 660142742u, 0, ATAN_TOLERANCE, 0},
+{ 357, 3239270013u, 386429966u, 1086504491u, 3698826164u, 3220775416u, 84151276u, 0, ATAN_TOLERANCE, 0},
+{ 358, 1078327190u, 1681986446u, 3194985869u, 3072950140u, 1073267908u, 2262143575u, 0, ATAN_TOLERANCE, 0},
+{ 359, 3217311933u, 3719038997u, 1055433962u, 3331415058u, 3217300970u, 3407849933u, 0, ATAN_TOLERANCE, 0},
+{ 360, 1060749713u, 2420250111u, 3238002206u, 1928661079u, 1060749713u, 2046999671u, 0, ATAN_TOLERANCE, 0},
+{ 361, 1081914210u, 3679866727u, 3227386672u, 1273835792u, 1073289487u, 3892573379u, 0, ATAN_TOLERANCE, 0},
+{ 362, 1041622738u, 2682092368u, 3234222284u, 1325425811u, 1041622738u, 2682092368u, 0, ATAN_TOLERANCE, 0},
+{ 363, 1056312613u, 4175172697u, 3208346191u, 2130706153u, 1056312613u, 4174257689u, 0, ATAN_TOLERANCE, 0},
+{ 364, 1092089624u, 1200784450u, 1083605096u, 1248595607u, 1073291768u, 2828785388u, 0, ATAN_TOLERANCE, 0},
+{ 365, 3213890863u, 1897285171u, 3251296075u, 944966123u, 3213890776u, 3394288938u, 0, ATAN_TOLERANCE, 0},
+{ 366, 3241371250u, 2270747330u, 3230692631u, 422503284u, 3220775418u, 2166514155u, 0, ATAN_TOLERANCE, 0},
+{ 367, 1084120037u, 2857564741u, 1075647403u, 3308906709u, 1073291231u, 2806829990u, 0, ATAN_TOLERANCE, 0},
+{ 368, 3203475098u, 1380066948u, 3232612906u, 2613634294u, 3203475098u, 1379636450u, 0, ATAN_TOLERANCE, 0},
+{ 369, 1063890856u, 4022784584u, 1060483857u, 3264056381u, 1063890851u, 1803848101u, 0, ATAN_TOLERANCE, 0},
+{ 370, 1044637404u, 1778509100u, 3213146285u, 2665833973u, 1044637404u, 1778509100u, 0, ATAN_TOLERANCE, 0},
+{ 371, 3216727300u, 1859175955u, 1079949560u, 4258450607u, 3216720517u, 1754322990u, 0, ATAN_TOLERANCE, 0},
+{ 372, 1048277388u, 4128020197u, 1076266146u, 4122840980u, 1048277388u, 4128020170u, 0, ATAN_TOLERANCE, 0},
+{ 373, 3193183163u, 2454653987u, 3229487005u, 2977478685u, 3193183163u, 2454653986u, 0, ATAN_TOLERANCE, 0},
+{ 374, 3253556483u, 1355181872u, 1095308770u, 436846481u, 3220775419u, 1412610186u, 0, ATAN_TOLERANCE, 0},
+{ 375, 3246605302u, 2592856453u, 3247825559u, 3195234082u, 3220775419u, 1302286191u, 0, ATAN_TOLERANCE, 0},
+{ 376, 3222118023u, 3554670043u, 1091621009u, 3321236467u, 3220498805u, 206635599u, 0, ATAN_TOLERANCE, 0},
+{ 377, 1069012833u, 1936670355u, 1095715713u, 2958468553u, 1069008339u, 2594825754u, 0, ATAN_TOLERANCE, 0},
+{ 378, 3192291109u, 2960339502u, 1098808013u, 1044068983u, 3192291109u, 2960339502u, 0, ATAN_TOLERANCE, 0},
+{ 379, 3196691185u, 4093388677u, 1095478112u, 1735930261u, 3196691185u, 4093388589u, 0, ATAN_TOLERANCE, 0},
+{ 380, 1091040302u, 1807398746u, 3195743135u, 4261616162u, 1073291765u, 4232917553u, 0, ATAN_TOLERANCE, 0},
+{ 381, 3209294194u, 3250576797u, 1059002384u, 3043079652u, 3209294194u, 1724814107u, 0, ATAN_TOLERANCE, 0},
+{ 382, 1069207109u, 666051428u, 3208765404u, 1912684117u, 1069200730u, 2838359932u, 0, ATAN_TOLERANCE, 0},
+{ 383, 1103487420u, 1949030179u, 1096388934u, 896459246u, 1073291771u, 1407620370u, 0, ATAN_TOLERANCE, 0},
+{ 384, 1054300653u, 622499767u, 1066707637u, 1490260486u, 1054300653u, 622431858u, 0, ATAN_TOLERANCE, 0},
+{ 385, 1106688493u, 1490616165u, 3251242436u, 795675736u, 1073291771u, 1413015906u, 0, ATAN_TOLERANCE, 0},
+{ 386, 1080943896u, 3662877092u, 3234317146u, 3200513112u, 1073287386u, 3992075709u, 0, ATAN_TOLERANCE, 0},
+{ 387, 1084088786u, 1356101968u, 3236536816u, 3062844611u, 1073291223u, 177779348u, 0, ATAN_TOLERANCE, 0},
+{ 388, 3219922640u, 2284484846u, 3219498359u, 3240896015u, 3219591699u, 1256648668u, 0, ATAN_TOLERANCE, 0},
+{ 389, 3235759689u, 494503287u, 1092811254u, 142673998u, 3220775384u, 4026022101u, 0, ATAN_TOLERANCE, 0},
+{ 390, 3252125916u, 3394882641u, 3225306538u, 364852125u, 3220775419u, 1410898849u, 0, ATAN_TOLERANCE, 0},
+{ 391, 3225261763u, 193885269u, 1088149839u, 1359805831u, 3220739994u, 2897296068u, 0, ATAN_TOLERANCE, 0},
+{ 392, 3200484782u, 592580907u, 3199560872u, 3086438952u, 3200484782u, 592570987u, 0, ATAN_TOLERANCE, 0},
+{ 393, 1059518664u, 1778008540u, 1049064687u, 73581647u, 1059518664u, 1711804542u, 0, ATAN_TOLERANCE, 0},
+{ 394, 3246733598u, 233240285u, 1081923320u, 2710903921u, 3220775419u, 1312568063u, 0, ATAN_TOLERANCE, 0},
+{ 395, 1069513767u, 3719878805u, 1079866720u, 3615458228u, 1069503457u, 2348282124u, 0, ATAN_TOLERANCE, 0},
+{ 396, 3221194724u, 3647632375u, 3247225271u, 3839959621u, 3220283027u, 1002653763u, 0, ATAN_TOLERANCE, 0},
+{ 397, 1103401096u, 2232210456u, 3235434773u, 224271737u, 1073291771u, 1407227492u, 0, ATAN_TOLERANCE, 0},
+{ 398, 3193003684u, 2134662911u, 3190390590u, 4239009051u, 3193003684u, 2134662911u, 0, ATAN_TOLERANCE, 0},
+{ 399, 1080526145u, 2305279897u, 1077668039u, 1854523320u, 1073286198u, 3085447705u, 0, ATAN_TOLERANCE, 0},
+{ 400, 3219864259u, 538224650u, 3206153057u, 1379649610u, 3219558298u, 2269278275u, 0, ATAN_TOLERANCE, 0},
+{ 401, 3196410507u, 3683897920u, 3244167599u, 3647579469u, 3196410507u, 3683897869u, 0, ATAN_TOLERANCE, 0},
+{ 402, 1090280933u, 2694093608u, 1042775347u, 598406111u, 1073291762u, 1307929677u, 0, ATAN_TOLERANCE, 0},
+{ 403, 3211635392u, 872706833u, 1084802480u, 2200602798u, 3211635383u, 3022112621u, 0, ATAN_TOLERANCE, 0},
+{ 404, 1042339597u, 904146293u, 1060867322u, 1729685598u, 1042339597u, 904146293u, 0, ATAN_TOLERANCE, 0},
+{ 405, 3195694970u, 1894173462u, 3232800651u, 191960416u, 3195694970u, 1894173438u, 0, ATAN_TOLERANCE, 0},
+{ 406, 1091225343u, 3521028551u, 1054522089u, 3287274359u, 1073291766u, 2357955634u, 0, ATAN_TOLERANCE, 0},
+{ 407, 1095386964u, 959640601u, 3201578263u, 4136915018u, 1073291771u, 106237732u, 0, ATAN_TOLERANCE, 0},
+{ 408, 1064005451u, 1553716379u, 1106027987u, 984725765u, 1064005444u, 2749041560u, 0, ATAN_TOLERANCE, 0},
+{ 409, 3238832641u, 2287646644u, 3240329321u, 2276183378u, 3220775414u, 3709335570u, 0, ATAN_TOLERANCE, 0},
+{ 410, 1068209174u, 3940225170u, 3199544434u, 997572161u, 1068207430u, 8813710u, 0, ATAN_TOLERANCE, 0},
+{ 411, 3212768361u, 36116288u, 3206886566u, 4196602670u, 3212768322u, 1671039386u, 0, ATAN_TOLERANCE, 0},
+{ 412, 3241695853u, 3550227562u, 3207257983u, 2747744117u, 3220775418u, 2886941600u, 0, ATAN_TOLERANCE, 0},
+{ 413, 1104236126u, 507130047u, 1048359321u, 3229888373u, 1073291771u, 1409876384u, 0, ATAN_TOLERANCE, 0},
+{ 414, 3222996778u, 2210969014u, 1081031001u, 1946786091u, 3220621353u, 4001909775u, 0, ATAN_TOLERANCE, 0},
+{ 415, 3236306990u, 4059150589u, 3189759234u, 1177045799u, 3220775396u, 810338157u, 0, ATAN_TOLERANCE, 0},
+{ 416, 1093103612u, 2664812822u, 1050343198u, 2034180320u, 1073291769u, 4139613811u, 0, ATAN_TOLERANCE, 0},
+{ 417, 3213779117u, 1175750283u, 3235559706u, 1424491340u, 3213778971u, 1246708253u, 0, ATAN_TOLERANCE, 0},
+{ 418, 3213904193u, 1630036121u, 3231972785u, 3195479448u, 3213904103u, 1713739478u, 0, ATAN_TOLERANCE, 0},
+{ 419, 1090429875u, 2527029044u, 1046927050u, 4000723255u, 1073291762u, 4182981995u, 0, ATAN_TOLERANCE, 0},
+{ 420, 1085208677u, 3335703647u, 3237349676u, 3869440059u, 1073291506u, 3512049895u, 0, ATAN_TOLERANCE, 0},
+{ 421, 1091433848u, 3888398377u, 3196041693u, 1290567220u, 1073291767u, 243274939u, 0, ATAN_TOLERANCE, 0},
+{ 422, 1066679070u, 3242451480u, 3248384948u, 707431021u, 1066678898u, 1238205004u, 0, ATAN_TOLERANCE, 0},
+{ 423, 1083230509u, 2739665123u, 1060777905u, 1733073225u, 1073290795u, 1157092083u, 0, ATAN_TOLERANCE, 0},
+{ 424, 1078517061u, 1297274853u, 3208848704u, 3341639139u, 1073270688u, 982942339u, 0, ATAN_TOLERANCE, 0},
+{ 425, 1046570941u, 2228057309u, 1084318902u, 1317851136u, 1046570941u, 2228057307u, 0, ATAN_TOLERANCE, 0},
+{ 426, 1088255327u, 270039934u, 3241414679u, 3063626339u, 1073291736u, 2441167806u, 0, ATAN_TOLERANCE, 0},
+{ 427, 3219178350u, 83062251u, 3211262173u, 2659016437u, 3219055128u, 4177082013u, 0, ATAN_TOLERANCE, 0},
+{ 428, 1095743886u, 3833539373u, 3206667189u, 1567476111u, 1073291771u, 330699280u, 0, ATAN_TOLERANCE, 0},
+{ 429, 3205195072u, 2382776852u, 3249232579u, 1546622468u, 3205195072u, 2375758791u, 0, ATAN_TOLERANCE, 0},
+{ 430, 1085536439u, 1714300821u, 1104130938u, 4167591598u, 1073291566u, 1019663749u, 0, ATAN_TOLERANCE, 0},
+{ 431, 1051092760u, 2798720100u, 1086978789u, 449990704u, 1051092760u, 2798719163u, 0, ATAN_TOLERANCE, 0},
+{ 432, 3231198415u, 4039516226u, 3244344107u, 4272932619u, 3220774741u, 2601378473u, 0, ATAN_TOLERANCE, 0},
+{ 433, 3222708441u, 1683007544u, 1091105663u, 3805494321u, 3220591958u, 589886074u, 0, ATAN_TOLERANCE, 0},
+{ 434, 3220852948u, 2072627412u, 1094383324u, 3394151662u, 3220202601u, 1052314086u, 0, ATAN_TOLERANCE, 0},
+{ 435, 3220570024u, 1120106427u, 3223631624u, 3404608264u, 3220055200u, 2406131310u, 0, ATAN_TOLERANCE, 0},
+{ 436, 1097859997u, 559918757u, 3205077053u, 908100198u, 1073291771u, 1145555305u, 0, ATAN_TOLERANCE, 0},
+{ 437, 1042677918u, 2026673913u, 3244833635u, 2844573214u, 1042677918u, 2026673913u, 0, ATAN_TOLERANCE, 0},
+{ 438, 3254567259u, 3946837259u, 3234993796u, 3850406820u, 3220775419u, 1413170689u, 0, ATAN_TOLERANCE, 0},
+{ 439, 1057479809u, 3139330994u, 1046133568u, 1539650690u, 1057479809u, 3134693707u, 0, ATAN_TOLERANCE, 0},
+{ 440, 3236705500u, 1554593884u, 3228899878u, 2813752562u, 3220775401u, 761552601u, 0, ATAN_TOLERANCE, 0},
+{ 441, 1056505004u, 3804703138u, 1072931071u, 2053677923u, 1056505004u, 3803371882u, 0, ATAN_TOLERANCE, 0},
+{ 442, 3244864299u, 289355864u, 1078453818u, 2143066338u, 3220775419u, 1065981758u, 0, ATAN_TOLERANCE, 0},
+{ 443, 3203939880u, 2157691971u, 1106629150u, 110806409u, 3203939880u, 2156476156u, 0, ATAN_TOLERANCE, 0},
+{ 444, 1082157019u, 3570399481u, 1085637605u, 180265334u, 1073289773u, 4195207371u, 0, ATAN_TOLERANCE, 0},
+{ 445, 3200980182u, 558779875u, 3202046748u, 2338464653u, 3200980182u, 558753393u, 0, ATAN_TOLERANCE, 0},
+{ 446, 1045705464u, 1703969219u, 3229797258u, 1417521063u, 1045705464u, 1703969218u, 0, ATAN_TOLERANCE, 0},
+{ 447, 3237782261u, 3917440951u, 1051668894u, 3736066983u, 3220775410u, 1673085403u, 0, ATAN_TOLERANCE, 0},
+{ 448, 1064752080u, 3106613409u, 1066627453u, 2735392257u, 1064752065u, 1009918850u, 0, ATAN_TOLERANCE, 0},
+{ 449, 1065665372u, 2229777605u, 1065061963u, 2405869925u, 1065665325u, 3871906750u, 0, ATAN_TOLERANCE, 0},
+{ 450, 3239463229u, 3967957902u, 1057416138u, 3459188071u, 3220775416u, 1964605070u, 0, ATAN_TOLERANCE, 0},
+{ 451, 1068639210u, 3699016825u, 3249713090u, 796144848u, 1068637227u, 91739263u, 0, ATAN_TOLERANCE, 0},
+{ 452, 3228816396u, 3285165564u, 3211948811u, 401510871u, 3220772114u, 723621190u, 0, ATAN_TOLERANCE, 0},
+{ 453, 1094257658u, 634857910u, 3199607513u, 914218057u, 1073291770u, 2965076896u, 0, ATAN_TOLERANCE, 0},
+{ 454, 1083743336u, 2030735578u, 3233855943u, 965677531u, 1073291105u, 2619236622u, 0, ATAN_TOLERANCE, 0},
+{ 455, 1079556815u, 3957229084u, 1051050470u, 3123776651u, 1073281171u, 1434939574u, 0, ATAN_TOLERANCE, 0},
+{ 456, 3221863333u, 162122081u, 3239376395u, 108064594u, 3220459365u, 39489730u, 0, ATAN_TOLERANCE, 0},
+{ 457, 3237271786u, 869031839u, 3225020876u, 1344301606u, 3220775407u, 212221075u, 0, ATAN_TOLERANCE, 0},
+{ 458, 3214433474u, 946696117u, 3231825228u, 1700703647u, 3214433173u, 346054303u, 0, ATAN_TOLERANCE, 0},
+{ 459, 1075492875u, 3394168074u, 1076939786u, 1666995668u, 1073135949u, 3455617632u, 0, ATAN_TOLERANCE, 0},
+{ 460, 3208774795u, 2488789804u, 3238508333u, 1506943664u, 3208774795u, 1977672474u, 0, ATAN_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1072334401u, 1635343292u, 0, ATAN_TOLERANCE, 0},
+{ 462, 3219934542u, 1244307192u, 3191297711u, 2540916692u, 3219598396u, 649284778u, 0, ATAN_TOLERANCE, 0},
+{ 463, 3200062692u, 2871645739u, 3239081581u, 1440249115u, 3200062692u, 2871637541u, 0, ATAN_TOLERANCE, 0},
+{ 464, 1068350633u, 1231934926u, 3236746788u, 603977748u, 1068348446u, 1625121175u, 0, ATAN_TOLERANCE, 0},
+{ 465, 3195449689u, 2386312545u, 1063169277u, 2715234268u, 3195449689u, 2386312530u, 0, ATAN_TOLERANCE, 0},
+{ 466, 1087803418u, 915867083u, 1046790892u, 3347417612u, 1073291725u, 4058436244u, 0, ATAN_TOLERANCE, 0},
+{ 467, 1105984188u, 3553288373u, 1065698616u, 2906680663u, 1073291771u, 1412554883u, 0, ATAN_TOLERANCE, 0},
+{ 468, 1045506226u, 2342364630u, 1051356723u, 4019093203u, 1045506226u, 2342364630u, 0, ATAN_TOLERANCE, 0},
+{ 469, 3201169162u, 2911548084u, 1105282515u, 2476735795u, 3201169162u, 2911512210u, 0, ATAN_TOLERANCE, 0},
+{ 470, 1050472772u, 1836216409u, 1101062307u, 2519592554u, 1050472772u, 1836215904u, 0, ATAN_TOLERANCE, 0},
+{ 471, 1070178161u, 1235369496u, 3222946447u, 668087854u, 1070156256u, 362413592u, 0, ATAN_TOLERANCE, 0},
+{ 472, 3208554596u, 2981820811u, 1059838516u, 2845580478u, 3208554596u, 2352342162u, 0, ATAN_TOLERANCE, 0},
+{ 473, 3193931414u, 1565550570u, 3217165795u, 4162017137u, 3193931414u, 1565550567u, 0, ATAN_TOLERANCE, 0},
+{ 474, 3237251378u, 2808968027u, 1055630096u, 1782326814u, 3220775406u, 3707453445u, 0, ATAN_TOLERANCE, 0},
+{ 475, 1053576974u, 1492622658u, 3216653077u, 3972512122u, 1053576974u, 1492592410u, 0, ATAN_TOLERANCE, 0},
+{ 476, 3222171679u, 2722693603u, 3227814791u, 3169731970u, 3220505917u, 3954374385u, 0, ATAN_TOLERANCE, 0},
+{ 477, 3217906631u, 899763203u, 3207606001u, 2804747833u, 3217873918u, 333405695u, 0, ATAN_TOLERANCE, 0},
+{ 478, 3230670325u, 3789058912u, 3228095081u, 4135937628u, 3220774402u, 3286568866u, 0, ATAN_TOLERANCE, 0},
+{ 479, 1060199382u, 1682808307u, 3206960335u, 232877759u, 1060199382u, 1568543297u, 0, ATAN_TOLERANCE, 0},
+{ 480, 3242091486u, 2851963139u, 3246852961u, 2590862592u, 3220775418u, 3447477152u, 0, ATAN_TOLERANCE, 0},
+{ 481, 1081200406u, 2422232642u, 3234779662u, 290458310u, 1073288091u, 1693769373u, 0, ATAN_TOLERANCE, 0},
+{ 482, 3210671078u, 1082582386u, 1075605675u, 2602133689u, 3210671075u, 3602355648u, 0, ATAN_TOLERANCE, 0},
+{ 483, 3239818611u, 1789635787u, 1059414278u, 1048286093u, 3220775417u, 83447410u, 0, ATAN_TOLERANCE, 0},
+{ 484, 1098330542u, 231339448u, 1055573265u, 504907415u, 1073291771u, 1228578841u, 0, ATAN_TOLERANCE, 0},
+{ 485, 1063211461u, 1153251200u, 3204617090u, 1772013857u, 1063211458u, 3300269630u, 0, ATAN_TOLERANCE, 0},
+{ 486, 1099551055u, 1082898276u, 3212089272u, 1449080862u, 1073291771u, 1330575128u, 0, ATAN_TOLERANCE, 0},
+{ 487, 1086008285u, 3177299045u, 1058862813u, 809400815u, 1073291620u, 2500359190u, 0, ATAN_TOLERANCE, 0},
+{ 488, 3230854550u, 1924429710u, 1056464743u, 3349283177u, 3220774553u, 3165117407u, 0, ATAN_TOLERANCE, 0},
+{ 489, 3245473391u, 42238036u, 1042379500u, 2113559863u, 3220775419u, 1175063706u, 0, ATAN_TOLERANCE, 0},
+{ 490, 1064761243u, 3304403230u, 3217556703u, 58952646u, 1064761227u, 4272869931u, 0, ATAN_TOLERANCE, 0},
+{ 491, 3212669530u, 1645486982u, 3224301095u, 3636267471u, 3212669497u, 590425081u, 0, ATAN_TOLERANCE, 0},
+{ 492, 1062762009u, 619402181u, 3235208235u, 557360557u, 1062762007u, 4093486714u, 0, ATAN_TOLERANCE, 0},
+{ 493, 3238238394u, 110029735u, 1046937383u, 984375729u, 3220775412u, 3424876321u, 0, ATAN_TOLERANCE, 0},
+{ 494, 3189496738u, 4063688092u, 3203235744u, 1049950343u, 3189496738u, 4063688092u, 0, ATAN_TOLERANCE, 0},
+{ 495, 1062350619u, 650996069u, 1054971928u, 3953359826u, 1062350618u, 2844377288u, 0, ATAN_TOLERANCE, 0},
+{ 496, 3227055805u, 66926332u, 1090561839u, 1379780888u, 3220764918u, 3109126767u, 0, ATAN_TOLERANCE, 0},
+{ 497, 3233453307u, 2803378256u, 1086057989u, 498534626u, 3220775265u, 1029631236u, 0, ATAN_TOLERANCE, 0},
+{ 498, 1082618553u, 2846400785u, 1047142525u, 1375153550u, 1073290373u, 3708271087u, 0, ATAN_TOLERANCE, 0},
+{ 499, 1044581201u, 2869128958u, 1070972315u, 4246440273u, 1044581201u, 2869128958u, 0, ATAN_TOLERANCE, 0},
+{ 500, 1051832506u, 3112381207u, 1044430965u, 3981604561u, 1051832506u, 3112379362u, 0, ATAN_TOLERANCE, 0},
+{ 501, 3231254997u, 243303420u, 1093735824u, 1575581926u, 3220774764u, 4185567984u, 0, ATAN_TOLERANCE, 0},
+{ 502, 3239137997u, 3218865041u, 3204803496u, 3840388050u, 3220775415u, 2726236893u, 0, ATAN_TOLERANCE, 0},
+{ 503, 1048415431u, 336846959u, 1052664471u, 3798336786u, 1048415431u, 336846925u, 0, ATAN_TOLERANCE, 0},
+{ 504, 1055954236u, 3639240976u, 1081202165u, 1844741676u, 1055954236u, 3638851837u, 0, ATAN_TOLERANCE, 0},
+{ 505, 3211904793u, 717293069u, 3211534283u, 582401011u, 3211904785u, 3655851692u, 0, ATAN_TOLERANCE, 0},
+{ 506, 3251962512u, 3766248610u, 3196520332u, 1174437546u, 3220775419u, 1410560001u, 0, ATAN_TOLERANCE, 0},
+{ 507, 1083431226u, 756959182u, 3204099341u, 1581804034u, 1073290945u, 3772521170u, 0, ATAN_TOLERANCE, 0},
+{ 508, 3205806444u, 3560686300u, 3220980617u, 4277975772u, 3205806444u, 3548533416u, 0, ATAN_TOLERANCE, 0},
+{ 509, 3209906076u, 2598148853u, 3217622194u, 3460421008u, 3209906076u, 93300911u, 0, ATAN_TOLERANCE, 0},
+{ 510, 1066720824u, 136600515u, 3209934920u, 3340653128u, 1066720634u, 3245875704u, 0, ATAN_TOLERANCE, 0},
+{ 511, 1096820310u, 1045480938u, 3251354609u, 4133432965u, 1073291771u, 881861522u, 0, ATAN_TOLERANCE, 0},
+{ 512, 1091599431u, 1630207738u, 3239996829u, 2393354808u, 1073291767u, 1919667150u, 0, ATAN_TOLERANCE, 0},
+{ 513, 3190626018u, 3739770117u, 1059520750u, 3959551225u, 3190626018u, 3739770117u, 0, ATAN_TOLERANCE, 0},
+{ 514, 3230730505u, 1498861716u, 1091297147u, 847410798u, 3220774457u, 2412695394u, 0, ATAN_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 1072756380u, 1060157024u, 0, ATAN_TOLERANCE, 0},
+{ 516, 1054849265u, 2353103845u, 3235718771u, 2978889966u, 1054849265u, 2352933591u, 0, ATAN_TOLERANCE, 0},
+{ 517, 3251357992u, 1546972125u, 3249076079u, 1987349196u, 3220775419u, 1408923688u, 0, ATAN_TOLERANCE, 0},
+{ 518, 3238219513u, 2769161072u, 1075207126u, 292616282u, 3220775412u, 3006302837u, 0, ATAN_TOLERANCE, 0},
+{ 519, 3199712298u, 36855311u, 1052128202u, 1479039342u, 3199712298u, 36850854u, 0, ATAN_TOLERANCE, 0},
+{ 520, 1083757053u, 2027463605u, 1066023013u, 3369686340u, 1073291111u, 960893753u, 0, ATAN_TOLERANCE, 0},
+{ 521, 3197852749u, 3808681655u, 1054161346u, 1821773119u, 3197852749u, 3808681228u, 0, ATAN_TOLERANCE, 0},
+{ 522, 1040685928u, 3175490326u, 3226879970u, 845687760u, 1040685928u, 3175490326u, 0, ATAN_TOLERANCE, 0},
+{ 523, 1042302993u, 3124482451u, 3242748377u, 3259417226u, 1042302993u, 3124482451u, 0, ATAN_TOLERANCE, 0},
+{ 524, 1045245695u, 2751606436u, 3236210939u, 3923142740u, 1045245695u, 2751606435u, 0, ATAN_TOLERANCE, 0},
+{ 525, 1095694737u, 2016872044u, 3228408064u, 4201274408u, 1073291771u, 304476461u, 0, ATAN_TOLERANCE, 0},
+{ 526, 3199349254u, 1019916843u, 3219974785u, 1977881787u, 3199349254u, 1019914835u, 0, ATAN_TOLERANCE, 0},
+{ 527, 3199478752u, 2060433318u, 1075872515u, 366073725u, 3199478752u, 2060430582u, 0, ATAN_TOLERANCE, 0},
+{ 528, 3191180557u, 1098469906u, 1082900695u, 2349346832u, 3191180557u, 1098469906u, 0, ATAN_TOLERANCE, 0},
+{ 529, 3209974707u, 3011196295u, 3252479932u, 2459281672u, 3209974707u, 75604910u, 0, ATAN_TOLERANCE, 0},
+{ 530, 3221334323u, 2843222682u, 1089275809u, 298982001u, 3220329431u, 3837208282u, 0, ATAN_TOLERANCE, 0},
+{ 531, 1101737698u, 914741728u, 3203468059u, 2833809843u, 1073291771u, 1394003992u, 0, ATAN_TOLERANCE, 0},
+{ 532, 3236763878u, 1274901962u, 3241535845u, 3759113509u, 3220775401u, 3148250534u, 0, ATAN_TOLERANCE, 0},
+{ 533, 3245916442u, 2134927252u, 3253802671u, 3013731444u, 3220775419u, 1240250322u, 0, ATAN_TOLERANCE, 0},
+{ 534, 1099201341u, 2230655177u, 3254510616u, 1249674366u, 1073291771u, 1308903742u, 0, ATAN_TOLERANCE, 0},
+{ 535, 1062971253u, 717357389u, 1083533731u, 3746683362u, 1062971251u, 1915359509u, 0, ATAN_TOLERANCE, 0},
+{ 536, 3213773114u, 834976849u, 3217357661u, 2465861779u, 3213772969u, 2265240188u, 0, ATAN_TOLERANCE, 0},
+{ 537, 1045656117u, 1385714428u, 1053358395u, 3007113740u, 1045656117u, 1385714427u, 0, ATAN_TOLERANCE, 0},
+{ 538, 1050527919u, 599268545u, 3201368210u, 2309854744u, 1050527919u, 599267995u, 0, ATAN_TOLERANCE, 0},
+{ 539, 1069954454u, 2840234388u, 3232496515u, 333365983u, 1069940106u, 2132233565u, 0, ATAN_TOLERANCE, 0},
+{ 540, 1045922781u, 3136078996u, 3194520860u, 2650572904u, 1045922781u, 3136078995u, 0, ATAN_TOLERANCE, 0},
+{ 541, 3233687691u, 2405805086u, 3251640319u, 324233833u, 3220775283u, 2202674566u, 0, ATAN_TOLERANCE, 0},
+{ 542, 1106699146u, 2589598340u, 3254677807u, 952438812u, 1073291771u, 1413021149u, 0, ATAN_TOLERANCE, 0},
+{ 543, 3189114773u, 1922837702u, 3216892718u, 3535907549u, 3189114773u, 1922837702u, 0, ATAN_TOLERANCE, 0},
+{ 544, 3243615868u, 261447440u, 3209805849u, 1150571079u, 3220775419u, 620238805u, 0, ATAN_TOLERANCE, 0},
+{ 545, 1095805232u, 4026487528u, 1073152064u, 27340691u, 1073291771u, 382605392u, 0, ATAN_TOLERANCE, 0},
+{ 546, 3229123692u, 338765118u, 1086225786u, 3207238249u, 3220772746u, 1206299653u, 0, ATAN_TOLERANCE, 0},
+{ 547, 3196182703u, 1085283176u, 3187775111u, 1601194210u, 3196182703u, 1085283146u, 0, ATAN_TOLERANCE, 0},
+{ 548, 1091520173u, 3031712790u, 3252307859u, 170666844u, 1073291767u, 1016111287u, 0, ATAN_TOLERANCE, 0},
+{ 549, 3218862231u, 3148395674u, 1041913758u, 3306391490u, 3218757631u, 103356347u, 0, ATAN_TOLERANCE, 0},
+{ 550, 3201277070u, 2205233857u, 3208100078u, 3993195511u, 3201277070u, 2205191738u, 0, ATAN_TOLERANCE, 0},
+{ 551, 1067699608u, 4282766727u, 1072820377u, 1874778218u, 1067698962u, 1743785447u, 0, ATAN_TOLERANCE, 0},
+{ 552, 3210833092u, 2920860798u, 3218070226u, 3104066154u, 3210833090u, 4113949558u, 0, ATAN_TOLERANCE, 0},
+{ 553, 3204950351u, 969991373u, 3250596895u, 1734386152u, 3204950351u, 965469711u, 0, ATAN_TOLERANCE, 0},
+{ 554, 3238915818u, 1218740205u, 3239802737u, 2610078504u, 3220775415u, 227572644u, 0, ATAN_TOLERANCE, 0},
+{ 555, 3206031242u, 1485218325u, 3220870240u, 3591664613u, 3206031242u, 1465977202u, 0, ATAN_TOLERANCE, 0},
+{ 556, 3202074143u, 690157417u, 3190850619u, 4192347699u, 3202074143u, 690043153u, 0, ATAN_TOLERANCE, 0},
+{ 557, 1096053810u, 4009839784u, 1079670252u, 394167192u, 1073291771u, 573823006u, 0, ATAN_TOLERANCE, 0},
+{ 558, 3234559237u, 961532417u, 1092588071u, 2923790239u, 3220775344u, 3178743683u, 0, ATAN_TOLERANCE, 0},
+{ 559, 3203879091u, 4174125604u, 1050682630u, 2169701868u, 3203879091u, 4173044074u, 0, ATAN_TOLERANCE, 0},
+{ 560, 3243092475u, 4146748230u, 1087373950u, 2481478351u, 3220775419u, 255456628u, 0, ATAN_TOLERANCE, 0},
+{ 561, 1076987866u, 3984715440u, 1050421618u, 2446142566u, 1073232022u, 1403395700u, 0, ATAN_TOLERANCE, 0},
+{ 562, 1084172406u, 936290150u, 1100614426u, 3625806370u, 1073291245u, 2121958750u, 0, ATAN_TOLERANCE, 0},
+{ 563, 1099787952u, 1866615265u, 3215651428u, 2337013350u, 1073291771u, 1340790833u, 0, ATAN_TOLERANCE, 0},
+{ 564, 3253198302u, 712227971u, 1106004723u, 973148499u, 3220775419u, 1412348225u, 0, ATAN_TOLERANCE, 0},
+{ 565, 3230088199u, 3409813738u, 3244817008u, 1933503498u, 3220774009u, 56229122u, 0, ATAN_TOLERANCE, 0},
+{ 566, 1079943733u, 3180389060u, 3228735703u, 83422217u, 1073283214u, 546297662u, 0, ATAN_TOLERANCE, 0},
+{ 567, 1077878724u, 556972671u, 3204582372u, 841555801u, 1073258092u, 3166288107u, 0, ATAN_TOLERANCE, 0},
+{ 568, 1070767721u, 4189151332u, 1080874032u, 706326922u, 1070734947u, 1769347893u, 0, ATAN_TOLERANCE, 0},
+{ 569, 1096151307u, 198291836u, 1057281892u, 2188836928u, 1073291771u, 630771632u, 0, ATAN_TOLERANCE, 0},
+{ 570, 1078091995u, 1219449298u, 3228734687u, 3504562743u, 1073263250u, 3774528357u, 0, ATAN_TOLERANCE, 0},
+{ 571, 3204570464u, 1776099219u, 1094316777u, 4188083896u, 3204570464u, 1774153099u, 0, ATAN_TOLERANCE, 0},
+{ 572, 3193845708u, 2614400266u, 1073750227u, 3003203347u, 3193845708u, 2614400264u, 0, ATAN_TOLERANCE, 0},
+{ 573, 3213982678u, 2959351406u, 1105603716u, 311851587u, 3213982567u, 1570677133u, 0, ATAN_TOLERANCE, 0},
+{ 574, 1084544434u, 865443613u, 1097532516u, 3622237781u, 1073291378u, 600985871u, 0, ATAN_TOLERANCE, 0},
+{ 575, 3231786666u, 447506102u, 3195759295u, 3603669725u, 3220774941u, 2964952981u, 0, ATAN_TOLERANCE, 0},
+{ 576, 1097890173u, 3934398273u, 1040996422u, 2968621268u, 1073291771u, 1153051410u, 0, ATAN_TOLERANCE, 0},
+{ 577, 3196739825u, 784208771u, 1088764788u, 2182296421u, 3196739825u, 784208675u, 0, ATAN_TOLERANCE, 0},
+{ 578, 3248332291u, 1527590526u, 3206961556u, 2823164069u, 3220775419u, 1377500189u, 0, ATAN_TOLERANCE, 0},
+{ 579, 3236644131u, 3876699591u, 3207481130u, 4028148535u, 3220775400u, 2379450018u, 0, ATAN_TOLERANCE, 0},
+{ 580, 1083576186u, 2164249756u, 1059857743u, 1785169952u, 1073291028u, 2762329418u, 0, ATAN_TOLERANCE, 0},
+{ 581, 1091804009u, 2079273665u, 1080303860u, 625760474u, 1073291768u, 279335930u, 0, ATAN_TOLERANCE, 0},
+{ 582, 3226486108u, 3636214836u, 1068367620u, 2932621925u, 3220759309u, 1835502520u, 0, ATAN_TOLERANCE, 0},
+{ 583, 1043995372u, 4274131512u, 1047707755u, 92550763u, 1043995372u, 4274131512u, 0, ATAN_TOLERANCE, 0},
+{ 584, 3198822121u, 2648933384u, 1084603503u, 3534304873u, 3198822121u, 2648931893u, 0, ATAN_TOLERANCE, 0},
+{ 585, 1064563235u, 3216750767u, 3191088629u, 547482628u, 1064563225u, 1790170628u, 0, ATAN_TOLERANCE, 0},
+{ 586, 1061084774u, 1420360746u, 1080063101u, 1690029499u, 1061084774u, 777797761u, 0, ATAN_TOLERANCE, 0},
+{ 587, 3229855364u, 1908572179u, 1080112083u, 1228319033u, 3220773754u, 1865928231u, 0, ATAN_TOLERANCE, 0},
+{ 588, 1048158178u, 500312015u, 3212368508u, 3864619086u, 1048158178u, 500311993u, 0, ATAN_TOLERANCE, 0},
+{ 589, 3221335610u, 4211343447u, 1087492676u, 4272583781u, 3220329869u, 3571128500u, 0, ATAN_TOLERANCE, 0},
+{ 590, 1099392394u, 2382118000u, 1042665328u, 567154882u, 1073291771u, 1321968173u, 0, ATAN_TOLERANCE, 0},
+{ 591, 1058013442u, 1435344339u, 3216303171u, 2275988178u, 1058013442u, 1429747799u, 0, ATAN_TOLERANCE, 0},
+{ 592, 3214538619u, 3403659753u, 3218043030u, 1926480488u, 3214538255u, 731111446u, 0, ATAN_TOLERANCE, 0},
+{ 593, 1076840383u, 1198845185u, 3225556149u, 1130089684u, 1073224818u, 2264453881u, 0, ATAN_TOLERANCE, 0},
+{ 594, 3222663042u, 2183928090u, 1048403956u, 963834821u, 3220586287u, 1628037007u, 0, ATAN_TOLERANCE, 0},
+{ 595, 1101672960u, 2120625396u, 1041006976u, 2137548527u, 1073291771u, 1393259219u, 0, ATAN_TOLERANCE, 0},
+{ 596, 1099230238u, 586700956u, 1059670521u, 303891699u, 1073291771u, 1311113410u, 0, ATAN_TOLERANCE, 0},
+{ 597, 3218994498u, 2509132460u, 1102827530u, 2205707903u, 3218867430u, 403113079u, 0, ATAN_TOLERANCE, 0},
+{ 598, 3204860597u, 1229308263u, 3209170414u, 4206576047u, 3204860597u, 1225527184u, 0, ATAN_TOLERANCE, 0},
+{ 599, 3224076289u, 4078010749u, 3199236456u, 733478972u, 3220699293u, 1573791609u, 0, ATAN_TOLERANCE, 0},
+{ 600, 3197712584u, 4277541051u, 3199806921u, 397102023u, 3197712584u, 4277540717u, 0, ATAN_TOLERANCE, 0},
+{ 601, 3195975013u, 900999594u, 3234720188u, 2530214248u, 3195975013u, 900999556u, 0, ATAN_TOLERANCE, 0},
+{ 602, 1076543548u, 4000609478u, 1096577064u, 4148592328u, 1073213521u, 1835490717u, 0, ATAN_TOLERANCE, 0},
+{ 603, 1048668084u, 2154187873u, 3224392607u, 3957250362u, 1048668084u, 2154187846u, 0, ATAN_TOLERANCE, 0},
+{ 604, 3223413488u, 2867079200u, 1101870326u, 921212001u, 3220655327u, 2167262020u, 0, ATAN_TOLERANCE, 0},
+{ 605, 3233221890u, 674547716u, 1063216239u, 3929755226u, 3220775241u, 2726413826u, 0, ATAN_TOLERANCE, 0},
+{ 606, 3240415851u, 3158182449u, 1043794244u, 3259056345u, 3220775417u, 3403014384u, 0, ATAN_TOLERANCE, 0},
+{ 607, 3236776656u, 3002823940u, 1059511739u, 2832435794u, 3220775401u, 3651312642u, 0, ATAN_TOLERANCE, 0},
+{ 608, 3217304822u, 2196511929u, 1049973941u, 3672092877u, 3217294032u, 3185958956u, 0, ATAN_TOLERANCE, 0},
+{ 609, 1050438056u, 3655292191u, 1086438127u, 3567072906u, 1050438056u, 3655291713u, 0, ATAN_TOLERANCE, 0},
+{ 610, 3243186948u, 1617573614u, 3201863123u, 3090723732u, 3220775419u, 309136010u, 0, ATAN_TOLERANCE, 0},
+{ 611, 3233201380u, 679893506u, 3211547753u, 824081024u, 3220775239u, 811985673u, 0, ATAN_TOLERANCE, 0},
+{ 612, 1089530525u, 2285242807u, 1084999409u, 2221731406u, 1073291756u, 841732295u, 0, ATAN_TOLERANCE, 0},
+{ 613, 3206733664u, 1935990727u, 1088822246u, 1058156518u, 3206733664u, 1899280125u, 0, ATAN_TOLERANCE, 0},
+{ 614, 1102839166u, 521023584u, 1059186903u, 4245163857u, 1073291771u, 1404163801u, 0, ATAN_TOLERANCE, 0},
+{ 615, 1103891140u, 2312887617u, 3191771354u, 1885370807u, 1073291771u, 1408967836u, 0, ATAN_TOLERANCE, 0},
+{ 616, 3252953815u, 1796441468u, 1100030327u, 2772711004u, 3220775419u, 1412087754u, 0, ATAN_TOLERANCE, 0},
+{ 617, 3204276820u, 2095685003u, 1077984448u, 2100773742u, 3204276820u, 2093520013u, 0, ATAN_TOLERANCE, 0},
+{ 618, 3192954620u, 2892538035u, 1042396334u, 4162200338u, 3192954620u, 2892538035u, 0, ATAN_TOLERANCE, 0},
+{ 619, 3242725751u, 2177698116u, 3227557177u, 150832500u, 3220775418u, 4281124194u, 0, ATAN_TOLERANCE, 0},
+{ 620, 3191562216u, 607966734u, 3236250630u, 4164600559u, 3191562216u, 607966734u, 0, ATAN_TOLERANCE, 0},
+{ 621, 3216389812u, 2830122967u, 1046096700u, 3713346883u, 3216386175u, 1322685163u, 0, ATAN_TOLERANCE, 0},
+{ 622, 3237197963u, 2314640506u, 3203696416u, 3276228872u, 3220775406u, 1494646968u, 0, ATAN_TOLERANCE, 0},
+{ 623, 3212912307u, 469331883u, 3249037349u, 2999233437u, 3212912280u, 3578229329u, 0, ATAN_TOLERANCE, 0},
+{ 624, 1097382011u, 560886625u, 1091899487u, 748795120u, 1073291771u, 1066273712u, 0, ATAN_TOLERANCE, 0},
+{ 625, 1049886858u, 2958421324u, 1092569414u, 3235243477u, 1049886858u, 2958421157u, 0, ATAN_TOLERANCE, 0},
+{ 626, 3193026497u, 3221475559u, 1043038304u, 915608434u, 3193026497u, 3221475559u, 0, ATAN_TOLERANCE, 0},
+{ 627, 1071197530u, 3007808652u, 3216682290u, 2531019474u, 1071119536u, 1826918111u, 0, ATAN_TOLERANCE, 0},
+{ 628, 3242028999u, 1767658578u, 3237045269u, 2313128318u, 3220775418u, 3374233364u, 0, ATAN_TOLERANCE, 0},
+{ 629, 3210617892u, 1926845182u, 1066835624u, 1783256828u, 3210617890u, 945751955u, 0, ATAN_TOLERANCE, 0},
+{ 630, 1040575629u, 90378038u, 1057168870u, 164358218u, 1040575629u, 90378038u, 0, ATAN_TOLERANCE, 0},
+{ 631, 1106859172u, 1610524680u, 1085283851u, 2903496007u, 1073291771u, 1413091807u, 0, ATAN_TOLERANCE, 0},
+{ 632, 1078635586u, 4274321404u, 3202913591u, 720121831u, 1073272117u, 1819728786u, 0, ATAN_TOLERANCE, 0},
+{ 633, 1051205256u, 2034778236u, 1071133763u, 1413236391u, 1051205256u, 2034777067u, 0, ATAN_TOLERANCE, 0},
+{ 634, 1051063028u, 1489112261u, 1076691395u, 348210906u, 1051063028u, 1489111380u, 0, ATAN_TOLERANCE, 0},
+{ 635, 3206743917u, 2797651324u, 3224410527u, 2374818327u, 3206743917u, 2760020153u, 0, ATAN_TOLERANCE, 0},
+{ 636, 1088287256u, 1823161666u, 3197810695u, 3119680047u, 1073291737u, 575189280u, 0, ATAN_TOLERANCE, 0},
+{ 637, 1065927336u, 3420950657u, 1087084743u, 2136638961u, 1065927257u, 3181844983u, 0, ATAN_TOLERANCE, 0},
+{ 638, 1069902224u, 3554566429u, 1062907717u, 2736702589u, 1069889350u, 2230613097u, 0, ATAN_TOLERANCE, 0},
+{ 639, 3244888667u, 2928437580u, 3187765027u, 1393427873u, 3220775419u, 1071139528u, 0, ATAN_TOLERANCE, 0},
+{ 640, 3209301561u, 189447067u, 1051643315u, 828663513u, 3209301560u, 2938734198u, 0, ATAN_TOLERANCE, 0},
+{ 641, 1052313869u, 2852350928u, 1045683757u, 673354280u, 1052313869u, 2852345698u, 0, ATAN_TOLERANCE, 0},
+{ 642, 1043946301u, 3589563265u, 3248741629u, 812657927u, 1043946301u, 3589563265u, 0, ATAN_TOLERANCE, 0},
+{ 643, 3190610826u, 1766416701u, 1100392103u, 2185373290u, 3190610826u, 1766416701u, 0, ATAN_TOLERANCE, 0},
+{ 644, 3220275389u, 3763582673u, 3191965790u, 388374829u, 3219820855u, 3731536090u, 0, ATAN_TOLERANCE, 0},
+{ 645, 1079635136u, 1187403069u, 1075300235u, 336640304u, 1073281659u, 4030188121u, 0, ATAN_TOLERANCE, 0},
+{ 646, 1103926251u, 1718795752u, 3243118752u, 683369237u, 1073291771u, 1409057565u, 0, ATAN_TOLERANCE, 0},
+{ 647, 3210792097u, 1863545307u, 1069449477u, 3418627399u, 3210792095u, 3824997910u, 0, ATAN_TOLERANCE, 0},
+{ 648, 1069601294u, 3295607249u, 1068878592u, 1633297809u, 1069595014u, 1384544234u, 0, ATAN_TOLERANCE, 0},
+{ 649, 1058947127u, 2585980994u, 3236670483u, 1286750688u, 1058947127u, 2548184513u, 0, ATAN_TOLERANCE, 0},
+{ 650, 1046157033u, 15816845u, 3233249283u, 2491924775u, 1046157033u, 15816843u, 0, ATAN_TOLERANCE, 0},
+{ 651, 1042413021u, 1051983351u, 1049180786u, 1474421917u, 1042413021u, 1051983351u, 0, ATAN_TOLERANCE, 0},
+{ 652, 3201249525u, 2003816032u, 1086050104u, 668090487u, 3201249525u, 2003775571u, 0, ATAN_TOLERANCE, 0},
+{ 653, 1052556037u, 3671484625u, 1067020039u, 430024694u, 1052556037u, 3671476720u, 0, ATAN_TOLERANCE, 0},
+{ 654, 1067397110u, 3991830201u, 3207808714u, 1021245839u, 1067396479u, 1346565657u, 0, ATAN_TOLERANCE, 0},
+{ 655, 1064194391u, 4255801807u, 3207681716u, 1926756877u, 1064194382u, 3949880665u, 0, ATAN_TOLERANCE, 0},
+{ 656, 1052140785u, 4167786896u, 1077097744u, 1775517981u, 1052140785u, 4167783152u, 0, ATAN_TOLERANCE, 0},
+{ 657, 1085601978u, 3187518564u, 1082437406u, 944672491u, 1073291576u, 74764910u, 0, ATAN_TOLERANCE, 0},
+{ 658, 1049366282u, 953085192u, 3227310828u, 3459155777u, 1049366282u, 953085077u, 0, ATAN_TOLERANCE, 0},
+{ 659, 1069502506u, 1908555460u, 1073640207u, 260441967u, 1069492363u, 118491179u, 0, ATAN_TOLERANCE, 0},
+{ 660, 1067219606u, 250762477u, 1072582645u, 2886742039u, 1067219125u, 347575134u, 0, ATAN_TOLERANCE, 0},
+{ 661, 3250906006u, 786180031u, 3197734769u, 2788918312u, 3220775419u, 1407328857u, 0, ATAN_TOLERANCE, 0},
+{ 662, 3234511827u, 2055912467u, 3244244909u, 1394142937u, 3220775342u, 3099784857u, 0, ATAN_TOLERANCE, 0},
+{ 663, 1069612985u, 91984146u, 3222252812u, 4126276047u, 1069606504u, 224366851u, 0, ATAN_TOLERANCE, 0},
+{ 664, 1081340139u, 3942715706u, 3239316352u, 410676547u, 1073288484u, 3698902139u, 0, ATAN_TOLERANCE, 0},
+{ 665, 3198557846u, 86296211u, 1085850694u, 649202596u, 3198557846u, 86295309u, 0, ATAN_TOLERANCE, 0},
+{ 666, 3245366392u, 3069064472u, 3237358008u, 23209276u, 3220775419u, 1151245100u, 0, ATAN_TOLERANCE, 0},
+{ 667, 1081235288u, 1867297860u, 1072956607u, 2513414118u, 1073288198u, 790114970u, 0, ATAN_TOLERANCE, 0},
+{ 668, 3250533347u, 3171788768u, 3235208783u, 162138697u, 3220775419u, 1405151179u, 0, ATAN_TOLERANCE, 0},
+{ 669, 1081728455u, 1245110700u, 1081653954u, 2584994077u, 1073289237u, 2972570011u, 0, ATAN_TOLERANCE, 0},
+{ 670, 3245510120u, 3347226587u, 1058962932u, 2291943376u, 3220775419u, 1182273584u, 0, ATAN_TOLERANCE, 0},
+{ 671, 1058899062u, 966940828u, 1060726420u, 2798041096u, 1058899062u, 931827316u, 0, ATAN_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1072339043u, 656785282u, 0, ATAN_TOLERANCE, 0},
+{ 673, 3248116497u, 1671039260u, 1086395032u, 3745833360u, 3220775419u, 1372965423u, 0, ATAN_TOLERANCE, 0},
+{ 674, 1057078797u, 651714217u, 1047070645u, 2130549237u, 1057078797u, 649807813u, 0, ATAN_TOLERANCE, 0},
+{ 675, 3207115731u, 1423000172u, 3247822717u, 1551488170u, 3207115731u, 1340677698u, 0, ATAN_TOLERANCE, 0},
+{ 676, 3201597307u, 921077236u, 3213332351u, 1431049019u, 3201597307u, 921031302u, 0, ATAN_TOLERANCE, 0},
+{ 677, 1067510295u, 655715547u, 3190985373u, 1527556471u, 1067509892u, 653900706u, 0, ATAN_TOLERANCE, 0},
+{ 678, 3227654979u, 4110878657u, 3251297180u, 879739345u, 3220768180u, 2143621544u, 0, ATAN_TOLERANCE, 0},
+{ 679, 1085804762u, 2623955764u, 1093699897u, 1216444475u, 1073291601u, 555702737u, 0, ATAN_TOLERANCE, 0},
+{ 680, 1091905603u, 107442539u, 3239767031u, 1149813329u, 1073291768u, 1306532201u, 0, ATAN_TOLERANCE, 0},
+{ 681, 3233445240u, 1761361082u, 3226030205u, 1121849716u, 3220775264u, 2245620163u, 0, ATAN_TOLERANCE, 0},
+{ 682, 3240087115u, 2534144722u, 1044223733u, 3512285706u, 3220775417u, 1361316791u, 0, ATAN_TOLERANCE, 0},
+{ 683, 3211846077u, 4073670723u, 1050729852u, 3034818849u, 3211846071u, 2937369977u, 0, ATAN_TOLERANCE, 0},
+{ 684, 1101984574u, 1421423503u, 1060278048u, 1397153092u, 1073291771u, 1396407837u, 0, ATAN_TOLERANCE, 0},
+{ 685, 3217421829u, 1649206019u, 1104525577u, 1267104290u, 3217407951u, 2906082294u, 0, ATAN_TOLERANCE, 0},
+{ 686, 3189302097u, 3775270392u, 1040251850u, 68667319u, 3189302097u, 3775270392u, 0, ATAN_TOLERANCE, 0},
+{ 687, 3204330900u, 3099226694u, 3254103006u, 4020102648u, 3204330900u, 3096874134u, 0, ATAN_TOLERANCE, 0},
+{ 688, 3201591712u, 3718441177u, 3215643451u, 4032951536u, 3201591712u, 3718395815u, 0, ATAN_TOLERANCE, 0},
+{ 689, 1044131371u, 508048351u, 3210196713u, 1707937896u, 1044131371u, 508048351u, 0, ATAN_TOLERANCE, 0},
+{ 690, 3198611627u, 2784738160u, 1073435430u, 1109346010u, 3198611627u, 2784737154u, 0, ATAN_TOLERANCE, 0},
+{ 691, 3225725290u, 3331916473u, 3238794568u, 2707019594u, 3220750049u, 2204586419u, 0, ATAN_TOLERANCE, 0},
+{ 692, 1093182670u, 3093165197u, 1072894805u, 2853215019u, 1073291770u, 131697235u, 0, ATAN_TOLERANCE, 0},
+{ 693, 3216582139u, 2135797997u, 1048399559u, 2941926126u, 3216576868u, 1585853008u, 0, ATAN_TOLERANCE, 0},
+{ 694, 1048430980u, 2083412145u, 3249335391u, 507212448u, 1048430980u, 2083412111u, 0, ATAN_TOLERANCE, 0},
+{ 695, 1075363751u, 4270176401u, 3246546709u, 3288753319u, 1073123748u, 1365709044u, 0, ATAN_TOLERANCE, 0},
+{ 696, 3247932863u, 3692175292u, 3197271515u, 3989064196u, 3220775419u, 1368106620u, 0, ATAN_TOLERANCE, 0},
+{ 697, 3251691738u, 3111924274u, 1066772558u, 59281695u, 3220775419u, 1409778101u, 0, ATAN_TOLERANCE, 0},
+{ 698, 1067683911u, 2135245466u, 3208804313u, 3846547392u, 1067683288u, 309601593u, 0, ATAN_TOLERANCE, 0},
+{ 699, 1094877811u, 972051266u, 3222814246u, 3539700586u, 1073291770u, 3852398620u, 0, ATAN_TOLERANCE, 0},
+{ 700, 3202965930u, 330951080u, 1079189813u, 583922384u, 3202965930u, 330602253u, 0, ATAN_TOLERANCE, 0},
+{ 701, 1089640092u, 1711944085u, 1104170032u, 643991456u, 1073291757u, 2392636410u, 0, ATAN_TOLERANCE, 0},
+{ 702, 3234429549u, 2072550721u, 3250147641u, 4280263530u, 3220775338u, 4066583188u, 0, ATAN_TOLERANCE, 0},
+{ 703, 3192972706u, 1566376352u, 1067251433u, 72984588u, 3192972706u, 1566376352u, 0, ATAN_TOLERANCE, 0},
+{ 704, 1095276569u, 3103043079u, 1045853123u, 410067497u, 1073291771u, 16684148u, 0, ATAN_TOLERANCE, 0},
+{ 705, 3216672493u, 1910366299u, 1081770885u, 634683073u, 3216666310u, 4273937132u, 0, ATAN_TOLERANCE, 0},
+{ 706, 1081530688u, 2226525875u, 3224149290u, 2126302825u, 1073288903u, 298132872u, 0, ATAN_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1072614497u, 1900219019u, 0, ATAN_TOLERANCE, 0},
+{ 708, 1066482943u, 1953339096u, 1077176252u, 1476516558u, 1066482836u, 3239967720u, 0, ATAN_TOLERANCE, 0},
+{ 709, 1066092000u, 1306277326u, 1079089150u, 4093716191u, 1066091894u, 2830833949u, 0, ATAN_TOLERANCE, 0},
+{ 710, 3233148787u, 51750045u, 3242913901u, 4256866157u, 3220775232u, 2570987938u, 0, ATAN_TOLERANCE, 0},
+{ 711, 3195084967u, 2163853087u, 3232053146u, 2962422808u, 3195084967u, 2163853080u, 0, ATAN_TOLERANCE, 0},
+{ 712, 1075516945u, 1618388148u, 3233154824u, 3711953164u, 1073138032u, 1287113367u, 0, ATAN_TOLERANCE, 0},
+{ 713, 3246868002u, 357108214u, 3202294604u, 2306775262u, 3220775419u, 1321484326u, 0, ATAN_TOLERANCE, 0},
+{ 714, 3201904086u, 2571356437u, 3249064063u, 2394851808u, 3201904086u, 2571271300u, 0, ATAN_TOLERANCE, 0},
+{ 715, 3230488091u, 4273880094u, 1103698617u, 3578832032u, 3220774302u, 1520882757u, 0, ATAN_TOLERANCE, 0},
+{ 716, 3233426701u, 2091068742u, 3228270226u, 3980489730u, 3220775262u, 3650169817u, 0, ATAN_TOLERANCE, 0},
+{ 717, 3229016752u, 2772307714u, 1051008486u, 32546576u, 3220772555u, 2963463001u, 0, ATAN_TOLERANCE, 0},
+{ 718, 3241229215u, 2143788498u, 3195498043u, 3630119231u, 3220775418u, 1721031217u, 0, ATAN_TOLERANCE, 0},
+{ 719, 3198632935u, 2527385594u, 3240503648u, 3482095012u, 3198632935u, 2527384545u, 0, ATAN_TOLERANCE, 0},
+{ 720, 3242168799u, 2690097362u, 1068598730u, 2360266862u, 3220775418u, 3531975415u, 0, ATAN_TOLERANCE, 0},
+{ 721, 1058857869u, 2673272949u, 1082639557u, 522449749u, 1058857869u, 2640355150u, 0, ATAN_TOLERANCE, 0},
+{ 722, 1104424147u, 3596379400u, 3242016775u, 2002293002u, 1073291771u, 1410427816u, 0, ATAN_TOLERANCE, 0},
+{ 723, 1099439656u, 4113224369u, 3222122439u, 2152316893u, 1073291771u, 1324712742u, 0, ATAN_TOLERANCE, 0},
+{ 724, 3220796716u, 31662602u, 1047721249u, 1747087514u, 3220187055u, 1880552726u, 0, ATAN_TOLERANCE, 0},
+{ 725, 3250463757u, 2489659568u, 1097051253u, 277506957u, 3220775419u, 1404848096u, 0, ATAN_TOLERANCE, 0},
+{ 726, 3191401834u, 3850162281u, 3213841942u, 438724093u, 3191401834u, 3850162281u, 0, ATAN_TOLERANCE, 0},
+{ 727, 1095392535u, 2431814052u, 1075518084u, 2672434118u, 1073291771u, 110453937u, 0, ATAN_TOLERANCE, 0},
+{ 728, 3243162735u, 391606792u, 1048184750u, 4168944276u, 3220775419u, 295857859u, 0, ATAN_TOLERANCE, 0},
+{ 729, 3247792416u, 457529672u, 3201090276u, 72407935u, 3220775419u, 1363530930u, 0, ATAN_TOLERANCE, 0},
+{ 730, 3218720719u, 3954981400u, 1052053242u, 2411049585u, 3218637316u, 182033963u, 0, ATAN_TOLERANCE, 0},
+{ 731, 1086180091u, 485456950u, 1088415093u, 1655397424u, 1073291633u, 3636630034u, 0, ATAN_TOLERANCE, 0},
+{ 732, 3198234428u, 1551748070u, 3236871640u, 1329701152u, 3198234428u, 1551747647u, 0, ATAN_TOLERANCE, 0},
+{ 733, 3224639122u, 3099222537u, 1104984570u, 4293792842u, 3220723263u, 3080632334u, 0, ATAN_TOLERANCE, 0},
+{ 734, 3203949705u, 3603065260u, 3197735968u, 2402359253u, 3203949705u, 3601826749u, 0, ATAN_TOLERANCE, 0},
+{ 735, 3198824584u, 3961208159u, 3219057584u, 2340553876u, 3198824584u, 3961206662u, 0, ATAN_TOLERANCE, 0},
+{ 736, 1074881909u, 4014841779u, 3197672877u, 3697233334u, 1073054787u, 2691726615u, 0, ATAN_TOLERANCE, 0},
+{ 737, 3213275657u, 1403876392u, 3254028950u, 921363393u, 3213275596u, 1913974053u, 0, ATAN_TOLERANCE, 0},
+{ 738, 1107251806u, 1862576361u, 3194031708u, 2476290925u, 1073291771u, 1413218495u, 0, ATAN_TOLERANCE, 0},
+{ 739, 1049661768u, 1454212851u, 1088378861u, 3400401866u, 1049661768u, 1454212756u, 0, ATAN_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 1072980428u, 3659931870u, 0, ATAN_TOLERANCE, 0},
+{ 741, 3216409282u, 1199568671u, 3225679997u, 46947405u, 3216405497u, 2100918285u, 0, ATAN_TOLERANCE, 0},
+{ 742, 1077685537u, 2596231448u, 3253943728u, 2219151748u, 1073254572u, 482439875u, 0, ATAN_TOLERANCE, 0},
+{ 743, 1066527035u, 4119719558u, 3222036299u, 1275474618u, 1066526916u, 1172927590u, 0, ATAN_TOLERANCE, 0},
+{ 744, 3239908663u, 3347296825u, 1101507910u, 1254014794u, 3220775417u, 552152825u, 0, ATAN_TOLERANCE, 0},
+{ 745, 1084119992u, 673775040u, 1070743626u, 244126093u, 1073291231u, 2753811470u, 0, ATAN_TOLERANCE, 0},
+{ 746, 3203199850u, 1832066983u, 1051358028u, 3262483417u, 3203199850u, 1831549326u, 0, ATAN_TOLERANCE, 0},
+{ 747, 1077559600u, 3962610501u, 3198598777u, 849269178u, 1073251851u, 4090842556u, 0, ATAN_TOLERANCE, 0},
+{ 748, 3235473900u, 2497516122u, 3254374111u, 2821429629u, 3220775379u, 154801752u, 0, ATAN_TOLERANCE, 0},
+{ 749, 1076236288u, 2805941787u, 3217785843u, 779131141u, 1073196975u, 1827002005u, 0, ATAN_TOLERANCE, 0},
+{ 750, 3226908686u, 723423605u, 1084533420u, 627282213u, 3220763881u, 1037935400u, 0, ATAN_TOLERANCE, 0},
+{ 751, 3215947680u, 4292778869u, 1078101071u, 1676860147u, 3215945090u, 1354108515u, 0, ATAN_TOLERANCE, 0},
+{ 752, 1076288502u, 3528118587u, 3194648564u, 2363260897u, 1073200262u, 1491562591u, 0, ATAN_TOLERANCE, 0},
+{ 753, 3192897879u, 1307010018u, 1061248120u, 1468743108u, 3192897879u, 1307010017u, 0, ATAN_TOLERANCE, 0},
+{ 754, 3246583139u, 107905661u, 3226089788u, 1943427674u, 3220775419u, 1300294502u, 0, ATAN_TOLERANCE, 0},
+{ 755, 3188230541u, 760006940u, 1054265604u, 1749976597u, 3188230541u, 760006940u, 0, ATAN_TOLERANCE, 0},
+{ 756, 3237773384u, 2787503556u, 1081282610u, 1195841206u, 3220775410u, 1490604965u, 0, ATAN_TOLERANCE, 0},
+{ 757, 3191802156u, 545462045u, 3208381743u, 1981311808u, 3191802156u, 545462045u, 0, ATAN_TOLERANCE, 0},
+{ 758, 1061232136u, 3657978397u, 1104463616u, 3501253426u, 1061232136u, 3219724183u, 0, ATAN_TOLERANCE, 0},
+{ 759, 1049883857u, 1804177501u, 3210693633u, 3606766729u, 1049883857u, 1804177335u, 0, ATAN_TOLERANCE, 0},
+{ 760, 1076856879u, 1336278526u, 1043741618u, 3165279431u, 1073225351u, 2385733259u, 0, ATAN_TOLERANCE, 0},
+{ 761, 1055471915u, 1599382075u, 1058018527u, 4212580517u, 1055471915u, 1599039729u, 0, ATAN_TOLERANCE, 0},
+{ 762, 3207502326u, 3007589929u, 3202026547u, 2792028313u, 3207502326u, 2851086652u, 0, ATAN_TOLERANCE, 0},
+{ 763, 3253082770u, 1866066996u, 1060329048u, 3727175322u, 3220775419u, 1412236097u, 0, ATAN_TOLERANCE, 0},
+{ 764, 3198416643u, 150890940u, 1056025306u, 3082724735u, 3198416643u, 150890277u, 0, ATAN_TOLERANCE, 0},
+{ 765, 1062008939u, 80400395u, 1093584426u, 3478941315u, 1062008938u, 2250748144u, 0, ATAN_TOLERANCE, 0},
+{ 766, 3251640614u, 4050954182u, 3219263194u, 2537475930u, 3220775419u, 1409585431u, 0, ATAN_TOLERANCE, 0},
+{ 767, 1064841871u, 2881752155u, 3212589299u, 2559651278u, 1064841853u, 959039477u, 0, ATAN_TOLERANCE, 0},
+{ 768, 3249016304u, 440309030u, 3214267461u, 3788040806u, 3220775419u, 1391435146u, 0, ATAN_TOLERANCE, 0},
+{ 769, 1100476615u, 918813144u, 3208535698u, 1607035904u, 1073291771u, 1368903776u, 0, ATAN_TOLERANCE, 0},
+{ 770, 1042137451u, 2497054124u, 1089139147u, 2549609010u, 1042137451u, 2497054124u, 0, ATAN_TOLERANCE, 0},
+{ 771, 1047037641u, 790219083u, 1054657139u, 2797979479u, 1047037641u, 790219078u, 0, ATAN_TOLERANCE, 0},
+{ 772, 1057781400u, 1149462078u, 1095765205u, 3879963182u, 1057781400u, 1141591028u, 0, ATAN_TOLERANCE, 0},
+{ 773, 3202729813u, 2684353926u, 3205212854u, 1732474928u, 3202729813u, 2684133556u, 0, ATAN_TOLERANCE, 0},
+{ 774, 1095236965u, 2742237025u, 1051317716u, 3386396147u, 1073291770u, 4276458873u, 0, ATAN_TOLERANCE, 0},
+{ 775, 1063230986u, 3408320912u, 1103071166u, 4233059513u, 1063230984u, 951005581u, 0, ATAN_TOLERANCE, 0},
+{ 776, 1064863548u, 1077495917u, 1088399968u, 433115118u, 1064863529u, 156085544u, 0, ATAN_TOLERANCE, 0},
+{ 777, 3204547572u, 841366493u, 1051716814u, 4121125128u, 3204547572u, 839532312u, 0, ATAN_TOLERANCE, 0},
+{ 778, 1064632084u, 321857207u, 1089128010u, 1149988239u, 1064632072u, 97645502u, 0, ATAN_TOLERANCE, 0},
+{ 779, 3245542663u, 799866606u, 3197637091u, 3924438208u, 3220775419u, 1188307079u, 0, ATAN_TOLERANCE, 0},
+{ 780, 3191062890u, 2002049816u, 1077053447u, 2240354761u, 3191062890u, 2002049816u, 0, ATAN_TOLERANCE, 0},
+{ 781, 3229006283u, 478939968u, 1097035749u, 1066716440u, 3220772535u, 2404832840u, 0, ATAN_TOLERANCE, 0},
+{ 782, 3232473641u, 1653104725u, 1088548129u, 81977716u, 3220775122u, 3765834803u, 0, ATAN_TOLERANCE, 0},
+{ 783, 3196861276u, 3899475018u, 3189694084u, 3330093036u, 3196861276u, 3899474901u, 0, ATAN_TOLERANCE, 0},
+{ 784, 1089312583u, 2612450289u, 1079065127u, 603380842u, 1073291754u, 114116815u, 0, ATAN_TOLERANCE, 0},
+{ 785, 1100636791u, 3962735564u, 1101570429u, 1372490825u, 1073291771u, 1373058424u, 0, ATAN_TOLERANCE, 0},
+{ 786, 1054806016u, 1479841439u, 1059312257u, 541504905u, 1054806016u, 1479681591u, 0, ATAN_TOLERANCE, 0},
+{ 787, 1078662178u, 2626148789u, 1057571099u, 4121656076u, 1073272411u, 3681422370u, 0, ATAN_TOLERANCE, 0},
+{ 788, 1081613389u, 1902560314u, 1043130231u, 3557671562u, 1073289053u, 815191780u, 0, ATAN_TOLERANCE, 0},
+{ 789, 3193829772u, 41779312u, 1081626342u, 831171823u, 3193829772u, 41779310u, 0, ATAN_TOLERANCE, 0},
+{ 790, 1058131100u, 1393168821u, 1066457405u, 1381616968u, 1058131100u, 1385469640u, 0, ATAN_TOLERANCE, 0},
+{ 791, 1072338141u, 3756584649u, 3222267229u, 1423157432u, 1072049769u, 3735827532u, 0, ATAN_TOLERANCE, 0},
+{ 792, 3254435674u, 1894912556u, 1042426694u, 155024547u, 3220775419u, 1413126891u, 0, ATAN_TOLERANCE, 0},
+{ 793, 3195453512u, 35164295u, 3203391785u, 1037041084u, 3195453512u, 35164280u, 0, ATAN_TOLERANCE, 0},
+{ 794, 1084777479u, 3957875950u, 3232195211u, 1590756436u, 1073291435u, 1993247669u, 0, ATAN_TOLERANCE, 0},
+{ 795, 1068844322u, 1447585080u, 1071279485u, 1107922438u, 1068841127u, 3974629702u, 0, ATAN_TOLERANCE, 0},
+{ 796, 1046252518u, 981897615u, 1051856116u, 430357614u, 1046252518u, 981897613u, 0, ATAN_TOLERANCE, 0},
+{ 797, 3227524215u, 395145384u, 3219821938u, 50586510u, 3220767284u, 128407746u, 0, ATAN_TOLERANCE, 0},
+{ 798, 1069775912u, 750827797u, 1082862669u, 230466783u, 1069766183u, 1729676079u, 0, ATAN_TOLERANCE, 0},
+{ 799, 1086668819u, 1365083575u, 3204848310u, 1700831722u, 1073291674u, 4097535485u, 0, ATAN_TOLERANCE, 0},
+{ 800, 3218090390u, 344241827u, 1071538935u, 2715566077u, 3218057649u, 2810753583u, 0, ATAN_TOLERANCE, 0},
+{ 801, 3247582856u, 4069301823u, 3193208760u, 2949125229u, 3220775419u, 1354698203u, 0, ATAN_TOLERANCE, 0},
+{ 802, 1103231387u, 3585711710u, 1065801594u, 2302229267u, 1073291771u, 1406287239u, 0, ATAN_TOLERANCE, 0},
+{ 803, 3194118956u, 709803845u, 1048741487u, 2296910194u, 3194118956u, 709803843u, 0, ATAN_TOLERANCE, 0},
+{ 804, 3193280779u, 744421179u, 1069302001u, 2659232829u, 3193280779u, 744421178u, 0, ATAN_TOLERANCE, 0},
+{ 805, 1092835968u, 1799949903u, 3192522886u, 4212149209u, 1073291769u, 2902193025u, 0, ATAN_TOLERANCE, 0},
+{ 806, 3206108502u, 145234164u, 3250614064u, 912384201u, 3206108502u, 123036041u, 0, ATAN_TOLERANCE, 0},
+{ 807, 3240510664u, 2784620507u, 1102812948u, 3531481022u, 3220775417u, 3831840535u, 0, ATAN_TOLERANCE, 0},
+{ 808, 3251159663u, 383952592u, 3205659905u, 3633194728u, 3220775419u, 1408333280u, 0, ATAN_TOLERANCE, 0},
+{ 809, 3203476252u, 3792395543u, 1070072378u, 3864816376u, 3203476252u, 3791963717u, 0, ATAN_TOLERANCE, 0},
+{ 810, 3205316273u, 2115553675u, 1066288499u, 3538377867u, 3205316273u, 2107016210u, 0, ATAN_TOLERANCE, 0},
+{ 811, 3252075185u, 1230026762u, 1090719723u, 440819880u, 3220775419u, 1410801605u, 0, ATAN_TOLERANCE, 0},
+{ 812, 3194595076u, 2991290482u, 1096886719u, 1097971167u, 3194595076u, 2991290477u, 0, ATAN_TOLERANCE, 0},
+{ 813, 1090048600u, 1098035020u, 3230900504u, 1479059095u, 1073291761u, 66967298u, 0, ATAN_TOLERANCE, 0},
+{ 814, 3251056964u, 1719428427u, 3188631907u, 3707377409u, 3220775419u, 1407967006u, 0, ATAN_TOLERANCE, 0},
+{ 815, 1053236165u, 3748932896u, 1084908557u, 1325384361u, 1053236165u, 3748916443u, 0, ATAN_TOLERANCE, 0},
+{ 816, 1084704076u, 3979168763u, 1057455255u, 2454615952u, 1073291419u, 1282433458u, 0, ATAN_TOLERANCE, 0},
+{ 817, 1053106984u, 1449164578u, 1056960316u, 1654931641u, 1053106984u, 1449151986u, 0, ATAN_TOLERANCE, 0},
+{ 818, 1071439010u, 2120487381u, 3226298974u, 2364226633u, 1071324467u, 3218427578u, 0, ATAN_TOLERANCE, 0},
+{ 819, 1075071428u, 1074268944u, 1065730444u, 280016852u, 1073087652u, 2777987846u, 0, ATAN_TOLERANCE, 0},
+{ 820, 3200308256u, 3315127889u, 3236295594u, 2900924954u, 3200308256u, 3315121534u, 0, ATAN_TOLERANCE, 0},
+{ 821, 3196425891u, 2246037502u, 1049691002u, 1496066550u, 3196425891u, 2246037450u, 0, ATAN_TOLERANCE, 0},
+{ 822, 3193006859u, 4191285446u, 3217936236u, 2382392789u, 3193006859u, 4191285446u, 0, ATAN_TOLERANCE, 0},
+{ 823, 1092833308u, 640099844u, 1042152237u, 2064279383u, 1073291769u, 2887266886u, 0, ATAN_TOLERANCE, 0},
+{ 824, 1079913438u, 3468560824u, 1093251038u, 310958750u, 1073283083u, 111073037u, 0, ATAN_TOLERANCE, 0},
+{ 825, 1096788400u, 1413568905u, 1100941106u, 1627289946u, 1073291771u, 871166501u, 0, ATAN_TOLERANCE, 0},
+{ 826, 3191549550u, 3797143370u, 3195497539u, 3843275034u, 3191549550u, 3797143370u, 0, ATAN_TOLERANCE, 0},
+{ 827, 3252077393u, 2806642640u, 3201943068u, 2515980718u, 3220775419u, 1410805976u, 0, ATAN_TOLERANCE, 0},
+{ 828, 1086877316u, 632580632u, 1078673506u, 3259601317u, 1073291687u, 2163190817u, 0, ATAN_TOLERANCE, 0},
+{ 829, 3200980575u, 3309678799u, 1049337078u, 3056787074u, 3200980575u, 3309652299u, 0, ATAN_TOLERANCE, 0},
+{ 830, 3221495289u, 2341164249u, 1080834967u, 2810890005u, 3220378535u, 2927260740u, 0, ATAN_TOLERANCE, 0},
+{ 831, 1067019674u, 932124675u, 1093915797u, 662682630u, 1067019331u, 3482482559u, 0, ATAN_TOLERANCE, 0},
+{ 832, 3249230091u, 1367996113u, 3251723684u, 2974064663u, 3220775419u, 1394100471u, 0, ATAN_TOLERANCE, 0},
+{ 833, 1080230731u, 323437999u, 1090499064u, 901457511u, 1073284877u, 2447232217u, 0, ATAN_TOLERANCE, 0},
+{ 834, 3235778876u, 4184941840u, 3196770014u, 2458988443u, 3220775385u, 1169410173u, 0, ATAN_TOLERANCE, 0},
+{ 835, 1087618284u, 2023065054u, 3211994098u, 2734612965u, 1073291719u, 1930580370u, 0, ATAN_TOLERANCE, 0},
+{ 836, 1064074694u, 3679267365u, 3237728785u, 1699558211u, 1064074687u, 1409027919u, 0, ATAN_TOLERANCE, 0},
+{ 837, 1088079010u, 1826799031u, 1078709629u, 3986905229u, 1073291733u, 320751146u, 0, ATAN_TOLERANCE, 0},
+{ 838, 1052843785u, 351061688u, 3194386466u, 4105857588u, 1052843785u, 351054996u, 0, ATAN_TOLERANCE, 0},
+{ 839, 1054128006u, 1365244058u, 1064457319u, 1452191426u, 1054128006u, 1365196637u, 0, ATAN_TOLERANCE, 0},
+{ 840, 1064122385u, 2463030625u, 3215975031u, 3773488326u, 1064122377u, 1946325669u, 0, ATAN_TOLERANCE, 0},
+{ 841, 3251276671u, 752664055u, 1065110394u, 1835931663u, 3220775419u, 1408697885u, 0, ATAN_TOLERANCE, 0},
+{ 842, 1088045088u, 3496172149u, 1089617208u, 109068701u, 1073291732u, 1376045510u, 0, ATAN_TOLERANCE, 0},
+{ 843, 3198135087u, 1636966254u, 1086098766u, 2016598298u, 3198135087u, 1636965592u, 0, ATAN_TOLERANCE, 0},
+{ 844, 1050931318u, 3551516956u, 1097969102u, 1317953425u, 1050931318u, 3551516295u, 0, ATAN_TOLERANCE, 0},
+{ 845, 3229832217u, 2977627788u, 1045339018u, 516058480u, 3220773724u, 50491510u, 0, ATAN_TOLERANCE, 0},
+{ 846, 3237408578u, 3901731263u, 3189566462u, 32272932u, 3220775408u, 717252040u, 0, ATAN_TOLERANCE, 0},
+{ 847, 1077281796u, 1956025297u, 3246628529u, 3840733905u, 1073244175u, 2030721393u, 0, ATAN_TOLERANCE, 0},
+{ 848, 1099818036u, 561057891u, 3198494340u, 4271027193u, 1073291771u, 1341911326u, 0, ATAN_TOLERANCE, 0},
+{ 849, 3250929921u, 692989850u, 3242630588u, 2492225971u, 3220775419u, 1407439174u, 0, ATAN_TOLERANCE, 0},
+{ 850, 3205479397u, 3439913962u, 1067477011u, 2973333638u, 3205479397u, 3429005786u, 0, ATAN_TOLERANCE, 0},
+{ 851, 3213993989u, 877613377u, 1044917899u, 809672798u, 3213993874u, 2371201783u, 0, ATAN_TOLERANCE, 0},
+{ 852, 3222171454u, 905426932u, 1046417457u, 1086320855u, 3220505888u, 3375236297u, 0, ATAN_TOLERANCE, 0},
+{ 853, 3246346629u, 2645567288u, 1051258339u, 557182478u, 3220775419u, 1276615550u, 0, ATAN_TOLERANCE, 0},
+{ 854, 3204057950u, 186287752u, 1061342054u, 4054003419u, 3204057950u, 184780236u, 0, ATAN_TOLERANCE, 0},
+{ 855, 1097266673u, 3506889716u, 3243866036u, 519056371u, 1073291771u, 1039639815u, 0, ATAN_TOLERANCE, 0},
+{ 856, 1042654053u, 2171898436u, 3246911982u, 1091500784u, 1042654053u, 2171898436u, 0, ATAN_TOLERANCE, 0},
+{ 857, 3243647673u, 368493885u, 3222871893u, 1419055230u, 3220775419u, 637635996u, 0, ATAN_TOLERANCE, 0},
+{ 858, 1091950572u, 2010971245u, 3188804530u, 1518695799u, 1073291768u, 1714660265u, 0, ATAN_TOLERANCE, 0},
+{ 859, 3205426509u, 1239207795u, 1040192984u, 2199481342u, 3205426509u, 1229110840u, 0, ATAN_TOLERANCE, 0},
+{ 860, 3210978637u, 4264613432u, 3203460972u, 3558930895u, 3210978635u, 2253688262u, 0, ATAN_TOLERANCE, 0},
+{ 861, 1050299283u, 3772748958u, 3227667376u, 309688336u, 1050299283u, 3772748579u, 0, ATAN_TOLERANCE, 0},
+{ 862, 3230743041u, 1077949160u, 1075769893u, 2405271377u, 3220774468u, 1035678043u, 0, ATAN_TOLERANCE, 0},
+{ 863, 1091835152u, 3751608506u, 3232278094u, 930375071u, 1073291768u, 611077343u, 0, ATAN_TOLERANCE, 0},
+{ 864, 3198617153u, 1518334131u, 3205247482u, 791756713u, 3198617153u, 1518333114u, 0, ATAN_TOLERANCE, 0},
+{ 865, 1047317453u, 2825203170u, 3245054001u, 1822981827u, 1047317453u, 2825203162u, 0, ATAN_TOLERANCE, 0},
+{ 866, 1100016363u, 514474738u, 1089072073u, 3300845441u, 1073291771u, 1350285403u, 0, ATAN_TOLERANCE, 0},
+{ 867, 3216391250u, 247369460u, 3197320093u, 687450958u, 3216387601u, 4098199039u, 0, ATAN_TOLERANCE, 0},
+{ 868, 1104161422u, 2722237629u, 1058272368u, 90602316u, 1073291771u, 1409602963u, 0, ATAN_TOLERANCE, 0},
+{ 869, 3208098435u, 1845900544u, 3231520830u, 3389751458u, 3208098435u, 1555193049u, 0, ATAN_TOLERANCE, 0},
+{ 870, 3247535245u, 737689911u, 3195377751u, 3462616966u, 3220775419u, 1352240263u, 0, ATAN_TOLERANCE, 0},
+{ 871, 3223538384u, 3620285831u, 1055501023u, 2708056059u, 3220667101u, 3771485332u, 0, ATAN_TOLERANCE, 0},
+{ 872, 3219464996u, 4073430285u, 1056206159u, 172017902u, 3219303954u, 2708833062u, 0, ATAN_TOLERANCE, 0},
+{ 873, 3212869638u, 2799176222u, 1052706894u, 4083892667u, 3212869615u, 1098347868u, 0, ATAN_TOLERANCE, 0},
+{ 874, 3202279557u, 1562351330u, 1069705601u, 1247765260u, 3202279557u, 1562193851u, 0, ATAN_TOLERANCE, 0},
+{ 875, 3232717299u, 51853475u, 3189080201u, 2783553144u, 3220775158u, 140561636u, 0, ATAN_TOLERANCE, 0},
+{ 876, 3219454353u, 3851781549u, 3241598113u, 514064046u, 3219296527u, 1491630951u, 0, ATAN_TOLERANCE, 0},
+{ 877, 1100045965u, 934745487u, 3248182437u, 2798581921u, 1073291771u, 1351935916u, 0, ATAN_TOLERANCE, 0},
+{ 878, 3213082493u, 2948648757u, 3232177250u, 4278702895u, 3213082453u, 2479375184u, 0, ATAN_TOLERANCE, 0},
+{ 879, 1072485724u, 4259101461u, 1061606772u, 84229920u, 1072134131u, 784335985u, 0, ATAN_TOLERANCE, 0},
+{ 880, 3198075559u, 3891230598u, 1095924595u, 3049217547u, 3198075559u, 3891229992u, 0, ATAN_TOLERANCE, 0},
+{ 881, 1077353053u, 3806018919u, 3243191216u, 280177341u, 1073246412u, 2690826313u, 0, ATAN_TOLERANCE, 0},
+{ 882, 1060624530u, 3900344258u, 1063647809u, 4206745890u, 1060624530u, 3604130788u, 0, ATAN_TOLERANCE, 0},
+{ 883, 3227707336u, 2126253040u, 3207248026u, 808507485u, 3220768486u, 1656700840u, 0, ATAN_TOLERANCE, 0},
+{ 884, 1086090317u, 3465685634u, 3230391053u, 3754958214u, 1073291627u, 948489182u, 0, ATAN_TOLERANCE, 0},
+{ 885, 1102861084u, 461094531u, 1101110393u, 1316091396u, 1073291771u, 1404277038u, 0, ATAN_TOLERANCE, 0},
+{ 886, 1064980314u, 4197635149u, 1091873113u, 1240127141u, 1064980291u, 1134578128u, 0, ATAN_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 1072967440u, 3478680514u, 0, ATAN_TOLERANCE, 0},
+{ 888, 3213429165u, 3744663425u, 3212482771u, 953662066u, 3213429084u, 554927145u, 0, ATAN_TOLERANCE, 0},
+{ 889, 1085171305u, 3564196690u, 3228101916u, 904305212u, 1073291501u, 3676281215u, 0, ATAN_TOLERANCE, 0},
+{ 890, 1048333111u, 3566257266u, 3235138829u, 2734275140u, 1048333111u, 3566257237u, 0, ATAN_TOLERANCE, 0},
+{ 891, 3243948477u, 606044282u, 3241318094u, 2446416887u, 3220775419u, 770928296u, 0, ATAN_TOLERANCE, 0},
+{ 892, 1041627284u, 2336116589u, 3197594053u, 2296925138u, 1041627284u, 2336116589u, 0, ATAN_TOLERANCE, 0},
+{ 893, 1058567659u, 907670625u, 3240769036u, 1827119006u, 1058567659u, 887688527u, 0, ATAN_TOLERANCE, 0},
+{ 894, 1044467183u, 2818710946u, 3246059905u, 553394170u, 1044467183u, 2818710946u, 0, ATAN_TOLERANCE, 0},
+{ 895, 3189504094u, 4099522736u, 3232742168u, 3718083858u, 3189504094u, 4099522736u, 0, ATAN_TOLERANCE, 0},
+{ 896, 1092371276u, 1059279404u, 1080245336u, 175941677u, 1073291769u, 277932339u, 0, ATAN_TOLERANCE, 0},
+{ 897, 1105189691u, 1650862428u, 1061816101u, 1723201723u, 1073291771u, 1411647529u, 0, ATAN_TOLERANCE, 0},
+{ 898, 3239012814u, 2462163405u, 3218946201u, 3876535372u, 3220775415u, 1092893741u, 0, ATAN_TOLERANCE, 0},
+{ 899, 1084392886u, 495844137u, 1073721460u, 772777946u, 1073291329u, 222247607u, 0, ATAN_TOLERANCE, 0},
+{ 900, 1052415330u, 458757721u, 3245680321u, 3609892707u, 1052415330u, 458751459u, 0, ATAN_TOLERANCE, 0},
+{ 901, 3193282956u, 2533012202u, 1079980803u, 3592268374u, 3193282956u, 2533012201u, 0, ATAN_TOLERANCE, 0},
+{ 902, 3203364780u, 4108274117u, 1063045844u, 571992389u, 3203364780u, 4107609388u, 0, ATAN_TOLERANCE, 0},
+{ 903, 1090567271u, 3541110973u, 1096296754u, 3118427427u, 1073291763u, 2924714246u, 0, ATAN_TOLERANCE, 0},
+{ 904, 3193980043u, 1213941007u, 1105433735u, 2172963370u, 3193980043u, 1213941006u, 0, ATAN_TOLERANCE, 0},
+{ 905, 1096853359u, 272190288u, 1095452370u, 4026581530u, 1073291771u, 897967252u, 0, ATAN_TOLERANCE, 0},
+{ 906, 1095583909u, 2843638672u, 1100510986u, 3190536898u, 1073291771u, 240417192u, 0, ATAN_TOLERANCE, 0},
+{ 907, 1083757094u, 2014317727u, 3247389683u, 2428462015u, 1073291111u, 1032347836u, 0, ATAN_TOLERANCE, 0},
+{ 908, 1093976717u, 688442200u, 1047852515u, 3035186380u, 1073291770u, 2398529340u, 0, ATAN_TOLERANCE, 0},
+{ 909, 1076664212u, 1010095511u, 3221288076u, 405287991u, 1073218543u, 1579157249u, 0, ATAN_TOLERANCE, 0},
+{ 910, 3252294615u, 2983070435u, 1089546472u, 2907918480u, 3220775419u, 1411180698u, 0, ATAN_TOLERANCE, 0},
+{ 911, 1082988121u, 81928569u, 1056007286u, 2740556321u, 1073290644u, 3391630935u, 0, ATAN_TOLERANCE, 0},
+{ 912, 1041110867u, 2076689028u, 1081558619u, 3039159031u, 1041110867u, 2076689028u, 0, ATAN_TOLERANCE, 0},
+{ 913, 1047307438u, 1376882094u, 3211003208u, 1296286481u, 1047307438u, 1376882086u, 0, ATAN_TOLERANCE, 0},
+{ 914, 1080114314u, 744133164u, 3200943494u, 955832216u, 1073284167u, 545905631u, 0, ATAN_TOLERANCE, 0},
+{ 915, 3226290326u, 176522478u, 1069999908u, 2891249491u, 3220757517u, 953792288u, 0, ATAN_TOLERANCE, 0},
+{ 916, 1043564602u, 3685851715u, 3187829932u, 2363997529u, 1043564602u, 3685851715u, 0, ATAN_TOLERANCE, 0},
+{ 917, 1040244055u, 3974431579u, 1052505165u, 2589067816u, 1040244055u, 3974431579u, 0, ATAN_TOLERANCE, 0},
+{ 918, 3191496789u, 3819109588u, 1048561488u, 969143351u, 3191496789u, 3819109588u, 0, ATAN_TOLERANCE, 0},
+{ 919, 1072639397u, 4246896124u, 1104584799u, 1940097860u, 1072215921u, 2918165436u, 0, ATAN_TOLERANCE, 0},
+{ 920, 1048038468u, 2228686199u, 3220231833u, 777624847u, 1048038468u, 2228686181u, 0, ATAN_TOLERANCE, 0},
+{ 921, 3231467306u, 4189906558u, 3203004203u, 854242364u, 3220774839u, 4032438805u, 0, ATAN_TOLERANCE, 0},
+{ 922, 1103910407u, 4089051094u, 3227282692u, 2693170723u, 1073291771u, 1409017496u, 0, ATAN_TOLERANCE, 0},
+{ 923, 1045883607u, 1278581412u, 3239296746u, 1774588717u, 1045883607u, 1278581411u, 0, ATAN_TOLERANCE, 0},
+{ 924, 3222372686u, 1794845306u, 1104879344u, 4135865182u, 3220539858u, 4248673150u, 0, ATAN_TOLERANCE, 0},
+{ 925, 1106449055u, 754938390u, 1061291430u, 2010786993u, 1073291771u, 1412874493u, 0, ATAN_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 1072771439u, 2289580023u, 0, ATAN_TOLERANCE, 0},
+{ 927, 3231449194u, 567588900u, 3195452230u, 1421366017u, 3220774834u, 945795067u, 0, ATAN_TOLERANCE, 0},
+{ 928, 3225089755u, 2708717091u, 1071975971u, 1364590470u, 3220736549u, 2407476344u, 0, ATAN_TOLERANCE, 0},
+{ 929, 3252137283u, 3461956134u, 3207820115u, 1605709634u, 3220775419u, 1410919766u, 0, ATAN_TOLERANCE, 0},
+{ 930, 1065302996u, 1497124553u, 1051715442u, 916736957u, 1065302956u, 2901868158u, 0, ATAN_TOLERANCE, 0},
+{ 931, 1058468363u, 834914365u, 1064667143u, 2839166298u, 1058468363u, 818420201u, 0, ATAN_TOLERANCE, 0},
+{ 932, 1057279949u, 2139295776u, 1062816721u, 914592523u, 1057279949u, 2136218948u, 0, ATAN_TOLERANCE, 0},
+{ 933, 3189636931u, 851569132u, 1058503154u, 1399378677u, 3189636931u, 851569132u, 0, ATAN_TOLERANCE, 0},
+{ 934, 3233537697u, 3897202342u, 3245382590u, 246600375u, 3220775272u, 1543167911u, 0, ATAN_TOLERANCE, 0},
+{ 935, 3225460308u, 3620429520u, 1055627557u, 229305u, 3220743880u, 1522537798u, 0, ATAN_TOLERANCE, 0},
+{ 936, 1083958833u, 3641997865u, 3206673888u, 93720614u, 1073291184u, 310117365u, 0, ATAN_TOLERANCE, 0},
+{ 937, 3227808435u, 32766320u, 1062084905u, 3668443038u, 3220769009u, 1748628101u, 0, ATAN_TOLERANCE, 0},
+{ 938, 3223298996u, 2039713492u, 3248699388u, 1346210821u, 3220643553u, 1526559974u, 0, ATAN_TOLERANCE, 0},
+{ 939, 1093050016u, 1335820726u, 3191756860u, 1808427032u, 1073291769u, 3927597683u, 0, ATAN_TOLERANCE, 0},
+{ 940, 1061442763u, 650692001u, 1103515670u, 2253348763u, 1061442762u, 4211298986u, 0, ATAN_TOLERANCE, 0},
+{ 941, 3191395187u, 2372623300u, 3210185343u, 3200572848u, 3191395187u, 2372623300u, 0, ATAN_TOLERANCE, 0},
+{ 942, 1100796069u, 762317532u, 3194595095u, 3192607437u, 1073291771u, 1376490868u, 0, ATAN_TOLERANCE, 0},
+{ 943, 1062262701u, 217775356u, 3232827087u, 2969367386u, 1062262700u, 2842818152u, 0, ATAN_TOLERANCE, 0},
+{ 944, 1057172551u, 3621353969u, 1077994795u, 3873976266u, 1057172551u, 3618948239u, 0, ATAN_TOLERANCE, 0},
+{ 945, 1091301987u, 268372152u, 3221764390u, 3216978962u, 1073291766u, 3217095478u, 0, ATAN_TOLERANCE, 0},
+{ 946, 3246437611u, 142942404u, 1075322987u, 1746449109u, 3220775419u, 1285213958u, 0, ATAN_TOLERANCE, 0},
+{ 947, 1104006296u, 496534875u, 3254522293u, 2532372502u, 1073291771u, 1409250064u, 0, ATAN_TOLERANCE, 0},
+{ 948, 3250225541u, 2999955409u, 3222793392u, 1868977643u, 3220775419u, 1403626769u, 0, ATAN_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 1072964666u, 202373549u, 0, ATAN_TOLERANCE, 0},
+{ 950, 1068218799u, 73646871u, 3231442171u, 3711510104u, 1068217026u, 479221391u, 0, ATAN_TOLERANCE, 0},
+{ 951, 1090483524u, 218135177u, 3198908856u, 3082199105u, 1073291763u, 821836508u, 0, ATAN_TOLERANCE, 0},
+{ 952, 1068068480u, 1061628117u, 3248859043u, 86776158u, 1068067111u, 2464247744u, 0, ATAN_TOLERANCE, 0},
+{ 953, 3208484674u, 938869114u, 1087911145u, 2416710759u, 3208484674u, 372849960u, 0, ATAN_TOLERANCE, 0},
+{ 954, 1095576832u, 2970853959u, 3239543429u, 1887505029u, 1073291771u, 236074415u, 0, ATAN_TOLERANCE, 0},
+{ 955, 3237728787u, 1337895935u, 1076463812u, 1172733328u, 3220775410u, 546977720u, 0, ATAN_TOLERANCE, 0},
+{ 956, 1049139928u, 1469010822u, 3229583535u, 551399515u, 1049139928u, 1469010744u, 0, ATAN_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 1072922065u, 3238144722u, 0, ATAN_TOLERANCE, 0},
+{ 958, 3242138780u, 2976596113u, 3192137295u, 3033242648u, 3220775418u, 3499927600u, 0, ATAN_TOLERANCE, 0},
+{ 959, 1098698481u, 876810930u, 3197470945u, 2571587447u, 1073291771u, 1264666645u, 0, ATAN_TOLERANCE, 0},
+{ 960, 3241770810u, 4007797282u, 3225853845u, 4069319648u, 3220775418u, 3013522169u, 0, ATAN_TOLERANCE, 0},
+{ 961, 1047279982u, 3840538373u, 1043189552u, 3668774580u, 1047279982u, 3840538366u, 0, ATAN_TOLERANCE, 0},
+{ 962, 3217611704u, 200857661u, 3229758439u, 3359367736u, 3217591674u, 1542745806u, 0, ATAN_TOLERANCE, 0},
+{ 963, 3248797869u, 111868139u, 3227902082u, 2366064003u, 3220775419u, 1387845116u, 0, ATAN_TOLERANCE, 0},
+{ 964, 1044195166u, 3510904416u, 3222131653u, 3822770497u, 1044195166u, 3510904416u, 0, ATAN_TOLERANCE, 0},
+{ 965, 3242675715u, 789151814u, 1099269239u, 2958956055u, 3220775418u, 4234354237u, 0, ATAN_TOLERANCE, 0},
+{ 966, 1084679320u, 722163228u, 1105524559u, 1534462169u, 1073291413u, 2103282272u, 0, ATAN_TOLERANCE, 0},
+{ 967, 1046586062u, 2207037106u, 3208952465u, 1231254630u, 1046586062u, 2207037104u, 0, ATAN_TOLERANCE, 0},
+{ 968, 3197884060u, 3838689849u, 3198769679u, 1302617170u, 3197884060u, 3838689400u, 0, ATAN_TOLERANCE, 0},
+{ 969, 1085938906u, 2527556476u, 3240373426u, 124352692u, 1073291614u, 2021593024u, 0, ATAN_TOLERANCE, 0},
+{ 970, 3199540805u, 3502371499u, 1043411944u, 4190072016u, 3199540805u, 3502368360u, 0, ATAN_TOLERANCE, 0},
+{ 971, 1064676142u, 1798470077u, 3200116917u, 3421833729u, 1064676129u, 736153526u, 0, ATAN_TOLERANCE, 0},
+{ 972, 3193514956u, 3653237931u, 3204255012u, 3683870669u, 3193514956u, 3653237930u, 0, ATAN_TOLERANCE, 0},
+{ 973, 1053588582u, 376530104u, 1073853547u, 565755892u, 1053588582u, 376499284u, 0, ATAN_TOLERANCE, 0},
+{ 974, 3242503851u, 558292492u, 1051772749u, 4267873474u, 3220775418u, 4047410047u, 0, ATAN_TOLERANCE, 0},
+{ 975, 3224772709u, 509637100u, 3212030069u, 215050379u, 3220728061u, 2553280327u, 0, ATAN_TOLERANCE, 0},
+{ 976, 1092057101u, 3571665665u, 3188628584u, 757824767u, 1073291768u, 2586254000u, 0, ATAN_TOLERANCE, 0},
+{ 977, 3214799337u, 998858159u, 1063077962u, 436029885u, 3214798778u, 470120798u, 0, ATAN_TOLERANCE, 0},
+{ 978, 3205946965u, 996300405u, 3193842624u, 80548098u, 3205946965u, 979971726u, 0, ATAN_TOLERANCE, 0},
+{ 979, 3228848840u, 3876129407u, 3215332180u, 2226970413u, 3220772194u, 2914363116u, 0, ATAN_TOLERANCE, 0},
+{ 980, 3237608953u, 200013509u, 3224552716u, 414878724u, 3220775409u, 2061634836u, 0, ATAN_TOLERANCE, 0},
+{ 981, 3230617093u, 309319541u, 1048979765u, 1261662434u, 3220774372u, 2525024706u, 0, ATAN_TOLERANCE, 0},
+{ 982, 1089252639u, 4062255924u, 3224274128u, 4289485681u, 1073291753u, 2038737724u, 0, ATAN_TOLERANCE, 0},
+{ 983, 3236136084u, 1611969213u, 1053890378u, 3774617276u, 3220775393u, 415839685u, 0, ATAN_TOLERANCE, 0},
+{ 984, 1080412763u, 1752164782u, 3239587974u, 612223386u, 1073285756u, 1224181296u, 0, ATAN_TOLERANCE, 0},
+{ 985, 1041545782u, 2024044989u, 1074932678u, 3259111307u, 1041545782u, 2024044989u, 0, ATAN_TOLERANCE, 0},
+{ 986, 1053207518u, 2564965629u, 1093571065u, 169360454u, 1053207518u, 2564950092u, 0, ATAN_TOLERANCE, 0},
+{ 987, 1089599090u, 1860101737u, 3191222372u, 1676437468u, 1073291757u, 332418688u, 0, ATAN_TOLERANCE, 0},
+{ 988, 1059802968u, 588387057u, 3192103292u, 2495288012u, 1059802968u, 477147092u, 0, ATAN_TOLERANCE, 0},
+{ 989, 3193155705u, 659070058u, 1073095700u, 1393632068u, 3193155705u, 659070057u, 0, ATAN_TOLERANCE, 0},
+{ 990, 3217683263u, 4276187829u, 3217553330u, 1868253275u, 3217660522u, 22885475u, 0, ATAN_TOLERANCE, 0},
+{ 991, 3223220272u, 2085481575u, 3215994784u, 800910002u, 3220638407u, 1068937368u, 0, ATAN_TOLERANCE, 0},
+{ 992, 1056934836u, 1950570756u, 3200582211u, 941022151u, 1056934836u, 1947891957u, 0, ATAN_TOLERANCE, 0},
+{ 993, 1057530368u, 2075610870u, 3250142022u, 3605152103u, 1057530368u, 2070509097u, 0, ATAN_TOLERANCE, 0},
+{ 994, 3200839250u, 3792931748u, 3204857863u, 804393211u, 3200839250u, 3792911087u, 0, ATAN_TOLERANCE, 0},
+{ 995, 3253646370u, 3430071177u, 3226288311u, 3652522729u, 3220775419u, 1412661288u, 0, ATAN_TOLERANCE, 0},
+{ 996, 3201314702u, 236884699u, 3227874605u, 2193269825u, 3201314702u, 236862084u, 0, ATAN_TOLERANCE, 0},
+{ 997, 1064936593u, 2744231849u, 1046186036u, 771053722u, 1064936571u, 2938837843u, 0, ATAN_TOLERANCE, 0},
+{ 998, 1083996036u, 3000189819u, 1096500901u, 2057239777u, 1073291195u, 3362761430u, 0, ATAN_TOLERANCE, 0},
+{ 999, 1093835581u, 205759408u, 3244643377u, 2702292618u, 1073291770u, 2015396783u, 0, ATAN_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_ATAN_H multiple inclusion protection
+
+// EOF atan.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/atan2.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/atan2.c
new file mode 100644
index 0000000000..9799b56a1c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/atan2.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// atan2.c
+//
+// Test of atan2() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/atan2.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(atan2_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &atan2, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_DOUBLE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &atan2_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("atan2() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("atan2() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library atan2() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "atan2() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF atan2.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/atan2.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/atan2.h
new file mode 100644
index 0000000000..03aa595bd3
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/atan2.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_ATAN2_H
+#define CYGONCE_LIBM_ATAN2_H
+//===========================================================================
+//
+// atan2.h
+//
+// Test vectors for testing of atan2() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/atan2.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define ATAN2_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t atan2_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1077999148u, 2506787616u, 1090024059u, 3619148316u, 1060516776u, 3333805635u, 0, ATAN2_TOLERANCE, 0},
+{ 2, 3218153654u, 3176730980u, 1051524793u, 2993920299u, 3220775415u, 4052029953u, 0, ATAN2_TOLERANCE, 0},
+{ 3, 3239659803u, 2725707538u, 3232101343u, 2346810316u, 3220782531u, 1779867601u, 0, ATAN2_TOLERANCE, 0},
+{ 4, 1092554362u, 2088062470u, 3201242716u, 420891118u, 1073291771u, 1413786937u, 0, ATAN2_TOLERANCE, 0},
+{ 5, 3221200677u, 2636405208u, 1100049309u, 471635570u, 3193768732u, 1507839071u, 0, ATAN2_TOLERANCE, 0},
+{ 6, 1089363191u, 1746012320u, 1054478713u, 3333988501u, 1073291771u, 1413304009u, 0, ATAN2_TOLERANCE, 0},
+{ 7, 1047953160u, 183014794u, 3202039382u, 2016785810u, 1074333583u, 830538607u, 0, ATAN2_TOLERANCE, 0},
+{ 8, 3213486034u, 2688957927u, 1046089230u, 2709029994u, 3220775417u, 1364230657u, 0, ATAN2_TOLERANCE, 0},
+{ 9, 1058795730u, 624574473u, 1045840574u, 3473266330u, 1073291567u, 1591891568u, 0, ATAN2_TOLERANCE, 0},
+{ 10, 3204919842u, 1605286142u, 1068931671u, 4233776869u, 3208670066u, 3166828529u, 0, ATAN2_TOLERANCE, 0},
+{ 11, 1060343410u, 1857607719u, 3222889559u, 3417070006u, 1074340322u, 2934931366u, 0, ATAN2_TOLERANCE, 0},
+{ 12, 1103599987u, 3981151660u, 1088899021u, 1332651746u, 1073291708u, 833789888u, 0, ATAN2_TOLERANCE, 0},
+{ 13, 1085298022u, 3824988054u, 1066856791u, 2070129652u, 1073291765u, 3052119569u, 0, ATAN2_TOLERANCE, 0},
+{ 14, 3207559790u, 1372884064u, 1080833116u, 3229926662u, 3199327084u, 1658797856u, 0, ATAN2_TOLERANCE, 0},
+{ 15, 1093826501u, 3217805330u, 3191644264u, 2014578707u, 1073291771u, 1413754161u, 0, ATAN2_TOLERANCE, 0},
+{ 16, 1102287487u, 265058758u, 3239903247u, 1630600647u, 1073293288u, 2536055081u, 0, ATAN2_TOLERANCE, 0},
+{ 17, 1071124229u, 1946677669u, 3198462609u, 926009897u, 1073291773u, 202528659u, 0, ATAN2_TOLERANCE, 0},
+{ 18, 1072130299u, 2271884183u, 3203741999u, 2118617783u, 1073291800u, 1460654986u, 0, ATAN2_TOLERANCE, 0},
+{ 19, 3194849109u, 213658772u, 3249401130u, 314151656u, 3221823995u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 20, 3254112288u, 1564829925u, 3197817016u, 497230814u, 3220775419u, 1413754137u, 0, ATAN2_TOLERANCE, 0},
+{ 21, 3216262634u, 2075329122u, 3231746400u, 169900577u, 3221823975u, 3066300469u, 0, ATAN2_TOLERANCE, 0},
+{ 22, 1049848642u, 541549344u, 1096608669u, 3119070100u, 1025866913u, 476012722u, 0, ATAN2_TOLERANCE, 0},
+{ 23, 1085427055u, 567496114u, 1045286891u, 1969998540u, 1073291771u, 1413740793u, 0, ATAN2_TOLERANCE, 0},
+{ 24, 1060548195u, 1299369769u, 1049342524u, 4167404066u, 1073291146u, 519406859u, 0, ATAN2_TOLERANCE, 0},
+{ 25, 3208865645u, 3348930841u, 1078472138u, 358457347u, 3202985534u, 429824132u, 0, ATAN2_TOLERANCE, 0},
+{ 26, 1071069297u, 2192461366u, 1099527247u, 3184735642u, 1044197651u, 157929467u, 0, ATAN2_TOLERANCE, 0},
+{ 27, 1052861772u, 331696577u, 3189610016u, 793242270u, 1073292642u, 574335499u, 0, ATAN2_TOLERANCE, 0},
+{ 28, 3252528934u, 2322696981u, 1083791358u, 3020766674u, 3220775418u, 2037904225u, 0, ATAN2_TOLERANCE, 0},
+{ 29, 1044902177u, 252085215u, 3214426435u, 4139068910u, 1074340347u, 353869949u, 0, ATAN2_TOLERANCE, 0},
+{ 30, 3222505725u, 105589263u, 1056316170u, 261630827u, 3220775414u, 3448122542u, 0, ATAN2_TOLERANCE, 0},
+{ 31, 1107213408u, 428765703u, 3251828686u, 2009972239u, 1073452282u, 2384968155u, 0, ATAN2_TOLERANCE, 0},
+{ 32, 1098568019u, 3517376586u, 3240257920u, 3304487302u, 1073314265u, 1225245499u, 0, ATAN2_TOLERANCE, 0},
+{ 33, 3233537912u, 237004814u, 3237899261u, 3364008659u, 3221794005u, 2449967509u, 0, ATAN2_TOLERANCE, 0},
+{ 34, 3195247552u, 472004928u, 3226869477u, 1186387580u, 3221823995u, 1411895162u, 0, ATAN2_TOLERANCE, 0},
+{ 35, 1054226850u, 4085763910u, 1106394906u, 2684738273u, 1020493089u, 2638422367u, 0, ATAN2_TOLERANCE, 0},
+{ 36, 1057053639u, 2055490142u, 3231581370u, 3879040079u, 1074340347u, 1374947702u, 0, ATAN2_TOLERANCE, 0},
+{ 37, 3188976647u, 3725731239u, 1061652681u, 591292963u, 3199932056u, 1923516624u, 0, ATAN2_TOLERANCE, 0},
+{ 38, 3225014981u, 1147041027u, 3215417793u, 624695933u, 3220777273u, 3001432630u, 0, ATAN2_TOLERANCE, 0},
+{ 39, 3206052774u, 705725219u, 3238067573u, 1116238321u, 3221823995u, 1412243119u, 0, ATAN2_TOLERANCE, 0},
+{ 40, 3207367088u, 7287411u, 1045917232u, 116067742u, 3220775314u, 1019381704u, 0, ATAN2_TOLERANCE, 0},
+{ 41, 3240055222u, 3604989074u, 1066381836u, 545298780u, 3220775419u, 1277923777u, 0, ATAN2_TOLERANCE, 0},
+{ 42, 3219080936u, 1681476121u, 1060345752u, 3553822398u, 3220774777u, 3808345438u, 0, ATAN2_TOLERANCE, 0},
+{ 43, 1102831658u, 3410480388u, 1052460275u, 1660607230u, 1073291771u, 1413754121u, 0, ATAN2_TOLERANCE, 0},
+{ 44, 1089216869u, 1494984673u, 3196647153u, 287894723u, 1073291771u, 1413768676u, 0, ATAN2_TOLERANCE, 0},
+{ 45, 1054885127u, 644548665u, 1081948134u, 2442134629u, 1045549451u, 3020174776u, 0, ATAN2_TOLERANCE, 0},
+{ 46, 1087554095u, 2312530895u, 3221584595u, 3379665576u, 1073291917u, 3856099993u, 0, ATAN2_TOLERANCE, 0},
+{ 47, 1096085375u, 3018463866u, 1086226574u, 404012923u, 1073290279u, 1748157573u, 0, ATAN2_TOLERANCE, 0},
+{ 48, 1064733299u, 1710279345u, 3251401196u, 3528946000u, 1074340347u, 1413741153u, 0, ATAN2_TOLERANCE, 0},
+{ 49, 1061536351u, 2164450219u, 1083520023u, 3312018966u, 1050700637u, 377777497u, 0, ATAN2_TOLERANCE, 0},
+{ 50, 1057248676u, 2648986431u, 1050330591u, 1474376550u, 1073280985u, 3990294061u, 0, ATAN2_TOLERANCE, 0},
+{ 51, 3194422028u, 1839068700u, 1077406406u, 3013052171u, 3189688821u, 1967505573u, 0, ATAN2_TOLERANCE, 0},
+{ 52, 1046493630u, 772102380u, 3220729740u, 4219039958u, 1074340347u, 1369193237u, 0, ATAN2_TOLERANCE, 0},
+{ 53, 3229472221u, 3058618779u, 1046304788u, 3338676024u, 3220775419u, 1413496309u, 0, ATAN2_TOLERANCE, 0},
+{ 54, 1051172137u, 506286854u, 1094907481u, 2217000199u, 1028910280u, 474546229u, 0, ATAN2_TOLERANCE, 0},
+{ 55, 1082428310u, 1147428263u, 1065432625u, 3034786717u, 1073291757u, 3973879027u, 0, ATAN2_TOLERANCE, 0},
+{ 56, 1082016752u, 2844125311u, 1082985198u, 2561492677u, 1071562234u, 1135817425u, 0, ATAN2_TOLERANCE, 0},
+{ 57, 3211536916u, 704542600u, 3222902057u, 2762779203u, 3221823713u, 2124571212u, 0, ATAN2_TOLERANCE, 0},
+{ 58, 3199680614u, 184131949u, 3249723525u, 1667366082u, 3221823995u, 1413754126u, 0, ATAN2_TOLERANCE, 0},
+{ 59, 3223609598u, 3904224140u, 1067056698u, 2942159914u, 3220772807u, 557213311u, 0, ATAN2_TOLERANCE, 0},
+{ 60, 1100636863u, 426114282u, 3209056785u, 1083606355u, 1073291771u, 1413781856u, 0, ATAN2_TOLERANCE, 0},
+{ 61, 1106165945u, 3774123863u, 1106787580u, 2722107965u, 1071781660u, 855449165u, 0, ATAN2_TOLERANCE, 0},
+{ 62, 1088005092u, 1377734762u, 1104232051u, 2377063483u, 1056426594u, 575941403u, 0, ATAN2_TOLERANCE, 0},
+{ 63, 1069380559u, 1029739074u, 1105467109u, 3062201018u, 1036481790u, 348598352u, 0, ATAN2_TOLERANCE, 0},
+{ 64, 3234741597u, 773857656u, 3214251949u, 335833884u, 3220775420u, 3252379851u, 0, ATAN2_TOLERANCE, 0},
+{ 65, 3203224610u, 1473865960u, 1103073830u, 4000427507u, 3172842030u, 737633450u, 0, ATAN2_TOLERANCE, 0},
+{ 66, 1103185231u, 4242092620u, 1067009473u, 14539161u, 1073291771u, 1413562337u, 0, ATAN2_TOLERANCE, 0},
+{ 67, 3192516074u, 1732245037u, 1101371955u, 1533536108u, 3163763824u, 3335080682u, 0, ATAN2_TOLERANCE, 0},
+{ 68, 3249153995u, 1833841275u, 1099430098u, 4144145552u, 3220539236u, 1047035747u, 0, ATAN2_TOLERANCE, 0},
+{ 69, 3244270463u, 935007012u, 3188865420u, 604442938u, 3220775419u, 1413754137u, 0, ATAN2_TOLERANCE, 0},
+{ 70, 3206903253u, 2211464602u, 1046255144u, 1635910526u, 3220775248u, 3541319657u, 0, ATAN2_TOLERANCE, 0},
+{ 71, 1077871417u, 2549219008u, 3231633258u, 3733639385u, 1074332102u, 862538429u, 0, ATAN2_TOLERANCE, 0},
+{ 72, 1082095089u, 1819374372u, 3202219056u, 2617077637u, 1073291771u, 1477715401u, 0, ATAN2_TOLERANCE, 0},
+{ 73, 1094345280u, 546465680u, 1048653554u, 532401530u, 1073291771u, 1413753803u, 0, ATAN2_TOLERANCE, 0},
+{ 74, 1044571091u, 2759019783u, 3221570188u, 3554409630u, 1074340347u, 1406300672u, 0, ATAN2_TOLERANCE, 0},
+{ 75, 3212931282u, 2527221960u, 1099107978u, 2696971136u, 3186444617u, 2240666822u, 0, ATAN2_TOLERANCE, 0},
+{ 76, 1097158000u, 173134582u, 1087299442u, 2877794600u, 1073290287u, 1237501481u, 0, ATAN2_TOLERANCE, 0},
+{ 77, 1086400474u, 547642046u, 3197285510u, 3521286127u, 1073291771u, 1413897047u, 0, ATAN2_TOLERANCE, 0},
+{ 78, 1074860702u, 1231582831u, 1090971734u, 1653446832u, 1056430437u, 2142332257u, 0, ATAN2_TOLERANCE, 0},
+{ 79, 1061342535u, 3762182190u, 3252967851u, 2615360375u, 1074340347u, 1413753663u, 0, ATAN2_TOLERANCE, 0},
+{ 80, 3200834423u, 2588067350u, 3206610957u, 3551059728u, 3221812019u, 1159724914u, 0, ATAN2_TOLERANCE, 0},
+{ 81, 3206978856u, 845263327u, 1073415902u, 1749010288u, 3206202985u, 1543004313u, 0, ATAN2_TOLERANCE, 0},
+{ 82, 3205576370u, 3092685191u, 3190678390u, 2872219490u, 3220775474u, 3829350416u, 0, ATAN2_TOLERANCE, 0},
+{ 83, 3218315055u, 4107255722u, 3205337291u, 3069068345u, 3220775612u, 2162833348u, 0, ATAN2_TOLERANCE, 0},
+{ 84, 3243990857u, 2294867524u, 3216653996u, 2860384670u, 3220775419u, 1478098953u, 0, ATAN2_TOLERANCE, 0},
+{ 85, 3193326350u, 2265437201u, 3240198679u, 1234948614u, 3221823995u, 1413754055u, 0, ATAN2_TOLERANCE, 0},
+{ 86, 3216359929u, 1186945904u, 3251167793u, 1896750851u, 3221823995u, 1413524923u, 0, ATAN2_TOLERANCE, 0},
+{ 87, 1081575478u, 3686084548u, 1079286273u, 3309277689u, 1073065835u, 1428060798u, 0, ATAN2_TOLERANCE, 0},
+{ 88, 3223476240u, 3006860614u, 3231412671u, 2504194724u, 3221821257u, 2386162209u, 0, ATAN2_TOLERANCE, 0},
+{ 89, 3236149260u, 1948717780u, 1048317852u, 3791803982u, 3220775419u, 1413742479u, 0, ATAN2_TOLERANCE, 0},
+{ 90, 1064345015u, 4272034420u, 3192982124u, 1526175922u, 1073291775u, 1852788729u, 0, ATAN2_TOLERANCE, 0},
+{ 91, 3245817826u, 4108948538u, 1104691287u, 640541190u, 3213798660u, 2452948390u, 0, ATAN2_TOLERANCE, 0},
+{ 92, 3207257417u, 3259274853u, 1082507103u, 3677038020u, 3197354937u, 308479596u, 0, ATAN2_TOLERANCE, 0},
+{ 93, 1083132498u, 3781708548u, 1096584871u, 1207386447u, 1059162114u, 2426041278u, 0, ATAN2_TOLERANCE, 0},
+{ 94, 3188695272u, 3011191657u, 1103798670u, 1096124830u, 3157459107u, 1210059648u, 0, ATAN2_TOLERANCE, 0},
+{ 95, 1063235023u, 2540404725u, 3240157452u, 4122845725u, 1074340347u, 1405882205u, 0, ATAN2_TOLERANCE, 0},
+{ 96, 1083643710u, 311336721u, 3214382367u, 4212533768u, 1073291787u, 2877164985u, 0, ATAN2_TOLERANCE, 0},
+{ 97, 1051139427u, 1769686293u, 3240200923u, 3538602249u, 1074340347u, 1413751438u, 0, ATAN2_TOLERANCE, 0},
+{ 98, 1078227549u, 508056696u, 1103793878u, 776520138u, 1047044850u, 2730590439u, 0, ATAN2_TOLERANCE, 0},
+{ 99, 1102910577u, 4064962760u, 1077424413u, 819766631u, 1073291771u, 1190439791u, 0, ATAN2_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 1074329532u, 3989379092u, 0, ATAN2_TOLERANCE, 0},
+{ 101, 1082295059u, 2514398118u, 1076579751u, 870169764u, 1073267610u, 3785540369u, 0, ATAN2_TOLERANCE, 0},
+{ 102, 3246851392u, 1190259653u, 1069112254u, 3417249840u, 3220775419u, 1404513616u, 0, ATAN2_TOLERANCE, 0},
+{ 103, 3193663083u, 3467757357u, 3215075200u, 2168175352u, 3221823994u, 4086286991u, 0, ATAN2_TOLERANCE, 0},
+{ 104, 3239643135u, 1508888184u, 1060430241u, 3524949092u, 3220775419u, 1410255195u, 0, ATAN2_TOLERANCE, 0},
+{ 105, 3197412883u, 166402802u, 3237198975u, 3572369260u, 3221823995u, 1413745566u, 0, ATAN2_TOLERANCE, 0},
+{ 106, 1081866822u, 2441536203u, 3202753937u, 3658194573u, 1073291771u, 1519999247u, 0, ATAN2_TOLERANCE, 0},
+{ 107, 1062392908u, 2479742828u, 1062342831u, 4214154303u, 1072286622u, 2053442458u, 0, ATAN2_TOLERANCE, 0},
+{ 108, 1082396794u, 426896765u, 1066474375u, 2201754442u, 1073291744u, 192894795u, 0, ATAN2_TOLERANCE, 0},
+{ 109, 3195629021u, 2055773734u, 3239267288u, 291396537u, 3221823995u, 1413753462u, 0, ATAN2_TOLERANCE, 0},
+{ 110, 3236968033u, 874125203u, 3210508124u, 4091098764u, 3220775419u, 1531585924u, 0, ATAN2_TOLERANCE, 0},
+{ 111, 1065716026u, 120488169u, 3241241441u, 1985269424u, 1074340347u, 1393012109u, 0, ATAN2_TOLERANCE, 0},
+{ 112, 3206539410u, 2243036871u, 3243941101u, 740033495u, 3221823995u, 1413714848u, 0, ATAN2_TOLERANCE, 0},
+{ 113, 3209424906u, 1176656356u, 1074261978u, 3588756231u, 3207769238u, 3405578258u, 0, ATAN2_TOLERANCE, 0},
+{ 114, 3252816791u, 3037249392u, 1061635587u, 1173102190u, 3220775419u, 1413752816u, 0, ATAN2_TOLERANCE, 0},
+{ 115, 3237209581u, 2882725208u, 1071440059u, 69225090u, 3220775413u, 2250709746u, 0, ATAN2_TOLERANCE, 0},
+{ 116, 3212663474u, 272319256u, 1072073912u, 2493997123u, 3213153234u, 3944566878u, 0, ATAN2_TOLERANCE, 0},
+{ 117, 1057720186u, 188610379u, 3232757923u, 2209647371u, 1074340347u, 1384861709u, 0, ATAN2_TOLERANCE, 0},
+{ 118, 3236758517u, 1990439193u, 1078073146u, 622849962u, 3220774780u, 3778488872u, 0, ATAN2_TOLERANCE, 0},
+{ 119, 1057135741u, 756052458u, 1081649113u, 2247475162u, 1048061879u, 2604201297u, 0, ATAN2_TOLERANCE, 0},
+{ 120, 1061623064u, 3878055211u, 3222407050u, 2979438623u, 1074340265u, 1685661745u, 0, ATAN2_TOLERANCE, 0},
+{ 121, 3195290997u, 2676398686u, 1105124431u, 3631096636u, 3162834191u, 1491700165u, 0, ATAN2_TOLERANCE, 0},
+{ 122, 1065079390u, 1697791764u, 3198136112u, 2299842819u, 1073291844u, 921212635u, 0, ATAN2_TOLERANCE, 0},
+{ 123, 1078084768u, 1931502677u, 3215264397u, 3016456382u, 1073292950u, 3329090447u, 0, ATAN2_TOLERANCE, 0},
+{ 124, 1072253426u, 343404215u, 1061072607u, 4266232536u, 1073291150u, 501359091u, 0, ATAN2_TOLERANCE, 0},
+{ 125, 3241230836u, 4140316002u, 1082896196u, 868256971u, 3220774597u, 4214455842u, 0, ATAN2_TOLERANCE, 0},
+{ 126, 1075422810u, 1864139509u, 3187675097u, 3084482407u, 1073291771u, 1414082445u, 0, ATAN2_TOLERANCE, 0},
+{ 127, 3220191323u, 2427162817u, 3234748208u, 2715105792u, 3221823961u, 492279224u, 0, ATAN2_TOLERANCE, 0},
+{ 128, 1064600512u, 3943389284u, 1046724025u, 3626825684u, 1073291763u, 2709355216u, 0, ATAN2_TOLERANCE, 0},
+{ 129, 1045423002u, 967350972u, 1093012318u, 448002663u, 1024927028u, 3174699925u, 0, ATAN2_TOLERANCE, 0},
+{ 130, 3251845859u, 105058217u, 1069733884u, 171786224u, 3220775419u, 1413240381u, 0, ATAN2_TOLERANCE, 0},
+{ 131, 3189614508u, 2863482262u, 3204997271u, 877784425u, 3221823975u, 3715901097u, 0, ATAN2_TOLERANCE, 0},
+{ 132, 3202629313u, 2801782962u, 3213604117u, 762347195u, 3221823621u, 954825115u, 0, ATAN2_TOLERANCE, 0},
+{ 133, 3233486727u, 2317950339u, 3246333414u, 2135700283u, 3221823883u, 3803937142u, 0, ATAN2_TOLERANCE, 0},
+{ 134, 1056516397u, 4171919805u, 1082858682u, 2180920863u, 1046327908u, 2131334968u, 0, ATAN2_TOLERANCE, 0},
+{ 135, 3220149084u, 1918836931u, 1083603224u, 3137821660u, 3209067280u, 2184469635u, 0, ATAN2_TOLERANCE, 0},
+{ 136, 1103902874u, 3456203663u, 3235600523u, 2335688936u, 1073291802u, 1446271064u, 0, ATAN2_TOLERANCE, 0},
+{ 137, 1042279322u, 4170235262u, 1051824459u, 521583737u, 1063064177u, 4271069553u, 0, ATAN2_TOLERANCE, 0},
+{ 138, 1081348303u, 1296623194u, 3250673860u, 2442872540u, 1074340347u, 171714992u, 0, ATAN2_TOLERANCE, 0},
+{ 139, 1061684277u, 289979405u, 1049514449u, 3865737145u, 1073291448u, 606986359u, 0, ATAN2_TOLERANCE, 0},
+{ 140, 1075298944u, 3699090239u, 1054539840u, 3259249360u, 1073291770u, 827852710u, 0, ATAN2_TOLERANCE, 0},
+{ 141, 1096418100u, 1619819023u, 1045993352u, 1022642459u, 1073291771u, 1413754121u, 0, ATAN2_TOLERANCE, 0},
+{ 142, 1081433004u, 19455098u, 3229182089u, 2096003654u, 1073973865u, 4157892710u, 0, ATAN2_TOLERANCE, 0},
+{ 143, 1076297936u, 3803689997u, 1071630912u, 2263729518u, 1073246514u, 2513688842u, 0, ATAN2_TOLERANCE, 0},
+{ 144, 1101357261u, 2816837387u, 1063422305u, 2597606398u, 1073291771u, 1413697311u, 0, ATAN2_TOLERANCE, 0},
+{ 145, 1069100169u, 3680967506u, 1040201163u, 179224723u, 1073291771u, 1392147632u, 0, ATAN2_TOLERANCE, 0},
+{ 146, 3188629767u, 978126928u, 1101553990u, 4047893399u, 3159628256u, 3479115227u, 0, ATAN2_TOLERANCE, 0},
+{ 147, 3222322045u, 4059818629u, 1042678728u, 3640293589u, 3220775419u, 1410994916u, 0, ATAN2_TOLERANCE, 0},
+{ 148, 3248464040u, 3383497159u, 1070002807u, 1527313008u, 3220775419u, 1407667849u, 0, ATAN2_TOLERANCE, 0},
+{ 149, 3202707679u, 2599946514u, 1104170406u, 2738675352u, 3171224256u, 3042081445u, 0, ATAN2_TOLERANCE, 0},
+{ 150, 1105232623u, 3616571377u, 1060859316u, 1130603218u, 1073291771u, 1413753286u, 0, ATAN2_TOLERANCE, 0},
+{ 151, 1076028796u, 3859211180u, 1067940450u, 1744531824u, 1073286682u, 1089370823u, 0, ATAN2_TOLERANCE, 0},
+{ 152, 1042831340u, 1958025850u, 3236511256u, 2472176453u, 1074340347u, 1413754013u, 0, ATAN2_TOLERANCE, 0},
+{ 153, 3233107089u, 182132862u, 3250520938u, 3924356991u, 3221823989u, 3586265324u, 0, ATAN2_TOLERANCE, 0},
+{ 154, 3230501884u, 35632886u, 3209806504u, 1453402523u, 3220775420u, 2282135818u, 0, ATAN2_TOLERANCE, 0},
+{ 155, 1083522102u, 743225214u, 3202890678u, 142917400u, 1073291771u, 1452045876u, 0, ATAN2_TOLERANCE, 0},
+{ 156, 1080684976u, 1472665012u, 3203138231u, 256588219u, 1073291771u, 1703571112u, 0, ATAN2_TOLERANCE, 0},
+{ 157, 1094982162u, 1062927000u, 1061134072u, 931677439u, 1073291771u, 1412929411u, 0, ATAN2_TOLERANCE, 0},
+{ 158, 1058377732u, 2320910576u, 1055663370u, 288059864u, 1073122183u, 140532146u, 0, ATAN2_TOLERANCE, 0},
+{ 159, 1078958093u, 1448349062u, 3199478070u, 3454027134u, 1073291771u, 1499402253u, 0, ATAN2_TOLERANCE, 0},
+{ 160, 3237458798u, 4215445172u, 3196654963u, 2231888973u, 3220775419u, 1413762806u, 0, ATAN2_TOLERANCE, 0},
+{ 161, 3246632231u, 40413554u, 3232578253u, 983832844u, 3220775514u, 1729092407u, 0, ATAN2_TOLERANCE, 0},
+{ 162, 3223721534u, 3995725873u, 1050082319u, 777231627u, 3220775419u, 1274081208u, 0, ATAN2_TOLERANCE, 0},
+{ 163, 1040986626u, 672789828u, 3253385962u, 2982787335u, 1074340347u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 164, 1068390875u, 2075971825u, 1070166500u, 4034633931u, 1070763061u, 223510141u, 0, ATAN2_TOLERANCE, 0},
+{ 165, 3210046177u, 1018222907u, 3244621407u, 3090050495u, 3221823995u, 1413486700u, 0, ATAN2_TOLERANCE, 0},
+{ 166, 1067680885u, 937732557u, 3200798890u, 2557898276u, 1073291851u, 263621047u, 0, ATAN2_TOLERANCE, 0},
+{ 167, 1078342316u, 130346162u, 3223590310u, 275568693u, 1073525032u, 1065629369u, 0, ATAN2_TOLERANCE, 0},
+{ 168, 1042898869u, 3807416441u, 1075961161u, 3706820266u, 1039579594u, 530920292u, 0, ATAN2_TOLERANCE, 0},
+{ 169, 3216099005u, 1710131411u, 1078123323u, 1900790503u, 3210619589u, 3844263673u, 0, ATAN2_TOLERANCE, 0},
+{ 170, 3238819361u, 3420420033u, 3210844787u, 588423066u, 3220775419u, 1455260758u, 0, ATAN2_TOLERANCE, 0},
+{ 171, 1049684114u, 1160162008u, 3246307879u, 4265764460u, 1074340347u, 1413754119u, 0, ATAN2_TOLERANCE, 0},
+{ 172, 1102543434u, 366653268u, 3188814424u, 466059202u, 1073291771u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 173, 3226627739u, 1325936170u, 3221436876u, 680097612u, 3220809586u, 1181173116u, 0, ATAN2_TOLERANCE, 0},
+{ 174, 3240391116u, 1827735934u, 3200554324u, 2875599271u, 3220775419u, 1413770632u, 0, ATAN2_TOLERANCE, 0},
+{ 175, 3191030402u, 3117037091u, 3239246636u, 15838845u, 3221823995u, 1413754104u, 0, ATAN2_TOLERANCE, 0},
+{ 176, 1051974004u, 749718883u, 3223587064u, 1523766569u, 1074340347u, 1147805547u, 0, ATAN2_TOLERANCE, 0},
+{ 177, 1044833651u, 1966536294u, 3250158026u, 699164258u, 1074340347u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 178, 1098048435u, 3759049394u, 1106085272u, 1183789499u, 1064597908u, 3248929885u, 0, ATAN2_TOLERANCE, 0},
+{ 179, 1081201623u, 1970107747u, 1095245453u, 2308233883u, 1058514691u, 93854393u, 0, ATAN2_TOLERANCE, 0},
+{ 180, 1084756444u, 1491017852u, 1041444355u, 1723375725u, 1073291771u, 1413752504u, 0, ATAN2_TOLERANCE, 0},
+{ 181, 3216630070u, 1141349287u, 1097465301u, 3403438584u, 3191856322u, 2454091642u, 0, ATAN2_TOLERANCE, 0},
+{ 182, 3230571908u, 1711085243u, 3250239076u, 1377484108u, 3221823994u, 786236647u, 0, ATAN2_TOLERANCE, 0},
+{ 183, 1098385019u, 2880275004u, 1084039594u, 1611394950u, 1073291693u, 3122589465u, 0, ATAN2_TOLERANCE, 0},
+{ 184, 3234221435u, 2626629370u, 1063771493u, 1499080813u, 3220775419u, 264803512u, 0, ATAN2_TOLERANCE, 0},
+{ 185, 1055231263u, 3936262414u, 1103919063u, 3175668759u, 1023949209u, 2552938589u, 0, ATAN2_TOLERANCE, 0},
+{ 186, 3207981719u, 1270950554u, 3194616071u, 3680565379u, 3220775571u, 86427973u, 0, ATAN2_TOLERANCE, 0},
+{ 187, 3208148223u, 1066985223u, 3221613219u, 4089383168u, 3221823923u, 3911059063u, 0, ATAN2_TOLERANCE, 0},
+{ 188, 3217058839u, 4017329311u, 3208334452u, 1667591498u, 3220778823u, 3018255129u, 0, ATAN2_TOLERANCE, 0},
+{ 189, 1088164157u, 3154656624u, 1061894279u, 3886344038u, 1073291771u, 1283584478u, 0, ATAN2_TOLERANCE, 0},
+{ 190, 1050652945u, 977586119u, 3209762784u, 953839852u, 1074340110u, 49491821u, 0, ATAN2_TOLERANCE, 0},
+{ 191, 1104965247u, 143071571u, 3206165386u, 913097445u, 1073291771u, 1413754372u, 0, ATAN2_TOLERANCE, 0},
+{ 192, 3190565456u, 1371169579u, 1057079837u, 2594818628u, 3206111337u, 3190732180u, 0, ATAN2_TOLERANCE, 0},
+{ 193, 3251793336u, 2259342224u, 3217432469u, 1824221478u, 3220775419u, 1414383540u, 0, ATAN2_TOLERANCE, 0},
+{ 194, 3246834775u, 1576604497u, 1079368611u, 185078728u, 3220775417u, 1756718867u, 0, ATAN2_TOLERANCE, 0},
+{ 195, 3221679427u, 444800035u, 3243343143u, 1734989302u, 3221823995u, 6147356u, 0, ATAN2_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1073291771u, 1408585582u, 0, ATAN2_TOLERANCE, 0},
+{ 197, 3234695968u, 1941318385u, 1045807374u, 792193370u, 3220775419u, 1413748104u, 0, ATAN2_TOLERANCE, 0},
+{ 198, 3238299666u, 1299392207u, 3212131720u, 3205732280u, 3220775419u, 1552605650u, 0, ATAN2_TOLERANCE, 0},
+{ 199, 1098698804u, 3035093505u, 1052187689u, 3287702190u, 1073291771u, 1413753931u, 0, ATAN2_TOLERANCE, 0},
+{ 200, 3246676260u, 2160225215u, 1102624859u, 836655570u, 3216654218u, 2665088407u, 0, ATAN2_TOLERANCE, 0},
+{ 201, 1096723626u, 3360816360u, 3246176356u, 172860634u, 1074203548u, 1093101691u, 0, ATAN2_TOLERANCE, 0},
+{ 202, 1070995788u, 146831910u, 1051558014u, 2340722078u, 1073291768u, 2831089077u, 0, ATAN2_TOLERANCE, 0},
+{ 203, 3230416351u, 1603798153u, 3207725532u, 1099413093u, 3220775419u, 2783017523u, 0, ATAN2_TOLERANCE, 0},
+{ 204, 3246678378u, 2429340443u, 3190303581u, 3223770005u, 3220775419u, 1413754137u, 0, ATAN2_TOLERANCE, 0},
+{ 205, 1075882959u, 955542166u, 3230415151u, 275583938u, 1074335508u, 2461266247u, 0, ATAN2_TOLERANCE, 0},
+{ 206, 1092971882u, 513397822u, 1090646554u, 2089321329u, 1073075348u, 3825695664u, 0, ATAN2_TOLERANCE, 0},
+{ 207, 3193169876u, 2782073372u, 1046063872u, 4023829068u, 3219463075u, 3544171608u, 0, ATAN2_TOLERANCE, 0},
+{ 208, 1098564822u, 3242223094u, 3194111199u, 4264674108u, 1073291771u, 1413754142u, 0, ATAN2_TOLERANCE, 0},
+{ 209, 3238510821u, 3506346169u, 1047020885u, 1742757458u, 3220775419u, 1413753090u, 0, ATAN2_TOLERANCE, 0},
+{ 210, 3192664477u, 1265459564u, 3193450280u, 3650514880u, 3221547303u, 87902914u, 0, ATAN2_TOLERANCE, 0},
+{ 211, 1081755890u, 1525260440u, 3235452527u, 2612331392u, 1074331765u, 569600306u, 0, ATAN2_TOLERANCE, 0},
+{ 212, 3248668920u, 1263613754u, 3219096387u, 635677201u, 3220775419u, 1427849851u, 0, ATAN2_TOLERANCE, 0},
+{ 213, 3206272087u, 4140947288u, 3200792376u, 2013265346u, 3220803925u, 1098100543u, 0, ATAN2_TOLERANCE, 0},
+{ 214, 3249974392u, 1912759945u, 3237045253u, 1351396825u, 3220775615u, 2924037437u, 0, ATAN2_TOLERANCE, 0},
+{ 215, 3248205162u, 1001433078u, 3206926643u, 2741676659u, 3220775419u, 1413760594u, 0, ATAN2_TOLERANCE, 0},
+{ 216, 1080923606u, 1088945233u, 1085095743u, 3986114865u, 1068509660u, 2200288765u, 0, ATAN2_TOLERANCE, 0},
+{ 217, 3215734057u, 831239754u, 1099828675u, 3071308141u, 3188590794u, 2538532254u, 0, ATAN2_TOLERANCE, 0},
+{ 218, 3225834497u, 3473592372u, 1102759382u, 1309576357u, 3195711492u, 1207470557u, 0, ATAN2_TOLERANCE, 0},
+{ 219, 3251186706u, 2042340367u, 1091945628u, 2062772374u, 3220774976u, 2444948188u, 0, ATAN2_TOLERANCE, 0},
+{ 220, 3194765687u, 1840632537u, 1096533424u, 807510337u, 3170912079u, 2161799950u, 0, ATAN2_TOLERANCE, 0},
+{ 221, 3231451722u, 144814872u, 3212698915u, 2282965697u, 3220775423u, 2550216294u, 0, ATAN2_TOLERANCE, 0},
+{ 222, 1071236430u, 2552499583u, 3229111426u, 1470130815u, 1074339805u, 56671396u, 0, ATAN2_TOLERANCE, 0},
+{ 223, 3243093065u, 2858583811u, 1089760910u, 6360994u, 3220752859u, 3608022711u, 0, ATAN2_TOLERANCE, 0},
+{ 224, 3198264929u, 1614537194u, 1075198900u, 4088705365u, 3195627327u, 334480517u, 0, ATAN2_TOLERANCE, 0},
+{ 225, 3250939070u, 3545570051u, 1065221325u, 1629217700u, 3220775419u, 1413708205u, 0, ATAN2_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 1074340323u, 4069514407u, 0, ATAN2_TOLERANCE, 0},
+{ 227, 3196802686u, 2406734491u, 1042055360u, 89226663u, 3220766878u, 1711852653u, 0, ATAN2_TOLERANCE, 0},
+{ 228, 3195751081u, 1618759139u, 3194723421u, 3888234802u, 3221245977u, 1315689607u, 0, ATAN2_TOLERANCE, 0},
+{ 229, 1055357248u, 3590035633u, 3212424262u, 2892456615u, 1074339412u, 819341061u, 0, ATAN2_TOLERANCE, 0},
+{ 230, 3189943060u, 2431246964u, 3241512456u, 183850734u, 3221823995u, 1413754133u, 0, ATAN2_TOLERANCE, 0},
+{ 231, 1089501101u, 3088319870u, 3211544311u, 862225364u, 1073291771u, 1644226526u, 0, ATAN2_TOLERANCE, 0},
+{ 232, 3235294664u, 3495352775u, 1058576726u, 596957268u, 3220775419u, 1395556462u, 0, ATAN2_TOLERANCE, 0},
+{ 233, 1046553348u, 1839214511u, 3205004060u, 1923240983u, 1074339988u, 3977110612u, 0, ATAN2_TOLERANCE, 0},
+{ 234, 1058073864u, 739619702u, 3223356436u, 2689885273u, 1074340343u, 987307560u, 0, ATAN2_TOLERANCE, 0},
+{ 235, 3200324971u, 2143376228u, 1098306332u, 3760236188u, 3174560640u, 1856766382u, 0, ATAN2_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 1055995824u, 3605199018u, 0, ATAN2_TOLERANCE, 0},
+{ 237, 3214165989u, 2493598049u, 3194927008u, 1689107592u, 3220775422u, 1539133503u, 0, ATAN2_TOLERANCE, 0},
+{ 238, 3189989959u, 1578976988u, 1066368383u, 2117279163u, 3196301980u, 310302479u, 0, ATAN2_TOLERANCE, 0},
+{ 239, 3222988111u, 3425290087u, 1098487295u, 1263412017u, 3197161903u, 3540713705u, 0, ATAN2_TOLERANCE, 0},
+{ 240, 3208432764u, 3635396812u, 1070999426u, 3965655689u, 3210005619u, 3640098698u, 0, ATAN2_TOLERANCE, 0},
+{ 241, 1060196346u, 2183973116u, 1101098363u, 1118613350u, 1031784915u, 3988125478u, 0, ATAN2_TOLERANCE, 0},
+{ 242, 3221946089u, 199516350u, 1078368488u, 164621458u, 3216184372u, 556023485u, 0, ATAN2_TOLERANCE, 0},
+{ 243, 3187706018u, 3570940805u, 3230316437u, 3596080877u, 3221823995u, 1413752869u, 0, ATAN2_TOLERANCE, 0},
+{ 244, 3208209565u, 980880313u, 1079833442u, 884465057u, 3201044813u, 1604476516u, 0, ATAN2_TOLERANCE, 0},
+{ 245, 1099977124u, 2558179220u, 1052873711u, 1233598120u, 1073291771u, 1413753998u, 0, ATAN2_TOLERANCE, 0},
+{ 246, 1047115221u, 1909994277u, 1085015978u, 2991527452u, 1034770959u, 240841472u, 0, ATAN2_TOLERANCE, 0},
+{ 247, 1060855260u, 1680290941u, 1074309900u, 2943870846u, 1059176465u, 271458589u, 0, ATAN2_TOLERANCE, 0},
+{ 248, 1059496132u, 1451927357u, 3228615456u, 1502585517u, 1074340346u, 4259233439u, 0, ATAN2_TOLERANCE, 0},
+{ 249, 3236211951u, 751136990u, 3230392165u, 3493275472u, 3220797503u, 1340620628u, 0, ATAN2_TOLERANCE, 0},
+{ 250, 1098365967u, 1209623292u, 3238056647u, 979495322u, 1073297577u, 3650346549u, 0, ATAN2_TOLERANCE, 0},
+{ 251, 3250424296u, 1717672108u, 1048120593u, 531240316u, 3220775419u, 1413754135u, 0, ATAN2_TOLERANCE, 0},
+{ 252, 1054174923u, 3548721654u, 1086112947u, 3391817224u, 1040701220u, 3078453447u, 0, ATAN2_TOLERANCE, 0},
+{ 253, 1077836851u, 2758195125u, 1100880260u, 2028440924u, 1049638005u, 306477302u, 0, ATAN2_TOLERANCE, 0},
+{ 254, 1084223893u, 2750123373u, 3232200256u, 1086294931u, 1074026983u, 3357817851u, 0, ATAN2_TOLERANCE, 0},
+{ 255, 1043958672u, 2986160931u, 1076097908u, 2540046258u, 1040481408u, 1957853232u, 0, ATAN2_TOLERANCE, 0},
+{ 256, 3235476602u, 451471221u, 1064816262u, 4187644495u, 3220775419u, 409538388u, 0, ATAN2_TOLERANCE, 0},
+{ 257, 1099460228u, 2439500162u, 1065280276u, 1979490284u, 1073291771u, 1413091321u, 0, ATAN2_TOLERANCE, 0},
+{ 258, 1040415832u, 2283342035u, 1078398157u, 1345997553u, 1034620223u, 4280831376u, 0, ATAN2_TOLERANCE, 0},
+{ 259, 3213249348u, 179066662u, 1103272172u, 1217337578u, 3182636588u, 2434396909u, 0, ATAN2_TOLERANCE, 0},
+{ 260, 3211562377u, 3779303391u, 3210023352u, 3115946280u, 3221146045u, 2893060263u, 0, ATAN2_TOLERANCE, 0},
+{ 261, 3192989874u, 286247089u, 1085153597u, 713645369u, 3180476761u, 2988831978u, 0, ATAN2_TOLERANCE, 0},
+{ 262, 1093670500u, 1468283899u, 1042831668u, 2022736418u, 1073291771u, 1413754124u, 0, ATAN2_TOLERANCE, 0},
+{ 263, 1083139105u, 3305564080u, 1065483445u, 482392433u, 1073291762u, 692166418u, 0, ATAN2_TOLERANCE, 0},
+{ 264, 3201695807u, 2256346551u, 3222430705u, 2071674991u, 3221823994u, 3139624897u, 0, ATAN2_TOLERANCE, 0},
+{ 265, 3204024695u, 2295269094u, 1084451053u, 2773103941u, 3192196347u, 1542977546u, 0, ATAN2_TOLERANCE, 0},
+{ 266, 1078173946u, 1482721827u, 1092243422u, 3125409590u, 1058529089u, 1126344259u, 0, ATAN2_TOLERANCE, 0},
+{ 267, 3221065973u, 1381740563u, 1071545057u, 2918235653u, 3220510929u, 1739151392u, 0, ATAN2_TOLERANCE, 0},
+{ 268, 3238715972u, 1105857967u, 3241990046u, 2703723225u, 3221763183u, 1965202253u, 0, ATAN2_TOLERANCE, 0},
+{ 269, 1043015571u, 174689677u, 1079333374u, 3947057014u, 1036280030u, 1927977740u, 0, ATAN2_TOLERANCE, 0},
+{ 270, 1090461859u, 2023082423u, 3242081486u, 1169047927u, 1074306661u, 1328138233u, 0, ATAN2_TOLERANCE, 0},
+{ 271, 1064525899u, 3742487766u, 1043425732u, 194972788u, 1073291770u, 1848879823u, 0, ATAN2_TOLERANCE, 0},
+{ 272, 3213791827u, 2136071361u, 3211529757u, 993675115u, 3221011893u, 656866874u, 0, ATAN2_TOLERANCE, 0},
+{ 273, 3213663381u, 210772141u, 3241441539u, 580731413u, 3221823995u, 1390307120u, 0, ATAN2_TOLERANCE, 0},
+{ 274, 1093840413u, 1751560711u, 1074522705u, 180987057u, 1073291768u, 1461994101u, 0, ATAN2_TOLERANCE, 0},
+{ 275, 1066754591u, 2552236599u, 1088658621u, 2112468655u, 1050767840u, 2486862394u, 0, ATAN2_TOLERANCE, 0},
+{ 276, 3189290617u, 1578223762u, 3224596567u, 2456166162u, 3221823995u, 1413587503u, 0, ATAN2_TOLERANCE, 0},
+{ 277, 1058506965u, 2110924310u, 1086207177u, 3161208323u, 1044967070u, 1980882681u, 0, ATAN2_TOLERANCE, 0},
+{ 278, 3231863394u, 2352173188u, 1079361728u, 4070222179u, 3220736532u, 3007186906u, 0, ATAN2_TOLERANCE, 0},
+{ 279, 1101012904u, 2481562701u, 1090937016u, 3809489716u, 1073290350u, 575898392u, 0, ATAN2_TOLERANCE, 0},
+{ 280, 3197002651u, 330905705u, 1086260896u, 90264431u, 3183433692u, 3286143315u, 0, ATAN2_TOLERANCE, 0},
+{ 281, 1040729961u, 4162008079u, 3194387916u, 759522153u, 1074331505u, 371434821u, 0, ATAN2_TOLERANCE, 0},
+{ 282, 1081015037u, 1839697482u, 3216442625u, 2211508949u, 1073292151u, 3278130121u, 0, ATAN2_TOLERANCE, 0},
+{ 283, 3249807211u, 3736863454u, 1063475914u, 3150741666u, 3220775419u, 1413722619u, 0, ATAN2_TOLERANCE, 0},
+{ 284, 1060785883u, 4200269406u, 3236646101u, 1061812176u, 1074340347u, 1397586603u, 0, ATAN2_TOLERANCE, 0},
+{ 285, 1080217979u, 106027290u, 3234978297u, 2245237549u, 1074336029u, 2538208560u, 0, ATAN2_TOLERANCE, 0},
+{ 286, 3246984334u, 2132131375u, 3250483427u, 3449276437u, 3221770256u, 2268809344u, 0, ATAN2_TOLERANCE, 0},
+{ 287, 1089388778u, 2334440944u, 1105423490u, 4004336184u, 1056527653u, 2039806622u, 0, ATAN2_TOLERANCE, 0},
+{ 288, 3218772704u, 4090088208u, 1042030013u, 3898658299u, 3220775419u, 1396003111u, 0, ATAN2_TOLERANCE, 0},
+{ 289, 3207908064u, 2272831437u, 3253082595u, 2639188641u, 3221823995u, 1413753895u, 0, ATAN2_TOLERANCE, 0},
+{ 290, 1054766684u, 1856594168u, 3189515294u, 4101853676u, 1073292007u, 3529587265u, 0, ATAN2_TOLERANCE, 0},
+{ 291, 1076012412u, 2211699255u, 3195060344u, 3865018604u, 1073291771u, 1443899242u, 0, ATAN2_TOLERANCE, 0},
+{ 292, 3242767010u, 996259334u, 3241496889u, 3782673116u, 3221202626u, 668180253u, 0, ATAN2_TOLERANCE, 0},
+{ 293, 1099130747u, 3840380763u, 1048674041u, 550040067u, 1073291771u, 1413754122u, 0, ATAN2_TOLERANCE, 0},
+{ 294, 3251419593u, 95874100u, 3237232828u, 2645647822u, 3220775509u, 2468332239u, 0, ATAN2_TOLERANCE, 0},
+{ 295, 1043665640u, 3441419500u, 3252367038u, 876710419u, 1074340347u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 296, 3238593552u, 2560836004u, 3199616543u, 1180840586u, 3220775419u, 1413783313u, 0, ATAN2_TOLERANCE, 0},
+{ 297, 3221602966u, 2218230392u, 3227485787u, 3947214579u, 3221812687u, 4212242567u, 0, ATAN2_TOLERANCE, 0},
+{ 298, 1079539654u, 1447312532u, 1081476588u, 780366847u, 1070683852u, 2913647986u, 0, ATAN2_TOLERANCE, 0},
+{ 299, 1072569643u, 2842113832u, 3216156731u, 225159029u, 1073372815u, 1982011803u, 0, ATAN2_TOLERANCE, 0},
+{ 300, 1098117193u, 1601981129u, 3234628869u, 2236538344u, 1073292503u, 2915421251u, 0, ATAN2_TOLERANCE, 0},
+{ 301, 1085173524u, 2194185737u, 3242362684u, 87913366u, 1074339506u, 1441440662u, 0, ATAN2_TOLERANCE, 0},
+{ 302, 3199083880u, 1346862963u, 1077836259u, 3604666660u, 3193939787u, 236456121u, 0, ATAN2_TOLERANCE, 0},
+{ 303, 3212255979u, 3115209742u, 1099332326u, 1325101950u, 3185604502u, 1834083044u, 0, ATAN2_TOLERANCE, 0},
+{ 304, 3224546042u, 3889223100u, 1053247613u, 3371396923u, 3220775419u, 744152180u, 0, ATAN2_TOLERANCE, 0},
+{ 305, 3220477868u, 4163120793u, 1075022670u, 1387631215u, 3218111449u, 1089451389u, 0, ATAN2_TOLERANCE, 0},
+{ 306, 3205481779u, 1532426189u, 1063168268u, 3397022615u, 3214971596u, 4023288564u, 0, ATAN2_TOLERANCE, 0},
+{ 307, 3201033321u, 89324166u, 1079206060u, 3429424710u, 3194423243u, 1680654607u, 0, ATAN2_TOLERANCE, 0},
+{ 308, 3192325102u, 747591401u, 1072238381u, 2803213904u, 3192742867u, 3338280103u, 0, ATAN2_TOLERANCE, 0},
+{ 309, 1091113780u, 271904221u, 1044258318u, 1858545114u, 1073291771u, 1413753983u, 0, ATAN2_TOLERANCE, 0},
+{ 310, 3228068914u, 314958082u, 3249912496u, 2966213175u, 3221823995u, 206920092u, 0, ATAN2_TOLERANCE, 0},
+{ 311, 3197179414u, 3119528953u, 3217179014u, 2908718240u, 3221823994u, 1688936819u, 0, ATAN2_TOLERANCE, 0},
+{ 312, 3242467576u, 2018361566u, 1100926600u, 3985805054u, 3214206928u, 1981300716u, 0, ATAN2_TOLERANCE, 0},
+{ 313, 1070132580u, 409584884u, 3239758947u, 755795129u, 1074340347u, 414981618u, 0, ATAN2_TOLERANCE, 0},
+{ 314, 1075772446u, 1819156379u, 3251342302u, 2982669005u, 1074340347u, 1394882706u, 0, ATAN2_TOLERANCE, 0},
+{ 315, 1101563433u, 2080534280u, 3188254060u, 449171797u, 1073291771u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 316, 1095956900u, 168744837u, 3214950009u, 1322217822u, 1073291771u, 1442479033u, 0, ATAN2_TOLERANCE, 0},
+{ 317, 3254226900u, 3250487255u, 1062120700u, 1876195180u, 3220775419u, 1413753470u, 0, ATAN2_TOLERANCE, 0},
+{ 318, 3226343480u, 1336400247u, 1098057903u, 3314079581u, 3200863282u, 3341642384u, 0, ATAN2_TOLERANCE, 0},
+{ 319, 3203678820u, 265025555u, 1063854282u, 3779482256u, 3212430502u, 3276978561u, 0, ATAN2_TOLERANCE, 0},
+{ 320, 1067300501u, 887044257u, 1054789618u, 2732056261u, 1073291505u, 3692883481u, 0, ATAN2_TOLERANCE, 0},
+{ 321, 1050106742u, 4027115185u, 3191764868u, 2940199511u, 1073313139u, 1714711090u, 0, ATAN2_TOLERANCE, 0},
+{ 322, 3202500155u, 2875684421u, 3227459837u, 2251967570u, 3221823995u, 1256167845u, 0, ATAN2_TOLERANCE, 0},
+{ 323, 1063244412u, 284173546u, 3238823679u, 3557800647u, 1074340347u, 1395039177u, 0, ATAN2_TOLERANCE, 0},
+{ 324, 1101458560u, 3147771266u, 3220110464u, 2933364246u, 1073291771u, 1436432035u, 0, ATAN2_TOLERANCE, 0},
+{ 325, 1064853160u, 3366183281u, 3234870843u, 537442654u, 1074340347u, 606725624u, 0, ATAN2_TOLERANCE, 0},
+{ 326, 3244118788u, 2529029548u, 3249882819u, 3781513577u, 3221812706u, 1843639519u, 0, ATAN2_TOLERANCE, 0},
+{ 327, 3213436354u, 1080845539u, 3206760016u, 911778687u, 3220787976u, 2072716519u, 0, ATAN2_TOLERANCE, 0},
+{ 328, 3191951036u, 469586759u, 1091830022u, 3080528840u, 3172708289u, 1238338899u, 0, ATAN2_TOLERANCE, 0},
+{ 329, 1080249104u, 2863108169u, 3225605506u, 2508274250u, 1073542769u, 2645651585u, 0, ATAN2_TOLERANCE, 0},
+{ 330, 3210826984u, 4080017377u, 3206492941u, 1470284690u, 3220834344u, 690081828u, 0, ATAN2_TOLERANCE, 0},
+{ 331, 3207120390u, 3867917386u, 1102054928u, 3504746045u, 3177757862u, 681445639u, 0, ATAN2_TOLERANCE, 0},
+{ 332, 1064522279u, 2962134101u, 3244741577u, 3390537350u, 1074340347u, 1412866626u, 0, ATAN2_TOLERANCE, 0},
+{ 333, 1088201813u, 1702237980u, 1071598971u, 1102587474u, 1073291753u, 3619892060u, 0, ATAN2_TOLERANCE, 0},
+{ 334, 3202970118u, 2180218657u, 3211592260u, 1206527853u, 3221822198u, 3917681358u, 0, ATAN2_TOLERANCE, 0},
+{ 335, 3197084744u, 394130786u, 3242511482u, 2437699868u, 3221823995u, 1413753942u, 0, ATAN2_TOLERANCE, 0},
+{ 336, 1044237059u, 849581558u, 3252006507u, 2008614943u, 1074340347u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 337, 3210140014u, 3128971673u, 3249137531u, 2773583059u, 3221823995u, 1413739684u, 0, ATAN2_TOLERANCE, 0},
+{ 338, 1085029866u, 590727700u, 3248651761u, 2183878539u, 1074340335u, 477454515u, 0, ATAN2_TOLERANCE, 0},
+{ 339, 1101098629u, 820687580u, 3208143496u, 1402434664u, 1073291771u, 1413765596u, 0, ATAN2_TOLERANCE, 0},
+{ 340, 3252290835u, 1873709254u, 3245167989u, 44275991u, 3220784654u, 1958963073u, 0, ATAN2_TOLERANCE, 0},
+{ 341, 3189668753u, 1174874204u, 3208263730u, 2360372288u, 3221823993u, 17073376u, 0, ATAN2_TOLERANCE, 0},
+{ 342, 1103854676u, 937573440u, 3208953761u, 211240241u, 1073291771u, 1413757228u, 0, ATAN2_TOLERANCE, 0},
+{ 343, 3243548934u, 2469774991u, 1043117070u, 3380071805u, 3220775419u, 1413754133u, 0, ATAN2_TOLERANCE, 0},
+{ 344, 1058121042u, 442507560u, 3254252803u, 3257889649u, 1074340347u, 1413754113u, 0, ATAN2_TOLERANCE, 0},
+{ 345, 1068850520u, 1854921625u, 1049810168u, 2729627545u, 1073291767u, 3450375180u, 0, ATAN2_TOLERANCE, 0},
+{ 346, 3254712629u, 4001809575u, 3240128649u, 278261523u, 3220775487u, 1146283756u, 0, ATAN2_TOLERANCE, 0},
+{ 347, 1087224694u, 1793907966u, 3238955714u, 398859249u, 1074308487u, 1585139852u, 0, ATAN2_TOLERANCE, 0},
+{ 348, 3200952547u, 2511916952u, 3219195283u, 1697158299u, 3221823992u, 844994325u, 0, ATAN2_TOLERANCE, 0},
+{ 349, 1069985548u, 3230931724u, 3243897690u, 3508781585u, 1074340347u, 1355093335u, 0, ATAN2_TOLERANCE, 0},
+{ 350, 1103847606u, 1674254897u, 1046547577u, 217148561u, 1073291771u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 351, 3211263954u, 3275604304u, 3194840159u, 2991205850u, 3220775438u, 3970492568u, 0, ATAN2_TOLERANCE, 0},
+{ 352, 3195249375u, 3509997278u, 3248888030u, 3897986511u, 3221823995u, 1413754135u, 0, ATAN2_TOLERANCE, 0},
+{ 353, 1047182435u, 2156824613u, 1042295665u, 1239257646u, 1073252154u, 1874059179u, 0, ATAN2_TOLERANCE, 0},
+{ 354, 3213264085u, 1073153314u, 3250031627u, 2567234990u, 3221823995u, 1413691462u, 0, ATAN2_TOLERANCE, 0},
+{ 355, 3190593412u, 4261696995u, 3197784432u, 323702024u, 3221819545u, 2412162891u, 0, ATAN2_TOLERANCE, 0},
+{ 356, 3243690997u, 4075177615u, 3202791065u, 1919006082u, 3220775419u, 1413762298u, 0, ATAN2_TOLERANCE, 0},
+{ 357, 3239270013u, 386429966u, 1086504491u, 3698826164u, 3220743669u, 1057087085u, 0, ATAN2_TOLERANCE, 0},
+{ 358, 1078327190u, 1681986446u, 3194985869u, 3072950140u, 1073291771u, 1419790643u, 0, ATAN2_TOLERANCE, 0},
+{ 359, 3217311933u, 3719038997u, 1055433962u, 3331415058u, 3220775341u, 2458523280u, 0, ATAN2_TOLERANCE, 0},
+{ 360, 1060749713u, 2420250111u, 3238002206u, 1928661079u, 1074340347u, 1407000771u, 0, ATAN2_TOLERANCE, 0},
+{ 361, 1081914210u, 3679866727u, 3227386672u, 1273835792u, 1073559895u, 2540803742u, 0, ATAN2_TOLERANCE, 0},
+{ 362, 1041622738u, 2682092368u, 3234222284u, 1325425811u, 1074340347u, 1413753885u, 0, ATAN2_TOLERANCE, 0},
+{ 363, 1056312613u, 4175172697u, 3208346191u, 2130706153u, 1074314072u, 2132070035u, 0, ATAN2_TOLERANCE, 0},
+{ 364, 1092089624u, 1200784450u, 1083605096u, 1248595607u, 1073287925u, 2150158548u, 0, ATAN2_TOLERANCE, 0},
+{ 365, 3213890863u, 1897285171u, 3251296075u, 944966123u, 3221823995u, 1413714868u, 0, ATAN2_TOLERANCE, 0},
+{ 366, 3241371250u, 2270747330u, 3230692631u, 422503284u, 3220776287u, 4291004252u, 0, ATAN2_TOLERANCE, 0},
+{ 367, 1084120037u, 2857564741u, 1075647403u, 3308906709u, 1073287848u, 1423905059u, 0, ATAN2_TOLERANCE, 0},
+{ 368, 3203475098u, 1380066948u, 3232612906u, 2613634294u, 3221823995u, 1404084868u, 0, ATAN2_TOLERANCE, 0},
+{ 369, 1063890856u, 4022784584u, 1060483857u, 3264056381u, 1073181451u, 2212869656u, 0, ATAN2_TOLERANCE, 0},
+{ 370, 1044637404u, 1778509100u, 3213146285u, 2665833973u, 1074340346u, 3646177722u, 0, ATAN2_TOLERANCE, 0},
+{ 371, 3216727300u, 1859175955u, 1079949560u, 4258450607u, 3209461833u, 611904534u, 0, ATAN2_TOLERANCE, 0},
+{ 372, 1048277388u, 4128020197u, 1076266146u, 4122840980u, 1044611053u, 3338545369u, 0, ATAN2_TOLERANCE, 0},
+{ 373, 3193183163u, 2454653987u, 3229487005u, 2977478685u, 3221823995u, 1413666460u, 0, ATAN2_TOLERANCE, 0},
+{ 374, 3253556483u, 1355181872u, 1095308770u, 436846481u, 3220774543u, 2493910209u, 0, ATAN2_TOLERANCE, 0},
+{ 375, 3246605302u, 2592856453u, 3247825559u, 3195234082u, 3221606608u, 1846608622u, 0, ATAN2_TOLERANCE, 0},
+{ 376, 3222118023u, 3554670043u, 1091621009u, 3321236467u, 3203149602u, 1308976114u, 0, ATAN2_TOLERANCE, 0},
+{ 377, 1069012833u, 1936670355u, 1095715713u, 2958468553u, 1045979362u, 2828014773u, 0, ATAN2_TOLERANCE, 0},
+{ 378, 3192291109u, 2960339502u, 1098808013u, 1044068983u, 3166150248u, 3509208877u, 0, ATAN2_TOLERANCE, 0},
+{ 379, 3196691185u, 4093388677u, 1095478112u, 1735930261u, 3173885469u, 2460479362u, 0, ATAN2_TOLERANCE, 0},
+{ 380, 1091040302u, 1807398746u, 3195743135u, 4261616162u, 1073291771u, 1413756459u, 0, ATAN2_TOLERANCE, 0},
+{ 381, 3209294194u, 3250576797u, 1059002384u, 3043079652u, 3220619483u, 2585915607u, 0, ATAN2_TOLERANCE, 0},
+{ 382, 1069207109u, 666051428u, 3208765404u, 1912684117u, 1073297233u, 3539037555u, 0, ATAN2_TOLERANCE, 0},
+{ 383, 1103487420u, 1949030179u, 1096388934u, 896459246u, 1073282199u, 3269960540u, 0, ATAN2_TOLERANCE, 0},
+{ 384, 1054300653u, 622499767u, 1066707637u, 1490260486u, 1060246537u, 266655134u, 0, ATAN2_TOLERANCE, 0},
+{ 385, 1106688493u, 1490616165u, 3251242436u, 795675736u, 1073440841u, 3047088221u, 0, ATAN2_TOLERANCE, 0},
+{ 386, 1080943896u, 3662877092u, 3234317146u, 3200513112u, 1074330042u, 3439698595u, 0, ATAN2_TOLERANCE, 0},
+{ 387, 1084088786u, 1356101968u, 3236536816u, 3062844611u, 1074321255u, 2259334167u, 0, ATAN2_TOLERANCE, 0},
+{ 388, 3219922640u, 2284484846u, 3219498359u, 3240896015u, 3221344398u, 1036409683u, 0, ATAN2_TOLERANCE, 0},
+{ 389, 3235759689u, 494503287u, 1092811254u, 142673998u, 3215529370u, 1708242537u, 0, ATAN2_TOLERANCE, 0},
+{ 390, 3252125916u, 3394882641u, 3225306538u, 364852125u, 3220775419u, 1500189746u, 0, ATAN2_TOLERANCE, 0},
+{ 391, 3225261763u, 193885269u, 1088149839u, 1359805831u, 3209756652u, 2187415228u, 0, ATAN2_TOLERANCE, 0},
+{ 392, 3200484782u, 592580907u, 3199560872u, 3086438952u, 3221263565u, 54087162u, 0, ATAN2_TOLERANCE, 0},
+{ 393, 1059518664u, 1778008540u, 1049064687u, 73581647u, 1073290725u, 3056176809u, 0, ATAN2_TOLERANCE, 0},
+{ 394, 3246733598u, 233240285u, 1081923320u, 2710903921u, 3220775408u, 1967527865u, 0, ATAN2_TOLERANCE, 0},
+{ 395, 1069513767u, 3719878805u, 1079866720u, 3615458228u, 1062279619u, 4183240111u, 0, ATAN2_TOLERANCE, 0},
+{ 396, 3221194724u, 3647632375u, 3247225271u, 3839959621u, 3221823995u, 1340091316u, 0, ATAN2_TOLERANCE, 0},
+{ 397, 1103401096u, 2232210456u, 3235434773u, 224271737u, 1073291809u, 4062239471u, 0, ATAN2_TOLERANCE, 0},
+{ 398, 3193003684u, 2134662911u, 3190390590u, 4239009051u, 3220965703u, 3612754429u, 0, ATAN2_TOLERANCE, 0},
+{ 399, 1080526145u, 2305279897u, 1077668039u, 1854523320u, 1073137367u, 4138084895u, 0, ATAN2_TOLERANCE, 0},
+{ 400, 3219864259u, 538224650u, 3206153057u, 1379649610u, 3220775541u, 2626113219u, 0, ATAN2_TOLERANCE, 0},
+{ 401, 3196410507u, 3683897920u, 3244167599u, 3647579469u, 3221823995u, 1413754091u, 0, ATAN2_TOLERANCE, 0},
+{ 402, 1090280933u, 2694093608u, 1042775347u, 598406111u, 1073291771u, 1413754030u, 0, ATAN2_TOLERANCE, 0},
+{ 403, 3211635392u, 872706833u, 1084802480u, 2200602798u, 3199412565u, 1145585977u, 0, ATAN2_TOLERANCE, 0},
+{ 404, 1042339597u, 904146293u, 1060867322u, 1729685598u, 1054052163u, 4258128573u, 0, ATAN2_TOLERANCE, 0},
+{ 405, 3195694970u, 1894173462u, 3232800651u, 191960416u, 3221823995u, 1413702026u, 0, ATAN2_TOLERANCE, 0},
+{ 406, 1091225343u, 3521028551u, 1054522089u, 3287274359u, 1073291771u, 1413623295u, 0, ATAN2_TOLERANCE, 0},
+{ 407, 1095386964u, 959640601u, 3201578263u, 4136915018u, 1073291771u, 1413760436u, 0, ATAN2_TOLERANCE, 0},
+{ 408, 1064005451u, 1553716379u, 1106027987u, 984725765u, 1030661409u, 3624861327u, 0, ATAN2_TOLERANCE, 0},
+{ 409, 3238832641u, 2287646644u, 3240329321u, 2276183378u, 3221639371u, 1915145318u, 0, ATAN2_TOLERANCE, 0},
+{ 410, 1068209174u, 3940225170u, 3199544434u, 997572161u, 1073291795u, 3854512035u, 0, ATAN2_TOLERANCE, 0},
+{ 411, 3212768361u, 36116288u, 3206886566u, 4196602670u, 3220797863u, 3282093125u, 0, ATAN2_TOLERANCE, 0},
+{ 412, 3241695853u, 3550227562u, 3207257983u, 2747744117u, 3220775419u, 1414332672u, 0, ATAN2_TOLERANCE, 0},
+{ 413, 1104236126u, 507130047u, 1048359321u, 3229888373u, 1073291771u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 414, 3222996778u, 2210969014u, 1081031001u, 1946786091u, 3214651748u, 1763368877u, 0, ATAN2_TOLERANCE, 0},
+{ 415, 3236306990u, 4059150589u, 3189759234u, 1177045799u, 3220775419u, 1413754321u, 0, ATAN2_TOLERANCE, 0},
+{ 416, 1093103612u, 2664812822u, 1050343198u, 2034180320u, 1073291771u, 1413751780u, 0, ATAN2_TOLERANCE, 0},
+{ 417, 3213779117u, 1175750283u, 3235559706u, 1424491340u, 3221823995u, 193169772u, 0, ATAN2_TOLERANCE, 0},
+{ 418, 3213904193u, 1630036121u, 3231972785u, 3195479448u, 3221823992u, 302653567u, 0, ATAN2_TOLERANCE, 0},
+{ 419, 1090429875u, 2527029044u, 1046927050u, 4000723255u, 1073291771u, 1413752610u, 0, ATAN2_TOLERANCE, 0},
+{ 420, 1085208677u, 3335703647u, 3237349676u, 3869440059u, 1074317335u, 873791565u, 0, ATAN2_TOLERANCE, 0},
+{ 421, 1091433848u, 3888398377u, 3196041693u, 1290567220u, 1073291771u, 1413756305u, 0, ATAN2_TOLERANCE, 0},
+{ 422, 1066679070u, 3242451480u, 3248384948u, 707431021u, 1074340347u, 1413405465u, 0, ATAN2_TOLERANCE, 0},
+{ 423, 1083230509u, 2739665123u, 1060777905u, 1733073225u, 1073291770u, 4033660480u, 0, ATAN2_TOLERANCE, 0},
+{ 424, 1078517061u, 1297274853u, 3208848704u, 3341639139u, 1073291783u, 2788085280u, 0, ATAN2_TOLERANCE, 0},
+{ 425, 1046570941u, 2228057309u, 1084318902u, 1317851136u, 1034945225u, 467130534u, 0, ATAN2_TOLERANCE, 0},
+{ 426, 1088255327u, 270039934u, 3241414679u, 3063626339u, 1074328321u, 219326390u, 0, ATAN2_TOLERANCE, 0},
+{ 427, 3219178350u, 83062251u, 3211262173u, 2659016437u, 3220781276u, 2851272908u, 0, ATAN2_TOLERANCE, 0},
+{ 428, 1095743886u, 3833539373u, 3206667189u, 1567476111u, 1073291771u, 1413901700u, 0, ATAN2_TOLERANCE, 0},
+{ 429, 3205195072u, 2382776852u, 3249232579u, 1546622468u, 3221823995u, 1413753624u, 0, ATAN2_TOLERANCE, 0},
+{ 430, 1085536439u, 1714300821u, 1104130938u, 4167591598u, 1054091500u, 1719659965u, 0, ATAN2_TOLERANCE, 0},
+{ 431, 1051092760u, 2798720100u, 1086978789u, 449990704u, 1036752895u, 2144561956u, 0, ATAN2_TOLERANCE, 0},
+{ 432, 3231198415u, 4039516226u, 3244344107u, 4272932619u, 3221823903u, 116437322u, 0, ATAN2_TOLERANCE, 0},
+{ 433, 3222708441u, 1683007544u, 1091105663u, 3805494321u, 3204253019u, 2715940239u, 0, ATAN2_TOLERANCE, 0},
+{ 434, 3220852948u, 2072627412u, 1094383324u, 3394151662u, 3199154933u, 3610356391u, 0, ATAN2_TOLERANCE, 0},
+{ 435, 3220570024u, 1120106427u, 3223631624u, 3404608264u, 3221754802u, 2891454013u, 0, ATAN2_TOLERANCE, 0},
+{ 436, 1097859997u, 559918757u, 3205077053u, 908100198u, 1073291771u, 1413767229u, 0, ATAN2_TOLERANCE, 0},
+{ 437, 1042677918u, 2026673913u, 3244833635u, 2844573214u, 1074340347u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 438, 3254567259u, 3946837259u, 3234993796u, 3850406820u, 3220775421u, 3630480682u, 0, ATAN2_TOLERANCE, 0},
+{ 439, 1057479809u, 3139330994u, 1046133568u, 1539650690u, 1073291197u, 3198614702u, 0, ATAN2_TOLERANCE, 0},
+{ 440, 3236705500u, 1554593884u, 3228899878u, 2813752562u, 3220781547u, 4079724151u, 0, ATAN2_TOLERANCE, 0},
+{ 441, 1056505004u, 3804703138u, 1072931071u, 2053677923u, 1056202262u, 2398795457u, 0, ATAN2_TOLERANCE, 0},
+{ 442, 3244864299u, 289355864u, 1078453818u, 2143066338u, 3220775415u, 1970569558u, 0, ATAN2_TOLERANCE, 0},
+{ 443, 3203939880u, 2157691971u, 1106629150u, 110806409u, 3169961636u, 2316676483u, 0, ATAN2_TOLERANCE, 0},
+{ 444, 1082157019u, 3570399481u, 1085637605u, 180265334u, 1069044663u, 4073200908u, 0, ATAN2_TOLERANCE, 0},
+{ 445, 3200980182u, 558779875u, 3202046748u, 2338464653u, 3221583019u, 555325381u, 0, ATAN2_TOLERANCE, 0},
+{ 446, 1045705464u, 1703969219u, 3229797258u, 1417521063u, 1074340347u, 1413683705u, 0, ATAN2_TOLERANCE, 0},
+{ 447, 3237782261u, 3917440951u, 1051668894u, 3736066983u, 3220775419u, 1413718442u, 0, ATAN2_TOLERANCE, 0},
+{ 448, 1064752080u, 3106613409u, 1066627453u, 2735392257u, 1070744968u, 3181926916u, 0, ATAN2_TOLERANCE, 0},
+{ 449, 1065665372u, 2229777605u, 1065061963u, 2405869925u, 1072661657u, 531964835u, 0, ATAN2_TOLERANCE, 0},
+{ 450, 3239463229u, 3967957902u, 1057416138u, 3459188071u, 3220775419u, 1413215646u, 0, ATAN2_TOLERANCE, 0},
+{ 451, 1068639210u, 3699016825u, 3249713090u, 796144848u, 1074340347u, 1413245175u, 0, ATAN2_TOLERANCE, 0},
+{ 452, 3228816396u, 3285165564u, 3211948811u, 401510871u, 3220775434u, 929725042u, 0, ATAN2_TOLERANCE, 0},
+{ 453, 1094257658u, 634857910u, 3199607513u, 914218057u, 1073291771u, 1413757756u, 0, ATAN2_TOLERANCE, 0},
+{ 454, 1083743336u, 2030735578u, 3233855943u, 965677531u, 1074244980u, 2177313032u, 0, ATAN2_TOLERANCE, 0},
+{ 455, 1079556815u, 3957229084u, 1051050470u, 3123776651u, 1073291771u, 1384232668u, 0, ATAN2_TOLERANCE, 0},
+{ 456, 3221863333u, 162122081u, 3239376395u, 108064594u, 3221823990u, 1797654074u, 0, ATAN2_TOLERANCE, 0},
+{ 457, 3237271786u, 869031839u, 3225020876u, 1344301606u, 3220775737u, 2309730354u, 0, ATAN2_TOLERANCE, 0},
+{ 458, 3214433474u, 946696117u, 3231825228u, 1700703647u, 3221823989u, 3589711354u, 0, ATAN2_TOLERANCE, 0},
+{ 459, 1075492875u, 3394168074u, 1076939786u, 1666995668u, 1071135059u, 4292477773u, 0, ATAN2_TOLERANCE, 0},
+{ 460, 3208774795u, 2488789804u, 3238508333u, 1506943664u, 3221823995u, 1407380935u, 0, ATAN2_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1073291780u, 1496672534u, 0, ATAN2_TOLERANCE, 0},
+{ 462, 3219934542u, 1244307192u, 3191297711u, 2540916692u, 3220775419u, 1441424078u, 0, ATAN2_TOLERANCE, 0},
+{ 463, 3200062692u, 2871645739u, 3239081581u, 1440249115u, 3221823995u, 1413739665u, 0, ATAN2_TOLERANCE, 0},
+{ 464, 1068350633u, 1231934926u, 3236746788u, 603977748u, 1074340346u, 3494178900u, 0, ATAN2_TOLERANCE, 0},
+{ 465, 3195449689u, 2386312545u, 1063169277u, 2715234268u, 3204951074u, 3755432132u, 0, ATAN2_TOLERANCE, 0},
+{ 466, 1087803418u, 915867083u, 1046790892u, 3347417612u, 1073291771u, 1413746598u, 0, ATAN2_TOLERANCE, 0},
+{ 467, 1105984188u, 3553288373u, 1065698616u, 2906680663u, 1073291771u, 1413741681u, 0, ATAN2_TOLERANCE, 0},
+{ 468, 1045506226u, 2342364630u, 1051356723u, 4019093203u, 1066714524u, 2880653042u, 0, ATAN2_TOLERANCE, 0},
+{ 469, 3201169162u, 2911548084u, 1105282515u, 2476735795u, 3168518603u, 844773889u, 0, ATAN2_TOLERANCE, 0},
+{ 470, 1050472772u, 1836216409u, 1101062307u, 2519592554u, 1022062603u, 1216305448u, 0, ATAN2_TOLERANCE, 0},
+{ 471, 1070178161u, 1235369496u, 3222946447u, 668087854u, 1074324365u, 3536638492u, 0, ATAN2_TOLERANCE, 0},
+{ 472, 3208554596u, 2981820811u, 1059838516u, 2845580478u, 3220328328u, 288777588u, 0, ATAN2_TOLERANCE, 0},
+{ 473, 3193931414u, 1565550570u, 3217165795u, 4162017137u, 3221823995u, 945021310u, 0, ATAN2_TOLERANCE, 0},
+{ 474, 3237251378u, 2808968027u, 1055630096u, 1782326814u, 3220775419u, 1413048557u, 0, ATAN2_TOLERANCE, 0},
+{ 475, 1053576974u, 1492622658u, 3216653077u, 3972512122u, 1074340330u, 264751044u, 0, ATAN2_TOLERANCE, 0},
+{ 476, 3222171679u, 2722693603u, 3227814791u, 3169731970u, 3221811860u, 3636053881u, 0, ATAN2_TOLERANCE, 0},
+{ 477, 3217906631u, 899763203u, 3207606001u, 2804747833u, 3220776548u, 1089393941u, 0, ATAN2_TOLERANCE, 0},
+{ 478, 3230670325u, 3789058912u, 3228095081u, 4135937628u, 3220974844u, 1105605327u, 0, ATAN2_TOLERANCE, 0},
+{ 479, 1060199382u, 1682808307u, 3206960335u, 232877759u, 1073816480u, 3931324112u, 0, ATAN2_TOLERANCE, 0},
+{ 480, 3242091486u, 2851963139u, 3246852961u, 2590862592u, 3221802400u, 4209025746u, 0, ATAN2_TOLERANCE, 0},
+{ 481, 1081200406u, 2422232642u, 3234779662u, 290458310u, 1074330881u, 1020150355u, 0, ATAN2_TOLERANCE, 0},
+{ 482, 3210671078u, 1082582386u, 1075605675u, 2602133689u, 3207686623u, 217150313u, 0, ATAN2_TOLERANCE, 0},
+{ 483, 3239818611u, 1789635787u, 1059414278u, 1048286093u, 3220775419u, 1412136057u, 0, ATAN2_TOLERANCE, 0},
+{ 484, 1098330542u, 231339448u, 1055573265u, 504907415u, 1073291771u, 1413751773u, 0, ATAN2_TOLERANCE, 0},
+{ 485, 1063211461u, 1153251200u, 3204617090u, 1772013857u, 1073311204u, 2140119256u, 0, ATAN2_TOLERANCE, 0},
+{ 486, 1099551055u, 1082898276u, 3212089272u, 1449080862u, 1073291771u, 1414172319u, 0, ATAN2_TOLERANCE, 0},
+{ 487, 1086008285u, 3177299045u, 1058862813u, 809400815u, 1073291771u, 1342216949u, 0, ATAN2_TOLERANCE, 0},
+{ 488, 3230854550u, 1924429710u, 1056464743u, 3349283177u, 3220775419u, 1327341624u, 0, ATAN2_TOLERANCE, 0},
+{ 489, 3245473391u, 42238036u, 1042379500u, 2113559863u, 3220775419u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 490, 1064761243u, 3304403230u, 3217556703u, 58952646u, 1074324685u, 1952296142u, 0, ATAN2_TOLERANCE, 0},
+{ 491, 3212669530u, 1645486982u, 3224301095u, 3636267471u, 3221823751u, 2613443644u, 0, ATAN2_TOLERANCE, 0},
+{ 492, 1062762009u, 619402181u, 3235208235u, 557360557u, 1074340347u, 1260049180u, 0, ATAN2_TOLERANCE, 0},
+{ 493, 3238238394u, 110029735u, 1046937383u, 984375729u, 3220775419u, 1413752935u, 0, ATAN2_TOLERANCE, 0},
+{ 494, 3189496738u, 4063688092u, 3203235744u, 1049950343u, 3221823934u, 3816398185u, 0, ATAN2_TOLERANCE, 0},
+{ 495, 1062350619u, 650996069u, 1054971928u, 3953359826u, 1073283845u, 959751544u, 0, ATAN2_TOLERANCE, 0},
+{ 496, 3227055805u, 66926332u, 1090561839u, 1379780888u, 3209165854u, 1292588262u, 0, ATAN2_TOLERANCE, 0},
+{ 497, 3233453307u, 2803378256u, 1086057989u, 498534626u, 3219675001u, 3783008083u, 0, ATAN2_TOLERANCE, 0},
+{ 498, 1082618553u, 2846400785u, 1047142525u, 1375153550u, 1073291771u, 1413462044u, 0, ATAN2_TOLERANCE, 0},
+{ 499, 1044581201u, 2869128958u, 1070972315u, 4246440273u, 1046218742u, 3600433113u, 0, ATAN2_TOLERANCE, 0},
+{ 500, 1051832506u, 3112381207u, 1044430965u, 3981604561u, 1073284014u, 394367749u, 0, ATAN2_TOLERANCE, 0},
+{ 501, 3231254997u, 243303420u, 1093735824u, 1575581926u, 3210179336u, 3523569011u, 0, ATAN2_TOLERANCE, 0},
+{ 502, 3239137997u, 3218865041u, 3204803496u, 3840388050u, 3220775419u, 1414402421u, 0, ATAN2_TOLERANCE, 0},
+{ 503, 1048415431u, 336846959u, 1052664471u, 3798336786u, 1068438792u, 192900885u, 0, ATAN2_TOLERANCE, 0},
+{ 504, 1055954236u, 3639240976u, 1081202165u, 1844741676u, 1047380116u, 1418730997u, 0, ATAN2_TOLERANCE, 0},
+{ 505, 3211904793u, 717293069u, 3211534283u, 582401011u, 3221351312u, 3588680507u, 0, ATAN2_TOLERANCE, 0},
+{ 506, 3251962512u, 3766248610u, 3196520332u, 1174437546u, 3220775419u, 1413754137u, 0, ATAN2_TOLERANCE, 0},
+{ 507, 1083431226u, 756959182u, 3204099341u, 1581804034u, 1073291771u, 1503946902u, 0, ATAN2_TOLERANCE, 0},
+{ 508, 3205806444u, 3560686300u, 3220980617u, 4277975772u, 3221823971u, 3716500468u, 0, ATAN2_TOLERANCE, 0},
+{ 509, 3209906076u, 2598148853u, 3217622194u, 3460421008u, 3221820838u, 3835685689u, 0, ATAN2_TOLERANCE, 0},
+{ 510, 1066720824u, 136600515u, 3209934920u, 3340653128u, 1073353629u, 2620328931u, 0, ATAN2_TOLERANCE, 0},
+{ 511, 1096820310u, 1045480938u, 3251354609u, 4133432965u, 1074335577u, 920847588u, 0, ATAN2_TOLERANCE, 0},
+{ 512, 1091599431u, 1630207738u, 3239996829u, 2393354808u, 1074080031u, 3469111725u, 0, ATAN2_TOLERANCE, 0},
+{ 513, 3190626018u, 3739770117u, 1059520750u, 3959551225u, 3203677087u, 531400053u, 0, ATAN2_TOLERANCE, 0},
+{ 514, 3230730505u, 1498861716u, 1091297147u, 847410798u, 3212021431u, 3055804927u, 0, ATAN2_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 1074340091u, 3753688227u, 0, ATAN2_TOLERANCE, 0},
+{ 516, 1054849265u, 2353103845u, 3235718771u, 2978889966u, 1074340347u, 1413183585u, 0, ATAN2_TOLERANCE, 0},
+{ 517, 3251357992u, 1546972125u, 3249076079u, 1987349196u, 3221007119u, 1196948856u, 0, ATAN2_TOLERANCE, 0},
+{ 518, 3238219513u, 2769161072u, 1075207126u, 292616282u, 3220775382u, 1176824223u, 0, ATAN2_TOLERANCE, 0},
+{ 519, 3199712298u, 36855311u, 1052128202u, 1479039342u, 3219796789u, 1538651707u, 0, ATAN2_TOLERANCE, 0},
+{ 520, 1083757053u, 2027463605u, 1066023013u, 3369686340u, 1073291762u, 3770602758u, 0, ATAN2_TOLERANCE, 0},
+{ 521, 3197852749u, 3808681655u, 1054161346u, 1821773119u, 3216282753u, 3281781855u, 0, ATAN2_TOLERANCE, 0},
+{ 522, 1040685928u, 3175490326u, 3226879970u, 845687760u, 1074340347u, 1413736777u, 0, ATAN2_TOLERANCE, 0},
+{ 523, 1042302993u, 3124482451u, 3242748377u, 3259417226u, 1074340347u, 1413754135u, 0, ATAN2_TOLERANCE, 0},
+{ 524, 1045245695u, 2751606436u, 3236210939u, 3923142740u, 1074340347u, 1413753413u, 0, ATAN2_TOLERANCE, 0},
+{ 525, 1095694737u, 2016872044u, 3228408064u, 4201274408u, 1073291832u, 2077035738u, 0, ATAN2_TOLERANCE, 0},
+{ 526, 3199349254u, 1019916843u, 3219974785u, 1977881787u, 3221823994u, 3006114625u, 0, ATAN2_TOLERANCE, 0},
+{ 527, 3199478752u, 2060433318u, 1075872515u, 366073725u, 3196292051u, 3745275776u, 0, ATAN2_TOLERANCE, 0},
+{ 528, 3191180557u, 1098469906u, 1082900695u, 2349346832u, 3180910912u, 1878107189u, 0, ATAN2_TOLERANCE, 0},
+{ 529, 3209974707u, 3011196295u, 3252479932u, 2459281672u, 3221823995u, 1413752696u, 0, ATAN2_TOLERANCE, 0},
+{ 530, 3221334323u, 2843222682u, 1089275809u, 298982001u, 3204675530u, 1916238001u, 0, ATAN2_TOLERANCE, 0},
+{ 531, 1101737698u, 914741728u, 3203468059u, 2833809843u, 1073291771u, 1413754457u, 0, ATAN2_TOLERANCE, 0},
+{ 532, 3236763878u, 1274901962u, 3241535845u, 3759113509u, 3221802250u, 4147736145u, 0, ATAN2_TOLERANCE, 0},
+{ 533, 3245916442u, 2134927252u, 3253802671u, 3013731444u, 3221821028u, 2832318322u, 0, ATAN2_TOLERANCE, 0},
+{ 534, 1099201341u, 2230655177u, 3254510616u, 1249674366u, 1074337339u, 2213018396u, 0, ATAN2_TOLERANCE, 0},
+{ 535, 1062971253u, 717357389u, 1083533731u, 3746683362u, 1052027372u, 2137620050u, 0, ATAN2_TOLERANCE, 0},
+{ 536, 3213773114u, 834976849u, 3217357661u, 2465861779u, 3221776824u, 2068034092u, 0, ATAN2_TOLERANCE, 0},
+{ 537, 1045656117u, 1385714428u, 1053358395u, 3007113740u, 1064889029u, 3113089001u, 0, ATAN2_TOLERANCE, 0},
+{ 538, 1050527919u, 599268545u, 3201368210u, 2309854744u, 1074283173u, 929217064u, 0, ATAN2_TOLERANCE, 0},
+{ 539, 1069954454u, 2840234388u, 3232496515u, 333365983u, 1074340321u, 3999351917u, 0, ATAN2_TOLERANCE, 0},
+{ 540, 1045922781u, 3136078996u, 3194520860u, 2650572904u, 1074105927u, 590486715u, 0, ATAN2_TOLERANCE, 0},
+{ 541, 3233687691u, 2405805086u, 3251640319u, 324233833u, 3221823991u, 2496769912u, 0, ATAN2_TOLERANCE, 0},
+{ 542, 1106699146u, 2589598340u, 3254677807u, 952438812u, 1074002337u, 362953818u, 0, ATAN2_TOLERANCE, 0},
+{ 543, 3189114773u, 1922837702u, 3216892718u, 3535907549u, 3221823995u, 1389021617u, 0, ATAN2_TOLERANCE, 0},
+{ 544, 3243615868u, 261447440u, 3209805849u, 1150571079u, 3220775419u, 1414613829u, 0, ATAN2_TOLERANCE, 0},
+{ 545, 1095805232u, 4026487528u, 1073152064u, 27340691u, 1073291770u, 4226382170u, 0, ATAN2_TOLERANCE, 0},
+{ 546, 3229123692u, 338765118u, 1086225786u, 3207238249u, 3215570352u, 202287484u, 0, ATAN2_TOLERANCE, 0},
+{ 547, 3196182703u, 1085283176u, 3187775111u, 1601194210u, 3220779448u, 4046094648u, 0, ATAN2_TOLERANCE, 0},
+{ 548, 1091520173u, 3031712790u, 3252307859u, 170666844u, 1074340271u, 691217786u, 0, ATAN2_TOLERANCE, 0},
+{ 549, 3218862231u, 3148395674u, 1041913758u, 3306391490u, 3220775419u, 1397936212u, 0, ATAN2_TOLERANCE, 0},
+{ 550, 3201277070u, 2205233857u, 3208100078u, 3993195511u, 3221818537u, 1523568185u, 0, ATAN2_TOLERANCE, 0},
+{ 551, 1067699608u, 4282766727u, 1072820377u, 1874778218u, 1067558816u, 3460237978u, 0, ATAN2_TOLERANCE, 0},
+{ 552, 3210833092u, 2920860798u, 3218070226u, 3104066154u, 3221819514u, 1434032788u, 0, ATAN2_TOLERANCE, 0},
+{ 553, 3204950351u, 969991373u, 3250596895u, 1734386152u, 3221823995u, 1413753949u, 0, ATAN2_TOLERANCE, 0},
+{ 554, 3238915818u, 1218740205u, 3239802737u, 2610078504u, 3221562416u, 2532873783u, 0, ATAN2_TOLERANCE, 0},
+{ 555, 3206031242u, 1485218325u, 3220870240u, 3591664613u, 3221823966u, 1068911363u, 0, ATAN2_TOLERANCE, 0},
+{ 556, 3202074143u, 690157417u, 3190850619u, 4192347699u, 3220776028u, 1200694377u, 0, ATAN2_TOLERANCE, 0},
+{ 557, 1096053810u, 4009839784u, 1079670252u, 394167192u, 1073291750u, 2707627380u, 0, ATAN2_TOLERANCE, 0},
+{ 558, 3234559237u, 961532417u, 1092588071u, 2923790239u, 3214660300u, 2118714483u, 0, ATAN2_TOLERANCE, 0},
+{ 559, 3203879091u, 4174125604u, 1050682630u, 2169701868u, 3220752732u, 2940092767u, 0, ATAN2_TOLERANCE, 0},
+{ 560, 3243092475u, 4146748230u, 1087373950u, 2481478351u, 3220770998u, 473091542u, 0, ATAN2_TOLERANCE, 0},
+{ 561, 1076987866u, 3984715440u, 1050421618u, 2446142566u, 1073291771u, 1305948110u, 0, ATAN2_TOLERANCE, 0},
+{ 562, 1084172406u, 936290150u, 1100614426u, 3625806370u, 1056121962u, 2155693925u, 0, ATAN2_TOLERANCE, 0},
+{ 563, 1099787952u, 1866615265u, 3215651428u, 2337013350u, 1073291771u, 1417594236u, 0, ATAN2_TOLERANCE, 0},
+{ 564, 3253198302u, 712227971u, 1106004723u, 973148499u, 3219549310u, 1137203995u, 0, ATAN2_TOLERANCE, 0},
+{ 565, 3230088199u, 3409813738u, 3244817008u, 1933503498u, 3221823964u, 1382018570u, 0, ATAN2_TOLERANCE, 0},
+{ 566, 1079943733u, 3180389060u, 3228735703u, 83422217u, 1074135537u, 1233729334u, 0, ATAN2_TOLERANCE, 0},
+{ 567, 1077878724u, 556972671u, 3204582372u, 841555801u, 1073291772u, 2099425605u, 0, ATAN2_TOLERANCE, 0},
+{ 568, 1070767721u, 4189151332u, 1080874032u, 706326922u, 1062513334u, 56068251u, 0, ATAN2_TOLERANCE, 0},
+{ 569, 1096151307u, 198291836u, 1057281892u, 2188836928u, 1073291771u, 1413723011u, 0, ATAN2_TOLERANCE, 0},
+{ 570, 1078091995u, 1219449298u, 3228734687u, 3504562743u, 1074275855u, 1050043332u, 0, ATAN2_TOLERANCE, 0},
+{ 571, 3204570464u, 1776099219u, 1094316777u, 4188083896u, 3182823388u, 104028836u, 0, ATAN2_TOLERANCE, 0},
+{ 572, 3193845708u, 2614400266u, 1073750227u, 3003203347u, 3192781387u, 1626220884u, 0, ATAN2_TOLERANCE, 0},
+{ 573, 3213982678u, 2959351406u, 1105603716u, 311851587u, 3180936001u, 2419673162u, 0, ATAN2_TOLERANCE, 0},
+{ 574, 1084544434u, 865443613u, 1097532516u, 3622237781u, 1059630438u, 3464345415u, 0, ATAN2_TOLERANCE, 0},
+{ 575, 3231786666u, 447506102u, 3195759295u, 3603669725u, 3220775419u, 1413963663u, 0, ATAN2_TOLERANCE, 0},
+{ 576, 1097890173u, 3934398273u, 1040996422u, 2968621268u, 1073291771u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 577, 3196739825u, 784208771u, 1088764788u, 2182296421u, 3180585169u, 3597293877u, 0, ATAN2_TOLERANCE, 0},
+{ 578, 3248332291u, 1527590526u, 3206961556u, 2823164069u, 3220775419u, 1413760318u, 0, ATAN2_TOLERANCE, 0},
+{ 579, 3236644131u, 3876699591u, 3207481130u, 4028148535u, 3220775419u, 1432381898u, 0, ATAN2_TOLERANCE, 0},
+{ 580, 1083576186u, 2164249756u, 1059857743u, 1785169952u, 1073291771u, 728789785u, 0, ATAN2_TOLERANCE, 0},
+{ 581, 1091804009u, 2079273665u, 1080303860u, 625760474u, 1073291245u, 3038388733u, 0, ATAN2_TOLERANCE, 0},
+{ 582, 3226486108u, 3636214836u, 1068367620u, 2932621925u, 3220774475u, 1873701732u, 0, ATAN2_TOLERANCE, 0},
+{ 583, 1043995372u, 4274131512u, 1047707755u, 92550763u, 1068906481u, 294299579u, 0, ATAN2_TOLERANCE, 0},
+{ 584, 3198822121u, 2648933384u, 1084603503u, 3534304873u, 3186835493u, 2577112950u, 0, ATAN2_TOLERANCE, 0},
+{ 585, 1064563235u, 3216750767u, 3191088629u, 547482628u, 1073291772u, 1457340120u, 0, ATAN2_TOLERANCE, 0},
+{ 586, 1061084774u, 1420360746u, 1080063101u, 1690029499u, 1053688799u, 141831638u, 0, ATAN2_TOLERANCE, 0},
+{ 587, 3229855364u, 1908572179u, 1080112083u, 1228319033u, 3220549842u, 2563506636u, 0, ATAN2_TOLERANCE, 0},
+{ 588, 1048158178u, 500312015u, 3212368508u, 3864619086u, 1074340339u, 347747626u, 0, ATAN2_TOLERANCE, 0},
+{ 589, 3221335610u, 4211343447u, 1087492676u, 4272583781u, 3206528841u, 3354973379u, 0, ATAN2_TOLERANCE, 0},
+{ 590, 1099392394u, 2382118000u, 1042665328u, 567154882u, 1073291771u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 591, 1058013442u, 1435344339u, 3216303171u, 2275988178u, 1074339955u, 491143107u, 0, ATAN2_TOLERANCE, 0},
+{ 592, 3214538619u, 3403659753u, 3218043030u, 1926480488u, 3221770058u, 4164466189u, 0, ATAN2_TOLERANCE, 0},
+{ 593, 1076840383u, 1198845185u, 3225556149u, 1130089684u, 1074126327u, 3636244148u, 0, ATAN2_TOLERANCE, 0},
+{ 594, 3222663042u, 2183928090u, 1048403956u, 963834821u, 3220775419u, 1323885970u, 0, ATAN2_TOLERANCE, 0},
+{ 595, 1101672960u, 2120625396u, 1041006976u, 2137548527u, 1073291771u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 596, 1099230238u, 586700956u, 1059670521u, 303891699u, 1073291771u, 1413734333u, 0, ATAN2_TOLERANCE, 0},
+{ 597, 3218994498u, 2509132460u, 1102827530u, 2205707903u, 3188800500u, 294117429u, 0, ATAN2_TOLERANCE, 0},
+{ 598, 3204860597u, 1229308263u, 3209170414u, 4206576047u, 3221793662u, 1326681588u, 0, ATAN2_TOLERANCE, 0},
+{ 599, 3224076289u, 4078010749u, 3199236456u, 733478972u, 3220775419u, 1735373547u, 0, ATAN2_TOLERANCE, 0},
+{ 600, 3197712584u, 4277541051u, 3199806921u, 397102023u, 3221695345u, 1984385336u, 0, ATAN2_TOLERANCE, 0},
+{ 601, 3195975013u, 900999594u, 3234720188u, 2530214248u, 3221823995u, 1413737317u, 0, ATAN2_TOLERANCE, 0},
+{ 602, 1076543548u, 4000609478u, 1096577064u, 4148592328u, 1052645882u, 3518566757u, 0, ATAN2_TOLERANCE, 0},
+{ 603, 1048668084u, 2154187873u, 3224392607u, 3957250362u, 1074340347u, 1395868720u, 0, ATAN2_TOLERANCE, 0},
+{ 604, 3223413488u, 2867079200u, 1101870326u, 921212001u, 3194162327u, 3750694524u, 0, ATAN2_TOLERANCE, 0},
+{ 605, 3233221890u, 674547716u, 1063216239u, 3929755226u, 3220775418u, 4246419046u, 0, ATAN2_TOLERANCE, 0},
+{ 606, 3240415851u, 3158182449u, 1043794244u, 3259056345u, 3220775419u, 1413754101u, 0, ATAN2_TOLERANCE, 0},
+{ 607, 3236776656u, 3002823940u, 1059511739u, 2832435794u, 3220775419u, 1400657488u, 0, ATAN2_TOLERANCE, 0},
+{ 608, 3217304822u, 2196511929u, 1049973941u, 3672092877u, 3220775417u, 921891724u, 0, ATAN2_TOLERANCE, 0},
+{ 609, 1050438056u, 3655292191u, 1086438127u, 3567072906u, 1036624858u, 475016719u, 0, ATAN2_TOLERANCE, 0},
+{ 610, 3243186948u, 1617573614u, 3201863123u, 3090723732u, 3220775419u, 1413760603u, 0, ATAN2_TOLERANCE, 0},
+{ 611, 3233201380u, 679893506u, 3211547753u, 824081024u, 3220775419u, 4089363966u, 0, ATAN2_TOLERANCE, 0},
+{ 612, 1089530525u, 2285242807u, 1084999409u, 2221731406u, 1073238012u, 3737306125u, 0, ATAN2_TOLERANCE, 0},
+{ 613, 3206733664u, 1935990727u, 1088822246u, 1058156518u, 3190509777u, 202615889u, 0, ATAN2_TOLERANCE, 0},
+{ 614, 1102839166u, 521023584u, 1059186903u, 4245163857u, 1073291771u, 1413752826u, 0, ATAN2_TOLERANCE, 0},
+{ 615, 1103891140u, 2312887617u, 3191771354u, 1885370807u, 1073291771u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 616, 3252953815u, 1796441468u, 1100030327u, 2772711004u, 3220747548u, 2609071137u, 0, ATAN2_TOLERANCE, 0},
+{ 617, 3204276820u, 2095685003u, 1077984448u, 2100773742u, 3198949108u, 3506668202u, 0, ATAN2_TOLERANCE, 0},
+{ 618, 3192954620u, 2892538035u, 1042396334u, 4162200338u, 3220636609u, 2779526109u, 0, ATAN2_TOLERANCE, 0},
+{ 619, 3242725751u, 2177698116u, 3227557177u, 150832500u, 3220775463u, 2181727803u, 0, ATAN2_TOLERANCE, 0},
+{ 620, 3191562216u, 607966734u, 3236250630u, 4164600559u, 3221823995u, 1413753807u, 0, ATAN2_TOLERANCE, 0},
+{ 621, 3216389812u, 2830122967u, 1046096700u, 3713346883u, 3220775419u, 148829918u, 0, ATAN2_TOLERANCE, 0},
+{ 622, 3237197963u, 2314640506u, 3203696416u, 3276228872u, 3220775419u, 1414845619u, 0, ATAN2_TOLERANCE, 0},
+{ 623, 3212912307u, 469331883u, 3249037349u, 2999233437u, 3221823995u, 1413661911u, 0, ATAN2_TOLERANCE, 0},
+{ 624, 1097382011u, 560886625u, 1091899487u, 748795120u, 1073263856u, 4163257255u, 0, ATAN2_TOLERANCE, 0},
+{ 625, 1049886858u, 2958421324u, 1092569414u, 3235243477u, 1029993820u, 2650395805u, 0, ATAN2_TOLERANCE, 0},
+{ 626, 3193026497u, 3221475559u, 1043038304u, 915608434u, 3220574466u, 4033073907u, 0, ATAN2_TOLERANCE, 0},
+{ 627, 1071197530u, 3007808652u, 3216682290u, 2531019474u, 1073563291u, 393357359u, 0, ATAN2_TOLERANCE, 0},
+{ 628, 3242028999u, 1767658578u, 3237045269u, 2313128318u, 3220814119u, 4061758705u, 0, ATAN2_TOLERANCE, 0},
+{ 629, 3210617892u, 1926845182u, 1066835624u, 1783256828u, 3216328042u, 4025987202u, 0, ATAN2_TOLERANCE, 0},
+{ 630, 1040575629u, 90378038u, 1057168870u, 164358218u, 1056070011u, 3438784268u, 0, ATAN2_TOLERANCE, 0},
+{ 631, 1106859172u, 1610524680u, 1085283851u, 2903496007u, 1073291770u, 2975921270u, 0, ATAN2_TOLERANCE, 0},
+{ 632, 1078635586u, 4274321404u, 3202913591u, 720121831u, 1073291771u, 2403360128u, 0, ATAN2_TOLERANCE, 0},
+{ 633, 1051205256u, 2034778236u, 1071133763u, 1413236391u, 1052762949u, 1804888531u, 0, ATAN2_TOLERANCE, 0},
+{ 634, 1051063028u, 1489112261u, 1076691395u, 348210906u, 1047017153u, 543502372u, 0, ATAN2_TOLERANCE, 0},
+{ 635, 3206743917u, 2797651324u, 3224410527u, 2374818327u, 3221823990u, 3194962175u, 0, ATAN2_TOLERANCE, 0},
+{ 636, 1088287256u, 1823161666u, 3197810695u, 3119680047u, 1073291771u, 1413812610u, 0, ATAN2_TOLERANCE, 0},
+{ 637, 1065927336u, 3420950657u, 1087084743u, 2136638961u, 1051506182u, 645526797u, 0, ATAN2_TOLERANCE, 0},
+{ 638, 1069902224u, 3554566429u, 1062907717u, 2736702589u, 1073281562u, 2426331355u, 0, ATAN2_TOLERANCE, 0},
+{ 639, 3244888667u, 2928437580u, 3187765027u, 1393427873u, 3220775419u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 640, 3209301561u, 189447067u, 1051643315u, 828663513u, 3220774208u, 3143699731u, 0, ATAN2_TOLERANCE, 0},
+{ 641, 1052313869u, 2852350928u, 1045683757u, 673354280u, 1073278769u, 3336064018u, 0, ATAN2_TOLERANCE, 0},
+{ 642, 1043946301u, 3589563265u, 3248741629u, 812657927u, 1074340347u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 643, 3190610826u, 1766416701u, 1100392103u, 2185373290u, 3162792535u, 3345390793u, 0, ATAN2_TOLERANCE, 0},
+{ 644, 3220275389u, 3763582673u, 3191965790u, 388374829u, 3220775419u, 1447365675u, 0, ATAN2_TOLERANCE, 0},
+{ 645, 1079635136u, 1187403069u, 1075300235u, 336640304u, 1073231724u, 1380720998u, 0, ATAN2_TOLERANCE, 0},
+{ 646, 1103926251u, 1718795752u, 3243118752u, 683369237u, 1073296080u, 1944358343u, 0, ATAN2_TOLERANCE, 0},
+{ 647, 3210792097u, 1863545307u, 1069449477u, 3418627399u, 3213991705u, 3440225918u, 0, ATAN2_TOLERANCE, 0},
+{ 648, 1069601294u, 3295607249u, 1068878592u, 1633297809u, 1072684782u, 1392514266u, 0, ATAN2_TOLERANCE, 0},
+{ 649, 1058947127u, 2585980994u, 3236670483u, 1286750688u, 1074340347u, 1409168979u, 0, ATAN2_TOLERANCE, 0},
+{ 650, 1046157033u, 15816845u, 3233249283u, 2491924775u, 1074340347u, 1413744680u, 0, ATAN2_TOLERANCE, 0},
+{ 651, 1042413021u, 1051983351u, 1049180786u, 1474421917u, 1065797572u, 550508248u, 0, ATAN2_TOLERANCE, 0},
+{ 652, 3201249525u, 2003816032u, 1086050104u, 668090487u, 3187798553u, 386045479u, 0, ATAN2_TOLERANCE, 0},
+{ 653, 1052556037u, 3671484625u, 1067020039u, 430024694u, 1058149106u, 738340401u, 0, ATAN2_TOLERANCE, 0},
+{ 654, 1067397110u, 3991830201u, 3207808714u, 1021245839u, 1073301897u, 3275314629u, 0, ATAN2_TOLERANCE, 0},
+{ 655, 1064194391u, 4255801807u, 3207681716u, 1926756877u, 1073366603u, 4187390466u, 0, ATAN2_TOLERANCE, 0},
+{ 656, 1052140785u, 4167786896u, 1077097744u, 1775517981u, 1047701412u, 2769143733u, 0, ATAN2_TOLERANCE, 0},
+{ 657, 1085601978u, 3187518564u, 1082437406u, 944672491u, 1073163145u, 2304339909u, 0, ATAN2_TOLERANCE, 0},
+{ 658, 1049366282u, 953085192u, 3227310828u, 3459155777u, 1074340347u, 1409675598u, 0, ATAN2_TOLERANCE, 0},
+{ 659, 1069502506u, 1908555460u, 1073640207u, 260441967u, 1068527205u, 3011997510u, 0, ATAN2_TOLERANCE, 0},
+{ 660, 1067219606u, 250762477u, 1072582645u, 2886742039u, 1067322952u, 2531443543u, 0, ATAN2_TOLERANCE, 0},
+{ 661, 3250906006u, 786180031u, 3197734769u, 2788918312u, 3220775419u, 1413754139u, 0, ATAN2_TOLERANCE, 0},
+{ 662, 3234511827u, 2055912467u, 3244244909u, 1394142937u, 3221823119u, 1223534454u, 0, ATAN2_TOLERANCE, 0},
+{ 663, 1069612985u, 91984146u, 3222252812u, 4126276047u, 1074322768u, 4161006152u, 0, ATAN2_TOLERANCE, 0},
+{ 664, 1081340139u, 3942715706u, 3239316352u, 410676547u, 1074339837u, 4214439887u, 0, ATAN2_TOLERANCE, 0},
+{ 665, 3198557846u, 86296211u, 1085850694u, 649202596u, 3185349731u, 1378952538u, 0, ATAN2_TOLERANCE, 0},
+{ 666, 3245366392u, 3069064472u, 3237358008u, 23209276u, 3220780967u, 3151936427u, 0, ATAN2_TOLERANCE, 0},
+{ 667, 1081235288u, 1867297860u, 1072956607u, 2513414118u, 1073287300u, 3286497747u, 0, ATAN2_TOLERANCE, 0},
+{ 668, 3250533347u, 3171788768u, 3235208783u, 162138697u, 3220775463u, 678532829u, 0, ATAN2_TOLERANCE, 0},
+{ 669, 1081728455u, 1245110700u, 1081653954u, 2584994077u, 1072290306u, 1387932236u, 0, ATAN2_TOLERANCE, 0},
+{ 670, 3245510120u, 3347226587u, 1058962932u, 2291943376u, 3220775419u, 1413727211u, 0, ATAN2_TOLERANCE, 0},
+{ 671, 1058899062u, 966940828u, 1060726420u, 2798041096u, 1070733396u, 2152071558u, 0, ATAN2_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1074290700u, 4010416330u, 0, ATAN2_TOLERANCE, 0},
+{ 673, 3248116497u, 1671039260u, 1086395032u, 3745833360u, 3220775336u, 1353975065u, 0, ATAN2_TOLERANCE, 0},
+{ 674, 1057078797u, 651714217u, 1047070645u, 2130549237u, 1073290326u, 3091630475u, 0, ATAN2_TOLERANCE, 0},
+{ 675, 3207115731u, 1423000172u, 3247822717u, 1551488170u, 3221823995u, 1413749504u, 0, ATAN2_TOLERANCE, 0},
+{ 676, 3201597307u, 921077236u, 3213332351u, 1431049019u, 3221823772u, 2602079138u, 0, ATAN2_TOLERANCE, 0},
+{ 677, 1067510295u, 655715547u, 3190985373u, 1527556471u, 1073291771u, 2003260141u, 0, ATAN2_TOLERANCE, 0},
+{ 678, 3227654979u, 4110878657u, 3251297180u, 879739345u, 3221823995u, 1051816922u, 0, ATAN2_TOLERANCE, 0},
+{ 679, 1085804762u, 2623955764u, 1093699897u, 1216444475u, 1064782100u, 2170004731u, 0, ATAN2_TOLERANCE, 0},
+{ 680, 1091905603u, 107442539u, 3239767031u, 1149813329u, 1073991133u, 3276387394u, 0, ATAN2_TOLERANCE, 0},
+{ 681, 3233445240u, 1761361082u, 3226030205u, 1121849716u, 3220783256u, 3628350787u, 0, ATAN2_TOLERANCE, 0},
+{ 682, 3240087115u, 2534144722u, 1044223733u, 3512285706u, 3220775419u, 1413754077u, 0, ATAN2_TOLERANCE, 0},
+{ 683, 3211846077u, 4073670723u, 1050729852u, 3034818849u, 3220775291u, 1955003682u, 0, ATAN2_TOLERANCE, 0},
+{ 684, 1101984574u, 1421423503u, 1060278048u, 1397153092u, 1073291771u, 1413749224u, 0, ATAN2_TOLERANCE, 0},
+{ 685, 3217421829u, 1649206019u, 1104525577u, 1267104290u, 3185585387u, 586885303u, 0, ATAN2_TOLERANCE, 0},
+{ 686, 3189302097u, 3775270392u, 1040251850u, 68667319u, 3220430633u, 299595201u, 0, ATAN2_TOLERANCE, 0},
+{ 687, 3204330900u, 3099226694u, 3254103006u, 4020102648u, 3221823995u, 1413754125u, 0, ATAN2_TOLERANCE, 0},
+{ 688, 3201591712u, 3718441177u, 3215643451u, 4032951536u, 3221823946u, 2698546149u, 0, ATAN2_TOLERANCE, 0},
+{ 689, 1044131371u, 508048351u, 3210196713u, 1707937896u, 1074340344u, 4091089530u, 0, ATAN2_TOLERANCE, 0},
+{ 690, 3198611627u, 2784738160u, 1073435430u, 1109346010u, 3197820279u, 3513523264u, 0, ATAN2_TOLERANCE, 0},
+{ 691, 3225725290u, 3331916473u, 3238794568u, 2707019594u, 3221823901u, 665368638u, 0, ATAN2_TOLERANCE, 0},
+{ 692, 1093182670u, 3093165197u, 1072894805u, 2853215019u, 1073291769u, 3354646889u, 0, ATAN2_TOLERANCE, 0},
+{ 693, 3216582139u, 2135797997u, 1048399559u, 2941926126u, 3220775418u, 703396355u, 0, ATAN2_TOLERANCE, 0},
+{ 694, 1048430980u, 2083412145u, 3249335391u, 507212448u, 1074340347u, 1413754135u, 0, ATAN2_TOLERANCE, 0},
+{ 695, 1075363751u, 4270176401u, 3246546709u, 3288753319u, 1074340347u, 1052137291u, 0, ATAN2_TOLERANCE, 0},
+{ 696, 3247932863u, 3692175292u, 3197271515u, 3989064196u, 3220775419u, 1413754149u, 0, ATAN2_TOLERANCE, 0},
+{ 697, 3251691738u, 3111924274u, 1066772558u, 59281695u, 3220775419u, 1413670044u, 0, ATAN2_TOLERANCE, 0},
+{ 698, 1067683911u, 2135245466u, 3208804313u, 3846547392u, 1073307236u, 3521042184u, 0, ATAN2_TOLERANCE, 0},
+{ 699, 1094877811u, 972051266u, 3222814246u, 3539700586u, 1073291773u, 4074425891u, 0, ATAN2_TOLERANCE, 0},
+{ 700, 3202965930u, 330951080u, 1079189813u, 583922384u, 3196402333u, 892154681u, 0, ATAN2_TOLERANCE, 0},
+{ 701, 1089640092u, 1711944085u, 1104170032u, 643991456u, 1058160566u, 3592673961u, 0, ATAN2_TOLERANCE, 0},
+{ 702, 3234429549u, 2072550721u, 3250147641u, 4280263530u, 3221823979u, 976904869u, 0, ATAN2_TOLERANCE, 0},
+{ 703, 3192972706u, 1566376352u, 1067251433u, 72984588u, 3198331639u, 58854265u, 0, ATAN2_TOLERANCE, 0},
+{ 704, 1095276569u, 3103043079u, 1045853123u, 410067497u, 1073291771u, 1413754107u, 0, ATAN2_TOLERANCE, 0},
+{ 705, 3216672493u, 1910366299u, 1081770885u, 634683073u, 3207594510u, 1614453351u, 0, ATAN2_TOLERANCE, 0},
+{ 706, 1081530688u, 2226525875u, 3224149290u, 2126302825u, 1073332786u, 2544037221u, 0, ATAN2_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1073291771u, 1503809650u, 0, ATAN2_TOLERANCE, 0},
+{ 708, 1066482943u, 1953339096u, 1077176252u, 1476516558u, 1061882003u, 4129058843u, 0, ATAN2_TOLERANCE, 0},
+{ 709, 1066092000u, 1306277326u, 1079089150u, 4093716191u, 1059638635u, 2919242557u, 0, ATAN2_TOLERANCE, 0},
+{ 710, 3233148787u, 51750045u, 3242913901u, 4256866157u, 3221823161u, 2290088398u, 0, ATAN2_TOLERANCE, 0},
+{ 711, 3195084967u, 2163853087u, 3232053146u, 2962422808u, 3221823995u, 1413701232u, 0, ATAN2_TOLERANCE, 0},
+{ 712, 1075516945u, 1618388148u, 3233154824u, 3711953164u, 1074339717u, 3204214582u, 0, ATAN2_TOLERANCE, 0},
+{ 713, 3246868002u, 357108214u, 3202294604u, 2306775262u, 3220775419u, 1413754821u, 0, ATAN2_TOLERANCE, 0},
+{ 714, 3201904086u, 2571356437u, 3249064063u, 2394851808u, 3221823995u, 1413754071u, 0, ATAN2_TOLERANCE, 0},
+{ 715, 3230488091u, 4273880094u, 1103698617u, 3578832032u, 3199382139u, 1688527123u, 0, ATAN2_TOLERANCE, 0},
+{ 716, 3233426701u, 2091068742u, 3228270226u, 3980489730u, 3220809825u, 1922530241u, 0, ATAN2_TOLERANCE, 0},
+{ 717, 3229016752u, 2772307714u, 1051008486u, 32546576u, 3220775419u, 1406013846u, 0, ATAN2_TOLERANCE, 0},
+{ 718, 3241229215u, 2143788498u, 3195498043u, 3630119231u, 3220775419u, 1413754484u, 0, ATAN2_TOLERANCE, 0},
+{ 719, 3198632935u, 2527385594u, 3240503648u, 3482095012u, 3221823995u, 1413751986u, 0, ATAN2_TOLERANCE, 0},
+{ 720, 3242168799u, 2690097362u, 1068598730u, 2360266862u, 3220775419u, 1264760787u, 0, ATAN2_TOLERANCE, 0},
+{ 721, 1058857869u, 2673272949u, 1082639557u, 522449749u, 1048801884u, 2557353137u, 0, ATAN2_TOLERANCE, 0},
+{ 722, 1104424147u, 3596379400u, 3242016775u, 2002293002u, 1073293255u, 4018883609u, 0, ATAN2_TOLERANCE, 0},
+{ 723, 1099439656u, 4113224369u, 3222122439u, 2152316893u, 1073291771u, 1744171590u, 0, ATAN2_TOLERANCE, 0},
+{ 724, 3220796716u, 31662602u, 1047721249u, 1747087514u, 3220775419u, 1213858796u, 0, ATAN2_TOLERANCE, 0},
+{ 725, 3250463757u, 2489659568u, 1097051253u, 277506957u, 3220754033u, 3507098293u, 0, ATAN2_TOLERANCE, 0},
+{ 726, 3191401834u, 3850162281u, 3213841942u, 438724093u, 3221823995u, 559612876u, 0, ATAN2_TOLERANCE, 0},
+{ 727, 1095392535u, 2431814052u, 1075518084u, 2672434118u, 1073291769u, 1172661418u, 0, ATAN2_TOLERANCE, 0},
+{ 728, 3243162735u, 391606792u, 1048184750u, 4168944276u, 3220775419u, 1413754028u, 0, ATAN2_TOLERANCE, 0},
+{ 729, 3247792416u, 457529672u, 3201090276u, 72407935u, 3220775419u, 1413754308u, 0, ATAN2_TOLERANCE, 0},
+{ 730, 3218720719u, 3954981400u, 1052053242u, 2411049585u, 3220775416u, 265482486u, 0, ATAN2_TOLERANCE, 0},
+{ 731, 1086180091u, 485456950u, 1088415093u, 1655397424u, 1070423314u, 2140711951u, 0, ATAN2_TOLERANCE, 0},
+{ 732, 3198234428u, 1551748070u, 3236871640u, 1329701152u, 3221823995u, 1413735819u, 0, ATAN2_TOLERANCE, 0},
+{ 733, 3224639122u, 3099222537u, 1104984570u, 4293792842u, 3192283287u, 3180534849u, 0, ATAN2_TOLERANCE, 0},
+{ 734, 3203949705u, 3603065260u, 3197735968u, 2402359253u, 3220792598u, 1407700740u, 0, ATAN2_TOLERANCE, 0},
+{ 735, 3198824584u, 3961208159u, 3219057584u, 2340553876u, 3221823994u, 2070913575u, 0, ATAN2_TOLERANCE, 0},
+{ 736, 1074881909u, 4014841779u, 3197672877u, 3697233334u, 1073291771u, 1793592252u, 0, ATAN2_TOLERANCE, 0},
+{ 737, 3213275657u, 1403876392u, 3254028950u, 921363393u, 3221823995u, 1413749611u, 0, ATAN2_TOLERANCE, 0},
+{ 738, 1107251806u, 1862576361u, 3194031708u, 2476290925u, 1073291771u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 739, 1049661768u, 1454212851u, 1088378861u, 3400401866u, 1033955871u, 433439011u, 0, ATAN2_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 1073291771u, 1414986120u, 0, ATAN2_TOLERANCE, 0},
+{ 741, 3216409282u, 1199568671u, 3225679997u, 46947405u, 3221822841u, 368629664u, 0, ATAN2_TOLERANCE, 0},
+{ 742, 1077685537u, 2596231448u, 3253943728u, 2219151748u, 1074340347u, 1401469941u, 0, ATAN2_TOLERANCE, 0},
+{ 743, 1066527035u, 4119719558u, 3222036299u, 1275474618u, 1074337761u, 2544098624u, 0, ATAN2_TOLERANCE, 0},
+{ 744, 3239908663u, 3347296825u, 1101507910u, 1254014794u, 3210979126u, 546260523u, 0, ATAN2_TOLERANCE, 0},
+{ 745, 1084119992u, 673775040u, 1070743626u, 244126093u, 1073291617u, 1822008293u, 0, ATAN2_TOLERANCE, 0},
+{ 746, 3203199850u, 1832066983u, 1051358028u, 3262483417u, 3220715608u, 2372960006u, 0, ATAN2_TOLERANCE, 0},
+{ 747, 1077559600u, 3962610501u, 3198598777u, 849269178u, 1073291771u, 1530025068u, 0, ATAN2_TOLERANCE, 0},
+{ 748, 3235473900u, 2497516122u, 3254374111u, 2821429629u, 3221823993u, 1545003765u, 0, ATAN2_TOLERANCE, 0},
+{ 749, 1076236288u, 2805941787u, 3217785843u, 779131141u, 1073312202u, 752599186u, 0, ATAN2_TOLERANCE, 0},
+{ 750, 3226908686u, 723423605u, 1084533420u, 627282213u, 3215037690u, 1099146425u, 0, ATAN2_TOLERANCE, 0},
+{ 751, 3215947680u, 4292778869u, 1078101071u, 1676860147u, 3210424496u, 1927458872u, 0, ATAN2_TOLERANCE, 0},
+{ 752, 1076288502u, 3528118587u, 3194648564u, 2363260897u, 1073291771u, 1433180377u, 0, ATAN2_TOLERANCE, 0},
+{ 753, 3192897879u, 1307010018u, 1061248120u, 1468743108u, 3204269045u, 482593707u, 0, ATAN2_TOLERANCE, 0},
+{ 754, 3246583139u, 107905661u, 3226089788u, 1943427674u, 3220775420u, 3069422109u, 0, ATAN2_TOLERANCE, 0},
+{ 755, 3188230541u, 760006940u, 1054265604u, 1749976597u, 3206624492u, 1915116447u, 0, ATAN2_TOLERANCE, 0},
+{ 756, 3237773384u, 2787503556u, 1081282610u, 1195841206u, 3220772679u, 2931651306u, 0, ATAN2_TOLERANCE, 0},
+{ 757, 3191802156u, 545462045u, 3208381743u, 1981311808u, 3221823986u, 2010884417u, 0, ATAN2_TOLERANCE, 0},
+{ 758, 1061232136u, 3657978397u, 1104463616u, 3501253426u, 1029332208u, 1488430477u, 0, ATAN2_TOLERANCE, 0},
+{ 759, 1049883857u, 1804177501u, 3210693633u, 3606766729u, 1074340265u, 3051910954u, 0, ATAN2_TOLERANCE, 0},
+{ 760, 1076856879u, 1336278526u, 1043741618u, 3165279431u, 1073291771u, 1412275434u, 0, ATAN2_TOLERANCE, 0},
+{ 761, 1055471915u, 1599382075u, 1058018527u, 4212580517u, 1070122997u, 3364139310u, 0, ATAN2_TOLERANCE, 0},
+{ 762, 3207502326u, 3007589929u, 3202026547u, 2792028313u, 3220804374u, 2593366982u, 0, ATAN2_TOLERANCE, 0},
+{ 763, 3253082770u, 1866066996u, 1060329048u, 3727175322u, 3220775419u, 1413753688u, 0, ATAN2_TOLERANCE, 0},
+{ 764, 3198416643u, 150890940u, 1056025306u, 3082724735u, 3215069881u, 3889068227u, 0, ATAN2_TOLERANCE, 0},
+{ 765, 1062008939u, 80400395u, 1093584426u, 3478941315u, 1041113051u, 1338284599u, 0, ATAN2_TOLERANCE, 0},
+{ 766, 3251640614u, 4050954182u, 3219263194u, 2537475930u, 3220775419u, 1416106592u, 0, ATAN2_TOLERANCE, 0},
+{ 767, 1064841871u, 2881752155u, 3212589299u, 2559651278u, 1073968750u, 275989965u, 0, ATAN2_TOLERANCE, 0},
+{ 768, 3249016304u, 440309030u, 3214267461u, 3788040806u, 3220775419u, 1414229923u, 0, ATAN2_TOLERANCE, 0},
+{ 769, 1100476615u, 918813144u, 3208535698u, 1607035904u, 1073291771u, 1413774920u, 0, ATAN2_TOLERANCE, 0},
+{ 770, 1042137451u, 2497054124u, 1089139147u, 2549609010u, 1025616722u, 2513164301u, 0, ATAN2_TOLERANCE, 0},
+{ 771, 1047037641u, 790219083u, 1054657139u, 2797979479u, 1065042572u, 1694162441u, 0, ATAN2_TOLERANCE, 0},
+{ 772, 1057781400u, 1149462078u, 1095765205u, 3879963182u, 1034706901u, 248813312u, 0, ATAN2_TOLERANCE, 0},
+{ 773, 3202729813u, 2684353926u, 3205212854u, 1732474928u, 3221722120u, 2311307993u, 0, ATAN2_TOLERANCE, 0},
+{ 774, 1095236965u, 2742237025u, 1051317716u, 3386396147u, 1073291771u, 1413753034u, 0, ATAN2_TOLERANCE, 0},
+{ 775, 1063230986u, 3408320912u, 1103071166u, 4233059513u, 1032850256u, 1811766756u, 0, ATAN2_TOLERANCE, 0},
+{ 776, 1064863548u, 1077495917u, 1088399968u, 433115118u, 1049151887u, 2167853176u, 0, ATAN2_TOLERANCE, 0},
+{ 777, 3204547572u, 841366493u, 1051716814u, 4121125128u, 3220745564u, 2691718244u, 0, ATAN2_TOLERANCE, 0},
+{ 778, 1064632084u, 321857207u, 1089128010u, 1149988239u, 1048123417u, 2145888320u, 0, ATAN2_TOLERANCE, 0},
+{ 779, 3245542663u, 799866606u, 3197637091u, 3924438208u, 3220775419u, 1413754217u, 0, ATAN2_TOLERANCE, 0},
+{ 780, 3191062890u, 2002049816u, 1077053447u, 2240354761u, 3186691732u, 124527913u, 0, ATAN2_TOLERANCE, 0},
+{ 781, 3229006283u, 478939968u, 1097035749u, 1066716440u, 3204625670u, 352490214u, 0, ATAN2_TOLERANCE, 0},
+{ 782, 3232473641u, 1653104725u, 1088548129u, 81977716u, 3216545426u, 3469149501u, 0, ATAN2_TOLERANCE, 0},
+{ 783, 3196861276u, 3899475018u, 3189694084u, 3330093036u, 3220784376u, 1632762114u, 0, ATAN2_TOLERANCE, 0},
+{ 784, 1089312583u, 2612450289u, 1079065127u, 603380842u, 1073290579u, 134776887u, 0, ATAN2_TOLERANCE, 0},
+{ 785, 1100636791u, 3962735564u, 1101570429u, 1372490825u, 1071609951u, 4174474007u, 0, ATAN2_TOLERANCE, 0},
+{ 786, 1054806016u, 1479841439u, 1059312257u, 541504905u, 1068043651u, 1103081642u, 0, ATAN2_TOLERANCE, 0},
+{ 787, 1078662178u, 2626148789u, 1057571099u, 4121656076u, 1073291770u, 1703111061u, 0, ATAN2_TOLERANCE, 0},
+{ 788, 1081613389u, 1902560314u, 1043130231u, 3557671562u, 1073291771u, 1413714853u, 0, ATAN2_TOLERANCE, 0},
+{ 789, 3193829772u, 41779312u, 1081626342u, 831171823u, 3184769750u, 931842167u, 0, ATAN2_TOLERANCE, 0},
+{ 790, 1058131100u, 1393168821u, 1066457405u, 1381616968u, 1064363798u, 3338784388u, 0, ATAN2_TOLERANCE, 0},
+{ 791, 1072338141u, 3756584649u, 3222267229u, 1423157432u, 1074232654u, 3847296290u, 0, ATAN2_TOLERANCE, 0},
+{ 792, 3254435674u, 1894912556u, 1042426694u, 155024547u, 3220775419u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 793, 3195453512u, 35164295u, 3203391785u, 1037041084u, 3221821072u, 921668424u, 0, ATAN2_TOLERANCE, 0},
+{ 794, 1084777479u, 3957875950u, 3232195211u, 1590756436u, 1073917536u, 1948610443u, 0, ATAN2_TOLERANCE, 0},
+{ 795, 1068844322u, 1447585080u, 1071279485u, 1107922438u, 1070164574u, 3625167357u, 0, ATAN2_TOLERANCE, 0},
+{ 796, 1046252518u, 981897615u, 1051856116u, 430357614u, 1067011170u, 354654443u, 0, ATAN2_TOLERANCE, 0},
+{ 797, 3227524215u, 395145384u, 3219821938u, 50586510u, 3220782177u, 3061517349u, 0, ATAN2_TOLERANCE, 0},
+{ 798, 1069775912u, 750827797u, 1082862669u, 230466783u, 1059516989u, 1833533046u, 0, ATAN2_TOLERANCE, 0},
+{ 799, 1086668819u, 1365083575u, 3204848310u, 1700831722u, 1073291771u, 1431205630u, 0, ATAN2_TOLERANCE, 0},
+{ 800, 3218090390u, 344241827u, 1071538935u, 2715566077u, 3219081495u, 709990262u, 0, ATAN2_TOLERANCE, 0},
+{ 801, 3247582856u, 4069301823u, 3193208760u, 2949125229u, 3220775419u, 1413754137u, 0, ATAN2_TOLERANCE, 0},
+{ 802, 1103231387u, 3585711710u, 1065801594u, 2302229267u, 1073291771u, 1413670857u, 0, ATAN2_TOLERANCE, 0},
+{ 803, 3194118956u, 709803845u, 1048741487u, 2296910194u, 3218022939u, 534303821u, 0, ATAN2_TOLERANCE, 0},
+{ 804, 3193280779u, 744421179u, 1069302001u, 2659232829u, 3196614187u, 2494083211u, 0, ATAN2_TOLERANCE, 0},
+{ 805, 1092835968u, 1799949903u, 3192522886u, 4212149209u, 1073291771u, 1413754222u, 0, ATAN2_TOLERANCE, 0},
+{ 806, 3206108502u, 145234164u, 3250614064u, 912384201u, 3221823995u, 1413753742u, 0, ATAN2_TOLERANCE, 0},
+{ 807, 3240510664u, 2784620507u, 1102812948u, 3531481022u, 3210335220u, 3011373223u, 0, ATAN2_TOLERANCE, 0},
+{ 808, 3251159663u, 383952592u, 3205659905u, 3633194728u, 3220775419u, 1413754519u, 0, ATAN2_TOLERANCE, 0},
+{ 809, 3203476252u, 3792395543u, 1070072378u, 3864816376u, 3205947910u, 772395157u, 0, ATAN2_TOLERANCE, 0},
+{ 810, 3205316273u, 2115553675u, 1066288499u, 3538377867u, 3211717170u, 2903498297u, 0, ATAN2_TOLERANCE, 0},
+{ 811, 3252075185u, 1230026762u, 1090719723u, 440819880u, 3220775311u, 4210718762u, 0, ATAN2_TOLERANCE, 0},
+{ 812, 3194595076u, 2991290482u, 1096886719u, 1097971167u, 3170363903u, 1152911974u, 0, ATAN2_TOLERANCE, 0},
+{ 813, 1090048600u, 1098035020u, 3230900504u, 1479059095u, 1073304727u, 1466275977u, 0, ATAN2_TOLERANCE, 0},
+{ 814, 3251056964u, 1719428427u, 3188631907u, 3707377409u, 3220775419u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 815, 1053236165u, 3748932896u, 1084908557u, 1325384361u, 1040975136u, 1061872090u, 0, ATAN2_TOLERANCE, 0},
+{ 816, 1084704076u, 3979168763u, 1057455255u, 2454615952u, 1073291771u, 1346022414u, 0, ATAN2_TOLERANCE, 0},
+{ 817, 1053106984u, 1449164578u, 1056960316u, 1654931641u, 1068835310u, 2233667149u, 0, ATAN2_TOLERANCE, 0},
+{ 818, 1071439010u, 2120487381u, 3226298974u, 2364226633u, 1074336328u, 2154761046u, 0, ATAN2_TOLERANCE, 0},
+{ 819, 1075071428u, 1074268944u, 1065730444u, 280016852u, 1073289575u, 665876277u, 0, ATAN2_TOLERANCE, 0},
+{ 820, 3200308256u, 3315127889u, 3236295594u, 2900924954u, 3221823995u, 1413653654u, 0, ATAN2_TOLERANCE, 0},
+{ 821, 3196425891u, 2246037502u, 1049691002u, 1496066550u, 3219265397u, 3120866378u, 0, ATAN2_TOLERANCE, 0},
+{ 822, 3193006859u, 4191285446u, 3217936236u, 2382392789u, 3221823995u, 1256907098u, 0, ATAN2_TOLERANCE, 0},
+{ 823, 1092833308u, 640099844u, 1042152237u, 2064279383u, 1073291771u, 1413754124u, 0, ATAN2_TOLERANCE, 0},
+{ 824, 1079913438u, 3468560824u, 1093251038u, 310958750u, 1059244818u, 1996287231u, 0, ATAN2_TOLERANCE, 0},
+{ 825, 1096788400u, 1413568905u, 1100941106u, 1627289946u, 1068518947u, 593268660u, 0, ATAN2_TOLERANCE, 0},
+{ 826, 3191549550u, 3797143370u, 3195497539u, 3843275034u, 3221786035u, 3455361964u, 0, ATAN2_TOLERANCE, 0},
+{ 827, 3252077393u, 2806642640u, 3201943068u, 2515980718u, 3220775419u, 1413754154u, 0, ATAN2_TOLERANCE, 0},
+{ 828, 1086877316u, 632580632u, 1078673506u, 3259601317u, 1073287202u, 2642395946u, 0, ATAN2_TOLERANCE, 0},
+{ 829, 3200980575u, 3309678799u, 1049337078u, 3056787074u, 3220708701u, 2221508932u, 0, ATAN2_TOLERANCE, 0},
+{ 830, 3221495289u, 2341164249u, 1080834967u, 2810890005u, 3213282538u, 2235616094u, 0, ATAN2_TOLERANCE, 0},
+{ 831, 1067019674u, 932124675u, 1093915797u, 662682630u, 1045726264u, 1944163328u, 0, ATAN2_TOLERANCE, 0},
+{ 832, 3249230091u, 1367996113u, 3251723684u, 2974064663u, 3221722205u, 213023999u, 0, ATAN2_TOLERANCE, 0},
+{ 833, 1080230731u, 323437999u, 1090499064u, 901457511u, 1062416921u, 1262863215u, 0, ATAN2_TOLERANCE, 0},
+{ 834, 3235778876u, 4184941840u, 3196770014u, 2458988443u, 3220775419u, 1413783386u, 0, ATAN2_TOLERANCE, 0},
+{ 835, 1087618284u, 2023065054u, 3211994098u, 2734612965u, 1073291771u, 2454988713u, 0, ATAN2_TOLERANCE, 0},
+{ 836, 1064074694u, 3679267365u, 3237728785u, 1699558211u, 1074340347u, 1345027317u, 0, ATAN2_TOLERANCE, 0},
+{ 837, 1088079010u, 1826799031u, 1078709629u, 3986905229u, 1073289644u, 755714436u, 0, ATAN2_TOLERANCE, 0},
+{ 838, 1052843785u, 351061688u, 3194386466u, 4105857588u, 1073313270u, 355092716u, 0, ATAN2_TOLERANCE, 0},
+{ 839, 1054128006u, 1365244058u, 1064457319u, 1452191426u, 1062344050u, 495680488u, 0, ATAN2_TOLERANCE, 0},
+{ 840, 1064122385u, 2463030625u, 3215975031u, 3773488326u, 1074310351u, 2466004034u, 0, ATAN2_TOLERANCE, 0},
+{ 841, 3251276671u, 752664055u, 1065110394u, 1835931663u, 3220775419u, 1413719208u, 0, ATAN2_TOLERANCE, 0},
+{ 842, 1088045088u, 3496172149u, 1089617208u, 109068701u, 1070996179u, 4085289987u, 0, ATAN2_TOLERANCE, 0},
+{ 843, 3198135087u, 1636966254u, 1086098766u, 2016598298u, 3184639773u, 3394102605u, 0, ATAN2_TOLERANCE, 0},
+{ 844, 1050931318u, 3551516956u, 1097969102u, 1317953425u, 1025641396u, 1368967953u, 0, ATAN2_TOLERANCE, 0},
+{ 845, 3229832217u, 2977627788u, 1045339018u, 516058480u, 3220775419u, 1413650357u, 0, ATAN2_TOLERANCE, 0},
+{ 846, 3237408578u, 3901731263u, 3189566462u, 32272932u, 3220775419u, 1413754217u, 0, ATAN2_TOLERANCE, 0},
+{ 847, 1077281796u, 1956025297u, 3246628529u, 3840733905u, 1074340347u, 208897435u, 0, ATAN2_TOLERANCE, 0},
+{ 848, 1099818036u, 561057891u, 3198494340u, 4271027193u, 1073291771u, 1413754182u, 0, ATAN2_TOLERANCE, 0},
+{ 849, 3250929921u, 692989850u, 3242630588u, 2492225971u, 3220779777u, 3566318511u, 0, ATAN2_TOLERANCE, 0},
+{ 850, 3205479397u, 3439913962u, 1067477011u, 2973333638u, 3210670740u, 2012261983u, 0, ATAN2_TOLERANCE, 0},
+{ 851, 3213993989u, 877613377u, 1044917899u, 809672798u, 3220775418u, 2767564002u, 0, ATAN2_TOLERANCE, 0},
+{ 852, 3222171454u, 905426932u, 1046417457u, 1086320855u, 3220775419u, 1379506546u, 0, ATAN2_TOLERANCE, 0},
+{ 853, 3246346629u, 2645567288u, 1051258339u, 557182478u, 3220775419u, 1413754034u, 0, ATAN2_TOLERANCE, 0},
+{ 854, 3204057950u, 186287752u, 1061342054u, 4054003419u, 3215337589u, 2988894665u, 0, ATAN2_TOLERANCE, 0},
+{ 855, 1097266673u, 3506889716u, 3243866036u, 519056371u, 1073782276u, 2156372686u, 0, ATAN2_TOLERANCE, 0},
+{ 856, 1042654053u, 2171898436u, 3246911982u, 1091500784u, 1074340347u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 857, 3243647673u, 368493885u, 3222871893u, 1419055230u, 3220775420u, 1993273617u, 0, ATAN2_TOLERANCE, 0},
+{ 858, 1091950572u, 2010971245u, 3188804530u, 1518695799u, 1073291771u, 1413754149u, 0, ATAN2_TOLERANCE, 0},
+{ 859, 3205426509u, 1239207795u, 1040192984u, 2199481342u, 3220775411u, 31997672u, 0, ATAN2_TOLERANCE, 0},
+{ 860, 3210978637u, 4264613432u, 3203460972u, 3558930895u, 3220782480u, 4270673353u, 0, ATAN2_TOLERANCE, 0},
+{ 861, 1050299283u, 3772748958u, 3227667376u, 309688336u, 1074340347u, 1407725920u, 0, ATAN2_TOLERANCE, 0},
+{ 862, 3230743041u, 1077949160u, 1075769893u, 2405271377u, 3220768061u, 1643198396u, 0, ATAN2_TOLERANCE, 0},
+{ 863, 1091835152u, 3751608506u, 3232278094u, 930375071u, 1073301826u, 595681186u, 0, ATAN2_TOLERANCE, 0},
+{ 864, 3198617153u, 1518334131u, 3205247482u, 791756713u, 3221817306u, 182536129u, 0, ATAN2_TOLERANCE, 0},
+{ 865, 1047317453u, 2825203170u, 3245054001u, 1822981827u, 1074340347u, 1413754128u, 0, ATAN2_TOLERANCE, 0},
+{ 866, 1100016363u, 514474738u, 1089072073u, 3300845441u, 1073290986u, 3643162396u, 0, ATAN2_TOLERANCE, 0},
+{ 867, 3216391250u, 247369460u, 3197320093u, 687450958u, 3220775422u, 3388704618u, 0, ATAN2_TOLERANCE, 0},
+{ 868, 1104161422u, 2722237629u, 1058272368u, 90602316u, 1073291771u, 1413753820u, 0, ATAN2_TOLERANCE, 0},
+{ 869, 3208098435u, 1845900544u, 3231520830u, 3389751458u, 3221823995u, 976478716u, 0, ATAN2_TOLERANCE, 0},
+{ 870, 3247535245u, 737689911u, 3195377751u, 3462616966u, 3220775419u, 1413754141u, 0, ATAN2_TOLERANCE, 0},
+{ 871, 3223538384u, 3620285831u, 1055501023u, 2708056059u, 3220775417u, 4289426805u, 0, ATAN2_TOLERANCE, 0},
+{ 872, 3219464996u, 4073430285u, 1056206159u, 172017902u, 3220775388u, 1737272404u, 0, ATAN2_TOLERANCE, 0},
+{ 873, 3212869638u, 2799176222u, 1052706894u, 4083892667u, 3220775178u, 2551348560u, 0, ATAN2_TOLERANCE, 0},
+{ 874, 3202279557u, 1562351330u, 1069705601u, 1247765260u, 3205159915u, 2748849209u, 0, ATAN2_TOLERANCE, 0},
+{ 875, 3232717299u, 51853475u, 3189080201u, 2783553144u, 3220775419u, 1413755541u, 0, ATAN2_TOLERANCE, 0},
+{ 876, 3219454353u, 3851781549u, 3241598113u, 514064046u, 3221823995u, 428635924u, 0, ATAN2_TOLERANCE, 0},
+{ 877, 1100045965u, 934745487u, 3248182437u, 2798581921u, 1074043530u, 2892706507u, 0, ATAN2_TOLERANCE, 0},
+{ 878, 3213082493u, 2948648757u, 3232177250u, 4278702895u, 3221823993u, 2663678875u, 0, ATAN2_TOLERANCE, 0},
+{ 879, 1072485724u, 4259101461u, 1061606772u, 84229920u, 1073290960u, 1729538575u, 0, ATAN2_TOLERANCE, 0},
+{ 880, 3198075559u, 3891230598u, 1095924595u, 3049217547u, 3174736143u, 1169587240u, 0, ATAN2_TOLERANCE, 0},
+{ 881, 1077353053u, 3806018919u, 3243191216u, 280177341u, 1074340344u, 1565319825u, 0, ATAN2_TOLERANCE, 0},
+{ 882, 1060624530u, 3900344258u, 1063647809u, 4206745890u, 1069629764u, 2839338122u, 0, ATAN2_TOLERANCE, 0},
+{ 883, 3227707336u, 2126253040u, 3207248026u, 808507485u, 3220775420u, 3189340425u, 0, ATAN2_TOLERANCE, 0},
+{ 884, 1086090317u, 3465685634u, 3230391053u, 3754958214u, 1073419589u, 4281458404u, 0, ATAN2_TOLERANCE, 0},
+{ 885, 1102861084u, 461094531u, 1101110393u, 1316091396u, 1072975720u, 993068035u, 0, ATAN2_TOLERANCE, 0},
+{ 886, 1064980314u, 4197635149u, 1091873113u, 1240127141u, 1045716932u, 2509120352u, 0, ATAN2_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 1041677676u, 1377895141u, 0, ATAN2_TOLERANCE, 0},
+{ 888, 3213429165u, 3744663425u, 3212482771u, 953662066u, 3221256426u, 3241735598u, 0, ATAN2_TOLERANCE, 0},
+{ 889, 1085171305u, 3564196690u, 3228101916u, 904305212u, 1073345459u, 4019048881u, 0, ATAN2_TOLERANCE, 0},
+{ 890, 1048333111u, 3566257266u, 3235138829u, 2734275140u, 1074340347u, 1413742719u, 0, ATAN2_TOLERANCE, 0},
+{ 891, 3243948477u, 606044282u, 3241318094u, 2446416887u, 3220955949u, 3460464085u, 0, ATAN2_TOLERANCE, 0},
+{ 892, 1041627284u, 2336116589u, 3197594053u, 2296925138u, 1074338425u, 2087543934u, 0, ATAN2_TOLERANCE, 0},
+{ 893, 1058567659u, 907670625u, 3240769036u, 1827119006u, 1074340347u, 1413509500u, 0, ATAN2_TOLERANCE, 0},
+{ 894, 1044467183u, 2818710946u, 3246059905u, 553394170u, 1074340347u, 1413754136u, 0, ATAN2_TOLERANCE, 0},
+{ 895, 3189504094u, 4099522736u, 3232742168u, 3718083858u, 3221823995u, 1413753234u, 0, ATAN2_TOLERANCE, 0},
+{ 896, 1092371276u, 1059279404u, 1080245336u, 175941677u, 1073291422u, 3702106658u, 0, ATAN2_TOLERANCE, 0},
+{ 897, 1105189691u, 1650862428u, 1061816101u, 1723201723u, 1073291771u, 1413752463u, 0, ATAN2_TOLERANCE, 0},
+{ 898, 3239012814u, 2462163405u, 3218946201u, 3876535372u, 3220775421u, 814296740u, 0, ATAN2_TOLERANCE, 0},
+{ 899, 1084392886u, 495844137u, 1073721460u, 772777946u, 1073290895u, 1562105886u, 0, ATAN2_TOLERANCE, 0},
+{ 900, 1052415330u, 458757721u, 3245680321u, 3609892707u, 1074340347u, 1413753975u, 0, ATAN2_TOLERANCE, 0},
+{ 901, 3193282956u, 2533012202u, 1079980803u, 3592268374u, 3185979307u, 1334096542u, 0, ATAN2_TOLERANCE, 0},
+{ 902, 3203364780u, 4108274117u, 1063045844u, 571992389u, 3212934262u, 2831896370u, 0, ATAN2_TOLERANCE, 0},
+{ 903, 1090567271u, 3541110973u, 1096296754u, 3118427427u, 1066805658u, 3576017509u, 0, ATAN2_TOLERANCE, 0},
+{ 904, 3193980043u, 1213941007u, 1105433735u, 2172963370u, 3161101858u, 1045382940u, 0, ATAN2_TOLERANCE, 0},
+{ 905, 1096853359u, 272190288u, 1095452370u, 4026581530u, 1072884258u, 299169485u, 0, ATAN2_TOLERANCE, 0},
+{ 906, 1095583909u, 2843638672u, 1100510986u, 3190536898u, 1067656316u, 3239195794u, 0, ATAN2_TOLERANCE, 0},
+{ 907, 1083757094u, 2014317727u, 3247389683u, 2428462015u, 1074340334u, 2638957542u, 0, ATAN2_TOLERANCE, 0},
+{ 908, 1093976717u, 688442200u, 1047852515u, 3035186380u, 1073291771u, 1413753878u, 0, ATAN2_TOLERANCE, 0},
+{ 909, 1076664212u, 1010095511u, 3221288076u, 405287991u, 1073446099u, 4118972885u, 0, ATAN2_TOLERANCE, 0},
+{ 910, 3252294615u, 2983070435u, 1089546472u, 2907918480u, 3220775377u, 924297922u, 0, ATAN2_TOLERANCE, 0},
+{ 911, 1082988121u, 81928569u, 1056007286u, 2740556321u, 1073291771u, 1333500091u, 0, ATAN2_TOLERANCE, 0},
+{ 912, 1041110867u, 2076689028u, 1081558619u, 3039159031u, 1032105870u, 2189756965u, 0, ATAN2_TOLERANCE, 0},
+{ 913, 1047307438u, 1376882094u, 3211003208u, 1296286481u, 1074340335u, 3795290484u, 0, ATAN2_TOLERANCE, 0},
+{ 914, 1080114314u, 744133164u, 3200943494u, 955832216u, 1073291771u, 1517013776u, 0, ATAN2_TOLERANCE, 0},
+{ 915, 3226290326u, 176522478u, 1069999908u, 2891249491u, 3220772215u, 3534603495u, 0, ATAN2_TOLERANCE, 0},
+{ 916, 1043564602u, 3685851715u, 3187829932u, 2363997529u, 1073414842u, 717988197u, 0, ATAN2_TOLERANCE, 0},
+{ 917, 1040244055u, 3974431579u, 1052505165u, 2589067816u, 1060326955u, 3757392299u, 0, ATAN2_TOLERANCE, 0},
+{ 918, 3191496789u, 3819109588u, 1048561488u, 969143351u, 3215624523u, 3633980967u, 0, ATAN2_TOLERANCE, 0},
+{ 919, 1072639397u, 4246896124u, 1104584799u, 1940097860u, 1040583710u, 116780352u, 0, ATAN2_TOLERANCE, 0},
+{ 920, 1048038468u, 2228686199u, 3220231833u, 777624847u, 1074340347u, 1224061139u, 0, ATAN2_TOLERANCE, 0},
+{ 921, 3231467306u, 4189906558u, 3203004203u, 854242364u, 3220775419u, 1444564580u, 0, ATAN2_TOLERANCE, 0},
+{ 922, 1103910407u, 4089051094u, 3227282692u, 2693170723u, 1073291771u, 1952326317u, 0, ATAN2_TOLERANCE, 0},
+{ 923, 1045883607u, 1278581412u, 3239296746u, 1774588717u, 1074340347u, 1413753988u, 0, ATAN2_TOLERANCE, 0},
+{ 924, 3222372686u, 1794845306u, 1104879344u, 4135865182u, 3190073218u, 825152016u, 0, ATAN2_TOLERANCE, 0},
+{ 925, 1106449055u, 754938390u, 1061291430u, 2010786993u, 1073291771u, 1413753652u, 0, ATAN2_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 1074340345u, 2611506058u, 0, ATAN2_TOLERANCE, 0},
+{ 927, 3231449194u, 567588900u, 3195452230u, 1421366017u, 3220775419u, 1413966943u, 0, ATAN2_TOLERANCE, 0},
+{ 928, 3225089755u, 2708717091u, 1071975971u, 1364590470u, 3220749837u, 1360925482u, 0, ATAN2_TOLERANCE, 0},
+{ 929, 3252137283u, 3461956134u, 3207820115u, 1605709634u, 3220775419u, 1413754977u, 0, ATAN2_TOLERANCE, 0},
+{ 930, 1065302996u, 1497124553u, 1051715442u, 916736957u, 1073291640u, 2499100608u, 0, ATAN2_TOLERANCE, 0},
+{ 931, 1058468363u, 834914365u, 1064667143u, 2839166298u, 1066470556u, 466056744u, 0, ATAN2_TOLERANCE, 0},
+{ 932, 1057279949u, 2139295776u, 1062816721u, 914592523u, 1067078210u, 3565683614u, 0, ATAN2_TOLERANCE, 0},
+{ 933, 3189636931u, 851569132u, 1058503154u, 1399378677u, 3203690931u, 1174625892u, 0, ATAN2_TOLERANCE, 0},
+{ 934, 3233537697u, 3897202342u, 3245382590u, 246600375u, 3221823780u, 2314535601u, 0, ATAN2_TOLERANCE, 0},
+{ 935, 3225460308u, 3620429520u, 1055627557u, 229305u, 3220775418u, 3925564355u, 0, ATAN2_TOLERANCE, 0},
+{ 936, 1083958833u, 3641997865u, 3206673888u, 93720614u, 1073291771u, 1759371343u, 0, ATAN2_TOLERANCE, 0},
+{ 937, 3227808435u, 32766320u, 1062084905u, 3668443038u, 3220775413u, 1869564977u, 0, ATAN2_TOLERANCE, 0},
+{ 938, 3223298996u, 2039713492u, 3248699388u, 1346210821u, 3221823995u, 1303273732u, 0, ATAN2_TOLERANCE, 0},
+{ 939, 1093050016u, 1335820726u, 3191756860u, 1808427032u, 1073291771u, 1413754179u, 0, ATAN2_TOLERANCE, 0},
+{ 940, 1061442763u, 650692001u, 1103515670u, 2253348763u, 1030563958u, 2155523489u, 0, ATAN2_TOLERANCE, 0},
+{ 941, 3191395187u, 2372623300u, 3210185343u, 3200572848u, 3221823993u, 944878367u, 0, ATAN2_TOLERANCE, 0},
+{ 942, 1100796069u, 762317532u, 3194595095u, 3192607437u, 1073291771u, 1413754138u, 0, ATAN2_TOLERANCE, 0},
+{ 943, 1062262701u, 217775356u, 3232827087u, 2969367386u, 1074340347u, 882688839u, 0, ATAN2_TOLERANCE, 0},
+{ 944, 1057172551u, 3621353969u, 1077994795u, 3873976266u, 1051863094u, 2047525699u, 0, ATAN2_TOLERANCE, 0},
+{ 945, 1091301987u, 268372152u, 3221764390u, 3216978962u, 1073291785u, 847648949u, 0, ATAN2_TOLERANCE, 0},
+{ 946, 3246437611u, 142942404u, 1075322987u, 1746449109u, 3220775419u, 638443521u, 0, ATAN2_TOLERANCE, 0},
+{ 947, 1104006296u, 496534875u, 3254522293u, 2532372502u, 1074271176u, 988519976u, 0, ATAN2_TOLERANCE, 0},
+{ 948, 3250225541u, 2999955409u, 3222793392u, 1868977643u, 3220775419u, 1474327357u, 0, ATAN2_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 1073407236u, 930383142u, 0, ATAN2_TOLERANCE, 0},
+{ 950, 1068218799u, 73646871u, 3231442171u, 3711510104u, 1074340331u, 1830442673u, 0, ATAN2_TOLERANCE, 0},
+{ 951, 1090483524u, 218135177u, 3198908856u, 3082199105u, 1073291771u, 1413782756u, 0, ATAN2_TOLERANCE, 0},
+{ 952, 1068068480u, 1061628117u, 3248859043u, 86776158u, 1074340347u, 1413138407u, 0, ATAN2_TOLERANCE, 0},
+{ 953, 3208484674u, 938869114u, 1087911145u, 2416710759u, 3193147149u, 825567430u, 0, ATAN2_TOLERANCE, 0},
+{ 954, 1095576832u, 2970853959u, 3239543429u, 1887505029u, 1073397034u, 442547018u, 0, ATAN2_TOLERANCE, 0},
+{ 955, 3237728787u, 1337895935u, 1076463812u, 1172733328u, 3220775301u, 3644296250u, 0, ATAN2_TOLERANCE, 0},
+{ 956, 1049139928u, 1469010822u, 3229583535u, 551399515u, 1074340347u, 1412935968u, 0, ATAN2_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 1073291771u, 1126213076u, 0, ATAN2_TOLERANCE, 0},
+{ 958, 3242138780u, 2976596113u, 3192137295u, 3033242648u, 3220775419u, 1413754157u, 0, ATAN2_TOLERANCE, 0},
+{ 959, 1098698481u, 876810930u, 3197470945u, 2571587447u, 1073291771u, 1413754184u, 0, ATAN2_TOLERANCE, 0},
+{ 960, 3241770810u, 4007797282u, 3225853845u, 4069319648u, 3220775447u, 3103713544u, 0, ATAN2_TOLERANCE, 0},
+{ 961, 1047279982u, 3840538373u, 1043189552u, 3668774580u, 1073222655u, 1301141788u, 0, ATAN2_TOLERANCE, 0},
+{ 962, 3217611704u, 200857661u, 3229758439u, 3359367736u, 3221823820u, 2268572874u, 0, ATAN2_TOLERANCE, 0},
+{ 963, 3248797869u, 111868139u, 3227902082u, 2366064003u, 3220775420u, 1653278234u, 0, ATAN2_TOLERANCE, 0},
+{ 964, 1044195166u, 3510904416u, 3222131653u, 3822770497u, 1074340347u, 1409654532u, 0, ATAN2_TOLERANCE, 0},
+{ 965, 3242675715u, 789151814u, 1099269239u, 2958956055u, 3216067959u, 360964177u, 0, ATAN2_TOLERANCE, 0},
+{ 966, 1084679320u, 722163228u, 1105524559u, 1534462169u, 1051818097u, 3124787863u, 0, ATAN2_TOLERANCE, 0},
+{ 967, 1046586062u, 2207037106u, 3208952465u, 1231254630u, 1074340320u, 445352385u, 0, ATAN2_TOLERANCE, 0},
+{ 968, 3197884060u, 3838689849u, 3198769679u, 1302617170u, 3221560746u, 4289727603u, 0, ATAN2_TOLERANCE, 0},
+{ 969, 1085938906u, 2527556476u, 3240373426u, 124352692u, 1074335045u, 3897696078u, 0, ATAN2_TOLERANCE, 0},
+{ 970, 3199540805u, 3502371499u, 1043411944u, 4190072016u, 3220772082u, 3302400771u, 0, ATAN2_TOLERANCE, 0},
+{ 971, 1064676142u, 1798470077u, 3200116917u, 3421833729u, 1073292124u, 2933408544u, 0, ATAN2_TOLERANCE, 0},
+{ 972, 3193514956u, 3653237931u, 3204255012u, 3683870669u, 3221823551u, 3069459565u, 0, ATAN2_TOLERANCE, 0},
+{ 973, 1053588582u, 376530104u, 1073853547u, 565755892u, 1052360250u, 175060874u, 0, ATAN2_TOLERANCE, 0},
+{ 974, 3242503851u, 558292492u, 1051772749u, 4267873474u, 3220775419u, 1413752475u, 0, ATAN2_TOLERANCE, 0},
+{ 975, 3224772709u, 509637100u, 3212030069u, 215050379u, 3220775647u, 560712828u, 0, ATAN2_TOLERANCE, 0},
+{ 976, 1092057101u, 3571665665u, 3188628584u, 757824767u, 1073291771u, 1413754147u, 0, ATAN2_TOLERANCE, 0},
+{ 977, 3214799337u, 998858159u, 1063077962u, 436029885u, 3220711413u, 180436215u, 0, ATAN2_TOLERANCE, 0},
+{ 978, 3205946965u, 996300405u, 3193842624u, 80548098u, 3220775757u, 324606460u, 0, ATAN2_TOLERANCE, 0},
+{ 979, 3228848840u, 3876129407u, 3215332180u, 2226970413u, 3220775558u, 1564964409u, 0, ATAN2_TOLERANCE, 0},
+{ 980, 3237608953u, 200013509u, 3224552716u, 414878724u, 3220775604u, 837415965u, 0, ATAN2_TOLERANCE, 0},
+{ 981, 3230617093u, 309319541u, 1048979765u, 1261662434u, 3220775419u, 1413011838u, 0, ATAN2_TOLERANCE, 0},
+{ 982, 1089252639u, 4062255924u, 3224274128u, 4289485681u, 1073292043u, 3341519446u, 0, ATAN2_TOLERANCE, 0},
+{ 983, 3236136084u, 1611969213u, 1053890378u, 3774617276u, 3220775419u, 1413295040u, 0, ATAN2_TOLERANCE, 0},
+{ 984, 1080412763u, 1752164782u, 3239587974u, 612223386u, 1074340116u, 3087849834u, 0, ATAN2_TOLERANCE, 0},
+{ 985, 1041545782u, 2024044989u, 1074932678u, 3259111307u, 1039286335u, 808027052u, 0, ATAN2_TOLERANCE, 0},
+{ 986, 1053207518u, 2564965629u, 1093571065u, 169360454u, 1032305490u, 1058083632u, 0, ATAN2_TOLERANCE, 0},
+{ 987, 1089599090u, 1860101737u, 3191222372u, 1676437468u, 1073291771u, 1413754453u, 0, ATAN2_TOLERANCE, 0},
+{ 988, 1059802968u, 588387057u, 3192103292u, 2495288012u, 1073291817u, 1431758766u, 0, ATAN2_TOLERANCE, 0},
+{ 989, 3193155705u, 659070058u, 1073095700u, 1393632068u, 3192681709u, 3727162695u, 0, ATAN2_TOLERANCE, 0},
+{ 990, 3217683263u, 4276187829u, 3217553330u, 1868253275u, 3221391407u, 3507577205u, 0, ATAN2_TOLERANCE, 0},
+{ 991, 3223220272u, 2085481575u, 3215994784u, 800910002u, 3220784131u, 2542415732u, 0, ATAN2_TOLERANCE, 0},
+{ 992, 1056934836u, 1950570756u, 3200582211u, 941022151u, 1073378861u, 3957378310u, 0, ATAN2_TOLERANCE, 0},
+{ 993, 1057530368u, 2075610870u, 3250142022u, 3605152103u, 1074340347u, 1413753886u, 0, ATAN2_TOLERANCE, 0},
+{ 994, 3200839250u, 3792931748u, 3204857863u, 804393211u, 3221787339u, 285205990u, 0, ATAN2_TOLERANCE, 0},
+{ 995, 3253646370u, 3430071177u, 3226288311u, 3652522729u, 3220775419u, 1477691882u, 0, ATAN2_TOLERANCE, 0},
+{ 996, 3201314702u, 236884699u, 3227874605u, 2193269825u, 3221823995u, 1363133298u, 0, ATAN2_TOLERANCE, 0},
+{ 997, 1064936593u, 2744231849u, 1046186036u, 771053722u, 1073291767u, 148052633u, 0, ATAN2_TOLERANCE, 0},
+{ 998, 1083996036u, 3000189819u, 1096500901u, 2057239777u, 1060156118u, 1063067065u, 0, ATAN2_TOLERANCE, 0},
+{ 999, 1093835581u, 205759408u, 3244643377u, 2702292618u, 1074283401u, 2306469720u, 0, ATAN2_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_ATAN2_H multiple inclusion protection
+
+// EOF atan2.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/ceil.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/ceil.c
new file mode 100644
index 0000000000..09e3ad6646
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/ceil.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// ceil.c
+//
+// Test of ceil() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/ceil.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(ceil_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &ceil, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_NONE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &ceil_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("ceil() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("ceil() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library ceil() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "ceil() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF ceil.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/ceil.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/ceil.h
new file mode 100644
index 0000000000..058603a808
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/ceil.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_CEIL_H
+#define CYGONCE_LIBM_CEIL_H
+//===========================================================================
+//
+// ceil.h
+//
+// Test vectors for testing of ceil() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/ceil.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define CEIL_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t ceil_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1077999148u, 2506787616u, 1090024059u, 3619148316u, 1078001664u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 2, 3218153654u, 3176730980u, 1051524793u, 2993920299u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 3, 3239659803u, 2725707538u, 3232101343u, 2346810316u, 3239659800u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 4, 1092554362u, 2088062470u, 3201242716u, 420891118u, 1092554364u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 5, 3221200677u, 2636405208u, 1100049309u, 471635570u, 3220176896u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 6, 1089363191u, 1746012320u, 1054478713u, 3333988501u, 1089363200u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 7, 1047953160u, 183014794u, 3202039382u, 2016785810u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 8, 3213486034u, 2688957927u, 1046089230u, 2709029994u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 9, 1058795730u, 624574473u, 1045840574u, 3473266330u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 10, 3204919842u, 1605286142u, 1068931671u, 4233776869u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 11, 1060343410u, 1857607719u, 3222889559u, 3417070006u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 12, 1103599987u, 3981151660u, 1088899021u, 1332651746u, 1103599987u, 3984588800u, 0, CEIL_TOLERANCE, 0},
+{ 13, 1085298022u, 3824988054u, 1066856791u, 2070129652u, 1085298176u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 14, 3207559790u, 1372884064u, 1080833116u, 3229926662u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 15, 1093826501u, 3217805330u, 3191644264u, 2014578707u, 1093826502u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 16, 1102287487u, 265058758u, 3239903247u, 1630600647u, 1102287487u, 268435456u, 0, CEIL_TOLERANCE, 0},
+{ 17, 1071124229u, 1946677669u, 3198462609u, 926009897u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 18, 1072130299u, 2271884183u, 3203741999u, 2118617783u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 19, 3194849109u, 213658772u, 3249401130u, 314151656u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 20, 3254112288u, 1564829925u, 3197817016u, 497230814u, 3254112288u, 1564475392u, 0, CEIL_TOLERANCE, 0},
+{ 21, 3216262634u, 2075329122u, 3231746400u, 169900577u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 22, 1049848642u, 541549344u, 1096608669u, 3119070100u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 23, 1085427055u, 567496114u, 1045286891u, 1969998540u, 1085427200u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 24, 1060548195u, 1299369769u, 1049342524u, 4167404066u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 25, 3208865645u, 3348930841u, 1078472138u, 358457347u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 26, 1071069297u, 2192461366u, 1099527247u, 3184735642u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 27, 1052861772u, 331696577u, 3189610016u, 793242270u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 28, 3252528934u, 2322696981u, 1083791358u, 3020766674u, 3252528934u, 2319450112u, 0, CEIL_TOLERANCE, 0},
+{ 29, 1044902177u, 252085215u, 3214426435u, 4139068910u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 30, 3222505725u, 105589263u, 1056316170u, 261630827u, 3222274048u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 31, 1107213408u, 428765703u, 3251828686u, 2009972239u, 1107213408u, 428867584u, 0, CEIL_TOLERANCE, 0},
+{ 32, 1098568019u, 3517376586u, 3240257920u, 3304487302u, 1098568019u, 3758096384u, 0, CEIL_TOLERANCE, 0},
+{ 33, 3233537912u, 237004814u, 3237899261u, 3364008659u, 3233537792u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 34, 3195247552u, 472004928u, 3226869477u, 1186387580u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 35, 1054226850u, 4085763910u, 1106394906u, 2684738273u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 36, 1057053639u, 2055490142u, 3231581370u, 3879040079u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 37, 3188976647u, 3725731239u, 1061652681u, 591292963u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 38, 3225014981u, 1147041027u, 3215417793u, 624695933u, 3224961024u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 39, 3206052774u, 705725219u, 3238067573u, 1116238321u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 40, 3207367088u, 7287411u, 1045917232u, 116067742u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 41, 3240055222u, 3604989074u, 1066381836u, 545298780u, 3240055220u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 42, 3219080936u, 1681476121u, 1060345752u, 3553822398u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 43, 1102831658u, 3410480388u, 1052460275u, 1660607230u, 1102831658u, 3422552064u, 0, CEIL_TOLERANCE, 0},
+{ 44, 1089216869u, 1494984673u, 3196647153u, 287894723u, 1089216896u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 45, 1054885127u, 644548665u, 1081948134u, 2442134629u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 46, 1087554095u, 2312530895u, 3221584595u, 3379665576u, 1087554112u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 47, 1096085375u, 3018463866u, 1086226574u, 404012923u, 1096085375u, 3221225472u, 0, CEIL_TOLERANCE, 0},
+{ 48, 1064733299u, 1710279345u, 3251401196u, 3528946000u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 49, 1061536351u, 2164450219u, 1083520023u, 3312018966u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 50, 1057248676u, 2648986431u, 1050330591u, 1474376550u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 51, 3194422028u, 1839068700u, 1077406406u, 3013052171u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 52, 1046493630u, 772102380u, 3220729740u, 4219039958u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 53, 3229472221u, 3058618779u, 1046304788u, 3338676024u, 3229470720u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 54, 1051172137u, 506286854u, 1094907481u, 2217000199u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 55, 1082428310u, 1147428263u, 1065432625u, 3034786717u, 1082429440u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 56, 1082016752u, 2844125311u, 1082985198u, 2561492677u, 1082019840u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 57, 3211536916u, 704542600u, 3222902057u, 2762779203u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 58, 3199680614u, 184131949u, 3249723525u, 1667366082u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 59, 3223609598u, 3904224140u, 1067056698u, 2942159914u, 3223584768u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 60, 1100636863u, 426114282u, 3209056785u, 1083606355u, 1100636863u, 469762048u, 0, CEIL_TOLERANCE, 0},
+{ 61, 1106165945u, 3774123863u, 1106787580u, 2722107965u, 1106165945u, 3774873600u, 0, CEIL_TOLERANCE, 0},
+{ 62, 1088005092u, 1377734762u, 1104232051u, 2377063483u, 1088005120u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 63, 1069380559u, 1029739074u, 1105467109u, 3062201018u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 64, 3234741597u, 773857656u, 3214251949u, 335833884u, 3234741504u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 65, 3203224610u, 1473865960u, 1103073830u, 4000427507u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 66, 1103185231u, 4242092620u, 1067009473u, 14539161u, 1103185231u, 4244635648u, 0, CEIL_TOLERANCE, 0},
+{ 67, 3192516074u, 1732245037u, 1101371955u, 1533536108u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 68, 3249153995u, 1833841275u, 1099430098u, 4144145552u, 3249153995u, 1811939328u, 0, CEIL_TOLERANCE, 0},
+{ 69, 3244270463u, 935007012u, 3188865420u, 604442938u, 3244270463u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 70, 3206903253u, 2211464602u, 1046255144u, 1635910526u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 71, 1077871417u, 2549219008u, 3231633258u, 3733639385u, 1077936128u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 72, 1082095089u, 1819374372u, 3202219056u, 2617077637u, 1082097664u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 73, 1094345280u, 546465680u, 1048653554u, 532401530u, 1094345281u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 74, 1044571091u, 2759019783u, 3221570188u, 3554409630u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 75, 3212931282u, 2527221960u, 1099107978u, 2696971136u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 76, 1097158000u, 173134582u, 1087299442u, 2877794600u, 1097158000u, 536870912u, 0, CEIL_TOLERANCE, 0},
+{ 77, 1086400474u, 547642046u, 3197285510u, 3521286127u, 1086400512u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 78, 1074860702u, 1231582831u, 1090971734u, 1653446832u, 1075052544u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 79, 1061342535u, 3762182190u, 3252967851u, 2615360375u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 80, 3200834423u, 2588067350u, 3206610957u, 3551059728u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 81, 3206978856u, 845263327u, 1073415902u, 1749010288u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 82, 3205576370u, 3092685191u, 3190678390u, 2872219490u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 83, 3218315055u, 4107255722u, 3205337291u, 3069068345u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 84, 3243990857u, 2294867524u, 3216653996u, 2860384670u, 3243990857u, 2147483648u, 0, CEIL_TOLERANCE, 0},
+{ 85, 3193326350u, 2265437201u, 3240198679u, 1234948614u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 86, 3216359929u, 1186945904u, 3251167793u, 1896750851u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 87, 1081575478u, 3686084548u, 1079286273u, 3309277689u, 1081577472u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 88, 3223476240u, 3006860614u, 3231412671u, 2504194724u, 3223453696u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 89, 3236149260u, 1948717780u, 1048317852u, 3791803982u, 3236149248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 90, 1064345015u, 4272034420u, 3192982124u, 1526175922u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 91, 3245817826u, 4108948538u, 1104691287u, 640541190u, 3245817826u, 4026531840u, 0, CEIL_TOLERANCE, 0},
+{ 92, 3207257417u, 3259274853u, 1082507103u, 3677038020u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 93, 1083132498u, 3781708548u, 1096584871u, 1207386447u, 1083133952u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 94, 3188695272u, 3011191657u, 1103798670u, 1096124830u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 95, 1063235023u, 2540404725u, 3240157452u, 4122845725u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 96, 1083643710u, 311336721u, 3214382367u, 4212533768u, 1083643904u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 97, 1051139427u, 1769686293u, 3240200923u, 3538602249u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 98, 1078227549u, 508056696u, 1103793878u, 776520138u, 1078231040u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 99, 1102910577u, 4064962760u, 1077424413u, 819766631u, 1102910577u, 4076863488u, 0, CEIL_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 1074266112u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 101, 1082295059u, 2514398118u, 1076579751u, 870169764u, 1082296320u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 102, 3246851392u, 1190259653u, 1069112254u, 3417249840u, 3246851392u, 1073741824u, 0, CEIL_TOLERANCE, 0},
+{ 103, 3193663083u, 3467757357u, 3215075200u, 2168175352u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 104, 3239643135u, 1508888184u, 1060430241u, 3524949092u, 3239643132u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 105, 3197412883u, 166402802u, 3237198975u, 3572369260u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 106, 1081866822u, 2441536203u, 3202753937u, 3658194573u, 1081868288u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 107, 1062392908u, 2479742828u, 1062342831u, 4214154303u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 108, 1082396794u, 426896765u, 1066474375u, 2201754442u, 1082398720u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 109, 3195629021u, 2055773734u, 3239267288u, 291396537u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 110, 3236968033u, 874125203u, 3210508124u, 4091098764u, 3236968032u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 111, 1065716026u, 120488169u, 3241241441u, 1985269424u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 112, 3206539410u, 2243036871u, 3243941101u, 740033495u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 113, 3209424906u, 1176656356u, 1074261978u, 3588756231u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 114, 3252816791u, 3037249392u, 1061635587u, 1173102190u, 3252816791u, 3036676096u, 0, CEIL_TOLERANCE, 0},
+{ 115, 3237209581u, 2882725208u, 1071440059u, 69225090u, 3237209568u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 116, 3212663474u, 272319256u, 1072073912u, 2493997123u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 117, 1057720186u, 188610379u, 3232757923u, 2209647371u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 118, 3236758517u, 1990439193u, 1078073146u, 622849962u, 3236758496u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 119, 1057135741u, 756052458u, 1081649113u, 2247475162u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 120, 1061623064u, 3878055211u, 3222407050u, 2979438623u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 121, 3195290997u, 2676398686u, 1105124431u, 3631096636u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 122, 1065079390u, 1697791764u, 3198136112u, 2299842819u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 123, 1078084768u, 1931502677u, 3215264397u, 3016456382u, 1078099968u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 124, 1072253426u, 343404215u, 1061072607u, 4266232536u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 125, 3241230836u, 4140316002u, 1082896196u, 868256971u, 3241230836u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 126, 1075422810u, 1864139509u, 3187675097u, 3084482407u, 1075576832u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 127, 3220191323u, 2427162817u, 3234748208u, 2715105792u, 3220176896u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 128, 1064600512u, 3943389284u, 1046724025u, 3626825684u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 129, 1045423002u, 967350972u, 1093012318u, 448002663u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 130, 3251845859u, 105058217u, 1069733884u, 171786224u, 3251845859u, 104857600u, 0, CEIL_TOLERANCE, 0},
+{ 131, 3189614508u, 2863482262u, 3204997271u, 877784425u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 132, 3202629313u, 2801782962u, 3213604117u, 762347195u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 133, 3233486727u, 2317950339u, 3246333414u, 2135700283u, 3233486592u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 134, 1056516397u, 4171919805u, 1082858682u, 2180920863u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 135, 3220149084u, 1918836931u, 1083603224u, 3137821660u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 136, 1103902874u, 3456203663u, 3235600523u, 2335688936u, 1103902874u, 3464495104u, 0, CEIL_TOLERANCE, 0},
+{ 137, 1042279322u, 4170235262u, 1051824459u, 521583737u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 138, 1081348303u, 1296623194u, 3250673860u, 2442872540u, 1081352192u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 139, 1061684277u, 289979405u, 1049514449u, 3865737145u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 140, 1075298944u, 3699090239u, 1054539840u, 3259249360u, 1075314688u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 141, 1096418100u, 1619819023u, 1045993352u, 1022642459u, 1096418100u, 2147483648u, 0, CEIL_TOLERANCE, 0},
+{ 142, 1081433004u, 19455098u, 3229182089u, 2096003654u, 1081434112u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 143, 1076297936u, 3803689997u, 1071630912u, 2263729518u, 1076363264u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 144, 1101357261u, 2816837387u, 1063422305u, 2597606398u, 1101357261u, 2818572288u, 0, CEIL_TOLERANCE, 0},
+{ 145, 1069100169u, 3680967506u, 1040201163u, 179224723u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 146, 3188629767u, 978126928u, 1101553990u, 4047893399u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 147, 3222322045u, 4059818629u, 1042678728u, 3640293589u, 3222274048u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 148, 3248464040u, 3383497159u, 1070002807u, 1527313008u, 3248464040u, 3355443200u, 0, CEIL_TOLERANCE, 0},
+{ 149, 3202707679u, 2599946514u, 1104170406u, 2738675352u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 150, 1105232623u, 3616571377u, 1060859316u, 1130603218u, 1105232623u, 3617587200u, 0, CEIL_TOLERANCE, 0},
+{ 151, 1076028796u, 3859211180u, 1067940450u, 1744531824u, 1076101120u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 152, 1042831340u, 1958025850u, 3236511256u, 2472176453u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 153, 3233107089u, 182132862u, 3250520938u, 3924356991u, 3233106944u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 154, 3230501884u, 35632886u, 3209806504u, 1453402523u, 3230500864u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 155, 1083522102u, 743225214u, 3202890678u, 142917400u, 1083523072u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 156, 1080684976u, 1472665012u, 3203138231u, 256588219u, 1080688640u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 157, 1094982162u, 1062927000u, 1061134072u, 931677439u, 1094982162u, 2147483648u, 0, CEIL_TOLERANCE, 0},
+{ 158, 1058377732u, 2320910576u, 1055663370u, 288059864u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 159, 1078958093u, 1448349062u, 3199478070u, 3454027134u, 1078984704u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 160, 3237458798u, 4215445172u, 3196654963u, 2231888973u, 3237458784u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 161, 3246632231u, 40413554u, 3232578253u, 983832844u, 3246632231u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 162, 3223721534u, 3995725873u, 1050082319u, 777231627u, 3223715840u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 163, 1040986626u, 672789828u, 3253385962u, 2982787335u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 164, 1068390875u, 2075971825u, 1070166500u, 4034633931u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 165, 3210046177u, 1018222907u, 3244621407u, 3090050495u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 166, 1067680885u, 937732557u, 3200798890u, 2557898276u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 167, 1078342316u, 130346162u, 3223590310u, 275568693u, 1078362112u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 168, 1042898869u, 3807416441u, 1075961161u, 3706820266u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 169, 3216099005u, 1710131411u, 1078123323u, 1900790503u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 170, 3238819361u, 3420420033u, 3210844787u, 588423066u, 3238819360u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 171, 1049684114u, 1160162008u, 3246307879u, 4265764460u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 172, 1102543434u, 366653268u, 3188814424u, 466059202u, 1102543434u, 369098752u, 0, CEIL_TOLERANCE, 0},
+{ 173, 3226627739u, 1325936170u, 3221436876u, 680097612u, 3226615808u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 174, 3240391116u, 1827735934u, 3200554324u, 2875599271u, 3240391116u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 175, 3191030402u, 3117037091u, 3239246636u, 15838845u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 176, 1051974004u, 749718883u, 3223587064u, 1523766569u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 177, 1044833651u, 1966536294u, 3250158026u, 699164258u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 178, 1098048435u, 3759049394u, 1106085272u, 1183789499u, 1098048435u, 4026531840u, 0, CEIL_TOLERANCE, 0},
+{ 179, 1081201623u, 1970107747u, 1095245453u, 2308233883u, 1081204736u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 180, 1084756444u, 1491017852u, 1041444355u, 1723375725u, 1084756480u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 181, 3216630070u, 1141349287u, 1097465301u, 3403438584u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 182, 3230571908u, 1711085243u, 3250239076u, 1377484108u, 3230570496u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 183, 1098385019u, 2880275004u, 1084039594u, 1611394950u, 1098385019u, 2952790016u, 0, CEIL_TOLERANCE, 0},
+{ 184, 3234221435u, 2626629370u, 1063771493u, 1499080813u, 3234221312u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 185, 1055231263u, 3936262414u, 1103919063u, 3175668759u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 186, 3207981719u, 1270950554u, 3194616071u, 3680565379u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 187, 3208148223u, 1066985223u, 3221613219u, 4089383168u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 188, 3217058839u, 4017329311u, 3208334452u, 1667591498u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 189, 1088164157u, 3154656624u, 1061894279u, 3886344038u, 1088164160u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 190, 1050652945u, 977586119u, 3209762784u, 953839852u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 191, 1104965247u, 143071571u, 3206165386u, 913097445u, 1104965247u, 146800640u, 0, CEIL_TOLERANCE, 0},
+{ 192, 3190565456u, 1371169579u, 1057079837u, 2594818628u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 193, 3251793336u, 2259342224u, 3217432469u, 1824221478u, 3251793336u, 2256535552u, 0, CEIL_TOLERANCE, 0},
+{ 194, 3246834775u, 1576604497u, 1079368611u, 185078728u, 3246834775u, 1476395008u, 0, CEIL_TOLERANCE, 0},
+{ 195, 3221679427u, 444800035u, 3243343143u, 1734989302u, 3221225472u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1073741824u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 197, 3234695968u, 1941318385u, 1045807374u, 792193370u, 3234695936u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 198, 3238299666u, 1299392207u, 3212131720u, 3205732280u, 3238299664u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 199, 1098698804u, 3035093505u, 1052187689u, 3287702190u, 1098698804u, 3221225472u, 0, CEIL_TOLERANCE, 0},
+{ 200, 3246676260u, 2160225215u, 1102624859u, 836655570u, 3246676260u, 2147483648u, 0, CEIL_TOLERANCE, 0},
+{ 201, 1096723626u, 3360816360u, 3246176356u, 172860634u, 1096723627u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 202, 1070995788u, 146831910u, 1051558014u, 2340722078u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 203, 3230416351u, 1603798153u, 3207725532u, 1099413093u, 3230414848u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 204, 3246678378u, 2429340443u, 3190303581u, 3223770005u, 3246678378u, 2415919104u, 0, CEIL_TOLERANCE, 0},
+{ 205, 1075882959u, 955542166u, 3230415151u, 275583938u, 1075970048u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 206, 1092971882u, 513397822u, 1090646554u, 2089321329u, 1092971884u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 207, 3193169876u, 2782073372u, 1046063872u, 4023829068u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 208, 1098564822u, 3242223094u, 3194111199u, 4264674108u, 1098564822u, 3489660928u, 0, CEIL_TOLERANCE, 0},
+{ 209, 3238510821u, 3506346169u, 1047020885u, 1742757458u, 3238510816u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 210, 3192664477u, 1265459564u, 3193450280u, 3650514880u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 211, 1081755890u, 1525260440u, 3235452527u, 2612331392u, 1081757696u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 212, 3248668920u, 1263613754u, 3219096387u, 635677201u, 3248668920u, 1241513984u, 0, CEIL_TOLERANCE, 0},
+{ 213, 3206272087u, 4140947288u, 3200792376u, 2013265346u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 214, 3249974392u, 1912759945u, 3237045253u, 1351396825u, 3249974392u, 1912602624u, 0, CEIL_TOLERANCE, 0},
+{ 215, 3248205162u, 1001433078u, 3206926643u, 2741676659u, 3248205162u, 939524096u, 0, CEIL_TOLERANCE, 0},
+{ 216, 1080923606u, 1088945233u, 1085095743u, 3986114865u, 1080926208u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 217, 3215734057u, 831239754u, 1099828675u, 3071308141u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 218, 3225834497u, 3473592372u, 1102759382u, 1309576357u, 3225812992u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 219, 3251186706u, 2042340367u, 1091945628u, 2062772374u, 3251186706u, 2038431744u, 0, CEIL_TOLERANCE, 0},
+{ 220, 3194765687u, 1840632537u, 1096533424u, 807510337u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 221, 3231451722u, 144814872u, 3212698915u, 2282965697u, 3231451136u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 222, 1071236430u, 2552499583u, 3229111426u, 1470130815u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 223, 3243093065u, 2858583811u, 1089760910u, 6360994u, 3243093065u, 2147483648u, 0, CEIL_TOLERANCE, 0},
+{ 224, 3198264929u, 1614537194u, 1075198900u, 4088705365u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 225, 3250939070u, 3545570051u, 1065221325u, 1629217700u, 3250939070u, 3539992576u, 0, CEIL_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 1073741824u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 227, 3196802686u, 2406734491u, 1042055360u, 89226663u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 228, 3195751081u, 1618759139u, 3194723421u, 3888234802u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 229, 1055357248u, 3590035633u, 3212424262u, 2892456615u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 230, 3189943060u, 2431246964u, 3241512456u, 183850734u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 231, 1089501101u, 3088319870u, 3211544311u, 862225364u, 1089501104u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 232, 3235294664u, 3495352775u, 1058576726u, 596957268u, 3235294656u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 233, 1046553348u, 1839214511u, 3205004060u, 1923240983u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 234, 1058073864u, 739619702u, 3223356436u, 2689885273u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 235, 3200324971u, 2143376228u, 1098306332u, 3760236188u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 1074790400u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 237, 3214165989u, 2493598049u, 3194927008u, 1689107592u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 238, 3189989959u, 1578976988u, 1066368383u, 2117279163u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 239, 3222988111u, 3425290087u, 1098487295u, 1263412017u, 3222798336u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 240, 3208432764u, 3635396812u, 1070999426u, 3965655689u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 241, 1060196346u, 2183973116u, 1101098363u, 1118613350u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 242, 3221946089u, 199516350u, 1078368488u, 164621458u, 3221749760u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 243, 3187706018u, 3570940805u, 3230316437u, 3596080877u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 244, 3208209565u, 980880313u, 1079833442u, 884465057u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 245, 1099977124u, 2558179220u, 1052873711u, 1233598120u, 1099977124u, 2617245696u, 0, CEIL_TOLERANCE, 0},
+{ 246, 1047115221u, 1909994277u, 1085015978u, 2991527452u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 247, 1060855260u, 1680290941u, 1074309900u, 2943870846u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 248, 1059496132u, 1451927357u, 3228615456u, 1502585517u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 249, 3236211951u, 751136990u, 3230392165u, 3493275472u, 3236211936u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 250, 1098365967u, 1209623292u, 3238056647u, 979495322u, 1098365967u, 1342177280u, 0, CEIL_TOLERANCE, 0},
+{ 251, 3250424296u, 1717672108u, 1048120593u, 531240316u, 3250424296u, 1711276032u, 0, CEIL_TOLERANCE, 0},
+{ 252, 1054174923u, 3548721654u, 1086112947u, 3391817224u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 253, 1077836851u, 2758195125u, 1100880260u, 2028440924u, 1077870592u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 254, 1084223893u, 2750123373u, 3232200256u, 1086294931u, 1084224512u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 255, 1043958672u, 2986160931u, 1076097908u, 2540046258u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 256, 3235476602u, 451471221u, 1064816262u, 4187644495u, 3235476544u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 257, 1099460228u, 2439500162u, 1065280276u, 1979490284u, 1099460228u, 2550136832u, 0, CEIL_TOLERANCE, 0},
+{ 258, 1040415832u, 2283342035u, 1078398157u, 1345997553u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 259, 3213249348u, 179066662u, 1103272172u, 1217337578u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 260, 3211562377u, 3779303391u, 3210023352u, 3115946280u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 261, 3192989874u, 286247089u, 1085153597u, 713645369u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 262, 1093670500u, 1468283899u, 1042831668u, 2022736418u, 1093670501u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 263, 1083139105u, 3305564080u, 1065483445u, 482392433u, 1083140096u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 264, 3201695807u, 2256346551u, 3222430705u, 2071674991u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 265, 3204024695u, 2295269094u, 1084451053u, 2773103941u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 266, 1078173946u, 1482721827u, 1092243422u, 3125409590u, 1078198272u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 267, 3221065973u, 1381740563u, 1071545057u, 2918235653u, 3220176896u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 268, 3238715972u, 1105857967u, 3241990046u, 2703723225u, 3238715968u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 269, 1043015571u, 174689677u, 1079333374u, 3947057014u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 270, 1090461859u, 2023082423u, 3242081486u, 1169047927u, 1090461872u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 271, 1064525899u, 3742487766u, 1043425732u, 194972788u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 272, 3213791827u, 2136071361u, 3211529757u, 993675115u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 273, 3213663381u, 210772141u, 3241441539u, 580731413u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 274, 1093840413u, 1751560711u, 1074522705u, 180987057u, 1093840414u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 275, 1066754591u, 2552236599u, 1088658621u, 2112468655u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 276, 3189290617u, 1578223762u, 3224596567u, 2456166162u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 277, 1058506965u, 2110924310u, 1086207177u, 3161208323u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 278, 3231863394u, 2352173188u, 1079361728u, 4070222179u, 3231863296u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 279, 1101012904u, 2481562701u, 1090937016u, 3809489716u, 1101012904u, 2483027968u, 0, CEIL_TOLERANCE, 0},
+{ 280, 3197002651u, 330905705u, 1086260896u, 90264431u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 281, 1040729961u, 4162008079u, 3194387916u, 759522153u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 282, 1081015037u, 1839697482u, 3216442625u, 2211508949u, 1081016320u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 283, 3249807211u, 3736863454u, 1063475914u, 3150741666u, 3249807211u, 3724541952u, 0, CEIL_TOLERANCE, 0},
+{ 284, 1060785883u, 4200269406u, 3236646101u, 1061812176u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 285, 1080217979u, 106027290u, 3234978297u, 2245237549u, 1080221696u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 286, 3246984334u, 2132131375u, 3250483427u, 3449276437u, 3246984334u, 2013265920u, 0, CEIL_TOLERANCE, 0},
+{ 287, 1089388778u, 2334440944u, 1105423490u, 4004336184u, 1089388800u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 288, 3218772704u, 4090088208u, 1042030013u, 3898658299u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 289, 3207908064u, 2272831437u, 3253082595u, 2639188641u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 290, 1054766684u, 1856594168u, 3189515294u, 4101853676u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 291, 1076012412u, 2211699255u, 3195060344u, 3865018604u, 1076101120u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 292, 3242767010u, 996259334u, 3241496889u, 3782673116u, 3242767010u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 293, 1099130747u, 3840380763u, 1048674041u, 550040067u, 1099130747u, 3892314112u, 0, CEIL_TOLERANCE, 0},
+{ 294, 3251419593u, 95874100u, 3237232828u, 2645647822u, 3251419593u, 92274688u, 0, CEIL_TOLERANCE, 0},
+{ 295, 1043665640u, 3441419500u, 3252367038u, 876710419u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 296, 3238593552u, 2560836004u, 3199616543u, 1180840586u, 3238593552u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 297, 3221602966u, 2218230392u, 3227485787u, 3947214579u, 3221225472u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 298, 1079539654u, 1447312532u, 1081476588u, 780366847u, 1079541760u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 299, 1072569643u, 2842113832u, 3216156731u, 225159029u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 300, 1098117193u, 1601981129u, 3234628869u, 2236538344u, 1098117193u, 1610612736u, 0, CEIL_TOLERANCE, 0},
+{ 301, 1085173524u, 2194185737u, 3242362684u, 87913366u, 1085173760u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 302, 3199083880u, 1346862963u, 1077836259u, 3604666660u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 303, 3212255979u, 3115209742u, 1099332326u, 1325101950u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 304, 3224546042u, 3889223100u, 1053247613u, 3371396923u, 3224502272u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 305, 3220477868u, 4163120793u, 1075022670u, 1387631215u, 3220176896u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 306, 3205481779u, 1532426189u, 1063168268u, 3397022615u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 307, 3201033321u, 89324166u, 1079206060u, 3429424710u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 308, 3192325102u, 747591401u, 1072238381u, 2803213904u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 309, 1091113780u, 271904221u, 1044258318u, 1858545114u, 1091113784u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 310, 3228068914u, 314958082u, 3249912496u, 2966213175u, 3228065792u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 311, 3197179414u, 3119528953u, 3217179014u, 2908718240u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 312, 3242467576u, 2018361566u, 1100926600u, 3985805054u, 3242467576u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 313, 1070132580u, 409584884u, 3239758947u, 755795129u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 314, 1075772446u, 1819156379u, 3251342302u, 2982669005u, 1075838976u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 315, 1101563433u, 2080534280u, 3188254060u, 449171797u, 1101563433u, 2113929216u, 0, CEIL_TOLERANCE, 0},
+{ 316, 1095956900u, 168744837u, 3214950009u, 1322217822u, 1095956900u, 1073741824u, 0, CEIL_TOLERANCE, 0},
+{ 317, 3254226900u, 3250487255u, 1062120700u, 1876195180u, 3254226900u, 3249537024u, 0, CEIL_TOLERANCE, 0},
+{ 318, 3226343480u, 1336400247u, 1098057903u, 3314079581u, 3226337280u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 319, 3203678820u, 265025555u, 1063854282u, 3779482256u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 320, 1067300501u, 887044257u, 1054789618u, 2732056261u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 321, 1050106742u, 4027115185u, 3191764868u, 2940199511u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 322, 3202500155u, 2875684421u, 3227459837u, 2251967570u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 323, 1063244412u, 284173546u, 3238823679u, 3557800647u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 324, 1101458560u, 3147771266u, 3220110464u, 2933364246u, 1101458560u, 3154116608u, 0, CEIL_TOLERANCE, 0},
+{ 325, 1064853160u, 3366183281u, 3234870843u, 537442654u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 326, 3244118788u, 2529029548u, 3249882819u, 3781513577u, 3244118788u, 2147483648u, 0, CEIL_TOLERANCE, 0},
+{ 327, 3213436354u, 1080845539u, 3206760016u, 911778687u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 328, 3191951036u, 469586759u, 1091830022u, 3080528840u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 329, 1080249104u, 2863108169u, 3225605506u, 2508274250u, 1080254464u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 330, 3210826984u, 4080017377u, 3206492941u, 1470284690u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 331, 3207120390u, 3867917386u, 1102054928u, 3504746045u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 332, 1064522279u, 2962134101u, 3244741577u, 3390537350u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 333, 1088201813u, 1702237980u, 1071598971u, 1102587474u, 1088201856u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 334, 3202970118u, 2180218657u, 3211592260u, 1206527853u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 335, 3197084744u, 394130786u, 3242511482u, 2437699868u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 336, 1044237059u, 849581558u, 3252006507u, 2008614943u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 337, 3210140014u, 3128971673u, 3249137531u, 2773583059u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 338, 1085029866u, 590727700u, 3248651761u, 2183878539u, 1085029888u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 339, 1101098629u, 820687580u, 3208143496u, 1402434664u, 1101098629u, 838860800u, 0, CEIL_TOLERANCE, 0},
+{ 340, 3252290835u, 1873709254u, 3245167989u, 44275991u, 3252290835u, 1870659584u, 0, CEIL_TOLERANCE, 0},
+{ 341, 3189668753u, 1174874204u, 3208263730u, 2360372288u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 342, 1103854676u, 937573440u, 3208953761u, 211240241u, 1103854676u, 939524096u, 0, CEIL_TOLERANCE, 0},
+{ 343, 3243548934u, 2469774991u, 1043117070u, 3380071805u, 3243548934u, 2147483648u, 0, CEIL_TOLERANCE, 0},
+{ 344, 1058121042u, 442507560u, 3254252803u, 3257889649u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 345, 1068850520u, 1854921625u, 1049810168u, 2729627545u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 346, 3254712629u, 4001809575u, 3240128649u, 278261523u, 3254712629u, 4001366016u, 0, CEIL_TOLERANCE, 0},
+{ 347, 1087224694u, 1793907966u, 3238955714u, 398859249u, 1087224704u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 348, 3200952547u, 2511916952u, 3219195283u, 1697158299u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 349, 1069985548u, 3230931724u, 3243897690u, 3508781585u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 350, 1103847606u, 1674254897u, 1046547577u, 217148561u, 1103847606u, 1677721600u, 0, CEIL_TOLERANCE, 0},
+{ 351, 3211263954u, 3275604304u, 3194840159u, 2991205850u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 352, 3195249375u, 3509997278u, 3248888030u, 3897986511u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 353, 1047182435u, 2156824613u, 1042295665u, 1239257646u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 354, 3213264085u, 1073153314u, 3250031627u, 2567234990u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 355, 3190593412u, 4261696995u, 3197784432u, 323702024u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 356, 3243690997u, 4075177615u, 3202791065u, 1919006082u, 3243690997u, 3221225472u, 0, CEIL_TOLERANCE, 0},
+{ 357, 3239270013u, 386429966u, 1086504491u, 3698826164u, 3239270012u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 358, 1078327190u, 1681986446u, 3194985869u, 3072950140u, 1078329344u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 359, 3217311933u, 3719038997u, 1055433962u, 3331415058u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 360, 1060749713u, 2420250111u, 3238002206u, 1928661079u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 361, 1081914210u, 3679866727u, 3227386672u, 1273835792u, 1081917440u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 362, 1041622738u, 2682092368u, 3234222284u, 1325425811u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 363, 1056312613u, 4175172697u, 3208346191u, 2130706153u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 364, 1092089624u, 1200784450u, 1083605096u, 1248595607u, 1092089628u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 365, 3213890863u, 1897285171u, 3251296075u, 944966123u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 366, 3241371250u, 2270747330u, 3230692631u, 422503284u, 3241371250u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 367, 1084120037u, 2857564741u, 1075647403u, 3308906709u, 1084120064u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 368, 3203475098u, 1380066948u, 3232612906u, 2613634294u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 369, 1063890856u, 4022784584u, 1060483857u, 3264056381u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 370, 1044637404u, 1778509100u, 3213146285u, 2665833973u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 371, 3216727300u, 1859175955u, 1079949560u, 4258450607u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 372, 1048277388u, 4128020197u, 1076266146u, 4122840980u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 373, 3193183163u, 2454653987u, 3229487005u, 2977478685u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 374, 3253556483u, 1355181872u, 1095308770u, 436846481u, 3253556483u, 1354760192u, 0, CEIL_TOLERANCE, 0},
+{ 375, 3246605302u, 2592856453u, 3247825559u, 3195234082u, 3246605302u, 2550136832u, 0, CEIL_TOLERANCE, 0},
+{ 376, 3222118023u, 3554670043u, 1091621009u, 3321236467u, 3221749760u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 377, 1069012833u, 1936670355u, 1095715713u, 2958468553u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 378, 3192291109u, 2960339502u, 1098808013u, 1044068983u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 379, 3196691185u, 4093388677u, 1095478112u, 1735930261u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 380, 1091040302u, 1807398746u, 3195743135u, 4261616162u, 1091040304u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 381, 3209294194u, 3250576797u, 1059002384u, 3043079652u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 382, 1069207109u, 666051428u, 3208765404u, 1912684117u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 383, 1103487420u, 1949030179u, 1096388934u, 896459246u, 1103487420u, 1954545664u, 0, CEIL_TOLERANCE, 0},
+{ 384, 1054300653u, 622499767u, 1066707637u, 1490260486u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 385, 1106688493u, 1490616165u, 3251242436u, 795675736u, 1106688493u, 1491075072u, 0, CEIL_TOLERANCE, 0},
+{ 386, 1080943896u, 3662877092u, 3234317146u, 3200513112u, 1080950784u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 387, 1084088786u, 1356101968u, 3236536816u, 3062844611u, 1084089344u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 388, 3219922640u, 2284484846u, 3219498359u, 3240896015u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 389, 3235759689u, 494503287u, 1092811254u, 142673998u, 3235759680u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 390, 3252125916u, 3394882641u, 3225306538u, 364852125u, 3252125916u, 3393191936u, 0, CEIL_TOLERANCE, 0},
+{ 391, 3225261763u, 193885269u, 1088149839u, 1359805831u, 3225223168u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 392, 3200484782u, 592580907u, 3199560872u, 3086438952u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 393, 1059518664u, 1778008540u, 1049064687u, 73581647u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 394, 3246733598u, 233240285u, 1081923320u, 2710903921u, 3246733598u, 134217728u, 0, CEIL_TOLERANCE, 0},
+{ 395, 1069513767u, 3719878805u, 1079866720u, 3615458228u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 396, 3221194724u, 3647632375u, 3247225271u, 3839959621u, 3220176896u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 397, 1103401096u, 2232210456u, 3235434773u, 224271737u, 1103401096u, 2239758336u, 0, CEIL_TOLERANCE, 0},
+{ 398, 3193003684u, 2134662911u, 3190390590u, 4239009051u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 399, 1080526145u, 2305279897u, 1077668039u, 1854523320u, 1080532992u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 400, 3219864259u, 538224650u, 3206153057u, 1379649610u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 401, 3196410507u, 3683897920u, 3244167599u, 3647579469u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 402, 1090280933u, 2694093608u, 1042775347u, 598406111u, 1090280944u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 403, 3211635392u, 872706833u, 1084802480u, 2200602798u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 404, 1042339597u, 904146293u, 1060867322u, 1729685598u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 405, 3195694970u, 1894173462u, 3232800651u, 191960416u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 406, 1091225343u, 3521028551u, 1054522089u, 3287274359u, 1091225344u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 407, 1095386964u, 959640601u, 3201578263u, 4136915018u, 1095386964u, 2147483648u, 0, CEIL_TOLERANCE, 0},
+{ 408, 1064005451u, 1553716379u, 1106027987u, 984725765u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 409, 3238832641u, 2287646644u, 3240329321u, 2276183378u, 3238832640u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 410, 1068209174u, 3940225170u, 3199544434u, 997572161u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 411, 3212768361u, 36116288u, 3206886566u, 4196602670u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 412, 3241695853u, 3550227562u, 3207257983u, 2747744117u, 3241695853u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 413, 1104236126u, 507130047u, 1048359321u, 3229888373u, 1104236126u, 507510784u, 0, CEIL_TOLERANCE, 0},
+{ 414, 3222996778u, 2210969014u, 1081031001u, 1946786091u, 3222798336u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 415, 3236306990u, 4059150589u, 3189759234u, 1177045799u, 3236306976u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 416, 1093103612u, 2664812822u, 1050343198u, 2034180320u, 1093103614u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 417, 3213779117u, 1175750283u, 3235559706u, 1424491340u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 418, 3213904193u, 1630036121u, 3231972785u, 3195479448u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 419, 1090429875u, 2527029044u, 1046927050u, 4000723255u, 1090429888u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 420, 1085208677u, 3335703647u, 3237349676u, 3869440059u, 1085209088u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 421, 1091433848u, 3888398377u, 3196041693u, 1290567220u, 1091433856u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 422, 1066679070u, 3242451480u, 3248384948u, 707431021u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 423, 1083230509u, 2739665123u, 1060777905u, 1733073225u, 1083231232u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 424, 1078517061u, 1297274853u, 3208848704u, 3341639139u, 1078525952u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 425, 1046570941u, 2228057309u, 1084318902u, 1317851136u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 426, 1088255327u, 270039934u, 3241414679u, 3063626339u, 1088255360u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 427, 3219178350u, 83062251u, 3211262173u, 2659016437u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 428, 1095743886u, 3833539373u, 3206667189u, 1567476111u, 1095743887u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 429, 3205195072u, 2382776852u, 3249232579u, 1546622468u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 430, 1085536439u, 1714300821u, 1104130938u, 4167591598u, 1085536512u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 431, 1051092760u, 2798720100u, 1086978789u, 449990704u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 432, 3231198415u, 4039516226u, 3244344107u, 4272932619u, 3231198208u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 433, 3222708441u, 1683007544u, 1091105663u, 3805494321u, 3222536192u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 434, 3220852948u, 2072627412u, 1094383324u, 3394151662u, 3220176896u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 435, 3220570024u, 1120106427u, 3223631624u, 3404608264u, 3220176896u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 436, 1097859997u, 559918757u, 3205077053u, 908100198u, 1097859997u, 805306368u, 0, CEIL_TOLERANCE, 0},
+{ 437, 1042677918u, 2026673913u, 3244833635u, 2844573214u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 438, 3254567259u, 3946837259u, 3234993796u, 3850406820u, 3254567259u, 3945791488u, 0, CEIL_TOLERANCE, 0},
+{ 439, 1057479809u, 3139330994u, 1046133568u, 1539650690u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 440, 3236705500u, 1554593884u, 3228899878u, 2813752562u, 3236705472u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 441, 1056505004u, 3804703138u, 1072931071u, 2053677923u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 442, 3244864299u, 289355864u, 1078453818u, 2143066338u, 3244864299u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 443, 3203939880u, 2157691971u, 1106629150u, 110806409u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 444, 1082157019u, 3570399481u, 1085637605u, 180265334u, 1082157056u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 445, 3200980182u, 558779875u, 3202046748u, 2338464653u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 446, 1045705464u, 1703969219u, 3229797258u, 1417521063u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 447, 3237782261u, 3917440951u, 1051668894u, 3736066983u, 3237782256u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 448, 1064752080u, 3106613409u, 1066627453u, 2735392257u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 449, 1065665372u, 2229777605u, 1065061963u, 2405869925u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 450, 3239463229u, 3967957902u, 1057416138u, 3459188071u, 3239463228u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 451, 1068639210u, 3699016825u, 3249713090u, 796144848u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 452, 3228816396u, 3285165564u, 3211948811u, 401510871u, 3228815360u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 453, 1094257658u, 634857910u, 3199607513u, 914218057u, 1094257659u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 454, 1083743336u, 2030735578u, 3233855943u, 965677531u, 1083744256u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 455, 1079556815u, 3957229084u, 1051050470u, 3123776651u, 1079558144u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 456, 3221863333u, 162122081u, 3239376395u, 108064594u, 3221749760u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 457, 3237271786u, 869031839u, 3225020876u, 1344301606u, 3237271776u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 458, 3214433474u, 946696117u, 3231825228u, 1700703647u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 459, 1075492875u, 3394168074u, 1076939786u, 1666995668u, 1075576832u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 460, 3208774795u, 2488789804u, 3238508333u, 1506943664u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1073741824u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 462, 3219934542u, 1244307192u, 3191297711u, 2540916692u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 463, 3200062692u, 2871645739u, 3239081581u, 1440249115u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 464, 1068350633u, 1231934926u, 3236746788u, 603977748u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 465, 3195449689u, 2386312545u, 1063169277u, 2715234268u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 466, 1087803418u, 915867083u, 1046790892u, 3347417612u, 1087803456u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 467, 1105984188u, 3553288373u, 1065698616u, 2906680663u, 1105984188u, 3554672640u, 0, CEIL_TOLERANCE, 0},
+{ 468, 1045506226u, 2342364630u, 1051356723u, 4019093203u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 469, 3201169162u, 2911548084u, 1105282515u, 2476735795u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 470, 1050472772u, 1836216409u, 1101062307u, 2519592554u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 471, 1070178161u, 1235369496u, 3222946447u, 668087854u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 472, 3208554596u, 2981820811u, 1059838516u, 2845580478u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 473, 3193931414u, 1565550570u, 3217165795u, 4162017137u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 474, 3237251378u, 2808968027u, 1055630096u, 1782326814u, 3237251376u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 475, 1053576974u, 1492622658u, 3216653077u, 3972512122u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 476, 3222171679u, 2722693603u, 3227814791u, 3169731970u, 3221749760u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 477, 3217906631u, 899763203u, 3207606001u, 2804747833u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 478, 3230670325u, 3789058912u, 3228095081u, 4135937628u, 3230669824u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 479, 1060199382u, 1682808307u, 3206960335u, 232877759u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 480, 3242091486u, 2851963139u, 3246852961u, 2590862592u, 3242091486u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 481, 1081200406u, 2422232642u, 3234779662u, 290458310u, 1081200640u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 482, 3210671078u, 1082582386u, 1075605675u, 2602133689u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 483, 3239818611u, 1789635787u, 1059414278u, 1048286093u, 3239818608u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 484, 1098330542u, 231339448u, 1055573265u, 504907415u, 1098330542u, 268435456u, 0, CEIL_TOLERANCE, 0},
+{ 485, 1063211461u, 1153251200u, 3204617090u, 1772013857u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 486, 1099551055u, 1082898276u, 3212089272u, 1449080862u, 1099551055u, 1207959552u, 0, CEIL_TOLERANCE, 0},
+{ 487, 1086008285u, 3177299045u, 1058862813u, 809400815u, 1086008320u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 488, 3230854550u, 1924429710u, 1056464743u, 3349283177u, 3230854144u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 489, 3245473391u, 42238036u, 1042379500u, 2113559863u, 3245473391u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 490, 1064761243u, 3304403230u, 3217556703u, 58952646u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 491, 3212669530u, 1645486982u, 3224301095u, 3636267471u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 492, 1062762009u, 619402181u, 3235208235u, 557360557u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 493, 3238238394u, 110029735u, 1046937383u, 984375729u, 3238238392u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 494, 3189496738u, 4063688092u, 3203235744u, 1049950343u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 495, 1062350619u, 650996069u, 1054971928u, 3953359826u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 496, 3227055805u, 66926332u, 1090561839u, 1379780888u, 3227041792u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 497, 3233453307u, 2803378256u, 1086057989u, 498534626u, 3233453056u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 498, 1082618553u, 2846400785u, 1047142525u, 1375153550u, 1082619904u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 499, 1044581201u, 2869128958u, 1070972315u, 4246440273u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 500, 1051832506u, 3112381207u, 1044430965u, 3981604561u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 501, 3231254997u, 243303420u, 1093735824u, 1575581926u, 3231254528u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 502, 3239137997u, 3218865041u, 3204803496u, 3840388050u, 3239137996u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 503, 1048415431u, 336846959u, 1052664471u, 3798336786u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 504, 1055954236u, 3639240976u, 1081202165u, 1844741676u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 505, 3211904793u, 717293069u, 3211534283u, 582401011u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 506, 3251962512u, 3766248610u, 3196520332u, 1174437546u, 3251962512u, 3762290688u, 0, CEIL_TOLERANCE, 0},
+{ 507, 1083431226u, 756959182u, 3204099341u, 1581804034u, 1083431936u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 508, 3205806444u, 3560686300u, 3220980617u, 4277975772u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 509, 3209906076u, 2598148853u, 3217622194u, 3460421008u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 510, 1066720824u, 136600515u, 3209934920u, 3340653128u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 511, 1096820310u, 1045480938u, 3251354609u, 4133432965u, 1096820310u, 1073741824u, 0, CEIL_TOLERANCE, 0},
+{ 512, 1091599431u, 1630207738u, 3239996829u, 2393354808u, 1091599432u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 513, 3190626018u, 3739770117u, 1059520750u, 3959551225u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 514, 3230730505u, 1498861716u, 1091297147u, 847410798u, 3230730240u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 1073741824u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 516, 1054849265u, 2353103845u, 3235718771u, 2978889966u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 517, 3251357992u, 1546972125u, 3249076079u, 1987349196u, 3251357992u, 1543503872u, 0, CEIL_TOLERANCE, 0},
+{ 518, 3238219513u, 2769161072u, 1075207126u, 292616282u, 3238219512u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 519, 3199712298u, 36855311u, 1052128202u, 1479039342u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 520, 1083757053u, 2027463605u, 1066023013u, 3369686340u, 1083757568u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 521, 3197852749u, 3808681655u, 1054161346u, 1821773119u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 522, 1040685928u, 3175490326u, 3226879970u, 845687760u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 523, 1042302993u, 3124482451u, 3242748377u, 3259417226u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 524, 1045245695u, 2751606436u, 3236210939u, 3923142740u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 525, 1095694737u, 2016872044u, 3228408064u, 4201274408u, 1095694737u, 2147483648u, 0, CEIL_TOLERANCE, 0},
+{ 526, 3199349254u, 1019916843u, 3219974785u, 1977881787u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 527, 3199478752u, 2060433318u, 1075872515u, 366073725u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 528, 3191180557u, 1098469906u, 1082900695u, 2349346832u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 529, 3209974707u, 3011196295u, 3252479932u, 2459281672u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 530, 3221334323u, 2843222682u, 1089275809u, 298982001u, 3221225472u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 531, 1101737698u, 914741728u, 3203468059u, 2833809843u, 1101737698u, 939524096u, 0, CEIL_TOLERANCE, 0},
+{ 532, 3236763878u, 1274901962u, 3241535845u, 3759113509u, 3236763872u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 533, 3245916442u, 2134927252u, 3253802671u, 3013731444u, 3245916442u, 1879048192u, 0, CEIL_TOLERANCE, 0},
+{ 534, 1099201341u, 2230655177u, 3254510616u, 1249674366u, 1099201341u, 2281701376u, 0, CEIL_TOLERANCE, 0},
+{ 535, 1062971253u, 717357389u, 1083533731u, 3746683362u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 536, 3213773114u, 834976849u, 3217357661u, 2465861779u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 537, 1045656117u, 1385714428u, 1053358395u, 3007113740u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 538, 1050527919u, 599268545u, 3201368210u, 2309854744u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 539, 1069954454u, 2840234388u, 3232496515u, 333365983u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 540, 1045922781u, 3136078996u, 3194520860u, 2650572904u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 541, 3233687691u, 2405805086u, 3251640319u, 324233833u, 3233687552u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 542, 1106699146u, 2589598340u, 3254677807u, 952438812u, 1106699146u, 2589982720u, 0, CEIL_TOLERANCE, 0},
+{ 543, 3189114773u, 1922837702u, 3216892718u, 3535907549u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 544, 3243615868u, 261447440u, 3209805849u, 1150571079u, 3243615868u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 545, 1095805232u, 4026487528u, 1073152064u, 27340691u, 1095805233u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 546, 3229123692u, 338765118u, 1086225786u, 3207238249u, 3229122560u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 547, 3196182703u, 1085283176u, 3187775111u, 1601194210u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 548, 1091520173u, 3031712790u, 3252307859u, 170666844u, 1091520176u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 549, 3218862231u, 3148395674u, 1041913758u, 3306391490u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 550, 3201277070u, 2205233857u, 3208100078u, 3993195511u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 551, 1067699608u, 4282766727u, 1072820377u, 1874778218u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 552, 3210833092u, 2920860798u, 3218070226u, 3104066154u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 553, 3204950351u, 969991373u, 3250596895u, 1734386152u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 554, 3238915818u, 1218740205u, 3239802737u, 2610078504u, 3238915816u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 555, 3206031242u, 1485218325u, 3220870240u, 3591664613u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 556, 3202074143u, 690157417u, 3190850619u, 4192347699u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 557, 1096053810u, 4009839784u, 1079670252u, 394167192u, 1096053811u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 558, 3234559237u, 961532417u, 1092588071u, 2923790239u, 3234559232u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 559, 3203879091u, 4174125604u, 1050682630u, 2169701868u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 560, 3243092475u, 4146748230u, 1087373950u, 2481478351u, 3243092475u, 2147483648u, 0, CEIL_TOLERANCE, 0},
+{ 561, 1076987866u, 3984715440u, 1050421618u, 2446142566u, 1077018624u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 562, 1084172406u, 936290150u, 1100614426u, 3625806370u, 1084173312u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 563, 1099787952u, 1866615265u, 3215651428u, 2337013350u, 1099787952u, 1879048192u, 0, CEIL_TOLERANCE, 0},
+{ 564, 3253198302u, 712227971u, 1106004723u, 973148499u, 3253198302u, 710934528u, 0, CEIL_TOLERANCE, 0},
+{ 565, 3230088199u, 3409813738u, 3244817008u, 1933503498u, 3230087168u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 566, 1079943733u, 3180389060u, 3228735703u, 83422217u, 1079951360u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 567, 1077878724u, 556972671u, 3204582372u, 841555801u, 1077936128u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 568, 1070767721u, 4189151332u, 1080874032u, 706326922u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 569, 1096151307u, 198291836u, 1057281892u, 2188836928u, 1096151307u, 1073741824u, 0, CEIL_TOLERANCE, 0},
+{ 570, 1078091995u, 1219449298u, 3228734687u, 3504562743u, 1078099968u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 571, 3204570464u, 1776099219u, 1094316777u, 4188083896u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 572, 3193845708u, 2614400266u, 1073750227u, 3003203347u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 573, 3213982678u, 2959351406u, 1105603716u, 311851587u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 574, 1084544434u, 865443613u, 1097532516u, 3622237781u, 1084544512u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 575, 3231786666u, 447506102u, 3195759295u, 3603669725u, 3231786496u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 576, 1097890173u, 3934398273u, 1040996422u, 2968621268u, 1097890173u, 4026531840u, 0, CEIL_TOLERANCE, 0},
+{ 577, 3196739825u, 784208771u, 1088764788u, 2182296421u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 578, 3248332291u, 1527590526u, 3206961556u, 2823164069u, 3248332291u, 1476395008u, 0, CEIL_TOLERANCE, 0},
+{ 579, 3236644131u, 3876699591u, 3207481130u, 4028148535u, 3236644128u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 580, 1083576186u, 2164249756u, 1059857743u, 1785169952u, 1083576320u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 581, 1091804009u, 2079273665u, 1080303860u, 625760474u, 1091804012u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 582, 3226486108u, 3636214836u, 1068367620u, 2932621925u, 3226484736u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 583, 1043995372u, 4274131512u, 1047707755u, 92550763u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 584, 3198822121u, 2648933384u, 1084603503u, 3534304873u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 585, 1064563235u, 3216750767u, 3191088629u, 547482628u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 586, 1061084774u, 1420360746u, 1080063101u, 1690029499u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 587, 3229855364u, 1908572179u, 1080112083u, 1228319033u, 3229853696u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 588, 1048158178u, 500312015u, 3212368508u, 3864619086u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 589, 3221335610u, 4211343447u, 1087492676u, 4272583781u, 3221225472u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 590, 1099392394u, 2382118000u, 1042665328u, 567154882u, 1099392394u, 2415919104u, 0, CEIL_TOLERANCE, 0},
+{ 591, 1058013442u, 1435344339u, 3216303171u, 2275988178u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 592, 3214538619u, 3403659753u, 3218043030u, 1926480488u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 593, 1076840383u, 1198845185u, 3225556149u, 1130089684u, 1076887552u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 594, 3222663042u, 2183928090u, 1048403956u, 963834821u, 3222536192u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 595, 1101672960u, 2120625396u, 1041006976u, 2137548527u, 1101672960u, 2147483648u, 0, CEIL_TOLERANCE, 0},
+{ 596, 1099230238u, 586700956u, 1059670521u, 303891699u, 1099230238u, 671088640u, 0, CEIL_TOLERANCE, 0},
+{ 597, 3218994498u, 2509132460u, 1102827530u, 2205707903u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 598, 3204860597u, 1229308263u, 3209170414u, 4206576047u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 599, 3224076289u, 4078010749u, 3199236456u, 733478972u, 3223977984u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 600, 3197712584u, 4277541051u, 3199806921u, 397102023u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 601, 3195975013u, 900999594u, 3234720188u, 2530214248u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 602, 1076543548u, 4000609478u, 1096577064u, 4148592328u, 1076625408u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 603, 1048668084u, 2154187873u, 3224392607u, 3957250362u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 604, 3223413488u, 2867079200u, 1101870326u, 921212001u, 3223322624u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 605, 3233221890u, 674547716u, 1063216239u, 3929755226u, 3233221888u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 606, 3240415851u, 3158182449u, 1043794244u, 3259056345u, 3240415850u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 607, 3236776656u, 3002823940u, 1059511739u, 2832435794u, 3236776640u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 608, 3217304822u, 2196511929u, 1049973941u, 3672092877u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 609, 1050438056u, 3655292191u, 1086438127u, 3567072906u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 610, 3243186948u, 1617573614u, 3201863123u, 3090723732u, 3243186948u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 611, 3233201380u, 679893506u, 3211547753u, 824081024u, 3233201152u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 612, 1089530525u, 2285242807u, 1084999409u, 2221731406u, 1089530528u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 613, 3206733664u, 1935990727u, 1088822246u, 1058156518u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 614, 1102839166u, 521023584u, 1059186903u, 4245163857u, 1102839166u, 536870912u, 0, CEIL_TOLERANCE, 0},
+{ 615, 1103891140u, 2312887617u, 3191771354u, 1885370807u, 1103891140u, 2315255808u, 0, CEIL_TOLERANCE, 0},
+{ 616, 3252953815u, 1796441468u, 1100030327u, 2772711004u, 3252953815u, 1795162112u, 0, CEIL_TOLERANCE, 0},
+{ 617, 3204276820u, 2095685003u, 1077984448u, 2100773742u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 618, 3192954620u, 2892538035u, 1042396334u, 4162200338u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 619, 3242725751u, 2177698116u, 3227557177u, 150832500u, 3242725751u, 2147483648u, 0, CEIL_TOLERANCE, 0},
+{ 620, 3191562216u, 607966734u, 3236250630u, 4164600559u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 621, 3216389812u, 2830122967u, 1046096700u, 3713346883u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 622, 3237197963u, 2314640506u, 3203696416u, 3276228872u, 3237197952u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 623, 3212912307u, 469331883u, 3249037349u, 2999233437u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 624, 1097382011u, 560886625u, 1091899487u, 748795120u, 1097382011u, 1073741824u, 0, CEIL_TOLERANCE, 0},
+{ 625, 1049886858u, 2958421324u, 1092569414u, 3235243477u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 626, 3193026497u, 3221475559u, 1043038304u, 915608434u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 627, 1071197530u, 3007808652u, 3216682290u, 2531019474u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 628, 3242028999u, 1767658578u, 3237045269u, 2313128318u, 3242028999u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 629, 3210617892u, 1926845182u, 1066835624u, 1783256828u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 630, 1040575629u, 90378038u, 1057168870u, 164358218u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 631, 1106859172u, 1610524680u, 1085283851u, 2903496007u, 1106859172u, 1610612736u, 0, CEIL_TOLERANCE, 0},
+{ 632, 1078635586u, 4274321404u, 3202913591u, 720121831u, 1078657024u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 633, 1051205256u, 2034778236u, 1071133763u, 1413236391u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 634, 1051063028u, 1489112261u, 1076691395u, 348210906u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 635, 3206743917u, 2797651324u, 3224410527u, 2374818327u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 636, 1088287256u, 1823161666u, 3197810695u, 3119680047u, 1088287296u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 637, 1065927336u, 3420950657u, 1087084743u, 2136638961u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 638, 1069902224u, 3554566429u, 1062907717u, 2736702589u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 639, 3244888667u, 2928437580u, 3187765027u, 1393427873u, 3244888667u, 2684354560u, 0, CEIL_TOLERANCE, 0},
+{ 640, 3209301561u, 189447067u, 1051643315u, 828663513u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 641, 1052313869u, 2852350928u, 1045683757u, 673354280u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 642, 1043946301u, 3589563265u, 3248741629u, 812657927u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 643, 3190610826u, 1766416701u, 1100392103u, 2185373290u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 644, 3220275389u, 3763582673u, 3191965790u, 388374829u, 3220176896u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 645, 1079635136u, 1187403069u, 1075300235u, 336640304u, 1079640064u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 646, 1103926251u, 1718795752u, 3243118752u, 683369237u, 1103926251u, 1719664640u, 0, CEIL_TOLERANCE, 0},
+{ 647, 3210792097u, 1863545307u, 1069449477u, 3418627399u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 648, 1069601294u, 3295607249u, 1068878592u, 1633297809u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 649, 1058947127u, 2585980994u, 3236670483u, 1286750688u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 650, 1046157033u, 15816845u, 3233249283u, 2491924775u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 651, 1042413021u, 1051983351u, 1049180786u, 1474421917u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 652, 3201249525u, 2003816032u, 1086050104u, 668090487u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 653, 1052556037u, 3671484625u, 1067020039u, 430024694u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 654, 1067397110u, 3991830201u, 3207808714u, 1021245839u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 655, 1064194391u, 4255801807u, 3207681716u, 1926756877u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 656, 1052140785u, 4167786896u, 1077097744u, 1775517981u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 657, 1085601978u, 3187518564u, 1082437406u, 944672491u, 1085602048u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 658, 1049366282u, 953085192u, 3227310828u, 3459155777u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 659, 1069502506u, 1908555460u, 1073640207u, 260441967u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 660, 1067219606u, 250762477u, 1072582645u, 2886742039u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 661, 3250906006u, 786180031u, 3197734769u, 2788918312u, 3250906006u, 780140544u, 0, CEIL_TOLERANCE, 0},
+{ 662, 3234511827u, 2055912467u, 3244244909u, 1394142937u, 3234511744u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 663, 1069612985u, 91984146u, 3222252812u, 4126276047u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 664, 1081340139u, 3942715706u, 3239316352u, 410676547u, 1081344000u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 665, 3198557846u, 86296211u, 1085850694u, 649202596u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 666, 3245366392u, 3069064472u, 3237358008u, 23209276u, 3245366392u, 2952790016u, 0, CEIL_TOLERANCE, 0},
+{ 667, 1081235288u, 1867297860u, 1072956607u, 2513414118u, 1081237504u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 668, 3250533347u, 3171788768u, 3235208783u, 162138697u, 3250533347u, 3170893824u, 0, CEIL_TOLERANCE, 0},
+{ 669, 1081728455u, 1245110700u, 1081653954u, 2584994077u, 1081729024u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 670, 3245510120u, 3347226587u, 1058962932u, 2291943376u, 3245510120u, 3221225472u, 0, CEIL_TOLERANCE, 0},
+{ 671, 1058899062u, 966940828u, 1060726420u, 2798041096u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1073741824u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 673, 3248116497u, 1671039260u, 1086395032u, 3745833360u, 3248116497u, 1610612736u, 0, CEIL_TOLERANCE, 0},
+{ 674, 1057078797u, 651714217u, 1047070645u, 2130549237u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 675, 3207115731u, 1423000172u, 3247822717u, 1551488170u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 676, 3201597307u, 921077236u, 3213332351u, 1431049019u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 677, 1067510295u, 655715547u, 3190985373u, 1527556471u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 678, 3227654979u, 4110878657u, 3251297180u, 879739345u, 3227648000u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 679, 1085804762u, 2623955764u, 1093699897u, 1216444475u, 1085804800u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 680, 1091905603u, 107442539u, 3239767031u, 1149813329u, 1091905604u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 681, 3233445240u, 1761361082u, 3226030205u, 1121849716u, 3233445120u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 682, 3240087115u, 2534144722u, 1044223733u, 3512285706u, 3240087112u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 683, 3211846077u, 4073670723u, 1050729852u, 3034818849u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 684, 1101984574u, 1421423503u, 1060278048u, 1397153092u, 1101984574u, 1442840576u, 0, CEIL_TOLERANCE, 0},
+{ 685, 3217421829u, 1649206019u, 1104525577u, 1267104290u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 686, 3189302097u, 3775270392u, 1040251850u, 68667319u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 687, 3204330900u, 3099226694u, 3254103006u, 4020102648u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 688, 3201591712u, 3718441177u, 3215643451u, 4032951536u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 689, 1044131371u, 508048351u, 3210196713u, 1707937896u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 690, 3198611627u, 2784738160u, 1073435430u, 1109346010u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 691, 3225725290u, 3331916473u, 3238794568u, 2707019594u, 3225714688u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 692, 1093182670u, 3093165197u, 1072894805u, 2853215019u, 1093182672u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 693, 3216582139u, 2135797997u, 1048399559u, 2941926126u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 694, 1048430980u, 2083412145u, 3249335391u, 507212448u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 695, 1075363751u, 4270176401u, 3246546709u, 3288753319u, 1075576832u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 696, 3247932863u, 3692175292u, 3197271515u, 3989064196u, 3247932863u, 3690987520u, 0, CEIL_TOLERANCE, 0},
+{ 697, 3251691738u, 3111924274u, 1066772558u, 59281695u, 3251691738u, 3107979264u, 0, CEIL_TOLERANCE, 0},
+{ 698, 1067683911u, 2135245466u, 3208804313u, 3846547392u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 699, 1094877811u, 972051266u, 3222814246u, 3539700586u, 1094877811u, 2147483648u, 0, CEIL_TOLERANCE, 0},
+{ 700, 3202965930u, 330951080u, 1079189813u, 583922384u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 701, 1089640092u, 1711944085u, 1104170032u, 643991456u, 1089640096u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 702, 3234429549u, 2072550721u, 3250147641u, 4280263530u, 3234429440u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 703, 3192972706u, 1566376352u, 1067251433u, 72984588u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 704, 1095276569u, 3103043079u, 1045853123u, 410067497u, 1095276570u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 705, 3216672493u, 1910366299u, 1081770885u, 634683073u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 706, 1081530688u, 2226525875u, 3224149290u, 2126302825u, 1081532416u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1073741824u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 708, 1066482943u, 1953339096u, 1077176252u, 1476516558u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 709, 1066092000u, 1306277326u, 1079089150u, 4093716191u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 710, 3233148787u, 51750045u, 3242913901u, 4256866157u, 3233148672u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 711, 3195084967u, 2163853087u, 3232053146u, 2962422808u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 712, 1075516945u, 1618388148u, 3233154824u, 3711953164u, 1075576832u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 713, 3246868002u, 357108214u, 3202294604u, 2306775262u, 3246868002u, 268435456u, 0, CEIL_TOLERANCE, 0},
+{ 714, 3201904086u, 2571356437u, 3249064063u, 2394851808u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 715, 3230488091u, 4273880094u, 1103698617u, 3578832032u, 3230486528u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 716, 3233426701u, 2091068742u, 3228270226u, 3980489730u, 3233426688u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 717, 3229016752u, 2772307714u, 1051008486u, 32546576u, 3229016064u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 718, 3241229215u, 2143788498u, 3195498043u, 3630119231u, 3241229215u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 719, 3198632935u, 2527385594u, 3240503648u, 3482095012u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 720, 3242168799u, 2690097362u, 1068598730u, 2360266862u, 3242168799u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 721, 1058857869u, 2673272949u, 1082639557u, 522449749u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 722, 1104424147u, 3596379400u, 3242016775u, 2002293002u, 1104424147u, 3598712832u, 0, CEIL_TOLERANCE, 0},
+{ 723, 1099439656u, 4113224369u, 3222122439u, 2152316893u, 1099439656u, 4160749568u, 0, CEIL_TOLERANCE, 0},
+{ 724, 3220796716u, 31662602u, 1047721249u, 1747087514u, 3220176896u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 725, 3250463757u, 2489659568u, 1097051253u, 277506957u, 3250463757u, 2483027968u, 0, CEIL_TOLERANCE, 0},
+{ 726, 3191401834u, 3850162281u, 3213841942u, 438724093u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 727, 1095392535u, 2431814052u, 1075518084u, 2672434118u, 1095392536u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 728, 3243162735u, 391606792u, 1048184750u, 4168944276u, 3243162735u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 729, 3247792416u, 457529672u, 3201090276u, 72407935u, 3247792416u, 402653184u, 0, CEIL_TOLERANCE, 0},
+{ 730, 3218720719u, 3954981400u, 1052053242u, 2411049585u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 731, 1086180091u, 485456950u, 1088415093u, 1655397424u, 1086180096u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 732, 3198234428u, 1551748070u, 3236871640u, 1329701152u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 733, 3224639122u, 3099222537u, 1104984570u, 4293792842u, 3224633344u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 734, 3203949705u, 3603065260u, 3197735968u, 2402359253u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 735, 3198824584u, 3961208159u, 3219057584u, 2340553876u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 736, 1074881909u, 4014841779u, 3197672877u, 3697233334u, 1075052544u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 737, 3213275657u, 1403876392u, 3254028950u, 921363393u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 738, 1107251806u, 1862576361u, 3194031708u, 2476290925u, 1107251806u, 1863319552u, 0, CEIL_TOLERANCE, 0},
+{ 739, 1049661768u, 1454212851u, 1088378861u, 3400401866u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 1074790400u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 741, 3216409282u, 1199568671u, 3225679997u, 46947405u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 742, 1077685537u, 2596231448u, 3253943728u, 2219151748u, 1077739520u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 743, 1066527035u, 4119719558u, 3222036299u, 1275474618u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 744, 3239908663u, 3347296825u, 1101507910u, 1254014794u, 3239908660u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 745, 1084119992u, 673775040u, 1070743626u, 244126093u, 1084120064u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 746, 3203199850u, 1832066983u, 1051358028u, 3262483417u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 747, 1077559600u, 3962610501u, 3198598777u, 849269178u, 1077608448u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 748, 3235473900u, 2497516122u, 3254374111u, 2821429629u, 3235473856u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 749, 1076236288u, 2805941787u, 3217785843u, 779131141u, 1076363264u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 750, 3226908686u, 723423605u, 1084533420u, 627282213u, 3226894336u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 751, 3215947680u, 4292778869u, 1078101071u, 1676860147u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 752, 1076288502u, 3528118587u, 3194648564u, 2363260897u, 1076363264u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 753, 3192897879u, 1307010018u, 1061248120u, 1468743108u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 754, 3246583139u, 107905661u, 3226089788u, 1943427674u, 3246583139u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 755, 3188230541u, 760006940u, 1054265604u, 1749976597u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 756, 3237773384u, 2787503556u, 1081282610u, 1195841206u, 3237773376u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 757, 3191802156u, 545462045u, 3208381743u, 1981311808u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 758, 1061232136u, 3657978397u, 1104463616u, 3501253426u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 759, 1049883857u, 1804177501u, 3210693633u, 3606766729u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 760, 1076856879u, 1336278526u, 1043741618u, 3165279431u, 1076887552u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 761, 1055471915u, 1599382075u, 1058018527u, 4212580517u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 762, 3207502326u, 3007589929u, 3202026547u, 2792028313u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 763, 3253082770u, 1866066996u, 1060329048u, 3727175322u, 3253082770u, 1864368128u, 0, CEIL_TOLERANCE, 0},
+{ 764, 3198416643u, 150890940u, 1056025306u, 3082724735u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 765, 1062008939u, 80400395u, 1093584426u, 3478941315u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 766, 3251640614u, 4050954182u, 3219263194u, 2537475930u, 3251640614u, 4047503360u, 0, CEIL_TOLERANCE, 0},
+{ 767, 1064841871u, 2881752155u, 3212589299u, 2559651278u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 768, 3249016304u, 440309030u, 3214267461u, 3788040806u, 3249016304u, 436207616u, 0, CEIL_TOLERANCE, 0},
+{ 769, 1100476615u, 918813144u, 3208535698u, 1607035904u, 1100476615u, 939524096u, 0, CEIL_TOLERANCE, 0},
+{ 770, 1042137451u, 2497054124u, 1089139147u, 2549609010u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 771, 1047037641u, 790219083u, 1054657139u, 2797979479u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 772, 1057781400u, 1149462078u, 1095765205u, 3879963182u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 773, 3202729813u, 2684353926u, 3205212854u, 1732474928u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 774, 1095236965u, 2742237025u, 1051317716u, 3386396147u, 1095236966u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 775, 1063230986u, 3408320912u, 1103071166u, 4233059513u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 776, 1064863548u, 1077495917u, 1088399968u, 433115118u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 777, 3204547572u, 841366493u, 1051716814u, 4121125128u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 778, 1064632084u, 321857207u, 1089128010u, 1149988239u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 779, 3245542663u, 799866606u, 3197637091u, 3924438208u, 3245542663u, 536870912u, 0, CEIL_TOLERANCE, 0},
+{ 780, 3191062890u, 2002049816u, 1077053447u, 2240354761u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 781, 3229006283u, 478939968u, 1097035749u, 1066716440u, 3229003776u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 782, 3232473641u, 1653104725u, 1088548129u, 81977716u, 3232473600u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 783, 3196861276u, 3899475018u, 3189694084u, 3330093036u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 784, 1089312583u, 2612450289u, 1079065127u, 603380842u, 1089312608u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 785, 1100636791u, 3962735564u, 1101570429u, 1372490825u, 1100636791u, 4026531840u, 0, CEIL_TOLERANCE, 0},
+{ 786, 1054806016u, 1479841439u, 1059312257u, 541504905u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 787, 1078662178u, 2626148789u, 1057571099u, 4121656076u, 1078689792u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 788, 1081613389u, 1902560314u, 1043130231u, 3557671562u, 1081614336u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 789, 3193829772u, 41779312u, 1081626342u, 831171823u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 790, 1058131100u, 1393168821u, 1066457405u, 1381616968u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 791, 1072338141u, 3756584649u, 3222267229u, 1423157432u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 792, 3254435674u, 1894912556u, 1042426694u, 155024547u, 3254435674u, 1894776832u, 0, CEIL_TOLERANCE, 0},
+{ 793, 3195453512u, 35164295u, 3203391785u, 1037041084u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 794, 1084777479u, 3957875950u, 3232195211u, 1590756436u, 1084777984u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 795, 1068844322u, 1447585080u, 1071279485u, 1107922438u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 796, 1046252518u, 981897615u, 1051856116u, 430357614u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 797, 3227524215u, 395145384u, 3219821938u, 50586510u, 3227516928u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 798, 1069775912u, 750827797u, 1082862669u, 230466783u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 799, 1086668819u, 1365083575u, 3204848310u, 1700831722u, 1086668928u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 800, 3218090390u, 344241827u, 1071538935u, 2715566077u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 801, 3247582856u, 4069301823u, 3193208760u, 2949125229u, 3247582856u, 4026531840u, 0, CEIL_TOLERANCE, 0},
+{ 802, 1103231387u, 3585711710u, 1065801594u, 2302229267u, 1103231387u, 3590324224u, 0, CEIL_TOLERANCE, 0},
+{ 803, 3194118956u, 709803845u, 1048741487u, 2296910194u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 804, 3193280779u, 744421179u, 1069302001u, 2659232829u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 805, 1092835968u, 1799949903u, 3192522886u, 4212149209u, 1092835970u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 806, 3206108502u, 145234164u, 3250614064u, 912384201u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 807, 3240510664u, 2784620507u, 1102812948u, 3531481022u, 3240510664u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 808, 3251159663u, 383952592u, 3205659905u, 3633194728u, 3251159663u, 377487360u, 0, CEIL_TOLERANCE, 0},
+{ 809, 3203476252u, 3792395543u, 1070072378u, 3864816376u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 810, 3205316273u, 2115553675u, 1066288499u, 3538377867u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 811, 3252075185u, 1230026762u, 1090719723u, 440819880u, 3252075185u, 1228931072u, 0, CEIL_TOLERANCE, 0},
+{ 812, 3194595076u, 2991290482u, 1096886719u, 1097971167u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 813, 1090048600u, 1098035020u, 3230900504u, 1479059095u, 1090048608u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 814, 3251056964u, 1719428427u, 3188631907u, 3707377409u, 3251056964u, 1711276032u, 0, CEIL_TOLERANCE, 0},
+{ 815, 1053236165u, 3748932896u, 1084908557u, 1325384361u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 816, 1084704076u, 3979168763u, 1057455255u, 2454615952u, 1084704256u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 817, 1053106984u, 1449164578u, 1056960316u, 1654931641u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 818, 1071439010u, 2120487381u, 3226298974u, 2364226633u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 819, 1075071428u, 1074268944u, 1065730444u, 280016852u, 1075314688u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 820, 3200308256u, 3315127889u, 3236295594u, 2900924954u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 821, 3196425891u, 2246037502u, 1049691002u, 1496066550u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 822, 3193006859u, 4191285446u, 3217936236u, 2382392789u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 823, 1092833308u, 640099844u, 1042152237u, 2064279383u, 1092833310u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 824, 1079913438u, 3468560824u, 1093251038u, 310958750u, 1079918592u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 825, 1096788400u, 1413568905u, 1100941106u, 1627289946u, 1096788400u, 2147483648u, 0, CEIL_TOLERANCE, 0},
+{ 826, 3191549550u, 3797143370u, 3195497539u, 3843275034u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 827, 3252077393u, 2806642640u, 3201943068u, 2515980718u, 3252077393u, 2805989376u, 0, CEIL_TOLERANCE, 0},
+{ 828, 1086877316u, 632580632u, 1078673506u, 3259601317u, 1086877440u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 829, 3200980575u, 3309678799u, 1049337078u, 3056787074u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 830, 3221495289u, 2341164249u, 1080834967u, 2810890005u, 3221225472u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 831, 1067019674u, 932124675u, 1093915797u, 662682630u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 832, 3249230091u, 1367996113u, 3251723684u, 2974064663u, 3249230091u, 1342177280u, 0, CEIL_TOLERANCE, 0},
+{ 833, 1080230731u, 323437999u, 1090499064u, 901457511u, 1080238080u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 834, 3235778876u, 4184941840u, 3196770014u, 2458988443u, 3235778816u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 835, 1087618284u, 2023065054u, 3211994098u, 2734612965u, 1087618304u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 836, 1064074694u, 3679267365u, 3237728785u, 1699558211u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 837, 1088079010u, 1826799031u, 1078709629u, 3986905229u, 1088079040u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 838, 1052843785u, 351061688u, 3194386466u, 4105857588u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 839, 1054128006u, 1365244058u, 1064457319u, 1452191426u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 840, 1064122385u, 2463030625u, 3215975031u, 3773488326u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 841, 3251276671u, 752664055u, 1065110394u, 1835931663u, 3251276671u, 746586112u, 0, CEIL_TOLERANCE, 0},
+{ 842, 1088045088u, 3496172149u, 1089617208u, 109068701u, 1088045120u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 843, 3198135087u, 1636966254u, 1086098766u, 2016598298u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 844, 1050931318u, 3551516956u, 1097969102u, 1317953425u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 845, 3229832217u, 2977627788u, 1045339018u, 516058480u, 3229831168u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 846, 3237408578u, 3901731263u, 3189566462u, 32272932u, 3237408576u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 847, 1077281796u, 1956025297u, 3246628529u, 3840733905u, 1077346304u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 848, 1099818036u, 561057891u, 3198494340u, 4271027193u, 1099818036u, 671088640u, 0, CEIL_TOLERANCE, 0},
+{ 849, 3250929921u, 692989850u, 3242630588u, 2492225971u, 3250929921u, 687865856u, 0, CEIL_TOLERANCE, 0},
+{ 850, 3205479397u, 3439913962u, 1067477011u, 2973333638u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 851, 3213993989u, 877613377u, 1044917899u, 809672798u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 852, 3222171454u, 905426932u, 1046417457u, 1086320855u, 3221749760u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 853, 3246346629u, 2645567288u, 1051258339u, 557182478u, 3246346629u, 2415919104u, 0, CEIL_TOLERANCE, 0},
+{ 854, 3204057950u, 186287752u, 1061342054u, 4054003419u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 855, 1097266673u, 3506889716u, 3243866036u, 519056371u, 1097266673u, 3758096384u, 0, CEIL_TOLERANCE, 0},
+{ 856, 1042654053u, 2171898436u, 3246911982u, 1091500784u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 857, 3243647673u, 368493885u, 3222871893u, 1419055230u, 3243647673u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 858, 1091950572u, 2010971245u, 3188804530u, 1518695799u, 1091950576u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 859, 3205426509u, 1239207795u, 1040192984u, 2199481342u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 860, 3210978637u, 4264613432u, 3203460972u, 3558930895u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 861, 1050299283u, 3772748958u, 3227667376u, 309688336u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 862, 3230743041u, 1077949160u, 1075769893u, 2405271377u, 3230742528u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 863, 1091835152u, 3751608506u, 3232278094u, 930375071u, 1091835156u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 864, 3198617153u, 1518334131u, 3205247482u, 791756713u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 865, 1047317453u, 2825203170u, 3245054001u, 1822981827u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 866, 1100016363u, 514474738u, 1089072073u, 3300845441u, 1100016363u, 536870912u, 0, CEIL_TOLERANCE, 0},
+{ 867, 3216391250u, 247369460u, 3197320093u, 687450958u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 868, 1104161422u, 2722237629u, 1058272368u, 90602316u, 1104161422u, 2726297600u, 0, CEIL_TOLERANCE, 0},
+{ 869, 3208098435u, 1845900544u, 3231520830u, 3389751458u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 870, 3247535245u, 737689911u, 3195377751u, 3462616966u, 3247535245u, 671088640u, 0, CEIL_TOLERANCE, 0},
+{ 871, 3223538384u, 3620285831u, 1055501023u, 2708056059u, 3223453696u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 872, 3219464996u, 4073430285u, 1056206159u, 172017902u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 873, 3212869638u, 2799176222u, 1052706894u, 4083892667u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 874, 3202279557u, 1562351330u, 1069705601u, 1247765260u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 875, 3232717299u, 51853475u, 3189080201u, 2783553144u, 3232716800u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 876, 3219454353u, 3851781549u, 3241598113u, 514064046u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 877, 1100045965u, 934745487u, 3248182437u, 2798581921u, 1100045965u, 939524096u, 0, CEIL_TOLERANCE, 0},
+{ 878, 3213082493u, 2948648757u, 3232177250u, 4278702895u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 879, 1072485724u, 4259101461u, 1061606772u, 84229920u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 880, 3198075559u, 3891230598u, 1095924595u, 3049217547u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 881, 1077353053u, 3806018919u, 3243191216u, 280177341u, 1077411840u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 882, 1060624530u, 3900344258u, 1063647809u, 4206745890u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 883, 3227707336u, 2126253040u, 3207248026u, 808507485u, 3227705344u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 884, 1086090317u, 3465685634u, 3230391053u, 3754958214u, 1086090496u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 885, 1102861084u, 461094531u, 1101110393u, 1316091396u, 1102861084u, 469762048u, 0, CEIL_TOLERANCE, 0},
+{ 886, 1064980314u, 4197635149u, 1091873113u, 1240127141u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 1074790400u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 888, 3213429165u, 3744663425u, 3212482771u, 953662066u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 889, 1085171305u, 3564196690u, 3228101916u, 904305212u, 1085171712u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 890, 1048333111u, 3566257266u, 3235138829u, 2734275140u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 891, 3243948477u, 606044282u, 3241318094u, 2446416887u, 3243948477u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 892, 1041627284u, 2336116589u, 3197594053u, 2296925138u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 893, 1058567659u, 907670625u, 3240769036u, 1827119006u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 894, 1044467183u, 2818710946u, 3246059905u, 553394170u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 895, 3189504094u, 4099522736u, 3232742168u, 3718083858u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 896, 1092371276u, 1059279404u, 1080245336u, 175941677u, 1092371280u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 897, 1105189691u, 1650862428u, 1061816101u, 1723201723u, 1105189691u, 1652555776u, 0, CEIL_TOLERANCE, 0},
+{ 898, 3239012814u, 2462163405u, 3218946201u, 3876535372u, 3239012808u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 899, 1084392886u, 495844137u, 1073721460u, 772777946u, 1084392960u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 900, 1052415330u, 458757721u, 3245680321u, 3609892707u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 901, 3193282956u, 2533012202u, 1079980803u, 3592268374u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 902, 3203364780u, 4108274117u, 1063045844u, 571992389u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 903, 1090567271u, 3541110973u, 1096296754u, 3118427427u, 1090567272u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 904, 3193980043u, 1213941007u, 1105433735u, 2172963370u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 905, 1096853359u, 272190288u, 1095452370u, 4026581530u, 1096853359u, 536870912u, 0, CEIL_TOLERANCE, 0},
+{ 906, 1095583909u, 2843638672u, 1100510986u, 3190536898u, 1095583910u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 907, 1083757094u, 2014317727u, 3247389683u, 2428462015u, 1083757568u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 908, 1093976717u, 688442200u, 1047852515u, 3035186380u, 1093976718u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 909, 1076664212u, 1010095511u, 3221288076u, 405287991u, 1076756480u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 910, 3252294615u, 2983070435u, 1089546472u, 2907918480u, 3252294615u, 2982150144u, 0, CEIL_TOLERANCE, 0},
+{ 911, 1082988121u, 81928569u, 1056007286u, 2740556321u, 1082988544u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 912, 1041110867u, 2076689028u, 1081558619u, 3039159031u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 913, 1047307438u, 1376882094u, 3211003208u, 1296286481u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 914, 1080114314u, 744133164u, 3200943494u, 955832216u, 1080115200u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 915, 3226290326u, 176522478u, 1069999908u, 2891249491u, 3226271744u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 916, 1043564602u, 3685851715u, 3187829932u, 2363997529u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 917, 1040244055u, 3974431579u, 1052505165u, 2589067816u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 918, 3191496789u, 3819109588u, 1048561488u, 969143351u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 919, 1072639397u, 4246896124u, 1104584799u, 1940097860u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 920, 1048038468u, 2228686199u, 3220231833u, 777624847u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 921, 3231467306u, 4189906558u, 3203004203u, 854242364u, 3231466496u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 922, 1103910407u, 4089051094u, 3227282692u, 2693170723u, 1103910407u, 4093640704u, 0, CEIL_TOLERANCE, 0},
+{ 923, 1045883607u, 1278581412u, 3239296746u, 1774588717u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 924, 3222372686u, 1794845306u, 1104879344u, 4135865182u, 3222274048u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 925, 1106449055u, 754938390u, 1061291430u, 2010786993u, 1106449055u, 754974720u, 0, CEIL_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 1073741824u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 927, 3231449194u, 567588900u, 3195452230u, 1421366017u, 3231449088u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 928, 3225089755u, 2708717091u, 1071975971u, 1364590470u, 3225026560u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 929, 3252137283u, 3461956134u, 3207820115u, 1605709634u, 3252137283u, 3460300800u, 0, CEIL_TOLERANCE, 0},
+{ 930, 1065302996u, 1497124553u, 1051715442u, 916736957u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 931, 1058468363u, 834914365u, 1064667143u, 2839166298u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 932, 1057279949u, 2139295776u, 1062816721u, 914592523u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 933, 3189636931u, 851569132u, 1058503154u, 1399378677u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 934, 3233537697u, 3897202342u, 3245382590u, 246600375u, 3233537536u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 935, 3225460308u, 3620429520u, 1055627557u, 229305u, 3225452544u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 936, 1083958833u, 3641997865u, 3206673888u, 93720614u, 1083959296u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 937, 3227808435u, 32766320u, 1062084905u, 3668443038u, 3227803648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 938, 3223298996u, 2039713492u, 3248699388u, 1346210821u, 3223060480u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 939, 1093050016u, 1335820726u, 3191756860u, 1808427032u, 1093050018u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 940, 1061442763u, 650692001u, 1103515670u, 2253348763u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 941, 3191395187u, 2372623300u, 3210185343u, 3200572848u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 942, 1100796069u, 762317532u, 3194595095u, 3192607437u, 1100796069u, 805306368u, 0, CEIL_TOLERANCE, 0},
+{ 943, 1062262701u, 217775356u, 3232827087u, 2969367386u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 944, 1057172551u, 3621353969u, 1077994795u, 3873976266u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 945, 1091301987u, 268372152u, 3221764390u, 3216978962u, 1091301992u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 946, 3246437611u, 142942404u, 1075322987u, 1746449109u, 3246437611u, 134217728u, 0, CEIL_TOLERANCE, 0},
+{ 947, 1104006296u, 496534875u, 3254522293u, 2532372502u, 1104006296u, 503316480u, 0, CEIL_TOLERANCE, 0},
+{ 948, 3250225541u, 2999955409u, 3222793392u, 1868977643u, 3250225541u, 2986344448u, 0, CEIL_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 1074790400u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 950, 1068218799u, 73646871u, 3231442171u, 3711510104u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 951, 1090483524u, 218135177u, 3198908856u, 3082199105u, 1090483536u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 952, 1068068480u, 1061628117u, 3248859043u, 86776158u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 953, 3208484674u, 938869114u, 1087911145u, 2416710759u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 954, 1095576832u, 2970853959u, 3239543429u, 1887505029u, 1095576833u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 955, 3237728787u, 1337895935u, 1076463812u, 1172733328u, 3237728784u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 956, 1049139928u, 1469010822u, 3229583535u, 551399515u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 1074266112u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 958, 3242138780u, 2976596113u, 3192137295u, 3033242648u, 3242138780u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 959, 1098698481u, 876810930u, 3197470945u, 2571587447u, 1098698481u, 1073741824u, 0, CEIL_TOLERANCE, 0},
+{ 960, 3241770810u, 4007797282u, 3225853845u, 4069319648u, 3241770810u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 961, 1047279982u, 3840538373u, 1043189552u, 3668774580u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 962, 3217611704u, 200857661u, 3229758439u, 3359367736u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 963, 3248797869u, 111868139u, 3227902082u, 2366064003u, 3248797869u, 100663296u, 0, CEIL_TOLERANCE, 0},
+{ 964, 1044195166u, 3510904416u, 3222131653u, 3822770497u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 965, 3242675715u, 789151814u, 1099269239u, 2958956055u, 3242675715u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 966, 1084679320u, 722163228u, 1105524559u, 1534462169u, 1084679680u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 967, 1046586062u, 2207037106u, 3208952465u, 1231254630u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 968, 3197884060u, 3838689849u, 3198769679u, 1302617170u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 969, 1085938906u, 2527556476u, 3240373426u, 124352692u, 1085938944u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 970, 3199540805u, 3502371499u, 1043411944u, 4190072016u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 971, 1064676142u, 1798470077u, 3200116917u, 3421833729u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 972, 3193514956u, 3653237931u, 3204255012u, 3683870669u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 973, 1053588582u, 376530104u, 1073853547u, 565755892u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 974, 3242503851u, 558292492u, 1051772749u, 4267873474u, 3242503851u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 975, 3224772709u, 509637100u, 3212030069u, 215050379u, 3224764416u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 976, 1092057101u, 3571665665u, 3188628584u, 757824767u, 1092057104u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 977, 3214799337u, 998858159u, 1063077962u, 436029885u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 978, 3205946965u, 996300405u, 3193842624u, 80548098u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 979, 3228848840u, 3876129407u, 3215332180u, 2226970413u, 3228848128u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 980, 3237608953u, 200013509u, 3224552716u, 414878724u, 3237608944u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 981, 3230617093u, 309319541u, 1048979765u, 1261662434u, 3230615552u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 982, 1089252639u, 4062255924u, 3224274128u, 4289485681u, 1089252640u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 983, 3236136084u, 1611969213u, 1053890378u, 3774617276u, 3236136064u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 984, 1080412763u, 1752164782u, 3239587974u, 612223386u, 1080418304u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 985, 1041545782u, 2024044989u, 1074932678u, 3259111307u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 986, 1053207518u, 2564965629u, 1093571065u, 169360454u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 987, 1089599090u, 1860101737u, 3191222372u, 1676437468u, 1089599104u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 988, 1059802968u, 588387057u, 3192103292u, 2495288012u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 989, 3193155705u, 659070058u, 1073095700u, 1393632068u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 990, 3217683263u, 4276187829u, 3217553330u, 1868253275u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 991, 3223220272u, 2085481575u, 3215994784u, 800910002u, 3223060480u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 992, 1056934836u, 1950570756u, 3200582211u, 941022151u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 993, 1057530368u, 2075610870u, 3250142022u, 3605152103u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 994, 3200839250u, 3792931748u, 3204857863u, 804393211u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 995, 3253646370u, 3430071177u, 3226288311u, 3652522729u, 3253646370u, 3428843520u, 0, CEIL_TOLERANCE, 0},
+{ 996, 3201314702u, 236884699u, 3227874605u, 2193269825u, 2147483648u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 997, 1064936593u, 2744231849u, 1046186036u, 771053722u, 1072693248u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 998, 1083996036u, 3000189819u, 1096500901u, 2057239777u, 1083996160u, 0u, 0, CEIL_TOLERANCE, 0},
+{ 999, 1093835581u, 205759408u, 3244643377u, 2702292618u, 1093835582u, 0u, 0, CEIL_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_CEIL_H multiple inclusion protection
+
+// EOF ceil.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/cos.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/cos.c
new file mode 100644
index 0000000000..9cb152523d
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/cos.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// cos.c
+//
+// Test of cos() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/cos.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(cos_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &cos, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_NONE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &cos_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("cos() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("cos() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library cos() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "cos() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF cos.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/cos.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/cos.h
new file mode 100644
index 0000000000..2df9fe7da7
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/cos.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_COS_H
+#define CYGONCE_LIBM_COS_H
+//===========================================================================
+//
+// cos.h
+//
+// Test vectors for testing of cos() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/cos.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define COS_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t cos_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1077999148u, 2506787616u, 1090024059u, 3619148316u, 3219768992u, 2016484542u, 0, COS_TOLERANCE, 0},
+{ 2, 3218153654u, 3176730980u, 1051524793u, 2993920299u, 1072618594u, 3065796144u, 0, COS_TOLERANCE, 0},
+{ 3, 3239659803u, 2725707538u, 3232101343u, 2346810316u, 3220123085u, 3078481391u, 0, COS_TOLERANCE, 0},
+{ 4, 1092554362u, 2088062470u, 3201242716u, 420891118u, 1072356932u, 4042953682u, 0, COS_TOLERANCE, 0},
+{ 5, 3221200677u, 2636405208u, 1100049309u, 471635570u, 3218685952u, 3960691400u, 0, COS_TOLERANCE, 0},
+{ 6, 1089363191u, 1746012320u, 1054478713u, 3333988501u, 1071809942u, 2003021887u, 0, COS_TOLERANCE, 0},
+{ 7, 1047953160u, 183014794u, 3202039382u, 2016785810u, 1072693247u, 4294967264u, 0, COS_TOLERANCE, 0},
+{ 8, 3213486034u, 2688957927u, 1046089230u, 2709029994u, 1072693080u, 978212037u, 0, COS_TOLERANCE, 0},
+{ 9, 1058795730u, 624574473u, 1045840574u, 3473266330u, 1072693247u, 4243804449u, 0, COS_TOLERANCE, 0},
+{ 10, 3204919842u, 1605286142u, 1068931671u, 4233776869u, 1072693247u, 4286151936u, 0, COS_TOLERANCE, 0},
+{ 11, 1060343410u, 1857607719u, 3222889559u, 3417070006u, 1072693247u, 3893935114u, 0, COS_TOLERANCE, 0},
+{ 12, 1103599987u, 3981151660u, 1088899021u, 1332651746u, 1071013305u, 501046957u, 0, COS_TOLERANCE, 0},
+{ 13, 1085298022u, 3824988054u, 1066856791u, 2070129652u, 3220173381u, 184726421u, 0, COS_TOLERANCE, 0},
+{ 14, 3207559790u, 1372884064u, 1080833116u, 3229926662u, 1072693247u, 4035214061u, 0, COS_TOLERANCE, 0},
+{ 15, 1093826501u, 3217805330u, 3191644264u, 2014578707u, 1070032383u, 2277446950u, 0, COS_TOLERANCE, 0},
+{ 16, 1102287487u, 265058758u, 3239903247u, 1630600647u, 3220176170u, 1767461132u, 0, COS_TOLERANCE, 0},
+{ 17, 1071124229u, 1946677669u, 3198462609u, 926009897u, 1072546806u, 3686417449u, 0, COS_TOLERANCE, 0},
+{ 18, 1072130299u, 2271884183u, 3203741999u, 2118617783u, 1072156649u, 125344954u, 0, COS_TOLERANCE, 0},
+{ 19, 3194849109u, 213658772u, 3249401130u, 314151656u, 1072693247u, 4294967282u, 0, COS_TOLERANCE, 0},
+{ 20, 3254112288u, 1564829925u, 3197817016u, 497230814u, 3219660486u, 631679371u, 0, COS_TOLERANCE, 0},
+{ 21, 3216262634u, 2075329122u, 3231746400u, 169900577u, 1072686675u, 1944236140u, 0, COS_TOLERANCE, 0},
+{ 22, 1049848642u, 541549344u, 1096608669u, 3119070100u, 1072693247u, 4294966919u, 0, COS_TOLERANCE, 0},
+{ 23, 1085427055u, 567496114u, 1045286891u, 1969998540u, 3218068798u, 3978347379u, 0, COS_TOLERANCE, 0},
+{ 24, 1060548195u, 1299369769u, 1049342524u, 4167404066u, 1072693247u, 3755541054u, 0, COS_TOLERANCE, 0},
+{ 25, 3208865645u, 3348930841u, 1078472138u, 358457347u, 1072693247u, 2715744996u, 0, COS_TOLERANCE, 0},
+{ 26, 1071069297u, 2192461366u, 1099527247u, 3184735642u, 1072556722u, 3142942532u, 0, COS_TOLERANCE, 0},
+{ 27, 1052861772u, 331696577u, 3189610016u, 793242270u, 1072693247u, 4294947929u, 0, COS_TOLERANCE, 0},
+{ 28, 3252528934u, 2322696981u, 1083791358u, 3020766674u, 3219826880u, 2920996550u, 0, COS_TOLERANCE, 0},
+{ 29, 1044902177u, 252085215u, 3214426435u, 4139068910u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
+{ 30, 3222505725u, 105589263u, 1056316170u, 261630827u, 1069929628u, 2708927296u, 0, COS_TOLERANCE, 0},
+{ 31, 1107213408u, 428765703u, 3251828686u, 2009972239u, 1072002281u, 2267619153u, 0, COS_TOLERANCE, 0},
+{ 32, 1098568019u, 3517376586u, 3240257920u, 3304487302u, 3219267113u, 2318350078u, 0, COS_TOLERANCE, 0},
+{ 33, 3233537912u, 237004814u, 3237899261u, 3364008659u, 3219363466u, 1974819849u, 0, COS_TOLERANCE, 0},
+{ 34, 3195247552u, 472004928u, 3226869477u, 1186387580u, 1072693247u, 4294967272u, 0, COS_TOLERANCE, 0},
+{ 35, 1054226850u, 4085763910u, 1106394906u, 2684738273u, 1072693247u, 4294840843u, 0, COS_TOLERANCE, 0},
+{ 36, 1057053639u, 2055490142u, 3231581370u, 3879040079u, 1072693247u, 4290030503u, 0, COS_TOLERANCE, 0},
+{ 37, 3188976647u, 3725731239u, 1061652681u, 591292963u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 38, 3225014981u, 1147041027u, 3215417793u, 624695933u, 1072212739u, 3548552865u, 0, COS_TOLERANCE, 0},
+{ 39, 3206052774u, 705725219u, 3238067573u, 1116238321u, 1072693247u, 4255683871u, 0, COS_TOLERANCE, 0},
+{ 40, 3207367088u, 7287411u, 1045917232u, 116067742u, 1072693247u, 4081475017u, 0, COS_TOLERANCE, 0},
+{ 41, 3240055222u, 3604989074u, 1066381836u, 545298780u, 1069174826u, 481201061u, 0, COS_TOLERANCE, 0},
+{ 42, 3219080936u, 1681476121u, 1060345752u, 3553822398u, 1072447760u, 3428441333u, 0, COS_TOLERANCE, 0},
+{ 43, 1102831658u, 3410480388u, 1052460275u, 1660607230u, 3220176232u, 3352970825u, 0, COS_TOLERANCE, 0},
+{ 44, 1089216869u, 1494984673u, 3196647153u, 287894723u, 1072276901u, 3815649632u, 0, COS_TOLERANCE, 0},
+{ 45, 1054885127u, 644548665u, 1081948134u, 2442134629u, 1072693247u, 4294696242u, 0, COS_TOLERANCE, 0},
+{ 46, 1087554095u, 2312530895u, 3221584595u, 3379665576u, 1071648109u, 1545486473u, 0, COS_TOLERANCE, 0},
+{ 47, 1096085375u, 3018463866u, 1086226574u, 404012923u, 3220172495u, 3110868414u, 0, COS_TOLERANCE, 0},
+{ 48, 1064733299u, 1710279345u, 3251401196u, 3528946000u, 1072693216u, 1050271320u, 0, COS_TOLERANCE, 0},
+{ 49, 1061536351u, 2164450219u, 1083520023u, 3312018966u, 1072693247u, 2309107782u, 0, COS_TOLERANCE, 0},
+{ 50, 1057248676u, 2648986431u, 1050330591u, 1474376550u, 1072693247u, 4288192616u, 0, COS_TOLERANCE, 0},
+{ 51, 3194422028u, 1839068700u, 1077406406u, 3013052171u, 1072693247u, 4294967288u, 0, COS_TOLERANCE, 0},
+{ 52, 1046493630u, 772102380u, 3220729740u, 4219039958u, 1072693247u, 4294967292u, 0, COS_TOLERANCE, 0},
+{ 53, 3229472221u, 3058618779u, 1046304788u, 3338676024u, 1072667959u, 113041016u, 0, COS_TOLERANCE, 0},
+{ 54, 1051172137u, 506286854u, 1094907481u, 2217000199u, 1072693247u, 4294965066u, 0, COS_TOLERANCE, 0},
+{ 55, 1082428310u, 1147428263u, 1065432625u, 3034786717u, 3219455129u, 3620968391u, 0, COS_TOLERANCE, 0},
+{ 56, 1082016752u, 2844125311u, 1082985198u, 2561492677u, 1072492615u, 1705681540u, 0, COS_TOLERANCE, 0},
+{ 57, 3211536916u, 704542600u, 3222902057u, 2762779203u, 1072693235u, 2601745815u, 0, COS_TOLERANCE, 0},
+{ 58, 3199680614u, 184131949u, 3249723525u, 1667366082u, 1072693247u, 4294958646u, 0, COS_TOLERANCE, 0},
+{ 59, 3223609598u, 3904224140u, 1067056698u, 2942159914u, 3219593076u, 1010749237u, 0, COS_TOLERANCE, 0},
+{ 60, 1100636863u, 426114282u, 3209056785u, 1083606355u, 3219470205u, 1406323978u, 0, COS_TOLERANCE, 0},
+{ 61, 1106165945u, 3774123863u, 1106787580u, 2722107965u, 1072606016u, 4140994146u, 0, COS_TOLERANCE, 0},
+{ 62, 1088005092u, 1377734762u, 1104232051u, 2377063483u, 3218242952u, 3735681066u, 0, COS_TOLERANCE, 0},
+{ 63, 1069380559u, 1029739074u, 1105467109u, 3062201018u, 1072679384u, 936725322u, 0, COS_TOLERANCE, 0},
+{ 64, 3234741597u, 773857656u, 3214251949u, 335833884u, 1071799931u, 384567806u, 0, COS_TOLERANCE, 0},
+{ 65, 3203224610u, 1473865960u, 1103073830u, 4000427507u, 1072693247u, 4294086482u, 0, COS_TOLERANCE, 0},
+{ 66, 1103185231u, 4242092620u, 1067009473u, 14539161u, 3219397655u, 2052311207u, 0, COS_TOLERANCE, 0},
+{ 67, 3192516074u, 1732245037u, 1101371955u, 1533536108u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
+{ 68, 3249153995u, 1833841275u, 1099430098u, 4144145552u, 3218112666u, 1530833864u, 0, COS_TOLERANCE, 0},
+{ 69, 3244270463u, 935007012u, 3188865420u, 604442938u, 1069791519u, 4238814723u, 0, COS_TOLERANCE, 0},
+{ 70, 3206903253u, 2211464602u, 1046255144u, 1635910526u, 1072693247u, 4174238446u, 0, COS_TOLERANCE, 0},
+{ 71, 1077871417u, 2549219008u, 3231633258u, 3733639385u, 1072524971u, 2288078414u, 0, COS_TOLERANCE, 0},
+{ 72, 1082095089u, 1819374372u, 3202219056u, 2617077637u, 1072177416u, 1438672983u, 0, COS_TOLERANCE, 0},
+{ 73, 1094345280u, 546465680u, 1048653554u, 532401530u, 1072449430u, 350777572u, 0, COS_TOLERANCE, 0},
+{ 74, 1044571091u, 2759019783u, 3221570188u, 3554409630u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 75, 3212931282u, 2527221960u, 1099107978u, 2696971136u, 1072693171u, 4105298358u, 0, COS_TOLERANCE, 0},
+{ 76, 1097158000u, 173134582u, 1087299442u, 2877794600u, 3218695462u, 3908126164u, 0, COS_TOLERANCE, 0},
+{ 77, 1086400474u, 547642046u, 3197285510u, 3521286127u, 1072655927u, 2126353027u, 0, COS_TOLERANCE, 0},
+{ 78, 1074860702u, 1231582831u, 1090971734u, 1653446832u, 3218833636u, 2717799458u, 0, COS_TOLERANCE, 0},
+{ 79, 1061342535u, 3762182190u, 3252967851u, 2615360375u, 1072693247u, 2812236346u, 0, COS_TOLERANCE, 0},
+{ 80, 3200834423u, 2588067350u, 3206610957u, 3551059728u, 1072693247u, 4294927751u, 0, COS_TOLERANCE, 0},
+{ 81, 3206978856u, 845263327u, 1073415902u, 1749010288u, 1072693247u, 4160909940u, 0, COS_TOLERANCE, 0},
+{ 82, 3205576370u, 3092685191u, 3190678390u, 2872219490u, 1072693247u, 4275548308u, 0, COS_TOLERANCE, 0},
+{ 83, 3218315055u, 4107255722u, 3205337291u, 3069068345u, 1072595762u, 1566396021u, 0, COS_TOLERANCE, 0},
+{ 84, 3243990857u, 2294867524u, 3216653996u, 2860384670u, 3216839369u, 80524119u, 0, COS_TOLERANCE, 0},
+{ 85, 3193326350u, 2265437201u, 3240198679u, 1234948614u, 1072693247u, 4294967294u, 0, COS_TOLERANCE, 0},
+{ 86, 3216359929u, 1186945904u, 3251167793u, 1896750851u, 1072685678u, 821616092u, 0, COS_TOLERANCE, 0},
+{ 87, 1081575478u, 3686084548u, 1079286273u, 3309277689u, 1072458457u, 954886600u, 0, COS_TOLERANCE, 0},
+{ 88, 3223476240u, 3006860614u, 3231412671u, 2504194724u, 3220110252u, 3100390877u, 0, COS_TOLERANCE, 0},
+{ 89, 3236149260u, 1948717780u, 1048317852u, 3791803982u, 3219564158u, 3741596795u, 0, COS_TOLERANCE, 0},
+{ 90, 1064345015u, 4272034420u, 3192982124u, 1526175922u, 1072693230u, 3195985048u, 0, COS_TOLERANCE, 0},
+{ 91, 3245817826u, 4108948538u, 1104691287u, 640541190u, 1070492631u, 2055939015u, 0, COS_TOLERANCE, 0},
+{ 92, 3207257417u, 3259274853u, 1082507103u, 3677038020u, 1072693247u, 4105778929u, 0, COS_TOLERANCE, 0},
+{ 93, 1083132498u, 3781708548u, 1096584871u, 1207386447u, 3219419842u, 1550029926u, 0, COS_TOLERANCE, 0},
+{ 94, 3188695272u, 3011191657u, 1103798670u, 1096124830u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 95, 1063235023u, 2540404725u, 3240157452u, 4122845725u, 1072693244u, 343002006u, 0, COS_TOLERANCE, 0},
+{ 96, 1083643710u, 311336721u, 3214382367u, 4212533768u, 1070821938u, 789880753u, 0, COS_TOLERANCE, 0},
+{ 97, 1051139427u, 1769686293u, 3240200923u, 3538602249u, 1072693247u, 4294965159u, 0, COS_TOLERANCE, 0},
+{ 98, 1078227549u, 508056696u, 1103793878u, 776520138u, 3220173977u, 2550253995u, 0, COS_TOLERANCE, 0},
+{ 99, 1102910577u, 4064962760u, 1077424413u, 819766631u, 1072637279u, 908201379u, 0, COS_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 3220077595u, 2239968209u, 0, COS_TOLERANCE, 0},
+{ 101, 1082295059u, 2514398118u, 1076579751u, 870169764u, 3217602657u, 1772072422u, 0, COS_TOLERANCE, 0},
+{ 102, 3246851392u, 1190259653u, 1069112254u, 3417249840u, 1071168295u, 2722648006u, 0, COS_TOLERANCE, 0},
+{ 103, 3193663083u, 3467757357u, 3215075200u, 2168175352u, 1072693247u, 4294967293u, 0, COS_TOLERANCE, 0},
+{ 104, 3239643135u, 1508888184u, 1060430241u, 3524949092u, 3218963721u, 2907233862u, 0, COS_TOLERANCE, 0},
+{ 105, 3197412883u, 166402802u, 3237198975u, 3572369260u, 1072693247u, 4294966870u, 0, COS_TOLERANCE, 0},
+{ 106, 1081866822u, 2441536203u, 3202753937u, 3658194573u, 1067566718u, 4225817352u, 0, COS_TOLERANCE, 0},
+{ 107, 1062392908u, 2479742828u, 1062342831u, 4214154303u, 1072693246u, 2641702618u, 0, COS_TOLERANCE, 0},
+{ 108, 1082396794u, 426896765u, 1066474375u, 2201754442u, 1071165698u, 123828766u, 0, COS_TOLERANCE, 0},
+{ 109, 3195629021u, 2055773734u, 3239267288u, 291396537u, 1072693247u, 4294967256u, 0, COS_TOLERANCE, 0},
+{ 110, 3236968033u, 874125203u, 3210508124u, 4091098764u, 1071882731u, 2672345646u, 0, COS_TOLERANCE, 0},
+{ 111, 1065716026u, 120488169u, 3241241441u, 1985269424u, 1072693132u, 218165317u, 0, COS_TOLERANCE, 0},
+{ 112, 3206539410u, 2243036871u, 3243941101u, 740033495u, 1072693247u, 4228241722u, 0, COS_TOLERANCE, 0},
+{ 113, 3209424906u, 1176656356u, 1074261978u, 3588756231u, 1072693247u, 1021260099u, 0, COS_TOLERANCE, 0},
+{ 114, 3252816791u, 3037249392u, 1061635587u, 1173102190u, 3219266232u, 3815073247u, 0, COS_TOLERANCE, 0},
+{ 115, 3237209581u, 2882725208u, 1071440059u, 69225090u, 3219903600u, 3901518120u, 0, COS_TOLERANCE, 0},
+{ 116, 3212663474u, 272319256u, 1072073912u, 2493997123u, 1072693194u, 625444171u, 0, COS_TOLERANCE, 0},
+{ 117, 1057720186u, 188610379u, 3232757923u, 2209647371u, 1072693247u, 4282550564u, 0, COS_TOLERANCE, 0},
+{ 118, 3236758517u, 1990439193u, 1078073146u, 622849962u, 3219972032u, 2985029200u, 0, COS_TOLERANCE, 0},
+{ 119, 1057135741u, 756052458u, 1081649113u, 2247475162u, 1072693247u, 4289292207u, 0, COS_TOLERANCE, 0},
+{ 120, 1061623064u, 3878055211u, 3222407050u, 2979438623u, 1072693247u, 2060251828u, 0, COS_TOLERANCE, 0},
+{ 121, 3195290997u, 2676398686u, 1105124431u, 3631096636u, 1072693247u, 4294967270u, 0, COS_TOLERANCE, 0},
+{ 122, 1065079390u, 1697791764u, 3198136112u, 2299842819u, 1072693199u, 2671749887u, 0, COS_TOLERANCE, 0},
+{ 123, 1078084768u, 1931502677u, 3215264397u, 3016456382u, 1071211061u, 1694081574u, 0, COS_TOLERANCE, 0},
+{ 124, 1072253426u, 343404215u, 1061072607u, 4266232536u, 1072071754u, 2362655966u, 0, COS_TOLERANCE, 0},
+{ 125, 3241230836u, 4140316002u, 1082896196u, 868256971u, 1067970065u, 236323897u, 0, COS_TOLERANCE, 0},
+{ 126, 1075422810u, 1864139509u, 3187675097u, 3084482407u, 1072675750u, 738312426u, 0, COS_TOLERANCE, 0},
+{ 127, 3220191323u, 2427162817u, 3234748208u, 2715105792u, 1071704804u, 3513111898u, 0, COS_TOLERANCE, 0},
+{ 128, 1064600512u, 3943389284u, 1046724025u, 3626825684u, 1072693221u, 2992922303u, 0, COS_TOLERANCE, 0},
+{ 129, 1045423002u, 967350972u, 1093012318u, 448002663u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
+{ 130, 3251845859u, 105058217u, 1069733884u, 171786224u, 1070874665u, 4056918988u, 0, COS_TOLERANCE, 0},
+{ 131, 3189614508u, 2863482262u, 3204997271u, 877784425u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 132, 3202629313u, 2801782962u, 3213604117u, 762347195u, 1072693247u, 4294547593u, 0, COS_TOLERANCE, 0},
+{ 133, 3233486727u, 2317950339u, 3246333414u, 2135700283u, 1071423350u, 1925583622u, 0, COS_TOLERANCE, 0},
+{ 134, 1056516397u, 4171919805u, 1082858682u, 2180920863u, 1072693247u, 4292374246u, 0, COS_TOLERANCE, 0},
+{ 135, 3220149084u, 1918836931u, 1083603224u, 3137821660u, 1071752494u, 1517813325u, 0, COS_TOLERANCE, 0},
+{ 136, 1103902874u, 3456203663u, 3235600523u, 2335688936u, 1072655531u, 1757361807u, 0, COS_TOLERANCE, 0},
+{ 137, 1042279322u, 4170235262u, 1051824459u, 521583737u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 138, 1081348303u, 1296623194u, 3250673860u, 2442872540u, 1072317229u, 4079105971u, 0, COS_TOLERANCE, 0},
+{ 139, 1061684277u, 289979405u, 1049514449u, 3865737145u, 1072693247u, 1875738416u, 0, COS_TOLERANCE, 0},
+{ 140, 1075298944u, 3699090239u, 1054539840u, 3259249360u, 1072570919u, 238752392u, 0, COS_TOLERANCE, 0},
+{ 141, 1096418100u, 1619819023u, 1045993352u, 1022642459u, 3219637414u, 3481518986u, 0, COS_TOLERANCE, 0},
+{ 142, 1081433004u, 19455098u, 3229182089u, 2096003654u, 3219678173u, 2534237273u, 0, COS_TOLERANCE, 0},
+{ 143, 1076297936u, 3803689997u, 1071630912u, 2263729518u, 1071580496u, 1399605139u, 0, COS_TOLERANCE, 0},
+{ 144, 1101357261u, 2816837387u, 1063422305u, 2597606398u, 1066778374u, 860886019u, 0, COS_TOLERANCE, 0},
+{ 145, 1069100169u, 3680967506u, 1040201163u, 179224723u, 1072683116u, 2152105890u, 0, COS_TOLERANCE, 0},
+{ 146, 3188629767u, 978126928u, 1101553990u, 4047893399u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 147, 3222322045u, 4059818629u, 1042678728u, 3640293589u, 3219138641u, 3149630976u, 0, COS_TOLERANCE, 0},
+{ 148, 3248464040u, 3383497159u, 1070002807u, 1527313008u, 1072628731u, 666198183u, 0, COS_TOLERANCE, 0},
+{ 149, 3202707679u, 2599946514u, 1104170406u, 2738675352u, 1072693247u, 4294496550u, 0, COS_TOLERANCE, 0},
+{ 150, 1105232623u, 3616571377u, 1060859316u, 1130603218u, 3219551476u, 3842454686u, 0, COS_TOLERANCE, 0},
+{ 151, 1076028796u, 3859211180u, 1067940450u, 1744531824u, 3220176319u, 3761295717u, 0, COS_TOLERANCE, 0},
+{ 152, 1042831340u, 1958025850u, 3236511256u, 2472176453u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 153, 3233107089u, 182132862u, 3250520938u, 3924356991u, 1070916656u, 1268984698u, 0, COS_TOLERANCE, 0},
+{ 154, 3230501884u, 35632886u, 3209806504u, 1453402523u, 3220161476u, 3827356380u, 0, COS_TOLERANCE, 0},
+{ 155, 1083522102u, 743225214u, 3202890678u, 142917400u, 3218326965u, 3272616966u, 0, COS_TOLERANCE, 0},
+{ 156, 1080684976u, 1472665012u, 3203138231u, 256588219u, 1072648192u, 1641985006u, 0, COS_TOLERANCE, 0},
+{ 157, 1094982162u, 1062927000u, 1061134072u, 931677439u, 3219670357u, 1996358820u, 0, COS_TOLERANCE, 0},
+{ 158, 1058377732u, 2320910576u, 1055663370u, 288059864u, 1072693247u, 4264496700u, 0, COS_TOLERANCE, 0},
+{ 159, 1078958093u, 1448349062u, 3199478070u, 3454027134u, 1072561713u, 3617278346u, 0, COS_TOLERANCE, 0},
+{ 160, 3237458798u, 4215445172u, 3196654963u, 2231888973u, 3219831914u, 2197099287u, 0, COS_TOLERANCE, 0},
+{ 161, 3246632231u, 40413554u, 3232578253u, 983832844u, 3219393991u, 4244268719u, 0, COS_TOLERANCE, 0},
+{ 162, 3223721534u, 3995725873u, 1050082319u, 777231627u, 1068007582u, 3698554498u, 0, COS_TOLERANCE, 0},
+{ 163, 1040986626u, 672789828u, 3253385962u, 2982787335u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 164, 1068390875u, 2075971825u, 1070166500u, 4034633931u, 1072689564u, 1480933942u, 0, COS_TOLERANCE, 0},
+{ 165, 3210046177u, 1018222907u, 3244621407u, 3090050495u, 1072693246u, 894071046u, 0, COS_TOLERANCE, 0},
+{ 166, 1067680885u, 937732557u, 3200798890u, 2557898276u, 1072691724u, 2004754951u, 0, COS_TOLERANCE, 0},
+{ 167, 1078342316u, 130346162u, 3223590310u, 275568693u, 1072516434u, 2675973119u, 0, COS_TOLERANCE, 0},
+{ 168, 1042898869u, 3807416441u, 1075961161u, 3706820266u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 169, 3216099005u, 1710131411u, 1078123323u, 1900790503u, 1072688194u, 283976070u, 0, COS_TOLERANCE, 0},
+{ 170, 3238819361u, 3420420033u, 3210844787u, 588423066u, 1072644591u, 1123227723u, 0, COS_TOLERANCE, 0},
+{ 171, 1049684114u, 1160162008u, 3246307879u, 4265764460u, 1072693247u, 4294967010u, 0, COS_TOLERANCE, 0},
+{ 172, 1102543434u, 366653268u, 3188814424u, 466059202u, 3219743093u, 986998908u, 0, COS_TOLERANCE, 0},
+{ 173, 3226627739u, 1325936170u, 3221436876u, 680097612u, 3216595555u, 1191345507u, 0, COS_TOLERANCE, 0},
+{ 174, 3240391116u, 1827735934u, 3200554324u, 2875599271u, 1072503248u, 1868121844u, 0, COS_TOLERANCE, 0},
+{ 175, 3191030402u, 3117037091u, 3239246636u, 15838845u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 176, 1051974004u, 749718883u, 3223587064u, 1523766569u, 1072693247u, 4294960992u, 0, COS_TOLERANCE, 0},
+{ 177, 1044833651u, 1966536294u, 3250158026u, 699164258u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
+{ 178, 1098048435u, 3759049394u, 1106085272u, 1183789499u, 1072691618u, 3041709198u, 0, COS_TOLERANCE, 0},
+{ 179, 1081201623u, 1970107747u, 1095245453u, 2308233883u, 3219755792u, 3979452503u, 0, COS_TOLERANCE, 0},
+{ 180, 1084756444u, 1491017852u, 1041444355u, 1723375725u, 3219261752u, 4208808435u, 0, COS_TOLERANCE, 0},
+{ 181, 3216630070u, 1141349287u, 1097465301u, 3403438584u, 1072682540u, 4092757052u, 0, COS_TOLERANCE, 0},
+{ 182, 3230571908u, 1711085243u, 3250239076u, 1377484108u, 1072449179u, 928800032u, 0, COS_TOLERANCE, 0},
+{ 183, 1098385019u, 2880275004u, 1084039594u, 1611394950u, 3219752042u, 46623548u, 0, COS_TOLERANCE, 0},
+{ 184, 3234221435u, 2626629370u, 1063771493u, 1499080813u, 3219651433u, 2521766740u, 0, COS_TOLERANCE, 0},
+{ 185, 1055231263u, 3936262414u, 1103919063u, 3175668759u, 1072693247u, 4294491692u, 0, COS_TOLERANCE, 0},
+{ 186, 3207981719u, 1270950554u, 3194616071u, 3680565379u, 1072693247u, 3791307599u, 0, COS_TOLERANCE, 0},
+{ 187, 3208148223u, 1066985223u, 3221613219u, 4089383168u, 1072693247u, 3667765955u, 0, COS_TOLERANCE, 0},
+{ 188, 3217058839u, 4017329311u, 3208334452u, 1667591498u, 1072676011u, 2167587667u, 0, COS_TOLERANCE, 0},
+{ 189, 1088164157u, 3154656624u, 1061894279u, 3886344038u, 3216679210u, 1818609093u, 0, COS_TOLERANCE, 0},
+{ 190, 1050652945u, 977586119u, 3209762784u, 953839852u, 1072693247u, 4294966292u, 0, COS_TOLERANCE, 0},
+{ 191, 1104965247u, 143071571u, 3206165386u, 913097445u, 3209527911u, 318935467u, 0, COS_TOLERANCE, 0},
+{ 192, 3190565456u, 1371169579u, 1057079837u, 2594818628u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 193, 3251793336u, 2259342224u, 3217432469u, 1824221478u, 1070395363u, 3856479702u, 0, COS_TOLERANCE, 0},
+{ 194, 3246834775u, 1576604497u, 1079368611u, 185078728u, 3219883428u, 4029972147u, 0, COS_TOLERANCE, 0},
+{ 195, 3221679427u, 444800035u, 3243343143u, 1734989302u, 3220097672u, 3511674499u, 0, COS_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1071623349u, 3706410280u, 0, COS_TOLERANCE, 0},
+{ 197, 3234695968u, 1941318385u, 1045807374u, 792193370u, 3219904781u, 703541186u, 0, COS_TOLERANCE, 0},
+{ 198, 3238299666u, 1299392207u, 3212131720u, 3205732280u, 1072599785u, 3720054216u, 0, COS_TOLERANCE, 0},
+{ 199, 1098698804u, 3035093505u, 1052187689u, 3287702190u, 3219456887u, 3838760304u, 0, COS_TOLERANCE, 0},
+{ 200, 3246676260u, 2160225215u, 1102624859u, 836655570u, 1072687744u, 3313356440u, 0, COS_TOLERANCE, 0},
+{ 201, 1096723626u, 3360816360u, 3246176356u, 172860634u, 1069279907u, 1519263517u, 0, COS_TOLERANCE, 0},
+{ 202, 1070995788u, 146831910u, 1051558014u, 2340722078u, 1072569465u, 2825939377u, 0, COS_TOLERANCE, 0},
+{ 203, 3230416351u, 1603798153u, 3207725532u, 1099413093u, 1071649358u, 2402319227u, 0, COS_TOLERANCE, 0},
+{ 204, 3246678378u, 2429340443u, 3190303581u, 3223770005u, 1070273707u, 639884644u, 0, COS_TOLERANCE, 0},
+{ 205, 1075882959u, 955542166u, 3230415151u, 275583938u, 3218973899u, 3343006637u, 0, COS_TOLERANCE, 0},
+{ 206, 1092971882u, 513397822u, 1090646554u, 2089321329u, 1072578768u, 4105682742u, 0, COS_TOLERANCE, 0},
+{ 207, 3193169876u, 2782073372u, 1046063872u, 4023829068u, 1072693247u, 4294967294u, 0, COS_TOLERANCE, 0},
+{ 208, 1098564822u, 3242223094u, 3194111199u, 4264674108u, 3219756194u, 114364412u, 0, COS_TOLERANCE, 0},
+{ 209, 3238510821u, 3506346169u, 1047020885u, 1742757458u, 1068041315u, 3314006670u, 0, COS_TOLERANCE, 0},
+{ 210, 3192664477u, 1265459564u, 3193450280u, 3650514880u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
+{ 211, 1081755890u, 1525260440u, 3235452527u, 2612331392u, 1072515870u, 1309324223u, 0, COS_TOLERANCE, 0},
+{ 212, 3248668920u, 1263613754u, 3219096387u, 635677201u, 1064607335u, 757792299u, 0, COS_TOLERANCE, 0},
+{ 213, 3206272087u, 4140947288u, 3200792376u, 2013265346u, 1072693247u, 4244211024u, 0, COS_TOLERANCE, 0},
+{ 214, 3249974392u, 1912759945u, 3237045253u, 1351396825u, 3219078023u, 281517845u, 0, COS_TOLERANCE, 0},
+{ 215, 3248205162u, 1001433078u, 3206926643u, 2741676659u, 3216471237u, 123092552u, 0, COS_TOLERANCE, 0},
+{ 216, 1080923606u, 1088945233u, 1085095743u, 3986114865u, 3219070825u, 662210141u, 0, COS_TOLERANCE, 0},
+{ 217, 3215734057u, 831239754u, 1099828675u, 3071308141u, 1072690066u, 501010715u, 0, COS_TOLERANCE, 0},
+{ 218, 3225834497u, 3473592372u, 1102759382u, 1309576357u, 1072234656u, 1267394401u, 0, COS_TOLERANCE, 0},
+{ 219, 3251186706u, 2042340367u, 1091945628u, 2062772374u, 3218286427u, 4165170757u, 0, COS_TOLERANCE, 0},
+{ 220, 3194765687u, 1840632537u, 1096533424u, 807510337u, 1072693247u, 4294967284u, 0, COS_TOLERANCE, 0},
+{ 221, 3231451722u, 144814872u, 3212698915u, 2282965697u, 3219652387u, 1204999511u, 0, COS_TOLERANCE, 0},
+{ 222, 1071236430u, 2552499583u, 3229111426u, 1470130815u, 1072525515u, 1870070019u, 0, COS_TOLERANCE, 0},
+{ 223, 3243093065u, 2858583811u, 1089760910u, 6360994u, 1070394969u, 2858431682u, 0, COS_TOLERANCE, 0},
+{ 224, 3198264929u, 1614537194u, 1075198900u, 4088705365u, 1072693247u, 4294966050u, 0, COS_TOLERANCE, 0},
+{ 225, 3250939070u, 3545570051u, 1065221325u, 1629217700u, 3220046486u, 2008922076u, 0, COS_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 1071639174u, 3586456012u, 0, COS_TOLERANCE, 0},
+{ 227, 3196802686u, 2406734491u, 1042055360u, 89226663u, 1072693247u, 4294967109u, 0, COS_TOLERANCE, 0},
+{ 228, 3195751081u, 1618759139u, 3194723421u, 3888234802u, 1072693247u, 4294967249u, 0, COS_TOLERANCE, 0},
+{ 229, 1055357248u, 3590035633u, 3212424262u, 2892456615u, 1072693247u, 4294403060u, 0, COS_TOLERANCE, 0},
+{ 230, 3189943060u, 2431246964u, 3241512456u, 183850734u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 231, 1089501101u, 3088319870u, 3211544311u, 862225364u, 1071959314u, 493775910u, 0, COS_TOLERANCE, 0},
+{ 232, 3235294664u, 3495352775u, 1058576726u, 596957268u, 1072451569u, 551802197u, 0, COS_TOLERANCE, 0},
+{ 233, 1046553348u, 1839214511u, 3205004060u, 1923240983u, 1072693247u, 4294967291u, 0, COS_TOLERANCE, 0},
+{ 234, 1058073864u, 739619702u, 3223356436u, 2689885273u, 1072693247u, 4276192130u, 0, COS_TOLERANCE, 0},
+{ 235, 3200324971u, 2143376228u, 1098306332u, 3760236188u, 1072693247u, 4294948617u, 0, COS_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 3219881910u, 233991145u, 0, COS_TOLERANCE, 0},
+{ 237, 3214165989u, 2493598049u, 3194927008u, 1689107592u, 1072692836u, 3009462380u, 0, COS_TOLERANCE, 0},
+{ 238, 3189989959u, 1578976988u, 1066368383u, 2117279163u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 239, 3222988111u, 3425290087u, 1098487295u, 1263412017u, 1072492825u, 2465022517u, 0, COS_TOLERANCE, 0},
+{ 240, 3208432764u, 3635396812u, 1070999426u, 3965655689u, 1072693247u, 3425310116u, 0, COS_TOLERANCE, 0},
+{ 241, 1060196346u, 2183973116u, 1101098363u, 1118613350u, 1072693247u, 3980688356u, 0, COS_TOLERANCE, 0},
+{ 242, 3221946089u, 199516350u, 1078368488u, 164621458u, 3220120287u, 1310788330u, 0, COS_TOLERANCE, 0},
+{ 243, 3187706018u, 3570940805u, 3230316437u, 3596080877u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 244, 3208209565u, 980880313u, 1079833442u, 884465057u, 1072693247u, 3618839550u, 0, COS_TOLERANCE, 0},
+{ 245, 1099977124u, 2558179220u, 1052873711u, 1233598120u, 1071831726u, 2415570643u, 0, COS_TOLERANCE, 0},
+{ 246, 1047115221u, 1909994277u, 1085015978u, 2991527452u, 1072693247u, 4294967286u, 0, COS_TOLERANCE, 0},
+{ 247, 1060855260u, 1680290941u, 1074309900u, 2943870846u, 1072693247u, 3509653915u, 0, COS_TOLERANCE, 0},
+{ 248, 1059496132u, 1451927357u, 3228615456u, 1502585517u, 1072693247u, 4160742701u, 0, COS_TOLERANCE, 0},
+{ 249, 3236211951u, 751136990u, 3230392165u, 3493275472u, 1071493159u, 3153711522u, 0, COS_TOLERANCE, 0},
+{ 250, 1098365967u, 1209623292u, 3238056647u, 979495322u, 1072345567u, 1983815099u, 0, COS_TOLERANCE, 0},
+{ 251, 3250424296u, 1717672108u, 1048120593u, 531240316u, 3220132606u, 3517673695u, 0, COS_TOLERANCE, 0},
+{ 252, 1054174923u, 3548721654u, 1086112947u, 3391817224u, 1072693247u, 4294849699u, 0, COS_TOLERANCE, 0},
+{ 253, 1077836851u, 2758195125u, 1100880260u, 2028440924u, 1071848560u, 3295006250u, 0, COS_TOLERANCE, 0},
+{ 254, 1084223893u, 2750123373u, 3232200256u, 1086294931u, 3219569628u, 148313502u, 0, COS_TOLERANCE, 0},
+{ 255, 1043958672u, 2986160931u, 1076097908u, 2540046258u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 256, 3235476602u, 451471221u, 1064816262u, 4187644495u, 3220163367u, 3738180901u, 0, COS_TOLERANCE, 0},
+{ 257, 1099460228u, 2439500162u, 1065280276u, 1979490284u, 3220023311u, 1024828250u, 0, COS_TOLERANCE, 0},
+{ 258, 1040415832u, 2283342035u, 1078398157u, 1345997553u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 259, 3213249348u, 179066662u, 1103272172u, 1217337578u, 1072693123u, 3202070629u, 0, COS_TOLERANCE, 0},
+{ 260, 3211562377u, 3779303391u, 3210023352u, 3115946280u, 1072693235u, 1122971280u, 0, COS_TOLERANCE, 0},
+{ 261, 3192989874u, 286247089u, 1085153597u, 713645369u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
+{ 262, 1093670500u, 1468283899u, 1042831668u, 2022736418u, 3219645414u, 292214014u, 0, COS_TOLERANCE, 0},
+{ 263, 1083139105u, 3305564080u, 1065483445u, 482392433u, 1072067451u, 2731650049u, 0, COS_TOLERANCE, 0},
+{ 264, 3201695807u, 2256346551u, 3222430705u, 2071674991u, 1072693247u, 4294843381u, 0, COS_TOLERANCE, 0},
+{ 265, 3204024695u, 2295269094u, 1084451053u, 2773103941u, 1072693247u, 4292296141u, 0, COS_TOLERANCE, 0},
+{ 266, 1078173946u, 1482721827u, 1092243422u, 3125409590u, 1065951213u, 4253023021u, 0, COS_TOLERANCE, 0},
+{ 267, 3221065973u, 1381740563u, 1071545057u, 2918235653u, 3218178568u, 1182312665u, 0, COS_TOLERANCE, 0},
+{ 268, 3238715972u, 1105857967u, 3241990046u, 2703723225u, 1072322220u, 1636652464u, 0, COS_TOLERANCE, 0},
+{ 269, 1043015571u, 174689677u, 1079333374u, 3947057014u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 270, 1090461859u, 2023082423u, 3242081486u, 1169047927u, 1072659623u, 24608123u, 0, COS_TOLERANCE, 0},
+{ 271, 1064525899u, 3742487766u, 1043425732u, 194972788u, 1072693224u, 2299206777u, 0, COS_TOLERANCE, 0},
+{ 272, 3213791827u, 2136071361u, 3211529757u, 993675115u, 1072693014u, 1498352825u, 0, COS_TOLERANCE, 0},
+{ 273, 3213663381u, 210772141u, 3241441539u, 580731413u, 1072693043u, 1489106434u, 0, COS_TOLERANCE, 0},
+{ 274, 1093840413u, 1751560711u, 1074522705u, 180987057u, 1072199249u, 2159086108u, 0, COS_TOLERANCE, 0},
+{ 275, 1066754591u, 2552236599u, 1088658621u, 2112468655u, 1072692790u, 3312828073u, 0, COS_TOLERANCE, 0},
+{ 276, 3189290617u, 1578223762u, 3224596567u, 2456166162u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 277, 1058506965u, 2110924310u, 1086207177u, 3161208323u, 1072693247u, 4258668672u, 0, COS_TOLERANCE, 0},
+{ 278, 3231863394u, 2352173188u, 1079361728u, 4070222179u, 1064984779u, 600856666u, 0, COS_TOLERANCE, 0},
+{ 279, 1101012904u, 2481562701u, 1090937016u, 3809489716u, 1072641608u, 727711588u, 0, COS_TOLERANCE, 0},
+{ 280, 3197002651u, 330905705u, 1086260896u, 90264431u, 1072693247u, 4294967065u, 0, COS_TOLERANCE, 0},
+{ 281, 1040729961u, 4162008079u, 3194387916u, 759522153u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 282, 1081015037u, 1839697482u, 3216442625u, 2211508949u, 3220055171u, 952539875u, 0, COS_TOLERANCE, 0},
+{ 283, 3249807211u, 3736863454u, 1063475914u, 3150741666u, 1072328816u, 3934941618u, 0, COS_TOLERANCE, 0},
+{ 284, 1060785883u, 4200269406u, 3236646101u, 1061812176u, 1072693247u, 3569234031u, 0, COS_TOLERANCE, 0},
+{ 285, 1080217979u, 106027290u, 3234978297u, 2245237549u, 1072627959u, 1497207890u, 0, COS_TOLERANCE, 0},
+{ 286, 3246984334u, 2132131375u, 3250483427u, 3449276437u, 1072669917u, 2457870217u, 0, COS_TOLERANCE, 0},
+{ 287, 1089388778u, 2334440944u, 1105423490u, 4004336184u, 1072226828u, 3655844754u, 0, COS_TOLERANCE, 0},
+{ 288, 3218772704u, 4090088208u, 1042030013u, 3898658299u, 1072515052u, 1642000346u, 0, COS_TOLERANCE, 0},
+{ 289, 3207908064u, 2272831437u, 3253082595u, 2639188641u, 1072693247u, 3841638975u, 0, COS_TOLERANCE, 0},
+{ 290, 1054766684u, 1856594168u, 3189515294u, 4101853676u, 1072693247u, 4294729740u, 0, COS_TOLERANCE, 0},
+{ 291, 1076012412u, 2211699255u, 3195060344u, 3865018604u, 3220166089u, 1388690552u, 0, COS_TOLERANCE, 0},
+{ 292, 3242767010u, 996259334u, 3241496889u, 3782673116u, 3220090835u, 3150301332u, 0, COS_TOLERANCE, 0},
+{ 293, 1099130747u, 3840380763u, 1048674041u, 550040067u, 1071869811u, 2331064655u, 0, COS_TOLERANCE, 0},
+{ 294, 3251419593u, 95874100u, 3237232828u, 2645647822u, 1070705466u, 1321517167u, 0, COS_TOLERANCE, 0},
+{ 295, 1043665640u, 3441419500u, 3252367038u, 876710419u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 296, 3238593552u, 2560836004u, 3199616543u, 1180840586u, 3219473031u, 3806360310u, 0, COS_TOLERANCE, 0},
+{ 297, 3221602966u, 2218230392u, 3227485787u, 3947214579u, 3219993277u, 2784902361u, 0, COS_TOLERANCE, 0},
+{ 298, 1079539654u, 1447312532u, 1081476588u, 780366847u, 3219937861u, 1517430120u, 0, COS_TOLERANCE, 0},
+{ 299, 1072569643u, 2842113832u, 3216156731u, 225159029u, 1071831173u, 3436385363u, 0, COS_TOLERANCE, 0},
+{ 300, 1098117193u, 1601981129u, 3234628869u, 2236538344u, 3220121730u, 2605810833u, 0, COS_TOLERANCE, 0},
+{ 301, 1085173524u, 2194185737u, 3242362684u, 87913366u, 1072691976u, 256415598u, 0, COS_TOLERANCE, 0},
+{ 302, 3199083880u, 1346862963u, 1077836259u, 3604666660u, 1072693247u, 4294963661u, 0, COS_TOLERANCE, 0},
+{ 303, 3212255979u, 3115209742u, 1099332326u, 1325101950u, 1072693214u, 2337531688u, 0, COS_TOLERANCE, 0},
+{ 304, 3224546042u, 3889223100u, 1053247613u, 3371396923u, 1072658737u, 3503272081u, 0, COS_TOLERANCE, 0},
+{ 305, 3220477868u, 4163120793u, 1075022670u, 1387631215u, 1070721812u, 2081699423u, 0, COS_TOLERANCE, 0},
+{ 306, 3205481779u, 1532426189u, 1063168268u, 3397022615u, 1072693247u, 4278430058u, 0, COS_TOLERANCE, 0},
+{ 307, 3201033321u, 89324166u, 1079206060u, 3429424710u, 1072693247u, 4294917506u, 0, COS_TOLERANCE, 0},
+{ 308, 3192325102u, 747591401u, 1072238381u, 2803213904u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
+{ 309, 1091113780u, 271904221u, 1044258318u, 1858545114u, 3216584532u, 2619540521u, 0, COS_TOLERANCE, 0},
+{ 310, 3228068914u, 314958082u, 3249912496u, 2966213175u, 1072324141u, 1738955103u, 0, COS_TOLERANCE, 0},
+{ 311, 3197179414u, 3119528953u, 3217179014u, 2908718240u, 1072693247u, 4294967004u, 0, COS_TOLERANCE, 0},
+{ 312, 3242467576u, 2018361566u, 1100926600u, 3985805054u, 1071310530u, 1465528159u, 0, COS_TOLERANCE, 0},
+{ 313, 1070132580u, 409584884u, 3239758947u, 755795129u, 1072653605u, 3434577925u, 0, COS_TOLERANCE, 0},
+{ 314, 1075772446u, 1819156379u, 3251342302u, 2982669005u, 1069254981u, 541526918u, 0, COS_TOLERANCE, 0},
+{ 315, 1101563433u, 2080534280u, 3188254060u, 449171797u, 1067588739u, 1933402886u, 0, COS_TOLERANCE, 0},
+{ 316, 1095956900u, 168744837u, 3214950009u, 1322217822u, 3219443322u, 2005695949u, 0, COS_TOLERANCE, 0},
+{ 317, 3254226900u, 3250487255u, 1062120700u, 1876195180u, 1071200278u, 2307560753u, 0, COS_TOLERANCE, 0},
+{ 318, 3226343480u, 1336400247u, 1098057903u, 3314079581u, 3219921214u, 2661345031u, 0, COS_TOLERANCE, 0},
+{ 319, 3203678820u, 265025555u, 1063854282u, 3779482256u, 1072693247u, 4293286130u, 0, COS_TOLERANCE, 0},
+{ 320, 1067300501u, 887044257u, 1054789618u, 2732056261u, 1072692365u, 802497887u, 0, COS_TOLERANCE, 0},
+{ 321, 1050106742u, 4027115185u, 3191764868u, 2940199511u, 1072693247u, 4294966750u, 0, COS_TOLERANCE, 0},
+{ 322, 3202500155u, 2875684421u, 3227459837u, 2251967570u, 1072693247u, 4294625329u, 0, COS_TOLERANCE, 0},
+{ 323, 1063244412u, 284173546u, 3238823679u, 3557800647u, 1072693244u, 190380283u, 0, COS_TOLERANCE, 0},
+{ 324, 1101458560u, 3147771266u, 3220110464u, 2933364246u, 3219734106u, 2044690356u, 0, COS_TOLERANCE, 0},
+{ 325, 1064853160u, 3366183281u, 3234870843u, 537442654u, 1072693210u, 3789343972u, 0, COS_TOLERANCE, 0},
+{ 326, 3244118788u, 2529029548u, 3249882819u, 3781513577u, 3218152634u, 3189802031u, 0, COS_TOLERANCE, 0},
+{ 327, 3213436354u, 1080845539u, 3206760016u, 911778687u, 1072693089u, 3877739302u, 0, COS_TOLERANCE, 0},
+{ 328, 3191951036u, 469586759u, 1091830022u, 3080528840u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 329, 1080249104u, 2863108169u, 3225605506u, 2508274250u, 3220004966u, 1582349409u, 0, COS_TOLERANCE, 0},
+{ 330, 3210826984u, 4080017377u, 3206492941u, 1470284690u, 1072693243u, 1316205920u, 0, COS_TOLERANCE, 0},
+{ 331, 3207120390u, 3867917386u, 1102054928u, 3504746045u, 1072693247u, 4134082073u, 0, COS_TOLERANCE, 0},
+{ 332, 1064522279u, 2962134101u, 3244741577u, 3390537350u, 1072693224u, 2873015107u, 0, COS_TOLERANCE, 0},
+{ 333, 1088201813u, 1702237980u, 1071598971u, 1102587474u, 1072356356u, 900001206u, 0, COS_TOLERANCE, 0},
+{ 334, 3202970118u, 2180218657u, 3211592260u, 1206527853u, 1072693247u, 4294304288u, 0, COS_TOLERANCE, 0},
+{ 335, 3197084744u, 394130786u, 3242511482u, 2437699868u, 1072693247u, 4294967046u, 0, COS_TOLERANCE, 0},
+{ 336, 1044237059u, 849581558u, 3252006507u, 2008614943u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 337, 3210140014u, 3128971673u, 3249137531u, 2773583059u, 1072693245u, 4125642902u, 0, COS_TOLERANCE, 0},
+{ 338, 1085029866u, 590727700u, 3248651761u, 2183878539u, 3219184738u, 2192070315u, 0, COS_TOLERANCE, 0},
+{ 339, 1101098629u, 820687580u, 3208143496u, 1402434664u, 3220058761u, 1210702081u, 0, COS_TOLERANCE, 0},
+{ 340, 3252290835u, 1873709254u, 3245167989u, 44275991u, 3219673004u, 1212928558u, 0, COS_TOLERANCE, 0},
+{ 341, 3189668753u, 1174874204u, 3208263730u, 2360372288u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 342, 1103854676u, 937573440u, 3208953761u, 211240241u, 1072050384u, 2201399798u, 0, COS_TOLERANCE, 0},
+{ 343, 3243548934u, 2469774991u, 1043117070u, 3380071805u, 3219556824u, 3682801548u, 0, COS_TOLERANCE, 0},
+{ 344, 1058121042u, 442507560u, 3254252803u, 3257889649u, 1072693247u, 4274561110u, 0, COS_TOLERANCE, 0},
+{ 345, 1068850520u, 1854921625u, 1049810168u, 2729627545u, 1072685949u, 338147145u, 0, COS_TOLERANCE, 0},
+{ 346, 3254712629u, 4001809575u, 3240128649u, 278261523u, 1072401494u, 1009857194u, 0, COS_TOLERANCE, 0},
+{ 347, 1087224694u, 1793907966u, 3238955714u, 398859249u, 1070938098u, 1550865209u, 0, COS_TOLERANCE, 0},
+{ 348, 3200952547u, 2511916952u, 3219195283u, 1697158299u, 1072693247u, 4294921809u, 0, COS_TOLERANCE, 0},
+{ 349, 1069985548u, 3230931724u, 3243897690u, 3508781585u, 1072660402u, 2682188932u, 0, COS_TOLERANCE, 0},
+{ 350, 1103847606u, 1674254897u, 1046547577u, 217148561u, 3219915117u, 1778043083u, 0, COS_TOLERANCE, 0},
+{ 351, 3211263954u, 3275604304u, 3194840159u, 2991205850u, 1072693239u, 2251119u, 0, COS_TOLERANCE, 0},
+{ 352, 3195249375u, 3509997278u, 3248888030u, 3897986511u, 1072693247u, 4294967272u, 0, COS_TOLERANCE, 0},
+{ 353, 1047182435u, 2156824613u, 1042295665u, 1239257646u, 1072693247u, 4294967285u, 0, COS_TOLERANCE, 0},
+{ 354, 3213264085u, 1073153314u, 3250031627u, 2567234990u, 1072693121u, 971951768u, 0, COS_TOLERANCE, 0},
+{ 355, 3190593412u, 4261696995u, 3197784432u, 323702024u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 356, 3243690997u, 4075177615u, 3202791065u, 1919006082u, 3217187639u, 1965923119u, 0, COS_TOLERANCE, 0},
+{ 357, 3239270013u, 386429966u, 1086504491u, 3698826164u, 3216317943u, 1107594577u, 0, COS_TOLERANCE, 0},
+{ 358, 1078327190u, 1681986446u, 3194985869u, 3072950140u, 1072690830u, 2257146468u, 0, COS_TOLERANCE, 0},
+{ 359, 3217311933u, 3719038997u, 1055433962u, 3331415058u, 1072666970u, 2047828524u, 0, COS_TOLERANCE, 0},
+{ 360, 1060749713u, 2420250111u, 3238002206u, 1928661079u, 1072693247u, 3599364953u, 0, COS_TOLERANCE, 0},
+{ 361, 1081914210u, 3679866727u, 3227386672u, 1273835792u, 1072395803u, 157372037u, 0, COS_TOLERANCE, 0},
+{ 362, 1041622738u, 2682092368u, 3234222284u, 1325425811u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 363, 1056312613u, 4175172697u, 3208346191u, 2130706153u, 1072693247u, 4292975565u, 0, COS_TOLERANCE, 0},
+{ 364, 1092089624u, 1200784450u, 1083605096u, 1248595607u, 3220015189u, 549505287u, 0, COS_TOLERANCE, 0},
+{ 365, 3213890863u, 1897285171u, 3251296075u, 944966123u, 1072692989u, 1504542300u, 0, COS_TOLERANCE, 0},
+{ 366, 3241371250u, 2270747330u, 3230692631u, 422503284u, 3217051824u, 2300101304u, 0, COS_TOLERANCE, 0},
+{ 367, 1084120037u, 2857564741u, 1075647403u, 3308906709u, 1069138209u, 4033062893u, 0, COS_TOLERANCE, 0},
+{ 368, 3203475098u, 1380066948u, 3232612906u, 2613634294u, 1072693247u, 4293762459u, 0, COS_TOLERANCE, 0},
+{ 369, 1063890856u, 4022784584u, 1060483857u, 3264056381u, 1072693237u, 2967630019u, 0, COS_TOLERANCE, 0},
+{ 370, 1044637404u, 1778509100u, 3213146285u, 2665833973u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 371, 3216727300u, 1859175955u, 1079949560u, 4258450607u, 1072681279u, 1528669149u, 0, COS_TOLERANCE, 0},
+{ 372, 1048277388u, 4128020197u, 1076266146u, 4122840980u, 1072693247u, 4294967249u, 0, COS_TOLERANCE, 0},
+{ 373, 3193183163u, 2454653987u, 3229487005u, 2977478685u, 1072693247u, 4294967294u, 0, COS_TOLERANCE, 0},
+{ 374, 3253556483u, 1355181872u, 1095308770u, 436846481u, 1072638418u, 837638418u, 0, COS_TOLERANCE, 0},
+{ 375, 3246605302u, 2592856453u, 3247825559u, 3195234082u, 3219761412u, 4175373806u, 0, COS_TOLERANCE, 0},
+{ 376, 3222118023u, 3554670043u, 1091621009u, 3321236467u, 3219855658u, 1849229220u, 0, COS_TOLERANCE, 0},
+{ 377, 1069012833u, 1936670355u, 1095715713u, 2958468553u, 1072684160u, 113994776u, 0, COS_TOLERANCE, 0},
+{ 378, 3192291109u, 2960339502u, 1098808013u, 1044068983u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 379, 3196691185u, 4093388677u, 1095478112u, 1735930261u, 1072693247u, 4294967132u, 0, COS_TOLERANCE, 0},
+{ 380, 1091040302u, 1807398746u, 3195743135u, 4261616162u, 1072560488u, 2443022461u, 0, COS_TOLERANCE, 0},
+{ 381, 3209294194u, 3250576797u, 1059002384u, 3043079652u, 1072693247u, 1472001997u, 0, COS_TOLERANCE, 0},
+{ 382, 1069207109u, 666051428u, 3208765404u, 1912684117u, 1072681761u, 3157012499u, 0, COS_TOLERANCE, 0},
+{ 383, 1103487420u, 1949030179u, 1096388934u, 896459246u, 1072112440u, 3662318513u, 0, COS_TOLERANCE, 0},
+{ 384, 1054300653u, 622499767u, 1066707637u, 1490260486u, 1072693247u, 4294827704u, 0, COS_TOLERANCE, 0},
+{ 385, 1106688493u, 1490616165u, 3251242436u, 795675736u, 1072531194u, 3696734274u, 0, COS_TOLERANCE, 0},
+{ 386, 1080943896u, 3662877092u, 3234317146u, 3200513112u, 1072529133u, 2265466345u, 0, COS_TOLERANCE, 0},
+{ 387, 1084088786u, 1356101968u, 3236536816u, 3062844611u, 3219578668u, 4220416571u, 0, COS_TOLERANCE, 0},
+{ 388, 3219922640u, 2284484846u, 3219498359u, 3240896015u, 1071934299u, 2387177578u, 0, COS_TOLERANCE, 0},
+{ 389, 3235759689u, 494503287u, 1092811254u, 142673998u, 3220176682u, 887984525u, 0, COS_TOLERANCE, 0},
+{ 390, 3252125916u, 3394882641u, 3225306538u, 364852125u, 1072048934u, 72512142u, 0, COS_TOLERANCE, 0},
+{ 391, 3225261763u, 193885269u, 1088149839u, 1359805831u, 3218094098u, 3213564391u, 0, COS_TOLERANCE, 0},
+{ 392, 3200484782u, 592580907u, 3199560872u, 3086438952u, 1072693247u, 4294942905u, 0, COS_TOLERANCE, 0},
+{ 393, 1059518664u, 1778008540u, 1049064687u, 73581647u, 1072693247u, 4156632868u, 0, COS_TOLERANCE, 0},
+{ 394, 3246733598u, 233240285u, 1081923320u, 2710903921u, 1068775539u, 2733461858u, 0, COS_TOLERANCE, 0},
+{ 395, 1069513767u, 3719878805u, 1079866720u, 3615458228u, 1072677407u, 497768842u, 0, COS_TOLERANCE, 0},
+{ 396, 3221194724u, 3647632375u, 3247225271u, 3839959621u, 3218664046u, 3484392941u, 0, COS_TOLERANCE, 0},
+{ 397, 1103401096u, 2232210456u, 3235434773u, 224271737u, 1072307444u, 2600424197u, 0, COS_TOLERANCE, 0},
+{ 398, 3193003684u, 2134662911u, 3190390590u, 4239009051u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
+{ 399, 1080526145u, 2305279897u, 1077668039u, 1854523320u, 1072579199u, 1091515037u, 0, COS_TOLERANCE, 0},
+{ 400, 3219864259u, 538224650u, 3206153057u, 1379649610u, 1071978725u, 4132122137u, 0, COS_TOLERANCE, 0},
+{ 401, 3196410507u, 3683897920u, 3244167599u, 3647579469u, 1072693247u, 4294967182u, 0, COS_TOLERANCE, 0},
+{ 402, 1090280933u, 2694093608u, 1042775347u, 598406111u, 3216912593u, 4112924109u, 0, COS_TOLERANCE, 0},
+{ 403, 3211635392u, 872706833u, 1084802480u, 2200602798u, 1072693234u, 1065041327u, 0, COS_TOLERANCE, 0},
+{ 404, 1042339597u, 904146293u, 1060867322u, 1729685598u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 405, 3195694970u, 1894173462u, 3232800651u, 191960416u, 1072693247u, 4294967252u, 0, COS_TOLERANCE, 0},
+{ 406, 1091225343u, 3521028551u, 1054522089u, 3287274359u, 1069825174u, 3031550075u, 0, COS_TOLERANCE, 0},
+{ 407, 1095386964u, 959640601u, 3201578263u, 4136915018u, 1072408754u, 1688369384u, 0, COS_TOLERANCE, 0},
+{ 408, 1064005451u, 1553716379u, 1106027987u, 984725765u, 1072693236u, 1029150851u, 0, COS_TOLERANCE, 0},
+{ 409, 3238832641u, 2287646644u, 3240329321u, 2276183378u, 1071746292u, 820755399u, 0, COS_TOLERANCE, 0},
+{ 410, 1068209174u, 3940225170u, 3199544434u, 997572161u, 1072690206u, 1917386837u, 0, COS_TOLERANCE, 0},
+{ 411, 3212768361u, 36116288u, 3206886566u, 4196602670u, 1072693188u, 485711984u, 0, COS_TOLERANCE, 0},
+{ 412, 3241695853u, 3550227562u, 3207257983u, 2747744117u, 3220172545u, 2187450492u, 0, COS_TOLERANCE, 0},
+{ 413, 1104236126u, 507130047u, 1048359321u, 3229888373u, 1069360590u, 620968612u, 0, COS_TOLERANCE, 0},
+{ 414, 3222996778u, 2210969014u, 1081031001u, 1946786091u, 1072462215u, 1450093973u, 0, COS_TOLERANCE, 0},
+{ 415, 3236306990u, 4059150589u, 3189759234u, 1177045799u, 1071955752u, 2076739579u, 0, COS_TOLERANCE, 0},
+{ 416, 1093103612u, 2664812822u, 1050343198u, 2034180320u, 3217171938u, 1684460428u, 0, COS_TOLERANCE, 0},
+{ 417, 3213779117u, 1175750283u, 3235559706u, 1424491340u, 1072693017u, 1305312596u, 0, COS_TOLERANCE, 0},
+{ 418, 3213904193u, 1630036121u, 3231972785u, 3195479448u, 1072692982u, 3293309497u, 0, COS_TOLERANCE, 0},
+{ 419, 1090429875u, 2527029044u, 1046927050u, 4000723255u, 1071378480u, 3977336311u, 0, COS_TOLERANCE, 0},
+{ 420, 1085208677u, 3335703647u, 3237349676u, 3869440059u, 1072445349u, 2286761790u, 0, COS_TOLERANCE, 0},
+{ 421, 1091433848u, 3888398377u, 3196041693u, 1290567220u, 3218367554u, 1055589159u, 0, COS_TOLERANCE, 0},
+{ 422, 1066679070u, 3242451480u, 3248384948u, 707431021u, 1072692838u, 3102939233u, 0, COS_TOLERANCE, 0},
+{ 423, 1083230509u, 2739665123u, 1060777905u, 1733073225u, 1072675519u, 2422104283u, 0, COS_TOLERANCE, 0},
+{ 424, 1078517061u, 1297274853u, 3208848704u, 3341639139u, 1072398277u, 765339862u, 0, COS_TOLERANCE, 0},
+{ 425, 1046570941u, 2228057309u, 1084318902u, 1317851136u, 1072693247u, 4294967291u, 0, COS_TOLERANCE, 0},
+{ 426, 1088255327u, 270039934u, 3241414679u, 3063626339u, 1072685261u, 597425399u, 0, COS_TOLERANCE, 0},
+{ 427, 3219178350u, 83062251u, 3211262173u, 2659016437u, 1072412012u, 4069431777u, 0, COS_TOLERANCE, 0},
+{ 428, 1095743886u, 3833539373u, 3206667189u, 1567476111u, 1072307664u, 1056242430u, 0, COS_TOLERANCE, 0},
+{ 429, 3205195072u, 2382776852u, 3249232579u, 1546622468u, 1072693247u, 4282670870u, 0, COS_TOLERANCE, 0},
+{ 430, 1085536439u, 1714300821u, 1104130938u, 4167591598u, 3217859383u, 2232768404u, 0, COS_TOLERANCE, 0},
+{ 431, 1051092760u, 2798720100u, 1086978789u, 449990704u, 1072693247u, 4294965288u, 0, COS_TOLERANCE, 0},
+{ 432, 3231198415u, 4039516226u, 3244344107u, 4272932619u, 1067452376u, 2155088169u, 0, COS_TOLERANCE, 0},
+{ 433, 3222708441u, 1683007544u, 1091105663u, 3805494321u, 1072295450u, 3246180215u, 0, COS_TOLERANCE, 0},
+{ 434, 3220852948u, 2072627412u, 1094383324u, 3394151662u, 3216173352u, 2322177502u, 0, COS_TOLERANCE, 0},
+{ 435, 3220570024u, 1120106427u, 3223631624u, 3404608264u, 1070131616u, 4106501870u, 0, COS_TOLERANCE, 0},
+{ 436, 1097859997u, 559918757u, 3205077053u, 908100198u, 3218748698u, 3336891511u, 0, COS_TOLERANCE, 0},
+{ 437, 1042677918u, 2026673913u, 3244833635u, 2844573214u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 438, 3254567259u, 3946837259u, 3234993796u, 3850406820u, 3220032793u, 4201817022u, 0, COS_TOLERANCE, 0},
+{ 439, 1057479809u, 3139330994u, 1046133568u, 1539650690u, 1072693247u, 4285638832u, 0, COS_TOLERANCE, 0},
+{ 440, 3236705500u, 1554593884u, 3228899878u, 2813752562u, 1072173572u, 377670647u, 0, COS_TOLERANCE, 0},
+{ 441, 1056505004u, 3804703138u, 1072931071u, 2053677923u, 1072693247u, 4292409955u, 0, COS_TOLERANCE, 0},
+{ 442, 3244864299u, 289355864u, 1078453818u, 2143066338u, 3219830878u, 3759477379u, 0, COS_TOLERANCE, 0},
+{ 443, 3203939880u, 2157691971u, 1106629150u, 110806409u, 1072693247u, 4292560021u, 0, COS_TOLERANCE, 0},
+{ 444, 1082157019u, 3570399481u, 1085637605u, 180265334u, 3220059372u, 216871137u, 0, COS_TOLERANCE, 0},
+{ 445, 3200980182u, 558779875u, 3202046748u, 2338464653u, 1072693247u, 4294920358u, 0, COS_TOLERANCE, 0},
+{ 446, 1045705464u, 1703969219u, 3229797258u, 1417521063u, 1072693247u, 4294967294u, 0, COS_TOLERANCE, 0},
+{ 447, 3237782261u, 3917440951u, 1051668894u, 3736066983u, 1071954489u, 2643649072u, 0, COS_TOLERANCE, 0},
+{ 448, 1064752080u, 3106613409u, 1066627453u, 2735392257u, 1072693215u, 1855155537u, 0, COS_TOLERANCE, 0},
+{ 449, 1065665372u, 2229777605u, 1065061963u, 2405869925u, 1072693140u, 962185659u, 0, COS_TOLERANCE, 0},
+{ 450, 3239463229u, 3967957902u, 1057416138u, 3459188071u, 1072154343u, 2087114904u, 0, COS_TOLERANCE, 0},
+{ 451, 1068639210u, 3699016825u, 3249713090u, 796144848u, 1072687985u, 316016598u, 0, COS_TOLERANCE, 0},
+{ 452, 3228816396u, 3285165564u, 3211948811u, 401510871u, 3220174506u, 2051663811u, 0, COS_TOLERANCE, 0},
+{ 453, 1094257658u, 634857910u, 3199607513u, 914218057u, 3220079650u, 816248961u, 0, COS_TOLERANCE, 0},
+{ 454, 1083743336u, 2030735578u, 3233855943u, 965677531u, 3218690320u, 4171285285u, 0, COS_TOLERANCE, 0},
+{ 455, 1079556815u, 3957229084u, 1051050470u, 3123776651u, 3215268432u, 3325789246u, 0, COS_TOLERANCE, 0},
+{ 456, 3221863333u, 162122081u, 3239376395u, 108064594u, 3220170995u, 2986073122u, 0, COS_TOLERANCE, 0},
+{ 457, 3237271786u, 869031839u, 3225020876u, 1344301606u, 3219226445u, 571732783u, 0, COS_TOLERANCE, 0},
+{ 458, 3214433474u, 946696117u, 3231825228u, 1700703647u, 1072692654u, 2166617165u, 0, COS_TOLERANCE, 0},
+{ 459, 1075492875u, 3394168074u, 1076939786u, 1666995668u, 1072530509u, 890276858u, 0, COS_TOLERANCE, 0},
+{ 460, 3208774795u, 2488789804u, 3238508333u, 1506943664u, 1072693247u, 2933330625u, 0, COS_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1071483620u, 2208326015u, 0, COS_TOLERANCE, 0},
+{ 462, 3219934542u, 1244307192u, 3191297711u, 2540916692u, 1071925114u, 1313080148u, 0, COS_TOLERANCE, 0},
+{ 463, 3200062692u, 2871645739u, 3239081581u, 1440249115u, 1072693247u, 4294953764u, 0, COS_TOLERANCE, 0},
+{ 464, 1068350633u, 1231934926u, 3236746788u, 603977748u, 1072689711u, 3639960946u, 0, COS_TOLERANCE, 0},
+{ 465, 3195449689u, 2386312545u, 1063169277u, 2715234268u, 1072693247u, 4294967264u, 0, COS_TOLERANCE, 0},
+{ 466, 1087803418u, 915867083u, 1046790892u, 3347417612u, 1071309674u, 1156953860u, 0, COS_TOLERANCE, 0},
+{ 467, 1105984188u, 3553288373u, 1065698616u, 2906680663u, 1072261701u, 1351690325u, 0, COS_TOLERANCE, 0},
+{ 468, 1045506226u, 2342364630u, 1051356723u, 4019093203u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
+{ 469, 3201169162u, 2911548084u, 1105282515u, 2476735795u, 1072693247u, 4294909830u, 0, COS_TOLERANCE, 0},
+{ 470, 1050472772u, 1836216409u, 1101062307u, 2519592554u, 1072693247u, 4294966458u, 0, COS_TOLERANCE, 0},
+{ 471, 1070178161u, 1235369496u, 3222946447u, 668087854u, 1072651370u, 1135449571u, 0, COS_TOLERANCE, 0},
+{ 472, 3208554596u, 2981820811u, 1059838516u, 2845580478u, 1072693247u, 3309410866u, 0, COS_TOLERANCE, 0},
+{ 473, 3193931414u, 1565550570u, 3217165795u, 4162017137u, 1072693247u, 4294967292u, 0, COS_TOLERANCE, 0},
+{ 474, 3237251378u, 2808968027u, 1055630096u, 1782326814u, 3219252387u, 2702488331u, 0, COS_TOLERANCE, 0},
+{ 475, 1053576974u, 1492622658u, 3216653077u, 3972512122u, 1072693247u, 4294916007u, 0, COS_TOLERANCE, 0},
+{ 476, 3222171679u, 2722693603u, 3227814791u, 3169731970u, 3219732412u, 2646352387u, 0, COS_TOLERANCE, 0},
+{ 477, 3217906631u, 899763203u, 3207606001u, 2804747833u, 1072638326u, 1716712908u, 0, COS_TOLERANCE, 0},
+{ 478, 3230670325u, 3789058912u, 3228095081u, 4135937628u, 1071642741u, 1726723037u, 0, COS_TOLERANCE, 0},
+{ 479, 1060199382u, 1682808307u, 3206960335u, 232877759u, 1072693247u, 3979004235u, 0, COS_TOLERANCE, 0},
+{ 480, 3242091486u, 2851963139u, 3246852961u, 2590862592u, 3219860744u, 3972780260u, 0, COS_TOLERANCE, 0},
+{ 481, 1081200406u, 2422232642u, 3234779662u, 290458310u, 3219313360u, 2704073029u, 0, COS_TOLERANCE, 0},
+{ 482, 3210671078u, 1082582386u, 1075605675u, 2602133689u, 1072693244u, 1106099360u, 0, COS_TOLERANCE, 0},
+{ 483, 3239818611u, 1789635787u, 1059414278u, 1048286093u, 3218252122u, 1300245564u, 0, COS_TOLERANCE, 0},
+{ 484, 1098330542u, 231339448u, 1055573265u, 504907415u, 3220173686u, 2481863579u, 0, COS_TOLERANCE, 0},
+{ 485, 1063211461u, 1153251200u, 3204617090u, 1772013857u, 1072693244u, 723005056u, 0, COS_TOLERANCE, 0},
+{ 486, 1099551055u, 1082898276u, 3212089272u, 1449080862u, 1072558217u, 132128436u, 0, COS_TOLERANCE, 0},
+{ 487, 1086008285u, 3177299045u, 1058862813u, 809400815u, 1072543618u, 4039777533u, 0, COS_TOLERANCE, 0},
+{ 488, 3230854550u, 1924429710u, 1056464743u, 3349283177u, 1070838822u, 1592886544u, 0, COS_TOLERANCE, 0},
+{ 489, 3245473391u, 42238036u, 1042379500u, 2113559863u, 1071848551u, 792274594u, 0, COS_TOLERANCE, 0},
+{ 490, 1064761243u, 3304403230u, 3217556703u, 58952646u, 1072693215u, 136408135u, 0, COS_TOLERANCE, 0},
+{ 491, 3212669530u, 1645486982u, 3224301095u, 3636267471u, 1072693193u, 3461766790u, 0, COS_TOLERANCE, 0},
+{ 492, 1062762009u, 619402181u, 3235208235u, 557360557u, 1072693245u, 2846151980u, 0, COS_TOLERANCE, 0},
+{ 493, 3238238394u, 110029735u, 1046937383u, 984375729u, 1072675170u, 1806823293u, 0, COS_TOLERANCE, 0},
+{ 494, 3189496738u, 4063688092u, 3203235744u, 1049950343u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 495, 1062350619u, 650996069u, 1054971928u, 3953359826u, 1072693246u, 3042411977u, 0, COS_TOLERANCE, 0},
+{ 496, 3227055805u, 66926332u, 1090561839u, 1379780888u, 1072232467u, 3551215499u, 0, COS_TOLERANCE, 0},
+{ 497, 3233453307u, 2803378256u, 1086057989u, 498534626u, 1072603670u, 2257983600u, 0, COS_TOLERANCE, 0},
+{ 498, 1082618553u, 2846400785u, 1047142525u, 1375153550u, 3219920179u, 2183157773u, 0, COS_TOLERANCE, 0},
+{ 499, 1044581201u, 2869128958u, 1070972315u, 4246440273u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 500, 1051832506u, 3112381207u, 1044430965u, 3981604561u, 1072693247u, 4294962289u, 0, COS_TOLERANCE, 0},
+{ 501, 3231254997u, 243303420u, 1093735824u, 1575581926u, 1072630208u, 3590549604u, 0, COS_TOLERANCE, 0},
+{ 502, 3239137997u, 3218865041u, 3204803496u, 3840388050u, 3220112180u, 785845582u, 0, COS_TOLERANCE, 0},
+{ 503, 1048415431u, 336846959u, 1052664471u, 3798336786u, 1072693247u, 4294967241u, 0, COS_TOLERANCE, 0},
+{ 504, 1055954236u, 3639240976u, 1081202165u, 1844741676u, 1072693247u, 4293840918u, 0, COS_TOLERANCE, 0},
+{ 505, 3211904793u, 717293069u, 3211534283u, 582401011u, 1072693228u, 1061096244u, 0, COS_TOLERANCE, 0},
+{ 506, 3251962512u, 3766248610u, 3196520332u, 1174437546u, 3219189828u, 425313336u, 0, COS_TOLERANCE, 0},
+{ 507, 1083431226u, 756959182u, 3204099341u, 1581804034u, 1071437392u, 805974233u, 0, COS_TOLERANCE, 0},
+{ 508, 3205806444u, 3560686300u, 3220980617u, 4277975772u, 1072693247u, 4266819760u, 0, COS_TOLERANCE, 0},
+{ 509, 3209906076u, 2598148853u, 3217622194u, 3460421008u, 1072693246u, 2353707925u, 0, COS_TOLERANCE, 0},
+{ 510, 1066720824u, 136600515u, 3209934920u, 3340653128u, 1072692812u, 2318741494u, 0, COS_TOLERANCE, 0},
+{ 511, 1096820310u, 1045480938u, 3251354609u, 4133432965u, 3218616375u, 1623062713u, 0, COS_TOLERANCE, 0},
+{ 512, 1091599431u, 1630207738u, 3239996829u, 2393354808u, 3219829897u, 4235988833u, 0, COS_TOLERANCE, 0},
+{ 513, 3190626018u, 3739770117u, 1059520750u, 3959551225u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 514, 3230730505u, 1498861716u, 1091297147u, 847410798u, 3220160144u, 1401589565u, 0, COS_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 3217768161u, 1085338811u, 0, COS_TOLERANCE, 0},
+{ 516, 1054849265u, 2353103845u, 3235718771u, 2978889966u, 1072693247u, 4294709680u, 0, COS_TOLERANCE, 0},
+{ 517, 3251357992u, 1546972125u, 3249076079u, 1987349196u, 3215432163u, 3255331174u, 0, COS_TOLERANCE, 0},
+{ 518, 3238219513u, 2769161072u, 1075207126u, 292616282u, 3219474945u, 1396988883u, 0, COS_TOLERANCE, 0},
+{ 519, 3199712298u, 36855311u, 1052128202u, 1479039342u, 1072693247u, 4294958282u, 0, COS_TOLERANCE, 0},
+{ 520, 1083757053u, 2027463605u, 1066023013u, 3369686340u, 1071267149u, 2773154495u, 0, COS_TOLERANCE, 0},
+{ 521, 3197852749u, 3808681655u, 1054161346u, 1821773119u, 1072693247u, 4294966547u, 0, COS_TOLERANCE, 0},
+{ 522, 1040685928u, 3175490326u, 3226879970u, 845687760u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 523, 1042302993u, 3124482451u, 3242748377u, 3259417226u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 524, 1045245695u, 2751606436u, 3236210939u, 3923142740u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
+{ 525, 1095694737u, 2016872044u, 3228408064u, 4201274408u, 3219321161u, 1921838008u, 0, COS_TOLERANCE, 0},
+{ 526, 3199349254u, 1019916843u, 3219974785u, 1977881787u, 1072693247u, 4294961999u, 0, COS_TOLERANCE, 0},
+{ 527, 3199478752u, 2060433318u, 1075872515u, 366073725u, 1072693247u, 4294960786u, 0, COS_TOLERANCE, 0},
+{ 528, 3191180557u, 1098469906u, 1082900695u, 2349346832u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 529, 3209974707u, 3011196295u, 3252479932u, 2459281672u, 1072693246u, 1657835881u, 0, COS_TOLERANCE, 0},
+{ 530, 3221334323u, 2843222682u, 1089275809u, 298982001u, 3219326801u, 414973546u, 0, COS_TOLERANCE, 0},
+{ 531, 1101737698u, 914741728u, 3203468059u, 2833809843u, 3219266445u, 2657113532u, 0, COS_TOLERANCE, 0},
+{ 532, 3236763878u, 1274901962u, 3241535845u, 3759113509u, 1069183268u, 3668657064u, 0, COS_TOLERANCE, 0},
+{ 533, 3245916442u, 2134927252u, 3253802671u, 3013731444u, 1070851538u, 2502169401u, 0, COS_TOLERANCE, 0},
+{ 534, 1099201341u, 2230655177u, 3254510616u, 1249674366u, 3220146808u, 409508490u, 0, COS_TOLERANCE, 0},
+{ 535, 1062971253u, 717357389u, 1083533731u, 3746683362u, 1072693245u, 54512334u, 0, COS_TOLERANCE, 0},
+{ 536, 3213773114u, 834976849u, 3217357661u, 2465861779u, 1072693018u, 2976670979u, 0, COS_TOLERANCE, 0},
+{ 537, 1045656117u, 1385714428u, 1053358395u, 3007113740u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
+{ 538, 1050527919u, 599268545u, 3201368210u, 2309854744u, 1072693247u, 4294966409u, 0, COS_TOLERANCE, 0},
+{ 539, 1069954454u, 2840234388u, 3232496515u, 333365983u, 1072661758u, 3614572093u, 0, COS_TOLERANCE, 0},
+{ 540, 1045922781u, 3136078996u, 3194520860u, 2650572904u, 1072693247u, 4294967294u, 0, COS_TOLERANCE, 0},
+{ 541, 3233687691u, 2405805086u, 3251640319u, 324233833u, 1068811358u, 4162323614u, 0, COS_TOLERANCE, 0},
+{ 542, 1106699146u, 2589598340u, 3254677807u, 952438812u, 1071784199u, 1738588699u, 0, COS_TOLERANCE, 0},
+{ 543, 3189114773u, 1922837702u, 3216892718u, 3535907549u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 544, 3243615868u, 261447440u, 3209805849u, 1150571079u, 3220053401u, 399142837u, 0, COS_TOLERANCE, 0},
+{ 545, 1095805232u, 4026487528u, 1073152064u, 27340691u, 1072388772u, 1533980329u, 0, COS_TOLERANCE, 0},
+{ 546, 3229123692u, 338765118u, 1086225786u, 3207238249u, 3219992318u, 2304503256u, 0, COS_TOLERANCE, 0},
+{ 547, 3196182703u, 1085283176u, 3187775111u, 1601194210u, 1072693247u, 4294967216u, 0, COS_TOLERANCE, 0},
+{ 548, 1091520173u, 3031712790u, 3252307859u, 170666844u, 3218842033u, 2741016994u, 0, COS_TOLERANCE, 0},
+{ 549, 3218862231u, 3148395674u, 1041913758u, 3306391490u, 1072496559u, 2937265603u, 0, COS_TOLERANCE, 0},
+{ 550, 3201277070u, 2205233857u, 3208100078u, 3993195511u, 1072693247u, 4294903341u, 0, COS_TOLERANCE, 0},
+{ 551, 1067699608u, 4282766727u, 1072820377u, 1874778218u, 1072691679u, 2327723158u, 0, COS_TOLERANCE, 0},
+{ 552, 3210833092u, 2920860798u, 3218070226u, 3104066154u, 1072693243u, 1098827613u, 0, COS_TOLERANCE, 0},
+{ 553, 3204950351u, 969991373u, 3250596895u, 1734386152u, 1072693247u, 4285794546u, 0, COS_TOLERANCE, 0},
+{ 554, 3238915818u, 1218740205u, 3239802737u, 2610078504u, 1072341600u, 4056543646u, 0, COS_TOLERANCE, 0},
+{ 555, 3206031242u, 1485218325u, 3220870240u, 3591664613u, 1072693247u, 4256731124u, 0, COS_TOLERANCE, 0},
+{ 556, 3202074143u, 690157417u, 3190850619u, 4192347699u, 1072693247u, 4294769820u, 0, COS_TOLERANCE, 0},
+{ 557, 1096053810u, 4009839784u, 1079670252u, 394167192u, 1067100091u, 683628693u, 0, COS_TOLERANCE, 0},
+{ 558, 3234559237u, 961532417u, 1092588071u, 2923790239u, 3219826642u, 2587899721u, 0, COS_TOLERANCE, 0},
+{ 559, 3203879091u, 4174125604u, 1050682630u, 2169701868u, 1072693247u, 4292740708u, 0, COS_TOLERANCE, 0},
+{ 560, 3243092475u, 4146748230u, 1087373950u, 2481478351u, 3220175227u, 1005025558u, 0, COS_TOLERANCE, 0},
+{ 561, 1076987866u, 3984715440u, 1050421618u, 2446142566u, 1070589958u, 3572501181u, 0, COS_TOLERANCE, 0},
+{ 562, 1084172406u, 936290150u, 1100614426u, 3625806370u, 3219547017u, 4126560522u, 0, COS_TOLERANCE, 0},
+{ 563, 1099787952u, 1866615265u, 3215651428u, 2337013350u, 3219658243u, 456488637u, 0, COS_TOLERANCE, 0},
+{ 564, 3253198302u, 712227971u, 1106004723u, 973148499u, 3220091089u, 4169062849u, 0, COS_TOLERANCE, 0},
+{ 565, 3230088199u, 3409813738u, 3244817008u, 1933503498u, 3219104826u, 3598702610u, 0, COS_TOLERANCE, 0},
+{ 566, 1079943733u, 3180389060u, 3228735703u, 83422217u, 3220176734u, 1468291227u, 0, COS_TOLERANCE, 0},
+{ 567, 1077878724u, 556972671u, 3204582372u, 841555801u, 1072604572u, 802866348u, 0, COS_TOLERANCE, 0},
+{ 568, 1070767721u, 4189151332u, 1080874032u, 706326922u, 1072605127u, 894556621u, 0, COS_TOLERANCE, 0},
+{ 569, 1096151307u, 198291836u, 1057281892u, 2188836928u, 3218147467u, 3777186949u, 0, COS_TOLERANCE, 0},
+{ 570, 1078091995u, 1219449298u, 3228734687u, 3504562743u, 1071828869u, 1565632238u, 0, COS_TOLERANCE, 0},
+{ 571, 3204570464u, 1776099219u, 1094316777u, 4188083896u, 1072693247u, 4289738353u, 0, COS_TOLERANCE, 0},
+{ 572, 3193845708u, 2614400266u, 1073750227u, 3003203347u, 1072693247u, 4294967292u, 0, COS_TOLERANCE, 0},
+{ 573, 3213982678u, 2959351406u, 1105603716u, 311851587u, 1072692942u, 1400585228u, 0, COS_TOLERANCE, 0},
+{ 574, 1084544434u, 865443613u, 1097532516u, 3622237781u, 3220039406u, 2852313542u, 0, COS_TOLERANCE, 0},
+{ 575, 3231786666u, 447506102u, 3195759295u, 3603669725u, 3219760569u, 3069303987u, 0, COS_TOLERANCE, 0},
+{ 576, 1097890173u, 3934398273u, 1040996422u, 2968621268u, 1068863315u, 1513793935u, 0, COS_TOLERANCE, 0},
+{ 577, 3196739825u, 784208771u, 1088764788u, 2182296421u, 1072693247u, 4294967122u, 0, COS_TOLERANCE, 0},
+{ 578, 3248332291u, 1527590526u, 3206961556u, 2823164069u, 3219246387u, 1629246963u, 0, COS_TOLERANCE, 0},
+{ 579, 3236644131u, 3876699591u, 3207481130u, 4028148535u, 3219160558u, 3753866329u, 0, COS_TOLERANCE, 0},
+{ 580, 1083576186u, 2164249756u, 1059857743u, 1785169952u, 3218175224u, 879726405u, 0, COS_TOLERANCE, 0},
+{ 581, 1091804009u, 2079273665u, 1080303860u, 625760474u, 3218606506u, 371401132u, 0, COS_TOLERANCE, 0},
+{ 582, 3226486108u, 3636214836u, 1068367620u, 2932621925u, 3219400280u, 3279627080u, 0, COS_TOLERANCE, 0},
+{ 583, 1043995372u, 4274131512u, 1047707755u, 92550763u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 584, 3198822121u, 2648933384u, 1084603503u, 3534304873u, 1072693247u, 4294964560u, 0, COS_TOLERANCE, 0},
+{ 585, 1064563235u, 3216750767u, 3191088629u, 547482628u, 1072693223u, 580769603u, 0, COS_TOLERANCE, 0},
+{ 586, 1061084774u, 1420360746u, 1080063101u, 1690029499u, 1072693247u, 3295800571u, 0, COS_TOLERANCE, 0},
+{ 587, 3229855364u, 1908572179u, 1080112083u, 1228319033u, 1068701740u, 1725760599u, 0, COS_TOLERANCE, 0},
+{ 588, 1048158178u, 500312015u, 3212368508u, 3864619086u, 1072693247u, 4294967255u, 0, COS_TOLERANCE, 0},
+{ 589, 3221335610u, 4211343447u, 1087492676u, 4272583781u, 3219330937u, 1275345573u, 0, COS_TOLERANCE, 0},
+{ 590, 1099392394u, 2382118000u, 1042665328u, 567154882u, 3219359292u, 736683867u, 0, COS_TOLERANCE, 0},
+{ 591, 1058013442u, 1435344339u, 3216303171u, 2275988178u, 1072693247u, 4278181812u, 0, COS_TOLERANCE, 0},
+{ 592, 3214538619u, 3403659753u, 3218043030u, 1926480488u, 1072692573u, 3285328600u, 0, COS_TOLERANCE, 0},
+{ 593, 1076840383u, 1198845185u, 3225556149u, 1130089684u, 3220172073u, 668005656u, 0, COS_TOLERANCE, 0},
+{ 594, 3222663042u, 2183928090u, 1048403956u, 963834821u, 1072058265u, 439230756u, 0, COS_TOLERANCE, 0},
+{ 595, 1101672960u, 2120625396u, 1041006976u, 2137548527u, 3219105835u, 3752162680u, 0, COS_TOLERANCE, 0},
+{ 596, 1099230238u, 586700956u, 1059670521u, 303891699u, 1070589874u, 1796035360u, 0, COS_TOLERANCE, 0},
+{ 597, 3218994498u, 2509132460u, 1102827530u, 2205707903u, 1072467656u, 2678741737u, 0, COS_TOLERANCE, 0},
+{ 598, 3204860597u, 1229308263u, 3209170414u, 4206576047u, 1072693247u, 4286825667u, 0, COS_TOLERANCE, 0},
+{ 599, 3224076289u, 4078010749u, 3199236456u, 733478972u, 1071131091u, 915577737u, 0, COS_TOLERANCE, 0},
+{ 600, 3197712584u, 4277541051u, 3199806921u, 397102023u, 1072693247u, 4294966660u, 0, COS_TOLERANCE, 0},
+{ 601, 3195975013u, 900999594u, 3234720188u, 2530214248u, 1072693247u, 4294967237u, 0, COS_TOLERANCE, 0},
+{ 602, 1076543548u, 4000609478u, 1096577064u, 4148592328u, 1072043454u, 840440154u, 0, COS_TOLERANCE, 0},
+{ 603, 1048668084u, 2154187873u, 3224392607u, 3957250362u, 1072693247u, 4294967220u, 0, COS_TOLERANCE, 0},
+{ 604, 3223413488u, 2867079200u, 1101870326u, 921212001u, 3219640338u, 2663551801u, 0, COS_TOLERANCE, 0},
+{ 605, 3233221890u, 674547716u, 1063216239u, 3929755226u, 1071459668u, 723041291u, 0, COS_TOLERANCE, 0},
+{ 606, 3240415851u, 3158182449u, 1043794244u, 3259056345u, 3220037664u, 2966147533u, 0, COS_TOLERANCE, 0},
+{ 607, 3236776656u, 3002823940u, 1059511739u, 2832435794u, 1070487493u, 280321777u, 0, COS_TOLERANCE, 0},
+{ 608, 3217304822u, 2196511929u, 1049973941u, 3672092877u, 1072667250u, 1240548968u, 0, COS_TOLERANCE, 0},
+{ 609, 1050438056u, 3655292191u, 1086438127u, 3567072906u, 1072693247u, 4294966489u, 0, COS_TOLERANCE, 0},
+{ 610, 3243186948u, 1617573614u, 3201863123u, 3090723732u, 1072690054u, 2844567634u, 0, COS_TOLERANCE, 0},
+{ 611, 3233201380u, 679893506u, 3211547753u, 824081024u, 3219939961u, 2810857343u, 0, COS_TOLERANCE, 0},
+{ 612, 1089530525u, 2285242807u, 1084999409u, 2221731406u, 1071368057u, 1426300390u, 0, COS_TOLERANCE, 0},
+{ 613, 3206733664u, 1935990727u, 1088822246u, 1058156518u, 1072693247u, 4201598491u, 0, COS_TOLERANCE, 0},
+{ 614, 1102839166u, 521023584u, 1059186903u, 4245163857u, 3220149846u, 3786871735u, 0, COS_TOLERANCE, 0},
+{ 615, 1103891140u, 2312887617u, 3191771354u, 1885370807u, 1072693088u, 1521437248u, 0, COS_TOLERANCE, 0},
+{ 616, 3252953815u, 1796441468u, 1100030327u, 2772711004u, 3219885770u, 1681306400u, 0, COS_TOLERANCE, 0},
+{ 617, 3204276820u, 2095685003u, 1077984448u, 2100773742u, 1072693247u, 4291430705u, 0, COS_TOLERANCE, 0},
+{ 618, 3192954620u, 2892538035u, 1042396334u, 4162200338u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
+{ 619, 3242725751u, 2177698116u, 3227557177u, 150832500u, 3220168457u, 3307824821u, 0, COS_TOLERANCE, 0},
+{ 620, 3191562216u, 607966734u, 3236250630u, 4164600559u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 621, 3216389812u, 2830122967u, 1046096700u, 3713346883u, 1072685357u, 3355578451u, 0, COS_TOLERANCE, 0},
+{ 622, 3237197963u, 2314640506u, 3203696416u, 3276228872u, 1072684594u, 3660350689u, 0, COS_TOLERANCE, 0},
+{ 623, 3212912307u, 469331883u, 3249037349u, 2999233437u, 1072693174u, 1974686405u, 0, COS_TOLERANCE, 0},
+{ 624, 1097382011u, 560886625u, 1091899487u, 748795120u, 1072341321u, 1561640432u, 0, COS_TOLERANCE, 0},
+{ 625, 1049886858u, 2958421324u, 1092569414u, 3235243477u, 1072693247u, 4294966896u, 0, COS_TOLERANCE, 0},
+{ 626, 3193026497u, 3221475559u, 1043038304u, 915608434u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
+{ 627, 1071197530u, 3007808652u, 3216682290u, 2531019474u, 1072533054u, 1184989401u, 0, COS_TOLERANCE, 0},
+{ 628, 3242028999u, 1767658578u, 3237045269u, 2313128318u, 3215226551u, 294612205u, 0, COS_TOLERANCE, 0},
+{ 629, 3210617892u, 1926845182u, 1066835624u, 1783256828u, 1072693244u, 1937927066u, 0, COS_TOLERANCE, 0},
+{ 630, 1040575629u, 90378038u, 1057168870u, 164358218u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 631, 1106859172u, 1610524680u, 1085283851u, 2903496007u, 3219904172u, 2335619660u, 0, COS_TOLERANCE, 0},
+{ 632, 1078635586u, 4274321404u, 3202913591u, 720121831u, 3220172959u, 2167800746u, 0, COS_TOLERANCE, 0},
+{ 633, 1051205256u, 2034778236u, 1071133763u, 1413236391u, 1072693247u, 4294964969u, 0, COS_TOLERANCE, 0},
+{ 634, 1051063028u, 1489112261u, 1076691395u, 348210906u, 1072693247u, 4294965369u, 0, COS_TOLERANCE, 0},
+{ 635, 3206743917u, 2797651324u, 3224410527u, 2374818327u, 1072693247u, 4200044040u, 0, COS_TOLERANCE, 0},
+{ 636, 1088287256u, 1823161666u, 3197810695u, 3119680047u, 3219677965u, 2997914837u, 0, COS_TOLERANCE, 0},
+{ 637, 1065927336u, 3420950657u, 1087084743u, 2136638961u, 1072693094u, 3146758615u, 0, COS_TOLERANCE, 0},
+{ 638, 1069902224u, 3554566429u, 1062907717u, 2736702589u, 1072663973u, 178834935u, 0, COS_TOLERANCE, 0},
+{ 639, 3244888667u, 2928437580u, 3187765027u, 1393427873u, 3220173429u, 1922306944u, 0, COS_TOLERANCE, 0},
+{ 640, 3209301561u, 189447067u, 1051643315u, 828663513u, 1072693247u, 1447487601u, 0, COS_TOLERANCE, 0},
+{ 641, 1052313869u, 2852350928u, 1045683757u, 673354280u, 1072693247u, 4294957268u, 0, COS_TOLERANCE, 0},
+{ 642, 1043946301u, 3589563265u, 3248741629u, 812657927u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 643, 3190610826u, 1766416701u, 1100392103u, 2185373290u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 644, 3220275389u, 3763582673u, 3191965790u, 388374829u, 1071472690u, 1891493224u, 0, COS_TOLERANCE, 0},
+{ 645, 1079635136u, 1187403069u, 1075300235u, 336640304u, 3220176149u, 3234833894u, 0, COS_TOLERANCE, 0},
+{ 646, 1103926251u, 1718795752u, 3243118752u, 683369237u, 3219779573u, 3806121574u, 0, COS_TOLERANCE, 0},
+{ 647, 3210792097u, 1863545307u, 1069449477u, 3418627399u, 1072693243u, 2535529384u, 0, COS_TOLERANCE, 0},
+{ 648, 1069601294u, 3295607249u, 1068878592u, 1633297809u, 1072675166u, 2110076227u, 0, COS_TOLERANCE, 0},
+{ 649, 1058947127u, 2585980994u, 3236670483u, 1286750688u, 1072693247u, 4234994396u, 0, COS_TOLERANCE, 0},
+{ 650, 1046157033u, 15816845u, 3233249283u, 2491924775u, 1072693247u, 4294967293u, 0, COS_TOLERANCE, 0},
+{ 651, 1042413021u, 1051983351u, 1049180786u, 1474421917u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 652, 3201249525u, 2003816032u, 1086050104u, 668090487u, 1072693247u, 4294905031u, 0, COS_TOLERANCE, 0},
+{ 653, 1052556037u, 3671484625u, 1067020039u, 430024694u, 1072693247u, 4294954089u, 0, COS_TOLERANCE, 0},
+{ 654, 1067397110u, 3991830201u, 3207808714u, 1021245839u, 1072692275u, 1819605250u, 0, COS_TOLERANCE, 0},
+{ 655, 1064194391u, 4255801807u, 3207681716u, 1926756877u, 1072693233u, 2740400643u, 0, COS_TOLERANCE, 0},
+{ 656, 1052140785u, 4167786896u, 1077097744u, 1775517981u, 1072693247u, 4294959272u, 0, COS_TOLERANCE, 0},
+{ 657, 1085601978u, 3187518564u, 1082437406u, 944672491u, 3220110458u, 913134978u, 0, COS_TOLERANCE, 0},
+{ 658, 1049366282u, 953085192u, 3227310828u, 3459155777u, 1072693247u, 4294967099u, 0, COS_TOLERANCE, 0},
+{ 659, 1069502506u, 1908555460u, 1073640207u, 260441967u, 1072677579u, 1454510592u, 0, COS_TOLERANCE, 0},
+{ 660, 1067219606u, 250762477u, 1072582645u, 2886742039u, 1072692437u, 31148257u, 0, COS_TOLERANCE, 0},
+{ 661, 3250906006u, 786180031u, 3197734769u, 2788918312u, 1072326482u, 1005490298u, 0, COS_TOLERANCE, 0},
+{ 662, 3234511827u, 2055912467u, 3244244909u, 1394142937u, 3220102579u, 286327760u, 0, COS_TOLERANCE, 0},
+{ 663, 1069612985u, 91984146u, 3222252812u, 4126276047u, 1072674781u, 2240078613u, 0, COS_TOLERANCE, 0},
+{ 664, 1081340139u, 3942715706u, 3239316352u, 410676547u, 1070049772u, 3039431038u, 0, COS_TOLERANCE, 0},
+{ 665, 3198557846u, 86296211u, 1085850694u, 649202596u, 1072693247u, 4294965339u, 0, COS_TOLERANCE, 0},
+{ 666, 3245366392u, 3069064472u, 3237358008u, 23209276u, 1072495724u, 3575339626u, 0, COS_TOLERANCE, 0},
+{ 667, 1081235288u, 1867297860u, 1072956607u, 2513414118u, 3218189572u, 1975036829u, 0, COS_TOLERANCE, 0},
+{ 668, 3250533347u, 3171788768u, 3235208783u, 162138697u, 1070382034u, 2139906112u, 0, COS_TOLERANCE, 0},
+{ 669, 1081728455u, 1245110700u, 1081653954u, 2584994077u, 1072012843u, 595067820u, 0, COS_TOLERANCE, 0},
+{ 670, 3245510120u, 3347226587u, 1058962932u, 2291943376u, 3220038529u, 1729582222u, 0, COS_TOLERANCE, 0},
+{ 671, 1058899062u, 966940828u, 1060726420u, 2798041096u, 1072693247u, 4237867181u, 0, COS_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1071465516u, 1993418532u, 0, COS_TOLERANCE, 0},
+{ 673, 3248116497u, 1671039260u, 1086395032u, 3745833360u, 1072592394u, 1092605516u, 0, COS_TOLERANCE, 0},
+{ 674, 1057078797u, 651714217u, 1047070645u, 2130549237u, 1072693247u, 4289809738u, 0, COS_TOLERANCE, 0},
+{ 675, 3207115731u, 1423000172u, 3247822717u, 1551488170u, 1072693247u, 4135004220u, 0, COS_TOLERANCE, 0},
+{ 676, 3201597307u, 921077236u, 3213332351u, 1431049019u, 1072693247u, 4294859733u, 0, COS_TOLERANCE, 0},
+{ 677, 1067510295u, 655715547u, 3190985373u, 1527556471u, 1072692103u, 3067599466u, 0, COS_TOLERANCE, 0},
+{ 678, 3227654979u, 4110878657u, 3251297180u, 879739345u, 1072574045u, 720418835u, 0, COS_TOLERANCE, 0},
+{ 679, 1085804762u, 2623955764u, 1093699897u, 1216444475u, 3220138856u, 1786848118u, 0, COS_TOLERANCE, 0},
+{ 680, 1091905603u, 107442539u, 3239767031u, 1149813329u, 3219851592u, 2118474530u, 0, COS_TOLERANCE, 0},
+{ 681, 3233445240u, 1761361082u, 3226030205u, 1121849716u, 1072652853u, 178221240u, 0, COS_TOLERANCE, 0},
+{ 682, 3240087115u, 2534144722u, 1044223733u, 3512285706u, 3216132876u, 902911402u, 0, COS_TOLERANCE, 0},
+{ 683, 3211846077u, 4073670723u, 1050729852u, 3034818849u, 1072693230u, 806668878u, 0, COS_TOLERANCE, 0},
+{ 684, 1101984574u, 1421423503u, 1060278048u, 1397153092u, 3219504796u, 3365923665u, 0, COS_TOLERANCE, 0},
+{ 685, 3217421829u, 1649206019u, 1104525577u, 1267104290u, 1072662457u, 1345840563u, 0, COS_TOLERANCE, 0},
+{ 686, 3189302097u, 3775270392u, 1040251850u, 68667319u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 687, 3204330900u, 3099226694u, 3254103006u, 4020102648u, 1072693247u, 4291229279u, 0, COS_TOLERANCE, 0},
+{ 688, 3201591712u, 3718441177u, 3215643451u, 4032951536u, 1072693247u, 4294860627u, 0, COS_TOLERANCE, 0},
+{ 689, 1044131371u, 508048351u, 3210196713u, 1707937896u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 690, 3198611627u, 2784738160u, 1073435430u, 1109346010u, 1072693247u, 4294965191u, 0, COS_TOLERANCE, 0},
+{ 691, 3225725290u, 3331916473u, 3238794568u, 2707019594u, 3219937123u, 2226610460u, 0, COS_TOLERANCE, 0},
+{ 692, 1093182670u, 3093165197u, 1072894805u, 2853215019u, 1072658626u, 3705768894u, 0, COS_TOLERANCE, 0},
+{ 693, 3216582139u, 2135797997u, 1048399559u, 2941926126u, 1072683137u, 376959074u, 0, COS_TOLERANCE, 0},
+{ 694, 1048430980u, 2083412145u, 3249335391u, 507212448u, 1072693247u, 4294967241u, 0, COS_TOLERANCE, 0},
+{ 695, 1075363751u, 4270176401u, 3246546709u, 3288753319u, 1072683587u, 2218972124u, 0, COS_TOLERANCE, 0},
+{ 696, 3247932863u, 3692175292u, 3197271515u, 3989064196u, 3217472000u, 1636461035u, 0, COS_TOLERANCE, 0},
+{ 697, 3251691738u, 3111924274u, 1066772558u, 59281695u, 3220096880u, 924173556u, 0, COS_TOLERANCE, 0},
+{ 698, 1067683911u, 2135245466u, 3208804313u, 3846547392u, 1072691717u, 1073276862u, 0, COS_TOLERANCE, 0},
+{ 699, 1094877811u, 972051266u, 3222814246u, 3539700586u, 3219298444u, 3078353466u, 0, COS_TOLERANCE, 0},
+{ 700, 3202965930u, 330951080u, 1079189813u, 583922384u, 1072693247u, 4294307614u, 0, COS_TOLERANCE, 0},
+{ 701, 1089640092u, 1711944085u, 1104170032u, 643991456u, 3218245979u, 1623606256u, 0, COS_TOLERANCE, 0},
+{ 702, 3234429549u, 2072550721u, 3250147641u, 4280263530u, 1071794324u, 38624345u, 0, COS_TOLERANCE, 0},
+{ 703, 3192972706u, 1566376352u, 1067251433u, 72984588u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
+{ 704, 1095276569u, 3103043079u, 1045853123u, 410067497u, 3219935193u, 2728293583u, 0, COS_TOLERANCE, 0},
+{ 705, 3216672493u, 1910366299u, 1081770885u, 634683073u, 1072681999u, 479245867u, 0, COS_TOLERANCE, 0},
+{ 706, 1081530688u, 2226525875u, 3224149290u, 2126302825u, 1071247416u, 1032109685u, 0, COS_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1069627701u, 3400212089u, 0, COS_TOLERANCE, 0},
+{ 708, 1066482943u, 1953339096u, 1077176252u, 1476516558u, 1072692950u, 3646272527u, 0, COS_TOLERANCE, 0},
+{ 709, 1066092000u, 1306277326u, 1079089150u, 4093716191u, 1072693062u, 211505646u, 0, COS_TOLERANCE, 0},
+{ 710, 3233148787u, 51750045u, 3242913901u, 4256866157u, 3217216280u, 1160993324u, 0, COS_TOLERANCE, 0},
+{ 711, 3195084967u, 2163853087u, 3232053146u, 2962422808u, 1072693247u, 4294967278u, 0, COS_TOLERANCE, 0},
+{ 712, 1075516945u, 1618388148u, 3233154824u, 3711953164u, 1072448092u, 4287528395u, 0, COS_TOLERANCE, 0},
+{ 713, 3246868002u, 357108214u, 3202294604u, 2306775262u, 1071938433u, 4284753744u, 0, COS_TOLERANCE, 0},
+{ 714, 3201904086u, 2571356437u, 3249064063u, 2394851808u, 1072693247u, 4294804996u, 0, COS_TOLERANCE, 0},
+{ 715, 3230488091u, 4273880094u, 1103698617u, 3578832032u, 3219842465u, 27990251u, 0, COS_TOLERANCE, 0},
+{ 716, 3233426701u, 2091068742u, 3228270226u, 3980489730u, 3220175570u, 3118267747u, 0, COS_TOLERANCE, 0},
+{ 717, 3229016752u, 2772307714u, 1051008486u, 32546576u, 3217423140u, 1796767464u, 0, COS_TOLERANCE, 0},
+{ 718, 3241229215u, 2143788498u, 3195498043u, 3630119231u, 3218494133u, 503382599u, 0, COS_TOLERANCE, 0},
+{ 719, 3198632935u, 2527385594u, 3240503648u, 3482095012u, 1072693247u, 4294965131u, 0, COS_TOLERANCE, 0},
+{ 720, 3242168799u, 2690097362u, 1068598730u, 2360266862u, 1071811769u, 2322679045u, 0, COS_TOLERANCE, 0},
+{ 721, 1058857869u, 2673272949u, 1082639557u, 522449749u, 1072693247u, 4240273089u, 0, COS_TOLERANCE, 0},
+{ 722, 1104424147u, 3596379400u, 3242016775u, 2002293002u, 3218990076u, 882873582u, 0, COS_TOLERANCE, 0},
+{ 723, 1099439656u, 4113224369u, 3222122439u, 2152316893u, 1072382483u, 2149265695u, 0, COS_TOLERANCE, 0},
+{ 724, 3220796716u, 31662602u, 1047721249u, 1747087514u, 3214199757u, 3014160204u, 0, COS_TOLERANCE, 0},
+{ 725, 3250463757u, 2489659568u, 1097051253u, 277506957u, 3219439509u, 846415884u, 0, COS_TOLERANCE, 0},
+{ 726, 3191401834u, 3850162281u, 3213841942u, 438724093u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 727, 1095392535u, 2431814052u, 1075518084u, 2672434118u, 3220176605u, 763316173u, 0, COS_TOLERANCE, 0},
+{ 728, 3243162735u, 391606792u, 1048184750u, 4168944276u, 3218801484u, 293093886u, 0, COS_TOLERANCE, 0},
+{ 729, 3247792416u, 457529672u, 3201090276u, 72407935u, 1070460862u, 3595673825u, 0, COS_TOLERANCE, 0},
+{ 730, 3218720719u, 3954981400u, 1052053242u, 2411049585u, 1072525389u, 3235166120u, 0, COS_TOLERANCE, 0},
+{ 731, 1086180091u, 485456950u, 1088415093u, 1655397424u, 1072048063u, 2287321430u, 0, COS_TOLERANCE, 0},
+{ 732, 3198234428u, 1551748070u, 3236871640u, 1329701152u, 1072693247u, 4294966115u, 0, COS_TOLERANCE, 0},
+{ 733, 3224639122u, 3099222537u, 1104984570u, 4293792842u, 1070915285u, 3906708154u, 0, COS_TOLERANCE, 0},
+{ 734, 3203949705u, 3603065260u, 3197735968u, 2402359253u, 1072693247u, 4292530155u, 0, COS_TOLERANCE, 0},
+{ 735, 3198824584u, 3961208159u, 3219057584u, 2340553876u, 1072693247u, 4294964552u, 0, COS_TOLERANCE, 0},
+{ 736, 1074881909u, 4014841779u, 3197672877u, 3697233334u, 3218521683u, 3115963704u, 0, COS_TOLERANCE, 0},
+{ 737, 3213275657u, 1403876392u, 3254028950u, 921363393u, 1072693119u, 989562508u, 0, COS_TOLERANCE, 0},
+{ 738, 1107251806u, 1862576361u, 3194031708u, 2476290925u, 1072692742u, 3651849297u, 0, COS_TOLERANCE, 0},
+{ 739, 1049661768u, 1454212851u, 1088378861u, 3400401866u, 1072693247u, 4294967022u, 0, COS_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 3220160068u, 1645620146u, 0, COS_TOLERANCE, 0},
+{ 741, 3216409282u, 1199568671u, 3225679997u, 46947405u, 1072685145u, 1982517232u, 0, COS_TOLERANCE, 0},
+{ 742, 1077685537u, 2596231448u, 3253943728u, 2219151748u, 3220166825u, 1507155374u, 0, COS_TOLERANCE, 0},
+{ 743, 1066527035u, 4119719558u, 3222036299u, 1275474618u, 1072692927u, 866333980u, 0, COS_TOLERANCE, 0},
+{ 744, 3239908663u, 3347296825u, 1101507910u, 1254014794u, 3219483088u, 312673935u, 0, COS_TOLERANCE, 0},
+{ 745, 1084119992u, 673775040u, 1070743626u, 244126093u, 1069712823u, 2081579337u, 0, COS_TOLERANCE, 0},
+{ 746, 3203199850u, 1832066983u, 1051358028u, 3262483417u, 1072693247u, 4294109029u, 0, COS_TOLERANCE, 0},
+{ 747, 1077559600u, 3962610501u, 3198598777u, 849269178u, 1071367684u, 3164827138u, 0, COS_TOLERANCE, 0},
+{ 748, 3235473900u, 2497516122u, 3254374111u, 2821429629u, 1070842357u, 830343203u, 0, COS_TOLERANCE, 0},
+{ 749, 1076236288u, 2805941787u, 3217785843u, 779131141u, 1067598783u, 2114613609u, 0, COS_TOLERANCE, 0},
+{ 750, 3226908686u, 723423605u, 1084533420u, 627282213u, 3220121516u, 1226468903u, 0, COS_TOLERANCE, 0},
+{ 751, 3215947680u, 4292778869u, 1078101071u, 1676860147u, 1072689288u, 2072776390u, 0, COS_TOLERANCE, 0},
+{ 752, 1076288502u, 3528118587u, 3194648564u, 2363260897u, 1071311403u, 428792898u, 0, COS_TOLERANCE, 0},
+{ 753, 3192897879u, 1307010018u, 1061248120u, 1468743108u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
+{ 754, 3246583139u, 107905661u, 3226089788u, 1943427674u, 1070106130u, 186093997u, 0, COS_TOLERANCE, 0},
+{ 755, 3188230541u, 760006940u, 1054265604u, 1749976597u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 756, 3237773384u, 2787503556u, 1081282610u, 1195841206u, 1071653293u, 2890745849u, 0, COS_TOLERANCE, 0},
+{ 757, 3191802156u, 545462045u, 3208381743u, 1981311808u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 758, 1061232136u, 3657978397u, 1104463616u, 3501253426u, 1072693247u, 3066024794u, 0, COS_TOLERANCE, 0},
+{ 759, 1049883857u, 1804177501u, 3210693633u, 3606766729u, 1072693247u, 4294966898u, 0, COS_TOLERANCE, 0},
+{ 760, 1076856879u, 1336278526u, 1043741618u, 3165279431u, 3220173366u, 3524098048u, 0, COS_TOLERANCE, 0},
+{ 761, 1055471915u, 1599382075u, 1058018527u, 4212580517u, 1072693247u, 4294315811u, 0, COS_TOLERANCE, 0},
+{ 762, 3207502326u, 3007589929u, 3202026547u, 2792028313u, 1072693247u, 4049483350u, 0, COS_TOLERANCE, 0},
+{ 763, 3253082770u, 1866066996u, 1060329048u, 3727175322u, 1072075197u, 4117100839u, 0, COS_TOLERANCE, 0},
+{ 764, 3198416643u, 150890940u, 1056025306u, 3082724735u, 1072693247u, 4294965702u, 0, COS_TOLERANCE, 0},
+{ 765, 1062008939u, 80400395u, 1093584426u, 3478941315u, 1072693247u, 774759105u, 0, COS_TOLERANCE, 0},
+{ 766, 3251640614u, 4050954182u, 3219263194u, 2537475930u, 3220163144u, 1526664806u, 0, COS_TOLERANCE, 0},
+{ 767, 1064841871u, 2881752155u, 3212589299u, 2559651278u, 1072693211u, 1740123982u, 0, COS_TOLERANCE, 0},
+{ 768, 3249016304u, 440309030u, 3214267461u, 3788040806u, 1072432298u, 4033522608u, 0, COS_TOLERANCE, 0},
+{ 769, 1100476615u, 918813144u, 3208535698u, 1607035904u, 1071075046u, 3768110943u, 0, COS_TOLERANCE, 0},
+{ 770, 1042137451u, 2497054124u, 1089139147u, 2549609010u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 771, 1047037641u, 790219083u, 1054657139u, 2797979479u, 1072693247u, 4294967287u, 0, COS_TOLERANCE, 0},
+{ 772, 1057781400u, 1149462078u, 1095765205u, 3879963182u, 1072693247u, 4281693680u, 0, COS_TOLERANCE, 0},
+{ 773, 3202729813u, 2684353926u, 3205212854u, 1732474928u, 1072693247u, 4294481603u, 0, COS_TOLERANCE, 0},
+{ 774, 1095236965u, 2742237025u, 1051317716u, 3386396147u, 1072584987u, 1443922753u, 0, COS_TOLERANCE, 0},
+{ 775, 1063230986u, 3408320912u, 1103071166u, 4233059513u, 1072693244u, 408413646u, 0, COS_TOLERANCE, 0},
+{ 776, 1064863548u, 1077495917u, 1088399968u, 433115118u, 1072693210u, 1708888818u, 0, COS_TOLERANCE, 0},
+{ 777, 3204547572u, 841366493u, 1051716814u, 4121125128u, 1072693247u, 4289940835u, 0, COS_TOLERANCE, 0},
+{ 778, 1064632084u, 321857207u, 1089128010u, 1149988239u, 1072693220u, 1919890503u, 0, COS_TOLERANCE, 0},
+{ 779, 3245542663u, 799866606u, 3197637091u, 3924438208u, 1072693235u, 2830234323u, 0, COS_TOLERANCE, 0},
+{ 780, 3191062890u, 2002049816u, 1077053447u, 2240354761u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 781, 3229006283u, 478939968u, 1097035749u, 1066716440u, 1072038033u, 1963592798u, 0, COS_TOLERANCE, 0},
+{ 782, 3232473641u, 1653104725u, 1088548129u, 81977716u, 1072564300u, 3577222580u, 0, COS_TOLERANCE, 0},
+{ 783, 3196861276u, 3899475018u, 3189694084u, 3330093036u, 1072693247u, 4294967097u, 0, COS_TOLERANCE, 0},
+{ 784, 1089312583u, 2612450289u, 1079065127u, 603380842u, 1071874137u, 2730682483u, 0, COS_TOLERANCE, 0},
+{ 785, 1100636791u, 3962735564u, 1101570429u, 1372490825u, 3219484451u, 3424147024u, 0, COS_TOLERANCE, 0},
+{ 786, 1054806016u, 1479841439u, 1059312257u, 541504905u, 1072693247u, 4294720287u, 0, COS_TOLERANCE, 0},
+{ 787, 1078662178u, 2626148789u, 1057571099u, 4121656076u, 3219613876u, 1330361278u, 0, COS_TOLERANCE, 0},
+{ 788, 1081613389u, 1902560314u, 1043130231u, 3557671562u, 3219753066u, 412003789u, 0, COS_TOLERANCE, 0},
+{ 789, 3193829772u, 41779312u, 1081626342u, 831171823u, 1072693247u, 4294967292u, 0, COS_TOLERANCE, 0},
+{ 790, 1058131100u, 1393168821u, 1066457405u, 1381616968u, 1072693247u, 4274204595u, 0, COS_TOLERANCE, 0},
+{ 791, 1072338141u, 3756584649u, 3222267229u, 1423157432u, 1072010372u, 1965542879u, 0, COS_TOLERANCE, 0},
+{ 792, 3254435674u, 1894912556u, 1042426694u, 155024547u, 3220102417u, 3146936854u, 0, COS_TOLERANCE, 0},
+{ 793, 3195453512u, 35164295u, 3203391785u, 1037041084u, 1072693247u, 4294967264u, 0, COS_TOLERANCE, 0},
+{ 794, 1084777479u, 3957875950u, 3232195211u, 1590756436u, 1072162155u, 3181474338u, 0, COS_TOLERANCE, 0},
+{ 795, 1068844322u, 1447585080u, 1071279485u, 1107922438u, 1072686013u, 2230343919u, 0, COS_TOLERANCE, 0},
+{ 796, 1046252518u, 981897615u, 1051856116u, 430357614u, 1072693247u, 4294967293u, 0, COS_TOLERANCE, 0},
+{ 797, 3227524215u, 395145384u, 3219821938u, 50586510u, 3220169459u, 2232263137u, 0, COS_TOLERANCE, 0},
+{ 798, 1069775912u, 750827797u, 1082862669u, 230466783u, 1072668996u, 1466987893u, 0, COS_TOLERANCE, 0},
+{ 799, 1086668819u, 1365083575u, 3204848310u, 1700831722u, 3219517257u, 2508901127u, 0, COS_TOLERANCE, 0},
+{ 800, 3218090390u, 344241827u, 1071538935u, 2715566077u, 1072626729u, 591520264u, 0, COS_TOLERANCE, 0},
+{ 801, 3247582856u, 4069301823u, 3193208760u, 2949125229u, 1071869692u, 3800681525u, 0, COS_TOLERANCE, 0},
+{ 802, 1103231387u, 3585711710u, 1065801594u, 2302229267u, 1071848763u, 1111779157u, 0, COS_TOLERANCE, 0},
+{ 803, 3194118956u, 709803845u, 1048741487u, 2296910194u, 1072693247u, 4294967291u, 0, COS_TOLERANCE, 0},
+{ 804, 3193280779u, 744421179u, 1069302001u, 2659232829u, 1072693247u, 4294967294u, 0, COS_TOLERANCE, 0},
+{ 805, 1092835968u, 1799949903u, 3192522886u, 4212149209u, 3217478798u, 567039304u, 0, COS_TOLERANCE, 0},
+{ 806, 3206108502u, 145234164u, 3250614064u, 912384201u, 1072693247u, 4252907712u, 0, COS_TOLERANCE, 0},
+{ 807, 3240510664u, 2784620507u, 1102812948u, 3531481022u, 3219875171u, 1925983410u, 0, COS_TOLERANCE, 0},
+{ 808, 3251159663u, 383952592u, 3205659905u, 3633194728u, 3219300930u, 1175187344u, 0, COS_TOLERANCE, 0},
+{ 809, 3203476252u, 3792395543u, 1070072378u, 3864816376u, 1072693247u, 4293759982u, 0, COS_TOLERANCE, 0},
+{ 810, 3205316273u, 2115553675u, 1066288499u, 3538377867u, 1072693247u, 4280954652u, 0, COS_TOLERANCE, 0},
+{ 811, 3252075185u, 1230026762u, 1090719723u, 440819880u, 1071705879u, 410002001u, 0, COS_TOLERANCE, 0},
+{ 812, 3194595076u, 2991290482u, 1096886719u, 1097971167u, 1072693247u, 4294967286u, 0, COS_TOLERANCE, 0},
+{ 813, 1090048600u, 1098035020u, 3230900504u, 1479059095u, 1070691609u, 1556386840u, 0, COS_TOLERANCE, 0},
+{ 814, 3251056964u, 1719428427u, 3188631907u, 3707377409u, 3218182768u, 148649403u, 0, COS_TOLERANCE, 0},
+{ 815, 1053236165u, 3748932896u, 1084908557u, 1325384361u, 1072693247u, 4294933120u, 0, COS_TOLERANCE, 0},
+{ 816, 1084704076u, 3979168763u, 1057455255u, 2454615952u, 1072510630u, 1379118583u, 0, COS_TOLERANCE, 0},
+{ 817, 1053106984u, 1449164578u, 1056960316u, 1654931641u, 1072693247u, 4294938702u, 0, COS_TOLERANCE, 0},
+{ 818, 1071439010u, 2120487381u, 3226298974u, 2364226633u, 1072483587u, 4085640584u, 0, COS_TOLERANCE, 0},
+{ 819, 1075071428u, 1074268944u, 1065730444u, 280016852u, 1071023686u, 839317700u, 0, COS_TOLERANCE, 0},
+{ 820, 3200308256u, 3315127889u, 3236295594u, 2900924954u, 1072693247u, 4294949171u, 0, COS_TOLERANCE, 0},
+{ 821, 3196425891u, 2246037502u, 1049691002u, 1496066550u, 1072693247u, 4294967179u, 0, COS_TOLERANCE, 0},
+{ 822, 3193006859u, 4191285446u, 3217936236u, 2382392789u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
+{ 823, 1092833308u, 640099844u, 1042152237u, 2064279383u, 3219911263u, 3314302700u, 0, COS_TOLERANCE, 0},
+{ 824, 1079913438u, 3468560824u, 1093251038u, 310958750u, 1070649459u, 1482103661u, 0, COS_TOLERANCE, 0},
+{ 825, 1096788400u, 1413568905u, 1100941106u, 1627289946u, 1072194163u, 3665765707u, 0, COS_TOLERANCE, 0},
+{ 826, 3191549550u, 3797143370u, 3195497539u, 3843275034u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 827, 3252077393u, 2806642640u, 3201943068u, 2515980718u, 1072627981u, 3072040624u, 0, COS_TOLERANCE, 0},
+{ 828, 1086877316u, 632580632u, 1078673506u, 3259601317u, 1072072842u, 3802210842u, 0, COS_TOLERANCE, 0},
+{ 829, 3200980575u, 3309678799u, 1049337078u, 3056787074u, 1072693247u, 4294920337u, 0, COS_TOLERANCE, 0},
+{ 830, 3221495289u, 2341164249u, 1080834967u, 2810890005u, 3219778052u, 4039479565u, 0, COS_TOLERANCE, 0},
+{ 831, 1067019674u, 932124675u, 1093915797u, 662682630u, 1072692601u, 1903552662u, 0, COS_TOLERANCE, 0},
+{ 832, 3249230091u, 1367996113u, 3251723684u, 2974064663u, 3220162345u, 2971280959u, 0, COS_TOLERANCE, 0},
+{ 833, 1080230731u, 323437999u, 1090499064u, 901457511u, 1070643331u, 2801218782u, 0, COS_TOLERANCE, 0},
+{ 834, 3235778876u, 4184941840u, 3196770014u, 2458988443u, 1070379299u, 3057199715u, 0, COS_TOLERANCE, 0},
+{ 835, 1087618284u, 2023065054u, 3211994098u, 2734612965u, 1070619806u, 133610425u, 0, COS_TOLERANCE, 0},
+{ 836, 1064074694u, 3679267365u, 3237728785u, 1699558211u, 1072693235u, 1358669674u, 0, COS_TOLERANCE, 0},
+{ 837, 1088079010u, 1826799031u, 1078709629u, 3986905229u, 3220155790u, 45714209u, 0, COS_TOLERANCE, 0},
+{ 838, 1052843785u, 351061688u, 3194386466u, 4105857588u, 1072693247u, 4294948535u, 0, COS_TOLERANCE, 0},
+{ 839, 1054128006u, 1365244058u, 1064457319u, 1452191426u, 1072693247u, 4294857423u, 0, COS_TOLERANCE, 0},
+{ 840, 1064122385u, 2463030625u, 3215975031u, 3773488326u, 1072693234u, 2835341684u, 0, COS_TOLERANCE, 0},
+{ 841, 3251276671u, 752664055u, 1065110394u, 1835931663u, 1072606330u, 2168006594u, 0, COS_TOLERANCE, 0},
+{ 842, 1088045088u, 3496172149u, 1089617208u, 109068701u, 1071646891u, 3454715319u, 0, COS_TOLERANCE, 0},
+{ 843, 3198135087u, 1636966254u, 1086098766u, 2016598298u, 1072693247u, 4294966293u, 0, COS_TOLERANCE, 0},
+{ 844, 1050931318u, 3551516956u, 1097969102u, 1317953425u, 1072693247u, 4294965706u, 0, COS_TOLERANCE, 0},
+{ 845, 3229832217u, 2977627788u, 1045339018u, 516058480u, 3220026354u, 1801307080u, 0, COS_TOLERANCE, 0},
+{ 846, 3237408578u, 3901731263u, 3189566462u, 32272932u, 1072612586u, 1999902688u, 0, COS_TOLERANCE, 0},
+{ 847, 1077281796u, 1956025297u, 3246628529u, 3840733905u, 3220176264u, 1460906583u, 0, COS_TOLERANCE, 0},
+{ 848, 1099818036u, 561057891u, 3198494340u, 4271027193u, 3219706915u, 2487592168u, 0, COS_TOLERANCE, 0},
+{ 849, 3250929921u, 692989850u, 3242630588u, 2492225971u, 1071775653u, 3598656665u, 0, COS_TOLERANCE, 0},
+{ 850, 3205479397u, 3439913962u, 1067477011u, 2973333638u, 1072693247u, 4278467868u, 0, COS_TOLERANCE, 0},
+{ 851, 3213993989u, 877613377u, 1044917899u, 809672798u, 1072692936u, 1124230183u, 0, COS_TOLERANCE, 0},
+{ 852, 3222171454u, 905426932u, 1046417457u, 1086320855u, 3219732967u, 2366498859u, 0, COS_TOLERANCE, 0},
+{ 853, 3246346629u, 2645567288u, 1051258339u, 557182478u, 3218264361u, 925503775u, 0, COS_TOLERANCE, 0},
+{ 854, 3204057950u, 186287752u, 1061342054u, 4054003419u, 1072693247u, 4292188934u, 0, COS_TOLERANCE, 0},
+{ 855, 1097266673u, 3506889716u, 3243866036u, 519056371u, 1072524548u, 4130452916u, 0, COS_TOLERANCE, 0},
+{ 856, 1042654053u, 2171898436u, 3246911982u, 1091500784u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 857, 3243647673u, 368493885u, 3222871893u, 1419055230u, 3216262723u, 2584514122u, 0, COS_TOLERANCE, 0},
+{ 858, 1091950572u, 2010971245u, 3188804530u, 1518695799u, 1072003878u, 3484848839u, 0, COS_TOLERANCE, 0},
+{ 859, 3205426509u, 1239207795u, 1040192984u, 2199481342u, 1072693247u, 4279296379u, 0, COS_TOLERANCE, 0},
+{ 860, 3210978637u, 4264613432u, 3203460972u, 3558930895u, 1072693241u, 4163824395u, 0, COS_TOLERANCE, 0},
+{ 861, 1050299283u, 3772748958u, 3227667376u, 309688336u, 1072693247u, 4294966605u, 0, COS_TOLERANCE, 0},
+{ 862, 3230743041u, 1077949160u, 1075769893u, 2405271377u, 3220136004u, 1372765072u, 0, COS_TOLERANCE, 0},
+{ 863, 1091835152u, 3751608506u, 3232278094u, 930375071u, 3220132976u, 3623370703u, 0, COS_TOLERANCE, 0},
+{ 864, 3198617153u, 1518334131u, 3205247482u, 791756713u, 1072693247u, 4294965176u, 0, COS_TOLERANCE, 0},
+{ 865, 1047317453u, 2825203170u, 3245054001u, 1822981827u, 1072693247u, 4294967283u, 0, COS_TOLERANCE, 0},
+{ 866, 1100016363u, 514474738u, 1089072073u, 3300845441u, 3220150773u, 1241950753u, 0, COS_TOLERANCE, 0},
+{ 867, 3216391250u, 247369460u, 3197320093u, 687450958u, 1072685342u, 869228503u, 0, COS_TOLERANCE, 0},
+{ 868, 1104161422u, 2722237629u, 1058272368u, 90602316u, 1071768241u, 2917167493u, 0, COS_TOLERANCE, 0},
+{ 869, 3208098435u, 1845900544u, 3231520830u, 3389751458u, 1072693247u, 3706125946u, 0, COS_TOLERANCE, 0},
+{ 870, 3247535245u, 737689911u, 3195377751u, 3462616966u, 3219909935u, 25169281u, 0, COS_TOLERANCE, 0},
+{ 871, 3223538384u, 3620285831u, 1055501023u, 2708056059u, 3220125731u, 561009732u, 0, COS_TOLERANCE, 0},
+{ 872, 3219464996u, 4073430285u, 1056206159u, 172017902u, 1072252135u, 485800405u, 0, COS_TOLERANCE, 0},
+{ 873, 3212869638u, 2799176222u, 1052706894u, 4083892667u, 1072693179u, 4024516686u, 0, COS_TOLERANCE, 0},
+{ 874, 3202279557u, 1562351330u, 1069705601u, 1247765260u, 1072693247u, 4294722734u, 0, COS_TOLERANCE, 0},
+{ 875, 3232717299u, 51853475u, 3189080201u, 2783553144u, 3218702987u, 2062749856u, 0, COS_TOLERANCE, 0},
+{ 876, 3219454353u, 3851781549u, 3241598113u, 514064046u, 1072258643u, 3149220087u, 0, COS_TOLERANCE, 0},
+{ 877, 1100045965u, 934745487u, 3248182437u, 2798581921u, 1072649916u, 4210399008u, 0, COS_TOLERANCE, 0},
+{ 878, 3213082493u, 2948648757u, 3232177250u, 4278702895u, 1072693150u, 2167949766u, 0, COS_TOLERANCE, 0},
+{ 879, 1072485724u, 4259101461u, 1061606772u, 84229920u, 1071897988u, 2892918300u, 0, COS_TOLERANCE, 0},
+{ 880, 3198075559u, 3891230598u, 1095924595u, 3049217547u, 1072693247u, 4294966350u, 0, COS_TOLERANCE, 0},
+{ 881, 1077353053u, 3806018919u, 3243191216u, 280177341u, 3218889273u, 1541679478u, 0, COS_TOLERANCE, 0},
+{ 882, 1060624530u, 3900344258u, 1063647809u, 4206745890u, 1072693247u, 3698714150u, 0, COS_TOLERANCE, 0},
+{ 883, 3227707336u, 2126253040u, 3207248026u, 808507485u, 1072487400u, 2159060137u, 0, COS_TOLERANCE, 0},
+{ 884, 1086090317u, 3465685634u, 3230391053u, 3754958214u, 1072547244u, 3575258804u, 0, COS_TOLERANCE, 0},
+{ 885, 1102861084u, 461094531u, 1101110393u, 1316091396u, 3219644021u, 4014018646u, 0, COS_TOLERANCE, 0},
+{ 886, 1064980314u, 4197635149u, 1091873113u, 1240127141u, 1072693204u, 3164110352u, 0, COS_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 3220176737u, 383608412u, 0, COS_TOLERANCE, 0},
+{ 888, 3213429165u, 3744663425u, 3212482771u, 953662066u, 1072693091u, 1198201690u, 0, COS_TOLERANCE, 0},
+{ 889, 1085171305u, 3564196690u, 3228101916u, 904305212u, 3218446499u, 2064645583u, 0, COS_TOLERANCE, 0},
+{ 890, 1048333111u, 3566257266u, 3235138829u, 2734275140u, 1072693247u, 4294967246u, 0, COS_TOLERANCE, 0},
+{ 891, 3243948477u, 606044282u, 3241318094u, 2446416887u, 1072483229u, 3024937276u, 0, COS_TOLERANCE, 0},
+{ 892, 1041627284u, 2336116589u, 3197594053u, 2296925138u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 893, 1058567659u, 907670625u, 3240769036u, 1827119006u, 1072693247u, 4255755669u, 0, COS_TOLERANCE, 0},
+{ 894, 1044467183u, 2818710946u, 3246059905u, 553394170u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 895, 3189504094u, 4099522736u, 3232742168u, 3718083858u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 896, 1092371276u, 1059279404u, 1080245336u, 175941677u, 1071946968u, 3038643463u, 0, COS_TOLERANCE, 0},
+{ 897, 1105189691u, 1650862428u, 1061816101u, 1723201723u, 1072546853u, 2900471296u, 0, COS_TOLERANCE, 0},
+{ 898, 3239012814u, 2462163405u, 3218946201u, 3876535372u, 3219875653u, 324308466u, 0, COS_TOLERANCE, 0},
+{ 899, 1084392886u, 495844137u, 1073721460u, 772777946u, 3219129115u, 4204103924u, 0, COS_TOLERANCE, 0},
+{ 900, 1052415330u, 458757721u, 3245680321u, 3609892707u, 1072693247u, 4294955989u, 0, COS_TOLERANCE, 0},
+{ 901, 3193282956u, 2533012202u, 1079980803u, 3592268374u, 1072693247u, 4294967294u, 0, COS_TOLERANCE, 0},
+{ 902, 3203364780u, 4108274117u, 1063045844u, 571992389u, 1072693247u, 4293953329u, 0, COS_TOLERANCE, 0},
+{ 903, 1090567271u, 3541110973u, 1096296754u, 3118427427u, 3218286130u, 3681049170u, 0, COS_TOLERANCE, 0},
+{ 904, 3193980043u, 1213941007u, 1105433735u, 2172963370u, 1072693247u, 4294967292u, 0, COS_TOLERANCE, 0},
+{ 905, 1096853359u, 272190288u, 1095452370u, 4026581530u, 3219573393u, 1754602802u, 0, COS_TOLERANCE, 0},
+{ 906, 1095583909u, 2843638672u, 1100510986u, 3190536898u, 1068927336u, 2077295239u, 0, COS_TOLERANCE, 0},
+{ 907, 1083757094u, 2014317727u, 3247389683u, 2428462015u, 1071418891u, 3949394807u, 0, COS_TOLERANCE, 0},
+{ 908, 1093976717u, 688442200u, 1047852515u, 3035186380u, 3218438567u, 3315807290u, 0, COS_TOLERANCE, 0},
+{ 909, 1076664212u, 1010095511u, 3221288076u, 405287991u, 3217309822u, 2575252529u, 0, COS_TOLERANCE, 0},
+{ 910, 3252294615u, 2983070435u, 1089546472u, 2907918480u, 3218228705u, 3589822852u, 0, COS_TOLERANCE, 0},
+{ 911, 1082988121u, 81928569u, 1056007286u, 2740556321u, 1071928997u, 950952646u, 0, COS_TOLERANCE, 0},
+{ 912, 1041110867u, 2076689028u, 1081558619u, 3039159031u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 913, 1047307438u, 1376882094u, 3211003208u, 1296286481u, 1072693247u, 4294967283u, 0, COS_TOLERANCE, 0},
+{ 914, 1080114314u, 744133164u, 3200943494u, 955832216u, 1072574444u, 2611483025u, 0, COS_TOLERANCE, 0},
+{ 915, 3226290326u, 176522478u, 1069999908u, 2891249491u, 3218846532u, 839584632u, 0, COS_TOLERANCE, 0},
+{ 916, 1043564602u, 3685851715u, 3187829932u, 2363997529u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 917, 1040244055u, 3974431579u, 1052505165u, 2589067816u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 918, 3191496789u, 3819109588u, 1048561488u, 969143351u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 919, 1072639397u, 4246896124u, 1104584799u, 1940097860u, 1071774126u, 3327286031u, 0, COS_TOLERANCE, 0},
+{ 920, 1048038468u, 2228686199u, 3220231833u, 777624847u, 1072693247u, 4294967261u, 0, COS_TOLERANCE, 0},
+{ 921, 3231467306u, 4189906558u, 3203004203u, 854242364u, 1072635801u, 2738772612u, 0, COS_TOLERANCE, 0},
+{ 922, 1103910407u, 4089051094u, 3227282692u, 2693170723u, 1072289032u, 2913293455u, 0, COS_TOLERANCE, 0},
+{ 923, 1045883607u, 1278581412u, 3239296746u, 1774588717u, 1072693247u, 4294967294u, 0, COS_TOLERANCE, 0},
+{ 924, 3222372686u, 1794845306u, 1104879344u, 4135865182u, 3218414534u, 3610714925u, 0, COS_TOLERANCE, 0},
+{ 925, 1106449055u, 754938390u, 1061291430u, 2010786993u, 1071265111u, 1731432878u, 0, COS_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 3218175044u, 806346250u, 0, COS_TOLERANCE, 0},
+{ 927, 3231449194u, 567588900u, 3195452230u, 1421366017u, 1069959173u, 573109192u, 0, COS_TOLERANCE, 0},
+{ 928, 3225089755u, 2708717091u, 1071975971u, 1364590470u, 3218112486u, 3088949577u, 0, COS_TOLERANCE, 0},
+{ 929, 3252137283u, 3461956134u, 3207820115u, 1605709634u, 3219751105u, 1269198118u, 0, COS_TOLERANCE, 0},
+{ 930, 1065302996u, 1497124553u, 1051715442u, 916736957u, 1072693187u, 123521492u, 0, COS_TOLERANCE, 0},
+{ 931, 1058468363u, 834914365u, 1064667143u, 2839166298u, 1072693247u, 4260462906u, 0, COS_TOLERANCE, 0},
+{ 932, 1057279949u, 2139295776u, 1062816721u, 914592523u, 1072693247u, 4287870926u, 0, COS_TOLERANCE, 0},
+{ 933, 3189636931u, 851569132u, 1058503154u, 1399378677u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 934, 3233537697u, 3897202342u, 3245382590u, 246600375u, 3220170916u, 1054245121u, 0, COS_TOLERANCE, 0},
+{ 935, 3225460308u, 3620429520u, 1055627557u, 229305u, 3218059928u, 1414708102u, 0, COS_TOLERANCE, 0},
+{ 936, 1083958833u, 3641997865u, 3206673888u, 93720614u, 1071359590u, 2540863482u, 0, COS_TOLERANCE, 0},
+{ 937, 3227808435u, 32766320u, 1062084905u, 3668443038u, 1072641997u, 192284648u, 0, COS_TOLERANCE, 0},
+{ 938, 3223298996u, 2039713492u, 3248699388u, 1346210821u, 3215759704u, 503757072u, 0, COS_TOLERANCE, 0},
+{ 939, 1093050016u, 1335820726u, 3191756860u, 1808427032u, 3219084733u, 3748162632u, 0, COS_TOLERANCE, 0},
+{ 940, 1061442763u, 650692001u, 1103515670u, 2253348763u, 1072693247u, 2561215287u, 0, COS_TOLERANCE, 0},
+{ 941, 3191395187u, 2372623300u, 3210185343u, 3200572848u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 942, 1100796069u, 762317532u, 3194595095u, 3192607437u, 1071693271u, 4216870113u, 0, COS_TOLERANCE, 0},
+{ 943, 1062262701u, 217775356u, 3232827087u, 2969367386u, 1072693246u, 3830754275u, 0, COS_TOLERANCE, 0},
+{ 944, 1057172551u, 3621353969u, 1077994795u, 3873976266u, 1072693247u, 4288944491u, 0, COS_TOLERANCE, 0},
+{ 945, 1091301987u, 268372152u, 3221764390u, 3216978962u, 1072691551u, 1749079179u, 0, COS_TOLERANCE, 0},
+{ 946, 3246437611u, 142942404u, 1075322987u, 1746449109u, 1067877297u, 2819009254u, 0, COS_TOLERANCE, 0},
+{ 947, 1104006296u, 496534875u, 3254522293u, 2532372502u, 3219698150u, 64865468u, 0, COS_TOLERANCE, 0},
+{ 948, 3250225541u, 2999955409u, 3222793392u, 1868977643u, 3220149279u, 3918709218u, 0, COS_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 3220175164u, 3474645289u, 0, COS_TOLERANCE, 0},
+{ 950, 1068218799u, 73646871u, 3231442171u, 3711510104u, 1072690173u, 4193166006u, 0, COS_TOLERANCE, 0},
+{ 951, 1090483524u, 218135177u, 3198908856u, 3082199105u, 3220146837u, 3066547347u, 0, COS_TOLERANCE, 0},
+{ 952, 1068068480u, 1061628117u, 3248859043u, 86776158u, 1072690661u, 1965881568u, 0, COS_TOLERANCE, 0},
+{ 953, 3208484674u, 938869114u, 1087911145u, 2416710759u, 1072693247u, 3376814610u, 0, COS_TOLERANCE, 0},
+{ 954, 1095576832u, 2970853959u, 3239543429u, 1887505029u, 1072335093u, 1226745687u, 0, COS_TOLERANCE, 0},
+{ 955, 3237728787u, 1337895935u, 1076463812u, 1172733328u, 1070268616u, 1986930081u, 0, COS_TOLERANCE, 0},
+{ 956, 1049139928u, 1469010822u, 3229583535u, 551399515u, 1072693247u, 4294967145u, 0, COS_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 3219991316u, 2380401456u, 0, COS_TOLERANCE, 0},
+{ 958, 3242138780u, 2976596113u, 3192137295u, 3033242648u, 3220172732u, 172513277u, 0, COS_TOLERANCE, 0},
+{ 959, 1098698481u, 876810930u, 3197470945u, 2571587447u, 1071759494u, 3992980376u, 0, COS_TOLERANCE, 0},
+{ 960, 3241770810u, 4007797282u, 3225853845u, 4069319648u, 3217749279u, 4237776152u, 0, COS_TOLERANCE, 0},
+{ 961, 1047279982u, 3840538373u, 1043189552u, 3668774580u, 1072693247u, 4294967284u, 0, COS_TOLERANCE, 0},
+{ 962, 3217611704u, 200857661u, 3229758439u, 3359367736u, 1072653824u, 1586377961u, 0, COS_TOLERANCE, 0},
+{ 963, 3248797869u, 111868139u, 3227902082u, 2366064003u, 1067852060u, 2375960071u, 0, COS_TOLERANCE, 0},
+{ 964, 1044195166u, 3510904416u, 3222131653u, 3822770497u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 965, 3242675715u, 789151814u, 1099269239u, 2958956055u, 3219973609u, 4239809652u, 0, COS_TOLERANCE, 0},
+{ 966, 1084679320u, 722163228u, 1105524559u, 1534462169u, 3219527636u, 416062612u, 0, COS_TOLERANCE, 0},
+{ 967, 1046586062u, 2207037106u, 3208952465u, 1231254630u, 1072693247u, 4294967291u, 0, COS_TOLERANCE, 0},
+{ 968, 3197884060u, 3838689849u, 3198769679u, 1302617170u, 1072693247u, 4294966521u, 0, COS_TOLERANCE, 0},
+{ 969, 1085938906u, 2527556476u, 3240373426u, 124352692u, 1072479604u, 998241152u, 0, COS_TOLERANCE, 0},
+{ 970, 3199540805u, 3502371499u, 1043411944u, 4190072016u, 1072693247u, 4294960160u, 0, COS_TOLERANCE, 0},
+{ 971, 1064676142u, 1798470077u, 3200116917u, 3421833729u, 1072693218u, 2810393116u, 0, COS_TOLERANCE, 0},
+{ 972, 3193514956u, 3653237931u, 3204255012u, 3683870669u, 1072693247u, 4294967294u, 0, COS_TOLERANCE, 0},
+{ 973, 1053588582u, 376530104u, 1073853547u, 565755892u, 1072693247u, 4294915363u, 0, COS_TOLERANCE, 0},
+{ 974, 3242503851u, 558292492u, 1051772749u, 4267873474u, 3219791395u, 2281335438u, 0, COS_TOLERANCE, 0},
+{ 975, 3224772709u, 509637100u, 3212030069u, 215050379u, 3220157703u, 999072486u, 0, COS_TOLERANCE, 0},
+{ 976, 1092057101u, 3571665665u, 3188628584u, 757824767u, 3220124006u, 1346258070u, 0, COS_TOLERANCE, 0},
+{ 977, 3214799337u, 998858159u, 1063077962u, 436029885u, 1072692351u, 1558924925u, 0, COS_TOLERANCE, 0},
+{ 978, 3205946965u, 996300405u, 3193842624u, 80548098u, 1072693247u, 4260694082u, 0, COS_TOLERANCE, 0},
+{ 979, 3228848840u, 3876129407u, 3215332180u, 2226970413u, 1066642218u, 885348726u, 0, COS_TOLERANCE, 0},
+{ 980, 3237608953u, 200013509u, 3224552716u, 414878724u, 1070775919u, 3997910947u, 0, COS_TOLERANCE, 0},
+{ 981, 3230617093u, 309319541u, 1048979765u, 1261662434u, 3219998391u, 1479904630u, 0, COS_TOLERANCE, 0},
+{ 982, 1089252639u, 4062255924u, 3224274128u, 4289485681u, 1072688786u, 2112803723u, 0, COS_TOLERANCE, 0},
+{ 983, 3236136084u, 1611969213u, 1053890378u, 3774617276u, 1071749943u, 2880945849u, 0, COS_TOLERANCE, 0},
+{ 984, 1080412763u, 1752164782u, 3239587974u, 612223386u, 3215050687u, 3711582370u, 0, COS_TOLERANCE, 0},
+{ 985, 1041545782u, 2024044989u, 1074932678u, 3259111307u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
+{ 986, 1053207518u, 2564965629u, 1093571065u, 169360454u, 1072693247u, 4294934401u, 0, COS_TOLERANCE, 0},
+{ 987, 1089599090u, 1860101737u, 3191222372u, 1676437468u, 1071819589u, 759885329u, 0, COS_TOLERANCE, 0},
+{ 988, 1059802968u, 588387057u, 3192103292u, 2495288012u, 1072693247u, 4099451717u, 0, COS_TOLERANCE, 0},
+{ 989, 3193155705u, 659070058u, 1073095700u, 1393632068u, 1072693247u, 4294967294u, 0, COS_TOLERANCE, 0},
+{ 990, 3217683263u, 4276187829u, 3217553330u, 1868253275u, 1072650297u, 34563883u, 0, COS_TOLERANCE, 0},
+{ 991, 3223220272u, 2085481575u, 3215994784u, 800910002u, 1070528947u, 553485972u, 0, COS_TOLERANCE, 0},
+{ 992, 1056934836u, 1950570756u, 3200582211u, 941022151u, 1072693247u, 4290891233u, 0, COS_TOLERANCE, 0},
+{ 993, 1057530368u, 2075610870u, 3250142022u, 3605152103u, 1072693247u, 4285025881u, 0, COS_TOLERANCE, 0},
+{ 994, 3200839250u, 3792931748u, 3204857863u, 804393211u, 1072693247u, 4294927517u, 0, COS_TOLERANCE, 0},
+{ 995, 3253646370u, 3430071177u, 3226288311u, 3652522729u, 3216626144u, 1955101016u, 0, COS_TOLERANCE, 0},
+{ 996, 3201314702u, 236884699u, 3227874605u, 2193269825u, 1072693247u, 4294900229u, 0, COS_TOLERANCE, 0},
+{ 997, 1064936593u, 2744231849u, 1046186036u, 771053722u, 1072693206u, 3877961227u, 0, COS_TOLERANCE, 0},
+{ 998, 1083996036u, 3000189819u, 1096500901u, 2057239777u, 1072631052u, 3150737220u, 0, COS_TOLERANCE, 0},
+{ 999, 1093835581u, 205759408u, 3244643377u, 2702292618u, 1070705706u, 1138580641u, 0, COS_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_COS_H multiple inclusion protection
+
+// EOF cos.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/cosh.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/cosh.c
new file mode 100644
index 0000000000..c28d563b02
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/cosh.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// cosh.c
+//
+// Test of cosh() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/cosh.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(cosh_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &cosh, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_NONE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &cosh_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("cosh() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("cosh() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library cosh() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "cosh() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF cosh.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/cosh.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/cosh.h
new file mode 100644
index 0000000000..f5284e0a1c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/cosh.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_COSH_H
+#define CYGONCE_LIBM_COSH_H
+//===========================================================================
+//
+// cosh.h
+//
+// Test vectors for testing of cosh() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/cosh.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define COSH_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t cosh_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1074853420u, 2506787616u, 1090024059u, 3619148316u, 1078025426u, 969469392u, 0, COSH_TOLERANCE, 0},
+{ 2, 3220250806u, 3176730980u, 1051524793u, 2993920299u, 1073353662u, 1862384311u, 0, COSH_TOLERANCE, 0},
+{ 3, 3226028315u, 2725707538u, 3232101343u, 2346810316u, 1148131614u, 3406370818u, 0, COSH_TOLERANCE, 0},
+{ 4, 1078922874u, 2088062470u, 3201242716u, 420891118u, 1165520069u, 2120331304u, 0, COSH_TOLERANCE, 0},
+{ 5, 3221200677u, 2636405208u, 1100049309u, 471635570u, 1074621306u, 1840668058u, 0, COSH_TOLERANCE, 0},
+{ 6, 1077828855u, 1746012320u, 1054478713u, 3333988501u, 1117516582u, 699114409u, 0, COSH_TOLERANCE, 0},
+{ 7, 1066827528u, 183014794u, 3202039382u, 2016785810u, 1072693501u, 214984896u, 0, COSH_TOLERANCE, 0},
+{ 8, 3219777490u, 2688957927u, 1046089230u, 2709029994u, 1073056030u, 1838945346u, 0, COSH_TOLERANCE, 0},
+{ 9, 1070330066u, 624574473u, 1045840574u, 3473266330u, 1072718329u, 916151728u, 0, COSH_TOLERANCE, 0},
+{ 10, 3217502754u, 1605286142u, 1068931671u, 4233776869u, 1072710512u, 2874087843u, 0, COSH_TOLERANCE, 0},
+{ 11, 1069780594u, 1857607719u, 3222889559u, 3417070006u, 1072705510u, 1532142699u, 0, COSH_TOLERANCE, 0},
+{ 12, 1081579891u, 3981151660u, 1088899021u, 1332651746u, 1642782946u, 1345086100u, 0, COSH_TOLERANCE, 0},
+{ 13, 1075860838u, 3824988054u, 1066856791u, 2070129652u, 1083933725u, 2536695545u, 0, COSH_TOLERANCE, 0},
+{ 14, 3218045550u, 1372884064u, 1080833116u, 3229926662u, 1072725116u, 1230358004u, 0, COSH_TOLERANCE, 0},
+{ 15, 1078097861u, 3217805330u, 3191644264u, 2014578707u, 1127449977u, 1807458751u, 0, COSH_TOLERANCE, 0},
+{ 16, 1080267391u, 265058758u, 3239903247u, 1630600647u, 1308474718u, 1523986687u, 0, COSH_TOLERANCE, 0},
+{ 17, 1073221381u, 1946677669u, 3198462609u, 926009897u, 1073930690u, 1965098529u, 0, COSH_TOLERANCE, 0},
+{ 18, 1073178875u, 2271884183u, 3203741999u, 2118617783u, 1073886257u, 3027131755u, 0, COSH_TOLERANCE, 0},
+{ 19, 3214772053u, 213658772u, 3249401130u, 314151656u, 1072693684u, 2346214u, 0, COSH_TOLERANCE, 0},
+{ 20, 3228946464u, 1564829925u, 3197817016u, 497230814u, 1599525087u, 3665494831u, 0, COSH_TOLERANCE, 0},
+{ 21, 3219408362u, 2075329122u, 3231746400u, 169900577u, 1072910812u, 2781323759u, 0, COSH_TOLERANCE, 0},
+{ 22, 1067674434u, 541549344u, 1096608669u, 3119070100u, 1072694002u, 1218945670u, 0, COSH_TOLERANCE, 0},
+{ 23, 1075989871u, 567496114u, 1045286891u, 1969998540u, 1085434125u, 3238675061u, 0, COSH_TOLERANCE, 0},
+{ 24, 1069985379u, 1299369769u, 1049342524u, 4167404066u, 1072709753u, 436121612u, 0, COSH_TOLERANCE, 0},
+{ 25, 3218302829u, 3348930841u, 1078472138u, 358457347u, 1072741812u, 1512364096u, 0, COSH_TOLERANCE, 0},
+{ 26, 1073166449u, 2192461366u, 1099527247u, 3184735642u, 1073873641u, 4040593230u, 0, COSH_TOLERANCE, 0},
+{ 27, 1068590412u, 331696577u, 3189610016u, 793242270u, 1072695669u, 3489656380u, 0, COSH_TOLERANCE, 0},
+{ 28, 3229460262u, 2322696981u, 1083791358u, 3020766674u, 1789286809u, 4287903039u, 0, COSH_TOLERANCE, 0},
+{ 29, 1066922273u, 252085215u, 3214426435u, 4139068910u, 1072693534u, 2665457975u, 0, COSH_TOLERANCE, 0},
+{ 30, 3221457149u, 105589263u, 1056316170u, 261630827u, 1075259864u, 1375611334u, 0, COSH_TOLERANCE, 0},
+{ 31, 1082047584u, 428765703u, 3251828686u, 2009972239u, 1815498097u, 3462966019u, 0, COSH_TOLERANCE, 0},
+{ 32, 1079693651u, 3517376586u, 3240257920u, 3304487302u, 1233851281u, 1250614638u, 0, COSH_TOLERANCE, 0},
+{ 33, 3224100728u, 237004814u, 3237899261u, 3364008659u, 1092696187u, 168267900u, 0, COSH_TOLERANCE, 0},
+{ 34, 3214121920u, 472004928u, 3226869477u, 1186387580u, 1072693440u, 1076112274u, 0, COSH_TOLERANCE, 0},
+{ 35, 1068906914u, 4085763910u, 1106394906u, 2684738273u, 1072697202u, 594398828u, 0, COSH_TOLERANCE, 0},
+{ 36, 1069636551u, 2055490142u, 3231581370u, 3879040079u, 1072702904u, 4128087196u, 0, COSH_TOLERANCE, 0},
+{ 37, 3213093895u, 3725731239u, 1061652681u, 591292963u, 1072693297u, 2624770646u, 0, COSH_TOLERANCE, 0},
+{ 38, 3221869253u, 1147041027u, 3215417793u, 624695933u, 1076446275u, 1285958834u, 0, COSH_TOLERANCE, 0},
+{ 39, 3217587110u, 705725219u, 3238067573u, 1116238321u, 1072712487u, 3913803238u, 0, COSH_TOLERANCE, 0},
+{ 40, 3217852848u, 7287411u, 1045917232u, 116067742u, 1072719417u, 863220422u, 0, COSH_TOLERANCE, 0},
+{ 41, 3226423734u, 3604989074u, 1066381836u, 545298780u, 1166321280u, 3198996771u, 0, COSH_TOLERANCE, 0},
+{ 42, 3221178088u, 1681476121u, 1060345752u, 3553822398u, 1074581780u, 785211380u, 0, COSH_TOLERANCE, 0},
+{ 43, 1080811562u, 3410480388u, 1052460275u, 1660607230u, 1408926430u, 2715754844u, 0, COSH_TOLERANCE, 0},
+{ 44, 1077682533u, 1494984673u, 3196647153u, 287894723u, 1114110585u, 2741076212u, 0, COSH_TOLERANCE, 0},
+{ 45, 1068516615u, 644548665u, 1081948134u, 2442134629u, 1072695366u, 1384821396u, 0, COSH_TOLERANCE, 0},
+{ 46, 1077068335u, 2312530895u, 3221584595u, 3379665576u, 1100002913u, 3357999194u, 0, COSH_TOLERANCE, 0},
+{ 47, 1079308159u, 3018463866u, 1086226574u, 404012923u, 1198269222u, 2905917257u, 0, COSH_TOLERANCE, 0},
+{ 48, 1071024755u, 1710279345u, 3251401196u, 3528946000u, 1072758958u, 1795613829u, 0, COSH_TOLERANCE, 0},
+{ 49, 1070973535u, 2164450219u, 1083520023u, 3312018966u, 1072754437u, 2812445457u, 0, COSH_TOLERANCE, 0},
+{ 50, 1069831588u, 2648986431u, 1050330591u, 1474376550u, 1072706507u, 2784383684u, 0, COSH_TOLERANCE, 0},
+{ 51, 3214344972u, 1839068700u, 1077406406u, 3013052171u, 1072693512u, 3372008771u, 0, COSH_TOLERANCE, 0},
+{ 52, 1066416574u, 772102380u, 3220729740u, 4219039958u, 1072693379u, 2736422544u, 0, COSH_TOLERANCE, 0},
+{ 53, 3223180765u, 3058618779u, 1046304788u, 3338676024u, 1082858658u, 288113767u, 0, COSH_TOLERANCE, 0},
+{ 54, 1067949353u, 506286854u, 1094907481u, 2217000199u, 1072694363u, 1851415872u, 0, COSH_TOLERANCE, 0},
+{ 55, 1076136854u, 1147428263u, 1065432625u, 3034786717u, 1087127673u, 1640783217u, 0, COSH_TOLERANCE, 0},
+{ 56, 1075725296u, 2844125311u, 1082985198u, 2561492677u, 1083060297u, 812604215u, 0, COSH_TOLERANCE, 0},
+{ 57, 3218876948u, 704542600u, 3222902057u, 2762779203u, 1072796430u, 3706016226u, 0, COSH_TOLERANCE, 0},
+{ 58, 3215409254u, 184131949u, 3249723525u, 1667366082u, 1072694329u, 1957018312u, 0, COSH_TOLERANCE, 0},
+{ 59, 3221512446u, 3904224140u, 1067056698u, 2942159914u, 1075426314u, 1203848820u, 0, COSH_TOLERANCE, 0},
+{ 60, 1080713919u, 426114282u, 3209056785u, 1083606355u, 1390879870u, 3657642479u, 0, COSH_TOLERANCE, 0},
+{ 61, 1082048697u, 3774123863u, 1106787580u, 2722107965u, 1815954824u, 2241806278u, 0, COSH_TOLERANCE, 0},
+{ 62, 1077519332u, 1377734762u, 1104232051u, 2377063483u, 1110428932u, 844049504u, 0, COSH_TOLERANCE, 0},
+{ 63, 1072526287u, 1029739074u, 1105467109u, 3062201018u, 1073169629u, 3757788751u, 0, COSH_TOLERANCE, 0},
+{ 64, 3225304413u, 773857656u, 3214251949u, 335833884u, 1117303861u, 3714139170u, 0, COSH_TOLERANCE, 0},
+{ 65, 3216856098u, 1473865960u, 1103073830u, 4000427507u, 1072700136u, 3810050038u, 0, COSH_TOLERANCE, 0},
+{ 66, 1081165135u, 4242092620u, 1067009473u, 14539161u, 1489589453u, 1225921132u, 0, COSH_TOLERANCE, 0},
+{ 67, 3214536170u, 1732245037u, 1101371955u, 1533536108u, 1072693584u, 789262791u, 0, COSH_TOLERANCE, 0},
+{ 68, 3228182475u, 1833841275u, 1099430098u, 4144145552u, 1388140140u, 2429748539u, 0, COSH_TOLERANCE, 0},
+{ 69, 3227493247u, 935007012u, 3188865420u, 604442938u, 1263004120u, 3099153891u, 0, COSH_TOLERANCE, 0},
+{ 70, 3217389013u, 2211464602u, 1046255144u, 1635910526u, 1072708019u, 4133545447u, 0, COSH_TOLERANCE, 0},
+{ 71, 1074725689u, 2549219008u, 3231633258u, 3733639385u, 1077420993u, 3573315642u, 0, COSH_TOLERANCE, 0},
+{ 72, 1075803633u, 1819374372u, 3202219056u, 2617077637u, 1083464179u, 4070461796u, 0, COSH_TOLERANCE, 0},
+{ 73, 1078616640u, 546465680u, 1048653554u, 532401530u, 1151433358u, 1660202510u, 0, COSH_TOLERANCE, 0},
+{ 74, 1066591187u, 2759019783u, 3221570188u, 3554409630u, 1072693426u, 1804445835u, 0, COSH_TOLERANCE, 0},
+{ 75, 3219222738u, 2527221960u, 1099107978u, 2696971136u, 1072852880u, 4070723488u, 0, COSH_TOLERANCE, 0},
+{ 76, 1079332208u, 173134582u, 1087299442u, 2877794600u, 1200522954u, 2450291402u, 0, COSH_TOLERANCE, 0},
+{ 77, 1076963290u, 547642046u, 3197285510u, 3521286127u, 1097525900u, 1604458500u, 0, COSH_TOLERANCE, 0},
+{ 78, 1073812126u, 1231582831u, 1090971734u, 1653446832u, 1074864811u, 1996198827u, 0, COSH_TOLERANCE, 0},
+{ 79, 1070779719u, 3762182190u, 3252967851u, 2615360375u, 1072738823u, 3172325200u, 0, COSH_TOLERANCE, 0},
+{ 80, 3216563063u, 2588067350u, 3206610957u, 3551059728u, 1072698194u, 4146036215u, 0, COSH_TOLERANCE, 0},
+{ 81, 3217464616u, 845263327u, 1073415902u, 1749010288u, 1072709655u, 139198688u, 0, COSH_TOLERANCE, 0},
+{ 82, 3217110706u, 3092685191u, 3190678390u, 2872219490u, 1072702744u, 974344816u, 0, COSH_TOLERANCE, 0},
+{ 83, 3220412207u, 4107255722u, 3205337291u, 3069068345u, 1073582488u, 3601775790u, 0, COSH_TOLERANCE, 0},
+{ 84, 3227213641u, 2294867524u, 3216653996u, 2860384670u, 1237260976u, 1311152806u, 0, COSH_TOLERANCE, 0},
+{ 85, 3214297870u, 2265437201u, 3240198679u, 1234948614u, 1072693496u, 2160301788u, 0, COSH_TOLERANCE, 0},
+{ 86, 3219505657u, 1186945904u, 3251167793u, 1896750851u, 1072945110u, 2441861331u, 0, COSH_TOLERANCE, 0},
+{ 87, 1075284022u, 3686084548u, 1079286273u, 3309277689u, 1080454737u, 1834280803u, 0, COSH_TOLERANCE, 0},
+{ 88, 3221379088u, 3006860614u, 3231412671u, 2504194724u, 1075053274u, 3685158235u, 0, COSH_TOLERANCE, 0},
+{ 89, 3224614924u, 1948717780u, 1048317852u, 3791803982u, 1101387050u, 776596525u, 0, COSH_TOLERANCE, 0},
+{ 90, 1070636471u, 4272034420u, 3192982124u, 1526175922u, 1072728787u, 177521945u, 0, COSH_TOLERANCE, 0},
+{ 91, 3226943458u, 4108948538u, 1104691287u, 640541190u, 1212283421u, 2139002760u, 0, COSH_TOLERANCE, 0},
+{ 92, 3217743177u, 3259274853u, 1082507103u, 3677038020u, 1072716427u, 776404209u, 0, COSH_TOLERANCE, 0},
+{ 93, 1076841042u, 3781708548u, 1096584871u, 1207386447u, 1095222699u, 77431u, 0, COSH_TOLERANCE, 0},
+{ 94, 3213861096u, 3011191657u, 1103798670u, 1096124830u, 1072693373u, 206751463u, 0, COSH_TOLERANCE, 0},
+{ 95, 1071623631u, 2540404725u, 3240157452u, 4122845725u, 1072824347u, 1612247748u, 0, COSH_TOLERANCE, 0},
+{ 96, 1076303678u, 311336721u, 3214382367u, 4212533768u, 1089026116u, 2664579205u, 0, COSH_TOLERANCE, 0},
+{ 97, 1067916643u, 1769686293u, 3240200923u, 3538602249u, 1072694316u, 3304105254u, 0, COSH_TOLERANCE, 0},
+{ 98, 1075081821u, 508056696u, 1103793878u, 776520138u, 1079295635u, 1807521048u, 0, COSH_TOLERANCE, 0},
+{ 99, 1080890481u, 4064962760u, 1077424413u, 819766631u, 1423488425u, 3317334315u, 0, COSH_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 1075907720u, 3448229353u, 0, COSH_TOLERANCE, 0},
+{ 101, 1076003603u, 2514398118u, 1076579751u, 870169764u, 1085567394u, 4040666214u, 0, COSH_TOLERANCE, 0},
+{ 102, 3227977024u, 1190259653u, 1069112254u, 3417249840u, 1350163471u, 1074619959u, 0, COSH_TOLERANCE, 0},
+{ 103, 3214634603u, 3467757357u, 3215075200u, 2168175352u, 1072693624u, 1123141988u, 0, COSH_TOLERANCE, 0},
+{ 104, 3226011647u, 1508888184u, 1060430241u, 3524949092u, 1147319027u, 4152444040u, 0, COSH_TOLERANCE, 0},
+{ 105, 3215238675u, 166402802u, 3237198975u, 3572369260u, 1072694100u, 3674442469u, 0, COSH_TOLERANCE, 0},
+{ 106, 1075575366u, 2441536203u, 3202753937u, 3658194573u, 1082198549u, 1303886570u, 0, COSH_TOLERANCE, 0},
+{ 107, 1070781516u, 2479742828u, 1062342831u, 4214154303u, 1072738957u, 3022776512u, 0, COSH_TOLERANCE, 0},
+{ 108, 1076105338u, 426896765u, 1066474375u, 2201754442u, 1086731957u, 3468972475u, 0, COSH_TOLERANCE, 0},
+{ 109, 3214503389u, 2055773734u, 3239267288u, 291396537u, 1072693571u, 1450513960u, 0, COSH_TOLERANCE, 0},
+{ 110, 3224385121u, 874125203u, 3210508124u, 4091098764u, 1096086990u, 529374978u, 0, COSH_TOLERANCE, 0},
+{ 111, 1072007482u, 120488169u, 3241241441u, 1985269424u, 1072939813u, 2389502735u, 0, COSH_TOLERANCE, 0},
+{ 112, 3218073746u, 2243036871u, 3243941101u, 740033495u, 1072725997u, 3948893692u, 0, COSH_TOLERANCE, 0},
+{ 113, 3218862090u, 1176656356u, 1074261978u, 3588756231u, 1072794750u, 819787567u, 0, COSH_TOLERANCE, 0},
+{ 114, 3228699543u, 3037249392u, 1061635587u, 1173102190u, 1508329855u, 1211293113u, 0, COSH_TOLERANCE, 0},
+{ 115, 3224626669u, 2882725208u, 1071440059u, 69225090u, 1101667894u, 2351994968u, 0, COSH_TOLERANCE, 0},
+{ 116, 3218954930u, 272319256u, 1072073912u, 2493997123u, 1072805489u, 1686170561u, 0, COSH_TOLERANCE, 0},
+{ 117, 1070303098u, 188610379u, 3232757923u, 2209647371u, 1072717593u, 236808659u, 0, COSH_TOLERANCE, 0},
+{ 118, 3225224181u, 1990439193u, 1078073146u, 622849962u, 1115491532u, 3932839728u, 0, COSH_TOLERANCE, 0},
+{ 119, 1069718653u, 756052458u, 1081649113u, 2247475162u, 1072704351u, 3003850457u, 0, COSH_TOLERANCE, 0},
+{ 120, 1071060248u, 3878055211u, 3222407050u, 2979438623u, 1072762188u, 2461618929u, 0, COSH_TOLERANCE, 0},
+{ 121, 3214165365u, 2676398686u, 1105124431u, 3631096636u, 1072693453u, 2018804946u, 0, COSH_TOLERANCE, 0},
+{ 122, 1071370846u, 1697791764u, 3198136112u, 2299842819u, 1072793896u, 2354734361u, 0, COSH_TOLERANCE, 0},
+{ 123, 1074939040u, 1931502677u, 3215264397u, 3016456382u, 1078464791u, 2439295006u, 0, COSH_TOLERANCE, 0},
+{ 124, 1073302002u, 343404215u, 1061072607u, 4266232536u, 1074020614u, 4198175003u, 0, COSH_TOLERANCE, 0},
+{ 125, 3225502196u, 4140316002u, 1082896196u, 868256971u, 1123795724u, 3427688141u, 0, COSH_TOLERANCE, 0},
+{ 126, 1074374234u, 1864139509u, 3187675097u, 3084482407u, 1076410861u, 3327335940u, 0, COSH_TOLERANCE, 0},
+{ 127, 3220191323u, 2427162817u, 3234748208u, 2715105792u, 1073279818u, 1325802416u, 0, COSH_TOLERANCE, 0},
+{ 128, 1070891968u, 3943389284u, 1046724025u, 3626825684u, 1072747579u, 3427003319u, 0, COSH_TOLERANCE, 0},
+{ 129, 1067443098u, 967350972u, 1093012318u, 448002663u, 1072693756u, 2136965429u, 0, COSH_TOLERANCE, 0},
+{ 130, 3228777187u, 105058217u, 1069733884u, 171786224u, 1537057146u, 2944133190u, 0, COSH_TOLERANCE, 0},
+{ 131, 3213731756u, 2863482262u, 3204997271u, 877784425u, 1072693357u, 3990621442u, 0, COSH_TOLERANCE, 0},
+{ 132, 3216260801u, 2801782962u, 3213604117u, 762347195u, 1072696528u, 2729731056u, 0, COSH_TOLERANCE, 0},
+{ 133, 3224049543u, 2317950339u, 3246333414u, 2135700283u, 1092046479u, 699547095u, 0, COSH_TOLERANCE, 0},
+{ 134, 1069099309u, 4171919805u, 1082858682u, 2180920863u, 1072698316u, 2698555179u, 0, COSH_TOLERANCE, 0},
+{ 135, 3221197660u, 1918836931u, 1083603224u, 3137821660u, 1074615975u, 2866178825u, 0, COSH_TOLERANCE, 0},
+{ 136, 1081882778u, 3456203663u, 3235600523u, 2335688936u, 1754633057u, 4057860990u, 0, COSH_TOLERANCE, 0},
+{ 137, 1066396570u, 4170235262u, 1051824459u, 521583737u, 1072693375u, 1572125749u, 0, COSH_TOLERANCE, 0},
+{ 138, 1075056847u, 1296623194u, 3250673860u, 2442872540u, 1079172105u, 4063375717u, 0, COSH_TOLERANCE, 0},
+{ 139, 1071121461u, 289979405u, 1049514449u, 3865737145u, 1072767947u, 1956781744u, 0, COSH_TOLERANCE, 0},
+{ 140, 1074250368u, 3699090239u, 1054539840u, 3259249360u, 1076071149u, 1820335208u, 0, COSH_TOLERANCE, 0},
+{ 141, 1079640884u, 1619819023u, 1045993352u, 1022642459u, 1229016129u, 1444182022u, 0, COSH_TOLERANCE, 0},
+{ 142, 1075141548u, 19455098u, 3229182089u, 2096003654u, 1079643489u, 1763506935u, 0, COSH_TOLERANCE, 0},
+{ 143, 1074200784u, 3803689997u, 1071630912u, 2263729518u, 1075956212u, 541371697u, 0, COSH_TOLERANCE, 0},
+{ 144, 1080385741u, 2816837387u, 1063422305u, 2597606398u, 1330293545u, 1095829056u, 0, COSH_TOLERANCE, 0},
+{ 145, 1072245897u, 3680967506u, 1040201163u, 179224723u, 1073034800u, 1106942961u, 0, COSH_TOLERANCE, 0},
+{ 146, 3213795591u, 978126928u, 1101553990u, 4047893399u, 1072693365u, 1156495186u, 0, COSH_TOLERANCE, 0},
+{ 147, 3221273469u, 4059818629u, 1042678728u, 3640293589u, 1074819359u, 1680813367u, 0, COSH_TOLERANCE, 0},
+{ 148, 3228541096u, 3383497159u, 1070002807u, 1527313008u, 1454398110u, 4173296238u, 0, COSH_TOLERANCE, 0},
+{ 149, 3216339167u, 2599946514u, 1104170406u, 2738675352u, 1072696927u, 3659150073u, 0, COSH_TOLERANCE, 0},
+{ 150, 1081115375u, 3616571377u, 1060859316u, 1130603218u, 1471256027u, 3187069287u, 0, COSH_TOLERANCE, 0},
+{ 151, 1073931644u, 3859211180u, 1067940450u, 1744531824u, 1075145206u, 3259882951u, 0, COSH_TOLERANCE, 0},
+{ 152, 1065900012u, 1958025850u, 3236511256u, 2472176453u, 1072693322u, 327825150u, 0, COSH_TOLERANCE, 0},
+{ 153, 3223669905u, 182132862u, 3250520938u, 3924356991u, 1087674283u, 2611530335u, 0, COSH_TOLERANCE, 0},
+{ 154, 3224210428u, 35632886u, 3209806504u, 1453402523u, 1093919296u, 1099362036u, 0, COSH_TOLERANCE, 0},
+{ 155, 1076182070u, 743225214u, 3202890678u, 142917400u, 1087631855u, 3785393671u, 0, COSH_TOLERANCE, 0},
+{ 156, 1075442096u, 1472665012u, 3203138231u, 256588219u, 1081376587u, 3032890454u, 0, COSH_TOLERANCE, 0},
+{ 157, 1079253522u, 1062927000u, 1061134072u, 931677439u, 1193281892u, 3538812810u, 0, COSH_TOLERANCE, 0},
+{ 158, 1069912068u, 2320910576u, 1055663370u, 288059864u, 1072708161u, 1882746750u, 0, COSH_TOLERANCE, 0},
+{ 159, 1075812365u, 1448349062u, 3199478070u, 3454027134u, 1083509354u, 3244981512u, 0, COSH_TOLERANCE, 0},
+{ 160, 3224875886u, 4215445172u, 3196654963u, 2231888973u, 1107446504u, 159529183u, 0, COSH_TOLERANCE, 0},
+{ 161, 3227757863u, 40413554u, 3232578253u, 983832844u, 1309743639u, 1304081657u, 0, COSH_TOLERANCE, 0},
+{ 162, 3221624382u, 3995725873u, 1050082319u, 777231627u, 1075822815u, 4273229959u, 0, COSH_TOLERANCE, 0},
+{ 163, 1066152450u, 672789828u, 3253385962u, 2982787335u, 1072693347u, 1605275833u, 0, COSH_TOLERANCE, 0},
+{ 164, 1072585179u, 2075971825u, 1070166500u, 4034633931u, 1073201328u, 3750652822u, 0, COSH_TOLERANCE, 0},
+{ 165, 3218434785u, 1018222907u, 3244621407u, 3090050495u, 1072752512u, 3396710540u, 0, COSH_TOLERANCE, 0},
+{ 166, 1071875189u, 937732557u, 3200798890u, 2557898276u, 1072894405u, 2050433952u, 0, COSH_TOLERANCE, 0},
+{ 167, 1075196588u, 130346162u, 3223590310u, 275568693u, 1080037821u, 3469976951u, 0, COSH_TOLERANCE, 0},
+{ 168, 1065967541u, 3807416441u, 1075961161u, 3706820266u, 1072693328u, 2062373411u, 0, COSH_TOLERANCE, 0},
+{ 169, 3219244733u, 1710131411u, 1078123323u, 1900790503u, 1072859242u, 2262607443u, 0, COSH_TOLERANCE, 0},
+{ 170, 3226236449u, 3420420033u, 3210844787u, 588423066u, 1157720745u, 774296256u, 0, COSH_TOLERANCE, 0},
+{ 171, 1067509906u, 1160162008u, 3246307879u, 4265764460u, 1072693819u, 3631349776u, 0, COSH_TOLERANCE, 0},
+{ 172, 1080523338u, 366653268u, 3188814424u, 466059202u, 1355764484u, 760636581u, 0, COSH_TOLERANCE, 0},
+{ 173, 3222433435u, 1325936170u, 3221436876u, 680097612u, 1078530781u, 3669498780u, 0, COSH_TOLERANCE, 0},
+{ 174, 3225711052u, 1827735934u, 3200554324u, 2875599271u, 1133496792u, 2135776268u, 0, COSH_TOLERANCE, 0},
+{ 175, 3213050498u, 3117037091u, 3239246636u, 15838845u, 1072693294u, 1579961608u, 0, COSH_TOLERANCE, 0},
+{ 176, 1067702644u, 749718883u, 3223587064u, 1523766569u, 1072694036u, 422449494u, 0, COSH_TOLERANCE, 0},
+{ 177, 1066853747u, 1966536294u, 3250158026u, 699164258u, 1072693510u, 562801207u, 0, COSH_TOLERANCE, 0},
+{ 178, 1079174067u, 3759049394u, 1106085272u, 1183789499u, 1185944512u, 3807740687u, 0, COSH_TOLERANCE, 0},
+{ 179, 1074910167u, 1970107747u, 1095245453u, 2308233883u, 1078300334u, 1661985235u, 0, COSH_TOLERANCE, 0},
+{ 180, 1076367836u, 1491017852u, 1041444355u, 1723375725u, 1089770148u, 2037745521u, 0, COSH_TOLERANCE, 0},
+{ 181, 3219775798u, 1141349287u, 1097465301u, 3403438584u, 1073055268u, 2358787186u, 0, COSH_TOLERANCE, 0},
+{ 182, 3224280452u, 1711085243u, 3250239076u, 1377484108u, 1094776418u, 2040663178u, 0, COSH_TOLERANCE, 0},
+{ 183, 1079510651u, 2880275004u, 1084039594u, 1611394950u, 1216939131u, 2867297031u, 0, COSH_TOLERANCE, 0},
+{ 184, 3224784251u, 2626629370u, 1063771493u, 1499080813u, 1105335110u, 3654476853u, 0, COSH_TOLERANCE, 0},
+{ 185, 1068862751u, 3936262414u, 1103919063u, 3175668759u, 1072696965u, 3660378434u, 0, COSH_TOLERANCE, 0},
+{ 186, 3217418903u, 1270950554u, 3194616071u, 3680565379u, 1072708656u, 267045490u, 0, COSH_TOLERANCE, 0},
+{ 187, 3217585407u, 1066985223u, 3221613219u, 4089383168u, 1072712446u, 4162711102u, 0, COSH_TOLERANCE, 0},
+{ 188, 3220204567u, 4017329311u, 3208334452u, 1667591498u, 1073295796u, 2773972944u, 0, COSH_TOLERANCE, 0},
+{ 189, 1077678397u, 3154656624u, 1061894279u, 3886344038u, 1114014484u, 1143078455u, 0, COSH_TOLERANCE, 0},
+{ 190, 1068478737u, 977586119u, 3209762784u, 953839852u, 1072695257u, 1568551512u, 0, COSH_TOLERANCE, 0},
+{ 191, 1081896575u, 143071571u, 3206165386u, 913097445u, 1759744561u, 1725664653u, 0, COSH_TOLERANCE, 0},
+{ 192, 3213634128u, 1371169579u, 1057079837u, 2594818628u, 1072693347u, 695760778u, 0, COSH_TOLERANCE, 0},
+{ 193, 3228724664u, 2259342224u, 3217432469u, 1824221478u, 1517614491u, 1347867273u, 0, COSH_TOLERANCE, 0},
+{ 194, 3227960407u, 1576604497u, 1079368611u, 185078728u, 1347106434u, 3370329867u, 0, COSH_TOLERANCE, 0},
+{ 195, 3221679427u, 444800035u, 3243343143u, 1734989302u, 1075945204u, 3272065637u, 0, COSH_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1073330400u, 1602882483u, 0, COSH_TOLERANCE, 0},
+{ 197, 3225258784u, 1941318385u, 1045807374u, 792193370u, 1116250287u, 3103118402u, 0, COSH_TOLERANCE, 0},
+{ 198, 3225716754u, 1299392207u, 3212131720u, 3205732280u, 1133701703u, 3451158556u, 0, COSH_TOLERANCE, 0},
+{ 199, 1079824436u, 3035093505u, 1052187689u, 3287702190u, 1245928697u, 3659026689u, 0, COSH_TOLERANCE, 0},
+{ 200, 3227801892u, 2160225215u, 1102624859u, 836655570u, 1317853110u, 1753278920u, 0, COSH_TOLERANCE, 0},
+{ 201, 1079946410u, 3360816360u, 3246176356u, 172860634u, 1257254087u, 595783054u, 0, COSH_TOLERANCE, 0},
+{ 202, 1073092940u, 146831910u, 1051558014u, 2340722078u, 1073802343u, 192170069u, 0, COSH_TOLERANCE, 0},
+{ 203, 3224124895u, 1603798153u, 3207725532u, 1099413093u, 1092924694u, 2401380251u, 0, COSH_TOLERANCE, 0},
+{ 204, 3227804010u, 2429340443u, 3190303581u, 3223770005u, 1318235431u, 1901620640u, 0, COSH_TOLERANCE, 0},
+{ 205, 1073785807u, 955542166u, 3230415151u, 275583938u, 1074811387u, 2594666488u, 0, COSH_TOLERANCE, 0},
+{ 206, 1078291818u, 513397822u, 1090646554u, 2089321329u, 1136418636u, 351397573u, 0, COSH_TOLERANCE, 0},
+{ 207, 3214141396u, 2782073372u, 1046063872u, 4023829068u, 1072693446u, 525984948u, 0, COSH_TOLERANCE, 0},
+{ 208, 1079690454u, 3242223094u, 3194111199u, 4264674108u, 1233536710u, 346227329u, 0, COSH_TOLERANCE, 0},
+{ 209, 3225927909u, 3506346169u, 1047020885u, 1742757458u, 1143421892u, 2781434878u, 0, COSH_TOLERANCE, 0},
+{ 210, 3214684573u, 1265459564u, 3193450280u, 3650514880u, 1072693645u, 2020640906u, 0, COSH_TOLERANCE, 0},
+{ 211, 1075464434u, 1525260440u, 3235452527u, 2612331392u, 1081496072u, 2899446050u, 0, COSH_TOLERANCE, 0},
+{ 212, 3227697400u, 1263613754u, 3219096387u, 635677201u, 1298518908u, 459760033u, 0, COSH_TOLERANCE, 0},
+{ 213, 3217806423u, 4140947288u, 3200792376u, 2013265346u, 1072718129u, 500268673u, 0, COSH_TOLERANCE, 0},
+{ 214, 3227954296u, 1912759945u, 3237045253u, 1351396825u, 1345966111u, 1464931509u, 0, COSH_TOLERANCE, 0},
+{ 215, 3228282218u, 1001433078u, 3206926643u, 2741676659u, 1406514744u, 3156202362u, 0, COSH_TOLERANCE, 0},
+{ 216, 1075680726u, 1088945233u, 1085095743u, 3986114865u, 1082750959u, 2813999483u, 0, COSH_TOLERANCE, 0},
+{ 217, 3219928361u, 831239754u, 1099828675u, 3071308141u, 1073127703u, 3507722226u, 0, COSH_TOLERANCE, 0},
+{ 218, 3222688769u, 3473592372u, 1102759382u, 1309576357u, 1080072667u, 3702574099u, 0, COSH_TOLERANCE, 0},
+{ 219, 3229166610u, 2042340367u, 1091945628u, 2062772374u, 1680905763u, 210474498u, 0, COSH_TOLERANCE, 0},
+{ 220, 3214688631u, 1840632537u, 1096533424u, 807510337u, 1072693647u, 938142822u, 0, COSH_TOLERANCE, 0},
+{ 221, 3224111690u, 144814872u, 3212698915u, 2282965697u, 1092794632u, 1680580331u, 0, COSH_TOLERANCE, 0},
+{ 222, 1073333582u, 2552499583u, 3229111426u, 1470130815u, 1074057948u, 4239780720u, 0, COSH_TOLERANCE, 0},
+{ 223, 3227364425u, 2858583811u, 1089760910u, 6360994u, 1251137827u, 697276436u, 0, COSH_TOLERANCE, 0},
+{ 224, 3215042145u, 1614537194u, 1075198900u, 4088705365u, 1072693871u, 435034830u, 0, COSH_TOLERANCE, 0},
+{ 225, 3228918974u, 3545570051u, 1065221325u, 1629217700u, 1589407573u, 229769802u, 0, COSH_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 1073324678u, 267422968u, 0, COSH_TOLERANCE, 0},
+{ 227, 3215677054u, 2406734491u, 1042055360u, 89226663u, 1072694743u, 314704995u, 0, COSH_TOLERANCE, 0},
+{ 228, 3214625449u, 1618759139u, 3194723421u, 3888234802u, 1072693620u, 1885675412u, 0, COSH_TOLERANCE, 0},
+{ 229, 1068988736u, 3590035633u, 3212424262u, 2892456615u, 1072697659u, 797486592u, 0, COSH_TOLERANCE, 0},
+{ 230, 3213011732u, 2431246964u, 3241512456u, 183850734u, 1072693291u, 2419777582u, 0, COSH_TOLERANCE, 0},
+{ 231, 1076918189u, 3088319870u, 3211544311u, 862225364u, 1096486112u, 1720101621u, 0, COSH_TOLERANCE, 0},
+{ 232, 3224808904u, 3495352775u, 1058576726u, 596957268u, 1105876117u, 1924270502u, 0, COSH_TOLERANCE, 0},
+{ 233, 1066476292u, 1839214511u, 3205004060u, 1923240983u, 1072693394u, 3599825330u, 0, COSH_TOLERANCE, 0},
+{ 234, 1069608200u, 739619702u, 3223356436u, 2689885273u, 1072702428u, 3984013578u, 0, COSH_TOLERANCE, 0},
+{ 235, 3216053611u, 2143376228u, 1098306332u, 3760236188u, 1072695583u, 2926029591u, 0, COSH_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 1077136875u, 826067980u, 0, COSH_TOLERANCE, 0},
+{ 237, 3219408869u, 2493598049u, 3194927008u, 1689107592u, 1072910984u, 1200702158u, 0, COSH_TOLERANCE, 0},
+{ 238, 3213058631u, 1578976988u, 1066368383u, 2117279163u, 1072693294u, 4154544241u, 0, COSH_TOLERANCE, 0},
+{ 239, 3221939535u, 3425290087u, 1098487295u, 1263412017u, 1076683118u, 1001936109u, 0, COSH_TOLERANCE, 0},
+{ 240, 3217869948u, 3635396812u, 1070999426u, 3965655689u, 1072719899u, 4191291117u, 0, COSH_TOLERANCE, 0},
+{ 241, 1069633530u, 2183973116u, 1101098363u, 1118613350u, 1072702853u, 2843946852u, 0, COSH_TOLERANCE, 0},
+{ 242, 3221946089u, 199516350u, 1078368488u, 164621458u, 1076706867u, 2653466916u, 0, COSH_TOLERANCE, 0},
+{ 243, 3212871842u, 3570940805u, 3230316437u, 3596080877u, 1072693282u, 733293125u, 0, COSH_TOLERANCE, 0},
+{ 244, 3217646749u, 980880313u, 1079833442u, 884465057u, 1072713949u, 2327888183u, 0, COSH_TOLERANCE, 0},
+{ 245, 1080054180u, 2558179220u, 1052873711u, 1233598120u, 1269060948u, 2524660391u, 0, COSH_TOLERANCE, 0},
+{ 246, 1067038165u, 1909994277u, 1085015978u, 2991527452u, 1072693578u, 2262681612u, 0, COSH_TOLERANCE, 0},
+{ 247, 1070292444u, 1680290941u, 1074309900u, 2943870846u, 1072717305u, 1264785041u, 0, COSH_TOLERANCE, 0},
+{ 248, 1069981892u, 1451927357u, 3228615456u, 1502585517u, 1072709675u, 2378690044u, 0, COSH_TOLERANCE, 0},
+{ 249, 3224677615u, 751136990u, 3230392165u, 3493275472u, 1102866871u, 215829603u, 0, COSH_TOLERANCE, 0},
+{ 250, 1079491599u, 1209623292u, 3238056647u, 979495322u, 1215252451u, 1345426533u, 0, COSH_TOLERANCE, 0},
+{ 251, 3228404200u, 1717672108u, 1048120593u, 531240316u, 1429099700u, 3462906838u, 0, COSH_TOLERANCE, 0},
+{ 252, 1068854987u, 3548721654u, 1086112947u, 3391817224u, 1072696925u, 281688495u, 0, COSH_TOLERANCE, 0},
+{ 253, 1074691123u, 2758195125u, 1100880260u, 2028440924u, 1077320145u, 4283533331u, 0, COSH_TOLERANCE, 0},
+{ 254, 1076883861u, 2750123373u, 3232200256u, 1086294931u, 1095793270u, 788833266u, 0, COSH_TOLERANCE, 0},
+{ 255, 1065978768u, 2986160931u, 1076097908u, 2540046258u, 1072693329u, 2450552268u, 0, COSH_TOLERANCE, 0},
+{ 256, 3224990842u, 451471221u, 1064816262u, 4187644495u, 1110076565u, 655095513u, 0, COSH_TOLERANCE, 0},
+{ 257, 1080585860u, 2439500162u, 1065280276u, 1979490284u, 1367314315u, 4075308906u, 0, COSH_TOLERANCE, 0},
+{ 258, 1065581656u, 2283342035u, 1078398157u, 1345997553u, 1072693295u, 1984477633u, 0, COSH_TOLERANCE, 0},
+{ 259, 3219540804u, 179066662u, 1103272172u, 1217337578u, 1072958184u, 2633513687u, 0, COSH_TOLERANCE, 0},
+{ 260, 3218902409u, 3779303391u, 3210023352u, 3115946280u, 1072799344u, 2662349015u, 0, COSH_TOLERANCE, 0},
+{ 261, 3213961394u, 286247089u, 1085153597u, 713645369u, 1072693395u, 938537965u, 0, COSH_TOLERANCE, 0},
+{ 262, 1077941860u, 1468283899u, 1042831668u, 2022736418u, 1120232171u, 2888650454u, 0, COSH_TOLERANCE, 0},
+{ 263, 1076847649u, 3305564080u, 1065483445u, 482392433u, 1095303241u, 3604886385u, 0, COSH_TOLERANCE, 0},
+{ 264, 3216375871u, 2256346551u, 3222430705u, 2071674991u, 1072697122u, 3114668340u, 0, COSH_TOLERANCE, 0},
+{ 265, 3216607607u, 2295269094u, 1084451053u, 2773103941u, 1072698469u, 1831807840u, 0, COSH_TOLERANCE, 0},
+{ 266, 1075028218u, 1482721827u, 1092243422u, 3125409590u, 1079044245u, 1232254491u, 0, COSH_TOLERANCE, 0},
+{ 267, 3221065973u, 1381740563u, 1071545057u, 2918235653u, 1074398228u, 2786573068u, 0, COSH_TOLERANCE, 0},
+{ 268, 3226133060u, 1105857967u, 3241990046u, 2703723225u, 1152893521u, 2850491479u, 0, COSH_TOLERANCE, 0},
+{ 269, 1066084243u, 174689677u, 1079333374u, 3947057014u, 1072693340u, 742181246u, 0, COSH_TOLERANCE, 0},
+{ 270, 1077878947u, 2023082423u, 3242081486u, 1169047927u, 1118700325u, 3426525989u, 0, COSH_TOLERANCE, 0},
+{ 271, 1070817355u, 3742487766u, 1043425732u, 194972788u, 1072741671u, 3984460825u, 0, COSH_TOLERANCE, 0},
+{ 272, 3220083283u, 2136071361u, 3211529757u, 993675115u, 1073209296u, 2409955736u, 0, COSH_TOLERANCE, 0},
+{ 273, 3219954837u, 210772141u, 3241441539u, 580731413u, 1073141062u, 1932588337u, 0, COSH_TOLERANCE, 0},
+{ 274, 1078111773u, 1751560711u, 1074522705u, 180987057u, 1128126630u, 2518765659u, 0, COSH_TOLERANCE, 0},
+{ 275, 1071997471u, 2552236599u, 1088658621u, 2112468655u, 1072936199u, 2897169212u, 0, COSH_TOLERANCE, 0},
+{ 276, 3213407865u, 1578223762u, 3224596567u, 2456166162u, 1072693324u, 1465320139u, 0, COSH_TOLERANCE, 0},
+{ 277, 1070041301u, 2110924310u, 1086207177u, 3161208323u, 1072711021u, 3971776018u, 0, COSH_TOLERANCE, 0},
+{ 278, 3223474786u, 2352173188u, 1079361728u, 4070222179u, 1085445849u, 578433019u, 0, COSH_TOLERANCE, 0},
+{ 279, 1080041384u, 2481562701u, 1090937016u, 3809489716u, 1266749058u, 404634930u, 0, COSH_TOLERANCE, 0},
+{ 280, 3215877019u, 330905705u, 1086260896u, 90264431u, 1072695095u, 2298955529u, 0, COSH_TOLERANCE, 0},
+{ 281, 1065895785u, 4162008079u, 3194387916u, 759522153u, 1072693321u, 2939280632u, 0, COSH_TOLERANCE, 0},
+{ 282, 1075772157u, 1839697482u, 3216442625u, 2211508949u, 1083313275u, 3907126828u, 0, COSH_TOLERANCE, 0},
+{ 283, 3227787115u, 3736863454u, 1063475914u, 3150741666u, 1315110814u, 1556023783u, 0, COSH_TOLERANCE, 0},
+{ 284, 1070223067u, 4200269406u, 3236646101u, 1061812176u, 1072715473u, 2995155516u, 0, COSH_TOLERANCE, 0},
+{ 285, 1074975099u, 106027290u, 3234978297u, 2245237549u, 1078697327u, 2130268559u, 0, COSH_TOLERANCE, 0},
+{ 286, 3228109966u, 2132131375u, 3250483427u, 3449276437u, 1374762386u, 2754991195u, 0, COSH_TOLERANCE, 0},
+{ 287, 1077854442u, 2334440944u, 1105423490u, 4004336184u, 1118086726u, 1452344798u, 0, COSH_TOLERANCE, 0},
+{ 288, 3220869856u, 4090088208u, 1042030013u, 3898658299u, 1074122930u, 2876824951u, 0, COSH_TOLERANCE, 0},
+{ 289, 3217345248u, 2272831437u, 3253082595u, 2639188641u, 1072707112u, 3996072429u, 0, COSH_TOLERANCE, 0},
+{ 290, 1069446748u, 1856594168u, 3189515294u, 4101853676u, 1072700680u, 1721485335u, 0, COSH_TOLERANCE, 0},
+{ 291, 1073915260u, 2211699255u, 3195060344u, 3865018604u, 1075102800u, 1125779193u, 0, COSH_TOLERANCE, 0},
+{ 292, 3227038370u, 996259334u, 3241496889u, 3782673116u, 1221003247u, 1357097126u, 0, COSH_TOLERANCE, 0},
+{ 293, 1080256379u, 3840380763u, 1048674041u, 550040067u, 1306461489u, 928374556u, 0, COSH_TOLERANCE, 0},
+{ 294, 3229399497u, 95874100u, 3237232828u, 2645647822u, 1766909843u, 3490239415u, 0, COSH_TOLERANCE, 0},
+{ 295, 1065685736u, 3441419500u, 3252367038u, 876710419u, 1072693303u, 2207449341u, 0, COSH_TOLERANCE, 0},
+{ 296, 3226010640u, 2560836004u, 3199616543u, 1180840586u, 1147281949u, 3335028675u, 0, COSH_TOLERANCE, 0},
+{ 297, 3221602966u, 2218230392u, 3227485787u, 3947214579u, 1075740200u, 2468828995u, 0, COSH_TOLERANCE, 0},
+{ 298, 1075345350u, 1447312532u, 1081476588u, 780366847u, 1080842197u, 2196210744u, 0, COSH_TOLERANCE, 0},
+{ 299, 1073618219u, 2842113832u, 3216156731u, 225159029u, 1074454774u, 2913703556u, 0, COSH_TOLERANCE, 0},
+{ 300, 1079242825u, 1601981129u, 3234628869u, 2236538344u, 1192276494u, 2364090570u, 0, COSH_TOLERANCE, 0},
+{ 301, 1076784916u, 2194185737u, 3242362684u, 87913366u, 1094646719u, 2239129684u, 0, COSH_TOLERANCE, 0},
+{ 302, 3215861096u, 1346862963u, 1077836259u, 3604666660u, 1072695066u, 440704647u, 0, COSH_TOLERANCE, 0},
+{ 303, 3218547435u, 3115209742u, 1099332326u, 1325101950u, 1072762515u, 59651451u, 0, COSH_TOLERANCE, 0},
+{ 304, 3221400314u, 3889223100u, 1053247613u, 3371396923u, 1075106387u, 2524506776u, 0, COSH_TOLERANCE, 0},
+{ 305, 3220477868u, 4163120793u, 1075022670u, 1387631215u, 1073688400u, 3535902313u, 0, COSH_TOLERANCE, 0},
+{ 306, 3218064691u, 1532426189u, 1063168268u, 3397022615u, 1072725713u, 1946389065u, 0, COSH_TOLERANCE, 0},
+{ 307, 3216761961u, 89324166u, 1079206060u, 3429424710u, 1072699477u, 4166825646u, 0, COSH_TOLERANCE, 0},
+{ 308, 3214345198u, 747591401u, 1072238381u, 2803213904u, 1072693512u, 3712512165u, 0, COSH_TOLERANCE, 0},
+{ 309, 1078530868u, 271904221u, 1044258318u, 1858545114u, 1147431148u, 2228394364u, 0, COSH_TOLERANCE, 0},
+{ 310, 3222826034u, 314958082u, 3249912496u, 2966213175u, 1080821311u, 3940918208u, 0, COSH_TOLERANCE, 0},
+{ 311, 3215005206u, 3119528953u, 3217179014u, 2908718240u, 1072693831u, 4021851488u, 0, COSH_TOLERANCE, 0},
+{ 312, 3226738936u, 2018361566u, 1100926600u, 3985805054u, 1193401522u, 2660715245u, 0, COSH_TOLERANCE, 0},
+{ 313, 1073278308u, 409584884u, 3239758947u, 755795129u, 1073993396u, 3069689441u, 0, COSH_TOLERANCE, 0},
+{ 314, 1074723870u, 1819156379u, 3251342302u, 2982669005u, 1077415518u, 3369394811u, 0, COSH_TOLERANCE, 0},
+{ 315, 1080591913u, 2080534280u, 3188254060u, 449171797u, 1368425681u, 3068381489u, 0, COSH_TOLERANCE, 0},
+{ 316, 1079179684u, 168744837u, 3214950009u, 1322217822u, 1186375305u, 280204842u, 0, COSH_TOLERANCE, 0},
+{ 317, 3229061076u, 3250487255u, 1062120700u, 1876195180u, 1641903706u, 3427323764u, 0, COSH_TOLERANCE, 0},
+{ 318, 3223197752u, 1336400247u, 1098057903u, 3314079581u, 1082977604u, 2978454035u, 0, COSH_TOLERANCE, 0},
+{ 319, 3216261732u, 265025555u, 1063854282u, 3779482256u, 1072696533u, 1033696308u, 0, COSH_TOLERANCE, 0},
+{ 320, 1072543381u, 887044257u, 1054789618u, 2732056261u, 1073178705u, 3462589012u, 0, COSH_TOLERANCE, 0},
+{ 321, 1067932534u, 4027115185u, 3191764868u, 2940199511u, 1072694339u, 1351370649u, 0, COSH_TOLERANCE, 0},
+{ 322, 3216131643u, 2875684421u, 3227459837u, 2251967570u, 1072695920u, 3217040934u, 0, COSH_TOLERANCE, 0},
+{ 323, 1071633020u, 284173546u, 3238823679u, 3557800647u, 1072825560u, 612997882u, 0, COSH_TOLERANCE, 0},
+{ 324, 1080487040u, 3147771266u, 3220110464u, 2933364246u, 1348984230u, 3038347863u, 0, COSH_TOLERANCE, 0},
+{ 325, 1071144616u, 3366183281u, 3234870843u, 537442654u, 1072770188u, 1133518616u, 0, COSH_TOLERANCE, 0},
+{ 326, 3227341572u, 2529029548u, 3249882819u, 3781513577u, 1249030162u, 3889526767u, 0, COSH_TOLERANCE, 0},
+{ 327, 3219727810u, 1080845539u, 3206760016u, 911778687u, 1073034045u, 1789981630u, 0, COSH_TOLERANCE, 0},
+{ 328, 3213971132u, 469586759u, 1091830022u, 3080528840u, 1072693397u, 3347259082u, 0, COSH_TOLERANCE, 0},
+{ 329, 1075006224u, 2863108169u, 3225605506u, 2508274250u, 1078925453u, 184242647u, 0, COSH_TOLERANCE, 0},
+{ 330, 3218167016u, 4080017377u, 3206492941u, 1470284690u, 1072731933u, 456187951u, 0, COSH_TOLERANCE, 0},
+{ 331, 3217606150u, 3867917386u, 1102054928u, 3504746045u, 1072712948u, 2971602982u, 0, COSH_TOLERANCE, 0},
+{ 332, 1070813735u, 2962134101u, 3244741577u, 3390537350u, 1072741394u, 543292184u, 0, COSH_TOLERANCE, 0},
+{ 333, 1077716053u, 1702237980u, 1071598971u, 1102587474u, 1114898104u, 2058865259u, 0, COSH_TOLERANCE, 0},
+{ 334, 3216601606u, 2180218657u, 3211592260u, 1206527853u, 1072698432u, 76209351u, 0, COSH_TOLERANCE, 0},
+{ 335, 3215959112u, 394130786u, 3242511482u, 2437699868u, 1072695251u, 149960380u, 0, COSH_TOLERANCE, 0},
+{ 336, 1066257155u, 849581558u, 3252006507u, 2008614943u, 1072693358u, 4101451221u, 0, COSH_TOLERANCE, 0},
+{ 337, 3218528622u, 3128971673u, 3249137531u, 2773583059u, 1072760788u, 3100318414u, 0, COSH_TOLERANCE, 0},
+{ 338, 1076641258u, 590727700u, 3248651761u, 2183878539u, 1092924806u, 51935964u, 0, COSH_TOLERANCE, 0},
+{ 339, 1080127109u, 820687580u, 3208143496u, 1402434664u, 1282555424u, 2229435922u, 0, COSH_TOLERANCE, 0},
+{ 340, 3229222163u, 1873709254u, 3245167989u, 44275991u, 1701351914u, 2238140986u, 0, COSH_TOLERANCE, 0},
+{ 341, 3213786001u, 1174874204u, 3208263730u, 2360372288u, 1072693364u, 650293763u, 0, COSH_TOLERANCE, 0},
+{ 342, 1081834580u, 937573440u, 3208953761u, 211240241u, 1736830458u, 1339532059u, 0, COSH_TOLERANCE, 0},
+{ 343, 3226771718u, 2469774991u, 1043117070u, 3380071805u, 1196458784u, 2866315288u, 0, COSH_TOLERANCE, 0},
+{ 344, 1069655378u, 442507560u, 3254252803u, 3257889649u, 1072703227u, 3214474808u, 0, COSH_TOLERANCE, 0},
+{ 345, 1071996248u, 1854921625u, 1049810168u, 2729627545u, 1072935760u, 506924846u, 0, COSH_TOLERANCE, 0},
+{ 346, 3229546805u, 4001809575u, 3240128649u, 278261523u, 1821325618u, 2670070781u, 0, COSH_TOLERANCE, 0},
+{ 347, 1077787510u, 1793907966u, 3238955714u, 398859249u, 1116585698u, 3075914843u, 0, COSH_TOLERANCE, 0},
+{ 348, 3216681187u, 2511916952u, 3219195283u, 1697158299u, 1072698939u, 287923426u, 0, COSH_TOLERANCE, 0},
+{ 349, 1073131276u, 3230931724u, 3243897690u, 3508781585u, 1073838825u, 19759326u, 0, COSH_TOLERANCE, 0},
+{ 350, 1081827510u, 1674254897u, 1046547577u, 217148561u, 1734293969u, 3735031445u, 0, COSH_TOLERANCE, 0},
+{ 351, 3218603986u, 3275604304u, 3194840159u, 2991205850u, 1072767839u, 3088730970u, 0, COSH_TOLERANCE, 0},
+{ 352, 3214123743u, 3509997278u, 3248888030u, 3897986511u, 1072693440u, 3421485015u, 0, COSH_TOLERANCE, 0},
+{ 353, 1067105379u, 2156824613u, 1042295665u, 1239257646u, 1072693605u, 1822348699u, 0, COSH_TOLERANCE, 0},
+{ 354, 3219555541u, 1073153314u, 3250031627u, 2567234990u, 1072963776u, 815746145u, 0, COSH_TOLERANCE, 0},
+{ 355, 3213662084u, 4261696995u, 3197784432u, 323702024u, 1072693350u, 809860393u, 0, COSH_TOLERANCE, 0},
+{ 356, 3226913781u, 4075177615u, 3202791065u, 1919006082u, 1209499947u, 316750843u, 0, COSH_TOLERANCE, 0},
+{ 357, 3225638525u, 386429966u, 1086504491u, 3698826164u, 1130089950u, 2126562020u, 0, COSH_TOLERANCE, 0},
+{ 358, 1075181462u, 1681986446u, 3194985869u, 3072950140u, 1079924277u, 2975252779u, 0, COSH_TOLERANCE, 0},
+{ 359, 3220457661u, 3719038997u, 1055433962u, 3331415058u, 1073654972u, 2206416840u, 0, COSH_TOLERANCE, 0},
+{ 360, 1070186897u, 2420250111u, 3238002206u, 1928661079u, 1072714547u, 3530074895u, 0, COSH_TOLERANCE, 0},
+{ 361, 1075622754u, 3679866727u, 3227386672u, 1273835792u, 1082419812u, 3179745956u, 0, COSH_TOLERANCE, 0},
+{ 362, 1065739986u, 2682092368u, 3234222284u, 1325425811u, 1072693307u, 4126875442u, 0, COSH_TOLERANCE, 0},
+{ 363, 1068895525u, 4175172697u, 3208346191u, 2130706153u, 1072697140u, 2173065822u, 0, COSH_TOLERANCE, 0},
+{ 364, 1078458136u, 1200784450u, 1083605096u, 1248595607u, 1144110494u, 3624009342u, 0, COSH_TOLERANCE, 0},
+{ 365, 3219133743u, 1897285171u, 3251296075u, 944966123u, 1072828490u, 2338958613u, 0, COSH_TOLERANCE, 0},
+{ 366, 3225642610u, 2270747330u, 3230692631u, 422503284u, 1130331904u, 3544140092u, 0, COSH_TOLERANCE, 0},
+{ 367, 1076780005u, 2857564741u, 1075647403u, 3308906709u, 1094572049u, 3220041115u, 0, COSH_TOLERANCE, 0},
+{ 368, 3216058010u, 1380066948u, 3232612906u, 2613634294u, 1072695602u, 333718361u, 0, COSH_TOLERANCE, 0},
+{ 369, 1071230888u, 4022784584u, 1060483857u, 3264056381u, 1072778839u, 2084074650u, 0, COSH_TOLERANCE, 0},
+{ 370, 1066657500u, 1778509100u, 3213146285u, 2665833973u, 1072693446u, 202166455u, 0, COSH_TOLERANCE, 0},
+{ 371, 3219873028u, 1859175955u, 1079949560u, 4258450607u, 1073100545u, 4011898678u, 0, COSH_TOLERANCE, 0},
+{ 372, 1067151756u, 4128020197u, 1076266146u, 4122840980u, 1072693624u, 2563901245u, 0, COSH_TOLERANCE, 0},
+{ 373, 3214154683u, 2454653987u, 3229487005u, 2977478685u, 1072693450u, 768721227u, 0, COSH_TOLERANCE, 0},
+{ 374, 3229439235u, 1355181872u, 1095308770u, 436846481u, 1781587330u, 3622868306u, 0, COSH_TOLERANCE, 0},
+{ 375, 3227730934u, 2592856453u, 3247825559u, 3195234082u, 1304719890u, 3199167818u, 0, COSH_TOLERANCE, 0},
+{ 376, 3222118023u, 3554670043u, 1091621009u, 3321236467u, 1077168356u, 697453788u, 0, COSH_TOLERANCE, 0},
+{ 377, 1072158561u, 1936670355u, 1095715713u, 2958468553u, 1072997987u, 174155697u, 0, COSH_TOLERANCE, 0},
+{ 378, 3214311205u, 2960339502u, 1098808013u, 1044068983u, 1072693501u, 258697260u, 0, COSH_TOLERANCE, 0},
+{ 379, 3215565553u, 4093388677u, 1095478112u, 1735930261u, 1072694562u, 3158378439u, 0, COSH_TOLERANCE, 0},
+{ 380, 1078457390u, 1807398746u, 3195743135u, 4261616162u, 1144084329u, 2733988366u, 0, COSH_TOLERANCE, 0},
+{ 381, 3218731378u, 3250576797u, 1059002384u, 3043079652u, 1072780584u, 935135545u, 0, COSH_TOLERANCE, 0},
+{ 382, 1072352837u, 666051428u, 3208765404u, 1912684117u, 1073083167u, 7373407u, 0, COSH_TOLERANCE, 0},
+{ 383, 1081467324u, 1949030179u, 1096388934u, 896459246u, 1601250663u, 4124280137u, 0, COSH_TOLERANCE, 0},
+{ 384, 1068980717u, 622499767u, 1066707637u, 1490260486u, 1072697613u, 1210054685u, 0, COSH_TOLERANCE, 0},
+{ 385, 1081522669u, 1490616165u, 3251242436u, 795675736u, 1621632025u, 1772451300u, 0, COSH_TOLERANCE, 0},
+{ 386, 1075701016u, 3662877092u, 3234317146u, 3200513112u, 1082885283u, 3445827098u, 0, COSH_TOLERANCE, 0},
+{ 387, 1076748754u, 1356101968u, 3236536816u, 3062844611u, 1094157143u, 1389520040u, 0, COSH_TOLERANCE, 0},
+{ 388, 3220971216u, 2284484846u, 3219498359u, 3240896015u, 1074258386u, 2487677987u, 0, COSH_TOLERANCE, 0},
+{ 389, 3225273929u, 494503287u, 1092811254u, 142673998u, 1116669881u, 3833198838u, 0, COSH_TOLERANCE, 0},
+{ 390, 3229057244u, 3394882641u, 3225306538u, 364852125u, 1640439514u, 3261908140u, 0, COSH_TOLERANCE, 0},
+{ 391, 3222116035u, 193885269u, 1088149839u, 1359805831u, 1077163329u, 456192792u, 0, COSH_TOLERANCE, 0},
+{ 392, 3216213422u, 592580907u, 3199560872u, 3086438952u, 1072696298u, 1737542508u, 0, COSH_TOLERANCE, 0},
+{ 393, 1070004424u, 1778008540u, 1049064687u, 73581647u, 1072710179u, 3864358441u, 0, COSH_TOLERANCE, 0},
+{ 394, 3227859230u, 233240285u, 1081923320u, 2710903921u, 1328471353u, 481819950u, 0, COSH_TOLERANCE, 0},
+{ 395, 1072659495u, 3719878805u, 1079866720u, 3615458228u, 1073243085u, 1076099764u, 0, COSH_TOLERANCE, 0},
+{ 396, 3221194724u, 3647632375u, 3247225271u, 3839959621u, 1074610804u, 1304629615u, 0, COSH_TOLERANCE, 0},
+{ 397, 1081381000u, 2232210456u, 3235434773u, 224271737u, 1569318353u, 1467736445u, 0, COSH_TOLERANCE, 0},
+{ 398, 3213975204u, 2134662911u, 3190390590u, 4239009051u, 1072693398u, 3679984553u, 0, COSH_TOLERANCE, 0},
+{ 399, 1075283265u, 2305279897u, 1077668039u, 1854523320u, 1080450496u, 3286724522u, 0, COSH_TOLERANCE, 0},
+{ 400, 3220912835u, 538224650u, 3206153057u, 1379649610u, 1074178663u, 1101193676u, 0, COSH_TOLERANCE, 0},
+{ 401, 3215284875u, 3683897920u, 3244167599u, 3647579469u, 1072694160u, 399053723u, 0, COSH_TOLERANCE, 0},
+{ 402, 1077698021u, 2694093608u, 1042775347u, 598406111u, 1114529526u, 2696598259u, 0, COSH_TOLERANCE, 0},
+{ 403, 3218975424u, 872706833u, 1084802480u, 2200602798u, 1072807936u, 2094320399u, 0, COSH_TOLERANCE, 0},
+{ 404, 1065408269u, 904146293u, 1060867322u, 1729685598u, 1072693283u, 1926681760u, 0, COSH_TOLERANCE, 0},
+{ 405, 3214569338u, 1894173462u, 3232800651u, 191960416u, 1072693597u, 1873608164u, 0, COSH_TOLERANCE, 0},
+{ 406, 1078642431u, 3521028551u, 1054522089u, 3287274359u, 1152594773u, 3672113002u, 0, COSH_TOLERANCE, 0},
+{ 407, 1079658324u, 959640601u, 3201578263u, 4136915018u, 1230574401u, 2234964481u, 0, COSH_TOLERANCE, 0},
+{ 408, 1071345483u, 1553716379u, 1106027987u, 984725765u, 1072791073u, 2060156860u, 0, COSH_TOLERANCE, 0},
+{ 409, 3226249729u, 2287646644u, 3240329321u, 2276183378u, 1158291111u, 3692605402u, 0, COSH_TOLERANCE, 0},
+{ 410, 1072403478u, 3940225170u, 3199544434u, 997572161u, 1073107368u, 2791800044u, 0, COSH_TOLERANCE, 0},
+{ 411, 3219059817u, 36116288u, 3206886566u, 4196602670u, 1072818306u, 2941799181u, 0, COSH_TOLERANCE, 0},
+{ 412, 3225967213u, 3550227562u, 3207257983u, 2747744117u, 1145259564u, 206811308u, 0, COSH_TOLERANCE, 0},
+{ 413, 1081167454u, 507130047u, 1048359321u, 3229888373u, 1490439745u, 2514231187u, 0, COSH_TOLERANCE, 0},
+{ 414, 3221948202u, 2210969014u, 1081031001u, 1946786091u, 1076714590u, 2720043926u, 0, COSH_TOLERANCE, 0},
+{ 415, 3224772654u, 4059150589u, 3189759234u, 1177045799u, 1105086888u, 932381590u, 0, COSH_TOLERANCE, 0},
+{ 416, 1078423548u, 2664812822u, 1050343198u, 2034180320u, 1142469137u, 3731467255u, 0, COSH_TOLERANCE, 0},
+{ 417, 3220070573u, 1175750283u, 3235559706u, 1424491340u, 1073202287u, 696435719u, 0, COSH_TOLERANCE, 0},
+{ 418, 3219147073u, 1630036121u, 3231972785u, 3195479448u, 1072832007u, 59437127u, 0, COSH_TOLERANCE, 0},
+{ 419, 1077846963u, 2527029044u, 1046927050u, 4000723255u, 1117940775u, 3673409802u, 0, COSH_TOLERANCE, 0},
+{ 420, 1076820069u, 3335703647u, 3237349676u, 3869440059u, 1094992333u, 786911050u, 0, COSH_TOLERANCE, 0},
+{ 421, 1078850936u, 3888398377u, 3196041693u, 1290567220u, 1162199139u, 1366973945u, 0, COSH_TOLERANCE, 0},
+{ 422, 1071921950u, 3242451480u, 3248384948u, 707431021u, 1072909878u, 2311264482u, 0, COSH_TOLERANCE, 0},
+{ 423, 1075890477u, 2739665123u, 1060777905u, 1733073225u, 1084309432u, 2275080127u, 0, COSH_TOLERANCE, 0},
+{ 424, 1075371333u, 1297274853u, 3208848704u, 3341639139u, 1081035738u, 1933977641u, 0, COSH_TOLERANCE, 0},
+{ 425, 1066493885u, 2228057309u, 1084318902u, 1317851136u, 1072693399u, 2039076730u, 0, COSH_TOLERANCE, 0},
+{ 426, 1077769567u, 270039934u, 3241414679u, 3063626339u, 1116118793u, 251426608u, 0, COSH_TOLERANCE, 0},
+{ 427, 3220226926u, 83062251u, 3211262173u, 2659016437u, 1073323369u, 97426660u, 0, COSH_TOLERANCE, 0},
+{ 428, 1080015246u, 3833539373u, 3206667189u, 1567476111u, 1263591609u, 3066665016u, 0, COSH_TOLERANCE, 0},
+{ 429, 3217777984u, 2382776852u, 3249232579u, 1546622468u, 1072717356u, 1187260252u, 0, COSH_TOLERANCE, 0},
+{ 430, 1076099255u, 1714300821u, 1104130938u, 4167591598u, 1086665941u, 3409246207u, 0, COSH_TOLERANCE, 0},
+{ 431, 1067869976u, 2798720100u, 1086978789u, 449990704u, 1072694251u, 3968003626u, 0, COSH_TOLERANCE, 0},
+{ 432, 3223858383u, 4039516226u, 3244344107u, 4272932619u, 1089843021u, 3071656581u, 0, COSH_TOLERANCE, 0},
+{ 433, 3221659865u, 1683007544u, 1091105663u, 3805494321u, 1075903190u, 1030888557u, 0, COSH_TOLERANCE, 0},
+{ 434, 3220852948u, 2072627412u, 1094383324u, 3394151662u, 1074101667u, 3593583933u, 0, COSH_TOLERANCE, 0},
+{ 435, 3220570024u, 1120106427u, 3223631624u, 3404608264u, 1073796246u, 3485288401u, 0, COSH_TOLERANCE, 0},
+{ 436, 1078985629u, 559918757u, 3205077053u, 908100198u, 1168462131u, 348797896u, 0, COSH_TOLERANCE, 0},
+{ 437, 1065746590u, 2026673913u, 3244833635u, 2844573214u, 1072693308u, 2207107495u, 0, COSH_TOLERANCE, 0},
+{ 438, 3229401435u, 3946837259u, 3234993796u, 3850406820u, 1767580525u, 957246048u, 0, COSH_TOLERANCE, 0},
+{ 439, 1070062721u, 3139330994u, 1046133568u, 1539650690u, 1072711520u, 2060768029u, 0, COSH_TOLERANCE, 0},
+{ 440, 3225171164u, 1554593884u, 3228899878u, 2813752562u, 1114234730u, 1205533002u, 0, COSH_TOLERANCE, 0},
+{ 441, 1069087916u, 3804703138u, 1072931071u, 2053677923u, 1072698246u, 3320923600u, 0, COSH_TOLERANCE, 0},
+{ 442, 3227038507u, 289355864u, 1078453818u, 2143066338u, 1221015905u, 3978063874u, 0, COSH_TOLERANCE, 0},
+{ 443, 3216522792u, 2157691971u, 1106629150u, 110806409u, 1072697953u, 960655341u, 0, COSH_TOLERANCE, 0},
+{ 444, 1075865563u, 3570399481u, 1085637605u, 180265334u, 1083999917u, 1645379652u, 0, COSH_TOLERANCE, 0},
+{ 445, 3216708822u, 558779875u, 3202046748u, 2338464653u, 1072699120u, 2955459390u, 0, COSH_TOLERANCE, 0},
+{ 446, 1066676984u, 1703969219u, 3229797258u, 1417521063u, 1072693452u, 36466462u, 0, COSH_TOLERANCE, 0},
+{ 447, 3225199349u, 3917440951u, 1051668894u, 3736066983u, 1114891095u, 1562528722u, 0, COSH_TOLERANCE, 0},
+{ 448, 1071043536u, 3106613409u, 1066627453u, 2735392257u, 1072760657u, 2979979981u, 0, COSH_TOLERANCE, 0},
+{ 449, 1071956828u, 2229777605u, 1065061963u, 2405869925u, 1072921828u, 2085659379u, 0, COSH_TOLERANCE, 0},
+{ 450, 3225831741u, 3967957902u, 1057416138u, 3459188071u, 1138999578u, 515773066u, 0, COSH_TOLERANCE, 0},
+{ 451, 1071784938u, 3699016825u, 3249713090u, 796144848u, 1072866292u, 3094171396u, 0, COSH_TOLERANCE, 0},
+{ 452, 3222524940u, 3285165564u, 3211948811u, 401510871u, 1079100907u, 4162441846u, 0, COSH_TOLERANCE, 0},
+{ 453, 1078529018u, 634857910u, 3199607513u, 914218057u, 1147357727u, 2060143941u, 0, COSH_TOLERANCE, 0},
+{ 454, 1076403304u, 2030735578u, 3233855943u, 965677531u, 1090189121u, 3806649244u, 0, COSH_TOLERANCE, 0},
+{ 455, 1075362511u, 3957229084u, 1051050470u, 3123776651u, 1080967868u, 916230154u, 0, COSH_TOLERANCE, 0},
+{ 456, 3221863333u, 162122081u, 3239376395u, 108064594u, 1076427741u, 411926356u, 0, COSH_TOLERANCE, 0},
+{ 457, 3224688874u, 869031839u, 3225020876u, 1344301606u, 1103158924u, 668835625u, 0, COSH_TOLERANCE, 0},
+{ 458, 3219676354u, 946696117u, 3231825228u, 1700703647u, 1073012096u, 2213580531u, 0, COSH_TOLERANCE, 0},
+{ 459, 1074444299u, 3394168074u, 1076939786u, 1666995668u, 1076641844u, 156593023u, 0, COSH_TOLERANCE, 0},
+{ 460, 3218211979u, 2488789804u, 3238508333u, 1506943664u, 1072735077u, 153972805u, 0, COSH_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1073381700u, 2049645902u, 0, COSH_TOLERANCE, 0},
+{ 462, 3220983118u, 1244307192u, 3191297711u, 2540916692u, 1074275226u, 1512921118u, 0, COSH_TOLERANCE, 0},
+{ 463, 3215791332u, 2871645739u, 3239081581u, 1440249115u, 1072694939u, 4017423074u, 0, COSH_TOLERANCE, 0},
+{ 464, 1072544937u, 1231934926u, 3236746788u, 603977748u, 1073179537u, 210999427u, 0, COSH_TOLERANCE, 0},
+{ 465, 3214324057u, 2386312545u, 1063169277u, 2715234268u, 1072693505u, 2110999964u, 0, COSH_TOLERANCE, 0},
+{ 466, 1077317658u, 915867083u, 1046790892u, 3347417612u, 1105687206u, 2072797994u, 0, COSH_TOLERANCE, 0},
+{ 467, 1081866940u, 3553288373u, 1065698616u, 2906680663u, 1748821447u, 2025279999u, 0, COSH_TOLERANCE, 0},
+{ 468, 1066477746u, 2342364630u, 1051356723u, 4019093203u, 1072693395u, 939076334u, 0, COSH_TOLERANCE, 0},
+{ 469, 3216897802u, 2911548084u, 1105282515u, 2476735795u, 1072700439u, 1795805145u, 0, COSH_TOLERANCE, 0},
+{ 470, 1068298564u, 1836216409u, 1101062307u, 2519592554u, 1072694923u, 3337330369u, 0, COSH_TOLERANCE, 0},
+{ 471, 1073323889u, 1235369496u, 3222946447u, 668087854u, 1074046359u, 2670613655u, 0, COSH_TOLERANCE, 0},
+{ 472, 3217991780u, 2981820811u, 1059838516u, 2845580478u, 1072723468u, 3674700934u, 0, COSH_TOLERANCE, 0},
+{ 473, 3214902934u, 1565550570u, 3217165795u, 4162017137u, 1072693744u, 4188183367u, 0, COSH_TOLERANCE, 0},
+{ 474, 3224668466u, 2808968027u, 1055630096u, 1782326814u, 1102624261u, 4229492206u, 0, COSH_TOLERANCE, 0},
+{ 475, 1069305614u, 1492622658u, 3216653077u, 3972512122u, 1072699665u, 2777581694u, 0, COSH_TOLERANCE, 0},
+{ 476, 3222171679u, 2722693603u, 3227814791u, 3169731970u, 1077311445u, 16711136u, 0, COSH_TOLERANCE, 0},
+{ 477, 3221052359u, 899763203u, 3207606001u, 2804747833u, 1074377307u, 3651199518u, 0, COSH_TOLERANCE, 0},
+{ 478, 3223330293u, 3789058912u, 3228095081u, 4135937628u, 1083748658u, 1647653733u, 0, COSH_TOLERANCE, 0},
+{ 479, 1069636566u, 1682808307u, 3206960335u, 232877759u, 1072702905u, 922243855u, 0, COSH_TOLERANCE, 0},
+{ 480, 3226362846u, 2851963139u, 3246852961u, 2590862592u, 1163510742u, 2280263532u, 0, COSH_TOLERANCE, 0},
+{ 481, 1074908950u, 2422232642u, 3234779662u, 290458310u, 1078293793u, 402749758u, 0, COSH_TOLERANCE, 0},
+{ 482, 3219059686u, 1082582386u, 1075605675u, 2602133689u, 1072818290u, 1078745978u, 0, COSH_TOLERANCE, 0},
+{ 483, 3226187123u, 1789635787u, 1059414278u, 1048286093u, 1155460262u, 3672708776u, 0, COSH_TOLERANCE, 0},
+{ 484, 1079456174u, 231339448u, 1055573265u, 504907415u, 1211943927u, 57355760u, 0, COSH_TOLERANCE, 0},
+{ 485, 1071600069u, 1153251200u, 3204617090u, 1772013857u, 1072821329u, 3016594082u, 0, COSH_TOLERANCE, 0},
+{ 486, 1080676687u, 1082898276u, 3212089272u, 1449080862u, 1384085102u, 3383991944u, 0, COSH_TOLERANCE, 0},
+{ 487, 1076571101u, 3177299045u, 1058862813u, 809400815u, 1092108370u, 1324460299u, 0, COSH_TOLERANCE, 0},
+{ 488, 3223514518u, 1924429710u, 1056464743u, 3349283177u, 1085877225u, 3373580267u, 0, COSH_TOLERANCE, 0},
+{ 489, 3226599023u, 42238036u, 1042379500u, 2113559863u, 1180474780u, 3625179367u, 0, COSH_TOLERANCE, 0},
+{ 490, 1071052699u, 3304403230u, 3217556703u, 58952646u, 1072761494u, 3681600331u, 0, COSH_TOLERANCE, 0},
+{ 491, 3218960986u, 1645486982u, 3224301095u, 3636267471u, 1072806209u, 2824736299u, 0, COSH_TOLERANCE, 0},
+{ 492, 1071150617u, 619402181u, 3235208235u, 557360557u, 1072770774u, 2233898320u, 0, COSH_TOLERANCE, 0},
+{ 493, 3225655482u, 110029735u, 1046937383u, 984375729u, 1130844976u, 58252944u, 0, COSH_TOLERANCE, 0},
+{ 494, 3213613986u, 4063688092u, 3203235744u, 1049950343u, 1072693345u, 41676873u, 0, COSH_TOLERANCE, 0},
+{ 495, 1070739227u, 650996069u, 1054971928u, 3953359826u, 1072735857u, 3162766617u, 0, COSH_TOLERANCE, 0},
+{ 496, 3222861501u, 66926332u, 1090561839u, 1379780888u, 1081084622u, 865857900u, 0, COSH_TOLERANCE, 0},
+{ 497, 3224016123u, 2803378256u, 1086057989u, 498534626u, 1091702709u, 731355363u, 0, COSH_TOLERANCE, 0},
+{ 498, 1076327097u, 2846400785u, 1047142525u, 1375153550u, 1089349462u, 3404991026u, 0, COSH_TOLERANCE, 0},
+{ 499, 1066601297u, 2869128958u, 1070972315u, 4246440273u, 1072693429u, 1487293915u, 0, COSH_TOLERANCE, 0},
+{ 500, 1067561146u, 3112381207u, 1044430965u, 3981604561u, 1072693873u, 4119638393u, 0, COSH_TOLERANCE, 0},
+{ 501, 3223914965u, 243303420u, 1093735824u, 1575581926u, 1090564624u, 2235997569u, 0, COSH_TOLERANCE, 0},
+{ 502, 3225506509u, 3218865041u, 3204803496u, 3840388050u, 1124051660u, 1649385448u, 0, COSH_TOLERANCE, 0},
+{ 503, 1067289799u, 336846959u, 1052664471u, 3798336786u, 1072693684u, 2701401211u, 0, COSH_TOLERANCE, 0},
+{ 504, 1068537148u, 3639240976u, 1081202165u, 1844741676u, 1072695448u, 3117267659u, 0, COSH_TOLERANCE, 0},
+{ 505, 3218196249u, 717293069u, 3211534283u, 582401011u, 1072733962u, 3794010205u, 0, COSH_TOLERANCE, 0},
+{ 506, 3228893840u, 3766248610u, 3196520332u, 1174437546u, 1580170719u, 1400243038u, 0, COSH_TOLERANCE, 0},
+{ 507, 1076091194u, 756959182u, 3204099341u, 1581804034u, 1086583042u, 1991670922u, 0, COSH_TOLERANCE, 0},
+{ 508, 3217340780u, 3560686300u, 3220980617u, 4277975772u, 1072707021u, 4141250989u, 0, COSH_TOLERANCE, 0},
+{ 509, 3218294684u, 2598148853u, 3217622194u, 3460421008u, 1072741187u, 2314974653u, 0, COSH_TOLERANCE, 0},
+{ 510, 1071963704u, 136600515u, 3209934920u, 3340653128u, 1072924225u, 3332847417u, 0, COSH_TOLERANCE, 0},
+{ 511, 1078994518u, 1045480938u, 3251354609u, 4133432965u, 1169315390u, 1471292306u, 0, COSH_TOLERANCE, 0},
+{ 512, 1077967943u, 1630207738u, 3239996829u, 2393354808u, 1121432564u, 2643918337u, 0, COSH_TOLERANCE, 0},
+{ 513, 3213694690u, 3739770117u, 1059520750u, 3959551225u, 1072693353u, 3332559954u, 0, COSH_TOLERANCE, 0},
+{ 514, 3223390473u, 1498861716u, 1091297147u, 847410798u, 1084459592u, 850649703u, 0, COSH_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 1074299949u, 1095073224u, 0, COSH_TOLERANCE, 0},
+{ 516, 1069529329u, 2353103845u, 3235718771u, 2978889966u, 1072701308u, 3479226514u, 0, COSH_TOLERANCE, 0},
+{ 517, 3229337896u, 1546972125u, 3249076079u, 1987349196u, 1744100073u, 982927834u, 0, COSH_TOLERANCE, 0},
+{ 518, 3225636601u, 2769161072u, 1075207126u, 292616282u, 1129986069u, 2356402899u, 0, COSH_TOLERANCE, 0},
+{ 519, 3215440938u, 36855311u, 1052128202u, 1479039342u, 1072694374u, 3881612387u, 0, COSH_TOLERANCE, 0},
+{ 520, 1076417021u, 2027463605u, 1066023013u, 3369686340u, 1090384091u, 1056865571u, 0, COSH_TOLERANCE, 0},
+{ 521, 3215678541u, 3808681655u, 1054161346u, 1821773119u, 1072694745u, 2393129015u, 0, COSH_TOLERANCE, 0},
+{ 522, 1065851752u, 3175490326u, 3226879970u, 845687760u, 1072693317u, 2845297936u, 0, COSH_TOLERANCE, 0},
+{ 523, 1065371665u, 3124482451u, 3242748377u, 3259417226u, 1072693281u, 584816684u, 0, COSH_TOLERANCE, 0},
+{ 524, 1067265791u, 2751606436u, 3236210939u, 3923142740u, 1072693673u, 3735488274u, 0, COSH_TOLERANCE, 0},
+{ 525, 1079966097u, 2016872044u, 3228408064u, 4201274408u, 1259005133u, 2351383485u, 0, COSH_TOLERANCE, 0},
+{ 526, 3215077894u, 1019916843u, 3219974785u, 1977881787u, 1072693910u, 925185854u, 0, COSH_TOLERANCE, 0},
+{ 527, 3215207392u, 2060433318u, 1075872515u, 366073725u, 1072694061u, 3760406008u, 0, COSH_TOLERANCE, 0},
+{ 528, 3213200653u, 1098469906u, 1082900695u, 2349346832u, 1072693306u, 241149696u, 0, COSH_TOLERANCE, 0},
+{ 529, 3218363315u, 3011196295u, 3252479932u, 2459281672u, 1072746581u, 3475756260u, 0, COSH_TOLERANCE, 0},
+{ 530, 3221334323u, 2843222682u, 1089275809u, 298982001u, 1074948209u, 2454086122u, 0, COSH_TOLERANCE, 0},
+{ 531, 1080766178u, 914741728u, 3203468059u, 2833809843u, 1400546649u, 1543027566u, 0, COSH_TOLERANCE, 0},
+{ 532, 3225229542u, 1274901962u, 3241535845u, 3759113509u, 1115653811u, 3663915975u, 0, COSH_TOLERANCE, 0},
+{ 533, 3227042074u, 2134927252u, 3253802671u, 3013731444u, 1221386155u, 696872014u, 0, COSH_TOLERANCE, 0},
+{ 534, 1080326973u, 2230655177u, 3254510616u, 1249674366u, 1319431604u, 3545707614u, 0, COSH_TOLERANCE, 0},
+{ 535, 1071359861u, 717357389u, 1083533731u, 3746683362u, 1072792668u, 2873103559u, 0, COSH_TOLERANCE, 0},
+{ 536, 3220064570u, 834976849u, 3217357661u, 2465861779u, 1073198996u, 2186293239u, 0, COSH_TOLERANCE, 0},
+{ 537, 1066627637u, 1385714428u, 1053358395u, 3007113740u, 1072693437u, 350440274u, 0, COSH_TOLERANCE, 0},
+{ 538, 1068353711u, 599268545u, 3201368210u, 2309854744u, 1072695022u, 2853715097u, 0, COSH_TOLERANCE, 0},
+{ 539, 1073100182u, 2840234388u, 3232496515u, 333365983u, 1073809120u, 943021507u, 0, COSH_TOLERANCE, 0},
+{ 540, 1066894301u, 3136078996u, 3194520860u, 2650572904u, 1072693524u, 2113824954u, 0, COSH_TOLERANCE, 0},
+{ 541, 3224250507u, 2405805086u, 3251640319u, 324233833u, 1094385400u, 243647767u, 0, COSH_TOLERANCE, 0},
+{ 542, 1081533322u, 2589598340u, 3254677807u, 952438812u, 1625576728u, 2555502454u, 0, COSH_TOLERANCE, 0},
+{ 543, 3213232021u, 1922837702u, 3216892718u, 3535907549u, 1072693308u, 2850257966u, 0, COSH_TOLERANCE, 0},
+{ 544, 3226838652u, 261447440u, 3209805849u, 1150571079u, 1202630263u, 3739940447u, 0, COSH_TOLERANCE, 0},
+{ 545, 1079028016u, 4026487528u, 1073152064u, 27340691u, 1172419967u, 273403284u, 0, COSH_TOLERANCE, 0},
+{ 546, 3222832236u, 338765118u, 1086225786u, 3207238249u, 1080865281u, 1988978339u, 0, COSH_TOLERANCE, 0},
+{ 547, 3215057071u, 1085283176u, 3187775111u, 1601194210u, 1072693887u, 1234434999u, 0, COSH_TOLERANCE, 0},
+{ 548, 1078937261u, 3031712790u, 3252307859u, 170666844u, 1166209488u, 3602398320u, 0, COSH_TOLERANCE, 0},
+{ 549, 3220959383u, 3148395674u, 1041913758u, 3306391490u, 1074241844u, 1170600793u, 0, COSH_TOLERANCE, 0},
+{ 550, 3217005710u, 2205233857u, 3208100078u, 3993195511u, 1072701252u, 2077853917u, 0, COSH_TOLERANCE, 0},
+{ 551, 1071893912u, 4282766727u, 1072820377u, 1874778218u, 1072900526u, 122630446u, 0, COSH_TOLERANCE, 0},
+{ 552, 3218173124u, 2920860798u, 3218070226u, 3104066154u, 1072732352u, 3593381418u, 0, COSH_TOLERANCE, 0},
+{ 553, 3217533263u, 969991373u, 3250596895u, 1734386152u, 1072711214u, 2580159905u, 0, COSH_TOLERANCE, 0},
+{ 554, 3226332906u, 1218740205u, 3239802737u, 2610078504u, 1162127953u, 443854413u, 0, COSH_TOLERANCE, 0},
+{ 555, 3217565578u, 1485218325u, 3220870240u, 3591664613u, 1072711973u, 2041209195u, 0, COSH_TOLERANCE, 0},
+{ 556, 3216754207u, 690157417u, 3190850619u, 4192347699u, 1072699425u, 761927835u, 0, COSH_TOLERANCE, 0},
+{ 557, 1079276594u, 4009839784u, 1079670252u, 394167192u, 1195402369u, 2525536651u, 0, COSH_TOLERANCE, 0},
+{ 558, 3225122053u, 961532417u, 1092588071u, 2923790239u, 1113093443u, 609779704u, 0, COSH_TOLERANCE, 0},
+{ 559, 3216462003u, 4174125604u, 1050682630u, 2169701868u, 1072697599u, 3489469939u, 0, COSH_TOLERANCE, 0},
+{ 560, 3227363835u, 4146748230u, 1087373950u, 2481478351u, 1251094158u, 2672248790u, 0, COSH_TOLERANCE, 0},
+{ 561, 1073842138u, 3984715440u, 1050421618u, 2446142566u, 1074929194u, 4289031035u, 0, COSH_TOLERANCE, 0},
+{ 562, 1076832374u, 936290150u, 1100614426u, 3625806370u, 1095122996u, 79506389u, 0, COSH_TOLERANCE, 0},
+{ 563, 1080913584u, 1866615265u, 3215651428u, 2337013350u, 1427761572u, 2464900529u, 0, COSH_TOLERANCE, 0},
+{ 564, 3229081054u, 712227971u, 1106004723u, 973148499u, 1649293146u, 2977854696u, 0, COSH_TOLERANCE, 0},
+{ 565, 3223796743u, 3409813738u, 3244817008u, 1933503498u, 1089149243u, 2552950095u, 0, COSH_TOLERANCE, 0},
+{ 566, 1075749429u, 3180389060u, 3228735703u, 83422217u, 1083215044u, 462445497u, 0, COSH_TOLERANCE, 0},
+{ 567, 1074732996u, 556972671u, 3204582372u, 841555801u, 1077443176u, 1826489999u, 0, COSH_TOLERANCE, 0},
+{ 568, 1072864873u, 4189151332u, 1080874032u, 706326922u, 1073487027u, 3634656193u, 0, COSH_TOLERANCE, 0},
+{ 569, 1079374091u, 198291836u, 1057281892u, 2188836928u, 1204328207u, 2535783908u, 0, COSH_TOLERANCE, 0},
+{ 570, 1074946267u, 1219449298u, 3228734687u, 3504562743u, 1078508868u, 3068106638u, 0, COSH_TOLERANCE, 0},
+{ 571, 3217153376u, 1776099219u, 1094316777u, 4188083896u, 1072703477u, 1585085350u, 0, COSH_TOLERANCE, 0},
+{ 572, 3214817228u, 2614400266u, 1073750227u, 3003203347u, 1072693704u, 2559210418u, 0, COSH_TOLERANCE, 0},
+{ 573, 3219225558u, 2959351406u, 1105603716u, 311851587u, 1072853689u, 712516923u, 0, COSH_TOLERANCE, 0},
+{ 574, 1076155826u, 865443613u, 1097532516u, 3622237781u, 1087394673u, 3547871343u, 0, COSH_TOLERANCE, 0},
+{ 575, 3223398058u, 447506102u, 3195759295u, 3603669725u, 1084535881u, 3942095505u, 0, COSH_TOLERANCE, 0},
+{ 576, 1079015805u, 3934398273u, 1040996422u, 2968621268u, 1171312413u, 1233059955u, 0, COSH_TOLERANCE, 0},
+{ 577, 3215614193u, 784208771u, 1088764788u, 2182296421u, 1072694639u, 4197891501u, 0, COSH_TOLERANCE, 0},
+{ 578, 3228409347u, 1527590526u, 3206961556u, 2823164069u, 1430023448u, 2977499390u, 0, COSH_TOLERANCE, 0},
+{ 579, 3225109795u, 3876699591u, 3207481130u, 4028148535u, 1112820018u, 4290703953u, 0, COSH_TOLERANCE, 0},
+{ 580, 1076236154u, 2164249756u, 1059857743u, 1785169952u, 1088299515u, 3030929114u, 0, COSH_TOLERANCE, 0},
+{ 581, 1078172521u, 2079273665u, 1080303860u, 625760474u, 1130877384u, 2820657748u, 0, COSH_TOLERANCE, 0},
+{ 582, 3222291804u, 3636214836u, 1068367620u, 2932621925u, 1077753994u, 327873440u, 0, COSH_TOLERANCE, 0},
+{ 583, 1066015468u, 4274131512u, 1047707755u, 92550763u, 1072693333u, 799714962u, 0, COSH_TOLERANCE, 0},
+{ 584, 3215599337u, 2648933384u, 1084603503u, 3534304873u, 1072694616u, 652218503u, 0, COSH_TOLERANCE, 0},
+{ 585, 1070854691u, 3216750767u, 3191088629u, 547482628u, 1072744584u, 2911958539u, 0, COSH_TOLERANCE, 0},
+{ 586, 1070521958u, 1420360746u, 1080063101u, 1690029499u, 1072723888u, 941039659u, 0, COSH_TOLERANCE, 0},
+{ 587, 3223563908u, 1908572179u, 1080112083u, 1228319033u, 1086478448u, 1758442849u, 0, COSH_TOLERANCE, 0},
+{ 588, 1067032546u, 500312015u, 3212368508u, 3864619086u, 1072693576u, 1399130808u, 0, COSH_TOLERANCE, 0},
+{ 589, 3221335610u, 4211343447u, 1087492676u, 4272583781u, 1074951104u, 2361482956u, 0, COSH_TOLERANCE, 0},
+{ 590, 1080518026u, 2382118000u, 1042665328u, 567154882u, 1354785044u, 2043686521u, 0, COSH_TOLERANCE, 0},
+{ 591, 1069547778u, 1435344339u, 3216303171u, 2275988178u, 1072701454u, 3091158837u, 0, COSH_TOLERANCE, 0},
+{ 592, 3219781499u, 3403659753u, 3218043030u, 1926480488u, 1073057838u, 4175444865u, 0, COSH_TOLERANCE, 0},
+{ 593, 1074743231u, 1198845185u, 3225556149u, 1130089684u, 1077474775u, 701774850u, 0, COSH_TOLERANCE, 0},
+{ 594, 3221614466u, 2183928090u, 1048403956u, 963834821u, 1075784139u, 1781731416u, 0, COSH_TOLERANCE, 0},
+{ 595, 1080701440u, 2120625396u, 1041006976u, 2137548527u, 1388588575u, 2814596158u, 0, COSH_TOLERANCE, 0},
+{ 596, 1080355870u, 586700956u, 1059670521u, 303891699u, 1324761751u, 2561465523u, 0, COSH_TOLERANCE, 0},
+{ 597, 3221091650u, 2509132460u, 1102827530u, 2205707903u, 1074438471u, 4293296615u, 0, COSH_TOLERANCE, 0},
+{ 598, 3217443509u, 1229308263u, 3209170414u, 4206576047u, 1072709189u, 3659228835u, 0, COSH_TOLERANCE, 0},
+{ 599, 3221979137u, 4078010749u, 3199236456u, 733478972u, 1076831279u, 1826871371u, 0, COSH_TOLERANCE, 0},
+{ 600, 3215538376u, 4277541051u, 3199806921u, 397102023u, 1072694520u, 2308144239u, 0, COSH_TOLERANCE, 0},
+{ 601, 3214849381u, 900999594u, 3234720188u, 2530214248u, 1072693719u, 2334938475u, 0, COSH_TOLERANCE, 0},
+{ 602, 1074446396u, 4000609478u, 1096577064u, 4148592328u, 1076649246u, 103153889u, 0, COSH_TOLERANCE, 0},
+{ 603, 1067542452u, 2154187873u, 3224392607u, 3957250362u, 1072693853u, 4008151472u, 0, COSH_TOLERANCE, 0},
+{ 604, 3221316336u, 2867079200u, 1101870326u, 921212001u, 1074908512u, 2509700010u, 0, COSH_TOLERANCE, 0},
+{ 605, 3223784706u, 674547716u, 1063216239u, 3929755226u, 1088993407u, 3179222759u, 0, COSH_TOLERANCE, 0},
+{ 606, 3225735787u, 3158182449u, 1043794244u, 3259056345u, 1134618609u, 4149902865u, 0, COSH_TOLERANCE, 0},
+{ 607, 3225242320u, 3002823940u, 1059511739u, 2832435794u, 1115891743u, 2207198717u, 0, COSH_TOLERANCE, 0},
+{ 608, 3220450550u, 2196511929u, 1049973941u, 3672092877u, 1073643386u, 2318601716u, 0, COSH_TOLERANCE, 0},
+{ 609, 1068263848u, 3655292191u, 1086438127u, 3567072906u, 1072694862u, 4213993228u, 0, COSH_TOLERANCE, 0},
+{ 610, 3227458308u, 1617573614u, 3201863123u, 3090723732u, 1259777410u, 3864691446u, 0, COSH_TOLERANCE, 0},
+{ 611, 3223764196u, 679893506u, 3211547753u, 824081024u, 1088758736u, 857579464u, 0, COSH_TOLERANCE, 0},
+{ 612, 1076947613u, 2285242807u, 1084999409u, 2221731406u, 1097150618u, 2093305440u, 0, COSH_TOLERANCE, 0},
+{ 613, 3217219424u, 1935990727u, 1088822246u, 1058156518u, 1072704666u, 953435733u, 0, COSH_TOLERANCE, 0},
+{ 614, 1080819070u, 521023584u, 1059186903u, 4245163857u, 1410372185u, 1987577595u, 0, COSH_TOLERANCE, 0},
+{ 615, 1081871044u, 2312887617u, 3191771354u, 1885370807u, 1750314185u, 485435265u, 0, COSH_TOLERANCE, 0},
+{ 616, 3228836567u, 1796441468u, 1100030327u, 2772711004u, 1558966124u, 2025534396u, 0, COSH_TOLERANCE, 0},
+{ 617, 3216859732u, 2095685003u, 1077984448u, 2100773742u, 1072700162u, 4253902229u, 0, COSH_TOLERANCE, 0},
+{ 618, 3213926140u, 2892538035u, 1042396334u, 4162200338u, 1072693386u, 569374073u, 0, COSH_TOLERANCE, 0},
+{ 619, 3226997111u, 2177698116u, 3227557177u, 150832500u, 1217246100u, 1325856495u, 0, COSH_TOLERANCE, 0},
+{ 620, 3213582312u, 607966734u, 3236250630u, 4164600559u, 1072693341u, 2889359002u, 0, COSH_TOLERANCE, 0},
+{ 621, 3219535540u, 2830122967u, 1046096700u, 3713346883u, 1072956203u, 1374575132u, 0, COSH_TOLERANCE, 0},
+{ 622, 3224615051u, 2314640506u, 3203696416u, 3276228872u, 1101389827u, 2072666780u, 0, COSH_TOLERANCE, 0},
+{ 623, 3219203763u, 469331883u, 3249037349u, 2999233437u, 1072847499u, 1996240604u, 0, COSH_TOLERANCE, 0},
+{ 624, 1079556219u, 560886625u, 1091899487u, 748795120u, 1221147643u, 1766795176u, 0, COSH_TOLERANCE, 0},
+{ 625, 1067712650u, 2958421324u, 1092569414u, 3235243477u, 1072694048u, 1164281115u, 0, COSH_TOLERANCE, 0},
+{ 626, 3213998017u, 3221475559u, 1043038304u, 915608434u, 1072693404u, 4140936154u, 0, COSH_TOLERANCE, 0},
+{ 627, 1073294682u, 3007808652u, 3216682290u, 2531019474u, 1074012135u, 896886954u, 0, COSH_TOLERANCE, 0},
+{ 628, 3226300359u, 1767658578u, 3237045269u, 2313128318u, 1160682881u, 3225971130u, 0, COSH_TOLERANCE, 0},
+{ 629, 3219006500u, 1926845182u, 1066835624u, 1783256828u, 1072811700u, 601434355u, 0, COSH_TOLERANCE, 0},
+{ 630, 1065741453u, 90378038u, 1057168870u, 164358218u, 1072693308u, 358383822u, 0, COSH_TOLERANCE, 0},
+{ 631, 1081693348u, 1610524680u, 1085283851u, 2903496007u, 1684679818u, 520929572u, 0, COSH_TOLERANCE, 0},
+{ 632, 1075489858u, 4274321404u, 3202913591u, 720121831u, 1081645052u, 1137073838u, 0, COSH_TOLERANCE, 0},
+{ 633, 1067982472u, 2034778236u, 1071133763u, 1413236391u, 1072694411u, 2978736869u, 0, COSH_TOLERANCE, 0},
+{ 634, 1067840244u, 1489112261u, 1076691395u, 348210906u, 1072694211u, 2870609134u, 0, COSH_TOLERANCE, 0},
+{ 635, 3217229677u, 2797651324u, 3224410527u, 2374818327u, 1072704856u, 2869857501u, 0, COSH_TOLERANCE, 0},
+{ 636, 1077801496u, 1823161666u, 3197810695u, 3119680047u, 1116891443u, 2045262415u, 0, COSH_TOLERANCE, 0},
+{ 637, 1072218792u, 3420950657u, 1087084743u, 2136638961u, 1073023120u, 888020177u, 0, COSH_TOLERANCE, 0},
+{ 638, 1073047952u, 3554566429u, 1062907717u, 2736702589u, 1073761419u, 2894883977u, 0, COSH_TOLERANCE, 0},
+{ 639, 3227062875u, 2928437580u, 3187765027u, 1393427873u, 1223274893u, 1790477232u, 0, COSH_TOLERANCE, 0},
+{ 640, 3218738745u, 189447067u, 1051643315u, 828663513u, 1072781353u, 367269471u, 0, COSH_TOLERANCE, 0},
+{ 641, 1068042509u, 2852350928u, 1045683757u, 673354280u, 1072694501u, 3387685354u, 0, COSH_TOLERANCE, 0},
+{ 642, 1065966397u, 3589563265u, 3248741629u, 812657927u, 1072693328u, 1586913836u, 0, COSH_TOLERANCE, 0},
+{ 643, 3213679498u, 1766416701u, 1100392103u, 2185373290u, 1072693352u, 415400947u, 0, COSH_TOLERANCE, 0},
+{ 644, 3220275389u, 3763582673u, 3191965790u, 388374829u, 1073385772u, 4240820449u, 0, COSH_TOLERANCE, 0},
+{ 645, 1075440832u, 1187403069u, 1075300235u, 336640304u, 1081370125u, 3682779662u, 0, COSH_TOLERANCE, 0},
+{ 646, 1081906155u, 1718795752u, 3243118752u, 683369237u, 1763270328u, 2150807698u, 0, COSH_TOLERANCE, 0},
+{ 647, 3218132129u, 1863545307u, 1069449477u, 3418627399u, 1072729579u, 3284902905u, 0, COSH_TOLERANCE, 0},
+{ 648, 1072747022u, 3295607249u, 1068878592u, 1633297809u, 1073328061u, 1666517126u, 0, COSH_TOLERANCE, 0},
+{ 649, 1070481463u, 2585980994u, 3236670483u, 1286750688u, 1072722668u, 848603239u, 0, COSH_TOLERANCE, 0},
+{ 650, 1067128553u, 15816845u, 3233249283u, 2491924775u, 1072693614u, 4044617895u, 0, COSH_TOLERANCE, 0},
+{ 651, 1065481693u, 1051983351u, 1049180786u, 1474421917u, 1072693288u, 1384210764u, 0, COSH_TOLERANCE, 0},
+{ 652, 3216978165u, 2003816032u, 1086050104u, 668090487u, 1072701040u, 3365823522u, 0, COSH_TOLERANCE, 0},
+{ 653, 1068284677u, 3671484625u, 1067020039u, 430024694u, 1072694899u, 1388039659u, 0, COSH_TOLERANCE, 0},
+{ 654, 1072639990u, 3991830201u, 3207808714u, 1021245839u, 1073231933u, 3593074248u, 0, COSH_TOLERANCE, 0},
+{ 655, 1071534423u, 4255801807u, 3207681716u, 1926756877u, 1072813117u, 3996147524u, 0, COSH_TOLERANCE, 0},
+{ 656, 1067869425u, 4167786896u, 1077097744u, 1775517981u, 1072694251u, 733571701u, 0, COSH_TOLERANCE, 0},
+{ 657, 1076164794u, 3187518564u, 1082437406u, 944672491u, 1087470446u, 2671993134u, 0, COSH_TOLERANCE, 0},
+{ 658, 1068240650u, 953085192u, 3227310828u, 3459155777u, 1072694822u, 4213317825u, 0, COSH_TOLERANCE, 0},
+{ 659, 1072648234u, 1908555460u, 1073640207u, 260441967u, 1073236630u, 142454325u, 0, COSH_TOLERANCE, 0},
+{ 660, 1072462486u, 250762477u, 1072582645u, 2886742039u, 1073136645u, 291307456u, 0, COSH_TOLERANCE, 0},
+{ 661, 3228885910u, 786180031u, 3197734769u, 2788918312u, 1577200566u, 2788902326u, 0, COSH_TOLERANCE, 0},
+{ 662, 3225074643u, 2055912467u, 3244244909u, 1394142937u, 1111997077u, 3336869072u, 0, COSH_TOLERANCE, 0},
+{ 663, 1072758713u, 91984146u, 3222252812u, 4126276047u, 1073342848u, 1253513367u, 0, COSH_TOLERANCE, 0},
+{ 664, 1075048683u, 3942715706u, 3239316352u, 410676547u, 1079134213u, 267559533u, 0, COSH_TOLERANCE, 0},
+{ 665, 3215335062u, 86296211u, 1085850694u, 649202596u, 1072694226u, 2983711788u, 0, COSH_TOLERANCE, 0},
+{ 666, 3226492024u, 3069064472u, 3237358008u, 23209276u, 1170562231u, 633460538u, 0, COSH_TOLERANCE, 0},
+{ 667, 1074943832u, 1867297860u, 1072956607u, 2513414118u, 1078493882u, 1616885989u, 0, COSH_TOLERANCE, 0},
+{ 668, 3228513251u, 3171788768u, 3235208783u, 162138697u, 1449229135u, 3375110619u, 0, COSH_TOLERANCE, 0},
+{ 669, 1075436999u, 1245110700u, 1081653954u, 2584994077u, 1081350721u, 957691310u, 0, COSH_TOLERANCE, 0},
+{ 670, 3226635752u, 3347226587u, 1058962932u, 2291943376u, 1183896710u, 168233073u, 0, COSH_TOLERANCE, 0},
+{ 671, 1070433398u, 966940828u, 1060726420u, 2798041096u, 1072721252u, 2966013057u, 0, COSH_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1073388450u, 3307746147u, 0, COSH_TOLERANCE, 0},
+{ 673, 3228193553u, 1671039260u, 1086395032u, 3745833360u, 1390173013u, 393415964u, 0, COSH_TOLERANCE, 0},
+{ 674, 1069661709u, 651714217u, 1047070645u, 2130549237u, 1072703337u, 2120747923u, 0, COSH_TOLERANCE, 0},
+{ 675, 3217601491u, 1423000172u, 3247822717u, 1551488170u, 1072712835u, 1816865234u, 0, COSH_TOLERANCE, 0},
+{ 676, 3216277371u, 921077236u, 3213332351u, 1431049019u, 1072696611u, 565650984u, 0, COSH_TOLERANCE, 0},
+{ 677, 1071704599u, 655715547u, 3190985373u, 1527556471u, 1072843172u, 1336277049u, 0, COSH_TOLERANCE, 0},
+{ 678, 3222412099u, 4110878657u, 3251297180u, 879739345u, 1078402367u, 500635058u, 0, COSH_TOLERANCE, 0},
+{ 679, 1076367578u, 2623955764u, 1093699897u, 1216444475u, 1089767499u, 3859717334u, 0, COSH_TOLERANCE, 0},
+{ 680, 1078274115u, 107442539u, 3239767031u, 1149813329u, 1135642519u, 2525054892u, 0, COSH_TOLERANCE, 0},
+{ 681, 3224008056u, 1761361082u, 3226030205u, 1121849716u, 1091632053u, 723647737u, 0, COSH_TOLERANCE, 0},
+{ 682, 3226455627u, 2534144722u, 1044223733u, 3512285706u, 1167807417u, 2831697989u, 0, COSH_TOLERANCE, 0},
+{ 683, 3218137533u, 4073670723u, 1050729852u, 3034818849u, 1072729939u, 1759331685u, 0, COSH_TOLERANCE, 0},
+{ 684, 1081013054u, 1421423503u, 1060278048u, 1397153092u, 1446153340u, 3645912721u, 0, COSH_TOLERANCE, 0},
+{ 685, 3220567557u, 1649206019u, 1104525577u, 1267104290u, 1073793966u, 3599940925u, 0, COSH_TOLERANCE, 0},
+{ 686, 3213419345u, 3775270392u, 1040251850u, 68667319u, 1072693325u, 1835336288u, 0, COSH_TOLERANCE, 0},
+{ 687, 3216913812u, 3099226694u, 3254103006u, 4020102648u, 1072700557u, 1248825926u, 0, COSH_TOLERANCE, 0},
+{ 688, 3216271776u, 3718441177u, 3215643451u, 4032951536u, 1072696583u, 704224480u, 0, COSH_TOLERANCE, 0},
+{ 689, 1066151467u, 508048351u, 3210196713u, 1707937896u, 1072693347u, 1151265229u, 0, COSH_TOLERANCE, 0},
+{ 690, 3215388843u, 2784738160u, 1073435430u, 1109346010u, 1072694300u, 2895740676u, 0, COSH_TOLERANCE, 0},
+{ 691, 3222579562u, 3331916473u, 3238794568u, 2707019594u, 1079370721u, 3655030168u, 0, COSH_TOLERANCE, 0},
+{ 692, 1078502606u, 3093165197u, 1072894805u, 2853215019u, 1146174228u, 2594603642u, 0, COSH_TOLERANCE, 0},
+{ 693, 3219727867u, 2135797997u, 1048399559u, 2941926126u, 1073034070u, 1282347664u, 0, COSH_TOLERANCE, 0},
+{ 694, 1067305348u, 2083412145u, 3249335391u, 507212448u, 1072693691u, 2874470125u, 0, COSH_TOLERANCE, 0},
+{ 695, 1074315175u, 4270176401u, 3246546709u, 3288753319u, 1076238829u, 3050002800u, 0, COSH_TOLERANCE, 0},
+{ 696, 3228009919u, 3692175292u, 3197271515u, 3989064196u, 1356228656u, 3358892546u, 0, COSH_TOLERANCE, 0},
+{ 697, 3228623066u, 3111924274u, 1066772558u, 59281695u, 1480086690u, 2342955533u, 0, COSH_TOLERANCE, 0},
+{ 698, 1071878215u, 2135245466u, 3208804313u, 3846547392u, 1072895387u, 4144720311u, 0, COSH_TOLERANCE, 0},
+{ 699, 1079149171u, 972051266u, 3222814246u, 3539700586u, 1183589479u, 2607924773u, 0, COSH_TOLERANCE, 0},
+{ 700, 3216597418u, 330951080u, 1079189813u, 583922384u, 1072698405u, 4243865843u, 0, COSH_TOLERANCE, 0},
+{ 701, 1077057180u, 1711944085u, 1104170032u, 643991456u, 1099706751u, 436337680u, 0, COSH_TOLERANCE, 0},
+{ 702, 3224992365u, 2072550721u, 3250147641u, 4280263530u, 1110117290u, 2591847584u, 0, COSH_TOLERANCE, 0},
+{ 703, 3213944226u, 1566376352u, 1067251433u, 72984588u, 1072693390u, 3254259422u, 0, COSH_TOLERANCE, 0},
+{ 704, 1079547929u, 3103043079u, 1045853123u, 410067497u, 1220439527u, 692790947u, 0, COSH_TOLERANCE, 0},
+{ 705, 3219818221u, 1910366299u, 1081770885u, 634683073u, 1073074645u, 1429806814u, 0, COSH_TOLERANCE, 0},
+{ 706, 1075239232u, 2226525875u, 3224149290u, 2126302825u, 1080223855u, 1320759816u, 0, COSH_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1073857441u, 263464829u, 0, COSH_TOLERANCE, 0},
+{ 708, 1071725823u, 1953339096u, 1077176252u, 1476516558u, 1072849107u, 4237100024u, 0, COSH_TOLERANCE, 0},
+{ 709, 1072383456u, 1306277326u, 1079089150u, 4093716191u, 1073097698u, 3030680746u, 0, COSH_TOLERANCE, 0},
+{ 710, 3223711603u, 51750045u, 3242913901u, 4256866157u, 1088179763u, 3515333215u, 0, COSH_TOLERANCE, 0},
+{ 711, 3213959335u, 2163853087u, 3232053146u, 2962422808u, 1072693394u, 2920600260u, 0, COSH_TOLERANCE, 0},
+{ 712, 1074468369u, 1618388148u, 3233154824u, 3711953164u, 1076728610u, 463521720u, 0, COSH_TOLERANCE, 0},
+{ 713, 3227993634u, 357108214u, 3202294604u, 2306775262u, 1353223522u, 1996029149u, 0, COSH_TOLERANCE, 0},
+{ 714, 3216584150u, 2571356437u, 3249064063u, 2394851808u, 1072698323u, 4161073125u, 0, COSH_TOLERANCE, 0},
+{ 715, 3224196635u, 4273880094u, 1103698617u, 3578832032u, 1093789145u, 485628572u, 0, COSH_TOLERANCE, 0},
+{ 716, 3223989517u, 2091068742u, 3228270226u, 3980489730u, 1091402892u, 675814748u, 0, COSH_TOLERANCE, 0},
+{ 717, 3222725296u, 2772307714u, 1051008486u, 32546576u, 1080235328u, 3668049513u, 0, COSH_TOLERANCE, 0},
+{ 718, 3225500575u, 2143788498u, 3195498043u, 3630119231u, 1123707886u, 237087314u, 0, COSH_TOLERANCE, 0},
+{ 719, 3215410151u, 2527385594u, 3240503648u, 3482095012u, 1072694330u, 3136314740u, 0, COSH_TOLERANCE, 0},
+{ 720, 3226440159u, 2690097362u, 1068598730u, 2360266862u, 1167133545u, 2847015826u, 0, COSH_TOLERANCE, 0},
+{ 721, 1070392205u, 2673272949u, 1082639557u, 522449749u, 1072720067u, 3056493936u, 0, COSH_TOLERANCE, 0},
+{ 722, 1081355475u, 3596379400u, 3242016775u, 2002293002u, 1559892600u, 3057535830u, 0, COSH_TOLERANCE, 0},
+{ 723, 1080565288u, 4113224369u, 3222122439u, 2152316893u, 1363443372u, 2667631927u, 0, COSH_TOLERANCE, 0},
+{ 724, 3220796716u, 31662602u, 1047721249u, 1747087514u, 1074033558u, 858447424u, 0, COSH_TOLERANCE, 0},
+{ 725, 3228443661u, 2489659568u, 1097051253u, 277506957u, 1436371380u, 1518851146u, 0, COSH_TOLERANCE, 0},
+{ 726, 3213421930u, 3850162281u, 3213841942u, 438724093u, 1072693325u, 2890275848u, 0, COSH_TOLERANCE, 0},
+{ 727, 1079663895u, 2431814052u, 1075518084u, 2672434118u, 1231134099u, 340027527u, 0, COSH_TOLERANCE, 0},
+{ 728, 3227434095u, 391606792u, 1048184750u, 4168944276u, 1257550215u, 1300409563u, 0, COSH_TOLERANCE, 0},
+{ 729, 3227869472u, 457529672u, 3201090276u, 72407935u, 1330311224u, 3560882185u, 0, COSH_TOLERANCE, 0},
+{ 730, 3220817871u, 3954981400u, 1052053242u, 2411049585u, 1074058719u, 3705062022u, 0, COSH_TOLERANCE, 0},
+{ 731, 1076742907u, 485456950u, 1088415093u, 1655397424u, 1094089911u, 1354371166u, 0, COSH_TOLERANCE, 0},
+{ 732, 3215011644u, 1551748070u, 3236871640u, 1329701152u, 1072693838u, 2879963114u, 0, COSH_TOLERANCE, 0},
+{ 733, 3221493394u, 3099222537u, 1104984570u, 4293792842u, 1075366946u, 508314344u, 0, COSH_TOLERANCE, 0},
+{ 734, 3216532617u, 3603065260u, 3197735968u, 2402359253u, 1072698011u, 2766024004u, 0, COSH_TOLERANCE, 0},
+{ 735, 3215601800u, 3961208159u, 3219057584u, 2340553876u, 1072694620u, 379258978u, 0, COSH_TOLERANCE, 0},
+{ 736, 1073833333u, 4014841779u, 3197672877u, 3697233334u, 1074909912u, 2808921288u, 0, COSH_TOLERANCE, 0},
+{ 737, 3219567113u, 1403876392u, 3254028950u, 921363393u, 1072968212u, 2144303717u, 0, COSH_TOLERANCE, 0},
+{ 738, 1082085982u, 1862576361u, 3194031708u, 2476290925u, 1829767895u, 2702820797u, 0, COSH_TOLERANCE, 0},
+{ 739, 1067487560u, 1454212851u, 1088378861u, 3400401866u, 1072693797u, 54461841u, 0, COSH_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 1076514406u, 2547119721u, 0, COSH_TOLERANCE, 0},
+{ 741, 3219555010u, 1199568671u, 3225679997u, 46947405u, 1072963573u, 2577290657u, 0, COSH_TOLERANCE, 0},
+{ 742, 1074539809u, 2596231448u, 3253943728u, 2219151748u, 1076949249u, 741854126u, 0, COSH_TOLERANCE, 0},
+{ 743, 1071769915u, 4119719558u, 3222036299u, 1275474618u, 1072861834u, 622536215u, 0, COSH_TOLERANCE, 0},
+{ 744, 3226277175u, 3347296825u, 1101507910u, 1254014794u, 1159605697u, 2046925534u, 0, COSH_TOLERANCE, 0},
+{ 745, 1076779960u, 673775040u, 1070743626u, 244126093u, 1094571370u, 3392967795u, 0, COSH_TOLERANCE, 0},
+{ 746, 3216831338u, 1832066983u, 1051358028u, 3262483417u, 1072699960u, 1544307325u, 0, COSH_TOLERANCE, 0},
+{ 747, 1074413872u, 3962610501u, 3198598777u, 849269178u, 1076537724u, 1233885306u, 0, COSH_TOLERANCE, 0},
+{ 748, 3224988140u, 2497516122u, 3254374111u, 2821429629u, 1110006630u, 4293280082u, 0, COSH_TOLERANCE, 0},
+{ 749, 1074139136u, 2805941787u, 3217785843u, 779131141u, 1075816532u, 1482854069u, 0, COSH_TOLERANCE, 0},
+{ 750, 3222714382u, 723423605u, 1084533420u, 627282213u, 1080184328u, 3302770918u, 0, COSH_TOLERANCE, 0},
+{ 751, 3220141984u, 4292778869u, 1078101071u, 1676860147u, 1073242418u, 3635086186u, 0, COSH_TOLERANCE, 0},
+{ 752, 1074191350u, 3528118587u, 3194648564u, 2363260897u, 1075935555u, 289356259u, 0, COSH_TOLERANCE, 0},
+{ 753, 3214917975u, 1307010018u, 1061248120u, 1468743108u, 1072693752u, 1022163092u, 0, COSH_TOLERANCE, 0},
+{ 754, 3227708771u, 107905661u, 3226089788u, 1943427674u, 1300618543u, 73406449u, 0, COSH_TOLERANCE, 0},
+{ 755, 3213396365u, 760006940u, 1054265604u, 1749976597u, 1072693323u, 1120345363u, 0, COSH_TOLERANCE, 0},
+{ 756, 3225190472u, 2787503556u, 1081282610u, 1195841206u, 1114725979u, 1251355153u, 0, COSH_TOLERANCE, 0},
+{ 757, 3213822252u, 545462045u, 3208381743u, 1981311808u, 1072693368u, 1740079808u, 0, COSH_TOLERANCE, 0},
+{ 758, 1070669320u, 3657978397u, 1104463616u, 3501253426u, 1072730976u, 1944423667u, 0, COSH_TOLERANCE, 0},
+{ 759, 1067709649u, 1804177501u, 3210693633u, 3606766729u, 1072694044u, 2621219149u, 0, COSH_TOLERANCE, 0},
+{ 760, 1074759727u, 1336278526u, 1043741618u, 3165279431u, 1077527020u, 1512975247u, 0, COSH_TOLERANCE, 0},
+{ 761, 1069103403u, 1599382075u, 1058018527u, 4212580517u, 1072698341u, 3629517488u, 0, COSH_TOLERANCE, 0},
+{ 762, 3217988086u, 3007589929u, 3202026547u, 2792028313u, 1072723357u, 1307088321u, 0, COSH_TOLERANCE, 0},
+{ 763, 3228965522u, 1866066996u, 1060329048u, 3727175322u, 1606595077u, 1771558986u, 0, COSH_TOLERANCE, 0},
+{ 764, 3215193859u, 150890940u, 1056025306u, 3082724735u, 1072694045u, 1265676852u, 0, COSH_TOLERANCE, 0},
+{ 765, 1071446123u, 80400395u, 1093584426u, 3478941315u, 1072802523u, 752465669u, 0, COSH_TOLERANCE, 0},
+{ 766, 3228571942u, 4050954182u, 3219263194u, 2537475930u, 1461204778u, 405562207u, 0, COSH_TOLERANCE, 0},
+{ 767, 1071133327u, 2881752155u, 3212589299u, 2559651278u, 1072769091u, 2237199419u, 0, COSH_TOLERANCE, 0},
+{ 768, 3228044784u, 440309030u, 3214267461u, 3788040806u, 1362669700u, 3272529857u, 0, COSH_TOLERANCE, 0},
+{ 769, 1080553671u, 918813144u, 3208535698u, 1607035904u, 1361304066u, 4120585298u, 0, COSH_TOLERANCE, 0},
+{ 770, 1066254699u, 2497054124u, 1089139147u, 2549609010u, 1072693358u, 2903505685u, 0, COSH_TOLERANCE, 0},
+{ 771, 1066960585u, 790219083u, 1054657139u, 2797979479u, 1072693548u, 3389416957u, 0, COSH_TOLERANCE, 0},
+{ 772, 1070364312u, 1149462078u, 1095765205u, 3879963182u, 1072719280u, 154258113u, 0, COSH_TOLERANCE, 0},
+{ 773, 3216361301u, 2684353926u, 3205212854u, 1732474928u, 1072697044u, 3289630565u, 0, COSH_TOLERANCE, 0},
+{ 774, 1079508325u, 2742237025u, 1051317716u, 3386396147u, 1216722133u, 1976234612u, 0, COSH_TOLERANCE, 0},
+{ 775, 1071619594u, 3408320912u, 1103071166u, 4233059513u, 1072823827u, 3155315775u, 0, COSH_TOLERANCE, 0},
+{ 776, 1071155004u, 1077495917u, 1088399968u, 433115118u, 1072771204u, 2638172126u, 0, COSH_TOLERANCE, 0},
+{ 777, 3217130484u, 841366493u, 1051716814u, 4121125128u, 1072703080u, 2725484085u, 0, COSH_TOLERANCE, 0},
+{ 778, 1070923540u, 321857207u, 1089128010u, 1149988239u, 1072750184u, 2497194249u, 0, COSH_TOLERANCE, 0},
+{ 779, 3226668295u, 799866606u, 3197637091u, 3924438208u, 1186900516u, 3227583322u, 0, COSH_TOLERANCE, 0},
+{ 780, 3213082986u, 2002049816u, 1077053447u, 2240354761u, 1072693296u, 3373709313u, 0, COSH_TOLERANCE, 0},
+{ 781, 3222714827u, 478939968u, 1097035749u, 1066716440u, 1080186366u, 2582859282u, 0, COSH_TOLERANCE, 0},
+{ 782, 3224085033u, 1653104725u, 1088548129u, 81977716u, 1092521464u, 1441379124u, 0, COSH_TOLERANCE, 0},
+{ 783, 3215735644u, 3899475018u, 3189694084u, 3330093036u, 1072694842u, 2073424147u, 0, COSH_TOLERANCE, 0},
+{ 784, 1077778247u, 2612450289u, 1079065127u, 603380842u, 1116328756u, 409577748u, 0, COSH_TOLERANCE, 0},
+{ 785, 1080713847u, 3962735564u, 1101570429u, 1372490825u, 1390866750u, 1157784041u, 0, COSH_TOLERANCE, 0},
+{ 786, 1069486080u, 1479841439u, 1059312257u, 541504905u, 1072700976u, 2186360231u, 0, COSH_TOLERANCE, 0},
+{ 787, 1075516450u, 2626148789u, 1057571099u, 4121656076u, 1081817128u, 1530368747u, 0, COSH_TOLERANCE, 0},
+{ 788, 1075321933u, 1902560314u, 1043130231u, 3557671562u, 1080683467u, 1859697987u, 0, COSH_TOLERANCE, 0},
+{ 789, 3214801292u, 41779312u, 1081626342u, 831171823u, 1072693697u, 1186166695u, 0, COSH_TOLERANCE, 0},
+{ 790, 1069665436u, 1393168821u, 1066457405u, 1381616968u, 1072703402u, 1650632034u, 0, COSH_TOLERANCE, 0},
+{ 791, 1073386717u, 3756584649u, 3222267229u, 1423157432u, 1074123576u, 1665585151u, 0, COSH_TOLERANCE, 0},
+{ 792, 3229269850u, 1894912556u, 1042426694u, 155024547u, 1718965712u, 945429025u, 0, COSH_TOLERANCE, 0},
+{ 793, 3214327880u, 35164295u, 3203391785u, 1037041084u, 1072693506u, 3508532193u, 0, COSH_TOLERANCE, 0},
+{ 794, 1076388871u, 3957875950u, 3232195211u, 1590756436u, 1090004859u, 3120776328u, 0, COSH_TOLERANCE, 0},
+{ 795, 1071990050u, 1447585080u, 1071279485u, 1107922438u, 1072933539u, 2209886006u, 0, COSH_TOLERANCE, 0},
+{ 796, 1067224038u, 981897615u, 1051856116u, 430357614u, 1072693655u, 2049552706u, 0, COSH_TOLERANCE, 0},
+{ 797, 3222281335u, 395145384u, 3219821938u, 50586510u, 1077679062u, 1276809098u, 0, COSH_TOLERANCE, 0},
+{ 798, 1072921640u, 750827797u, 1082862669u, 230466783u, 1073571776u, 3511683862u, 0, COSH_TOLERANCE, 0},
+{ 799, 1077231635u, 1365083575u, 3204848310u, 1700831722u, 1103707567u, 2384443675u, 0, COSH_TOLERANCE, 0},
+{ 800, 3220187542u, 344241827u, 1071538935u, 2715566077u, 1073275304u, 928327191u, 0, COSH_TOLERANCE, 0},
+{ 801, 3227659912u, 4069301823u, 3193208760u, 2949125229u, 1291633407u, 3577170264u, 0, COSH_TOLERANCE, 0},
+{ 802, 1081211291u, 3585711710u, 1065801594u, 2302229267u, 1506690422u, 4025253862u, 0, COSH_TOLERANCE, 0},
+{ 803, 3214041900u, 709803845u, 1048741487u, 2296910194u, 1072693417u, 226115727u, 0, COSH_TOLERANCE, 0},
+{ 804, 3214252299u, 744421179u, 1069302001u, 2659232829u, 1072693481u, 1038120994u, 0, COSH_TOLERANCE, 0},
+{ 805, 1078155904u, 1799949903u, 3192522886u, 4212149209u, 1130147983u, 2298972399u, 0, COSH_TOLERANCE, 0},
+{ 806, 3217642838u, 145234164u, 3250614064u, 912384201u, 1072713852u, 135186305u, 0, COSH_TOLERANCE, 0},
+{ 807, 3225830600u, 2784620507u, 1102812948u, 3531481022u, 1138955264u, 414543568u, 0, COSH_TOLERANCE, 0},
+{ 808, 3229139567u, 383952592u, 3205659905u, 3633194728u, 1670843603u, 1189342136u, 0, COSH_TOLERANCE, 0},
+{ 809, 3216059164u, 3792395543u, 1070072378u, 3864816376u, 1072695606u, 3943605180u, 0, COSH_TOLERANCE, 0},
+{ 810, 3217899185u, 2115553675u, 1066288499u, 3538377867u, 1072720735u, 3043278424u, 0, COSH_TOLERANCE, 0},
+{ 811, 3229006513u, 1230026762u, 1090719723u, 440819880u, 1621709547u, 2644861228u, 0, COSH_TOLERANCE, 0},
+{ 812, 3214518020u, 2991290482u, 1096886719u, 1097971167u, 1072693577u, 173583143u, 0, COSH_TOLERANCE, 0},
+{ 813, 1077465688u, 1098035020u, 3230900504u, 1479059095u, 1109134739u, 1050435763u, 0, COSH_TOLERANCE, 0},
+{ 814, 3229036868u, 1719428427u, 3188631907u, 3707377409u, 1632924552u, 1550018828u, 0, COSH_TOLERANCE, 0},
+{ 815, 1068964805u, 3748932896u, 1084908557u, 1325384361u, 1072697522u, 3948486792u, 0, COSH_TOLERANCE, 0},
+{ 816, 1076315468u, 3979168763u, 1057455255u, 2454615952u, 1089181690u, 2958015221u, 0, COSH_TOLERANCE, 0},
+{ 817, 1068835624u, 1449164578u, 1056960316u, 1654931641u, 1072696824u, 1401361151u, 0, COSH_TOLERANCE, 0},
+{ 818, 1073536162u, 2120487381u, 3226298974u, 2364226633u, 1074328434u, 1815453534u, 0, COSH_TOLERANCE, 0},
+{ 819, 1074022852u, 1074268944u, 1065730444u, 280016852u, 1075407548u, 3974776385u, 0, COSH_TOLERANCE, 0},
+{ 820, 3216036896u, 3315127889u, 3236295594u, 2900924954u, 1072695514u, 1876741827u, 0, COSH_TOLERANCE, 0},
+{ 821, 3215300259u, 2246037502u, 1049691002u, 1496066550u, 1072694180u, 1112214741u, 0, COSH_TOLERANCE, 0},
+{ 822, 3213978379u, 4191285446u, 3217936236u, 2382392789u, 1072693399u, 3005009332u, 0, COSH_TOLERANCE, 0},
+{ 823, 1078153244u, 640099844u, 1042152237u, 2064279383u, 1130001370u, 3369789477u, 0, COSH_TOLERANCE, 0},
+{ 824, 1075719134u, 3468560824u, 1093251038u, 310958750u, 1083014335u, 205376381u, 0, COSH_TOLERANCE, 0},
+{ 825, 1080011184u, 1413568905u, 1100941106u, 1627289946u, 1263163319u, 2702685927u, 0, COSH_TOLERANCE, 0},
+{ 826, 3213569646u, 3797143370u, 3195497539u, 3843275034u, 1072693340u, 1523765613u, 0, COSH_TOLERANCE, 0},
+{ 827, 3229008721u, 2806642640u, 3201943068u, 2515980718u, 1622521255u, 1495856927u, 0, COSH_TOLERANCE, 0},
+{ 828, 1077440132u, 632580632u, 1078673506u, 3259601317u, 1108541069u, 1728707154u, 0, COSH_TOLERANCE, 0},
+{ 829, 3216709215u, 3309678799u, 1049337078u, 3056787074u, 1072699123u, 1270833534u, 0, COSH_TOLERANCE, 0},
+{ 830, 3221495289u, 2341164249u, 1080834967u, 2810890005u, 1075372753u, 706611161u, 0, COSH_TOLERANCE, 0},
+{ 831, 1072262554u, 932124675u, 1093915797u, 662682630u, 1073042092u, 3650070814u, 0, COSH_TOLERANCE, 0},
+{ 832, 3228258571u, 1367996113u, 3251723684u, 2974064663u, 1402167137u, 835372527u, 0, COSH_TOLERANCE, 0},
+{ 833, 1074987851u, 323437999u, 1090499064u, 901457511u, 1078787526u, 1748132310u, 0, COSH_TOLERANCE, 0},
+{ 834, 3225293116u, 4184941840u, 3196770014u, 2458988443u, 1117047527u, 356853259u, 0, COSH_TOLERANCE, 0},
+{ 835, 1077132524u, 2023065054u, 3211994098u, 2734612965u, 1101414558u, 3575590741u, 0, COSH_TOLERANCE, 0},
+{ 836, 1071414726u, 3679267365u, 3237728785u, 1699558211u, 1072798880u, 129754064u, 0, COSH_TOLERANCE, 0},
+{ 837, 1077593250u, 1826799031u, 1078709629u, 3986905229u, 1112051516u, 1053308024u, 0, COSH_TOLERANCE, 0},
+{ 838, 1068572425u, 351061688u, 3194386466u, 4105857588u, 1072695593u, 4153306203u, 0, COSH_TOLERANCE, 0},
+{ 839, 1068808070u, 1365244058u, 1064457319u, 1452191426u, 1072696683u, 1681752437u, 0, COSH_TOLERANCE, 0},
+{ 840, 1071462417u, 2463030625u, 3215975031u, 3773488326u, 1072804439u, 2238472752u, 0, COSH_TOLERANCE, 0},
+{ 841, 3229256575u, 752664055u, 1065110394u, 1835931663u, 1714075118u, 149401169u, 0, COSH_TOLERANCE, 0},
+{ 842, 1077559328u, 3496172149u, 1089617208u, 109068701u, 1111311801u, 1798297128u, 0, COSH_TOLERANCE, 0},
+{ 843, 3215960879u, 1636966254u, 1086098766u, 2016598298u, 1072695254u, 1939764603u, 0, COSH_TOLERANCE, 0},
+{ 844, 1067708534u, 3551516956u, 1097969102u, 1317953425u, 1072694043u, 1086280677u, 0, COSH_TOLERANCE, 0},
+{ 845, 3223540761u, 2977627788u, 1045339018u, 516058480u, 1086242904u, 2098662703u, 0, COSH_TOLERANCE, 0},
+{ 846, 3224825666u, 3901731263u, 3189566462u, 32272932u, 1106313364u, 1335776681u, 0, COSH_TOLERANCE, 0},
+{ 847, 1074136068u, 1956025297u, 3246628529u, 3840733905u, 1075804523u, 2847820500u, 0, COSH_TOLERANCE, 0},
+{ 848, 1080943668u, 561057891u, 3198494340u, 4271027193u, 1433394156u, 930486357u, 0, COSH_TOLERANCE, 0},
+{ 849, 3228909825u, 692989850u, 3242630588u, 2492225971u, 1585995290u, 319542345u, 0, COSH_TOLERANCE, 0},
+{ 850, 3218062309u, 3439913962u, 1067477011u, 2973333638u, 1072725638u, 3634823438u, 0, COSH_TOLERANCE, 0},
+{ 851, 3219236869u, 877613377u, 1044917899u, 809672798u, 1072856952u, 2796036778u, 0, COSH_TOLERANCE, 0},
+{ 852, 3222171454u, 905426932u, 1046417457u, 1086320855u, 1077310812u, 2851365163u, 0, COSH_TOLERANCE, 0},
+{ 853, 3227472261u, 2645567288u, 1051258339u, 557182478u, 1261081230u, 3197735669u, 0, COSH_TOLERANCE, 0},
+{ 854, 3216640862u, 186287752u, 1061342054u, 4054003419u, 1072698679u, 729206068u, 0, COSH_TOLERANCE, 0},
+{ 855, 1079440881u, 3506889716u, 3243866036u, 519056371u, 1210492348u, 931610429u, 0, COSH_TOLERANCE, 0},
+{ 856, 1065722725u, 2171898436u, 3246911982u, 1091500784u, 1072693306u, 2265047919u, 0, COSH_TOLERANCE, 0},
+{ 857, 3226870457u, 368493885u, 3222871893u, 1419055230u, 1205516424u, 2259354588u, 0, COSH_TOLERANCE, 0},
+{ 858, 1078319084u, 2010971245u, 3188804530u, 1518695799u, 1137724679u, 3191526077u, 0, COSH_TOLERANCE, 0},
+{ 859, 3218009421u, 1239207795u, 1040192984u, 2199481342u, 1072724004u, 1939639299u, 0, COSH_TOLERANCE, 0},
+{ 860, 3218318669u, 4264613432u, 3203460972u, 3558930895u, 1072743039u, 1280148500u, 0, COSH_TOLERANCE, 0},
+{ 861, 1068125075u, 3772748958u, 3227667376u, 309688336u, 1072694631u, 780493773u, 0, COSH_TOLERANCE, 0},
+{ 862, 3223403009u, 1077949160u, 1075769893u, 2405271377u, 1084588117u, 750360291u, 0, COSH_TOLERANCE, 0},
+{ 863, 1078203664u, 3751608506u, 3232278094u, 930375071u, 1132383966u, 338172682u, 0, COSH_TOLERANCE, 0},
+{ 864, 3215394369u, 1518334131u, 3205247482u, 791756713u, 1072694308u, 1837710716u, 0, COSH_TOLERANCE, 0},
+{ 865, 1067240397u, 2825203170u, 3245054001u, 1822981827u, 1072693662u, 2728197500u, 0, COSH_TOLERANCE, 0},
+{ 866, 1080093419u, 514474738u, 1089072073u, 3300845441u, 1276320656u, 226623888u, 0, COSH_TOLERANCE, 0},
+{ 867, 3219536978u, 247369460u, 3197320093u, 687450958u, 1072956743u, 2486540699u, 0, COSH_TOLERANCE, 0},
+{ 868, 1081092750u, 2722237629u, 1058272368u, 90602316u, 1462892401u, 1953188388u, 0, COSH_TOLERANCE, 0},
+{ 869, 3217535619u, 1845900544u, 3231520830u, 3389751458u, 1072711269u, 1708331520u, 0, COSH_TOLERANCE, 0},
+{ 870, 3227612301u, 737689911u, 3195377751u, 3462616966u, 1282803389u, 893857503u, 0, COSH_TOLERANCE, 0},
+{ 871, 3221441232u, 3620285831u, 1055501023u, 2708056059u, 1075215165u, 36506447u, 0, COSH_TOLERANCE, 0},
+{ 872, 3220513572u, 4073430285u, 1056206159u, 172017902u, 1073745576u, 1368956281u, 0, COSH_TOLERANCE, 0},
+{ 873, 3219161094u, 2799176222u, 1052706894u, 4083892667u, 1072835757u, 2697030089u, 0, COSH_TOLERANCE, 0},
+{ 874, 3216959621u, 1562351330u, 1069705601u, 1247765260u, 1072700899u, 3715177876u, 0, COSH_TOLERANCE, 0},
+{ 875, 3224328691u, 51853475u, 3189080201u, 2783553144u, 1095270977u, 3427601507u, 0, COSH_TOLERANCE, 0},
+{ 876, 3220502929u, 3851781549u, 3241598113u, 514064046u, 1073730914u, 2250864942u, 0, COSH_TOLERANCE, 0},
+{ 877, 1080123021u, 934745487u, 3248182437u, 2798581921u, 1281762996u, 865963855u, 0, COSH_TOLERANCE, 0},
+{ 878, 3219373949u, 2948648757u, 3232177250u, 4278702895u, 1072899337u, 3276588090u, 0, COSH_TOLERANCE, 0},
+{ 879, 1073534300u, 4259101461u, 1061606772u, 84229920u, 1074325687u, 1565151099u, 0, COSH_TOLERANCE, 0},
+{ 880, 3215901351u, 3891230598u, 1095924595u, 3049217547u, 1072695140u, 4168549617u, 0, COSH_TOLERANCE, 0},
+{ 881, 1074207325u, 3806018919u, 3243191216u, 280177341u, 1075970755u, 2786980301u, 0, COSH_TOLERANCE, 0},
+{ 882, 1070061714u, 3900344258u, 1063647809u, 4206745890u, 1072711496u, 3823741603u, 0, COSH_TOLERANCE, 0},
+{ 883, 3222464456u, 2126253040u, 3207248026u, 808507485u, 1078737170u, 621449966u, 0, COSH_TOLERANCE, 0},
+{ 884, 1076653133u, 3465685634u, 3230391053u, 3754958214u, 1093053515u, 3736100576u, 0, COSH_TOLERANCE, 0},
+{ 885, 1080840988u, 461094531u, 1101110393u, 1316091396u, 1414403053u, 3462873770u, 0, COSH_TOLERANCE, 0},
+{ 886, 1071271770u, 4197635149u, 1091873113u, 1240127141u, 1072783106u, 1748105286u, 0, COSH_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 1076291260u, 1720945322u, 0, COSH_TOLERANCE, 0},
+{ 888, 3219720621u, 3744663425u, 3212482771u, 953662066u, 1073030929u, 896575844u, 0, COSH_TOLERANCE, 0},
+{ 889, 1076782697u, 3564196690u, 3228101916u, 904305212u, 1094612637u, 2831822307u, 0, COSH_TOLERANCE, 0},
+{ 890, 1067207479u, 3566257266u, 3235138829u, 2734275140u, 1072693648u, 1269634877u, 0, COSH_TOLERANCE, 0},
+{ 891, 3227171261u, 606044282u, 3241318094u, 2446416887u, 1233304247u, 534441612u, 0, COSH_TOLERANCE, 0},
+{ 892, 1065744532u, 2336116589u, 3197594053u, 2296925138u, 1072693308u, 1465765093u, 0, COSH_TOLERANCE, 0},
+{ 893, 1070101995u, 907670625u, 3240769036u, 1827119006u, 1072712452u, 2747386971u, 0, COSH_TOLERANCE, 0},
+{ 894, 1066487279u, 2818710946u, 3246059905u, 553394170u, 1072693397u, 3115364367u, 0, COSH_TOLERANCE, 0},
+{ 895, 3213621342u, 4099522736u, 3232742168u, 3718083858u, 1072693345u, 3406009066u, 0, COSH_TOLERANCE, 0},
+{ 896, 1078739788u, 1059279404u, 1080245336u, 175941677u, 1157065361u, 1087430260u, 0, COSH_TOLERANCE, 0},
+{ 897, 1082121019u, 1650862428u, 1061816101u, 1723201723u, 1842630885u, 3875297949u, 0, COSH_TOLERANCE, 0},
+{ 898, 3226429902u, 2462163405u, 3218946201u, 3876535372u, 1166601564u, 774021558u, 0, COSH_TOLERANCE, 0},
+{ 899, 1076004278u, 495844137u, 1073721460u, 772777946u, 1085574307u, 3103051899u, 0, COSH_TOLERANCE, 0},
+{ 900, 1068143970u, 458757721u, 3245680321u, 3609892707u, 1072694661u, 2944146062u, 0, COSH_TOLERANCE, 0},
+{ 901, 3214254476u, 2533012202u, 1079980803u, 3592268374u, 1072693481u, 4122712420u, 0, COSH_TOLERANCE, 0},
+{ 902, 3216996268u, 4108274117u, 1063045844u, 571992389u, 1072701179u, 2572750489u, 0, COSH_TOLERANCE, 0},
+{ 903, 1077984359u, 3541110973u, 1096296754u, 3118427427u, 1122209571u, 2499543662u, 0, COSH_TOLERANCE, 0},
+{ 904, 3213902987u, 1213941007u, 1105433735u, 2172963370u, 1072693380u, 1385696423u, 0, COSH_TOLERANCE, 0},
+{ 905, 1079027567u, 272190288u, 1095452370u, 4026581530u, 1172388533u, 1567535437u, 0, COSH_TOLERANCE, 0},
+{ 906, 1079855269u, 2843638672u, 1100510986u, 3190536898u, 1248839882u, 1134925313u, 0, COSH_TOLERANCE, 0},
+{ 907, 1076417062u, 2014317727u, 3247389683u, 2428462015u, 1090384705u, 358950430u, 0, COSH_TOLERANCE, 0},
+{ 908, 1078248077u, 688442200u, 1047852515u, 3035186380u, 1134419607u, 2761855333u, 0, COSH_TOLERANCE, 0},
+{ 909, 1074567060u, 1010095511u, 3221288076u, 405287991u, 1077008382u, 2678639855u, 0, COSH_TOLERANCE, 0},
+{ 910, 3229225943u, 2983070435u, 1089546472u, 2907918480u, 1702816421u, 3410875852u, 0, COSH_TOLERANCE, 0},
+{ 911, 1076696665u, 81928569u, 1056007286u, 2740556321u, 1093638835u, 274386753u, 0, COSH_TOLERANCE, 0},
+{ 912, 1066276691u, 2076689028u, 1081558619u, 3039159031u, 1072693361u, 800822767u, 0, COSH_TOLERANCE, 0},
+{ 913, 1067230382u, 1376882094u, 3211003208u, 1296286481u, 1072693658u, 1054988025u, 0, COSH_TOLERANCE, 0},
+{ 914, 1074871434u, 744133164u, 3200943494u, 955832216u, 1078106333u, 2049981092u, 0, COSH_TOLERANCE, 0},
+{ 915, 3223144598u, 176522478u, 1069999908u, 2891249491u, 1082629674u, 2323388443u, 0, COSH_TOLERANCE, 0},
+{ 916, 1065584698u, 3685851715u, 3187829932u, 2363997529u, 1072693295u, 2956924633u, 0, COSH_TOLERANCE, 0},
+{ 917, 1065409879u, 3974431579u, 1052505165u, 2589067816u, 1072693283u, 2371419071u, 0, COSH_TOLERANCE, 0},
+{ 918, 3213516885u, 3819109588u, 1048561488u, 969143351u, 1072693334u, 4144308189u, 0, COSH_TOLERANCE, 0},
+{ 919, 1073687973u, 4246896124u, 1104584799u, 1940097860u, 1074570627u, 2298933225u, 0, COSH_TOLERANCE, 0},
+{ 920, 1066912836u, 2228686199u, 3220231833u, 777624847u, 1072693531u, 787077708u, 0, COSH_TOLERANCE, 0},
+{ 921, 3224127274u, 4189906558u, 3203004203u, 854242364u, 1092949557u, 959709294u, 0, COSH_TOLERANCE, 0},
+{ 922, 1081890311u, 4089051094u, 3227282692u, 2693170723u, 1757476753u, 2188757040u, 0, COSH_TOLERANCE, 0},
+{ 923, 1066855127u, 1278581412u, 3239296746u, 1774588717u, 1072693510u, 2634419015u, 0, COSH_TOLERANCE, 0},
+{ 924, 3221324110u, 1794845306u, 1104879344u, 4135865182u, 1074925497u, 3906182610u, 0, COSH_TOLERANCE, 0},
+{ 925, 1081283231u, 754938390u, 1061291430u, 2010786993u, 1533223782u, 1531468649u, 0, COSH_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 1074396812u, 1237727695u, 0, COSH_TOLERANCE, 0},
+{ 927, 3224109162u, 567588900u, 3195452230u, 1421366017u, 1092771194u, 1959115226u, 0, COSH_TOLERANCE, 0},
+{ 928, 3221944027u, 2708717091u, 1071975971u, 1364590470u, 1076699364u, 3498938298u, 0, COSH_TOLERANCE, 0},
+{ 929, 3229068611u, 3461956134u, 3207820115u, 1605709634u, 1644637705u, 436547866u, 0, COSH_TOLERANCE, 0},
+{ 930, 1071594452u, 1497124553u, 1051715442u, 916736957u, 1072820615u, 3509403797u, 0, COSH_TOLERANCE, 0},
+{ 931, 1070002699u, 834914365u, 1064667143u, 2839166298u, 1072710141u, 49948186u, 0, COSH_TOLERANCE, 0},
+{ 932, 1069862861u, 2139295776u, 1062816721u, 914592523u, 1072707138u, 2831866037u, 0, COSH_TOLERANCE, 0},
+{ 933, 3213754179u, 851569132u, 1058503154u, 1399378677u, 1072693360u, 2063325022u, 0, COSH_TOLERANCE, 0},
+{ 934, 3224100513u, 3897202342u, 3245382590u, 246600375u, 1092694344u, 2855953602u, 0, COSH_TOLERANCE, 0},
+{ 935, 3222314580u, 3620429520u, 1055627557u, 229305u, 1077927721u, 4207295924u, 0, COSH_TOLERANCE, 0},
+{ 936, 1076618801u, 3641997865u, 3206673888u, 93720614u, 1092711110u, 70908616u, 0, COSH_TOLERANCE, 0},
+{ 937, 3222565555u, 32766320u, 1062084905u, 3668443038u, 1079296080u, 3835260610u, 0, COSH_TOLERANCE, 0},
+{ 938, 3222250420u, 2039713492u, 3248699388u, 1346210821u, 1077549839u, 2474839273u, 0, COSH_TOLERANCE, 0},
+{ 939, 1078369952u, 1335820726u, 3191756860u, 1808427032u, 1140014824u, 1082588104u, 0, COSH_TOLERANCE, 0},
+{ 940, 1070879947u, 650692001u, 1103515670u, 2253348763u, 1072746604u, 1613283469u, 0, COSH_TOLERANCE, 0},
+{ 941, 3213415283u, 2372623300u, 3210185343u, 3200572848u, 1072693325u, 180886037u, 0, COSH_TOLERANCE, 0},
+{ 942, 1080873125u, 762317532u, 3194595095u, 3192607437u, 1420280283u, 2571597720u, 0, COSH_TOLERANCE, 0},
+{ 943, 1070651309u, 217775356u, 3232827087u, 2969367386u, 1072729767u, 3026198031u, 0, COSH_TOLERANCE, 0},
+{ 944, 1069755463u, 3621353969u, 1077994795u, 3873976266u, 1072705033u, 1292815252u, 0, COSH_TOLERANCE, 0},
+{ 945, 1078719075u, 268372152u, 3221764390u, 3216978962u, 1156113361u, 77208680u, 0, COSH_TOLERANCE, 0},
+{ 946, 3227563243u, 142942404u, 1075322987u, 1746449109u, 1273775797u, 1613517009u, 0, COSH_TOLERANCE, 0},
+{ 947, 1081986200u, 496534875u, 3254522293u, 2532372502u, 1792868955u, 1796814503u, 0, COSH_TOLERANCE, 0},
+{ 948, 3228205445u, 2999955409u, 3222793392u, 1868977643u, 1392395773u, 861578698u, 0, COSH_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 1076249507u, 4249056915u, 0, COSH_TOLERANCE, 0},
+{ 950, 1072413103u, 73646871u, 3231442171u, 3711510104u, 1073112064u, 51329157u, 0, COSH_TOLERANCE, 0},
+{ 951, 1077900612u, 218135177u, 3198908856u, 3082199105u, 1119150740u, 3713509082u, 0, COSH_TOLERANCE, 0},
+{ 952, 1072262784u, 1061628117u, 3248859043u, 86776158u, 1073042194u, 769388057u, 0, COSH_TOLERANCE, 0},
+{ 953, 3217921858u, 938869114u, 1087911145u, 2416710759u, 1072721392u, 3474817236u, 0, COSH_TOLERANCE, 0},
+{ 954, 1079848192u, 2970853959u, 3239543429u, 1887505029u, 1248109254u, 3136433410u, 0, COSH_TOLERANCE, 0},
+{ 955, 3225145875u, 1337895935u, 1076463812u, 1172733328u, 1113691889u, 31768603u, 0, COSH_TOLERANCE, 0},
+{ 956, 1068014296u, 1469010822u, 3229583535u, 551399515u, 1072694459u, 135999803u, 0, COSH_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 1075735689u, 4015727387u, 0, COSH_TOLERANCE, 0},
+{ 958, 3226410140u, 2976596113u, 3192137295u, 3033242648u, 1165706945u, 2523414676u, 0, COSH_TOLERANCE, 0},
+{ 959, 1079824113u, 876810930u, 3197470945u, 2571587447u, 1245903887u, 1889039904u, 0, COSH_TOLERANCE, 0},
+{ 960, 3226042170u, 4007797282u, 3225853845u, 4069319648u, 1148697453u, 4203630871u, 0, COSH_TOLERANCE, 0},
+{ 961, 1067202926u, 3840538373u, 1043189552u, 3668774580u, 1072693646u, 1426518963u, 0, COSH_TOLERANCE, 0},
+{ 962, 3220757432u, 200857661u, 3229758439u, 3359367736u, 1073988275u, 2806959022u, 0, COSH_TOLERANCE, 0},
+{ 963, 3227826349u, 111868139u, 3227902082u, 2366064003u, 1322375028u, 1662095535u, 0, COSH_TOLERANCE, 0},
+{ 964, 1066215262u, 3510904416u, 3222131653u, 3822770497u, 1072693354u, 1051116137u, 0, COSH_TOLERANCE, 0},
+{ 965, 3226947075u, 789151814u, 1099269239u, 2958956055u, 1212574387u, 2807768454u, 0, COSH_TOLERANCE, 0},
+{ 966, 1076290712u, 722163228u, 1105524559u, 1534462169u, 1088870444u, 2168724557u, 0, COSH_TOLERANCE, 0},
+{ 967, 1066509006u, 2207037106u, 3208952465u, 1231254630u, 1072693403u, 2222435194u, 0, COSH_TOLERANCE, 0},
+{ 968, 3215709852u, 3838689849u, 3198769679u, 1302617170u, 1072694798u, 1405657813u, 0, COSH_TOLERANCE, 0},
+{ 969, 1076501722u, 2527556476u, 3240373426u, 124352692u, 1091342710u, 1779782796u, 0, COSH_TOLERANCE, 0},
+{ 970, 3215269445u, 3502371499u, 1043411944u, 4190072016u, 1072694140u, 376523261u, 0, COSH_TOLERANCE, 0},
+{ 971, 1070967598u, 1798470077u, 3200116917u, 3421833729u, 1072753924u, 1515331822u, 0, COSH_TOLERANCE, 0},
+{ 972, 3214486476u, 3653237931u, 3204255012u, 3683870669u, 1072693564u, 3470124748u, 0, COSH_TOLERANCE, 0},
+{ 973, 1069317222u, 376530104u, 1073853547u, 565755892u, 1072699746u, 1235915232u, 0, COSH_TOLERANCE, 0},
+{ 974, 3226775211u, 558292492u, 1051772749u, 4267873474u, 1196715895u, 131886187u, 0, COSH_TOLERANCE, 0},
+{ 975, 3221626981u, 509637100u, 3212030069u, 215050379u, 1075833072u, 467034146u, 0, COSH_TOLERANCE, 0},
+{ 976, 1078425613u, 3571665665u, 3188628584u, 757824767u, 1142574424u, 253046892u, 0, COSH_TOLERANCE, 0},
+{ 977, 3220042217u, 998858159u, 1063077962u, 436029885u, 1073186855u, 1202860156u, 0, COSH_TOLERANCE, 0},
+{ 978, 3217481301u, 996300405u, 3193842624u, 80548098u, 1072710027u, 2273904897u, 0, COSH_TOLERANCE, 0},
+{ 979, 3222557384u, 3876129407u, 3215332180u, 2226970413u, 1079254352u, 3066283527u, 0, COSH_TOLERANCE, 0},
+{ 980, 3225026041u, 200013509u, 3224552716u, 414878724u, 1110874928u, 1169612687u, 0, COSH_TOLERANCE, 0},
+{ 981, 3224325637u, 309319541u, 1048979765u, 1261662434u, 1095233986u, 817192005u, 0, COSH_TOLERANCE, 0},
+{ 982, 1077718303u, 4062255924u, 3224274128u, 4289485681u, 1114943885u, 3449799183u, 0, COSH_TOLERANCE, 0},
+{ 983, 3224601748u, 1611969213u, 1053890378u, 3774617276u, 1101126454u, 3591228804u, 0, COSH_TOLERANCE, 0},
+{ 984, 1075169883u, 1752164782u, 3239587974u, 612223386u, 1079838374u, 2949770801u, 0, COSH_TOLERANCE, 0},
+{ 985, 1065663030u, 2024044989u, 1074932678u, 3259111307u, 1072693301u, 3021786197u, 0, COSH_TOLERANCE, 0},
+{ 986, 1068936158u, 2564965629u, 1093571065u, 169360454u, 1072697362u, 2639638506u, 0, COSH_TOLERANCE, 0},
+{ 987, 1077016178u, 1860101737u, 3191222372u, 1676437468u, 1098787212u, 2272979218u, 0, COSH_TOLERANCE, 0},
+{ 988, 1070288728u, 588387057u, 3192103292u, 2495288012u, 1072717205u, 1389707200u, 0, COSH_TOLERANCE, 0},
+{ 989, 3214127225u, 659070058u, 1073095700u, 1393632068u, 1072693441u, 3612914573u, 0, COSH_TOLERANCE, 0},
+{ 990, 3220828991u, 4276187829u, 3217553330u, 1868253275u, 1074072167u, 2887453002u, 0, COSH_TOLERANCE, 0},
+{ 991, 3222171696u, 2085481575u, 3215994784u, 800910002u, 1077311492u, 1227387766u, 0, COSH_TOLERANCE, 0},
+{ 992, 1069517748u, 1950570756u, 3200582211u, 941022151u, 1072701219u, 599507787u, 0, COSH_TOLERANCE, 0},
+{ 993, 1070113280u, 2075610870u, 3250142022u, 3605152103u, 1072712724u, 3542177568u, 0, COSH_TOLERANCE, 0},
+{ 994, 3216567890u, 3792931748u, 3204857863u, 804393211u, 1072698224u, 1504041164u, 0, COSH_TOLERANCE, 0},
+{ 995, 3229529122u, 3430071177u, 3226288311u, 3652522729u, 1814734598u, 874872258u, 0, COSH_TOLERANCE, 0},
+{ 996, 3215994766u, 236884699u, 3227874605u, 2193269825u, 1072695344u, 2273001648u, 0, COSH_TOLERANCE, 0},
+{ 997, 1071228049u, 2744231849u, 1046186036u, 771053722u, 1072778547u, 642403527u, 0, COSH_TOLERANCE, 0},
+{ 998, 1076656004u, 3000189819u, 1096500901u, 2057239777u, 1093086420u, 3545313986u, 0, COSH_TOLERANCE, 0},
+{ 999, 1078106941u, 205759408u, 3244643377u, 2702292618u, 1127858436u, 16441604u, 0, COSH_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_COSH_H multiple inclusion protection
+
+// EOF cosh.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/exp.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/exp.c
new file mode 100644
index 0000000000..b263929a03
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/exp.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// exp.c
+//
+// Test of exp() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/exp.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(exp_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &exp, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_NONE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &exp_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("exp() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("exp() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library exp() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "exp() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF exp.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/exp.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/exp.h
new file mode 100644
index 0000000000..9395d95601
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/exp.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_EXP_H
+#define CYGONCE_LIBM_EXP_H
+//===========================================================================
+//
+// exp.h
+//
+// Test vectors for testing of exp() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/exp.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define EXP_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t exp_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1074853420u, 2506787616u, 1090024059u, 3619148316u, 1079073766u, 1147571106u, 0, EXP_TOLERANCE, 0},
+{ 2, 3220250806u, 3176730980u, 1051524793u, 2993920299u, 1070985501u, 3667586384u, 0, EXP_TOLERANCE, 0},
+{ 3, 3226028315u, 2725707538u, 3232101343u, 2346810316u, 996177609u, 2816512701u, 0, EXP_TOLERANCE, 0},
+{ 4, 1078922874u, 2088062470u, 3201242716u, 420891118u, 1166568645u, 2120331304u, 0, EXP_TOLERANCE, 0},
+{ 5, 3221200677u, 2636405208u, 1100049309u, 471635570u, 1069661382u, 4196142410u, 0, EXP_TOLERANCE, 0},
+{ 6, 1077828855u, 1746012320u, 1054478713u, 3333988501u, 1118565158u, 699114409u, 0, EXP_TOLERANCE, 0},
+{ 7, 1066827528u, 183014794u, 3202039382u, 2016785810u, 1072716539u, 123580646u, 0, EXP_TOLERANCE, 0},
+{ 8, 3219777490u, 2688957927u, 1046089230u, 2709029994u, 1071414232u, 1149200657u, 0, EXP_TOLERANCE, 0},
+{ 9, 1070330066u, 624574473u, 1045840574u, 3473266330u, 1072949041u, 2377226642u, 0, EXP_TOLERANCE, 0},
+{ 10, 3217502754u, 1605286142u, 1068931671u, 4233776869u, 1072345653u, 1083445165u, 0, EXP_TOLERANCE, 0},
+{ 11, 1069780594u, 1857607719u, 3222889559u, 3417070006u, 1072866340u, 2899880271u, 0, EXP_TOLERANCE, 0},
+{ 12, 1081579891u, 3981151660u, 1088899021u, 1332651746u, 1643831522u, 1345086100u, 0, EXP_TOLERANCE, 0},
+{ 13, 1075860838u, 3824988054u, 1066856791u, 2070129652u, 1084982301u, 1912337979u, 0, EXP_TOLERANCE, 0},
+{ 14, 3218045550u, 1372884064u, 1080833116u, 3229926662u, 1072236030u, 3106255365u, 0, EXP_TOLERANCE, 0},
+{ 15, 1078097861u, 3217805330u, 3191644264u, 2014578707u, 1128498553u, 1807458751u, 0, EXP_TOLERANCE, 0},
+{ 16, 1080267391u, 265058758u, 3239903247u, 1630600647u, 1309523294u, 1523986687u, 0, EXP_TOLERANCE, 0},
+{ 17, 1073221381u, 1946677669u, 3198462609u, 926009897u, 1074920988u, 1465131398u, 0, EXP_TOLERANCE, 0},
+{ 18, 1073178875u, 2271884183u, 3203741999u, 2118617783u, 1074874144u, 2764688608u, 0, EXP_TOLERANCE, 0},
+{ 19, 3214772053u, 213658772u, 3249401130u, 314151656u, 1072633636u, 4130392148u, 0, EXP_TOLERANCE, 0},
+{ 20, 3228946464u, 1564829925u, 3197817016u, 497230814u, 544633027u, 34803168u, 0, EXP_TOLERANCE, 0},
+{ 21, 3219408362u, 2075329122u, 3231746400u, 169900577u, 1071709080u, 4184140427u, 0, EXP_TOLERANCE, 0},
+{ 22, 1067674434u, 541549344u, 1096608669u, 3119070100u, 1072733781u, 3804791293u, 0, EXP_TOLERANCE, 0},
+{ 23, 1075989871u, 567496114u, 1045286891u, 1969998540u, 1086482701u, 3180352384u, 0, EXP_TOLERANCE, 0},
+{ 24, 1069985379u, 1299369769u, 1049342524u, 4167404066u, 1072896531u, 1629596946u, 0, EXP_TOLERANCE, 0},
+{ 25, 3218302829u, 3348930841u, 1078472138u, 358457347u, 1072144759u, 3067143552u, 0, EXP_TOLERANCE, 0},
+{ 26, 1073166449u, 2192461366u, 1099527247u, 3184735642u, 1074860805u, 1775317488u, 0, EXP_TOLERANCE, 0},
+{ 27, 1068590412u, 331696577u, 3189610016u, 793242270u, 1072766977u, 1780216299u, 0, EXP_TOLERANCE, 0},
+{ 28, 3229460262u, 2322696981u, 1083791358u, 3020766674u, 354871428u, 1974410974u, 0, EXP_TOLERANCE, 0},
+{ 29, 1066922273u, 252085215u, 3214426435u, 4139068910u, 1072718053u, 1593026232u, 0, EXP_TOLERANCE, 0},
+{ 30, 3221457149u, 105589263u, 1056316170u, 261630827u, 1068909924u, 4008856079u, 0, EXP_TOLERANCE, 0},
+{ 31, 1082047584u, 428765703u, 3251828686u, 2009972239u, 1816546673u, 3462966019u, 0, EXP_TOLERANCE, 0},
+{ 32, 1079693651u, 3517376586u, 3240257920u, 3304487302u, 1234899857u, 1250614638u, 0, EXP_TOLERANCE, 0},
+{ 33, 3224100728u, 237004814u, 3237899261u, 3364008659u, 1051573078u, 1250441695u, 0, EXP_TOLERANCE, 0},
+{ 34, 3214121920u, 472004928u, 3226869477u, 1186387580u, 1072653472u, 186620643u, 0, EXP_TOLERANCE, 0},
+{ 35, 1068906914u, 4085763910u, 1106394906u, 2684738273u, 1072788350u, 3104710386u, 0, EXP_TOLERANCE, 0},
+{ 36, 1069636551u, 2055490142u, 3231581370u, 3879040079u, 1072845542u, 714008610u, 0, EXP_TOLERANCE, 0},
+{ 37, 3213093895u, 3725731239u, 1061652681u, 591292963u, 1072672946u, 3339751925u, 0, EXP_TOLERANCE, 0},
+{ 38, 3221869253u, 1147041027u, 3215417793u, 624695933u, 1067731891u, 1490517545u, 0, EXP_TOLERANCE, 0},
+{ 39, 3217587110u, 705725219u, 3238067573u, 1116238321u, 1072328147u, 3778478168u, 0, EXP_TOLERANCE, 0},
+{ 40, 3217852848u, 7287411u, 1045917232u, 116067742u, 1072274139u, 800660017u, 0, EXP_TOLERANCE, 0},
+{ 41, 3226423734u, 3604989074u, 1066381836u, 545298780u, 977849136u, 1417268874u, 0, EXP_TOLERANCE, 0},
+{ 42, 3221178088u, 1681476121u, 1060345752u, 3553822398u, 1069686696u, 3471070187u, 0, EXP_TOLERANCE, 0},
+{ 43, 1080811562u, 3410480388u, 1052460275u, 1660607230u, 1409975006u, 2715754844u, 0, EXP_TOLERANCE, 0},
+{ 44, 1077682533u, 1494984673u, 3196647153u, 287894723u, 1115159161u, 2741076212u, 0, EXP_TOLERANCE, 0},
+{ 45, 1068516615u, 644548665u, 1081948134u, 2442134629u, 1072762051u, 2743261701u, 0, EXP_TOLERANCE, 0},
+{ 46, 1077068335u, 2312530895u, 3221584595u, 3379665576u, 1101051489u, 3357999194u, 0, EXP_TOLERANCE, 0},
+{ 47, 1079308159u, 3018463866u, 1086226574u, 404012923u, 1199317798u, 2905917257u, 0, EXP_TOLERANCE, 0},
+{ 48, 1071024755u, 1710279345u, 3251401196u, 3528946000u, 1073135949u, 3958225700u, 0, EXP_TOLERANCE, 0},
+{ 49, 1070973535u, 2164450219u, 1083520023u, 3312018966u, 1073117849u, 2216238713u, 0, EXP_TOLERANCE, 0},
+{ 50, 1069831588u, 2648986431u, 1050330591u, 1474376550u, 1072873789u, 3409301846u, 0, EXP_TOLERANCE, 0},
+{ 51, 3214344972u, 1839068700u, 1077406406u, 3013052171u, 1072646645u, 923270809u, 0, EXP_TOLERANCE, 0},
+{ 52, 1066416574u, 772102380u, 3220729740u, 4219039958u, 1072709995u, 1305461407u, 0, EXP_TOLERANCE, 0},
+{ 53, 3223180765u, 3058618779u, 1046304788u, 3338676024u, 1061347966u, 1072422663u, 0, EXP_TOLERANCE, 0},
+{ 54, 1067949353u, 506286854u, 1094907481u, 2217000199u, 1072742741u, 3706634962u, 0, EXP_TOLERANCE, 0},
+{ 55, 1076136854u, 1147428263u, 1065432625u, 3034786717u, 1088176249u, 1631281700u, 0, EXP_TOLERANCE, 0},
+{ 56, 1075725296u, 2844125311u, 1082985198u, 2561492677u, 1084108872u, 2831233524u, 0, EXP_TOLERANCE, 0},
+{ 57, 3218876948u, 704542600u, 3222902057u, 2762779203u, 1071946646u, 190610401u, 0, EXP_TOLERANCE, 0},
+{ 58, 3215409254u, 184131949u, 3249723525u, 1667366082u, 1072600139u, 3411518971u, 0, EXP_TOLERANCE, 0},
+{ 59, 3221512446u, 3904224140u, 1067056698u, 2942159914u, 1068763822u, 1503414230u, 0, EXP_TOLERANCE, 0},
+{ 60, 1080713919u, 426114282u, 3209056785u, 1083606355u, 1391928446u, 3657642479u, 0, EXP_TOLERANCE, 0},
+{ 61, 1082048697u, 3774123863u, 1106787580u, 2722107965u, 1817003400u, 2241806278u, 0, EXP_TOLERANCE, 0},
+{ 62, 1077519332u, 1377734762u, 1104232051u, 2377063483u, 1111477508u, 844049504u, 0, EXP_TOLERANCE, 0},
+{ 63, 1072526287u, 1029739074u, 1105467109u, 3062201018u, 1074009347u, 4070953358u, 0, EXP_TOLERANCE, 0},
+{ 64, 3225304413u, 773857656u, 3214251949u, 335833884u, 1026865589u, 4235967790u, 0, EXP_TOLERANCE, 0},
+{ 65, 3216856098u, 1473865960u, 1103073830u, 4000427507u, 1072466239u, 2409423530u, 0, EXP_TOLERANCE, 0},
+{ 66, 1081165135u, 4242092620u, 1067009473u, 14539161u, 1490638029u, 1225921132u, 0, EXP_TOLERANCE, 0},
+{ 67, 3214536170u, 1732245037u, 1101371955u, 1533536108u, 1072640811u, 1577960147u, 0, EXP_TOLERANCE, 0},
+{ 68, 3228182475u, 1833841275u, 1099430098u, 4144145552u, 756118454u, 4124162837u, 0, EXP_TOLERANCE, 0},
+{ 69, 3227493247u, 935007012u, 3188865420u, 604442938u, 881158424u, 3059390833u, 0, EXP_TOLERANCE, 0},
+{ 70, 3217389013u, 2211464602u, 1046255144u, 1635910526u, 1072369536u, 4272624615u, 0, EXP_TOLERANCE, 0},
+{ 71, 1074725689u, 2549219008u, 3231633258u, 3733639385u, 1078468890u, 3538652097u, 0, EXP_TOLERANCE, 0},
+{ 72, 1075803633u, 1819374372u, 3202219056u, 2617077637u, 1084512755u, 3226299243u, 0, EXP_TOLERANCE, 0},
+{ 73, 1078616640u, 546465680u, 1048653554u, 532401530u, 1152481934u, 1660202510u, 0, EXP_TOLERANCE, 0},
+{ 74, 1066591187u, 2759019783u, 3221570188u, 3554409630u, 1072712770u, 3539689839u, 0, EXP_TOLERANCE, 0},
+{ 75, 3219222738u, 2527221960u, 1099107978u, 2696971136u, 1071812085u, 1070446248u, 0, EXP_TOLERANCE, 0},
+{ 76, 1079332208u, 173134582u, 1087299442u, 2877794600u, 1201571530u, 2450291402u, 0, EXP_TOLERANCE, 0},
+{ 77, 1076963290u, 547642046u, 3197285510u, 3521286127u, 1098574476u, 1604458491u, 0, EXP_TOLERANCE, 0},
+{ 78, 1073812126u, 1231582831u, 1090971734u, 1653446832u, 1075897874u, 3499443040u, 0, EXP_TOLERANCE, 0},
+{ 79, 1070779719u, 3762182190u, 3252967851u, 2615360375u, 1073051323u, 4198562047u, 0, EXP_TOLERANCE, 0},
+{ 80, 3216563063u, 2588067350u, 3206610957u, 3551059728u, 1072499190u, 3656398129u, 0, EXP_TOLERANCE, 0},
+{ 81, 3217464616u, 845263327u, 1073415902u, 1749010288u, 1072353625u, 2543242068u, 0, EXP_TOLERANCE, 0},
+{ 82, 3217110706u, 3092685191u, 3190678390u, 2872219490u, 1072429360u, 3896037664u, 0, EXP_TOLERANCE, 0},
+{ 83, 3220412207u, 4107255722u, 3205337291u, 3069068345u, 1070780355u, 264836658u, 0, EXP_TOLERANCE, 0},
+{ 84, 3227213641u, 2294867524u, 3216653996u, 2860384670u, 907048437u, 551868093u, 0, EXP_TOLERANCE, 0},
+{ 85, 3214297870u, 2265437201u, 3240198679u, 1234948614u, 1072648084u, 4060123138u, 0, EXP_TOLERANCE, 0},
+{ 86, 3219505657u, 1186945904u, 3251167793u, 1896750851u, 1071658624u, 3764186265u, 0, EXP_TOLERANCE, 0},
+{ 87, 1075284022u, 3686084548u, 1079286273u, 3309277689u, 1081503302u, 60883681u, 0, EXP_TOLERANCE, 0},
+{ 88, 3221379088u, 3006860614u, 3231412671u, 2504194724u, 1069144247u, 54379178u, 0, EXP_TOLERANCE, 0},
+{ 89, 3224614924u, 1948717780u, 1048317852u, 3791803982u, 1042772858u, 2420958386u, 0, EXP_TOLERANCE, 0},
+{ 90, 1070636471u, 4272034420u, 3192982124u, 1526175922u, 1073004093u, 3308824510u, 0, EXP_TOLERANCE, 0},
+{ 91, 3226943458u, 4108948538u, 1104691287u, 640541190u, 931953430u, 3437532117u, 0, EXP_TOLERANCE, 0},
+{ 92, 3217743177u, 3259274853u, 1082507103u, 3677038020u, 1072296221u, 2033726093u, 0, EXP_TOLERANCE, 0},
+{ 93, 1076841042u, 3781708548u, 1096584871u, 1207386447u, 1096271275u, 77258u, 0, EXP_TOLERANCE, 0},
+{ 94, 3213861096u, 3011191657u, 1103798670u, 1096124830u, 1072661109u, 742458517u, 0, EXP_TOLERANCE, 0},
+{ 95, 1071623631u, 2540404725u, 3240157452u, 4122845725u, 1073364830u, 3560000573u, 0, EXP_TOLERANCE, 0},
+{ 96, 1076303678u, 311336721u, 3214382367u, 4212533768u, 1090074692u, 2663913965u, 0, EXP_TOLERANCE, 0},
+{ 97, 1067916643u, 1769686293u, 3240200923u, 3538602249u, 1072741671u, 4116363241u, 0, EXP_TOLERANCE, 0},
+{ 98, 1075081821u, 508056696u, 1103793878u, 776520138u, 1080344162u, 242331594u, 0, EXP_TOLERANCE, 0},
+{ 99, 1080890481u, 4064962760u, 1077424413u, 819766631u, 1424537001u, 3317334315u, 0, EXP_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 1076952439u, 2142218601u, 0, EXP_TOLERANCE, 0},
+{ 101, 1076003603u, 2514398118u, 1076579751u, 870169764u, 1086615970u, 3988144815u, 0, EXP_TOLERANCE, 0},
+{ 102, 3227977024u, 1190259653u, 1069112254u, 3417249840u, 794021017u, 2254415465u, 0, EXP_TOLERANCE, 0},
+{ 103, 3214634603u, 3467757357u, 3215075200u, 2168175352u, 1072637814u, 1866384359u, 0, EXP_TOLERANCE, 0},
+{ 104, 3226011647u, 1508888184u, 1060430241u, 3524949092u, 996893071u, 1032082419u, 0, EXP_TOLERANCE, 0},
+{ 105, 3215238675u, 166402802u, 3237198975u, 3572369260u, 1072610353u, 2543405344u, 0, EXP_TOLERANCE, 0},
+{ 106, 1075575366u, 2441536203u, 3202753937u, 3658194573u, 1083247124u, 1565872384u, 0, EXP_TOLERANCE, 0},
+{ 107, 1070781516u, 2479742828u, 1062342831u, 4214154303u, 1073051926u, 2877262325u, 0, EXP_TOLERANCE, 0},
+{ 108, 1076105338u, 426896765u, 1066474375u, 2201754442u, 1087780533u, 3456888252u, 0, EXP_TOLERANCE, 0},
+{ 109, 3214503389u, 2055773734u, 3239267288u, 291396537u, 1072641810u, 1723790219u, 0, EXP_TOLERANCE, 0},
+{ 110, 3224385121u, 874125203u, 3210508124u, 4091098764u, 1048079713u, 3922271118u, 0, EXP_TOLERANCE, 0},
+{ 111, 1072007482u, 120488169u, 3241241441u, 1985269424u, 1073699997u, 3263405331u, 0, EXP_TOLERANCE, 0},
+{ 112, 3218073746u, 2243036871u, 3243941101u, 740033495u, 1072230527u, 3210238367u, 0, EXP_TOLERANCE, 0},
+{ 113, 3218862090u, 1176656356u, 1074261978u, 3588756231u, 1071951438u, 3060660754u, 0, EXP_TOLERANCE, 0},
+{ 114, 3228699543u, 3037249392u, 1061635587u, 1173102190u, 635829382u, 979909056u, 0, EXP_TOLERANCE, 0},
+{ 115, 3224626669u, 2882725208u, 1071440059u, 69225090u, 1042520691u, 1843293285u, 0, EXP_TOLERANCE, 0},
+{ 116, 3218954930u, 272319256u, 1072073912u, 2493997123u, 1071921768u, 657202412u, 0, EXP_TOLERANCE, 0},
+{ 117, 1070303098u, 188610379u, 3232757923u, 2209647371u, 1072944854u, 4022783570u, 0, EXP_TOLERANCE, 0},
+{ 118, 3225224181u, 1990439193u, 1078073146u, 622849962u, 1028759537u, 3564758723u, 0, EXP_TOLERANCE, 0},
+{ 119, 1069718653u, 756052458u, 1081649113u, 2247475162u, 1072857353u, 554847761u, 0, EXP_TOLERANCE, 0},
+{ 120, 1071060248u, 3878055211u, 3222407050u, 2979438623u, 1073148623u, 540184608u, 0, EXP_TOLERANCE, 0},
+{ 121, 3214165365u, 2676398686u, 1105124431u, 3631096636u, 1072652140u, 2373850172u, 0, EXP_TOLERANCE, 0},
+{ 122, 1071370846u, 1697791764u, 3198136112u, 2299842819u, 1073264221u, 1573541634u, 0, EXP_TOLERANCE, 0},
+{ 123, 1074939040u, 1931502677u, 3215264397u, 3016456382u, 1079513197u, 1530595558u, 0, EXP_TOLERANCE, 0},
+{ 124, 1073302002u, 343404215u, 1061072607u, 4266232536u, 1075015225u, 3004108006u, 0, EXP_TOLERANCE, 0},
+{ 125, 3225502196u, 4140316002u, 1082896196u, 868256971u, 1020424521u, 3460157795u, 0, EXP_TOLERANCE, 0},
+{ 126, 1074374234u, 1864139509u, 3187675097u, 3084482407u, 1077456782u, 4150857240u, 0, EXP_TOLERANCE, 0},
+{ 127, 3220191323u, 2427162817u, 3234748208u, 2715105792u, 1071069433u, 783584364u, 0, EXP_TOLERANCE, 0},
+{ 128, 1070891968u, 3943389284u, 1046724025u, 3626825684u, 1073089477u, 1797152336u, 0, EXP_TOLERANCE, 0},
+{ 129, 1067443098u, 967350972u, 1093012318u, 448002663u, 1072726416u, 797307317u, 0, EXP_TOLERANCE, 0},
+{ 130, 3228777187u, 105058217u, 1069733884u, 171786224u, 607209346u, 771064197u, 0, EXP_TOLERANCE, 0},
+{ 131, 3213731756u, 2863482262u, 3204997271u, 877784425u, 1072663100u, 426007619u, 0, EXP_TOLERANCE, 0},
+{ 132, 3216260801u, 2801782962u, 3213604117u, 762347195u, 1072533788u, 600737923u, 0, EXP_TOLERANCE, 0},
+{ 133, 3224049543u, 2317950339u, 3246333414u, 2135700283u, 1052112831u, 3287040885u, 0, EXP_TOLERANCE, 0},
+{ 134, 1069099309u, 4171919805u, 1082858682u, 2180920863u, 1072801541u, 2165096902u, 0, EXP_TOLERANCE, 0},
+{ 135, 3221197660u, 1918836931u, 1083603224u, 3137821660u, 1069664732u, 2532148552u, 0, EXP_TOLERANCE, 0},
+{ 136, 1081882778u, 3456203663u, 3235600523u, 2335688936u, 1755681633u, 4057860990u, 0, EXP_TOLERANCE, 0},
+{ 137, 1066396570u, 4170235262u, 1051824459u, 521583737u, 1072709719u, 1024167559u, 0, EXP_TOLERANCE, 0},
+{ 138, 1075056847u, 1296623194u, 3250673860u, 2442872540u, 1080220627u, 2781106181u, 0, EXP_TOLERANCE, 0},
+{ 139, 1071121461u, 289979405u, 1049514449u, 3865737145u, 1073170732u, 3903607776u, 0, EXP_TOLERANCE, 0},
+{ 140, 1074250368u, 3699090239u, 1054539840u, 3259249360u, 1077116363u, 502955531u, 0, EXP_TOLERANCE, 0},
+{ 141, 1079640884u, 1619819023u, 1045993352u, 1022642459u, 1230064705u, 1444182022u, 0, EXP_TOLERANCE, 0},
+{ 142, 1075141548u, 19455098u, 3229182089u, 2096003654u, 1080692026u, 447080049u, 0, EXP_TOLERANCE, 0},
+{ 143, 1074200784u, 3803689997u, 1071630912u, 2263729518u, 1077001092u, 1334450617u, 0, EXP_TOLERANCE, 0},
+{ 144, 1080385741u, 2816837387u, 1063422305u, 2597606398u, 1331342121u, 1095829056u, 0, EXP_TOLERANCE, 0},
+{ 145, 1072245897u, 3680967506u, 1040201163u, 179224723u, 1073844641u, 930186774u, 0, EXP_TOLERANCE, 0},
+{ 146, 3213795591u, 978126928u, 1101553990u, 4047893399u, 1072662117u, 1101190271u, 0, EXP_TOLERANCE, 0},
+{ 147, 3221273469u, 4059818629u, 1042678728u, 3640293589u, 1069522282u, 1267895499u, 0, EXP_TOLERANCE, 0},
+{ 148, 3228541096u, 3383497159u, 1070002807u, 1527313008u, 689917614u, 1535716049u, 0, EXP_TOLERANCE, 0},
+{ 149, 3216339167u, 2599946514u, 1104170406u, 2738675352u, 1072524758u, 1435148139u, 0, EXP_TOLERANCE, 0},
+{ 150, 1081115375u, 3616571377u, 1060859316u, 1130603218u, 1472304603u, 3187069287u, 0, EXP_TOLERANCE, 0},
+{ 151, 1073931644u, 3859211180u, 1067940450u, 1744531824u, 1076181432u, 1345205949u, 0, EXP_TOLERANCE, 0},
+{ 152, 1065900012u, 1958025850u, 3236511256u, 2472176453u, 1072705786u, 932607201u, 0, EXP_TOLERANCE, 0},
+{ 153, 3223669905u, 182132862u, 3250520938u, 3924356991u, 1056496908u, 661218322u, 0, EXP_TOLERANCE, 0},
+{ 154, 3224210428u, 35632886u, 3209806504u, 1453402523u, 1050263526u, 3107753313u, 0, EXP_TOLERANCE, 0},
+{ 155, 1076182070u, 743225214u, 3202890678u, 142917400u, 1088680431u, 3782028986u, 0, EXP_TOLERANCE, 0},
+{ 156, 1075442096u, 1472665012u, 3203138231u, 256588219u, 1082425160u, 2507283120u, 0, EXP_TOLERANCE, 0},
+{ 157, 1079253522u, 1062927000u, 1061134072u, 931677439u, 1194330468u, 3538812810u, 0, EXP_TOLERANCE, 0},
+{ 158, 1069912068u, 2320910576u, 1055663370u, 288059864u, 1072885638u, 2756379436u, 0, EXP_TOLERANCE, 0},
+{ 159, 1075812365u, 1448349062u, 3199478070u, 3454027134u, 1084557930u, 2428474527u, 0, EXP_TOLERANCE, 0},
+{ 160, 3224875886u, 4215445172u, 3196654963u, 2231888973u, 1036778828u, 4095096416u, 0, EXP_TOLERANCE, 0},
+{ 161, 3227757863u, 40413554u, 3232578253u, 983832844u, 834531371u, 1749210300u, 0, EXP_TOLERANCE, 0},
+{ 162, 3221624382u, 3995725873u, 1050082319u, 777231627u, 1068511312u, 2187487459u, 0, EXP_TOLERANCE, 0},
+{ 163, 1066152450u, 672789828u, 3253385962u, 2982787335u, 1072707783u, 3636282767u, 0, EXP_TOLERANCE, 0},
+{ 164, 1072585179u, 2075971825u, 1070166500u, 4034633931u, 1074046830u, 2188206437u, 0, EXP_TOLERANCE, 0},
+{ 165, 3218434785u, 1018222907u, 3244621407u, 3090050495u, 1072096796u, 906290978u, 0, EXP_TOLERANCE, 0},
+{ 166, 1071875189u, 937732557u, 3200798890u, 2557898276u, 1073574348u, 956132579u, 0, EXP_TOLERANCE, 0},
+{ 167, 1075196588u, 130346162u, 3223590310u, 275568693u, 1081086381u, 3765310085u, 0, EXP_TOLERANCE, 0},
+{ 168, 1065967541u, 3807416441u, 1075961161u, 3706820266u, 1072706320u, 1003056074u, 0, EXP_TOLERANCE, 0},
+{ 169, 3219244733u, 1710131411u, 1078123323u, 1900790503u, 1071799398u, 2869753911u, 0, EXP_TOLERANCE, 0},
+{ 170, 3226236449u, 3420420033u, 3210844787u, 588423066u, 986539436u, 3295138570u, 0, EXP_TOLERANCE, 0},
+{ 171, 1067509906u, 1160162008u, 3246307879u, 4265764460u, 1072728454u, 3054362979u, 0, EXP_TOLERANCE, 0},
+{ 172, 1080523338u, 366653268u, 3188814424u, 466059202u, 1356813060u, 760636581u, 0, EXP_TOLERANCE, 0},
+{ 173, 3222433435u, 1325936170u, 3221436876u, 680097612u, 1065643005u, 1532992433u, 0, EXP_TOLERANCE, 0},
+{ 174, 3225711052u, 1827735934u, 3200554324u, 2875599271u, 1010834241u, 3777705215u, 0, EXP_TOLERANCE, 0},
+{ 175, 3213050498u, 3117037091u, 3239246636u, 15838845u, 1072673618u, 1728450485u, 0, EXP_TOLERANCE, 0},
+{ 176, 1067702644u, 749718883u, 3223587064u, 1523766569u, 1072734697u, 3920212286u, 0, EXP_TOLERANCE, 0},
+{ 177, 1066853747u, 1966536294u, 3250158026u, 699164258u, 1072716957u, 3817171147u, 0, EXP_TOLERANCE, 0},
+{ 178, 1079174067u, 3759049394u, 1106085272u, 1183789499u, 1186993088u, 3807740687u, 0, EXP_TOLERANCE, 0},
+{ 179, 1074910167u, 1970107747u, 1095245453u, 2308233883u, 1079348720u, 1531523305u, 0, EXP_TOLERANCE, 0},
+{ 180, 1076367836u, 1491017852u, 1041444355u, 1723375725u, 1090818724u, 2037541645u, 0, EXP_TOLERANCE, 0},
+{ 181, 3219775798u, 1141349287u, 1097465301u, 3403438584u, 1071415739u, 1183515418u, 0, EXP_TOLERANCE, 0},
+{ 182, 3224280452u, 1711085243u, 3250239076u, 1377484108u, 1049505584u, 2904152696u, 0, EXP_TOLERANCE, 0},
+{ 183, 1079510651u, 2880275004u, 1084039594u, 1611394950u, 1217987707u, 2867297031u, 0, EXP_TOLERANCE, 0},
+{ 184, 3224784251u, 2626629370u, 1063771493u, 1499080813u, 1038898033u, 1353327733u, 0, EXP_TOLERANCE, 0},
+{ 185, 1068862751u, 3936262414u, 1103919063u, 3175668759u, 1072785344u, 648861936u, 0, EXP_TOLERANCE, 0},
+{ 186, 3217418903u, 1270950554u, 3194616071u, 3680565379u, 1072363229u, 951093660u, 0, EXP_TOLERANCE, 0},
+{ 187, 3217585407u, 1066985223u, 3221613219u, 4089383168u, 1072328499u, 2267080590u, 0, EXP_TOLERANCE, 0},
+{ 188, 3220204567u, 4017329311u, 3208334452u, 1667591498u, 1071050331u, 296637723u, 0, EXP_TOLERANCE, 0},
+{ 189, 1077678397u, 3154656624u, 1061894279u, 3886344038u, 1115063060u, 1143078455u, 0, EXP_TOLERANCE, 0},
+{ 190, 1068478737u, 977586119u, 3209762784u, 953839852u, 1072760203u, 1532008227u, 0, EXP_TOLERANCE, 0},
+{ 191, 1081896575u, 143071571u, 3206165386u, 913097445u, 1760793137u, 1725664653u, 0, EXP_TOLERANCE, 0},
+{ 192, 3213634128u, 1371169579u, 1057079837u, 2594818628u, 1072664604u, 686553362u, 0, EXP_TOLERANCE, 0},
+{ 193, 3228724664u, 2259342224u, 3217432469u, 1824221478u, 626552221u, 555843157u, 0, EXP_TOLERANCE, 0},
+{ 194, 3227960407u, 1576604497u, 1079368611u, 185078728u, 797102216u, 2312754753u, 0, EXP_TOLERANCE, 0},
+{ 195, 3221679427u, 444800035u, 3243343143u, 1734989302u, 1068312202u, 3537952111u, 0, EXP_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1074196068u, 1478831994u, 0, EXP_TOLERANCE, 0},
+{ 197, 3225258784u, 1941318385u, 1045807374u, 792193370u, 1027918372u, 749451785u, 0, EXP_TOLERANCE, 0},
+{ 198, 3225716754u, 1299392207u, 3212131720u, 3205732280u, 1010504056u, 162887831u, 0, EXP_TOLERANCE, 0},
+{ 199, 1079824436u, 3035093505u, 1052187689u, 3287702190u, 1246977273u, 3659026689u, 0, EXP_TOLERANCE, 0},
+{ 200, 3227801892u, 2160225215u, 1102624859u, 836655570u, 826392674u, 2334422787u, 0, EXP_TOLERANCE, 0},
+{ 201, 1079946410u, 3360816360u, 3246176356u, 172860634u, 1258302663u, 595783054u, 0, EXP_TOLERANCE, 0},
+{ 202, 1073092940u, 146831910u, 1051558014u, 2340722078u, 1074779693u, 2145151815u, 0, EXP_TOLERANCE, 0},
+{ 203, 3224124895u, 1603798153u, 3207725532u, 1099413093u, 1051244985u, 2989707675u, 0, EXP_TOLERANCE, 0},
+{ 204, 3227804010u, 2429340443u, 3190303581u, 3223770005u, 825977359u, 2890255810u, 0, EXP_TOLERANCE, 0},
+{ 205, 1073785807u, 955542166u, 3230415151u, 275583938u, 1075843652u, 1493078710u, 0, EXP_TOLERANCE, 0},
+{ 206, 1078291818u, 513397822u, 1090646554u, 2089321329u, 1137467212u, 351397573u, 0, EXP_TOLERANCE, 0},
+{ 207, 3214141396u, 2782073372u, 1046063872u, 4023829068u, 1072652875u, 138208091u, 0, EXP_TOLERANCE, 0},
+{ 208, 1079690454u, 3242223094u, 3194111199u, 4264674108u, 1234585286u, 346227329u, 0, EXP_TOLERANCE, 0},
+{ 209, 3225927909u, 3506346169u, 1047020885u, 1742757458u, 1000737156u, 928258562u, 0, EXP_TOLERANCE, 0},
+{ 210, 3214684573u, 1265459564u, 3193450280u, 3650514880u, 1072636294u, 3135130836u, 0, EXP_TOLERANCE, 0},
+{ 211, 1075464434u, 1525260440u, 3235452527u, 2612331392u, 1082544645u, 3469250844u, 0, EXP_TOLERANCE, 0},
+{ 212, 3227697400u, 1263613754u, 3219096387u, 635677201u, 845641032u, 2821259135u, 0, EXP_TOLERANCE, 0},
+{ 213, 3217806423u, 4140947288u, 3200792376u, 2013265346u, 1072283451u, 2224455623u, 0, EXP_TOLERANCE, 0},
+{ 214, 3227954296u, 1912759945u, 3237045253u, 1351396825u, 798217665u, 2086155788u, 0, EXP_TOLERANCE, 0},
+{ 215, 3228282218u, 1001433078u, 3206926643u, 2741676659u, 737645798u, 2489257394u, 0, EXP_TOLERANCE, 0},
+{ 216, 1075680726u, 1088945233u, 1085095743u, 3986114865u, 1083799535u, 115784002u, 0, EXP_TOLERANCE, 0},
+{ 217, 3219928361u, 831239754u, 1099828675u, 3071308141u, 1071284656u, 1977716179u, 0, EXP_TOLERANCE, 0},
+{ 218, 3222688769u, 3473592372u, 1102759382u, 1309576357u, 1064228744u, 3715932954u, 0, EXP_TOLERANCE, 0},
+{ 219, 3229166610u, 2042340367u, 1091945628u, 2062772374u, 463396439u, 3913343620u, 0, EXP_TOLERANCE, 0},
+{ 220, 3214688631u, 1840632537u, 1096533424u, 807510337u, 1072636171u, 1550550553u, 0, EXP_TOLERANCE, 0},
+{ 221, 3224111690u, 144814872u, 3212698915u, 2282965697u, 1051416747u, 218973180u, 0, EXP_TOLERANCE, 0},
+{ 222, 1073333582u, 2552499583u, 3229111426u, 1470130815u, 1075054160u, 3344155594u, 0, EXP_TOLERANCE, 0},
+{ 223, 3227364425u, 2858583811u, 1089760910u, 6360994u, 893069846u, 2777198087u, 0, EXP_TOLERANCE, 0},
+{ 224, 3215042145u, 1614537194u, 1075198900u, 4088705365u, 1072622185u, 3424131072u, 0, EXP_TOLERANCE, 0},
+{ 225, 3228918974u, 3545570051u, 1065221325u, 1629217700u, 554828172u, 1332220829u, 0, EXP_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 1074189549u, 528208211u, 0, EXP_TOLERANCE, 0},
+{ 227, 3215677054u, 2406734491u, 1042055360u, 89226663u, 1072584209u, 97402367u, 0, EXP_TOLERANCE, 0},
+{ 228, 3214625449u, 1618759139u, 3194723421u, 3888234802u, 1072638092u, 4156317286u, 0, EXP_TOLERANCE, 0},
+{ 229, 1068988736u, 3590035633u, 3212424262u, 2892456615u, 1072793942u, 113645931u, 0, EXP_TOLERANCE, 0},
+{ 230, 3213011732u, 2431246964u, 3241512456u, 183850734u, 1072674218u, 2322381535u, 0, EXP_TOLERANCE, 0},
+{ 231, 1076918189u, 3088319870u, 3211544311u, 862225364u, 1097534688u, 1720101583u, 0, EXP_TOLERANCE, 0},
+{ 232, 3224808904u, 3495352775u, 1058576726u, 596957268u, 1038316024u, 2704436146u, 0, EXP_TOLERANCE, 0},
+{ 233, 1066476292u, 1839214511u, 3205004060u, 1923240983u, 1072710943u, 3120088286u, 0, EXP_TOLERANCE, 0},
+{ 234, 1069608200u, 739619702u, 3223356436u, 2689885273u, 1072841490u, 1671733001u, 0, EXP_TOLERANCE, 0},
+{ 235, 3216053611u, 2143376228u, 1098306332u, 3760236188u, 1072557866u, 124949512u, 0, EXP_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 1078184623u, 1598497576u, 0, EXP_TOLERANCE, 0},
+{ 237, 3219408869u, 2493598049u, 3194927008u, 1689107592u, 1071708811u, 3795731906u, 0, EXP_TOLERANCE, 0},
+{ 238, 3213058631u, 1578976988u, 1066368383u, 2117279163u, 1072673492u, 2246846524u, 0, EXP_TOLERANCE, 0},
+{ 239, 3221939535u, 3425290087u, 1098487295u, 1263412017u, 1067565021u, 2944648507u, 0, EXP_TOLERANCE, 0},
+{ 240, 3217869948u, 3635396812u, 1070999426u, 3965655689u, 1072270721u, 3634981027u, 0, EXP_TOLERANCE, 0},
+{ 241, 1069633530u, 2183973116u, 1101098363u, 1118613350u, 1072845109u, 3339325204u, 0, EXP_TOLERANCE, 0},
+{ 242, 3221946089u, 199516350u, 1078368488u, 164621458u, 1067550572u, 2506509655u, 0, EXP_TOLERANCE, 0},
+{ 243, 3212871842u, 3570940805u, 3230316437u, 3596080877u, 1072676385u, 2634172860u, 0, EXP_TOLERANCE, 0},
+{ 244, 3217646749u, 980880313u, 1079833442u, 884465057u, 1072315877u, 2036884740u, 0, EXP_TOLERANCE, 0},
+{ 245, 1080054180u, 2558179220u, 1052873711u, 1233598120u, 1270109524u, 2524660391u, 0, EXP_TOLERANCE, 0},
+{ 246, 1067038165u, 1909994277u, 1085015978u, 2991527452u, 1072719908u, 2697640880u, 0, EXP_TOLERANCE, 0},
+{ 247, 1070292444u, 1680290941u, 1074309900u, 2943870846u, 1072943204u, 3151340758u, 0, EXP_TOLERANCE, 0},
+{ 248, 1069981892u, 1451927357u, 3228615456u, 1502585517u, 1072896011u, 500177266u, 0, EXP_TOLERANCE, 0},
+{ 249, 3224677615u, 751136990u, 3230392165u, 3493275472u, 1041368347u, 2625785490u, 0, EXP_TOLERANCE, 0},
+{ 250, 1079491599u, 1209623292u, 3238056647u, 979495322u, 1216301027u, 1345426533u, 0, EXP_TOLERANCE, 0},
+{ 251, 3228404200u, 1717672108u, 1048120593u, 531240316u, 715186535u, 1714377665u, 0, EXP_TOLERANCE, 0},
+{ 252, 1068854987u, 3548721654u, 1086112947u, 3391817224u, 1072784816u, 1708052498u, 0, EXP_TOLERANCE, 0},
+{ 253, 1074691123u, 2758195125u, 1100880260u, 2028440924u, 1078367996u, 3066779734u, 0, EXP_TOLERANCE, 0},
+{ 254, 1076883861u, 2750123373u, 3232200256u, 1086294931u, 1096841846u, 788833203u, 0, EXP_TOLERANCE, 0},
+{ 255, 1065978768u, 2986160931u, 1076097908u, 2540046258u, 1072706409u, 172413673u, 0, EXP_TOLERANCE, 0},
+{ 256, 3224990842u, 451471221u, 1064816262u, 4187644495u, 1034117199u, 2383134537u, 0, EXP_TOLERANCE, 0},
+{ 257, 1080585860u, 2439500162u, 1065280276u, 1979490284u, 1368362891u, 4075308906u, 0, EXP_TOLERANCE, 0},
+{ 258, 1065581656u, 2283342035u, 1078398157u, 1345997553u, 1072703272u, 1306641747u, 0, EXP_TOLERANCE, 0},
+{ 259, 3219540804u, 179066662u, 1103272172u, 1217337578u, 1071637260u, 357090176u, 0, EXP_TOLERANCE, 0},
+{ 260, 3218902409u, 3779303391u, 3210023352u, 3115946280u, 1071938472u, 1299997584u, 0, EXP_TOLERANCE, 0},
+{ 261, 3213961394u, 286247089u, 1085153597u, 713645369u, 1072658399u, 978675133u, 0, EXP_TOLERANCE, 0},
+{ 262, 1077941860u, 1468283899u, 1042831668u, 2022736418u, 1121280747u, 2888650454u, 0, EXP_TOLERANCE, 0},
+{ 263, 1076847649u, 3305564080u, 1065483445u, 482392433u, 1096351817u, 3604886221u, 0, EXP_TOLERANCE, 0},
+{ 264, 3216375871u, 2256346551u, 3222430705u, 2071674991u, 1072520543u, 2427121917u, 0, EXP_TOLERANCE, 0},
+{ 265, 3216607607u, 2295269094u, 1084451053u, 2773103941u, 1072494144u, 3385062574u, 0, EXP_TOLERANCE, 0},
+{ 266, 1075028218u, 1482721827u, 1092243422u, 3125409590u, 1080092760u, 3102857585u, 0, EXP_TOLERANCE, 0},
+{ 267, 3221065973u, 1381740563u, 1071545057u, 2918235653u, 1069820730u, 3040152884u, 0, EXP_TOLERANCE, 0},
+{ 268, 3226133060u, 1105857967u, 3241990046u, 2703723225u, 991268023u, 2258767820u, 0, EXP_TOLERANCE, 0},
+{ 269, 1066084243u, 174689677u, 1079333374u, 3947057014u, 1072707243u, 3130733960u, 0, EXP_TOLERANCE, 0},
+{ 270, 1077878947u, 2023082423u, 3242081486u, 1169047927u, 1119748901u, 3426525989u, 0, EXP_TOLERANCE, 0},
+{ 271, 1070817355u, 3742487766u, 1043425732u, 194972788u, 1073064002u, 3585031582u, 0, EXP_TOLERANCE, 0},
+{ 272, 3220083283u, 2136071361u, 3211529757u, 993675115u, 1071160954u, 3515311890u, 0, EXP_TOLERANCE, 0},
+{ 273, 3219954837u, 210772141u, 3241441539u, 580731413u, 1071262863u, 2304851028u, 0, EXP_TOLERANCE, 0},
+{ 274, 1078111773u, 1751560711u, 1074522705u, 180987057u, 1129175206u, 2518765659u, 0, EXP_TOLERANCE, 0},
+{ 275, 1071997471u, 2552236599u, 1088658621u, 2112468655u, 1073690210u, 1525052105u, 0, EXP_TOLERANCE, 0},
+{ 276, 3213407865u, 1578223762u, 3224596567u, 2456166162u, 1072668094u, 738092801u, 0, EXP_TOLERANCE, 0},
+{ 277, 1070041301u, 2110924310u, 1086207177u, 3161208323u, 1072904904u, 3047488155u, 0, EXP_TOLERANCE, 0},
+{ 278, 3223474786u, 2352173188u, 1079361728u, 4070222179u, 1058769652u, 3906475321u, 0, EXP_TOLERANCE, 0},
+{ 279, 1080041384u, 2481562701u, 1090937016u, 3809489716u, 1267797634u, 404634930u, 0, EXP_TOLERANCE, 0},
+{ 280, 3215877019u, 330905705u, 1086260896u, 90264431u, 1072572396u, 1208844547u, 0, EXP_TOLERANCE, 0},
+{ 281, 1065895785u, 4162008079u, 3194387916u, 759522153u, 1072705752u, 3450625873u, 0, EXP_TOLERANCE, 0},
+{ 282, 1075772157u, 1839697482u, 3216442625u, 2211508949u, 1084361851u, 2955268254u, 0, EXP_TOLERANCE, 0},
+{ 283, 3227787115u, 3736863454u, 1063475914u, 3150741666u, 829092625u, 968779094u, 0, EXP_TOLERANCE, 0},
+{ 284, 1070223067u, 4200269406u, 3236646101u, 1061812176u, 1072932509u, 3212891973u, 0, EXP_TOLERANCE, 0},
+{ 285, 1074975099u, 106027290u, 3234978297u, 2245237549u, 1079745755u, 680984417u, 0, EXP_TOLERANCE, 0},
+{ 286, 3228109966u, 2132131375u, 3250483427u, 3449276437u, 769507420u, 1538427034u, 0, EXP_TOLERANCE, 0},
+{ 287, 1077854442u, 2334440944u, 1105423490u, 4004336184u, 1119135302u, 1452344798u, 0, EXP_TOLERANCE, 0},
+{ 288, 3220869856u, 4090088208u, 1042030013u, 3898658299u, 1070092575u, 3230411400u, 0, EXP_TOLERANCE, 0},
+{ 289, 3217345248u, 2272831437u, 3253082595u, 2639188641u, 1072378813u, 2389059511u, 0, EXP_TOLERANCE, 0},
+{ 290, 1069446748u, 1856594168u, 3189515294u, 4101853676u, 1072825748u, 3613517627u, 0, EXP_TOLERANCE, 0},
+{ 291, 1073915260u, 2211699255u, 3195060344u, 3865018604u, 1076138633u, 3271750546u, 0, EXP_TOLERANCE, 0},
+{ 292, 3227038370u, 996259334u, 3241496889u, 3782673116u, 923155228u, 4107521594u, 0, EXP_TOLERANCE, 0},
+{ 293, 1080256379u, 3840380763u, 1048674041u, 550040067u, 1307510065u, 928374556u, 0, EXP_TOLERANCE, 0},
+{ 294, 3229399497u, 95874100u, 3237232828u, 2645647822u, 377375137u, 719222175u, 0, EXP_TOLERANCE, 0},
+{ 295, 1065685736u, 3441419500u, 3252367038u, 876710419u, 1072704093u, 2246841165u, 0, EXP_TOLERANCE, 0},
+{ 296, 3226010640u, 2560836004u, 3199616543u, 1180840586u, 996949059u, 82980477u, 0, EXP_TOLERANCE, 0},
+{ 297, 3221602966u, 2218230392u, 3227485787u, 3947214579u, 1068555547u, 3858061400u, 0, EXP_TOLERANCE, 0},
+{ 298, 1075345350u, 1447312532u, 1081476588u, 780366847u, 1081890764u, 2057809468u, 0, EXP_TOLERANCE, 0},
+{ 299, 1073618219u, 2842113832u, 3216156731u, 225159029u, 1075463434u, 3769540376u, 0, EXP_TOLERANCE, 0},
+{ 300, 1079242825u, 1601981129u, 3234628869u, 2236538344u, 1193325070u, 2364090570u, 0, EXP_TOLERANCE, 0},
+{ 301, 1076784916u, 2194185737u, 3242362684u, 87913366u, 1095695295u, 2239129155u, 0, EXP_TOLERANCE, 0},
+{ 302, 3215861096u, 1346862963u, 1077836259u, 3604666660u, 1072573334u, 1410091035u, 0, EXP_TOLERANCE, 0},
+{ 303, 3218547435u, 3115209742u, 1099332326u, 1325101950u, 1072057026u, 3877451405u, 0, EXP_TOLERANCE, 0},
+{ 304, 3221400314u, 3889223100u, 1053247613u, 3371396923u, 1069077038u, 2922304680u, 0, EXP_TOLERANCE, 0},
+{ 305, 3220477868u, 4163120793u, 1075022670u, 1387631215u, 1070705523u, 1262184460u, 0, EXP_TOLERANCE, 0},
+{ 306, 3218064691u, 1532426189u, 1063168268u, 3397022615u, 1072232293u, 14882088u, 0, EXP_TOLERANCE, 0},
+{ 307, 3216761961u, 89324166u, 1079206060u, 3429424710u, 1072476762u, 2025275555u, 0, EXP_TOLERANCE, 0},
+{ 308, 3214345198u, 747591401u, 1072238381u, 2803213904u, 1072646638u, 1362298570u, 0, EXP_TOLERANCE, 0},
+{ 309, 1078530868u, 271904221u, 1044258318u, 1858545114u, 1148479724u, 2228394364u, 0, EXP_TOLERANCE, 0},
+{ 310, 3222826034u, 314958082u, 3249912496u, 2966213175u, 1063404822u, 2546095187u, 0, EXP_TOLERANCE, 0},
+{ 311, 3215005206u, 3119528953u, 3217179014u, 2908718240u, 1072624417u, 1982673129u, 0, EXP_TOLERANCE, 0},
+{ 312, 3226738936u, 2018361566u, 1100926600u, 3985805054u, 950839806u, 2828622982u, 0, EXP_TOLERANCE, 0},
+{ 313, 1073278308u, 409584884u, 3239758947u, 755795129u, 1074986774u, 588973461u, 0, EXP_TOLERANCE, 0},
+{ 314, 1074723870u, 1819156379u, 3251342302u, 2982669005u, 1078463413u, 1788076940u, 0, EXP_TOLERANCE, 0},
+{ 315, 1080591913u, 2080534280u, 3188254060u, 449171797u, 1369474257u, 3068381489u, 0, EXP_TOLERANCE, 0},
+{ 316, 1079179684u, 168744837u, 3214950009u, 1322217822u, 1187423881u, 280204842u, 0, EXP_TOLERANCE, 0},
+{ 317, 3229061076u, 3250487255u, 1062120700u, 1876195180u, 502358220u, 4092158339u, 0, EXP_TOLERANCE, 0},
+{ 318, 3223197752u, 1336400247u, 1098057903u, 3314079581u, 1061270312u, 2063251548u, 0, EXP_TOLERANCE, 0},
+{ 319, 3216261732u, 265025555u, 1063854282u, 3779482256u, 1072533680u, 2941193185u, 0, EXP_TOLERANCE, 0},
+{ 320, 1072543381u, 887044257u, 1054789618u, 2732056261u, 1074020119u, 1583710347u, 0, EXP_TOLERANCE, 0},
+{ 321, 1067932534u, 4027115185u, 3191764868u, 2940199511u, 1072742191u, 2686232784u, 0, EXP_TOLERANCE, 0},
+{ 322, 3216131643u, 2875684421u, 3227459837u, 2251967570u, 1072548762u, 3720766546u, 0, EXP_TOLERANCE, 0},
+{ 323, 1071633020u, 284173546u, 3238823679u, 3557800647u, 1073368685u, 2242917222u, 0, EXP_TOLERANCE, 0},
+{ 324, 1080487040u, 3147771266u, 3220110464u, 2933364246u, 1350032806u, 3038347863u, 0, EXP_TOLERANCE, 0},
+{ 325, 1071144616u, 3366183281u, 3234870843u, 537442654u, 1073179181u, 915714027u, 0, EXP_TOLERANCE, 0},
+{ 326, 3227341572u, 2529029548u, 3249882819u, 3781513577u, 895182279u, 740047972u, 0, EXP_TOLERANCE, 0},
+{ 327, 3219727810u, 1080845539u, 3206760016u, 911778687u, 1071458981u, 2588212980u, 0, EXP_TOLERANCE, 0},
+{ 328, 3213971132u, 469586759u, 1091830022u, 3080528840u, 1072658099u, 4263113631u, 0, EXP_TOLERANCE, 0},
+{ 329, 1075006224u, 2863108169u, 3225605506u, 2508274250u, 1079973897u, 1343663736u, 0, EXP_TOLERANCE, 0},
+{ 330, 3218167016u, 4080017377u, 3206492941u, 1470284690u, 1072195726u, 2669611838u, 0, EXP_TOLERANCE, 0},
+{ 331, 3217606150u, 3867917386u, 1102054928u, 3504746045u, 1072324220u, 3738189842u, 0, EXP_TOLERANCE, 0},
+{ 332, 1070813735u, 2962134101u, 3244741577u, 3390537350u, 1073062778u, 1341868663u, 0, EXP_TOLERANCE, 0},
+{ 333, 1077716053u, 1702237980u, 1071598971u, 1102587474u, 1115946680u, 2058865259u, 0, EXP_TOLERANCE, 0},
+{ 334, 3216601606u, 2180218657u, 3211592260u, 1206527853u, 1072494823u, 3525678913u, 0, EXP_TOLERANCE, 0},
+{ 335, 3215959112u, 394130786u, 3242511482u, 2437699868u, 1072567567u, 211465123u, 0, EXP_TOLERANCE, 0},
+{ 336, 1066257155u, 849581558u, 3252006507u, 2008614943u, 1072708613u, 2224607887u, 0, EXP_TOLERANCE, 0},
+{ 337, 3218528622u, 3128971673u, 3249137531u, 2773583059u, 1072063594u, 1861199787u, 0, EXP_TOLERANCE, 0},
+{ 338, 1076641258u, 590727700u, 3248651761u, 2183878539u, 1093973382u, 51932800u, 0, EXP_TOLERANCE, 0},
+{ 339, 1080127109u, 820687580u, 3208143496u, 1402434664u, 1283604000u, 2229435922u, 0, EXP_TOLERANCE, 0},
+{ 340, 3229222163u, 1873709254u, 3245167989u, 44275991u, 442816163u, 2556589127u, 0, EXP_TOLERANCE, 0},
+{ 341, 3213786001u, 1174874204u, 3208263730u, 2360372288u, 1072662264u, 3781223426u, 0, EXP_TOLERANCE, 0},
+{ 342, 1081834580u, 937573440u, 3208953761u, 211240241u, 1737879034u, 1339532059u, 0, EXP_TOLERANCE, 0},
+{ 343, 3226771718u, 2469774991u, 1043117070u, 3380071805u, 947847649u, 1283680172u, 0, EXP_TOLERANCE, 0},
+{ 344, 1069655378u, 442507560u, 3254252803u, 3257889649u, 1072848240u, 1357220231u, 0, EXP_TOLERANCE, 0},
+{ 345, 1071996248u, 1854921625u, 1049810168u, 2729627545u, 1073689017u, 2766820334u, 0, EXP_TOLERANCE, 0},
+{ 346, 3229546805u, 4001809575u, 3240128649u, 278261523u, 322987487u, 2511328647u, 0, EXP_TOLERANCE, 0},
+{ 347, 1077787510u, 1793907966u, 3238955714u, 398859249u, 1117634274u, 3075914843u, 0, EXP_TOLERANCE, 0},
+{ 348, 3216681187u, 2511916952u, 3219195283u, 1697158299u, 1072485838u, 3086667046u, 0, EXP_TOLERANCE, 0},
+{ 349, 1073131276u, 3230931724u, 3243897690u, 3508781585u, 1074823893u, 2387891840u, 0, EXP_TOLERANCE, 0},
+{ 350, 1081827510u, 1674254897u, 1046547577u, 217148561u, 1735342545u, 3735031445u, 0, EXP_TOLERANCE, 0},
+{ 351, 3218603986u, 3275604304u, 3194840159u, 2991205850u, 1072037461u, 2711189111u, 0, EXP_TOLERANCE, 0},
+{ 352, 3214123743u, 3509997278u, 3248888030u, 3897986511u, 1072653416u, 576737657u, 0, EXP_TOLERANCE, 0},
+{ 353, 1067105379u, 2156824613u, 1042295665u, 1239257646u, 1072720986u, 385023856u, 0, EXP_TOLERANCE, 0},
+{ 354, 3219555541u, 1073153314u, 3250031627u, 2567234990u, 1071622626u, 1879921992u, 0, EXP_TOLERANCE, 0},
+{ 355, 3213662084u, 4261696995u, 3197784432u, 323702024u, 1072664173u, 1494770321u, 0, EXP_TOLERANCE, 0},
+{ 356, 3226913781u, 4075177615u, 3202791065u, 1919006082u, 934660210u, 4071141554u, 0, EXP_TOLERANCE, 0},
+{ 357, 3225638525u, 386429966u, 1086504491u, 3698826164u, 1014131228u, 2849059877u, 0, EXP_TOLERANCE, 0},
+{ 358, 1075181462u, 1681986446u, 3194985869u, 3072950140u, 1080972819u, 4027497035u, 0, EXP_TOLERANCE, 0},
+{ 359, 3220457661u, 3719038997u, 1055433962u, 3331415058u, 1070728055u, 2502518029u, 0, EXP_TOLERANCE, 0},
+{ 360, 1070186897u, 2420250111u, 3238002206u, 1928661079u, 1072926968u, 3179169477u, 0, EXP_TOLERANCE, 0},
+{ 361, 1075622754u, 3679866727u, 3227386672u, 1273835792u, 1083468387u, 4108683448u, 0, EXP_TOLERANCE, 0},
+{ 362, 1065739986u, 2682092368u, 3234222284u, 1325425811u, 1072704521u, 3522344556u, 0, EXP_TOLERANCE, 0},
+{ 363, 1068895525u, 4175172697u, 3208346191u, 2130706153u, 1072787574u, 2645569776u, 0, EXP_TOLERANCE, 0},
+{ 364, 1078458136u, 1200784450u, 1083605096u, 1248595607u, 1145159070u, 3624009342u, 0, EXP_TOLERANCE, 0},
+{ 365, 3219133743u, 1897285171u, 3251296075u, 944966123u, 1071864797u, 3230578766u, 0, EXP_TOLERANCE, 0},
+{ 366, 3225642610u, 2270747330u, 3230692631u, 422503284u, 1013989767u, 3220011003u, 0, EXP_TOLERANCE, 0},
+{ 367, 1076780005u, 2857564741u, 1075647403u, 3308906709u, 1095620625u, 3220040566u, 0, EXP_TOLERANCE, 0},
+{ 368, 3216058010u, 1380066948u, 3232612906u, 2613634294u, 1072557351u, 3176396515u, 0, EXP_TOLERANCE, 0},
+{ 369, 1071230888u, 4022784584u, 1060483857u, 3264056381u, 1073211071u, 866665154u, 0, EXP_TOLERANCE, 0},
+{ 370, 1066657500u, 1778509100u, 3213146285u, 2665833973u, 1072713826u, 3324574262u, 0, EXP_TOLERANCE, 0},
+{ 371, 3219873028u, 1859175955u, 1079949560u, 4258450607u, 1071331100u, 1387314031u, 0, EXP_TOLERANCE, 0},
+{ 372, 1067151756u, 4128020197u, 1076266146u, 4122840980u, 1072721730u, 703093847u, 0, EXP_TOLERANCE, 0},
+{ 373, 3214154683u, 2454653987u, 3229487005u, 2977478685u, 1072652467u, 3648959943u, 0, EXP_TOLERANCE, 0},
+{ 374, 3229439235u, 1355181872u, 1095308770u, 436846481u, 362699701u, 144776434u, 0, EXP_TOLERANCE, 0},
+{ 375, 3227730934u, 2592856453u, 3247825559u, 3195234082u, 839453380u, 3215902683u, 0, EXP_TOLERANCE, 0},
+{ 376, 3222118023u, 3554670043u, 1091621009u, 3321236467u, 1067008394u, 515558083u, 0, EXP_TOLERANCE, 0},
+{ 377, 1072158561u, 1936670355u, 1095715713u, 2958468553u, 1073797675u, 3840516752u, 0, EXP_TOLERANCE, 0},
+{ 378, 3214311205u, 2960339502u, 1098808013u, 1044068983u, 1072647677u, 1015104521u, 0, EXP_TOLERANCE, 0},
+{ 379, 3215565553u, 4093388677u, 1095478112u, 1735930261u, 1072590826u, 1998582813u, 0, EXP_TOLERANCE, 0},
+{ 380, 1078457390u, 1807398746u, 3195743135u, 4261616162u, 1145132905u, 2733988366u, 0, EXP_TOLERANCE, 0},
+{ 381, 3218731378u, 3250576797u, 1059002384u, 3043079652u, 1071994341u, 3135803100u, 0, EXP_TOLERANCE, 0},
+{ 382, 1072352837u, 666051428u, 3208765404u, 1912684117u, 1073904876u, 2200829650u, 0, EXP_TOLERANCE, 0},
+{ 383, 1081467324u, 1949030179u, 1096388934u, 896459246u, 1602299239u, 4124280137u, 0, EXP_TOLERANCE, 0},
+{ 384, 1068980717u, 622499767u, 1066707637u, 1490260486u, 1072793392u, 3411156525u, 0, EXP_TOLERANCE, 0},
+{ 385, 1081522669u, 1490616165u, 3251242436u, 795675736u, 1622680601u, 1772451300u, 0, EXP_TOLERANCE, 0},
+{ 386, 1075701016u, 3662877092u, 3234317146u, 3200513112u, 1083933859u, 948582088u, 0, EXP_TOLERANCE, 0},
+{ 387, 1076748754u, 1356101968u, 3236536816u, 3062844611u, 1095205719u, 1389519343u, 0, EXP_TOLERANCE, 0},
+{ 388, 3220971216u, 2284484846u, 3219498359u, 3240896015u, 1069945740u, 300004641u, 0, EXP_TOLERANCE, 0},
+{ 389, 3225273929u, 494503287u, 1092811254u, 142673998u, 1027637252u, 1197719694u, 0, EXP_TOLERANCE, 0},
+{ 390, 3229057244u, 3394882641u, 3225306538u, 364852125u, 503719187u, 1185927887u, 0, EXP_TOLERANCE, 0},
+{ 391, 3222116035u, 193885269u, 1088149839u, 1359805831u, 1067014684u, 2719415674u, 0, EXP_TOLERANCE, 0},
+{ 392, 3216213422u, 592580907u, 3199560872u, 3086438952u, 1072539267u, 4261894756u, 0, EXP_TOLERANCE, 0},
+{ 393, 1070004424u, 1778008540u, 1049064687u, 73581647u, 1072899376u, 3317554069u, 0, EXP_TOLERANCE, 0},
+{ 394, 3227859230u, 233240285u, 1081923320u, 2710903921u, 815830717u, 753681861u, 0, EXP_TOLERANCE, 0},
+{ 395, 1072659495u, 3719878805u, 1079866720u, 3615458228u, 1074095657u, 776338417u, 0, EXP_TOLERANCE, 0},
+{ 396, 3221194724u, 3647632375u, 3247225271u, 3839959621u, 1069668000u, 3902990147u, 0, EXP_TOLERANCE, 0},
+{ 397, 1081381000u, 2232210456u, 3235434773u, 224271737u, 1570366929u, 1467736445u, 0, EXP_TOLERANCE, 0},
+{ 398, 3213975204u, 2134662911u, 3190390590u, 4239009051u, 1072657974u, 3724433639u, 0, EXP_TOLERANCE, 0},
+{ 399, 1075283265u, 2305279897u, 1077668039u, 1854523320u, 1081499061u, 1371511881u, 0, EXP_TOLERANCE, 0},
+{ 400, 3220912835u, 538224650u, 3206153057u, 1379649610u, 1070028577u, 3385463776u, 0, EXP_TOLERANCE, 0},
+{ 401, 3215284875u, 3683897920u, 3244167599u, 3647579469u, 1072607582u, 369746842u, 0, EXP_TOLERANCE, 0},
+{ 402, 1077698021u, 2694093608u, 1042775347u, 598406111u, 1115578102u, 2696598259u, 0, EXP_TOLERANCE, 0},
+{ 403, 3218975424u, 872706833u, 1084802480u, 2200602798u, 1071915306u, 2038804970u, 0, EXP_TOLERANCE, 0},
+{ 404, 1065408269u, 904146293u, 1060867322u, 1729685598u, 1072701905u, 2787254479u, 0, EXP_TOLERANCE, 0},
+{ 405, 3214569338u, 1894173462u, 3232800651u, 191960416u, 1072639801u, 138794756u, 0, EXP_TOLERANCE, 0},
+{ 406, 1078642431u, 3521028551u, 1054522089u, 3287274359u, 1153643349u, 3672113002u, 0, EXP_TOLERANCE, 0},
+{ 407, 1079658324u, 959640601u, 3201578263u, 4136915018u, 1231622977u, 2234964481u, 0, EXP_TOLERANCE, 0},
+{ 408, 1071345483u, 1553716379u, 1106027987u, 984725765u, 1073254457u, 2029348498u, 0, EXP_TOLERANCE, 0},
+{ 409, 3226249729u, 2287646644u, 3240329321u, 2276183378u, 985897502u, 1659813779u, 0, EXP_TOLERANCE, 0},
+{ 410, 1072403478u, 3940225170u, 3199544434u, 997572161u, 1073934490u, 3814688844u, 0, EXP_TOLERANCE, 0},
+{ 411, 3219059817u, 36116288u, 3206886566u, 4196602670u, 1071889028u, 622952862u, 0, EXP_TOLERANCE, 0},
+{ 412, 3225967213u, 3550227562u, 3207257983u, 2747744117u, 998936682u, 4215021001u, 0, EXP_TOLERANCE, 0},
+{ 413, 1081167454u, 507130047u, 1048359321u, 3229888373u, 1491488321u, 2514231187u, 0, EXP_TOLERANCE, 0},
+{ 414, 3221948202u, 2210969014u, 1081031001u, 1946786091u, 1067545951u, 134943692u, 0, EXP_TOLERANCE, 0},
+{ 415, 3224772654u, 4059150589u, 3189759234u, 1177045799u, 1039198095u, 3770974960u, 0, EXP_TOLERANCE, 0},
+{ 416, 1078423548u, 2664812822u, 1050343198u, 2034180320u, 1143517713u, 3731467255u, 0, EXP_TOLERANCE, 0},
+{ 417, 3220070573u, 1175750283u, 3235559706u, 1424491340u, 1071170763u, 285360716u, 0, EXP_TOLERANCE, 0},
+{ 418, 3219147073u, 1630036121u, 3231972785u, 3195479448u, 1071856759u, 825964156u, 0, EXP_TOLERANCE, 0},
+{ 419, 1077846963u, 2527029044u, 1046927050u, 4000723255u, 1118989351u, 3673409802u, 0, EXP_TOLERANCE, 0},
+{ 420, 1076820069u, 3335703647u, 3237349676u, 3869440059u, 1096040909u, 786910848u, 0, EXP_TOLERANCE, 0},
+{ 421, 1078850936u, 3888398377u, 3196041693u, 1290567220u, 1163247715u, 1366973945u, 0, EXP_TOLERANCE, 0},
+{ 422, 1071921950u, 3242451480u, 3248384948u, 707431021u, 1073617858u, 3148318263u, 0, EXP_TOLERANCE, 0},
+{ 423, 1075890477u, 2739665123u, 1060777905u, 1733073225u, 1085358008u, 2026080761u, 0, EXP_TOLERANCE, 0},
+{ 424, 1075371333u, 1297274853u, 3208848704u, 3341639139u, 1082084306u, 1161258137u, 0, EXP_TOLERANCE, 0},
+{ 425, 1066493885u, 2228057309u, 1084318902u, 1317851136u, 1072711223u, 1263590417u, 0, EXP_TOLERANCE, 0},
+{ 426, 1077769567u, 270039934u, 3241414679u, 3063626339u, 1117167369u, 251426608u, 0, EXP_TOLERANCE, 0},
+{ 427, 3220226926u, 83062251u, 3211262173u, 2659016437u, 1071018626u, 3607873799u, 0, EXP_TOLERANCE, 0},
+{ 428, 1080015246u, 3833539373u, 3206667189u, 1567476111u, 1264640185u, 3066665016u, 0, EXP_TOLERANCE, 0},
+{ 429, 3217777984u, 2382776852u, 3249232579u, 1546622468u, 1072289181u, 3303189231u, 0, EXP_TOLERANCE, 0},
+{ 430, 1076099255u, 1714300821u, 1104130938u, 4167591598u, 1087714517u, 3396587971u, 0, EXP_TOLERANCE, 0},
+{ 431, 1067869976u, 2798720100u, 1086978789u, 449990704u, 1072740147u, 1441545775u, 0, EXP_TOLERANCE, 0},
+{ 432, 3223858383u, 4039516226u, 3244344107u, 4272932619u, 1054317676u, 2225867290u, 0, EXP_TOLERANCE, 0},
+{ 433, 3221659865u, 1683007544u, 1091105663u, 3805494321u, 1068384828u, 2642772291u, 0, EXP_TOLERANCE, 0},
+{ 434, 3220852948u, 2072627412u, 1094383324u, 3394151662u, 1070118481u, 2781076629u, 0, EXP_TOLERANCE, 0},
+{ 435, 3220570024u, 1120106427u, 3223631624u, 3404608264u, 1070608094u, 3726035371u, 0, EXP_TOLERANCE, 0},
+{ 436, 1078985629u, 559918757u, 3205077053u, 908100198u, 1169510707u, 348797896u, 0, EXP_TOLERANCE, 0},
+{ 437, 1065746590u, 2026673913u, 3244833635u, 2844573214u, 1072704573u, 4160322489u, 0, EXP_TOLERANCE, 0},
+{ 438, 3229401435u, 3946837259u, 3234993796u, 3850406820u, 376626627u, 2645031468u, 0, EXP_TOLERANCE, 0},
+{ 439, 1070062721u, 3139330994u, 1046133568u, 1539650690u, 1072908126u, 3501052954u, 0, EXP_TOLERANCE, 0},
+{ 440, 3225171164u, 1554593884u, 3228899878u, 2813752562u, 1029949960u, 634658456u, 0, EXP_TOLERANCE, 0},
+{ 441, 1069087916u, 3804703138u, 1072931071u, 2053677923u, 1072800756u, 699656724u, 0, EXP_TOLERANCE, 0},
+{ 442, 3227038507u, 289355864u, 1078453818u, 2143066338u, 923143111u, 3108681133u, 0, EXP_TOLERANCE, 0},
+{ 443, 3216522792u, 2157691971u, 1106629150u, 110806409u, 1072503764u, 1811146510u, 0, EXP_TOLERANCE, 0},
+{ 444, 1075865563u, 3570399481u, 1085637605u, 180265334u, 1085048493u, 1043128358u, 0, EXP_TOLERANCE, 0},
+{ 445, 3216708822u, 558779875u, 3202046748u, 2338464653u, 1072482728u, 2560919037u, 0, EXP_TOLERANCE, 0},
+{ 446, 1066676984u, 1703969219u, 3229797258u, 1417521063u, 1072714137u, 992457887u, 0, EXP_TOLERANCE, 0},
+{ 447, 3225199349u, 3917440951u, 1051668894u, 3736066983u, 1029291645u, 1524244054u, 0, EXP_TOLERANCE, 0},
+{ 448, 1071043536u, 3106613409u, 1066627453u, 2735392257u, 1073142642u, 2422476262u, 0, EXP_TOLERANCE, 0},
+{ 449, 1071956828u, 2229777605u, 1065061963u, 2405869925u, 1073650949u, 990909907u, 0, EXP_TOLERANCE, 0},
+{ 450, 3225831741u, 3967957902u, 1057416138u, 3459188071u, 1005185820u, 1500159877u, 0, EXP_TOLERANCE, 0},
+{ 451, 1071784938u, 3699016825u, 3249713090u, 796144848u, 1073493066u, 2784789311u, 0, EXP_TOLERANCE, 0},
+{ 452, 3222524940u, 3285165564u, 3211948811u, 401510871u, 1065144087u, 2462551555u, 0, EXP_TOLERANCE, 0},
+{ 453, 1078529018u, 634857910u, 3199607513u, 914218057u, 1148406303u, 2060143941u, 0, EXP_TOLERANCE, 0},
+{ 454, 1076403304u, 2030735578u, 3233855943u, 965677531u, 1091237697u, 3806493702u, 0, EXP_TOLERANCE, 0},
+{ 455, 1075362511u, 3957229084u, 1051050470u, 3123776651u, 1082016435u, 3236122522u, 0, EXP_TOLERANCE, 0},
+{ 456, 3221863333u, 162122081u, 3239376395u, 108064594u, 1067746995u, 3736551116u, 0, EXP_TOLERANCE, 0},
+{ 457, 3224688874u, 869031839u, 3225020876u, 1344301606u, 1041127895u, 2468905470u, 0, EXP_TOLERANCE, 0},
+{ 458, 3219676354u, 946696117u, 3231825228u, 1700703647u, 1071506461u, 2633364322u, 0, EXP_TOLERANCE, 0},
+{ 459, 1074444299u, 3394168074u, 1076939786u, 1666995668u, 1077688097u, 1414459791u, 0, EXP_TOLERANCE, 0},
+{ 460, 3218211979u, 2488789804u, 3238508333u, 1506943664u, 1072178670u, 1219639660u, 0, EXP_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1074254177u, 2710454031u, 0, EXP_TOLERANCE, 0},
+{ 462, 3220983118u, 1244307192u, 3191297711u, 2540916692u, 1069929411u, 857160910u, 0, EXP_TOLERANCE, 0},
+{ 463, 3215791332u, 2871645739u, 3239081581u, 1440249115u, 1072577449u, 2224257486u, 0, EXP_TOLERANCE, 0},
+{ 464, 1072544937u, 1231934926u, 3236746788u, 603977748u, 1074021104u, 1153376056u, 0, EXP_TOLERANCE, 0},
+{ 465, 3214324057u, 2386312545u, 1063169277u, 2715234268u, 1072647284u, 1633360252u, 0, EXP_TOLERANCE, 0},
+{ 466, 1077317658u, 915867083u, 1046790892u, 3347417612u, 1106735782u, 2072797994u, 0, EXP_TOLERANCE, 0},
+{ 467, 1081866940u, 3553288373u, 1065698616u, 2906680663u, 1749870023u, 2025279999u, 0, EXP_TOLERANCE, 0},
+{ 468, 1066477746u, 2342364630u, 1051356723u, 4019093203u, 1072710966u, 3567891728u, 0, EXP_TOLERANCE, 0},
+{ 469, 3216897802u, 2911548084u, 1105282515u, 2476735795u, 1072461596u, 2505953515u, 0, EXP_TOLERANCE, 0},
+{ 470, 1068298564u, 1836216409u, 1101062307u, 2519592554u, 1072754229u, 2097073093u, 0, EXP_TOLERANCE, 0},
+{ 471, 1073323889u, 1235369496u, 3222946447u, 668087854u, 1075042085u, 432513398u, 0, EXP_TOLERANCE, 0},
+{ 472, 3217991780u, 2981820811u, 1059838516u, 2845580478u, 1072246576u, 866819828u, 0, EXP_TOLERANCE, 0},
+{ 473, 3214902934u, 1565550570u, 3217165795u, 4162017137u, 1072629667u, 221223936u, 0, EXP_TOLERANCE, 0},
+{ 474, 3224668466u, 2808968027u, 1055630096u, 1782326814u, 1041545264u, 3106633046u, 0, EXP_TOLERANCE, 0},
+{ 475, 1069305614u, 1492622658u, 3216653077u, 3972512122u, 1072815855u, 18398701u, 0, EXP_TOLERANCE, 0},
+{ 476, 3222171679u, 2722693603u, 3227814791u, 3169731970u, 1066847382u, 693197204u, 0, EXP_TOLERANCE, 0},
+{ 477, 3221052359u, 899763203u, 3207606001u, 2804747833u, 1069838003u, 3960237442u, 0, EXP_TOLERANCE, 0},
+{ 478, 3223330293u, 3789058912u, 3228095081u, 4135937628u, 1060420669u, 2863646027u, 0, EXP_TOLERANCE, 0},
+{ 479, 1069636566u, 1682808307u, 3206960335u, 232877759u, 1072845544u, 1293413822u, 0, EXP_TOLERANCE, 0},
+{ 480, 3226362846u, 2851963139u, 3246852961u, 2590862592u, 980672310u, 2121477897u, 0, EXP_TOLERANCE, 0},
+{ 481, 1074908950u, 2422232642u, 3234779662u, 290458310u, 1079342178u, 769697412u, 0, EXP_TOLERANCE, 0},
+{ 482, 3219059686u, 1082582386u, 1075605675u, 2602133689u, 1071889068u, 1943466506u, 0, EXP_TOLERANCE, 0},
+{ 483, 3226187123u, 1789635787u, 1059414278u, 1048286093u, 988843638u, 1761624532u, 0, EXP_TOLERANCE, 0},
+{ 484, 1079456174u, 231339448u, 1055573265u, 504907415u, 1212992503u, 57355760u, 0, EXP_TOLERANCE, 0},
+{ 485, 1071600069u, 1153251200u, 3204617090u, 1772013857u, 1073355194u, 2543994465u, 0, EXP_TOLERANCE, 0},
+{ 486, 1080676687u, 1082898276u, 3212089272u, 1449080862u, 1385133678u, 3383991944u, 0, EXP_TOLERANCE, 0},
+{ 487, 1076571101u, 3177299045u, 1058862813u, 809400815u, 1093156946u, 1324449489u, 0, EXP_TOLERANCE, 0},
+{ 488, 3223514518u, 1924429710u, 1056464743u, 3349283177u, 1058297638u, 3331281830u, 0, EXP_TOLERANCE, 0},
+{ 489, 3226599023u, 42238036u, 1042379500u, 2113559863u, 963765357u, 1028628530u, 0, EXP_TOLERANCE, 0},
+{ 490, 1071052699u, 3304403230u, 3217556703u, 58952646u, 1073145918u, 2870415022u, 0, EXP_TOLERANCE, 0},
+{ 491, 3218960986u, 1645486982u, 3224301095u, 3636267471u, 1071919855u, 1479310056u, 0, EXP_TOLERANCE, 0},
+{ 492, 1071150617u, 619402181u, 3235208235u, 557360557u, 1073181378u, 211059331u, 0, EXP_TOLERANCE, 0},
+{ 493, 3225655482u, 110029735u, 1046937383u, 984375729u, 1013314403u, 3677128438u, 0, EXP_TOLERANCE, 0},
+{ 494, 3213613986u, 4063688092u, 3203235744u, 1049950343u, 1072664914u, 2549757512u, 0, EXP_TOLERANCE, 0},
+{ 495, 1070739227u, 650996069u, 1054971928u, 3953359826u, 1073037809u, 838695363u, 0, EXP_TOLERANCE, 0},
+{ 496, 3222861501u, 66926332u, 1090561839u, 1379780888u, 1063250554u, 387700961u, 0, EXP_TOLERANCE, 0},
+{ 497, 3224016123u, 2803378256u, 1086057989u, 498534626u, 1052530954u, 1101873220u, 0, EXP_TOLERANCE, 0},
+{ 498, 1076327097u, 2846400785u, 1047142525u, 1375153550u, 1090398038u, 3404434636u, 0, EXP_TOLERANCE, 0},
+{ 499, 1066601297u, 2869128958u, 1070972315u, 4246440273u, 1072712931u, 3206431290u, 0, EXP_TOLERANCE, 0},
+{ 500, 1067561146u, 3112381207u, 1044430965u, 3981604561u, 1072730111u, 14195977u, 0, EXP_TOLERANCE, 0},
+{ 501, 3223914965u, 243303420u, 1093735824u, 1575581926u, 1053731509u, 904055362u, 0, EXP_TOLERANCE, 0},
+{ 502, 3225506509u, 3218865041u, 3204803496u, 3840388050u, 1020275468u, 1833594413u, 0, EXP_TOLERANCE, 0},
+{ 503, 1067289799u, 336846959u, 1052664471u, 3798336786u, 1072723947u, 4034846420u, 0, EXP_TOLERANCE, 0},
+{ 504, 1068537148u, 3639240976u, 1081202165u, 1844741676u, 1072763420u, 176306533u, 0, EXP_TOLERANCE, 0},
+{ 505, 3218196249u, 717293069u, 3211534283u, 582401011u, 1072184616u, 3222172175u, 0, EXP_TOLERANCE, 0},
+{ 506, 3228893840u, 3766248610u, 3196520332u, 1174437546u, 564150813u, 811276996u, 0, EXP_TOLERANCE, 0},
+{ 507, 1076091194u, 756959182u, 3204099341u, 1581804034u, 1087631618u, 1978209737u, 0, EXP_TOLERANCE, 0},
+{ 508, 3217340780u, 3560686300u, 3220980617u, 4277975772u, 1072379763u, 1155762898u, 0, EXP_TOLERANCE, 0},
+{ 509, 3218294684u, 2598148853u, 3217622194u, 3460421008u, 1072147770u, 346718411u, 0, EXP_TOLERANCE, 0},
+{ 510, 1071963704u, 136600515u, 3209934920u, 3340653128u, 1073657537u, 2596417839u, 0, EXP_TOLERANCE, 0},
+{ 511, 1078994518u, 1045480938u, 3251354609u, 4133432965u, 1170363966u, 1471292306u, 0, EXP_TOLERANCE, 0},
+{ 512, 1077967943u, 1630207738u, 3239996829u, 2393354808u, 1122481140u, 2643918337u, 0, EXP_TOLERANCE, 0},
+{ 513, 3213694690u, 3739770117u, 1059520750u, 3959551225u, 1072663671u, 23114429u, 0, EXP_TOLERANCE, 0},
+{ 514, 3223390473u, 1498861716u, 1091297147u, 847410798u, 1059730387u, 1062439242u, 0, EXP_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 1075304551u, 788448980u, 0, EXP_TOLERANCE, 0},
+{ 516, 1069529329u, 2353103845u, 3235718771u, 2978889966u, 1072831576u, 2964825654u, 0, EXP_TOLERANCE, 0},
+{ 517, 3229337896u, 1546972125u, 3249076079u, 1987349196u, 400067810u, 350725282u, 0, EXP_TOLERANCE, 0},
+{ 518, 3225636601u, 2769161072u, 1075207126u, 292616282u, 1014204187u, 2505832380u, 0, EXP_TOLERANCE, 0},
+{ 519, 3215440938u, 36855311u, 1052128202u, 1479039342u, 1072598248u, 1535663252u, 0, EXP_TOLERANCE, 0},
+{ 520, 1076417021u, 2027463605u, 1066023013u, 3369686340u, 1091432667u, 1056725485u, 0, EXP_TOLERANCE, 0},
+{ 521, 3215678541u, 3808681655u, 1054161346u, 1821773119u, 1072584120u, 3865333882u, 0, EXP_TOLERANCE, 0},
+{ 522, 1065851752u, 3175490326u, 3226879970u, 845687760u, 1072705404u, 3214402448u, 0, EXP_TOLERANCE, 0},
+{ 523, 1065371665u, 3124482451u, 3242748377u, 3259417226u, 1072701617u, 1556794065u, 0, EXP_TOLERANCE, 0},
+{ 524, 1067265791u, 2751606436u, 3236210939u, 3923142740u, 1072723561u, 3907206090u, 0, EXP_TOLERANCE, 0},
+{ 525, 1079966097u, 2016872044u, 3228408064u, 4201274408u, 1260053709u, 2351383485u, 0, EXP_TOLERANCE, 0},
+{ 526, 3215077894u, 1019916843u, 3219974785u, 1977881787u, 1072620028u, 1513873245u, 0, EXP_TOLERANCE, 0},
+{ 527, 3215207392u, 2060433318u, 1075872515u, 366073725u, 1072612232u, 1485589014u, 0, EXP_TOLERANCE, 0},
+{ 528, 3213200653u, 1098469906u, 1082900695u, 2349346832u, 1072671295u, 2138435974u, 0, EXP_TOLERANCE, 0},
+{ 529, 3218363315u, 3011196295u, 3252479932u, 2459281672u, 1072122586u, 3209321029u, 0, EXP_TOLERANCE, 0},
+{ 530, 3221334323u, 2843222682u, 1089275809u, 298982001u, 1069295228u, 2479655835u, 0, EXP_TOLERANCE, 0},
+{ 531, 1080766178u, 914741728u, 3203468059u, 2833809843u, 1401595225u, 1543027566u, 0, EXP_TOLERANCE, 0},
+{ 532, 3225229542u, 1274901962u, 3241535845u, 3759113509u, 1028668815u, 1805280638u, 0, EXP_TOLERANCE, 0},
+{ 533, 3227042074u, 2134927252u, 3253802671u, 3013731444u, 922860414u, 1506262932u, 0, EXP_TOLERANCE, 0},
+{ 534, 1080326973u, 2230655177u, 3254510616u, 1249674366u, 1320480180u, 3545707614u, 0, EXP_TOLERANCE, 0},
+{ 535, 1071359861u, 717357389u, 1083533731u, 3746683362u, 1073259985u, 785194633u, 0, EXP_TOLERANCE, 0},
+{ 536, 3220064570u, 834976849u, 3217357661u, 2465861779u, 1071175416u, 1040443015u, 0, EXP_TOLERANCE, 0},
+{ 537, 1066627637u, 1385714428u, 1053358395u, 3007113740u, 1072713351u, 479550567u, 0, EXP_TOLERANCE, 0},
+{ 538, 1068353711u, 599268545u, 3201368210u, 2309854744u, 1072756054u, 2342579642u, 0, EXP_TOLERANCE, 0},
+{ 539, 1073100182u, 2840234388u, 3232496515u, 333365983u, 1074792277u, 1476863741u, 0, EXP_TOLERANCE, 0},
+{ 540, 1066894301u, 3136078996u, 3194520860u, 2650572904u, 1072717606u, 314014954u, 0, EXP_TOLERANCE, 0},
+{ 541, 3224250507u, 2405805086u, 3251640319u, 324233833u, 1049818942u, 619300132u, 0, EXP_TOLERANCE, 0},
+{ 542, 1081533322u, 2589598340u, 3254677807u, 952438812u, 1626625304u, 2555502454u, 0, EXP_TOLERANCE, 0},
+{ 543, 3213232021u, 1922837702u, 3216892718u, 3535907549u, 1072670810u, 2392774352u, 0, EXP_TOLERANCE, 0},
+{ 544, 3226838652u, 261447440u, 3209805849u, 1150571079u, 941666308u, 2929954307u, 0, EXP_TOLERANCE, 0},
+{ 545, 1079028016u, 4026487528u, 1073152064u, 27340691u, 1173468543u, 273403284u, 0, EXP_TOLERANCE, 0},
+{ 546, 3222832236u, 338765118u, 1086225786u, 3207238249u, 1063376827u, 2552266259u, 0, EXP_TOLERANCE, 0},
+{ 547, 3215057071u, 1085283176u, 3187775111u, 1601194210u, 1072621284u, 3181137750u, 0, EXP_TOLERANCE, 0},
+{ 548, 1078937261u, 3031712790u, 3252307859u, 170666844u, 1167258064u, 3602398320u, 0, EXP_TOLERANCE, 0},
+{ 549, 3220959383u, 3148395674u, 1041913758u, 3306391490u, 1069962159u, 449105735u, 0, EXP_TOLERANCE, 0},
+{ 550, 3217005710u, 2205233857u, 3208100078u, 3993195511u, 1072449636u, 2341049361u, 0, EXP_TOLERANCE, 0},
+{ 551, 1071893912u, 4282766727u, 1072820377u, 1874778218u, 1073591653u, 3798859726u, 0, EXP_TOLERANCE, 0},
+{ 552, 3218173124u, 2920860798u, 3218070226u, 3104066154u, 1072193398u, 4039462005u, 0, EXP_TOLERANCE, 0},
+{ 553, 3217533263u, 969991373u, 3250596895u, 1734386152u, 1072339301u, 3336979462u, 0, EXP_TOLERANCE, 0},
+{ 554, 3226332906u, 1218740205u, 3239802737u, 2610078504u, 982042268u, 3949815583u, 0, EXP_TOLERANCE, 0},
+{ 555, 3217565578u, 1485218325u, 3220870240u, 3591664613u, 1072332599u, 1755137557u, 0, EXP_TOLERANCE, 0},
+{ 556, 3216754207u, 690157417u, 3190850619u, 4192347699u, 1072477631u, 3662215240u, 0, EXP_TOLERANCE, 0},
+{ 557, 1079276594u, 4009839784u, 1079670252u, 394167192u, 1196450945u, 2525536651u, 0, EXP_TOLERANCE, 0},
+{ 558, 3225122053u, 961532417u, 1092588071u, 2923790239u, 1031073549u, 1672191880u, 0, EXP_TOLERANCE, 0},
+{ 559, 3216462003u, 4174125604u, 1050682630u, 2169701868u, 1072510688u, 4180692824u, 0, EXP_TOLERANCE, 0},
+{ 560, 3227363835u, 4146748230u, 1087373950u, 2481478351u, 893135089u, 582298895u, 0, EXP_TOLERANCE, 0},
+{ 561, 1073842138u, 3984715440u, 1050421618u, 2446142566u, 1075963121u, 1824117845u, 0, EXP_TOLERANCE, 0},
+{ 562, 1076832374u, 936290150u, 1100614426u, 3625806370u, 1096171572u, 79506205u, 0, EXP_TOLERANCE, 0},
+{ 563, 1080913584u, 1866615265u, 3215651428u, 2337013350u, 1428810148u, 2464900529u, 0, EXP_TOLERANCE, 0},
+{ 564, 3229081054u, 712227971u, 1106004723u, 973148499u, 494989773u, 881372988u, 0, EXP_TOLERANCE, 0},
+{ 565, 3223796743u, 3409813738u, 3244817008u, 1933503498u, 1055057116u, 1987951892u, 0, EXP_TOLERANCE, 0},
+{ 566, 1075749429u, 3180389060u, 3228735703u, 83422217u, 1084263619u, 3719345681u, 0, EXP_TOLERANCE, 0},
+{ 567, 1074732996u, 556972671u, 3204582372u, 841555801u, 1078491082u, 3497361082u, 0, EXP_TOLERANCE, 0},
+{ 568, 1072864873u, 4189151332u, 1080874032u, 706326922u, 1074371849u, 3237121563u, 0, EXP_TOLERANCE, 0},
+{ 569, 1079374091u, 198291836u, 1057281892u, 2188836928u, 1205376783u, 2535783908u, 0, EXP_TOLERANCE, 0},
+{ 570, 1074946267u, 1219449298u, 3228734687u, 3504562743u, 1079557279u, 563112082u, 0, EXP_TOLERANCE, 0},
+{ 571, 3217153376u, 1776099219u, 1094316777u, 4188083896u, 1072420059u, 1952839512u, 0, EXP_TOLERANCE, 0},
+{ 572, 3214817228u, 2614400266u, 1073750227u, 3003203347u, 1072632265u, 3501612041u, 0, EXP_TOLERANCE, 0},
+{ 573, 3219225558u, 2959351406u, 1105603716u, 311851587u, 1071810451u, 740693120u, 0, EXP_TOLERANCE, 0},
+{ 574, 1076155826u, 865443613u, 1097532516u, 3622237781u, 1088443249u, 3543760780u, 0, EXP_TOLERANCE, 0},
+{ 575, 3223398058u, 447506102u, 3195759295u, 3603669725u, 1059633838u, 605796371u, 0, EXP_TOLERANCE, 0},
+{ 576, 1079015805u, 3934398273u, 1040996422u, 2968621268u, 1172360989u, 1233059955u, 0, EXP_TOLERANCE, 0},
+{ 577, 3215614193u, 784208771u, 1088764788u, 2182296421u, 1072587937u, 320113544u, 0, EXP_TOLERANCE, 0},
+{ 578, 3228409347u, 1527590526u, 3206961556u, 2823164069u, 714212086u, 3700796565u, 0, EXP_TOLERANCE, 0},
+{ 579, 3225109795u, 3876699591u, 3207481130u, 4028148535u, 1031355705u, 3297444173u, 0, EXP_TOLERANCE, 0},
+{ 580, 1076236154u, 2164249756u, 1059857743u, 1785169952u, 1089348091u, 3028702007u, 0, EXP_TOLERANCE, 0},
+{ 581, 1078172521u, 2079273665u, 1080303860u, 625760474u, 1131925960u, 2820657748u, 0, EXP_TOLERANCE, 0},
+{ 582, 3222291804u, 3636214836u, 1068367620u, 2932621925u, 1066501856u, 2508581844u, 0, EXP_TOLERANCE, 0},
+{ 583, 1066015468u, 4274131512u, 1047707755u, 92550763u, 1072706699u, 1716559078u, 0, EXP_TOLERANCE, 0},
+{ 584, 3215599337u, 2648933384u, 1084603503u, 3534304873u, 1072588819u, 508060763u, 0, EXP_TOLERANCE, 0},
+{ 585, 1070854691u, 3216750767u, 3191088629u, 547482628u, 1073076693u, 2158989442u, 0, EXP_TOLERANCE, 0},
+{ 586, 1070521958u, 1420360746u, 1080063101u, 1690029499u, 1072979223u, 1425260532u, 0, EXP_TOLERANCE, 0},
+{ 587, 3223563908u, 1908572179u, 1080112083u, 1228319033u, 1057745063u, 1750491909u, 0, EXP_TOLERANCE, 0},
+{ 588, 1067032546u, 500312015u, 3212368508u, 3864619086u, 1072719818u, 2566005358u, 0, EXP_TOLERANCE, 0},
+{ 589, 3221335610u, 4211343447u, 1087492676u, 4272583781u, 1069290704u, 1406122007u, 0, EXP_TOLERANCE, 0},
+{ 590, 1080518026u, 2382118000u, 1042665328u, 567154882u, 1355833620u, 2043686521u, 0, EXP_TOLERANCE, 0},
+{ 591, 1069547778u, 1435344339u, 3216303171u, 2275988178u, 1072832900u, 3711969349u, 0, EXP_TOLERANCE, 0},
+{ 592, 3219781499u, 3403659753u, 3218043030u, 1926480488u, 1071410667u, 198580343u, 0, EXP_TOLERANCE, 0},
+{ 593, 1074743231u, 1198845185u, 3225556149u, 1130089684u, 1078522694u, 2138026103u, 0, EXP_TOLERANCE, 0},
+{ 594, 3221614466u, 2183928090u, 1048403956u, 963834821u, 1068531570u, 1143881486u, 0, EXP_TOLERANCE, 0},
+{ 595, 1080701440u, 2120625396u, 1041006976u, 2137548527u, 1389637151u, 2814596158u, 0, EXP_TOLERANCE, 0},
+{ 596, 1080355870u, 586700956u, 1059670521u, 303891699u, 1325810327u, 2561465523u, 0, EXP_TOLERANCE, 0},
+{ 597, 3221091650u, 2509132460u, 1102827530u, 2205707903u, 1069788756u, 946327002u, 0, EXP_TOLERANCE, 0},
+{ 598, 3217443509u, 1229308263u, 3209170414u, 4206576047u, 1072358053u, 1505047828u, 0, EXP_TOLERANCE, 0},
+{ 599, 3221979137u, 4078010749u, 3199236456u, 733478972u, 1067480393u, 1883768308u, 0, EXP_TOLERANCE, 0},
+{ 600, 3215538376u, 4277541051u, 3199806921u, 397102023u, 1072592442u, 3112407863u, 0, EXP_TOLERANCE, 0},
+{ 601, 3214849381u, 900999594u, 3234720188u, 2530214248u, 1072631290u, 2136324251u, 0, EXP_TOLERANCE, 0},
+{ 602, 1074446396u, 4000609478u, 1096577064u, 4148592328u, 1077695508u, 2530213621u, 0, EXP_TOLERANCE, 0},
+{ 603, 1067542452u, 2154187873u, 3224392607u, 3957250362u, 1072729506u, 1888618017u, 0, EXP_TOLERANCE, 0},
+{ 604, 3221316336u, 2867079200u, 1101870326u, 921212001u, 1069359619u, 1291621322u, 0, EXP_TOLERANCE, 0},
+{ 605, 3223784706u, 674547716u, 1063216239u, 3929755226u, 1055176221u, 2342580293u, 0, EXP_TOLERANCE, 0},
+{ 606, 3225735787u, 3158182449u, 1043794244u, 3259056345u, 1009666296u, 2099303467u, 0, EXP_TOLERANCE, 0},
+{ 607, 3225242320u, 3002823940u, 1059511739u, 2832435794u, 1028307478u, 65827691u, 0, EXP_TOLERANCE, 0},
+{ 608, 3220450550u, 2196511929u, 1049973941u, 3672092877u, 1070736089u, 371341051u, 0, EXP_TOLERANCE, 0},
+{ 609, 1068263848u, 3655292191u, 1086438127u, 3567072906u, 1072753082u, 551440254u, 0, EXP_TOLERANCE, 0},
+{ 610, 3227458308u, 1617573614u, 3201863123u, 3090723732u, 884380609u, 990057858u, 0, EXP_TOLERANCE, 0},
+{ 611, 3223764196u, 679893506u, 3211547753u, 824081024u, 1055406136u, 1185397254u, 0, EXP_TOLERANCE, 0},
+{ 612, 1076947613u, 2285242807u, 1084999409u, 2221731406u, 1098199194u, 2093305428u, 0, EXP_TOLERANCE, 0},
+{ 613, 3217219424u, 1935990727u, 1088822246u, 1058156518u, 1072405754u, 3411302972u, 0, EXP_TOLERANCE, 0},
+{ 614, 1080819070u, 521023584u, 1059186903u, 4245163857u, 1411420761u, 1987577595u, 0, EXP_TOLERANCE, 0},
+{ 615, 1081871044u, 2312887617u, 3191771354u, 1885370807u, 1751362761u, 485435265u, 0, EXP_TOLERANCE, 0},
+{ 616, 3228836567u, 1796441468u, 1100030327u, 2772711004u, 585257982u, 1197588774u, 0, EXP_TOLERANCE, 0},
+{ 617, 3216859732u, 2095685003u, 1077984448u, 2100773742u, 1072465834u, 2188254173u, 0, EXP_TOLERANCE, 0},
+{ 618, 3213926140u, 2892538035u, 1042396334u, 4162200338u, 1072659482u, 3755395969u, 0, EXP_TOLERANCE, 0},
+{ 619, 3226997111u, 2177698116u, 3227557177u, 150832500u, 927022330u, 2114378896u, 0, EXP_TOLERANCE, 0},
+{ 620, 3213582312u, 607966734u, 3236250630u, 4164600559u, 1072665402u, 3794761595u, 0, EXP_TOLERANCE, 0},
+{ 621, 3219535540u, 2830122967u, 1046096700u, 3713346883u, 1071642511u, 1936011333u, 0, EXP_TOLERANCE, 0},
+{ 622, 3224615051u, 2314640506u, 3203696416u, 3276228872u, 1042769881u, 709365161u, 0, EXP_TOLERANCE, 0},
+{ 623, 3219203763u, 469331883u, 3249037349u, 2999233437u, 1071823137u, 3035360404u, 0, EXP_TOLERANCE, 0},
+{ 624, 1079556219u, 560886625u, 1091899487u, 748795120u, 1222196219u, 1766795176u, 0, EXP_TOLERANCE, 0},
+{ 625, 1067712650u, 2958421324u, 1092569414u, 3235243477u, 1072735023u, 111129972u, 0, EXP_TOLERANCE, 0},
+{ 626, 3213998017u, 3221475559u, 1043038304u, 915608434u, 1072657274u, 270655903u, 0, EXP_TOLERANCE, 0},
+{ 627, 1073294682u, 3007808652u, 3216682290u, 2531019474u, 1075006367u, 3946889810u, 0, EXP_TOLERANCE, 0},
+{ 628, 3226300359u, 1767658578u, 3237045269u, 2313128318u, 983611715u, 1963249883u, 0, EXP_TOLERANCE, 0},
+{ 629, 3219006500u, 1926845182u, 1066835624u, 1783256828u, 1071905568u, 1550065103u, 0, EXP_TOLERANCE, 0},
+{ 630, 1065741453u, 90378038u, 1057168870u, 164358218u, 1072704533u, 1716133177u, 0, EXP_TOLERANCE, 0},
+{ 631, 1081693348u, 1610524680u, 1085283851u, 2903496007u, 1685728394u, 520929572u, 0, EXP_TOLERANCE, 0},
+{ 632, 1075489858u, 4274321404u, 3202913591u, 720121831u, 1082693625u, 2845193504u, 0, EXP_TOLERANCE, 0},
+{ 633, 1067982472u, 2034778236u, 1071133763u, 1413236391u, 1072743826u, 988128607u, 0, EXP_TOLERANCE, 0},
+{ 634, 1067840244u, 1489112261u, 1076691395u, 348210906u, 1072739177u, 317516419u, 0, EXP_TOLERANCE, 0},
+{ 635, 3217229677u, 2797651324u, 3224410527u, 2374818327u, 1072403544u, 1037637956u, 0, EXP_TOLERANCE, 0},
+{ 636, 1077801496u, 1823161666u, 3197810695u, 3119680047u, 1117940019u, 2045262415u, 0, EXP_TOLERANCE, 0},
+{ 637, 1072218792u, 3420950657u, 1087084743u, 2136638961u, 1073829855u, 2407470294u, 0, EXP_TOLERANCE, 0},
+{ 638, 1073047952u, 3554566429u, 1062907717u, 2736702589u, 1074692071u, 2140620171u, 0, EXP_TOLERANCE, 0},
+{ 639, 3227062875u, 2928437580u, 3187765027u, 1393427873u, 920907098u, 4135143034u, 0, EXP_TOLERANCE, 0},
+{ 640, 3218738745u, 189447067u, 1051643315u, 828663513u, 1071991888u, 870021011u, 0, EXP_TOLERANCE, 0},
+{ 641, 1068042509u, 2852350928u, 1045683757u, 673354280u, 1072745794u, 2790514124u, 0, EXP_TOLERANCE, 0},
+{ 642, 1065966397u, 3589563265u, 3248741629u, 812657927u, 1072706311u, 791385654u, 0, EXP_TOLERANCE, 0},
+{ 643, 3213679498u, 1766416701u, 1100392103u, 2185373290u, 1072663905u, 227240416u, 0, EXP_TOLERANCE, 0},
+{ 644, 3220275389u, 3763582673u, 3191965790u, 388374829u, 1070952181u, 2061416280u, 0, EXP_TOLERANCE, 0},
+{ 645, 1075440832u, 1187403069u, 1075300235u, 336640304u, 1082418698u, 3092350278u, 0, EXP_TOLERANCE, 0},
+{ 646, 1081906155u, 1718795752u, 3243118752u, 683369237u, 1764318904u, 2150807698u, 0, EXP_TOLERANCE, 0},
+{ 647, 3218132129u, 1863545307u, 1069449477u, 3418627399u, 1072209087u, 2449778810u, 0, EXP_TOLERANCE, 0},
+{ 648, 1072747022u, 3295607249u, 1068878592u, 1633297809u, 1074193404u, 2476970617u, 0, EXP_TOLERANCE, 0},
+{ 649, 1070481463u, 2585980994u, 3236670483u, 1286750688u, 1072972796u, 2203733059u, 0, EXP_TOLERANCE, 0},
+{ 650, 1067128553u, 15816845u, 3233249283u, 2491924775u, 1072721357u, 3513632630u, 0, EXP_TOLERANCE, 0},
+{ 651, 1065481693u, 1051983351u, 1049180786u, 1474421917u, 1072702484u, 724278735u, 0, EXP_TOLERANCE, 0},
+{ 652, 3216978165u, 2003816032u, 1086050104u, 668090487u, 1072452682u, 906509909u, 0, EXP_TOLERANCE, 0},
+{ 653, 1068284677u, 3671484625u, 1067020039u, 430024694u, 1072753770u, 1677416970u, 0, EXP_TOLERANCE, 0},
+{ 654, 1072639990u, 3991830201u, 3207808714u, 1021245839u, 1074082674u, 1254795532u, 0, EXP_TOLERANCE, 0},
+{ 655, 1071534423u, 4255801807u, 3207681716u, 1926756877u, 1073328631u, 2248030752u, 0, EXP_TOLERANCE, 0},
+{ 656, 1067869425u, 4167786896u, 1077097744u, 1775517981u, 1072740129u, 1534603149u, 0, EXP_TOLERANCE, 0},
+{ 657, 1076164794u, 3187518564u, 1082437406u, 944672491u, 1088519022u, 2668154428u, 0, EXP_TOLERANCE, 0},
+{ 658, 1068240650u, 953085192u, 3227310828u, 3459155777u, 1072752316u, 293671938u, 0, EXP_TOLERANCE, 0},
+{ 659, 1072648234u, 1908555460u, 1073640207u, 260441967u, 1074088146u, 2650479583u, 0, EXP_TOLERANCE, 0},
+{ 660, 1072462486u, 250762477u, 1072582645u, 2886742039u, 1073969911u, 1983590134u, 0, EXP_TOLERANCE, 0},
+{ 661, 3228885910u, 786180031u, 3197734769u, 2788918312u, 567029081u, 1303524864u, 0, EXP_TOLERANCE, 0},
+{ 662, 3225074643u, 2055912467u, 3244244909u, 1394142937u, 1032164285u, 2520921127u, 0, EXP_TOLERANCE, 0},
+{ 663, 1072758713u, 91984146u, 3222252812u, 4126276047u, 1074210222u, 4046645726u, 0, EXP_TOLERANCE, 0},
+{ 664, 1075048683u, 3942715706u, 3239316352u, 410676547u, 1080182733u, 198592884u, 0, EXP_TOLERANCE, 0},
+{ 665, 3215335062u, 86296211u, 1085850694u, 649202596u, 1072604575u, 3552442703u, 0, EXP_TOLERANCE, 0},
+{ 666, 3226492024u, 3069064472u, 3237358008u, 23209276u, 973600692u, 3560381944u, 0, EXP_TOLERANCE, 0},
+{ 667, 1074943832u, 1867297860u, 1072956607u, 2513414118u, 1079542291u, 1065513243u, 0, EXP_TOLERANCE, 0},
+{ 668, 3228513251u, 3171788768u, 3235208783u, 162138697u, 695028140u, 3343634362u, 0, EXP_TOLERANCE, 0},
+{ 669, 1075436999u, 1245110700u, 1081653954u, 2584994077u, 1082399294u, 168782383u, 0, EXP_TOLERANCE, 0},
+{ 670, 3226635752u, 3347226587u, 1058962932u, 2291943376u, 960392171u, 946952000u, 0, EXP_TOLERANCE, 0},
+{ 671, 1070433398u, 966940828u, 1060726420u, 2798041096u, 1072965208u, 1430944161u, 0, EXP_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1074261781u, 2671510586u, 0, EXP_TOLERANCE, 0},
+{ 673, 3228193553u, 1671039260u, 1086395032u, 3745833360u, 754060863u, 1699618982u, 0, EXP_TOLERANCE, 0},
+{ 674, 1069661709u, 651714217u, 1047070645u, 2130549237u, 1072849149u, 67549253u, 0, EXP_TOLERANCE, 0},
+{ 675, 3217601491u, 1423000172u, 3247822717u, 1551488170u, 1072325181u, 206424647u, 0, EXP_TOLERANCE, 0},
+{ 676, 3216277371u, 921077236u, 3213332351u, 1431049019u, 1072531875u, 1612803421u, 0, EXP_TOLERANCE, 0},
+{ 677, 1071704599u, 655715547u, 3190985373u, 1527556471u, 1073423595u, 3219744316u, 0, EXP_TOLERANCE, 0},
+{ 678, 3222412099u, 4110878657u, 3251297180u, 879739345u, 1065756487u, 2212366251u, 0, EXP_TOLERANCE, 0},
+{ 679, 1076367578u, 2623955764u, 1093699897u, 1216444475u, 1090816075u, 3859513056u, 0, EXP_TOLERANCE, 0},
+{ 680, 1078274115u, 107442539u, 3239767031u, 1149813329u, 1136691095u, 2525054892u, 0, EXP_TOLERANCE, 0},
+{ 681, 3224008056u, 1761361082u, 3226030205u, 1121849716u, 1052648890u, 3257183639u, 0, EXP_TOLERANCE, 0},
+{ 682, 3226455627u, 2534144722u, 1044223733u, 3512285706u, 976403563u, 1539377918u, 0, EXP_TOLERANCE, 0},
+{ 683, 3218137533u, 4073670723u, 1050729852u, 3034818849u, 1072207010u, 2190601685u, 0, EXP_TOLERANCE, 0},
+{ 684, 1081013054u, 1421423503u, 1060278048u, 1397153092u, 1447201916u, 3645912721u, 0, EXP_TOLERANCE, 0},
+{ 685, 3220567557u, 1649206019u, 1104525577u, 1267104290u, 1070610592u, 3909007411u, 0, EXP_TOLERANCE, 0},
+{ 686, 3213419345u, 3775270392u, 1040251850u, 68667319u, 1072667916u, 4071660364u, 0, EXP_TOLERANCE, 0},
+{ 687, 3216913812u, 3099226694u, 3254103006u, 4020102648u, 1072459817u, 1012804737u, 0, EXP_TOLERANCE, 0},
+{ 688, 3216271776u, 3718441177u, 3215643451u, 4032951536u, 1072532520u, 4153916148u, 0, EXP_TOLERANCE, 0},
+{ 689, 1066151467u, 508048351u, 3210196713u, 1707937896u, 1072707776u, 258625177u, 0, EXP_TOLERANCE, 0},
+{ 690, 3215388843u, 2784738160u, 1073435430u, 1109346010u, 1072601359u, 769624204u, 0, EXP_TOLERANCE, 0},
+{ 691, 3222579562u, 3331916473u, 3238794568u, 2707019594u, 1064788968u, 937187646u, 0, EXP_TOLERANCE, 0},
+{ 692, 1078502606u, 3093165197u, 1072894805u, 2853215019u, 1147222804u, 2594603642u, 0, EXP_TOLERANCE, 0},
+{ 693, 3219727867u, 2135797997u, 1048399559u, 2941926126u, 1071458929u, 1831646623u, 0, EXP_TOLERANCE, 0},
+{ 694, 1067305348u, 2083412145u, 3249335391u, 507212448u, 1072724198u, 176926544u, 0, EXP_TOLERANCE, 0},
+{ 695, 1074315175u, 4270176401u, 3246546709u, 3288753319u, 1077284434u, 1533074967u, 0, EXP_TOLERANCE, 0},
+{ 696, 3228009919u, 3692175292u, 3197271515u, 3989064196u, 787929498u, 530433217u, 0, EXP_TOLERANCE, 0},
+{ 697, 3228623066u, 3111924274u, 1066772558u, 59281695u, 664079135u, 3761950200u, 0, EXP_TOLERANCE, 0},
+{ 698, 1071878215u, 2135245466u, 3208804313u, 3846547392u, 1073577134u, 3594627032u, 0, EXP_TOLERANCE, 0},
+{ 699, 1079149171u, 972051266u, 3222814246u, 3539700586u, 1184638055u, 2607924773u, 0, EXP_TOLERANCE, 0},
+{ 700, 3216597418u, 330951080u, 1079189813u, 583922384u, 1072495297u, 3853879766u, 0, EXP_TOLERANCE, 0},
+{ 701, 1077057180u, 1711944085u, 1104170032u, 643991456u, 1100755327u, 436337680u, 0, EXP_TOLERANCE, 0},
+{ 702, 3224992365u, 2072550721u, 3250147641u, 4280263530u, 1034088022u, 2955452855u, 0, EXP_TOLERANCE, 0},
+{ 703, 3213944226u, 1566376352u, 1067251433u, 72984588u, 1072658926u, 3741224203u, 0, EXP_TOLERANCE, 0},
+{ 704, 1079547929u, 3103043079u, 1045853123u, 410067497u, 1221488103u, 692790947u, 0, EXP_TOLERANCE, 0},
+{ 705, 3219818221u, 1910366299u, 1081770885u, 634683073u, 1071378326u, 3640151292u, 0, EXP_TOLERANCE, 0},
+{ 706, 1075239232u, 2226525875u, 3224149290u, 2126302825u, 1081272417u, 3298903549u, 0, EXP_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1074843648u, 1040872434u, 0, EXP_TOLERANCE, 0},
+{ 708, 1071725823u, 1953339096u, 1077176252u, 1476516558u, 1073441690u, 3533967691u, 0, EXP_TOLERANCE, 0},
+{ 709, 1072383456u, 1306277326u, 1079089150u, 4093716191u, 1073922696u, 2073217550u, 0, EXP_TOLERANCE, 0},
+{ 710, 3223711603u, 51750045u, 3242913901u, 4256866157u, 1056052895u, 2162728962u, 0, EXP_TOLERANCE, 0},
+{ 711, 3213959335u, 2163853087u, 3232053146u, 2962422808u, 1072658462u, 2104272775u, 0, EXP_TOLERANCE, 0},
+{ 712, 1074468369u, 1618388148u, 3233154824u, 3711953164u, 1077774967u, 2677827653u, 0, EXP_TOLERANCE, 0},
+{ 713, 3227993634u, 357108214u, 3202294604u, 2306775262u, 790944380u, 765011821u, 0, EXP_TOLERANCE, 0},
+{ 714, 3216584150u, 2571356437u, 3249064063u, 2394851808u, 1072496800u, 1660021973u, 0, EXP_TOLERANCE, 0},
+{ 715, 3224196635u, 4273880094u, 1103698617u, 3578832032u, 1050450775u, 303911533u, 0, EXP_TOLERANCE, 0},
+{ 716, 3223989517u, 2091068742u, 3228270226u, 3980489730u, 1052859686u, 2610368796u, 0, EXP_TOLERANCE, 0},
+{ 717, 3222725296u, 2772307714u, 1051008486u, 32546576u, 1063965846u, 2154006417u, 0, EXP_TOLERANCE, 0},
+{ 718, 3225500575u, 2143788498u, 3195498043u, 3630119231u, 1020485834u, 409157440u, 0, EXP_TOLERANCE, 0},
+{ 719, 3215410151u, 2527385594u, 3240503648u, 3482095012u, 1072600086u, 811621435u, 0, EXP_TOLERANCE, 0},
+{ 720, 3226440159u, 2690097362u, 1068598730u, 2360266862u, 977144307u, 2410462353u, 0, EXP_TOLERANCE, 0},
+{ 721, 1070392205u, 2673272949u, 1082639557u, 522449749u, 1072958739u, 2923917591u, 0, EXP_TOLERANCE, 0},
+{ 722, 1081355475u, 3596379400u, 3242016775u, 2002293002u, 1560941176u, 3057535830u, 0, EXP_TOLERANCE, 0},
+{ 723, 1080565288u, 4113224369u, 3222122439u, 2152316893u, 1364491948u, 2667631927u, 0, EXP_TOLERANCE, 0},
+{ 724, 3220796716u, 31662602u, 1047721249u, 1747087514u, 1070207704u, 1554554093u, 0, EXP_TOLERANCE, 0},
+{ 725, 3228443661u, 2489659568u, 1097051253u, 277506957u, 707885899u, 1135160826u, 0, EXP_TOLERANCE, 0},
+{ 726, 3213421930u, 3850162281u, 3213841942u, 438724093u, 1072667877u, 194850427u, 0, EXP_TOLERANCE, 0},
+{ 727, 1079663895u, 2431814052u, 1075518084u, 2672434118u, 1232182675u, 340027527u, 0, EXP_TOLERANCE, 0},
+{ 728, 3227434095u, 391606792u, 1048184750u, 4168944276u, 886619642u, 2173937429u, 0, EXP_TOLERANCE, 0},
+{ 729, 3227869472u, 457529672u, 3201090276u, 72407935u, 813892000u, 300809617u, 0, EXP_TOLERANCE, 0},
+{ 730, 3220817871u, 3954981400u, 1052053242u, 2411049585u, 1070173574u, 549649836u, 0, EXP_TOLERANCE, 0},
+{ 731, 1076742907u, 485456950u, 1088415093u, 1655397424u, 1095138487u, 1354370438u, 0, EXP_TOLERANCE, 0},
+{ 732, 3215011644u, 1551748070u, 3236871640u, 1329701152u, 1072624028u, 1513346128u, 0, EXP_TOLERANCE, 0},
+{ 733, 3221493394u, 3099222537u, 1104984570u, 4293792842u, 1068812430u, 62941796u, 0, EXP_TOLERANCE, 0},
+{ 734, 3216532617u, 3603065260u, 3197735968u, 2402359253u, 1072502647u, 2362417431u, 0, EXP_TOLERANCE, 0},
+{ 735, 3215601800u, 3961208159u, 3219057584u, 2340553876u, 1072588672u, 3579521348u, 0, EXP_TOLERANCE, 0},
+{ 736, 1073833333u, 4014841779u, 3197672877u, 3697233334u, 1075943590u, 4186803204u, 0, EXP_TOLERANCE, 0},
+{ 737, 3219567113u, 1403876392u, 3254028950u, 921363393u, 1071611207u, 2326666261u, 0, EXP_TOLERANCE, 0},
+{ 738, 1082085982u, 1862576361u, 3194031708u, 2476290925u, 1830816471u, 2702820797u, 0, EXP_TOLERANCE, 0},
+{ 739, 1067487560u, 1454212851u, 1088378861u, 3400401866u, 1072727733u, 836581379u, 0, EXP_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 1077560487u, 3057135642u, 0, EXP_TOLERANCE, 0},
+{ 741, 3219555010u, 1199568671u, 3225679997u, 46947405u, 1071623151u, 3836040209u, 0, EXP_TOLERANCE, 0},
+{ 742, 1074539809u, 2596231448u, 3253943728u, 2219151748u, 1077996857u, 995998522u, 0, EXP_TOLERANCE, 0},
+{ 743, 1071769915u, 4119719558u, 3222036299u, 1275474618u, 1073479873u, 114508863u, 0, EXP_TOLERANCE, 0},
+{ 744, 3226277175u, 3347296825u, 1101507910u, 1254014794u, 984676144u, 3717441086u, 0, EXP_TOLERANCE, 0},
+{ 745, 1076779960u, 673775040u, 1070743626u, 244126093u, 1095619946u, 3392967245u, 0, EXP_TOLERANCE, 0},
+{ 746, 3216831338u, 1832066983u, 1051358028u, 3262483417u, 1072469001u, 2438383671u, 0, EXP_TOLERANCE, 0},
+{ 747, 1074413872u, 3962610501u, 3198598777u, 849269178u, 1077583838u, 3412069925u, 0, EXP_TOLERANCE, 0},
+{ 748, 3224988140u, 2497516122u, 3254374111u, 2821429629u, 1034170638u, 3098720309u, 0, EXP_TOLERANCE, 0},
+{ 749, 1074139136u, 2805941787u, 3217785843u, 779131141u, 1076856794u, 1761248984u, 0, EXP_TOLERANCE, 0},
+{ 750, 3222714382u, 723423605u, 1084533420u, 627282213u, 1064040601u, 4058248859u, 0, EXP_TOLERANCE, 0},
+{ 751, 3220141984u, 4292778869u, 1078101071u, 1676860147u, 1071116419u, 1193771065u, 0, EXP_TOLERANCE, 0},
+{ 752, 1074191350u, 3528118587u, 3194648564u, 2363260897u, 1076980368u, 633116683u, 0, EXP_TOLERANCE, 0},
+{ 753, 3214917975u, 1307010018u, 1061248120u, 1468743108u, 1072629211u, 1389200168u, 0, EXP_TOLERANCE, 0},
+{ 754, 3227708771u, 107905661u, 3226089788u, 1943427674u, 843541216u, 3065091785u, 0, EXP_TOLERANCE, 0},
+{ 755, 3213396365u, 760006940u, 1054265604u, 1749976597u, 1072668271u, 3069507900u, 0, EXP_TOLERANCE, 0},
+{ 756, 3225190472u, 2787503556u, 1081282610u, 1195841206u, 1029536384u, 461530301u, 0, EXP_TOLERANCE, 0},
+{ 757, 3213822252u, 545462045u, 3208381743u, 1981311808u, 1072661706u, 3884293482u, 0, EXP_TOLERANCE, 0},
+{ 758, 1070669320u, 3657978397u, 1104463616u, 3501253426u, 1073014782u, 1116550155u, 0, EXP_TOLERANCE, 0},
+{ 759, 1067709649u, 1804177501u, 3210693633u, 3606766729u, 1072734925u, 2164791361u, 0, EXP_TOLERANCE, 0},
+{ 760, 1074759727u, 1336278526u, 1043741618u, 3165279431u, 1078574960u, 112244839u, 0, EXP_TOLERANCE, 0},
+{ 761, 1069103403u, 1599382075u, 1058018527u, 4212580517u, 1072801823u, 3428114030u, 0, EXP_TOLERANCE, 0},
+{ 762, 3217988086u, 3007589929u, 3202026547u, 2792028313u, 1072247303u, 707355694u, 0, EXP_TOLERANCE, 0},
+{ 763, 3228965522u, 1866066996u, 1060329048u, 3727175322u, 537617132u, 2682837865u, 0, EXP_TOLERANCE, 0},
+{ 764, 3215193859u, 150890940u, 1056025306u, 3082724735u, 1072613045u, 2896088168u, 0, EXP_TOLERANCE, 0},
+{ 765, 1071446123u, 80400395u, 1093584426u, 3478941315u, 1073293550u, 1633279969u, 0, EXP_TOLERANCE, 0},
+{ 766, 3228571942u, 4050954182u, 3219263194u, 2537475930u, 682960060u, 281321075u, 0, EXP_TOLERANCE, 0},
+{ 767, 1071133327u, 2881752155u, 3212589299u, 2559651278u, 1073175056u, 2501448914u, 0, EXP_TOLERANCE, 0},
+{ 768, 3228044784u, 440309030u, 3214267461u, 3788040806u, 781499599u, 1484254395u, 0, EXP_TOLERANCE, 0},
+{ 769, 1080553671u, 918813144u, 3208535698u, 1607035904u, 1362352642u, 4120585298u, 0, EXP_TOLERANCE, 0},
+{ 770, 1066254699u, 2497054124u, 1089139147u, 2549609010u, 1072708594u, 225519014u, 0, EXP_TOLERANCE, 0},
+{ 771, 1066960585u, 790219083u, 1054657139u, 2797979479u, 1072718666u, 1434868292u, 0, EXP_TOLERANCE, 0},
+{ 772, 1070364312u, 1149462078u, 1095765205u, 3879963182u, 1072954377u, 2014673971u, 0, EXP_TOLERANCE, 0},
+{ 773, 3216361301u, 2684353926u, 3205212854u, 1732474928u, 1072522215u, 2345875229u, 0, EXP_TOLERANCE, 0},
+{ 774, 1079508325u, 2742237025u, 1051317716u, 3386396147u, 1217770709u, 1976234612u, 0, EXP_TOLERANCE, 0},
+{ 775, 1071619594u, 3408320912u, 1103071166u, 4233059513u, 1073363176u, 268602029u, 0, EXP_TOLERANCE, 0},
+{ 776, 1071155004u, 1077495917u, 1088399968u, 433115118u, 1073182986u, 1009302603u, 0, EXP_TOLERANCE, 0},
+{ 777, 3217130484u, 841366493u, 1051716814u, 4121125128u, 1072425043u, 3371760020u, 0, EXP_TOLERANCE, 0},
+{ 778, 1070923540u, 321857207u, 1089128010u, 1149988239u, 1073100393u, 3087266675u, 0, EXP_TOLERANCE, 0},
+{ 779, 3226668295u, 799866606u, 3197637091u, 3924438208u, 957395551u, 739998359u, 0, EXP_TOLERANCE, 0},
+{ 780, 3213082986u, 2002049816u, 1077053447u, 2240354761u, 1072673115u, 2550101486u, 0, EXP_TOLERANCE, 0},
+{ 781, 3222714827u, 478939968u, 1097035749u, 1066716440u, 1064037493u, 846934361u, 0, EXP_TOLERANCE, 0},
+{ 782, 3224085033u, 1653104725u, 1088548129u, 81977716u, 1051771332u, 1927581294u, 0, EXP_TOLERANCE, 0},
+{ 783, 3215735644u, 3899475018u, 3189694084u, 3330093036u, 1072580740u, 2366929092u, 0, EXP_TOLERANCE, 0},
+{ 784, 1077778247u, 2612450289u, 1079065127u, 603380842u, 1117377332u, 409577748u, 0, EXP_TOLERANCE, 0},
+{ 785, 1080713847u, 3962735564u, 1101570429u, 1372490825u, 1391915326u, 1157784041u, 0, EXP_TOLERANCE, 0},
+{ 786, 1069486080u, 1479841439u, 1059312257u, 541504905u, 1072828520u, 4141675227u, 0, EXP_TOLERANCE, 0},
+{ 787, 1075516450u, 2626148789u, 1057571099u, 4121656076u, 1082865702u, 21674613u, 0, EXP_TOLERANCE, 0},
+{ 788, 1075321933u, 1902560314u, 1043130231u, 3557671562u, 1081732033u, 2391450025u, 0, EXP_TOLERANCE, 0},
+{ 789, 3214801292u, 41779312u, 1081626342u, 831171823u, 1072632749u, 1759846185u, 0, EXP_TOLERANCE, 0},
+{ 790, 1069665436u, 1393168821u, 1066457405u, 1381616968u, 1072849684u, 1289163532u, 0, EXP_TOLERANCE, 0},
+{ 791, 1073386717u, 3756584649u, 3222267229u, 1423157432u, 1075122375u, 2406905526u, 0, EXP_TOLERANCE, 0},
+{ 792, 3229269850u, 1894912556u, 1042426694u, 155024547u, 425197429u, 3283544678u, 0, EXP_TOLERANCE, 0},
+{ 793, 3214327880u, 35164295u, 3203391785u, 1037041084u, 1072647167u, 2362324192u, 0, EXP_TOLERANCE, 0},
+{ 794, 1076388871u, 3957875950u, 3232195211u, 1590756436u, 1091053435u, 3120602682u, 0, EXP_TOLERANCE, 0},
+{ 795, 1071990050u, 1447585080u, 1071279485u, 1107922438u, 1073682984u, 2307905638u, 0, EXP_TOLERANCE, 0},
+{ 796, 1067224038u, 981897615u, 1051856116u, 430357614u, 1072722890u, 3697512449u, 0, EXP_TOLERANCE, 0},
+{ 797, 3222281335u, 395145384u, 3219821938u, 50586510u, 1066548660u, 2167568476u, 0, EXP_TOLERANCE, 0},
+{ 798, 1072921640u, 750827797u, 1082862669u, 230466783u, 1074465228u, 444665273u, 0, EXP_TOLERANCE, 0},
+{ 799, 1077231635u, 1365083575u, 3204848310u, 1700831722u, 1104756143u, 2384443675u, 0, EXP_TOLERANCE, 0},
+{ 800, 3220187542u, 344241827u, 1071538935u, 2715566077u, 1071074931u, 2466090340u, 0, EXP_TOLERANCE, 0},
+{ 801, 3227659912u, 4069301823u, 3193208760u, 2949125229u, 852610347u, 1078331087u, 0, EXP_TOLERANCE, 0},
+{ 802, 1081211291u, 3585711710u, 1065801594u, 2302229267u, 1507738998u, 4025253862u, 0, EXP_TOLERANCE, 0},
+{ 803, 3214041900u, 709803845u, 1048741487u, 2296910194u, 1072655926u, 3012611721u, 0, EXP_TOLERANCE, 0},
+{ 804, 3214252299u, 744421179u, 1069302001u, 2659232829u, 1072649478u, 3670751894u, 0, EXP_TOLERANCE, 0},
+{ 805, 1078155904u, 1799949903u, 3192522886u, 4212149209u, 1131196559u, 2298972399u, 0, EXP_TOLERANCE, 0},
+{ 806, 3217642838u, 145234164u, 3250614064u, 912384201u, 1072316679u, 2192878632u, 0, EXP_TOLERANCE, 0},
+{ 807, 3225830600u, 2784620507u, 1102812948u, 3531481022u, 1005246022u, 3138466984u, 0, EXP_TOLERANCE, 0},
+{ 808, 3229139567u, 383952592u, 3205659905u, 3633194728u, 473314917u, 2102131961u, 0, EXP_TOLERANCE, 0},
+{ 809, 3216059164u, 3792395543u, 1070072378u, 3864816376u, 1072557216u, 3332910443u, 0, EXP_TOLERANCE, 0},
+{ 810, 3217899185u, 2115553675u, 1066288499u, 3538377867u, 1072264895u, 2000840220u, 0, EXP_TOLERANCE, 0},
+{ 811, 3229006513u, 1230026762u, 1090719723u, 440819880u, 522467282u, 176843704u, 0, EXP_TOLERANCE, 0},
+{ 812, 3214518020u, 2991290482u, 1096886719u, 1097971167u, 1072641364u, 1885259123u, 0, EXP_TOLERANCE, 0},
+{ 813, 1077465688u, 1098035020u, 3230900504u, 1479059095u, 1110183315u, 1050435763u, 0, EXP_TOLERANCE, 0},
+{ 814, 3229036868u, 1719428427u, 3188631907u, 3707377409u, 511248635u, 1142506866u, 0, EXP_TOLERANCE, 0},
+{ 815, 1068964805u, 3748932896u, 1084908557u, 1325384361u, 1072792303u, 3780694184u, 0, EXP_TOLERANCE, 0},
+{ 816, 1076315468u, 3979168763u, 1057455255u, 2454615952u, 1090230266u, 2957407211u, 0, EXP_TOLERANCE, 0},
+{ 817, 1068835624u, 1449164578u, 1056960316u, 1654931641u, 1072783501u, 1093920167u, 0, EXP_TOLERANCE, 0},
+{ 818, 1073536162u, 2120487381u, 3226298974u, 2364226633u, 1075333845u, 2170325994u, 0, EXP_TOLERANCE, 0},
+{ 819, 1074022852u, 1074268944u, 1065730444u, 280016852u, 1076445746u, 2202470074u, 0, EXP_TOLERANCE, 0},
+{ 820, 3216036896u, 3315127889u, 3236295594u, 2900924954u, 1072559821u, 2002231287u, 0, EXP_TOLERANCE, 0},
+{ 821, 3215300259u, 2246037502u, 1049691002u, 1496066550u, 1072606660u, 401761059u, 0, EXP_TOLERANCE, 0},
+{ 822, 3213978379u, 4191285446u, 3217936236u, 2382392789u, 1072657877u, 1309200979u, 0, EXP_TOLERANCE, 0},
+{ 823, 1078153244u, 640099844u, 1042152237u, 2064279383u, 1131049946u, 3369789477u, 0, EXP_TOLERANCE, 0},
+{ 824, 1075719134u, 3468560824u, 1093251038u, 310958750u, 1084062910u, 2169865167u, 0, EXP_TOLERANCE, 0},
+{ 825, 1080011184u, 1413568905u, 1100941106u, 1627289946u, 1264211895u, 2702685927u, 0, EXP_TOLERANCE, 0},
+{ 826, 3213569646u, 3797143370u, 3195497539u, 3843275034u, 1072665598u, 686484879u, 0, EXP_TOLERANCE, 0},
+{ 827, 3229008721u, 2806642640u, 3201943068u, 2515980718u, 521639300u, 2160860697u, 0, EXP_TOLERANCE, 0},
+{ 828, 1077440132u, 632580632u, 1078673506u, 3259601317u, 1109589645u, 1728707154u, 0, EXP_TOLERANCE, 0},
+{ 829, 3216709215u, 3309678799u, 1049337078u, 3056787074u, 1072482684u, 1422033902u, 0, EXP_TOLERANCE, 0},
+{ 830, 3221495289u, 2341164249u, 1080834967u, 2810890005u, 1068807516u, 1228216989u, 0, EXP_TOLERANCE, 0},
+{ 831, 1072262554u, 932124675u, 1093915797u, 662682630u, 1073853822u, 1808565180u, 0, EXP_TOLERANCE, 0},
+{ 832, 3228258571u, 1367996113u, 3251723684u, 2974064663u, 742026714u, 1183375229u, 0, EXP_TOLERANCE, 0},
+{ 833, 1074987851u, 323437999u, 1090499064u, 901457511u, 1079835961u, 484425891u, 0, EXP_TOLERANCE, 0},
+{ 834, 3225293116u, 4184941840u, 3196770014u, 2458988443u, 1027121096u, 3710678278u, 0, EXP_TOLERANCE, 0},
+{ 835, 1077132524u, 2023065054u, 3211994098u, 2734612965u, 1102463134u, 3575590741u, 0, EXP_TOLERANCE, 0},
+{ 836, 1071414726u, 3679267365u, 3237728785u, 1699558211u, 1073281253u, 3860891479u, 0, EXP_TOLERANCE, 0},
+{ 837, 1077593250u, 1826799031u, 1078709629u, 3986905229u, 1113100092u, 1053308024u, 0, EXP_TOLERANCE, 0},
+{ 838, 1068572425u, 351061688u, 3194386466u, 4105857588u, 1072765774u, 3548107827u, 0, EXP_TOLERANCE, 0},
+{ 839, 1068808070u, 1365244058u, 1064457319u, 1452191426u, 1072781632u, 1873938050u, 0, EXP_TOLERANCE, 0},
+{ 840, 1071462417u, 2463030625u, 3215975031u, 3773488326u, 1073299968u, 2609346878u, 0, EXP_TOLERANCE, 0},
+{ 841, 3229256575u, 752664055u, 1065110394u, 1835931663u, 430123802u, 2553348310u, 0, EXP_TOLERANCE, 0},
+{ 842, 1077559328u, 3496172149u, 1089617208u, 109068701u, 1112360377u, 1798297128u, 0, EXP_TOLERANCE, 0},
+{ 843, 3215960879u, 1636966254u, 1086098766u, 2016598298u, 1072567463u, 927350131u, 0, EXP_TOLERANCE, 0},
+{ 844, 1067708534u, 3551516956u, 1097969102u, 1317953425u, 1072734889u, 1241991990u, 0, EXP_TOLERANCE, 0},
+{ 845, 3223540761u, 2977627788u, 1045339018u, 516058480u, 1058055761u, 569636114u, 0, EXP_TOLERANCE, 0},
+{ 846, 3224825666u, 3901731263u, 3189566462u, 32272932u, 1037966615u, 1722002382u, 0, EXP_TOLERANCE, 0},
+{ 847, 1074136068u, 1956025297u, 3246628529u, 3840733905u, 1076844736u, 3998888857u, 0, EXP_TOLERANCE, 0},
+{ 848, 1080943668u, 561057891u, 3198494340u, 4271027193u, 1434442732u, 930486357u, 0, EXP_TOLERANCE, 0},
+{ 849, 3228909825u, 692989850u, 3242630588u, 2492225971u, 558170866u, 4102964135u, 0, EXP_TOLERANCE, 0},
+{ 850, 3218062309u, 3439913962u, 1067477011u, 2973333638u, 1072232757u, 2540923660u, 0, EXP_TOLERANCE, 0},
+{ 851, 3219236869u, 877613377u, 1044917899u, 809672798u, 1071803919u, 1940541557u, 0, EXP_TOLERANCE, 0},
+{ 852, 3222171454u, 905426932u, 1046417457u, 1086320855u, 1066848024u, 3143546584u, 0, EXP_TOLERANCE, 0},
+{ 853, 3227472261u, 2645567288u, 1051258339u, 557182478u, 883115166u, 3149220578u, 0, EXP_TOLERANCE, 0},
+{ 854, 3216640862u, 186287752u, 1061342054u, 4054003419u, 1072490386u, 1493344933u, 0, EXP_TOLERANCE, 0},
+{ 855, 1079440881u, 3506889716u, 3243866036u, 519056371u, 1211540924u, 931610429u, 0, EXP_TOLERANCE, 0},
+{ 856, 1065722725u, 2171898436u, 3246911982u, 1091500784u, 1072704385u, 2261342317u, 0, EXP_TOLERANCE, 0},
+{ 857, 3226870457u, 368493885u, 3222871893u, 1419055230u, 938682684u, 2071809339u, 0, EXP_TOLERANCE, 0},
+{ 858, 1078319084u, 2010971245u, 3188804530u, 1518695799u, 1138773255u, 3191526077u, 0, EXP_TOLERANCE, 0},
+{ 859, 3218009421u, 1239207795u, 1040192984u, 2199481342u, 1072243109u, 70493476u, 0, EXP_TOLERANCE, 0},
+{ 860, 3218318669u, 4264613432u, 3203460972u, 3558930895u, 1072138922u, 254209313u, 0, EXP_TOLERANCE, 0},
+{ 861, 1068125075u, 3772748958u, 3227667376u, 309688336u, 1072748507u, 2061269699u, 0, EXP_TOLERANCE, 0},
+{ 862, 3223403009u, 1077949160u, 1075769893u, 2405271377u, 1059573760u, 4171816038u, 0, EXP_TOLERANCE, 0},
+{ 863, 1078203664u, 3751608506u, 3232278094u, 930375071u, 1133432542u, 338172682u, 0, EXP_TOLERANCE, 0},
+{ 864, 3215394369u, 1518334131u, 3205247482u, 791756713u, 1072601028u, 4217463222u, 0, EXP_TOLERANCE, 0},
+{ 865, 1067240397u, 2825203170u, 3245054001u, 1822981827u, 1072723153u, 3157609123u, 0, EXP_TOLERANCE, 0},
+{ 866, 1080093419u, 514474738u, 1089072073u, 3300845441u, 1277369232u, 226623888u, 0, EXP_TOLERANCE, 0},
+{ 867, 3219536978u, 247369460u, 3197320093u, 687450958u, 1071641076u, 107110682u, 0, EXP_TOLERANCE, 0},
+{ 868, 1081092750u, 2722237629u, 1058272368u, 90602316u, 1463940977u, 1953188388u, 0, EXP_TOLERANCE, 0},
+{ 869, 3217535619u, 1845900544u, 3231520830u, 3389751458u, 1072338812u, 908962619u, 0, EXP_TOLERANCE, 0},
+{ 870, 3227612301u, 737689911u, 3195377751u, 3462616966u, 861355698u, 2672114716u, 0, EXP_TOLERANCE, 0},
+{ 871, 3221441232u, 3620285831u, 1055501023u, 2708056059u, 1068954913u, 645027974u, 0, EXP_TOLERANCE, 0},
+{ 872, 3220513572u, 4073430285u, 1056206159u, 172017902u, 1070666757u, 252709185u, 0, EXP_TOLERANCE, 0},
+{ 873, 3219161094u, 2799176222u, 1052706894u, 4083892667u, 1071848358u, 2936835175u, 0, EXP_TOLERANCE, 0},
+{ 874, 3216959621u, 1562351330u, 1069705601u, 1247765260u, 1072454735u, 1965167652u, 0, EXP_TOLERANCE, 0},
+{ 875, 3224328691u, 51853475u, 3189080201u, 2783553144u, 1048896499u, 4214951332u, 0, EXP_TOLERANCE, 0},
+{ 876, 3220502929u, 3851781549u, 3241598113u, 514064046u, 1070678175u, 727808314u, 0, EXP_TOLERANCE, 0},
+{ 877, 1080123021u, 934745487u, 3248182437u, 2798581921u, 1282811572u, 865963855u, 0, EXP_TOLERANCE, 0},
+{ 878, 3219373949u, 2948648757u, 3232177250u, 4278702895u, 1071727494u, 4061869059u, 0, EXP_TOLERANCE, 0},
+{ 879, 1073534300u, 4259101461u, 1061606772u, 84229920u, 1075331021u, 3220111151u, 0, EXP_TOLERANCE, 0},
+{ 880, 3215901351u, 3891230598u, 1095924595u, 3049217547u, 1072570963u, 2739288242u, 0, EXP_TOLERANCE, 0},
+{ 881, 1074207325u, 3806018919u, 3243191216u, 280177341u, 1077015681u, 2817451756u, 0, EXP_TOLERANCE, 0},
+{ 882, 1070061714u, 3900344258u, 1063647809u, 4206745890u, 1072907975u, 777731621u, 0, EXP_TOLERANCE, 0},
+{ 883, 3222464456u, 2126253040u, 3207248026u, 808507485u, 1065493639u, 3957926160u, 0, EXP_TOLERANCE, 0},
+{ 884, 1076653133u, 3465685634u, 3230391053u, 3754958214u, 1094102091u, 3736097686u, 0, EXP_TOLERANCE, 0},
+{ 885, 1080840988u, 461094531u, 1101110393u, 1316091396u, 1415451629u, 3462873770u, 0, EXP_TOLERANCE, 0},
+{ 886, 1071271770u, 4197635149u, 1091873113u, 1240127141u, 1073226413u, 2596063650u, 0, EXP_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 1077336969u, 1088342233u, 0, EXP_TOLERANCE, 0},
+{ 888, 3219720621u, 3744663425u, 3212482771u, 953662066u, 1071465544u, 3159670354u, 0, EXP_TOLERANCE, 0},
+{ 889, 1076782697u, 3564196690u, 3228101916u, 904305212u, 1095661213u, 2831821769u, 0, EXP_TOLERANCE, 0},
+{ 890, 1067207479u, 3566257266u, 3235138829u, 2734275140u, 1072722624u, 3670818002u, 0, EXP_TOLERANCE, 0},
+{ 891, 3227171261u, 606044282u, 3241318094u, 2446416887u, 910906934u, 627559627u, 0, EXP_TOLERANCE, 0},
+{ 892, 1065744532u, 2336116589u, 3197594053u, 2296925138u, 1072704557u, 3081873910u, 0, EXP_TOLERANCE, 0},
+{ 893, 1070101995u, 907670625u, 3240769036u, 1827119006u, 1072914055u, 3781503906u, 0, EXP_TOLERANCE, 0},
+{ 894, 1066487279u, 2818710946u, 3246059905u, 553394170u, 1072711118u, 1345913310u, 0, EXP_TOLERANCE, 0},
+{ 895, 3213621342u, 4099522736u, 3232742168u, 3718083858u, 1072664801u, 910507915u, 0, EXP_TOLERANCE, 0},
+{ 896, 1078739788u, 1059279404u, 1080245336u, 175941677u, 1158113937u, 1087430260u, 0, EXP_TOLERANCE, 0},
+{ 897, 1082121019u, 1650862428u, 1061816101u, 1723201723u, 1843679461u, 3875297949u, 0, EXP_TOLERANCE, 0},
+{ 898, 3226429902u, 2462163405u, 3218946201u, 3876535372u, 977570353u, 3320675628u, 0, EXP_TOLERANCE, 0},
+{ 899, 1076004278u, 495844137u, 1073721460u, 772777946u, 1086622883u, 3050800095u, 0, EXP_TOLERANCE, 0},
+{ 900, 1068143970u, 458757721u, 3245680321u, 3609892707u, 1072749129u, 926681458u, 0, EXP_TOLERANCE, 0},
+{ 901, 3214254476u, 2533012202u, 1079980803u, 3592268374u, 1072649412u, 994782266u, 0, EXP_TOLERANCE, 0},
+{ 902, 3216996268u, 4108274117u, 1063045844u, 571992389u, 1072450679u, 4029990628u, 0, EXP_TOLERANCE, 0},
+{ 903, 1077984359u, 3541110973u, 1096296754u, 3118427427u, 1123258147u, 2499543662u, 0, EXP_TOLERANCE, 0},
+{ 904, 3213902987u, 1213941007u, 1105433735u, 2172963370u, 1072660194u, 3827965195u, 0, EXP_TOLERANCE, 0},
+{ 905, 1079027567u, 272190288u, 1095452370u, 4026581530u, 1173437109u, 1567535437u, 0, EXP_TOLERANCE, 0},
+{ 906, 1079855269u, 2843638672u, 1100510986u, 3190536898u, 1249888458u, 1134925313u, 0, EXP_TOLERANCE, 0},
+{ 907, 1076417062u, 2014317727u, 3247389683u, 2428462015u, 1091433281u, 358810388u, 0, EXP_TOLERANCE, 0},
+{ 908, 1078248077u, 688442200u, 1047852515u, 3035186380u, 1135468183u, 2761855333u, 0, EXP_TOLERANCE, 0},
+{ 909, 1074567060u, 1010095511u, 3221288076u, 405287991u, 1078056039u, 3040249862u, 0, EXP_TOLERANCE, 0},
+{ 910, 3229225943u, 2983070435u, 1089546472u, 2907918480u, 441487241u, 709716015u, 0, EXP_TOLERANCE, 0},
+{ 911, 1076696665u, 81928569u, 1056007286u, 2740556321u, 1094687411u, 274384680u, 0, EXP_TOLERANCE, 0},
+{ 912, 1066276691u, 2076689028u, 1081558619u, 3039159031u, 1072708768u, 1687981859u, 0, EXP_TOLERANCE, 0},
+{ 913, 1067230382u, 1376882094u, 3211003208u, 1296286481u, 1072722992u, 3411996678u, 0, EXP_TOLERANCE, 0},
+{ 914, 1074871434u, 744133164u, 3200943494u, 955832216u, 1079154689u, 809333459u, 0, EXP_TOLERANCE, 0},
+{ 915, 3223144598u, 176522478u, 1069999908u, 2891249491u, 1061531060u, 3521972652u, 0, EXP_TOLERANCE, 0},
+{ 916, 1065584698u, 3685851715u, 3187829932u, 2363997529u, 1072703296u, 1288044552u, 0, EXP_TOLERANCE, 0},
+{ 917, 1065409879u, 3974431579u, 1052505165u, 2589067816u, 1072701918u, 1445868855u, 0, EXP_TOLERANCE, 0},
+{ 918, 3213516885u, 3819109588u, 1048561488u, 969143351u, 1072666411u, 3612690260u, 0, EXP_TOLERANCE, 0},
+{ 919, 1073687973u, 4246896124u, 1104584799u, 1940097860u, 1075581856u, 2819180517u, 0, EXP_TOLERANCE, 0},
+{ 920, 1066912836u, 2228686199u, 3220231833u, 777624847u, 1072717902u, 1922278384u, 0, EXP_TOLERANCE, 0},
+{ 921, 3224127274u, 4189906558u, 3203004203u, 854242364u, 1051215832u, 3083344029u, 0, EXP_TOLERANCE, 0},
+{ 922, 1081890311u, 4089051094u, 3227282692u, 2693170723u, 1758525329u, 2188757040u, 0, EXP_TOLERANCE, 0},
+{ 923, 1066855127u, 1278581412u, 3239296746u, 1774588717u, 1072716979u, 4022161488u, 0, EXP_TOLERANCE, 0},
+{ 924, 3221324110u, 1794845306u, 1104879344u, 4135865182u, 1069331519u, 811293238u, 0, EXP_TOLERANCE, 0},
+{ 925, 1081283231u, 754938390u, 1061291430u, 2010786993u, 1534272358u, 1531468649u, 0, EXP_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 1075404046u, 1548021515u, 0, EXP_TOLERANCE, 0},
+{ 927, 3224109162u, 567588900u, 3195452230u, 1421366017u, 1051451646u, 4159762582u, 0, EXP_TOLERANCE, 0},
+{ 928, 3221944027u, 2708717091u, 1071975971u, 1364590470u, 1067555098u, 1265958501u, 0, EXP_TOLERANCE, 0},
+{ 929, 3229068611u, 3461956134u, 3207820115u, 1605709634u, 499521170u, 1987606117u, 0, EXP_TOLERANCE, 0},
+{ 930, 1071594452u, 1497124553u, 1051715442u, 916736957u, 1073352905u, 1851626276u, 0, EXP_TOLERANCE, 0},
+{ 931, 1070002699u, 834914365u, 1064667143u, 2839166298u, 1072899118u, 3236760025u, 0, EXP_TOLERANCE, 0},
+{ 932, 1069862861u, 2139295776u, 1062816721u, 914592523u, 1072878380u, 2228412030u, 0, EXP_TOLERANCE, 0},
+{ 933, 3213754179u, 851569132u, 1058503154u, 1399378677u, 1072662754u, 3489701620u, 0, EXP_TOLERANCE, 0},
+{ 934, 3224100513u, 3897202342u, 3245382590u, 246600375u, 1051576264u, 1680693164u, 0, EXP_TOLERANCE, 0},
+{ 935, 3222314580u, 3620429520u, 1055627557u, 229305u, 1066406271u, 669062905u, 0, EXP_TOLERANCE, 0},
+{ 936, 1076618801u, 3641997865u, 3206673888u, 93720614u, 1093759686u, 70904860u, 0, EXP_TOLERANCE, 0},
+{ 937, 3222565555u, 32766320u, 1062084905u, 3668443038u, 1064873107u, 2362077810u, 0, EXP_TOLERANCE, 0},
+{ 938, 3222250420u, 2039713492u, 3248699388u, 1346210821u, 1066639017u, 1070391097u, 0, EXP_TOLERANCE, 0},
+{ 939, 1078369952u, 1335820726u, 3191756860u, 1808427032u, 1141063400u, 1082588104u, 0, EXP_TOLERANCE, 0},
+{ 940, 1070879947u, 650692001u, 1103515670u, 2253348763u, 1073085342u, 979466763u, 0, EXP_TOLERANCE, 0},
+{ 941, 3213415283u, 2372623300u, 3210185343u, 3200572848u, 1072667979u, 2818022293u, 0, EXP_TOLERANCE, 0},
+{ 942, 1080873125u, 762317532u, 3194595095u, 3192607437u, 1421328859u, 2571597720u, 0, EXP_TOLERANCE, 0},
+{ 943, 1070651309u, 217775356u, 3232827087u, 2969367386u, 1073008911u, 622956426u, 0, EXP_TOLERANCE, 0},
+{ 944, 1069755463u, 3621353969u, 1077994795u, 3873976266u, 1072862686u, 1190493624u, 0, EXP_TOLERANCE, 0},
+{ 945, 1078719075u, 268372152u, 3221764390u, 3216978962u, 1157161937u, 77208680u, 0, EXP_TOLERANCE, 0},
+{ 946, 3227563243u, 142942404u, 1075322987u, 1746449109u, 870456170u, 3164033211u, 0, EXP_TOLERANCE, 0},
+{ 947, 1081986200u, 496534875u, 3254522293u, 2532372502u, 1793917531u, 1796814503u, 0, EXP_TOLERANCE, 0},
+{ 948, 3228205445u, 2999955409u, 3222793392u, 1868977643u, 751888796u, 948939815u, 0, EXP_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 1077295134u, 2019316289u, 0, EXP_TOLERANCE, 0},
+{ 950, 1072413103u, 73646871u, 3231442171u, 3711510104u, 1073940200u, 865419667u, 0, EXP_TOLERANCE, 0},
+{ 951, 1077900612u, 218135177u, 3198908856u, 3082199105u, 1120199316u, 3713509082u, 0, EXP_TOLERANCE, 0},
+{ 952, 1072262784u, 1061628117u, 3248859043u, 86776158u, 1073853949u, 3126348436u, 0, EXP_TOLERANCE, 0},
+{ 953, 3217921858u, 938869114u, 1087911145u, 2416710759u, 1072260391u, 538149649u, 0, EXP_TOLERANCE, 0},
+{ 954, 1079848192u, 2970853959u, 3239543429u, 1887505029u, 1249157830u, 3136433410u, 0, EXP_TOLERANCE, 0},
+{ 955, 3225145875u, 1337895935u, 1076463812u, 1172733328u, 1030560683u, 1841720567u, 0, EXP_TOLERANCE, 0},
+{ 956, 1068014296u, 1469010822u, 3229583535u, 551399515u, 1072744869u, 816575420u, 0, EXP_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 1076775612u, 57353426u, 0, EXP_TOLERANCE, 0},
+{ 958, 3226410140u, 2976596113u, 3192137295u, 3033242648u, 978502995u, 3859738869u, 0, EXP_TOLERANCE, 0},
+{ 959, 1079824113u, 876810930u, 3197470945u, 2571587447u, 1246952463u, 1889039904u, 0, EXP_TOLERANCE, 0},
+{ 960, 3226042170u, 4007797282u, 3225853845u, 4069319648u, 995463929u, 75967049u, 0, EXP_TOLERANCE, 0},
+{ 961, 1067202926u, 3840538373u, 1043189552u, 3668774580u, 1072722551u, 3111652835u, 0, EXP_TOLERANCE, 0},
+{ 962, 3220757432u, 200857661u, 3229758439u, 3359367736u, 1070272935u, 3556446312u, 0, EXP_TOLERANCE, 0},
+{ 963, 3227826349u, 111868139u, 3227902082u, 2366064003u, 821867115u, 285439771u, 0, EXP_TOLERANCE, 0},
+{ 964, 1066215262u, 3510904416u, 3222131653u, 3822770497u, 1072708281u, 2102944929u, 0, EXP_TOLERANCE, 0},
+{ 965, 3226947075u, 789151814u, 1099269239u, 2958956055u, 931583754u, 3557693371u, 0, EXP_TOLERANCE, 0},
+{ 966, 1076290712u, 722163228u, 1105524559u, 1534462169u, 1089919020u, 2167990146u, 0, EXP_TOLERANCE, 0},
+{ 967, 1066509006u, 2207037106u, 3208952465u, 1231254630u, 1072711463u, 2736011721u, 0, EXP_TOLERANCE, 0},
+{ 968, 3215709852u, 3838689849u, 3198769679u, 1302617170u, 1072582266u, 2827125580u, 0, EXP_TOLERANCE, 0},
+{ 969, 1076501722u, 2527556476u, 3240373426u, 124352692u, 1092391286u, 1779746092u, 0, EXP_TOLERANCE, 0},
+{ 970, 3215269445u, 3502371499u, 1043411944u, 4190072016u, 1072608507u, 1214942277u, 0, EXP_TOLERANCE, 0},
+{ 971, 1070967598u, 1798470077u, 3200116917u, 3421833729u, 1073115765u, 2970386936u, 0, EXP_TOLERANCE, 0},
+{ 972, 3214486476u, 3653237931u, 3204255012u, 3683870669u, 1072642326u, 97744732u, 0, EXP_TOLERANCE, 0},
+{ 973, 1069317222u, 376530104u, 1073853547u, 565755892u, 1072816665u, 2564841654u, 0, EXP_TOLERANCE, 0},
+{ 974, 3226775211u, 558292492u, 1051772749u, 4267873474u, 947457526u, 4219624486u, 0, EXP_TOLERANCE, 0},
+{ 975, 3221626981u, 509637100u, 3212030069u, 215050379u, 1068506067u, 3628098739u, 0, EXP_TOLERANCE, 0},
+{ 976, 1078425613u, 3571665665u, 3188628584u, 757824767u, 1143623000u, 253046892u, 0, EXP_TOLERANCE, 0},
+{ 977, 3220042217u, 998858159u, 1063077962u, 436029885u, 1071192860u, 1450775748u, 0, EXP_TOLERANCE, 0},
+{ 978, 3217481301u, 996300405u, 3193842624u, 80548098u, 1072350133u, 1375924335u, 0, EXP_TOLERANCE, 0},
+{ 979, 3222557384u, 3876129407u, 3215332180u, 2226970413u, 1064924298u, 2928337857u, 0, EXP_TOLERANCE, 0},
+{ 980, 3225026041u, 200013509u, 3224552716u, 414878724u, 1033283085u, 3576891041u, 0, EXP_TOLERANCE, 0},
+{ 981, 3224325637u, 309319541u, 1048979765u, 1261662434u, 1048928773u, 2501187603u, 0, EXP_TOLERANCE, 0},
+{ 982, 1077718303u, 4062255924u, 3224274128u, 4289485681u, 1115992461u, 3449799183u, 0, EXP_TOLERANCE, 0},
+{ 983, 3224601748u, 1611969213u, 1053890378u, 3774617276u, 1043115104u, 1332410328u, 0, EXP_TOLERANCE, 0},
+{ 984, 1075169883u, 1752164782u, 3239587974u, 612223386u, 1080886915u, 1749786576u, 0, EXP_TOLERANCE, 0},
+{ 985, 1065663030u, 2024044989u, 1074932678u, 3259111307u, 1072703914u, 1332706132u, 0, EXP_TOLERANCE, 0},
+{ 986, 1068936158u, 2564965629u, 1093571065u, 169360454u, 1072790345u, 4117240763u, 0, EXP_TOLERANCE, 0},
+{ 987, 1077016178u, 1860101737u, 3191222372u, 1676437468u, 1099835788u, 2272979216u, 0, EXP_TOLERANCE, 0},
+{ 988, 1070288728u, 588387057u, 3192103292u, 2495288012u, 1072942629u, 2557725914u, 0, EXP_TOLERANCE, 0},
+{ 989, 3214127225u, 659070058u, 1073095700u, 1393632068u, 1072653309u, 1767849680u, 0, EXP_TOLERANCE, 0},
+{ 990, 3220828991u, 4276187829u, 3217553330u, 1868253275u, 1070155908u, 2703282856u, 0, EXP_TOLERANCE, 0},
+{ 991, 3222171696u, 2085481575u, 3215994784u, 800910002u, 1066847334u, 587373869u, 0, EXP_TOLERANCE, 0},
+{ 992, 1069517748u, 1950570756u, 3200582211u, 941022151u, 1072830757u, 2869741668u, 0, EXP_TOLERANCE, 0},
+{ 993, 1070113280u, 2075610870u, 3250142022u, 3605152103u, 1072915764u, 3193490161u, 0, EXP_TOLERANCE, 0},
+{ 994, 3216567890u, 3792931748u, 3204857863u, 804393211u, 1072498643u, 1528001685u, 0, EXP_TOLERANCE, 0},
+{ 995, 3229529122u, 3430071177u, 3226288311u, 3652522729u, 329463250u, 4001823001u, 0, EXP_TOLERANCE, 0},
+{ 996, 3215994766u, 236884699u, 3227874605u, 2193269825u, 1072564758u, 4053334377u, 0, EXP_TOLERANCE, 0},
+{ 997, 1071228049u, 2744231849u, 1046186036u, 771053722u, 1073210011u, 860122133u, 0, EXP_TOLERANCE, 0},
+{ 998, 1076656004u, 3000189819u, 1096500901u, 2057239777u, 1094134996u, 3545311159u, 0, EXP_TOLERANCE, 0},
+{ 999, 1078106941u, 205759408u, 3244643377u, 2702292618u, 1128907012u, 16441604u, 0, EXP_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_EXP_H multiple inclusion protection
+
+// EOF exp.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/fabs.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/fabs.c
new file mode 100644
index 0000000000..bafee2510c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/fabs.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// fabs.c
+//
+// Test of fabs() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/fabs.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(fabs_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &fabs, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_NONE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &fabs_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("fabs() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("fabs() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library fabs() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "fabs() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF fabs.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/fabs.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/fabs.h
new file mode 100644
index 0000000000..f1baea50b3
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/fabs.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_FABS_H
+#define CYGONCE_LIBM_FABS_H
+//===========================================================================
+//
+// fabs.h
+//
+// Test vectors for testing of fabs() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/fabs.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define FABS_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t fabs_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1077999148u, 2506787616u, 1090024059u, 3619148316u, 1077999148u, 2506787616u, 0, FABS_TOLERANCE, 0},
+{ 2, 3218153654u, 3176730980u, 1051524793u, 2993920299u, 1070670006u, 3176730980u, 0, FABS_TOLERANCE, 0},
+{ 3, 3239659803u, 2725707538u, 3232101343u, 2346810316u, 1092176155u, 2725707538u, 0, FABS_TOLERANCE, 0},
+{ 4, 1092554362u, 2088062470u, 3201242716u, 420891118u, 1092554362u, 2088062470u, 0, FABS_TOLERANCE, 0},
+{ 5, 3221200677u, 2636405208u, 1100049309u, 471635570u, 1073717029u, 2636405208u, 0, FABS_TOLERANCE, 0},
+{ 6, 1089363191u, 1746012320u, 1054478713u, 3333988501u, 1089363191u, 1746012320u, 0, FABS_TOLERANCE, 0},
+{ 7, 1047953160u, 183014794u, 3202039382u, 2016785810u, 1047953160u, 183014794u, 0, FABS_TOLERANCE, 0},
+{ 8, 3213486034u, 2688957927u, 1046089230u, 2709029994u, 1066002386u, 2688957927u, 0, FABS_TOLERANCE, 0},
+{ 9, 1058795730u, 624574473u, 1045840574u, 3473266330u, 1058795730u, 624574473u, 0, FABS_TOLERANCE, 0},
+{ 10, 3204919842u, 1605286142u, 1068931671u, 4233776869u, 1057436194u, 1605286142u, 0, FABS_TOLERANCE, 0},
+{ 11, 1060343410u, 1857607719u, 3222889559u, 3417070006u, 1060343410u, 1857607719u, 0, FABS_TOLERANCE, 0},
+{ 12, 1103599987u, 3981151660u, 1088899021u, 1332651746u, 1103599987u, 3981151660u, 0, FABS_TOLERANCE, 0},
+{ 13, 1085298022u, 3824988054u, 1066856791u, 2070129652u, 1085298022u, 3824988054u, 0, FABS_TOLERANCE, 0},
+{ 14, 3207559790u, 1372884064u, 1080833116u, 3229926662u, 1060076142u, 1372884064u, 0, FABS_TOLERANCE, 0},
+{ 15, 1093826501u, 3217805330u, 3191644264u, 2014578707u, 1093826501u, 3217805330u, 0, FABS_TOLERANCE, 0},
+{ 16, 1102287487u, 265058758u, 3239903247u, 1630600647u, 1102287487u, 265058758u, 0, FABS_TOLERANCE, 0},
+{ 17, 1071124229u, 1946677669u, 3198462609u, 926009897u, 1071124229u, 1946677669u, 0, FABS_TOLERANCE, 0},
+{ 18, 1072130299u, 2271884183u, 3203741999u, 2118617783u, 1072130299u, 2271884183u, 0, FABS_TOLERANCE, 0},
+{ 19, 3194849109u, 213658772u, 3249401130u, 314151656u, 1047365461u, 213658772u, 0, FABS_TOLERANCE, 0},
+{ 20, 3254112288u, 1564829925u, 3197817016u, 497230814u, 1106628640u, 1564829925u, 0, FABS_TOLERANCE, 0},
+{ 21, 3216262634u, 2075329122u, 3231746400u, 169900577u, 1068778986u, 2075329122u, 0, FABS_TOLERANCE, 0},
+{ 22, 1049848642u, 541549344u, 1096608669u, 3119070100u, 1049848642u, 541549344u, 0, FABS_TOLERANCE, 0},
+{ 23, 1085427055u, 567496114u, 1045286891u, 1969998540u, 1085427055u, 567496114u, 0, FABS_TOLERANCE, 0},
+{ 24, 1060548195u, 1299369769u, 1049342524u, 4167404066u, 1060548195u, 1299369769u, 0, FABS_TOLERANCE, 0},
+{ 25, 3208865645u, 3348930841u, 1078472138u, 358457347u, 1061381997u, 3348930841u, 0, FABS_TOLERANCE, 0},
+{ 26, 1071069297u, 2192461366u, 1099527247u, 3184735642u, 1071069297u, 2192461366u, 0, FABS_TOLERANCE, 0},
+{ 27, 1052861772u, 331696577u, 3189610016u, 793242270u, 1052861772u, 331696577u, 0, FABS_TOLERANCE, 0},
+{ 28, 3252528934u, 2322696981u, 1083791358u, 3020766674u, 1105045286u, 2322696981u, 0, FABS_TOLERANCE, 0},
+{ 29, 1044902177u, 252085215u, 3214426435u, 4139068910u, 1044902177u, 252085215u, 0, FABS_TOLERANCE, 0},
+{ 30, 3222505725u, 105589263u, 1056316170u, 261630827u, 1075022077u, 105589263u, 0, FABS_TOLERANCE, 0},
+{ 31, 1107213408u, 428765703u, 3251828686u, 2009972239u, 1107213408u, 428765703u, 0, FABS_TOLERANCE, 0},
+{ 32, 1098568019u, 3517376586u, 3240257920u, 3304487302u, 1098568019u, 3517376586u, 0, FABS_TOLERANCE, 0},
+{ 33, 3233537912u, 237004814u, 3237899261u, 3364008659u, 1086054264u, 237004814u, 0, FABS_TOLERANCE, 0},
+{ 34, 3195247552u, 472004928u, 3226869477u, 1186387580u, 1047763904u, 472004928u, 0, FABS_TOLERANCE, 0},
+{ 35, 1054226850u, 4085763910u, 1106394906u, 2684738273u, 1054226850u, 4085763910u, 0, FABS_TOLERANCE, 0},
+{ 36, 1057053639u, 2055490142u, 3231581370u, 3879040079u, 1057053639u, 2055490142u, 0, FABS_TOLERANCE, 0},
+{ 37, 3188976647u, 3725731239u, 1061652681u, 591292963u, 1041492999u, 3725731239u, 0, FABS_TOLERANCE, 0},
+{ 38, 3225014981u, 1147041027u, 3215417793u, 624695933u, 1077531333u, 1147041027u, 0, FABS_TOLERANCE, 0},
+{ 39, 3206052774u, 705725219u, 3238067573u, 1116238321u, 1058569126u, 705725219u, 0, FABS_TOLERANCE, 0},
+{ 40, 3207367088u, 7287411u, 1045917232u, 116067742u, 1059883440u, 7287411u, 0, FABS_TOLERANCE, 0},
+{ 41, 3240055222u, 3604989074u, 1066381836u, 545298780u, 1092571574u, 3604989074u, 0, FABS_TOLERANCE, 0},
+{ 42, 3219080936u, 1681476121u, 1060345752u, 3553822398u, 1071597288u, 1681476121u, 0, FABS_TOLERANCE, 0},
+{ 43, 1102831658u, 3410480388u, 1052460275u, 1660607230u, 1102831658u, 3410480388u, 0, FABS_TOLERANCE, 0},
+{ 44, 1089216869u, 1494984673u, 3196647153u, 287894723u, 1089216869u, 1494984673u, 0, FABS_TOLERANCE, 0},
+{ 45, 1054885127u, 644548665u, 1081948134u, 2442134629u, 1054885127u, 644548665u, 0, FABS_TOLERANCE, 0},
+{ 46, 1087554095u, 2312530895u, 3221584595u, 3379665576u, 1087554095u, 2312530895u, 0, FABS_TOLERANCE, 0},
+{ 47, 1096085375u, 3018463866u, 1086226574u, 404012923u, 1096085375u, 3018463866u, 0, FABS_TOLERANCE, 0},
+{ 48, 1064733299u, 1710279345u, 3251401196u, 3528946000u, 1064733299u, 1710279345u, 0, FABS_TOLERANCE, 0},
+{ 49, 1061536351u, 2164450219u, 1083520023u, 3312018966u, 1061536351u, 2164450219u, 0, FABS_TOLERANCE, 0},
+{ 50, 1057248676u, 2648986431u, 1050330591u, 1474376550u, 1057248676u, 2648986431u, 0, FABS_TOLERANCE, 0},
+{ 51, 3194422028u, 1839068700u, 1077406406u, 3013052171u, 1046938380u, 1839068700u, 0, FABS_TOLERANCE, 0},
+{ 52, 1046493630u, 772102380u, 3220729740u, 4219039958u, 1046493630u, 772102380u, 0, FABS_TOLERANCE, 0},
+{ 53, 3229472221u, 3058618779u, 1046304788u, 3338676024u, 1081988573u, 3058618779u, 0, FABS_TOLERANCE, 0},
+{ 54, 1051172137u, 506286854u, 1094907481u, 2217000199u, 1051172137u, 506286854u, 0, FABS_TOLERANCE, 0},
+{ 55, 1082428310u, 1147428263u, 1065432625u, 3034786717u, 1082428310u, 1147428263u, 0, FABS_TOLERANCE, 0},
+{ 56, 1082016752u, 2844125311u, 1082985198u, 2561492677u, 1082016752u, 2844125311u, 0, FABS_TOLERANCE, 0},
+{ 57, 3211536916u, 704542600u, 3222902057u, 2762779203u, 1064053268u, 704542600u, 0, FABS_TOLERANCE, 0},
+{ 58, 3199680614u, 184131949u, 3249723525u, 1667366082u, 1052196966u, 184131949u, 0, FABS_TOLERANCE, 0},
+{ 59, 3223609598u, 3904224140u, 1067056698u, 2942159914u, 1076125950u, 3904224140u, 0, FABS_TOLERANCE, 0},
+{ 60, 1100636863u, 426114282u, 3209056785u, 1083606355u, 1100636863u, 426114282u, 0, FABS_TOLERANCE, 0},
+{ 61, 1106165945u, 3774123863u, 1106787580u, 2722107965u, 1106165945u, 3774123863u, 0, FABS_TOLERANCE, 0},
+{ 62, 1088005092u, 1377734762u, 1104232051u, 2377063483u, 1088005092u, 1377734762u, 0, FABS_TOLERANCE, 0},
+{ 63, 1069380559u, 1029739074u, 1105467109u, 3062201018u, 1069380559u, 1029739074u, 0, FABS_TOLERANCE, 0},
+{ 64, 3234741597u, 773857656u, 3214251949u, 335833884u, 1087257949u, 773857656u, 0, FABS_TOLERANCE, 0},
+{ 65, 3203224610u, 1473865960u, 1103073830u, 4000427507u, 1055740962u, 1473865960u, 0, FABS_TOLERANCE, 0},
+{ 66, 1103185231u, 4242092620u, 1067009473u, 14539161u, 1103185231u, 4242092620u, 0, FABS_TOLERANCE, 0},
+{ 67, 3192516074u, 1732245037u, 1101371955u, 1533536108u, 1045032426u, 1732245037u, 0, FABS_TOLERANCE, 0},
+{ 68, 3249153995u, 1833841275u, 1099430098u, 4144145552u, 1101670347u, 1833841275u, 0, FABS_TOLERANCE, 0},
+{ 69, 3244270463u, 935007012u, 3188865420u, 604442938u, 1096786815u, 935007012u, 0, FABS_TOLERANCE, 0},
+{ 70, 3206903253u, 2211464602u, 1046255144u, 1635910526u, 1059419605u, 2211464602u, 0, FABS_TOLERANCE, 0},
+{ 71, 1077871417u, 2549219008u, 3231633258u, 3733639385u, 1077871417u, 2549219008u, 0, FABS_TOLERANCE, 0},
+{ 72, 1082095089u, 1819374372u, 3202219056u, 2617077637u, 1082095089u, 1819374372u, 0, FABS_TOLERANCE, 0},
+{ 73, 1094345280u, 546465680u, 1048653554u, 532401530u, 1094345280u, 546465680u, 0, FABS_TOLERANCE, 0},
+{ 74, 1044571091u, 2759019783u, 3221570188u, 3554409630u, 1044571091u, 2759019783u, 0, FABS_TOLERANCE, 0},
+{ 75, 3212931282u, 2527221960u, 1099107978u, 2696971136u, 1065447634u, 2527221960u, 0, FABS_TOLERANCE, 0},
+{ 76, 1097158000u, 173134582u, 1087299442u, 2877794600u, 1097158000u, 173134582u, 0, FABS_TOLERANCE, 0},
+{ 77, 1086400474u, 547642046u, 3197285510u, 3521286127u, 1086400474u, 547642046u, 0, FABS_TOLERANCE, 0},
+{ 78, 1074860702u, 1231582831u, 1090971734u, 1653446832u, 1074860702u, 1231582831u, 0, FABS_TOLERANCE, 0},
+{ 79, 1061342535u, 3762182190u, 3252967851u, 2615360375u, 1061342535u, 3762182190u, 0, FABS_TOLERANCE, 0},
+{ 80, 3200834423u, 2588067350u, 3206610957u, 3551059728u, 1053350775u, 2588067350u, 0, FABS_TOLERANCE, 0},
+{ 81, 3206978856u, 845263327u, 1073415902u, 1749010288u, 1059495208u, 845263327u, 0, FABS_TOLERANCE, 0},
+{ 82, 3205576370u, 3092685191u, 3190678390u, 2872219490u, 1058092722u, 3092685191u, 0, FABS_TOLERANCE, 0},
+{ 83, 3218315055u, 4107255722u, 3205337291u, 3069068345u, 1070831407u, 4107255722u, 0, FABS_TOLERANCE, 0},
+{ 84, 3243990857u, 2294867524u, 3216653996u, 2860384670u, 1096507209u, 2294867524u, 0, FABS_TOLERANCE, 0},
+{ 85, 3193326350u, 2265437201u, 3240198679u, 1234948614u, 1045842702u, 2265437201u, 0, FABS_TOLERANCE, 0},
+{ 86, 3216359929u, 1186945904u, 3251167793u, 1896750851u, 1068876281u, 1186945904u, 0, FABS_TOLERANCE, 0},
+{ 87, 1081575478u, 3686084548u, 1079286273u, 3309277689u, 1081575478u, 3686084548u, 0, FABS_TOLERANCE, 0},
+{ 88, 3223476240u, 3006860614u, 3231412671u, 2504194724u, 1075992592u, 3006860614u, 0, FABS_TOLERANCE, 0},
+{ 89, 3236149260u, 1948717780u, 1048317852u, 3791803982u, 1088665612u, 1948717780u, 0, FABS_TOLERANCE, 0},
+{ 90, 1064345015u, 4272034420u, 3192982124u, 1526175922u, 1064345015u, 4272034420u, 0, FABS_TOLERANCE, 0},
+{ 91, 3245817826u, 4108948538u, 1104691287u, 640541190u, 1098334178u, 4108948538u, 0, FABS_TOLERANCE, 0},
+{ 92, 3207257417u, 3259274853u, 1082507103u, 3677038020u, 1059773769u, 3259274853u, 0, FABS_TOLERANCE, 0},
+{ 93, 1083132498u, 3781708548u, 1096584871u, 1207386447u, 1083132498u, 3781708548u, 0, FABS_TOLERANCE, 0},
+{ 94, 3188695272u, 3011191657u, 1103798670u, 1096124830u, 1041211624u, 3011191657u, 0, FABS_TOLERANCE, 0},
+{ 95, 1063235023u, 2540404725u, 3240157452u, 4122845725u, 1063235023u, 2540404725u, 0, FABS_TOLERANCE, 0},
+{ 96, 1083643710u, 311336721u, 3214382367u, 4212533768u, 1083643710u, 311336721u, 0, FABS_TOLERANCE, 0},
+{ 97, 1051139427u, 1769686293u, 3240200923u, 3538602249u, 1051139427u, 1769686293u, 0, FABS_TOLERANCE, 0},
+{ 98, 1078227549u, 508056696u, 1103793878u, 776520138u, 1078227549u, 508056696u, 0, FABS_TOLERANCE, 0},
+{ 99, 1102910577u, 4064962760u, 1077424413u, 819766631u, 1102910577u, 4064962760u, 0, FABS_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 1074178362u, 2112385259u, 0, FABS_TOLERANCE, 0},
+{ 101, 1082295059u, 2514398118u, 1076579751u, 870169764u, 1082295059u, 2514398118u, 0, FABS_TOLERANCE, 0},
+{ 102, 3246851392u, 1190259653u, 1069112254u, 3417249840u, 1099367744u, 1190259653u, 0, FABS_TOLERANCE, 0},
+{ 103, 3193663083u, 3467757357u, 3215075200u, 2168175352u, 1046179435u, 3467757357u, 0, FABS_TOLERANCE, 0},
+{ 104, 3239643135u, 1508888184u, 1060430241u, 3524949092u, 1092159487u, 1508888184u, 0, FABS_TOLERANCE, 0},
+{ 105, 3197412883u, 166402802u, 3237198975u, 3572369260u, 1049929235u, 166402802u, 0, FABS_TOLERANCE, 0},
+{ 106, 1081866822u, 2441536203u, 3202753937u, 3658194573u, 1081866822u, 2441536203u, 0, FABS_TOLERANCE, 0},
+{ 107, 1062392908u, 2479742828u, 1062342831u, 4214154303u, 1062392908u, 2479742828u, 0, FABS_TOLERANCE, 0},
+{ 108, 1082396794u, 426896765u, 1066474375u, 2201754442u, 1082396794u, 426896765u, 0, FABS_TOLERANCE, 0},
+{ 109, 3195629021u, 2055773734u, 3239267288u, 291396537u, 1048145373u, 2055773734u, 0, FABS_TOLERANCE, 0},
+{ 110, 3236968033u, 874125203u, 3210508124u, 4091098764u, 1089484385u, 874125203u, 0, FABS_TOLERANCE, 0},
+{ 111, 1065716026u, 120488169u, 3241241441u, 1985269424u, 1065716026u, 120488169u, 0, FABS_TOLERANCE, 0},
+{ 112, 3206539410u, 2243036871u, 3243941101u, 740033495u, 1059055762u, 2243036871u, 0, FABS_TOLERANCE, 0},
+{ 113, 3209424906u, 1176656356u, 1074261978u, 3588756231u, 1061941258u, 1176656356u, 0, FABS_TOLERANCE, 0},
+{ 114, 3252816791u, 3037249392u, 1061635587u, 1173102190u, 1105333143u, 3037249392u, 0, FABS_TOLERANCE, 0},
+{ 115, 3237209581u, 2882725208u, 1071440059u, 69225090u, 1089725933u, 2882725208u, 0, FABS_TOLERANCE, 0},
+{ 116, 3212663474u, 272319256u, 1072073912u, 2493997123u, 1065179826u, 272319256u, 0, FABS_TOLERANCE, 0},
+{ 117, 1057720186u, 188610379u, 3232757923u, 2209647371u, 1057720186u, 188610379u, 0, FABS_TOLERANCE, 0},
+{ 118, 3236758517u, 1990439193u, 1078073146u, 622849962u, 1089274869u, 1990439193u, 0, FABS_TOLERANCE, 0},
+{ 119, 1057135741u, 756052458u, 1081649113u, 2247475162u, 1057135741u, 756052458u, 0, FABS_TOLERANCE, 0},
+{ 120, 1061623064u, 3878055211u, 3222407050u, 2979438623u, 1061623064u, 3878055211u, 0, FABS_TOLERANCE, 0},
+{ 121, 3195290997u, 2676398686u, 1105124431u, 3631096636u, 1047807349u, 2676398686u, 0, FABS_TOLERANCE, 0},
+{ 122, 1065079390u, 1697791764u, 3198136112u, 2299842819u, 1065079390u, 1697791764u, 0, FABS_TOLERANCE, 0},
+{ 123, 1078084768u, 1931502677u, 3215264397u, 3016456382u, 1078084768u, 1931502677u, 0, FABS_TOLERANCE, 0},
+{ 124, 1072253426u, 343404215u, 1061072607u, 4266232536u, 1072253426u, 343404215u, 0, FABS_TOLERANCE, 0},
+{ 125, 3241230836u, 4140316002u, 1082896196u, 868256971u, 1093747188u, 4140316002u, 0, FABS_TOLERANCE, 0},
+{ 126, 1075422810u, 1864139509u, 3187675097u, 3084482407u, 1075422810u, 1864139509u, 0, FABS_TOLERANCE, 0},
+{ 127, 3220191323u, 2427162817u, 3234748208u, 2715105792u, 1072707675u, 2427162817u, 0, FABS_TOLERANCE, 0},
+{ 128, 1064600512u, 3943389284u, 1046724025u, 3626825684u, 1064600512u, 3943389284u, 0, FABS_TOLERANCE, 0},
+{ 129, 1045423002u, 967350972u, 1093012318u, 448002663u, 1045423002u, 967350972u, 0, FABS_TOLERANCE, 0},
+{ 130, 3251845859u, 105058217u, 1069733884u, 171786224u, 1104362211u, 105058217u, 0, FABS_TOLERANCE, 0},
+{ 131, 3189614508u, 2863482262u, 3204997271u, 877784425u, 1042130860u, 2863482262u, 0, FABS_TOLERANCE, 0},
+{ 132, 3202629313u, 2801782962u, 3213604117u, 762347195u, 1055145665u, 2801782962u, 0, FABS_TOLERANCE, 0},
+{ 133, 3233486727u, 2317950339u, 3246333414u, 2135700283u, 1086003079u, 2317950339u, 0, FABS_TOLERANCE, 0},
+{ 134, 1056516397u, 4171919805u, 1082858682u, 2180920863u, 1056516397u, 4171919805u, 0, FABS_TOLERANCE, 0},
+{ 135, 3220149084u, 1918836931u, 1083603224u, 3137821660u, 1072665436u, 1918836931u, 0, FABS_TOLERANCE, 0},
+{ 136, 1103902874u, 3456203663u, 3235600523u, 2335688936u, 1103902874u, 3456203663u, 0, FABS_TOLERANCE, 0},
+{ 137, 1042279322u, 4170235262u, 1051824459u, 521583737u, 1042279322u, 4170235262u, 0, FABS_TOLERANCE, 0},
+{ 138, 1081348303u, 1296623194u, 3250673860u, 2442872540u, 1081348303u, 1296623194u, 0, FABS_TOLERANCE, 0},
+{ 139, 1061684277u, 289979405u, 1049514449u, 3865737145u, 1061684277u, 289979405u, 0, FABS_TOLERANCE, 0},
+{ 140, 1075298944u, 3699090239u, 1054539840u, 3259249360u, 1075298944u, 3699090239u, 0, FABS_TOLERANCE, 0},
+{ 141, 1096418100u, 1619819023u, 1045993352u, 1022642459u, 1096418100u, 1619819023u, 0, FABS_TOLERANCE, 0},
+{ 142, 1081433004u, 19455098u, 3229182089u, 2096003654u, 1081433004u, 19455098u, 0, FABS_TOLERANCE, 0},
+{ 143, 1076297936u, 3803689997u, 1071630912u, 2263729518u, 1076297936u, 3803689997u, 0, FABS_TOLERANCE, 0},
+{ 144, 1101357261u, 2816837387u, 1063422305u, 2597606398u, 1101357261u, 2816837387u, 0, FABS_TOLERANCE, 0},
+{ 145, 1069100169u, 3680967506u, 1040201163u, 179224723u, 1069100169u, 3680967506u, 0, FABS_TOLERANCE, 0},
+{ 146, 3188629767u, 978126928u, 1101553990u, 4047893399u, 1041146119u, 978126928u, 0, FABS_TOLERANCE, 0},
+{ 147, 3222322045u, 4059818629u, 1042678728u, 3640293589u, 1074838397u, 4059818629u, 0, FABS_TOLERANCE, 0},
+{ 148, 3248464040u, 3383497159u, 1070002807u, 1527313008u, 1100980392u, 3383497159u, 0, FABS_TOLERANCE, 0},
+{ 149, 3202707679u, 2599946514u, 1104170406u, 2738675352u, 1055224031u, 2599946514u, 0, FABS_TOLERANCE, 0},
+{ 150, 1105232623u, 3616571377u, 1060859316u, 1130603218u, 1105232623u, 3616571377u, 0, FABS_TOLERANCE, 0},
+{ 151, 1076028796u, 3859211180u, 1067940450u, 1744531824u, 1076028796u, 3859211180u, 0, FABS_TOLERANCE, 0},
+{ 152, 1042831340u, 1958025850u, 3236511256u, 2472176453u, 1042831340u, 1958025850u, 0, FABS_TOLERANCE, 0},
+{ 153, 3233107089u, 182132862u, 3250520938u, 3924356991u, 1085623441u, 182132862u, 0, FABS_TOLERANCE, 0},
+{ 154, 3230501884u, 35632886u, 3209806504u, 1453402523u, 1083018236u, 35632886u, 0, FABS_TOLERANCE, 0},
+{ 155, 1083522102u, 743225214u, 3202890678u, 142917400u, 1083522102u, 743225214u, 0, FABS_TOLERANCE, 0},
+{ 156, 1080684976u, 1472665012u, 3203138231u, 256588219u, 1080684976u, 1472665012u, 0, FABS_TOLERANCE, 0},
+{ 157, 1094982162u, 1062927000u, 1061134072u, 931677439u, 1094982162u, 1062927000u, 0, FABS_TOLERANCE, 0},
+{ 158, 1058377732u, 2320910576u, 1055663370u, 288059864u, 1058377732u, 2320910576u, 0, FABS_TOLERANCE, 0},
+{ 159, 1078958093u, 1448349062u, 3199478070u, 3454027134u, 1078958093u, 1448349062u, 0, FABS_TOLERANCE, 0},
+{ 160, 3237458798u, 4215445172u, 3196654963u, 2231888973u, 1089975150u, 4215445172u, 0, FABS_TOLERANCE, 0},
+{ 161, 3246632231u, 40413554u, 3232578253u, 983832844u, 1099148583u, 40413554u, 0, FABS_TOLERANCE, 0},
+{ 162, 3223721534u, 3995725873u, 1050082319u, 777231627u, 1076237886u, 3995725873u, 0, FABS_TOLERANCE, 0},
+{ 163, 1040986626u, 672789828u, 3253385962u, 2982787335u, 1040986626u, 672789828u, 0, FABS_TOLERANCE, 0},
+{ 164, 1068390875u, 2075971825u, 1070166500u, 4034633931u, 1068390875u, 2075971825u, 0, FABS_TOLERANCE, 0},
+{ 165, 3210046177u, 1018222907u, 3244621407u, 3090050495u, 1062562529u, 1018222907u, 0, FABS_TOLERANCE, 0},
+{ 166, 1067680885u, 937732557u, 3200798890u, 2557898276u, 1067680885u, 937732557u, 0, FABS_TOLERANCE, 0},
+{ 167, 1078342316u, 130346162u, 3223590310u, 275568693u, 1078342316u, 130346162u, 0, FABS_TOLERANCE, 0},
+{ 168, 1042898869u, 3807416441u, 1075961161u, 3706820266u, 1042898869u, 3807416441u, 0, FABS_TOLERANCE, 0},
+{ 169, 3216099005u, 1710131411u, 1078123323u, 1900790503u, 1068615357u, 1710131411u, 0, FABS_TOLERANCE, 0},
+{ 170, 3238819361u, 3420420033u, 3210844787u, 588423066u, 1091335713u, 3420420033u, 0, FABS_TOLERANCE, 0},
+{ 171, 1049684114u, 1160162008u, 3246307879u, 4265764460u, 1049684114u, 1160162008u, 0, FABS_TOLERANCE, 0},
+{ 172, 1102543434u, 366653268u, 3188814424u, 466059202u, 1102543434u, 366653268u, 0, FABS_TOLERANCE, 0},
+{ 173, 3226627739u, 1325936170u, 3221436876u, 680097612u, 1079144091u, 1325936170u, 0, FABS_TOLERANCE, 0},
+{ 174, 3240391116u, 1827735934u, 3200554324u, 2875599271u, 1092907468u, 1827735934u, 0, FABS_TOLERANCE, 0},
+{ 175, 3191030402u, 3117037091u, 3239246636u, 15838845u, 1043546754u, 3117037091u, 0, FABS_TOLERANCE, 0},
+{ 176, 1051974004u, 749718883u, 3223587064u, 1523766569u, 1051974004u, 749718883u, 0, FABS_TOLERANCE, 0},
+{ 177, 1044833651u, 1966536294u, 3250158026u, 699164258u, 1044833651u, 1966536294u, 0, FABS_TOLERANCE, 0},
+{ 178, 1098048435u, 3759049394u, 1106085272u, 1183789499u, 1098048435u, 3759049394u, 0, FABS_TOLERANCE, 0},
+{ 179, 1081201623u, 1970107747u, 1095245453u, 2308233883u, 1081201623u, 1970107747u, 0, FABS_TOLERANCE, 0},
+{ 180, 1084756444u, 1491017852u, 1041444355u, 1723375725u, 1084756444u, 1491017852u, 0, FABS_TOLERANCE, 0},
+{ 181, 3216630070u, 1141349287u, 1097465301u, 3403438584u, 1069146422u, 1141349287u, 0, FABS_TOLERANCE, 0},
+{ 182, 3230571908u, 1711085243u, 3250239076u, 1377484108u, 1083088260u, 1711085243u, 0, FABS_TOLERANCE, 0},
+{ 183, 1098385019u, 2880275004u, 1084039594u, 1611394950u, 1098385019u, 2880275004u, 0, FABS_TOLERANCE, 0},
+{ 184, 3234221435u, 2626629370u, 1063771493u, 1499080813u, 1086737787u, 2626629370u, 0, FABS_TOLERANCE, 0},
+{ 185, 1055231263u, 3936262414u, 1103919063u, 3175668759u, 1055231263u, 3936262414u, 0, FABS_TOLERANCE, 0},
+{ 186, 3207981719u, 1270950554u, 3194616071u, 3680565379u, 1060498071u, 1270950554u, 0, FABS_TOLERANCE, 0},
+{ 187, 3208148223u, 1066985223u, 3221613219u, 4089383168u, 1060664575u, 1066985223u, 0, FABS_TOLERANCE, 0},
+{ 188, 3217058839u, 4017329311u, 3208334452u, 1667591498u, 1069575191u, 4017329311u, 0, FABS_TOLERANCE, 0},
+{ 189, 1088164157u, 3154656624u, 1061894279u, 3886344038u, 1088164157u, 3154656624u, 0, FABS_TOLERANCE, 0},
+{ 190, 1050652945u, 977586119u, 3209762784u, 953839852u, 1050652945u, 977586119u, 0, FABS_TOLERANCE, 0},
+{ 191, 1104965247u, 143071571u, 3206165386u, 913097445u, 1104965247u, 143071571u, 0, FABS_TOLERANCE, 0},
+{ 192, 3190565456u, 1371169579u, 1057079837u, 2594818628u, 1043081808u, 1371169579u, 0, FABS_TOLERANCE, 0},
+{ 193, 3251793336u, 2259342224u, 3217432469u, 1824221478u, 1104309688u, 2259342224u, 0, FABS_TOLERANCE, 0},
+{ 194, 3246834775u, 1576604497u, 1079368611u, 185078728u, 1099351127u, 1576604497u, 0, FABS_TOLERANCE, 0},
+{ 195, 3221679427u, 444800035u, 3243343143u, 1734989302u, 1074195779u, 444800035u, 0, FABS_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1072748883u, 130452005u, 0, FABS_TOLERANCE, 0},
+{ 197, 3234695968u, 1941318385u, 1045807374u, 792193370u, 1087212320u, 1941318385u, 0, FABS_TOLERANCE, 0},
+{ 198, 3238299666u, 1299392207u, 3212131720u, 3205732280u, 1090816018u, 1299392207u, 0, FABS_TOLERANCE, 0},
+{ 199, 1098698804u, 3035093505u, 1052187689u, 3287702190u, 1098698804u, 3035093505u, 0, FABS_TOLERANCE, 0},
+{ 200, 3246676260u, 2160225215u, 1102624859u, 836655570u, 1099192612u, 2160225215u, 0, FABS_TOLERANCE, 0},
+{ 201, 1096723626u, 3360816360u, 3246176356u, 172860634u, 1096723626u, 3360816360u, 0, FABS_TOLERANCE, 0},
+{ 202, 1070995788u, 146831910u, 1051558014u, 2340722078u, 1070995788u, 146831910u, 0, FABS_TOLERANCE, 0},
+{ 203, 3230416351u, 1603798153u, 3207725532u, 1099413093u, 1082932703u, 1603798153u, 0, FABS_TOLERANCE, 0},
+{ 204, 3246678378u, 2429340443u, 3190303581u, 3223770005u, 1099194730u, 2429340443u, 0, FABS_TOLERANCE, 0},
+{ 205, 1075882959u, 955542166u, 3230415151u, 275583938u, 1075882959u, 955542166u, 0, FABS_TOLERANCE, 0},
+{ 206, 1092971882u, 513397822u, 1090646554u, 2089321329u, 1092971882u, 513397822u, 0, FABS_TOLERANCE, 0},
+{ 207, 3193169876u, 2782073372u, 1046063872u, 4023829068u, 1045686228u, 2782073372u, 0, FABS_TOLERANCE, 0},
+{ 208, 1098564822u, 3242223094u, 3194111199u, 4264674108u, 1098564822u, 3242223094u, 0, FABS_TOLERANCE, 0},
+{ 209, 3238510821u, 3506346169u, 1047020885u, 1742757458u, 1091027173u, 3506346169u, 0, FABS_TOLERANCE, 0},
+{ 210, 3192664477u, 1265459564u, 3193450280u, 3650514880u, 1045180829u, 1265459564u, 0, FABS_TOLERANCE, 0},
+{ 211, 1081755890u, 1525260440u, 3235452527u, 2612331392u, 1081755890u, 1525260440u, 0, FABS_TOLERANCE, 0},
+{ 212, 3248668920u, 1263613754u, 3219096387u, 635677201u, 1101185272u, 1263613754u, 0, FABS_TOLERANCE, 0},
+{ 213, 3206272087u, 4140947288u, 3200792376u, 2013265346u, 1058788439u, 4140947288u, 0, FABS_TOLERANCE, 0},
+{ 214, 3249974392u, 1912759945u, 3237045253u, 1351396825u, 1102490744u, 1912759945u, 0, FABS_TOLERANCE, 0},
+{ 215, 3248205162u, 1001433078u, 3206926643u, 2741676659u, 1100721514u, 1001433078u, 0, FABS_TOLERANCE, 0},
+{ 216, 1080923606u, 1088945233u, 1085095743u, 3986114865u, 1080923606u, 1088945233u, 0, FABS_TOLERANCE, 0},
+{ 217, 3215734057u, 831239754u, 1099828675u, 3071308141u, 1068250409u, 831239754u, 0, FABS_TOLERANCE, 0},
+{ 218, 3225834497u, 3473592372u, 1102759382u, 1309576357u, 1078350849u, 3473592372u, 0, FABS_TOLERANCE, 0},
+{ 219, 3251186706u, 2042340367u, 1091945628u, 2062772374u, 1103703058u, 2042340367u, 0, FABS_TOLERANCE, 0},
+{ 220, 3194765687u, 1840632537u, 1096533424u, 807510337u, 1047282039u, 1840632537u, 0, FABS_TOLERANCE, 0},
+{ 221, 3231451722u, 144814872u, 3212698915u, 2282965697u, 1083968074u, 144814872u, 0, FABS_TOLERANCE, 0},
+{ 222, 1071236430u, 2552499583u, 3229111426u, 1470130815u, 1071236430u, 2552499583u, 0, FABS_TOLERANCE, 0},
+{ 223, 3243093065u, 2858583811u, 1089760910u, 6360994u, 1095609417u, 2858583811u, 0, FABS_TOLERANCE, 0},
+{ 224, 3198264929u, 1614537194u, 1075198900u, 4088705365u, 1050781281u, 1614537194u, 0, FABS_TOLERANCE, 0},
+{ 225, 3250939070u, 3545570051u, 1065221325u, 1629217700u, 1103455422u, 3545570051u, 0, FABS_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 1072744324u, 1813392963u, 0, FABS_TOLERANCE, 0},
+{ 227, 3196802686u, 2406734491u, 1042055360u, 89226663u, 1049319038u, 2406734491u, 0, FABS_TOLERANCE, 0},
+{ 228, 3195751081u, 1618759139u, 3194723421u, 3888234802u, 1048267433u, 1618759139u, 0, FABS_TOLERANCE, 0},
+{ 229, 1055357248u, 3590035633u, 3212424262u, 2892456615u, 1055357248u, 3590035633u, 0, FABS_TOLERANCE, 0},
+{ 230, 3189943060u, 2431246964u, 3241512456u, 183850734u, 1042459412u, 2431246964u, 0, FABS_TOLERANCE, 0},
+{ 231, 1089501101u, 3088319870u, 3211544311u, 862225364u, 1089501101u, 3088319870u, 0, FABS_TOLERANCE, 0},
+{ 232, 3235294664u, 3495352775u, 1058576726u, 596957268u, 1087811016u, 3495352775u, 0, FABS_TOLERANCE, 0},
+{ 233, 1046553348u, 1839214511u, 3205004060u, 1923240983u, 1046553348u, 1839214511u, 0, FABS_TOLERANCE, 0},
+{ 234, 1058073864u, 739619702u, 3223356436u, 2689885273u, 1058073864u, 739619702u, 0, FABS_TOLERANCE, 0},
+{ 235, 3200324971u, 2143376228u, 1098306332u, 3760236188u, 1052841323u, 2143376228u, 0, FABS_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 1074621795u, 671680995u, 0, FABS_TOLERANCE, 0},
+{ 237, 3214165989u, 2493598049u, 3194927008u, 1689107592u, 1066682341u, 2493598049u, 0, FABS_TOLERANCE, 0},
+{ 238, 3189989959u, 1578976988u, 1066368383u, 2117279163u, 1042506311u, 1578976988u, 0, FABS_TOLERANCE, 0},
+{ 239, 3222988111u, 3425290087u, 1098487295u, 1263412017u, 1075504463u, 3425290087u, 0, FABS_TOLERANCE, 0},
+{ 240, 3208432764u, 3635396812u, 1070999426u, 3965655689u, 1060949116u, 3635396812u, 0, FABS_TOLERANCE, 0},
+{ 241, 1060196346u, 2183973116u, 1101098363u, 1118613350u, 1060196346u, 2183973116u, 0, FABS_TOLERANCE, 0},
+{ 242, 3221946089u, 199516350u, 1078368488u, 164621458u, 1074462441u, 199516350u, 0, FABS_TOLERANCE, 0},
+{ 243, 3187706018u, 3570940805u, 3230316437u, 3596080877u, 1040222370u, 3570940805u, 0, FABS_TOLERANCE, 0},
+{ 244, 3208209565u, 980880313u, 1079833442u, 884465057u, 1060725917u, 980880313u, 0, FABS_TOLERANCE, 0},
+{ 245, 1099977124u, 2558179220u, 1052873711u, 1233598120u, 1099977124u, 2558179220u, 0, FABS_TOLERANCE, 0},
+{ 246, 1047115221u, 1909994277u, 1085015978u, 2991527452u, 1047115221u, 1909994277u, 0, FABS_TOLERANCE, 0},
+{ 247, 1060855260u, 1680290941u, 1074309900u, 2943870846u, 1060855260u, 1680290941u, 0, FABS_TOLERANCE, 0},
+{ 248, 1059496132u, 1451927357u, 3228615456u, 1502585517u, 1059496132u, 1451927357u, 0, FABS_TOLERANCE, 0},
+{ 249, 3236211951u, 751136990u, 3230392165u, 3493275472u, 1088728303u, 751136990u, 0, FABS_TOLERANCE, 0},
+{ 250, 1098365967u, 1209623292u, 3238056647u, 979495322u, 1098365967u, 1209623292u, 0, FABS_TOLERANCE, 0},
+{ 251, 3250424296u, 1717672108u, 1048120593u, 531240316u, 1102940648u, 1717672108u, 0, FABS_TOLERANCE, 0},
+{ 252, 1054174923u, 3548721654u, 1086112947u, 3391817224u, 1054174923u, 3548721654u, 0, FABS_TOLERANCE, 0},
+{ 253, 1077836851u, 2758195125u, 1100880260u, 2028440924u, 1077836851u, 2758195125u, 0, FABS_TOLERANCE, 0},
+{ 254, 1084223893u, 2750123373u, 3232200256u, 1086294931u, 1084223893u, 2750123373u, 0, FABS_TOLERANCE, 0},
+{ 255, 1043958672u, 2986160931u, 1076097908u, 2540046258u, 1043958672u, 2986160931u, 0, FABS_TOLERANCE, 0},
+{ 256, 3235476602u, 451471221u, 1064816262u, 4187644495u, 1087992954u, 451471221u, 0, FABS_TOLERANCE, 0},
+{ 257, 1099460228u, 2439500162u, 1065280276u, 1979490284u, 1099460228u, 2439500162u, 0, FABS_TOLERANCE, 0},
+{ 258, 1040415832u, 2283342035u, 1078398157u, 1345997553u, 1040415832u, 2283342035u, 0, FABS_TOLERANCE, 0},
+{ 259, 3213249348u, 179066662u, 1103272172u, 1217337578u, 1065765700u, 179066662u, 0, FABS_TOLERANCE, 0},
+{ 260, 3211562377u, 3779303391u, 3210023352u, 3115946280u, 1064078729u, 3779303391u, 0, FABS_TOLERANCE, 0},
+{ 261, 3192989874u, 286247089u, 1085153597u, 713645369u, 1045506226u, 286247089u, 0, FABS_TOLERANCE, 0},
+{ 262, 1093670500u, 1468283899u, 1042831668u, 2022736418u, 1093670500u, 1468283899u, 0, FABS_TOLERANCE, 0},
+{ 263, 1083139105u, 3305564080u, 1065483445u, 482392433u, 1083139105u, 3305564080u, 0, FABS_TOLERANCE, 0},
+{ 264, 3201695807u, 2256346551u, 3222430705u, 2071674991u, 1054212159u, 2256346551u, 0, FABS_TOLERANCE, 0},
+{ 265, 3204024695u, 2295269094u, 1084451053u, 2773103941u, 1056541047u, 2295269094u, 0, FABS_TOLERANCE, 0},
+{ 266, 1078173946u, 1482721827u, 1092243422u, 3125409590u, 1078173946u, 1482721827u, 0, FABS_TOLERANCE, 0},
+{ 267, 3221065973u, 1381740563u, 1071545057u, 2918235653u, 1073582325u, 1381740563u, 0, FABS_TOLERANCE, 0},
+{ 268, 3238715972u, 1105857967u, 3241990046u, 2703723225u, 1091232324u, 1105857967u, 0, FABS_TOLERANCE, 0},
+{ 269, 1043015571u, 174689677u, 1079333374u, 3947057014u, 1043015571u, 174689677u, 0, FABS_TOLERANCE, 0},
+{ 270, 1090461859u, 2023082423u, 3242081486u, 1169047927u, 1090461859u, 2023082423u, 0, FABS_TOLERANCE, 0},
+{ 271, 1064525899u, 3742487766u, 1043425732u, 194972788u, 1064525899u, 3742487766u, 0, FABS_TOLERANCE, 0},
+{ 272, 3213791827u, 2136071361u, 3211529757u, 993675115u, 1066308179u, 2136071361u, 0, FABS_TOLERANCE, 0},
+{ 273, 3213663381u, 210772141u, 3241441539u, 580731413u, 1066179733u, 210772141u, 0, FABS_TOLERANCE, 0},
+{ 274, 1093840413u, 1751560711u, 1074522705u, 180987057u, 1093840413u, 1751560711u, 0, FABS_TOLERANCE, 0},
+{ 275, 1066754591u, 2552236599u, 1088658621u, 2112468655u, 1066754591u, 2552236599u, 0, FABS_TOLERANCE, 0},
+{ 276, 3189290617u, 1578223762u, 3224596567u, 2456166162u, 1041806969u, 1578223762u, 0, FABS_TOLERANCE, 0},
+{ 277, 1058506965u, 2110924310u, 1086207177u, 3161208323u, 1058506965u, 2110924310u, 0, FABS_TOLERANCE, 0},
+{ 278, 3231863394u, 2352173188u, 1079361728u, 4070222179u, 1084379746u, 2352173188u, 0, FABS_TOLERANCE, 0},
+{ 279, 1101012904u, 2481562701u, 1090937016u, 3809489716u, 1101012904u, 2481562701u, 0, FABS_TOLERANCE, 0},
+{ 280, 3197002651u, 330905705u, 1086260896u, 90264431u, 1049519003u, 330905705u, 0, FABS_TOLERANCE, 0},
+{ 281, 1040729961u, 4162008079u, 3194387916u, 759522153u, 1040729961u, 4162008079u, 0, FABS_TOLERANCE, 0},
+{ 282, 1081015037u, 1839697482u, 3216442625u, 2211508949u, 1081015037u, 1839697482u, 0, FABS_TOLERANCE, 0},
+{ 283, 3249807211u, 3736863454u, 1063475914u, 3150741666u, 1102323563u, 3736863454u, 0, FABS_TOLERANCE, 0},
+{ 284, 1060785883u, 4200269406u, 3236646101u, 1061812176u, 1060785883u, 4200269406u, 0, FABS_TOLERANCE, 0},
+{ 285, 1080217979u, 106027290u, 3234978297u, 2245237549u, 1080217979u, 106027290u, 0, FABS_TOLERANCE, 0},
+{ 286, 3246984334u, 2132131375u, 3250483427u, 3449276437u, 1099500686u, 2132131375u, 0, FABS_TOLERANCE, 0},
+{ 287, 1089388778u, 2334440944u, 1105423490u, 4004336184u, 1089388778u, 2334440944u, 0, FABS_TOLERANCE, 0},
+{ 288, 3218772704u, 4090088208u, 1042030013u, 3898658299u, 1071289056u, 4090088208u, 0, FABS_TOLERANCE, 0},
+{ 289, 3207908064u, 2272831437u, 3253082595u, 2639188641u, 1060424416u, 2272831437u, 0, FABS_TOLERANCE, 0},
+{ 290, 1054766684u, 1856594168u, 3189515294u, 4101853676u, 1054766684u, 1856594168u, 0, FABS_TOLERANCE, 0},
+{ 291, 1076012412u, 2211699255u, 3195060344u, 3865018604u, 1076012412u, 2211699255u, 0, FABS_TOLERANCE, 0},
+{ 292, 3242767010u, 996259334u, 3241496889u, 3782673116u, 1095283362u, 996259334u, 0, FABS_TOLERANCE, 0},
+{ 293, 1099130747u, 3840380763u, 1048674041u, 550040067u, 1099130747u, 3840380763u, 0, FABS_TOLERANCE, 0},
+{ 294, 3251419593u, 95874100u, 3237232828u, 2645647822u, 1103935945u, 95874100u, 0, FABS_TOLERANCE, 0},
+{ 295, 1043665640u, 3441419500u, 3252367038u, 876710419u, 1043665640u, 3441419500u, 0, FABS_TOLERANCE, 0},
+{ 296, 3238593552u, 2560836004u, 3199616543u, 1180840586u, 1091109904u, 2560836004u, 0, FABS_TOLERANCE, 0},
+{ 297, 3221602966u, 2218230392u, 3227485787u, 3947214579u, 1074119318u, 2218230392u, 0, FABS_TOLERANCE, 0},
+{ 298, 1079539654u, 1447312532u, 1081476588u, 780366847u, 1079539654u, 1447312532u, 0, FABS_TOLERANCE, 0},
+{ 299, 1072569643u, 2842113832u, 3216156731u, 225159029u, 1072569643u, 2842113832u, 0, FABS_TOLERANCE, 0},
+{ 300, 1098117193u, 1601981129u, 3234628869u, 2236538344u, 1098117193u, 1601981129u, 0, FABS_TOLERANCE, 0},
+{ 301, 1085173524u, 2194185737u, 3242362684u, 87913366u, 1085173524u, 2194185737u, 0, FABS_TOLERANCE, 0},
+{ 302, 3199083880u, 1346862963u, 1077836259u, 3604666660u, 1051600232u, 1346862963u, 0, FABS_TOLERANCE, 0},
+{ 303, 3212255979u, 3115209742u, 1099332326u, 1325101950u, 1064772331u, 3115209742u, 0, FABS_TOLERANCE, 0},
+{ 304, 3224546042u, 3889223100u, 1053247613u, 3371396923u, 1077062394u, 3889223100u, 0, FABS_TOLERANCE, 0},
+{ 305, 3220477868u, 4163120793u, 1075022670u, 1387631215u, 1072994220u, 4163120793u, 0, FABS_TOLERANCE, 0},
+{ 306, 3205481779u, 1532426189u, 1063168268u, 3397022615u, 1057998131u, 1532426189u, 0, FABS_TOLERANCE, 0},
+{ 307, 3201033321u, 89324166u, 1079206060u, 3429424710u, 1053549673u, 89324166u, 0, FABS_TOLERANCE, 0},
+{ 308, 3192325102u, 747591401u, 1072238381u, 2803213904u, 1044841454u, 747591401u, 0, FABS_TOLERANCE, 0},
+{ 309, 1091113780u, 271904221u, 1044258318u, 1858545114u, 1091113780u, 271904221u, 0, FABS_TOLERANCE, 0},
+{ 310, 3228068914u, 314958082u, 3249912496u, 2966213175u, 1080585266u, 314958082u, 0, FABS_TOLERANCE, 0},
+{ 311, 3197179414u, 3119528953u, 3217179014u, 2908718240u, 1049695766u, 3119528953u, 0, FABS_TOLERANCE, 0},
+{ 312, 3242467576u, 2018361566u, 1100926600u, 3985805054u, 1094983928u, 2018361566u, 0, FABS_TOLERANCE, 0},
+{ 313, 1070132580u, 409584884u, 3239758947u, 755795129u, 1070132580u, 409584884u, 0, FABS_TOLERANCE, 0},
+{ 314, 1075772446u, 1819156379u, 3251342302u, 2982669005u, 1075772446u, 1819156379u, 0, FABS_TOLERANCE, 0},
+{ 315, 1101563433u, 2080534280u, 3188254060u, 449171797u, 1101563433u, 2080534280u, 0, FABS_TOLERANCE, 0},
+{ 316, 1095956900u, 168744837u, 3214950009u, 1322217822u, 1095956900u, 168744837u, 0, FABS_TOLERANCE, 0},
+{ 317, 3254226900u, 3250487255u, 1062120700u, 1876195180u, 1106743252u, 3250487255u, 0, FABS_TOLERANCE, 0},
+{ 318, 3226343480u, 1336400247u, 1098057903u, 3314079581u, 1078859832u, 1336400247u, 0, FABS_TOLERANCE, 0},
+{ 319, 3203678820u, 265025555u, 1063854282u, 3779482256u, 1056195172u, 265025555u, 0, FABS_TOLERANCE, 0},
+{ 320, 1067300501u, 887044257u, 1054789618u, 2732056261u, 1067300501u, 887044257u, 0, FABS_TOLERANCE, 0},
+{ 321, 1050106742u, 4027115185u, 3191764868u, 2940199511u, 1050106742u, 4027115185u, 0, FABS_TOLERANCE, 0},
+{ 322, 3202500155u, 2875684421u, 3227459837u, 2251967570u, 1055016507u, 2875684421u, 0, FABS_TOLERANCE, 0},
+{ 323, 1063244412u, 284173546u, 3238823679u, 3557800647u, 1063244412u, 284173546u, 0, FABS_TOLERANCE, 0},
+{ 324, 1101458560u, 3147771266u, 3220110464u, 2933364246u, 1101458560u, 3147771266u, 0, FABS_TOLERANCE, 0},
+{ 325, 1064853160u, 3366183281u, 3234870843u, 537442654u, 1064853160u, 3366183281u, 0, FABS_TOLERANCE, 0},
+{ 326, 3244118788u, 2529029548u, 3249882819u, 3781513577u, 1096635140u, 2529029548u, 0, FABS_TOLERANCE, 0},
+{ 327, 3213436354u, 1080845539u, 3206760016u, 911778687u, 1065952706u, 1080845539u, 0, FABS_TOLERANCE, 0},
+{ 328, 3191951036u, 469586759u, 1091830022u, 3080528840u, 1044467388u, 469586759u, 0, FABS_TOLERANCE, 0},
+{ 329, 1080249104u, 2863108169u, 3225605506u, 2508274250u, 1080249104u, 2863108169u, 0, FABS_TOLERANCE, 0},
+{ 330, 3210826984u, 4080017377u, 3206492941u, 1470284690u, 1063343336u, 4080017377u, 0, FABS_TOLERANCE, 0},
+{ 331, 3207120390u, 3867917386u, 1102054928u, 3504746045u, 1059636742u, 3867917386u, 0, FABS_TOLERANCE, 0},
+{ 332, 1064522279u, 2962134101u, 3244741577u, 3390537350u, 1064522279u, 2962134101u, 0, FABS_TOLERANCE, 0},
+{ 333, 1088201813u, 1702237980u, 1071598971u, 1102587474u, 1088201813u, 1702237980u, 0, FABS_TOLERANCE, 0},
+{ 334, 3202970118u, 2180218657u, 3211592260u, 1206527853u, 1055486470u, 2180218657u, 0, FABS_TOLERANCE, 0},
+{ 335, 3197084744u, 394130786u, 3242511482u, 2437699868u, 1049601096u, 394130786u, 0, FABS_TOLERANCE, 0},
+{ 336, 1044237059u, 849581558u, 3252006507u, 2008614943u, 1044237059u, 849581558u, 0, FABS_TOLERANCE, 0},
+{ 337, 3210140014u, 3128971673u, 3249137531u, 2773583059u, 1062656366u, 3128971673u, 0, FABS_TOLERANCE, 0},
+{ 338, 1085029866u, 590727700u, 3248651761u, 2183878539u, 1085029866u, 590727700u, 0, FABS_TOLERANCE, 0},
+{ 339, 1101098629u, 820687580u, 3208143496u, 1402434664u, 1101098629u, 820687580u, 0, FABS_TOLERANCE, 0},
+{ 340, 3252290835u, 1873709254u, 3245167989u, 44275991u, 1104807187u, 1873709254u, 0, FABS_TOLERANCE, 0},
+{ 341, 3189668753u, 1174874204u, 3208263730u, 2360372288u, 1042185105u, 1174874204u, 0, FABS_TOLERANCE, 0},
+{ 342, 1103854676u, 937573440u, 3208953761u, 211240241u, 1103854676u, 937573440u, 0, FABS_TOLERANCE, 0},
+{ 343, 3243548934u, 2469774991u, 1043117070u, 3380071805u, 1096065286u, 2469774991u, 0, FABS_TOLERANCE, 0},
+{ 344, 1058121042u, 442507560u, 3254252803u, 3257889649u, 1058121042u, 442507560u, 0, FABS_TOLERANCE, 0},
+{ 345, 1068850520u, 1854921625u, 1049810168u, 2729627545u, 1068850520u, 1854921625u, 0, FABS_TOLERANCE, 0},
+{ 346, 3254712629u, 4001809575u, 3240128649u, 278261523u, 1107228981u, 4001809575u, 0, FABS_TOLERANCE, 0},
+{ 347, 1087224694u, 1793907966u, 3238955714u, 398859249u, 1087224694u, 1793907966u, 0, FABS_TOLERANCE, 0},
+{ 348, 3200952547u, 2511916952u, 3219195283u, 1697158299u, 1053468899u, 2511916952u, 0, FABS_TOLERANCE, 0},
+{ 349, 1069985548u, 3230931724u, 3243897690u, 3508781585u, 1069985548u, 3230931724u, 0, FABS_TOLERANCE, 0},
+{ 350, 1103847606u, 1674254897u, 1046547577u, 217148561u, 1103847606u, 1674254897u, 0, FABS_TOLERANCE, 0},
+{ 351, 3211263954u, 3275604304u, 3194840159u, 2991205850u, 1063780306u, 3275604304u, 0, FABS_TOLERANCE, 0},
+{ 352, 3195249375u, 3509997278u, 3248888030u, 3897986511u, 1047765727u, 3509997278u, 0, FABS_TOLERANCE, 0},
+{ 353, 1047182435u, 2156824613u, 1042295665u, 1239257646u, 1047182435u, 2156824613u, 0, FABS_TOLERANCE, 0},
+{ 354, 3213264085u, 1073153314u, 3250031627u, 2567234990u, 1065780437u, 1073153314u, 0, FABS_TOLERANCE, 0},
+{ 355, 3190593412u, 4261696995u, 3197784432u, 323702024u, 1043109764u, 4261696995u, 0, FABS_TOLERANCE, 0},
+{ 356, 3243690997u, 4075177615u, 3202791065u, 1919006082u, 1096207349u, 4075177615u, 0, FABS_TOLERANCE, 0},
+{ 357, 3239270013u, 386429966u, 1086504491u, 3698826164u, 1091786365u, 386429966u, 0, FABS_TOLERANCE, 0},
+{ 358, 1078327190u, 1681986446u, 3194985869u, 3072950140u, 1078327190u, 1681986446u, 0, FABS_TOLERANCE, 0},
+{ 359, 3217311933u, 3719038997u, 1055433962u, 3331415058u, 1069828285u, 3719038997u, 0, FABS_TOLERANCE, 0},
+{ 360, 1060749713u, 2420250111u, 3238002206u, 1928661079u, 1060749713u, 2420250111u, 0, FABS_TOLERANCE, 0},
+{ 361, 1081914210u, 3679866727u, 3227386672u, 1273835792u, 1081914210u, 3679866727u, 0, FABS_TOLERANCE, 0},
+{ 362, 1041622738u, 2682092368u, 3234222284u, 1325425811u, 1041622738u, 2682092368u, 0, FABS_TOLERANCE, 0},
+{ 363, 1056312613u, 4175172697u, 3208346191u, 2130706153u, 1056312613u, 4175172697u, 0, FABS_TOLERANCE, 0},
+{ 364, 1092089624u, 1200784450u, 1083605096u, 1248595607u, 1092089624u, 1200784450u, 0, FABS_TOLERANCE, 0},
+{ 365, 3213890863u, 1897285171u, 3251296075u, 944966123u, 1066407215u, 1897285171u, 0, FABS_TOLERANCE, 0},
+{ 366, 3241371250u, 2270747330u, 3230692631u, 422503284u, 1093887602u, 2270747330u, 0, FABS_TOLERANCE, 0},
+{ 367, 1084120037u, 2857564741u, 1075647403u, 3308906709u, 1084120037u, 2857564741u, 0, FABS_TOLERANCE, 0},
+{ 368, 3203475098u, 1380066948u, 3232612906u, 2613634294u, 1055991450u, 1380066948u, 0, FABS_TOLERANCE, 0},
+{ 369, 1063890856u, 4022784584u, 1060483857u, 3264056381u, 1063890856u, 4022784584u, 0, FABS_TOLERANCE, 0},
+{ 370, 1044637404u, 1778509100u, 3213146285u, 2665833973u, 1044637404u, 1778509100u, 0, FABS_TOLERANCE, 0},
+{ 371, 3216727300u, 1859175955u, 1079949560u, 4258450607u, 1069243652u, 1859175955u, 0, FABS_TOLERANCE, 0},
+{ 372, 1048277388u, 4128020197u, 1076266146u, 4122840980u, 1048277388u, 4128020197u, 0, FABS_TOLERANCE, 0},
+{ 373, 3193183163u, 2454653987u, 3229487005u, 2977478685u, 1045699515u, 2454653987u, 0, FABS_TOLERANCE, 0},
+{ 374, 3253556483u, 1355181872u, 1095308770u, 436846481u, 1106072835u, 1355181872u, 0, FABS_TOLERANCE, 0},
+{ 375, 3246605302u, 2592856453u, 3247825559u, 3195234082u, 1099121654u, 2592856453u, 0, FABS_TOLERANCE, 0},
+{ 376, 3222118023u, 3554670043u, 1091621009u, 3321236467u, 1074634375u, 3554670043u, 0, FABS_TOLERANCE, 0},
+{ 377, 1069012833u, 1936670355u, 1095715713u, 2958468553u, 1069012833u, 1936670355u, 0, FABS_TOLERANCE, 0},
+{ 378, 3192291109u, 2960339502u, 1098808013u, 1044068983u, 1044807461u, 2960339502u, 0, FABS_TOLERANCE, 0},
+{ 379, 3196691185u, 4093388677u, 1095478112u, 1735930261u, 1049207537u, 4093388677u, 0, FABS_TOLERANCE, 0},
+{ 380, 1091040302u, 1807398746u, 3195743135u, 4261616162u, 1091040302u, 1807398746u, 0, FABS_TOLERANCE, 0},
+{ 381, 3209294194u, 3250576797u, 1059002384u, 3043079652u, 1061810546u, 3250576797u, 0, FABS_TOLERANCE, 0},
+{ 382, 1069207109u, 666051428u, 3208765404u, 1912684117u, 1069207109u, 666051428u, 0, FABS_TOLERANCE, 0},
+{ 383, 1103487420u, 1949030179u, 1096388934u, 896459246u, 1103487420u, 1949030179u, 0, FABS_TOLERANCE, 0},
+{ 384, 1054300653u, 622499767u, 1066707637u, 1490260486u, 1054300653u, 622499767u, 0, FABS_TOLERANCE, 0},
+{ 385, 1106688493u, 1490616165u, 3251242436u, 795675736u, 1106688493u, 1490616165u, 0, FABS_TOLERANCE, 0},
+{ 386, 1080943896u, 3662877092u, 3234317146u, 3200513112u, 1080943896u, 3662877092u, 0, FABS_TOLERANCE, 0},
+{ 387, 1084088786u, 1356101968u, 3236536816u, 3062844611u, 1084088786u, 1356101968u, 0, FABS_TOLERANCE, 0},
+{ 388, 3219922640u, 2284484846u, 3219498359u, 3240896015u, 1072438992u, 2284484846u, 0, FABS_TOLERANCE, 0},
+{ 389, 3235759689u, 494503287u, 1092811254u, 142673998u, 1088276041u, 494503287u, 0, FABS_TOLERANCE, 0},
+{ 390, 3252125916u, 3394882641u, 3225306538u, 364852125u, 1104642268u, 3394882641u, 0, FABS_TOLERANCE, 0},
+{ 391, 3225261763u, 193885269u, 1088149839u, 1359805831u, 1077778115u, 193885269u, 0, FABS_TOLERANCE, 0},
+{ 392, 3200484782u, 592580907u, 3199560872u, 3086438952u, 1053001134u, 592580907u, 0, FABS_TOLERANCE, 0},
+{ 393, 1059518664u, 1778008540u, 1049064687u, 73581647u, 1059518664u, 1778008540u, 0, FABS_TOLERANCE, 0},
+{ 394, 3246733598u, 233240285u, 1081923320u, 2710903921u, 1099249950u, 233240285u, 0, FABS_TOLERANCE, 0},
+{ 395, 1069513767u, 3719878805u, 1079866720u, 3615458228u, 1069513767u, 3719878805u, 0, FABS_TOLERANCE, 0},
+{ 396, 3221194724u, 3647632375u, 3247225271u, 3839959621u, 1073711076u, 3647632375u, 0, FABS_TOLERANCE, 0},
+{ 397, 1103401096u, 2232210456u, 3235434773u, 224271737u, 1103401096u, 2232210456u, 0, FABS_TOLERANCE, 0},
+{ 398, 3193003684u, 2134662911u, 3190390590u, 4239009051u, 1045520036u, 2134662911u, 0, FABS_TOLERANCE, 0},
+{ 399, 1080526145u, 2305279897u, 1077668039u, 1854523320u, 1080526145u, 2305279897u, 0, FABS_TOLERANCE, 0},
+{ 400, 3219864259u, 538224650u, 3206153057u, 1379649610u, 1072380611u, 538224650u, 0, FABS_TOLERANCE, 0},
+{ 401, 3196410507u, 3683897920u, 3244167599u, 3647579469u, 1048926859u, 3683897920u, 0, FABS_TOLERANCE, 0},
+{ 402, 1090280933u, 2694093608u, 1042775347u, 598406111u, 1090280933u, 2694093608u, 0, FABS_TOLERANCE, 0},
+{ 403, 3211635392u, 872706833u, 1084802480u, 2200602798u, 1064151744u, 872706833u, 0, FABS_TOLERANCE, 0},
+{ 404, 1042339597u, 904146293u, 1060867322u, 1729685598u, 1042339597u, 904146293u, 0, FABS_TOLERANCE, 0},
+{ 405, 3195694970u, 1894173462u, 3232800651u, 191960416u, 1048211322u, 1894173462u, 0, FABS_TOLERANCE, 0},
+{ 406, 1091225343u, 3521028551u, 1054522089u, 3287274359u, 1091225343u, 3521028551u, 0, FABS_TOLERANCE, 0},
+{ 407, 1095386964u, 959640601u, 3201578263u, 4136915018u, 1095386964u, 959640601u, 0, FABS_TOLERANCE, 0},
+{ 408, 1064005451u, 1553716379u, 1106027987u, 984725765u, 1064005451u, 1553716379u, 0, FABS_TOLERANCE, 0},
+{ 409, 3238832641u, 2287646644u, 3240329321u, 2276183378u, 1091348993u, 2287646644u, 0, FABS_TOLERANCE, 0},
+{ 410, 1068209174u, 3940225170u, 3199544434u, 997572161u, 1068209174u, 3940225170u, 0, FABS_TOLERANCE, 0},
+{ 411, 3212768361u, 36116288u, 3206886566u, 4196602670u, 1065284713u, 36116288u, 0, FABS_TOLERANCE, 0},
+{ 412, 3241695853u, 3550227562u, 3207257983u, 2747744117u, 1094212205u, 3550227562u, 0, FABS_TOLERANCE, 0},
+{ 413, 1104236126u, 507130047u, 1048359321u, 3229888373u, 1104236126u, 507130047u, 0, FABS_TOLERANCE, 0},
+{ 414, 3222996778u, 2210969014u, 1081031001u, 1946786091u, 1075513130u, 2210969014u, 0, FABS_TOLERANCE, 0},
+{ 415, 3236306990u, 4059150589u, 3189759234u, 1177045799u, 1088823342u, 4059150589u, 0, FABS_TOLERANCE, 0},
+{ 416, 1093103612u, 2664812822u, 1050343198u, 2034180320u, 1093103612u, 2664812822u, 0, FABS_TOLERANCE, 0},
+{ 417, 3213779117u, 1175750283u, 3235559706u, 1424491340u, 1066295469u, 1175750283u, 0, FABS_TOLERANCE, 0},
+{ 418, 3213904193u, 1630036121u, 3231972785u, 3195479448u, 1066420545u, 1630036121u, 0, FABS_TOLERANCE, 0},
+{ 419, 1090429875u, 2527029044u, 1046927050u, 4000723255u, 1090429875u, 2527029044u, 0, FABS_TOLERANCE, 0},
+{ 420, 1085208677u, 3335703647u, 3237349676u, 3869440059u, 1085208677u, 3335703647u, 0, FABS_TOLERANCE, 0},
+{ 421, 1091433848u, 3888398377u, 3196041693u, 1290567220u, 1091433848u, 3888398377u, 0, FABS_TOLERANCE, 0},
+{ 422, 1066679070u, 3242451480u, 3248384948u, 707431021u, 1066679070u, 3242451480u, 0, FABS_TOLERANCE, 0},
+{ 423, 1083230509u, 2739665123u, 1060777905u, 1733073225u, 1083230509u, 2739665123u, 0, FABS_TOLERANCE, 0},
+{ 424, 1078517061u, 1297274853u, 3208848704u, 3341639139u, 1078517061u, 1297274853u, 0, FABS_TOLERANCE, 0},
+{ 425, 1046570941u, 2228057309u, 1084318902u, 1317851136u, 1046570941u, 2228057309u, 0, FABS_TOLERANCE, 0},
+{ 426, 1088255327u, 270039934u, 3241414679u, 3063626339u, 1088255327u, 270039934u, 0, FABS_TOLERANCE, 0},
+{ 427, 3219178350u, 83062251u, 3211262173u, 2659016437u, 1071694702u, 83062251u, 0, FABS_TOLERANCE, 0},
+{ 428, 1095743886u, 3833539373u, 3206667189u, 1567476111u, 1095743886u, 3833539373u, 0, FABS_TOLERANCE, 0},
+{ 429, 3205195072u, 2382776852u, 3249232579u, 1546622468u, 1057711424u, 2382776852u, 0, FABS_TOLERANCE, 0},
+{ 430, 1085536439u, 1714300821u, 1104130938u, 4167591598u, 1085536439u, 1714300821u, 0, FABS_TOLERANCE, 0},
+{ 431, 1051092760u, 2798720100u, 1086978789u, 449990704u, 1051092760u, 2798720100u, 0, FABS_TOLERANCE, 0},
+{ 432, 3231198415u, 4039516226u, 3244344107u, 4272932619u, 1083714767u, 4039516226u, 0, FABS_TOLERANCE, 0},
+{ 433, 3222708441u, 1683007544u, 1091105663u, 3805494321u, 1075224793u, 1683007544u, 0, FABS_TOLERANCE, 0},
+{ 434, 3220852948u, 2072627412u, 1094383324u, 3394151662u, 1073369300u, 2072627412u, 0, FABS_TOLERANCE, 0},
+{ 435, 3220570024u, 1120106427u, 3223631624u, 3404608264u, 1073086376u, 1120106427u, 0, FABS_TOLERANCE, 0},
+{ 436, 1097859997u, 559918757u, 3205077053u, 908100198u, 1097859997u, 559918757u, 0, FABS_TOLERANCE, 0},
+{ 437, 1042677918u, 2026673913u, 3244833635u, 2844573214u, 1042677918u, 2026673913u, 0, FABS_TOLERANCE, 0},
+{ 438, 3254567259u, 3946837259u, 3234993796u, 3850406820u, 1107083611u, 3946837259u, 0, FABS_TOLERANCE, 0},
+{ 439, 1057479809u, 3139330994u, 1046133568u, 1539650690u, 1057479809u, 3139330994u, 0, FABS_TOLERANCE, 0},
+{ 440, 3236705500u, 1554593884u, 3228899878u, 2813752562u, 1089221852u, 1554593884u, 0, FABS_TOLERANCE, 0},
+{ 441, 1056505004u, 3804703138u, 1072931071u, 2053677923u, 1056505004u, 3804703138u, 0, FABS_TOLERANCE, 0},
+{ 442, 3244864299u, 289355864u, 1078453818u, 2143066338u, 1097380651u, 289355864u, 0, FABS_TOLERANCE, 0},
+{ 443, 3203939880u, 2157691971u, 1106629150u, 110806409u, 1056456232u, 2157691971u, 0, FABS_TOLERANCE, 0},
+{ 444, 1082157019u, 3570399481u, 1085637605u, 180265334u, 1082157019u, 3570399481u, 0, FABS_TOLERANCE, 0},
+{ 445, 3200980182u, 558779875u, 3202046748u, 2338464653u, 1053496534u, 558779875u, 0, FABS_TOLERANCE, 0},
+{ 446, 1045705464u, 1703969219u, 3229797258u, 1417521063u, 1045705464u, 1703969219u, 0, FABS_TOLERANCE, 0},
+{ 447, 3237782261u, 3917440951u, 1051668894u, 3736066983u, 1090298613u, 3917440951u, 0, FABS_TOLERANCE, 0},
+{ 448, 1064752080u, 3106613409u, 1066627453u, 2735392257u, 1064752080u, 3106613409u, 0, FABS_TOLERANCE, 0},
+{ 449, 1065665372u, 2229777605u, 1065061963u, 2405869925u, 1065665372u, 2229777605u, 0, FABS_TOLERANCE, 0},
+{ 450, 3239463229u, 3967957902u, 1057416138u, 3459188071u, 1091979581u, 3967957902u, 0, FABS_TOLERANCE, 0},
+{ 451, 1068639210u, 3699016825u, 3249713090u, 796144848u, 1068639210u, 3699016825u, 0, FABS_TOLERANCE, 0},
+{ 452, 3228816396u, 3285165564u, 3211948811u, 401510871u, 1081332748u, 3285165564u, 0, FABS_TOLERANCE, 0},
+{ 453, 1094257658u, 634857910u, 3199607513u, 914218057u, 1094257658u, 634857910u, 0, FABS_TOLERANCE, 0},
+{ 454, 1083743336u, 2030735578u, 3233855943u, 965677531u, 1083743336u, 2030735578u, 0, FABS_TOLERANCE, 0},
+{ 455, 1079556815u, 3957229084u, 1051050470u, 3123776651u, 1079556815u, 3957229084u, 0, FABS_TOLERANCE, 0},
+{ 456, 3221863333u, 162122081u, 3239376395u, 108064594u, 1074379685u, 162122081u, 0, FABS_TOLERANCE, 0},
+{ 457, 3237271786u, 869031839u, 3225020876u, 1344301606u, 1089788138u, 869031839u, 0, FABS_TOLERANCE, 0},
+{ 458, 3214433474u, 946696117u, 3231825228u, 1700703647u, 1066949826u, 946696117u, 0, FABS_TOLERANCE, 0},
+{ 459, 1075492875u, 3394168074u, 1076939786u, 1666995668u, 1075492875u, 3394168074u, 0, FABS_TOLERANCE, 0},
+{ 460, 3208774795u, 2488789804u, 3238508333u, 1506943664u, 1061291147u, 2488789804u, 0, FABS_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1072788663u, 3844072288u, 0, FABS_TOLERANCE, 0},
+{ 462, 3219934542u, 1244307192u, 3191297711u, 2540916692u, 1072450894u, 1244307192u, 0, FABS_TOLERANCE, 0},
+{ 463, 3200062692u, 2871645739u, 3239081581u, 1440249115u, 1052579044u, 2871645739u, 0, FABS_TOLERANCE, 0},
+{ 464, 1068350633u, 1231934926u, 3236746788u, 603977748u, 1068350633u, 1231934926u, 0, FABS_TOLERANCE, 0},
+{ 465, 3195449689u, 2386312545u, 1063169277u, 2715234268u, 1047966041u, 2386312545u, 0, FABS_TOLERANCE, 0},
+{ 466, 1087803418u, 915867083u, 1046790892u, 3347417612u, 1087803418u, 915867083u, 0, FABS_TOLERANCE, 0},
+{ 467, 1105984188u, 3553288373u, 1065698616u, 2906680663u, 1105984188u, 3553288373u, 0, FABS_TOLERANCE, 0},
+{ 468, 1045506226u, 2342364630u, 1051356723u, 4019093203u, 1045506226u, 2342364630u, 0, FABS_TOLERANCE, 0},
+{ 469, 3201169162u, 2911548084u, 1105282515u, 2476735795u, 1053685514u, 2911548084u, 0, FABS_TOLERANCE, 0},
+{ 470, 1050472772u, 1836216409u, 1101062307u, 2519592554u, 1050472772u, 1836216409u, 0, FABS_TOLERANCE, 0},
+{ 471, 1070178161u, 1235369496u, 3222946447u, 668087854u, 1070178161u, 1235369496u, 0, FABS_TOLERANCE, 0},
+{ 472, 3208554596u, 2981820811u, 1059838516u, 2845580478u, 1061070948u, 2981820811u, 0, FABS_TOLERANCE, 0},
+{ 473, 3193931414u, 1565550570u, 3217165795u, 4162017137u, 1046447766u, 1565550570u, 0, FABS_TOLERANCE, 0},
+{ 474, 3237251378u, 2808968027u, 1055630096u, 1782326814u, 1089767730u, 2808968027u, 0, FABS_TOLERANCE, 0},
+{ 475, 1053576974u, 1492622658u, 3216653077u, 3972512122u, 1053576974u, 1492622658u, 0, FABS_TOLERANCE, 0},
+{ 476, 3222171679u, 2722693603u, 3227814791u, 3169731970u, 1074688031u, 2722693603u, 0, FABS_TOLERANCE, 0},
+{ 477, 3217906631u, 899763203u, 3207606001u, 2804747833u, 1070422983u, 899763203u, 0, FABS_TOLERANCE, 0},
+{ 478, 3230670325u, 3789058912u, 3228095081u, 4135937628u, 1083186677u, 3789058912u, 0, FABS_TOLERANCE, 0},
+{ 479, 1060199382u, 1682808307u, 3206960335u, 232877759u, 1060199382u, 1682808307u, 0, FABS_TOLERANCE, 0},
+{ 480, 3242091486u, 2851963139u, 3246852961u, 2590862592u, 1094607838u, 2851963139u, 0, FABS_TOLERANCE, 0},
+{ 481, 1081200406u, 2422232642u, 3234779662u, 290458310u, 1081200406u, 2422232642u, 0, FABS_TOLERANCE, 0},
+{ 482, 3210671078u, 1082582386u, 1075605675u, 2602133689u, 1063187430u, 1082582386u, 0, FABS_TOLERANCE, 0},
+{ 483, 3239818611u, 1789635787u, 1059414278u, 1048286093u, 1092334963u, 1789635787u, 0, FABS_TOLERANCE, 0},
+{ 484, 1098330542u, 231339448u, 1055573265u, 504907415u, 1098330542u, 231339448u, 0, FABS_TOLERANCE, 0},
+{ 485, 1063211461u, 1153251200u, 3204617090u, 1772013857u, 1063211461u, 1153251200u, 0, FABS_TOLERANCE, 0},
+{ 486, 1099551055u, 1082898276u, 3212089272u, 1449080862u, 1099551055u, 1082898276u, 0, FABS_TOLERANCE, 0},
+{ 487, 1086008285u, 3177299045u, 1058862813u, 809400815u, 1086008285u, 3177299045u, 0, FABS_TOLERANCE, 0},
+{ 488, 3230854550u, 1924429710u, 1056464743u, 3349283177u, 1083370902u, 1924429710u, 0, FABS_TOLERANCE, 0},
+{ 489, 3245473391u, 42238036u, 1042379500u, 2113559863u, 1097989743u, 42238036u, 0, FABS_TOLERANCE, 0},
+{ 490, 1064761243u, 3304403230u, 3217556703u, 58952646u, 1064761243u, 3304403230u, 0, FABS_TOLERANCE, 0},
+{ 491, 3212669530u, 1645486982u, 3224301095u, 3636267471u, 1065185882u, 1645486982u, 0, FABS_TOLERANCE, 0},
+{ 492, 1062762009u, 619402181u, 3235208235u, 557360557u, 1062762009u, 619402181u, 0, FABS_TOLERANCE, 0},
+{ 493, 3238238394u, 110029735u, 1046937383u, 984375729u, 1090754746u, 110029735u, 0, FABS_TOLERANCE, 0},
+{ 494, 3189496738u, 4063688092u, 3203235744u, 1049950343u, 1042013090u, 4063688092u, 0, FABS_TOLERANCE, 0},
+{ 495, 1062350619u, 650996069u, 1054971928u, 3953359826u, 1062350619u, 650996069u, 0, FABS_TOLERANCE, 0},
+{ 496, 3227055805u, 66926332u, 1090561839u, 1379780888u, 1079572157u, 66926332u, 0, FABS_TOLERANCE, 0},
+{ 497, 3233453307u, 2803378256u, 1086057989u, 498534626u, 1085969659u, 2803378256u, 0, FABS_TOLERANCE, 0},
+{ 498, 1082618553u, 2846400785u, 1047142525u, 1375153550u, 1082618553u, 2846400785u, 0, FABS_TOLERANCE, 0},
+{ 499, 1044581201u, 2869128958u, 1070972315u, 4246440273u, 1044581201u, 2869128958u, 0, FABS_TOLERANCE, 0},
+{ 500, 1051832506u, 3112381207u, 1044430965u, 3981604561u, 1051832506u, 3112381207u, 0, FABS_TOLERANCE, 0},
+{ 501, 3231254997u, 243303420u, 1093735824u, 1575581926u, 1083771349u, 243303420u, 0, FABS_TOLERANCE, 0},
+{ 502, 3239137997u, 3218865041u, 3204803496u, 3840388050u, 1091654349u, 3218865041u, 0, FABS_TOLERANCE, 0},
+{ 503, 1048415431u, 336846959u, 1052664471u, 3798336786u, 1048415431u, 336846959u, 0, FABS_TOLERANCE, 0},
+{ 504, 1055954236u, 3639240976u, 1081202165u, 1844741676u, 1055954236u, 3639240976u, 0, FABS_TOLERANCE, 0},
+{ 505, 3211904793u, 717293069u, 3211534283u, 582401011u, 1064421145u, 717293069u, 0, FABS_TOLERANCE, 0},
+{ 506, 3251962512u, 3766248610u, 3196520332u, 1174437546u, 1104478864u, 3766248610u, 0, FABS_TOLERANCE, 0},
+{ 507, 1083431226u, 756959182u, 3204099341u, 1581804034u, 1083431226u, 756959182u, 0, FABS_TOLERANCE, 0},
+{ 508, 3205806444u, 3560686300u, 3220980617u, 4277975772u, 1058322796u, 3560686300u, 0, FABS_TOLERANCE, 0},
+{ 509, 3209906076u, 2598148853u, 3217622194u, 3460421008u, 1062422428u, 2598148853u, 0, FABS_TOLERANCE, 0},
+{ 510, 1066720824u, 136600515u, 3209934920u, 3340653128u, 1066720824u, 136600515u, 0, FABS_TOLERANCE, 0},
+{ 511, 1096820310u, 1045480938u, 3251354609u, 4133432965u, 1096820310u, 1045480938u, 0, FABS_TOLERANCE, 0},
+{ 512, 1091599431u, 1630207738u, 3239996829u, 2393354808u, 1091599431u, 1630207738u, 0, FABS_TOLERANCE, 0},
+{ 513, 3190626018u, 3739770117u, 1059520750u, 3959551225u, 1043142370u, 3739770117u, 0, FABS_TOLERANCE, 0},
+{ 514, 3230730505u, 1498861716u, 1091297147u, 847410798u, 1083246857u, 1498861716u, 0, FABS_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 1073516688u, 983275314u, 0, FABS_TOLERANCE, 0},
+{ 516, 1054849265u, 2353103845u, 3235718771u, 2978889966u, 1054849265u, 2353103845u, 0, FABS_TOLERANCE, 0},
+{ 517, 3251357992u, 1546972125u, 3249076079u, 1987349196u, 1103874344u, 1546972125u, 0, FABS_TOLERANCE, 0},
+{ 518, 3238219513u, 2769161072u, 1075207126u, 292616282u, 1090735865u, 2769161072u, 0, FABS_TOLERANCE, 0},
+{ 519, 3199712298u, 36855311u, 1052128202u, 1479039342u, 1052228650u, 36855311u, 0, FABS_TOLERANCE, 0},
+{ 520, 1083757053u, 2027463605u, 1066023013u, 3369686340u, 1083757053u, 2027463605u, 0, FABS_TOLERANCE, 0},
+{ 521, 3197852749u, 3808681655u, 1054161346u, 1821773119u, 1050369101u, 3808681655u, 0, FABS_TOLERANCE, 0},
+{ 522, 1040685928u, 3175490326u, 3226879970u, 845687760u, 1040685928u, 3175490326u, 0, FABS_TOLERANCE, 0},
+{ 523, 1042302993u, 3124482451u, 3242748377u, 3259417226u, 1042302993u, 3124482451u, 0, FABS_TOLERANCE, 0},
+{ 524, 1045245695u, 2751606436u, 3236210939u, 3923142740u, 1045245695u, 2751606436u, 0, FABS_TOLERANCE, 0},
+{ 525, 1095694737u, 2016872044u, 3228408064u, 4201274408u, 1095694737u, 2016872044u, 0, FABS_TOLERANCE, 0},
+{ 526, 3199349254u, 1019916843u, 3219974785u, 1977881787u, 1051865606u, 1019916843u, 0, FABS_TOLERANCE, 0},
+{ 527, 3199478752u, 2060433318u, 1075872515u, 366073725u, 1051995104u, 2060433318u, 0, FABS_TOLERANCE, 0},
+{ 528, 3191180557u, 1098469906u, 1082900695u, 2349346832u, 1043696909u, 1098469906u, 0, FABS_TOLERANCE, 0},
+{ 529, 3209974707u, 3011196295u, 3252479932u, 2459281672u, 1062491059u, 3011196295u, 0, FABS_TOLERANCE, 0},
+{ 530, 3221334323u, 2843222682u, 1089275809u, 298982001u, 1073850675u, 2843222682u, 0, FABS_TOLERANCE, 0},
+{ 531, 1101737698u, 914741728u, 3203468059u, 2833809843u, 1101737698u, 914741728u, 0, FABS_TOLERANCE, 0},
+{ 532, 3236763878u, 1274901962u, 3241535845u, 3759113509u, 1089280230u, 1274901962u, 0, FABS_TOLERANCE, 0},
+{ 533, 3245916442u, 2134927252u, 3253802671u, 3013731444u, 1098432794u, 2134927252u, 0, FABS_TOLERANCE, 0},
+{ 534, 1099201341u, 2230655177u, 3254510616u, 1249674366u, 1099201341u, 2230655177u, 0, FABS_TOLERANCE, 0},
+{ 535, 1062971253u, 717357389u, 1083533731u, 3746683362u, 1062971253u, 717357389u, 0, FABS_TOLERANCE, 0},
+{ 536, 3213773114u, 834976849u, 3217357661u, 2465861779u, 1066289466u, 834976849u, 0, FABS_TOLERANCE, 0},
+{ 537, 1045656117u, 1385714428u, 1053358395u, 3007113740u, 1045656117u, 1385714428u, 0, FABS_TOLERANCE, 0},
+{ 538, 1050527919u, 599268545u, 3201368210u, 2309854744u, 1050527919u, 599268545u, 0, FABS_TOLERANCE, 0},
+{ 539, 1069954454u, 2840234388u, 3232496515u, 333365983u, 1069954454u, 2840234388u, 0, FABS_TOLERANCE, 0},
+{ 540, 1045922781u, 3136078996u, 3194520860u, 2650572904u, 1045922781u, 3136078996u, 0, FABS_TOLERANCE, 0},
+{ 541, 3233687691u, 2405805086u, 3251640319u, 324233833u, 1086204043u, 2405805086u, 0, FABS_TOLERANCE, 0},
+{ 542, 1106699146u, 2589598340u, 3254677807u, 952438812u, 1106699146u, 2589598340u, 0, FABS_TOLERANCE, 0},
+{ 543, 3189114773u, 1922837702u, 3216892718u, 3535907549u, 1041631125u, 1922837702u, 0, FABS_TOLERANCE, 0},
+{ 544, 3243615868u, 261447440u, 3209805849u, 1150571079u, 1096132220u, 261447440u, 0, FABS_TOLERANCE, 0},
+{ 545, 1095805232u, 4026487528u, 1073152064u, 27340691u, 1095805232u, 4026487528u, 0, FABS_TOLERANCE, 0},
+{ 546, 3229123692u, 338765118u, 1086225786u, 3207238249u, 1081640044u, 338765118u, 0, FABS_TOLERANCE, 0},
+{ 547, 3196182703u, 1085283176u, 3187775111u, 1601194210u, 1048699055u, 1085283176u, 0, FABS_TOLERANCE, 0},
+{ 548, 1091520173u, 3031712790u, 3252307859u, 170666844u, 1091520173u, 3031712790u, 0, FABS_TOLERANCE, 0},
+{ 549, 3218862231u, 3148395674u, 1041913758u, 3306391490u, 1071378583u, 3148395674u, 0, FABS_TOLERANCE, 0},
+{ 550, 3201277070u, 2205233857u, 3208100078u, 3993195511u, 1053793422u, 2205233857u, 0, FABS_TOLERANCE, 0},
+{ 551, 1067699608u, 4282766727u, 1072820377u, 1874778218u, 1067699608u, 4282766727u, 0, FABS_TOLERANCE, 0},
+{ 552, 3210833092u, 2920860798u, 3218070226u, 3104066154u, 1063349444u, 2920860798u, 0, FABS_TOLERANCE, 0},
+{ 553, 3204950351u, 969991373u, 3250596895u, 1734386152u, 1057466703u, 969991373u, 0, FABS_TOLERANCE, 0},
+{ 554, 3238915818u, 1218740205u, 3239802737u, 2610078504u, 1091432170u, 1218740205u, 0, FABS_TOLERANCE, 0},
+{ 555, 3206031242u, 1485218325u, 3220870240u, 3591664613u, 1058547594u, 1485218325u, 0, FABS_TOLERANCE, 0},
+{ 556, 3202074143u, 690157417u, 3190850619u, 4192347699u, 1054590495u, 690157417u, 0, FABS_TOLERANCE, 0},
+{ 557, 1096053810u, 4009839784u, 1079670252u, 394167192u, 1096053810u, 4009839784u, 0, FABS_TOLERANCE, 0},
+{ 558, 3234559237u, 961532417u, 1092588071u, 2923790239u, 1087075589u, 961532417u, 0, FABS_TOLERANCE, 0},
+{ 559, 3203879091u, 4174125604u, 1050682630u, 2169701868u, 1056395443u, 4174125604u, 0, FABS_TOLERANCE, 0},
+{ 560, 3243092475u, 4146748230u, 1087373950u, 2481478351u, 1095608827u, 4146748230u, 0, FABS_TOLERANCE, 0},
+{ 561, 1076987866u, 3984715440u, 1050421618u, 2446142566u, 1076987866u, 3984715440u, 0, FABS_TOLERANCE, 0},
+{ 562, 1084172406u, 936290150u, 1100614426u, 3625806370u, 1084172406u, 936290150u, 0, FABS_TOLERANCE, 0},
+{ 563, 1099787952u, 1866615265u, 3215651428u, 2337013350u, 1099787952u, 1866615265u, 0, FABS_TOLERANCE, 0},
+{ 564, 3253198302u, 712227971u, 1106004723u, 973148499u, 1105714654u, 712227971u, 0, FABS_TOLERANCE, 0},
+{ 565, 3230088199u, 3409813738u, 3244817008u, 1933503498u, 1082604551u, 3409813738u, 0, FABS_TOLERANCE, 0},
+{ 566, 1079943733u, 3180389060u, 3228735703u, 83422217u, 1079943733u, 3180389060u, 0, FABS_TOLERANCE, 0},
+{ 567, 1077878724u, 556972671u, 3204582372u, 841555801u, 1077878724u, 556972671u, 0, FABS_TOLERANCE, 0},
+{ 568, 1070767721u, 4189151332u, 1080874032u, 706326922u, 1070767721u, 4189151332u, 0, FABS_TOLERANCE, 0},
+{ 569, 1096151307u, 198291836u, 1057281892u, 2188836928u, 1096151307u, 198291836u, 0, FABS_TOLERANCE, 0},
+{ 570, 1078091995u, 1219449298u, 3228734687u, 3504562743u, 1078091995u, 1219449298u, 0, FABS_TOLERANCE, 0},
+{ 571, 3204570464u, 1776099219u, 1094316777u, 4188083896u, 1057086816u, 1776099219u, 0, FABS_TOLERANCE, 0},
+{ 572, 3193845708u, 2614400266u, 1073750227u, 3003203347u, 1046362060u, 2614400266u, 0, FABS_TOLERANCE, 0},
+{ 573, 3213982678u, 2959351406u, 1105603716u, 311851587u, 1066499030u, 2959351406u, 0, FABS_TOLERANCE, 0},
+{ 574, 1084544434u, 865443613u, 1097532516u, 3622237781u, 1084544434u, 865443613u, 0, FABS_TOLERANCE, 0},
+{ 575, 3231786666u, 447506102u, 3195759295u, 3603669725u, 1084303018u, 447506102u, 0, FABS_TOLERANCE, 0},
+{ 576, 1097890173u, 3934398273u, 1040996422u, 2968621268u, 1097890173u, 3934398273u, 0, FABS_TOLERANCE, 0},
+{ 577, 3196739825u, 784208771u, 1088764788u, 2182296421u, 1049256177u, 784208771u, 0, FABS_TOLERANCE, 0},
+{ 578, 3248332291u, 1527590526u, 3206961556u, 2823164069u, 1100848643u, 1527590526u, 0, FABS_TOLERANCE, 0},
+{ 579, 3236644131u, 3876699591u, 3207481130u, 4028148535u, 1089160483u, 3876699591u, 0, FABS_TOLERANCE, 0},
+{ 580, 1083576186u, 2164249756u, 1059857743u, 1785169952u, 1083576186u, 2164249756u, 0, FABS_TOLERANCE, 0},
+{ 581, 1091804009u, 2079273665u, 1080303860u, 625760474u, 1091804009u, 2079273665u, 0, FABS_TOLERANCE, 0},
+{ 582, 3226486108u, 3636214836u, 1068367620u, 2932621925u, 1079002460u, 3636214836u, 0, FABS_TOLERANCE, 0},
+{ 583, 1043995372u, 4274131512u, 1047707755u, 92550763u, 1043995372u, 4274131512u, 0, FABS_TOLERANCE, 0},
+{ 584, 3198822121u, 2648933384u, 1084603503u, 3534304873u, 1051338473u, 2648933384u, 0, FABS_TOLERANCE, 0},
+{ 585, 1064563235u, 3216750767u, 3191088629u, 547482628u, 1064563235u, 3216750767u, 0, FABS_TOLERANCE, 0},
+{ 586, 1061084774u, 1420360746u, 1080063101u, 1690029499u, 1061084774u, 1420360746u, 0, FABS_TOLERANCE, 0},
+{ 587, 3229855364u, 1908572179u, 1080112083u, 1228319033u, 1082371716u, 1908572179u, 0, FABS_TOLERANCE, 0},
+{ 588, 1048158178u, 500312015u, 3212368508u, 3864619086u, 1048158178u, 500312015u, 0, FABS_TOLERANCE, 0},
+{ 589, 3221335610u, 4211343447u, 1087492676u, 4272583781u, 1073851962u, 4211343447u, 0, FABS_TOLERANCE, 0},
+{ 590, 1099392394u, 2382118000u, 1042665328u, 567154882u, 1099392394u, 2382118000u, 0, FABS_TOLERANCE, 0},
+{ 591, 1058013442u, 1435344339u, 3216303171u, 2275988178u, 1058013442u, 1435344339u, 0, FABS_TOLERANCE, 0},
+{ 592, 3214538619u, 3403659753u, 3218043030u, 1926480488u, 1067054971u, 3403659753u, 0, FABS_TOLERANCE, 0},
+{ 593, 1076840383u, 1198845185u, 3225556149u, 1130089684u, 1076840383u, 1198845185u, 0, FABS_TOLERANCE, 0},
+{ 594, 3222663042u, 2183928090u, 1048403956u, 963834821u, 1075179394u, 2183928090u, 0, FABS_TOLERANCE, 0},
+{ 595, 1101672960u, 2120625396u, 1041006976u, 2137548527u, 1101672960u, 2120625396u, 0, FABS_TOLERANCE, 0},
+{ 596, 1099230238u, 586700956u, 1059670521u, 303891699u, 1099230238u, 586700956u, 0, FABS_TOLERANCE, 0},
+{ 597, 3218994498u, 2509132460u, 1102827530u, 2205707903u, 1071510850u, 2509132460u, 0, FABS_TOLERANCE, 0},
+{ 598, 3204860597u, 1229308263u, 3209170414u, 4206576047u, 1057376949u, 1229308263u, 0, FABS_TOLERANCE, 0},
+{ 599, 3224076289u, 4078010749u, 3199236456u, 733478972u, 1076592641u, 4078010749u, 0, FABS_TOLERANCE, 0},
+{ 600, 3197712584u, 4277541051u, 3199806921u, 397102023u, 1050228936u, 4277541051u, 0, FABS_TOLERANCE, 0},
+{ 601, 3195975013u, 900999594u, 3234720188u, 2530214248u, 1048491365u, 900999594u, 0, FABS_TOLERANCE, 0},
+{ 602, 1076543548u, 4000609478u, 1096577064u, 4148592328u, 1076543548u, 4000609478u, 0, FABS_TOLERANCE, 0},
+{ 603, 1048668084u, 2154187873u, 3224392607u, 3957250362u, 1048668084u, 2154187873u, 0, FABS_TOLERANCE, 0},
+{ 604, 3223413488u, 2867079200u, 1101870326u, 921212001u, 1075929840u, 2867079200u, 0, FABS_TOLERANCE, 0},
+{ 605, 3233221890u, 674547716u, 1063216239u, 3929755226u, 1085738242u, 674547716u, 0, FABS_TOLERANCE, 0},
+{ 606, 3240415851u, 3158182449u, 1043794244u, 3259056345u, 1092932203u, 3158182449u, 0, FABS_TOLERANCE, 0},
+{ 607, 3236776656u, 3002823940u, 1059511739u, 2832435794u, 1089293008u, 3002823940u, 0, FABS_TOLERANCE, 0},
+{ 608, 3217304822u, 2196511929u, 1049973941u, 3672092877u, 1069821174u, 2196511929u, 0, FABS_TOLERANCE, 0},
+{ 609, 1050438056u, 3655292191u, 1086438127u, 3567072906u, 1050438056u, 3655292191u, 0, FABS_TOLERANCE, 0},
+{ 610, 3243186948u, 1617573614u, 3201863123u, 3090723732u, 1095703300u, 1617573614u, 0, FABS_TOLERANCE, 0},
+{ 611, 3233201380u, 679893506u, 3211547753u, 824081024u, 1085717732u, 679893506u, 0, FABS_TOLERANCE, 0},
+{ 612, 1089530525u, 2285242807u, 1084999409u, 2221731406u, 1089530525u, 2285242807u, 0, FABS_TOLERANCE, 0},
+{ 613, 3206733664u, 1935990727u, 1088822246u, 1058156518u, 1059250016u, 1935990727u, 0, FABS_TOLERANCE, 0},
+{ 614, 1102839166u, 521023584u, 1059186903u, 4245163857u, 1102839166u, 521023584u, 0, FABS_TOLERANCE, 0},
+{ 615, 1103891140u, 2312887617u, 3191771354u, 1885370807u, 1103891140u, 2312887617u, 0, FABS_TOLERANCE, 0},
+{ 616, 3252953815u, 1796441468u, 1100030327u, 2772711004u, 1105470167u, 1796441468u, 0, FABS_TOLERANCE, 0},
+{ 617, 3204276820u, 2095685003u, 1077984448u, 2100773742u, 1056793172u, 2095685003u, 0, FABS_TOLERANCE, 0},
+{ 618, 3192954620u, 2892538035u, 1042396334u, 4162200338u, 1045470972u, 2892538035u, 0, FABS_TOLERANCE, 0},
+{ 619, 3242725751u, 2177698116u, 3227557177u, 150832500u, 1095242103u, 2177698116u, 0, FABS_TOLERANCE, 0},
+{ 620, 3191562216u, 607966734u, 3236250630u, 4164600559u, 1044078568u, 607966734u, 0, FABS_TOLERANCE, 0},
+{ 621, 3216389812u, 2830122967u, 1046096700u, 3713346883u, 1068906164u, 2830122967u, 0, FABS_TOLERANCE, 0},
+{ 622, 3237197963u, 2314640506u, 3203696416u, 3276228872u, 1089714315u, 2314640506u, 0, FABS_TOLERANCE, 0},
+{ 623, 3212912307u, 469331883u, 3249037349u, 2999233437u, 1065428659u, 469331883u, 0, FABS_TOLERANCE, 0},
+{ 624, 1097382011u, 560886625u, 1091899487u, 748795120u, 1097382011u, 560886625u, 0, FABS_TOLERANCE, 0},
+{ 625, 1049886858u, 2958421324u, 1092569414u, 3235243477u, 1049886858u, 2958421324u, 0, FABS_TOLERANCE, 0},
+{ 626, 3193026497u, 3221475559u, 1043038304u, 915608434u, 1045542849u, 3221475559u, 0, FABS_TOLERANCE, 0},
+{ 627, 1071197530u, 3007808652u, 3216682290u, 2531019474u, 1071197530u, 3007808652u, 0, FABS_TOLERANCE, 0},
+{ 628, 3242028999u, 1767658578u, 3237045269u, 2313128318u, 1094545351u, 1767658578u, 0, FABS_TOLERANCE, 0},
+{ 629, 3210617892u, 1926845182u, 1066835624u, 1783256828u, 1063134244u, 1926845182u, 0, FABS_TOLERANCE, 0},
+{ 630, 1040575629u, 90378038u, 1057168870u, 164358218u, 1040575629u, 90378038u, 0, FABS_TOLERANCE, 0},
+{ 631, 1106859172u, 1610524680u, 1085283851u, 2903496007u, 1106859172u, 1610524680u, 0, FABS_TOLERANCE, 0},
+{ 632, 1078635586u, 4274321404u, 3202913591u, 720121831u, 1078635586u, 4274321404u, 0, FABS_TOLERANCE, 0},
+{ 633, 1051205256u, 2034778236u, 1071133763u, 1413236391u, 1051205256u, 2034778236u, 0, FABS_TOLERANCE, 0},
+{ 634, 1051063028u, 1489112261u, 1076691395u, 348210906u, 1051063028u, 1489112261u, 0, FABS_TOLERANCE, 0},
+{ 635, 3206743917u, 2797651324u, 3224410527u, 2374818327u, 1059260269u, 2797651324u, 0, FABS_TOLERANCE, 0},
+{ 636, 1088287256u, 1823161666u, 3197810695u, 3119680047u, 1088287256u, 1823161666u, 0, FABS_TOLERANCE, 0},
+{ 637, 1065927336u, 3420950657u, 1087084743u, 2136638961u, 1065927336u, 3420950657u, 0, FABS_TOLERANCE, 0},
+{ 638, 1069902224u, 3554566429u, 1062907717u, 2736702589u, 1069902224u, 3554566429u, 0, FABS_TOLERANCE, 0},
+{ 639, 3244888667u, 2928437580u, 3187765027u, 1393427873u, 1097405019u, 2928437580u, 0, FABS_TOLERANCE, 0},
+{ 640, 3209301561u, 189447067u, 1051643315u, 828663513u, 1061817913u, 189447067u, 0, FABS_TOLERANCE, 0},
+{ 641, 1052313869u, 2852350928u, 1045683757u, 673354280u, 1052313869u, 2852350928u, 0, FABS_TOLERANCE, 0},
+{ 642, 1043946301u, 3589563265u, 3248741629u, 812657927u, 1043946301u, 3589563265u, 0, FABS_TOLERANCE, 0},
+{ 643, 3190610826u, 1766416701u, 1100392103u, 2185373290u, 1043127178u, 1766416701u, 0, FABS_TOLERANCE, 0},
+{ 644, 3220275389u, 3763582673u, 3191965790u, 388374829u, 1072791741u, 3763582673u, 0, FABS_TOLERANCE, 0},
+{ 645, 1079635136u, 1187403069u, 1075300235u, 336640304u, 1079635136u, 1187403069u, 0, FABS_TOLERANCE, 0},
+{ 646, 1103926251u, 1718795752u, 3243118752u, 683369237u, 1103926251u, 1718795752u, 0, FABS_TOLERANCE, 0},
+{ 647, 3210792097u, 1863545307u, 1069449477u, 3418627399u, 1063308449u, 1863545307u, 0, FABS_TOLERANCE, 0},
+{ 648, 1069601294u, 3295607249u, 1068878592u, 1633297809u, 1069601294u, 3295607249u, 0, FABS_TOLERANCE, 0},
+{ 649, 1058947127u, 2585980994u, 3236670483u, 1286750688u, 1058947127u, 2585980994u, 0, FABS_TOLERANCE, 0},
+{ 650, 1046157033u, 15816845u, 3233249283u, 2491924775u, 1046157033u, 15816845u, 0, FABS_TOLERANCE, 0},
+{ 651, 1042413021u, 1051983351u, 1049180786u, 1474421917u, 1042413021u, 1051983351u, 0, FABS_TOLERANCE, 0},
+{ 652, 3201249525u, 2003816032u, 1086050104u, 668090487u, 1053765877u, 2003816032u, 0, FABS_TOLERANCE, 0},
+{ 653, 1052556037u, 3671484625u, 1067020039u, 430024694u, 1052556037u, 3671484625u, 0, FABS_TOLERANCE, 0},
+{ 654, 1067397110u, 3991830201u, 3207808714u, 1021245839u, 1067397110u, 3991830201u, 0, FABS_TOLERANCE, 0},
+{ 655, 1064194391u, 4255801807u, 3207681716u, 1926756877u, 1064194391u, 4255801807u, 0, FABS_TOLERANCE, 0},
+{ 656, 1052140785u, 4167786896u, 1077097744u, 1775517981u, 1052140785u, 4167786896u, 0, FABS_TOLERANCE, 0},
+{ 657, 1085601978u, 3187518564u, 1082437406u, 944672491u, 1085601978u, 3187518564u, 0, FABS_TOLERANCE, 0},
+{ 658, 1049366282u, 953085192u, 3227310828u, 3459155777u, 1049366282u, 953085192u, 0, FABS_TOLERANCE, 0},
+{ 659, 1069502506u, 1908555460u, 1073640207u, 260441967u, 1069502506u, 1908555460u, 0, FABS_TOLERANCE, 0},
+{ 660, 1067219606u, 250762477u, 1072582645u, 2886742039u, 1067219606u, 250762477u, 0, FABS_TOLERANCE, 0},
+{ 661, 3250906006u, 786180031u, 3197734769u, 2788918312u, 1103422358u, 786180031u, 0, FABS_TOLERANCE, 0},
+{ 662, 3234511827u, 2055912467u, 3244244909u, 1394142937u, 1087028179u, 2055912467u, 0, FABS_TOLERANCE, 0},
+{ 663, 1069612985u, 91984146u, 3222252812u, 4126276047u, 1069612985u, 91984146u, 0, FABS_TOLERANCE, 0},
+{ 664, 1081340139u, 3942715706u, 3239316352u, 410676547u, 1081340139u, 3942715706u, 0, FABS_TOLERANCE, 0},
+{ 665, 3198557846u, 86296211u, 1085850694u, 649202596u, 1051074198u, 86296211u, 0, FABS_TOLERANCE, 0},
+{ 666, 3245366392u, 3069064472u, 3237358008u, 23209276u, 1097882744u, 3069064472u, 0, FABS_TOLERANCE, 0},
+{ 667, 1081235288u, 1867297860u, 1072956607u, 2513414118u, 1081235288u, 1867297860u, 0, FABS_TOLERANCE, 0},
+{ 668, 3250533347u, 3171788768u, 3235208783u, 162138697u, 1103049699u, 3171788768u, 0, FABS_TOLERANCE, 0},
+{ 669, 1081728455u, 1245110700u, 1081653954u, 2584994077u, 1081728455u, 1245110700u, 0, FABS_TOLERANCE, 0},
+{ 670, 3245510120u, 3347226587u, 1058962932u, 2291943376u, 1098026472u, 3347226587u, 0, FABS_TOLERANCE, 0},
+{ 671, 1058899062u, 966940828u, 1060726420u, 2798041096u, 1058899062u, 966940828u, 0, FABS_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1072793759u, 2487340727u, 0, FABS_TOLERANCE, 0},
+{ 673, 3248116497u, 1671039260u, 1086395032u, 3745833360u, 1100632849u, 1671039260u, 0, FABS_TOLERANCE, 0},
+{ 674, 1057078797u, 651714217u, 1047070645u, 2130549237u, 1057078797u, 651714217u, 0, FABS_TOLERANCE, 0},
+{ 675, 3207115731u, 1423000172u, 3247822717u, 1551488170u, 1059632083u, 1423000172u, 0, FABS_TOLERANCE, 0},
+{ 676, 3201597307u, 921077236u, 3213332351u, 1431049019u, 1054113659u, 921077236u, 0, FABS_TOLERANCE, 0},
+{ 677, 1067510295u, 655715547u, 3190985373u, 1527556471u, 1067510295u, 655715547u, 0, FABS_TOLERANCE, 0},
+{ 678, 3227654979u, 4110878657u, 3251297180u, 879739345u, 1080171331u, 4110878657u, 0, FABS_TOLERANCE, 0},
+{ 679, 1085804762u, 2623955764u, 1093699897u, 1216444475u, 1085804762u, 2623955764u, 0, FABS_TOLERANCE, 0},
+{ 680, 1091905603u, 107442539u, 3239767031u, 1149813329u, 1091905603u, 107442539u, 0, FABS_TOLERANCE, 0},
+{ 681, 3233445240u, 1761361082u, 3226030205u, 1121849716u, 1085961592u, 1761361082u, 0, FABS_TOLERANCE, 0},
+{ 682, 3240087115u, 2534144722u, 1044223733u, 3512285706u, 1092603467u, 2534144722u, 0, FABS_TOLERANCE, 0},
+{ 683, 3211846077u, 4073670723u, 1050729852u, 3034818849u, 1064362429u, 4073670723u, 0, FABS_TOLERANCE, 0},
+{ 684, 1101984574u, 1421423503u, 1060278048u, 1397153092u, 1101984574u, 1421423503u, 0, FABS_TOLERANCE, 0},
+{ 685, 3217421829u, 1649206019u, 1104525577u, 1267104290u, 1069938181u, 1649206019u, 0, FABS_TOLERANCE, 0},
+{ 686, 3189302097u, 3775270392u, 1040251850u, 68667319u, 1041818449u, 3775270392u, 0, FABS_TOLERANCE, 0},
+{ 687, 3204330900u, 3099226694u, 3254103006u, 4020102648u, 1056847252u, 3099226694u, 0, FABS_TOLERANCE, 0},
+{ 688, 3201591712u, 3718441177u, 3215643451u, 4032951536u, 1054108064u, 3718441177u, 0, FABS_TOLERANCE, 0},
+{ 689, 1044131371u, 508048351u, 3210196713u, 1707937896u, 1044131371u, 508048351u, 0, FABS_TOLERANCE, 0},
+{ 690, 3198611627u, 2784738160u, 1073435430u, 1109346010u, 1051127979u, 2784738160u, 0, FABS_TOLERANCE, 0},
+{ 691, 3225725290u, 3331916473u, 3238794568u, 2707019594u, 1078241642u, 3331916473u, 0, FABS_TOLERANCE, 0},
+{ 692, 1093182670u, 3093165197u, 1072894805u, 2853215019u, 1093182670u, 3093165197u, 0, FABS_TOLERANCE, 0},
+{ 693, 3216582139u, 2135797997u, 1048399559u, 2941926126u, 1069098491u, 2135797997u, 0, FABS_TOLERANCE, 0},
+{ 694, 1048430980u, 2083412145u, 3249335391u, 507212448u, 1048430980u, 2083412145u, 0, FABS_TOLERANCE, 0},
+{ 695, 1075363751u, 4270176401u, 3246546709u, 3288753319u, 1075363751u, 4270176401u, 0, FABS_TOLERANCE, 0},
+{ 696, 3247932863u, 3692175292u, 3197271515u, 3989064196u, 1100449215u, 3692175292u, 0, FABS_TOLERANCE, 0},
+{ 697, 3251691738u, 3111924274u, 1066772558u, 59281695u, 1104208090u, 3111924274u, 0, FABS_TOLERANCE, 0},
+{ 698, 1067683911u, 2135245466u, 3208804313u, 3846547392u, 1067683911u, 2135245466u, 0, FABS_TOLERANCE, 0},
+{ 699, 1094877811u, 972051266u, 3222814246u, 3539700586u, 1094877811u, 972051266u, 0, FABS_TOLERANCE, 0},
+{ 700, 3202965930u, 330951080u, 1079189813u, 583922384u, 1055482282u, 330951080u, 0, FABS_TOLERANCE, 0},
+{ 701, 1089640092u, 1711944085u, 1104170032u, 643991456u, 1089640092u, 1711944085u, 0, FABS_TOLERANCE, 0},
+{ 702, 3234429549u, 2072550721u, 3250147641u, 4280263530u, 1086945901u, 2072550721u, 0, FABS_TOLERANCE, 0},
+{ 703, 3192972706u, 1566376352u, 1067251433u, 72984588u, 1045489058u, 1566376352u, 0, FABS_TOLERANCE, 0},
+{ 704, 1095276569u, 3103043079u, 1045853123u, 410067497u, 1095276569u, 3103043079u, 0, FABS_TOLERANCE, 0},
+{ 705, 3216672493u, 1910366299u, 1081770885u, 634683073u, 1069188845u, 1910366299u, 0, FABS_TOLERANCE, 0},
+{ 706, 1081530688u, 2226525875u, 3224149290u, 2126302825u, 1081530688u, 2226525875u, 0, FABS_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1073150247u, 1383818978u, 0, FABS_TOLERANCE, 0},
+{ 708, 1066482943u, 1953339096u, 1077176252u, 1476516558u, 1066482943u, 1953339096u, 0, FABS_TOLERANCE, 0},
+{ 709, 1066092000u, 1306277326u, 1079089150u, 4093716191u, 1066092000u, 1306277326u, 0, FABS_TOLERANCE, 0},
+{ 710, 3233148787u, 51750045u, 3242913901u, 4256866157u, 1085665139u, 51750045u, 0, FABS_TOLERANCE, 0},
+{ 711, 3195084967u, 2163853087u, 3232053146u, 2962422808u, 1047601319u, 2163853087u, 0, FABS_TOLERANCE, 0},
+{ 712, 1075516945u, 1618388148u, 3233154824u, 3711953164u, 1075516945u, 1618388148u, 0, FABS_TOLERANCE, 0},
+{ 713, 3246868002u, 357108214u, 3202294604u, 2306775262u, 1099384354u, 357108214u, 0, FABS_TOLERANCE, 0},
+{ 714, 3201904086u, 2571356437u, 3249064063u, 2394851808u, 1054420438u, 2571356437u, 0, FABS_TOLERANCE, 0},
+{ 715, 3230488091u, 4273880094u, 1103698617u, 3578832032u, 1083004443u, 4273880094u, 0, FABS_TOLERANCE, 0},
+{ 716, 3233426701u, 2091068742u, 3228270226u, 3980489730u, 1085943053u, 2091068742u, 0, FABS_TOLERANCE, 0},
+{ 717, 3229016752u, 2772307714u, 1051008486u, 32546576u, 1081533104u, 2772307714u, 0, FABS_TOLERANCE, 0},
+{ 718, 3241229215u, 2143788498u, 3195498043u, 3630119231u, 1093745567u, 2143788498u, 0, FABS_TOLERANCE, 0},
+{ 719, 3198632935u, 2527385594u, 3240503648u, 3482095012u, 1051149287u, 2527385594u, 0, FABS_TOLERANCE, 0},
+{ 720, 3242168799u, 2690097362u, 1068598730u, 2360266862u, 1094685151u, 2690097362u, 0, FABS_TOLERANCE, 0},
+{ 721, 1058857869u, 2673272949u, 1082639557u, 522449749u, 1058857869u, 2673272949u, 0, FABS_TOLERANCE, 0},
+{ 722, 1104424147u, 3596379400u, 3242016775u, 2002293002u, 1104424147u, 3596379400u, 0, FABS_TOLERANCE, 0},
+{ 723, 1099439656u, 4113224369u, 3222122439u, 2152316893u, 1099439656u, 4113224369u, 0, FABS_TOLERANCE, 0},
+{ 724, 3220796716u, 31662602u, 1047721249u, 1747087514u, 1073313068u, 31662602u, 0, FABS_TOLERANCE, 0},
+{ 725, 3250463757u, 2489659568u, 1097051253u, 277506957u, 1102980109u, 2489659568u, 0, FABS_TOLERANCE, 0},
+{ 726, 3191401834u, 3850162281u, 3213841942u, 438724093u, 1043918186u, 3850162281u, 0, FABS_TOLERANCE, 0},
+{ 727, 1095392535u, 2431814052u, 1075518084u, 2672434118u, 1095392535u, 2431814052u, 0, FABS_TOLERANCE, 0},
+{ 728, 3243162735u, 391606792u, 1048184750u, 4168944276u, 1095679087u, 391606792u, 0, FABS_TOLERANCE, 0},
+{ 729, 3247792416u, 457529672u, 3201090276u, 72407935u, 1100308768u, 457529672u, 0, FABS_TOLERANCE, 0},
+{ 730, 3218720719u, 3954981400u, 1052053242u, 2411049585u, 1071237071u, 3954981400u, 0, FABS_TOLERANCE, 0},
+{ 731, 1086180091u, 485456950u, 1088415093u, 1655397424u, 1086180091u, 485456950u, 0, FABS_TOLERANCE, 0},
+{ 732, 3198234428u, 1551748070u, 3236871640u, 1329701152u, 1050750780u, 1551748070u, 0, FABS_TOLERANCE, 0},
+{ 733, 3224639122u, 3099222537u, 1104984570u, 4293792842u, 1077155474u, 3099222537u, 0, FABS_TOLERANCE, 0},
+{ 734, 3203949705u, 3603065260u, 3197735968u, 2402359253u, 1056466057u, 3603065260u, 0, FABS_TOLERANCE, 0},
+{ 735, 3198824584u, 3961208159u, 3219057584u, 2340553876u, 1051340936u, 3961208159u, 0, FABS_TOLERANCE, 0},
+{ 736, 1074881909u, 4014841779u, 3197672877u, 3697233334u, 1074881909u, 4014841779u, 0, FABS_TOLERANCE, 0},
+{ 737, 3213275657u, 1403876392u, 3254028950u, 921363393u, 1065792009u, 1403876392u, 0, FABS_TOLERANCE, 0},
+{ 738, 1107251806u, 1862576361u, 3194031708u, 2476290925u, 1107251806u, 1862576361u, 0, FABS_TOLERANCE, 0},
+{ 739, 1049661768u, 1454212851u, 1088378861u, 3400401866u, 1049661768u, 1454212851u, 0, FABS_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 1074406809u, 552676385u, 0, FABS_TOLERANCE, 0},
+{ 741, 3216409282u, 1199568671u, 3225679997u, 46947405u, 1068925634u, 1199568671u, 0, FABS_TOLERANCE, 0},
+{ 742, 1077685537u, 2596231448u, 3253943728u, 2219151748u, 1077685537u, 2596231448u, 0, FABS_TOLERANCE, 0},
+{ 743, 1066527035u, 4119719558u, 3222036299u, 1275474618u, 1066527035u, 4119719558u, 0, FABS_TOLERANCE, 0},
+{ 744, 3239908663u, 3347296825u, 1101507910u, 1254014794u, 1092425015u, 3347296825u, 0, FABS_TOLERANCE, 0},
+{ 745, 1084119992u, 673775040u, 1070743626u, 244126093u, 1084119992u, 673775040u, 0, FABS_TOLERANCE, 0},
+{ 746, 3203199850u, 1832066983u, 1051358028u, 3262483417u, 1055716202u, 1832066983u, 0, FABS_TOLERANCE, 0},
+{ 747, 1077559600u, 3962610501u, 3198598777u, 849269178u, 1077559600u, 3962610501u, 0, FABS_TOLERANCE, 0},
+{ 748, 3235473900u, 2497516122u, 3254374111u, 2821429629u, 1087990252u, 2497516122u, 0, FABS_TOLERANCE, 0},
+{ 749, 1076236288u, 2805941787u, 3217785843u, 779131141u, 1076236288u, 2805941787u, 0, FABS_TOLERANCE, 0},
+{ 750, 3226908686u, 723423605u, 1084533420u, 627282213u, 1079425038u, 723423605u, 0, FABS_TOLERANCE, 0},
+{ 751, 3215947680u, 4292778869u, 1078101071u, 1676860147u, 1068464032u, 4292778869u, 0, FABS_TOLERANCE, 0},
+{ 752, 1076288502u, 3528118587u, 3194648564u, 2363260897u, 1076288502u, 3528118587u, 0, FABS_TOLERANCE, 0},
+{ 753, 3192897879u, 1307010018u, 1061248120u, 1468743108u, 1045414231u, 1307010018u, 0, FABS_TOLERANCE, 0},
+{ 754, 3246583139u, 107905661u, 3226089788u, 1943427674u, 1099099491u, 107905661u, 0, FABS_TOLERANCE, 0},
+{ 755, 3188230541u, 760006940u, 1054265604u, 1749976597u, 1040746893u, 760006940u, 0, FABS_TOLERANCE, 0},
+{ 756, 3237773384u, 2787503556u, 1081282610u, 1195841206u, 1090289736u, 2787503556u, 0, FABS_TOLERANCE, 0},
+{ 757, 3191802156u, 545462045u, 3208381743u, 1981311808u, 1044318508u, 545462045u, 0, FABS_TOLERANCE, 0},
+{ 758, 1061232136u, 3657978397u, 1104463616u, 3501253426u, 1061232136u, 3657978397u, 0, FABS_TOLERANCE, 0},
+{ 759, 1049883857u, 1804177501u, 3210693633u, 3606766729u, 1049883857u, 1804177501u, 0, FABS_TOLERANCE, 0},
+{ 760, 1076856879u, 1336278526u, 1043741618u, 3165279431u, 1076856879u, 1336278526u, 0, FABS_TOLERANCE, 0},
+{ 761, 1055471915u, 1599382075u, 1058018527u, 4212580517u, 1055471915u, 1599382075u, 0, FABS_TOLERANCE, 0},
+{ 762, 3207502326u, 3007589929u, 3202026547u, 2792028313u, 1060018678u, 3007589929u, 0, FABS_TOLERANCE, 0},
+{ 763, 3253082770u, 1866066996u, 1060329048u, 3727175322u, 1105599122u, 1866066996u, 0, FABS_TOLERANCE, 0},
+{ 764, 3198416643u, 150890940u, 1056025306u, 3082724735u, 1050932995u, 150890940u, 0, FABS_TOLERANCE, 0},
+{ 765, 1062008939u, 80400395u, 1093584426u, 3478941315u, 1062008939u, 80400395u, 0, FABS_TOLERANCE, 0},
+{ 766, 3251640614u, 4050954182u, 3219263194u, 2537475930u, 1104156966u, 4050954182u, 0, FABS_TOLERANCE, 0},
+{ 767, 1064841871u, 2881752155u, 3212589299u, 2559651278u, 1064841871u, 2881752155u, 0, FABS_TOLERANCE, 0},
+{ 768, 3249016304u, 440309030u, 3214267461u, 3788040806u, 1101532656u, 440309030u, 0, FABS_TOLERANCE, 0},
+{ 769, 1100476615u, 918813144u, 3208535698u, 1607035904u, 1100476615u, 918813144u, 0, FABS_TOLERANCE, 0},
+{ 770, 1042137451u, 2497054124u, 1089139147u, 2549609010u, 1042137451u, 2497054124u, 0, FABS_TOLERANCE, 0},
+{ 771, 1047037641u, 790219083u, 1054657139u, 2797979479u, 1047037641u, 790219083u, 0, FABS_TOLERANCE, 0},
+{ 772, 1057781400u, 1149462078u, 1095765205u, 3879963182u, 1057781400u, 1149462078u, 0, FABS_TOLERANCE, 0},
+{ 773, 3202729813u, 2684353926u, 3205212854u, 1732474928u, 1055246165u, 2684353926u, 0, FABS_TOLERANCE, 0},
+{ 774, 1095236965u, 2742237025u, 1051317716u, 3386396147u, 1095236965u, 2742237025u, 0, FABS_TOLERANCE, 0},
+{ 775, 1063230986u, 3408320912u, 1103071166u, 4233059513u, 1063230986u, 3408320912u, 0, FABS_TOLERANCE, 0},
+{ 776, 1064863548u, 1077495917u, 1088399968u, 433115118u, 1064863548u, 1077495917u, 0, FABS_TOLERANCE, 0},
+{ 777, 3204547572u, 841366493u, 1051716814u, 4121125128u, 1057063924u, 841366493u, 0, FABS_TOLERANCE, 0},
+{ 778, 1064632084u, 321857207u, 1089128010u, 1149988239u, 1064632084u, 321857207u, 0, FABS_TOLERANCE, 0},
+{ 779, 3245542663u, 799866606u, 3197637091u, 3924438208u, 1098059015u, 799866606u, 0, FABS_TOLERANCE, 0},
+{ 780, 3191062890u, 2002049816u, 1077053447u, 2240354761u, 1043579242u, 2002049816u, 0, FABS_TOLERANCE, 0},
+{ 781, 3229006283u, 478939968u, 1097035749u, 1066716440u, 1081522635u, 478939968u, 0, FABS_TOLERANCE, 0},
+{ 782, 3232473641u, 1653104725u, 1088548129u, 81977716u, 1084989993u, 1653104725u, 0, FABS_TOLERANCE, 0},
+{ 783, 3196861276u, 3899475018u, 3189694084u, 3330093036u, 1049377628u, 3899475018u, 0, FABS_TOLERANCE, 0},
+{ 784, 1089312583u, 2612450289u, 1079065127u, 603380842u, 1089312583u, 2612450289u, 0, FABS_TOLERANCE, 0},
+{ 785, 1100636791u, 3962735564u, 1101570429u, 1372490825u, 1100636791u, 3962735564u, 0, FABS_TOLERANCE, 0},
+{ 786, 1054806016u, 1479841439u, 1059312257u, 541504905u, 1054806016u, 1479841439u, 0, FABS_TOLERANCE, 0},
+{ 787, 1078662178u, 2626148789u, 1057571099u, 4121656076u, 1078662178u, 2626148789u, 0, FABS_TOLERANCE, 0},
+{ 788, 1081613389u, 1902560314u, 1043130231u, 3557671562u, 1081613389u, 1902560314u, 0, FABS_TOLERANCE, 0},
+{ 789, 3193829772u, 41779312u, 1081626342u, 831171823u, 1046346124u, 41779312u, 0, FABS_TOLERANCE, 0},
+{ 790, 1058131100u, 1393168821u, 1066457405u, 1381616968u, 1058131100u, 1393168821u, 0, FABS_TOLERANCE, 0},
+{ 791, 1072338141u, 3756584649u, 3222267229u, 1423157432u, 1072338141u, 3756584649u, 0, FABS_TOLERANCE, 0},
+{ 792, 3254435674u, 1894912556u, 1042426694u, 155024547u, 1106952026u, 1894912556u, 0, FABS_TOLERANCE, 0},
+{ 793, 3195453512u, 35164295u, 3203391785u, 1037041084u, 1047969864u, 35164295u, 0, FABS_TOLERANCE, 0},
+{ 794, 1084777479u, 3957875950u, 3232195211u, 1590756436u, 1084777479u, 3957875950u, 0, FABS_TOLERANCE, 0},
+{ 795, 1068844322u, 1447585080u, 1071279485u, 1107922438u, 1068844322u, 1447585080u, 0, FABS_TOLERANCE, 0},
+{ 796, 1046252518u, 981897615u, 1051856116u, 430357614u, 1046252518u, 981897615u, 0, FABS_TOLERANCE, 0},
+{ 797, 3227524215u, 395145384u, 3219821938u, 50586510u, 1080040567u, 395145384u, 0, FABS_TOLERANCE, 0},
+{ 798, 1069775912u, 750827797u, 1082862669u, 230466783u, 1069775912u, 750827797u, 0, FABS_TOLERANCE, 0},
+{ 799, 1086668819u, 1365083575u, 3204848310u, 1700831722u, 1086668819u, 1365083575u, 0, FABS_TOLERANCE, 0},
+{ 800, 3218090390u, 344241827u, 1071538935u, 2715566077u, 1070606742u, 344241827u, 0, FABS_TOLERANCE, 0},
+{ 801, 3247582856u, 4069301823u, 3193208760u, 2949125229u, 1100099208u, 4069301823u, 0, FABS_TOLERANCE, 0},
+{ 802, 1103231387u, 3585711710u, 1065801594u, 2302229267u, 1103231387u, 3585711710u, 0, FABS_TOLERANCE, 0},
+{ 803, 3194118956u, 709803845u, 1048741487u, 2296910194u, 1046635308u, 709803845u, 0, FABS_TOLERANCE, 0},
+{ 804, 3193280779u, 744421179u, 1069302001u, 2659232829u, 1045797131u, 744421179u, 0, FABS_TOLERANCE, 0},
+{ 805, 1092835968u, 1799949903u, 3192522886u, 4212149209u, 1092835968u, 1799949903u, 0, FABS_TOLERANCE, 0},
+{ 806, 3206108502u, 145234164u, 3250614064u, 912384201u, 1058624854u, 145234164u, 0, FABS_TOLERANCE, 0},
+{ 807, 3240510664u, 2784620507u, 1102812948u, 3531481022u, 1093027016u, 2784620507u, 0, FABS_TOLERANCE, 0},
+{ 808, 3251159663u, 383952592u, 3205659905u, 3633194728u, 1103676015u, 383952592u, 0, FABS_TOLERANCE, 0},
+{ 809, 3203476252u, 3792395543u, 1070072378u, 3864816376u, 1055992604u, 3792395543u, 0, FABS_TOLERANCE, 0},
+{ 810, 3205316273u, 2115553675u, 1066288499u, 3538377867u, 1057832625u, 2115553675u, 0, FABS_TOLERANCE, 0},
+{ 811, 3252075185u, 1230026762u, 1090719723u, 440819880u, 1104591537u, 1230026762u, 0, FABS_TOLERANCE, 0},
+{ 812, 3194595076u, 2991290482u, 1096886719u, 1097971167u, 1047111428u, 2991290482u, 0, FABS_TOLERANCE, 0},
+{ 813, 1090048600u, 1098035020u, 3230900504u, 1479059095u, 1090048600u, 1098035020u, 0, FABS_TOLERANCE, 0},
+{ 814, 3251056964u, 1719428427u, 3188631907u, 3707377409u, 1103573316u, 1719428427u, 0, FABS_TOLERANCE, 0},
+{ 815, 1053236165u, 3748932896u, 1084908557u, 1325384361u, 1053236165u, 3748932896u, 0, FABS_TOLERANCE, 0},
+{ 816, 1084704076u, 3979168763u, 1057455255u, 2454615952u, 1084704076u, 3979168763u, 0, FABS_TOLERANCE, 0},
+{ 817, 1053106984u, 1449164578u, 1056960316u, 1654931641u, 1053106984u, 1449164578u, 0, FABS_TOLERANCE, 0},
+{ 818, 1071439010u, 2120487381u, 3226298974u, 2364226633u, 1071439010u, 2120487381u, 0, FABS_TOLERANCE, 0},
+{ 819, 1075071428u, 1074268944u, 1065730444u, 280016852u, 1075071428u, 1074268944u, 0, FABS_TOLERANCE, 0},
+{ 820, 3200308256u, 3315127889u, 3236295594u, 2900924954u, 1052824608u, 3315127889u, 0, FABS_TOLERANCE, 0},
+{ 821, 3196425891u, 2246037502u, 1049691002u, 1496066550u, 1048942243u, 2246037502u, 0, FABS_TOLERANCE, 0},
+{ 822, 3193006859u, 4191285446u, 3217936236u, 2382392789u, 1045523211u, 4191285446u, 0, FABS_TOLERANCE, 0},
+{ 823, 1092833308u, 640099844u, 1042152237u, 2064279383u, 1092833308u, 640099844u, 0, FABS_TOLERANCE, 0},
+{ 824, 1079913438u, 3468560824u, 1093251038u, 310958750u, 1079913438u, 3468560824u, 0, FABS_TOLERANCE, 0},
+{ 825, 1096788400u, 1413568905u, 1100941106u, 1627289946u, 1096788400u, 1413568905u, 0, FABS_TOLERANCE, 0},
+{ 826, 3191549550u, 3797143370u, 3195497539u, 3843275034u, 1044065902u, 3797143370u, 0, FABS_TOLERANCE, 0},
+{ 827, 3252077393u, 2806642640u, 3201943068u, 2515980718u, 1104593745u, 2806642640u, 0, FABS_TOLERANCE, 0},
+{ 828, 1086877316u, 632580632u, 1078673506u, 3259601317u, 1086877316u, 632580632u, 0, FABS_TOLERANCE, 0},
+{ 829, 3200980575u, 3309678799u, 1049337078u, 3056787074u, 1053496927u, 3309678799u, 0, FABS_TOLERANCE, 0},
+{ 830, 3221495289u, 2341164249u, 1080834967u, 2810890005u, 1074011641u, 2341164249u, 0, FABS_TOLERANCE, 0},
+{ 831, 1067019674u, 932124675u, 1093915797u, 662682630u, 1067019674u, 932124675u, 0, FABS_TOLERANCE, 0},
+{ 832, 3249230091u, 1367996113u, 3251723684u, 2974064663u, 1101746443u, 1367996113u, 0, FABS_TOLERANCE, 0},
+{ 833, 1080230731u, 323437999u, 1090499064u, 901457511u, 1080230731u, 323437999u, 0, FABS_TOLERANCE, 0},
+{ 834, 3235778876u, 4184941840u, 3196770014u, 2458988443u, 1088295228u, 4184941840u, 0, FABS_TOLERANCE, 0},
+{ 835, 1087618284u, 2023065054u, 3211994098u, 2734612965u, 1087618284u, 2023065054u, 0, FABS_TOLERANCE, 0},
+{ 836, 1064074694u, 3679267365u, 3237728785u, 1699558211u, 1064074694u, 3679267365u, 0, FABS_TOLERANCE, 0},
+{ 837, 1088079010u, 1826799031u, 1078709629u, 3986905229u, 1088079010u, 1826799031u, 0, FABS_TOLERANCE, 0},
+{ 838, 1052843785u, 351061688u, 3194386466u, 4105857588u, 1052843785u, 351061688u, 0, FABS_TOLERANCE, 0},
+{ 839, 1054128006u, 1365244058u, 1064457319u, 1452191426u, 1054128006u, 1365244058u, 0, FABS_TOLERANCE, 0},
+{ 840, 1064122385u, 2463030625u, 3215975031u, 3773488326u, 1064122385u, 2463030625u, 0, FABS_TOLERANCE, 0},
+{ 841, 3251276671u, 752664055u, 1065110394u, 1835931663u, 1103793023u, 752664055u, 0, FABS_TOLERANCE, 0},
+{ 842, 1088045088u, 3496172149u, 1089617208u, 109068701u, 1088045088u, 3496172149u, 0, FABS_TOLERANCE, 0},
+{ 843, 3198135087u, 1636966254u, 1086098766u, 2016598298u, 1050651439u, 1636966254u, 0, FABS_TOLERANCE, 0},
+{ 844, 1050931318u, 3551516956u, 1097969102u, 1317953425u, 1050931318u, 3551516956u, 0, FABS_TOLERANCE, 0},
+{ 845, 3229832217u, 2977627788u, 1045339018u, 516058480u, 1082348569u, 2977627788u, 0, FABS_TOLERANCE, 0},
+{ 846, 3237408578u, 3901731263u, 3189566462u, 32272932u, 1089924930u, 3901731263u, 0, FABS_TOLERANCE, 0},
+{ 847, 1077281796u, 1956025297u, 3246628529u, 3840733905u, 1077281796u, 1956025297u, 0, FABS_TOLERANCE, 0},
+{ 848, 1099818036u, 561057891u, 3198494340u, 4271027193u, 1099818036u, 561057891u, 0, FABS_TOLERANCE, 0},
+{ 849, 3250929921u, 692989850u, 3242630588u, 2492225971u, 1103446273u, 692989850u, 0, FABS_TOLERANCE, 0},
+{ 850, 3205479397u, 3439913962u, 1067477011u, 2973333638u, 1057995749u, 3439913962u, 0, FABS_TOLERANCE, 0},
+{ 851, 3213993989u, 877613377u, 1044917899u, 809672798u, 1066510341u, 877613377u, 0, FABS_TOLERANCE, 0},
+{ 852, 3222171454u, 905426932u, 1046417457u, 1086320855u, 1074687806u, 905426932u, 0, FABS_TOLERANCE, 0},
+{ 853, 3246346629u, 2645567288u, 1051258339u, 557182478u, 1098862981u, 2645567288u, 0, FABS_TOLERANCE, 0},
+{ 854, 3204057950u, 186287752u, 1061342054u, 4054003419u, 1056574302u, 186287752u, 0, FABS_TOLERANCE, 0},
+{ 855, 1097266673u, 3506889716u, 3243866036u, 519056371u, 1097266673u, 3506889716u, 0, FABS_TOLERANCE, 0},
+{ 856, 1042654053u, 2171898436u, 3246911982u, 1091500784u, 1042654053u, 2171898436u, 0, FABS_TOLERANCE, 0},
+{ 857, 3243647673u, 368493885u, 3222871893u, 1419055230u, 1096164025u, 368493885u, 0, FABS_TOLERANCE, 0},
+{ 858, 1091950572u, 2010971245u, 3188804530u, 1518695799u, 1091950572u, 2010971245u, 0, FABS_TOLERANCE, 0},
+{ 859, 3205426509u, 1239207795u, 1040192984u, 2199481342u, 1057942861u, 1239207795u, 0, FABS_TOLERANCE, 0},
+{ 860, 3210978637u, 4264613432u, 3203460972u, 3558930895u, 1063494989u, 4264613432u, 0, FABS_TOLERANCE, 0},
+{ 861, 1050299283u, 3772748958u, 3227667376u, 309688336u, 1050299283u, 3772748958u, 0, FABS_TOLERANCE, 0},
+{ 862, 3230743041u, 1077949160u, 1075769893u, 2405271377u, 1083259393u, 1077949160u, 0, FABS_TOLERANCE, 0},
+{ 863, 1091835152u, 3751608506u, 3232278094u, 930375071u, 1091835152u, 3751608506u, 0, FABS_TOLERANCE, 0},
+{ 864, 3198617153u, 1518334131u, 3205247482u, 791756713u, 1051133505u, 1518334131u, 0, FABS_TOLERANCE, 0},
+{ 865, 1047317453u, 2825203170u, 3245054001u, 1822981827u, 1047317453u, 2825203170u, 0, FABS_TOLERANCE, 0},
+{ 866, 1100016363u, 514474738u, 1089072073u, 3300845441u, 1100016363u, 514474738u, 0, FABS_TOLERANCE, 0},
+{ 867, 3216391250u, 247369460u, 3197320093u, 687450958u, 1068907602u, 247369460u, 0, FABS_TOLERANCE, 0},
+{ 868, 1104161422u, 2722237629u, 1058272368u, 90602316u, 1104161422u, 2722237629u, 0, FABS_TOLERANCE, 0},
+{ 869, 3208098435u, 1845900544u, 3231520830u, 3389751458u, 1060614787u, 1845900544u, 0, FABS_TOLERANCE, 0},
+{ 870, 3247535245u, 737689911u, 3195377751u, 3462616966u, 1100051597u, 737689911u, 0, FABS_TOLERANCE, 0},
+{ 871, 3223538384u, 3620285831u, 1055501023u, 2708056059u, 1076054736u, 3620285831u, 0, FABS_TOLERANCE, 0},
+{ 872, 3219464996u, 4073430285u, 1056206159u, 172017902u, 1071981348u, 4073430285u, 0, FABS_TOLERANCE, 0},
+{ 873, 3212869638u, 2799176222u, 1052706894u, 4083892667u, 1065385990u, 2799176222u, 0, FABS_TOLERANCE, 0},
+{ 874, 3202279557u, 1562351330u, 1069705601u, 1247765260u, 1054795909u, 1562351330u, 0, FABS_TOLERANCE, 0},
+{ 875, 3232717299u, 51853475u, 3189080201u, 2783553144u, 1085233651u, 51853475u, 0, FABS_TOLERANCE, 0},
+{ 876, 3219454353u, 3851781549u, 3241598113u, 514064046u, 1071970705u, 3851781549u, 0, FABS_TOLERANCE, 0},
+{ 877, 1100045965u, 934745487u, 3248182437u, 2798581921u, 1100045965u, 934745487u, 0, FABS_TOLERANCE, 0},
+{ 878, 3213082493u, 2948648757u, 3232177250u, 4278702895u, 1065598845u, 2948648757u, 0, FABS_TOLERANCE, 0},
+{ 879, 1072485724u, 4259101461u, 1061606772u, 84229920u, 1072485724u, 4259101461u, 0, FABS_TOLERANCE, 0},
+{ 880, 3198075559u, 3891230598u, 1095924595u, 3049217547u, 1050591911u, 3891230598u, 0, FABS_TOLERANCE, 0},
+{ 881, 1077353053u, 3806018919u, 3243191216u, 280177341u, 1077353053u, 3806018919u, 0, FABS_TOLERANCE, 0},
+{ 882, 1060624530u, 3900344258u, 1063647809u, 4206745890u, 1060624530u, 3900344258u, 0, FABS_TOLERANCE, 0},
+{ 883, 3227707336u, 2126253040u, 3207248026u, 808507485u, 1080223688u, 2126253040u, 0, FABS_TOLERANCE, 0},
+{ 884, 1086090317u, 3465685634u, 3230391053u, 3754958214u, 1086090317u, 3465685634u, 0, FABS_TOLERANCE, 0},
+{ 885, 1102861084u, 461094531u, 1101110393u, 1316091396u, 1102861084u, 461094531u, 0, FABS_TOLERANCE, 0},
+{ 886, 1064980314u, 4197635149u, 1091873113u, 1240127141u, 1064980314u, 4197635149u, 0, FABS_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 1074333893u, 118603800u, 0, FABS_TOLERANCE, 0},
+{ 888, 3213429165u, 3744663425u, 3212482771u, 953662066u, 1065945517u, 3744663425u, 0, FABS_TOLERANCE, 0},
+{ 889, 1085171305u, 3564196690u, 3228101916u, 904305212u, 1085171305u, 3564196690u, 0, FABS_TOLERANCE, 0},
+{ 890, 1048333111u, 3566257266u, 3235138829u, 2734275140u, 1048333111u, 3566257266u, 0, FABS_TOLERANCE, 0},
+{ 891, 3243948477u, 606044282u, 3241318094u, 2446416887u, 1096464829u, 606044282u, 0, FABS_TOLERANCE, 0},
+{ 892, 1041627284u, 2336116589u, 3197594053u, 2296925138u, 1041627284u, 2336116589u, 0, FABS_TOLERANCE, 0},
+{ 893, 1058567659u, 907670625u, 3240769036u, 1827119006u, 1058567659u, 907670625u, 0, FABS_TOLERANCE, 0},
+{ 894, 1044467183u, 2818710946u, 3246059905u, 553394170u, 1044467183u, 2818710946u, 0, FABS_TOLERANCE, 0},
+{ 895, 3189504094u, 4099522736u, 3232742168u, 3718083858u, 1042020446u, 4099522736u, 0, FABS_TOLERANCE, 0},
+{ 896, 1092371276u, 1059279404u, 1080245336u, 175941677u, 1092371276u, 1059279404u, 0, FABS_TOLERANCE, 0},
+{ 897, 1105189691u, 1650862428u, 1061816101u, 1723201723u, 1105189691u, 1650862428u, 0, FABS_TOLERANCE, 0},
+{ 898, 3239012814u, 2462163405u, 3218946201u, 3876535372u, 1091529166u, 2462163405u, 0, FABS_TOLERANCE, 0},
+{ 899, 1084392886u, 495844137u, 1073721460u, 772777946u, 1084392886u, 495844137u, 0, FABS_TOLERANCE, 0},
+{ 900, 1052415330u, 458757721u, 3245680321u, 3609892707u, 1052415330u, 458757721u, 0, FABS_TOLERANCE, 0},
+{ 901, 3193282956u, 2533012202u, 1079980803u, 3592268374u, 1045799308u, 2533012202u, 0, FABS_TOLERANCE, 0},
+{ 902, 3203364780u, 4108274117u, 1063045844u, 571992389u, 1055881132u, 4108274117u, 0, FABS_TOLERANCE, 0},
+{ 903, 1090567271u, 3541110973u, 1096296754u, 3118427427u, 1090567271u, 3541110973u, 0, FABS_TOLERANCE, 0},
+{ 904, 3193980043u, 1213941007u, 1105433735u, 2172963370u, 1046496395u, 1213941007u, 0, FABS_TOLERANCE, 0},
+{ 905, 1096853359u, 272190288u, 1095452370u, 4026581530u, 1096853359u, 272190288u, 0, FABS_TOLERANCE, 0},
+{ 906, 1095583909u, 2843638672u, 1100510986u, 3190536898u, 1095583909u, 2843638672u, 0, FABS_TOLERANCE, 0},
+{ 907, 1083757094u, 2014317727u, 3247389683u, 2428462015u, 1083757094u, 2014317727u, 0, FABS_TOLERANCE, 0},
+{ 908, 1093976717u, 688442200u, 1047852515u, 3035186380u, 1093976717u, 688442200u, 0, FABS_TOLERANCE, 0},
+{ 909, 1076664212u, 1010095511u, 3221288076u, 405287991u, 1076664212u, 1010095511u, 0, FABS_TOLERANCE, 0},
+{ 910, 3252294615u, 2983070435u, 1089546472u, 2907918480u, 1104810967u, 2983070435u, 0, FABS_TOLERANCE, 0},
+{ 911, 1082988121u, 81928569u, 1056007286u, 2740556321u, 1082988121u, 81928569u, 0, FABS_TOLERANCE, 0},
+{ 912, 1041110867u, 2076689028u, 1081558619u, 3039159031u, 1041110867u, 2076689028u, 0, FABS_TOLERANCE, 0},
+{ 913, 1047307438u, 1376882094u, 3211003208u, 1296286481u, 1047307438u, 1376882094u, 0, FABS_TOLERANCE, 0},
+{ 914, 1080114314u, 744133164u, 3200943494u, 955832216u, 1080114314u, 744133164u, 0, FABS_TOLERANCE, 0},
+{ 915, 3226290326u, 176522478u, 1069999908u, 2891249491u, 1078806678u, 176522478u, 0, FABS_TOLERANCE, 0},
+{ 916, 1043564602u, 3685851715u, 3187829932u, 2363997529u, 1043564602u, 3685851715u, 0, FABS_TOLERANCE, 0},
+{ 917, 1040244055u, 3974431579u, 1052505165u, 2589067816u, 1040244055u, 3974431579u, 0, FABS_TOLERANCE, 0},
+{ 918, 3191496789u, 3819109588u, 1048561488u, 969143351u, 1044013141u, 3819109588u, 0, FABS_TOLERANCE, 0},
+{ 919, 1072639397u, 4246896124u, 1104584799u, 1940097860u, 1072639397u, 4246896124u, 0, FABS_TOLERANCE, 0},
+{ 920, 1048038468u, 2228686199u, 3220231833u, 777624847u, 1048038468u, 2228686199u, 0, FABS_TOLERANCE, 0},
+{ 921, 3231467306u, 4189906558u, 3203004203u, 854242364u, 1083983658u, 4189906558u, 0, FABS_TOLERANCE, 0},
+{ 922, 1103910407u, 4089051094u, 3227282692u, 2693170723u, 1103910407u, 4089051094u, 0, FABS_TOLERANCE, 0},
+{ 923, 1045883607u, 1278581412u, 3239296746u, 1774588717u, 1045883607u, 1278581412u, 0, FABS_TOLERANCE, 0},
+{ 924, 3222372686u, 1794845306u, 1104879344u, 4135865182u, 1074889038u, 1794845306u, 0, FABS_TOLERANCE, 0},
+{ 925, 1106449055u, 754938390u, 1061291430u, 2010786993u, 1106449055u, 754938390u, 0, FABS_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 1073581409u, 2034303731u, 0, FABS_TOLERANCE, 0},
+{ 927, 3231449194u, 567588900u, 3195452230u, 1421366017u, 1083965546u, 567588900u, 0, FABS_TOLERANCE, 0},
+{ 928, 3225089755u, 2708717091u, 1071975971u, 1364590470u, 1077606107u, 2708717091u, 0, FABS_TOLERANCE, 0},
+{ 929, 3252137283u, 3461956134u, 3207820115u, 1605709634u, 1104653635u, 3461956134u, 0, FABS_TOLERANCE, 0},
+{ 930, 1065302996u, 1497124553u, 1051715442u, 916736957u, 1065302996u, 1497124553u, 0, FABS_TOLERANCE, 0},
+{ 931, 1058468363u, 834914365u, 1064667143u, 2839166298u, 1058468363u, 834914365u, 0, FABS_TOLERANCE, 0},
+{ 932, 1057279949u, 2139295776u, 1062816721u, 914592523u, 1057279949u, 2139295776u, 0, FABS_TOLERANCE, 0},
+{ 933, 3189636931u, 851569132u, 1058503154u, 1399378677u, 1042153283u, 851569132u, 0, FABS_TOLERANCE, 0},
+{ 934, 3233537697u, 3897202342u, 3245382590u, 246600375u, 1086054049u, 3897202342u, 0, FABS_TOLERANCE, 0},
+{ 935, 3225460308u, 3620429520u, 1055627557u, 229305u, 1077976660u, 3620429520u, 0, FABS_TOLERANCE, 0},
+{ 936, 1083958833u, 3641997865u, 3206673888u, 93720614u, 1083958833u, 3641997865u, 0, FABS_TOLERANCE, 0},
+{ 937, 3227808435u, 32766320u, 1062084905u, 3668443038u, 1080324787u, 32766320u, 0, FABS_TOLERANCE, 0},
+{ 938, 3223298996u, 2039713492u, 3248699388u, 1346210821u, 1075815348u, 2039713492u, 0, FABS_TOLERANCE, 0},
+{ 939, 1093050016u, 1335820726u, 3191756860u, 1808427032u, 1093050016u, 1335820726u, 0, FABS_TOLERANCE, 0},
+{ 940, 1061442763u, 650692001u, 1103515670u, 2253348763u, 1061442763u, 650692001u, 0, FABS_TOLERANCE, 0},
+{ 941, 3191395187u, 2372623300u, 3210185343u, 3200572848u, 1043911539u, 2372623300u, 0, FABS_TOLERANCE, 0},
+{ 942, 1100796069u, 762317532u, 3194595095u, 3192607437u, 1100796069u, 762317532u, 0, FABS_TOLERANCE, 0},
+{ 943, 1062262701u, 217775356u, 3232827087u, 2969367386u, 1062262701u, 217775356u, 0, FABS_TOLERANCE, 0},
+{ 944, 1057172551u, 3621353969u, 1077994795u, 3873976266u, 1057172551u, 3621353969u, 0, FABS_TOLERANCE, 0},
+{ 945, 1091301987u, 268372152u, 3221764390u, 3216978962u, 1091301987u, 268372152u, 0, FABS_TOLERANCE, 0},
+{ 946, 3246437611u, 142942404u, 1075322987u, 1746449109u, 1098953963u, 142942404u, 0, FABS_TOLERANCE, 0},
+{ 947, 1104006296u, 496534875u, 3254522293u, 2532372502u, 1104006296u, 496534875u, 0, FABS_TOLERANCE, 0},
+{ 948, 3250225541u, 2999955409u, 3222793392u, 1868977643u, 1102741893u, 2999955409u, 0, FABS_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 1074319042u, 3353193428u, 0, FABS_TOLERANCE, 0},
+{ 950, 1068218799u, 73646871u, 3231442171u, 3711510104u, 1068218799u, 73646871u, 0, FABS_TOLERANCE, 0},
+{ 951, 1090483524u, 218135177u, 3198908856u, 3082199105u, 1090483524u, 218135177u, 0, FABS_TOLERANCE, 0},
+{ 952, 1068068480u, 1061628117u, 3248859043u, 86776158u, 1068068480u, 1061628117u, 0, FABS_TOLERANCE, 0},
+{ 953, 3208484674u, 938869114u, 1087911145u, 2416710759u, 1061001026u, 938869114u, 0, FABS_TOLERANCE, 0},
+{ 954, 1095576832u, 2970853959u, 3239543429u, 1887505029u, 1095576832u, 2970853959u, 0, FABS_TOLERANCE, 0},
+{ 955, 3237728787u, 1337895935u, 1076463812u, 1172733328u, 1090245139u, 1337895935u, 0, FABS_TOLERANCE, 0},
+{ 956, 1049139928u, 1469010822u, 3229583535u, 551399515u, 1049139928u, 1469010822u, 0, FABS_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 1074118123u, 1849711538u, 0, FABS_TOLERANCE, 0},
+{ 958, 3242138780u, 2976596113u, 3192137295u, 3033242648u, 1094655132u, 2976596113u, 0, FABS_TOLERANCE, 0},
+{ 959, 1098698481u, 876810930u, 3197470945u, 2571587447u, 1098698481u, 876810930u, 0, FABS_TOLERANCE, 0},
+{ 960, 3241770810u, 4007797282u, 3225853845u, 4069319648u, 1094287162u, 4007797282u, 0, FABS_TOLERANCE, 0},
+{ 961, 1047279982u, 3840538373u, 1043189552u, 3668774580u, 1047279982u, 3840538373u, 0, FABS_TOLERANCE, 0},
+{ 962, 3217611704u, 200857661u, 3229758439u, 3359367736u, 1070128056u, 200857661u, 0, FABS_TOLERANCE, 0},
+{ 963, 3248797869u, 111868139u, 3227902082u, 2366064003u, 1101314221u, 111868139u, 0, FABS_TOLERANCE, 0},
+{ 964, 1044195166u, 3510904416u, 3222131653u, 3822770497u, 1044195166u, 3510904416u, 0, FABS_TOLERANCE, 0},
+{ 965, 3242675715u, 789151814u, 1099269239u, 2958956055u, 1095192067u, 789151814u, 0, FABS_TOLERANCE, 0},
+{ 966, 1084679320u, 722163228u, 1105524559u, 1534462169u, 1084679320u, 722163228u, 0, FABS_TOLERANCE, 0},
+{ 967, 1046586062u, 2207037106u, 3208952465u, 1231254630u, 1046586062u, 2207037106u, 0, FABS_TOLERANCE, 0},
+{ 968, 3197884060u, 3838689849u, 3198769679u, 1302617170u, 1050400412u, 3838689849u, 0, FABS_TOLERANCE, 0},
+{ 969, 1085938906u, 2527556476u, 3240373426u, 124352692u, 1085938906u, 2527556476u, 0, FABS_TOLERANCE, 0},
+{ 970, 3199540805u, 3502371499u, 1043411944u, 4190072016u, 1052057157u, 3502371499u, 0, FABS_TOLERANCE, 0},
+{ 971, 1064676142u, 1798470077u, 3200116917u, 3421833729u, 1064676142u, 1798470077u, 0, FABS_TOLERANCE, 0},
+{ 972, 3193514956u, 3653237931u, 3204255012u, 3683870669u, 1046031308u, 3653237931u, 0, FABS_TOLERANCE, 0},
+{ 973, 1053588582u, 376530104u, 1073853547u, 565755892u, 1053588582u, 376530104u, 0, FABS_TOLERANCE, 0},
+{ 974, 3242503851u, 558292492u, 1051772749u, 4267873474u, 1095020203u, 558292492u, 0, FABS_TOLERANCE, 0},
+{ 975, 3224772709u, 509637100u, 3212030069u, 215050379u, 1077289061u, 509637100u, 0, FABS_TOLERANCE, 0},
+{ 976, 1092057101u, 3571665665u, 3188628584u, 757824767u, 1092057101u, 3571665665u, 0, FABS_TOLERANCE, 0},
+{ 977, 3214799337u, 998858159u, 1063077962u, 436029885u, 1067315689u, 998858159u, 0, FABS_TOLERANCE, 0},
+{ 978, 3205946965u, 996300405u, 3193842624u, 80548098u, 1058463317u, 996300405u, 0, FABS_TOLERANCE, 0},
+{ 979, 3228848840u, 3876129407u, 3215332180u, 2226970413u, 1081365192u, 3876129407u, 0, FABS_TOLERANCE, 0},
+{ 980, 3237608953u, 200013509u, 3224552716u, 414878724u, 1090125305u, 200013509u, 0, FABS_TOLERANCE, 0},
+{ 981, 3230617093u, 309319541u, 1048979765u, 1261662434u, 1083133445u, 309319541u, 0, FABS_TOLERANCE, 0},
+{ 982, 1089252639u, 4062255924u, 3224274128u, 4289485681u, 1089252639u, 4062255924u, 0, FABS_TOLERANCE, 0},
+{ 983, 3236136084u, 1611969213u, 1053890378u, 3774617276u, 1088652436u, 1611969213u, 0, FABS_TOLERANCE, 0},
+{ 984, 1080412763u, 1752164782u, 3239587974u, 612223386u, 1080412763u, 1752164782u, 0, FABS_TOLERANCE, 0},
+{ 985, 1041545782u, 2024044989u, 1074932678u, 3259111307u, 1041545782u, 2024044989u, 0, FABS_TOLERANCE, 0},
+{ 986, 1053207518u, 2564965629u, 1093571065u, 169360454u, 1053207518u, 2564965629u, 0, FABS_TOLERANCE, 0},
+{ 987, 1089599090u, 1860101737u, 3191222372u, 1676437468u, 1089599090u, 1860101737u, 0, FABS_TOLERANCE, 0},
+{ 988, 1059802968u, 588387057u, 3192103292u, 2495288012u, 1059802968u, 588387057u, 0, FABS_TOLERANCE, 0},
+{ 989, 3193155705u, 659070058u, 1073095700u, 1393632068u, 1045672057u, 659070058u, 0, FABS_TOLERANCE, 0},
+{ 990, 3217683263u, 4276187829u, 3217553330u, 1868253275u, 1070199615u, 4276187829u, 0, FABS_TOLERANCE, 0},
+{ 991, 3223220272u, 2085481575u, 3215994784u, 800910002u, 1075736624u, 2085481575u, 0, FABS_TOLERANCE, 0},
+{ 992, 1056934836u, 1950570756u, 3200582211u, 941022151u, 1056934836u, 1950570756u, 0, FABS_TOLERANCE, 0},
+{ 993, 1057530368u, 2075610870u, 3250142022u, 3605152103u, 1057530368u, 2075610870u, 0, FABS_TOLERANCE, 0},
+{ 994, 3200839250u, 3792931748u, 3204857863u, 804393211u, 1053355602u, 3792931748u, 0, FABS_TOLERANCE, 0},
+{ 995, 3253646370u, 3430071177u, 3226288311u, 3652522729u, 1106162722u, 3430071177u, 0, FABS_TOLERANCE, 0},
+{ 996, 3201314702u, 236884699u, 3227874605u, 2193269825u, 1053831054u, 236884699u, 0, FABS_TOLERANCE, 0},
+{ 997, 1064936593u, 2744231849u, 1046186036u, 771053722u, 1064936593u, 2744231849u, 0, FABS_TOLERANCE, 0},
+{ 998, 1083996036u, 3000189819u, 1096500901u, 2057239777u, 1083996036u, 3000189819u, 0, FABS_TOLERANCE, 0},
+{ 999, 1093835581u, 205759408u, 3244643377u, 2702292618u, 1093835581u, 205759408u, 0, FABS_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_FABS_H multiple inclusion protection
+
+// EOF fabs.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/floor.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/floor.c
new file mode 100644
index 0000000000..38f343138e
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/floor.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// floor.c
+//
+// Test of floor() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/floor.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(floor_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &floor, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_NONE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &floor_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("floor() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("floor() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library floor() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "floor() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF floor.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/floor.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/floor.h
new file mode 100644
index 0000000000..afeaa28157
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/floor.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_FLOOR_H
+#define CYGONCE_LIBM_FLOOR_H
+//===========================================================================
+//
+// floor.h
+//
+// Test vectors for testing of floor() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/floor.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define FLOOR_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t floor_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1077999148u, 2506787616u, 1090024059u, 3619148316u, 1077968896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 2, 3218153654u, 3176730980u, 1051524793u, 2993920299u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 3, 3239659803u, 2725707538u, 3232101343u, 2346810316u, 3239659804u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 4, 1092554362u, 2088062470u, 3201242716u, 420891118u, 1092554360u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 5, 3221200677u, 2636405208u, 1100049309u, 471635570u, 3221225472u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 6, 1089363191u, 1746012320u, 1054478713u, 3333988501u, 1089363168u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 7, 1047953160u, 183014794u, 3202039382u, 2016785810u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 8, 3213486034u, 2688957927u, 1046089230u, 2709029994u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 9, 1058795730u, 624574473u, 1045840574u, 3473266330u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 10, 3204919842u, 1605286142u, 1068931671u, 4233776869u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 11, 1060343410u, 1857607719u, 3222889559u, 3417070006u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 12, 1103599987u, 3981151660u, 1088899021u, 1332651746u, 1103599987u, 3976200192u, 0, FLOOR_TOLERANCE, 0},
+{ 13, 1085298022u, 3824988054u, 1066856791u, 2070129652u, 1085297920u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 14, 3207559790u, 1372884064u, 1080833116u, 3229926662u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 15, 1093826501u, 3217805330u, 3191644264u, 2014578707u, 1093826501u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 16, 1102287487u, 265058758u, 3239903247u, 1630600647u, 1102287487u, 251658240u, 0, FLOOR_TOLERANCE, 0},
+{ 17, 1071124229u, 1946677669u, 3198462609u, 926009897u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 18, 1072130299u, 2271884183u, 3203741999u, 2118617783u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 19, 3194849109u, 213658772u, 3249401130u, 314151656u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 20, 3254112288u, 1564829925u, 3197817016u, 497230814u, 3254112288u, 1565523968u, 0, FLOOR_TOLERANCE, 0},
+{ 21, 3216262634u, 2075329122u, 3231746400u, 169900577u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 22, 1049848642u, 541549344u, 1096608669u, 3119070100u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 23, 1085427055u, 567496114u, 1045286891u, 1969998540u, 1085426944u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 24, 1060548195u, 1299369769u, 1049342524u, 4167404066u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 25, 3208865645u, 3348930841u, 1078472138u, 358457347u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 26, 1071069297u, 2192461366u, 1099527247u, 3184735642u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 27, 1052861772u, 331696577u, 3189610016u, 793242270u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 28, 3252528934u, 2322696981u, 1083791358u, 3020766674u, 3252528934u, 2323644416u, 0, FLOOR_TOLERANCE, 0},
+{ 29, 1044902177u, 252085215u, 3214426435u, 4139068910u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 30, 3222505725u, 105589263u, 1056316170u, 261630827u, 3222536192u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 31, 1107213408u, 428765703u, 3251828686u, 2009972239u, 1107213408u, 427819008u, 0, FLOOR_TOLERANCE, 0},
+{ 32, 1098568019u, 3517376586u, 3240257920u, 3304487302u, 1098568019u, 3489660928u, 0, FLOOR_TOLERANCE, 0},
+{ 33, 3233537912u, 237004814u, 3237899261u, 3364008659u, 3233538048u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 34, 3195247552u, 472004928u, 3226869477u, 1186387580u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 35, 1054226850u, 4085763910u, 1106394906u, 2684738273u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 36, 1057053639u, 2055490142u, 3231581370u, 3879040079u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 37, 3188976647u, 3725731239u, 1061652681u, 591292963u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 38, 3225014981u, 1147041027u, 3215417793u, 624695933u, 3225026560u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 39, 3206052774u, 705725219u, 3238067573u, 1116238321u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 40, 3207367088u, 7287411u, 1045917232u, 116067742u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 41, 3240055222u, 3604989074u, 1066381836u, 545298780u, 3240055224u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 42, 3219080936u, 1681476121u, 1060345752u, 3553822398u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 43, 1102831658u, 3410480388u, 1052460275u, 1660607230u, 1102831658u, 3405774848u, 0, FLOOR_TOLERANCE, 0},
+{ 44, 1089216869u, 1494984673u, 3196647153u, 287894723u, 1089216864u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 45, 1054885127u, 644548665u, 1081948134u, 2442134629u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 46, 1087554095u, 2312530895u, 3221584595u, 3379665576u, 1087554048u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 47, 1096085375u, 3018463866u, 1086226574u, 404012923u, 1096085375u, 2147483648u, 0, FLOOR_TOLERANCE, 0},
+{ 48, 1064733299u, 1710279345u, 3251401196u, 3528946000u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 49, 1061536351u, 2164450219u, 1083520023u, 3312018966u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 50, 1057248676u, 2648986431u, 1050330591u, 1474376550u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 51, 3194422028u, 1839068700u, 1077406406u, 3013052171u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 52, 1046493630u, 772102380u, 3220729740u, 4219039958u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 53, 3229472221u, 3058618779u, 1046304788u, 3338676024u, 3229474816u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 54, 1051172137u, 506286854u, 1094907481u, 2217000199u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 55, 1082428310u, 1147428263u, 1065432625u, 3034786717u, 1082427392u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 56, 1082016752u, 2844125311u, 1082985198u, 2561492677u, 1082015744u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 57, 3211536916u, 704542600u, 3222902057u, 2762779203u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 58, 3199680614u, 184131949u, 3249723525u, 1667366082u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 59, 3223609598u, 3904224140u, 1067056698u, 2942159914u, 3223715840u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 60, 1100636863u, 426114282u, 3209056785u, 1083606355u, 1100636863u, 402653184u, 0, FLOOR_TOLERANCE, 0},
+{ 61, 1106165945u, 3774123863u, 1106787580u, 2722107965u, 1106165945u, 3772776448u, 0, FLOOR_TOLERANCE, 0},
+{ 62, 1088005092u, 1377734762u, 1104232051u, 2377063483u, 1088005056u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 63, 1069380559u, 1029739074u, 1105467109u, 3062201018u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 64, 3234741597u, 773857656u, 3214251949u, 335833884u, 3234741632u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 65, 3203224610u, 1473865960u, 1103073830u, 4000427507u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 66, 1103185231u, 4242092620u, 1067009473u, 14539161u, 1103185231u, 4236247040u, 0, FLOOR_TOLERANCE, 0},
+{ 67, 3192516074u, 1732245037u, 1101371955u, 1533536108u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 68, 3249153995u, 1833841275u, 1099430098u, 4144145552u, 3249153995u, 1845493760u, 0, FLOOR_TOLERANCE, 0},
+{ 69, 3244270463u, 935007012u, 3188865420u, 604442938u, 3244270463u, 1073741824u, 0, FLOOR_TOLERANCE, 0},
+{ 70, 3206903253u, 2211464602u, 1046255144u, 1635910526u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 71, 1077871417u, 2549219008u, 3231633258u, 3733639385u, 1077870592u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 72, 1082095089u, 1819374372u, 3202219056u, 2617077637u, 1082093568u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 73, 1094345280u, 546465680u, 1048653554u, 532401530u, 1094345280u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 74, 1044571091u, 2759019783u, 3221570188u, 3554409630u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 75, 3212931282u, 2527221960u, 1099107978u, 2696971136u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 76, 1097158000u, 173134582u, 1087299442u, 2877794600u, 1097158000u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 77, 1086400474u, 547642046u, 3197285510u, 3521286127u, 1086400384u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 78, 1074860702u, 1231582831u, 1090971734u, 1653446832u, 1074790400u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 79, 1061342535u, 3762182190u, 3252967851u, 2615360375u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 80, 3200834423u, 2588067350u, 3206610957u, 3551059728u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 81, 3206978856u, 845263327u, 1073415902u, 1749010288u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 82, 3205576370u, 3092685191u, 3190678390u, 2872219490u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 83, 3218315055u, 4107255722u, 3205337291u, 3069068345u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 84, 3243990857u, 2294867524u, 3216653996u, 2860384670u, 3243990857u, 3221225472u, 0, FLOOR_TOLERANCE, 0},
+{ 85, 3193326350u, 2265437201u, 3240198679u, 1234948614u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 86, 3216359929u, 1186945904u, 3251167793u, 1896750851u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 87, 1081575478u, 3686084548u, 1079286273u, 3309277689u, 1081573376u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 88, 3223476240u, 3006860614u, 3231412671u, 2504194724u, 3223584768u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 89, 3236149260u, 1948717780u, 1048317852u, 3791803982u, 3236149280u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 90, 1064345015u, 4272034420u, 3192982124u, 1526175922u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 91, 3245817826u, 4108948538u, 1104691287u, 640541190u, 3245817827u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 92, 3207257417u, 3259274853u, 1082507103u, 3677038020u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 93, 1083132498u, 3781708548u, 1096584871u, 1207386447u, 1083131904u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 94, 3188695272u, 3011191657u, 1103798670u, 1096124830u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 95, 1063235023u, 2540404725u, 3240157452u, 4122845725u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 96, 1083643710u, 311336721u, 3214382367u, 4212533768u, 1083642880u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 97, 1051139427u, 1769686293u, 3240200923u, 3538602249u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 98, 1078227549u, 508056696u, 1103793878u, 776520138u, 1078198272u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 99, 1102910577u, 4064962760u, 1077424413u, 819766631u, 1102910577u, 4060086272u, 0, FLOOR_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 1073741824u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 101, 1082295059u, 2514398118u, 1076579751u, 870169764u, 1082294272u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 102, 3246851392u, 1190259653u, 1069112254u, 3417249840u, 3246851392u, 1207959552u, 0, FLOOR_TOLERANCE, 0},
+{ 103, 3193663083u, 3467757357u, 3215075200u, 2168175352u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 104, 3239643135u, 1508888184u, 1060430241u, 3524949092u, 3239643136u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 105, 3197412883u, 166402802u, 3237198975u, 3572369260u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 106, 1081866822u, 2441536203u, 3202753937u, 3658194573u, 1081864192u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 107, 1062392908u, 2479742828u, 1062342831u, 4214154303u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 108, 1082396794u, 426896765u, 1066474375u, 2201754442u, 1082396672u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 109, 3195629021u, 2055773734u, 3239267288u, 291396537u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 110, 3236968033u, 874125203u, 3210508124u, 4091098764u, 3236968048u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 111, 1065716026u, 120488169u, 3241241441u, 1985269424u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 112, 3206539410u, 2243036871u, 3243941101u, 740033495u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 113, 3209424906u, 1176656356u, 1074261978u, 3588756231u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 114, 3252816791u, 3037249392u, 1061635587u, 1173102190u, 3252816791u, 3038773248u, 0, FLOOR_TOLERANCE, 0},
+{ 115, 3237209581u, 2882725208u, 1071440059u, 69225090u, 3237209584u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 116, 3212663474u, 272319256u, 1072073912u, 2493997123u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 117, 1057720186u, 188610379u, 3232757923u, 2209647371u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 118, 3236758517u, 1990439193u, 1078073146u, 622849962u, 3236758528u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 119, 1057135741u, 756052458u, 1081649113u, 2247475162u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 120, 1061623064u, 3878055211u, 3222407050u, 2979438623u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 121, 3195290997u, 2676398686u, 1105124431u, 3631096636u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 122, 1065079390u, 1697791764u, 3198136112u, 2299842819u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 123, 1078084768u, 1931502677u, 3215264397u, 3016456382u, 1078067200u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 124, 1072253426u, 343404215u, 1061072607u, 4266232536u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 125, 3241230836u, 4140316002u, 1082896196u, 868256971u, 3241230837u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 126, 1075422810u, 1864139509u, 3187675097u, 3084482407u, 1075314688u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 127, 3220191323u, 2427162817u, 3234748208u, 2715105792u, 3221225472u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 128, 1064600512u, 3943389284u, 1046724025u, 3626825684u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 129, 1045423002u, 967350972u, 1093012318u, 448002663u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 130, 3251845859u, 105058217u, 1069733884u, 171786224u, 3251845859u, 109051904u, 0, FLOOR_TOLERANCE, 0},
+{ 131, 3189614508u, 2863482262u, 3204997271u, 877784425u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 132, 3202629313u, 2801782962u, 3213604117u, 762347195u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 133, 3233486727u, 2317950339u, 3246333414u, 2135700283u, 3233486848u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 134, 1056516397u, 4171919805u, 1082858682u, 2180920863u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 135, 3220149084u, 1918836931u, 1083603224u, 3137821660u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 136, 1103902874u, 3456203663u, 3235600523u, 2335688936u, 1103902874u, 3456106496u, 0, FLOOR_TOLERANCE, 0},
+{ 137, 1042279322u, 4170235262u, 1051824459u, 521583737u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 138, 1081348303u, 1296623194u, 3250673860u, 2442872540u, 1081348096u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 139, 1061684277u, 289979405u, 1049514449u, 3865737145u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 140, 1075298944u, 3699090239u, 1054539840u, 3259249360u, 1075052544u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 141, 1096418100u, 1619819023u, 1045993352u, 1022642459u, 1096418100u, 1073741824u, 0, FLOOR_TOLERANCE, 0},
+{ 142, 1081433004u, 19455098u, 3229182089u, 2096003654u, 1081430016u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 143, 1076297936u, 3803689997u, 1071630912u, 2263729518u, 1076232192u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 144, 1101357261u, 2816837387u, 1063422305u, 2597606398u, 1101357261u, 2785017856u, 0, FLOOR_TOLERANCE, 0},
+{ 145, 1069100169u, 3680967506u, 1040201163u, 179224723u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 146, 3188629767u, 978126928u, 1101553990u, 4047893399u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 147, 3222322045u, 4059818629u, 1042678728u, 3640293589u, 3222536192u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 148, 3248464040u, 3383497159u, 1070002807u, 1527313008u, 3248464040u, 3422552064u, 0, FLOOR_TOLERANCE, 0},
+{ 149, 3202707679u, 2599946514u, 1104170406u, 2738675352u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 150, 1105232623u, 3616571377u, 1060859316u, 1130603218u, 1105232623u, 3615490048u, 0, FLOOR_TOLERANCE, 0},
+{ 151, 1076028796u, 3859211180u, 1067940450u, 1744531824u, 1075970048u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 152, 1042831340u, 1958025850u, 3236511256u, 2472176453u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 153, 3233107089u, 182132862u, 3250520938u, 3924356991u, 3233107200u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 154, 3230501884u, 35632886u, 3209806504u, 1453402523u, 3230502912u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 155, 1083522102u, 743225214u, 3202890678u, 142917400u, 1083522048u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 156, 1080684976u, 1472665012u, 3203138231u, 256588219u, 1080680448u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 157, 1094982162u, 1062927000u, 1061134072u, 931677439u, 1094982162u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 158, 1058377732u, 2320910576u, 1055663370u, 288059864u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 159, 1078958093u, 1448349062u, 3199478070u, 3454027134u, 1078951936u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 160, 3237458798u, 4215445172u, 3196654963u, 2231888973u, 3237458800u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 161, 3246632231u, 40413554u, 3232578253u, 983832844u, 3246632231u, 134217728u, 0, FLOOR_TOLERANCE, 0},
+{ 162, 3223721534u, 3995725873u, 1050082319u, 777231627u, 3223846912u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 163, 1040986626u, 672789828u, 3253385962u, 2982787335u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 164, 1068390875u, 2075971825u, 1070166500u, 4034633931u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 165, 3210046177u, 1018222907u, 3244621407u, 3090050495u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 166, 1067680885u, 937732557u, 3200798890u, 2557898276u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 167, 1078342316u, 130346162u, 3223590310u, 275568693u, 1078329344u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 168, 1042898869u, 3807416441u, 1075961161u, 3706820266u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 169, 3216099005u, 1710131411u, 1078123323u, 1900790503u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 170, 3238819361u, 3420420033u, 3210844787u, 588423066u, 3238819368u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 171, 1049684114u, 1160162008u, 3246307879u, 4265764460u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 172, 1102543434u, 366653268u, 3188814424u, 466059202u, 1102543434u, 352321536u, 0, FLOOR_TOLERANCE, 0},
+{ 173, 3226627739u, 1325936170u, 3221436876u, 680097612u, 3226632192u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 174, 3240391116u, 1827735934u, 3200554324u, 2875599271u, 3240391118u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 175, 3191030402u, 3117037091u, 3239246636u, 15838845u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 176, 1051974004u, 749718883u, 3223587064u, 1523766569u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 177, 1044833651u, 1966536294u, 3250158026u, 699164258u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 178, 1098048435u, 3759049394u, 1106085272u, 1183789499u, 1098048435u, 3758096384u, 0, FLOOR_TOLERANCE, 0},
+{ 179, 1081201623u, 1970107747u, 1095245453u, 2308233883u, 1081200640u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 180, 1084756444u, 1491017852u, 1041444355u, 1723375725u, 1084755968u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 181, 3216630070u, 1141349287u, 1097465301u, 3403438584u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 182, 3230571908u, 1711085243u, 3250239076u, 1377484108u, 3230572544u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 183, 1098385019u, 2880275004u, 1084039594u, 1611394950u, 1098385019u, 2684354560u, 0, FLOOR_TOLERANCE, 0},
+{ 184, 3234221435u, 2626629370u, 1063771493u, 1499080813u, 3234221440u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 185, 1055231263u, 3936262414u, 1103919063u, 3175668759u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 186, 3207981719u, 1270950554u, 3194616071u, 3680565379u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 187, 3208148223u, 1066985223u, 3221613219u, 4089383168u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 188, 3217058839u, 4017329311u, 3208334452u, 1667591498u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 189, 1088164157u, 3154656624u, 1061894279u, 3886344038u, 1088164096u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 190, 1050652945u, 977586119u, 3209762784u, 953839852u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 191, 1104965247u, 143071571u, 3206165386u, 913097445u, 1104965247u, 142606336u, 0, FLOOR_TOLERANCE, 0},
+{ 192, 3190565456u, 1371169579u, 1057079837u, 2594818628u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 193, 3251793336u, 2259342224u, 3217432469u, 1824221478u, 3251793336u, 2260729856u, 0, FLOOR_TOLERANCE, 0},
+{ 194, 3246834775u, 1576604497u, 1079368611u, 185078728u, 3246834775u, 1610612736u, 0, FLOOR_TOLERANCE, 0},
+{ 195, 3221679427u, 444800035u, 3243343143u, 1734989302u, 3221749760u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1072693248u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 197, 3234695968u, 1941318385u, 1045807374u, 792193370u, 3234696064u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 198, 3238299666u, 1299392207u, 3212131720u, 3205732280u, 3238299672u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 199, 1098698804u, 3035093505u, 1052187689u, 3287702190u, 1098698804u, 2952790016u, 0, FLOOR_TOLERANCE, 0},
+{ 200, 3246676260u, 2160225215u, 1102624859u, 836655570u, 3246676260u, 2281701376u, 0, FLOOR_TOLERANCE, 0},
+{ 201, 1096723626u, 3360816360u, 3246176356u, 172860634u, 1096723626u, 3221225472u, 0, FLOOR_TOLERANCE, 0},
+{ 202, 1070995788u, 146831910u, 1051558014u, 2340722078u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 203, 3230416351u, 1603798153u, 3207725532u, 1099413093u, 3230416896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 204, 3246678378u, 2429340443u, 3190303581u, 3223770005u, 3246678378u, 2550136832u, 0, FLOOR_TOLERANCE, 0},
+{ 205, 1075882959u, 955542166u, 3230415151u, 275583938u, 1075838976u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 206, 1092971882u, 513397822u, 1090646554u, 2089321329u, 1092971882u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 207, 3193169876u, 2782073372u, 1046063872u, 4023829068u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 208, 1098564822u, 3242223094u, 3194111199u, 4264674108u, 1098564822u, 3221225472u, 0, FLOOR_TOLERANCE, 0},
+{ 209, 3238510821u, 3506346169u, 1047020885u, 1742757458u, 3238510824u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 210, 3192664477u, 1265459564u, 3193450280u, 3650514880u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 211, 1081755890u, 1525260440u, 3235452527u, 2612331392u, 1081753600u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 212, 3248668920u, 1263613754u, 3219096387u, 635677201u, 3248668920u, 1275068416u, 0, FLOOR_TOLERANCE, 0},
+{ 213, 3206272087u, 4140947288u, 3200792376u, 2013265346u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 214, 3249974392u, 1912759945u, 3237045253u, 1351396825u, 3249974392u, 1929379840u, 0, FLOOR_TOLERANCE, 0},
+{ 215, 3248205162u, 1001433078u, 3206926643u, 2741676659u, 3248205162u, 1006632960u, 0, FLOOR_TOLERANCE, 0},
+{ 216, 1080923606u, 1088945233u, 1085095743u, 3986114865u, 1080918016u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 217, 3215734057u, 831239754u, 1099828675u, 3071308141u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 218, 3225834497u, 3473592372u, 1102759382u, 1309576357u, 3225845760u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 219, 3251186706u, 2042340367u, 1091945628u, 2062772374u, 3251186706u, 2046820352u, 0, FLOOR_TOLERANCE, 0},
+{ 220, 3194765687u, 1840632537u, 1096533424u, 807510337u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 221, 3231451722u, 144814872u, 3212698915u, 2282965697u, 3231452160u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 222, 1071236430u, 2552499583u, 3229111426u, 1470130815u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 223, 3243093065u, 2858583811u, 1089760910u, 6360994u, 3243093066u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 224, 3198264929u, 1614537194u, 1075198900u, 4088705365u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 225, 3250939070u, 3545570051u, 1065221325u, 1629217700u, 3250939070u, 3548381184u, 0, FLOOR_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 1072693248u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 227, 3196802686u, 2406734491u, 1042055360u, 89226663u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 228, 3195751081u, 1618759139u, 3194723421u, 3888234802u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 229, 1055357248u, 3590035633u, 3212424262u, 2892456615u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 230, 3189943060u, 2431246964u, 3241512456u, 183850734u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 231, 1089501101u, 3088319870u, 3211544311u, 862225364u, 1089501088u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 232, 3235294664u, 3495352775u, 1058576726u, 596957268u, 3235294720u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 233, 1046553348u, 1839214511u, 3205004060u, 1923240983u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 234, 1058073864u, 739619702u, 3223356436u, 2689885273u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 235, 3200324971u, 2143376228u, 1098306332u, 3760236188u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 1074266112u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 237, 3214165989u, 2493598049u, 3194927008u, 1689107592u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 238, 3189989959u, 1578976988u, 1066368383u, 2117279163u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 239, 3222988111u, 3425290087u, 1098487295u, 1263412017u, 3223060480u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 240, 3208432764u, 3635396812u, 1070999426u, 3965655689u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 241, 1060196346u, 2183973116u, 1101098363u, 1118613350u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 242, 3221946089u, 199516350u, 1078368488u, 164621458u, 3222274048u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 243, 3187706018u, 3570940805u, 3230316437u, 3596080877u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 244, 3208209565u, 980880313u, 1079833442u, 884465057u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 245, 1099977124u, 2558179220u, 1052873711u, 1233598120u, 1099977124u, 2550136832u, 0, FLOOR_TOLERANCE, 0},
+{ 246, 1047115221u, 1909994277u, 1085015978u, 2991527452u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 247, 1060855260u, 1680290941u, 1074309900u, 2943870846u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 248, 1059496132u, 1451927357u, 3228615456u, 1502585517u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 249, 3236211951u, 751136990u, 3230392165u, 3493275472u, 3236211968u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 250, 1098365967u, 1209623292u, 3238056647u, 979495322u, 1098365967u, 1073741824u, 0, FLOOR_TOLERANCE, 0},
+{ 251, 3250424296u, 1717672108u, 1048120593u, 531240316u, 3250424296u, 1728053248u, 0, FLOOR_TOLERANCE, 0},
+{ 252, 1054174923u, 3548721654u, 1086112947u, 3391817224u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 253, 1077836851u, 2758195125u, 1100880260u, 2028440924u, 1077805056u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 254, 1084223893u, 2750123373u, 3232200256u, 1086294931u, 1084223488u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 255, 1043958672u, 2986160931u, 1076097908u, 2540046258u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 256, 3235476602u, 451471221u, 1064816262u, 4187644495u, 3235476608u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 257, 1099460228u, 2439500162u, 1065280276u, 1979490284u, 1099460228u, 2415919104u, 0, FLOOR_TOLERANCE, 0},
+{ 258, 1040415832u, 2283342035u, 1078398157u, 1345997553u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 259, 3213249348u, 179066662u, 1103272172u, 1217337578u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 260, 3211562377u, 3779303391u, 3210023352u, 3115946280u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 261, 3192989874u, 286247089u, 1085153597u, 713645369u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 262, 1093670500u, 1468283899u, 1042831668u, 2022736418u, 1093670500u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 263, 1083139105u, 3305564080u, 1065483445u, 482392433u, 1083138048u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 264, 3201695807u, 2256346551u, 3222430705u, 2071674991u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 265, 3204024695u, 2295269094u, 1084451053u, 2773103941u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 266, 1078173946u, 1482721827u, 1092243422u, 3125409590u, 1078165504u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 267, 3221065973u, 1381740563u, 1071545057u, 2918235653u, 3221225472u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 268, 3238715972u, 1105857967u, 3241990046u, 2703723225u, 3238715976u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 269, 1043015571u, 174689677u, 1079333374u, 3947057014u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 270, 1090461859u, 2023082423u, 3242081486u, 1169047927u, 1090461856u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 271, 1064525899u, 3742487766u, 1043425732u, 194972788u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 272, 3213791827u, 2136071361u, 3211529757u, 993675115u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 273, 3213663381u, 210772141u, 3241441539u, 580731413u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 274, 1093840413u, 1751560711u, 1074522705u, 180987057u, 1093840413u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 275, 1066754591u, 2552236599u, 1088658621u, 2112468655u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 276, 3189290617u, 1578223762u, 3224596567u, 2456166162u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 277, 1058506965u, 2110924310u, 1086207177u, 3161208323u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 278, 3231863394u, 2352173188u, 1079361728u, 4070222179u, 3231863808u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 279, 1101012904u, 2481562701u, 1090937016u, 3809489716u, 1101012904u, 2449473536u, 0, FLOOR_TOLERANCE, 0},
+{ 280, 3197002651u, 330905705u, 1086260896u, 90264431u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 281, 1040729961u, 4162008079u, 3194387916u, 759522153u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 282, 1081015037u, 1839697482u, 3216442625u, 2211508949u, 1081008128u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 283, 3249807211u, 3736863454u, 1063475914u, 3150741666u, 3249807211u, 3741319168u, 0, FLOOR_TOLERANCE, 0},
+{ 284, 1060785883u, 4200269406u, 3236646101u, 1061812176u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 285, 1080217979u, 106027290u, 3234978297u, 2245237549u, 1080213504u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 286, 3246984334u, 2132131375u, 3250483427u, 3449276437u, 3246984334u, 2147483648u, 0, FLOOR_TOLERANCE, 0},
+{ 287, 1089388778u, 2334440944u, 1105423490u, 4004336184u, 1089388768u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 288, 3218772704u, 4090088208u, 1042030013u, 3898658299u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 289, 3207908064u, 2272831437u, 3253082595u, 2639188641u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 290, 1054766684u, 1856594168u, 3189515294u, 4101853676u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 291, 1076012412u, 2211699255u, 3195060344u, 3865018604u, 1075970048u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 292, 3242767010u, 996259334u, 3241496889u, 3782673116u, 3242767010u, 2147483648u, 0, FLOOR_TOLERANCE, 0},
+{ 293, 1099130747u, 3840380763u, 1048674041u, 550040067u, 1099130747u, 3758096384u, 0, FLOOR_TOLERANCE, 0},
+{ 294, 3251419593u, 95874100u, 3237232828u, 2645647822u, 3251419593u, 100663296u, 0, FLOOR_TOLERANCE, 0},
+{ 295, 1043665640u, 3441419500u, 3252367038u, 876710419u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 296, 3238593552u, 2560836004u, 3199616543u, 1180840586u, 3238593560u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 297, 3221602966u, 2218230392u, 3227485787u, 3947214579u, 3221749760u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 298, 1079539654u, 1447312532u, 1081476588u, 780366847u, 1079525376u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 299, 1072569643u, 2842113832u, 3216156731u, 225159029u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 300, 1098117193u, 1601981129u, 3234628869u, 2236538344u, 1098117193u, 1342177280u, 0, FLOOR_TOLERANCE, 0},
+{ 301, 1085173524u, 2194185737u, 3242362684u, 87913366u, 1085173248u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 302, 3199083880u, 1346862963u, 1077836259u, 3604666660u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 303, 3212255979u, 3115209742u, 1099332326u, 1325101950u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 304, 3224546042u, 3889223100u, 1053247613u, 3371396923u, 3224567808u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 305, 3220477868u, 4163120793u, 1075022670u, 1387631215u, 3221225472u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 306, 3205481779u, 1532426189u, 1063168268u, 3397022615u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 307, 3201033321u, 89324166u, 1079206060u, 3429424710u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 308, 3192325102u, 747591401u, 1072238381u, 2803213904u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 309, 1091113780u, 271904221u, 1044258318u, 1858545114u, 1091113776u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 310, 3228068914u, 314958082u, 3249912496u, 2966213175u, 3228073984u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 311, 3197179414u, 3119528953u, 3217179014u, 2908718240u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 312, 3242467576u, 2018361566u, 1100926600u, 3985805054u, 3242467576u, 2147483648u, 0, FLOOR_TOLERANCE, 0},
+{ 313, 1070132580u, 409584884u, 3239758947u, 755795129u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 314, 1075772446u, 1819156379u, 3251342302u, 2982669005u, 1075576832u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 315, 1101563433u, 2080534280u, 3188254060u, 449171797u, 1101563433u, 2080374784u, 0, FLOOR_TOLERANCE, 0},
+{ 316, 1095956900u, 168744837u, 3214950009u, 1322217822u, 1095956900u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 317, 3254226900u, 3250487255u, 1062120700u, 1876195180u, 3254226900u, 3250585600u, 0, FLOOR_TOLERANCE, 0},
+{ 318, 3226343480u, 1336400247u, 1098057903u, 3314079581u, 3226370048u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 319, 3203678820u, 265025555u, 1063854282u, 3779482256u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 320, 1067300501u, 887044257u, 1054789618u, 2732056261u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 321, 1050106742u, 4027115185u, 3191764868u, 2940199511u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 322, 3202500155u, 2875684421u, 3227459837u, 2251967570u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 323, 1063244412u, 284173546u, 3238823679u, 3557800647u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 324, 1101458560u, 3147771266u, 3220110464u, 2933364246u, 1101458560u, 3120562176u, 0, FLOOR_TOLERANCE, 0},
+{ 325, 1064853160u, 3366183281u, 3234870843u, 537442654u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 326, 3244118788u, 2529029548u, 3249882819u, 3781513577u, 3244118788u, 3221225472u, 0, FLOOR_TOLERANCE, 0},
+{ 327, 3213436354u, 1080845539u, 3206760016u, 911778687u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 328, 3191951036u, 469586759u, 1091830022u, 3080528840u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 329, 1080249104u, 2863108169u, 3225605506u, 2508274250u, 1080246272u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 330, 3210826984u, 4080017377u, 3206492941u, 1470284690u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 331, 3207120390u, 3867917386u, 1102054928u, 3504746045u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 332, 1064522279u, 2962134101u, 3244741577u, 3390537350u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 333, 1088201813u, 1702237980u, 1071598971u, 1102587474u, 1088201792u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 334, 3202970118u, 2180218657u, 3211592260u, 1206527853u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 335, 3197084744u, 394130786u, 3242511482u, 2437699868u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 336, 1044237059u, 849581558u, 3252006507u, 2008614943u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 337, 3210140014u, 3128971673u, 3249137531u, 2773583059u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 338, 1085029866u, 590727700u, 3248651761u, 2183878539u, 1085029376u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 339, 1101098629u, 820687580u, 3208143496u, 1402434664u, 1101098629u, 805306368u, 0, FLOOR_TOLERANCE, 0},
+{ 340, 3252290835u, 1873709254u, 3245167989u, 44275991u, 3252290835u, 1874853888u, 0, FLOOR_TOLERANCE, 0},
+{ 341, 3189668753u, 1174874204u, 3208263730u, 2360372288u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 342, 1103854676u, 937573440u, 3208953761u, 211240241u, 1103854676u, 931135488u, 0, FLOOR_TOLERANCE, 0},
+{ 343, 3243548934u, 2469774991u, 1043117070u, 3380071805u, 3243548934u, 3221225472u, 0, FLOOR_TOLERANCE, 0},
+{ 344, 1058121042u, 442507560u, 3254252803u, 3257889649u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 345, 1068850520u, 1854921625u, 1049810168u, 2729627545u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 346, 3254712629u, 4001809575u, 3240128649u, 278261523u, 3254712629u, 4002414592u, 0, FLOOR_TOLERANCE, 0},
+{ 347, 1087224694u, 1793907966u, 3238955714u, 398859249u, 1087224576u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 348, 3200952547u, 2511916952u, 3219195283u, 1697158299u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 349, 1069985548u, 3230931724u, 3243897690u, 3508781585u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 350, 1103847606u, 1674254897u, 1046547577u, 217148561u, 1103847606u, 1669332992u, 0, FLOOR_TOLERANCE, 0},
+{ 351, 3211263954u, 3275604304u, 3194840159u, 2991205850u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 352, 3195249375u, 3509997278u, 3248888030u, 3897986511u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 353, 1047182435u, 2156824613u, 1042295665u, 1239257646u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 354, 3213264085u, 1073153314u, 3250031627u, 2567234990u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 355, 3190593412u, 4261696995u, 3197784432u, 323702024u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 356, 3243690997u, 4075177615u, 3202791065u, 1919006082u, 3243690998u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 357, 3239270013u, 386429966u, 1086504491u, 3698826164u, 3239270016u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 358, 1078327190u, 1681986446u, 3194985869u, 3072950140u, 1078296576u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 359, 3217311933u, 3719038997u, 1055433962u, 3331415058u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 360, 1060749713u, 2420250111u, 3238002206u, 1928661079u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 361, 1081914210u, 3679866727u, 3227386672u, 1273835792u, 1081913344u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 362, 1041622738u, 2682092368u, 3234222284u, 1325425811u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 363, 1056312613u, 4175172697u, 3208346191u, 2130706153u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 364, 1092089624u, 1200784450u, 1083605096u, 1248595607u, 1092089624u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 365, 3213890863u, 1897285171u, 3251296075u, 944966123u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 366, 3241371250u, 2270747330u, 3230692631u, 422503284u, 3241371251u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 367, 1084120037u, 2857564741u, 1075647403u, 3308906709u, 1084119040u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 368, 3203475098u, 1380066948u, 3232612906u, 2613634294u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 369, 1063890856u, 4022784584u, 1060483857u, 3264056381u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 370, 1044637404u, 1778509100u, 3213146285u, 2665833973u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 371, 3216727300u, 1859175955u, 1079949560u, 4258450607u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 372, 1048277388u, 4128020197u, 1076266146u, 4122840980u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 373, 3193183163u, 2454653987u, 3229487005u, 2977478685u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 374, 3253556483u, 1355181872u, 1095308770u, 436846481u, 3253556483u, 1356857344u, 0, FLOOR_TOLERANCE, 0},
+{ 375, 3246605302u, 2592856453u, 3247825559u, 3195234082u, 3246605302u, 2684354560u, 0, FLOOR_TOLERANCE, 0},
+{ 376, 3222118023u, 3554670043u, 1091621009u, 3321236467u, 3222274048u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 377, 1069012833u, 1936670355u, 1095715713u, 2958468553u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 378, 3192291109u, 2960339502u, 1098808013u, 1044068983u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 379, 3196691185u, 4093388677u, 1095478112u, 1735930261u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 380, 1091040302u, 1807398746u, 3195743135u, 4261616162u, 1091040296u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 381, 3209294194u, 3250576797u, 1059002384u, 3043079652u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 382, 1069207109u, 666051428u, 3208765404u, 1912684117u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 383, 1103487420u, 1949030179u, 1096388934u, 896459246u, 1103487420u, 1946157056u, 0, FLOOR_TOLERANCE, 0},
+{ 384, 1054300653u, 622499767u, 1066707637u, 1490260486u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 385, 1106688493u, 1490616165u, 3251242436u, 795675736u, 1106688493u, 1490026496u, 0, FLOOR_TOLERANCE, 0},
+{ 386, 1080943896u, 3662877092u, 3234317146u, 3200513112u, 1080942592u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 387, 1084088786u, 1356101968u, 3236536816u, 3062844611u, 1084088320u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 388, 3219922640u, 2284484846u, 3219498359u, 3240896015u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 389, 3235759689u, 494503287u, 1092811254u, 142673998u, 3235759744u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 390, 3252125916u, 3394882641u, 3225306538u, 364852125u, 3252125916u, 3397386240u, 0, FLOOR_TOLERANCE, 0},
+{ 391, 3225261763u, 193885269u, 1088149839u, 1359805831u, 3225288704u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 392, 3200484782u, 592580907u, 3199560872u, 3086438952u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 393, 1059518664u, 1778008540u, 1049064687u, 73581647u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 394, 3246733598u, 233240285u, 1081923320u, 2710903921u, 3246733598u, 268435456u, 0, FLOOR_TOLERANCE, 0},
+{ 395, 1069513767u, 3719878805u, 1079866720u, 3615458228u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 396, 3221194724u, 3647632375u, 3247225271u, 3839959621u, 3221225472u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 397, 1103401096u, 2232210456u, 3235434773u, 224271737u, 1103401096u, 2231369728u, 0, FLOOR_TOLERANCE, 0},
+{ 398, 3193003684u, 2134662911u, 3190390590u, 4239009051u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 399, 1080526145u, 2305279897u, 1077668039u, 1854523320u, 1080524800u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 400, 3219864259u, 538224650u, 3206153057u, 1379649610u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 401, 3196410507u, 3683897920u, 3244167599u, 3647579469u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 402, 1090280933u, 2694093608u, 1042775347u, 598406111u, 1090280928u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 403, 3211635392u, 872706833u, 1084802480u, 2200602798u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 404, 1042339597u, 904146293u, 1060867322u, 1729685598u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 405, 3195694970u, 1894173462u, 3232800651u, 191960416u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 406, 1091225343u, 3521028551u, 1054522089u, 3287274359u, 1091225336u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 407, 1095386964u, 959640601u, 3201578263u, 4136915018u, 1095386964u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 408, 1064005451u, 1553716379u, 1106027987u, 984725765u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 409, 3238832641u, 2287646644u, 3240329321u, 2276183378u, 3238832648u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 410, 1068209174u, 3940225170u, 3199544434u, 997572161u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 411, 3212768361u, 36116288u, 3206886566u, 4196602670u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 412, 3241695853u, 3550227562u, 3207257983u, 2747744117u, 3241695854u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 413, 1104236126u, 507130047u, 1048359321u, 3229888373u, 1104236126u, 503316480u, 0, FLOOR_TOLERANCE, 0},
+{ 414, 3222996778u, 2210969014u, 1081031001u, 1946786091u, 3223060480u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 415, 3236306990u, 4059150589u, 3189759234u, 1177045799u, 3236307008u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 416, 1093103612u, 2664812822u, 1050343198u, 2034180320u, 1093103612u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 417, 3213779117u, 1175750283u, 3235559706u, 1424491340u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 418, 3213904193u, 1630036121u, 3231972785u, 3195479448u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 419, 1090429875u, 2527029044u, 1046927050u, 4000723255u, 1090429872u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 420, 1085208677u, 3335703647u, 3237349676u, 3869440059u, 1085208576u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 421, 1091433848u, 3888398377u, 3196041693u, 1290567220u, 1091433848u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 422, 1066679070u, 3242451480u, 3248384948u, 707431021u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 423, 1083230509u, 2739665123u, 1060777905u, 1733073225u, 1083230208u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 424, 1078517061u, 1297274853u, 3208848704u, 3341639139u, 1078493184u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 425, 1046570941u, 2228057309u, 1084318902u, 1317851136u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 426, 1088255327u, 270039934u, 3241414679u, 3063626339u, 1088255296u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 427, 3219178350u, 83062251u, 3211262173u, 2659016437u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 428, 1095743886u, 3833539373u, 3206667189u, 1567476111u, 1095743886u, 2147483648u, 0, FLOOR_TOLERANCE, 0},
+{ 429, 3205195072u, 2382776852u, 3249232579u, 1546622468u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 430, 1085536439u, 1714300821u, 1104130938u, 4167591598u, 1085536256u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 431, 1051092760u, 2798720100u, 1086978789u, 449990704u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 432, 3231198415u, 4039516226u, 3244344107u, 4272932619u, 3231199232u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 433, 3222708441u, 1683007544u, 1091105663u, 3805494321u, 3222798336u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 434, 3220852948u, 2072627412u, 1094383324u, 3394151662u, 3221225472u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 435, 3220570024u, 1120106427u, 3223631624u, 3404608264u, 3221225472u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 436, 1097859997u, 559918757u, 3205077053u, 908100198u, 1097859997u, 536870912u, 0, FLOOR_TOLERANCE, 0},
+{ 437, 1042677918u, 2026673913u, 3244833635u, 2844573214u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 438, 3254567259u, 3946837259u, 3234993796u, 3850406820u, 3254567259u, 3946840064u, 0, FLOOR_TOLERANCE, 0},
+{ 439, 1057479809u, 3139330994u, 1046133568u, 1539650690u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 440, 3236705500u, 1554593884u, 3228899878u, 2813752562u, 3236705504u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 441, 1056505004u, 3804703138u, 1072931071u, 2053677923u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 442, 3244864299u, 289355864u, 1078453818u, 2143066338u, 3244864299u, 536870912u, 0, FLOOR_TOLERANCE, 0},
+{ 443, 3203939880u, 2157691971u, 1106629150u, 110806409u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 444, 1082157019u, 3570399481u, 1085637605u, 180265334u, 1082155008u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 445, 3200980182u, 558779875u, 3202046748u, 2338464653u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 446, 1045705464u, 1703969219u, 3229797258u, 1417521063u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 447, 3237782261u, 3917440951u, 1051668894u, 3736066983u, 3237782272u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 448, 1064752080u, 3106613409u, 1066627453u, 2735392257u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 449, 1065665372u, 2229777605u, 1065061963u, 2405869925u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 450, 3239463229u, 3967957902u, 1057416138u, 3459188071u, 3239463232u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 451, 1068639210u, 3699016825u, 3249713090u, 796144848u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 452, 3228816396u, 3285165564u, 3211948811u, 401510871u, 3228819456u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 453, 1094257658u, 634857910u, 3199607513u, 914218057u, 1094257658u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 454, 1083743336u, 2030735578u, 3233855943u, 965677531u, 1083743232u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 455, 1079556815u, 3957229084u, 1051050470u, 3123776651u, 1079541760u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 456, 3221863333u, 162122081u, 3239376395u, 108064594u, 3222274048u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 457, 3237271786u, 869031839u, 3225020876u, 1344301606u, 3237271792u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 458, 3214433474u, 946696117u, 3231825228u, 1700703647u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 459, 1075492875u, 3394168074u, 1076939786u, 1666995668u, 1075314688u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 460, 3208774795u, 2488789804u, 3238508333u, 1506943664u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1072693248u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 462, 3219934542u, 1244307192u, 3191297711u, 2540916692u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 463, 3200062692u, 2871645739u, 3239081581u, 1440249115u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 464, 1068350633u, 1231934926u, 3236746788u, 603977748u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 465, 3195449689u, 2386312545u, 1063169277u, 2715234268u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 466, 1087803418u, 915867083u, 1046790892u, 3347417612u, 1087803392u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 467, 1105984188u, 3553288373u, 1065698616u, 2906680663u, 1105984188u, 3552575488u, 0, FLOOR_TOLERANCE, 0},
+{ 468, 1045506226u, 2342364630u, 1051356723u, 4019093203u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 469, 3201169162u, 2911548084u, 1105282515u, 2476735795u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 470, 1050472772u, 1836216409u, 1101062307u, 2519592554u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 471, 1070178161u, 1235369496u, 3222946447u, 668087854u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 472, 3208554596u, 2981820811u, 1059838516u, 2845580478u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 473, 3193931414u, 1565550570u, 3217165795u, 4162017137u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 474, 3237251378u, 2808968027u, 1055630096u, 1782326814u, 3237251392u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 475, 1053576974u, 1492622658u, 3216653077u, 3972512122u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 476, 3222171679u, 2722693603u, 3227814791u, 3169731970u, 3222274048u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 477, 3217906631u, 899763203u, 3207606001u, 2804747833u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 478, 3230670325u, 3789058912u, 3228095081u, 4135937628u, 3230670848u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 479, 1060199382u, 1682808307u, 3206960335u, 232877759u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 480, 3242091486u, 2851963139u, 3246852961u, 2590862592u, 3242091487u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 481, 1081200406u, 2422232642u, 3234779662u, 290458310u, 1081196544u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 482, 3210671078u, 1082582386u, 1075605675u, 2602133689u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 483, 3239818611u, 1789635787u, 1059414278u, 1048286093u, 3239818612u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 484, 1098330542u, 231339448u, 1055573265u, 504907415u, 1098330542u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 485, 1063211461u, 1153251200u, 3204617090u, 1772013857u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 486, 1099551055u, 1082898276u, 3212089272u, 1449080862u, 1099551055u, 1073741824u, 0, FLOOR_TOLERANCE, 0},
+{ 487, 1086008285u, 3177299045u, 1058862813u, 809400815u, 1086008064u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 488, 3230854550u, 1924429710u, 1056464743u, 3349283177u, 3230855168u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 489, 3245473391u, 42238036u, 1042379500u, 2113559863u, 3245473391u, 268435456u, 0, FLOOR_TOLERANCE, 0},
+{ 490, 1064761243u, 3304403230u, 3217556703u, 58952646u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 491, 3212669530u, 1645486982u, 3224301095u, 3636267471u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 492, 1062762009u, 619402181u, 3235208235u, 557360557u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 493, 3238238394u, 110029735u, 1046937383u, 984375729u, 3238238400u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 494, 3189496738u, 4063688092u, 3203235744u, 1049950343u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 495, 1062350619u, 650996069u, 1054971928u, 3953359826u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 496, 3227055805u, 66926332u, 1090561839u, 1379780888u, 3227058176u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 497, 3233453307u, 2803378256u, 1086057989u, 498534626u, 3233453312u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 498, 1082618553u, 2846400785u, 1047142525u, 1375153550u, 1082617856u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 499, 1044581201u, 2869128958u, 1070972315u, 4246440273u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 500, 1051832506u, 3112381207u, 1044430965u, 3981604561u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 501, 3231254997u, 243303420u, 1093735824u, 1575581926u, 3231255552u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 502, 3239137997u, 3218865041u, 3204803496u, 3840388050u, 3239138000u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 503, 1048415431u, 336846959u, 1052664471u, 3798336786u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 504, 1055954236u, 3639240976u, 1081202165u, 1844741676u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 505, 3211904793u, 717293069u, 3211534283u, 582401011u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 506, 3251962512u, 3766248610u, 3196520332u, 1174437546u, 3251962512u, 3766484992u, 0, FLOOR_TOLERANCE, 0},
+{ 507, 1083431226u, 756959182u, 3204099341u, 1581804034u, 1083430912u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 508, 3205806444u, 3560686300u, 3220980617u, 4277975772u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 509, 3209906076u, 2598148853u, 3217622194u, 3460421008u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 510, 1066720824u, 136600515u, 3209934920u, 3340653128u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 511, 1096820310u, 1045480938u, 3251354609u, 4133432965u, 1096820310u, 536870912u, 0, FLOOR_TOLERANCE, 0},
+{ 512, 1091599431u, 1630207738u, 3239996829u, 2393354808u, 1091599428u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 513, 3190626018u, 3739770117u, 1059520750u, 3959551225u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 514, 3230730505u, 1498861716u, 1091297147u, 847410798u, 3230731264u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 1072693248u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 516, 1054849265u, 2353103845u, 3235718771u, 2978889966u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 517, 3251357992u, 1546972125u, 3249076079u, 1987349196u, 3251357992u, 1551892480u, 0, FLOOR_TOLERANCE, 0},
+{ 518, 3238219513u, 2769161072u, 1075207126u, 292616282u, 3238219520u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 519, 3199712298u, 36855311u, 1052128202u, 1479039342u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 520, 1083757053u, 2027463605u, 1066023013u, 3369686340u, 1083756544u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 521, 3197852749u, 3808681655u, 1054161346u, 1821773119u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 522, 1040685928u, 3175490326u, 3226879970u, 845687760u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 523, 1042302993u, 3124482451u, 3242748377u, 3259417226u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 524, 1045245695u, 2751606436u, 3236210939u, 3923142740u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 525, 1095694737u, 2016872044u, 3228408064u, 4201274408u, 1095694737u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 526, 3199349254u, 1019916843u, 3219974785u, 1977881787u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 527, 3199478752u, 2060433318u, 1075872515u, 366073725u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 528, 3191180557u, 1098469906u, 1082900695u, 2349346832u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 529, 3209974707u, 3011196295u, 3252479932u, 2459281672u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 530, 3221334323u, 2843222682u, 1089275809u, 298982001u, 3221749760u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 531, 1101737698u, 914741728u, 3203468059u, 2833809843u, 1101737698u, 905969664u, 0, FLOOR_TOLERANCE, 0},
+{ 532, 3236763878u, 1274901962u, 3241535845u, 3759113509u, 3236763904u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 533, 3245916442u, 2134927252u, 3253802671u, 3013731444u, 3245916442u, 2147483648u, 0, FLOOR_TOLERANCE, 0},
+{ 534, 1099201341u, 2230655177u, 3254510616u, 1249674366u, 1099201341u, 2147483648u, 0, FLOOR_TOLERANCE, 0},
+{ 535, 1062971253u, 717357389u, 1083533731u, 3746683362u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 536, 3213773114u, 834976849u, 3217357661u, 2465861779u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 537, 1045656117u, 1385714428u, 1053358395u, 3007113740u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 538, 1050527919u, 599268545u, 3201368210u, 2309854744u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 539, 1069954454u, 2840234388u, 3232496515u, 333365983u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 540, 1045922781u, 3136078996u, 3194520860u, 2650572904u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 541, 3233687691u, 2405805086u, 3251640319u, 324233833u, 3233687808u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 542, 1106699146u, 2589598340u, 3254677807u, 952438812u, 1106699146u, 2588934144u, 0, FLOOR_TOLERANCE, 0},
+{ 543, 3189114773u, 1922837702u, 3216892718u, 3535907549u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 544, 3243615868u, 261447440u, 3209805849u, 1150571079u, 3243615868u, 1073741824u, 0, FLOOR_TOLERANCE, 0},
+{ 545, 1095805232u, 4026487528u, 1073152064u, 27340691u, 1095805232u, 3221225472u, 0, FLOOR_TOLERANCE, 0},
+{ 546, 3229123692u, 338765118u, 1086225786u, 3207238249u, 3229126656u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 547, 3196182703u, 1085283176u, 3187775111u, 1601194210u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 548, 1091520173u, 3031712790u, 3252307859u, 170666844u, 1091520168u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 549, 3218862231u, 3148395674u, 1041913758u, 3306391490u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 550, 3201277070u, 2205233857u, 3208100078u, 3993195511u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 551, 1067699608u, 4282766727u, 1072820377u, 1874778218u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 552, 3210833092u, 2920860798u, 3218070226u, 3104066154u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 553, 3204950351u, 969991373u, 3250596895u, 1734386152u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 554, 3238915818u, 1218740205u, 3239802737u, 2610078504u, 3238915824u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 555, 3206031242u, 1485218325u, 3220870240u, 3591664613u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 556, 3202074143u, 690157417u, 3190850619u, 4192347699u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 557, 1096053810u, 4009839784u, 1079670252u, 394167192u, 1096053810u, 3221225472u, 0, FLOOR_TOLERANCE, 0},
+{ 558, 3234559237u, 961532417u, 1092588071u, 2923790239u, 3234559360u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 559, 3203879091u, 4174125604u, 1050682630u, 2169701868u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 560, 3243092475u, 4146748230u, 1087373950u, 2481478351u, 3243092476u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 561, 1076987866u, 3984715440u, 1050421618u, 2446142566u, 1076953088u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 562, 1084172406u, 936290150u, 1100614426u, 3625806370u, 1084172288u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 563, 1099787952u, 1866615265u, 3215651428u, 2337013350u, 1099787952u, 1744830464u, 0, FLOOR_TOLERANCE, 0},
+{ 564, 3253198302u, 712227971u, 1106004723u, 973148499u, 3253198302u, 713031680u, 0, FLOOR_TOLERANCE, 0},
+{ 565, 3230088199u, 3409813738u, 3244817008u, 1933503498u, 3230089216u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 566, 1079943733u, 3180389060u, 3228735703u, 83422217u, 1079934976u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 567, 1077878724u, 556972671u, 3204582372u, 841555801u, 1077870592u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 568, 1070767721u, 4189151332u, 1080874032u, 706326922u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 569, 1096151307u, 198291836u, 1057281892u, 2188836928u, 1096151307u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 570, 1078091995u, 1219449298u, 3228734687u, 3504562743u, 1078067200u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 571, 3204570464u, 1776099219u, 1094316777u, 4188083896u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 572, 3193845708u, 2614400266u, 1073750227u, 3003203347u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 573, 3213982678u, 2959351406u, 1105603716u, 311851587u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 574, 1084544434u, 865443613u, 1097532516u, 3622237781u, 1084544000u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 575, 3231786666u, 447506102u, 3195759295u, 3603669725u, 3231787008u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 576, 1097890173u, 3934398273u, 1040996422u, 2968621268u, 1097890173u, 3758096384u, 0, FLOOR_TOLERANCE, 0},
+{ 577, 3196739825u, 784208771u, 1088764788u, 2182296421u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 578, 3248332291u, 1527590526u, 3206961556u, 2823164069u, 3248332291u, 1543503872u, 0, FLOOR_TOLERANCE, 0},
+{ 579, 3236644131u, 3876699591u, 3207481130u, 4028148535u, 3236644160u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 580, 1083576186u, 2164249756u, 1059857743u, 1785169952u, 1083575296u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 581, 1091804009u, 2079273665u, 1080303860u, 625760474u, 1091804008u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 582, 3226486108u, 3636214836u, 1068367620u, 2932621925u, 3226501120u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 583, 1043995372u, 4274131512u, 1047707755u, 92550763u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 584, 3198822121u, 2648933384u, 1084603503u, 3534304873u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 585, 1064563235u, 3216750767u, 3191088629u, 547482628u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 586, 1061084774u, 1420360746u, 1080063101u, 1690029499u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 587, 3229855364u, 1908572179u, 1080112083u, 1228319033u, 3229855744u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 588, 1048158178u, 500312015u, 3212368508u, 3864619086u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 589, 3221335610u, 4211343447u, 1087492676u, 4272583781u, 3221749760u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 590, 1099392394u, 2382118000u, 1042665328u, 567154882u, 1099392394u, 2281701376u, 0, FLOOR_TOLERANCE, 0},
+{ 591, 1058013442u, 1435344339u, 3216303171u, 2275988178u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 592, 3214538619u, 3403659753u, 3218043030u, 1926480488u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 593, 1076840383u, 1198845185u, 3225556149u, 1130089684u, 1076756480u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 594, 3222663042u, 2183928090u, 1048403956u, 963834821u, 3222798336u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 595, 1101672960u, 2120625396u, 1041006976u, 2137548527u, 1101672960u, 2113929216u, 0, FLOOR_TOLERANCE, 0},
+{ 596, 1099230238u, 586700956u, 1059670521u, 303891699u, 1099230238u, 536870912u, 0, FLOOR_TOLERANCE, 0},
+{ 597, 3218994498u, 2509132460u, 1102827530u, 2205707903u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 598, 3204860597u, 1229308263u, 3209170414u, 4206576047u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 599, 3224076289u, 4078010749u, 3199236456u, 733478972u, 3224109056u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 600, 3197712584u, 4277541051u, 3199806921u, 397102023u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 601, 3195975013u, 900999594u, 3234720188u, 2530214248u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 602, 1076543548u, 4000609478u, 1096577064u, 4148592328u, 1076494336u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 603, 1048668084u, 2154187873u, 3224392607u, 3957250362u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 604, 3223413488u, 2867079200u, 1101870326u, 921212001u, 3223453696u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 605, 3233221890u, 674547716u, 1063216239u, 3929755226u, 3233222144u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 606, 3240415851u, 3158182449u, 1043794244u, 3259056345u, 3240415852u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 607, 3236776656u, 3002823940u, 1059511739u, 2832435794u, 3236776672u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 608, 3217304822u, 2196511929u, 1049973941u, 3672092877u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 609, 1050438056u, 3655292191u, 1086438127u, 3567072906u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 610, 3243186948u, 1617573614u, 3201863123u, 3090723732u, 3243186948u, 2147483648u, 0, FLOOR_TOLERANCE, 0},
+{ 611, 3233201380u, 679893506u, 3211547753u, 824081024u, 3233201408u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 612, 1089530525u, 2285242807u, 1084999409u, 2221731406u, 1089530512u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 613, 3206733664u, 1935990727u, 1088822246u, 1058156518u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 614, 1102839166u, 521023584u, 1059186903u, 4245163857u, 1102839166u, 520093696u, 0, FLOOR_TOLERANCE, 0},
+{ 615, 1103891140u, 2312887617u, 3191771354u, 1885370807u, 1103891140u, 2306867200u, 0, FLOOR_TOLERANCE, 0},
+{ 616, 3252953815u, 1796441468u, 1100030327u, 2772711004u, 3252953815u, 1797259264u, 0, FLOOR_TOLERANCE, 0},
+{ 617, 3204276820u, 2095685003u, 1077984448u, 2100773742u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 618, 3192954620u, 2892538035u, 1042396334u, 4162200338u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 619, 3242725751u, 2177698116u, 3227557177u, 150832500u, 3242725752u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 620, 3191562216u, 607966734u, 3236250630u, 4164600559u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 621, 3216389812u, 2830122967u, 1046096700u, 3713346883u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 622, 3237197963u, 2314640506u, 3203696416u, 3276228872u, 3237197968u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 623, 3212912307u, 469331883u, 3249037349u, 2999233437u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 624, 1097382011u, 560886625u, 1091899487u, 748795120u, 1097382011u, 536870912u, 0, FLOOR_TOLERANCE, 0},
+{ 625, 1049886858u, 2958421324u, 1092569414u, 3235243477u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 626, 3193026497u, 3221475559u, 1043038304u, 915608434u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 627, 1071197530u, 3007808652u, 3216682290u, 2531019474u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 628, 3242028999u, 1767658578u, 3237045269u, 2313128318u, 3242029000u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 629, 3210617892u, 1926845182u, 1066835624u, 1783256828u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 630, 1040575629u, 90378038u, 1057168870u, 164358218u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 631, 1106859172u, 1610524680u, 1085283851u, 2903496007u, 1106859172u, 1609564160u, 0, FLOOR_TOLERANCE, 0},
+{ 632, 1078635586u, 4274321404u, 3202913591u, 720121831u, 1078624256u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 633, 1051205256u, 2034778236u, 1071133763u, 1413236391u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 634, 1051063028u, 1489112261u, 1076691395u, 348210906u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 635, 3206743917u, 2797651324u, 3224410527u, 2374818327u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 636, 1088287256u, 1823161666u, 3197810695u, 3119680047u, 1088287232u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 637, 1065927336u, 3420950657u, 1087084743u, 2136638961u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 638, 1069902224u, 3554566429u, 1062907717u, 2736702589u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 639, 3244888667u, 2928437580u, 3187765027u, 1393427873u, 3244888667u, 3221225472u, 0, FLOOR_TOLERANCE, 0},
+{ 640, 3209301561u, 189447067u, 1051643315u, 828663513u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 641, 1052313869u, 2852350928u, 1045683757u, 673354280u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 642, 1043946301u, 3589563265u, 3248741629u, 812657927u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 643, 3190610826u, 1766416701u, 1100392103u, 2185373290u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 644, 3220275389u, 3763582673u, 3191965790u, 388374829u, 3221225472u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 645, 1079635136u, 1187403069u, 1075300235u, 336640304u, 1079623680u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 646, 1103926251u, 1718795752u, 3243118752u, 683369237u, 1103926251u, 1711276032u, 0, FLOOR_TOLERANCE, 0},
+{ 647, 3210792097u, 1863545307u, 1069449477u, 3418627399u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 648, 1069601294u, 3295607249u, 1068878592u, 1633297809u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 649, 1058947127u, 2585980994u, 3236670483u, 1286750688u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 650, 1046157033u, 15816845u, 3233249283u, 2491924775u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 651, 1042413021u, 1051983351u, 1049180786u, 1474421917u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 652, 3201249525u, 2003816032u, 1086050104u, 668090487u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 653, 1052556037u, 3671484625u, 1067020039u, 430024694u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 654, 1067397110u, 3991830201u, 3207808714u, 1021245839u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 655, 1064194391u, 4255801807u, 3207681716u, 1926756877u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 656, 1052140785u, 4167786896u, 1077097744u, 1775517981u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 657, 1085601978u, 3187518564u, 1082437406u, 944672491u, 1085601792u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 658, 1049366282u, 953085192u, 3227310828u, 3459155777u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 659, 1069502506u, 1908555460u, 1073640207u, 260441967u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 660, 1067219606u, 250762477u, 1072582645u, 2886742039u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 661, 3250906006u, 786180031u, 3197734769u, 2788918312u, 3250906006u, 788529152u, 0, FLOOR_TOLERANCE, 0},
+{ 662, 3234511827u, 2055912467u, 3244244909u, 1394142937u, 3234511872u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 663, 1069612985u, 91984146u, 3222252812u, 4126276047u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 664, 1081340139u, 3942715706u, 3239316352u, 410676547u, 1081339904u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 665, 3198557846u, 86296211u, 1085850694u, 649202596u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 666, 3245366392u, 3069064472u, 3237358008u, 23209276u, 3245366392u, 3221225472u, 0, FLOOR_TOLERANCE, 0},
+{ 667, 1081235288u, 1867297860u, 1072956607u, 2513414118u, 1081233408u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 668, 3250533347u, 3171788768u, 3235208783u, 162138697u, 3250533347u, 3187671040u, 0, FLOOR_TOLERANCE, 0},
+{ 669, 1081728455u, 1245110700u, 1081653954u, 2584994077u, 1081724928u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 670, 3245510120u, 3347226587u, 1058962932u, 2291943376u, 3245510120u, 3489660928u, 0, FLOOR_TOLERANCE, 0},
+{ 671, 1058899062u, 966940828u, 1060726420u, 2798041096u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1072693248u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 673, 3248116497u, 1671039260u, 1086395032u, 3745833360u, 3248116497u, 1677721600u, 0, FLOOR_TOLERANCE, 0},
+{ 674, 1057078797u, 651714217u, 1047070645u, 2130549237u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 675, 3207115731u, 1423000172u, 3247822717u, 1551488170u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 676, 3201597307u, 921077236u, 3213332351u, 1431049019u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 677, 1067510295u, 655715547u, 3190985373u, 1527556471u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 678, 3227654979u, 4110878657u, 3251297180u, 879739345u, 3227656192u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 679, 1085804762u, 2623955764u, 1093699897u, 1216444475u, 1085804544u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 680, 1091905603u, 107442539u, 3239767031u, 1149813329u, 1091905600u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 681, 3233445240u, 1761361082u, 3226030205u, 1121849716u, 3233445376u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 682, 3240087115u, 2534144722u, 1044223733u, 3512285706u, 3240087116u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 683, 3211846077u, 4073670723u, 1050729852u, 3034818849u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 684, 1101984574u, 1421423503u, 1060278048u, 1397153092u, 1101984574u, 1409286144u, 0, FLOOR_TOLERANCE, 0},
+{ 685, 3217421829u, 1649206019u, 1104525577u, 1267104290u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 686, 3189302097u, 3775270392u, 1040251850u, 68667319u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 687, 3204330900u, 3099226694u, 3254103006u, 4020102648u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 688, 3201591712u, 3718441177u, 3215643451u, 4032951536u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 689, 1044131371u, 508048351u, 3210196713u, 1707937896u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 690, 3198611627u, 2784738160u, 1073435430u, 1109346010u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 691, 3225725290u, 3331916473u, 3238794568u, 2707019594u, 3225747456u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 692, 1093182670u, 3093165197u, 1072894805u, 2853215019u, 1093182670u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 693, 3216582139u, 2135797997u, 1048399559u, 2941926126u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 694, 1048430980u, 2083412145u, 3249335391u, 507212448u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 695, 1075363751u, 4270176401u, 3246546709u, 3288753319u, 1075314688u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 696, 3247932863u, 3692175292u, 3197271515u, 3989064196u, 3247932863u, 3758096384u, 0, FLOOR_TOLERANCE, 0},
+{ 697, 3251691738u, 3111924274u, 1066772558u, 59281695u, 3251691738u, 3112173568u, 0, FLOOR_TOLERANCE, 0},
+{ 698, 1067683911u, 2135245466u, 3208804313u, 3846547392u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 699, 1094877811u, 972051266u, 3222814246u, 3539700586u, 1094877811u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 700, 3202965930u, 330951080u, 1079189813u, 583922384u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 701, 1089640092u, 1711944085u, 1104170032u, 643991456u, 1089640080u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 702, 3234429549u, 2072550721u, 3250147641u, 4280263530u, 3234429568u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 703, 3192972706u, 1566376352u, 1067251433u, 72984588u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 704, 1095276569u, 3103043079u, 1045853123u, 410067497u, 1095276569u, 2147483648u, 0, FLOOR_TOLERANCE, 0},
+{ 705, 3216672493u, 1910366299u, 1081770885u, 634683073u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 706, 1081530688u, 2226525875u, 3224149290u, 2126302825u, 1081528320u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1072693248u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 708, 1066482943u, 1953339096u, 1077176252u, 1476516558u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 709, 1066092000u, 1306277326u, 1079089150u, 4093716191u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 710, 3233148787u, 51750045u, 3242913901u, 4256866157u, 3233148928u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 711, 3195084967u, 2163853087u, 3232053146u, 2962422808u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 712, 1075516945u, 1618388148u, 3233154824u, 3711953164u, 1075314688u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 713, 3246868002u, 357108214u, 3202294604u, 2306775262u, 3246868002u, 402653184u, 0, FLOOR_TOLERANCE, 0},
+{ 714, 3201904086u, 2571356437u, 3249064063u, 2394851808u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 715, 3230488091u, 4273880094u, 1103698617u, 3578832032u, 3230488576u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 716, 3233426701u, 2091068742u, 3228270226u, 3980489730u, 3233426944u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 717, 3229016752u, 2772307714u, 1051008486u, 32546576u, 3229020160u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 718, 3241229215u, 2143788498u, 3195498043u, 3630119231u, 3241229216u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 719, 3198632935u, 2527385594u, 3240503648u, 3482095012u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 720, 3242168799u, 2690097362u, 1068598730u, 2360266862u, 3242168800u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 721, 1058857869u, 2673272949u, 1082639557u, 522449749u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 722, 1104424147u, 3596379400u, 3242016775u, 2002293002u, 1104424147u, 3594518528u, 0, FLOOR_TOLERANCE, 0},
+{ 723, 1099439656u, 4113224369u, 3222122439u, 2152316893u, 1099439656u, 4026531840u, 0, FLOOR_TOLERANCE, 0},
+{ 724, 3220796716u, 31662602u, 1047721249u, 1747087514u, 3221225472u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 725, 3250463757u, 2489659568u, 1097051253u, 277506957u, 3250463757u, 2499805184u, 0, FLOOR_TOLERANCE, 0},
+{ 726, 3191401834u, 3850162281u, 3213841942u, 438724093u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 727, 1095392535u, 2431814052u, 1075518084u, 2672434118u, 1095392535u, 2147483648u, 0, FLOOR_TOLERANCE, 0},
+{ 728, 3243162735u, 391606792u, 1048184750u, 4168944276u, 3243162735u, 2147483648u, 0, FLOOR_TOLERANCE, 0},
+{ 729, 3247792416u, 457529672u, 3201090276u, 72407935u, 3247792416u, 469762048u, 0, FLOOR_TOLERANCE, 0},
+{ 730, 3218720719u, 3954981400u, 1052053242u, 2411049585u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 731, 1086180091u, 485456950u, 1088415093u, 1655397424u, 1086179840u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 732, 3198234428u, 1551748070u, 3236871640u, 1329701152u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 733, 3224639122u, 3099222537u, 1104984570u, 4293792842u, 3224698880u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 734, 3203949705u, 3603065260u, 3197735968u, 2402359253u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 735, 3198824584u, 3961208159u, 3219057584u, 2340553876u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 736, 1074881909u, 4014841779u, 3197672877u, 3697233334u, 1074790400u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 737, 3213275657u, 1403876392u, 3254028950u, 921363393u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 738, 1107251806u, 1862576361u, 3194031708u, 2476290925u, 1107251806u, 1862270976u, 0, FLOOR_TOLERANCE, 0},
+{ 739, 1049661768u, 1454212851u, 1088378861u, 3400401866u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 1074266112u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 741, 3216409282u, 1199568671u, 3225679997u, 46947405u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 742, 1077685537u, 2596231448u, 3253943728u, 2219151748u, 1077673984u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 743, 1066527035u, 4119719558u, 3222036299u, 1275474618u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 744, 3239908663u, 3347296825u, 1101507910u, 1254014794u, 3239908664u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 745, 1084119992u, 673775040u, 1070743626u, 244126093u, 1084119040u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 746, 3203199850u, 1832066983u, 1051358028u, 3262483417u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 747, 1077559600u, 3962610501u, 3198598777u, 849269178u, 1077542912u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 748, 3235473900u, 2497516122u, 3254374111u, 2821429629u, 3235473920u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 749, 1076236288u, 2805941787u, 3217785843u, 779131141u, 1076232192u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 750, 3226908686u, 723423605u, 1084533420u, 627282213u, 3226910720u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 751, 3215947680u, 4292778869u, 1078101071u, 1676860147u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 752, 1076288502u, 3528118587u, 3194648564u, 2363260897u, 1076232192u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 753, 3192897879u, 1307010018u, 1061248120u, 1468743108u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 754, 3246583139u, 107905661u, 3226089788u, 1943427674u, 3246583139u, 134217728u, 0, FLOOR_TOLERANCE, 0},
+{ 755, 3188230541u, 760006940u, 1054265604u, 1749976597u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 756, 3237773384u, 2787503556u, 1081282610u, 1195841206u, 3237773392u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 757, 3191802156u, 545462045u, 3208381743u, 1981311808u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 758, 1061232136u, 3657978397u, 1104463616u, 3501253426u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 759, 1049883857u, 1804177501u, 3210693633u, 3606766729u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 760, 1076856879u, 1336278526u, 1043741618u, 3165279431u, 1076756480u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 761, 1055471915u, 1599382075u, 1058018527u, 4212580517u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 762, 3207502326u, 3007589929u, 3202026547u, 2792028313u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 763, 3253082770u, 1866066996u, 1060329048u, 3727175322u, 3253082770u, 1866465280u, 0, FLOOR_TOLERANCE, 0},
+{ 764, 3198416643u, 150890940u, 1056025306u, 3082724735u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 765, 1062008939u, 80400395u, 1093584426u, 3478941315u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 766, 3251640614u, 4050954182u, 3219263194u, 2537475930u, 3251640614u, 4051697664u, 0, FLOOR_TOLERANCE, 0},
+{ 767, 1064841871u, 2881752155u, 3212589299u, 2559651278u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 768, 3249016304u, 440309030u, 3214267461u, 3788040806u, 3249016304u, 469762048u, 0, FLOOR_TOLERANCE, 0},
+{ 769, 1100476615u, 918813144u, 3208535698u, 1607035904u, 1100476615u, 872415232u, 0, FLOOR_TOLERANCE, 0},
+{ 770, 1042137451u, 2497054124u, 1089139147u, 2549609010u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 771, 1047037641u, 790219083u, 1054657139u, 2797979479u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 772, 1057781400u, 1149462078u, 1095765205u, 3879963182u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 773, 3202729813u, 2684353926u, 3205212854u, 1732474928u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 774, 1095236965u, 2742237025u, 1051317716u, 3386396147u, 1095236965u, 2147483648u, 0, FLOOR_TOLERANCE, 0},
+{ 775, 1063230986u, 3408320912u, 1103071166u, 4233059513u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 776, 1064863548u, 1077495917u, 1088399968u, 433115118u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 777, 3204547572u, 841366493u, 1051716814u, 4121125128u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 778, 1064632084u, 321857207u, 1089128010u, 1149988239u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 779, 3245542663u, 799866606u, 3197637091u, 3924438208u, 3245542663u, 805306368u, 0, FLOOR_TOLERANCE, 0},
+{ 780, 3191062890u, 2002049816u, 1077053447u, 2240354761u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 781, 3229006283u, 478939968u, 1097035749u, 1066716440u, 3229007872u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 782, 3232473641u, 1653104725u, 1088548129u, 81977716u, 3232474112u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 783, 3196861276u, 3899475018u, 3189694084u, 3330093036u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 784, 1089312583u, 2612450289u, 1079065127u, 603380842u, 1089312576u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 785, 1100636791u, 3962735564u, 1101570429u, 1372490825u, 1100636791u, 3959422976u, 0, FLOOR_TOLERANCE, 0},
+{ 786, 1054806016u, 1479841439u, 1059312257u, 541504905u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 787, 1078662178u, 2626148789u, 1057571099u, 4121656076u, 1078657024u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 788, 1081613389u, 1902560314u, 1043130231u, 3557671562u, 1081610240u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 789, 3193829772u, 41779312u, 1081626342u, 831171823u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 790, 1058131100u, 1393168821u, 1066457405u, 1381616968u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 791, 1072338141u, 3756584649u, 3222267229u, 1423157432u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 792, 3254435674u, 1894912556u, 1042426694u, 155024547u, 3254435674u, 1895825408u, 0, FLOOR_TOLERANCE, 0},
+{ 793, 3195453512u, 35164295u, 3203391785u, 1037041084u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 794, 1084777479u, 3957875950u, 3232195211u, 1590756436u, 1084777472u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 795, 1068844322u, 1447585080u, 1071279485u, 1107922438u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 796, 1046252518u, 981897615u, 1051856116u, 430357614u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 797, 3227524215u, 395145384u, 3219821938u, 50586510u, 3227525120u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 798, 1069775912u, 750827797u, 1082862669u, 230466783u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 799, 1086668819u, 1365083575u, 3204848310u, 1700831722u, 1086668800u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 800, 3218090390u, 344241827u, 1071538935u, 2715566077u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 801, 3247582856u, 4069301823u, 3193208760u, 2949125229u, 3247582856u, 4093640704u, 0, FLOOR_TOLERANCE, 0},
+{ 802, 1103231387u, 3585711710u, 1065801594u, 2302229267u, 1103231387u, 3581935616u, 0, FLOOR_TOLERANCE, 0},
+{ 803, 3194118956u, 709803845u, 1048741487u, 2296910194u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 804, 3193280779u, 744421179u, 1069302001u, 2659232829u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 805, 1092835968u, 1799949903u, 3192522886u, 4212149209u, 1092835968u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 806, 3206108502u, 145234164u, 3250614064u, 912384201u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 807, 3240510664u, 2784620507u, 1102812948u, 3531481022u, 3240510666u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 808, 3251159663u, 383952592u, 3205659905u, 3633194728u, 3251159663u, 385875968u, 0, FLOOR_TOLERANCE, 0},
+{ 809, 3203476252u, 3792395543u, 1070072378u, 3864816376u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 810, 3205316273u, 2115553675u, 1066288499u, 3538377867u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 811, 3252075185u, 1230026762u, 1090719723u, 440819880u, 3252075185u, 1233125376u, 0, FLOOR_TOLERANCE, 0},
+{ 812, 3194595076u, 2991290482u, 1096886719u, 1097971167u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 813, 1090048600u, 1098035020u, 3230900504u, 1479059095u, 1090048592u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 814, 3251056964u, 1719428427u, 3188631907u, 3707377409u, 3251056964u, 1719664640u, 0, FLOOR_TOLERANCE, 0},
+{ 815, 1053236165u, 3748932896u, 1084908557u, 1325384361u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 816, 1084704076u, 3979168763u, 1057455255u, 2454615952u, 1084703744u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 817, 1053106984u, 1449164578u, 1056960316u, 1654931641u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 818, 1071439010u, 2120487381u, 3226298974u, 2364226633u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 819, 1075071428u, 1074268944u, 1065730444u, 280016852u, 1075052544u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 820, 3200308256u, 3315127889u, 3236295594u, 2900924954u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 821, 3196425891u, 2246037502u, 1049691002u, 1496066550u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 822, 3193006859u, 4191285446u, 3217936236u, 2382392789u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 823, 1092833308u, 640099844u, 1042152237u, 2064279383u, 1092833308u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 824, 1079913438u, 3468560824u, 1093251038u, 310958750u, 1079902208u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 825, 1096788400u, 1413568905u, 1100941106u, 1627289946u, 1096788400u, 1073741824u, 0, FLOOR_TOLERANCE, 0},
+{ 826, 3191549550u, 3797143370u, 3195497539u, 3843275034u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 827, 3252077393u, 2806642640u, 3201943068u, 2515980718u, 3252077393u, 2810183680u, 0, FLOOR_TOLERANCE, 0},
+{ 828, 1086877316u, 632580632u, 1078673506u, 3259601317u, 1086877312u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 829, 3200980575u, 3309678799u, 1049337078u, 3056787074u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 830, 3221495289u, 2341164249u, 1080834967u, 2810890005u, 3221749760u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 831, 1067019674u, 932124675u, 1093915797u, 662682630u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 832, 3249230091u, 1367996113u, 3251723684u, 2974064663u, 3249230091u, 1375731712u, 0, FLOOR_TOLERANCE, 0},
+{ 833, 1080230731u, 323437999u, 1090499064u, 901457511u, 1080229888u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 834, 3235778876u, 4184941840u, 3196770014u, 2458988443u, 3235778880u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 835, 1087618284u, 2023065054u, 3211994098u, 2734612965u, 1087618240u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 836, 1064074694u, 3679267365u, 3237728785u, 1699558211u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 837, 1088079010u, 1826799031u, 1078709629u, 3986905229u, 1088078976u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 838, 1052843785u, 351061688u, 3194386466u, 4105857588u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 839, 1054128006u, 1365244058u, 1064457319u, 1452191426u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 840, 1064122385u, 2463030625u, 3215975031u, 3773488326u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 841, 3251276671u, 752664055u, 1065110394u, 1835931663u, 3251276671u, 754974720u, 0, FLOOR_TOLERANCE, 0},
+{ 842, 1088045088u, 3496172149u, 1089617208u, 109068701u, 1088045056u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 843, 3198135087u, 1636966254u, 1086098766u, 2016598298u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 844, 1050931318u, 3551516956u, 1097969102u, 1317953425u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 845, 3229832217u, 2977627788u, 1045339018u, 516058480u, 3229833216u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 846, 3237408578u, 3901731263u, 3189566462u, 32272932u, 3237408592u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 847, 1077281796u, 1956025297u, 3246628529u, 3840733905u, 1077280768u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 848, 1099818036u, 561057891u, 3198494340u, 4271027193u, 1099818036u, 536870912u, 0, FLOOR_TOLERANCE, 0},
+{ 849, 3250929921u, 692989850u, 3242630588u, 2492225971u, 3250929921u, 696254464u, 0, FLOOR_TOLERANCE, 0},
+{ 850, 3205479397u, 3439913962u, 1067477011u, 2973333638u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 851, 3213993989u, 877613377u, 1044917899u, 809672798u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 852, 3222171454u, 905426932u, 1046417457u, 1086320855u, 3222274048u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 853, 3246346629u, 2645567288u, 1051258339u, 557182478u, 3246346629u, 2684354560u, 0, FLOOR_TOLERANCE, 0},
+{ 854, 3204057950u, 186287752u, 1061342054u, 4054003419u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 855, 1097266673u, 3506889716u, 3243866036u, 519056371u, 1097266673u, 3221225472u, 0, FLOOR_TOLERANCE, 0},
+{ 856, 1042654053u, 2171898436u, 3246911982u, 1091500784u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 857, 3243647673u, 368493885u, 3222871893u, 1419055230u, 3243647673u, 1073741824u, 0, FLOOR_TOLERANCE, 0},
+{ 858, 1091950572u, 2010971245u, 3188804530u, 1518695799u, 1091950572u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 859, 3205426509u, 1239207795u, 1040192984u, 2199481342u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 860, 3210978637u, 4264613432u, 3203460972u, 3558930895u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 861, 1050299283u, 3772748958u, 3227667376u, 309688336u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 862, 3230743041u, 1077949160u, 1075769893u, 2405271377u, 3230743552u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 863, 1091835152u, 3751608506u, 3232278094u, 930375071u, 1091835152u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 864, 3198617153u, 1518334131u, 3205247482u, 791756713u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 865, 1047317453u, 2825203170u, 3245054001u, 1822981827u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 866, 1100016363u, 514474738u, 1089072073u, 3300845441u, 1100016363u, 469762048u, 0, FLOOR_TOLERANCE, 0},
+{ 867, 3216391250u, 247369460u, 3197320093u, 687450958u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 868, 1104161422u, 2722237629u, 1058272368u, 90602316u, 1104161422u, 2722103296u, 0, FLOOR_TOLERANCE, 0},
+{ 869, 3208098435u, 1845900544u, 3231520830u, 3389751458u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 870, 3247535245u, 737689911u, 3195377751u, 3462616966u, 3247535245u, 738197504u, 0, FLOOR_TOLERANCE, 0},
+{ 871, 3223538384u, 3620285831u, 1055501023u, 2708056059u, 3223584768u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 872, 3219464996u, 4073430285u, 1056206159u, 172017902u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 873, 3212869638u, 2799176222u, 1052706894u, 4083892667u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 874, 3202279557u, 1562351330u, 1069705601u, 1247765260u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 875, 3232717299u, 51853475u, 3189080201u, 2783553144u, 3232717312u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 876, 3219454353u, 3851781549u, 3241598113u, 514064046u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 877, 1100045965u, 934745487u, 3248182437u, 2798581921u, 1100045965u, 872415232u, 0, FLOOR_TOLERANCE, 0},
+{ 878, 3213082493u, 2948648757u, 3232177250u, 4278702895u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 879, 1072485724u, 4259101461u, 1061606772u, 84229920u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 880, 3198075559u, 3891230598u, 1095924595u, 3049217547u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 881, 1077353053u, 3806018919u, 3243191216u, 280177341u, 1077346304u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 882, 1060624530u, 3900344258u, 1063647809u, 4206745890u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 883, 3227707336u, 2126253040u, 3207248026u, 808507485u, 3227713536u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 884, 1086090317u, 3465685634u, 3230391053u, 3754958214u, 1086090240u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 885, 1102861084u, 461094531u, 1101110393u, 1316091396u, 1102861084u, 452984832u, 0, FLOOR_TOLERANCE, 0},
+{ 886, 1064980314u, 4197635149u, 1091873113u, 1240127141u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 1074266112u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 888, 3213429165u, 3744663425u, 3212482771u, 953662066u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 889, 1085171305u, 3564196690u, 3228101916u, 904305212u, 1085171200u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 890, 1048333111u, 3566257266u, 3235138829u, 2734275140u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 891, 3243948477u, 606044282u, 3241318094u, 2446416887u, 3243948477u, 1073741824u, 0, FLOOR_TOLERANCE, 0},
+{ 892, 1041627284u, 2336116589u, 3197594053u, 2296925138u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 893, 1058567659u, 907670625u, 3240769036u, 1827119006u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 894, 1044467183u, 2818710946u, 3246059905u, 553394170u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 895, 3189504094u, 4099522736u, 3232742168u, 3718083858u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 896, 1092371276u, 1059279404u, 1080245336u, 175941677u, 1092371276u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 897, 1105189691u, 1650862428u, 1061816101u, 1723201723u, 1105189691u, 1648361472u, 0, FLOOR_TOLERANCE, 0},
+{ 898, 3239012814u, 2462163405u, 3218946201u, 3876535372u, 3239012816u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 899, 1084392886u, 495844137u, 1073721460u, 772777946u, 1084392448u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 900, 1052415330u, 458757721u, 3245680321u, 3609892707u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 901, 3193282956u, 2533012202u, 1079980803u, 3592268374u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 902, 3203364780u, 4108274117u, 1063045844u, 571992389u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 903, 1090567271u, 3541110973u, 1096296754u, 3118427427u, 1090567264u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 904, 3193980043u, 1213941007u, 1105433735u, 2172963370u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 905, 1096853359u, 272190288u, 1095452370u, 4026581530u, 1096853359u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 906, 1095583909u, 2843638672u, 1100510986u, 3190536898u, 1095583909u, 2147483648u, 0, FLOOR_TOLERANCE, 0},
+{ 907, 1083757094u, 2014317727u, 3247389683u, 2428462015u, 1083756544u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 908, 1093976717u, 688442200u, 1047852515u, 3035186380u, 1093976717u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 909, 1076664212u, 1010095511u, 3221288076u, 405287991u, 1076625408u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 910, 3252294615u, 2983070435u, 1089546472u, 2907918480u, 3252294615u, 2986344448u, 0, FLOOR_TOLERANCE, 0},
+{ 911, 1082988121u, 81928569u, 1056007286u, 2740556321u, 1082986496u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 912, 1041110867u, 2076689028u, 1081558619u, 3039159031u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 913, 1047307438u, 1376882094u, 3211003208u, 1296286481u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 914, 1080114314u, 744133164u, 3200943494u, 955832216u, 1080107008u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 915, 3226290326u, 176522478u, 1069999908u, 2891249491u, 3226304512u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 916, 1043564602u, 3685851715u, 3187829932u, 2363997529u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 917, 1040244055u, 3974431579u, 1052505165u, 2589067816u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 918, 3191496789u, 3819109588u, 1048561488u, 969143351u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 919, 1072639397u, 4246896124u, 1104584799u, 1940097860u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 920, 1048038468u, 2228686199u, 3220231833u, 777624847u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 921, 3231467306u, 4189906558u, 3203004203u, 854242364u, 3231467520u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 922, 1103910407u, 4089051094u, 3227282692u, 2693170723u, 1103910407u, 4085252096u, 0, FLOOR_TOLERANCE, 0},
+{ 923, 1045883607u, 1278581412u, 3239296746u, 1774588717u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 924, 3222372686u, 1794845306u, 1104879344u, 4135865182u, 3222536192u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 925, 1106449055u, 754938390u, 1061291430u, 2010786993u, 1106449055u, 753926144u, 0, FLOOR_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 1072693248u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 927, 3231449194u, 567588900u, 3195452230u, 1421366017u, 3231450112u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 928, 3225089755u, 2708717091u, 1071975971u, 1364590470u, 3225092096u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 929, 3252137283u, 3461956134u, 3207820115u, 1605709634u, 3252137283u, 3464495104u, 0, FLOOR_TOLERANCE, 0},
+{ 930, 1065302996u, 1497124553u, 1051715442u, 916736957u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 931, 1058468363u, 834914365u, 1064667143u, 2839166298u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 932, 1057279949u, 2139295776u, 1062816721u, 914592523u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 933, 3189636931u, 851569132u, 1058503154u, 1399378677u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 934, 3233537697u, 3897202342u, 3245382590u, 246600375u, 3233537792u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 935, 3225460308u, 3620429520u, 1055627557u, 229305u, 3225485312u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 936, 1083958833u, 3641997865u, 3206673888u, 93720614u, 1083958272u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 937, 3227808435u, 32766320u, 1062084905u, 3668443038u, 3227811840u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 938, 3223298996u, 2039713492u, 3248699388u, 1346210821u, 3223322624u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 939, 1093050016u, 1335820726u, 3191756860u, 1808427032u, 1093050016u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 940, 1061442763u, 650692001u, 1103515670u, 2253348763u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 941, 3191395187u, 2372623300u, 3210185343u, 3200572848u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 942, 1100796069u, 762317532u, 3194595095u, 3192607437u, 1100796069u, 738197504u, 0, FLOOR_TOLERANCE, 0},
+{ 943, 1062262701u, 217775356u, 3232827087u, 2969367386u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 944, 1057172551u, 3621353969u, 1077994795u, 3873976266u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 945, 1091301987u, 268372152u, 3221764390u, 3216978962u, 1091301984u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 946, 3246437611u, 142942404u, 1075322987u, 1746449109u, 3246437611u, 268435456u, 0, FLOOR_TOLERANCE, 0},
+{ 947, 1104006296u, 496534875u, 3254522293u, 2532372502u, 1104006296u, 494927872u, 0, FLOOR_TOLERANCE, 0},
+{ 948, 3250225541u, 2999955409u, 3222793392u, 1868977643u, 3250225541u, 3003121664u, 0, FLOOR_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 1074266112u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 950, 1068218799u, 73646871u, 3231442171u, 3711510104u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 951, 1090483524u, 218135177u, 3198908856u, 3082199105u, 1090483520u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 952, 1068068480u, 1061628117u, 3248859043u, 86776158u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 953, 3208484674u, 938869114u, 1087911145u, 2416710759u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 954, 1095576832u, 2970853959u, 3239543429u, 1887505029u, 1095576832u, 2147483648u, 0, FLOOR_TOLERANCE, 0},
+{ 955, 3237728787u, 1337895935u, 1076463812u, 1172733328u, 3237728800u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 956, 1049139928u, 1469010822u, 3229583535u, 551399515u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 1073741824u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 958, 3242138780u, 2976596113u, 3192137295u, 3033242648u, 3242138781u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 959, 1098698481u, 876810930u, 3197470945u, 2571587447u, 1098698481u, 805306368u, 0, FLOOR_TOLERANCE, 0},
+{ 960, 3241770810u, 4007797282u, 3225853845u, 4069319648u, 3241770811u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 961, 1047279982u, 3840538373u, 1043189552u, 3668774580u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 962, 3217611704u, 200857661u, 3229758439u, 3359367736u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 963, 3248797869u, 111868139u, 3227902082u, 2366064003u, 3248797869u, 134217728u, 0, FLOOR_TOLERANCE, 0},
+{ 964, 1044195166u, 3510904416u, 3222131653u, 3822770497u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 965, 3242675715u, 789151814u, 1099269239u, 2958956055u, 3242675715u, 2147483648u, 0, FLOOR_TOLERANCE, 0},
+{ 966, 1084679320u, 722163228u, 1105524559u, 1534462169u, 1084679168u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 967, 1046586062u, 2207037106u, 3208952465u, 1231254630u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 968, 3197884060u, 3838689849u, 3198769679u, 1302617170u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 969, 1085938906u, 2527556476u, 3240373426u, 124352692u, 1085938688u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 970, 3199540805u, 3502371499u, 1043411944u, 4190072016u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 971, 1064676142u, 1798470077u, 3200116917u, 3421833729u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 972, 3193514956u, 3653237931u, 3204255012u, 3683870669u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 973, 1053588582u, 376530104u, 1073853547u, 565755892u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 974, 3242503851u, 558292492u, 1051772749u, 4267873474u, 3242503851u, 2147483648u, 0, FLOOR_TOLERANCE, 0},
+{ 975, 3224772709u, 509637100u, 3212030069u, 215050379u, 3224829952u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 976, 1092057101u, 3571665665u, 3188628584u, 757824767u, 1092057100u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 977, 3214799337u, 998858159u, 1063077962u, 436029885u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 978, 3205946965u, 996300405u, 3193842624u, 80548098u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 979, 3228848840u, 3876129407u, 3215332180u, 2226970413u, 3228852224u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 980, 3237608953u, 200013509u, 3224552716u, 414878724u, 3237608960u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 981, 3230617093u, 309319541u, 1048979765u, 1261662434u, 3230617600u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 982, 1089252639u, 4062255924u, 3224274128u, 4289485681u, 1089252608u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 983, 3236136084u, 1611969213u, 1053890378u, 3774617276u, 3236136096u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 984, 1080412763u, 1752164782u, 3239587974u, 612223386u, 1080410112u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 985, 1041545782u, 2024044989u, 1074932678u, 3259111307u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 986, 1053207518u, 2564965629u, 1093571065u, 169360454u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 987, 1089599090u, 1860101737u, 3191222372u, 1676437468u, 1089599088u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 988, 1059802968u, 588387057u, 3192103292u, 2495288012u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 989, 3193155705u, 659070058u, 1073095700u, 1393632068u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 990, 3217683263u, 4276187829u, 3217553330u, 1868253275u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 991, 3223220272u, 2085481575u, 3215994784u, 800910002u, 3223322624u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 992, 1056934836u, 1950570756u, 3200582211u, 941022151u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 993, 1057530368u, 2075610870u, 3250142022u, 3605152103u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 994, 3200839250u, 3792931748u, 3204857863u, 804393211u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 995, 3253646370u, 3430071177u, 3226288311u, 3652522729u, 3253646370u, 3430940672u, 0, FLOOR_TOLERANCE, 0},
+{ 996, 3201314702u, 236884699u, 3227874605u, 2193269825u, 3220176896u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 997, 1064936593u, 2744231849u, 1046186036u, 771053722u, 0u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 998, 1083996036u, 3000189819u, 1096500901u, 2057239777u, 1083995136u, 0u, 0, FLOOR_TOLERANCE, 0},
+{ 999, 1093835581u, 205759408u, 3244643377u, 2702292618u, 1093835581u, 0u, 0, FLOOR_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_FLOOR_H multiple inclusion protection
+
+// EOF floor.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/fmod.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/fmod.c
new file mode 100644
index 0000000000..d455ab8b80
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/fmod.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// fmod.c
+//
+// Test of fmod() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/fmod.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(fmod_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &fmod, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_DOUBLE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &fmod_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("fmod() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("fmod() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library fmod() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "fmod() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF fmod.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/fmod.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/fmod.h
new file mode 100644
index 0000000000..679c0d5a28
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/fmod.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_FMOD_H
+#define CYGONCE_LIBM_FMOD_H
+//===========================================================================
+//
+// fmod.h
+//
+// Test vectors for testing of fmod() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/fmod.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define FMOD_TOLERANCE 2.0E-04
+
+static const Cyg_libm_test_double_vec_t fmod_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1077999148u, 2506787616u, 1090024059u, 3619148316u, 1077999148u, 2506787616u, 0, FMOD_TOLERANCE, 0},
+{ 2, 3218153654u, 3176730980u, 1051524793u, 2993920299u, 3198414321u, 846480232u, 0, FMOD_TOLERANCE, 0},
+{ 3, 3239659803u, 2725707538u, 3232101343u, 2346810316u, 3230861543u, 3523929528u, 0, FMOD_TOLERANCE, 0},
+{ 4, 1092554362u, 2088062470u, 3201242716u, 420891118u, 1051890679u, 202128524u, 0, FMOD_TOLERANCE, 0},
+{ 5, 3221200677u, 2636405208u, 1100049309u, 471635570u, 3221200677u, 2636405208u, 0, FMOD_TOLERANCE, 0},
+{ 6, 1089363191u, 1746012320u, 1054478713u, 3333988501u, 1054158384u, 1456435203u, 0, FMOD_TOLERANCE, 0},
+{ 7, 1047953160u, 183014794u, 3202039382u, 2016785810u, 1047953160u, 183014794u, 0, FMOD_TOLERANCE, 0},
+{ 8, 3213486034u, 2688957927u, 1046089230u, 2709029994u, 3192981049u, 3507147948u, 0, FMOD_TOLERANCE, 0},
+{ 9, 1058795730u, 624574473u, 1045840574u, 3473266330u, 1042678785u, 2651810544u, 0, FMOD_TOLERANCE, 0},
+{ 10, 3204919842u, 1605286142u, 1068931671u, 4233776869u, 3204919842u, 1605286142u, 0, FMOD_TOLERANCE, 0},
+{ 11, 1060343410u, 1857607719u, 3222889559u, 3417070006u, 1060343410u, 1857607719u, 0, FMOD_TOLERANCE, 0},
+{ 12, 1103599987u, 3981151660u, 1088899021u, 1332651746u, 1087743907u, 1908470912u, 0, FMOD_TOLERANCE, 0},
+{ 13, 1085298022u, 3824988054u, 1066856791u, 2070129652u, 1066704269u, 2005084196u, 0, FMOD_TOLERANCE, 0},
+{ 14, 3207559790u, 1372884064u, 1080833116u, 3229926662u, 3207559790u, 1372884064u, 0, FMOD_TOLERANCE, 0},
+{ 15, 1093826501u, 3217805330u, 3191644264u, 2014578707u, 1043643663u, 4276005052u, 0, FMOD_TOLERANCE, 0},
+{ 16, 1102287487u, 265058758u, 3239903247u, 1630600647u, 1088853470u, 3578838744u, 0, FMOD_TOLERANCE, 0},
+{ 17, 1071124229u, 1946677669u, 3198462609u, 926009897u, 1050234959u, 4012882244u, 0, FMOD_TOLERANCE, 0},
+{ 18, 1072130299u, 2271884183u, 3203741999u, 2118617783u, 1053757952u, 668308864u, 0, FMOD_TOLERANCE, 0},
+{ 19, 3194849109u, 213658772u, 3249401130u, 314151656u, 3194849109u, 213658772u, 0, FMOD_TOLERANCE, 0},
+{ 20, 3254112288u, 1564829925u, 3197817016u, 497230814u, 3194370383u, 289567216u, 0, FMOD_TOLERANCE, 0},
+{ 21, 3216262634u, 2075329122u, 3231746400u, 169900577u, 3216262634u, 2075329122u, 0, FMOD_TOLERANCE, 0},
+{ 22, 1049848642u, 541549344u, 1096608669u, 3119070100u, 1049848642u, 541549344u, 0, FMOD_TOLERANCE, 0},
+{ 23, 1085427055u, 567496114u, 1045286891u, 1969998540u, 1044823656u, 1336171868u, 0, FMOD_TOLERANCE, 0},
+{ 24, 1060548195u, 1299369769u, 1049342524u, 4167404066u, 1046610961u, 2503843096u, 0, FMOD_TOLERANCE, 0},
+{ 25, 3208865645u, 3348930841u, 1078472138u, 358457347u, 3208865645u, 3348930841u, 0, FMOD_TOLERANCE, 0},
+{ 26, 1071069297u, 2192461366u, 1099527247u, 3184735642u, 1071069297u, 2192461366u, 0, FMOD_TOLERANCE, 0},
+{ 27, 1052861772u, 331696577u, 3189610016u, 793242270u, 1039222015u, 810181536u, 0, FMOD_TOLERANCE, 0},
+{ 28, 3252528934u, 2322696981u, 1083791358u, 3020766674u, 3230733651u, 1514456654u, 0, FMOD_TOLERANCE, 0},
+{ 29, 1044902177u, 252085215u, 3214426435u, 4139068910u, 1044902177u, 252085215u, 0, FMOD_TOLERANCE, 0},
+{ 30, 3222505725u, 105589263u, 1056316170u, 261630827u, 3199769773u, 4036976400u, 0, FMOD_TOLERANCE, 0},
+{ 31, 1107213408u, 428765703u, 3251828686u, 2009972239u, 1103250771u, 785295236u, 0, FMOD_TOLERANCE, 0},
+{ 32, 1098568019u, 3517376586u, 3240257920u, 3304487302u, 1091988141u, 2703648344u, 0, FMOD_TOLERANCE, 0},
+{ 33, 3233537912u, 237004814u, 3237899261u, 3364008659u, 3233537912u, 237004814u, 0, FMOD_TOLERANCE, 0},
+{ 34, 3195247552u, 472004928u, 3226869477u, 1186387580u, 3195247552u, 472004928u, 0, FMOD_TOLERANCE, 0},
+{ 35, 1054226850u, 4085763910u, 1106394906u, 2684738273u, 1054226850u, 4085763910u, 0, FMOD_TOLERANCE, 0},
+{ 36, 1057053639u, 2055490142u, 3231581370u, 3879040079u, 1057053639u, 2055490142u, 0, FMOD_TOLERANCE, 0},
+{ 37, 3188976647u, 3725731239u, 1061652681u, 591292963u, 3188976647u, 3725731239u, 0, FMOD_TOLERANCE, 0},
+{ 38, 3225014981u, 1147041027u, 3215417793u, 624695933u, 3214251651u, 512172094u, 0, FMOD_TOLERANCE, 0},
+{ 39, 3206052774u, 705725219u, 3238067573u, 1116238321u, 3206052774u, 705725219u, 0, FMOD_TOLERANCE, 0},
+{ 40, 3207367088u, 7287411u, 1045917232u, 116067742u, 3192959568u, 1202236754u, 0, FMOD_TOLERANCE, 0},
+{ 41, 3240055222u, 3604989074u, 1066381836u, 545298780u, 3213065624u, 2721628400u, 0, FMOD_TOLERANCE, 0},
+{ 42, 3219080936u, 1681476121u, 1060345752u, 3553822398u, 3207333937u, 3094263432u, 0, FMOD_TOLERANCE, 0},
+{ 43, 1102831658u, 3410480388u, 1052460275u, 1660607230u, 1049521884u, 3304083232u, 0, FMOD_TOLERANCE, 0},
+{ 44, 1089216869u, 1494984673u, 3196647153u, 287894723u, 1046994322u, 61462516u, 0, FMOD_TOLERANCE, 0},
+{ 45, 1054885127u, 644548665u, 1081948134u, 2442134629u, 1054885127u, 644548665u, 0, FMOD_TOLERANCE, 0},
+{ 46, 1087554095u, 2312530895u, 3221584595u, 3379665576u, 1071380027u, 640657792u, 0, FMOD_TOLERANCE, 0},
+{ 47, 1096085375u, 3018463866u, 1086226574u, 404012923u, 1085897001u, 2676282550u, 0, FMOD_TOLERANCE, 0},
+{ 48, 1064733299u, 1710279345u, 3251401196u, 3528946000u, 1064733299u, 1710279345u, 0, FMOD_TOLERANCE, 0},
+{ 49, 1061536351u, 2164450219u, 1083520023u, 3312018966u, 1061536351u, 2164450219u, 0, FMOD_TOLERANCE, 0},
+{ 50, 1057248676u, 2648986431u, 1050330591u, 1474376550u, 1048011450u, 2538903400u, 0, FMOD_TOLERANCE, 0},
+{ 51, 3194422028u, 1839068700u, 1077406406u, 3013052171u, 3194422028u, 1839068700u, 0, FMOD_TOLERANCE, 0},
+{ 52, 1046493630u, 772102380u, 3220729740u, 4219039958u, 1046493630u, 772102380u, 0, FMOD_TOLERANCE, 0},
+{ 53, 3229472221u, 3058618779u, 1046304788u, 3338676024u, 3189222441u, 275821184u, 0, FMOD_TOLERANCE, 0},
+{ 54, 1051172137u, 506286854u, 1094907481u, 2217000199u, 1051172137u, 506286854u, 0, FMOD_TOLERANCE, 0},
+{ 55, 1082428310u, 1147428263u, 1065432625u, 3034786717u, 1060118125u, 3474068448u, 0, FMOD_TOLERANCE, 0},
+{ 56, 1082016752u, 2844125311u, 1082985198u, 2561492677u, 1082016752u, 2844125311u, 0, FMOD_TOLERANCE, 0},
+{ 57, 3211536916u, 704542600u, 3222902057u, 2762779203u, 3211536916u, 704542600u, 0, FMOD_TOLERANCE, 0},
+{ 58, 3199680614u, 184131949u, 3249723525u, 1667366082u, 3199680614u, 184131949u, 0, FMOD_TOLERANCE, 0},
+{ 59, 3223609598u, 3904224140u, 1067056698u, 2942159914u, 3213199305u, 1930728556u, 0, FMOD_TOLERANCE, 0},
+{ 60, 1100636863u, 426114282u, 3209056785u, 1083606355u, 1061172644u, 445625924u, 0, FMOD_TOLERANCE, 0},
+{ 61, 1106165945u, 3774123863u, 1106787580u, 2722107965u, 1106165945u, 3774123863u, 0, FMOD_TOLERANCE, 0},
+{ 62, 1088005092u, 1377734762u, 1104232051u, 2377063483u, 1088005092u, 1377734762u, 0, FMOD_TOLERANCE, 0},
+{ 63, 1069380559u, 1029739074u, 1105467109u, 3062201018u, 1069380559u, 1029739074u, 0, FMOD_TOLERANCE, 0},
+{ 64, 3234741597u, 773857656u, 3214251949u, 335833884u, 3213092186u, 1578673304u, 0, FMOD_TOLERANCE, 0},
+{ 65, 3203224610u, 1473865960u, 1103073830u, 4000427507u, 3203224610u, 1473865960u, 0, FMOD_TOLERANCE, 0},
+{ 66, 1103185231u, 4242092620u, 1067009473u, 14539161u, 1066461344u, 779766623u, 0, FMOD_TOLERANCE, 0},
+{ 67, 3192516074u, 1732245037u, 1101371955u, 1533536108u, 3192516074u, 1732245037u, 0, FMOD_TOLERANCE, 0},
+{ 68, 3249153995u, 1833841275u, 1099430098u, 4144145552u, 3245438915u, 2992402264u, 0, FMOD_TOLERANCE, 0},
+{ 69, 3244270463u, 935007012u, 3188865420u, 604442938u, 3184940766u, 384929376u, 0, FMOD_TOLERANCE, 0},
+{ 70, 3206903253u, 2211464602u, 1046255144u, 1635910526u, 3193436299u, 4040515210u, 0, FMOD_TOLERANCE, 0},
+{ 71, 1077871417u, 2549219008u, 3231633258u, 3733639385u, 1077871417u, 2549219008u, 0, FMOD_TOLERANCE, 0},
+{ 72, 1082095089u, 1819374372u, 3202219056u, 2617077637u, 1050449491u, 1455661568u, 0, FMOD_TOLERANCE, 0},
+{ 73, 1094345280u, 546465680u, 1048653554u, 532401530u, 1046597881u, 4071356792u, 0, FMOD_TOLERANCE, 0},
+{ 74, 1044571091u, 2759019783u, 3221570188u, 3554409630u, 1044571091u, 2759019783u, 0, FMOD_TOLERANCE, 0},
+{ 75, 3212931282u, 2527221960u, 1099107978u, 2696971136u, 3212931282u, 2527221960u, 0, FMOD_TOLERANCE, 0},
+{ 76, 1097158000u, 173134582u, 1087299442u, 2877794600u, 1086424556u, 992696240u, 0, FMOD_TOLERANCE, 0},
+{ 77, 1086400474u, 547642046u, 3197285510u, 3521286127u, 1048144001u, 1315432332u, 0, FMOD_TOLERANCE, 0},
+{ 78, 1074860702u, 1231582831u, 1090971734u, 1653446832u, 1074860702u, 1231582831u, 0, FMOD_TOLERANCE, 0},
+{ 79, 1061342535u, 3762182190u, 3252967851u, 2615360375u, 1061342535u, 3762182190u, 0, FMOD_TOLERANCE, 0},
+{ 80, 3200834423u, 2588067350u, 3206610957u, 3551059728u, 3200834423u, 2588067350u, 0, FMOD_TOLERANCE, 0},
+{ 81, 3206978856u, 845263327u, 1073415902u, 1749010288u, 3206978856u, 845263327u, 0, FMOD_TOLERANCE, 0},
+{ 82, 3205576370u, 3092685191u, 3190678390u, 2872219490u, 3185606893u, 1941698816u, 0, FMOD_TOLERANCE, 0},
+{ 83, 3218315055u, 4107255722u, 3205337291u, 3069068345u, 3202283962u, 532003680u, 0, FMOD_TOLERANCE, 0},
+{ 84, 3243990857u, 2294867524u, 3216653996u, 2860384670u, 3213941601u, 3194242032u, 0, FMOD_TOLERANCE, 0},
+{ 85, 3193326350u, 2265437201u, 3240198679u, 1234948614u, 3193326350u, 2265437201u, 0, FMOD_TOLERANCE, 0},
+{ 86, 3216359929u, 1186945904u, 3251167793u, 1896750851u, 3216359929u, 1186945904u, 0, FMOD_TOLERANCE, 0},
+{ 87, 1081575478u, 3686084548u, 1079286273u, 3309277689u, 1078423976u, 3014454872u, 0, FMOD_TOLERANCE, 0},
+{ 88, 3223476240u, 3006860614u, 3231412671u, 2504194724u, 3223476240u, 3006860614u, 0, FMOD_TOLERANCE, 0},
+{ 89, 3236149260u, 1948717780u, 1048317852u, 3791803982u, 3191804834u, 805429888u, 0, FMOD_TOLERANCE, 0},
+{ 90, 1064345015u, 4272034420u, 3192982124u, 1526175922u, 1045109678u, 2938596596u, 0, FMOD_TOLERANCE, 0},
+{ 91, 3245817826u, 4108948538u, 1104691287u, 640541190u, 3245817826u, 4108948538u, 0, FMOD_TOLERANCE, 0},
+{ 92, 3207257417u, 3259274853u, 1082507103u, 3677038020u, 3207257417u, 3259274853u, 0, FMOD_TOLERANCE, 0},
+{ 93, 1083132498u, 3781708548u, 1096584871u, 1207386447u, 1083132498u, 3781708548u, 0, FMOD_TOLERANCE, 0},
+{ 94, 3188695272u, 3011191657u, 1103798670u, 1096124830u, 3188695272u, 3011191657u, 0, FMOD_TOLERANCE, 0},
+{ 95, 1063235023u, 2540404725u, 3240157452u, 4122845725u, 1063235023u, 2540404725u, 0, FMOD_TOLERANCE, 0},
+{ 96, 1083643710u, 311336721u, 3214382367u, 4212533768u, 1065798268u, 1892082032u, 0, FMOD_TOLERANCE, 0},
+{ 97, 1051139427u, 1769686293u, 3240200923u, 3538602249u, 1051139427u, 1769686293u, 0, FMOD_TOLERANCE, 0},
+{ 98, 1078227549u, 508056696u, 1103793878u, 776520138u, 1078227549u, 508056696u, 0, FMOD_TOLERANCE, 0},
+{ 99, 1102910577u, 4064962760u, 1077424413u, 819766631u, 1072921212u, 1068650464u, 0, FMOD_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 1074178362u, 2112385259u, 0, FMOD_TOLERANCE, 0},
+{ 101, 1082295059u, 2514398118u, 1076579751u, 870169764u, 1075147679u, 2195223528u, 0, FMOD_TOLERANCE, 0},
+{ 102, 3246851392u, 1190259653u, 1069112254u, 3417249840u, 3216432510u, 1181302496u, 0, FMOD_TOLERANCE, 0},
+{ 103, 3193663083u, 3467757357u, 3215075200u, 2168175352u, 3193663083u, 3467757357u, 0, FMOD_TOLERANCE, 0},
+{ 104, 3239643135u, 1508888184u, 1060430241u, 3524949092u, 3207163480u, 4006693368u, 0, FMOD_TOLERANCE, 0},
+{ 105, 3197412883u, 166402802u, 3237198975u, 3572369260u, 3197412883u, 166402802u, 0, FMOD_TOLERANCE, 0},
+{ 106, 1081866822u, 2441536203u, 3202753937u, 3658194573u, 1054870393u, 984614982u, 0, FMOD_TOLERANCE, 0},
+{ 107, 1062392908u, 2479742828u, 1062342831u, 4214154303u, 1057518483u, 333407648u, 0, FMOD_TOLERANCE, 0},
+{ 108, 1082396794u, 426896765u, 1066474375u, 2201754442u, 1065525461u, 3035868180u, 0, FMOD_TOLERANCE, 0},
+{ 109, 3195629021u, 2055773734u, 3239267288u, 291396537u, 3195629021u, 2055773734u, 0, FMOD_TOLERANCE, 0},
+{ 110, 3236968033u, 874125203u, 3210508124u, 4091098764u, 3207268269u, 968254816u, 0, FMOD_TOLERANCE, 0},
+{ 111, 1065716026u, 120488169u, 3241241441u, 1985269424u, 1065716026u, 120488169u, 0, FMOD_TOLERANCE, 0},
+{ 112, 3206539410u, 2243036871u, 3243941101u, 740033495u, 3206539410u, 2243036871u, 0, FMOD_TOLERANCE, 0},
+{ 113, 3209424906u, 1176656356u, 1074261978u, 3588756231u, 3209424906u, 1176656356u, 0, FMOD_TOLERANCE, 0},
+{ 114, 3252816791u, 3037249392u, 1061635587u, 1173102190u, 3208114966u, 2221503008u, 0, FMOD_TOLERANCE, 0},
+{ 115, 3237209581u, 2882725208u, 1071440059u, 69225090u, 3216207957u, 93487448u, 0, FMOD_TOLERANCE, 0},
+{ 116, 3212663474u, 272319256u, 1072073912u, 2493997123u, 3212663474u, 272319256u, 0, FMOD_TOLERANCE, 0},
+{ 117, 1057720186u, 188610379u, 3232757923u, 2209647371u, 1057720186u, 188610379u, 0, FMOD_TOLERANCE, 0},
+{ 118, 3236758517u, 1990439193u, 1078073146u, 622849962u, 3224071073u, 3216289392u, 0, FMOD_TOLERANCE, 0},
+{ 119, 1057135741u, 756052458u, 1081649113u, 2247475162u, 1057135741u, 756052458u, 0, FMOD_TOLERANCE, 0},
+{ 120, 1061623064u, 3878055211u, 3222407050u, 2979438623u, 1061623064u, 3878055211u, 0, FMOD_TOLERANCE, 0},
+{ 121, 3195290997u, 2676398686u, 1105124431u, 3631096636u, 3195290997u, 2676398686u, 0, FMOD_TOLERANCE, 0},
+{ 122, 1065079390u, 1697791764u, 3198136112u, 2299842819u, 1049936853u, 1006339434u, 0, FMOD_TOLERANCE, 0},
+{ 123, 1078084768u, 1931502677u, 3215264397u, 3016456382u, 1062958820u, 2137065024u, 0, FMOD_TOLERANCE, 0},
+{ 124, 1072253426u, 343404215u, 1061072607u, 4266232536u, 1060973199u, 148095640u, 0, FMOD_TOLERANCE, 0},
+{ 125, 3241230836u, 4140316002u, 1082896196u, 868256971u, 3229749188u, 1307397164u, 0, FMOD_TOLERANCE, 0},
+{ 126, 1075422810u, 1864139509u, 3187675097u, 3084482407u, 1039920606u, 953688624u, 0, FMOD_TOLERANCE, 0},
+{ 127, 3220191323u, 2427162817u, 3234748208u, 2715105792u, 3220191323u, 2427162817u, 0, FMOD_TOLERANCE, 0},
+{ 128, 1064600512u, 3943389284u, 1046724025u, 3626825684u, 1046708981u, 2468407956u, 0, FMOD_TOLERANCE, 0},
+{ 129, 1045423002u, 967350972u, 1093012318u, 448002663u, 1045423002u, 967350972u, 0, FMOD_TOLERANCE, 0},
+{ 130, 3251845859u, 105058217u, 1069733884u, 171786224u, 3216327783u, 3231806144u, 0, FMOD_TOLERANCE, 0},
+{ 131, 3189614508u, 2863482262u, 3204997271u, 877784425u, 3189614508u, 2863482262u, 0, FMOD_TOLERANCE, 0},
+{ 132, 3202629313u, 2801782962u, 3213604117u, 762347195u, 3202629313u, 2801782962u, 0, FMOD_TOLERANCE, 0},
+{ 133, 3233486727u, 2317950339u, 3246333414u, 2135700283u, 3233486727u, 2317950339u, 0, FMOD_TOLERANCE, 0},
+{ 134, 1056516397u, 4171919805u, 1082858682u, 2180920863u, 1056516397u, 4171919805u, 0, FMOD_TOLERANCE, 0},
+{ 135, 3220149084u, 1918836931u, 1083603224u, 3137821660u, 3220149084u, 1918836931u, 0, FMOD_TOLERANCE, 0},
+{ 136, 1103902874u, 3456203663u, 3235600523u, 2335688936u, 1087710754u, 3975481920u, 0, FMOD_TOLERANCE, 0},
+{ 137, 1042279322u, 4170235262u, 1051824459u, 521583737u, 1042279322u, 4170235262u, 0, FMOD_TOLERANCE, 0},
+{ 138, 1081348303u, 1296623194u, 3250673860u, 2442872540u, 1081348303u, 1296623194u, 0, FMOD_TOLERANCE, 0},
+{ 139, 1061684277u, 289979405u, 1049514449u, 3865737145u, 1048380033u, 2100782952u, 0, FMOD_TOLERANCE, 0},
+{ 140, 1075298944u, 3699090239u, 1054539840u, 3259249360u, 1053559082u, 3331309056u, 0, FMOD_TOLERANCE, 0},
+{ 141, 1096418100u, 1619819023u, 1045993352u, 1022642459u, 1044995577u, 3049662866u, 0, FMOD_TOLERANCE, 0},
+{ 142, 1081433004u, 19455098u, 3229182089u, 2096003654u, 1081433004u, 19455098u, 0, FMOD_TOLERANCE, 0},
+{ 143, 1076297936u, 3803689997u, 1071630912u, 2263729518u, 1068742976u, 3731297016u, 0, FMOD_TOLERANCE, 0},
+{ 144, 1101357261u, 2816837387u, 1063422305u, 2597606398u, 1062013985u, 1260267472u, 0, FMOD_TOLERANCE, 0},
+{ 145, 1069100169u, 3680967506u, 1040201163u, 179224723u, 1038183958u, 240865380u, 0, FMOD_TOLERANCE, 0},
+{ 146, 3188629767u, 978126928u, 1101553990u, 4047893399u, 3188629767u, 978126928u, 0, FMOD_TOLERANCE, 0},
+{ 147, 3222322045u, 4059818629u, 1042678728u, 3640293589u, 3186778307u, 183897584u, 0, FMOD_TOLERANCE, 0},
+{ 148, 3248464040u, 3383497159u, 1070002807u, 1527313008u, 3215761312u, 2515226688u, 0, FMOD_TOLERANCE, 0},
+{ 149, 3202707679u, 2599946514u, 1104170406u, 2738675352u, 3202707679u, 2599946514u, 0, FMOD_TOLERANCE, 0},
+{ 150, 1105232623u, 3616571377u, 1060859316u, 1130603218u, 1060113323u, 1918397064u, 0, FMOD_TOLERANCE, 0},
+{ 151, 1076028796u, 3859211180u, 1067940450u, 1744531824u, 1063263077u, 2833661440u, 0, FMOD_TOLERANCE, 0},
+{ 152, 1042831340u, 1958025850u, 3236511256u, 2472176453u, 1042831340u, 1958025850u, 0, FMOD_TOLERANCE, 0},
+{ 153, 3233107089u, 182132862u, 3250520938u, 3924356991u, 3233107089u, 182132862u, 0, FMOD_TOLERANCE, 0},
+{ 154, 3230501884u, 35632886u, 3209806504u, 1453402523u, 3208824336u, 363458368u, 0, FMOD_TOLERANCE, 0},
+{ 155, 1083522102u, 743225214u, 3202890678u, 142917400u, 1055397496u, 2453240816u, 0, FMOD_TOLERANCE, 0},
+{ 156, 1080684976u, 1472665012u, 3203138231u, 256588219u, 1052680467u, 2130019016u, 0, FMOD_TOLERANCE, 0},
+{ 157, 1094982162u, 1062927000u, 1061134072u, 931677439u, 1058176236u, 2650129640u, 0, FMOD_TOLERANCE, 0},
+{ 158, 1058377732u, 2320910576u, 1055663370u, 288059864u, 1052577599u, 1567417216u, 0, FMOD_TOLERANCE, 0},
+{ 159, 1078958093u, 1448349062u, 3199478070u, 3454027134u, 1048880104u, 1970092992u, 0, FMOD_TOLERANCE, 0},
+{ 160, 3237458798u, 4215445172u, 3196654963u, 2231888973u, 3192950477u, 2687064832u, 0, FMOD_TOLERANCE, 0},
+{ 161, 3246632231u, 40413554u, 3232578253u, 983832844u, 3229329238u, 1435201568u, 0, FMOD_TOLERANCE, 0},
+{ 162, 3223721534u, 3995725873u, 1050082319u, 777231627u, 3197314102u, 376406797u, 0, FMOD_TOLERANCE, 0},
+{ 163, 1040986626u, 672789828u, 3253385962u, 2982787335u, 1040986626u, 672789828u, 0, FMOD_TOLERANCE, 0},
+{ 164, 1068390875u, 2075971825u, 1070166500u, 4034633931u, 1068390875u, 2075971825u, 0, FMOD_TOLERANCE, 0},
+{ 165, 3210046177u, 1018222907u, 3244621407u, 3090050495u, 3210046177u, 1018222907u, 0, FMOD_TOLERANCE, 0},
+{ 166, 1067680885u, 937732557u, 3200798890u, 2557898276u, 1051035947u, 4198290064u, 0, FMOD_TOLERANCE, 0},
+{ 167, 1078342316u, 130346162u, 3223590310u, 275568693u, 1074849839u, 3133187048u, 0, FMOD_TOLERANCE, 0},
+{ 168, 1042898869u, 3807416441u, 1075961161u, 3706820266u, 1042898869u, 3807416441u, 0, FMOD_TOLERANCE, 0},
+{ 169, 3216099005u, 1710131411u, 1078123323u, 1900790503u, 3216099005u, 1710131411u, 0, FMOD_TOLERANCE, 0},
+{ 170, 3238819361u, 3420420033u, 3210844787u, 588423066u, 3210660138u, 1172168608u, 0, FMOD_TOLERANCE, 0},
+{ 171, 1049684114u, 1160162008u, 3246307879u, 4265764460u, 1049684114u, 1160162008u, 0, FMOD_TOLERANCE, 0},
+{ 172, 1102543434u, 366653268u, 3188814424u, 466059202u, 1040561542u, 3805694048u, 0, FMOD_TOLERANCE, 0},
+{ 173, 3226627739u, 1325936170u, 3221436876u, 680097612u, 3220839162u, 1104385200u, 0, FMOD_TOLERANCE, 0},
+{ 174, 3240391116u, 1827735934u, 3200554324u, 2875599271u, 3199335839u, 3934511604u, 0, FMOD_TOLERANCE, 0},
+{ 175, 3191030402u, 3117037091u, 3239246636u, 15838845u, 3191030402u, 3117037091u, 0, FMOD_TOLERANCE, 0},
+{ 176, 1051974004u, 749718883u, 3223587064u, 1523766569u, 1051974004u, 749718883u, 0, FMOD_TOLERANCE, 0},
+{ 177, 1044833651u, 1966536294u, 3250158026u, 699164258u, 1044833651u, 1966536294u, 0, FMOD_TOLERANCE, 0},
+{ 178, 1098048435u, 3759049394u, 1106085272u, 1183789499u, 1098048435u, 3759049394u, 0, FMOD_TOLERANCE, 0},
+{ 179, 1081201623u, 1970107747u, 1095245453u, 2308233883u, 1081201623u, 1970107747u, 0, FMOD_TOLERANCE, 0},
+{ 180, 1084756444u, 1491017852u, 1041444355u, 1723375725u, 1040660169u, 3099529656u, 0, FMOD_TOLERANCE, 0},
+{ 181, 3216630070u, 1141349287u, 1097465301u, 3403438584u, 3216630070u, 1141349287u, 0, FMOD_TOLERANCE, 0},
+{ 182, 3230571908u, 1711085243u, 3250239076u, 1377484108u, 3230571908u, 1711085243u, 0, FMOD_TOLERANCE, 0},
+{ 183, 1098385019u, 2880275004u, 1084039594u, 1611394950u, 1081608503u, 2857540928u, 0, FMOD_TOLERANCE, 0},
+{ 184, 3234221435u, 2626629370u, 1063771493u, 1499080813u, 3209784175u, 2197776356u, 0, FMOD_TOLERANCE, 0},
+{ 185, 1055231263u, 3936262414u, 1103919063u, 3175668759u, 1055231263u, 3936262414u, 0, FMOD_TOLERANCE, 0},
+{ 186, 3207981719u, 1270950554u, 3194616071u, 3680565379u, 3193842345u, 3594182144u, 0, FMOD_TOLERANCE, 0},
+{ 187, 3208148223u, 1066985223u, 3221613219u, 4089383168u, 3208148223u, 1066985223u, 0, FMOD_TOLERANCE, 0},
+{ 188, 3217058839u, 4017329311u, 3208334452u, 1667591498u, 3200904104u, 2430630912u, 0, FMOD_TOLERANCE, 0},
+{ 189, 1088164157u, 3154656624u, 1061894279u, 3886344038u, 1061331185u, 2742166490u, 0, FMOD_TOLERANCE, 0},
+{ 190, 1050652945u, 977586119u, 3209762784u, 953839852u, 1050652945u, 977586119u, 0, FMOD_TOLERANCE, 0},
+{ 191, 1104965247u, 143071571u, 3206165386u, 913097445u, 1054025618u, 2942744752u, 0, FMOD_TOLERANCE, 0},
+{ 192, 3190565456u, 1371169579u, 1057079837u, 2594818628u, 3190565456u, 1371169579u, 0, FMOD_TOLERANCE, 0},
+{ 193, 3251793336u, 2259342224u, 3217432469u, 1824221478u, 3217219935u, 590913702u, 0, FMOD_TOLERANCE, 0},
+{ 194, 3246834775u, 1576604497u, 1079368611u, 185078728u, 3225624822u, 3870722768u, 0, FMOD_TOLERANCE, 0},
+{ 195, 3221679427u, 444800035u, 3243343143u, 1734989302u, 3221679427u, 444800035u, 0, FMOD_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1040952781u, 2389993066u, 0, FMOD_TOLERANCE, 0},
+{ 197, 3234695968u, 1941318385u, 1045807374u, 792193370u, 3191459475u, 1748521624u, 0, FMOD_TOLERANCE, 0},
+{ 198, 3238299666u, 1299392207u, 3212131720u, 3205732280u, 3211332510u, 286824400u, 0, FMOD_TOLERANCE, 0},
+{ 199, 1098698804u, 3035093505u, 1052187689u, 3287702190u, 1050430151u, 4110156112u, 0, FMOD_TOLERANCE, 0},
+{ 200, 3246676260u, 2160225215u, 1102624859u, 836655570u, 3246676260u, 2160225215u, 0, FMOD_TOLERANCE, 0},
+{ 201, 1096723626u, 3360816360u, 3246176356u, 172860634u, 1096723626u, 3360816360u, 0, FMOD_TOLERANCE, 0},
+{ 202, 1070995788u, 146831910u, 1051558014u, 2340722078u, 1051456540u, 1917553576u, 0, FMOD_TOLERANCE, 0},
+{ 203, 3230416351u, 1603798153u, 3207725532u, 1099413093u, 3206546061u, 3198815378u, 0, FMOD_TOLERANCE, 0},
+{ 204, 3246678378u, 2429340443u, 3190303581u, 3223770005u, 3190247209u, 2960836771u, 0, FMOD_TOLERANCE, 0},
+{ 205, 1075882959u, 955542166u, 3230415151u, 275583938u, 1075882959u, 955542166u, 0, FMOD_TOLERANCE, 0},
+{ 206, 1092971882u, 513397822u, 1090646554u, 2089321329u, 1090247293u, 277513832u, 0, FMOD_TOLERANCE, 0},
+{ 207, 3193169876u, 2782073372u, 1046063872u, 4023829068u, 3193169876u, 2782073372u, 0, FMOD_TOLERANCE, 0},
+{ 208, 1098564822u, 3242223094u, 3194111199u, 4264674108u, 1046254439u, 1452785496u, 0, FMOD_TOLERANCE, 0},
+{ 209, 3238510821u, 3506346169u, 1047020885u, 1742757458u, 3192430539u, 2674342256u, 0, FMOD_TOLERANCE, 0},
+{ 210, 3192664477u, 1265459564u, 3193450280u, 3650514880u, 3192664477u, 1265459564u, 0, FMOD_TOLERANCE, 0},
+{ 211, 1081755890u, 1525260440u, 3235452527u, 2612331392u, 1081755890u, 1525260440u, 0, FMOD_TOLERANCE, 0},
+{ 212, 3248668920u, 1263613754u, 3219096387u, 635677201u, 3218714241u, 3798047336u, 0, FMOD_TOLERANCE, 0},
+{ 213, 3206272087u, 4140947288u, 3200792376u, 2013265346u, 3200435981u, 4198185912u, 0, FMOD_TOLERANCE, 0},
+{ 214, 3249974392u, 1912759945u, 3237045253u, 1351396825u, 3235160335u, 3216561680u, 0, FMOD_TOLERANCE, 0},
+{ 215, 3248205162u, 1001433078u, 3206926643u, 2741676659u, 3206681426u, 3088264993u, 0, FMOD_TOLERANCE, 0},
+{ 216, 1080923606u, 1088945233u, 1085095743u, 3986114865u, 1080923606u, 1088945233u, 0, FMOD_TOLERANCE, 0},
+{ 217, 3215734057u, 831239754u, 1099828675u, 3071308141u, 3215734057u, 831239754u, 0, FMOD_TOLERANCE, 0},
+{ 218, 3225834497u, 3473592372u, 1102759382u, 1309576357u, 3225834497u, 3473592372u, 0, FMOD_TOLERANCE, 0},
+{ 219, 3251186706u, 2042340367u, 1091945628u, 2062772374u, 3237458290u, 1180971520u, 0, FMOD_TOLERANCE, 0},
+{ 220, 3194765687u, 1840632537u, 1096533424u, 807510337u, 3194765687u, 1840632537u, 0, FMOD_TOLERANCE, 0},
+{ 221, 3231451722u, 144814872u, 3212698915u, 2282965697u, 3212527069u, 3139947274u, 0, FMOD_TOLERANCE, 0},
+{ 222, 1071236430u, 2552499583u, 3229111426u, 1470130815u, 1071236430u, 2552499583u, 0, FMOD_TOLERANCE, 0},
+{ 223, 3243093065u, 2858583811u, 1089760910u, 6360994u, 3236124514u, 1975526024u, 0, FMOD_TOLERANCE, 0},
+{ 224, 3198264929u, 1614537194u, 1075198900u, 4088705365u, 3198264929u, 1614537194u, 0, FMOD_TOLERANCE, 0},
+{ 225, 3250939070u, 3545570051u, 1065221325u, 1629217700u, 3212533984u, 497173268u, 0, FMOD_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 1072744324u, 1813392963u, 0, FMOD_TOLERANCE, 0},
+{ 227, 3196802686u, 2406734491u, 1042055360u, 89226663u, 3189105605u, 823618538u, 0, FMOD_TOLERANCE, 0},
+{ 228, 3195751081u, 1618759139u, 3194723421u, 3888234802u, 3194681588u, 3644250772u, 0, FMOD_TOLERANCE, 0},
+{ 229, 1055357248u, 3590035633u, 3212424262u, 2892456615u, 1055357248u, 3590035633u, 0, FMOD_TOLERANCE, 0},
+{ 230, 3189943060u, 2431246964u, 3241512456u, 183850734u, 3189943060u, 2431246964u, 0, FMOD_TOLERANCE, 0},
+{ 231, 1089501101u, 3088319870u, 3211544311u, 862225364u, 1063756877u, 1061220220u, 0, FMOD_TOLERANCE, 0},
+{ 232, 3235294664u, 3495352775u, 1058576726u, 596957268u, 3201464249u, 3802196160u, 0, FMOD_TOLERANCE, 0},
+{ 233, 1046553348u, 1839214511u, 3205004060u, 1923240983u, 1046553348u, 1839214511u, 0, FMOD_TOLERANCE, 0},
+{ 234, 1058073864u, 739619702u, 3223356436u, 2689885273u, 1058073864u, 739619702u, 0, FMOD_TOLERANCE, 0},
+{ 235, 3200324971u, 2143376228u, 1098306332u, 3760236188u, 3200324971u, 2143376228u, 0, FMOD_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 1074621795u, 671680995u, 0, FMOD_TOLERANCE, 0},
+{ 237, 3214165989u, 2493598049u, 3194927008u, 1689107592u, 3194880451u, 1904040096u, 0, FMOD_TOLERANCE, 0},
+{ 238, 3189989959u, 1578976988u, 1066368383u, 2117279163u, 3189989959u, 1578976988u, 0, FMOD_TOLERANCE, 0},
+{ 239, 3222988111u, 3425290087u, 1098487295u, 1263412017u, 3222988111u, 3425290087u, 0, FMOD_TOLERANCE, 0},
+{ 240, 3208432764u, 3635396812u, 1070999426u, 3965655689u, 3208432764u, 3635396812u, 0, FMOD_TOLERANCE, 0},
+{ 241, 1060196346u, 2183973116u, 1101098363u, 1118613350u, 1060196346u, 2183973116u, 0, FMOD_TOLERANCE, 0},
+{ 242, 3221946089u, 199516350u, 1078368488u, 164621458u, 3221946089u, 199516350u, 0, FMOD_TOLERANCE, 0},
+{ 243, 3187706018u, 3570940805u, 3230316437u, 3596080877u, 3187706018u, 3570940805u, 0, FMOD_TOLERANCE, 0},
+{ 244, 3208209565u, 980880313u, 1079833442u, 884465057u, 3208209565u, 980880313u, 0, FMOD_TOLERANCE, 0},
+{ 245, 1099977124u, 2558179220u, 1052873711u, 1233598120u, 1051013756u, 1136419808u, 0, FMOD_TOLERANCE, 0},
+{ 246, 1047115221u, 1909994277u, 1085015978u, 2991527452u, 1047115221u, 1909994277u, 0, FMOD_TOLERANCE, 0},
+{ 247, 1060855260u, 1680290941u, 1074309900u, 2943870846u, 1060855260u, 1680290941u, 0, FMOD_TOLERANCE, 0},
+{ 248, 1059496132u, 1451927357u, 3228615456u, 1502585517u, 1059496132u, 1451927357u, 0, FMOD_TOLERANCE, 0},
+{ 249, 3236211951u, 751136990u, 3230392165u, 3493275472u, 3229249587u, 4000841632u, 0, FMOD_TOLERANCE, 0},
+{ 250, 1098365967u, 1209623292u, 3238056647u, 979495322u, 1089709853u, 4289887088u, 0, FMOD_TOLERANCE, 0},
+{ 251, 3250424296u, 1717672108u, 1048120593u, 531240316u, 3193171557u, 2988181760u, 0, FMOD_TOLERANCE, 0},
+{ 252, 1054174923u, 3548721654u, 1086112947u, 3391817224u, 1054174923u, 3548721654u, 0, FMOD_TOLERANCE, 0},
+{ 253, 1077836851u, 2758195125u, 1100880260u, 2028440924u, 1077836851u, 2758195125u, 0, FMOD_TOLERANCE, 0},
+{ 254, 1084223893u, 2750123373u, 3232200256u, 1086294931u, 1084223893u, 2750123373u, 0, FMOD_TOLERANCE, 0},
+{ 255, 1043958672u, 2986160931u, 1076097908u, 2540046258u, 1043958672u, 2986160931u, 0, FMOD_TOLERANCE, 0},
+{ 256, 3235476602u, 451471221u, 1064816262u, 4187644495u, 3210439834u, 655206164u, 0, FMOD_TOLERANCE, 0},
+{ 257, 1099460228u, 2439500162u, 1065280276u, 1979490284u, 1065168215u, 2730893784u, 0, FMOD_TOLERANCE, 0},
+{ 258, 1040415832u, 2283342035u, 1078398157u, 1345997553u, 1040415832u, 2283342035u, 0, FMOD_TOLERANCE, 0},
+{ 259, 3213249348u, 179066662u, 1103272172u, 1217337578u, 3213249348u, 179066662u, 0, FMOD_TOLERANCE, 0},
+{ 260, 3211562377u, 3779303391u, 3210023352u, 3115946280u, 3209555780u, 2653428444u, 0, FMOD_TOLERANCE, 0},
+{ 261, 3192989874u, 286247089u, 1085153597u, 713645369u, 3192989874u, 286247089u, 0, FMOD_TOLERANCE, 0},
+{ 262, 1093670500u, 1468283899u, 1042831668u, 2022736418u, 1042387190u, 3729644322u, 0, FMOD_TOLERANCE, 0},
+{ 263, 1083139105u, 3305564080u, 1065483445u, 482392433u, 1063982656u, 288995372u, 0, FMOD_TOLERANCE, 0},
+{ 264, 3201695807u, 2256346551u, 3222430705u, 2071674991u, 3201695807u, 2256346551u, 0, FMOD_TOLERANCE, 0},
+{ 265, 3204024695u, 2295269094u, 1084451053u, 2773103941u, 3204024695u, 2295269094u, 0, FMOD_TOLERANCE, 0},
+{ 266, 1078173946u, 1482721827u, 1092243422u, 3125409590u, 1078173946u, 1482721827u, 0, FMOD_TOLERANCE, 0},
+{ 267, 3221065973u, 1381740563u, 1071545057u, 2918235653u, 3218789168u, 1067222589u, 0, FMOD_TOLERANCE, 0},
+{ 268, 3238715972u, 1105857967u, 3241990046u, 2703723225u, 3238715972u, 1105857967u, 0, FMOD_TOLERANCE, 0},
+{ 269, 1043015571u, 174689677u, 1079333374u, 3947057014u, 1043015571u, 174689677u, 0, FMOD_TOLERANCE, 0},
+{ 270, 1090461859u, 2023082423u, 3242081486u, 1169047927u, 1090461859u, 2023082423u, 0, FMOD_TOLERANCE, 0},
+{ 271, 1064525899u, 3742487766u, 1043425732u, 194972788u, 1042450932u, 3792806632u, 0, FMOD_TOLERANCE, 0},
+{ 272, 3213791827u, 2136071361u, 3211529757u, 993675115u, 3209961906u, 549235376u, 0, FMOD_TOLERANCE, 0},
+{ 273, 3213663381u, 210772141u, 3241441539u, 580731413u, 3213663381u, 210772141u, 0, FMOD_TOLERANCE, 0},
+{ 274, 1093840413u, 1751560711u, 1074522705u, 180987057u, 1074236959u, 2078989418u, 0, FMOD_TOLERANCE, 0},
+{ 275, 1066754591u, 2552236599u, 1088658621u, 2112468655u, 1066754591u, 2552236599u, 0, FMOD_TOLERANCE, 0},
+{ 276, 3189290617u, 1578223762u, 3224596567u, 2456166162u, 3189290617u, 1578223762u, 0, FMOD_TOLERANCE, 0},
+{ 277, 1058506965u, 2110924310u, 1086207177u, 3161208323u, 1058506965u, 2110924310u, 0, FMOD_TOLERANCE, 0},
+{ 278, 3231863394u, 2352173188u, 1079361728u, 4070222179u, 3226777784u, 3803503730u, 0, FMOD_TOLERANCE, 0},
+{ 279, 1101012904u, 2481562701u, 1090937016u, 3809489716u, 1090661897u, 4109224780u, 0, FMOD_TOLERANCE, 0},
+{ 280, 3197002651u, 330905705u, 1086260896u, 90264431u, 3197002651u, 330905705u, 0, FMOD_TOLERANCE, 0},
+{ 281, 1040729961u, 4162008079u, 3194387916u, 759522153u, 1040729961u, 4162008079u, 0, FMOD_TOLERANCE, 0},
+{ 282, 1081015037u, 1839697482u, 3216442625u, 2211508949u, 1066933368u, 2616216496u, 0, FMOD_TOLERANCE, 0},
+{ 283, 3249807211u, 3736863454u, 1063475914u, 3150741666u, 3209732000u, 1713317356u, 0, FMOD_TOLERANCE, 0},
+{ 284, 1060785883u, 4200269406u, 3236646101u, 1061812176u, 1060785883u, 4200269406u, 0, FMOD_TOLERANCE, 0},
+{ 285, 1080217979u, 106027290u, 3234978297u, 2245237549u, 1080217979u, 106027290u, 0, FMOD_TOLERANCE, 0},
+{ 286, 3246984334u, 2132131375u, 3250483427u, 3449276437u, 3246984334u, 2132131375u, 0, FMOD_TOLERANCE, 0},
+{ 287, 1089388778u, 2334440944u, 1105423490u, 4004336184u, 1089388778u, 2334440944u, 0, FMOD_TOLERANCE, 0},
+{ 288, 3218772704u, 4090088208u, 1042030013u, 3898658299u, 3188978648u, 53730621u, 0, FMOD_TOLERANCE, 0},
+{ 289, 3207908064u, 2272831437u, 3253082595u, 2639188641u, 3207908064u, 2272831437u, 0, FMOD_TOLERANCE, 0},
+{ 290, 1054766684u, 1856594168u, 3189515294u, 4101853676u, 1041779426u, 3891783764u, 0, FMOD_TOLERANCE, 0},
+{ 291, 1076012412u, 2211699255u, 3195060344u, 3865018604u, 1046732812u, 2649747376u, 0, FMOD_TOLERANCE, 0},
+{ 292, 3242767010u, 996259334u, 3241496889u, 3782673116u, 3239775042u, 3478493520u, 0, FMOD_TOLERANCE, 0},
+{ 293, 1099130747u, 3840380763u, 1048674041u, 550040067u, 1047787690u, 948908124u, 0, FMOD_TOLERANCE, 0},
+{ 294, 3251419593u, 95874100u, 3237232828u, 2645647822u, 3234300013u, 2648947376u, 0, FMOD_TOLERANCE, 0},
+{ 295, 1043665640u, 3441419500u, 3252367038u, 876710419u, 1043665640u, 3441419500u, 0, FMOD_TOLERANCE, 0},
+{ 296, 3238593552u, 2560836004u, 3199616543u, 1180840586u, 3198236941u, 3820642168u, 0, FMOD_TOLERANCE, 0},
+{ 297, 3221602966u, 2218230392u, 3227485787u, 3947214579u, 3221602966u, 2218230392u, 0, FMOD_TOLERANCE, 0},
+{ 298, 1079539654u, 1447312532u, 1081476588u, 780366847u, 1079539654u, 1447312532u, 0, FMOD_TOLERANCE, 0},
+{ 299, 1072569643u, 2842113832u, 3216156731u, 225159029u, 1068566168u, 2855133124u, 0, FMOD_TOLERANCE, 0},
+{ 300, 1098117193u, 1601981129u, 3234628869u, 2236538344u, 1086765343u, 3061570600u, 0, FMOD_TOLERANCE, 0},
+{ 301, 1085173524u, 2194185737u, 3242362684u, 87913366u, 1085173524u, 2194185737u, 0, FMOD_TOLERANCE, 0},
+{ 302, 3199083880u, 1346862963u, 1077836259u, 3604666660u, 3199083880u, 1346862963u, 0, FMOD_TOLERANCE, 0},
+{ 303, 3212255979u, 3115209742u, 1099332326u, 1325101950u, 3212255979u, 3115209742u, 0, FMOD_TOLERANCE, 0},
+{ 304, 3224546042u, 3889223100u, 1053247613u, 3371396923u, 3198580902u, 304142856u, 0, FMOD_TOLERANCE, 0},
+{ 305, 3220477868u, 4163120793u, 1075022670u, 1387631215u, 3220477868u, 4163120793u, 0, FMOD_TOLERANCE, 0},
+{ 306, 3205481779u, 1532426189u, 1063168268u, 3397022615u, 3205481779u, 1532426189u, 0, FMOD_TOLERANCE, 0},
+{ 307, 3201033321u, 89324166u, 1079206060u, 3429424710u, 3201033321u, 89324166u, 0, FMOD_TOLERANCE, 0},
+{ 308, 3192325102u, 747591401u, 1072238381u, 2803213904u, 3192325102u, 747591401u, 0, FMOD_TOLERANCE, 0},
+{ 309, 1091113780u, 271904221u, 1044258318u, 1858545114u, 1044111400u, 2575445184u, 0, FMOD_TOLERANCE, 0},
+{ 310, 3228068914u, 314958082u, 3249912496u, 2966213175u, 3228068914u, 314958082u, 0, FMOD_TOLERANCE, 0},
+{ 311, 3197179414u, 3119528953u, 3217179014u, 2908718240u, 3197179414u, 3119528953u, 0, FMOD_TOLERANCE, 0},
+{ 312, 3242467576u, 2018361566u, 1100926600u, 3985805054u, 3242467576u, 2018361566u, 0, FMOD_TOLERANCE, 0},
+{ 313, 1070132580u, 409584884u, 3239758947u, 755795129u, 1070132580u, 409584884u, 0, FMOD_TOLERANCE, 0},
+{ 314, 1075772446u, 1819156379u, 3251342302u, 2982669005u, 1075772446u, 1819156379u, 0, FMOD_TOLERANCE, 0},
+{ 315, 1101563433u, 2080534280u, 3188254060u, 449171797u, 1039403427u, 2442639174u, 0, FMOD_TOLERANCE, 0},
+{ 316, 1095956900u, 168744837u, 3214950009u, 1322217822u, 1063385043u, 3585159232u, 0, FMOD_TOLERANCE, 0},
+{ 317, 3254226900u, 3250487255u, 1062120700u, 1876195180u, 3206049888u, 4103432160u, 0, FMOD_TOLERANCE, 0},
+{ 318, 3226343480u, 1336400247u, 1098057903u, 3314079581u, 3226343480u, 1336400247u, 0, FMOD_TOLERANCE, 0},
+{ 319, 3203678820u, 265025555u, 1063854282u, 3779482256u, 3203678820u, 265025555u, 0, FMOD_TOLERANCE, 0},
+{ 320, 1067300501u, 887044257u, 1054789618u, 2732056261u, 1054577011u, 4153584415u, 0, FMOD_TOLERANCE, 0},
+{ 321, 1050106742u, 4027115185u, 3191764868u, 2940199511u, 1040176487u, 1878366608u, 0, FMOD_TOLERANCE, 0},
+{ 322, 3202500155u, 2875684421u, 3227459837u, 2251967570u, 3202500155u, 2875684421u, 0, FMOD_TOLERANCE, 0},
+{ 323, 1063244412u, 284173546u, 3238823679u, 3557800647u, 1063244412u, 284173546u, 0, FMOD_TOLERANCE, 0},
+{ 324, 1101458560u, 3147771266u, 3220110464u, 2933364246u, 1071807923u, 312606150u, 0, FMOD_TOLERANCE, 0},
+{ 325, 1064853160u, 3366183281u, 3234870843u, 537442654u, 1064853160u, 3366183281u, 0, FMOD_TOLERANCE, 0},
+{ 326, 3244118788u, 2529029548u, 3249882819u, 3781513577u, 3244118788u, 2529029548u, 0, FMOD_TOLERANCE, 0},
+{ 327, 3213436354u, 1080845539u, 3206760016u, 911778687u, 3205712156u, 4172836134u, 0, FMOD_TOLERANCE, 0},
+{ 328, 3191951036u, 469586759u, 1091830022u, 3080528840u, 3191951036u, 469586759u, 0, FMOD_TOLERANCE, 0},
+{ 329, 1080249104u, 2863108169u, 3225605506u, 2508274250u, 1074619269u, 1234534336u, 0, FMOD_TOLERANCE, 0},
+{ 330, 3210826984u, 4080017377u, 3206492941u, 1470284690u, 3206035771u, 2486501230u, 0, FMOD_TOLERANCE, 0},
+{ 331, 3207120390u, 3867917386u, 1102054928u, 3504746045u, 3207120390u, 3867917386u, 0, FMOD_TOLERANCE, 0},
+{ 332, 1064522279u, 2962134101u, 3244741577u, 3390537350u, 1064522279u, 2962134101u, 0, FMOD_TOLERANCE, 0},
+{ 333, 1088201813u, 1702237980u, 1071598971u, 1102587474u, 1070238218u, 912774380u, 0, FMOD_TOLERANCE, 0},
+{ 334, 3202970118u, 2180218657u, 3211592260u, 1206527853u, 3202970118u, 2180218657u, 0, FMOD_TOLERANCE, 0},
+{ 335, 3197084744u, 394130786u, 3242511482u, 2437699868u, 3197084744u, 394130786u, 0, FMOD_TOLERANCE, 0},
+{ 336, 1044237059u, 849581558u, 3252006507u, 2008614943u, 1044237059u, 849581558u, 0, FMOD_TOLERANCE, 0},
+{ 337, 3210140014u, 3128971673u, 3249137531u, 2773583059u, 3210140014u, 3128971673u, 0, FMOD_TOLERANCE, 0},
+{ 338, 1085029866u, 590727700u, 3248651761u, 2183878539u, 1085029866u, 590727700u, 0, FMOD_TOLERANCE, 0},
+{ 339, 1101098629u, 820687580u, 3208143496u, 1402434664u, 1060519198u, 1076427008u, 0, FMOD_TOLERANCE, 0},
+{ 340, 3252290835u, 1873709254u, 3245167989u, 44275991u, 3244270115u, 1511759794u, 0, FMOD_TOLERANCE, 0},
+{ 341, 3189668753u, 1174874204u, 3208263730u, 2360372288u, 3189668753u, 1174874204u, 0, FMOD_TOLERANCE, 0},
+{ 342, 1103854676u, 937573440u, 3208953761u, 211240241u, 1058113326u, 3918295192u, 0, FMOD_TOLERANCE, 0},
+{ 343, 3243548934u, 2469774991u, 1043117070u, 3380071805u, 3189938496u, 1368214615u, 0, FMOD_TOLERANCE, 0},
+{ 344, 1058121042u, 442507560u, 3254252803u, 3257889649u, 1058121042u, 442507560u, 0, FMOD_TOLERANCE, 0},
+{ 345, 1068850520u, 1854921625u, 1049810168u, 2729627545u, 1049609548u, 1646883138u, 0, FMOD_TOLERANCE, 0},
+{ 346, 3254712629u, 4001809575u, 3240128649u, 278261523u, 3238549819u, 2765439496u, 0, FMOD_TOLERANCE, 0},
+{ 347, 1087224694u, 1793907966u, 3238955714u, 398859249u, 1087224694u, 1793907966u, 0, FMOD_TOLERANCE, 0},
+{ 348, 3200952547u, 2511916952u, 3219195283u, 1697158299u, 3200952547u, 2511916952u, 0, FMOD_TOLERANCE, 0},
+{ 349, 1069985548u, 3230931724u, 3243897690u, 3508781585u, 1069985548u, 3230931724u, 0, FMOD_TOLERANCE, 0},
+{ 350, 1103847606u, 1674254897u, 1046547577u, 217148561u, 1045477571u, 1500468300u, 0, FMOD_TOLERANCE, 0},
+{ 351, 3211263954u, 3275604304u, 3194840159u, 2991205850u, 3194151953u, 1373226250u, 0, FMOD_TOLERANCE, 0},
+{ 352, 3195249375u, 3509997278u, 3248888030u, 3897986511u, 3195249375u, 3509997278u, 0, FMOD_TOLERANCE, 0},
+{ 353, 1047182435u, 2156824613u, 1042295665u, 1239257646u, 1041068762u, 564045456u, 0, FMOD_TOLERANCE, 0},
+{ 354, 3213264085u, 1073153314u, 3250031627u, 2567234990u, 3213264085u, 1073153314u, 0, FMOD_TOLERANCE, 0},
+{ 355, 3190593412u, 4261696995u, 3197784432u, 323702024u, 3190593412u, 4261696995u, 0, FMOD_TOLERANCE, 0},
+{ 356, 3243690997u, 4075177615u, 3202791065u, 1919006082u, 3201320186u, 476898428u, 0, FMOD_TOLERANCE, 0},
+{ 357, 3239270013u, 386429966u, 1086504491u, 3698826164u, 3227713245u, 1759240960u, 0, FMOD_TOLERANCE, 0},
+{ 358, 1078327190u, 1681986446u, 3194985869u, 3072950140u, 1047429662u, 3437752484u, 0, FMOD_TOLERANCE, 0},
+{ 359, 3217311933u, 3719038997u, 1055433962u, 3331415058u, 3201345754u, 2519515052u, 0, FMOD_TOLERANCE, 0},
+{ 360, 1060749713u, 2420250111u, 3238002206u, 1928661079u, 1060749713u, 2420250111u, 0, FMOD_TOLERANCE, 0},
+{ 361, 1081914210u, 3679866727u, 3227386672u, 1273835792u, 1079559162u, 2308024940u, 0, FMOD_TOLERANCE, 0},
+{ 362, 1041622738u, 2682092368u, 3234222284u, 1325425811u, 1041622738u, 2682092368u, 0, FMOD_TOLERANCE, 0},
+{ 363, 1056312613u, 4175172697u, 3208346191u, 2130706153u, 1056312613u, 4175172697u, 0, FMOD_TOLERANCE, 0},
+{ 364, 1092089624u, 1200784450u, 1083605096u, 1248595607u, 1083003632u, 4285104928u, 0, FMOD_TOLERANCE, 0},
+{ 365, 3213890863u, 1897285171u, 3251296075u, 944966123u, 3213890863u, 1897285171u, 0, FMOD_TOLERANCE, 0},
+{ 366, 3241371250u, 2270747330u, 3230692631u, 422503284u, 3227231066u, 1971978560u, 0, FMOD_TOLERANCE, 0},
+{ 367, 1084120037u, 2857564741u, 1075647403u, 3308906709u, 1073791751u, 1059642802u, 0, FMOD_TOLERANCE, 0},
+{ 368, 3203475098u, 1380066948u, 3232612906u, 2613634294u, 3203475098u, 1380066948u, 0, FMOD_TOLERANCE, 0},
+{ 369, 1063890856u, 4022784584u, 1060483857u, 3264056381u, 1059349327u, 1316571190u, 0, FMOD_TOLERANCE, 0},
+{ 370, 1044637404u, 1778509100u, 3213146285u, 2665833973u, 1044637404u, 1778509100u, 0, FMOD_TOLERANCE, 0},
+{ 371, 3216727300u, 1859175955u, 1079949560u, 4258450607u, 3216727300u, 1859175955u, 0, FMOD_TOLERANCE, 0},
+{ 372, 1048277388u, 4128020197u, 1076266146u, 4122840980u, 1048277388u, 4128020197u, 0, FMOD_TOLERANCE, 0},
+{ 373, 3193183163u, 2454653987u, 3229487005u, 2977478685u, 3193183163u, 2454653987u, 0, FMOD_TOLERANCE, 0},
+{ 374, 3253556483u, 1355181872u, 1095308770u, 436846481u, 3241244190u, 3025145350u, 0, FMOD_TOLERANCE, 0},
+{ 375, 3246605302u, 2592856453u, 3247825559u, 3195234082u, 3246605302u, 2592856453u, 0, FMOD_TOLERANCE, 0},
+{ 376, 3222118023u, 3554670043u, 1091621009u, 3321236467u, 3222118023u, 3554670043u, 0, FMOD_TOLERANCE, 0},
+{ 377, 1069012833u, 1936670355u, 1095715713u, 2958468553u, 1069012833u, 1936670355u, 0, FMOD_TOLERANCE, 0},
+{ 378, 3192291109u, 2960339502u, 1098808013u, 1044068983u, 3192291109u, 2960339502u, 0, FMOD_TOLERANCE, 0},
+{ 379, 3196691185u, 4093388677u, 1095478112u, 1735930261u, 3196691185u, 4093388677u, 0, FMOD_TOLERANCE, 0},
+{ 380, 1091040302u, 1807398746u, 3195743135u, 4261616162u, 1045958323u, 3424358216u, 0, FMOD_TOLERANCE, 0},
+{ 381, 3209294194u, 3250576797u, 1059002384u, 3043079652u, 3205823281u, 3451169168u, 0, FMOD_TOLERANCE, 0},
+{ 382, 1069207109u, 666051428u, 3208765404u, 1912684117u, 1061231898u, 3399757973u, 0, FMOD_TOLERANCE, 0},
+{ 383, 1103487420u, 1949030179u, 1096388934u, 896459246u, 1095501482u, 2875899476u, 0, FMOD_TOLERANCE, 0},
+{ 384, 1054300653u, 622499767u, 1066707637u, 1490260486u, 1054300653u, 622499767u, 0, FMOD_TOLERANCE, 0},
+{ 385, 1106688493u, 1490616165u, 3251242436u, 795675736u, 1103736017u, 2855907608u, 0, FMOD_TOLERANCE, 0},
+{ 386, 1080943896u, 3662877092u, 3234317146u, 3200513112u, 1080943896u, 3662877092u, 0, FMOD_TOLERANCE, 0},
+{ 387, 1084088786u, 1356101968u, 3236536816u, 3062844611u, 1084088786u, 1356101968u, 0, FMOD_TOLERANCE, 0},
+{ 388, 3219922640u, 2284484846u, 3219498359u, 3240896015u, 3217679715u, 469322620u, 0, FMOD_TOLERANCE, 0},
+{ 389, 3235759689u, 494503287u, 1092811254u, 142673998u, 3235759689u, 494503287u, 0, FMOD_TOLERANCE, 0},
+{ 390, 3252125916u, 3394882641u, 3225306538u, 364852125u, 3223911532u, 173791494u, 0, FMOD_TOLERANCE, 0},
+{ 391, 3225261763u, 193885269u, 1088149839u, 1359805831u, 3225261763u, 193885269u, 0, FMOD_TOLERANCE, 0},
+{ 392, 3200484782u, 592580907u, 3199560872u, 3086438952u, 3199311539u, 2393690158u, 0, FMOD_TOLERANCE, 0},
+{ 393, 1059518664u, 1778008540u, 1049064687u, 73581647u, 1048801824u, 3195212490u, 0, FMOD_TOLERANCE, 0},
+{ 394, 3246733598u, 233240285u, 1081923320u, 2710903921u, 3228816181u, 1359670313u, 0, FMOD_TOLERANCE, 0},
+{ 395, 1069513767u, 3719878805u, 1079866720u, 3615458228u, 1069513767u, 3719878805u, 0, FMOD_TOLERANCE, 0},
+{ 396, 3221194724u, 3647632375u, 3247225271u, 3839959621u, 3221194724u, 3647632375u, 0, FMOD_TOLERANCE, 0},
+{ 397, 1103401096u, 2232210456u, 3235434773u, 224271737u, 1086804271u, 489677294u, 0, FMOD_TOLERANCE, 0},
+{ 398, 3193003684u, 2134662911u, 3190390590u, 4239009051u, 3189174738u, 354450658u, 0, FMOD_TOLERANCE, 0},
+{ 399, 1080526145u, 2305279897u, 1077668039u, 1854523320u, 1077196127u, 3020131960u, 0, FMOD_TOLERANCE, 0},
+{ 400, 3219864259u, 538224650u, 3206153057u, 1379649610u, 3201479185u, 1215665312u, 0, FMOD_TOLERANCE, 0},
+{ 401, 3196410507u, 3683897920u, 3244167599u, 3647579469u, 3196410507u, 3683897920u, 0, FMOD_TOLERANCE, 0},
+{ 402, 1090280933u, 2694093608u, 1042775347u, 598406111u, 1042429296u, 1703038013u, 0, FMOD_TOLERANCE, 0},
+{ 403, 3211635392u, 872706833u, 1084802480u, 2200602798u, 3211635392u, 872706833u, 0, FMOD_TOLERANCE, 0},
+{ 404, 1042339597u, 904146293u, 1060867322u, 1729685598u, 1042339597u, 904146293u, 0, FMOD_TOLERANCE, 0},
+{ 405, 3195694970u, 1894173462u, 3232800651u, 191960416u, 3195694970u, 1894173462u, 0, FMOD_TOLERANCE, 0},
+{ 406, 1091225343u, 3521028551u, 1054522089u, 3287274359u, 1053758667u, 3875143628u, 0, FMOD_TOLERANCE, 0},
+{ 407, 1095386964u, 959640601u, 3201578263u, 4136915018u, 1054021633u, 1928931314u, 0, FMOD_TOLERANCE, 0},
+{ 408, 1064005451u, 1553716379u, 1106027987u, 984725765u, 1064005451u, 1553716379u, 0, FMOD_TOLERANCE, 0},
+{ 409, 3238832641u, 2287646644u, 3240329321u, 2276183378u, 3238832641u, 2287646644u, 0, FMOD_TOLERANCE, 0},
+{ 410, 1068209174u, 3940225170u, 3199544434u, 997572161u, 1047989319u, 614577280u, 0, FMOD_TOLERANCE, 0},
+{ 411, 3212768361u, 36116288u, 3206886566u, 4196602670u, 3206426174u, 2771053432u, 0, FMOD_TOLERANCE, 0},
+{ 412, 3241695853u, 3550227562u, 3207257983u, 2747744117u, 3207255028u, 3340483506u, 0, FMOD_TOLERANCE, 0},
+{ 413, 1104236126u, 507130047u, 1048359321u, 3229888373u, 1045678438u, 3816317612u, 0, FMOD_TOLERANCE, 0},
+{ 414, 3222996778u, 2210969014u, 1081031001u, 1946786091u, 3222996778u, 2210969014u, 0, FMOD_TOLERANCE, 0},
+{ 415, 3236306990u, 4059150589u, 3189759234u, 1177045799u, 3185418975u, 3516238752u, 0, FMOD_TOLERANCE, 0},
+{ 416, 1093103612u, 2664812822u, 1050343198u, 2034180320u, 1047986576u, 2771970048u, 0, FMOD_TOLERANCE, 0},
+{ 417, 3213779117u, 1175750283u, 3235559706u, 1424491340u, 3213779117u, 1175750283u, 0, FMOD_TOLERANCE, 0},
+{ 418, 3213904193u, 1630036121u, 3231972785u, 3195479448u, 3213904193u, 1630036121u, 0, FMOD_TOLERANCE, 0},
+{ 419, 1090429875u, 2527029044u, 1046927050u, 4000723255u, 1045724540u, 750040168u, 0, FMOD_TOLERANCE, 0},
+{ 420, 1085208677u, 3335703647u, 3237349676u, 3869440059u, 1085208677u, 3335703647u, 0, FMOD_TOLERANCE, 0},
+{ 421, 1091433848u, 3888398377u, 3196041693u, 1290567220u, 1048513329u, 2169633852u, 0, FMOD_TOLERANCE, 0},
+{ 422, 1066679070u, 3242451480u, 3248384948u, 707431021u, 1066679070u, 3242451480u, 0, FMOD_TOLERANCE, 0},
+{ 423, 1083230509u, 2739665123u, 1060777905u, 1733073225u, 1059241906u, 897557388u, 0, FMOD_TOLERANCE, 0},
+{ 424, 1078517061u, 1297274853u, 3208848704u, 3341639139u, 1061024718u, 3625447158u, 0, FMOD_TOLERANCE, 0},
+{ 425, 1046570941u, 2228057309u, 1084318902u, 1317851136u, 1046570941u, 2228057309u, 0, FMOD_TOLERANCE, 0},
+{ 426, 1088255327u, 270039934u, 3241414679u, 3063626339u, 1088255327u, 270039934u, 0, FMOD_TOLERANCE, 0},
+{ 427, 3219178350u, 83062251u, 3211262173u, 2659016437u, 3205153736u, 1898015808u, 0, FMOD_TOLERANCE, 0},
+{ 428, 1095743886u, 3833539373u, 3206667189u, 1567476111u, 1059049552u, 2531004602u, 0, FMOD_TOLERANCE, 0},
+{ 429, 3205195072u, 2382776852u, 3249232579u, 1546622468u, 3205195072u, 2382776852u, 0, FMOD_TOLERANCE, 0},
+{ 430, 1085536439u, 1714300821u, 1104130938u, 4167591598u, 1085536439u, 1714300821u, 0, FMOD_TOLERANCE, 0},
+{ 431, 1051092760u, 2798720100u, 1086978789u, 449990704u, 1051092760u, 2798720100u, 0, FMOD_TOLERANCE, 0},
+{ 432, 3231198415u, 4039516226u, 3244344107u, 4272932619u, 3231198415u, 4039516226u, 0, FMOD_TOLERANCE, 0},
+{ 433, 3222708441u, 1683007544u, 1091105663u, 3805494321u, 3222708441u, 1683007544u, 0, FMOD_TOLERANCE, 0},
+{ 434, 3220852948u, 2072627412u, 1094383324u, 3394151662u, 3220852948u, 2072627412u, 0, FMOD_TOLERANCE, 0},
+{ 435, 3220570024u, 1120106427u, 3223631624u, 3404608264u, 3220570024u, 1120106427u, 0, FMOD_TOLERANCE, 0},
+{ 436, 1097859997u, 559918757u, 3205077053u, 908100198u, 1056109503u, 2716202508u, 0, FMOD_TOLERANCE, 0},
+{ 437, 1042677918u, 2026673913u, 3244833635u, 2844573214u, 1042677918u, 2026673913u, 0, FMOD_TOLERANCE, 0},
+{ 438, 3254567259u, 3946837259u, 3234993796u, 3850406820u, 3234910977u, 2872262312u, 0, FMOD_TOLERANCE, 0},
+{ 439, 1057479809u, 3139330994u, 1046133568u, 1539650690u, 1042788941u, 932511168u, 0, FMOD_TOLERANCE, 0},
+{ 440, 3236705500u, 1554593884u, 3228899878u, 2813752562u, 3225380292u, 3686860192u, 0, FMOD_TOLERANCE, 0},
+{ 441, 1056505004u, 3804703138u, 1072931071u, 2053677923u, 1056505004u, 3804703138u, 0, FMOD_TOLERANCE, 0},
+{ 442, 3244864299u, 289355864u, 1078453818u, 2143066338u, 3225823157u, 2240583912u, 0, FMOD_TOLERANCE, 0},
+{ 443, 3203939880u, 2157691971u, 1106629150u, 110806409u, 3203939880u, 2157691971u, 0, FMOD_TOLERANCE, 0},
+{ 444, 1082157019u, 3570399481u, 1085637605u, 180265334u, 1082157019u, 3570399481u, 0, FMOD_TOLERANCE, 0},
+{ 445, 3200980182u, 558779875u, 3202046748u, 2338464653u, 3200980182u, 558779875u, 0, FMOD_TOLERANCE, 0},
+{ 446, 1045705464u, 1703969219u, 3229797258u, 1417521063u, 1045705464u, 1703969219u, 0, FMOD_TOLERANCE, 0},
+{ 447, 3237782261u, 3917440951u, 1051668894u, 3736066983u, 3196348449u, 216650340u, 0, FMOD_TOLERANCE, 0},
+{ 448, 1064752080u, 3106613409u, 1066627453u, 2735392257u, 1064752080u, 3106613409u, 0, FMOD_TOLERANCE, 0},
+{ 449, 1065665372u, 2229777605u, 1065061963u, 2405869925u, 1064038618u, 4107370570u, 0, FMOD_TOLERANCE, 0},
+{ 450, 3239463229u, 3967957902u, 1057416138u, 3459188071u, 3204196577u, 4124519344u, 0, FMOD_TOLERANCE, 0},
+{ 451, 1068639210u, 3699016825u, 3249713090u, 796144848u, 1068639210u, 3699016825u, 0, FMOD_TOLERANCE, 0},
+{ 452, 3228816396u, 3285165564u, 3211948811u, 401510871u, 3209840260u, 3330978248u, 0, FMOD_TOLERANCE, 0},
+{ 453, 1094257658u, 634857910u, 3199607513u, 914218057u, 1052048505u, 3710809328u, 0, FMOD_TOLERANCE, 0},
+{ 454, 1083743336u, 2030735578u, 3233855943u, 965677531u, 1083743336u, 2030735578u, 0, FMOD_TOLERANCE, 0},
+{ 455, 1079556815u, 3957229084u, 1051050470u, 3123776651u, 1049160814u, 783877892u, 0, FMOD_TOLERANCE, 0},
+{ 456, 3221863333u, 162122081u, 3239376395u, 108064594u, 3221863333u, 162122081u, 0, FMOD_TOLERANCE, 0},
+{ 457, 3237271786u, 869031839u, 3225020876u, 1344301606u, 3222903301u, 3540960152u, 0, FMOD_TOLERANCE, 0},
+{ 458, 3214433474u, 946696117u, 3231825228u, 1700703647u, 3214433474u, 946696117u, 0, FMOD_TOLERANCE, 0},
+{ 459, 1075492875u, 3394168074u, 1076939786u, 1666995668u, 1075492875u, 3394168074u, 0, FMOD_TOLERANCE, 0},
+{ 460, 3208774795u, 2488789804u, 3238508333u, 1506943664u, 3208774795u, 2488789804u, 0, FMOD_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1050791994u, 3020747664u, 0, FMOD_TOLERANCE, 0},
+{ 462, 3219934542u, 1244307192u, 3191297711u, 2540916692u, 3190874175u, 3436568192u, 0, FMOD_TOLERANCE, 0},
+{ 463, 3200062692u, 2871645739u, 3239081581u, 1440249115u, 3200062692u, 2871645739u, 0, FMOD_TOLERANCE, 0},
+{ 464, 1068350633u, 1231934926u, 3236746788u, 603977748u, 1068350633u, 1231934926u, 0, FMOD_TOLERANCE, 0},
+{ 465, 3195449689u, 2386312545u, 1063169277u, 2715234268u, 3195449689u, 2386312545u, 0, FMOD_TOLERANCE, 0},
+{ 466, 1087803418u, 915867083u, 1046790892u, 3347417612u, 1045638702u, 1901110664u, 0, FMOD_TOLERANCE, 0},
+{ 467, 1105984188u, 3553288373u, 1065698616u, 2906680663u, 1065654333u, 394374333u, 0, FMOD_TOLERANCE, 0},
+{ 468, 1045506226u, 2342364630u, 1051356723u, 4019093203u, 1045506226u, 2342364630u, 0, FMOD_TOLERANCE, 0},
+{ 469, 3201169162u, 2911548084u, 1105282515u, 2476735795u, 3201169162u, 2911548084u, 0, FMOD_TOLERANCE, 0},
+{ 470, 1050472772u, 1836216409u, 1101062307u, 2519592554u, 1050472772u, 1836216409u, 0, FMOD_TOLERANCE, 0},
+{ 471, 1070178161u, 1235369496u, 3222946447u, 668087854u, 1070178161u, 1235369496u, 0, FMOD_TOLERANCE, 0},
+{ 472, 3208554596u, 2981820811u, 1059838516u, 2845580478u, 3204870528u, 1089922664u, 0, FMOD_TOLERANCE, 0},
+{ 473, 3193931414u, 1565550570u, 3217165795u, 4162017137u, 3193931414u, 1565550570u, 0, FMOD_TOLERANCE, 0},
+{ 474, 3237251378u, 2808968027u, 1055630096u, 1782326814u, 3202912790u, 180991026u, 0, FMOD_TOLERANCE, 0},
+{ 475, 1053576974u, 1492622658u, 3216653077u, 3972512122u, 1053576974u, 1492622658u, 0, FMOD_TOLERANCE, 0},
+{ 476, 3222171679u, 2722693603u, 3227814791u, 3169731970u, 3222171679u, 2722693603u, 0, FMOD_TOLERANCE, 0},
+{ 477, 3217906631u, 899763203u, 3207606001u, 2804747833u, 3207251162u, 2122903232u, 0, FMOD_TOLERANCE, 0},
+{ 478, 3230670325u, 3789058912u, 3228095081u, 4135937628u, 3225636468u, 4171394256u, 0, FMOD_TOLERANCE, 0},
+{ 479, 1060199382u, 1682808307u, 3206960335u, 232877759u, 1058588091u, 1970510414u, 0, FMOD_TOLERANCE, 0},
+{ 480, 3242091486u, 2851963139u, 3246852961u, 2590862592u, 3242091486u, 2851963139u, 0, FMOD_TOLERANCE, 0},
+{ 481, 1081200406u, 2422232642u, 3234779662u, 290458310u, 1081200406u, 2422232642u, 0, FMOD_TOLERANCE, 0},
+{ 482, 3210671078u, 1082582386u, 1075605675u, 2602133689u, 3210671078u, 1082582386u, 0, FMOD_TOLERANCE, 0},
+{ 483, 3239818611u, 1789635787u, 1059414278u, 1048286093u, 3206731454u, 161965426u, 0, FMOD_TOLERANCE, 0},
+{ 484, 1098330542u, 231339448u, 1055573265u, 504907415u, 1051746624u, 967485912u, 0, FMOD_TOLERANCE, 0},
+{ 485, 1063211461u, 1153251200u, 3204617090u, 1772013857u, 1057074856u, 3116846123u, 0, FMOD_TOLERANCE, 0},
+{ 486, 1099551055u, 1082898276u, 3212089272u, 1449080862u, 1062378436u, 616033392u, 0, FMOD_TOLERANCE, 0},
+{ 487, 1086008285u, 3177299045u, 1058862813u, 809400815u, 1057989685u, 820293200u, 0, FMOD_TOLERANCE, 0},
+{ 488, 3230854550u, 1924429710u, 1056464743u, 3349283177u, 3203738102u, 3383038049u, 0, FMOD_TOLERANCE, 0},
+{ 489, 3245473391u, 42238036u, 1042379500u, 2113559863u, 3188554021u, 400599972u, 0, FMOD_TOLERANCE, 0},
+{ 490, 1064761243u, 3304403230u, 3217556703u, 58952646u, 1064761243u, 3304403230u, 0, FMOD_TOLERANCE, 0},
+{ 491, 3212669530u, 1645486982u, 3224301095u, 3636267471u, 3212669530u, 1645486982u, 0, FMOD_TOLERANCE, 0},
+{ 492, 1062762009u, 619402181u, 3235208235u, 557360557u, 1062762009u, 619402181u, 0, FMOD_TOLERANCE, 0},
+{ 493, 3238238394u, 110029735u, 1046937383u, 984375729u, 3193133439u, 1179097756u, 0, FMOD_TOLERANCE, 0},
+{ 494, 3189496738u, 4063688092u, 3203235744u, 1049950343u, 3189496738u, 4063688092u, 0, FMOD_TOLERANCE, 0},
+{ 495, 1062350619u, 650996069u, 1054971928u, 3953359826u, 1053065959u, 2577623264u, 0, FMOD_TOLERANCE, 0},
+{ 496, 3227055805u, 66926332u, 1090561839u, 1379780888u, 3227055805u, 66926332u, 0, FMOD_TOLERANCE, 0},
+{ 497, 3233453307u, 2803378256u, 1086057989u, 498534626u, 3233453307u, 2803378256u, 0, FMOD_TOLERANCE, 0},
+{ 498, 1082618553u, 2846400785u, 1047142525u, 1375153550u, 1045619713u, 827121532u, 0, FMOD_TOLERANCE, 0},
+{ 499, 1044581201u, 2869128958u, 1070972315u, 4246440273u, 1044581201u, 2869128958u, 0, FMOD_TOLERANCE, 0},
+{ 500, 1051832506u, 3112381207u, 1044430965u, 3981604561u, 1041693028u, 3636927048u, 0, FMOD_TOLERANCE, 0},
+{ 501, 3231254997u, 243303420u, 1093735824u, 1575581926u, 3231254997u, 243303420u, 0, FMOD_TOLERANCE, 0},
+{ 502, 3239137997u, 3218865041u, 3204803496u, 3840388050u, 3204798666u, 787476908u, 0, FMOD_TOLERANCE, 0},
+{ 503, 1048415431u, 336846959u, 1052664471u, 3798336786u, 1048415431u, 336846959u, 0, FMOD_TOLERANCE, 0},
+{ 504, 1055954236u, 3639240976u, 1081202165u, 1844741676u, 1055954236u, 3639240976u, 0, FMOD_TOLERANCE, 0},
+{ 505, 3211904793u, 717293069u, 3211534283u, 582401011u, 3209542044u, 3408740508u, 0, FMOD_TOLERANCE, 0},
+{ 506, 3251962512u, 3766248610u, 3196520332u, 1174437546u, 3196014770u, 4109085092u, 0, FMOD_TOLERANCE, 0},
+{ 507, 1083431226u, 756959182u, 3204099341u, 1581804034u, 1055393679u, 3734226980u, 0, FMOD_TOLERANCE, 0},
+{ 508, 3205806444u, 3560686300u, 3220980617u, 4277975772u, 3205806444u, 3560686300u, 0, FMOD_TOLERANCE, 0},
+{ 509, 3209906076u, 2598148853u, 3217622194u, 3460421008u, 3209906076u, 2598148853u, 0, FMOD_TOLERANCE, 0},
+{ 510, 1066720824u, 136600515u, 3209934920u, 3340653128u, 1062362868u, 274765744u, 0, FMOD_TOLERANCE, 0},
+{ 511, 1096820310u, 1045480938u, 3251354609u, 4133432965u, 1096820310u, 1045480938u, 0, FMOD_TOLERANCE, 0},
+{ 512, 1091599431u, 1630207738u, 3239996829u, 2393354808u, 1091599431u, 1630207738u, 0, FMOD_TOLERANCE, 0},
+{ 513, 3190626018u, 3739770117u, 1059520750u, 3959551225u, 3190626018u, 3739770117u, 0, FMOD_TOLERANCE, 0},
+{ 514, 3230730505u, 1498861716u, 1091297147u, 847410798u, 3230730505u, 1498861716u, 0, FMOD_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 1073516688u, 983275314u, 0, FMOD_TOLERANCE, 0},
+{ 516, 1054849265u, 2353103845u, 3235718771u, 2978889966u, 1054849265u, 2353103845u, 0, FMOD_TOLERANCE, 0},
+{ 517, 3251357992u, 1546972125u, 3249076079u, 1987349196u, 3247869383u, 771950728u, 0, FMOD_TOLERANCE, 0},
+{ 518, 3238219513u, 2769161072u, 1075207126u, 292616282u, 3222233842u, 1259919276u, 0, FMOD_TOLERANCE, 0},
+{ 519, 3199712298u, 36855311u, 1052128202u, 1479039342u, 3195569658u, 2694859280u, 0, FMOD_TOLERANCE, 0},
+{ 520, 1083757053u, 2027463605u, 1066023013u, 3369686340u, 1064734089u, 2507689016u, 0, FMOD_TOLERANCE, 0},
+{ 521, 3197852749u, 3808681655u, 1054161346u, 1821773119u, 3197852749u, 3808681655u, 0, FMOD_TOLERANCE, 0},
+{ 522, 1040685928u, 3175490326u, 3226879970u, 845687760u, 1040685928u, 3175490326u, 0, FMOD_TOLERANCE, 0},
+{ 523, 1042302993u, 3124482451u, 3242748377u, 3259417226u, 1042302993u, 3124482451u, 0, FMOD_TOLERANCE, 0},
+{ 524, 1045245695u, 2751606436u, 3236210939u, 3923142740u, 1045245695u, 2751606436u, 0, FMOD_TOLERANCE, 0},
+{ 525, 1095694737u, 2016872044u, 3228408064u, 4201274408u, 1079338259u, 2482332128u, 0, FMOD_TOLERANCE, 0},
+{ 526, 3199349254u, 1019916843u, 3219974785u, 1977881787u, 3199349254u, 1019916843u, 0, FMOD_TOLERANCE, 0},
+{ 527, 3199478752u, 2060433318u, 1075872515u, 366073725u, 3199478752u, 2060433318u, 0, FMOD_TOLERANCE, 0},
+{ 528, 3191180557u, 1098469906u, 1082900695u, 2349346832u, 3191180557u, 1098469906u, 0, FMOD_TOLERANCE, 0},
+{ 529, 3209974707u, 3011196295u, 3252479932u, 2459281672u, 3209974707u, 3011196295u, 0, FMOD_TOLERANCE, 0},
+{ 530, 3221334323u, 2843222682u, 1089275809u, 298982001u, 3221334323u, 2843222682u, 0, FMOD_TOLERANCE, 0},
+{ 531, 1101737698u, 914741728u, 3203468059u, 2833809843u, 1055493013u, 3780280494u, 0, FMOD_TOLERANCE, 0},
+{ 532, 3236763878u, 1274901962u, 3241535845u, 3759113509u, 3236763878u, 1274901962u, 0, FMOD_TOLERANCE, 0},
+{ 533, 3245916442u, 2134927252u, 3253802671u, 3013731444u, 3245916442u, 2134927252u, 0, FMOD_TOLERANCE, 0},
+{ 534, 1099201341u, 2230655177u, 3254510616u, 1249674366u, 1099201341u, 2230655177u, 0, FMOD_TOLERANCE, 0},
+{ 535, 1062971253u, 717357389u, 1083533731u, 3746683362u, 1062971253u, 717357389u, 0, FMOD_TOLERANCE, 0},
+{ 536, 3213773114u, 834976849u, 3217357661u, 2465861779u, 3213773114u, 834976849u, 0, FMOD_TOLERANCE, 0},
+{ 537, 1045656117u, 1385714428u, 1053358395u, 3007113740u, 1045656117u, 1385714428u, 0, FMOD_TOLERANCE, 0},
+{ 538, 1050527919u, 599268545u, 3201368210u, 2309854744u, 1050527919u, 599268545u, 0, FMOD_TOLERANCE, 0},
+{ 539, 1069954454u, 2840234388u, 3232496515u, 333365983u, 1069954454u, 2840234388u, 0, FMOD_TOLERANCE, 0},
+{ 540, 1045922781u, 3136078996u, 3194520860u, 2650572904u, 1045922781u, 3136078996u, 0, FMOD_TOLERANCE, 0},
+{ 541, 3233687691u, 2405805086u, 3251640319u, 324233833u, 3233687691u, 2405805086u, 0, FMOD_TOLERANCE, 0},
+{ 542, 1106699146u, 2589598340u, 3254677807u, 952438812u, 1106699146u, 2589598340u, 0, FMOD_TOLERANCE, 0},
+{ 543, 3189114773u, 1922837702u, 3216892718u, 3535907549u, 3189114773u, 1922837702u, 0, FMOD_TOLERANCE, 0},
+{ 544, 3243615868u, 261447440u, 3209805849u, 1150571079u, 3209751028u, 448279323u, 0, FMOD_TOLERANCE, 0},
+{ 545, 1095805232u, 4026487528u, 1073152064u, 27340691u, 1072528272u, 4241782692u, 0, FMOD_TOLERANCE, 0},
+{ 546, 3229123692u, 338765118u, 1086225786u, 3207238249u, 3229123692u, 338765118u, 0, FMOD_TOLERANCE, 0},
+{ 547, 3196182703u, 1085283176u, 3187775111u, 1601194210u, 3185471006u, 277550016u, 0, FMOD_TOLERANCE, 0},
+{ 548, 1091520173u, 3031712790u, 3252307859u, 170666844u, 1091520173u, 3031712790u, 0, FMOD_TOLERANCE, 0},
+{ 549, 3218862231u, 3148395674u, 1041913758u, 3306391490u, 3188988265u, 2020178358u, 0, FMOD_TOLERANCE, 0},
+{ 550, 3201277070u, 2205233857u, 3208100078u, 3993195511u, 3201277070u, 2205233857u, 0, FMOD_TOLERANCE, 0},
+{ 551, 1067699608u, 4282766727u, 1072820377u, 1874778218u, 1067699608u, 4282766727u, 0, FMOD_TOLERANCE, 0},
+{ 552, 3210833092u, 2920860798u, 3218070226u, 3104066154u, 3210833092u, 2920860798u, 0, FMOD_TOLERANCE, 0},
+{ 553, 3204950351u, 969991373u, 3250596895u, 1734386152u, 3204950351u, 969991373u, 0, FMOD_TOLERANCE, 0},
+{ 554, 3238915818u, 1218740205u, 3239802737u, 2610078504u, 3238915818u, 1218740205u, 0, FMOD_TOLERANCE, 0},
+{ 555, 3206031242u, 1485218325u, 3220870240u, 3591664613u, 3206031242u, 1485218325u, 0, FMOD_TOLERANCE, 0},
+{ 556, 3202074143u, 690157417u, 3190850619u, 4192347699u, 3190754019u, 1427484234u, 0, FMOD_TOLERANCE, 0},
+{ 557, 1096053810u, 4009839784u, 1079670252u, 394167192u, 1079518848u, 867425232u, 0, FMOD_TOLERANCE, 0},
+{ 558, 3234559237u, 961532417u, 1092588071u, 2923790239u, 3234559237u, 961532417u, 0, FMOD_TOLERANCE, 0},
+{ 559, 3203879091u, 4174125604u, 1050682630u, 2169701868u, 3195763358u, 3837894848u, 0, FMOD_TOLERANCE, 0},
+{ 560, 3243092475u, 4146748230u, 1087373950u, 2481478351u, 3232069221u, 948734696u, 0, FMOD_TOLERANCE, 0},
+{ 561, 1076987866u, 3984715440u, 1050421618u, 2446142566u, 1049869649u, 4014532372u, 0, FMOD_TOLERANCE, 0},
+{ 562, 1084172406u, 936290150u, 1100614426u, 3625806370u, 1084172406u, 936290150u, 0, FMOD_TOLERANCE, 0},
+{ 563, 1099787952u, 1866615265u, 3215651428u, 2337013350u, 1068112940u, 2065541092u, 0, FMOD_TOLERANCE, 0},
+{ 564, 3253198302u, 712227971u, 1106004723u, 973148499u, 3253198302u, 712227971u, 0, FMOD_TOLERANCE, 0},
+{ 565, 3230088199u, 3409813738u, 3244817008u, 1933503498u, 3230088199u, 3409813738u, 0, FMOD_TOLERANCE, 0},
+{ 566, 1079943733u, 3180389060u, 3228735703u, 83422217u, 1079943733u, 3180389060u, 0, FMOD_TOLERANCE, 0},
+{ 567, 1077878724u, 556972671u, 3204582372u, 841555801u, 1055208115u, 591272876u, 0, FMOD_TOLERANCE, 0},
+{ 568, 1070767721u, 4189151332u, 1080874032u, 706326922u, 1070767721u, 4189151332u, 0, FMOD_TOLERANCE, 0},
+{ 569, 1096151307u, 198291836u, 1057281892u, 2188836928u, 1055499771u, 875289856u, 0, FMOD_TOLERANCE, 0},
+{ 570, 1078091995u, 1219449298u, 3228734687u, 3504562743u, 1078091995u, 1219449298u, 0, FMOD_TOLERANCE, 0},
+{ 571, 3204570464u, 1776099219u, 1094316777u, 4188083896u, 3204570464u, 1776099219u, 0, FMOD_TOLERANCE, 0},
+{ 572, 3193845708u, 2614400266u, 1073750227u, 3003203347u, 3193845708u, 2614400266u, 0, FMOD_TOLERANCE, 0},
+{ 573, 3213982678u, 2959351406u, 1105603716u, 311851587u, 3213982678u, 2959351406u, 0, FMOD_TOLERANCE, 0},
+{ 574, 1084544434u, 865443613u, 1097532516u, 3622237781u, 1084544434u, 865443613u, 0, FMOD_TOLERANCE, 0},
+{ 575, 3231786666u, 447506102u, 3195759295u, 3603669725u, 3195388962u, 48097524u, 0, FMOD_TOLERANCE, 0},
+{ 576, 1097890173u, 3934398273u, 1040996422u, 2968621268u, 1032218095u, 1642424320u, 0, FMOD_TOLERANCE, 0},
+{ 577, 3196739825u, 784208771u, 1088764788u, 2182296421u, 3196739825u, 784208771u, 0, FMOD_TOLERANCE, 0},
+{ 578, 3248332291u, 1527590526u, 3206961556u, 2823164069u, 3202606342u, 467945328u, 0, FMOD_TOLERANCE, 0},
+{ 579, 3236644131u, 3876699591u, 3207481130u, 4028148535u, 3207025197u, 2389472u, 0, FMOD_TOLERANCE, 0},
+{ 580, 1083576186u, 2164249756u, 1059857743u, 1785169952u, 1057168829u, 1285739008u, 0, FMOD_TOLERANCE, 0},
+{ 581, 1091804009u, 2079273665u, 1080303860u, 625760474u, 1080204852u, 4108973564u, 0, FMOD_TOLERANCE, 0},
+{ 582, 3226486108u, 3636214836u, 1068367620u, 2932621925u, 3215665271u, 4164533778u, 0, FMOD_TOLERANCE, 0},
+{ 583, 1043995372u, 4274131512u, 1047707755u, 92550763u, 1043995372u, 4274131512u, 0, FMOD_TOLERANCE, 0},
+{ 584, 3198822121u, 2648933384u, 1084603503u, 3534304873u, 3198822121u, 2648933384u, 0, FMOD_TOLERANCE, 0},
+{ 585, 1064563235u, 3216750767u, 3191088629u, 547482628u, 1043331165u, 1682911544u, 0, FMOD_TOLERANCE, 0},
+{ 586, 1061084774u, 1420360746u, 1080063101u, 1690029499u, 1061084774u, 1420360746u, 0, FMOD_TOLERANCE, 0},
+{ 587, 3229855364u, 1908572179u, 1080112083u, 1228319033u, 3226719625u, 1147057872u, 0, FMOD_TOLERANCE, 0},
+{ 588, 1048158178u, 500312015u, 3212368508u, 3864619086u, 1048158178u, 500312015u, 0, FMOD_TOLERANCE, 0},
+{ 589, 3221335610u, 4211343447u, 1087492676u, 4272583781u, 3221335610u, 4211343447u, 0, FMOD_TOLERANCE, 0},
+{ 590, 1099392394u, 2382118000u, 1042665328u, 567154882u, 1040869806u, 453051744u, 0, FMOD_TOLERANCE, 0},
+{ 591, 1058013442u, 1435344339u, 3216303171u, 2275988178u, 1058013442u, 1435344339u, 0, FMOD_TOLERANCE, 0},
+{ 592, 3214538619u, 3403659753u, 3218043030u, 1926480488u, 3214538619u, 3403659753u, 0, FMOD_TOLERANCE, 0},
+{ 593, 1076840383u, 1198845185u, 3225556149u, 1130089684u, 1076840383u, 1198845185u, 0, FMOD_TOLERANCE, 0},
+{ 594, 3222663042u, 2183928090u, 1048403956u, 963834821u, 3195363473u, 3195485470u, 0, FMOD_TOLERANCE, 0},
+{ 595, 1101672960u, 2120625396u, 1041006976u, 2137548527u, 1040260673u, 1412589497u, 0, FMOD_TOLERANCE, 0},
+{ 596, 1099230238u, 586700956u, 1059670521u, 303891699u, 1058907437u, 671754624u, 0, FMOD_TOLERANCE, 0},
+{ 597, 3218994498u, 2509132460u, 1102827530u, 2205707903u, 3218994498u, 2509132460u, 0, FMOD_TOLERANCE, 0},
+{ 598, 3204860597u, 1229308263u, 3209170414u, 4206576047u, 3204860597u, 1229308263u, 0, FMOD_TOLERANCE, 0},
+{ 599, 3224076289u, 4078010749u, 3199236456u, 733478972u, 3194080982u, 4202642048u, 0, FMOD_TOLERANCE, 0},
+{ 600, 3197712584u, 4277541051u, 3199806921u, 397102023u, 3197712584u, 4277541051u, 0, FMOD_TOLERANCE, 0},
+{ 601, 3195975013u, 900999594u, 3234720188u, 2530214248u, 3195975013u, 900999594u, 0, FMOD_TOLERANCE, 0},
+{ 602, 1076543548u, 4000609478u, 1096577064u, 4148592328u, 1076543548u, 4000609478u, 0, FMOD_TOLERANCE, 0},
+{ 603, 1048668084u, 2154187873u, 3224392607u, 3957250362u, 1048668084u, 2154187873u, 0, FMOD_TOLERANCE, 0},
+{ 604, 3223413488u, 2867079200u, 1101870326u, 921212001u, 3223413488u, 2867079200u, 0, FMOD_TOLERANCE, 0},
+{ 605, 3233221890u, 674547716u, 1063216239u, 3929755226u, 3209670490u, 2459169696u, 0, FMOD_TOLERANCE, 0},
+{ 606, 3240415851u, 3158182449u, 1043794244u, 3259056345u, 3187937981u, 192140832u, 0, FMOD_TOLERANCE, 0},
+{ 607, 3236776656u, 3002823940u, 1059511739u, 2832435794u, 3204553045u, 1016263584u, 0, FMOD_TOLERANCE, 0},
+{ 608, 3217304822u, 2196511929u, 1049973941u, 3672092877u, 3190009780u, 1471223680u, 0, FMOD_TOLERANCE, 0},
+{ 609, 1050438056u, 3655292191u, 1086438127u, 3567072906u, 1050438056u, 3655292191u, 0, FMOD_TOLERANCE, 0},
+{ 610, 3243186948u, 1617573614u, 3201863123u, 3090723732u, 3201825032u, 683072336u, 0, FMOD_TOLERANCE, 0},
+{ 611, 3233201380u, 679893506u, 3211547753u, 824081024u, 3211397784u, 2944964096u, 0, FMOD_TOLERANCE, 0},
+{ 612, 1089530525u, 2285242807u, 1084999409u, 2221731406u, 1083907976u, 1700204076u, 0, FMOD_TOLERANCE, 0},
+{ 613, 3206733664u, 1935990727u, 1088822246u, 1058156518u, 3206733664u, 1935990727u, 0, FMOD_TOLERANCE, 0},
+{ 614, 1102839166u, 521023584u, 1059186903u, 4245163857u, 1055362223u, 1655370368u, 0, FMOD_TOLERANCE, 0},
+{ 615, 1103891140u, 2312887617u, 3191771354u, 1885370807u, 1041541300u, 2718621452u, 0, FMOD_TOLERANCE, 0},
+{ 616, 3252953815u, 1796441468u, 1100030327u, 2772711004u, 3246721348u, 4280920168u, 0, FMOD_TOLERANCE, 0},
+{ 617, 3204276820u, 2095685003u, 1077984448u, 2100773742u, 3204276820u, 2095685003u, 0, FMOD_TOLERANCE, 0},
+{ 618, 3192954620u, 2892538035u, 1042396334u, 4162200338u, 3188854329u, 894705716u, 0, FMOD_TOLERANCE, 0},
+{ 619, 3242725751u, 2177698116u, 3227557177u, 150832500u, 3227202903u, 2218581776u, 0, FMOD_TOLERANCE, 0},
+{ 620, 3191562216u, 607966734u, 3236250630u, 4164600559u, 3191562216u, 607966734u, 0, FMOD_TOLERANCE, 0},
+{ 621, 3216389812u, 2830122967u, 1046096700u, 3713346883u, 3190040120u, 1259669816u, 0, FMOD_TOLERANCE, 0},
+{ 622, 3237197963u, 2314640506u, 3203696416u, 3276228872u, 3202693343u, 3819577136u, 0, FMOD_TOLERANCE, 0},
+{ 623, 3212912307u, 469331883u, 3249037349u, 2999233437u, 3212912307u, 469331883u, 0, FMOD_TOLERANCE, 0},
+{ 624, 1097382011u, 560886625u, 1091899487u, 748795120u, 1091003205u, 1960741600u, 0, FMOD_TOLERANCE, 0},
+{ 625, 1049886858u, 2958421324u, 1092569414u, 3235243477u, 1049886858u, 2958421324u, 0, FMOD_TOLERANCE, 0},
+{ 626, 3193026497u, 3221475559u, 1043038304u, 915608434u, 3187732659u, 3170670584u, 0, FMOD_TOLERANCE, 0},
+{ 627, 1071197530u, 3007808652u, 3216682290u, 2531019474u, 1068805587u, 143208890u, 0, FMOD_TOLERANCE, 0},
+{ 628, 3242028999u, 1767658578u, 3237045269u, 2313128318u, 3233211152u, 3004976480u, 0, FMOD_TOLERANCE, 0},
+{ 629, 3210617892u, 1926845182u, 1066835624u, 1783256828u, 3210617892u, 1926845182u, 0, FMOD_TOLERANCE, 0},
+{ 630, 1040575629u, 90378038u, 1057168870u, 164358218u, 1040575629u, 90378038u, 0, FMOD_TOLERANCE, 0},
+{ 631, 1106859172u, 1610524680u, 1085283851u, 2903496007u, 1084994804u, 440348838u, 0, FMOD_TOLERANCE, 0},
+{ 632, 1078635586u, 4274321404u, 3202913591u, 720121831u, 1055010561u, 2898139117u, 0, FMOD_TOLERANCE, 0},
+{ 633, 1051205256u, 2034778236u, 1071133763u, 1413236391u, 1051205256u, 2034778236u, 0, FMOD_TOLERANCE, 0},
+{ 634, 1051063028u, 1489112261u, 1076691395u, 348210906u, 1051063028u, 1489112261u, 0, FMOD_TOLERANCE, 0},
+{ 635, 3206743917u, 2797651324u, 3224410527u, 2374818327u, 3206743917u, 2797651324u, 0, FMOD_TOLERANCE, 0},
+{ 636, 1088287256u, 1823161666u, 3197810695u, 3119680047u, 1050267207u, 2986447262u, 0, FMOD_TOLERANCE, 0},
+{ 637, 1065927336u, 3420950657u, 1087084743u, 2136638961u, 1065927336u, 3420950657u, 0, FMOD_TOLERANCE, 0},
+{ 638, 1069902224u, 3554566429u, 1062907717u, 2736702589u, 1062400682u, 4042146994u, 0, FMOD_TOLERANCE, 0},
+{ 639, 3244888667u, 2928437580u, 3187765027u, 1393427873u, 3186712505u, 567458542u, 0, FMOD_TOLERANCE, 0},
+{ 640, 3209301561u, 189447067u, 1051643315u, 828663513u, 3196334080u, 1428817848u, 0, FMOD_TOLERANCE, 0},
+{ 641, 1052313869u, 2852350928u, 1045683757u, 673354280u, 1045015195u, 3961163520u, 0, FMOD_TOLERANCE, 0},
+{ 642, 1043946301u, 3589563265u, 3248741629u, 812657927u, 1043946301u, 3589563265u, 0, FMOD_TOLERANCE, 0},
+{ 643, 3190610826u, 1766416701u, 1100392103u, 2185373290u, 3190610826u, 1766416701u, 0, FMOD_TOLERANCE, 0},
+{ 644, 3220275389u, 3763582673u, 3191965790u, 388374829u, 3188237498u, 3752050608u, 0, FMOD_TOLERANCE, 0},
+{ 645, 1079635136u, 1187403069u, 1075300235u, 336640304u, 1074075536u, 781324096u, 0, FMOD_TOLERANCE, 0},
+{ 646, 1103926251u, 1718795752u, 3243118752u, 683369237u, 1093945023u, 2445129250u, 0, FMOD_TOLERANCE, 0},
+{ 647, 3210792097u, 1863545307u, 1069449477u, 3418627399u, 3210792097u, 1863545307u, 0, FMOD_TOLERANCE, 0},
+{ 648, 1069601294u, 3295607249u, 1068878592u, 1633297809u, 1067954746u, 1325898786u, 0, FMOD_TOLERANCE, 0},
+{ 649, 1058947127u, 2585980994u, 3236670483u, 1286750688u, 1058947127u, 2585980994u, 0, FMOD_TOLERANCE, 0},
+{ 650, 1046157033u, 15816845u, 3233249283u, 2491924775u, 1046157033u, 15816845u, 0, FMOD_TOLERANCE, 0},
+{ 651, 1042413021u, 1051983351u, 1049180786u, 1474421917u, 1042413021u, 1051983351u, 0, FMOD_TOLERANCE, 0},
+{ 652, 3201249525u, 2003816032u, 1086050104u, 668090487u, 3201249525u, 2003816032u, 0, FMOD_TOLERANCE, 0},
+{ 653, 1052556037u, 3671484625u, 1067020039u, 430024694u, 1052556037u, 3671484625u, 0, FMOD_TOLERANCE, 0},
+{ 654, 1067397110u, 3991830201u, 3207808714u, 1021245839u, 1059390649u, 4224879470u, 0, FMOD_TOLERANCE, 0},
+{ 655, 1064194391u, 4255801807u, 3207681716u, 1926756877u, 1060184982u, 408640463u, 0, FMOD_TOLERANCE, 0},
+{ 656, 1052140785u, 4167786896u, 1077097744u, 1775517981u, 1052140785u, 4167786896u, 0, FMOD_TOLERANCE, 0},
+{ 657, 1085601978u, 3187518564u, 1082437406u, 944672491u, 1079142177u, 1808227904u, 0, FMOD_TOLERANCE, 0},
+{ 658, 1049366282u, 953085192u, 3227310828u, 3459155777u, 1049366282u, 953085192u, 0, FMOD_TOLERANCE, 0},
+{ 659, 1069502506u, 1908555460u, 1073640207u, 260441967u, 1069502506u, 1908555460u, 0, FMOD_TOLERANCE, 0},
+{ 660, 1067219606u, 250762477u, 1072582645u, 2886742039u, 1067219606u, 250762477u, 0, FMOD_TOLERANCE, 0},
+{ 661, 3250906006u, 786180031u, 3197734769u, 2788918312u, 3197718341u, 1660002464u, 0, FMOD_TOLERANCE, 0},
+{ 662, 3234511827u, 2055912467u, 3244244909u, 1394142937u, 3234511827u, 2055912467u, 0, FMOD_TOLERANCE, 0},
+{ 663, 1069612985u, 91984146u, 3222252812u, 4126276047u, 1069612985u, 91984146u, 0, FMOD_TOLERANCE, 0},
+{ 664, 1081340139u, 3942715706u, 3239316352u, 410676547u, 1081340139u, 3942715706u, 0, FMOD_TOLERANCE, 0},
+{ 665, 3198557846u, 86296211u, 1085850694u, 649202596u, 3198557846u, 86296211u, 0, FMOD_TOLERANCE, 0},
+{ 666, 3245366392u, 3069064472u, 3237358008u, 23209276u, 3237336469u, 3928080368u, 0, FMOD_TOLERANCE, 0},
+{ 667, 1081235288u, 1867297860u, 1072956607u, 2513414118u, 1072038560u, 3116996488u, 0, FMOD_TOLERANCE, 0},
+{ 668, 3250533347u, 3171788768u, 3235208783u, 162138697u, 3233674177u, 213600176u, 0, FMOD_TOLERANCE, 0},
+{ 669, 1081728455u, 1245110700u, 1081653954u, 2584994077u, 1077030987u, 36702448u, 0, FMOD_TOLERANCE, 0},
+{ 670, 3245510120u, 3347226587u, 1058962932u, 2291943376u, 3204328645u, 501177472u, 0, FMOD_TOLERANCE, 0},
+{ 671, 1058899062u, 966940828u, 1060726420u, 2798041096u, 1058899062u, 966940828u, 0, FMOD_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1072793759u, 2487340727u, 0, FMOD_TOLERANCE, 0},
+{ 673, 3248116497u, 1671039260u, 1086395032u, 3745833360u, 3232128780u, 3325632576u, 0, FMOD_TOLERANCE, 0},
+{ 674, 1057078797u, 651714217u, 1047070645u, 2130549237u, 1046831002u, 3175457063u, 0, FMOD_TOLERANCE, 0},
+{ 675, 3207115731u, 1423000172u, 3247822717u, 1551488170u, 3207115731u, 1423000172u, 0, FMOD_TOLERANCE, 0},
+{ 676, 3201597307u, 921077236u, 3213332351u, 1431049019u, 3201597307u, 921077236u, 0, FMOD_TOLERANCE, 0},
+{ 677, 1067510295u, 655715547u, 3190985373u, 1527556471u, 1041178029u, 1042162176u, 0, FMOD_TOLERANCE, 0},
+{ 678, 3227654979u, 4110878657u, 3251297180u, 879739345u, 3227654979u, 4110878657u, 0, FMOD_TOLERANCE, 0},
+{ 679, 1085804762u, 2623955764u, 1093699897u, 1216444475u, 1085804762u, 2623955764u, 0, FMOD_TOLERANCE, 0},
+{ 680, 1091905603u, 107442539u, 3239767031u, 1149813329u, 1091905603u, 107442539u, 0, FMOD_TOLERANCE, 0},
+{ 681, 3233445240u, 1761361082u, 3226030205u, 1121849716u, 3225676576u, 3233762236u, 0, FMOD_TOLERANCE, 0},
+{ 682, 3240087115u, 2534144722u, 1044223733u, 3512285706u, 3190415678u, 3596436140u, 0, FMOD_TOLERANCE, 0},
+{ 683, 3211846077u, 4073670723u, 1050729852u, 3034818849u, 3194207612u, 3429855104u, 0, FMOD_TOLERANCE, 0},
+{ 684, 1101984574u, 1421423503u, 1060278048u, 1397153092u, 1059882635u, 2568378152u, 0, FMOD_TOLERANCE, 0},
+{ 685, 3217421829u, 1649206019u, 1104525577u, 1267104290u, 3217421829u, 1649206019u, 0, FMOD_TOLERANCE, 0},
+{ 686, 3189302097u, 3775270392u, 1040251850u, 68667319u, 3187645983u, 1941510404u, 0, FMOD_TOLERANCE, 0},
+{ 687, 3204330900u, 3099226694u, 3254103006u, 4020102648u, 3204330900u, 3099226694u, 0, FMOD_TOLERANCE, 0},
+{ 688, 3201591712u, 3718441177u, 3215643451u, 4032951536u, 3201591712u, 3718441177u, 0, FMOD_TOLERANCE, 0},
+{ 689, 1044131371u, 508048351u, 3210196713u, 1707937896u, 1044131371u, 508048351u, 0, FMOD_TOLERANCE, 0},
+{ 690, 3198611627u, 2784738160u, 1073435430u, 1109346010u, 3198611627u, 2784738160u, 0, FMOD_TOLERANCE, 0},
+{ 691, 3225725290u, 3331916473u, 3238794568u, 2707019594u, 3225725290u, 3331916473u, 0, FMOD_TOLERANCE, 0},
+{ 692, 1093182670u, 3093165197u, 1072894805u, 2853215019u, 1072144665u, 522903412u, 0, FMOD_TOLERANCE, 0},
+{ 693, 3216582139u, 2135797997u, 1048399559u, 2941926126u, 3195240398u, 1149654386u, 0, FMOD_TOLERANCE, 0},
+{ 694, 1048430980u, 2083412145u, 3249335391u, 507212448u, 1048430980u, 2083412145u, 0, FMOD_TOLERANCE, 0},
+{ 695, 1075363751u, 4270176401u, 3246546709u, 3288753319u, 1075363751u, 4270176401u, 0, FMOD_TOLERANCE, 0},
+{ 696, 3247932863u, 3692175292u, 3197271515u, 3989064196u, 3195385746u, 1804687120u, 0, FMOD_TOLERANCE, 0},
+{ 697, 3251691738u, 3111924274u, 1066772558u, 59281695u, 3213394999u, 381330476u, 0, FMOD_TOLERANCE, 0},
+{ 698, 1067683911u, 2135245466u, 3208804313u, 3846547392u, 1060988849u, 2687204992u, 0, FMOD_TOLERANCE, 0},
+{ 699, 1094877811u, 972051266u, 3222814246u, 3539700586u, 1073938217u, 1705671480u, 0, FMOD_TOLERANCE, 0},
+{ 700, 3202965930u, 330951080u, 1079189813u, 583922384u, 3202965930u, 330951080u, 0, FMOD_TOLERANCE, 0},
+{ 701, 1089640092u, 1711944085u, 1104170032u, 643991456u, 1089640092u, 1711944085u, 0, FMOD_TOLERANCE, 0},
+{ 702, 3234429549u, 2072550721u, 3250147641u, 4280263530u, 3234429549u, 2072550721u, 0, FMOD_TOLERANCE, 0},
+{ 703, 3192972706u, 1566376352u, 1067251433u, 72984588u, 3192972706u, 1566376352u, 0, FMOD_TOLERANCE, 0},
+{ 704, 1095276569u, 3103043079u, 1045853123u, 410067497u, 1045654090u, 2757379143u, 0, FMOD_TOLERANCE, 0},
+{ 705, 3216672493u, 1910366299u, 1081770885u, 634683073u, 3216672493u, 1910366299u, 0, FMOD_TOLERANCE, 0},
+{ 706, 1081530688u, 2226525875u, 3224149290u, 2126302825u, 1075813844u, 1822776382u, 0, FMOD_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1045096906u, 3892678396u, 0, FMOD_TOLERANCE, 0},
+{ 708, 1066482943u, 1953339096u, 1077176252u, 1476516558u, 1066482943u, 1953339096u, 0, FMOD_TOLERANCE, 0},
+{ 709, 1066092000u, 1306277326u, 1079089150u, 4093716191u, 1066092000u, 1306277326u, 0, FMOD_TOLERANCE, 0},
+{ 710, 3233148787u, 51750045u, 3242913901u, 4256866157u, 3233148787u, 51750045u, 0, FMOD_TOLERANCE, 0},
+{ 711, 3195084967u, 2163853087u, 3232053146u, 2962422808u, 3195084967u, 2163853087u, 0, FMOD_TOLERANCE, 0},
+{ 712, 1075516945u, 1618388148u, 3233154824u, 3711953164u, 1075516945u, 1618388148u, 0, FMOD_TOLERANCE, 0},
+{ 713, 3246868002u, 357108214u, 3202294604u, 2306775262u, 3202248567u, 2697674194u, 0, FMOD_TOLERANCE, 0},
+{ 714, 3201904086u, 2571356437u, 3249064063u, 2394851808u, 3201904086u, 2571356437u, 0, FMOD_TOLERANCE, 0},
+{ 715, 3230488091u, 4273880094u, 1103698617u, 3578832032u, 3230488091u, 4273880094u, 0, FMOD_TOLERANCE, 0},
+{ 716, 3233426701u, 2091068742u, 3228270226u, 3980489730u, 3227097327u, 2373198088u, 0, FMOD_TOLERANCE, 0},
+{ 717, 3229016752u, 2772307714u, 1051008486u, 32546576u, 3198396666u, 2143313456u, 0, FMOD_TOLERANCE, 0},
+{ 718, 3241229215u, 2143788498u, 3195498043u, 3630119231u, 3190991165u, 3498199328u, 0, FMOD_TOLERANCE, 0},
+{ 719, 3198632935u, 2527385594u, 3240503648u, 3482095012u, 3198632935u, 2527385594u, 0, FMOD_TOLERANCE, 0},
+{ 720, 3242168799u, 2690097362u, 1068598730u, 2360266862u, 3209603524u, 1892561408u, 0, FMOD_TOLERANCE, 0},
+{ 721, 1058857869u, 2673272949u, 1082639557u, 522449749u, 1058857869u, 2673272949u, 0, FMOD_TOLERANCE, 0},
+{ 722, 1104424147u, 3596379400u, 3242016775u, 2002293002u, 1092711812u, 2661827800u, 0, FMOD_TOLERANCE, 0},
+{ 723, 1099439656u, 4113224369u, 3222122439u, 2152316893u, 1073445325u, 3816878350u, 0, FMOD_TOLERANCE, 0},
+{ 724, 3220796716u, 31662602u, 1047721249u, 1747087514u, 3195088561u, 1859026178u, 0, FMOD_TOLERANCE, 0},
+{ 725, 3250463757u, 2489659568u, 1097051253u, 277506957u, 3239039640u, 2313158848u, 0, FMOD_TOLERANCE, 0},
+{ 726, 3191401834u, 3850162281u, 3213841942u, 438724093u, 3191401834u, 3850162281u, 0, FMOD_TOLERANCE, 0},
+{ 727, 1095392535u, 2431814052u, 1075518084u, 2672434118u, 1074809013u, 4104449276u, 0, FMOD_TOLERANCE, 0},
+{ 728, 3243162735u, 391606792u, 1048184750u, 4168944276u, 3195430506u, 719698312u, 0, FMOD_TOLERANCE, 0},
+{ 729, 3247792416u, 457529672u, 3201090276u, 72407935u, 3199420611u, 2859325692u, 0, FMOD_TOLERANCE, 0},
+{ 730, 3218720719u, 3954981400u, 1052053242u, 2411049585u, 3197400969u, 3459903180u, 0, FMOD_TOLERANCE, 0},
+{ 731, 1086180091u, 485456950u, 1088415093u, 1655397424u, 1086180091u, 485456950u, 0, FMOD_TOLERANCE, 0},
+{ 732, 3198234428u, 1551748070u, 3236871640u, 1329701152u, 3198234428u, 1551748070u, 0, FMOD_TOLERANCE, 0},
+{ 733, 3224639122u, 3099222537u, 1104984570u, 4293792842u, 3224639122u, 3099222537u, 0, FMOD_TOLERANCE, 0},
+{ 734, 3203949705u, 3603065260u, 3197735968u, 2402359253u, 3192575602u, 1022863328u, 0, FMOD_TOLERANCE, 0},
+{ 735, 3198824584u, 3961208159u, 3219057584u, 2340553876u, 3198824584u, 3961208159u, 0, FMOD_TOLERANCE, 0},
+{ 736, 1074881909u, 4014841779u, 3197672877u, 3697233334u, 1044445505u, 1497930304u, 0, FMOD_TOLERANCE, 0},
+{ 737, 3213275657u, 1403876392u, 3254028950u, 921363393u, 3213275657u, 1403876392u, 0, FMOD_TOLERANCE, 0},
+{ 738, 1107251806u, 1862576361u, 3194031708u, 2476290925u, 1046486580u, 3816855315u, 0, FMOD_TOLERANCE, 0},
+{ 739, 1049661768u, 1454212851u, 1088378861u, 3400401866u, 1049661768u, 1454212851u, 0, FMOD_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 1040987798u, 1349226184u, 0, FMOD_TOLERANCE, 0},
+{ 741, 3216409282u, 1199568671u, 3225679997u, 46947405u, 3216409282u, 1199568671u, 0, FMOD_TOLERANCE, 0},
+{ 742, 1077685537u, 2596231448u, 3253943728u, 2219151748u, 1077685537u, 2596231448u, 0, FMOD_TOLERANCE, 0},
+{ 743, 1066527035u, 4119719558u, 3222036299u, 1275474618u, 1066527035u, 4119719558u, 0, FMOD_TOLERANCE, 0},
+{ 744, 3239908663u, 3347296825u, 1101507910u, 1254014794u, 3239908663u, 3347296825u, 0, FMOD_TOLERANCE, 0},
+{ 745, 1084119992u, 673775040u, 1070743626u, 244126093u, 1067744490u, 2088719416u, 0, FMOD_TOLERANCE, 0},
+{ 746, 3203199850u, 1832066983u, 1051358028u, 3262483417u, 3197836571u, 3536282126u, 0, FMOD_TOLERANCE, 0},
+{ 747, 1077559600u, 3962610501u, 3198598777u, 849269178u, 1050089150u, 3840253476u, 0, FMOD_TOLERANCE, 0},
+{ 748, 3235473900u, 2497516122u, 3254374111u, 2821429629u, 3235473900u, 2497516122u, 0, FMOD_TOLERANCE, 0},
+{ 749, 1076236288u, 2805941787u, 3217785843u, 779131141u, 1068592495u, 516298114u, 0, FMOD_TOLERANCE, 0},
+{ 750, 3226908686u, 723423605u, 1084533420u, 627282213u, 3226908686u, 723423605u, 0, FMOD_TOLERANCE, 0},
+{ 751, 3215947680u, 4292778869u, 1078101071u, 1676860147u, 3215947680u, 4292778869u, 0, FMOD_TOLERANCE, 0},
+{ 752, 1076288502u, 3528118587u, 3194648564u, 2363260897u, 1047069637u, 3428852854u, 0, FMOD_TOLERANCE, 0},
+{ 753, 3192897879u, 1307010018u, 1061248120u, 1468743108u, 3192897879u, 1307010018u, 0, FMOD_TOLERANCE, 0},
+{ 754, 3246583139u, 107905661u, 3226089788u, 1943427674u, 3225566744u, 1395459164u, 0, FMOD_TOLERANCE, 0},
+{ 755, 3188230541u, 760006940u, 1054265604u, 1749976597u, 3188230541u, 760006940u, 0, FMOD_TOLERANCE, 0},
+{ 756, 3237773384u, 2787503556u, 1081282610u, 1195841206u, 3228318527u, 2478031064u, 0, FMOD_TOLERANCE, 0},
+{ 757, 3191802156u, 545462045u, 3208381743u, 1981311808u, 3191802156u, 545462045u, 0, FMOD_TOLERANCE, 0},
+{ 758, 1061232136u, 3657978397u, 1104463616u, 3501253426u, 1061232136u, 3657978397u, 0, FMOD_TOLERANCE, 0},
+{ 759, 1049883857u, 1804177501u, 3210693633u, 3606766729u, 1049883857u, 1804177501u, 0, FMOD_TOLERANCE, 0},
+{ 760, 1076856879u, 1336278526u, 1043741618u, 3165279431u, 1038757582u, 3406902432u, 0, FMOD_TOLERANCE, 0},
+{ 761, 1055471915u, 1599382075u, 1058018527u, 4212580517u, 1055471915u, 1599382075u, 0, FMOD_TOLERANCE, 0},
+{ 762, 3207502326u, 3007589929u, 3202026547u, 2792028313u, 3199606348u, 99303024u, 0, FMOD_TOLERANCE, 0},
+{ 763, 3253082770u, 1866066996u, 1060329048u, 3727175322u, 3203161499u, 2504659264u, 0, FMOD_TOLERANCE, 0},
+{ 764, 3198416643u, 150890940u, 1056025306u, 3082724735u, 3198416643u, 150890940u, 0, FMOD_TOLERANCE, 0},
+{ 765, 1062008939u, 80400395u, 1093584426u, 3478941315u, 1062008939u, 80400395u, 0, FMOD_TOLERANCE, 0},
+{ 766, 3251640614u, 4050954182u, 3219263194u, 2537475930u, 3218559725u, 2540175624u, 0, FMOD_TOLERANCE, 0},
+{ 767, 1064841871u, 2881752155u, 3212589299u, 2559651278u, 1064841871u, 2881752155u, 0, FMOD_TOLERANCE, 0},
+{ 768, 3249016304u, 440309030u, 3214267461u, 3788040806u, 3214176671u, 1411815940u, 0, FMOD_TOLERANCE, 0},
+{ 769, 1100476615u, 918813144u, 3208535698u, 1607035904u, 1060344586u, 1448022016u, 0, FMOD_TOLERANCE, 0},
+{ 770, 1042137451u, 2497054124u, 1089139147u, 2549609010u, 1042137451u, 2497054124u, 0, FMOD_TOLERANCE, 0},
+{ 771, 1047037641u, 790219083u, 1054657139u, 2797979479u, 1047037641u, 790219083u, 0, FMOD_TOLERANCE, 0},
+{ 772, 1057781400u, 1149462078u, 1095765205u, 3879963182u, 1057781400u, 1149462078u, 0, FMOD_TOLERANCE, 0},
+{ 773, 3202729813u, 2684353926u, 3205212854u, 1732474928u, 3202729813u, 2684353926u, 0, FMOD_TOLERANCE, 0},
+{ 774, 1095236965u, 2742237025u, 1051317716u, 3386396147u, 1049869952u, 1036183440u, 0, FMOD_TOLERANCE, 0},
+{ 775, 1063230986u, 3408320912u, 1103071166u, 4233059513u, 1063230986u, 3408320912u, 0, FMOD_TOLERANCE, 0},
+{ 776, 1064863548u, 1077495917u, 1088399968u, 433115118u, 1064863548u, 1077495917u, 0, FMOD_TOLERANCE, 0},
+{ 777, 3204547572u, 841366493u, 1051716814u, 4121125128u, 3195856391u, 2714081600u, 0, FMOD_TOLERANCE, 0},
+{ 778, 1064632084u, 321857207u, 1089128010u, 1149988239u, 1064632084u, 321857207u, 0, FMOD_TOLERANCE, 0},
+{ 779, 3245542663u, 799866606u, 3197637091u, 3924438208u, 3192404734u, 1720608768u, 0, FMOD_TOLERANCE, 0},
+{ 780, 3191062890u, 2002049816u, 1077053447u, 2240354761u, 3191062890u, 2002049816u, 0, FMOD_TOLERANCE, 0},
+{ 781, 3229006283u, 478939968u, 1097035749u, 1066716440u, 3229006283u, 478939968u, 0, FMOD_TOLERANCE, 0},
+{ 782, 3232473641u, 1653104725u, 1088548129u, 81977716u, 3232473641u, 1653104725u, 0, FMOD_TOLERANCE, 0},
+{ 783, 3196861276u, 3899475018u, 3189694084u, 3330093036u, 3185556567u, 4138984000u, 0, FMOD_TOLERANCE, 0},
+{ 784, 1089312583u, 2612450289u, 1079065127u, 603380842u, 1077906251u, 3290712104u, 0, FMOD_TOLERANCE, 0},
+{ 785, 1100636791u, 3962735564u, 1101570429u, 1372490825u, 1100636791u, 3962735564u, 0, FMOD_TOLERANCE, 0},
+{ 786, 1054806016u, 1479841439u, 1059312257u, 541504905u, 1054806016u, 1479841439u, 0, FMOD_TOLERANCE, 0},
+{ 787, 1078662178u, 2626148789u, 1057571099u, 4121656076u, 1057471230u, 1851951976u, 0, FMOD_TOLERANCE, 0},
+{ 788, 1081613389u, 1902560314u, 1043130231u, 3557671562u, 1042983411u, 1223161218u, 0, FMOD_TOLERANCE, 0},
+{ 789, 3193829772u, 41779312u, 1081626342u, 831171823u, 3193829772u, 41779312u, 0, FMOD_TOLERANCE, 0},
+{ 790, 1058131100u, 1393168821u, 1066457405u, 1381616968u, 1058131100u, 1393168821u, 0, FMOD_TOLERANCE, 0},
+{ 791, 1072338141u, 3756584649u, 3222267229u, 1423157432u, 1072338141u, 3756584649u, 0, FMOD_TOLERANCE, 0},
+{ 792, 3254435674u, 1894912556u, 1042426694u, 155024547u, 3188467821u, 4070759148u, 0, FMOD_TOLERANCE, 0},
+{ 793, 3195453512u, 35164295u, 3203391785u, 1037041084u, 3195453512u, 35164295u, 0, FMOD_TOLERANCE, 0},
+{ 794, 1084777479u, 3957875950u, 3232195211u, 1590756436u, 1080039368u, 3514173856u, 0, FMOD_TOLERANCE, 0},
+{ 795, 1068844322u, 1447585080u, 1071279485u, 1107922438u, 1068844322u, 1447585080u, 0, FMOD_TOLERANCE, 0},
+{ 796, 1046252518u, 981897615u, 1051856116u, 430357614u, 1046252518u, 981897615u, 0, FMOD_TOLERANCE, 0},
+{ 797, 3227524215u, 395145384u, 3219821938u, 50586510u, 3217021053u, 3501131824u, 0, FMOD_TOLERANCE, 0},
+{ 798, 1069775912u, 750827797u, 1082862669u, 230466783u, 1069775912u, 750827797u, 0, FMOD_TOLERANCE, 0},
+{ 799, 1086668819u, 1365083575u, 3204848310u, 1700831722u, 1055284199u, 3831394504u, 0, FMOD_TOLERANCE, 0},
+{ 800, 3218090390u, 344241827u, 1071538935u, 2715566077u, 3218090390u, 344241827u, 0, FMOD_TOLERANCE, 0},
+{ 801, 3247582856u, 4069301823u, 3193208760u, 2949125229u, 3190824936u, 2390491228u, 0, FMOD_TOLERANCE, 0},
+{ 802, 1103231387u, 3585711710u, 1065801594u, 2302229267u, 1065055518u, 2933509260u, 0, FMOD_TOLERANCE, 0},
+{ 803, 3194118956u, 709803845u, 1048741487u, 2296910194u, 3194118956u, 709803845u, 0, FMOD_TOLERANCE, 0},
+{ 804, 3193280779u, 744421179u, 1069302001u, 2659232829u, 3193280779u, 744421179u, 0, FMOD_TOLERANCE, 0},
+{ 805, 1092835968u, 1799949903u, 3192522886u, 4212149209u, 1040654015u, 1507901104u, 0, FMOD_TOLERANCE, 0},
+{ 806, 3206108502u, 145234164u, 3250614064u, 912384201u, 3206108502u, 145234164u, 0, FMOD_TOLERANCE, 0},
+{ 807, 3240510664u, 2784620507u, 1102812948u, 3531481022u, 3240510664u, 2784620507u, 0, FMOD_TOLERANCE, 0},
+{ 808, 3251159663u, 383952592u, 3205659905u, 3633194728u, 3204710211u, 363221200u, 0, FMOD_TOLERANCE, 0},
+{ 809, 3203476252u, 3792395543u, 1070072378u, 3864816376u, 3203476252u, 3792395543u, 0, FMOD_TOLERANCE, 0},
+{ 810, 3205316273u, 2115553675u, 1066288499u, 3538377867u, 3205316273u, 2115553675u, 0, FMOD_TOLERANCE, 0},
+{ 811, 3252075185u, 1230026762u, 1090719723u, 440819880u, 3238123122u, 2750387816u, 0, FMOD_TOLERANCE, 0},
+{ 812, 3194595076u, 2991290482u, 1096886719u, 1097971167u, 3194595076u, 2991290482u, 0, FMOD_TOLERANCE, 0},
+{ 813, 1090048600u, 1098035020u, 3230900504u, 1479059095u, 1083326068u, 3489121232u, 0, FMOD_TOLERANCE, 0},
+{ 814, 3251056964u, 1719428427u, 3188631907u, 3707377409u, 3187008922u, 1860425162u, 0, FMOD_TOLERANCE, 0},
+{ 815, 1053236165u, 3748932896u, 1084908557u, 1325384361u, 1053236165u, 3748932896u, 0, FMOD_TOLERANCE, 0},
+{ 816, 1084704076u, 3979168763u, 1057455255u, 2454615952u, 1055551388u, 1609430208u, 0, FMOD_TOLERANCE, 0},
+{ 817, 1053106984u, 1449164578u, 1056960316u, 1654931641u, 1053106984u, 1449164578u, 0, FMOD_TOLERANCE, 0},
+{ 818, 1071439010u, 2120487381u, 3226298974u, 2364226633u, 1071439010u, 2120487381u, 0, FMOD_TOLERANCE, 0},
+{ 819, 1075071428u, 1074268944u, 1065730444u, 280016852u, 1064553737u, 3986633720u, 0, FMOD_TOLERANCE, 0},
+{ 820, 3200308256u, 3315127889u, 3236295594u, 2900924954u, 3200308256u, 3315127889u, 0, FMOD_TOLERANCE, 0},
+{ 821, 3196425891u, 2246037502u, 1049691002u, 1496066550u, 3196425891u, 2246037502u, 0, FMOD_TOLERANCE, 0},
+{ 822, 3193006859u, 4191285446u, 3217936236u, 2382392789u, 3193006859u, 4191285446u, 0, FMOD_TOLERANCE, 0},
+{ 823, 1092833308u, 640099844u, 1042152237u, 2064279383u, 1041890111u, 1071039699u, 0, FMOD_TOLERANCE, 0},
+{ 824, 1079913438u, 3468560824u, 1093251038u, 310958750u, 1079913438u, 3468560824u, 0, FMOD_TOLERANCE, 0},
+{ 825, 1096788400u, 1413568905u, 1100941106u, 1627289946u, 1096788400u, 1413568905u, 0, FMOD_TOLERANCE, 0},
+{ 826, 3191549550u, 3797143370u, 3195497539u, 3843275034u, 3191549550u, 3797143370u, 0, FMOD_TOLERANCE, 0},
+{ 827, 3252077393u, 2806642640u, 3201943068u, 2515980718u, 3197416778u, 967813984u, 0, FMOD_TOLERANCE, 0},
+{ 828, 1086877316u, 632580632u, 1078673506u, 3259601317u, 1077663643u, 3509952206u, 0, FMOD_TOLERANCE, 0},
+{ 829, 3200980575u, 3309678799u, 1049337078u, 3056787074u, 3196269447u, 2808087378u, 0, FMOD_TOLERANCE, 0},
+{ 830, 3221495289u, 2341164249u, 1080834967u, 2810890005u, 3221495289u, 2341164249u, 0, FMOD_TOLERANCE, 0},
+{ 831, 1067019674u, 932124675u, 1093915797u, 662682630u, 1067019674u, 932124675u, 0, FMOD_TOLERANCE, 0},
+{ 832, 3249230091u, 1367996113u, 3251723684u, 2974064663u, 3249230091u, 1367996113u, 0, FMOD_TOLERANCE, 0},
+{ 833, 1080230731u, 323437999u, 1090499064u, 901457511u, 1080230731u, 323437999u, 0, FMOD_TOLERANCE, 0},
+{ 834, 3235778876u, 4184941840u, 3196770014u, 2458988443u, 3196438794u, 755364647u, 0, FMOD_TOLERANCE, 0},
+{ 835, 1087618284u, 2023065054u, 3211994098u, 2734612965u, 1064167956u, 768614710u, 0, FMOD_TOLERANCE, 0},
+{ 836, 1064074694u, 3679267365u, 3237728785u, 1699558211u, 1064074694u, 3679267365u, 0, FMOD_TOLERANCE, 0},
+{ 837, 1088079010u, 1826799031u, 1078709629u, 3986905229u, 1078613717u, 260914948u, 0, FMOD_TOLERANCE, 0},
+{ 838, 1052843785u, 351061688u, 3194386466u, 4105857588u, 1046559671u, 1480442944u, 0, FMOD_TOLERANCE, 0},
+{ 839, 1054128006u, 1365244058u, 1064457319u, 1452191426u, 1054128006u, 1365244058u, 0, FMOD_TOLERANCE, 0},
+{ 840, 1064122385u, 2463030625u, 3215975031u, 3773488326u, 1064122385u, 2463030625u, 0, FMOD_TOLERANCE, 0},
+{ 841, 3251276671u, 752664055u, 1065110394u, 1835931663u, 3212400136u, 742911191u, 0, FMOD_TOLERANCE, 0},
+{ 842, 1088045088u, 3496172149u, 1089617208u, 109068701u, 1088045088u, 3496172149u, 0, FMOD_TOLERANCE, 0},
+{ 843, 3198135087u, 1636966254u, 1086098766u, 2016598298u, 3198135087u, 1636966254u, 0, FMOD_TOLERANCE, 0},
+{ 844, 1050931318u, 3551516956u, 1097969102u, 1317953425u, 1050931318u, 3551516956u, 0, FMOD_TOLERANCE, 0},
+{ 845, 3229832217u, 2977627788u, 1045339018u, 516058480u, 3192139324u, 2635921568u, 0, FMOD_TOLERANCE, 0},
+{ 846, 3237408578u, 3901731263u, 3189566462u, 32272932u, 3188585597u, 845876272u, 0, FMOD_TOLERANCE, 0},
+{ 847, 1077281796u, 1956025297u, 3246628529u, 3840733905u, 1077281796u, 1956025297u, 0, FMOD_TOLERANCE, 0},
+{ 848, 1099818036u, 561057891u, 3198494340u, 4271027193u, 1049943530u, 1535558178u, 0, FMOD_TOLERANCE, 0},
+{ 849, 3250929921u, 692989850u, 3242630588u, 2492225971u, 3241820348u, 355927136u, 0, FMOD_TOLERANCE, 0},
+{ 850, 3205479397u, 3439913962u, 1067477011u, 2973333638u, 3205479397u, 3439913962u, 0, FMOD_TOLERANCE, 0},
+{ 851, 3213993989u, 877613377u, 1044917899u, 809672798u, 3192062120u, 1110251106u, 0, FMOD_TOLERANCE, 0},
+{ 852, 3222171454u, 905426932u, 1046417457u, 1086320855u, 3193217147u, 1062836691u, 0, FMOD_TOLERANCE, 0},
+{ 853, 3246346629u, 2645567288u, 1051258339u, 557182478u, 3197126611u, 2398767696u, 0, FMOD_TOLERANCE, 0},
+{ 854, 3204057950u, 186287752u, 1061342054u, 4054003419u, 3204057950u, 186287752u, 0, FMOD_TOLERANCE, 0},
+{ 855, 1097266673u, 3506889716u, 3243866036u, 519056371u, 1096053807u, 2199755765u, 0, FMOD_TOLERANCE, 0},
+{ 856, 1042654053u, 2171898436u, 3246911982u, 1091500784u, 1042654053u, 2171898436u, 0, FMOD_TOLERANCE, 0},
+{ 857, 3243647673u, 368493885u, 3222871893u, 1419055230u, 3222068912u, 1934515232u, 0, FMOD_TOLERANCE, 0},
+{ 858, 1091950572u, 2010971245u, 3188804530u, 1518695799u, 1041051937u, 1749583618u, 0, FMOD_TOLERANCE, 0},
+{ 859, 3205426509u, 1239207795u, 1040192984u, 2199481342u, 3187243994u, 2776223952u, 0, FMOD_TOLERANCE, 0},
+{ 860, 3210978637u, 4264613432u, 3203460972u, 3558930895u, 3202381864u, 3937755304u, 0, FMOD_TOLERANCE, 0},
+{ 861, 1050299283u, 3772748958u, 3227667376u, 309688336u, 1050299283u, 3772748958u, 0, FMOD_TOLERANCE, 0},
+{ 862, 3230743041u, 1077949160u, 1075769893u, 2405271377u, 3222233301u, 1956885028u, 0, FMOD_TOLERANCE, 0},
+{ 863, 1091835152u, 3751608506u, 3232278094u, 930375071u, 1082909349u, 484200864u, 0, FMOD_TOLERANCE, 0},
+{ 864, 3198617153u, 1518334131u, 3205247482u, 791756713u, 3198617153u, 1518334131u, 0, FMOD_TOLERANCE, 0},
+{ 865, 1047317453u, 2825203170u, 3245054001u, 1822981827u, 1047317453u, 2825203170u, 0, FMOD_TOLERANCE, 0},
+{ 866, 1100016363u, 514474738u, 1089072073u, 3300845441u, 1088476154u, 2379179720u, 0, FMOD_TOLERANCE, 0},
+{ 867, 3216391250u, 247369460u, 3197320093u, 687450958u, 3196590451u, 2540481052u, 0, FMOD_TOLERANCE, 0},
+{ 868, 1104161422u, 2722237629u, 1058272368u, 90602316u, 1058098611u, 4127624576u, 0, FMOD_TOLERANCE, 0},
+{ 869, 3208098435u, 1845900544u, 3231520830u, 3389751458u, 3208098435u, 1845900544u, 0, FMOD_TOLERANCE, 0},
+{ 870, 3247535245u, 737689911u, 3195377751u, 3462616966u, 3193419705u, 1974083544u, 0, FMOD_TOLERANCE, 0},
+{ 871, 3223538384u, 3620285831u, 1055501023u, 2708056059u, 3200659149u, 3599459556u, 0, FMOD_TOLERANCE, 0},
+{ 872, 3219464996u, 4073430285u, 1056206159u, 172017902u, 3202431797u, 2544044588u, 0, FMOD_TOLERANCE, 0},
+{ 873, 3212869638u, 2799176222u, 1052706894u, 4083892667u, 3199630788u, 128225231u, 0, FMOD_TOLERANCE, 0},
+{ 874, 3202279557u, 1562351330u, 1069705601u, 1247765260u, 3202279557u, 1562351330u, 0, FMOD_TOLERANCE, 0},
+{ 875, 3232717299u, 51853475u, 3189080201u, 2783553144u, 3188818396u, 807301880u, 0, FMOD_TOLERANCE, 0},
+{ 876, 3219454353u, 3851781549u, 3241598113u, 514064046u, 3219454353u, 3851781549u, 0, FMOD_TOLERANCE, 0},
+{ 877, 1100045965u, 934745487u, 3248182437u, 2798581921u, 1100045965u, 934745487u, 0, FMOD_TOLERANCE, 0},
+{ 878, 3213082493u, 2948648757u, 3232177250u, 4278702895u, 3213082493u, 2948648757u, 0, FMOD_TOLERANCE, 0},
+{ 879, 1072485724u, 4259101461u, 1061606772u, 84229920u, 1057329057u, 1992816128u, 0, FMOD_TOLERANCE, 0},
+{ 880, 3198075559u, 3891230598u, 1095924595u, 3049217547u, 3198075559u, 3891230598u, 0, FMOD_TOLERANCE, 0},
+{ 881, 1077353053u, 3806018919u, 3243191216u, 280177341u, 1077353053u, 3806018919u, 0, FMOD_TOLERANCE, 0},
+{ 882, 1060624530u, 3900344258u, 1063647809u, 4206745890u, 1060624530u, 3900344258u, 0, FMOD_TOLERANCE, 0},
+{ 883, 3227707336u, 2126253040u, 3207248026u, 808507485u, 3205264840u, 1073047920u, 0, FMOD_TOLERANCE, 0},
+{ 884, 1086090317u, 3465685634u, 3230391053u, 3754958214u, 1080174589u, 3628179328u, 0, FMOD_TOLERANCE, 0},
+{ 885, 1102861084u, 461094531u, 1101110393u, 1316091396u, 1098810978u, 1561122768u, 0, FMOD_TOLERANCE, 0},
+{ 886, 1064980314u, 4197635149u, 1091873113u, 1240127141u, 1064980314u, 4197635149u, 0, FMOD_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 1074333893u, 118603800u, 0, FMOD_TOLERANCE, 0},
+{ 888, 3213429165u, 3744663425u, 3212482771u, 953662066u, 3212278408u, 2240697488u, 0, FMOD_TOLERANCE, 0},
+{ 889, 1085171305u, 3564196690u, 3228101916u, 904305212u, 1079614218u, 2381284696u, 0, FMOD_TOLERANCE, 0},
+{ 890, 1048333111u, 3566257266u, 3235138829u, 2734275140u, 1048333111u, 3566257266u, 0, FMOD_TOLERANCE, 0},
+{ 891, 3243948477u, 606044282u, 3241318094u, 2446416887u, 3240880599u, 1859021866u, 0, FMOD_TOLERANCE, 0},
+{ 892, 1041627284u, 2336116589u, 3197594053u, 2296925138u, 1041627284u, 2336116589u, 0, FMOD_TOLERANCE, 0},
+{ 893, 1058567659u, 907670625u, 3240769036u, 1827119006u, 1058567659u, 907670625u, 0, FMOD_TOLERANCE, 0},
+{ 894, 1044467183u, 2818710946u, 3246059905u, 553394170u, 1044467183u, 2818710946u, 0, FMOD_TOLERANCE, 0},
+{ 895, 3189504094u, 4099522736u, 3232742168u, 3718083858u, 3189504094u, 4099522736u, 0, FMOD_TOLERANCE, 0},
+{ 896, 1092371276u, 1059279404u, 1080245336u, 175941677u, 1076943150u, 3135584408u, 0, FMOD_TOLERANCE, 0},
+{ 897, 1105189691u, 1650862428u, 1061816101u, 1723201723u, 1061353780u, 3104585775u, 0, FMOD_TOLERANCE, 0},
+{ 898, 3239012814u, 2462163405u, 3218946201u, 3876535372u, 3218677731u, 188478288u, 0, FMOD_TOLERANCE, 0},
+{ 899, 1084392886u, 495844137u, 1073721460u, 772777946u, 1069161233u, 173480672u, 0, FMOD_TOLERANCE, 0},
+{ 900, 1052415330u, 458757721u, 3245680321u, 3609892707u, 1052415330u, 458757721u, 0, FMOD_TOLERANCE, 0},
+{ 901, 3193282956u, 2533012202u, 1079980803u, 3592268374u, 3193282956u, 2533012202u, 0, FMOD_TOLERANCE, 0},
+{ 902, 3203364780u, 4108274117u, 1063045844u, 571992389u, 3203364780u, 4108274117u, 0, FMOD_TOLERANCE, 0},
+{ 903, 1090567271u, 3541110973u, 1096296754u, 3118427427u, 1090567271u, 3541110973u, 0, FMOD_TOLERANCE, 0},
+{ 904, 3193980043u, 1213941007u, 1105433735u, 2172963370u, 3193980043u, 1213941007u, 0, FMOD_TOLERANCE, 0},
+{ 905, 1096853359u, 272190288u, 1095452370u, 4026581530u, 1094197292u, 3251065368u, 0, FMOD_TOLERANCE, 0},
+{ 906, 1095583909u, 2843638672u, 1100510986u, 3190536898u, 1095583909u, 2843638672u, 0, FMOD_TOLERANCE, 0},
+{ 907, 1083757094u, 2014317727u, 3247389683u, 2428462015u, 1083757094u, 2014317727u, 0, FMOD_TOLERANCE, 0},
+{ 908, 1093976717u, 688442200u, 1047852515u, 3035186380u, 1045500899u, 421513072u, 0, FMOD_TOLERANCE, 0},
+{ 909, 1076664212u, 1010095511u, 3221288076u, 405287991u, 1073301008u, 3217308196u, 0, FMOD_TOLERANCE, 0},
+{ 910, 3252294615u, 2983070435u, 1089546472u, 2907918480u, 3236064660u, 2205078976u, 0, FMOD_TOLERANCE, 0},
+{ 911, 1082988121u, 81928569u, 1056007286u, 2740556321u, 1055991332u, 437977800u, 0, FMOD_TOLERANCE, 0},
+{ 912, 1041110867u, 2076689028u, 1081558619u, 3039159031u, 1041110867u, 2076689028u, 0, FMOD_TOLERANCE, 0},
+{ 913, 1047307438u, 1376882094u, 3211003208u, 1296286481u, 1047307438u, 1376882094u, 0, FMOD_TOLERANCE, 0},
+{ 914, 1080114314u, 744133164u, 3200943494u, 955832216u, 1052083979u, 4015079392u, 0, FMOD_TOLERANCE, 0},
+{ 915, 3226290326u, 176522478u, 1069999908u, 2891249491u, 3215808713u, 2482244588u, 0, FMOD_TOLERANCE, 0},
+{ 916, 1043564602u, 3685851715u, 3187829932u, 2363997529u, 1039251684u, 3969797792u, 0, FMOD_TOLERANCE, 0},
+{ 917, 1040244055u, 3974431579u, 1052505165u, 2589067816u, 1040244055u, 3974431579u, 0, FMOD_TOLERANCE, 0},
+{ 918, 3191496789u, 3819109588u, 1048561488u, 969143351u, 3191496789u, 3819109588u, 0, FMOD_TOLERANCE, 0},
+{ 919, 1072639397u, 4246896124u, 1104584799u, 1940097860u, 1072639397u, 4246896124u, 0, FMOD_TOLERANCE, 0},
+{ 920, 1048038468u, 2228686199u, 3220231833u, 777624847u, 1048038468u, 2228686199u, 0, FMOD_TOLERANCE, 0},
+{ 921, 3231467306u, 4189906558u, 3203004203u, 854242364u, 3202788389u, 3454301200u, 0, FMOD_TOLERANCE, 0},
+{ 922, 1103910407u, 4089051094u, 3227282692u, 2693170723u, 1079132077u, 508475625u, 0, FMOD_TOLERANCE, 0},
+{ 923, 1045883607u, 1278581412u, 3239296746u, 1774588717u, 1045883607u, 1278581412u, 0, FMOD_TOLERANCE, 0},
+{ 924, 3222372686u, 1794845306u, 1104879344u, 4135865182u, 3222372686u, 1794845306u, 0, FMOD_TOLERANCE, 0},
+{ 925, 1106449055u, 754938390u, 1061291430u, 2010786993u, 1061210897u, 1687650186u, 0, FMOD_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 1073581409u, 2034303731u, 0, FMOD_TOLERANCE, 0},
+{ 927, 3231449194u, 567588900u, 3195452230u, 1421366017u, 3192961019u, 4075721988u, 0, FMOD_TOLERANCE, 0},
+{ 928, 3225089755u, 2708717091u, 1071975971u, 1364590470u, 3219432943u, 2030557040u, 0, FMOD_TOLERANCE, 0},
+{ 929, 3252137283u, 3461956134u, 3207820115u, 1605709634u, 3207648055u, 2266319054u, 0, FMOD_TOLERANCE, 0},
+{ 930, 1065302996u, 1497124553u, 1051715442u, 916736957u, 1051438209u, 3983060665u, 0, FMOD_TOLERANCE, 0},
+{ 931, 1058468363u, 834914365u, 1064667143u, 2839166298u, 1058468363u, 834914365u, 0, FMOD_TOLERANCE, 0},
+{ 932, 1057279949u, 2139295776u, 1062816721u, 914592523u, 1057279949u, 2139295776u, 0, FMOD_TOLERANCE, 0},
+{ 933, 3189636931u, 851569132u, 1058503154u, 1399378677u, 3189636931u, 851569132u, 0, FMOD_TOLERANCE, 0},
+{ 934, 3233537697u, 3897202342u, 3245382590u, 246600375u, 3233537697u, 3897202342u, 0, FMOD_TOLERANCE, 0},
+{ 935, 3225460308u, 3620429520u, 1055627557u, 229305u, 3202369936u, 3700438080u, 0, FMOD_TOLERANCE, 0},
+{ 936, 1083958833u, 3641997865u, 3206673888u, 93720614u, 1056236607u, 2751419008u, 0, FMOD_TOLERANCE, 0},
+{ 937, 3227808435u, 32766320u, 1062084905u, 3668443038u, 3208488956u, 1745097620u, 0, FMOD_TOLERANCE, 0},
+{ 938, 3223298996u, 2039713492u, 3248699388u, 1346210821u, 3223298996u, 2039713492u, 0, FMOD_TOLERANCE, 0},
+{ 939, 1093050016u, 1335820726u, 3191756860u, 1808427032u, 1043729435u, 812513712u, 0, FMOD_TOLERANCE, 0},
+{ 940, 1061442763u, 650692001u, 1103515670u, 2253348763u, 1061442763u, 650692001u, 0, FMOD_TOLERANCE, 0},
+{ 941, 3191395187u, 2372623300u, 3210185343u, 3200572848u, 3191395187u, 2372623300u, 0, FMOD_TOLERANCE, 0},
+{ 942, 1100796069u, 762317532u, 3194595095u, 3192607437u, 1046114830u, 3115332966u, 0, FMOD_TOLERANCE, 0},
+{ 943, 1062262701u, 217775356u, 3232827087u, 2969367386u, 1062262701u, 217775356u, 0, FMOD_TOLERANCE, 0},
+{ 944, 1057172551u, 3621353969u, 1077994795u, 3873976266u, 1057172551u, 3621353969u, 0, FMOD_TOLERANCE, 0},
+{ 945, 1091301987u, 268372152u, 3221764390u, 3216978962u, 1071287122u, 1408736608u, 0, FMOD_TOLERANCE, 0},
+{ 946, 3246437611u, 142942404u, 1075322987u, 1746449109u, 3220255228u, 3977195008u, 0, FMOD_TOLERANCE, 0},
+{ 947, 1104006296u, 496534875u, 3254522293u, 2532372502u, 1104006296u, 496534875u, 0, FMOD_TOLERANCE, 0},
+{ 948, 3250225541u, 2999955409u, 3222793392u, 1868977643u, 3221335855u, 3732438666u, 0, FMOD_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 1066357256u, 3538375136u, 0, FMOD_TOLERANCE, 0},
+{ 950, 1068218799u, 73646871u, 3231442171u, 3711510104u, 1068218799u, 73646871u, 0, FMOD_TOLERANCE, 0},
+{ 951, 1090483524u, 218135177u, 3198908856u, 3082199105u, 1050815447u, 1272533715u, 0, FMOD_TOLERANCE, 0},
+{ 952, 1068068480u, 1061628117u, 3248859043u, 86776158u, 1068068480u, 1061628117u, 0, FMOD_TOLERANCE, 0},
+{ 953, 3208484674u, 938869114u, 1087911145u, 2416710759u, 3208484674u, 938869114u, 0, FMOD_TOLERANCE, 0},
+{ 954, 1095576832u, 2970853959u, 3239543429u, 1887505029u, 1091948884u, 2484319115u, 0, FMOD_TOLERANCE, 0},
+{ 955, 3237728787u, 1337895935u, 1076463812u, 1172733328u, 3222965885u, 3249583456u, 0, FMOD_TOLERANCE, 0},
+{ 956, 1049139928u, 1469010822u, 3229583535u, 551399515u, 1049139928u, 1469010822u, 0, FMOD_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 1047839869u, 2663116324u, 0, FMOD_TOLERANCE, 0},
+{ 958, 3242138780u, 2976596113u, 3192137295u, 3033242648u, 3190927649u, 800563616u, 0, FMOD_TOLERANCE, 0},
+{ 959, 1098698481u, 876810930u, 3197470945u, 2571587447u, 1048300491u, 2603592096u, 0, FMOD_TOLERANCE, 0},
+{ 960, 3241770810u, 4007797282u, 3225853845u, 4069319648u, 3223311050u, 1149370880u, 0, FMOD_TOLERANCE, 0},
+{ 961, 1047279982u, 3840538373u, 1043189552u, 3668774580u, 1040305221u, 4193144592u, 0, FMOD_TOLERANCE, 0},
+{ 962, 3217611704u, 200857661u, 3229758439u, 3359367736u, 3217611704u, 200857661u, 0, FMOD_TOLERANCE, 0},
+{ 963, 3248797869u, 111868139u, 3227902082u, 2366064003u, 3226509645u, 697667886u, 0, FMOD_TOLERANCE, 0},
+{ 964, 1044195166u, 3510904416u, 3222131653u, 3822770497u, 1044195166u, 3510904416u, 0, FMOD_TOLERANCE, 0},
+{ 965, 3242675715u, 789151814u, 1099269239u, 2958956055u, 3242675715u, 789151814u, 0, FMOD_TOLERANCE, 0},
+{ 966, 1084679320u, 722163228u, 1105524559u, 1534462169u, 1084679320u, 722163228u, 0, FMOD_TOLERANCE, 0},
+{ 967, 1046586062u, 2207037106u, 3208952465u, 1231254630u, 1046586062u, 2207037106u, 0, FMOD_TOLERANCE, 0},
+{ 968, 3197884060u, 3838689849u, 3198769679u, 1302617170u, 3197884060u, 3838689849u, 0, FMOD_TOLERANCE, 0},
+{ 969, 1085938906u, 2527556476u, 3240373426u, 124352692u, 1085938906u, 2527556476u, 0, FMOD_TOLERANCE, 0},
+{ 970, 3199540805u, 3502371499u, 1043411944u, 4190072016u, 3188877369u, 3030175616u, 0, FMOD_TOLERANCE, 0},
+{ 971, 1064676142u, 1798470077u, 3200116917u, 3421833729u, 1051567976u, 2773073106u, 0, FMOD_TOLERANCE, 0},
+{ 972, 3193514956u, 3653237931u, 3204255012u, 3683870669u, 3193514956u, 3653237931u, 0, FMOD_TOLERANCE, 0},
+{ 973, 1053588582u, 376530104u, 1073853547u, 565755892u, 1053588582u, 376530104u, 0, FMOD_TOLERANCE, 0},
+{ 974, 3242503851u, 558292492u, 1051772749u, 4267873474u, 3198654037u, 980579176u, 0, FMOD_TOLERANCE, 0},
+{ 975, 3224772709u, 509637100u, 3212030069u, 215050379u, 3206621457u, 3145766624u, 0, FMOD_TOLERANCE, 0},
+{ 976, 1092057101u, 3571665665u, 3188628584u, 757824767u, 1040375936u, 413495854u, 0, FMOD_TOLERANCE, 0},
+{ 977, 3214799337u, 998858159u, 1063077962u, 436029885u, 3208983524u, 830635584u, 0, FMOD_TOLERANCE, 0},
+{ 978, 3205946965u, 996300405u, 3193842624u, 80548098u, 3193101179u, 4009301952u, 0, FMOD_TOLERANCE, 0},
+{ 979, 3228848840u, 3876129407u, 3215332180u, 2226970413u, 3215045687u, 297125743u, 0, FMOD_TOLERANCE, 0},
+{ 980, 3237608953u, 200013509u, 3224552716u, 414878724u, 3220949933u, 2749462016u, 0, FMOD_TOLERANCE, 0},
+{ 981, 3230617093u, 309319541u, 1048979765u, 1261662434u, 3194126693u, 2049616152u, 0, FMOD_TOLERANCE, 0},
+{ 982, 1089252639u, 4062255924u, 3224274128u, 4289485681u, 1076205982u, 4210345336u, 0, FMOD_TOLERANCE, 0},
+{ 983, 3236136084u, 1611969213u, 1053890378u, 3774617276u, 3200305473u, 2749663976u, 0, FMOD_TOLERANCE, 0},
+{ 984, 1080412763u, 1752164782u, 3239587974u, 612223386u, 1080412763u, 1752164782u, 0, FMOD_TOLERANCE, 0},
+{ 985, 1041545782u, 2024044989u, 1074932678u, 3259111307u, 1041545782u, 2024044989u, 0, FMOD_TOLERANCE, 0},
+{ 986, 1053207518u, 2564965629u, 1093571065u, 169360454u, 1053207518u, 2564965629u, 0, FMOD_TOLERANCE, 0},
+{ 987, 1089599090u, 1860101737u, 3191222372u, 1676437468u, 1042893353u, 1428552520u, 0, FMOD_TOLERANCE, 0},
+{ 988, 1059802968u, 588387057u, 3192103292u, 2495288012u, 1040235236u, 167423296u, 0, FMOD_TOLERANCE, 0},
+{ 989, 3193155705u, 659070058u, 1073095700u, 1393632068u, 3193155705u, 659070058u, 0, FMOD_TOLERANCE, 0},
+{ 990, 3217683263u, 4276187829u, 3217553330u, 1868253275u, 3213867224u, 4167214496u, 0, FMOD_TOLERANCE, 0},
+{ 991, 3223220272u, 2085481575u, 3215994784u, 800910002u, 3214337058u, 3417594176u, 0, FMOD_TOLERANCE, 0},
+{ 992, 1056934836u, 1950570756u, 3200582211u, 941022151u, 1046519616u, 1109308160u, 0, FMOD_TOLERANCE, 0},
+{ 993, 1057530368u, 2075610870u, 3250142022u, 3605152103u, 1057530368u, 2075610870u, 0, FMOD_TOLERANCE, 0},
+{ 994, 3200839250u, 3792931748u, 3204857863u, 804393211u, 3200839250u, 3792931748u, 0, FMOD_TOLERANCE, 0},
+{ 995, 3253646370u, 3430071177u, 3226288311u, 3652522729u, 3225596618u, 2476652436u, 0, FMOD_TOLERANCE, 0},
+{ 996, 3201314702u, 236884699u, 3227874605u, 2193269825u, 3201314702u, 236884699u, 0, FMOD_TOLERANCE, 0},
+{ 997, 1064936593u, 2744231849u, 1046186036u, 771053722u, 1043407738u, 512136096u, 0, FMOD_TOLERANCE, 0},
+{ 998, 1083996036u, 3000189819u, 1096500901u, 2057239777u, 1083996036u, 3000189819u, 0, FMOD_TOLERANCE, 0},
+{ 999, 1093835581u, 205759408u, 3244643377u, 2702292618u, 1093835581u, 205759408u, 0, FMOD_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_FMOD_H multiple inclusion protection
+
+// EOF fmod.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/frexp.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/frexp.c
new file mode 100644
index 0000000000..4e212989e8
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/frexp.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// frexp.c
+//
+// Test of frexp() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/frexp.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(frexp_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &frexp, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_INT_P, CYG_LIBM_TEST_VEC_DOUBLE,
+ &frexp_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("frexp() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("frexp() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library frexp() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "frexp() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF frexp.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/frexp.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/frexp.h
new file mode 100644
index 0000000000..9f693dd77b
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/frexp.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_FREXP_H
+#define CYGONCE_LIBM_FREXP_H
+//===========================================================================
+//
+// frexp.h
+//
+// Test vectors for testing of frexp() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/frexp.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define FREXP_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t frexp_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1077999148u, 2506787616u, 0u, 6u, 1071707692u, 2506787616u, 0, FREXP_TOLERANCE, 0},
+{ 2, 1090024059u, 3619148316u, 0u, 17u, 1072198267u, 3619148316u, 0, FREXP_TOLERANCE, 0},
+{ 3, 3218153654u, 3176730980u, 0u, 4294967295u, 3219202230u, 3176730980u, 0, FREXP_TOLERANCE, 0},
+{ 4, 1051524793u, 2993920299u, 0u, 4294967276u, 1072496313u, 2993920299u, 0, FREXP_TOLERANCE, 0},
+{ 5, 3239659803u, 2725707538u, 0u, 19u, 3219736859u, 2725707538u, 0, FREXP_TOLERANCE, 0},
+{ 6, 3232101343u, 2346810316u, 0u, 12u, 3219518431u, 2346810316u, 0, FREXP_TOLERANCE, 0},
+{ 7, 1092554362u, 2088062470u, 0u, 19u, 1072631418u, 2088062470u, 0, FREXP_TOLERANCE, 0},
+{ 8, 3201242716u, 420891118u, 0u, 4294967278u, 3220117084u, 420891118u, 0, FREXP_TOLERANCE, 0},
+{ 9, 3221200677u, 2636405208u, 0u, 1u, 3220152101u, 2636405208u, 0, FREXP_TOLERANCE, 0},
+{ 10, 1100049309u, 471635570u, 0u, 27u, 1071737757u, 471635570u, 0, FREXP_TOLERANCE, 0},
+{ 11, 1089363191u, 1746012320u, 0u, 16u, 1072585975u, 1746012320u, 0, FREXP_TOLERANCE, 0},
+{ 12, 1054478713u, 3333988501u, 0u, 4294967279u, 1072304505u, 3333988501u, 0, FREXP_TOLERANCE, 0},
+{ 13, 1047953160u, 183014794u, 0u, 4294967273u, 1072070408u, 183014794u, 0, FREXP_TOLERANCE, 0},
+{ 14, 3202039382u, 2016785810u, 0u, 4294967279u, 3219865174u, 2016785810u, 0, FREXP_TOLERANCE, 0},
+{ 15, 3213486034u, 2688957927u, 0u, 4294967290u, 3219777490u, 2688957927u, 0, FREXP_TOLERANCE, 0},
+{ 16, 1046089230u, 2709029994u, 0u, 4294967271u, 1072303630u, 2709029994u, 0, FREXP_TOLERANCE, 0},
+{ 17, 1058795730u, 624574473u, 0u, 4294967283u, 1072427218u, 624574473u, 0, FREXP_TOLERANCE, 0},
+{ 18, 1045840574u, 3473266330u, 0u, 4294967271u, 1072054974u, 3473266330u, 0, FREXP_TOLERANCE, 0},
+{ 19, 3204919842u, 1605286142u, 0u, 4294967282u, 3219599906u, 1605286142u, 0, FREXP_TOLERANCE, 0},
+{ 20, 1068931671u, 4233776869u, 0u, 4294967293u, 1072077399u, 4233776869u, 0, FREXP_TOLERANCE, 0},
+{ 21, 1060343410u, 1857607719u, 0u, 4294967285u, 1071877746u, 1857607719u, 0, FREXP_TOLERANCE, 0},
+{ 22, 3222889559u, 3417070006u, 0u, 3u, 3219743831u, 3417070006u, 0, FREXP_TOLERANCE, 0},
+{ 23, 1103599987u, 3981151660u, 0u, 30u, 1072142707u, 3981151660u, 0, FREXP_TOLERANCE, 0},
+{ 24, 1088899021u, 1332651746u, 0u, 16u, 1072121805u, 1332651746u, 0, FREXP_TOLERANCE, 0},
+{ 25, 1085298022u, 3824988054u, 0u, 13u, 1071666534u, 3824988054u, 0, FREXP_TOLERANCE, 0},
+{ 26, 1066856791u, 2070129652u, 0u, 4294967291u, 1072099671u, 2070129652u, 0, FREXP_TOLERANCE, 0},
+{ 27, 3207559790u, 1372884064u, 0u, 4294967284u, 3220142702u, 1372884064u, 0, FREXP_TOLERANCE, 0},
+{ 28, 1080833116u, 3229926662u, 0u, 8u, 1072444508u, 3229926662u, 0, FREXP_TOLERANCE, 0},
+{ 29, 1093826501u, 3217805330u, 0u, 21u, 1071806405u, 3217805330u, 0, FREXP_TOLERANCE, 0},
+{ 30, 3191644264u, 2014578707u, 0u, 4294967269u, 3219955816u, 2014578707u, 0, FREXP_TOLERANCE, 0},
+{ 31, 1102287487u, 265058758u, 0u, 29u, 1071878783u, 265058758u, 0, FREXP_TOLERANCE, 0},
+{ 32, 3239903247u, 1630600647u, 0u, 19u, 3219980303u, 1630600647u, 0, FREXP_TOLERANCE, 0},
+{ 33, 1071124229u, 1946677669u, 0u, 4294967295u, 1072172805u, 1946677669u, 0, FREXP_TOLERANCE, 0},
+{ 34, 3198462609u, 926009897u, 0u, 4294967276u, 3219434129u, 926009897u, 0, FREXP_TOLERANCE, 0},
+{ 35, 1072130299u, 2271884183u, 0u, 0u, 1072130299u, 2271884183u, 0, FREXP_TOLERANCE, 0},
+{ 36, 3203741999u, 2118617783u, 0u, 4294967281u, 3219470639u, 2118617783u, 0, FREXP_TOLERANCE, 0},
+{ 37, 3194849109u, 213658772u, 0u, 4294967272u, 3220014933u, 213658772u, 0, FREXP_TOLERANCE, 0},
+{ 38, 3249401130u, 314151656u, 0u, 28u, 3220041002u, 314151656u, 0, FREXP_TOLERANCE, 0},
+{ 39, 3254112288u, 1564829925u, 0u, 33u, 3219509280u, 1564829925u, 0, FREXP_TOLERANCE, 0},
+{ 40, 3197817016u, 497230814u, 0u, 4294967275u, 3219837112u, 497230814u, 0, FREXP_TOLERANCE, 0},
+{ 41, 3216262634u, 2075329122u, 0u, 4294967293u, 3219408362u, 2075329122u, 0, FREXP_TOLERANCE, 0},
+{ 42, 3231746400u, 169900577u, 0u, 12u, 3219163488u, 169900577u, 0, FREXP_TOLERANCE, 0},
+{ 43, 1049848642u, 541549344u, 0u, 4294967275u, 1071868738u, 541549344u, 0, FREXP_TOLERANCE, 0},
+{ 44, 1096608669u, 3119070100u, 0u, 23u, 1072491421u, 3119070100u, 0, FREXP_TOLERANCE, 0},
+{ 45, 1085427055u, 567496114u, 0u, 13u, 1071795567u, 567496114u, 0, FREXP_TOLERANCE, 0},
+{ 46, 1045286891u, 1969998540u, 0u, 4294967270u, 1072549867u, 1969998540u, 0, FREXP_TOLERANCE, 0},
+{ 47, 1060548195u, 1299369769u, 0u, 4294967285u, 1072082531u, 1299369769u, 0, FREXP_TOLERANCE, 0},
+{ 48, 1049342524u, 4167404066u, 0u, 4294967274u, 1072411196u, 4167404066u, 0, FREXP_TOLERANCE, 0},
+{ 49, 3208865645u, 3348930841u, 0u, 4294967286u, 3219351405u, 3348930841u, 0, FREXP_TOLERANCE, 0},
+{ 50, 1078472138u, 358457347u, 0u, 6u, 1072180682u, 358457347u, 0, FREXP_TOLERANCE, 0},
+{ 51, 1071069297u, 2192461366u, 0u, 4294967295u, 1072117873u, 2192461366u, 0, FREXP_TOLERANCE, 0},
+{ 52, 1099527247u, 3184735642u, 0u, 26u, 1072264271u, 3184735642u, 0, FREXP_TOLERANCE, 0},
+{ 53, 1052861772u, 331696577u, 0u, 4294967278u, 1071736140u, 331696577u, 0, FREXP_TOLERANCE, 0},
+{ 54, 3189610016u, 793242270u, 0u, 4294967267u, 3220018720u, 793242270u, 0, FREXP_TOLERANCE, 0},
+{ 55, 3252528934u, 2322696981u, 0u, 31u, 3220023078u, 2322696981u, 0, FREXP_TOLERANCE, 0},
+{ 56, 1083791358u, 3020766674u, 0u, 11u, 1072257022u, 3020766674u, 0, FREXP_TOLERANCE, 0},
+{ 57, 1044902177u, 252085215u, 0u, 4294967270u, 1072165153u, 252085215u, 0, FREXP_TOLERANCE, 0},
+{ 58, 3214426435u, 4139068910u, 0u, 4294967291u, 3219669315u, 4139068910u, 0, FREXP_TOLERANCE, 0},
+{ 59, 3222505725u, 105589263u, 0u, 3u, 3219359997u, 105589263u, 0, FREXP_TOLERANCE, 0},
+{ 60, 1056316170u, 261630827u, 0u, 4294967281u, 1072044810u, 261630827u, 0, FREXP_TOLERANCE, 0},
+{ 61, 1107213408u, 428765703u, 0u, 33u, 1072610400u, 428765703u, 0, FREXP_TOLERANCE, 0},
+{ 62, 3251828686u, 2009972239u, 0u, 31u, 3219322830u, 2009972239u, 0, FREXP_TOLERANCE, 0},
+{ 63, 1098568019u, 3517376586u, 0u, 25u, 1072353619u, 3517376586u, 0, FREXP_TOLERANCE, 0},
+{ 64, 3240257920u, 3304487302u, 0u, 20u, 3219286400u, 3304487302u, 0, FREXP_TOLERANCE, 0},
+{ 65, 3233537912u, 237004814u, 0u, 13u, 3219906424u, 237004814u, 0, FREXP_TOLERANCE, 0},
+{ 66, 3237899261u, 3364008659u, 0u, 17u, 3220073469u, 3364008659u, 0, FREXP_TOLERANCE, 0},
+{ 67, 3195247552u, 472004928u, 0u, 4294967273u, 3219364800u, 472004928u, 0, FREXP_TOLERANCE, 0},
+{ 68, 3226869477u, 1186387580u, 0u, 7u, 3219529445u, 1186387580u, 0, FREXP_TOLERANCE, 0},
+{ 69, 1054226850u, 4085763910u, 0u, 4294967279u, 1072052642u, 4085763910u, 0, FREXP_TOLERANCE, 0},
+{ 70, 1106394906u, 2684738273u, 0u, 33u, 1071791898u, 2684738273u, 0, FREXP_TOLERANCE, 0},
+{ 71, 1057053639u, 2055490142u, 0u, 4294967282u, 1071733703u, 2055490142u, 0, FREXP_TOLERANCE, 0},
+{ 72, 3231581370u, 3879040079u, 0u, 11u, 3220047034u, 3879040079u, 0, FREXP_TOLERANCE, 0},
+{ 73, 3188976647u, 3725731239u, 0u, 4294967267u, 3219385351u, 3725731239u, 0, FREXP_TOLERANCE, 0},
+{ 74, 1061652681u, 591292963u, 0u, 4294967286u, 1072138441u, 591292963u, 0, FREXP_TOLERANCE, 0},
+{ 75, 3225014981u, 1147041027u, 0u, 5u, 3219772101u, 1147041027u, 0, FREXP_TOLERANCE, 0},
+{ 76, 3215417793u, 624695933u, 0u, 4294967292u, 3219612097u, 624695933u, 0, FREXP_TOLERANCE, 0},
+{ 77, 3206052774u, 705725219u, 0u, 4294967283u, 3219684262u, 705725219u, 0, FREXP_TOLERANCE, 0},
+{ 78, 3238067573u, 1116238321u, 0u, 18u, 3219193205u, 1116238321u, 0, FREXP_TOLERANCE, 0},
+{ 79, 3207367088u, 7287411u, 0u, 4294967284u, 3219950000u, 7287411u, 0, FREXP_TOLERANCE, 0},
+{ 80, 1045917232u, 116067742u, 0u, 4294967271u, 1072131632u, 116067742u, 0, FREXP_TOLERANCE, 0},
+{ 81, 3240055222u, 3604989074u, 0u, 19u, 3220132278u, 3604989074u, 0, FREXP_TOLERANCE, 0},
+{ 82, 1066381836u, 545298780u, 0u, 4294967290u, 1072673292u, 545298780u, 0, FREXP_TOLERANCE, 0},
+{ 83, 3219080936u, 1681476121u, 0u, 4294967295u, 3220129512u, 1681476121u, 0, FREXP_TOLERANCE, 0},
+{ 84, 1060345752u, 3553822398u, 0u, 4294967285u, 1071880088u, 3553822398u, 0, FREXP_TOLERANCE, 0},
+{ 85, 1102831658u, 3410480388u, 0u, 29u, 1072422954u, 3410480388u, 0, FREXP_TOLERANCE, 0},
+{ 86, 1052460275u, 1660607230u, 0u, 4294967277u, 1072383219u, 1660607230u, 0, FREXP_TOLERANCE, 0},
+{ 87, 1089216869u, 1494984673u, 0u, 16u, 1072439653u, 1494984673u, 0, FREXP_TOLERANCE, 0},
+{ 88, 3196647153u, 287894723u, 0u, 4294967274u, 3219715825u, 287894723u, 0, FREXP_TOLERANCE, 0},
+{ 89, 1054885127u, 644548665u, 0u, 4294967280u, 1071662343u, 644548665u, 0, FREXP_TOLERANCE, 0},
+{ 90, 1081948134u, 2442134629u, 0u, 9u, 1072510950u, 2442134629u, 0, FREXP_TOLERANCE, 0},
+{ 91, 1087554095u, 2312530895u, 0u, 15u, 1071825455u, 2312530895u, 0, FREXP_TOLERANCE, 0},
+{ 92, 3221584595u, 3379665576u, 0u, 2u, 3219487443u, 3379665576u, 0, FREXP_TOLERANCE, 0},
+{ 93, 1096085375u, 3018463866u, 0u, 23u, 1071968127u, 3018463866u, 0, FREXP_TOLERANCE, 0},
+{ 94, 1086226574u, 404012923u, 0u, 13u, 1072595086u, 404012923u, 0, FREXP_TOLERANCE, 0},
+{ 95, 1064733299u, 1710279345u, 0u, 4294967289u, 1072073331u, 1710279345u, 0, FREXP_TOLERANCE, 0},
+{ 96, 3251401196u, 3528946000u, 0u, 30u, 3219943916u, 3528946000u, 0, FREXP_TOLERANCE, 0},
+{ 97, 1061536351u, 2164450219u, 0u, 4294967286u, 1072022111u, 2164450219u, 0, FREXP_TOLERANCE, 0},
+{ 98, 1083520023u, 3312018966u, 0u, 11u, 1071985687u, 3312018966u, 0, FREXP_TOLERANCE, 0},
+{ 99, 1057248676u, 2648986431u, 0u, 4294967282u, 1071928740u, 2648986431u, 0, FREXP_TOLERANCE, 0},
+{ 100, 1050330591u, 1474376550u, 0u, 4294967275u, 1072350687u, 1474376550u, 0, FREXP_TOLERANCE, 0},
+{ 101, 3194422028u, 1839068700u, 0u, 4294967272u, 3219587852u, 1839068700u, 0, FREXP_TOLERANCE, 0},
+{ 102, 1077406406u, 3013052171u, 0u, 5u, 1072163526u, 3013052171u, 0, FREXP_TOLERANCE, 0},
+{ 103, 1046493630u, 772102380u, 0u, 4294967272u, 1071659454u, 772102380u, 0, FREXP_TOLERANCE, 0},
+{ 104, 3220729740u, 4219039958u, 0u, 1u, 3219681164u, 4219039958u, 0, FREXP_TOLERANCE, 0},
+{ 105, 3229472221u, 3058618779u, 0u, 9u, 3220035037u, 3058618779u, 0, FREXP_TOLERANCE, 0},
+{ 106, 1046304788u, 3338676024u, 0u, 4294967271u, 1072519188u, 3338676024u, 0, FREXP_TOLERANCE, 0},
+{ 107, 1051172137u, 506286854u, 0u, 4294967276u, 1072143657u, 506286854u, 0, FREXP_TOLERANCE, 0},
+{ 108, 1094907481u, 2217000199u, 0u, 22u, 1071838809u, 2217000199u, 0, FREXP_TOLERANCE, 0},
+{ 109, 1082428310u, 1147428263u, 0u, 10u, 1071942550u, 1147428263u, 0, FREXP_TOLERANCE, 0},
+{ 110, 1065432625u, 3034786717u, 0u, 4294967290u, 1071724081u, 3034786717u, 0, FREXP_TOLERANCE, 0},
+{ 111, 1082016752u, 2844125311u, 0u, 9u, 1072579568u, 2844125311u, 0, FREXP_TOLERANCE, 0},
+{ 112, 1082985198u, 2561492677u, 0u, 10u, 1072499438u, 2561492677u, 0, FREXP_TOLERANCE, 0},
+{ 113, 3211536916u, 704542600u, 0u, 4294967288u, 3219925524u, 704542600u, 0, FREXP_TOLERANCE, 0},
+{ 114, 3222902057u, 2762779203u, 0u, 3u, 3219756329u, 2762779203u, 0, FREXP_TOLERANCE, 0},
+{ 115, 3199680614u, 184131949u, 0u, 4294967277u, 3219603558u, 184131949u, 0, FREXP_TOLERANCE, 0},
+{ 116, 3249723525u, 1667366082u, 0u, 29u, 3219314821u, 1667366082u, 0, FREXP_TOLERANCE, 0},
+{ 117, 3223609598u, 3904224140u, 0u, 4u, 3219415294u, 3904224140u, 0, FREXP_TOLERANCE, 0},
+{ 118, 1067056698u, 2942159914u, 0u, 4294967291u, 1072299578u, 2942159914u, 0, FREXP_TOLERANCE, 0},
+{ 119, 1100636863u, 426114282u, 0u, 27u, 1072325311u, 426114282u, 0, FREXP_TOLERANCE, 0},
+{ 120, 3209056785u, 1083606355u, 0u, 4294967286u, 3219542545u, 1083606355u, 0, FREXP_TOLERANCE, 0},
+{ 121, 1106165945u, 3774123863u, 0u, 32u, 1072611513u, 3774123863u, 0, FREXP_TOLERANCE, 0},
+{ 122, 1106787580u, 2722107965u, 0u, 33u, 1072184572u, 2722107965u, 0, FREXP_TOLERANCE, 0},
+{ 123, 1088005092u, 1377734762u, 0u, 15u, 1072276452u, 1377734762u, 0, FREXP_TOLERANCE, 0},
+{ 124, 1104232051u, 2377063483u, 0u, 31u, 1071726195u, 2377063483u, 0, FREXP_TOLERANCE, 0},
+{ 125, 1069380559u, 1029739074u, 0u, 4294967293u, 1072526287u, 1029739074u, 0, FREXP_TOLERANCE, 0},
+{ 126, 1105467109u, 3062201018u, 0u, 32u, 1071912677u, 3062201018u, 0, FREXP_TOLERANCE, 0},
+{ 127, 3234741597u, 773857656u, 0u, 14u, 3220061533u, 773857656u, 0, FREXP_TOLERANCE, 0},
+{ 128, 3214251949u, 335833884u, 0u, 4294967291u, 3219494829u, 335833884u, 0, FREXP_TOLERANCE, 0},
+{ 129, 3203224610u, 1473865960u, 0u, 4294967280u, 3220001826u, 1473865960u, 0, FREXP_TOLERANCE, 0},
+{ 130, 1103073830u, 4000427507u, 0u, 29u, 1072665126u, 4000427507u, 0, FREXP_TOLERANCE, 0},
+{ 131, 1103185231u, 4242092620u, 0u, 30u, 1071727951u, 4242092620u, 0, FREXP_TOLERANCE, 0},
+{ 132, 1067009473u, 14539161u, 0u, 4294967291u, 1072252353u, 14539161u, 0, FREXP_TOLERANCE, 0},
+{ 133, 3192516074u, 1732245037u, 0u, 4294967270u, 3219779050u, 1732245037u, 0, FREXP_TOLERANCE, 0},
+{ 134, 1101371955u, 1533536108u, 0u, 28u, 1072011827u, 1533536108u, 0, FREXP_TOLERANCE, 0},
+{ 135, 3249153995u, 1833841275u, 0u, 28u, 3219793867u, 1833841275u, 0, FREXP_TOLERANCE, 0},
+{ 136, 1099430098u, 4144145552u, 0u, 26u, 1072167122u, 4144145552u, 0, FREXP_TOLERANCE, 0},
+{ 137, 3244270463u, 935007012u, 0u, 23u, 3220153215u, 935007012u, 0, FREXP_TOLERANCE, 0},
+{ 138, 3188865420u, 604442938u, 0u, 4294967267u, 3219274124u, 604442938u, 0, FREXP_TOLERANCE, 0},
+{ 139, 3206903253u, 2211464602u, 0u, 4294967284u, 3219486165u, 2211464602u, 0, FREXP_TOLERANCE, 0},
+{ 140, 1046255144u, 1635910526u, 0u, 4294967271u, 1072469544u, 1635910526u, 0, FREXP_TOLERANCE, 0},
+{ 141, 1077871417u, 2549219008u, 0u, 5u, 1072628537u, 2549219008u, 0, FREXP_TOLERANCE, 0},
+{ 142, 3231633258u, 3733639385u, 0u, 11u, 3220098922u, 3733639385u, 0, FREXP_TOLERANCE, 0},
+{ 143, 1082095089u, 1819374372u, 0u, 9u, 1072657905u, 1819374372u, 0, FREXP_TOLERANCE, 0},
+{ 144, 3202219056u, 2617077637u, 0u, 4294967279u, 3220044848u, 2617077637u, 0, FREXP_TOLERANCE, 0},
+{ 145, 1094345280u, 546465680u, 0u, 21u, 1072325184u, 546465680u, 0, FREXP_TOLERANCE, 0},
+{ 146, 1048653554u, 532401530u, 0u, 4294967274u, 1071722226u, 532401530u, 0, FREXP_TOLERANCE, 0},
+{ 147, 1044571091u, 2759019783u, 0u, 4294967270u, 1071834067u, 2759019783u, 0, FREXP_TOLERANCE, 0},
+{ 148, 3221570188u, 3554409630u, 0u, 2u, 3219473036u, 3554409630u, 0, FREXP_TOLERANCE, 0},
+{ 149, 3212931282u, 2527221960u, 0u, 4294967290u, 3219222738u, 2527221960u, 0, FREXP_TOLERANCE, 0},
+{ 150, 1099107978u, 2696971136u, 0u, 26u, 1071845002u, 2696971136u, 0, FREXP_TOLERANCE, 0},
+{ 151, 1097158000u, 173134582u, 0u, 24u, 1071992176u, 173134582u, 0, FREXP_TOLERANCE, 0},
+{ 152, 1087299442u, 2877794600u, 0u, 14u, 1072619378u, 2877794600u, 0, FREXP_TOLERANCE, 0},
+{ 153, 1086400474u, 547642046u, 0u, 14u, 1071720410u, 547642046u, 0, FREXP_TOLERANCE, 0},
+{ 154, 3197285510u, 3521286127u, 0u, 4294967275u, 3219305606u, 3521286127u, 0, FREXP_TOLERANCE, 0},
+{ 155, 1074860702u, 1231582831u, 0u, 3u, 1071714974u, 1231582831u, 0, FREXP_TOLERANCE, 0},
+{ 156, 1090971734u, 1653446832u, 0u, 18u, 1072097366u, 1653446832u, 0, FREXP_TOLERANCE, 0},
+{ 157, 1061342535u, 3762182190u, 0u, 4294967286u, 1071828295u, 3762182190u, 0, FREXP_TOLERANCE, 0},
+{ 158, 3252967851u, 2615360375u, 0u, 32u, 3219413419u, 2615360375u, 0, FREXP_TOLERANCE, 0},
+{ 159, 3200834423u, 2588067350u, 0u, 4294967278u, 3219708791u, 2588067350u, 0, FREXP_TOLERANCE, 0},
+{ 160, 3206610957u, 3551059728u, 0u, 4294967284u, 3219193869u, 3551059728u, 0, FREXP_TOLERANCE, 0},
+{ 161, 3206978856u, 845263327u, 0u, 4294967284u, 3219561768u, 845263327u, 0, FREXP_TOLERANCE, 0},
+{ 162, 1073415902u, 1749010288u, 0u, 1u, 1072367326u, 1749010288u, 0, FREXP_TOLERANCE, 0},
+{ 163, 3205576370u, 3092685191u, 0u, 4294967283u, 3219207858u, 3092685191u, 0, FREXP_TOLERANCE, 0},
+{ 164, 3190678390u, 2872219490u, 0u, 4294967268u, 3220038518u, 2872219490u, 0, FREXP_TOLERANCE, 0},
+{ 165, 3218315055u, 4107255722u, 0u, 4294967295u, 3219363631u, 4107255722u, 0, FREXP_TOLERANCE, 0},
+{ 166, 3205337291u, 3069068345u, 0u, 4294967282u, 3220017355u, 3069068345u, 0, FREXP_TOLERANCE, 0},
+{ 167, 3243990857u, 2294867524u, 0u, 23u, 3219873609u, 2294867524u, 0, FREXP_TOLERANCE, 0},
+{ 168, 3216653996u, 2860384670u, 0u, 4294967293u, 3219799724u, 2860384670u, 0, FREXP_TOLERANCE, 0},
+{ 169, 3193326350u, 2265437201u, 0u, 4294967271u, 3219540750u, 2265437201u, 0, FREXP_TOLERANCE, 0},
+{ 170, 3240198679u, 1234948614u, 0u, 20u, 3219227159u, 1234948614u, 0, FREXP_TOLERANCE, 0},
+{ 171, 3216359929u, 1186945904u, 0u, 4294967293u, 3219505657u, 1186945904u, 0, FREXP_TOLERANCE, 0},
+{ 172, 3251167793u, 1896750851u, 0u, 30u, 3219710513u, 1896750851u, 0, FREXP_TOLERANCE, 0},
+{ 173, 1081575478u, 3686084548u, 0u, 9u, 1072138294u, 3686084548u, 0, FREXP_TOLERANCE, 0},
+{ 174, 1079286273u, 3309277689u, 0u, 7u, 1071946241u, 3309277689u, 0, FREXP_TOLERANCE, 0},
+{ 175, 3223476240u, 3006860614u, 0u, 4u, 3219281936u, 3006860614u, 0, FREXP_TOLERANCE, 0},
+{ 176, 3231412671u, 2504194724u, 0u, 11u, 3219878335u, 2504194724u, 0, FREXP_TOLERANCE, 0},
+{ 177, 3236149260u, 1948717780u, 0u, 16u, 3219372044u, 1948717780u, 0, FREXP_TOLERANCE, 0},
+{ 178, 1048317852u, 3791803982u, 0u, 4294967273u, 1072435100u, 3791803982u, 0, FREXP_TOLERANCE, 0},
+{ 179, 1064345015u, 4272034420u, 0u, 4294967289u, 1071685047u, 4272034420u, 0, FREXP_TOLERANCE, 0},
+{ 180, 3192982124u, 1526175922u, 0u, 4294967271u, 3219196524u, 1526175922u, 0, FREXP_TOLERANCE, 0},
+{ 181, 3245817826u, 4108948538u, 0u, 25u, 3219603426u, 4108948538u, 0, FREXP_TOLERANCE, 0},
+{ 182, 1104691287u, 640541190u, 0u, 31u, 1072185431u, 640541190u, 0, FREXP_TOLERANCE, 0},
+{ 183, 3207257417u, 3259274853u, 0u, 4294967284u, 3219840329u, 3259274853u, 0, FREXP_TOLERANCE, 0},
+{ 184, 1082507103u, 3677038020u, 0u, 10u, 1072021343u, 3677038020u, 0, FREXP_TOLERANCE, 0},
+{ 185, 1083132498u, 3781708548u, 0u, 10u, 1072646738u, 3781708548u, 0, FREXP_TOLERANCE, 0},
+{ 186, 1096584871u, 1207386447u, 0u, 23u, 1072467623u, 1207386447u, 0, FREXP_TOLERANCE, 0},
+{ 187, 3188695272u, 3011191657u, 0u, 4294967266u, 3220152552u, 3011191657u, 0, FREXP_TOLERANCE, 0},
+{ 188, 1103798670u, 1096124830u, 0u, 30u, 1072341390u, 1096124830u, 0, FREXP_TOLERANCE, 0},
+{ 189, 1063235023u, 2540404725u, 0u, 4294967287u, 1072672207u, 2540404725u, 0, FREXP_TOLERANCE, 0},
+{ 190, 3240157452u, 4122845725u, 0u, 20u, 3219185932u, 4122845725u, 0, FREXP_TOLERANCE, 0},
+{ 191, 1083643710u, 311336721u, 0u, 11u, 1072109374u, 311336721u, 0, FREXP_TOLERANCE, 0},
+{ 192, 3214382367u, 4212533768u, 0u, 4294967291u, 3219625247u, 4212533768u, 0, FREXP_TOLERANCE, 0},
+{ 193, 1051139427u, 1769686293u, 0u, 4294967276u, 1072110947u, 1769686293u, 0, FREXP_TOLERANCE, 0},
+{ 194, 3240200923u, 3538602249u, 0u, 20u, 3219229403u, 3538602249u, 0, FREXP_TOLERANCE, 0},
+{ 195, 1078227549u, 508056696u, 0u, 6u, 1071936093u, 508056696u, 0, FREXP_TOLERANCE, 0},
+{ 196, 1103793878u, 776520138u, 0u, 30u, 1072336598u, 776520138u, 0, FREXP_TOLERANCE, 0},
+{ 197, 1102910577u, 4064962760u, 0u, 29u, 1072501873u, 4064962760u, 0, FREXP_TOLERANCE, 0},
+{ 198, 1077424413u, 819766631u, 0u, 5u, 1072181533u, 819766631u, 0, FREXP_TOLERANCE, 0},
+{ 199, 1074178362u, 2112385259u, 0u, 2u, 1072081210u, 2112385259u, 0, FREXP_TOLERANCE, 0},
+{ 200, 3227593179u, 1187058516u, 0u, 8u, 3219204571u, 1187058516u, 0, FREXP_TOLERANCE, 0},
+{ 201, 1082295059u, 2514398118u, 0u, 10u, 1071809299u, 2514398118u, 0, FREXP_TOLERANCE, 0},
+{ 202, 1076579751u, 870169764u, 0u, 4u, 1072385447u, 870169764u, 0, FREXP_TOLERANCE, 0},
+{ 203, 3246851392u, 1190259653u, 0u, 26u, 3219588416u, 1190259653u, 0, FREXP_TOLERANCE, 0},
+{ 204, 1069112254u, 3417249840u, 0u, 4294967293u, 1072257982u, 3417249840u, 0, FREXP_TOLERANCE, 0},
+{ 205, 3193663083u, 3467757357u, 0u, 4294967271u, 3219877483u, 3467757357u, 0, FREXP_TOLERANCE, 0},
+{ 206, 3215075200u, 2168175352u, 0u, 4294967292u, 3219269504u, 2168175352u, 0, FREXP_TOLERANCE, 0},
+{ 207, 3239643135u, 1508888184u, 0u, 19u, 3219720191u, 1508888184u, 0, FREXP_TOLERANCE, 0},
+{ 208, 1060430241u, 3524949092u, 0u, 4294967285u, 1071964577u, 3524949092u, 0, FREXP_TOLERANCE, 0},
+{ 209, 3197412883u, 166402802u, 0u, 4294967275u, 3219432979u, 166402802u, 0, FREXP_TOLERANCE, 0},
+{ 210, 3237198975u, 3572369260u, 0u, 17u, 3219373183u, 3572369260u, 0, FREXP_TOLERANCE, 0},
+{ 211, 1081866822u, 2441536203u, 0u, 9u, 1072429638u, 2441536203u, 0, FREXP_TOLERANCE, 0},
+{ 212, 3202753937u, 3658194573u, 0u, 4294967280u, 3219531153u, 3658194573u, 0, FREXP_TOLERANCE, 0},
+{ 213, 1062392908u, 2479742828u, 0u, 4294967287u, 1071830092u, 2479742828u, 0, FREXP_TOLERANCE, 0},
+{ 214, 1062342831u, 4214154303u, 0u, 4294967287u, 1071780015u, 4214154303u, 0, FREXP_TOLERANCE, 0},
+{ 215, 1082396794u, 426896765u, 0u, 10u, 1071911034u, 426896765u, 0, FREXP_TOLERANCE, 0},
+{ 216, 1066474375u, 2201754442u, 0u, 4294967291u, 1071717255u, 2201754442u, 0, FREXP_TOLERANCE, 0},
+{ 217, 3195629021u, 2055773734u, 0u, 4294967273u, 3219746269u, 2055773734u, 0, FREXP_TOLERANCE, 0},
+{ 218, 3239267288u, 291396537u, 0u, 19u, 3219344344u, 291396537u, 0, FREXP_TOLERANCE, 0},
+{ 219, 3236968033u, 874125203u, 0u, 17u, 3219142241u, 874125203u, 0, FREXP_TOLERANCE, 0},
+{ 220, 3210508124u, 4091098764u, 0u, 4294967287u, 3219945308u, 4091098764u, 0, FREXP_TOLERANCE, 0},
+{ 221, 1065716026u, 120488169u, 0u, 4294967290u, 1072007482u, 120488169u, 0, FREXP_TOLERANCE, 0},
+{ 222, 3241241441u, 1985269424u, 0u, 21u, 3219221345u, 1985269424u, 0, FREXP_TOLERANCE, 0},
+{ 223, 3206539410u, 2243036871u, 0u, 4294967283u, 3220170898u, 2243036871u, 0, FREXP_TOLERANCE, 0},
+{ 224, 3243941101u, 740033495u, 0u, 23u, 3219823853u, 740033495u, 0, FREXP_TOLERANCE, 0},
+{ 225, 3209424906u, 1176656356u, 0u, 4294967286u, 3219910666u, 1176656356u, 0, FREXP_TOLERANCE, 0},
+{ 226, 1074261978u, 3588756231u, 0u, 2u, 1072164826u, 3588756231u, 0, FREXP_TOLERANCE, 0},
+{ 227, 3252816791u, 3037249392u, 0u, 32u, 3219262359u, 3037249392u, 0, FREXP_TOLERANCE, 0},
+{ 228, 1061635587u, 1173102190u, 0u, 4294967286u, 1072121347u, 1173102190u, 0, FREXP_TOLERANCE, 0},
+{ 229, 3237209581u, 2882725208u, 0u, 17u, 3219383789u, 2882725208u, 0, FREXP_TOLERANCE, 0},
+{ 230, 1071440059u, 69225090u, 0u, 4294967295u, 1072488635u, 69225090u, 0, FREXP_TOLERANCE, 0},
+{ 231, 3212663474u, 272319256u, 0u, 4294967289u, 3220003506u, 272319256u, 0, FREXP_TOLERANCE, 0},
+{ 232, 1072073912u, 2493997123u, 0u, 0u, 1072073912u, 2493997123u, 0, FREXP_TOLERANCE, 0},
+{ 233, 1057720186u, 188610379u, 0u, 4294967282u, 1072400250u, 188610379u, 0, FREXP_TOLERANCE, 0},
+{ 234, 3232757923u, 2209647371u, 0u, 12u, 3220175011u, 2209647371u, 0, FREXP_TOLERANCE, 0},
+{ 235, 3236758517u, 1990439193u, 0u, 16u, 3219981301u, 1990439193u, 0, FREXP_TOLERANCE, 0},
+{ 236, 1078073146u, 622849962u, 0u, 6u, 1071781690u, 622849962u, 0, FREXP_TOLERANCE, 0},
+{ 237, 1057135741u, 756052458u, 0u, 4294967282u, 1071815805u, 756052458u, 0, FREXP_TOLERANCE, 0},
+{ 238, 1081649113u, 2247475162u, 0u, 9u, 1072211929u, 2247475162u, 0, FREXP_TOLERANCE, 0},
+{ 239, 1061623064u, 3878055211u, 0u, 4294967286u, 1072108824u, 3878055211u, 0, FREXP_TOLERANCE, 0},
+{ 240, 3222407050u, 2979438623u, 0u, 3u, 3219261322u, 2979438623u, 0, FREXP_TOLERANCE, 0},
+{ 241, 3195290997u, 2676398686u, 0u, 4294967273u, 3219408245u, 2676398686u, 0, FREXP_TOLERANCE, 0},
+{ 242, 1105124431u, 3631096636u, 0u, 31u, 1072618575u, 3631096636u, 0, FREXP_TOLERANCE, 0},
+{ 243, 1065079390u, 1697791764u, 0u, 4294967289u, 1072419422u, 1697791764u, 0, FREXP_TOLERANCE, 0},
+{ 244, 3198136112u, 2299842819u, 0u, 4294967275u, 3220156208u, 2299842819u, 0, FREXP_TOLERANCE, 0},
+{ 245, 1078084768u, 1931502677u, 0u, 6u, 1071793312u, 1931502677u, 0, FREXP_TOLERANCE, 0},
+{ 246, 3215264397u, 3016456382u, 0u, 4294967292u, 3219458701u, 3016456382u, 0, FREXP_TOLERANCE, 0},
+{ 247, 1072253426u, 343404215u, 0u, 0u, 1072253426u, 343404215u, 0, FREXP_TOLERANCE, 0},
+{ 248, 1061072607u, 4266232536u, 0u, 4294967285u, 1072606943u, 4266232536u, 0, FREXP_TOLERANCE, 0},
+{ 249, 3241230836u, 4140316002u, 0u, 21u, 3219210740u, 4140316002u, 0, FREXP_TOLERANCE, 0},
+{ 250, 1082896196u, 868256971u, 0u, 10u, 1072410436u, 868256971u, 0, FREXP_TOLERANCE, 0},
+{ 251, 1075422810u, 1864139509u, 0u, 3u, 1072277082u, 1864139509u, 0, FREXP_TOLERANCE, 0},
+{ 252, 3187675097u, 3084482407u, 0u, 4294967266u, 3219132377u, 3084482407u, 0, FREXP_TOLERANCE, 0},
+{ 253, 3220191323u, 2427162817u, 0u, 1u, 3219142747u, 2427162817u, 0, FREXP_TOLERANCE, 0},
+{ 254, 3234748208u, 2715105792u, 0u, 14u, 3220068144u, 2715105792u, 0, FREXP_TOLERANCE, 0},
+{ 255, 1064600512u, 3943389284u, 0u, 4294967289u, 1071940544u, 3943389284u, 0, FREXP_TOLERANCE, 0},
+{ 256, 1046724025u, 3626825684u, 0u, 4294967272u, 1071889849u, 3626825684u, 0, FREXP_TOLERANCE, 0},
+{ 257, 1045423002u, 967350972u, 0u, 4294967270u, 1072685978u, 967350972u, 0, FREXP_TOLERANCE, 0},
+{ 258, 1093012318u, 448002663u, 0u, 20u, 1072040798u, 448002663u, 0, FREXP_TOLERANCE, 0},
+{ 259, 3251845859u, 105058217u, 0u, 31u, 3219340003u, 105058217u, 0, FREXP_TOLERANCE, 0},
+{ 260, 1069733884u, 171786224u, 0u, 4294967294u, 1071831036u, 171786224u, 0, FREXP_TOLERANCE, 0},
+{ 261, 3189614508u, 2863482262u, 0u, 4294967267u, 3220023212u, 2863482262u, 0, FREXP_TOLERANCE, 0},
+{ 262, 3204997271u, 877784425u, 0u, 4294967282u, 3219677335u, 877784425u, 0, FREXP_TOLERANCE, 0},
+{ 263, 3202629313u, 2801782962u, 0u, 4294967280u, 3219406529u, 2801782962u, 0, FREXP_TOLERANCE, 0},
+{ 264, 3213604117u, 762347195u, 0u, 4294967290u, 3219895573u, 762347195u, 0, FREXP_TOLERANCE, 0},
+{ 265, 3233486727u, 2317950339u, 0u, 13u, 3219855239u, 2317950339u, 0, FREXP_TOLERANCE, 0},
+{ 266, 3246333414u, 2135700283u, 0u, 25u, 3220119014u, 2135700283u, 0, FREXP_TOLERANCE, 0},
+{ 267, 1056516397u, 4171919805u, 0u, 4294967281u, 1072245037u, 4171919805u, 0, FREXP_TOLERANCE, 0},
+{ 268, 1082858682u, 2180920863u, 0u, 10u, 1072372922u, 2180920863u, 0, FREXP_TOLERANCE, 0},
+{ 269, 3220149084u, 1918836931u, 0u, 0u, 3220149084u, 1918836931u, 0, FREXP_TOLERANCE, 0},
+{ 270, 1083603224u, 3137821660u, 0u, 11u, 1072068888u, 3137821660u, 0, FREXP_TOLERANCE, 0},
+{ 271, 1103902874u, 3456203663u, 0u, 30u, 1072445594u, 3456203663u, 0, FREXP_TOLERANCE, 0},
+{ 272, 3235600523u, 2335688936u, 0u, 15u, 3219871883u, 2335688936u, 0, FREXP_TOLERANCE, 0},
+{ 273, 1042279322u, 4170235262u, 0u, 4294967267u, 1072688026u, 4170235262u, 0, FREXP_TOLERANCE, 0},
+{ 274, 1051824459u, 521583737u, 0u, 4294967277u, 1071747403u, 521583737u, 0, FREXP_TOLERANCE, 0},
+{ 275, 1081348303u, 1296623194u, 0u, 9u, 1071911119u, 1296623194u, 0, FREXP_TOLERANCE, 0},
+{ 276, 3250673860u, 2442872540u, 0u, 30u, 3219216580u, 2442872540u, 0, FREXP_TOLERANCE, 0},
+{ 277, 1061684277u, 289979405u, 0u, 4294967286u, 1072170037u, 289979405u, 0, FREXP_TOLERANCE, 0},
+{ 278, 1049514449u, 3865737145u, 0u, 4294967274u, 1072583121u, 3865737145u, 0, FREXP_TOLERANCE, 0},
+{ 279, 1075298944u, 3699090239u, 0u, 3u, 1072153216u, 3699090239u, 0, FREXP_TOLERANCE, 0},
+{ 280, 1054539840u, 3259249360u, 0u, 4294967279u, 1072365632u, 3259249360u, 0, FREXP_TOLERANCE, 0},
+{ 281, 1096418100u, 1619819023u, 0u, 23u, 1072300852u, 1619819023u, 0, FREXP_TOLERANCE, 0},
+{ 282, 1045993352u, 1022642459u, 0u, 4294967271u, 1072207752u, 1022642459u, 0, FREXP_TOLERANCE, 0},
+{ 283, 1081433004u, 19455098u, 0u, 9u, 1071995820u, 19455098u, 0, FREXP_TOLERANCE, 0},
+{ 284, 3229182089u, 2096003654u, 0u, 9u, 3219744905u, 2096003654u, 0, FREXP_TOLERANCE, 0},
+{ 285, 1076297936u, 3803689997u, 0u, 4u, 1072103632u, 3803689997u, 0, FREXP_TOLERANCE, 0},
+{ 286, 1071630912u, 2263729518u, 0u, 4294967295u, 1072679488u, 2263729518u, 0, FREXP_TOLERANCE, 0},
+{ 287, 1101357261u, 2816837387u, 0u, 28u, 1071997133u, 2816837387u, 0, FREXP_TOLERANCE, 0},
+{ 288, 1063422305u, 2597606398u, 0u, 4294967288u, 1071810913u, 2597606398u, 0, FREXP_TOLERANCE, 0},
+{ 289, 1069100169u, 3680967506u, 0u, 4294967293u, 1072245897u, 3680967506u, 0, FREXP_TOLERANCE, 0},
+{ 290, 1040201163u, 179224723u, 0u, 4294967266u, 1071658443u, 179224723u, 0, FREXP_TOLERANCE, 0},
+{ 291, 3188629767u, 978126928u, 0u, 4294967266u, 3220087047u, 978126928u, 0, FREXP_TOLERANCE, 0},
+{ 292, 1101553990u, 4047893399u, 0u, 28u, 1072193862u, 4047893399u, 0, FREXP_TOLERANCE, 0},
+{ 293, 3222322045u, 4059818629u, 0u, 3u, 3219176317u, 4059818629u, 0, FREXP_TOLERANCE, 0},
+{ 294, 1042678728u, 3640293589u, 0u, 4294967268u, 1072038856u, 3640293589u, 0, FREXP_TOLERANCE, 0},
+{ 295, 3248464040u, 3383497159u, 0u, 27u, 3220152488u, 3383497159u, 0, FREXP_TOLERANCE, 0},
+{ 296, 1070002807u, 1527313008u, 0u, 4294967294u, 1072099959u, 1527313008u, 0, FREXP_TOLERANCE, 0},
+{ 297, 3202707679u, 2599946514u, 0u, 4294967280u, 3219484895u, 2599946514u, 0, FREXP_TOLERANCE, 0},
+{ 298, 1104170406u, 2738675352u, 0u, 31u, 1071664550u, 2738675352u, 0, FREXP_TOLERANCE, 0},
+{ 299, 1105232623u, 3616571377u, 0u, 32u, 1071678191u, 3616571377u, 0, FREXP_TOLERANCE, 0},
+{ 300, 1060859316u, 1130603218u, 0u, 4294967285u, 1072393652u, 1130603218u, 0, FREXP_TOLERANCE, 0},
+{ 301, 1076028796u, 3859211180u, 0u, 4u, 1071834492u, 3859211180u, 0, FREXP_TOLERANCE, 0},
+{ 302, 1067940450u, 1744531824u, 0u, 4294967292u, 1072134754u, 1744531824u, 0, FREXP_TOLERANCE, 0},
+{ 303, 1042831340u, 1958025850u, 0u, 4294967268u, 1072191468u, 1958025850u, 0, FREXP_TOLERANCE, 0},
+{ 304, 3236511256u, 2472176453u, 0u, 16u, 3219734040u, 2472176453u, 0, FREXP_TOLERANCE, 0},
+{ 305, 3233107089u, 182132862u, 0u, 13u, 3219475601u, 182132862u, 0, FREXP_TOLERANCE, 0},
+{ 306, 3250520938u, 3924356991u, 0u, 29u, 3220112234u, 3924356991u, 0, FREXP_TOLERANCE, 0},
+{ 307, 3230501884u, 35632886u, 0u, 10u, 3220016124u, 35632886u, 0, FREXP_TOLERANCE, 0},
+{ 308, 3209806504u, 1453402523u, 0u, 4294967287u, 3219243688u, 1453402523u, 0, FREXP_TOLERANCE, 0},
+{ 309, 1083522102u, 743225214u, 0u, 11u, 1071987766u, 743225214u, 0, FREXP_TOLERANCE, 0},
+{ 310, 3202890678u, 142917400u, 0u, 4294967280u, 3219667894u, 142917400u, 0, FREXP_TOLERANCE, 0},
+{ 311, 1080684976u, 1472665012u, 0u, 8u, 1072296368u, 1472665012u, 0, FREXP_TOLERANCE, 0},
+{ 312, 3203138231u, 256588219u, 0u, 4294967280u, 3219915447u, 256588219u, 0, FREXP_TOLERANCE, 0},
+{ 313, 1094982162u, 1062927000u, 0u, 22u, 1071913490u, 1062927000u, 0, FREXP_TOLERANCE, 0},
+{ 314, 1061134072u, 931677439u, 0u, 4294967285u, 1072668408u, 931677439u, 0, FREXP_TOLERANCE, 0},
+{ 315, 1058377732u, 2320910576u, 0u, 4294967283u, 1072009220u, 2320910576u, 0, FREXP_TOLERANCE, 0},
+{ 316, 1055663370u, 288059864u, 0u, 4294967280u, 1072440586u, 288059864u, 0, FREXP_TOLERANCE, 0},
+{ 317, 1078958093u, 1448349062u, 0u, 6u, 1072666637u, 1448349062u, 0, FREXP_TOLERANCE, 0},
+{ 318, 3199478070u, 3454027134u, 0u, 4294967277u, 3219401014u, 3454027134u, 0, FREXP_TOLERANCE, 0},
+{ 319, 3237458798u, 4215445172u, 0u, 17u, 3219633006u, 4215445172u, 0, FREXP_TOLERANCE, 0},
+{ 320, 3196654963u, 2231888973u, 0u, 4294967274u, 3219723635u, 2231888973u, 0, FREXP_TOLERANCE, 0},
+{ 321, 3246632231u, 40413554u, 0u, 26u, 3219369255u, 40413554u, 0, FREXP_TOLERANCE, 0},
+{ 322, 3232578253u, 983832844u, 0u, 12u, 3219995341u, 983832844u, 0, FREXP_TOLERANCE, 0},
+{ 323, 3223721534u, 3995725873u, 0u, 4u, 3219527230u, 3995725873u, 0, FREXP_TOLERANCE, 0},
+{ 324, 1050082319u, 777231627u, 0u, 4294967275u, 1072102415u, 777231627u, 0, FREXP_TOLERANCE, 0},
+{ 325, 1040986626u, 672789828u, 0u, 4294967266u, 1072443906u, 672789828u, 0, FREXP_TOLERANCE, 0},
+{ 326, 3253385962u, 2982787335u, 0u, 32u, 3219831530u, 2982787335u, 0, FREXP_TOLERANCE, 0},
+{ 327, 1068390875u, 2075971825u, 0u, 4294967292u, 1072585179u, 2075971825u, 0, FREXP_TOLERANCE, 0},
+{ 328, 1070166500u, 4034633931u, 0u, 4294967294u, 1072263652u, 4034633931u, 0, FREXP_TOLERANCE, 0},
+{ 329, 3210046177u, 1018222907u, 0u, 4294967287u, 3219483361u, 1018222907u, 0, FREXP_TOLERANCE, 0},
+{ 330, 3244621407u, 3090050495u, 0u, 24u, 3219455583u, 3090050495u, 0, FREXP_TOLERANCE, 0},
+{ 331, 1067680885u, 937732557u, 0u, 4294967292u, 1071875189u, 937732557u, 0, FREXP_TOLERANCE, 0},
+{ 332, 3200798890u, 2557898276u, 0u, 4294967278u, 3219673258u, 2557898276u, 0, FREXP_TOLERANCE, 0},
+{ 333, 1078342316u, 130346162u, 0u, 6u, 1072050860u, 130346162u, 0, FREXP_TOLERANCE, 0},
+{ 334, 3223590310u, 275568693u, 0u, 4u, 3219396006u, 275568693u, 0, FREXP_TOLERANCE, 0},
+{ 335, 1042898869u, 3807416441u, 0u, 4294967268u, 1072258997u, 3807416441u, 0, FREXP_TOLERANCE, 0},
+{ 336, 1075961161u, 3706820266u, 0u, 4u, 1071766857u, 3706820266u, 0, FREXP_TOLERANCE, 0},
+{ 337, 3216099005u, 1710131411u, 0u, 4294967293u, 3219244733u, 1710131411u, 0, FREXP_TOLERANCE, 0},
+{ 338, 1078123323u, 1900790503u, 0u, 6u, 1071831867u, 1900790503u, 0, FREXP_TOLERANCE, 0},
+{ 339, 3238819361u, 3420420033u, 0u, 18u, 3219944993u, 3420420033u, 0, FREXP_TOLERANCE, 0},
+{ 340, 3210844787u, 588423066u, 0u, 4294967288u, 3219233395u, 588423066u, 0, FREXP_TOLERANCE, 0},
+{ 341, 1049684114u, 1160162008u, 0u, 4294967275u, 1071704210u, 1160162008u, 0, FREXP_TOLERANCE, 0},
+{ 342, 3246307879u, 4265764460u, 0u, 25u, 3220093479u, 4265764460u, 0, FREXP_TOLERANCE, 0},
+{ 343, 1102543434u, 366653268u, 0u, 29u, 1072134730u, 366653268u, 0, FREXP_TOLERANCE, 0},
+{ 344, 3188814424u, 466059202u, 0u, 4294967267u, 3219223128u, 466059202u, 0, FREXP_TOLERANCE, 0},
+{ 345, 3226627739u, 1325936170u, 0u, 7u, 3219287707u, 1325936170u, 0, FREXP_TOLERANCE, 0},
+{ 346, 3221436876u, 680097612u, 0u, 2u, 3219339724u, 680097612u, 0, FREXP_TOLERANCE, 0},
+{ 347, 3240391116u, 1827735934u, 0u, 20u, 3219419596u, 1827735934u, 0, FREXP_TOLERANCE, 0},
+{ 348, 3200554324u, 2875599271u, 0u, 4294967278u, 3219428692u, 2875599271u, 0, FREXP_TOLERANCE, 0},
+{ 349, 3191030402u, 3117037091u, 0u, 4294967269u, 3219341954u, 3117037091u, 0, FREXP_TOLERANCE, 0},
+{ 350, 3239246636u, 15838845u, 0u, 19u, 3219323692u, 15838845u, 0, FREXP_TOLERANCE, 0},
+{ 351, 1051974004u, 749718883u, 0u, 4294967277u, 1071896948u, 749718883u, 0, FREXP_TOLERANCE, 0},
+{ 352, 3223587064u, 1523766569u, 0u, 4u, 3219392760u, 1523766569u, 0, FREXP_TOLERANCE, 0},
+{ 353, 1044833651u, 1966536294u, 0u, 4294967270u, 1072096627u, 1966536294u, 0, FREXP_TOLERANCE, 0},
+{ 354, 3250158026u, 699164258u, 0u, 29u, 3219749322u, 699164258u, 0, FREXP_TOLERANCE, 0},
+{ 355, 1098048435u, 3759049394u, 0u, 25u, 1071834035u, 3759049394u, 0, FREXP_TOLERANCE, 0},
+{ 356, 1106085272u, 1183789499u, 0u, 32u, 1072530840u, 1183789499u, 0, FREXP_TOLERANCE, 0},
+{ 357, 1081201623u, 1970107747u, 0u, 9u, 1071764439u, 1970107747u, 0, FREXP_TOLERANCE, 0},
+{ 358, 1095245453u, 2308233883u, 0u, 22u, 1072176781u, 2308233883u, 0, FREXP_TOLERANCE, 0},
+{ 359, 1084756444u, 1491017852u, 0u, 12u, 1072173532u, 1491017852u, 0, FREXP_TOLERANCE, 0},
+{ 360, 1041444355u, 1723375725u, 0u, 4294967267u, 1071853059u, 1723375725u, 0, FREXP_TOLERANCE, 0},
+{ 361, 3216630070u, 1141349287u, 0u, 4294967293u, 3219775798u, 1141349287u, 0, FREXP_TOLERANCE, 0},
+{ 362, 1097465301u, 3403438584u, 0u, 24u, 1072299477u, 3403438584u, 0, FREXP_TOLERANCE, 0},
+{ 363, 3230571908u, 1711085243u, 0u, 10u, 3220086148u, 1711085243u, 0, FREXP_TOLERANCE, 0},
+{ 364, 3250239076u, 1377484108u, 0u, 29u, 3219830372u, 1377484108u, 0, FREXP_TOLERANCE, 0},
+{ 365, 1098385019u, 2880275004u, 0u, 25u, 1072170619u, 2880275004u, 0, FREXP_TOLERANCE, 0},
+{ 366, 1084039594u, 1611394950u, 0u, 11u, 1072505258u, 1611394950u, 0, FREXP_TOLERANCE, 0},
+{ 367, 3234221435u, 2626629370u, 0u, 14u, 3219541371u, 2626629370u, 0, FREXP_TOLERANCE, 0},
+{ 368, 1063771493u, 1499080813u, 0u, 4294967288u, 1072160101u, 1499080813u, 0, FREXP_TOLERANCE, 0},
+{ 369, 1055231263u, 3936262414u, 0u, 4294967280u, 1072008479u, 3936262414u, 0, FREXP_TOLERANCE, 0},
+{ 370, 1103919063u, 3175668759u, 0u, 30u, 1072461783u, 3175668759u, 0, FREXP_TOLERANCE, 0},
+{ 371, 3207981719u, 1270950554u, 0u, 4294967285u, 3219516055u, 1270950554u, 0, FREXP_TOLERANCE, 0},
+{ 372, 3194616071u, 3680565379u, 0u, 4294967272u, 3219781895u, 3680565379u, 0, FREXP_TOLERANCE, 0},
+{ 373, 3208148223u, 1066985223u, 0u, 4294967285u, 3219682559u, 1066985223u, 0, FREXP_TOLERANCE, 0},
+{ 374, 3221613219u, 4089383168u, 0u, 2u, 3219516067u, 4089383168u, 0, FREXP_TOLERANCE, 0},
+{ 375, 3217058839u, 4017329311u, 0u, 4294967294u, 3219155991u, 4017329311u, 0, FREXP_TOLERANCE, 0},
+{ 376, 3208334452u, 1667591498u, 0u, 4294967285u, 3219868788u, 1667591498u, 0, FREXP_TOLERANCE, 0},
+{ 377, 1088164157u, 3154656624u, 0u, 15u, 1072435517u, 3154656624u, 0, FREXP_TOLERANCE, 0},
+{ 378, 1061894279u, 3886344038u, 0u, 4294967286u, 1072380039u, 3886344038u, 0, FREXP_TOLERANCE, 0},
+{ 379, 1050652945u, 977586119u, 0u, 4294967275u, 1072673041u, 977586119u, 0, FREXP_TOLERANCE, 0},
+{ 380, 3209762784u, 953839852u, 0u, 4294967287u, 3219199968u, 953839852u, 0, FREXP_TOLERANCE, 0},
+{ 381, 1104965247u, 143071571u, 0u, 31u, 1072459391u, 143071571u, 0, FREXP_TOLERANCE, 0},
+{ 382, 3206165386u, 913097445u, 0u, 4294967283u, 3219796874u, 913097445u, 0, FREXP_TOLERANCE, 0},
+{ 383, 3190565456u, 1371169579u, 0u, 4294967268u, 3219925584u, 1371169579u, 0, FREXP_TOLERANCE, 0},
+{ 384, 1057079837u, 2594818628u, 0u, 4294967282u, 1071759901u, 2594818628u, 0, FREXP_TOLERANCE, 0},
+{ 385, 3251793336u, 2259342224u, 0u, 31u, 3219287480u, 2259342224u, 0, FREXP_TOLERANCE, 0},
+{ 386, 3217432469u, 1824221478u, 0u, 4294967294u, 3219529621u, 1824221478u, 0, FREXP_TOLERANCE, 0},
+{ 387, 3246834775u, 1576604497u, 0u, 26u, 3219571799u, 1576604497u, 0, FREXP_TOLERANCE, 0},
+{ 388, 1079368611u, 185078728u, 0u, 7u, 1072028579u, 185078728u, 0, FREXP_TOLERANCE, 0},
+{ 389, 3221679427u, 444800035u, 0u, 2u, 3219582275u, 444800035u, 0, FREXP_TOLERANCE, 0},
+{ 390, 3243343143u, 1734989302u, 0u, 23u, 3219225895u, 1734989302u, 0, FREXP_TOLERANCE, 0},
+{ 391, 1072748883u, 130452005u, 0u, 1u, 1071700307u, 130452005u, 0, FREXP_TOLERANCE, 0},
+{ 392, 1041548088u, 2158433515u, 0u, 4294967267u, 1071956792u, 2158433515u, 0, FREXP_TOLERANCE, 0},
+{ 393, 3234695968u, 1941318385u, 0u, 14u, 3220015904u, 1941318385u, 0, FREXP_TOLERANCE, 0},
+{ 394, 1045807374u, 792193370u, 0u, 4294967271u, 1072021774u, 792193370u, 0, FREXP_TOLERANCE, 0},
+{ 395, 3238299666u, 1299392207u, 0u, 18u, 3219425298u, 1299392207u, 0, FREXP_TOLERANCE, 0},
+{ 396, 3212131720u, 3205732280u, 0u, 4294967289u, 3219471752u, 3205732280u, 0, FREXP_TOLERANCE, 0},
+{ 397, 1098698804u, 3035093505u, 0u, 25u, 1072484404u, 3035093505u, 0, FREXP_TOLERANCE, 0},
+{ 398, 1052187689u, 3287702190u, 0u, 4294967277u, 1072110633u, 3287702190u, 0, FREXP_TOLERANCE, 0},
+{ 399, 3246676260u, 2160225215u, 0u, 26u, 3219413284u, 2160225215u, 0, FREXP_TOLERANCE, 0},
+{ 400, 1102624859u, 836655570u, 0u, 29u, 1072216155u, 836655570u, 0, FREXP_TOLERANCE, 0},
+{ 401, 1096723626u, 3360816360u, 0u, 23u, 1072606378u, 3360816360u, 0, FREXP_TOLERANCE, 0},
+{ 402, 3246176356u, 172860634u, 0u, 25u, 3219961956u, 172860634u, 0, FREXP_TOLERANCE, 0},
+{ 403, 1070995788u, 146831910u, 0u, 4294967295u, 1072044364u, 146831910u, 0, FREXP_TOLERANCE, 0},
+{ 404, 1051558014u, 2340722078u, 0u, 4294967276u, 1072529534u, 2340722078u, 0, FREXP_TOLERANCE, 0},
+{ 405, 3230416351u, 1603798153u, 0u, 10u, 3219930591u, 1603798153u, 0, FREXP_TOLERANCE, 0},
+{ 406, 3207725532u, 1099413093u, 0u, 4294967285u, 3219259868u, 1099413093u, 0, FREXP_TOLERANCE, 0},
+{ 407, 3246678378u, 2429340443u, 0u, 26u, 3219415402u, 2429340443u, 0, FREXP_TOLERANCE, 0},
+{ 408, 3190303581u, 3223770005u, 0u, 4294967268u, 3219663709u, 3223770005u, 0, FREXP_TOLERANCE, 0},
+{ 409, 1075882959u, 955542166u, 0u, 4u, 1071688655u, 955542166u, 0, FREXP_TOLERANCE, 0},
+{ 410, 3230415151u, 275583938u, 0u, 10u, 3219929391u, 275583938u, 0, FREXP_TOLERANCE, 0},
+{ 411, 1092971882u, 513397822u, 0u, 20u, 1072000362u, 513397822u, 0, FREXP_TOLERANCE, 0},
+{ 412, 1090646554u, 2089321329u, 0u, 18u, 1071772186u, 2089321329u, 0, FREXP_TOLERANCE, 0},
+{ 413, 3193169876u, 2782073372u, 0u, 4294967271u, 3219384276u, 2782073372u, 0, FREXP_TOLERANCE, 0},
+{ 414, 1046063872u, 4023829068u, 0u, 4294967271u, 1072278272u, 4023829068u, 0, FREXP_TOLERANCE, 0},
+{ 415, 1098564822u, 3242223094u, 0u, 25u, 1072350422u, 3242223094u, 0, FREXP_TOLERANCE, 0},
+{ 416, 3194111199u, 4264674108u, 0u, 4294967272u, 3219277023u, 4264674108u, 0, FREXP_TOLERANCE, 0},
+{ 417, 3238510821u, 3506346169u, 0u, 18u, 3219636453u, 3506346169u, 0, FREXP_TOLERANCE, 0},
+{ 418, 1047020885u, 1742757458u, 0u, 4294967272u, 1072186709u, 1742757458u, 0, FREXP_TOLERANCE, 0},
+{ 419, 3192664477u, 1265459564u, 0u, 4294967270u, 3219927453u, 1265459564u, 0, FREXP_TOLERANCE, 0},
+{ 420, 3193450280u, 3650514880u, 0u, 4294967271u, 3219664680u, 3650514880u, 0, FREXP_TOLERANCE, 0},
+{ 421, 1081755890u, 1525260440u, 0u, 9u, 1072318706u, 1525260440u, 0, FREXP_TOLERANCE, 0},
+{ 422, 3235452527u, 2612331392u, 0u, 15u, 3219723887u, 2612331392u, 0, FREXP_TOLERANCE, 0},
+{ 423, 3248668920u, 1263613754u, 0u, 28u, 3219308792u, 1263613754u, 0, FREXP_TOLERANCE, 0},
+{ 424, 3219096387u, 635677201u, 0u, 4294967295u, 3220144963u, 635677201u, 0, FREXP_TOLERANCE, 0},
+{ 425, 3206272087u, 4140947288u, 0u, 4294967283u, 3219903575u, 4140947288u, 0, FREXP_TOLERANCE, 0},
+{ 426, 3200792376u, 2013265346u, 0u, 4294967278u, 3219666744u, 2013265346u, 0, FREXP_TOLERANCE, 0},
+{ 427, 3249974392u, 1912759945u, 0u, 29u, 3219565688u, 1912759945u, 0, FREXP_TOLERANCE, 0},
+{ 428, 3237045253u, 1351396825u, 0u, 17u, 3219219461u, 1351396825u, 0, FREXP_TOLERANCE, 0},
+{ 429, 3248205162u, 1001433078u, 0u, 27u, 3219893610u, 1001433078u, 0, FREXP_TOLERANCE, 0},
+{ 430, 3206926643u, 2741676659u, 0u, 4294967284u, 3219509555u, 2741676659u, 0, FREXP_TOLERANCE, 0},
+{ 431, 1080923606u, 1088945233u, 0u, 8u, 1072534998u, 1088945233u, 0, FREXP_TOLERANCE, 0},
+{ 432, 1085095743u, 3986114865u, 0u, 12u, 1072512831u, 3986114865u, 0, FREXP_TOLERANCE, 0},
+{ 433, 3215734057u, 831239754u, 0u, 4294967292u, 3219928361u, 831239754u, 0, FREXP_TOLERANCE, 0},
+{ 434, 1099828675u, 3071308141u, 0u, 26u, 1072565699u, 3071308141u, 0, FREXP_TOLERANCE, 0},
+{ 435, 3225834497u, 3473592372u, 0u, 6u, 3219543041u, 3473592372u, 0, FREXP_TOLERANCE, 0},
+{ 436, 1102759382u, 1309576357u, 0u, 29u, 1072350678u, 1309576357u, 0, FREXP_TOLERANCE, 0},
+{ 437, 3251186706u, 2042340367u, 0u, 30u, 3219729426u, 2042340367u, 0, FREXP_TOLERANCE, 0},
+{ 438, 1091945628u, 2062772374u, 0u, 19u, 1072022684u, 2062772374u, 0, FREXP_TOLERANCE, 0},
+{ 439, 3194765687u, 1840632537u, 0u, 4294967272u, 3219931511u, 1840632537u, 0, FREXP_TOLERANCE, 0},
+{ 440, 1096533424u, 807510337u, 0u, 23u, 1072416176u, 807510337u, 0, FREXP_TOLERANCE, 0},
+{ 441, 3231451722u, 144814872u, 0u, 11u, 3219917386u, 144814872u, 0, FREXP_TOLERANCE, 0},
+{ 442, 3212698915u, 2282965697u, 0u, 4294967289u, 3220038947u, 2282965697u, 0, FREXP_TOLERANCE, 0},
+{ 443, 1071236430u, 2552499583u, 0u, 4294967295u, 1072285006u, 2552499583u, 0, FREXP_TOLERANCE, 0},
+{ 444, 3229111426u, 1470130815u, 0u, 9u, 3219674242u, 1470130815u, 0, FREXP_TOLERANCE, 0},
+{ 445, 3243093065u, 2858583811u, 0u, 22u, 3220024393u, 2858583811u, 0, FREXP_TOLERANCE, 0},
+{ 446, 1089760910u, 6360994u, 0u, 17u, 1071935118u, 6360994u, 0, FREXP_TOLERANCE, 0},
+{ 447, 3198264929u, 1614537194u, 0u, 4294967276u, 3219236449u, 1614537194u, 0, FREXP_TOLERANCE, 0},
+{ 448, 1075198900u, 4088705365u, 0u, 3u, 1072053172u, 4088705365u, 0, FREXP_TOLERANCE, 0},
+{ 449, 3250939070u, 3545570051u, 0u, 30u, 3219481790u, 3545570051u, 0, FREXP_TOLERANCE, 0},
+{ 450, 1065221325u, 1629217700u, 0u, 4294967289u, 1072561357u, 1629217700u, 0, FREXP_TOLERANCE, 0},
+{ 451, 1072744324u, 1813392963u, 0u, 1u, 1071695748u, 1813392963u, 0, FREXP_TOLERANCE, 0},
+{ 452, 3235313361u, 3772501596u, 0u, 15u, 3219584721u, 3772501596u, 0, FREXP_TOLERANCE, 0},
+{ 453, 3196802686u, 2406734491u, 0u, 4294967274u, 3219871358u, 2406734491u, 0, FREXP_TOLERANCE, 0},
+{ 454, 1042055360u, 89226663u, 0u, 4294967267u, 1072464064u, 89226663u, 0, FREXP_TOLERANCE, 0},
+{ 455, 3195751081u, 1618759139u, 0u, 4294967273u, 3219868329u, 1618759139u, 0, FREXP_TOLERANCE, 0},
+{ 456, 3194723421u, 3888234802u, 0u, 4294967272u, 3219889245u, 3888234802u, 0, FREXP_TOLERANCE, 0},
+{ 457, 1055357248u, 3590035633u, 0u, 4294967280u, 1072134464u, 3590035633u, 0, FREXP_TOLERANCE, 0},
+{ 458, 3212424262u, 2892456615u, 0u, 4294967289u, 3219764294u, 2892456615u, 0, FREXP_TOLERANCE, 0},
+{ 459, 3189943060u, 2431246964u, 0u, 4294967268u, 3219303188u, 2431246964u, 0, FREXP_TOLERANCE, 0},
+{ 460, 3241512456u, 183850734u, 0u, 21u, 3219492360u, 183850734u, 0, FREXP_TOLERANCE, 0},
+{ 461, 1089501101u, 3088319870u, 0u, 17u, 1071675309u, 3088319870u, 0, FREXP_TOLERANCE, 0},
+{ 462, 3211544311u, 862225364u, 0u, 4294967288u, 3219932919u, 862225364u, 0, FREXP_TOLERANCE, 0},
+{ 463, 3235294664u, 3495352775u, 0u, 15u, 3219566024u, 3495352775u, 0, FREXP_TOLERANCE, 0},
+{ 464, 1058576726u, 596957268u, 0u, 4294967283u, 1072208214u, 596957268u, 0, FREXP_TOLERANCE, 0},
+{ 465, 1046553348u, 1839214511u, 0u, 4294967272u, 1071719172u, 1839214511u, 0, FREXP_TOLERANCE, 0},
+{ 466, 3205004060u, 1923240983u, 0u, 4294967282u, 3219684124u, 1923240983u, 0, FREXP_TOLERANCE, 0},
+{ 467, 1058073864u, 739619702u, 0u, 4294967283u, 1071705352u, 739619702u, 0, FREXP_TOLERANCE, 0},
+{ 468, 3223356436u, 2689885273u, 0u, 4u, 3219162132u, 2689885273u, 0, FREXP_TOLERANCE, 0},
+{ 469, 3200324971u, 2143376228u, 0u, 4294967278u, 3219199339u, 2143376228u, 0, FREXP_TOLERANCE, 0},
+{ 470, 1098306332u, 3760236188u, 0u, 25u, 1072091932u, 3760236188u, 0, FREXP_TOLERANCE, 0},
+{ 471, 1074621795u, 671680995u, 0u, 2u, 1072524643u, 671680995u, 0, FREXP_TOLERANCE, 0},
+{ 472, 1091262633u, 2315535361u, 0u, 18u, 1072388265u, 2315535361u, 0, FREXP_TOLERANCE, 0},
+{ 473, 3214165989u, 2493598049u, 0u, 4294967291u, 3219408869u, 2493598049u, 0, FREXP_TOLERANCE, 0},
+{ 474, 3194927008u, 1689107592u, 0u, 4294967272u, 3220092832u, 1689107592u, 0, FREXP_TOLERANCE, 0},
+{ 475, 3189989959u, 1578976988u, 0u, 4294967268u, 3219350087u, 1578976988u, 0, FREXP_TOLERANCE, 0},
+{ 476, 1066368383u, 2117279163u, 0u, 4294967290u, 1072659839u, 2117279163u, 0, FREXP_TOLERANCE, 0},
+{ 477, 3222988111u, 3425290087u, 0u, 3u, 3219842383u, 3425290087u, 0, FREXP_TOLERANCE, 0},
+{ 478, 1098487295u, 1263412017u, 0u, 25u, 1072272895u, 1263412017u, 0, FREXP_TOLERANCE, 0},
+{ 479, 3208432764u, 3635396812u, 0u, 4294967285u, 3219967100u, 3635396812u, 0, FREXP_TOLERANCE, 0},
+{ 480, 1070999426u, 3965655689u, 0u, 4294967295u, 1072048002u, 3965655689u, 0, FREXP_TOLERANCE, 0},
+{ 481, 1060196346u, 2183973116u, 0u, 4294967285u, 1071730682u, 2183973116u, 0, FREXP_TOLERANCE, 0},
+{ 482, 1101098363u, 1118613350u, 0u, 28u, 1071738235u, 1118613350u, 0, FREXP_TOLERANCE, 0},
+{ 483, 3221946089u, 199516350u, 0u, 2u, 3219848937u, 199516350u, 0, FREXP_TOLERANCE, 0},
+{ 484, 1078368488u, 164621458u, 0u, 6u, 1072077032u, 164621458u, 0, FREXP_TOLERANCE, 0},
+{ 485, 3187706018u, 3570940805u, 0u, 4294967266u, 3219163298u, 3570940805u, 0, FREXP_TOLERANCE, 0},
+{ 486, 3230316437u, 3596080877u, 0u, 10u, 3219830677u, 3596080877u, 0, FREXP_TOLERANCE, 0},
+{ 487, 3208209565u, 980880313u, 0u, 4294967285u, 3219743901u, 980880313u, 0, FREXP_TOLERANCE, 0},
+{ 488, 1079833442u, 884465057u, 0u, 7u, 1072493410u, 884465057u, 0, FREXP_TOLERANCE, 0},
+{ 489, 1099977124u, 2558179220u, 0u, 27u, 1071665572u, 2558179220u, 0, FREXP_TOLERANCE, 0},
+{ 490, 1052873711u, 1233598120u, 0u, 4294967278u, 1071748079u, 1233598120u, 0, FREXP_TOLERANCE, 0},
+{ 491, 1047115221u, 1909994277u, 0u, 4294967272u, 1072281045u, 1909994277u, 0, FREXP_TOLERANCE, 0},
+{ 492, 1085015978u, 2991527452u, 0u, 12u, 1072433066u, 2991527452u, 0, FREXP_TOLERANCE, 0},
+{ 493, 1060855260u, 1680290941u, 0u, 4294967285u, 1072389596u, 1680290941u, 0, FREXP_TOLERANCE, 0},
+{ 494, 1074309900u, 2943870846u, 0u, 2u, 1072212748u, 2943870846u, 0, FREXP_TOLERANCE, 0},
+{ 495, 1059496132u, 1451927357u, 0u, 4294967284u, 1072079044u, 1451927357u, 0, FREXP_TOLERANCE, 0},
+{ 496, 3228615456u, 1502585517u, 0u, 9u, 3219178272u, 1502585517u, 0, FREXP_TOLERANCE, 0},
+{ 497, 3236211951u, 751136990u, 0u, 16u, 3219434735u, 751136990u, 0, FREXP_TOLERANCE, 0},
+{ 498, 3230392165u, 3493275472u, 0u, 10u, 3219906405u, 3493275472u, 0, FREXP_TOLERANCE, 0},
+{ 499, 1098365967u, 1209623292u, 0u, 25u, 1072151567u, 1209623292u, 0, FREXP_TOLERANCE, 0},
+{ 500, 3238056647u, 979495322u, 0u, 18u, 3219182279u, 979495322u, 0, FREXP_TOLERANCE, 0},
+{ 501, 3250424296u, 1717672108u, 0u, 29u, 3220015592u, 1717672108u, 0, FREXP_TOLERANCE, 0},
+{ 502, 1048120593u, 531240316u, 0u, 4294967273u, 1072237841u, 531240316u, 0, FREXP_TOLERANCE, 0},
+{ 503, 1054174923u, 3548721654u, 0u, 4294967279u, 1072000715u, 3548721654u, 0, FREXP_TOLERANCE, 0},
+{ 504, 1086112947u, 3391817224u, 0u, 13u, 1072481459u, 3391817224u, 0, FREXP_TOLERANCE, 0},
+{ 505, 1077836851u, 2758195125u, 0u, 5u, 1072593971u, 2758195125u, 0, FREXP_TOLERANCE, 0},
+{ 506, 1100880260u, 2028440924u, 0u, 27u, 1072568708u, 2028440924u, 0, FREXP_TOLERANCE, 0},
+{ 507, 1084223893u, 2750123373u, 0u, 11u, 1072689557u, 2750123373u, 0, FREXP_TOLERANCE, 0},
+{ 508, 3232200256u, 1086294931u, 0u, 12u, 3219617344u, 1086294931u, 0, FREXP_TOLERANCE, 0},
+{ 509, 1043958672u, 2986160931u, 0u, 4294967269u, 1072270224u, 2986160931u, 0, FREXP_TOLERANCE, 0},
+{ 510, 1076097908u, 2540046258u, 0u, 4u, 1071903604u, 2540046258u, 0, FREXP_TOLERANCE, 0},
+{ 511, 3235476602u, 451471221u, 0u, 15u, 3219747962u, 451471221u, 0, FREXP_TOLERANCE, 0},
+{ 512, 1064816262u, 4187644495u, 0u, 4294967289u, 1072156294u, 4187644495u, 0, FREXP_TOLERANCE, 0},
+{ 513, 1099460228u, 2439500162u, 0u, 26u, 1072197252u, 2439500162u, 0, FREXP_TOLERANCE, 0},
+{ 514, 1065280276u, 1979490284u, 0u, 4294967289u, 1072620308u, 1979490284u, 0, FREXP_TOLERANCE, 0},
+{ 515, 1040415832u, 2283342035u, 0u, 4294967266u, 1071873112u, 2283342035u, 0, FREXP_TOLERANCE, 0},
+{ 516, 1078398157u, 1345997553u, 0u, 6u, 1072106701u, 1345997553u, 0, FREXP_TOLERANCE, 0},
+{ 517, 3213249348u, 179066662u, 0u, 4294967290u, 3219540804u, 179066662u, 0, FREXP_TOLERANCE, 0},
+{ 518, 1103272172u, 1217337578u, 0u, 30u, 1071814892u, 1217337578u, 0, FREXP_TOLERANCE, 0},
+{ 519, 3211562377u, 3779303391u, 0u, 4294967288u, 3219950985u, 3779303391u, 0, FREXP_TOLERANCE, 0},
+{ 520, 3210023352u, 3115946280u, 0u, 4294967287u, 3219460536u, 3115946280u, 0, FREXP_TOLERANCE, 0},
+{ 521, 3192989874u, 286247089u, 0u, 4294967271u, 3219204274u, 286247089u, 0, FREXP_TOLERANCE, 0},
+{ 522, 1085153597u, 713645369u, 0u, 12u, 1072570685u, 713645369u, 0, FREXP_TOLERANCE, 0},
+{ 523, 1093670500u, 1468283899u, 0u, 21u, 1071650404u, 1468283899u, 0, FREXP_TOLERANCE, 0},
+{ 524, 1042831668u, 2022736418u, 0u, 4294967268u, 1072191796u, 2022736418u, 0, FREXP_TOLERANCE, 0},
+{ 525, 1083139105u, 3305564080u, 0u, 10u, 1072653345u, 3305564080u, 0, FREXP_TOLERANCE, 0},
+{ 526, 1065483445u, 482392433u, 0u, 4294967290u, 1071774901u, 482392433u, 0, FREXP_TOLERANCE, 0},
+{ 527, 3201695807u, 2256346551u, 0u, 4294967279u, 3219521599u, 2256346551u, 0, FREXP_TOLERANCE, 0},
+{ 528, 3222430705u, 2071674991u, 0u, 3u, 3219284977u, 2071674991u, 0, FREXP_TOLERANCE, 0},
+{ 529, 3204024695u, 2295269094u, 0u, 4294967281u, 3219753335u, 2295269094u, 0, FREXP_TOLERANCE, 0},
+{ 530, 1084451053u, 2773103941u, 0u, 12u, 1071868141u, 2773103941u, 0, FREXP_TOLERANCE, 0},
+{ 531, 1078173946u, 1482721827u, 0u, 6u, 1071882490u, 1482721827u, 0, FREXP_TOLERANCE, 0},
+{ 532, 1092243422u, 3125409590u, 0u, 19u, 1072320478u, 3125409590u, 0, FREXP_TOLERANCE, 0},
+{ 533, 3221065973u, 1381740563u, 0u, 1u, 3220017397u, 1381740563u, 0, FREXP_TOLERANCE, 0},
+{ 534, 1071545057u, 2918235653u, 0u, 4294967295u, 1072593633u, 2918235653u, 0, FREXP_TOLERANCE, 0},
+{ 535, 3238715972u, 1105857967u, 0u, 18u, 3219841604u, 1105857967u, 0, FREXP_TOLERANCE, 0},
+{ 536, 3241990046u, 2703723225u, 0u, 21u, 3219969950u, 2703723225u, 0, FREXP_TOLERANCE, 0},
+{ 537, 1043015571u, 174689677u, 0u, 4294967268u, 1072375699u, 174689677u, 0, FREXP_TOLERANCE, 0},
+{ 538, 1079333374u, 3947057014u, 0u, 7u, 1071993342u, 3947057014u, 0, FREXP_TOLERANCE, 0},
+{ 539, 1090461859u, 2023082423u, 0u, 17u, 1072636067u, 2023082423u, 0, FREXP_TOLERANCE, 0},
+{ 540, 3242081486u, 1169047927u, 0u, 21u, 3220061390u, 1169047927u, 0, FREXP_TOLERANCE, 0},
+{ 541, 1064525899u, 3742487766u, 0u, 4294967289u, 1071865931u, 3742487766u, 0, FREXP_TOLERANCE, 0},
+{ 542, 1043425732u, 194972788u, 0u, 4294967269u, 1071737284u, 194972788u, 0, FREXP_TOLERANCE, 0},
+{ 543, 3213791827u, 2136071361u, 0u, 4294967290u, 3220083283u, 2136071361u, 0, FREXP_TOLERANCE, 0},
+{ 544, 3211529757u, 993675115u, 0u, 4294967288u, 3219918365u, 993675115u, 0, FREXP_TOLERANCE, 0},
+{ 545, 3213663381u, 210772141u, 0u, 4294967290u, 3219954837u, 210772141u, 0, FREXP_TOLERANCE, 0},
+{ 546, 3241441539u, 580731413u, 0u, 21u, 3219421443u, 580731413u, 0, FREXP_TOLERANCE, 0},
+{ 547, 1093840413u, 1751560711u, 0u, 21u, 1071820317u, 1751560711u, 0, FREXP_TOLERANCE, 0},
+{ 548, 1074522705u, 180987057u, 0u, 2u, 1072425553u, 180987057u, 0, FREXP_TOLERANCE, 0},
+{ 549, 1066754591u, 2552236599u, 0u, 4294967291u, 1071997471u, 2552236599u, 0, FREXP_TOLERANCE, 0},
+{ 550, 1088658621u, 2112468655u, 0u, 16u, 1071881405u, 2112468655u, 0, FREXP_TOLERANCE, 0},
+{ 551, 3189290617u, 1578223762u, 0u, 4294967267u, 3219699321u, 1578223762u, 0, FREXP_TOLERANCE, 0},
+{ 552, 3224596567u, 2456166162u, 0u, 5u, 3219353687u, 2456166162u, 0, FREXP_TOLERANCE, 0},
+{ 553, 1058506965u, 2110924310u, 0u, 4294967283u, 1072138453u, 2110924310u, 0, FREXP_TOLERANCE, 0},
+{ 554, 1086207177u, 3161208323u, 0u, 13u, 1072575689u, 3161208323u, 0, FREXP_TOLERANCE, 0},
+{ 555, 3231863394u, 2352173188u, 0u, 12u, 3219280482u, 2352173188u, 0, FREXP_TOLERANCE, 0},
+{ 556, 1079361728u, 4070222179u, 0u, 7u, 1072021696u, 4070222179u, 0, FREXP_TOLERANCE, 0},
+{ 557, 1101012904u, 2481562701u, 0u, 28u, 1071652776u, 2481562701u, 0, FREXP_TOLERANCE, 0},
+{ 558, 1090937016u, 3809489716u, 0u, 18u, 1072062648u, 3809489716u, 0, FREXP_TOLERANCE, 0},
+{ 559, 3197002651u, 330905705u, 0u, 4294967274u, 3220071323u, 330905705u, 0, FREXP_TOLERANCE, 0},
+{ 560, 1086260896u, 90264431u, 0u, 13u, 1072629408u, 90264431u, 0, FREXP_TOLERANCE, 0},
+{ 561, 1040729961u, 4162008079u, 0u, 4294967266u, 1072187241u, 4162008079u, 0, FREXP_TOLERANCE, 0},
+{ 562, 3194387916u, 759522153u, 0u, 4294967272u, 3219553740u, 759522153u, 0, FREXP_TOLERANCE, 0},
+{ 563, 1081015037u, 1839697482u, 0u, 8u, 1072626429u, 1839697482u, 0, FREXP_TOLERANCE, 0},
+{ 564, 3216442625u, 2211508949u, 0u, 4294967293u, 3219588353u, 2211508949u, 0, FREXP_TOLERANCE, 0},
+{ 565, 3249807211u, 3736863454u, 0u, 29u, 3219398507u, 3736863454u, 0, FREXP_TOLERANCE, 0},
+{ 566, 1063475914u, 3150741666u, 0u, 4294967288u, 1071864522u, 3150741666u, 0, FREXP_TOLERANCE, 0},
+{ 567, 1060785883u, 4200269406u, 0u, 4294967285u, 1072320219u, 4200269406u, 0, FREXP_TOLERANCE, 0},
+{ 568, 3236646101u, 1061812176u, 0u, 16u, 3219868885u, 1061812176u, 0, FREXP_TOLERANCE, 0},
+{ 569, 1080217979u, 106027290u, 0u, 8u, 1071829371u, 106027290u, 0, FREXP_TOLERANCE, 0},
+{ 570, 3234978297u, 2245237549u, 0u, 15u, 3219249657u, 2245237549u, 0, FREXP_TOLERANCE, 0},
+{ 571, 3246984334u, 2132131375u, 0u, 26u, 3219721358u, 2132131375u, 0, FREXP_TOLERANCE, 0},
+{ 572, 3250483427u, 3449276437u, 0u, 29u, 3220074723u, 3449276437u, 0, FREXP_TOLERANCE, 0},
+{ 573, 1089388778u, 2334440944u, 0u, 16u, 1072611562u, 2334440944u, 0, FREXP_TOLERANCE, 0},
+{ 574, 1105423490u, 4004336184u, 0u, 32u, 1071869058u, 4004336184u, 0, FREXP_TOLERANCE, 0},
+{ 575, 3218772704u, 4090088208u, 0u, 4294967295u, 3219821280u, 4090088208u, 0, FREXP_TOLERANCE, 0},
+{ 576, 1042030013u, 3898658299u, 0u, 4294967267u, 1072438717u, 3898658299u, 0, FREXP_TOLERANCE, 0},
+{ 577, 3207908064u, 2272831437u, 0u, 4294967285u, 3219442400u, 2272831437u, 0, FREXP_TOLERANCE, 0},
+{ 578, 3253082595u, 2639188641u, 0u, 32u, 3219528163u, 2639188641u, 0, FREXP_TOLERANCE, 0},
+{ 579, 1054766684u, 1856594168u, 0u, 4294967279u, 1072592476u, 1856594168u, 0, FREXP_TOLERANCE, 0},
+{ 580, 3189515294u, 4101853676u, 0u, 4294967267u, 3219923998u, 4101853676u, 0, FREXP_TOLERANCE, 0},
+{ 581, 1076012412u, 2211699255u, 0u, 4u, 1071818108u, 2211699255u, 0, FREXP_TOLERANCE, 0},
+{ 582, 3195060344u, 3865018604u, 0u, 4294967273u, 3219177592u, 3865018604u, 0, FREXP_TOLERANCE, 0},
+{ 583, 3242767010u, 996259334u, 0u, 22u, 3219698338u, 996259334u, 0, FREXP_TOLERANCE, 0},
+{ 584, 3241496889u, 3782673116u, 0u, 21u, 3219476793u, 3782673116u, 0, FREXP_TOLERANCE, 0},
+{ 585, 1099130747u, 3840380763u, 0u, 26u, 1071867771u, 3840380763u, 0, FREXP_TOLERANCE, 0},
+{ 586, 1048674041u, 550040067u, 0u, 4294967274u, 1071742713u, 550040067u, 0, FREXP_TOLERANCE, 0},
+{ 587, 3251419593u, 95874100u, 0u, 30u, 3219962313u, 95874100u, 0, FREXP_TOLERANCE, 0},
+{ 588, 3237232828u, 2645647822u, 0u, 17u, 3219407036u, 2645647822u, 0, FREXP_TOLERANCE, 0},
+{ 589, 1043665640u, 3441419500u, 0u, 4294967269u, 1071977192u, 3441419500u, 0, FREXP_TOLERANCE, 0},
+{ 590, 3252367038u, 876710419u, 0u, 31u, 3219861182u, 876710419u, 0, FREXP_TOLERANCE, 0},
+{ 591, 3238593552u, 2560836004u, 0u, 18u, 3219719184u, 2560836004u, 0, FREXP_TOLERANCE, 0},
+{ 592, 3199616543u, 1180840586u, 0u, 4294967277u, 3219539487u, 1180840586u, 0, FREXP_TOLERANCE, 0},
+{ 593, 3221602966u, 2218230392u, 0u, 2u, 3219505814u, 2218230392u, 0, FREXP_TOLERANCE, 0},
+{ 594, 3227485787u, 3947214579u, 0u, 7u, 3220145755u, 3947214579u, 0, FREXP_TOLERANCE, 0},
+{ 595, 1079539654u, 1447312532u, 0u, 7u, 1072199622u, 1447312532u, 0, FREXP_TOLERANCE, 0},
+{ 596, 1081476588u, 780366847u, 0u, 9u, 1072039404u, 780366847u, 0, FREXP_TOLERANCE, 0},
+{ 597, 1072569643u, 2842113832u, 0u, 0u, 1072569643u, 2842113832u, 0, FREXP_TOLERANCE, 0},
+{ 598, 3216156731u, 225159029u, 0u, 4294967293u, 3219302459u, 225159029u, 0, FREXP_TOLERANCE, 0},
+{ 599, 1098117193u, 1601981129u, 0u, 25u, 1071902793u, 1601981129u, 0, FREXP_TOLERANCE, 0},
+{ 600, 3234628869u, 2236538344u, 0u, 14u, 3219948805u, 2236538344u, 0, FREXP_TOLERANCE, 0},
+{ 601, 1085173524u, 2194185737u, 0u, 12u, 1072590612u, 2194185737u, 0, FREXP_TOLERANCE, 0},
+{ 602, 3242362684u, 87913366u, 0u, 22u, 3219294012u, 87913366u, 0, FREXP_TOLERANCE, 0},
+{ 603, 3199083880u, 1346862963u, 0u, 4294967276u, 3220055400u, 1346862963u, 0, FREXP_TOLERANCE, 0},
+{ 604, 1077836259u, 3604666660u, 0u, 5u, 1072593379u, 3604666660u, 0, FREXP_TOLERANCE, 0},
+{ 605, 3212255979u, 3115209742u, 0u, 4294967289u, 3219596011u, 3115209742u, 0, FREXP_TOLERANCE, 0},
+{ 606, 1099332326u, 1325101950u, 0u, 26u, 1072069350u, 1325101950u, 0, FREXP_TOLERANCE, 0},
+{ 607, 3224546042u, 3889223100u, 0u, 5u, 3219303162u, 3889223100u, 0, FREXP_TOLERANCE, 0},
+{ 608, 1053247613u, 3371396923u, 0u, 4294967278u, 1072121981u, 3371396923u, 0, FREXP_TOLERANCE, 0},
+{ 609, 3220477868u, 4163120793u, 0u, 1u, 3219429292u, 4163120793u, 0, FREXP_TOLERANCE, 0},
+{ 610, 1075022670u, 1387631215u, 0u, 3u, 1071876942u, 1387631215u, 0, FREXP_TOLERANCE, 0},
+{ 611, 3205481779u, 1532426189u, 0u, 4294967282u, 3220161843u, 1532426189u, 0, FREXP_TOLERANCE, 0},
+{ 612, 1063168268u, 3397022615u, 0u, 4294967287u, 1072605452u, 3397022615u, 0, FREXP_TOLERANCE, 0},
+{ 613, 3201033321u, 89324166u, 0u, 4294967278u, 3219907689u, 89324166u, 0, FREXP_TOLERANCE, 0},
+{ 614, 1079206060u, 3429424710u, 0u, 7u, 1071866028u, 3429424710u, 0, FREXP_TOLERANCE, 0},
+{ 615, 3192325102u, 747591401u, 0u, 4294967270u, 3219588078u, 747591401u, 0, FREXP_TOLERANCE, 0},
+{ 616, 1072238381u, 2803213904u, 0u, 0u, 1072238381u, 2803213904u, 0, FREXP_TOLERANCE, 0},
+{ 617, 1091113780u, 271904221u, 0u, 18u, 1072239412u, 271904221u, 0, FREXP_TOLERANCE, 0},
+{ 618, 1044258318u, 1858545114u, 0u, 4294967269u, 1072569870u, 1858545114u, 0, FREXP_TOLERANCE, 0},
+{ 619, 3228068914u, 314958082u, 0u, 8u, 3219680306u, 314958082u, 0, FREXP_TOLERANCE, 0},
+{ 620, 3249912496u, 2966213175u, 0u, 29u, 3219503792u, 2966213175u, 0, FREXP_TOLERANCE, 0},
+{ 621, 3197179414u, 3119528953u, 0u, 4294967275u, 3219199510u, 3119528953u, 0, FREXP_TOLERANCE, 0},
+{ 622, 3217179014u, 2908718240u, 0u, 4294967294u, 3219276166u, 2908718240u, 0, FREXP_TOLERANCE, 0},
+{ 623, 3242467576u, 2018361566u, 0u, 22u, 3219398904u, 2018361566u, 0, FREXP_TOLERANCE, 0},
+{ 624, 1100926600u, 3985805054u, 0u, 27u, 1072615048u, 3985805054u, 0, FREXP_TOLERANCE, 0},
+{ 625, 1070132580u, 409584884u, 0u, 4294967294u, 1072229732u, 409584884u, 0, FREXP_TOLERANCE, 0},
+{ 626, 3239758947u, 755795129u, 0u, 19u, 3219836003u, 755795129u, 0, FREXP_TOLERANCE, 0},
+{ 627, 1075772446u, 1819156379u, 0u, 3u, 1072626718u, 1819156379u, 0, FREXP_TOLERANCE, 0},
+{ 628, 3251342302u, 2982669005u, 0u, 30u, 3219885022u, 2982669005u, 0, FREXP_TOLERANCE, 0},
+{ 629, 1101563433u, 2080534280u, 0u, 28u, 1072203305u, 2080534280u, 0, FREXP_TOLERANCE, 0},
+{ 630, 3188254060u, 449171797u, 0u, 4294967266u, 3219711340u, 449171797u, 0, FREXP_TOLERANCE, 0},
+{ 631, 1095956900u, 168744837u, 0u, 23u, 1071839652u, 168744837u, 0, FREXP_TOLERANCE, 0},
+{ 632, 3214950009u, 1322217822u, 0u, 4294967292u, 3219144313u, 1322217822u, 0, FREXP_TOLERANCE, 0},
+{ 633, 3254226900u, 3250487255u, 0u, 33u, 3219623892u, 3250487255u, 0, FREXP_TOLERANCE, 0},
+{ 634, 1062120700u, 1876195180u, 0u, 4294967286u, 1072606460u, 1876195180u, 0, FREXP_TOLERANCE, 0},
+{ 635, 3226343480u, 1336400247u, 0u, 6u, 3220052024u, 1336400247u, 0, FREXP_TOLERANCE, 0},
+{ 636, 1098057903u, 3314079581u, 0u, 25u, 1071843503u, 3314079581u, 0, FREXP_TOLERANCE, 0},
+{ 637, 3203678820u, 265025555u, 0u, 4294967281u, 3219407460u, 265025555u, 0, FREXP_TOLERANCE, 0},
+{ 638, 1063854282u, 3779482256u, 0u, 4294967288u, 1072242890u, 3779482256u, 0, FREXP_TOLERANCE, 0},
+{ 639, 1067300501u, 887044257u, 0u, 4294967291u, 1072543381u, 887044257u, 0, FREXP_TOLERANCE, 0},
+{ 640, 1054789618u, 2732056261u, 0u, 4294967279u, 1072615410u, 2732056261u, 0, FREXP_TOLERANCE, 0},
+{ 641, 1050106742u, 4027115185u, 0u, 4294967275u, 1072126838u, 4027115185u, 0, FREXP_TOLERANCE, 0},
+{ 642, 3191764868u, 2940199511u, 0u, 4294967269u, 3220076420u, 2940199511u, 0, FREXP_TOLERANCE, 0},
+{ 643, 3202500155u, 2875684421u, 0u, 4294967280u, 3219277371u, 2875684421u, 0, FREXP_TOLERANCE, 0},
+{ 644, 3227459837u, 2251967570u, 0u, 7u, 3220119805u, 2251967570u, 0, FREXP_TOLERANCE, 0},
+{ 645, 1063244412u, 284173546u, 0u, 4294967287u, 1072681596u, 284173546u, 0, FREXP_TOLERANCE, 0},
+{ 646, 3238823679u, 3557800647u, 0u, 18u, 3219949311u, 3557800647u, 0, FREXP_TOLERANCE, 0},
+{ 647, 1101458560u, 3147771266u, 0u, 28u, 1072098432u, 3147771266u, 0, FREXP_TOLERANCE, 0},
+{ 648, 3220110464u, 2933364246u, 0u, 0u, 3220110464u, 2933364246u, 0, FREXP_TOLERANCE, 0},
+{ 649, 1064853160u, 3366183281u, 0u, 4294967289u, 1072193192u, 3366183281u, 0, FREXP_TOLERANCE, 0},
+{ 650, 3234870843u, 537442654u, 0u, 15u, 3219142203u, 537442654u, 0, FREXP_TOLERANCE, 0},
+{ 651, 3244118788u, 2529029548u, 0u, 23u, 3220001540u, 2529029548u, 0, FREXP_TOLERANCE, 0},
+{ 652, 3249882819u, 3781513577u, 0u, 29u, 3219474115u, 3781513577u, 0, FREXP_TOLERANCE, 0},
+{ 653, 3213436354u, 1080845539u, 0u, 4294967290u, 3219727810u, 1080845539u, 0, FREXP_TOLERANCE, 0},
+{ 654, 3206760016u, 911778687u, 0u, 4294967284u, 3219342928u, 911778687u, 0, FREXP_TOLERANCE, 0},
+{ 655, 3191951036u, 469586759u, 0u, 4294967270u, 3219214012u, 469586759u, 0, FREXP_TOLERANCE, 0},
+{ 656, 1091830022u, 3080528840u, 0u, 19u, 1071907078u, 3080528840u, 0, FREXP_TOLERANCE, 0},
+{ 657, 1080249104u, 2863108169u, 0u, 8u, 1071860496u, 2863108169u, 0, FREXP_TOLERANCE, 0},
+{ 658, 3225605506u, 2508274250u, 0u, 6u, 3219314050u, 2508274250u, 0, FREXP_TOLERANCE, 0},
+{ 659, 3210826984u, 4080017377u, 0u, 4294967288u, 3219215592u, 4080017377u, 0, FREXP_TOLERANCE, 0},
+{ 660, 3206492941u, 1470284690u, 0u, 4294967283u, 3220124429u, 1470284690u, 0, FREXP_TOLERANCE, 0},
+{ 661, 3207120390u, 3867917386u, 0u, 4294967284u, 3219703302u, 3867917386u, 0, FREXP_TOLERANCE, 0},
+{ 662, 1102054928u, 3504746045u, 0u, 29u, 1071646224u, 3504746045u, 0, FREXP_TOLERANCE, 0},
+{ 663, 1064522279u, 2962134101u, 0u, 4294967289u, 1071862311u, 2962134101u, 0, FREXP_TOLERANCE, 0},
+{ 664, 3244741577u, 3390537350u, 0u, 24u, 3219575753u, 3390537350u, 0, FREXP_TOLERANCE, 0},
+{ 665, 1088201813u, 1702237980u, 0u, 15u, 1072473173u, 1702237980u, 0, FREXP_TOLERANCE, 0},
+{ 666, 1071598971u, 1102587474u, 0u, 4294967295u, 1072647547u, 1102587474u, 0, FREXP_TOLERANCE, 0},
+{ 667, 3202970118u, 2180218657u, 0u, 4294967280u, 3219747334u, 2180218657u, 0, FREXP_TOLERANCE, 0},
+{ 668, 3211592260u, 1206527853u, 0u, 4294967288u, 3219980868u, 1206527853u, 0, FREXP_TOLERANCE, 0},
+{ 669, 3197084744u, 394130786u, 0u, 4294967274u, 3220153416u, 394130786u, 0, FREXP_TOLERANCE, 0},
+{ 670, 3242511482u, 2437699868u, 0u, 22u, 3219442810u, 2437699868u, 0, FREXP_TOLERANCE, 0},
+{ 671, 1044237059u, 849581558u, 0u, 4294967269u, 1072548611u, 849581558u, 0, FREXP_TOLERANCE, 0},
+{ 672, 3252006507u, 2008614943u, 0u, 31u, 3219500651u, 2008614943u, 0, FREXP_TOLERANCE, 0},
+{ 673, 3210140014u, 3128971673u, 0u, 4294967287u, 3219577198u, 3128971673u, 0, FREXP_TOLERANCE, 0},
+{ 674, 3249137531u, 2773583059u, 0u, 28u, 3219777403u, 2773583059u, 0, FREXP_TOLERANCE, 0},
+{ 675, 1085029866u, 590727700u, 0u, 12u, 1072446954u, 590727700u, 0, FREXP_TOLERANCE, 0},
+{ 676, 3248651761u, 2183878539u, 0u, 28u, 3219291633u, 2183878539u, 0, FREXP_TOLERANCE, 0},
+{ 677, 1101098629u, 820687580u, 0u, 28u, 1071738501u, 820687580u, 0, FREXP_TOLERANCE, 0},
+{ 678, 3208143496u, 1402434664u, 0u, 4294967285u, 3219677832u, 1402434664u, 0, FREXP_TOLERANCE, 0},
+{ 679, 3252290835u, 1873709254u, 0u, 31u, 3219784979u, 1873709254u, 0, FREXP_TOLERANCE, 0},
+{ 680, 3245167989u, 44275991u, 0u, 24u, 3220002165u, 44275991u, 0, FREXP_TOLERANCE, 0},
+{ 681, 3189668753u, 1174874204u, 0u, 4294967267u, 3220077457u, 1174874204u, 0, FREXP_TOLERANCE, 0},
+{ 682, 3208263730u, 2360372288u, 0u, 4294967285u, 3219798066u, 2360372288u, 0, FREXP_TOLERANCE, 0},
+{ 683, 1103854676u, 937573440u, 0u, 30u, 1072397396u, 937573440u, 0, FREXP_TOLERANCE, 0},
+{ 684, 3208953761u, 211240241u, 0u, 4294967286u, 3219439521u, 211240241u, 0, FREXP_TOLERANCE, 0},
+{ 685, 3243548934u, 2469774991u, 0u, 23u, 3219431686u, 2469774991u, 0, FREXP_TOLERANCE, 0},
+{ 686, 1043117070u, 3380071805u, 0u, 4294967268u, 1072477198u, 3380071805u, 0, FREXP_TOLERANCE, 0},
+{ 687, 1058121042u, 442507560u, 0u, 4294967283u, 1071752530u, 442507560u, 0, FREXP_TOLERANCE, 0},
+{ 688, 3254252803u, 3257889649u, 0u, 33u, 3219649795u, 3257889649u, 0, FREXP_TOLERANCE, 0},
+{ 689, 1068850520u, 1854921625u, 0u, 4294967293u, 1071996248u, 1854921625u, 0, FREXP_TOLERANCE, 0},
+{ 690, 1049810168u, 2729627545u, 0u, 4294967275u, 1071830264u, 2729627545u, 0, FREXP_TOLERANCE, 0},
+{ 691, 3254712629u, 4001809575u, 0u, 33u, 3220109621u, 4001809575u, 0, FREXP_TOLERANCE, 0},
+{ 692, 3240128649u, 278261523u, 0u, 20u, 3219157129u, 278261523u, 0, FREXP_TOLERANCE, 0},
+{ 693, 1087224694u, 1793907966u, 0u, 14u, 1072544630u, 1793907966u, 0, FREXP_TOLERANCE, 0},
+{ 694, 3238955714u, 398859249u, 0u, 18u, 3220081346u, 398859249u, 0, FREXP_TOLERANCE, 0},
+{ 695, 3200952547u, 2511916952u, 0u, 4294967278u, 3219826915u, 2511916952u, 0, FREXP_TOLERANCE, 0},
+{ 696, 3219195283u, 1697158299u, 0u, 0u, 3219195283u, 1697158299u, 0, FREXP_TOLERANCE, 0},
+{ 697, 1069985548u, 3230931724u, 0u, 4294967294u, 1072082700u, 3230931724u, 0, FREXP_TOLERANCE, 0},
+{ 698, 3243897690u, 3508781585u, 0u, 23u, 3219780442u, 3508781585u, 0, FREXP_TOLERANCE, 0},
+{ 699, 1103847606u, 1674254897u, 0u, 30u, 1072390326u, 1674254897u, 0, FREXP_TOLERANCE, 0},
+{ 700, 1046547577u, 217148561u, 0u, 4294967272u, 1071713401u, 217148561u, 0, FREXP_TOLERANCE, 0},
+{ 701, 3211263954u, 3275604304u, 0u, 4294967288u, 3219652562u, 3275604304u, 0, FREXP_TOLERANCE, 0},
+{ 702, 3194840159u, 2991205850u, 0u, 4294967272u, 3220005983u, 2991205850u, 0, FREXP_TOLERANCE, 0},
+{ 703, 3195249375u, 3509997278u, 0u, 4294967273u, 3219366623u, 3509997278u, 0, FREXP_TOLERANCE, 0},
+{ 704, 3248888030u, 3897986511u, 0u, 28u, 3219527902u, 3897986511u, 0, FREXP_TOLERANCE, 0},
+{ 705, 1047182435u, 2156824613u, 0u, 4294967272u, 1072348259u, 2156824613u, 0, FREXP_TOLERANCE, 0},
+{ 706, 1042295665u, 1239257646u, 0u, 4294967268u, 1071655793u, 1239257646u, 0, FREXP_TOLERANCE, 0},
+{ 707, 3213264085u, 1073153314u, 0u, 4294967290u, 3219555541u, 1073153314u, 0, FREXP_TOLERANCE, 0},
+{ 708, 3250031627u, 2567234990u, 0u, 29u, 3219622923u, 2567234990u, 0, FREXP_TOLERANCE, 0},
+{ 709, 3190593412u, 4261696995u, 0u, 4294967268u, 3219953540u, 4261696995u, 0, FREXP_TOLERANCE, 0},
+{ 710, 3197784432u, 323702024u, 0u, 4294967275u, 3219804528u, 323702024u, 0, FREXP_TOLERANCE, 0},
+{ 711, 3243690997u, 4075177615u, 0u, 23u, 3219573749u, 4075177615u, 0, FREXP_TOLERANCE, 0},
+{ 712, 3202791065u, 1919006082u, 0u, 4294967280u, 3219568281u, 1919006082u, 0, FREXP_TOLERANCE, 0},
+{ 713, 3239270013u, 386429966u, 0u, 19u, 3219347069u, 386429966u, 0, FREXP_TOLERANCE, 0},
+{ 714, 1086504491u, 3698826164u, 0u, 14u, 1071824427u, 3698826164u, 0, FREXP_TOLERANCE, 0},
+{ 715, 1078327190u, 1681986446u, 0u, 6u, 1072035734u, 1681986446u, 0, FREXP_TOLERANCE, 0},
+{ 716, 3194985869u, 3072950140u, 0u, 4294967272u, 3220151693u, 3072950140u, 0, FREXP_TOLERANCE, 0},
+{ 717, 3217311933u, 3719038997u, 0u, 4294967294u, 3219409085u, 3719038997u, 0, FREXP_TOLERANCE, 0},
+{ 718, 1055433962u, 3331415058u, 0u, 4294967280u, 1072211178u, 3331415058u, 0, FREXP_TOLERANCE, 0},
+{ 719, 1060749713u, 2420250111u, 0u, 4294967285u, 1072284049u, 2420250111u, 0, FREXP_TOLERANCE, 0},
+{ 720, 3238002206u, 1928661079u, 0u, 17u, 3220176414u, 1928661079u, 0, FREXP_TOLERANCE, 0},
+{ 721, 1081914210u, 3679866727u, 0u, 9u, 1072477026u, 3679866727u, 0, FREXP_TOLERANCE, 0},
+{ 722, 3227386672u, 1273835792u, 0u, 7u, 3220046640u, 1273835792u, 0, FREXP_TOLERANCE, 0},
+{ 723, 1041622738u, 2682092368u, 0u, 4294967267u, 1072031442u, 2682092368u, 0, FREXP_TOLERANCE, 0},
+{ 724, 3234222284u, 1325425811u, 0u, 14u, 3219542220u, 1325425811u, 0, FREXP_TOLERANCE, 0},
+{ 725, 1056312613u, 4175172697u, 0u, 4294967281u, 1072041253u, 4175172697u, 0, FREXP_TOLERANCE, 0},
+{ 726, 3208346191u, 2130706153u, 0u, 4294967285u, 3219880527u, 2130706153u, 0, FREXP_TOLERANCE, 0},
+{ 727, 1092089624u, 1200784450u, 0u, 19u, 1072166680u, 1200784450u, 0, FREXP_TOLERANCE, 0},
+{ 728, 1083605096u, 1248595607u, 0u, 11u, 1072070760u, 1248595607u, 0, FREXP_TOLERANCE, 0},
+{ 729, 3213890863u, 1897285171u, 0u, 4294967291u, 3219133743u, 1897285171u, 0, FREXP_TOLERANCE, 0},
+{ 730, 3251296075u, 944966123u, 0u, 30u, 3219838795u, 944966123u, 0, FREXP_TOLERANCE, 0},
+{ 731, 3241371250u, 2270747330u, 0u, 21u, 3219351154u, 2270747330u, 0, FREXP_TOLERANCE, 0},
+{ 732, 3230692631u, 422503284u, 0u, 11u, 3219158295u, 422503284u, 0, FREXP_TOLERANCE, 0},
+{ 733, 1084120037u, 2857564741u, 0u, 11u, 1072585701u, 2857564741u, 0, FREXP_TOLERANCE, 0},
+{ 734, 1075647403u, 3308906709u, 0u, 3u, 1072501675u, 3308906709u, 0, FREXP_TOLERANCE, 0},
+{ 735, 3203475098u, 1380066948u, 0u, 4294967281u, 3219203738u, 1380066948u, 0, FREXP_TOLERANCE, 0},
+{ 736, 3232612906u, 2613634294u, 0u, 12u, 3220029994u, 2613634294u, 0, FREXP_TOLERANCE, 0},
+{ 737, 1063890856u, 4022784584u, 0u, 4294967288u, 1072279464u, 4022784584u, 0, FREXP_TOLERANCE, 0},
+{ 738, 1060483857u, 3264056381u, 0u, 4294967285u, 1072018193u, 3264056381u, 0, FREXP_TOLERANCE, 0},
+{ 739, 1044637404u, 1778509100u, 0u, 4294967270u, 1071900380u, 1778509100u, 0, FREXP_TOLERANCE, 0},
+{ 740, 3213146285u, 2665833973u, 0u, 4294967290u, 3219437741u, 2665833973u, 0, FREXP_TOLERANCE, 0},
+{ 741, 3216727300u, 1859175955u, 0u, 4294967293u, 3219873028u, 1859175955u, 0, FREXP_TOLERANCE, 0},
+{ 742, 1079949560u, 4258450607u, 0u, 7u, 1072609528u, 4258450607u, 0, FREXP_TOLERANCE, 0},
+{ 743, 1048277388u, 4128020197u, 0u, 4294967273u, 1072394636u, 4128020197u, 0, FREXP_TOLERANCE, 0},
+{ 744, 1076266146u, 4122840980u, 0u, 4u, 1072071842u, 4122840980u, 0, FREXP_TOLERANCE, 0},
+{ 745, 3193183163u, 2454653987u, 0u, 4294967271u, 3219397563u, 2454653987u, 0, FREXP_TOLERANCE, 0},
+{ 746, 3229487005u, 2977478685u, 0u, 9u, 3220049821u, 2977478685u, 0, FREXP_TOLERANCE, 0},
+{ 747, 3253556483u, 1355181872u, 0u, 32u, 3220002051u, 1355181872u, 0, FREXP_TOLERANCE, 0},
+{ 748, 1095308770u, 436846481u, 0u, 22u, 1072240098u, 436846481u, 0, FREXP_TOLERANCE, 0},
+{ 749, 3246605302u, 2592856453u, 0u, 26u, 3219342326u, 2592856453u, 0, FREXP_TOLERANCE, 0},
+{ 750, 3247825559u, 3195234082u, 0u, 27u, 3219514007u, 3195234082u, 0, FREXP_TOLERANCE, 0},
+{ 751, 3222118023u, 3554670043u, 0u, 2u, 3220020871u, 3554670043u, 0, FREXP_TOLERANCE, 0},
+{ 752, 1091621009u, 3321236467u, 0u, 19u, 1071698065u, 3321236467u, 0, FREXP_TOLERANCE, 0},
+{ 753, 1069012833u, 1936670355u, 0u, 4294967293u, 1072158561u, 1936670355u, 0, FREXP_TOLERANCE, 0},
+{ 754, 1095715713u, 2958468553u, 0u, 22u, 1072647041u, 2958468553u, 0, FREXP_TOLERANCE, 0},
+{ 755, 3192291109u, 2960339502u, 0u, 4294967270u, 3219554085u, 2960339502u, 0, FREXP_TOLERANCE, 0},
+{ 756, 1098808013u, 1044068983u, 0u, 25u, 1072593613u, 1044068983u, 0, FREXP_TOLERANCE, 0},
+{ 757, 3196691185u, 4093388677u, 0u, 4294967274u, 3219759857u, 4093388677u, 0, FREXP_TOLERANCE, 0},
+{ 758, 1095478112u, 1735930261u, 0u, 22u, 1072409440u, 1735930261u, 0, FREXP_TOLERANCE, 0},
+{ 759, 1091040302u, 1807398746u, 0u, 18u, 1072165934u, 1807398746u, 0, FREXP_TOLERANCE, 0},
+{ 760, 3195743135u, 4261616162u, 0u, 4294967273u, 3219860383u, 4261616162u, 0, FREXP_TOLERANCE, 0},
+{ 761, 3209294194u, 3250576797u, 0u, 4294967286u, 3219779954u, 3250576797u, 0, FREXP_TOLERANCE, 0},
+{ 762, 1059002384u, 3043079652u, 0u, 4294967283u, 1072633872u, 3043079652u, 0, FREXP_TOLERANCE, 0},
+{ 763, 1069207109u, 666051428u, 0u, 4294967293u, 1072352837u, 666051428u, 0, FREXP_TOLERANCE, 0},
+{ 764, 3208765404u, 1912684117u, 0u, 4294967286u, 3219251164u, 1912684117u, 0, FREXP_TOLERANCE, 0},
+{ 765, 1103487420u, 1949030179u, 0u, 30u, 1072030140u, 1949030179u, 0, FREXP_TOLERANCE, 0},
+{ 766, 1096388934u, 896459246u, 0u, 23u, 1072271686u, 896459246u, 0, FREXP_TOLERANCE, 0},
+{ 767, 1054300653u, 622499767u, 0u, 4294967279u, 1072126445u, 622499767u, 0, FREXP_TOLERANCE, 0},
+{ 768, 1066707637u, 1490260486u, 0u, 4294967291u, 1071950517u, 1490260486u, 0, FREXP_TOLERANCE, 0},
+{ 769, 1106688493u, 1490616165u, 0u, 33u, 1072085485u, 1490616165u, 0, FREXP_TOLERANCE, 0},
+{ 770, 3251242436u, 795675736u, 0u, 30u, 3219785156u, 795675736u, 0, FREXP_TOLERANCE, 0},
+{ 771, 1080943896u, 3662877092u, 0u, 8u, 1072555288u, 3662877092u, 0, FREXP_TOLERANCE, 0},
+{ 772, 3234317146u, 3200513112u, 0u, 14u, 3219637082u, 3200513112u, 0, FREXP_TOLERANCE, 0},
+{ 773, 1084088786u, 1356101968u, 0u, 11u, 1072554450u, 1356101968u, 0, FREXP_TOLERANCE, 0},
+{ 774, 3236536816u, 3062844611u, 0u, 16u, 3219759600u, 3062844611u, 0, FREXP_TOLERANCE, 0},
+{ 775, 3219922640u, 2284484846u, 0u, 0u, 3219922640u, 2284484846u, 0, FREXP_TOLERANCE, 0},
+{ 776, 3219498359u, 3240896015u, 0u, 0u, 3219498359u, 3240896015u, 0, FREXP_TOLERANCE, 0},
+{ 777, 3235759689u, 494503287u, 0u, 15u, 3220031049u, 494503287u, 0, FREXP_TOLERANCE, 0},
+{ 778, 1092811254u, 142673998u, 0u, 20u, 1071839734u, 142673998u, 0, FREXP_TOLERANCE, 0},
+{ 779, 3252125916u, 3394882641u, 0u, 31u, 3219620060u, 3394882641u, 0, FREXP_TOLERANCE, 0},
+{ 780, 3225306538u, 364852125u, 0u, 5u, 3220063658u, 364852125u, 0, FREXP_TOLERANCE, 0},
+{ 781, 3225261763u, 193885269u, 0u, 5u, 3220018883u, 193885269u, 0, FREXP_TOLERANCE, 0},
+{ 782, 1088149839u, 1359805831u, 0u, 15u, 1072421199u, 1359805831u, 0, FREXP_TOLERANCE, 0},
+{ 783, 3200484782u, 592580907u, 0u, 4294967278u, 3219359150u, 592580907u, 0, FREXP_TOLERANCE, 0},
+{ 784, 3199560872u, 3086438952u, 0u, 4294967277u, 3219483816u, 3086438952u, 0, FREXP_TOLERANCE, 0},
+{ 785, 1059518664u, 1778008540u, 0u, 4294967284u, 1072101576u, 1778008540u, 0, FREXP_TOLERANCE, 0},
+{ 786, 1049064687u, 73581647u, 0u, 4294967274u, 1072133359u, 73581647u, 0, FREXP_TOLERANCE, 0},
+{ 787, 3246733598u, 233240285u, 0u, 26u, 3219470622u, 233240285u, 0, FREXP_TOLERANCE, 0},
+{ 788, 1081923320u, 2710903921u, 0u, 9u, 1072486136u, 2710903921u, 0, FREXP_TOLERANCE, 0},
+{ 789, 1069513767u, 3719878805u, 0u, 4294967293u, 1072659495u, 3719878805u, 0, FREXP_TOLERANCE, 0},
+{ 790, 1079866720u, 3615458228u, 0u, 7u, 1072526688u, 3615458228u, 0, FREXP_TOLERANCE, 0},
+{ 791, 3221194724u, 3647632375u, 0u, 1u, 3220146148u, 3647632375u, 0, FREXP_TOLERANCE, 0},
+{ 792, 3247225271u, 3839959621u, 0u, 26u, 3219962295u, 3839959621u, 0, FREXP_TOLERANCE, 0},
+{ 793, 1103401096u, 2232210456u, 0u, 30u, 1071943816u, 2232210456u, 0, FREXP_TOLERANCE, 0},
+{ 794, 3235434773u, 224271737u, 0u, 15u, 3219706133u, 224271737u, 0, FREXP_TOLERANCE, 0},
+{ 795, 3193003684u, 2134662911u, 0u, 4294967271u, 3219218084u, 2134662911u, 0, FREXP_TOLERANCE, 0},
+{ 796, 3190390590u, 4239009051u, 0u, 4294967268u, 3219750718u, 4239009051u, 0, FREXP_TOLERANCE, 0},
+{ 797, 1080526145u, 2305279897u, 0u, 8u, 1072137537u, 2305279897u, 0, FREXP_TOLERANCE, 0},
+{ 798, 1077668039u, 1854523320u, 0u, 5u, 1072425159u, 1854523320u, 0, FREXP_TOLERANCE, 0},
+{ 799, 3219864259u, 538224650u, 0u, 0u, 3219864259u, 538224650u, 0, FREXP_TOLERANCE, 0},
+{ 800, 3206153057u, 1379649610u, 0u, 4294967283u, 3219784545u, 1379649610u, 0, FREXP_TOLERANCE, 0},
+{ 801, 3196410507u, 3683897920u, 0u, 4294967274u, 3219479179u, 3683897920u, 0, FREXP_TOLERANCE, 0},
+{ 802, 3244167599u, 3647579469u, 0u, 23u, 3220050351u, 3647579469u, 0, FREXP_TOLERANCE, 0},
+{ 803, 1090280933u, 2694093608u, 0u, 17u, 1072455141u, 2694093608u, 0, FREXP_TOLERANCE, 0},
+{ 804, 1042775347u, 598406111u, 0u, 4294967268u, 1072135475u, 598406111u, 0, FREXP_TOLERANCE, 0},
+{ 805, 3211635392u, 872706833u, 0u, 4294967288u, 3220024000u, 872706833u, 0, FREXP_TOLERANCE, 0},
+{ 806, 1084802480u, 2200602798u, 0u, 12u, 1072219568u, 2200602798u, 0, FREXP_TOLERANCE, 0},
+{ 807, 1042339597u, 904146293u, 0u, 4294967268u, 1071699725u, 904146293u, 0, FREXP_TOLERANCE, 0},
+{ 808, 1060867322u, 1729685598u, 0u, 4294967285u, 1072401658u, 1729685598u, 0, FREXP_TOLERANCE, 0},
+{ 809, 3195694970u, 1894173462u, 0u, 4294967273u, 3219812218u, 1894173462u, 0, FREXP_TOLERANCE, 0},
+{ 810, 3232800651u, 191960416u, 0u, 13u, 3219169163u, 191960416u, 0, FREXP_TOLERANCE, 0},
+{ 811, 1091225343u, 3521028551u, 0u, 18u, 1072350975u, 3521028551u, 0, FREXP_TOLERANCE, 0},
+{ 812, 1054522089u, 3287274359u, 0u, 4294967279u, 1072347881u, 3287274359u, 0, FREXP_TOLERANCE, 0},
+{ 813, 1095386964u, 959640601u, 0u, 22u, 1072318292u, 959640601u, 0, FREXP_TOLERANCE, 0},
+{ 814, 3201578263u, 4136915018u, 0u, 4294967279u, 3219404055u, 4136915018u, 0, FREXP_TOLERANCE, 0},
+{ 815, 1064005451u, 1553716379u, 0u, 4294967288u, 1072394059u, 1553716379u, 0, FREXP_TOLERANCE, 0},
+{ 816, 1106027987u, 984725765u, 0u, 32u, 1072473555u, 984725765u, 0, FREXP_TOLERANCE, 0},
+{ 817, 3238832641u, 2287646644u, 0u, 18u, 3219958273u, 2287646644u, 0, FREXP_TOLERANCE, 0},
+{ 818, 3240329321u, 2276183378u, 0u, 20u, 3219357801u, 2276183378u, 0, FREXP_TOLERANCE, 0},
+{ 819, 1068209174u, 3940225170u, 0u, 4294967292u, 1072403478u, 3940225170u, 0, FREXP_TOLERANCE, 0},
+{ 820, 3199544434u, 997572161u, 0u, 4294967277u, 3219467378u, 997572161u, 0, FREXP_TOLERANCE, 0},
+{ 821, 3212768361u, 36116288u, 0u, 4294967289u, 3220108393u, 36116288u, 0, FREXP_TOLERANCE, 0},
+{ 822, 3206886566u, 4196602670u, 0u, 4294967284u, 3219469478u, 4196602670u, 0, FREXP_TOLERANCE, 0},
+{ 823, 3241695853u, 3550227562u, 0u, 21u, 3219675757u, 3550227562u, 0, FREXP_TOLERANCE, 0},
+{ 824, 3207257983u, 2747744117u, 0u, 4294967284u, 3219840895u, 2747744117u, 0, FREXP_TOLERANCE, 0},
+{ 825, 1104236126u, 507130047u, 0u, 31u, 1071730270u, 507130047u, 0, FREXP_TOLERANCE, 0},
+{ 826, 1048359321u, 3229888373u, 0u, 4294967273u, 1072476569u, 3229888373u, 0, FREXP_TOLERANCE, 0},
+{ 827, 3222996778u, 2210969014u, 0u, 3u, 3219851050u, 2210969014u, 0, FREXP_TOLERANCE, 0},
+{ 828, 1081031001u, 1946786091u, 0u, 8u, 1072642393u, 1946786091u, 0, FREXP_TOLERANCE, 0},
+{ 829, 3236306990u, 4059150589u, 0u, 16u, 3219529774u, 4059150589u, 0, FREXP_TOLERANCE, 0},
+{ 830, 3189759234u, 1177045799u, 0u, 4294967267u, 3220167938u, 1177045799u, 0, FREXP_TOLERANCE, 0},
+{ 831, 1093103612u, 2664812822u, 0u, 20u, 1072132092u, 2664812822u, 0, FREXP_TOLERANCE, 0},
+{ 832, 1050343198u, 2034180320u, 0u, 4294967275u, 1072363294u, 2034180320u, 0, FREXP_TOLERANCE, 0},
+{ 833, 3213779117u, 1175750283u, 0u, 4294967290u, 3220070573u, 1175750283u, 0, FREXP_TOLERANCE, 0},
+{ 834, 3235559706u, 1424491340u, 0u, 15u, 3219831066u, 1424491340u, 0, FREXP_TOLERANCE, 0},
+{ 835, 3213904193u, 1630036121u, 0u, 4294967291u, 3219147073u, 1630036121u, 0, FREXP_TOLERANCE, 0},
+{ 836, 3231972785u, 3195479448u, 0u, 12u, 3219389873u, 3195479448u, 0, FREXP_TOLERANCE, 0},
+{ 837, 1090429875u, 2527029044u, 0u, 17u, 1072604083u, 2527029044u, 0, FREXP_TOLERANCE, 0},
+{ 838, 1046927050u, 4000723255u, 0u, 4294967272u, 1072092874u, 4000723255u, 0, FREXP_TOLERANCE, 0},
+{ 839, 1085208677u, 3335703647u, 0u, 12u, 1072625765u, 3335703647u, 0, FREXP_TOLERANCE, 0},
+{ 840, 3237349676u, 3869440059u, 0u, 17u, 3219523884u, 3869440059u, 0, FREXP_TOLERANCE, 0},
+{ 841, 1091433848u, 3888398377u, 0u, 18u, 1072559480u, 3888398377u, 0, FREXP_TOLERANCE, 0},
+{ 842, 3196041693u, 1290567220u, 0u, 4294967273u, 3220158941u, 1290567220u, 0, FREXP_TOLERANCE, 0},
+{ 843, 1066679070u, 3242451480u, 0u, 4294967291u, 1071921950u, 3242451480u, 0, FREXP_TOLERANCE, 0},
+{ 844, 3248384948u, 707431021u, 0u, 27u, 3220073396u, 707431021u, 0, FREXP_TOLERANCE, 0},
+{ 845, 1083230509u, 2739665123u, 0u, 11u, 1071696173u, 2739665123u, 0, FREXP_TOLERANCE, 0},
+{ 846, 1060777905u, 1733073225u, 0u, 4294967285u, 1072312241u, 1733073225u, 0, FREXP_TOLERANCE, 0},
+{ 847, 1078517061u, 1297274853u, 0u, 6u, 1072225605u, 1297274853u, 0, FREXP_TOLERANCE, 0},
+{ 848, 3208848704u, 3341639139u, 0u, 4294967286u, 3219334464u, 3341639139u, 0, FREXP_TOLERANCE, 0},
+{ 849, 1046570941u, 2228057309u, 0u, 4294967272u, 1071736765u, 2228057309u, 0, FREXP_TOLERANCE, 0},
+{ 850, 1084318902u, 1317851136u, 0u, 12u, 1071735990u, 1317851136u, 0, FREXP_TOLERANCE, 0},
+{ 851, 1088255327u, 270039934u, 0u, 15u, 1072526687u, 270039934u, 0, FREXP_TOLERANCE, 0},
+{ 852, 3241414679u, 3063626339u, 0u, 21u, 3219394583u, 3063626339u, 0, FREXP_TOLERANCE, 0},
+{ 853, 3219178350u, 83062251u, 0u, 0u, 3219178350u, 83062251u, 0, FREXP_TOLERANCE, 0},
+{ 854, 3211262173u, 2659016437u, 0u, 4294967288u, 3219650781u, 2659016437u, 0, FREXP_TOLERANCE, 0},
+{ 855, 1095743886u, 3833539373u, 0u, 22u, 1072675214u, 3833539373u, 0, FREXP_TOLERANCE, 0},
+{ 856, 3206667189u, 1567476111u, 0u, 4294967284u, 3219250101u, 1567476111u, 0, FREXP_TOLERANCE, 0},
+{ 857, 3205195072u, 2382776852u, 0u, 4294967282u, 3219875136u, 2382776852u, 0, FREXP_TOLERANCE, 0},
+{ 858, 3249232579u, 1546622468u, 0u, 28u, 3219872451u, 1546622468u, 0, FREXP_TOLERANCE, 0},
+{ 859, 1085536439u, 1714300821u, 0u, 13u, 1071904951u, 1714300821u, 0, FREXP_TOLERANCE, 0},
+{ 860, 1104130938u, 4167591598u, 0u, 30u, 1072673658u, 4167591598u, 0, FREXP_TOLERANCE, 0},
+{ 861, 1051092760u, 2798720100u, 0u, 4294967276u, 1072064280u, 2798720100u, 0, FREXP_TOLERANCE, 0},
+{ 862, 1086978789u, 449990704u, 0u, 14u, 1072298725u, 449990704u, 0, FREXP_TOLERANCE, 0},
+{ 863, 3231198415u, 4039516226u, 0u, 11u, 3219664079u, 4039516226u, 0, FREXP_TOLERANCE, 0},
+{ 864, 3244344107u, 4272932619u, 0u, 24u, 3219178283u, 4272932619u, 0, FREXP_TOLERANCE, 0},
+{ 865, 3222708441u, 1683007544u, 0u, 3u, 3219562713u, 1683007544u, 0, FREXP_TOLERANCE, 0},
+{ 866, 1091105663u, 3805494321u, 0u, 18u, 1072231295u, 3805494321u, 0, FREXP_TOLERANCE, 0},
+{ 867, 3220852948u, 2072627412u, 0u, 1u, 3219804372u, 2072627412u, 0, FREXP_TOLERANCE, 0},
+{ 868, 1094383324u, 3394151662u, 0u, 21u, 1072363228u, 3394151662u, 0, FREXP_TOLERANCE, 0},
+{ 869, 3220570024u, 1120106427u, 0u, 1u, 3219521448u, 1120106427u, 0, FREXP_TOLERANCE, 0},
+{ 870, 3223631624u, 3404608264u, 0u, 4u, 3219437320u, 3404608264u, 0, FREXP_TOLERANCE, 0},
+{ 871, 1097859997u, 559918757u, 0u, 25u, 1071645597u, 559918757u, 0, FREXP_TOLERANCE, 0},
+{ 872, 3205077053u, 908100198u, 0u, 4294967282u, 3219757117u, 908100198u, 0, FREXP_TOLERANCE, 0},
+{ 873, 1042677918u, 2026673913u, 0u, 4294967268u, 1072038046u, 2026673913u, 0, FREXP_TOLERANCE, 0},
+{ 874, 3244833635u, 2844573214u, 0u, 24u, 3219667811u, 2844573214u, 0, FREXP_TOLERANCE, 0},
+{ 875, 3254567259u, 3946837259u, 0u, 33u, 3219964251u, 3946837259u, 0, FREXP_TOLERANCE, 0},
+{ 876, 3234993796u, 3850406820u, 0u, 15u, 3219265156u, 3850406820u, 0, FREXP_TOLERANCE, 0},
+{ 877, 1057479809u, 3139330994u, 0u, 4294967282u, 1072159873u, 3139330994u, 0, FREXP_TOLERANCE, 0},
+{ 878, 1046133568u, 1539650690u, 0u, 4294967271u, 1072347968u, 1539650690u, 0, FREXP_TOLERANCE, 0},
+{ 879, 3236705500u, 1554593884u, 0u, 16u, 3219928284u, 1554593884u, 0, FREXP_TOLERANCE, 0},
+{ 880, 3228899878u, 2813752562u, 0u, 9u, 3219462694u, 2813752562u, 0, FREXP_TOLERANCE, 0},
+{ 881, 1056505004u, 3804703138u, 0u, 4294967281u, 1072233644u, 3804703138u, 0, FREXP_TOLERANCE, 0},
+{ 882, 1072931071u, 2053677923u, 0u, 1u, 1071882495u, 2053677923u, 0, FREXP_TOLERANCE, 0},
+{ 883, 3244864299u, 289355864u, 0u, 24u, 3219698475u, 289355864u, 0, FREXP_TOLERANCE, 0},
+{ 884, 1078453818u, 2143066338u, 0u, 6u, 1072162362u, 2143066338u, 0, FREXP_TOLERANCE, 0},
+{ 885, 3203939880u, 2157691971u, 0u, 4294967281u, 3219668520u, 2157691971u, 0, FREXP_TOLERANCE, 0},
+{ 886, 1106629150u, 110806409u, 0u, 33u, 1072026142u, 110806409u, 0, FREXP_TOLERANCE, 0},
+{ 887, 1082157019u, 3570399481u, 0u, 10u, 1071671259u, 3570399481u, 0, FREXP_TOLERANCE, 0},
+{ 888, 1085637605u, 180265334u, 0u, 13u, 1072006117u, 180265334u, 0, FREXP_TOLERANCE, 0},
+{ 889, 3200980182u, 558779875u, 0u, 4294967278u, 3219854550u, 558779875u, 0, FREXP_TOLERANCE, 0},
+{ 890, 3202046748u, 2338464653u, 0u, 4294967279u, 3219872540u, 2338464653u, 0, FREXP_TOLERANCE, 0},
+{ 891, 1045705464u, 1703969219u, 0u, 4294967271u, 1071919864u, 1703969219u, 0, FREXP_TOLERANCE, 0},
+{ 892, 3229797258u, 1417521063u, 0u, 10u, 3219311498u, 1417521063u, 0, FREXP_TOLERANCE, 0},
+{ 893, 3237782261u, 3917440951u, 0u, 17u, 3219956469u, 3917440951u, 0, FREXP_TOLERANCE, 0},
+{ 894, 1051668894u, 3736066983u, 0u, 4294967276u, 1072640414u, 3736066983u, 0, FREXP_TOLERANCE, 0},
+{ 895, 1064752080u, 3106613409u, 0u, 4294967289u, 1072092112u, 3106613409u, 0, FREXP_TOLERANCE, 0},
+{ 896, 1066627453u, 2735392257u, 0u, 4294967291u, 1071870333u, 2735392257u, 0, FREXP_TOLERANCE, 0},
+{ 897, 1065665372u, 2229777605u, 0u, 4294967290u, 1071956828u, 2229777605u, 0, FREXP_TOLERANCE, 0},
+{ 898, 1065061963u, 2405869925u, 0u, 4294967289u, 1072401995u, 2405869925u, 0, FREXP_TOLERANCE, 0},
+{ 899, 3239463229u, 3967957902u, 0u, 19u, 3219540285u, 3967957902u, 0, FREXP_TOLERANCE, 0},
+{ 900, 1057416138u, 3459188071u, 0u, 4294967282u, 1072096202u, 3459188071u, 0, FREXP_TOLERANCE, 0},
+{ 901, 1068639210u, 3699016825u, 0u, 4294967293u, 1071784938u, 3699016825u, 0, FREXP_TOLERANCE, 0},
+{ 902, 3249713090u, 796144848u, 0u, 29u, 3219304386u, 796144848u, 0, FREXP_TOLERANCE, 0},
+{ 903, 3228816396u, 3285165564u, 0u, 9u, 3219379212u, 3285165564u, 0, FREXP_TOLERANCE, 0},
+{ 904, 3211948811u, 401510871u, 0u, 4294967289u, 3219288843u, 401510871u, 0, FREXP_TOLERANCE, 0},
+{ 905, 1094257658u, 634857910u, 0u, 21u, 1072237562u, 634857910u, 0, FREXP_TOLERANCE, 0},
+{ 906, 3199607513u, 914218057u, 0u, 4294967277u, 3219530457u, 914218057u, 0, FREXP_TOLERANCE, 0},
+{ 907, 1083743336u, 2030735578u, 0u, 11u, 1072209000u, 2030735578u, 0, FREXP_TOLERANCE, 0},
+{ 908, 3233855943u, 965677531u, 0u, 14u, 3219175879u, 965677531u, 0, FREXP_TOLERANCE, 0},
+{ 909, 1079556815u, 3957229084u, 0u, 7u, 1072216783u, 3957229084u, 0, FREXP_TOLERANCE, 0},
+{ 910, 1051050470u, 3123776651u, 0u, 4294967276u, 1072021990u, 3123776651u, 0, FREXP_TOLERANCE, 0},
+{ 911, 3221863333u, 162122081u, 0u, 2u, 3219766181u, 162122081u, 0, FREXP_TOLERANCE, 0},
+{ 912, 3239376395u, 108064594u, 0u, 19u, 3219453451u, 108064594u, 0, FREXP_TOLERANCE, 0},
+{ 913, 3237271786u, 869031839u, 0u, 17u, 3219445994u, 869031839u, 0, FREXP_TOLERANCE, 0},
+{ 914, 3225020876u, 1344301606u, 0u, 5u, 3219777996u, 1344301606u, 0, FREXP_TOLERANCE, 0},
+{ 915, 3214433474u, 946696117u, 0u, 4294967291u, 3219676354u, 946696117u, 0, FREXP_TOLERANCE, 0},
+{ 916, 3231825228u, 1700703647u, 0u, 12u, 3219242316u, 1700703647u, 0, FREXP_TOLERANCE, 0},
+{ 917, 1075492875u, 3394168074u, 0u, 3u, 1072347147u, 3394168074u, 0, FREXP_TOLERANCE, 0},
+{ 918, 1076939786u, 1666995668u, 0u, 5u, 1071696906u, 1666995668u, 0, FREXP_TOLERANCE, 0},
+{ 919, 3208774795u, 2488789804u, 0u, 4294967286u, 3219260555u, 2488789804u, 0, FREXP_TOLERANCE, 0},
+{ 920, 3238508333u, 1506943664u, 0u, 18u, 3219633965u, 1506943664u, 0, FREXP_TOLERANCE, 0},
+{ 921, 1072788663u, 3844072288u, 0u, 1u, 1071740087u, 3844072288u, 0, FREXP_TOLERANCE, 0},
+{ 922, 3202592279u, 2630019853u, 0u, 4294967280u, 3219369495u, 2630019853u, 0, FREXP_TOLERANCE, 0},
+{ 923, 3219934542u, 1244307192u, 0u, 0u, 3219934542u, 1244307192u, 0, FREXP_TOLERANCE, 0},
+{ 924, 3191297711u, 2540916692u, 0u, 4294967269u, 3219609263u, 2540916692u, 0, FREXP_TOLERANCE, 0},
+{ 925, 3200062692u, 2871645739u, 0u, 4294967277u, 3219985636u, 2871645739u, 0, FREXP_TOLERANCE, 0},
+{ 926, 3239081581u, 1440249115u, 0u, 19u, 3219158637u, 1440249115u, 0, FREXP_TOLERANCE, 0},
+{ 927, 1068350633u, 1231934926u, 0u, 4294967292u, 1072544937u, 1231934926u, 0, FREXP_TOLERANCE, 0},
+{ 928, 3236746788u, 603977748u, 0u, 16u, 3219969572u, 603977748u, 0, FREXP_TOLERANCE, 0},
+{ 929, 3195449689u, 2386312545u, 0u, 4294967273u, 3219566937u, 2386312545u, 0, FREXP_TOLERANCE, 0},
+{ 930, 1063169277u, 2715234268u, 0u, 4294967287u, 1072606461u, 2715234268u, 0, FREXP_TOLERANCE, 0},
+{ 931, 1087803418u, 915867083u, 0u, 15u, 1072074778u, 915867083u, 0, FREXP_TOLERANCE, 0},
+{ 932, 1046790892u, 3347417612u, 0u, 4294967272u, 1071956716u, 3347417612u, 0, FREXP_TOLERANCE, 0},
+{ 933, 1105984188u, 3553288373u, 0u, 32u, 1072429756u, 3553288373u, 0, FREXP_TOLERANCE, 0},
+{ 934, 1065698616u, 2906680663u, 0u, 4294967290u, 1071990072u, 2906680663u, 0, FREXP_TOLERANCE, 0},
+{ 935, 1045506226u, 2342364630u, 0u, 4294967271u, 1071720626u, 2342364630u, 0, FREXP_TOLERANCE, 0},
+{ 936, 1051356723u, 4019093203u, 0u, 4294967276u, 1072328243u, 4019093203u, 0, FREXP_TOLERANCE, 0},
+{ 937, 3201169162u, 2911548084u, 0u, 4294967278u, 3220043530u, 2911548084u, 0, FREXP_TOLERANCE, 0},
+{ 938, 1105282515u, 2476735795u, 0u, 32u, 1071728083u, 2476735795u, 0, FREXP_TOLERANCE, 0},
+{ 939, 1050472772u, 1836216409u, 0u, 4294967275u, 1072492868u, 1836216409u, 0, FREXP_TOLERANCE, 0},
+{ 940, 1101062307u, 2519592554u, 0u, 28u, 1071702179u, 2519592554u, 0, FREXP_TOLERANCE, 0},
+{ 941, 1070178161u, 1235369496u, 0u, 4294967294u, 1072275313u, 1235369496u, 0, FREXP_TOLERANCE, 0},
+{ 942, 3222946447u, 668087854u, 0u, 3u, 3219800719u, 668087854u, 0, FREXP_TOLERANCE, 0},
+{ 943, 3208554596u, 2981820811u, 0u, 4294967285u, 3220088932u, 2981820811u, 0, FREXP_TOLERANCE, 0},
+{ 944, 1059838516u, 2845580478u, 0u, 4294967284u, 1072421428u, 2845580478u, 0, FREXP_TOLERANCE, 0},
+{ 945, 3193931414u, 1565550570u, 0u, 4294967271u, 3220145814u, 1565550570u, 0, FREXP_TOLERANCE, 0},
+{ 946, 3217165795u, 4162017137u, 0u, 4294967294u, 3219262947u, 4162017137u, 0, FREXP_TOLERANCE, 0},
+{ 947, 3237251378u, 2808968027u, 0u, 17u, 3219425586u, 2808968027u, 0, FREXP_TOLERANCE, 0},
+{ 948, 1055630096u, 1782326814u, 0u, 4294967280u, 1072407312u, 1782326814u, 0, FREXP_TOLERANCE, 0},
+{ 949, 1053576974u, 1492622658u, 0u, 4294967278u, 1072451342u, 1492622658u, 0, FREXP_TOLERANCE, 0},
+{ 950, 3216653077u, 3972512122u, 0u, 4294967293u, 3219798805u, 3972512122u, 0, FREXP_TOLERANCE, 0},
+{ 951, 3222171679u, 2722693603u, 0u, 2u, 3220074527u, 2722693603u, 0, FREXP_TOLERANCE, 0},
+{ 952, 3227814791u, 3169731970u, 0u, 8u, 3219426183u, 3169731970u, 0, FREXP_TOLERANCE, 0},
+{ 953, 3217906631u, 899763203u, 0u, 4294967294u, 3220003783u, 899763203u, 0, FREXP_TOLERANCE, 0},
+{ 954, 3207606001u, 2804747833u, 0u, 4294967285u, 3219140337u, 2804747833u, 0, FREXP_TOLERANCE, 0},
+{ 955, 3230670325u, 3789058912u, 0u, 11u, 3219135989u, 3789058912u, 0, FREXP_TOLERANCE, 0},
+{ 956, 3228095081u, 4135937628u, 0u, 8u, 3219706473u, 4135937628u, 0, FREXP_TOLERANCE, 0},
+{ 957, 1060199382u, 1682808307u, 0u, 4294967285u, 1071733718u, 1682808307u, 0, FREXP_TOLERANCE, 0},
+{ 958, 3206960335u, 232877759u, 0u, 4294967284u, 3219543247u, 232877759u, 0, FREXP_TOLERANCE, 0},
+{ 959, 3242091486u, 2851963139u, 0u, 21u, 3220071390u, 2851963139u, 0, FREXP_TOLERANCE, 0},
+{ 960, 3246852961u, 2590862592u, 0u, 26u, 3219589985u, 2590862592u, 0, FREXP_TOLERANCE, 0},
+{ 961, 1081200406u, 2422232642u, 0u, 9u, 1071763222u, 2422232642u, 0, FREXP_TOLERANCE, 0},
+{ 962, 3234779662u, 290458310u, 0u, 14u, 3220099598u, 290458310u, 0, FREXP_TOLERANCE, 0},
+{ 963, 3210671078u, 1082582386u, 0u, 4294967287u, 3220108262u, 1082582386u, 0, FREXP_TOLERANCE, 0},
+{ 964, 1075605675u, 2602133689u, 0u, 3u, 1072459947u, 2602133689u, 0, FREXP_TOLERANCE, 0},
+{ 965, 3239818611u, 1789635787u, 0u, 19u, 3219895667u, 1789635787u, 0, FREXP_TOLERANCE, 0},
+{ 966, 1059414278u, 1048286093u, 0u, 4294967284u, 1071997190u, 1048286093u, 0, FREXP_TOLERANCE, 0},
+{ 967, 1098330542u, 231339448u, 0u, 25u, 1072116142u, 231339448u, 0, FREXP_TOLERANCE, 0},
+{ 968, 1055573265u, 504907415u, 0u, 4294967280u, 1072350481u, 504907415u, 0, FREXP_TOLERANCE, 0},
+{ 969, 1063211461u, 1153251200u, 0u, 4294967287u, 1072648645u, 1153251200u, 0, FREXP_TOLERANCE, 0},
+{ 970, 3204617090u, 1772013857u, 0u, 4294967282u, 3219297154u, 1772013857u, 0, FREXP_TOLERANCE, 0},
+{ 971, 1099551055u, 1082898276u, 0u, 26u, 1072288079u, 1082898276u, 0, FREXP_TOLERANCE, 0},
+{ 972, 3212089272u, 1449080862u, 0u, 4294967289u, 3219429304u, 1449080862u, 0, FREXP_TOLERANCE, 0},
+{ 973, 1086008285u, 3177299045u, 0u, 13u, 1072376797u, 3177299045u, 0, FREXP_TOLERANCE, 0},
+{ 974, 1058862813u, 809400815u, 0u, 4294967283u, 1072494301u, 809400815u, 0, FREXP_TOLERANCE, 0},
+{ 975, 3230854550u, 1924429710u, 0u, 11u, 3219320214u, 1924429710u, 0, FREXP_TOLERANCE, 0},
+{ 976, 1056464743u, 3349283177u, 0u, 4294967281u, 1072193383u, 3349283177u, 0, FREXP_TOLERANCE, 0},
+{ 977, 3245473391u, 42238036u, 0u, 25u, 3219258991u, 42238036u, 0, FREXP_TOLERANCE, 0},
+{ 978, 1042379500u, 2113559863u, 0u, 4294967268u, 1071739628u, 2113559863u, 0, FREXP_TOLERANCE, 0},
+{ 979, 1064761243u, 3304403230u, 0u, 4294967289u, 1072101275u, 3304403230u, 0, FREXP_TOLERANCE, 0},
+{ 980, 3217556703u, 58952646u, 0u, 4294967294u, 3219653855u, 58952646u, 0, FREXP_TOLERANCE, 0},
+{ 981, 3212669530u, 1645486982u, 0u, 4294967289u, 3220009562u, 1645486982u, 0, FREXP_TOLERANCE, 0},
+{ 982, 3224301095u, 3636267471u, 0u, 4u, 3220106791u, 3636267471u, 0, FREXP_TOLERANCE, 0},
+{ 983, 1062762009u, 619402181u, 0u, 4294967287u, 1072199193u, 619402181u, 0, FREXP_TOLERANCE, 0},
+{ 984, 3235208235u, 557360557u, 0u, 15u, 3219479595u, 557360557u, 0, FREXP_TOLERANCE, 0},
+{ 985, 3238238394u, 110029735u, 0u, 18u, 3219364026u, 110029735u, 0, FREXP_TOLERANCE, 0},
+{ 986, 1046937383u, 984375729u, 0u, 4294967272u, 1072103207u, 984375729u, 0, FREXP_TOLERANCE, 0},
+{ 987, 3189496738u, 4063688092u, 0u, 4294967267u, 3219905442u, 4063688092u, 0, FREXP_TOLERANCE, 0},
+{ 988, 3203235744u, 1049950343u, 0u, 4294967280u, 3220012960u, 1049950343u, 0, FREXP_TOLERANCE, 0},
+{ 989, 1062350619u, 650996069u, 0u, 4294967287u, 1071787803u, 650996069u, 0, FREXP_TOLERANCE, 0},
+{ 990, 1054971928u, 3953359826u, 0u, 4294967280u, 1071749144u, 3953359826u, 0, FREXP_TOLERANCE, 0},
+{ 991, 3227055805u, 66926332u, 0u, 7u, 3219715773u, 66926332u, 0, FREXP_TOLERANCE, 0},
+{ 992, 1090561839u, 1379780888u, 0u, 18u, 1071687471u, 1379780888u, 0, FREXP_TOLERANCE, 0},
+{ 993, 3233453307u, 2803378256u, 0u, 13u, 3219821819u, 2803378256u, 0, FREXP_TOLERANCE, 0},
+{ 994, 1086057989u, 498534626u, 0u, 13u, 1072426501u, 498534626u, 0, FREXP_TOLERANCE, 0},
+{ 995, 1082618553u, 2846400785u, 0u, 10u, 1072132793u, 2846400785u, 0, FREXP_TOLERANCE, 0},
+{ 996, 1047142525u, 1375153550u, 0u, 4294967272u, 1072308349u, 1375153550u, 0, FREXP_TOLERANCE, 0},
+{ 997, 1044581201u, 2869128958u, 0u, 4294967270u, 1071844177u, 2869128958u, 0, FREXP_TOLERANCE, 0},
+{ 998, 1070972315u, 4246440273u, 0u, 4294967295u, 1072020891u, 4246440273u, 0, FREXP_TOLERANCE, 0},
+{ 999, 1051832506u, 3112381207u, 0u, 4294967277u, 1071755450u, 3112381207u, 0, FREXP_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_FREXP_H multiple inclusion protection
+
+// EOF frexp.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/ldexp.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/ldexp.c
new file mode 100644
index 0000000000..6bd8aa898c
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/ldexp.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// ldexp.c
+//
+// Test of ldexp() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/ldexp.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(ldexp_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &ldexp, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_INT, CYG_LIBM_TEST_VEC_DOUBLE,
+ &ldexp_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("ldexp() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("ldexp() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library ldexp() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "ldexp() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF ldexp.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/ldexp.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/ldexp.h
new file mode 100644
index 0000000000..ed6cffc8c7
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/ldexp.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_LDEXP_H
+#define CYGONCE_LIBM_LDEXP_H
+//===========================================================================
+//
+// ldexp.h
+//
+// Test vectors for testing of ldexp() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/ldexp.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define LDEXP_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t ldexp_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1077999148u, 2506787616u, 0u, 54u, 1134622252u, 2506787616u, 0, LDEXP_TOLERANCE, 0},
+{ 2, 3214772338u, 2077734866u, 0u, 34u, 3250423922u, 2077734866u, 0, LDEXP_TOLERANCE, 0},
+{ 3, 1080413105u, 548846937u, 0u, 225u, 1316342705u, 548846937u, 0, LDEXP_TOLERANCE, 0},
+{ 4, 3218221902u, 486455730u, 0u, 318u, 3551669070u, 486455730u, 0, LDEXP_TOLERANCE, 0},
+{ 5, 3224095940u, 4065937691u, 0u, 436u, 3681275076u, 4065937691u, 0, LDEXP_TOLERANCE, 0},
+{ 6, 1071992326u, 2845631987u, 0u, 28u, 1101352454u, 2845631987u, 0, LDEXP_TOLERANCE, 0},
+{ 7, 1046025801u, 4006030831u, 0u, 281u, 1340675657u, 4006030831u, 0, LDEXP_TOLERANCE, 0},
+{ 8, 3220544804u, 1507340799u, 0u, 346u, 3583352100u, 1507340799u, 0, LDEXP_TOLERANCE, 0},
+{ 9, 3194723612u, 479621759u, 0u, 449u, 3665534236u, 479621759u, 0, LDEXP_TOLERANCE, 0},
+{ 10, 1089363191u, 1746012320u, 0u, 291u, 1394498807u, 1746012320u, 0, LDEXP_TOLERANCE, 0},
+{ 11, 1076292113u, 2043066528u, 0u, 292u, 1382476305u, 2043066528u, 0, LDEXP_TOLERANCE, 0},
+{ 12, 3235652646u, 2131233512u, 0u, 104u, 3344704550u, 2131233512u, 0, LDEXP_TOLERANCE, 0},
+{ 13, 1058485694u, 2336118392u, 0u, 314u, 1387738558u, 2336118392u, 0, LDEXP_TOLERANCE, 0},
+{ 14, 1082419809u, 2572806098u, 0u, 29u, 1112828513u, 2572806098u, 0, LDEXP_TOLERANCE, 0},
+{ 15, 1095385097u, 370772494u, 0u, 470u, 1588215817u, 370772494u, 0, LDEXP_TOLERANCE, 0},
+{ 16, 3205432790u, 2588298075u, 0u, 44u, 3251570134u, 2588298075u, 0, LDEXP_TOLERANCE, 0},
+{ 17, 1095917486u, 3103659359u, 0u, 383u, 1497522094u, 3103659359u, 0, LDEXP_TOLERANCE, 0},
+{ 18, 1073371132u, 1515119937u, 0u, 213u, 1296717820u, 1515119937u, 0, LDEXP_TOLERANCE, 0},
+{ 19, 1060343410u, 1857607719u, 0u, 356u, 1433636466u, 1857607719u, 0, LDEXP_TOLERANCE, 0},
+{ 20, 3233184100u, 1472965721u, 0u, 277u, 3523639652u, 1472965721u, 0, LDEXP_TOLERANCE, 0},
+{ 21, 3230691143u, 2574511435u, 0u, 215u, 3456134983u, 2574511435u, 0, LDEXP_TOLERANCE, 0},
+{ 22, 3254171964u, 122146127u, 0u, 445u, 3720788284u, 122146127u, 0, LDEXP_TOLERANCE, 0},
+{ 23, 1072428204u, 831542630u, 0u, 171u, 1251734700u, 831542630u, 0, LDEXP_TOLERANCE, 0},
+{ 24, 1068797024u, 1682228977u, 0u, 239u, 1319406688u, 1682228977u, 0, LDEXP_TOLERANCE, 0},
+{ 25, 1053852869u, 105430463u, 0u, 369u, 1440777413u, 105430463u, 0, LDEXP_TOLERANCE, 0},
+{ 26, 1048952779u, 3490880064u, 0u, 127u, 1182121931u, 3490880064u, 0, LDEXP_TOLERANCE, 0},
+{ 27, 1088448632u, 336073679u, 0u, 29u, 1118857336u, 336073679u, 0, LDEXP_TOLERANCE, 0},
+{ 28, 1102287487u, 265058758u, 0u, 389u, 1510183551u, 265058758u, 0, LDEXP_TOLERANCE, 0},
+{ 29, 3231657216u, 258027773u, 0u, 472u, 3726585088u, 258027773u, 0, LDEXP_TOLERANCE, 0},
+{ 30, 1093107080u, 252015623u, 0u, 96u, 1193770376u, 252015623u, 0, LDEXP_TOLERANCE, 0},
+{ 31, 1067920032u, 78287159u, 0u, 263u, 1343695520u, 78287159u, 0, LDEXP_TOLERANCE, 0},
+{ 32, 1073395576u, 1555523835u, 0u, 92u, 1169864568u, 1555523835u, 0, LDEXP_TOLERANCE, 0},
+{ 33, 1063005332u, 1067681081u, 0u, 264u, 1339829396u, 1067681081u, 0, LDEXP_TOLERANCE, 0},
+{ 34, 1102231954u, 3893923133u, 0u, 244u, 1358084498u, 3893923133u, 0, LDEXP_TOLERANCE, 0},
+{ 35, 3230686533u, 1759897777u, 0u, 309u, 3554696517u, 1759897777u, 0, LDEXP_TOLERANCE, 0},
+{ 36, 3239098397u, 2737037055u, 0u, 73u, 3315644445u, 2737037055u, 0, LDEXP_TOLERANCE, 0},
+{ 37, 3216262634u, 2075329122u, 0u, 66u, 3285468650u, 2075329122u, 0, LDEXP_TOLERANCE, 0},
+{ 38, 3196997769u, 1611276410u, 0u, 194u, 3400421513u, 1611276410u, 0, LDEXP_TOLERANCE, 0},
+{ 39, 3202638019u, 1799495751u, 0u, 455u, 3679740099u, 1799495751u, 0, LDEXP_TOLERANCE, 0},
+{ 40, 1094899225u, 1827380665u, 0u, 66u, 1164105241u, 1827380665u, 0, LDEXP_TOLERANCE, 0},
+{ 41, 1071303853u, 2051165551u, 0u, 459u, 1552600237u, 2051165551u, 0, LDEXP_TOLERANCE, 0},
+{ 42, 1065537321u, 302759375u, 0u, 340u, 1422053161u, 302759375u, 0, LDEXP_TOLERANCE, 0},
+{ 43, 1086875018u, 575413558u, 0u, 398u, 1504208266u, 575413558u, 0, LDEXP_TOLERANCE, 0},
+{ 44, 1053673372u, 2702778974u, 0u, 443u, 1518192540u, 2702778974u, 0, LDEXP_TOLERANCE, 0},
+{ 45, 3193817621u, 1570767698u, 0u, 282u, 3489516053u, 1570767698u, 0, LDEXP_TOLERANCE, 0},
+{ 46, 1071069297u, 2192461366u, 0u, 302u, 1387739249u, 2192461366u, 0, LDEXP_TOLERANCE, 0},
+{ 47, 3238418804u, 1337840437u, 0u, 144u, 3389413748u, 1337840437u, 0, LDEXP_TOLERANCE, 0},
+{ 48, 3248513649u, 1699484613u, 0u, 140u, 3395314289u, 1699484613u, 0, LDEXP_TOLERANCE, 0},
+{ 49, 3217360803u, 3717603375u, 0u, 269u, 3499427747u, 3717603375u, 0, LDEXP_TOLERANCE, 0},
+{ 50, 1088279286u, 3814565670u, 0u, 496u, 1608372982u, 3814565670u, 0, LDEXP_TOLERANCE, 0},
+{ 51, 1049002975u, 2752608599u, 0u, 470u, 1541833695u, 2752608599u, 0, LDEXP_TOLERANCE, 0},
+{ 52, 1057404205u, 3994112087u, 0u, 203u, 1270265133u, 3994112087u, 0, LDEXP_TOLERANCE, 0},
+{ 53, 3192718923u, 705652685u, 0u, 346u, 3555526219u, 705652685u, 0, LDEXP_TOLERANCE, 0},
+{ 54, 1047202319u, 2552982406u, 0u, 120u, 1173031439u, 2552982406u, 0, LDEXP_TOLERANCE, 0},
+{ 55, 1107213408u, 428765703u, 0u, 30u, 1138670688u, 428765703u, 0, LDEXP_TOLERANCE, 0},
+{ 56, 3206857463u, 3463957950u, 0u, 454u, 3682910967u, 3463957950u, 0, LDEXP_TOLERANCE, 0},
+{ 57, 3219940202u, 3511931302u, 0u, 482u, 3725353834u, 3511931302u, 0, LDEXP_TOLERANCE, 0},
+{ 58, 1049545113u, 1382645956u, 0u, 27u, 1077856665u, 1382645956u, 0, LDEXP_TOLERANCE, 0},
+{ 59, 3240285101u, 4024164216u, 0u, 494u, 3758281645u, 4024164216u, 0, LDEXP_TOLERANCE, 0},
+{ 60, 1090664768u, 3201265259u, 0u, 304u, 1409431872u, 3201265259u, 0, LDEXP_TOLERANCE, 0},
+{ 61, 3195451094u, 2082243603u, 0u, 200u, 3405166294u, 2082243603u, 0, LDEXP_TOLERANCE, 0},
+{ 62, 1070789511u, 3477510131u, 0u, 209u, 1289941895u, 3477510131u, 0, LDEXP_TOLERANCE, 0},
+{ 63, 3202292384u, 98230582u, 0u, 499u, 3725531808u, 98230582u, 0, LDEXP_TOLERANCE, 0},
+{ 64, 1057053639u, 2055490142u, 0u, 155u, 1219582919u, 2055490142u, 0, LDEXP_TOLERANCE, 0},
+{ 65, 3231608324u, 3135714676u, 0u, 72u, 3307105796u, 3135714676u, 0, LDEXP_TOLERANCE, 0},
+{ 66, 1067886563u, 3959938578u, 0u, 121u, 1194764259u, 3959938578u, 0, LDEXP_TOLERANCE, 0},
+{ 67, 1064521796u, 2810759459u, 0u, 133u, 1203982404u, 2810759459u, 0, LDEXP_TOLERANCE, 0},
+{ 68, 1050312077u, 2893664965u, 0u, 378u, 1446673805u, 2893664965u, 0, LDEXP_TOLERANCE, 0},
+{ 69, 1083212579u, 1755264865u, 0u, 240u, 1334870819u, 1755264865u, 0, LDEXP_TOLERANCE, 0},
+{ 70, 1106413681u, 4047817320u, 0u, 313u, 1434617969u, 4047817320u, 0, LDEXP_TOLERANCE, 0},
+{ 71, 3203399791u, 846447545u, 0u, 417u, 3640655983u, 846447545u, 0, LDEXP_TOLERANCE, 0},
+{ 72, 1064185862u, 3943538251u, 0u, 42u, 1108226054u, 3943538251u, 0, LDEXP_TOLERANCE, 0},
+{ 73, 3240055222u, 3604989074u, 0u, 181u, 3429847478u, 3604989074u, 0, LDEXP_TOLERANCE, 0},
+{ 74, 1047367602u, 203456665u, 0u, 144u, 1198362546u, 203456665u, 0, LDEXP_TOLERANCE, 0},
+{ 75, 3189239631u, 1189635129u, 0u, 412u, 3621252943u, 1189635129u, 0, LDEXP_TOLERANCE, 0},
+{ 76, 3205779054u, 3013056723u, 0u, 397u, 3622063726u, 3013056723u, 0, LDEXP_TOLERANCE, 0},
+{ 77, 3213557485u, 1246486570u, 0u, 474u, 3710582509u, 1246486570u, 0, LDEXP_TOLERANCE, 0},
+{ 78, 1067165665u, 743938884u, 0u, 66u, 1136371681u, 743938884u, 0, LDEXP_TOLERANCE, 0},
+{ 79, 3251710188u, 3283695916u, 0u, 173u, 3433113836u, 3283695916u, 0, LDEXP_TOLERANCE, 0},
+{ 80, 1049044587u, 137961661u, 0u, 205u, 1264002667u, 137961661u, 0, LDEXP_TOLERANCE, 0},
+{ 81, 3203917457u, 2416207160u, 0u, 306u, 3524781713u, 2416207160u, 0, LDEXP_TOLERANCE, 0},
+{ 82, 1087554095u, 2312530895u, 0u, 328u, 1431487023u, 2312530895u, 0, LDEXP_TOLERANCE, 0},
+{ 83, 3219731834u, 3553194394u, 0u, 51u, 3273209210u, 3553194394u, 0, LDEXP_TOLERANCE, 0},
+{ 84, 1089802564u, 4018123754u, 0u, 40u, 1131745604u, 4018123754u, 0, LDEXP_TOLERANCE, 0},
+{ 85, 3250695960u, 4001402392u, 0u, 197u, 3457265432u, 4001402392u, 0, LDEXP_TOLERANCE, 0},
+{ 86, 1094799453u, 1020693107u, 0u, 461u, 1578192989u, 1020693107u, 0, LDEXP_TOLERANCE, 0},
+{ 87, 3211977643u, 4053777521u, 0u, 379u, 3609387947u, 4053777521u, 0, LDEXP_TOLERANCE, 0},
+{ 88, 1054173542u, 374437781u, 0u, 354u, 1425369446u, 374437781u, 0, LDEXP_TOLERANCE, 0},
+{ 89, 1104453092u, 1396680572u, 0u, 231u, 1346674148u, 1396680572u, 0, LDEXP_TOLERANCE, 0},
+{ 90, 1065738071u, 3778242113u, 0u, 72u, 1141235543u, 3778242113u, 0, LDEXP_TOLERANCE, 0},
+{ 91, 3194422028u, 1839068700u, 0u, 22u, 3217490700u, 1839068700u, 0, LDEXP_TOLERANCE, 0},
+{ 92, 3249772522u, 3333658503u, 0u, 172u, 3430127594u, 3333658503u, 0, LDEXP_TOLERANCE, 0},
+{ 93, 3217561104u, 968764933u, 0u, 236u, 3465025040u, 968764933u, 0, LDEXP_TOLERANCE, 0},
+{ 94, 3208346874u, 2557447419u, 0u, 356u, 3581639930u, 2557447419u, 0, LDEXP_TOLERANCE, 0},
+{ 95, 1092040860u, 2421020125u, 0u, 39u, 1132935324u, 2421020125u, 0, LDEXP_TOLERANCE, 0},
+{ 96, 1051546374u, 390319448u, 0u, 307u, 1373459206u, 390319448u, 0, LDEXP_TOLERANCE, 0},
+{ 97, 1104422077u, 120202647u, 0u, 410u, 1534338237u, 120202647u, 0, LDEXP_TOLERANCE, 0},
+{ 98, 3205907556u, 1571279631u, 0u, 183u, 3397796964u, 1571279631u, 0, LDEXP_TOLERANCE, 0},
+{ 99, 3209048500u, 3811286432u, 0u, 188u, 3406180788u, 3811286432u, 0, LDEXP_TOLERANCE, 0},
+{ 100, 1082016752u, 2844125311u, 0u, 384u, 1484669936u, 2844125311u, 0, LDEXP_TOLERANCE, 0},
+{ 101, 3223518474u, 4002983238u, 0u, 232u, 3466788106u, 4002983238u, 0, LDEXP_TOLERANCE, 0},
+{ 102, 1084999692u, 705964542u, 0u, 337u, 1438369804u, 705964542u, 0, LDEXP_TOLERANCE, 0},
+{ 103, 3253568979u, 697641380u, 0u, 20u, 3274540499u, 697641380u, 0, LDEXP_TOLERANCE, 0},
+{ 104, 1066189359u, 4290199654u, 0u, 261u, 1339867695u, 4290199654u, 0, LDEXP_TOLERANCE, 0},
+{ 105, 3254107020u, 3987628760u, 0u, 187u, 3450190732u, 3987628760u, 0, LDEXP_TOLERANCE, 0},
+{ 106, 1107254732u, 713663124u, 0u, 331u, 1454333388u, 713663124u, 0, LDEXP_TOLERANCE, 0},
+{ 107, 1072634213u, 4243219780u, 0u, 67u, 1142888805u, 4243219780u, 0, LDEXP_TOLERANCE, 0},
+{ 108, 3252818240u, 2525320167u, 0u, 158u, 3418493248u, 2525320167u, 0, LDEXP_TOLERANCE, 0},
+{ 109, 1106165945u, 3774123863u, 0u, 119u, 1230946489u, 3774123863u, 0, LDEXP_TOLERANCE, 0},
+{ 110, 3215263804u, 4238491666u, 0u, 282u, 3510962236u, 4238491666u, 0, LDEXP_TOLERANCE, 0},
+{ 111, 1047864809u, 2749649438u, 0u, 342u, 1406477801u, 2749649438u, 0, LDEXP_TOLERANCE, 0},
+{ 112, 3213031252u, 2168353677u, 0u, 119u, 3337811796u, 2168353677u, 0, LDEXP_TOLERANCE, 0},
+{ 113, 3235560047u, 1920824271u, 0u, 448u, 3705322095u, 1920824271u, 0, LDEXP_TOLERANCE, 0},
+{ 114, 1064313208u, 4197962774u, 0u, 119u, 1189093752u, 4197962774u, 0, LDEXP_TOLERANCE, 0},
+{ 115, 3226731627u, 481356510u, 0u, 228u, 3465806955u, 481356510u, 0, LDEXP_TOLERANCE, 0},
+{ 116, 1098012633u, 1760061418u, 0u, 422u, 1540511705u, 1760061418u, 0, LDEXP_TOLERANCE, 0},
+{ 117, 1062348526u, 1907225401u, 0u, 468u, 1553082094u, 1907225401u, 0, LDEXP_TOLERANCE, 0},
+{ 118, 1103185231u, 4242092620u, 0u, 299u, 1416709455u, 4242092620u, 0, LDEXP_TOLERANCE, 0},
+{ 119, 1052367173u, 3238059481u, 0u, 481u, 1556732229u, 3238059481u, 0, LDEXP_TOLERANCE, 0},
+{ 120, 1100208345u, 3991562047u, 0u, 203u, 1313069273u, 3991562047u, 0, LDEXP_TOLERANCE, 0},
+{ 121, 1060891184u, 899298139u, 0u, 214u, 1285286448u, 899298139u, 0, LDEXP_TOLERANCE, 0},
+{ 122, 1104449768u, 3410634699u, 0u, 411u, 1535414504u, 3410634699u, 0, LDEXP_TOLERANCE, 0},
+{ 123, 1073419044u, 3812243448u, 0u, 319u, 1407914788u, 3812243448u, 0, LDEXP_TOLERANCE, 0},
+{ 124, 3202615057u, 987224991u, 0u, 224u, 3437496081u, 987224991u, 0, LDEXP_TOLERANCE, 0},
+{ 125, 1075151824u, 1167721978u, 0u, 399u, 1493533648u, 1167721978u, 0, LDEXP_TOLERANCE, 0},
+{ 126, 1064708193u, 2181267016u, 0u, 42u, 1108748385u, 2181267016u, 0, LDEXP_TOLERANCE, 0},
+{ 127, 1077871417u, 2549219008u, 0u, 424u, 1522467641u, 2549219008u, 0, LDEXP_TOLERANCE, 0},
+{ 128, 3198004943u, 1792969424u, 0u, 225u, 3433934543u, 1792969424u, 0, LDEXP_TOLERANCE, 0},
+{ 129, 3216855791u, 1978756209u, 0u, 494u, 3734852335u, 1978756209u, 0, LDEXP_TOLERANCE, 0},
+{ 130, 1077949895u, 2382114971u, 0u, 63u, 1144010183u, 2382114971u, 0, LDEXP_TOLERANCE, 0},
+{ 131, 3195894477u, 514482752u, 0u, 472u, 3690822349u, 514482752u, 0, LDEXP_TOLERANCE, 0},
+{ 132, 3242413319u, 543068462u, 0u, 443u, 3706932487u, 543068462u, 0, LDEXP_TOLERANCE, 0},
+{ 133, 3204701180u, 2652073890u, 0u, 199u, 3413367804u, 2652073890u, 0, LDEXP_TOLERANCE, 0},
+{ 134, 1061328546u, 1489535917u, 0u, 473u, 1557304994u, 1489535917u, 0, LDEXP_TOLERANCE, 0},
+{ 135, 1052674720u, 3229843554u, 0u, 441u, 1515096736u, 3229843554u, 0, LDEXP_TOLERANCE, 0},
+{ 136, 1097158000u, 173134582u, 0u, 79u, 1179995504u, 173134582u, 0, LDEXP_TOLERANCE, 0},
+{ 137, 3237498591u, 1923844009u, 0u, 176u, 3422047967u, 1923844009u, 0, LDEXP_TOLERANCE, 0},
+{ 138, 3224533985u, 668606628u, 0u, 441u, 3686956001u, 668606628u, 0, LDEXP_TOLERANCE, 0},
+{ 139, 1068442768u, 582256337u, 0u, 144u, 1219437712u, 582256337u, 0, LDEXP_TOLERANCE, 0},
+{ 140, 3213406340u, 1255215774u, 0u, 169u, 3390615684u, 1255215774u, 0, LDEXP_TOLERANCE, 0},
+{ 141, 3206436910u, 3262514920u, 0u, 401u, 3626915886u, 3262514920u, 0, LDEXP_TOLERANCE, 0},
+{ 142, 3211518779u, 2001934786u, 0u, 8u, 3219907387u, 2001934786u, 0, LDEXP_TOLERANCE, 0},
+{ 143, 3198655042u, 3323394293u, 0u, 424u, 3643251266u, 3323394293u, 0, LDEXP_TOLERANCE, 0},
+{ 144, 1102056915u, 2833190961u, 0u, 141u, 1249906131u, 2833190961u, 0, LDEXP_TOLERANCE, 0},
+{ 145, 3206978856u, 845263327u, 0u, 219u, 3436617000u, 845263327u, 0, LDEXP_TOLERANCE, 0},
+{ 146, 1075424006u, 3731374023u, 0u, 315u, 1405725446u, 3731374023u, 0, LDEXP_TOLERANCE, 0},
+{ 147, 1079280993u, 917682262u, 0u, 98u, 1182041441u, 917682262u, 0, LDEXP_TOLERANCE, 0},
+{ 148, 3241806761u, 233010859u, 0u, 477u, 3741977513u, 233010859u, 0, LDEXP_TOLERANCE, 0},
+{ 149, 3235133813u, 2553517871u, 0u, 397u, 3651418485u, 2553517871u, 0, LDEXP_TOLERANCE, 0},
+{ 150, 3207128644u, 1115950480u, 0u, 186u, 3402163780u, 1115950480u, 0, LDEXP_TOLERANCE, 0},
+{ 151, 3204087297u, 2664821947u, 0u, 239u, 3454696961u, 2664821947u, 0, LDEXP_TOLERANCE, 0},
+{ 152, 1071548167u, 3557912224u, 0u, 384u, 1474201351u, 3557912224u, 0, LDEXP_TOLERANCE, 0},
+{ 153, 1081218889u, 2614232599u, 0u, 397u, 1497503561u, 2614232599u, 0, LDEXP_TOLERANCE, 0},
+{ 154, 3216359929u, 1186945904u, 0u, 6u, 3222651385u, 1186945904u, 0, LDEXP_TOLERANCE, 0},
+{ 155, 3239606498u, 829492767u, 0u, 92u, 3336075490u, 829492767u, 0, LDEXP_TOLERANCE, 0},
+{ 156, 3226435447u, 2285296565u, 0u, 124u, 3356458871u, 2285296565u, 0, LDEXP_TOLERANCE, 0},
+{ 157, 1055298632u, 2224685509u, 0u, 351u, 1423348808u, 2224685509u, 0, LDEXP_TOLERANCE, 0},
+{ 158, 1079682185u, 2193774608u, 0u, 373u, 1470801033u, 2193774608u, 0, LDEXP_TOLERANCE, 0},
+{ 159, 1043796692u, 2811972465u, 0u, 360u, 1421284052u, 2811972465u, 0, LDEXP_TOLERANCE, 0},
+{ 160, 3190948438u, 1320866227u, 0u, 55u, 3248620118u, 1320866227u, 0, LDEXP_TOLERANCE, 0},
+{ 161, 3204972194u, 309600080u, 0u, 150u, 3362258594u, 309600080u, 0, LDEXP_TOLERANCE, 0},
+{ 162, 3247074394u, 4153979484u, 0u, 45u, 3294260314u, 4153979484u, 0, LDEXP_TOLERANCE, 0},
+{ 163, 3245817826u, 4108948538u, 0u, 12u, 3258400738u, 4108948538u, 0, LDEXP_TOLERANCE, 0},
+{ 164, 3214264384u, 1462119906u, 0u, 294u, 3522545728u, 1462119906u, 0, LDEXP_TOLERANCE, 0},
+{ 165, 3197805498u, 3712598596u, 0u, 84u, 3285885882u, 3712598596u, 0, LDEXP_TOLERANCE, 0},
+{ 166, 1067754068u, 3317653467u, 0u, 441u, 1530176084u, 3317653467u, 0, LDEXP_TOLERANCE, 0},
+{ 167, 3205582754u, 2014267986u, 0u, 326u, 3547418530u, 2014267986u, 0, LDEXP_TOLERANCE, 0},
+{ 168, 3249218409u, 3614018702u, 0u, 313u, 3577422697u, 3614018702u, 0, LDEXP_TOLERANCE, 0},
+{ 169, 3229701513u, 2650850527u, 0u, 332u, 3577828745u, 2650850527u, 0, LDEXP_TOLERANCE, 0},
+{ 170, 3225393003u, 2146825072u, 0u, 43u, 3270481771u, 2146825072u, 0, LDEXP_TOLERANCE, 0},
+{ 171, 1090587893u, 3181518164u, 0u, 394u, 1503726837u, 3181518164u, 0, LDEXP_TOLERANCE, 0},
+{ 172, 1083643710u, 311336721u, 0u, 16u, 1100420926u, 311336721u, 0, LDEXP_TOLERANCE, 0},
+{ 173, 1045850005u, 536548906u, 0u, 136u, 1188456341u, 536548906u, 0, LDEXP_TOLERANCE, 0},
+{ 174, 1093294119u, 493054331u, 0u, 458u, 1573541927u, 493054331u, 0, LDEXP_TOLERANCE, 0},
+{ 175, 1059637485u, 1636490194u, 0u, 59u, 1121503469u, 1636490194u, 0, LDEXP_TOLERANCE, 0},
+{ 176, 1051839122u, 1496609373u, 0u, 419u, 1491192466u, 1496609373u, 0, LDEXP_TOLERANCE, 0},
+{ 177, 3217713352u, 4047547022u, 0u, 40u, 3259656392u, 4047547022u, 0, LDEXP_TOLERANCE, 0},
+{ 178, 1052826789u, 1743733981u, 0u, 236u, 1300290725u, 1743733981u, 0, LDEXP_TOLERANCE, 0},
+{ 179, 3239738856u, 1894485819u, 0u, 206u, 3455745512u, 1894485819u, 0, LDEXP_TOLERANCE, 0},
+{ 180, 3241794374u, 3239269504u, 0u, 301u, 3557415750u, 3239269504u, 0, LDEXP_TOLERANCE, 0},
+{ 181, 1082295059u, 2514398118u, 0u, 320u, 1417839379u, 2514398118u, 0, LDEXP_TOLERANCE, 0},
+{ 182, 3239385933u, 2805194172u, 0u, 460u, 3721730893u, 2805194172u, 0, LDEXP_TOLERANCE, 0},
+{ 183, 1046578695u, 88098545u, 0u, 342u, 1405191687u, 88098545u, 0, LDEXP_TOLERANCE, 0},
+{ 184, 3234688596u, 2841362123u, 0u, 402u, 3656216148u, 2841362123u, 0, LDEXP_TOLERANCE, 0},
+{ 185, 1074460694u, 2662035051u, 0u, 251u, 1337653270u, 2662035051u, 0, LDEXP_TOLERANCE, 0},
+{ 186, 1107283576u, 1757901351u, 0u, 14u, 1121963640u, 1757901351u, 0, LDEXP_TOLERANCE, 0},
+{ 187, 3246529140u, 1690749449u, 0u, 259u, 3518110324u, 1690749449u, 0, LDEXP_TOLERANCE, 0},
+{ 188, 3205695979u, 452086895u, 0u, 290u, 3509783019u, 452086895u, 0, LDEXP_TOLERANCE, 0},
+{ 189, 3245113300u, 3993463847u, 0u, 367u, 3629940692u, 3993463847u, 0, LDEXP_TOLERANCE, 0},
+{ 190, 1081866822u, 2441536203u, 0u, 276u, 1371273798u, 2441536203u, 0, LDEXP_TOLERANCE, 0},
+{ 191, 1069205029u, 2446986142u, 0u, 436u, 1526384165u, 2446986142u, 0, LDEXP_TOLERANCE, 0},
+{ 192, 1100226690u, 3561788365u, 0u, 90u, 1194598530u, 3561788365u, 0, LDEXP_TOLERANCE, 0},
+{ 193, 3217905473u, 2182131707u, 0u, 49u, 3269285697u, 2182131707u, 0, LDEXP_TOLERANCE, 0},
+{ 194, 1074481825u, 1411649658u, 0u, 265u, 1352354465u, 1411649658u, 0, LDEXP_TOLERANCE, 0},
+{ 195, 1098423846u, 1729843483u, 0u, 213u, 1321770534u, 1729843483u, 0, LDEXP_TOLERANCE, 0},
+{ 196, 3206635099u, 3105740969u, 0u, 255u, 3474021979u, 3105740969u, 0, LDEXP_TOLERANCE, 0},
+{ 197, 1069626394u, 395560434u, 0u, 447u, 1538339866u, 395560434u, 0, LDEXP_TOLERANCE, 0},
+{ 198, 1096244467u, 3644230845u, 0u, 166u, 1270308083u, 3644230845u, 0, LDEXP_TOLERANCE, 0},
+{ 199, 1065716026u, 120488169u, 0u, 345u, 1427474746u, 120488169u, 0, LDEXP_TOLERANCE, 0},
+{ 200, 3239481707u, 1635144910u, 0u, 12u, 3252064619u, 1635144910u, 0, LDEXP_TOLERANCE, 0},
+{ 201, 3188033119u, 3901916594u, 0u, 55u, 3245704799u, 3901916594u, 0, LDEXP_TOLERANCE, 0},
+{ 202, 1048893172u, 1520233772u, 0u, 138u, 1193596660u, 1520233772u, 0, LDEXP_TOLERANCE, 0},
+{ 203, 3243444050u, 2174480394u, 0u, 427u, 3691186002u, 2174480394u, 0, LDEXP_TOLERANCE, 0},
+{ 204, 3227041648u, 2170587119u, 0u, 22u, 3250110320u, 2170587119u, 0, LDEXP_TOLERANCE, 0},
+{ 205, 1058401310u, 1861796818u, 0u, 202u, 1270213662u, 1861796818u, 0, LDEXP_TOLERANCE, 0},
+{ 206, 3226315730u, 3847770185u, 0u, 380u, 3624774610u, 3847770185u, 0, LDEXP_TOLERANCE, 0},
+{ 207, 1069595396u, 541754047u, 0u, 233u, 1313913604u, 541754047u, 0, LDEXP_TOLERANCE, 0},
+{ 208, 3212663474u, 272319256u, 0u, 131u, 3350026930u, 272319256u, 0, LDEXP_TOLERANCE, 0},
+{ 209, 1059284620u, 3096749920u, 0u, 483u, 1565746828u, 3096749920u, 0, LDEXP_TOLERANCE, 0},
+{ 210, 1076067883u, 2272922429u, 0u, 352u, 1445166635u, 2272922429u, 0, LDEXP_TOLERANCE, 0},
+{ 211, 3230247604u, 3220743043u, 0u, 231u, 3472468660u, 3220743043u, 0, LDEXP_TOLERANCE, 0},
+{ 212, 1050651323u, 2300380149u, 0u, 114u, 1170188987u, 2300380149u, 0, LDEXP_TOLERANCE, 0},
+{ 213, 1072722410u, 2437243415u, 0u, 305u, 1392538090u, 2437243415u, 0, LDEXP_TOLERANCE, 0},
+{ 214, 3231053247u, 3661627618u, 0u, 79u, 3313890751u, 3661627618u, 0, LDEXP_TOLERANCE, 0},
+{ 215, 1041819430u, 1831574607u, 0u, 120u, 1167648550u, 1831574607u, 0, LDEXP_TOLERANCE, 0},
+{ 216, 3236399793u, 2527076176u, 0u, 260u, 3509029553u, 2527076176u, 0, LDEXP_TOLERANCE, 0},
+{ 217, 3195290997u, 2676398686u, 0u, 117u, 3317974389u, 2676398686u, 0, LDEXP_TOLERANCE, 0},
+{ 218, 3193437916u, 1339584035u, 0u, 123u, 3322412764u, 1339584035u, 0, LDEXP_TOLERANCE, 0},
+{ 219, 1095503867u, 3529401650u, 0u, 40u, 1137446907u, 3529401650u, 0, LDEXP_TOLERANCE, 0},
+{ 220, 1048913359u, 263139465u, 0u, 226u, 1285891535u, 263139465u, 0, LDEXP_TOLERANCE, 0},
+{ 221, 3234381459u, 2044871840u, 0u, 275u, 3522739859u, 2044871840u, 0, LDEXP_TOLERANCE, 0},
+{ 222, 1103621815u, 1760748810u, 0u, 143u, 1253568183u, 1760748810u, 0, LDEXP_TOLERANCE, 0},
+{ 223, 3233696138u, 3631905577u, 0u, 59u, 3295562122u, 3631905577u, 0, LDEXP_TOLERANCE, 0},
+{ 224, 1090844360u, 895635283u, 0u, 327u, 1433728712u, 895635283u, 0, LDEXP_TOLERANCE, 0},
+{ 225, 3211740211u, 3230452686u, 0u, 315u, 3542041651u, 3230452686u, 0, LDEXP_TOLERANCE, 0},
+{ 226, 1075422810u, 1864139509u, 0u, 202u, 1287235162u, 1864139509u, 0, LDEXP_TOLERANCE, 0},
+{ 227, 1091534863u, 3652704631u, 0u, 282u, 1387233295u, 3652704631u, 0, LDEXP_TOLERANCE, 0},
+{ 228, 1055756112u, 945524907u, 0u, 417u, 1493012304u, 945524907u, 0, LDEXP_TOLERANCE, 0},
+{ 229, 1042592415u, 3193385121u, 0u, 459u, 1523888799u, 3193385121u, 0, LDEXP_TOLERANCE, 0},
+{ 230, 1097323612u, 2009367488u, 0u, 361u, 1475859548u, 2009367488u, 0, LDEXP_TOLERANCE, 0},
+{ 231, 1080597180u, 424248253u, 0u, 445u, 1547213500u, 424248253u, 0, LDEXP_TOLERANCE, 0},
+{ 232, 1042985978u, 1729313551u, 0u, 74u, 1120580602u, 1729313551u, 0, LDEXP_TOLERANCE, 0},
+{ 233, 1052968515u, 262785866u, 0u, 366u, 1436747331u, 262785866u, 0, LDEXP_TOLERANCE, 0},
+{ 234, 3201825802u, 1027600628u, 0u, 222u, 3434609674u, 1027600628u, 0, LDEXP_TOLERANCE, 0},
+{ 235, 3189614508u, 2863482262u, 0u, 205u, 3404572588u, 2863482262u, 0, LDEXP_TOLERANCE, 0},
+{ 236, 1087207520u, 2536788461u, 0u, 408u, 1515026528u, 2536788461u, 0, LDEXP_TOLERANCE, 0},
+{ 237, 3220884452u, 1052878591u, 0u, 219u, 3450522596u, 1052878591u, 0, LDEXP_TOLERANCE, 0},
+{ 238, 1050895039u, 3686077741u, 0u, 270u, 1334010559u, 3686077741u, 0, LDEXP_TOLERANCE, 0},
+{ 239, 1072905134u, 3151697799u, 0u, 450u, 1544764334u, 3151697799u, 0, LDEXP_TOLERANCE, 0},
+{ 240, 3199889853u, 3750592285u, 0u, 80u, 3283775933u, 3750592285u, 0, LDEXP_TOLERANCE, 0},
+{ 241, 3195141686u, 524180329u, 0u, 335u, 3546414646u, 524180329u, 0, LDEXP_TOLERANCE, 0},
+{ 242, 3237769823u, 549692228u, 0u, 429u, 3687608927u, 549692228u, 0, LDEXP_TOLERANCE, 0},
+{ 243, 1044977851u, 123460729u, 0u, 325u, 1385765051u, 123460729u, 0, LDEXP_TOLERANCE, 0},
+{ 244, 1103902874u, 3456203663u, 0u, 454u, 1579956378u, 3456203663u, 0, LDEXP_TOLERANCE, 0},
+{ 245, 3221154648u, 2341156808u, 0u, 369u, 3608079192u, 2341156808u, 0, LDEXP_TOLERANCE, 0},
+{ 246, 1089754623u, 3952801936u, 0u, 43u, 1134843391u, 3952801936u, 0, LDEXP_TOLERANCE, 0},
+{ 247, 3207212058u, 563170079u, 0u, 150u, 3364498458u, 563170079u, 0, LDEXP_TOLERANCE, 0},
+{ 248, 3225869468u, 1535381711u, 0u, 384u, 3628522652u, 1535381711u, 0, LDEXP_TOLERANCE, 0},
+{ 249, 1054391309u, 4072415576u, 0u, 9u, 1063828493u, 4072415576u, 0, LDEXP_TOLERANCE, 0},
+{ 250, 3209063031u, 3109049640u, 0u, 91u, 3304483447u, 3109049640u, 0, LDEXP_TOLERANCE, 0},
+{ 251, 3218136187u, 2738823198u, 0u, 33u, 3252739195u, 2738823198u, 0, LDEXP_TOLERANCE, 0},
+{ 252, 1061175490u, 1144180871u, 0u, 106u, 1172324546u, 1144180871u, 0, LDEXP_TOLERANCE, 0},
+{ 253, 1096418100u, 1619819023u, 0u, 54u, 1153041204u, 1619819023u, 0, LDEXP_TOLERANCE, 0},
+{ 254, 1071954071u, 2285696073u, 0u, 430u, 1522841751u, 2285696073u, 0, LDEXP_TOLERANCE, 0},
+{ 255, 1072459589u, 1537999144u, 0u, 464u, 1558998853u, 1537999144u, 0, LDEXP_TOLERANCE, 0},
+{ 256, 3235749098u, 157845884u, 0u, 443u, 3700268266u, 157845884u, 0, LDEXP_TOLERANCE, 0},
+{ 257, 3222630024u, 232194256u, 0u, 125u, 3353702024u, 232194256u, 0, LDEXP_TOLERANCE, 0},
+{ 258, 3241510667u, 1984016330u, 0u, 187u, 3437594379u, 1984016330u, 0, LDEXP_TOLERANCE, 0},
+{ 259, 1076548691u, 4276701845u, 0u, 160u, 1244320851u, 4276701845u, 0, LDEXP_TOLERANCE, 0},
+{ 260, 1093262183u, 458381635u, 0u, 32u, 1126816615u, 458381635u, 0, LDEXP_TOLERANCE, 0},
+{ 261, 3217410826u, 2931856236u, 0u, 5u, 3222653706u, 2931856236u, 0, LDEXP_TOLERANCE, 0},
+{ 262, 3188629767u, 978126928u, 0u, 295u, 3497959687u, 978126928u, 0, LDEXP_TOLERANCE, 0},
+{ 263, 3222362209u, 1190217203u, 0u, 457u, 3701561441u, 1190217203u, 0, LDEXP_TOLERANCE, 0},
+{ 264, 3219622048u, 3145593339u, 0u, 490u, 3733424288u, 3145593339u, 0, LDEXP_TOLERANCE, 0},
+{ 265, 1085737474u, 637782232u, 0u, 393u, 1497827842u, 637782232u, 0, LDEXP_TOLERANCE, 0},
+{ 266, 1063416038u, 2567938216u, 0u, 233u, 1307734246u, 2567938216u, 0, LDEXP_TOLERANCE, 0},
+{ 267, 3245869330u, 1885951730u, 0u, 220u, 3476556050u, 1885951730u, 0, LDEXP_TOLERANCE, 0},
+{ 268, 3207806174u, 2553919637u, 0u, 157u, 3372432606u, 2553919637u, 0, LDEXP_TOLERANCE, 0},
+{ 269, 3247429520u, 2146563695u, 0u, 146u, 3400521616u, 2146563695u, 0, LDEXP_TOLERANCE, 0},
+{ 270, 1061008451u, 1671615226u, 0u, 151u, 1219343427u, 1671615226u, 0, LDEXP_TOLERANCE, 0},
+{ 271, 1076028796u, 3859211180u, 0u, 219u, 1305666940u, 3859211180u, 0, LDEXP_TOLERANCE, 0},
+{ 272, 1072363386u, 1650981745u, 0u, 51u, 1125840762u, 1650981745u, 0, LDEXP_TOLERANCE, 0},
+{ 273, 1068183512u, 1475114165u, 0u, 177u, 1253781464u, 1475114165u, 0, LDEXP_TOLERANCE, 0},
+{ 274, 1097775870u, 2570983571u, 0u, 19u, 1117698814u, 2570983571u, 0, LDEXP_TOLERANCE, 0},
+{ 275, 3249504174u, 4161096849u, 0u, 207u, 3466559406u, 4161096849u, 0, LDEXP_TOLERANCE, 0},
+{ 276, 1107277558u, 4024344323u, 0u, 272u, 1392490230u, 4024344323u, 0, LDEXP_TOLERANCE, 0},
+{ 277, 3238437161u, 2611187549u, 0u, 97u, 3340149033u, 2611187549u, 0, LDEXP_TOLERANCE, 0},
+{ 278, 1045834828u, 3078509746u, 0u, 63u, 1111895116u, 3078509746u, 0, LDEXP_TOLERANCE, 0},
+{ 279, 1089189384u, 2227116198u, 0u, 109u, 1203484168u, 2227116198u, 0, LDEXP_TOLERANCE, 0},
+{ 280, 1080684976u, 1472665012u, 0u, 366u, 1464463792u, 1472665012u, 0, LDEXP_TOLERANCE, 0},
+{ 281, 1080318978u, 3071232825u, 0u, 488u, 1592024066u, 3071232825u, 0, LDEXP_TOLERANCE, 0},
+{ 282, 3205503940u, 437403482u, 0u, 267u, 3485473732u, 437403482u, 0, LDEXP_TOLERANCE, 0},
+{ 283, 1062227791u, 4288608311u, 0u, 270u, 1345343311u, 4288608311u, 0, LDEXP_TOLERANCE, 0},
+{ 284, 1044502599u, 349540356u, 0u, 19u, 1064425543u, 349540356u, 0, LDEXP_TOLERANCE, 0},
+{ 285, 1043598726u, 944335909u, 0u, 297u, 1355025798u, 944335909u, 0, LDEXP_TOLERANCE, 0},
+{ 286, 1051582533u, 2123384287u, 0u, 71u, 1126031429u, 2123384287u, 0, LDEXP_TOLERANCE, 0},
+{ 287, 3198090050u, 2528390848u, 0u, 251u, 3461282626u, 2528390848u, 0, LDEXP_TOLERANCE, 0},
+{ 288, 3240457093u, 132926909u, 0u, 67u, 3310711685u, 132926909u, 0, LDEXP_TOLERANCE, 0},
+{ 289, 3246632231u, 40413554u, 0u, 24u, 3271798055u, 40413554u, 0, LDEXP_TOLERANCE, 0},
+{ 290, 3200875834u, 3443172377u, 0u, 470u, 3693706554u, 3443172377u, 0, LDEXP_TOLERANCE, 0},
+{ 291, 1081721846u, 373222953u, 0u, 163u, 1252639734u, 373222953u, 0, LDEXP_TOLERANCE, 0},
+{ 292, 3194233874u, 2533101358u, 0u, 78u, 3276022802u, 2533101358u, 0, LDEXP_TOLERANCE, 0},
+{ 293, 3234400000u, 1020015106u, 0u, 458u, 3714647808u, 1020015106u, 0, LDEXP_TOLERANCE, 0},
+{ 294, 1097650417u, 4175026874u, 0u, 175u, 1281151217u, 4175026874u, 0, LDEXP_TOLERANCE, 0},
+{ 295, 3217062816u, 3412658638u, 0u, 18u, 3235937184u, 3412658638u, 0, LDEXP_TOLERANCE, 0},
+{ 296, 1041317040u, 3644551949u, 0u, 286u, 1341209776u, 3644551949u, 0, LDEXP_TOLERANCE, 0},
+{ 297, 1097752504u, 778944340u, 0u, 426u, 1544445880u, 778944340u, 0, LDEXP_TOLERANCE, 0},
+{ 298, 1067680885u, 937732557u, 0u, 71u, 1142129781u, 937732557u, 0, LDEXP_TOLERANCE, 0},
+{ 299, 1086736464u, 2862118510u, 0u, 461u, 1570130000u, 2862118510u, 0, LDEXP_TOLERANCE, 0},
+{ 300, 1096901686u, 850134980u, 0u, 211u, 1318151222u, 850134980u, 0, LDEXP_TOLERANCE, 0},
+{ 301, 3251210973u, 4095059472u, 0u, 442u, 3714681565u, 4095059472u, 0, LDEXP_TOLERANCE, 0},
+{ 302, 3245779466u, 1314480053u, 0u, 144u, 3396774410u, 1314480053u, 0, LDEXP_TOLERANCE, 0},
+{ 303, 1090422995u, 2303828445u, 0u, 388u, 1497270483u, 2303828445u, 0, LDEXP_TOLERANCE, 0},
+{ 304, 1096895426u, 3882733009u, 0u, 191u, 1297173442u, 3882733009u, 0, LDEXP_TOLERANCE, 0},
+{ 305, 1089588191u, 2009174302u, 0u, 496u, 1609681887u, 2009174302u, 0, LDEXP_TOLERANCE, 0},
+{ 306, 1097495331u, 312449728u, 0u, 173u, 1278898979u, 312449728u, 0, LDEXP_TOLERANCE, 0},
+{ 307, 1049684114u, 1160162008u, 0u, 212u, 1271982226u, 1160162008u, 0, LDEXP_TOLERANCE, 0},
+{ 308, 3209944762u, 670974566u, 0u, 343u, 3569606330u, 670974566u, 0, LDEXP_TOLERANCE, 0},
+{ 309, 3221122343u, 2051675610u, 0u, 390u, 3630066983u, 2051675610u, 0, LDEXP_TOLERANCE, 0},
+{ 310, 1042941085u, 1098012699u, 0u, 155u, 1205470365u, 1098012699u, 0, LDEXP_TOLERANCE, 0},
+{ 311, 3198635158u, 2576510619u, 0u, 399u, 3617016982u, 2576510619u, 0, LDEXP_TOLERANCE, 0},
+{ 312, 1093732734u, 2212627257u, 0u, 220u, 1324419454u, 2212627257u, 0, LDEXP_TOLERANCE, 0},
+{ 313, 1079731753u, 2815026996u, 0u, 352u, 1448830505u, 2815026996u, 0, LDEXP_TOLERANCE, 0},
+{ 314, 1057143242u, 908275876u, 0u, 334u, 1407367626u, 908275876u, 0, LDEXP_TOLERANCE, 0},
+{ 315, 3228249088u, 4054744334u, 0u, 389u, 3636145152u, 4054744334u, 0, LDEXP_TOLERANCE, 0},
+{ 316, 1051974004u, 749718883u, 0u, 80u, 1135860084u, 749718883u, 0, LDEXP_TOLERANCE, 0},
+{ 317, 3214025736u, 4166701781u, 0u, 480u, 3717342216u, 4166701781u, 0, LDEXP_TOLERANCE, 0},
+{ 318, 1066562662u, 3849549110u, 0u, 336u, 1418884198u, 3849549110u, 0, LDEXP_TOLERANCE, 0},
+{ 319, 3191009014u, 3648637481u, 0u, 438u, 3650285302u, 3648637481u, 0, LDEXP_TOLERANCE, 0},
+{ 320, 3205610460u, 229827507u, 0u, 298u, 3518086108u, 229827507u, 0, LDEXP_TOLERANCE, 0},
+{ 321, 1096643939u, 4161699205u, 0u, 413u, 1529705827u, 4161699205u, 0, LDEXP_TOLERANCE, 0},
+{ 322, 3195639002u, 2610757921u, 0u, 297u, 3507066074u, 2610757921u, 0, LDEXP_TOLERANCE, 0},
+{ 323, 1101813983u, 545051245u, 0u, 68u, 1173117151u, 545051245u, 0, LDEXP_TOLERANCE, 0},
+{ 324, 3220046694u, 3097521578u, 0u, 11u, 3231581030u, 3097521578u, 0, LDEXP_TOLERANCE, 0},
+{ 325, 3216630070u, 1141349287u, 0u, 485u, 3725189430u, 1141349287u, 0, LDEXP_TOLERANCE, 0},
+{ 326, 3236866557u, 3586841689u, 0u, 44u, 3283003901u, 3586841689u, 0, LDEXP_TOLERANCE, 0},
+{ 327, 1089595934u, 2642699773u, 0u, 52u, 1144121886u, 2642699773u, 0, LDEXP_TOLERANCE, 0},
+{ 328, 3233606825u, 1521902674u, 0u, 334u, 3583831209u, 1521902674u, 0, LDEXP_TOLERANCE, 0},
+{ 329, 1066370780u, 1166542459u, 0u, 333u, 1415546588u, 1166542459u, 0, LDEXP_TOLERANCE, 0},
+{ 330, 3220123386u, 2769313057u, 0u, 150u, 3377409786u, 2769313057u, 0, LDEXP_TOLERANCE, 0},
+{ 331, 1098471976u, 1840369334u, 0u, 14u, 1113152040u, 1840369334u, 0, LDEXP_TOLERANCE, 0},
+{ 332, 3252677278u, 2567854096u, 0u, 248u, 3512724126u, 2567854096u, 0, LDEXP_TOLERANCE, 0},
+{ 333, 1070061501u, 1222383416u, 0u, 474u, 1567086525u, 1222383416u, 0, LDEXP_TOLERANCE, 0},
+{ 334, 3207981719u, 1270950554u, 0u, 256u, 3476417175u, 1270950554u, 0, LDEXP_TOLERANCE, 0},
+{ 335, 1041332729u, 131817720u, 0u, 452u, 1515289081u, 131817720u, 0, LDEXP_TOLERANCE, 0},
+{ 336, 1043119240u, 1962885016u, 0u, 374u, 1435286664u, 1962885016u, 0, LDEXP_TOLERANCE, 0},
+{ 337, 3218047470u, 3052053491u, 0u, 468u, 3708781038u, 3052053491u, 0, LDEXP_TOLERANCE, 0},
+{ 338, 1066224243u, 4082134039u, 0u, 227u, 1304250995u, 4082134039u, 0, LDEXP_TOLERANCE, 0},
+{ 339, 3203939696u, 1286929228u, 0u, 35u, 3240639856u, 1286929228u, 0, LDEXP_TOLERANCE, 0},
+{ 340, 3202852071u, 1723150716u, 0u, 177u, 3388450023u, 1723150716u, 0, LDEXP_TOLERANCE, 0},
+{ 341, 3228645956u, 3351728246u, 0u, 228u, 3467721284u, 3351728246u, 0, LDEXP_TOLERANCE, 0},
+{ 342, 1081598008u, 3664833573u, 0u, 167u, 1256710200u, 3664833573u, 0, LDEXP_TOLERANCE, 0},
+{ 343, 1104965247u, 143071571u, 0u, 448u, 1574727295u, 143071571u, 0, LDEXP_TOLERANCE, 0},
+{ 344, 1050966579u, 2318822594u, 0u, 195u, 1255438899u, 2318822594u, 0, LDEXP_TOLERANCE, 0},
+{ 345, 1093372204u, 709906874u, 0u, 330u, 1439402284u, 709906874u, 0, LDEXP_TOLERANCE, 0},
+{ 346, 3231728166u, 566369690u, 0u, 261u, 3505406502u, 566369690u, 0, LDEXP_TOLERANCE, 0},
+{ 347, 3216582391u, 4025642424u, 0u, 291u, 3521718007u, 4025642424u, 0, LDEXP_TOLERANCE, 0},
+{ 348, 1062802257u, 1894196767u, 0u, 383u, 1464406865u, 1894196767u, 0, LDEXP_TOLERANCE, 0},
+{ 349, 3245017107u, 3370316038u, 0u, 355u, 3617261587u, 3370316038u, 0, LDEXP_TOLERANCE, 0},
+{ 350, 3243448963u, 472093737u, 0u, 342u, 3602061955u, 472093737u, 0, LDEXP_TOLERANCE, 0},
+{ 351, 1075652455u, 1775629954u, 0u, 415u, 1510811495u, 1775629954u, 0, LDEXP_TOLERANCE, 0},
+{ 352, 1072748883u, 130452005u, 0u, 460u, 1555093843u, 130452005u, 0, LDEXP_TOLERANCE, 0},
+{ 353, 1103299779u, 947955476u, 0u, 82u, 1189283011u, 947955476u, 0, LDEXP_TOLERANCE, 0},
+{ 354, 1101236445u, 2334159798u, 0u, 108u, 1214482653u, 2334159798u, 0, LDEXP_TOLERANCE, 0},
+{ 355, 1070535958u, 4123069999u, 0u, 150u, 1227822358u, 4123069999u, 0, LDEXP_TOLERANCE, 0},
+{ 356, 1089976512u, 2465499154u, 0u, 266u, 1368897728u, 2465499154u, 0, LDEXP_TOLERANCE, 0},
+{ 357, 3201817089u, 1593603389u, 0u, 407u, 3628587521u, 1593603389u, 0, LDEXP_TOLERANCE, 0},
+{ 358, 1047787098u, 2933875948u, 0u, 108u, 1161033306u, 2933875948u, 0, LDEXP_TOLERANCE, 0},
+{ 359, 1079279810u, 1807691639u, 0u, 444u, 1544847554u, 1807691639u, 0, LDEXP_TOLERANCE, 0},
+{ 360, 1043880753u, 3730428641u, 0u, 463u, 1529371441u, 3730428641u, 0, LDEXP_TOLERANCE, 0},
+{ 361, 1096723626u, 3360816360u, 0u, 427u, 1544465578u, 3360816360u, 0, LDEXP_TOLERANCE, 0},
+{ 362, 3197488312u, 1678396836u, 0u, 238u, 3447049400u, 1678396836u, 0, LDEXP_TOLERANCE, 0},
+{ 363, 3226762726u, 424413376u, 0u, 258u, 3497295334u, 424413376u, 0, LDEXP_TOLERANCE, 0},
+{ 364, 1080633926u, 3716185739u, 0u, 187u, 1276717638u, 3716185739u, 0, LDEXP_TOLERANCE, 0},
+{ 365, 3204867490u, 3920379359u, 0u, 431u, 3656803746u, 3920379359u, 0, LDEXP_TOLERANCE, 0},
+{ 366, 3215772443u, 1323631105u, 0u, 191u, 3416050459u, 1323631105u, 0, LDEXP_TOLERANCE, 0},
+{ 367, 1050683091u, 2514548244u, 0u, 173u, 1232086739u, 2514548244u, 0, LDEXP_TOLERANCE, 0},
+{ 368, 3239000308u, 1788218301u, 0u, 34u, 3274651892u, 1788218301u, 0, LDEXP_TOLERANCE, 0},
+{ 369, 3237555984u, 1830011528u, 0u, 319u, 3572051728u, 1830011528u, 0, LDEXP_TOLERANCE, 0},
+{ 370, 1092971882u, 513397822u, 0u, 220u, 1323658602u, 513397822u, 0, LDEXP_TOLERANCE, 0},
+{ 371, 3195171314u, 444369027u, 0u, 36u, 3232920050u, 444369027u, 0, LDEXP_TOLERANCE, 0},
+{ 372, 1090970899u, 3889472979u, 0u, 419u, 1530324243u, 3889472979u, 0, LDEXP_TOLERANCE, 0},
+{ 373, 1057363231u, 2309685487u, 0u, 378u, 1453724959u, 2309685487u, 0, LDEXP_TOLERANCE, 0},
+{ 374, 1106459870u, 1380631766u, 0u, 437u, 1564687582u, 1380631766u, 0, LDEXP_TOLERANCE, 0},
+{ 375, 3248396473u, 428200516u, 0u, 376u, 3642661049u, 428200516u, 0, LDEXP_TOLERANCE, 0},
+{ 376, 1058529374u, 1388434855u, 0u, 328u, 1402462302u, 1388434855u, 0, LDEXP_TOLERANCE, 0},
+{ 377, 1073564525u, 1634474775u, 0u, 306u, 1394428781u, 1634474775u, 0, LDEXP_TOLERANCE, 0},
+{ 378, 3253676249u, 2523906064u, 0u, 39u, 3294570713u, 2523906064u, 0, LDEXP_TOLERANCE, 0},
+{ 379, 1081755890u, 1525260440u, 0u, 250u, 1343899890u, 1525260440u, 0, LDEXP_TOLERANCE, 0},
+{ 380, 3203074326u, 1872475395u, 0u, 108u, 3316320534u, 1872475395u, 0, LDEXP_TOLERANCE, 0},
+{ 381, 1084871394u, 3237497681u, 0u, 443u, 1549390562u, 3237497681u, 0, LDEXP_TOLERANCE, 0},
+{ 382, 3242751645u, 260260645u, 0u, 481u, 3747116701u, 260260645u, 0, LDEXP_TOLERANCE, 0},
+{ 383, 3218981444u, 4088124503u, 0u, 110u, 3334324804u, 4088124503u, 0, LDEXP_TOLERANCE, 0},
+{ 384, 1071801993u, 814008375u, 0u, 336u, 1424123529u, 814008375u, 0, LDEXP_TOLERANCE, 0},
+{ 385, 1066437805u, 3656359254u, 0u, 66u, 1135643821u, 3656359254u, 0, LDEXP_TOLERANCE, 0},
+{ 386, 3203021744u, 2817965308u, 0u, 440u, 3664395184u, 2817965308u, 0, LDEXP_TOLERANCE, 0},
+{ 387, 3230741411u, 1789555686u, 0u, 143u, 3380687779u, 1789555686u, 0, LDEXP_TOLERANCE, 0},
+{ 388, 1080923606u, 1088945233u, 0u, 95u, 1180538326u, 1088945233u, 0, LDEXP_TOLERANCE, 0},
+{ 389, 3207306559u, 1072535369u, 0u, 356u, 3580599615u, 1072535369u, 0, LDEXP_TOLERANCE, 0},
+{ 390, 1070189724u, 891892107u, 0u, 31u, 1102695580u, 891892107u, 0, LDEXP_TOLERANCE, 0},
+{ 391, 3190088451u, 2651702199u, 0u, 404u, 3613713155u, 2651702199u, 0, LDEXP_TOLERANCE, 0},
+{ 392, 1060939155u, 4016460801u, 0u, 419u, 1500292499u, 4016460801u, 0, LDEXP_TOLERANCE, 0},
+{ 393, 1045144591u, 3993557701u, 0u, 87u, 1136370703u, 3993557701u, 0, LDEXP_TOLERANCE, 0},
+{ 394, 3239768936u, 2532362633u, 0u, 260u, 3512398696u, 2532362633u, 0, LDEXP_TOLERANCE, 0},
+{ 395, 1073180085u, 3537487468u, 0u, 388u, 1480027573u, 3537487468u, 0, LDEXP_TOLERANCE, 0},
+{ 396, 3198529584u, 564216088u, 0u, 421u, 3639980080u, 564216088u, 0, LDEXP_TOLERANCE, 0},
+{ 397, 3231451722u, 144814872u, 0u, 377u, 3626764874u, 144814872u, 0, LDEXP_TOLERANCE, 0},
+{ 398, 1072709093u, 596120394u, 0u, 25u, 1098923493u, 596120394u, 0, LDEXP_TOLERANCE, 0},
+{ 399, 1067876025u, 3310262308u, 0u, 313u, 1396080313u, 3310262308u, 0, LDEXP_TOLERANCE, 0},
+{ 400, 3213074059u, 4166287959u, 0u, 332u, 3561201291u, 4166287959u, 0, LDEXP_TOLERANCE, 0},
+{ 401, 1041212112u, 3518868553u, 0u, 279u, 1333764816u, 3518868553u, 0, LDEXP_TOLERANCE, 0},
+{ 402, 1066131946u, 3173459054u, 0u, 324u, 1405870570u, 3173459054u, 0, LDEXP_TOLERANCE, 0},
+{ 403, 3202593969u, 1428731905u, 0u, 168u, 3378754737u, 1428731905u, 0, LDEXP_TOLERANCE, 0},
+{ 404, 1054790485u, 453215326u, 0u, 371u, 1443812181u, 453215326u, 0, LDEXP_TOLERANCE, 0},
+{ 405, 3200044385u, 467903731u, 0u, 183u, 3391933793u, 467903731u, 0, LDEXP_TOLERANCE, 0},
+{ 406, 1072744324u, 1813392963u, 0u, 180u, 1261488004u, 1813392963u, 0, LDEXP_TOLERANCE, 0},
+{ 407, 3227858678u, 3521174478u, 0u, 427u, 3675600630u, 3521174478u, 0, LDEXP_TOLERANCE, 0},
+{ 408, 3220431019u, 1451134835u, 0u, 159u, 3387154603u, 1451134835u, 0, LDEXP_TOLERANCE, 0},
+{ 409, 1072890925u, 478199813u, 0u, 188u, 1270023213u, 478199813u, 0, LDEXP_TOLERANCE, 0},
+{ 410, 3247518236u, 2319141545u, 0u, 182u, 3438359068u, 2319141545u, 0, LDEXP_TOLERANCE, 0},
+{ 411, 3205208241u, 468540316u, 0u, 236u, 3452672177u, 468540316u, 0, LDEXP_TOLERANCE, 0},
+{ 412, 1088186210u, 2805548583u, 0u, 80u, 1172072290u, 2805548583u, 0, LDEXP_TOLERANCE, 0},
+{ 413, 3208941801u, 3799277222u, 0u, 491u, 3723792617u, 3799277222u, 0, LDEXP_TOLERANCE, 0},
+{ 414, 1098778634u, 4116114952u, 0u, 403u, 1521354762u, 4116114952u, 0, LDEXP_TOLERANCE, 0},
+{ 415, 1089501101u, 3088319870u, 0u, 415u, 1524660141u, 3088319870u, 0, LDEXP_TOLERANCE, 0},
+{ 416, 1092033606u, 4147340419u, 0u, 424u, 1536629830u, 4147340419u, 0, LDEXP_TOLERANCE, 0},
+{ 417, 1097192134u, 2915618902u, 0u, 289u, 1400230598u, 2915618902u, 0, LDEXP_TOLERANCE, 0},
+{ 418, 1083131407u, 949573155u, 0u, 213u, 1306478095u, 949573155u, 0, LDEXP_TOLERANCE, 0},
+{ 419, 3217299226u, 953230084u, 0u, 56u, 3276019482u, 953230084u, 0, LDEXP_TOLERANCE, 0},
+{ 420, 1042658166u, 1139656827u, 0u, 464u, 1529197430u, 1139656827u, 0, LDEXP_TOLERANCE, 0},
+{ 421, 1074812004u, 1497640128u, 0u, 126u, 1206932580u, 1497640128u, 0, LDEXP_TOLERANCE, 0},
+{ 422, 1049329601u, 1399097473u, 0u, 433u, 1503363009u, 1399097473u, 0, LDEXP_TOLERANCE, 0},
+{ 423, 3206749408u, 547789874u, 0u, 431u, 3658685664u, 547789874u, 0, LDEXP_TOLERANCE, 0},
+{ 424, 1074621795u, 671680995u, 0u, 3u, 1077767523u, 671680995u, 0, LDEXP_TOLERANCE, 0},
+{ 425, 3213380440u, 2844394564u, 0u, 143u, 3363326808u, 2844394564u, 0, LDEXP_TOLERANCE, 0},
+{ 426, 3237267124u, 1206228129u, 0u, 339u, 3592734388u, 1206228129u, 0, LDEXP_TOLERANCE, 0},
+{ 427, 1048320712u, 1857527908u, 0u, 184u, 1241258696u, 1857527908u, 0, LDEXP_TOLERANCE, 0},
+{ 428, 1073593099u, 3529728583u, 0u, 248u, 1333639947u, 3529728583u, 0, LDEXP_TOLERANCE, 0},
+{ 429, 3208234855u, 1662197629u, 0u, 448u, 3677996903u, 1662197629u, 0, LDEXP_TOLERANCE, 0},
+{ 430, 3227209251u, 830911610u, 0u, 206u, 3443215907u, 830911610u, 0, LDEXP_TOLERANCE, 0},
+{ 431, 3191658671u, 3234651229u, 0u, 489u, 3704412335u, 3234651229u, 0, LDEXP_TOLERANCE, 0},
+{ 432, 1060602604u, 1595574604u, 0u, 233u, 1304920812u, 1595574604u, 0, LDEXP_TOLERANCE, 0},
+{ 433, 1060196346u, 2183973116u, 0u, 199u, 1268862970u, 2183973116u, 0, LDEXP_TOLERANCE, 0},
+{ 434, 3237212525u, 2067967151u, 0u, 187u, 3433296237u, 2067967151u, 0, LDEXP_TOLERANCE, 0},
+{ 435, 3249591914u, 4276685796u, 0u, 405u, 3674265194u, 4276685796u, 0, LDEXP_TOLERANCE, 0},
+{ 436, 1097175658u, 915990537u, 0u, 414u, 1531286122u, 915990537u, 0, LDEXP_TOLERANCE, 0},
+{ 437, 1096215811u, 3833628834u, 0u, 292u, 1402400003u, 3833628834u, 0, LDEXP_TOLERANCE, 0},
+{ 438, 1081543609u, 2711665335u, 0u, 195u, 1286015929u, 2711665335u, 0, LDEXP_TOLERANCE, 0},
+{ 439, 1103411165u, 2706155273u, 0u, 24u, 1128576989u, 2706155273u, 0, LDEXP_TOLERANCE, 0},
+{ 440, 1103403130u, 3079968054u, 0u, 241u, 1356109946u, 3079968054u, 0, LDEXP_TOLERANCE, 0},
+{ 441, 3198414665u, 2268506342u, 0u, 95u, 3298029385u, 2268506342u, 0, LDEXP_TOLERANCE, 0},
+{ 442, 1047115221u, 1909994277u, 0u, 56u, 1105835477u, 1909994277u, 0, LDEXP_TOLERANCE, 0},
+{ 443, 3220384775u, 2863812374u, 0u, 101u, 3326290951u, 2863812374u, 0, LDEXP_TOLERANCE, 0},
+{ 444, 1100817899u, 1574724647u, 0u, 234u, 1346184683u, 1574724647u, 0, LDEXP_TOLERANCE, 0},
+{ 445, 3224207486u, 2292911279u, 0u, 169u, 3401416830u, 2292911279u, 0, LDEXP_TOLERANCE, 0},
+{ 446, 3210915147u, 1990631620u, 0u, 63u, 3276975435u, 1990631620u, 0, LDEXP_TOLERANCE, 0},
+{ 447, 1102409950u, 2676261059u, 0u, 337u, 1455780062u, 2676261059u, 0, LDEXP_TOLERANCE, 0},
+{ 448, 1097873191u, 1354342308u, 0u, 178u, 1284519719u, 1354342308u, 0, LDEXP_TOLERANCE, 0},
+{ 449, 3244247065u, 1660724156u, 0u, 204u, 3458156569u, 1660724156u, 0, LDEXP_TOLERANCE, 0},
+{ 450, 1104332602u, 1642699485u, 0u, 379u, 1501742906u, 1642699485u, 0, LDEXP_TOLERANCE, 0},
+{ 451, 3250424296u, 1717672108u, 0u, 243u, 3505228264u, 1717672108u, 0, LDEXP_TOLERANCE, 0},
+{ 452, 1104754957u, 287287829u, 0u, 96u, 1205418253u, 287287829u, 0, LDEXP_TOLERANCE, 0},
+{ 453, 1041630773u, 1858851717u, 0u, 84u, 1129711157u, 1858851717u, 0, LDEXP_TOLERANCE, 0},
+{ 454, 3214257433u, 751088586u, 0u, 320u, 3549801753u, 751088586u, 0, LDEXP_TOLERANCE, 0},
+{ 455, 3220003982u, 1397652531u, 0u, 257u, 3489488014u, 1397652531u, 0, LDEXP_TOLERANCE, 0},
+{ 456, 3227225453u, 3847749145u, 0u, 472u, 3722153325u, 3847749145u, 0, LDEXP_TOLERANCE, 0},
+{ 457, 1070645131u, 2477088719u, 0u, 326u, 1412480907u, 2477088719u, 0, LDEXP_TOLERANCE, 0},
+{ 458, 3227562493u, 857975269u, 0u, 17u, 3245388285u, 857975269u, 0, LDEXP_TOLERANCE, 0},
+{ 459, 3194188951u, 1711780367u, 0u, 268u, 3475207319u, 1711780367u, 0, LDEXP_TOLERANCE, 0},
+{ 460, 3235476602u, 451471221u, 0u, 156u, 3399054458u, 451471221u, 0, LDEXP_TOLERANCE, 0},
+{ 461, 1074264014u, 2264504930u, 0u, 409u, 1503131598u, 2264504930u, 0, LDEXP_TOLERANCE, 0},
+{ 462, 3228769528u, 1854181735u, 0u, 492u, 3744668920u, 1854181735u, 0, LDEXP_TOLERANCE, 0},
+{ 463, 1046699567u, 1591940213u, 0u, 266u, 1325620783u, 1591940213u, 0, LDEXP_TOLERANCE, 0},
+{ 464, 1061875970u, 1378057304u, 0u, 400u, 1481306370u, 1378057304u, 0, LDEXP_TOLERANCE, 0},
+{ 465, 1058821926u, 2422126348u, 0u, 148u, 1214011174u, 2422126348u, 0, LDEXP_TOLERANCE, 0},
+{ 466, 3228077848u, 3932207622u, 0u, 192u, 3429404440u, 3932207622u, 0, LDEXP_TOLERANCE, 0},
+{ 467, 3195658563u, 2548035700u, 0u, 425u, 3641303363u, 2548035700u, 0, LDEXP_TOLERANCE, 0},
+{ 468, 1090631865u, 3113298011u, 0u, 167u, 1265744057u, 3113298011u, 0, LDEXP_TOLERANCE, 0},
+{ 469, 3192989874u, 286247089u, 0u, 112u, 3310430386u, 286247089u, 0, LDEXP_TOLERANCE, 0},
+{ 470, 3253628449u, 1026197853u, 0u, 116u, 3375263265u, 1026197853u, 0, LDEXP_TOLERANCE, 0},
+{ 471, 1074666768u, 375674756u, 0u, 282u, 1370365200u, 375674756u, 0, LDEXP_TOLERANCE, 0},
+{ 472, 3188722502u, 2287547512u, 0u, 386u, 3593472838u, 2287547512u, 0, LDEXP_TOLERANCE, 0},
+{ 473, 3195629985u, 1263494177u, 0u, 354u, 3566825889u, 1263494177u, 0, LDEXP_TOLERANCE, 0},
+{ 474, 3204259255u, 1611440636u, 0u, 0u, 3204259255u, 1611440636u, 0, LDEXP_TOLERANCE, 0},
+{ 475, 3213589312u, 1865725974u, 0u, 254u, 3479927616u, 1865725974u, 0, LDEXP_TOLERANCE, 0},
+{ 476, 3207039183u, 115770551u, 0u, 289u, 3510077647u, 115770551u, 0, LDEXP_TOLERANCE, 0},
+{ 477, 1070132645u, 1245005118u, 0u, 328u, 1414065573u, 1245005118u, 0, LDEXP_TOLERANCE, 0},
+{ 478, 1078173946u, 1482721827u, 0u, 107u, 1190371578u, 1482721827u, 0, LDEXP_TOLERANCE, 0},
+{ 479, 3192359503u, 3736750583u, 0u, 344u, 3553069647u, 3736750583u, 0, LDEXP_TOLERANCE, 0},
+{ 480, 1090362269u, 2431996507u, 0u, 470u, 1583192989u, 2431996507u, 0, LDEXP_TOLERANCE, 0},
+{ 481, 1102017594u, 242934189u, 0u, 127u, 1235186746u, 242934189u, 0, LDEXP_TOLERANCE, 0},
+{ 482, 1082841536u, 4287291972u, 0u, 308u, 1405802944u, 4287291972u, 0, LDEXP_TOLERANCE, 0},
+{ 483, 1078562189u, 3455122647u, 0u, 77u, 1159302541u, 3455122647u, 0, LDEXP_TOLERANCE, 0},
+{ 484, 3209380687u, 1980318203u, 0u, 417u, 3646636879u, 1980318203u, 0, LDEXP_TOLERANCE, 0},
+{ 485, 1081309333u, 3384251967u, 0u, 134u, 1221818517u, 3384251967u, 0, LDEXP_TOLERANCE, 0},
+{ 486, 3245133381u, 2923526078u, 0u, 405u, 3669806661u, 2923526078u, 0, LDEXP_TOLERANCE, 0},
+{ 487, 1064525899u, 3742487766u, 0u, 228u, 1303601227u, 3742487766u, 0, LDEXP_TOLERANCE, 0},
+{ 488, 1091346793u, 3289095948u, 0u, 430u, 1542234473u, 3289095948u, 0, LDEXP_TOLERANCE, 0},
+{ 489, 1058117934u, 2454945617u, 0u, 113u, 1176607022u, 2454945617u, 0, LDEXP_TOLERANCE, 0},
+{ 490, 1078811133u, 1275993403u, 0u, 24u, 1103976957u, 1275993403u, 0, LDEXP_TOLERANCE, 0},
+{ 491, 3196196192u, 2695666837u, 0u, 6u, 3202487648u, 2695666837u, 0, LDEXP_TOLERANCE, 0},
+{ 492, 1047966215u, 3447944313u, 0u, 340u, 1404482055u, 3447944313u, 0, LDEXP_TOLERANCE, 0},
+{ 493, 1101711780u, 2982959266u, 0u, 303u, 1419430308u, 2982959266u, 0, LDEXP_TOLERANCE, 0},
+{ 494, 1054840864u, 171409502u, 0u, 129u, 1190107168u, 171409502u, 0, LDEXP_TOLERANCE, 0},
+{ 495, 3197943165u, 3921063782u, 0u, 362u, 3577527677u, 3921063782u, 0, LDEXP_TOLERANCE, 0},
+{ 496, 3189290617u, 1578223762u, 0u, 36u, 3227039353u, 1578223762u, 0, LDEXP_TOLERANCE, 0},
+{ 497, 3192959856u, 1469212191u, 0u, 74u, 3270554480u, 1469212191u, 0, LDEXP_TOLERANCE, 0},
+{ 498, 1054233191u, 2295692754u, 0u, 211u, 1275482727u, 2295692754u, 0, LDEXP_TOLERANCE, 0},
+{ 499, 1053077031u, 3459566012u, 0u, 275u, 1341435431u, 3459566012u, 0, LDEXP_TOLERANCE, 0},
+{ 500, 3251200938u, 4126298722u, 0u, 375u, 3644416938u, 4126298722u, 0, LDEXP_TOLERANCE, 0},
+{ 501, 3232343117u, 2520630720u, 0u, 62u, 3297354829u, 2520630720u, 0, LDEXP_TOLERANCE, 0},
+{ 502, 3213037619u, 887645440u, 0u, 43u, 3258126387u, 887645440u, 0, LDEXP_TOLERANCE, 0},
+{ 503, 1086002105u, 946455365u, 0u, 277u, 1376457657u, 946455365u, 0, LDEXP_TOLERANCE, 0},
+{ 504, 3201736709u, 1632857891u, 0u, 340u, 3558252549u, 1632857891u, 0, LDEXP_TOLERANCE, 0},
+{ 505, 1040729961u, 4162008079u, 0u, 206u, 1256736617u, 4162008079u, 0, LDEXP_TOLERANCE, 0},
+{ 506, 1059120765u, 3425518947u, 0u, 278u, 1350624893u, 3425518947u, 0, LDEXP_TOLERANCE, 0},
+{ 507, 3251307470u, 4210912679u, 0u, 407u, 3678077902u, 4210912679u, 0, LDEXP_TOLERANCE, 0},
+{ 508, 1090416633u, 2533687683u, 0u, 435u, 1546547193u, 2533687683u, 0, LDEXP_TOLERANCE, 0},
+{ 509, 3235947244u, 2569281387u, 0u, 394u, 3649086188u, 2569281387u, 0, LDEXP_TOLERANCE, 0},
+{ 510, 3245016670u, 1480024922u, 0u, 152u, 3404400222u, 1480024922u, 0, LDEXP_TOLERANCE, 0},
+{ 511, 3208595959u, 3494862794u, 0u, 490u, 3722398199u, 3494862794u, 0, LDEXP_TOLERANCE, 0},
+{ 512, 3242919505u, 3642407092u, 0u, 109u, 3357214289u, 3642407092u, 0, LDEXP_TOLERANCE, 0},
+{ 513, 3252287877u, 3550162331u, 0u, 355u, 3624532357u, 3550162331u, 0, LDEXP_TOLERANCE, 0},
+{ 514, 3246984334u, 2132131375u, 0u, 42u, 3291024526u, 2132131375u, 0, LDEXP_TOLERANCE, 0},
+{ 515, 3251248752u, 3821901768u, 0u, 369u, 3638173296u, 3821901768u, 0, LDEXP_TOLERANCE, 0},
+{ 516, 1061777502u, 3236596516u, 0u, 339u, 1417244766u, 3236596516u, 0, LDEXP_TOLERANCE, 0},
+{ 517, 3240164097u, 57443054u, 0u, 474u, 3737189121u, 57443054u, 0, LDEXP_TOLERANCE, 0},
+{ 518, 1101921141u, 2928317152u, 0u, 370u, 1489894261u, 2928317152u, 0, LDEXP_TOLERANCE, 0},
+{ 519, 3246958541u, 122162205u, 0u, 395u, 3661146061u, 122162205u, 0, LDEXP_TOLERANCE, 0},
+{ 520, 3194834642u, 2706165300u, 0u, 200u, 3404549842u, 2706165300u, 0, LDEXP_TOLERANCE, 0},
+{ 521, 1094479529u, 1626929878u, 0u, 134u, 1234988713u, 1626929878u, 0, LDEXP_TOLERANCE, 0},
+{ 522, 1083449076u, 2102520884u, 0u, 9u, 1092886260u, 2102520884u, 0, LDEXP_TOLERANCE, 0},
+{ 523, 1076012412u, 2211699255u, 0u, 461u, 1559405948u, 2211699255u, 0, LDEXP_TOLERANCE, 0},
+{ 524, 1041731776u, 2028363648u, 0u, 355u, 1413976256u, 2028363648u, 0, LDEXP_TOLERANCE, 0},
+{ 525, 3187775160u, 2996976481u, 0u, 232u, 3431044792u, 2996976481u, 0, LDEXP_TOLERANCE, 0},
+{ 526, 3248213693u, 3041999329u, 0u, 446u, 3715878589u, 3041999329u, 0, LDEXP_TOLERANCE, 0},
+{ 527, 3196191712u, 1648584571u, 0u, 487u, 3706848224u, 1648584571u, 0, LDEXP_TOLERANCE, 0},
+{ 528, 1093069876u, 540311934u, 0u, 362u, 1472654388u, 540311934u, 0, LDEXP_TOLERANCE, 0},
+{ 529, 3205345633u, 3472075644u, 0u, 259u, 3476926817u, 3472075644u, 0, LDEXP_TOLERANCE, 0},
+{ 530, 1079561503u, 3840720032u, 0u, 17u, 1097387295u, 3840720032u, 0, LDEXP_TOLERANCE, 0},
+{ 531, 3240017460u, 1099567884u, 0u, 484u, 3747528244u, 1099567884u, 0, LDEXP_TOLERANCE, 0},
+{ 532, 3238593552u, 2560836004u, 0u, 269u, 3520660496u, 2560836004u, 0, LDEXP_TOLERANCE, 0},
+{ 533, 1072457286u, 524706354u, 0u, 254u, 1338795590u, 524706354u, 0, LDEXP_TOLERANCE, 0},
+{ 534, 3234908869u, 3264644151u, 0u, 135u, 3376466629u, 3264644151u, 0, LDEXP_TOLERANCE, 0},
+{ 535, 1058314227u, 2407947243u, 0u, 168u, 1234474995u, 2407947243u, 0, LDEXP_TOLERANCE, 0},
+{ 536, 3199467414u, 230193094u, 0u, 462u, 3683909526u, 230193094u, 0, LDEXP_TOLERANCE, 0},
+{ 537, 3198629672u, 2624677381u, 0u, 57u, 3258398504u, 2624677381u, 0, LDEXP_TOLERANCE, 0},
+{ 538, 1085107111u, 1970804718u, 0u, 160u, 1252879271u, 1970804718u, 0, LDEXP_TOLERANCE, 0},
+{ 539, 3247005564u, 1254715281u, 0u, 233u, 3491323772u, 1254715281u, 0, LDEXP_TOLERANCE, 0},
+{ 540, 3233088901u, 1323165917u, 0u, 346u, 3595896197u, 1323165917u, 0, LDEXP_TOLERANCE, 0},
+{ 541, 1085173524u, 2194185737u, 0u, 294u, 1393454868u, 2194185737u, 0, LDEXP_TOLERANCE, 0},
+{ 542, 3217851015u, 1006976371u, 0u, 248u, 3477897863u, 1006976371u, 0, LDEXP_TOLERANCE, 0},
+{ 543, 1097592222u, 627593287u, 0u, 427u, 1545334174u, 627593287u, 0, LDEXP_TOLERANCE, 0},
+{ 544, 1086229861u, 2658788310u, 0u, 363u, 1466862949u, 2658788310u, 0, LDEXP_TOLERANCE, 0},
+{ 545, 3207822943u, 4059505387u, 0u, 450u, 3679682143u, 4059505387u, 0, LDEXP_TOLERANCE, 0},
+{ 546, 3252737468u, 3812071034u, 0u, 332u, 3600864700u, 3812071034u, 0, LDEXP_TOLERANCE, 0},
+{ 547, 1059648367u, 999149762u, 0u, 233u, 1303966575u, 999149762u, 0, LDEXP_TOLERANCE, 0},
+{ 548, 3252484132u, 781792055u, 0u, 491u, 3767334948u, 781792055u, 0, LDEXP_TOLERANCE, 0},
+{ 549, 1054559826u, 3046272894u, 0u, 261u, 1328238162u, 3046272894u, 0, LDEXP_TOLERANCE, 0},
+{ 550, 3205481779u, 1532426189u, 0u, 295u, 3514811699u, 1532426189u, 0, LDEXP_TOLERANCE, 0},
+{ 551, 1075179177u, 214596211u, 0u, 488u, 1586884265u, 214596211u, 0, LDEXP_TOLERANCE, 0},
+{ 552, 1098103739u, 3832087890u, 0u, 204u, 1312013243u, 3832087890u, 0, LDEXP_TOLERANCE, 0},
+{ 553, 1077515271u, 593538252u, 0u, 86u, 1167692807u, 593538252u, 0, LDEXP_TOLERANCE, 0},
+{ 554, 1083592720u, 3097953262u, 0u, 88u, 1175867408u, 3097953262u, 0, LDEXP_TOLERANCE, 0},
+{ 555, 1054141917u, 2033383695u, 0u, 38u, 1093987805u, 2033383695u, 0, LDEXP_TOLERANCE, 0},
+{ 556, 1048495909u, 3670016377u, 0u, 497u, 1569638181u, 3670016377u, 0, LDEXP_TOLERANCE, 0},
+{ 557, 1050809029u, 3775007802u, 0u, 425u, 1496453829u, 3775007802u, 0, LDEXP_TOLERANCE, 0},
+{ 558, 3238703280u, 3436328857u, 0u, 466u, 3727339696u, 3436328857u, 0, LDEXP_TOLERANCE, 0},
+{ 559, 3197179414u, 3119528953u, 0u, 313u, 3525383702u, 3119528953u, 0, LDEXP_TOLERANCE, 0},
+{ 560, 1098412609u, 2259509124u, 0u, 375u, 1491628609u, 2259509124u, 0, LDEXP_TOLERANCE, 0},
+{ 561, 3224480068u, 553154637u, 0u, 286u, 3524372804u, 553154637u, 0, LDEXP_TOLERANCE, 0},
+{ 562, 3215254594u, 3738077421u, 0u, 48u, 3265586242u, 3738077421u, 0, LDEXP_TOLERANCE, 0},
+{ 563, 1052031347u, 293137764u, 0u, 193u, 1254406515u, 293137764u, 0, LDEXP_TOLERANCE, 0},
+{ 564, 1048453019u, 3302718156u, 0u, 494u, 1566449563u, 3302718156u, 0, LDEXP_TOLERANCE, 0},
+{ 565, 3223439338u, 3448048638u, 0u, 52u, 3277965290u, 3448048638u, 0, LDEXP_TOLERANCE, 0},
+{ 566, 3223944194u, 1862856951u, 0u, 168u, 3400104962u, 1862856951u, 0, LDEXP_TOLERANCE, 0},
+{ 567, 3244649498u, 3318830570u, 0u, 6u, 3250940954u, 3318830570u, 0, LDEXP_TOLERANCE, 0},
+{ 568, 1095956900u, 168744837u, 0u, 184u, 1288894884u, 168744837u, 0, LDEXP_TOLERANCE, 0},
+{ 569, 1096175678u, 2035208049u, 0u, 248u, 1356222526u, 2035208049u, 0, LDEXP_TOLERANCE, 0},
+{ 570, 1071443591u, 2413085118u, 0u, 415u, 1506602631u, 2413085118u, 0, LDEXP_TOLERANCE, 0},
+{ 571, 3231142151u, 2125266031u, 0u, 154u, 3392622855u, 2125266031u, 0, LDEXP_TOLERANCE, 0},
+{ 572, 3239533970u, 2250119224u, 0u, 342u, 3598146962u, 2250119224u, 0, LDEXP_TOLERANCE, 0},
+{ 573, 1067186195u, 3698426632u, 0u, 130u, 1203501075u, 3698426632u, 0, LDEXP_TOLERANCE, 0},
+{ 574, 3196143186u, 2420102372u, 0u, 268u, 3477161554u, 2420102372u, 0, LDEXP_TOLERANCE, 0},
+{ 575, 3237295327u, 950097945u, 0u, 177u, 3422893279u, 950097945u, 0, LDEXP_TOLERANCE, 0},
+{ 576, 1041232546u, 3621700966u, 0u, 102u, 1148187298u, 3621700966u, 0, LDEXP_TOLERANCE, 0},
+{ 577, 1050106742u, 4027115185u, 0u, 170u, 1228364662u, 4027115185u, 0, LDEXP_TOLERANCE, 0},
+{ 578, 1058573943u, 2226077666u, 0u, 230u, 1299746423u, 2226077666u, 0, LDEXP_TOLERANCE, 0},
+{ 579, 1060691586u, 1178315623u, 0u, 114u, 1180229250u, 1178315623u, 0, LDEXP_TOLERANCE, 0},
+{ 580, 1103796205u, 2401303942u, 0u, 32u, 1137350637u, 2401303942u, 0, LDEXP_TOLERANCE, 0},
+{ 581, 1096468311u, 726651516u, 0u, 499u, 1619707735u, 726651516u, 0, LDEXP_TOLERANCE, 0},
+{ 582, 3222220162u, 3249224838u, 0u, 461u, 3705613698u, 3249224838u, 0, LDEXP_TOLERANCE, 0},
+{ 583, 3254704022u, 384370422u, 0u, 310u, 3579762582u, 384370422u, 0, LDEXP_TOLERANCE, 0},
+{ 584, 1097386147u, 3782310033u, 0u, 243u, 1352190115u, 3782310033u, 0, LDEXP_TOLERANCE, 0},
+{ 585, 3252042528u, 146366045u, 0u, 356u, 3625335584u, 146366045u, 0, LDEXP_TOLERANCE, 0},
+{ 586, 3244118788u, 2529029548u, 0u, 205u, 3459076868u, 2529029548u, 0, LDEXP_TOLERANCE, 0},
+{ 587, 3247146310u, 3286328657u, 0u, 195u, 3451618630u, 3286328657u, 0, LDEXP_TOLERANCE, 0},
+{ 588, 1082254153u, 633487468u, 0u, 173u, 1263657801u, 633487468u, 0, LDEXP_TOLERANCE, 0},
+{ 589, 1106725606u, 4081471542u, 0u, 54u, 1163348710u, 4081471542u, 0, LDEXP_TOLERANCE, 0},
+{ 590, 3235104785u, 2659274428u, 0u, 13u, 3248736273u, 2659274428u, 0, LDEXP_TOLERANCE, 0},
+{ 591, 3192361033u, 3292996609u, 0u, 147u, 3346501705u, 3292996609u, 0, LDEXP_TOLERANCE, 0},
+{ 592, 3243606330u, 1251690243u, 0u, 286u, 3543499066u, 1251690243u, 0, LDEXP_TOLERANCE, 0},
+{ 593, 1078522672u, 534876830u, 0u, 312u, 1405678384u, 534876830u, 0, LDEXP_TOLERANCE, 0},
+{ 594, 3236105559u, 2730725979u, 0u, 133u, 3375566167u, 2730725979u, 0, LDEXP_TOLERANCE, 0},
+{ 595, 3207120390u, 3867917386u, 0u, 120u, 3332949510u, 3867917386u, 0, LDEXP_TOLERANCE, 0},
+{ 596, 3209887750u, 282125870u, 0u, 290u, 3513974790u, 282125870u, 0, LDEXP_TOLERANCE, 0},
+{ 597, 3221192531u, 1378332814u, 0u, 46u, 3269427027u, 1378332814u, 0, LDEXP_TOLERANCE, 0},
+{ 598, 1071438511u, 1456720330u, 0u, 197u, 1278007983u, 1456720330u, 0, LDEXP_TOLERANCE, 0},
+{ 599, 3204862644u, 625779797u, 0u, 242u, 3458618036u, 625779797u, 0, LDEXP_TOLERANCE, 0},
+{ 600, 3188948769u, 1949093709u, 0u, 222u, 3421732641u, 1949093709u, 0, LDEXP_TOLERANCE, 0},
+{ 601, 1040706087u, 1832636825u, 0u, 370u, 1428679207u, 1832636825u, 0, LDEXP_TOLERANCE, 0},
+{ 602, 3241678717u, 4116863145u, 0u, 268u, 3522697085u, 4116863145u, 0, LDEXP_TOLERANCE, 0},
+{ 603, 3254549137u, 1280908320u, 0u, 410u, 3684465297u, 1280908320u, 0, LDEXP_TOLERANCE, 0},
+{ 604, 1044237059u, 849581558u, 0u, 61u, 1108200195u, 849581558u, 0, LDEXP_TOLERANCE, 0},
+{ 605, 3227710894u, 1803008264u, 0u, 159u, 3394434478u, 1803008264u, 0, LDEXP_TOLERANCE, 0},
+{ 606, 3222601478u, 3647912576u, 0u, 158u, 3388276486u, 3647912576u, 0, LDEXP_TOLERANCE, 0},
+{ 607, 3201624749u, 1239907237u, 0u, 69u, 3273976493u, 1239907237u, 0, LDEXP_TOLERANCE, 0},
+{ 608, 1074236329u, 1658600938u, 0u, 471u, 1568115625u, 1658600938u, 0, LDEXP_TOLERANCE, 0},
+{ 609, 1075491548u, 3953853053u, 0u, 216u, 1301983964u, 3953853053u, 0, LDEXP_TOLERANCE, 0},
+{ 610, 3213072244u, 1760177025u, 0u, 266u, 3491993460u, 1760177025u, 0, LDEXP_TOLERANCE, 0},
+{ 611, 1080258478u, 2294697132u, 0u, 293u, 1387491246u, 2294697132u, 0, LDEXP_TOLERANCE, 0},
+{ 612, 3231020290u, 2744719351u, 0u, 429u, 3680859394u, 2744719351u, 0, LDEXP_TOLERANCE, 0},
+{ 613, 3189668753u, 1174874204u, 0u, 125u, 3320740753u, 1174874204u, 0, LDEXP_TOLERANCE, 0},
+{ 614, 1057110584u, 848081004u, 0u, 119u, 1181891128u, 848081004u, 0, LDEXP_TOLERANCE, 0},
+{ 615, 1058101211u, 2085894114u, 0u, 296u, 1368479707u, 2085894114u, 0, LDEXP_TOLERANCE, 0},
+{ 616, 3202306280u, 348102924u, 0u, 288u, 3504296168u, 348102924u, 0, LDEXP_TOLERANCE, 0},
+{ 617, 1093500372u, 2470748422u, 0u, 28u, 1122860500u, 2470748422u, 0, LDEXP_TOLERANCE, 0},
+{ 618, 1061167400u, 138849460u, 0u, 322u, 1398808872u, 138849460u, 0, LDEXP_TOLERANCE, 0},
+{ 619, 1104293747u, 1900437425u, 0u, 483u, 1610755955u, 1900437425u, 0, LDEXP_TOLERANCE, 0},
+{ 620, 1100508815u, 3684301975u, 0u, 67u, 1170763407u, 3684301975u, 0, LDEXP_TOLERANCE, 0},
+{ 621, 1044707490u, 2999949676u, 0u, 75u, 1123350690u, 2999949676u, 0, LDEXP_TOLERANCE, 0},
+{ 622, 3254712629u, 4001809575u, 0u, 38u, 3294558517u, 4001809575u, 0, LDEXP_TOLERANCE, 0},
+{ 623, 3254231152u, 2299565551u, 0u, 431u, 3706167408u, 2299565551u, 0, LDEXP_TOLERANCE, 0},
+{ 624, 3194165277u, 3145100012u, 0u, 387u, 3599964189u, 3145100012u, 0, LDEXP_TOLERANCE, 0},
+{ 625, 3236479153u, 2659893783u, 0u, 292u, 3542663345u, 2659893783u, 0, LDEXP_TOLERANCE, 0},
+{ 626, 1066703665u, 4096436451u, 0u, 287u, 1367644977u, 4096436451u, 0, LDEXP_TOLERANCE, 0},
+{ 627, 3191085836u, 2080198917u, 0u, 342u, 3549698828u, 2080198917u, 0, LDEXP_TOLERANCE, 0},
+{ 628, 1103176642u, 292693126u, 0u, 269u, 1385243586u, 292693126u, 0, LDEXP_TOLERANCE, 0},
+{ 629, 1076257739u, 439474159u, 0u, 53u, 1131832267u, 439474159u, 0, LDEXP_TOLERANCE, 0},
+{ 630, 3203168524u, 4050424307u, 0u, 48u, 3253500172u, 4050424307u, 0, LDEXP_TOLERANCE, 0},
+{ 631, 3211263954u, 3275604304u, 0u, 427u, 3659005906u, 3275604304u, 0, LDEXP_TOLERANCE, 0},
+{ 632, 1098022244u, 1605519917u, 0u, 152u, 1257405796u, 1605519917u, 0, LDEXP_TOLERANCE, 0},
+{ 633, 3225218243u, 2732577078u, 0u, 169u, 3402427587u, 2732577078u, 0, LDEXP_TOLERANCE, 0},
+{ 634, 3224758945u, 639164136u, 0u, 250u, 3486902945u, 639164136u, 0, LDEXP_TOLERANCE, 0},
+{ 635, 3206688283u, 365608035u, 0u, 220u, 3437375003u, 365608035u, 0, LDEXP_TOLERANCE, 0},
+{ 636, 1096221986u, 188907563u, 0u, 258u, 1366754594u, 188907563u, 0, LDEXP_TOLERANCE, 0},
+{ 637, 1077478629u, 2925706902u, 0u, 77u, 1158218981u, 2925706902u, 0, LDEXP_TOLERANCE, 0},
+{ 638, 3245669892u, 1441001355u, 0u, 401u, 3666148868u, 1441001355u, 0, LDEXP_TOLERANCE, 0},
+{ 639, 1086418963u, 1263339528u, 0u, 77u, 1167159315u, 1263339528u, 0, LDEXP_TOLERANCE, 0},
+{ 640, 3243690997u, 4075177615u, 0u, 254u, 3510029301u, 4075177615u, 0, LDEXP_TOLERANCE, 0},
+{ 641, 1043887798u, 2574410165u, 0u, 228u, 1282963126u, 2574410165u, 0, LDEXP_TOLERANCE, 0},
+{ 642, 3228012899u, 1451038472u, 0u, 233u, 3472331107u, 1451038472u, 0, LDEXP_TOLERANCE, 0},
+{ 643, 1057927965u, 3267242972u, 0u, 196u, 1263448861u, 3267242972u, 0, LDEXP_TOLERANCE, 0},
+{ 644, 1088388240u, 147191702u, 0u, 277u, 1378843792u, 147191702u, 0, LDEXP_TOLERANCE, 0},
+{ 645, 3237742613u, 463847325u, 0u, 141u, 3385591829u, 463847325u, 0, LDEXP_TOLERANCE, 0},
+{ 646, 3231093084u, 309566036u, 0u, 15u, 3246821724u, 309566036u, 0, LDEXP_TOLERANCE, 0},
+{ 647, 3236008002u, 369048143u, 0u, 142u, 3384905794u, 369048143u, 0, LDEXP_TOLERANCE, 0},
+{ 648, 1106124402u, 4110964559u, 0u, 367u, 1490951794u, 4110964559u, 0, LDEXP_TOLERANCE, 0},
+{ 649, 1081914210u, 3679866727u, 0u, 33u, 1116517218u, 3679866727u, 0, LDEXP_TOLERANCE, 0},
+{ 650, 3208744451u, 810282289u, 0u, 240u, 3460402691u, 810282289u, 0, LDEXP_TOLERANCE, 0},
+{ 651, 3214165397u, 3872563165u, 0u, 0u, 3214165397u, 3872563165u, 0, LDEXP_TOLERANCE, 0},
+{ 652, 1098494887u, 2790313039u, 0u, 484u, 1606005671u, 2790313039u, 0, LDEXP_TOLERANCE, 0},
+{ 653, 3221154109u, 1894124837u, 0u, 154u, 3382634813u, 1894124837u, 0, LDEXP_TOLERANCE, 0},
+{ 654, 1046643778u, 1307532154u, 0u, 483u, 1553105986u, 1307532154u, 0, LDEXP_TOLERANCE, 0},
+{ 655, 1074424846u, 2546231111u, 0u, 76u, 1154116622u, 2546231111u, 0, LDEXP_TOLERANCE, 0},
+{ 656, 1070559510u, 1177789792u, 0u, 338u, 1424978198u, 1177789792u, 0, LDEXP_TOLERANCE, 0},
+{ 657, 3225897784u, 1393159012u, 0u, 468u, 3716631352u, 1393159012u, 0, LDEXP_TOLERANCE, 0},
+{ 658, 3241371250u, 2270747330u, 0u, 226u, 3478349426u, 2270747330u, 0, LDEXP_TOLERANCE, 0},
+{ 659, 3206099061u, 387526371u, 0u, 489u, 3718852725u, 387526371u, 0, LDEXP_TOLERANCE, 0},
+{ 660, 3248889342u, 1541778002u, 0u, 112u, 3366329854u, 1541778002u, 0, LDEXP_TOLERANCE, 0},
+{ 661, 1057260850u, 487828421u, 0u, 161u, 1226081586u, 487828421u, 0, LDEXP_TOLERANCE, 0},
+{ 662, 3227842110u, 3028362906u, 0u, 82u, 3313825342u, 3028362906u, 0, LDEXP_TOLERANCE, 0},
+{ 663, 3232158280u, 2832526786u, 0u, 342u, 3590771272u, 2832526786u, 0, LDEXP_TOLERANCE, 0},
+{ 664, 1086492044u, 1029336617u, 0u, 11u, 1098026380u, 1029336617u, 0, LDEXP_TOLERANCE, 0},
+{ 665, 3201067521u, 3844885860u, 0u, 233u, 3445385729u, 3844885860u, 0, LDEXP_TOLERANCE, 0},
+{ 666, 1081650590u, 3848664336u, 0u, 190u, 1280880030u, 3848664336u, 0, LDEXP_TOLERANCE, 0},
+{ 667, 3216727300u, 1859175955u, 0u, 342u, 3575340292u, 1859175955u, 0, LDEXP_TOLERANCE, 0},
+{ 668, 3247701688u, 4177384140u, 0u, 294u, 3555983032u, 4177384140u, 0, LDEXP_TOLERANCE, 0},
+{ 669, 3225365211u, 1905063436u, 0u, 369u, 3612289755u, 1905063436u, 0, LDEXP_TOLERANCE, 0},
+{ 670, 1060341776u, 3330581237u, 0u, 285u, 1359185936u, 3330581237u, 0, LDEXP_TOLERANCE, 0},
+{ 671, 1086856468u, 3110345659u, 0u, 307u, 1408769300u, 3110345659u, 0, LDEXP_TOLERANCE, 0},
+{ 672, 1040609072u, 2626928143u, 0u, 167u, 1215721264u, 2626928143u, 0, LDEXP_TOLERANCE, 0},
+{ 673, 3193571775u, 2449013005u, 0u, 206u, 3409578431u, 2449013005u, 0, LDEXP_TOLERANCE, 0},
+{ 674, 1044814475u, 3649425780u, 0u, 329u, 1389795979u, 3649425780u, 0, LDEXP_TOLERANCE, 0},
+{ 675, 3247609790u, 1936138976u, 0u, 449u, 3718420414u, 1936138976u, 0, LDEXP_TOLERANCE, 0},
+{ 676, 3222118023u, 3554670043u, 0u, 474u, 3719143047u, 3554670043u, 0, LDEXP_TOLERANCE, 0},
+{ 677, 3226161360u, 2445669899u, 0u, 122u, 3354087632u, 2445669899u, 0, LDEXP_TOLERANCE, 0},
+{ 678, 3231588583u, 3613487983u, 0u, 168u, 3407749351u, 3613487983u, 0, LDEXP_TOLERANCE, 0},
+{ 679, 1070518869u, 2404090288u, 0u, 343u, 1430180437u, 2404090288u, 0, LDEXP_TOLERANCE, 0},
+{ 680, 1056601872u, 3936780069u, 0u, 401u, 1477080848u, 3936780069u, 0, LDEXP_TOLERANCE, 0},
+{ 681, 3251382149u, 3695226490u, 0u, 317u, 3583780741u, 3695226490u, 0, LDEXP_TOLERANCE, 0},
+{ 682, 1084717105u, 2502140489u, 0u, 428u, 1533507633u, 2502140489u, 0, LDEXP_TOLERANCE, 0},
+{ 683, 3231607738u, 3076182032u, 0u, 212u, 3453905850u, 3076182032u, 0, LDEXP_TOLERANCE, 0},
+{ 684, 3226181630u, 52044482u, 0u, 56u, 3284901886u, 52044482u, 0, LDEXP_TOLERANCE, 0},
+{ 685, 3209294194u, 3250576797u, 0u, 447u, 3678007666u, 3250576797u, 0, LDEXP_TOLERANCE, 0},
+{ 686, 1067216664u, 280322485u, 0u, 68u, 1138519832u, 280322485u, 0, LDEXP_TOLERANCE, 0},
+{ 687, 1056850730u, 3460638643u, 0u, 3u, 1059996458u, 3460638643u, 0, LDEXP_TOLERANCE, 0},
+{ 688, 3198374301u, 836754546u, 0u, 227u, 3436401053u, 836754546u, 0, LDEXP_TOLERANCE, 0},
+{ 689, 1053945586u, 1909842364u, 0u, 137u, 1197600498u, 1909842364u, 0, LDEXP_TOLERANCE, 0},
+{ 690, 1102747575u, 3614304657u, 0u, 175u, 1286248375u, 3614304657u, 0, LDEXP_TOLERANCE, 0},
+{ 691, 3232289682u, 104161319u, 0u, 258u, 3502822290u, 104161319u, 0, LDEXP_TOLERANCE, 0},
+{ 692, 3239925976u, 4284835369u, 0u, 69u, 3312277720u, 4284835369u, 0, LDEXP_TOLERANCE, 0},
+{ 693, 1101382703u, 1829525759u, 0u, 474u, 1598407727u, 1829525759u, 0, LDEXP_TOLERANCE, 0},
+{ 694, 1080943896u, 3662877092u, 0u, 172u, 1261298968u, 3662877092u, 0, LDEXP_TOLERANCE, 0},
+{ 695, 3208812483u, 1522451444u, 0u, 237u, 3457324995u, 1522451444u, 0, LDEXP_TOLERANCE, 0},
+{ 696, 3207922109u, 3788656852u, 0u, 281u, 3502571965u, 3788656852u, 0, LDEXP_TOLERANCE, 0},
+{ 697, 1051638218u, 161607862u, 0u, 267u, 1331608010u, 161607862u, 0, LDEXP_TOLERANCE, 0},
+{ 698, 1090916217u, 2404130512u, 0u, 233u, 1335234425u, 2404130512u, 0, LDEXP_TOLERANCE, 0},
+{ 699, 1059685751u, 2026411429u, 0u, 386u, 1464436087u, 2026411429u, 0, LDEXP_TOLERANCE, 0},
+{ 700, 3253240072u, 1320615853u, 0u, 98u, 3356000520u, 1320615853u, 0, LDEXP_TOLERANCE, 0},
+{ 701, 3252472409u, 3427912319u, 0u, 307u, 3574385241u, 3427912319u, 0, LDEXP_TOLERANCE, 0},
+{ 702, 3239422485u, 3207831031u, 0u, 279u, 3531975189u, 3207831031u, 0, LDEXP_TOLERANCE, 0},
+{ 703, 3225261763u, 193885269u, 0u, 263u, 3501037251u, 193885269u, 0, LDEXP_TOLERANCE, 0},
+{ 704, 3198856153u, 1330711805u, 0u, 34u, 3234507737u, 1330711805u, 0, LDEXP_TOLERANCE, 0},
+{ 705, 1061209059u, 2242782034u, 0u, 484u, 1568719843u, 2242782034u, 0, LDEXP_TOLERANCE, 0},
+{ 706, 1105997747u, 1164748983u, 0u, 205u, 1320955827u, 1164748983u, 0, LDEXP_TOLERANCE, 0},
+{ 707, 1041518408u, 427227336u, 0u, 468u, 1532251976u, 427227336u, 0, LDEXP_TOLERANCE, 0},
+{ 708, 1047983837u, 571692916u, 0u, 112u, 1165424349u, 571692916u, 0, LDEXP_TOLERANCE, 0},
+{ 709, 3243349276u, 1910625797u, 0u, 305u, 3563164956u, 1910625797u, 0, LDEXP_TOLERANCE, 0},
+{ 710, 1056431544u, 3633684065u, 0u, 85u, 1145560504u, 3633684065u, 0, LDEXP_TOLERANCE, 0},
+{ 711, 3216335063u, 2139337836u, 0u, 289u, 3519373527u, 2139337836u, 0, LDEXP_TOLERANCE, 0},
+{ 712, 3221194724u, 3647632375u, 0u, 136u, 3363801060u, 3647632375u, 0, LDEXP_TOLERANCE, 0},
+{ 713, 3194264761u, 3085230370u, 0u, 415u, 3629423801u, 3085230370u, 0, LDEXP_TOLERANCE, 0},
+{ 714, 1047551748u, 2424866060u, 0u, 183u, 1239441156u, 2424866060u, 0, LDEXP_TOLERANCE, 0},
+{ 715, 1056945903u, 2026968333u, 0u, 249u, 1318041327u, 2026968333u, 0, LDEXP_TOLERANCE, 0},
+{ 716, 3254065942u, 2288082596u, 0u, 121u, 3380943638u, 2288082596u, 0, LDEXP_TOLERANCE, 0},
+{ 717, 3204958105u, 146999679u, 0u, 260u, 3477587865u, 146999679u, 0, LDEXP_TOLERANCE, 0},
+{ 718, 3249441223u, 3097120487u, 0u, 334u, 3599665607u, 3097120487u, 0, LDEXP_TOLERANCE, 0},
+{ 719, 1092821012u, 2819263558u, 0u, 374u, 1484988436u, 2819263558u, 0, LDEXP_TOLERANCE, 0},
+{ 720, 3248709970u, 1002982008u, 0u, 133u, 3388170578u, 1002982008u, 0, LDEXP_TOLERANCE, 0},
+{ 721, 3196410507u, 3683897920u, 0u, 150u, 3353696907u, 3683897920u, 0, LDEXP_TOLERANCE, 0},
+{ 722, 3198217745u, 2950261157u, 0u, 303u, 3515936273u, 2950261157u, 0, LDEXP_TOLERANCE, 0},
+{ 723, 3251583196u, 1575329940u, 0u, 333u, 3600759004u, 1575329940u, 0, LDEXP_TOLERANCE, 0},
+{ 724, 1041303822u, 3078435619u, 0u, 101u, 1147209998u, 3078435619u, 0, LDEXP_TOLERANCE, 0},
+{ 725, 1074310746u, 2577246912u, 0u, 345u, 1436069466u, 2577246912u, 0, LDEXP_TOLERANCE, 0},
+{ 726, 1043606901u, 2874218693u, 0u, 420u, 1484008821u, 2874218693u, 0, LDEXP_TOLERANCE, 0},
+{ 727, 3224836328u, 1577726432u, 0u, 210u, 3445037288u, 1577726432u, 0, LDEXP_TOLERANCE, 0},
+{ 728, 1080717542u, 3407236142u, 0u, 495u, 1599762662u, 3407236142u, 0, LDEXP_TOLERANCE, 0},
+{ 729, 3239021323u, 1897226271u, 0u, 337u, 3592391435u, 1897226271u, 0, LDEXP_TOLERANCE, 0},
+{ 730, 1091225343u, 3521028551u, 0u, 232u, 1334494975u, 3521028551u, 0, LDEXP_TOLERANCE, 0},
+{ 731, 1047112378u, 3921932243u, 0u, 476u, 1546234554u, 3921932243u, 0, LDEXP_TOLERANCE, 0},
+{ 732, 1061380266u, 1196702002u, 0u, 289u, 1364418730u, 1196702002u, 0, LDEXP_TOLERANCE, 0},
+{ 733, 3228251369u, 3560249334u, 0u, 180u, 3416995049u, 3560249334u, 0, LDEXP_TOLERANCE, 0},
+{ 734, 3202942296u, 256601931u, 0u, 412u, 3634955608u, 256601931u, 0, LDEXP_TOLERANCE, 0},
+{ 735, 3188373428u, 4178341029u, 0u, 332u, 3536500660u, 4178341029u, 0, LDEXP_TOLERANCE, 0},
+{ 736, 1074244557u, 1388509212u, 0u, 68u, 1145547725u, 1388509212u, 0, LDEXP_TOLERANCE, 0},
+{ 737, 3227970267u, 278055877u, 0u, 158u, 3393645275u, 278055877u, 0, LDEXP_TOLERANCE, 0},
+{ 738, 3253498427u, 1975402856u, 0u, 91u, 3348918843u, 1975402856u, 0, LDEXP_TOLERANCE, 0},
+{ 739, 3212768361u, 36116288u, 0u, 91u, 3308188777u, 36116288u, 0, LDEXP_TOLERANCE, 0},
+{ 740, 1067504948u, 2801410835u, 0u, 86u, 1157682484u, 2801410835u, 0, LDEXP_TOLERANCE, 0},
+{ 741, 1056745800u, 1517147036u, 0u, 390u, 1465690440u, 1517147036u, 0, LDEXP_TOLERANCE, 0},
+{ 742, 1055869313u, 3403644835u, 0u, 58u, 1116686721u, 3403644835u, 0, LDEXP_TOLERANCE, 0},
+{ 743, 3239015924u, 1497452126u, 0u, 300u, 3553588724u, 1497452126u, 0, LDEXP_TOLERANCE, 0},
+{ 744, 3198727606u, 527260849u, 0u, 15u, 3214456246u, 527260849u, 0, LDEXP_TOLERANCE, 0},
+{ 745, 1055132057u, 730320459u, 0u, 341u, 1412696473u, 730320459u, 0, LDEXP_TOLERANCE, 0},
+{ 746, 1071575537u, 3103627383u, 0u, 466u, 1560211953u, 3103627383u, 0, LDEXP_TOLERANCE, 0},
+{ 747, 1075642950u, 676014010u, 0u, 15u, 1091371590u, 676014010u, 0, LDEXP_TOLERANCE, 0},
+{ 748, 1093103612u, 2664812822u, 0u, 439u, 1553428476u, 2664812822u, 0, LDEXP_TOLERANCE, 0},
+{ 749, 1076849399u, 511262496u, 0u, 262u, 1351576311u, 511262496u, 0, LDEXP_TOLERANCE, 0},
+{ 750, 1040381038u, 1621968404u, 0u, 453u, 1515385966u, 1621968404u, 0, LDEXP_TOLERANCE, 0},
+{ 751, 1051309752u, 716773972u, 0u, 190u, 1250539192u, 716773972u, 0, LDEXP_TOLERANCE, 0},
+{ 752, 1089837159u, 3131066689u, 0u, 346u, 1452644455u, 3131066689u, 0, LDEXP_TOLERANCE, 0},
+{ 753, 3234817844u, 2885211133u, 0u, 318u, 3568265012u, 2885211133u, 0, LDEXP_TOLERANCE, 0},
+{ 754, 3244193329u, 935135102u, 0u, 44u, 3290330673u, 935135102u, 0, LDEXP_TOLERANCE, 0},
+{ 755, 3203778258u, 3428784172u, 0u, 71u, 3278227154u, 3428784172u, 0, LDEXP_TOLERANCE, 0},
+{ 756, 3238604006u, 2734177193u, 0u, 368u, 3624479974u, 2734177193u, 0, LDEXP_TOLERANCE, 0},
+{ 757, 1091433848u, 3888398377u, 0u, 102u, 1198388600u, 3888398377u, 0, LDEXP_TOLERANCE, 0},
+{ 758, 1046749113u, 3712806014u, 0u, 443u, 1511268281u, 3712806014u, 0, LDEXP_TOLERANCE, 0},
+{ 759, 1076298852u, 991871299u, 0u, 82u, 1162282084u, 991871299u, 0, LDEXP_TOLERANCE, 0},
+{ 760, 3206800539u, 4000035882u, 0u, 319u, 3541296283u, 4000035882u, 0, LDEXP_TOLERANCE, 0},
+{ 761, 1067010471u, 2056309037u, 0u, 347u, 1430866343u, 2056309037u, 0, LDEXP_TOLERANCE, 0},
+{ 762, 1058199525u, 1299425839u, 0u, 432u, 1511184357u, 1299425839u, 0, LDEXP_TOLERANCE, 0},
+{ 763, 1050094941u, 3817959288u, 0u, 37u, 1088892253u, 3817959288u, 0, LDEXP_TOLERANCE, 0},
+{ 764, 1095599309u, 1960661988u, 0u, 73u, 1172145357u, 1960661988u, 0, LDEXP_TOLERANCE, 0},
+{ 765, 3187979854u, 2362441752u, 0u, 331u, 3535058510u, 2362441752u, 0, LDEXP_TOLERANCE, 0},
+{ 766, 1088255327u, 270039934u, 0u, 194u, 1291679071u, 270039934u, 0, LDEXP_TOLERANCE, 0},
+{ 767, 3249308688u, 397843258u, 0u, 214u, 3473703952u, 397843258u, 0, LDEXP_TOLERANCE, 0},
+{ 768, 3212426640u, 3278767347u, 0u, 244u, 3468279184u, 3278767347u, 0, LDEXP_TOLERANCE, 0},
+{ 769, 1073567981u, 3086540190u, 0u, 445u, 1540184301u, 3086540190u, 0, LDEXP_TOLERANCE, 0},
+{ 770, 1064931281u, 1165998478u, 0u, 354u, 1436127185u, 1165998478u, 0, LDEXP_TOLERANCE, 0},
+{ 771, 3204860436u, 1236881883u, 0u, 197u, 3411429908u, 1236881883u, 0, LDEXP_TOLERANCE, 0},
+{ 772, 3211538326u, 71491083u, 0u, 429u, 3661377430u, 71491083u, 0, LDEXP_TOLERANCE, 0},
+{ 773, 3242681902u, 664136103u, 0u, 40u, 3284624942u, 664136103u, 0, LDEXP_TOLERANCE, 0},
+{ 774, 3189996280u, 1751559854u, 0u, 474u, 3687021304u, 1751559854u, 0, LDEXP_TOLERANCE, 0},
+{ 775, 1051092760u, 2798720100u, 0u, 95u, 1150707480u, 2798720100u, 0, LDEXP_TOLERANCE, 0},
+{ 776, 3205253626u, 3843740240u, 0u, 62u, 3270265338u, 3843740240u, 0, LDEXP_TOLERANCE, 0},
+{ 777, 1092011864u, 751825094u, 0u, 342u, 1450624856u, 751825094u, 0, LDEXP_TOLERANCE, 0},
+{ 778, 3209223122u, 3502451710u, 0u, 195u, 3413695442u, 3502451710u, 0, LDEXP_TOLERANCE, 0},
+{ 779, 3247190406u, 4080443609u, 0u, 248u, 3507237254u, 4080443609u, 0, LDEXP_TOLERANCE, 0},
+{ 780, 1096403156u, 3262097651u, 0u, 157u, 1261029588u, 3262097651u, 0, LDEXP_TOLERANCE, 0},
+{ 781, 3252309668u, 4001157930u, 0u, 52u, 3306835620u, 4001157930u, 0, LDEXP_TOLERANCE, 0},
+{ 782, 3193455299u, 2008796992u, 0u, 272u, 3478667971u, 2008796992u, 0, LDEXP_TOLERANCE, 0},
+{ 783, 1074202826u, 3996321918u, 0u, 272u, 1359415498u, 3996321918u, 0, LDEXP_TOLERANCE, 0},
+{ 784, 1097859997u, 559918757u, 0u, 200u, 1307575197u, 559918757u, 0, LDEXP_TOLERANCE, 0},
+{ 785, 1105263000u, 1026957442u, 0u, 292u, 1411447192u, 1026957442u, 0, LDEXP_TOLERANCE, 0},
+{ 786, 1090021734u, 10385612u, 0u, 274u, 1377331558u, 10385612u, 0, LDEXP_TOLERANCE, 0},
+{ 787, 3204176005u, 138109865u, 0u, 460u, 3686520965u, 138109865u, 0, LDEXP_TOLERANCE, 0},
+{ 788, 3248203007u, 2450309467u, 0u, 259u, 3519784191u, 2450309467u, 0, LDEXP_TOLERANCE, 0},
+{ 789, 3222168498u, 3036525078u, 0u, 430u, 3673056178u, 3036525078u, 0, LDEXP_TOLERANCE, 0},
+{ 790, 1089193268u, 2185243463u, 0u, 302u, 1405863220u, 2185243463u, 0, LDEXP_TOLERANCE, 0},
+{ 791, 1098669225u, 945559339u, 0u, 379u, 1496079529u, 945559339u, 0, LDEXP_TOLERANCE, 0},
+{ 792, 3247056551u, 3061117625u, 0u, 305u, 3566872231u, 3061117625u, 0, LDEXP_TOLERANCE, 0},
+{ 793, 1056505004u, 3804703138u, 0u, 193u, 1258880172u, 3804703138u, 0, LDEXP_TOLERANCE, 0},
+{ 794, 1064051616u, 4286212259u, 0u, 110u, 1179394976u, 4286212259u, 0, LDEXP_TOLERANCE, 0},
+{ 795, 3228226248u, 3005944127u, 0u, 368u, 3614102216u, 3005944127u, 0, LDEXP_TOLERANCE, 0},
+{ 796, 3227751196u, 1206270591u, 0u, 250u, 3489895196u, 1206270591u, 0, LDEXP_TOLERANCE, 0},
+{ 797, 3189082429u, 2733129256u, 0u, 59u, 3250948413u, 2733129256u, 0, LDEXP_TOLERANCE, 0},
+{ 798, 3245340921u, 4247799250u, 0u, 202u, 3457153273u, 4247799250u, 0, LDEXP_TOLERANCE, 0},
+{ 799, 3221929633u, 1990351504u, 0u, 322u, 3559571105u, 1990351504u, 0, LDEXP_TOLERANCE, 0},
+{ 800, 1088823630u, 1306766437u, 0u, 432u, 1541808462u, 1306766437u, 0, LDEXP_TOLERANCE, 0},
+{ 801, 1103830155u, 1646497074u, 0u, 106u, 1214979211u, 1646497074u, 0, LDEXP_TOLERANCE, 0},
+{ 802, 1045705464u, 1703969219u, 0u, 328u, 1389638392u, 1703969219u, 0, LDEXP_TOLERANCE, 0},
+{ 803, 3235685067u, 2320792999u, 0u, 202u, 3447497419u, 2320792999u, 0, LDEXP_TOLERANCE, 0},
+{ 804, 3245310028u, 2734025087u, 0u, 343u, 3604971596u, 2734025087u, 0, LDEXP_TOLERANCE, 0},
+{ 805, 1050749188u, 1865522910u, 0u, 362u, 1430333700u, 1865522910u, 0, LDEXP_TOLERANCE, 0},
+{ 806, 1082523997u, 607572944u, 0u, 246u, 1340473693u, 607572944u, 0, LDEXP_TOLERANCE, 0},
+{ 807, 3212293317u, 1718035313u, 0u, 381u, 3611800773u, 1718035313u, 0, LDEXP_TOLERANCE, 0},
+{ 808, 1077896873u, 1700936244u, 0u, 365u, 1460627113u, 1700936244u, 0, LDEXP_TOLERANCE, 0},
+{ 809, 1105063042u, 999185924u, 0u, 440u, 1566436482u, 999185924u, 0, LDEXP_TOLERANCE, 0},
+{ 810, 3207842510u, 788883399u, 0u, 125u, 3338914510u, 788883399u, 0, LDEXP_TOLERANCE, 0},
+{ 811, 1068639210u, 3699016825u, 0u, 408u, 1496458218u, 3699016825u, 0, LDEXP_TOLERANCE, 0},
+{ 812, 3254694575u, 3257889844u, 0u, 322u, 3592336047u, 3257889844u, 0, LDEXP_TOLERANCE, 0},
+{ 813, 3226459123u, 3557606351u, 0u, 466u, 3715095539u, 3557606351u, 0, LDEXP_TOLERANCE, 0},
+{ 814, 1096179175u, 2457013015u, 0u, 72u, 1171676647u, 2457013015u, 0, LDEXP_TOLERANCE, 0},
+{ 815, 1054624206u, 714673146u, 0u, 423u, 1498171854u, 714673146u, 0, LDEXP_TOLERANCE, 0},
+{ 816, 1068142810u, 798819874u, 0u, 305u, 1387958490u, 798819874u, 0, LDEXP_TOLERANCE, 0},
+{ 817, 3236531985u, 3685187432u, 0u, 32u, 3270086417u, 3685187432u, 0, LDEXP_TOLERANCE, 0},
+{ 818, 3215977438u, 2250028013u, 0u, 12u, 3228560350u, 2250028013u, 0, LDEXP_TOLERANCE, 0},
+{ 819, 3212961466u, 822905748u, 0u, 81u, 3297896122u, 822905748u, 0, LDEXP_TOLERANCE, 0},
+{ 820, 3221863333u, 162122081u, 0u, 161u, 3390684069u, 162122081u, 0, LDEXP_TOLERANCE, 0},
+{ 821, 3229017334u, 184971503u, 0u, 186u, 3424052470u, 184971503u, 0, LDEXP_TOLERANCE, 0},
+{ 822, 1068475748u, 3639227340u, 0u, 63u, 1134536036u, 3639227340u, 0, LDEXP_TOLERANCE, 0},
+{ 823, 1068863190u, 4192848976u, 0u, 110u, 1184206550u, 4192848976u, 0, LDEXP_TOLERANCE, 0},
+{ 824, 1067294567u, 3366476994u, 0u, 150u, 1224580967u, 3366476994u, 0, LDEXP_TOLERANCE, 0},
+{ 825, 3190744330u, 2826973629u, 0u, 361u, 3569280266u, 2826973629u, 0, LDEXP_TOLERANCE, 0},
+{ 826, 1093885013u, 3565509610u, 0u, 406u, 1519606869u, 3565509610u, 0, LDEXP_TOLERANCE, 0},
+{ 827, 1103860823u, 3945565763u, 0u, 470u, 1596691543u, 3945565763u, 0, LDEXP_TOLERANCE, 0},
+{ 828, 3253153113u, 3525488721u, 0u, 381u, 3652660569u, 3525488721u, 0, LDEXP_TOLERANCE, 0},
+{ 829, 1072788663u, 3844072288u, 0u, 27u, 1101100215u, 3844072288u, 0, LDEXP_TOLERANCE, 0},
+{ 830, 1105982382u, 396149483u, 0u, 309u, 1429992366u, 396149483u, 0, LDEXP_TOLERANCE, 0},
+{ 831, 3208357660u, 1296976426u, 0u, 226u, 3445335836u, 1296976426u, 0, LDEXP_TOLERANCE, 0},
+{ 832, 3198881428u, 3075911575u, 0u, 334u, 3549105812u, 3075911575u, 0, LDEXP_TOLERANCE, 0},
+{ 833, 3210025772u, 2171409636u, 0u, 214u, 3434421036u, 2171409636u, 0, LDEXP_TOLERANCE, 0},
+{ 834, 1085134286u, 3317203062u, 0u, 367u, 1469961678u, 3317203062u, 0, LDEXP_TOLERANCE, 0},
+{ 835, 1096024056u, 342573501u, 0u, 150u, 1253310456u, 342573501u, 0, LDEXP_TOLERANCE, 0},
+{ 836, 3214511676u, 1029815247u, 0u, 341u, 3572076092u, 1029815247u, 0, LDEXP_TOLERANCE, 0},
+{ 837, 1058864545u, 3610237982u, 0u, 168u, 1235025313u, 3610237982u, 0, LDEXP_TOLERANCE, 0},
+{ 838, 1087803418u, 915867083u, 0u, 25u, 1114017818u, 915867083u, 0, LDEXP_TOLERANCE, 0},
+{ 839, 1088029890u, 3972498826u, 0u, 437u, 1546257602u, 3972498826u, 0, LDEXP_TOLERANCE, 0},
+{ 840, 1069047467u, 4206678986u, 0u, 125u, 1200119467u, 4206678986u, 0, LDEXP_TOLERANCE, 0},
+{ 841, 3228983407u, 1162164397u, 0u, 273u, 3515244655u, 1162164397u, 0, LDEXP_TOLERANCE, 0},
+{ 842, 3250508564u, 2047944882u, 0u, 101u, 3356414740u, 2047944882u, 0, LDEXP_TOLERANCE, 0},
+{ 843, 3190469300u, 721926766u, 0u, 484u, 3697980084u, 721926766u, 0, LDEXP_TOLERANCE, 0},
+{ 844, 3205734397u, 858830829u, 0u, 96u, 3306397693u, 858830829u, 0, LDEXP_TOLERANCE, 0},
+{ 845, 3254021490u, 1884944479u, 0u, 101u, 3359927666u, 1884944479u, 0, LDEXP_TOLERANCE, 0},
+{ 846, 1061200790u, 770599461u, 0u, 457u, 1540400022u, 770599461u, 0, LDEXP_TOLERANCE, 0},
+{ 847, 1070178161u, 1235369496u, 0u, 91u, 1165598577u, 1235369496u, 0, LDEXP_TOLERANCE, 0},
+{ 848, 3224214082u, 2401751606u, 0u, 487u, 3734870594u, 2401751606u, 0, LDEXP_TOLERANCE, 0},
+{ 849, 3195861982u, 2825171386u, 0u, 305u, 3515677662u, 2825171386u, 0, LDEXP_TOLERANCE, 0},
+{ 850, 1061833598u, 1272591529u, 0u, 181u, 1251625854u, 1272591529u, 0, LDEXP_TOLERANCE, 0},
+{ 851, 1105686806u, 3174008470u, 0u, 444u, 1571254550u, 3174008470u, 0, LDEXP_TOLERANCE, 0},
+{ 852, 3201135451u, 1922413069u, 0u, 268u, 3482153819u, 1922413069u, 0, LDEXP_TOLERANCE, 0},
+{ 853, 1082801190u, 515824452u, 0u, 365u, 1465531430u, 515824452u, 0, LDEXP_TOLERANCE, 0},
+{ 854, 1069439223u, 2638362989u, 0u, 13u, 1083070711u, 2638362989u, 0, LDEXP_TOLERANCE, 0},
+{ 855, 1090196972u, 3350821426u, 0u, 214u, 1314592236u, 3350821426u, 0, LDEXP_TOLERANCE, 0},
+{ 856, 3222171679u, 2722693603u, 0u, 255u, 3489558559u, 2722693603u, 0, LDEXP_TOLERANCE, 0},
+{ 857, 3187717259u, 2277305925u, 0u, 150u, 3345003659u, 2277305925u, 0, LDEXP_TOLERANCE, 0},
+{ 858, 1043379197u, 1539782049u, 0u, 88u, 1135653885u, 1539782049u, 0, LDEXP_TOLERANCE, 0},
+{ 859, 1096830612u, 4029608359u, 0u, 440u, 1558204052u, 4029608359u, 0, LDEXP_TOLERANCE, 0},
+{ 860, 3252051109u, 2999983605u, 0u, 206u, 3468057765u, 2999983605u, 0, LDEXP_TOLERANCE, 0},
+{ 861, 1096654323u, 2577373394u, 0u, 178u, 1283300851u, 2577373394u, 0, LDEXP_TOLERANCE, 0},
+{ 862, 3210600814u, 3209526929u, 0u, 449u, 3681411438u, 3209526929u, 0, LDEXP_TOLERANCE, 0},
+{ 863, 1052682749u, 2164476593u, 0u, 416u, 1488890365u, 2164476593u, 0, LDEXP_TOLERANCE, 0},
+{ 864, 3239797146u, 1835860173u, 0u, 441u, 3702219162u, 1835860173u, 0, LDEXP_TOLERANCE, 0},
+{ 865, 1081200406u, 2422232642u, 0u, 387u, 1486999318u, 2422232642u, 0, LDEXP_TOLERANCE, 0},
+{ 866, 3217493714u, 236015626u, 0u, 448u, 3687255762u, 236015626u, 0, LDEXP_TOLERANCE, 0},
+{ 867, 3215229102u, 4091953286u, 0u, 50u, 3267657902u, 4091953286u, 0, LDEXP_TOLERANCE, 0},
+{ 868, 3232466491u, 4235242395u, 0u, 208u, 3450570299u, 4235242395u, 0, LDEXP_TOLERANCE, 0},
+{ 869, 1056148932u, 2226894195u, 0u, 12u, 1068731844u, 2226894195u, 0, LDEXP_TOLERANCE, 0},
+{ 870, 1085928888u, 1212597601u, 0u, 96u, 1186592184u, 1212597601u, 0, LDEXP_TOLERANCE, 0},
+{ 871, 1092491334u, 2547796519u, 0u, 394u, 1505630278u, 2547796519u, 0, LDEXP_TOLERANCE, 0},
+{ 872, 1089815741u, 931149948u, 0u, 9u, 1099252925u, 931149948u, 0, LDEXP_TOLERANCE, 0},
+{ 873, 1078166121u, 2663981399u, 0u, 128u, 1212383849u, 2663981399u, 0, LDEXP_TOLERANCE, 0},
+{ 874, 1099551055u, 1082898276u, 0u, 59u, 1161417039u, 1082898276u, 0, LDEXP_TOLERANCE, 0},
+{ 875, 1067193495u, 3092668216u, 0u, 368u, 1453069463u, 3092668216u, 0, LDEXP_TOLERANCE, 0},
+{ 876, 3220064091u, 735952225u, 0u, 121u, 3346941787u, 735952225u, 0, LDEXP_TOLERANCE, 0},
+{ 877, 1088308510u, 3170295088u, 0u, 223u, 1322140958u, 3170295088u, 0, LDEXP_TOLERANCE, 0},
+{ 878, 3239143845u, 3990023574u, 0u, 202u, 3450956197u, 3990023574u, 0, LDEXP_TOLERANCE, 0},
+{ 879, 1068793940u, 1025779807u, 0u, 496u, 1588887636u, 1025779807u, 0, LDEXP_TOLERANCE, 0},
+{ 880, 3217947229u, 937205825u, 0u, 96u, 3318610525u, 937205825u, 0, LDEXP_TOLERANCE, 0},
+{ 881, 3214656757u, 824051806u, 0u, 191u, 3414934773u, 824051806u, 0, LDEXP_TOLERANCE, 0},
+{ 882, 3246710531u, 2206975583u, 0u, 226u, 3483688707u, 2206975583u, 0, LDEXP_TOLERANCE, 0},
+{ 883, 3212669530u, 1645486982u, 0u, 405u, 3637342810u, 1645486982u, 0, LDEXP_TOLERANCE, 0},
+{ 884, 3239890670u, 668515593u, 0u, 162u, 3409759982u, 668515593u, 0, LDEXP_TOLERANCE, 0},
+{ 885, 3231063208u, 1981359339u, 0u, 110u, 3346406568u, 1981359339u, 0, LDEXP_TOLERANCE, 0},
+{ 886, 3224876941u, 895232801u, 0u, 11u, 3236411277u, 895232801u, 0, LDEXP_TOLERANCE, 0},
+{ 887, 3202462144u, 2479069370u, 0u, 76u, 3282153920u, 2479069370u, 0, LDEXP_TOLERANCE, 0},
+{ 888, 3230070172u, 424421119u, 0u, 428u, 3678860700u, 424421119u, 0, LDEXP_TOLERANCE, 0},
+{ 889, 3221132536u, 2265367339u, 0u, 401u, 3641611512u, 2265367339u, 0, LDEXP_TOLERANCE, 0},
+{ 890, 1095444173u, 1768241830u, 0u, 167u, 1270556365u, 1768241830u, 0, LDEXP_TOLERANCE, 0},
+{ 891, 1042815211u, 2742800982u, 0u, 114u, 1162352875u, 2742800982u, 0, LDEXP_TOLERANCE, 0},
+{ 892, 3227055805u, 66926332u, 0u, 47u, 3276338877u, 66926332u, 0, LDEXP_TOLERANCE, 0},
+{ 893, 3208978599u, 793918921u, 0u, 79u, 3291816103u, 793918921u, 0, LDEXP_TOLERANCE, 0},
+{ 894, 3190613834u, 2499520280u, 0u, 359u, 3567052618u, 2499520280u, 0, LDEXP_TOLERANCE, 0},
+{ 895, 3231820809u, 468583709u, 0u, 330u, 3577850889u, 468583709u, 0, LDEXP_TOLERANCE, 0},
+{ 896, 3209531041u, 216494777u, 0u, 244u, 3465383585u, 216494777u, 0, LDEXP_TOLERANCE, 0},
+{ 897, 3208867582u, 455371296u, 0u, 23u, 3232984830u, 455371296u, 0, LDEXP_TOLERANCE, 0},
+{ 898, 3237813129u, 1360096867u, 0u, 323u, 3576503177u, 1360096867u, 0, LDEXP_TOLERANCE, 0},
+{ 899, 3234511235u, 722957892u, 0u, 23u, 3258628483u, 722957892u, 0, LDEXP_TOLERANCE, 0},
+{ 900, 3196089837u, 1383518509u, 0u, 35u, 3232789997u, 1383518509u, 0, LDEXP_TOLERANCE, 0},
+{ 901, 3231254997u, 243303420u, 0u, 450u, 3703114197u, 243303420u, 0, LDEXP_TOLERANCE, 0},
+{ 902, 3226132757u, 2422073720u, 0u, 490u, 3739934997u, 2422073720u, 0, LDEXP_TOLERANCE, 0},
+{ 903, 3232217617u, 1389215707u, 0u, 453u, 3707222545u, 1389215707u, 0, LDEXP_TOLERANCE, 0},
+{ 904, 3192865206u, 1701554404u, 0u, 39u, 3233759670u, 1701554404u, 0, LDEXP_TOLERANCE, 0},
+{ 905, 1099239964u, 620596423u, 0u, 296u, 1409618460u, 620596423u, 0, LDEXP_TOLERANCE, 0},
+{ 906, 3204081936u, 794279522u, 0u, 292u, 3510266128u, 794279522u, 0, LDEXP_TOLERANCE, 0},
+{ 907, 3244160134u, 742203584u, 0u, 252u, 3508401286u, 742203584u, 0, LDEXP_TOLERANCE, 0},
+{ 908, 3226020545u, 101555209u, 0u, 493u, 3742968513u, 101555209u, 0, LDEXP_TOLERANCE, 0},
+{ 909, 1084214050u, 3065770846u, 0u, 178u, 1270860578u, 3065770846u, 0, LDEXP_TOLERANCE, 0},
+{ 910, 3251962512u, 3766248610u, 0u, 332u, 3600089744u, 3766248610u, 0, LDEXP_TOLERANCE, 0},
+{ 911, 1094059783u, 2353397886u, 0u, 139u, 1239811847u, 2353397886u, 0, LDEXP_TOLERANCE, 0},
+{ 912, 1067736547u, 3644468510u, 0u, 142u, 1216634339u, 3644468510u, 0, LDEXP_TOLERANCE, 0},
+{ 913, 3203153389u, 3668774238u, 0u, 414u, 3637263853u, 3668774238u, 0, LDEXP_TOLERANCE, 0},
+{ 914, 3254443077u, 3017062764u, 0u, 267u, 3534412869u, 3017062764u, 0, LDEXP_TOLERANCE, 0},
+{ 915, 3229391605u, 2125864003u, 0u, 138u, 3374095093u, 2125864003u, 0, LDEXP_TOLERANCE, 0},
+{ 916, 3189653973u, 2421488611u, 0u, 18u, 3208528341u, 2421488611u, 0, LDEXP_TOLERANCE, 0},
+{ 917, 3189245988u, 1539535238u, 0u, 106u, 3300395044u, 1539535238u, 0, LDEXP_TOLERANCE, 0},
+{ 918, 3246934215u, 508708967u, 0u, 166u, 3420997831u, 508708967u, 0, LDEXP_TOLERANCE, 0},
+{ 919, 1096820310u, 1045480938u, 0u, 260u, 1369450070u, 1045480938u, 0, LDEXP_TOLERANCE, 0},
+{ 920, 3253279675u, 4059455278u, 0u, 497u, 3774421947u, 4059455278u, 0, LDEXP_TOLERANCE, 0},
+{ 921, 1086656128u, 2085052714u, 0u, 327u, 1429540480u, 2085052714u, 0, LDEXP_TOLERANCE, 0},
+{ 922, 1101382876u, 3731725710u, 0u, 433u, 1555416284u, 3731725710u, 0, LDEXP_TOLERANCE, 0},
+{ 923, 1102379272u, 3644659426u, 0u, 465u, 1589967112u, 3644659426u, 0, LDEXP_TOLERANCE, 0},
+{ 924, 1042731156u, 1213208320u, 0u, 18u, 1061605524u, 1213208320u, 0, LDEXP_TOLERANCE, 0},
+{ 925, 1098023542u, 1856411393u, 0u, 54u, 1154646646u, 1856411393u, 0, LDEXP_TOLERANCE, 0},
+{ 926, 3203414683u, 2536686169u, 0u, 245u, 3460315803u, 2536686169u, 0, LDEXP_TOLERANCE, 0},
+{ 927, 3221235845u, 3482598782u, 0u, 332u, 3569363077u, 3482598782u, 0, LDEXP_TOLERANCE, 0},
+{ 928, 1054849265u, 2353103845u, 0u, 466u, 1543485681u, 2353103845u, 0, LDEXP_TOLERANCE, 0},
+{ 929, 3246279974u, 1941016128u, 0u, 459u, 3727576358u, 1941016128u, 0, LDEXP_TOLERANCE, 0},
+{ 930, 3223498027u, 3374865460u, 0u, 227u, 3461524779u, 3374865460u, 0, LDEXP_TOLERANCE, 0},
+{ 931, 1043393020u, 3103223670u, 0u, 323u, 1382083068u, 3103223670u, 0, LDEXP_TOLERANCE, 0},
+{ 932, 1044929218u, 2872266489u, 0u, 418u, 1483233986u, 2872266489u, 0, LDEXP_TOLERANCE, 0},
+{ 933, 1050828303u, 2217887323u, 0u, 367u, 1435655695u, 2217887323u, 0, LDEXP_TOLERANCE, 0},
+{ 934, 3200788569u, 1848418423u, 0u, 200u, 3410503769u, 1848418423u, 0, LDEXP_TOLERANCE, 0},
+{ 935, 3249371352u, 2746559855u, 0u, 29u, 3279780056u, 2746559855u, 0, LDEXP_TOLERANCE, 0},
+{ 936, 3214435784u, 3646244007u, 0u, 192u, 3415762376u, 3646244007u, 0, LDEXP_TOLERANCE, 0},
+{ 937, 3197852749u, 3808681655u, 0u, 123u, 3326827597u, 3808681655u, 0, LDEXP_TOLERANCE, 0},
+{ 938, 1046103353u, 3261896205u, 0u, 69u, 1118455097u, 3261896205u, 0, LDEXP_TOLERANCE, 0},
+{ 939, 3198169239u, 2607332678u, 0u, 203u, 3411030167u, 2607332678u, 0, LDEXP_TOLERANCE, 0},
+{ 940, 3202585798u, 910680626u, 0u, 363u, 3583218886u, 910680626u, 0, LDEXP_TOLERANCE, 0},
+{ 941, 1090685451u, 2102413329u, 0u, 424u, 1535281675u, 2102413329u, 0, LDEXP_TOLERANCE, 0},
+{ 942, 3253874340u, 3516336233u, 0u, 90u, 3348246180u, 3516336233u, 0, LDEXP_TOLERANCE, 0},
+{ 943, 3232355944u, 1410347277u, 0u, 71u, 3306804840u, 1410347277u, 0, LDEXP_TOLERANCE, 0},
+{ 944, 3237050423u, 107788725u, 0u, 162u, 3406919735u, 107788725u, 0, LDEXP_TOLERANCE, 0},
+{ 945, 3231252730u, 1784424659u, 0u, 297u, 3542679802u, 1784424659u, 0, LDEXP_TOLERANCE, 0},
+{ 946, 3199349254u, 1019916843u, 0u, 366u, 3583128070u, 1019916843u, 0, LDEXP_TOLERANCE, 0},
+{ 947, 1083813098u, 2171986964u, 0u, 359u, 1460251882u, 2171986964u, 0, LDEXP_TOLERANCE, 0},
+{ 948, 1096604388u, 736131791u, 0u, 408u, 1524423396u, 736131791u, 0, LDEXP_TOLERANCE, 0},
+{ 949, 1071811135u, 3766682389u, 0u, 127u, 1204980287u, 3766682389u, 0, LDEXP_TOLERANCE, 0},
+{ 950, 1076891662u, 2200276237u, 0u, 420u, 1517293582u, 2200276237u, 0, LDEXP_TOLERANCE, 0},
+{ 951, 3234542983u, 2689686464u, 0u, 162u, 3404412295u, 2689686464u, 0, LDEXP_TOLERANCE, 0},
+{ 952, 3247609257u, 139905412u, 0u, 24u, 3272775081u, 139905412u, 0, LDEXP_TOLERANCE, 0},
+{ 953, 3234048376u, 580580861u, 0u, 373u, 3625167224u, 580580861u, 0, LDEXP_TOLERANCE, 0},
+{ 954, 3210191121u, 3524948352u, 0u, 366u, 3593969937u, 3524948352u, 0, LDEXP_TOLERANCE, 0},
+{ 955, 1101737698u, 914741728u, 0u, 349u, 1467690722u, 914741728u, 0, LDEXP_TOLERANCE, 0},
+{ 956, 1092886795u, 464054401u, 0u, 229u, 1333010699u, 464054401u, 0, LDEXP_TOLERANCE, 0},
+{ 957, 1075509277u, 417745917u, 0u, 31u, 1108015133u, 417745917u, 0, LDEXP_TOLERANCE, 0},
+{ 958, 1057279131u, 1709794784u, 0u, 249u, 1318374555u, 1709794784u, 0, LDEXP_TOLERANCE, 0},
+{ 959, 3234100445u, 3278422298u, 0u, 342u, 3592713437u, 3278422298u, 0, LDEXP_TOLERANCE, 0},
+{ 960, 3203733705u, 4261064982u, 0u, 240u, 3455391945u, 4261064982u, 0, LDEXP_TOLERANCE, 0},
+{ 961, 1100643460u, 2128617108u, 0u, 271u, 1384807556u, 2128617108u, 0, LDEXP_TOLERANCE, 0},
+{ 962, 3240438466u, 21888920u, 0u, 78u, 3322227394u, 21888920u, 0, LDEXP_TOLERANCE, 0},
+{ 963, 3197739999u, 1373233750u, 0u, 325u, 3538527199u, 1373233750u, 0, LDEXP_TOLERANCE, 0},
+{ 964, 3213773114u, 834976849u, 0u, 287u, 3514714426u, 834976849u, 0, LDEXP_TOLERANCE, 0},
+{ 965, 1106728187u, 1569913360u, 0u, 162u, 1276597499u, 1569913360u, 0, LDEXP_TOLERANCE, 0},
+{ 966, 1101338019u, 1916097176u, 0u, 119u, 1226118563u, 1916097176u, 0, LDEXP_TOLERANCE, 0},
+{ 967, 1088500589u, 2029599667u, 0u, 68u, 1159803757u, 2029599667u, 0, LDEXP_TOLERANCE, 0},
+{ 968, 3223722021u, 1092470959u, 0u, 287u, 3524663333u, 1092470959u, 0, LDEXP_TOLERANCE, 0},
+{ 969, 3227158932u, 904208640u, 0u, 104u, 3336210836u, 904208640u, 0, LDEXP_TOLERANCE, 0},
+{ 970, 3252936386u, 3748743654u, 0u, 398u, 3670269634u, 3748743654u, 0, LDEXP_TOLERANCE, 0},
+{ 971, 3214785260u, 3298077351u, 0u, 199u, 3423451884u, 3298077351u, 0, LDEXP_TOLERANCE, 0},
+{ 972, 3239386269u, 4236797974u, 0u, 54u, 3296009373u, 4236797974u, 0, LDEXP_TOLERANCE, 0},
+{ 973, 3233687691u, 2405805086u, 0u, 205u, 3448645771u, 2405805086u, 0, LDEXP_TOLERANCE, 0},
+{ 974, 3222929431u, 4279456618u, 0u, 66u, 3292135447u, 4279456618u, 0, LDEXP_TOLERANCE, 0},
+{ 975, 1045375126u, 3817511514u, 0u, 385u, 1449076886u, 3817511514u, 0, LDEXP_TOLERANCE, 0},
+{ 976, 1081540030u, 2658217784u, 0u, 224u, 1316421054u, 2658217784u, 0, LDEXP_TOLERANCE, 0},
+{ 977, 3242908935u, 2848327573u, 0u, 90u, 3337280775u, 2848327573u, 0, LDEXP_TOLERANCE, 0},
+{ 978, 1073045264u, 1841901027u, 0u, 326u, 1414881040u, 1841901027u, 0, LDEXP_TOLERANCE, 0},
+{ 979, 1090819154u, 1205187797u, 0u, 439u, 1551144018u, 1205187797u, 0, LDEXP_TOLERANCE, 0},
+{ 980, 3233869823u, 1390957964u, 0u, 5u, 3239112703u, 1390957964u, 0, LDEXP_TOLERANCE, 0},
+{ 981, 3208658945u, 2704249815u, 0u, 244u, 3464511489u, 2704249815u, 0, LDEXP_TOLERANCE, 0},
+{ 982, 3229123692u, 338765118u, 0u, 205u, 3444081772u, 338765118u, 0, LDEXP_TOLERANCE, 0},
+{ 983, 3215638141u, 2059348626u, 0u, 53u, 3271212669u, 2059348626u, 0, LDEXP_TOLERANCE, 0},
+{ 984, 3206590689u, 3769581744u, 0u, 220u, 3437277409u, 3769581744u, 0, LDEXP_TOLERANCE, 0},
+{ 985, 1087767451u, 2442561375u, 0u, 352u, 1456866203u, 2442561375u, 0, LDEXP_TOLERANCE, 0},
+{ 986, 1043029185u, 1826571949u, 0u, 287u, 1343970497u, 1826571949u, 0, LDEXP_TOLERANCE, 0},
+{ 987, 3227038874u, 4157848135u, 0u, 470u, 3719869594u, 4157848135u, 0, LDEXP_TOLERANCE, 0},
+{ 988, 3210023815u, 3262641707u, 0u, 239u, 3460633479u, 3262641707u, 0, LDEXP_TOLERANCE, 0},
+{ 989, 3233710961u, 851510610u, 0u, 299u, 3547235185u, 851510610u, 0, LDEXP_TOLERANCE, 0},
+{ 990, 3232296686u, 55834416u, 0u, 155u, 3394825966u, 55834416u, 0, LDEXP_TOLERANCE, 0},
+{ 991, 1067699608u, 4282766727u, 0u, 208u, 1285803416u, 4282766727u, 0, LDEXP_TOLERANCE, 0},
+{ 992, 1073603056u, 2574237400u, 0u, 399u, 1491984880u, 2574237400u, 0, LDEXP_TOLERANCE, 0},
+{ 993, 1059828657u, 1824828952u, 0u, 9u, 1069265841u, 1824828952u, 0, LDEXP_TOLERANCE, 0},
+{ 994, 3243078353u, 4292530873u, 0u, 111u, 3359470289u, 4292530873u, 0, LDEXP_TOLERANCE, 0},
+{ 995, 1066526787u, 3220678991u, 0u, 61u, 1130489923u, 3220678991u, 0, LDEXP_TOLERANCE, 0},
+{ 996, 1101299693u, 4056776748u, 0u, 465u, 1588887533u, 4056776748u, 0, LDEXP_TOLERANCE, 0},
+{ 997, 1071354531u, 683713613u, 0u, 210u, 1291555491u, 683713613u, 0, LDEXP_TOLERANCE, 0},
+{ 998, 1089099910u, 2719336106u, 0u, 473u, 1585076358u, 2719336106u, 0, LDEXP_TOLERANCE, 0},
+{ 999, 1084514518u, 343139655u, 0u, 247u, 1343512790u, 343139655u, 0, LDEXP_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_LDEXP_H multiple inclusion protection
+
+// EOF ldexp.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/log.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/log.c
new file mode 100644
index 0000000000..a9e2e1f876
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/log.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// log.c
+//
+// Test of log() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/log.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(log_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &log, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_NONE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &log_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("log() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("log() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library log() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "log() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF log.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/log.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/log.h
new file mode 100644
index 0000000000..941b3880df
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/log.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_LOG_H
+#define CYGONCE_LIBM_LOG_H
+//===========================================================================
+//
+// log.h
+//
+// Test vectors for testing of log() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/log.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define LOG_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t log_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1077999148u, 2506787616u, 1090024059u, 3619148316u, 1074540891u, 1903028788u, 0, LOG_TOLERANCE, 0},
+{ 2, 1070670006u, 3176730980u, 1051524793u, 2993920299u, 3220510532u, 3615487687u, 0, LOG_TOLERANCE, 0},
+{ 3, 1092176155u, 2725707538u, 3232101343u, 2346810316u, 1076485723u, 3768096846u, 0, LOG_TOLERANCE, 0},
+{ 4, 1092554362u, 2088062470u, 3201242716u, 420891118u, 1076512669u, 440847476u, 0, LOG_TOLERANCE, 0},
+{ 5, 1073717029u, 2636405208u, 1100049309u, 471635570u, 1072024788u, 3752333164u, 0, LOG_TOLERANCE, 0},
+{ 6, 1089363191u, 1746012320u, 1054478713u, 3333988501u, 1076237152u, 3881795292u, 0, LOG_TOLERANCE, 0},
+{ 7, 1047953160u, 183014794u, 3202039382u, 2016785810u, 3224390518u, 1303331829u, 0, LOG_TOLERANCE, 0},
+{ 8, 1066002386u, 2688957927u, 1046089230u, 2709029994u, 3222371083u, 2601131004u, 0, LOG_TOLERANCE, 0},
+{ 9, 1058795730u, 624574473u, 1045840574u, 3473266330u, 3223472906u, 2217450498u, 0, LOG_TOLERANCE, 0},
+{ 10, 1057436194u, 1605286142u, 1068931671u, 4233776869u, 3223588152u, 3229387891u, 0, LOG_TOLERANCE, 0},
+{ 11, 1060343410u, 1857607719u, 3222889559u, 3417070006u, 3223337966u, 225906160u, 0, LOG_TOLERANCE, 0},
+{ 12, 1103599987u, 3981151660u, 1088899021u, 1332651746u, 1077181802u, 896846388u, 0, LOG_TOLERANCE, 0},
+{ 13, 1085298022u, 3824988054u, 1066856791u, 2070129652u, 1075883331u, 34639343u, 0, LOG_TOLERANCE, 0},
+{ 14, 1060076142u, 1372884064u, 1080833116u, 3229926662u, 3223366428u, 4150257867u, 0, LOG_TOLERANCE, 0},
+{ 15, 1093826501u, 3217805330u, 3191644264u, 2014578707u, 1076626245u, 603858158u, 0, LOG_TOLERANCE, 0},
+{ 16, 1102287487u, 265058758u, 3239903247u, 1630600647u, 1077124113u, 3025164482u, 0, LOG_TOLERANCE, 0},
+{ 17, 1071124229u, 1946677669u, 3198462609u, 926009897u, 3220131571u, 69509414u, 0, LOG_TOLERANCE, 0},
+{ 18, 1072130299u, 2271884183u, 3203741999u, 2118617783u, 3218342176u, 3539920578u, 0, LOG_TOLERANCE, 0},
+{ 19, 1047365461u, 213658772u, 3249401130u, 314151656u, 3224418117u, 3079041052u, 0, LOG_TOLERANCE, 0},
+{ 20, 1106628640u, 1564829925u, 3197817016u, 497230814u, 1077312921u, 3110556593u, 0, LOG_TOLERANCE, 0},
+{ 21, 1068778986u, 2075329122u, 3231746400u, 169900577u, 3221506428u, 2398289983u, 0, LOG_TOLERANCE, 0},
+{ 22, 1049848642u, 541549344u, 1096608669u, 3119070100u, 3224247412u, 1892715843u, 0, LOG_TOLERANCE, 0},
+{ 23, 1085427055u, 567496114u, 1045286891u, 1969998540u, 1075898248u, 2464173132u, 0, LOG_TOLERANCE, 0},
+{ 24, 1060548195u, 1299369769u, 1049342524u, 4167404066u, 3223314449u, 3975492231u, 0, LOG_TOLERANCE, 0},
+{ 25, 1061381997u, 3348930841u, 1078472138u, 358457347u, 3223173654u, 3330331685u, 0, LOG_TOLERANCE, 0},
+{ 26, 1071069297u, 2192461366u, 1099527247u, 3184735642u, 3220191417u, 194538985u, 0, LOG_TOLERANCE, 0},
+{ 27, 1052861772u, 331696577u, 3189610016u, 793242270u, 3223989277u, 2142326960u, 0, LOG_TOLERANCE, 0},
+{ 28, 1105045286u, 2322696981u, 1083791358u, 3020766674u, 1077242192u, 3024017455u, 0, LOG_TOLERANCE, 0},
+{ 29, 1044902177u, 252085215u, 3214426435u, 4139068910u, 3224522714u, 3356017132u, 0, LOG_TOLERANCE, 0},
+{ 30, 1075022077u, 105589263u, 1056316170u, 261630827u, 1073307628u, 2770724689u, 0, LOG_TOLERANCE, 0},
+{ 31, 1107213408u, 428765703u, 3251828686u, 2009972239u, 1077335395u, 2429249706u, 0, LOG_TOLERANCE, 0},
+{ 32, 1098568019u, 3517376586u, 3240257920u, 3304487302u, 1076963049u, 3484578711u, 0, LOG_TOLERANCE, 0},
+{ 33, 1086054264u, 237004814u, 3237899261u, 3364008659u, 1075953380u, 1844071u, 0, LOG_TOLERANCE, 0},
+{ 34, 1047763904u, 472004928u, 3226869477u, 1186387580u, 3224399522u, 1007725918u, 0, LOG_TOLERANCE, 0},
+{ 35, 1054226850u, 4085763910u, 1106394906u, 2684738273u, 3223866312u, 1979790125u, 0, LOG_TOLERANCE, 0},
+{ 36, 1057053639u, 2055490142u, 3231581370u, 3879040079u, 3223626149u, 806421346u, 0, LOG_TOLERANCE, 0},
+{ 37, 1041492999u, 3725731239u, 1061652681u, 591292963u, 3224671038u, 4206351851u, 0, LOG_TOLERANCE, 0},
+{ 38, 1077531333u, 1147041027u, 3215417793u, 624695933u, 1074397854u, 304138034u, 0, LOG_TOLERANCE, 0},
+{ 39, 1058569126u, 705725219u, 3238067573u, 1116238321u, 3223490221u, 3627345304u, 0, LOG_TOLERANCE, 0},
+{ 40, 1059883440u, 7287411u, 1045917232u, 116067742u, 3223379282u, 2727133729u, 0, LOG_TOLERANCE, 0},
+{ 41, 1092571574u, 3604989074u, 1066381836u, 545298780u, 1076513772u, 3839904761u, 0, LOG_TOLERANCE, 0},
+{ 42, 1071597288u, 1681476121u, 1060345752u, 3553822398u, 3219581306u, 453941245u, 0, LOG_TOLERANCE, 0},
+{ 43, 1102831658u, 3410480388u, 1052460275u, 1660607230u, 1077147289u, 3910731824u, 0, LOG_TOLERANCE, 0},
+{ 44, 1089216869u, 1494984673u, 3196647153u, 287894723u, 1076227142u, 81073844u, 0, LOG_TOLERANCE, 0},
+{ 45, 1054885127u, 644548665u, 1081948134u, 2442134629u, 3223816344u, 2988035667u, 0, LOG_TOLERANCE, 0},
+{ 46, 1087554095u, 2312530895u, 3221584595u, 3379665576u, 1076083178u, 4168414754u, 0, LOG_TOLERANCE, 0},
+{ 47, 1096085375u, 3018463866u, 1086226574u, 404012923u, 1076824388u, 355380855u, 0, LOG_TOLERANCE, 0},
+{ 48, 1064733299u, 1710279345u, 3251401196u, 3528946000u, 3222589259u, 4043295995u, 0, LOG_TOLERANCE, 0},
+{ 49, 1061536351u, 2164450219u, 1083520023u, 3312018966u, 3223143623u, 2781389049u, 0, LOG_TOLERANCE, 0},
+{ 50, 1057248676u, 2648986431u, 1050330591u, 1474376550u, 3223605408u, 2621621078u, 0, LOG_TOLERANCE, 0},
+{ 51, 1046938380u, 1839068700u, 1077406406u, 3013052171u, 3224434459u, 186039155u, 0, LOG_TOLERANCE, 0},
+{ 52, 1046493630u, 772102380u, 3220729740u, 4219039958u, 3224457358u, 3891328709u, 0, LOG_TOLERANCE, 0},
+{ 53, 1081988573u, 3058618779u, 1046304788u, 3338676024u, 1075358802u, 3664366177u, 0, LOG_TOLERANCE, 0},
+{ 54, 1051172137u, 506286854u, 1094907481u, 2217000199u, 3224130924u, 2266434652u, 0, LOG_TOLERANCE, 0},
+{ 55, 1082428310u, 1147428263u, 1065432625u, 3034786717u, 1075442710u, 1201247296u, 0, LOG_TOLERANCE, 0},
+{ 56, 1082016752u, 2844125311u, 1082985198u, 2561492677u, 1075362553u, 3473284473u, 0, LOG_TOLERANCE, 0},
+{ 57, 1064053268u, 704542600u, 3222902057u, 2762779203u, 3222712577u, 292535648u, 0, LOG_TOLERANCE, 0},
+{ 58, 1052196966u, 184131949u, 3249723525u, 1667366082u, 3224042099u, 902609229u, 0, LOG_TOLERANCE, 0},
+{ 59, 1076125950u, 3904224140u, 1067056698u, 2942159914u, 1073910305u, 801875395u, 0, LOG_TOLERANCE, 0},
+{ 60, 1100636863u, 426114282u, 3209056785u, 1083606355u, 1077052837u, 3461243802u, 0, LOG_TOLERANCE, 0},
+{ 61, 1106165945u, 3774123863u, 1106787580u, 2722107965u, 1077290005u, 3002616544u, 0, LOG_TOLERANCE, 0},
+{ 62, 1088005092u, 1377734762u, 1104232051u, 2377063483u, 1076124140u, 2634112070u, 0, LOG_TOLERANCE, 0},
+{ 63, 1069380559u, 1029739074u, 1105467109u, 3062201018u, 3221310617u, 3355564135u, 0, LOG_TOLERANCE, 0},
+{ 64, 1087257949u, 773857656u, 3214251949u, 335833884u, 1076054914u, 2342316503u, 0, LOG_TOLERANCE, 0},
+{ 65, 1055740962u, 1473865960u, 1103073830u, 4000427507u, 3223739108u, 2937886411u, 0, LOG_TOLERANCE, 0},
+{ 66, 1103185231u, 4242092620u, 1067009473u, 14539161u, 1077161341u, 1502148359u, 0, LOG_TOLERANCE, 0},
+{ 67, 1045032426u, 1732245037u, 1101371955u, 1533536108u, 3224517488u, 2540091285u, 0, LOG_TOLERANCE, 0},
+{ 68, 1101670347u, 1833841275u, 1099430098u, 4144145552u, 1077097689u, 1827704426u, 0, LOG_TOLERANCE, 0},
+{ 69, 1096786815u, 935007012u, 3188865420u, 604442938u, 1076878511u, 3599854352u, 0, LOG_TOLERANCE, 0},
+{ 70, 1059419605u, 2211464602u, 1046255144u, 1635910526u, 3223416641u, 2853698743u, 0, LOG_TOLERANCE, 0},
+{ 71, 1077871417u, 2549219008u, 3231633258u, 3733639385u, 1074493859u, 1273814856u, 0, LOG_TOLERANCE, 0},
+{ 72, 1082095089u, 1819374372u, 3202219056u, 2617077637u, 1075372707u, 3860522421u, 0, LOG_TOLERANCE, 0},
+{ 73, 1094345280u, 546465680u, 1048653554u, 532401530u, 1076673000u, 3709218343u, 0, LOG_TOLERANCE, 0},
+{ 74, 1044571091u, 2759019783u, 3221570188u, 3554409630u, 3224538246u, 3654279494u, 0, LOG_TOLERANCE, 0},
+{ 75, 1065447634u, 2527221960u, 1099107978u, 2696971136u, 3222474800u, 4009812961u, 0, LOG_TOLERANCE, 0},
+{ 76, 1097158000u, 173134582u, 1087299442u, 2877794600u, 1076902534u, 3732378643u, 0, LOG_TOLERANCE, 0},
+{ 77, 1086400474u, 547642046u, 3197285510u, 3521286127u, 1075980619u, 1773153190u, 0, LOG_TOLERANCE, 0},
+{ 78, 1074860702u, 1231582831u, 1090971734u, 1653446832u, 1073166352u, 3728304610u, 0, LOG_TOLERANCE, 0},
+{ 79, 1061342535u, 3762182190u, 3252967851u, 2615360375u, 3223181918u, 1963485299u, 0, LOG_TOLERANCE, 0},
+{ 80, 1053350775u, 2588067350u, 3206610957u, 3551059728u, 3223942494u, 644369098u, 0, LOG_TOLERANCE, 0},
+{ 81, 1059495208u, 845263327u, 1073415902u, 1749010288u, 3223409778u, 2981196663u, 0, LOG_TOLERANCE, 0},
+{ 82, 1058092722u, 3092685191u, 3190678390u, 2872219490u, 3223536395u, 1369453498u, 0, LOG_TOLERANCE, 0},
+{ 83, 1070831407u, 4107255722u, 3205337291u, 3069068345u, 3220369660u, 1794319742u, 0, LOG_TOLERANCE, 0},
+{ 84, 1096507209u, 2294867524u, 3216653996u, 2860384670u, 1076859525u, 3809728678u, 0, LOG_TOLERANCE, 0},
+{ 85, 1045842702u, 2265437201u, 3240198679u, 1234948614u, 3224481964u, 2712155181u, 0, LOG_TOLERANCE, 0},
+{ 86, 1068876281u, 1186945904u, 3251167793u, 1896750851u, 3221469375u, 2742155072u, 0, LOG_TOLERANCE, 0},
+{ 87, 1081575478u, 3686084548u, 1079286273u, 3309277689u, 1075296587u, 3889440640u, 0, LOG_TOLERANCE, 0},
+{ 88, 1075992592u, 3006860614u, 3231412671u, 2504194724u, 1073855151u, 3443930242u, 0, LOG_TOLERANCE, 0},
+{ 89, 1088665612u, 1948717780u, 1048317852u, 3791803982u, 1076180575u, 2837452927u, 0, LOG_TOLERANCE, 0},
+{ 90, 1064345015u, 4272034420u, 3192982124u, 1526175922u, 3222669202u, 2086824310u, 0, LOG_TOLERANCE, 0},
+{ 91, 1098334178u, 4108948538u, 1104691287u, 640541190u, 1076953692u, 3764323674u, 0, LOG_TOLERANCE, 0},
+{ 92, 1059773769u, 3259274853u, 1082507103u, 3677038020u, 3223387203u, 652947737u, 0, LOG_TOLERANCE, 0},
+{ 93, 1083132498u, 3781708548u, 1096584871u, 1207386447u, 1075552988u, 2879643514u, 0, LOG_TOLERANCE, 0},
+{ 94, 1041211624u, 3011191657u, 1103798670u, 1096124830u, 3224686171u, 4236981062u, 0, LOG_TOLERANCE, 0},
+{ 95, 1063235023u, 2540404725u, 3240157452u, 4122845725u, 3222863454u, 3023388900u, 0, LOG_TOLERANCE, 0},
+{ 96, 1083643710u, 311336721u, 3214382367u, 4212533768u, 1075655034u, 3985941u, 0, LOG_TOLERANCE, 0},
+{ 97, 1051139427u, 1769686293u, 3240200923u, 3538602249u, 3224133724u, 2580792529u, 0, LOG_TOLERANCE, 0},
+{ 98, 1078227549u, 508056696u, 1103793878u, 776520138u, 1074638865u, 873855649u, 0, LOG_TOLERANCE, 0},
+{ 99, 1102910577u, 4064962760u, 1077424413u, 819766631u, 1077150061u, 2488377505u, 0, LOG_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 1072736455u, 2653940335u, 0, LOG_TOLERANCE, 0},
+{ 101, 1082295059u, 2514398118u, 1076579751u, 870169764u, 1075415392u, 845037314u, 0, LOG_TOLERANCE, 0},
+{ 102, 1099367744u, 1190259653u, 1069112254u, 3417249840u, 1076998470u, 583465987u, 0, LOG_TOLERANCE, 0},
+{ 103, 1046179435u, 3467757357u, 3215075200u, 2168175352u, 3224468372u, 699090977u, 0, LOG_TOLERANCE, 0},
+{ 104, 1092159487u, 1508888184u, 1060430241u, 3524949092u, 1076484398u, 3433728995u, 0, LOG_TOLERANCE, 0},
+{ 105, 1049929235u, 166402802u, 3237198975u, 3572369260u, 3224239364u, 1031401866u, 0, LOG_TOLERANCE, 0},
+{ 106, 1081866822u, 2441536203u, 3202753937u, 3658194573u, 1075341949u, 2087866809u, 0, LOG_TOLERANCE, 0},
+{ 107, 1062392908u, 2479742828u, 1062342831u, 4214154303u, 3222999832u, 525496360u, 0, LOG_TOLERANCE, 0},
+{ 108, 1082396794u, 426896765u, 1066474375u, 2201754442u, 1075436501u, 1627606965u, 0, LOG_TOLERANCE, 0},
+{ 109, 1048145373u, 2055773734u, 3239267288u, 291396537u, 3224382486u, 3880399396u, 0, LOG_TOLERANCE, 0},
+{ 110, 1089484385u, 874125203u, 3210508124u, 4091098764u, 1076245763u, 2990601621u, 0, LOG_TOLERANCE, 0},
+{ 111, 1065716026u, 120488169u, 3241241441u, 1985269424u, 3222419509u, 1596544603u, 0, LOG_TOLERANCE, 0},
+{ 112, 1059055762u, 2243036871u, 3243941101u, 740033495u, 3223455501u, 3494510298u, 0, LOG_TOLERANCE, 0},
+{ 113, 1061941258u, 1176656356u, 1074261978u, 3588756231u, 3223078104u, 2251846605u, 0, LOG_TOLERANCE, 0},
+{ 114, 1105333143u, 3037249392u, 1061635587u, 1173102190u, 1077255068u, 2564022463u, 0, LOG_TOLERANCE, 0},
+{ 115, 1089725933u, 2882725208u, 1071440059u, 69225090u, 1076272613u, 3133483140u, 0, LOG_TOLERANCE, 0},
+{ 116, 1065179826u, 272319256u, 1072073912u, 2493997123u, 3222520025u, 35444247u, 0, LOG_TOLERANCE, 0},
+{ 117, 1057720186u, 188610379u, 3232757923u, 2209647371u, 3223565703u, 1891613632u, 0, LOG_TOLERANCE, 0},
+{ 118, 1089274869u, 1990439193u, 1078073146u, 622849962u, 1076231202u, 576311790u, 0, LOG_TOLERANCE, 0},
+{ 119, 1057135741u, 756052458u, 1081649113u, 2247475162u, 3223617015u, 1816165507u, 0, LOG_TOLERANCE, 0},
+{ 120, 1061623064u, 3878055211u, 3222407050u, 2979438623u, 3223128149u, 56153389u, 0, LOG_TOLERANCE, 0},
+{ 121, 1047807349u, 2676398686u, 1105124431u, 3631096636u, 3224397343u, 888392923u, 0, LOG_TOLERANCE, 0},
+{ 122, 1065079390u, 1697791764u, 3198136112u, 2299842819u, 3222534081u, 901870173u, 0, LOG_TOLERANCE, 0},
+{ 123, 1078084768u, 1931502677u, 3215264397u, 3016456382u, 1074579794u, 2595838239u, 0, LOG_TOLERANCE, 0},
+{ 124, 1072253426u, 343404215u, 1061072607u, 4266232536u, 3217957038u, 249307172u, 0, LOG_TOLERANCE, 0},
+{ 125, 1093747188u, 4140316002u, 1082896196u, 868256971u, 1076617361u, 2144012240u, 0, LOG_TOLERANCE, 0},
+{ 126, 1075422810u, 1864139509u, 3187675097u, 3084482407u, 1073593180u, 257551340u, 0, LOG_TOLERANCE, 0},
+{ 127, 1072707675u, 2427162817u, 3234748208u, 2715105792u, 1066138778u, 4007247913u, 0, LOG_TOLERANCE, 0},
+{ 128, 1064600512u, 3943389284u, 1046724025u, 3626825684u, 3222613950u, 3450803557u, 0, LOG_TOLERANCE, 0},
+{ 129, 1045423002u, 967350972u, 1093012318u, 448002663u, 3224503930u, 40325151u, 0, LOG_TOLERANCE, 0},
+{ 130, 1104362211u, 105058217u, 1069733884u, 171786224u, 1077213809u, 3629677324u, 0, LOG_TOLERANCE, 0},
+{ 131, 1042130860u, 2863482262u, 3204997271u, 877784425u, 3224644968u, 1676714437u, 0, LOG_TOLERANCE, 0},
+{ 132, 1055145665u, 2801782962u, 3213604117u, 762347195u, 3223787690u, 2201912701u, 0, LOG_TOLERANCE, 0},
+{ 133, 1086003079u, 2317950339u, 3246333414u, 2135700283u, 1075949654u, 3685526240u, 0, LOG_TOLERANCE, 0},
+{ 134, 1056516397u, 4171919805u, 1082858682u, 2180920863u, 3223668346u, 2563284746u, 0, LOG_TOLERANCE, 0},
+{ 135, 1072665436u, 1918836931u, 1083603224u, 3137821660u, 3213580135u, 893380042u, 0, LOG_TOLERANCE, 0},
+{ 136, 1103902874u, 3456203663u, 3235600523u, 2335688936u, 1077193523u, 822124921u, 0, LOG_TOLERANCE, 0},
+{ 137, 1042279322u, 4170235262u, 1051824459u, 521583737u, 3224640144u, 325222787u, 0, LOG_TOLERANCE, 0},
+{ 138, 1081348303u, 1296623194u, 3250673860u, 2442872540u, 1075254813u, 4250911823u, 0, LOG_TOLERANCE, 0},
+{ 139, 1061684277u, 289979405u, 1049514449u, 3865737145u, 3223117750u, 1822741563u, 0, LOG_TOLERANCE, 0},
+{ 140, 1075298944u, 3699090239u, 1054539840u, 3259249360u, 1073512919u, 2889360534u, 0, LOG_TOLERANCE, 0},
+{ 141, 1096418100u, 1619819023u, 1045993352u, 1022642459u, 1076852847u, 2966471226u, 0, LOG_TOLERANCE, 0},
+{ 142, 1081433004u, 19455098u, 3229182089u, 2096003654u, 1075271177u, 857411703u, 0, LOG_TOLERANCE, 0},
+{ 143, 1076297936u, 3803689997u, 1071630912u, 2263729518u, 1073973813u, 3836746166u, 0, LOG_TOLERANCE, 0},
+{ 144, 1101357261u, 2816837387u, 1063422305u, 2597606398u, 1077084471u, 2387840489u, 0, LOG_TOLERANCE, 0},
+{ 145, 1069100169u, 3680967506u, 1040201163u, 179224723u, 3221392912u, 284483311u, 0, LOG_TOLERANCE, 0},
+{ 146, 1041146119u, 978126928u, 1101553990u, 4047893399u, 3224688276u, 2169141442u, 0, LOG_TOLERANCE, 0},
+{ 147, 1074838397u, 4059818629u, 1042678728u, 3640293589u, 1073145238u, 3502645173u, 0, LOG_TOLERANCE, 0},
+{ 148, 1100980392u, 3383497159u, 1070002807u, 1527313008u, 1077064713u, 1414579044u, 0, LOG_TOLERANCE, 0},
+{ 149, 1055224031u, 2599946514u, 1104170406u, 2738675352u, 3223780168u, 3507302766u, 0, LOG_TOLERANCE, 0},
+{ 150, 1105232623u, 3616571377u, 1060859316u, 1130603218u, 1077249247u, 447338991u, 0, LOG_TOLERANCE, 0},
+{ 151, 1076028796u, 3859211180u, 1067940450u, 1744531824u, 1073870707u, 3139112125u, 0, LOG_TOLERANCE, 0},
+{ 152, 1042831340u, 1958025850u, 3236511256u, 2472176453u, 3224612476u, 4074628725u, 0, LOG_TOLERANCE, 0},
+{ 153, 1085623441u, 182132862u, 3250520938u, 3924356991u, 1075918122u, 3179461172u, 0, LOG_TOLERANCE, 0},
+{ 154, 1083018236u, 35632886u, 3209806504u, 1453402523u, 1075537959u, 623164823u, 0, LOG_TOLERANCE, 0},
+{ 155, 1083522102u, 743225214u, 3202890678u, 142917400u, 1075633073u, 1072570609u, 0, LOG_TOLERANCE, 0},
+{ 156, 1080684976u, 1472665012u, 3203138231u, 256588219u, 1075140463u, 1443082546u, 0, LOG_TOLERANCE, 0},
+{ 157, 1094982162u, 1062927000u, 1061134072u, 931677439u, 1076728209u, 2297940933u, 0, LOG_TOLERANCE, 0},
+{ 158, 1058377732u, 2320910576u, 1055663370u, 288059864u, 3223506870u, 2768289813u, 0, LOG_TOLERANCE, 0},
+{ 159, 1078958093u, 1448349062u, 3199478070u, 3454027134u, 1074828702u, 2706157180u, 0, LOG_TOLERANCE, 0},
+{ 160, 1089975150u, 4215445172u, 3196654963u, 2231888973u, 1076295536u, 1878052368u, 0, LOG_TOLERANCE, 0},
+{ 161, 1099148583u, 40413554u, 3232578253u, 983832844u, 1076988183u, 659398356u, 0, LOG_TOLERANCE, 0},
+{ 162, 1076237886u, 3995725873u, 1050082319u, 777231627u, 1073952502u, 2239349650u, 0, LOG_TOLERANCE, 0},
+{ 163, 1040986626u, 672789828u, 3253385962u, 2982787335u, 3224693702u, 1244542645u, 0, LOG_TOLERANCE, 0},
+{ 164, 1068390875u, 2075971825u, 1070166500u, 4034633931u, 3221658269u, 491532286u, 0, LOG_TOLERANCE, 0},
+{ 165, 1062562529u, 1018222907u, 3244621407u, 3090050495u, 3222966069u, 1798186974u, 0, LOG_TOLERANCE, 0},
+{ 166, 1067680885u, 937732557u, 3200798890u, 2557898276u, 3221889754u, 422952393u, 0, LOG_TOLERANCE, 0},
+{ 167, 1078342316u, 130346162u, 3223590310u, 275568693u, 1074681949u, 957372433u, 0, LOG_TOLERANCE, 0},
+{ 168, 1042898869u, 3807416441u, 1075961161u, 3706820266u, 3224609760u, 104190259u, 0, LOG_TOLERANCE, 0},
+{ 169, 1068615357u, 1710131411u, 1078123323u, 1900790503u, 3221575334u, 2209933262u, 0, LOG_TOLERANCE, 0},
+{ 170, 1091335713u, 3420420033u, 3210844787u, 588423066u, 1076410379u, 2857617467u, 0, LOG_TOLERANCE, 0},
+{ 171, 1049684114u, 1160162008u, 3246307879u, 4265764460u, 3224265557u, 1934933585u, 0, LOG_TOLERANCE, 0},
+{ 172, 1102543434u, 366653268u, 3188814424u, 466059202u, 1077136037u, 807141120u, 0, LOG_TOLERANCE, 0},
+{ 173, 1079144091u, 1325936170u, 3221436876u, 680097612u, 1074869144u, 1389489581u, 0, LOG_TOLERANCE, 0},
+{ 174, 1092907468u, 1827735934u, 3200554324u, 2875599271u, 1076548720u, 3300536450u, 0, LOG_TOLERANCE, 0},
+{ 175, 1043546754u, 3117037091u, 3239246636u, 15838845u, 3224582402u, 735648025u, 0, LOG_TOLERANCE, 0},
+{ 176, 1051974004u, 749718883u, 3223587064u, 1523766569u, 3224062834u, 1671881275u, 0, LOG_TOLERANCE, 0},
+{ 177, 1044833651u, 1966536294u, 3250158026u, 699164258u, 3224525641u, 1389402172u, 0, LOG_TOLERANCE, 0},
+{ 178, 1098048435u, 3759049394u, 1106085272u, 1183789499u, 1076940082u, 1040831789u, 0, LOG_TOLERANCE, 0},
+{ 179, 1081201623u, 1970107747u, 1095245453u, 2308233883u, 1075223810u, 3769104780u, 0, LOG_TOLERANCE, 0},
+{ 180, 1084756444u, 1491017852u, 1041444355u, 1723375725u, 1075843299u, 2828558175u, 0, LOG_TOLERANCE, 0},
+{ 181, 1069146422u, 1141349287u, 1097465301u, 3403438584u, 3221378415u, 3648723478u, 0, LOG_TOLERANCE, 0},
+{ 182, 1083088260u, 1711085243u, 3250239076u, 1377484108u, 1075547271u, 2365864324u, 0, LOG_TOLERANCE, 0},
+{ 183, 1098385019u, 2880275004u, 1084039594u, 1611394950u, 1076955843u, 3972039239u, 0, LOG_TOLERANCE, 0},
+{ 184, 1086737787u, 2626629370u, 1063771493u, 1499080813u, 1076015009u, 3210927368u, 0, LOG_TOLERANCE, 0},
+{ 185, 1055231263u, 3936262414u, 1103919063u, 3175668759u, 3223779495u, 3949784643u, 0, LOG_TOLERANCE, 0},
+{ 186, 1060498071u, 1270950554u, 3194616071u, 3680565379u, 3223323033u, 321203519u, 0, LOG_TOLERANCE, 0},
+{ 187, 1060664575u, 1066985223u, 3221613219u, 4089383168u, 3223294689u, 1322613376u, 0, LOG_TOLERANCE, 0},
+{ 188, 1069575191u, 4017329311u, 3208334452u, 1667591498u, 3221253465u, 2986438966u, 0, LOG_TOLERANCE, 0},
+{ 189, 1088164157u, 3154656624u, 1061894279u, 3886344038u, 1076135995u, 2019766276u, 0, LOG_TOLERANCE, 0},
+{ 190, 1050652945u, 977586119u, 3209762784u, 953839852u, 3224183212u, 4205833787u, 0, LOG_TOLERANCE, 0},
+{ 191, 1104965247u, 143071571u, 3206165386u, 913097445u, 1077239436u, 1428994741u, 0, LOG_TOLERANCE, 0},
+{ 192, 1043081808u, 1371169579u, 1057079837u, 2594818628u, 3224602920u, 15908725u, 0, LOG_TOLERANCE, 0},
+{ 193, 1104309688u, 2259342224u, 3217432469u, 1824221478u, 1077211020u, 98865074u, 0, LOG_TOLERANCE, 0},
+{ 194, 1099351127u, 1576604497u, 1079368611u, 185078728u, 1076997744u, 1291065544u, 0, LOG_TOLERANCE, 0},
+{ 195, 1074195779u, 444800035u, 3243343143u, 1734989302u, 1072748681u, 843810783u, 0, LOG_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1068136489u, 4008523687u, 0, LOG_TOLERANCE, 0},
+{ 197, 1087212320u, 1941318385u, 1045807374u, 792193370u, 1076051861u, 1971888733u, 0, LOG_TOLERANCE, 0},
+{ 198, 1090816018u, 1299392207u, 3212131720u, 3205732280u, 1076367573u, 2393072u, 0, LOG_TOLERANCE, 0},
+{ 199, 1098698804u, 3035093505u, 1052187689u, 3287702190u, 1076967753u, 3012582896u, 0, LOG_TOLERANCE, 0},
+{ 200, 1099192612u, 2160225215u, 1102624859u, 836655570u, 1076990383u, 2071736056u, 0, LOG_TOLERANCE, 0},
+{ 201, 1096723626u, 3360816360u, 3246176356u, 172860634u, 1076874455u, 1406950864u, 0, LOG_TOLERANCE, 0},
+{ 202, 1070995788u, 146831910u, 1051558014u, 2340722078u, 3220243332u, 3261297932u, 0, LOG_TOLERANCE, 0},
+{ 203, 1082932703u, 1603798153u, 3207725532u, 1099413093u, 1075526116u, 1499961334u, 0, LOG_TOLERANCE, 0},
+{ 204, 1099194730u, 2429340443u, 3190303581u, 3223770005u, 1076990487u, 2107238709u, 0, LOG_TOLERANCE, 0},
+{ 205, 1075882959u, 955542166u, 3230415151u, 275583938u, 1073805017u, 587786177u, 0, LOG_TOLERANCE, 0},
+{ 206, 1092971882u, 513397822u, 1090646554u, 2089321329u, 1076554875u, 1291039930u, 0, LOG_TOLERANCE, 0},
+{ 207, 1045686228u, 2782073372u, 1046063872u, 4023829068u, 3224489388u, 2570927601u, 0, LOG_TOLERANCE, 0},
+{ 208, 1098564822u, 3242223094u, 3194111199u, 4264674108u, 1076962930u, 2095896905u, 0, LOG_TOLERANCE, 0},
+{ 209, 1091027173u, 3506346169u, 1047020885u, 1742757458u, 1076386679u, 701024000u, 0, LOG_TOLERANCE, 0},
+{ 210, 1045180829u, 1265459564u, 3193450280u, 3650514880u, 3224512001u, 2115795402u, 0, LOG_TOLERANCE, 0},
+{ 211, 1081755890u, 1525260440u, 3235452527u, 2612331392u, 1075325589u, 1311722038u, 0, LOG_TOLERANCE, 0},
+{ 212, 1101185272u, 1263613754u, 3219096387u, 635677201u, 1077075888u, 464532810u, 0, LOG_TOLERANCE, 0},
+{ 213, 1058788439u, 4140947288u, 3200792376u, 2013265346u, 3223473429u, 1675510139u, 0, LOG_TOLERANCE, 0},
+{ 214, 1102490744u, 1912759945u, 3237045253u, 1351396825u, 1077133753u, 2656194917u, 0, LOG_TOLERANCE, 0},
+{ 215, 1100721514u, 1001433078u, 3206926643u, 2741676659u, 1077055969u, 4157777791u, 0, LOG_TOLERANCE, 0},
+{ 216, 1080923606u, 1088945233u, 1085095743u, 3986114865u, 1075174891u, 2711796576u, 0, LOG_TOLERANCE, 0},
+{ 217, 1068250409u, 831239754u, 1099828675u, 3071308141u, 3221696665u, 3906974917u, 0, LOG_TOLERANCE, 0},
+{ 218, 1078350849u, 3473592372u, 1102759382u, 1309576357u, 1074685015u, 3258092383u, 0, LOG_TOLERANCE, 0},
+{ 219, 1103703058u, 2042340367u, 1091945628u, 2062772374u, 1077186030u, 1455653889u, 0, LOG_TOLERANCE, 0},
+{ 220, 1047282039u, 1840632537u, 1096533424u, 807510337u, 3224421005u, 2259729181u, 0, LOG_TOLERANCE, 0},
+{ 221, 1083968074u, 144814872u, 3212698915u, 2282965697u, 1075705943u, 2949949432u, 0, LOG_TOLERANCE, 0},
+{ 222, 1071236430u, 2552499583u, 3229111426u, 1470130815u, 3219987405u, 558247611u, 0, LOG_TOLERANCE, 0},
+{ 223, 1095609417u, 2858583811u, 1089760910u, 6360994u, 1076779252u, 1692550517u, 0, LOG_TOLERANCE, 0},
+{ 224, 1050781281u, 1614537194u, 1075198900u, 4088705365u, 3224169080u, 729983519u, 0, LOG_TOLERANCE, 0},
+{ 225, 1103455422u, 3545570051u, 1065221325u, 1629217700u, 1077175370u, 4002504631u, 0, LOG_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 1067997677u, 2531803269u, 0, LOG_TOLERANCE, 0},
+{ 227, 1049319038u, 2406734491u, 1042055360u, 89226663u, 3224293435u, 489486239u, 0, LOG_TOLERANCE, 0},
+{ 228, 1048267433u, 1618759139u, 3194723421u, 3888234802u, 3224377854u, 2361316317u, 0, LOG_TOLERANCE, 0},
+{ 229, 1055357248u, 3590035633u, 3212424262u, 2892456615u, 3223768296u, 2784142069u, 0, LOG_TOLERANCE, 0},
+{ 230, 1042459412u, 2431246964u, 3241512456u, 183850734u, 3224629872u, 2676796459u, 0, LOG_TOLERANCE, 0},
+{ 231, 1089501101u, 3088319870u, 3211544311u, 862225364u, 1076247809u, 3557509436u, 0, LOG_TOLERANCE, 0},
+{ 232, 1087811016u, 3495352775u, 1058576726u, 596957268u, 1076108054u, 1212781005u, 0, LOG_TOLERANCE, 0},
+{ 233, 1046553348u, 1839214511u, 3205004060u, 1923240983u, 3224453778u, 155767862u, 0, LOG_TOLERANCE, 0},
+{ 234, 1058073864u, 739619702u, 3223356436u, 2689885273u, 3223538604u, 4095262392u, 0, LOG_TOLERANCE, 0},
+{ 235, 1052841323u, 2143376228u, 1098306332u, 3760236188u, 3223991649u, 3574225414u, 0, LOG_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 1073010422u, 1713289607u, 0, LOG_TOLERANCE, 0},
+{ 237, 1066682341u, 2493598049u, 3194927008u, 1689107592u, 3222233045u, 4244143336u, 0, LOG_TOLERANCE, 0},
+{ 238, 1042506311u, 1578976988u, 1066368383u, 2117279163u, 3224627407u, 1544732865u, 0, LOG_TOLERANCE, 0},
+{ 239, 1075504463u, 3425290087u, 1098487295u, 1263412017u, 1073642915u, 3833207621u, 0, LOG_TOLERANCE, 0},
+{ 240, 1060949116u, 3635396812u, 1070999426u, 3965655689u, 3223251850u, 3656828940u, 0, LOG_TOLERANCE, 0},
+{ 241, 1060196346u, 2183973116u, 1101098363u, 1118613350u, 3223353941u, 673602059u, 0, LOG_TOLERANCE, 0},
+{ 242, 1074462441u, 199516350u, 1078368488u, 164621458u, 1072919989u, 2683332925u, 0, LOG_TOLERANCE, 0},
+{ 243, 1040222370u, 3570940805u, 3230316437u, 3596080877u, 3224728682u, 1709229047u, 0, LOG_TOLERANCE, 0},
+{ 244, 1060725917u, 980880313u, 1079833442u, 884465057u, 3223284843u, 3908226837u, 0, LOG_TOLERANCE, 0},
+{ 245, 1099977124u, 2558179220u, 1052873711u, 1233598120u, 1077021347u, 3750522257u, 0, LOG_TOLERANCE, 0},
+{ 246, 1047115221u, 1909994277u, 1085015978u, 2991527452u, 3224427192u, 1939315825u, 0, LOG_TOLERANCE, 0},
+{ 247, 1060855260u, 1680290941u, 1074309900u, 2943870846u, 3223265222u, 1391917703u, 0, LOG_TOLERANCE, 0},
+{ 248, 1059496132u, 1451927357u, 3228615456u, 1502585517u, 3223409696u, 4240953644u, 0, LOG_TOLERANCE, 0},
+{ 249, 1088728303u, 751136990u, 3230392165u, 3493275472u, 1076186784u, 2895449770u, 0, LOG_TOLERANCE, 0},
+{ 250, 1098365967u, 1209623292u, 3238056647u, 979495322u, 1076955046u, 322553682u, 0, LOG_TOLERANCE, 0},
+{ 251, 1102940648u, 1717672108u, 1048120593u, 531240316u, 1077151087u, 2450752868u, 0, LOG_TOLERANCE, 0},
+{ 252, 1054174923u, 3548721654u, 1086112947u, 3391817224u, 3223871070u, 2651694237u, 0, LOG_TOLERANCE, 0},
+{ 253, 1077836851u, 2758195125u, 1100880260u, 2028440924u, 1074484865u, 4212387521u, 0, LOG_TOLERANCE, 0},
+{ 254, 1084223893u, 2750123373u, 3232200256u, 1086294931u, 1075740110u, 1796153641u, 0, LOG_TOLERANCE, 0},
+{ 255, 1043958672u, 2986160931u, 1076097908u, 2540046258u, 3224563892u, 4131735963u, 0, LOG_TOLERANCE, 0},
+{ 256, 1087992954u, 451471221u, 1064816262u, 4187644495u, 1076123190u, 1571278527u, 0, LOG_TOLERANCE, 0},
+{ 257, 1099460228u, 2439500162u, 1065280276u, 1979490284u, 1077002369u, 1210365152u, 0, LOG_TOLERANCE, 0},
+{ 258, 1040415832u, 2283342035u, 1078398157u, 1345997553u, 3224717916u, 793577502u, 0, LOG_TOLERANCE, 0},
+{ 259, 1065765700u, 179066662u, 1103272172u, 1217337578u, 3222410441u, 3473154820u, 0, LOG_TOLERANCE, 0},
+{ 260, 1064078729u, 3779303391u, 3210023352u, 3115946280u, 3222708985u, 2675466261u, 0, LOG_TOLERANCE, 0},
+{ 261, 1045506226u, 286247089u, 1085153597u, 713645369u, 3224499119u, 1542442198u, 0, LOG_TOLERANCE, 0},
+{ 262, 1093670500u, 1468283899u, 1042831668u, 2022736418u, 1076608158u, 1444206071u, 0, LOG_TOLERANCE, 0},
+{ 263, 1083139105u, 3305564080u, 1065483445u, 482392433u, 1075553831u, 3885636882u, 0, LOG_TOLERANCE, 0},
+{ 264, 1054212159u, 2256346551u, 3222430705u, 2071674991u, 3223867641u, 979926413u, 0, LOG_TOLERANCE, 0},
+{ 265, 1056541047u, 2295269094u, 1084451053u, 2773103941u, 3223666401u, 3176085154u, 0, LOG_TOLERANCE, 0},
+{ 266, 1078173946u, 1482721827u, 1092243422u, 3125409590u, 1074617461u, 2338252184u, 0, LOG_TOLERANCE, 0},
+{ 267, 1073582325u, 1381740563u, 1071545057u, 2918235653u, 1071883840u, 3334584948u, 0, LOG_TOLERANCE, 0},
+{ 268, 1091232324u, 1105857967u, 3241990046u, 2703723225u, 1076402905u, 1352770697u, 0, LOG_TOLERANCE, 0},
+{ 269, 1043015571u, 174689677u, 1079333374u, 3947057014u, 3224605314u, 4170986094u, 0, LOG_TOLERANCE, 0},
+{ 270, 1090461859u, 2023082423u, 3242081486u, 1169047927u, 1076331263u, 3328774237u, 0, LOG_TOLERANCE, 0},
+{ 271, 1064525899u, 3742487766u, 1043425732u, 194972788u, 3222628918u, 1375948702u, 0, LOG_TOLERANCE, 0},
+{ 272, 1066308179u, 2136071361u, 3211529757u, 993675115u, 3222327669u, 78816142u, 0, LOG_TOLERANCE, 0},
+{ 273, 1066179733u, 210772141u, 3241441539u, 580731413u, 3222345037u, 3927815368u, 0, LOG_TOLERANCE, 0},
+{ 274, 1093840413u, 1751560711u, 1074522705u, 180987057u, 1076627743u, 550680420u, 0, LOG_TOLERANCE, 0},
+{ 275, 1066754591u, 2552236599u, 1088658621u, 2112468655u, 3222205293u, 3536028076u, 0, LOG_TOLERANCE, 0},
+{ 276, 1041806969u, 1578223762u, 3224596567u, 2456166162u, 3224656916u, 862250271u, 0, LOG_TOLERANCE, 0},
+{ 277, 1058506965u, 2110924310u, 1086207177u, 3161208323u, 3223495400u, 2942554941u, 0, LOG_TOLERANCE, 0},
+{ 278, 1084379746u, 2352173188u, 1079361728u, 4070222179u, 1075776093u, 2662684686u, 0, LOG_TOLERANCE, 0},
+{ 279, 1101012904u, 2481562701u, 1090937016u, 3809489716u, 1077065985u, 500272335u, 0, LOG_TOLERANCE, 0},
+{ 280, 1049519003u, 330905705u, 1086260896u, 90264431u, 3224279566u, 1302925296u, 0, LOG_TOLERANCE, 0},
+{ 281, 1040729961u, 4162008079u, 3194387916u, 759522153u, 3224703502u, 4232165330u, 0, LOG_TOLERANCE, 0},
+{ 282, 1081015037u, 1839697482u, 3216442625u, 2211508949u, 1075186970u, 3091760478u, 0, LOG_TOLERANCE, 0},
+{ 283, 1102323563u, 3736863454u, 1063475914u, 3150741666u, 1077125931u, 2240619440u, 0, LOG_TOLERANCE, 0},
+{ 284, 1060785883u, 4200269406u, 3236646101u, 1061812176u, 3223275563u, 4059264129u, 0, LOG_TOLERANCE, 0},
+{ 285, 1080217979u, 106027290u, 3234978297u, 2245237549u, 1075056284u, 3935577174u, 0, LOG_TOLERANCE, 0},
+{ 286, 1099500686u, 2132131375u, 3250483427u, 3449276437u, 1077004004u, 2860765758u, 0, LOG_TOLERANCE, 0},
+{ 287, 1089388778u, 2334440944u, 1105423490u, 4004336184u, 1076238827u, 2435489549u, 0, LOG_TOLERANCE, 0},
+{ 288, 1071289056u, 4090088208u, 1042030013u, 3898658299u, 3219923055u, 1857017027u, 0, LOG_TOLERANCE, 0},
+{ 289, 1060424416u, 2272831437u, 3253082595u, 2639188641u, 3223329932u, 4210841791u, 0, LOG_TOLERANCE, 0},
+{ 290, 1054766684u, 1856594168u, 3189515294u, 4101853676u, 3223824989u, 3244034946u, 0, LOG_TOLERANCE, 0},
+{ 291, 1076012412u, 2211699255u, 3195060344u, 3865018604u, 1073863724u, 4035608178u, 0, LOG_TOLERANCE, 0},
+{ 292, 1095283362u, 996259334u, 3241496889u, 3782673116u, 1076755197u, 2401647281u, 0, LOG_TOLERANCE, 0},
+{ 293, 1099130747u, 3840380763u, 1048674041u, 550040067u, 1076987270u, 1735374993u, 0, LOG_TOLERANCE, 0},
+{ 294, 1103935945u, 95874100u, 3237232828u, 2645647822u, 1077194684u, 2850194252u, 0, LOG_TOLERANCE, 0},
+{ 295, 1043665640u, 3441419500u, 3252367038u, 876710419u, 3224576503u, 273309740u, 0, LOG_TOLERANCE, 0},
+{ 296, 1091109904u, 2560836004u, 3199616543u, 1180840586u, 1076393466u, 634133261u, 0, LOG_TOLERANCE, 0},
+{ 297, 1074119318u, 2218230392u, 3227485787u, 3947214579u, 1072693915u, 3593274056u, 0, LOG_TOLERANCE, 0},
+{ 298, 1079539654u, 1447312532u, 1081476588u, 780366847u, 1074943401u, 3038225178u, 0, LOG_TOLERANCE, 0},
+{ 299, 1072569643u, 2842113832u, 3216156731u, 225159029u, 3215923786u, 3238443975u, 0, LOG_TOLERANCE, 0},
+{ 300, 1098117193u, 1601981129u, 3234628869u, 2236538344u, 1076943624u, 3187559764u, 0, LOG_TOLERANCE, 0},
+{ 301, 1085173524u, 2194185737u, 3242362684u, 87913366u, 1075874049u, 1040928910u, 0, LOG_TOLERANCE, 0},
+{ 302, 1051600232u, 1346862963u, 1077836259u, 3604666660u, 3224098914u, 287386136u, 0, LOG_TOLERANCE, 0},
+{ 303, 1064772331u, 3115209742u, 1099332326u, 1325101950u, 3222582423u, 1527830367u, 0, LOG_TOLERANCE, 0},
+{ 304, 1077062394u, 3889223100u, 1053247613u, 3371396923u, 1074227736u, 3155029876u, 0, LOG_TOLERANCE, 0},
+{ 305, 1072994220u, 4163120793u, 1075022670u, 1387631215u, 1070605899u, 3048914167u, 0, LOG_TOLERANCE, 0},
+{ 306, 1057998131u, 1532426189u, 1063168268u, 3397022615u, 3223546922u, 3454376569u, 0, LOG_TOLERANCE, 0},
+{ 307, 1053549673u, 89324166u, 1079206060u, 3429424710u, 3223927395u, 296891673u, 0, LOG_TOLERANCE, 0},
+{ 308, 1044841454u, 747591401u, 1072238381u, 2803213904u, 3224525301u, 1809647640u, 0, LOG_TOLERANCE, 0},
+{ 309, 1091113780u, 271904221u, 1044258318u, 1858545114u, 1076393775u, 2673972484u, 0, LOG_TOLERANCE, 0},
+{ 310, 1080585266u, 314958082u, 3249912496u, 2966213175u, 1075124621u, 156791433u, 0, LOG_TOLERANCE, 0},
+{ 311, 1049695766u, 3119528953u, 3217179014u, 2908718240u, 3224264186u, 1502162494u, 0, LOG_TOLERANCE, 0},
+{ 312, 1094983928u, 2018361566u, 1100926600u, 3985805054u, 1076728385u, 621786893u, 0, LOG_TOLERANCE, 0},
+{ 313, 1070132580u, 409584884u, 3239758947u, 755795129u, 3220843859u, 3819242064u, 0, LOG_TOLERANCE, 0},
+{ 314, 1075772446u, 1819156379u, 3251342302u, 2982669005u, 1073766572u, 1356860078u, 0, LOG_TOLERANCE, 0},
+{ 315, 1101563433u, 2080534280u, 3188254060u, 449171797u, 1077093468u, 3222605176u, 0, LOG_TOLERANCE, 0},
+{ 316, 1095956900u, 168744837u, 3214950009u, 1322217822u, 1076811501u, 1717897709u, 0, LOG_TOLERANCE, 0},
+{ 317, 1106743252u, 3250487255u, 1062120700u, 1876195180u, 1077317976u, 138849911u, 0, LOG_TOLERANCE, 0},
+{ 318, 1078859832u, 1336400247u, 1098057903u, 3314079581u, 1074815957u, 1152068432u, 0, LOG_TOLERANCE, 0},
+{ 319, 1056195172u, 265025555u, 1063854282u, 3779482256u, 3223696746u, 1903973229u, 0, LOG_TOLERANCE, 0},
+{ 320, 1067300501u, 887044257u, 1054789618u, 2732056261u, 3222032812u, 2455803958u, 0, LOG_TOLERANCE, 0},
+{ 321, 1050106742u, 4027115185u, 3191764868u, 2940199511u, 3224223208u, 4043849432u, 0, LOG_TOLERANCE, 0},
+{ 322, 1055016507u, 2875684421u, 3227459837u, 2251967570u, 3223801114u, 1956518469u, 0, LOG_TOLERANCE, 0},
+{ 323, 1063244412u, 284173546u, 3238823679u, 3557800647u, 3222862271u, 3966292736u, 0, LOG_TOLERANCE, 0},
+{ 324, 1101458560u, 3147771266u, 3220110464u, 2933364246u, 1077089046u, 2278939221u, 0, LOG_TOLERANCE, 0},
+{ 325, 1064853160u, 3366183281u, 3234870843u, 537442654u, 3222568808u, 3221004128u, 0, LOG_TOLERANCE, 0},
+{ 326, 1096635140u, 2529029548u, 3249882819u, 3781513577u, 1076868555u, 562313644u, 0, LOG_TOLERANCE, 0},
+{ 327, 1065952706u, 1080845539u, 3206760016u, 911778687u, 3222378869u, 341314984u, 0, LOG_TOLERANCE, 0},
+{ 328, 1044467388u, 469586759u, 1091830022u, 3080528840u, 3224543980u, 1618140319u, 0, LOG_TOLERANCE, 0},
+{ 329, 1080249104u, 2863108169u, 3225605506u, 2508274250u, 1075062818u, 3647419175u, 0, LOG_TOLERANCE, 0},
+{ 330, 1063343336u, 4080017377u, 3206492941u, 1470284690u, 3222839853u, 2867700472u, 0, LOG_TOLERANCE, 0},
+{ 331, 1059636742u, 3867917386u, 1102054928u, 3504746045u, 3223397823u, 1671545983u, 0, LOG_TOLERANCE, 0},
+{ 332, 1064522279u, 2962134101u, 3244741577u, 3390537350u, 3222629666u, 3158492516u, 0, LOG_TOLERANCE, 0},
+{ 333, 1088201813u, 1702237980u, 1071598971u, 1102587474u, 1076138651u, 2622934639u, 0, LOG_TOLERANCE, 0},
+{ 334, 1055486470u, 2180218657u, 3211592260u, 1206527853u, 3223757724u, 3258037863u, 0, LOG_TOLERANCE, 0},
+{ 335, 1049601096u, 394130786u, 3242511482u, 2437699868u, 3224274271u, 3825574203u, 0, LOG_TOLERANCE, 0},
+{ 336, 1044237059u, 849581558u, 3252006507u, 2008614943u, 3224553811u, 3657190491u, 0, LOG_TOLERANCE, 0},
+{ 337, 1062656366u, 3128971673u, 3249137531u, 2773583059u, 3222949104u, 4235986512u, 0, LOG_TOLERANCE, 0},
+{ 338, 1085029866u, 590727700u, 3248651761u, 2183878539u, 1075864251u, 1337466743u, 0, LOG_TOLERANCE, 0},
+{ 339, 1101098629u, 820687580u, 3208143496u, 1402434664u, 1077071097u, 630507849u, 0, LOG_TOLERANCE, 0},
+{ 340, 1104807187u, 1873709254u, 3245167989u, 44275991u, 1077233627u, 35393437u, 0, LOG_TOLERANCE, 0},
+{ 341, 1042185105u, 1174874204u, 3208263730u, 2360372288u, 3224643164u, 1125405730u, 0, LOG_TOLERANCE, 0},
+{ 342, 1103854676u, 937573440u, 3208953761u, 211240241u, 1077191792u, 2799624452u, 0, LOG_TOLERANCE, 0},
+{ 343, 1096065286u, 2469774991u, 1043117070u, 3380071805u, 1076822454u, 3235225443u, 0, LOG_TOLERANCE, 0},
+{ 344, 1058121042u, 442507560u, 3254252803u, 3257889649u, 3223533145u, 2585938391u, 0, LOG_TOLERANCE, 0},
+{ 345, 1068850520u, 1854921625u, 1049810168u, 2729627545u, 3221478934u, 598289984u, 0, LOG_TOLERANCE, 0},
+{ 346, 1107228981u, 4001809575u, 3240128649u, 278261523u, 1077335900u, 1358170156u, 0, LOG_TOLERANCE, 0},
+{ 347, 1087224694u, 1793907966u, 3238955714u, 398859249u, 1076052696u, 2028953044u, 0, LOG_TOLERANCE, 0},
+{ 348, 1053468899u, 2511916952u, 3219195283u, 1697158299u, 3223933318u, 3252060136u, 0, LOG_TOLERANCE, 0},
+{ 349, 1069985548u, 3230931724u, 3243897690u, 3508781585u, 3220942754u, 2973571582u, 0, LOG_TOLERANCE, 0},
+{ 350, 1103847606u, 1674254897u, 1046547577u, 217148561u, 1077191534u, 3981186583u, 0, LOG_TOLERANCE, 0},
+{ 351, 1063780306u, 3275604304u, 3194840159u, 2991205850u, 3222754528u, 2855600771u, 0, LOG_TOLERANCE, 0},
+{ 352, 1047765727u, 3509997278u, 3248888030u, 3897986511u, 3224399429u, 1263281156u, 0, LOG_TOLERANCE, 0},
+{ 353, 1047182435u, 2156824613u, 1042295665u, 1239257646u, 3224424628u, 4130330871u, 0, LOG_TOLERANCE, 0},
+{ 354, 1065780437u, 1073153314u, 3250031627u, 2567234990u, 3222407810u, 3861114186u, 0, LOG_TOLERANCE, 0},
+{ 355, 1043109764u, 4261696995u, 3197784432u, 323702024u, 3224601934u, 3660455745u, 0, LOG_TOLERANCE, 0},
+{ 356, 1096207349u, 4075177615u, 3202791065u, 1919006082u, 1076835551u, 1200557086u, 0, LOG_TOLERANCE, 0},
+{ 357, 1091786365u, 386429966u, 1086504491u, 3698826164u, 1076450574u, 1244797795u, 0, LOG_TOLERANCE, 0},
+{ 358, 1078327190u, 1681986446u, 3194985869u, 3072950140u, 1074676469u, 2143197479u, 0, LOG_TOLERANCE, 0},
+{ 359, 1069828285u, 3719038997u, 1055433962u, 3331415058u, 3221059996u, 3710963779u, 0, LOG_TOLERANCE, 0},
+{ 360, 1060749713u, 2420250111u, 3238002206u, 1928661079u, 3223281121u, 4182204469u, 0, LOG_TOLERANCE, 0},
+{ 361, 1081914210u, 3679866727u, 3227386672u, 1273835792u, 1075348638u, 2488201983u, 0, LOG_TOLERANCE, 0},
+{ 362, 1041622738u, 2682092368u, 3234222284u, 1325425811u, 3224664830u, 1088579835u, 0, LOG_TOLERANCE, 0},
+{ 363, 1056312613u, 4175172697u, 3208346191u, 2130706153u, 3223685636u, 4242260445u, 0, LOG_TOLERANCE, 0},
+{ 364, 1092089624u, 1200784450u, 1083605096u, 1248595607u, 1076478694u, 1626266244u, 0, LOG_TOLERANCE, 0},
+{ 365, 1066407215u, 1897285171u, 3251296075u, 944966123u, 3222314345u, 3783490951u, 0, LOG_TOLERANCE, 0},
+{ 366, 1093887602u, 2270747330u, 3230692631u, 422503284u, 1076632700u, 2223491330u, 0, LOG_TOLERANCE, 0},
+{ 367, 1084120037u, 2857564741u, 1075647403u, 3308906709u, 1075726771u, 3738019719u, 0, LOG_TOLERANCE, 0},
+{ 368, 1055991450u, 1380066948u, 3232612906u, 2613634294u, 3223718579u, 1312415733u, 0, LOG_TOLERANCE, 0},
+{ 369, 1063890856u, 4022784584u, 1060483857u, 3264056381u, 3222736721u, 3541437472u, 0, LOG_TOLERANCE, 0},
+{ 370, 1044637404u, 1778509100u, 3213146285u, 2665833973u, 3224534827u, 704175941u, 0, LOG_TOLERANCE, 0},
+{ 371, 1069243652u, 1859175955u, 1079949560u, 4258450607u, 3221349189u, 3394474619u, 0, LOG_TOLERANCE, 0},
+{ 372, 1048277388u, 4128020197u, 1076266146u, 4122840980u, 3224377490u, 3333906039u, 0, LOG_TOLERANCE, 0},
+{ 373, 1045699515u, 2454653987u, 3229487005u, 2977478685u, 3224488724u, 2052223869u, 0, LOG_TOLERANCE, 0},
+{ 374, 1106072835u, 1355181872u, 1095308770u, 436846481u, 1077286905u, 3531674556u, 0, LOG_TOLERANCE, 0},
+{ 375, 1099121654u, 2592856453u, 3247825559u, 3195234082u, 1076986800u, 414496240u, 0, LOG_TOLERANCE, 0},
+{ 376, 1074634375u, 3554670043u, 1091621009u, 3321236467u, 1073017240u, 1967217478u, 0, LOG_TOLERANCE, 0},
+{ 377, 1069012833u, 1936670355u, 1095715713u, 2958468553u, 3221421428u, 846254916u, 0, LOG_TOLERANCE, 0},
+{ 378, 1044807461u, 2960339502u, 1098808013u, 1044068983u, 3224526795u, 1144583180u, 0, LOG_TOLERANCE, 0},
+{ 379, 1049207537u, 4093388677u, 1095478112u, 1735930261u, 3224301857u, 951820485u, 0, LOG_TOLERANCE, 0},
+{ 380, 1091040302u, 1807398746u, 3195743135u, 4261616162u, 1076387779u, 4000737953u, 0, LOG_TOLERANCE, 0},
+{ 381, 1061810546u, 3250576797u, 1059002384u, 3043079652u, 3223097520u, 3867116202u, 0, LOG_TOLERANCE, 0},
+{ 382, 1069207109u, 666051428u, 3208765404u, 1912684117u, 3221359984u, 44859516u, 0, LOG_TOLERANCE, 0},
+{ 383, 1103487420u, 1949030179u, 1096388934u, 896459246u, 1077176849u, 3384776839u, 0, LOG_TOLERANCE, 0},
+{ 384, 1054300653u, 622499767u, 1066707637u, 1490260486u, 3223859833u, 3933837574u, 0, LOG_TOLERANCE, 0},
+{ 385, 1106688493u, 1490616165u, 3251242436u, 795675736u, 1077315609u, 3224780635u, 0, LOG_TOLERANCE, 0},
+{ 386, 1080943896u, 3662877092u, 3234317146u, 3200513112u, 1075177620u, 3055843857u, 0, LOG_TOLERANCE, 0},
+{ 387, 1084088786u, 1356101968u, 3236536816u, 3062844611u, 1075722621u, 2632841302u, 0, LOG_TOLERANCE, 0},
+{ 388, 1072438992u, 2284484846u, 3219498359u, 3240896015u, 3217066749u, 4038143420u, 0, LOG_TOLERANCE, 0},
+{ 389, 1088276041u, 494503287u, 1092811254u, 142673998u, 1076143734u, 3881294548u, 0, LOG_TOLERANCE, 0},
+{ 390, 1104642268u, 3394882641u, 3225306538u, 364852125u, 1077226961u, 36589885u, 0, LOG_TOLERANCE, 0},
+{ 391, 1077778115u, 193885269u, 1088149839u, 1359805831u, 1074469221u, 177780347u, 0, LOG_TOLERANCE, 0},
+{ 392, 1053001134u, 592580907u, 3199560872u, 3086438952u, 3223974161u, 362317677u, 0, LOG_TOLERANCE, 0},
+{ 393, 1059518664u, 1778008540u, 1049064687u, 73581647u, 3223407720u, 1905177841u, 0, LOG_TOLERANCE, 0},
+{ 394, 1099249950u, 233240285u, 1081923320u, 2710903921u, 1076993142u, 1735323538u, 0, LOG_TOLERANCE, 0},
+{ 395, 1069513767u, 3719878805u, 1079866720u, 3615458228u, 3221275628u, 3951131729u, 0, LOG_TOLERANCE, 0},
+{ 396, 1073711076u, 3647632375u, 3247225271u, 3839959621u, 1072018756u, 943970224u, 0, LOG_TOLERANCE, 0},
+{ 397, 1103401096u, 2232210456u, 3235434773u, 224271737u, 1077172781u, 196725945u, 0, LOG_TOLERANCE, 0},
+{ 398, 1045520036u, 2134662911u, 3190390590u, 4239009051u, 3224498319u, 1757386403u, 0, LOG_TOLERANCE, 0},
+{ 399, 1080526145u, 2305279897u, 1077668039u, 1854523320u, 1075114754u, 3304741914u, 0, LOG_TOLERANCE, 0},
+{ 400, 1072380611u, 538224650u, 3206153057u, 1379649610u, 3217336794u, 1283130523u, 0, LOG_TOLERANCE, 0},
+{ 401, 1048926859u, 3683897920u, 3244167599u, 3647579469u, 3224325816u, 816770831u, 0, LOG_TOLERANCE, 0},
+{ 402, 1090280933u, 2694093608u, 1042775347u, 598406111u, 1076319090u, 3356403737u, 0, LOG_TOLERANCE, 0},
+{ 403, 1064151744u, 872706833u, 1084802480u, 2200602798u, 3222698951u, 2113199186u, 0, LOG_TOLERANCE, 0},
+{ 404, 1042339597u, 904146293u, 1060867322u, 1729685598u, 3224636627u, 746916981u, 0, LOG_TOLERANCE, 0},
+{ 405, 1048211322u, 1894173462u, 3232800651u, 191960416u, 3224379943u, 1996947825u, 0, LOG_TOLERANCE, 0},
+{ 406, 1091225343u, 3521028551u, 1054522089u, 3287274359u, 1076402384u, 4209768157u, 0, LOG_TOLERANCE, 0},
+{ 407, 1095386964u, 959640601u, 3201578263u, 4136915018u, 1076763329u, 2457717894u, 0, LOG_TOLERANCE, 0},
+{ 408, 1064005451u, 1553716379u, 1106027987u, 984725765u, 3222719457u, 2955792047u, 0, LOG_TOLERANCE, 0},
+{ 409, 1091348993u, 2287646644u, 3240329321u, 2276183378u, 1076411309u, 2287451717u, 0, LOG_TOLERANCE, 0},
+{ 410, 1068209174u, 3940225170u, 3199544434u, 997572161u, 3221708492u, 3428245006u, 0, LOG_TOLERANCE, 0},
+{ 411, 1065284713u, 36116288u, 3206886566u, 4196602670u, 3222506108u, 2017444572u, 0, LOG_TOLERANCE, 0},
+{ 412, 1094212205u, 3550227562u, 3207257983u, 2747744117u, 1076662503u, 4126480558u, 0, LOG_TOLERANCE, 0},
+{ 413, 1104236126u, 507130047u, 1048359321u, 3229888373u, 1077206901u, 2272076931u, 0, LOG_TOLERANCE, 0},
+{ 414, 1075513130u, 2210969014u, 1081031001u, 1946786091u, 1073648058u, 4287756280u, 0, LOG_TOLERANCE, 0},
+{ 415, 1088823342u, 4059150589u, 3189759234u, 1177045799u, 1076195670u, 168819796u, 0, LOG_TOLERANCE, 0},
+{ 416, 1093103612u, 2664812822u, 1050343198u, 2034180320u, 1076566627u, 3519473592u, 0, LOG_TOLERANCE, 0},
+{ 417, 1066295469u, 1175750283u, 3235559706u, 1424491340u, 3222329337u, 1404700686u, 0, LOG_TOLERANCE, 0},
+{ 418, 1066420545u, 1630036121u, 3231972785u, 3195479448u, 3222311051u, 1432321875u, 0, LOG_TOLERANCE, 0},
+{ 419, 1090429875u, 2527029044u, 1046927050u, 4000723255u, 1076329192u, 2019252442u, 0, LOG_TOLERANCE, 0},
+{ 420, 1085208677u, 3335703647u, 3237349676u, 3869440059u, 1075876339u, 1110855580u, 0, LOG_TOLERANCE, 0},
+{ 421, 1091433848u, 3888398377u, 3196041693u, 1290567220u, 1076417100u, 1637354096u, 0, LOG_TOLERANCE, 0},
+{ 422, 1066679070u, 3242451480u, 3248384948u, 707431021u, 3222234337u, 3397134035u, 0, LOG_TOLERANCE, 0},
+{ 423, 1083230509u, 2739665123u, 1060777905u, 1733073225u, 1075571436u, 4071268588u, 0, LOG_TOLERANCE, 0},
+{ 424, 1078517061u, 1297274853u, 3208848704u, 3341639139u, 1074741421u, 4066881444u, 0, LOG_TOLERANCE, 0},
+{ 425, 1046570941u, 2228057309u, 1084318902u, 1317851136u, 3224452759u, 1577079524u, 0, LOG_TOLERANCE, 0},
+{ 426, 1088255327u, 270039934u, 3241414679u, 3063626339u, 1076142336u, 312904438u, 0, LOG_TOLERANCE, 0},
+{ 427, 1071694702u, 83062251u, 3211262173u, 2659016437u, 3219435632u, 2990582226u, 0, LOG_TOLERANCE, 0},
+{ 428, 1095743886u, 3833539373u, 3206667189u, 1567476111u, 1076788016u, 758411032u, 0, LOG_TOLERANCE, 0},
+{ 429, 1057711424u, 2382776852u, 3249232579u, 1546622468u, 3223566341u, 2208541704u, 0, LOG_TOLERANCE, 0},
+{ 430, 1085536439u, 1714300821u, 1104130938u, 4167591598u, 1075909687u, 2257964757u, 0, LOG_TOLERANCE, 0},
+{ 431, 1051092760u, 2798720100u, 1086978789u, 449990704u, 3224137825u, 3989600554u, 0, LOG_TOLERANCE, 0},
+{ 432, 1083714767u, 4039516226u, 3244344107u, 4272932619u, 1075667063u, 177846584u, 0, LOG_TOLERANCE, 0},
+{ 433, 1075224793u, 1683007544u, 1091105663u, 3805494321u, 1073461757u, 1964735653u, 0, LOG_TOLERANCE, 0},
+{ 434, 1073369300u, 2072627412u, 1094383324u, 3394151662u, 1071634515u, 3947641912u, 0, LOG_TOLERANCE, 0},
+{ 435, 1073086376u, 1120106427u, 3223631624u, 3404608264u, 1070882956u, 2186806101u, 0, LOG_TOLERANCE, 0},
+{ 436, 1097859997u, 559918757u, 3205077053u, 908100198u, 1076929260u, 181077198u, 0, LOG_TOLERANCE, 0},
+{ 437, 1042677918u, 2026673913u, 3244833635u, 2844573214u, 3224619103u, 1411053414u, 0, LOG_TOLERANCE, 0},
+{ 438, 1107083611u, 3946837259u, 3234993796u, 3850406820u, 1077331030u, 1746464057u, 0, LOG_TOLERANCE, 0},
+{ 439, 1057479809u, 3139330994u, 1046133568u, 1539650690u, 3223584445u, 303889266u, 0, LOG_TOLERANCE, 0},
+{ 440, 1089221852u, 1554593884u, 3228899878u, 2813752562u, 1076227495u, 3521483973u, 0, LOG_TOLERANCE, 0},
+{ 441, 1056505004u, 3804703138u, 1072931071u, 2053677923u, 3223669255u, 1544957199u, 0, LOG_TOLERANCE, 0},
+{ 442, 1097380651u, 289355864u, 1078453818u, 2143066338u, 1076912232u, 2177531595u, 0, LOG_TOLERANCE, 0},
+{ 443, 1056456232u, 2157691971u, 1106629150u, 110806409u, 3223673218u, 2123023082u, 0, LOG_TOLERANCE, 0},
+{ 444, 1082157019u, 3570399481u, 1085637605u, 180265334u, 1075383727u, 1957330776u, 0, LOG_TOLERANCE, 0},
+{ 445, 1053496534u, 558779875u, 3202046748u, 2338464653u, 3223931261u, 3653586452u, 0, LOG_TOLERANCE, 0},
+{ 446, 1045705464u, 1703969219u, 3229797258u, 1417521063u, 3224488429u, 1308720282u, 0, LOG_TOLERANCE, 0},
+{ 447, 1090298613u, 3917440951u, 1051668894u, 3736066983u, 1076320331u, 1887921718u, 0, LOG_TOLERANCE, 0},
+{ 448, 1064752080u, 3106613409u, 1066627453u, 2735392257u, 3222585948u, 408014405u, 0, LOG_TOLERANCE, 0},
+{ 449, 1065665372u, 2229777605u, 1065061963u, 2405869925u, 3222429090u, 2085078273u, 0, LOG_TOLERANCE, 0},
+{ 450, 1091979581u, 3967957902u, 1057416138u, 3459188071u, 1076469173u, 1237933408u, 0, LOG_TOLERANCE, 0},
+{ 451, 1068639210u, 3699016825u, 3249713090u, 796144848u, 3221564708u, 13809233u, 0, LOG_TOLERANCE, 0},
+{ 452, 1081332748u, 3285165564u, 3211948811u, 401510871u, 1075251694u, 3343192796u, 0, LOG_TOLERANCE, 0},
+{ 453, 1094257658u, 634857910u, 3199607513u, 914218057u, 1076666184u, 2365285189u, 0, LOG_TOLERANCE, 0},
+{ 454, 1083743336u, 2030735578u, 3233855943u, 965677531u, 1075671747u, 3755425130u, 0, LOG_TOLERANCE, 0},
+{ 455, 1079556815u, 3957229084u, 1051050470u, 3123776651u, 1074946192u, 1593874845u, 0, LOG_TOLERANCE, 0},
+{ 456, 1074379685u, 162122081u, 3239376395u, 108064594u, 1072869757u, 311403082u, 0, LOG_TOLERANCE, 0},
+{ 457, 1089788138u, 869031839u, 3225020876u, 1344301606u, 1076278721u, 2052619875u, 0, LOG_TOLERANCE, 0},
+{ 458, 1066949826u, 946696117u, 3231825228u, 1700703647u, 3222136911u, 3234660715u, 0, LOG_TOLERANCE, 0},
+{ 459, 1075492875u, 3394168074u, 1076939786u, 1666995668u, 1073635999u, 2354579684u, 0, LOG_TOLERANCE, 0},
+{ 460, 1061291147u, 2488789804u, 3238508333u, 1506943664u, 3223193085u, 2395026729u, 0, LOG_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1068911508u, 1747838674u, 0, LOG_TOLERANCE, 0},
+{ 462, 1072450894u, 1244307192u, 3191297711u, 2540916692u, 3216994329u, 4168950885u, 0, LOG_TOLERANCE, 0},
+{ 463, 1052579044u, 2871645739u, 3239081581u, 1440249115u, 3224012773u, 4034559683u, 0, LOG_TOLERANCE, 0},
+{ 464, 1068350633u, 1231934926u, 3236746788u, 603977748u, 3221668985u, 130084003u, 0, LOG_TOLERANCE, 0},
+{ 465, 1047966041u, 2386312545u, 1063169277u, 2715234268u, 3224389948u, 783950888u, 0, LOG_TOLERANCE, 0},
+{ 466, 1087803418u, 915867083u, 1046790892u, 3347417612u, 1076107382u, 1970735447u, 0, LOG_TOLERANCE, 0},
+{ 467, 1105984188u, 3553288373u, 1065698616u, 2906680663u, 1077283811u, 3228434780u, 0, LOG_TOLERANCE, 0},
+{ 468, 1045506226u, 2342364630u, 1051356723u, 4019093203u, 3224499119u, 1422614641u, 0, LOG_TOLERANCE, 0},
+{ 469, 1053685514u, 2911548084u, 1105282515u, 2476735795u, 3223917999u, 2323260261u, 0, LOG_TOLERANCE, 0},
+{ 470, 1050472772u, 1836216409u, 1101062307u, 2519592554u, 3224195107u, 156157416u, 0, LOG_TOLERANCE, 0},
+{ 471, 1070178161u, 1235369496u, 3222946447u, 668087854u, 3220815003u, 2491682284u, 0, LOG_TOLERANCE, 0},
+{ 472, 1061070948u, 2981820811u, 1059838516u, 2845580478u, 3223235452u, 3382317431u, 0, LOG_TOLERANCE, 0},
+{ 473, 1046447766u, 1565550570u, 3217165795u, 4162017137u, 3224459254u, 3914539253u, 0, LOG_TOLERANCE, 0},
+{ 474, 1089767730u, 2808968027u, 1055630096u, 1782326814u, 1076276748u, 3860952757u, 0, LOG_TOLERANCE, 0},
+{ 475, 1053576974u, 1492622658u, 3216653077u, 3972512122u, 3223925451u, 3928061943u, 0, LOG_TOLERANCE, 0},
+{ 476, 1074688031u, 2722693603u, 3227814791u, 3169731970u, 1073045831u, 1648821496u, 0, LOG_TOLERANCE, 0},
+{ 477, 1070422983u, 899763203u, 3207606001u, 2804747833u, 3220672293u, 2109485257u, 0, LOG_TOLERANCE, 0},
+{ 478, 1083186677u, 3789058912u, 3228095081u, 4135937628u, 1075560778u, 1017192561u, 0, LOG_TOLERANCE, 0},
+{ 479, 1060199382u, 1682808307u, 3206960335u, 232877759u, 3223353590u, 3898794040u, 0, LOG_TOLERANCE, 0},
+{ 480, 1094607838u, 2851963139u, 3246852961u, 2590862592u, 1076691530u, 843693284u, 0, LOG_TOLERANCE, 0},
+{ 481, 1081200406u, 2422232642u, 3234779662u, 290458310u, 1075223537u, 2996632407u, 0, LOG_TOLERANCE, 0},
+{ 482, 1063187430u, 1082582386u, 1075605675u, 2602133689u, 3222869534u, 497064377u, 0, LOG_TOLERANCE, 0},
+{ 483, 1092334963u, 1789635787u, 1059414278u, 1048286093u, 1076497719u, 35468346u, 0, LOG_TOLERANCE, 0},
+{ 484, 1098330542u, 231339448u, 1055573265u, 504907415u, 1076953536u, 1119059296u, 0, LOG_TOLERANCE, 0},
+{ 485, 1063211461u, 1153251200u, 3204617090u, 1772013857u, 3222866446u, 3672537745u, 0, LOG_TOLERANCE, 0},
+{ 486, 1099551055u, 1082898276u, 3212089272u, 1449080862u, 1077005985u, 1029802319u, 0, LOG_TOLERANCE, 0},
+{ 487, 1086008285u, 3177299045u, 1058862813u, 809400815u, 1075950038u, 2713697878u, 0, LOG_TOLERANCE, 0},
+{ 488, 1083370902u, 1924429710u, 1056464743u, 3349283177u, 1075602923u, 210852422u, 0, LOG_TOLERANCE, 0},
+{ 489, 1097989743u, 42238036u, 1042379500u, 2113559863u, 1076936898u, 4273537346u, 0, LOG_TOLERANCE, 0},
+{ 490, 1064761243u, 3304403230u, 3217556703u, 58952646u, 3222584347u, 1589474103u, 0, LOG_TOLERANCE, 0},
+{ 491, 1065185882u, 1645486982u, 3224301095u, 3636267471u, 3222519201u, 137895691u, 0, LOG_TOLERANCE, 0},
+{ 492, 1062762009u, 619402181u, 3235208235u, 557360557u, 3222931234u, 1968443211u, 0, LOG_TOLERANCE, 0},
+{ 493, 1090754746u, 110029735u, 1046937383u, 984375729u, 1076361464u, 987250933u, 0, LOG_TOLERANCE, 0},
+{ 494, 1042013090u, 4063688092u, 3203235744u, 1049950343u, 3224649065u, 604966936u, 0, LOG_TOLERANCE, 0},
+{ 495, 1062350619u, 650996069u, 1054971928u, 3953359826u, 3223008973u, 1813427148u, 0, LOG_TOLERANCE, 0},
+{ 496, 1079572157u, 66926332u, 1090561839u, 1379780888u, 1074948662u, 433676492u, 0, LOG_TOLERANCE, 0},
+{ 497, 1085969659u, 2803378256u, 1086057989u, 498534626u, 1075947164u, 835461350u, 0, LOG_TOLERANCE, 0},
+{ 498, 1082618553u, 2846400785u, 1047142525u, 1375153550u, 1075477355u, 2196414547u, 0, LOG_TOLERANCE, 0},
+{ 499, 1044581201u, 2869128958u, 1070972315u, 4246440273u, 3224537713u, 3512318899u, 0, LOG_TOLERANCE, 0},
+{ 500, 1051832506u, 3112381207u, 1044430965u, 3981604561u, 3224077928u, 494780876u, 0, LOG_TOLERANCE, 0},
+{ 501, 1083771349u, 243303420u, 1093735824u, 1575581926u, 1075676261u, 2797159781u, 0, LOG_TOLERANCE, 0},
+{ 502, 1091654349u, 3218865041u, 3204803496u, 3840388050u, 1076436155u, 4233818719u, 0, LOG_TOLERANCE, 0},
+{ 503, 1048415431u, 336846959u, 1052664471u, 3798336786u, 3224372644u, 1850665100u, 0, LOG_TOLERANCE, 0},
+{ 504, 1055954236u, 3639240976u, 1081202165u, 1844741676u, 3223722992u, 1428253868u, 0, LOG_TOLERANCE, 0},
+{ 505, 1064421145u, 717293069u, 3211534283u, 582401011u, 3222651488u, 457041754u, 0, LOG_TOLERANCE, 0},
+{ 506, 1104478864u, 3766248610u, 3196520332u, 1174437546u, 1077219611u, 2272566305u, 0, LOG_TOLERANCE, 0},
+{ 507, 1083431226u, 756959182u, 3204099341u, 1581804034u, 1075615370u, 3301009964u, 0, LOG_TOLERANCE, 0},
+{ 508, 1058322796u, 3560686300u, 3220980617u, 4277975772u, 3223512067u, 3447536936u, 0, LOG_TOLERANCE, 0},
+{ 509, 1062422428u, 2598148853u, 3217622194u, 3460421008u, 3222993634u, 3740783369u, 0, LOG_TOLERANCE, 0},
+{ 510, 1066720824u, 136600515u, 3209934920u, 3340653128u, 3222218081u, 3300781843u, 0, LOG_TOLERANCE, 0},
+{ 511, 1096820310u, 1045480938u, 3251354609u, 4133432965u, 1076881221u, 1639289155u, 0, LOG_TOLERANCE, 0},
+{ 512, 1091599431u, 1630207738u, 3239996829u, 2393354808u, 1076429657u, 658484818u, 0, LOG_TOLERANCE, 0},
+{ 513, 1043142370u, 3739770117u, 1059520750u, 3959551225u, 3224600804u, 1163315162u, 0, LOG_TOLERANCE, 0},
+{ 514, 1083246857u, 1498861716u, 1091297147u, 847410798u, 1075575303u, 3775039354u, 0, LOG_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 1071811569u, 2728229451u, 0, LOG_TOLERANCE, 0},
+{ 516, 1054849265u, 2353103845u, 3235718771u, 2978889966u, 3223819677u, 197121532u, 0, LOG_TOLERANCE, 0},
+{ 517, 1103874344u, 1546972125u, 3249076079u, 1987349196u, 1077192504u, 1510519247u, 0, LOG_TOLERANCE, 0},
+{ 518, 1090735865u, 2769161072u, 1075207126u, 292616282u, 1076359523u, 89361979u, 0, LOG_TOLERANCE, 0},
+{ 519, 1052228650u, 36855311u, 1052128202u, 1479039342u, 3224039401u, 3593532843u, 0, LOG_TOLERANCE, 0},
+{ 520, 1083757053u, 2027463605u, 1066023013u, 3369686340u, 1075673967u, 3693747671u, 0, LOG_TOLERANCE, 0},
+{ 521, 1050369101u, 3808681655u, 1054161346u, 1821773119u, 3224202474u, 692132331u, 0, LOG_TOLERANCE, 0},
+{ 522, 1040685928u, 3175490326u, 3226879970u, 845687760u, 3224705342u, 819266546u, 0, LOG_TOLERANCE, 0},
+{ 523, 1042302993u, 3124482451u, 3242748377u, 3259417226u, 3224638837u, 2723875780u, 0, LOG_TOLERANCE, 0},
+{ 524, 1045245695u, 2751606436u, 3236210939u, 3923142740u, 3224509740u, 972503631u, 0, LOG_TOLERANCE, 0},
+{ 525, 1095694737u, 2016872044u, 3228408064u, 4201274408u, 1076784880u, 2075690093u, 0, LOG_TOLERANCE, 0},
+{ 526, 1051865606u, 1019916843u, 3219974785u, 1977881787u, 3224074238u, 1888960312u, 0, LOG_TOLERANCE, 0},
+{ 527, 1051995104u, 2060433318u, 1075872515u, 366073725u, 3224060725u, 1765681116u, 0, LOG_TOLERANCE, 0},
+{ 528, 1043696909u, 1098469906u, 1082900695u, 2349346832u, 3224575035u, 3674662655u, 0, LOG_TOLERANCE, 0},
+{ 529, 1062491059u, 3011196295u, 3252479932u, 2459281672u, 3222979769u, 492196641u, 0, LOG_TOLERANCE, 0},
+{ 530, 1073850675u, 2843222682u, 1089275809u, 298982001u, 1072256860u, 1361015105u, 0, LOG_TOLERANCE, 0},
+{ 531, 1101737698u, 914741728u, 3203468059u, 2833809843u, 1077100215u, 617711599u, 0, LOG_TOLERANCE, 0},
+{ 532, 1089280230u, 1274901962u, 3241535845u, 3759113509u, 1076231571u, 557911230u, 0, LOG_TOLERANCE, 0},
+{ 533, 1098432794u, 2134927252u, 3253802671u, 3013731444u, 1076957802u, 3748566065u, 0, LOG_TOLERANCE, 0},
+{ 534, 1099201341u, 2230655177u, 3254510616u, 1249674366u, 1076990811u, 285259783u, 0, LOG_TOLERANCE, 0},
+{ 535, 1062971253u, 717357389u, 1083533731u, 3746683362u, 3222899074u, 465863828u, 0, LOG_TOLERANCE, 0},
+{ 536, 1066289466u, 834976849u, 3217357661u, 2465861779u, 3222330128u, 4215014023u, 0, LOG_TOLERANCE, 0},
+{ 537, 1045656117u, 1385714428u, 1053358395u, 3007113740u, 3224490919u, 160169310u, 0, LOG_TOLERANCE, 0},
+{ 538, 1050527919u, 599268545u, 3201368210u, 2309854744u, 3224191350u, 2572280436u, 0, LOG_TOLERANCE, 0},
+{ 539, 1069954454u, 2840234388u, 3232496515u, 333365983u, 3220964919u, 2207069711u, 0, LOG_TOLERANCE, 0},
+{ 540, 1045922781u, 3136078996u, 3194520860u, 2650572904u, 3224478467u, 2261318089u, 0, LOG_TOLERANCE, 0},
+{ 541, 1086204043u, 2405805086u, 3251640319u, 324233833u, 1075963709u, 1682447551u, 0, LOG_TOLERANCE, 0},
+{ 542, 1106699146u, 2589598340u, 3254677807u, 952438812u, 1077316076u, 3633878054u, 0, LOG_TOLERANCE, 0},
+{ 543, 1041631125u, 1922837702u, 3216892718u, 3535907549u, 3224664448u, 1875921049u, 0, LOG_TOLERANCE, 0},
+{ 544, 1096132220u, 261447440u, 3209805849u, 1150571079u, 1076828788u, 2089162237u, 0, LOG_TOLERANCE, 0},
+{ 545, 1095805232u, 4026487528u, 1073152064u, 27340691u, 1076794453u, 1737884956u, 0, LOG_TOLERANCE, 0},
+{ 546, 1081640044u, 338765118u, 1086225786u, 3207238249u, 1075307339u, 978420089u, 0, LOG_TOLERANCE, 0},
+{ 547, 1048699055u, 1085283176u, 3187775111u, 1601194210u, 3224349104u, 167106457u, 0, LOG_TOLERANCE, 0},
+{ 548, 1091520173u, 3031712790u, 3252307859u, 170666844u, 1076422740u, 744995018u, 0, LOG_TOLERANCE, 0},
+{ 549, 1071378583u, 3148395674u, 1041913758u, 3306391490u, 3219817927u, 894704365u, 0, LOG_TOLERANCE, 0},
+{ 550, 1053793422u, 2205233857u, 3208100078u, 3993195511u, 3223910988u, 856785751u, 0, LOG_TOLERANCE, 0},
+{ 551, 1067699608u, 4282766727u, 1072820377u, 1874778218u, 3221882135u, 136784904u, 0, LOG_TOLERANCE, 0},
+{ 552, 1063349444u, 2920860798u, 3218070226u, 3104066154u, 3222838447u, 3579382968u, 0, LOG_TOLERANCE, 0},
+{ 553, 1057466703u, 969991373u, 3250596895u, 1734386152u, 3223585548u, 1096500115u, 0, LOG_TOLERANCE, 0},
+{ 554, 1091432170u, 1218740205u, 3239802737u, 2610078504u, 1076416988u, 1166408302u, 0, LOG_TOLERANCE, 0},
+{ 555, 1058547594u, 1485218325u, 3220870240u, 3591664613u, 3223491992u, 2889488052u, 0, LOG_TOLERANCE, 0},
+{ 556, 1054590495u, 690157417u, 3190850619u, 4192347699u, 3223837100u, 221540590u, 0, LOG_TOLERANCE, 0},
+{ 557, 1096053810u, 4009839784u, 1079670252u, 394167192u, 1076821337u, 1851630736u, 0, LOG_TOLERANCE, 0},
+{ 558, 1087075589u, 961532417u, 1092588071u, 2923790239u, 1076042262u, 402021294u, 0, LOG_TOLERANCE, 0},
+{ 559, 1056395443u, 4174125604u, 1050682630u, 2169701868u, 3223678331u, 3987244812u, 0, LOG_TOLERANCE, 0},
+{ 560, 1095608827u, 4146748230u, 1087373950u, 2481478351u, 1076779212u, 2755104011u, 0, LOG_TOLERANCE, 0},
+{ 561, 1076987866u, 3984715440u, 1050421618u, 2446142566u, 1074194784u, 222203740u, 0, LOG_TOLERANCE, 0},
+{ 562, 1084172406u, 936290150u, 1100614426u, 3625806370u, 1075733582u, 2307849831u, 0, LOG_TOLERANCE, 0},
+{ 563, 1099787952u, 1866615265u, 3215651428u, 2337013350u, 1077014572u, 4172289639u, 0, LOG_TOLERANCE, 0},
+{ 564, 1105714654u, 712227971u, 1106004723u, 973148499u, 1077273392u, 1598723415u, 0, LOG_TOLERANCE, 0},
+{ 565, 1082604551u, 3409813738u, 3244817008u, 1933503498u, 1075474955u, 4275872054u, 0, LOG_TOLERANCE, 0},
+{ 566, 1079943733u, 3180389060u, 3228735703u, 83422217u, 1075002315u, 1460579331u, 0, LOG_TOLERANCE, 0},
+{ 567, 1077878724u, 556972671u, 3204582372u, 841555801u, 1074495740u, 3043398158u, 0, LOG_TOLERANCE, 0},
+{ 568, 1070767721u, 4189151332u, 1080874032u, 706326922u, 3220423008u, 1451854222u, 0, LOG_TOLERANCE, 0},
+{ 569, 1096151307u, 198291836u, 1057281892u, 2188836928u, 1076830539u, 4025310681u, 0, LOG_TOLERANCE, 0},
+{ 570, 1078091995u, 1219449298u, 3228734687u, 3504562743u, 1074582949u, 3796387511u, 0, LOG_TOLERANCE, 0},
+{ 571, 1057086816u, 1776099219u, 1094316777u, 4188083896u, 3223622381u, 1340974487u, 0, LOG_TOLERANCE, 0},
+{ 572, 1046362060u, 2614400266u, 1073750227u, 3003203347u, 3224462031u, 2168733507u, 0, LOG_TOLERANCE, 0},
+{ 573, 1066499030u, 2959351406u, 1105603716u, 311851587u, 3222292450u, 2448510388u, 0, LOG_TOLERANCE, 0},
+{ 574, 1084544434u, 865443613u, 1097532516u, 3622237781u, 1075809786u, 4009940215u, 0, LOG_TOLERANCE, 0},
+{ 575, 1084303018u, 447506102u, 3195759295u, 3603669725u, 1075758783u, 778755463u, 0, LOG_TOLERANCE, 0},
+{ 576, 1097890173u, 3934398273u, 1040996422u, 2968621268u, 1076931117u, 3632567756u, 0, LOG_TOLERANCE, 0},
+{ 577, 1049256177u, 784208771u, 1088764788u, 2182296421u, 3224298116u, 2494467149u, 0, LOG_TOLERANCE, 0},
+{ 578, 1100848643u, 1527590526u, 3206961556u, 2823164069u, 1077060409u, 1703424684u, 0, LOG_TOLERANCE, 0},
+{ 579, 1089160483u, 3876699591u, 3207481130u, 4028148535u, 1076223070u, 2488144317u, 0, LOG_TOLERANCE, 0},
+{ 580, 1083576186u, 2164249756u, 1059857743u, 1785169952u, 1075643067u, 4067087010u, 0, LOG_TOLERANCE, 0},
+{ 581, 1091804009u, 2079273665u, 1080303860u, 625760474u, 1076452386u, 2402517231u, 0, LOG_TOLERANCE, 0},
+{ 582, 1079002460u, 3636214836u, 1068367620u, 2932621925u, 1074836452u, 1246949188u, 0, LOG_TOLERANCE, 0},
+{ 583, 1043995372u, 4274131512u, 1047707755u, 92550763u, 3224562471u, 3439797135u, 0, LOG_TOLERANCE, 0},
+{ 584, 1051338473u, 2648933384u, 1084603503u, 3534304873u, 3224117543u, 1738801372u, 0, LOG_TOLERANCE, 0},
+{ 585, 1064563235u, 3216750767u, 3191088629u, 547482628u, 3222621321u, 3716790217u, 0, LOG_TOLERANCE, 0},
+{ 586, 1061084774u, 1420360746u, 1080063101u, 1690029499u, 3223233655u, 426639274u, 0, LOG_TOLERANCE, 0},
+{ 587, 1082371716u, 1908572179u, 1080112083u, 1228319033u, 1075431453u, 2787108747u, 0, LOG_TOLERANCE, 0},
+{ 588, 1048158178u, 500312015u, 3212368508u, 3864619086u, 3224381985u, 1230868351u, 0, LOG_TOLERANCE, 0},
+{ 589, 1073851962u, 4211343447u, 1087492676u, 4272583781u, 1072259191u, 2246212895u, 0, LOG_TOLERANCE, 0},
+{ 590, 1099392394u, 2382118000u, 1042665328u, 567154882u, 1076999532u, 1195356221u, 0, LOG_TOLERANCE, 0},
+{ 591, 1058013442u, 1435344339u, 3216303171u, 2275988178u, 3223545946u, 1433265295u, 0, LOG_TOLERANCE, 0},
+{ 592, 1067054971u, 3403659753u, 3218043030u, 1926480488u, 3222103473u, 3585903650u, 0, LOG_TOLERANCE, 0},
+{ 593, 1076840383u, 1198845185u, 3225556149u, 1130089684u, 1074134956u, 770846098u, 0, LOG_TOLERANCE, 0},
+{ 594, 1075179394u, 2183928090u, 1048403956u, 963834821u, 1073429155u, 1101532312u, 0, LOG_TOLERANCE, 0},
+{ 595, 1101672960u, 2120625396u, 1041006976u, 2137548527u, 1077097789u, 1094065157u, 0, LOG_TOLERANCE, 0},
+{ 596, 1099230238u, 586700956u, 1059670521u, 303891699u, 1076992206u, 4144042493u, 0, LOG_TOLERANCE, 0},
+{ 597, 1071510850u, 2509132460u, 1102827530u, 2205707903u, 3219671660u, 3639433009u, 0, LOG_TOLERANCE, 0},
+{ 598, 1057376949u, 1229308263u, 3209170414u, 4206576047u, 3223593363u, 900139131u, 0, LOG_TOLERANCE, 0},
+{ 599, 1076592641u, 4078010749u, 3199236456u, 733478972u, 1074067427u, 3307722640u, 0, LOG_TOLERANCE, 0},
+{ 600, 1050228936u, 4277541051u, 3199806921u, 397102023u, 3224213142u, 2343694908u, 0, LOG_TOLERANCE, 0},
+{ 601, 1048491365u, 900999594u, 3234720188u, 2530214248u, 3224369047u, 2922487944u, 0, LOG_TOLERANCE, 0},
+{ 602, 1076543548u, 4000609478u, 1096577064u, 4148592328u, 1074052948u, 253985069u, 0, LOG_TOLERANCE, 0},
+{ 603, 1048668084u, 2154187873u, 3224392607u, 3957250362u, 3224352615u, 1700962361u, 0, LOG_TOLERANCE, 0},
+{ 604, 1075929840u, 2867079200u, 1101870326u, 921212001u, 1073827044u, 3912397586u, 0, LOG_TOLERANCE, 0},
+{ 605, 1085738242u, 674547716u, 1063216239u, 3929755226u, 1075928482u, 1096646355u, 0, LOG_TOLERANCE, 0},
+{ 606, 1092932203u, 3158182449u, 1043794244u, 3259056345u, 1076551118u, 1944847734u, 0, LOG_TOLERANCE, 0},
+{ 607, 1089293008u, 3002823940u, 1059511739u, 2832435794u, 1076232446u, 2248040348u, 0, LOG_TOLERANCE, 0},
+{ 608, 1069821174u, 2196511929u, 1049973941u, 3672092877u, 3221065621u, 1333818035u, 0, LOG_TOLERANCE, 0},
+{ 609, 1050438056u, 3655292191u, 1086438127u, 3567072906u, 3224197528u, 856774981u, 0, LOG_TOLERANCE, 0},
+{ 610, 1095703300u, 1617573614u, 3201863123u, 3090723732u, 1076785432u, 919734899u, 0, LOG_TOLERANCE, 0},
+{ 611, 1085717732u, 679893506u, 3211547753u, 824081024u, 1075926690u, 2224601098u, 0, LOG_TOLERANCE, 0},
+{ 612, 1089530525u, 2285242807u, 1084999409u, 2221731406u, 1076251335u, 2335692597u, 0, LOG_TOLERANCE, 0},
+{ 613, 1059250016u, 1935990727u, 1088822246u, 1058156518u, 3223433483u, 3217816881u, 0, LOG_TOLERANCE, 0},
+{ 614, 1102839166u, 521023584u, 1059186903u, 4245163857u, 1077147558u, 2892805731u, 0, LOG_TOLERANCE, 0},
+{ 615, 1103891140u, 2312887617u, 3191771354u, 1885370807u, 1077193106u, 297823039u, 0, LOG_TOLERANCE, 0},
+{ 616, 1105470167u, 1796441468u, 1100030327u, 2772711004u, 1077262253u, 1282095196u, 0, LOG_TOLERANCE, 0},
+{ 617, 1056793172u, 2095685003u, 1077984448u, 2100773742u, 3223648008u, 3902380592u, 0, LOG_TOLERANCE, 0},
+{ 618, 1045470972u, 2892538035u, 1042396334u, 4162200338u, 3224501206u, 3305443403u, 0, LOG_TOLERANCE, 0},
+{ 619, 1095242103u, 2177698116u, 3227557177u, 150832500u, 1076751813u, 652084626u, 0, LOG_TOLERANCE, 0},
+{ 620, 1044078568u, 607966734u, 3236250630u, 4164600559u, 3224559359u, 4052486987u, 0, LOG_TOLERANCE, 0},
+{ 621, 1068906164u, 2830122967u, 1046096700u, 3713346883u, 3221458501u, 2135199639u, 0, LOG_TOLERANCE, 0},
+{ 622, 1089714315u, 2314640506u, 3203696416u, 3276228872u, 1076271440u, 3165050519u, 0, LOG_TOLERANCE, 0},
+{ 623, 1065428659u, 469331883u, 3249037349u, 2999233437u, 3222479189u, 1973618642u, 0, LOG_TOLERANCE, 0},
+{ 624, 1097382011u, 560886625u, 1091899487u, 748795120u, 1076912287u, 2351244050u, 0, LOG_TOLERANCE, 0},
+{ 625, 1049886858u, 2958421324u, 1092569414u, 3235243477u, 3224243534u, 1631239268u, 0, LOG_TOLERANCE, 0},
+{ 626, 1045542849u, 3221475559u, 1043038304u, 915608434u, 3224497019u, 12328601u, 0, LOG_TOLERANCE, 0},
+{ 627, 1071197530u, 3007808652u, 3216682290u, 2531019474u, 3220036272u, 3512463986u, 0, LOG_TOLERANCE, 0},
+{ 628, 1094545351u, 1767658578u, 3237045269u, 2313128318u, 1076687351u, 4133464776u, 0, LOG_TOLERANCE, 0},
+{ 629, 1063134244u, 1926845182u, 1066835624u, 1783256828u, 3222876498u, 4254270569u, 0, LOG_TOLERANCE, 0},
+{ 630, 1040575629u, 90378038u, 1057168870u, 164358218u, 3224710189u, 1836351366u, 0, LOG_TOLERANCE, 0},
+{ 631, 1106859172u, 1610524680u, 1085283851u, 2903496007u, 1077322719u, 3956409329u, 0, LOG_TOLERANCE, 0},
+{ 632, 1078635586u, 4274321404u, 3202913591u, 720121831u, 1074778233u, 4182823459u, 0, LOG_TOLERANCE, 0},
+{ 633, 1051205256u, 2034778236u, 1071133763u, 1413236391u, 3224128149u, 214647840u, 0, LOG_TOLERANCE, 0},
+{ 634, 1051063028u, 1489112261u, 1076691395u, 348210906u, 3224140507u, 2241216118u, 0, LOG_TOLERANCE, 0},
+{ 635, 1059260269u, 2797651324u, 3224410527u, 2374818327u, 3223432401u, 2818559991u, 0, LOG_TOLERANCE, 0},
+{ 636, 1088287256u, 1823161666u, 3197810695u, 3119680047u, 1076144486u, 410596024u, 0, LOG_TOLERANCE, 0},
+{ 637, 1065927336u, 3420950657u, 1087084743u, 2136638961u, 3222382935u, 3289438458u, 0, LOG_TOLERANCE, 0},
+{ 638, 1069902224u, 3554566429u, 1062907717u, 2736702589u, 3221003238u, 2295141582u, 0, LOG_TOLERANCE, 0},
+{ 639, 1097405019u, 2928437580u, 3187765027u, 1393427873u, 1076913211u, 3191623646u, 0, LOG_TOLERANCE, 0},
+{ 640, 1061817913u, 189447067u, 1051643315u, 828663513u, 3223096387u, 2558305145u, 0, LOG_TOLERANCE, 0},
+{ 641, 1052313869u, 2852350928u, 1045683757u, 673354280u, 3224032410u, 3091433288u, 0, LOG_TOLERANCE, 0},
+{ 642, 1043946301u, 3589563265u, 3248741629u, 812657927u, 3224564379u, 145610791u, 0, LOG_TOLERANCE, 0},
+{ 643, 1043127178u, 1766416701u, 1100392103u, 2185373290u, 3224601328u, 2709694091u, 0, LOG_TOLERANCE, 0},
+{ 644, 1072791741u, 3763582673u, 3191965790u, 388374829u, 1068956587u, 4000095759u, 0, LOG_TOLERANCE, 0},
+{ 645, 1079635136u, 1187403069u, 1075300235u, 336640304u, 1074958563u, 4287311234u, 0, LOG_TOLERANCE, 0},
+{ 646, 1103926251u, 1718795752u, 3243118752u, 683369237u, 1077194346u, 1449151468u, 0, LOG_TOLERANCE, 0},
+{ 647, 1063308449u, 1863545307u, 1069449477u, 3418627399u, 3222848031u, 2779607712u, 0, LOG_TOLERANCE, 0},
+{ 648, 1069601294u, 3295607249u, 1068878592u, 1633297809u, 3221240901u, 2594350627u, 0, LOG_TOLERANCE, 0},
+{ 649, 1058947127u, 2585980994u, 3236670483u, 1286750688u, 3223462494u, 904067198u, 0, LOG_TOLERANCE, 0},
+{ 650, 1046157033u, 15816845u, 3233249283u, 2491924775u, 3224469193u, 4212288781u, 0, LOG_TOLERANCE, 0},
+{ 651, 1042413021u, 1051983351u, 1049180786u, 1474421917u, 3224632405u, 4286106996u, 0, LOG_TOLERANCE, 0},
+{ 652, 1053765877u, 2003816032u, 1086050104u, 668090487u, 3223912742u, 2616410283u, 0, LOG_TOLERANCE, 0},
+{ 653, 1052556037u, 3671484625u, 1067020039u, 430024694u, 3224014365u, 3396241137u, 0, LOG_TOLERANCE, 0},
+{ 654, 1067397110u, 3991830201u, 3207808714u, 1021245839u, 3222007425u, 4243502376u, 0, LOG_TOLERANCE, 0},
+{ 655, 1064194391u, 4255801807u, 3207681716u, 1926756877u, 3222693263u, 1936878201u, 0, LOG_TOLERANCE, 0},
+{ 656, 1052140785u, 4167786896u, 1077097744u, 1775517981u, 3224047022u, 3920752385u, 0, LOG_TOLERANCE, 0},
+{ 657, 1085601978u, 3187518564u, 1082437406u, 944672491u, 1075916091u, 3265610257u, 0, LOG_TOLERANCE, 0},
+{ 658, 1049366282u, 953085192u, 3227310828u, 3459155777u, 3224290023u, 2656300300u, 0, LOG_TOLERANCE, 0},
+{ 659, 1069502506u, 1908555460u, 1073640207u, 260441967u, 3221278498u, 706663362u, 0, LOG_TOLERANCE, 0},
+{ 660, 1067219606u, 250762477u, 1072582645u, 2886742039u, 3222055058u, 672407782u, 0, LOG_TOLERANCE, 0},
+{ 661, 1103422358u, 786180031u, 3197734769u, 2788918312u, 1077173806u, 3746531445u, 0, LOG_TOLERANCE, 0},
+{ 662, 1087028179u, 2055912467u, 3244244909u, 1394142937u, 1076038762u, 1795047243u, 0, LOG_TOLERANCE, 0},
+{ 663, 1069612985u, 91984146u, 3222252812u, 4126276047u, 3221235370u, 3814066775u, 0, LOG_TOLERANCE, 0},
+{ 664, 1081340139u, 3942715706u, 3239316352u, 410676547u, 1075253181u, 2506903412u, 0, LOG_TOLERANCE, 0},
+{ 665, 1051074198u, 86296211u, 1085850694u, 649202596u, 3224139493u, 2880611269u, 0, LOG_TOLERANCE, 0},
+{ 666, 1097882744u, 3069064472u, 3237358008u, 23209276u, 1076930665u, 1450427370u, 0, LOG_TOLERANCE, 0},
+{ 667, 1081235288u, 1867297860u, 1072956607u, 2513414118u, 1075231257u, 2535725157u, 0, LOG_TOLERANCE, 0},
+{ 668, 1103049699u, 3171788768u, 3235208783u, 162138697u, 1077154679u, 624087679u, 0, LOG_TOLERANCE, 0},
+{ 669, 1081728455u, 1245110700u, 1081653954u, 2584994077u, 1075321380u, 2914390661u, 0, LOG_TOLERANCE, 0},
+{ 670, 1098026472u, 3347226587u, 1058962932u, 2291943376u, 1076938909u, 376541139u, 0, LOG_TOLERANCE, 0},
+{ 671, 1058899062u, 966940828u, 1060726420u, 2798041096u, 3223465711u, 660497085u, 0, LOG_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1068986073u, 992013529u, 0, LOG_TOLERANCE, 0},
+{ 673, 1100632849u, 1671039260u, 1086395032u, 3745833360u, 1077052685u, 2200577415u, 0, LOG_TOLERANCE, 0},
+{ 674, 1057078797u, 651714217u, 1047070645u, 2130549237u, 3223623282u, 754729227u, 0, LOG_TOLERANCE, 0},
+{ 675, 1059632083u, 1423000172u, 3247822717u, 1551488170u, 3223398200u, 442592399u, 0, LOG_TOLERANCE, 0},
+{ 676, 1054113659u, 921077236u, 3213332351u, 1431049019u, 3223876915u, 4055130359u, 0, LOG_TOLERANCE, 0},
+{ 677, 1067510295u, 655715547u, 3190985373u, 1527556471u, 3221964801u, 460556857u, 0, LOG_TOLERANCE, 0},
+{ 678, 1080171331u, 4110878657u, 3251297180u, 879739345u, 1075046177u, 1152302381u, 0, LOG_TOLERANCE, 0},
+{ 679, 1085804762u, 2623955764u, 1093699897u, 1216444475u, 1075934130u, 1839592766u, 0, LOG_TOLERANCE, 0},
+{ 680, 1091905603u, 107442539u, 3239767031u, 1149813329u, 1076462360u, 989447787u, 0, LOG_TOLERANCE, 0},
+{ 681, 1085961592u, 1761361082u, 3226030205u, 1121849716u, 1075946555u, 3494606763u, 0, LOG_TOLERANCE, 0},
+{ 682, 1092603467u, 2534144722u, 1044223733u, 3512285706u, 1076515793u, 3692269602u, 0, LOG_TOLERANCE, 0},
+{ 683, 1064362429u, 4073670723u, 1050729852u, 3034818849u, 3222665043u, 2495345955u, 0, LOG_TOLERANCE, 0},
+{ 684, 1101984574u, 1421423503u, 1060278048u, 1397153092u, 1077108720u, 2189969898u, 0, LOG_TOLERANCE, 0},
+{ 685, 1069938181u, 1649206019u, 1104525577u, 1267104290u, 3220976709u, 450530095u, 0, LOG_TOLERANCE, 0},
+{ 686, 1041818449u, 3775270392u, 1040251850u, 68667319u, 3224656453u, 1211401134u, 0, LOG_TOLERANCE, 0},
+{ 687, 1056847252u, 3099226694u, 3254103006u, 4020102648u, 3223644378u, 3130345782u, 0, LOG_TOLERANCE, 0},
+{ 688, 1054108064u, 3718441177u, 3215643451u, 4032951536u, 3223877462u, 3985566266u, 0, LOG_TOLERANCE, 0},
+{ 689, 1044131371u, 508048351u, 3210196713u, 1707937896u, 3224557458u, 3794348307u, 0, LOG_TOLERANCE, 0},
+{ 690, 1051127979u, 2784738160u, 1073435430u, 1109346010u, 3224134718u, 3763898383u, 0, LOG_TOLERANCE, 0},
+{ 691, 1078241642u, 3331916473u, 3238794568u, 2707019594u, 1074644350u, 3000068445u, 0, LOG_TOLERANCE, 0},
+{ 692, 1093182670u, 3093165197u, 1072894805u, 2853215019u, 1076573206u, 1052317797u, 0, LOG_TOLERANCE, 0},
+{ 693, 1069098491u, 2135797997u, 1048399559u, 2941926126u, 3221393445u, 3011165202u, 0, LOG_TOLERANCE, 0},
+{ 694, 1048430980u, 2083412145u, 3249335391u, 507212448u, 3224372120u, 1391497455u, 0, LOG_TOLERANCE, 0},
+{ 695, 1075363751u, 4270176401u, 3246546709u, 3288753319u, 1073555677u, 2172392844u, 0, LOG_TOLERANCE, 0},
+{ 696, 1100449215u, 3692175292u, 3197271515u, 3989064196u, 1077045309u, 3615376251u, 0, LOG_TOLERANCE, 0},
+{ 697, 1104208090u, 3111924274u, 1066772558u, 59281695u, 1077205261u, 865144419u, 0, LOG_TOLERANCE, 0},
+{ 698, 1067683911u, 2135245466u, 3208804313u, 3846547392u, 3221888515u, 519778435u, 0, LOG_TOLERANCE, 0},
+{ 699, 1094877811u, 972051266u, 3222814246u, 3539700586u, 1076717393u, 83189865u, 0, LOG_TOLERANCE, 0},
+{ 700, 1055482282u, 330951080u, 1079189813u, 583922384u, 3223758054u, 1639805153u, 0, LOG_TOLERANCE, 0},
+{ 701, 1089640092u, 1711944085u, 1104170032u, 643991456u, 1076263688u, 2474566662u, 0, LOG_TOLERANCE, 0},
+{ 702, 1086945901u, 2072550721u, 3250147641u, 4280263530u, 1076032457u, 3503982552u, 0, LOG_TOLERANCE, 0},
+{ 703, 1045489058u, 1566376352u, 1067251433u, 72984588u, 3224500127u, 2508162584u, 0, LOG_TOLERANCE, 0},
+{ 704, 1095276569u, 3103043079u, 1045853123u, 410067497u, 1076754646u, 1510773583u, 0, LOG_TOLERANCE, 0},
+{ 705, 1069188845u, 1910366299u, 1081770885u, 634683073u, 3221365463u, 978597306u, 0, LOG_TOLERANCE, 0},
+{ 706, 1081530688u, 2226525875u, 3224149290u, 2126302825u, 1075288861u, 2856541718u, 0, LOG_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1071064776u, 471056163u, 0, LOG_TOLERANCE, 0},
+{ 708, 1066482943u, 1953339096u, 1077176252u, 1476516558u, 3222296157u, 654778802u, 0, LOG_TOLERANCE, 0},
+{ 709, 1066092000u, 1306277326u, 1079089150u, 4093716191u, 3222357599u, 1919559441u, 0, LOG_TOLERANCE, 0},
+{ 710, 1085665139u, 51750045u, 3242913901u, 4256866157u, 1075921980u, 3722237157u, 0, LOG_TOLERANCE, 0},
+{ 711, 1047601319u, 2163853087u, 3232053146u, 2962422808u, 3224408387u, 1081948641u, 0, LOG_TOLERANCE, 0},
+{ 712, 1075516945u, 1618388148u, 3233154824u, 3711953164u, 1073650314u, 3812165070u, 0, LOG_TOLERANCE, 0},
+{ 713, 1099384354u, 357108214u, 3202294604u, 2306775262u, 1076999187u, 3070689462u, 0, LOG_TOLERANCE, 0},
+{ 714, 1054420438u, 2571356437u, 3249064063u, 2394851808u, 3223849956u, 882036239u, 0, LOG_TOLERANCE, 0},
+{ 715, 1083004443u, 4273880094u, 1103698617u, 3578832032u, 1075536085u, 1389153068u, 0, LOG_TOLERANCE, 0},
+{ 716, 1085943053u, 2091068742u, 3228270226u, 3980489730u, 1075945146u, 3992739543u, 0, LOG_TOLERANCE, 0},
+{ 717, 1081533104u, 2772307714u, 1051008486u, 32546576u, 1075289284u, 1304738751u, 0, LOG_TOLERANCE, 0},
+{ 718, 1093745567u, 2143788498u, 3195498043u, 3630119231u, 1076617173u, 1940068716u, 0, LOG_TOLERANCE, 0},
+{ 719, 1051149287u, 2527385594u, 3240503648u, 3482095012u, 3224132874u, 932358108u, 0, LOG_TOLERANCE, 0},
+{ 720, 1094685151u, 2690097362u, 1068598730u, 2360266862u, 1076696521u, 4114952864u, 0, LOG_TOLERANCE, 0},
+{ 721, 1058857869u, 2673272949u, 1082639557u, 522449749u, 3223468532u, 1585235010u, 0, LOG_TOLERANCE, 0},
+{ 722, 1104424147u, 3596379400u, 3242016775u, 2002293002u, 1077216954u, 167880927u, 0, LOG_TOLERANCE, 0},
+{ 723, 1099439656u, 4113224369u, 3222122439u, 2152316893u, 1077001521u, 3528290140u, 0, LOG_TOLERANCE, 0},
+{ 724, 1073313068u, 31662602u, 1047721249u, 1747087514u, 1071495479u, 361856717u, 0, LOG_TOLERANCE, 0},
+{ 725, 1102980109u, 2489659568u, 1097051253u, 277506957u, 1077152410u, 220731815u, 0, LOG_TOLERANCE, 0},
+{ 726, 1043918186u, 3850162281u, 3213841942u, 438724093u, 3224565497u, 1335181127u, 0, LOG_TOLERANCE, 0},
+{ 727, 1095392535u, 2431814052u, 1075518084u, 2672434118u, 1076763752u, 3902665789u, 0, LOG_TOLERANCE, 0},
+{ 728, 1095679087u, 391606792u, 1048184750u, 4168944276u, 1076783866u, 201632535u, 0, LOG_TOLERANCE, 0},
+{ 729, 1100308768u, 457529672u, 3201090276u, 72407935u, 1077039049u, 1370091833u, 0, LOG_TOLERANCE, 0},
+{ 730, 1071237071u, 3954981400u, 1052053242u, 2411049585u, 3219986608u, 4011189326u, 0, LOG_TOLERANCE, 0},
+{ 731, 1086180091u, 485456950u, 1088415093u, 1655397424u, 1075962111u, 1049136648u, 0, LOG_TOLERANCE, 0},
+{ 732, 1050750780u, 1551748070u, 3236871640u, 1329701152u, 3224172582u, 3333561594u, 0, LOG_TOLERANCE, 0},
+{ 733, 1077155474u, 3099222537u, 1104984570u, 4293792842u, 1074266180u, 3823978682u, 0, LOG_TOLERANCE, 0},
+{ 734, 1056466057u, 3603065260u, 3197735968u, 2402359253u, 3223672410u, 1773379774u, 0, LOG_TOLERANCE, 0},
+{ 735, 1051340936u, 3961208159u, 3219057584u, 2340553876u, 3224117355u, 671685669u, 0, LOG_TOLERANCE, 0},
+{ 736, 1074881909u, 4014841779u, 3197672877u, 3697233334u, 1073186041u, 4149752821u, 0, LOG_TOLERANCE, 0},
+{ 737, 1065792009u, 1403876392u, 3254028950u, 921363393u, 3222405763u, 1643497528u, 0, LOG_TOLERANCE, 0},
+{ 738, 1107251806u, 1862576361u, 3194031708u, 2476290925u, 1077336633u, 466978083u, 0, LOG_TOLERANCE, 0},
+{ 739, 1049661768u, 1454212851u, 1088378861u, 3400401866u, 3224268227u, 2694325211u, 0, LOG_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 1072886487u, 3569287692u, 0, LOG_TOLERANCE, 0},
+{ 741, 1068925634u, 1199568671u, 3225679997u, 46947405u, 3221451536u, 928442461u, 0, LOG_TOLERANCE, 0},
+{ 742, 1077685537u, 2596231448u, 3253943728u, 2219151748u, 1074443573u, 2231242182u, 0, LOG_TOLERANCE, 0},
+{ 743, 1066527035u, 4119719558u, 3222036299u, 1275474618u, 3222286120u, 1979658371u, 0, LOG_TOLERANCE, 0},
+{ 744, 1092425015u, 3347296825u, 1101507910u, 1254014794u, 1076504062u, 3829864000u, 0, LOG_TOLERANCE, 0},
+{ 745, 1084119992u, 673775040u, 1070743626u, 244126093u, 1075726765u, 3754705647u, 0, LOG_TOLERANCE, 0},
+{ 746, 1055716202u, 1832066983u, 1051358028u, 3262483417u, 3223740808u, 426169343u, 0, LOG_TOLERANCE, 0},
+{ 747, 1077559600u, 3962610501u, 3198598777u, 849269178u, 1074406538u, 4237515409u, 0, LOG_TOLERANCE, 0},
+{ 748, 1087990252u, 2497516122u, 3254374111u, 2821429629u, 1076122977u, 4015412349u, 0, LOG_TOLERANCE, 0},
+{ 749, 1076236288u, 2805941787u, 3217785843u, 779131141u, 1073951923u, 1273545107u, 0, LOG_TOLERANCE, 0},
+{ 750, 1079425038u, 723423605u, 1084533420u, 627282213u, 1074923960u, 3923850419u, 0, LOG_TOLERANCE, 0},
+{ 751, 1068464032u, 4292778869u, 1078101071u, 1676860147u, 3221639332u, 890635976u, 0, LOG_TOLERANCE, 0},
+{ 752, 1076288502u, 3528118587u, 3194648564u, 2363260897u, 1073970522u, 2685750176u, 0, LOG_TOLERANCE, 0},
+{ 753, 1045414231u, 1307010018u, 1061248120u, 1468743108u, 3224504205u, 2718243292u, 0, LOG_TOLERANCE, 0},
+{ 754, 1099099491u, 107905661u, 3226089788u, 1943427674u, 1076985639u, 1932047369u, 0, LOG_TOLERANCE, 0},
+{ 755, 1040746893u, 760006940u, 1054265604u, 1749976597u, 3224702809u, 1323817312u, 0, LOG_TOLERANCE, 0},
+{ 756, 1090289736u, 2787503556u, 1081282610u, 1195841206u, 1076319709u, 4181618500u, 0, LOG_TOLERANCE, 0},
+{ 757, 1044318508u, 545462045u, 3208381743u, 1981311808u, 3224551133u, 2183045557u, 0, LOG_TOLERANCE, 0},
+{ 758, 1061232136u, 3657978397u, 1104463616u, 3501253426u, 3223206524u, 3484237357u, 0, LOG_TOLERANCE, 0},
+{ 759, 1049883857u, 1804177501u, 3210693633u, 3606766729u, 3224243834u, 3517531742u, 0, LOG_TOLERANCE, 0},
+{ 760, 1076856879u, 1336278526u, 1043741618u, 3165279431u, 1074139158u, 833486214u, 0, LOG_TOLERANCE, 0},
+{ 761, 1055471915u, 1599382075u, 1058018527u, 4212580517u, 3223758873u, 3473614230u, 0, LOG_TOLERANCE, 0},
+{ 762, 1060018678u, 3007589929u, 3202026547u, 2792028313u, 3223370131u, 3372574984u, 0, LOG_TOLERANCE, 0},
+{ 763, 1105599122u, 1866066996u, 1060329048u, 3727175322u, 1077268363u, 2407515951u, 0, LOG_TOLERANCE, 0},
+{ 764, 1050932995u, 150890940u, 1056025306u, 3082724735u, 3224152926u, 1543567732u, 0, LOG_TOLERANCE, 0},
+{ 765, 1062008939u, 80400395u, 1093584426u, 3478941315u, 3223068589u, 334202438u, 0, LOG_TOLERANCE, 0},
+{ 766, 1104156966u, 4050954182u, 3219263194u, 2537475930u, 1077202160u, 52121861u, 0, LOG_TOLERANCE, 0},
+{ 767, 1064841871u, 2881752155u, 3212589299u, 2559651278u, 3222570668u, 1289897413u, 0, LOG_TOLERANCE, 0},
+{ 768, 1101532656u, 440309030u, 3214267461u, 3788040806u, 1077092201u, 2541610027u, 0, LOG_TOLERANCE, 0},
+{ 769, 1100476615u, 918813144u, 3208535698u, 1607035904u, 1077046464u, 1838368906u, 0, LOG_TOLERANCE, 0},
+{ 770, 1042137451u, 2497054124u, 1089139147u, 2549609010u, 3224644746u, 2204082529u, 0, LOG_TOLERANCE, 0},
+{ 771, 1047037641u, 790219083u, 1054657139u, 2797979479u, 3224430281u, 2605152109u, 0, LOG_TOLERANCE, 0},
+{ 772, 1057781400u, 1149462078u, 1095765205u, 3879963182u, 3223561330u, 8173155u, 0, LOG_TOLERANCE, 0},
+{ 773, 1055246165u, 2684353926u, 3205212854u, 1732474928u, 3223778120u, 1100684416u, 0, LOG_TOLERANCE, 0},
+{ 774, 1095236965u, 2742237025u, 1051317716u, 3386396147u, 1076751385u, 2203378921u, 0, LOG_TOLERANCE, 0},
+{ 775, 1063230986u, 3408320912u, 1103071166u, 4233059513u, 3222863964u, 3924505576u, 0, LOG_TOLERANCE, 0},
+{ 776, 1064863548u, 1077495917u, 1088399968u, 433115118u, 3222567109u, 1263879149u, 0, LOG_TOLERANCE, 0},
+{ 777, 1057063924u, 841366493u, 1051716814u, 4121125128u, 3223624969u, 2299430516u, 0, LOG_TOLERANCE, 0},
+{ 778, 1064632084u, 321857207u, 1089128010u, 1149988239u, 3222607866u, 627293357u, 0, LOG_TOLERANCE, 0},
+{ 779, 1098059015u, 799866606u, 3197637091u, 3924438208u, 1076940639u, 3980982339u, 0, LOG_TOLERANCE, 0},
+{ 780, 1043579242u, 2002049816u, 1077053447u, 2240354761u, 3224580736u, 3000679411u, 0, LOG_TOLERANCE, 0},
+{ 781, 1081522635u, 478939968u, 1097035749u, 1066716440u, 1075287447u, 4249888900u, 0, LOG_TOLERANCE, 0},
+{ 782, 1084989993u, 1653104725u, 1088548129u, 81977716u, 1075861396u, 3386829085u, 0, LOG_TOLERANCE, 0},
+{ 783, 1049377628u, 3899475018u, 3189694084u, 3330093036u, 3224289217u, 1387095058u, 0, LOG_TOLERANCE, 0},
+{ 784, 1089312583u, 2612450289u, 1079065127u, 603380842u, 1076233776u, 1203102347u, 0, LOG_TOLERANCE, 0},
+{ 785, 1100636791u, 3962735564u, 1101570429u, 1372490825u, 1077052835u, 465092515u, 0, LOG_TOLERANCE, 0},
+{ 786, 1054806016u, 1479841439u, 1059312257u, 541504905u, 3223822432u, 2295334392u, 0, LOG_TOLERANCE, 0},
+{ 787, 1078662178u, 2626148789u, 1057571099u, 4121656076u, 1074786149u, 2318575113u, 0, LOG_TOLERANCE, 0},
+{ 788, 1081613389u, 1902560314u, 1043130231u, 3557671562u, 1075302954u, 181613322u, 0, LOG_TOLERANCE, 0},
+{ 789, 1046346124u, 41779312u, 1081626342u, 831171823u, 3224462561u, 114420931u, 0, LOG_TOLERANCE, 0},
+{ 790, 1058131100u, 1393168821u, 1066457405u, 1381616968u, 3223532010u, 2221031919u, 0, LOG_TOLERANCE, 0},
+{ 791, 1072338141u, 3756584649u, 3222267229u, 1423157432u, 3217538846u, 3153950627u, 0, LOG_TOLERANCE, 0},
+{ 792, 1106952026u, 1894912556u, 1042426694u, 155024547u, 1077326286u, 3244175068u, 0, LOG_TOLERANCE, 0},
+{ 793, 1047969864u, 35164295u, 3203391785u, 1037041084u, 3224389779u, 4101769333u, 0, LOG_TOLERANCE, 0},
+{ 794, 1084777479u, 3957875950u, 3232195211u, 1590756436u, 1075845035u, 4253257181u, 0, LOG_TOLERANCE, 0},
+{ 795, 1068844322u, 1447585080u, 1071279485u, 1107922438u, 3221481260u, 739417708u, 0, LOG_TOLERANCE, 0},
+{ 796, 1046252518u, 981897615u, 1051856116u, 430357614u, 3224465760u, 2990774932u, 0, LOG_TOLERANCE, 0},
+{ 797, 1080040567u, 395145384u, 3219821938u, 50586510u, 1075015570u, 401425942u, 0, LOG_TOLERANCE, 0},
+{ 798, 1069775912u, 750827797u, 1082862669u, 230466783u, 3221102144u, 3089938357u, 0, LOG_TOLERANCE, 0},
+{ 799, 1086668819u, 1365083575u, 3204848310u, 1700831722u, 1076008674u, 1350249998u, 0, LOG_TOLERANCE, 0},
+{ 800, 1070606742u, 344241827u, 1071538935u, 2715566077u, 3220571362u, 2564406257u, 0, LOG_TOLERANCE, 0},
+{ 801, 1100099208u, 4069301823u, 3193208760u, 2949125229u, 1077028431u, 4184156688u, 0, LOG_TOLERANCE, 0},
+{ 802, 1103231387u, 3585711710u, 1065801594u, 2302229267u, 1077163960u, 3362941620u, 0, LOG_TOLERANCE, 0},
+{ 803, 1046635308u, 709803845u, 1048741487u, 2296910194u, 3224449161u, 3527999523u, 0, LOG_TOLERANCE, 0},
+{ 804, 1045797131u, 744421179u, 1069302001u, 2659232829u, 3224484041u, 1605643857u, 0, LOG_TOLERANCE, 0},
+{ 805, 1092835968u, 1799949903u, 3192522886u, 4212149209u, 1076541532u, 2940590139u, 0, LOG_TOLERANCE, 0},
+{ 806, 1058624854u, 145234164u, 3250614064u, 912384201u, 3223485746u, 3198580186u, 0, LOG_TOLERANCE, 0},
+{ 807, 1093027016u, 2784620507u, 1102812948u, 3531481022u, 1076559923u, 64675630u, 0, LOG_TOLERANCE, 0},
+{ 808, 1103676015u, 383952592u, 3205659905u, 3633194728u, 1077184947u, 422506066u, 0, LOG_TOLERANCE, 0},
+{ 809, 1055992604u, 3792395543u, 1070072378u, 3864816376u, 3223718444u, 3170253965u, 0, LOG_TOLERANCE, 0},
+{ 810, 1057832625u, 2115553675u, 1066288499u, 3538377867u, 3223557779u, 620943456u, 0, LOG_TOLERANCE, 0},
+{ 811, 1104591537u, 1230026762u, 1090719723u, 440819880u, 1077224766u, 793358222u, 0, LOG_TOLERANCE, 0},
+{ 812, 1047111428u, 2991290482u, 1096886719u, 1097971167u, 3224427340u, 586302082u, 0, LOG_TOLERANCE, 0},
+{ 813, 1090048600u, 1098035020u, 3230900504u, 1479059095u, 1076301592u, 1583059249u, 0, LOG_TOLERANCE, 0},
+{ 814, 1103573316u, 1719428427u, 3188631907u, 3707377409u, 1077180662u, 744410774u, 0, LOG_TOLERANCE, 0},
+{ 815, 1053236165u, 3748932896u, 1084908557u, 1325384361u, 3223952056u, 54146495u, 0, LOG_TOLERANCE, 0},
+{ 816, 1084704076u, 3979168763u, 1057455255u, 2454615952u, 1075838772u, 4208492007u, 0, LOG_TOLERANCE, 0},
+{ 817, 1053106984u, 1449164578u, 1056960316u, 1654931641u, 3223963742u, 1191827742u, 0, LOG_TOLERANCE, 0},
+{ 818, 1071439010u, 2120487381u, 3226298974u, 2364226633u, 3219749836u, 3169186900u, 0, LOG_TOLERANCE, 0},
+{ 819, 1075071428u, 1074268944u, 1065730444u, 280016852u, 1073347289u, 2458807329u, 0, LOG_TOLERANCE, 0},
+{ 820, 1052824608u, 3315127889u, 3236295594u, 2900924954u, 3223993621u, 1689734749u, 0, LOG_TOLERANCE, 0},
+{ 821, 1048942243u, 2246037502u, 1049691002u, 1496066550u, 3224324383u, 896522170u, 0, LOG_TOLERANCE, 0},
+{ 822, 1045523211u, 4191285446u, 3217936236u, 2382392789u, 3224498136u, 3635803563u, 0, LOG_TOLERANCE, 0},
+{ 823, 1092833308u, 640099844u, 1042152237u, 2064279383u, 1076541257u, 2073083715u, 0, LOG_TOLERANCE, 0},
+{ 824, 1079913438u, 3468560824u, 1093251038u, 310958750u, 1074998329u, 1785611289u, 0, LOG_TOLERANCE, 0},
+{ 825, 1096788400u, 1413568905u, 1100941106u, 1627289946u, 1076878612u, 3418590u, 0, LOG_TOLERANCE, 0},
+{ 826, 1044065902u, 3797143370u, 3195497539u, 3843275034u, 3224559824u, 1066708699u, 0, LOG_TOLERANCE, 0},
+{ 827, 1104593745u, 2806642640u, 3201943068u, 2515980718u, 1077224863u, 1169910650u, 0, LOG_TOLERANCE, 0},
+{ 828, 1086877316u, 632580632u, 1078673506u, 3259601317u, 1076026960u, 1211939235u, 0, LOG_TOLERANCE, 0},
+{ 829, 1053496927u, 3309678799u, 1049337078u, 3056787074u, 3223931232u, 3362832351u, 0, LOG_TOLERANCE, 0},
+{ 830, 1074011641u, 2341164249u, 1080834967u, 2810890005u, 1072529938u, 3492796186u, 0, LOG_TOLERANCE, 0},
+{ 831, 1067019674u, 932124675u, 1093915797u, 662682630u, 3222114462u, 3894149768u, 0, LOG_TOLERANCE, 0},
+{ 832, 1101746443u, 1367996113u, 3251723684u, 2974064663u, 1077100536u, 289595985u, 0, LOG_TOLERANCE, 0},
+{ 833, 1080230731u, 323437999u, 1090499064u, 901457511u, 1075058981u, 2425521271u, 0, LOG_TOLERANCE, 0},
+{ 834, 1088295228u, 4184941840u, 3196770014u, 2458988443u, 1076145017u, 2080164599u, 0, LOG_TOLERANCE, 0},
+{ 835, 1087618284u, 2023065054u, 3211994098u, 2734612965u, 1076089849u, 4264391451u, 0, LOG_TOLERANCE, 0},
+{ 836, 1064074694u, 3679267365u, 3237728785u, 1699558211u, 3222709551u, 2162071350u, 0, LOG_TOLERANCE, 0},
+{ 837, 1088079010u, 1826799031u, 1078709629u, 3986905229u, 1076129783u, 831887257u, 0, LOG_TOLERANCE, 0},
+{ 838, 1052843785u, 351061688u, 3194386466u, 4105857588u, 3223991361u, 4161570046u, 0, LOG_TOLERANCE, 0},
+{ 839, 1054128006u, 1365244058u, 1064457319u, 1452191426u, 3223875523u, 2194127603u, 0, LOG_TOLERANCE, 0},
+{ 840, 1064122385u, 2463030625u, 3215975031u, 3773488326u, 3222702940u, 454708982u, 0, LOG_TOLERANCE, 0},
+{ 841, 1103793023u, 752664055u, 1065110394u, 1835931663u, 1077189510u, 1147034722u, 0, LOG_TOLERANCE, 0},
+{ 842, 1088045088u, 3496172149u, 1089617208u, 109068701u, 1076127223u, 3818699807u, 0, LOG_TOLERANCE, 0},
+{ 843, 1050651439u, 1636966254u, 1086098766u, 2016598298u, 3224183308u, 192307776u, 0, LOG_TOLERANCE, 0},
+{ 844, 1050931318u, 3551516956u, 1097969102u, 1317953425u, 3224153094u, 1643417671u, 0, LOG_TOLERANCE, 0},
+{ 845, 1082348569u, 2977627788u, 1045339018u, 516058480u, 1075426706u, 3059244798u, 0, LOG_TOLERANCE, 0},
+{ 846, 1089924930u, 3901731263u, 3189566462u, 32272932u, 1076291228u, 2566529534u, 0, LOG_TOLERANCE, 0},
+{ 847, 1077281796u, 1956025297u, 3246628529u, 3840733905u, 1074314218u, 1358305666u, 0, LOG_TOLERANCE, 0},
+{ 848, 1099818036u, 561057891u, 3198494340u, 4271027193u, 1077015587u, 909699399u, 0, LOG_TOLERANCE, 0},
+{ 849, 1103446273u, 692989850u, 3242630588u, 2492225971u, 1077174941u, 3636625117u, 0, LOG_TOLERANCE, 0},
+{ 850, 1057995749u, 3439913962u, 1067477011u, 2973333638u, 3223547072u, 3493673504u, 0, LOG_TOLERANCE, 0},
+{ 851, 1066510341u, 877613377u, 1044917899u, 809672798u, 3222289875u, 2551263584u, 0, LOG_TOLERANCE, 0},
+{ 852, 1074687806u, 905426932u, 1046417457u, 1086320855u, 1073045712u, 3786045969u, 0, LOG_TOLERANCE, 0},
+{ 853, 1098862981u, 2645567288u, 1051258339u, 557182478u, 1076973217u, 1877277898u, 0, LOG_TOLERANCE, 0},
+{ 854, 1056574302u, 186287752u, 1061342054u, 4054003419u, 3223663822u, 3680860005u, 0, LOG_TOLERANCE, 0},
+{ 855, 1097266673u, 3506889716u, 3243866036u, 519056371u, 1076907447u, 2195222634u, 0, LOG_TOLERANCE, 0},
+{ 856, 1042654053u, 2171898436u, 3246911982u, 1091500784u, 3224620197u, 242852427u, 0, LOG_TOLERANCE, 0},
+{ 857, 1096164025u, 368493885u, 3222871893u, 1419055230u, 1076831694u, 449968426u, 0, LOG_TOLERANCE, 0},
+{ 858, 1091950572u, 2010971245u, 3188804530u, 1518695799u, 1076466543u, 3088120894u, 0, LOG_TOLERANCE, 0},
+{ 859, 1057942861u, 1239207795u, 1040192984u, 2199481342u, 3223550449u, 736007617u, 0, LOG_TOLERANCE, 0},
+{ 860, 1063494989u, 4264613432u, 3203460972u, 3558930895u, 3222807000u, 3647579418u, 0, LOG_TOLERANCE, 0},
+{ 861, 1050299283u, 3772748958u, 3227667376u, 309688336u, 3224207679u, 3122404269u, 0, LOG_TOLERANCE, 0},
+{ 862, 1083259393u, 1077949160u, 1075769893u, 2405271377u, 1075578230u, 4243093929u, 0, LOG_TOLERANCE, 0},
+{ 863, 1091835152u, 3751608506u, 3232278094u, 930375071u, 1076455525u, 1816836840u, 0, LOG_TOLERANCE, 0},
+{ 864, 1051133505u, 1518334131u, 3205247482u, 791756713u, 3224134238u, 39391912u, 0, LOG_TOLERANCE, 0},
+{ 865, 1047317453u, 2825203170u, 3245054001u, 1822981827u, 3224419764u, 57817157u, 0, LOG_TOLERANCE, 0},
+{ 866, 1100016363u, 514474738u, 1089072073u, 3300845441u, 1077023709u, 1264961045u, 0, LOG_TOLERANCE, 0},
+{ 867, 1068907602u, 247369460u, 3197320093u, 687450958u, 3221457984u, 388074873u, 0, LOG_TOLERANCE, 0},
+{ 868, 1104161422u, 2722237629u, 1058272368u, 90602316u, 1077202436u, 903459361u, 0, LOG_TOLERANCE, 0},
+{ 869, 1060614787u, 1845900544u, 3231520830u, 3389751458u, 3223302961u, 1582822839u, 0, LOG_TOLERANCE, 0},
+{ 870, 1100051597u, 737689911u, 3195377751u, 3462616966u, 1077025759u, 2432802595u, 0, LOG_TOLERANCE, 0},
+{ 871, 1076054736u, 3620285831u, 1055501023u, 2708056059u, 1073881576u, 1018222756u, 0, LOG_TOLERANCE, 0},
+{ 872, 1071981348u, 4073430285u, 1056206159u, 172017902u, 3218770535u, 1223482098u, 0, LOG_TOLERANCE, 0},
+{ 873, 1065385990u, 2799176222u, 1052706894u, 4083892667u, 3222489334u, 1732069215u, 0, LOG_TOLERANCE, 0},
+{ 874, 1054795909u, 1562351330u, 1069705601u, 1247765260u, 3223823084u, 3892941165u, 0, LOG_TOLERANCE, 0},
+{ 875, 1085233651u, 51853475u, 3189080201u, 2783553144u, 1075877942u, 597698047u, 0, LOG_TOLERANCE, 0},
+{ 876, 1071970705u, 3851781549u, 3241598113u, 514064046u, 3218802885u, 83380447u, 0, LOG_TOLERANCE, 0},
+{ 877, 1100045965u, 934745487u, 3248182437u, 2798581921u, 1077025436u, 511499556u, 0, LOG_TOLERANCE, 0},
+{ 878, 1065598845u, 2948648757u, 3232177250u, 4278702895u, 3222442230u, 3112138043u, 0, LOG_TOLERANCE, 0},
+{ 879, 1072485724u, 4259101461u, 1061606772u, 84229920u, 3216682197u, 1239324620u, 0, LOG_TOLERANCE, 0},
+{ 880, 1050591911u, 3891230598u, 1095924595u, 3049217547u, 3224187122u, 1722764368u, 0, LOG_TOLERANCE, 0},
+{ 881, 1077353053u, 3806018919u, 3243191216u, 280177341u, 1074339492u, 2305804754u, 0, LOG_TOLERANCE, 0},
+{ 882, 1060624530u, 3900344258u, 1063647809u, 4206745890u, 3223301321u, 3655805288u, 0, LOG_TOLERANCE, 0},
+{ 883, 1080223688u, 2126253040u, 3207248026u, 808507485u, 1075057495u, 3077099285u, 0, LOG_TOLERANCE, 0},
+{ 884, 1086090317u, 3465685634u, 3230391053u, 3754958214u, 1075955941u, 3478718566u, 0, LOG_TOLERANCE, 0},
+{ 885, 1102861084u, 461094531u, 1101110393u, 1316091396u, 1077148337u, 392520667u, 0, LOG_TOLERANCE, 0},
+{ 886, 1064980314u, 4197635149u, 1091873113u, 1240127141u, 3222548727u, 593733443u, 0, LOG_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 1072840891u, 1190118690u, 0, LOG_TOLERANCE, 0},
+{ 888, 1065945517u, 3744663425u, 3212482771u, 953662066u, 3222380014u, 4188749851u, 0, LOG_TOLERANCE, 0},
+{ 889, 1085171305u, 3564196690u, 3228101916u, 904305212u, 1075873903u, 1537471083u, 0, LOG_TOLERANCE, 0},
+{ 890, 1048333111u, 3566257266u, 3235138829u, 2734275140u, 3224375491u, 608683477u, 0, LOG_TOLERANCE, 0},
+{ 891, 1096464829u, 606044282u, 3241318094u, 2446416887u, 1076856392u, 525104051u, 0, LOG_TOLERANCE, 0},
+{ 892, 1041627284u, 2336116589u, 3197594053u, 2296925138u, 3224664623u, 89627721u, 0, LOG_TOLERANCE, 0},
+{ 893, 1058567659u, 907670625u, 3240769036u, 1827119006u, 3223490341u, 3151493257u, 0, LOG_TOLERANCE, 0},
+{ 894, 1044467183u, 2818710946u, 3246059905u, 553394170u, 3224543992u, 819274532u, 0, LOG_TOLERANCE, 0},
+{ 895, 1042020446u, 4099522736u, 3232742168u, 3718083858u, 3224648801u, 2651059661u, 0, LOG_TOLERANCE, 0},
+{ 896, 1092371276u, 1059279404u, 1080245336u, 175941677u, 1076500314u, 769778733u, 0, LOG_TOLERANCE, 0},
+{ 897, 1105189691u, 1650862428u, 1061816101u, 1723201723u, 1077246890u, 412568919u, 0, LOG_TOLERANCE, 0},
+{ 898, 1091529166u, 2462163405u, 3218946201u, 3876535372u, 1076423313u, 4205043249u, 0, LOG_TOLERANCE, 0},
+{ 899, 1084392886u, 495844137u, 1073721460u, 772777946u, 1075778946u, 2812768446u, 0, LOG_TOLERANCE, 0},
+{ 900, 1052415330u, 458757721u, 3245680321u, 3609892707u, 3224024546u, 383002261u, 0, LOG_TOLERANCE, 0},
+{ 901, 1045799308u, 2533012202u, 1079980803u, 3592268374u, 3224483940u, 2726652976u, 0, LOG_TOLERANCE, 0},
+{ 902, 1055881132u, 4108274117u, 1063045844u, 571992389u, 3223729882u, 2314481097u, 0, LOG_TOLERANCE, 0},
+{ 903, 1090567271u, 3541110973u, 1096296754u, 3118427427u, 1076340781u, 2632740799u, 0, LOG_TOLERANCE, 0},
+{ 904, 1046496395u, 1213941007u, 1105433735u, 2172963370u, 3224457188u, 3052458673u, 0, LOG_TOLERANCE, 0},
+{ 905, 1096853359u, 272190288u, 1095452370u, 4026581530u, 1076885251u, 2478993271u, 0, LOG_TOLERANCE, 0},
+{ 906, 1095583909u, 2843638672u, 1100510986u, 3190536898u, 1076777521u, 3199401103u, 0, LOG_TOLERANCE, 0},
+{ 907, 1083757094u, 2014317727u, 3247389683u, 2428462015u, 1075673974u, 2005503768u, 0, LOG_TOLERANCE, 0},
+{ 908, 1093976717u, 688442200u, 1047852515u, 3035186380u, 1076641579u, 3598085678u, 0, LOG_TOLERANCE, 0},
+{ 909, 1076664212u, 1010095511u, 3221288076u, 405287991u, 1074087845u, 1781834194u, 0, LOG_TOLERANCE, 0},
+{ 910, 1104810967u, 2983070435u, 1089546472u, 2907918480u, 1077233772u, 563486515u, 0, LOG_TOLERANCE, 0},
+{ 911, 1082988121u, 81928569u, 1056007286u, 2740556321u, 1075533850u, 821769330u, 0, LOG_TOLERANCE, 0},
+{ 912, 1041110867u, 2076689028u, 1081558619u, 3039159031u, 3224689437u, 2823928781u, 0, LOG_TOLERANCE, 0},
+{ 913, 1047307438u, 1376882094u, 3211003208u, 1296286481u, 3224420112u, 3184365003u, 0, LOG_TOLERANCE, 0},
+{ 914, 1080114314u, 744133164u, 3200943494u, 955832216u, 1075033268u, 2149302111u, 0, LOG_TOLERANCE, 0},
+{ 915, 1078806678u, 176522478u, 1069999908u, 2891249491u, 1074808795u, 1563703192u, 0, LOG_TOLERANCE, 0},
+{ 916, 1043564602u, 3685851715u, 3187829932u, 2363997529u, 3224581481u, 4116919064u, 0, LOG_TOLERANCE, 0},
+{ 917, 1040244055u, 3974431579u, 1052505165u, 2589067816u, 3224727383u, 3362925734u, 0, LOG_TOLERANCE, 0},
+{ 918, 1044013141u, 3819109588u, 1048561488u, 969143351u, 3224561794u, 2773963981u, 0, LOG_TOLERANCE, 0},
+{ 919, 1072639397u, 4246896124u, 1104584799u, 1940097860u, 3214582574u, 1851284834u, 0, LOG_TOLERANCE, 0},
+{ 920, 1048038468u, 2228686199u, 3220231833u, 777624847u, 3224386831u, 3580440236u, 0, LOG_TOLERANCE, 0},
+{ 921, 1083983658u, 4189906558u, 3203004203u, 854242364u, 1075708157u, 2324538567u, 0, LOG_TOLERANCE, 0},
+{ 922, 1103910407u, 4089051094u, 3227282692u, 2693170723u, 1077193789u, 2501009459u, 0, LOG_TOLERANCE, 0},
+{ 923, 1045883607u, 1278581412u, 3239296746u, 1774588717u, 3224480154u, 4264010772u, 0, LOG_TOLERANCE, 0},
+{ 924, 1074889038u, 1794845306u, 1104879344u, 4135865182u, 1073192577u, 3710212999u, 0, LOG_TOLERANCE, 0},
+{ 925, 1106449055u, 754938390u, 1061291430u, 2010786993u, 1077304123u, 3433234321u, 0, LOG_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 1071882849u, 1312596997u, 0, LOG_TOLERANCE, 0},
+{ 927, 1083965546u, 567588900u, 3195452230u, 1421366017u, 1075705582u, 3553729720u, 0, LOG_TOLERANCE, 0},
+{ 928, 1077606107u, 2708717091u, 1071975971u, 1364590470u, 1074420521u, 3509197008u, 0, LOG_TOLERANCE, 0},
+{ 929, 1104653635u, 3461956134u, 3207820115u, 1605709634u, 1077227442u, 3720226522u, 0, LOG_TOLERANCE, 0},
+{ 930, 1065302996u, 1497124553u, 1051715442u, 916736957u, 3222503756u, 1982876219u, 0, LOG_TOLERANCE, 0},
+{ 931, 1058468363u, 834914365u, 1064667143u, 2839166298u, 3223498722u, 3952086370u, 0, LOG_TOLERANCE, 0},
+{ 932, 1057279949u, 2139295776u, 1062816721u, 914592523u, 3223602368u, 1320433153u, 0, LOG_TOLERANCE, 0},
+{ 933, 1042153283u, 851569132u, 1058503154u, 1399378677u, 3224644216u, 2599935008u, 0, LOG_TOLERANCE, 0},
+{ 934, 1086054049u, 3897202342u, 3245382590u, 246600375u, 1075953364u, 2720951838u, 0, LOG_TOLERANCE, 0},
+{ 935, 1077976660u, 3620429520u, 1055627557u, 229305u, 1074530176u, 1186149429u, 0, LOG_TOLERANCE, 0},
+{ 936, 1083958833u, 3641997865u, 3206673888u, 93720614u, 1075704622u, 976119397u, 0, LOG_TOLERANCE, 0},
+{ 937, 1080324787u, 32766320u, 1062084905u, 3668443038u, 1075078058u, 656045965u, 0, LOG_TOLERANCE, 0},
+{ 938, 1075815348u, 2039713492u, 3248699388u, 1346210821u, 1073777533u, 3602564129u, 0, LOG_TOLERANCE, 0},
+{ 939, 1093050016u, 1335820726u, 3191756860u, 1808427032u, 1076561972u, 2395175349u, 0, LOG_TOLERANCE, 0},
+{ 940, 1061442763u, 650692001u, 1103515670u, 2253348763u, 3223161418u, 2163727770u, 0, LOG_TOLERANCE, 0},
+{ 941, 1043911539u, 2372623300u, 3210185343u, 3200572848u, 3224565764u, 2245925970u, 0, LOG_TOLERANCE, 0},
+{ 942, 1100796069u, 762317532u, 3194595095u, 3192607437u, 1077058609u, 3401569473u, 0, LOG_TOLERANCE, 0},
+{ 943, 1062262701u, 217775356u, 3232827087u, 2969367386u, 3223029063u, 2646417681u, 0, LOG_TOLERANCE, 0},
+{ 944, 1057172551u, 3621353969u, 1077994795u, 3873976266u, 3223613118u, 876167905u, 0, LOG_TOLERANCE, 0},
+{ 945, 1091301987u, 268372152u, 3221764390u, 3216978962u, 1076407987u, 4222096695u, 0, LOG_TOLERANCE, 0},
+{ 946, 1098953963u, 142942404u, 1075322987u, 1746449109u, 1076977460u, 3968533829u, 0, LOG_TOLERANCE, 0},
+{ 947, 1104006296u, 496534875u, 3254522293u, 2532372502u, 1077197089u, 321049357u, 0, LOG_TOLERANCE, 0},
+{ 948, 1102741893u, 2999955409u, 3222793392u, 1868977643u, 1077143987u, 3900599294u, 0, LOG_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 1072831356u, 3904079980u, 0, LOG_TOLERANCE, 0},
+{ 950, 1068218799u, 73646871u, 3231442171u, 3711510104u, 3221705708u, 1861471009u, 0, LOG_TOLERANCE, 0},
+{ 951, 1090483524u, 218135177u, 3198908856u, 3082199105u, 1076332648u, 1827165077u, 0, LOG_TOLERANCE, 0},
+{ 952, 1068068480u, 1061628117u, 3248859043u, 86776158u, 3221750981u, 3403288718u, 0, LOG_TOLERANCE, 0},
+{ 953, 1061001026u, 938869114u, 1087911145u, 2416710759u, 3223244738u, 1201893107u, 0, LOG_TOLERANCE, 0},
+{ 954, 1095576832u, 2970853959u, 3239543429u, 1887505029u, 1076777037u, 2208889702u, 0, LOG_TOLERANCE, 0},
+{ 955, 1090245139u, 1337895935u, 1076463812u, 1172733328u, 1076316542u, 2110621613u, 0, LOG_TOLERANCE, 0},
+{ 956, 1049139928u, 1469010822u, 3229583535u, 551399515u, 3224307240u, 3275195384u, 0, LOG_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 1072692825u, 2002018797u, 0, LOG_TOLERANCE, 0},
+{ 958, 1094655132u, 2976596113u, 3192137295u, 3033242648u, 1076694606u, 1193490101u, 0, LOG_TOLERANCE, 0},
+{ 959, 1098698481u, 876810930u, 3197470945u, 2571587447u, 1076967742u, 2031176632u, 0, LOG_TOLERANCE, 0},
+{ 960, 1094287162u, 4007797282u, 3225853845u, 4069319648u, 1076668519u, 2581068705u, 0, LOG_TOLERANCE, 0},
+{ 961, 1047279982u, 3840538373u, 1043189552u, 3668774580u, 3224421078u, 1501078949u, 0, LOG_TOLERANCE, 0},
+{ 962, 1070128056u, 200857661u, 3229758439u, 3359367736u, 3220846767u, 3229574488u, 0, LOG_TOLERANCE, 0},
+{ 963, 1101314221u, 111868139u, 3227902082u, 2366064003u, 1077082426u, 2927706018u, 0, LOG_TOLERANCE, 0},
+{ 964, 1044195166u, 3510904416u, 3222131653u, 3822770497u, 3224555233u, 1156872369u, 0, LOG_TOLERANCE, 0},
+{ 965, 1095192067u, 789151814u, 1099269239u, 2958956055u, 1076747587u, 3873229381u, 0, LOG_TOLERANCE, 0},
+{ 966, 1084679320u, 722163228u, 1105524559u, 1534462169u, 1075834482u, 2680752836u, 0, LOG_TOLERANCE, 0},
+{ 967, 1046586062u, 2207037106u, 3208952465u, 1231254630u, 3224451896u, 1347588545u, 0, LOG_TOLERANCE, 0},
+{ 968, 1050400412u, 3838689849u, 3198769679u, 1302617170u, 3224200205u, 624983689u, 0, LOG_TOLERANCE, 0},
+{ 969, 1085938906u, 2527556476u, 3240373426u, 124352692u, 1075944829u, 3000124945u, 0, LOG_TOLERANCE, 0},
+{ 970, 1052057157u, 3502371499u, 1043411944u, 4190072016u, 3224054712u, 3615113505u, 0, LOG_TOLERANCE, 0},
+{ 971, 1064676142u, 1798470077u, 3200116917u, 3421833729u, 3222599604u, 923411291u, 0, LOG_TOLERANCE, 0},
+{ 972, 1046031308u, 3653237931u, 3204255012u, 3683870669u, 3224474007u, 2475930530u, 0, LOG_TOLERANCE, 0},
+{ 973, 1053588582u, 376530104u, 1073853547u, 565755892u, 3223924634u, 1674199212u, 0, LOG_TOLERANCE, 0},
+{ 974, 1095020203u, 558292492u, 1051772749u, 4267873474u, 1076731940u, 3159412483u, 0, LOG_TOLERANCE, 0},
+{ 975, 1077289061u, 509637100u, 3212030069u, 215050379u, 1074316851u, 2170640386u, 0, LOG_TOLERANCE, 0},
+{ 976, 1092057101u, 3571665665u, 3188628584u, 757824767u, 1076475951u, 3202156800u, 0, LOG_TOLERANCE, 0},
+{ 977, 1067315689u, 998858159u, 1063077962u, 436029885u, 3222028739u, 880987246u, 0, LOG_TOLERANCE, 0},
+{ 978, 1058463317u, 996300405u, 3193842624u, 80548098u, 3223499163u, 2068439612u, 0, LOG_TOLERANCE, 0},
+{ 979, 1081365192u, 3876129407u, 3215332180u, 2226970413u, 1075258159u, 1795164616u, 0, LOG_TOLERANCE, 0},
+{ 980, 1090125305u, 200013509u, 3224552716u, 414878724u, 1076307631u, 2365929600u, 0, LOG_TOLERANCE, 0},
+{ 981, 1083133445u, 309319541u, 1048979765u, 1261662434u, 1075553109u, 2572671155u, 0, LOG_TOLERANCE, 0},
+{ 982, 1089252639u, 4062255924u, 3224274128u, 4289485681u, 1076229660u, 3670107739u, 0, LOG_TOLERANCE, 0},
+{ 983, 1088652436u, 1611969213u, 1053890378u, 3774617276u, 1076179232u, 1774190741u, 0, LOG_TOLERANCE, 0},
+{ 984, 1080412763u, 1752164782u, 3239587974u, 612223386u, 1075094726u, 2382279992u, 0, LOG_TOLERANCE, 0},
+{ 985, 1041545782u, 2024044989u, 1074932678u, 3259111307u, 3224668441u, 2879048600u, 0, LOG_TOLERANCE, 0},
+{ 986, 1053207518u, 2564965629u, 1093571065u, 169360454u, 3223954559u, 580679173u, 0, LOG_TOLERANCE, 0},
+{ 987, 1089599090u, 1860101737u, 3191222372u, 1676437468u, 1076259201u, 181860389u, 0, LOG_TOLERANCE, 0},
+{ 988, 1059802968u, 588387057u, 3192103292u, 2495288012u, 3223385047u, 949677917u, 0, LOG_TOLERANCE, 0},
+{ 989, 1045672057u, 659070058u, 1073095700u, 1393632068u, 3224490104u, 1843660721u, 0, LOG_TOLERANCE, 0},
+{ 990, 1070199615u, 4276187829u, 3217553330u, 1868253275u, 3220801691u, 837195521u, 0, LOG_TOLERANCE, 0},
+{ 991, 1075736624u, 2085481575u, 3215994784u, 800910002u, 1073757240u, 3736786376u, 0, LOG_TOLERANCE, 0},
+{ 992, 1056934836u, 1950570756u, 3200582211u, 941022151u, 3223638704u, 3712070612u, 0, LOG_TOLERANCE, 0},
+{ 993, 1057530368u, 2075610870u, 3250142022u, 3605152103u, 3223580274u, 1820961897u, 0, LOG_TOLERANCE, 0},
+{ 994, 1053355602u, 3792931748u, 3204857863u, 804393211u, 3223942106u, 1395149486u, 0, LOG_TOLERANCE, 0},
+{ 995, 1106162722u, 3430071177u, 3226288311u, 3652522729u, 1077289900u, 3475753848u, 0, LOG_TOLERANCE, 0},
+{ 996, 1053831054u, 236884699u, 3227874605u, 2193269825u, 3223907874u, 1630755670u, 0, LOG_TOLERANCE, 0},
+{ 997, 1064936593u, 2744231849u, 1046186036u, 771053722u, 3222555459u, 4188901663u, 0, LOG_TOLERANCE, 0},
+{ 998, 1083996036u, 3000189819u, 1096500901u, 2057239777u, 1075709902u, 2502775335u, 0, LOG_TOLERANCE, 0},
+{ 999, 1093835581u, 205759408u, 3244643377u, 2702292618u, 1076627224u, 3113340835u, 0, LOG_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_LOG_H multiple inclusion protection
+
+// EOF log.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/log10.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/log10.c
new file mode 100644
index 0000000000..e63feb0174
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/log10.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// log10.c
+//
+// Test of log10() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/log10.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(log10_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &log10, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_NONE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &log10_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("log10() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("log10() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library log10() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "log10() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF log10.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/log10.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/log10.h
new file mode 100644
index 0000000000..f023e663dd
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/log10.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_LOG10_H
+#define CYGONCE_LIBM_LOG10_H
+//===========================================================================
+//
+// log10.h
+//
+// Test vectors for testing of log10() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/log10.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define LOG10_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t log10_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1077999148u, 2506787616u, 1090024059u, 3619148316u, 1073249514u, 3022418765u, 0, LOG10_TOLERANCE, 0},
+{ 2, 1070670006u, 3176730980u, 1051524793u, 2993920299u, 3219280318u, 3521941528u, 0, LOG10_TOLERANCE, 0},
+{ 3, 1092176155u, 2725707538u, 3232101343u, 2346810316u, 1075214363u, 2619608406u, 0, LOG10_TOLERANCE, 0},
+{ 4, 1092554362u, 2088062470u, 3201242716u, 420891118u, 1075237767u, 4016913123u, 0, LOG10_TOLERANCE, 0},
+{ 5, 1073717029u, 2636405208u, 1100049309u, 471635570u, 1070788466u, 3705390542u, 0, LOG10_TOLERANCE, 0},
+{ 6, 1089363191u, 1746012320u, 1054478713u, 3333988501u, 1074998457u, 2601017037u, 0, LOG10_TOLERANCE, 0},
+{ 7, 1047953160u, 183014794u, 3202039382u, 2016785810u, 3223080594u, 1773764437u, 0, LOG10_TOLERANCE, 0},
+{ 8, 1066002386u, 2688957927u, 1046089230u, 2709029994u, 3221118451u, 837113105u, 0, LOG10_TOLERANCE, 0},
+{ 9, 1058795730u, 624574473u, 1045840574u, 3473266330u, 3222259526u, 2374389383u, 0, LOG10_TOLERANCE, 0},
+{ 10, 1057436194u, 1605286142u, 1068931671u, 4233776869u, 3222366888u, 3800128756u, 0, LOG10_TOLERANCE, 0},
+{ 11, 1060343410u, 1857607719u, 3222889559u, 3417070006u, 3222025110u, 4113556665u, 0, LOG10_TOLERANCE, 0},
+{ 12, 1103599987u, 3981151660u, 1088899021u, 1332651746u, 1075956764u, 108599875u, 0, LOG10_TOLERANCE, 0},
+{ 13, 1085298022u, 3824988054u, 1066856791u, 2070129652u, 1074591863u, 2678403996u, 0, LOG10_TOLERANCE, 0},
+{ 14, 1060076142u, 1372884064u, 1080833116u, 3229926662u, 3222074556u, 443298410u, 0, LOG10_TOLERANCE, 0},
+{ 15, 1093826501u, 3217805330u, 3191644264u, 2014578707u, 1075336418u, 3557865346u, 0, LOG10_TOLERANCE, 0},
+{ 16, 1102287487u, 265058758u, 3239903247u, 1630600647u, 1075906656u, 1833826044u, 0, LOG10_TOLERANCE, 0},
+{ 17, 1071124229u, 1946677669u, 3198462609u, 926009897u, 3218813362u, 1296639386u, 0, LOG10_TOLERANCE, 0},
+{ 18, 1072130299u, 2271884183u, 3203741999u, 2118617783u, 3217121319u, 3419458770u, 0, LOG10_TOLERANCE, 0},
+{ 19, 1047365461u, 213658772u, 3249401130u, 314151656u, 3223128539u, 2168223691u, 0, LOG10_TOLERANCE, 0},
+{ 20, 1106628640u, 1564829925u, 3197817016u, 497230814u, 1076070652u, 4249090498u, 0, LOG10_TOLERANCE, 0},
+{ 21, 1068778986u, 2075329122u, 3231746400u, 169900577u, 3220283137u, 1319601517u, 0, LOG10_TOLERANCE, 0},
+{ 22, 1049848642u, 541549344u, 1096608669u, 3119070100u, 3222939514u, 2468510095u, 0, LOG10_TOLERANCE, 0},
+{ 23, 1085427055u, 567496114u, 1045286891u, 1969998540u, 1074617778u, 384099018u, 0, LOG10_TOLERANCE, 0},
+{ 24, 1060548195u, 1299369769u, 1049342524u, 4167404066u, 3221991359u, 737986283u, 0, LOG10_TOLERANCE, 0},
+{ 25, 1061381997u, 3348930841u, 1078472138u, 358457347u, 3221869066u, 249937911u, 0, LOG10_TOLERANCE, 0},
+{ 26, 1071069297u, 2192461366u, 1099527247u, 3184735642u, 3218877956u, 3100951136u, 0, LOG10_TOLERANCE, 0},
+{ 27, 1052861772u, 331696577u, 3189610016u, 793242270u, 3222715301u, 1774046932u, 0, LOG10_TOLERANCE, 0},
+{ 28, 1105045286u, 2322696981u, 1083791358u, 3020766674u, 1076009218u, 2332151086u, 0, LOG10_TOLERANCE, 0},
+{ 29, 1044902177u, 252085215u, 3214426435u, 4139068910u, 3223310243u, 930081556u, 0, LOG10_TOLERANCE, 0},
+{ 30, 1075022077u, 105589263u, 1056316170u, 261630827u, 1072040521u, 3389720896u, 0, LOG10_TOLERANCE, 0},
+{ 31, 1107213408u, 428765703u, 3251828686u, 2009972239u, 1076090173u, 2232985963u, 0, LOG10_TOLERANCE, 0},
+{ 32, 1098568019u, 3517376586u, 3240257920u, 3304487302u, 1075694540u, 919239854u, 0, LOG10_TOLERANCE, 0},
+{ 33, 1086054264u, 237004814u, 3237899261u, 3364008659u, 1074713551u, 803164225u, 0, LOG10_TOLERANCE, 0},
+{ 34, 1047763904u, 472004928u, 3226869477u, 1186387580u, 3223096235u, 3622735061u, 0, LOG10_TOLERANCE, 0},
+{ 35, 1054226850u, 4085763910u, 1106394906u, 2684738273u, 3222608495u, 1452762068u, 0, LOG10_TOLERANCE, 0},
+{ 36, 1057053639u, 2055490142u, 3231581370u, 3879040079u, 3222399892u, 728588179u, 0, LOG10_TOLERANCE, 0},
+{ 37, 1041492999u, 3725731239u, 1061652681u, 591292963u, 3223445266u, 1587892700u, 0, LOG10_TOLERANCE, 0},
+{ 38, 1077531333u, 1147041027u, 3215417793u, 624695933u, 1073125274u, 89100982u, 0, LOG10_TOLERANCE, 0},
+{ 39, 1058569126u, 705725219u, 3238067573u, 1116238321u, 3222281827u, 770742446u, 0, LOG10_TOLERANCE, 0},
+{ 40, 1059883440u, 7287411u, 1045917232u, 116067742u, 3222096885u, 913481370u, 0, LOG10_TOLERANCE, 0},
+{ 41, 1092571574u, 3604989074u, 1066381836u, 545298780u, 1075238726u, 2904656021u, 0, LOG10_TOLERANCE, 0},
+{ 42, 1071597288u, 1681476121u, 1060345752u, 3553822398u, 3218335408u, 1174560309u, 0, LOG10_TOLERANCE, 0},
+{ 43, 1102831658u, 3410480388u, 1052460275u, 1660607230u, 1075926787u, 102598250u, 0, LOG10_TOLERANCE, 0},
+{ 44, 1089216869u, 1494984673u, 3196647153u, 287894723u, 1074989762u, 1122846966u, 0, LOG10_TOLERANCE, 0},
+{ 45, 1054885127u, 644548665u, 1081948134u, 2442134629u, 3222565093u, 3817391420u, 0, LOG10_TOLERANCE, 0},
+{ 46, 1087554095u, 2312530895u, 3221584595u, 3379665576u, 1074864717u, 2346974421u, 0, LOG10_TOLERANCE, 0},
+{ 47, 1096085375u, 3018463866u, 1086226574u, 404012923u, 1075508523u, 2582069913u, 0, LOG10_TOLERANCE, 0},
+{ 48, 1064733299u, 1710279345u, 3251401196u, 3528946000u, 3221361467u, 665183996u, 0, LOG10_TOLERANCE, 0},
+{ 49, 1061536351u, 2164450219u, 1083520023u, 3312018966u, 3221842981u, 1511855102u, 0, LOG10_TOLERANCE, 0},
+{ 50, 1057248676u, 2648986431u, 1050330591u, 1474376550u, 3222381877u, 571379592u, 0, LOG10_TOLERANCE, 0},
+{ 51, 1046938380u, 1839068700u, 1077406406u, 3013052171u, 3223156927u, 1273004858u, 0, LOG10_TOLERANCE, 0},
+{ 52, 1046493630u, 772102380u, 3220729740u, 4219039958u, 3223196708u, 1857276792u, 0, LOG10_TOLERANCE, 0},
+{ 53, 1081988573u, 3058618779u, 1046304788u, 3338676024u, 1074097737u, 4237319426u, 0, LOG10_TOLERANCE, 0},
+{ 54, 1051172137u, 506286854u, 1094907481u, 2217000199u, 3222838334u, 1971852126u, 0, LOG10_TOLERANCE, 0},
+{ 55, 1082428310u, 1147428263u, 1065432625u, 3034786717u, 1074170619u, 220014801u, 0, LOG10_TOLERANCE, 0},
+{ 56, 1082016752u, 2844125311u, 1082985198u, 2561492677u, 1074100996u, 107966054u, 0, LOG10_TOLERANCE, 0},
+{ 57, 1064053268u, 704542600u, 3222902057u, 2762779203u, 3221468579u, 215530745u, 0, LOG10_TOLERANCE, 0},
+{ 58, 1052196966u, 184131949u, 3249723525u, 1667366082u, 3222761181u, 3301049340u, 0, LOG10_TOLERANCE, 0},
+{ 59, 1076125950u, 3904224140u, 1067056698u, 2942159914u, 1072701794u, 1892749236u, 0, LOG10_TOLERANCE, 0},
+{ 60, 1100636863u, 426114282u, 3209056785u, 1083606355u, 1075844746u, 4158287464u, 0, LOG10_TOLERANCE, 0},
+{ 61, 1106165945u, 3774123863u, 1106787580u, 2722107965u, 1076050748u, 1644090822u, 0, LOG10_TOLERANCE, 0},
+{ 62, 1088005092u, 1377734762u, 1104232051u, 2377063483u, 1074900296u, 1620468150u, 0, LOG10_TOLERANCE, 0},
+{ 63, 1069380559u, 1029739074u, 1105467109u, 3062201018u, 3220049220u, 1952021905u, 0, LOG10_TOLERANCE, 0},
+{ 64, 1087257949u, 773857656u, 3214251949u, 335833884u, 1074840167u, 1626397392u, 0, LOG10_TOLERANCE, 0},
+{ 65, 1055740962u, 1473865960u, 1103073830u, 4000427507u, 3222498007u, 2325532597u, 0, LOG10_TOLERANCE, 0},
+{ 66, 1103185231u, 4242092620u, 1067009473u, 14539161u, 1075938991u, 4075535913u, 0, LOG10_TOLERANCE, 0},
+{ 67, 1045032426u, 1732245037u, 1101371955u, 1533536108u, 3223301164u, 1695162079u, 0, LOG10_TOLERANCE, 0},
+{ 68, 1101670347u, 1833841275u, 1099430098u, 4144145552u, 1075883704u, 2534133722u, 0, LOG10_TOLERANCE, 0},
+{ 69, 1096786815u, 935007012u, 3188865420u, 604442938u, 1075555534u, 3856091931u, 0, LOG10_TOLERANCE, 0},
+{ 70, 1059419605u, 2211464602u, 1046255144u, 1635910526u, 3222161784u, 2122038886u, 0, LOG10_TOLERANCE, 0},
+{ 71, 1077871417u, 2549219008u, 3231633258u, 3733639385u, 1073208663u, 430860074u, 0, LOG10_TOLERANCE, 0},
+{ 72, 1082095089u, 1819374372u, 3202219056u, 2617077637u, 1074109815u, 3246089147u, 0, LOG10_TOLERANCE, 0},
+{ 73, 1094345280u, 546465680u, 1048653554u, 532401530u, 1075377030u, 1431910568u, 0, LOG10_TOLERANCE, 0},
+{ 74, 1044571091u, 2759019783u, 3221570188u, 3554409630u, 3223329924u, 2544254508u, 0, LOG10_TOLERANCE, 0},
+{ 75, 1065447634u, 2527221960u, 1099107978u, 2696971136u, 3221262049u, 1391120482u, 0, LOG10_TOLERANCE, 0},
+{ 76, 1097158000u, 173134582u, 1087299442u, 2877794600u, 1075589414u, 4260456854u, 0, LOG10_TOLERANCE, 0},
+{ 77, 1086400474u, 547642046u, 3197285510u, 3521286127u, 1074760870u, 3835447898u, 0, LOG10_TOLERANCE, 0},
+{ 78, 1074860702u, 1231582831u, 1090971734u, 1653446832u, 1071917811u, 895223700u, 0, LOG10_TOLERANCE, 0},
+{ 79, 1061342535u, 3762182190u, 3252967851u, 2615360375u, 3221876243u, 3440127565u, 0, LOG10_TOLERANCE, 0},
+{ 80, 1053350775u, 2588067350u, 3206610957u, 3551059728u, 3222674665u, 3919675322u, 0, LOG10_TOLERANCE, 0},
+{ 81, 1059495208u, 845263327u, 1073415902u, 1749010288u, 3222149862u, 1260690295u, 0, LOG10_TOLERANCE, 0},
+{ 82, 1058092722u, 3092685191u, 3190678390u, 2872219490u, 3222321932u, 4078691992u, 0, LOG10_TOLERANCE, 0},
+{ 83, 1070831407u, 4107255722u, 3205337291u, 3069068345u, 3219157958u, 2522023062u, 0, LOG10_TOLERANCE, 0},
+{ 84, 1096507209u, 2294867524u, 3216653996u, 2860384670u, 1075539043u, 3909250401u, 0, LOG10_TOLERANCE, 0},
+{ 85, 1045842702u, 2265437201u, 3240198679u, 1234948614u, 3223239452u, 4104182862u, 0, LOG10_TOLERANCE, 0},
+{ 86, 1068876281u, 1186945904u, 3251167793u, 1896750851u, 3220250953u, 2361841191u, 0, LOG10_TOLERANCE, 0},
+{ 87, 1081575478u, 3686084548u, 1079286273u, 3309277689u, 1074043698u, 3305889265u, 0, LOG10_TOLERANCE, 0},
+{ 88, 1075992592u, 3006860614u, 3231412671u, 2504194724u, 1072614529u, 2742713680u, 0, LOG10_TOLERANCE, 0},
+{ 89, 1088665612u, 1948717780u, 1048317852u, 3791803982u, 1074949315u, 1016144265u, 0, LOG10_TOLERANCE, 0},
+{ 90, 1064345015u, 4272034420u, 3192982124u, 1526175922u, 3221430904u, 1575151155u, 0, LOG10_TOLERANCE, 0},
+{ 91, 1098334178u, 4108948538u, 1104691287u, 640541190u, 1075678285u, 2376433274u, 0, LOG10_TOLERANCE, 0},
+{ 92, 1059773769u, 3259274853u, 1082507103u, 3677038020u, 3222110644u, 2405648502u, 0, LOG10_TOLERANCE, 0},
+{ 93, 1083132498u, 3781708548u, 1096584871u, 1207386447u, 1074266405u, 2767701991u, 0, LOG10_TOLERANCE, 0},
+{ 94, 1041211624u, 3011191657u, 1103798670u, 1096124830u, 3223458410u, 3146895201u, 0, LOG10_TOLERANCE, 0},
+{ 95, 1063235023u, 2540404725u, 3240157452u, 4122845725u, 3221599629u, 3004527711u, 0, LOG10_TOLERANCE, 0},
+{ 96, 1083643710u, 311336721u, 3214382367u, 4212533768u, 1074355041u, 396212168u, 0, LOG10_TOLERANCE, 0},
+{ 97, 1051139427u, 1769686293u, 3240200923u, 3538602249u, 3222840766u, 2455777040u, 0, LOG10_TOLERANCE, 0},
+{ 98, 1078227549u, 508056696u, 1103793878u, 776520138u, 1073334613u, 2708912122u, 0, LOG10_TOLERANCE, 0},
+{ 99, 1102910577u, 4064962760u, 1077424413u, 819766631u, 1075929194u, 1996503108u, 0, LOG10_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 1071444142u, 1729917169u, 0, LOG10_TOLERANCE, 0},
+{ 101, 1082295059u, 2514398118u, 1076579751u, 870169764u, 1074146890u, 3718905266u, 0, LOG10_TOLERANCE, 0},
+{ 102, 1099367744u, 1190259653u, 1069112254u, 3417249840u, 1075756071u, 2662850456u, 0, LOG10_TOLERANCE, 0},
+{ 103, 1046179435u, 3467757357u, 3215075200u, 2168175352u, 3223215840u, 1799448942u, 0, LOG10_TOLERANCE, 0},
+{ 104, 1092159487u, 1508888184u, 1060430241u, 3524949092u, 1075213212u, 2842956866u, 0, LOG10_TOLERANCE, 0},
+{ 105, 1049929235u, 166402802u, 3237198975u, 3572369260u, 3222932523u, 4280265619u, 0, LOG10_TOLERANCE, 0},
+{ 106, 1081866822u, 2441536203u, 3202753937u, 3658194573u, 1074083099u, 1451479062u, 0, LOG10_TOLERANCE, 0},
+{ 107, 1062392908u, 2479742828u, 1062342831u, 4214154303u, 3221718085u, 2663279180u, 0, LOG10_TOLERANCE, 0},
+{ 108, 1082396794u, 426896765u, 1066474375u, 2201754442u, 1074165226u, 294524756u, 0, LOG10_TOLERANCE, 0},
+{ 109, 1048145373u, 2055773734u, 3239267288u, 291396537u, 3223066642u, 1899295311u, 0, LOG10_TOLERANCE, 0},
+{ 110, 1089484385u, 874125203u, 3210508124u, 4091098764u, 1075005936u, 3628964044u, 0, LOG10_TOLERANCE, 0},
+{ 111, 1065716026u, 120488169u, 3241241441u, 1985269424u, 3221202575u, 1575844383u, 0, LOG10_TOLERANCE, 0},
+{ 112, 1059055762u, 2243036871u, 3243941101u, 740033495u, 3222229291u, 2093928209u, 0, LOG10_TOLERANCE, 0},
+{ 113, 1061941258u, 1176656356u, 1074261978u, 3588756231u, 3221786072u, 706930159u, 0, LOG10_TOLERANCE, 0},
+{ 114, 1105333143u, 3037249392u, 1061635587u, 1173102190u, 1076020402u, 1724289891u, 0, LOG10_TOLERANCE, 0},
+{ 115, 1089725933u, 2882725208u, 1071440059u, 69225090u, 1075029258u, 2093829877u, 0, LOG10_TOLERANCE, 0},
+{ 116, 1065179826u, 272319256u, 1072073912u, 2493997123u, 3221301330u, 1958636672u, 0, LOG10_TOLERANCE, 0},
+{ 117, 1057720186u, 188610379u, 3232757923u, 2209647371u, 3222347389u, 2837231009u, 0, LOG10_TOLERANCE, 0},
+{ 118, 1089274869u, 1990439193u, 1078073146u, 622849962u, 1074993288u, 3576763939u, 0, LOG10_TOLERANCE, 0},
+{ 119, 1057135741u, 756052458u, 1081649113u, 2247475162u, 3222391958u, 2930228447u, 0, LOG10_TOLERANCE, 0},
+{ 120, 1061623064u, 3878055211u, 3222407050u, 2979438623u, 3221829540u, 1096267203u, 0, LOG10_TOLERANCE, 0},
+{ 121, 1047807349u, 2676398686u, 1105124431u, 3631096636u, 3223092450u, 2080967742u, 0, LOG10_TOLERANCE, 0},
+{ 122, 1065079390u, 1697791764u, 3198136112u, 2299842819u, 3221313539u, 2223619642u, 0, LOG10_TOLERANCE, 0},
+{ 123, 1078084768u, 1931502677u, 3215264397u, 3016456382u, 1073283305u, 2406385933u, 0, LOG10_TOLERANCE, 0},
+{ 124, 1072253426u, 343404215u, 1061072607u, 4266232536u, 3216648998u, 239016280u, 0, LOG10_TOLERANCE, 0},
+{ 125, 1093747188u, 4140316002u, 1082896196u, 868256971u, 1075328702u, 2557641593u, 0, LOG10_TOLERANCE, 0},
+{ 126, 1075422810u, 1864139509u, 3187675097u, 3084482407u, 1072288548u, 2563126331u, 0, LOG10_TOLERANCE, 0},
+{ 127, 1072707675u, 2427162817u, 3234748208u, 2715105792u, 1064849176u, 3587587979u, 0, LOG10_TOLERANCE, 0},
+{ 128, 1064600512u, 3943389284u, 1046724025u, 3626825684u, 3221382913u, 1568343271u, 0, LOG10_TOLERANCE, 0},
+{ 129, 1045423002u, 967350972u, 1093012318u, 448002663u, 3223277610u, 3114998281u, 0, LOG10_TOLERANCE, 0},
+{ 130, 1104362211u, 105058217u, 1069733884u, 171786224u, 1075984565u, 2168621818u, 0, LOG10_TOLERANCE, 0},
+{ 131, 1042130860u, 2863482262u, 3204997271u, 877784425u, 3223422621u, 3194788353u, 0, LOG10_TOLERANCE, 0},
+{ 132, 1055145665u, 2801782962u, 3213604117u, 762347195u, 3222540205u, 780206140u, 0, LOG10_TOLERANCE, 0},
+{ 133, 1086003079u, 2317950339u, 3246333414u, 2135700283u, 1074707079u, 4088703451u, 0, LOG10_TOLERANCE, 0},
+{ 134, 1056516397u, 4171919805u, 1082858682u, 2180920863u, 3222436544u, 1603917460u, 0, LOG10_TOLERANCE, 0},
+{ 135, 1072665436u, 1918836931u, 1083603224u, 3137821660u, 3212296090u, 3048145701u, 0, LOG10_TOLERANCE, 0},
+{ 136, 1103902874u, 3456203663u, 3235600523u, 2335688936u, 1075966944u, 3184370032u, 0, LOG10_TOLERANCE, 0},
+{ 137, 1042279322u, 4170235262u, 1051824459u, 521583737u, 3223418431u, 1706671790u, 0, LOG10_TOLERANCE, 0},
+{ 138, 1081348303u, 1296623194u, 3250673860u, 2442872540u, 1074007414u, 1749941826u, 0, LOG10_TOLERANCE, 0},
+{ 139, 1061684277u, 289979405u, 1049514449u, 3865737145u, 3221820508u, 669475419u, 0, LOG10_TOLERANCE, 0},
+{ 140, 1075298944u, 3699090239u, 1054539840u, 3259249360u, 1072218835u, 1332264134u, 0, LOG10_TOLERANCE, 0},
+{ 141, 1096418100u, 1619819023u, 1045993352u, 1022642459u, 1075533243u, 1299474792u, 0, LOG10_TOLERANCE, 0},
+{ 142, 1081433004u, 19455098u, 3229182089u, 2096003654u, 1074021627u, 1335572803u, 0, LOG10_TOLERANCE, 0},
+{ 143, 1076297936u, 3803689997u, 1071630912u, 2263729518u, 1072756957u, 1728113973u, 0, LOG10_TOLERANCE, 0},
+{ 144, 1101357261u, 2816837387u, 1063422305u, 2597606398u, 1075872223u, 2982335179u, 0, LOG10_TOLERANCE, 0},
+{ 145, 1069100169u, 3680967506u, 1040201163u, 179224723u, 3220184538u, 579581628u, 0, LOG10_TOLERANCE, 0},
+{ 146, 1041146119u, 978126928u, 1101553990u, 4047893399u, 3223460238u, 2981887158u, 0, LOG10_TOLERANCE, 0},
+{ 147, 1074838397u, 4059818629u, 1042678728u, 3640293589u, 1071899471u, 3330393492u, 0, LOG10_TOLERANCE, 0},
+{ 148, 1100980392u, 3383497159u, 1070002807u, 1527313008u, 1075855061u, 3937649430u, 0, LOG10_TOLERANCE, 0},
+{ 149, 1055224031u, 2599946514u, 1104170406u, 2738675352u, 3222533671u, 3949070241u, 0, LOG10_TOLERANCE, 0},
+{ 150, 1105232623u, 3616571377u, 1060859316u, 1130603218u, 1076015345u, 3938672152u, 0, LOG10_TOLERANCE, 0},
+{ 151, 1076028796u, 3859211180u, 1067940450u, 1744531824u, 1072641553u, 236826591u, 0, LOG10_TOLERANCE, 0},
+{ 152, 1042831340u, 1958025850u, 3236511256u, 2472176453u, 3223394400u, 155360699u, 0, LOG10_TOLERANCE, 0},
+{ 153, 1085623441u, 182132862u, 3250520938u, 3924356991u, 1074652303u, 227095142u, 0, LOG10_TOLERANCE, 0},
+{ 154, 1083018236u, 35632886u, 3209806504u, 1453402523u, 1074253351u, 706658652u, 0, LOG10_TOLERANCE, 0},
+{ 155, 1083522102u, 743225214u, 3202890678u, 142917400u, 1074335966u, 971180013u, 0, LOG10_TOLERANCE, 0},
+{ 156, 1080684976u, 1472665012u, 3203138231u, 256588219u, 1073908090u, 2970356020u, 0, LOG10_TOLERANCE, 0},
+{ 157, 1094982162u, 1062927000u, 1061134072u, 931677439u, 1075424983u, 4192261729u, 0, LOG10_TOLERANCE, 0},
+{ 158, 1058377732u, 2320910576u, 1055663370u, 288059864u, 3222296288u, 615814715u, 0, LOG10_TOLERANCE, 0},
+{ 159, 1078958093u, 1448349062u, 3199478070u, 3454027134u, 1073532773u, 2431650893u, 0, LOG10_TOLERANCE, 0},
+{ 160, 1089975150u, 4215445172u, 3196654963u, 2231888973u, 1075049168u, 3858745282u, 0, LOG10_TOLERANCE, 0},
+{ 161, 1099148583u, 40413554u, 3232578253u, 983832844u, 1075738201u, 1294348798u, 0, LOG10_TOLERANCE, 0},
+{ 162, 1076237886u, 3995725873u, 1050082319u, 777231627u, 1072738446u, 2490660630u, 0, LOG10_TOLERANCE, 0},
+{ 163, 1040986626u, 672789828u, 3253385962u, 2982787335u, 3223464951u, 2022959186u, 0, LOG10_TOLERANCE, 0},
+{ 164, 1068390875u, 2075971825u, 1070166500u, 4034633931u, 3220415024u, 1453784302u, 0, LOG10_TOLERANCE, 0},
+{ 165, 1062562529u, 1018222907u, 3244621407u, 3090050495u, 3221688759u, 3042080164u, 0, LOG10_TOLERANCE, 0},
+{ 166, 1067680885u, 937732557u, 3200798890u, 2557898276u, 3220616089u, 2752657805u, 0, LOG10_TOLERANCE, 0},
+{ 167, 1078342316u, 130346162u, 3223590310u, 275568693u, 1073372035u, 4013751462u, 0, LOG10_TOLERANCE, 0},
+{ 168, 1042898869u, 3807416441u, 1075961161u, 3706820266u, 3223392040u, 625299453u, 0, LOG10_TOLERANCE, 0},
+{ 169, 1068615357u, 1710131411u, 1078123323u, 1900790503u, 3220342988u, 1117943757u, 0, LOG10_TOLERANCE, 0},
+{ 170, 1091335713u, 3420420033u, 3210844787u, 588423066u, 1075148920u, 1970986568u, 0, LOG10_TOLERANCE, 0},
+{ 171, 1049684114u, 1160162008u, 3246307879u, 4265764460u, 3222955275u, 558478599u, 0, LOG10_TOLERANCE, 0},
+{ 172, 1102543434u, 366653268u, 3188814424u, 466059202u, 1075917013u, 142658660u, 0, LOG10_TOLERANCE, 0},
+{ 173, 1079144091u, 1325936170u, 3221436876u, 680097612u, 1073603027u, 4223503858u, 0, LOG10_TOLERANCE, 0},
+{ 174, 1092907468u, 1827735934u, 3200554324u, 2875599271u, 1075269082u, 61509776u, 0, LOG10_TOLERANCE, 0},
+{ 175, 1043546754u, 3117037091u, 3239246636u, 15838845u, 3223368277u, 1788507559u, 0, LOG10_TOLERANCE, 0},
+{ 176, 1051974004u, 749718883u, 3223587064u, 1523766569u, 3222779192u, 499603616u, 0, LOG10_TOLERANCE, 0},
+{ 177, 1044833651u, 1966536294u, 3250158026u, 699164258u, 3223315327u, 605213675u, 0, LOG10_TOLERANCE, 0},
+{ 178, 1098048435u, 3759049394u, 1106085272u, 1183789499u, 1075654641u, 1976310585u, 0, LOG10_TOLERANCE, 0},
+{ 179, 1081201623u, 1970107747u, 1095245453u, 2308233883u, 1073980485u, 1917090271u, 0, LOG10_TOLERANCE, 0},
+{ 180, 1084756444u, 1491017852u, 1041444355u, 1723375725u, 1074522322u, 201295655u, 0, LOG10_TOLERANCE, 0},
+{ 181, 1069146422u, 1141349287u, 1097465301u, 3403438584u, 3220166997u, 3273626097u, 0, LOG10_TOLERANCE, 0},
+{ 182, 1083088260u, 1711085243u, 3250239076u, 1377484108u, 1074261439u, 3510689380u, 0, LOG10_TOLERANCE, 0},
+{ 183, 1098385019u, 2880275004u, 1084039594u, 1611394950u, 1075682022u, 1318740231u, 0, LOG10_TOLERANCE, 0},
+{ 184, 1086737787u, 2626629370u, 1063771493u, 1499080813u, 1074805506u, 2197894595u, 0, LOG10_TOLERANCE, 0},
+{ 185, 1055231263u, 3936262414u, 1103919063u, 3175668759u, 3222533087u, 1926622946u, 0, LOG10_TOLERANCE, 0},
+{ 186, 1060498071u, 1270950554u, 3194616071u, 3680565379u, 3221999169u, 3085134097u, 0, LOG10_TOLERANCE, 0},
+{ 187, 1060664575u, 1066985223u, 3221613219u, 4089383168u, 3221974195u, 1363215594u, 0, LOG10_TOLERANCE, 0},
+{ 188, 1069575191u, 4017329311u, 3208334452u, 1667591498u, 3219949937u, 482205278u, 0, LOG10_TOLERANCE, 0},
+{ 189, 1088164157u, 3154656624u, 1061894279u, 3886344038u, 1074910593u, 1611552831u, 0, LOG10_TOLERANCE, 0},
+{ 190, 1050652945u, 977586119u, 3209762784u, 953839852u, 3222883751u, 2710381229u, 0, LOG10_TOLERANCE, 0},
+{ 191, 1104965247u, 143071571u, 3206165386u, 913097445u, 1076006824u, 1671790082u, 0, LOG10_TOLERANCE, 0},
+{ 192, 1043081808u, 1371169579u, 1057079837u, 2594818628u, 3223386098u, 4205730324u, 0, LOG10_TOLERANCE, 0},
+{ 193, 1104309688u, 2259342224u, 3217432469u, 1824221478u, 1075982142u, 1272387594u, 0, LOG10_TOLERANCE, 0},
+{ 194, 1099351127u, 1576604497u, 1079368611u, 185078728u, 1075754810u, 3070984497u, 0, LOG10_TOLERANCE, 0},
+{ 195, 1074195779u, 444800035u, 3243343143u, 1734989302u, 1071465380u, 1752264123u, 0, LOG10_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1066859955u, 2063338972u, 0, LOG10_TOLERANCE, 0},
+{ 197, 1087212320u, 1941318385u, 1045807374u, 792193370u, 1074837515u, 2154594024u, 0, LOG10_TOLERANCE, 0},
+{ 198, 1090816018u, 1299392207u, 3212131720u, 3205732280u, 1075111739u, 267565964u, 0, LOG10_TOLERANCE, 0},
+{ 199, 1098698804u, 3035093505u, 1052187689u, 3287702190u, 1075702711u, 3041229296u, 0, LOG10_TOLERANCE, 0},
+{ 200, 1099192612u, 2160225215u, 1102624859u, 836655570u, 1075742023u, 2852075512u, 0, LOG10_TOLERANCE, 0},
+{ 201, 1096723626u, 3360816360u, 3246176356u, 172860634u, 1075552011u, 1964944288u, 0, LOG10_TOLERANCE, 0},
+{ 202, 1070995788u, 146831910u, 1051558014u, 2340722078u, 3218968143u, 2381624297u, 0, LOG10_TOLERANCE, 0},
+{ 203, 1082932703u, 1603798153u, 3207725532u, 1099413093u, 1074243064u, 2760597126u, 0, LOG10_TOLERANCE, 0},
+{ 204, 1099194730u, 2429340443u, 3190303581u, 3223770005u, 1075742204u, 1481397550u, 0, LOG10_TOLERANCE, 0},
+{ 205, 1075882959u, 955542166u, 3230415151u, 275583938u, 1072527436u, 3458072453u, 0, LOG10_TOLERANCE, 0},
+{ 206, 1092971882u, 513397822u, 1090646554u, 2089321329u, 1075274427u, 3320030397u, 0, LOG10_TOLERANCE, 0},
+{ 207, 1045686228u, 2782073372u, 1046063872u, 4023829068u, 3223252349u, 3038225778u, 0, LOG10_TOLERANCE, 0},
+{ 208, 1098564822u, 3242223094u, 3194111199u, 4264674108u, 1075694332u, 3986486054u, 0, LOG10_TOLERANCE, 0},
+{ 209, 1091027173u, 3506346169u, 1047020885u, 1742757458u, 1075128334u, 1994269532u, 0, LOG10_TOLERANCE, 0},
+{ 210, 1045180829u, 1265459564u, 3193450280u, 3650514880u, 3223291632u, 1407815761u, 0, LOG10_TOLERANCE, 0},
+{ 211, 1081755890u, 1525260440u, 3235452527u, 2612331392u, 1074068889u, 281483434u, 0, LOG10_TOLERANCE, 0},
+{ 212, 1101185272u, 1263613754u, 3219096387u, 635677201u, 1075864768u, 886241666u, 0, LOG10_TOLERANCE, 0},
+{ 213, 1058788439u, 4140947288u, 3200792376u, 2013265346u, 3222260434u, 3769645888u, 0, LOG10_TOLERANCE, 0},
+{ 214, 1102490744u, 1912759945u, 3237045253u, 1351396825u, 1075915029u, 2362076341u, 0, LOG10_TOLERANCE, 0},
+{ 215, 1100721514u, 1001433078u, 3206926643u, 2741676659u, 1075847467u, 2274933934u, 0, LOG10_TOLERANCE, 0},
+{ 216, 1080923606u, 1088945233u, 1085095743u, 3986114865u, 1073937994u, 3131087463u, 0, LOG10_TOLERANCE, 0},
+{ 217, 1068250409u, 831239754u, 1099828675u, 3071308141u, 3220448375u, 1593685882u, 0, LOG10_TOLERANCE, 0},
+{ 218, 1078350849u, 3473592372u, 1102759382u, 1309576357u, 1073374699u, 2119873274u, 0, LOG10_TOLERANCE, 0},
+{ 219, 1103703058u, 2042340367u, 1091945628u, 2062772374u, 1075960436u, 2286787906u, 0, LOG10_TOLERANCE, 0},
+{ 220, 1047282039u, 1840632537u, 1096533424u, 807510337u, 3223133556u, 615461173u, 0, LOG10_TOLERANCE, 0},
+{ 221, 1083968074u, 144814872u, 3212698915u, 2282965697u, 1074399260u, 2935967126u, 0, LOG10_TOLERANCE, 0},
+{ 222, 1071236430u, 2552499583u, 3229111426u, 1470130815u, 3218688141u, 1735943305u, 0, LOG10_TOLERANCE, 0},
+{ 223, 1095609417u, 2858583811u, 1089760910u, 6360994u, 1075469319u, 1031376135u, 0, LOG10_TOLERANCE, 0},
+{ 224, 1050781281u, 1614537194u, 1075198900u, 4088705365u, 3222871476u, 124071926u, 0, LOG10_TOLERANCE, 0},
+{ 225, 1103455422u, 3545570051u, 1065221325u, 1629217700u, 1075951177u, 3818828341u, 0, LOG10_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 1066739384u, 2622169306u, 0, LOG10_TOLERANCE, 0},
+{ 227, 1049319038u, 2406734491u, 1042055360u, 89226663u, 3222979489u, 1549818103u, 0, LOG10_TOLERANCE, 0},
+{ 228, 1048267433u, 1618759139u, 3194723421u, 3888234802u, 3223058595u, 943314679u, 0, LOG10_TOLERANCE, 0},
+{ 229, 1055357248u, 3590035633u, 3212424262u, 2892456615u, 3222523359u, 3801211338u, 0, LOG10_TOLERANCE, 0},
+{ 230, 1042459412u, 2431246964u, 3241512456u, 183850734u, 3223409509u, 3122860931u, 0, LOG10_TOLERANCE, 0},
+{ 231, 1089501101u, 3088319870u, 3211544311u, 862225364u, 1075007714u, 397722947u, 0, LOG10_TOLERANCE, 0},
+{ 232, 1087811016u, 3495352775u, 1058576726u, 596957268u, 1074886323u, 4156588618u, 0, LOG10_TOLERANCE, 0},
+{ 233, 1046553348u, 1839214511u, 3205004060u, 1923240983u, 3223190487u, 3541347935u, 0, LOG10_TOLERANCE, 0},
+{ 234, 1058073864u, 739619702u, 3223356436u, 2689885273u, 3222323852u, 918767008u, 0, LOG10_TOLERANCE, 0},
+{ 235, 1052841323u, 2143376228u, 1098306332u, 3760236188u, 3222717361u, 4276298674u, 0, LOG10_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 1071782371u, 3108716060u, 0, LOG10_TOLERANCE, 0},
+{ 237, 1066682341u, 2493598049u, 3194927008u, 1689107592u, 3220914269u, 805960935u, 0, LOG10_TOLERANCE, 0},
+{ 238, 1042506311u, 1578976988u, 1066368383u, 2117279163u, 3223407368u, 1831202447u, 0, LOG10_TOLERANCE, 0},
+{ 239, 1075504463u, 3425290087u, 1098487295u, 1263412017u, 1072331748u, 2542659286u, 0, LOG10_TOLERANCE, 0},
+{ 240, 1060949116u, 3635396812u, 1070999426u, 3965655689u, 3221936986u, 1317850179u, 0, LOG10_TOLERANCE, 0},
+{ 241, 1060196346u, 2183973116u, 1101098363u, 1118613350u, 3222052862u, 2389008740u, 0, LOG10_TOLERANCE, 0},
+{ 242, 1074462441u, 199516350u, 1078368488u, 164621458u, 1071703822u, 3497032431u, 0, LOG10_TOLERANCE, 0},
+{ 243, 1040222370u, 3570940805u, 3230316437u, 3596080877u, 3223495334u, 3465764975u, 0, LOG10_TOLERANCE, 0},
+{ 244, 1060725917u, 980880313u, 1079833442u, 884465057u, 3221965643u, 3063857904u, 0, LOG10_TOLERANCE, 0},
+{ 245, 1099977124u, 2558179220u, 1052873711u, 1233598120u, 1075795814u, 1376180157u, 0, LOG10_TOLERANCE, 0},
+{ 246, 1047115221u, 1909994277u, 1085015978u, 2991527452u, 3223144303u, 4009520900u, 0, LOG10_TOLERANCE, 0},
+{ 247, 1060855260u, 1680290941u, 1074309900u, 2943870846u, 3221948600u, 2664673208u, 0, LOG10_TOLERANCE, 0},
+{ 248, 1059496132u, 1451927357u, 3228615456u, 1502585517u, 3222149720u, 1522432661u, 0, LOG10_TOLERANCE, 0},
+{ 249, 1088728303u, 751136990u, 3230392165u, 3493275472u, 1074954708u, 1362341029u, 0, LOG10_TOLERANCE, 0},
+{ 250, 1098365967u, 1209623292u, 3238056647u, 979495322u, 1075680636u, 1289064744u, 0, LOG10_TOLERANCE, 0},
+{ 251, 1102940648u, 1717672108u, 1048120593u, 531240316u, 1075930085u, 2703746266u, 0, LOG10_TOLERANCE, 0},
+{ 252, 1054174923u, 3548721654u, 1086112947u, 3391817224u, 3222612628u, 946693516u, 0, LOG10_TOLERANCE, 0},
+{ 253, 1077836851u, 2758195125u, 1100880260u, 2028440924u, 1073200851u, 2600416432u, 0, LOG10_TOLERANCE, 0},
+{ 254, 1084223893u, 2750123373u, 3232200256u, 1086294931u, 1074428937u, 2273638036u, 0, LOG10_TOLERANCE, 0},
+{ 255, 1043958672u, 2986160931u, 1076097908u, 2540046258u, 3223352200u, 2239843435u, 0, LOG10_TOLERANCE, 0},
+{ 256, 1087992954u, 451471221u, 1064816262u, 4187644495u, 1074899471u, 12188310u, 0, LOG10_TOLERANCE, 0},
+{ 257, 1099460228u, 2439500162u, 1065280276u, 1979490284u, 1075762845u, 559607440u, 0, LOG10_TOLERANCE, 0},
+{ 258, 1040415832u, 2283342035u, 1078398157u, 1345997553u, 3223485983u, 1687818887u, 0, LOG10_TOLERANCE, 0},
+{ 259, 1065765700u, 179066662u, 1103272172u, 1217337578u, 3221186823u, 1702896667u, 0, LOG10_TOLERANCE, 0},
+{ 260, 1064078729u, 3779303391u, 3210023352u, 3115946280u, 3221465459u, 2407475467u, 0, LOG10_TOLERANCE, 0},
+{ 261, 1045506226u, 286247089u, 1085153597u, 713645369u, 3223269253u, 3306334413u, 0, LOG10_TOLERANCE, 0},
+{ 262, 1093670500u, 1468283899u, 1042831668u, 2022736418u, 1075320708u, 3563700741u, 0, LOG10_TOLERANCE, 0},
+{ 263, 1083139105u, 3305564080u, 1065483445u, 482392433u, 1074267138u, 293554640u, 0, LOG10_TOLERANCE, 0},
+{ 264, 1054212159u, 2256346551u, 3222430705u, 2071674991u, 3222609649u, 2107857682u, 0, LOG10_TOLERANCE, 0},
+{ 265, 1056541047u, 2295269094u, 1084451053u, 2773103941u, 3222434855u, 394431272u, 0, LOG10_TOLERANCE, 0},
+{ 266, 1078173946u, 1482721827u, 1092243422u, 3125409590u, 1073316022u, 2786091143u, 0, LOG10_TOLERANCE, 0},
+{ 267, 1073582325u, 1381740563u, 1071545057u, 2918235653u, 1070666040u, 3869657815u, 0, LOG10_TOLERANCE, 0},
+{ 268, 1091232324u, 1105857967u, 3241990046u, 2703723225u, 1075142428u, 1377220811u, 0, LOG10_TOLERANCE, 0},
+{ 269, 1043015571u, 174689677u, 1079333374u, 3947057014u, 3223388179u, 951338253u, 0, LOG10_TOLERANCE, 0},
+{ 270, 1090461859u, 2023082423u, 3242081486u, 1169047927u, 1075080201u, 1158479528u, 0, LOG10_TOLERANCE, 0},
+{ 271, 1064525899u, 3742487766u, 1043425732u, 194972788u, 3221395913u, 4231239291u, 0, LOG10_TOLERANCE, 0},
+{ 272, 1066308179u, 2136071361u, 3211529757u, 993675115u, 3221043032u, 1426615912u, 0, LOG10_TOLERANCE, 0},
+{ 273, 1066179733u, 210772141u, 3241441539u, 580731413u, 3221073205u, 838397735u, 0, LOG10_TOLERANCE, 0},
+{ 274, 1093840413u, 1751560711u, 1074522705u, 180987057u, 1075337719u, 4139891090u, 0, LOG10_TOLERANCE, 0},
+{ 275, 1066754591u, 2552236599u, 1088658621u, 2112468655u, 3220890163u, 4138303096u, 0, LOG10_TOLERANCE, 0},
+{ 276, 1041806969u, 1578223762u, 3224596567u, 2456166162u, 3223432999u, 2061892417u, 0, LOG10_TOLERANCE, 0},
+{ 277, 1058506965u, 2110924310u, 1086207177u, 3161208323u, 3222286325u, 1989463349u, 0, LOG10_TOLERANCE, 0},
+{ 278, 1084379746u, 2352173188u, 1079361728u, 4070222179u, 1074460192u, 606876331u, 0, LOG10_TOLERANCE, 0},
+{ 279, 1101012904u, 2481562701u, 1090937016u, 3809489716u, 1075856166u, 2478468402u, 0, LOG10_TOLERANCE, 0},
+{ 280, 1049519003u, 330905705u, 1086260896u, 90264431u, 3222967443u, 279221201u, 0, LOG10_TOLERANCE, 0},
+{ 281, 1040729961u, 4162008079u, 3194387916u, 759522153u, 3223473464u, 1061077941u, 0, LOG10_TOLERANCE, 0},
+{ 282, 1081015037u, 1839697482u, 3216442625u, 2211508949u, 1073948486u, 2112903132u, 0, LOG10_TOLERANCE, 0},
+{ 283, 1102323563u, 3736863454u, 1063475914u, 3150741666u, 1075908235u, 1559267761u, 0, LOG10_TOLERANCE, 0},
+{ 284, 1060785883u, 4200269406u, 3236646101u, 1061812176u, 3221957583u, 1023579949u, 0, LOG10_TOLERANCE, 0},
+{ 285, 1080217979u, 106027290u, 3234978297u, 2245237549u, 1073834974u, 1053439998u, 0, LOG10_TOLERANCE, 0},
+{ 286, 1099500686u, 2132131375u, 3250483427u, 3449276437u, 1075765686u, 359660823u, 0, LOG10_TOLERANCE, 0},
+{ 287, 1089388778u, 2334440944u, 1105423490u, 4004336184u, 1074999912u, 857354786u, 0, LOG10_TOLERANCE, 0},
+{ 288, 1071289056u, 4090088208u, 1042030013u, 3898658299u, 3218632247u, 4153299296u, 0, LOG10_TOLERANCE, 0},
+{ 289, 1060424416u, 2272831437u, 3253082595u, 2639188641u, 3222011156u, 352494683u, 0, LOG10_TOLERANCE, 0},
+{ 290, 1054766684u, 1856594168u, 3189515294u, 4101853676u, 3222572602u, 3831839253u, 0, LOG10_TOLERANCE, 0},
+{ 291, 1076012412u, 2211699255u, 3195060344u, 3865018604u, 1072629422u, 3024843075u, 0, LOG10_TOLERANCE, 0},
+{ 292, 1095283362u, 996259334u, 3241496889u, 3782673116u, 1075448425u, 2044469585u, 0, LOG10_TOLERANCE, 0},
+{ 293, 1099130747u, 3840380763u, 1048674041u, 550040067u, 1075736615u, 2976904307u, 0, LOG10_TOLERANCE, 0},
+{ 294, 1103935945u, 95874100u, 3237232828u, 2645647822u, 1075967953u, 2505472330u, 0, LOG10_TOLERANCE, 0},
+{ 295, 1043665640u, 3441419500u, 3252367038u, 876710419u, 3223363153u, 2218871553u, 0, LOG10_TOLERANCE, 0},
+{ 296, 1091109904u, 2560836004u, 3199616543u, 1180840586u, 1075134229u, 2422777408u, 0, LOG10_TOLERANCE, 0},
+{ 297, 1074119318u, 2218230392u, 3227485787u, 3947214579u, 1071370243u, 1003595310u, 0, LOG10_TOLERANCE, 0},
+{ 298, 1079539654u, 1447312532u, 1081476588u, 780366847u, 1073732026u, 1166483442u, 0, LOG10_TOLERANCE, 0},
+{ 299, 1072569643u, 2842113832u, 3216156731u, 225159029u, 3214607349u, 2125764098u, 0, LOG10_TOLERANCE, 0},
+{ 300, 1098117193u, 1601981129u, 3234628869u, 2236538344u, 1075660795u, 1772312193u, 0, LOG10_TOLERANCE, 0},
+{ 301, 1085173524u, 2194185737u, 3242362684u, 87913366u, 1074575739u, 2341197873u, 0, LOG10_TOLERANCE, 0},
+{ 302, 1051600232u, 1346862963u, 1077836259u, 3604666660u, 3222810530u, 2259775583u, 0, LOG10_TOLERANCE, 0},
+{ 303, 1064772331u, 3115209742u, 1099332326u, 1325101950u, 3221355528u, 4174732436u, 0, LOG10_TOLERANCE, 0},
+{ 304, 1077062394u, 3889223100u, 1053247613u, 3371396923u, 1072977511u, 4208845593u, 0, LOG10_TOLERANCE, 0},
+{ 305, 1072994220u, 4163120793u, 1075022670u, 1387631215u, 1069288961u, 3741080239u, 0, LOG10_TOLERANCE, 0},
+{ 306, 1057998131u, 1532426189u, 1063168268u, 3397022615u, 3222331077u, 31392221u, 0, LOG10_TOLERANCE, 0},
+{ 307, 1053549673u, 89324166u, 1079206060u, 3429424710u, 3222661551u, 75523650u, 0, LOG10_TOLERANCE, 0},
+{ 308, 1044841454u, 747591401u, 1072238381u, 2803213904u, 3223314736u, 2879315374u, 0, LOG10_TOLERANCE, 0},
+{ 309, 1091113780u, 271904221u, 1044258318u, 1858545114u, 1075134498u, 1591765325u, 0, LOG10_TOLERANCE, 0},
+{ 310, 1080585266u, 314958082u, 3249912496u, 2966213175u, 1073894330u, 1052667796u, 0, LOG10_TOLERANCE, 0},
+{ 311, 1049695766u, 3119528953u, 3217179014u, 2908718240u, 3222954084u, 889232043u, 0, LOG10_TOLERANCE, 0},
+{ 312, 1094983928u, 2018361566u, 1100926600u, 3985805054u, 1075425136u, 2185146546u, 0, LOG10_TOLERANCE, 0},
+{ 313, 1070132580u, 409584884u, 3239758947u, 755795129u, 3219569843u, 63396861u, 0, LOG10_TOLERANCE, 0},
+{ 314, 1075772446u, 1819156379u, 3251342302u, 2982669005u, 1072460651u, 1334807680u, 0, LOG10_TOLERANCE, 0},
+{ 315, 1101563433u, 2080534280u, 3188254060u, 449171797u, 1075880038u, 2397039693u, 0, LOG10_TOLERANCE, 0},
+{ 316, 1095956900u, 168744837u, 3214950009u, 1322217822u, 1075497330u, 1592384176u, 0, LOG10_TOLERANCE, 0},
+{ 317, 1106743252u, 3250487255u, 1062120700u, 1876195180u, 1076075043u, 453333839u, 0, LOG10_TOLERANCE, 0},
+{ 318, 1078859832u, 1336400247u, 1098057903u, 3314079581u, 1073510632u, 2598007896u, 0, LOG10_TOLERANCE, 0},
+{ 319, 1056195172u, 265025555u, 1063854282u, 3779482256u, 3222461212u, 715876344u, 0, LOG10_TOLERANCE, 0},
+{ 320, 1067300501u, 887044257u, 1054789618u, 2732056261u, 3220740348u, 2800315593u, 0, LOG10_TOLERANCE, 0},
+{ 321, 1050106742u, 4027115185u, 3191764868u, 2940199511u, 3222918491u, 2931304212u, 0, LOG10_TOLERANCE, 0},
+{ 322, 1055016507u, 2875684421u, 3227459837u, 2251967570u, 3222551865u, 301845783u, 0, LOG10_TOLERANCE, 0},
+{ 323, 1063244412u, 284173546u, 3238823679u, 3557800647u, 3221598602u, 1501044995u, 0, LOG10_TOLERANCE, 0},
+{ 324, 1101458560u, 3147771266u, 3220110464u, 2933364246u, 1075876197u, 2005169396u, 0, LOG10_TOLERANCE, 0},
+{ 325, 1064853160u, 3366183281u, 3234870843u, 537442654u, 3221343703u, 2043034050u, 0, LOG10_TOLERANCE, 0},
+{ 326, 1096635140u, 2529029548u, 3249882819u, 3781513577u, 1075546886u, 2627653749u, 0, LOG10_TOLERANCE, 0},
+{ 327, 1065952706u, 1080845539u, 3206760016u, 911778687u, 3221131975u, 4072600242u, 0, LOG10_TOLERANCE, 0},
+{ 328, 1044467388u, 469586759u, 1091830022u, 3080528840u, 3223334904u, 2876434309u, 0, LOG10_TOLERANCE, 0},
+{ 329, 1080249104u, 2863108169u, 3225605506u, 2508274250u, 1073840649u, 2350580810u, 0, LOG10_TOLERANCE, 0},
+{ 330, 1063343336u, 4080017377u, 3206492941u, 1470284690u, 3221579130u, 429178087u, 0, LOG10_TOLERANCE, 0},
+{ 331, 1059636742u, 3867917386u, 1102054928u, 3504746045u, 3222129093u, 3443234884u, 0, LOG10_TOLERANCE, 0},
+{ 332, 1064522279u, 2962134101u, 3244741577u, 3390537350u, 3221396564u, 215600004u, 0, LOG10_TOLERANCE, 0},
+{ 333, 1088201813u, 1702237980u, 1071598971u, 1102587474u, 1074912900u, 2016435523u, 0, LOG10_TOLERANCE, 0},
+{ 334, 1055486470u, 2180218657u, 3211592260u, 1206527853u, 3222514177u, 1109609194u, 0, LOG10_TOLERANCE, 0},
+{ 335, 1049601096u, 394130786u, 3242511482u, 2437699868u, 3222962844u, 1703442430u, 0, LOG10_TOLERANCE, 0},
+{ 336, 1044237059u, 849581558u, 3252006507u, 2008614943u, 3223343444u, 773913446u, 0, LOG10_TOLERANCE, 0},
+{ 337, 1062656366u, 3128971673u, 3249137531u, 2773583059u, 3221674024u, 2531989598u, 0, LOG10_TOLERANCE, 0},
+{ 338, 1085029866u, 590727700u, 3248651761u, 2183878539u, 1074558718u, 3417539816u, 0, LOG10_TOLERANCE, 0},
+{ 339, 1101098629u, 820687580u, 3208143496u, 1402434664u, 1075860606u, 3565615010u, 0, LOG10_TOLERANCE, 0},
+{ 340, 1104807187u, 1873709254u, 3245167989u, 44275991u, 1076001778u, 2036327596u, 0, LOG10_TOLERANCE, 0},
+{ 341, 1042185105u, 1174874204u, 3208263730u, 2360372288u, 3223421054u, 2997287966u, 0, LOG10_TOLERANCE, 0},
+{ 342, 1103854676u, 937573440u, 3208953761u, 211240241u, 1075965441u, 2636424733u, 0, LOG10_TOLERANCE, 0},
+{ 343, 1096065286u, 2469774991u, 1043117070u, 3380071805u, 1075506844u, 1428213445u, 0, LOG10_TOLERANCE, 0},
+{ 344, 1058121042u, 442507560u, 3254252803u, 3257889649u, 3222319110u, 1209148707u, 0, LOG10_TOLERANCE, 0},
+{ 345, 1068850520u, 1854921625u, 1049810168u, 2729627545u, 3220259255u, 4115658190u, 0, LOG10_TOLERANCE, 0},
+{ 346, 1107228981u, 4001809575u, 3240128649u, 278261523u, 1076090611u, 4040385013u, 0, LOG10_TOLERANCE, 0},
+{ 347, 1087224694u, 1793907966u, 3238955714u, 398859249u, 1074838240u, 3371466190u, 0, LOG10_TOLERANCE, 0},
+{ 348, 1053468899u, 2511916952u, 3219195283u, 1697158299u, 3222666696u, 1149559858u, 0, LOG10_TOLERANCE, 0},
+{ 349, 1069985548u, 3230931724u, 3243897690u, 3508781585u, 3219655741u, 4077268049u, 0, LOG10_TOLERANCE, 0},
+{ 350, 1103847606u, 1674254897u, 1046547577u, 217148561u, 1075965217u, 3250603014u, 0, LOG10_TOLERANCE, 0},
+{ 351, 1063780306u, 3275604304u, 3194840159u, 2991205850u, 3221505017u, 3196065758u, 0, LOG10_TOLERANCE, 0},
+{ 352, 1047765727u, 3509997278u, 3248888030u, 3897986511u, 3223096074u, 1672032697u, 0, LOG10_TOLERANCE, 0},
+{ 353, 1047182435u, 2156824613u, 1042295665u, 1239257646u, 3223139850u, 2987274156u, 0, LOG10_TOLERANCE, 0},
+{ 354, 1065780437u, 1073153314u, 3250031627u, 2567234990u, 3221182253u, 164395135u, 0, LOG10_TOLERANCE, 0},
+{ 355, 1043109764u, 4261696995u, 3197784432u, 323702024u, 3223385243u, 1235045213u, 0, LOG10_TOLERANCE, 0},
+{ 356, 1096207349u, 4075177615u, 3202791065u, 1919006082u, 1075518219u, 3567878508u, 0, LOG10_TOLERANCE, 0},
+{ 357, 1091786365u, 386429966u, 1086504491u, 3698826164u, 1075183833u, 284065248u, 0, LOG10_TOLERANCE, 0},
+{ 358, 1078327190u, 1681986446u, 3194985869u, 3072950140u, 1073367276u, 1317768853u, 0, LOG10_TOLERANCE, 0},
+{ 359, 1069828285u, 3719038997u, 1055433962u, 3331415058u, 3219757577u, 883618285u, 0, LOG10_TOLERANCE, 0},
+{ 360, 1060749713u, 2420250111u, 3238002206u, 1928661079u, 3221962410u, 3782338671u, 0, LOG10_TOLERANCE, 0},
+{ 361, 1081914210u, 3679866727u, 3227386672u, 1273835792u, 1074088909u, 1763037434u, 0, LOG10_TOLERANCE, 0},
+{ 362, 1041622738u, 2682092368u, 3234222284u, 1325425811u, 3223439873u, 2314570182u, 0, LOG10_TOLERANCE, 0},
+{ 363, 1056312613u, 4175172697u, 3208346191u, 2130706153u, 3222451562u, 2646436590u, 0, LOG10_TOLERANCE, 0},
+{ 364, 1092089624u, 1200784450u, 1083605096u, 1248595607u, 1075208257u, 3714920247u, 0, LOG10_TOLERANCE, 0},
+{ 365, 1066407215u, 1897285171u, 3251296075u, 944966123u, 3221019887u, 2885684334u, 0, LOG10_TOLERANCE, 0},
+{ 366, 1093887602u, 2270747330u, 3230692631u, 422503284u, 1075342025u, 3855534378u, 0, LOG10_TOLERANCE, 0},
+{ 367, 1084120037u, 2857564741u, 1075647403u, 3308906709u, 1074417351u, 3495656636u, 0, LOG10_TOLERANCE, 0},
+{ 368, 1055991450u, 1380066948u, 3232612906u, 2613634294u, 3222480175u, 4079753456u, 0, LOG10_TOLERANCE, 0},
+{ 369, 1063890856u, 4022784584u, 1060483857u, 3264056381u, 3221489550u, 3947775592u, 0, LOG10_TOLERANCE, 0},
+{ 370, 1044637404u, 1778509100u, 3213146285u, 2665833973u, 3223326954u, 1245976636u, 0, LOG10_TOLERANCE, 0},
+{ 371, 1069243652u, 1859175955u, 1079949560u, 4258450607u, 3220116226u, 3853669976u, 0, LOG10_TOLERANCE, 0},
+{ 372, 1048277388u, 4128020197u, 1076266146u, 4122840980u, 3223057963u, 1203658489u, 0, LOG10_TOLERANCE, 0},
+{ 373, 1045699515u, 2454653987u, 3229487005u, 2977478685u, 3223251196u, 49172802u, 0, LOG10_TOLERANCE, 0},
+{ 374, 1106072835u, 1355181872u, 1095308770u, 436846481u, 1076048055u, 3710853932u, 0, LOG10_TOLERANCE, 0},
+{ 375, 1099121654u, 2592856453u, 3247825559u, 3195234082u, 1075735798u, 2943062101u, 0, LOG10_TOLERANCE, 0},
+{ 376, 1074634375u, 3554670043u, 1091621009u, 3321236467u, 1071788293u, 3499163438u, 0, LOG10_TOLERANCE, 0},
+{ 377, 1069012833u, 1936670355u, 1095715713u, 2958468553u, 3220209306u, 4000528649u, 0, LOG10_TOLERANCE, 0},
+{ 378, 1044807461u, 2960339502u, 1098808013u, 1044068983u, 3223317331u, 3200692282u, 0, LOG10_TOLERANCE, 0},
+{ 379, 1049207537u, 4093388677u, 1095478112u, 1735930261u, 3222986804u, 3051995548u, 0, LOG10_TOLERANCE, 0},
+{ 380, 1091040302u, 1807398746u, 3195743135u, 4261616162u, 1075129290u, 2488942216u, 0, LOG10_TOLERANCE, 0},
+{ 381, 1061810546u, 3250576797u, 1059002384u, 3043079652u, 3221802937u, 62615936u, 0, LOG10_TOLERANCE, 0},
+{ 382, 1069207109u, 666051428u, 3208765404u, 1912684117u, 3220134978u, 1624219483u, 0, LOG10_TOLERANCE, 0},
+{ 383, 1103487420u, 1949030179u, 1096388934u, 896459246u, 1075952462u, 1749306203u, 0, LOG10_TOLERANCE, 0},
+{ 384, 1054300653u, 622499767u, 1066707637u, 1490260486u, 3222602868u, 625029866u, 0, LOG10_TOLERANCE, 0},
+{ 385, 1106688493u, 1490616165u, 3251242436u, 795675736u, 1076072987u, 3348155444u, 0, LOG10_TOLERANCE, 0},
+{ 386, 1080943896u, 3662877092u, 3234317146u, 3200513112u, 1073940365u, 763960603u, 0, LOG10_TOLERANCE, 0},
+{ 387, 1084088786u, 1356101968u, 3236536816u, 3062844611u, 1074413746u, 4063861095u, 0, LOG10_TOLERANCE, 0},
+{ 388, 1072438992u, 2284484846u, 3219498359u, 3240896015u, 3215768815u, 1046975407u, 0, LOG10_TOLERANCE, 0},
+{ 389, 1088276041u, 494503287u, 1092811254u, 142673998u, 1074917315u, 3271366326u, 0, LOG10_TOLERANCE, 0},
+{ 390, 1104642268u, 3394882641u, 3225306538u, 364852125u, 1075995988u, 1977096684u, 0, LOG10_TOLERANCE, 0},
+{ 391, 1077778115u, 193885269u, 1088149839u, 1359805831u, 1073187262u, 2507279849u, 0, LOG10_TOLERANCE, 0},
+{ 392, 1053001134u, 592580907u, 3199560872u, 3086438952u, 3222702171u, 1985550349u, 0, LOG10_TOLERANCE, 0},
+{ 393, 1059518664u, 1778008540u, 1049064687u, 73581647u, 3222146286u, 3204633369u, 0, LOG10_TOLERANCE, 0},
+{ 394, 1099249950u, 233240285u, 1081923320u, 2710903921u, 1075746816u, 1726081546u, 0, LOG10_TOLERANCE, 0},
+{ 395, 1069513767u, 3719878805u, 1079866720u, 3615458228u, 3219988438u, 2477635424u, 0, LOG10_TOLERANCE, 0},
+{ 396, 1073711076u, 3647632375u, 3247225271u, 3839959621u, 1070783226u, 4149591050u, 0, LOG10_TOLERANCE, 0},
+{ 397, 1103401096u, 2232210456u, 3235434773u, 224271737u, 1075948928u, 1471690445u, 0, LOG10_TOLERANCE, 0},
+{ 398, 1045520036u, 2134662911u, 3190390590u, 4239009051u, 3223267864u, 491395740u, 0, LOG10_TOLERANCE, 0},
+{ 399, 1080526145u, 2305279897u, 1077668039u, 1854523320u, 1073885760u, 2209376105u, 0, LOG10_TOLERANCE, 0},
+{ 400, 1072380611u, 538224650u, 3206153057u, 1379649610u, 3216110261u, 736404255u, 0, LOG10_TOLERANCE, 0},
+{ 401, 1048926859u, 3683897920u, 3244167599u, 3647579469u, 3223007615u, 885924102u, 0, LOG10_TOLERANCE, 0},
+{ 402, 1090280933u, 2694093608u, 1042775347u, 598406111u, 1075069627u, 4045261099u, 0, LOG10_TOLERANCE, 0},
+{ 403, 1064151744u, 872706833u, 1084802480u, 2200602798u, 3221456744u, 108068407u, 0, LOG10_TOLERANCE, 0},
+{ 404, 1042339597u, 904146293u, 1060867322u, 1729685598u, 3223415376u, 2814323454u, 0, LOG10_TOLERANCE, 0},
+{ 405, 1048211322u, 1894173462u, 3232800651u, 191960416u, 3223062224u, 158689847u, 0, LOG10_TOLERANCE, 0},
+{ 406, 1091225343u, 3521028551u, 1054522089u, 3287274359u, 1075141976u, 1561613401u, 0, LOG10_TOLERANCE, 0},
+{ 407, 1095386964u, 959640601u, 3201578263u, 4136915018u, 1075455488u, 3662783481u, 0, LOG10_TOLERANCE, 0},
+{ 408, 1064005451u, 1553716379u, 1106027987u, 984725765u, 3221474555u, 2065254288u, 0, LOG10_TOLERANCE, 0},
+{ 409, 1091348993u, 2287646644u, 3240329321u, 2276183378u, 1075149728u, 564081412u, 0, LOG10_TOLERANCE, 0},
+{ 410, 1068209174u, 3940225170u, 3199544434u, 997572161u, 3220458648u, 326066716u, 0, LOG10_TOLERANCE, 0},
+{ 411, 1065284713u, 36116288u, 3206886566u, 4196602670u, 3221289242u, 3024728349u, 0, LOG10_TOLERANCE, 0},
+{ 412, 1094212205u, 3550227562u, 3207257983u, 2747744117u, 1075367912u, 3605299668u, 0, LOG10_TOLERANCE, 0},
+{ 413, 1104236126u, 507130047u, 1048359321u, 3229888373u, 1075978565u, 76478367u, 0, LOG10_TOLERANCE, 0},
+{ 414, 1075513130u, 2210969014u, 1081031001u, 1946786091u, 1072336215u, 3594780710u, 0, LOG10_TOLERANCE, 0},
+{ 415, 1088823342u, 4059150589u, 3189759234u, 1177045799u, 1074962426u, 203192711u, 0, LOG10_TOLERANCE, 0},
+{ 416, 1093103612u, 2664812822u, 1050343198u, 2034180320u, 1075284635u, 3784608382u, 0, LOG10_TOLERANCE, 0},
+{ 417, 1066295469u, 1175750283u, 3235559706u, 1424491340u, 3221045930u, 2066830035u, 0, LOG10_TOLERANCE, 0},
+{ 418, 1066420545u, 1630036121u, 3231972785u, 3195479448u, 3221014164u, 1961979416u, 0, LOG10_TOLERANCE, 0},
+{ 419, 1090429875u, 2527029044u, 1046927050u, 4000723255u, 1075078402u, 674977703u, 0, LOG10_TOLERANCE, 0},
+{ 420, 1085208677u, 3335703647u, 3237349676u, 3869440059u, 1074579717u, 3053034379u, 0, LOG10_TOLERANCE, 0},
+{ 421, 1091433848u, 3888398377u, 3196041693u, 1290567220u, 1075154757u, 4288752120u, 0, LOG10_TOLERANCE, 0},
+{ 422, 1066679070u, 3242451480u, 3248384948u, 707431021u, 3220915391u, 1002013526u, 0, LOG10_TOLERANCE, 0},
+{ 423, 1083230509u, 2739665123u, 1060777905u, 1733073225u, 1074282429u, 2639675714u, 0, LOG10_TOLERANCE, 0},
+{ 424, 1078517061u, 1297274853u, 3208848704u, 3341639139u, 1073423693u, 1229342814u, 0, LOG10_TOLERANCE, 0},
+{ 425, 1046570941u, 2228057309u, 1084318902u, 1317851136u, 3223188718u, 923854032u, 0, LOG10_TOLERANCE, 0},
+{ 426, 1088255327u, 270039934u, 3241414679u, 3063626339u, 1074916100u, 3232618583u, 0, LOG10_TOLERANCE, 0},
+{ 427, 1071694702u, 83062251u, 3211262173u, 2659016437u, 3218208877u, 4113528378u, 0, LOG10_TOLERANCE, 0},
+{ 428, 1095743886u, 3833539373u, 3206667189u, 1567476111u, 1075476931u, 1567233076u, 0, LOG10_TOLERANCE, 0},
+{ 429, 1057711424u, 2382776852u, 3249232579u, 1546622468u, 3222347943u, 3798670522u, 0, LOG10_TOLERANCE, 0},
+{ 430, 1085536439u, 1714300821u, 1104130938u, 4167591598u, 1074637649u, 2509717948u, 0, LOG10_TOLERANCE, 0},
+{ 431, 1051092760u, 2798720100u, 1086978789u, 449990704u, 3222844328u, 4037397167u, 0, LOG10_TOLERANCE, 0},
+{ 432, 1083714767u, 4039516226u, 3244344107u, 4272932619u, 1074365489u, 1649510185u, 0, LOG10_TOLERANCE, 0},
+{ 433, 1075224793u, 1683007544u, 1091105663u, 3805494321u, 1072174396u, 1609044821u, 0, LOG10_TOLERANCE, 0},
+{ 434, 1073369300u, 2072627412u, 1094383324u, 3394151662u, 1070311685u, 2675194563u, 0, LOG10_TOLERANCE, 0},
+{ 435, 1073086376u, 1120106427u, 3223631624u, 3404608264u, 1069658889u, 1776899808u, 0, LOG10_TOLERANCE, 0},
+{ 436, 1097859997u, 559918757u, 3205077053u, 908100198u, 1075635841u, 1601462731u, 0, LOG10_TOLERANCE, 0},
+{ 437, 1042677918u, 2026673913u, 3244833635u, 2844573214u, 3223400155u, 2734047538u, 0, LOG10_TOLERANCE, 0},
+{ 438, 1107083611u, 3946837259u, 3234993796u, 3850406820u, 1076086381u, 4256303931u, 0, LOG10_TOLERANCE, 0},
+{ 439, 1057479809u, 3139330994u, 1046133568u, 1539650690u, 3222363668u, 1863422807u, 0, LOG10_TOLERANCE, 0},
+{ 440, 1089221852u, 1554593884u, 3228899878u, 2813752562u, 1074990069u, 2444290568u, 0, LOG10_TOLERANCE, 0},
+{ 441, 1056505004u, 3804703138u, 1072931071u, 2053677923u, 3222437333u, 3070337480u, 0, LOG10_TOLERANCE, 0},
+{ 442, 1097380651u, 289355864u, 1078453818u, 2143066338u, 1075606261u, 2210278777u, 0, LOG10_TOLERANCE, 0},
+{ 443, 1056456232u, 2157691971u, 1106629150u, 110806409u, 3222440776u, 214047711u, 0, LOG10_TOLERANCE, 0},
+{ 444, 1082157019u, 3570399481u, 1085637605u, 180265334u, 1074119387u, 950389812u, 0, LOG10_TOLERANCE, 0},
+{ 445, 1053496534u, 558779875u, 3202046748u, 2338464653u, 3222664909u, 2840504692u, 0, LOG10_TOLERANCE, 0},
+{ 446, 1045705464u, 1703969219u, 3229797258u, 1417521063u, 3223250683u, 1044693633u, 0, LOG10_TOLERANCE, 0},
+{ 447, 1090298613u, 3917440951u, 1051668894u, 3736066983u, 1075070705u, 2421449516u, 0, LOG10_TOLERANCE, 0},
+{ 448, 1064752080u, 3106613409u, 1066627453u, 2735392257u, 3221358590u, 2240418382u, 0, LOG10_TOLERANCE, 0},
+{ 449, 1065665372u, 2229777605u, 1065061963u, 2405869925u, 3221219219u, 2002424062u, 0, LOG10_TOLERANCE, 0},
+{ 450, 1091979581u, 3967957902u, 1057416138u, 3459188071u, 1075199987u, 4084035947u, 0, LOG10_TOLERANCE, 0},
+{ 451, 1068639210u, 3699016825u, 3249713090u, 796144848u, 3220333758u, 815317634u, 0, LOG10_TOLERANCE, 0},
+{ 452, 1081332748u, 3285165564u, 3211948811u, 401510871u, 1074004705u, 407550323u, 0, LOG10_TOLERANCE, 0},
+{ 453, 1094257658u, 634857910u, 3199607513u, 914218057u, 1075371109u, 3260851721u, 0, LOG10_TOLERANCE, 0},
+{ 454, 1083743336u, 2030735578u, 3233855943u, 965677531u, 1074369558u, 2483657024u, 0, LOG10_TOLERANCE, 0},
+{ 455, 1079556815u, 3957229084u, 1051050470u, 3123776651u, 1073736874u, 648519445u, 0, LOG10_TOLERANCE, 0},
+{ 456, 1074379685u, 162122081u, 3239376395u, 108064594u, 1071660191u, 1605034523u, 0, LOG10_TOLERANCE, 0},
+{ 457, 1089788138u, 869031839u, 3225020876u, 1344301606u, 1075034563u, 2621266855u, 0, LOG10_TOLERANCE, 0},
+{ 458, 1066949826u, 946696117u, 3231825228u, 1700703647u, 3220830768u, 223570193u, 0, LOG10_TOLERANCE, 0},
+{ 459, 1075492875u, 3394168074u, 1076939786u, 1666995668u, 1072325741u, 565674172u, 0, LOG10_TOLERANCE, 0},
+{ 460, 1061291147u, 2488789804u, 3238508333u, 1506943664u, 3221885943u, 1809033126u, 0, LOG10_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1067670922u, 1855635741u, 0, LOG10_TOLERANCE, 0},
+{ 462, 1072450894u, 1244307192u, 3191297711u, 2540916692u, 3215675005u, 4195715816u, 0, LOG10_TOLERANCE, 0},
+{ 463, 1052579044u, 2871645739u, 3239081581u, 1440249115u, 3222735710u, 695871118u, 0, LOG10_TOLERANCE, 0},
+{ 464, 1068350633u, 1231934926u, 3236746788u, 603977748u, 3220424332u, 277989641u, 0, LOG10_TOLERANCE, 0},
+{ 465, 1047966041u, 2386312545u, 1063169277u, 2715234268u, 3223079604u, 49370105u, 0, LOG10_TOLERANCE, 0},
+{ 466, 1087803418u, 915867083u, 1046790892u, 3347417612u, 1074885740u, 1843751208u, 0, LOG10_TOLERANCE, 0},
+{ 467, 1105984188u, 3553288373u, 1065698616u, 2906680663u, 1076045368u, 1668255753u, 0, LOG10_TOLERANCE, 0},
+{ 468, 1045506226u, 2342364630u, 1051356723u, 4019093203u, 3223269253u, 3098172626u, 0, LOG10_TOLERANCE, 0},
+{ 469, 1053685514u, 2911548084u, 1105282515u, 2476735795u, 3222653390u, 710736245u, 0, LOG10_TOLERANCE, 0},
+{ 470, 1050472772u, 1836216409u, 1101062307u, 2519592554u, 3222894082u, 2911135348u, 0, LOG10_TOLERANCE, 0},
+{ 471, 1070178161u, 1235369496u, 3222946447u, 668087854u, 3219544778u, 3191775902u, 0, LOG10_TOLERANCE, 0},
+{ 472, 1061070948u, 2981820811u, 1059838516u, 2845580478u, 3221922743u, 556163093u, 0, LOG10_TOLERANCE, 0},
+{ 473, 1046447766u, 1565550570u, 3217165795u, 4162017137u, 3223200002u, 563369286u, 0, LOG10_TOLERANCE, 0},
+{ 474, 1089767730u, 2808968027u, 1055630096u, 1782326814u, 1075032850u, 1073708672u, 0, LOG10_TOLERANCE, 0},
+{ 475, 1053576974u, 1492622658u, 3216653077u, 3972512122u, 3222659863u, 923354108u, 0, LOG10_TOLERANCE, 0},
+{ 476, 1074688031u, 2722693603u, 3227814791u, 3169731970u, 1071813127u, 2479854561u, 0, LOG10_TOLERANCE, 0},
+{ 477, 1070422983u, 899763203u, 3207606001u, 2804747833u, 3219420822u, 1438062981u, 0, LOG10_TOLERANCE, 0},
+{ 478, 1083186677u, 3789058912u, 3228095081u, 4135937628u, 1074273171u, 2472968060u, 0, LOG10_TOLERANCE, 0},
+{ 479, 1060199382u, 1682808307u, 3206960335u, 232877759u, 3222052254u, 477899392u, 0, LOG10_TOLERANCE, 0},
+{ 480, 1094607838u, 2851963139u, 3246852961u, 2590862592u, 1075393124u, 3038195584u, 0, LOG10_TOLERANCE, 0},
+{ 481, 1081200406u, 2422232642u, 3234779662u, 290458310u, 1073980248u, 710172697u, 0, LOG10_TOLERANCE, 0},
+{ 482, 1063187430u, 1082582386u, 1075605675u, 2602133689u, 3221604910u, 899954685u, 0, LOG10_TOLERANCE, 0},
+{ 483, 1092334963u, 1789635787u, 1059414278u, 1048286093u, 1075224782u, 1925305273u, 0, LOG10_TOLERANCE, 0},
+{ 484, 1098330542u, 231339448u, 1055573265u, 504907415u, 1075678013u, 2077150613u, 0, LOG10_TOLERANCE, 0},
+{ 485, 1063211461u, 1153251200u, 3204617090u, 1772013857u, 3221602228u, 2787459030u, 0, LOG10_TOLERANCE, 0},
+{ 486, 1099551055u, 1082898276u, 3212089272u, 1449080862u, 1075769126u, 2974900830u, 0, LOG10_TOLERANCE, 0},
+{ 487, 1086008285u, 3177299045u, 1058862813u, 809400815u, 1074707746u, 2728274629u, 0, LOG10_TOLERANCE, 0},
+{ 488, 1083370902u, 1924429710u, 1056464743u, 3349283177u, 1074309778u, 406273308u, 0, LOG10_TOLERANCE, 0},
+{ 489, 1097989743u, 42238036u, 1042379500u, 2113559863u, 1075649111u, 2547563809u, 0, LOG10_TOLERANCE, 0},
+{ 490, 1064761243u, 3304403230u, 3217556703u, 58952646u, 3221357200u, 642692340u, 0, LOG10_TOLERANCE, 0},
+{ 491, 1065185882u, 1645486982u, 3224301095u, 3636267471u, 3221300614u, 3261785592u, 0, LOG10_TOLERANCE, 0},
+{ 492, 1062762009u, 619402181u, 3235208235u, 557360557u, 3221658502u, 1916272264u, 0, LOG10_TOLERANCE, 0},
+{ 493, 1090754746u, 110029735u, 1046937383u, 984375729u, 1075106433u, 221145856u, 0, LOG10_TOLERANCE, 0},
+{ 494, 1042013090u, 4063688092u, 3203235744u, 1049950343u, 3223426180u, 584482441u, 0, LOG10_TOLERANCE, 0},
+{ 495, 1062350619u, 650996069u, 1054971928u, 3953359826u, 3221726025u, 2801498591u, 0, LOG10_TOLERANCE, 0},
+{ 496, 1079572157u, 66926332u, 1090561839u, 1379780888u, 1073741164u, 2195643118u, 0, LOG10_TOLERANCE, 0},
+{ 497, 1085969659u, 2803378256u, 1086057989u, 498534626u, 1074702753u, 971413916u, 0, LOG10_TOLERANCE, 0},
+{ 498, 1082618553u, 2846400785u, 1047142525u, 1375153550u, 1074200711u, 2221073810u, 0, LOG10_TOLERANCE, 0},
+{ 499, 1044581201u, 2869128958u, 1070972315u, 4246440273u, 3223329461u, 2601691166u, 0, LOG10_TOLERANCE, 0},
+{ 500, 1051832506u, 3112381207u, 1044430965u, 3981604561u, 3222792302u, 1546587034u, 0, LOG10_TOLERANCE, 0},
+{ 501, 1083771349u, 243303420u, 1093735824u, 1575581926u, 1074373479u, 837776877u, 0, LOG10_TOLERANCE, 0},
+{ 502, 1091654349u, 3218865041u, 3204803496u, 3840388050u, 1075171309u, 2088865965u, 0, LOG10_TOLERANCE, 0},
+{ 503, 1048415431u, 336846959u, 1052664471u, 3798336786u, 3223049544u, 1357585448u, 0, LOG10_TOLERANCE, 0},
+{ 504, 1055954236u, 3639240976u, 1081202165u, 1844741676u, 3222484009u, 242301978u, 0, LOG10_TOLERANCE, 0},
+{ 505, 1064421145u, 717293069u, 3211534283u, 582401011u, 3221415517u, 3660346947u, 0, LOG10_TOLERANCE, 0},
+{ 506, 1104478864u, 3766248610u, 3196520332u, 1174437546u, 1075989604u, 3365688656u, 0, LOG10_TOLERANCE, 0},
+{ 507, 1083431226u, 756959182u, 3204099341u, 1581804034u, 1074320590u, 199117646u, 0, LOG10_TOLERANCE, 0},
+{ 508, 1058322796u, 3560686300u, 3220980617u, 4277975772u, 3222300802u, 1449948266u, 0, LOG10_TOLERANCE, 0},
+{ 509, 1062422428u, 2598148853u, 3217622194u, 3460421008u, 3221712702u, 3246720810u, 0, LOG10_TOLERANCE, 0},
+{ 510, 1066720824u, 136600515u, 3209934920u, 3340653128u, 3220901271u, 1853785686u, 0, LOG10_TOLERANCE, 0},
+{ 511, 1096820310u, 1045480938u, 3251354609u, 4133432965u, 1075557888u, 1620985468u, 0, LOG10_TOLERANCE, 0},
+{ 512, 1091599431u, 1630207738u, 3239996829u, 2393354808u, 1075165664u, 2887122802u, 0, LOG10_TOLERANCE, 0},
+{ 513, 1043142370u, 3739770117u, 1059520750u, 3959551225u, 3223384261u, 1189792801u, 0, LOG10_TOLERANCE, 0},
+{ 514, 1083246857u, 1498861716u, 1091297147u, 847410798u, 1074285788u, 1667361171u, 0, LOG10_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 1070603266u, 4232028352u, 0, LOG10_TOLERANCE, 0},
+{ 516, 1054849265u, 2353103845u, 3235718771u, 2978889966u, 3222567988u, 1423369271u, 0, LOG10_TOLERANCE, 0},
+{ 517, 1103874344u, 1546972125u, 3249076079u, 1987349196u, 1075966059u, 3386502820u, 0, LOG10_TOLERANCE, 0},
+{ 518, 1090735865u, 2769161072u, 1075207126u, 292616282u, 1075104746u, 4031801740u, 0, LOG10_TOLERANCE, 0},
+{ 519, 1052228650u, 36855311u, 1052128202u, 1479039342u, 3222758838u, 3692631126u, 0, LOG10_TOLERANCE, 0},
+{ 520, 1083757053u, 2027463605u, 1066023013u, 3369686340u, 1074371486u, 3578986915u, 0, LOG10_TOLERANCE, 0},
+{ 521, 1050369101u, 3808681655u, 1054161346u, 1821773119u, 3222900481u, 2925260558u, 0, LOG10_TOLERANCE, 0},
+{ 522, 1040685928u, 3175490326u, 3226879970u, 845687760u, 3223475061u, 3266495528u, 0, LOG10_TOLERANCE, 0},
+{ 523, 1042302993u, 3124482451u, 3242748377u, 3259417226u, 3223417296u, 2734516734u, 0, LOG10_TOLERANCE, 0},
+{ 524, 1045245695u, 2751606436u, 3236210939u, 3923142740u, 3223287704u, 455537501u, 0, LOG10_TOLERANCE, 0},
+{ 525, 1095694737u, 2016872044u, 3228408064u, 4201274408u, 1075474207u, 3162419511u, 0, LOG10_TOLERANCE, 0},
+{ 526, 1051865606u, 1019916843u, 3219974785u, 1977881787u, 3222789097u, 2356936620u, 0, LOG10_TOLERANCE, 0},
+{ 527, 1051995104u, 2060433318u, 1075872515u, 366073725u, 3222777360u, 1207606903u, 0, LOG10_TOLERANCE, 0},
+{ 528, 1043696909u, 1098469906u, 1082900695u, 2349346832u, 3223361879u, 497752621u, 0, LOG10_TOLERANCE, 0},
+{ 529, 1062491059u, 3011196295u, 3252479932u, 2459281672u, 3221700659u, 485236026u, 0, LOG10_TOLERANCE, 0},
+{ 530, 1073850675u, 2843222682u, 1089275809u, 298982001u, 1070990041u, 2392858765u, 0, LOG10_TOLERANCE, 0},
+{ 531, 1101737698u, 914741728u, 3203468059u, 2833809843u, 1075885898u, 1722473944u, 0, LOG10_TOLERANCE, 0},
+{ 532, 1089280230u, 1274901962u, 3241535845u, 3759113509u, 1074993609u, 1453359696u, 0, LOG10_TOLERANCE, 0},
+{ 533, 1098432794u, 2134927252u, 3253802671u, 3013731444u, 1075685425u, 1495574294u, 0, LOG10_TOLERANCE, 0},
+{ 534, 1099201341u, 2230655177u, 3254510616u, 1249674366u, 1075742766u, 1948328827u, 0, LOG10_TOLERANCE, 0},
+{ 535, 1062971253u, 717357389u, 1083533731u, 3746683362u, 3221630568u, 1379621049u, 0, LOG10_TOLERANCE, 0},
+{ 536, 1066289466u, 834976849u, 3217357661u, 2465861779u, 3221047305u, 3116620001u, 0, LOG10_TOLERANCE, 0},
+{ 537, 1045656117u, 1385714428u, 1053358395u, 3007113740u, 3223255008u, 1510643247u, 0, LOG10_TOLERANCE, 0},
+{ 538, 1050527919u, 599268545u, 3201368210u, 2309854744u, 3222890819u, 3769637076u, 0, LOG10_TOLERANCE, 0},
+{ 539, 1069954454u, 2840234388u, 3232496515u, 333365983u, 3219674994u, 294990716u, 0, LOG10_TOLERANCE, 0},
+{ 540, 1045922781u, 3136078996u, 3194520860u, 2650572904u, 3223233377u, 3702336467u, 0, LOG10_TOLERANCE, 0},
+{ 541, 1086204043u, 2405805086u, 3251640319u, 324233833u, 1074731495u, 762641516u, 0, LOG10_TOLERANCE, 0},
+{ 542, 1106699146u, 2589598340u, 3254677807u, 952438812u, 1076073393u, 2118848003u, 0, LOG10_TOLERANCE, 0},
+{ 543, 1041631125u, 1922837702u, 3216892718u, 3535907549u, 3223439541u, 3853212535u, 0, LOG10_TOLERANCE, 0},
+{ 544, 1096132220u, 261447440u, 3209805849u, 1150571079u, 1075512345u, 3192258124u, 0, LOG10_TOLERANCE, 0},
+{ 545, 1095805232u, 4026487528u, 1073152064u, 27340691u, 1075482522u, 2878242110u, 0, LOG10_TOLERANCE, 0},
+{ 546, 1081640044u, 338765118u, 1086225786u, 3207238249u, 1074053037u, 1071781049u, 0, LOG10_TOLERANCE, 0},
+{ 547, 1048699055u, 1085283176u, 3187775111u, 1601194210u, 3223027842u, 3327204206u, 0, LOG10_TOLERANCE, 0},
+{ 548, 1091520173u, 3031712790u, 3252307859u, 170666844u, 1075159656u, 2834005504u, 0, LOG10_TOLERANCE, 0},
+{ 549, 1071378583u, 3148395674u, 1041913758u, 3306391490u, 3218540934u, 3229024431u, 0, LOG10_TOLERANCE, 0},
+{ 550, 1053793422u, 2205233857u, 3208100078u, 3993195511u, 3222647300u, 823279676u, 0, LOG10_TOLERANCE, 0},
+{ 551, 1067699608u, 4282766727u, 1072820377u, 1874778218u, 3220609471u, 3451929701u, 0, LOG10_TOLERANCE, 0},
+{ 552, 1063349444u, 2920860798u, 3218070226u, 3104066154u, 3221577909u, 33368404u, 0, LOG10_TOLERANCE, 0},
+{ 553, 1057466703u, 969991373u, 3250596895u, 1734386152u, 3222364626u, 2782202392u, 0, LOG10_TOLERANCE, 0},
+{ 554, 1091432170u, 1218740205u, 3239802737u, 2610078504u, 1075154660u, 2668667873u, 0, LOG10_TOLERANCE, 0},
+{ 555, 1058547594u, 1485218325u, 3220870240u, 3591664613u, 3222283365u, 1294019716u, 0, LOG10_TOLERANCE, 0},
+{ 556, 1054590495u, 690157417u, 3190850619u, 4192347699u, 3222583121u, 3272158420u, 0, LOG10_TOLERANCE, 0},
+{ 557, 1096053810u, 4009839784u, 1079670252u, 394167192u, 1075505873u, 3602829947u, 0, LOG10_TOLERANCE, 0},
+{ 558, 1087075589u, 961532417u, 1092588071u, 2923790239u, 1074829177u, 2571444864u, 0, LOG10_TOLERANCE, 0},
+{ 559, 1056395443u, 4174125604u, 1050682630u, 2169701868u, 3222445217u, 2242909506u, 0, LOG10_TOLERANCE, 0},
+{ 560, 1095608827u, 4146748230u, 1087373950u, 2481478351u, 1075469284u, 3055706006u, 0, LOG10_TOLERANCE, 0},
+{ 561, 1076987866u, 3984715440u, 1050421618u, 2446142566u, 1072948889u, 2762932455u, 0, LOG10_TOLERANCE, 0},
+{ 562, 1084172406u, 936290150u, 1100614426u, 3625806370u, 1074423267u, 2079190709u, 0, LOG10_TOLERANCE, 0},
+{ 563, 1099787952u, 1866615265u, 3215651428u, 2337013350u, 1075784045u, 474803698u, 0, LOG10_TOLERANCE, 0},
+{ 564, 1105714654u, 712227971u, 1106004723u, 973148499u, 1076036318u, 989663135u, 0, LOG10_TOLERANCE, 0},
+{ 565, 1082604551u, 3409813738u, 3244817008u, 1933503498u, 1074198627u, 1392248798u, 0, LOG10_TOLERANCE, 0},
+{ 566, 1079943733u, 3180389060u, 3228735703u, 83422217u, 1073788096u, 3723549429u, 0, LOG10_TOLERANCE, 0},
+{ 567, 1077878724u, 556972671u, 3204582372u, 841555801u, 1073210297u, 1176943375u, 0, LOG10_TOLERANCE, 0},
+{ 568, 1070767721u, 4189151332u, 1080874032u, 706326922u, 3219204296u, 8534901u, 0, LOG10_TOLERANCE, 0},
+{ 569, 1096151307u, 198291836u, 1057281892u, 2188836928u, 1075513867u, 146400103u, 0, LOG10_TOLERANCE, 0},
+{ 570, 1078091995u, 1219449298u, 3228734687u, 3504562743u, 1073286046u, 864376040u, 0, LOG10_TOLERANCE, 0},
+{ 571, 1057086816u, 1776099219u, 1094316777u, 4188083896u, 3222396619u, 1866278910u, 0, LOG10_TOLERANCE, 0},
+{ 572, 1046362060u, 2614400266u, 1073750227u, 3003203347u, 3223204825u, 2440192588u, 0, LOG10_TOLERANCE, 0},
+{ 573, 1066499030u, 2959351406u, 1105603716u, 311851587u, 3220981851u, 2668005317u, 0, LOG10_TOLERANCE, 0},
+{ 574, 1084544434u, 865443613u, 1097532516u, 3622237781u, 1074489457u, 3357453183u, 0, LOG10_TOLERANCE, 0},
+{ 575, 1084303018u, 447506102u, 3195759295u, 3603669725u, 1074445156u, 2084524296u, 0, LOG10_TOLERANCE, 0},
+{ 576, 1097890173u, 3934398273u, 1040996422u, 2968621268u, 1075639068u, 3042123355u, 0, LOG10_TOLERANCE, 0},
+{ 577, 1049256177u, 784208771u, 1088764788u, 2182296421u, 3222983555u, 2711242300u, 0, LOG10_TOLERANCE, 0},
+{ 578, 1100848643u, 1527590526u, 3206961556u, 2823164069u, 1075851323u, 2440914413u, 0, LOG10_TOLERANCE, 0},
+{ 579, 1089160483u, 3876699591u, 3207481130u, 4028148535u, 1074986225u, 3667748993u, 0, LOG10_TOLERANCE, 0},
+{ 580, 1083576186u, 2164249756u, 1059857743u, 1785169952u, 1074344647u, 2189652330u, 0, LOG10_TOLERANCE, 0},
+{ 581, 1091804009u, 2079273665u, 1080303860u, 625760474u, 1075185407u, 788005775u, 0, LOG10_TOLERANCE, 0},
+{ 582, 1079002460u, 3636214836u, 1068367620u, 2932621925u, 1073546236u, 450535769u, 0, LOG10_TOLERANCE, 0},
+{ 583, 1043995372u, 4274131512u, 1047707755u, 92550763u, 3223350966u, 501020710u, 0, LOG10_TOLERANCE, 0},
+{ 584, 1051338473u, 2648933384u, 1084603503u, 3534304873u, 3222826711u, 3279110674u, 0, LOG10_TOLERANCE, 0},
+{ 585, 1064563235u, 3216750767u, 3191088629u, 547482628u, 3221389315u, 3385302547u, 0, LOG10_TOLERANCE, 0},
+{ 586, 1061084774u, 1420360746u, 1080063101u, 1690029499u, 3221921181u, 2909345809u, 0, LOG10_TOLERANCE, 0},
+{ 587, 1082371716u, 1908572179u, 1080112083u, 1228319033u, 1074160841u, 2860344817u, 0, LOG10_TOLERANCE, 0},
+{ 588, 1048158178u, 500312015u, 3212368508u, 3864619086u, 3223065771u, 190787676u, 0, LOG10_TOLERANCE, 0},
+{ 589, 1073851962u, 4211343447u, 1087492676u, 4272583781u, 1070992066u, 1791098782u, 0, LOG10_TOLERANCE, 0},
+{ 590, 1099392394u, 2382118000u, 1042665328u, 567154882u, 1075757916u, 3223125935u, 0, LOG10_TOLERANCE, 0},
+{ 591, 1058013442u, 1435344339u, 3216303171u, 2275988178u, 3222330228u, 3675387000u, 0, LOG10_TOLERANCE, 0},
+{ 592, 1067054971u, 3403659753u, 3218043030u, 1926480488u, 3220801724u, 1053622215u, 0, LOG10_TOLERANCE, 0},
+{ 593, 1076840383u, 1198845185u, 3225556149u, 1130089684u, 1072896923u, 3494913394u, 0, LOG10_TOLERANCE, 0},
+{ 594, 1075179394u, 2183928090u, 1048403956u, 963834821u, 1072146078u, 1987142843u, 0, LOG10_TOLERANCE, 0},
+{ 595, 1101672960u, 2120625396u, 1041006976u, 2137548527u, 1075883791u, 1290867319u, 0, LOG10_TOLERANCE, 0},
+{ 596, 1099230238u, 586700956u, 1059670521u, 303891699u, 1075745191u, 1621757249u, 0, LOG10_TOLERANCE, 0},
+{ 597, 1071510850u, 2509132460u, 1102827530u, 2205707903u, 3218413889u, 1739137714u, 0, LOG10_TOLERANCE, 0},
+{ 598, 1057376949u, 1229308263u, 3209170414u, 4206576047u, 3222371414u, 2709365139u, 0, LOG10_TOLERANCE, 0},
+{ 599, 1076592641u, 4078010749u, 3199236456u, 733478972u, 1072838269u, 1643379297u, 0, LOG10_TOLERANCE, 0},
+{ 600, 1050228936u, 4277541051u, 3199806921u, 397102023u, 3222909748u, 524666777u, 0, LOG10_TOLERANCE, 0},
+{ 601, 1048491365u, 900999594u, 3234720188u, 2530214248u, 3223045165u, 2583905845u, 0, LOG10_TOLERANCE, 0},
+{ 602, 1076543548u, 4000609478u, 1096577064u, 4148592328u, 1072825692u, 1999101770u, 0, LOG10_TOLERANCE, 0},
+{ 603, 1048668084u, 2154187873u, 3224392607u, 3957250362u, 3223030892u, 3009591096u, 0, LOG10_TOLERANCE, 0},
+{ 604, 1075929840u, 2867079200u, 1101870326u, 921212001u, 1072565702u, 4157771188u, 0, LOG10_TOLERANCE, 0},
+{ 605, 1085738242u, 674547716u, 1063216239u, 3929755226u, 1074670299u, 1605339823u, 0, LOG10_TOLERANCE, 0},
+{ 606, 1092932203u, 3158182449u, 1043794244u, 3259056345u, 1075271164u, 2647804578u, 0, LOG10_TOLERANCE, 0},
+{ 607, 1089293008u, 3002823940u, 1059511739u, 2832435794u, 1074994369u, 2987286299u, 0, LOG10_TOLERANCE, 0},
+{ 608, 1069821174u, 2196511929u, 1049973941u, 3672092877u, 3219762462u, 2310326603u, 0, LOG10_TOLERANCE, 0},
+{ 609, 1050438056u, 3655292191u, 1086438127u, 3567072906u, 3222896185u, 2892109320u, 0, LOG10_TOLERANCE, 0},
+{ 610, 1095703300u, 1617573614u, 3201863123u, 3090723732u, 1075474686u, 4138813458u, 0, LOG10_TOLERANCE, 0},
+{ 611, 1085717732u, 679893506u, 3211547753u, 824081024u, 1074667186u, 3466673869u, 0, LOG10_TOLERANCE, 0},
+{ 612, 1089530525u, 2285242807u, 1084999409u, 2221731406u, 1075010776u, 2105373250u, 0, LOG10_TOLERANCE, 0},
+{ 613, 1059250016u, 1935990727u, 1088822246u, 1058156518u, 3222191042u, 824662780u, 0, LOG10_TOLERANCE, 0},
+{ 614, 1102839166u, 521023584u, 1059186903u, 4245163857u, 1075927020u, 2012019887u, 0, LOG10_TOLERANCE, 0},
+{ 615, 1103891140u, 2312887617u, 3191771354u, 1885370807u, 1075966582u, 1863110785u, 0, LOG10_TOLERANCE, 0},
+{ 616, 1105470167u, 1796441468u, 1100030327u, 2772711004u, 1076026642u, 4097068227u, 0, LOG10_TOLERANCE, 0},
+{ 617, 1056793172u, 2095685003u, 1077984448u, 2100773742u, 3222418879u, 1210777557u, 0, LOG10_TOLERANCE, 0},
+{ 618, 1045470972u, 2892538035u, 1042396334u, 4162200338u, 3223272879u, 4179986377u, 0, LOG10_TOLERANCE, 0},
+{ 619, 1095242103u, 2177698116u, 3227557177u, 150832500u, 1075445485u, 3509591170u, 0, LOG10_TOLERANCE, 0},
+{ 620, 1044078568u, 607966734u, 3236250630u, 4164600559u, 3223348263u, 823364156u, 0, LOG10_TOLERANCE, 0},
+{ 621, 1068906164u, 2830122967u, 1046096700u, 3713346883u, 3220241508u, 1678342095u, 0, LOG10_TOLERANCE, 0},
+{ 622, 1089714315u, 2314640506u, 3203696416u, 3276228872u, 1075028239u, 2744643937u, 0, LOG10_TOLERANCE, 0},
+{ 623, 1065428659u, 469331883u, 3249037349u, 2999233437u, 3221265861u, 640249239u, 0, LOG10_TOLERANCE, 0},
+{ 624, 1097382011u, 560886625u, 1091899487u, 748795120u, 1075606357u, 556919058u, 0, LOG10_TOLERANCE, 0},
+{ 625, 1049886858u, 2958421324u, 1092569414u, 3235243477u, 3222936146u, 574940066u, 0, LOG10_TOLERANCE, 0},
+{ 626, 1045542849u, 3221475559u, 1043038304u, 915608434u, 3223265605u, 331939149u, 0, LOG10_TOLERANCE, 0},
+{ 627, 1071197530u, 3007808652u, 3216682290u, 2531019474u, 3218730587u, 1453925889u, 0, LOG10_TOLERANCE, 0},
+{ 628, 1094545351u, 1767658578u, 3237045269u, 2313128318u, 1075389495u, 2316745533u, 0, LOG10_TOLERANCE, 0},
+{ 629, 1063134244u, 1926845182u, 1066835624u, 1783256828u, 3221610959u, 3534398567u, 0, LOG10_TOLERANCE, 0},
+{ 630, 1040575629u, 90378038u, 1057168870u, 164358218u, 3223479272u, 72744237u, 0, LOG10_TOLERANCE, 0},
+{ 631, 1106859172u, 1610524680u, 1085283851u, 2903496007u, 1076079163u, 2555703719u, 0, LOG10_TOLERANCE, 0},
+{ 632, 1078635586u, 4274321404u, 3202913591u, 720121831u, 1073455667u, 3464371112u, 0, LOG10_TOLERANCE, 0},
+{ 633, 1051205256u, 2034778236u, 1071133763u, 1413236391u, 3222835923u, 3048532228u, 0, LOG10_TOLERANCE, 0},
+{ 634, 1051063028u, 1489112261u, 1076691395u, 348210906u, 3222846658u, 610090266u, 0, LOG10_TOLERANCE, 0},
+{ 635, 1059260269u, 2797651324u, 3224410527u, 2374818327u, 3222189162u, 1735176885u, 0, LOG10_TOLERANCE, 0},
+{ 636, 1088287256u, 1823161666u, 3197810695u, 3119680047u, 1074917968u, 1025128902u, 0, LOG10_TOLERANCE, 0},
+{ 637, 1065927336u, 3420950657u, 1087084743u, 2136638961u, 3221139040u, 2173692258u, 0, LOG10_TOLERANCE, 0},
+{ 638, 1069902224u, 3554566429u, 1062907717u, 2736702589u, 3219708277u, 2349339026u, 0, LOG10_TOLERANCE, 0},
+{ 639, 1097405019u, 2928437580u, 3187765027u, 1393427873u, 1075607962u, 2671382925u, 0, LOG10_TOLERANCE, 0},
+{ 640, 1061817913u, 189447067u, 1051643315u, 828663513u, 3221801952u, 2742751743u, 0, LOG10_TOLERANCE, 0},
+{ 641, 1052313869u, 2852350928u, 1045683757u, 673354280u, 3222752766u, 1944632537u, 0, LOG10_TOLERANCE, 0},
+{ 642, 1043946301u, 3589563265u, 3248741629u, 812657927u, 3223352622u, 3084641287u, 0, LOG10_TOLERANCE, 0},
+{ 643, 1043127178u, 1766416701u, 1100392103u, 2185373290u, 3223384716u, 3136906037u, 0, LOG10_TOLERANCE, 0},
+{ 644, 1072791741u, 3763582673u, 3191965790u, 388374829u, 1067710078u, 40508173u, 0, LOG10_TOLERANCE, 0},
+{ 645, 1079635136u, 1187403069u, 1075300235u, 336640304u, 1073750094u, 4012674593u, 0, LOG10_TOLERANCE, 0},
+{ 646, 1103926251u, 1718795752u, 3243118752u, 683369237u, 1075967659u, 3079243747u, 0, LOG10_TOLERANCE, 0},
+{ 647, 1063308449u, 1863545307u, 1069449477u, 3418627399u, 3221586233u, 1729396316u, 0, LOG10_TOLERANCE, 0},
+{ 648, 1069601294u, 3295607249u, 1068878592u, 1633297809u, 3219928111u, 215617447u, 0, LOG10_TOLERANCE, 0},
+{ 649, 1058947127u, 2585980994u, 3236670483u, 1286750688u, 3222241438u, 2254971432u, 0, LOG10_TOLERANCE, 0},
+{ 650, 1046157033u, 15816845u, 3233249283u, 2491924775u, 3223217268u, 270679194u, 0, LOG10_TOLERANCE, 0},
+{ 651, 1042413021u, 1051983351u, 1049180786u, 1474421917u, 3223411710u, 809174222u, 0, LOG10_TOLERANCE, 0},
+{ 652, 1053765877u, 2003816032u, 1086050104u, 668090487u, 3222648824u, 225843921u, 0, LOG10_TOLERANCE, 0},
+{ 653, 1052556037u, 3671484625u, 1067020039u, 430024694u, 3222737092u, 3550051201u, 0, LOG10_TOLERANCE, 0},
+{ 654, 1067397110u, 3991830201u, 3207808714u, 1021245839u, 3220718298u, 624955348u, 0, LOG10_TOLERANCE, 0},
+{ 655, 1064194391u, 4255801807u, 3207681716u, 1926756877u, 3221451803u, 1956260472u, 0, LOG10_TOLERANCE, 0},
+{ 656, 1052140785u, 4167786896u, 1077097744u, 1775517981u, 3222765458u, 1900204384u, 0, LOG10_TOLERANCE, 0},
+{ 657, 1085601978u, 3187518564u, 1082437406u, 944672491u, 1074648774u, 3776772173u, 0, LOG10_TOLERANCE, 0},
+{ 658, 1049366282u, 953085192u, 3227310828u, 3459155777u, 3222976526u, 745195680u, 0, LOG10_TOLERANCE, 0},
+{ 659, 1069502506u, 1908555460u, 1073640207u, 260441967u, 3219993422u, 4145662383u, 0, LOG10_TOLERANCE, 0},
+{ 660, 1067219606u, 250762477u, 1072582645u, 2886742039u, 3220759670u, 3957488315u, 0, LOG10_TOLERANCE, 0},
+{ 661, 1103422358u, 786180031u, 3197734769u, 2788918312u, 1075949819u, 1564374635u, 0, LOG10_TOLERANCE, 0},
+{ 662, 1087028179u, 2055912467u, 3244244909u, 1394142937u, 1074826137u, 3517815416u, 0, LOG10_TOLERANCE, 0},
+{ 663, 1069612985u, 91984146u, 3222252812u, 4126276047u, 3219918503u, 912342035u, 0, LOG10_TOLERANCE, 0},
+{ 664, 1081340139u, 3942715706u, 3239316352u, 410676547u, 1074005996u, 2222873768u, 0, LOG10_TOLERANCE, 0},
+{ 665, 1051074198u, 86296211u, 1085850694u, 649202596u, 3222845777u, 2242599693u, 0, LOG10_TOLERANCE, 0},
+{ 666, 1097882744u, 3069064472u, 3237358008u, 23209276u, 1075638282u, 2668333231u, 0, LOG10_TOLERANCE, 0},
+{ 667, 1081235288u, 1867297860u, 1072956607u, 2513414118u, 1073986953u, 2486525690u, 0, LOG10_TOLERANCE, 0},
+{ 668, 1103049699u, 3171788768u, 3235208783u, 162138697u, 1075933205u, 994967552u, 0, LOG10_TOLERANCE, 0},
+{ 669, 1081728455u, 1245110700u, 1081653954u, 2584994077u, 1074065233u, 2141915645u, 0, LOG10_TOLERANCE, 0},
+{ 670, 1098026472u, 3347226587u, 1058962932u, 2291943376u, 1075652603u, 2069109495u, 0, LOG10_TOLERANCE, 0},
+{ 671, 1058899062u, 966940828u, 1060726420u, 2798041096u, 3222247026u, 3985313909u, 0, LOG10_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1067735688u, 2642613737u, 0, LOG10_TOLERANCE, 0},
+{ 673, 1100632849u, 1671039260u, 1086395032u, 3745833360u, 1075844614u, 2953668257u, 0, LOG10_TOLERANCE, 0},
+{ 674, 1057078797u, 651714217u, 1047070645u, 2130549237u, 3222397401u, 3928282362u, 0, LOG10_TOLERANCE, 0},
+{ 675, 1059632083u, 1423000172u, 3247822717u, 1551488170u, 3222129748u, 947884649u, 0, LOG10_TOLERANCE, 0},
+{ 676, 1054113659u, 921077236u, 3213332351u, 1431049019u, 3222617705u, 1746915195u, 0, LOG10_TOLERANCE, 0},
+{ 677, 1067510295u, 655715547u, 3190985373u, 1527556471u, 3220681274u, 2767998108u, 0, LOG10_TOLERANCE, 0},
+{ 678, 1080171331u, 4110878657u, 3251297180u, 879739345u, 1073826194u, 3666797281u, 0, LOG10_TOLERANCE, 0},
+{ 679, 1085804762u, 2623955764u, 1093699897u, 1216444475u, 1074680111u, 1096100139u, 0, LOG10_TOLERANCE, 0},
+{ 680, 1091905603u, 107442539u, 3239767031u, 1149813329u, 1075194070u, 876285134u, 0, LOG10_TOLERANCE, 0},
+{ 681, 1085961592u, 1761361082u, 3226030205u, 1121849716u, 1074701696u, 1547721169u, 0, LOG10_TOLERANCE, 0},
+{ 682, 1092603467u, 2534144722u, 1044223733u, 3512285706u, 1075240482u, 278021464u, 0, LOG10_TOLERANCE, 0},
+{ 683, 1064362429u, 4073670723u, 1050729852u, 3034818849u, 3221427291u, 4242826412u, 0, LOG10_TOLERANCE, 0},
+{ 684, 1101984574u, 1421423503u, 1060278048u, 1397153092u, 1075893286u, 292685601u, 0, LOG10_TOLERANCE, 0},
+{ 685, 1069938181u, 1649206019u, 1104525577u, 1267104290u, 3219685234u, 1620636761u, 0, LOG10_TOLERANCE, 0},
+{ 686, 1041818449u, 3775270392u, 1040251850u, 68667319u, 3223432597u, 1692181536u, 0, LOG10_TOLERANCE, 0},
+{ 687, 1056847252u, 3099226694u, 3254103006u, 4020102648u, 3222415726u, 634949558u, 0, LOG10_TOLERANCE, 0},
+{ 688, 1054108064u, 3718441177u, 3215643451u, 4032951536u, 3222618180u, 2193999680u, 0, LOG10_TOLERANCE, 0},
+{ 689, 1044131371u, 508048351u, 3210196713u, 1707937896u, 3223346611u, 4088292437u, 0, LOG10_TOLERANCE, 0},
+{ 690, 1051127979u, 2784738160u, 1073435430u, 1109346010u, 3222841630u, 809492040u, 0, LOG10_TOLERANCE, 0},
+{ 691, 1078241642u, 3331916473u, 3238794568u, 2707019594u, 1073339378u, 1164696438u, 0, LOG10_TOLERANCE, 0},
+{ 692, 1093182670u, 3093165197u, 1072894805u, 2853215019u, 1075290349u, 3560624908u, 0, LOG10_TOLERANCE, 0},
+{ 693, 1069098491u, 2135797997u, 1048399559u, 2941926126u, 3220185001u, 2767205362u, 0, LOG10_TOLERANCE, 0},
+{ 694, 1048430980u, 2083412145u, 3249335391u, 507212448u, 3223048633u, 3647005715u, 0, LOG10_TOLERANCE, 0},
+{ 695, 1075363751u, 4270176401u, 3246546709u, 3288753319u, 1072255974u, 1254607273u, 0, LOG10_TOLERANCE, 0},
+{ 696, 1100449215u, 3692175292u, 3197271515u, 3989064196u, 1075837440u, 2247367861u, 0, LOG10_TOLERANCE, 0},
+{ 697, 1104208090u, 3111924274u, 1066772558u, 59281695u, 1075977140u, 1062472240u, 0, LOG10_TOLERANCE, 0},
+{ 698, 1067683911u, 2135245466u, 3208804313u, 3846547392u, 3220615013u, 2056251939u, 0, LOG10_TOLERANCE, 0},
+{ 699, 1094877811u, 972051266u, 3222814246u, 3539700586u, 1075415588u, 3736433495u, 0, LOG10_TOLERANCE, 0},
+{ 700, 1055482282u, 330951080u, 1079189813u, 583922384u, 3222514463u, 2428577226u, 0, LOG10_TOLERANCE, 0},
+{ 701, 1089640092u, 1711944085u, 1104170032u, 643991456u, 1075021506u, 849331440u, 0, LOG10_TOLERANCE, 0},
+{ 702, 1086945901u, 2072550721u, 3250147641u, 4280263530u, 1074820661u, 3054767438u, 0, LOG10_TOLERANCE, 0},
+{ 703, 1045489058u, 1566376352u, 1067251433u, 72984588u, 3223271005u, 1012625481u, 0, LOG10_TOLERANCE, 0},
+{ 704, 1095276569u, 3103043079u, 1045853123u, 410067497u, 1075447946u, 3020783845u, 0, LOG10_TOLERANCE, 0},
+{ 705, 1069188845u, 1910366299u, 1081770885u, 634683073u, 3220144496u, 3237120090u, 0, LOG10_TOLERANCE, 0},
+{ 706, 1081530688u, 2226525875u, 3224149290u, 2126302825u, 1074036987u, 3618469334u, 0, LOG10_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1069816815u, 3917580686u, 0, LOG10_TOLERANCE, 0},
+{ 708, 1066482943u, 1953339096u, 1077176252u, 1476516558u, 3220988290u, 2638241953u, 0, LOG10_TOLERANCE, 0},
+{ 709, 1066092000u, 1306277326u, 1079089150u, 4093716191u, 3221095026u, 3487752196u, 0, LOG10_TOLERANCE, 0},
+{ 710, 1085665139u, 51750045u, 3242913901u, 4256866157u, 1074659005u, 1309342661u, 0, LOG10_TOLERANCE, 0},
+{ 711, 1047601319u, 2163853087u, 3232053146u, 2962422808u, 3223111635u, 4105270447u, 0, LOG10_TOLERANCE, 0},
+{ 712, 1075516945u, 1618388148u, 3233154824u, 3711953164u, 1072338175u, 1191839168u, 0, LOG10_TOLERANCE, 0},
+{ 713, 1099384354u, 357108214u, 3202294604u, 2306775262u, 1075757318u, 784133138u, 0, LOG10_TOLERANCE, 0},
+{ 714, 1054420438u, 2571356437u, 3249064063u, 2394851808u, 3222594288u, 2040763197u, 0, LOG10_TOLERANCE, 0},
+{ 715, 1083004443u, 4273880094u, 1103698617u, 3578832032u, 1074251723u, 2507069390u, 0, LOG10_TOLERANCE, 0},
+{ 716, 1085943053u, 2091068742u, 3228270226u, 3980489730u, 1074699248u, 3771564566u, 0, LOG10_TOLERANCE, 0},
+{ 717, 1081533104u, 2772307714u, 1051008486u, 32546576u, 1074037354u, 4044977501u, 0, LOG10_TOLERANCE, 0},
+{ 718, 1093745567u, 2143788498u, 3195498043u, 3630119231u, 1075328539u, 1114663423u, 0, LOG10_TOLERANCE, 0},
+{ 719, 1051149287u, 2527385594u, 3240503648u, 3482095012u, 3222840027u, 4027782605u, 0, LOG10_TOLERANCE, 0},
+{ 720, 1094685151u, 2690097362u, 1068598730u, 2360266862u, 1075397460u, 2132295436u, 0, LOG10_TOLERANCE, 0},
+{ 721, 1058857869u, 2673272949u, 1082639557u, 522449749u, 3222251927u, 3783282647u, 0, LOG10_TOLERANCE, 0},
+{ 722, 1104424147u, 3596379400u, 3242016775u, 2002293002u, 1075987296u, 2221010959u, 0, LOG10_TOLERANCE, 0},
+{ 723, 1099439656u, 4113224369u, 3222122439u, 2152316893u, 1075761372u, 4041298882u, 0, LOG10_TOLERANCE, 0},
+{ 724, 1073313068u, 31662602u, 1047721249u, 1747087514u, 1070190919u, 3275029946u, 0, LOG10_TOLERANCE, 0},
+{ 725, 1102980109u, 2489659568u, 1097051253u, 277506957u, 1075931234u, 1381810110u, 0, LOG10_TOLERANCE, 0},
+{ 726, 1043918186u, 3850162281u, 3213841942u, 438724093u, 3223353594u, 177091255u, 0, LOG10_TOLERANCE, 0},
+{ 727, 1095392535u, 2431814052u, 1075518084u, 2672434118u, 1075455856u, 2397269078u, 0, LOG10_TOLERANCE, 0},
+{ 728, 1095679087u, 391606792u, 1048184750u, 4168944276u, 1075473326u, 2611771655u, 0, LOG10_TOLERANCE, 0},
+{ 729, 1100308768u, 457529672u, 3201090276u, 72407935u, 1075826564u, 3785081567u, 0, LOG10_TOLERANCE, 0},
+{ 730, 1071237071u, 3954981400u, 1052053242u, 2411049585u, 3218687449u, 3595228211u, 0, LOG10_TOLERANCE, 0},
+{ 731, 1086180091u, 485456950u, 1088415093u, 1655397424u, 1074728718u, 3913075270u, 0, LOG10_TOLERANCE, 0},
+{ 732, 1050750780u, 1551748070u, 3236871640u, 1329701152u, 3222874518u, 1520295316u, 0, LOG10_TOLERANCE, 0},
+{ 733, 1077155474u, 3099222537u, 1104984570u, 4293792842u, 1073010904u, 641483791u, 0, LOG10_TOLERANCE, 0},
+{ 734, 1056466057u, 3603065260u, 3197735968u, 2402359253u, 3222440074u, 683949067u, 0, LOG10_TOLERANCE, 0},
+{ 735, 1051340936u, 3961208159u, 3219057584u, 2340553876u, 3222826548u, 1086390675u, 0, LOG10_TOLERANCE, 0},
+{ 736, 1074881909u, 4014841779u, 3197672877u, 3697233334u, 1071934912u, 4044893289u, 0, LOG10_TOLERANCE, 0},
+{ 737, 1065792009u, 1403876392u, 3254028950u, 921363393u, 3221178696u, 593147272u, 0, LOG10_TOLERANCE, 0},
+{ 738, 1107251806u, 1862576361u, 3194031708u, 2476290925u, 1076091248u, 1873492489u, 0, LOG10_TOLERANCE, 0},
+{ 739, 1049661768u, 1454212851u, 1088378861u, 3400401866u, 3222957594u, 1787304246u, 0, LOG10_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 1071674723u, 2258814163u, 0, LOG10_TOLERANCE, 0},
+{ 741, 1068925634u, 1199568671u, 3225679997u, 46947405u, 3220235458u, 1823596182u, 0, LOG10_TOLERANCE, 0},
+{ 742, 1077685537u, 2596231448u, 3253943728u, 2219151748u, 1073164985u, 1843863539u, 0, LOG10_TOLERANCE, 0},
+{ 743, 1066527035u, 4119719558u, 3222036299u, 1275474618u, 3220970855u, 409206651u, 0, LOG10_TOLERANCE, 0},
+{ 744, 1092425015u, 3347296825u, 1101507910u, 1254014794u, 1075230292u, 2900923068u, 0, LOG10_TOLERANCE, 0},
+{ 745, 1084119992u, 673775040u, 1070743626u, 244126093u, 1074417346u, 2601619170u, 0, LOG10_TOLERANCE, 0},
+{ 746, 1055716202u, 1832066983u, 1051358028u, 3262483417u, 3222499483u, 2726182442u, 0, LOG10_TOLERANCE, 0},
+{ 747, 1077559600u, 3962610501u, 3198598777u, 849269178u, 1073132817u, 2760677315u, 0, LOG10_TOLERANCE, 0},
+{ 748, 1087990252u, 2497516122u, 3254374111u, 2821429629u, 1074899286u, 2094551578u, 0, LOG10_TOLERANCE, 0},
+{ 749, 1076236288u, 2805941787u, 3217785843u, 779131141u, 1072737943u, 2025392479u, 0, LOG10_TOLERANCE, 0},
+{ 750, 1079425038u, 723423605u, 1084533420u, 627282213u, 1073698254u, 660177971u, 0, LOG10_TOLERANCE, 0},
+{ 751, 1068464032u, 4292778869u, 1078101071u, 1676860147u, 3220398575u, 4080177346u, 0, LOG10_TOLERANCE, 0},
+{ 752, 1076288502u, 3528118587u, 3194648564u, 2363260897u, 1072754098u, 2762983951u, 0, LOG10_TOLERANCE, 0},
+{ 753, 1045414231u, 1307010018u, 1061248120u, 1468743108u, 3223278089u, 2286340052u, 0, LOG10_TOLERANCE, 0},
+{ 754, 1099099491u, 107905661u, 3226089788u, 1943427674u, 1075733782u, 1870296517u, 0, LOG10_TOLERANCE, 0},
+{ 755, 1040746893u, 760006940u, 1054265604u, 1749976597u, 3223472861u, 3121291541u, 0, LOG10_TOLERANCE, 0},
+{ 756, 1090289736u, 2787503556u, 1081282610u, 1195841206u, 1075070165u, 3287006887u, 0, LOG10_TOLERANCE, 0},
+{ 757, 1044318508u, 545462045u, 3208381743u, 1981311808u, 3223341117u, 3439509787u, 0, LOG10_TOLERANCE, 0},
+{ 758, 1061232136u, 3657978397u, 1104463616u, 3501253426u, 3221897616u, 2613738871u, 0, LOG10_TOLERANCE, 0},
+{ 759, 1049883857u, 1804177501u, 3210693633u, 3606766729u, 3222936407u, 395246601u, 0, LOG10_TOLERANCE, 0},
+{ 760, 1076856879u, 1336278526u, 1043741618u, 3165279431u, 1072900573u, 2736825398u, 0, LOG10_TOLERANCE, 0},
+{ 761, 1055471915u, 1599382075u, 1058018527u, 4212580517u, 3222515175u, 1334306044u, 0, LOG10_TOLERANCE, 0},
+{ 762, 1060018678u, 3007589929u, 3202026547u, 2792028313u, 3222080988u, 2398873954u, 0, LOG10_TOLERANCE, 0},
+{ 763, 1105599122u, 1866066996u, 1060329048u, 3727175322u, 1076031950u, 1117079653u, 0, LOG10_TOLERANCE, 0},
+{ 764, 1050932995u, 150890940u, 1056025306u, 3082724735u, 3222857445u, 31357167u, 0, LOG10_TOLERANCE, 0},
+{ 765, 1062008939u, 80400395u, 1093584426u, 3478941315u, 3221777807u, 656233594u, 0, LOG10_TOLERANCE, 0},
+{ 766, 1104156966u, 4050954182u, 3219263194u, 2537475930u, 1075974446u, 2527925082u, 0, LOG10_TOLERANCE, 0},
+{ 767, 1064841871u, 2881752155u, 3212589299u, 2559651278u, 3221345318u, 2837332410u, 0, LOG10_TOLERANCE, 0},
+{ 768, 1101532656u, 440309030u, 3214267461u, 3788040806u, 1075878937u, 3943495913u, 0, LOG10_TOLERANCE, 0},
+{ 769, 1100476615u, 918813144u, 3208535698u, 1607035904u, 1075839211u, 526175238u, 0, LOG10_TOLERANCE, 0},
+{ 770, 1042137451u, 2497054124u, 1089139147u, 2549609010u, 3223422429u, 101990395u, 0, LOG10_TOLERANCE, 0},
+{ 771, 1047037641u, 790219083u, 1054657139u, 2797979479u, 3223149670u, 1483771049u, 0, LOG10_TOLERANCE, 0},
+{ 772, 1057781400u, 1149462078u, 1095765205u, 3879963182u, 3222343590u, 4037954969u, 0, LOG10_TOLERANCE, 0},
+{ 773, 1055246165u, 2684353926u, 3205212854u, 1732474928u, 3222531892u, 2416203981u, 0, LOG10_TOLERANCE, 0},
+{ 774, 1095236965u, 2742237025u, 1051317716u, 3386396147u, 1075445114u, 1609704394u, 0, LOG10_TOLERANCE, 0},
+{ 775, 1063230986u, 3408320912u, 1103071166u, 4233059513u, 3221600072u, 3702924123u, 0, LOG10_TOLERANCE, 0},
+{ 776, 1064863548u, 1077495917u, 1088399968u, 433115118u, 3221342227u, 1491358516u, 0, LOG10_TOLERANCE, 0},
+{ 777, 1057063924u, 841366493u, 1051716814u, 4121125128u, 3222398867u, 2304669873u, 0, LOG10_TOLERANCE, 0},
+{ 778, 1064632084u, 321857207u, 1089128010u, 1149988239u, 3221377628u, 1283733309u, 0, LOG10_TOLERANCE, 0},
+{ 779, 1098059015u, 799866606u, 3197637091u, 3924438208u, 1075655610u, 1105734641u, 0, LOG10_TOLERANCE, 0},
+{ 780, 1043579242u, 2002049816u, 1077053447u, 2240354761u, 3223366830u, 3458618238u, 0, LOG10_TOLERANCE, 0},
+{ 781, 1081522635u, 478939968u, 1097035749u, 1066716440u, 1074035759u, 4035027600u, 0, LOG10_TOLERANCE, 0},
+{ 782, 1084989993u, 1653104725u, 1088548129u, 81977716u, 1074553759u, 4216054447u, 0, LOG10_TOLERANCE, 0},
+{ 783, 1049377628u, 3899475018u, 3189694084u, 3330093036u, 3222975825u, 3582530778u, 0, LOG10_TOLERANCE, 0},
+{ 784, 1089312583u, 2612450289u, 1079065127u, 603380842u, 1074995524u, 3038824780u, 0, LOG10_TOLERANCE, 0},
+{ 785, 1100636791u, 3962735564u, 1101570429u, 1372490825u, 1075844744u, 2684675728u, 0, LOG10_TOLERANCE, 0},
+{ 786, 1054806016u, 1479841439u, 1059312257u, 541504905u, 3222570381u, 3085201785u, 0, LOG10_TOLERANCE, 0},
+{ 787, 1078662178u, 2626148789u, 1057571099u, 4121656076u, 1073462543u, 772383770u, 0, LOG10_TOLERANCE, 0},
+{ 788, 1081613389u, 1902560314u, 1043130231u, 3557671562u, 1074049228u, 1399281699u, 0, LOG10_TOLERANCE, 0},
+{ 789, 1046346124u, 41779312u, 1081626342u, 831171823u, 3223205745u, 1896438613u, 0, LOG10_TOLERANCE, 0},
+{ 790, 1058131100u, 1393168821u, 1066457405u, 1381616968u, 3222318124u, 1542994528u, 0, LOG10_TOLERANCE, 0},
+{ 791, 1072338141u, 3756584649u, 3222267229u, 1423157432u, 3216285761u, 2951141520u, 0, LOG10_TOLERANCE, 0},
+{ 792, 1106952026u, 1894912556u, 1042426694u, 155024547u, 1076082261u, 3040158092u, 0, LOG10_TOLERANCE, 0},
+{ 793, 1047969864u, 35164295u, 3203391785u, 1037041084u, 3223079311u, 3308745497u, 0, LOG10_TOLERANCE, 0},
+{ 794, 1084777479u, 3957875950u, 3232195211u, 1590756436u, 1074525338u, 1563349431u, 0, LOG10_TOLERANCE, 0},
+{ 795, 1068844322u, 1447585080u, 1071279485u, 1107922438u, 3220261276u, 1394670376u, 0, LOG10_TOLERANCE, 0},
+{ 796, 1046252518u, 981897615u, 1051856116u, 430357614u, 3223211303u, 3595460321u, 0, LOG10_TOLERANCE, 0},
+{ 797, 1080040567u, 395145384u, 3219821938u, 50586510u, 1073799609u, 3433717707u, 0, LOG10_TOLERANCE, 0},
+{ 798, 1069775912u, 750827797u, 1082862669u, 230466783u, 3219794186u, 1579634838u, 0, LOG10_TOLERANCE, 0},
+{ 799, 1086668819u, 1365083575u, 3204848310u, 1700831722u, 1074800003u, 2681601635u, 0, LOG10_TOLERANCE, 0},
+{ 800, 1070606742u, 344241827u, 1071538935u, 2715566077u, 3219333154u, 3754315639u, 0, LOG10_TOLERANCE, 0},
+{ 801, 1100099208u, 4069301823u, 3193208760u, 2949125229u, 1075808120u, 2852921220u, 0, LOG10_TOLERANCE, 0},
+{ 802, 1103231387u, 3585711710u, 1065801594u, 2302229267u, 1075941267u, 685999740u, 0, LOG10_TOLERANCE, 0},
+{ 803, 1046635308u, 709803845u, 1048741487u, 2296910194u, 3223182468u, 2740202815u, 0, LOG10_TOLERANCE, 0},
+{ 804, 1045797131u, 744421179u, 1069302001u, 2659232829u, 3223243060u, 2691168462u, 0, LOG10_TOLERANCE, 0},
+{ 805, 1092835968u, 1799949903u, 3192522886u, 4212149209u, 1075262838u, 2250803774u, 0, LOG10_TOLERANCE, 0},
+{ 806, 1058624854u, 145234164u, 3250614064u, 912384201u, 3222277940u, 674861709u, 0, LOG10_TOLERANCE, 0},
+{ 807, 1093027016u, 2784620507u, 1102812948u, 3531481022u, 1075278812u, 696134292u, 0, LOG10_TOLERANCE, 0},
+{ 808, 1103676015u, 383952592u, 3205659905u, 3633194728u, 1075959495u, 2755860393u, 0, LOG10_TOLERANCE, 0},
+{ 809, 1055992604u, 3792395543u, 1070072378u, 3864816376u, 3222480059u, 283896494u, 0, LOG10_TOLERANCE, 0},
+{ 810, 1057832625u, 2115553675u, 1066288499u, 3538377867u, 3222340506u, 3026544246u, 0, LOG10_TOLERANCE, 0},
+{ 811, 1104591537u, 1230026762u, 1090719723u, 440819880u, 1075994082u, 260264377u, 0, LOG10_TOLERANCE, 0},
+{ 812, 1047111428u, 2991290482u, 1096886719u, 1097971167u, 3223144560u, 2098613411u, 0, LOG10_TOLERANCE, 0},
+{ 813, 1090048600u, 1098035020u, 3230900504u, 1479059095u, 1075054429u, 58159371u, 0, LOG10_TOLERANCE, 0},
+{ 814, 1103573316u, 1719428427u, 3188631907u, 3707377409u, 1075955773u, 3449026054u, 0, LOG10_TOLERANCE, 0},
+{ 815, 1053236165u, 3748932896u, 1084908557u, 1325384361u, 3222682971u, 1034783433u, 0, LOG10_TOLERANCE, 0},
+{ 816, 1084704076u, 3979168763u, 1057455255u, 2454615952u, 1074514634u, 3185048229u, 0, LOG10_TOLERANCE, 0},
+{ 817, 1053106984u, 1449164578u, 1056960316u, 1654931641u, 3222693121u, 3443010324u, 0, LOG10_TOLERANCE, 0},
+{ 818, 1071439010u, 2120487381u, 3226298974u, 2364226633u, 3218481792u, 518227657u, 0, LOG10_TOLERANCE, 0},
+{ 819, 1075071428u, 1074268944u, 1065730444u, 280016852u, 1072074970u, 3577897135u, 0, LOG10_TOLERANCE, 0},
+{ 820, 1052824608u, 3315127889u, 3236295594u, 2900924954u, 3222719074u, 2027145852u, 0, LOG10_TOLERANCE, 0},
+{ 821, 1048942243u, 2246037502u, 1049691002u, 1496066550u, 3223006370u, 2295288876u, 0, LOG10_TOLERANCE, 0},
+{ 822, 1045523211u, 4191285446u, 3217936236u, 2382392789u, 3223267546u, 4168743981u, 0, LOG10_TOLERANCE, 0},
+{ 823, 1092833308u, 640099844u, 1042152237u, 2064279383u, 1075262599u, 2090152878u, 0, LOG10_TOLERANCE, 0},
+{ 824, 1079913438u, 3468560824u, 1093251038u, 310958750u, 1073784634u, 3165731196u, 0, LOG10_TOLERANCE, 0},
+{ 825, 1096788400u, 1413568905u, 1100941106u, 1627289946u, 1075555621u, 3856793281u, 0, LOG10_TOLERANCE, 0},
+{ 826, 1044065902u, 3797143370u, 3195497539u, 3843275034u, 3223348666u, 2069084644u, 0, LOG10_TOLERANCE, 0},
+{ 827, 1104593745u, 2806642640u, 3201943068u, 2515980718u, 1075994166u, 1674516539u, 0, LOG10_TOLERANCE, 0},
+{ 828, 1086877316u, 632580632u, 1078673506u, 3259601317u, 1074815886u, 2637883203u, 0, LOG10_TOLERANCE, 0},
+{ 829, 1053496927u, 3309678799u, 1049337078u, 3056787074u, 3222664884u, 1775866686u, 0, LOG10_TOLERANCE, 0},
+{ 830, 1074011641u, 2341164249u, 1080834967u, 2810890005u, 1071227234u, 2256181049u, 0, LOG10_TOLERANCE, 0},
+{ 831, 1067019674u, 932124675u, 1093915797u, 662682630u, 3220811269u, 995473316u, 0, LOG10_TOLERANCE, 0},
+{ 832, 1101746443u, 1367996113u, 3251723684u, 2974064663u, 1075886177u, 651743782u, 0, LOG10_TOLERANCE, 0},
+{ 833, 1080230731u, 323437999u, 1090499064u, 901457511u, 1073837316u, 2251952976u, 0, LOG10_TOLERANCE, 0},
+{ 834, 1088295228u, 4184941840u, 3196770014u, 2458988443u, 1074918429u, 3423367882u, 0, LOG10_TOLERANCE, 0},
+{ 835, 1087618284u, 2023065054u, 3211994098u, 2734612965u, 1074870511u, 3963545637u, 0, LOG10_TOLERANCE, 0},
+{ 836, 1064074694u, 3679267365u, 3237728785u, 1699558211u, 3221465951u, 335272041u, 0, LOG10_TOLERANCE, 0},
+{ 837, 1088079010u, 1826799031u, 1078709629u, 3986905229u, 1074905197u, 1977171186u, 0, LOG10_TOLERANCE, 0},
+{ 838, 1052843785u, 351061688u, 3194386466u, 4105857588u, 3222717111u, 4126660092u, 0, LOG10_TOLERANCE, 0},
+{ 839, 1054128006u, 1365244058u, 1064457319u, 1452191426u, 3222616495u, 4099715943u, 0, LOG10_TOLERANCE, 0},
+{ 840, 1064122385u, 2463030625u, 3215975031u, 3773488326u, 3221460208u, 2109408512u, 0, LOG10_TOLERANCE, 0},
+{ 841, 1103793023u, 752664055u, 1065110394u, 1835931663u, 1075963459u, 685541286u, 0, LOG10_TOLERANCE, 0},
+{ 842, 1088045088u, 3496172149u, 1089617208u, 109068701u, 1074902974u, 2047127981u, 0, LOG10_TOLERANCE, 0},
+{ 843, 1050651439u, 1636966254u, 1086098766u, 2016598298u, 3222883834u, 875865810u, 0, LOG10_TOLERANCE, 0},
+{ 844, 1050931318u, 3551516956u, 1097969102u, 1317953425u, 3222857590u, 4082108263u, 0, LOG10_TOLERANCE, 0},
+{ 845, 1082348569u, 2977627788u, 1045339018u, 516058480u, 1074156718u, 2272896401u, 0, LOG10_TOLERANCE, 0},
+{ 846, 1089924930u, 3901731263u, 3189566462u, 32272932u, 1075045427u, 671782915u, 0, LOG10_TOLERANCE, 0},
+{ 847, 1077281796u, 1956025297u, 3246628529u, 3840733905u, 1073052628u, 3982968800u, 0, LOG10_TOLERANCE, 0},
+{ 848, 1099818036u, 561057891u, 3198494340u, 4271027193u, 1075785807u, 113950622u, 0, LOG10_TOLERANCE, 0},
+{ 849, 1103446273u, 692989850u, 3242630588u, 2492225971u, 1075950805u, 818111655u, 0, LOG10_TOLERANCE, 0},
+{ 850, 1057995749u, 3439913962u, 1067477011u, 2973333638u, 3222331207u, 1303955608u, 0, LOG10_TOLERANCE, 0},
+{ 851, 1066510341u, 877613377u, 1044917899u, 809672798u, 3220977378u, 1845075850u, 0, LOG10_TOLERANCE, 0},
+{ 852, 1074687806u, 905426932u, 1046417457u, 1086320855u, 1071813024u, 2781073646u, 0, LOG10_TOLERANCE, 0},
+{ 853, 1098862981u, 2645567288u, 1051258339u, 557182478u, 1075712203u, 812148340u, 0, LOG10_TOLERANCE, 0},
+{ 854, 1056574302u, 186287752u, 1061342054u, 4054003419u, 3222432615u, 442298873u, 0, LOG10_TOLERANCE, 0},
+{ 855, 1097266673u, 3506889716u, 3243866036u, 519056371u, 1075597949u, 538556539u, 0, LOG10_TOLERANCE, 0},
+{ 856, 1042654053u, 2171898436u, 3246911982u, 1091500784u, 3223401105u, 2734375231u, 0, LOG10_TOLERANCE, 0},
+{ 857, 1096164025u, 368493885u, 3222871893u, 1419055230u, 1075514869u, 2281844850u, 0, LOG10_TOLERANCE, 0},
+{ 858, 1091950572u, 2010971245u, 3188804530u, 1518695799u, 1075197703u, 4020454285u, 0, LOG10_TOLERANCE, 0},
+{ 859, 1057942861u, 1239207795u, 1040192984u, 2199481342u, 3222334139u, 4169715069u, 0, LOG10_TOLERANCE, 0},
+{ 860, 1063494989u, 4264613432u, 3203460972u, 3558930895u, 3221550594u, 2166450280u, 0, LOG10_TOLERANCE, 0},
+{ 861, 1050299283u, 3772748958u, 3227667376u, 309688336u, 3222905003u, 765066117u, 0, LOG10_TOLERANCE, 0},
+{ 862, 1083259393u, 1077949160u, 1075769893u, 2405271377u, 1074288330u, 3619654319u, 0, LOG10_TOLERANCE, 0},
+{ 863, 1091835152u, 3751608506u, 3232278094u, 930375071u, 1075188133u, 2430026858u, 0, LOG10_TOLERANCE, 0},
+{ 864, 1051133505u, 1518334131u, 3205247482u, 791756713u, 3222841212u, 2201383808u, 0, LOG10_TOLERANCE, 0},
+{ 865, 1047317453u, 2825203170u, 3245054001u, 1822981827u, 3223131399u, 1781924118u, 0, LOG10_TOLERANCE, 0},
+{ 866, 1100016363u, 514474738u, 1089072073u, 3300845441u, 1075799916u, 2273546640u, 0, LOG10_TOLERANCE, 0},
+{ 867, 1068907602u, 247369460u, 3197320093u, 687450958u, 3220241058u, 4195955112u, 0, LOG10_TOLERANCE, 0},
+{ 868, 1104161422u, 2722237629u, 1058272368u, 90602316u, 1075974686u, 2110125726u, 0, LOG10_TOLERANCE, 0},
+{ 869, 1060614787u, 1845900544u, 3231520830u, 3389751458u, 3221981380u, 1451399181u, 0, LOG10_TOLERANCE, 0},
+{ 870, 1100051597u, 737689911u, 3195377751u, 3462616966u, 1075803478u, 929679035u, 0, LOG10_TOLERANCE, 0},
+{ 871, 1076054736u, 3620285831u, 1055501023u, 2708056059u, 1072660433u, 2509134029u, 0, LOG10_TOLERANCE, 0},
+{ 872, 1071981348u, 4073430285u, 1056206159u, 172017902u, 3217493387u, 977702324u, 0, LOG10_TOLERANCE, 0},
+{ 873, 1065385990u, 2799176222u, 1052706894u, 4083892667u, 3221274672u, 4016902187u, 0, LOG10_TOLERANCE, 0},
+{ 874, 1054795909u, 1562351330u, 1069705601u, 1247765260u, 3222570948u, 1552306542u, 0, LOG10_TOLERANCE, 0},
+{ 875, 1085233651u, 51853475u, 3189080201u, 2783553144u, 1074582502u, 856854528u, 0, LOG10_TOLERANCE, 0},
+{ 876, 1071970705u, 3851781549u, 3241598113u, 514064046u, 3217521485u, 3650940125u, 0, LOG10_TOLERANCE, 0},
+{ 877, 1100045965u, 934745487u, 3248182437u, 2798581921u, 1075802916u, 1421123339u, 0, LOG10_TOLERANCE, 0},
+{ 878, 1065598845u, 2948648757u, 3232177250u, 4278702895u, 3221233759u, 858150767u, 0, LOG10_TOLERANCE, 0},
+{ 879, 1072485724u, 4259101461u, 1061606772u, 84229920u, 3215403890u, 4183169085u, 0, LOG10_TOLERANCE, 0},
+{ 880, 1050591911u, 3891230598u, 1095924595u, 3049217547u, 3222887147u, 1338942792u, 0, LOG10_TOLERANCE, 0},
+{ 881, 1077353053u, 3806018919u, 3243191216u, 280177341u, 1073074581u, 3592504291u, 0, LOG10_TOLERANCE, 0},
+{ 882, 1060624530u, 3900344258u, 1063647809u, 4206745890u, 3221979956u, 1165041488u, 0, LOG10_TOLERANCE, 0},
+{ 883, 1080223688u, 2126253040u, 3207248026u, 808507485u, 1073836025u, 4006752466u, 0, LOG10_TOLERANCE, 0},
+{ 884, 1086090317u, 3465685634u, 3230391053u, 3754958214u, 1074718001u, 2173078304u, 0, LOG10_TOLERANCE, 0},
+{ 885, 1102861084u, 461094531u, 1101110393u, 1316091396u, 1075927696u, 2549577293u, 0, LOG10_TOLERANCE, 0},
+{ 886, 1064980314u, 4197635149u, 1091873113u, 1240127141u, 3221326260u, 3476238897u, 0, LOG10_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 1071625565u, 3112805610u, 0, LOG10_TOLERANCE, 0},
+{ 888, 1065945517u, 3744663425u, 3212482771u, 953662066u, 3221133966u, 2461525298u, 0, LOG10_TOLERANCE, 0},
+{ 889, 1085171305u, 3564196690u, 3228101916u, 904305212u, 1074575486u, 506637444u, 0, LOG10_TOLERANCE, 0},
+{ 890, 1048333111u, 3566257266u, 3235138829u, 2734275140u, 3223054489u, 2402197835u, 0, LOG10_TOLERANCE, 0},
+{ 891, 1096464829u, 606044282u, 3241318094u, 2446416887u, 1075536321u, 4109023068u, 0, LOG10_TOLERANCE, 0},
+{ 892, 1041627284u, 2336116589u, 3197594053u, 2296925138u, 3223439693u, 2314837685u, 0, LOG10_TOLERANCE, 0},
+{ 893, 1058567659u, 907670625u, 3240769036u, 1827119006u, 3222281931u, 1348167011u, 0, LOG10_TOLERANCE, 0},
+{ 894, 1044467183u, 2818710946u, 3246059905u, 553394170u, 3223334914u, 3999609662u, 0, LOG10_TOLERANCE, 0},
+{ 895, 1042020446u, 4099522736u, 3232742168u, 3718083858u, 3223425951u, 1041051776u, 0, LOG10_TOLERANCE, 0},
+{ 896, 1092371276u, 1059279404u, 1080245336u, 175941677u, 1075227036u, 2513130381u, 0, LOG10_TOLERANCE, 0},
+{ 897, 1105189691u, 1650862428u, 1061816101u, 1723201723u, 1076013298u, 2773793754u, 0, LOG10_TOLERANCE, 0},
+{ 898, 1091529166u, 2462163405u, 3218946201u, 3876535372u, 1075160155u, 262248220u, 0, LOG10_TOLERANCE, 0},
+{ 899, 1084392886u, 495844137u, 1073721460u, 772777946u, 1074462670u, 1099362184u, 0, LOG10_TOLERANCE, 0},
+{ 900, 1052415330u, 458757721u, 3245680321u, 3609892707u, 3222745935u, 1380494767u, 0, LOG10_TOLERANCE, 0},
+{ 901, 1045799308u, 2533012202u, 1079980803u, 3592268374u, 3223242885u, 2684476530u, 0, LOG10_TOLERANCE, 0},
+{ 902, 1055881132u, 4108274117u, 1063045844u, 571992389u, 3222489993u, 3494391159u, 0, LOG10_TOLERANCE, 0},
+{ 903, 1090567271u, 3541110973u, 1096296754u, 3118427427u, 1075088468u, 1540713558u, 0, LOG10_TOLERANCE, 0},
+{ 904, 1046496395u, 1213941007u, 1105433735u, 2172963370u, 3223196412u, 3319524204u, 0, LOG10_TOLERANCE, 0},
+{ 905, 1096853359u, 272190288u, 1095452370u, 4026581530u, 1075561388u, 4126415854u, 0, LOG10_TOLERANCE, 0},
+{ 906, 1095583909u, 2843638672u, 1100510986u, 3190536898u, 1075467816u, 74630356u, 0, LOG10_TOLERANCE, 0},
+{ 907, 1083757094u, 2014317727u, 3247389683u, 2428462015u, 1074371492u, 2456721468u, 0, LOG10_TOLERANCE, 0},
+{ 908, 1093976717u, 688442200u, 1047852515u, 3035186380u, 1075349738u, 1619572370u, 0, LOG10_TOLERANCE, 0},
+{ 909, 1076664212u, 1010095511u, 3221288076u, 405287991u, 1072856003u, 3966425243u, 0, LOG10_TOLERANCE, 0},
+{ 910, 1104810967u, 2983070435u, 1089546472u, 2907918480u, 1076001904u, 2260517137u, 0, LOG10_TOLERANCE, 0},
+{ 911, 1082988121u, 81928569u, 1056007286u, 2740556321u, 1074249782u, 741500836u, 0, LOG10_TOLERANCE, 0},
+{ 912, 1041110867u, 2076689028u, 1081558619u, 3039159031u, 3223461247u, 1110171873u, 0, LOG10_TOLERANCE, 0},
+{ 913, 1047307438u, 1376882094u, 3211003208u, 1296286481u, 3223132005u, 933703128u, 0, LOG10_TOLERANCE, 0},
+{ 914, 1080114314u, 744133164u, 3200943494u, 955832216u, 1073814982u, 1891659777u, 0, LOG10_TOLERANCE, 0},
+{ 915, 1078806678u, 176522478u, 1069999908u, 2891249491u, 1073498191u, 442688633u, 0, LOG10_TOLERANCE, 0},
+{ 916, 1043564602u, 3685851715u, 3187829932u, 2363997529u, 3223367478u, 557452820u, 0, LOG10_TOLERANCE, 0},
+{ 917, 1040244055u, 3974431579u, 1052505165u, 2589067816u, 3223494206u, 3626267569u, 0, LOG10_TOLERANCE, 0},
+{ 918, 1044013141u, 3819109588u, 1048561488u, 969143351u, 3223350377u, 4068494919u, 0, LOG10_TOLERANCE, 0},
+{ 919, 1072639397u, 4246896124u, 1104584799u, 1940097860u, 3213304592u, 3497819754u, 0, LOG10_TOLERANCE, 0},
+{ 920, 1048038468u, 2228686199u, 3220231833u, 777624847u, 3223074190u, 1541831713u, 0, LOG10_TOLERANCE, 0},
+{ 921, 1083983658u, 4189906558u, 3203004203u, 854242364u, 1074401183u, 2633113722u, 0, LOG10_TOLERANCE, 0},
+{ 922, 1103910407u, 4089051094u, 3227282692u, 2693170723u, 1075967176u, 539495337u, 0, LOG10_TOLERANCE, 0},
+{ 923, 1045883607u, 1278581412u, 3239296746u, 1774588717u, 3223236309u, 1250724029u, 0, LOG10_TOLERANCE, 0},
+{ 924, 1074889038u, 1794845306u, 1104879344u, 4135865182u, 1071940589u, 4081733314u, 0, LOG10_TOLERANCE, 0},
+{ 925, 1106449055u, 754938390u, 1061291430u, 2010786993u, 1076063011u, 897095638u, 0, LOG10_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 1070665179u, 3094080775u, 0, LOG10_TOLERANCE, 0},
+{ 927, 1083965546u, 567588900u, 3195452230u, 1421366017u, 1074398947u, 1052576918u, 0, LOG10_TOLERANCE, 0},
+{ 928, 1077606107u, 2708717091u, 1071975971u, 1364590470u, 1073144962u, 4187422802u, 0, LOG10_TOLERANCE, 0},
+{ 929, 1104653635u, 3461956134u, 3207820115u, 1605709634u, 1075996406u, 4280267022u, 0, LOG10_TOLERANCE, 0},
+{ 930, 1065302996u, 1497124553u, 1051715442u, 916736957u, 3221287199u, 3332961944u, 0, LOG10_TOLERANCE, 0},
+{ 931, 1058468363u, 834914365u, 1064667143u, 2839166298u, 3222289211u, 514998812u, 0, LOG10_TOLERANCE, 0},
+{ 932, 1057279949u, 2139295776u, 1062816721u, 914592523u, 3222379236u, 1543783481u, 0, LOG10_TOLERANCE, 0},
+{ 933, 1042153283u, 851569132u, 1058503154u, 1399378677u, 3223421968u, 3228314542u, 0, LOG10_TOLERANCE, 0},
+{ 934, 1086054049u, 3897202342u, 3245382590u, 246600375u, 1074713524u, 2112897030u, 0, LOG10_TOLERANCE, 0},
+{ 935, 1077976660u, 3620429520u, 1055627557u, 229305u, 1073240207u, 2697183834u, 0, LOG10_TOLERANCE, 0},
+{ 936, 1083958833u, 3641997865u, 3206673888u, 93720614u, 1074398112u, 3772639712u, 0, LOG10_TOLERANCE, 0},
+{ 937, 1080324787u, 32766320u, 1062084905u, 3668443038u, 1073853886u, 1022794505u, 0, LOG10_TOLERANCE, 0},
+{ 938, 1075815348u, 2039713492u, 3248699388u, 1346210821u, 1072479693u, 1831222428u, 0, LOG10_TOLERANCE, 0},
+{ 939, 1093050016u, 1335820726u, 3191756860u, 1808427032u, 1075280592u, 1598478647u, 0, LOG10_TOLERANCE, 0},
+{ 940, 1061442763u, 650692001u, 1103515670u, 2253348763u, 3221858437u, 3297267625u, 0, LOG10_TOLERANCE, 0},
+{ 941, 1043911539u, 2372623300u, 3210185343u, 3200572848u, 3223353826u, 595580091u, 0, LOG10_TOLERANCE, 0},
+{ 942, 1100796069u, 762317532u, 3194595095u, 3192607437u, 1075849760u, 1939640096u, 0, LOG10_TOLERANCE, 0},
+{ 943, 1062262701u, 217775356u, 3232827087u, 2969367386u, 3221743475u, 3320081474u, 0, LOG10_TOLERANCE, 0},
+{ 944, 1057172551u, 3621353969u, 1077994795u, 3873976266u, 3222388573u, 2581083904u, 0, LOG10_TOLERANCE, 0},
+{ 945, 1091301987u, 268372152u, 3221764390u, 3216978962u, 1075146843u, 300857787u, 0, LOG10_TOLERANCE, 0},
+{ 946, 1098953963u, 142942404u, 1075322987u, 1746449109u, 1075719574u, 3783378795u, 0, LOG10_TOLERANCE, 0},
+{ 947, 1104006296u, 496534875u, 3254522293u, 2532372502u, 1075970042u, 121673326u, 0, LOG10_TOLERANCE, 0},
+{ 948, 1102741893u, 2999955409u, 3222793392u, 1868977643u, 1075923918u, 4041909473u, 0, LOG10_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 1071609002u, 3568808289u, 0, LOG10_TOLERANCE, 0},
+{ 950, 1068218799u, 73646871u, 3231442171u, 3711510104u, 3220456229u, 2608711226u, 0, LOG10_TOLERANCE, 0},
+{ 951, 1090483524u, 218135177u, 3198908856u, 3082199105u, 1075081403u, 4130761195u, 0, LOG10_TOLERANCE, 0},
+{ 952, 1068068480u, 1061628117u, 3248859043u, 86776158u, 3220495553u, 2350869612u, 0, LOG10_TOLERANCE, 0},
+{ 953, 1061001026u, 938869114u, 1087911145u, 2416710759u, 3221930808u, 1742268548u, 0, LOG10_TOLERANCE, 0},
+{ 954, 1095576832u, 2970853959u, 3239543429u, 1887505029u, 1075467395u, 1803897185u, 0, LOG10_TOLERANCE, 0},
+{ 955, 1090245139u, 1337895935u, 1076463812u, 1172733328u, 1075067414u, 2255894230u, 0, LOG10_TOLERANCE, 0},
+{ 956, 1049139928u, 1469010822u, 3229583535u, 551399515u, 3222991480u, 3413880326u, 0, LOG10_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 1071368716u, 319414877u, 0, LOG10_TOLERANCE, 0},
+{ 958, 1094655132u, 2976596113u, 3192137295u, 3033242648u, 1075395796u, 2395640658u, 0, LOG10_TOLERANCE, 0},
+{ 959, 1098698481u, 876810930u, 3197470945u, 2571587447u, 1075702692u, 868384370u, 0, LOG10_TOLERANCE, 0},
+{ 960, 1094287162u, 4007797282u, 3225853845u, 4069319648u, 1075373137u, 4114988772u, 0, LOG10_TOLERANCE, 0},
+{ 961, 1047279982u, 3840538373u, 1043189552u, 3668774580u, 3223133682u, 2793605649u, 0, LOG10_TOLERANCE, 0},
+{ 962, 1070128056u, 200857661u, 3229758439u, 3359367736u, 3219572368u, 3230745583u, 0, LOG10_TOLERANCE, 0},
+{ 963, 1101314221u, 111868139u, 3227902082u, 2366064003u, 1075870447u, 2315533989u, 0, LOG10_TOLERANCE, 0},
+{ 964, 1044195166u, 3510904416u, 3222131653u, 3822770497u, 3223344678u, 3470538208u, 0, LOG10_TOLERANCE, 0},
+{ 965, 1095192067u, 789151814u, 1099269239u, 2958956055u, 1075441815u, 3485815747u, 0, LOG10_TOLERANCE, 0},
+{ 966, 1084679320u, 722163228u, 1105524559u, 1534462169u, 1074510908u, 798696848u, 0, LOG10_TOLERANCE, 0},
+{ 967, 1046586062u, 2207037106u, 3208952465u, 1231254630u, 3223187218u, 4027511879u, 0, LOG10_TOLERANCE, 0},
+{ 968, 1050400412u, 3838689849u, 3198769679u, 1302617170u, 3222898510u, 3604128999u, 0, LOG10_TOLERANCE, 0},
+{ 969, 1085938906u, 2527556476u, 3240373426u, 124352692u, 1074698697u, 3398399993u, 0, LOG10_TOLERANCE, 0},
+{ 970, 1052057157u, 3502371499u, 1043411944u, 4190072016u, 3222772137u, 3563735668u, 0, LOG10_TOLERANCE, 0},
+{ 971, 1064676142u, 1798470077u, 3200116917u, 3421833729u, 3221370452u, 329675828u, 0, LOG10_TOLERANCE, 0},
+{ 972, 1046031308u, 3653237931u, 3204255012u, 3683870669u, 3223225630u, 580955093u, 0, LOG10_TOLERANCE, 0},
+{ 973, 1053588582u, 376530104u, 1073853547u, 565755892u, 3222659153u, 523959117u, 0, LOG10_TOLERANCE, 0},
+{ 974, 1095020203u, 558292492u, 1051772749u, 4267873474u, 1075428224u, 3675331960u, 0, LOG10_TOLERANCE, 0},
+{ 975, 1077289061u, 509637100u, 3212030069u, 215050379u, 1073054916u, 371002261u, 0, LOG10_TOLERANCE, 0},
+{ 976, 1092057101u, 3571665665u, 3188628584u, 757824767u, 1075205875u, 2766467475u, 0, LOG10_TOLERANCE, 0},
+{ 977, 1067315689u, 998858159u, 1063077962u, 436029885u, 3220736810u, 2451000458u, 0, LOG10_TOLERANCE, 0},
+{ 978, 1058463317u, 996300405u, 3193842624u, 80548098u, 3222289593u, 3378863163u, 0, LOG10_TOLERANCE, 0},
+{ 979, 1081365192u, 3876129407u, 3215332180u, 2226970413u, 1074010320u, 899697228u, 0, LOG10_TOLERANCE, 0},
+{ 980, 1090125305u, 200013509u, 3224552716u, 414878724u, 1075059674u, 2493730227u, 0, LOG10_TOLERANCE, 0},
+{ 981, 1083133445u, 309319541u, 1048979765u, 1261662434u, 1074266510u, 2927407487u, 0, LOG10_TOLERANCE, 0},
+{ 982, 1089252639u, 4062255924u, 3224274128u, 4289485681u, 1074991950u, 404883066u, 0, LOG10_TOLERANCE, 0},
+{ 983, 1088652436u, 1611969213u, 1053890378u, 3774617276u, 1074948148u, 2175758408u, 0, LOG10_TOLERANCE, 0},
+{ 984, 1080412763u, 1752164782u, 3239587974u, 612223386u, 1073868364u, 979639357u, 0, LOG10_TOLERANCE, 0},
+{ 985, 1041545782u, 2024044989u, 1074932678u, 3259111307u, 3223443010u, 1613812740u, 0, LOG10_TOLERANCE, 0},
+{ 986, 1053207518u, 2564965629u, 1093571065u, 169360454u, 3222685145u, 1827889021u, 0, LOG10_TOLERANCE, 0},
+{ 987, 1089599090u, 1860101737u, 3191222372u, 1676437468u, 1075017608u, 1612357925u, 0, LOG10_TOLERANCE, 0},
+{ 988, 1059802968u, 588387057u, 3192103292u, 2495288012u, 3222106899u, 1393779995u, 0, LOG10_TOLERANCE, 0},
+{ 989, 1045672057u, 659070058u, 1073095700u, 1393632068u, 3223253593u, 999146267u, 0, LOG10_TOLERANCE, 0},
+{ 990, 1070199615u, 4276187829u, 3217553330u, 1868253275u, 3219533215u, 3230946523u, 0, LOG10_TOLERANCE, 0},
+{ 991, 1075736624u, 2085481575u, 3215994784u, 800910002u, 1072444440u, 3989888399u, 0, LOG10_TOLERANCE, 0},
+{ 992, 1056934836u, 1950570756u, 3200582211u, 941022151u, 3222410797u, 3829821005u, 0, LOG10_TOLERANCE, 0},
+{ 993, 1057530368u, 2075610870u, 3250142022u, 3605152103u, 3222360045u, 3676911858u, 0, LOG10_TOLERANCE, 0},
+{ 994, 1053355602u, 3792931748u, 3204857863u, 804393211u, 3222674329u, 223063370u, 0, LOG10_TOLERANCE, 0},
+{ 995, 1106162722u, 3430071177u, 3226288311u, 3652522729u, 1076050657u, 1188151311u, 0, LOG10_TOLERANCE, 0},
+{ 996, 1053831054u, 236884699u, 3227874605u, 2193269825u, 3222644595u, 2414521413u, 0, LOG10_TOLERANCE, 0},
+{ 997, 1064936593u, 2744231849u, 1046186036u, 771053722u, 3221332108u, 3768168054u, 0, LOG10_TOLERANCE, 0},
+{ 998, 1083996036u, 3000189819u, 1096500901u, 2057239777u, 1074402699u, 1446789637u, 0, LOG10_TOLERANCE, 0},
+{ 999, 1093835581u, 205759408u, 3244643377u, 2702292618u, 1075337269u, 2939813565u, 0, LOG10_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_LOG10_H multiple inclusion protection
+
+// EOF log10.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/modf.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/modf.c
new file mode 100644
index 0000000000..2f20906d49
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/modf.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// modf.c
+//
+// Test of modf() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/modf.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(modf_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &modf, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_DOUBLE_P, CYG_LIBM_TEST_VEC_DOUBLE,
+ &modf_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("modf() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("modf() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library modf() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "modf() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF modf.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/modf.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/modf.h
new file mode 100644
index 0000000000..01fc6c8bed
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/modf.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_MODF_H
+#define CYGONCE_LIBM_MODF_H
+//===========================================================================
+//
+// modf.h
+//
+// Test vectors for testing of modf() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/modf.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define MODF_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t modf_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1077999148u, 2506787616u, 1077968896u, 0u, 1072532261u, 1520617472u, 0, MODF_TOLERANCE, 0},
+{ 2, 1090024059u, 3619148316u, 1090024048u, 0u, 1072148335u, 2755133440u, 0, MODF_TOLERANCE, 0},
+{ 3, 3218153654u, 3176730980u, 2147483648u, 0u, 3218153654u, 3176730980u, 0, MODF_TOLERANCE, 0},
+{ 4, 1051524793u, 2993920299u, 0u, 0u, 1051524793u, 2993920299u, 0, MODF_TOLERANCE, 0},
+{ 5, 3239659803u, 2725707538u, 3239659800u, 0u, 3219985335u, 4170186752u, 0, MODF_TOLERANCE, 0},
+{ 6, 3232101343u, 2346810316u, 3232100864u, 0u, 3220043966u, 398245888u, 0, MODF_TOLERANCE, 0},
+{ 7, 1092554362u, 2088062470u, 1092554360u, 0u, 1071899562u, 1882193920u, 0, MODF_TOLERANCE, 0},
+{ 8, 3201242716u, 420891118u, 2147483648u, 0u, 3201242716u, 420891118u, 0, MODF_TOLERANCE, 0},
+{ 9, 3221200677u, 2636405208u, 3220176896u, 0u, 3220127307u, 977843120u, 0, MODF_TOLERANCE, 0},
+{ 10, 1100049309u, 471635570u, 1100049309u, 469762048u, 1067226738u, 0u, 0, MODF_TOLERANCE, 0},
+{ 11, 1089363191u, 1746012320u, 1089363168u, 0u, 1072130066u, 144703488u, 0, MODF_TOLERANCE, 0},
+{ 12, 1054478713u, 3333988501u, 0u, 0u, 1054478713u, 3333988501u, 0, MODF_TOLERANCE, 0},
+{ 13, 1047953160u, 183014794u, 0u, 0u, 1047953160u, 183014794u, 0, MODF_TOLERANCE, 0},
+{ 14, 3202039382u, 2016785810u, 2147483648u, 0u, 3202039382u, 2016785810u, 0, MODF_TOLERANCE, 0},
+{ 15, 3213486034u, 2688957927u, 2147483648u, 0u, 3213486034u, 2688957927u, 0, MODF_TOLERANCE, 0},
+{ 16, 1046089230u, 2709029994u, 0u, 0u, 1046089230u, 2709029994u, 0, MODF_TOLERANCE, 0},
+{ 17, 1058795730u, 624574473u, 0u, 0u, 1058795730u, 624574473u, 0, MODF_TOLERANCE, 0},
+{ 18, 1045840574u, 3473266330u, 0u, 0u, 1045840574u, 3473266330u, 0, MODF_TOLERANCE, 0},
+{ 19, 3204919842u, 1605286142u, 2147483648u, 0u, 3204919842u, 1605286142u, 0, MODF_TOLERANCE, 0},
+{ 20, 1068931671u, 4233776869u, 0u, 0u, 1068931671u, 4233776869u, 0, MODF_TOLERANCE, 0},
+{ 21, 1060343410u, 1857607719u, 0u, 0u, 1060343410u, 1857607719u, 0, MODF_TOLERANCE, 0},
+{ 22, 3222889559u, 3417070006u, 3222798336u, 0u, 3218490748u, 3133512544u, 0, MODF_TOLERANCE, 0},
+{ 23, 1103599987u, 3981151660u, 1103599987u, 3976200192u, 1071833963u, 0u, 0, MODF_TOLERANCE, 0},
+{ 24, 1088899021u, 1332651746u, 1088899008u, 0u, 1071292125u, 1304690688u, 0, MODF_TOLERANCE, 0},
+{ 25, 1085298022u, 3824988054u, 1085297920u, 0u, 1071233279u, 736460800u, 0, MODF_TOLERANCE, 0},
+{ 26, 1066856791u, 2070129652u, 0u, 0u, 1066856791u, 2070129652u, 0, MODF_TOLERANCE, 0},
+{ 27, 3207559790u, 1372884064u, 2147483648u, 0u, 3207559790u, 1372884064u, 0, MODF_TOLERANCE, 0},
+{ 28, 1080833116u, 3229926662u, 1080827904u, 0u, 1071930560u, 2227504640u, 0, MODF_TOLERANCE, 0},
+{ 29, 1093826501u, 3217805330u, 1093826501u, 0u, 1072167290u, 37748736u, 0, MODF_TOLERANCE, 0},
+{ 30, 3191644264u, 2014578707u, 2147483648u, 0u, 3191644264u, 2014578707u, 0, MODF_TOLERANCE, 0},
+{ 31, 1102287487u, 265058758u, 1102287487u, 251658240u, 1072271160u, 3221225472u, 0, MODF_TOLERANCE, 0},
+{ 32, 3239903247u, 1630600647u, 3239903244u, 0u, 3219851655u, 3996647424u, 0, MODF_TOLERANCE, 0},
+{ 33, 1071124229u, 1946677669u, 0u, 0u, 1071124229u, 1946677669u, 0, MODF_TOLERANCE, 0},
+{ 34, 3198462609u, 926009897u, 2147483648u, 0u, 3198462609u, 926009897u, 0, MODF_TOLERANCE, 0},
+{ 35, 1072130299u, 2271884183u, 0u, 0u, 1072130299u, 2271884183u, 0, MODF_TOLERANCE, 0},
+{ 36, 3203741999u, 2118617783u, 2147483648u, 0u, 3203741999u, 2118617783u, 0, MODF_TOLERANCE, 0},
+{ 37, 3194849109u, 213658772u, 2147483648u, 0u, 3194849109u, 213658772u, 0, MODF_TOLERANCE, 0},
+{ 38, 3249401130u, 314151656u, 3249401130u, 301989888u, 3218551389u, 0u, 0, MODF_TOLERANCE, 0},
+{ 39, 3254112288u, 1564829925u, 3254112288u, 1564475392u, 3218449300u, 0u, 0, MODF_TOLERANCE, 0},
+{ 40, 3197817016u, 497230814u, 2147483648u, 0u, 3197817016u, 497230814u, 0, MODF_TOLERANCE, 0},
+{ 41, 3216262634u, 2075329122u, 2147483648u, 0u, 3216262634u, 2075329122u, 0, MODF_TOLERANCE, 0},
+{ 42, 3231746400u, 169900577u, 3231746048u, 0u, 3219521698u, 128061440u, 0, MODF_TOLERANCE, 0},
+{ 43, 1049848642u, 541549344u, 0u, 0u, 1049848642u, 541549344u, 0, MODF_TOLERANCE, 0},
+{ 44, 1096608669u, 3119070100u, 1096608669u, 2147483648u, 1072493725u, 3388997632u, 0, MODF_TOLERANCE, 0},
+{ 45, 1085427055u, 567496114u, 1085426944u, 0u, 1071368308u, 3547103232u, 0, MODF_TOLERANCE, 0},
+{ 46, 1045286891u, 1969998540u, 0u, 0u, 1045286891u, 1969998540u, 0, MODF_TOLERANCE, 0},
+{ 47, 1060548195u, 1299369769u, 0u, 0u, 1060548195u, 1299369769u, 0, MODF_TOLERANCE, 0},
+{ 48, 1049342524u, 4167404066u, 0u, 0u, 1049342524u, 4167404066u, 0, MODF_TOLERANCE, 0},
+{ 49, 3208865645u, 3348930841u, 2147483648u, 0u, 3208865645u, 3348930841u, 0, MODF_TOLERANCE, 0},
+{ 50, 1078472138u, 358457347u, 1078460416u, 0u, 1071047946u, 2932867456u, 0, MODF_TOLERANCE, 0},
+{ 51, 1071069297u, 2192461366u, 0u, 0u, 1071069297u, 2192461366u, 0, MODF_TOLERANCE, 0},
+{ 52, 1099527247u, 3184735642u, 1099527247u, 3087007744u, 1072123094u, 1744830464u, 0, MODF_TOLERANCE, 0},
+{ 53, 1052861772u, 331696577u, 0u, 0u, 1052861772u, 331696577u, 0, MODF_TOLERANCE, 0},
+{ 54, 3189610016u, 793242270u, 2147483648u, 0u, 3189610016u, 793242270u, 0, MODF_TOLERANCE, 0},
+{ 55, 3252528934u, 2322696981u, 3252528934u, 2319450112u, 3219703178u, 2147483648u, 0, MODF_TOLERANCE, 0},
+{ 56, 1083791358u, 3020766674u, 1083790336u, 0u, 1072690592u, 1777242112u, 0, MODF_TOLERANCE, 0},
+{ 57, 1044902177u, 252085215u, 0u, 0u, 1044902177u, 252085215u, 0, MODF_TOLERANCE, 0},
+{ 58, 3214426435u, 4139068910u, 2147483648u, 0u, 3214426435u, 4139068910u, 0, MODF_TOLERANCE, 0},
+{ 59, 3222505725u, 105589263u, 3222274048u, 0u, 3219933160u, 844714104u, 0, MODF_TOLERANCE, 0},
+{ 60, 1056316170u, 261630827u, 0u, 0u, 1056316170u, 261630827u, 0, MODF_TOLERANCE, 0},
+{ 61, 1107213408u, 428765703u, 1107213408u, 427819008u, 1072489486u, 0u, 0, MODF_TOLERANCE, 0},
+{ 62, 3251828686u, 2009972239u, 3251828686u, 2009071616u, 3217783838u, 0u, 0, MODF_TOLERANCE, 0},
+{ 63, 1098568019u, 3517376586u, 1098568019u, 3489660928u, 1069182596u, 2684354560u, 0, MODF_TOLERANCE, 0},
+{ 64, 3240257920u, 3304487302u, 3240257920u, 0u, 3218644687u, 817889280u, 0, MODF_TOLERANCE, 0},
+{ 65, 3233537912u, 237004814u, 3233537792u, 0u, 3218998152u, 436436992u, 0, MODF_TOLERANCE, 0},
+{ 66, 3237899261u, 3364008659u, 3237899248u, 0u, 3219886341u, 1705377792u, 0, MODF_TOLERANCE, 0},
+{ 67, 3195247552u, 472004928u, 2147483648u, 0u, 3195247552u, 472004928u, 0, MODF_TOLERANCE, 0},
+{ 68, 3226869477u, 1186387580u, 3226861568u, 0u, 3219055942u, 3067509760u, 0, MODF_TOLERANCE, 0},
+{ 69, 1054226850u, 4085763910u, 0u, 0u, 1054226850u, 4085763910u, 0, MODF_TOLERANCE, 0},
+{ 70, 1106394906u, 2684738273u, 1106394906u, 2684354560u, 1071082372u, 0u, 0, MODF_TOLERANCE, 0},
+{ 71, 1057053639u, 2055490142u, 0u, 0u, 1057053639u, 2055490142u, 0, MODF_TOLERANCE, 0},
+{ 72, 3231581370u, 3879040079u, 3231581184u, 0u, 3217513702u, 2928271360u, 0, MODF_TOLERANCE, 0},
+{ 73, 3188976647u, 3725731239u, 2147483648u, 0u, 3188976647u, 3725731239u, 0, MODF_TOLERANCE, 0},
+{ 74, 1061652681u, 591292963u, 0u, 0u, 1061652681u, 591292963u, 0, MODF_TOLERANCE, 0},
+{ 75, 3225014981u, 1147041027u, 3224961024u, 0u, 3219806376u, 2345574496u, 0, MODF_TOLERANCE, 0},
+{ 76, 3215417793u, 624695933u, 2147483648u, 0u, 3215417793u, 624695933u, 0, MODF_TOLERANCE, 0},
+{ 77, 3206052774u, 705725219u, 2147483648u, 0u, 3206052774u, 705725219u, 0, MODF_TOLERANCE, 0},
+{ 78, 3238067573u, 1116238321u, 3238067568u, 0u, 3219458593u, 3351511040u, 0, MODF_TOLERANCE, 0},
+{ 79, 3207367088u, 7287411u, 2147483648u, 0u, 3207367088u, 7287411u, 0, MODF_TOLERANCE, 0},
+{ 80, 1045917232u, 116067742u, 0u, 0u, 1045917232u, 116067742u, 0, MODF_TOLERANCE, 0},
+{ 81, 3240055222u, 3604989074u, 3240055220u, 0u, 3219568382u, 613416960u, 0, MODF_TOLERANCE, 0},
+{ 82, 1066381836u, 545298780u, 0u, 0u, 1066381836u, 545298780u, 0, MODF_TOLERANCE, 0},
+{ 83, 3219080936u, 1681476121u, 2147483648u, 0u, 3219080936u, 1681476121u, 0, MODF_TOLERANCE, 0},
+{ 84, 1060345752u, 3553822398u, 0u, 0u, 1060345752u, 3553822398u, 0, MODF_TOLERANCE, 0},
+{ 85, 1102831658u, 3410480388u, 1102831658u, 3405774848u, 1070723905u, 0u, 0, MODF_TOLERANCE, 0},
+{ 86, 1052460275u, 1660607230u, 0u, 0u, 1052460275u, 1660607230u, 0, MODF_TOLERANCE, 0},
+{ 87, 1089216869u, 1494984673u, 1089216864u, 0u, 1069900910u, 2676228096u, 0, MODF_TOLERANCE, 0},
+{ 88, 3196647153u, 287894723u, 2147483648u, 0u, 3196647153u, 287894723u, 0, MODF_TOLERANCE, 0},
+{ 89, 1054885127u, 644548665u, 0u, 0u, 1054885127u, 644548665u, 0, MODF_TOLERANCE, 0},
+{ 90, 1081948134u, 2442134629u, 1081946112u, 0u, 1071618630u, 1074893824u, 0, MODF_TOLERANCE, 0},
+{ 91, 1087554095u, 2312530895u, 1087554048u, 0u, 1072153835u, 904364032u, 0, MODF_TOLERANCE, 0},
+{ 92, 3221584595u, 3379665576u, 3221225472u, 0u, 3219516239u, 633760416u, 0, MODF_TOLERANCE, 0},
+{ 93, 1096085375u, 3018463866u, 1096085375u, 2147483648u, 1072297229u, 1023410176u, 0, MODF_TOLERANCE, 0},
+{ 94, 1086226574u, 404012923u, 1086226432u, 0u, 1071760130u, 2549047296u, 0, MODF_TOLERANCE, 0},
+{ 95, 1064733299u, 1710279345u, 0u, 0u, 1064733299u, 1710279345u, 0, MODF_TOLERANCE, 0},
+{ 96, 3251401196u, 3528946000u, 3251401196u, 3523215360u, 3219512404u, 0u, 0, MODF_TOLERANCE, 0},
+{ 97, 1061536351u, 2164450219u, 0u, 0u, 1061536351u, 2164450219u, 0, MODF_TOLERANCE, 0},
+{ 98, 1083520023u, 3312018966u, 1083520000u, 0u, 1066911081u, 1712717824u, 0, MODF_TOLERANCE, 0},
+{ 99, 1057248676u, 2648986431u, 0u, 0u, 1057248676u, 2648986431u, 0, MODF_TOLERANCE, 0},
+{ 100, 1050330591u, 1474376550u, 0u, 0u, 1050330591u, 1474376550u, 0, MODF_TOLERANCE, 0},
+{ 101, 3194422028u, 1839068700u, 2147483648u, 0u, 3194422028u, 1839068700u, 0, MODF_TOLERANCE, 0},
+{ 102, 1077406406u, 3013052171u, 1077346304u, 0u, 1072519382u, 1928388960u, 0, MODF_TOLERANCE, 0},
+{ 103, 1046493630u, 772102380u, 0u, 0u, 1046493630u, 772102380u, 0, MODF_TOLERANCE, 0},
+{ 104, 3220729740u, 4219039958u, 3220176896u, 0u, 3219185433u, 4143112620u, 0, MODF_TOLERANCE, 0},
+{ 105, 3229472221u, 3058618779u, 3229470720u, 0u, 3218568921u, 994470912u, 0, MODF_TOLERANCE, 0},
+{ 106, 1046304788u, 3338676024u, 0u, 0u, 1046304788u, 3338676024u, 0, MODF_TOLERANCE, 0},
+{ 107, 1051172137u, 506286854u, 0u, 0u, 1051172137u, 506286854u, 0, MODF_TOLERANCE, 0},
+{ 108, 1094907481u, 2217000199u, 1094907481u, 2147483648u, 1067487988u, 469762048u, 0, MODF_TOLERANCE, 0},
+{ 109, 1082428310u, 1147428263u, 1082427392u, 0u, 1071428131u, 585971712u, 0, MODF_TOLERANCE, 0},
+{ 110, 1065432625u, 3034786717u, 0u, 0u, 1065432625u, 3034786717u, 0, MODF_TOLERANCE, 0},
+{ 111, 1082016752u, 2844125311u, 1082015744u, 0u, 1070564684u, 792983552u, 0, MODF_TOLERANCE, 0},
+{ 112, 1082985198u, 2561492677u, 1082984448u, 0u, 1071084741u, 1781934080u, 0, MODF_TOLERANCE, 0},
+{ 113, 3211536916u, 704542600u, 2147483648u, 0u, 3211536916u, 704542600u, 0, MODF_TOLERANCE, 0},
+{ 114, 3222902057u, 2762779203u, 3222798336u, 0u, 3218690714u, 1254794288u, 0, MODF_TOLERANCE, 0},
+{ 115, 3199680614u, 184131949u, 2147483648u, 0u, 3199680614u, 184131949u, 0, MODF_TOLERANCE, 0},
+{ 116, 3249723525u, 1667366082u, 3249723525u, 1660944384u, 3218636592u, 2147483648u, 0, MODF_TOLERANCE, 0},
+{ 117, 3223609598u, 3904224140u, 3223584768u, 0u, 3217571770u, 762241792u, 0, MODF_TOLERANCE, 0},
+{ 118, 1067056698u, 2942159914u, 0u, 0u, 1067056698u, 2942159914u, 0, MODF_TOLERANCE, 0},
+{ 119, 1100636863u, 426114282u, 1100636863u, 402653184u, 1071013838u, 2684354560u, 0, MODF_TOLERANCE, 0},
+{ 120, 3209056785u, 1083606355u, 2147483648u, 0u, 3209056785u, 1083606355u, 0, MODF_TOLERANCE, 0},
+{ 121, 1106165945u, 3774123863u, 1106165945u, 3772776448u, 1071943511u, 0u, 0, MODF_TOLERANCE, 0},
+{ 122, 1106787580u, 2722107965u, 1106787580u, 2722103296u, 1064451328u, 0u, 0, MODF_TOLERANCE, 0},
+{ 123, 1088005092u, 1377734762u, 1088005056u, 0u, 1071786255u, 1211432960u, 0, MODF_TOLERANCE, 0},
+{ 124, 1104232051u, 2377063483u, 1104232051u, 2373976064u, 1072139805u, 2147483648u, 0, MODF_TOLERANCE, 0},
+{ 125, 1069380559u, 1029739074u, 0u, 0u, 1069380559u, 1029739074u, 0, MODF_TOLERANCE, 0},
+{ 126, 1105467109u, 3062201018u, 1105467109u, 3061841920u, 1069935336u, 0u, 0, MODF_TOLERANCE, 0},
+{ 127, 3234741597u, 773857656u, 3234741504u, 0u, 3219606408u, 140378112u, 0, MODF_TOLERANCE, 0},
+{ 128, 3214251949u, 335833884u, 2147483648u, 0u, 3214251949u, 335833884u, 0, MODF_TOLERANCE, 0},
+{ 129, 3203224610u, 1473865960u, 2147483648u, 0u, 3203224610u, 1473865960u, 0, MODF_TOLERANCE, 0},
+{ 130, 1103073830u, 4000427507u, 1103073830u, 3992977408u, 1071410044u, 3221225472u, 0, MODF_TOLERANCE, 0},
+{ 131, 1103185231u, 4242092620u, 1103185231u, 4236247040u, 1072057491u, 0u, 0, MODF_TOLERANCE, 0},
+{ 132, 1067009473u, 14539161u, 0u, 0u, 1067009473u, 14539161u, 0, MODF_TOLERANCE, 0},
+{ 133, 3192516074u, 1732245037u, 2147483648u, 0u, 3192516074u, 1732245037u, 0, MODF_TOLERANCE, 0},
+{ 134, 1101371955u, 1533536108u, 1101371955u, 1509949440u, 1072070262u, 3221225472u, 0, MODF_TOLERANCE, 0},
+{ 135, 3249153995u, 1833841275u, 3249153995u, 1811939328u, 3219448615u, 2952790016u, 0, MODF_TOLERANCE, 0},
+{ 136, 1099430098u, 4144145552u, 1099430098u, 4026531840u, 1072433810u, 1073741824u, 0, MODF_TOLERANCE, 0},
+{ 137, 3244270463u, 935007012u, 3244270463u, 0u, 3219905929u, 2449473536u, 0, MODF_TOLERANCE, 0},
+{ 138, 3188865420u, 604442938u, 2147483648u, 0u, 3188865420u, 604442938u, 0, MODF_TOLERANCE, 0},
+{ 139, 3206903253u, 2211464602u, 2147483648u, 0u, 3206903253u, 2211464602u, 0, MODF_TOLERANCE, 0},
+{ 140, 1046255144u, 1635910526u, 0u, 0u, 1046255144u, 1635910526u, 0, MODF_TOLERANCE, 0},
+{ 141, 1077871417u, 2549219008u, 1077870592u, 0u, 1065995455u, 2415263744u, 0, MODF_TOLERANCE, 0},
+{ 142, 3231633258u, 3733639385u, 3231632384u, 0u, 3219871476u, 1451673600u, 0, MODF_TOLERANCE, 0},
+{ 143, 1082095089u, 1819374372u, 1082093568u, 0u, 1071105457u, 3318517760u, 0, MODF_TOLERANCE, 0},
+{ 144, 3202219056u, 2617077637u, 2147483648u, 0u, 3202219056u, 2617077637u, 0, MODF_TOLERANCE, 0},
+{ 145, 1094345280u, 546465680u, 1094345280u, 0u, 1069566259u, 3355443200u, 0, MODF_TOLERANCE, 0},
+{ 146, 1048653554u, 532401530u, 0u, 0u, 1048653554u, 532401530u, 0, MODF_TOLERANCE, 0},
+{ 147, 1044571091u, 2759019783u, 0u, 0u, 1044571091u, 2759019783u, 0, MODF_TOLERANCE, 0},
+{ 148, 3221570188u, 3554409630u, 3221225472u, 0u, 3219458611u, 1332736632u, 0, MODF_TOLERANCE, 0},
+{ 149, 3212931282u, 2527221960u, 2147483648u, 0u, 3212931282u, 2527221960u, 0, MODF_TOLERANCE, 0},
+{ 150, 1099107978u, 2696971136u, 1099107978u, 2684354560u, 1069027440u, 0u, 0, MODF_TOLERANCE, 0},
+{ 151, 1097158000u, 173134582u, 1097158000u, 0u, 1070900133u, 3959422976u, 0, MODF_TOLERANCE, 0},
+{ 152, 1087299442u, 2877794600u, 1087299328u, 0u, 1072474849u, 3930718208u, 0, MODF_TOLERANCE, 0},
+{ 153, 1086400474u, 547642046u, 1086400384u, 0u, 1072072745u, 380600320u, 0, MODF_TOLERANCE, 0},
+{ 154, 3197285510u, 3521286127u, 2147483648u, 0u, 3197285510u, 3521286127u, 0, MODF_TOLERANCE, 0},
+{ 155, 1074860702u, 1231582831u, 1074790400u, 0u, 1070672356u, 2525456112u, 0, MODF_TOLERANCE, 0},
+{ 156, 1090971734u, 1653446832u, 1090971728u, 0u, 1072269878u, 1656750080u, 0, MODF_TOLERANCE, 0},
+{ 157, 1061342535u, 3762182190u, 0u, 0u, 1061342535u, 3762182190u, 0, MODF_TOLERANCE, 0},
+{ 158, 3252967851u, 2615360375u, 3252967851u, 2615148544u, 3216628664u, 0u, 0, MODF_TOLERANCE, 0},
+{ 159, 3200834423u, 2588067350u, 2147483648u, 0u, 3200834423u, 2588067350u, 0, MODF_TOLERANCE, 0},
+{ 160, 3206610957u, 3551059728u, 2147483648u, 0u, 3206610957u, 3551059728u, 0, MODF_TOLERANCE, 0},
+{ 161, 3206978856u, 845263327u, 2147483648u, 0u, 3206978856u, 845263327u, 0, MODF_TOLERANCE, 0},
+{ 162, 1073415902u, 1749010288u, 1072693248u, 0u, 1072041404u, 3498020576u, 0, MODF_TOLERANCE, 0},
+{ 163, 3205576370u, 3092685191u, 2147483648u, 0u, 3205576370u, 3092685191u, 0, MODF_TOLERANCE, 0},
+{ 164, 3190678390u, 2872219490u, 2147483648u, 0u, 3190678390u, 2872219490u, 0, MODF_TOLERANCE, 0},
+{ 165, 3218315055u, 4107255722u, 2147483648u, 0u, 3218315055u, 4107255722u, 0, MODF_TOLERANCE, 0},
+{ 166, 3205337291u, 3069068345u, 2147483648u, 0u, 3205337291u, 3069068345u, 0, MODF_TOLERANCE, 0},
+{ 167, 3243990857u, 2294867524u, 3243990857u, 2147483648u, 3217134028u, 2281701376u, 0, MODF_TOLERANCE, 0},
+{ 168, 3216653996u, 2860384670u, 2147483648u, 0u, 3216653996u, 2860384670u, 0, MODF_TOLERANCE, 0},
+{ 169, 3193326350u, 2265437201u, 2147483648u, 0u, 3193326350u, 2265437201u, 0, MODF_TOLERANCE, 0},
+{ 170, 3240198679u, 1234948614u, 3240198678u, 0u, 3219429821u, 543162368u, 0, MODF_TOLERANCE, 0},
+{ 171, 3216359929u, 1186945904u, 2147483648u, 0u, 3216359929u, 1186945904u, 0, MODF_TOLERANCE, 0},
+{ 172, 3251167793u, 1896750851u, 3251167793u, 1895825408u, 3216784902u, 0u, 0, MODF_TOLERANCE, 0},
+{ 173, 1081575478u, 3686084548u, 1081573376u, 0u, 1071672759u, 1784645632u, 0, MODF_TOLERANCE, 0},
+{ 174, 1079286273u, 3309277689u, 1079279616u, 0u, 1071251909u, 1066531072u, 0, MODF_TOLERANCE, 0},
+{ 175, 3223476240u, 3006860614u, 3223453696u, 0u, 3217425452u, 3460518272u, 0, MODF_TOLERANCE, 0},
+{ 176, 3231412671u, 2504194724u, 3231412224u, 0u, 3218864468u, 799686656u, 0, MODF_TOLERANCE, 0},
+{ 177, 3236149260u, 1948717780u, 3236149248u, 0u, 3218663502u, 631767040u, 0, MODF_TOLERANCE, 0},
+{ 178, 1048317852u, 3791803982u, 0u, 0u, 1048317852u, 3791803982u, 0, MODF_TOLERANCE, 0},
+{ 179, 1064345015u, 4272034420u, 0u, 0u, 1064345015u, 4272034420u, 0, MODF_TOLERANCE, 0},
+{ 180, 3192982124u, 1526175922u, 2147483648u, 0u, 3192982124u, 1526175922u, 0, MODF_TOLERANCE, 0},
+{ 181, 3245817826u, 4108948538u, 3245817826u, 4026531840u, 3218318928u, 3892314112u, 0, MODF_TOLERANCE, 0},
+{ 182, 1104691287u, 640541190u, 1104691287u, 637534208u, 1072099587u, 0u, 0, MODF_TOLERANCE, 0},
+{ 183, 3207257417u, 3259274853u, 2147483648u, 0u, 3207257417u, 3259274853u, 0, MODF_TOLERANCE, 0},
+{ 184, 1082507103u, 3677038020u, 1082505216u, 0u, 1072529260u, 2895581184u, 0, MODF_TOLERANCE, 0},
+{ 185, 1083132498u, 3781708548u, 1083131904u, 0u, 1070765835u, 1113071616u, 0, MODF_TOLERANCE, 0},
+{ 186, 1096584871u, 1207386447u, 1096584871u, 1073741824u, 1069538565u, 1006632960u, 0, MODF_TOLERANCE, 0},
+{ 187, 3188695272u, 3011191657u, 2147483648u, 0u, 3188695272u, 3011191657u, 0, MODF_TOLERANCE, 0},
+{ 188, 1103798670u, 1096124830u, 1103798670u, 1090519040u, 1071997543u, 2147483648u, 0, MODF_TOLERANCE, 0},
+{ 189, 1063235023u, 2540404725u, 0u, 0u, 1063235023u, 2540404725u, 0, MODF_TOLERANCE, 0},
+{ 190, 3240157452u, 4122845725u, 3240157452u, 0u, 3219044276u, 1134559232u, 0, MODF_TOLERANCE, 0},
+{ 191, 1083643710u, 311336721u, 1083642880u, 0u, 1072296084u, 1962444800u, 0, MODF_TOLERANCE, 0},
+{ 192, 3214382367u, 4212533768u, 2147483648u, 0u, 3214382367u, 4212533768u, 0, MODF_TOLERANCE, 0},
+{ 193, 1051139427u, 1769686293u, 0u, 0u, 1051139427u, 1769686293u, 0, MODF_TOLERANCE, 0},
+{ 194, 3240200923u, 3538602249u, 3240200922u, 0u, 3219992236u, 2425356288u, 0, MODF_TOLERANCE, 0},
+{ 195, 1078227549u, 508056696u, 1078198272u, 0u, 1072469831u, 2450857472u, 0, MODF_TOLERANCE, 0},
+{ 196, 1103793878u, 776520138u, 1103793878u, 771751936u, 1071788146u, 2147483648u, 0, MODF_TOLERANCE, 0},
+{ 197, 1102910577u, 4064962760u, 1102910577u, 4060086272u, 1070766642u, 0u, 0, MODF_TOLERANCE, 0},
+{ 198, 1077424413u, 819766631u, 1077411840u, 0u, 1070108312u, 1850913664u, 0, MODF_TOLERANCE, 0},
+{ 199, 1074178362u, 2112385259u, 1073741824u, 0u, 1072342249u, 4154573740u, 0, MODF_TOLERANCE, 0},
+{ 200, 3227593179u, 1187058516u, 3227590656u, 0u, 3218323085u, 2183571456u, 0, MODF_TOLERANCE, 0},
+{ 201, 1082295059u, 2514398118u, 1082294272u, 0u, 1071160494u, 4116525056u, 0, MODF_TOLERANCE, 0},
+{ 202, 1076579751u, 870169764u, 1076494336u, 0u, 1071962739u, 1037814336u, 0, MODF_TOLERANCE, 0},
+{ 203, 3246851392u, 1190259653u, 3246851392u, 1073741824u, 3219900335u, 335544320u, 0, MODF_TOLERANCE, 0},
+{ 204, 1069112254u, 3417249840u, 0u, 0u, 1069112254u, 3417249840u, 0, MODF_TOLERANCE, 0},
+{ 205, 3193663083u, 3467757357u, 2147483648u, 0u, 3193663083u, 3467757357u, 0, MODF_TOLERANCE, 0},
+{ 206, 3215075200u, 2168175352u, 2147483648u, 0u, 3215075200u, 2168175352u, 0, MODF_TOLERANCE, 0},
+{ 207, 3239643135u, 1508888184u, 3239643132u, 0u, 3219836798u, 1941962752u, 0, MODF_TOLERANCE, 0},
+{ 208, 1060430241u, 3524949092u, 0u, 0u, 1060430241u, 3524949092u, 0, MODF_TOLERANCE, 0},
+{ 209, 3197412883u, 166402802u, 2147483648u, 0u, 3197412883u, 166402802u, 0, MODF_TOLERANCE, 0},
+{ 210, 3237198975u, 3572369260u, 3237198960u, 0u, 3220154844u, 249036800u, 0, MODF_TOLERANCE, 0},
+{ 211, 1081866822u, 2441536203u, 1081864192u, 0u, 1071942947u, 231052800u, 0, MODF_TOLERANCE, 0},
+{ 212, 3202753937u, 3658194573u, 2147483648u, 0u, 3202753937u, 3658194573u, 0, MODF_TOLERANCE, 0},
+{ 213, 1062392908u, 2479742828u, 0u, 0u, 1062392908u, 2479742828u, 0, MODF_TOLERANCE, 0},
+{ 214, 1062342831u, 4214154303u, 0u, 0u, 1062342831u, 4214154303u, 0, MODF_TOLERANCE, 0},
+{ 215, 1082396794u, 426896765u, 1082396672u, 0u, 1068402268u, 2069839872u, 0, MODF_TOLERANCE, 0},
+{ 216, 1066474375u, 2201754442u, 0u, 0u, 1066474375u, 2201754442u, 0, MODF_TOLERANCE, 0},
+{ 217, 3195629021u, 2055773734u, 2147483648u, 0u, 3195629021u, 2055773734u, 0, MODF_TOLERANCE, 0},
+{ 218, 3239267288u, 291396537u, 3239267288u, 0u, 3213975131u, 3103784960u, 0, MODF_TOLERANCE, 0},
+{ 219, 3236968033u, 874125203u, 3236968032u, 0u, 3216196001u, 2033188864u, 0, MODF_TOLERANCE, 0},
+{ 220, 3210508124u, 4091098764u, 2147483648u, 0u, 3210508124u, 4091098764u, 0, MODF_TOLERANCE, 0},
+{ 221, 1065716026u, 120488169u, 0u, 0u, 1065716026u, 120488169u, 0, MODF_TOLERANCE, 0},
+{ 222, 3241241441u, 1985269424u, 3241241441u, 0u, 3218969907u, 2885681152u, 0, MODF_TOLERANCE, 0},
+{ 223, 3206539410u, 2243036871u, 2147483648u, 0u, 3206539410u, 2243036871u, 0, MODF_TOLERANCE, 0},
+{ 224, 3243941101u, 740033495u, 3243941101u, 0u, 3219525121u, 3951034368u, 0, MODF_TOLERANCE, 0},
+{ 225, 3209424906u, 1176656356u, 2147483648u, 0u, 3209424906u, 1176656356u, 0, MODF_TOLERANCE, 0},
+{ 226, 1074261978u, 3588756231u, 1073741824u, 0u, 1072676715u, 1470123036u, 0, MODF_TOLERANCE, 0},
+{ 227, 3252816791u, 3037249392u, 3252816791u, 3036676096u, 3218177760u, 0u, 0, MODF_TOLERANCE, 0},
+{ 228, 1061635587u, 1173102190u, 0u, 0u, 1061635587u, 1173102190u, 0, MODF_TOLERANCE, 0},
+{ 229, 3237209581u, 2882725208u, 3237209568u, 0u, 3219871653u, 3400531968u, 0, MODF_TOLERANCE, 0},
+{ 230, 1071440059u, 69225090u, 0u, 0u, 1071440059u, 69225090u, 0, MODF_TOLERANCE, 0},
+{ 231, 3212663474u, 272319256u, 2147483648u, 0u, 3212663474u, 272319256u, 0, MODF_TOLERANCE, 0},
+{ 232, 1072073912u, 2493997123u, 0u, 0u, 1072073912u, 2493997123u, 0, MODF_TOLERANCE, 0},
+{ 233, 1057720186u, 188610379u, 0u, 0u, 1057720186u, 188610379u, 0, MODF_TOLERANCE, 0},
+{ 234, 3232757923u, 2209647371u, 3232757760u, 0u, 3218370678u, 2439077888u, 0, MODF_TOLERANCE, 0},
+{ 235, 3236758517u, 1990439193u, 3236758496u, 0u, 3219486371u, 2971205632u, 0, MODF_TOLERANCE, 0},
+{ 236, 1078073146u, 622849962u, 1078067200u, 0u, 1070021157u, 535800320u, 0, MODF_TOLERANCE, 0},
+{ 237, 1057135741u, 756052458u, 0u, 0u, 1057135741u, 756052458u, 0, MODF_TOLERANCE, 0},
+{ 238, 1081649113u, 2247475162u, 1081647104u, 0u, 1071605271u, 3607062528u, 0, MODF_TOLERANCE, 0},
+{ 239, 1061623064u, 3878055211u, 0u, 0u, 1061623064u, 3878055211u, 0, MODF_TOLERANCE, 0},
+{ 240, 3222407050u, 2979438623u, 3222274048u, 0u, 3219143765u, 2360672504u, 0, MODF_TOLERANCE, 0},
+{ 241, 3195290997u, 2676398686u, 2147483648u, 0u, 3195290997u, 2676398686u, 0, MODF_TOLERANCE, 0},
+{ 242, 1105124431u, 3631096636u, 1105124431u, 3628072960u, 1072107934u, 0u, 0, MODF_TOLERANCE, 0},
+{ 243, 1065079390u, 1697791764u, 0u, 0u, 1065079390u, 1697791764u, 0, MODF_TOLERANCE, 0},
+{ 244, 3198136112u, 2299842819u, 2147483648u, 0u, 3198136112u, 2299842819u, 0, MODF_TOLERANCE, 0},
+{ 245, 1078084768u, 1931502677u, 1078067200u, 0u, 1071720476u, 3357087040u, 0, MODF_TOLERANCE, 0},
+{ 246, 3215264397u, 3016456382u, 2147483648u, 0u, 3215264397u, 3016456382u, 0, MODF_TOLERANCE, 0},
+{ 247, 1072253426u, 343404215u, 0u, 0u, 1072253426u, 343404215u, 0, MODF_TOLERANCE, 0},
+{ 248, 1061072607u, 4266232536u, 0u, 0u, 1061072607u, 4266232536u, 0, MODF_TOLERANCE, 0},
+{ 249, 3241230836u, 4140316002u, 3241230836u, 0u, 3220101382u, 2889875456u, 0, MODF_TOLERANCE, 0},
+{ 250, 1082896196u, 868256971u, 1082894336u, 0u, 1072500943u, 36908032u, 0, MODF_TOLERANCE, 0},
+{ 251, 1075422810u, 1864139509u, 1075314688u, 0u, 1071277478u, 4056428368u, 0, MODF_TOLERANCE, 0},
+{ 252, 3187675097u, 3084482407u, 2147483648u, 0u, 3187675097u, 3084482407u, 0, MODF_TOLERANCE, 0},
+{ 253, 3220191323u, 2427162817u, 3220176896u, 0u, 3213635016u, 1439195264u, 0, MODF_TOLERANCE, 0},
+{ 254, 3234748208u, 2715105792u, 3234748160u, 0u, 3218624746u, 2634022912u, 0, MODF_TOLERANCE, 0},
+{ 255, 1064600512u, 3943389284u, 0u, 0u, 1064600512u, 3943389284u, 0, MODF_TOLERANCE, 0},
+{ 256, 1046724025u, 3626825684u, 0u, 0u, 1046724025u, 3626825684u, 0, MODF_TOLERANCE, 0},
+{ 257, 1045423002u, 967350972u, 0u, 0u, 1045423002u, 967350972u, 0, MODF_TOLERANCE, 0},
+{ 258, 1093012318u, 448002663u, 1093012318u, 0u, 1068151802u, 1728053248u, 0, MODF_TOLERANCE, 0},
+{ 259, 3251845859u, 105058217u, 3251845859u, 104857600u, 3215490376u, 0u, 0, MODF_TOLERANCE, 0},
+{ 260, 1069733884u, 171786224u, 0u, 0u, 1069733884u, 171786224u, 0, MODF_TOLERANCE, 0},
+{ 261, 3189614508u, 2863482262u, 2147483648u, 0u, 3189614508u, 2863482262u, 0, MODF_TOLERANCE, 0},
+{ 262, 3204997271u, 877784425u, 2147483648u, 0u, 3204997271u, 877784425u, 0, MODF_TOLERANCE, 0},
+{ 263, 3202629313u, 2801782962u, 2147483648u, 0u, 3202629313u, 2801782962u, 0, MODF_TOLERANCE, 0},
+{ 264, 3213604117u, 762347195u, 2147483648u, 0u, 3213604117u, 762347195u, 0, MODF_TOLERANCE, 0},
+{ 265, 3233486727u, 2317950339u, 3233486592u, 0u, 3219190085u, 598761472u, 0, MODF_TOLERANCE, 0},
+{ 266, 3246333414u, 2135700283u, 3246333414u, 1879048192u, 3220084838u, 1979711488u, 0, MODF_TOLERANCE, 0},
+{ 267, 1056516397u, 4171919805u, 0u, 0u, 1056516397u, 4171919805u, 0, MODF_TOLERANCE, 0},
+{ 268, 1082858682u, 2180920863u, 1082857472u, 0u, 1071835655u, 4174937088u, 0, MODF_TOLERANCE, 0},
+{ 269, 3220149084u, 1918836931u, 2147483648u, 0u, 3220149084u, 1918836931u, 0, MODF_TOLERANCE, 0},
+{ 270, 1083603224u, 3137821660u, 1083602944u, 0u, 1070697392u, 1975369728u, 0, MODF_TOLERANCE, 0},
+{ 271, 1103902874u, 3456203663u, 1103902874u, 3456106496u, 1065859312u, 0u, 0, MODF_TOLERANCE, 0},
+{ 272, 3235600523u, 2335688936u, 3235600512u, 0u, 3217495663u, 2446327808u, 0, MODF_TOLERANCE, 0},
+{ 273, 1042279322u, 4170235262u, 0u, 0u, 1042279322u, 4170235262u, 0, MODF_TOLERANCE, 0},
+{ 274, 1051824459u, 521583737u, 0u, 0u, 1051824459u, 521583737u, 0, MODF_TOLERANCE, 0},
+{ 275, 1081348303u, 1296623194u, 1081348096u, 0u, 1068100009u, 483082240u, 0, MODF_TOLERANCE, 0},
+{ 276, 3250673860u, 2442872540u, 3250673860u, 2441084928u, 3217770204u, 0u, 0, MODF_TOLERANCE, 0},
+{ 277, 1061684277u, 289979405u, 0u, 0u, 1061684277u, 289979405u, 0, MODF_TOLERANCE, 0},
+{ 278, 1049514449u, 3865737145u, 0u, 0u, 1049514449u, 3865737145u, 0, MODF_TOLERANCE, 0},
+{ 279, 1075298944u, 3699090239u, 1075052544u, 0u, 1072567302u, 3822918136u, 0, MODF_TOLERANCE, 0},
+{ 280, 1054539840u, 3259249360u, 0u, 0u, 1054539840u, 3259249360u, 0, MODF_TOLERANCE, 0},
+{ 281, 1096418100u, 1619819023u, 1096418100u, 1073741824u, 1071662653u, 125829120u, 0, MODF_TOLERANCE, 0},
+{ 282, 1045993352u, 1022642459u, 0u, 0u, 1045993352u, 1022642459u, 0, MODF_TOLERANCE, 0},
+{ 283, 1081433004u, 19455098u, 1081430016u, 0u, 1072125954u, 1371075584u, 0, MODF_TOLERANCE, 0},
+{ 284, 3229182089u, 2096003654u, 3229179904u, 0u, 3219198713u, 3707014144u, 0, MODF_TOLERANCE, 0},
+{ 285, 1076297936u, 3803689997u, 1076232192u, 0u, 1071648014u, 729497808u, 0, MODF_TOLERANCE, 0},
+{ 286, 1071630912u, 2263729518u, 0u, 0u, 1071630912u, 2263729518u, 0, MODF_TOLERANCE, 0},
+{ 287, 1101357261u, 2816837387u, 1101357261u, 2785017856u, 1072584816u, 2952790016u, 0, MODF_TOLERANCE, 0},
+{ 288, 1063422305u, 2597606398u, 0u, 0u, 1063422305u, 2597606398u, 0, MODF_TOLERANCE, 0},
+{ 289, 1069100169u, 3680967506u, 0u, 0u, 1069100169u, 3680967506u, 0, MODF_TOLERANCE, 0},
+{ 290, 1040201163u, 179224723u, 0u, 0u, 1040201163u, 179224723u, 0, MODF_TOLERANCE, 0},
+{ 291, 3188629767u, 978126928u, 2147483648u, 0u, 3188629767u, 978126928u, 0, MODF_TOLERANCE, 0},
+{ 292, 1101553990u, 4047893399u, 1101553990u, 4026531840u, 1071931193u, 1879048192u, 0, MODF_TOLERANCE, 0},
+{ 293, 3222322045u, 4059818629u, 3222274048u, 0u, 3217518526u, 1065177248u, 0, MODF_TOLERANCE, 0},
+{ 294, 1042678728u, 3640293589u, 0u, 0u, 1042678728u, 3640293589u, 0, MODF_TOLERANCE, 0},
+{ 295, 3248464040u, 3383497159u, 3248464040u, 3355443200u, 3218784540u, 1879048192u, 0, MODF_TOLERANCE, 0},
+{ 296, 1070002807u, 1527313008u, 0u, 0u, 1070002807u, 1527313008u, 0, MODF_TOLERANCE, 0},
+{ 297, 3202707679u, 2599946514u, 2147483648u, 0u, 3202707679u, 2599946514u, 0, MODF_TOLERANCE, 0},
+{ 298, 1104170406u, 2738675352u, 1104170406u, 2734686208u, 1072590668u, 0u, 0, MODF_TOLERANCE, 0},
+{ 299, 1105232623u, 3616571377u, 1105232623u, 3615490048u, 1071677425u, 0u, 0, MODF_TOLERANCE, 0},
+{ 300, 1060859316u, 1130603218u, 0u, 0u, 1060859316u, 1130603218u, 0, MODF_TOLERANCE, 0},
+{ 301, 1076028796u, 3859211180u, 1075970048u, 0u, 1071427484u, 3235673472u, 0, MODF_TOLERANCE, 0},
+{ 302, 1067940450u, 1744531824u, 0u, 0u, 1067940450u, 1744531824u, 0, MODF_TOLERANCE, 0},
+{ 303, 1042831340u, 1958025850u, 0u, 0u, 1042831340u, 1958025850u, 0, MODF_TOLERANCE, 0},
+{ 304, 3236511256u, 2472176453u, 3236511232u, 0u, 3219690330u, 1799684096u, 0, MODF_TOLERANCE, 0},
+{ 305, 3233107089u, 182132862u, 3233106944u, 0u, 3219267931u, 1678753792u, 0, MODF_TOLERANCE, 0},
+{ 306, 3250520938u, 3924356991u, 3250520938u, 3909091328u, 3219987951u, 3758096384u, 0, MODF_TOLERANCE, 0},
+{ 307, 3230501884u, 35632886u, 3230500864u, 0u, 3219120144u, 4256673792u, 0, MODF_TOLERANCE, 0},
+{ 308, 3209806504u, 1453402523u, 2147483648u, 0u, 3209806504u, 1453402523u, 0, MODF_TOLERANCE, 0},
+{ 309, 1083522102u, 743225214u, 1083522048u, 0u, 1068176934u, 1539244032u, 0, MODF_TOLERANCE, 0},
+{ 310, 3202890678u, 142917400u, 2147483648u, 0u, 3202890678u, 142917400u, 0, MODF_TOLERANCE, 0},
+{ 311, 1080684976u, 1472665012u, 1080680448u, 0u, 1071755351u, 3340088320u, 0, MODF_TOLERANCE, 0},
+{ 312, 3203138231u, 256588219u, 2147483648u, 0u, 3203138231u, 256588219u, 0, MODF_TOLERANCE, 0},
+{ 313, 1094982162u, 1062927000u, 1094982162u, 0u, 1071623549u, 1275068416u, 0, MODF_TOLERANCE, 0},
+{ 314, 1061134072u, 931677439u, 0u, 0u, 1061134072u, 931677439u, 0, MODF_TOLERANCE, 0},
+{ 315, 1058377732u, 2320910576u, 0u, 0u, 1058377732u, 2320910576u, 0, MODF_TOLERANCE, 0},
+{ 316, 1055663370u, 288059864u, 0u, 0u, 1055663370u, 288059864u, 0, MODF_TOLERANCE, 0},
+{ 317, 1078958093u, 1448349062u, 1078951936u, 0u, 1070075222u, 1410172416u, 0, MODF_TOLERANCE, 0},
+{ 318, 3199478070u, 3454027134u, 2147483648u, 0u, 3199478070u, 3454027134u, 0, MODF_TOLERANCE, 0},
+{ 319, 3237458798u, 4215445172u, 3237458784u, 0u, 3220043397u, 761790464u, 0, MODF_TOLERANCE, 0},
+{ 320, 3196654963u, 2231888973u, 2147483648u, 0u, 3196654963u, 2231888973u, 0, MODF_TOLERANCE, 0},
+{ 321, 3246632231u, 40413554u, 3246632231u, 0u, 3218294091u, 2415919104u, 0, MODF_TOLERANCE, 0},
+{ 322, 3232578253u, 983832844u, 3232578048u, 0u, 3218712404u, 2200010752u, 0, MODF_TOLERANCE, 0},
+{ 323, 3223721534u, 3995725873u, 3223715840u, 0u, 3215343342u, 703607040u, 0, MODF_TOLERANCE, 0},
+{ 324, 1050082319u, 777231627u, 0u, 0u, 1050082319u, 777231627u, 0, MODF_TOLERANCE, 0},
+{ 325, 1040986626u, 672789828u, 0u, 0u, 1040986626u, 672789828u, 0, MODF_TOLERANCE, 0},
+{ 326, 3253385962u, 2982787335u, 3253385962u, 2982150144u, 3218305550u, 0u, 0, MODF_TOLERANCE, 0},
+{ 327, 1068390875u, 2075971825u, 0u, 0u, 1068390875u, 2075971825u, 0, MODF_TOLERANCE, 0},
+{ 328, 1070166500u, 4034633931u, 0u, 0u, 1070166500u, 4034633931u, 0, MODF_TOLERANCE, 0},
+{ 329, 3210046177u, 1018222907u, 2147483648u, 0u, 3210046177u, 1018222907u, 0, MODF_TOLERANCE, 0},
+{ 330, 3244621407u, 3090050495u, 3244621407u, 2684354560u, 3219664493u, 3204448256u, 0, MODF_TOLERANCE, 0},
+{ 331, 1067680885u, 937732557u, 0u, 0u, 1067680885u, 937732557u, 0, MODF_TOLERANCE, 0},
+{ 332, 3200798890u, 2557898276u, 2147483648u, 0u, 3200798890u, 2557898276u, 0, MODF_TOLERANCE, 0},
+{ 333, 1078342316u, 130346162u, 1078329344u, 0u, 1071207939u, 3799406848u, 0, MODF_TOLERANCE, 0},
+{ 334, 3223590310u, 275568693u, 3223584768u, 0u, 3215304208u, 1826108672u, 0, MODF_TOLERANCE, 0},
+{ 335, 1042898869u, 3807416441u, 0u, 0u, 1042898869u, 3807416441u, 0, MODF_TOLERANCE, 0},
+{ 336, 1075961161u, 3706820266u, 1075838976u, 0u, 1072551069u, 3474549408u, 0, MODF_TOLERANCE, 0},
+{ 337, 3216099005u, 1710131411u, 2147483648u, 0u, 3216099005u, 1710131411u, 0, MODF_TOLERANCE, 0},
+{ 338, 1078123323u, 1900790503u, 1078099968u, 0u, 1072090844u, 1391507904u, 0, MODF_TOLERANCE, 0},
+{ 339, 3238819361u, 3420420033u, 3238819360u, 0u, 3217866231u, 2081423360u, 0, MODF_TOLERANCE, 0},
+{ 340, 3210844787u, 588423066u, 2147483648u, 0u, 3210844787u, 588423066u, 0, MODF_TOLERANCE, 0},
+{ 341, 1049684114u, 1160162008u, 0u, 0u, 1049684114u, 1160162008u, 0, MODF_TOLERANCE, 0},
+{ 342, 3246307879u, 4265764460u, 3246307879u, 4026531840u, 3219948748u, 3623878656u, 0, MODF_TOLERANCE, 0},
+{ 343, 1102543434u, 366653268u, 1102543434u, 352321536u, 1072387562u, 2147483648u, 0, MODF_TOLERANCE, 0},
+{ 344, 3188814424u, 466059202u, 2147483648u, 0u, 3188814424u, 466059202u, 0, MODF_TOLERANCE, 0},
+{ 345, 3226627739u, 1325936170u, 3226615808u, 0u, 3219606951u, 2216105216u, 0, MODF_TOLERANCE, 0},
+{ 346, 3221436876u, 680097612u, 3221225472u, 0u, 3218722401u, 1145813600u, 0, MODF_TOLERANCE, 0},
+{ 347, 3240391116u, 1827735934u, 3240391116u, 0u, 3217767490u, 1602224128u, 0, MODF_TOLERANCE, 0},
+{ 348, 3200554324u, 2875599271u, 2147483648u, 0u, 3200554324u, 2875599271u, 0, MODF_TOLERANCE, 0},
+{ 349, 3191030402u, 3117037091u, 2147483648u, 0u, 3191030402u, 3117037091u, 0, MODF_TOLERANCE, 0},
+{ 350, 3239246636u, 15838845u, 3239246636u, 0u, 3209573839u, 2684354560u, 0, MODF_TOLERANCE, 0},
+{ 351, 1051974004u, 749718883u, 0u, 0u, 1051974004u, 749718883u, 0, MODF_TOLERANCE, 0},
+{ 352, 3223587064u, 1523766569u, 3223584768u, 0u, 3214012597u, 2779402752u, 0, MODF_TOLERANCE, 0},
+{ 353, 1044833651u, 1966536294u, 0u, 0u, 1044833651u, 1966536294u, 0, MODF_TOLERANCE, 0},
+{ 354, 3250158026u, 699164258u, 3250158026u, 687865856u, 3219492044u, 1073741824u, 0, MODF_TOLERANCE, 0},
+{ 355, 1098048435u, 3759049394u, 1098048435u, 3758096384u, 1064113508u, 0u, 0, MODF_TOLERANCE, 0},
+{ 356, 1106085272u, 1183789499u, 1106085272u, 1182793728u, 1071539062u, 0u, 0, MODF_TOLERANCE, 0},
+{ 357, 1081201623u, 1970107747u, 1081200640u, 0u, 1070513067u, 1806374912u, 0, MODF_TOLERANCE, 0},
+{ 358, 1095245453u, 2308233883u, 1095245453u, 2147483648u, 1068706229u, 905969664u, 0, MODF_TOLERANCE, 0},
+{ 359, 1084756444u, 1491017852u, 1084755968u, 0u, 1072547213u, 4060594176u, 0, MODF_TOLERANCE, 0},
+{ 360, 1041444355u, 1723375725u, 0u, 0u, 1041444355u, 1723375725u, 0, MODF_TOLERANCE, 0},
+{ 361, 3216630070u, 1141349287u, 2147483648u, 0u, 3216630070u, 1141349287u, 0, MODF_TOLERANCE, 0},
+{ 362, 1097465301u, 3403438584u, 1097465301u, 3221225472u, 1070971059u, 4026531840u, 0, MODF_TOLERANCE, 0},
+{ 363, 3230571908u, 1711085243u, 3230570496u, 0u, 3219526039u, 4099599360u, 0, MODF_TOLERANCE, 0},
+{ 364, 3250239076u, 1377484108u, 3250239076u, 1375731712u, 3216686412u, 0u, 0, MODF_TOLERANCE, 0},
+{ 365, 1098385019u, 2880275004u, 1098385019u, 2684354560u, 1072126724u, 2013265920u, 0, MODF_TOLERANCE, 0},
+{ 366, 1084039594u, 1611394950u, 1084039168u, 0u, 1071293952u, 3203948544u, 0, MODF_TOLERANCE, 0},
+{ 367, 3234221435u, 2626629370u, 3234221312u, 0u, 3220104995u, 3418259456u, 0, MODF_TOLERANCE, 0},
+{ 368, 1063771493u, 1499080813u, 0u, 0u, 1063771493u, 1499080813u, 0, MODF_TOLERANCE, 0},
+{ 369, 1055231263u, 3936262414u, 0u, 0u, 1055231263u, 3936262414u, 0, MODF_TOLERANCE, 0},
+{ 370, 1103919063u, 3175668759u, 1103919063u, 3170893824u, 1071789829u, 3221225472u, 0, MODF_TOLERANCE, 0},
+{ 371, 3207981719u, 1270950554u, 2147483648u, 0u, 3207981719u, 1270950554u, 0, MODF_TOLERANCE, 0},
+{ 372, 3194616071u, 3680565379u, 2147483648u, 0u, 3194616071u, 3680565379u, 0, MODF_TOLERANCE, 0},
+{ 373, 3208148223u, 1066985223u, 2147483648u, 0u, 3208148223u, 1066985223u, 0, MODF_TOLERANCE, 0},
+{ 374, 3221613219u, 4089383168u, 3221225472u, 0u, 3219630735u, 3472630784u, 0, MODF_TOLERANCE, 0},
+{ 375, 3217058839u, 4017329311u, 2147483648u, 0u, 3217058839u, 4017329311u, 0, MODF_TOLERANCE, 0},
+{ 376, 3208334452u, 1667591498u, 2147483648u, 0u, 3208334452u, 1667591498u, 0, MODF_TOLERANCE, 0},
+{ 377, 1088164157u, 3154656624u, 1088164096u, 0u, 1072619012u, 515375104u, 0, MODF_TOLERANCE, 0},
+{ 378, 1061894279u, 3886344038u, 0u, 0u, 1061894279u, 3886344038u, 0, MODF_TOLERANCE, 0},
+{ 379, 1050652945u, 977586119u, 0u, 0u, 1050652945u, 977586119u, 0, MODF_TOLERANCE, 0},
+{ 380, 3209762784u, 953839852u, 2147483648u, 0u, 3209762784u, 953839852u, 0, MODF_TOLERANCE, 0},
+{ 381, 1104965247u, 143071571u, 1104965247u, 142606336u, 1069311308u, 0u, 0, MODF_TOLERANCE, 0},
+{ 382, 3206165386u, 913097445u, 2147483648u, 0u, 3206165386u, 913097445u, 0, MODF_TOLERANCE, 0},
+{ 383, 3190565456u, 1371169579u, 2147483648u, 0u, 3190565456u, 1371169579u, 0, MODF_TOLERANCE, 0},
+{ 384, 1057079837u, 2594818628u, 0u, 0u, 1057079837u, 2594818628u, 0, MODF_TOLERANCE, 0},
+{ 385, 3251793336u, 2259342224u, 3251793336u, 2256535552u, 3219483080u, 0u, 0, MODF_TOLERANCE, 0},
+{ 386, 3217432469u, 1824221478u, 2147483648u, 0u, 3217432469u, 1824221478u, 0, MODF_TOLERANCE, 0},
+{ 387, 3246834775u, 1576604497u, 3246834775u, 1476395008u, 3219645517u, 1140850688u, 0, MODF_TOLERANCE, 0},
+{ 388, 1079368611u, 185078728u, 1079361536u, 0u, 1071358731u, 135514112u, 0, MODF_TOLERANCE, 0},
+{ 389, 3221679427u, 444800035u, 3221225472u, 0u, 3219895564u, 1779200140u, 0, MODF_TOLERANCE, 0},
+{ 390, 3243343143u, 1734989302u, 3243343143u, 1073741824u, 3219371242u, 4211081216u, 0, MODF_TOLERANCE, 0},
+{ 391, 1072748883u, 130452005u, 1072693248u, 0u, 1068182112u, 4174464160u, 0, MODF_TOLERANCE, 0},
+{ 392, 1041548088u, 2158433515u, 0u, 0u, 1041548088u, 2158433515u, 0, MODF_TOLERANCE, 0},
+{ 393, 3234695968u, 1941318385u, 3234695936u, 0u, 3218094555u, 360218624u, 0, MODF_TOLERANCE, 0},
+{ 394, 1045807374u, 792193370u, 0u, 0u, 1045807374u, 792193370u, 0, MODF_TOLERANCE, 0},
+{ 395, 3238299666u, 1299392207u, 3238299664u, 0u, 3218238361u, 913833984u, 0, MODF_TOLERANCE, 0},
+{ 396, 3212131720u, 3205732280u, 2147483648u, 0u, 3212131720u, 3205732280u, 0, MODF_TOLERANCE, 0},
+{ 397, 1098698804u, 3035093505u, 1098698804u, 2952790016u, 1070833512u, 67108864u, 0, MODF_TOLERANCE, 0},
+{ 398, 1052187689u, 3287702190u, 0u, 0u, 1052187689u, 3287702190u, 0, MODF_TOLERANCE, 0},
+{ 399, 3246676260u, 2160225215u, 3246676260u, 2147483648u, 3216526711u, 3758096384u, 0, MODF_TOLERANCE, 0},
+{ 400, 1102624859u, 836655570u, 1102624859u, 822083584u, 1072417594u, 1073741824u, 0, MODF_TOLERANCE, 0},
+{ 401, 1096723626u, 3360816360u, 1096723626u, 3221225472u, 1069589497u, 3489660928u, 0, MODF_TOLERANCE, 0},
+{ 402, 3246176356u, 172860634u, 3246176356u, 0u, 3219430217u, 3019898880u, 0, MODF_TOLERANCE, 0},
+{ 403, 1070995788u, 146831910u, 0u, 0u, 1070995788u, 146831910u, 0, MODF_TOLERANCE, 0},
+{ 404, 1051558014u, 2340722078u, 0u, 0u, 1051558014u, 2340722078u, 0, MODF_TOLERANCE, 0},
+{ 405, 3230416351u, 1603798153u, 3230414848u, 0u, 3219619198u, 1611801600u, 0, MODF_TOLERANCE, 0},
+{ 406, 3207725532u, 1099413093u, 2147483648u, 0u, 3207725532u, 1099413093u, 0, MODF_TOLERANCE, 0},
+{ 407, 3246678378u, 2429340443u, 3246678378u, 2415919104u, 3216611683u, 1610612736u, 0, MODF_TOLERANCE, 0},
+{ 408, 3190303581u, 3223770005u, 2147483648u, 0u, 3190303581u, 3223770005u, 0, MODF_TOLERANCE, 0},
+{ 409, 1075882959u, 955542166u, 1075838976u, 0u, 1070954983u, 512578240u, 0, MODF_TOLERANCE, 0},
+{ 410, 3230415151u, 275583938u, 3230414848u, 0u, 3217223942u, 3510378496u, 0, MODF_TOLERANCE, 0},
+{ 411, 1092971882u, 513397822u, 1092971882u, 0u, 1068407252u, 1040187392u, 0, MODF_TOLERANCE, 0},
+{ 412, 1090646554u, 2089321329u, 1090646552u, 0u, 1070851140u, 461897728u, 0, MODF_TOLERANCE, 0},
+{ 413, 3193169876u, 2782073372u, 2147483648u, 0u, 3193169876u, 2782073372u, 0, MODF_TOLERANCE, 0},
+{ 414, 1046063872u, 4023829068u, 0u, 0u, 1046063872u, 4023829068u, 0, MODF_TOLERANCE, 0},
+{ 415, 1098564822u, 3242223094u, 1098564822u, 3221225472u, 1068762719u, 1610612736u, 0, MODF_TOLERANCE, 0},
+{ 416, 3194111199u, 4264674108u, 2147483648u, 0u, 3194111199u, 4264674108u, 0, MODF_TOLERANCE, 0},
+{ 417, 3238510821u, 3506346169u, 3238510816u, 0u, 3219604474u, 1659109376u, 0, MODF_TOLERANCE, 0},
+{ 418, 1047020885u, 1742757458u, 0u, 0u, 1047020885u, 1742757458u, 0, MODF_TOLERANCE, 0},
+{ 419, 3192664477u, 1265459564u, 2147483648u, 0u, 3192664477u, 1265459564u, 0, MODF_TOLERANCE, 0},
+{ 420, 3193450280u, 3650514880u, 2147483648u, 0u, 3193450280u, 3650514880u, 0, MODF_TOLERANCE, 0},
+{ 421, 1081755890u, 1525260440u, 1081753600u, 0u, 1071768757u, 3544264704u, 0, MODF_TOLERANCE, 0},
+{ 422, 3235452527u, 2612331392u, 3235452480u, 0u, 3219639770u, 2176843776u, 0, MODF_TOLERANCE, 0},
+{ 423, 3248668920u, 1263613754u, 3248668920u, 1241513984u, 3219460979u, 2684354560u, 0, MODF_TOLERANCE, 0},
+{ 424, 3219096387u, 635677201u, 2147483648u, 0u, 3219096387u, 635677201u, 0, MODF_TOLERANCE, 0},
+{ 425, 3206272087u, 4140947288u, 2147483648u, 0u, 3206272087u, 4140947288u, 0, MODF_TOLERANCE, 0},
+{ 426, 3200792376u, 2013265346u, 2147483648u, 0u, 3200792376u, 2013265346u, 0, MODF_TOLERANCE, 0},
+{ 427, 3249974392u, 1912759945u, 3249974392u, 1912602624u, 3213046856u, 0u, 0, MODF_TOLERANCE, 0},
+{ 428, 3237045253u, 1351396825u, 3237045248u, 0u, 3218424370u, 3076784128u, 0, MODF_TOLERANCE, 0},
+{ 429, 3248205162u, 1001433078u, 3248205162u, 939524096u, 3220014399u, 2952790016u, 0, MODF_TOLERANCE, 0},
+{ 430, 3206926643u, 2741676659u, 2147483648u, 0u, 3206926643u, 2741676659u, 0, MODF_TOLERANCE, 0},
+{ 431, 1080923606u, 1088945233u, 1080918016u, 0u, 1072027200u, 3892072704u, 0, MODF_TOLERANCE, 0},
+{ 432, 1085095743u, 3986114865u, 1085095424u, 0u, 1071906521u, 1955794944u, 0, MODF_TOLERANCE, 0},
+{ 433, 3215734057u, 831239754u, 2147483648u, 0u, 3215734057u, 831239754u, 0, MODF_TOLERANCE, 0},
+{ 434, 1099828675u, 3071308141u, 1099828675u, 2952790016u, 1072447941u, 3019898880u, 0, MODF_TOLERANCE, 0},
+{ 435, 3225834497u, 3473592372u, 3225812992u, 0u, 3219456115u, 3266579712u, 0, MODF_TOLERANCE, 0},
+{ 436, 1102759382u, 1309576357u, 1102759382u, 1308622848u, 1068308810u, 0u, 0, MODF_TOLERANCE, 0},
+{ 437, 3251186706u, 2042340367u, 3251186706u, 2038431744u, 3218985479u, 2147483648u, 0, MODF_TOLERANCE, 0},
+{ 438, 1091945628u, 2062772374u, 1091945628u, 0u, 1069464794u, 629145600u, 0, MODF_TOLERANCE, 0},
+{ 439, 3194765687u, 1840632537u, 2147483648u, 0u, 3194765687u, 1840632537u, 0, MODF_TOLERANCE, 0},
+{ 440, 1096533424u, 807510337u, 1096533424u, 0u, 1072173264u, 2692743168u, 0, MODF_TOLERANCE, 0},
+{ 441, 3231451722u, 144814872u, 3231451136u, 0u, 3219279941u, 228114432u, 0, MODF_TOLERANCE, 0},
+{ 442, 3212698915u, 2282965697u, 2147483648u, 0u, 3212698915u, 2282965697u, 0, MODF_TOLERANCE, 0},
+{ 443, 1071236430u, 2552499583u, 0u, 0u, 1071236430u, 2552499583u, 0, MODF_TOLERANCE, 0},
+{ 444, 3229111426u, 1470130815u, 3229110272u, 0u, 3218213214u, 2175400960u, 0, MODF_TOLERANCE, 0},
+{ 445, 3243093065u, 2858583811u, 3243093065u, 2147483648u, 3218420035u, 2172649472u, 0, MODF_TOLERANCE, 0},
+{ 446, 1089760910u, 6360994u, 1089760896u, 0u, 1072431298u, 524550144u, 0, MODF_TOLERANCE, 0},
+{ 447, 3198264929u, 1614537194u, 2147483648u, 0u, 3198264929u, 1614537194u, 0, MODF_TOLERANCE, 0},
+{ 448, 1075198900u, 4088705365u, 1075052544u, 0u, 1071766951u, 2644871848u, 0, MODF_TOLERANCE, 0},
+{ 449, 3250939070u, 3545570051u, 3250939070u, 3539992576u, 3219474112u, 3221225472u, 0, MODF_TOLERANCE, 0},
+{ 450, 1065221325u, 1629217700u, 0u, 0u, 1065221325u, 1629217700u, 0, MODF_TOLERANCE, 0},
+{ 451, 1072744324u, 1813392963u, 1072693248u, 0u, 1068036237u, 2193999968u, 0, MODF_TOLERANCE, 0},
+{ 452, 3235313361u, 3772501596u, 3235313344u, 0u, 3218202843u, 3462135808u, 0, MODF_TOLERANCE, 0},
+{ 453, 3196802686u, 2406734491u, 2147483648u, 0u, 3196802686u, 2406734491u, 0, MODF_TOLERANCE, 0},
+{ 454, 1042055360u, 89226663u, 0u, 0u, 1042055360u, 89226663u, 0, MODF_TOLERANCE, 0},
+{ 455, 3195751081u, 1618759139u, 2147483648u, 0u, 3195751081u, 1618759139u, 0, MODF_TOLERANCE, 0},
+{ 456, 3194723421u, 3888234802u, 2147483648u, 0u, 3194723421u, 3888234802u, 0, MODF_TOLERANCE, 0},
+{ 457, 1055357248u, 3590035633u, 0u, 0u, 1055357248u, 3590035633u, 0, MODF_TOLERANCE, 0},
+{ 458, 3212424262u, 2892456615u, 2147483648u, 0u, 3212424262u, 2892456615u, 0, MODF_TOLERANCE, 0},
+{ 459, 3189943060u, 2431246964u, 2147483648u, 0u, 3189943060u, 2431246964u, 0, MODF_TOLERANCE, 0},
+{ 460, 3241512456u, 183850734u, 3241512456u, 0u, 3215321773u, 3690987520u, 0, MODF_TOLERANCE, 0},
+{ 461, 1089501101u, 3088319870u, 1089501088u, 0u, 1072394280u, 184287232u, 0, MODF_TOLERANCE, 0},
+{ 462, 3211544311u, 862225364u, 2147483648u, 0u, 3211544311u, 862225364u, 0, MODF_TOLERANCE, 0},
+{ 463, 3235294664u, 3495352775u, 3235294656u, 0u, 3217137837u, 3012427776u, 0, MODF_TOLERANCE, 0},
+{ 464, 1058576726u, 596957268u, 0u, 0u, 1058576726u, 596957268u, 0, MODF_TOLERANCE, 0},
+{ 465, 1046553348u, 1839214511u, 0u, 0u, 1046553348u, 1839214511u, 0, MODF_TOLERANCE, 0},
+{ 466, 3205004060u, 1923240983u, 2147483648u, 0u, 3205004060u, 1923240983u, 0, MODF_TOLERANCE, 0},
+{ 467, 1058073864u, 739619702u, 0u, 0u, 1058073864u, 739619702u, 0, MODF_TOLERANCE, 0},
+{ 468, 3223356436u, 2689885273u, 3223322624u, 0u, 3218113172u, 176982816u, 0, MODF_TOLERANCE, 0},
+{ 469, 3200324971u, 2143376228u, 2147483648u, 0u, 3200324971u, 2143376228u, 0, MODF_TOLERANCE, 0},
+{ 470, 1098306332u, 3760236188u, 1098306332u, 3758096384u, 1065374542u, 0u, 0, MODF_TOLERANCE, 0},
+{ 471, 1074621795u, 671680995u, 1074266112u, 0u, 1072018828u, 2686723980u, 0, MODF_TOLERANCE, 0},
+{ 472, 1091262633u, 2315535361u, 1091262632u, 0u, 1070112836u, 1074790400u, 0, MODF_TOLERANCE, 0},
+{ 473, 3214165989u, 2493598049u, 2147483648u, 0u, 3214165989u, 2493598049u, 0, MODF_TOLERANCE, 0},
+{ 474, 3194927008u, 1689107592u, 2147483648u, 0u, 3194927008u, 1689107592u, 0, MODF_TOLERANCE, 0},
+{ 475, 3189989959u, 1578976988u, 2147483648u, 0u, 3189989959u, 1578976988u, 0, MODF_TOLERANCE, 0},
+{ 476, 1066368383u, 2117279163u, 0u, 0u, 1066368383u, 2117279163u, 0, MODF_TOLERANCE, 0},
+{ 477, 3222988111u, 3425290087u, 3222798336u, 0u, 3219597950u, 1632516920u, 0, MODF_TOLERANCE, 0},
+{ 478, 1098487295u, 1263412017u, 1098487295u, 1073741824u, 1072077894u, 1644167168u, 0, MODF_TOLERANCE, 0},
+{ 479, 3208432764u, 3635396812u, 2147483648u, 0u, 3208432764u, 3635396812u, 0, MODF_TOLERANCE, 0},
+{ 480, 1070999426u, 3965655689u, 0u, 0u, 1070999426u, 3965655689u, 0, MODF_TOLERANCE, 0},
+{ 481, 1060196346u, 2183973116u, 0u, 0u, 1060196346u, 2183973116u, 0, MODF_TOLERANCE, 0},
+{ 482, 1101098363u, 1118613350u, 1101098363u, 1107296256u, 1070962156u, 3221225472u, 0, MODF_TOLERANCE, 0},
+{ 483, 3221946089u, 199516350u, 3221749760u, 0u, 3218601800u, 1596130800u, 0, MODF_TOLERANCE, 0},
+{ 484, 1078368488u, 164621458u, 1078362112u, 0u, 1070131209u, 3488387584u, 0, MODF_TOLERANCE, 0},
+{ 485, 3187706018u, 3570940805u, 2147483648u, 0u, 3187706018u, 3570940805u, 0, MODF_TOLERANCE, 0},
+{ 486, 3230316437u, 3596080877u, 3230314496u, 0u, 3220068185u, 1599845376u, 0, MODF_TOLERANCE, 0},
+{ 487, 3208209565u, 980880313u, 2147483648u, 0u, 3208209565u, 980880313u, 0, MODF_TOLERANCE, 0},
+{ 488, 1079833442u, 884465057u, 1079820288u, 0u, 1072279834u, 1542377600u, 0, MODF_TOLERANCE, 0},
+{ 489, 1099977124u, 2558179220u, 1099977124u, 2550136832u, 1069460965u, 0u, 0, MODF_TOLERANCE, 0},
+{ 490, 1052873711u, 1233598120u, 0u, 0u, 1052873711u, 1233598120u, 0, MODF_TOLERANCE, 0},
+{ 491, 1047115221u, 1909994277u, 0u, 0u, 1047115221u, 1909994277u, 0, MODF_TOLERANCE, 0},
+{ 492, 1085015978u, 2991527452u, 1085015552u, 0u, 1072343844u, 4049715200u, 0, MODF_TOLERANCE, 0},
+{ 493, 1060855260u, 1680290941u, 0u, 0u, 1060855260u, 1680290941u, 0, MODF_TOLERANCE, 0},
+{ 494, 1074309900u, 2943870846u, 1074266112u, 0u, 1068851605u, 4009553856u, 0, MODF_TOLERANCE, 0},
+{ 495, 1059496132u, 1451927357u, 0u, 0u, 1059496132u, 1451927357u, 0, MODF_TOLERANCE, 0},
+{ 496, 3228615456u, 1502585517u, 3228614656u, 0u, 3217621708u, 2098554880u, 0, MODF_TOLERANCE, 0},
+{ 497, 3236211951u, 751136990u, 3236211936u, 0u, 3219020170u, 3787194368u, 0, MODF_TOLERANCE, 0},
+{ 498, 3230392165u, 3493275472u, 3230390272u, 0u, 3220019008u, 3701293056u, 0, MODF_TOLERANCE, 0},
+{ 499, 1098365967u, 1209623292u, 1098365967u, 1073741824u, 1071657669u, 4160749568u, 0, MODF_TOLERANCE, 0},
+{ 500, 3238056647u, 979495322u, 3238056640u, 0u, 3219974535u, 2791833600u, 0, MODF_TOLERANCE, 0},
+{ 501, 3250424296u, 1717672108u, 3250424296u, 1711276032u, 3218630187u, 0u, 0, MODF_TOLERANCE, 0},
+{ 502, 1048120593u, 531240316u, 0u, 0u, 1048120593u, 531240316u, 0, MODF_TOLERANCE, 0},
+{ 503, 1054174923u, 3548721654u, 0u, 0u, 1054174923u, 3548721654u, 0, MODF_TOLERANCE, 0},
+{ 504, 1086112947u, 3391817224u, 1086112768u, 0u, 1072068933u, 1623261184u, 0, MODF_TOLERANCE, 0},
+{ 505, 1077836851u, 2758195125u, 1077805056u, 0u, 1071582441u, 430828864u, 0, MODF_TOLERANCE, 0},
+{ 506, 1100880260u, 2028440924u, 1100880260u, 2013265920u, 1070395819u, 2147483648u, 0, MODF_TOLERANCE, 0},
+{ 507, 1084223893u, 2750123373u, 1084223488u, 0u, 1071209022u, 3101085696u, 0, MODF_TOLERANCE, 0},
+{ 508, 3232200256u, 1086294931u, 3232200192u, 0u, 3217035311u, 3806642176u, 0, MODF_TOLERANCE, 0},
+{ 509, 1043958672u, 2986160931u, 0u, 0u, 1043958672u, 2986160931u, 0, MODF_TOLERANCE, 0},
+{ 510, 1076097908u, 2540046258u, 1075970048u, 0u, 1072641865u, 1986034464u, 0, MODF_TOLERANCE, 0},
+{ 511, 3235476602u, 451471221u, 3235476544u, 0u, 3219983732u, 1941602304u, 0, MODF_TOLERANCE, 0},
+{ 512, 1064816262u, 4187644495u, 0u, 0u, 1064816262u, 4187644495u, 0, MODF_TOLERANCE, 0},
+{ 513, 1099460228u, 2439500162u, 1099460228u, 2415919104u, 1069972760u, 536870912u, 0, MODF_TOLERANCE, 0},
+{ 514, 1065280276u, 1979490284u, 0u, 0u, 1065280276u, 1979490284u, 0, MODF_TOLERANCE, 0},
+{ 515, 1040415832u, 2283342035u, 0u, 0u, 1040415832u, 2283342035u, 0, MODF_TOLERANCE, 0},
+{ 516, 1078398157u, 1345997553u, 1078394880u, 0u, 1069128352u, 1955979776u, 0, MODF_TOLERANCE, 0},
+{ 517, 3213249348u, 179066662u, 2147483648u, 0u, 3213249348u, 179066662u, 0, MODF_TOLERANCE, 0},
+{ 518, 1103272172u, 1217337578u, 1103272172u, 1216348160u, 1069429204u, 0u, 0, MODF_TOLERANCE, 0},
+{ 519, 3211562377u, 3779303391u, 2147483648u, 0u, 3211562377u, 3779303391u, 0, MODF_TOLERANCE, 0},
+{ 520, 3210023352u, 3115946280u, 2147483648u, 0u, 3210023352u, 3115946280u, 0, MODF_TOLERANCE, 0},
+{ 521, 3192989874u, 286247089u, 2147483648u, 0u, 3192989874u, 286247089u, 0, MODF_TOLERANCE, 0},
+{ 522, 1085153597u, 713645369u, 1085153280u, 0u, 1071895208u, 2513670144u, 0, MODF_TOLERANCE, 0},
+{ 523, 1093670500u, 1468283899u, 1093670500u, 0u, 1070981390u, 4273995776u, 0, MODF_TOLERANCE, 0},
+{ 524, 1042831668u, 2022736418u, 0u, 0u, 1042831668u, 2022736418u, 0, MODF_TOLERANCE, 0},
+{ 525, 1083139105u, 3305564080u, 1083138048u, 0u, 1071679252u, 463388672u, 0, MODF_TOLERANCE, 0},
+{ 526, 1065483445u, 482392433u, 0u, 0u, 1065483445u, 482392433u, 0, MODF_TOLERANCE, 0},
+{ 527, 3201695807u, 2256346551u, 2147483648u, 0u, 3201695807u, 2256346551u, 0, MODF_TOLERANCE, 0},
+{ 528, 3222430705u, 2071674991u, 3222274048u, 0u, 3219333003u, 3688498040u, 0, MODF_TOLERANCE, 0},
+{ 529, 3204024695u, 2295269094u, 2147483648u, 0u, 3204024695u, 2295269094u, 0, MODF_TOLERANCE, 0},
+{ 530, 1084451053u, 2773103941u, 1084450816u, 0u, 1071494313u, 1185456128u, 0, MODF_TOLERANCE, 0},
+{ 531, 1078173946u, 1482721827u, 1078165504u, 0u, 1070628140u, 809832832u, 0, MODF_TOLERANCE, 0},
+{ 532, 1092243422u, 3125409590u, 1092243420u, 0u, 1072026191u, 3115319296u, 0, MODF_TOLERANCE, 0},
+{ 533, 3221065973u, 1381740563u, 3220176896u, 0u, 3219857898u, 2763481126u, 0, MODF_TOLERANCE, 0},
+{ 534, 1071545057u, 2918235653u, 0u, 0u, 1071545057u, 2918235653u, 0, MODF_TOLERANCE, 0},
+{ 535, 3238715972u, 1105857967u, 3238715968u, 0u, 3219195816u, 918290432u, 0, MODF_TOLERANCE, 0},
+{ 536, 3241990046u, 2703723225u, 3241990046u, 0u, 3219399921u, 1528823808u, 0, MODF_TOLERANCE, 0},
+{ 537, 1043015571u, 174689677u, 0u, 0u, 1043015571u, 174689677u, 0, MODF_TOLERANCE, 0},
+{ 538, 1079333374u, 3947057014u, 1079328768u, 0u, 1070726891u, 1129281024u, 0, MODF_TOLERANCE, 0},
+{ 539, 1090461859u, 2023082423u, 1090461856u, 0u, 1070318766u, 1303904256u, 0, MODF_TOLERANCE, 0},
+{ 540, 3242081486u, 1169047927u, 3242081486u, 0u, 3218172816u, 1572864000u, 0, MODF_TOLERANCE, 0},
+{ 541, 1064525899u, 3742487766u, 0u, 0u, 1064525899u, 3742487766u, 0, MODF_TOLERANCE, 0},
+{ 542, 1043425732u, 194972788u, 0u, 0u, 1043425732u, 194972788u, 0, MODF_TOLERANCE, 0},
+{ 543, 3213791827u, 2136071361u, 2147483648u, 0u, 3213791827u, 2136071361u, 0, MODF_TOLERANCE, 0},
+{ 544, 3211529757u, 993675115u, 2147483648u, 0u, 3211529757u, 993675115u, 0, MODF_TOLERANCE, 0},
+{ 545, 3213663381u, 210772141u, 2147483648u, 0u, 3213663381u, 210772141u, 0, MODF_TOLERANCE, 0},
+{ 546, 3241441539u, 580731413u, 3241441539u, 0u, 3217116833u, 176160768u, 0, MODF_TOLERANCE, 0},
+{ 547, 1093840413u, 1751560711u, 1093840413u, 0u, 1071258028u, 2176843776u, 0, MODF_TOLERANCE, 0},
+{ 548, 1074522705u, 180987057u, 1074266112u, 0u, 1071600264u, 1447896456u, 0, MODF_TOLERANCE, 0},
+{ 549, 1066754591u, 2552236599u, 0u, 0u, 1066754591u, 2552236599u, 0, MODF_TOLERANCE, 0},
+{ 550, 1088658621u, 2112468655u, 1088658592u, 0u, 1072528873u, 3064922112u, 0, MODF_TOLERANCE, 0},
+{ 551, 3189290617u, 1578223762u, 2147483648u, 0u, 3189290617u, 1578223762u, 0, MODF_TOLERANCE, 0},
+{ 552, 3224596567u, 2456166162u, 3224567808u, 0u, 3218871780u, 2575811712u, 0, MODF_TOLERANCE, 0},
+{ 553, 1058506965u, 2110924310u, 0u, 0u, 1058506965u, 2110924310u, 0, MODF_TOLERANCE, 0},
+{ 554, 1086207177u, 3161208323u, 1086206976u, 0u, 1072248717u, 2260754432u, 0, MODF_TOLERANCE, 0},
+{ 555, 3231863394u, 2352173188u, 3231863296u, 0u, 3217597196u, 3558932480u, 0, MODF_TOLERANCE, 0},
+{ 556, 1079361728u, 4070222179u, 1079361536u, 0u, 1065885267u, 1428971520u, 0, MODF_TOLERANCE, 0},
+{ 557, 1101012904u, 2481562701u, 1101012904u, 2449473536u, 1072601668u, 3489660928u, 0, MODF_TOLERANCE, 0},
+{ 558, 1090937016u, 3809489716u, 1090937016u, 0u, 1069310470u, 1719664640u, 0, MODF_TOLERANCE, 0},
+{ 559, 3197002651u, 330905705u, 2147483648u, 0u, 3197002651u, 330905705u, 0, MODF_TOLERANCE, 0},
+{ 560, 1086260896u, 90264431u, 1086260736u, 0u, 1071906988u, 711843840u, 0, MODF_TOLERANCE, 0},
+{ 561, 1040729961u, 4162008079u, 0u, 0u, 1040729961u, 4162008079u, 0, MODF_TOLERANCE, 0},
+{ 562, 3194387916u, 759522153u, 2147483648u, 0u, 3194387916u, 759522153u, 0, MODF_TOLERANCE, 0},
+{ 563, 1081015037u, 1839697482u, 1081008128u, 0u, 1072364909u, 2811120128u, 0, MODF_TOLERANCE, 0},
+{ 564, 3216442625u, 2211508949u, 2147483648u, 0u, 3216442625u, 2211508949u, 0, MODF_TOLERANCE, 0},
+{ 565, 3249807211u, 3736863454u, 3249807211u, 3724541952u, 3219619931u, 3221225472u, 0, MODF_TOLERANCE, 0},
+{ 566, 1063475914u, 3150741666u, 0u, 0u, 1063475914u, 3150741666u, 0, MODF_TOLERANCE, 0},
+{ 567, 1060785883u, 4200269406u, 0u, 0u, 1060785883u, 4200269406u, 0, MODF_TOLERANCE, 0},
+{ 568, 3236646101u, 1061812176u, 3236646080u, 0u, 3219472201u, 4157603840u, 0, MODF_TOLERANCE, 0},
+{ 569, 1080217979u, 106027290u, 1080213504u, 0u, 1071741702u, 1373182464u, 0, MODF_TOLERANCE, 0},
+{ 570, 3234978297u, 2245237549u, 3234978240u, 0u, 3219964649u, 3449192448u, 0, MODF_TOLERANCE, 0},
+{ 571, 3246984334u, 2132131375u, 3246984334u, 2013265920u, 3219937016u, 3154116608u, 0, MODF_TOLERANCE, 0},
+{ 572, 3250483427u, 3449276437u, 3250483427u, 3439329280u, 3219323138u, 2684354560u, 0, MODF_TOLERANCE, 0},
+{ 573, 1089388778u, 2334440944u, 1089388768u, 0u, 1070929481u, 2078277632u, 0, MODF_TOLERANCE, 0},
+{ 574, 1105423490u, 4004336184u, 1105423490u, 4003463168u, 1071293552u, 0u, 0, MODF_TOLERANCE, 0},
+{ 575, 3218772704u, 4090088208u, 2147483648u, 0u, 3218772704u, 4090088208u, 0, MODF_TOLERANCE, 0},
+{ 576, 1042030013u, 3898658299u, 0u, 0u, 1042030013u, 3898658299u, 0, MODF_TOLERANCE, 0},
+{ 577, 3207908064u, 2272831437u, 2147483648u, 0u, 3207908064u, 2272831437u, 0, MODF_TOLERANCE, 0},
+{ 578, 3253082595u, 2639188641u, 3253082595u, 2638217216u, 3218974018u, 0u, 0, MODF_TOLERANCE, 0},
+{ 579, 1054766684u, 1856594168u, 0u, 0u, 1054766684u, 1856594168u, 0, MODF_TOLERANCE, 0},
+{ 580, 3189515294u, 4101853676u, 2147483648u, 0u, 3189515294u, 4101853676u, 0, MODF_TOLERANCE, 0},
+{ 581, 1076012412u, 2211699255u, 1075970048u, 0u, 1070903184u, 2054899424u, 0, MODF_TOLERANCE, 0},
+{ 582, 3195060344u, 3865018604u, 2147483648u, 0u, 3195060344u, 3865018604u, 0, MODF_TOLERANCE, 0},
+{ 583, 3242767010u, 996259334u, 3242767010u, 0u, 3218976987u, 50331648u, 0, MODF_TOLERANCE, 0},
+{ 584, 3241496889u, 3782673116u, 3241496889u, 0u, 3219926752u, 1535115264u, 0, MODF_TOLERANCE, 0},
+{ 585, 1099130747u, 3840380763u, 1099130747u, 3758096384u, 1071881789u, 1811939328u, 0, MODF_TOLERANCE, 0},
+{ 586, 1048674041u, 550040067u, 0u, 0u, 1048674041u, 550040067u, 0, MODF_TOLERANCE, 0},
+{ 587, 3251419593u, 95874100u, 3251419593u, 92274688u, 3218830874u, 0u, 0, MODF_TOLERANCE, 0},
+{ 588, 3237232828u, 2645647822u, 3237232816u, 0u, 3219733346u, 3281780736u, 0, MODF_TOLERANCE, 0},
+{ 589, 1043665640u, 3441419500u, 0u, 0u, 1043665640u, 3441419500u, 0, MODF_TOLERANCE, 0},
+{ 590, 3252367038u, 876710419u, 3252367038u, 876609536u, 3214450992u, 0u, 0, MODF_TOLERANCE, 0},
+{ 591, 3238593552u, 2560836004u, 3238593552u, 0u, 3216184424u, 880803840u, 0, MODF_TOLERANCE, 0},
+{ 592, 3199616543u, 1180840586u, 2147483648u, 0u, 3199616543u, 1180840586u, 0, MODF_TOLERANCE, 0},
+{ 593, 3221602966u, 2218230392u, 3221225472u, 0u, 3219589722u, 282986976u, 0, MODF_TOLERANCE, 0},
+{ 594, 3227485787u, 3947214579u, 3227484160u, 0u, 3216601005u, 383503360u, 0, MODF_TOLERANCE, 0},
+{ 595, 1079539654u, 1447312532u, 1079525376u, 0u, 1072423723u, 572410368u, 0, MODF_TOLERANCE, 0},
+{ 596, 1081476588u, 780366847u, 1081475072u, 0u, 1071100090u, 231734272u, 0, MODF_TOLERANCE, 0},
+{ 597, 1072569643u, 2842113832u, 0u, 0u, 1072569643u, 2842113832u, 0, MODF_TOLERANCE, 0},
+{ 598, 3216156731u, 225159029u, 2147483648u, 0u, 3216156731u, 225159029u, 0, MODF_TOLERANCE, 0},
+{ 599, 1098117193u, 1601981129u, 1098117193u, 1342177280u, 1072625813u, 2449473536u, 0, MODF_TOLERANCE, 0},
+{ 600, 3234628869u, 2236538344u, 3234628864u, 0u, 3215332667u, 2006974464u, 0, MODF_TOLERANCE, 0},
+{ 601, 1085173524u, 2194185737u, 1085173248u, 0u, 1071728684u, 2313195520u, 0, MODF_TOLERANCE, 0},
+{ 602, 3242362684u, 87913366u, 3242362684u, 0u, 3215259086u, 1476395008u, 0, MODF_TOLERANCE, 0},
+{ 603, 3199083880u, 1346862963u, 2147483648u, 0u, 3199083880u, 1346862963u, 0, MODF_TOLERANCE, 0},
+{ 604, 1077836259u, 3604666660u, 1077805056u, 0u, 1071544565u, 3065399552u, 0, MODF_TOLERANCE, 0},
+{ 605, 3212255979u, 3115209742u, 2147483648u, 0u, 3212255979u, 3115209742u, 0, MODF_TOLERANCE, 0},
+{ 606, 1099332326u, 1325101950u, 1099332326u, 1207959552u, 1072426445u, 4160749568u, 0, MODF_TOLERANCE, 0},
+{ 607, 3224546042u, 3889223100u, 3224502272u, 0u, 3219480412u, 4196054912u, 0, MODF_TOLERANCE, 0},
+{ 608, 1053247613u, 3371396923u, 0u, 0u, 1053247613u, 3371396923u, 0, MODF_TOLERANCE, 0},
+{ 609, 3220477868u, 4163120793u, 3220176896u, 0u, 3218235059u, 3767581284u, 0, MODF_TOLERANCE, 0},
+{ 610, 1075022670u, 1387631215u, 1074790400u, 0u, 1072454258u, 2511115128u, 0, MODF_TOLERANCE, 0},
+{ 611, 3205481779u, 1532426189u, 2147483648u, 0u, 3205481779u, 1532426189u, 0, MODF_TOLERANCE, 0},
+{ 612, 1063168268u, 3397022615u, 0u, 0u, 1063168268u, 3397022615u, 0, MODF_TOLERANCE, 0},
+{ 613, 3201033321u, 89324166u, 2147483648u, 0u, 3201033321u, 89324166u, 0, MODF_TOLERANCE, 0},
+{ 614, 1079206060u, 3429424710u, 1079197696u, 0u, 1071666790u, 879698688u, 0, MODF_TOLERANCE, 0},
+{ 615, 3192325102u, 747591401u, 2147483648u, 0u, 3192325102u, 747591401u, 0, MODF_TOLERANCE, 0},
+{ 616, 1072238381u, 2803213904u, 0u, 0u, 1072238381u, 2803213904u, 0, MODF_TOLERANCE, 0},
+{ 617, 1091113780u, 271904221u, 1091113776u, 0u, 1071661267u, 3077832704u, 0, MODF_TOLERANCE, 0},
+{ 618, 1044258318u, 1858545114u, 0u, 0u, 1044258318u, 1858545114u, 0, MODF_TOLERANCE, 0},
+{ 619, 3228068914u, 314958082u, 3228065792u, 0u, 3218629669u, 2344748032u, 0, MODF_TOLERANCE, 0},
+{ 620, 3249912496u, 2966213175u, 3249912496u, 2952790016u, 3219757638u, 3758096384u, 0, MODF_TOLERANCE, 0},
+{ 621, 3197179414u, 3119528953u, 2147483648u, 0u, 3197179414u, 3119528953u, 0, MODF_TOLERANCE, 0},
+{ 622, 3217179014u, 2908718240u, 2147483648u, 0u, 3217179014u, 2908718240u, 0, MODF_TOLERANCE, 0},
+{ 623, 3242467576u, 2018361566u, 3242467576u, 0u, 3220050800u, 931135488u, 0, MODF_TOLERANCE, 0},
+{ 624, 1100926600u, 3985805054u, 1100926600u, 3959422976u, 1071196399u, 3758096384u, 0, MODF_TOLERANCE, 0},
+{ 625, 1070132580u, 409584884u, 0u, 0u, 1070132580u, 409584884u, 0, MODF_TOLERANCE, 0},
+{ 626, 3239758947u, 755795129u, 3239758944u, 0u, 3219744868u, 633864192u, 0, MODF_TOLERANCE, 0},
+{ 627, 1075772446u, 1819156379u, 1075576832u, 0u, 1072161011u, 1668349144u, 0, MODF_TOLERANCE, 0},
+{ 628, 3251342302u, 2982669005u, 3251342302u, 2977955840u, 3219258035u, 1073741824u, 0, MODF_TOLERANCE, 0},
+{ 629, 1101563433u, 2080534280u, 1101563433u, 2080374784u, 1064532032u, 0u, 0, MODF_TOLERANCE, 0},
+{ 630, 3188254060u, 449171797u, 2147483648u, 0u, 3188254060u, 449171797u, 0, MODF_TOLERANCE, 0},
+{ 631, 1095956900u, 168744837u, 1095956900u, 0u, 1069817263u, 167772160u, 0, MODF_TOLERANCE, 0},
+{ 632, 3214950009u, 1322217822u, 2147483648u, 0u, 3214950009u, 1322217822u, 0, MODF_TOLERANCE, 0},
+{ 633, 3254226900u, 3250487255u, 3254226900u, 3249537024u, 3219980206u, 0u, 0, MODF_TOLERANCE, 0},
+{ 634, 1062120700u, 1876195180u, 0u, 0u, 1062120700u, 1876195180u, 0, MODF_TOLERANCE, 0},
+{ 635, 3226343480u, 1336400247u, 3226337280u, 0u, 3217569871u, 2816046848u, 0, MODF_TOLERANCE, 0},
+{ 636, 1098057903u, 3314079581u, 1098057903u, 3221225472u, 1070998365u, 1946157056u, 0, MODF_TOLERANCE, 0},
+{ 637, 3203678820u, 265025555u, 2147483648u, 0u, 3203678820u, 265025555u, 0, MODF_TOLERANCE, 0},
+{ 638, 1063854282u, 3779482256u, 0u, 0u, 1063854282u, 3779482256u, 0, MODF_TOLERANCE, 0},
+{ 639, 1067300501u, 887044257u, 0u, 0u, 1067300501u, 887044257u, 0, MODF_TOLERANCE, 0},
+{ 640, 1054789618u, 2732056261u, 0u, 0u, 1054789618u, 2732056261u, 0, MODF_TOLERANCE, 0},
+{ 641, 1050106742u, 4027115185u, 0u, 0u, 1050106742u, 4027115185u, 0, MODF_TOLERANCE, 0},
+{ 642, 3191764868u, 2940199511u, 2147483648u, 0u, 3191764868u, 2940199511u, 0, MODF_TOLERANCE, 0},
+{ 643, 3202500155u, 2875684421u, 2147483648u, 0u, 3202500155u, 2875684421u, 0, MODF_TOLERANCE, 0},
+{ 644, 3227459837u, 2251967570u, 3227451392u, 0u, 3219160771u, 489040128u, 0, MODF_TOLERANCE, 0},
+{ 645, 1063244412u, 284173546u, 0u, 0u, 1063244412u, 284173546u, 0, MODF_TOLERANCE, 0},
+{ 646, 3238823679u, 3557800647u, 3238823672u, 0u, 3220131902u, 3944480768u, 0, MODF_TOLERANCE, 0},
+{ 647, 1101458560u, 3147771266u, 1101458560u, 3120562176u, 1072296664u, 536870912u, 0, MODF_TOLERANCE, 0},
+{ 648, 3220110464u, 2933364246u, 2147483648u, 0u, 3220110464u, 2933364246u, 0, MODF_TOLERANCE, 0},
+{ 649, 1064853160u, 3366183281u, 0u, 0u, 1064853160u, 3366183281u, 0, MODF_TOLERANCE, 0},
+{ 650, 3234870843u, 537442654u, 3234870784u, 0u, 3220017156u, 1554972672u, 0, MODF_TOLERANCE, 0},
+{ 651, 3244118788u, 2529029548u, 3244118788u, 2147483648u, 3218521581u, 2885681152u, 0, MODF_TOLERANCE, 0},
+{ 652, 3249882819u, 3781513577u, 3249882819u, 3774873600u, 3218691162u, 1073741824u, 0, MODF_TOLERANCE, 0},
+{ 653, 3213436354u, 1080845539u, 2147483648u, 0u, 3213436354u, 1080845539u, 0, MODF_TOLERANCE, 0},
+{ 654, 3206760016u, 911778687u, 2147483648u, 0u, 3206760016u, 911778687u, 0, MODF_TOLERANCE, 0},
+{ 655, 3191951036u, 469586759u, 2147483648u, 0u, 3191951036u, 469586759u, 0, MODF_TOLERANCE, 0},
+{ 656, 1091830022u, 3080528840u, 1091830020u, 0u, 1072020713u, 507510784u, 0, MODF_TOLERANCE, 0},
+{ 657, 1080249104u, 2863108169u, 1080246272u, 0u, 1070997845u, 1327534592u, 0, MODF_TOLERANCE, 0},
+{ 658, 3225605506u, 2508274250u, 3225583616u, 0u, 3219480741u, 1615762048u, 0, MODF_TOLERANCE, 0},
+{ 659, 3210826984u, 4080017377u, 2147483648u, 0u, 3210826984u, 4080017377u, 0, MODF_TOLERANCE, 0},
+{ 660, 3206492941u, 1470284690u, 2147483648u, 0u, 3206492941u, 1470284690u, 0, MODF_TOLERANCE, 0},
+{ 661, 3207120390u, 3867917386u, 2147483648u, 0u, 3207120390u, 3867917386u, 0, MODF_TOLERANCE, 0},
+{ 662, 1102054928u, 3504746045u, 1102054928u, 3489660928u, 1072481735u, 2684354560u, 0, MODF_TOLERANCE, 0},
+{ 663, 1064522279u, 2962134101u, 0u, 0u, 1064522279u, 2962134101u, 0, MODF_TOLERANCE, 0},
+{ 664, 3244741577u, 3390537350u, 3244741577u, 3221225472u, 3218353917u, 201326592u, 0, MODF_TOLERANCE, 0},
+{ 665, 1088201813u, 1702237980u, 1088201792u, 0u, 1070949750u, 387710976u, 0, MODF_TOLERANCE, 0},
+{ 666, 1071598971u, 1102587474u, 0u, 0u, 1071598971u, 1102587474u, 0, MODF_TOLERANCE, 0},
+{ 667, 3202970118u, 2180218657u, 2147483648u, 0u, 3202970118u, 2180218657u, 0, MODF_TOLERANCE, 0},
+{ 668, 3211592260u, 1206527853u, 2147483648u, 0u, 3211592260u, 1206527853u, 0, MODF_TOLERANCE, 0},
+{ 669, 3197084744u, 394130786u, 2147483648u, 0u, 3197084744u, 394130786u, 0, MODF_TOLERANCE, 0},
+{ 670, 3242511482u, 2437699868u, 3242511482u, 2147483648u, 3217116249u, 469762048u, 0, MODF_TOLERANCE, 0},
+{ 671, 1044237059u, 849581558u, 0u, 0u, 1044237059u, 849581558u, 0, MODF_TOLERANCE, 0},
+{ 672, 3252006507u, 2008614943u, 3252006507u, 2004877312u, 3219948559u, 2147483648u, 0, MODF_TOLERANCE, 0},
+{ 673, 3210140014u, 3128971673u, 2147483648u, 0u, 3210140014u, 3128971673u, 0, MODF_TOLERANCE, 0},
+{ 674, 3249137531u, 2773583059u, 3249137531u, 2751463424u, 3219462221u, 805306368u, 0, MODF_TOLERANCE, 0},
+{ 675, 1085029866u, 590727700u, 1085029376u, 0u, 1072603699u, 1554071552u, 0, MODF_TOLERANCE, 0},
+{ 676, 3248651761u, 2183878539u, 3248651761u, 2181038080u, 3216354245u, 2147483648u, 0, MODF_TOLERANCE, 0},
+{ 677, 1101098629u, 820687580u, 1101098629u, 805306368u, 1071470171u, 2147483648u, 0, MODF_TOLERANCE, 0},
+{ 678, 3208143496u, 1402434664u, 2147483648u, 0u, 3208143496u, 1402434664u, 0, MODF_TOLERANCE, 0},
+{ 679, 3252290835u, 1873709254u, 3252290835u, 1870659584u, 3219604579u, 0u, 0, MODF_TOLERANCE, 0},
+{ 680, 3245167989u, 44275991u, 3245167989u, 0u, 3216317640u, 3087007744u, 0, MODF_TOLERANCE, 0},
+{ 681, 3189668753u, 1174874204u, 2147483648u, 0u, 3189668753u, 1174874204u, 0, MODF_TOLERANCE, 0},
+{ 682, 3208263730u, 2360372288u, 2147483648u, 0u, 3208263730u, 2360372288u, 0, MODF_TOLERANCE, 0},
+{ 683, 1103854676u, 937573440u, 1103854676u, 931135488u, 1072205584u, 0u, 0, MODF_TOLERANCE, 0},
+{ 684, 3208953761u, 211240241u, 2147483648u, 0u, 3208953761u, 211240241u, 0, MODF_TOLERANCE, 0},
+{ 685, 3243548934u, 2469774991u, 3243548934u, 2147483648u, 3218290118u, 2399141888u, 0, MODF_TOLERANCE, 0},
+{ 686, 1043117070u, 3380071805u, 0u, 0u, 1043117070u, 3380071805u, 0, MODF_TOLERANCE, 0},
+{ 687, 1058121042u, 442507560u, 0u, 0u, 1058121042u, 442507560u, 0, MODF_TOLERANCE, 0},
+{ 688, 3254252803u, 3257889649u, 3254252803u, 3256877056u, 3220104930u, 0u, 0, MODF_TOLERANCE, 0},
+{ 689, 1068850520u, 1854921625u, 0u, 0u, 1068850520u, 1854921625u, 0, MODF_TOLERANCE, 0},
+{ 690, 1049810168u, 2729627545u, 0u, 0u, 1049810168u, 2729627545u, 0, MODF_TOLERANCE, 0},
+{ 691, 3254712629u, 4001809575u, 3254712629u, 4001366016u, 3218805404u, 0u, 0, MODF_TOLERANCE, 0},
+{ 692, 3240128649u, 278261523u, 3240128648u, 0u, 3219196254u, 4046454784u, 0, MODF_TOLERANCE, 0},
+{ 693, 1087224694u, 1793907966u, 1087224576u, 0u, 1072536251u, 926908416u, 0, MODF_TOLERANCE, 0},
+{ 694, 3238955714u, 398859249u, 3238955712u, 0u, 3218128432u, 3750232064u, 0, MODF_TOLERANCE, 0},
+{ 695, 3200952547u, 2511916952u, 2147483648u, 0u, 3200952547u, 2511916952u, 0, MODF_TOLERANCE, 0},
+{ 696, 3219195283u, 1697158299u, 2147483648u, 0u, 3219195283u, 1697158299u, 0, MODF_TOLERANCE, 0},
+{ 697, 1069985548u, 3230931724u, 0u, 0u, 1069985548u, 3230931724u, 0, MODF_TOLERANCE, 0},
+{ 698, 3243897690u, 3508781585u, 3243897690u, 3221225472u, 3218154434u, 285212672u, 0, MODF_TOLERANCE, 0},
+{ 699, 1103847606u, 1674254897u, 1103847606u, 1669332992u, 1071826572u, 1073741824u, 0, MODF_TOLERANCE, 0},
+{ 700, 1046547577u, 217148561u, 0u, 0u, 1046547577u, 217148561u, 0, MODF_TOLERANCE, 0},
+{ 701, 3211263954u, 3275604304u, 2147483648u, 0u, 3211263954u, 3275604304u, 0, MODF_TOLERANCE, 0},
+{ 702, 3194840159u, 2991205850u, 2147483648u, 0u, 3194840159u, 2991205850u, 0, MODF_TOLERANCE, 0},
+{ 703, 3195249375u, 3509997278u, 2147483648u, 0u, 3195249375u, 3509997278u, 0, MODF_TOLERANCE, 0},
+{ 704, 3248888030u, 3897986511u, 3248888030u, 3892314112u, 3217400691u, 3221225472u, 0, MODF_TOLERANCE, 0},
+{ 705, 1047182435u, 2156824613u, 0u, 0u, 1047182435u, 2156824613u, 0, MODF_TOLERANCE, 0},
+{ 706, 1042295665u, 1239257646u, 0u, 0u, 1042295665u, 1239257646u, 0, MODF_TOLERANCE, 0},
+{ 707, 3213264085u, 1073153314u, 2147483648u, 0u, 3213264085u, 1073153314u, 0, MODF_TOLERANCE, 0},
+{ 708, 3250031627u, 2567234990u, 3250031627u, 2566914048u, 3214120632u, 0u, 0, MODF_TOLERANCE, 0},
+{ 709, 3190593412u, 4261696995u, 2147483648u, 0u, 3190593412u, 4261696995u, 0, MODF_TOLERANCE, 0},
+{ 710, 3197784432u, 323702024u, 2147483648u, 0u, 3197784432u, 323702024u, 0, MODF_TOLERANCE, 0},
+{ 711, 3243690997u, 4075177615u, 3243690997u, 3221225472u, 3219747619u, 1199570944u, 0, MODF_TOLERANCE, 0},
+{ 712, 3202791065u, 1919006082u, 2147483648u, 0u, 3202791065u, 1919006082u, 0, MODF_TOLERANCE, 0},
+{ 713, 3239270013u, 386429966u, 3239270012u, 0u, 3218174087u, 1088421888u, 0, MODF_TOLERANCE, 0},
+{ 714, 1086504491u, 3698826164u, 1086504448u, 0u, 1070984763u, 3453616128u, 0, MODF_TOLERANCE, 0},
+{ 715, 1078327190u, 1681986446u, 1078296576u, 0u, 1072555417u, 272950144u, 0, MODF_TOLERANCE, 0},
+{ 716, 3194985869u, 3072950140u, 2147483648u, 0u, 3194985869u, 3072950140u, 0, MODF_TOLERANCE, 0},
+{ 717, 3217311933u, 3719038997u, 2147483648u, 0u, 3217311933u, 3719038997u, 0, MODF_TOLERANCE, 0},
+{ 718, 1055433962u, 3331415058u, 0u, 0u, 1055433962u, 3331415058u, 0, MODF_TOLERANCE, 0},
+{ 719, 1060749713u, 2420250111u, 0u, 0u, 1060749713u, 2420250111u, 0, MODF_TOLERANCE, 0},
+{ 720, 3238002206u, 1928661079u, 3238002192u, 0u, 3219973610u, 279838720u, 0, MODF_TOLERANCE, 0},
+{ 721, 1081914210u, 3679866727u, 1081913344u, 0u, 1070274266u, 2994419712u, 0, MODF_TOLERANCE, 0},
+{ 722, 3227386672u, 1273835792u, 3227385856u, 0u, 3215557215u, 1770553344u, 0, MODF_TOLERANCE, 0},
+{ 723, 1041622738u, 2682092368u, 0u, 0u, 1041622738u, 2682092368u, 0, MODF_TOLERANCE, 0},
+{ 724, 3234222284u, 1325425811u, 3234222208u, 0u, 3219329984u, 421838848u, 0, MODF_TOLERANCE, 0},
+{ 725, 1056312613u, 4175172697u, 0u, 0u, 1056312613u, 4175172697u, 0, MODF_TOLERANCE, 0},
+{ 726, 3208346191u, 2130706153u, 2147483648u, 0u, 3208346191u, 2130706153u, 0, MODF_TOLERANCE, 0},
+{ 727, 1092089624u, 1200784450u, 1092089624u, 0u, 1068623009u, 276824064u, 0, MODF_TOLERANCE, 0},
+{ 728, 1083605096u, 1248595607u, 1083604992u, 0u, 1069159067u, 61194240u, 0, MODF_TOLERANCE, 0},
+{ 729, 3213890863u, 1897285171u, 2147483648u, 0u, 3213890863u, 1897285171u, 0, MODF_TOLERANCE, 0},
+{ 730, 3251296075u, 944966123u, 3251296075u, 939524096u, 3219440250u, 3221225472u, 0, MODF_TOLERANCE, 0},
+{ 731, 3241371250u, 2270747330u, 3241371250u, 0u, 3219188507u, 1480589312u, 0, MODF_TOLERANCE, 0},
+{ 732, 3230692631u, 422503284u, 3230692352u, 0u, 3218174354u, 3996598272u, 0, MODF_TOLERANCE, 0},
+{ 733, 1084120037u, 2857564741u, 1084119040u, 0u, 1072639314u, 2547132416u, 0, MODF_TOLERANCE, 0},
+{ 734, 1075647403u, 3308906709u, 1075576832u, 0u, 1070676668u, 1402899792u, 0, MODF_TOLERANCE, 0},
+{ 735, 3203475098u, 1380066948u, 2147483648u, 0u, 3203475098u, 1380066948u, 0, MODF_TOLERANCE, 0},
+{ 736, 3232612906u, 2613634294u, 3232612864u, 0u, 3216330212u, 1920663552u, 0, MODF_TOLERANCE, 0},
+{ 737, 1063890856u, 4022784584u, 0u, 0u, 1063890856u, 4022784584u, 0, MODF_TOLERANCE, 0},
+{ 738, 1060483857u, 3264056381u, 0u, 0u, 1060483857u, 3264056381u, 0, MODF_TOLERANCE, 0},
+{ 739, 1044637404u, 1778509100u, 0u, 0u, 1044637404u, 1778509100u, 0, MODF_TOLERANCE, 0},
+{ 740, 3213146285u, 2665833973u, 2147483648u, 0u, 3213146285u, 2665833973u, 0, MODF_TOLERANCE, 0},
+{ 741, 3216727300u, 1859175955u, 2147483648u, 0u, 3216727300u, 1859175955u, 0, MODF_TOLERANCE, 0},
+{ 742, 1079949560u, 4258450607u, 1079934976u, 0u, 1072462974u, 3915798400u, 0, MODF_TOLERANCE, 0},
+{ 743, 1048277388u, 4128020197u, 0u, 0u, 1048277388u, 4128020197u, 0, MODF_TOLERANCE, 0},
+{ 744, 1076266146u, 4122840980u, 1076232192u, 0u, 1070634078u, 3081892480u, 0, MODF_TOLERANCE, 0},
+{ 745, 3193183163u, 2454653987u, 2147483648u, 0u, 3193183163u, 2454653987u, 0, MODF_TOLERANCE, 0},
+{ 746, 3229487005u, 2977478685u, 3229483008u, 0u, 3220126562u, 4050663936u, 0, MODF_TOLERANCE, 0},
+{ 747, 3253556483u, 1355181872u, 3253556483u, 1354760192u, 3217669312u, 0u, 0, MODF_TOLERANCE, 0},
+{ 748, 1095308770u, 436846481u, 1095308770u, 0u, 1070205375u, 2432696320u, 0, MODF_TOLERANCE, 0},
+{ 749, 3246605302u, 2592856453u, 3246605302u, 2550136832u, 3218366156u, 671088640u, 0, MODF_TOLERANCE, 0},
+{ 750, 3247825559u, 3195234082u, 3247825559u, 3154116608u, 3219364665u, 268435456u, 0, MODF_TOLERANCE, 0},
+{ 751, 3222118023u, 3554670043u, 3221749760u, 0u, 3219552799u, 1333778284u, 0, MODF_TOLERANCE, 0},
+{ 752, 1091621009u, 3321236467u, 1091621008u, 0u, 1071406944u, 3207593984u, 0, MODF_TOLERANCE, 0},
+{ 753, 1069012833u, 1936670355u, 0u, 0u, 1069012833u, 1936670355u, 0, MODF_TOLERANCE, 0},
+{ 754, 1095715713u, 2958468553u, 1095715713u, 2147483648u, 1071131474u, 3833593856u, 0, MODF_TOLERANCE, 0},
+{ 755, 3192291109u, 2960339502u, 2147483648u, 0u, 3192291109u, 2960339502u, 0, MODF_TOLERANCE, 0},
+{ 756, 1098808013u, 1044068983u, 1098808013u, 805306368u, 1072461428u, 3992977408u, 0, MODF_TOLERANCE, 0},
+{ 757, 3196691185u, 4093388677u, 2147483648u, 0u, 3196691185u, 4093388677u, 0, MODF_TOLERANCE, 0},
+{ 758, 1095478112u, 1735930261u, 1095478112u, 0u, 1072291340u, 1698693120u, 0, MODF_TOLERANCE, 0},
+{ 759, 1091040302u, 1807398746u, 1091040296u, 0u, 1072279274u, 3714580480u, 0, MODF_TOLERANCE, 0},
+{ 760, 3195743135u, 4261616162u, 2147483648u, 0u, 3195743135u, 4261616162u, 0, MODF_TOLERANCE, 0},
+{ 761, 3209294194u, 3250576797u, 2147483648u, 0u, 3209294194u, 3250576797u, 0, MODF_TOLERANCE, 0},
+{ 762, 1059002384u, 3043079652u, 0u, 0u, 1059002384u, 3043079652u, 0, MODF_TOLERANCE, 0},
+{ 763, 1069207109u, 666051428u, 0u, 0u, 1069207109u, 666051428u, 0, MODF_TOLERANCE, 0},
+{ 764, 3208765404u, 1912684117u, 2147483648u, 0u, 3208765404u, 1912684117u, 0, MODF_TOLERANCE, 0},
+{ 765, 1103487420u, 1949030179u, 1103487420u, 1946157056u, 1070984081u, 2147483648u, 0, MODF_TOLERANCE, 0},
+{ 766, 1096388934u, 896459246u, 1096388934u, 0u, 1072346992u, 4143972352u, 0, MODF_TOLERANCE, 0},
+{ 767, 1054300653u, 622499767u, 0u, 0u, 1054300653u, 622499767u, 0, MODF_TOLERANCE, 0},
+{ 768, 1066707637u, 1490260486u, 0u, 0u, 1066707637u, 1490260486u, 0, MODF_TOLERANCE, 0},
+{ 769, 1106688493u, 1490616165u, 1106688493u, 1490026496u, 1071775434u, 0u, 0, MODF_TOLERANCE, 0},
+{ 770, 3251242436u, 795675736u, 3251242436u, 788529152u, 3219866390u, 0u, 0, MODF_TOLERANCE, 0},
+{ 771, 1080943896u, 3662877092u, 1080942592u, 0u, 1069835113u, 1279692800u, 0, MODF_TOLERANCE, 0},
+{ 772, 3234317146u, 3200513112u, 3234317056u, 0u, 3219566512u, 4246077440u, 0, MODF_TOLERANCE, 0},
+{ 773, 1084088786u, 1356101968u, 1084088320u, 0u, 1071457549u, 1200947200u, 0, MODF_TOLERANCE, 0},
+{ 774, 3236536816u, 3062844611u, 3236536800u, 0u, 3219175055u, 1287847936u, 0, MODF_TOLERANCE, 0},
+{ 775, 3219922640u, 2284484846u, 2147483648u, 0u, 3219922640u, 2284484846u, 0, MODF_TOLERANCE, 0},
+{ 776, 3219498359u, 3240896015u, 2147483648u, 0u, 3219498359u, 3240896015u, 0, MODF_TOLERANCE, 0},
+{ 777, 3235759689u, 494503287u, 3235759680u, 0u, 3217177331u, 183369728u, 0, MODF_TOLERANCE, 0},
+{ 778, 1092811254u, 142673998u, 1092811254u, 0u, 1066467856u, 2617245696u, 0, MODF_TOLERANCE, 0},
+{ 779, 3252125916u, 3394882641u, 3252125916u, 3393191936u, 3218721873u, 0u, 0, MODF_TOLERANCE, 0},
+{ 780, 3225306538u, 364852125u, 3225288704u, 0u, 3218172549u, 1875699520u, 0, MODF_TOLERANCE, 0},
+{ 781, 3225261763u, 193885269u, 3225223168u, 0u, 3219314785u, 1909361312u, 0, MODF_TOLERANCE, 0},
+{ 782, 1088149839u, 1359805831u, 1088149824u, 0u, 1070506521u, 4211998720u, 0, MODF_TOLERANCE, 0},
+{ 783, 3200484782u, 592580907u, 2147483648u, 0u, 3200484782u, 592580907u, 0, MODF_TOLERANCE, 0},
+{ 784, 3199560872u, 3086438952u, 2147483648u, 0u, 3199560872u, 3086438952u, 0, MODF_TOLERANCE, 0},
+{ 785, 1059518664u, 1778008540u, 0u, 0u, 1059518664u, 1778008540u, 0, MODF_TOLERANCE, 0},
+{ 786, 1049064687u, 73581647u, 0u, 0u, 1049064687u, 73581647u, 0, MODF_TOLERANCE, 0},
+{ 787, 3246733598u, 233240285u, 3246733598u, 134217728u, 3219626971u, 1946157056u, 0, MODF_TOLERANCE, 0},
+{ 788, 1081923320u, 2710903921u, 1081921536u, 0u, 1071374982u, 1416741888u, 0, MODF_TOLERANCE, 0},
+{ 789, 1069513767u, 3719878805u, 0u, 0u, 1069513767u, 3719878805u, 0, MODF_TOLERANCE, 0},
+{ 790, 1079866720u, 3615458228u, 1079853056u, 0u, 1072345195u, 3217152512u, 0, MODF_TOLERANCE, 0},
+{ 791, 3221194724u, 3647632375u, 3220176896u, 0u, 3220115401u, 3000297454u, 0, MODF_TOLERANCE, 0},
+{ 792, 3247225271u, 3839959621u, 3247225271u, 3758096384u, 3219358857u, 335544320u, 0, MODF_TOLERANCE, 0},
+{ 793, 1103401096u, 2232210456u, 1103401096u, 2231369728u, 1069131824u, 0u, 0, MODF_TOLERANCE, 0},
+{ 794, 3235434773u, 224271737u, 3235434752u, 0u, 3218410846u, 494469120u, 0, MODF_TOLERANCE, 0},
+{ 795, 3193003684u, 2134662911u, 2147483648u, 0u, 3193003684u, 2134662911u, 0, MODF_TOLERANCE, 0},
+{ 796, 3190390590u, 4239009051u, 2147483648u, 0u, 3190390590u, 4239009051u, 0, MODF_TOLERANCE, 0},
+{ 797, 1080526145u, 2305279897u, 1080524800u, 0u, 1069876773u, 2669569024u, 0, MODF_TOLERANCE, 0},
+{ 798, 1077668039u, 1854523320u, 1077608448u, 0u, 1072503021u, 3510171392u, 0, MODF_TOLERANCE, 0},
+{ 799, 3219864259u, 538224650u, 2147483648u, 0u, 3219864259u, 538224650u, 0, MODF_TOLERANCE, 0},
+{ 800, 3206153057u, 1379649610u, 2147483648u, 0u, 3206153057u, 1379649610u, 0, MODF_TOLERANCE, 0},
+{ 801, 3196410507u, 3683897920u, 2147483648u, 0u, 3196410507u, 3683897920u, 0, MODF_TOLERANCE, 0},
+{ 802, 3244167599u, 3647579469u, 3244167599u, 3221225472u, 3218696613u, 1291845632u, 0, MODF_TOLERANCE, 0},
+{ 803, 1090280933u, 2694093608u, 1090280928u, 0u, 1071022674u, 1822425088u, 0, MODF_TOLERANCE, 0},
+{ 804, 1042775347u, 598406111u, 0u, 0u, 1042775347u, 598406111u, 0, MODF_TOLERANCE, 0},
+{ 805, 3211635392u, 872706833u, 2147483648u, 0u, 3211635392u, 872706833u, 0, MODF_TOLERANCE, 0},
+{ 806, 1084802480u, 2200602798u, 1084802048u, 0u, 1072367666u, 2827673600u, 0, MODF_TOLERANCE, 0},
+{ 807, 1042339597u, 904146293u, 0u, 0u, 1042339597u, 904146293u, 0, MODF_TOLERANCE, 0},
+{ 808, 1060867322u, 1729685598u, 0u, 0u, 1060867322u, 1729685598u, 0, MODF_TOLERANCE, 0},
+{ 809, 3195694970u, 1894173462u, 2147483648u, 0u, 3195694970u, 1894173462u, 0, MODF_TOLERANCE, 0},
+{ 810, 3232800651u, 191960416u, 3232800512u, 0u, 3219218798u, 581697536u, 0, MODF_TOLERANCE, 0},
+{ 811, 1091225343u, 3521028551u, 1091225336u, 0u, 1072646010u, 2266759168u, 0, MODF_TOLERANCE, 0},
+{ 812, 1054522089u, 3287274359u, 0u, 0u, 1054522089u, 3287274359u, 0, MODF_TOLERANCE, 0},
+{ 813, 1095386964u, 959640601u, 1095386964u, 0u, 1071421818u, 209715200u, 0, MODF_TOLERANCE, 0},
+{ 814, 3201578263u, 4136915018u, 2147483648u, 0u, 3201578263u, 4136915018u, 0, MODF_TOLERANCE, 0},
+{ 815, 1064005451u, 1553716379u, 0u, 0u, 1064005451u, 1553716379u, 0, MODF_TOLERANCE, 0},
+{ 816, 1106027987u, 984725765u, 1106027987u, 983564288u, 1071757573u, 0u, 0, MODF_TOLERANCE, 0},
+{ 817, 3238832641u, 2287646644u, 3238832640u, 0u, 3217589675u, 2067791872u, 0, MODF_TOLERANCE, 0},
+{ 818, 3240329321u, 2276183378u, 3240329320u, 0u, 3219684028u, 3575644160u, 0, MODF_TOLERANCE, 0},
+{ 819, 1068209174u, 3940225170u, 0u, 0u, 1068209174u, 3940225170u, 0, MODF_TOLERANCE, 0},
+{ 820, 3199544434u, 997572161u, 2147483648u, 0u, 3199544434u, 997572161u, 0, MODF_TOLERANCE, 0},
+{ 821, 3212768361u, 36116288u, 2147483648u, 0u, 3212768361u, 36116288u, 0, MODF_TOLERANCE, 0},
+{ 822, 3206886566u, 4196602670u, 2147483648u, 0u, 3206886566u, 4196602670u, 0, MODF_TOLERANCE, 0},
+{ 823, 3241695853u, 3550227562u, 3241695853u, 0u, 3219813253u, 2369781760u, 0, MODF_TOLERANCE, 0},
+{ 824, 3207257983u, 2747744117u, 2147483648u, 0u, 3207257983u, 2747744117u, 0, MODF_TOLERANCE, 0},
+{ 825, 1104236126u, 507130047u, 1104236126u, 503316480u, 1072502879u, 2147483648u, 0, MODF_TOLERANCE, 0},
+{ 826, 1048359321u, 3229888373u, 0u, 0u, 1048359321u, 3229888373u, 0, MODF_TOLERANCE, 0},
+{ 827, 3222996778u, 2210969014u, 3222798336u, 0u, 3219667284u, 507882928u, 0, MODF_TOLERANCE, 0},
+{ 828, 1081031001u, 1946786091u, 1081024512u, 0u, 1072257396u, 161032960u, 0, MODF_TOLERANCE, 0},
+{ 829, 3236306990u, 4059150589u, 3236306976u, 0u, 3218990051u, 1912209408u, 0, MODF_TOLERANCE, 0},
+{ 830, 3189759234u, 1177045799u, 2147483648u, 0u, 3189759234u, 1177045799u, 0, MODF_TOLERANCE, 0},
+{ 831, 1093103612u, 2664812822u, 1093103612u, 0u, 1070848698u, 583008256u, 0, MODF_TOLERANCE, 0},
+{ 832, 1050343198u, 2034180320u, 0u, 0u, 1050343198u, 2034180320u, 0, MODF_TOLERANCE, 0},
+{ 833, 3213779117u, 1175750283u, 2147483648u, 0u, 3213779117u, 1175750283u, 0, MODF_TOLERANCE, 0},
+{ 834, 3235559706u, 1424491340u, 3235559680u, 0u, 3218756840u, 55312384u, 0, MODF_TOLERANCE, 0},
+{ 835, 3213904193u, 1630036121u, 2147483648u, 0u, 3213904193u, 1630036121u, 0, MODF_TOLERANCE, 0},
+{ 836, 3231972785u, 3195479448u, 3231972352u, 0u, 3219856359u, 1918468096u, 0, MODF_TOLERANCE, 0},
+{ 837, 1090429875u, 2527029044u, 1090429872u, 0u, 1070380283u, 966787072u, 0, MODF_TOLERANCE, 0},
+{ 838, 1046927050u, 4000723255u, 0u, 0u, 1046927050u, 4000723255u, 0, MODF_TOLERANCE, 0},
+{ 839, 1085208677u, 3335703647u, 1085208576u, 0u, 1070166452u, 3004678144u, 0, MODF_TOLERANCE, 0},
+{ 840, 3237349676u, 3869440059u, 3237349664u, 0u, 3219770693u, 4034265088u, 0, MODF_TOLERANCE, 0},
+{ 841, 1091433848u, 3888398377u, 1091433848u, 0u, 1069349000u, 85983232u, 0, MODF_TOLERANCE, 0},
+{ 842, 3196041693u, 1290567220u, 2147483648u, 0u, 3196041693u, 1290567220u, 0, MODF_TOLERANCE, 0},
+{ 843, 1066679070u, 3242451480u, 0u, 0u, 1066679070u, 3242451480u, 0, MODF_TOLERANCE, 0},
+{ 844, 3248384948u, 707431021u, 3248384948u, 671088640u, 3219215443u, 1744830464u, 0, MODF_TOLERANCE, 0},
+{ 845, 1083230509u, 2739665123u, 1083230208u, 0u, 1070783028u, 3213766656u, 0, MODF_TOLERANCE, 0},
+{ 846, 1060777905u, 1733073225u, 0u, 0u, 1060777905u, 1733073225u, 0, MODF_TOLERANCE, 0},
+{ 847, 1078517061u, 1297274853u, 1078493184u, 0u, 1072124243u, 1421211968u, 0, MODF_TOLERANCE, 0},
+{ 848, 3208848704u, 3341639139u, 2147483648u, 0u, 3208848704u, 3341639139u, 0, MODF_TOLERANCE, 0},
+{ 849, 1046570941u, 2228057309u, 0u, 0u, 1046570941u, 2228057309u, 0, MODF_TOLERANCE, 0},
+{ 850, 1084318902u, 1317851136u, 1084318720u, 0u, 1071040977u, 2583691264u, 0, MODF_TOLERANCE, 0},
+{ 851, 1088255327u, 270039934u, 1088255296u, 0u, 1071583256u, 2071855104u, 0, MODF_TOLERANCE, 0},
+{ 852, 3241414679u, 3063626339u, 3241414679u, 0u, 3219575655u, 1281359872u, 0, MODF_TOLERANCE, 0},
+{ 853, 3219178350u, 83062251u, 2147483648u, 0u, 3219178350u, 83062251u, 0, MODF_TOLERANCE, 0},
+{ 854, 3211262173u, 2659016437u, 2147483648u, 0u, 3211262173u, 2659016437u, 0, MODF_TOLERANCE, 0},
+{ 855, 1095743886u, 3833539373u, 1095743886u, 2147483648u, 1072242634u, 3409969152u, 0, MODF_TOLERANCE, 0},
+{ 856, 3206667189u, 1567476111u, 2147483648u, 0u, 3206667189u, 1567476111u, 0, MODF_TOLERANCE, 0},
+{ 857, 3205195072u, 2382776852u, 2147483648u, 0u, 3205195072u, 2382776852u, 0, MODF_TOLERANCE, 0},
+{ 858, 3249232579u, 1546622468u, 3249232579u, 1543503872u, 3216493314u, 0u, 0, MODF_TOLERANCE, 0},
+{ 859, 1085536439u, 1714300821u, 1085536256u, 0u, 1072098501u, 3304235008u, 0, MODF_TOLERANCE, 0},
+{ 860, 1104130938u, 4167591598u, 1104130938u, 4160749568u, 1072306603u, 2147483648u, 0, MODF_TOLERANCE, 0},
+{ 861, 1051092760u, 2798720100u, 0u, 0u, 1051092760u, 2798720100u, 0, MODF_TOLERANCE, 0},
+{ 862, 1086978789u, 449990704u, 1086978688u, 0u, 1072252596u, 2483814400u, 0, MODF_TOLERANCE, 0},
+{ 863, 3231198415u, 4039516226u, 3231198208u, 0u, 3217686040u, 3288875008u, 0, MODF_TOLERANCE, 0},
+{ 864, 3244344107u, 4272932619u, 3244344107u, 3758096384u, 3220090823u, 184549376u, 0, MODF_TOLERANCE, 0},
+{ 865, 3222708441u, 1683007544u, 3222536192u, 0u, 3219457739u, 579158464u, 0, MODF_TOLERANCE, 0},
+{ 866, 1091105663u, 3805494321u, 1091105656u, 0u, 1072663372u, 4039376896u, 0, MODF_TOLERANCE, 0},
+{ 867, 3220852948u, 2072627412u, 3220176896u, 0u, 3219431848u, 4145254824u, 0, MODF_TOLERANCE, 0},
+{ 868, 1094383324u, 3394151662u, 1094383324u, 0u, 1072253396u, 2646605824u, 0, MODF_TOLERANCE, 0},
+{ 869, 3220570024u, 1120106427u, 3220176896u, 0u, 3218603681u, 185458412u, 0, MODF_TOLERANCE, 0},
+{ 870, 3223631624u, 3404608264u, 3223584768u, 0u, 3218530585u, 1573282048u, 0, MODF_TOLERANCE, 0},
+{ 871, 1097859997u, 559918757u, 1097859997u, 536870912u, 1068890858u, 1342177280u, 0, MODF_TOLERANCE, 0},
+{ 872, 3205077053u, 908100198u, 2147483648u, 0u, 3205077053u, 908100198u, 0, MODF_TOLERANCE, 0},
+{ 873, 1042677918u, 2026673913u, 0u, 0u, 1042677918u, 2026673913u, 0, MODF_TOLERANCE, 0},
+{ 874, 3244833635u, 2844573214u, 3244833635u, 2684354560u, 3218282876u, 1006632960u, 0, MODF_TOLERANCE, 0},
+{ 875, 3254567259u, 3946837259u, 3254567259u, 3945791488u, 3220171286u, 0u, 0, MODF_TOLERANCE, 0},
+{ 876, 3234993796u, 3850406820u, 3234993792u, 0u, 3216217602u, 781189120u, 0, MODF_TOLERANCE, 0},
+{ 877, 1057479809u, 3139330994u, 0u, 0u, 1057479809u, 3139330994u, 0, MODF_TOLERANCE, 0},
+{ 878, 1046133568u, 1539650690u, 0u, 0u, 1046133568u, 1539650690u, 0, MODF_TOLERANCE, 0},
+{ 879, 3236705500u, 1554593884u, 3236705472u, 0u, 3219938473u, 945553408u, 0, MODF_TOLERANCE, 0},
+{ 880, 3228899878u, 2813752562u, 3228897280u, 0u, 3219410255u, 1827267584u, 0, MODF_TOLERANCE, 0},
+{ 881, 1056505004u, 3804703138u, 0u, 0u, 1056505004u, 3804703138u, 0, MODF_TOLERANCE, 0},
+{ 882, 1072931071u, 2053677923u, 1072693248u, 0u, 1070401531u, 3544521496u, 0, MODF_TOLERANCE, 0},
+{ 883, 3244864299u, 289355864u, 3244864299u, 0u, 3219210040u, 1476395008u, 0, MODF_TOLERANCE, 0},
+{ 884, 1078453818u, 2143066338u, 1078427648u, 0u, 1072271007u, 4012259456u, 0, MODF_TOLERANCE, 0},
+{ 885, 3203939880u, 2157691971u, 2147483648u, 0u, 3203939880u, 2157691971u, 0, MODF_TOLERANCE, 0},
+{ 886, 1106629150u, 110806409u, 1106629150u, 110100480u, 1072007954u, 0u, 0, MODF_TOLERANCE, 0},
+{ 887, 1082157019u, 3570399481u, 1082155008u, 0u, 1072656211u, 1071899648u, 0, MODF_TOLERANCE, 0},
+{ 888, 1085637605u, 180265334u, 1085637376u, 0u, 1072472407u, 3559833600u, 0, MODF_TOLERANCE, 0},
+{ 889, 3200980182u, 558779875u, 2147483648u, 0u, 3200980182u, 558779875u, 0, MODF_TOLERANCE, 0},
+{ 890, 3202046748u, 2338464653u, 2147483648u, 0u, 3202046748u, 2338464653u, 0, MODF_TOLERANCE, 0},
+{ 891, 1045705464u, 1703969219u, 0u, 0u, 1045705464u, 1703969219u, 0, MODF_TOLERANCE, 0},
+{ 892, 3229797258u, 1417521063u, 3229796352u, 0u, 3218887331u, 3980212224u, 0, MODF_TOLERANCE, 0},
+{ 893, 3237782261u, 3917440951u, 3237782256u, 0u, 3218580989u, 2665218048u, 0, MODF_TOLERANCE, 0},
+{ 894, 1051668894u, 3736066983u, 0u, 0u, 1051668894u, 3736066983u, 0, MODF_TOLERANCE, 0},
+{ 895, 1064752080u, 3106613409u, 0u, 0u, 1064752080u, 3106613409u, 0, MODF_TOLERANCE, 0},
+{ 896, 1066627453u, 2735392257u, 0u, 0u, 1066627453u, 2735392257u, 0, MODF_TOLERANCE, 0},
+{ 897, 1065665372u, 2229777605u, 0u, 0u, 1065665372u, 2229777605u, 0, MODF_TOLERANCE, 0},
+{ 898, 1065061963u, 2405869925u, 0u, 0u, 1065061963u, 2405869925u, 0, MODF_TOLERANCE, 0},
+{ 899, 3239463229u, 3967957902u, 3239463228u, 0u, 3219048483u, 3101687808u, 0, MODF_TOLERANCE, 0},
+{ 900, 1057416138u, 3459188071u, 0u, 0u, 1057416138u, 3459188071u, 0, MODF_TOLERANCE, 0},
+{ 901, 1068639210u, 3699016825u, 0u, 0u, 1068639210u, 3699016825u, 0, MODF_TOLERANCE, 0},
+{ 902, 3249713090u, 796144848u, 3249713090u, 788529152u, 3218935092u, 0u, 0, MODF_TOLERANCE, 0},
+{ 903, 3228816396u, 3285165564u, 3228815360u, 0u, 3218092815u, 1050144768u, 0, MODF_TOLERANCE, 0},
+{ 904, 3211948811u, 401510871u, 2147483648u, 0u, 3211948811u, 401510871u, 0, MODF_TOLERANCE, 0},
+{ 905, 1094257658u, 634857910u, 1094257658u, 0u, 1069738900u, 3674210304u, 0, MODF_TOLERANCE, 0},
+{ 906, 3199607513u, 914218057u, 2147483648u, 0u, 3199607513u, 914218057u, 0, MODF_TOLERANCE, 0},
+{ 907, 1083743336u, 2030735578u, 1083743232u, 0u, 1069162050u, 2755035136u, 0, MODF_TOLERANCE, 0},
+{ 908, 3233855943u, 965677531u, 3233855872u, 0u, 3219246691u, 3296116736u, 0, MODF_TOLERANCE, 0},
+{ 909, 1079556815u, 3957229084u, 1079541760u, 0u, 1072523253u, 4014149120u, 0, MODF_TOLERANCE, 0},
+{ 910, 1051050470u, 3123776651u, 0u, 0u, 1051050470u, 3123776651u, 0, MODF_TOLERANCE, 0},
+{ 911, 3221863333u, 162122081u, 3221749760u, 0u, 3217799760u, 2593953296u, 0, MODF_TOLERANCE, 0},
+{ 912, 3239376395u, 108064594u, 3239376392u, 0u, 3219665799u, 2056257536u, 0, MODF_TOLERANCE, 0},
+{ 913, 3237271786u, 869031839u, 3237271776u, 0u, 3219416984u, 3208511488u, 0, MODF_TOLERANCE, 0},
+{ 914, 3225020876u, 1344301606u, 3224961024u, 0u, 3219995018u, 67978432u, 0, MODF_TOLERANCE, 0},
+{ 915, 3214433474u, 946696117u, 2147483648u, 0u, 3214433474u, 946696117u, 0, MODF_TOLERANCE, 0},
+{ 916, 3231825228u, 1700703647u, 3231824896u, 0u, 3219441237u, 3940151296u, 0, MODF_TOLERANCE, 0},
+{ 917, 1075492875u, 3394168074u, 1075314688u, 0u, 1072021598u, 1383540816u, 0, MODF_TOLERANCE, 0},
+{ 918, 1076939786u, 1666995668u, 1076887552u, 0u, 1072267596u, 1804253824u, 0, MODF_TOLERANCE, 0},
+{ 919, 3208774795u, 2488789804u, 2147483648u, 0u, 3208774795u, 2488789804u, 0, MODF_TOLERANCE, 0},
+{ 920, 3238508333u, 1506943664u, 3238508328u, 0u, 3219482440u, 2327838720u, 0, MODF_TOLERANCE, 0},
+{ 921, 1072788663u, 3844072288u, 1072693248u, 0u, 1068977022u, 1375614464u, 0, MODF_TOLERANCE, 0},
+{ 922, 3202592279u, 2630019853u, 2147483648u, 0u, 3202592279u, 2630019853u, 0, MODF_TOLERANCE, 0},
+{ 923, 3219934542u, 1244307192u, 2147483648u, 0u, 3219934542u, 1244307192u, 0, MODF_TOLERANCE, 0},
+{ 924, 3191297711u, 2540916692u, 2147483648u, 0u, 3191297711u, 2540916692u, 0, MODF_TOLERANCE, 0},
+{ 925, 3200062692u, 2871645739u, 2147483648u, 0u, 3200062692u, 2871645739u, 0, MODF_TOLERANCE, 0},
+{ 926, 3239081581u, 1440249115u, 3239081580u, 0u, 3218431367u, 1370488832u, 0, MODF_TOLERANCE, 0},
+{ 927, 1068350633u, 1231934926u, 0u, 0u, 1068350633u, 1231934926u, 0, MODF_TOLERANCE, 0},
+{ 928, 3236746788u, 603977748u, 3236746784u, 0u, 3217068031u, 3763339264u, 0, MODF_TOLERANCE, 0},
+{ 929, 3195449689u, 2386312545u, 2147483648u, 0u, 3195449689u, 2386312545u, 0, MODF_TOLERANCE, 0},
+{ 930, 1063169277u, 2715234268u, 0u, 0u, 1063169277u, 2715234268u, 0, MODF_TOLERANCE, 0},
+{ 931, 1087803418u, 915867083u, 1087803392u, 0u, 1071265431u, 97189888u, 0, MODF_TOLERANCE, 0},
+{ 932, 1046790892u, 3347417612u, 0u, 0u, 1046790892u, 3347417612u, 0, MODF_TOLERANCE, 0},
+{ 933, 1105984188u, 3553288373u, 1105984188u, 3552575488u, 1070973290u, 0u, 0, MODF_TOLERANCE, 0},
+{ 934, 1065698616u, 2906680663u, 0u, 0u, 1065698616u, 2906680663u, 0, MODF_TOLERANCE, 0},
+{ 935, 1045506226u, 2342364630u, 0u, 0u, 1045506226u, 2342364630u, 0, MODF_TOLERANCE, 0},
+{ 936, 1051356723u, 4019093203u, 0u, 0u, 1051356723u, 4019093203u, 0, MODF_TOLERANCE, 0},
+{ 937, 3201169162u, 2911548084u, 2147483648u, 0u, 3201169162u, 2911548084u, 0, MODF_TOLERANCE, 0},
+{ 938, 1105282515u, 2476735795u, 1105282515u, 2474639360u, 1072692531u, 0u, 0, MODF_TOLERANCE, 0},
+{ 939, 1050472772u, 1836216409u, 0u, 0u, 1050472772u, 1836216409u, 0, MODF_TOLERANCE, 0},
+{ 940, 1101062307u, 2519592554u, 1101062307u, 2516582400u, 1068955445u, 0u, 0, MODF_TOLERANCE, 0},
+{ 941, 1070178161u, 1235369496u, 0u, 0u, 1070178161u, 1235369496u, 0, MODF_TOLERANCE, 0},
+{ 942, 3222946447u, 668087854u, 3222798336u, 0u, 3219264633u, 1049735536u, 0, MODF_TOLERANCE, 0},
+{ 943, 3208554596u, 2981820811u, 2147483648u, 0u, 3208554596u, 2981820811u, 0, MODF_TOLERANCE, 0},
+{ 944, 1059838516u, 2845580478u, 0u, 0u, 1059838516u, 2845580478u, 0, MODF_TOLERANCE, 0},
+{ 945, 3193931414u, 1565550570u, 2147483648u, 0u, 3193931414u, 1565550570u, 0, MODF_TOLERANCE, 0},
+{ 946, 3217165795u, 4162017137u, 2147483648u, 0u, 3217165795u, 4162017137u, 0, MODF_TOLERANCE, 0},
+{ 947, 3237251378u, 2808968027u, 3237251376u, 0u, 3217374059u, 2597847040u, 0, MODF_TOLERANCE, 0},
+{ 948, 1055630096u, 1782326814u, 0u, 0u, 1055630096u, 1782326814u, 0, MODF_TOLERANCE, 0},
+{ 949, 1053576974u, 1492622658u, 0u, 0u, 1053576974u, 1492622658u, 0, MODF_TOLERANCE, 0},
+{ 950, 3216653077u, 3972512122u, 2147483648u, 0u, 3216653077u, 3972512122u, 0, MODF_TOLERANCE, 0},
+{ 951, 3222171679u, 2722693603u, 3221749760u, 0u, 3219767422u, 2300839820u, 0, MODF_TOLERANCE, 0},
+{ 952, 3227814791u, 3169731970u, 3227811840u, 0u, 3218542457u, 3700098048u, 0, MODF_TOLERANCE, 0},
+{ 953, 3217906631u, 899763203u, 2147483648u, 0u, 3217906631u, 899763203u, 0, MODF_TOLERANCE, 0},
+{ 954, 3207606001u, 2804747833u, 2147483648u, 0u, 3207606001u, 2804747833u, 0, MODF_TOLERANCE, 0},
+{ 955, 3230670325u, 3789058912u, 3230669824u, 0u, 3219086877u, 2268463104u, 0, MODF_TOLERANCE, 0},
+{ 956, 3228095081u, 4135937628u, 3228090368u, 0u, 3219286518u, 2238077952u, 0, MODF_TOLERANCE, 0},
+{ 957, 1060199382u, 1682808307u, 0u, 0u, 1060199382u, 1682808307u, 0, MODF_TOLERANCE, 0},
+{ 958, 3206960335u, 232877759u, 2147483648u, 0u, 3206960335u, 232877759u, 0, MODF_TOLERANCE, 0},
+{ 959, 3242091486u, 2851963139u, 3242091486u, 0u, 3219472304u, 543162368u, 0, MODF_TOLERANCE, 0},
+{ 960, 3246852961u, 2590862592u, 3246852961u, 2550136832u, 3218303848u, 0u, 0, MODF_TOLERANCE, 0},
+{ 961, 1081200406u, 2422232642u, 1081196544u, 0u, 1072573728u, 3232531456u, 0, MODF_TOLERANCE, 0},
+{ 962, 3234779662u, 290458310u, 3234779648u, 0u, 3216777888u, 361496576u, 0, MODF_TOLERANCE, 0},
+{ 963, 3210671078u, 1082582386u, 2147483648u, 0u, 3210671078u, 1082582386u, 0, MODF_TOLERANCE, 0},
+{ 964, 1075605675u, 2602133689u, 1075576832u, 0u, 1069296358u, 3327798848u, 0, MODF_TOLERANCE, 0},
+{ 965, 3239818611u, 1789635787u, 3239818608u, 0u, 3219871069u, 1717043200u, 0, MODF_TOLERANCE, 0},
+{ 966, 1059414278u, 1048286093u, 0u, 0u, 1059414278u, 1048286093u, 0, MODF_TOLERANCE, 0},
+{ 967, 1098330542u, 231339448u, 1098330542u, 0u, 1072403435u, 1879048192u, 0, MODF_TOLERANCE, 0},
+{ 968, 1055573265u, 504907415u, 0u, 0u, 1055573265u, 504907415u, 0, MODF_TOLERANCE, 0},
+{ 969, 1063211461u, 1153251200u, 0u, 0u, 1063211461u, 1153251200u, 0, MODF_TOLERANCE, 0},
+{ 970, 3204617090u, 1772013857u, 2147483648u, 0u, 3204617090u, 1772013857u, 0, MODF_TOLERANCE, 0},
+{ 971, 1099551055u, 1082898276u, 1099551055u, 1073741824u, 1068594924u, 2147483648u, 0, MODF_TOLERANCE, 0},
+{ 972, 3212089272u, 1449080862u, 2147483648u, 0u, 3212089272u, 1449080862u, 0, MODF_TOLERANCE, 0},
+{ 973, 1086008285u, 3177299045u, 1086008064u, 0u, 1072412588u, 931962880u, 0, MODF_TOLERANCE, 0},
+{ 974, 1058862813u, 809400815u, 0u, 0u, 1058862813u, 809400815u, 0, MODF_TOLERANCE, 0},
+{ 975, 3230854550u, 1924429710u, 3230854144u, 0u, 3218695979u, 1199104000u, 0, MODF_TOLERANCE, 0},
+{ 976, 1056464743u, 3349283177u, 0u, 0u, 1056464743u, 3349283177u, 0, MODF_TOLERANCE, 0},
+{ 977, 3245473391u, 42238036u, 3245473391u, 0u, 3217302530u, 2684354560u, 0, MODF_TOLERANCE, 0},
+{ 978, 1042379500u, 2113559863u, 0u, 0u, 1042379500u, 2113559863u, 0, MODF_TOLERANCE, 0},
+{ 979, 1064761243u, 3304403230u, 0u, 0u, 1064761243u, 3304403230u, 0, MODF_TOLERANCE, 0},
+{ 980, 3217556703u, 58952646u, 2147483648u, 0u, 3217556703u, 58952646u, 0, MODF_TOLERANCE, 0},
+{ 981, 3212669530u, 1645486982u, 2147483648u, 0u, 3212669530u, 1645486982u, 0, MODF_TOLERANCE, 0},
+{ 982, 3224301095u, 3636267471u, 3224240128u, 0u, 3218982139u, 396442080u, 0, MODF_TOLERANCE, 0},
+{ 983, 1062762009u, 619402181u, 0u, 0u, 1062762009u, 619402181u, 0, MODF_TOLERANCE, 0},
+{ 984, 3235208235u, 557360557u, 3235208192u, 0u, 3219493020u, 1389789184u, 0, MODF_TOLERANCE, 0},
+{ 985, 3238238394u, 110029735u, 3238238392u, 0u, 3218093175u, 1563951104u, 0, MODF_TOLERANCE, 0},
+{ 986, 1046937383u, 984375729u, 0u, 0u, 1046937383u, 984375729u, 0, MODF_TOLERANCE, 0},
+{ 987, 3189496738u, 4063688092u, 2147483648u, 0u, 3189496738u, 4063688092u, 0, MODF_TOLERANCE, 0},
+{ 988, 3203235744u, 1049950343u, 2147483648u, 0u, 3203235744u, 1049950343u, 0, MODF_TOLERANCE, 0},
+{ 989, 1062350619u, 650996069u, 0u, 0u, 1062350619u, 650996069u, 0, MODF_TOLERANCE, 0},
+{ 990, 1054971928u, 3953359826u, 0u, 0u, 1054971928u, 3953359826u, 0, MODF_TOLERANCE, 0},
+{ 991, 3227055805u, 66926332u, 3227041792u, 0u, 3219873409u, 4271603200u, 0, MODF_TOLERANCE, 0},
+{ 992, 1090561839u, 1379780888u, 1090561832u, 0u, 1072515319u, 610271232u, 0, MODF_TOLERANCE, 0},
+{ 993, 3233453307u, 2803378256u, 3233453056u, 0u, 3220141283u, 84541440u, 0, MODF_TOLERANCE, 0},
+{ 994, 1086057989u, 498534626u, 1086057984u, 0u, 1066694364u, 596115456u, 0, MODF_TOLERANCE, 0},
+{ 995, 1082618553u, 2846400785u, 1082617856u, 0u, 1070976333u, 1158187008u, 0, MODF_TOLERANCE, 0},
+{ 996, 1047142525u, 1375153550u, 0u, 0u, 1047142525u, 1375153550u, 0, MODF_TOLERANCE, 0},
+{ 997, 1044581201u, 2869128958u, 0u, 0u, 1044581201u, 2869128958u, 0, MODF_TOLERANCE, 0},
+{ 998, 1070972315u, 4246440273u, 0u, 0u, 1070972315u, 4246440273u, 0, MODF_TOLERANCE, 0},
+{ 999, 1051832506u, 3112381207u, 0u, 0u, 1051832506u, 3112381207u, 0, MODF_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_MODF_H multiple inclusion protection
+
+// EOF modf.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/pow.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/pow.c
new file mode 100644
index 0000000000..518503dc11
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/pow.c
@@ -0,0 +1,115 @@
+//===========================================================================
+//
+// pow.c
+//
+// Test of pow() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/pow.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(pow_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &pow, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_DOUBLE,
+ &pow_vec[0], vec_size );
+
+ if (ret==true) {
+ CYG_TEST_PASS("pow() is stable");
+ } // if
+ else {
+ CYG_TEST_FAIL("pow() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library pow() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "pow() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF pow.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/pow.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/pow.h
new file mode 100644
index 0000000000..28ddc77b1a
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/pow.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_POW_H
+#define CYGONCE_LIBM_POW_H
+//===========================================================================
+//
+// pow.h
+//
+// Test vectors for testing of pow() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/pow.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define POW_TOLERANCE 2.0E-04
+
+static const Cyg_libm_test_double_vec_t pow_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1077999148u, 2506787616u, 1090024059u, 3619148316u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 2, 3218153654u, 3176730980u, 1051524793u, 2993920299u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 3, 3239659803u, 2725707538u, 3232101343u, 2346810316u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 4, 1092554362u, 2088062470u, 3201242716u, 420891118u, 1072693145u, 3786322490u, 0, POW_TOLERANCE, 0},
+{ 5, 3221200677u, 2636405208u, 1100049309u, 471635570u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 6, 1089363191u, 1746012320u, 1054478713u, 3333988501u, 1072693319u, 4023770303u, 0, POW_TOLERANCE, 0},
+{ 7, 1047953160u, 183014794u, 3202039382u, 2016785810u, 1072693358u, 4241580334u, 0, POW_TOLERANCE, 0},
+{ 8, 3213486034u, 2688957927u, 1046089230u, 2709029994u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 9, 1058795730u, 624574473u, 1045840574u, 3473266330u, 1072693247u, 2586970110u, 0, POW_TOLERANCE, 0},
+{ 10, 3204919842u, 1605286142u, 1068931671u, 4233776869u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 11, 1060343410u, 1857607719u, 3222889559u, 3417070006u, 1150564421u, 1162045912u, 0, POW_TOLERANCE, 0},
+{ 12, 1103599987u, 3981151660u, 1088899021u, 1332651746u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 13, 1085298022u, 3824988054u, 1066856791u, 2070129652u, 1072908638u, 3920397298u, 0, POW_TOLERANCE, 0},
+{ 14, 3207559790u, 1372884064u, 1080833116u, 3229926662u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 15, 1093826501u, 3217805330u, 3191644264u, 2014578707u, 1072693247u, 3454103437u, 0, POW_TOLERANCE, 0},
+{ 16, 1102287487u, 265058758u, 3239903247u, 1630600647u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 17, 1071124229u, 1946677669u, 3198462609u, 926009897u, 1072693248u, 2713833020u, 0, POW_TOLERANCE, 0},
+{ 18, 1072130299u, 2271884183u, 3203741999u, 2118617783u, 1072693254u, 2722102995u, 0, POW_TOLERANCE, 0},
+{ 19, 3194849109u, 213658772u, 3249401130u, 314151656u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 20, 3254112288u, 1564829925u, 3197817016u, 497230814u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 21, 3216262634u, 2075329122u, 3231746400u, 169900577u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 22, 1049848642u, 541549344u, 1096608669u, 3119070100u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 23, 1085427055u, 567496114u, 1045286891u, 1969998540u, 1072693248u, 528438245u, 0, POW_TOLERANCE, 0},
+{ 24, 1060548195u, 1299369769u, 1049342524u, 4167404066u, 1072693244u, 2368530347u, 0, POW_TOLERANCE, 0},
+{ 25, 3208865645u, 3348930841u, 1078472138u, 358457347u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 26, 1071069297u, 2192461366u, 1099527247u, 3184735642u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 27, 1052861772u, 331696577u, 3189610016u, 793242270u, 1072693248u, 101495031u, 0, POW_TOLERANCE, 0},
+{ 28, 3252528934u, 2322696981u, 1083791358u, 3020766674u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 29, 1044902177u, 252085215u, 3214426435u, 4139068910u, 1073262651u, 1446941025u, 0, POW_TOLERANCE, 0},
+{ 30, 3222505725u, 105589263u, 1056316170u, 261630827u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 31, 1107213408u, 428765703u, 3251828686u, 2009972239u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 32, 1098568019u, 3517376586u, 3240257920u, 3304487302u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 33, 3233537912u, 237004814u, 3237899261u, 3364008659u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 34, 3195247552u, 472004928u, 3226869477u, 1186387580u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 35, 1054226850u, 4085763910u, 1106394906u, 2684738273u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 36, 1057053639u, 2055490142u, 3231581370u, 3879040079u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 37, 3188976647u, 3725731239u, 1061652681u, 591292963u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 38, 3225014981u, 1147041027u, 3215417793u, 624695933u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 39, 3206052774u, 705725219u, 3238067573u, 1116238321u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 40, 3207367088u, 7287411u, 1045917232u, 116067742u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 41, 3240055222u, 3604989074u, 1066381836u, 545298780u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 42, 3219080936u, 1681476121u, 1060345752u, 3553822398u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 43, 1102831658u, 3410480388u, 1052460275u, 1660607230u, 1072693282u, 105881969u, 0, POW_TOLERANCE, 0},
+{ 44, 1089216869u, 1494984673u, 3196647153u, 287894723u, 1072693243u, 3110586331u, 0, POW_TOLERANCE, 0},
+{ 45, 1054885127u, 644548665u, 1081948134u, 2442134629u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 46, 1087554095u, 2312530895u, 3221584595u, 3379665576u, 1032568590u, 3663273235u, 0, POW_TOLERANCE, 0},
+{ 47, 1096085375u, 3018463866u, 1086226574u, 404012923u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 48, 1064733299u, 1710279345u, 3251401196u, 3528946000u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 49, 1061536351u, 2164450219u, 1083520023u, 3312018966u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 50, 1057248676u, 2648986431u, 1050330591u, 1474376550u, 1072693239u, 2154876465u, 0, POW_TOLERANCE, 0},
+{ 51, 3194422028u, 1839068700u, 1077406406u, 3013052171u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 52, 1046493630u, 772102380u, 3220729740u, 4219039958u, 1112654033u, 3065397925u, 0, POW_TOLERANCE, 0},
+{ 53, 3229472221u, 3058618779u, 1046304788u, 3338676024u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 54, 1051172137u, 506286854u, 1094907481u, 2217000199u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 55, 1082428310u, 1147428263u, 1065432625u, 3034786717u, 1072752013u, 2853960467u, 0, POW_TOLERANCE, 0},
+{ 56, 1082016752u, 2844125311u, 1082985198u, 2561492677u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 57, 3211536916u, 704542600u, 3222902057u, 2762779203u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 58, 3199680614u, 184131949u, 3249723525u, 1667366082u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 59, 3223609598u, 3904224140u, 1067056698u, 2942159914u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 60, 1100636863u, 426114282u, 3209056785u, 1083606355u, 1072666955u, 585952463u, 0, POW_TOLERANCE, 0},
+{ 61, 1106165945u, 3774123863u, 1106787580u, 2722107965u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 62, 1088005092u, 1377734762u, 1104232051u, 2377063483u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 63, 1069380559u, 1029739074u, 1105467109u, 3062201018u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 64, 3234741597u, 773857656u, 3214251949u, 335833884u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 65, 3203224610u, 1473865960u, 1103073830u, 4000427507u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 66, 1103185231u, 4242092620u, 1067009473u, 14539161u, 1073370007u, 2844524197u, 0, POW_TOLERANCE, 0},
+{ 67, 3192516074u, 1732245037u, 1101371955u, 1533536108u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 68, 3249153995u, 1833841275u, 1099430098u, 4144145552u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 69, 3244270463u, 935007012u, 3188865420u, 604442938u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 70, 3206903253u, 2211464602u, 1046255144u, 1635910526u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 71, 1077871417u, 2549219008u, 3231633258u, 3733639385u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 72, 1082095089u, 1819374372u, 3202219056u, 2617077637u, 1072693154u, 3128651096u, 0, POW_TOLERANCE, 0},
+{ 73, 1094345280u, 546465680u, 1048653554u, 532401530u, 1072693249u, 3986499474u, 0, POW_TOLERANCE, 0},
+{ 74, 1044571091u, 2759019783u, 3221570188u, 3554409630u, 1147229759u, 3625827792u, 0, POW_TOLERANCE, 0},
+{ 75, 3212931282u, 2527221960u, 1099107978u, 2696971136u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 76, 1097158000u, 173134582u, 1087299442u, 2877794600u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 77, 1086400474u, 547642046u, 3197285510u, 3521286127u, 1072693242u, 2972243163u, 0, POW_TOLERANCE, 0},
+{ 78, 1074860702u, 1231582831u, 1090971734u, 1653446832u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 79, 1061342535u, 3762182190u, 3252967851u, 2615360375u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 80, 3200834423u, 2588067350u, 3206610957u, 3551059728u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 81, 3206978856u, 845263327u, 1073415902u, 1749010288u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 82, 3205576370u, 3092685191u, 3190678390u, 2872219490u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 83, 3218315055u, 4107255722u, 3205337291u, 3069068345u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 84, 3243990857u, 2294867524u, 3216653996u, 2860384670u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 85, 3193326350u, 2265437201u, 3240198679u, 1234948614u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 86, 3216359929u, 1186945904u, 3251167793u, 1896750851u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 87, 1081575478u, 3686084548u, 1079286273u, 3309277689u, 1812026121u, 3205070032u, 0, POW_TOLERANCE, 0},
+{ 88, 3223476240u, 3006860614u, 3231412671u, 2504194724u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 89, 3236149260u, 1948717780u, 1048317852u, 3791803982u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 90, 1064345015u, 4272034420u, 3192982124u, 1526175922u, 1072693248u, 393635233u, 0, POW_TOLERANCE, 0},
+{ 91, 3245817826u, 4108948538u, 1104691287u, 640541190u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 92, 3207257417u, 3259274853u, 1082507103u, 3677038020u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 93, 1083132498u, 3781708548u, 1096584871u, 1207386447u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 94, 3188695272u, 3011191657u, 1103798670u, 1096124830u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 95, 1063235023u, 2540404725u, 3240157452u, 4122845725u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 96, 1083643710u, 311336721u, 3214382367u, 4212533768u, 1072368791u, 3331967454u, 0, POW_TOLERANCE, 0},
+{ 97, 1051139427u, 1769686293u, 3240200923u, 3538602249u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 98, 1078227549u, 508056696u, 1103793878u, 776520138u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 99, 1102910577u, 4064962760u, 1077424413u, 819766631u, 1804775405u, 367049631u, 0, POW_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 856345317u, 2349026083u, 0, POW_TOLERANCE, 0},
+{ 101, 1082295059u, 2514398118u, 1076579751u, 870169764u, 1204464550u, 3895468816u, 0, POW_TOLERANCE, 0},
+{ 102, 3246851392u, 1190259653u, 1069112254u, 3417249840u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 103, 3193663083u, 3467757357u, 3215075200u, 2168175352u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 104, 3239643135u, 1508888184u, 1060430241u, 3524949092u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 105, 3197412883u, 166402802u, 3237198975u, 3572369260u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 106, 1081866822u, 2441536203u, 3202753937u, 3658194573u, 1072693112u, 3524791428u, 0, POW_TOLERANCE, 0},
+{ 107, 1062392908u, 2479742828u, 1062342831u, 4214154303u, 1072677654u, 3530973200u, 0, POW_TOLERANCE, 0},
+{ 108, 1082396794u, 426896765u, 1066474375u, 2201754442u, 1072812838u, 3811918015u, 0, POW_TOLERANCE, 0},
+{ 109, 3195629021u, 2055773734u, 3239267288u, 291396537u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 110, 3236968033u, 874125203u, 3210508124u, 4091098764u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 111, 1065716026u, 120488169u, 3241241441u, 1985269424u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 112, 3206539410u, 2243036871u, 3243941101u, 740033495u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 113, 3209424906u, 1176656356u, 1074261978u, 3588756231u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 114, 3252816791u, 3037249392u, 1061635587u, 1173102190u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 115, 3237209581u, 2882725208u, 1071440059u, 69225090u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 116, 3212663474u, 272319256u, 1072073912u, 2493997123u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 117, 1057720186u, 188610379u, 3232757923u, 2209647371u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 118, 3236758517u, 1990439193u, 1078073146u, 622849962u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 119, 1057135741u, 756052458u, 1081649113u, 2247475162u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 120, 1061623064u, 3878055211u, 3222407050u, 2979438623u, 1122130466u, 549133024u, 0, POW_TOLERANCE, 0},
+{ 121, 3195290997u, 2676398686u, 1105124431u, 3631096636u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 122, 1065079390u, 1697791764u, 3198136112u, 2299842819u, 1072693250u, 2024455320u, 0, POW_TOLERANCE, 0},
+{ 123, 1078084768u, 1931502677u, 3215264397u, 3016456382u, 1072404968u, 3524704578u, 0, POW_TOLERANCE, 0},
+{ 124, 1072253426u, 343404215u, 1061072607u, 4266232536u, 1072693016u, 3909377404u, 0, POW_TOLERANCE, 0},
+{ 125, 3241230836u, 4140316002u, 1082896196u, 868256971u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 126, 1075422810u, 1864139509u, 3187675097u, 3084482407u, 1072693247u, 4287143103u, 0, POW_TOLERANCE, 0},
+{ 127, 3220191323u, 2427162817u, 3234748208u, 2715105792u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 128, 1064600512u, 3943389284u, 1046724025u, 3626825684u, 1072693247u, 2540719625u, 0, POW_TOLERANCE, 0},
+{ 129, 1045423002u, 967350972u, 1093012318u, 448002663u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 130, 3251845859u, 105058217u, 1069733884u, 171786224u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 131, 3189614508u, 2863482262u, 3204997271u, 877784425u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 132, 3202629313u, 2801782962u, 3213604117u, 762347195u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 133, 3233486727u, 2317950339u, 3246333414u, 2135700283u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 134, 1056516397u, 4171919805u, 1082858682u, 2180920863u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 135, 3220149084u, 1918836931u, 1083603224u, 3137821660u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 136, 1103902874u, 3456203663u, 3235600523u, 2335688936u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 137, 1042279322u, 4170235262u, 1051824459u, 521583737u, 1072693203u, 3666743287u, 0, POW_TOLERANCE, 0},
+{ 138, 1081348303u, 1296623194u, 3250673860u, 2442872540u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 139, 1061684277u, 289979405u, 1049514449u, 3865737145u, 1072693244u, 2492356786u, 0, POW_TOLERANCE, 0},
+{ 140, 1075298944u, 3699090239u, 1054539840u, 3259249360u, 1072693260u, 115890741u, 0, POW_TOLERANCE, 0},
+{ 141, 1096418100u, 1619819023u, 1045993352u, 1022642459u, 1072693248u, 1623026018u, 0, POW_TOLERANCE, 0},
+{ 142, 1081433004u, 19455098u, 3229182089u, 2096003654u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 143, 1076297936u, 3803689997u, 1071630912u, 2263729518u, 1074457128u, 1055623878u, 0, POW_TOLERANCE, 0},
+{ 144, 1101357261u, 2816837387u, 1063422305u, 2597606398u, 1072739324u, 66323243u, 0, POW_TOLERANCE, 0},
+{ 145, 1069100169u, 3680967506u, 1040201163u, 179224723u, 1072693247u, 4285111407u, 0, POW_TOLERANCE, 0},
+{ 146, 3188629767u, 978126928u, 1101553990u, 4047893399u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 147, 3222322045u, 4059818629u, 1042678728u, 3640293589u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 148, 3248464040u, 3383497159u, 1070002807u, 1527313008u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 149, 3202707679u, 2599946514u, 1104170406u, 2738675352u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 150, 1105232623u, 3616571377u, 1060859316u, 1130603218u, 1072702734u, 1806600566u, 0, POW_TOLERANCE, 0},
+{ 151, 1076028796u, 3859211180u, 1067940450u, 1744531824u, 1072806990u, 2299535735u, 0, POW_TOLERANCE, 0},
+{ 152, 1042831340u, 1958025850u, 3236511256u, 2472176453u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 153, 3233107089u, 182132862u, 3250520938u, 3924356991u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 154, 3230501884u, 35632886u, 3209806504u, 1453402523u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 155, 1083522102u, 743225214u, 3202890678u, 142917400u, 1072693073u, 753685957u, 0, POW_TOLERANCE, 0},
+{ 156, 1080684976u, 1472665012u, 3203138231u, 256588219u, 1072693098u, 2396337266u, 0, POW_TOLERANCE, 0},
+{ 157, 1094982162u, 1062927000u, 1061134072u, 931677439u, 1072700754u, 2803085140u, 0, POW_TOLERANCE, 0},
+{ 158, 1058377732u, 2320910576u, 1055663370u, 288059864u, 1072692983u, 1273527884u, 0, POW_TOLERANCE, 0},
+{ 159, 1078958093u, 1448349062u, 3199478070u, 3454027134u, 1072693237u, 2367845751u, 0, POW_TOLERANCE, 0},
+{ 160, 3237458798u, 4215445172u, 3196654963u, 2231888973u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 161, 3246632231u, 40413554u, 3232578253u, 983832844u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 162, 3223721534u, 3995725873u, 1050082319u, 777231627u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 163, 1040986626u, 672789828u, 3253385962u, 2982787335u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 164, 1068390875u, 2075971825u, 1070166500u, 4034633931u, 1071792003u, 297563882u, 0, POW_TOLERANCE, 0},
+{ 165, 3210046177u, 1018222907u, 3244621407u, 3090050495u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 166, 1067680885u, 937732557u, 3200798890u, 2557898276u, 1072693257u, 3993377207u, 0, POW_TOLERANCE, 0},
+{ 167, 1078342316u, 130346162u, 3223590310u, 275568693u, 1015054848u, 1104031833u, 0, POW_TOLERANCE, 0},
+{ 168, 1042898869u, 3807416441u, 1075961161u, 3706820266u, 807274535u, 1215766468u, 0, POW_TOLERANCE, 0},
+{ 169, 3216099005u, 1710131411u, 1078123323u, 1900790503u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 170, 3238819361u, 3420420033u, 3210844787u, 588423066u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 171, 1049684114u, 1160162008u, 3246307879u, 4265764460u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 172, 1102543434u, 366653268u, 3188814424u, 466059202u, 1072693247u, 4113932245u, 0, POW_TOLERANCE, 0},
+{ 173, 3226627739u, 1325936170u, 3221436876u, 680097612u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 174, 3240391116u, 1827735934u, 3200554324u, 2875599271u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 175, 3191030402u, 3117037091u, 3239246636u, 15838845u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 176, 1051974004u, 749718883u, 3223587064u, 1523766569u, 1279447955u, 3223881881u, 0, POW_TOLERANCE, 0},
+{ 177, 1044833651u, 1966536294u, 3250158026u, 699164258u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 178, 1098048435u, 3759049394u, 1106085272u, 1183789499u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 179, 1081201623u, 1970107747u, 1095245453u, 2308233883u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 180, 1084756444u, 1491017852u, 1041444355u, 1723375725u, 1072693248u, 40388682u, 0, POW_TOLERANCE, 0},
+{ 181, 3216630070u, 1141349287u, 1097465301u, 3403438584u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 182, 3230571908u, 1711085243u, 3250239076u, 1377484108u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 183, 1098385019u, 2880275004u, 1084039594u, 1611394950u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 184, 3234221435u, 2626629370u, 1063771493u, 1499080813u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 185, 1055231263u, 3936262414u, 1103919063u, 3175668759u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 186, 3207981719u, 1270950554u, 3194616071u, 3680565379u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 187, 3208148223u, 1066985223u, 3221613219u, 4089383168u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 188, 3217058839u, 4017329311u, 3208334452u, 1667591498u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 189, 1088164157u, 3154656624u, 1061894279u, 3886344038u, 1072702228u, 2902378676u, 0, POW_TOLERANCE, 0},
+{ 190, 1050652945u, 977586119u, 3209762784u, 953839852u, 1072709304u, 824909217u, 0, POW_TOLERANCE, 0},
+{ 191, 1104965247u, 143071571u, 3206165386u, 913097445u, 1072688773u, 2327140958u, 0, POW_TOLERANCE, 0},
+{ 192, 3190565456u, 1371169579u, 1057079837u, 2594818628u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 193, 3251793336u, 2259342224u, 3217432469u, 1824221478u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 194, 3246834775u, 1576604497u, 1079368611u, 185078728u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 195, 3221679427u, 444800035u, 3243343143u, 1734989302u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1072693248u, 281381u, 0, POW_TOLERANCE, 0},
+{ 197, 3234695968u, 1941318385u, 1045807374u, 792193370u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 198, 3238299666u, 1299392207u, 3212131720u, 3205732280u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 199, 1098698804u, 3035093505u, 1052187689u, 3287702190u, 1072693272u, 3770581006u, 0, POW_TOLERANCE, 0},
+{ 200, 3246676260u, 2160225215u, 1102624859u, 836655570u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 201, 1096723626u, 3360816360u, 3246176356u, 172860634u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 202, 1070995788u, 146831910u, 1051558014u, 2340722078u, 1072693246u, 168811001u, 0, POW_TOLERANCE, 0},
+{ 203, 3230416351u, 1603798153u, 3207725532u, 1099413093u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 204, 3246678378u, 2429340443u, 3190303581u, 3223770005u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 205, 1075882959u, 955542166u, 3230415151u, 275583938u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 206, 1092971882u, 513397822u, 1090646554u, 2089321329u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 207, 3193169876u, 2782073372u, 1046063872u, 4023829068u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 208, 1098564822u, 3242223094u, 3194111199u, 4264674108u, 1072693246u, 3333341511u, 0, POW_TOLERANCE, 0},
+{ 209, 3238510821u, 3506346169u, 1047020885u, 1742757458u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 210, 3192664477u, 1265459564u, 3193450280u, 3650514880u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 211, 1081755890u, 1525260440u, 3235452527u, 2612331392u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 212, 3248668920u, 1263613754u, 3219096387u, 635677201u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 213, 3206272087u, 4140947288u, 3200792376u, 2013265346u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 214, 3249974392u, 1912759945u, 3237045253u, 1351396825u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 215, 3248205162u, 1001433078u, 3206926643u, 2741676659u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 216, 1080923606u, 1088945233u, 1085095743u, 3986114865u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 217, 3215734057u, 831239754u, 1099828675u, 3071308141u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 218, 3225834497u, 3473592372u, 1102759382u, 1309576357u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 219, 3251186706u, 2042340367u, 1091945628u, 2062772374u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 220, 3194765687u, 1840632537u, 1096533424u, 807510337u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 221, 3231451722u, 144814872u, 3212698915u, 2282965697u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 222, 1071236430u, 2552499583u, 3229111426u, 1470130815u, 1608334226u, 2161970735u, 0, POW_TOLERANCE, 0},
+{ 223, 3243093065u, 2858583811u, 1089760910u, 6360994u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 224, 3198264929u, 1614537194u, 1075198900u, 4088705365u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 225, 3250939070u, 3545570051u, 1065221325u, 1629217700u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 227, 3196802686u, 2406734491u, 1042055360u, 89226663u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 228, 3195751081u, 1618759139u, 3194723421u, 3888234802u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 229, 1055357248u, 3590035633u, 3212424262u, 2892456615u, 1072771013u, 386828558u, 0, POW_TOLERANCE, 0},
+{ 230, 3189943060u, 2431246964u, 3241512456u, 183850734u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 231, 1089501101u, 3088319870u, 3211544311u, 862225364u, 1072614281u, 3958437556u, 0, POW_TOLERANCE, 0},
+{ 232, 3235294664u, 3495352775u, 1058576726u, 596957268u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 233, 1046553348u, 1839214511u, 3205004060u, 1923240983u, 1072694093u, 1818476007u, 0, POW_TOLERANCE, 0},
+{ 234, 1058073864u, 739619702u, 3223356436u, 2689885273u, 1193195944u, 2224143502u, 0, POW_TOLERANCE, 0},
+{ 235, 3200324971u, 2143376228u, 1098306332u, 3760236188u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 237, 3214165989u, 2493598049u, 3194927008u, 1689107592u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 238, 3189989959u, 1578976988u, 1066368383u, 2117279163u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 239, 3222988111u, 3425290087u, 1098487295u, 1263412017u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 240, 3208432764u, 3635396812u, 1070999426u, 3965655689u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 241, 1060196346u, 2183973116u, 1101098363u, 1118613350u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 242, 3221946089u, 199516350u, 1078368488u, 164621458u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 243, 3187706018u, 3570940805u, 3230316437u, 3596080877u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 244, 3208209565u, 980880313u, 1079833442u, 884465057u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 245, 1099977124u, 2558179220u, 1052873711u, 1233598120u, 1072693287u, 2758573484u, 0, POW_TOLERANCE, 0},
+{ 246, 1047115221u, 1909994277u, 1085015978u, 2991527452u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 247, 1060855260u, 1680290941u, 1074309900u, 2943870846u, 1036314251u, 1973715692u, 0, POW_TOLERANCE, 0},
+{ 248, 1059496132u, 1451927357u, 3228615456u, 1502585517u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 249, 3236211951u, 751136990u, 3230392165u, 3493275472u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 250, 1098365967u, 1209623292u, 3238056647u, 979495322u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 251, 3250424296u, 1717672108u, 1048120593u, 531240316u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 252, 1054174923u, 3548721654u, 1086112947u, 3391817224u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 253, 1077836851u, 2758195125u, 1100880260u, 2028440924u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 254, 1084223893u, 2750123373u, 3232200256u, 1086294931u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 255, 1043958672u, 2986160931u, 1076097908u, 2540046258u, 786785645u, 3762814253u, 0, POW_TOLERANCE, 0},
+{ 256, 3235476602u, 451471221u, 1064816262u, 4187644495u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 257, 1099460228u, 2439500162u, 1065280276u, 1979490284u, 1072843442u, 3736351208u, 0, POW_TOLERANCE, 0},
+{ 258, 1040415832u, 2283342035u, 1078398157u, 1345997553u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 259, 3213249348u, 179066662u, 1103272172u, 1217337578u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 260, 3211562377u, 3779303391u, 3210023352u, 3115946280u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 261, 3192989874u, 286247089u, 1085153597u, 713645369u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 262, 1093670500u, 1468283899u, 1042831668u, 2022736418u, 1072693248u, 177038445u, 0, POW_TOLERANCE, 0},
+{ 263, 1083139105u, 3305564080u, 1065483445u, 482392433u, 1072758877u, 3815495041u, 0, POW_TOLERANCE, 0},
+{ 264, 3201695807u, 2256346551u, 3222430705u, 2071674991u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 265, 3204024695u, 2295269094u, 1084451053u, 2773103941u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 266, 1078173946u, 1482721827u, 1092243422u, 3125409590u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 267, 3221065973u, 1381740563u, 1071545057u, 2918235653u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 268, 3238715972u, 1105857967u, 3241990046u, 2703723225u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 269, 1043015571u, 174689677u, 1079333374u, 3947057014u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 270, 1090461859u, 2023082423u, 3242081486u, 1169047927u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 271, 1064525899u, 3742487766u, 1043425732u, 194972788u, 1072693247u, 4099459954u, 0, POW_TOLERANCE, 0},
+{ 272, 3213791827u, 2136071361u, 3211529757u, 993675115u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 273, 3213663381u, 210772141u, 3241441539u, 580731413u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 274, 1093840413u, 1751560711u, 1074522705u, 180987057u, 1146599361u, 1320817502u, 0, POW_TOLERANCE, 0},
+{ 275, 1066754591u, 2552236599u, 1088658621u, 2112468655u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 276, 3189290617u, 1578223762u, 3224596567u, 2456166162u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 277, 1058506965u, 2110924310u, 1086207177u, 3161208323u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 278, 3231863394u, 2352173188u, 1079361728u, 4070222179u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 279, 1101012904u, 2481562701u, 1090937016u, 3809489716u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 280, 3197002651u, 330905705u, 1086260896u, 90264431u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 281, 1040729961u, 4162008079u, 3194387916u, 759522153u, 1072693248u, 3975412585u, 0, POW_TOLERANCE, 0},
+{ 282, 1081015037u, 1839697482u, 3216442625u, 2211508949u, 1071873549u, 2820448966u, 0, POW_TOLERANCE, 0},
+{ 283, 3249807211u, 3736863454u, 1063475914u, 3150741666u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 284, 1060785883u, 4200269406u, 3236646101u, 1061812176u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 285, 1080217979u, 106027290u, 3234978297u, 2245237549u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 286, 3246984334u, 2132131375u, 3250483427u, 3449276437u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 287, 1089388778u, 2334440944u, 1105423490u, 4004336184u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 288, 3218772704u, 4090088208u, 1042030013u, 3898658299u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 289, 3207908064u, 2272831437u, 3253082595u, 2639188641u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 290, 1054766684u, 1856594168u, 3189515294u, 4101853676u, 1072693248u, 87290407u, 0, POW_TOLERANCE, 0},
+{ 291, 1076012412u, 2211699255u, 3195060344u, 3865018604u, 1072693247u, 3040077910u, 0, POW_TOLERANCE, 0},
+{ 292, 3242767010u, 996259334u, 3241496889u, 3782673116u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 293, 1099130747u, 3840380763u, 1048674041u, 550040067u, 1072693250u, 1696436778u, 0, POW_TOLERANCE, 0},
+{ 294, 3251419593u, 95874100u, 3237232828u, 2645647822u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 295, 1043665640u, 3441419500u, 3252367038u, 876710419u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 296, 3238593552u, 2560836004u, 3199616543u, 1180840586u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 297, 3221602966u, 2218230392u, 3227485787u, 3947214579u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 298, 1079539654u, 1447312532u, 1081476588u, 780366847u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 299, 1072569643u, 2842113832u, 3216156731u, 225159029u, 1072697900u, 2551805421u, 0, POW_TOLERANCE, 0},
+{ 300, 1098117193u, 1601981129u, 3234628869u, 2236538344u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 301, 1085173524u, 2194185737u, 3242362684u, 87913366u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 302, 3199083880u, 1346862963u, 1077836259u, 3604666660u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 303, 3212255979u, 3115209742u, 1099332326u, 1325101950u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 304, 3224546042u, 3889223100u, 1053247613u, 3371396923u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 305, 3220477868u, 4163120793u, 1075022670u, 1387631215u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 306, 3205481779u, 1532426189u, 1063168268u, 3397022615u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 307, 3201033321u, 89324166u, 1079206060u, 3429424710u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 308, 3192325102u, 747591401u, 1072238381u, 2803213904u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 309, 1091113780u, 271904221u, 1044258318u, 1858545114u, 1072693248u, 386316155u, 0, POW_TOLERANCE, 0},
+{ 310, 3228068914u, 314958082u, 3249912496u, 2966213175u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 311, 3197179414u, 3119528953u, 3217179014u, 2908718240u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 312, 3242467576u, 2018361566u, 1100926600u, 3985805054u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 313, 1070132580u, 409584884u, 3239758947u, 755795129u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 314, 1075772446u, 1819156379u, 3251342302u, 2982669005u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 315, 1101563433u, 2080534280u, 3188254060u, 449171797u, 1072693247u, 4170038984u, 0, POW_TOLERANCE, 0},
+{ 316, 1095956900u, 168744837u, 3214950009u, 1322217822u, 1071881872u, 187466493u, 0, POW_TOLERANCE, 0},
+{ 317, 3254226900u, 3250487255u, 1062120700u, 1876195180u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 318, 3226343480u, 1336400247u, 1098057903u, 3314079581u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 319, 3203678820u, 265025555u, 1063854282u, 3779482256u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 320, 1067300501u, 887044257u, 1054789618u, 2732056261u, 1072693193u, 1996278249u, 0, POW_TOLERANCE, 0},
+{ 321, 1050106742u, 4027115185u, 3191764868u, 2940199511u, 1072693248u, 475078664u, 0, POW_TOLERANCE, 0},
+{ 322, 3202500155u, 2875684421u, 3227459837u, 2251967570u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 323, 1063244412u, 284173546u, 3238823679u, 3557800647u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 324, 1101458560u, 3147771266u, 3220110464u, 2933364246u, 1044672313u, 3419723780u, 0, POW_TOLERANCE, 0},
+{ 325, 1064853160u, 3366183281u, 3234870843u, 537442654u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 326, 3244118788u, 2529029548u, 3249882819u, 3781513577u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 327, 3213436354u, 1080845539u, 3206760016u, 911778687u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 328, 3191951036u, 469586759u, 1091830022u, 3080528840u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 329, 1080249104u, 2863108169u, 3225605506u, 2508274250u, 785500297u, 1983771784u, 0, POW_TOLERANCE, 0},
+{ 330, 3210826984u, 4080017377u, 3206492941u, 1470284690u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 331, 3207120390u, 3867917386u, 1102054928u, 3504746045u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 332, 1064522279u, 2962134101u, 3244741577u, 3390537350u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 333, 1088201813u, 1702237980u, 1071598971u, 1102587474u, 1080238900u, 4082329047u, 0, POW_TOLERANCE, 0},
+{ 334, 3202970118u, 2180218657u, 3211592260u, 1206527853u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 335, 3197084744u, 394130786u, 3242511482u, 2437699868u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 336, 1044237059u, 849581558u, 3252006507u, 2008614943u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 337, 3210140014u, 3128971673u, 3249137531u, 2773583059u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 338, 1085029866u, 590727700u, 3248651761u, 2183878539u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 339, 1101098629u, 820687580u, 3208143496u, 1402434664u, 1072678628u, 3067689733u, 0, POW_TOLERANCE, 0},
+{ 340, 3252290835u, 1873709254u, 3245167989u, 44275991u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 341, 3189668753u, 1174874204u, 3208263730u, 2360372288u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 342, 1103854676u, 937573440u, 3208953761u, 211240241u, 1072666015u, 1047161720u, 0, POW_TOLERANCE, 0},
+{ 343, 3243548934u, 2469774991u, 1043117070u, 3380071805u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 344, 1058121042u, 442507560u, 3254252803u, 3257889649u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 345, 1068850520u, 1854921625u, 1049810168u, 2729627545u, 1072693246u, 2312848366u, 0, POW_TOLERANCE, 0},
+{ 346, 3254712629u, 4001809575u, 3240128649u, 278261523u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 347, 1087224694u, 1793907966u, 3238955714u, 398859249u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 348, 3200952547u, 2511916952u, 3219195283u, 1697158299u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 349, 1069985548u, 3230931724u, 3243897690u, 3508781585u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 350, 1103847606u, 1674254897u, 1046547577u, 217148561u, 1072693248u, 2951604327u, 0, POW_TOLERANCE, 0},
+{ 351, 3211263954u, 3275604304u, 3194840159u, 2991205850u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 352, 3195249375u, 3509997278u, 3248888030u, 3897986511u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 353, 1047182435u, 2156824613u, 1042295665u, 1239257646u, 1072693247u, 4009861912u, 0, POW_TOLERANCE, 0},
+{ 354, 3213264085u, 1073153314u, 3250031627u, 2567234990u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 355, 3190593412u, 4261696995u, 3197784432u, 323702024u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 356, 3243690997u, 4075177615u, 3202791065u, 1919006082u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 357, 3239270013u, 386429966u, 1086504491u, 3698826164u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 358, 1078327190u, 1681986446u, 3194985869u, 3072950140u, 1072693247u, 2288553838u, 0, POW_TOLERANCE, 0},
+{ 359, 3217311933u, 3719038997u, 1055433962u, 3331415058u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 360, 1060749713u, 2420250111u, 3238002206u, 1928661079u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 361, 1081914210u, 3679866727u, 3227386672u, 1273835792u, 0u, 5396u, 0, POW_TOLERANCE, 0},
+{ 362, 1041622738u, 2682092368u, 3234222284u, 1325425811u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 363, 1056312613u, 4175172697u, 3208346191u, 2130706153u, 1072697993u, 2090954347u, 0, POW_TOLERANCE, 0},
+{ 364, 1092089624u, 1200784450u, 1083605096u, 1248595607u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 365, 3213890863u, 1897285171u, 3251296075u, 944966123u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 366, 3241371250u, 2270747330u, 3230692631u, 422503284u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 367, 1084120037u, 2857564741u, 1075647403u, 3308906709u, 1155874651u, 3188353547u, 0, POW_TOLERANCE, 0},
+{ 368, 3203475098u, 1380066948u, 3232612906u, 2613634294u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 369, 1063890856u, 4022784584u, 1060483857u, 3264056381u, 1072689248u, 3108185928u, 0, POW_TOLERANCE, 0},
+{ 370, 1044637404u, 1778509100u, 3213146285u, 2665833973u, 1072909050u, 2720463137u, 0, POW_TOLERANCE, 0},
+{ 371, 3216727300u, 1859175955u, 1079949560u, 4258450607u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 372, 1048277388u, 4128020197u, 1076266146u, 4122840980u, 798449415u, 2426252462u, 0, POW_TOLERANCE, 0},
+{ 373, 3193183163u, 2454653987u, 3229487005u, 2977478685u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 374, 3253556483u, 1355181872u, 1095308770u, 436846481u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 375, 3246605302u, 2592856453u, 3247825559u, 3195234082u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 376, 3222118023u, 3554670043u, 1091621009u, 3321236467u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 377, 1069012833u, 1936670355u, 1095715713u, 2958468553u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 378, 3192291109u, 2960339502u, 1098808013u, 1044068983u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 379, 3196691185u, 4093388677u, 1095478112u, 1735930261u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 380, 1091040302u, 1807398746u, 3195743135u, 4261616162u, 1072693245u, 1774133003u, 0, POW_TOLERANCE, 0},
+{ 381, 3209294194u, 3250576797u, 1059002384u, 3043079652u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 382, 1069207109u, 666051428u, 3208765404u, 1912684117u, 1072694539u, 2184407358u, 0, POW_TOLERANCE, 0},
+{ 383, 1103487420u, 1949030179u, 1096388934u, 896459246u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 384, 1054300653u, 622499767u, 1066707637u, 1490260486u, 1072238894u, 1575406057u, 0, POW_TOLERANCE, 0},
+{ 385, 1106688493u, 1490616165u, 3251242436u, 795675736u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 386, 1080943896u, 3662877092u, 3234317146u, 3200513112u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 387, 1084088786u, 1356101968u, 3236536816u, 3062844611u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 388, 3219922640u, 2284484846u, 3219498359u, 3240896015u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 389, 3235759689u, 494503287u, 1092811254u, 142673998u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 390, 3252125916u, 3394882641u, 3225306538u, 364852125u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 391, 3225261763u, 193885269u, 1088149839u, 1359805831u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 392, 3200484782u, 592580907u, 3199560872u, 3086438952u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 393, 1059518664u, 1778008540u, 1049064687u, 73581647u, 1072693244u, 3564623841u, 0, POW_TOLERANCE, 0},
+{ 394, 3246733598u, 233240285u, 1081923320u, 2710903921u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 395, 1069513767u, 3719878805u, 1079866720u, 3615458228u, 699053901u, 1047947444u, 0, POW_TOLERANCE, 0},
+{ 396, 3221194724u, 3647632375u, 3247225271u, 3839959621u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 397, 1103401096u, 2232210456u, 3235434773u, 224271737u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 398, 3193003684u, 2134662911u, 3190390590u, 4239009051u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 399, 1080526145u, 2305279897u, 1077668039u, 1854523320u, 1293773262u, 1900362721u, 0, POW_TOLERANCE, 0},
+{ 400, 3219864259u, 538224650u, 3206153057u, 1379649610u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 401, 3196410507u, 3683897920u, 3244167599u, 3647579469u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 402, 1090280933u, 2694093608u, 1042775347u, 598406111u, 1072693248u, 143630050u, 0, POW_TOLERANCE, 0},
+{ 403, 3211635392u, 872706833u, 1084802480u, 2200602798u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 404, 1042339597u, 904146293u, 1060867322u, 1729685598u, 1072675645u, 2902661197u, 0, POW_TOLERANCE, 0},
+{ 405, 3195694970u, 1894173462u, 3232800651u, 191960416u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 406, 1091225343u, 3521028551u, 1054522089u, 3287274359u, 1072693330u, 808057802u, 0, POW_TOLERANCE, 0},
+{ 407, 1095386964u, 959640601u, 3201578263u, 4136915018u, 1072693095u, 3960121440u, 0, POW_TOLERANCE, 0},
+{ 408, 1064005451u, 1553716379u, 1106027987u, 984725765u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 409, 3238832641u, 2287646644u, 3240329321u, 2276183378u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 410, 1068209174u, 3940225170u, 3199544434u, 997572161u, 1072693251u, 3719004870u, 0, POW_TOLERANCE, 0},
+{ 411, 3212768361u, 36116288u, 3206886566u, 4196602670u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 412, 3241695853u, 3550227562u, 3207257983u, 2747744117u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 413, 1104236126u, 507130047u, 1048359321u, 3229888373u, 1072693250u, 1458311196u, 0, POW_TOLERANCE, 0},
+{ 414, 3222996778u, 2210969014u, 1081031001u, 1946786091u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 415, 3236306990u, 4059150589u, 3189759234u, 1177045799u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 416, 1093103612u, 2664812822u, 1050343198u, 2034180320u, 1072693253u, 3048254437u, 0, POW_TOLERANCE, 0},
+{ 417, 3213779117u, 1175750283u, 3235559706u, 1424491340u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 418, 3213904193u, 1630036121u, 3231972785u, 3195479448u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 419, 1090429875u, 2527029044u, 1046927050u, 4000723255u, 1072693248u, 2249250707u, 0, POW_TOLERANCE, 0},
+{ 420, 1085208677u, 3335703647u, 3237349676u, 3869440059u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 421, 1091433848u, 3888398377u, 3196041693u, 1290567220u, 1072693244u, 3968038868u, 0, POW_TOLERANCE, 0},
+{ 422, 1066679070u, 3242451480u, 3248384948u, 707431021u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 423, 1083230509u, 2739665123u, 1060777905u, 1733073225u, 1072696176u, 1392301465u, 0, POW_TOLERANCE, 0},
+{ 424, 1078517061u, 1297274853u, 3208848704u, 3341639139u, 1072688466u, 2887746621u, 0, POW_TOLERANCE, 0},
+{ 425, 1046570941u, 2228057309u, 1084318902u, 1317851136u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 426, 1088255327u, 270039934u, 3241414679u, 3063626339u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 427, 3219178350u, 83062251u, 3211262173u, 2659016437u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 428, 1095743886u, 3833539373u, 3206667189u, 1567476111u, 1072688897u, 3409584618u, 0, POW_TOLERANCE, 0},
+{ 429, 3205195072u, 2382776852u, 3249232579u, 1546622468u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 430, 1085536439u, 1714300821u, 1104130938u, 4167591598u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 431, 1051092760u, 2798720100u, 1086978789u, 449990704u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 432, 3231198415u, 4039516226u, 3244344107u, 4272932619u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 433, 3222708441u, 1683007544u, 1091105663u, 3805494321u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 434, 3220852948u, 2072627412u, 1094383324u, 3394151662u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 435, 3220570024u, 1120106427u, 3223631624u, 3404608264u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 436, 1097859997u, 559918757u, 3205077053u, 908100198u, 1072691545u, 2046084509u, 0, POW_TOLERANCE, 0},
+{ 437, 1042677918u, 2026673913u, 3244833635u, 2844573214u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 438, 3254567259u, 3946837259u, 3234993796u, 3850406820u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 439, 1057479809u, 3139330994u, 1046133568u, 1539650690u, 1072693247u, 2053123428u, 0, POW_TOLERANCE, 0},
+{ 440, 3236705500u, 1554593884u, 3228899878u, 2813752562u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 441, 1056505004u, 3804703138u, 1072931071u, 2053677923u, 1052893344u, 1407379810u, 0, POW_TOLERANCE, 0},
+{ 442, 3244864299u, 289355864u, 1078453818u, 2143066338u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 443, 3203939880u, 2157691971u, 1106629150u, 110806409u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 444, 1082157019u, 3570399481u, 1085637605u, 180265334u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 445, 3200980182u, 558779875u, 3202046748u, 2338464653u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 446, 1045705464u, 1703969219u, 3229797258u, 1417521063u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 447, 3237782261u, 3917440951u, 1051668894u, 3736066983u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 448, 1064752080u, 3106613409u, 1066627453u, 2735392257u, 1072496446u, 957191870u, 0, POW_TOLERANCE, 0},
+{ 449, 1065665372u, 2229777605u, 1065061963u, 2405869925u, 1072629459u, 2158296239u, 0, POW_TOLERANCE, 0},
+{ 450, 3239463229u, 3967957902u, 1057416138u, 3459188071u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 451, 1068639210u, 3699016825u, 3249713090u, 796144848u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 452, 3228816396u, 3285165564u, 3211948811u, 401510871u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 453, 1094257658u, 634857910u, 3199607513u, 914218057u, 1072693208u, 1723708036u, 0, POW_TOLERANCE, 0},
+{ 454, 1083743336u, 2030735578u, 3233855943u, 965677531u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 455, 1079556815u, 3957229084u, 1051050470u, 3123776651u, 1072693251u, 531543956u, 0, POW_TOLERANCE, 0},
+{ 456, 3221863333u, 162122081u, 3239376395u, 108064594u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 457, 3237271786u, 869031839u, 3225020876u, 1344301606u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 458, 3214433474u, 946696117u, 3231825228u, 1700703647u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 459, 1075492875u, 3394168074u, 1076939786u, 1666995668u, 1120942639u, 1957855996u, 0, POW_TOLERANCE, 0},
+{ 460, 3208774795u, 2488789804u, 3238508333u, 1506943664u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1072693246u, 1228577461u, 0, POW_TOLERANCE, 0},
+{ 462, 3219934542u, 1244307192u, 3191297711u, 2540916692u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 463, 3200062692u, 2871645739u, 3239081581u, 1440249115u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 464, 1068350633u, 1231934926u, 3236746788u, 603977748u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 465, 3195449689u, 2386312545u, 1063169277u, 2715234268u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 466, 1087803418u, 915867083u, 1046790892u, 3347417612u, 1072693248u, 1749916062u, 0, POW_TOLERANCE, 0},
+{ 467, 1105984188u, 3553288373u, 1065698616u, 2906680663u, 1072963055u, 81307323u, 0, POW_TOLERANCE, 0},
+{ 468, 1045506226u, 2342364630u, 1051356723u, 4019093203u, 1072693218u, 1483421926u, 0, POW_TOLERANCE, 0},
+{ 469, 3201169162u, 2911548084u, 1105282515u, 2476735795u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 470, 1050472772u, 1836216409u, 1101062307u, 2519592554u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 471, 1070178161u, 1235369496u, 3222946447u, 668087854u, 1088607402u, 230317747u, 0, POW_TOLERANCE, 0},
+{ 472, 3208554596u, 2981820811u, 1059838516u, 2845580478u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 473, 3193931414u, 1565550570u, 3217165795u, 4162017137u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 474, 3237251378u, 2808968027u, 1055630096u, 1782326814u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 475, 1053576974u, 1492622658u, 3216653077u, 3972512122u, 1074599716u, 1349128967u, 0, POW_TOLERANCE, 0},
+{ 476, 3222171679u, 2722693603u, 3227814791u, 3169731970u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 477, 3217906631u, 899763203u, 3207606001u, 2804747833u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 478, 3230670325u, 3789058912u, 3228095081u, 4135937628u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 479, 1060199382u, 1682808307u, 3206960335u, 232877759u, 1072694720u, 1901602099u, 0, POW_TOLERANCE, 0},
+{ 480, 3242091486u, 2851963139u, 3246852961u, 2590862592u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 481, 1081200406u, 2422232642u, 3234779662u, 290458310u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 482, 3210671078u, 1082582386u, 1075605675u, 2602133689u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 483, 3239818611u, 1789635787u, 1059414278u, 1048286093u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 484, 1098330542u, 231339448u, 1055573265u, 504907415u, 1072693475u, 2832520792u, 0, POW_TOLERANCE, 0},
+{ 485, 1063211461u, 1153251200u, 3204617090u, 1772013857u, 1072693480u, 2548304715u, 0, POW_TOLERANCE, 0},
+{ 486, 1099551055u, 1082898276u, 3212089272u, 1449080862u, 1072513658u, 1143197041u, 0, POW_TOLERANCE, 0},
+{ 487, 1086008285u, 3177299045u, 1058862813u, 809400815u, 1072694273u, 2275158180u, 0, POW_TOLERANCE, 0},
+{ 488, 3230854550u, 1924429710u, 1056464743u, 3349283177u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 489, 3245473391u, 42238036u, 1042379500u, 2113559863u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 490, 1064761243u, 3304403230u, 3217556703u, 58952646u, 1074080049u, 1235076998u, 0, POW_TOLERANCE, 0},
+{ 491, 3212669530u, 1645486982u, 3224301095u, 3636267471u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 492, 1062762009u, 619402181u, 3235208235u, 557360557u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 493, 3238238394u, 110029735u, 1046937383u, 984375729u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 494, 3189496738u, 4063688092u, 3203235744u, 1049950343u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 495, 1062350619u, 650996069u, 1054971928u, 3953359826u, 1072693128u, 1294650307u, 0, POW_TOLERANCE, 0},
+{ 496, 3227055805u, 66926332u, 1090561839u, 1379780888u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 497, 3233453307u, 2803378256u, 1086057989u, 498534626u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 498, 1082618553u, 2846400785u, 1047142525u, 1375153550u, 1072693248u, 1451010777u, 0, POW_TOLERANCE, 0},
+{ 499, 1044581201u, 2869128958u, 1070972315u, 4246440273u, 1063134044u, 2290995554u, 0, POW_TOLERANCE, 0},
+{ 500, 1051832506u, 3112381207u, 1044430965u, 3981604561u, 1072693247u, 3327983736u, 0, POW_TOLERANCE, 0},
+{ 501, 3231254997u, 243303420u, 1093735824u, 1575581926u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 502, 3239137997u, 3218865041u, 3204803496u, 3840388050u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 503, 1048415431u, 336846959u, 1052664471u, 3798336786u, 1072693187u, 630976724u, 0, POW_TOLERANCE, 0},
+{ 504, 1055954236u, 3639240976u, 1081202165u, 1844741676u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 505, 3211904793u, 717293069u, 3211534283u, 582401011u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 506, 3251962512u, 3766248610u, 3196520332u, 1174437546u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 507, 1083431226u, 756959182u, 3204099341u, 1581804034u, 1072692866u, 3124146731u, 0, POW_TOLERANCE, 0},
+{ 508, 3205806444u, 3560686300u, 3220980617u, 4277975772u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 509, 3209906076u, 2598148853u, 3217622194u, 3460421008u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 510, 1066720824u, 136600515u, 3209934920u, 3340653128u, 1072698173u, 395857824u, 0, POW_TOLERANCE, 0},
+{ 511, 1096820310u, 1045480938u, 3251354609u, 4133432965u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 512, 1091599431u, 1630207738u, 3239996829u, 2393354808u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 513, 3190626018u, 3739770117u, 1059520750u, 3959551225u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 514, 3230730505u, 1498861716u, 1091297147u, 847410798u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 516, 1054849265u, 2353103845u, 3235718771u, 2978889966u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 517, 3251357992u, 1546972125u, 3249076079u, 1987349196u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 518, 3238219513u, 2769161072u, 1075207126u, 292616282u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 519, 3199712298u, 36855311u, 1052128202u, 1479039342u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 520, 1083757053u, 2027463605u, 1066023013u, 3369686340u, 1072797014u, 4289163029u, 0, POW_TOLERANCE, 0},
+{ 521, 3197852749u, 3808681655u, 1054161346u, 1821773119u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 522, 1040685928u, 3175490326u, 3226879970u, 845687760u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 523, 1042302993u, 3124482451u, 3242748377u, 3259417226u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 524, 1045245695u, 2751606436u, 3236210939u, 3923142740u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 525, 1095694737u, 2016872044u, 3228408064u, 4201274408u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 526, 3199349254u, 1019916843u, 3219974785u, 1977881787u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 527, 3199478752u, 2060433318u, 1075872515u, 366073725u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 528, 3191180557u, 1098469906u, 1082900695u, 2349346832u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 529, 3209974707u, 3011196295u, 3252479932u, 2459281672u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 530, 3221334323u, 2843222682u, 1089275809u, 298982001u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 531, 1101737698u, 914741728u, 3203468059u, 2833809843u, 1072692592u, 442763524u, 0, POW_TOLERANCE, 0},
+{ 532, 3236763878u, 1274901962u, 3241535845u, 3759113509u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 533, 3245916442u, 2134927252u, 3253802671u, 3013731444u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 534, 1099201341u, 2230655177u, 3254510616u, 1249674366u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 535, 1062971253u, 717357389u, 1083533731u, 3746683362u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 536, 3213773114u, 834976849u, 3217357661u, 2465861779u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 537, 1045656117u, 1385714428u, 1053358395u, 3007113740u, 1072693136u, 3021333862u, 0, POW_TOLERANCE, 0},
+{ 538, 1050527919u, 599268545u, 3201368210u, 2309854744u, 1072693310u, 766294020u, 0, POW_TOLERANCE, 0},
+{ 539, 1069954454u, 2840234388u, 3232496515u, 333365983u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 540, 1045922781u, 3136078996u, 3194520860u, 2650572904u, 1072693248u, 3627680972u, 0, POW_TOLERANCE, 0},
+{ 541, 3233687691u, 2405805086u, 3251640319u, 324233833u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 542, 1106699146u, 2589598340u, 3254677807u, 952438812u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 543, 3189114773u, 1922837702u, 3216892718u, 3535907549u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 544, 3243615868u, 261447440u, 3209805849u, 1150571079u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 545, 1095805232u, 4026487528u, 1073152064u, 27340691u, 1105866136u, 1622177461u, 0, POW_TOLERANCE, 0},
+{ 546, 3229123692u, 338765118u, 1086225786u, 3207238249u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 547, 3196182703u, 1085283176u, 3187775111u, 1601194210u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 548, 1091520173u, 3031712790u, 3252307859u, 170666844u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 549, 3218862231u, 3148395674u, 1041913758u, 3306391490u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 550, 3201277070u, 2205233857u, 3208100078u, 3993195511u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 551, 1067699608u, 4282766727u, 1072820377u, 1874778218u, 1067103012u, 101891501u, 0, POW_TOLERANCE, 0},
+{ 552, 3210833092u, 2920860798u, 3218070226u, 3104066154u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 553, 3204950351u, 969991373u, 3250596895u, 1734386152u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 554, 3238915818u, 1218740205u, 3239802737u, 2610078504u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 555, 3206031242u, 1485218325u, 3220870240u, 3591664613u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 556, 3202074143u, 690157417u, 3190850619u, 4192347699u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 557, 1096053810u, 4009839784u, 1079670252u, 394167192u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 558, 3234559237u, 961532417u, 1092588071u, 2923790239u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 559, 3203879091u, 4174125604u, 1050682630u, 2169701868u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 560, 3243092475u, 4146748230u, 1087373950u, 2481478351u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 561, 1076987866u, 3984715440u, 1050421618u, 2446142566u, 1072693249u, 1117658652u, 0, POW_TOLERANCE, 0},
+{ 562, 1084172406u, 936290150u, 1100614426u, 3625806370u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 563, 1099787952u, 1866615265u, 3215651428u, 2337013350u, 1071179233u, 1730069180u, 0, POW_TOLERANCE, 0},
+{ 564, 3253198302u, 712227971u, 1106004723u, 973148499u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 565, 3230088199u, 3409813738u, 3244817008u, 1933503498u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 566, 1079943733u, 3180389060u, 3228735703u, 83422217u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 567, 1077878724u, 556972671u, 3204582372u, 841555801u, 1072692999u, 3612892612u, 0, POW_TOLERANCE, 0},
+{ 568, 1070767721u, 4189151332u, 1080874032u, 706326922u, 641863389u, 2038944281u, 0, POW_TOLERANCE, 0},
+{ 569, 1096151307u, 198291836u, 1057281892u, 2188836928u, 1072693896u, 4270014993u, 0, POW_TOLERANCE, 0},
+{ 570, 1078091995u, 1219449298u, 3228734687u, 3504562743u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 571, 3204570464u, 1776099219u, 1094316777u, 4188083896u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 572, 3193845708u, 2614400266u, 1073750227u, 3003203347u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 573, 3213982678u, 2959351406u, 1105603716u, 311851587u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 574, 1084544434u, 865443613u, 1097532516u, 3622237781u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 575, 3231786666u, 447506102u, 3195759295u, 3603669725u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 576, 1097890173u, 3934398273u, 1040996422u, 2968621268u, 1072693248u, 61913147u, 0, POW_TOLERANCE, 0},
+{ 577, 3196739825u, 784208771u, 1088764788u, 2182296421u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 578, 3248332291u, 1527590526u, 3206961556u, 2823164069u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 579, 3236644131u, 3876699591u, 3207481130u, 4028148535u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 580, 1083576186u, 2164249756u, 1059857743u, 1785169952u, 1072694882u, 1402864683u, 0, POW_TOLERANCE, 0},
+{ 581, 1091804009u, 2079273665u, 1080303860u, 625760474u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 582, 3226486108u, 3636214836u, 1068367620u, 2932621925u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 583, 1043995372u, 4274131512u, 1047707755u, 92550763u, 1072693245u, 981334221u, 0, POW_TOLERANCE, 0},
+{ 584, 3198822121u, 2648933384u, 1084603503u, 3534304873u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 585, 1064563235u, 3216750767u, 3191088629u, 547482628u, 1072693248u, 112495850u, 0, POW_TOLERANCE, 0},
+{ 586, 1061084774u, 1420360746u, 1080063101u, 1690029499u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 587, 3229855364u, 1908572179u, 1080112083u, 1228319033u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 588, 1048158178u, 500312015u, 3212368508u, 3864619086u, 1072801307u, 2767779869u, 0, POW_TOLERANCE, 0},
+{ 589, 3221335610u, 4211343447u, 1087492676u, 4272583781u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 590, 1099392394u, 2382118000u, 1042665328u, 567154882u, 1072693248u, 202496693u, 0, POW_TOLERANCE, 0},
+{ 591, 1058013442u, 1435344339u, 3216303171u, 2275988178u, 1073850669u, 3820511026u, 0, POW_TOLERANCE, 0},
+{ 592, 3214538619u, 3403659753u, 3218043030u, 1926480488u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 593, 1076840383u, 1198845185u, 3225556149u, 1130089684u, 922173987u, 2098764000u, 0, POW_TOLERANCE, 0},
+{ 594, 3222663042u, 2183928090u, 1048403956u, 963834821u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 595, 1101672960u, 2120625396u, 1041006976u, 2137548527u, 1072693248u, 71767127u, 0, POW_TOLERANCE, 0},
+{ 596, 1099230238u, 586700956u, 1059670521u, 303891699u, 1072696814u, 471857713u, 0, POW_TOLERANCE, 0},
+{ 597, 3218994498u, 2509132460u, 1102827530u, 2205707903u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 598, 3204860597u, 1229308263u, 3209170414u, 4206576047u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 599, 3224076289u, 4078010749u, 3199236456u, 733478972u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 600, 3197712584u, 4277541051u, 3199806921u, 397102023u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 601, 3195975013u, 900999594u, 3234720188u, 2530214248u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 602, 1076543548u, 4000609478u, 1096577064u, 4148592328u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 603, 1048668084u, 2154187873u, 3224392607u, 3957250362u, 1464278091u, 4074807235u, 0, POW_TOLERANCE, 0},
+{ 604, 3223413488u, 2867079200u, 1101870326u, 921212001u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 605, 3233221890u, 674547716u, 1063216239u, 3929755226u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 606, 3240415851u, 3158182449u, 1043794244u, 3259056345u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 607, 3236776656u, 3002823940u, 1059511739u, 2832435794u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 608, 3217304822u, 2196511929u, 1049973941u, 3672092877u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 609, 1050438056u, 3655292191u, 1086438127u, 3567072906u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 610, 3243186948u, 1617573614u, 3201863123u, 3090723732u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 611, 3233201380u, 679893506u, 3211547753u, 824081024u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 612, 1089530525u, 2285242807u, 1084999409u, 2221731406u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 613, 3206733664u, 1935990727u, 1088822246u, 1058156518u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 614, 1102839166u, 521023584u, 1059186903u, 4245163857u, 1072696112u, 3267875854u, 0, POW_TOLERANCE, 0},
+{ 615, 1103891140u, 2312887617u, 3191771354u, 1885370807u, 1072693247u, 2970483755u, 0, POW_TOLERANCE, 0},
+{ 616, 3252953815u, 1796441468u, 1100030327u, 2772711004u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 617, 3204276820u, 2095685003u, 1077984448u, 2100773742u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 618, 3192954620u, 2892538035u, 1042396334u, 4162200338u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 619, 3242725751u, 2177698116u, 3227557177u, 150832500u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 620, 3191562216u, 607966734u, 3236250630u, 4164600559u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 621, 3216389812u, 2830122967u, 1046096700u, 3713346883u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 622, 3237197963u, 2314640506u, 3203696416u, 3276228872u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 623, 3212912307u, 469331883u, 3249037349u, 2999233437u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 624, 1097382011u, 560886625u, 1091899487u, 748795120u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 625, 1049886858u, 2958421324u, 1092569414u, 3235243477u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 626, 3193026497u, 3221475559u, 1043038304u, 915608434u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 627, 1071197530u, 3007808652u, 3216682290u, 2531019474u, 1072800308u, 390736839u, 0, POW_TOLERANCE, 0},
+{ 628, 3242028999u, 1767658578u, 3237045269u, 2313128318u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 629, 3210617892u, 1926845182u, 1066835624u, 1783256828u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 630, 1040575629u, 90378038u, 1057168870u, 164358218u, 1072691629u, 2656458388u, 0, POW_TOLERANCE, 0},
+{ 631, 1106859172u, 1610524680u, 1085283851u, 2903496007u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 632, 1078635586u, 4274321404u, 3202913591u, 720121831u, 1072693150u, 1036067998u, 0, POW_TOLERANCE, 0},
+{ 633, 1051205256u, 2034778236u, 1071133763u, 1413236391u, 1064530956u, 2085643682u, 0, POW_TOLERANCE, 0},
+{ 634, 1051063028u, 1489112261u, 1076691395u, 348210906u, 760248983u, 1522623444u, 0, POW_TOLERANCE, 0},
+{ 635, 3206743917u, 2797651324u, 3224410527u, 2374818327u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 636, 1088287256u, 1823161666u, 3197810695u, 3119680047u, 1072693239u, 1606822809u, 0, POW_TOLERANCE, 0},
+{ 637, 1065927336u, 3420950657u, 1087084743u, 2136638961u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 638, 1069902224u, 3554566429u, 1062907717u, 2736702589u, 1072687149u, 2218809813u, 0, POW_TOLERANCE, 0},
+{ 639, 3244888667u, 2928437580u, 3187765027u, 1393427873u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 640, 3209301561u, 189447067u, 1051643315u, 828663513u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 641, 1052313869u, 2852350928u, 1045683757u, 673354280u, 1072693247u, 2059131834u, 0, POW_TOLERANCE, 0},
+{ 642, 1043946301u, 3589563265u, 3248741629u, 812657927u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 643, 3190610826u, 1766416701u, 1100392103u, 2185373290u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 644, 3220275389u, 3763582673u, 3191965790u, 388374829u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 645, 1079635136u, 1187403069u, 1075300235u, 336640304u, 1114375448u, 2508341866u, 0, POW_TOLERANCE, 0},
+{ 646, 1103926251u, 1718795752u, 3243118752u, 683369237u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 647, 3210792097u, 1863545307u, 1069449477u, 3418627399u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 648, 1069601294u, 3295607249u, 1068878592u, 1633297809u, 1072360507u, 2931321086u, 0, POW_TOLERANCE, 0},
+{ 649, 1058947127u, 2585980994u, 3236670483u, 1286750688u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 650, 1046157033u, 15816845u, 3233249283u, 2491924775u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 651, 1042413021u, 1051983351u, 1049180786u, 1474421917u, 1072693240u, 523173278u, 0, POW_TOLERANCE, 0},
+{ 652, 3201249525u, 2003816032u, 1086050104u, 668090487u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 653, 1052556037u, 3671484625u, 1067020039u, 430024694u, 1072104115u, 2399684722u, 0, POW_TOLERANCE, 0},
+{ 654, 1067397110u, 3991830201u, 3207808714u, 1021245839u, 1072694325u, 1735817410u, 0, POW_TOLERANCE, 0},
+{ 655, 1064194391u, 4255801807u, 3207681716u, 1926756877u, 1072694802u, 2019984739u, 0, POW_TOLERANCE, 0},
+{ 656, 1052140785u, 4167786896u, 1077097744u, 1775517981u, 679609252u, 1942553467u, 0, POW_TOLERANCE, 0},
+{ 657, 1085601978u, 3187518564u, 1082437406u, 944672491u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 658, 1049366282u, 953085192u, 3227310828u, 3459155777u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 659, 1069502506u, 1908555460u, 1073640207u, 260441967u, 1066584007u, 3242786919u, 0, POW_TOLERANCE, 0},
+{ 660, 1067219606u, 250762477u, 1072582645u, 2886742039u, 1067529049u, 1008600260u, 0, POW_TOLERANCE, 0},
+{ 661, 3250906006u, 786180031u, 3197734769u, 2788918312u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 662, 3234511827u, 2055912467u, 3244244909u, 1394142937u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 663, 1069612985u, 91984146u, 3222252812u, 4126276047u, 1084695753u, 238746516u, 0, POW_TOLERANCE, 0},
+{ 664, 1081340139u, 3942715706u, 3239316352u, 410676547u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 665, 3198557846u, 86296211u, 1085850694u, 649202596u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 666, 3245366392u, 3069064472u, 3237358008u, 23209276u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 667, 1081235288u, 1867297860u, 1072956607u, 2513414118u, 1083382405u, 154259724u, 0, POW_TOLERANCE, 0},
+{ 668, 3250533347u, 3171788768u, 3235208783u, 162138697u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 669, 1081728455u, 1245110700u, 1081653954u, 2584994077u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 670, 3245510120u, 3347226587u, 1058962932u, 2291943376u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 671, 1058899062u, 966940828u, 1060726420u, 2798041096u, 1072685871u, 393403851u, 0, POW_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1071006277u, 309120623u, 0, POW_TOLERANCE, 0},
+{ 673, 3248116497u, 1671039260u, 1086395032u, 3745833360u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 674, 1057078797u, 651714217u, 1047070645u, 2130549237u, 1072693246u, 4267185665u, 0, POW_TOLERANCE, 0},
+{ 675, 3207115731u, 1423000172u, 3247822717u, 1551488170u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 676, 3201597307u, 921077236u, 3213332351u, 1431049019u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 677, 1067510295u, 655715547u, 3190985373u, 1527556471u, 1072693248u, 66412499u, 0, POW_TOLERANCE, 0},
+{ 678, 3227654979u, 4110878657u, 3251297180u, 879739345u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 679, 1085804762u, 2623955764u, 1093699897u, 1216444475u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 680, 1091905603u, 107442539u, 3239767031u, 1149813329u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 681, 3233445240u, 1761361082u, 3226030205u, 1121849716u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 682, 3240087115u, 2534144722u, 1044223733u, 3512285706u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 683, 3211846077u, 4073670723u, 1050729852u, 3034818849u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 684, 1101984574u, 1421423503u, 1060278048u, 1397153092u, 1072699017u, 253084263u, 0, POW_TOLERANCE, 0},
+{ 685, 3217421829u, 1649206019u, 1104525577u, 1267104290u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 686, 3189302097u, 3775270392u, 1040251850u, 68667319u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 687, 3204330900u, 3099226694u, 3254103006u, 4020102648u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 688, 3201591712u, 3718441177u, 3215643451u, 4032951536u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 689, 1044131371u, 508048351u, 3210196713u, 1707937896u, 1072722238u, 2938514689u, 0, POW_TOLERANCE, 0},
+{ 690, 3198611627u, 2784738160u, 1073435430u, 1109346010u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 691, 3225725290u, 3331916473u, 3238794568u, 2707019594u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 692, 1093182670u, 3093165197u, 1072894805u, 2853215019u, 1097140853u, 432263137u, 0, POW_TOLERANCE, 0},
+{ 693, 3216582139u, 2135797997u, 1048399559u, 2941926126u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 694, 1048430980u, 2083412145u, 3249335391u, 507212448u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 695, 1075363751u, 4270176401u, 3246546709u, 3288753319u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 696, 3247932863u, 3692175292u, 3197271515u, 3989064196u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 697, 3251691738u, 3111924274u, 1066772558u, 59281695u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 698, 1067683911u, 2135245466u, 3208804313u, 3846547392u, 1072695179u, 541455052u, 0, POW_TOLERANCE, 0},
+{ 699, 1094877811u, 972051266u, 3222814246u, 3539700586u, 937812205u, 2732262850u, 0, POW_TOLERANCE, 0},
+{ 700, 3202965930u, 330951080u, 1079189813u, 583922384u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 701, 1089640092u, 1711944085u, 1104170032u, 643991456u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 702, 3234429549u, 2072550721u, 3250147641u, 4280263530u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 703, 3192972706u, 1566376352u, 1067251433u, 72984588u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 704, 1095276569u, 3103043079u, 1045853123u, 410067497u, 1072693248u, 1411252811u, 0, POW_TOLERANCE, 0},
+{ 705, 3216672493u, 1910366299u, 1081770885u, 634683073u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 706, 1081530688u, 2226525875u, 3224149290u, 2126302825u, 944914560u, 4069413743u, 0, POW_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1072693247u, 4201417711u, 0, POW_TOLERANCE, 0},
+{ 708, 1066482943u, 1953339096u, 1077176252u, 1476516558u, 946546597u, 3640510442u, 0, POW_TOLERANCE, 0},
+{ 709, 1066092000u, 1306277326u, 1079089150u, 4093716191u, 612825355u, 2217080555u, 0, POW_TOLERANCE, 0},
+{ 710, 3233148787u, 51750045u, 3242913901u, 4256866157u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 711, 3195084967u, 2163853087u, 3232053146u, 2962422808u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 712, 1075516945u, 1618388148u, 3233154824u, 3711953164u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 713, 3246868002u, 357108214u, 3202294604u, 2306775262u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 714, 3201904086u, 2571356437u, 3249064063u, 2394851808u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 715, 3230488091u, 4273880094u, 1103698617u, 3578832032u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 716, 3233426701u, 2091068742u, 3228270226u, 3980489730u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 717, 3229016752u, 2772307714u, 1051008486u, 32546576u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 718, 3241229215u, 2143788498u, 3195498043u, 3630119231u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 719, 3198632935u, 2527385594u, 3240503648u, 3482095012u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 720, 3242168799u, 2690097362u, 1068598730u, 2360266862u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 721, 1058857869u, 2673272949u, 1082639557u, 522449749u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 722, 1104424147u, 3596379400u, 3242016775u, 2002293002u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 723, 1099439656u, 4113224369u, 3222122439u, 2152316893u, 973102302u, 593041218u, 0, POW_TOLERANCE, 0},
+{ 724, 3220796716u, 31662602u, 1047721249u, 1747087514u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 725, 3250463757u, 2489659568u, 1097051253u, 277506957u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 726, 3191401834u, 3850162281u, 3213841942u, 438724093u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 727, 1095392535u, 2431814052u, 1075518084u, 2672434118u, 1226969731u, 2279514813u, 0, POW_TOLERANCE, 0},
+{ 728, 3243162735u, 391606792u, 1048184750u, 4168944276u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 729, 3247792416u, 457529672u, 3201090276u, 72407935u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 730, 3218720719u, 3954981400u, 1052053242u, 2411049585u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 731, 1086180091u, 485456950u, 1088415093u, 1655397424u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 732, 3198234428u, 1551748070u, 3236871640u, 1329701152u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 733, 3224639122u, 3099222537u, 1104984570u, 4293792842u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 734, 3203949705u, 3603065260u, 3197735968u, 2402359253u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 735, 3198824584u, 3961208159u, 3219057584u, 2340553876u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 736, 1074881909u, 4014841779u, 3197672877u, 3697233334u, 1072693246u, 3733326417u, 0, POW_TOLERANCE, 0},
+{ 737, 3213275657u, 1403876392u, 3254028950u, 921363393u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 738, 1107251806u, 1862576361u, 3194031708u, 2476290925u, 1072693246u, 2050624436u, 0, POW_TOLERANCE, 0},
+{ 739, 1049661768u, 1454212851u, 1088378861u, 3400401866u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 1072693247u, 4285430075u, 0, POW_TOLERANCE, 0},
+{ 741, 3216409282u, 1199568671u, 3225679997u, 46947405u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 742, 1077685537u, 2596231448u, 3253943728u, 2219151748u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 743, 1066527035u, 4119719558u, 3222036299u, 1275474618u, 1094321828u, 2344281964u, 0, POW_TOLERANCE, 0},
+{ 744, 3239908663u, 3347296825u, 1101507910u, 1254014794u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 745, 1084119992u, 673775040u, 1070743626u, 244126093u, 1075926174u, 1870920115u, 0, POW_TOLERANCE, 0},
+{ 746, 3203199850u, 1832066983u, 1051358028u, 3262483417u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 747, 1077559600u, 3962610501u, 3198598777u, 849269178u, 1072693243u, 1523676086u, 0, POW_TOLERANCE, 0},
+{ 748, 3235473900u, 2497516122u, 3254374111u, 2821429629u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 749, 1076236288u, 2805941787u, 3217785843u, 779131141u, 1071847803u, 1229064437u, 0, POW_TOLERANCE, 0},
+{ 750, 3226908686u, 723423605u, 1084533420u, 627282213u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 751, 3215947680u, 4292778869u, 1078101071u, 1676860147u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 752, 1076288502u, 3528118587u, 3194648564u, 2363260897u, 1072693247u, 3213122894u, 0, POW_TOLERANCE, 0},
+{ 753, 3192897879u, 1307010018u, 1061248120u, 1468743108u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 754, 3246583139u, 107905661u, 3226089788u, 1943427674u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 755, 3188230541u, 760006940u, 1054265604u, 1749976597u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 756, 3237773384u, 2787503556u, 1081282610u, 1195841206u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 757, 3191802156u, 545462045u, 3208381743u, 1981311808u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 758, 1061232136u, 3657978397u, 1104463616u, 3501253426u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 759, 1049883857u, 1804177501u, 3210693633u, 3606766729u, 1072723785u, 3886972153u, 0, POW_TOLERANCE, 0},
+{ 760, 1076856879u, 1336278526u, 1043741618u, 3165279431u, 1072693248u, 64294410u, 0, POW_TOLERANCE, 0},
+{ 761, 1055471915u, 1599382075u, 1058018527u, 4212580517u, 1072691791u, 391531247u, 0, POW_TOLERANCE, 0},
+{ 762, 3207502326u, 3007589929u, 3202026547u, 2792028313u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 763, 3253082770u, 1866066996u, 1060329048u, 3727175322u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 764, 3198416643u, 150890940u, 1056025306u, 3082724735u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 765, 1062008939u, 80400395u, 1093584426u, 3478941315u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 766, 3251640614u, 4050954182u, 3219263194u, 2537475930u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 767, 1064841871u, 2881752155u, 3212589299u, 2559651278u, 1072730986u, 818344641u, 0, POW_TOLERANCE, 0},
+{ 768, 3249016304u, 440309030u, 3214267461u, 3788040806u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 769, 1100476615u, 918813144u, 3208535698u, 1607035904u, 1072675418u, 2557624176u, 0, POW_TOLERANCE, 0},
+{ 770, 1042137451u, 2497054124u, 1089139147u, 2549609010u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 771, 1047037641u, 790219083u, 1054657139u, 2797979479u, 1072693004u, 3048704750u, 0, POW_TOLERANCE, 0},
+{ 772, 1057781400u, 1149462078u, 1095765205u, 3879963182u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 773, 3202729813u, 2684353926u, 3205212854u, 1732474928u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 774, 1095236965u, 2742237025u, 1051317716u, 3386396147u, 1072693260u, 339199966u, 0, POW_TOLERANCE, 0},
+{ 775, 1063230986u, 3408320912u, 1103071166u, 4233059513u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 776, 1064863548u, 1077495917u, 1088399968u, 433115118u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 777, 3204547572u, 841366493u, 1051716814u, 4121125128u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 778, 1064632084u, 321857207u, 1089128010u, 1149988239u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 779, 3245542663u, 799866606u, 3197637091u, 3924438208u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 780, 3191062890u, 2002049816u, 1077053447u, 2240354761u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 781, 3229006283u, 478939968u, 1097035749u, 1066716440u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 782, 3232473641u, 1653104725u, 1088548129u, 81977716u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 783, 3196861276u, 3899475018u, 3189694084u, 3330093036u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 784, 1089312583u, 2612450289u, 1079065127u, 603380842u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 785, 1100636791u, 3962735564u, 1101570429u, 1372490825u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 786, 1054806016u, 1479841439u, 1059312257u, 541504905u, 1072689504u, 3005345343u, 0, POW_TOLERANCE, 0},
+{ 787, 1078662178u, 2626148789u, 1057571099u, 4121656076u, 1072693449u, 2768405920u, 0, POW_TOLERANCE, 0},
+{ 788, 1081613389u, 1902560314u, 1043130231u, 3557671562u, 1072693248u, 90246344u, 0, POW_TOLERANCE, 0},
+{ 789, 3193829772u, 41779312u, 1081626342u, 831171823u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 790, 1058131100u, 1393168821u, 1066457405u, 1381616968u, 1072386902u, 1127776707u, 0, POW_TOLERANCE, 0},
+{ 791, 1072338141u, 3756584649u, 3222267229u, 1423157432u, 1073791756u, 1259701110u, 0, POW_TOLERANCE, 0},
+{ 792, 3254435674u, 1894912556u, 1042426694u, 155024547u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 793, 3195453512u, 35164295u, 3203391785u, 1037041084u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 794, 1084777479u, 3957875950u, 3232195211u, 1590756436u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 795, 1068844322u, 1447585080u, 1071279485u, 1107922438u, 1071048925u, 1485581625u, 0, POW_TOLERANCE, 0},
+{ 796, 1046252518u, 981897615u, 1051856116u, 430357614u, 1072693208u, 2764068789u, 0, POW_TOLERANCE, 0},
+{ 797, 3227524215u, 395145384u, 3219821938u, 50586510u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 798, 1069775912u, 750827797u, 1082862669u, 230466783u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 799, 1086668819u, 1365083575u, 3204848310u, 1700831722u, 1072692426u, 1496207054u, 0, POW_TOLERANCE, 0},
+{ 800, 3218090390u, 344241827u, 1071538935u, 2715566077u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 801, 3247582856u, 4069301823u, 3193208760u, 2949125229u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 802, 1103231387u, 3585711710u, 1065801594u, 2302229267u, 1072958472u, 3376559785u, 0, POW_TOLERANCE, 0},
+{ 803, 3194118956u, 709803845u, 1048741487u, 2296910194u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 804, 3193280779u, 744421179u, 1069302001u, 2659232829u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 805, 1092835968u, 1799949903u, 3192522886u, 4212149209u, 1072693247u, 2836158473u, 0, POW_TOLERANCE, 0},
+{ 806, 3206108502u, 145234164u, 3250614064u, 912384201u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 807, 3240510664u, 2784620507u, 1102812948u, 3531481022u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 808, 3251159663u, 383952592u, 3205659905u, 3633194728u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 809, 3203476252u, 3792395543u, 1070072378u, 3864816376u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 810, 3205316273u, 2115553675u, 1066288499u, 3538377867u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 811, 3252075185u, 1230026762u, 1090719723u, 440819880u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 812, 3194595076u, 2991290482u, 1096886719u, 1097971167u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 813, 1090048600u, 1098035020u, 3230900504u, 1479059095u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 814, 3251056964u, 1719428427u, 3188631907u, 3707377409u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 815, 1053236165u, 3748932896u, 1084908557u, 1325384361u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 816, 1084704076u, 3979168763u, 1057455255u, 2454615952u, 1072693623u, 3513101689u, 0, POW_TOLERANCE, 0},
+{ 817, 1053106984u, 1449164578u, 1056960316u, 1654931641u, 1072692424u, 3452932260u, 0, POW_TOLERANCE, 0},
+{ 818, 1071439010u, 2120487381u, 3226298974u, 2364226633u, 1143479176u, 908596309u, 0, POW_TOLERANCE, 0},
+{ 819, 1075071428u, 1074268944u, 1065730444u, 280016852u, 1072711491u, 3933800051u, 0, POW_TOLERANCE, 0},
+{ 820, 3200308256u, 3315127889u, 3236295594u, 2900924954u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 821, 3196425891u, 2246037502u, 1049691002u, 1496066550u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 822, 3193006859u, 4191285446u, 3217936236u, 2382392789u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 823, 1092833308u, 640099844u, 1042152237u, 2064279383u, 1072693248u, 104985487u, 0, POW_TOLERANCE, 0},
+{ 824, 1079913438u, 3468560824u, 1093251038u, 310958750u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 825, 1096788400u, 1413568905u, 1100941106u, 1627289946u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 826, 3191549550u, 3797143370u, 3195497539u, 3843275034u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 827, 3252077393u, 2806642640u, 3201943068u, 2515980718u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 828, 1086877316u, 632580632u, 1078673506u, 3259601317u, 1850494788u, 2499984423u, 0, POW_TOLERANCE, 0},
+{ 829, 3200980575u, 3309678799u, 1049337078u, 3056787074u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 830, 3221495289u, 2341164249u, 1080834967u, 2810890005u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 831, 1067019674u, 932124675u, 1093915797u, 662682630u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 832, 3249230091u, 1367996113u, 3251723684u, 2974064663u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 833, 1080230731u, 323437999u, 1090499064u, 901457511u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 834, 3235778876u, 4184941840u, 3196770014u, 2458988443u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 835, 1087618284u, 2023065054u, 3211994098u, 2734612965u, 1072598307u, 3580358468u, 0, POW_TOLERANCE, 0},
+{ 836, 1064074694u, 3679267365u, 3237728785u, 1699558211u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 837, 1088079010u, 1826799031u, 1078709629u, 3986905229u, 1932203582u, 19627262u, 0, POW_TOLERANCE, 0},
+{ 838, 1052843785u, 351061688u, 3194386466u, 4105857588u, 1072693248u, 2469556788u, 0, POW_TOLERANCE, 0},
+{ 839, 1054128006u, 1365244058u, 1064457319u, 1452191426u, 1072581660u, 718583915u, 0, POW_TOLERANCE, 0},
+{ 840, 1064122385u, 2463030625u, 3215975031u, 3773488326u, 1073134140u, 172036208u, 0, POW_TOLERANCE, 0},
+{ 841, 3251276671u, 752664055u, 1065110394u, 1835931663u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 842, 1088045088u, 3496172149u, 1089617208u, 109068701u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 843, 3198135087u, 1636966254u, 1086098766u, 2016598298u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 844, 1050931318u, 3551516956u, 1097969102u, 1317953425u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 845, 3229832217u, 2977627788u, 1045339018u, 516058480u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 846, 3237408578u, 3901731263u, 3189566462u, 32272932u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 847, 1077281796u, 1956025297u, 3246628529u, 3840733905u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 848, 1099818036u, 561057891u, 3198494340u, 4271027193u, 1072693224u, 1147242094u, 0, POW_TOLERANCE, 0},
+{ 849, 3250929921u, 692989850u, 3242630588u, 2492225971u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 850, 3205479397u, 3439913962u, 1067477011u, 2973333638u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 851, 3213993989u, 877613377u, 1044917899u, 809672798u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 852, 3222171454u, 905426932u, 1046417457u, 1086320855u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 853, 3246346629u, 2645567288u, 1051258339u, 557182478u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 854, 3204057950u, 186287752u, 1061342054u, 4054003419u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 855, 1097266673u, 3506889716u, 3243866036u, 519056371u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 856, 1042654053u, 2171898436u, 3246911982u, 1091500784u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 857, 3243647673u, 368493885u, 3222871893u, 1419055230u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 858, 1091950572u, 2010971245u, 3188804530u, 1518695799u, 1072693247u, 4179007047u, 0, POW_TOLERANCE, 0},
+{ 859, 3205426509u, 1239207795u, 1040192984u, 2199481342u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 860, 3210978637u, 4264613432u, 3203460972u, 3558930895u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 861, 1050299283u, 3772748958u, 3227667376u, 309688336u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 862, 3230743041u, 1077949160u, 1075769893u, 2405271377u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 863, 1091835152u, 3751608506u, 3232278094u, 930375071u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 864, 3198617153u, 1518334131u, 3205247482u, 791756713u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 865, 1047317453u, 2825203170u, 3245054001u, 1822981827u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 866, 1100016363u, 514474738u, 1089072073u, 3300845441u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 867, 3216391250u, 247369460u, 3197320093u, 687450958u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 868, 1104161422u, 2722237629u, 1058272368u, 90602316u, 1072694909u, 4025013104u, 0, POW_TOLERANCE, 0},
+{ 869, 3208098435u, 1845900544u, 3231520830u, 3389751458u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 870, 3247535245u, 737689911u, 3195377751u, 3462616966u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 871, 3223538384u, 3620285831u, 1055501023u, 2708056059u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 872, 3219464996u, 4073430285u, 1056206159u, 172017902u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 873, 3212869638u, 2799176222u, 1052706894u, 4083892667u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 874, 3202279557u, 1562351330u, 1069705601u, 1247765260u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 875, 3232717299u, 51853475u, 3189080201u, 2783553144u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 876, 3219454353u, 3851781549u, 3241598113u, 514064046u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 877, 1100045965u, 934745487u, 3248182437u, 2798581921u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 878, 3213082493u, 2948648757u, 3232177250u, 4278702895u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 879, 1072485724u, 4259101461u, 1061606772u, 84229920u, 1072693095u, 3143377223u, 0, POW_TOLERANCE, 0},
+{ 880, 3198075559u, 3891230598u, 1095924595u, 3049217547u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 881, 1077353053u, 3806018919u, 3243191216u, 280177341u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 882, 1060624530u, 3900344258u, 1063647809u, 4206745890u, 1072649165u, 223733263u, 0, POW_TOLERANCE, 0},
+{ 883, 3227707336u, 2126253040u, 3207248026u, 808507485u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 884, 1086090317u, 3465685634u, 3230391053u, 3754958214u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 885, 1102861084u, 461094531u, 1101110393u, 1316091396u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 886, 1064980314u, 4197635149u, 1091873113u, 1240127141u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 888, 3213429165u, 3744663425u, 3212482771u, 953662066u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 889, 1085171305u, 3564196690u, 3228101916u, 904305212u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 890, 1048333111u, 3566257266u, 3235138829u, 2734275140u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 891, 3243948477u, 606044282u, 3241318094u, 2446416887u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 892, 1041627284u, 2336116589u, 3197594053u, 2296925138u, 1072693255u, 2109886442u, 0, POW_TOLERANCE, 0},
+{ 893, 1058567659u, 907670625u, 3240769036u, 1827119006u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 894, 1044467183u, 2818710946u, 3246059905u, 553394170u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 895, 3189504094u, 4099522736u, 3232742168u, 3718083858u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 896, 1092371276u, 1059279404u, 1080245336u, 175941677u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 897, 1105189691u, 1650862428u, 1061816101u, 1723201723u, 1072711294u, 2736502671u, 0, POW_TOLERANCE, 0},
+{ 898, 3239012814u, 2462163405u, 3218946201u, 3876535372u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 899, 1084392886u, 495844137u, 1073721460u, 772777946u, 1095921736u, 2692187065u, 0, POW_TOLERANCE, 0},
+{ 900, 1052415330u, 458757721u, 3245680321u, 3609892707u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 901, 3193282956u, 2533012202u, 1079980803u, 3592268374u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 902, 3203364780u, 4108274117u, 1063045844u, 571992389u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 903, 1090567271u, 3541110973u, 1096296754u, 3118427427u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 904, 3193980043u, 1213941007u, 1105433735u, 2172963370u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 905, 1096853359u, 272190288u, 1095452370u, 4026581530u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 906, 1095583909u, 2843638672u, 1100510986u, 3190536898u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 907, 1083757094u, 2014317727u, 3247389683u, 2428462015u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 908, 1093976717u, 688442200u, 1047852515u, 3035186380u, 1072693249u, 671648650u, 0, POW_TOLERANCE, 0},
+{ 909, 1076664212u, 1010095511u, 3221288076u, 405287991u, 1064119522u, 2232525786u, 0, POW_TOLERANCE, 0},
+{ 910, 3252294615u, 2983070435u, 1089546472u, 2907918480u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 911, 1082988121u, 81928569u, 1056007286u, 2740556321u, 1072693366u, 3874400185u, 0, POW_TOLERANCE, 0},
+{ 912, 1041110867u, 2076689028u, 1081558619u, 3039159031u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 913, 1047307438u, 1376882094u, 3211003208u, 1296286481u, 1072737053u, 745790878u, 0, POW_TOLERANCE, 0},
+{ 914, 1080114314u, 744133164u, 3200943494u, 955832216u, 1072693215u, 1442312111u, 0, POW_TOLERANCE, 0},
+{ 915, 3226290326u, 176522478u, 1069999908u, 2891249491u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 916, 1043564602u, 3685851715u, 3187829932u, 2363997529u, 1072693248u, 46387677u, 0, POW_TOLERANCE, 0},
+{ 917, 1040244055u, 3974431579u, 1052505165u, 2589067816u, 1072693173u, 435912867u, 0, POW_TOLERANCE, 0},
+{ 918, 3191496789u, 3819109588u, 1048561488u, 969143351u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 919, 1072639397u, 4246896124u, 1104584799u, 1940097860u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 920, 1048038468u, 2228686199u, 3220231833u, 777624847u, 1098461188u, 4021617747u, 0, POW_TOLERANCE, 0},
+{ 921, 3231467306u, 4189906558u, 3203004203u, 854242364u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 922, 1103910407u, 4089051094u, 3227282692u, 2693170723u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 923, 1045883607u, 1278581412u, 3239296746u, 1774588717u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 924, 3222372686u, 1794845306u, 1104879344u, 4135865182u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 925, 1106449055u, 754938390u, 1061291430u, 2010786993u, 1072706220u, 2819987205u, 0, POW_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 927, 3231449194u, 567588900u, 3195452230u, 1421366017u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 928, 3225089755u, 2708717091u, 1071975971u, 1364590470u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 929, 3252137283u, 3461956134u, 3207820115u, 1605709634u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 930, 1065302996u, 1497124553u, 1051715442u, 916736957u, 1072693238u, 1188491770u, 0, POW_TOLERANCE, 0},
+{ 931, 1058468363u, 834914365u, 1064667143u, 2839166298u, 1072592733u, 156344305u, 0, POW_TOLERANCE, 0},
+{ 932, 1057279949u, 2139295776u, 1062816721u, 914592523u, 1072660689u, 2198900733u, 0, POW_TOLERANCE, 0},
+{ 933, 3189636931u, 851569132u, 1058503154u, 1399378677u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 934, 3233537697u, 3897202342u, 3245382590u, 246600375u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 935, 3225460308u, 3620429520u, 1055627557u, 229305u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 936, 1083958833u, 3641997865u, 3206673888u, 93720614u, 1072691097u, 1919876975u, 0, POW_TOLERANCE, 0},
+{ 937, 3227808435u, 32766320u, 1062084905u, 3668443038u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 938, 3223298996u, 2039713492u, 3248699388u, 1346210821u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 939, 1093050016u, 1335820726u, 3191756860u, 1808427032u, 1072693247u, 3434842727u, 0, POW_TOLERANCE, 0},
+{ 940, 1061442763u, 650692001u, 1103515670u, 2253348763u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 941, 3191395187u, 2372623300u, 3210185343u, 3200572848u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 942, 1100796069u, 762317532u, 3194595095u, 3192607437u, 1072693246u, 580489923u, 0, POW_TOLERANCE, 0},
+{ 943, 1062262701u, 217775356u, 3232827087u, 2969367386u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 944, 1057172551u, 3621353969u, 1077994795u, 3873976266u, 550449765u, 3209472673u, 0, POW_TOLERANCE, 0},
+{ 945, 1091301987u, 268372152u, 3221764390u, 3216978962u, 1016137106u, 101377175u, 0, POW_TOLERANCE, 0},
+{ 946, 3246437611u, 142942404u, 1075322987u, 1746449109u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 947, 1104006296u, 496534875u, 3254522293u, 2532372502u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 948, 3250225541u, 2999955409u, 3222793392u, 1868977643u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 1072018817u, 709267635u, 0, POW_TOLERANCE, 0},
+{ 950, 1068218799u, 73646871u, 3231442171u, 3711510104u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 951, 1090483524u, 218135177u, 3198908856u, 3082199105u, 1072693227u, 3412763353u, 0, POW_TOLERANCE, 0},
+{ 952, 1068068480u, 1061628117u, 3248859043u, 86776158u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 953, 3208484674u, 938869114u, 1087911145u, 2416710759u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 954, 1095576832u, 2970853959u, 3239543429u, 1887505029u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 955, 3237728787u, 1337895935u, 1076463812u, 1172733328u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 956, 1049139928u, 1469010822u, 3229583535u, 551399515u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 1072693248u, 781302795u, 0, POW_TOLERANCE, 0},
+{ 958, 3242138780u, 2976596113u, 3192137295u, 3033242648u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 959, 1098698481u, 876810930u, 3197470945u, 2571587447u, 1072693236u, 1757700973u, 0, POW_TOLERANCE, 0},
+{ 960, 3241770810u, 4007797282u, 3225853845u, 4069319648u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 961, 1047279982u, 3840538373u, 1043189552u, 3668774580u, 1072693247u, 3771060138u, 0, POW_TOLERANCE, 0},
+{ 962, 3217611704u, 200857661u, 3229758439u, 3359367736u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 963, 3248797869u, 111868139u, 3227902082u, 2366064003u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 964, 1044195166u, 3510904416u, 3222131653u, 3822770497u, 1178728909u, 3380778923u, 0, POW_TOLERANCE, 0},
+{ 965, 3242675715u, 789151814u, 1099269239u, 2958956055u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 966, 1084679320u, 722163228u, 1105524559u, 1534462169u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 967, 1046586062u, 2207037106u, 3208952465u, 1231254630u, 1072704740u, 1816538639u, 0, POW_TOLERANCE, 0},
+{ 968, 3197884060u, 3838689849u, 3198769679u, 1302617170u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 969, 1085938906u, 2527556476u, 3240373426u, 124352692u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 970, 3199540805u, 3502371499u, 1043411944u, 4190072016u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 971, 1064676142u, 1798470077u, 3200116917u, 3421833729u, 1072693257u, 3430819252u, 0, POW_TOLERANCE, 0},
+{ 972, 3193514956u, 3653237931u, 3204255012u, 3683870669u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 973, 1053588582u, 376530104u, 1073853547u, 565755892u, 1030469750u, 395871138u, 0, POW_TOLERANCE, 0},
+{ 974, 3242503851u, 558292492u, 1051772749u, 4267873474u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 975, 3224772709u, 509637100u, 3212030069u, 215050379u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 976, 1092057101u, 3571665665u, 3188628584u, 757824767u, 1072693247u, 4191774567u, 0, POW_TOLERANCE, 0},
+{ 977, 3214799337u, 998858159u, 1063077962u, 436029885u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 978, 3205946965u, 996300405u, 3193842624u, 80548098u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 979, 3228848840u, 3876129407u, 3215332180u, 2226970413u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 980, 3237608953u, 200013509u, 3224552716u, 414878724u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 981, 3230617093u, 309319541u, 1048979765u, 1261662434u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 982, 1089252639u, 4062255924u, 3224274128u, 4289485681u, 819148193u, 4205109975u, 0, POW_TOLERANCE, 0},
+{ 983, 3236136084u, 1611969213u, 1053890378u, 3774617276u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 984, 1080412763u, 1752164782u, 3239587974u, 612223386u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 985, 1041545782u, 2024044989u, 1074932678u, 3259111307u, 931484061u, 1205710889u, 0, POW_TOLERANCE, 0},
+{ 986, 1053207518u, 2564965629u, 1093571065u, 169360454u, 0u, 0u, 0, POW_TOLERANCE, 0},
+{ 987, 1089599090u, 1860101737u, 3191222372u, 1676437468u, 1072693247u, 3773506942u, 0, POW_TOLERANCE, 0},
+{ 988, 1059802968u, 588387057u, 3192103292u, 2495288012u, 1072693248u, 348956998u, 0, POW_TOLERANCE, 0},
+{ 989, 3193155705u, 659070058u, 1073095700u, 1393632068u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 990, 3217683263u, 4276187829u, 3217553330u, 1868253275u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 991, 3223220272u, 2085481575u, 3215994784u, 800910002u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 992, 1056934836u, 1950570756u, 3200582211u, 941022151u, 1072693275u, 1469141088u, 0, POW_TOLERANCE, 0},
+{ 993, 1057530368u, 2075610870u, 3250142022u, 3605152103u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 994, 3200839250u, 3792931748u, 3204857863u, 804393211u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 995, 3253646370u, 3430071177u, 3226288311u, 3652522729u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 996, 3201314702u, 236884699u, 3227874605u, 2193269825u, 2146959360u, 0u, 33, POW_TOLERANCE, 0},
+{ 997, 1064936593u, 2744231849u, 1046186036u, 771053722u, 1072693247u, 3123214080u, 0, POW_TOLERANCE, 0},
+{ 998, 1083996036u, 3000189819u, 1096500901u, 2057239777u, 2146435072u, 0u, 34, POW_TOLERANCE, 0},
+{ 999, 1093835581u, 205759408u, 3244643377u, 2702292618u, 0u, 0u, 0, POW_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_POW_H multiple inclusion protection
+
+// EOF pow.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/sin.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/sin.c
new file mode 100644
index 0000000000..8bd98a05bb
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/sin.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// sin.c
+//
+// Test of sin() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/sin.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(sin_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &sin, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_NONE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &sin_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("sin() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("sin() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library sin() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "sin() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF sin.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/sin.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/sin.h
new file mode 100644
index 0000000000..74ba578bf6
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/sin.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_SIN_H
+#define CYGONCE_LIBM_SIN_H
+//===========================================================================
+//
+// sin.h
+//
+// Test vectors for testing of sin() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/sin.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define SIN_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t sin_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1077999148u, 2506787616u, 1090024059u, 3619148316u, 1071838869u, 2401661594u, 0, SIN_TOLERANCE, 0},
+{ 2, 3218153654u, 3176730980u, 1051524793u, 2993920299u, 3218140303u, 2723656211u, 0, SIN_TOLERANCE, 0},
+{ 3, 3239659803u, 2725707538u, 3232101343u, 2346810316u, 1070387016u, 2680769772u, 0, SIN_TOLERANCE, 0},
+{ 4, 1092554362u, 2088062470u, 3201242716u, 420891118u, 3219218822u, 2049472052u, 0, SIN_TOLERANCE, 0},
+{ 5, 3221200677u, 2636405208u, 1100049309u, 471635570u, 3220006780u, 536189369u, 0, SIN_TOLERANCE, 0},
+{ 6, 1089363191u, 1746012320u, 1054478713u, 3333988501u, 3219789896u, 4274610101u, 0, SIN_TOLERANCE, 0},
+{ 7, 1047953160u, 183014794u, 3202039382u, 2016785810u, 1047953160u, 183014787u, 0, SIN_TOLERANCE, 0},
+{ 8, 3213486034u, 2688957927u, 1046089230u, 2709029994u, 3213485989u, 1514254211u, 0, SIN_TOLERANCE, 0},
+{ 9, 1058795730u, 624574473u, 1045840574u, 3473266330u, 1058795730u, 609683576u, 0, SIN_TOLERANCE, 0},
+{ 10, 3204919842u, 1605286142u, 1068931671u, 4233776869u, 3204919842u, 1603156146u, 0, SIN_TOLERANCE, 0},
+{ 11, 1060343410u, 1857607719u, 3222889559u, 3417070006u, 1060343410u, 1775912310u, 0, SIN_TOLERANCE, 0},
+{ 12, 1103599987u, 3981151660u, 1088899021u, 1332651746u, 3220044665u, 516737212u, 0, SIN_TOLERANCE, 0},
+{ 13, 1085298022u, 3824988054u, 1066856791u, 2070129652u, 1068343696u, 2570408587u, 0, SIN_TOLERANCE, 0},
+{ 14, 3207559790u, 1372884064u, 1080833116u, 3229926662u, 3207559790u, 1287711395u, 0, SIN_TOLERANCE, 0},
+{ 15, 1093826501u, 3217805330u, 3191644264u, 2014578707u, 3220141559u, 642968502u, 0, SIN_TOLERANCE, 0},
+{ 16, 1102287487u, 265058758u, 3239903247u, 1630600647u, 1067118390u, 524782221u, 0, SIN_TOLERANCE, 0},
+{ 17, 1071124229u, 1946677669u, 3198462609u, 926009897u, 1071087355u, 3913666151u, 0, SIN_TOLERANCE, 0},
+{ 18, 1072130299u, 2271884183u, 3203741999u, 2118617783u, 1071997067u, 1550277781u, 0, SIN_TOLERANCE, 0},
+{ 19, 3194849109u, 213658772u, 3249401130u, 314151656u, 3194849109u, 213658768u, 0, SIN_TOLERANCE, 0},
+{ 20, 3254112288u, 1564829925u, 3197817016u, 497230814u, 1071974247u, 929901645u, 0, SIN_TOLERANCE, 0},
+{ 21, 3216262634u, 2075329122u, 3231746400u, 169900577u, 3216261246u, 919710895u, 0, SIN_TOLERANCE, 0},
+{ 22, 1049848642u, 541549344u, 1096608669u, 3119070100u, 1049848642u, 541549268u, 0, SIN_TOLERANCE, 0},
+{ 23, 1085427055u, 567496114u, 1045286891u, 1969998540u, 3220111007u, 980283378u, 0, SIN_TOLERANCE, 0},
+{ 24, 1060548195u, 1299369769u, 1049342524u, 4167404066u, 1060548195u, 1171923561u, 0, SIN_TOLERANCE, 0},
+{ 25, 3208865645u, 3348930841u, 1078472138u, 358457347u, 3208865645u, 3029730220u, 0, SIN_TOLERANCE, 0},
+{ 26, 1071069297u, 2192461366u, 1099527247u, 3184735642u, 1071036129u, 813860861u, 0, SIN_TOLERANCE, 0},
+{ 27, 1052861772u, 331696577u, 3189610016u, 793242270u, 1052861772u, 331693068u, 0, SIN_TOLERANCE, 0},
+{ 28, 3252528934u, 2322696981u, 1083791358u, 3020766674u, 3219239726u, 3132111534u, 0, SIN_TOLERANCE, 0},
+{ 29, 1044902177u, 252085215u, 3214426435u, 4139068910u, 1044902177u, 252085215u, 0, SIN_TOLERANCE, 0},
+{ 30, 3222505725u, 105589263u, 1056316170u, 261630827u, 1072662522u, 1497100154u, 0, SIN_TOLERANCE, 0},
+{ 31, 1107213408u, 428765703u, 3251828686u, 2009972239u, 1072151952u, 1213650637u, 0, SIN_TOLERANCE, 0},
+{ 32, 1098568019u, 3517376586u, 3240257920u, 3304487302u, 3219808385u, 472344056u, 0, SIN_TOLERANCE, 0},
+{ 33, 3233537912u, 237004814u, 3237899261u, 3364008659u, 1072254439u, 2138833907u, 0, SIN_TOLERANCE, 0},
+{ 34, 3195247552u, 472004928u, 3226869477u, 1186387580u, 3195247552u, 472004923u, 0, SIN_TOLERANCE, 0},
+{ 35, 1054226850u, 4085763910u, 1106394906u, 2684738273u, 1054226850u, 4085734635u, 0, SIN_TOLERANCE, 0},
+{ 36, 1057053639u, 2055490142u, 3231581370u, 3879040079u, 1057053639u, 2054597482u, 0, SIN_TOLERANCE, 0},
+{ 37, 3188976647u, 3725731239u, 1061652681u, 591292963u, 3188976647u, 3725731239u, 0, SIN_TOLERANCE, 0},
+{ 38, 3225014981u, 1147041027u, 3215417793u, 624695933u, 3219415599u, 1075867927u, 0, SIN_TOLERANCE, 0},
+{ 39, 3206052774u, 705725219u, 3238067573u, 1116238321u, 3206052774u, 695706716u, 0, SIN_TOLERANCE, 0},
+{ 40, 3207367088u, 7287411u, 1045917232u, 116067742u, 3207367087u, 4238790031u, 0, SIN_TOLERANCE, 0},
+{ 41, 3240055222u, 3604989074u, 1066381836u, 545298780u, 1072682140u, 2066217144u, 0, SIN_TOLERANCE, 0},
+{ 42, 3219080936u, 1681476121u, 1060345752u, 3553822398u, 3219000313u, 4267532368u, 0, SIN_TOLERANCE, 0},
+{ 43, 1102831658u, 3410480388u, 1052460275u, 1660607230u, 1067040834u, 487727068u, 0, SIN_TOLERANCE, 0},
+{ 44, 1089216869u, 1494984673u, 3196647153u, 287894723u, 1071850264u, 1206127023u, 0, SIN_TOLERANCE, 0},
+{ 45, 1054885127u, 644548665u, 1081948134u, 2442134629u, 1054885127u, 644502728u, 0, SIN_TOLERANCE, 0},
+{ 46, 1087554095u, 2312530895u, 3221584595u, 3379665576u, 1072410294u, 22046932u, 0, SIN_TOLERANCE, 0},
+{ 47, 1096085375u, 3018463866u, 1086226574u, 404012923u, 3216020271u, 1764000566u, 0, SIN_TOLERANCE, 0},
+{ 48, 1064733299u, 1710279345u, 3251401196u, 3528946000u, 1064733291u, 4045889661u, 0, SIN_TOLERANCE, 0},
+{ 49, 1061536351u, 2164450219u, 1083520023u, 3312018966u, 1061536351u, 1714337161u, 0, SIN_TOLERANCE, 0},
+{ 50, 1057248676u, 2648986431u, 1050330591u, 1474376550u, 1057248676u, 2647551431u, 0, SIN_TOLERANCE, 0},
+{ 51, 3194422028u, 1839068700u, 1077406406u, 3013052171u, 3194422028u, 1839068698u, 0, SIN_TOLERANCE, 0},
+{ 52, 1046493630u, 772102380u, 3220729740u, 4219039958u, 1046493630u, 772102379u, 0, SIN_TOLERANCE, 0},
+{ 53, 3229472221u, 3058618779u, 1046304788u, 3338676024u, 1069797744u, 562818333u, 0, SIN_TOLERANCE, 0},
+{ 54, 1051172137u, 506286854u, 1094907481u, 2217000199u, 1051172137u, 506286305u, 0, SIN_TOLERANCE, 0},
+{ 55, 1082428310u, 1147428263u, 1065432625u, 3034786717u, 3219662892u, 3667710140u, 0, SIN_TOLERANCE, 0},
+{ 56, 1082016752u, 2844125311u, 1082985198u, 2561492677u, 1071337783u, 1367962921u, 0, SIN_TOLERANCE, 0},
+{ 57, 3211536916u, 704542600u, 3222902057u, 2762779203u, 3211536912u, 2267019146u, 0, SIN_TOLERANCE, 0},
+{ 58, 3199680614u, 184131949u, 3249723525u, 1667366082u, 3199680614u, 184129854u, 0, SIN_TOLERANCE, 0},
+{ 59, 3223609598u, 3904224140u, 1067056698u, 2942159914u, 1072047947u, 1080365783u, 0, SIN_TOLERANCE, 0},
+{ 60, 1100636863u, 426114282u, 3209056785u, 1083606355u, 1072166020u, 3340708234u, 0, SIN_TOLERANCE, 0},
+{ 61, 1106165945u, 3774123863u, 1106787580u, 2722107965u, 1070744623u, 2373837450u, 0, SIN_TOLERANCE, 0},
+{ 62, 1088005092u, 1377734762u, 1104232051u, 2377063483u, 3220087464u, 1358458230u, 0, SIN_TOLERANCE, 0},
+{ 63, 1069380559u, 1029739074u, 1105467109u, 3062201018u, 1069376304u, 62267843u, 0, SIN_TOLERANCE, 0},
+{ 64, 3234741597u, 773857656u, 3214251949u, 335833884u, 3219796959u, 290221919u, 0, SIN_TOLERANCE, 0},
+{ 65, 3203224610u, 1473865960u, 1103073830u, 4000427507u, 3203224610u, 1473596865u, 0, SIN_TOLERANCE, 0},
+{ 66, 1103185231u, 4242092620u, 1067009473u, 14539161u, 1072227400u, 4090466752u, 0, SIN_TOLERANCE, 0},
+{ 67, 3192516074u, 1732245037u, 1101371955u, 1533536108u, 3192516074u, 1732245037u, 0, SIN_TOLERANCE, 0},
+{ 68, 3249153995u, 1833841275u, 1099430098u, 4144145552u, 1072622333u, 484555410u, 0, SIN_TOLERANCE, 0},
+{ 69, 3244270463u, 935007012u, 3188865420u, 604442938u, 1072668202u, 1236651337u, 0, SIN_TOLERANCE, 0},
+{ 70, 3206903253u, 2211464602u, 1046255144u, 1635910526u, 3206903253u, 2184476310u, 0, SIN_TOLERANCE, 0},
+{ 71, 1077871417u, 2549219008u, 3231633258u, 3733639385u, 3218677358u, 1624364943u, 0, SIN_TOLERANCE, 0},
+{ 72, 1082095089u, 1819374372u, 3202219056u, 2617077637u, 1071973583u, 3233577778u, 0, SIN_TOLERANCE, 0},
+{ 73, 1094345280u, 546465680u, 1048653554u, 532401530u, 3218994022u, 1472558371u, 0, SIN_TOLERANCE, 0},
+{ 74, 1044571091u, 2759019783u, 3221570188u, 3554409630u, 1044571091u, 2759019783u, 0, SIN_TOLERANCE, 0},
+{ 75, 3212931282u, 2527221960u, 1099107978u, 2696971136u, 3212931268u, 3320555499u, 0, SIN_TOLERANCE, 0},
+{ 76, 1097158000u, 173134582u, 1087299442u, 2877794600u, 1072521083u, 2425421985u, 0, SIN_TOLERANCE, 0},
+{ 77, 1086400474u, 547642046u, 3197285510u, 3521286127u, 3217558108u, 1228670264u, 0, SIN_TOLERANCE, 0},
+{ 78, 1074860702u, 1231582831u, 1090971734u, 1653446832u, 3219973371u, 3322500u, 0, SIN_TOLERANCE, 0},
+{ 79, 1061342535u, 3762182190u, 3252967851u, 2615360375u, 1061342535u, 3471785037u, 0, SIN_TOLERANCE, 0},
+{ 80, 3200834423u, 2588067350u, 3206610957u, 3551059728u, 3200834423u, 2588057111u, 0, SIN_TOLERANCE, 0},
+{ 81, 3206978856u, 845263327u, 1073415902u, 1749010288u, 3206978856u, 813684588u, 0, SIN_TOLERANCE, 0},
+{ 82, 3205576370u, 3092685191u, 3190678390u, 2872219490u, 3205576370u, 3089203192u, 0, SIN_TOLERANCE, 0},
+{ 83, 3218315055u, 4107255722u, 3205337291u, 3069068345u, 3218295099u, 3722832670u, 0, SIN_TOLERANCE, 0},
+{ 84, 3243990857u, 2294867524u, 3216653996u, 2860384670u, 3220163327u, 3978375316u, 0, SIN_TOLERANCE, 0},
+{ 85, 3193326350u, 2265437201u, 3240198679u, 1234948614u, 3193326350u, 2265437201u, 0, SIN_TOLERANCE, 0},
+{ 86, 3216359929u, 1186945904u, 3251167793u, 1896750851u, 3216358213u, 946725939u, 0, SIN_TOLERANCE, 0},
+{ 87, 1081575478u, 3686084548u, 1079286273u, 3309277689u, 3218959542u, 2751578340u, 0, SIN_TOLERANCE, 0},
+{ 88, 3223476240u, 3006860614u, 3231412671u, 2504194724u, 3218080130u, 4276033061u, 0, SIN_TOLERANCE, 0},
+{ 89, 3236149260u, 1948717780u, 1048317852u, 3791803982u, 3219561148u, 1725305302u, 0, SIN_TOLERANCE, 0},
+{ 90, 1064345015u, 4272034420u, 3192982124u, 1526175922u, 1064345013u, 34094566u, 0, SIN_TOLERANCE, 0},
+{ 91, 3245817826u, 4108948538u, 1104691287u, 640541190u, 1072633158u, 589399637u, 0, SIN_TOLERANCE, 0},
+{ 92, 3207257417u, 3259274853u, 1082507103u, 3677038020u, 3207257417u, 3206332840u, 0, SIN_TOLERANCE, 0},
+{ 93, 1083132498u, 3781708548u, 1096584871u, 1207386447u, 1072209224u, 1264489112u, 0, SIN_TOLERANCE, 0},
+{ 94, 3188695272u, 3011191657u, 1103798670u, 1096124830u, 3188695272u, 3011191657u, 0, SIN_TOLERANCE, 0},
+{ 95, 1063235023u, 2540404725u, 3240157452u, 4122845725u, 1063235022u, 1279389516u, 0, SIN_TOLERANCE, 0},
+{ 96, 1083643710u, 311336721u, 3214382367u, 4212533768u, 1072594097u, 3319282857u, 0, SIN_TOLERANCE, 0},
+{ 97, 1051139427u, 1769686293u, 3240200923u, 3538602249u, 1051139427u, 1769685778u, 0, SIN_TOLERANCE, 0},
+{ 98, 1078227549u, 508056696u, 1103793878u, 776520138u, 3215655025u, 4092391317u, 0, SIN_TOLERANCE, 0},
+{ 99, 1102910577u, 4064962760u, 1077424413u, 819766631u, 1070424010u, 2933370624u, 0, SIN_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 1070822880u, 179235259u, 0, SIN_TOLERANCE, 0},
+{ 101, 1082295059u, 2514398118u, 1076579751u, 870169764u, 1072653766u, 2542208304u, 0, SIN_TOLERANCE, 0},
+{ 102, 3246851392u, 1190259653u, 1069112254u, 3417249840u, 1072530344u, 3077286602u, 0, SIN_TOLERANCE, 0},
+{ 103, 3193663083u, 3467757357u, 3215075200u, 2168175352u, 3193663083u, 3467757356u, 0, SIN_TOLERANCE, 0},
+{ 104, 3239643135u, 1508888184u, 1060430241u, 3524949092u, 3219941021u, 4051870273u, 0, SIN_TOLERANCE, 0},
+{ 105, 3197412883u, 166402802u, 3237198975u, 3572369260u, 3197412883u, 166402710u, 0, SIN_TOLERANCE, 0},
+{ 106, 1081866822u, 2441536203u, 3202753937u, 3658194573u, 1072691983u, 3277464136u, 0, SIN_TOLERANCE, 0},
+{ 107, 1062392908u, 2479742828u, 1062342831u, 4214154303u, 1062392908u, 1313065636u, 0, SIN_TOLERANCE, 0},
+{ 108, 1082396794u, 426896765u, 1066474375u, 2201754442u, 1072530888u, 1547899382u, 0, SIN_TOLERANCE, 0},
+{ 109, 3195629021u, 2055773734u, 3239267288u, 291396537u, 3195629021u, 2055773723u, 0, SIN_TOLERANCE, 0},
+{ 110, 3236968033u, 874125203u, 3210508124u, 4091098764u, 1072252180u, 1389729742u, 0, SIN_TOLERANCE, 0},
+{ 111, 1065716026u, 120488169u, 3241241441u, 1985269424u, 1065716000u, 71449286u, 0, SIN_TOLERANCE, 0},
+{ 112, 3206539410u, 2243036871u, 3243941101u, 740033495u, 3206539410u, 2220858621u, 0, SIN_TOLERANCE, 0},
+{ 113, 3209424906u, 1176656356u, 1074261978u, 3588756231u, 3209424906u, 223951041u, 0, SIN_TOLERANCE, 0},
+{ 114, 3252816791u, 3037249392u, 1061635587u, 1173102190u, 1072325341u, 2929676563u, 0, SIN_TOLERANCE, 0},
+{ 115, 3237209581u, 2882725208u, 1071440059u, 69225090u, 1071617875u, 134033807u, 0, SIN_TOLERANCE, 0},
+{ 116, 3212663474u, 272319256u, 1072073912u, 2493997123u, 3212663457u, 2560321906u, 0, SIN_TOLERANCE, 0},
+{ 117, 1057720186u, 188610379u, 3232757923u, 2209647371u, 1057720186u, 185049725u, 0, SIN_TOLERANCE, 0},
+{ 118, 3236758517u, 1990439193u, 1078073146u, 622849962u, 1071355601u, 3706690183u, 0, SIN_TOLERANCE, 0},
+{ 119, 1057135741u, 756052458u, 1081649113u, 2247475162u, 1057135741u, 754952242u, 0, SIN_TOLERANCE, 0},
+{ 120, 1061623064u, 3878055211u, 3222407050u, 2979438623u, 1061623064u, 3340736229u, 0, SIN_TOLERANCE, 0},
+{ 121, 3195290997u, 2676398686u, 1105124431u, 3631096636u, 3195290997u, 2676398681u, 0, SIN_TOLERANCE, 0},
+{ 122, 1065079390u, 1697791764u, 3198136112u, 2299842819u, 1065079376u, 1610057462u, 0, SIN_TOLERANCE, 0},
+{ 123, 1078084768u, 1931502677u, 3215264397u, 3016456382u, 3220004894u, 1668609696u, 0, SIN_TOLERANCE, 0},
+{ 124, 1072253426u, 343404215u, 1061072607u, 4266232536u, 1072086222u, 4119862242u, 0, SIN_TOLERANCE, 0},
+{ 125, 3241230836u, 4140316002u, 1082896196u, 868256971u, 1072690956u, 765035729u, 0, SIN_TOLERANCE, 0},
+{ 126, 1075422810u, 1864139509u, 3187675097u, 3084482407u, 1069580313u, 3312804465u, 0, SIN_TOLERANCE, 0},
+{ 127, 3220191323u, 2427162817u, 3234748208u, 2715105792u, 3219859859u, 2237649499u, 0, SIN_TOLERANCE, 0},
+{ 128, 1064600512u, 3943389284u, 1046724025u, 3626825684u, 1064600507u, 1276893856u, 0, SIN_TOLERANCE, 0},
+{ 129, 1045423002u, 967350972u, 1093012318u, 448002663u, 1045423002u, 967350972u, 0, SIN_TOLERANCE, 0},
+{ 130, 3251845859u, 105058217u, 1069733884u, 171786224u, 3220069145u, 1168790563u, 0, SIN_TOLERANCE, 0},
+{ 131, 3189614508u, 2863482262u, 3204997271u, 877784425u, 3189614508u, 2863482262u, 0, SIN_TOLERANCE, 0},
+{ 132, 3202629313u, 2801782962u, 3213604117u, 762347195u, 3202629313u, 2801694452u, 0, SIN_TOLERANCE, 0},
+{ 133, 3233486727u, 2317950339u, 3246333414u, 2135700283u, 1072471825u, 2589645930u, 0, SIN_TOLERANCE, 0},
+{ 134, 1056516397u, 4171919805u, 1082858682u, 2180920863u, 1056516397u, 4171240187u, 0, SIN_TOLERANCE, 0},
+{ 135, 3220149084u, 1918836931u, 1083603224u, 3137821660u, 3219829255u, 761344608u, 0, SIN_TOLERANCE, 0},
+{ 136, 1103902874u, 3456203663u, 3235600523u, 2335688936u, 1070082723u, 1334614737u, 0, SIN_TOLERANCE, 0},
+{ 137, 1042279322u, 4170235262u, 1051824459u, 521583737u, 1042279322u, 4170235262u, 0, SIN_TOLERANCE, 0},
+{ 138, 1081348303u, 1296623194u, 3250673860u, 2442872540u, 1071794321u, 2307534527u, 0, SIN_TOLERANCE, 0},
+{ 139, 1061684277u, 289979405u, 1049514449u, 3865737145u, 1061684276u, 3979725310u, 0, SIN_TOLERANCE, 0},
+{ 140, 1075298944u, 3699090239u, 1054539840u, 3259249360u, 3218442720u, 3943632230u, 0, SIN_TOLERANCE, 0},
+{ 141, 1096418100u, 1619819023u, 1045993352u, 1022642459u, 3219483919u, 1110725871u, 0, SIN_TOLERANCE, 0},
+{ 142, 1081433004u, 19455098u, 3229182089u, 2096003654u, 1071953692u, 3887415361u, 0, SIN_TOLERANCE, 0},
+{ 143, 1076297936u, 3803689997u, 1071630912u, 2263729518u, 3219914082u, 2841872974u, 0, SIN_TOLERANCE, 0},
+{ 144, 1101357261u, 2816837387u, 1063422305u, 2597606398u, 3220176423u, 214584624u, 0, SIN_TOLERANCE, 0},
+{ 145, 1069100169u, 3680967506u, 1040201163u, 179224723u, 1069097512u, 979815490u, 0, SIN_TOLERANCE, 0},
+{ 146, 3188629767u, 978126928u, 1101553990u, 4047893399u, 3188629767u, 978126928u, 0, SIN_TOLERANCE, 0},
+{ 147, 3222322045u, 4059818629u, 1042678728u, 3640293589u, 1072406284u, 1786742831u, 0, SIN_TOLERANCE, 0},
+{ 148, 3248464040u, 3383497159u, 1070002807u, 1527313008u, 3218047308u, 1285854118u, 0, SIN_TOLERANCE, 0},
+{ 149, 3202707679u, 2599946514u, 1104170406u, 2738675352u, 3202707679u, 2599841376u, 0, SIN_TOLERANCE, 0},
+{ 150, 1105232623u, 3616571377u, 1060859316u, 1130603218u, 3219573748u, 1215925215u, 0, SIN_TOLERANCE, 0},
+{ 151, 1076028796u, 3859211180u, 1067940450u, 1744531824u, 3214409789u, 2584792611u, 0, SIN_TOLERANCE, 0},
+{ 152, 1042831340u, 1958025850u, 3236511256u, 2472176453u, 1042831340u, 1958025850u, 0, SIN_TOLERANCE, 0},
+{ 153, 3233107089u, 182132862u, 3250520938u, 3924356991u, 1072578370u, 2980431846u, 0, SIN_TOLERANCE, 0},
+{ 154, 3230501884u, 35632886u, 3209806504u, 1453402523u, 3216964734u, 4225175528u, 0, SIN_TOLERANCE, 0},
+{ 155, 1083522102u, 743225214u, 3202890678u, 142917400u, 1072590656u, 4260949149u, 0, SIN_TOLERANCE, 0},
+{ 156, 1080684976u, 1472665012u, 3203138231u, 256588219u, 1070228438u, 2092679689u, 0, SIN_TOLERANCE, 0},
+{ 157, 1094982162u, 1062927000u, 1061134072u, 931677439u, 3219446490u, 1081234903u, 0, SIN_TOLERANCE, 0},
+{ 158, 1058377732u, 2320910576u, 1055663370u, 288059864u, 1058377732u, 2314066573u, 0, SIN_TOLERANCE, 0},
+{ 159, 1078958093u, 1448349062u, 3199478070u, 3454027134u, 1071009563u, 3384255603u, 0, SIN_TOLERANCE, 0},
+{ 160, 3237458798u, 4215445172u, 3196654963u, 2231888973u, 1071748460u, 4139037911u, 0, SIN_TOLERANCE, 0},
+{ 161, 3246632231u, 40413554u, 3232578253u, 983832844u, 1072230353u, 3672194469u, 0, SIN_TOLERANCE, 0},
+{ 162, 3223721534u, 3995725873u, 1050082319u, 777231627u, 1072690845u, 636988494u, 0, SIN_TOLERANCE, 0},
+{ 163, 1040986626u, 672789828u, 3253385962u, 2982787335u, 1040986626u, 672789828u, 0, SIN_TOLERANCE, 0},
+{ 164, 1068390875u, 2075971825u, 1070166500u, 4034633931u, 1068389710u, 3161529855u, 0, SIN_TOLERANCE, 0},
+{ 165, 3210046177u, 1018222907u, 3244621407u, 3090050495u, 3210046176u, 3596251017u, 0, SIN_TOLERANCE, 0},
+{ 166, 1067680885u, 937732557u, 3200798890u, 2557898276u, 1067680575u, 1972612994u, 0, SIN_TOLERANCE, 0},
+{ 167, 1078342316u, 130346162u, 3223590310u, 275568693u, 1071233160u, 2708659300u, 0, SIN_TOLERANCE, 0},
+{ 168, 1042898869u, 3807416441u, 1075961161u, 3706820266u, 1042898869u, 3807416441u, 0, SIN_TOLERANCE, 0},
+{ 169, 3216099005u, 1710131411u, 1078123323u, 1900790503u, 3216098069u, 1762662362u, 0, SIN_TOLERANCE, 0},
+{ 170, 3238819361u, 3420420033u, 3210844787u, 588423066u, 1070295445u, 3527565762u, 0, SIN_TOLERANCE, 0},
+{ 171, 1049684114u, 1160162008u, 3246307879u, 4265764460u, 1049684114u, 1160161958u, 0, SIN_TOLERANCE, 0},
+{ 172, 1102543434u, 366653268u, 3188814424u, 466059202u, 1071873325u, 3249019602u, 0, SIN_TOLERANCE, 0},
+{ 173, 3226627739u, 1325936170u, 3221436876u, 680097612u, 1072682938u, 865545992u, 0, SIN_TOLERANCE, 0},
+{ 174, 3240391116u, 1827735934u, 3200554324u, 2875599271u, 3218775663u, 1968078348u, 0, SIN_TOLERANCE, 0},
+{ 175, 3191030402u, 3117037091u, 3239246636u, 15838845u, 3191030402u, 3117037091u, 0, SIN_TOLERANCE, 0},
+{ 176, 1051974004u, 749718883u, 3223587064u, 1523766569u, 1051974004u, 749717580u, 0, SIN_TOLERANCE, 0},
+{ 177, 1044833651u, 1966536294u, 3250158026u, 699164258u, 1044833651u, 1966536294u, 0, SIN_TOLERANCE, 0},
+{ 178, 1098048435u, 3759049394u, 1106085272u, 1183789499u, 1067724198u, 2503264895u, 0, SIN_TOLERANCE, 0},
+{ 179, 1081201623u, 1970107747u, 1095245453u, 2308233883u, 1071856614u, 1496877905u, 0, SIN_TOLERANCE, 0},
+{ 180, 1084756444u, 1491017852u, 1041444355u, 1723375725u, 1072328406u, 4148346279u, 0, SIN_TOLERANCE, 0},
+{ 181, 3216630070u, 1141349287u, 1097465301u, 3403438584u, 3216627182u, 3737898172u, 0, SIN_TOLERANCE, 0},
+{ 182, 3230571908u, 1711085243u, 3250239076u, 1377484108u, 1071511321u, 2243253033u, 0, SIN_TOLERANCE, 0},
+{ 183, 1098385019u, 2880275004u, 1084039594u, 1611394950u, 3219345234u, 1584777341u, 0, SIN_TOLERANCE, 0},
+{ 184, 3234221435u, 2626629370u, 1063771493u, 1499080813u, 3219468210u, 803658459u, 0, SIN_TOLERANCE, 0},
+{ 185, 1055231263u, 3936262414u, 1103919063u, 3175668759u, 1055231263u, 3936155644u, 0, SIN_TOLERANCE, 0},
+{ 186, 3207981719u, 1270950554u, 3194616071u, 3680565379u, 3207981719u, 1155967295u, 0, SIN_TOLERANCE, 0},
+{ 187, 3208148223u, 1066985223u, 3221613219u, 4089383168u, 3208148223u, 907199018u, 0, SIN_TOLERANCE, 0},
+{ 188, 3217058839u, 4017329311u, 3208334452u, 1667591498u, 3217055889u, 3244678034u, 0, SIN_TOLERANCE, 0},
+{ 189, 1088164157u, 3154656624u, 1061894279u, 3886344038u, 1072681871u, 43356682u, 0, SIN_TOLERANCE, 0},
+{ 190, 1050652945u, 977586119u, 3209762784u, 953839852u, 1050652945u, 977585787u, 0, SIN_TOLERANCE, 0},
+{ 191, 1104965247u, 143071571u, 3206165386u, 913097445u, 3220176895u, 642550610u, 0, SIN_TOLERANCE, 0},
+{ 192, 3190565456u, 1371169579u, 1057079837u, 2594818628u, 3190565456u, 1371169579u, 0, SIN_TOLERANCE, 0},
+{ 193, 3251793336u, 2259342224u, 3217432469u, 1824221478u, 1072638954u, 2287566710u, 0, SIN_TOLERANCE, 0},
+{ 194, 3246834775u, 1576604497u, 1079368611u, 185078728u, 1071666033u, 3954975003u, 0, SIN_TOLERANCE, 0},
+{ 195, 3221679427u, 444800035u, 3243343143u, 1734989302u, 3218173113u, 1522075355u, 0, SIN_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1072418396u, 2140187299u, 0, SIN_TOLERANCE, 0},
+{ 197, 3234695968u, 1941318385u, 1045807374u, 792193370u, 3219097358u, 2422945605u, 0, SIN_TOLERANCE, 0},
+{ 198, 3238299666u, 1299392207u, 3212131720u, 3205732280u, 1070785701u, 2665619523u, 0, SIN_TOLERANCE, 0},
+{ 199, 1098698804u, 3035093505u, 1052187689u, 3287702190u, 3219661363u, 3456576138u, 0, SIN_TOLERANCE, 0},
+{ 200, 3246676260u, 2160225215u, 1102624859u, 836655570u, 3216148644u, 3912792675u, 0, SIN_TOLERANCE, 0},
+{ 201, 1096723626u, 3360816360u, 3246176356u, 172860634u, 3220164389u, 1558063129u, 0, SIN_TOLERANCE, 0},
+{ 202, 1070995788u, 146831910u, 1051558014u, 2340722078u, 1070967180u, 455169693u, 0, SIN_TOLERANCE, 0},
+{ 203, 3230416351u, 1603798153u, 3207725532u, 1099413093u, 1072409569u, 201880887u, 0, SIN_TOLERANCE, 0},
+{ 204, 3246678378u, 2429340443u, 3190303581u, 3223770005u, 3220129423u, 1040776768u, 0, SIN_TOLERANCE, 0},
+{ 205, 1075882959u, 955542166u, 3230415151u, 275583938u, 1072454723u, 572297329u, 0, SIN_TOLERANCE, 0},
+{ 206, 1092971882u, 513397822u, 1090646554u, 2089321329u, 3218397995u, 2821464852u, 0, SIN_TOLERANCE, 0},
+{ 207, 3193169876u, 2782073372u, 1046063872u, 4023829068u, 3193169876u, 2782073372u, 0, SIN_TOLERANCE, 0},
+{ 208, 1098564822u, 3242223094u, 3194111199u, 4264674108u, 1071856080u, 3645770997u, 0, SIN_TOLERANCE, 0},
+{ 209, 3238510821u, 3506346169u, 1047020885u, 1742757458u, 1072690743u, 315036582u, 0, SIN_TOLERANCE, 0},
+{ 210, 3192664477u, 1265459564u, 3193450280u, 3650514880u, 3192664477u, 1265459564u, 0, SIN_TOLERANCE, 0},
+{ 211, 1081755890u, 1525260440u, 3235452527u, 2612331392u, 3218719377u, 3676821394u, 0, SIN_TOLERANCE, 0},
+{ 212, 3248668920u, 1263613754u, 3219096387u, 635677201u, 3220176869u, 1842532013u, 0, SIN_TOLERANCE, 0},
+{ 213, 3206272087u, 4140947288u, 3200792376u, 2013265346u, 3206272087u, 4126233538u, 0, SIN_TOLERANCE, 0},
+{ 214, 3249974392u, 1912759945u, 3237045253u, 1351396825u, 3219910220u, 246004999u, 0, SIN_TOLERANCE, 0},
+{ 215, 3248205162u, 1001433078u, 3206926643u, 2741676659u, 1072684426u, 1737390075u, 0, SIN_TOLERANCE, 0},
+{ 216, 1080923606u, 1088945233u, 1085095743u, 3986114865u, 3219912227u, 2624070465u, 0, SIN_TOLERANCE, 0},
+{ 217, 3215734057u, 831239754u, 1099828675u, 3071308141u, 3215733122u, 716489315u, 0, SIN_TOLERANCE, 0},
+{ 218, 3225834497u, 3473592372u, 1102759382u, 1309576357u, 3219388623u, 3993183379u, 0, SIN_TOLERANCE, 0},
+{ 219, 3251186706u, 2042340367u, 1091945628u, 2062772374u, 1072597127u, 2200262097u, 0, SIN_TOLERANCE, 0},
+{ 220, 3194765687u, 1840632537u, 1096533424u, 807510337u, 3194765687u, 1840632533u, 0, SIN_TOLERANCE, 0},
+{ 221, 3231451722u, 144814872u, 3212698915u, 2282965697u, 1071983481u, 3846419649u, 0, SIN_TOLERANCE, 0},
+{ 222, 1071236430u, 2552499583u, 3229111426u, 1470130815u, 1071191158u, 3577871213u, 0, SIN_TOLERANCE, 0},
+{ 223, 3243093065u, 2858583811u, 1089760910u, 6360994u, 3220122625u, 1732563055u, 0, SIN_TOLERANCE, 0},
+{ 224, 3198264929u, 1614537194u, 1075198900u, 4088705365u, 3198264929u, 1614536965u, 0, SIN_TOLERANCE, 0},
+{ 225, 3250939070u, 3545570051u, 1065221325u, 1629217700u, 1071003501u, 2410682589u, 0, SIN_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 1072413867u, 136366712u, 0, SIN_TOLERANCE, 0},
+{ 227, 3196802686u, 2406734491u, 1042055360u, 89226663u, 3196802686u, 2406734438u, 0, SIN_TOLERANCE, 0},
+{ 228, 3195751081u, 1618759139u, 3194723421u, 3888234802u, 3195751081u, 1618759126u, 0, SIN_TOLERANCE, 0},
+{ 229, 1055357248u, 3590035633u, 3212424262u, 2892456615u, 1055357248u, 3589897668u, 0, SIN_TOLERANCE, 0},
+{ 230, 3189943060u, 2431246964u, 3241512456u, 183850734u, 3189943060u, 2431246964u, 0, SIN_TOLERANCE, 0},
+{ 231, 1089501101u, 3088319870u, 3211544311u, 862225364u, 1072189734u, 1087579715u, 0, SIN_TOLERANCE, 0},
+{ 232, 3235294664u, 3495352775u, 1058576726u, 596957268u, 3218985922u, 793083747u, 0, SIN_TOLERANCE, 0},
+{ 233, 1046553348u, 1839214511u, 3205004060u, 1923240983u, 1046553348u, 1839214510u, 0, SIN_TOLERANCE, 0},
+{ 234, 1058073864u, 739619702u, 3223356436u, 2689885273u, 1058073864u, 736309424u, 0, SIN_TOLERANCE, 0},
+{ 235, 3200324971u, 2143376228u, 1098306332u, 3760236188u, 3200324971u, 2143372904u, 0, SIN_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 3219152238u, 1287790148u, 0, SIN_TOLERANCE, 0},
+{ 237, 3214165989u, 2493598049u, 3194927008u, 1689107592u, 3214165902u, 2958559986u, 0, SIN_TOLERANCE, 0},
+{ 238, 3189989959u, 1578976988u, 1066368383u, 2117279163u, 3189989959u, 1578976988u, 0, SIN_TOLERANCE, 0},
+{ 239, 3222988111u, 3425290087u, 1098487295u, 1263412017u, 3218820540u, 1900418251u, 0, SIN_TOLERANCE, 0},
+{ 240, 3208432764u, 3635396812u, 1070999426u, 3965655689u, 3208432764u, 3374510708u, 0, SIN_TOLERANCE, 0},
+{ 241, 1060196346u, 2183973116u, 1101098363u, 1118613350u, 1060196346u, 2127296784u, 0, SIN_TOLERANCE, 0},
+{ 242, 3221946089u, 199516350u, 1078368488u, 164621458u, 1070434834u, 2662056578u, 0, SIN_TOLERANCE, 0},
+{ 243, 3187706018u, 3570940805u, 3230316437u, 3596080877u, 3187706018u, 3570940805u, 0, SIN_TOLERANCE, 0},
+{ 244, 3208209565u, 980880313u, 1079833442u, 884465057u, 3208209565u, 802037311u, 0, SIN_TOLERANCE, 0},
+{ 245, 1099977124u, 2558179220u, 1052873711u, 1233598120u, 1072290576u, 1462410304u, 0, SIN_TOLERANCE, 0},
+{ 246, 1047115221u, 1909994277u, 1085015978u, 2991527452u, 1047115221u, 1909994274u, 0, SIN_TOLERANCE, 0},
+{ 247, 1060855260u, 1680290941u, 1074309900u, 2943870846u, 1060855260u, 1456422275u, 0, SIN_TOLERANCE, 0},
+{ 248, 1059496132u, 1451927357u, 3228615456u, 1502585517u, 1059496132u, 1420289507u, 0, SIN_TOLERANCE, 0},
+{ 249, 3236211951u, 751136990u, 3230392165u, 3493275472u, 3219937610u, 2246171886u, 0, SIN_TOLERANCE, 0},
+{ 250, 1098365967u, 1209623292u, 3238056647u, 979495322u, 1071752554u, 1874333801u, 0, SIN_TOLERANCE, 0},
+{ 251, 3250424296u, 1717672108u, 1048120593u, 531240316u, 1070213823u, 2671633378u, 0, SIN_TOLERANCE, 0},
+{ 252, 1054174923u, 3548721654u, 1086112947u, 3391817224u, 1054174923u, 3548695399u, 0, SIN_TOLERANCE, 0},
+{ 253, 1077836851u, 2758195125u, 1100880260u, 2028440924u, 3219761819u, 2824613343u, 0, SIN_TOLERANCE, 0},
+{ 254, 1084223893u, 2750123373u, 3232200256u, 1086294931u, 1072071999u, 3505664549u, 0, SIN_TOLERANCE, 0},
+{ 255, 1043958672u, 2986160931u, 1076097908u, 2540046258u, 1043958672u, 2986160931u, 0, SIN_TOLERANCE, 0},
+{ 256, 3235476602u, 451471221u, 1064816262u, 4187644495u, 1069352923u, 1649353225u, 0, SIN_TOLERANCE, 0},
+{ 257, 1099460228u, 2439500162u, 1065280276u, 1979490284u, 1071123074u, 1626723231u, 0, SIN_TOLERANCE, 0},
+{ 258, 1040415832u, 2283342035u, 1078398157u, 1345997553u, 1040415832u, 2283342035u, 0, SIN_TOLERANCE, 0},
+{ 259, 3213249348u, 179066662u, 1103272172u, 1217337578u, 3213249319u, 799119578u, 0, SIN_TOLERANCE, 0},
+{ 260, 3211562377u, 3779303391u, 3210023352u, 3115946280u, 3211562374u, 391551481u, 0, SIN_TOLERANCE, 0},
+{ 261, 3192989874u, 286247089u, 1085153597u, 713645369u, 3192989874u, 286247089u, 0, SIN_TOLERANCE, 0},
+{ 262, 1093670500u, 1468283899u, 1042831668u, 2022736418u, 1071991346u, 1826432782u, 0, SIN_TOLERANCE, 0},
+{ 263, 1083139105u, 3305564080u, 1065483445u, 482392433u, 3219574119u, 3539231989u, 0, SIN_TOLERANCE, 0},
+{ 264, 3201695807u, 2256346551u, 3222430705u, 2071674991u, 3201695807u, 2256318153u, 0, SIN_TOLERANCE, 0},
+{ 265, 3204024695u, 2295269094u, 1084451053u, 2773103941u, 3204024695u, 2294558540u, 0, SIN_TOLERANCE, 0},
+{ 266, 1078173946u, 1482721827u, 1092243422u, 3125409590u, 1072693090u, 777851873u, 0, SIN_TOLERANCE, 0},
+{ 267, 3221065973u, 1381740563u, 1071545057u, 2918235653u, 3220096899u, 393002564u, 0, SIN_TOLERANCE, 0},
+{ 268, 3238715972u, 1105857967u, 3241990046u, 2703723225u, 3219270769u, 1048619579u, 0, SIN_TOLERANCE, 0},
+{ 269, 1043015571u, 174689677u, 1079333374u, 3947057014u, 1043015571u, 174689677u, 0, SIN_TOLERANCE, 0},
+{ 270, 1090461859u, 2023082423u, 3242081486u, 1169047927u, 3217478735u, 1503114855u, 0, SIN_TOLERANCE, 0},
+{ 271, 1064525899u, 3742487766u, 1043425732u, 194972788u, 1064525895u, 581411206u, 0, SIN_TOLERANCE, 0},
+{ 272, 3213791827u, 2136071361u, 3211529757u, 993675115u, 3213791753u, 385020554u, 0, SIN_TOLERANCE, 0},
+{ 273, 3213663381u, 210772141u, 3241441539u, 580731413u, 3213663320u, 232861266u, 0, SIN_TOLERANCE, 0},
+{ 274, 1093840413u, 1751560711u, 1074522705u, 180987057u, 3219431759u, 1266961775u, 0, SIN_TOLERANCE, 0},
+{ 275, 1066754591u, 2552236599u, 1088658621u, 2112468655u, 1066754489u, 3214488945u, 0, SIN_TOLERANCE, 0},
+{ 276, 3189290617u, 1578223762u, 3224596567u, 2456166162u, 3189290617u, 1578223762u, 0, SIN_TOLERANCE, 0},
+{ 277, 1058506965u, 2110924310u, 1086207177u, 3161208323u, 1058506965u, 2102025662u, 0, SIN_TOLERANCE, 0},
+{ 278, 3231863394u, 2352173188u, 1079361728u, 4070222179u, 3220176852u, 2198122228u, 0, SIN_TOLERANCE, 0},
+{ 279, 1101012904u, 2481562701u, 1090937016u, 3809489716u, 3217832679u, 1979402010u, 0, SIN_TOLERANCE, 0},
+{ 280, 3197002651u, 330905705u, 1086260896u, 90264431u, 3197002651u, 330905632u, 0, SIN_TOLERANCE, 0},
+{ 281, 1040729961u, 4162008079u, 3194387916u, 759522153u, 1040729961u, 4162008079u, 0, SIN_TOLERANCE, 0},
+{ 282, 1081015037u, 1839697482u, 3216442625u, 2211508949u, 1070955687u, 1388259226u, 0, SIN_TOLERANCE, 0},
+{ 283, 3249807211u, 3736863454u, 1063475914u, 3150741666u, 1071777503u, 4068277341u, 0, SIN_TOLERANCE, 0},
+{ 284, 1060785883u, 4200269406u, 3236646101u, 1061812176u, 1060785883u, 4001387918u, 0, SIN_TOLERANCE, 0},
+{ 285, 1080217979u, 106027290u, 3234978297u, 2245237549u, 3218059427u, 1946602808u, 0, SIN_TOLERANCE, 0},
+{ 286, 3246984334u, 2132131375u, 3250483427u, 3449276437u, 1069746729u, 3706777593u, 0, SIN_TOLERANCE, 0},
+{ 287, 1089388778u, 2334440944u, 1105423490u, 4004336184u, 1071914715u, 1322385081u, 0, SIN_TOLERANCE, 0},
+{ 288, 3218772704u, 4090088208u, 1042030013u, 3898658299u, 3218723093u, 1840404530u, 0, SIN_TOLERANCE, 0},
+{ 289, 3207908064u, 2272831437u, 3253082595u, 2639188641u, 3207908064u, 2174645771u, 0, SIN_TOLERANCE, 0},
+{ 290, 1054766684u, 1856594168u, 3189515294u, 4101853676u, 1054766684u, 1856518788u, 0, SIN_TOLERANCE, 0},
+{ 291, 1076012412u, 2211699255u, 3195060344u, 3865018604u, 1069151373u, 3758558462u, 0, SIN_TOLERANCE, 0},
+{ 292, 3242767010u, 996259334u, 3241496889u, 3782673116u, 1070736732u, 1844588698u, 0, SIN_TOLERANCE, 0},
+{ 293, 1099130747u, 3840380763u, 1048674041u, 550040067u, 1072262137u, 3368858202u, 0, SIN_TOLERANCE, 0},
+{ 294, 3251419593u, 95874100u, 3237232828u, 2645647822u, 1072611743u, 4016179233u, 0, SIN_TOLERANCE, 0},
+{ 295, 1043665640u, 3441419500u, 3252367038u, 876710419u, 1043665640u, 3441419500u, 0, SIN_TOLERANCE, 0},
+{ 296, 3238593552u, 2560836004u, 3199616543u, 1180840586u, 1072163512u, 3370547255u, 0, SIN_TOLERANCE, 0},
+{ 297, 3221602966u, 2218230392u, 3227485787u, 3947214579u, 3218747484u, 1674330182u, 0, SIN_TOLERANCE, 0},
+{ 298, 1079539654u, 1447312532u, 1081476588u, 780366847u, 3218975849u, 1610107879u, 0, SIN_TOLERANCE, 0},
+{ 299, 1072569643u, 2842113832u, 3216156731u, 225159029u, 1072290979u, 1210181575u, 0, SIN_TOLERANCE, 0},
+{ 300, 1098117193u, 1601981129u, 3234628869u, 2236538344u, 3217893977u, 3064451299u, 0, SIN_TOLERANCE, 0},
+{ 301, 1085173524u, 2194185737u, 3242362684u, 87913366u, 3215053909u, 2806861459u, 0, SIN_TOLERANCE, 0},
+{ 302, 3199083880u, 1346862963u, 1077836259u, 3604666660u, 3199083880u, 1346861821u, 0, SIN_TOLERANCE, 0},
+{ 303, 3212255979u, 3115209742u, 1099332326u, 1325101950u, 3212255971u, 2844681635u, 0, SIN_TOLERANCE, 0},
+{ 304, 3224546042u, 3889223100u, 1053247613u, 3371396923u, 1070014491u, 1859783173u, 0, SIN_TOLERANCE, 0},
+{ 305, 3220477868u, 4163120793u, 1075022670u, 1387631215u, 3220093026u, 1482317646u, 0, SIN_TOLERANCE, 0},
+{ 306, 3205481779u, 1532426189u, 1063168268u, 3397022615u, 3205481779u, 1526953343u, 0, SIN_TOLERANCE, 0},
+{ 307, 3201033321u, 89324166u, 1079206060u, 3429424710u, 3201033321u, 89309700u, 0, SIN_TOLERANCE, 0},
+{ 308, 3192325102u, 747591401u, 1072238381u, 2803213904u, 3192325102u, 747591401u, 0, SIN_TOLERANCE, 0},
+{ 309, 1091113780u, 271904221u, 1044258318u, 1858545114u, 3220166722u, 3739614867u, 0, SIN_TOLERANCE, 0},
+{ 310, 3228068914u, 314958082u, 3249912496u, 2966213175u, 3219267980u, 1442348823u, 0, SIN_TOLERANCE, 0},
+{ 311, 3197179414u, 3119528953u, 3217179014u, 2908718240u, 3197179414u, 3119528901u, 0, SIN_TOLERANCE, 0},
+{ 312, 3242467576u, 2018361566u, 1100926600u, 3985805054u, 1072498987u, 1114330108u, 0, SIN_TOLERANCE, 0},
+{ 313, 1070132580u, 409584884u, 3239758947u, 755795129u, 1070122273u, 2544291857u, 0, SIN_TOLERANCE, 0},
+{ 314, 1075772446u, 1819156379u, 3251342302u, 2982669005u, 1072681080u, 3512208687u, 0, SIN_TOLERANCE, 0},
+{ 315, 1101563433u, 2080534280u, 3188254060u, 449171797u, 3220175583u, 2151064167u, 0, SIN_TOLERANCE, 0},
+{ 316, 1095956900u, 168744837u, 3214950009u, 1322217822u, 1072189425u, 4007310009u, 0, SIN_TOLERANCE, 0},
+{ 317, 3254226900u, 3250487255u, 1062120700u, 1876195180u, 3220007214u, 3581504613u, 0, SIN_TOLERANCE, 0},
+{ 318, 3226343480u, 1336400247u, 1098057903u, 3314079581u, 1071554540u, 633418165u, 0, SIN_TOLERANCE, 0},
+{ 319, 3203678820u, 265025555u, 1063854282u, 3779482256u, 3203678820u, 264670771u, 0, SIN_TOLERANCE, 0},
+{ 320, 1067300501u, 887044257u, 1054789618u, 2732056261u, 1067300227u, 4110391556u, 0, SIN_TOLERANCE, 0},
+{ 321, 1050106742u, 4027115185u, 3191764868u, 2940199511u, 1050106742u, 4027115052u, 0, SIN_TOLERANCE, 0},
+{ 322, 3202500155u, 2875684421u, 3227459837u, 2251967570u, 3202500155u, 2875619325u, 0, SIN_TOLERANCE, 0},
+{ 323, 1063244412u, 284173546u, 3238823679u, 3557800647u, 1063244410u, 3242409421u, 0, SIN_TOLERANCE, 0},
+{ 324, 1101458560u, 3147771266u, 3220110464u, 2933364246u, 3219368592u, 3568645980u, 0, SIN_TOLERANCE, 0},
+{ 325, 1064853160u, 3366183281u, 3234870843u, 537442654u, 1064853151u, 1551952560u, 0, SIN_TOLERANCE, 0},
+{ 326, 3244118788u, 2529029548u, 3249882819u, 3781513577u, 1072616894u, 43106596u, 0, SIN_TOLERANCE, 0},
+{ 327, 3213436354u, 1080845539u, 3206760016u, 911778687u, 3213436312u, 3596660530u, 0, SIN_TOLERANCE, 0},
+{ 328, 3191951036u, 469586759u, 1091830022u, 3080528840u, 3191951036u, 469586759u, 0, SIN_TOLERANCE, 0},
+{ 329, 1080249104u, 2863108169u, 3225605506u, 2508274250u, 3218694376u, 673605614u, 0, SIN_TOLERANCE, 0},
+{ 330, 3210826984u, 4080017377u, 3206492941u, 1470284690u, 3210826984u, 440611368u, 0, SIN_TOLERANCE, 0},
+{ 331, 3207120390u, 3867917386u, 1102054928u, 3504746045u, 3207120390u, 3826399709u, 0, SIN_TOLERANCE, 0},
+{ 332, 1064522279u, 2962134101u, 3244741577u, 3390537350u, 1064522274u, 4269499531u, 0, SIN_TOLERANCE, 0},
+{ 333, 1088201813u, 1702237980u, 1071598971u, 1102587474u, 3219219713u, 2231984255u, 0, SIN_TOLERANCE, 0},
+{ 334, 3202970118u, 2180218657u, 3211592260u, 1206527853u, 3202970118u, 2180042922u, 0, SIN_TOLERANCE, 0},
+{ 335, 3197084744u, 394130786u, 3242511482u, 2437699868u, 3197084744u, 394130704u, 0, SIN_TOLERANCE, 0},
+{ 336, 1044237059u, 849581558u, 3252006507u, 2008614943u, 1044237059u, 849581558u, 0, SIN_TOLERANCE, 0},
+{ 337, 3210140014u, 3128971673u, 3249137531u, 2773583059u, 3210140014u, 1044145102u, 0, SIN_TOLERANCE, 0},
+{ 338, 1085029866u, 590727700u, 3248651761u, 2183878539u, 1072378519u, 2279746955u, 0, SIN_TOLERANCE, 0},
+{ 339, 1101098629u, 820687580u, 3208143496u, 1402434664u, 1070935377u, 2141380414u, 0, SIN_TOLERANCE, 0},
+{ 340, 3252290835u, 1873709254u, 3245167989u, 44275991u, 3219443403u, 3646165606u, 0, SIN_TOLERANCE, 0},
+{ 341, 3189668753u, 1174874204u, 3208263730u, 2360372288u, 3189668753u, 1174874204u, 0, SIN_TOLERANCE, 0},
+{ 342, 1103854676u, 937573440u, 3208953761u, 211240241u, 3219590734u, 928440172u, 0, SIN_TOLERANCE, 0},
+{ 343, 3243548934u, 2469774991u, 1043117070u, 3380071805u, 3219568461u, 498405354u, 0, SIN_TOLERANCE, 0},
+{ 344, 1058121042u, 442507560u, 3254252803u, 3257889649u, 1058121042u, 438756694u, 0, SIN_TOLERANCE, 0},
+{ 345, 1068850520u, 1854921625u, 1049810168u, 2729627545u, 1068848895u, 2974802106u, 0, SIN_TOLERANCE, 0},
+{ 346, 3254712629u, 4001809575u, 3240128649u, 278261523u, 3219146788u, 1661912448u, 0, SIN_TOLERANCE, 0},
+{ 347, 1087224694u, 1793907966u, 3238955714u, 398859249u, 3220058283u, 3138944076u, 0, SIN_TOLERANCE, 0},
+{ 348, 3200952547u, 2511916952u, 3219195283u, 1697158299u, 3200952547u, 2511904320u, 0, SIN_TOLERANCE, 0},
+{ 349, 1069985548u, 3230931724u, 3243897690u, 3508781585u, 1069977779u, 2586916475u, 0, SIN_TOLERANCE, 0},
+{ 350, 1103847606u, 1674254897u, 1046547577u, 217148561u, 1071576757u, 1023587413u, 0, SIN_TOLERANCE, 0},
+{ 351, 3211263954u, 3275604304u, 3194840159u, 2991205850u, 3211263952u, 2202700417u, 0, SIN_TOLERANCE, 0},
+{ 352, 3195249375u, 3509997278u, 3248888030u, 3897986511u, 3195249375u, 3509997273u, 0, SIN_TOLERANCE, 0},
+{ 353, 1047182435u, 2156824613u, 1042295665u, 1239257646u, 1047182435u, 2156824610u, 0, SIN_TOLERANCE, 0},
+{ 354, 3213264085u, 1073153314u, 3250031627u, 2567234990u, 3213264055u, 2199995967u, 0, SIN_TOLERANCE, 0},
+{ 355, 3190593412u, 4261696995u, 3197784432u, 323702024u, 3190593412u, 4261696995u, 0, SIN_TOLERANCE, 0},
+{ 356, 3243690997u, 4075177615u, 3202791065u, 1919006082u, 1072671496u, 2731841203u, 0, SIN_TOLERANCE, 0},
+{ 357, 3239270013u, 386429966u, 1086504491u, 3698826164u, 3220169748u, 4045379867u, 0, SIN_TOLERANCE, 0},
+{ 358, 1078327190u, 1681986446u, 3194985869u, 3072950140u, 3215496106u, 3159177907u, 0, SIN_TOLERANCE, 0},
+{ 359, 3217311933u, 3719038997u, 1055433962u, 3331415058u, 3217306376u, 4089001786u, 0, SIN_TOLERANCE, 0},
+{ 360, 1060749713u, 2420250111u, 3238002206u, 1928661079u, 1060749713u, 2233624875u, 0, SIN_TOLERANCE, 0},
+{ 361, 1081914210u, 3679866727u, 3227386672u, 1273835792u, 1071672711u, 2463694361u, 0, SIN_TOLERANCE, 0},
+{ 362, 1041622738u, 2682092368u, 3234222284u, 1325425811u, 1041622738u, 2682092368u, 0, SIN_TOLERANCE, 0},
+{ 363, 1056312613u, 4175172697u, 3208346191u, 2130706153u, 1056312613u, 4174715193u, 0, SIN_TOLERANCE, 0},
+{ 364, 1092089624u, 1200784450u, 1083605096u, 1248595607u, 3218646220u, 2271896913u, 0, SIN_TOLERANCE, 0},
+{ 365, 3213890863u, 1897285171u, 3251296075u, 944966123u, 3213890820u, 473058695u, 0, SIN_TOLERANCE, 0},
+{ 366, 3241371250u, 2270747330u, 3230692631u, 422503284u, 3220159790u, 1559521389u, 0, SIN_TOLERANCE, 0},
+{ 367, 1084120037u, 2857564741u, 1075647403u, 3308906709u, 1072682608u, 1566770115u, 0, SIN_TOLERANCE, 0},
+{ 368, 3203475098u, 1380066948u, 3232612906u, 2613634294u, 3203475098u, 1379851699u, 0, SIN_TOLERANCE, 0},
+{ 369, 1063890856u, 4022784584u, 1060483857u, 3264056381u, 1063890854u, 765768635u, 0, SIN_TOLERANCE, 0},
+{ 370, 1044637404u, 1778509100u, 3213146285u, 2665833973u, 1044637404u, 1778509100u, 0, SIN_TOLERANCE, 0},
+{ 371, 3216727300u, 1859175955u, 1079949560u, 4258450607u, 3216723887u, 2800533765u, 0, SIN_TOLERANCE, 0},
+{ 372, 1048277388u, 4128020197u, 1076266146u, 4122840980u, 1048277388u, 4128020184u, 0, SIN_TOLERANCE, 0},
+{ 373, 3193183163u, 2454653987u, 3229487005u, 2977478685u, 3193183163u, 2454653987u, 0, SIN_TOLERANCE, 0},
+{ 374, 3253556483u, 1355181872u, 1095308770u, 436846481u, 1070404584u, 1346890185u, 0, SIN_TOLERANCE, 0},
+{ 375, 3246605302u, 2592856453u, 3247825559u, 3195234082u, 3219332754u, 3289059462u, 0, SIN_TOLERANCE, 0},
+{ 376, 3222118023u, 3554670043u, 1091621009u, 3321236467u, 1071711521u, 2918342783u, 0, SIN_TOLERANCE, 0},
+{ 377, 1069012833u, 1936670355u, 1095715713u, 2958468553u, 1069010575u, 3545442834u, 0, SIN_TOLERANCE, 0},
+{ 378, 3192291109u, 2960339502u, 1098808013u, 1044068983u, 3192291109u, 2960339502u, 0, SIN_TOLERANCE, 0},
+{ 379, 3196691185u, 4093388677u, 1095478112u, 1735930261u, 3196691185u, 4093388633u, 0, SIN_TOLERANCE, 0},
+{ 380, 1091040302u, 1807398746u, 3195743135u, 4261616162u, 3218499784u, 630768479u, 0, SIN_TOLERANCE, 0},
+{ 381, 3209294194u, 3250576797u, 1059002384u, 3043079652u, 3209294194u, 2487695189u, 0, SIN_TOLERANCE, 0},
+{ 382, 1069207109u, 666051428u, 3208765404u, 1912684117u, 1069203900u, 3062493543u, 0, SIN_TOLERANCE, 0},
+{ 383, 1103487420u, 1949030179u, 1096388934u, 896459246u, 3219528448u, 2251950666u, 0, SIN_TOLERANCE, 0},
+{ 384, 1054300653u, 622499767u, 1066707637u, 1490260486u, 1054300653u, 622465812u, 0, SIN_TOLERANCE, 0},
+{ 385, 1106688493u, 1490616165u, 3251242436u, 795675736u, 1071164231u, 1572663486u, 0, SIN_TOLERANCE, 0},
+{ 386, 1080943896u, 3662877092u, 3234317146u, 3200513112u, 1071174065u, 1421883672u, 0, SIN_TOLERANCE, 0},
+{ 387, 1084088786u, 1356101968u, 3236536816u, 3062844611u, 1072062816u, 4171501946u, 0, SIN_TOLERANCE, 0},
+{ 388, 3219922640u, 2284484846u, 3219498359u, 3240896015u, 3219694444u, 2213484574u, 0, SIN_TOLERANCE, 0},
+{ 389, 3235759689u, 494503287u, 1092811254u, 142673998u, 3213704730u, 3260565064u, 0, SIN_TOLERANCE, 0},
+{ 390, 3252125916u, 3394882641u, 3225306538u, 364852125u, 1072108480u, 4038780813u, 0, SIN_TOLERANCE, 0},
+{ 391, 3225261763u, 193885269u, 1088149839u, 1359805831u, 1072624787u, 4121749569u, 0, SIN_TOLERANCE, 0},
+{ 392, 3200484782u, 592580907u, 3199560872u, 3086438952u, 3200484782u, 592575947u, 0, SIN_TOLERANCE, 0},
+{ 393, 1059518664u, 1778008540u, 1049064687u, 73581647u, 1059518664u, 1744906541u, 0, SIN_TOLERANCE, 0},
+{ 394, 3246733598u, 233240285u, 1081923320u, 2710903921u, 1072686695u, 3681926353u, 0, SIN_TOLERANCE, 0},
+{ 395, 1069513767u, 3719878805u, 1079866720u, 3615458228u, 1069508569u, 4007151816u, 0, SIN_TOLERANCE, 0},
+{ 396, 3221194724u, 3647632375u, 3247225271u, 3839959621u, 3220011446u, 657266419u, 0, SIN_TOLERANCE, 0},
+{ 397, 1103401096u, 2232210456u, 3235434773u, 224271737u, 3219291904u, 1056060008u, 0, SIN_TOLERANCE, 0},
+{ 398, 3193003684u, 2134662911u, 3190390590u, 4239009051u, 3193003684u, 2134662911u, 0, SIN_TOLERANCE, 0},
+{ 399, 1080526145u, 2305279897u, 1077668039u, 1854523320u, 3218395496u, 1710236719u, 0, SIN_TOLERANCE, 0},
+{ 400, 3219864259u, 538224650u, 3206153057u, 1379649610u, 3219656570u, 905357172u, 0, SIN_TOLERANCE, 0},
+{ 401, 3196410507u, 3683897920u, 3244167599u, 3647579469u, 3196410507u, 3683897895u, 0, SIN_TOLERANCE, 0},
+{ 402, 1090280933u, 2694093608u, 1042775347u, 598406111u, 1072678613u, 1199374585u, 0, SIN_TOLERANCE, 0},
+{ 403, 3211635392u, 872706833u, 1084802480u, 2200602798u, 3211635387u, 4094761714u, 0, SIN_TOLERANCE, 0},
+{ 404, 1042339597u, 904146293u, 1060867322u, 1729685598u, 1042339597u, 904146293u, 0, SIN_TOLERANCE, 0},
+{ 405, 3195694970u, 1894173462u, 3232800651u, 191960416u, 3195694970u, 1894173450u, 0, SIN_TOLERANCE, 0},
+{ 406, 1091225343u, 3521028551u, 1054522089u, 3287274359u, 1072666872u, 2878943607u, 0, SIN_TOLERANCE, 0},
+{ 407, 1095386964u, 959640601u, 3201578263u, 4136915018u, 1071650759u, 4107877457u, 0, SIN_TOLERANCE, 0},
+{ 408, 1064005451u, 1553716379u, 1106027987u, 984725765u, 1064005448u, 3806280u, 0, SIN_TOLERANCE, 0},
+{ 409, 3238832641u, 2287646644u, 3240329321u, 2276183378u, 3219833338u, 4061144814u, 0, SIN_TOLERANCE, 0},
+{ 410, 1068209174u, 3940225170u, 3199544434u, 997572161u, 1068208301u, 293018899u, 0, SIN_TOLERANCE, 0},
+{ 411, 3212768361u, 36116288u, 3206886566u, 4196602670u, 3212768341u, 2998456369u, 0, SIN_TOLERANCE, 0},
+{ 412, 3241695853u, 3550227562u, 3207257983u, 2747744117u, 3216014115u, 1571426293u, 0, SIN_TOLERANCE, 0},
+{ 413, 1104236126u, 507130047u, 1048359321u, 3229888373u, 1072679610u, 1134166995u, 0, SIN_TOLERANCE, 0},
+{ 414, 3222996778u, 2210969014u, 1081031001u, 1946786091u, 3218944954u, 4108691652u, 0, SIN_TOLERANCE, 0},
+{ 415, 3236306990u, 4059150589u, 3189759234u, 1177045799u, 1072192774u, 164380330u, 0, SIN_TOLERANCE, 0},
+{ 416, 1093103612u, 2664812822u, 1050343198u, 2034180320u, 3220155710u, 2715854652u, 0, SIN_TOLERANCE, 0},
+{ 417, 3213779117u, 1175750283u, 3235559706u, 1424491340u, 3213779044u, 1173295357u, 0, SIN_TOLERANCE, 0},
+{ 418, 3213904193u, 1630036121u, 3231972785u, 3195479448u, 3213904148u, 1645005977u, 0, SIN_TOLERANCE, 0},
+{ 419, 1090429875u, 2527029044u, 1046927050u, 4000723255u, 3219966524u, 3715598854u, 0, SIN_TOLERANCE, 0},
+{ 420, 1085208677u, 3335703647u, 3237349676u, 3869440059u, 3219009356u, 4095114083u, 0, SIN_TOLERANCE, 0},
+{ 421, 1091433848u, 3888398377u, 3196041693u, 1290567220u, 1072583950u, 1011503215u, 0, SIN_TOLERANCE, 0},
+{ 422, 1066679070u, 3242451480u, 3248384948u, 707431021u, 1066678984u, 2160822261u, 0, SIN_TOLERANCE, 0},
+{ 423, 1083230509u, 2739665123u, 1060777905u, 1733073225u, 3217071034u, 903609947u, 0, SIN_TOLERANCE, 0},
+{ 424, 1078517061u, 1297274853u, 3208848704u, 3341639139u, 3219152212u, 3806596794u, 0, SIN_TOLERANCE, 0},
+{ 425, 1046570941u, 2228057309u, 1084318902u, 1317851136u, 1046570941u, 2228057308u, 0, SIN_TOLERANCE, 0},
+{ 426, 1088255327u, 270039934u, 3241414679u, 3063626339u, 3216396846u, 3644353080u, 0, SIN_TOLERANCE, 0},
+{ 427, 3219178350u, 83062251u, 3211262173u, 2659016437u, 3219128787u, 1914189566u, 0, SIN_TOLERANCE, 0},
+{ 428, 1095743886u, 3833539373u, 3206667189u, 1567476111u, 1071807946u, 404285730u, 0, SIN_TOLERANCE, 0},
+{ 429, 3205195072u, 2382776852u, 3249232579u, 1546622468u, 3205195072u, 2379267821u, 0, SIN_TOLERANCE, 0},
+{ 430, 1085536439u, 1714300821u, 1104130938u, 4167591598u, 3220123735u, 685495821u, 0, SIN_TOLERANCE, 0},
+{ 431, 1051092760u, 2798720100u, 1086978789u, 449990704u, 1051092760u, 2798719632u, 0, SIN_TOLERANCE, 0},
+{ 432, 3231198415u, 4039516226u, 3244344107u, 4272932619u, 3220175867u, 3527643160u, 0, SIN_TOLERANCE, 0},
+{ 433, 3222708441u, 1683007544u, 1091105663u, 3805494321u, 1071825014u, 828793735u, 0, SIN_TOLERANCE, 0},
+{ 434, 3220852948u, 2072627412u, 1094383324u, 3394151662u, 3220171166u, 1264193719u, 0, SIN_TOLERANCE, 0},
+{ 435, 3220570024u, 1120106427u, 3223631624u, 3404608264u, 3220136791u, 2964380269u, 0, SIN_TOLERANCE, 0},
+{ 436, 1097859997u, 559918757u, 3205077053u, 908100198u, 3219993005u, 970396619u, 0, SIN_TOLERANCE, 0},
+{ 437, 1042677918u, 2026673913u, 3244833635u, 2844573214u, 1042677918u, 2026673913u, 0, SIN_TOLERANCE, 0},
+{ 438, 3254567259u, 3946837259u, 3234993796u, 3850406820u, 3218559097u, 3013700769u, 0, SIN_TOLERANCE, 0},
+{ 439, 1057479809u, 3139330994u, 1046133568u, 1539650690u, 1057479809u, 3137012350u, 0, SIN_TOLERANCE, 0},
+{ 440, 3236705500u, 1554593884u, 3228899878u, 2813752562u, 1071977984u, 1955826869u, 0, SIN_TOLERANCE, 0},
+{ 441, 1056505004u, 3804703138u, 1072931071u, 2053677923u, 1056505004u, 3804037510u, 0, SIN_TOLERANCE, 0},
+{ 442, 3244864299u, 289355864u, 1078453818u, 2143066338u, 3219233682u, 468401044u, 0, SIN_TOLERANCE, 0},
+{ 443, 3203939880u, 2157691971u, 1106629150u, 110806409u, 3203939880u, 2157084064u, 0, SIN_TOLERANCE, 0},
+{ 444, 1082157019u, 3570399481u, 1085637605u, 180265334u, 3218415536u, 3741238523u, 0, SIN_TOLERANCE, 0},
+{ 445, 3200980182u, 558779875u, 3202046748u, 2338464653u, 3200980182u, 558766634u, 0, SIN_TOLERANCE, 0},
+{ 446, 1045705464u, 1703969219u, 3229797258u, 1417521063u, 1045705464u, 1703969219u, 0, SIN_TOLERANCE, 0},
+{ 447, 3237782261u, 3917440951u, 1051668894u, 3736066983u, 3219677496u, 2476988526u, 0, SIN_TOLERANCE, 0},
+{ 448, 1064752080u, 3106613409u, 1066627453u, 2735392257u, 1064752072u, 4205181601u, 0, SIN_TOLERANCE, 0},
+{ 449, 1065665372u, 2229777605u, 1065061963u, 2405869925u, 1065665349u, 897699253u, 0, SIN_TOLERANCE, 0},
+{ 450, 3239463229u, 3967957902u, 1057416138u, 3459188071u, 3219483279u, 1204805702u, 0, SIN_TOLERANCE, 0},
+{ 451, 1068639210u, 3699016825u, 3249713090u, 796144848u, 1068638216u, 877792013u, 0, SIN_TOLERANCE, 0},
+{ 452, 3228816396u, 3285165564u, 3211948811u, 401510871u, 3215486773u, 1278566204u, 0, SIN_TOLERANCE, 0},
+{ 453, 1094257658u, 634857910u, 3199607513u, 914218057u, 1070809933u, 656420698u, 0, SIN_TOLERANCE, 0},
+{ 454, 1083743336u, 2030735578u, 3233855943u, 965677531u, 3220005840u, 3974123114u, 0, SIN_TOLERANCE, 0},
+{ 455, 1079556815u, 3957229084u, 1051050470u, 3123776651u, 3220175113u, 3998644826u, 0, SIN_TOLERANCE, 0},
+{ 456, 3221863333u, 162122081u, 3239376395u, 108064594u, 1068707993u, 3902663790u, 0, SIN_TOLERANCE, 0},
+{ 457, 3237271786u, 869031839u, 3225020876u, 1344301606u, 3219835626u, 1742181520u, 0, SIN_TOLERANCE, 0},
+{ 458, 3214433474u, 946696117u, 3231825228u, 1700703647u, 3214433323u, 2592553516u, 0, SIN_TOLERANCE, 0},
+{ 459, 1075492875u, 3394168074u, 1076939786u, 1666995668u, 1071167510u, 819576280u, 0, SIN_TOLERANCE, 0},
+{ 460, 3208774795u, 2488789804u, 3238508333u, 1506943664u, 3208774795u, 2233231096u, 0, SIN_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1072456452u, 882065402u, 0, SIN_TOLERANCE, 0},
+{ 462, 3219934542u, 1244307192u, 3191297711u, 2540916692u, 3219702013u, 192990048u, 0, SIN_TOLERANCE, 0},
+{ 463, 3200062692u, 2871645739u, 3239081581u, 1440249115u, 3200062692u, 2871641640u, 0, SIN_TOLERANCE, 0},
+{ 464, 1068350633u, 1231934926u, 3236746788u, 603977748u, 1068349537u, 3457970651u, 0, SIN_TOLERANCE, 0},
+{ 465, 3195449689u, 2386312545u, 1063169277u, 2715234268u, 3195449689u, 2386312537u, 0, SIN_TOLERANCE, 0},
+{ 466, 1087803418u, 915867083u, 1046790892u, 3347417612u, 1072499185u, 2089737020u, 0, SIN_TOLERANCE, 0},
+{ 467, 1105984188u, 3553288373u, 1065698616u, 2906680663u, 1071870382u, 1073334537u, 0, SIN_TOLERANCE, 0},
+{ 468, 1045506226u, 2342364630u, 1051356723u, 4019093203u, 1045506226u, 2342364630u, 0, SIN_TOLERANCE, 0},
+{ 469, 3201169162u, 2911548084u, 1105282515u, 2476735795u, 3201169162u, 2911530147u, 0, SIN_TOLERANCE, 0},
+{ 470, 1050472772u, 1836216409u, 1101062307u, 2519592554u, 1050472772u, 1836216156u, 0, SIN_TOLERANCE, 0},
+{ 471, 1070178161u, 1235369496u, 3222946447u, 668087854u, 1070166968u, 4228921710u, 0, SIN_TOLERANCE, 0},
+{ 472, 3208554596u, 2981820811u, 1059838516u, 2845580478u, 3208554596u, 2667081449u, 0, SIN_TOLERANCE, 0},
+{ 473, 3193931414u, 1565550570u, 3217165795u, 4162017137u, 3193931414u, 1565550569u, 0, SIN_TOLERANCE, 0},
+{ 474, 3237251378u, 2808968027u, 1055630096u, 1782326814u, 3219818408u, 1142564445u, 0, SIN_TOLERANCE, 0},
+{ 475, 1053576974u, 1492622658u, 3216653077u, 3972512122u, 1053576974u, 1492607534u, 0, SIN_TOLERANCE, 0},
+{ 476, 3222171679u, 2722693603u, 3227814791u, 3169731970u, 1071887116u, 525452416u, 0, SIN_TOLERANCE, 0},
+{ 477, 3217906631u, 899763203u, 3207606001u, 2804747833u, 3217889805u, 2998184084u, 0, SIN_TOLERANCE, 0},
+{ 478, 3230670325u, 3789058912u, 3228095081u, 4135937628u, 3219896487u, 3785128251u, 0, SIN_TOLERANCE, 0},
+{ 479, 1060199382u, 1682808307u, 3206960335u, 232877759u, 1060199382u, 1625675800u, 0, SIN_TOLERANCE, 0},
+{ 480, 3242091486u, 2851963139u, 3246852961u, 2590862592u, 3219187029u, 4160198778u, 0, SIN_TOLERANCE, 0},
+{ 481, 1081200406u, 2422232642u, 3234779662u, 290458310u, 1072292043u, 374164345u, 0, SIN_TOLERANCE, 0},
+{ 482, 3210671078u, 1082582386u, 1075605675u, 2602133689u, 3210671077u, 194975196u, 0, SIN_TOLERANCE, 0},
+{ 483, 3239818611u, 1789635787u, 1059414278u, 1048286093u, 3220086075u, 82631293u, 0, SIN_TOLERANCE, 0},
+{ 484, 1098330542u, 231339448u, 1055573265u, 504907415u, 1068257446u, 2455089238u, 0, SIN_TOLERANCE, 0},
+{ 485, 1063211461u, 1153251200u, 3204617090u, 1772013857u, 1063211460u, 79265977u, 0, SIN_TOLERANCE, 0},
+{ 486, 1099551055u, 1082898276u, 3212089272u, 1449080862u, 3218511880u, 3277707552u, 0, SIN_TOLERANCE, 0},
+{ 487, 1086008285u, 3177299045u, 1058862813u, 809400815u, 1071103413u, 828912693u, 0, SIN_TOLERANCE, 0},
+{ 488, 3230854550u, 1924429710u, 1056464743u, 3349283177u, 1072591385u, 3082809316u, 0, SIN_TOLERANCE, 0},
+{ 489, 3245473391u, 42238036u, 1042379500u, 2113559863u, 1072278178u, 3405273341u, 0, SIN_TOLERANCE, 0},
+{ 490, 1064761243u, 3304403230u, 3217556703u, 58952646u, 1064761235u, 3788050789u, 0, SIN_TOLERANCE, 0},
+{ 491, 3212669530u, 1645486982u, 3224301095u, 3636267471u, 3212669513u, 3263410238u, 0, SIN_TOLERANCE, 0},
+{ 492, 1062762009u, 619402181u, 3235208235u, 557360557u, 1062762008u, 2356441311u, 0, SIN_TOLERANCE, 0},
+{ 493, 3238238394u, 110029735u, 1046937383u, 984375729u, 1069598005u, 3806390758u, 0, SIN_TOLERANCE, 0},
+{ 494, 3189496738u, 4063688092u, 3203235744u, 1049950343u, 3189496738u, 4063688092u, 0, SIN_TOLERANCE, 0},
+{ 495, 1062350619u, 650996069u, 1054971928u, 3953359826u, 1062350618u, 3895169615u, 0, SIN_TOLERANCE, 0},
+{ 496, 3227055805u, 66926332u, 1090561839u, 1379780888u, 1071907710u, 4044840027u, 0, SIN_TOLERANCE, 0},
+{ 497, 3233453307u, 2803378256u, 1086057989u, 498534626u, 3218243918u, 2791615725u, 0, SIN_TOLERANCE, 0},
+{ 498, 1082618553u, 2846400785u, 1047142525u, 1375153550u, 1071558334u, 1773771057u, 0, SIN_TOLERANCE, 0},
+{ 499, 1044581201u, 2869128958u, 1070972315u, 4246440273u, 1044581201u, 2869128958u, 0, SIN_TOLERANCE, 0},
+{ 500, 1051832506u, 3112381207u, 1044430965u, 3981604561u, 1051832506u, 3112380284u, 0, SIN_TOLERANCE, 0},
+{ 501, 3231254997u, 243303420u, 1093735824u, 1575581926u, 3218023891u, 2206751039u, 0, SIN_TOLERANCE, 0},
+{ 502, 3239137997u, 3218865041u, 3204803496u, 3840388050u, 1070566791u, 3693771798u, 0, SIN_TOLERANCE, 0},
+{ 503, 1048415431u, 336846959u, 1052664471u, 3798336786u, 1048415431u, 336846942u, 0, SIN_TOLERANCE, 0},
+{ 504, 1055954236u, 3639240976u, 1081202165u, 1844741676u, 1055954236u, 3639046406u, 0, SIN_TOLERANCE, 0},
+{ 505, 3211904793u, 717293069u, 3211534283u, 582401011u, 3211904789u, 2186409606u, 0, SIN_TOLERANCE, 0},
+{ 506, 3251962512u, 3766248610u, 3196520332u, 1174437546u, 3219859002u, 933735856u, 0, SIN_TOLERANCE, 0},
+{ 507, 1083431226u, 756959182u, 3204099341u, 1581804034u, 1072468298u, 2249202001u, 0, SIN_TOLERANCE, 0},
+{ 508, 3205806444u, 3560686300u, 3220980617u, 4277975772u, 3205806444u, 3554609858u, 0, SIN_TOLERANCE, 0},
+{ 509, 3209906076u, 2598148853u, 3217622194u, 3460421008u, 3209906076u, 1345723928u, 0, SIN_TOLERANCE, 0},
+{ 510, 1066720824u, 136600515u, 3209934920u, 3340653128u, 1066720729u, 1598401379u, 0, SIN_TOLERANCE, 0},
+{ 511, 1096820310u, 1045480938u, 3251354609u, 4133432965u, 1072537699u, 4085430850u, 0, SIN_TOLERANCE, 0},
+{ 512, 1091599431u, 1630207738u, 3239996829u, 2393354808u, 1071751521u, 1124141059u, 0, SIN_TOLERANCE, 0},
+{ 513, 3190626018u, 3739770117u, 1059520750u, 3959551225u, 3190626018u, 3739770117u, 0, SIN_TOLERANCE, 0},
+{ 514, 3230730505u, 1498861716u, 1091297147u, 847410798u, 1069557100u, 3597060909u, 0, SIN_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 1072645188u, 2504109125u, 0, SIN_TOLERANCE, 0},
+{ 516, 1054849265u, 2353103845u, 3235718771u, 2978889966u, 1054849265u, 2353018718u, 0, SIN_TOLERANCE, 0},
+{ 517, 3251357992u, 1546972125u, 3249076079u, 1987349196u, 3220174666u, 3270764328u, 0, SIN_TOLERANCE, 0},
+{ 518, 3238219513u, 2769161072u, 1075207126u, 292616282u, 3219645457u, 3531409241u, 0, SIN_TOLERANCE, 0},
+{ 519, 3199712298u, 36855311u, 1052128202u, 1479039342u, 3199712298u, 36853082u, 0, SIN_TOLERANCE, 0},
+{ 520, 1083757053u, 2027463605u, 1066023013u, 3369686340u, 3219992533u, 3618466663u, 0, SIN_TOLERANCE, 0},
+{ 521, 3197852749u, 3808681655u, 1054161346u, 1821773119u, 3197852749u, 3808681442u, 0, SIN_TOLERANCE, 0},
+{ 522, 1040685928u, 3175490326u, 3226879970u, 845687760u, 1040685928u, 3175490326u, 0, SIN_TOLERANCE, 0},
+{ 523, 1042302993u, 3124482451u, 3242748377u, 3259417226u, 1042302993u, 3124482451u, 0, SIN_TOLERANCE, 0},
+{ 524, 1045245695u, 2751606436u, 3236210939u, 3923142740u, 1045245695u, 2751606436u, 0, SIN_TOLERANCE, 0},
+{ 525, 1095694737u, 2016872044u, 3228408064u, 4201274408u, 1072286341u, 1362265118u, 0, SIN_TOLERANCE, 0},
+{ 526, 3199349254u, 1019916843u, 3219974785u, 1977881787u, 3199349254u, 1019915839u, 0, SIN_TOLERANCE, 0},
+{ 527, 3199478752u, 2060433318u, 1075872515u, 366073725u, 3199478752u, 2060431950u, 0, SIN_TOLERANCE, 0},
+{ 528, 3191180557u, 1098469906u, 1082900695u, 2349346832u, 3191180557u, 1098469906u, 0, SIN_TOLERANCE, 0},
+{ 529, 3209974707u, 3011196295u, 3252479932u, 2459281672u, 3209974707u, 1543399360u, 0, SIN_TOLERANCE, 0},
+{ 530, 3221334323u, 2843222682u, 1089275809u, 298982001u, 3219765832u, 3012348119u, 0, SIN_TOLERANCE, 0},
+{ 531, 1101737698u, 914741728u, 3203468059u, 2833809843u, 3219808843u, 3014971771u, 0, SIN_TOLERANCE, 0},
+{ 532, 3236763878u, 1274901962u, 3241535845u, 3759113509u, 3220165679u, 685102012u, 0, SIN_TOLERANCE, 0},
+{ 533, 3245916442u, 2134927252u, 3253802671u, 3013731444u, 3220072965u, 474412391u, 0, SIN_TOLERANCE, 0},
+{ 534, 1099201341u, 2230655177u, 3254510616u, 1249674366u, 3217398459u, 1862039103u, 0, SIN_TOLERANCE, 0},
+{ 535, 1062971253u, 717357389u, 1083533731u, 3746683362u, 1062971252u, 1316352658u, 0, SIN_TOLERANCE, 0},
+{ 536, 3213773114u, 834976849u, 3217357661u, 2465861779u, 3213773041u, 3660226702u, 0, SIN_TOLERANCE, 0},
+{ 537, 1045656117u, 1385714428u, 1053358395u, 3007113740u, 1045656117u, 1385714428u, 0, SIN_TOLERANCE, 0},
+{ 538, 1050527919u, 599268545u, 3201368210u, 2309854744u, 1050527919u, 599268270u, 0, SIN_TOLERANCE, 0},
+{ 539, 1069954454u, 2840234388u, 3232496515u, 333365983u, 1069947162u, 1780277781u, 0, SIN_TOLERANCE, 0},
+{ 540, 1045922781u, 3136078996u, 3194520860u, 2650572904u, 1045922781u, 3136078995u, 0, SIN_TOLERANCE, 0},
+{ 541, 3233687691u, 2405805086u, 3251640319u, 324233833u, 1072686336u, 1152698935u, 0, SIN_TOLERANCE, 0},
+{ 542, 1106699146u, 2589598340u, 3254677807u, 952438812u, 1072324232u, 3449767578u, 0, SIN_TOLERANCE, 0},
+{ 543, 3189114773u, 1922837702u, 3216892718u, 3535907549u, 3189114773u, 1922837702u, 0, SIN_TOLERANCE, 0},
+{ 544, 3243615868u, 261447440u, 3209805849u, 1150571079u, 1070965580u, 3935697264u, 0, SIN_TOLERANCE, 0},
+{ 545, 1095805232u, 4026487528u, 1073152064u, 27340691u, 1071684378u, 548705734u, 0, SIN_TOLERANCE, 0},
+{ 546, 3229123692u, 338765118u, 1086225786u, 3207238249u, 3218751755u, 1233472933u, 0, SIN_TOLERANCE, 0},
+{ 547, 3196182703u, 1085283176u, 3187775111u, 1601194210u, 3196182703u, 1085283161u, 0, SIN_TOLERANCE, 0},
+{ 548, 1091520173u, 3031712790u, 3252307859u, 170666844u, 3219971367u, 394023925u, 0, SIN_TOLERANCE, 0},
+{ 549, 3218862231u, 3148395674u, 1041913758u, 3306391490u, 3218804621u, 1993316150u, 0, SIN_TOLERANCE, 0},
+{ 550, 3201277070u, 2205233857u, 3208100078u, 3993195511u, 3201277070u, 2205212798u, 0, SIN_TOLERANCE, 0},
+{ 551, 1067699608u, 4282766727u, 1072820377u, 1874778218u, 1067699285u, 1871096311u, 0, SIN_TOLERANCE, 0},
+{ 552, 3210833092u, 2920860798u, 3218070226u, 3104066154u, 3210833091u, 3517395975u, 0, SIN_TOLERANCE, 0},
+{ 553, 3204950351u, 969991373u, 3250596895u, 1734386152u, 3204950351u, 967730542u, 0, SIN_TOLERANCE, 0},
+{ 554, 3238915818u, 1218740205u, 3239802737u, 2610078504u, 1071758532u, 2855666981u, 0, SIN_TOLERANCE, 0},
+{ 555, 3206031242u, 1485218325u, 3220870240u, 3591664613u, 3206031242u, 1475597764u, 0, SIN_TOLERANCE, 0},
+{ 556, 3202074143u, 690157417u, 3190850619u, 4192347699u, 3202074143u, 690100285u, 0, SIN_TOLERANCE, 0},
+{ 557, 1096053810u, 4009839784u, 1079670252u, 394167192u, 3220176185u, 1631825320u, 0, SIN_TOLERANCE, 0},
+{ 558, 3234559237u, 961532417u, 1092588071u, 2923790239u, 3219240085u, 1012830439u, 0, SIN_TOLERANCE, 0},
+{ 559, 3203879091u, 4174125604u, 1050682630u, 2169701868u, 3203879091u, 4173584839u, 0, SIN_TOLERANCE, 0},
+{ 560, 3243092475u, 4146748230u, 1087373950u, 2481478351u, 1067740115u, 3998469072u, 0, SIN_TOLERANCE, 0},
+{ 561, 1076987866u, 3984715440u, 1050421618u, 2446142566u, 3220110698u, 974706513u, 0, SIN_TOLERANCE, 0},
+{ 562, 1084172406u, 936290150u, 1100614426u, 3625806370u, 1072094479u, 2895643002u, 0, SIN_TOLERANCE, 0},
+{ 563, 1099787952u, 1866615265u, 3215651428u, 2337013350u, 1071976815u, 3306026822u, 0, SIN_TOLERANCE, 0},
+{ 564, 3253198302u, 712227971u, 1106004723u, 973148499u, 1070735011u, 1291506150u, 0, SIN_TOLERANCE, 0},
+{ 565, 3230088199u, 3409813738u, 3244817008u, 1933503498u, 3219902662u, 1451815939u, 0, SIN_TOLERANCE, 0},
+{ 566, 1079943733u, 3180389060u, 3228735703u, 83422217u, 3213454768u, 3879155175u, 0, SIN_TOLERANCE, 0},
+{ 567, 1077878724u, 556972671u, 3204582372u, 841555801u, 3218237932u, 567370693u, 0, SIN_TOLERANCE, 0},
+{ 568, 1070767721u, 4189151332u, 1080874032u, 706326922u, 1070750582u, 4079109003u, 0, SIN_TOLERANCE, 0},
+{ 569, 1096151307u, 198291836u, 1057281892u, 2188836928u, 3220101257u, 368328880u, 0, SIN_TOLERANCE, 0},
+{ 570, 1078091995u, 1219449298u, 3228734687u, 3504562743u, 3219776304u, 644559464u, 0, SIN_TOLERANCE, 0},
+{ 571, 3204570464u, 1776099219u, 1094316777u, 4188083896u, 3204570464u, 1775126159u, 0, SIN_TOLERANCE, 0},
+{ 572, 3193845708u, 2614400266u, 1073750227u, 3003203347u, 3193845708u, 2614400265u, 0, SIN_TOLERANCE, 0},
+{ 573, 3213982678u, 2959351406u, 1105603716u, 311851587u, 3213982623u, 79201814u, 0, SIN_TOLERANCE, 0},
+{ 574, 1084544434u, 865443613u, 1097532516u, 3622237781u, 1071041198u, 1507254391u, 0, SIN_TOLERANCE, 0},
+{ 575, 3231786666u, 447506102u, 3195759295u, 3603669725u, 3219333885u, 3048377941u, 0, SIN_TOLERANCE, 0},
+{ 576, 1097890173u, 3934398273u, 1040996422u, 2968621268u, 1072685797u, 2235914534u, 0, SIN_TOLERANCE, 0},
+{ 577, 3196739825u, 784208771u, 1088764788u, 2182296421u, 3196739825u, 784208723u, 0, SIN_TOLERANCE, 0},
+{ 578, 3248332291u, 1527590526u, 3206961556u, 2823164069u, 3219822440u, 478287683u, 0, SIN_TOLERANCE, 0},
+{ 579, 3236644131u, 3876699591u, 3207481130u, 4028148535u, 1072393284u, 1209093961u, 0, SIN_TOLERANCE, 0},
+{ 580, 1083576186u, 2164249756u, 1059857743u, 1785169952u, 3220097373u, 3809888698u, 0, SIN_TOLERANCE, 0},
+{ 581, 1091804009u, 2079273665u, 1080303860u, 625760474u, 1072539707u, 298442240u, 0, SIN_TOLERANCE, 0},
+{ 582, 3226486108u, 3636214836u, 1068367620u, 2932621925u, 3219708924u, 2233835753u, 0, SIN_TOLERANCE, 0},
+{ 583, 1043995372u, 4274131512u, 1047707755u, 92550763u, 1043995372u, 4274131512u, 0, SIN_TOLERANCE, 0},
+{ 584, 3198822121u, 2648933384u, 1084603503u, 3534304873u, 3198822121u, 2648932639u, 0, SIN_TOLERANCE, 0},
+{ 585, 1064563235u, 3216750767u, 3191088629u, 547482628u, 1064563230u, 2503171318u, 0, SIN_TOLERANCE, 0},
+{ 586, 1061084774u, 1420360746u, 1080063101u, 1690029499u, 1061084774u, 1099079215u, 0, SIN_TOLERANCE, 0},
+{ 587, 3229855364u, 1908572179u, 1080112083u, 1228319033u, 3220171054u, 1328376247u, 0, SIN_TOLERANCE, 0},
+{ 588, 1048158178u, 500312015u, 3212368508u, 3864619086u, 1048158178u, 500312004u, 0, SIN_TOLERANCE, 0},
+{ 589, 3221335610u, 4211343447u, 1087492676u, 4272583781u, 3219762765u, 2753996887u, 0, SIN_TOLERANCE, 0},
+{ 590, 1099392394u, 2382118000u, 1042665328u, 567154882u, 3219741310u, 1829458081u, 0, SIN_TOLERANCE, 0},
+{ 591, 1058013442u, 1435344339u, 3216303171u, 2275988178u, 1058013442u, 1432546069u, 0, SIN_TOLERANCE, 0},
+{ 592, 3214538619u, 3403659753u, 3218043030u, 1926480488u, 3214538437u, 1790486854u, 0, SIN_TOLERANCE, 0},
+{ 593, 1076840383u, 1198845185u, 3225556149u, 1130089684u, 1068587528u, 1811589707u, 0, SIN_TOLERANCE, 0},
+{ 594, 3222663042u, 2183928090u, 1048403956u, 963834821u, 1072099461u, 2434446950u, 0, SIN_TOLERANCE, 0},
+{ 595, 1101672960u, 2120625396u, 1041006976u, 2137548527u, 3219902375u, 1240074469u, 0, SIN_TOLERANCE, 0},
+{ 596, 1099230238u, 586700956u, 1059670521u, 303891699u, 3220110703u, 2829078942u, 0, SIN_TOLERANCE, 0},
+{ 597, 3218994498u, 2509132460u, 1102827530u, 2205707903u, 3218923581u, 2733939463u, 0, SIN_TOLERANCE, 0},
+{ 598, 3204860597u, 1229308263u, 3209170414u, 4206576047u, 3204860597u, 1227417723u, 0, SIN_TOLERANCE, 0},
+{ 599, 3224076289u, 4078010749u, 3199236456u, 733478972u, 3220021681u, 3043659987u, 0, SIN_TOLERANCE, 0},
+{ 600, 3197712584u, 4277541051u, 3199806921u, 397102023u, 3197712584u, 4277540884u, 0, SIN_TOLERANCE, 0},
+{ 601, 3195975013u, 900999594u, 3234720188u, 2530214248u, 3195975013u, 900999575u, 0, SIN_TOLERANCE, 0},
+{ 602, 1076543548u, 4000609478u, 1096577064u, 4148592328u, 1072113725u, 4220821840u, 0, SIN_TOLERANCE, 0},
+{ 603, 1048668084u, 2154187873u, 3224392607u, 3957250362u, 1048668084u, 2154187859u, 0, SIN_TOLERANCE, 0},
+{ 604, 3223413488u, 2867079200u, 1101870326u, 921212001u, 3219480669u, 133389711u, 0, SIN_TOLERANCE, 0},
+{ 605, 3233221890u, 674547716u, 1063216239u, 3929755226u, 3219946283u, 1171404582u, 0, SIN_TOLERANCE, 0},
+{ 606, 3240415851u, 3158182449u, 1043794244u, 3259056345u, 3218533956u, 783944099u, 0, SIN_TOLERANCE, 0},
+{ 607, 3236776656u, 3002823940u, 1059511739u, 2832435794u, 1072633472u, 88715692u, 0, SIN_TOLERANCE, 0},
+{ 608, 3217304822u, 2196511929u, 1049973941u, 3672092877u, 3217299354u, 982247005u, 0, SIN_TOLERANCE, 0},
+{ 609, 1050438056u, 3655292191u, 1086438127u, 3567072906u, 1050438056u, 3655291952u, 0, SIN_TOLERANCE, 0},
+{ 610, 3243186948u, 1617573614u, 3201863123u, 3090723732u, 3215736442u, 1512978851u, 0, SIN_TOLERANCE, 0},
+{ 611, 3233201380u, 679893506u, 3211547753u, 824081024u, 3218967800u, 4050972393u, 0, SIN_TOLERANCE, 0},
+{ 612, 1089530525u, 2285242807u, 1084999409u, 2221731406u, 3219969044u, 3383509535u, 0, SIN_TOLERANCE, 0},
+{ 613, 3206733664u, 1935990727u, 1088822246u, 1058156518u, 3206733664u, 1917635426u, 0, SIN_TOLERANCE, 0},
+{ 614, 1102839166u, 521023584u, 1059186903u, 4245163857u, 3217325547u, 1587065816u, 0, SIN_TOLERANCE, 0},
+{ 615, 1103891140u, 2312887617u, 3191771354u, 1885370807u, 3213444364u, 1567572359u, 0, SIN_TOLERANCE, 0},
+{ 616, 3252953815u, 1796441468u, 1100030327u, 2772711004u, 1071662076u, 3674672329u, 0, SIN_TOLERANCE, 0},
+{ 617, 3204276820u, 2095685003u, 1077984448u, 2100773742u, 3204276820u, 2094602508u, 0, SIN_TOLERANCE, 0},
+{ 618, 3192954620u, 2892538035u, 1042396334u, 4162200338u, 3192954620u, 2892538035u, 0, SIN_TOLERANCE, 0},
+{ 619, 3242725751u, 2177698116u, 3227557177u, 150832500u, 3216437532u, 3818749185u, 0, SIN_TOLERANCE, 0},
+{ 620, 3191562216u, 607966734u, 3236250630u, 4164600559u, 3191562216u, 607966734u, 0, SIN_TOLERANCE, 0},
+{ 621, 3216389812u, 2830122967u, 1046096700u, 3713346883u, 3216387986u, 1984249858u, 0, SIN_TOLERANCE, 0},
+{ 622, 3237197963u, 2314640506u, 3203696416u, 3276228872u, 3216456520u, 1563473680u, 0, SIN_TOLERANCE, 0},
+{ 623, 3212912307u, 469331883u, 3249037349u, 2999233437u, 3212912293u, 4169087664u, 0, SIN_TOLERANCE, 0},
+{ 624, 1097382011u, 560886625u, 1091899487u, 748795120u, 1071758952u, 1596727108u, 0, SIN_TOLERANCE, 0},
+{ 625, 1049886858u, 2958421324u, 1092569414u, 3235243477u, 1049886858u, 2958421241u, 0, SIN_TOLERANCE, 0},
+{ 626, 3193026497u, 3221475559u, 1043038304u, 915608434u, 3193026497u, 3221475559u, 0, SIN_TOLERANCE, 0},
+{ 627, 1071197530u, 3007808652u, 3216682290u, 2531019474u, 1071155300u, 87724169u, 0, SIN_TOLERANCE, 0},
+{ 628, 3242028999u, 1767658578u, 3237045269u, 2313128318u, 3220175220u, 1174141716u, 0, SIN_TOLERANCE, 0},
+{ 629, 3210617892u, 1926845182u, 1066835624u, 1783256828u, 3210617891u, 1436289661u, 0, SIN_TOLERANCE, 0},
+{ 630, 1040575629u, 90378038u, 1057168870u, 164358218u, 1040575629u, 90378038u, 0, SIN_TOLERANCE, 0},
+{ 631, 1106859172u, 1610524680u, 1085283851u, 2903496007u, 1071615859u, 1847810491u, 0, SIN_TOLERANCE, 0},
+{ 632, 1078635586u, 4274321404u, 3202913591u, 720121831u, 1068456740u, 1414423441u, 0, SIN_TOLERANCE, 0},
+{ 633, 1051205256u, 2034778236u, 1071133763u, 1413236391u, 1051205256u, 2034777651u, 0, SIN_TOLERANCE, 0},
+{ 634, 1051063028u, 1489112261u, 1076691395u, 348210906u, 1051063028u, 1489111820u, 0, SIN_TOLERANCE, 0},
+{ 635, 3206743917u, 2797651324u, 3224410527u, 2374818327u, 3206743917u, 2778835738u, 0, SIN_TOLERANCE, 0},
+{ 636, 1088287256u, 1823161666u, 3197810695u, 3119680047u, 1071953937u, 2742148483u, 0, SIN_TOLERANCE, 0},
+{ 637, 1065927336u, 3420950657u, 1087084743u, 2136638961u, 1065927297u, 1140266162u, 0, SIN_TOLERANCE, 0},
+{ 638, 1069902224u, 3554566429u, 1062907717u, 2736702589u, 1069895689u, 358674981u, 0, SIN_TOLERANCE, 0},
+{ 639, 3244888667u, 2928437580u, 3187765027u, 1393427873u, 3215813938u, 1606543595u, 0, SIN_TOLERANCE, 0},
+{ 640, 3209301561u, 189447067u, 1051643315u, 828663513u, 3209301560u, 3711574012u, 0, SIN_TOLERANCE, 0},
+{ 641, 1052313869u, 2852350928u, 1045683757u, 673354280u, 1052313869u, 2852348313u, 0, SIN_TOLERANCE, 0},
+{ 642, 1043946301u, 3589563265u, 3248741629u, 812657927u, 1043946301u, 3589563265u, 0, SIN_TOLERANCE, 0},
+{ 643, 3190610826u, 1766416701u, 1100392103u, 2185373290u, 3190610826u, 1766416701u, 0, SIN_TOLERANCE, 0},
+{ 644, 3220275389u, 3763582673u, 3191965790u, 388374829u, 3219942933u, 3406162011u, 0, SIN_TOLERANCE, 0},
+{ 645, 1079635136u, 1187403069u, 1075300235u, 336640304u, 3214626985u, 2749575794u, 0, SIN_TOLERANCE, 0},
+{ 646, 1103926251u, 1718795752u, 3243118752u, 683369237u, 1071824356u, 3919108797u, 0, SIN_TOLERANCE, 0},
+{ 647, 3210792097u, 1863545307u, 1069449477u, 3418627399u, 3210792096u, 2844263943u, 0, SIN_TOLERANCE, 0},
+{ 648, 1069601294u, 3295607249u, 1068878592u, 1633297809u, 1069598124u, 3479937974u, 0, SIN_TOLERANCE, 0},
+{ 649, 1058947127u, 2585980994u, 3236670483u, 1286750688u, 1058947127u, 2567082753u, 0, SIN_TOLERANCE, 0},
+{ 650, 1046157033u, 15816845u, 3233249283u, 2491924775u, 1046157033u, 15816844u, 0, SIN_TOLERANCE, 0},
+{ 651, 1042413021u, 1051983351u, 1049180786u, 1474421917u, 1042413021u, 1051983351u, 0, SIN_TOLERANCE, 0},
+{ 652, 3201249525u, 2003816032u, 1086050104u, 668090487u, 3201249525u, 2003795801u, 0, SIN_TOLERANCE, 0},
+{ 653, 1052556037u, 3671484625u, 1067020039u, 430024694u, 1052556037u, 3671480672u, 0, SIN_TOLERANCE, 0},
+{ 654, 1067397110u, 3991830201u, 3207808714u, 1021245839u, 1067396794u, 4124800169u, 0, SIN_TOLERANCE, 0},
+{ 655, 1064194391u, 4255801807u, 3207681716u, 1926756877u, 1064194387u, 1955210840u, 0, SIN_TOLERANCE, 0},
+{ 656, 1052140785u, 4167786896u, 1077097744u, 1775517981u, 1052140785u, 4167785024u, 0, SIN_TOLERANCE, 0},
+{ 657, 1085601978u, 3187518564u, 1082437406u, 944672491u, 1070593685u, 930980615u, 0, SIN_TOLERANCE, 0},
+{ 658, 1049366282u, 953085192u, 3227310828u, 3459155777u, 1049366282u, 953085134u, 0, SIN_TOLERANCE, 0},
+{ 659, 1069502506u, 1908555460u, 1073640207u, 260441967u, 1069497393u, 480300537u, 0, SIN_TOLERANCE, 0},
+{ 660, 1067219606u, 250762477u, 1072582645u, 2886742039u, 1067219365u, 2007310307u, 0, SIN_TOLERANCE, 0},
+{ 661, 3250906006u, 786180031u, 3197734769u, 2788918312u, 3219264568u, 3771674599u, 0, SIN_TOLERANCE, 0},
+{ 662, 3234511827u, 2055912467u, 3244244909u, 1394142937u, 3218137847u, 1567210213u, 0, SIN_TOLERANCE, 0},
+{ 663, 1069612985u, 91984146u, 3222252812u, 4126276047u, 1069609713u, 861651410u, 0, SIN_TOLERANCE, 0},
+{ 664, 1081340139u, 3942715706u, 3239316352u, 410676547u, 3220140746u, 429356827u, 0, SIN_TOLERANCE, 0},
+{ 665, 3198557846u, 86296211u, 1085850694u, 649202596u, 3198557846u, 86295760u, 0, SIN_TOLERANCE, 0},
+{ 666, 3245366392u, 3069064472u, 3237358008u, 23209276u, 1071324547u, 2757010564u, 0, SIN_TOLERANCE, 0},
+{ 667, 1081235288u, 1867297860u, 1072956607u, 2513414118u, 3220095326u, 521246131u, 0, SIN_TOLERANCE, 0},
+{ 668, 3250533347u, 3171788768u, 3235208783u, 162138697u, 1072639725u, 165429234u, 0, SIN_TOLERANCE, 0},
+{ 669, 1081728455u, 1245110700u, 1081653954u, 2584994077u, 3219625989u, 633989636u, 0, SIN_TOLERANCE, 0},
+{ 670, 3245510120u, 3347226587u, 1058962932u, 2291943376u, 3218529442u, 71696266u, 0, SIN_TOLERANCE, 0},
+{ 671, 1058899062u, 966940828u, 1060726420u, 2798041096u, 1058899062u, 949384072u, 0, SIN_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1072461134u, 2487756616u, 0, SIN_TOLERANCE, 0},
+{ 673, 3248116497u, 1671039260u, 1086395032u, 3745833360u, 3218316220u, 868579447u, 0, SIN_TOLERANCE, 0},
+{ 674, 1057078797u, 651714217u, 1047070645u, 2130549237u, 1057078797u, 650761015u, 0, SIN_TOLERANCE, 0},
+{ 675, 3207115731u, 1423000172u, 3247822717u, 1551488170u, 3207115731u, 1381838934u, 0, SIN_TOLERANCE, 0},
+{ 676, 3201597307u, 921077236u, 3213332351u, 1431049019u, 3201597307u, 921054269u, 0, SIN_TOLERANCE, 0},
+{ 677, 1067510295u, 655715547u, 3190985373u, 1527556471u, 1067510093u, 2282908158u, 0, SIN_TOLERANCE, 0},
+{ 678, 3227654979u, 4110878657u, 3251297180u, 879739345u, 3218425102u, 3708938007u, 0, SIN_TOLERANCE, 0},
+{ 679, 1085804762u, 2623955764u, 1093699897u, 1216444475u, 3217573076u, 2367761568u, 0, SIN_TOLERANCE, 0},
+{ 680, 1091905603u, 107442539u, 3239767031u, 1149813329u, 3219201617u, 765596820u, 0, SIN_TOLERANCE, 0},
+{ 681, 3233445240u, 1761361082u, 3226030205u, 1121849716u, 3217621113u, 873360802u, 0, SIN_TOLERANCE, 0},
+{ 682, 3240087115u, 2534144722u, 1044223733u, 3512285706u, 1072687886u, 3930762827u, 0, SIN_TOLERANCE, 0},
+{ 683, 3211846077u, 4073670723u, 1050729852u, 3034818849u, 3211846074u, 3505394660u, 0, SIN_TOLERANCE, 0},
+{ 684, 1101984574u, 1421423503u, 1060278048u, 1397153092u, 3219618337u, 3705914211u, 0, SIN_TOLERANCE, 0},
+{ 685, 3217421829u, 1649206019u, 1104525577u, 1267104290u, 3217414778u, 3301659344u, 0, SIN_TOLERANCE, 0},
+{ 686, 3189302097u, 3775270392u, 1040251850u, 68667319u, 3189302097u, 3775270392u, 0, SIN_TOLERANCE, 0},
+{ 687, 3204330900u, 3099226694u, 3254103006u, 4020102648u, 3204330900u, 3098050414u, 0, SIN_TOLERANCE, 0},
+{ 688, 3201591712u, 3718441177u, 3215643451u, 4032951536u, 3201591712u, 3718418496u, 0, SIN_TOLERANCE, 0},
+{ 689, 1044131371u, 508048351u, 3210196713u, 1707937896u, 1044131371u, 508048351u, 0, SIN_TOLERANCE, 0},
+{ 690, 3198611627u, 2784738160u, 1073435430u, 1109346010u, 3198611627u, 2784737657u, 0, SIN_TOLERANCE, 0},
+{ 691, 3225725290u, 3331916473u, 3238794568u, 2707019594u, 1071495018u, 3178588094u, 0, SIN_TOLERANCE, 0},
+{ 692, 1093182670u, 3093165197u, 1072894805u, 2853215019u, 3217500553u, 2290438925u, 0, SIN_TOLERANCE, 0},
+{ 693, 3216582139u, 2135797997u, 1048399559u, 2941926126u, 3216579489u, 4159294474u, 0, SIN_TOLERANCE, 0},
+{ 694, 1048430980u, 2083412145u, 3249335391u, 507212448u, 1048430980u, 2083412128u, 0, SIN_TOLERANCE, 0},
+{ 695, 1075363751u, 4270176401u, 3246546709u, 3288753319u, 3216542507u, 215621546u, 0, SIN_TOLERANCE, 0},
+{ 696, 3247932863u, 3692175292u, 3197271515u, 3989064196u, 3220143575u, 2114052675u, 0, SIN_TOLERANCE, 0},
+{ 697, 3251691738u, 3111924274u, 1066772558u, 59281695u, 3218178701u, 29998399u, 0, SIN_TOLERANCE, 0},
+{ 698, 1067683911u, 2135245466u, 3208804313u, 3846547392u, 1067683599u, 2295121613u, 0, SIN_TOLERANCE, 0},
+{ 699, 1094877811u, 972051266u, 3222814246u, 3539700586u, 3219786441u, 533914340u, 0, SIN_TOLERANCE, 0},
+{ 700, 3202965930u, 330951080u, 1079189813u, 583922384u, 3202965930u, 330776666u, 0, SIN_TOLERANCE, 0},
+{ 701, 1089640092u, 1711944085u, 1104170032u, 643991456u, 3220087007u, 95099636u, 0, SIN_TOLERANCE, 0},
+{ 702, 3234429549u, 2072550721u, 3250147641u, 4280263530u, 3219800876u, 983380726u, 0, SIN_TOLERANCE, 0},
+{ 703, 3192972706u, 1566376352u, 1067251433u, 72984588u, 3192972706u, 1566376352u, 0, SIN_TOLERANCE, 0},
+{ 704, 1095276569u, 3103043079u, 1045853123u, 410067497u, 1071502363u, 1641513533u, 0, SIN_TOLERANCE, 0},
+{ 705, 3216672493u, 1910366299u, 1081770885u, 634683073u, 3216669383u, 4291074098u, 0, SIN_TOLERANCE, 0},
+{ 706, 1081530688u, 2226525875u, 3224149290u, 2126302825u, 1072513290u, 2095198212u, 0, SIN_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1072674175u, 3406438775u, 0, SIN_TOLERANCE, 0},
+{ 708, 1066482943u, 1953339096u, 1077176252u, 1476516558u, 1066482890u, 413456908u, 0, SIN_TOLERANCE, 0},
+{ 709, 1066092000u, 1306277326u, 1079089150u, 4093716191u, 1066091947u, 2046428131u, 0, SIN_TOLERANCE, 0},
+{ 710, 3233148787u, 51750045u, 3242913901u, 4256866157u, 1072670444u, 2809926129u, 0, SIN_TOLERANCE, 0},
+{ 711, 3195084967u, 2163853087u, 3232053146u, 2962422808u, 3195084967u, 2163853084u, 0, SIN_TOLERANCE, 0},
+{ 712, 1075516945u, 1618388148u, 3233154824u, 3711953164u, 1071515415u, 4132615641u, 0, SIN_TOLERANCE, 0},
+{ 713, 3246868002u, 357108214u, 3202294604u, 2306775262u, 1072207361u, 414524426u, 0, SIN_TOLERANCE, 0},
+{ 714, 3201904086u, 2571356437u, 3249064063u, 2394851808u, 3201904086u, 2571313869u, 0, SIN_TOLERANCE, 0},
+{ 715, 3230488091u, 4273880094u, 1103698617u, 3578832032u, 3219215904u, 3059520098u, 0, SIN_TOLERANCE, 0},
+{ 716, 3233426701u, 2091068742u, 3228270226u, 3980489730u, 1067594500u, 166622290u, 0, SIN_TOLERANCE, 0},
+{ 717, 3229016752u, 2772307714u, 1051008486u, 32546576u, 3220145742u, 42617798u, 0, SIN_TOLERANCE, 0},
+{ 718, 3241229215u, 2143788498u, 3195498043u, 3630119231u, 1072561542u, 1965238809u, 0, SIN_TOLERANCE, 0},
+{ 719, 3198632935u, 2527385594u, 3240503648u, 3482095012u, 3198632935u, 2527385069u, 0, SIN_TOLERANCE, 0},
+{ 720, 3242168799u, 2690097362u, 1068598730u, 2360266862u, 3219788598u, 2965776922u, 0, SIN_TOLERANCE, 0},
+{ 721, 1058857869u, 2673272949u, 1082639557u, 522449749u, 1058857869u, 2656814049u, 0, SIN_TOLERANCE, 0},
+{ 722, 1104424147u, 3596379400u, 3242016775u, 2002293002u, 1072450473u, 2447589729u, 0, SIN_TOLERANCE, 0},
+{ 723, 1099439656u, 4113224369u, 3222122439u, 2152316893u, 1071694670u, 2689772186u, 0, SIN_TOLERANCE, 0},
+{ 724, 3220796716u, 31662602u, 1047721249u, 1747087514u, 3220176463u, 2050031094u, 0, SIN_TOLERANCE, 0},
+{ 725, 3250463757u, 2489659568u, 1097051253u, 277506957u, 1072192681u, 1960692440u, 0, SIN_TOLERANCE, 0},
+{ 726, 3191401834u, 3850162281u, 3213841942u, 438724093u, 3191401834u, 3850162281u, 0, SIN_TOLERANCE, 0},
+{ 727, 1095392535u, 2431814052u, 1075518084u, 2672434118u, 1066470796u, 966739062u, 0, SIN_TOLERANCE, 0},
+{ 728, 3243162735u, 391606792u, 1048184750u, 4168944276u, 1072497290u, 3546882296u, 0, SIN_TOLERANCE, 0},
+{ 729, 3247792416u, 457529672u, 3201090276u, 72407935u, 3220118733u, 25015996u, 0, SIN_TOLERANCE, 0},
+{ 730, 3218720719u, 3954981400u, 1052053242u, 2411049585u, 3218675396u, 3635036859u, 0, SIN_TOLERANCE, 0},
+{ 731, 1086180091u, 485456950u, 1088415093u, 1655397424u, 3219592964u, 2876754847u, 0, SIN_TOLERANCE, 0},
+{ 732, 3198234428u, 1551748070u, 3236871640u, 1329701152u, 3198234428u, 1551747859u, 0, SIN_TOLERANCE, 0},
+{ 733, 3224639122u, 3099222537u, 1104984570u, 4293792842u, 3220062255u, 812536194u, 0, SIN_TOLERANCE, 0},
+{ 734, 3203949705u, 3603065260u, 3197735968u, 2402359253u, 3203949705u, 3602446005u, 0, SIN_TOLERANCE, 0},
+{ 735, 3198824584u, 3961208159u, 3219057584u, 2340553876u, 3198824584u, 3961207411u, 0, SIN_TOLERANCE, 0},
+{ 736, 1074881909u, 4014841779u, 3197672877u, 3697233334u, 3220040008u, 2497124737u, 0, SIN_TOLERANCE, 0},
+{ 737, 3213275657u, 1403876392u, 3254028950u, 921363393u, 3213275626u, 3797578388u, 0, SIN_TOLERANCE, 0},
+{ 738, 1107251806u, 1862576361u, 3194031708u, 2476290925u, 1066826084u, 228279643u, 0, SIN_TOLERANCE, 0},
+{ 739, 1049661768u, 1454212851u, 1088378861u, 3400401866u, 1049661768u, 1454212804u, 0, SIN_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 3217043135u, 195821175u, 0, SIN_TOLERANCE, 0},
+{ 741, 3216409282u, 1199568671u, 3225679997u, 46947405u, 3216407381u, 3639731911u, 0, SIN_TOLERANCE, 0},
+{ 742, 1077685537u, 2596231448u, 3253943728u, 2219151748u, 1069092570u, 1466027195u, 0, SIN_TOLERANCE, 0},
+{ 743, 1066527035u, 4119719558u, 3222036299u, 1275474618u, 1066526976u, 455592928u, 0, SIN_TOLERANCE, 0},
+{ 744, 3239908663u, 3347296825u, 1101507910u, 1254014794u, 3219638163u, 2955619445u, 0, SIN_TOLERANCE, 0},
+{ 745, 1084119992u, 673775040u, 1070743626u, 244126093u, 1072671174u, 3976384735u, 0, SIN_TOLERANCE, 0},
+{ 746, 3203199850u, 1832066983u, 1051358028u, 3262483417u, 3203199850u, 1831808154u, 0, SIN_TOLERANCE, 0},
+{ 747, 1077559600u, 3962610501u, 3198598777u, 849269178u, 1072485486u, 2297831715u, 0, SIN_TOLERANCE, 0},
+{ 748, 3235473900u, 2497516122u, 3254374111u, 2821429629u, 1072590812u, 4038425279u, 0, SIN_TOLERANCE, 0},
+{ 749, 1076236288u, 2805941787u, 3217785843u, 779131141u, 3220175561u, 802321461u, 0, SIN_TOLERANCE, 0},
+{ 750, 3226908686u, 723423605u, 1084533420u, 627282213u, 3217897637u, 1983010531u, 0, SIN_TOLERANCE, 0},
+{ 751, 3215947680u, 4292778869u, 1078101071u, 1676860147u, 3215946382u, 4157973483u, 0, SIN_TOLERANCE, 0},
+{ 752, 1076288502u, 3528118587u, 3194648564u, 2363260897u, 3219982433u, 206443956u, 0, SIN_TOLERANCE, 0},
+{ 753, 3192897879u, 1307010018u, 1061248120u, 1468743108u, 3192897879u, 1307010018u, 0, SIN_TOLERANCE, 0},
+{ 754, 3246583139u, 107905661u, 3226089788u, 1943427674u, 3220138045u, 3201333477u, 0, SIN_TOLERANCE, 0},
+{ 755, 3188230541u, 760006940u, 1054265604u, 1749976597u, 3188230541u, 760006940u, 0, SIN_TOLERANCE, 0},
+{ 756, 3237773384u, 2787503556u, 1081282610u, 1195841206u, 1072407277u, 3529099003u, 0, SIN_TOLERANCE, 0},
+{ 757, 3191802156u, 545462045u, 3208381743u, 1981311808u, 3191802156u, 545462045u, 0, SIN_TOLERANCE, 0},
+{ 758, 1061232136u, 3657978397u, 1104463616u, 3501253426u, 1061232136u, 3438851257u, 0, SIN_TOLERANCE, 0},
+{ 759, 1049883857u, 1804177501u, 3210693633u, 3606766729u, 1049883857u, 1804177418u, 0, SIN_TOLERANCE, 0},
+{ 760, 1076856879u, 1336278526u, 1043741618u, 3165279431u, 3215831266u, 313798122u, 0, SIN_TOLERANCE, 0},
+{ 761, 1055471915u, 1599382075u, 1058018527u, 4212580517u, 1055471915u, 1599210902u, 0, SIN_TOLERANCE, 0},
+{ 762, 3207502326u, 3007589929u, 3202026547u, 2792028313u, 3207502326u, 2929338288u, 0, SIN_TOLERANCE, 0},
+{ 763, 3253082770u, 1866066996u, 1060329048u, 3727175322u, 1072082805u, 370540720u, 0, SIN_TOLERANCE, 0},
+{ 764, 3198416643u, 150890940u, 1056025306u, 3082724735u, 3198416643u, 150890608u, 0, SIN_TOLERANCE, 0},
+{ 765, 1062008939u, 80400395u, 1093584426u, 3478941315u, 1062008938u, 3313057461u, 0, SIN_TOLERANCE, 0},
+{ 766, 3251640614u, 4050954182u, 3219263194u, 2537475930u, 3216852172u, 4074570681u, 0, SIN_TOLERANCE, 0},
+{ 767, 1064841871u, 2881752155u, 3212589299u, 2559651278u, 1064841862u, 1919635398u, 0, SIN_TOLERANCE, 0},
+{ 768, 3249016304u, 440309030u, 3214267461u, 3788040806u, 3219057401u, 995701688u, 0, SIN_TOLERANCE, 0},
+{ 769, 1100476615u, 918813144u, 3208535698u, 1607035904u, 3220032872u, 3228685377u, 0, SIN_TOLERANCE, 0},
+{ 770, 1042137451u, 2497054124u, 1089139147u, 2549609010u, 1042137451u, 2497054124u, 0, SIN_TOLERANCE, 0},
+{ 771, 1047037641u, 790219083u, 1054657139u, 2797979479u, 1047037641u, 790219081u, 0, SIN_TOLERANCE, 0},
+{ 772, 1057781400u, 1149462078u, 1095765205u, 3879963182u, 1057781400u, 1145526553u, 0, SIN_TOLERANCE, 0},
+{ 773, 3202729813u, 2684353926u, 3205212854u, 1732474928u, 3202729813u, 2684243741u, 0, SIN_TOLERANCE, 0},
+{ 774, 1095236965u, 2742237025u, 1051317716u, 3386396147u, 1070877719u, 2705967942u, 0, SIN_TOLERANCE, 0},
+{ 775, 1063230986u, 3408320912u, 1103071166u, 4233059513u, 1063230985u, 2179651933u, 0, SIN_TOLERANCE, 0},
+{ 776, 1064863548u, 1077495917u, 1088399968u, 433115118u, 1064863538u, 2763460549u, 0, SIN_TOLERANCE, 0},
+{ 777, 3204547572u, 841366493u, 1051716814u, 4121125128u, 3204547572u, 840449402u, 0, SIN_TOLERANCE, 0},
+{ 778, 1064632084u, 321857207u, 1089128010u, 1149988239u, 1064632078u, 209377307u, 0, SIN_TOLERANCE, 0},
+{ 779, 3245542663u, 799866606u, 3197637091u, 3924438208u, 3211532947u, 61380288u, 0, SIN_TOLERANCE, 0},
+{ 780, 3191062890u, 2002049816u, 1077053447u, 2240354761u, 3191062890u, 2002049816u, 0, SIN_TOLERANCE, 0},
+{ 781, 3229006283u, 478939968u, 1097035749u, 1066716440u, 1072118877u, 1278678307u, 0, SIN_TOLERANCE, 0},
+{ 782, 3232473641u, 1653104725u, 1088548129u, 81977716u, 1070995575u, 2527929909u, 0, SIN_TOLERANCE, 0},
+{ 783, 3196861276u, 3899475018u, 3189694084u, 3330093036u, 3196861276u, 3899474959u, 0, SIN_TOLERANCE, 0},
+{ 784, 1089312583u, 2612450289u, 1079065127u, 603380842u, 1072258821u, 2147418766u, 0, SIN_TOLERANCE, 0},
+{ 785, 1100636791u, 3962735564u, 1101570429u, 1372490825u, 1072153286u, 2509034605u, 0, SIN_TOLERANCE, 0},
+{ 786, 1054806016u, 1479841439u, 1059312257u, 541504905u, 1054806016u, 1479761515u, 0, SIN_TOLERANCE, 0},
+{ 787, 1078662178u, 2626148789u, 1057571099u, 4121656076u, 3219509598u, 3162938688u, 0, SIN_TOLERANCE, 0},
+{ 788, 1081613389u, 1902560314u, 1043130231u, 3557671562u, 1071860231u, 4036566694u, 0, SIN_TOLERANCE, 0},
+{ 789, 3193829772u, 41779312u, 1081626342u, 831171823u, 3193829772u, 41779311u, 0, SIN_TOLERANCE, 0},
+{ 790, 1058131100u, 1393168821u, 1066457405u, 1381616968u, 1058131100u, 1389319230u, 0, SIN_TOLERANCE, 0},
+{ 791, 1072338141u, 3756584649u, 3222267229u, 1423157432u, 1072144601u, 1216854602u, 0, SIN_TOLERANCE, 0},
+{ 792, 3254435674u, 1894912556u, 1042426694u, 155024547u, 1070655378u, 1125014315u, 0, SIN_TOLERANCE, 0},
+{ 793, 3195453512u, 35164295u, 3203391785u, 1037041084u, 3195453512u, 35164287u, 0, SIN_TOLERANCE, 0},
+{ 794, 1084777479u, 3957875950u, 3232195211u, 1590756436u, 3219474557u, 145576704u, 0, SIN_TOLERANCE, 0},
+{ 795, 1068844322u, 1447585080u, 1071279485u, 1107922438u, 1068842719u, 319192824u, 0, SIN_TOLERANCE, 0},
+{ 796, 1046252518u, 981897615u, 1051856116u, 430357614u, 1046252518u, 981897614u, 0, SIN_TOLERANCE, 0},
+{ 797, 3227524215u, 395145384u, 3219821938u, 50586510u, 1068861989u, 2803598491u, 0, SIN_TOLERANCE, 0},
+{ 798, 1069775912u, 750827797u, 1082862669u, 230466783u, 1069770986u, 187872487u, 0, SIN_TOLERANCE, 0},
+{ 799, 1086668819u, 1365083575u, 3204848310u, 1700831722u, 3219606702u, 664833781u, 0, SIN_TOLERANCE, 0},
+{ 800, 3218090390u, 344241827u, 1071538935u, 2715566077u, 3218078590u, 1558660632u, 0, SIN_TOLERANCE, 0},
+{ 801, 3247582856u, 4069301823u, 3193208760u, 2949125229u, 3219745876u, 2119491553u, 0, SIN_TOLERANCE, 0},
+{ 802, 1103231387u, 3585711710u, 1065801594u, 2302229267u, 1072278020u, 3712833510u, 0, SIN_TOLERANCE, 0},
+{ 803, 3194118956u, 709803845u, 1048741487u, 2296910194u, 3194118956u, 709803844u, 0, SIN_TOLERANCE, 0},
+{ 804, 3193280779u, 744421179u, 1069302001u, 2659232829u, 3193280779u, 744421179u, 0, SIN_TOLERANCE, 0},
+{ 805, 1092835968u, 1799949903u, 3192522886u, 4212149209u, 1072659620u, 690167108u, 0, SIN_TOLERANCE, 0},
+{ 806, 3206108502u, 145234164u, 3250614064u, 912384201u, 3206108502u, 134135102u, 0, SIN_TOLERANCE, 0},
+{ 807, 3240510664u, 2784620507u, 1102812948u, 3531481022u, 3219163481u, 1790069326u, 0, SIN_TOLERANCE, 0},
+{ 808, 3251159663u, 383952592u, 3205659905u, 3633194728u, 3219784663u, 2266824838u, 0, SIN_TOLERANCE, 0},
+{ 809, 3203476252u, 3792395543u, 1070072378u, 3864816376u, 3203476252u, 3792179630u, 0, SIN_TOLERANCE, 0},
+{ 810, 3205316273u, 2115553675u, 1066288499u, 3538377867u, 3205316273u, 2111284942u, 0, SIN_TOLERANCE, 0},
+{ 811, 3252075185u, 1230026762u, 1090719723u, 440819880u, 3219859189u, 4204717066u, 0, SIN_TOLERANCE, 0},
+{ 812, 3194595076u, 2991290482u, 1096886719u, 1097971167u, 3194595076u, 2991290479u, 0, SIN_TOLERANCE, 0},
+{ 813, 1090048600u, 1098035020u, 3230900504u, 1479059095u, 1072613721u, 801682150u, 0, SIN_TOLERANCE, 0},
+{ 814, 3251056964u, 1719428427u, 3188631907u, 3707377409u, 3220096300u, 2928589051u, 0, SIN_TOLERANCE, 0},
+{ 815, 1053236165u, 3748932896u, 1084908557u, 1325384361u, 1053236165u, 3748924669u, 0, SIN_TOLERANCE, 0},
+{ 816, 1084704076u, 3979168763u, 1057455255u, 2454615952u, 1071259366u, 3324387602u, 0, SIN_TOLERANCE, 0},
+{ 817, 1053106984u, 1449164578u, 1056960316u, 1654931641u, 1053106984u, 1449158282u, 0, SIN_TOLERANCE, 0},
+{ 818, 1071439010u, 2120487381u, 3226298974u, 2364226633u, 1071375546u, 4139155718u, 0, SIN_TOLERANCE, 0},
+{ 819, 1075071428u, 1074268944u, 1065730444u, 280016852u, 3220042721u, 1257491179u, 0, SIN_TOLERANCE, 0},
+{ 820, 3200308256u, 3315127889u, 3236295594u, 2900924954u, 3200308256u, 3315124712u, 0, SIN_TOLERANCE, 0},
+{ 821, 3196425891u, 2246037502u, 1049691002u, 1496066550u, 3196425891u, 2246037476u, 0, SIN_TOLERANCE, 0},
+{ 822, 3193006859u, 4191285446u, 3217936236u, 2382392789u, 3193006859u, 4191285446u, 0, SIN_TOLERANCE, 0},
+{ 823, 1092833308u, 640099844u, 1042152237u, 2064279383u, 3219074285u, 286563280u, 0, SIN_TOLERANCE, 0},
+{ 824, 1079913438u, 3468560824u, 1093251038u, 310958750u, 1072619577u, 3792685792u, 0, SIN_TOLERANCE, 0},
+{ 825, 1096788400u, 1413568905u, 1100941106u, 1627289946u, 3219437766u, 2995392509u, 0, SIN_TOLERANCE, 0},
+{ 826, 3191549550u, 3797143370u, 3195497539u, 3843275034u, 3191549550u, 3797143370u, 0, SIN_TOLERANCE, 0},
+{ 827, 3252077393u, 2806642640u, 3201943068u, 2515980718u, 3218059077u, 1307279186u, 0, SIN_TOLERANCE, 0},
+{ 828, 1086877316u, 632580632u, 1078673506u, 3259601317u, 3219568792u, 1732990341u, 0, SIN_TOLERANCE, 0},
+{ 829, 3200980575u, 3309678799u, 1049337078u, 3056787074u, 3200980575u, 3309665549u, 0, SIN_TOLERANCE, 0},
+{ 830, 3221495289u, 2341164249u, 1080834967u, 2810890005u, 3219310107u, 247678568u, 0, SIN_TOLERANCE, 0},
+{ 831, 1067019674u, 932124675u, 1093915797u, 662682630u, 1067019502u, 4105433546u, 0, SIN_TOLERANCE, 0},
+{ 832, 3249230091u, 1367996113u, 3251723684u, 2974064663u, 3216906899u, 1904351782u, 0, SIN_TOLERANCE, 0},
+{ 833, 1080230731u, 323437999u, 1090499064u, 901457511u, 1072620409u, 2752740672u, 0, SIN_TOLERANCE, 0},
+{ 834, 3235778876u, 4184941840u, 3196770014u, 2458988443u, 3220123530u, 1783233073u, 0, SIN_TOLERANCE, 0},
+{ 835, 1087618284u, 2023065054u, 3211994098u, 2734612965u, 3220107204u, 3311454131u, 0, SIN_TOLERANCE, 0},
+{ 836, 1064074694u, 3679267365u, 3237728785u, 1699558211u, 1064074691u, 396556434u, 0, SIN_TOLERANCE, 0},
+{ 837, 1088079010u, 1826799031u, 1078709629u, 3986905229u, 3217169719u, 1900478768u, 0, SIN_TOLERANCE, 0},
+{ 838, 1052843785u, 351061688u, 3194386466u, 4105857588u, 1052843785u, 351058342u, 0, SIN_TOLERANCE, 0},
+{ 839, 1054128006u, 1365244058u, 1064457319u, 1452191426u, 1054128006u, 1365220347u, 0, SIN_TOLERANCE, 0},
+{ 840, 1064122385u, 2463030625u, 3215975031u, 3773488326u, 1064122381u, 2204556131u, 0, SIN_TOLERANCE, 0},
+{ 841, 3251276671u, 752664055u, 1065110394u, 1835931663u, 1070742515u, 3481964645u, 0, SIN_TOLERANCE, 0},
+{ 842, 1088045088u, 3496172149u, 1089617208u, 109068701u, 1072410999u, 2117102088u, 0, SIN_TOLERANCE, 0},
+{ 843, 3198135087u, 1636966254u, 1086098766u, 2016598298u, 3198135087u, 1636965923u, 0, SIN_TOLERANCE, 0},
+{ 844, 1050931318u, 3551516956u, 1097969102u, 1317953425u, 1050931318u, 3551516626u, 0, SIN_TOLERANCE, 0},
+{ 845, 3229832217u, 2977627788u, 1045339018u, 516058480u, 3218591622u, 1181654978u, 0, SIN_TOLERANCE, 0},
+{ 846, 3237408578u, 3901731263u, 3189566462u, 32272932u, 3218183231u, 3162146735u, 0, SIN_TOLERANCE, 0},
+{ 847, 1077281796u, 1956025297u, 3246628529u, 3840733905u, 3214483846u, 190538678u, 0, SIN_TOLERANCE, 0},
+{ 848, 1099818036u, 561057891u, 3198494340u, 4271027193u, 1071919107u, 1715483804u, 0, SIN_TOLERANCE, 0},
+{ 849, 3250929921u, 692989850u, 3242630588u, 2492225971u, 1072330076u, 3935618552u, 0, SIN_TOLERANCE, 0},
+{ 850, 3205479397u, 3439913962u, 1067477011u, 2973333638u, 3205479397u, 3434459874u, 0, SIN_TOLERANCE, 0},
+{ 851, 3213993989u, 877613377u, 1044917899u, 809672798u, 3213993931u, 3731633135u, 0, SIN_TOLERANCE, 0},
+{ 852, 3222171454u, 905426932u, 1046417457u, 1086320855u, 1071886405u, 1807554190u, 0, SIN_TOLERANCE, 0},
+{ 853, 3246346629u, 2645567288u, 1051258339u, 557182478u, 1072600554u, 3493319746u, 0, SIN_TOLERANCE, 0},
+{ 854, 3204057950u, 186287752u, 1061342054u, 4054003419u, 3204057950u, 185533994u, 0, SIN_TOLERANCE, 0},
+{ 855, 1097266673u, 3506889716u, 3243866036u, 519056371u, 1071195689u, 2201933024u, 0, SIN_TOLERANCE, 0},
+{ 856, 1042654053u, 2171898436u, 3246911982u, 1091500784u, 1042654053u, 2171898436u, 0, SIN_TOLERANCE, 0},
+{ 857, 3243647673u, 368493885u, 3222871893u, 1419055230u, 3220170308u, 3389552159u, 0, SIN_TOLERANCE, 0},
+{ 858, 1091950572u, 2010971245u, 3188804530u, 1518695799u, 3219634155u, 704817172u, 0, SIN_TOLERANCE, 0},
+{ 859, 3205426509u, 1239207795u, 1040192984u, 2199481342u, 3205426509u, 1234159317u, 0, SIN_TOLERANCE, 0},
+{ 860, 3210978637u, 4264613432u, 3203460972u, 3558930895u, 3210978636u, 3259134081u, 0, SIN_TOLERANCE, 0},
+{ 861, 1050299283u, 3772748958u, 3227667376u, 309688336u, 1050299283u, 3772748769u, 0, SIN_TOLERANCE, 0},
+{ 862, 3230743041u, 1077949160u, 1075769893u, 2405271377u, 3217631057u, 4284143378u, 0, SIN_TOLERANCE, 0},
+{ 863, 1091835152u, 3751608506u, 3232278094u, 930375071u, 1070206721u, 167553464u, 0, SIN_TOLERANCE, 0},
+{ 864, 3198617153u, 1518334131u, 3205247482u, 791756713u, 3198617153u, 1518333622u, 0, SIN_TOLERANCE, 0},
+{ 865, 1047317453u, 2825203170u, 3245054001u, 1822981827u, 1047317453u, 2825203166u, 0, SIN_TOLERANCE, 0},
+{ 866, 1100016363u, 514474738u, 1089072073u, 3300845441u, 1069818848u, 883839804u, 0, SIN_TOLERANCE, 0},
+{ 867, 3216391250u, 247369460u, 3197320093u, 687450958u, 3216389418u, 1921207098u, 0, SIN_TOLERANCE, 0},
+{ 868, 1104161422u, 2722237629u, 1058272368u, 90602316u, 1072335096u, 22009225u, 0, SIN_TOLERANCE, 0},
+{ 869, 3208098435u, 1845900544u, 3231520830u, 3389751458u, 3208098435u, 1700546786u, 0, SIN_TOLERANCE, 0},
+{ 870, 3247535245u, 737689911u, 3195377751u, 3462616966u, 1071595394u, 1733207567u, 0, SIN_TOLERANCE, 0},
+{ 871, 3223538384u, 3620285831u, 1055501023u, 2708056059u, 1070340609u, 917475295u, 0, SIN_TOLERANCE, 0},
+{ 872, 3219464996u, 4073430285u, 1056206159u, 172017902u, 3219366437u, 3489378266u, 0, SIN_TOLERANCE, 0},
+{ 873, 3212869638u, 2799176222u, 1052706894u, 4083892667u, 3212869626u, 4094452023u, 0, SIN_TOLERANCE, 0},
+{ 874, 3202279557u, 1562351330u, 1069705601u, 1247765260u, 3202279557u, 1562272590u, 0, SIN_TOLERANCE, 0},
+{ 875, 3232717299u, 51853475u, 3189080201u, 2783553144u, 1072519452u, 3477669547u, 0, SIN_TOLERANCE, 0},
+{ 876, 3219454353u, 3851781549u, 3241598113u, 514064046u, 3219358016u, 3762898794u, 0, SIN_TOLERANCE, 0},
+{ 877, 1100045965u, 934745487u, 3248182437u, 2798581921u, 3217679015u, 4147249967u, 0, SIN_TOLERANCE, 0},
+{ 878, 3213082493u, 2948648757u, 3232177250u, 4278702895u, 3213082473u, 2709607265u, 0, SIN_TOLERANCE, 0},
+{ 879, 1072485724u, 4259101461u, 1061606772u, 84229920u, 1072240213u, 1656142705u, 0, SIN_TOLERANCE, 0},
+{ 880, 3198075559u, 3891230598u, 1095924595u, 3049217547u, 3198075559u, 3891230295u, 0, SIN_TOLERANCE, 0},
+{ 881, 1077353053u, 3806018919u, 3243191216u, 280177341u, 3219959879u, 13294155u, 0, SIN_TOLERANCE, 0},
+{ 882, 1060624530u, 3900344258u, 1063647809u, 4206745890u, 1060624530u, 3752237512u, 0, SIN_TOLERANCE, 0},
+{ 883, 3227707336u, 2126253040u, 3207248026u, 808507485u, 3218843364u, 965003397u, 0, SIN_TOLERANCE, 0},
+{ 884, 1086090317u, 3465685634u, 3230391053u, 3754958214u, 1071085134u, 3025458875u, 0, SIN_TOLERANCE, 0},
+{ 885, 1102861084u, 461094531u, 1101110393u, 1316091396u, 3219476555u, 130294181u, 0, SIN_TOLERANCE, 0},
+{ 886, 1064980314u, 4197635149u, 1091873113u, 1240127141u, 1064980303u, 517467410u, 0, SIN_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 1065956899u, 1987089718u, 0, SIN_TOLERANCE, 0},
+{ 888, 3213429165u, 3744663425u, 3212482771u, 953662066u, 3213429124u, 4282849056u, 0, SIN_TOLERANCE, 0},
+{ 889, 1085171305u, 3564196690u, 3228101916u, 904305212u, 1072570242u, 3569860264u, 0, SIN_TOLERANCE, 0},
+{ 890, 1048333111u, 3566257266u, 3235138829u, 2734275140u, 1048333111u, 3566257251u, 0, SIN_TOLERANCE, 0},
+{ 891, 3243948477u, 606044282u, 3241318094u, 2446416887u, 3218860673u, 3554048078u, 0, SIN_TOLERANCE, 0},
+{ 892, 1041627284u, 2336116589u, 3197594053u, 2296925138u, 1041627284u, 2336116589u, 0, SIN_TOLERANCE, 0},
+{ 893, 1058567659u, 907670625u, 3240769036u, 1827119006u, 1058567659u, 897679576u, 0, SIN_TOLERANCE, 0},
+{ 894, 1044467183u, 2818710946u, 3246059905u, 553394170u, 1044467183u, 2818710946u, 0, SIN_TOLERANCE, 0},
+{ 895, 3189504094u, 4099522736u, 3232742168u, 3718083858u, 3189504094u, 4099522736u, 0, SIN_TOLERANCE, 0},
+{ 896, 1092371276u, 1059279404u, 1080245336u, 175941677u, 1072200212u, 1737419341u, 0, SIN_TOLERANCE, 0},
+{ 897, 1105189691u, 1650862428u, 1061816101u, 1723201723u, 3218570766u, 2805783757u, 0, SIN_TOLERANCE, 0},
+{ 898, 3239012814u, 2462163405u, 3218946201u, 3876535372u, 1071679035u, 447938331u, 0, SIN_TOLERANCE, 0},
+{ 899, 1084392886u, 495844137u, 1073721460u, 772777946u, 1072411823u, 499804451u, 0, SIN_TOLERANCE, 0},
+{ 900, 1052415330u, 458757721u, 3245680321u, 3609892707u, 1052415330u, 458754590u, 0, SIN_TOLERANCE, 0},
+{ 901, 3193282956u, 2533012202u, 1079980803u, 3592268374u, 3193282956u, 2533012202u, 0, SIN_TOLERANCE, 0},
+{ 902, 3203364780u, 4108274117u, 1063045844u, 571992389u, 3203364780u, 4107941752u, 0, SIN_TOLERANCE, 0},
+{ 903, 1090567271u, 3541110973u, 1096296754u, 3118427427u, 1072597174u, 435564055u, 0, SIN_TOLERANCE, 0},
+{ 904, 3193980043u, 1213941007u, 1105433735u, 2172963370u, 3193980043u, 1213941006u, 0, SIN_TOLERANCE, 0},
+{ 905, 1096853359u, 272190288u, 1095452370u, 4026581530u, 1072068189u, 225919417u, 0, SIN_TOLERANCE, 0},
+{ 906, 1095583909u, 2843638672u, 1100510986u, 3190536898u, 3220168753u, 3056278709u, 0, SIN_TOLERANCE, 0},
+{ 907, 1083757094u, 2014317727u, 3247389683u, 2428462015u, 3219956586u, 2749317985u, 0, SIN_TOLERANCE, 0},
+{ 908, 1093976717u, 688442200u, 1047852515u, 3035186380u, 1072571659u, 4146519538u, 0, SIN_TOLERANCE, 0},
+{ 909, 1076664212u, 1010095511u, 3221288076u, 405287991u, 1072666832u, 2709716788u, 0, SIN_TOLERANCE, 0},
+{ 910, 3252294615u, 2983070435u, 1089546472u, 2907918480u, 1072605952u, 1232286993u, 0, SIN_TOLERANCE, 0},
+{ 911, 1082988121u, 81928569u, 1056007286u, 2740556321u, 1072215176u, 1059317954u, 0, SIN_TOLERANCE, 0},
+{ 912, 1041110867u, 2076689028u, 1081558619u, 3039159031u, 1041110867u, 2076689028u, 0, SIN_TOLERANCE, 0},
+{ 913, 1047307438u, 1376882094u, 3211003208u, 1296286481u, 1047307438u, 1376882090u, 0, SIN_TOLERANCE, 0},
+{ 914, 1080114314u, 744133164u, 3200943494u, 955832216u, 3218422833u, 2642660829u, 0, SIN_TOLERANCE, 0},
+{ 915, 3226290326u, 176522478u, 1069999908u, 2891249491u, 3219970288u, 3526549197u, 0, SIN_TOLERANCE, 0},
+{ 916, 1043564602u, 3685851715u, 3187829932u, 2363997529u, 1043564602u, 3685851715u, 0, SIN_TOLERANCE, 0},
+{ 917, 1040244055u, 3974431579u, 1052505165u, 2589067816u, 1040244055u, 3974431579u, 0, SIN_TOLERANCE, 0},
+{ 918, 3191496789u, 3819109588u, 1048561488u, 969143351u, 3191496789u, 3819109588u, 0, SIN_TOLERANCE, 0},
+{ 919, 1072639397u, 4246896124u, 1104584799u, 1940097860u, 1072331114u, 3149593052u, 0, SIN_TOLERANCE, 0},
+{ 920, 1048038468u, 2228686199u, 3220231833u, 777624847u, 1048038468u, 2228686190u, 0, SIN_TOLERANCE, 0},
+{ 921, 3231467306u, 4189906558u, 3203004203u, 854242364u, 3217932555u, 3373042203u, 0, SIN_TOLERANCE, 0},
+{ 922, 1103910407u, 4089051094u, 3227282692u, 2693170723u, 1071833840u, 2957860682u, 0, SIN_TOLERANCE, 0},
+{ 923, 1045883607u, 1278581412u, 3239296746u, 1774588717u, 1045883607u, 1278581412u, 0, SIN_TOLERANCE, 0},
+{ 924, 3222372686u, 1794845306u, 1104879344u, 4135865182u, 1072575899u, 692380978u, 0, SIN_TOLERANCE, 0},
+{ 925, 1106449055u, 754938390u, 1061291430u, 2010786993u, 1072509343u, 2661354649u, 0, SIN_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 1072613751u, 1733668973u, 0, SIN_TOLERANCE, 0},
+{ 927, 3231449194u, 567588900u, 3195452230u, 1421366017u, 3220144878u, 1302979618u, 0, SIN_TOLERANCE, 0},
+{ 928, 3225089755u, 2708717091u, 1071975971u, 1364590470u, 3220106005u, 347473173u, 0, SIN_TOLERANCE, 0},
+{ 929, 3252137283u, 3461956134u, 3207820115u, 1605709634u, 3219346471u, 1082368428u, 0, SIN_TOLERANCE, 0},
+{ 930, 1065302996u, 1497124553u, 1051715442u, 916736957u, 1065302976u, 2196771713u, 0, SIN_TOLERANCE, 0},
+{ 931, 1058468363u, 834914365u, 1064667143u, 2839166298u, 1058468363u, 826667283u, 0, SIN_TOLERANCE, 0},
+{ 932, 1057279949u, 2139295776u, 1062816721u, 914592523u, 1057279949u, 2137757362u, 0, SIN_TOLERANCE, 0},
+{ 933, 3189636931u, 851569132u, 1058503154u, 1399378677u, 3189636931u, 851569132u, 0, SIN_TOLERANCE, 0},
+{ 934, 3233537697u, 3897202342u, 3245382590u, 246600375u, 1068716420u, 3379072270u, 0, SIN_TOLERANCE, 0},
+{ 935, 3225460308u, 3620429520u, 1055627557u, 229305u, 3220111575u, 1489682636u, 0, SIN_TOLERANCE, 0},
+{ 936, 1083958833u, 3641997865u, 3206673888u, 93720614u, 1072487430u, 2559630632u, 0, SIN_TOLERANCE, 0},
+{ 937, 3227808435u, 32766320u, 1062084905u, 3668443038u, 3217825786u, 3141296516u, 0, SIN_TOLERANCE, 0},
+{ 938, 3223298996u, 2039713492u, 3248699388u, 1346210821u, 3220173621u, 3576513478u, 0, SIN_TOLERANCE, 0},
+{ 939, 1093050016u, 1335820726u, 3191756860u, 1808427032u, 3219908339u, 4273266576u, 0, SIN_TOLERANCE, 0},
+{ 940, 1061442763u, 650692001u, 1103515670u, 2253348763u, 1061442763u, 283511768u, 0, SIN_TOLERANCE, 0},
+{ 941, 3191395187u, 2372623300u, 3210185343u, 3200572848u, 3191395187u, 2372623300u, 0, SIN_TOLERANCE, 0},
+{ 942, 1100796069u, 762317532u, 3194595095u, 3192607437u, 1072383342u, 3738669031u, 0, SIN_TOLERANCE, 0},
+{ 943, 1062262701u, 217775356u, 3232827087u, 2969367386u, 1062262700u, 3677779917u, 0, SIN_TOLERANCE, 0},
+{ 944, 1057172551u, 3621353969u, 1077994795u, 3873976266u, 1057172551u, 3620151104u, 0, SIN_TOLERANCE, 0},
+{ 945, 1091301987u, 268372152u, 3221764390u, 3216978962u, 3215234871u, 2712477825u, 0, SIN_TOLERANCE, 0},
+{ 946, 3246437611u, 142942404u, 1075322987u, 1746449109u, 3220174867u, 1806978771u, 0, SIN_TOLERANCE, 0},
+{ 947, 1104006296u, 496534875u, 3254522293u, 2532372502u, 3219413463u, 3398089452u, 0, SIN_TOLERANCE, 0},
+{ 948, 3250225541u, 2999955409u, 3222793392u, 1868977643u, 3217339456u, 3133783484u, 0, SIN_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 1067764907u, 3839181841u, 0, SIN_TOLERANCE, 0},
+{ 950, 1068218799u, 73646871u, 3231442171u, 3711510104u, 1068217911u, 581741099u, 0, SIN_TOLERANCE, 0},
+{ 951, 1090483524u, 218135177u, 3198908856u, 3082199105u, 1069914119u, 1727818807u, 0, SIN_TOLERANCE, 0},
+{ 952, 1068068480u, 1061628117u, 3248859043u, 86776158u, 1068067794u, 4218705145u, 0, SIN_TOLERANCE, 0},
+{ 953, 3208484674u, 938869114u, 1087911145u, 2416710759u, 3208484674u, 655859505u, 0, SIN_TOLERANCE, 0},
+{ 954, 1095576832u, 2970853959u, 3239543429u, 1887505029u, 1071768245u, 3065994952u, 0, SIN_TOLERANCE, 0},
+{ 955, 3237728787u, 1337895935u, 1076463812u, 1172733328u, 3220129698u, 1382726161u, 0, SIN_TOLERANCE, 0},
+{ 956, 1049139928u, 1469010822u, 3229583535u, 551399515u, 1049139928u, 1469010783u, 0, SIN_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 1071272555u, 2206999416u, 0, SIN_TOLERANCE, 0},
+{ 958, 3242138780u, 2976596113u, 3192137295u, 3033242648u, 3215990730u, 631966881u, 0, SIN_TOLERANCE, 0},
+{ 959, 1098698481u, 876810930u, 3197470945u, 2571587447u, 3219824607u, 3141768906u, 0, SIN_TOLERANCE, 0},
+{ 960, 3241770810u, 4007797282u, 3225853845u, 4069319648u, 3220129859u, 885379396u, 0, SIN_TOLERANCE, 0},
+{ 961, 1047279982u, 3840538373u, 1043189552u, 3668774580u, 1047279982u, 3840538369u, 0, SIN_TOLERANCE, 0},
+{ 962, 3217611704u, 200857661u, 3229758439u, 3359367736u, 3217601482u, 3545288024u, 0, SIN_TOLERANCE, 0},
+{ 963, 3248797869u, 111868139u, 3227902082u, 2366064003u, 3220174936u, 1087612617u, 0, SIN_TOLERANCE, 0},
+{ 964, 1044195166u, 3510904416u, 3222131653u, 3822770497u, 1044195166u, 3510904416u, 0, SIN_TOLERANCE, 0},
+{ 965, 3242675715u, 789151814u, 1099269239u, 2958956055u, 3218832631u, 4285275856u, 0, SIN_TOLERANCE, 0},
+{ 966, 1084679320u, 722163228u, 1105524559u, 1534462169u, 1072113216u, 2678860791u, 0, SIN_TOLERANCE, 0},
+{ 967, 1046586062u, 2207037106u, 3208952465u, 1231254630u, 1046586062u, 2207037105u, 0, SIN_TOLERANCE, 0},
+{ 968, 3197884060u, 3838689849u, 3198769679u, 1302617170u, 3197884060u, 3838689624u, 0, SIN_TOLERANCE, 0},
+{ 969, 1085938906u, 2527556476u, 3240373426u, 124352692u, 3218875557u, 2578651385u, 0, SIN_TOLERANCE, 0},
+{ 970, 3199540805u, 3502371499u, 1043411944u, 4190072016u, 3199540805u, 3502369929u, 0, SIN_TOLERANCE, 0},
+{ 971, 1064676142u, 1798470077u, 3200116917u, 3421833729u, 1064676135u, 3414357561u, 0, SIN_TOLERANCE, 0},
+{ 972, 3193514956u, 3653237931u, 3204255012u, 3683870669u, 3193514956u, 3653237930u, 0, SIN_TOLERANCE, 0},
+{ 973, 1053588582u, 376530104u, 1073853547u, 565755892u, 1053588582u, 376514694u, 0, SIN_TOLERANCE, 0},
+{ 974, 3242503851u, 558292492u, 1051772749u, 4267873474u, 3219291476u, 1962122958u, 0, SIN_TOLERANCE, 0},
+{ 975, 3224772709u, 509637100u, 3212030069u, 215050379u, 1069631247u, 1773886841u, 0, SIN_TOLERANCE, 0},
+{ 976, 1092057101u, 3571665665u, 3188628584u, 757824767u, 3217854652u, 1187254372u, 0, SIN_TOLERANCE, 0},
+{ 977, 3214799337u, 998858159u, 1063077962u, 436029885u, 3214799057u, 2317319704u, 0, SIN_TOLERANCE, 0},
+{ 978, 3205946965u, 996300405u, 3193842624u, 80548098u, 3205946965u, 988136066u, 0, SIN_TOLERANCE, 0},
+{ 979, 3228848840u, 3876129407u, 3215332180u, 2226970413u, 1072692861u, 472379830u, 0, SIN_TOLERANCE, 0},
+{ 980, 3237608953u, 200013509u, 3224552716u, 414878724u, 3220084938u, 2073324112u, 0, SIN_TOLERANCE, 0},
+{ 981, 3230617093u, 309319541u, 1048979765u, 1261662434u, 3218724494u, 3260403043u, 0, SIN_TOLERANCE, 0},
+{ 982, 1089252639u, 4062255924u, 3224274128u, 4289485681u, 1068544147u, 1040823283u, 0, SIN_TOLERANCE, 0},
+{ 983, 3236136084u, 1611969213u, 1053890378u, 3774617276u, 1072347290u, 2008822234u, 0, SIN_TOLERANCE, 0},
+{ 984, 1080412763u, 1752164782u, 3239587974u, 612223386u, 3220175631u, 284831033u, 0, SIN_TOLERANCE, 0},
+{ 985, 1041545782u, 2024044989u, 1074932678u, 3259111307u, 1041545782u, 2024044989u, 0, SIN_TOLERANCE, 0},
+{ 986, 1053207518u, 2564965629u, 1093571065u, 169360454u, 1053207518u, 2564957860u, 0, SIN_TOLERANCE, 0},
+{ 987, 1089599090u, 1860101737u, 3191222372u, 1676437468u, 3219783008u, 3408493261u, 0, SIN_TOLERANCE, 0},
+{ 988, 1059802968u, 588387057u, 3192103292u, 2495288012u, 1059802968u, 532767073u, 0, SIN_TOLERANCE, 0},
+{ 989, 3193155705u, 659070058u, 1073095700u, 1393632068u, 3193155705u, 659070058u, 0, SIN_TOLERANCE, 0},
+{ 990, 3217683263u, 4276187829u, 3217553330u, 1868253275u, 3217671637u, 3384799844u, 0, SIN_TOLERANCE, 0},
+{ 991, 3223220272u, 2085481575u, 3215994784u, 800910002u, 3220114563u, 1165540335u, 0, SIN_TOLERANCE, 0},
+{ 992, 1056934836u, 1950570756u, 3200582211u, 941022151u, 1056934836u, 1949231356u, 0, SIN_TOLERANCE, 0},
+{ 993, 1057530368u, 2075610870u, 3250142022u, 3605152103u, 1057530368u, 2073059984u, 0, SIN_TOLERANCE, 0},
+{ 994, 3200839250u, 3792931748u, 3204857863u, 804393211u, 3200839250u, 3792921417u, 0, SIN_TOLERANCE, 0},
+{ 995, 3253646370u, 3430071177u, 3226288311u, 3652522729u, 3220166202u, 497140450u, 0, SIN_TOLERANCE, 0},
+{ 996, 3201314702u, 236884699u, 3227874605u, 2193269825u, 3201314702u, 236873391u, 0, SIN_TOLERANCE, 0},
+{ 997, 1064936593u, 2744231849u, 1046186036u, 771053722u, 1064936582u, 2840518528u, 0, SIN_TOLERANCE, 0},
+{ 998, 1083996036u, 3000189819u, 1096500901u, 2057239777u, 3218010389u, 1041275114u, 0, SIN_TOLERANCE, 0},
+{ 999, 1093835581u, 205759408u, 3244643377u, 2702292618u, 3220095357u, 2012768440u, 0, SIN_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_SIN_H multiple inclusion protection
+
+// EOF sin.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/sinh.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/sinh.c
new file mode 100644
index 0000000000..3677493a26
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/sinh.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// sinh.c
+//
+// Test of sinh() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/sinh.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(sinh_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &sinh, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_NONE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &sinh_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("sinh() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("sinh() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library sinh() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "sinh() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF sinh.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/sinh.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/sinh.h
new file mode 100644
index 0000000000..4fe5eb2180
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/sinh.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_SINH_H
+#define CYGONCE_LIBM_SINH_H
+//===========================================================================
+//
+// sinh.h
+//
+// Test vectors for testing of sinh() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/sinh.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define SINH_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t sinh_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1074853420u, 2506787616u, 1090024059u, 3619148316u, 1078024954u, 1325672821u, 0, SINH_TOLERANCE, 0},
+{ 2, 3220250806u, 3176730980u, 1051524793u, 2993920299u, 3220477814u, 4166713187u, 0, SINH_TOLERANCE, 0},
+{ 3, 3226028315u, 2725707538u, 3232101343u, 2346810316u, 3295615262u, 3406370818u, 0, SINH_TOLERANCE, 0},
+{ 4, 1078922874u, 2088062470u, 3201242716u, 420891118u, 1165520069u, 2120331304u, 0, SINH_TOLERANCE, 0},
+{ 5, 3221200677u, 2636405208u, 1100049309u, 471635570u, 3222032301u, 4262763718u, 0, SINH_TOLERANCE, 0},
+{ 6, 1077828855u, 1746012320u, 1054478713u, 3333988501u, 1117516582u, 699114409u, 0, SINH_TOLERANCE, 0},
+{ 7, 1066827528u, 183014794u, 3202039382u, 2016785810u, 1066827646u, 2740062550u, 0, SINH_TOLERANCE, 0},
+{ 8, 3219777490u, 2688957927u, 1046089230u, 2709029994u, 3219969104u, 3103290362u, 0, SINH_TOLERANCE, 0},
+{ 9, 1070330066u, 624574473u, 1045840574u, 3473266330u, 1070344642u, 3098664718u, 0, SINH_TOLERANCE, 0},
+{ 10, 3217502754u, 1605286142u, 1068931671u, 4233776869u, 3217511088u, 1479052898u, 0, SINH_TOLERANCE, 0},
+{ 11, 1069780594u, 1857607719u, 3222889559u, 3417070006u, 1069785586u, 2351965982u, 0, SINH_TOLERANCE, 0},
+{ 12, 1081579891u, 3981151660u, 1088899021u, 1332651746u, 1642782946u, 1345086100u, 0, SINH_TOLERANCE, 0},
+{ 13, 1075860838u, 3824988054u, 1066856791u, 2070129652u, 1083933725u, 1287980412u, 0, SINH_TOLERANCE, 0},
+{ 14, 3218045550u, 1372884064u, 1080833116u, 3229926662u, 3218066407u, 1712809869u, 0, SINH_TOLERANCE, 0},
+{ 15, 1078097861u, 3217805330u, 3191644264u, 2014578707u, 1127449977u, 1807458751u, 0, SINH_TOLERANCE, 0},
+{ 16, 1080267391u, 265058758u, 3239903247u, 1630600647u, 1308474718u, 1523986687u, 0, SINH_TOLERANCE, 0},
+{ 17, 1073221381u, 1946677669u, 3198462609u, 926009897u, 1073814134u, 965164266u, 0, SINH_TOLERANCE, 0},
+{ 18, 1073178875u, 2271884183u, 3203741999u, 2118617783u, 1073764879u, 2502245462u, 0, SINH_TOLERANCE, 0},
+{ 19, 3214772053u, 213658772u, 3249401130u, 314151656u, 3214772321u, 1121595103u, 0, SINH_TOLERANCE, 0},
+{ 20, 3228946464u, 1564829925u, 3197817016u, 497230814u, 3747008735u, 3665494831u, 0, SINH_TOLERANCE, 0},
+{ 21, 3219408362u, 2075329122u, 3231746400u, 169900577u, 3219499040u, 1378507091u, 0, SINH_TOLERANCE, 0},
+{ 22, 1067674434u, 541549344u, 1096608669u, 3119070100u, 1067674739u, 1142681329u, 0, SINH_TOLERANCE, 0},
+{ 23, 1075989871u, 567496114u, 1045286891u, 1969998540u, 1085434125u, 3122029707u, 0, SINH_TOLERANCE, 0},
+{ 24, 1069985379u, 1299369769u, 1049342524u, 4167404066u, 1069993170u, 957868079u, 0, SINH_TOLERANCE, 0},
+{ 25, 3218302829u, 3348930841u, 1078472138u, 358457347u, 3218322401u, 4210136577u, 0, SINH_TOLERANCE, 0},
+{ 26, 1073166449u, 2192461366u, 1099527247u, 3184735642u, 1073750816u, 3805009043u, 0, SINH_TOLERANCE, 0},
+{ 27, 1068590412u, 331696577u, 3189610016u, 793242270u, 1068591289u, 2713729777u, 0, SINH_TOLERANCE, 0},
+{ 28, 3229460262u, 2322696981u, 1083791358u, 3020766674u, 3936770457u, 4287903039u, 0, SINH_TOLERANCE, 0},
+{ 29, 1066922273u, 252085215u, 3214426435u, 4139068910u, 1066922416u, 83845212u, 0, SINH_TOLERANCE, 0},
+{ 30, 3221457149u, 105589263u, 1056316170u, 261630827u, 3222720706u, 3192021150u, 0, SINH_TOLERANCE, 0},
+{ 31, 1082047584u, 428765703u, 3251828686u, 2009972239u, 1815498097u, 3462966019u, 0, SINH_TOLERANCE, 0},
+{ 32, 1079693651u, 3517376586u, 3240257920u, 3304487302u, 1233851281u, 1250614638u, 0, SINH_TOLERANCE, 0},
+{ 33, 3224100728u, 237004814u, 3237899261u, 3364008659u, 3240179835u, 168260289u, 0, SINH_TOLERANCE, 0},
+{ 34, 3214121920u, 472004928u, 3226869477u, 1186387580u, 3214121998u, 2769782808u, 0, SINH_TOLERANCE, 0},
+{ 35, 1068906914u, 4085763910u, 1106394906u, 2684738273u, 1068908745u, 1510279260u, 0, SINH_TOLERANCE, 0},
+{ 36, 1069636551u, 2055490142u, 3231581370u, 3879040079u, 1069640041u, 2752142379u, 0, SINH_TOLERANCE, 0},
+{ 37, 3213093895u, 3725731239u, 1061652681u, 591292963u, 3213093916u, 1967435138u, 0, SINH_TOLERANCE, 0},
+{ 38, 3221869253u, 1147041027u, 3215417793u, 624695933u, 3223924727u, 2571982132u, 0, SINH_TOLERANCE, 0},
+{ 39, 3217587110u, 705725219u, 3238067573u, 1116238321u, 3217596911u, 3311611344u, 0, SINH_TOLERANCE, 0},
+{ 40, 3217852848u, 7287411u, 1045917232u, 116067742u, 3217868380u, 3703123310u, 0, SINH_TOLERANCE, 0},
+{ 41, 3226423734u, 3604989074u, 1066381836u, 545298780u, 3313804928u, 3198996771u, 0, SINH_TOLERANCE, 0},
+{ 42, 3221178088u, 1681476121u, 1060345752u, 3553822398u, 3221991193u, 2715753141u, 0, SINH_TOLERANCE, 0},
+{ 43, 1080811562u, 3410480388u, 1052460275u, 1660607230u, 1408926430u, 2715754844u, 0, SINH_TOLERANCE, 0},
+{ 44, 1077682533u, 1494984673u, 3196647153u, 287894723u, 1114110585u, 2741076212u, 0, SINH_TOLERANCE, 0},
+{ 45, 1068516615u, 644548665u, 1081948134u, 2442134629u, 1068517333u, 260208407u, 0, SINH_TOLERANCE, 0},
+{ 46, 1077068335u, 2312530895u, 3221584595u, 3379665576u, 1100002913u, 3357999193u, 0, SINH_TOLERANCE, 0},
+{ 47, 1079308159u, 3018463866u, 1086226574u, 404012923u, 1198269222u, 2905917257u, 0, SINH_TOLERANCE, 0},
+{ 48, 1071024755u, 1710279345u, 3251401196u, 3528946000u, 1071055486u, 60512890u, 0, SINH_TOLERANCE, 0},
+{ 49, 1070973535u, 2164450219u, 1083520023u, 3312018966u, 1071001167u, 1910140323u, 0, SINH_TOLERANCE, 0},
+{ 50, 1069831588u, 2648986431u, 1050330591u, 1474376550u, 1069837201u, 704378001u, 0, SINH_TOLERANCE, 0},
+{ 51, 3214344972u, 1839068700u, 1077406406u, 3013052171u, 3214345099u, 1580301750u, 0, SINH_TOLERANCE, 0},
+{ 52, 1066416574u, 772102380u, 3220729740u, 4219039958u, 1066416618u, 2907767777u, 0, SINH_TOLERANCE, 0},
+{ 53, 3223180765u, 3058618779u, 1046304788u, 3338676024u, 3230342304u, 3808714856u, 0, SINH_TOLERANCE, 0},
+{ 54, 1067949353u, 506286854u, 1094907481u, 2217000199u, 1067949901u, 3532436019u, 0, SINH_TOLERANCE, 0},
+{ 55, 1076136854u, 1147428263u, 1065432625u, 3034786717u, 1087127673u, 1621780183u, 0, SINH_TOLERANCE, 0},
+{ 56, 1075725296u, 2844125311u, 1082985198u, 2561492677u, 1083060296u, 554895537u, 0, SINH_TOLERANCE, 0},
+{ 57, 3218876948u, 704542600u, 3222902057u, 2762779203u, 3218937103u, 1557942213u, 0, SINH_TOLERANCE, 0},
+{ 58, 3215409254u, 184131949u, 3249723525u, 1667366082u, 3215409777u, 3745315154u, 0, SINH_TOLERANCE, 0},
+{ 59, 3221512446u, 3904224140u, 1067056698u, 2942159914u, 3222889439u, 2388317524u, 0, SINH_TOLERANCE, 0},
+{ 60, 1080713919u, 426114282u, 3209056785u, 1083606355u, 1390879870u, 3657642479u, 0, SINH_TOLERANCE, 0},
+{ 61, 1082048697u, 3774123863u, 1106787580u, 2722107965u, 1815954824u, 2241806278u, 0, SINH_TOLERANCE, 0},
+{ 62, 1077519332u, 1377734762u, 1104232051u, 2377063483u, 1110428932u, 844049504u, 0, SINH_TOLERANCE, 0},
+{ 63, 1072526287u, 1029739074u, 1105467109u, 3062201018u, 1072751914u, 89150669u, 0, SINH_TOLERANCE, 0},
+{ 64, 3225304413u, 773857656u, 3214251949u, 335833884u, 3264787509u, 3714139170u, 0, SINH_TOLERANCE, 0},
+{ 65, 3216856098u, 1473865960u, 1103073830u, 4000427507u, 3216860305u, 3030706697u, 0, SINH_TOLERANCE, 0},
+{ 66, 1081165135u, 4242092620u, 1067009473u, 14539161u, 1489589453u, 1225921132u, 0, SINH_TOLERANCE, 0},
+{ 67, 3214536170u, 1732245037u, 1101371955u, 1533536108u, 3214536352u, 18093930u, 0, SINH_TOLERANCE, 0},
+{ 68, 3228182475u, 1833841275u, 1099430098u, 4144145552u, 3535623788u, 2429748539u, 0, SINH_TOLERANCE, 0},
+{ 69, 3227493247u, 935007012u, 3188865420u, 604442938u, 3410487768u, 3099153891u, 0, SINH_TOLERANCE, 0},
+{ 70, 3217389013u, 2211464602u, 1046255144u, 1635910526u, 3217395611u, 3092963229u, 0, SINH_TOLERANCE, 0},
+{ 71, 1074725689u, 2549219008u, 3231633258u, 3733639385u, 1077419635u, 3503988551u, 0, SINH_TOLERANCE, 0},
+{ 72, 1075803633u, 1819374372u, 3202219056u, 2617077637u, 1083464179u, 2382136690u, 0, SINH_TOLERANCE, 0},
+{ 73, 1078616640u, 546465680u, 1048653554u, 532401530u, 1151433358u, 1660202510u, 0, SINH_TOLERANCE, 0},
+{ 74, 1066591187u, 2759019783u, 3221570188u, 3554409630u, 1066591257u, 3681433865u, 0, SINH_TOLERANCE, 0},
+{ 75, 3219222738u, 2527221960u, 1099107978u, 2696971136u, 3219280172u, 2776033431u, 0, SINH_TOLERANCE, 0},
+{ 76, 1079332208u, 173134582u, 1087299442u, 2877794600u, 1200522954u, 2450291402u, 0, SINH_TOLERANCE, 0},
+{ 77, 1076963290u, 547642046u, 3197285510u, 3521286127u, 1097525900u, 1604458481u, 0, SINH_TOLERANCE, 0},
+{ 78, 1073812126u, 1231582831u, 1090971734u, 1653446832u, 1074833786u, 707719957u, 0, SINH_TOLERANCE, 0},
+{ 79, 1070779719u, 3762182190u, 3252967851u, 2615360375u, 1070797520u, 4104947389u, 0, SINH_TOLERANCE, 0},
+{ 80, 3216563063u, 2588067350u, 3206610957u, 3551059728u, 3216565624u, 2725656040u, 0, SINH_TOLERANCE, 0},
+{ 81, 3217464616u, 845263327u, 1073415902u, 1749010288u, 3217472337u, 3825523119u, 0, SINH_TOLERANCE, 0},
+{ 82, 3217110706u, 3092685191u, 3190678390u, 2872219490u, 3217114110u, 800542468u, 0, SINH_TOLERANCE, 0},
+{ 83, 3220412207u, 4107255722u, 3205337291u, 3069068345u, 3220757928u, 314341153u, 0, SINH_TOLERANCE, 0},
+{ 84, 3227213641u, 2294867524u, 3216653996u, 2860384670u, 3384744624u, 1311152806u, 0, SINH_TOLERANCE, 0},
+{ 85, 3214297870u, 2265437201u, 3240198679u, 1234948614u, 3214297985u, 4040406728u, 0, SINH_TOLERANCE, 0},
+{ 86, 3219505657u, 1186945904u, 3251167793u, 1896750851u, 3219618092u, 1119536396u, 0, SINH_TOLERANCE, 0},
+{ 87, 1075284022u, 3686084548u, 1079286273u, 3309277689u, 1080454714u, 2582453855u, 0, SINH_TOLERANCE, 0},
+{ 88, 3221379088u, 3006860614u, 3231412671u, 2504194724u, 3222510455u, 4288288336u, 0, SINH_TOLERANCE, 0},
+{ 89, 3224614924u, 1948717780u, 1048317852u, 3791803982u, 3248870698u, 776596525u, 0, SINH_TOLERANCE, 0},
+{ 90, 1070636471u, 4272034420u, 3192982124u, 1526175922u, 1070648746u, 3935275670u, 0, SINH_TOLERANCE, 0},
+{ 91, 3226943458u, 4108948538u, 1104691287u, 640541190u, 3359767069u, 2139002760u, 0, SINH_TOLERANCE, 0},
+{ 92, 3217743177u, 3259274853u, 1082507103u, 3677038020u, 3217756131u, 2371296595u, 0, SINH_TOLERANCE, 0},
+{ 93, 1076841042u, 3781708548u, 1096584871u, 1207386447u, 1095222699u, 77086u, 0, SINH_TOLERANCE, 0},
+{ 94, 3213861096u, 3011191657u, 1103798670u, 1096124830u, 3213861179u, 421678587u, 0, SINH_TOLERANCE, 0},
+{ 95, 1071623631u, 2540404725u, 3240157452u, 4122845725u, 1071677062u, 3895505649u, 0, SINH_TOLERANCE, 0},
+{ 96, 1076303678u, 311336721u, 3214382367u, 4212533768u, 1089026116u, 2663248725u, 0, SINH_TOLERANCE, 0},
+{ 97, 1067916643u, 1769686293u, 3240200923u, 3538602249u, 1067917158u, 222451802u, 0, SINH_TOLERANCE, 0},
+{ 98, 1075081821u, 508056696u, 1103793878u, 776520138u, 1079295536u, 2972109436u, 0, SINH_TOLERANCE, 0},
+{ 99, 1080890481u, 4064962760u, 1077424413u, 819766631u, 1423488425u, 3317334315u, 0, SINH_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 1075900006u, 836207848u, 0, SINH_TOLERANCE, 0},
+{ 101, 1076003603u, 2514398118u, 1076579751u, 870169764u, 1085567394u, 3935623416u, 0, SINH_TOLERANCE, 0},
+{ 102, 3227977024u, 1190259653u, 1069112254u, 3417249840u, 3497647119u, 1074619959u, 0, SINH_TOLERANCE, 0},
+{ 103, 3214634603u, 3467757357u, 3215075200u, 2168175352u, 3214634818u, 3566853144u, 0, SINH_TOLERANCE, 0},
+{ 104, 3226011647u, 1508888184u, 1060430241u, 3524949092u, 3294802675u, 4152444040u, 0, SINH_TOLERANCE, 0},
+{ 105, 3215238675u, 166402802u, 3237198975u, 3572369260u, 3215239041u, 3873229460u, 0, SINH_TOLERANCE, 0},
+{ 106, 1075575366u, 2441536203u, 3202753937u, 3658194573u, 1082198547u, 1827858198u, 0, SINH_TOLERANCE, 0},
+{ 107, 1070781516u, 2479742828u, 1062342831u, 4214154303u, 1070799395u, 3712910548u, 0, SINH_TOLERANCE, 0},
+{ 108, 1076105338u, 426896765u, 1066474375u, 2201754442u, 1086731957u, 3444804028u, 0, SINH_TOLERANCE, 0},
+{ 109, 3214503389u, 2055773734u, 3239267288u, 291396537u, 3214503560u, 3311868033u, 0, SINH_TOLERANCE, 0},
+{ 110, 3224385121u, 874125203u, 3210508124u, 4091098764u, 3243570638u, 529374880u, 0, SINH_TOLERANCE, 0},
+{ 111, 1072007482u, 120488169u, 3241241441u, 1985269424u, 1072116464u, 1747805192u, 0, SINH_TOLERANCE, 0},
+{ 112, 3218073746u, 2243036871u, 3243941101u, 740033495u, 3218087608u, 785163442u, 0, SINH_TOLERANCE, 0},
+{ 113, 3218862090u, 1176656356u, 1074261978u, 3588756231u, 3218920795u, 1452796058u, 0, SINH_TOLERANCE, 0},
+{ 114, 3228699543u, 3037249392u, 1061635587u, 1173102190u, 3655813503u, 1211293113u, 0, SINH_TOLERANCE, 0},
+{ 115, 3224626669u, 2882725208u, 1071440059u, 69225090u, 3249151542u, 2351994968u, 0, SINH_TOLERANCE, 0},
+{ 116, 3218954930u, 272319256u, 1072073912u, 2493997123u, 3219023093u, 1135310123u, 0, SINH_TOLERANCE, 0},
+{ 117, 1070303098u, 188610379u, 3232757923u, 2209647371u, 1070317039u, 223028218u, 0, SINH_TOLERANCE, 0},
+{ 118, 3225224181u, 1990439193u, 1078073146u, 622849962u, 3262975180u, 3932839728u, 0, SINH_TOLERANCE, 0},
+{ 119, 1069718653u, 756052458u, 1081649113u, 2247475162u, 1069722955u, 1882814908u, 0, SINH_TOLERANCE, 0},
+{ 120, 1071060248u, 3878055211u, 3222407050u, 2979438623u, 1071093258u, 904197307u, 0, SINH_TOLERANCE, 0},
+{ 121, 3214165365u, 2676398686u, 1105124431u, 3631096636u, 3214165452u, 1700703451u, 0, SINH_TOLERANCE, 0},
+{ 122, 1071370846u, 1697791764u, 3198136112u, 2299842819u, 1071428819u, 1170196391u, 0, SINH_TOLERANCE, 0},
+{ 123, 1074939040u, 1931502677u, 3215264397u, 3016456382u, 1078464451u, 621896109u, 0, SINH_TOLERANCE, 0},
+{ 124, 1073302002u, 343404215u, 1061072607u, 4266232536u, 1073912684u, 1810041008u, 0, SINH_TOLERANCE, 0},
+{ 125, 3225502196u, 4140316002u, 1082896196u, 868256971u, 3271279372u, 3427688141u, 0, SINH_TOLERANCE, 0},
+{ 126, 1074374234u, 1864139509u, 3187675097u, 3084482407u, 1076405552u, 679411243u, 0, SINH_TOLERANCE, 0},
+{ 127, 3220191323u, 2427162817u, 3234748208u, 2715105792u, 3220382988u, 56164501u, 0, SINH_TOLERANCE, 0},
+{ 128, 1070891968u, 3943389284u, 1046724025u, 3626825684u, 1070915110u, 2070530661u, 0, SINH_TOLERANCE, 0},
+{ 129, 1067443098u, 967350972u, 1093012318u, 448002663u, 1067443436u, 161226759u, 0, SINH_TOLERANCE, 0},
+{ 130, 3228777187u, 105058217u, 1069733884u, 171786224u, 3684540794u, 2944133190u, 0, SINH_TOLERANCE, 0},
+{ 131, 3213731756u, 2863482262u, 3204997271u, 877784425u, 3213731824u, 2498719785u, 0, SINH_TOLERANCE, 0},
+{ 132, 3216260801u, 2801782962u, 3213604117u, 762347195u, 3216262185u, 215087844u, 0, SINH_TOLERANCE, 0},
+{ 133, 3224049543u, 2317950339u, 3246333414u, 2135700283u, 3239530127u, 699524600u, 0, SINH_TOLERANCE, 0},
+{ 134, 1069099309u, 4171919805u, 1082858682u, 2180920863u, 1069101966u, 54602163u, 0, SINH_TOLERANCE, 0},
+{ 135, 3221197660u, 1918836931u, 1083603224u, 3137821660u, 3222026761u, 3781661365u, 0, SINH_TOLERANCE, 0},
+{ 136, 1081882778u, 3456203663u, 3235600523u, 2335688936u, 1754633057u, 4057860990u, 0, SINH_TOLERANCE, 0},
+{ 137, 1066396570u, 4170235262u, 1051824459u, 521583737u, 1066396655u, 2875795819u, 0, SINH_TOLERANCE, 0},
+{ 138, 1075056847u, 1296623194u, 3250673860u, 2442872540u, 1079171997u, 1498836646u, 0, SINH_TOLERANCE, 0},
+{ 139, 1071121461u, 289979405u, 1049514449u, 3865737145u, 1071158661u, 3492336834u, 0, SINH_TOLERANCE, 0},
+{ 140, 1074250368u, 3699090239u, 1054539840u, 3259249360u, 1076064424u, 3480543151u, 0, SINH_TOLERANCE, 0},
+{ 141, 1079640884u, 1619819023u, 1045993352u, 1022642459u, 1229016129u, 1444182022u, 0, SINH_TOLERANCE, 0},
+{ 142, 1075141548u, 19455098u, 3229182089u, 2096003654u, 1079643410u, 3425620460u, 0, SINH_TOLERANCE, 0},
+{ 143, 1074200784u, 3803689997u, 1071630912u, 2263729518u, 1075948820u, 2127529538u, 0, SINH_TOLERANCE, 0},
+{ 144, 1080385741u, 2816837387u, 1063422305u, 2597606398u, 1330293545u, 1095829056u, 0, SINH_TOLERANCE, 0},
+{ 145, 1072245897u, 3680967506u, 1040201163u, 179224723u, 1072421412u, 1506861173u, 0, SINH_TOLERANCE, 0},
+{ 146, 3213795591u, 978126928u, 1101553990u, 4047893399u, 3213795666u, 245795167u, 0, SINH_TOLERANCE, 0},
+{ 147, 3221273469u, 4059818629u, 1042678728u, 3640293589u, 3222267219u, 1979827719u, 0, SINH_TOLERANCE, 0},
+{ 148, 3228541096u, 3383497159u, 1070002807u, 1527313008u, 3601881758u, 4173296238u, 0, SINH_TOLERANCE, 0},
+{ 149, 3216339167u, 2599946514u, 1104170406u, 2738675352u, 3216340810u, 4115543106u, 0, SINH_TOLERANCE, 0},
+{ 150, 1081115375u, 3616571377u, 1060859316u, 1130603218u, 1471256027u, 3187069287u, 0, SINH_TOLERANCE, 0},
+{ 151, 1073931644u, 3859211180u, 1067940450u, 1744531824u, 1075120505u, 3725496242u, 0, SINH_TOLERANCE, 0},
+{ 152, 1065900012u, 1958025850u, 3236511256u, 2472176453u, 1065900050u, 102691228u, 0, SINH_TOLERANCE, 0},
+{ 153, 3223669905u, 182132862u, 3250520938u, 3924356991u, 3235157931u, 2605012526u, 0, SINH_TOLERANCE, 0},
+{ 154, 3224210428u, 35632886u, 3209806504u, 1453402523u, 3241402944u, 1099360388u, 0, SINH_TOLERANCE, 0},
+{ 155, 1076182070u, 743225214u, 3202890678u, 142917400u, 1087631855u, 3778664301u, 0, SINH_TOLERANCE, 0},
+{ 156, 1075442096u, 1472665012u, 3203138231u, 256588219u, 1081376581u, 1981675785u, 0, SINH_TOLERANCE, 0},
+{ 157, 1079253522u, 1062927000u, 1061134072u, 931677439u, 1193281892u, 3538812810u, 0, SINH_TOLERANCE, 0},
+{ 158, 1069912068u, 2320910576u, 1055663370u, 288059864u, 1069918761u, 2694094192u, 0, SINH_TOLERANCE, 0},
+{ 159, 1075812365u, 1448349062u, 3199478070u, 3454027134u, 1083509354u, 1611967541u, 0, SINH_TOLERANCE, 0},
+{ 160, 3224875886u, 4215445172u, 3196654963u, 2231888973u, 3254930152u, 159529183u, 0, SINH_TOLERANCE, 0},
+{ 161, 3227757863u, 40413554u, 3232578253u, 983832844u, 3457227287u, 1304081657u, 0, SINH_TOLERANCE, 0},
+{ 162, 3221624382u, 3995725873u, 1050082319u, 777231627u, 3223289886u, 3165308644u, 0, SINH_TOLERANCE, 0},
+{ 163, 1066152450u, 672789828u, 3253385962u, 2982787335u, 1066152508u, 2270849861u, 0, SINH_TOLERANCE, 0},
+{ 164, 1072585179u, 2075971825u, 1070166500u, 4034633931u, 1072795180u, 625760053u, 0, SINH_TOLERANCE, 0},
+{ 165, 3218434785u, 1018222907u, 3244621407u, 3090050495u, 3218461130u, 3184325614u, 0, SINH_TOLERANCE, 0},
+{ 166, 1071875189u, 937732557u, 3200798890u, 2557898276u, 1071955981u, 2106364550u, 0, SINH_TOLERANCE, 0},
+{ 167, 1075196588u, 130346162u, 3223590310u, 275568693u, 1080037789u, 4060643218u, 0, SINH_TOLERANCE, 0},
+{ 168, 1065967541u, 3807416441u, 1075961161u, 3706820266u, 1065967584u, 1846334347u, 0, SINH_TOLERANCE, 0},
+{ 169, 3219244733u, 1710131411u, 1078123323u, 1900790503u, 3219305582u, 1655460974u, 0, SINH_TOLERANCE, 0},
+{ 170, 3226236449u, 3420420033u, 3210844787u, 588423066u, 3305204393u, 774296256u, 0, SINH_TOLERANCE, 0},
+{ 171, 1067509906u, 1160162008u, 3246307879u, 4265764460u, 1067510107u, 3011258957u, 0, SINH_TOLERANCE, 0},
+{ 172, 1080523338u, 366653268u, 3188814424u, 466059202u, 1355764484u, 760636581u, 0, SINH_TOLERANCE, 0},
+{ 173, 3222433435u, 1325936170u, 3221436876u, 680097612u, 3226014103u, 451044771u, 0, SINH_TOLERANCE, 0},
+{ 174, 3225711052u, 1827735934u, 3200554324u, 2875599271u, 3280980440u, 2135776268u, 0, SINH_TOLERANCE, 0},
+{ 175, 3213050498u, 3117037091u, 3239246636u, 15838845u, 3213050517u, 1419941520u, 0, SINH_TOLERANCE, 0},
+{ 176, 1067702644u, 749718883u, 3223587064u, 1523766569u, 1067702970u, 259259635u, 0, SINH_TOLERANCE, 0},
+{ 177, 1066853747u, 1966536294u, 3250158026u, 699164258u, 1066853872u, 2121245996u, 0, SINH_TOLERANCE, 0},
+{ 178, 1079174067u, 3759049394u, 1106085272u, 1183789499u, 1185944512u, 3807740687u, 0, SINH_TOLERANCE, 0},
+{ 179, 1074910167u, 1970107747u, 1095245453u, 2308233883u, 1078299954u, 1401061375u, 0, SINH_TOLERANCE, 0},
+{ 180, 1076367836u, 1491017852u, 1041444355u, 1723375725u, 1089770148u, 2037337769u, 0, SINH_TOLERANCE, 0},
+{ 181, 3219775798u, 1141349287u, 1097465301u, 3403438584u, 3219966827u, 1978333015u, 0, SINH_TOLERANCE, 0},
+{ 182, 3224280452u, 1711085243u, 3250239076u, 1377484108u, 3242260066u, 2040662695u, 0, SINH_TOLERANCE, 0},
+{ 183, 1079510651u, 2880275004u, 1084039594u, 1611394950u, 1216939131u, 2867297031u, 0, SINH_TOLERANCE, 0},
+{ 184, 3224784251u, 2626629370u, 1063771493u, 1499080813u, 3252818758u, 3654476853u, 0, SINH_TOLERANCE, 0},
+{ 185, 1068862751u, 3936262414u, 1103919063u, 3175668759u, 1068864420u, 3355343590u, 0, SINH_TOLERANCE, 0},
+{ 186, 3217418903u, 1270950554u, 3194616071u, 3680565379u, 3217425931u, 2626956574u, 0, SINH_TOLERANCE, 0},
+{ 187, 3217585407u, 1066985223u, 3221613219u, 4089383168u, 3217595177u, 2758529977u, 0, SINH_TOLERANCE, 0},
+{ 188, 3220204567u, 4017329311u, 3208334452u, 1667591498u, 3220403741u, 3773555337u, 0, SINH_TOLERANCE, 0},
+{ 189, 1077678397u, 3154656624u, 1061894279u, 3886344038u, 1114014484u, 1143078455u, 0, SINH_TOLERANCE, 0},
+{ 190, 1068478737u, 977586119u, 3209762784u, 953839852u, 1068480063u, 3125582187u, 0, SINH_TOLERANCE, 0},
+{ 191, 1081896575u, 143071571u, 3206165386u, 913097445u, 1759744561u, 1725664653u, 0, SINH_TOLERANCE, 0},
+{ 192, 3213634128u, 1371169579u, 1057079837u, 2594818628u, 3213634186u, 2168291476u, 0, SINH_TOLERANCE, 0},
+{ 193, 3228724664u, 2259342224u, 3217432469u, 1824221478u, 3665098139u, 1347867273u, 0, SINH_TOLERANCE, 0},
+{ 194, 3227960407u, 1576604497u, 1079368611u, 185078728u, 3494590082u, 3370329867u, 0, SINH_TOLERANCE, 0},
+{ 195, 3221679427u, 444800035u, 3243343143u, 1734989302u, 3223421390u, 942989703u, 0, SINH_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1072964584u, 1354781505u, 0, SINH_TOLERANCE, 0},
+{ 197, 3225258784u, 1941318385u, 1045807374u, 792193370u, 3263733935u, 3103118402u, 0, SINH_TOLERANCE, 0},
+{ 198, 3225716754u, 1299392207u, 3212131720u, 3205732280u, 3281185351u, 3451158556u, 0, SINH_TOLERANCE, 0},
+{ 199, 1079824436u, 3035093505u, 1052187689u, 3287702190u, 1245928697u, 3659026689u, 0, SINH_TOLERANCE, 0},
+{ 200, 3227801892u, 2160225215u, 1102624859u, 836655570u, 3465336758u, 1753278920u, 0, SINH_TOLERANCE, 0},
+{ 201, 1079946410u, 3360816360u, 3246176356u, 172860634u, 1257254087u, 595783054u, 0, SINH_TOLERANCE, 0},
+{ 202, 1073092940u, 146831910u, 1051558014u, 2340722078u, 1073599372u, 3905963492u, 0, SINH_TOLERANCE, 0},
+{ 203, 3224124895u, 1603798153u, 3207725532u, 1099413093u, 3240408342u, 2401373921u, 0, SINH_TOLERANCE, 0},
+{ 204, 3227804010u, 2429340443u, 3190303581u, 3223770005u, 3465719079u, 1901620640u, 0, SINH_TOLERANCE, 0},
+{ 205, 1073785807u, 955542166u, 3230415151u, 275583938u, 1074767130u, 782981864u, 0, SINH_TOLERANCE, 0},
+{ 206, 1078291818u, 513397822u, 1090646554u, 2089321329u, 1136418636u, 351397573u, 0, SINH_TOLERANCE, 0},
+{ 207, 3214141396u, 2782073372u, 1046063872u, 4023829068u, 3214141478u, 3470574014u, 0, SINH_TOLERANCE, 0},
+{ 208, 1079690454u, 3242223094u, 3194111199u, 4264674108u, 1233536710u, 346227329u, 0, SINH_TOLERANCE, 0},
+{ 209, 3225927909u, 3506346169u, 1047020885u, 1742757458u, 3290905540u, 2781434878u, 0, SINH_TOLERANCE, 0},
+{ 210, 3214684573u, 1265459564u, 3193450280u, 3650514880u, 3214684806u, 3227027441u, 0, SINH_TOLERANCE, 0},
+{ 211, 1075464434u, 1525260440u, 3235452527u, 2612331392u, 1081496066u, 4039055639u, 0, SINH_TOLERANCE, 0},
+{ 212, 3227697400u, 1263613754u, 3219096387u, 635677201u, 3446002556u, 459760033u, 0, SINH_TOLERANCE, 0},
+{ 213, 3217806423u, 4140947288u, 3200792376u, 2013265346u, 3217820826u, 3694261486u, 0, SINH_TOLERANCE, 0},
+{ 214, 3227954296u, 1912759945u, 3237045253u, 1351396825u, 3493449759u, 1464931509u, 0, SINH_TOLERANCE, 0},
+{ 215, 3228282218u, 1001433078u, 3206926643u, 2741676659u, 3553998392u, 3156202362u, 0, SINH_TOLERANCE, 0},
+{ 216, 1075680726u, 1088945233u, 1085095743u, 3986114865u, 1082750958u, 1712535816u, 0, SINH_TOLERANCE, 0},
+{ 217, 3219928361u, 831239754u, 1099828675u, 3071308141u, 3220177067u, 3013293181u, 0, SINH_TOLERANCE, 0},
+{ 218, 3222688769u, 3473592372u, 1102759382u, 1309576357u, 3227556285u, 86503062u, 0, SINH_TOLERANCE, 0},
+{ 219, 3229166610u, 2042340367u, 1091945628u, 2062772374u, 3828389411u, 210474498u, 0, SINH_TOLERANCE, 0},
+{ 220, 3214688631u, 1840632537u, 1096533424u, 807510337u, 3214688866u, 1833588338u, 0, SINH_TOLERANCE, 0},
+{ 221, 3224111690u, 144814872u, 3212698915u, 2282965697u, 3240278280u, 1680573330u, 0, SINH_TOLERANCE, 0},
+{ 222, 1073333582u, 2552499583u, 3229111426u, 1470130815u, 1073953220u, 2448530468u, 0, SINH_TOLERANCE, 0},
+{ 223, 3227364425u, 2858583811u, 1089760910u, 6360994u, 3398621475u, 697276436u, 0, SINH_TOLERANCE, 0},
+{ 224, 3215042145u, 1614537194u, 1075198900u, 4088705365u, 3215042374u, 2084690356u, 0, SINH_TOLERANCE, 0},
+{ 225, 3228918974u, 3545570051u, 1065221325u, 1629217700u, 3736891221u, 229769802u, 0, SINH_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 1072957268u, 788993454u, 0, SINH_TOLERANCE, 0},
+{ 227, 3215677054u, 2406734491u, 1042055360u, 89226663u, 3215677905u, 4217154675u, 0, SINH_TOLERANCE, 0},
+{ 228, 3214625449u, 1618759139u, 3194723421u, 3888234802u, 3214625661u, 565975092u, 0, SINH_TOLERANCE, 0},
+{ 229, 1068988736u, 3590035633u, 3212424262u, 2892456615u, 1068990893u, 1943451309u, 0, SINH_TOLERANCE, 0},
+{ 230, 3213011732u, 2431246964u, 3241512456u, 183850734u, 3213011749u, 2185322308u, 0, SINH_TOLERANCE, 0},
+{ 231, 1076918189u, 3088319870u, 3211544311u, 862225364u, 1096486112u, 1720101545u, 0, SINH_TOLERANCE, 0},
+{ 232, 3224808904u, 3495352775u, 1058576726u, 596957268u, 3253359765u, 1924270502u, 0, SINH_TOLERANCE, 0},
+{ 233, 1066476292u, 1839214511u, 3205004060u, 1923240983u, 1066476344u, 3656567561u, 0, SINH_TOLERANCE, 0},
+{ 234, 1069608200u, 739619702u, 3223356436u, 2689885273u, 1069611435u, 2976591864u, 0, SINH_TOLERANCE, 0},
+{ 235, 3216053611u, 2143376228u, 1098306332u, 3760236188u, 3216054442u, 2867204403u, 0, SINH_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 1077135219u, 2370927173u, 0, SINH_TOLERANCE, 0},
+{ 237, 3219408869u, 2493598049u, 3194927008u, 1689107592u, 3219499652u, 2900639705u, 0, SINH_TOLERANCE, 0},
+{ 238, 3213058631u, 1578976988u, 1066368383u, 2117279163u, 3213058650u, 1436428687u, 0, SINH_TOLERANCE, 0},
+{ 239, 3221939535u, 3425290087u, 1098487295u, 1263412017u, 3224162222u, 1577636136u, 0, SINH_TOLERANCE, 0},
+{ 240, 3217869948u, 3635396812u, 1070999426u, 3965655689u, 3217885912u, 1810535642u, 0, SINH_TOLERANCE, 0},
+{ 241, 1069633530u, 2183973116u, 1101098363u, 1118613350u, 1069636992u, 3963026814u, 0, SINH_TOLERANCE, 0},
+{ 242, 3221946089u, 199516350u, 1078368488u, 164621458u, 3224186028u, 831736535u, 0, SINH_TOLERANCE, 0},
+{ 243, 3212871842u, 3570940805u, 3230316437u, 3596080877u, 3212871854u, 2583868315u, 0, SINH_TOLERANCE, 0},
+{ 244, 3217646749u, 980880313u, 1079833442u, 884465057u, 3217657686u, 1885631914u, 0, SINH_TOLERANCE, 0},
+{ 245, 1080054180u, 2558179220u, 1052873711u, 1233598120u, 1269060948u, 2524660391u, 0, SINH_TOLERANCE, 0},
+{ 246, 1067038165u, 1909994277u, 1085015978u, 2991527452u, 1067038342u, 2067589378u, 0, SINH_TOLERANCE, 0},
+{ 247, 1070292444u, 1680290941u, 1074309900u, 2943870846u, 1070306139u, 2207543847u, 0, SINH_TOLERANCE, 0},
+{ 248, 1069981892u, 1451927357u, 3228615456u, 1502585517u, 1069989628u, 2151766963u, 0, SINH_TOLERANCE, 0},
+{ 249, 3224677615u, 751136990u, 3230392165u, 3493275472u, 3250350519u, 215829603u, 0, SINH_TOLERANCE, 0},
+{ 250, 1079491599u, 1209623292u, 3238056647u, 979495322u, 1215252451u, 1345426533u, 0, SINH_TOLERANCE, 0},
+{ 251, 3228404200u, 1717672108u, 1048120593u, 531240316u, 3576583348u, 3462906838u, 0, SINH_TOLERANCE, 0},
+{ 252, 1068854987u, 3548721654u, 1086112947u, 3391817224u, 1068856629u, 1346987568u, 0, SINH_TOLERANCE, 0},
+{ 253, 1074691123u, 2758195125u, 1100880260u, 2028440924u, 1077318695u, 1850026137u, 0, SINH_TOLERANCE, 0},
+{ 254, 1076883861u, 2750123373u, 3232200256u, 1086294931u, 1095793270u, 788833141u, 0, SINH_TOLERANCE, 0},
+{ 255, 1065978768u, 2986160931u, 1076097908u, 2540046258u, 1065978812u, 456035946u, 0, SINH_TOLERANCE, 0},
+{ 256, 3224990842u, 451471221u, 1064816262u, 4187644495u, 3257560213u, 655095513u, 0, SINH_TOLERANCE, 0},
+{ 257, 1080585860u, 2439500162u, 1065280276u, 1979490284u, 1367314315u, 4075308906u, 0, SINH_TOLERANCE, 0},
+{ 258, 1065581656u, 2283342035u, 1078398157u, 1345997553u, 1065581675u, 3431319782u, 0, SINH_TOLERANCE, 0},
+{ 259, 3219540804u, 179066662u, 1103272172u, 1217337578u, 3219661899u, 793514991u, 0, SINH_TOLERANCE, 0},
+{ 260, 3218902409u, 3779303391u, 3210023352u, 3115946280u, 3218965105u, 3754433598u, 0, SINH_TOLERANCE, 0},
+{ 261, 3213961394u, 286247089u, 1085153597u, 713645369u, 3213961446u, 2979021742u, 0, SINH_TOLERANCE, 0},
+{ 262, 1077941860u, 1468283899u, 1042831668u, 2022736418u, 1120232171u, 2888650454u, 0, SINH_TOLERANCE, 0},
+{ 263, 1076847649u, 3305564080u, 1065483445u, 482392433u, 1095303241u, 3604886057u, 0, SINH_TOLERANCE, 0},
+{ 264, 3216375871u, 2256346551u, 3222430705u, 2071674991u, 3216377647u, 352947026u, 0, SINH_TOLERANCE, 0},
+{ 265, 3216607607u, 2295269094u, 1084451053u, 2773103941u, 3216610384u, 2228424851u, 0, SINH_TOLERANCE, 0},
+{ 266, 1075028218u, 1482721827u, 1092243422u, 3125409590u, 1079044124u, 678493382u, 0, SINH_TOLERANCE, 0},
+{ 267, 3221065973u, 1381740563u, 1071545057u, 2918235653u, 3221799264u, 4207176249u, 0, SINH_TOLERANCE, 0},
+{ 268, 3226133060u, 1105857967u, 3241990046u, 2703723225u, 3300377169u, 2850491479u, 0, SINH_TOLERANCE, 0},
+{ 269, 1066084243u, 174689677u, 1079333374u, 3947057014u, 1066084295u, 792069421u, 0, SINH_TOLERANCE, 0},
+{ 270, 1077878947u, 2023082423u, 3242081486u, 1169047927u, 1118700325u, 3426525989u, 0, SINH_TOLERANCE, 0},
+{ 271, 1070817355u, 3742487766u, 1043425732u, 194972788u, 1070836843u, 2697250326u, 0, SINH_TOLERANCE, 0},
+{ 272, 3220083283u, 2136071361u, 3211529757u, 993675115u, 3220289585u, 3678611411u, 0, SINH_TOLERANCE, 0},
+{ 273, 3219954837u, 210772141u, 3241441539u, 580731413u, 3220195874u, 2430117404u, 0, SINH_TOLERANCE, 0},
+{ 274, 1078111773u, 1751560711u, 1074522705u, 180987057u, 1128126630u, 2518765659u, 0, SINH_TOLERANCE, 0},
+{ 275, 1071997471u, 2552236599u, 1088658621u, 2112468655u, 1072104117u, 1550733082u, 0, SINH_TOLERANCE, 0},
+{ 276, 3213407865u, 1578223762u, 3224596567u, 2456166162u, 3213407904u, 2884085031u, 0, SINH_TOLERANCE, 0},
+{ 277, 1070041301u, 2110924310u, 1086207177u, 3161208323u, 1070050006u, 1195631688u, 0, SINH_TOLERANCE, 0},
+{ 278, 3223474786u, 2352173188u, 1079361728u, 4070222179u, 3232929497u, 462910145u, 0, SINH_TOLERANCE, 0},
+{ 279, 1080041384u, 2481562701u, 1090937016u, 3809489716u, 1266749058u, 404634930u, 0, SINH_TOLERANCE, 0},
+{ 280, 3215877019u, 330905705u, 1086260896u, 90264431u, 3215878188u, 2685456633u, 0, SINH_TOLERANCE, 0},
+{ 281, 1065895785u, 4162008079u, 3194387916u, 759522153u, 1065895823u, 1027681385u, 0, SINH_TOLERANCE, 0},
+{ 282, 1075772157u, 1839697482u, 3216442625u, 2211508949u, 1083313275u, 2003409679u, 0, SINH_TOLERANCE, 0},
+{ 283, 3227787115u, 3736863454u, 1063475914u, 3150741666u, 3462594462u, 1556023783u, 0, SINH_TOLERANCE, 0},
+{ 284, 1070223067u, 4200269406u, 3236646101u, 1061812176u, 1070235232u, 1741891654u, 0, SINH_TOLERANCE, 0},
+{ 285, 1074975099u, 106027290u, 3234978297u, 2245237549u, 1078697030u, 3526667572u, 0, SINH_TOLERANCE, 0},
+{ 286, 3228109966u, 2132131375u, 3250483427u, 3449276437u, 3522246034u, 2754991195u, 0, SINH_TOLERANCE, 0},
+{ 287, 1077854442u, 2334440944u, 1105423490u, 4004336184u, 1118086726u, 1452344798u, 0, SINH_TOLERANCE, 0},
+{ 288, 3220869856u, 4090088208u, 1042030013u, 3898658299u, 3221506976u, 2943359694u, 0, SINH_TOLERANCE, 0},
+{ 289, 3217345248u, 2272831437u, 3253082595u, 2639188641u, 3217351249u, 937504904u, 0, SINH_TOLERANCE, 0},
+{ 290, 1069446748u, 1856594168u, 3189515294u, 4101853676u, 1069451463u, 207745592u, 0, SINH_TOLERANCE, 0},
+{ 291, 1073915260u, 2211699255u, 3195060344u, 3865018604u, 1075077315u, 1122754602u, 0, SINH_TOLERANCE, 0},
+{ 292, 3227038370u, 996259334u, 3241496889u, 3782673116u, 3368486895u, 1357097126u, 0, SINH_TOLERANCE, 0},
+{ 293, 1080256379u, 3840380763u, 1048674041u, 550040067u, 1306461489u, 928374556u, 0, SINH_TOLERANCE, 0},
+{ 294, 3229399497u, 95874100u, 3237232828u, 2645647822u, 3914393491u, 3490239415u, 0, SINH_TOLERANCE, 0},
+{ 295, 1065685736u, 3441419500u, 3252367038u, 876710419u, 1065685761u, 747186119u, 0, SINH_TOLERANCE, 0},
+{ 296, 3226010640u, 2560836004u, 3199616543u, 1180840586u, 3294765597u, 3335028675u, 0, SINH_TOLERANCE, 0},
+{ 297, 3221602966u, 2218230392u, 3227485787u, 3947214579u, 3223206580u, 596607458u, 0, SINH_TOLERANCE, 0},
+{ 298, 1075345350u, 1447312532u, 1081476588u, 780366847u, 1080842179u, 1919408192u, 0, SINH_TOLERANCE, 0},
+{ 299, 1073618219u, 2842113832u, 3216156731u, 225159029u, 1074374943u, 330409901u, 0, SINH_TOLERANCE, 0},
+{ 300, 1079242825u, 1601981129u, 3234628869u, 2236538344u, 1192276494u, 2364090570u, 0, SINH_TOLERANCE, 0},
+{ 301, 1076784916u, 2194185737u, 3242362684u, 87913366u, 1094646719u, 2239128626u, 0, SINH_TOLERANCE, 0},
+{ 302, 3215861096u, 1346862963u, 1077836259u, 3604666660u, 3215862238u, 131026731u, 0, SINH_TOLERANCE, 0},
+{ 303, 3218547435u, 3115209742u, 1099332326u, 1325101950u, 3218580678u, 1073637587u, 0, SINH_TOLERANCE, 0},
+{ 304, 3221400314u, 3889223100u, 1053247613u, 3371396923u, 3222564618u, 3686805317u, 0, SINH_TOLERANCE, 0},
+{ 305, 3220477868u, 4163120793u, 1075022670u, 1387631215u, 3220882547u, 4294098022u, 0, SINH_TOLERANCE, 0},
+{ 306, 3218064691u, 1532426189u, 1063168268u, 3397022615u, 3218082939u, 3460824787u, 0, SINH_TOLERANCE, 0},
+{ 307, 3216761961u, 89324166u, 1079206060u, 3429424710u, 3216765579u, 3222365633u, 0, SINH_TOLERANCE, 0},
+{ 308, 3214345198u, 747591401u, 1072238381u, 2803213904u, 3214345325u, 733695999u, 0, SINH_TOLERANCE, 0},
+{ 309, 1078530868u, 271904221u, 1044258318u, 1858545114u, 1147431148u, 2228394364u, 0, SINH_TOLERANCE, 0},
+{ 310, 3222826034u, 314958082u, 3249912496u, 2966213175u, 3228304941u, 2781809662u, 0, SINH_TOLERANCE, 0},
+{ 311, 3215005206u, 3119528953u, 3217179014u, 2908718240u, 3215005414u, 2487197027u, 0, SINH_TOLERANCE, 0},
+{ 312, 3226738936u, 2018361566u, 1100926600u, 3985805054u, 3340885170u, 2660715245u, 0, SINH_TOLERANCE, 0},
+{ 313, 1073278308u, 409584884u, 3239758947u, 755795129u, 1073882999u, 2403224777u, 0, SINH_TOLERANCE, 0},
+{ 314, 1074723870u, 1819156379u, 3251342302u, 2982669005u, 1077414156u, 206759069u, 0, SINH_TOLERANCE, 0},
+{ 315, 1080591913u, 2080534280u, 3188254060u, 449171797u, 1368425681u, 3068381489u, 0, SINH_TOLERANCE, 0},
+{ 316, 1079179684u, 168744837u, 3214950009u, 1322217822u, 1186375305u, 280204842u, 0, SINH_TOLERANCE, 0},
+{ 317, 3229061076u, 3250487255u, 1062120700u, 1876195180u, 3789387354u, 3427323764u, 0, SINH_TOLERANCE, 0},
+{ 318, 3223197752u, 1336400247u, 1098057903u, 3314079581u, 3230461251u, 2522157667u, 0, SINH_TOLERANCE, 0},
+{ 319, 3216261732u, 265025555u, 1063854282u, 3779482256u, 3216263118u, 1599530040u, 0, SINH_TOLERANCE, 0},
+{ 320, 1072543381u, 887044257u, 1054789618u, 2732056261u, 1072764380u, 3999798978u, 0, SINH_TOLERANCE, 0},
+{ 321, 1067932534u, 4027115185u, 3191764868u, 2940199511u, 1067933065u, 4060882640u, 0, SINH_TOLERANCE, 0},
+{ 322, 3216131643u, 2875684421u, 3227459837u, 2251967570u, 3216132661u, 231686101u, 0, SINH_TOLERANCE, 0},
+{ 323, 1071633020u, 284173546u, 3238823679u, 3557800647u, 1071682346u, 3259838679u, 0, SINH_TOLERANCE, 0},
+{ 324, 1080487040u, 3147771266u, 3220110464u, 2933364246u, 1348984230u, 3038347863u, 0, SINH_TOLERANCE, 0},
+{ 325, 1071144616u, 3366183281u, 3234870843u, 537442654u, 1071183491u, 3423748941u, 0, SINH_TOLERANCE, 0},
+{ 326, 3227341572u, 2529029548u, 3249882819u, 3781513577u, 3396513810u, 3889526767u, 0, SINH_TOLERANCE, 0},
+{ 327, 3219727810u, 1080845539u, 3206760016u, 911778687u, 3219902760u, 138373121u, 0, SINH_TOLERANCE, 0},
+{ 328, 3213971132u, 469586759u, 1091830022u, 3080528840u, 3213971186u, 495533731u, 0, SINH_TOLERANCE, 0},
+{ 329, 1075006224u, 2863108169u, 3225605506u, 2508274250u, 1078925189u, 2503084824u, 0, SINH_TOLERANCE, 0},
+{ 330, 3218167016u, 4080017377u, 3206492941u, 1470284690u, 3218180951u, 780495425u, 0, SINH_TOLERANCE, 0},
+{ 331, 3217606150u, 3867917386u, 1102054928u, 3504746045u, 3217616306u, 230129894u, 0, SINH_TOLERANCE, 0},
+{ 332, 1070813735u, 2962134101u, 3244741577u, 3390537350u, 1070833056u, 3194305917u, 0, SINH_TOLERANCE, 0},
+{ 333, 1077716053u, 1702237980u, 1071598971u, 1102587474u, 1114898104u, 2058865259u, 0, SINH_TOLERANCE, 0},
+{ 334, 3216601606u, 2180218657u, 3211592260u, 1206527853u, 3216604353u, 3078689379u, 0, SINH_TOLERANCE, 0},
+{ 335, 3215959112u, 394130786u, 3242511482u, 2437699868u, 3215960432u, 1415290187u, 0, SINH_TOLERANCE, 0},
+{ 336, 1066257155u, 849581558u, 3252006507u, 2008614943u, 1066257224u, 282221784u, 0, SINH_TOLERANCE, 0},
+{ 337, 3218528622u, 3128971673u, 3249137531u, 2773583059u, 3218560638u, 88939490u, 0, SINH_TOLERANCE, 0},
+{ 338, 1076641258u, 590727700u, 3248651761u, 2183878539u, 1092924806u, 51929635u, 0, SINH_TOLERANCE, 0},
+{ 339, 1080127109u, 820687580u, 3208143496u, 1402434664u, 1282555424u, 2229435922u, 0, SINH_TOLERANCE, 0},
+{ 340, 3229222163u, 1873709254u, 3245167989u, 44275991u, 3848835562u, 2238140986u, 0, SINH_TOLERANCE, 0},
+{ 341, 3213786001u, 1174874204u, 3208263730u, 2360372288u, 3213786075u, 153092394u, 0, SINH_TOLERANCE, 0},
+{ 342, 1081834580u, 937573440u, 3208953761u, 211240241u, 1736830458u, 1339532059u, 0, SINH_TOLERANCE, 0},
+{ 343, 3226771718u, 2469774991u, 1043117070u, 3380071805u, 3343942432u, 2866315288u, 0, SINH_TOLERANCE, 0},
+{ 344, 1069655378u, 442507560u, 3254252803u, 3257889649u, 1069659044u, 2321832567u, 0, SINH_TOLERANCE, 0},
+{ 345, 1071996248u, 1854921625u, 1049810168u, 2729627545u, 1072102611u, 224823680u, 0, SINH_TOLERANCE, 0},
+{ 346, 3229546805u, 4001809575u, 3240128649u, 278261523u, 3968809266u, 2670070781u, 0, SINH_TOLERANCE, 0},
+{ 347, 1077787510u, 1793907966u, 3238955714u, 398859249u, 1116585698u, 3075914843u, 0, SINH_TOLERANCE, 0},
+{ 348, 3216681187u, 2511916952u, 3219195283u, 1697158299u, 3216684347u, 1388274922u, 0, SINH_TOLERANCE, 0},
+{ 349, 1073131276u, 3230931724u, 3243897690u, 3508781585u, 1073681796u, 922114116u, 0, SINH_TOLERANCE, 0},
+{ 350, 1081827510u, 1674254897u, 1046547577u, 217148561u, 1734293969u, 3735031445u, 0, SINH_TOLERANCE, 0},
+{ 351, 3218603986u, 3275604304u, 3194840159u, 2991205850u, 3218641107u, 2637578362u, 0, SINH_TOLERANCE, 0},
+{ 352, 3214123743u, 3509997278u, 3248888030u, 3897986511u, 3214123822u, 2950940351u, 0, SINH_TOLERANCE, 0},
+{ 353, 1067105379u, 2156824613u, 1042295665u, 1239257646u, 1067105578u, 2500490561u, 0, SINH_TOLERANCE, 0},
+{ 354, 3219555541u, 1073153314u, 3250031627u, 2567234990u, 3219680399u, 691531294u, 0, SINH_TOLERANCE, 0},
+{ 355, 3213662084u, 4261696995u, 3197784432u, 323702024u, 3213662145u, 3701862471u, 0, SINH_TOLERANCE, 0},
+{ 356, 3226913781u, 4075177615u, 3202791065u, 1919006082u, 3356983595u, 316750843u, 0, SINH_TOLERANCE, 0},
+{ 357, 3225638525u, 386429966u, 1086504491u, 3698826164u, 3277573598u, 2126562020u, 0, SINH_TOLERANCE, 0},
+{ 358, 1075181462u, 1681986446u, 3194985869u, 3072950140u, 1079924210u, 784773996u, 0, SINH_TOLERANCE, 0},
+{ 359, 3220457661u, 3719038997u, 1055433962u, 3331415058u, 3220843486u, 2654529157u, 0, SINH_TOLERANCE, 0},
+{ 360, 1070186897u, 2420250111u, 3238002206u, 1928661079u, 1070198311u, 1487723955u, 0, SINH_TOLERANCE, 0},
+{ 361, 1075622754u, 3679866727u, 3227386672u, 1273835792u, 1082419811u, 742653643u, 0, SINH_TOLERANCE, 0},
+{ 362, 1065739986u, 2682092368u, 3234222284u, 1325425811u, 1065740013u, 4224425207u, 0, SINH_TOLERANCE, 0},
+{ 363, 1068895525u, 4175172697u, 3208346191u, 2130706153u, 1068897313u, 3265095977u, 0, SINH_TOLERANCE, 0},
+{ 364, 1078458136u, 1200784450u, 1083605096u, 1248595607u, 1144110494u, 3624009342u, 0, SINH_TOLERANCE, 0},
+{ 365, 3219133743u, 1897285171u, 3251296075u, 944966123u, 3219178679u, 1447338460u, 0, SINH_TOLERANCE, 0},
+{ 366, 3225642610u, 2270747330u, 3230692631u, 422503284u, 3277815552u, 3544140092u, 0, SINH_TOLERANCE, 0},
+{ 367, 1076780005u, 2857564741u, 1075647403u, 3308906709u, 1094572049u, 3220040017u, 0, SINH_TOLERANCE, 0},
+{ 368, 3216058010u, 1380066948u, 3232612906u, 2613634294u, 3216058851u, 1403158136u, 0, SINH_TOLERANCE, 0},
+{ 369, 1071230888u, 4022784584u, 1060483857u, 3264056381u, 1071276446u, 3720296609u, 0, SINH_TOLERANCE, 0},
+{ 370, 1066657500u, 1778509100u, 3213146285u, 2665833973u, 1066657582u, 2265604069u, 0, SINH_TOLERANCE, 0},
+{ 371, 3219873028u, 1859175955u, 1079949560u, 4258450607u, 3220099701u, 3035173045u, 0, SINH_TOLERANCE, 0},
+{ 372, 1067151756u, 4128020197u, 1076266146u, 4122840980u, 1067151972u, 1167410825u, 0, SINH_TOLERANCE, 0},
+{ 373, 3214154683u, 2454653987u, 3229487005u, 2977478685u, 3214154768u, 1150917103u, 0, SINH_TOLERANCE, 0},
+{ 374, 3229439235u, 1355181872u, 1095308770u, 436846481u, 3929070978u, 3622868306u, 0, SINH_TOLERANCE, 0},
+{ 375, 3227730934u, 2592856453u, 3247825559u, 3195234082u, 3452203538u, 3199167818u, 0, SINH_TOLERANCE, 0},
+{ 376, 3222118023u, 3554670043u, 1091621009u, 3321236467u, 3224650387u, 3339361833u, 0, SINH_TOLERANCE, 0},
+{ 377, 1072158561u, 1936670355u, 1095715713u, 2958468553u, 1072307177u, 2128853725u, 0, SINH_TOLERANCE, 0},
+{ 378, 3214311205u, 2960339502u, 1098808013u, 1044068983u, 3214311324u, 1253149122u, 0, SINH_TOLERANCE, 0},
+{ 379, 3215565553u, 4093388677u, 1095478112u, 1735930261u, 3215566256u, 371308307u, 0, SINH_TOLERANCE, 0},
+{ 380, 1078457390u, 1807398746u, 3195743135u, 4261616162u, 1144084329u, 2733988366u, 0, SINH_TOLERANCE, 0},
+{ 381, 3218731378u, 3250576797u, 1059002384u, 3043079652u, 3218778325u, 1763903275u, 0, SINH_TOLERANCE, 0},
+{ 382, 1072352837u, 666051428u, 3208765404u, 1912684117u, 1072565620u, 198637196u, 0, SINH_TOLERANCE, 0},
+{ 383, 1081467324u, 1949030179u, 1096388934u, 896459246u, 1601250663u, 4124280137u, 0, SINH_TOLERANCE, 0},
+{ 384, 1068980717u, 622499767u, 1066707637u, 1490260486u, 1068982840u, 857891073u, 0, SINH_TOLERANCE, 0},
+{ 385, 1081522669u, 1490616165u, 3251242436u, 795675736u, 1621632025u, 1772451300u, 0, SINH_TOLERANCE, 0},
+{ 386, 1075701016u, 3662877092u, 3234317146u, 3200513112u, 1082885282u, 2746304375u, 0, SINH_TOLERANCE, 0},
+{ 387, 1076748754u, 1356101968u, 3236536816u, 3062844611u, 1094157143u, 1389518646u, 0, SINH_TOLERANCE, 0},
+{ 388, 3220971216u, 2284484846u, 3219498359u, 3240896015u, 3221651609u, 3542669521u, 0, SINH_TOLERANCE, 0},
+{ 389, 3225273929u, 494503287u, 1092811254u, 142673998u, 3264153529u, 3833198838u, 0, SINH_TOLERANCE, 0},
+{ 390, 3229057244u, 3394882641u, 3225306538u, 364852125u, 3787923162u, 3261908140u, 0, SINH_TOLERANCE, 0},
+{ 391, 3222116035u, 193885269u, 1088149839u, 1359805831u, 3224645354u, 2483580248u, 0, SINH_TOLERANCE, 0},
+{ 392, 3216213422u, 592580907u, 3199560872u, 3086438952u, 3216214662u, 2295456676u, 0, SINH_TOLERANCE, 0},
+{ 393, 1070004424u, 1778008540u, 1049064687u, 73581647u, 1070012518u, 4215499617u, 0, SINH_TOLERANCE, 0},
+{ 394, 3227859230u, 233240285u, 1081923320u, 2710903921u, 3475955001u, 481819950u, 0, SINH_TOLERANCE, 0},
+{ 395, 1072659495u, 3719878805u, 1079866720u, 3615458228u, 1072851077u, 476577070u, 0, SINH_TOLERANCE, 0},
+{ 396, 3221194724u, 3647632375u, 3247225271u, 3839959621u, 3222021386u, 1060692731u, 0, SINH_TOLERANCE, 0},
+{ 397, 1081381000u, 2232210456u, 3235434773u, 224271737u, 1569318353u, 1467736445u, 0, SINH_TOLERANCE, 0},
+{ 398, 3213975204u, 2134662911u, 3190390590u, 4239009051u, 3213975259u, 373017924u, 0, SINH_TOLERANCE, 0},
+{ 399, 1075283265u, 2305279897u, 1077668039u, 1854523320u, 1080450473u, 3751266535u, 0, SINH_TOLERANCE, 0},
+{ 400, 3220912835u, 538224650u, 3206153057u, 1379649610u, 3221566709u, 621166734u, 0, SINH_TOLERANCE, 0},
+{ 401, 3215284875u, 3683897920u, 3244167599u, 3647579469u, 3215285281u, 2558802378u, 0, SINH_TOLERANCE, 0},
+{ 402, 1077698021u, 2694093608u, 1042775347u, 598406111u, 1114529526u, 2696598259u, 0, SINH_TOLERANCE, 0},
+{ 403, 3218975424u, 872706833u, 1084802480u, 2200602798u, 3219045805u, 4704362u, 0, SINH_TOLERANCE, 0},
+{ 404, 1065408269u, 904146293u, 1060867322u, 1729685598u, 1065408281u, 2779125568u, 0, SINH_TOLERANCE, 0},
+{ 405, 3214569338u, 1894173462u, 3232800651u, 191960416u, 3214569530u, 3800340619u, 0, SINH_TOLERANCE, 0},
+{ 406, 1078642431u, 3521028551u, 1054522089u, 3287274359u, 1152594773u, 3672113002u, 0, SINH_TOLERANCE, 0},
+{ 407, 1079658324u, 959640601u, 3201578263u, 4136915018u, 1230574401u, 2234964481u, 0, SINH_TOLERANCE, 0},
+{ 408, 1071345483u, 1553716379u, 1106027987u, 984725765u, 1071401055u, 4171733850u, 0, SINH_TOLERANCE, 0},
+{ 409, 3226249729u, 2287646644u, 3240329321u, 2276183378u, 3305774759u, 3692605402u, 0, SINH_TOLERANCE, 0},
+{ 410, 1072403478u, 3940225170u, 3199544434u, 997572161u, 1072635674u, 1085220696u, 0, SINH_TOLERANCE, 0},
+{ 411, 3219059817u, 36116288u, 3206886566u, 4196602670u, 3219134081u, 965678204u, 0, SINH_TOLERANCE, 0},
+{ 412, 3225967213u, 3550227562u, 3207257983u, 2747744117u, 3292743212u, 206811308u, 0, SINH_TOLERANCE, 0},
+{ 413, 1081167454u, 507130047u, 1048359321u, 3229888373u, 1490439745u, 2514231187u, 0, SINH_TOLERANCE, 0},
+{ 414, 3221948202u, 2210969014u, 1081031001u, 1946786091u, 3224193769u, 1125681282u, 0, SINH_TOLERANCE, 0},
+{ 415, 3224772654u, 4059150589u, 3189759234u, 1177045799u, 3252570536u, 932381590u, 0, SINH_TOLERANCE, 0},
+{ 416, 1078423548u, 2664812822u, 1050343198u, 2034180320u, 1142469137u, 3731467255u, 0, SINH_TOLERANCE, 0},
+{ 417, 3220070573u, 1175750283u, 3235559706u, 1424491340u, 3220280124u, 1698837364u, 0, SINH_TOLERANCE, 0},
+{ 418, 3219147073u, 1630036121u, 3231972785u, 3195479448u, 3219193750u, 3587877395u, 0, SINH_TOLERANCE, 0},
+{ 419, 1077846963u, 2527029044u, 1046927050u, 4000723255u, 1117940775u, 3673409802u, 0, SINH_TOLERANCE, 0},
+{ 420, 1076820069u, 3335703647u, 3237349676u, 3869440059u, 1094992333u, 786910646u, 0, SINH_TOLERANCE, 0},
+{ 421, 1078850936u, 3888398377u, 3196041693u, 1290567220u, 1162199139u, 1366973945u, 0, SINH_TOLERANCE, 0},
+{ 422, 1071921950u, 3242451480u, 3248384948u, 707431021u, 1072012056u, 1674107560u, 0, SINH_TOLERANCE, 0},
+{ 423, 1075890477u, 2739665123u, 1060777905u, 1733073225u, 1084309432u, 1777081396u, 0, SINH_TOLERANCE, 0},
+{ 424, 1075371333u, 1297274853u, 3208848704u, 3341639139u, 1081035722u, 388538633u, 0, SINH_TOLERANCE, 0},
+{ 425, 1066493885u, 2228057309u, 1084318902u, 1317851136u, 1066493940u, 1908483498u, 0, SINH_TOLERANCE, 0},
+{ 426, 1077769567u, 270039934u, 3241414679u, 3063626339u, 1116118793u, 251426608u, 0, SINH_TOLERANCE, 0},
+{ 427, 3220226926u, 83062251u, 3211262173u, 2659016437u, 3220439240u, 1342941858u, 0, SINH_TOLERANCE, 0},
+{ 428, 1080015246u, 3833539373u, 3206667189u, 1567476111u, 1263591609u, 3066665016u, 0, SINH_TOLERANCE, 0},
+{ 429, 3217777984u, 2382776852u, 3249232579u, 1546622468u, 3217791723u, 580292390u, 0, SINH_TOLERANCE, 0},
+{ 430, 1076099255u, 1714300821u, 1104130938u, 4167591598u, 1086665941u, 3383929735u, 0, SINH_TOLERANCE, 0},
+{ 431, 1067869976u, 2798720100u, 1086978789u, 449990704u, 1067870445u, 757727393u, 0, SINH_TOLERANCE, 0},
+{ 432, 3223858383u, 4039516226u, 3244344107u, 4272932619u, 3237326669u, 3071269738u, 0, SINH_TOLERANCE, 0},
+{ 433, 3221659865u, 1683007544u, 1091105663u, 3805494321u, 3223379092u, 13932268u, 0, SINH_TOLERANCE, 0},
+{ 434, 3220852948u, 2072627412u, 1094383324u, 3394151662u, 3221484094u, 3151331188u, 0, SINH_TOLERANCE, 0},
+{ 435, 3220570024u, 1120106427u, 3223631624u, 3404608264u, 3221069173u, 3891584311u, 0, SINH_TOLERANCE, 0},
+{ 436, 1078985629u, 559918757u, 3205077053u, 908100198u, 1168462131u, 348797896u, 0, SINH_TOLERANCE, 0},
+{ 437, 1065746590u, 2026673913u, 3244833635u, 2844573214u, 1065746618u, 903416048u, 0, SINH_TOLERANCE, 0},
+{ 438, 3229401435u, 3946837259u, 3234993796u, 3850406820u, 3915064173u, 957246048u, 0, SINH_TOLERANCE, 0},
+{ 439, 1070062721u, 3139330994u, 1046133568u, 1539650690u, 1070071794u, 2932344804u, 0, SINH_TOLERANCE, 0},
+{ 440, 3225171164u, 1554593884u, 3228899878u, 2813752562u, 3261718378u, 1205533002u, 0, SINH_TOLERANCE, 0},
+{ 441, 1069087916u, 3804703138u, 1072931071u, 2053677923u, 1069090518u, 1009402951u, 0, SINH_TOLERANCE, 0},
+{ 442, 3227038507u, 289355864u, 1078453818u, 2143066338u, 3368499553u, 3978063874u, 0, SINH_TOLERANCE, 0},
+{ 443, 3216522792u, 2157691971u, 1106629150u, 110806409u, 3216525168u, 881313374u, 0, SINH_TOLERANCE, 0},
+{ 444, 1075865563u, 3570399481u, 1085637605u, 180265334u, 1083999917u, 440877064u, 0, SINH_TOLERANCE, 0},
+{ 445, 3216708822u, 558779875u, 3202046748u, 2338464653u, 3216712134u, 1030194175u, 0, SINH_TOLERANCE, 0},
+{ 446, 1066676984u, 1703969219u, 3229797258u, 1417521063u, 1066677070u, 1053909100u, 0, SINH_TOLERANCE, 0},
+{ 447, 3225199349u, 3917440951u, 1051668894u, 3736066983u, 3262374743u, 1562528722u, 0, SINH_TOLERANCE, 0},
+{ 448, 1071043536u, 3106613409u, 1066627453u, 2735392257u, 1071075459u, 2064952418u, 0, SINH_TOLERANCE, 0},
+{ 449, 1071956828u, 2229777605u, 1065061963u, 2405869925u, 1072054337u, 2105468352u, 0, SINH_TOLERANCE, 0},
+{ 450, 3225831741u, 3967957902u, 1057416138u, 3459188071u, 3286483226u, 515773066u, 0, SINH_TOLERANCE, 0},
+{ 451, 1071784938u, 3699016825u, 3249713090u, 796144848u, 1071849643u, 3676203125u, 0, SINH_TOLERANCE, 0},
+{ 452, 3222524940u, 3285165564u, 3211948811u, 401510871u, 3226584440u, 3149629272u, 0, SINH_TOLERANCE, 0},
+{ 453, 1078529018u, 634857910u, 3199607513u, 914218057u, 1147357727u, 2060143941u, 0, SINH_TOLERANCE, 0},
+{ 454, 1076403304u, 2030735578u, 3233855943u, 965677531u, 1090189121u, 3806338161u, 0, SINH_TOLERANCE, 0},
+{ 455, 1075362511u, 3957229084u, 1051050470u, 3123776651u, 1080967851u, 1261047595u, 0, SINH_TOLERANCE, 0},
+{ 456, 3221863333u, 162122081u, 3239376395u, 108064594u, 3223906134u, 1689176085u, 0, SINH_TOLERANCE, 0},
+{ 457, 3224688874u, 869031839u, 3225020876u, 1344301606u, 3250642572u, 668835625u, 0, SINH_TOLERANCE, 0},
+{ 458, 3219676354u, 946696117u, 3231825228u, 1700703647u, 3219835122u, 962995253u, 0, SINH_TOLERANCE, 0},
+{ 459, 1074444299u, 3394168074u, 1076939786u, 1666995668u, 1076637198u, 2672326558u, 0, SINH_TOLERANCE, 0},
+{ 460, 3218211979u, 2488789804u, 3238508333u, 1506943664u, 3218227639u, 2471579197u, 0, SINH_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1073029502u, 3371262161u, 0, SINH_TOLERANCE, 0},
+{ 462, 3220983118u, 1244307192u, 3191297711u, 2540916692u, 3221669470u, 654042193u, 0, SINH_TOLERANCE, 0},
+{ 463, 3215791332u, 2871645739u, 3239081581u, 1440249115u, 3215792357u, 2775105375u, 0, SINH_TOLERANCE, 0},
+{ 464, 1072544937u, 1231934926u, 3236746788u, 603977748u, 1072765519u, 2095752684u, 0, SINH_TOLERANCE, 0},
+{ 465, 3214324057u, 2386312545u, 1063169277u, 2715234268u, 3214324179u, 1232090990u, 0, SINH_TOLERANCE, 0},
+{ 466, 1077317658u, 915867083u, 1046790892u, 3347417612u, 1105687206u, 2072797994u, 0, SINH_TOLERANCE, 0},
+{ 467, 1081866940u, 3553288373u, 1065698616u, 2906680663u, 1748821447u, 2025279999u, 0, SINH_TOLERANCE, 0},
+{ 468, 1066477746u, 2342364630u, 1051356723u, 4019093203u, 1066477799u, 740460663u, 0, SINH_TOLERANCE, 0},
+{ 469, 3216897802u, 2911548084u, 1105282515u, 2476735795u, 3216902290u, 95319602u, 0, SINH_TOLERANCE, 0},
+{ 470, 1068298564u, 1836216409u, 1101062307u, 2519592554u, 1068299574u, 3261440104u, 0, SINH_TOLERANCE, 0},
+{ 471, 1073323889u, 1235369496u, 3222946447u, 668087854u, 1073940658u, 2489380437u, 0, SINH_TOLERANCE, 0},
+{ 472, 3217991780u, 2981820811u, 1059838516u, 2845580478u, 3218011046u, 160524385u, 0, SINH_TOLERANCE, 0},
+{ 473, 3214902934u, 1565550570u, 3217165795u, 4162017137u, 3214903260u, 3266531759u, 0, SINH_TOLERANCE, 0},
+{ 474, 3224668466u, 2808968027u, 1055630096u, 1782326814u, 3250107909u, 4229492206u, 0, SINH_TOLERANCE, 0},
+{ 475, 1069305614u, 1492622658u, 3216653077u, 3972512122u, 1069309397u, 3097712363u, 0, SINH_TOLERANCE, 0},
+{ 476, 3222171679u, 2722693603u, 3227814791u, 3169731970u, 3224793633u, 3681855882u, 0, SINH_TOLERANCE, 0},
+{ 477, 3221052359u, 899763203u, 3207606001u, 2804747833u, 3221777264u, 2598378310u, 0, SINH_TOLERANCE, 0},
+{ 478, 3223330293u, 3789058912u, 3228095081u, 4135937628u, 3231232306u, 256130235u, 0, SINH_TOLERANCE, 0},
+{ 479, 1069636566u, 1682808307u, 3206960335u, 232877759u, 1069640056u, 2969359733u, 0, SINH_TOLERANCE, 0},
+{ 480, 3226362846u, 2851963139u, 3246852961u, 2590862592u, 3310994390u, 2280263532u, 0, SINH_TOLERANCE, 0},
+{ 481, 1074908950u, 2422232642u, 3234779662u, 290458310u, 1078293411u, 1136645066u, 0, SINH_TOLERANCE, 0},
+{ 482, 3219059686u, 1082582386u, 1075605675u, 2602133689u, 3219134008u, 214025449u, 0, SINH_TOLERANCE, 0},
+{ 483, 3226187123u, 1789635787u, 1059414278u, 1048286093u, 3302943910u, 3672708776u, 0, SINH_TOLERANCE, 0},
+{ 484, 1079456174u, 231339448u, 1055573265u, 504907415u, 1211943927u, 57355760u, 0, SINH_TOLERANCE, 0},
+{ 485, 1071600069u, 1153251200u, 3204617090u, 1772013857u, 1071663825u, 3349768061u, 0, SINH_TOLERANCE, 0},
+{ 486, 1080676687u, 1082898276u, 3212089272u, 1449080862u, 1384085102u, 3383991944u, 0, SINH_TOLERANCE, 0},
+{ 487, 1076571101u, 3177299045u, 1058862813u, 809400815u, 1092108370u, 1324438680u, 0, SINH_TOLERANCE, 0},
+{ 488, 3223514518u, 1924429710u, 1056464743u, 3349283177u, 3233360873u, 3288266297u, 0, SINH_TOLERANCE, 0},
+{ 489, 3226599023u, 42238036u, 1042379500u, 2113559863u, 3327958428u, 3625179367u, 0, SINH_TOLERANCE, 0},
+{ 490, 1071052699u, 3304403230u, 3217556703u, 58952646u, 1071085215u, 1050226061u, 0, SINH_TOLERANCE, 0},
+{ 491, 3218960986u, 1645486982u, 3224301095u, 3636267471u, 3219029799u, 4045357788u, 0, SINH_TOLERANCE, 0},
+{ 492, 1071150617u, 619402181u, 3235208235u, 557360557u, 1071189934u, 498578636u, 0, SINH_TOLERANCE, 0},
+{ 493, 3225655482u, 110029735u, 1046937383u, 984375729u, 3278328624u, 58252944u, 0, SINH_TOLERANCE, 0},
+{ 494, 3213613986u, 4063688092u, 3203235744u, 1049950343u, 3213614043u, 1063948882u, 0, SINH_TOLERANCE, 0},
+{ 495, 1070739227u, 650996069u, 1054971928u, 3953359826u, 1070755325u, 3588616872u, 0, SINH_TOLERANCE, 0},
+{ 496, 3222861501u, 66926332u, 1090561839u, 1379780888u, 3228568262u, 956132261u, 0, SINH_TOLERANCE, 0},
+{ 497, 3224016123u, 2803378256u, 1086057989u, 498534626u, 3239186357u, 731326335u, 0, SINH_TOLERANCE, 0},
+{ 498, 1076327097u, 2846400785u, 1047142525u, 1375153550u, 1089349462u, 3403878245u, 0, SINH_TOLERANCE, 0},
+{ 499, 1066601297u, 2869128958u, 1070972315u, 4246440273u, 1066601369u, 2650609615u, 0, SINH_TOLERANCE, 0},
+{ 500, 1067561146u, 3112381207u, 1044430965u, 3981604561u, 1067561377u, 1769828869u, 0, SINH_TOLERANCE, 0},
+{ 501, 3223914965u, 243303420u, 1093735824u, 1575581926u, 3238048272u, 2235871958u, 0, SINH_TOLERANCE, 0},
+{ 502, 3225506509u, 3218865041u, 3204803496u, 3840388050u, 3271535308u, 1649385448u, 0, SINH_TOLERANCE, 0},
+{ 503, 1067289799u, 336846959u, 1052664471u, 3798336786u, 1067290067u, 3736114808u, 0, SINH_TOLERANCE, 0},
+{ 504, 1068537148u, 3639240976u, 1081202165u, 1844741676u, 1068537909u, 189262233u, 0, SINH_TOLERANCE, 0},
+{ 505, 3218196249u, 717293069u, 3211534283u, 582401011u, 3218211290u, 141761877u, 0, SINH_TOLERANCE, 0},
+{ 506, 3228893840u, 3766248610u, 3196520332u, 1174437546u, 3727654367u, 1400243038u, 0, SINH_TOLERANCE, 0},
+{ 507, 1076091194u, 756959182u, 3204099341u, 1581804034u, 1086583042u, 1964748553u, 0, SINH_TOLERANCE, 0},
+{ 508, 3217340780u, 3560686300u, 3220980617u, 4277975772u, 3217346722u, 2737152545u, 0, SINH_TOLERANCE, 0},
+{ 509, 3218294684u, 2598148853u, 3217622194u, 3460421008u, 3218313881u, 4271494494u, 0, SINH_TOLERANCE, 0},
+{ 510, 1071963704u, 136600515u, 3209934920u, 3340653128u, 1072062719u, 2822108139u, 0, SINH_TOLERANCE, 0},
+{ 511, 1078994518u, 1045480938u, 3251354609u, 4133432965u, 1169315390u, 1471292306u, 0, SINH_TOLERANCE, 0},
+{ 512, 1077967943u, 1630207738u, 3239996829u, 2393354808u, 1121432564u, 2643918337u, 0, SINH_TOLERANCE, 0},
+{ 513, 3213694690u, 3739770117u, 1059520750u, 3959551225u, 3213694754u, 4181555695u, 0, SINH_TOLERANCE, 0},
+{ 514, 3223390473u, 1498861716u, 1091297147u, 847410798u, 3231943240u, 411045671u, 0, SINH_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 1074212001u, 481824735u, 0, SINH_TOLERANCE, 0},
+{ 516, 1069529329u, 2353103845u, 3235718771u, 2978889966u, 1069534654u, 359520824u, 0, SINH_TOLERANCE, 0},
+{ 517, 3229337896u, 1546972125u, 3249076079u, 1987349196u, 3891583721u, 982927834u, 0, SINH_TOLERANCE, 0},
+{ 518, 3225636601u, 2769161072u, 1075207126u, 292616282u, 3277469717u, 2356402899u, 0, SINH_TOLERANCE, 0},
+{ 519, 3215440938u, 36855311u, 1052128202u, 1479039342u, 3215441495u, 856736532u, 0, SINH_TOLERANCE, 0},
+{ 520, 1076417021u, 2027463605u, 1066023013u, 3369686340u, 1090384091u, 1056585399u, 0, SINH_TOLERANCE, 0},
+{ 521, 3215678541u, 3808681655u, 1054161346u, 1821773119u, 3215679395u, 1849884479u, 0, SINH_TOLERANCE, 0},
+{ 522, 1065851752u, 3175490326u, 3226879970u, 845687760u, 1065851787u, 737255u, 0, SINH_TOLERANCE, 0},
+{ 523, 1065371665u, 3124482451u, 3242748377u, 3259417226u, 1065371676u, 4154020522u, 0, SINH_TOLERANCE, 0},
+{ 524, 1067265791u, 2751606436u, 3236210939u, 3923142740u, 1067266050u, 2400005644u, 0, SINH_TOLERANCE, 0},
+{ 525, 1079966097u, 2016872044u, 3228408064u, 4201274408u, 1259005133u, 2351383485u, 0, SINH_TOLERANCE, 0},
+{ 526, 3215077894u, 1019916843u, 3219974785u, 1977881787u, 3215078145u, 1089008109u, 0, SINH_TOLERANCE, 0},
+{ 527, 3215207392u, 2060433318u, 1075872515u, 366073725u, 3215207734u, 2074287516u, 0, SINH_TOLERANCE, 0},
+{ 528, 3213200653u, 1098469906u, 1082900695u, 2349346832u, 3213200679u, 1381441120u, 0, SINH_TOLERANCE, 0},
+{ 529, 3218363315u, 3011196295u, 3252479932u, 2459281672u, 3218385825u, 3189415687u, 0, SINH_TOLERANCE, 0},
+{ 530, 3221334323u, 2843222682u, 1089275809u, 298982001u, 3222403031u, 2683776955u, 0, SINH_TOLERANCE, 0},
+{ 531, 1080766178u, 914741728u, 3203468059u, 2833809843u, 1400546649u, 1543027566u, 0, SINH_TOLERANCE, 0},
+{ 532, 3225229542u, 1274901962u, 3241535845u, 3759113509u, 3263137459u, 3663915975u, 0, SINH_TOLERANCE, 0},
+{ 533, 3227042074u, 2134927252u, 3253802671u, 3013731444u, 3368869803u, 696872014u, 0, SINH_TOLERANCE, 0},
+{ 534, 1080326973u, 2230655177u, 3254510616u, 1249674366u, 1319431604u, 3545707614u, 0, SINH_TOLERANCE, 0},
+{ 535, 1071359861u, 717357389u, 1083533731u, 3746683362u, 1071416786u, 238298886u, 0, SINH_TOLERANCE, 0},
+{ 536, 3220064570u, 834976849u, 3217357661u, 2465861779u, 3220275670u, 1926182485u, 0, SINH_TOLERANCE, 0},
+{ 537, 1066627637u, 1385714428u, 1053358395u, 3007113740u, 1066627713u, 3968091488u, 0, SINH_TOLERANCE, 0},
+{ 538, 1068353711u, 599268545u, 3201368210u, 2309854744u, 1068354812u, 823534625u, 0, SINH_TOLERANCE, 0},
+{ 539, 1073100182u, 2840234388u, 3232496515u, 333365983u, 1073614740u, 4021411949u, 0, SINH_TOLERANCE, 0},
+{ 540, 1066894301u, 3136078996u, 3194520860u, 2650572904u, 1066894437u, 776276983u, 0, SINH_TOLERANCE, 0},
+{ 541, 3224250507u, 2405805086u, 3251640319u, 324233833u, 3241869048u, 243646553u, 0, SINH_TOLERANCE, 0},
+{ 542, 1081533322u, 2589598340u, 3254677807u, 952438812u, 1625576728u, 2555502454u, 0, SINH_TOLERANCE, 0},
+{ 543, 3213232021u, 1922837702u, 3216892718u, 3535907549u, 3213232049u, 1242063580u, 0, SINH_TOLERANCE, 0},
+{ 544, 3226838652u, 261447440u, 3209805849u, 1150571079u, 3350113911u, 3739940447u, 0, SINH_TOLERANCE, 0},
+{ 545, 1079028016u, 4026487528u, 1073152064u, 27340691u, 1172419967u, 273403284u, 0, SINH_TOLERANCE, 0},
+{ 546, 3222832236u, 338765118u, 1086225786u, 3207238249u, 3228348911u, 2664550019u, 0, SINH_TOLERANCE, 0},
+{ 547, 3215057071u, 1085283176u, 3187775111u, 1601194210u, 3215057309u, 1488617841u, 0, SINH_TOLERANCE, 0},
+{ 548, 1078937261u, 3031712790u, 3252307859u, 170666844u, 1166209488u, 3602398320u, 0, SINH_TOLERANCE, 0},
+{ 549, 3220959383u, 3148395674u, 1041913758u, 3306391490u, 3221634041u, 1410967140u, 0, SINH_TOLERANCE, 0},
+{ 550, 3217005710u, 2205233857u, 3208100078u, 3993195511u, 3217010979u, 1632365894u, 0, SINH_TOLERANCE, 0},
+{ 551, 1071893912u, 4282766727u, 1072820377u, 1874778218u, 1071978351u, 3057491263u, 0, SINH_TOLERANCE, 0},
+{ 552, 3218173124u, 2920860798u, 3218070226u, 3104066154u, 3218187285u, 1999634368u, 0, SINH_TOLERANCE, 0},
+{ 553, 3217533263u, 969991373u, 3250596895u, 1734386152u, 3217542109u, 2998394098u, 0, SINH_TOLERANCE, 0},
+{ 554, 3226332906u, 1218740205u, 3239802737u, 2610078504u, 3309611601u, 443854413u, 0, SINH_TOLERANCE, 0},
+{ 555, 3217565578u, 1485218325u, 3220870240u, 3591664613u, 3217574990u, 719188738u, 0, SINH_TOLERANCE, 0},
+{ 556, 3216754207u, 690157417u, 3190850619u, 4192347699u, 3216757780u, 72992630u, 0, SINH_TOLERANCE, 0},
+{ 557, 1079276594u, 4009839784u, 1079670252u, 394167192u, 1195402369u, 2525536651u, 0, SINH_TOLERANCE, 0},
+{ 558, 3225122053u, 961532417u, 1092588071u, 2923790239u, 3260577091u, 609779704u, 0, SINH_TOLERANCE, 0},
+{ 559, 3216462003u, 4174125604u, 1050682630u, 2169701868u, 3216464117u, 911139952u, 0, SINH_TOLERANCE, 0},
+{ 560, 3227363835u, 4146748230u, 1087373950u, 2481478351u, 3398577806u, 2672248790u, 0, SINH_TOLERANCE, 0},
+{ 561, 1073842138u, 3984715440u, 1050421618u, 2446142566u, 1074899895u, 3654171950u, 0, SINH_TOLERANCE, 0},
+{ 562, 1076832374u, 936290150u, 1100614426u, 3625806370u, 1095122996u, 79506021u, 0, SINH_TOLERANCE, 0},
+{ 563, 1080913584u, 1866615265u, 3215651428u, 2337013350u, 1427761572u, 2464900529u, 0, SINH_TOLERANCE, 0},
+{ 564, 3229081054u, 712227971u, 1106004723u, 973148499u, 3796776794u, 2977854696u, 0, SINH_TOLERANCE, 0},
+{ 565, 3223796743u, 3409813738u, 3244817008u, 1933503498u, 3236632891u, 2551711858u, 0, SINH_TOLERANCE, 0},
+{ 566, 1075749429u, 3180389060u, 3228735703u, 83422217u, 1083215043u, 2681278570u, 0, SINH_TOLERANCE, 0},
+{ 567, 1074732996u, 556972671u, 3204582372u, 841555801u, 1077441837u, 873264869u, 0, SINH_TOLERANCE, 0},
+{ 568, 1072864873u, 4189151332u, 1080874032u, 706326922u, 1073159519u, 2839586932u, 0, SINH_TOLERANCE, 0},
+{ 569, 1079374091u, 198291836u, 1057281892u, 2188836928u, 1204328207u, 2535783908u, 0, SINH_TOLERANCE, 0},
+{ 570, 1074946267u, 1219449298u, 3228734687u, 3504562743u, 1078508537u, 2353084821u, 0, SINH_TOLERANCE, 0},
+{ 571, 3217153376u, 1776099219u, 1094316777u, 4188083896u, 3217157181u, 574357456u, 0, SINH_TOLERANCE, 0},
+{ 572, 3214817228u, 2614400266u, 1073750227u, 3003203347u, 3214817516u, 198273910u, 0, SINH_TOLERANCE, 0},
+{ 573, 3219225558u, 2959351406u, 1105603716u, 311851587u, 3219283423u, 684340727u, 0, SINH_TOLERANCE, 0},
+{ 574, 1076155826u, 865443613u, 1097532516u, 3622237781u, 1087394673u, 3539650218u, 0, SINH_TOLERANCE, 0},
+{ 575, 3223398058u, 447506102u, 3195759295u, 3603669725u, 3232019529u, 3527208045u, 0, SINH_TOLERANCE, 0},
+{ 576, 1079015805u, 3934398273u, 1040996422u, 2968621268u, 1171312413u, 1233059955u, 0, SINH_TOLERANCE, 0},
+{ 577, 3215614193u, 784208771u, 1088764788u, 2182296421u, 3215614958u, 361692432u, 0, SINH_TOLERANCE, 0},
+{ 578, 3228409347u, 1527590526u, 3206961556u, 2823164069u, 3577507096u, 2977499390u, 0, SINH_TOLERANCE, 0},
+{ 579, 3225109795u, 3876699591u, 3207481130u, 4028148535u, 3260303666u, 4290703953u, 0, SINH_TOLERANCE, 0},
+{ 580, 1076236154u, 2164249756u, 1059857743u, 1785169952u, 1088299515u, 3026474899u, 0, SINH_TOLERANCE, 0},
+{ 581, 1078172521u, 2079273665u, 1080303860u, 625760474u, 1130877384u, 2820657748u, 0, SINH_TOLERANCE, 0},
+{ 582, 3222291804u, 3636214836u, 1068367620u, 2932621925u, 3225236520u, 1533383205u, 0, SINH_TOLERANCE, 0},
+{ 583, 1066015468u, 4274131512u, 1047707755u, 92550763u, 1066015515u, 1391929877u, 0, SINH_TOLERANCE, 0},
+{ 584, 3215599337u, 2648933384u, 1084603503u, 3534304873u, 3215600082u, 4152085298u, 0, SINH_TOLERANCE, 0},
+{ 585, 1070854691u, 3216750767u, 3191088629u, 547482628u, 1070875955u, 1283090909u, 0, SINH_TOLERANCE, 0},
+{ 586, 1070521958u, 1420360746u, 1080063101u, 1690029499u, 1070541624u, 3873766986u, 0, SINH_TOLERANCE, 0},
+{ 587, 3223563908u, 1908572179u, 1080112083u, 1228319033u, 3233962096u, 1729178347u, 0, SINH_TOLERANCE, 0},
+{ 588, 1067032546u, 500312015u, 3212368508u, 3864619086u, 1067032721u, 1665527175u, 0, SINH_TOLERANCE, 0},
+{ 589, 3221335610u, 4211343447u, 1087492676u, 4272583781u, 3222405997u, 1265770476u, 0, SINH_TOLERANCE, 0},
+{ 590, 1080518026u, 2382118000u, 1042665328u, 567154882u, 1354785044u, 2043686521u, 0, SINH_TOLERANCE, 0},
+{ 591, 1069547778u, 1435344339u, 3216303171u, 2275988178u, 1069550513u, 671516801u, 0, SINH_TOLERANCE, 0},
+{ 592, 3219781499u, 3403659753u, 3218043030u, 1926480488u, 3219974504u, 1809148616u, 0, SINH_TOLERANCE, 0},
+{ 593, 1074743231u, 1198845185u, 3225556149u, 1130089684u, 1077473461u, 3574277356u, 0, SINH_TOLERANCE, 0},
+{ 594, 3221614466u, 2183928090u, 1048403956u, 963834821u, 3223250893u, 2703382364u, 0, SINH_TOLERANCE, 0},
+{ 595, 1080701440u, 2120625396u, 1041006976u, 2137548527u, 1388588575u, 2814596158u, 0, SINH_TOLERANCE, 0},
+{ 596, 1080355870u, 586700956u, 1059670521u, 303891699u, 1324761751u, 2561465523u, 0, SINH_TOLERANCE, 0},
+{ 597, 3221091650u, 2509132460u, 1102827530u, 2205707903u, 3221841506u, 3160409354u, 0, SINH_TOLERANCE, 0},
+{ 598, 3217443509u, 1229308263u, 3209170414u, 4206576047u, 3217450905u, 1778802890u, 0, SINH_TOLERANCE, 0},
+{ 599, 3221979137u, 4078010749u, 3199236456u, 733478972u, 3224310714u, 594776133u, 0, SINH_TOLERANCE, 0},
+{ 600, 3215538376u, 4277541051u, 3199806921u, 397102023u, 3215539045u, 2587253356u, 0, SINH_TOLERANCE, 0},
+{ 601, 3214849381u, 900999594u, 3234720188u, 2530214248u, 3214849682u, 3764275050u, 0, SINH_TOLERANCE, 0},
+{ 602, 1074446396u, 4000609478u, 1096577064u, 4148592328u, 1076644619u, 662306058u, 0, SINH_TOLERANCE, 0},
+{ 603, 1067542452u, 2154187873u, 3224392607u, 3957250362u, 1067542672u, 894406159u, 0, SINH_TOLERANCE, 0},
+{ 604, 3221316336u, 2867079200u, 1101870326u, 921212001u, 3222362328u, 2288191835u, 0, SINH_TOLERANCE, 0},
+{ 605, 3223784706u, 674547716u, 1063216239u, 3929755226u, 3236477055u, 3177865417u, 0, SINH_TOLERANCE, 0},
+{ 606, 3225735787u, 3158182449u, 1043794244u, 3259056345u, 3282102257u, 4149902865u, 0, SINH_TOLERANCE, 0},
+{ 607, 3225242320u, 3002823940u, 1059511739u, 2832435794u, 3263375391u, 2207198717u, 0, SINH_TOLERANCE, 0},
+{ 608, 3220450550u, 2196511929u, 1049973941u, 3672092877u, 3220829892u, 1152024630u, 0, SINH_TOLERANCE, 0},
+{ 609, 1068263848u, 3655292191u, 1086438127u, 3567072906u, 1068264804u, 3057389114u, 0, SINH_TOLERANCE, 0},
+{ 610, 3227458308u, 1617573614u, 3201863123u, 3090723732u, 3407261058u, 3864691446u, 0, SINH_TOLERANCE, 0},
+{ 611, 3223764196u, 679893506u, 3211547753u, 824081024u, 3236242384u, 855992207u, 0, SINH_TOLERANCE, 0},
+{ 612, 1076947613u, 2285242807u, 1084999409u, 2221731406u, 1097150618u, 2093305415u, 0, SINH_TOLERANCE, 0},
+{ 613, 3217219424u, 1935990727u, 1088822246u, 1058156518u, 3217223910u, 2572208563u, 0, SINH_TOLERANCE, 0},
+{ 614, 1080819070u, 521023584u, 1059186903u, 4245163857u, 1410372185u, 1987577595u, 0, SINH_TOLERANCE, 0},
+{ 615, 1081871044u, 2312887617u, 3191771354u, 1885370807u, 1750314185u, 485435265u, 0, SINH_TOLERANCE, 0},
+{ 616, 3228836567u, 1796441468u, 1100030327u, 2772711004u, 3706449772u, 2025534396u, 0, SINH_TOLERANCE, 0},
+{ 617, 3216859732u, 2095685003u, 1077984448u, 2100773742u, 3216863963u, 3311762035u, 0, SINH_TOLERANCE, 0},
+{ 618, 3213926140u, 2892538035u, 1042396334u, 4162200338u, 3213926188u, 2166615565u, 0, SINH_TOLERANCE, 0},
+{ 619, 3226997111u, 2177698116u, 3227557177u, 150832500u, 3364729748u, 1325856495u, 0, SINH_TOLERANCE, 0},
+{ 620, 3213582312u, 607966734u, 3236250630u, 4164600559u, 3213582365u, 2419158638u, 0, SINH_TOLERANCE, 0},
+{ 621, 3219535540u, 2830122967u, 1046096700u, 3713346883u, 3219655310u, 3928628246u, 0, SINH_TOLERANCE, 0},
+{ 622, 3224615051u, 2314640506u, 3203696416u, 3276228872u, 3248873475u, 2072666780u, 0, SINH_TOLERANCE, 0},
+{ 623, 3219203763u, 469331883u, 3249037349u, 2999233437u, 3219258357u, 957120804u, 0, SINH_TOLERANCE, 0},
+{ 624, 1079556219u, 560886625u, 1091899487u, 748795120u, 1221147643u, 1766795176u, 0, SINH_TOLERANCE, 0},
+{ 625, 1067712650u, 2958421324u, 1092569414u, 3235243477u, 1067712984u, 658901815u, 0, SINH_TOLERANCE, 0},
+{ 626, 3213998017u, 3221475559u, 1043038304u, 915608434u, 3213998075u, 2955854477u, 0, SINH_TOLERANCE, 0},
+{ 627, 1073294682u, 3007808652u, 3216682290u, 2531019474u, 1073903448u, 2701925371u, 0, SINH_TOLERANCE, 0},
+{ 628, 3226300359u, 1767658578u, 3237045269u, 2313128318u, 3308166529u, 3225971130u, 0, SINH_TOLERANCE, 0},
+{ 629, 3219006500u, 1926845182u, 1066835624u, 1783256828u, 3219080335u, 3600574508u, 0, SINH_TOLERANCE, 0},
+{ 630, 1065741453u, 90378038u, 1057168870u, 164358218u, 1065741480u, 1993225493u, 0, SINH_TOLERANCE, 0},
+{ 631, 1081693348u, 1610524680u, 1085283851u, 2903496007u, 1684679818u, 520929572u, 0, SINH_TOLERANCE, 0},
+{ 632, 1075489858u, 4274321404u, 3202913591u, 720121831u, 1081645047u, 258345874u, 0, SINH_TOLERANCE, 0},
+{ 633, 1067982472u, 2034778236u, 1071133763u, 1413236391u, 1067983057u, 725045044u, 0, SINH_TOLERANCE, 0},
+{ 634, 1067840244u, 1489112261u, 1076691395u, 348210906u, 1067840684u, 4200379030u, 0, SINH_TOLERANCE, 0},
+{ 635, 3217229677u, 2797651324u, 3224410527u, 2374818327u, 3217234276u, 1628439001u, 0, SINH_TOLERANCE, 0},
+{ 636, 1077801496u, 1823161666u, 3197810695u, 3119680047u, 1116891443u, 2045262415u, 0, SINH_TOLERANCE, 0},
+{ 637, 1072218792u, 3420950657u, 1087084743u, 2136638961u, 1072385629u, 3558873528u, 0, SINH_TOLERANCE, 0},
+{ 638, 1073047952u, 3554566429u, 1062907717u, 2736702589u, 1073505975u, 2786439684u, 0, SINH_TOLERANCE, 0},
+{ 639, 3227062875u, 2928437580u, 3187765027u, 1393427873u, 3370758541u, 1790477232u, 0, SINH_TOLERANCE, 0},
+{ 640, 3218738745u, 189447067u, 1051643315u, 828663513u, 3218786307u, 4024003158u, 0, SINH_TOLERANCE, 0},
+{ 641, 1068042509u, 2852350928u, 1045683757u, 673354280u, 1068043163u, 2365357114u, 0, SINH_TOLERANCE, 0},
+{ 642, 1065966397u, 3589563265u, 3248741629u, 812657927u, 1065966440u, 1251607880u, 0, SINH_TOLERANCE, 0},
+{ 643, 3213679498u, 1766416701u, 1100392103u, 2185373290u, 3213679560u, 4268196279u, 0, SINH_TOLERANCE, 0},
+{ 644, 3220275389u, 3763582673u, 3191965790u, 388374829u, 3220518255u, 2651724555u, 0, SINH_TOLERANCE, 0},
+{ 645, 1075440832u, 1187403069u, 1075300235u, 336640304u, 1081370119u, 2501920895u, 0, SINH_TOLERANCE, 0},
+{ 646, 1081906155u, 1718795752u, 3243118752u, 683369237u, 1763270328u, 2150807698u, 0, SINH_TOLERANCE, 0},
+{ 647, 3218132129u, 1863545307u, 1069449477u, 3418627399u, 3218144815u, 3945086706u, 0, SINH_TOLERANCE, 0},
+{ 648, 1072747022u, 3295607249u, 1068878592u, 1633297809u, 1072961595u, 3287424108u, 0, SINH_TOLERANCE, 0},
+{ 649, 1070481463u, 2585980994u, 3236670483u, 1286750688u, 1070499970u, 2251103968u, 0, SINH_TOLERANCE, 0},
+{ 650, 1067128553u, 15816845u, 3233249283u, 2491924775u, 1067128760u, 376681367u, 0, SINH_TOLERANCE, 0},
+{ 651, 1065481693u, 1051983351u, 1049180786u, 1474421917u, 1065481708u, 1428046274u, 0, SINH_TOLERANCE, 0},
+{ 652, 3216978165u, 2003816032u, 1086050104u, 668090487u, 3216983226u, 3651424116u, 0, SINH_TOLERANCE, 0},
+{ 653, 1068284677u, 3671484625u, 1067020039u, 430024694u, 1068285666u, 670139366u, 0, SINH_TOLERANCE, 0},
+{ 654, 1072639990u, 3991830201u, 3207808714u, 1021245839u, 1072836262u, 3211484111u, 0, SINH_TOLERANCE, 0},
+{ 655, 1071534423u, 4255801807u, 3207681716u, 1926756877u, 1071609574u, 1597467505u, 0, SINH_TOLERANCE, 0},
+{ 656, 1067869425u, 4167786896u, 1077097744u, 1775517981u, 1067869893u, 4158169847u, 0, SINH_TOLERANCE, 0},
+{ 657, 1076164794u, 3187518564u, 1082437406u, 944672491u, 1087470446u, 2664315721u, 0, SINH_TOLERANCE, 0},
+{ 658, 1068240650u, 953085192u, 3227310828u, 3459155777u, 1068241570u, 3420350489u, 0, SINH_TOLERANCE, 0},
+{ 659, 1072648234u, 1908555460u, 1073640207u, 260441967u, 1072842511u, 863537546u, 0, SINH_TOLERANCE, 0},
+{ 660, 1072462486u, 250762477u, 1072582645u, 2886742039u, 1072706025u, 3675872813u, 0, SINH_TOLERANCE, 0},
+{ 661, 3228885910u, 786180031u, 3197734769u, 2788918312u, 3724684214u, 2788902326u, 0, SINH_TOLERANCE, 0},
+{ 662, 3225074643u, 2055912467u, 3244244909u, 1394142937u, 3259480725u, 3336869072u, 0, SINH_TOLERANCE, 0},
+{ 663, 1072758713u, 91984146u, 3222252812u, 4126276047u, 1072980445u, 2544810789u, 0, SINH_TOLERANCE, 0},
+{ 664, 1075048683u, 3942715706u, 3239316352u, 410676547u, 1079134101u, 129626234u, 0, SINH_TOLERANCE, 0},
+{ 665, 3215335062u, 86296211u, 1085850694u, 649202596u, 3215335512u, 4279955597u, 0, SINH_TOLERANCE, 0},
+{ 666, 3226492024u, 3069064472u, 3237358008u, 23209276u, 3318045879u, 633460538u, 0, SINH_TOLERANCE, 0},
+{ 667, 1074943832u, 1867297860u, 1072956607u, 2513414118u, 1078493548u, 514140498u, 0, SINH_TOLERANCE, 0},
+{ 668, 3228513251u, 3171788768u, 3235208783u, 162138697u, 3596712783u, 3375110619u, 0, SINH_TOLERANCE, 0},
+{ 669, 1075436999u, 1245110700u, 1081653954u, 2584994077u, 1081350714u, 3674840752u, 0, SINH_TOLERANCE, 0},
+{ 670, 3226635752u, 3347226587u, 1058962932u, 2291943376u, 3331380358u, 168233073u, 0, SINH_TOLERANCE, 0},
+{ 671, 1070433398u, 966940828u, 1060726420u, 2798041096u, 1070450589u, 604350724u, 0, SINH_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1073037960u, 2035275026u, 0, SINH_TOLERANCE, 0},
+{ 673, 3228193553u, 1671039260u, 1086395032u, 3745833360u, 3537656661u, 393415964u, 0, SINH_TOLERANCE, 0},
+{ 674, 1069661709u, 651714217u, 1047070645u, 2130549237u, 1069665436u, 754279826u, 0, SINH_TOLERANCE, 0},
+{ 675, 3217601491u, 1423000172u, 3247822717u, 1551488170u, 3217611559u, 824321398u, 0, SINH_TOLERANCE, 0},
+{ 676, 3216277371u, 921077236u, 3213332351u, 1431049019u, 3216278807u, 442955679u, 0, SINH_TOLERANCE, 0},
+{ 677, 1071704599u, 655715547u, 3190985373u, 1527556471u, 1071756942u, 3766934534u, 0, SINH_TOLERANCE, 0},
+{ 678, 3222412099u, 4110878657u, 3251297180u, 879739345u, 3225885660u, 2841565138u, 0, SINH_TOLERANCE, 0},
+{ 679, 1076367578u, 2623955764u, 1093699897u, 1216444475u, 1089767499u, 3859308779u, 0, SINH_TOLERANCE, 0},
+{ 680, 1078274115u, 107442539u, 3239767031u, 1149813329u, 1135642519u, 2525054892u, 0, SINH_TOLERANCE, 0},
+{ 681, 3224008056u, 1761361082u, 3226030205u, 1121849716u, 3239115701u, 723616866u, 0, SINH_TOLERANCE, 0},
+{ 682, 3226455627u, 2534144722u, 1044223733u, 3512285706u, 3315291065u, 2831697989u, 0, SINH_TOLERANCE, 0},
+{ 683, 3218137533u, 4073670723u, 1050729852u, 3034818849u, 3218150408u, 2656123370u, 0, SINH_TOLERANCE, 0},
+{ 684, 1081013054u, 1421423503u, 1060278048u, 1397153092u, 1446153340u, 3645912721u, 0, SINH_TOLERANCE, 0},
+{ 685, 3220567557u, 1649206019u, 1104525577u, 1267104290u, 3221063989u, 1927662701u, 0, SINH_TOLERANCE, 0},
+{ 686, 3213419345u, 3775270392u, 1040251850u, 68667319u, 3213419386u, 106585308u, 0, SINH_TOLERANCE, 0},
+{ 687, 3216913812u, 3099226694u, 3254103006u, 4020102648u, 3216918410u, 3288842332u, 0, SINH_TOLERANCE, 0},
+{ 688, 3216271776u, 3718441177u, 3215643451u, 4032951536u, 3216273194u, 3806066275u, 0, SINH_TOLERANCE, 0},
+{ 689, 1066151467u, 508048351u, 3210196713u, 1707937896u, 1066151525u, 1706190291u, 0, SINH_TOLERANCE, 0},
+{ 690, 3215388843u, 2784738160u, 1073435430u, 1109346010u, 3215389346u, 3040303032u, 0, SINH_TOLERANCE, 0},
+{ 691, 3222579562u, 3331916473u, 3238794568u, 2707019594u, 3226854276u, 1245345318u, 0, SINH_TOLERANCE, 0},
+{ 692, 1078502606u, 3093165197u, 1072894805u, 2853215019u, 1146174228u, 2594603642u, 0, SINH_TOLERANCE, 0},
+{ 693, 3219727867u, 2135797997u, 1048399559u, 2941926126u, 3219902835u, 3796355665u, 0, SINH_TOLERANCE, 0},
+{ 694, 1067305348u, 2083412145u, 3249335391u, 507212448u, 1067305623u, 3450869966u, 0, SINH_TOLERANCE, 0},
+{ 695, 1074315175u, 4270176401u, 3246546709u, 3288753319u, 1076232887u, 16147134u, 0, SINH_TOLERANCE, 0},
+{ 696, 3228009919u, 3692175292u, 3197271515u, 3989064196u, 3503712304u, 3358892546u, 0, SINH_TOLERANCE, 0},
+{ 697, 3228623066u, 3111924274u, 1066772558u, 59281695u, 3627570338u, 2342955533u, 0, SINH_TOLERANCE, 0},
+{ 698, 1071878215u, 2135245466u, 3208804313u, 3846547392u, 1071959589u, 3194780737u, 0, SINH_TOLERANCE, 0},
+{ 699, 1079149171u, 972051266u, 3222814246u, 3539700586u, 1183589479u, 2607924773u, 0, SINH_TOLERANCE, 0},
+{ 700, 3216597418u, 330951080u, 1079189813u, 583922384u, 3216600144u, 2711076987u, 0, SINH_TOLERANCE, 0},
+{ 701, 1077057180u, 1711944085u, 1104170032u, 643991456u, 1099706751u, 436337679u, 0, SINH_TOLERANCE, 0},
+{ 702, 3224992365u, 2072550721u, 3250147641u, 4280263530u, 3257600938u, 2591847584u, 0, SINH_TOLERANCE, 0},
+{ 703, 3213944226u, 1566376352u, 1067251433u, 72984588u, 3213944276u, 2654082615u, 0, SINH_TOLERANCE, 0},
+{ 704, 1079547929u, 3103043079u, 1045853123u, 410067497u, 1220439527u, 692790947u, 0, SINH_TOLERANCE, 0},
+{ 705, 3219818221u, 1910366299u, 1081770885u, 634683073u, 3220024287u, 1039537981u, 0, SINH_TOLERANCE, 0},
+{ 706, 1075239232u, 2226525875u, 3224149290u, 2126302825u, 1080223828u, 982079986u, 0, SINH_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1073723582u, 3636560076u, 0, SINH_TOLERANCE, 0},
+{ 708, 1071725823u, 1953339096u, 1077176252u, 1476516558u, 1071781261u, 2888702628u, 0, SINH_TOLERANCE, 0},
+{ 709, 1072383456u, 1306277326u, 1079089150u, 4093716191u, 1072607836u, 2231508708u, 0, SINH_TOLERANCE, 0},
+{ 710, 3223711603u, 51750045u, 3242913901u, 4256866157u, 3235663411u, 3510591457u, 0, SINH_TOLERANCE, 0},
+{ 711, 3213959335u, 2163853087u, 3232053146u, 2962422808u, 3213959387u, 3617570856u, 0, SINH_TOLERANCE, 0},
+{ 712, 1074468369u, 1618388148u, 3233154824u, 3711953164u, 1076724173u, 597166289u, 0, SINH_TOLERANCE, 0},
+{ 713, 3227993634u, 357108214u, 3202294604u, 2306775262u, 3500707170u, 1996029149u, 0, SINH_TOLERANCE, 0},
+{ 714, 3216584150u, 2571356437u, 3249064063u, 2394851808u, 3216586812u, 1757386675u, 0, SINH_TOLERANCE, 0},
+{ 715, 3224196635u, 4273880094u, 1103698617u, 3578832032u, 3241272793u, 485626741u, 0, SINH_TOLERANCE, 0},
+{ 716, 3223989517u, 2091068742u, 3228270226u, 3980489730u, 3238886540u, 675743625u, 0, SINH_TOLERANCE, 0},
+{ 717, 3222725296u, 2772307714u, 1051008486u, 32546576u, 3227718950u, 101416453u, 0, SINH_TOLERANCE, 0},
+{ 718, 3225500575u, 2143788498u, 3195498043u, 3630119231u, 3271191534u, 237087314u, 0, SINH_TOLERANCE, 0},
+{ 719, 3215410151u, 2527385594u, 3240503648u, 3482095012u, 3215410676u, 1476782795u, 0, SINH_TOLERANCE, 0},
+{ 720, 3226440159u, 2690097362u, 1068598730u, 2360266862u, 3314617193u, 2847015826u, 0, SINH_TOLERANCE, 0},
+{ 721, 1070392205u, 2673272949u, 1082639557u, 522449749u, 1070408319u, 3234356539u, 0, SINH_TOLERANCE, 0},
+{ 722, 1081355475u, 3596379400u, 3242016775u, 2002293002u, 1559892600u, 3057535830u, 0, SINH_TOLERANCE, 0},
+{ 723, 1080565288u, 4113224369u, 3222122439u, 2152316893u, 1363443372u, 2667631927u, 0, SINH_TOLERANCE, 0},
+{ 724, 3220796716u, 31662602u, 1047721249u, 1747087514u, 3221410408u, 2908771441u, 0, SINH_TOLERANCE, 0},
+{ 725, 3228443661u, 2489659568u, 1097051253u, 277506957u, 3583855028u, 1518851146u, 0, SINH_TOLERANCE, 0},
+{ 726, 3213421930u, 3850162281u, 3213841942u, 438724093u, 3213421971u, 1002595616u, 0, SINH_TOLERANCE, 0},
+{ 727, 1079663895u, 2431814052u, 1075518084u, 2672434118u, 1231134099u, 340027527u, 0, SINH_TOLERANCE, 0},
+{ 728, 3227434095u, 391606792u, 1048184750u, 4168944276u, 3405033863u, 1300409563u, 0, SINH_TOLERANCE, 0},
+{ 729, 3227869472u, 457529672u, 3201090276u, 72407935u, 3477794872u, 3560882185u, 0, SINH_TOLERANCE, 0},
+{ 730, 3220817871u, 3954981400u, 1052053242u, 2411049585u, 3221437703u, 2060096171u, 0, SINH_TOLERANCE, 0},
+{ 731, 1076742907u, 485456950u, 1088415093u, 1655397424u, 1094089911u, 1354369709u, 0, SINH_TOLERANCE, 0},
+{ 732, 3215011644u, 1551748070u, 3236871640u, 1329701152u, 3215011855u, 3520772167u, 0, SINH_TOLERANCE, 0},
+{ 733, 3221493394u, 3099222537u, 1104984570u, 4293792842u, 3222829311u, 3862774079u, 0, SINH_TOLERANCE, 0},
+{ 734, 3216532617u, 3603065260u, 3197735968u, 2402359253u, 3216535037u, 3882208129u, 0, SINH_TOLERANCE, 0},
+{ 735, 3215601800u, 3961208159u, 3219057584u, 2340553876u, 3215602549u, 2108585992u, 0, SINH_TOLERANCE, 0},
+{ 736, 1073833333u, 4014841779u, 3197672877u, 3697233334u, 1074880117u, 1269717825u, 0, SINH_TOLERANCE, 0},
+{ 737, 3219567113u, 1403876392u, 3254028950u, 921363393u, 3219694981u, 977790656u, 0, SINH_TOLERANCE, 0},
+{ 738, 1082085982u, 1862576361u, 3194031708u, 2476290925u, 1829767895u, 2702820797u, 0, SINH_TOLERANCE, 0},
+{ 739, 1067487560u, 1454212851u, 1088378861u, 3400401866u, 1067487749u, 3552988746u, 0, SINH_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 1076509416u, 3567151563u, 0, SINH_TOLERANCE, 0},
+{ 741, 3219555010u, 1199568671u, 3225679997u, 46947405u, 3219679731u, 1089077561u, 0, SINH_TOLERANCE, 0},
+{ 742, 1074539809u, 2596231448u, 3253943728u, 2219151748u, 1076947313u, 1250142917u, 0, SINH_TOLERANCE, 0},
+{ 743, 1071769915u, 4119719558u, 3222036299u, 1275474618u, 1071832173u, 3278912590u, 0, SINH_TOLERANCE, 0},
+{ 744, 3226277175u, 3347296825u, 1101507910u, 1254014794u, 3307089345u, 2046925534u, 0, SINH_TOLERANCE, 0},
+{ 745, 1076779960u, 673775040u, 1070743626u, 244126093u, 1094571370u, 3392966696u, 0, SINH_TOLERANCE, 0},
+{ 746, 3216831338u, 1832066983u, 1051358028u, 3262483417u, 3216835385u, 906880532u, 0, SINH_TOLERANCE, 0},
+{ 747, 1074413872u, 3962610501u, 3198598777u, 849269178u, 1076532801u, 1295287247u, 0, SINH_TOLERANCE, 0},
+{ 748, 3224988140u, 2497516122u, 3254374111u, 2821429629u, 3257490278u, 4293280082u, 0, SINH_TOLERANCE, 0},
+{ 749, 1074139136u, 2805941787u, 3217785843u, 779131141u, 1075799904u, 2039643898u, 0, SINH_TOLERANCE, 0},
+{ 750, 3222714382u, 723423605u, 1084533420u, 627282213u, 3227667948u, 3426899714u, 0, SINH_TOLERANCE, 0},
+{ 751, 3220141984u, 4292778869u, 1078101071u, 1676860147u, 3220333842u, 115417948u, 0, SINH_TOLERANCE, 0},
+{ 752, 1074191350u, 3528118587u, 3194648564u, 2363260897u, 1075928029u, 976877107u, 0, SINH_TOLERANCE, 0},
+{ 753, 3214917975u, 1307010018u, 1061248120u, 1468743108u, 3214918308u, 3784163317u, 0, SINH_TOLERANCE, 0},
+{ 754, 3227708771u, 107905661u, 3226089788u, 1943427674u, 3448102191u, 73406449u, 0, SINH_TOLERANCE, 0},
+{ 755, 3213396365u, 760006940u, 1054265604u, 1749976597u, 3213396403u, 2790275751u, 0, SINH_TOLERANCE, 0},
+{ 756, 3225190472u, 2787503556u, 1081282610u, 1195841206u, 3262209627u, 1251355153u, 0, SINH_TOLERANCE, 0},
+{ 757, 3213822252u, 545462045u, 3208381743u, 1981311808u, 3213822329u, 4200203663u, 0, SINH_TOLERANCE, 0},
+{ 758, 1070669320u, 3657978397u, 1104463616u, 3501253426u, 1070682743u, 983473248u, 0, SINH_TOLERANCE, 0},
+{ 759, 1067709649u, 1804177501u, 3210693633u, 3606766729u, 1067709980u, 2574179964u, 0, SINH_TOLERANCE, 0},
+{ 760, 1074759727u, 1336278526u, 1043741618u, 3165279431u, 1077525747u, 3006481726u, 0, SINH_TOLERANCE, 0},
+{ 761, 1069103403u, 1599382075u, 1058018527u, 4212580517u, 1069106079u, 1072511966u, 0, SINH_TOLERANCE, 0},
+{ 762, 3217988086u, 3007589929u, 3202026547u, 2792028313u, 3218007245u, 3332316496u, 0, SINH_TOLERANCE, 0},
+{ 763, 3228965522u, 1866066996u, 1060329048u, 3727175322u, 3754078725u, 1771558986u, 0, SINH_TOLERANCE, 0},
+{ 764, 3215193859u, 150890940u, 1056025306u, 3082724735u, 3215194190u, 2754183182u, 0, SINH_TOLERANCE, 0},
+{ 765, 1071446123u, 80400395u, 1093584426u, 3478941315u, 1071511628u, 3523257202u, 0, SINH_TOLERANCE, 0},
+{ 766, 3228571942u, 4050954182u, 3219263194u, 2537475930u, 3608688426u, 405562207u, 0, SINH_TOLERANCE, 0},
+{ 767, 1071133327u, 2881752155u, 3212589299u, 2559651278u, 1071171380u, 1056997979u, 0, SINH_TOLERANCE, 0},
+{ 768, 3228044784u, 440309030u, 3214267461u, 3788040806u, 3510153348u, 3272529857u, 0, SINH_TOLERANCE, 0},
+{ 769, 1080553671u, 918813144u, 3208535698u, 1607035904u, 1361304066u, 4120585298u, 0, SINH_TOLERANCE, 0},
+{ 770, 1066254699u, 2497054124u, 1089139147u, 2549609010u, 1066254768u, 815089803u, 0, SINH_TOLERANCE, 0},
+{ 771, 1066960585u, 790219083u, 1054657139u, 2797979479u, 1066960738u, 3757904356u, 0, SINH_TOLERANCE, 0},
+{ 772, 1070364312u, 1149462078u, 1095765205u, 3879963182u, 1070379723u, 1998424973u, 0, SINH_TOLERANCE, 0},
+{ 773, 3216361301u, 2684353926u, 3205212854u, 1732474928u, 3216363023u, 3802316127u, 0, SINH_TOLERANCE, 0},
+{ 774, 1079508325u, 2742237025u, 1051317716u, 3386396147u, 1216722133u, 1976234612u, 0, SINH_TOLERANCE, 0},
+{ 775, 1071619594u, 3408320912u, 1103071166u, 4233059513u, 1071674792u, 2816507100u, 0, SINH_TOLERANCE, 0},
+{ 776, 1071155004u, 1077495917u, 1088399968u, 433115118u, 1071194646u, 2074456499u, 0, SINH_TOLERANCE, 0},
+{ 777, 3217130484u, 841366493u, 1051716814u, 4121125128u, 3217134069u, 4021865308u, 0, SINH_TOLERANCE, 0},
+{ 778, 1070923540u, 321857207u, 1089128010u, 1149988239u, 1070948356u, 2360289704u, 0, SINH_TOLERANCE, 0},
+{ 779, 3226668295u, 799866606u, 3197637091u, 3924438208u, 3334384164u, 3227583322u, 0, SINH_TOLERANCE, 0},
+{ 780, 3213082986u, 2002049816u, 1077053447u, 2240354761u, 3213083006u, 2340324638u, 0, SINH_TOLERANCE, 0},
+{ 781, 3222714827u, 478939968u, 1097035749u, 1066716440u, 3227669986u, 2910722967u, 0, SINH_TOLERANCE, 0},
+{ 782, 3224085033u, 1653104725u, 1088548129u, 81977716u, 3240005112u, 1441361965u, 0, SINH_TOLERANCE, 0},
+{ 783, 3215735644u, 3899475018u, 3189694084u, 3330093036u, 3215736582u, 2708903464u, 0, SINH_TOLERANCE, 0},
+{ 784, 1077778247u, 2612450289u, 1079065127u, 603380842u, 1116328756u, 409577748u, 0, SINH_TOLERANCE, 0},
+{ 785, 1080713847u, 3962735564u, 1101570429u, 1372490825u, 1390866750u, 1157784041u, 0, SINH_TOLERANCE, 0},
+{ 786, 1069486080u, 1479841439u, 1059312257u, 541504905u, 1069491079u, 1220268850u, 0, SINH_TOLERANCE, 0},
+{ 787, 1075516450u, 2626148789u, 1057571099u, 4121656076u, 1081817123u, 2807947775u, 0, SINH_TOLERANCE, 0},
+{ 788, 1075321933u, 1902560314u, 1043130231u, 3557671562u, 1080683447u, 2923202064u, 0, SINH_TOLERANCE, 0},
+{ 789, 3214801292u, 41779312u, 1081626342u, 831171823u, 3214801572u, 2419721377u, 0, SINH_TOLERANCE, 0},
+{ 790, 1069665436u, 1393168821u, 1066457405u, 1381616968u, 1069669199u, 1403219285u, 0, SINH_TOLERANCE, 0},
+{ 791, 1073386717u, 3756584649u, 3222267229u, 1423157432u, 1074024022u, 3148225902u, 0, SINH_TOLERANCE, 0},
+{ 792, 3229269850u, 1894912556u, 1042426694u, 155024547u, 3866449360u, 945429025u, 0, SINH_TOLERANCE, 0},
+{ 793, 3214327880u, 35164295u, 3203391785u, 1037041084u, 3214328002u, 2922798137u, 0, SINH_TOLERANCE, 0},
+{ 794, 1076388871u, 3957875950u, 3232195211u, 1590756436u, 1090004859u, 3120429035u, 0, SINH_TOLERANCE, 0},
+{ 795, 1071990050u, 1447585080u, 1071279485u, 1107922438u, 1072094986u, 196039264u, 0, SINH_TOLERANCE, 0},
+{ 796, 1067224038u, 981897615u, 1051856116u, 430357614u, 1067224280u, 2390208411u, 0, SINH_TOLERANCE, 0},
+{ 797, 3222281335u, 395145384u, 3219821938u, 50586510u, 3225161542u, 3740943084u, 0, SINH_TOLERANCE, 0},
+{ 798, 1072921640u, 750827797u, 1082862669u, 230466783u, 1073261527u, 1672613981u, 0, SINH_TOLERANCE, 0},
+{ 799, 1077231635u, 1365083575u, 3204848310u, 1700831722u, 1103707567u, 2384443675u, 0, SINH_TOLERANCE, 0},
+{ 800, 3220187542u, 344241827u, 1071538935u, 2715566077u, 3220377099u, 1385546430u, 0, SINH_TOLERANCE, 0},
+{ 801, 3227659912u, 4069301823u, 3193208760u, 2949125229u, 3439117055u, 3577170264u, 0, SINH_TOLERANCE, 0},
+{ 802, 1081211291u, 3585711710u, 1065801594u, 2302229267u, 1506690422u, 4025253862u, 0, SINH_TOLERANCE, 0},
+{ 803, 3214041900u, 709803845u, 1048741487u, 2296910194u, 3214041964u, 3967177357u, 0, SINH_TOLERANCE, 0},
+{ 804, 3214252299u, 744421179u, 1069302001u, 2659232829u, 3214252404u, 515290522u, 0, SINH_TOLERANCE, 0},
+{ 805, 1078155904u, 1799949903u, 3192522886u, 4212149209u, 1130147983u, 2298972399u, 0, SINH_TOLERANCE, 0},
+{ 806, 3217642838u, 145234164u, 3250614064u, 912384201u, 3217653698u, 899910502u, 0, SINH_TOLERANCE, 0},
+{ 807, 3225830600u, 2784620507u, 1102812948u, 3531481022u, 3286438912u, 414543568u, 0, SINH_TOLERANCE, 0},
+{ 808, 3229139567u, 383952592u, 3205659905u, 3633194728u, 3818327251u, 1189342136u, 0, SINH_TOLERANCE, 0},
+{ 809, 3216059164u, 3792395543u, 1070072378u, 3864816376u, 3216060008u, 2074660971u, 0, SINH_TOLERANCE, 0},
+{ 810, 3217899185u, 2115553675u, 1066288499u, 3538377867u, 3217915903u, 3457964625u, 0, SINH_TOLERANCE, 0},
+{ 811, 3229006513u, 1230026762u, 1090719723u, 440819880u, 3769193195u, 2644861228u, 0, SINH_TOLERANCE, 0},
+{ 812, 3214518020u, 2991290482u, 1096886719u, 1097971167u, 3214518196u, 2320636781u, 0, SINH_TOLERANCE, 0},
+{ 813, 1077465688u, 1098035020u, 3230900504u, 1479059095u, 1109134739u, 1050435763u, 0, SINH_TOLERANCE, 0},
+{ 814, 3229036868u, 1719428427u, 3188631907u, 3707377409u, 3780408200u, 1550018828u, 0, SINH_TOLERANCE, 0},
+{ 815, 1068964805u, 3748932896u, 1084908557u, 1325384361u, 1068966863u, 1610285566u, 0, SINH_TOLERANCE, 0},
+{ 816, 1076315468u, 3979168763u, 1057455255u, 2454615952u, 1089181690u, 2956799202u, 0, SINH_TOLERANCE, 0},
+{ 817, 1068835624u, 1449164578u, 1056960316u, 1654931641u, 1068837198u, 3670878842u, 0, SINH_TOLERANCE, 0},
+{ 818, 1073536162u, 2120487381u, 3226298974u, 2364226633u, 1074242104u, 2525198454u, 0, SINH_TOLERANCE, 0},
+{ 819, 1074022852u, 1074268944u, 1065730444u, 280016852u, 1075386792u, 430163762u, 0, SINH_TOLERANCE, 0},
+{ 820, 3216036896u, 3315127889u, 3236295594u, 2900924954u, 3216037691u, 1125117057u, 0, SINH_TOLERANCE, 0},
+{ 821, 3215300259u, 2246037502u, 1049691002u, 1496066550u, 3215300678u, 3392890991u, 0, SINH_TOLERANCE, 0},
+{ 822, 3213978379u, 4191285446u, 3217936236u, 2382392789u, 3213978435u, 102310527u, 0, SINH_TOLERANCE, 0},
+{ 823, 1078153244u, 640099844u, 1042152237u, 2064279383u, 1130001370u, 3369789477u, 0, SINH_TOLERANCE, 0},
+{ 824, 1075719134u, 3468560824u, 1093251038u, 310958750u, 1083014333u, 4134353953u, 0, SINH_TOLERANCE, 0},
+{ 825, 1080011184u, 1413568905u, 1100941106u, 1627289946u, 1263163319u, 2702685927u, 0, SINH_TOLERANCE, 0},
+{ 826, 3213569646u, 3797143370u, 3195497539u, 3843275034u, 3213569699u, 783110865u, 0, SINH_TOLERANCE, 0},
+{ 827, 3229008721u, 2806642640u, 3201943068u, 2515980718u, 3770004903u, 1495856927u, 0, SINH_TOLERANCE, 0},
+{ 828, 1077440132u, 632580632u, 1078673506u, 3259601317u, 1108541069u, 1728707154u, 0, SINH_TOLERANCE, 0},
+{ 829, 3216709215u, 3309678799u, 1049337078u, 3056787074u, 3216712530u, 367130729u, 0, SINH_TOLERANCE, 0},
+{ 830, 3221495289u, 2341164249u, 1080834967u, 2810890005u, 3222835195u, 3103339375u, 0, SINH_TOLERANCE, 0},
+{ 831, 1072262554u, 932124675u, 1093915797u, 662682630u, 1072443551u, 4229086386u, 0, SINH_TOLERANCE, 0},
+{ 832, 3228258571u, 1367996113u, 3251723684u, 2974064663u, 3549650785u, 835372527u, 0, SINH_TOLERANCE, 0},
+{ 833, 1074987851u, 323437999u, 1090499064u, 901457511u, 1078787243u, 3515686768u, 0, SINH_TOLERANCE, 0},
+{ 834, 3225293116u, 4184941840u, 3196770014u, 2458988443u, 3264531175u, 356853259u, 0, SINH_TOLERANCE, 0},
+{ 835, 1077132524u, 2023065054u, 3211994098u, 2734612965u, 1101414558u, 3575590741u, 0, SINH_TOLERANCE, 0},
+{ 836, 1071414726u, 3679267365u, 3237728785u, 1699558211u, 1071477015u, 2039647773u, 0, SINH_TOLERANCE, 0},
+{ 837, 1077593250u, 1826799031u, 1078709629u, 3986905229u, 1112051516u, 1053308024u, 0, SINH_TOLERANCE, 0},
+{ 838, 1068572425u, 351061688u, 3194386466u, 4105857588u, 1068573261u, 3201727870u, 0, SINH_TOLERANCE, 0},
+{ 839, 1068808070u, 1365244058u, 1064457319u, 1452191426u, 1068809552u, 3074969805u, 0, SINH_TOLERANCE, 0},
+{ 840, 1071462417u, 2463030625u, 3215975031u, 3773488326u, 1071529636u, 1483496502u, 0, SINH_TOLERANCE, 0},
+{ 841, 3229256575u, 752664055u, 1065110394u, 1835931663u, 3861558766u, 149401169u, 0, SINH_TOLERANCE, 0},
+{ 842, 1077559328u, 3496172149u, 1089617208u, 109068701u, 1111311801u, 1798297128u, 0, SINH_TOLERANCE, 0},
+{ 843, 3215960879u, 1636966254u, 1086098766u, 2016598298u, 3215962202u, 4285192238u, 0, SINH_TOLERANCE, 0},
+{ 844, 1067708534u, 3551516956u, 1097969102u, 1317953425u, 1067708865u, 687794695u, 0, SINH_TOLERANCE, 0},
+{ 845, 3223540761u, 2977627788u, 1045339018u, 516058480u, 3233726552u, 2028828902u, 0, SINH_TOLERANCE, 0},
+{ 846, 3224825666u, 3901731263u, 3189566462u, 32272932u, 3253797012u, 1335776681u, 0, SINH_TOLERANCE, 0},
+{ 847, 1074136068u, 1956025297u, 3246628529u, 3840733905u, 1075787798u, 854989918u, 0, SINH_TOLERANCE, 0},
+{ 848, 1080943668u, 561057891u, 3198494340u, 4271027193u, 1433394156u, 930486357u, 0, SINH_TOLERANCE, 0},
+{ 849, 3228909825u, 692989850u, 3242630588u, 2492225971u, 3733478938u, 319542345u, 0, SINH_TOLERANCE, 0},
+{ 850, 3218062309u, 3439913962u, 1067477011u, 2973333638u, 3218081712u, 867511843u, 0, SINH_TOLERANCE, 0},
+{ 851, 3219236869u, 877613377u, 1044917899u, 809672798u, 3219296481u, 3651531999u, 0, SINH_TOLERANCE, 0},
+{ 852, 3222171454u, 905426932u, 1046417457u, 1086320855u, 3224793000u, 3821373822u, 0, SINH_TOLERANCE, 0},
+{ 853, 3227472261u, 2645567288u, 1051258339u, 557182478u, 3408564878u, 3197735669u, 0, SINH_TOLERANCE, 0},
+{ 854, 3216640862u, 186287752u, 1061342054u, 4054003419u, 3216643807u, 4015504910u, 0, SINH_TOLERANCE, 0},
+{ 855, 1079440881u, 3506889716u, 3243866036u, 519056371u, 1210492348u, 931610429u, 0, SINH_TOLERANCE, 0},
+{ 856, 1065722725u, 2171898436u, 3246911982u, 1091500784u, 1065722751u, 3820650239u, 0, SINH_TOLERANCE, 0},
+{ 857, 3226870457u, 368493885u, 3222871893u, 1419055230u, 3353000072u, 2259354588u, 0, SINH_TOLERANCE, 0},
+{ 858, 1078319084u, 2010971245u, 3188804530u, 1518695799u, 1137724679u, 3191526077u, 0, SINH_TOLERANCE, 0},
+{ 859, 3218009421u, 1239207795u, 1040192984u, 2199481342u, 3218029199u, 2350238601u, 0, SINH_TOLERANCE, 0},
+{ 860, 3218318669u, 4264613432u, 3203460972u, 3558930895u, 3218338985u, 317208076u, 0, SINH_TOLERANCE, 0},
+{ 861, 1068125075u, 3772748958u, 3227667376u, 309688336u, 1068125833u, 2330123942u, 0, SINH_TOLERANCE, 0},
+{ 862, 3223403009u, 1077949160u, 1075769893u, 2405271377u, 3232071765u, 350852587u, 0, SINH_TOLERANCE, 0},
+{ 863, 1078203664u, 3751608506u, 3232278094u, 930375071u, 1132383966u, 338172682u, 0, SINH_TOLERANCE, 0},
+{ 864, 3215394369u, 1518334131u, 3205247482u, 791756713u, 3215394877u, 4212233229u, 0, SINH_TOLERANCE, 0},
+{ 865, 1067240397u, 2825203170u, 3245054001u, 1822981827u, 1067240646u, 1712540094u, 0, SINH_TOLERANCE, 0},
+{ 866, 1080093419u, 514474738u, 1089072073u, 3300845441u, 1276320656u, 226623888u, 0, SINH_TOLERANCE, 0},
+{ 867, 3219536978u, 247369460u, 3197320093u, 687450958u, 3219657109u, 624558761u, 0, SINH_TOLERANCE, 0},
+{ 868, 1081092750u, 2722237629u, 1058272368u, 90602316u, 1462892401u, 1953188388u, 0, SINH_TOLERANCE, 0},
+{ 869, 3217535619u, 1845900544u, 3231520830u, 3389751458u, 3217544506u, 1440867092u, 0, SINH_TOLERANCE, 0},
+{ 870, 3227612301u, 737689911u, 3195377751u, 3462616966u, 3430287037u, 893857503u, 0, SINH_TOLERANCE, 0},
+{ 871, 3221441232u, 3620285831u, 1055501023u, 2708056059u, 3222675304u, 2106802669u, 0, SINH_TOLERANCE, 0},
+{ 872, 3220513572u, 4073430285u, 1056206159u, 172017902u, 3220953167u, 1600993442u, 0, SINH_TOLERANCE, 0},
+{ 873, 3219161094u, 2799176222u, 1052706894u, 4083892667u, 3219209652u, 2457225002u, 0, SINH_TOLERANCE, 0},
+{ 874, 3216959621u, 1562351330u, 1069705601u, 1247765260u, 3216964546u, 771831832u, 0, SINH_TOLERANCE, 0},
+{ 875, 3224328691u, 51853475u, 3189080201u, 2783553144u, 3242754625u, 3427601173u, 0, SINH_TOLERANCE, 0},
+{ 876, 3220502929u, 3851781549u, 3241598113u, 514064046u, 3220931898u, 3142654688u, 0, SINH_TOLERANCE, 0},
+{ 877, 1080123021u, 934745487u, 3248182437u, 2798581921u, 1281762996u, 865963855u, 0, SINH_TOLERANCE, 0},
+{ 878, 3219373949u, 2948648757u, 3232177250u, 4278702895u, 3219457676u, 2491307120u, 0, SINH_TOLERANCE, 0},
+{ 879, 1073534300u, 4259101461u, 1061606772u, 84229920u, 1074239204u, 580103907u, 0, SINH_TOLERANCE, 0},
+{ 880, 3215901351u, 3891230598u, 1095924595u, 3049217547u, 3215902564u, 3665629963u, 0, SINH_TOLERANCE, 0},
+{ 881, 1074207325u, 3806018919u, 3243191216u, 280177341u, 1075963455u, 2847923212u, 0, SINH_TOLERANCE, 0},
+{ 882, 1070061714u, 3900344258u, 1063647809u, 4206745890u, 1070070770u, 1401723920u, 0, SINH_TOLERANCE, 0},
+{ 883, 3222464456u, 2126253040u, 3207248026u, 808507485u, 3226220527u, 3700151387u, 0, SINH_TOLERANCE, 0},
+{ 884, 1076653133u, 3465685634u, 3230391053u, 3754958214u, 1093053515u, 3736094795u, 0, SINH_TOLERANCE, 0},
+{ 885, 1080840988u, 461094531u, 1101110393u, 1316091396u, 1414403053u, 3462873770u, 0, SINH_TOLERANCE, 0},
+{ 886, 1071271770u, 4197635149u, 1091873113u, 1240127141u, 1071320748u, 3391833457u, 0, SINH_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 1076285526u, 455739145u, 0, SINH_TOLERANCE, 0},
+{ 888, 3219720621u, 3744663425u, 3212482771u, 953662066u, 3219893246u, 213316512u, 0, SINH_TOLERANCE, 0},
+{ 889, 1076782697u, 3564196690u, 3228101916u, 904305212u, 1094612637u, 2831821231u, 0, SINH_TOLERANCE, 0},
+{ 890, 1067207479u, 3566257266u, 3235138829u, 2734275140u, 1067207715u, 3351864665u, 0, SINH_TOLERANCE, 0},
+{ 891, 3227171261u, 606044282u, 3241318094u, 2446416887u, 3380787895u, 534441612u, 0, SINH_TOLERANCE, 0},
+{ 892, 1065744532u, 2336116589u, 3197594053u, 2296925138u, 1065744560u, 703498347u, 0, SINH_TOLERANCE, 0},
+{ 893, 1070101995u, 907670625u, 3240769036u, 1827119006u, 1070111769u, 3977968189u, 0, SINH_TOLERANCE, 0},
+{ 894, 1066487279u, 2818710946u, 3246059905u, 553394170u, 1066487333u, 2719249357u, 0, SINH_TOLERANCE, 0},
+{ 895, 3213621342u, 4099522736u, 3232742168u, 3718083858u, 3213621399u, 4034499170u, 0, SINH_TOLERANCE, 0},
+{ 896, 1078739788u, 1059279404u, 1080245336u, 175941677u, 1157065361u, 1087430260u, 0, SINH_TOLERANCE, 0},
+{ 897, 1082121019u, 1650862428u, 1061816101u, 1723201723u, 1842630885u, 3875297949u, 0, SINH_TOLERANCE, 0},
+{ 898, 3226429902u, 2462163405u, 3218946201u, 3876535372u, 3314085212u, 774021558u, 0, SINH_TOLERANCE, 0},
+{ 899, 1076004278u, 495844137u, 1073721460u, 772777946u, 1085574307u, 2998548290u, 0, SINH_TOLERANCE, 0},
+{ 900, 1068143970u, 458757721u, 3245680321u, 3609892707u, 1068144752u, 4160609393u, 0, SINH_TOLERANCE, 0},
+{ 901, 3214254476u, 2533012202u, 1079980803u, 3592268374u, 3214254582u, 92328355u, 0, SINH_TOLERANCE, 0},
+{ 902, 3216996268u, 4108274117u, 1063045844u, 571992389u, 3217001466u, 334148198u, 0, SINH_TOLERANCE, 0},
+{ 903, 1077984359u, 3541110973u, 1096296754u, 3118427427u, 1122209571u, 2499543662u, 0, SINH_TOLERANCE, 0},
+{ 904, 3213902987u, 1213941007u, 1105433735u, 2172963370u, 3213903032u, 549423227u, 0, SINH_TOLERANCE, 0},
+{ 905, 1079027567u, 272190288u, 1095452370u, 4026581530u, 1172388533u, 1567535437u, 0, SINH_TOLERANCE, 0},
+{ 906, 1079855269u, 2843638672u, 1100510986u, 3190536898u, 1248839882u, 1134925313u, 0, SINH_TOLERANCE, 0},
+{ 907, 1076417062u, 2014317727u, 3247389683u, 2428462015u, 1090384705u, 358670345u, 0, SINH_TOLERANCE, 0},
+{ 908, 1078248077u, 688442200u, 1047852515u, 3035186380u, 1134419607u, 2761855333u, 0, SINH_TOLERANCE, 0},
+{ 909, 1074567060u, 1010095511u, 3221288076u, 405287991u, 1077006544u, 3401859869u, 0, SINH_TOLERANCE, 0},
+{ 910, 3229225943u, 2983070435u, 1089546472u, 2907918480u, 3850300069u, 3410875852u, 0, SINH_TOLERANCE, 0},
+{ 911, 1076696665u, 81928569u, 1056007286u, 2740556321u, 1093638835u, 274382606u, 0, SINH_TOLERANCE, 0},
+{ 912, 1066276691u, 2076689028u, 1081558619u, 3039159031u, 1066276762u, 1887214086u, 0, SINH_TOLERANCE, 0},
+{ 913, 1067230382u, 1376882094u, 3211003208u, 1296286481u, 1067230627u, 524698425u, 0, SINH_TOLERANCE, 0},
+{ 914, 1074871434u, 744133164u, 3200943494u, 955832216u, 1078105892u, 3863653122u, 0, SINH_TOLERANCE, 0},
+{ 915, 3223144598u, 176522478u, 1069999908u, 2891249491u, 3230113321u, 799066876u, 0, SINH_TOLERANCE, 0},
+{ 916, 1065584698u, 3685851715u, 3187829932u, 2363997529u, 1065584718u, 1131714439u, 0, SINH_TOLERANCE, 0},
+{ 917, 1065409879u, 3974431579u, 1052505165u, 2589067816u, 1065409892u, 1788656707u, 0, SINH_TOLERANCE, 0},
+{ 918, 3213516885u, 3819109588u, 1048561488u, 969143351u, 3213516933u, 2906528092u, 0, SINH_TOLERANCE, 0},
+{ 919, 1073687973u, 4246896124u, 1104584799u, 1940097860u, 1074495933u, 3339427809u, 0, SINH_TOLERANCE, 0},
+{ 920, 1066912836u, 2228686199u, 3220231833u, 777624847u, 1066912976u, 3933366482u, 0, SINH_TOLERANCE, 0},
+{ 921, 3224127274u, 4189906558u, 3203004203u, 854242364u, 3240433205u, 959703078u, 0, SINH_TOLERANCE, 0},
+{ 922, 1081890311u, 4089051094u, 3227282692u, 2693170723u, 1757476753u, 2188757040u, 0, SINH_TOLERANCE, 0},
+{ 923, 1066855127u, 1278581412u, 3239296746u, 1774588717u, 1066855252u, 2916172410u, 0, SINH_TOLERANCE, 0},
+{ 924, 3221324110u, 1794845306u, 1104879344u, 4135865182u, 3222379752u, 3960615017u, 0, SINH_TOLERANCE, 0},
+{ 925, 1081283231u, 754938390u, 1061291430u, 2010786993u, 1533223782u, 1531468649u, 0, SINH_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 1074314128u, 1858315335u, 0, SINH_TOLERANCE, 0},
+{ 927, 3224109162u, 567588900u, 3195452230u, 1421366017u, 3240254842u, 1959108089u, 0, SINH_TOLERANCE, 0},
+{ 928, 3221944027u, 2708717091u, 1071975971u, 1364590470u, 3224178507u, 3057785531u, 0, SINH_TOLERANCE, 0},
+{ 929, 3229068611u, 3461956134u, 3207820115u, 1605709634u, 3792121353u, 436547866u, 0, SINH_TOLERANCE, 0},
+{ 930, 1071594452u, 1497124553u, 1051715442u, 916736957u, 1071660675u, 979412255u, 0, SINH_TOLERANCE, 0},
+{ 931, 1070002699u, 834914365u, 1064667143u, 2839166298u, 1070010765u, 4019658237u, 0, SINH_TOLERANCE, 0},
+{ 932, 1069862861u, 2139295776u, 1062816721u, 914592523u, 1069868878u, 3762302537u, 0, SINH_TOLERANCE, 0},
+{ 933, 3213754179u, 851569132u, 1058503154u, 1399378677u, 3213754249u, 2109993391u, 0, SINH_TOLERANCE, 0},
+{ 934, 3224100513u, 3897202342u, 3245382590u, 246600375u, 3240177992u, 2855945978u, 0, SINH_TOLERANCE, 0},
+{ 935, 3222314580u, 3620429520u, 1055627557u, 229305u, 3225410341u, 2600224110u, 0, SINH_TOLERANCE, 0},
+{ 936, 1076618801u, 3641997865u, 3206673888u, 93720614u, 1092711110u, 70901104u, 0, SINH_TOLERANCE, 0},
+{ 937, 3222565555u, 32766320u, 1062084905u, 3668443038u, 3226779630u, 843791256u, 0, SINH_TOLERANCE, 0},
+{ 938, 3222250420u, 2039713492u, 3248699388u, 1346210821u, 3225032231u, 3912440241u, 0, SINH_TOLERANCE, 0},
+{ 939, 1078369952u, 1335820726u, 3191756860u, 1808427032u, 1140014824u, 1082588104u, 0, SINH_TOLERANCE, 0},
+{ 940, 1070879947u, 650692001u, 1103515670u, 2253348763u, 1070902471u, 1759700474u, 0, SINH_TOLERANCE, 0},
+{ 941, 3213415283u, 2372623300u, 3210185343u, 3200572848u, 3213415323u, 1713775980u, 0, SINH_TOLERANCE, 0},
+{ 942, 1080873125u, 762317532u, 3194595095u, 3192607437u, 1420280283u, 2571597720u, 0, SINH_TOLERANCE, 0},
+{ 943, 1070651309u, 217775356u, 3232827087u, 2969367386u, 1070664093u, 3271935470u, 0, SINH_TOLERANCE, 0},
+{ 944, 1069755463u, 3621353969u, 1077994795u, 3873976266u, 1069760167u, 3476394269u, 0, SINH_TOLERANCE, 0},
+{ 945, 1078719075u, 268372152u, 3221764390u, 3216978962u, 1156113361u, 77208680u, 0, SINH_TOLERANCE, 0},
+{ 946, 3227563243u, 142942404u, 1075322987u, 1746449109u, 3421259445u, 1613517009u, 0, SINH_TOLERANCE, 0},
+{ 947, 1081986200u, 496534875u, 3254522293u, 2532372502u, 1792868955u, 1796814503u, 0, SINH_TOLERANCE, 0},
+{ 948, 3228205445u, 2999955409u, 3222793392u, 1868977643u, 3539879421u, 861578698u, 0, SINH_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 1076243608u, 4084542960u, 0, SINH_TOLERANCE, 0},
+{ 950, 1072413103u, 73646871u, 3231442171u, 3711510104u, 1072649120u, 3359020356u, 0, SINH_TOLERANCE, 0},
+{ 951, 1077900612u, 218135177u, 3198908856u, 3082199105u, 1119150740u, 3713509082u, 0, SINH_TOLERANCE, 0},
+{ 952, 1072262784u, 1061628117u, 3248859043u, 86776158u, 1072443858u, 2376683037u, 0, SINH_TOLERANCE, 0},
+{ 953, 3217921858u, 938869114u, 1087911145u, 2416710759u, 3217939177u, 4171102818u, 0, SINH_TOLERANCE, 0},
+{ 954, 1079848192u, 2970853959u, 3239543429u, 1887505029u, 1248109254u, 3136433410u, 0, SINH_TOLERANCE, 0},
+{ 955, 3225145875u, 1337895935u, 1076463812u, 1172733328u, 3261175537u, 31768603u, 0, SINH_TOLERANCE, 0},
+{ 956, 1068014296u, 1469010822u, 3229583535u, 551399515u, 1068014917u, 303583273u, 0, SINH_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 1075718382u, 393946761u, 0, SINH_TOLERANCE, 0},
+{ 958, 3226410140u, 2976596113u, 3192137295u, 3033242648u, 3313190593u, 2523414676u, 0, SINH_TOLERANCE, 0},
+{ 959, 1079824113u, 876810930u, 3197470945u, 2571587447u, 1245903887u, 1889039904u, 0, SINH_TOLERANCE, 0},
+{ 960, 3226042170u, 4007797282u, 3225853845u, 4069319648u, 3296181101u, 4203630871u, 0, SINH_TOLERANCE, 0},
+{ 961, 1067202926u, 3840538373u, 1043189552u, 3668774580u, 1067203161u, 474385453u, 0, SINH_TOLERANCE, 0},
+{ 962, 3220757432u, 200857661u, 3229758439u, 3359367736u, 3221361049u, 705632935u, 0, SINH_TOLERANCE, 0},
+{ 963, 3227826349u, 111868139u, 3227902082u, 2366064003u, 3469858676u, 1662095535u, 0, SINH_TOLERANCE, 0},
+{ 964, 1066215262u, 3510904416u, 3222131653u, 3822770497u, 1066215327u, 1490099292u, 0, SINH_TOLERANCE, 0},
+{ 965, 3226947075u, 789151814u, 1099269239u, 2958956055u, 3360058035u, 2807768454u, 0, SINH_TOLERANCE, 0},
+{ 966, 1076290712u, 722163228u, 1105524559u, 1534462169u, 1088870444u, 2167255734u, 0, SINH_TOLERANCE, 0},
+{ 967, 1066509006u, 2207037106u, 3208952465u, 1231254630u, 1066509063u, 2804126656u, 0, SINH_TOLERANCE, 0},
+{ 968, 3215709852u, 3838689849u, 3198769679u, 1302617170u, 3215710751u, 4042008026u, 0, SINH_TOLERANCE, 0},
+{ 969, 1076501722u, 2527556476u, 3240373426u, 124352692u, 1091342710u, 1779709388u, 0, SINH_TOLERANCE, 0},
+{ 970, 3215269445u, 3502371499u, 1043411944u, 4190072016u, 3215269838u, 1199602531u, 0, SINH_TOLERANCE, 0},
+{ 971, 1070967598u, 1798470077u, 3200116917u, 3421833729u, 1070994885u, 1525253159u, 0, SINH_TOLERANCE, 0},
+{ 972, 3214486476u, 3653237931u, 3204255012u, 3683870669u, 3214486642u, 4211787665u, 0, SINH_TOLERANCE, 0},
+{ 973, 1069317222u, 376530104u, 1073853547u, 565755892u, 1069321076u, 4082953569u, 0, SINH_TOLERANCE, 0},
+{ 974, 3226775211u, 558292492u, 1051772749u, 4267873474u, 3344199543u, 131886187u, 0, SINH_TOLERANCE, 0},
+{ 975, 3221626981u, 509637100u, 3212030069u, 215050379u, 3223300224u, 3430243983u, 0, SINH_TOLERANCE, 0},
+{ 976, 1078425613u, 3571665665u, 3188628584u, 757824767u, 1142574424u, 253046892u, 0, SINH_TOLERANCE, 0},
+{ 977, 3220042217u, 998858159u, 1063077962u, 436029885u, 3220259168u, 840166219u, 0, SINH_TOLERANCE, 0},
+{ 978, 3217481301u, 996300405u, 3193842624u, 80548098u, 3217489286u, 4097607243u, 0, SINH_TOLERANCE, 0},
+{ 979, 3222557384u, 3876129407u, 3215332180u, 2226970413u, 3226737898u, 3835235292u, 0, SINH_TOLERANCE, 0},
+{ 980, 3225026041u, 200013509u, 3224552716u, 414878724u, 3258358576u, 1169612687u, 0, SINH_TOLERANCE, 0},
+{ 981, 3224325637u, 309319541u, 1048979765u, 1261662434u, 3242717634u, 817191663u, 0, SINH_TOLERANCE, 0},
+{ 982, 1077718303u, 4062255924u, 3224274128u, 4289485681u, 1114943885u, 3449799183u, 0, SINH_TOLERANCE, 0},
+{ 983, 3224601748u, 1611969213u, 1053890378u, 3774617276u, 3248610102u, 3591228803u, 0, SINH_TOLERANCE, 0},
+{ 984, 1075169883u, 1752164782u, 3239587974u, 612223386u, 1079838304u, 549802351u, 0, SINH_TOLERANCE, 0},
+{ 985, 1065663030u, 2024044989u, 1074932678u, 3259111307u, 1065663053u, 2841083817u, 0, SINH_TOLERANCE, 0},
+{ 986, 1068936158u, 2564965629u, 1093571065u, 169360454u, 1068938101u, 2166799640u, 0, SINH_TOLERANCE, 0},
+{ 987, 1077016178u, 1860101737u, 3191222372u, 1676437468u, 1098787212u, 2272979214u, 0, SINH_TOLERANCE, 0},
+{ 988, 1070288728u, 588387057u, 3192103292u, 2495288012u, 1070302338u, 754215119u, 0, SINH_TOLERANCE, 0},
+{ 989, 3214127225u, 659070058u, 1073095700u, 1393632068u, 3214127304u, 2856651075u, 0, SINH_TOLERANCE, 0},
+{ 990, 3220828991u, 4276187829u, 3217553330u, 1868253275u, 3221452255u, 1644756000u, 0, SINH_TOLERANCE, 0},
+{ 991, 3222171696u, 2085481575u, 3215994784u, 800910002u, 3224793681u, 798995151u, 0, SINH_TOLERANCE, 0},
+{ 992, 1069517748u, 1950570756u, 3200582211u, 941022151u, 1069522984u, 1964003731u, 0, SINH_TOLERANCE, 0},
+{ 993, 1070113280u, 2075610870u, 3250142022u, 3605152103u, 1070123263u, 1505468039u, 0, SINH_TOLERANCE, 0},
+{ 994, 3216567890u, 3792931748u, 3204857863u, 804393211u, 3216570474u, 3250710556u, 0, SINH_TOLERANCE, 0},
+{ 995, 3229529122u, 3430071177u, 3226288311u, 3652522729u, 3962218246u, 874872258u, 0, SINH_TOLERANCE, 0},
+{ 996, 3215994766u, 236884699u, 3227874605u, 2193269825u, 3215995472u, 3941351343u, 0, SINH_TOLERANCE, 0},
+{ 997, 1071228049u, 2744231849u, 1046186036u, 771053722u, 1071273376u, 870874424u, 0, SINH_TOLERANCE, 0},
+{ 998, 1076656004u, 3000189819u, 1096500901u, 2057239777u, 1093086420u, 3545308331u, 0, SINH_TOLERANCE, 0},
+{ 999, 1078106941u, 205759408u, 3244643377u, 2702292618u, 1127858436u, 16441604u, 0, SINH_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_SINH_H multiple inclusion protection
+
+// EOF sinh.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/sqrt.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/sqrt.c
new file mode 100644
index 0000000000..f940d1543e
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/sqrt.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// sqrt.c
+//
+// Test of sqrt() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/sqrt.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(sqrt_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &sqrt, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_NONE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &sqrt_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("sqrt() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("sqrt() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library sqrt() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "sqrt() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF sqrt.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/sqrt.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/sqrt.h
new file mode 100644
index 0000000000..20413d9da0
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/sqrt.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_SQRT_H
+#define CYGONCE_LIBM_SQRT_H
+//===========================================================================
+//
+// sqrt.h
+//
+// Test vectors for testing of sqrt() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/sqrt.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define SQRT_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t sqrt_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1077999148u, 2506787616u, 1090024059u, 3619148316u, 1075268646u, 2220766981u, 0, SQRT_TOLERANCE, 0},
+{ 2, 1070670006u, 3176730980u, 1051524793u, 2993920299u, 1071680998u, 605508644u, 0, SQRT_TOLERANCE, 0},
+{ 3, 1092176155u, 2725707538u, 3232101343u, 2346810316u, 1082400040u, 4277814180u, 0, SQRT_TOLERANCE, 0},
+{ 4, 1092554362u, 2088062470u, 3201242716u, 420891118u, 1082542742u, 3537165692u, 0, SQRT_TOLERANCE, 0},
+{ 5, 1073717029u, 2636405208u, 1100049309u, 471635570u, 1073118790u, 844009443u, 0, SQRT_TOLERANCE, 0},
+{ 6, 1089363191u, 1746012320u, 1054478713u, 3333988501u, 1081027515u, 2938668174u, 0, SQRT_TOLERANCE, 0},
+{ 7, 1047953160u, 183014794u, 3202039382u, 2016785810u, 1060305113u, 2662925048u, 0, SQRT_TOLERANCE, 0},
+{ 8, 1066002386u, 2688957927u, 1046089230u, 2709029994u, 1069337278u, 3851609627u, 0, SQRT_TOLERANCE, 0},
+{ 9, 1058795730u, 624574473u, 1045840574u, 3473266330u, 1065690306u, 730258401u, 0, SQRT_TOLERANCE, 0},
+{ 10, 1057436194u, 1605286142u, 1068931671u, 4233776869u, 1065041564u, 1578535776u, 0, SQRT_TOLERANCE, 0},
+{ 11, 1060343410u, 1857607719u, 3222889559u, 3417070006u, 1066512486u, 1761707100u, 0, SQRT_TOLERANCE, 0},
+{ 12, 1103599987u, 3981151660u, 1088899021u, 1332651746u, 1088125702u, 2101780457u, 0, SQRT_TOLERANCE, 0},
+{ 13, 1085298022u, 3824988054u, 1066856791u, 2070129652u, 1078995579u, 220377022u, 0, SQRT_TOLERANCE, 0},
+{ 14, 1060076142u, 1372884064u, 1080833116u, 3229926662u, 1066384624u, 3846619588u, 0, SQRT_TOLERANCE, 0},
+{ 15, 1093826501u, 3217805330u, 3191644264u, 2014578707u, 1083256976u, 708451256u, 0, SQRT_TOLERANCE, 0},
+{ 16, 1102287487u, 265058758u, 3239903247u, 1630600647u, 1087484475u, 593102912u, 0, SQRT_TOLERANCE, 0},
+{ 17, 1071124229u, 1946677669u, 3198462609u, 926009897u, 1071881903u, 84172120u, 0, SQRT_TOLERANCE, 0},
+{ 18, 1072130299u, 2271884183u, 3203741999u, 2118617783u, 1072389823u, 1734345339u, 0, SQRT_TOLERANCE, 0},
+{ 19, 1047365461u, 213658772u, 3249401130u, 314151656u, 1060027727u, 2224939906u, 0, SQRT_TOLERANCE, 0},
+{ 20, 1106628640u, 1564829925u, 3197817016u, 497230814u, 1089646215u, 1613419443u, 0, SQRT_TOLERANCE, 0},
+{ 21, 1068778986u, 2075329122u, 3231746400u, 169900577u, 1070727840u, 3915801428u, 0, SQRT_TOLERANCE, 0},
+{ 22, 1049848642u, 541549344u, 1096608669u, 3119070100u, 1061265525u, 677202126u, 0, SQRT_TOLERANCE, 0},
+{ 23, 1085427055u, 567496114u, 1045286891u, 1969998540u, 1079057616u, 2504053075u, 0, SQRT_TOLERANCE, 0},
+{ 24, 1060548195u, 1299369769u, 1049342524u, 4167404066u, 1066601671u, 854490045u, 0, SQRT_TOLERANCE, 0},
+{ 25, 1061381997u, 3348930841u, 1078472138u, 358457347u, 1066986270u, 3521303658u, 0, SQRT_TOLERANCE, 0},
+{ 26, 1071069297u, 2192461366u, 1099527247u, 3184735642u, 1071859305u, 4075190074u, 0, SQRT_TOLERANCE, 0},
+{ 27, 1052861772u, 331696577u, 3189610016u, 793242270u, 1062705147u, 4224071180u, 0, SQRT_TOLERANCE, 0},
+{ 28, 1105045286u, 2322696981u, 1083791358u, 3020766674u, 1088800804u, 826480684u, 0, SQRT_TOLERANCE, 0},
+{ 29, 1044902177u, 252085215u, 3214426435u, 4139068910u, 1058778595u, 2737745278u, 0, SQRT_TOLERANCE, 0},
+{ 30, 1075022077u, 105589263u, 1056316170u, 261630827u, 1073851886u, 1075861372u, 0, SQRT_TOLERANCE, 0},
+{ 31, 1107213408u, 428765703u, 3251828686u, 2009972239u, 1089875212u, 423796479u, 0, SQRT_TOLERANCE, 0},
+{ 32, 1098568019u, 3517376586u, 3240257920u, 3304487302u, 1085585117u, 2293588450u, 0, SQRT_TOLERANCE, 0},
+{ 33, 1086054264u, 237004814u, 3237899261u, 3364008659u, 1079320112u, 1789517462u, 0, SQRT_TOLERANCE, 0},
+{ 34, 1047763904u, 472004928u, 3226869477u, 1186387580u, 1060222569u, 2702852472u, 0, SQRT_TOLERANCE, 0},
+{ 35, 1054226850u, 4085763910u, 1106394906u, 2684738273u, 1063443327u, 3722225526u, 0, SQRT_TOLERANCE, 0},
+{ 36, 1057053639u, 2055490142u, 3231581370u, 3879040079u, 1064800646u, 3120181293u, 0, SQRT_TOLERANCE, 0},
+{ 37, 1041492999u, 3725731239u, 1061652681u, 591292963u, 1057086087u, 683141772u, 0, SQRT_TOLERANCE, 0},
+{ 38, 1077531333u, 1147041027u, 3215417793u, 624695933u, 1075073952u, 330937519u, 0, SQRT_TOLERANCE, 0},
+{ 39, 1058569126u, 705725219u, 3238067573u, 1116238321u, 1065601736u, 1995750373u, 0, SQRT_TOLERANCE, 0},
+{ 40, 1059883440u, 7287411u, 1045917232u, 116067742u, 1066285097u, 1285613460u, 0, SQRT_TOLERANCE, 0},
+{ 41, 1092571574u, 3604989074u, 1066381836u, 545298780u, 1082548907u, 197771367u, 0, SQRT_TOLERANCE, 0},
+{ 42, 1071597288u, 1681476121u, 1060345752u, 3553822398u, 1072062158u, 224173498u, 0, SQRT_TOLERANCE, 0},
+{ 43, 1102831658u, 3410480388u, 1052460275u, 1660607230u, 1087708788u, 540172385u, 0, SQRT_TOLERANCE, 0},
+{ 44, 1089216869u, 1494984673u, 3196647153u, 287894723u, 1080950974u, 2475641644u, 0, SQRT_TOLERANCE, 0},
+{ 45, 1054885127u, 644548665u, 1081948134u, 2442134629u, 1063702841u, 2511252856u, 0, SQRT_TOLERANCE, 0},
+{ 46, 1087554095u, 2312530895u, 3221584595u, 3379665576u, 1080120079u, 977381325u, 0, SQRT_TOLERANCE, 0},
+{ 47, 1096085375u, 3018463866u, 1086226574u, 404012923u, 1084378457u, 2884650978u, 0, SQRT_TOLERANCE, 0},
+{ 48, 1064733299u, 1710279345u, 3251401196u, 3528946000u, 1068694953u, 3041442149u, 0, SQRT_TOLERANCE, 0},
+{ 49, 1061536351u, 2164450219u, 1083520023u, 3312018966u, 1067082542u, 3541455359u, 0, SQRT_TOLERANCE, 0},
+{ 50, 1057248676u, 2648986431u, 1050330591u, 1474376550u, 1064927817u, 295874224u, 0, SQRT_TOLERANCE, 0},
+{ 51, 1046938380u, 1839068700u, 1077406406u, 3013052171u, 1059791591u, 1387152159u, 0, SQRT_TOLERANCE, 0},
+{ 52, 1046493630u, 772102380u, 3220729740u, 4219039958u, 1059506510u, 1712928068u, 0, SQRT_TOLERANCE, 0},
+{ 53, 1081988573u, 3058618779u, 1046304788u, 3338676024u, 1077270853u, 3474020327u, 0, SQRT_TOLERANCE, 0},
+{ 54, 1051172137u, 506286854u, 1094907481u, 2217000199u, 1061911855u, 221864221u, 0, SQRT_TOLERANCE, 0},
+{ 55, 1082428310u, 1147428263u, 1065432625u, 3034786717u, 1077519368u, 2537543574u, 0, SQRT_TOLERANCE, 0},
+{ 56, 1082016752u, 2844125311u, 1082985198u, 2561492677u, 1077281134u, 3176608248u, 0, SQRT_TOLERANCE, 0},
+{ 57, 1064053268u, 704542600u, 3222902057u, 2762779203u, 1068369247u, 2603835260u, 0, SQRT_TOLERANCE, 0},
+{ 58, 1052196966u, 184131949u, 3249723525u, 1667366082u, 1062422966u, 3939548873u, 0, SQRT_TOLERANCE, 0},
+{ 59, 1076125950u, 3904224140u, 1067056698u, 2942159914u, 1074366822u, 4268449844u, 0, SQRT_TOLERANCE, 0},
+{ 60, 1100636863u, 426114282u, 3209056785u, 1083606355u, 1086622716u, 623144311u, 0, SQRT_TOLERANCE, 0},
+{ 61, 1106165945u, 3774123863u, 1106787580u, 2722107965u, 1089429190u, 3430676340u, 0, SQRT_TOLERANCE, 0},
+{ 62, 1088005092u, 1377734762u, 1104232051u, 2377063483u, 1080312100u, 1890582146u, 0, SQRT_TOLERANCE, 0},
+{ 63, 1069380559u, 1029739074u, 1105467109u, 3062201018u, 1070970176u, 3192690979u, 0, SQRT_TOLERANCE, 0},
+{ 64, 1087257949u, 773857656u, 3214251949u, 335833884u, 1079974782u, 3171811944u, 0, SQRT_TOLERANCE, 0},
+{ 65, 1055740962u, 1473865960u, 1103073830u, 4000427507u, 1064215197u, 3638248407u, 0, SQRT_TOLERANCE, 0},
+{ 66, 1103185231u, 4242092620u, 1067009473u, 14539161u, 1087865409u, 1052873954u, 0, SQRT_TOLERANCE, 0},
+{ 67, 1045032426u, 1732245037u, 1101371955u, 1533536108u, 1058852385u, 2071071226u, 0, SQRT_TOLERANCE, 0},
+{ 68, 1101670347u, 1833841275u, 1099430098u, 4144145552u, 1087172149u, 3494217021u, 0, SQRT_TOLERANCE, 0},
+{ 69, 1096786815u, 935007012u, 3188865420u, 604442938u, 1084653522u, 902055671u, 0, SQRT_TOLERANCE, 0},
+{ 70, 1059419605u, 2211464602u, 1046255144u, 1635910526u, 1066022044u, 3993344749u, 0, SQRT_TOLERANCE, 0},
+{ 71, 1077871417u, 2549219008u, 3231633258u, 3733639385u, 1075201676u, 2374945252u, 0, SQRT_TOLERANCE, 0},
+{ 72, 1082095089u, 1819374372u, 3202219056u, 2617077637u, 1077309337u, 3516693447u, 0, SQRT_TOLERANCE, 0},
+{ 73, 1094345280u, 546465680u, 1048653554u, 532401530u, 1083476938u, 3036711713u, 0, SQRT_TOLERANCE, 0},
+{ 74, 1044571091u, 2759019783u, 3221570188u, 3554409630u, 1058575885u, 1512763431u, 0, SQRT_TOLERANCE, 0},
+{ 75, 1065447634u, 2527221960u, 1099107978u, 2696971136u, 1068998603u, 2457660231u, 0, SQRT_TOLERANCE, 0},
+{ 76, 1097158000u, 173134582u, 1087299442u, 2877794600u, 1084890087u, 884126678u, 0, SQRT_TOLERANCE, 0},
+{ 77, 1086400474u, 547642046u, 3197285510u, 3521286127u, 1079471659u, 3033645540u, 0, SQRT_TOLERANCE, 0},
+{ 78, 1074860702u, 1231582831u, 1090971734u, 1653446832u, 1073776404u, 3961408917u, 0, SQRT_TOLERANCE, 0},
+{ 79, 1061342535u, 3762182190u, 3252967851u, 2615360375u, 1066960732u, 3665707139u, 0, SQRT_TOLERANCE, 0},
+{ 80, 1053350775u, 2588067350u, 3206610957u, 3551059728u, 1063007251u, 3925789760u, 0, SQRT_TOLERANCE, 0},
+{ 81, 1059495208u, 845263327u, 1073415902u, 1749010288u, 1066067600u, 2493200909u, 0, SQRT_TOLERANCE, 0},
+{ 82, 1058092722u, 3092685191u, 3190678390u, 2872219490u, 1065392258u, 2185338120u, 0, SQRT_TOLERANCE, 0},
+{ 83, 1070831407u, 4107255722u, 3205337291u, 3069068345u, 1071756377u, 3884334901u, 0, SQRT_TOLERANCE, 0},
+{ 84, 1096507209u, 2294867524u, 3216653996u, 2860384670u, 1084550505u, 509668549u, 0, SQRT_TOLERANCE, 0},
+{ 85, 1045842702u, 2265437201u, 3240198679u, 1234948614u, 1059250914u, 1435972158u, 0, SQRT_TOLERANCE, 0},
+{ 86, 1068876281u, 1186945904u, 3251167793u, 1896750851u, 1070770294u, 3836667746u, 0, SQRT_TOLERANCE, 0},
+{ 87, 1081575478u, 3686084548u, 1079286273u, 3309277689u, 1077110633u, 1999998138u, 0, SQRT_TOLERANCE, 0},
+{ 88, 1075992592u, 3006860614u, 3231412671u, 2504194724u, 1074281070u, 2869529129u, 0, SQRT_TOLERANCE, 0},
+{ 89, 1088665612u, 1948717780u, 1048317852u, 3791803982u, 1080630957u, 2010332103u, 0, SQRT_TOLERANCE, 0},
+{ 90, 1064345015u, 4272034420u, 3192982124u, 1526175922u, 1068518941u, 1347333963u, 0, SQRT_TOLERANCE, 0},
+{ 91, 1098334178u, 4108948538u, 1104691287u, 640541190u, 1085491584u, 2344550893u, 0, SQRT_TOLERANCE, 0},
+{ 92, 1059773769u, 3259274853u, 1082507103u, 3677038020u, 1066226153u, 4175570532u, 0, SQRT_TOLERANCE, 0},
+{ 93, 1083132498u, 3781708548u, 1096584871u, 1207386447u, 1077912743u, 256642125u, 0, SQRT_TOLERANCE, 0},
+{ 94, 1041211624u, 3011191657u, 1103798670u, 1096124830u, 1056952400u, 3532873116u, 0, SQRT_TOLERANCE, 0},
+{ 95, 1063235023u, 2540404725u, 3240157452u, 4122845725u, 1067877244u, 3178535586u, 0, SQRT_TOLERANCE, 0},
+{ 96, 1083643710u, 311336721u, 3214382367u, 4212533768u, 1078147229u, 1574899206u, 0, SQRT_TOLERANCE, 0},
+{ 97, 1051139427u, 1769686293u, 3240200923u, 3538602249u, 1061892714u, 2811585508u, 0, SQRT_TOLERANCE, 0},
+{ 98, 1078227549u, 508056696u, 1103793878u, 776520138u, 1075418182u, 1911895511u, 0, SQRT_TOLERANCE, 0},
+{ 99, 1102910577u, 4064962760u, 1077424413u, 819766631u, 1087738367u, 625596649u, 0, SQRT_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 1073409469u, 2890683226u, 0, SQRT_TOLERANCE, 0},
+{ 101, 1082295059u, 2514398118u, 1076579751u, 870169764u, 1077434053u, 2274822844u, 0, SQRT_TOLERANCE, 0},
+{ 102, 1099367744u, 1190259653u, 1069112254u, 3417249840u, 1086006323u, 3203231065u, 0, SQRT_TOLERANCE, 0},
+{ 103, 1046179435u, 3467757357u, 3215075200u, 2168175352u, 1059386161u, 1523058021u, 0, SQRT_TOLERANCE, 0},
+{ 104, 1092159487u, 1508888184u, 1060430241u, 3524949092u, 1082393394u, 2941399898u, 0, SQRT_TOLERANCE, 0},
+{ 105, 1049929235u, 166402802u, 3237198975u, 3572369260u, 1061301541u, 778731146u, 0, SQRT_TOLERANCE, 0},
+{ 106, 1081866822u, 2441536203u, 3202753937u, 3658194573u, 1077225557u, 2884892065u, 0, SQRT_TOLERANCE, 0},
+{ 107, 1062392908u, 2479742828u, 1062342831u, 4214154303u, 1067539306u, 2067044587u, 0, SQRT_TOLERANCE, 0},
+{ 108, 1082396794u, 426896765u, 1066474375u, 2201754442u, 1077499585u, 3639218844u, 0, SQRT_TOLERANCE, 0},
+{ 109, 1048145373u, 2055773734u, 3239267288u, 291396537u, 1060383682u, 1374687961u, 0, SQRT_TOLERANCE, 0},
+{ 110, 1089484385u, 874125203u, 3210508124u, 4091098764u, 1081088793u, 2796500043u, 0, SQRT_TOLERANCE, 0},
+{ 111, 1065716026u, 120488169u, 3241241441u, 1985269424u, 1069170801u, 1652665630u, 0, SQRT_TOLERANCE, 0},
+{ 112, 1059055762u, 2243036871u, 3243941101u, 740033495u, 1065785428u, 1948204916u, 0, SQRT_TOLERANCE, 0},
+{ 113, 1061941258u, 1176656356u, 1074261978u, 3588756231u, 1067312736u, 4031115381u, 0, SQRT_TOLERANCE, 0},
+{ 114, 1105333143u, 3037249392u, 1061635587u, 1173102190u, 1088948153u, 982120755u, 0, SQRT_TOLERANCE, 0},
+{ 115, 1089725933u, 2882725208u, 1071440059u, 69225090u, 1081202634u, 4070340257u, 0, SQRT_TOLERANCE, 0},
+{ 116, 1065179826u, 272319256u, 1072073912u, 2493997123u, 1068870653u, 1887245738u, 0, SQRT_TOLERANCE, 0},
+{ 117, 1057720186u, 188610379u, 3232757923u, 2209647371u, 1065201208u, 89168525u, 0, SQRT_TOLERANCE, 0},
+{ 118, 1089274869u, 1990439193u, 1078073146u, 622849962u, 1080981665u, 1937867013u, 0, SQRT_TOLERANCE, 0},
+{ 119, 1057135741u, 756052458u, 1081649113u, 2247475162u, 1064855412u, 2031313836u, 0, SQRT_TOLERANCE, 0},
+{ 120, 1061623064u, 3878055211u, 3222407050u, 2979438623u, 1067134345u, 2326488769u, 0, SQRT_TOLERANCE, 0},
+{ 121, 1047807349u, 2676398686u, 1105124431u, 3631096636u, 1060242029u, 10248528u, 0, SQRT_TOLERANCE, 0},
+{ 122, 1065079390u, 1697791764u, 3198136112u, 2299842819u, 1068833081u, 1643028991u, 0, SQRT_TOLERANCE, 0},
+{ 123, 1078084768u, 1931502677u, 3215264397u, 3016456382u, 1075326357u, 59441897u, 0, SQRT_TOLERANCE, 0},
+{ 124, 1072253426u, 343404215u, 1061072607u, 4266232536u, 1072460411u, 3078552319u, 0, SQRT_TOLERANCE, 0},
+{ 125, 1093747188u, 4140316002u, 1082896196u, 868256971u, 1083219439u, 52190688u, 0, SQRT_TOLERANCE, 0},
+{ 126, 1075422810u, 1864139509u, 3187675097u, 3084482407u, 1074020893u, 1269785421u, 0, SQRT_TOLERANCE, 0},
+{ 127, 1072707675u, 2427162817u, 3234748208u, 2715105792u, 1072700437u, 592056396u, 0, SQRT_TOLERANCE, 0},
+{ 128, 1064600512u, 3943389284u, 1046724025u, 3626825684u, 1068637699u, 3554438189u, 0, SQRT_TOLERANCE, 0},
+{ 129, 1045423002u, 967350972u, 1093012318u, 448002663u, 1059058121u, 4110539679u, 0, SQRT_TOLERANCE, 0},
+{ 130, 1104362211u, 105058217u, 1069733884u, 171786224u, 1088522867u, 1249399999u, 0, SQRT_TOLERANCE, 0},
+{ 131, 1042130860u, 2863482262u, 3204997271u, 877784425u, 1057343573u, 1946563393u, 0, SQRT_TOLERANCE, 0},
+{ 132, 1055145665u, 2801782962u, 3213604117u, 762347195u, 1063875562u, 405405913u, 0, SQRT_TOLERANCE, 0},
+{ 133, 1086003079u, 2317950339u, 3246333414u, 2135700283u, 1079300584u, 2888201937u, 0, SQRT_TOLERANCE, 0},
+{ 134, 1056516397u, 4171919805u, 1082858682u, 2180920863u, 1064570994u, 117017318u, 0, SQRT_TOLERANCE, 0},
+{ 135, 1072665436u, 1918836931u, 1083603224u, 3137821660u, 1072679295u, 3487405472u, 0, SQRT_TOLERANCE, 0},
+{ 136, 1103902874u, 3456203663u, 3235600523u, 2335688936u, 1088294172u, 2136321383u, 0, SQRT_TOLERANCE, 0},
+{ 137, 1042279322u, 4170235262u, 1051824459u, 521583737u, 1057397095u, 1449721404u, 0, SQRT_TOLERANCE, 0},
+{ 138, 1081348303u, 1296623194u, 3250673860u, 2442872540u, 1077013242u, 2258644922u, 0, SQRT_TOLERANCE, 0},
+{ 139, 1061684277u, 289979405u, 1049514449u, 3865737145u, 1067170024u, 2776254693u, 0, SQRT_TOLERANCE, 0},
+{ 140, 1075298944u, 3699090239u, 1054539840u, 3259249360u, 1073971042u, 3458344803u, 0, SQRT_TOLERANCE, 0},
+{ 141, 1096418100u, 1619819023u, 1045993352u, 1022642459u, 1084516007u, 476909761u, 0, SQRT_TOLERANCE, 0},
+{ 142, 1081433004u, 19455098u, 3229182089u, 2096003654u, 1077050469u, 3028872190u, 0, SQRT_TOLERANCE, 0},
+{ 143, 1076297936u, 3803689997u, 1071630912u, 2263729518u, 1074471318u, 1292113974u, 0, SQRT_TOLERANCE, 0},
+{ 144, 1101357261u, 2816837387u, 1063422305u, 2597606398u, 1086990274u, 2652274740u, 0, SQRT_TOLERANCE, 0},
+{ 145, 1069100169u, 3680967506u, 1040201163u, 179224723u, 1070862792u, 3588846007u, 0, SQRT_TOLERANCE, 0},
+{ 146, 1041146119u, 978126928u, 1101553990u, 4047893399u, 1056919191u, 3630293168u, 0, SQRT_TOLERANCE, 0},
+{ 147, 1074838397u, 4059818629u, 1042678728u, 3640293589u, 1073765554u, 1929737386u, 0, SQRT_TOLERANCE, 0},
+{ 148, 1100980392u, 3383497159u, 1070002807u, 1527313008u, 1086750415u, 3836203873u, 0, SQRT_TOLERANCE, 0},
+{ 149, 1055224031u, 2599946514u, 1104170406u, 2738675352u, 1063924117u, 1721130370u, 0, SQRT_TOLERANCE, 0},
+{ 150, 1105232623u, 3616571377u, 1060859316u, 1130603218u, 1088879738u, 236452899u, 0, SQRT_TOLERANCE, 0},
+{ 151, 1076028796u, 3859211180u, 1067940450u, 1744531824u, 1074304802u, 316690193u, 0, SQRT_TOLERANCE, 0},
+{ 152, 1042831340u, 1958025850u, 3236511256u, 2472176453u, 1057745168u, 35356657u, 0, SQRT_TOLERANCE, 0},
+{ 153, 1085623441u, 182132862u, 3250520938u, 3924356991u, 1079145947u, 321881452u, 0, SQRT_TOLERANCE, 0},
+{ 154, 1083018236u, 35632886u, 3209806504u, 1453402523u, 1077854139u, 1375333123u, 0, SQRT_TOLERANCE, 0},
+{ 155, 1083522102u, 743225214u, 3202890678u, 142917400u, 1078095555u, 1236155334u, 0, SQRT_TOLERANCE, 0},
+{ 156, 1080684976u, 1472665012u, 3203138231u, 256588219u, 1076678713u, 4046845340u, 0, SQRT_TOLERANCE, 0},
+{ 157, 1094982162u, 1062927000u, 1061134072u, 931677439u, 1083792592u, 148959679u, 0, SQRT_TOLERANCE, 0},
+{ 158, 1058377732u, 2320910576u, 1055663370u, 288059864u, 1065521919u, 554321687u, 0, SQRT_TOLERANCE, 0},
+{ 159, 1078958093u, 1448349062u, 3199478070u, 3454027134u, 1075825628u, 820343418u, 0, SQRT_TOLERANCE, 0},
+{ 160, 1089975150u, 4215445172u, 3196654963u, 2231888973u, 1081309490u, 3903827118u, 0, SQRT_TOLERANCE, 0},
+{ 161, 1099148583u, 40413554u, 3232578253u, 983832844u, 1085872059u, 3351900855u, 0, SQRT_TOLERANCE, 0},
+{ 162, 1076237886u, 3995725873u, 1050082319u, 777231627u, 1074435545u, 1571143908u, 0, SQRT_TOLERANCE, 0},
+{ 163, 1040986626u, 672789828u, 3253385962u, 2982787335u, 1056835993u, 922098741u, 0, SQRT_TOLERANCE, 0},
+{ 164, 1068390875u, 2075971825u, 1070166500u, 4034633931u, 1070541347u, 410974930u, 0, SQRT_TOLERANCE, 0},
+{ 165, 1062562529u, 1018222907u, 3244621407u, 3090050495u, 1067614969u, 1619055709u, 0, SQRT_TOLERANCE, 0},
+{ 166, 1067680885u, 937732557u, 3200798890u, 2557898276u, 1070136763u, 2391931683u, 0, SQRT_TOLERANCE, 0},
+{ 167, 1078342316u, 130346162u, 3223590310u, 275568693u, 1075488495u, 2106740591u, 0, SQRT_TOLERANCE, 0},
+{ 168, 1042898869u, 3807416441u, 1075961161u, 3706820266u, 1057783478u, 3972097396u, 0, SQRT_TOLERANCE, 0},
+{ 169, 1068615357u, 1710131411u, 1078123323u, 1900790503u, 1070652771u, 291788500u, 0, SQRT_TOLERANCE, 0},
+{ 170, 1091335713u, 3420420033u, 3210844787u, 588423066u, 1082011084u, 3994148752u, 0, SQRT_TOLERANCE, 0},
+{ 171, 1049684114u, 1160162008u, 3246307879u, 4265764460u, 1061188270u, 638608014u, 0, SQRT_TOLERANCE, 0},
+{ 172, 1102543434u, 366653268u, 3188814424u, 466059202u, 1087594922u, 3888746790u, 0, SQRT_TOLERANCE, 0},
+{ 173, 1079144091u, 1325936170u, 3221436876u, 680097612u, 1075915851u, 2635101980u, 0, SQRT_TOLERANCE, 0},
+{ 174, 1092907468u, 1827735934u, 3200554324u, 2875599271u, 1082758123u, 4020975259u, 0, SQRT_TOLERANCE, 0},
+{ 175, 1043546754u, 3117037091u, 3239246636u, 15838845u, 1058115053u, 328401279u, 0, SQRT_TOLERANCE, 0},
+{ 176, 1051974004u, 749718883u, 3223587064u, 1523766569u, 1062326834u, 1051206039u, 0, SQRT_TOLERANCE, 0},
+{ 177, 1044833651u, 1966536294u, 3250158026u, 699164258u, 1058738542u, 861420859u, 0, SQRT_TOLERANCE, 0},
+{ 178, 1098048435u, 3759049394u, 1106085272u, 1183789499u, 1085366914u, 2249964520u, 0, SQRT_TOLERANCE, 0},
+{ 179, 1081201623u, 1970107747u, 1095245453u, 2308233883u, 1076945816u, 4122814742u, 0, SQRT_TOLERANCE, 0},
+{ 180, 1084756444u, 1491017852u, 1041444355u, 1723375725u, 1078706376u, 3597981038u, 0, SQRT_TOLERANCE, 0},
+{ 181, 1069146422u, 1141349287u, 1097465301u, 3403438584u, 1070881102u, 1363982323u, 0, SQRT_TOLERANCE, 0},
+{ 182, 1083088260u, 1711085243u, 3250239076u, 1377484108u, 1077890252u, 1851678165u, 0, SQRT_TOLERANCE, 0},
+{ 183, 1098385019u, 2880275004u, 1084039594u, 1611394950u, 1085512499u, 1964141477u, 0, SQRT_TOLERANCE, 0},
+{ 184, 1086737787u, 2626629370u, 1063771493u, 1499080813u, 1079686915u, 183335811u, 0, SQRT_TOLERANCE, 0},
+{ 185, 1055231263u, 3936262414u, 1103919063u, 3175668759u, 1063928529u, 2035803317u, 0, SQRT_TOLERANCE, 0},
+{ 186, 1060498071u, 1270950554u, 3194616071u, 3680565379u, 1066580441u, 617356847u, 0, SQRT_TOLERANCE, 0},
+{ 187, 1060664575u, 1066985223u, 3221613219u, 4089383168u, 1066649623u, 4128441333u, 0, SQRT_TOLERANCE, 0},
+{ 188, 1069575191u, 4017329311u, 3208334452u, 1667591498u, 1071049869u, 4277286241u, 0, SQRT_TOLERANCE, 0},
+{ 189, 1088164157u, 3154656624u, 1061894279u, 3886344038u, 1080373506u, 3849431628u, 0, SQRT_TOLERANCE, 0},
+{ 190, 1050652945u, 977586119u, 3209762784u, 953839852u, 1061586084u, 4015554101u, 0, SQRT_TOLERANCE, 0},
+{ 191, 1104965247u, 143071571u, 3206165386u, 913097445u, 1088771098u, 1153878443u, 0, SQRT_TOLERANCE, 0},
+{ 192, 1043081808u, 1371169579u, 1057079837u, 2594818628u, 1057883519u, 2861904553u, 0, SQRT_TOLERANCE, 0},
+{ 193, 1104309688u, 2259342224u, 3217432469u, 1824221478u, 1088498657u, 4134322356u, 0, SQRT_TOLERANCE, 0},
+{ 194, 1099351127u, 1576604497u, 1079368611u, 185078728u, 1085996500u, 3741739594u, 0, SQRT_TOLERANCE, 0},
+{ 195, 1074195779u, 444800035u, 3243343143u, 1734989302u, 1073419787u, 3442615331u, 0, SQRT_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1072720706u, 32388127u, 0, SQRT_TOLERANCE, 0},
+{ 197, 1087212320u, 1941318385u, 1045807374u, 792193370u, 1079951177u, 311008137u, 0, SQRT_TOLERANCE, 0},
+{ 198, 1090816018u, 1299392207u, 3212131720u, 3205732280u, 1081713110u, 3921824728u, 0, SQRT_TOLERANCE, 0},
+{ 199, 1098698804u, 3035093505u, 1052187689u, 3287702190u, 1085634721u, 997526658u, 0, SQRT_TOLERANCE, 0},
+{ 200, 1099192612u, 2160225215u, 1102624859u, 836655570u, 1085899898u, 3875891937u, 0, SQRT_TOLERANCE, 0},
+{ 201, 1096723626u, 3360816360u, 3246176356u, 172860634u, 1084630880u, 2920597617u, 0, SQRT_TOLERANCE, 0},
+{ 202, 1070995788u, 146831910u, 1051558014u, 2340722078u, 1071828418u, 2771710464u, 0, SQRT_TOLERANCE, 0},
+{ 203, 1082932703u, 1603798153u, 3207725532u, 1099413093u, 1077809130u, 1620986260u, 0, SQRT_TOLERANCE, 0},
+{ 204, 1099194730u, 2429340443u, 3190303581u, 3223770005u, 1085901226u, 1909350921u, 0, SQRT_TOLERANCE, 0},
+{ 205, 1075882959u, 955542166u, 3230415151u, 275583938u, 1074206939u, 3284390891u, 0, SQRT_TOLERANCE, 0},
+{ 206, 1092971882u, 513397822u, 1090646554u, 2089321329u, 1082797944u, 1848756391u, 0, SQRT_TOLERANCE, 0},
+{ 207, 1045686228u, 2782073372u, 1046063872u, 4023829068u, 1059182757u, 1144494305u, 0, SQRT_TOLERANCE, 0},
+{ 208, 1098564822u, 3242223094u, 3194111199u, 4264674108u, 1085583882u, 1055345467u, 0, SQRT_TOLERANCE, 0},
+{ 209, 1091027173u, 3506346169u, 1047020885u, 1742757458u, 1081840116u, 919870869u, 0, SQRT_TOLERANCE, 0},
+{ 210, 1045180829u, 1265459564u, 3193450280u, 3650514880u, 1058933091u, 2096096260u, 0, SQRT_TOLERANCE, 0},
+{ 211, 1081755890u, 1525260440u, 3235452527u, 2612331392u, 1077182958u, 414505092u, 0, SQRT_TOLERANCE, 0},
+{ 212, 1101185272u, 1263613754u, 3219096387u, 635677201u, 1086881619u, 3327465162u, 0, SQRT_TOLERANCE, 0},
+{ 213, 1058788439u, 4140947288u, 3200792376u, 2013265346u, 1065687545u, 289774073u, 0, SQRT_TOLERANCE, 0},
+{ 214, 1102490744u, 1912759945u, 3237045253u, 1351396825u, 1087572985u, 200814021u, 0, SQRT_TOLERANCE, 0},
+{ 215, 1100721514u, 1001433078u, 3206926643u, 2741676659u, 1086655281u, 2906657682u, 0, SQRT_TOLERANCE, 0},
+{ 216, 1080923606u, 1088945233u, 1085095743u, 3986114865u, 1076806875u, 1398507288u, 0, SQRT_TOLERANCE, 0},
+{ 217, 1068250409u, 831239754u, 1099828675u, 3071308141u, 1070467911u, 215486836u, 0, SQRT_TOLERANCE, 0},
+{ 218, 1078350849u, 3473592372u, 1102759382u, 1309576357u, 1075493611u, 285464971u, 0, SQRT_TOLERANCE, 0},
+{ 219, 1103703058u, 2042340367u, 1091945628u, 2062772374u, 1088184745u, 1642723939u, 0, SQRT_TOLERANCE, 0},
+{ 220, 1047282039u, 1840632537u, 1096533424u, 807510337u, 1059983827u, 4285807355u, 0, SQRT_TOLERANCE, 0},
+{ 221, 1083968074u, 144814872u, 3212698915u, 2282965697u, 1078275682u, 3768954894u, 0, SQRT_TOLERANCE, 0},
+{ 222, 1071236430u, 2552499583u, 3229111426u, 1470130815u, 1071926866u, 3747737272u, 0, SQRT_TOLERANCE, 0},
+{ 223, 1095609417u, 2858583811u, 1089760910u, 6360994u, 1084149893u, 3408093385u, 0, SQRT_TOLERANCE, 0},
+{ 224, 1050781281u, 1614537194u, 1075198900u, 4088705365u, 1061667829u, 3512455994u, 0, SQRT_TOLERANCE, 0},
+{ 225, 1103455422u, 3545570051u, 1065221325u, 1629217700u, 1088039467u, 3634219627u, 0, SQRT_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 1072718482u, 2444193944u, 0, SQRT_TOLERANCE, 0},
+{ 227, 1049319038u, 2406734491u, 1042055360u, 89226663u, 1061000132u, 2269056916u, 0, SQRT_TOLERANCE, 0},
+{ 228, 1048267433u, 1618759139u, 3194723421u, 3888234802u, 1060431237u, 700371869u, 0, SQRT_TOLERANCE, 0},
+{ 229, 1055357248u, 3590035633u, 3212424262u, 2892456615u, 1064003648u, 3031176455u, 0, SQRT_TOLERANCE, 0},
+{ 230, 1042459412u, 2431246964u, 3241512456u, 183850734u, 1057517827u, 2676781323u, 0, SQRT_TOLERANCE, 0},
+{ 231, 1089501101u, 3088319870u, 3211544311u, 862225364u, 1081097064u, 2434610491u, 0, SQRT_TOLERANCE, 0},
+{ 232, 1087811016u, 3495352775u, 1058576726u, 596957268u, 1080233094u, 1373646250u, 0, SQRT_TOLERANCE, 0},
+{ 233, 1046553348u, 1839214511u, 3205004060u, 1923240983u, 1059547870u, 1202011145u, 0, SQRT_TOLERANCE, 0},
+{ 234, 1058073864u, 739619702u, 3223356436u, 2689885273u, 1065383129u, 1746092362u, 0, SQRT_TOLERANCE, 0},
+{ 235, 1052841323u, 2143376228u, 1098306332u, 3760236188u, 1062691218u, 367710346u, 0, SQRT_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 1073655755u, 1808066091u, 0, SQRT_TOLERANCE, 0},
+{ 237, 1066682341u, 2493598049u, 3194927008u, 1689107592u, 1069679490u, 594236901u, 0, SQRT_TOLERANCE, 0},
+{ 238, 1042506311u, 1578976988u, 1066368383u, 2117279163u, 1057548240u, 235320603u, 0, SQRT_TOLERANCE, 0},
+{ 239, 1075504463u, 3425290087u, 1098487295u, 1263412017u, 1074052755u, 3957330920u, 0, SQRT_TOLERANCE, 0},
+{ 240, 1060949116u, 3635396812u, 1070999426u, 3965655689u, 1066759998u, 2285325174u, 0, SQRT_TOLERANCE, 0},
+{ 241, 1060196346u, 2183973116u, 1101098363u, 1118613350u, 1066443949u, 3357751942u, 0, SQRT_TOLERANCE, 0},
+{ 242, 1074462441u, 199516350u, 1078368488u, 164621458u, 1073570877u, 1152484011u, 0, SQRT_TOLERANCE, 0},
+{ 243, 1040222370u, 3570940805u, 3230316437u, 3596080877u, 1056374897u, 1158689868u, 0, SQRT_TOLERANCE, 0},
+{ 244, 1060725917u, 980880313u, 1079833442u, 884465057u, 1066674198u, 3065335256u, 0, SQRT_TOLERANCE, 0},
+{ 245, 1099977124u, 2558179220u, 1052873711u, 1233598120u, 1086335134u, 3159565287u, 0, SQRT_TOLERANCE, 0},
+{ 246, 1047115221u, 1909994277u, 1085015978u, 2991527452u, 1059892969u, 3943181295u, 0, SQRT_TOLERANCE, 0},
+{ 247, 1060855260u, 1680290941u, 1074309900u, 2943870846u, 1066724573u, 2262457651u, 0, SQRT_TOLERANCE, 0},
+{ 248, 1059496132u, 1451927357u, 3228615456u, 1502585517u, 1066068150u, 673339016u, 0, SQRT_TOLERANCE, 0},
+{ 249, 1088728303u, 751136990u, 3230392165u, 3493275472u, 1080670415u, 1117083003u, 0, SQRT_TOLERANCE, 0},
+{ 250, 1098365967u, 1209623292u, 3238056647u, 979495322u, 1085504701u, 3401565724u, 0, SQRT_TOLERANCE, 0},
+{ 251, 1102940648u, 1717672108u, 1048120593u, 531240316u, 1087749476u, 157061011u, 0, SQRT_TOLERANCE, 0},
+{ 252, 1054174923u, 3548721654u, 1086112947u, 3391817224u, 1063421098u, 2489387950u, 0, SQRT_TOLERANCE, 0},
+{ 253, 1077836851u, 2758195125u, 1100880260u, 2028440924u, 1075189209u, 1648630422u, 0, SQRT_TOLERANCE, 0},
+{ 254, 1084223893u, 2750123373u, 3232200256u, 1086294931u, 1078369157u, 372399065u, 0, SQRT_TOLERANCE, 0},
+{ 255, 1043958672u, 2986160931u, 1076097908u, 2540046258u, 1058289542u, 1728470133u, 0, SQRT_TOLERANCE, 0},
+{ 256, 1087992954u, 451471221u, 1064816262u, 4187644495u, 1080307297u, 1987628334u, 0, SQRT_TOLERANCE, 0},
+{ 257, 1099460228u, 2439500162u, 1065280276u, 1979490284u, 1086060032u, 3546430530u, 0, SQRT_TOLERANCE, 0},
+{ 258, 1040415832u, 2283342035u, 1078398157u, 1345997553u, 1056503945u, 2002788187u, 0, SQRT_TOLERANCE, 0},
+{ 259, 1065765700u, 179066662u, 1103272172u, 1217337578u, 1069200815u, 354239272u, 0, SQRT_TOLERANCE, 0},
+{ 260, 1064078729u, 3779303391u, 3210023352u, 3115946280u, 1068382771u, 924212543u, 0, SQRT_TOLERANCE, 0},
+{ 261, 1045506226u, 286247089u, 1085153597u, 713645369u, 1059099073u, 630553628u, 0, SQRT_TOLERANCE, 0},
+{ 262, 1093670500u, 1468283899u, 1042831668u, 2022736418u, 1083181870u, 1135653208u, 0, SQRT_TOLERANCE, 0},
+{ 263, 1083139105u, 3305564080u, 1065483445u, 482392433u, 1077916081u, 297621800u, 0, SQRT_TOLERANCE, 0},
+{ 264, 1054212159u, 2256346551u, 3222430705u, 2071674991u, 1063437079u, 1872363528u, 0, SQRT_TOLERANCE, 0},
+{ 265, 1056541047u, 2295269094u, 1084451053u, 2773103941u, 1064580785u, 3548459456u, 0, SQRT_TOLERANCE, 0},
+{ 266, 1078173946u, 1482721827u, 1092243422u, 3125409590u, 1075384311u, 1214242217u, 0, SQRT_TOLERANCE, 0},
+{ 267, 1073582325u, 1381740563u, 1071545057u, 2918235653u, 1073070076u, 310733412u, 0, SQRT_TOLERANCE, 0},
+{ 268, 1091232324u, 1105857967u, 3241990046u, 2703723225u, 1081955489u, 1478059523u, 0, SQRT_TOLERANCE, 0},
+{ 269, 1043015571u, 174689677u, 1079333374u, 3947057014u, 1057847895u, 3807478291u, 0, SQRT_TOLERANCE, 0},
+{ 270, 1090461859u, 2023082423u, 3242081486u, 1169047927u, 1081495834u, 1354217806u, 0, SQRT_TOLERANCE, 0},
+{ 271, 1064525899u, 3742487766u, 1043425732u, 194972788u, 1068604282u, 3534598372u, 0, SQRT_TOLERANCE, 0},
+{ 272, 1066308179u, 2136071361u, 3211529757u, 993675115u, 1069500179u, 1810558929u, 0, SQRT_TOLERANCE, 0},
+{ 273, 1066179733u, 210772141u, 3241441539u, 580731413u, 1069433384u, 2904218754u, 0, SQRT_TOLERANCE, 0},
+{ 274, 1093840413u, 1751560711u, 1074522705u, 180987057u, 1083263432u, 354293330u, 0, SQRT_TOLERANCE, 0},
+{ 275, 1066754591u, 2552236599u, 1088658621u, 2112468655u, 1069711152u, 1027214939u, 0, SQRT_TOLERANCE, 0},
+{ 276, 1041806969u, 1578223762u, 3224596567u, 2456166162u, 1057219201u, 848829082u, 0, SQRT_TOLERANCE, 0},
+{ 277, 1058506965u, 2110924310u, 1086207177u, 3161208323u, 1065576362u, 3721277445u, 0, SQRT_TOLERANCE, 0},
+{ 278, 1084379746u, 2352173188u, 1079361728u, 4070222179u, 1078474414u, 324321316u, 0, SQRT_TOLERANCE, 0},
+{ 279, 1101012904u, 2481562701u, 1090937016u, 3809489716u, 1086764790u, 735952755u, 0, SQRT_TOLERANCE, 0},
+{ 280, 1049519003u, 330905705u, 1086260896u, 90264431u, 1061105443u, 4035135237u, 0, SQRT_TOLERANCE, 0},
+{ 281, 1040729961u, 4162008079u, 3194387916u, 759522153u, 1056694167u, 2202781865u, 0, SQRT_TOLERANCE, 0},
+{ 282, 1081015037u, 1839697482u, 3216442625u, 2211508949u, 1076853872u, 1160522481u, 0, SQRT_TOLERANCE, 0},
+{ 283, 1102323563u, 3736863454u, 1063475914u, 3150741666u, 1087500671u, 1861954786u, 0, SQRT_TOLERANCE, 0},
+{ 284, 1060785883u, 4200269406u, 3236646101u, 1061812176u, 1066697788u, 1854483559u, 0, SQRT_TOLERANCE, 0},
+{ 285, 1080217979u, 106027290u, 3234978297u, 2245237549u, 1076398618u, 65493562u, 0, SQRT_TOLERANCE, 0},
+{ 286, 1099500686u, 2132131375u, 3250483427u, 3449276437u, 1086083039u, 2161288431u, 0, SQRT_TOLERANCE, 0},
+{ 287, 1089388778u, 2334440944u, 1105423490u, 4004336184u, 1081040607u, 2660755785u, 0, SQRT_TOLERANCE, 0},
+{ 288, 1071289056u, 4090088208u, 1042030013u, 3898658299u, 1071947441u, 861742126u, 0, SQRT_TOLERANCE, 0},
+{ 289, 1060424416u, 2272831437u, 3253082595u, 2639188641u, 1066548560u, 2972214225u, 0, SQRT_TOLERANCE, 0},
+{ 290, 1054766684u, 1856594168u, 3189515294u, 4101853676u, 1063654331u, 2881681574u, 0, SQRT_TOLERANCE, 0},
+{ 291, 1076012412u, 2211699255u, 3195060344u, 3865018604u, 1074294105u, 3830274554u, 0, SQRT_TOLERANCE, 0},
+{ 292, 1095283362u, 996259334u, 3241496889u, 3782673116u, 1083972832u, 432134161u, 0, SQRT_TOLERANCE, 0},
+{ 293, 1099130747u, 3840380763u, 1048674041u, 550040067u, 1085860647u, 3790913469u, 0, SQRT_TOLERANCE, 0},
+{ 294, 1103935945u, 95874100u, 3237232828u, 2645647822u, 1088311701u, 3760135837u, 0, SQRT_TOLERANCE, 0},
+{ 295, 1043665640u, 3441419500u, 3252367038u, 876710419u, 1058168013u, 2436673555u, 0, SQRT_TOLERANCE, 0},
+{ 296, 1091109904u, 2560836004u, 3199616543u, 1180840586u, 1081887506u, 2392996462u, 0, SQRT_TOLERANCE, 0},
+{ 297, 1074119318u, 2218230392u, 3227485787u, 3947214579u, 1073374032u, 777552941u, 0, SQRT_TOLERANCE, 0},
+{ 298, 1079539654u, 1447312532u, 1081476588u, 780366847u, 1076087095u, 2168356619u, 0, SQRT_TOLERANCE, 0},
+{ 299, 1072569643u, 2842113832u, 3216156731u, 225159029u, 1072630507u, 1381726609u, 0, SQRT_TOLERANCE, 0},
+{ 300, 1098117193u, 1601981129u, 3234628869u, 2236538344u, 1085398127u, 1081924364u, 0, SQRT_TOLERANCE, 0},
+{ 301, 1085173524u, 2194185737u, 3242362684u, 87913366u, 1078932742u, 2261433011u, 0, SQRT_TOLERANCE, 0},
+{ 302, 1051600232u, 1346862963u, 1077836259u, 3604666660u, 1062145833u, 3747789312u, 0, SQRT_TOLERANCE, 0},
+{ 303, 1064772331u, 3115209742u, 1099332326u, 1325101950u, 1068711289u, 303323817u, 0, SQRT_TOLERANCE, 0},
+{ 304, 1077062394u, 3889223100u, 1053247613u, 3371396923u, 1074874452u, 2874176179u, 0, SQRT_TOLERANCE, 0},
+{ 305, 1072994220u, 4163120793u, 1075022670u, 1387631215u, 1072834253u, 3076989926u, 0, SQRT_TOLERANCE, 0},
+{ 306, 1057998131u, 1532426189u, 1063168268u, 3397022615u, 1065345676u, 534153645u, 0, SQRT_TOLERANCE, 0},
+{ 307, 1053549673u, 89324166u, 1079206060u, 3429424710u, 1063116839u, 459484642u, 0, SQRT_TOLERANCE, 0},
+{ 308, 1044841454u, 747591401u, 1072238381u, 2803213904u, 1058743148u, 1808992640u, 0, SQRT_TOLERANCE, 0},
+{ 309, 1091113780u, 271904221u, 1044258318u, 1858545114u, 1081889696u, 3706055854u, 0, SQRT_TOLERANCE, 0},
+{ 310, 1080585266u, 314958082u, 3249912496u, 2966213175u, 1076622508u, 2613337941u, 0, SQRT_TOLERANCE, 0},
+{ 311, 1049695766u, 3119528953u, 3217179014u, 2908718240u, 1061193922u, 3756406841u, 0, SQRT_TOLERANCE, 0},
+{ 312, 1094983928u, 2018361566u, 1100926600u, 3985805054u, 1083793705u, 3802756938u, 0, SQRT_TOLERANCE, 0},
+{ 313, 1070132580u, 409584884u, 3239758947u, 755795129u, 1071398461u, 718384128u, 0, SQRT_TOLERANCE, 0},
+{ 314, 1075772446u, 1819156379u, 3251342302u, 2982669005u, 1074152447u, 319063087u, 0, SQRT_TOLERANCE, 0},
+{ 315, 1101563433u, 2080534280u, 3188254060u, 449171797u, 1087112069u, 851985999u, 0, SQRT_TOLERANCE, 0},
+{ 316, 1095956900u, 168744837u, 3214950009u, 1322217822u, 1084320920u, 3214835u, 0, SQRT_TOLERANCE, 0},
+{ 317, 1106743252u, 3250487255u, 1062120700u, 1876195180u, 1089694349u, 557439665u, 0, SQRT_TOLERANCE, 0},
+{ 318, 1078859832u, 1336400247u, 1098057903u, 3314079581u, 1075775581u, 4291308730u, 0, SQRT_TOLERANCE, 0},
+{ 319, 1056195172u, 265025555u, 1063854282u, 3779482256u, 1064435983u, 4278076564u, 0, SQRT_TOLERANCE, 0},
+{ 320, 1067300501u, 887044257u, 1054789618u, 2732056261u, 1069927886u, 1943723413u, 0, SQRT_TOLERANCE, 0},
+{ 321, 1050106742u, 4027115185u, 3191764868u, 2940199511u, 1061377261u, 2289907591u, 0, SQRT_TOLERANCE, 0},
+{ 322, 1055016507u, 2875684421u, 3227459837u, 2251967570u, 1063792293u, 507358715u, 0, SQRT_TOLERANCE, 0},
+{ 323, 1063244412u, 284173546u, 3238823679u, 3557800647u, 1067880577u, 350201530u, 0, SQRT_TOLERANCE, 0},
+{ 324, 1101458560u, 3147771266u, 3220110464u, 2933364246u, 1087051160u, 4215200347u, 0, SQRT_TOLERANCE, 0},
+{ 325, 1064853160u, 3366183281u, 3234870843u, 537442654u, 1068744461u, 1102653645u, 0, SQRT_TOLERANCE, 0},
+{ 326, 1096635140u, 2529029548u, 3249882819u, 3781513577u, 1084598567u, 3064069855u, 0, SQRT_TOLERANCE, 0},
+{ 327, 1065952706u, 1080845539u, 3206760016u, 911778687u, 1069309466u, 71830766u, 0, SQRT_TOLERANCE, 0},
+{ 328, 1044467388u, 469586759u, 1091830022u, 3080528840u, 1058506922u, 221987346u, 0, SQRT_TOLERANCE, 0},
+{ 329, 1080249104u, 2863108169u, 3225605506u, 2508274250u, 1076418785u, 3532456349u, 0, SQRT_TOLERANCE, 0},
+{ 330, 1063343336u, 4080017377u, 3206492941u, 1470284690u, 1067945180u, 1918123523u, 0, SQRT_TOLERANCE, 0},
+{ 331, 1059636742u, 3867917386u, 1102054928u, 3504746045u, 1066149863u, 2182974269u, 0, SQRT_TOLERANCE, 0},
+{ 332, 1064522279u, 2962134101u, 3244741577u, 3390537350u, 1068602636u, 3427706147u, 0, SQRT_TOLERANCE, 0},
+{ 333, 1088201813u, 1702237980u, 1071598971u, 1102587474u, 1080387650u, 1268979567u, 0, SQRT_TOLERANCE, 0},
+{ 334, 1055486470u, 2180218657u, 3211592260u, 1206527853u, 1064077565u, 3195037399u, 0, SQRT_TOLERANCE, 0},
+{ 335, 1049601096u, 394130786u, 3242511482u, 2437699868u, 1061147139u, 977955u, 0, SQRT_TOLERANCE, 0},
+{ 336, 1044237059u, 849581558u, 3252006507u, 2008614943u, 1058395468u, 354883305u, 0, SQRT_TOLERANCE, 0},
+{ 337, 1062656366u, 3128971673u, 3249137531u, 2773583059u, 1067654866u, 1096706434u, 0, SQRT_TOLERANCE, 0},
+{ 338, 1085029866u, 590727700u, 3248651761u, 2183878539u, 1078857712u, 456992369u, 0, SQRT_TOLERANCE, 0},
+{ 339, 1101098629u, 820687580u, 3208143496u, 1402434664u, 1086823996u, 1454547448u, 0, SQRT_TOLERANCE, 0},
+{ 340, 1104807187u, 1873709254u, 3245167989u, 44275991u, 1088710498u, 4101993083u, 0, SQRT_TOLERANCE, 0},
+{ 341, 1042185105u, 1174874204u, 3208263730u, 2360372288u, 1057363358u, 2438182099u, 0, SQRT_TOLERANCE, 0},
+{ 342, 1103854676u, 937573440u, 3208953761u, 211240241u, 1088268340u, 4250080331u, 0, SQRT_TOLERANCE, 0},
+{ 343, 1096065286u, 2469774991u, 1043117070u, 3380071805u, 1084369644u, 817174119u, 0, SQRT_TOLERANCE, 0},
+{ 344, 1058121042u, 442507560u, 3254252803u, 3257889649u, 1065405825u, 1251597094u, 0, SQRT_TOLERANCE, 0},
+{ 345, 1068850520u, 1854921625u, 1049810168u, 2729627545u, 1070759199u, 420700552u, 0, SQRT_TOLERANCE, 0},
+{ 346, 1107228981u, 4001809575u, 3240128649u, 278261523u, 1089880819u, 2383679725u, 0, SQRT_TOLERANCE, 0},
+{ 347, 1087224694u, 1793907966u, 3238955714u, 398859249u, 1079957605u, 3813321906u, 0, SQRT_TOLERANCE, 0},
+{ 348, 1053468899u, 2511916952u, 3219195283u, 1697158299u, 1063073091u, 3522118557u, 0, SQRT_TOLERANCE, 0},
+{ 349, 1069985548u, 3230931724u, 3243897690u, 3508781585u, 1071313202u, 3897164374u, 0, SQRT_TOLERANCE, 0},
+{ 350, 1103847606u, 1674254897u, 1046547577u, 217148561u, 1088264523u, 271341403u, 0, SQRT_TOLERANCE, 0},
+{ 351, 1063780306u, 3275604304u, 3194840159u, 2991205850u, 1068217952u, 3391390920u, 0, SQRT_TOLERANCE, 0},
+{ 352, 1047765727u, 3509997278u, 3248888030u, 3897986511u, 1060223393u, 119328239u, 0, SQRT_TOLERANCE, 0},
+{ 353, 1047182435u, 2156824613u, 1042295665u, 1239257646u, 1059930096u, 1766875221u, 0, SQRT_TOLERANCE, 0},
+{ 354, 1065780437u, 1073153314u, 3250031627u, 2567234990u, 1069209621u, 44110028u, 0, SQRT_TOLERANCE, 0},
+{ 355, 1043109764u, 4261696995u, 3197784432u, 323702024u, 1057898363u, 992679925u, 0, SQRT_TOLERANCE, 0},
+{ 356, 1096207349u, 4075177615u, 3202791065u, 1919006082u, 1084430638u, 1930040197u, 0, SQRT_TOLERANCE, 0},
+{ 357, 1091786365u, 386429966u, 1086504491u, 3698826164u, 1082234629u, 2019393592u, 0, SQRT_TOLERANCE, 0},
+{ 358, 1078327190u, 1681986446u, 3194985869u, 3072950140u, 1075479391u, 1795498102u, 0, SQRT_TOLERANCE, 0},
+{ 359, 1069828285u, 3719038997u, 1055433962u, 3331415058u, 1071217200u, 836481681u, 0, SQRT_TOLERANCE, 0},
+{ 360, 1060749713u, 2420250111u, 3238002206u, 1928661079u, 1066683609u, 3327390033u, 0, SQRT_TOLERANCE, 0},
+{ 361, 1081914210u, 3679866727u, 3227386672u, 1273835792u, 1077243361u, 2639059259u, 0, SQRT_TOLERANCE, 0},
+{ 362, 1041622738u, 2682092368u, 3234222284u, 1325425811u, 1057142844u, 4093900513u, 0, SQRT_TOLERANCE, 0},
+{ 363, 1056312613u, 4175172697u, 3208346191u, 2130706153u, 1064487062u, 3296692257u, 0, SQRT_TOLERANCE, 0},
+{ 364, 1092089624u, 1200784450u, 1083605096u, 1248595607u, 1082365163u, 209668871u, 0, SQRT_TOLERANCE, 0},
+{ 365, 1066407215u, 1897285171u, 3251296075u, 944966123u, 1069550228u, 960024037u, 0, SQRT_TOLERANCE, 0},
+{ 366, 1093887602u, 2270747330u, 3230692631u, 422503284u, 1083285062u, 241119116u, 0, SQRT_TOLERANCE, 0},
+{ 367, 1084120037u, 2857564741u, 1075647403u, 3308906709u, 1078331938u, 2725462142u, 0, SQRT_TOLERANCE, 0},
+{ 368, 1055991450u, 1380066948u, 3232612906u, 2613634294u, 1064341694u, 1923848093u, 0, SQRT_TOLERANCE, 0},
+{ 369, 1063890856u, 4022784584u, 1060483857u, 3264056381u, 1068280696u, 332562982u, 0, SQRT_TOLERANCE, 0},
+{ 370, 1044637404u, 1778509100u, 3213146285u, 2665833973u, 1058618476u, 4292915269u, 0, SQRT_TOLERANCE, 0},
+{ 371, 1069243652u, 1859175955u, 1079949560u, 4258450607u, 1070918794u, 4125613799u, 0, SQRT_TOLERANCE, 0},
+{ 372, 1048277388u, 4128020197u, 1076266146u, 4122840980u, 1060435043u, 1077067733u, 0, SQRT_TOLERANCE, 0},
+{ 373, 1045699515u, 2454653987u, 3229487005u, 2977478685u, 1059188698u, 1481259470u, 0, SQRT_TOLERANCE, 0},
+{ 374, 1106072835u, 1355181872u, 1095308770u, 436846481u, 1089381139u, 1464698042u, 0, SQRT_TOLERANCE, 0},
+{ 375, 1099121654u, 2592856453u, 3247825559u, 3195234082u, 1085854798u, 2943936566u, 0, SQRT_TOLERANCE, 0},
+{ 376, 1074634375u, 3554670043u, 1091621009u, 3321236467u, 1073662304u, 1296983174u, 0, SQRT_TOLERANCE, 0},
+{ 377, 1069012833u, 1936670355u, 1095715713u, 2958468553u, 1070827505u, 3644782479u, 0, SQRT_TOLERANCE, 0},
+{ 378, 1044807461u, 2960339502u, 1098808013u, 1044068983u, 1058722993u, 994227485u, 0, SQRT_TOLERANCE, 0},
+{ 379, 1049207537u, 4093388677u, 1095478112u, 1735930261u, 1060938846u, 2843545940u, 0, SQRT_TOLERANCE, 0},
+{ 380, 1091040302u, 1807398746u, 3195743135u, 4261616162u, 1081847719u, 1064219385u, 0, SQRT_TOLERANCE, 0},
+{ 381, 1061810546u, 3250576797u, 1059002384u, 3043079652u, 1067241495u, 3192629548u, 0, SQRT_TOLERANCE, 0},
+{ 382, 1069207109u, 666051428u, 3208765404u, 1912684117u, 1070904751u, 990593857u, 0, SQRT_TOLERANCE, 0},
+{ 383, 1103487420u, 1949030179u, 1096388934u, 896459246u, 1088058924u, 1455051938u, 0, SQRT_TOLERANCE, 0},
+{ 384, 1054300653u, 622499767u, 1066707637u, 1490260486u, 1063474250u, 2407866507u, 0, SQRT_TOLERANCE, 0},
+{ 385, 1106688493u, 1490616165u, 3251242436u, 795675736u, 1089671583u, 568721906u, 0, SQRT_TOLERANCE, 0},
+{ 386, 1080943896u, 3662877092u, 3234317146u, 3200513112u, 1076817399u, 279371340u, 0, SQRT_TOLERANCE, 0},
+{ 387, 1084088786u, 1356101968u, 3236536816u, 3062844611u, 1078320550u, 100375266u, 0, SQRT_TOLERANCE, 0},
+{ 388, 1072438992u, 2284484846u, 3219498359u, 3240896015u, 1072562014u, 617114991u, 0, SQRT_TOLERANCE, 0},
+{ 389, 1088276041u, 494503287u, 1092811254u, 142673998u, 1080415120u, 2671341223u, 0, SQRT_TOLERANCE, 0},
+{ 390, 1104642268u, 3394882641u, 3225306538u, 364852125u, 1088644193u, 1187366670u, 0, SQRT_TOLERANCE, 0},
+{ 391, 1077778115u, 193885269u, 1088149839u, 1359805831u, 1075167774u, 1898916614u, 0, SQRT_TOLERANCE, 0},
+{ 392, 1053001134u, 592580907u, 3199560872u, 3086438952u, 1062796931u, 3797640977u, 0, SQRT_TOLERANCE, 0},
+{ 393, 1059518664u, 1778008540u, 1049064687u, 73581647u, 1066081497u, 559187402u, 0, SQRT_TOLERANCE, 0},
+{ 394, 1099249950u, 233240285u, 1081923320u, 2710903921u, 1085935472u, 1600406137u, 0, SQRT_TOLERANCE, 0},
+{ 395, 1069513767u, 3719878805u, 1079866720u, 3615458228u, 1071018448u, 3499230725u, 0, SQRT_TOLERANCE, 0},
+{ 396, 1073711076u, 3647632375u, 3247225271u, 3839959621u, 1073116671u, 2152208986u, 0, SQRT_TOLERANCE, 0},
+{ 397, 1103401096u, 2232210456u, 3235434773u, 224271737u, 1088005918u, 2383898689u, 0, SQRT_TOLERANCE, 0},
+{ 398, 1045520036u, 2134662911u, 3190390590u, 4239009051u, 1059105720u, 3171883903u, 0, SQRT_TOLERANCE, 0},
+{ 399, 1080526145u, 2305279897u, 1077668039u, 1854523320u, 1076588353u, 2641363539u, 0, SQRT_TOLERANCE, 0},
+{ 400, 1072380611u, 538224650u, 3206153057u, 1379649610u, 1072530624u, 978315840u, 0, SQRT_TOLERANCE, 0},
+{ 401, 1048926859u, 3683897920u, 3244167599u, 3647579469u, 1060774894u, 2013114162u, 0, SQRT_TOLERANCE, 0},
+{ 402, 1090280933u, 2694093608u, 1042775347u, 598406111u, 1081429471u, 2029027480u, 0, SQRT_TOLERANCE, 0},
+{ 403, 1064151744u, 872706833u, 1084802480u, 2200602798u, 1068421049u, 2077007663u, 0, SQRT_TOLERANCE, 0},
+{ 404, 1042339597u, 904146293u, 1060867322u, 1729685598u, 1057437372u, 3967206682u, 0, SQRT_TOLERANCE, 0},
+{ 405, 1048211322u, 1894173462u, 3232800651u, 191960416u, 1060409584u, 2524566565u, 0, SQRT_TOLERANCE, 0},
+{ 406, 1091225343u, 3521028551u, 1054522089u, 3287274359u, 1081951677u, 2993598159u, 0, SQRT_TOLERANCE, 0},
+{ 407, 1095386964u, 959640601u, 3201578263u, 4136915018u, 1084030881u, 963614327u, 0, SQRT_TOLERANCE, 0},
+{ 408, 1064005451u, 1553716379u, 1106027987u, 984725765u, 1068343595u, 3947277126u, 0, SQRT_TOLERANCE, 0},
+{ 409, 1091348993u, 2287646644u, 3240329321u, 2276183378u, 1082018112u, 4217644848u, 0, SQRT_TOLERANCE, 0},
+{ 410, 1068209174u, 3940225170u, 3199544434u, 997572161u, 1070445827u, 3622717486u, 0, SQRT_TOLERANCE, 0},
+{ 411, 1065284713u, 36116288u, 3206886566u, 4196602670u, 1068908857u, 3680300451u, 0, SQRT_TOLERANCE, 0},
+{ 412, 1094212205u, 3550227562u, 3207257983u, 2747744117u, 1083424086u, 1863409761u, 0, SQRT_TOLERANCE, 0},
+{ 413, 1104236126u, 507130047u, 1048359321u, 3229888373u, 1088463847u, 2311468462u, 0, SQRT_TOLERANCE, 0},
+{ 414, 1075513130u, 2210969014u, 1081031001u, 1946786091u, 1074056094u, 441721510u, 0, SQRT_TOLERANCE, 0},
+{ 415, 1088823342u, 4059150589u, 3189759234u, 1177045799u, 1080728531u, 3313459474u, 0, SQRT_TOLERANCE, 0},
+{ 416, 1093103612u, 2664812822u, 1050343198u, 2034180320u, 1082876631u, 1296961602u, 0, SQRT_TOLERANCE, 0},
+{ 417, 1066295469u, 1175750283u, 3235559706u, 1424491340u, 1069493667u, 829969552u, 0, SQRT_TOLERANCE, 0},
+{ 418, 1066420545u, 1630036121u, 3231972785u, 3195479448u, 1069556855u, 583687698u, 0, SQRT_TOLERANCE, 0},
+{ 419, 1090429875u, 2527029044u, 1046927050u, 4000723255u, 1081484323u, 2672232682u, 0, SQRT_TOLERANCE, 0},
+{ 420, 1085208677u, 3335703647u, 3237349676u, 3869440059u, 1078950687u, 3356378u, 0, SQRT_TOLERANCE, 0},
+{ 421, 1091433848u, 3888398377u, 3196041693u, 1290567220u, 1082062446u, 2037713556u, 0, SQRT_TOLERANCE, 0},
+{ 422, 1066679070u, 3242451480u, 3248384948u, 707431021u, 1069678036u, 2788512521u, 0, SQRT_TOLERANCE, 0},
+{ 423, 1083230509u, 2739665123u, 1060777905u, 1733073225u, 1077961570u, 689605687u, 0, SQRT_TOLERANCE, 0},
+{ 424, 1078517061u, 1297274853u, 3208848704u, 3341639139u, 1075590425u, 3525237030u, 0, SQRT_TOLERANCE, 0},
+{ 425, 1046570941u, 2228057309u, 1084318902u, 1317851136u, 1059559844u, 287421473u, 0, SQRT_TOLERANCE, 0},
+{ 426, 1088255327u, 270039934u, 3241414679u, 3063626339u, 1080407508u, 350055924u, 0, SQRT_TOLERANCE, 0},
+{ 427, 1071694702u, 83062251u, 3211262173u, 2659016437u, 1072113970u, 3297599259u, 0, SQRT_TOLERANCE, 0},
+{ 428, 1095743886u, 3833539373u, 3206667189u, 1567476111u, 1084218547u, 4206856861u, 0, SQRT_TOLERANCE, 0},
+{ 429, 1057711424u, 2382776852u, 3249232579u, 1546622468u, 1065196479u, 791105684u, 0, SQRT_TOLERANCE, 0},
+{ 430, 1085536439u, 1714300821u, 1104130938u, 4167591598u, 1079107637u, 1873290283u, 0, SQRT_TOLERANCE, 0},
+{ 431, 1051092760u, 2798720100u, 1086978789u, 449990704u, 1061865045u, 3309079407u, 0, SQRT_TOLERANCE, 0},
+{ 432, 1083714767u, 4039516226u, 3244344107u, 4272932619u, 1078176464u, 4164345184u, 0, SQRT_TOLERANCE, 0},
+{ 433, 1075224793u, 1683007544u, 1091105663u, 3805494321u, 1073940246u, 3618231263u, 0, SQRT_TOLERANCE, 0},
+{ 434, 1073369300u, 2072627412u, 1094383324u, 3394151662u, 1072989441u, 594658976u, 0, SQRT_TOLERANCE, 0},
+{ 435, 1073086376u, 1120106427u, 3223631624u, 3404608264u, 1072874198u, 4021168670u, 0, SQRT_TOLERANCE, 0},
+{ 436, 1097859997u, 559918757u, 3205077053u, 908100198u, 1085276622u, 1989432736u, 0, SQRT_TOLERANCE, 0},
+{ 437, 1042677918u, 2026673913u, 3244833635u, 2844573214u, 1057654994u, 590963432u, 0, SQRT_TOLERANCE, 0},
+{ 438, 1107083611u, 3946837259u, 3234993796u, 3850406820u, 1089827608u, 1615081452u, 0, SQRT_TOLERANCE, 0},
+{ 439, 1057479809u, 3139330994u, 1046133568u, 1539650690u, 1065066997u, 1500675044u, 0, SQRT_TOLERANCE, 0},
+{ 440, 1089221852u, 1554593884u, 3228899878u, 2813752562u, 1080953630u, 571174710u, 0, SQRT_TOLERANCE, 0},
+{ 441, 1056505004u, 3804703138u, 1072931071u, 2053677923u, 1064566443u, 2190929495u, 0, SQRT_TOLERANCE, 0},
+{ 442, 1097380651u, 289355864u, 1078453818u, 2143066338u, 1085021485u, 4195797290u, 0, SQRT_TOLERANCE, 0},
+{ 443, 1056456232u, 2157691971u, 1106629150u, 110806409u, 1064546781u, 4218819400u, 0, SQRT_TOLERANCE, 0},
+{ 444, 1082157019u, 3570399481u, 1085637605u, 180265334u, 1077340569u, 631385589u, 0, SQRT_TOLERANCE, 0},
+{ 445, 1053496534u, 558779875u, 3202046748u, 2338464653u, 1063088170u, 1997804931u, 0, SQRT_TOLERANCE, 0},
+{ 446, 1045705464u, 1703969219u, 3229797258u, 1417521063u, 1059191348u, 2477974706u, 0, SQRT_TOLERANCE, 0},
+{ 447, 1090298613u, 3917440951u, 1051668894u, 3736066983u, 1081436094u, 4028266821u, 0, SQRT_TOLERANCE, 0},
+{ 448, 1064752080u, 3106613409u, 1066627453u, 2735392257u, 1068702840u, 1921860524u, 0, SQRT_TOLERANCE, 0},
+{ 449, 1065665372u, 2229777605u, 1065061963u, 2405869925u, 1069139646u, 3512112585u, 0, SQRT_TOLERANCE, 0},
+{ 450, 1091979581u, 3967957902u, 1057416138u, 3459188071u, 1082319389u, 2225109344u, 0, SQRT_TOLERANCE, 0},
+{ 451, 1068639210u, 3699016825u, 3249713090u, 796144848u, 1070664028u, 3804485728u, 0, SQRT_TOLERANCE, 0},
+{ 452, 1081332748u, 3285165564u, 3211948811u, 401510871u, 1077006277u, 248376739u, 0, SQRT_TOLERANCE, 0},
+{ 453, 1094257658u, 634857910u, 3199607513u, 914218057u, 1083442377u, 3804716202u, 0, SQRT_TOLERANCE, 0},
+{ 454, 1083743336u, 2030735578u, 3233855943u, 965677531u, 1078188033u, 3449775081u, 0, SQRT_TOLERANCE, 0},
+{ 455, 1079556815u, 3957229084u, 1051050470u, 3123776651u, 1076094015u, 3936469720u, 0, SQRT_TOLERANCE, 0},
+{ 456, 1074379685u, 162122081u, 3239376395u, 108064594u, 1073525287u, 2316194265u, 0, SQRT_TOLERANCE, 0},
+{ 457, 1089788138u, 869031839u, 3225020876u, 1344301606u, 1081230199u, 3731176513u, 0, SQRT_TOLERANCE, 0},
+{ 458, 1066949826u, 946696117u, 3231825228u, 1700703647u, 1069792840u, 497364938u, 0, SQRT_TOLERANCE, 0},
+{ 459, 1075492875u, 3394168074u, 1076939786u, 1666995668u, 1074048279u, 2965312037u, 0, SQRT_TOLERANCE, 0},
+{ 460, 1061291147u, 2488789804u, 3238508333u, 1506943664u, 1066926855u, 2269676912u, 0, SQRT_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1072739917u, 1637771475u, 0, SQRT_TOLERANCE, 0},
+{ 462, 1072450894u, 1244307192u, 3191297711u, 2540916692u, 1072568352u, 232285615u, 0, SQRT_TOLERANCE, 0},
+{ 463, 1052579044u, 2871645739u, 3239081581u, 1440249115u, 1062572585u, 2977319420u, 0, SQRT_TOLERANCE, 0},
+{ 464, 1068350633u, 1231934926u, 3236746788u, 603977748u, 1070520581u, 257695151u, 0, SQRT_TOLERANCE, 0},
+{ 465, 1047966041u, 2386312545u, 1063169277u, 2715234268u, 1060310533u, 2518007380u, 0, SQRT_TOLERANCE, 0},
+{ 466, 1087803418u, 915867083u, 1046790892u, 3347417612u, 1080229899u, 159367245u, 0, SQRT_TOLERANCE, 0},
+{ 467, 1105984188u, 3553288373u, 1065698616u, 2906680663u, 1089334297u, 3615047943u, 0, SQRT_TOLERANCE, 0},
+{ 468, 1045506226u, 2342364630u, 1051356723u, 4019093203u, 1059099073u, 1623286304u, 0, SQRT_TOLERANCE, 0},
+{ 469, 1053685514u, 2911548084u, 1105282515u, 2476735795u, 1063188286u, 346296314u, 0, SQRT_TOLERANCE, 0},
+{ 470, 1050472772u, 1836216409u, 1101062307u, 2519592554u, 1061520623u, 948047430u, 0, SQRT_TOLERANCE, 0},
+{ 471, 1070178161u, 1235369496u, 3222946447u, 668087854u, 1071424105u, 3010765323u, 0, SQRT_TOLERANCE, 0},
+{ 472, 1061070948u, 2981820811u, 1059838516u, 2845580478u, 1066804693u, 2312102465u, 0, SQRT_TOLERANCE, 0},
+{ 473, 1046447766u, 1565550570u, 3217165795u, 4162017137u, 1059485064u, 1552579793u, 0, SQRT_TOLERANCE, 0},
+{ 474, 1089767730u, 2808968027u, 1055630096u, 1782326814u, 1081221227u, 419331521u, 0, SQRT_TOLERANCE, 0},
+{ 475, 1053576974u, 1492622658u, 3216653077u, 3972512122u, 1063131406u, 1097615809u, 0, SQRT_TOLERANCE, 0},
+{ 476, 1074688031u, 2722693603u, 3227814791u, 3169731970u, 1073689999u, 2047948742u, 0, SQRT_TOLERANCE, 0},
+{ 477, 1070422983u, 899763203u, 3207606001u, 2804747833u, 1071556251u, 2614854416u, 0, SQRT_TOLERANCE, 0},
+{ 478, 1083186677u, 3789058912u, 3228095081u, 4135937628u, 1077939955u, 4096966973u, 0, SQRT_TOLERANCE, 0},
+{ 479, 1060199382u, 1682808307u, 3206960335u, 232877759u, 1066445408u, 338680168u, 0, SQRT_TOLERANCE, 0},
+{ 480, 1094607838u, 2851963139u, 3246852961u, 2590862592u, 1083575559u, 1257537605u, 0, SQRT_TOLERANCE, 0},
+{ 481, 1081200406u, 2422232642u, 3234779662u, 290458310u, 1076945240u, 1681558365u, 0, SQRT_TOLERANCE, 0},
+{ 482, 1063187430u, 1082582386u, 1075605675u, 2602133689u, 1067860234u, 3662434387u, 0, SQRT_TOLERANCE, 0},
+{ 483, 1092334963u, 1789635787u, 1059414278u, 1048286093u, 1082461759u, 2214805042u, 0, SQRT_TOLERANCE, 0},
+{ 484, 1098330542u, 231339448u, 1055573265u, 504907415u, 1085490075u, 486303213u, 0, SQRT_TOLERANCE, 0},
+{ 485, 1063211461u, 1153251200u, 3204617090u, 1772013857u, 1067868848u, 870441917u, 0, SQRT_TOLERANCE, 0},
+{ 486, 1099551055u, 1082898276u, 3212089272u, 1449080862u, 1086111289u, 1748979548u, 0, SQRT_TOLERANCE, 0},
+{ 487, 1086008285u, 3177299045u, 1058862813u, 809400815u, 1079302583u, 2892414422u, 0, SQRT_TOLERANCE, 0},
+{ 488, 1083370902u, 1924429710u, 1056464743u, 3349283177u, 1078028046u, 1838721304u, 0, SQRT_TOLERANCE, 0},
+{ 489, 1097989743u, 42238036u, 1042379500u, 2113559863u, 1085339577u, 3245452310u, 0, SQRT_TOLERANCE, 0},
+{ 490, 1064761243u, 3304403230u, 3217556703u, 58952646u, 1068706670u, 1139532016u, 0, SQRT_TOLERANCE, 0},
+{ 491, 1065185882u, 1645486982u, 3224301095u, 3636267471u, 1068872887u, 1412319027u, 0, SQRT_TOLERANCE, 0},
+{ 492, 1062762009u, 619402181u, 3235208235u, 557360557u, 1067698313u, 4120404160u, 0, SQRT_TOLERANCE, 0},
+{ 493, 1090754746u, 110029735u, 1046937383u, 984375729u, 1081674418u, 894441904u, 0, SQRT_TOLERANCE, 0},
+{ 494, 1042013090u, 4063688092u, 3203235744u, 1049950343u, 1057299644u, 2998030758u, 0, SQRT_TOLERANCE, 0},
+{ 495, 1062350619u, 650996069u, 1054971928u, 3953359826u, 1067519645u, 362233961u, 0, SQRT_TOLERANCE, 0},
+{ 496, 1079572157u, 66926332u, 1090561839u, 1379780888u, 1076100171u, 1129023565u, 0, SQRT_TOLERANCE, 0},
+{ 497, 1085969659u, 2803378256u, 1086057989u, 498534626u, 1079287682u, 801921590u, 0, SQRT_TOLERANCE, 0},
+{ 498, 1082618553u, 2846400785u, 1047142525u, 1375153550u, 1077634160u, 3568323078u, 0, SQRT_TOLERANCE, 0},
+{ 499, 1044581201u, 2869128958u, 1070972315u, 4246440273u, 1058582451u, 1318885712u, 0, SQRT_TOLERANCE, 0},
+{ 500, 1051832506u, 3112381207u, 1044430965u, 3981604561u, 1062261486u, 4117994916u, 0, SQRT_TOLERANCE, 0},
+{ 501, 1083771349u, 243303420u, 1093735824u, 1575581926u, 1078199278u, 1873736985u, 0, SQRT_TOLERANCE, 0},
+{ 502, 1091654349u, 3218865041u, 3204803496u, 3840388050u, 1082172937u, 1588899049u, 0, SQRT_TOLERANCE, 0},
+{ 503, 1048415431u, 336846959u, 1052664471u, 3798336786u, 1060486770u, 1564179785u, 0, SQRT_TOLERANCE, 0},
+{ 504, 1055954236u, 3639240976u, 1081202165u, 1844741676u, 1064323571u, 2250502424u, 0, SQRT_TOLERANCE, 0},
+{ 505, 1064421145u, 717293069u, 3211534283u, 582401011u, 1068555662u, 2571126825u, 0, SQRT_TOLERANCE, 0},
+{ 506, 1104478864u, 3766248610u, 3196520332u, 1174437546u, 1088574893u, 1603570037u, 0, SQRT_TOLERANCE, 0},
+{ 507, 1083431226u, 756959182u, 3204099341u, 1581804034u, 1078055448u, 896088740u, 0, SQRT_TOLERANCE, 0},
+{ 508, 1058322796u, 3560686300u, 3220980617u, 4277975772u, 1065498023u, 2204210694u, 0, SQRT_TOLERANCE, 0},
+{ 509, 1062422428u, 2598148853u, 3217622194u, 3460421008u, 1067552832u, 197631934u, 0, SQRT_TOLERANCE, 0},
+{ 510, 1066720824u, 136600515u, 3209934920u, 3340653128u, 1069696458u, 2114931033u, 0, SQRT_TOLERANCE, 0},
+{ 511, 1096820310u, 1045480938u, 3251354609u, 4133432965u, 1084668841u, 4105005870u, 0, SQRT_TOLERANCE, 0},
+{ 512, 1091599431u, 1630207738u, 3239996829u, 2393354808u, 1082146220u, 3524218270u, 0, SQRT_TOLERANCE, 0},
+{ 513, 1043142370u, 3739770117u, 1059520750u, 3959551225u, 1057915536u, 372839383u, 0, SQRT_TOLERANCE, 0},
+{ 514, 1083246857u, 1498861716u, 1091297147u, 847410798u, 1077969520u, 4115883532u, 0, SQRT_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 1073045725u, 2729031253u, 0, SQRT_TOLERANCE, 0},
+{ 516, 1054849265u, 2353103845u, 3235718771u, 2978889966u, 1063683953u, 418597223u, 0, SQRT_TOLERANCE, 0},
+{ 517, 1103874344u, 1546972125u, 3249076079u, 1987349196u, 1088278923u, 667617194u, 0, SQRT_TOLERANCE, 0},
+{ 518, 1090735865u, 2769161072u, 1075207126u, 292616282u, 1081662310u, 1119441071u, 0, SQRT_TOLERANCE, 0},
+{ 519, 1052228650u, 36855311u, 1052128202u, 1479039342u, 1062436040u, 3281371343u, 0, SQRT_TOLERANCE, 0},
+{ 520, 1083757053u, 2027463605u, 1066023013u, 3369686340u, 1078193552u, 389181627u, 0, SQRT_TOLERANCE, 0},
+{ 521, 1050369101u, 3808681655u, 1054161346u, 1821773119u, 1061481541u, 707897882u, 0, SQRT_TOLERANCE, 0},
+{ 522, 1040685928u, 3175490326u, 3226879970u, 845687760u, 1056668714u, 230088075u, 0, SQRT_TOLERANCE, 0},
+{ 523, 1042302993u, 3124482451u, 3242748377u, 3259417226u, 1057411931u, 1895289457u, 0, SQRT_TOLERANCE, 0},
+{ 524, 1045245695u, 2751606436u, 3236210939u, 3923142740u, 1058967346u, 2501951112u, 0, SQRT_TOLERANCE, 0},
+{ 525, 1095694737u, 2016872044u, 3228408064u, 4201274408u, 1084193719u, 1341308550u, 0, SQRT_TOLERANCE, 0},
+{ 526, 1051865606u, 1019916843u, 3219974785u, 1977881787u, 1062277115u, 1815423411u, 0, SQRT_TOLERANCE, 0},
+{ 527, 1051995104u, 2060433318u, 1075872515u, 366073725u, 1062336268u, 898590485u, 0, SQRT_TOLERANCE, 0},
+{ 528, 1043696909u, 1098469906u, 1082900695u, 2349346832u, 1058181560u, 247256455u, 0, SQRT_TOLERANCE, 0},
+{ 529, 1062491059u, 3011196295u, 3252479932u, 2459281672u, 1067583679u, 2229559301u, 0, SQRT_TOLERANCE, 0},
+{ 530, 1073850675u, 2843222682u, 1089275809u, 298982001u, 1073202652u, 76908366u, 0, SQRT_TOLERANCE, 0},
+{ 531, 1101737698u, 914741728u, 3203468059u, 2833809843u, 1087209039u, 1088872555u, 0, SQRT_TOLERANCE, 0},
+{ 532, 1089280230u, 1274901962u, 3241535845u, 3759113509u, 1080984478u, 1577473414u, 0, SQRT_TOLERANCE, 0},
+{ 533, 1098432794u, 2134927252u, 3253802671u, 3013731444u, 1085531847u, 2133386593u, 0, SQRT_TOLERANCE, 0},
+{ 534, 1099201341u, 2230655177u, 3254510616u, 1249674366u, 1085905363u, 1067783034u, 0, SQRT_TOLERANCE, 0},
+{ 535, 1062971253u, 717357389u, 1083533731u, 3746683362u, 1067780333u, 3369307810u, 0, SQRT_TOLERANCE, 0},
+{ 536, 1066289466u, 834976849u, 3217357661u, 2465861779u, 1069490584u, 943739656u, 0, SQRT_TOLERANCE, 0},
+{ 537, 1045656117u, 1385714428u, 1053358395u, 3007113740u, 1059169180u, 1599080278u, 0, SQRT_TOLERANCE, 0},
+{ 538, 1050527919u, 599268545u, 3201368210u, 2309854744u, 1061540977u, 2841166373u, 0, SQRT_TOLERANCE, 0},
+{ 539, 1069954454u, 2840234388u, 3232496515u, 333365983u, 1071294639u, 2819921999u, 0, SQRT_TOLERANCE, 0},
+{ 540, 1045922781u, 3136078996u, 3194520860u, 2650572904u, 1059284382u, 1951861770u, 0, SQRT_TOLERANCE, 0},
+{ 541, 1086204043u, 2405805086u, 3251640319u, 324233833u, 1079375734u, 3915012143u, 0, SQRT_TOLERANCE, 0},
+{ 542, 1106699146u, 2589598340u, 3254677807u, 952438812u, 1089676044u, 2397351581u, 0, SQRT_TOLERANCE, 0},
+{ 543, 1041631125u, 1922837702u, 3216892718u, 3535907549u, 1057146423u, 3893510193u, 0, SQRT_TOLERANCE, 0},
+{ 544, 1096132220u, 261447440u, 3209805849u, 1150571079u, 1084398761u, 3527157321u, 0, SQRT_TOLERANCE, 0},
+{ 545, 1095805232u, 4026487528u, 1073152064u, 27340691u, 1084249021u, 1433674918u, 0, SQRT_TOLERANCE, 0},
+{ 546, 1081640044u, 338765118u, 1086225786u, 3207238249u, 1077136979u, 4074518894u, 0, SQRT_TOLERANCE, 0},
+{ 547, 1048699055u, 1085283176u, 3187775111u, 1601194210u, 1060629270u, 1677883377u, 0, SQRT_TOLERANCE, 0},
+{ 548, 1091520173u, 3031712790u, 3252307859u, 170666844u, 1082106575u, 675404539u, 0, SQRT_TOLERANCE, 0},
+{ 549, 1071378583u, 3148395674u, 1041913758u, 3306391490u, 1071981740u, 294778774u, 0, SQRT_TOLERANCE, 0},
+{ 550, 1053793422u, 2205233857u, 3208100078u, 3993195511u, 1063243296u, 1682235421u, 0, SQRT_TOLERANCE, 0},
+{ 551, 1067699608u, 4282766727u, 1072820377u, 1874778218u, 1070148707u, 2024206196u, 0, SQRT_TOLERANCE, 0},
+{ 552, 1063349444u, 2920860798u, 3218070226u, 3104066154u, 1067949324u, 2004493119u, 0, SQRT_TOLERANCE, 0},
+{ 553, 1057466703u, 969991373u, 3250596895u, 1734386152u, 1065059392u, 1651745052u, 0, SQRT_TOLERANCE, 0},
+{ 554, 1091432170u, 1218740205u, 3239802737u, 2610078504u, 1082061578u, 3684061174u, 0, SQRT_TOLERANCE, 0},
+{ 555, 1058547594u, 1485218325u, 3220870240u, 3591664613u, 1065593003u, 3784987544u, 0, SQRT_TOLERANCE, 0},
+{ 556, 1054590495u, 690157417u, 3190850619u, 4192347699u, 1063589012u, 317003585u, 0, SQRT_TOLERANCE, 0},
+{ 557, 1096053810u, 4009839784u, 1079670252u, 394167192u, 1084364580u, 884294277u, 0, SQRT_TOLERANCE, 0},
+{ 558, 1087075589u, 961532417u, 1092588071u, 2923790239u, 1079878723u, 1394752703u, 0, SQRT_TOLERANCE, 0},
+{ 559, 1056395443u, 4174125604u, 1050682630u, 2169701868u, 1064521848u, 4039398156u, 0, SQRT_TOLERANCE, 0},
+{ 560, 1095608827u, 4146748230u, 1087373950u, 2481478351u, 1084149587u, 2478852563u, 0, SQRT_TOLERANCE, 0},
+{ 561, 1076987866u, 3984715440u, 1050421618u, 2446142566u, 1074839412u, 69901431u, 0, SQRT_TOLERANCE, 0},
+{ 562, 1084172406u, 936290150u, 1100614426u, 3625806370u, 1078350824u, 310580915u, 0, SQRT_TOLERANCE, 0},
+{ 563, 1099787952u, 1866615265u, 3215651428u, 2337013350u, 1086238841u, 791343450u, 0, SQRT_TOLERANCE, 0},
+{ 564, 1105714654u, 712227971u, 1106004723u, 973148499u, 1089184447u, 389736924u, 0, SQRT_TOLERANCE, 0},
+{ 565, 1082604551u, 3409813738u, 3244817008u, 1933503498u, 1077625963u, 2393156367u, 0, SQRT_TOLERANCE, 0},
+{ 566, 1079943733u, 3180389060u, 3228735703u, 83422217u, 1076241305u, 2779503497u, 0, SQRT_TOLERANCE, 0},
+{ 567, 1077878724u, 556972671u, 3204582372u, 841555801u, 1075204298u, 1078021586u, 0, SQRT_TOLERANCE, 0},
+{ 568, 1070767721u, 4189151332u, 1080874032u, 706326922u, 1071727234u, 2527824148u, 0, SQRT_TOLERANCE, 0},
+{ 569, 1096151307u, 198291836u, 1057281892u, 2188836928u, 1084406938u, 2543197104u, 0, SQRT_TOLERANCE, 0},
+{ 570, 1078091995u, 1219449298u, 3228734687u, 3504562743u, 1075331132u, 976795682u, 0, SQRT_TOLERANCE, 0},
+{ 571, 1057086816u, 1776099219u, 1094316777u, 4188083896u, 1064823007u, 3438777187u, 0, SQRT_TOLERANCE, 0},
+{ 572, 1046362060u, 2614400266u, 1073750227u, 3003203347u, 1059454212u, 1643979555u, 0, SQRT_TOLERANCE, 0},
+{ 573, 1066499030u, 2959351406u, 1105603716u, 311851587u, 1069595061u, 2558039374u, 0, SQRT_TOLERANCE, 0},
+{ 574, 1084544434u, 865443613u, 1097532516u, 3622237781u, 1078579741u, 3398039023u, 0, SQRT_TOLERANCE, 0},
+{ 575, 1084303018u, 447506102u, 3195759295u, 3603669725u, 1078422876u, 353949276u, 0, SQRT_TOLERANCE, 0},
+{ 576, 1097890173u, 3934398273u, 1040996422u, 2968621268u, 1085291597u, 1385209631u, 0, SQRT_TOLERANCE, 0},
+{ 577, 1049256177u, 784208771u, 1088764788u, 2182296421u, 1060965823u, 2578700877u, 0, SQRT_TOLERANCE, 0},
+{ 578, 1100848643u, 1527590526u, 3206961556u, 2823164069u, 1086702792u, 3436020600u, 0, SQRT_TOLERANCE, 0},
+{ 579, 1089160483u, 3876699591u, 3207481130u, 4028148535u, 1080920671u, 3222192366u, 0, SQRT_TOLERANCE, 0},
+{ 580, 1083576186u, 2164249756u, 1059857743u, 1785169952u, 1078118804u, 3465933800u, 0, SQRT_TOLERANCE, 0},
+{ 581, 1091804009u, 2079273665u, 1080303860u, 625760474u, 1082242626u, 2162485561u, 0, SQRT_TOLERANCE, 0},
+{ 582, 1079002460u, 3636214836u, 1068367620u, 2932621925u, 1075847817u, 648033979u, 0, SQRT_TOLERANCE, 0},
+{ 583, 1043995372u, 4274131512u, 1047707755u, 92550763u, 1058303986u, 1278719811u, 0, SQRT_TOLERANCE, 0},
+{ 584, 1051338473u, 2648933384u, 1084603503u, 3534304873u, 1062006200u, 3973890530u, 0, SQRT_TOLERANCE, 0},
+{ 585, 1064563235u, 3216750767u, 3191088629u, 547482628u, 1068621123u, 3033538209u, 0, SQRT_TOLERANCE, 0},
+{ 586, 1061084774u, 1420360746u, 1080063101u, 1690029499u, 1066809678u, 4006657168u, 0, SQRT_TOLERANCE, 0},
+{ 587, 1082371716u, 1908572179u, 1080112083u, 1228319033u, 1077483674u, 2480094859u, 0, SQRT_TOLERANCE, 0},
+{ 588, 1048158178u, 500312015u, 3212368508u, 3864619086u, 1060388751u, 230035550u, 0, SQRT_TOLERANCE, 0},
+{ 589, 1073851962u, 4211343447u, 1087492676u, 4272583781u, 1073203518u, 808839606u, 0, SQRT_TOLERANCE, 0},
+{ 590, 1099392394u, 2382118000u, 1042665328u, 567154882u, 1086020796u, 1419283481u, 0, SQRT_TOLERANCE, 0},
+{ 591, 1058013442u, 1435344339u, 3216303171u, 2275988178u, 1065353345u, 683507262u, 0, SQRT_TOLERANCE, 0},
+{ 592, 1067054971u, 3403659753u, 3218043030u, 1926480488u, 1069834765u, 4079816734u, 0, SQRT_TOLERANCE, 0},
+{ 593, 1076840383u, 1198845185u, 3225556149u, 1130089684u, 1074766681u, 2204310545u, 0, SQRT_TOLERANCE, 0},
+{ 594, 1075179394u, 2183928090u, 1048403956u, 963834821u, 1073921010u, 4206351748u, 0, SQRT_TOLERANCE, 0},
+{ 595, 1101672960u, 2120625396u, 1041006976u, 2137548527u, 1087173594u, 1796114179u, 0, SQRT_TOLERANCE, 0},
+{ 596, 1099230238u, 586700956u, 1059670521u, 303891699u, 1085923326u, 3641073464u, 0, SQRT_TOLERANCE, 0},
+{ 597, 1071510850u, 2509132460u, 1102827530u, 2205707903u, 1072030913u, 2255776863u, 0, SQRT_TOLERANCE, 0},
+{ 598, 1057376949u, 1229308263u, 3209170414u, 4206576047u, 1065006425u, 2427150864u, 0, SQRT_TOLERANCE, 0},
+{ 599, 1076592641u, 4078010749u, 3199236456u, 733478972u, 1074637360u, 4242033560u, 0, SQRT_TOLERANCE, 0},
+{ 600, 1050228936u, 4277541051u, 3199806921u, 397102023u, 1061426857u, 4110600862u, 0, SQRT_TOLERANCE, 0},
+{ 601, 1048491365u, 900999594u, 3234720188u, 2530214248u, 1060514439u, 1432053169u, 0, SQRT_TOLERANCE, 0},
+{ 602, 1076543548u, 4000609478u, 1096577064u, 4148592328u, 1074610699u, 1624533046u, 0, SQRT_TOLERANCE, 0},
+{ 603, 1048668084u, 2154187873u, 3224392607u, 3957250362u, 1060608413u, 4095657260u, 0, SQRT_TOLERANCE, 0},
+{ 604, 1075929840u, 2867079200u, 1101870326u, 921212001u, 1074239074u, 3129267102u, 0, SQRT_TOLERANCE, 0},
+{ 605, 1085738242u, 674547716u, 1063216239u, 3929755226u, 1079194714u, 1993425296u, 0, SQRT_TOLERANCE, 0},
+{ 606, 1092932203u, 3158182449u, 1043794244u, 3259056345u, 1082773526u, 646662438u, 0, SQRT_TOLERANCE, 0},
+{ 607, 1089293008u, 3002823940u, 1059511739u, 2832435794u, 1080991167u, 2142327428u, 0, SQRT_TOLERANCE, 0},
+{ 608, 1069821174u, 2196511929u, 1049973941u, 3672092877u, 1071212728u, 874634407u, 0, SQRT_TOLERANCE, 0},
+{ 609, 1050438056u, 3655292191u, 1086438127u, 3567072906u, 1061507657u, 3300586087u, 0, SQRT_TOLERANCE, 0},
+{ 610, 1095703300u, 1617573614u, 3201863123u, 3090723732u, 1084198066u, 1965834048u, 0, SQRT_TOLERANCE, 0},
+{ 611, 1085717732u, 679893506u, 3211547753u, 824081024u, 1079186141u, 1881293678u, 0, SQRT_TOLERANCE, 0},
+{ 612, 1089530525u, 2285242807u, 1084999409u, 2221731406u, 1081111468u, 2679879526u, 0, SQRT_TOLERANCE, 0},
+{ 613, 1059250016u, 1935990727u, 1088822246u, 1058156518u, 1065915175u, 3548899673u, 0, SQRT_TOLERANCE, 0},
+{ 614, 1102839166u, 521023584u, 1059186903u, 4245163857u, 1087711629u, 149530312u, 0, SQRT_TOLERANCE, 0},
+{ 615, 1103891140u, 2312887617u, 3191771354u, 1885370807u, 1088287914u, 4066812935u, 0, SQRT_TOLERANCE, 0},
+{ 616, 1105470167u, 1796441468u, 1100030327u, 2772711004u, 1089036887u, 3439783295u, 0, SQRT_TOLERANCE, 0},
+{ 617, 1056793172u, 2095685003u, 1077984448u, 2100773742u, 1064677070u, 3082965484u, 0, SQRT_TOLERANCE, 0},
+{ 618, 1045470972u, 2892538035u, 1042396334u, 4162200338u, 1059081916u, 2590763245u, 0, SQRT_TOLERANCE, 0},
+{ 619, 1095242103u, 2177698116u, 3227557177u, 150832500u, 1083949198u, 3011460131u, 0, SQRT_TOLERANCE, 0},
+{ 620, 1044078568u, 607966734u, 3236250630u, 4164600559u, 1058336165u, 3216008968u, 0, SQRT_TOLERANCE, 0},
+{ 621, 1068906164u, 2830122967u, 1046096700u, 3713346883u, 1070783041u, 2252608121u, 0, SQRT_TOLERANCE, 0},
+{ 622, 1089714315u, 2314640506u, 3203696416u, 3276228872u, 1081197414u, 976021772u, 0, SQRT_TOLERANCE, 0},
+{ 623, 1065428659u, 469331883u, 3249037349u, 2999233437u, 1068985698u, 998895242u, 0, SQRT_TOLERANCE, 0},
+{ 624, 1097382011u, 560886625u, 1091899487u, 748795120u, 1085022259u, 3618303474u, 0, SQRT_TOLERANCE, 0},
+{ 625, 1049886858u, 2958421324u, 1092569414u, 3235243477u, 1061282741u, 2704406419u, 0, SQRT_TOLERANCE, 0},
+{ 626, 1045542849u, 3221475559u, 1043038304u, 915608434u, 1059116614u, 369233074u, 0, SQRT_TOLERANCE, 0},
+{ 627, 1071197530u, 3007808652u, 3216682290u, 2531019474u, 1071911452u, 348324353u, 0, SQRT_TOLERANCE, 0},
+{ 628, 1094545351u, 1767658578u, 3237045269u, 2313128318u, 1083552708u, 1870703893u, 0, SQRT_TOLERANCE, 0},
+{ 629, 1063134244u, 1926845182u, 1066835624u, 1783256828u, 1067840988u, 1598436936u, 0, SQRT_TOLERANCE, 0},
+{ 630, 1040575629u, 90378038u, 1057168870u, 164358218u, 1056603317u, 2337412123u, 0, SQRT_TOLERANCE, 0},
+{ 631, 1106859172u, 1610524680u, 1085283851u, 2903496007u, 1089741246u, 3783034333u, 0, SQRT_TOLERANCE, 0},
+{ 632, 1078635586u, 4274321404u, 3202913591u, 720121831u, 1075656476u, 3146253411u, 0, SQRT_TOLERANCE, 0},
+{ 633, 1051205256u, 2034778236u, 1071133763u, 1413236391u, 1061931030u, 678520773u, 0, SQRT_TOLERANCE, 0},
+{ 634, 1051063028u, 1489112261u, 1076691395u, 348210906u, 1061847187u, 2249806758u, 0, SQRT_TOLERANCE, 0},
+{ 635, 1059260269u, 2797651324u, 3224410527u, 2374818327u, 1065921837u, 2697175535u, 0, SQRT_TOLERANCE, 0},
+{ 636, 1088287256u, 1823161666u, 3197810695u, 3119680047u, 1080419225u, 1971833611u, 0, SQRT_TOLERANCE, 0},
+{ 637, 1065927336u, 3420950657u, 1087084743u, 2136638961u, 1069295101u, 2317625956u, 0, SQRT_TOLERANCE, 0},
+{ 638, 1069902224u, 3554566429u, 1062907717u, 2736702589u, 1071263006u, 1224272277u, 0, SQRT_TOLERANCE, 0},
+{ 639, 1097405019u, 2928437580u, 3187765027u, 1393427873u, 1085035302u, 2741209040u, 0, SQRT_TOLERANCE, 0},
+{ 640, 1061817913u, 189447067u, 1051643315u, 828663513u, 1067245581u, 3767564065u, 0, SQRT_TOLERANCE, 0},
+{ 641, 1052313869u, 2852350928u, 1045683757u, 673354280u, 1062470558u, 3169785241u, 0, SQRT_TOLERANCE, 0},
+{ 642, 1043946301u, 3589563265u, 3248741629u, 812657927u, 1058284638u, 298510060u, 0, SQRT_TOLERANCE, 0},
+{ 643, 1043127178u, 1766416701u, 1100392103u, 2185373290u, 1057907552u, 4082525716u, 0, SQRT_TOLERANCE, 0},
+{ 644, 1072791741u, 3763582673u, 3191965790u, 388374829u, 1072741389u, 3455066464u, 0, SQRT_TOLERANCE, 0},
+{ 645, 1079635136u, 1187403069u, 1075300235u, 336640304u, 1076125143u, 686124104u, 0, SQRT_TOLERANCE, 0},
+{ 646, 1103926251u, 1718795752u, 3243118752u, 683369237u, 1088306579u, 2941490609u, 0, SQRT_TOLERANCE, 0},
+{ 647, 1063308449u, 1863545307u, 1069449477u, 3418627399u, 1067921293u, 260051306u, 0, SQRT_TOLERANCE, 0},
+{ 648, 1069601294u, 3295607249u, 1068878592u, 1633297809u, 1071067979u, 2183136607u, 0, SQRT_TOLERANCE, 0},
+{ 649, 1058947127u, 2585980994u, 3236670483u, 1286750688u, 1065746452u, 939747836u, 0, SQRT_TOLERANCE, 0},
+{ 650, 1046157033u, 15816845u, 3233249283u, 2491924775u, 1059377579u, 3239098358u, 0, SQRT_TOLERANCE, 0},
+{ 651, 1042413021u, 1051983351u, 1049180786u, 1474421917u, 1057487165u, 906255288u, 0, SQRT_TOLERANCE, 0},
+{ 652, 1053765877u, 2003816032u, 1086050104u, 668090487u, 1063229393u, 591937988u, 0, SQRT_TOLERANCE, 0},
+{ 653, 1052556037u, 3671484625u, 1067020039u, 430024694u, 1062564027u, 1153728629u, 0, SQRT_TOLERANCE, 0},
+{ 654, 1067397110u, 3991830201u, 3207808714u, 1021245839u, 1069962904u, 422338124u, 0, SQRT_TOLERANCE, 0},
+{ 655, 1064194391u, 4255801807u, 3207681716u, 1926756877u, 1068443075u, 3568678275u, 0, SQRT_TOLERANCE, 0},
+{ 656, 1052140785u, 4167786896u, 1077097744u, 1775517981u, 1062399446u, 1995915588u, 0, SQRT_TOLERANCE, 0},
+{ 657, 1085601978u, 3187518564u, 1082437406u, 944672491u, 1079136610u, 552437956u, 0, SQRT_TOLERANCE, 0},
+{ 658, 1049366282u, 953085192u, 3227310828u, 3459155777u, 1061025523u, 84882458u, 0, SQRT_TOLERANCE, 0},
+{ 659, 1069502506u, 1908555460u, 1073640207u, 260441967u, 1071014429u, 1620832626u, 0, SQRT_TOLERANCE, 0},
+{ 660, 1067219606u, 250762477u, 1072582645u, 2886742039u, 1069897890u, 2933439031u, 0, SQRT_TOLERANCE, 0},
+{ 661, 1103422358u, 786180031u, 3197734769u, 2788918312u, 1088019127u, 3627648486u, 0, SQRT_TOLERANCE, 0},
+{ 662, 1087028179u, 2055912467u, 3244244909u, 1394142937u, 1079852961u, 2693116503u, 0, SQRT_TOLERANCE, 0},
+{ 663, 1069612985u, 91984146u, 3222252812u, 4126276047u, 1071076020u, 1554092544u, 0, SQRT_TOLERANCE, 0},
+{ 664, 1081340139u, 3942715706u, 3239316352u, 410676547u, 1077009592u, 230971631u, 0, SQRT_TOLERANCE, 0},
+{ 665, 1051074198u, 86296211u, 1085850694u, 649202596u, 1061853917u, 3713575055u, 0, SQRT_TOLERANCE, 0},
+{ 666, 1097882744u, 3069064472u, 3237358008u, 23209276u, 1085287930u, 1272708561u, 0, SQRT_TOLERANCE, 0},
+{ 667, 1081235288u, 1867297860u, 1072956607u, 2513414118u, 1076961650u, 547480898u, 0, SQRT_TOLERANCE, 0},
+{ 668, 1103049699u, 3171788768u, 3235208783u, 162138697u, 1087789055u, 3892822244u, 0, SQRT_TOLERANCE, 0},
+{ 669, 1081728455u, 1245110700u, 1081653954u, 2584994077u, 1077172212u, 3049250374u, 0, SQRT_TOLERANCE, 0},
+{ 670, 1098026472u, 3347226587u, 1058962932u, 2291943376u, 1085356762u, 2114216684u, 0, SQRT_TOLERANCE, 0},
+{ 671, 1058899062u, 966940828u, 1060726420u, 2798041096u, 1065728866u, 3881890662u, 0, SQRT_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1072742353u, 4068514135u, 0, SQRT_TOLERANCE, 0},
+{ 673, 1100632849u, 1671039260u, 1086395032u, 3745833360u, 1086621152u, 2062363498u, 0, SQRT_TOLERANCE, 0},
+{ 674, 1057078797u, 651714217u, 1047070645u, 2130549237u, 1064817632u, 886839519u, 0, SQRT_TOLERANCE, 0},
+{ 675, 1059632083u, 1423000172u, 3247822717u, 1551488170u, 1066147213u, 3158619639u, 0, SQRT_TOLERANCE, 0},
+{ 676, 1054113659u, 921077236u, 3213332351u, 1431049019u, 1063394336u, 3369552467u, 0, SQRT_TOLERANCE, 0},
+{ 677, 1067510295u, 655715547u, 3190985373u, 1527556471u, 1070023640u, 2410187056u, 0, SQRT_TOLERANCE, 0},
+{ 678, 1080171331u, 4110878657u, 3251297180u, 879739345u, 1076367910u, 1896946077u, 0, SQRT_TOLERANCE, 0},
+{ 679, 1085804762u, 2623955764u, 1093699897u, 1216444475u, 1079222126u, 1307759639u, 0, SQRT_TOLERANCE, 0},
+{ 680, 1091905603u, 107442539u, 3239767031u, 1149813329u, 1082287640u, 2949067075u, 0, SQRT_TOLERANCE, 0},
+{ 681, 1085961592u, 1761361082u, 3226030205u, 1121849716u, 1079284549u, 651985841u, 0, SQRT_TOLERANCE, 0},
+{ 682, 1092603467u, 2534144722u, 1044223733u, 3512285706u, 1082560260u, 3424319355u, 0, SQRT_TOLERANCE, 0},
+{ 683, 1064362429u, 4073670723u, 1050729852u, 3034818849u, 1068527451u, 1977644747u, 0, SQRT_TOLERANCE, 0},
+{ 684, 1101984574u, 1421423503u, 1060278048u, 1397153092u, 1087338624u, 1251505929u, 0, SQRT_TOLERANCE, 0},
+{ 685, 1069938181u, 1649206019u, 1104525577u, 1267104290u, 1071284845u, 1733827628u, 0, SQRT_TOLERANCE, 0},
+{ 686, 1041818449u, 3775270392u, 1040251850u, 68667319u, 1057223811u, 3667903075u, 0, SQRT_TOLERANCE, 0},
+{ 687, 1056847252u, 3099226694u, 3254103006u, 4020102648u, 1064696885u, 3238917322u, 0, SQRT_TOLERANCE, 0},
+{ 688, 1054108064u, 3718441177u, 3215643451u, 4032951536u, 1063391862u, 3926815021u, 0, SQRT_TOLERANCE, 0},
+{ 689, 1044131371u, 508048351u, 3210196713u, 1707937896u, 1058356203u, 3006675795u, 0, SQRT_TOLERANCE, 0},
+{ 690, 1051127979u, 2784738160u, 1073435430u, 1109346010u, 1061885967u, 628693294u, 0, SQRT_TOLERANCE, 0},
+{ 691, 1078241642u, 3331916473u, 3238794568u, 2707019594u, 1075426975u, 364200131u, 0, SQRT_TOLERANCE, 0},
+{ 692, 1093182670u, 3093165197u, 1072894805u, 2853215019u, 1082922240u, 2297662115u, 0, SQRT_TOLERANCE, 0},
+{ 693, 1069098491u, 2135797997u, 1048399559u, 2941926126u, 1070862123u, 2771619189u, 0, SQRT_TOLERANCE, 0},
+{ 694, 1048430980u, 2083412145u, 3249335391u, 507212448u, 1060492479u, 3625946286u, 0, SQRT_TOLERANCE, 0},
+{ 695, 1075363751u, 4270176401u, 3246546709u, 3288753319u, 1073997362u, 2376976277u, 0, SQRT_TOLERANCE, 0},
+{ 696, 1100449215u, 3692175292u, 3197271515u, 3989064196u, 1086547557u, 1230309530u, 0, SQRT_TOLERANCE, 0},
+{ 697, 1104208090u, 3111924274u, 1066772558u, 59281695u, 1088450284u, 3649920643u, 0, SQRT_TOLERANCE, 0},
+{ 698, 1067683911u, 2135245466u, 3208804313u, 3846547392u, 1070138699u, 3938945759u, 0, SQRT_TOLERANCE, 0},
+{ 699, 1094877811u, 972051266u, 3222814246u, 3539700586u, 1083725404u, 467723950u, 0, SQRT_TOLERANCE, 0},
+{ 700, 1055482282u, 330951080u, 1079189813u, 583922384u, 1064075215u, 3272484162u, 0, SQRT_TOLERANCE, 0},
+{ 701, 1089640092u, 1711944085u, 1104170032u, 643991456u, 1081163492u, 1388030746u, 0, SQRT_TOLERANCE, 0},
+{ 702, 1086945901u, 2072550721u, 3250147641u, 4280263530u, 1079807411u, 1863162939u, 0, SQRT_TOLERANCE, 0},
+{ 703, 1045489058u, 1566376352u, 1067251433u, 72984588u, 1059090752u, 1602896158u, 0, SQRT_TOLERANCE, 0},
+{ 704, 1095276569u, 3103043079u, 1045853123u, 410067497u, 1083968962u, 753399636u, 0, SQRT_TOLERANCE, 0},
+{ 705, 1069188845u, 1910366299u, 1081770885u, 634683073u, 1070897677u, 2863774767u, 0, SQRT_TOLERANCE, 0},
+{ 706, 1081530688u, 2226525875u, 3224149290u, 2126302825u, 1077092030u, 3954895560u, 0, SQRT_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1072901139u, 1413389549u, 0, SQRT_TOLERANCE, 0},
+{ 708, 1066482943u, 1953339096u, 1077176252u, 1476516558u, 1069587339u, 2801007127u, 0, SQRT_TOLERANCE, 0},
+{ 709, 1066092000u, 1306277326u, 1079089150u, 4093716191u, 1069386437u, 3398348402u, 0, SQRT_TOLERANCE, 0},
+{ 710, 1085665139u, 51750045u, 3242913901u, 4256866157u, 1079163884u, 1554573188u, 0, SQRT_TOLERANCE, 0},
+{ 711, 1047601319u, 2163853087u, 3232053146u, 2962422808u, 1060146654u, 3341976993u, 0, SQRT_TOLERANCE, 0},
+{ 712, 1075516945u, 1618388148u, 3233154824u, 3711953164u, 1074057560u, 3839819821u, 0, SQRT_TOLERANCE, 0},
+{ 713, 1099384354u, 357108214u, 3202294604u, 2306775262u, 1086016088u, 2177156905u, 0, SQRT_TOLERANCE, 0},
+{ 714, 1054420438u, 2571356437u, 3249064063u, 2394851808u, 1063522893u, 1996514442u, 0, SQRT_TOLERANCE, 0},
+{ 715, 1083004443u, 4273880094u, 1103698617u, 3578832032u, 1077846949u, 3946749071u, 0, SQRT_TOLERANCE, 0},
+{ 716, 1085943053u, 2091068742u, 3228270226u, 3980489730u, 1079277321u, 2352780649u, 0, SQRT_TOLERANCE, 0},
+{ 717, 1081533104u, 2772307714u, 1051008486u, 32546576u, 1077093041u, 1889194046u, 0, SQRT_TOLERANCE, 0},
+{ 718, 1093745567u, 2143788498u, 3195498043u, 3630119231u, 1083218658u, 426861584u, 0, SQRT_TOLERANCE, 0},
+{ 719, 1051149287u, 2527385594u, 3240503648u, 3482095012u, 1061898506u, 9904143u, 0, SQRT_TOLERANCE, 0},
+{ 720, 1094685151u, 2690097362u, 1068598730u, 2360266862u, 1083603341u, 709843363u, 0, SQRT_TOLERANCE, 0},
+{ 721, 1058857869u, 2673272949u, 1082639557u, 522449749u, 1065713621u, 1890892219u, 0, SQRT_TOLERANCE, 0},
+{ 722, 1104424147u, 3596379400u, 3242016775u, 2002293002u, 1088550776u, 2464066130u, 0, SQRT_TOLERANCE, 0},
+{ 723, 1099439656u, 4113224369u, 3222122439u, 2152316893u, 1086048223u, 633234982u, 0, SQRT_TOLERANCE, 0},
+{ 724, 1073313068u, 31662602u, 1047721249u, 1747087514u, 1072967335u, 4221791633u, 0, SQRT_TOLERANCE, 0},
+{ 725, 1102980109u, 2489659568u, 1097051253u, 277506957u, 1087763924u, 176770536u, 0, SQRT_TOLERANCE, 0},
+{ 726, 1043918186u, 3850162281u, 3213841942u, 438724093u, 1058273423u, 3330050394u, 0, SQRT_TOLERANCE, 0},
+{ 727, 1095392535u, 2431814052u, 1075518084u, 2672434118u, 1084033952u, 3177579787u, 0, SQRT_TOLERANCE, 0},
+{ 728, 1095679087u, 391606792u, 1048184750u, 4168944276u, 1084185750u, 1284715554u, 0, SQRT_TOLERANCE, 0},
+{ 729, 1100308768u, 457529672u, 3201090276u, 72407935u, 1086488257u, 3152601039u, 0, SQRT_TOLERANCE, 0},
+{ 730, 1071237071u, 3954981400u, 1052053242u, 2411049585u, 1071927119u, 2207817645u, 0, SQRT_TOLERANCE, 0},
+{ 731, 1086180091u, 485456950u, 1088415093u, 1655397424u, 1079366985u, 516442262u, 0, SQRT_TOLERANCE, 0},
+{ 732, 1050750780u, 1551748070u, 3236871640u, 1329701152u, 1061647157u, 4111932827u, 0, SQRT_TOLERANCE, 0},
+{ 733, 1077155474u, 3099222537u, 1104984570u, 4293792842u, 1074916749u, 379935345u, 0, SQRT_TOLERANCE, 0},
+{ 734, 1056466057u, 3603065260u, 3197735968u, 2402359253u, 1064550766u, 3737026872u, 0, SQRT_TOLERANCE, 0},
+{ 735, 1051340936u, 3961208159u, 3219057584u, 2340553876u, 1062007562u, 3673974675u, 0, SQRT_TOLERANCE, 0},
+{ 736, 1074881909u, 4014841779u, 3197672877u, 3697233334u, 1073786622u, 88914263u, 0, SQRT_TOLERANCE, 0},
+{ 737, 1065792009u, 1403876392u, 3254028950u, 921363393u, 1069216504u, 3876453874u, 0, SQRT_TOLERANCE, 0},
+{ 738, 1107251806u, 1862576361u, 3194031708u, 2476290925u, 1089888998u, 4032607029u, 0, SQRT_TOLERANCE, 0},
+{ 739, 1049661768u, 1454212851u, 1088378861u, 3400401866u, 1061177346u, 566150313u, 0, SQRT_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 1073540350u, 3476035357u, 0, SQRT_TOLERANCE, 0},
+{ 741, 1068925634u, 1199568671u, 3225679997u, 46947405u, 1070791275u, 3995475172u, 0, SQRT_TOLERANCE, 0},
+{ 742, 1077685537u, 2596231448u, 3253943728u, 2219151748u, 1075133319u, 2848850050u, 0, SQRT_TOLERANCE, 0},
+{ 743, 1066527035u, 4119719558u, 3222036299u, 1275474618u, 1069608376u, 145002079u, 0, SQRT_TOLERANCE, 0},
+{ 744, 1092425015u, 3347296825u, 1101507910u, 1254014794u, 1082495560u, 2216586448u, 0, SQRT_TOLERANCE, 0},
+{ 745, 1084119992u, 673775040u, 1070743626u, 244126093u, 1078331922u, 496821601u, 0, SQRT_TOLERANCE, 0},
+{ 746, 1055716202u, 1832066983u, 1051358028u, 3262483417u, 1064202224u, 1950551906u, 0, SQRT_TOLERANCE, 0},
+{ 747, 1077559600u, 3962610501u, 3198598777u, 849269178u, 1075085031u, 1525244356u, 0, SQRT_TOLERANCE, 0},
+{ 748, 1087990252u, 2497516122u, 3254374111u, 2821429629u, 1080306226u, 517527846u, 0, SQRT_TOLERANCE, 0},
+{ 749, 1076236288u, 2805941787u, 3217785843u, 779131141u, 1074434583u, 861836968u, 0, SQRT_TOLERANCE, 0},
+{ 750, 1079425038u, 723423605u, 1084533420u, 627282213u, 1076039894u, 365634408u, 0, SQRT_TOLERANCE, 0},
+{ 751, 1068464032u, 4292778869u, 1078101071u, 1676860147u, 1070578567u, 1047536610u, 0, SQRT_TOLERANCE, 0},
+{ 752, 1076288502u, 3528118587u, 3194648564u, 2363260897u, 1074465746u, 203801155u, 0, SQRT_TOLERANCE, 0},
+{ 753, 1045414231u, 1307010018u, 1061248120u, 1468743108u, 1059053724u, 1102571830u, 0, SQRT_TOLERANCE, 0},
+{ 754, 1099099491u, 107905661u, 3226089788u, 1943427674u, 1085840453u, 1102742192u, 0, SQRT_TOLERANCE, 0},
+{ 755, 1040746893u, 760006940u, 1054265604u, 1749976597u, 1056703860u, 3059823824u, 0, SQRT_TOLERANCE, 0},
+{ 756, 1090289736u, 2787503556u, 1081282610u, 1195841206u, 1081432773u, 932870048u, 0, SQRT_TOLERANCE, 0},
+{ 757, 1044318508u, 545462045u, 3208381743u, 1981311808u, 1058425007u, 1072319699u, 0, SQRT_TOLERANCE, 0},
+{ 758, 1061232136u, 3657978397u, 1104463616u, 3501253426u, 1066887030u, 2118518534u, 0, SQRT_TOLERANCE, 0},
+{ 759, 1049883857u, 1804177501u, 3210693633u, 3606766729u, 1061281398u, 3106920657u, 0, SQRT_TOLERANCE, 0},
+{ 760, 1076856879u, 1336278526u, 1043741618u, 3165279431u, 1074775007u, 707871427u, 0, SQRT_TOLERANCE, 0},
+{ 761, 1055471915u, 1599382075u, 1058018527u, 4212580517u, 1064069386u, 2623791979u, 0, SQRT_TOLERANCE, 0},
+{ 762, 1060018678u, 3007589929u, 3202026547u, 2792028313u, 1066355451u, 1532923830u, 0, SQRT_TOLERANCE, 0},
+{ 763, 1105599122u, 1866066996u, 1060329048u, 3727175322u, 1089116275u, 3321812424u, 0, SQRT_TOLERANCE, 0},
+{ 764, 1050932995u, 150890940u, 1056025306u, 3082724735u, 1061766824u, 1428927829u, 0, SQRT_TOLERANCE, 0},
+{ 765, 1062008939u, 80400395u, 1093584426u, 3478941315u, 1067348625u, 2196153996u, 0, SQRT_TOLERANCE, 0},
+{ 766, 1104156966u, 4050954182u, 3219263194u, 2537475930u, 1088425102u, 2337725373u, 0, SQRT_TOLERANCE, 0},
+{ 767, 1064841871u, 2881752155u, 3212589299u, 2559651278u, 1068739879u, 2073796259u, 0, SQRT_TOLERANCE, 0},
+{ 768, 1101532656u, 440309030u, 3214267461u, 3788040806u, 1087094405u, 3373897749u, 0, SQRT_TOLERANCE, 0},
+{ 769, 1100476615u, 918813144u, 3208535698u, 1607035904u, 1086558806u, 1011245962u, 0, SQRT_TOLERANCE, 0},
+{ 770, 1042137451u, 2497054124u, 1089139147u, 2549609010u, 1057345992u, 111156193u, 0, SQRT_TOLERANCE, 0},
+{ 771, 1047037641u, 790219083u, 1054657139u, 2797979479u, 1059849184u, 1753236757u, 0, SQRT_TOLERANCE, 0},
+{ 772, 1057781400u, 1149462078u, 1095765205u, 3879963182u, 1065233931u, 3174219490u, 0, SQRT_TOLERANCE, 0},
+{ 773, 1055246165u, 2684353926u, 3205212854u, 1732474928u, 1063937584u, 3393361022u, 0, SQRT_TOLERANCE, 0},
+{ 774, 1095236965u, 2742237025u, 1051317716u, 3386396147u, 1083946234u, 613474900u, 0, SQRT_TOLERANCE, 0},
+{ 775, 1063230986u, 3408320912u, 1103071166u, 4233059513u, 1067875809u, 2596828830u, 0, SQRT_TOLERANCE, 0},
+{ 776, 1064863548u, 1077495917u, 1088399968u, 433115118u, 1068748662u, 3465974693u, 0, SQRT_TOLERANCE, 0},
+{ 777, 1057063924u, 841366493u, 1051716814u, 4121125128u, 1064807613u, 159179335u, 0, SQRT_TOLERANCE, 0},
+{ 778, 1064632084u, 321857207u, 1089128010u, 1149988239u, 1068651559u, 3231648951u, 0, SQRT_TOLERANCE, 0},
+{ 779, 1098059015u, 799866606u, 3197637091u, 3924438208u, 1085371772u, 2017401516u, 0, SQRT_TOLERANCE, 0},
+{ 780, 1043579242u, 2002049816u, 1077053447u, 2240354761u, 1058129764u, 2275278518u, 0, SQRT_TOLERANCE, 0},
+{ 781, 1081522635u, 478939968u, 1097035749u, 1066716440u, 1077088656u, 3304548743u, 0, SQRT_TOLERANCE, 0},
+{ 782, 1084989993u, 1653104725u, 1088548129u, 81977716u, 1078836375u, 591268420u, 0, SQRT_TOLERANCE, 0},
+{ 783, 1049377628u, 3899475018u, 3189694084u, 3330093036u, 1061031572u, 1752714901u, 0, SQRT_TOLERANCE, 0},
+{ 784, 1089312583u, 2612450289u, 1079065127u, 603380842u, 1081001371u, 1642998661u, 0, SQRT_TOLERANCE, 0},
+{ 785, 1100636791u, 3962735564u, 1101570429u, 1372490825u, 1086622688u, 1854865064u, 0, SQRT_TOLERANCE, 0},
+{ 786, 1054806016u, 1479841439u, 1059312257u, 541504905u, 1063668514u, 3137717449u, 0, SQRT_TOLERANCE, 0},
+{ 787, 1078662178u, 2626148789u, 1057571099u, 4121656076u, 1075670984u, 3831365719u, 0, SQRT_TOLERANCE, 0},
+{ 788, 1081613389u, 1902560314u, 1043130231u, 3557671562u, 1077126168u, 2660033190u, 0, SQRT_TOLERANCE, 0},
+{ 789, 1046346124u, 41779312u, 1081626342u, 831171823u, 1059448402u, 2030752802u, 0, SQRT_TOLERANCE, 0},
+{ 790, 1058131100u, 1393168821u, 1066457405u, 1381616968u, 1065410603u, 3297354989u, 0, SQRT_TOLERANCE, 0},
+{ 791, 1072338141u, 3756584649u, 3222267229u, 1423157432u, 1072507465u, 3972749633u, 0, SQRT_TOLERANCE, 0},
+{ 792, 1106952026u, 1894912556u, 1042426694u, 155024547u, 1089777643u, 1238149925u, 0, SQRT_TOLERANCE, 0},
+{ 793, 1047969864u, 35164295u, 3203391785u, 1037041084u, 1060312137u, 1648206646u, 0, SQRT_TOLERANCE, 0},
+{ 794, 1084777479u, 3957875950u, 3232195211u, 1590756436u, 1078718463u, 4101912742u, 0, SQRT_TOLERANCE, 0},
+{ 795, 1068844322u, 1447585080u, 1071279485u, 1107922438u, 1070756514u, 1014033437u, 0, SQRT_TOLERANCE, 0},
+{ 796, 1046252518u, 981897615u, 1051856116u, 430357614u, 1059413790u, 3253496655u, 0, SQRT_TOLERANCE, 0},
+{ 797, 1080040567u, 395145384u, 3219821938u, 50586510u, 1076278454u, 993178072u, 0, SQRT_TOLERANCE, 0},
+{ 798, 1069775912u, 750827797u, 1082862669u, 230466783u, 1071183978u, 2068128913u, 0, SQRT_TOLERANCE, 0},
+{ 799, 1086668819u, 1365083575u, 3204848310u, 1700831722u, 1079645109u, 2783782078u, 0, SQRT_TOLERANCE, 0},
+{ 800, 1070606742u, 344241827u, 1071538935u, 2715566077u, 1071649981u, 2564811453u, 0, SQRT_TOLERANCE, 0},
+{ 801, 1100099208u, 4069301823u, 3193208760u, 2949125229u, 1086393944u, 2192827036u, 0, SQRT_TOLERANCE, 0},
+{ 802, 1103231387u, 3585711710u, 1065801594u, 2302229267u, 1087896508u, 3628193145u, 0, SQRT_TOLERANCE, 0},
+{ 803, 1046635308u, 709803845u, 1048741487u, 2296910194u, 1059602883u, 1477120060u, 0, SQRT_TOLERANCE, 0},
+{ 804, 1045797131u, 744421179u, 1069302001u, 2659232829u, 1059231457u, 3965738399u, 0, SQRT_TOLERANCE, 0},
+{ 805, 1092835968u, 1799949903u, 3192522886u, 4212149209u, 1082712784u, 2200512806u, 0, SQRT_TOLERANCE, 0},
+{ 806, 1058624854u, 145234164u, 3250614064u, 912384201u, 1065624069u, 2049313107u, 0, SQRT_TOLERANCE, 0},
+{ 807, 1093027016u, 2784620507u, 1102812948u, 3531481022u, 1082831308u, 3299780961u, 0, SQRT_TOLERANCE, 0},
+{ 808, 1103676015u, 383952592u, 3205659905u, 3633194728u, 1088169436u, 3168320457u, 0, SQRT_TOLERANCE, 0},
+{ 809, 1055992604u, 3792395543u, 1070072378u, 3864816376u, 1064342251u, 3788402700u, 0, SQRT_TOLERANCE, 0},
+{ 810, 1057832625u, 2115553675u, 1066288499u, 3538377867u, 1065260905u, 472205566u, 0, SQRT_TOLERANCE, 0},
+{ 811, 1104591537u, 1230026762u, 1090719723u, 440819880u, 1088623089u, 1428813236u, 0, SQRT_TOLERANCE, 0},
+{ 812, 1047111428u, 2991290482u, 1096886719u, 1097971167u, 1059890853u, 291347617u, 0, SQRT_TOLERANCE, 0},
+{ 813, 1090048600u, 1098035020u, 3230900504u, 1479059095u, 1081339316u, 2296873801u, 0, SQRT_TOLERANCE, 0},
+{ 814, 1103573316u, 1719428427u, 3188631907u, 3707377409u, 1088110106u, 16291827u, 0, SQRT_TOLERANCE, 0},
+{ 815, 1053236165u, 3748932896u, 1084908557u, 1325384361u, 1062941047u, 1513165414u, 0, SQRT_TOLERANCE, 0},
+{ 816, 1084704076u, 3979168763u, 1057455255u, 2454615952u, 1078675931u, 2283497204u, 0, SQRT_TOLERANCE, 0},
+{ 817, 1053106984u, 1449164578u, 1056960316u, 1654931641u, 1062863345u, 1571174098u, 0, SQRT_TOLERANCE, 0},
+{ 818, 1071439010u, 2120487381u, 3226298974u, 2364226633u, 1072004418u, 1037285731u, 0, SQRT_TOLERANCE, 0},
+{ 819, 1075071428u, 1074268944u, 1065730444u, 280016852u, 1073874006u, 3003841767u, 0, SQRT_TOLERANCE, 0},
+{ 820, 1052824608u, 3315127889u, 3236295594u, 2900924954u, 1062679736u, 4204383877u, 0, SQRT_TOLERANCE, 0},
+{ 821, 1048942243u, 2246037502u, 1049691002u, 1496066550u, 1060784284u, 3318248494u, 0, SQRT_TOLERANCE, 0},
+{ 822, 1045523211u, 4191285446u, 3217936236u, 2382392789u, 1059107243u, 2277744408u, 0, SQRT_TOLERANCE, 0},
+{ 823, 1092833308u, 640099844u, 1042152237u, 2064279383u, 1082711073u, 1039517410u, 0, SQRT_TOLERANCE, 0},
+{ 824, 1079913438u, 3468560824u, 1093251038u, 310958750u, 1076230316u, 3833362338u, 0, SQRT_TOLERANCE, 0},
+{ 825, 1096788400u, 1413568905u, 1100941106u, 1627289946u, 1084654085u, 3071012224u, 0, SQRT_TOLERANCE, 0},
+{ 826, 1044065902u, 3797143370u, 3195497539u, 3843275034u, 1058331315u, 3377308626u, 0, SQRT_TOLERANCE, 0},
+{ 827, 1104593745u, 2806642640u, 3201943068u, 2515980718u, 1088624015u, 1764710363u, 0, SQRT_TOLERANCE, 0},
+{ 828, 1086877316u, 632580632u, 1078673506u, 3259601317u, 1079768576u, 2512463005u, 0, SQRT_TOLERANCE, 0},
+{ 829, 1053496927u, 3309678799u, 1049337078u, 3056787074u, 1063088384u, 1725711449u, 0, SQRT_TOLERANCE, 0},
+{ 830, 1074011641u, 2341164249u, 1080834967u, 2810890005u, 1073307462u, 1389366866u, 0, SQRT_TOLERANCE, 0},
+{ 831, 1067019674u, 932124675u, 1093915797u, 662682630u, 1069820839u, 2762305859u, 0, SQRT_TOLERANCE, 0},
+{ 832, 1101746443u, 1367996113u, 3251723684u, 2974064663u, 1087213777u, 2643950195u, 0, SQRT_TOLERANCE, 0},
+{ 833, 1080230731u, 323437999u, 1090499064u, 901457511u, 1076406911u, 478131288u, 0, SQRT_TOLERANCE, 0},
+{ 834, 1088295228u, 4184941840u, 3196770014u, 2458988443u, 1080422136u, 1324379918u, 0, SQRT_TOLERANCE, 0},
+{ 835, 1087618284u, 2023065054u, 3211994098u, 2734612965u, 1080149342u, 4075983968u, 0, SQRT_TOLERANCE, 0},
+{ 836, 1064074694u, 3679267365u, 3237728785u, 1699558211u, 1068380634u, 1012366217u, 0, SQRT_TOLERANCE, 0},
+{ 837, 1088079010u, 1826799031u, 1078709629u, 3986905229u, 1080340982u, 73683265u, 0, SQRT_TOLERANCE, 0},
+{ 838, 1052843785u, 351061688u, 3194386466u, 4105857588u, 1062692901u, 2801211497u, 0, SQRT_TOLERANCE, 0},
+{ 839, 1054128006u, 1365244058u, 1064457319u, 1452191426u, 1063400657u, 3245250245u, 0, SQRT_TOLERANCE, 0},
+{ 840, 1064122385u, 2463030625u, 3215975031u, 3773488326u, 1068405745u, 3911197227u, 0, SQRT_TOLERANCE, 0},
+{ 841, 1103793023u, 752664055u, 1065110394u, 1835931663u, 1088234789u, 2349851322u, 0, SQRT_TOLERANCE, 0},
+{ 842, 1088045088u, 3496172149u, 1089617208u, 109068701u, 1080327805u, 601359943u, 0, SQRT_TOLERANCE, 0},
+{ 843, 1050651439u, 1636966254u, 1086098766u, 2016598298u, 1061585549u, 3681702830u, 0, SQRT_TOLERANCE, 0},
+{ 844, 1050931318u, 3551516956u, 1097969102u, 1317953425u, 1061765762u, 4010345559u, 0, SQRT_TOLERANCE, 0},
+{ 845, 1082348569u, 2977627788u, 1045339018u, 516058480u, 1077468850u, 2502630431u, 0, SQRT_TOLERANCE, 0},
+{ 846, 1089924930u, 3901731263u, 3189566462u, 32272932u, 1081288690u, 774317996u, 0, SQRT_TOLERANCE, 0},
+{ 847, 1077281796u, 1956025297u, 3246628529u, 3840733905u, 1074971826u, 3460167714u, 0, SQRT_TOLERANCE, 0},
+{ 848, 1099818036u, 561057891u, 3198494340u, 4271027193u, 1086254464u, 3189187714u, 0, SQRT_TOLERANCE, 0},
+{ 849, 1103446273u, 692989850u, 3242630588u, 2492225971u, 1088033863u, 2469722507u, 0, SQRT_TOLERANCE, 0},
+{ 850, 1057995749u, 3439913962u, 1067477011u, 2973333638u, 1065344480u, 3040195127u, 0, SQRT_TOLERANCE, 0},
+{ 851, 1066510341u, 877613377u, 1044917899u, 809672798u, 1069600458u, 1220560379u, 0, SQRT_TOLERANCE, 0},
+{ 852, 1074687806u, 905426932u, 1046417457u, 1086320855u, 1073689883u, 3891738956u, 0, SQRT_TOLERANCE, 0},
+{ 853, 1098862981u, 2645567288u, 1051258339u, 557182478u, 1085694617u, 1952982282u, 0, SQRT_TOLERANCE, 0},
+{ 854, 1056574302u, 186287752u, 1061342054u, 4054003419u, 1064593882u, 1277191925u, 0, SQRT_TOLERANCE, 0},
+{ 855, 1097266673u, 3506889716u, 3243866036u, 519056371u, 1084955436u, 1253146977u, 0, SQRT_TOLERANCE, 0},
+{ 856, 1042654053u, 2171898436u, 3246911982u, 1091500784u, 1057640543u, 3319015595u, 0, SQRT_TOLERANCE, 0},
+{ 857, 1096164025u, 368493885u, 3222871893u, 1419055230u, 1084412356u, 3623601574u, 0, SQRT_TOLERANCE, 0},
+{ 858, 1091950572u, 2010971245u, 3188804530u, 1518695799u, 1082307037u, 3692477730u, 0, SQRT_TOLERANCE, 0},
+{ 859, 1057942861u, 1239207795u, 1040192984u, 2199481342u, 1065317754u, 3583138412u, 0, SQRT_TOLERANCE, 0},
+{ 860, 1063494989u, 4264613432u, 3203460972u, 3558930895u, 1068044986u, 1121116424u, 0, SQRT_TOLERANCE, 0},
+{ 861, 1050299283u, 3772748958u, 3227667376u, 309688336u, 1061454580u, 3489910349u, 0, SQRT_TOLERANCE, 0},
+{ 862, 1083259393u, 1077949160u, 1075769893u, 2405271377u, 1077975578u, 2163283318u, 0, SQRT_TOLERANCE, 0},
+{ 863, 1091835152u, 3751608506u, 3232278094u, 930375071u, 1082256608u, 3858841463u, 0, SQRT_TOLERANCE, 0},
+{ 864, 1051133505u, 1518334131u, 3205247482u, 791756713u, 1061889227u, 1233401148u, 0, SQRT_TOLERANCE, 0},
+{ 865, 1047317453u, 2825203170u, 3245054001u, 1822981827u, 1060002582u, 2575170954u, 0, SQRT_TOLERANCE, 0},
+{ 866, 1100016363u, 514474738u, 1089072073u, 3300845441u, 1086354386u, 1510428249u, 0, SQRT_TOLERANCE, 0},
+{ 867, 1068907602u, 247369460u, 3197320093u, 687450958u, 1070783651u, 1407209870u, 0, SQRT_TOLERANCE, 0},
+{ 868, 1104161422u, 2722237629u, 1058272368u, 90602316u, 1088427321u, 1033488541u, 0, SQRT_TOLERANCE, 0},
+{ 869, 1060614787u, 1845900544u, 3231520830u, 3389751458u, 1066629330u, 587670171u, 0, SQRT_TOLERANCE, 0},
+{ 870, 1100051597u, 737689911u, 3195377751u, 3462616966u, 1086371384u, 3993203066u, 0, SQRT_TOLERANCE, 0},
+{ 871, 1076054736u, 3620285831u, 1055501023u, 2708056059u, 1074321592u, 3107724562u, 0, SQRT_TOLERANCE, 0},
+{ 872, 1071981348u, 4073430285u, 1056206159u, 172017902u, 1072300527u, 1206422568u, 0, SQRT_TOLERANCE, 0},
+{ 873, 1065385990u, 2799176222u, 1052706894u, 4083892667u, 1068956275u, 1125625004u, 0, SQRT_TOLERANCE, 0},
+{ 874, 1054795909u, 1562351330u, 1069705601u, 1247765260u, 1063664883u, 1449767613u, 0, SQRT_TOLERANCE, 0},
+{ 875, 1085233651u, 51853475u, 3189080201u, 2783553144u, 1078963340u, 2980621286u, 0, SQRT_TOLERANCE, 0},
+{ 876, 1071970705u, 3851781549u, 3241598113u, 514064046u, 1072293966u, 4246499422u, 0, SQRT_TOLERANCE, 0},
+{ 877, 1100045965u, 934745487u, 3248182437u, 2798581921u, 1086368685u, 2435743120u, 0, SQRT_TOLERANCE, 0},
+{ 878, 1065598845u, 2948648757u, 3232177250u, 4278702895u, 1069097834u, 2375998345u, 0, SQRT_TOLERANCE, 0},
+{ 879, 1072485724u, 4259101461u, 1061606772u, 84229920u, 1072586784u, 545586649u, 0, SQRT_TOLERANCE, 0},
+{ 880, 1050591911u, 3891230598u, 1095924595u, 3049217547u, 1061564240u, 2256144u, 0, SQRT_TOLERANCE, 0},
+{ 881, 1077353053u, 3806018919u, 3243191216u, 280177341u, 1075001834u, 909189286u, 0, SQRT_TOLERANCE, 0},
+{ 882, 1060624530u, 3900344258u, 1063647809u, 4206745890u, 1066633326u, 4119545649u, 0, SQRT_TOLERANCE, 0},
+{ 883, 1080223688u, 2126253040u, 3207248026u, 808507485u, 1076402336u, 1523656667u, 0, SQRT_TOLERANCE, 0},
+{ 884, 1086090317u, 3465685634u, 3230391053u, 3754958214u, 1079333703u, 3201764093u, 0, SQRT_TOLERANCE, 0},
+{ 885, 1102861084u, 461094531u, 1101110393u, 1316091396u, 1087719890u, 431665675u, 0, SQRT_TOLERANCE, 0},
+{ 886, 1064980314u, 4197635149u, 1091873113u, 1240127141u, 1068794989u, 4087232503u, 0, SQRT_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 1073499579u, 2341282884u, 0, SQRT_TOLERANCE, 0},
+{ 888, 1065945517u, 3744663425u, 3212482771u, 953662066u, 1069305407u, 716853070u, 0, SQRT_TOLERANCE, 0},
+{ 889, 1085171305u, 3564196690u, 3228101916u, 904305212u, 1078931604u, 2941441890u, 0, SQRT_TOLERANCE, 0},
+{ 890, 1048333111u, 3566257266u, 3235138829u, 2734275140u, 1060456154u, 2961457688u, 0, SQRT_TOLERANCE, 0},
+{ 891, 1096464829u, 606044282u, 3241318094u, 2446416887u, 1084534207u, 1511287830u, 0, SQRT_TOLERANCE, 0},
+{ 892, 1041627284u, 2336116589u, 3197594053u, 2296925138u, 1057144786u, 649471989u, 0, SQRT_TOLERANCE, 0},
+{ 893, 1058567659u, 907670625u, 3240769036u, 1827119006u, 1065601143u, 1652997283u, 0, SQRT_TOLERANCE, 0},
+{ 894, 1044467183u, 2818710946u, 3246059905u, 553394170u, 1058506783u, 186977955u, 0, SQRT_TOLERANCE, 0},
+{ 895, 1042020446u, 4099522736u, 3232742168u, 3718083858u, 1057302429u, 1224234008u, 0, SQRT_TOLERANCE, 0},
+{ 896, 1092371276u, 1059279404u, 1080245336u, 175941677u, 1082475488u, 497911871u, 0, SQRT_TOLERANCE, 0},
+{ 897, 1105189691u, 1650862428u, 1061816101u, 1723201723u, 1088852890u, 3417536716u, 0, SQRT_TOLERANCE, 0},
+{ 898, 1091529166u, 2462163405u, 3218946201u, 3876535372u, 1082111118u, 1513781992u, 0, SQRT_TOLERANCE, 0},
+{ 899, 1084392886u, 495844137u, 1073721460u, 772777946u, 1078483072u, 3832132292u, 0, SQRT_TOLERANCE, 0},
+{ 900, 1052415330u, 458757721u, 3245680321u, 3609892707u, 1062510505u, 3992598146u, 0, SQRT_TOLERANCE, 0},
+{ 901, 1045799308u, 2533012202u, 1079980803u, 3592268374u, 1059232394u, 2668168063u, 0, SQRT_TOLERANCE, 0},
+{ 902, 1055881132u, 4108274117u, 1063045844u, 571992389u, 1064287117u, 1171677987u, 0, SQRT_TOLERANCE, 0},
+{ 903, 1090567271u, 3541110973u, 1096296754u, 3118427427u, 1081549912u, 140601693u, 0, SQRT_TOLERANCE, 0},
+{ 904, 1046496395u, 1213941007u, 1105433735u, 2172963370u, 1059508450u, 3107457966u, 0, SQRT_TOLERANCE, 0},
+{ 905, 1096853359u, 272190288u, 1095452370u, 4026581530u, 1084691923u, 2579691573u, 0, SQRT_TOLERANCE, 0},
+{ 906, 1095583909u, 2843638672u, 1100510986u, 3190536898u, 1084136605u, 1786559035u, 0, SQRT_TOLERANCE, 0},
+{ 907, 1083757094u, 2014317727u, 3247389683u, 2428462015u, 1078193568u, 2356008149u, 0, SQRT_TOLERANCE, 0},
+{ 908, 1093976717u, 688442200u, 1047852515u, 3035186380u, 1083324841u, 2105746957u, 0, SQRT_TOLERANCE, 0},
+{ 909, 1076664212u, 1010095511u, 3221288076u, 405287991u, 1074675587u, 1262826853u, 0, SQRT_TOLERANCE, 0},
+{ 910, 1104810967u, 2983070435u, 1089546472u, 2907918480u, 1088711980u, 1326194828u, 0, SQRT_TOLERANCE, 0},
+{ 911, 1082988121u, 81928569u, 1056007286u, 2740556321u, 1077838407u, 3408513618u, 0, SQRT_TOLERANCE, 0},
+{ 912, 1041110867u, 2076689028u, 1081558619u, 3039159031u, 1056901096u, 66696044u, 0, SQRT_TOLERANCE, 0},
+{ 913, 1047307438u, 1376882094u, 3211003208u, 1296286481u, 1059997296u, 2895252019u, 0, SQRT_TOLERANCE, 0},
+{ 914, 1080114314u, 744133164u, 3200943494u, 955832216u, 1076329543u, 4268918442u, 0, SQRT_TOLERANCE, 0},
+{ 915, 1078806678u, 176522478u, 1069999908u, 2891249491u, 1075747989u, 1079133698u, 0, SQRT_TOLERANCE, 0},
+{ 916, 1043564602u, 3685851715u, 3187829932u, 2363997529u, 1058123158u, 1658549495u, 0, SQRT_TOLERANCE, 0},
+{ 917, 1040244055u, 3974431579u, 1052505165u, 2589067816u, 1056389906u, 2986782993u, 0, SQRT_TOLERANCE, 0},
+{ 918, 1044013141u, 3819109588u, 1048561488u, 969143351u, 1058310923u, 3478948785u, 0, SQRT_TOLERANCE, 0},
+{ 919, 1072639397u, 4246896124u, 1104584799u, 1940097860u, 1072666147u, 3848600418u, 0, SQRT_TOLERANCE, 0},
+{ 920, 1048038468u, 2228686199u, 3220231833u, 777624847u, 1060340580u, 88720588u, 0, SQRT_TOLERANCE, 0},
+{ 921, 1083983658u, 4189906558u, 3203004203u, 854242364u, 1078281556u, 3353832663u, 0, SQRT_TOLERANCE, 0},
+{ 922, 1103910407u, 4089051094u, 3227282692u, 2693170723u, 1088298179u, 1086091072u, 0, SQRT_TOLERANCE, 0},
+{ 923, 1045883607u, 1278581412u, 3239296746u, 1774588717u, 1059268121u, 2167989998u, 0, SQRT_TOLERANCE, 0},
+{ 924, 1074889038u, 1794845306u, 1104879344u, 4135865182u, 1073790034u, 3868303847u, 0, SQRT_TOLERANCE, 0},
+{ 925, 1106449055u, 754938390u, 1061291430u, 2010786993u, 1089566732u, 1912835680u, 0, SQRT_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 1073069739u, 721338478u, 0, SQRT_TOLERANCE, 0},
+{ 927, 1083965546u, 567588900u, 3195452230u, 1421366017u, 1078274727u, 3337096634u, 0, SQRT_TOLERANCE, 0},
+{ 928, 1077606107u, 2708717091u, 1071975971u, 1364590470u, 1075103063u, 318110768u, 0, SQRT_TOLERANCE, 0},
+{ 929, 1104653635u, 3461956134u, 3207820115u, 1605709634u, 1088648873u, 4265956437u, 0, SQRT_TOLERANCE, 0},
+{ 930, 1065302996u, 1497124553u, 1051715442u, 916736957u, 1068915415u, 2084577864u, 0, SQRT_TOLERANCE, 0},
+{ 931, 1058468363u, 834914365u, 1064667143u, 2839166298u, 1065560347u, 2628317795u, 0, SQRT_TOLERANCE, 0},
+{ 932, 1057279949u, 2139295776u, 1062816721u, 914592523u, 1064947318u, 2814349975u, 0, SQRT_TOLERANCE, 0},
+{ 933, 1042153283u, 851569132u, 1058503154u, 1399378677u, 1057351784u, 3774620876u, 0, SQRT_TOLERANCE, 0},
+{ 934, 1086054049u, 3897202342u, 3245382590u, 246600375u, 1079320031u, 1244349683u, 0, SQRT_TOLERANCE, 0},
+{ 935, 1077976660u, 3620429520u, 1055627557u, 229305u, 1075253123u, 3013558791u, 0, SQRT_TOLERANCE, 0},
+{ 936, 1083958833u, 3641997865u, 3206673888u, 93720614u, 1078272188u, 2238994166u, 0, SQRT_TOLERANCE, 0},
+{ 937, 1080324787u, 32766320u, 1062084905u, 3668443038u, 1076466812u, 724880903u, 0, SQRT_TOLERANCE, 0},
+{ 938, 1075815348u, 2039713492u, 3248699388u, 1346210821u, 1074167781u, 628737544u, 0, SQRT_TOLERANCE, 0},
+{ 939, 1093050016u, 1335820726u, 3191756860u, 1808427032u, 1082845040u, 1168265261u, 0, SQRT_TOLERANCE, 0},
+{ 940, 1061442763u, 650692001u, 1103515670u, 2253348763u, 1067024832u, 2844487097u, 0, SQRT_TOLERANCE, 0},
+{ 941, 1043911539u, 2372623300u, 3210185343u, 3200572848u, 1058270758u, 1094784534u, 0, SQRT_TOLERANCE, 0},
+{ 942, 1100796069u, 762317532u, 3194595095u, 3192607437u, 1086683339u, 589937548u, 0, SQRT_TOLERANCE, 0},
+{ 943, 1062262701u, 217775356u, 3232827087u, 2969367386u, 1067477620u, 1640907208u, 0, SQRT_TOLERANCE, 0},
+{ 944, 1057172551u, 3621353969u, 1077994795u, 3873976266u, 1064879367u, 624834462u, 0, SQRT_TOLERANCE, 0},
+{ 945, 1091301987u, 268372152u, 3221764390u, 3216978962u, 1081993122u, 1740668065u, 0, SQRT_TOLERANCE, 0},
+{ 946, 1098953963u, 142942404u, 1075322987u, 1746449109u, 1085742890u, 916346833u, 0, SQRT_TOLERANCE, 0},
+{ 947, 1104006296u, 496534875u, 3254522293u, 2532372502u, 1088348487u, 2351791740u, 0, SQRT_TOLERANCE, 0},
+{ 948, 1102741893u, 2999955409u, 3222793392u, 1868977643u, 1087674356u, 982677099u, 0, SQRT_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 1073491165u, 2764397114u, 0, SQRT_TOLERANCE, 0},
+{ 950, 1068218799u, 73646871u, 3231442171u, 3711510104u, 1070451004u, 1822251312u, 0, SQRT_TOLERANCE, 0},
+{ 951, 1090483524u, 218135177u, 3198908856u, 3082199105u, 1081503579u, 4285607432u, 0, SQRT_TOLERANCE, 0},
+{ 952, 1068068480u, 1061628117u, 3248859043u, 86776158u, 1070368515u, 3293074727u, 0, SQRT_TOLERANCE, 0},
+{ 953, 1061001026u, 938869114u, 1087911145u, 2416710759u, 1066779213u, 859029982u, 0, SQRT_TOLERANCE, 0},
+{ 954, 1095576832u, 2970853959u, 3239543429u, 1887505029u, 1084132903u, 200004974u, 0, SQRT_TOLERANCE, 0},
+{ 955, 1090245139u, 1337895935u, 1076463812u, 1172733328u, 1081415964u, 3919088725u, 0, SQRT_TOLERANCE, 0},
+{ 956, 1049139928u, 1469010822u, 3229583535u, 551399515u, 1060900690u, 3691380790u, 0, SQRT_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 1073373307u, 1734194338u, 0, SQRT_TOLERANCE, 0},
+{ 958, 1094655132u, 2976596113u, 3192137295u, 3033242648u, 1083592616u, 3269714685u, 0, SQRT_TOLERANCE, 0},
+{ 959, 1098698481u, 876810930u, 3197470945u, 2571587447u, 1085634600u, 2974954006u, 0, SQRT_TOLERANCE, 0},
+{ 960, 1094287162u, 4007797282u, 3225853845u, 4069319648u, 1083454116u, 1111847775u, 0, SQRT_TOLERANCE, 0},
+{ 961, 1047279982u, 3840538373u, 1043189552u, 3668774580u, 1059982733u, 1785743553u, 0, SQRT_TOLERANCE, 0},
+{ 962, 1070128056u, 200857661u, 3229758439u, 3359367736u, 1071395896u, 2032866210u, 0, SQRT_TOLERANCE, 0},
+{ 963, 1101314221u, 111868139u, 3227902082u, 2366064003u, 1086963739u, 4196686705u, 0, SQRT_TOLERANCE, 0},
+{ 964, 1044195166u, 3510904416u, 3222131653u, 3822770497u, 1058380034u, 3747406404u, 0, SQRT_TOLERANCE, 0},
+{ 965, 1095192067u, 789151814u, 1099269239u, 2958956055u, 1083920118u, 3070815874u, 0, SQRT_TOLERANCE, 0},
+{ 966, 1084679320u, 722163228u, 1105524559u, 1534462169u, 1078661356u, 2462041756u, 0, SQRT_TOLERANCE, 0},
+{ 967, 1046586062u, 2207037106u, 3208952465u, 1231254630u, 1059570061u, 3303006986u, 0, SQRT_TOLERANCE, 0},
+{ 968, 1050400412u, 3838689849u, 3198769679u, 1302617170u, 1061493461u, 1255872586u, 0, SQRT_TOLERANCE, 0},
+{ 969, 1085938906u, 2527556476u, 3240373426u, 124352692u, 1079275699u, 2132957795u, 0, SQRT_TOLERANCE, 0},
+{ 970, 1052057157u, 3502371499u, 1043411944u, 4190072016u, 1062363584u, 1166493977u, 0, SQRT_TOLERANCE, 0},
+{ 971, 1064676142u, 1798470077u, 3200116917u, 3421833729u, 1068670638u, 2243988751u, 0, SQRT_TOLERANCE, 0},
+{ 972, 1046031308u, 3653237931u, 3204255012u, 3683870669u, 1059328381u, 2115495913u, 0, SQRT_TOLERANCE, 0},
+{ 973, 1053588582u, 376530104u, 1073853547u, 565755892u, 1063137567u, 1274861223u, 0, SQRT_TOLERANCE, 0},
+{ 974, 1095020203u, 558292492u, 1051772749u, 4267873474u, 1083816419u, 1693486820u, 0, SQRT_TOLERANCE, 0},
+{ 975, 1077289061u, 509637100u, 3212030069u, 215050379u, 1074974919u, 2045190657u, 0, SQRT_TOLERANCE, 0},
+{ 976, 1092057101u, 3571665665u, 3188628584u, 757824767u, 1082351806u, 2909573129u, 0, SQRT_TOLERANCE, 0},
+{ 977, 1067315689u, 998858159u, 1063077962u, 436029885u, 1069933448u, 907635004u, 0, SQRT_TOLERANCE, 0},
+{ 978, 1058463317u, 996300405u, 3193842624u, 80548098u, 1065558239u, 135023660u, 0, SQRT_TOLERANCE, 0},
+{ 979, 1081365192u, 3876129407u, 3215332180u, 2226970413u, 1077020759u, 1534667039u, 0, SQRT_TOLERANCE, 0},
+{ 980, 1090125305u, 200013509u, 3224552716u, 414878724u, 1081369753u, 3459975001u, 0, SQRT_TOLERANCE, 0},
+{ 981, 1083133445u, 309319541u, 1048979765u, 1261662434u, 1077913221u, 1869288719u, 0, SQRT_TOLERANCE, 0},
+{ 982, 1089252639u, 4062255924u, 3224274128u, 4289485681u, 1080969958u, 3153974956u, 0, SQRT_TOLERANCE, 0},
+{ 983, 1088652436u, 1611969213u, 1053890378u, 3774617276u, 1080622543u, 2166078761u, 0, SQRT_TOLERANCE, 0},
+{ 984, 1080412763u, 1752164782u, 3239587974u, 612223386u, 1076520965u, 3008339372u, 0, SQRT_TOLERANCE, 0},
+{ 985, 1041545782u, 2024044989u, 1074932678u, 3259111307u, 1057109504u, 417464780u, 0, SQRT_TOLERANCE, 0},
+{ 986, 1053207518u, 2564965629u, 1093571065u, 169360454u, 1062924111u, 1475578926u, 0, SQRT_TOLERANCE, 0},
+{ 987, 1089599090u, 1860101737u, 3191222372u, 1676437468u, 1081144309u, 1506943838u, 0, SQRT_TOLERANCE, 0},
+{ 988, 1059802968u, 588387057u, 3192103292u, 2495288012u, 1066242022u, 408509364u, 0, SQRT_TOLERANCE, 0},
+{ 989, 1045672057u, 659070058u, 1073095700u, 1393632068u, 1059176387u, 955643869u, 0, SQRT_TOLERANCE, 0},
+{ 990, 1070199615u, 4276187829u, 3217553330u, 1868253275u, 1071436055u, 3673736417u, 0, SQRT_TOLERANCE, 0},
+{ 991, 1075736624u, 2085481575u, 3215994784u, 800910002u, 1074139519u, 161119849u, 0, SQRT_TOLERANCE, 0},
+{ 992, 1056934836u, 1950570756u, 3200582211u, 941022151u, 1064728410u, 4059681546u, 0, SQRT_TOLERANCE, 0},
+{ 993, 1057530368u, 2075610870u, 3250142022u, 3605152103u, 1065096039u, 1148369410u, 0, SQRT_TOLERANCE, 0},
+{ 994, 1053355602u, 3792931748u, 3204857863u, 804393211u, 1063009988u, 1880669775u, 0, SQRT_TOLERANCE, 0},
+{ 995, 1106162722u, 3430071177u, 3226288311u, 3652522729u, 1089427546u, 1065853679u, 0, SQRT_TOLERANCE, 0},
+{ 996, 1053831054u, 236884699u, 3227874605u, 2193269825u, 1063262133u, 1982882090u, 0, SQRT_TOLERANCE, 0},
+{ 997, 1064936593u, 2744231849u, 1046186036u, 771053722u, 1068777832u, 3842742177u, 0, SQRT_TOLERANCE, 0},
+{ 998, 1083996036u, 3000189819u, 1096500901u, 2057239777u, 1078286204u, 1374590418u, 0, SQRT_TOLERANCE, 0},
+{ 999, 1093835581u, 205759408u, 3244643377u, 2702292618u, 1083261193u, 3135830611u, 0, SQRT_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_SQRT_H multiple inclusion protection
+
+// EOF sqrt.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/tan.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/tan.c
new file mode 100644
index 0000000000..4115e3c67b
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/tan.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// tan.c
+//
+// Test of tan() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/tan.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(tan_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &tan, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_NONE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &tan_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("tan() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("tan() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library tan() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "tan() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF tan.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/tan.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/tan.h
new file mode 100644
index 0000000000..08acf27a42
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/tan.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_TAN_H
+#define CYGONCE_LIBM_TAN_H
+//===========================================================================
+//
+// tan.h
+//
+// Test vectors for testing of tan() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/tan.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define TAN_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t tan_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1077999148u, 2506787616u, 1090024059u, 3619148316u, 3219622610u, 2608738099u, 0, TAN_TOLERANCE, 0},
+{ 2, 3218153654u, 3176730980u, 1051524793u, 2993920299u, 3218181243u, 1709798879u, 0, TAN_TOLERANCE, 0},
+{ 3, 3239659803u, 2725707538u, 3232101343u, 2346810316u, 3217920385u, 4213448196u, 0, TAN_TOLERANCE, 0},
+{ 4, 1092554362u, 2088062470u, 3201242716u, 420891118u, 3219436383u, 1559440912u, 0, TAN_TOLERANCE, 0},
+{ 5, 3221200677u, 2636405208u, 1100049309u, 471635570u, 1073914339u, 2222366620u, 0, TAN_TOLERANCE, 0},
+{ 6, 1089363191u, 1746012320u, 1054478713u, 3333988501u, 3220605628u, 1031861671u, 0, TAN_TOLERANCE, 0},
+{ 7, 1047953160u, 183014794u, 3202039382u, 2016785810u, 1047953160u, 183014809u, 0, TAN_TOLERANCE, 0},
+{ 8, 3213486034u, 2688957927u, 1046089230u, 2709029994u, 3213486125u, 771400820u, 0, TAN_TOLERANCE, 0},
+{ 9, 1058795730u, 624574473u, 1045840574u, 3473266330u, 1058795730u, 654356267u, 0, TAN_TOLERANCE, 0},
+{ 10, 3204919842u, 1605286142u, 1068931671u, 4233776869u, 3204919842u, 1609546135u, 0, TAN_TOLERANCE, 0},
+{ 11, 1060343410u, 1857607719u, 3222889559u, 3417070006u, 1060343410u, 2020998544u, 0, TAN_TOLERANCE, 0},
+{ 12, 1103599987u, 3981151660u, 1088899021u, 1332651746u, 3221582538u, 16706636u, 0, TAN_TOLERANCE, 0},
+{ 13, 1085298022u, 3824988054u, 1066856791u, 2070129652u, 3215830604u, 3502545545u, 0, TAN_TOLERANCE, 0},
+{ 14, 3207559790u, 1372884064u, 1080833116u, 3229926662u, 3207559790u, 1543229406u, 0, TAN_TOLERANCE, 0},
+{ 15, 1093826501u, 3217805330u, 3191644264u, 2014578707u, 3222635354u, 3054668406u, 0, TAN_TOLERANCE, 0},
+{ 16, 1102287487u, 265058758u, 3239903247u, 1630600647u, 3214602649u, 265563968u, 0, TAN_TOLERANCE, 0},
+{ 17, 1071124229u, 1946677669u, 3198462609u, 926009897u, 1071202952u, 1724614277u, 0, TAN_TOLERANCE, 0},
+{ 18, 1072130299u, 2271884183u, 3203741999u, 2118617783u, 1072478793u, 3812297738u, 0, TAN_TOLERANCE, 0},
+{ 19, 3194849109u, 213658772u, 3249401130u, 314151656u, 3194849109u, 213658780u, 0, TAN_TOLERANCE, 0},
+{ 20, 3254112288u, 1564829925u, 3197817016u, 497230814u, 3219908120u, 4282371679u, 0, TAN_TOLERANCE, 0},
+{ 21, 3216262634u, 2075329122u, 3231746400u, 169900577u, 3216265418u, 3766984913u, 0, TAN_TOLERANCE, 0},
+{ 22, 1049848642u, 541549344u, 1096608669u, 3119070100u, 1049848642u, 541549497u, 0, TAN_TOLERANCE, 0},
+{ 23, 1085427055u, 567496114u, 1045286891u, 1969998540u, 1074735168u, 195000017u, 0, TAN_TOLERANCE, 0},
+{ 24, 1060548195u, 1299369769u, 1049342524u, 4167404066u, 1060548195u, 1554262199u, 0, TAN_TOLERANCE, 0},
+{ 25, 3208865645u, 3348930841u, 1078472138u, 358457347u, 3208865645u, 3987332184u, 0, TAN_TOLERANCE, 0},
+{ 26, 1071069297u, 2192461366u, 1099527247u, 3184735642u, 1071139786u, 997312598u, 0, TAN_TOLERANCE, 0},
+{ 27, 1052861772u, 331696577u, 3189610016u, 793242270u, 1052861772u, 331703596u, 0, TAN_TOLERANCE, 0},
+{ 28, 3252528934u, 2322696981u, 1083791358u, 3020766674u, 1071988465u, 2823307452u, 0, TAN_TOLERANCE, 0},
+{ 29, 1044902177u, 252085215u, 3214426435u, 4139068910u, 1044902177u, 252085215u, 0, TAN_TOLERANCE, 0},
+{ 30, 3222505725u, 105589263u, 1056316170u, 261630827u, 1075256347u, 888317792u, 0, TAN_TOLERANCE, 0},
+{ 31, 1107213408u, 428765703u, 3251828686u, 2009972239u, 1072804855u, 3093920736u, 0, TAN_TOLERANCE, 0},
+{ 32, 1098568019u, 3517376586u, 3240257920u, 3304487302u, 1073171249u, 1991641065u, 0, TAN_TOLERANCE, 0},
+{ 33, 3233537912u, 237004814u, 3237899261u, 3364008659u, 3220482895u, 2812950573u, 0, TAN_TOLERANCE, 0},
+{ 34, 3195247552u, 472004928u, 3226869477u, 1186387580u, 3195247552u, 472004938u, 0, TAN_TOLERANCE, 0},
+{ 35, 1054226850u, 4085763910u, 1106394906u, 2684738273u, 1054226850u, 4085822461u, 0, TAN_TOLERANCE, 0},
+{ 36, 1057053639u, 2055490142u, 3231581370u, 3879040079u, 1057053639u, 2057275463u, 0, TAN_TOLERANCE, 0},
+{ 37, 3188976647u, 3725731239u, 1061652681u, 591292963u, 3188976647u, 3725731239u, 0, TAN_TOLERANCE, 0},
+{ 38, 3225014981u, 1147041027u, 3215417793u, 624695933u, 3219812649u, 3561661677u, 0, TAN_TOLERANCE, 0},
+{ 39, 3206052774u, 705725219u, 3238067573u, 1116238321u, 3206052774u, 725762224u, 0, TAN_TOLERANCE, 0},
+{ 40, 3207367088u, 7287411u, 1045917232u, 116067742u, 3207367088u, 134216766u, 0, TAN_TOLERANCE, 0},
+{ 41, 3240055222u, 3604989074u, 1066381836u, 545298780u, 1076058842u, 2692959828u, 0, TAN_TOLERANCE, 0},
+{ 42, 3219080936u, 1681476121u, 1060345752u, 3553822398u, 3219194848u, 942221257u, 0, TAN_TOLERANCE, 0},
+{ 43, 1102831658u, 3410480388u, 1052460275u, 1660607230u, 3214525015u, 4241725003u, 0, TAN_TOLERANCE, 0},
+{ 44, 1089216869u, 1494984673u, 3196647153u, 287894723u, 1072160929u, 2549431126u, 0, TAN_TOLERANCE, 0},
+{ 45, 1054885127u, 644548665u, 1081948134u, 2442134629u, 1054885127u, 644640539u, 0, TAN_TOLERANCE, 0},
+{ 46, 1087554095u, 2312530895u, 3221584595u, 3379665576u, 1073452942u, 1180851169u, 0, TAN_TOLERANCE, 0},
+{ 47, 1096085375u, 3018463866u, 1086226574u, 404012923u, 1068538907u, 1719554741u, 0, TAN_TOLERANCE, 0},
+{ 48, 1064733299u, 1710279345u, 3251401196u, 3528946000u, 1064733314u, 1334898870u, 0, TAN_TOLERANCE, 0},
+{ 49, 1061536351u, 2164450219u, 1083520023u, 3312018966u, 1061536351u, 3064676513u, 0, TAN_TOLERANCE, 0},
+{ 50, 1057248676u, 2648986431u, 1050330591u, 1474376550u, 1057248676u, 2651856431u, 0, TAN_TOLERANCE, 0},
+{ 51, 3194422028u, 1839068700u, 1077406406u, 3013052171u, 3194422028u, 1839068704u, 0, TAN_TOLERANCE, 0},
+{ 52, 1046493630u, 772102380u, 3220729740u, 4219039958u, 1046493630u, 772102381u, 0, TAN_TOLERANCE, 0},
+{ 53, 3229472221u, 3058618779u, 1046304788u, 3338676024u, 1069813597u, 724043670u, 0, TAN_TOLERANCE, 0},
+{ 54, 1051172137u, 506286854u, 1094907481u, 2217000199u, 1051172137u, 506287951u, 0, TAN_TOLERANCE, 0},
+{ 55, 1082428310u, 1147428263u, 1065432625u, 3034786717u, 1072851643u, 3329730330u, 0, TAN_TOLERANCE, 0},
+{ 56, 1082016752u, 2844125311u, 1082985198u, 2561492677u, 1071527175u, 434342087u, 0, TAN_TOLERANCE, 0},
+{ 57, 3211536916u, 704542600u, 3222902057u, 2762779203u, 3211536923u, 1874722944u, 0, TAN_TOLERANCE, 0},
+{ 58, 3199680614u, 184131949u, 3249723525u, 1667366082u, 3199680614u, 184136139u, 0, TAN_TOLERANCE, 0},
+{ 59, 3223609598u, 3904224140u, 1067056698u, 2942159914u, 3220091696u, 2663063840u, 0, TAN_TOLERANCE, 0},
+{ 60, 1100636863u, 426114282u, 3209056785u, 1083606355u, 3220312233u, 624814402u, 0, TAN_TOLERANCE, 0},
+{ 61, 1106165945u, 3774123863u, 1106787580u, 2722107965u, 1070796578u, 534470147u, 0, TAN_TOLERANCE, 0},
+{ 62, 1088005092u, 1377734762u, 1104232051u, 2377063483u, 1074430559u, 547495352u, 0, TAN_TOLERANCE, 0},
+{ 63, 1069380559u, 1029739074u, 1105467109u, 3062201018u, 1069389120u, 2814662813u, 0, TAN_TOLERANCE, 0},
+{ 64, 3234741597u, 773857656u, 3214251949u, 335833884u, 3220624065u, 680339648u, 0, TAN_TOLERANCE, 0},
+{ 65, 3203224610u, 1473865960u, 1103073830u, 4000427507u, 3203224610u, 1474404149u, 0, TAN_TOLERANCE, 0},
+{ 66, 1103185231u, 4242092620u, 1067009473u, 14539161u, 3220426242u, 3000196541u, 0, TAN_TOLERANCE, 0},
+{ 67, 3192516074u, 1732245037u, 1101371955u, 1533536108u, 3192516074u, 1732245037u, 0, TAN_TOLERANCE, 0},
+{ 68, 3249153995u, 1833841275u, 1099430098u, 4144145552u, 3222141451u, 2395515507u, 0, TAN_TOLERANCE, 0},
+{ 69, 3244270463u, 935007012u, 3188865420u, 604442938u, 1075422778u, 489932060u, 0, TAN_TOLERANCE, 0},
+{ 70, 3206903253u, 2211464602u, 1046255144u, 1635910526u, 3206903253u, 2265441187u, 0, TAN_TOLERANCE, 0},
+{ 71, 1077871417u, 2549219008u, 3231633258u, 3733639385u, 3218820973u, 826451768u, 0, TAN_TOLERANCE, 0},
+{ 72, 1082095089u, 1819374372u, 3202219056u, 2617077637u, 1072422924u, 2528742585u, 0, TAN_TOLERANCE, 0},
+{ 73, 1094345280u, 546465680u, 1048653554u, 532401530u, 3219190284u, 751670473u, 0, TAN_TOLERANCE, 0},
+{ 74, 1044571091u, 2759019783u, 3221570188u, 3554409630u, 1044571091u, 2759019783u, 0, TAN_TOLERANCE, 0},
+{ 75, 3212931282u, 2527221960u, 1099107978u, 2696971136u, 3212931310u, 944427847u, 0, TAN_TOLERANCE, 0},
+{ 76, 1097158000u, 173134582u, 1087299442u, 2877794600u, 3221389719u, 1587380563u, 0, TAN_TOLERANCE, 0},
+{ 77, 1086400474u, 547642046u, 3197285510u, 3521286127u, 3217586653u, 3675080684u, 0, TAN_TOLERANCE, 0},
+{ 78, 1074860702u, 1231582831u, 1090971734u, 1653446832u, 1073794854u, 3729772102u, 0, TAN_TOLERANCE, 0},
+{ 79, 1061342535u, 3762182190u, 3252967851u, 2615360375u, 1061342536u, 48009287u, 0, TAN_TOLERANCE, 0},
+{ 80, 3200834423u, 2588067350u, 3206610957u, 3551059728u, 3200834423u, 2588087829u, 0, TAN_TOLERANCE, 0},
+{ 81, 3206978856u, 845263327u, 1073415902u, 1749010288u, 3206978856u, 908420805u, 0, TAN_TOLERANCE, 0},
+{ 82, 3205576370u, 3092685191u, 3190678390u, 2872219490u, 3205576370u, 3099649190u, 0, TAN_TOLERANCE, 0},
+{ 83, 3218315055u, 4107255722u, 3205337291u, 3069068345u, 3218356717u, 3205080738u, 0, TAN_TOLERANCE, 0},
+{ 84, 3243990857u, 2294867524u, 3216653996u, 2860384670u, 1075937062u, 441605080u, 0, TAN_TOLERANCE, 0},
+{ 85, 3193326350u, 2265437201u, 3240198679u, 1234948614u, 3193326350u, 2265437202u, 0, TAN_TOLERANCE, 0},
+{ 86, 3216359929u, 1186945904u, 3251167793u, 1896750851u, 3216363372u, 2480044998u, 0, TAN_TOLERANCE, 0},
+{ 87, 1081575478u, 3686084548u, 1079286273u, 3309277689u, 3219165487u, 3935712921u, 0, TAN_TOLERANCE, 0},
+{ 88, 3223476240u, 3006860614u, 3231412671u, 2504194724u, 1070630910u, 4230325485u, 0, TAN_TOLERANCE, 0},
+{ 89, 3236149260u, 1948717780u, 1048317852u, 3791803982u, 1072688994u, 3729051438u, 0, TAN_TOLERANCE, 0},
+{ 90, 1064345015u, 4272034420u, 3192982124u, 1526175922u, 1064345021u, 4158169529u, 0, TAN_TOLERANCE, 0},
+{ 91, 3245817826u, 4108948538u, 1104691287u, 640541190u, 1074813212u, 3505437405u, 0, TAN_TOLERANCE, 0},
+{ 92, 3207257417u, 3259274853u, 1082507103u, 3677038020u, 3207257417u, 3365158881u, 0, TAN_TOLERANCE, 0},
+{ 93, 1083132498u, 3781708548u, 1096584871u, 1207386447u, 3220390531u, 2314747582u, 0, TAN_TOLERANCE, 0},
+{ 94, 3188695272u, 3011191657u, 1103798670u, 1096124830u, 3188695272u, 3011191657u, 0, TAN_TOLERANCE, 0},
+{ 95, 1063235023u, 2540404725u, 3240157452u, 4122845725u, 1063235026u, 767486541u, 0, TAN_TOLERANCE, 0},
+{ 96, 1083643710u, 311336721u, 3214382367u, 4212533768u, 1074337179u, 3867090367u, 0, TAN_TOLERANCE, 0},
+{ 97, 1051139427u, 1769686293u, 3240200923u, 3538602249u, 1051139427u, 1769687322u, 0, TAN_TOLERANCE, 0},
+{ 98, 1078227549u, 508056696u, 1103793878u, 776520138u, 1068173843u, 4073142280u, 0, TAN_TOLERANCE, 0},
+{ 99, 1102910577u, 4064962760u, 1077424413u, 819766631u, 1070476795u, 2500532800u, 0, TAN_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 3218369918u, 296208356u, 0, TAN_TOLERANCE, 0},
+{ 101, 1082295059u, 2514398118u, 1076579751u, 870169764u, 3222557284u, 3821041880u, 0, TAN_TOLERANCE, 0},
+{ 102, 3246851392u, 1190259653u, 1069112254u, 3417249840u, 1073944628u, 1508796918u, 0, TAN_TOLERANCE, 0},
+{ 103, 3193663083u, 3467757357u, 3215075200u, 2168175352u, 3193663083u, 3467757359u, 0, TAN_TOLERANCE, 0},
+{ 104, 3239643135u, 1508888184u, 1060430241u, 3524949092u, 1073664477u, 2627356099u, 0, TAN_TOLERANCE, 0},
+{ 105, 3197412883u, 166402802u, 3237198975u, 3572369260u, 3197412883u, 166402985u, 0, TAN_TOLERANCE, 0},
+{ 106, 1081866822u, 2441536203u, 3202753937u, 3658194573u, 1077725529u, 4095469556u, 0, TAN_TOLERANCE, 0},
+{ 107, 1062392908u, 2479742828u, 1062342831u, 4214154303u, 1062392909u, 518131303u, 0, TAN_TOLERANCE, 0},
+{ 108, 1082396794u, 426896765u, 1066474375u, 2201754442u, 1073946989u, 1842153396u, 0, TAN_TOLERANCE, 0},
+{ 109, 3195629021u, 2055773734u, 3239267288u, 291396537u, 3195629021u, 2055773755u, 0, TAN_TOLERANCE, 0},
+{ 110, 3236968033u, 874125203u, 3210508124u, 4091098764u, 1072994339u, 2120920512u, 0, TAN_TOLERANCE, 0},
+{ 111, 1065716026u, 120488169u, 3241241441u, 1985269424u, 1065716078u, 229684732u, 0, TAN_TOLERANCE, 0},
+{ 112, 3206539410u, 2243036871u, 3243941101u, 740033495u, 3206539410u, 2287393372u, 0, TAN_TOLERANCE, 0},
+{ 113, 3209424906u, 1176656356u, 1074261978u, 3588756231u, 3209424906u, 3082067610u, 0, TAN_TOLERANCE, 0},
+{ 114, 3252816791u, 3037249392u, 1061635587u, 1173102190u, 3220656564u, 3604743680u, 0, TAN_TOLERANCE, 0},
+{ 115, 3237209581u, 2882725208u, 1071440059u, 69225090u, 3219270037u, 1144805256u, 0, TAN_TOLERANCE, 0},
+{ 116, 3212663474u, 272319256u, 1072073912u, 2493997123u, 3212663506u, 4289517860u, 0, TAN_TOLERANCE, 0},
+{ 117, 1057720186u, 188610379u, 3232757923u, 2209647371u, 1057720186u, 195731687u, 0, TAN_TOLERANCE, 0},
+{ 118, 3236758517u, 1990439193u, 1078073146u, 622849962u, 3219034996u, 3232269414u, 0, TAN_TOLERANCE, 0},
+{ 119, 1057135741u, 756052458u, 1081649113u, 2247475162u, 1057135741u, 758252889u, 0, TAN_TOLERANCE, 0},
+{ 120, 1061623064u, 3878055211u, 3222407050u, 2979438623u, 1061623065u, 657726119u, 0, TAN_TOLERANCE, 0},
+{ 121, 3195290997u, 2676398686u, 1105124431u, 3631096636u, 3195290997u, 2676398697u, 0, TAN_TOLERANCE, 0},
+{ 122, 1065079390u, 1697791764u, 3198136112u, 2299842819u, 1065079418u, 1875760833u, 0, TAN_TOLERANCE, 0},
+{ 123, 1078084768u, 1931502677u, 3215264397u, 3016456382u, 3221390371u, 1549517714u, 0, TAN_TOLERANCE, 0},
+{ 124, 1072253426u, 343404215u, 1061072607u, 4266232536u, 1072703528u, 4239724827u, 0, TAN_TOLERANCE, 0},
+{ 125, 3241230836u, 4140316002u, 1082896196u, 868256971u, 1077239637u, 3288074299u, 0, TAN_TOLERANCE, 0},
+{ 126, 1075422810u, 1864139509u, 3187675097u, 3084482407u, 1069589412u, 935845071u, 0, TAN_TOLERANCE, 0},
+{ 127, 3220191323u, 2427162817u, 3234748208u, 2715105792u, 3220811887u, 3230843823u, 0, TAN_TOLERANCE, 0},
+{ 128, 1064600512u, 3943389284u, 1046724025u, 3626825684u, 1064600524u, 686990573u, 0, TAN_TOLERANCE, 0},
+{ 129, 1045423002u, 967350972u, 1093012318u, 448002663u, 1045423002u, 967350973u, 0, TAN_TOLERANCE, 0},
+{ 130, 3251845859u, 105058217u, 1069733884u, 171786224u, 3221748718u, 3998156706u, 0, TAN_TOLERANCE, 0},
+{ 131, 3189614508u, 2863482262u, 3204997271u, 877784425u, 3189614508u, 2863482262u, 0, TAN_TOLERANCE, 0},
+{ 132, 3202629313u, 2801782962u, 3213604117u, 762347195u, 3202629313u, 2801959982u, 0, TAN_TOLERANCE, 0},
+{ 133, 3233486727u, 2317950339u, 3246333414u, 2135700283u, 1073741711u, 1100714238u, 0, TAN_TOLERANCE, 0},
+{ 134, 1056516397u, 4171919805u, 1082858682u, 2180920863u, 1056516397u, 4173279042u, 0, TAN_TOLERANCE, 0},
+{ 135, 3220149084u, 1918836931u, 1083603224u, 3137821660u, 3220714707u, 436652046u, 0, TAN_TOLERANCE, 0},
+{ 136, 1103902874u, 3456203663u, 3235600523u, 2335688936u, 1070111728u, 3070150721u, 0, TAN_TOLERANCE, 0},
+{ 137, 1042279322u, 4170235262u, 1051824459u, 521583737u, 1042279322u, 4170235262u, 0, TAN_TOLERANCE, 0},
+{ 138, 1081348303u, 1296623194u, 3250673860u, 2442872540u, 1072056099u, 878147212u, 0, TAN_TOLERANCE, 0},
+{ 139, 1061684277u, 289979405u, 1049514449u, 3865737145u, 1061684277u, 1500422480u, 0, TAN_TOLERANCE, 0},
+{ 140, 1075298944u, 3699090239u, 1054539840u, 3259249360u, 3218530158u, 2204023492u, 0, TAN_TOLERANCE, 0},
+{ 141, 1096418100u, 1619819023u, 1045993352u, 1022642459u, 1072486591u, 200878280u, 0, TAN_TOLERANCE, 0},
+{ 142, 1081433004u, 19455098u, 3229182089u, 2096003654u, 3219860921u, 2802078233u, 0, TAN_TOLERANCE, 0},
+{ 143, 1076297936u, 3803689997u, 1071630912u, 2263729518u, 3221020563u, 3741955633u, 0, TAN_TOLERANCE, 0},
+{ 144, 1101357261u, 2816837387u, 1063422305u, 2597606398u, 3225913854u, 4017082295u, 0, TAN_TOLERANCE, 0},
+{ 145, 1069100169u, 3680967506u, 1040201163u, 179224723u, 1069105508u, 1440893395u, 0, TAN_TOLERANCE, 0},
+{ 146, 3188629767u, 978126928u, 1101553990u, 4047893399u, 3188629767u, 978126928u, 0, TAN_TOLERANCE, 0},
+{ 147, 3222322045u, 4059818629u, 1042678728u, 3640293589u, 3220920863u, 1658556398u, 0, TAN_TOLERANCE, 0},
+{ 148, 3248464040u, 3383497159u, 1070002807u, 1527313008u, 3218096293u, 3040100589u, 0, TAN_TOLERANCE, 0},
+{ 149, 3202707679u, 2599946514u, 1104170406u, 2738675352u, 3202707679u, 2600156789u, 0, TAN_TOLERANCE, 0},
+{ 150, 1105232623u, 3616571377u, 1060859316u, 1130603218u, 1072709115u, 3670033279u, 0, TAN_TOLERANCE, 0},
+{ 151, 1076028796u, 3859211180u, 1067940450u, 1744531824u, 1066926573u, 3567718329u, 0, TAN_TOLERANCE, 0},
+{ 152, 1042831340u, 1958025850u, 3236511256u, 2472176453u, 1042831340u, 1958025850u, 0, TAN_TOLERANCE, 0},
+{ 153, 3233107089u, 182132862u, 3250520938u, 3924356991u, 1074211406u, 1409850566u, 0, TAN_TOLERANCE, 0},
+{ 154, 3230501884u, 35632886u, 3209806504u, 1453402523u, 1069496128u, 1029233379u, 0, TAN_TOLERANCE, 0},
+{ 155, 1083522102u, 743225214u, 3202890678u, 142917400u, 3221790920u, 331029792u, 0, TAN_TOLERANCE, 0},
+{ 156, 1080684976u, 1472665012u, 3203138231u, 256588219u, 1070266411u, 390048846u, 0, TAN_TOLERANCE, 0},
+{ 157, 1094982162u, 1062927000u, 1061134072u, 931677439u, 1072398089u, 826365235u, 0, TAN_TOLERANCE, 0},
+{ 158, 1058377732u, 2320910576u, 1055663370u, 288059864u, 1058377732u, 2334598583u, 0, TAN_TOLERANCE, 0},
+{ 159, 1078958093u, 1448349062u, 3199478070u, 3454027134u, 1071107400u, 206034543u, 0, TAN_TOLERANCE, 0},
+{ 160, 3237458798u, 4215445172u, 3196654963u, 2231888973u, 3219458995u, 3819290632u, 0, TAN_TOLERANCE, 0},
+{ 161, 3246632231u, 40413554u, 3232578253u, 983832844u, 3220432216u, 2842337330u, 0, TAN_TOLERANCE, 0},
+{ 162, 3223721534u, 3995725873u, 1050082319u, 777231627u, 1077206840u, 461276196u, 0, TAN_TOLERANCE, 0},
+{ 163, 1040986626u, 672789828u, 3253385962u, 2982787335u, 1040986626u, 672789828u, 0, TAN_TOLERANCE, 0},
+{ 164, 1068390875u, 2075971825u, 1070166500u, 4034633931u, 1068393208u, 2863853979u, 0, TAN_TOLERANCE, 0},
+{ 165, 3210046177u, 1018222907u, 3244621407u, 3090050495u, 3210046178u, 157136623u, 0, TAN_TOLERANCE, 0},
+{ 166, 1067680885u, 937732557u, 3200798890u, 2557898276u, 1067681505u, 608928501u, 0, TAN_TOLERANCE, 0},
+{ 167, 1078342316u, 130346162u, 3223590310u, 275568693u, 1071388364u, 1761655737u, 0, TAN_TOLERANCE, 0},
+{ 168, 1042898869u, 3807416441u, 1075961161u, 3706820266u, 1042898869u, 3807416441u, 0, TAN_TOLERANCE, 0},
+{ 169, 3216099005u, 1710131411u, 1078123323u, 1900790503u, 3216100881u, 1904744752u, 0, TAN_TOLERANCE, 0},
+{ 170, 3238819361u, 3420420033u, 3210844787u, 588423066u, 1070338117u, 444441192u, 0, TAN_TOLERANCE, 0},
+{ 171, 1049684114u, 1160162008u, 3246307879u, 4265764460u, 1049684114u, 1160162109u, 0, TAN_TOLERANCE, 0},
+{ 172, 1102543434u, 366653268u, 3188814424u, 466059202u, 3219690076u, 1152439596u, 0, TAN_TOLERANCE, 0},
+{ 173, 3226627739u, 1325936170u, 3221436876u, 680097612u, 3223591027u, 807326226u, 0, TAN_TOLERANCE, 0},
+{ 174, 3240391116u, 1827735934u, 3200554324u, 2875599271u, 3218949458u, 1564630365u, 0, TAN_TOLERANCE, 0},
+{ 175, 3191030402u, 3117037091u, 3239246636u, 15838845u, 3191030402u, 3117037091u, 0, TAN_TOLERANCE, 0},
+{ 176, 1051974004u, 749718883u, 3223587064u, 1523766569u, 1051974004u, 749721490u, 0, TAN_TOLERANCE, 0},
+{ 177, 1044833651u, 1966536294u, 3250158026u, 699164258u, 1044833651u, 1966536294u, 0, TAN_TOLERANCE, 0},
+{ 178, 1098048435u, 3759049394u, 1106085272u, 1183789499u, 1067725226u, 3300256125u, 0, TAN_TOLERANCE, 0},
+{ 179, 1081201623u, 1970107747u, 1095245453u, 2308233883u, 3219656964u, 1762316068u, 0, TAN_TOLERANCE, 0},
+{ 180, 1084756444u, 1491017852u, 1041444355u, 1723375725u, 3220665076u, 1131376736u, 0, TAN_TOLERANCE, 0},
+{ 181, 3216630070u, 1141349287u, 1097465301u, 3403438584u, 3216635871u, 3114581228u, 0, TAN_TOLERANCE, 0},
+{ 182, 3230571908u, 1711085243u, 3250239076u, 1377484108u, 1071707322u, 2074334604u, 0, TAN_TOLERANCE, 0},
+{ 183, 1098385019u, 2880275004u, 1084039594u, 1611394950u, 1072183089u, 1081655096u, 0, TAN_TOLERANCE, 0},
+{ 184, 3234221435u, 2626629370u, 1063771493u, 1499080813u, 1072448767u, 2519934791u, 0, TAN_TOLERANCE, 0},
+{ 185, 1055231263u, 3936262414u, 1103919063u, 3175668759u, 1055231263u, 3936475953u, 0, TAN_TOLERANCE, 0},
+{ 186, 3207981719u, 1270950554u, 3194616071u, 3680565379u, 3207981719u, 1500917084u, 0, TAN_TOLERANCE, 0},
+{ 187, 3208148223u, 1066985223u, 3221613219u, 4089383168u, 3208148223u, 1386557653u, 0, TAN_TOLERANCE, 0},
+{ 188, 3217058839u, 4017329311u, 3208334452u, 1667591498u, 3217064784u, 1269168733u, 0, TAN_TOLERANCE, 0},
+{ 189, 1088164157u, 3154656624u, 1061894279u, 3886344038u, 3223527257u, 636902076u, 0, TAN_TOLERANCE, 0},
+{ 190, 1050652945u, 977586119u, 3209762784u, 953839852u, 1050652945u, 977586782u, 0, TAN_TOLERANCE, 0},
+{ 191, 1104965247u, 143071571u, 3206165386u, 913097445u, 1083267508u, 670608201u, 0, TAN_TOLERANCE, 0},
+{ 192, 3190565456u, 1371169579u, 1057079837u, 2594818628u, 3190565456u, 1371169579u, 0, TAN_TOLERANCE, 0},
+{ 193, 3251793336u, 2259342224u, 3217432469u, 1824221478u, 1074871369u, 1846053325u, 0, TAN_TOLERANCE, 0},
+{ 194, 3246834775u, 1576604497u, 1079368611u, 185078728u, 3219323765u, 1214264042u, 0, TAN_TOLERANCE, 0},
+{ 195, 3221679427u, 444800035u, 3243343143u, 1734989302u, 1070734297u, 3140344392u, 0, TAN_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1073485690u, 2052392104u, 0, TAN_TOLERANCE, 0},
+{ 197, 3234695968u, 1941318385u, 1045807374u, 792193370u, 1071783226u, 3456402802u, 0, TAN_TOLERANCE, 0},
+{ 198, 3238299666u, 1299392207u, 3212131720u, 3205732280u, 1070843456u, 2640216013u, 0, TAN_TOLERANCE, 0},
+{ 199, 1098698804u, 3035093505u, 1052187689u, 3287702190u, 1072848938u, 3118895016u, 0, TAN_TOLERANCE, 0},
+{ 200, 3246676260u, 2160225215u, 1102624859u, 836655570u, 3216151840u, 2826603821u, 0, TAN_TOLERANCE, 0},
+{ 201, 1096723626u, 3360816360u, 3246176356u, 172860634u, 3223468834u, 2557955513u, 0, TAN_TOLERANCE, 0},
+{ 202, 1070995788u, 146831910u, 1051558014u, 2340722078u, 1071056230u, 1074959791u, 0, TAN_TOLERANCE, 0},
+{ 203, 3230416351u, 1603798153u, 3207725532u, 1099413093u, 1073450075u, 3789585571u, 0, TAN_TOLERANCE, 0},
+{ 204, 3246678378u, 2429340443u, 3190303581u, 3223770005u, 3222436475u, 2331667549u, 0, TAN_TOLERANCE, 0},
+{ 205, 1075882959u, 955542166u, 3230415151u, 275583938u, 3221134682u, 869863979u, 0, TAN_TOLERANCE, 0},
+{ 206, 1092971882u, 513397822u, 1090646554u, 2089321329u, 3218476915u, 4064660800u, 0, TAN_TOLERANCE, 0},
+{ 207, 3193169876u, 2782073372u, 1046063872u, 4023829068u, 3193169876u, 2782073373u, 0, TAN_TOLERANCE, 0},
+{ 208, 1098564822u, 3242223094u, 3194111199u, 4264674108u, 3219655919u, 2882209966u, 0, TAN_TOLERANCE, 0},
+{ 209, 3238510821u, 3506346169u, 1047020885u, 1742757458u, 1077178631u, 1129955170u, 0, TAN_TOLERANCE, 0},
+{ 210, 3192664477u, 1265459564u, 3193450280u, 3650514880u, 3192664477u, 1265459564u, 0, TAN_TOLERANCE, 0},
+{ 211, 1081755890u, 1525260440u, 3235452527u, 2612331392u, 3218875360u, 584541142u, 0, TAN_TOLERANCE, 0},
+{ 212, 3248668920u, 1263613754u, 3219096387u, 635677201u, 3228095705u, 607239893u, 0, TAN_TOLERANCE, 0},
+{ 213, 3206272087u, 4140947288u, 3200792376u, 2013265346u, 3206272087u, 4170374788u, 0, TAN_TOLERANCE, 0},
+{ 214, 3249974392u, 1912759945u, 3237045253u, 1351396825u, 1073520127u, 4107509282u, 0, TAN_TOLERANCE, 0},
+{ 215, 3248205162u, 1001433078u, 3206926643u, 2741676659u, 3223698549u, 697659170u, 0, TAN_TOLERANCE, 0},
+{ 216, 1080923606u, 1088945233u, 1085095743u, 3986114865u, 1073528810u, 2355327902u, 0, TAN_TOLERANCE, 0},
+{ 217, 3215734057u, 831239754u, 1099828675u, 3071308141u, 3215735929u, 3454732211u, 0, TAN_TOLERANCE, 0},
+{ 218, 3225834497u, 3473592372u, 1102759382u, 1309576357u, 3219754946u, 1779658178u, 0, TAN_TOLERANCE, 0},
+{ 219, 3251186706u, 2042340367u, 1091945628u, 2062772374u, 3221848449u, 173695336u, 0, TAN_TOLERANCE, 0},
+{ 220, 3194765687u, 1840632537u, 1096533424u, 807510337u, 3194765687u, 1840632544u, 0, TAN_TOLERANCE, 0},
+{ 221, 3231451722u, 144814872u, 3212698915u, 2282965697u, 3219929851u, 2085937887u, 0, TAN_TOLERANCE, 0},
+{ 222, 1071236430u, 2552499583u, 3229111426u, 1470130815u, 1071334047u, 1224989201u, 0, TAN_TOLERANCE, 0},
+{ 223, 3243093065u, 2858583811u, 1089760910u, 6360994u, 3222355264u, 4036068405u, 0, TAN_TOLERANCE, 0},
+{ 224, 3198264929u, 1614537194u, 1075198900u, 4088705365u, 3198264929u, 1614537652u, 0, TAN_TOLERANCE, 0},
+{ 225, 3250939070u, 3545570051u, 1065221325u, 1629217700u, 3218583691u, 3771335620u, 0, TAN_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 1073467220u, 1680674110u, 0, TAN_TOLERANCE, 0},
+{ 227, 3196802686u, 2406734491u, 1042055360u, 89226663u, 3196802686u, 2406734597u, 0, TAN_TOLERANCE, 0},
+{ 228, 3195751081u, 1618759139u, 3194723421u, 3888234802u, 3195751081u, 1618759165u, 0, TAN_TOLERANCE, 0},
+{ 229, 1055357248u, 3590035633u, 3212424262u, 2892456615u, 1055357248u, 3590311564u, 0, TAN_TOLERANCE, 0},
+{ 230, 3189943060u, 2431246964u, 3241512456u, 183850734u, 3189943060u, 2431246964u, 0, TAN_TOLERANCE, 0},
+{ 231, 1089501101u, 3088319870u, 3211544311u, 862225364u, 1072870485u, 1064431288u, 0, TAN_TOLERANCE, 0},
+{ 232, 3235294664u, 3495352775u, 1058576726u, 596957268u, 3219184426u, 1290282712u, 0, TAN_TOLERANCE, 0},
+{ 233, 1046553348u, 1839214511u, 3205004060u, 1923240983u, 1046553348u, 1839214513u, 0, TAN_TOLERANCE, 0},
+{ 234, 1058073864u, 739619702u, 3223356436u, 2689885273u, 1058073864u, 746240258u, 0, TAN_TOLERANCE, 0},
+{ 235, 3200324971u, 2143376228u, 1098306332u, 3760236188u, 3200324971u, 2143382876u, 0, TAN_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 1071844140u, 2465670249u, 0, TAN_TOLERANCE, 0},
+{ 237, 3214165989u, 2493598049u, 3194927008u, 1689107592u, 3214166163u, 1695445981u, 0, TAN_TOLERANCE, 0},
+{ 238, 3189989959u, 1578976988u, 1066368383u, 2117279163u, 3189989959u, 1578976988u, 0, TAN_TOLERANCE, 0},
+{ 239, 3222988111u, 3425290087u, 1098487295u, 1263412017u, 3219009618u, 3104355163u, 0, TAN_TOLERANCE, 0},
+{ 240, 3208432764u, 3635396812u, 1070999426u, 3965655689u, 3208432764u, 4157169065u, 0, TAN_TOLERANCE, 0},
+{ 241, 1060196346u, 2183973116u, 1101098363u, 1118613350u, 1060196346u, 2297325783u, 0, TAN_TOLERANCE, 0},
+{ 242, 3221946089u, 199516350u, 1078368488u, 164621458u, 3217972188u, 183700192u, 0, TAN_TOLERANCE, 0},
+{ 243, 3187706018u, 3570940805u, 3230316437u, 3596080877u, 3187706018u, 3570940805u, 0, TAN_TOLERANCE, 0},
+{ 244, 3208209565u, 980880313u, 1079833442u, 884465057u, 3208209565u, 1338566342u, 0, TAN_TOLERANCE, 0},
+{ 245, 1099977124u, 2558179220u, 1052873711u, 1233598120u, 1073082635u, 1345485298u, 0, TAN_TOLERANCE, 0},
+{ 246, 1047115221u, 1909994277u, 1085015978u, 2991527452u, 1047115221u, 1909994283u, 0, TAN_TOLERANCE, 0},
+{ 247, 1060855260u, 1680290941u, 1074309900u, 2943870846u, 1060855260u, 2128028309u, 0, TAN_TOLERANCE, 0},
+{ 248, 1059496132u, 1451927357u, 3228615456u, 1502585517u, 1059496132u, 1515203058u, 0, TAN_TOLERANCE, 0},
+{ 249, 3236211951u, 751136990u, 3230392165u, 3493275472u, 3221130863u, 2790236806u, 0, TAN_TOLERANCE, 0},
+{ 250, 1098365967u, 1209623292u, 3238056647u, 979495322u, 1071982382u, 3259751257u, 0, TAN_TOLERANCE, 0},
+{ 251, 3250424296u, 1717672108u, 1048120593u, 531240316u, 3217734469u, 151298977u, 0, TAN_TOLERANCE, 0},
+{ 252, 1054174923u, 3548721654u, 1086112947u, 3391817224u, 1054174923u, 3548774163u, 0, TAN_TOLERANCE, 0},
+{ 253, 1077836851u, 2758195125u, 1100880260u, 2028440924u, 3220536570u, 2251016583u, 0, TAN_TOLERANCE, 0},
+{ 254, 1084223893u, 2750123373u, 3232200256u, 1086294931u, 3220157217u, 2263350424u, 0, TAN_TOLERANCE, 0},
+{ 255, 1043958672u, 2986160931u, 1076097908u, 2540046258u, 1043958672u, 2986160931u, 0, TAN_TOLERANCE, 0},
+{ 256, 3235476602u, 451471221u, 1064816262u, 4187644495u, 3216848923u, 3904061022u, 0, TAN_TOLERANCE, 0},
+{ 257, 1099460228u, 2439500162u, 1065280276u, 1979490284u, 3218731225u, 4259537411u, 0, TAN_TOLERANCE, 0},
+{ 258, 1040415832u, 2283342035u, 1078398157u, 1345997553u, 1040415832u, 2283342035u, 0, TAN_TOLERANCE, 0},
+{ 259, 3213249348u, 179066662u, 1103272172u, 1217337578u, 3213249405u, 3247146264u, 0, TAN_TOLERANCE, 0},
+{ 260, 3211562377u, 3779303391u, 3210023352u, 3115946280u, 3211562385u, 1965050538u, 0, TAN_TOLERANCE, 0},
+{ 261, 3192989874u, 286247089u, 1085153597u, 713645369u, 3192989874u, 286247089u, 0, TAN_TOLERANCE, 0},
+{ 262, 1093670500u, 1468283899u, 1042831668u, 2022736418u, 3219948625u, 3229834879u, 0, TAN_TOLERANCE, 0},
+{ 263, 1083139105u, 3305564080u, 1065483445u, 482392433u, 3220193301u, 2415443999u, 0, TAN_TOLERANCE, 0},
+{ 264, 3201695807u, 2256346551u, 3222430705u, 2071674991u, 3201695807u, 2256403348u, 0, TAN_TOLERANCE, 0},
+{ 265, 3204024695u, 2295269094u, 1084451053u, 2773103941u, 3204024695u, 2296690203u, 0, TAN_TOLERANCE, 0},
+{ 266, 1078173946u, 1482721827u, 1092243422u, 3125409590u, 1079271541u, 3804204308u, 0, TAN_TOLERANCE, 0},
+{ 267, 3221065973u, 1381740563u, 1071545057u, 2918235653u, 1074536667u, 3552963698u, 0, TAN_TOLERANCE, 0},
+{ 268, 3238715972u, 1105857967u, 3241990046u, 2703723225u, 3219526778u, 759389017u, 0, TAN_TOLERANCE, 0},
+{ 269, 1043015571u, 174689677u, 1079333374u, 3947057014u, 1043015571u, 174689677u, 0, TAN_TOLERANCE, 0},
+{ 270, 1090461859u, 2023082423u, 3242081486u, 1169047927u, 3217503114u, 3764937440u, 0, TAN_TOLERANCE, 0},
+{ 271, 1064525899u, 3742487766u, 1043425732u, 194972788u, 1064525909u, 1475115964u, 0, TAN_TOLERANCE, 0},
+{ 272, 3213791827u, 2136071361u, 3211529757u, 993675115u, 3213791976u, 1407302382u, 0, TAN_TOLERANCE, 0},
+{ 273, 3213663381u, 210772141u, 3241441539u, 580731413u, 3213663503u, 212614883u, 0, TAN_TOLERANCE, 0},
+{ 274, 1093840413u, 1751560711u, 1074522705u, 180987057u, 3219848371u, 2705574052u, 0, TAN_TOLERANCE, 0},
+{ 275, 1066754591u, 2552236599u, 1088658621u, 2112468655u, 1066754795u, 1399432567u, 0, TAN_TOLERANCE, 0},
+{ 276, 3189290617u, 1578223762u, 3224596567u, 2456166162u, 3189290617u, 1578223762u, 0, TAN_TOLERANCE, 0},
+{ 277, 1058506965u, 2110924310u, 1086207177u, 3161208323u, 1058506965u, 2128721607u, 0, TAN_TOLERANCE, 0},
+{ 278, 3231863394u, 2352173188u, 1079361728u, 4070222179u, 3227740382u, 336535156u, 0, TAN_TOLERANCE, 0},
+{ 279, 1101012904u, 2481562701u, 1090937016u, 3809489716u, 3217879385u, 3053665789u, 0, TAN_TOLERANCE, 0},
+{ 280, 3197002651u, 330905705u, 1086260896u, 90264431u, 3197002651u, 330905851u, 0, TAN_TOLERANCE, 0},
+{ 281, 1040729961u, 4162008079u, 3194387916u, 759522153u, 1040729961u, 4162008079u, 0, TAN_TOLERANCE, 0},
+{ 282, 1081015037u, 1839697482u, 3216442625u, 2211508949u, 3218526105u, 3638731460u, 0, TAN_TOLERANCE, 0},
+{ 283, 3249807211u, 3736863454u, 1063475914u, 3150741666u, 1072025981u, 971921172u, 0, TAN_TOLERANCE, 0},
+{ 284, 1060785883u, 4200269406u, 3236646101u, 1061812176u, 1060785884u, 303065114u, 0, TAN_TOLERANCE, 0},
+{ 285, 1080217979u, 106027290u, 3234978297u, 2245237549u, 3218102952u, 2504847414u, 0, TAN_TOLERANCE, 0},
+{ 286, 3246984334u, 2132131375u, 3250483427u, 3449276437u, 1069760767u, 1782102314u, 0, TAN_TOLERANCE, 0},
+{ 287, 1089388778u, 2334440944u, 1105423490u, 4004336184u, 1072291864u, 1404277520u, 0, TAN_TOLERANCE, 0},
+{ 288, 3218772704u, 4090088208u, 1042030013u, 3898658299u, 3218880206u, 3413233725u, 0, TAN_TOLERANCE, 0},
+{ 289, 3207908064u, 2272831437u, 3253082595u, 2639188641u, 3207908064u, 2469202778u, 0, TAN_TOLERANCE, 0},
+{ 290, 1054766684u, 1856594168u, 3189515294u, 4101853676u, 1054766684u, 1856744929u, 0, TAN_TOLERANCE, 0},
+{ 291, 1076012412u, 2211699255u, 3195060344u, 3865018604u, 3216643832u, 2588986406u, 0, TAN_TOLERANCE, 0},
+{ 292, 3242767010u, 996259334u, 3241496889u, 3782673116u, 3218271270u, 734706536u, 0, TAN_TOLERANCE, 0},
+{ 293, 1099130747u, 3840380763u, 1048674041u, 550040067u, 1073016227u, 1715888406u, 0, TAN_TOLERANCE, 0},
+{ 294, 3251419593u, 95874100u, 3237232828u, 2645647822u, 1074518514u, 88770385u, 0, TAN_TOLERANCE, 0},
+{ 295, 1043665640u, 3441419500u, 3252367038u, 876710419u, 1043665640u, 3441419500u, 0, TAN_TOLERANCE, 0},
+{ 296, 3238593552u, 2560836004u, 3199616543u, 1180840586u, 3220307943u, 3656831580u, 0, TAN_TOLERANCE, 0},
+{ 297, 3221602966u, 2218230392u, 3227485787u, 3947214579u, 1071428530u, 946243539u, 0, TAN_TOLERANCE, 0},
+{ 298, 1079539654u, 1447312532u, 1081476588u, 780366847u, 1071693521u, 4116479669u, 0, TAN_TOLERANCE, 0},
+{ 299, 1072569643u, 2842113832u, 3216156731u, 225159029u, 1073083620u, 4179140584u, 0, TAN_TOLERANCE, 0},
+{ 300, 1098117193u, 1601981129u, 3234628869u, 2236538344u, 1070461966u, 3658006630u, 0, TAN_TOLERANCE, 0},
+{ 301, 1085173524u, 2194185737u, 3242362684u, 87913366u, 3215054618u, 3308265431u, 0, TAN_TOLERANCE, 0},
+{ 302, 3199083880u, 1346862963u, 1077836259u, 3604666660u, 3199083880u, 1346865246u, 0, TAN_TOLERANCE, 0},
+{ 303, 3212255979u, 3115209742u, 1099332326u, 1325101950u, 3212255995u, 3657260390u, 0, TAN_TOLERANCE, 0},
+{ 304, 3224546042u, 3889223100u, 1053247613u, 3371396923u, 1070039848u, 636984675u, 0, TAN_TOLERANCE, 0},
+{ 305, 3220477868u, 4163120793u, 1075022670u, 1387631215u, 3221974641u, 4043171840u, 0, TAN_TOLERANCE, 0},
+{ 306, 3205481779u, 1532426189u, 1063168268u, 3397022615u, 3205481779u, 1543371882u, 0, TAN_TOLERANCE, 0},
+{ 307, 3201033321u, 89324166u, 1079206060u, 3429424710u, 3201033321u, 89353099u, 0, TAN_TOLERANCE, 0},
+{ 308, 3192325102u, 747591401u, 1072238381u, 2803213904u, 3192325102u, 747591401u, 0, TAN_TOLERANCE, 0},
+{ 309, 1091113780u, 271904221u, 1044258318u, 1858545114u, 1076116261u, 919587220u, 0, TAN_TOLERANCE, 0},
+{ 310, 3228068914u, 314958082u, 3249912496u, 2966213175u, 3219521784u, 4007754846u, 0, TAN_TOLERANCE, 0},
+{ 311, 3197179414u, 3119528953u, 3217179014u, 2908718240u, 3197179414u, 3119529057u, 0, TAN_TOLERANCE, 0},
+{ 312, 3242467576u, 2018361566u, 1100926600u, 3985805054u, 1073825020u, 890088773u, 0, TAN_TOLERANCE, 0},
+{ 313, 1070132580u, 409584884u, 3239758947u, 755795129u, 1070153550u, 1757091400u, 0, TAN_TOLERANCE, 0},
+{ 314, 1075772446u, 1819156379u, 3251342302u, 2982669005u, 1076001886u, 3576153658u, 0, TAN_TOLERANCE, 0},
+{ 315, 1101563433u, 2080534280u, 3188254060u, 449171797u, 3225174135u, 2677838542u, 0, TAN_TOLERANCE, 0},
+{ 316, 1095956900u, 168744837u, 3214950009u, 1322217822u, 3220353572u, 894592656u, 0, TAN_TOLERANCE, 0},
+{ 317, 3254226900u, 3250487255u, 1062120700u, 1876195180u, 3221399760u, 1926104126u, 0, TAN_TOLERANCE, 0},
+{ 318, 3226343480u, 1336400247u, 1098057903u, 3314079581u, 3219222587u, 3150545361u, 0, TAN_TOLERANCE, 0},
+{ 319, 3203678820u, 265025555u, 1063854282u, 3779482256u, 3203678820u, 265735124u, 0, TAN_TOLERANCE, 0},
+{ 320, 1067300501u, 887044257u, 1054789618u, 2732056261u, 1067301047u, 3919915468u, 0, TAN_TOLERANCE, 0},
+{ 321, 1050106742u, 4027115185u, 3191764868u, 2940199511u, 1050106742u, 4027115450u, 0, TAN_TOLERANCE, 0},
+{ 322, 3202500155u, 2875684421u, 3227459837u, 2251967570u, 3202500155u, 2875814613u, 0, TAN_TOLERANCE, 0},
+{ 323, 1063244412u, 284173546u, 3238823679u, 3557800647u, 1063244414u, 2957655509u, 0, TAN_TOLERANCE, 0},
+{ 324, 1101458560u, 3147771266u, 3220110464u, 2933364246u, 1072229904u, 3258427445u, 0, TAN_TOLERANCE, 0},
+{ 325, 1064853160u, 3366183281u, 3234870843u, 537442654u, 1064853179u, 2700966725u, 0, TAN_TOLERANCE, 0},
+{ 326, 3244118788u, 2529029548u, 3249882819u, 3781513577u, 3222066350u, 1805132578u, 0, TAN_TOLERANCE, 0},
+{ 327, 3213436354u, 1080845539u, 3206760016u, 911778687u, 3213436437u, 368321244u, 0, TAN_TOLERANCE, 0},
+{ 328, 3191951036u, 469586759u, 1091830022u, 3080528840u, 3191951036u, 469586759u, 0, TAN_TOLERANCE, 0},
+{ 329, 1080249104u, 2863108169u, 3225605506u, 2508274250u, 1071359258u, 3991537001u, 0, TAN_TOLERANCE, 0},
+{ 330, 3210826984u, 4080017377u, 3206492941u, 1470284690u, 3210826986u, 2768909464u, 0, TAN_TOLERANCE, 0},
+{ 331, 3207120390u, 3867917386u, 1102054928u, 3504746045u, 3207120390u, 3950952741u, 0, TAN_TOLERANCE, 0},
+{ 332, 1064522279u, 2962134101u, 3244741577u, 3390537350u, 1064522289u, 347807104u, 0, TAN_TOLERANCE, 0},
+{ 333, 1088201813u, 1702237980u, 1071598971u, 1102587474u, 3219437889u, 1844190515u, 0, TAN_TOLERANCE, 0},
+{ 334, 3202970118u, 2180218657u, 3211592260u, 1206527853u, 3202970118u, 2180570126u, 0, TAN_TOLERANCE, 0},
+{ 335, 3197084744u, 394130786u, 3242511482u, 2437699868u, 3197084744u, 394130951u, 0, TAN_TOLERANCE, 0},
+{ 336, 1044237059u, 849581558u, 3252006507u, 2008614943u, 1044237059u, 849581558u, 0, TAN_TOLERANCE, 0},
+{ 337, 3210140014u, 3128971673u, 3249137531u, 2773583059u, 3210140015u, 3003661168u, 0, TAN_TOLERANCE, 0},
+{ 338, 1085029866u, 590727700u, 3248651761u, 2183878539u, 3220819737u, 141721044u, 0, TAN_TOLERANCE, 0},
+{ 339, 1101098629u, 820687580u, 3208143496u, 1402434664u, 3218501871u, 3201848623u, 0, TAN_TOLERANCE, 0},
+{ 340, 3252290835u, 1873709254u, 3245167989u, 44275991u, 1072391033u, 398964073u, 0, TAN_TOLERANCE, 0},
+{ 341, 3189668753u, 1174874204u, 3208263730u, 2360372288u, 3189668753u, 1174874204u, 0, TAN_TOLERANCE, 0},
+{ 342, 1103854676u, 937573440u, 3208953761u, 211240241u, 3220217779u, 1087740507u, 0, TAN_TOLERANCE, 0},
+{ 343, 3243548934u, 2469774991u, 1043117070u, 3380071805u, 1072701508u, 2365704893u, 0, TAN_TOLERANCE, 0},
+{ 344, 1058121042u, 442507560u, 3254252803u, 3257889649u, 1058121042u, 450009292u, 0, TAN_TOLERANCE, 0},
+{ 345, 1068850520u, 1854921625u, 1049810168u, 2729627545u, 1068853780u, 531700973u, 0, TAN_TOLERANCE, 0},
+{ 346, 3254712629u, 4001809575u, 3240128649u, 278261523u, 3219319223u, 2548086449u, 0, TAN_TOLERANCE, 0},
+{ 347, 1087224694u, 1793907966u, 3238955714u, 398859249u, 3221668828u, 2845828017u, 0, TAN_TOLERANCE, 0},
+{ 348, 3200952547u, 2511916952u, 3219195283u, 1697158299u, 3200952547u, 2511942216u, 0, TAN_TOLERANCE, 0},
+{ 349, 1069985548u, 3230931724u, 3243897690u, 3508781585u, 1070001309u, 2120433746u, 0, TAN_TOLERANCE, 0},
+{ 350, 1103847606u, 1674254897u, 1046547577u, 217148561u, 3219239077u, 1170656967u, 0, TAN_TOLERANCE, 0},
+{ 351, 3211263954u, 3275604304u, 3194840159u, 2991205850u, 3211263959u, 1126519421u, 0, TAN_TOLERANCE, 0},
+{ 352, 3195249375u, 3509997278u, 3248888030u, 3897986511u, 3195249375u, 3509997288u, 0, TAN_TOLERANCE, 0},
+{ 353, 1047182435u, 2156824613u, 1042295665u, 1239257646u, 1047182435u, 2156824619u, 0, TAN_TOLERANCE, 0},
+{ 354, 3213264085u, 1073153314u, 3250031627u, 2567234990u, 3213264144u, 3128333673u, 0, TAN_TOLERANCE, 0},
+{ 355, 3190593412u, 4261696995u, 3197784432u, 323702024u, 3190593412u, 4261696995u, 0, TAN_TOLERANCE, 0},
+{ 356, 3243690997u, 4075177615u, 3202791065u, 1919006082u, 3223031388u, 2896528219u, 0, TAN_TOLERANCE, 0},
+{ 357, 3239270013u, 386429966u, 1086504491u, 3698826164u, 1076373957u, 4112820482u, 0, TAN_TOLERANCE, 0},
+{ 358, 1078327190u, 1681986446u, 3194985869u, 3072950140u, 3215497965u, 2409206796u, 0, TAN_TOLERANCE, 0},
+{ 359, 3217311933u, 3719038997u, 1055433962u, 3331415058u, 3217323174u, 2513459184u, 0, TAN_TOLERANCE, 0},
+{ 360, 1060749713u, 2420250111u, 3238002206u, 1928661079u, 1060749713u, 2793500608u, 0, TAN_TOLERANCE, 0},
+{ 361, 1081914210u, 3679866727u, 3227386672u, 1273835792u, 1071850648u, 1052972091u, 0, TAN_TOLERANCE, 0},
+{ 362, 1041622738u, 2682092368u, 3234222284u, 1325425811u, 1041622738u, 2682092368u, 0, TAN_TOLERANCE, 0},
+{ 363, 1056312613u, 4175172697u, 3208346191u, 2130706153u, 1056312613u, 4176087705u, 0, TAN_TOLERANCE, 0},
+{ 364, 1092089624u, 1200784450u, 1083605096u, 1248595607u, 1071297510u, 2267447579u, 0, TAN_TOLERANCE, 0},
+{ 365, 3213890863u, 1897285171u, 3251296075u, 944966123u, 3213890950u, 492091915u, 0, TAN_TOLERANCE, 0},
+{ 366, 3241371250u, 2270747330u, 3230692631u, 422503284u, 1075781685u, 3800245394u, 0, TAN_TOLERANCE, 0},
+{ 367, 1084120037u, 2857564741u, 1075647403u, 3308906709u, 1076086650u, 4264754170u, 0, TAN_TOLERANCE, 0},
+{ 368, 3203475098u, 1380066948u, 3232612906u, 2613634294u, 3203475098u, 1380497446u, 0, TAN_TOLERANCE, 0},
+{ 369, 1063890856u, 4022784584u, 1060483857u, 3264056381u, 1063890862u, 1946986717u, 0, TAN_TOLERANCE, 0},
+{ 370, 1044637404u, 1778509100u, 3213146285u, 2665833973u, 1044637404u, 1778509100u, 0, TAN_TOLERANCE, 0},
+{ 371, 3216727300u, 1859175955u, 1079949560u, 4258450607u, 3216734161u, 1076419177u, 0, TAN_TOLERANCE, 0},
+{ 372, 1048277388u, 4128020197u, 1076266146u, 4122840980u, 1048277388u, 4128020224u, 0, TAN_TOLERANCE, 0},
+{ 373, 3193183163u, 2454653987u, 3229487005u, 2977478685u, 3193183163u, 2454653988u, 0, TAN_TOLERANCE, 0},
+{ 374, 3253556483u, 1355181872u, 1095308770u, 436846481u, 1070455744u, 2783739970u, 0, TAN_TOLERANCE, 0},
+{ 375, 3246605302u, 2592856453u, 3247825559u, 3195234082u, 1072158682u, 4191053951u, 0, TAN_TOLERANCE, 0},
+{ 376, 3222118023u, 3554670043u, 1091621009u, 3321236467u, 3219396934u, 1126482929u, 0, TAN_TOLERANCE, 0},
+{ 377, 1069012833u, 1936670355u, 1095715713u, 2958468553u, 1069017366u, 1662345773u, 0, TAN_TOLERANCE, 0},
+{ 378, 3192291109u, 2960339502u, 1098808013u, 1044068983u, 3192291109u, 2960339502u, 0, TAN_TOLERANCE, 0},
+{ 379, 3196691185u, 4093388677u, 1095478112u, 1735930261u, 3196691185u, 4093388765u, 0, TAN_TOLERANCE, 0},
+{ 380, 1091040302u, 1807398746u, 3195743135u, 4261616162u, 3218599037u, 2355104691u, 0, TAN_TOLERANCE, 0},
+{ 381, 3209294194u, 3250576797u, 1059002384u, 3043079652u, 3209294195u, 481373147u, 0, TAN_TOLERANCE, 0},
+{ 382, 1069207109u, 666051428u, 3208765404u, 1912684117u, 1069213557u, 3613017928u, 0, TAN_TOLERANCE, 0},
+{ 383, 1103487420u, 1949030179u, 1096388934u, 896459246u, 3220083347u, 1401180812u, 0, TAN_TOLERANCE, 0},
+{ 384, 1054300653u, 622499767u, 1066707637u, 1490260486u, 1054300653u, 622567676u, 0, TAN_TOLERANCE, 0},
+{ 385, 1106688493u, 1490616165u, 3251242436u, 795675736u, 1071299621u, 1833357839u, 0, TAN_TOLERANCE, 0},
+{ 386, 1080943896u, 3662877092u, 3234317146u, 3200513112u, 1071312158u, 2927807819u, 0, TAN_TOLERANCE, 0},
+{ 387, 1084088786u, 1356101968u, 3236536816u, 3062844611u, 3220131839u, 1020215585u, 0, TAN_TOLERANCE, 0},
+{ 388, 3219922640u, 2284484846u, 3219498359u, 3240896015u, 3220393550u, 2961364171u, 0, TAN_TOLERANCE, 0},
+{ 389, 3235759689u, 494503287u, 1092811254u, 142673998u, 1066221278u, 644259700u, 0, TAN_TOLERANCE, 0},
+{ 390, 3252125916u, 3394882641u, 3225306538u, 364852125u, 1072736225u, 2528701453u, 0, TAN_TOLERANCE, 0},
+{ 391, 3225261763u, 193885269u, 1088149839u, 1359805831u, 3222178190u, 3117314156u, 0, TAN_TOLERANCE, 0},
+{ 392, 3200484782u, 592580907u, 3199560872u, 3086438952u, 3200484782u, 592590827u, 0, TAN_TOLERANCE, 0},
+{ 393, 1059518664u, 1778008540u, 1049064687u, 73581647u, 1059518664u, 1844212540u, 0, TAN_TOLERANCE, 0},
+{ 394, 3246733598u, 233240285u, 1081923320u, 2710903921u, 1076444640u, 2943138915u, 0, TAN_TOLERANCE, 0},
+{ 395, 1069513767u, 3719878805u, 1079866720u, 3615458228u, 1069524234u, 4006435562u, 0, TAN_TOLERANCE, 0},
+{ 396, 3221194724u, 3647632375u, 3247225271u, 3839959621u, 1073933717u, 2553172396u, 0, TAN_TOLERANCE, 0},
+{ 397, 1103401096u, 2232210456u, 3235434773u, 224271737u, 3219565171u, 2155865246u, 0, TAN_TOLERANCE, 0},
+{ 398, 3193003684u, 2134662911u, 3190390590u, 4239009051u, 3193003684u, 2134662911u, 0, TAN_TOLERANCE, 0},
+{ 399, 1080526145u, 2305279897u, 1077668039u, 1854523320u, 3218473959u, 1086770027u, 0, TAN_TOLERANCE, 0},
+{ 400, 3219864259u, 538224650u, 3206153057u, 1379649610u, 3220324172u, 4086099737u, 0, TAN_TOLERANCE, 0},
+{ 401, 3196410507u, 3683897920u, 3244167599u, 3647579469u, 3196410507u, 3683897971u, 0, TAN_TOLERANCE, 0},
+{ 402, 1090280933u, 2694093608u, 1042775347u, 598406111u, 3223377708u, 629310991u, 0, TAN_TOLERANCE, 0},
+{ 403, 3211635392u, 872706833u, 1084802480u, 2200602798u, 3211635400u, 3018747109u, 0, TAN_TOLERANCE, 0},
+{ 404, 1042339597u, 904146293u, 1060867322u, 1729685598u, 1042339597u, 904146293u, 0, TAN_TOLERANCE, 0},
+{ 405, 3195694970u, 1894173462u, 3232800651u, 191960416u, 3195694970u, 1894173486u, 0, TAN_TOLERANCE, 0},
+{ 406, 1091225343u, 3521028551u, 1054522089u, 3287274359u, 1075379070u, 2589593036u, 0, TAN_TOLERANCE, 0},
+{ 407, 1095386964u, 959640601u, 3201578263u, 4136915018u, 1071816287u, 2768052123u, 0, TAN_TOLERANCE, 0},
+{ 408, 1064005451u, 1553716379u, 1106027987u, 984725765u, 1064005458u, 358714987u, 0, TAN_TOLERANCE, 0},
+{ 409, 3238832641u, 2287646644u, 3240329321u, 2276183378u, 3220726984u, 1232223276u, 0, TAN_TOLERANCE, 0},
+{ 410, 1068209174u, 3940225170u, 3199544434u, 997572161u, 1068210924u, 3866659980u, 0, TAN_TOLERANCE, 0},
+{ 411, 3212768361u, 36116288u, 3206886566u, 4196602670u, 3212768399u, 2705633912u, 0, TAN_TOLERANCE, 0},
+{ 412, 3241695853u, 3550227562u, 3207257983u, 2747744117u, 1068532712u, 2849678857u, 0, TAN_TOLERANCE, 0},
+{ 413, 1104236126u, 507130047u, 1048359321u, 3229888373u, 1075934101u, 170837419u, 0, TAN_TOLERANCE, 0},
+{ 414, 3222996778u, 2210969014u, 1081031001u, 1946786091u, 3219155104u, 2257647455u, 0, TAN_TOLERANCE, 0},
+{ 415, 3236306990u, 4059150589u, 3189759234u, 1177045799u, 1072876040u, 2482392566u, 0, TAN_TOLERANCE, 0},
+{ 416, 1093103612u, 2664812822u, 1050343198u, 2034180320u, 1075572080u, 1506141174u, 0, TAN_TOLERANCE, 0},
+{ 417, 3213779117u, 1175750283u, 3235559706u, 1424491340u, 3213779263u, 1242749298u, 0, TAN_TOLERANCE, 0},
+{ 418, 3213904193u, 1630036121u, 3231972785u, 3195479448u, 3213904283u, 1644097468u, 0, TAN_TOLERANCE, 0},
+{ 419, 1090429875u, 2527029044u, 1046927050u, 4000723255u, 3221257439u, 2628398620u, 0, TAN_TOLERANCE, 0},
+{ 420, 1085208677u, 3335703647u, 3237349676u, 3869440059u, 3219201429u, 3510636886u, 0, TAN_TOLERANCE, 0},
+{ 421, 1091433848u, 3888398377u, 3196041693u, 1290567220u, 3221736636u, 3727668451u, 0, TAN_TOLERANCE, 0},
+{ 422, 1066679070u, 3242451480u, 3248384948u, 707431021u, 1066679243u, 1240900922u, 0, TAN_TOLERANCE, 0},
+{ 423, 1083230509u, 2739665123u, 1060777905u, 1733073225u, 3217080313u, 3809469110u, 0, TAN_TOLERANCE, 0},
+{ 424, 1078517061u, 1297274853u, 3208848704u, 3341639139u, 3219327748u, 2265747130u, 0, TAN_TOLERANCE, 0},
+{ 425, 1046570941u, 2228057309u, 1084318902u, 1317851136u, 1046570941u, 2228057311u, 0, TAN_TOLERANCE, 0},
+{ 426, 1088255327u, 270039934u, 3241414679u, 3063626339u, 3216402439u, 1024991753u, 0, TAN_TOLERANCE, 0},
+{ 427, 3219178350u, 83062251u, 3211262173u, 2659016437u, 3219291255u, 480675725u, 0, TAN_TOLERANCE, 0},
+{ 428, 1095743886u, 3833539373u, 3206667189u, 1567476111u, 1072080952u, 3686857265u, 0, TAN_TOLERANCE, 0},
+{ 429, 3205195072u, 2382776852u, 3249232579u, 1546622468u, 3205195072u, 2389794914u, 0, TAN_TOLERANCE, 0},
+{ 430, 1085536439u, 1714300821u, 1104130938u, 4167591598u, 1074883815u, 2402017247u, 0, TAN_TOLERANCE, 0},
+{ 431, 1051092760u, 2798720100u, 1086978789u, 449990704u, 1051092760u, 2798721037u, 0, TAN_TOLERANCE, 0},
+{ 432, 3231198415u, 4039516226u, 3244344107u, 4272932619u, 3225414740u, 1989232767u, 0, TAN_TOLERANCE, 0},
+{ 433, 3222708441u, 1683007544u, 1091105663u, 3805494321u, 1072112688u, 1057460259u, 0, TAN_TOLERANCE, 0},
+{ 434, 3220852948u, 2072627412u, 1094383324u, 3394151662u, 1076559907u, 1870123512u, 0, TAN_TOLERANCE, 0},
+{ 435, 3220570024u, 1120106427u, 3223631624u, 3404608264u, 3222546600u, 2319235113u, 0, TAN_TOLERANCE, 0},
+{ 436, 1097859997u, 559918757u, 3205077053u, 908100198u, 1073861320u, 484074424u, 0, TAN_TOLERANCE, 0},
+{ 437, 1042677918u, 2026673913u, 3244833635u, 2844573214u, 1042677918u, 2026673913u, 0, TAN_TOLERANCE, 0},
+{ 438, 3254567259u, 3946837259u, 3234993796u, 3850406820u, 1071188185u, 191486672u, 0, TAN_TOLERANCE, 0},
+{ 439, 1057479809u, 3139330994u, 1046133568u, 1539650690u, 1057479809u, 3143968281u, 0, TAN_TOLERANCE, 0},
+{ 440, 3236705500u, 1554593884u, 3228899878u, 2813752562u, 1072433226u, 4063726012u, 0, TAN_TOLERANCE, 0},
+{ 441, 1056505004u, 3804703138u, 1072931071u, 2053677923u, 1056505004u, 3806034394u, 0, TAN_TOLERANCE, 0},
+{ 442, 3244864299u, 289355864u, 1078453818u, 2143066338u, 1071978047u, 2504678044u, 0, TAN_TOLERANCE, 0},
+{ 443, 3203939880u, 2157691971u, 1106629150u, 110806409u, 3203939880u, 2158907786u, 0, TAN_TOLERANCE, 0},
+{ 444, 1082157019u, 3570399481u, 1085637605u, 180265334u, 1071014074u, 1108110341u, 0, TAN_TOLERANCE, 0},
+{ 445, 3200980182u, 558779875u, 3202046748u, 2338464653u, 3200980182u, 558806357u, 0, TAN_TOLERANCE, 0},
+{ 446, 1045705464u, 1703969219u, 3229797258u, 1417521063u, 1045705464u, 1703969220u, 0, TAN_TOLERANCE, 0},
+{ 447, 3237782261u, 3917440951u, 1051668894u, 3736066983u, 3220361662u, 3501153891u, 0, TAN_TOLERANCE, 0},
+{ 448, 1064752080u, 3106613409u, 1066627453u, 2735392257u, 1064752096u, 910406802u, 0, TAN_TOLERANCE, 0},
+{ 449, 1065665372u, 2229777605u, 1065061963u, 2405869925u, 1065665419u, 608228727u, 0, TAN_TOLERANCE, 0},
+{ 450, 3239463229u, 3967957902u, 1057416138u, 3459188071u, 3219968678u, 452000557u, 0, TAN_TOLERANCE, 0},
+{ 451, 1068639210u, 3699016825u, 3249713090u, 796144848u, 1068641204u, 2916876063u, 0, TAN_TOLERANCE, 0},
+{ 452, 3228816396u, 3285165564u, 3211948811u, 401510871u, 1068004951u, 4119011697u, 0, TAN_TOLERANCE, 0},
+{ 453, 1094257658u, 634857910u, 3199607513u, 914218057u, 3218354966u, 974404261u, 0, TAN_TOLERANCE, 0},
+{ 454, 1083743336u, 2030735578u, 3233855943u, 965677531u, 1073910531u, 785127245u, 0, TAN_TOLERANCE, 0},
+{ 455, 1079556815u, 3957229084u, 1051050470u, 3123776651u, 1077427671u, 2842011737u, 0, TAN_TOLERANCE, 0},
+{ 456, 3221863333u, 162122081u, 3239376395u, 108064594u, 3216195190u, 870993357u, 0, TAN_TOLERANCE, 0},
+{ 457, 3237271786u, 869031839u, 3225020876u, 1344301606u, 1073250300u, 2630856992u, 0, TAN_TOLERANCE, 0},
+{ 458, 3214433474u, 946696117u, 3231825228u, 1700703647u, 3214433775u, 2279568879u, 0, TAN_TOLERANCE, 0},
+{ 459, 1075492875u, 3394168074u, 1076939786u, 1666995668u, 1071303797u, 542229427u, 0, TAN_TOLERANCE, 0},
+{ 460, 3208774795u, 2488789804u, 3238508333u, 1506943664u, 3208774795u, 2999907289u, 0, TAN_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1073659779u, 84316650u, 0, TAN_TOLERANCE, 0},
+{ 462, 3219934542u, 1244307192u, 3191297711u, 2540916692u, 3220408266u, 2332373750u, 0, TAN_TOLERANCE, 0},
+{ 463, 3200062692u, 2871645739u, 3239081581u, 1440249115u, 3200062692u, 2871653937u, 0, TAN_TOLERANCE, 0},
+{ 464, 1068350633u, 1231934926u, 3236746788u, 603977748u, 1068352827u, 2493929906u, 0, TAN_TOLERANCE, 0},
+{ 465, 3195449689u, 2386312545u, 1063169277u, 2715234268u, 3195449689u, 2386312560u, 0, TAN_TOLERANCE, 0},
+{ 466, 1087803418u, 915867083u, 1046790892u, 3347417612u, 1073825687u, 4247788838u, 0, TAN_TOLERANCE, 0},
+{ 467, 1105984188u, 3553288373u, 1065698616u, 2906680663u, 1072200540u, 3878244721u, 0, TAN_TOLERANCE, 0},
+{ 468, 1045506226u, 2342364630u, 1051356723u, 4019093203u, 1045506226u, 2342364630u, 0, TAN_TOLERANCE, 0},
+{ 469, 3201169162u, 2911548084u, 1105282515u, 2476735795u, 3201169162u, 2911583958u, 0, TAN_TOLERANCE, 0},
+{ 470, 1050472772u, 1836216409u, 1101062307u, 2519592554u, 1050472772u, 1836216914u, 0, TAN_TOLERANCE, 0},
+{ 471, 1070178161u, 1235369496u, 3222946447u, 668087854u, 1070200956u, 984903311u, 0, TAN_TOLERANCE, 0},
+{ 472, 3208554596u, 2981820811u, 1059838516u, 2845580478u, 3208554596u, 3611299598u, 0, TAN_TOLERANCE, 0},
+{ 473, 3193931414u, 1565550570u, 3217165795u, 4162017137u, 3193931414u, 1565550573u, 0, TAN_TOLERANCE, 0},
+{ 474, 3237251378u, 2808968027u, 1055630096u, 1782326814u, 1073199382u, 3093545191u, 0, TAN_TOLERANCE, 0},
+{ 475, 1053576974u, 1492622658u, 3216653077u, 3972512122u, 1053576974u, 1492652906u, 0, TAN_TOLERANCE, 0},
+{ 476, 3222171679u, 2722693603u, 3227814791u, 3169731970u, 3219717982u, 2347297495u, 0, TAN_TOLERANCE, 0},
+{ 477, 3217906631u, 899763203u, 3207606001u, 2804747833u, 3217941096u, 1292535038u, 0, TAN_TOLERANCE, 0},
+{ 478, 3230670325u, 3789058912u, 3228095081u, 4135937628u, 3220946737u, 3788028633u, 0, TAN_TOLERANCE, 0},
+{ 479, 1060199382u, 1682808307u, 3206960335u, 232877759u, 1060199382u, 1797073325u, 0, TAN_TOLERANCE, 0},
+{ 480, 3242091486u, 2851963139u, 3246852961u, 2590862592u, 1071899939u, 3363220171u, 0, TAN_TOLERANCE, 0},
+{ 481, 1081200406u, 2422232642u, 3234779662u, 290458310u, 3220569877u, 2524572923u, 0, TAN_TOLERANCE, 0},
+{ 482, 3210671078u, 1082582386u, 1075605675u, 2602133689u, 3210671080u, 2857813414u, 0, TAN_TOLERANCE, 0},
+{ 483, 3239818611u, 1789635787u, 1059414278u, 1048286093u, 1074416318u, 2900047215u, 0, TAN_TOLERANCE, 0},
+{ 484, 1098330542u, 231339448u, 1055573265u, 504907415u, 3215743938u, 3288233724u, 0, TAN_TOLERANCE, 0},
+{ 485, 1063211461u, 1153251200u, 3204617090u, 1772013857u, 1063211463u, 3301239304u, 0, TAN_TOLERANCE, 0},
+{ 486, 1099551055u, 1082898276u, 3212089272u, 1449080862u, 3218613781u, 3243588953u, 0, TAN_TOLERANCE, 0},
+{ 487, 1086008285u, 3177299045u, 1058862813u, 809400815u, 1071222953u, 702551442u, 0, TAN_TOLERANCE, 0},
+{ 488, 3230854550u, 1924429710u, 1056464743u, 3349283177u, 1074313482u, 3011874043u, 0, TAN_TOLERANCE, 0},
+{ 489, 3245473391u, 42238036u, 1042379500u, 2113559863u, 1073052939u, 1170520627u, 0, TAN_TOLERANCE, 0},
+{ 490, 1064761243u, 3304403230u, 3217556703u, 58952646u, 1064761259u, 2338066714u, 0, TAN_TOLERANCE, 0},
+{ 491, 3212669530u, 1645486982u, 3224301095u, 3636267471u, 3212669563u, 2707928865u, 0, TAN_TOLERANCE, 0},
+{ 492, 1062762009u, 619402181u, 3235208235u, 557360557u, 1062762010u, 1440296348u, 0, TAN_TOLERANCE, 0},
+{ 493, 3238238394u, 110029735u, 1046937383u, 984375729u, 1069607562u, 1046851138u, 0, TAN_TOLERANCE, 0},
+{ 494, 3189496738u, 4063688092u, 3203235744u, 1049950343u, 3189496738u, 4063688092u, 0, TAN_TOLERANCE, 0},
+{ 495, 1062350619u, 650996069u, 1054971928u, 3953359826u, 1062350619u, 2752584734u, 0, TAN_TOLERANCE, 0},
+{ 496, 3227055805u, 66926332u, 1090561839u, 1379780888u, 1072277043u, 4160526258u, 0, TAN_TOLERANCE, 0},
+{ 497, 3233453307u, 2803378256u, 1086057989u, 498534626u, 3218298031u, 1208122603u, 0, TAN_TOLERANCE, 0},
+{ 498, 1082618553u, 2846400785u, 1047142525u, 1375153550u, 3219225392u, 1107778179u, 0, TAN_TOLERANCE, 0},
+{ 499, 1044581201u, 2869128958u, 1070972315u, 4246440273u, 1044581201u, 2869128958u, 0, TAN_TOLERANCE, 0},
+{ 500, 1051832506u, 3112381207u, 1044430965u, 3981604561u, 1051832506u, 3112383052u, 0, TAN_TOLERANCE, 0},
+{ 501, 3231254997u, 243303420u, 1093735824u, 1575581926u, 3218083448u, 3006576476u, 0, TAN_TOLERANCE, 0},
+{ 502, 3239137997u, 3218865041u, 3204803496u, 3840388050u, 3218098013u, 2658530377u, 0, TAN_TOLERANCE, 0},
+{ 503, 1048415431u, 336846959u, 1052664471u, 3798336786u, 1048415431u, 336846993u, 0, TAN_TOLERANCE, 0},
+{ 504, 1055954236u, 3639240976u, 1081202165u, 1844741676u, 1055954236u, 3639630115u, 0, TAN_TOLERANCE, 0},
+{ 505, 3211904793u, 717293069u, 3211534283u, 582401011u, 3211904800u, 2074293655u, 0, TAN_TOLERANCE, 0},
+{ 506, 3251962512u, 3766248610u, 3196520332u, 1174437546u, 1073325344u, 780358362u, 0, TAN_TOLERANCE, 0},
+{ 507, 1083431226u, 756959182u, 3204099341u, 1581804034u, 1073722216u, 1460652646u, 0, TAN_TOLERANCE, 0},
+{ 508, 3205806444u, 3560686300u, 3220980617u, 4277975772u, 3205806444u, 3572839184u, 0, TAN_TOLERANCE, 0},
+{ 509, 3209906076u, 2598148853u, 3217622194u, 3460421008u, 3209906077u, 808032968u, 0, TAN_TOLERANCE, 0},
+{ 510, 1066720824u, 136600515u, 3209934920u, 3340653128u, 1066721013u, 1659952300u, 0, TAN_TOLERANCE, 0},
+{ 511, 1096820310u, 1045480938u, 3251354609u, 4133432965u, 3221461219u, 2735258820u, 0, TAN_TOLERANCE, 0},
+{ 512, 1091599431u, 1630207738u, 3239996829u, 2393354808u, 3219464252u, 498852281u, 0, TAN_TOLERANCE, 0},
+{ 513, 3190626018u, 3739770117u, 1059520750u, 3959551225u, 3190626018u, 3739770117u, 0, TAN_TOLERANCE, 0},
+{ 514, 3230730505u, 1498861716u, 1091297147u, 847410798u, 3217049269u, 1133813157u, 0, TAN_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 3222428802u, 614562084u, 0, TAN_TOLERANCE, 0},
+{ 516, 1054849265u, 2353103845u, 3235718771u, 2978889966u, 1054849265u, 2353274099u, 0, TAN_TOLERANCE, 0},
+{ 517, 3251357992u, 1546972125u, 3249076079u, 1987349196u, 1077259194u, 2242398903u, 0, TAN_TOLERANCE, 0},
+{ 518, 3238219513u, 2769161072u, 1075207126u, 292616282u, 1072821398u, 807086196u, 0, TAN_TOLERANCE, 0},
+{ 519, 3199712298u, 36855311u, 1052128202u, 1479039342u, 3199712298u, 36859768u, 0, TAN_TOLERANCE, 0},
+{ 520, 1083757053u, 2027463605u, 1066023013u, 3369686340u, 3221343255u, 19927100u, 0, TAN_TOLERANCE, 0},
+{ 521, 3197852749u, 3808681655u, 1054161346u, 1821773119u, 3197852749u, 3808682082u, 0, TAN_TOLERANCE, 0},
+{ 522, 1040685928u, 3175490326u, 3226879970u, 845687760u, 1040685928u, 3175490326u, 0, TAN_TOLERANCE, 0},
+{ 523, 1042302993u, 3124482451u, 3242748377u, 3259417226u, 1042302993u, 3124482451u, 0, TAN_TOLERANCE, 0},
+{ 524, 1045245695u, 2751606436u, 3236210939u, 3923142740u, 1045245695u, 2751606437u, 0, TAN_TOLERANCE, 0},
+{ 525, 1095694737u, 2016872044u, 3228408064u, 4201274408u, 3220556003u, 304657644u, 0, TAN_TOLERANCE, 0},
+{ 526, 3199349254u, 1019916843u, 3219974785u, 1977881787u, 3199349254u, 1019918851u, 0, TAN_TOLERANCE, 0},
+{ 527, 3199478752u, 2060433318u, 1075872515u, 366073725u, 3199478752u, 2060436054u, 0, TAN_TOLERANCE, 0},
+{ 528, 3191180557u, 1098469906u, 1082900695u, 2349346832u, 3191180557u, 1098469906u, 0, TAN_TOLERANCE, 0},
+{ 529, 3209974707u, 3011196295u, 3252479932u, 2459281672u, 3209974708u, 1651824903u, 0, TAN_TOLERANCE, 0},
+{ 530, 3221334323u, 2843222682u, 1089275809u, 298982001u, 1073062403u, 2209304510u, 0, TAN_TOLERANCE, 0},
+{ 531, 1101737698u, 914741728u, 3203468059u, 2833809843u, 1073172513u, 3841288246u, 0, TAN_TOLERANCE, 0},
+{ 532, 3236763878u, 1274901962u, 3241535845u, 3759113509u, 3223536244u, 2526279170u, 0, TAN_TOLERANCE, 0},
+{ 533, 3245916442u, 2134927252u, 3253802671u, 3013731444u, 3221779667u, 2145793921u, 0, TAN_TOLERANCE, 0},
+{ 534, 1099201341u, 2230655177u, 3254510616u, 1249674366u, 1069935420u, 2610885886u, 0, TAN_TOLERANCE, 0},
+{ 535, 1062971253u, 717357389u, 1083533731u, 3746683362u, 1062971254u, 3814343624u, 0, TAN_TOLERANCE, 0},
+{ 536, 3213773114u, 834976849u, 3217357661u, 2465861779u, 3213773258u, 3835570390u, 0, TAN_TOLERANCE, 0},
+{ 537, 1045656117u, 1385714428u, 1053358395u, 3007113740u, 1045656117u, 1385714429u, 0, TAN_TOLERANCE, 0},
+{ 538, 1050527919u, 599268545u, 3201368210u, 2309854744u, 1050527919u, 599269095u, 0, TAN_TOLERANCE, 0},
+{ 539, 1069954454u, 2840234388u, 3232496515u, 333365983u, 1069969239u, 824923776u, 0, TAN_TOLERANCE, 0},
+{ 540, 1045922781u, 3136078996u, 3194520860u, 2650572904u, 1045922781u, 3136078997u, 0, TAN_TOLERANCE, 0},
+{ 541, 3233687691u, 2405805086u, 3251640319u, 324233833u, 1076400826u, 1695372281u, 0, TAN_TOLERANCE, 0},
+{ 542, 1106699146u, 2589598340u, 3254677807u, 952438812u, 1073169861u, 1925719938u, 0, TAN_TOLERANCE, 0},
+{ 543, 3189114773u, 1922837702u, 3216892718u, 3535907549u, 3189114773u, 1922837702u, 0, TAN_TOLERANCE, 0},
+{ 544, 3243615868u, 261447440u, 3209805849u, 1150571079u, 3218537959u, 1179754495u, 0, TAN_TOLERANCE, 0},
+{ 545, 1095805232u, 4026487528u, 1073152064u, 27340691u, 1071869216u, 2196895529u, 0, TAN_TOLERANCE, 0},
+{ 546, 3229123692u, 338765118u, 1086225786u, 3207238249u, 1071434156u, 2463812124u, 0, TAN_TOLERANCE, 0},
+{ 547, 3196182703u, 1085283176u, 3187775111u, 1601194210u, 3196182703u, 1085283206u, 0, TAN_TOLERANCE, 0},
+{ 548, 1091520173u, 3031712790u, 3252307859u, 170666844u, 1073788586u, 1490989523u, 0, TAN_TOLERANCE, 0},
+{ 549, 3218862231u, 3148395674u, 1041913758u, 3306391490u, 3218988164u, 3732649501u, 0, TAN_TOLERANCE, 0},
+{ 550, 3201277070u, 2205233857u, 3208100078u, 3993195511u, 3201277070u, 2205275976u, 0, TAN_TOLERANCE, 0},
+{ 551, 1067699608u, 4282766727u, 1072820377u, 1874778218u, 1067700256u, 2388367432u, 0, TAN_TOLERANCE, 0},
+{ 552, 3210833092u, 2920860798u, 3218070226u, 3104066154u, 3210833094u, 1727805504u, 0, TAN_TOLERANCE, 0},
+{ 553, 3204950351u, 969991373u, 3250596895u, 1734386152u, 3204950351u, 974513035u, 0, TAN_TOLERANCE, 0},
+{ 554, 3238915818u, 1218740205u, 3239802737u, 2610078504u, 1071992715u, 2476766203u, 0, TAN_TOLERANCE, 0},
+{ 555, 3206031242u, 1485218325u, 3220870240u, 3591664613u, 3206031242u, 1504459448u, 0, TAN_TOLERANCE, 0},
+{ 556, 3202074143u, 690157417u, 3190850619u, 4192347699u, 3202074143u, 690271681u, 0, TAN_TOLERANCE, 0},
+{ 557, 1096053810u, 4009839784u, 1079670252u, 394167192u, 3225629605u, 4134812175u, 0, TAN_TOLERANCE, 0},
+{ 558, 3234559237u, 961532417u, 1092588071u, 2923790239u, 1071989085u, 3456632070u, 0, TAN_TOLERANCE, 0},
+{ 559, 3203879091u, 4174125604u, 1050682630u, 2169701868u, 3203879091u, 4175207134u, 0, TAN_TOLERANCE, 0},
+{ 560, 3243092475u, 4146748230u, 1087373950u, 2481478351u, 3215224829u, 3105536152u, 0, TAN_TOLERANCE, 0},
+{ 561, 1076987866u, 3984715440u, 1050421618u, 2446142566u, 3222213811u, 498812384u, 0, TAN_TOLERANCE, 0},
+{ 562, 1084172406u, 936290150u, 1100614426u, 3625806370u, 3220199128u, 1358638649u, 0, TAN_TOLERANCE, 0},
+{ 563, 1099787952u, 1866615265u, 3215651428u, 2337013350u, 3219914131u, 2684128678u, 0, TAN_TOLERANCE, 0},
+{ 564, 3253198302u, 712227971u, 1106004723u, 973148499u, 3218269318u, 3721193253u, 0, TAN_TOLERANCE, 0},
+{ 565, 3230088199u, 3409813738u, 3244817008u, 1933503498u, 1073488242u, 3344297858u, 0, TAN_TOLERANCE, 0},
+{ 566, 1079943733u, 3180389060u, 3228735703u, 83422217u, 1065971249u, 1602512451u, 0, TAN_TOLERANCE, 0},
+{ 567, 1077878724u, 556972671u, 3204582372u, 841555801u, 3218291211u, 3107455312u, 0, TAN_TOLERANCE, 0},
+{ 568, 1070767721u, 4189151332u, 1080874032u, 706326922u, 1070803352u, 407939685u, 0, TAN_TOLERANCE, 0},
+{ 569, 1096151307u, 198291836u, 1057281892u, 2188836928u, 1074592119u, 2450977568u, 0, TAN_TOLERANCE, 0},
+{ 570, 1078091995u, 1219449298u, 3228734687u, 3504562743u, 3220571385u, 559673929u, 0, TAN_TOLERANCE, 0},
+{ 571, 3204570464u, 1776099219u, 1094316777u, 4188083896u, 3204570464u, 1778045339u, 0, TAN_TOLERANCE, 0},
+{ 572, 3193845708u, 2614400266u, 1073750227u, 3003203347u, 3193845708u, 2614400268u, 0, TAN_TOLERANCE, 0},
+{ 573, 3213982678u, 2959351406u, 1105603716u, 311851587u, 3213982790u, 192456605u, 0, TAN_TOLERANCE, 0},
+{ 574, 1084544434u, 865443613u, 1097532516u, 3622237781u, 3218629642u, 1586071075u, 0, TAN_TOLERANCE, 0},
+{ 575, 3231786666u, 447506102u, 3195759295u, 3603669725u, 1072160877u, 4222169442u, 0, TAN_TOLERANCE, 0},
+{ 576, 1097890173u, 3934398273u, 1040996422u, 2968621268u, 1076341208u, 2443582384u, 0, TAN_TOLERANCE, 0},
+{ 577, 3196739825u, 784208771u, 1088764788u, 2182296421u, 3196739825u, 784208867u, 0, TAN_TOLERANCE, 0},
+{ 578, 3248332291u, 1527590526u, 3206961556u, 2823164069u, 1073211002u, 2920535413u, 0, TAN_TOLERANCE, 0},
+{ 579, 3236644131u, 3876699591u, 3207481130u, 4028148535u, 3220871901u, 876731950u, 0, TAN_TOLERANCE, 0},
+{ 580, 1083576186u, 2164249756u, 1059857743u, 1785169952u, 1074542491u, 1306706713u, 0, TAN_TOLERANCE, 0},
+{ 581, 1091804009u, 2079273665u, 1080303860u, 625760474u, 3221470601u, 3167060593u, 0, TAN_TOLERANCE, 0},
+{ 582, 3226486108u, 3636214836u, 1068367620u, 2932621925u, 1072938327u, 1971428109u, 0, TAN_TOLERANCE, 0},
+{ 583, 1043995372u, 4274131512u, 1047707755u, 92550763u, 1043995372u, 4274131512u, 0, TAN_TOLERANCE, 0},
+{ 584, 3198822121u, 2648933384u, 1084603503u, 3534304873u, 3198822121u, 2648934875u, 0, TAN_TOLERANCE, 0},
+{ 585, 1064563235u, 3216750767u, 3191088629u, 547482628u, 1064563246u, 349415911u, 0, TAN_TOLERANCE, 0},
+{ 586, 1061084774u, 1420360746u, 1080063101u, 1690029499u, 1061084774u, 2062923873u, 0, TAN_TOLERANCE, 0},
+{ 587, 3229855364u, 1908572179u, 1080112083u, 1228319033u, 3224026442u, 1064578383u, 0, TAN_TOLERANCE, 0},
+{ 588, 1048158178u, 500312015u, 3212368508u, 3864619086u, 1048158178u, 500312037u, 0, TAN_TOLERANCE, 0},
+{ 589, 3221335610u, 4211343447u, 1087492676u, 4272583781u, 1073055146u, 1668809125u, 0, TAN_TOLERANCE, 0},
+{ 590, 1099392394u, 2382118000u, 1042665328u, 567154882u, 1073006307u, 3699440123u, 0, TAN_TOLERANCE, 0},
+{ 591, 1058013442u, 1435344339u, 3216303171u, 2275988178u, 1058013442u, 1440940879u, 0, TAN_TOLERANCE, 0},
+{ 592, 3214538619u, 3403659753u, 3218043030u, 1926480488u, 3214538984u, 2788475836u, 0, TAN_TOLERANCE, 0},
+{ 593, 1076840383u, 1198845185u, 3225556149u, 1130089684u, 3216073797u, 2536472320u, 0, TAN_TOLERANCE, 0},
+{ 594, 3222663042u, 2183928090u, 1048403956u, 963834821u, 1072722791u, 2238943892u, 0, TAN_TOLERANCE, 0},
+{ 595, 1101672960u, 2120625396u, 1041006976u, 2137548527u, 1073487055u, 4205428157u, 0, TAN_TOLERANCE, 0},
+{ 596, 1099230238u, 586700956u, 1059670521u, 303891699u, 3222213898u, 3423099859u, 0, TAN_TOLERANCE, 0},
+{ 597, 3218994498u, 2509132460u, 1102827530u, 2205707903u, 3219140003u, 1207181537u, 0, TAN_TOLERANCE, 0},
+{ 598, 3204860597u, 1229308263u, 3209170414u, 4206576047u, 3204860597u, 1233089342u, 0, TAN_TOLERANCE, 0},
+{ 599, 3224076289u, 4078010749u, 3199236456u, 733478972u, 3221462767u, 2645312571u, 0, TAN_TOLERANCE, 0},
+{ 600, 3197712584u, 4277541051u, 3199806921u, 397102023u, 3197712584u, 4277541385u, 0, TAN_TOLERANCE, 0},
+{ 601, 3195975013u, 900999594u, 3234720188u, 2530214248u, 3195975013u, 900999632u, 0, TAN_TOLERANCE, 0},
+{ 602, 1076543548u, 4000609478u, 1096577064u, 4148592328u, 1072744158u, 901044576u, 0, TAN_TOLERANCE, 0},
+{ 603, 1048668084u, 2154187873u, 3224392607u, 3957250362u, 1048668084u, 2154187900u, 0, TAN_TOLERANCE, 0},
+{ 604, 3223413488u, 2867079200u, 1101870326u, 921212001u, 1072478681u, 1947808256u, 0, TAN_TOLERANCE, 0},
+{ 605, 3233221890u, 674547716u, 1063216239u, 3929755226u, 3221175450u, 1547677557u, 0, TAN_TOLERANCE, 0},
+{ 606, 3240415851u, 3158182449u, 1043794244u, 3259056345u, 1071157174u, 814361401u, 0, TAN_TOLERANCE, 0},
+{ 607, 3236776656u, 3002823940u, 1059511739u, 2832435794u, 1074816146u, 3432733072u, 0, TAN_TOLERANCE, 0},
+{ 608, 3217304822u, 2196511929u, 1049973941u, 3672092877u, 3217315882u, 2570717061u, 0, TAN_TOLERANCE, 0},
+{ 609, 1050438056u, 3655292191u, 1086438127u, 3567072906u, 1050438056u, 3655292669u, 0, TAN_TOLERANCE, 0},
+{ 610, 3243186948u, 1617573614u, 3201863123u, 3090723732u, 3215739265u, 754649775u, 0, TAN_TOLERANCE, 0},
+{ 611, 3233201380u, 679893506u, 3211547753u, 824081024u, 1071687746u, 513845462u, 0, TAN_TOLERANCE, 0},
+{ 612, 1089530525u, 2285242807u, 1084999409u, 2221731406u, 3221265077u, 3133657547u, 0, TAN_TOLERANCE, 0},
+{ 613, 3206733664u, 1935990727u, 1088822246u, 1058156518u, 3206733664u, 1972701329u, 0, TAN_TOLERANCE, 0},
+{ 614, 1102839166u, 521023584u, 1059186903u, 4245163857u, 1069859447u, 743248191u, 0, TAN_TOLERANCE, 0},
+{ 615, 1103891140u, 2312887617u, 3191771354u, 1885370807u, 3213444490u, 1904571603u, 0, TAN_TOLERANCE, 0},
+{ 616, 3252953815u, 1796441468u, 1100030327u, 2772711004u, 3219317557u, 2229597079u, 0, TAN_TOLERANCE, 0},
+{ 617, 3204276820u, 2095685003u, 1077984448u, 2100773742u, 3204276820u, 2097849993u, 0, TAN_TOLERANCE, 0},
+{ 618, 3192954620u, 2892538035u, 1042396334u, 4162200338u, 3192954620u, 2892538035u, 0, TAN_TOLERANCE, 0},
+{ 619, 3242725751u, 2177698116u, 3227557177u, 150832500u, 1068959958u, 4175788793u, 0, TAN_TOLERANCE, 0},
+{ 620, 3191562216u, 607966734u, 3236250630u, 4164600559u, 3191562216u, 607966734u, 0, TAN_TOLERANCE, 0},
+{ 621, 3216389812u, 2830122967u, 1046096700u, 3713346883u, 3216393477u, 2001753140u, 0, TAN_TOLERANCE, 0},
+{ 622, 3237197963u, 2314640506u, 3203696416u, 3276228872u, 3216462828u, 1983951841u, 0, TAN_TOLERANCE, 0},
+{ 623, 3212912307u, 469331883u, 3249037349u, 2999233437u, 3212912333u, 1663316888u, 0, TAN_TOLERANCE, 0},
+{ 624, 1097382011u, 560886625u, 1091899487u, 748795120u, 1071993443u, 2804575561u, 0, TAN_TOLERANCE, 0},
+{ 625, 1049886858u, 2958421324u, 1092569414u, 3235243477u, 1049886858u, 2958421491u, 0, TAN_TOLERANCE, 0},
+{ 626, 3193026497u, 3221475559u, 1043038304u, 915608434u, 3193026497u, 3221475559u, 0, TAN_TOLERANCE, 0},
+{ 627, 1071197530u, 3007808652u, 3216682290u, 2531019474u, 1071288269u, 2003569361u, 0, TAN_TOLERANCE, 0},
+{ 628, 3242028999u, 1767658578u, 3237045269u, 2313128318u, 1077477368u, 1546619350u, 0, TAN_TOLERANCE, 0},
+{ 629, 3210617892u, 1926845182u, 1066835624u, 1783256828u, 3210617894u, 2907970801u, 0, TAN_TOLERANCE, 0},
+{ 630, 1040575629u, 90378038u, 1057168870u, 164358218u, 1040575629u, 90378038u, 0, TAN_TOLERANCE, 0},
+{ 631, 1106859172u, 1610524680u, 1085283851u, 2903496007u, 3219268505u, 3734210885u, 0, TAN_TOLERANCE, 0},
+{ 632, 1078635586u, 4274321404u, 3202913591u, 720121831u, 3215944252u, 3691295869u, 0, TAN_TOLERANCE, 0},
+{ 633, 1051205256u, 2034778236u, 1071133763u, 1413236391u, 1051205256u, 2034779405u, 0, TAN_TOLERANCE, 0},
+{ 634, 1051063028u, 1489112261u, 1076691395u, 348210906u, 1051063028u, 1489113142u, 0, TAN_TOLERANCE, 0},
+{ 635, 3206743917u, 2797651324u, 3224410527u, 2374818327u, 3206743917u, 2835282496u, 0, TAN_TOLERANCE, 0},
+{ 636, 1088287256u, 1823161666u, 3197810695u, 3119680047u, 3219861474u, 2047170095u, 0, TAN_TOLERANCE, 0},
+{ 637, 1065927336u, 3420950657u, 1087084743u, 2136638961u, 1065927415u, 3709689162u, 0, TAN_TOLERANCE, 0},
+{ 638, 1069902224u, 3554566429u, 1062907717u, 2736702589u, 1069915462u, 3518649188u, 0, TAN_TOLERANCE, 0},
+{ 639, 3244888667u, 2928437580u, 3187765027u, 1393427873u, 1068333483u, 1818015207u, 0, TAN_TOLERANCE, 0},
+{ 640, 3209301561u, 189447067u, 1051643315u, 828663513u, 3209301561u, 1735128209u, 0, TAN_TOLERANCE, 0},
+{ 641, 1052313869u, 2852350928u, 1045683757u, 673354280u, 1052313869u, 2852356158u, 0, TAN_TOLERANCE, 0},
+{ 642, 1043946301u, 3589563265u, 3248741629u, 812657927u, 1043946301u, 3589563265u, 0, TAN_TOLERANCE, 0},
+{ 643, 3190610826u, 1766416701u, 1100392103u, 2185373290u, 3190610826u, 1766416701u, 0, TAN_TOLERANCE, 0},
+{ 644, 3220275389u, 3763582673u, 3191965790u, 388374829u, 3221157954u, 1827747543u, 0, TAN_TOLERANCE, 0},
+{ 645, 1079635136u, 1187403069u, 1075300235u, 336640304u, 1067143974u, 3696369881u, 0, TAN_TOLERANCE, 0},
+{ 646, 1103926251u, 1718795752u, 3243118752u, 683369237u, 3219595101u, 1799803345u, 0, TAN_TOLERANCE, 0},
+{ 647, 3210792097u, 1863545307u, 1069449477u, 3418627399u, 3210792098u, 4197087876u, 0, TAN_TOLERANCE, 0},
+{ 648, 1069601294u, 3295607249u, 1068878592u, 1633297809u, 1069607684u, 1276743969u, 0, TAN_TOLERANCE, 0},
+{ 649, 1058947127u, 2585980994u, 3236670483u, 1286750688u, 1058947127u, 2623777476u, 0, TAN_TOLERANCE, 0},
+{ 650, 1046157033u, 15816845u, 3233249283u, 2491924775u, 1046157033u, 15816847u, 0, TAN_TOLERANCE, 0},
+{ 651, 1042413021u, 1051983351u, 1049180786u, 1474421917u, 1042413021u, 1051983351u, 0, TAN_TOLERANCE, 0},
+{ 652, 3201249525u, 2003816032u, 1086050104u, 668090487u, 3201249525u, 2003856493u, 0, TAN_TOLERANCE, 0},
+{ 653, 1052556037u, 3671484625u, 1067020039u, 430024694u, 1052556037u, 3671492530u, 0, TAN_TOLERANCE, 0},
+{ 654, 1067397110u, 3991830201u, 3207808714u, 1021245839u, 1067397743u, 564284082u, 0, TAN_TOLERANCE, 0},
+{ 655, 1064194391u, 4255801807u, 3207681716u, 1926756877u, 1064194401u, 267289285u, 0, TAN_TOLERANCE, 0},
+{ 656, 1052140785u, 4167786896u, 1077097744u, 1775517981u, 1052140785u, 4167790640u, 0, TAN_TOLERANCE, 0},
+{ 657, 1085601978u, 3187518564u, 1082437406u, 944672491u, 3218112804u, 3739410670u, 0, TAN_TOLERANCE, 0},
+{ 658, 1049366282u, 953085192u, 3227310828u, 3459155777u, 1049366282u, 953085307u, 0, TAN_TOLERANCE, 0},
+{ 659, 1069502506u, 1908555460u, 1073640207u, 260441967u, 1069512802u, 1649179346u, 0, TAN_TOLERANCE, 0},
+{ 660, 1067219606u, 250762477u, 1072582645u, 2886742039u, 1067220087u, 1752188499u, 0, TAN_TOLERANCE, 0},
+{ 661, 3250906006u, 786180031u, 3197734769u, 2788918312u, 3219515699u, 2725543956u, 0, TAN_TOLERANCE, 0},
+{ 662, 3234511827u, 2055912467u, 3244244909u, 1394142937u, 1070694857u, 2816615981u, 0, TAN_TOLERANCE, 0},
+{ 663, 1069612985u, 91984146u, 3222252812u, 4126276047u, 1069619580u, 4178832687u, 0, TAN_TOLERANCE, 0},
+{ 664, 1081340139u, 3942715706u, 3239316352u, 410676547u, 3222618996u, 869458806u, 0, TAN_TOLERANCE, 0},
+{ 665, 3198557846u, 86296211u, 1085850694u, 649202596u, 3198557846u, 86297113u, 0, TAN_TOLERANCE, 0},
+{ 666, 3245366392u, 3069064472u, 3237358008u, 23209276u, 1071509322u, 3234392254u, 0, TAN_TOLERANCE, 0},
+{ 667, 1081235288u, 1867297860u, 1072956607u, 2513414118u, 1074517732u, 2357944421u, 0, TAN_TOLERANCE, 0},
+{ 668, 3250533347u, 3171788768u, 3235208783u, 162138697u, 1074879793u, 3994846525u, 0, TAN_TOLERANCE, 0},
+{ 669, 1081728455u, 1245110700u, 1081653954u, 2584994077u, 3220272741u, 1136402195u, 0, TAN_TOLERANCE, 0},
+{ 670, 3245510120u, 3347226587u, 1058962932u, 2291943376u, 1071151630u, 2408276492u, 0, TAN_TOLERANCE, 0},
+{ 671, 1058899062u, 966940828u, 1060726420u, 2798041096u, 1058899062u, 1002054341u, 0, TAN_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1073683919u, 1905677821u, 0, TAN_TOLERANCE, 0},
+{ 673, 3248116497u, 1671039260u, 1086395032u, 3745833360u, 3218381141u, 2264716022u, 0, TAN_TOLERANCE, 0},
+{ 674, 1057078797u, 651714217u, 1047070645u, 2130549237u, 1057078797u, 653620621u, 0, TAN_TOLERANCE, 0},
+{ 675, 3207115731u, 1423000172u, 3247822717u, 1551488170u, 3207115731u, 1505322649u, 0, TAN_TOLERANCE, 0},
+{ 676, 3201597307u, 921077236u, 3213332351u, 1431049019u, 3201597307u, 921123170u, 0, TAN_TOLERANCE, 0},
+{ 677, 1067510295u, 655715547u, 3190985373u, 1527556471u, 1067510698u, 2547250551u, 0, TAN_TOLERANCE, 0},
+{ 678, 3227654979u, 4110878657u, 3251297180u, 879739345u, 3218509109u, 2423441325u, 0, TAN_TOLERANCE, 0},
+{ 679, 1085804762u, 2623955764u, 1093699897u, 1216444475u, 1070118810u, 3472479979u, 0, TAN_TOLERANCE, 0},
+{ 680, 1091905603u, 107442539u, 3239767031u, 1149813329u, 1071923940u, 457790337u, 0, TAN_TOLERANCE, 0},
+{ 681, 3233445240u, 1761361082u, 3226030205u, 1121849716u, 3217653293u, 4119342134u, 0, TAN_TOLERANCE, 0},
+{ 682, 3240087115u, 2534144722u, 1044223733u, 3512285706u, 3224103620u, 2429523598u, 0, TAN_TOLERANCE, 0},
+{ 683, 3211846077u, 4073670723u, 1050729852u, 3034818849u, 3211846084u, 915461231u, 0, TAN_TOLERANCE, 0},
+{ 684, 1101984574u, 1421423503u, 1060278048u, 1397153092u, 1072776793u, 1253204266u, 0, TAN_TOLERANCE, 0},
+{ 685, 3217421829u, 1649206019u, 1104525577u, 1267104290u, 3217436119u, 2880193675u, 0, TAN_TOLERANCE, 0},
+{ 686, 3189302097u, 3775270392u, 1040251850u, 68667319u, 3189302097u, 3775270392u, 0, TAN_TOLERANCE, 0},
+{ 687, 3204330900u, 3099226694u, 3254103006u, 4020102648u, 3204330900u, 3101579254u, 0, TAN_TOLERANCE, 0},
+{ 688, 3201591712u, 3718441177u, 3215643451u, 4032951536u, 3201591712u, 3718486539u, 0, TAN_TOLERANCE, 0},
+{ 689, 1044131371u, 508048351u, 3210196713u, 1707937896u, 1044131371u, 508048351u, 0, TAN_TOLERANCE, 0},
+{ 690, 3198611627u, 2784738160u, 1073435430u, 1109346010u, 3198611627u, 2784739166u, 0, TAN_TOLERANCE, 0},
+{ 691, 3225725290u, 3331916473u, 3238794568u, 2707019594u, 3219179196u, 1878996346u, 0, TAN_TOLERANCE, 0},
+{ 692, 1093182670u, 3093165197u, 1072894805u, 2853215019u, 3217526033u, 2848721056u, 0, TAN_TOLERANCE, 0},
+{ 693, 3216582139u, 2135797997u, 1048399559u, 2941926126u, 3216587461u, 2824369149u, 0, TAN_TOLERANCE, 0},
+{ 694, 1048430980u, 2083412145u, 3249335391u, 507212448u, 1048430980u, 2083412179u, 0, TAN_TOLERANCE, 0},
+{ 695, 1075363751u, 4270176401u, 3246546709u, 3288753319u, 3216549950u, 3510999752u, 0, TAN_TOLERANCE, 0},
+{ 696, 3247932863u, 3692175292u, 3197271515u, 3989064196u, 1075194806u, 1737451979u, 0, TAN_TOLERANCE, 0},
+{ 697, 3251691738u, 3111924274u, 1066772558u, 59281695u, 1070740573u, 1549531850u, 0, TAN_TOLERANCE, 0},
+{ 698, 1067683911u, 2135245466u, 3208804313u, 3846547392u, 1067684535u, 3577147149u, 0, TAN_TOLERANCE, 0},
+{ 699, 1094877811u, 972051266u, 3222814246u, 3539700586u, 1073113122u, 2031122011u, 0, TAN_TOLERANCE, 0},
+{ 700, 3202965930u, 330951080u, 1079189813u, 583922384u, 3202965930u, 331299907u, 0, TAN_TOLERANCE, 0},
+{ 701, 1089640092u, 1711944085u, 1104170032u, 643991456u, 1074425836u, 759692993u, 0, TAN_TOLERANCE, 0},
+{ 702, 3234429549u, 2072550721u, 3250147641u, 4280263530u, 3220634492u, 1689537566u, 0, TAN_TOLERANCE, 0},
+{ 703, 3192972706u, 1566376352u, 1067251433u, 72984588u, 3192972706u, 1566376352u, 0, TAN_TOLERANCE, 0},
+{ 704, 1095276569u, 3103043079u, 1045853123u, 410067497u, 3219184490u, 2989790297u, 0, TAN_TOLERANCE, 0},
+{ 705, 3216672493u, 1910366299u, 1081770885u, 634683073u, 3216678742u, 2219186766u, 0, TAN_TOLERANCE, 0},
+{ 706, 1081530688u, 2226525875u, 3224149290u, 2126302825u, 1073875863u, 3373110948u, 0, TAN_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1075672286u, 2180760441u, 0, TAN_TOLERANCE, 0},
+{ 708, 1066482943u, 1953339096u, 1077176252u, 1476516558u, 1066483050u, 796594176u, 0, TAN_TOLERANCE, 0},
+{ 709, 1066092000u, 1306277326u, 1079089150u, 4093716191u, 1066092105u, 4157158941u, 0, TAN_TOLERANCE, 0},
+{ 710, 3233148787u, 51750045u, 3242913901u, 4256866157u, 3222988569u, 439136879u, 0, TAN_TOLERANCE, 0},
+{ 711, 3195084967u, 2163853087u, 3232053146u, 2962422808u, 3195084967u, 2163853094u, 0, TAN_TOLERANCE, 0},
+{ 712, 1075516945u, 1618388148u, 3233154824u, 3711953164u, 1071710292u, 1922481399u, 0, TAN_TOLERANCE, 0},
+{ 713, 3246868002u, 357108214u, 3202294604u, 2306775262u, 1072903322u, 605160679u, 0, TAN_TOLERANCE, 0},
+{ 714, 3201904086u, 2571356437u, 3249064063u, 2394851808u, 3201904086u, 2571441574u, 0, TAN_TOLERANCE, 0},
+{ 715, 3230488091u, 4273880094u, 1103698617u, 3578832032u, 1071947813u, 4287022097u, 0, TAN_TOLERANCE, 0},
+{ 716, 3233426701u, 2091068742u, 3228270226u, 3980489730u, 3215078902u, 1010047045u, 0, TAN_TOLERANCE, 0},
+{ 717, 3229016752u, 2772307714u, 1051008486u, 32546576u, 1075245665u, 462916900u, 0, TAN_TOLERANCE, 0},
+{ 718, 3241229215u, 2143788498u, 3195498043u, 3630119231u, 3221585624u, 179270373u, 0, TAN_TOLERANCE, 0},
+{ 719, 3198632935u, 2527385594u, 3240503648u, 3482095012u, 3198632935u, 2527386643u, 0, TAN_TOLERANCE, 0},
+{ 720, 3242168799u, 2690097362u, 1068598730u, 2360266862u, 3220602288u, 418300175u, 0, TAN_TOLERANCE, 0},
+{ 721, 1058857869u, 2673272949u, 1082639557u, 522449749u, 1058857869u, 2706190749u, 0, TAN_TOLERANCE, 0},
+{ 722, 1104424147u, 3596379400u, 3242016775u, 2002293002u, 3221113564u, 1902628924u, 0, TAN_TOLERANCE, 0},
+{ 723, 1099439656u, 4113224369u, 3222122439u, 2152316893u, 1071885781u, 1950205565u, 0, TAN_TOLERANCE, 0},
+{ 724, 3220796716u, 31662602u, 1047721249u, 1747087514u, 1078500715u, 94481049u, 0, TAN_TOLERANCE, 0},
+{ 725, 3250463757u, 2489659568u, 1097051253u, 277506957u, 3220359518u, 3160316980u, 0, TAN_TOLERANCE, 0},
+{ 726, 3191401834u, 3850162281u, 3213841942u, 438724093u, 3191401834u, 3850162281u, 0, TAN_TOLERANCE, 0},
+{ 727, 1095392535u, 2431814052u, 1075518084u, 2672434118u, 3213954599u, 974405380u, 0, TAN_TOLERANCE, 0},
+{ 728, 3243162735u, 391606792u, 1048184750u, 4168944276u, 3221302992u, 3451129745u, 0, TAN_TOLERANCE, 0},
+{ 729, 3247792416u, 457529672u, 3201090276u, 72407935u, 3222315239u, 1160982851u, 0, TAN_TOLERANCE, 0},
+{ 730, 3218720719u, 3954981400u, 1052053242u, 2411049585u, 3218818453u, 61902234u, 0, TAN_TOLERANCE, 0},
+{ 731, 1086180091u, 485456950u, 1088415093u, 1655397424u, 3220221131u, 2324510511u, 0, TAN_TOLERANCE, 0},
+{ 732, 3198234428u, 1551748070u, 3236871640u, 1329701152u, 3198234428u, 1551748493u, 0, TAN_TOLERANCE, 0},
+{ 733, 3224639122u, 3099222537u, 1104984570u, 4293792842u, 3221696756u, 3006182604u, 0, TAN_TOLERANCE, 0},
+{ 734, 3203949705u, 3603065260u, 3197735968u, 2402359253u, 3203949705u, 3604303771u, 0, TAN_TOLERANCE, 0},
+{ 735, 3198824584u, 3961208159u, 3219057584u, 2340553876u, 3198824584u, 3961209656u, 0, TAN_TOLERANCE, 0},
+{ 736, 1074881909u, 4014841779u, 3197672877u, 3697233334u, 1074072291u, 3216031119u, 0, TAN_TOLERANCE, 0},
+{ 737, 3213275657u, 1403876392u, 3254028950u, 921363393u, 3213275718u, 925891589u, 0, TAN_TOLERANCE, 0},
+{ 738, 1107251806u, 1862576361u, 3194031708u, 2476290925u, 1066826438u, 3927706251u, 0, TAN_TOLERANCE, 0},
+{ 739, 1049661768u, 1454212851u, 1088378861u, 3400401866u, 1049661768u, 1454212946u, 0, TAN_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 1069568065u, 3064462875u, 0, TAN_TOLERANCE, 0},
+{ 741, 3216409282u, 1199568671u, 3225679997u, 46947405u, 3216413096u, 1759976264u, 0, TAN_TOLERANCE, 0},
+{ 742, 1077685537u, 2596231448u, 3253943728u, 2219151748u, 3216584142u, 1488430398u, 0, TAN_TOLERANCE, 0},
+{ 743, 1066527035u, 4119719558u, 3222036299u, 1275474618u, 1066527155u, 2928830600u, 0, TAN_TOLERANCE, 0},
+{ 744, 3239908663u, 3347296825u, 1101507910u, 1254014794u, 1072809120u, 869332103u, 0, TAN_TOLERANCE, 0},
+{ 745, 1084119992u, 673775040u, 1070743626u, 244126093u, 1075534323u, 698300927u, 0, TAN_TOLERANCE, 0},
+{ 746, 3203199850u, 1832066983u, 1051358028u, 3262483417u, 3203199850u, 1832584640u, 0, TAN_TOLERANCE, 0},
+{ 747, 1077559600u, 3962610501u, 3198598777u, 849269178u, 1073781704u, 804173689u, 0, TAN_TOLERANCE, 0},
+{ 748, 3235473900u, 2497516122u, 3254374111u, 2821429629u, 1074308595u, 3100151219u, 0, TAN_TOLERANCE, 0},
+{ 749, 1076236288u, 2805941787u, 3217785843u, 779131141u, 3225158579u, 3900803877u, 0, TAN_TOLERANCE, 0},
+{ 750, 3226908686u, 723423605u, 1084533420u, 627282213u, 1070465931u, 3949309375u, 0, TAN_TOLERANCE, 0},
+{ 751, 3215947680u, 4292778869u, 1078101071u, 1676860147u, 3215950281u, 2069249548u, 0, TAN_TOLERANCE, 0},
+{ 752, 1076288502u, 3528118587u, 3194648564u, 2363260897u, 3221307988u, 19736518u, 0, TAN_TOLERANCE, 0},
+{ 753, 3192897879u, 1307010018u, 1061248120u, 1468743108u, 3192897879u, 1307010019u, 0, TAN_TOLERANCE, 0},
+{ 754, 3246583139u, 107905661u, 3226089788u, 1943427674u, 3222568369u, 1322611276u, 0, TAN_TOLERANCE, 0},
+{ 755, 3188230541u, 760006940u, 1054265604u, 1749976597u, 3188230541u, 760006940u, 0, TAN_TOLERANCE, 0},
+{ 756, 3237773384u, 2787503556u, 1081282610u, 1195841206u, 1073441083u, 1059539068u, 0, TAN_TOLERANCE, 0},
+{ 757, 3191802156u, 545462045u, 3208381743u, 1981311808u, 3191802156u, 545462045u, 0, TAN_TOLERANCE, 0},
+{ 758, 1061232136u, 3657978397u, 1104463616u, 3501253426u, 1061232136u, 4096232730u, 0, TAN_TOLERANCE, 0},
+{ 759, 1049883857u, 1804177501u, 3210693633u, 3606766729u, 1049883857u, 1804177667u, 0, TAN_TOLERANCE, 0},
+{ 760, 1076856879u, 1336278526u, 1043741618u, 3165279431u, 1068350898u, 491456471u, 0, TAN_TOLERANCE, 0},
+{ 761, 1055471915u, 1599382075u, 1058018527u, 4212580517u, 1055471915u, 1599724421u, 0, TAN_TOLERANCE, 0},
+{ 762, 3207502326u, 3007589929u, 3202026547u, 2792028313u, 3207502326u, 3164093214u, 0, TAN_TOLERANCE, 0},
+{ 763, 3253082770u, 1866066996u, 1060329048u, 3727175322u, 1072698640u, 3872927457u, 0, TAN_TOLERANCE, 0},
+{ 764, 3198416643u, 150890940u, 1056025306u, 3082724735u, 3198416643u, 150891603u, 0, TAN_TOLERANCE, 0},
+{ 765, 1062008939u, 80400395u, 1093584426u, 3478941315u, 1062008939u, 2205021603u, 0, TAN_TOLERANCE, 0},
+{ 766, 3251640614u, 4050954182u, 3219263194u, 2537475930u, 1069381185u, 3828509291u, 0, TAN_TOLERANCE, 0},
+{ 767, 1064841871u, 2881752155u, 3212589299u, 2559651278u, 1064841890u, 512262744u, 0, TAN_TOLERANCE, 0},
+{ 768, 3249016304u, 440309030u, 3214267461u, 3788040806u, 3219236838u, 312619054u, 0, TAN_TOLERANCE, 0},
+{ 769, 1100476615u, 918813144u, 3208535698u, 1607035904u, 3221517627u, 3644569098u, 0, TAN_TOLERANCE, 0},
+{ 770, 1042137451u, 2497054124u, 1089139147u, 2549609010u, 1042137451u, 2497054124u, 0, TAN_TOLERANCE, 0},
+{ 771, 1047037641u, 790219083u, 1054657139u, 2797979479u, 1047037641u, 790219088u, 0, TAN_TOLERANCE, 0},
+{ 772, 1057781400u, 1149462078u, 1095765205u, 3879963182u, 1057781400u, 1157333128u, 0, TAN_TOLERANCE, 0},
+{ 773, 3202729813u, 2684353926u, 3205212854u, 1732474928u, 3202729813u, 2684574296u, 0, TAN_TOLERANCE, 0},
+{ 774, 1095236965u, 2742237025u, 1051317716u, 3386396147u, 1070950125u, 4063976668u, 0, TAN_TOLERANCE, 0},
+{ 775, 1063230986u, 3408320912u, 1103071166u, 4233059513u, 1063230989u, 1570710087u, 0, TAN_TOLERANCE, 0},
+{ 776, 1064863548u, 1077495917u, 1088399968u, 433115118u, 1064863567u, 2001865724u, 0, TAN_TOLERANCE, 0},
+{ 777, 3204547572u, 841366493u, 1051716814u, 4121125128u, 3204547572u, 843200674u, 0, TAN_TOLERANCE, 0},
+{ 778, 1064632084u, 321857207u, 1089128010u, 1149988239u, 1064632096u, 547429103u, 0, TAN_TOLERANCE, 0},
+{ 779, 3245542663u, 799866606u, 3197637091u, 3924438208u, 3211532957u, 3662721595u, 0, TAN_TOLERANCE, 0},
+{ 780, 3191062890u, 2002049816u, 1077053447u, 2240354761u, 3191062890u, 2002049816u, 0, TAN_TOLERANCE, 0},
+{ 781, 3229006283u, 478939968u, 1097035749u, 1066716440u, 1072752037u, 2531096848u, 0, TAN_TOLERANCE, 0},
+{ 782, 3232473641u, 1653104725u, 1088548129u, 81977716u, 1071090445u, 506086843u, 0, TAN_TOLERANCE, 0},
+{ 783, 3196861276u, 3899475018u, 3189694084u, 3330093036u, 3196861276u, 3899475135u, 0, TAN_TOLERANCE, 0},
+{ 784, 1089312583u, 2612450289u, 1079065127u, 603380842u, 1073008863u, 3887211481u, 0, TAN_TOLERANCE, 0},
+{ 785, 1100636791u, 3962735564u, 1101570429u, 1372490825u, 3220290720u, 1010454053u, 0, TAN_TOLERANCE, 0},
+{ 786, 1054806016u, 1479841439u, 1059312257u, 541504905u, 1054806016u, 1480001287u, 0, TAN_TOLERANCE, 0},
+{ 787, 1078662178u, 2626148789u, 1057571099u, 4121656076u, 1072550701u, 103347377u, 0, TAN_TOLERANCE, 0},
+{ 788, 1081613389u, 1902560314u, 1043130231u, 3557671562u, 3219664068u, 2202748350u, 0, TAN_TOLERANCE, 0},
+{ 789, 3193829772u, 41779312u, 1081626342u, 831171823u, 3193829772u, 41779314u, 0, TAN_TOLERANCE, 0},
+{ 790, 1058131100u, 1393168821u, 1066457405u, 1381616968u, 1058131100u, 1400868003u, 0, TAN_TOLERANCE, 0},
+{ 791, 1072338141u, 3756584649u, 3222267229u, 1423157432u, 1072792768u, 1008405082u, 0, TAN_TOLERANCE, 0},
+{ 792, 3254435674u, 1894912556u, 1042426694u, 155024547u, 3218179819u, 2046959496u, 0, TAN_TOLERANCE, 0},
+{ 793, 3195453512u, 35164295u, 3203391785u, 1037041084u, 3195453512u, 35164310u, 0, TAN_TOLERANCE, 0},
+{ 794, 1084777479u, 3957875950u, 3232195211u, 1590756436u, 3219947575u, 33029473u, 0, TAN_TOLERANCE, 0},
+{ 795, 1068844322u, 1447585080u, 1071279485u, 1107922438u, 1068847538u, 3657603058u, 0, TAN_TOLERANCE, 0},
+{ 796, 1046252518u, 981897615u, 1051856116u, 430357614u, 1046252518u, 981897617u, 0, TAN_TOLERANCE, 0},
+{ 797, 3227524215u, 395145384u, 3219821938u, 50586510u, 3216350661u, 266931658u, 0, TAN_TOLERANCE, 0},
+{ 798, 1069775912u, 750827797u, 1082862669u, 230466783u, 1069785868u, 656722732u, 0, TAN_TOLERANCE, 0},
+{ 799, 1086668819u, 1365083575u, 3204848310u, 1700831722u, 1072758492u, 877880103u, 0, TAN_TOLERANCE, 0},
+{ 800, 3218090390u, 344241827u, 1071538935u, 2715566077u, 3218113497u, 943457430u, 0, TAN_TOLERANCE, 0},
+{ 801, 3247582856u, 4069301823u, 3193208760u, 2949125229u, 3220500077u, 3721096040u, 0, TAN_TOLERANCE, 0},
+{ 802, 1103231387u, 3585711710u, 1065801594u, 2302229267u, 1073052568u, 2823852135u, 0, TAN_TOLERANCE, 0},
+{ 803, 3194118956u, 709803845u, 1048741487u, 2296910194u, 3194118956u, 709803847u, 0, TAN_TOLERANCE, 0},
+{ 804, 3193280779u, 744421179u, 1069302001u, 2659232829u, 3193280779u, 744421180u, 0, TAN_TOLERANCE, 0},
+{ 805, 1092835968u, 1799949903u, 3192522886u, 4212149209u, 3222671637u, 2782741478u, 0, TAN_TOLERANCE, 0},
+{ 806, 3206108502u, 145234164u, 3250614064u, 912384201u, 3206108502u, 167432287u, 0, TAN_TOLERANCE, 0},
+{ 807, 3240510664u, 2784620507u, 1102812948u, 3531481022u, 1071861957u, 1209927963u, 0, TAN_TOLERANCE, 0},
+{ 808, 3251159663u, 383952592u, 3205659905u, 3633194728u, 1073108607u, 1305867219u, 0, TAN_TOLERANCE, 0},
+{ 809, 3203476252u, 3792395543u, 1070072378u, 3864816376u, 3203476252u, 3792827369u, 0, TAN_TOLERANCE, 0},
+{ 810, 3205316273u, 2115553675u, 1066288499u, 3538377867u, 3205316273u, 2124091140u, 0, TAN_TOLERANCE, 0},
+{ 811, 3252075185u, 1230026762u, 1090719723u, 440819880u, 3220809625u, 1855897437u, 0, TAN_TOLERANCE, 0},
+{ 812, 3194595076u, 2991290482u, 1096886719u, 1097971167u, 3194595076u, 2991290487u, 0, TAN_TOLERANCE, 0},
+{ 813, 1090048600u, 1098035020u, 3230900504u, 1479059095u, 1074542433u, 1727465346u, 0, TAN_TOLERANCE, 0},
+{ 814, 3251056964u, 1719428427u, 3188631907u, 3707377409u, 1074529400u, 867101846u, 0, TAN_TOLERANCE, 0},
+{ 815, 1053236165u, 3748932896u, 1084908557u, 1325384361u, 1053236165u, 3748949349u, 0, TAN_TOLERANCE, 0},
+{ 816, 1084704076u, 3979168763u, 1057455255u, 2454615952u, 1071422651u, 515448681u, 0, TAN_TOLERANCE, 0},
+{ 817, 1053106984u, 1449164578u, 1056960316u, 1654931641u, 1053106984u, 1449177170u, 0, TAN_TOLERANCE, 0},
+{ 818, 1071439010u, 2120487381u, 3226298974u, 2364226633u, 1071578601u, 3101860884u, 0, TAN_TOLERANCE, 0},
+{ 819, 1075071428u, 1074268944u, 1065730444u, 280016852u, 3221571272u, 473828447u, 0, TAN_TOLERANCE, 0},
+{ 820, 3200308256u, 3315127889u, 3236295594u, 2900924954u, 3200308256u, 3315134244u, 0, TAN_TOLERANCE, 0},
+{ 821, 3196425891u, 2246037502u, 1049691002u, 1496066550u, 3196425891u, 2246037554u, 0, TAN_TOLERANCE, 0},
+{ 822, 3193006859u, 4191285446u, 3217936236u, 2382392789u, 3193006859u, 4191285446u, 0, TAN_TOLERANCE, 0},
+{ 823, 1092833308u, 640099844u, 1042152237u, 2064279383u, 1071765815u, 106826017u, 0, TAN_TOLERANCE, 0},
+{ 824, 1079913438u, 3468560824u, 1093251038u, 310958750u, 1074618739u, 964701519u, 0, TAN_TOLERANCE, 0},
+{ 825, 1096788400u, 1413568905u, 1100941106u, 1627289946u, 3219861883u, 2605802298u, 0, TAN_TOLERANCE, 0},
+{ 826, 3191549550u, 3797143370u, 3195497539u, 3843275034u, 3191549550u, 3797143370u, 0, TAN_TOLERANCE, 0},
+{ 827, 3252077393u, 2806642640u, 3201943068u, 2515980718u, 3218102760u, 374409247u, 0, TAN_TOLERANCE, 0},
+{ 828, 1086877316u, 632580632u, 1078673506u, 3259601317u, 3220185630u, 3401299183u, 0, TAN_TOLERANCE, 0},
+{ 829, 3200980575u, 3309678799u, 1049337078u, 3056787074u, 3200980575u, 3309705299u, 0, TAN_TOLERANCE, 0},
+{ 830, 3221495289u, 2341164249u, 1080834967u, 2810890005u, 1072115406u, 1493859610u, 0, TAN_TOLERANCE, 0},
+{ 831, 1067019674u, 932124675u, 1093915797u, 662682630u, 1067020016u, 3583760323u, 0, TAN_TOLERANCE, 0},
+{ 832, 3249230091u, 1367996113u, 3251723684u, 2974064663u, 1069437035u, 832804725u, 0, TAN_TOLERANCE, 0},
+{ 833, 1080230731u, 323437999u, 1090499064u, 901457511u, 1074630302u, 1396044198u, 0, TAN_TOLERANCE, 0},
+{ 834, 3235778876u, 4184941840u, 3196770014u, 2458988443u, 3222365184u, 3232213730u, 0, TAN_TOLERANCE, 0},
+{ 835, 1087618284u, 2023065054u, 3211994098u, 2734612965u, 3222159526u, 1007620686u, 0, TAN_TOLERANCE, 0},
+{ 836, 1064074694u, 3679267365u, 3237728785u, 1699558211u, 1064074702u, 1654930644u, 0, TAN_TOLERANCE, 0},
+{ 837, 1088079010u, 1826799031u, 1078709629u, 3986905229u, 1069698140u, 1279549780u, 0, TAN_TOLERANCE, 0},
+{ 838, 1052843785u, 351061688u, 3194386466u, 4105857588u, 1052843785u, 351068380u, 0, TAN_TOLERANCE, 0},
+{ 839, 1054128006u, 1365244058u, 1064457319u, 1452191426u, 1054128006u, 1365291479u, 0, TAN_TOLERANCE, 0},
+{ 840, 1064122385u, 2463030625u, 3215975031u, 3773488326u, 1064122393u, 2980179277u, 0, TAN_TOLERANCE, 0},
+{ 841, 3251276671u, 752664055u, 1065110394u, 1835931663u, 1070794184u, 1849724958u, 0, TAN_TOLERANCE, 0},
+{ 842, 1088045088u, 3496172149u, 1089617208u, 109068701u, 1073455741u, 2200569132u, 0, TAN_TOLERANCE, 0},
+{ 843, 3198135087u, 1636966254u, 1086098766u, 2016598298u, 3198135087u, 1636966916u, 0, TAN_TOLERANCE, 0},
+{ 844, 1050931318u, 3551516956u, 1097969102u, 1317953425u, 1050931318u, 3551517617u, 0, TAN_TOLERANCE, 0},
+{ 845, 3229832217u, 2977627788u, 1045339018u, 516058480u, 1071228652u, 1624784694u, 0, TAN_TOLERANCE, 0},
+{ 846, 3237408578u, 3901731263u, 3189566462u, 32272932u, 3218229315u, 1632924751u, 0, TAN_TOLERANCE, 0},
+{ 847, 1077281796u, 1956025297u, 3246628529u, 3840733905u, 1067000694u, 1129527548u, 0, TAN_TOLERANCE, 0},
+{ 848, 1099818036u, 561057891u, 3198494340u, 4271027193u, 3219784884u, 1730936066u, 0, TAN_TOLERANCE, 0},
+{ 849, 3250929921u, 692989850u, 3242630588u, 2492225971u, 1073186106u, 790327840u, 0, TAN_TOLERANCE, 0},
+{ 850, 3205479397u, 3439913962u, 1067477011u, 2973333638u, 3205479397u, 3450822138u, 0, TAN_TOLERANCE, 0},
+{ 851, 3213993989u, 877613377u, 1044917899u, 809672798u, 3213994103u, 3825407549u, 0, TAN_TOLERANCE, 0},
+{ 852, 3222171454u, 905426932u, 1046417457u, 1086320855u, 3219716531u, 431784327u, 0, TAN_TOLERANCE, 0},
+{ 853, 3246346629u, 2645567288u, 1051258339u, 557182478u, 3221881274u, 64244743u, 0, TAN_TOLERANCE, 0},
+{ 854, 3204057950u, 186287752u, 1061342054u, 4054003419u, 3204057950u, 187795268u, 0, TAN_TOLERANCE, 0},
+{ 855, 1097266673u, 3506889716u, 3243866036u, 519056371u, 1071339869u, 2789308492u, 0, TAN_TOLERANCE, 0},
+{ 856, 1042654053u, 2171898436u, 3246911982u, 1091500784u, 1042654053u, 2171898436u, 0, TAN_TOLERANCE, 0},
+{ 857, 3243647673u, 368493885u, 3222871893u, 1419055230u, 1076440210u, 3154672031u, 0, TAN_TOLERANCE, 0},
+{ 858, 1091950572u, 2010971245u, 3188804530u, 1518695799u, 3220286110u, 4209056249u, 0, TAN_TOLERANCE, 0},
+{ 859, 3205426509u, 1239207795u, 1040192984u, 2199481342u, 3205426509u, 1249304750u, 0, TAN_TOLERANCE, 0},
+{ 860, 3210978637u, 4264613432u, 3203460972u, 3558930895u, 3210978640u, 1980632273u, 0, TAN_TOLERANCE, 0},
+{ 861, 1050299283u, 3772748958u, 3227667376u, 309688336u, 1050299283u, 3772749337u, 0, TAN_TOLERANCE, 0},
+{ 862, 3230743041u, 1077949160u, 1075769893u, 2405271377u, 1070180192u, 446368177u, 0, TAN_TOLERANCE, 0},
+{ 863, 1091835152u, 3751608506u, 3232278094u, 930375071u, 3217726898u, 3481548138u, 0, TAN_TOLERANCE, 0},
+{ 864, 3198617153u, 1518334131u, 3205247482u, 791756713u, 3198617153u, 1518335148u, 0, TAN_TOLERANCE, 0},
+{ 865, 1047317453u, 2825203170u, 3245054001u, 1822981827u, 1047317453u, 2825203178u, 0, TAN_TOLERANCE, 0},
+{ 866, 1100016363u, 514474738u, 1089072073u, 3300845441u, 3217319144u, 2916802364u, 0, TAN_TOLERANCE, 0},
+{ 867, 3216391250u, 247369460u, 3197320093u, 687450958u, 3216394925u, 3233522059u, 0, TAN_TOLERANCE, 0},
+{ 868, 1104161422u, 2722237629u, 1058272368u, 90602316u, 1073200343u, 2302788437u, 0, TAN_TOLERANCE, 0},
+{ 869, 3208098435u, 1845900544u, 3231520830u, 3389751458u, 3208098435u, 2136608077u, 0, TAN_TOLERANCE, 0},
+{ 870, 3247535245u, 737689911u, 3195377751u, 3462616966u, 3219253037u, 3883211308u, 0, TAN_TOLERANCE, 0},
+{ 871, 3223538384u, 3620285831u, 1055501023u, 2708056059u, 3217870312u, 2224856412u, 0, TAN_TOLERANCE, 0},
+{ 872, 3219464996u, 4073430285u, 1056206159u, 172017902u, 3219709169u, 2516376400u, 0, TAN_TOLERANCE, 0},
+{ 873, 3212869638u, 2799176222u, 1052706894u, 4083892667u, 3212869662u, 211559933u, 0, TAN_TOLERANCE, 0},
+{ 874, 3202279557u, 1562351330u, 1069705601u, 1247765260u, 3202279557u, 1562508809u, 0, TAN_TOLERANCE, 0},
+{ 875, 3232717299u, 51853475u, 3189080201u, 2783553144u, 3221383237u, 3613213752u, 0, TAN_TOLERANCE, 0},
+{ 876, 3219454353u, 3851781549u, 3241598113u, 514064046u, 3219692168u, 1685602423u, 0, TAN_TOLERANCE, 0},
+{ 877, 1100045965u, 934745487u, 3248182437u, 2798581921u, 3217714806u, 3046333778u, 0, TAN_TOLERANCE, 0},
+{ 878, 3213082493u, 2948648757u, 3232177250u, 4278702895u, 3213082533u, 3433940202u, 0, TAN_TOLERANCE, 0},
+{ 879, 1072485724u, 4259101461u, 1061606772u, 84229920u, 1072968884u, 431127016u, 0, TAN_TOLERANCE, 0},
+{ 880, 3198075559u, 3891230598u, 1095924595u, 3049217547u, 3198075559u, 3891231204u, 0, TAN_TOLERANCE, 0},
+{ 881, 1077353053u, 3806018919u, 3243191216u, 280177341u, 1073754255u, 3810288957u, 0, TAN_TOLERANCE, 0},
+{ 882, 1060624530u, 3900344258u, 1063647809u, 4206745890u, 1060624530u, 4196557767u, 0, TAN_TOLERANCE, 0},
+{ 883, 3227707336u, 2126253040u, 3207248026u, 808507485u, 3219040601u, 2852753536u, 0, TAN_TOLERANCE, 0},
+{ 884, 1086090317u, 3465685634u, 3230391053u, 3754958214u, 1071200193u, 1669130251u, 0, TAN_TOLERANCE, 0},
+{ 885, 1102861084u, 461094531u, 1101110393u, 1316091396u, 1072468733u, 843744847u, 0, TAN_TOLERANCE, 0},
+{ 886, 1064980314u, 4197635149u, 1091873113u, 1240127141u, 1064980338u, 2969927074u, 0, TAN_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 3213440672u, 2883250875u, 0, TAN_TOLERANCE, 0},
+{ 888, 3213429165u, 3744663425u, 3212482771u, 953662066u, 3213429247u, 2691908692u, 0, TAN_TOLERANCE, 0},
+{ 889, 1085171305u, 3564196690u, 3228101916u, 904305212u, 3221639481u, 1195407422u, 0, TAN_TOLERANCE, 0},
+{ 890, 1048333111u, 3566257266u, 3235138829u, 2734275140u, 1048333111u, 3566257295u, 0, TAN_TOLERANCE, 0},
+{ 891, 3243948477u, 606044282u, 3241318094u, 2446416887u, 3219064278u, 3185355282u, 0, TAN_TOLERANCE, 0},
+{ 892, 1041627284u, 2336116589u, 3197594053u, 2296925138u, 1041627284u, 2336116589u, 0, TAN_TOLERANCE, 0},
+{ 893, 1058567659u, 907670625u, 3240769036u, 1827119006u, 1058567659u, 927652723u, 0, TAN_TOLERANCE, 0},
+{ 894, 1044467183u, 2818710946u, 3246059905u, 553394170u, 1044467183u, 2818710946u, 0, TAN_TOLERANCE, 0},
+{ 895, 3189504094u, 4099522736u, 3232742168u, 3718083858u, 3189504094u, 4099522736u, 0, TAN_TOLERANCE, 0},
+{ 896, 1092371276u, 1059279404u, 1080245336u, 175941677u, 1072889821u, 515486077u, 0, TAN_TOLERANCE, 0},
+{ 897, 1105189691u, 1650862428u, 1061816101u, 1723201723u, 3218686305u, 2616609059u, 0, TAN_TOLERANCE, 0},
+{ 898, 3239012814u, 2462163405u, 3218946201u, 3876535372u, 3219344333u, 2502875662u, 0, TAN_TOLERANCE, 0},
+{ 899, 1084392886u, 495844137u, 1073721460u, 772777946u, 3220942669u, 3586727170u, 0, TAN_TOLERANCE, 0},
+{ 900, 1052415330u, 458757721u, 3245680321u, 3609892707u, 1052415330u, 458763983u, 0, TAN_TOLERANCE, 0},
+{ 901, 3193282956u, 2533012202u, 1079980803u, 3592268374u, 3193282956u, 2533012203u, 0, TAN_TOLERANCE, 0},
+{ 902, 3203364780u, 4108274117u, 1063045844u, 571992389u, 3203364780u, 4108938846u, 0, TAN_TOLERANCE, 0},
+{ 903, 1090567271u, 3541110973u, 1096296754u, 3118427427u, 3221848883u, 3041741205u, 0, TAN_TOLERANCE, 0},
+{ 904, 3193980043u, 1213941007u, 1105433735u, 2172963370u, 3193980043u, 1213941008u, 0, TAN_TOLERANCE, 0},
+{ 905, 1096853359u, 272190288u, 1095452370u, 4026581530u, 3220146629u, 3829308268u, 0, TAN_TOLERANCE, 0},
+{ 906, 1095583909u, 2843638672u, 1100510986u, 3190536898u, 3223757143u, 2541776483u, 0, TAN_TOLERANCE, 0},
+{ 907, 1083757094u, 2014317727u, 3247389683u, 2428462015u, 3221228537u, 1632670009u, 0, TAN_TOLERANCE, 0},
+{ 908, 1093976717u, 688442200u, 1047852515u, 3035186380u, 3221648779u, 3546017257u, 0, TAN_TOLERANCE, 0},
+{ 909, 1076664212u, 1010095511u, 3221288076u, 405287991u, 3222861453u, 2232630897u, 0, TAN_TOLERANCE, 0},
+{ 910, 3252294615u, 2983070435u, 1089546472u, 2907918480u, 3221936746u, 378512360u, 0, TAN_TOLERANCE, 0},
+{ 911, 1082988121u, 81928569u, 1056007286u, 2740556321u, 1072918381u, 1311078634u, 0, TAN_TOLERANCE, 0},
+{ 912, 1041110867u, 2076689028u, 1081558619u, 3039159031u, 1041110867u, 2076689028u, 0, TAN_TOLERANCE, 0},
+{ 913, 1047307438u, 1376882094u, 3211003208u, 1296286481u, 1047307438u, 1376882102u, 0, TAN_TOLERANCE, 0},
+{ 914, 1080114314u, 744133164u, 3200943494u, 955832216u, 3218506405u, 2741895831u, 0, TAN_TOLERANCE, 0},
+{ 915, 3226290326u, 176522478u, 1069999908u, 2891249491u, 1073785249u, 968808067u, 0, TAN_TOLERANCE, 0},
+{ 916, 1043564602u, 3685851715u, 3187829932u, 2363997529u, 1043564602u, 3685851715u, 0, TAN_TOLERANCE, 0},
+{ 917, 1040244055u, 3974431579u, 1052505165u, 2589067816u, 1040244055u, 3974431579u, 0, TAN_TOLERANCE, 0},
+{ 918, 3191496789u, 3819109588u, 1048561488u, 969143351u, 3191496789u, 3819109588u, 0, TAN_TOLERANCE, 0},
+{ 919, 1072639397u, 4246896124u, 1104584799u, 1940097860u, 1073189028u, 394587297u, 0, TAN_TOLERANCE, 0},
+{ 920, 1048038468u, 2228686199u, 3220231833u, 777624847u, 1048038468u, 2228686217u, 0, TAN_TOLERANCE, 0},
+{ 921, 3231467306u, 4189906558u, 3203004203u, 854242364u, 3217987474u, 2809199807u, 0, TAN_TOLERANCE, 0},
+{ 922, 1103910407u, 4089051094u, 3227282692u, 2693170723u, 1072129371u, 3206579039u, 0, TAN_TOLERANCE, 0},
+{ 923, 1045883607u, 1278581412u, 3239296746u, 1774588717u, 1045883607u, 1278581413u, 0, TAN_TOLERANCE, 0},
+{ 924, 3222372686u, 1794845306u, 1104879344u, 4135865182u, 3221677563u, 3455106662u, 0, TAN_TOLERANCE, 0},
+{ 925, 1106449055u, 754938390u, 1061291430u, 2010786993u, 1073861270u, 2475943364u, 0, TAN_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 3222026453u, 3087782240u, 0, TAN_TOLERANCE, 0},
+{ 927, 3231449194u, 567588900u, 3195452230u, 1421366017u, 3222708424u, 1627728438u, 0, TAN_TOLERANCE, 0},
+{ 928, 3225089755u, 2708717091u, 1071975971u, 1364590470u, 1074658153u, 719778775u, 0, TAN_TOLERANCE, 0},
+{ 929, 3252137283u, 3461956134u, 3207820115u, 1605709634u, 1072185530u, 2879754131u, 0, TAN_TOLERANCE, 0},
+{ 930, 1065302996u, 1497124553u, 1051715442u, 916736957u, 1065303036u, 102289035u, 0, TAN_TOLERANCE, 0},
+{ 931, 1058468363u, 834914365u, 1064667143u, 2839166298u, 1058468363u, 851408530u, 0, TAN_TOLERANCE, 0},
+{ 932, 1057279949u, 2139295776u, 1062816721u, 914592523u, 1057279949u, 2142372604u, 0, TAN_TOLERANCE, 0},
+{ 933, 3189636931u, 851569132u, 1058503154u, 1399378677u, 3189636931u, 851569132u, 0, TAN_TOLERANCE, 0},
+{ 934, 3233537697u, 3897202342u, 3245382590u, 246600375u, 3216203689u, 401387137u, 0, TAN_TOLERANCE, 0},
+{ 935, 3225460308u, 3620429520u, 1055627557u, 229305u, 1074744460u, 4064404770u, 0, TAN_TOLERANCE, 0},
+{ 936, 1083958833u, 3641997865u, 3206673888u, 93720614u, 1073787691u, 215264583u, 0, TAN_TOLERANCE, 0},
+{ 937, 3227808435u, 32766320u, 1062084905u, 3668443038u, 3217871959u, 3354835440u, 0, TAN_TOLERANCE, 0},
+{ 938, 3223298996u, 2039713492u, 3248699388u, 1346210821u, 1077010417u, 482375156u, 0, TAN_TOLERANCE, 0},
+{ 939, 1093050016u, 1335820726u, 3191756860u, 1808427032u, 1073512079u, 967050696u, 0, TAN_TOLERANCE, 0},
+{ 940, 1061442763u, 650692001u, 1103515670u, 2253348763u, 1061442763u, 1385052594u, 0, TAN_TOLERANCE, 0},
+{ 941, 3191395187u, 2372623300u, 3210185343u, 3200572848u, 3191395187u, 2372623300u, 0, TAN_TOLERANCE, 0},
+{ 942, 1100796069u, 762317532u, 3194595095u, 3192607437u, 1073352751u, 3603794870u, 0, TAN_TOLERANCE, 0},
+{ 943, 1062262701u, 217775356u, 3232827087u, 2969367386u, 1062262701u, 1887701620u, 0, TAN_TOLERANCE, 0},
+{ 944, 1057172551u, 3621353969u, 1077994795u, 3873976266u, 1057172551u, 3623759699u, 0, TAN_TOLERANCE, 0},
+{ 945, 1091301987u, 268372152u, 3221764390u, 3216978962u, 3215235964u, 874297491u, 0, TAN_TOLERANCE, 0},
+{ 946, 3246437611u, 142942404u, 1075322987u, 1746449109u, 3224811534u, 2937642332u, 0, TAN_TOLERANCE, 0},
+{ 947, 1104006296u, 496534875u, 3254522293u, 2532372502u, 1072324347u, 3485810959u, 0, TAN_TOLERANCE, 0},
+{ 948, 3250225541u, 2999955409u, 3222793392u, 1868977643u, 1069873914u, 3710748236u, 0, TAN_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 3215249682u, 302869483u, 0, TAN_TOLERANCE, 0},
+{ 950, 1068218799u, 73646871u, 3231442171u, 3711510104u, 1068220577u, 543559658u, 0, TAN_TOLERANCE, 0},
+{ 951, 1090483524u, 218135177u, 3198908856u, 3082199105u, 3217418345u, 3997909065u, 0, TAN_TOLERANCE, 0},
+{ 952, 1068068480u, 1061628117u, 3248859043u, 86776158u, 1068069852u, 1289410425u, 0, TAN_TOLERANCE, 0},
+{ 953, 3208484674u, 938869114u, 1087911145u, 2416710759u, 3208484674u, 1504888383u, 0, TAN_TOLERANCE, 0},
+{ 954, 1095576832u, 2970853959u, 3239543429u, 1887505029u, 1072009655u, 2105862278u, 0, TAN_TOLERANCE, 0},
+{ 955, 3237728787u, 1337895935u, 1076463812u, 1172733328u, 3222440122u, 597922583u, 0, TAN_TOLERANCE, 0},
+{ 956, 1049139928u, 1469010822u, 3229583535u, 551399515u, 1049139928u, 1469010900u, 0, TAN_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 3218923673u, 2384358106u, 0, TAN_TOLERANCE, 0},
+{ 958, 3242138780u, 2976596113u, 3192137295u, 3033242648u, 1068509184u, 1974852383u, 0, TAN_TOLERANCE, 0},
+{ 959, 1098698481u, 876810930u, 3197470945u, 2571587447u, 3220700972u, 2135854542u, 0, TAN_TOLERANCE, 0},
+{ 960, 3241770810u, 4007797282u, 3225853845u, 4069319648u, 1074958621u, 2334482095u, 0, TAN_TOLERANCE, 0},
+{ 961, 1047279982u, 3840538373u, 1043189552u, 3668774580u, 1047279982u, 3840538380u, 0, TAN_TOLERANCE, 0},
+{ 962, 3217611704u, 200857661u, 3229758439u, 3359367736u, 3217632498u, 3651422596u, 0, TAN_TOLERANCE, 0},
+{ 963, 3248797869u, 111868139u, 3227902082u, 2366064003u, 3224837493u, 4262218833u, 0, TAN_TOLERANCE, 0},
+{ 964, 1044195166u, 3510904416u, 3222131653u, 3822770497u, 1044195166u, 3510904416u, 0, TAN_TOLERANCE, 0},
+{ 965, 3242675715u, 789151814u, 1099269239u, 2958956055u, 1071542351u, 2822923563u, 0, TAN_TOLERANCE, 0},
+{ 966, 1084679320u, 722163228u, 1105524559u, 1534462169u, 3220227031u, 3860692921u, 0, TAN_TOLERANCE, 0},
+{ 967, 1046586062u, 2207037106u, 3208952465u, 1231254630u, 1046586062u, 2207037108u, 0, TAN_TOLERANCE, 0},
+{ 968, 3197884060u, 3838689849u, 3198769679u, 1302617170u, 3197884060u, 3838690298u, 0, TAN_TOLERANCE, 0},
+{ 969, 1085938906u, 2527556476u, 3240373426u, 124352692u, 3219084764u, 837253910u, 0, TAN_TOLERANCE, 0},
+{ 970, 3199540805u, 3502371499u, 1043411944u, 4190072016u, 3199540805u, 3502374638u, 0, TAN_TOLERANCE, 0},
+{ 971, 1064676142u, 1798470077u, 3200116917u, 3421833729u, 1064676155u, 2862378974u, 0, TAN_TOLERANCE, 0},
+{ 972, 3193514956u, 3653237931u, 3204255012u, 3683870669u, 3193514956u, 3653237932u, 0, TAN_TOLERANCE, 0},
+{ 973, 1053588582u, 376530104u, 1073853547u, 565755892u, 1053588582u, 376560924u, 0, TAN_TOLERANCE, 0},
+{ 974, 3242503851u, 558292492u, 1051772749u, 4267873474u, 1072080736u, 2047810030u, 0, TAN_TOLERANCE, 0},
+{ 975, 3224772709u, 509637100u, 3212030069u, 215050379u, 3217125353u, 3300016857u, 0, TAN_TOLERANCE, 0},
+{ 976, 1092057101u, 3571665665u, 3188628584u, 757824767u, 1070419438u, 3036822347u, 0, TAN_TOLERANCE, 0},
+{ 977, 3214799337u, 998858159u, 1063077962u, 436029885u, 3214799896u, 3581777165u, 0, TAN_TOLERANCE, 0},
+{ 978, 3205946965u, 996300405u, 3193842624u, 80548098u, 3205946965u, 1012629084u, 0, TAN_TOLERANCE, 0},
+{ 979, 3228848840u, 3876129407u, 3215332180u, 2226970413u, 1078593226u, 76695377u, 0, TAN_TOLERANCE, 0},
+{ 980, 3237608953u, 200013509u, 3224552716u, 414878724u, 3221888552u, 2440171309u, 0, TAN_TOLERANCE, 0},
+{ 981, 3230617093u, 309319541u, 1048979765u, 1261662434u, 1071398388u, 1401776306u, 0, TAN_TOLERANCE, 0},
+{ 982, 1089252639u, 4062255924u, 3224274128u, 4289485681u, 1068546479u, 529156651u, 0, TAN_TOLERANCE, 0},
+{ 983, 3236136084u, 1611969213u, 1053890378u, 3774617276u, 1073236095u, 2860272602u, 0, TAN_TOLERANCE, 0},
+{ 984, 1080412763u, 1752164782u, 3239587974u, 612223386u, 1077725009u, 3506920398u, 0, TAN_TOLERANCE, 0},
+{ 985, 1041545782u, 2024044989u, 1074932678u, 3259111307u, 1041545782u, 2024044989u, 0, TAN_TOLERANCE, 0},
+{ 986, 1053207518u, 2564965629u, 1093571065u, 169360454u, 1053207518u, 2564981166u, 0, TAN_TOLERANCE, 0},
+{ 987, 1089599090u, 1860101737u, 3191222372u, 1676437468u, 3220588076u, 3785071853u, 0, TAN_TOLERANCE, 0},
+{ 988, 1059802968u, 588387057u, 3192103292u, 2495288012u, 1059802968u, 699627027u, 0, TAN_TOLERANCE, 0},
+{ 989, 3193155705u, 659070058u, 1073095700u, 1393632068u, 3193155705u, 659070059u, 0, TAN_TOLERANCE, 0},
+{ 990, 3217683263u, 4276187829u, 3217553330u, 1868253275u, 3217706953u, 3445958854u, 0, TAN_TOLERANCE, 0},
+{ 991, 3223220272u, 2085481575u, 3215994784u, 800910002u, 3222276535u, 3117891452u, 0, TAN_TOLERANCE, 0},
+{ 992, 1056934836u, 1950570756u, 3200582211u, 941022151u, 1056934836u, 1953249555u, 0, TAN_TOLERANCE, 0},
+{ 993, 1057530368u, 2075610870u, 3250142022u, 3605152103u, 1057530368u, 2080712643u, 0, TAN_TOLERANCE, 0},
+{ 994, 3200839250u, 3792931748u, 3204857863u, 804393211u, 3200839250u, 3792952409u, 0, TAN_TOLERANCE, 0},
+{ 995, 3253646370u, 3430071177u, 3226288311u, 3652522729u, 1076083333u, 3008288258u, 0, TAN_TOLERANCE, 0},
+{ 996, 3201314702u, 236884699u, 3227874605u, 2193269825u, 3201314702u, 236907314u, 0, TAN_TOLERANCE, 0},
+{ 997, 1064936593u, 2744231849u, 1046186036u, 771053722u, 1064936615u, 2553321629u, 0, TAN_TOLERANCE, 0},
+{ 998, 1083996036u, 3000189819u, 1096500901u, 2057239777u, 3218072365u, 2964452311u, 0, TAN_TOLERANCE, 0},
+{ 999, 1093835581u, 205759408u, 3244643377u, 2702292618u, 3222001752u, 2794274903u, 0, TAN_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_TAN_H multiple inclusion protection
+
+// EOF tan.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/tanh.c b/cesar/ecos/packages/language/c/libm/current/tests/vectors/tanh.c
new file mode 100644
index 0000000000..e823f93b49
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/tanh.c
@@ -0,0 +1,116 @@
+//===========================================================================
+//
+// tanh.c
+//
+// Test of tanh() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage:
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+// Declarations for test system:
+//
+// TESTCASE_TYPE=CYG_TEST_MODULE
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include "vectors/vector_support.h"// extra support for math tests
+
+#include "vectors/tanh.h"
+
+// FUNCTIONS
+
+static void
+test( CYG_ADDRWORD data )
+{
+ cyg_ucount32 vec_size;
+ cyg_bool ret;
+
+ vec_size = sizeof(tanh_vec) / sizeof(Cyg_libm_test_double_vec_t);
+ ret = doTestVec( (CYG_ADDRWORD) &tanh, CYG_LIBM_TEST_VEC_DOUBLE,
+ CYG_LIBM_TEST_VEC_NONE, CYG_LIBM_TEST_VEC_DOUBLE,
+ &tanh_vec[0], vec_size );
+
+ if (ret==true)
+ {
+ CYG_TEST_PASS("tanh() is stable");
+ } // if
+ else
+ {
+ CYG_TEST_FAIL("tanh() failed tests");
+ } // else
+
+ CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for Math "
+ "library tanh() function");
+} // test()
+
+
+int
+main(int argc, char *argv[])
+{
+ CYG_TEST_INIT();
+
+ CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for Math library "
+ "tanh() function");
+
+ START_TEST( test );
+
+ CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+
+} // main()
+
+
+// EOF tanh.c
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/tanh.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/tanh.h
new file mode 100644
index 0000000000..b657b354d4
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/tanh.h
@@ -0,0 +1,1080 @@
+#ifndef CYGONCE_LIBM_TANH_H
+#define CYGONCE_LIBM_TANH_H
+//===========================================================================
+//
+// tanh.h
+//
+// Test vectors for testing of tanh() math library function
+//
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1998-02-13
+// Purpose:
+// Description:
+// Usage: #include "vectors/tanh.h"
+//
+//####DESCRIPTIONEND####
+//
+//===========================================================================
+
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include "vectors/vector_support.h"// extra support for math tests
+
+#define TANH_TOLERANCE 1.0E-04
+
+static const Cyg_libm_test_double_vec_t tanh_vec[] = {
+
+// AUTOMATICALLY GENERATED VECTORS START
+
+{ 1, 1074853420u, 2506787616u, 1090024059u, 3619148316u, 1072692378u, 1014448409u, 0, TANH_TOLERANCE, 0},
+{ 2, 3220250806u, 3176730980u, 1051524793u, 2993920299u, 3219735748u, 2718182253u, 0, TANH_TOLERANCE, 0},
+{ 3, 3226028315u, 2725707538u, 3232101343u, 2346810316u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 4, 1078922874u, 2088062470u, 3201242716u, 420891118u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 5, 3221200677u, 2636405208u, 1100049309u, 471635570u, 3220097871u, 3599209765u, 0, TANH_TOLERANCE, 0},
+{ 6, 1077828855u, 1746012320u, 1054478713u, 3333988501u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 7, 1066827528u, 183014794u, 3202039382u, 2016785810u, 1066827290u, 3880063380u, 0, TANH_TOLERANCE, 0},
+{ 8, 3219777490u, 2688957927u, 1046089230u, 2709029994u, 3219483454u, 1125363282u, 0, TANH_TOLERANCE, 0},
+{ 9, 1070330066u, 624574473u, 1045840574u, 3473266330u, 1070301526u, 862781689u, 0, TANH_TOLERANCE, 0},
+{ 10, 3217502754u, 1605286142u, 1068931671u, 4233776869u, 3217486329u, 2145582745u, 0, TANH_TOLERANCE, 0},
+{ 11, 1069780594u, 1857607719u, 3222889559u, 3417070006u, 1069770714u, 401076752u, 0, TANH_TOLERANCE, 0},
+{ 12, 1081579891u, 3981151660u, 1088899021u, 1332651746u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 13, 1075860838u, 3824988054u, 1066856791u, 2070129652u, 1072693247u, 2842765918u, 0, TANH_TOLERANCE, 0},
+{ 14, 3218045550u, 1372884064u, 1080833116u, 3229926662u, 3218004944u, 604169930u, 0, TANH_TOLERANCE, 0},
+{ 15, 1078097861u, 3217805330u, 3191644264u, 2014578707u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 16, 1080267391u, 265058758u, 3239903247u, 1630600647u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 17, 1073221381u, 1946677669u, 3198462609u, 926009897u, 1072495714u, 2851802077u, 0, TANH_TOLERANCE, 0},
+{ 18, 1073178875u, 2271884183u, 3203741999u, 2118617783u, 1072479881u, 1907835069u, 0, TANH_TOLERANCE, 0},
+{ 19, 3214772053u, 213658772u, 3249401130u, 314151656u, 3214771516u, 3554579438u, 0, TANH_TOLERANCE, 0},
+{ 20, 3228946464u, 1564829925u, 3197817016u, 497230814u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 21, 3219408362u, 2075329122u, 3231746400u, 169900577u, 3219255158u, 2089286575u, 0, TANH_TOLERANCE, 0},
+{ 22, 1067674434u, 541549344u, 1096608669u, 3119070100u, 1067673824u, 1035028173u, 0, TANH_TOLERANCE, 0},
+{ 23, 1075989871u, 567496114u, 1045286891u, 1969998540u, 1072693247u, 4092220034u, 0, TANH_TOLERANCE, 0},
+{ 24, 1069985379u, 1299369769u, 1049342524u, 4167404066u, 1069970014u, 3629210634u, 0, TANH_TOLERANCE, 0},
+{ 25, 3218302829u, 3348930841u, 1078472138u, 358457347u, 3218265246u, 746156169u, 0, TANH_TOLERANCE, 0},
+{ 26, 1073166449u, 2192461366u, 1099527247u, 3184735642u, 1072475030u, 1439194248u, 0, TANH_TOLERANCE, 0},
+{ 27, 1068590412u, 331696577u, 3189610016u, 793242270u, 1068588660u, 2611487107u, 0, TANH_TOLERANCE, 0},
+{ 28, 3229460262u, 2322696981u, 1083791358u, 3020766674u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 29, 1066922273u, 252085215u, 3214426435u, 4139068910u, 1066921987u, 890588541u, 0, TANH_TOLERANCE, 0},
+{ 30, 3221457149u, 105589263u, 1056316170u, 261630827u, 3220145390u, 1744926257u, 0, TANH_TOLERANCE, 0},
+{ 31, 1082047584u, 428765703u, 3251828686u, 2009972239u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 32, 1079693651u, 3517376586u, 3240257920u, 3304487302u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 33, 3224100728u, 237004814u, 3237899261u, 3364008659u, 3220176895u, 4294953152u, 0, TANH_TOLERANCE, 0},
+{ 34, 3214121920u, 472004928u, 3226869477u, 1186387580u, 3214121763u, 282713899u, 0, TANH_TOLERANCE, 0},
+{ 35, 1068906914u, 4085763910u, 1106394906u, 2684738273u, 1068903266u, 2272328782u, 0, TANH_TOLERANCE, 0},
+{ 36, 1069636551u, 2055490142u, 3231581370u, 3879040079u, 1069629628u, 2119989659u, 0, TANH_TOLERANCE, 0},
+{ 37, 3213093895u, 3725731239u, 1061652681u, 591292963u, 3213093854u, 2954887285u, 0, TANH_TOLERANCE, 0},
+{ 38, 3221869253u, 1147041027u, 3215417793u, 624695933u, 3220170315u, 2960779403u, 0, TANH_TOLERANCE, 0},
+{ 39, 3217587110u, 705725219u, 3238067573u, 1116238321u, 3217567824u, 4085004597u, 0, TANH_TOLERANCE, 0},
+{ 40, 3217852848u, 7287411u, 1045917232u, 116067742u, 3217822463u, 1655616480u, 0, TANH_TOLERANCE, 0},
+{ 41, 3226423734u, 3604989074u, 1066381836u, 545298780u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 42, 3221178088u, 1681476121u, 1060345752u, 3553822398u, 3220094461u, 32790421u, 0, TANH_TOLERANCE, 0},
+{ 43, 1080811562u, 3410480388u, 1052460275u, 1660607230u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 44, 1077682533u, 1494984673u, 3196647153u, 287894723u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 45, 1068516615u, 644548665u, 1081948134u, 2442134629u, 1068515181u, 4013422768u, 0, TANH_TOLERANCE, 0},
+{ 46, 1077068335u, 2312530895u, 3221584595u, 3379665576u, 1072693247u, 4294967295u, 0, TANH_TOLERANCE, 0},
+{ 47, 1079308159u, 3018463866u, 1086226574u, 404012923u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 48, 1071024755u, 1710279345u, 3251401196u, 3528946000u, 1070966559u, 4188915943u, 0, TANH_TOLERANCE, 0},
+{ 49, 1070973535u, 2164450219u, 1083520023u, 3312018966u, 1070921017u, 98347496u, 0, TANH_TOLERANCE, 0},
+{ 50, 1069831588u, 2648986431u, 1050330591u, 1474376550u, 1069820489u, 3042456577u, 0, TANH_TOLERANCE, 0},
+{ 51, 3214344972u, 1839068700u, 1077406406u, 3013052171u, 3214344718u, 2604353982u, 0, TANH_TOLERANCE, 0},
+{ 52, 1066416574u, 772102380u, 3220729740u, 4219039958u, 1066416485u, 838919666u, 0, TANH_TOLERANCE, 0},
+{ 53, 3223180765u, 3058618779u, 1046304788u, 3338676024u, 3220176894u, 2606621599u, 0, TANH_TOLERANCE, 0},
+{ 54, 1067949353u, 506286854u, 1094907481u, 2217000199u, 1067948256u, 3256716313u, 0, TANH_TOLERANCE, 0},
+{ 55, 1076136854u, 1147428263u, 1065432625u, 3034786717u, 1072693247u, 4273443146u, 0, TANH_TOLERANCE, 0},
+{ 56, 1075725296u, 2844125311u, 1082985198u, 2561492677u, 1072693246u, 3764088074u, 0, TANH_TOLERANCE, 0},
+{ 57, 3218876948u, 704542600u, 3222902057u, 2762779203u, 3218766355u, 4000984321u, 0, TANH_TOLERANCE, 0},
+{ 58, 3215409254u, 184131949u, 3249723525u, 1667366082u, 3215408207u, 1529188018u, 0, TANH_TOLERANCE, 0},
+{ 59, 3221512446u, 3904224140u, 1067056698u, 2942159914u, 3220151345u, 2904148002u, 0, TANH_TOLERANCE, 0},
+{ 60, 1080713919u, 426114282u, 3209056785u, 1083606355u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 61, 1082048697u, 3774123863u, 1106787580u, 2722107965u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 62, 1077519332u, 1377734762u, 1104232051u, 2377063483u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 63, 1072526287u, 1029739074u, 1105467109u, 3062201018u, 1072118796u, 4118103516u, 0, TANH_TOLERANCE, 0},
+{ 64, 3225304413u, 773857656u, 3214251949u, 335833884u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 65, 3216856098u, 1473865960u, 1103073830u, 4000427507u, 3216847733u, 232123791u, 0, TANH_TOLERANCE, 0},
+{ 66, 1081165135u, 4242092620u, 1067009473u, 14539161u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 67, 3214536170u, 1732245037u, 1101371955u, 1533536108u, 3214535807u, 1315557254u, 0, TANH_TOLERANCE, 0},
+{ 68, 3228182475u, 1833841275u, 1099430098u, 4144145552u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 69, 3227493247u, 935007012u, 3188865420u, 604442938u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 70, 3217389013u, 2211464602u, 1046255144u, 1635910526u, 3217375982u, 600658720u, 0, TANH_TOLERANCE, 0},
+{ 71, 1074725689u, 2549219008u, 3231633258u, 3733639385u, 1072691447u, 3387741538u, 0, TANH_TOLERANCE, 0},
+{ 72, 1075803633u, 1819374372u, 3202219056u, 2617077637u, 1072693247u, 1640287018u, 0, TANH_TOLERANCE, 0},
+{ 73, 1078616640u, 546465680u, 1048653554u, 532401530u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 74, 1066591187u, 2759019783u, 3221570188u, 3554409630u, 1066591047u, 1006540637u, 0, TANH_TOLERANCE, 0},
+{ 75, 3219222738u, 2527221960u, 1099107978u, 2696971136u, 3219114815u, 1376096383u, 0, TANH_TOLERANCE, 0},
+{ 76, 1079332208u, 173134582u, 1087299442u, 2877794600u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 77, 1076963290u, 547642046u, 3197285510u, 3521286127u, 1072693247u, 4294967273u, 0, TANH_TOLERANCE, 0},
+{ 78, 1073812126u, 1231582831u, 1090971734u, 1653446832u, 1072635309u, 2989295u, 0, TANH_TOLERANCE, 0},
+{ 79, 1070779719u, 3762182190u, 3252967851u, 2615360375u, 1070745453u, 2070604370u, 0, TANH_TOLERANCE, 0},
+{ 80, 3216563063u, 2588067350u, 3206610957u, 3551059728u, 3216557963u, 801826211u, 0, TANH_TOLERANCE, 0},
+{ 81, 3217464616u, 845263327u, 1073415902u, 1749010288u, 3217449387u, 250805u, 0, TANH_TOLERANCE, 0},
+{ 82, 3217110706u, 3092685191u, 3190678390u, 2872219490u, 3217103954u, 3350331893u, 0, TANH_TOLERANCE, 0},
+{ 83, 3220412207u, 4107255722u, 3205337291u, 3069068345u, 3219843345u, 256047763u, 0, TANH_TOLERANCE, 0},
+{ 84, 3227213641u, 2294867524u, 3216653996u, 2860384670u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 85, 3214297870u, 2265437201u, 3240198679u, 1234948614u, 3214297639u, 3221872192u, 0, TANH_TOLERANCE, 0},
+{ 86, 3219505657u, 1186945904u, 3251167793u, 1896750851u, 3219320152u, 2185885166u, 0, TANH_TOLERANCE, 0},
+{ 87, 1075284022u, 3686084548u, 1079286273u, 3309277689u, 1072693215u, 1875502271u, 0, TANH_TOLERANCE, 0},
+{ 88, 3221379088u, 3006860614u, 3231412671u, 2504194724u, 3220134572u, 2680984865u, 0, TANH_TOLERANCE, 0},
+{ 89, 3224614924u, 1948717780u, 1048317852u, 3791803982u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 90, 1070636471u, 4272034420u, 3192982124u, 1526175922u, 1070612646u, 3951514323u, 0, TANH_TOLERANCE, 0},
+{ 91, 3226943458u, 4108948538u, 1104691287u, 640541190u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 92, 3217743177u, 3259274853u, 1082507103u, 3677038020u, 3217717774u, 2850529195u, 0, TANH_TOLERANCE, 0},
+{ 93, 1076841042u, 3781708548u, 1096584871u, 1207386447u, 1072693247u, 4294966832u, 0, TANH_TOLERANCE, 0},
+{ 94, 3213861096u, 3011191657u, 1103798670u, 1096124830u, 3213860931u, 3971208009u, 0, TANH_TOLERANCE, 0},
+{ 95, 1071623631u, 2540404725u, 3240157452u, 4122845725u, 1071469194u, 1505927985u, 0, TANH_TOLERANCE, 0},
+{ 96, 1076303678u, 311336721u, 3214382367u, 4212533768u, 1072693247u, 4293279124u, 0, TANH_TOLERANCE, 0},
+{ 97, 1067916643u, 1769686293u, 3240200923u, 3538602249u, 1067915615u, 325439970u, 0, TANH_TOLERANCE, 0},
+{ 98, 1075081821u, 508056696u, 1103793878u, 776520138u, 1072693095u, 3017783498u, 0, TANH_TOLERANCE, 0},
+{ 99, 1080890481u, 4064962760u, 1077424413u, 819766631u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 100, 1074178362u, 2112385259u, 3227593179u, 1187058516u, 1072678768u, 381693332u, 0, TANH_TOLERANCE, 0},
+{ 101, 1076003603u, 2514398118u, 1076579751u, 870169764u, 1072693247u, 4130548044u, 0, TANH_TOLERANCE, 0},
+{ 102, 3227977024u, 1190259653u, 1069112254u, 3417249840u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 103, 3214634603u, 3467757357u, 3215075200u, 2168175352u, 3214634173u, 3865851572u, 0, TANH_TOLERANCE, 0},
+{ 104, 3226011647u, 1508888184u, 1060430241u, 3524949092u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 105, 3215238675u, 166402802u, 3237198975u, 3572369260u, 3215237941u, 3647655500u, 0, TANH_TOLERANCE, 0},
+{ 106, 1075575366u, 2441536203u, 3202753937u, 3658194573u, 1072693244u, 2031976466u, 0, TANH_TOLERANCE, 0},
+{ 107, 1070781516u, 2479742828u, 1062342831u, 4214154303u, 1070747103u, 1801754207u, 0, TANH_TOLERANCE, 0},
+{ 108, 1076105338u, 426896765u, 1066474375u, 2201754442u, 1072693247u, 4260151399u, 0, TANH_TOLERANCE, 0},
+{ 109, 3214503389u, 2055773734u, 3239267288u, 291396537u, 3214503046u, 4246773790u, 0, TANH_TOLERANCE, 0},
+{ 110, 3224385121u, 874125203u, 3210508124u, 4091098764u, 3220176895u, 4294967147u, 0, TANH_TOLERANCE, 0},
+{ 111, 1072007482u, 120488169u, 3241241441u, 1985269424u, 1071827020u, 3308157325u, 0, TANH_TOLERANCE, 0},
+{ 112, 3218073746u, 2243036871u, 3243941101u, 740033495u, 3218031479u, 4064057836u, 0, TANH_TOLERANCE, 0},
+{ 113, 3218862090u, 1176656356u, 1074261978u, 3588756231u, 3218754022u, 3974936801u, 0, TANH_TOLERANCE, 0},
+{ 114, 3228699543u, 3037249392u, 1061635587u, 1173102190u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 115, 3224626669u, 2882725208u, 1071440059u, 69225090u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 116, 3218954930u, 272319256u, 1072073912u, 2493997123u, 3218830490u, 2787918817u, 0, TANH_TOLERANCE, 0},
+{ 117, 1070303098u, 188610379u, 3232757923u, 2209647371u, 1070275785u, 2868756030u, 0, TANH_TOLERANCE, 0},
+{ 118, 3225224181u, 1990439193u, 1078073146u, 622849962u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 119, 1069718653u, 756052458u, 1081649113u, 2247475162u, 1069710129u, 3490933881u, 0, TANH_TOLERANCE, 0},
+{ 120, 1071060248u, 3878055211u, 3222407050u, 2979438623u, 1070997900u, 1162556570u, 0, TANH_TOLERANCE, 0},
+{ 121, 3214165365u, 2676398686u, 1105124431u, 3631096636u, 3214165192u, 464247846u, 0, TANH_TOLERANCE, 0},
+{ 122, 1071370846u, 1697791764u, 3198136112u, 2299842819u, 1071264055u, 4133345906u, 0, TANH_TOLERANCE, 0},
+{ 123, 1074939040u, 1931502677u, 3215264397u, 3016456382u, 1072692795u, 1553366917u, 0, TANH_TOLERANCE, 0},
+{ 124, 1073302002u, 343404215u, 1061072607u, 4266232536u, 1072522724u, 3704959248u, 0, TANH_TOLERANCE, 0},
+{ 125, 3225502196u, 4140316002u, 1082896196u, 868256971u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 126, 1074374234u, 1864139509u, 3187675097u, 3084482407u, 1072686376u, 1962441622u, 0, TANH_TOLERANCE, 0},
+{ 127, 3220191323u, 2427162817u, 3234748208u, 2715105792u, 3219688914u, 3013850408u, 0, TANH_TOLERANCE, 0},
+{ 128, 1070891968u, 3943389284u, 1046724025u, 3626825684u, 1070847739u, 3439563777u, 0, TANH_TOLERANCE, 0},
+{ 129, 1067443098u, 967350972u, 1093012318u, 448002663u, 1067442422u, 3845472712u, 0, TANH_TOLERANCE, 0},
+{ 130, 3228777187u, 105058217u, 1069733884u, 171786224u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 131, 3213731756u, 2863482262u, 3204997271u, 877784425u, 3213731620u, 3648045742u, 0, TANH_TOLERANCE, 0},
+{ 132, 3216260801u, 2801782962u, 3213604117u, 762347195u, 3216258042u, 2678983680u, 0, TANH_TOLERANCE, 0},
+{ 133, 3224049543u, 2317950339u, 3246333414u, 2135700283u, 3220176895u, 4294936411u, 0, TANH_TOLERANCE, 0},
+{ 134, 1069099309u, 4171919805u, 1082858682u, 2180920863u, 1069094020u, 3820197062u, 0, TANH_TOLERANCE, 0},
+{ 135, 3221197660u, 1918836931u, 1083603224u, 3137821660u, 3220097424u, 1722624890u, 0, TANH_TOLERANCE, 0},
+{ 136, 1081882778u, 3456203663u, 3235600523u, 2335688936u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 137, 1066396570u, 4170235262u, 1051824459u, 521583737u, 1066396401u, 2543673130u, 0, TANH_TOLERANCE, 0},
+{ 138, 1075056847u, 1296623194u, 3250673860u, 2442872540u, 1072693063u, 3166683353u, 0, TANH_TOLERANCE, 0},
+{ 139, 1071121461u, 289979405u, 1049514449u, 3865737145u, 1071051518u, 2290983565u, 0, TANH_TOLERANCE, 0},
+{ 140, 1074250368u, 3699090239u, 1054539840u, 3259249360u, 1072682236u, 3608691743u, 0, TANH_TOLERANCE, 0},
+{ 141, 1079640884u, 1619819023u, 1045993352u, 1022642459u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 142, 1075141548u, 19455098u, 3229182089u, 2096003654u, 1072693151u, 1888247792u, 0, TANH_TOLERANCE, 0},
+{ 143, 1074200784u, 3803689997u, 1071630912u, 2263729518u, 1072679951u, 1586915304u, 0, TANH_TOLERANCE, 0},
+{ 144, 1080385741u, 2816837387u, 1063422305u, 2597606398u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 145, 1072245897u, 3680967506u, 1040201163u, 179224723u, 1071972935u, 363515293u, 0, TANH_TOLERANCE, 0},
+{ 146, 3213795591u, 978126928u, 1101553990u, 4047893399u, 3213795441u, 2507481145u, 0, TANH_TOLERANCE, 0},
+{ 147, 3221273469u, 4059818629u, 1042678728u, 3640293589u, 3220113888u, 3437106909u, 0, TANH_TOLERANCE, 0},
+{ 148, 3228541096u, 3383497159u, 1070002807u, 1527313008u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 149, 3216339167u, 2599946514u, 1104170406u, 2738675352u, 3216335891u, 1051626081u, 0, TANH_TOLERANCE, 0},
+{ 150, 1081115375u, 3616571377u, 1060859316u, 1130603218u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 151, 1073931644u, 3859211180u, 1067940450u, 1744531824u, 1072656336u, 429068867u, 0, TANH_TOLERANCE, 0},
+{ 152, 1065900012u, 1958025850u, 3236511256u, 2472176453u, 1065899937u, 1394244149u, 0, TANH_TOLERANCE, 0},
+{ 153, 3223669905u, 182132862u, 3250520938u, 3924356991u, 3220176895u, 4284838839u, 0, TANH_TOLERANCE, 0},
+{ 154, 3224210428u, 35632886u, 3209806504u, 1453402523u, 3220176895u, 4294964644u, 0, TANH_TOLERANCE, 0},
+{ 155, 1076182070u, 743225214u, 3202890678u, 142917400u, 1072693247u, 4284170650u, 0, TANH_TOLERANCE, 0},
+{ 156, 1075442096u, 1472665012u, 3203138231u, 256588219u, 1072693238u, 1077098108u, 0, TANH_TOLERANCE, 0},
+{ 157, 1079253522u, 1062927000u, 1061134072u, 931677439u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 158, 1069912068u, 2320910576u, 1055663370u, 288059864u, 1069898851u, 1531188271u, 0, TANH_TOLERANCE, 0},
+{ 159, 1075812365u, 1448349062u, 3199478070u, 3454027134u, 1072693247u, 1811377479u, 0, TANH_TOLERANCE, 0},
+{ 160, 3224875886u, 4215445172u, 3196654963u, 2231888973u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 161, 3227757863u, 40413554u, 3232578253u, 983832844u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 162, 3221624382u, 3995725873u, 1050082319u, 777231627u, 3220160190u, 46615835u, 0, TANH_TOLERANCE, 0},
+{ 163, 1066152450u, 672789828u, 3253385962u, 2982787335u, 1066152333u, 1814400134u, 0, TANH_TOLERANCE, 0},
+{ 164, 1072585179u, 2075971825u, 1070166500u, 4034633931u, 1072146078u, 896769727u, 0, TANH_TOLERANCE, 0},
+{ 165, 3218434785u, 1018222907u, 3244621407u, 3090050495u, 3218384633u, 3394350018u, 0, TANH_TOLERANCE, 0},
+{ 166, 1071875189u, 937732557u, 3200798890u, 2557898276u, 1071737093u, 3916098959u, 0, TANH_TOLERANCE, 0},
+{ 167, 1075196588u, 130346162u, 3223590310u, 275568693u, 1072693184u, 2361710702u, 0, TANH_TOLERANCE, 0},
+{ 168, 1065967541u, 3807416441u, 1075961161u, 3706820266u, 1065967456u, 3459855166u, 0, TANH_TOLERANCE, 0},
+{ 169, 3219244733u, 1710131411u, 1078123323u, 1900790503u, 3219138047u, 3814235172u, 0, TANH_TOLERANCE, 0},
+{ 170, 3226236449u, 3420420033u, 3210844787u, 588423066u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 171, 1067509906u, 1160162008u, 3246307879u, 4265764460u, 1067509503u, 2601735024u, 0, TANH_TOLERANCE, 0},
+{ 172, 1080523338u, 366653268u, 3188814424u, 466059202u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 173, 3222433435u, 1325936170u, 3221436876u, 680097612u, 3220176478u, 4252589573u, 0, TANH_TOLERANCE, 0},
+{ 174, 3225711052u, 1827735934u, 3200554324u, 2875599271u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 175, 3213050498u, 3117037091u, 3239246636u, 15838845u, 3213050461u, 2222620939u, 0, TANH_TOLERANCE, 0},
+{ 176, 1067702644u, 749718883u, 3223587064u, 1523766569u, 1067701992u, 3622799087u, 0, TANH_TOLERANCE, 0},
+{ 177, 1066853747u, 1966536294u, 3250158026u, 699164258u, 1066853497u, 1898707226u, 0, TANH_TOLERANCE, 0},
+{ 178, 1079174067u, 3759049394u, 1106085272u, 1183789499u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 179, 1074910167u, 1970107747u, 1095245453u, 2308233883u, 1072692683u, 3577819256u, 0, TANH_TOLERANCE, 0},
+{ 180, 1076367836u, 1491017852u, 1041444355u, 1723375725u, 1072693247u, 4294333058u, 0, TANH_TOLERANCE, 0},
+{ 181, 3219775798u, 1141349287u, 1097465301u, 3403438584u, 3219482519u, 2595676565u, 0, TANH_TOLERANCE, 0},
+{ 182, 3224280452u, 1711085243u, 3250239076u, 1377484108u, 3220176895u, 4294966385u, 0, TANH_TOLERANCE, 0},
+{ 183, 1079510651u, 2880275004u, 1084039594u, 1611394950u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 184, 3224784251u, 2626629370u, 1063771493u, 1499080813u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 185, 1068862751u, 3936262414u, 1103919063u, 3175668759u, 1068859424u, 3440133182u, 0, TANH_TOLERANCE, 0},
+{ 186, 3217418903u, 1270950554u, 3194616071u, 3680565379u, 3217405029u, 3952562788u, 0, TANH_TOLERANCE, 0},
+{ 187, 3217585407u, 1066985223u, 3221613219u, 4089383168u, 3217566182u, 3374525206u, 0, TANH_TOLERANCE, 0},
+{ 188, 3220204567u, 4017329311u, 3208334452u, 1667591498u, 3219699702u, 2508843272u, 0, TANH_TOLERANCE, 0},
+{ 189, 1077678397u, 3154656624u, 1061894279u, 3886344038u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 190, 1068478737u, 977586119u, 3209762784u, 953839852u, 1068476088u, 3411453719u, 0, TANH_TOLERANCE, 0},
+{ 191, 1081896575u, 143071571u, 3206165386u, 913097445u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 192, 3213634128u, 1371169579u, 1057079837u, 2594818628u, 3213634011u, 4114428713u, 0, TANH_TOLERANCE, 0},
+{ 193, 3228724664u, 2259342224u, 3217432469u, 1824221478u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 194, 3227960407u, 1576604497u, 1079368611u, 185078728u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 195, 3221679427u, 444800035u, 3243343143u, 1734989302u, 3220163343u, 3657733008u, 0, TANH_TOLERANCE, 0},
+{ 196, 1072748883u, 130452005u, 1041548088u, 2158433515u, 1072238149u, 3617271211u, 0, TANH_TOLERANCE, 0},
+{ 197, 3225258784u, 1941318385u, 1045807374u, 792193370u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 198, 3225716754u, 1299392207u, 3212131720u, 3205732280u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 199, 1079824436u, 3035093505u, 1052187689u, 3287702190u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 200, 3227801892u, 2160225215u, 1102624859u, 836655570u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 201, 1079946410u, 3360816360u, 3246176356u, 172860634u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 202, 1073092940u, 146831910u, 1051558014u, 2340722078u, 1072444136u, 1759342658u, 0, TANH_TOLERANCE, 0},
+{ 203, 3224124895u, 1603798153u, 3207725532u, 1099413093u, 3220176895u, 4294957514u, 0, TANH_TOLERANCE, 0},
+{ 204, 3227804010u, 2429340443u, 3190303581u, 3223770005u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 205, 1073785807u, 955542166u, 3230415151u, 275583938u, 1072629283u, 1074678205u, 0, TANH_TOLERANCE, 0},
+{ 206, 1078291818u, 513397822u, 1090646554u, 2089321329u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 207, 3214141396u, 2782073372u, 1046063872u, 4023829068u, 3214141232u, 1525062828u, 0, TANH_TOLERANCE, 0},
+{ 208, 1079690454u, 3242223094u, 3194111199u, 4264674108u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 209, 3225927909u, 3506346169u, 1047020885u, 1742757458u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 210, 3214684573u, 1265459564u, 3193450280u, 3650514880u, 3214684106u, 2321174768u, 0, TANH_TOLERANCE, 0},
+{ 211, 1075464434u, 1525260440u, 3235452527u, 2612331392u, 1072693239u, 3343303113u, 0, TANH_TOLERANCE, 0},
+{ 212, 3227697400u, 1263613754u, 3219096387u, 635677201u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 213, 3217806423u, 4140947288u, 3200792376u, 2013265346u, 3217778219u, 1500451800u, 0, TANH_TOLERANCE, 0},
+{ 214, 3227954296u, 1912759945u, 3237045253u, 1351396825u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 215, 3228282218u, 1001433078u, 3206926643u, 2741676659u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 216, 1075680726u, 1088945233u, 1085095743u, 3986114865u, 1072693246u, 1809567207u, 0, TANH_TOLERANCE, 0},
+{ 217, 3219928361u, 831239754u, 1099828675u, 3071308141u, 3219562775u, 3422341860u, 0, TANH_TOLERANCE, 0},
+{ 218, 3222688769u, 3473592372u, 1102759382u, 1309576357u, 3220176836u, 2359199832u, 0, TANH_TOLERANCE, 0},
+{ 219, 3229166610u, 2042340367u, 1091945628u, 2062772374u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 220, 3214688631u, 1840632537u, 1096533424u, 807510337u, 3214688161u, 2546146924u, 0, TANH_TOLERANCE, 0},
+{ 221, 3224111690u, 144814872u, 3212698915u, 2282965697u, 3220176895u, 4294955331u, 0, TANH_TOLERANCE, 0},
+{ 222, 1073333582u, 2552499583u, 3229111426u, 1470130815u, 1072532310u, 2637908577u, 0, TANH_TOLERANCE, 0},
+{ 223, 3227364425u, 2858583811u, 1089760910u, 6360994u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 224, 3215042145u, 1614537194u, 1075198900u, 4088705365u, 3215041687u, 1726146854u, 0, TANH_TOLERANCE, 0},
+{ 225, 3228918974u, 3545570051u, 1065221325u, 1629217700u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 226, 1072744324u, 1813392963u, 3235313361u, 3772501596u, 1072234610u, 661468199u, 0, TANH_TOLERANCE, 0},
+{ 227, 3215677054u, 2406734491u, 1042055360u, 89226663u, 3215675353u, 3862932932u, 0, TANH_TOLERANCE, 0},
+{ 228, 3214625449u, 1618759139u, 3194723421u, 3888234802u, 3214625026u, 10619074u, 0, TANH_TOLERANCE, 0},
+{ 229, 1068988736u, 3590035633u, 3212424262u, 2892456615u, 1068984439u, 3719711940u, 0, TANH_TOLERANCE, 0},
+{ 230, 3213011732u, 2431246964u, 3241512456u, 183850734u, 3213011698u, 2928537796u, 0, TANH_TOLERANCE, 0},
+{ 231, 1076918189u, 3088319870u, 3211544311u, 862225364u, 1072693247u, 4294967206u, 0, TANH_TOLERANCE, 0},
+{ 232, 3224808904u, 3495352775u, 1058576726u, 596957268u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 233, 1066476292u, 1839214511u, 3205004060u, 1923240983u, 1066476187u, 2556221634u, 0, TANH_TOLERANCE, 0},
+{ 234, 1069608200u, 739619702u, 3223356436u, 2689885273u, 1069601779u, 2957113876u, 0, TANH_TOLERANCE, 0},
+{ 235, 3216053611u, 2143376228u, 1098306332u, 3760236188u, 3216051952u, 2092758873u, 0, TANH_TOLERANCE, 0},
+{ 236, 1074621795u, 671680995u, 1091262633u, 2315535361u, 1072690572u, 3470829674u, 0, TANH_TOLERANCE, 0},
+{ 237, 3219408869u, 2493598049u, 3194927008u, 1689107592u, 3219255506u, 1019995372u, 0, TANH_TOLERANCE, 0},
+{ 238, 3213058631u, 1578976988u, 1066368383u, 2117279163u, 3213058593u, 1870641139u, 0, TANH_TOLERANCE, 0},
+{ 239, 3221939535u, 3425290087u, 1098487295u, 1263412017u, 3220171861u, 1494771509u, 0, TANH_TOLERANCE, 0},
+{ 240, 3217869948u, 3635396812u, 1070999426u, 3965655689u, 3217838734u, 1233391676u, 0, TANH_TOLERANCE, 0},
+{ 241, 1069633530u, 2183973116u, 1101098363u, 1118613350u, 1069626662u, 1134433172u, 0, TANH_TOLERANCE, 0},
+{ 242, 3221946089u, 199516350u, 1078368488u, 164621458u, 3220171985u, 2155767731u, 0, TANH_TOLERANCE, 0},
+{ 243, 3212871842u, 3570940805u, 3230316437u, 3596080877u, 3212871819u, 1253083702u, 0, TANH_TOLERANCE, 0},
+{ 244, 3217646749u, 980880313u, 1079833442u, 884465057u, 3217625256u, 410689042u, 0, TANH_TOLERANCE, 0},
+{ 245, 1080054180u, 2558179220u, 1052873711u, 1233598120u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 246, 1067038165u, 1909994277u, 1085015978u, 2991527452u, 1067037811u, 2026092876u, 0, TANH_TOLERANCE, 0},
+{ 247, 1070292444u, 1680290941u, 1074309900u, 2943870846u, 1070265607u, 1158571911u, 0, TANH_TOLERANCE, 0},
+{ 248, 1069981892u, 1451927357u, 3228615456u, 1502585517u, 1069966634u, 3731947704u, 0, TANH_TOLERANCE, 0},
+{ 249, 3224677615u, 751136990u, 3230392165u, 3493275472u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 250, 1079491599u, 1209623292u, 3238056647u, 979495322u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 251, 3228404200u, 1717672108u, 1048120593u, 531240316u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 252, 1068854987u, 3548721654u, 1086112947u, 3391817224u, 1068851715u, 761198005u, 0, TANH_TOLERANCE, 0},
+{ 253, 1074691123u, 2758195125u, 1100880260u, 2028440924u, 1072691194u, 767085901u, 0, TANH_TOLERANCE, 0},
+{ 254, 1076883861u, 2750123373u, 3232200256u, 1086294931u, 1072693247u, 4294967055u, 0, TANH_TOLERANCE, 0},
+{ 255, 1065978768u, 2986160931u, 1076097908u, 2540046258u, 1065978681u, 3777549083u, 0, TANH_TOLERANCE, 0},
+{ 256, 3224990842u, 451471221u, 1064816262u, 4187644495u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 257, 1080585860u, 2439500162u, 1065280276u, 1979490284u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 258, 1065581656u, 2283342035u, 1078398157u, 1345997553u, 1065581617u, 4289095703u, 0, TANH_TOLERANCE, 0},
+{ 259, 3219540804u, 179066662u, 1103272172u, 1217337578u, 3219342777u, 584216337u, 0, TANH_TOLERANCE, 0},
+{ 260, 3218902409u, 3779303391u, 3210023352u, 3115946280u, 3218787406u, 3376448869u, 0, TANH_TOLERANCE, 0},
+{ 261, 3213961394u, 286247089u, 1085153597u, 713645369u, 3213961288u, 3547746481u, 0, TANH_TOLERANCE, 0},
+{ 262, 1077941860u, 1468283899u, 1042831668u, 2022736418u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 263, 1076847649u, 3305564080u, 1065483445u, 482392433u, 1072693247u, 4294966877u, 0, TANH_TOLERANCE, 0},
+{ 264, 3216375871u, 2256346551u, 3222430705u, 2071674991u, 3216372332u, 768731038u, 0, TANH_TOLERANCE, 0},
+{ 265, 3216607607u, 2295269094u, 1084451053u, 2773103941u, 3216602078u, 1439428617u, 0, TANH_TOLERANCE, 0},
+{ 266, 1075028218u, 1482721827u, 1092243422u, 3125409590u, 1072693018u, 3260391029u, 0, TANH_TOLERANCE, 0},
+{ 267, 3221065973u, 1381740563u, 1071545057u, 2918235653u, 3220075282u, 1703589823u, 0, TANH_TOLERANCE, 0},
+{ 268, 3226133060u, 1105857967u, 3241990046u, 2703723225u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 269, 1066084243u, 174689677u, 1079333374u, 3947057014u, 1066084138u, 3270329839u, 0, TANH_TOLERANCE, 0},
+{ 270, 1077878947u, 2023082423u, 3242081486u, 1169047927u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 271, 1070817355u, 3742487766u, 1043425732u, 194972788u, 1070779930u, 515450847u, 0, TANH_TOLERANCE, 0},
+{ 272, 3220083283u, 2136071361u, 3211529757u, 993675115u, 3219636252u, 1007735063u, 0, TANH_TOLERANCE, 0},
+{ 273, 3219954837u, 210772141u, 3241441539u, 580731413u, 3219575893u, 3207362503u, 0, TANH_TOLERANCE, 0},
+{ 274, 1078111773u, 1751560711u, 1074522705u, 180987057u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 275, 1071997471u, 2552236599u, 1088658621u, 2112468655u, 1071820440u, 2818435747u, 0, TANH_TOLERANCE, 0},
+{ 276, 3213407865u, 1578223762u, 3224596567u, 2456166162u, 3213407786u, 3283589150u, 0, TANH_TOLERANCE, 0},
+{ 277, 1070041301u, 2110924310u, 1086207177u, 3161208323u, 1070024153u, 713852193u, 0, TANH_TOLERANCE, 0},
+{ 278, 3223474786u, 2352173188u, 1079361728u, 4070222179u, 3220176895u, 4096103338u, 0, TANH_TOLERANCE, 0},
+{ 279, 1080041384u, 2481562701u, 1090937016u, 3809489716u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 280, 3215877019u, 330905705u, 1086260896u, 90264431u, 3215874683u, 2935392842u, 0, TANH_TOLERANCE, 0},
+{ 281, 1065895785u, 4162008079u, 3194387916u, 759522153u, 1065895711u, 1860972907u, 0, TANH_TOLERANCE, 0},
+{ 282, 1075772157u, 1839697482u, 3216442625u, 2211508949u, 1072693247u, 919725479u, 0, TANH_TOLERANCE, 0},
+{ 283, 3227787115u, 3736863454u, 1063475914u, 3150741666u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 284, 1070223067u, 4200269406u, 3236646101u, 1061812176u, 1070199193u, 3353234231u, 0, TANH_TOLERANCE, 0},
+{ 285, 1074975099u, 106027290u, 3234978297u, 2245237549u, 1072692904u, 926646345u, 0, TANH_TOLERANCE, 0},
+{ 286, 3228109966u, 2132131375u, 3250483427u, 3449276437u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 287, 1077854442u, 2334440944u, 1105423490u, 4004336184u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 288, 3220869856u, 4090088208u, 1042030013u, 3898658299u, 3220030793u, 1280038209u, 0, TANH_TOLERANCE, 0},
+{ 289, 3217345248u, 2272831437u, 3253082595u, 2639188641u, 3217333388u, 615613079u, 0, TANH_TOLERANCE, 0},
+{ 290, 1069446748u, 1856594168u, 3189515294u, 4101853676u, 1069437378u, 4022174950u, 0, TANH_TOLERANCE, 0},
+{ 291, 1073915260u, 2211699255u, 3195060344u, 3865018604u, 1072653977u, 3088241704u, 0, TANH_TOLERANCE, 0},
+{ 292, 3227038370u, 996259334u, 3241496889u, 3782673116u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 293, 1080256379u, 3840380763u, 1048674041u, 550040067u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 294, 3229399497u, 95874100u, 3237232828u, 2645647822u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 295, 1065685736u, 3441419500u, 3252367038u, 876710419u, 1065685688u, 249926735u, 0, TANH_TOLERANCE, 0},
+{ 296, 3226010640u, 2560836004u, 3199616543u, 1180840586u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 297, 3221602966u, 2218230392u, 3227485787u, 3947214579u, 3220158774u, 97536700u, 0, TANH_TOLERANCE, 0},
+{ 298, 1075345350u, 1447312532u, 1081476588u, 780366847u, 1072693227u, 2597730715u, 0, TANH_TOLERANCE, 0},
+{ 299, 1073618219u, 2842113832u, 3216156731u, 225159029u, 1072598206u, 38725043u, 0, TANH_TOLERANCE, 0},
+{ 300, 1079242825u, 1601981129u, 3234628869u, 2236538344u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 301, 1076784916u, 2194185737u, 3242362684u, 87913366u, 1072693247u, 4294966204u, 0, TANH_TOLERANCE, 0},
+{ 302, 3215861096u, 1346862963u, 1077836259u, 3604666660u, 3215858816u, 1876833276u, 0, TANH_TOLERANCE, 0},
+{ 303, 3218547435u, 3115209742u, 1099332326u, 1325101950u, 3218484663u, 109142900u, 0, TANH_TOLERANCE, 0},
+{ 304, 3221400314u, 3889223100u, 1053247613u, 3371396923u, 3220137833u, 3785105086u, 0, TANH_TOLERANCE, 0},
+{ 305, 3220477868u, 4163120793u, 1075022670u, 1387631215u, 3219879827u, 2620319036u, 0, TANH_TOLERANCE, 0},
+{ 306, 3218064691u, 1532426189u, 1063168268u, 3397022615u, 3218022962u, 3163394182u, 0, TANH_TOLERANCE, 0},
+{ 307, 3216761961u, 89324166u, 1079206060u, 3429424710u, 3216754762u, 163055010u, 0, TANH_TOLERANCE, 0},
+{ 308, 3214345198u, 747591401u, 1072238381u, 2803213904u, 3214344944u, 1023319056u, 0, TANH_TOLERANCE, 0},
+{ 309, 1078530868u, 271904221u, 1044258318u, 1858545114u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 310, 3222826034u, 314958082u, 3249912496u, 2966213175u, 3220176875u, 594125926u, 0, TANH_TOLERANCE, 0},
+{ 311, 3215005206u, 3119528953u, 3217179014u, 2908718240u, 3215004791u, 983594337u, 0, TANH_TOLERANCE, 0},
+{ 312, 3226738936u, 2018361566u, 1100926600u, 3985805054u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 313, 1073278308u, 409584884u, 3239758947u, 755795129u, 1072515176u, 1543239858u, 0, TANH_TOLERANCE, 0},
+{ 314, 1074723870u, 1819156379u, 3251342302u, 2982669005u, 1072691435u, 1108211960u, 0, TANH_TOLERANCE, 0},
+{ 315, 1080591913u, 2080534280u, 3188254060u, 449171797u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 316, 1079179684u, 168744837u, 3214950009u, 1322217822u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 317, 3229061076u, 3250487255u, 1062120700u, 1876195180u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 318, 3223197752u, 1336400247u, 1098057903u, 3314079581u, 3220176894u, 3333899270u, 0, TANH_TOLERANCE, 0},
+{ 319, 3216261732u, 265025555u, 1063854282u, 3779482256u, 3216258967u, 1006784628u, 0, TANH_TOLERANCE, 0},
+{ 320, 1072543381u, 887044257u, 1054789618u, 2732056261u, 1072126831u, 1641554481u, 0, TANH_TOLERANCE, 0},
+{ 321, 1067932534u, 4027115185u, 3191764868u, 2940199511u, 1067931473u, 3932768465u, 0, TANH_TOLERANCE, 0},
+{ 322, 3216131643u, 2875684421u, 3227459837u, 2251967570u, 3216129613u, 2392090637u, 0, TANH_TOLERANCE, 0},
+{ 323, 1071633020u, 284173546u, 3238823679u, 3557800647u, 1071476604u, 1926910603u, 0, TANH_TOLERANCE, 0},
+{ 324, 1080487040u, 3147771266u, 3220110464u, 2933364246u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 325, 1071144616u, 3366183281u, 3234870843u, 537442654u, 1071071656u, 3460153791u, 0, TANH_TOLERANCE, 0},
+{ 326, 3227341572u, 2529029548u, 3249882819u, 3781513577u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 327, 3219727810u, 1080845539u, 3206760016u, 911778687u, 3219455595u, 167462708u, 0, TANH_TOLERANCE, 0},
+{ 328, 3213971132u, 469586759u, 1091830022u, 3080528840u, 3213971024u, 477322961u, 0, TANH_TOLERANCE, 0},
+{ 329, 1075006224u, 2863108169u, 3225605506u, 2508274250u, 1072692976u, 3779254893u, 0, TANH_TOLERANCE, 0},
+{ 330, 3218167016u, 4080017377u, 3206492941u, 1470284690u, 3218140041u, 2231611050u, 0, TANH_TOLERANCE, 0},
+{ 331, 3217606150u, 3867917386u, 1102054928u, 3504746045u, 3217586177u, 3491769570u, 0, TANH_TOLERANCE, 0},
+{ 332, 1070813735u, 2962134101u, 3244741577u, 3390537350u, 1070776621u, 2796934313u, 0, TANH_TOLERANCE, 0},
+{ 333, 1077716053u, 1702237980u, 1071598971u, 1102587474u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 334, 3216601606u, 2180218657u, 3211592260u, 1206527853u, 3216596136u, 1797664468u, 0, TANH_TOLERANCE, 0},
+{ 335, 3215959112u, 394130786u, 3242511482u, 2437699868u, 3215956476u, 632716331u, 0, TANH_TOLERANCE, 0},
+{ 336, 1066257155u, 849581558u, 3252006507u, 2008614943u, 1066257017u, 2040632549u, 0, TANH_TOLERANCE, 0},
+{ 337, 3218528622u, 3128971673u, 3249137531u, 2773583059u, 3218468083u, 2682372564u, 0, TANH_TOLERANCE, 0},
+{ 338, 1076641258u, 590727700u, 3248651761u, 2183878539u, 1072693247u, 4294957516u, 0, TANH_TOLERANCE, 0},
+{ 339, 1080127109u, 820687580u, 3208143496u, 1402434664u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 340, 3229222163u, 1873709254u, 3245167989u, 44275991u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 341, 3213786001u, 1174874204u, 3208263730u, 2360372288u, 3213785853u, 3281597952u, 0, TANH_TOLERANCE, 0},
+{ 342, 1081834580u, 937573440u, 3208953761u, 211240241u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 343, 3226771718u, 2469774991u, 1043117070u, 3380071805u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 344, 1069655378u, 442507560u, 3254252803u, 3257889649u, 1069648107u, 1967517320u, 0, TANH_TOLERANCE, 0},
+{ 345, 1071996248u, 1854921625u, 1049810168u, 2729627545u, 1071819634u, 511546235u, 0, TANH_TOLERANCE, 0},
+{ 346, 3229546805u, 4001809575u, 3240128649u, 278261523u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 347, 1077787510u, 1793907966u, 3238955714u, 398859249u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 348, 3216681187u, 2511916952u, 3219195283u, 1697158299u, 3216674898u, 3492920521u, 0, TANH_TOLERANCE, 0},
+{ 349, 1073131276u, 3230931724u, 3243897690u, 3508781585u, 1072460728u, 72385801u, 0, TANH_TOLERANCE, 0},
+{ 350, 1081827510u, 1674254897u, 1046547577u, 217148561u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 351, 3218603986u, 3275604304u, 3194840159u, 2991205850u, 3218534188u, 1895030450u, 0, TANH_TOLERANCE, 0},
+{ 352, 3214123743u, 3509997278u, 3248888030u, 3897986511u, 3214123586u, 445233222u, 0, TANH_TOLERANCE, 0},
+{ 353, 1067105379u, 2156824613u, 1042295665u, 1239257646u, 1067104981u, 1993936574u, 0, TANH_TOLERANCE, 0},
+{ 354, 3219555541u, 1073153314u, 3250031627u, 2567234990u, 3219352129u, 655772150u, 0, TANH_TOLERANCE, 0},
+{ 355, 3213662084u, 4261696995u, 3197784432u, 323702024u, 3213661963u, 1132254523u, 0, TANH_TOLERANCE, 0},
+{ 356, 3226913781u, 4075177615u, 3202791065u, 1919006082u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 357, 3225638525u, 386429966u, 1086504491u, 3698826164u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 358, 1075181462u, 1681986446u, 3194985869u, 3072950140u, 1072693176u, 3387376968u, 0, TANH_TOLERANCE, 0},
+{ 359, 3220457661u, 3719038997u, 1055433962u, 3331415058u, 3219869011u, 1568398620u, 0, TANH_TOLERANCE, 0},
+{ 360, 1070186897u, 2420250111u, 3238002206u, 1928661079u, 1070164479u, 752957556u, 0, TANH_TOLERANCE, 0},
+{ 361, 1075622754u, 3679866727u, 3227386672u, 1273835792u, 1072693245u, 2332877410u, 0, TANH_TOLERANCE, 0},
+{ 362, 1065739986u, 2682092368u, 3234222284u, 1325425811u, 1065739931u, 3904488205u, 0, TANH_TOLERANCE, 0},
+{ 363, 1068895525u, 4175172697u, 3208346191u, 2130706153u, 1068891962u, 1281742233u, 0, TANH_TOLERANCE, 0},
+{ 364, 1078458136u, 1200784450u, 1083605096u, 1248595607u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 365, 3219133743u, 1897285171u, 3251296075u, 944966123u, 3218977948u, 629861953u, 0, TANH_TOLERANCE, 0},
+{ 366, 3225642610u, 2270747330u, 3230692631u, 422503284u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 367, 1076780005u, 2857564741u, 1075647403u, 3308906709u, 1072693247u, 4294966119u, 0, TANH_TOLERANCE, 0},
+{ 368, 3216058010u, 1380066948u, 3232612906u, 2613634294u, 3216056331u, 3013519241u, 0, TANH_TOLERANCE, 0},
+{ 369, 1071230888u, 4022784584u, 1060483857u, 3264056381u, 1071145971u, 252615328u, 0, TANH_TOLERANCE, 0},
+{ 370, 1066657500u, 1778509100u, 3213146285u, 2665833973u, 1066657336u, 924195788u, 0, TANH_TOLERANCE, 0},
+{ 371, 3219873028u, 1859175955u, 1079949560u, 4258450607u, 3219534594u, 2888810065u, 0, TANH_TOLERANCE, 0},
+{ 372, 1067151756u, 4128020197u, 1076266146u, 4122840980u, 1067151326u, 2056919845u, 0, TANH_TOLERANCE, 0},
+{ 373, 3214154683u, 2454653987u, 3229487005u, 2977478685u, 3214154514u, 893387246u, 0, TANH_TOLERANCE, 0},
+{ 374, 3229439235u, 1355181872u, 1095308770u, 436846481u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 375, 3227730934u, 2592856453u, 3247825559u, 3195234082u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 376, 3222118023u, 3554670043u, 1091621009u, 3321236467u, 3220174346u, 370328545u, 0, TANH_TOLERANCE, 0},
+{ 377, 1072158561u, 1936670355u, 1095715713u, 2958468553u, 1071921876u, 3097295899u, 0, TANH_TOLERANCE, 0},
+{ 378, 3214311205u, 2960339502u, 1098808013u, 1044068983u, 3214310968u, 2300984713u, 0, TANH_TOLERANCE, 0},
+{ 379, 3215565553u, 4093388677u, 1095478112u, 1735930261u, 3215564151u, 1155295820u, 0, TANH_TOLERANCE, 0},
+{ 380, 1078457390u, 1807398746u, 3195743135u, 4261616162u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 381, 3218731378u, 3250576797u, 1059002384u, 3043079652u, 3218643992u, 3185278812u, 0, TANH_TOLERANCE, 0},
+{ 382, 1072352837u, 666051428u, 3208765404u, 1912684117u, 1072031760u, 472268081u, 0, TANH_TOLERANCE, 0},
+{ 383, 1081467324u, 1949030179u, 1096388934u, 896459246u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 384, 1068980717u, 622499767u, 1066707637u, 1490260486u, 1068976486u, 3778455976u, 0, TANH_TOLERANCE, 0},
+{ 385, 1081522669u, 1490616165u, 3251242436u, 795675736u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 386, 1075701016u, 3662877092u, 3234317146u, 3200513112u, 1072693246u, 2781992228u, 0, TANH_TOLERANCE, 0},
+{ 387, 1076748754u, 1356101968u, 3236536816u, 3062844611u, 1072693247u, 4294965399u, 0, TANH_TOLERANCE, 0},
+{ 388, 3220971216u, 2284484846u, 3219498359u, 3240896015u, 3220055734u, 2376612227u, 0, TANH_TOLERANCE, 0},
+{ 389, 3225273929u, 494503287u, 1092811254u, 142673998u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 390, 3229057244u, 3394882641u, 3225306538u, 364852125u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 391, 3222116035u, 193885269u, 1088149839u, 1359805831u, 3220174326u, 2917860536u, 0, TANH_TOLERANCE, 0},
+{ 392, 3216213422u, 592580907u, 3199560872u, 3086438952u, 3216210947u, 3529159780u, 0, TANH_TOLERANCE, 0},
+{ 393, 1070004424u, 1778008540u, 1049064687u, 73581647u, 1069988466u, 3796959165u, 0, TANH_TOLERANCE, 0},
+{ 394, 3227859230u, 233240285u, 1081923320u, 2710903921u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 395, 1072659495u, 3719878805u, 1079866720u, 3615458228u, 1072178925u, 119062963u, 0, TANH_TOLERANCE, 0},
+{ 396, 3221194724u, 3647632375u, 3247225271u, 3839959621u, 3220096986u, 2905242185u, 0, TANH_TOLERANCE, 0},
+{ 397, 1081381000u, 2232210456u, 3235434773u, 224271737u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 398, 3213975204u, 2134662911u, 3190390590u, 4239009051u, 3213975095u, 1423693863u, 0, TANH_TOLERANCE, 0},
+{ 399, 1075283265u, 2305279897u, 1077668039u, 1854523320u, 1072693215u, 1065080987u, 0, TANH_TOLERANCE, 0},
+{ 400, 3220912835u, 538224650u, 3206153057u, 1379649610u, 3220041922u, 806488060u, 0, TANH_TOLERANCE, 0},
+{ 401, 3215284875u, 3683897920u, 3244167599u, 3647579469u, 3215284065u, 70286255u, 0, TANH_TOLERANCE, 0},
+{ 402, 1077698021u, 2694093608u, 1042775347u, 598406111u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 403, 3218975424u, 872706833u, 1084802480u, 2200602798u, 3218847178u, 243292267u, 0, TANH_TOLERANCE, 0},
+{ 404, 1065408269u, 904146293u, 1060867322u, 1729685598u, 1065408244u, 1452405291u, 0, TANH_TOLERANCE, 0},
+{ 405, 3214569338u, 1894173462u, 3232800651u, 191960416u, 3214568953u, 2872441934u, 0, TANH_TOLERANCE, 0},
+{ 406, 1078642431u, 3521028551u, 1054522089u, 3287274359u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 407, 1079658324u, 959640601u, 3201578263u, 4136915018u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 408, 1071345483u, 1553716379u, 1106027987u, 984725765u, 1071242888u, 3562407504u, 0, TANH_TOLERANCE, 0},
+{ 409, 3226249729u, 2287646644u, 3240329321u, 2276183378u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 410, 1072403478u, 3940225170u, 3199544434u, 997572161u, 1072058226u, 449217216u, 0, TANH_TOLERANCE, 0},
+{ 411, 3219059817u, 36116288u, 3206886566u, 4196602670u, 3218915148u, 4193878759u, 0, TANH_TOLERANCE, 0},
+{ 412, 3225967213u, 3550227562u, 3207257983u, 2747744117u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 413, 1081167454u, 507130047u, 1048359321u, 3229888373u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 414, 3221948202u, 2210969014u, 1081031001u, 1946786091u, 3220172024u, 3807901675u, 0, TANH_TOLERANCE, 0},
+{ 415, 3224772654u, 4059150589u, 3189759234u, 1177045799u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 416, 1078423548u, 2664812822u, 1050343198u, 2034180320u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 417, 3220070573u, 1175750283u, 3235559706u, 1424491340u, 3219630517u, 3733141581u, 0, TANH_TOLERANCE, 0},
+{ 418, 3219147073u, 1630036121u, 3231972785u, 3195479448u, 3218998802u, 3328603128u, 0, TANH_TOLERANCE, 0},
+{ 419, 1077846963u, 2527029044u, 1046927050u, 4000723255u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 420, 1076820069u, 3335703647u, 3237349676u, 3869440059u, 1072693247u, 4294966657u, 0, TANH_TOLERANCE, 0},
+{ 421, 1078850936u, 3888398377u, 3196041693u, 1290567220u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 422, 1071921950u, 3242451480u, 3248384948u, 707431021u, 1071769613u, 2378538733u, 0, TANH_TOLERANCE, 0},
+{ 423, 1075890477u, 2739665123u, 1060777905u, 1733073225u, 1072693247u, 3371085153u, 0, TANH_TOLERANCE, 0},
+{ 424, 1075371333u, 1297274853u, 3208848704u, 3341639139u, 1072693231u, 1169620284u, 0, TANH_TOLERANCE, 0},
+{ 425, 1066493885u, 2228057309u, 1084318902u, 1317851136u, 1066493775u, 2928536763u, 0, TANH_TOLERANCE, 0},
+{ 426, 1077769567u, 270039934u, 3241414679u, 3063626339u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 427, 3220226926u, 83062251u, 3211262173u, 2659016437u, 3219717442u, 1020636511u, 0, TANH_TOLERANCE, 0},
+{ 428, 1080015246u, 3833539373u, 3206667189u, 1567476111u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 429, 3217777984u, 2382776852u, 3249232579u, 1546622468u, 3217751063u, 1818212801u, 0, TANH_TOLERANCE, 0},
+{ 430, 1076099255u, 1714300821u, 1104130938u, 4167591598u, 1072693247u, 4256765263u, 0, TANH_TOLERANCE, 0},
+{ 431, 1067869976u, 2798720100u, 1086978789u, 449990704u, 1067869040u, 1755411038u, 0, TANH_TOLERANCE, 0},
+{ 432, 3223858383u, 4039516226u, 3244344107u, 4272932619u, 3220176895u, 4294396436u, 0, TANH_TOLERANCE, 0},
+{ 433, 3221659865u, 1683007544u, 1091105663u, 3805494321u, 3220162297u, 2272405765u, 0, TANH_TOLERANCE, 0},
+{ 434, 3220852948u, 2072627412u, 1094383324u, 3394151662u, 3220026176u, 3047210052u, 0, TANH_TOLERANCE, 0},
+{ 435, 3220570024u, 1120106427u, 3223631624u, 3404608264u, 3219924834u, 2913979229u, 0, TANH_TOLERANCE, 0},
+{ 436, 1078985629u, 559918757u, 3205077053u, 908100198u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 437, 1065746590u, 2026673913u, 3244833635u, 2844573214u, 1065746534u, 4285564648u, 0, TANH_TOLERANCE, 0},
+{ 438, 3229401435u, 3946837259u, 3234993796u, 3850406820u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 439, 1070062721u, 3139330994u, 1046133568u, 1539650690u, 1070044855u, 2726435592u, 0, TANH_TOLERANCE, 0},
+{ 440, 3225171164u, 1554593884u, 3228899878u, 2813752562u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 441, 1069087916u, 3804703138u, 1072931071u, 2053677923u, 1069082736u, 1742473058u, 0, TANH_TOLERANCE, 0},
+{ 442, 3227038507u, 289355864u, 1078453818u, 2143066338u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 443, 3216522792u, 2157691971u, 1106629150u, 110806409u, 3216518060u, 864673819u, 0, TANH_TOLERANCE, 0},
+{ 444, 1075865563u, 3570399481u, 1085637605u, 180265334u, 1072693247u, 2943779940u, 0, TANH_TOLERANCE, 0},
+{ 445, 3216708822u, 558779875u, 3202046748u, 2338464653u, 3216702231u, 506759401u, 0, TANH_TOLERANCE, 0},
+{ 446, 1066676984u, 1703969219u, 3229797258u, 1417521063u, 1066676812u, 3133190950u, 0, TANH_TOLERANCE, 0},
+{ 447, 3225199349u, 3917440951u, 1051668894u, 3736066983u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 448, 1071043536u, 3106613409u, 1066627453u, 2735392257u, 1070983166u, 1045266683u, 0, TANH_TOLERANCE, 0},
+{ 449, 1071956828u, 2229777605u, 1065061963u, 2405869925u, 1071793347u, 502078975u, 0, TANH_TOLERANCE, 0},
+{ 450, 3225831741u, 3967957902u, 1057416138u, 3459188071u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 451, 1071784938u, 3699016825u, 3249713090u, 796144848u, 1071672076u, 2579985767u, 0, TANH_TOLERANCE, 0},
+{ 452, 3222524940u, 3285165564u, 3211948811u, 401510871u, 3220176688u, 2239026903u, 0, TANH_TOLERANCE, 0},
+{ 453, 1078529018u, 634857910u, 3199607513u, 914218057u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 454, 1076403304u, 2030735578u, 3233855943u, 965677531u, 1072693247u, 4294598139u, 0, TANH_TOLERANCE, 0},
+{ 455, 1075362511u, 3957229084u, 1051050470u, 3123776651u, 1072693230u, 462899214u, 0, TANH_TOLERANCE, 0},
+{ 456, 3221863333u, 162122081u, 3239376395u, 108064594u, 3220170165u, 2709210009u, 0, TANH_TOLERANCE, 0},
+{ 457, 3224688874u, 869031839u, 3225020876u, 1344301606u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 458, 3219676354u, 946696117u, 3231825228u, 1700703647u, 3219425812u, 3436958511u, 0, TANH_TOLERANCE, 0},
+{ 459, 1074444299u, 3394168074u, 1076939786u, 1666995668u, 1072687986u, 368182188u, 0, TANH_TOLERANCE, 0},
+{ 460, 3218211979u, 2488789804u, 3238508333u, 1506943664u, 3218181741u, 3093576615u, 0, TANH_TOLERANCE, 0},
+{ 461, 1072788663u, 3844072288u, 3202592279u, 2630019853u, 1072268032u, 509834618u, 0, TANH_TOLERANCE, 0},
+{ 462, 3220983118u, 1244307192u, 3191297711u, 2540916692u, 3220058377u, 802394392u, 0, TANH_TOLERANCE, 0},
+{ 463, 3215791332u, 2871645739u, 3239081581u, 1440249115u, 3215789285u, 2945497557u, 0, TANH_TOLERANCE, 0},
+{ 464, 1072544937u, 1231934926u, 3236746788u, 603977748u, 1072127558u, 148852321u, 0, TANH_TOLERANCE, 0},
+{ 465, 3214324057u, 2386312545u, 1063169277u, 2715234268u, 3214323814u, 630831394u, 0, TANH_TOLERANCE, 0},
+{ 466, 1077317658u, 915867083u, 1046790892u, 3347417612u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 467, 1081866940u, 3553288373u, 1065698616u, 2906680663u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 468, 1066477746u, 2342364630u, 1051356723u, 4019093203u, 1066477641u, 1308319496u, 0, TANH_TOLERANCE, 0},
+{ 469, 3216897802u, 2911548084u, 1105282515u, 2476735795u, 3216888883u, 64033488u, 0, TANH_TOLERANCE, 0},
+{ 470, 1068298564u, 1836216409u, 1101062307u, 2519592554u, 1068296546u, 2859116598u, 0, TANH_TOLERANCE, 0},
+{ 471, 1073323889u, 1235369496u, 3222946447u, 668087854u, 1072529424u, 3194090941u, 0, TANH_TOLERANCE, 0},
+{ 472, 3217991780u, 2981820811u, 1059838516u, 2845580478u, 3217954221u, 4200696890u, 0, TANH_TOLERANCE, 0},
+{ 473, 3214902934u, 1565550570u, 3217165795u, 4162017137u, 3214902281u, 3653946900u, 0, TANH_TOLERANCE, 0},
+{ 474, 3224668466u, 2808968027u, 1055630096u, 1782326814u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 475, 1069305614u, 1492622658u, 3216653077u, 3972512122u, 1069298089u, 134736289u, 0, TANH_TOLERANCE, 0},
+{ 476, 3222171679u, 2722693603u, 3227814791u, 3169731970u, 3220174817u, 3531603680u, 0, TANH_TOLERANCE, 0},
+{ 477, 3221052359u, 899763203u, 3207606001u, 2804747833u, 3220072675u, 2906226549u, 0, TANH_TOLERANCE, 0},
+{ 478, 3223330293u, 3789058912u, 3228095081u, 4135937628u, 3220176895u, 2491612513u, 0, TANH_TOLERANCE, 0},
+{ 479, 1069636566u, 1682808307u, 3206960335u, 232877759u, 1069629643u, 583610000u, 0, TANH_TOLERANCE, 0},
+{ 480, 3226362846u, 2851963139u, 3246852961u, 2590862592u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 481, 1074908950u, 2422232642u, 3234779662u, 290458310u, 1072692678u, 2454695928u, 0, TANH_TOLERANCE, 0},
+{ 482, 3219059686u, 1082582386u, 1075605675u, 2602133689u, 3218915044u, 2576723185u, 0, TANH_TOLERANCE, 0},
+{ 483, 3226187123u, 1789635787u, 1059414278u, 1048286093u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 484, 1079456174u, 231339448u, 1055573265u, 504907415u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 485, 1071600069u, 1153251200u, 3204617090u, 1772013857u, 1071450530u, 982900350u, 0, TANH_TOLERANCE, 0},
+{ 486, 1080676687u, 1082898276u, 3212089272u, 1449080862u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 487, 1076571101u, 3177299045u, 1058862813u, 809400815u, 1072693247u, 4294938769u, 0, TANH_TOLERANCE, 0},
+{ 488, 3223514518u, 1924429710u, 1056464743u, 3349283177u, 3220176895u, 4186509591u, 0, TANH_TOLERANCE, 0},
+{ 489, 3226599023u, 42238036u, 1042379500u, 2113559863u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 490, 1071052699u, 3304403230u, 3217556703u, 58952646u, 1070991249u, 3007091220u, 0, TANH_TOLERANCE, 0},
+{ 491, 3218960986u, 1645486982u, 3224301095u, 3636267471u, 3218835429u, 1446891056u, 0, TANH_TOLERANCE, 0},
+{ 492, 1071150617u, 619402181u, 3235208235u, 557360557u, 1071076862u, 548691099u, 0, TANH_TOLERANCE, 0},
+{ 493, 3225655482u, 110029735u, 1046937383u, 984375729u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 494, 3213613986u, 4063688092u, 3203235744u, 1049950343u, 3213613874u, 1513497013u, 0, TANH_TOLERANCE, 0},
+{ 495, 1070739227u, 650996069u, 1054971928u, 3953359826u, 1070708162u, 851578057u, 0, TANH_TOLERANCE, 0},
+{ 496, 3222861501u, 66926332u, 1090561839u, 1379780888u, 3220176880u, 360882482u, 0, TANH_TOLERANCE, 0},
+{ 497, 3224016123u, 2803378256u, 1086057989u, 498534626u, 3220176895u, 4294915866u, 0, TANH_TOLERANCE, 0},
+{ 498, 1076327097u, 2846400785u, 1047142525u, 1375153550u, 1072693247u, 4293786378u, 0, TANH_TOLERANCE, 0},
+{ 499, 1066601297u, 2869128958u, 1070972315u, 4246440273u, 1066601153u, 3402349456u, 0, TANH_TOLERANCE, 0},
+{ 500, 1067561146u, 3112381207u, 1044430965u, 3981604561u, 1067560685u, 2566534493u, 0, TANH_TOLERANCE, 0},
+{ 501, 3223914965u, 243303420u, 1093735824u, 1575581926u, 3220176895u, 4294726540u, 0, TANH_TOLERANCE, 0},
+{ 502, 3225506509u, 3218865041u, 3204803496u, 3840388050u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 503, 1067289799u, 336846959u, 1052664471u, 3798336786u, 1067289261u, 2993180106u, 0, TANH_TOLERANCE, 0},
+{ 504, 1068537148u, 3639240976u, 1081202165u, 1844741676u, 1068535631u, 1373601135u, 0, TANH_TOLERANCE, 0},
+{ 505, 3218196249u, 717293069u, 3211534283u, 582401011u, 3218167180u, 496380559u, 0, TANH_TOLERANCE, 0},
+{ 506, 3228893840u, 3766248610u, 3196520332u, 1174437546u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 507, 1076091194u, 756959182u, 3204099341u, 1581804034u, 1072693247u, 4251765017u, 0, TANH_TOLERANCE, 0},
+{ 508, 3217340780u, 3560686300u, 3220980617u, 4277975772u, 3217329035u, 3938865978u, 0, TANH_TOLERANCE, 0},
+{ 509, 3218294684u, 2598148853u, 3217622194u, 3460421008u, 3218257801u, 3777429081u, 0, TANH_TOLERANCE, 0},
+{ 510, 1071963704u, 136600515u, 3209934920u, 3340653128u, 1071797973u, 383375267u, 0, TANH_TOLERANCE, 0},
+{ 511, 1078994518u, 1045480938u, 3251354609u, 4133432965u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 512, 1077967943u, 1630207738u, 3239996829u, 2393354808u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 513, 3213694690u, 3739770117u, 1059520750u, 3959551225u, 3213694562u, 2906185574u, 0, TANH_TOLERANCE, 0},
+{ 514, 3223390473u, 1498861716u, 1091297147u, 847410798u, 3220176895u, 3575048625u, 0, TANH_TOLERANCE, 0},
+{ 515, 1073516688u, 983275314u, 3232538664u, 2244973629u, 1072578453u, 1729614224u, 0, TANH_TOLERANCE, 0},
+{ 516, 1069529329u, 2353103845u, 3235718771u, 2978889966u, 1069518753u, 2585637409u, 0, TANH_TOLERANCE, 0},
+{ 517, 3229337896u, 1546972125u, 3249076079u, 1987349196u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 518, 3225636601u, 2769161072u, 1075207126u, 292616282u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 519, 3215440938u, 36855311u, 1052128202u, 1479039342u, 3215439824u, 3021602545u, 0, TANH_TOLERANCE, 0},
+{ 520, 1076417021u, 2027463605u, 1066023013u, 3369686340u, 1072693247u, 4294667855u, 0, TANH_TOLERANCE, 0},
+{ 521, 3215678541u, 3808681655u, 1054161346u, 1821773119u, 3215676836u, 4252330285u, 0, TANH_TOLERANCE, 0},
+{ 522, 1065851752u, 3175490326u, 3226879970u, 845687760u, 1065851684u, 952657342u, 0, TANH_TOLERANCE, 0},
+{ 523, 1065371665u, 3124482451u, 3242748377u, 3259417226u, 1065371643u, 1068152155u, 0, TANH_TOLERANCE, 0},
+{ 524, 1067265791u, 2751606436u, 3236210939u, 3923142740u, 1067265273u, 4267448991u, 0, TANH_TOLERANCE, 0},
+{ 525, 1079966097u, 2016872044u, 3228408064u, 4201274408u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 526, 3215077894u, 1019916843u, 3219974785u, 1977881787u, 3215077392u, 2106531914u, 0, TANH_TOLERANCE, 0},
+{ 527, 3215207392u, 2060433318u, 1075872515u, 366073725u, 3215206708u, 4083368175u, 0, TANH_TOLERANCE, 0},
+{ 528, 3213200653u, 1098469906u, 1082900695u, 2349346832u, 3213200601u, 543684019u, 0, TANH_TOLERANCE, 0},
+{ 529, 3218363315u, 3011196295u, 3252479932u, 2459281672u, 3218320258u, 2654661612u, 0, TANH_TOLERANCE, 0},
+{ 530, 3221334323u, 2843222682u, 1089275809u, 298982001u, 3220126785u, 2833806156u, 0, TANH_TOLERANCE, 0},
+{ 531, 1080766178u, 914741728u, 3203468059u, 2833809843u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 532, 3225229542u, 1274901962u, 3241535845u, 3759113509u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 533, 3227042074u, 2134927252u, 3253802671u, 3013731444u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 534, 1080326973u, 2230655177u, 3254510616u, 1249674366u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 535, 1071359861u, 717357389u, 1083533731u, 3746683362u, 1071254900u, 3631908499u, 0, TANH_TOLERANCE, 0},
+{ 536, 3220064570u, 834976849u, 3217357661u, 2465861779u, 3219627791u, 2471657761u, 0, TANH_TOLERANCE, 0},
+{ 537, 1066627637u, 1385714428u, 1053358395u, 3007113740u, 1066627484u, 622695525u, 0, TANH_TOLERANCE, 0},
+{ 538, 1068353711u, 599268545u, 3201368210u, 2309854744u, 1068351512u, 1648394891u, 0, TANH_TOLERANCE, 0},
+{ 539, 1073100182u, 2840234388u, 3232496515u, 333365983u, 1072447353u, 2876664628u, 0, TANH_TOLERANCE, 0},
+{ 540, 1066894301u, 3136078996u, 3194520860u, 2650572904u, 1066894030u, 3836763203u, 0, TANH_TOLERANCE, 0},
+{ 541, 3224250507u, 2405805086u, 3251640319u, 324233833u, 3220176895u, 4294965857u, 0, TANH_TOLERANCE, 0},
+{ 542, 1081533322u, 2589598340u, 3254677807u, 952438812u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 543, 3213232021u, 1922837702u, 3216892718u, 3535907549u, 3213231965u, 3296837648u, 0, TANH_TOLERANCE, 0},
+{ 544, 3226838652u, 261447440u, 3209805849u, 1150571079u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 545, 1079028016u, 4026487528u, 1073152064u, 27340691u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 546, 3222832236u, 338765118u, 1086225786u, 3207238249u, 3220176876u, 440058419u, 0, TANH_TOLERANCE, 0},
+{ 547, 3215057071u, 1085283176u, 3187775111u, 1601194210u, 3215056595u, 1400160228u, 0, TANH_TOLERANCE, 0},
+{ 548, 1078937261u, 3031712790u, 3252307859u, 170666844u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 549, 3220959383u, 3148395674u, 1041913758u, 3306391490u, 3220053050u, 2562078751u, 0, TANH_TOLERANCE, 0},
+{ 550, 3217005710u, 2205233857u, 3208100078u, 3993195511u, 3216995244u, 2747014119u, 0, TANH_TOLERANCE, 0},
+{ 551, 1071893912u, 4282766727u, 1072820377u, 1874778218u, 1071750211u, 660651612u, 0, TANH_TOLERANCE, 0},
+{ 552, 3218173124u, 2920860798u, 3218070226u, 3104066154u, 3218145720u, 693930883u, 0, TANH_TOLERANCE, 0},
+{ 553, 3217533263u, 969991373u, 3250596895u, 1734386152u, 3217515838u, 2631270782u, 0, TANH_TOLERANCE, 0},
+{ 554, 3226332906u, 1218740205u, 3239802737u, 2610078504u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 555, 3217565578u, 1485218325u, 3220870240u, 3591664613u, 3217547052u, 140249651u, 0, TANH_TOLERANCE, 0},
+{ 556, 3216754207u, 690157417u, 3190850619u, 4192347699u, 3216747099u, 499816119u, 0, TANH_TOLERANCE, 0},
+{ 557, 1079276594u, 4009839784u, 1079670252u, 394167192u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 558, 3225122053u, 961532417u, 1092588071u, 2923790239u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 559, 3216462003u, 4174125604u, 1050682630u, 2169701868u, 3216457793u, 919186931u, 0, TANH_TOLERANCE, 0},
+{ 560, 3227363835u, 4146748230u, 1087373950u, 2481478351u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 561, 1073842138u, 3984715440u, 1050421618u, 2446142566u, 1072641499u, 1791854957u, 0, TANH_TOLERANCE, 0},
+{ 562, 1076832374u, 936290150u, 1100614426u, 3625806370u, 1072693247u, 4294966767u, 0, TANH_TOLERANCE, 0},
+{ 563, 1080913584u, 1866615265u, 3215651428u, 2337013350u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 564, 3229081054u, 712227971u, 1106004723u, 973148499u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 565, 3223796743u, 3409813738u, 3244817008u, 1933503498u, 3220176895u, 4293505094u, 0, TANH_TOLERANCE, 0},
+{ 566, 1075749429u, 3180389060u, 3228735703u, 83422217u, 1072693247u, 280657473u, 0, TANH_TOLERANCE, 0},
+{ 567, 1074732996u, 556972671u, 3204582372u, 841555801u, 1072691497u, 1078894527u, 0, TANH_TOLERANCE, 0},
+{ 568, 1072864873u, 4189151332u, 1080874032u, 706326922u, 1072320445u, 3126467056u, 0, TANH_TOLERANCE, 0},
+{ 569, 1079374091u, 198291836u, 1057281892u, 2188836928u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 570, 1074946267u, 1219449298u, 3228734687u, 3504562743u, 1072692819u, 2750855966u, 0, TANH_TOLERANCE, 0},
+{ 571, 3217153376u, 1776099219u, 1094316777u, 4188083896u, 3217145833u, 645707833u, 0, TANH_TOLERANCE, 0},
+{ 572, 3214817228u, 2614400266u, 1073750227u, 3003203347u, 3214816653u, 4118899096u, 0, TANH_TOLERANCE, 0},
+{ 573, 3219225558u, 2959351406u, 1105603716u, 311851587u, 3219119060u, 3153940070u, 0, TANH_TOLERANCE, 0},
+{ 574, 1076155826u, 865443613u, 1097532516u, 3622237781u, 1072693247u, 4278853323u, 0, TANH_TOLERANCE, 0},
+{ 575, 3223398058u, 447506102u, 3195759295u, 3603669725u, 3220176895u, 3653727122u, 0, TANH_TOLERANCE, 0},
+{ 576, 1079015805u, 3934398273u, 1040996422u, 2968621268u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 577, 3215614193u, 784208771u, 1088764788u, 2182296421u, 3215612665u, 879108182u, 0, TANH_TOLERANCE, 0},
+{ 578, 3228409347u, 1527590526u, 3206961556u, 2823164069u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 579, 3225109795u, 3876699591u, 3207481130u, 4028148535u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 580, 1076236154u, 2164249756u, 1059857743u, 1785169952u, 1072693247u, 4290237064u, 0, TANH_TOLERANCE, 0},
+{ 581, 1078172521u, 2079273665u, 1080303860u, 625760474u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 582, 3222291804u, 3636214836u, 1068367620u, 2932621925u, 3220175667u, 2559685817u, 0, TANH_TOLERANCE, 0},
+{ 583, 1066015468u, 4274131512u, 1047707755u, 92550763u, 1066015376u, 1477695260u, 0, TANH_TOLERANCE, 0},
+{ 584, 3215599337u, 2648933384u, 1084603503u, 3534304873u, 3215597848u, 2856479001u, 0, TANH_TOLERANCE, 0},
+{ 585, 1070854691u, 3216750767u, 3191088629u, 547482628u, 1070813952u, 2964537256u, 0, TANH_TOLERANCE, 0},
+{ 586, 1070521958u, 1420360746u, 1080063101u, 1690029499u, 1070483630u, 3376375773u, 0, TANH_TOLERANCE, 0},
+{ 587, 3223563908u, 1908572179u, 1080112083u, 1228319033u, 3220176895u, 4243921216u, 0, TANH_TOLERANCE, 0},
+{ 588, 1067032546u, 500312015u, 3212368508u, 3864619086u, 1067032195u, 2888994469u, 0, TANH_TOLERANCE, 0},
+{ 589, 3221335610u, 4211343447u, 1087492676u, 4272583781u, 3220127028u, 929411503u, 0, TANH_TOLERANCE, 0},
+{ 590, 1080518026u, 2382118000u, 1042665328u, 567154882u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 591, 1069547778u, 1435344339u, 3216303171u, 2275988178u, 1069537173u, 3641349188u, 0, TANH_TOLERANCE, 0},
+{ 592, 3219781499u, 3403659753u, 3218043030u, 1926480488u, 3219485664u, 1805105515u, 0, TANH_TOLERANCE, 0},
+{ 593, 1074743231u, 1198845185u, 3225556149u, 1130089684u, 1072691564u, 1130724028u, 0, TANH_TOLERANCE, 0},
+{ 594, 3221614466u, 2183928090u, 1048403956u, 963834821u, 3220159548u, 2632844817u, 0, TANH_TOLERANCE, 0},
+{ 595, 1080701440u, 2120625396u, 1041006976u, 2137548527u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 596, 1080355870u, 586700956u, 1059670521u, 303891699u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 597, 3221091650u, 2509132460u, 1102827530u, 2205707903u, 3220080026u, 3892042078u, 0, TANH_TOLERANCE, 0},
+{ 598, 3217443509u, 1229308263u, 3209170414u, 4206576047u, 3217428916u, 1972214507u, 0, TANH_TOLERANCE, 0},
+{ 599, 3221979137u, 4078010749u, 3199236456u, 733478972u, 3220172566u, 2325284033u, 0, TANH_TOLERANCE, 0},
+{ 600, 3215538376u, 4277541051u, 3199806921u, 397102023u, 3215537041u, 1038730987u, 0, TANH_TOLERANCE, 0},
+{ 601, 3214849381u, 900999594u, 3234720188u, 2530214248u, 3214848778u, 517726932u, 0, TANH_TOLERANCE, 0},
+{ 602, 1074446396u, 4000609478u, 1096577064u, 4148592328u, 1072688027u, 4126215607u, 0, TANH_TOLERANCE, 0},
+{ 603, 1067542452u, 2154187873u, 3224392607u, 3957250362u, 1067542013u, 1359750955u, 0, TANH_TOLERANCE, 0},
+{ 604, 3221316336u, 2867079200u, 1101870326u, 921212001u, 3220123272u, 596464385u, 0, TANH_TOLERANCE, 0},
+{ 605, 3223784706u, 674547716u, 1063216239u, 3929755226u, 3220176895u, 4293210269u, 0, TANH_TOLERANCE, 0},
+{ 606, 3225735787u, 3158182449u, 1043794244u, 3259056345u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 607, 3225242320u, 3002823940u, 1059511739u, 2832435794u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 608, 3220450550u, 2196511929u, 1049973941u, 3672092877u, 3219865119u, 1534045465u, 0, TANH_TOLERANCE, 0},
+{ 609, 1068263848u, 3655292191u, 1086438127u, 3567072906u, 1068261939u, 3330397833u, 0, TANH_TOLERANCE, 0},
+{ 610, 3227458308u, 1617573614u, 3201863123u, 3090723732u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 611, 3223764196u, 679893506u, 3211547753u, 824081024u, 3220176895u, 4292564626u, 0, TANH_TOLERANCE, 0},
+{ 612, 1076947613u, 2285242807u, 1084999409u, 2221731406u, 1072693247u, 4294967260u, 0, TANH_TOLERANCE, 0},
+{ 613, 3217219424u, 1935990727u, 1088822246u, 1058156518u, 3217210539u, 673583441u, 0, TANH_TOLERANCE, 0},
+{ 614, 1080819070u, 521023584u, 1059186903u, 4245163857u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 615, 1081871044u, 2312887617u, 3191771354u, 1885370807u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 616, 3228836567u, 1796441468u, 1100030327u, 2772711004u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 617, 3216859732u, 2095685003u, 1077984448u, 2100773742u, 3216851319u, 3546547663u, 0, TANH_TOLERANCE, 0},
+{ 618, 3213926140u, 2892538035u, 1042396334u, 4162200338u, 3213926045u, 98121596u, 0, TANH_TOLERANCE, 0},
+{ 619, 3226997111u, 2177698116u, 3227557177u, 150832500u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 620, 3213582312u, 607966734u, 3236250630u, 4164600559u, 3213582205u, 1317441634u, 0, TANH_TOLERANCE, 0},
+{ 621, 3219535540u, 2830122967u, 1046096700u, 3713346883u, 3219339417u, 3473358335u, 0, TANH_TOLERANCE, 0},
+{ 622, 3224615051u, 2314640506u, 3203696416u, 3276228872u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 623, 3219203763u, 469331883u, 3249037349u, 2999233437u, 3219086102u, 85688925u, 0, TANH_TOLERANCE, 0},
+{ 624, 1079556219u, 560886625u, 1091899487u, 748795120u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 625, 1067712650u, 2958421324u, 1092569414u, 3235243477u, 1067711984u, 933574582u, 0, TANH_TOLERANCE, 0},
+{ 626, 3213998017u, 3221475559u, 1043038304u, 915608434u, 3213997901u, 3819757689u, 0, TANH_TOLERANCE, 0},
+{ 627, 1073294682u, 3007808652u, 3216682290u, 2531019474u, 1072520426u, 1456133354u, 0, TANH_TOLERANCE, 0},
+{ 628, 3226300359u, 1767658578u, 3237045269u, 2313128318u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 629, 3219006500u, 1926845182u, 1066835624u, 1783256828u, 3218872347u, 1882092066u, 0, TANH_TOLERANCE, 0},
+{ 630, 1065741453u, 90378038u, 1057168870u, 164358218u, 1065741398u, 591806547u, 0, TANH_TOLERANCE, 0},
+{ 631, 1081693348u, 1610524680u, 1085283851u, 2903496007u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 632, 1075489858u, 4274321404u, 3202913591u, 720121831u, 1072693241u, 979506729u, 0, TANH_TOLERANCE, 0},
+{ 633, 1067982472u, 2034778236u, 1071133763u, 1413236391u, 1067981304u, 1075351172u, 0, TANH_TOLERANCE, 0},
+{ 634, 1067840244u, 1489112261u, 1076691395u, 348210906u, 1067839363u, 3489382366u, 0, TANH_TOLERANCE, 0},
+{ 635, 3217229677u, 2797651324u, 3224410527u, 2374818327u, 3217220570u, 3663838511u, 0, TANH_TOLERANCE, 0},
+{ 636, 1077801496u, 1823161666u, 3197810695u, 3119680047u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 637, 1072218792u, 3420950657u, 1087084743u, 2136638961u, 1071957381u, 4227318367u, 0, TANH_TOLERANCE, 0},
+{ 638, 1073047952u, 3554566429u, 1062907717u, 2736702589u, 1072423253u, 3954224834u, 0, TANH_TOLERANCE, 0},
+{ 639, 3227062875u, 2928437580u, 3187765027u, 1393427873u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 640, 3218738745u, 189447067u, 1051643315u, 828663513u, 3218650265u, 2565529360u, 0, TANH_TOLERANCE, 0},
+{ 641, 1068042509u, 2852350928u, 1045683757u, 673354280u, 1068041203u, 1273807154u, 0, TANH_TOLERANCE, 0},
+{ 642, 1065966397u, 3589563265u, 3248741629u, 812657927u, 1065966312u, 3995661865u, 0, TANH_TOLERANCE, 0},
+{ 643, 3213679498u, 1766416701u, 1100392103u, 2185373290u, 3213679373u, 1105851242u, 0, TANH_TOLERANCE, 0},
+{ 644, 3220275389u, 3763582673u, 3191965790u, 388374829u, 3219753918u, 630121662u, 0, TANH_TOLERANCE, 0},
+{ 645, 1075440832u, 1187403069u, 1075300235u, 336640304u, 1072693238u, 671323862u, 0, TANH_TOLERANCE, 0},
+{ 646, 1081906155u, 1718795752u, 3243118752u, 683369237u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 647, 3218132129u, 1863545307u, 1069449477u, 3418627399u, 3218107521u, 2978760047u, 0, TANH_TOLERANCE, 0},
+{ 648, 1072747022u, 3295607249u, 1068878592u, 1633297809u, 1072236708u, 1219129914u, 0, TANH_TOLERANCE, 0},
+{ 649, 1070481463u, 2585980994u, 3236670483u, 1286750688u, 1070445359u, 1671965836u, 0, TANH_TOLERANCE, 0},
+{ 650, 1067128553u, 15816845u, 3233249283u, 2491924775u, 1067128138u, 4149105436u, 0, TANH_TOLERANCE, 0},
+{ 651, 1065481693u, 1051983351u, 1049180786u, 1474421917u, 1065481663u, 304342688u, 0, TANH_TOLERANCE, 0},
+{ 652, 3216978165u, 2003816032u, 1086050104u, 668090487u, 3216968109u, 3936271285u, 0, TANH_TOLERANCE, 0},
+{ 653, 1068284677u, 3671484625u, 1067020039u, 430024694u, 1068282704u, 213223715u, 0, TANH_TOLERANCE, 0},
+{ 654, 1072639990u, 3991830201u, 3207808714u, 1021245839u, 1072170471u, 4236962281u, 0, TANH_TOLERANCE, 0},
+{ 655, 1071534423u, 4255801807u, 3207681716u, 1926756877u, 1071398029u, 3730360966u, 0, TANH_TOLERANCE, 0},
+{ 656, 1067869425u, 4167786896u, 1077097744u, 1775517981u, 1067868490u, 3350202937u, 0, TANH_TOLERANCE, 0},
+{ 657, 1076164794u, 3187518564u, 1082437406u, 944672491u, 1072693247u, 4280914270u, 0, TANH_TOLERANCE, 0},
+{ 658, 1068240650u, 953085192u, 3227310828u, 3459155777u, 1068238811u, 2397589293u, 0, TANH_TOLERANCE, 0},
+{ 659, 1072648234u, 1908555460u, 1073640207u, 260441967u, 1072174059u, 6166727u, 0, TANH_TOLERANCE, 0},
+{ 660, 1072462486u, 250762477u, 1072582645u, 2886742039u, 1072087959u, 2719323898u, 0, TANH_TOLERANCE, 0},
+{ 661, 3228885910u, 786180031u, 3197734769u, 2788918312u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 662, 3225074643u, 2055912467u, 3244244909u, 1394142937u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 663, 1072758713u, 91984146u, 3222252812u, 4126276047u, 1072245701u, 402520945u, 0, TANH_TOLERANCE, 0},
+{ 664, 1075048683u, 3942715706u, 3239316352u, 410676547u, 1072693051u, 3851512815u, 0, TANH_TOLERANCE, 0},
+{ 665, 3215335062u, 86296211u, 1085850694u, 649202596u, 3215334160u, 3540055039u, 0, TANH_TOLERANCE, 0},
+{ 666, 3226492024u, 3069064472u, 3237358008u, 23209276u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 667, 1074943832u, 1867297860u, 1072956607u, 2513414118u, 1072692811u, 2618045138u, 0, TANH_TOLERANCE, 0},
+{ 668, 3228513251u, 3171788768u, 3235208783u, 162138697u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 669, 1075436999u, 1245110700u, 1081653954u, 2584994077u, 1072693237u, 3711677726u, 0, TANH_TOLERANCE, 0},
+{ 670, 3226635752u, 3347226587u, 1058962932u, 2291943376u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 671, 1070433398u, 966940828u, 1060726420u, 2798041096u, 1070399821u, 3118560199u, 0, TANH_TOLERANCE, 0},
+{ 672, 1072793759u, 2487340727u, 3223786370u, 4105954991u, 1072271731u, 2389258654u, 0, TANH_TOLERANCE, 0},
+{ 673, 3228193553u, 1671039260u, 1086395032u, 3745833360u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 674, 1069661709u, 651714217u, 1047070645u, 2130549237u, 1069654319u, 221802056u, 0, TANH_TOLERANCE, 0},
+{ 675, 3217601491u, 1423000172u, 3247822717u, 1551488170u, 3217581688u, 181509837u, 0, TANH_TOLERANCE, 0},
+{ 676, 3216277371u, 921077236u, 3213332351u, 1431049019u, 3216274507u, 3009781141u, 0, TANH_TOLERANCE, 0},
+{ 677, 1071704599u, 655715547u, 3190985373u, 1527556471u, 1071578785u, 2205486276u, 0, TANH_TOLERANCE, 0},
+{ 678, 3222412099u, 4110878657u, 3251297180u, 879739345u, 3220176405u, 1214346782u, 0, TANH_TOLERANCE, 0},
+{ 679, 1076367578u, 2623955764u, 1093699897u, 1216444475u, 1072693247u, 4294330559u, 0, TANH_TOLERANCE, 0},
+{ 680, 1078274115u, 107442539u, 3239767031u, 1149813329u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 681, 3224008056u, 1761361082u, 3226030205u, 1121849716u, 3220176895u, 4294909129u, 0, TANH_TOLERANCE, 0},
+{ 682, 3226455627u, 2534144722u, 1044223733u, 3512285706u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 683, 3218137533u, 4073670723u, 1050729852u, 3034818849u, 3218112568u, 2667121844u, 0, TANH_TOLERANCE, 0},
+{ 684, 1081013054u, 1421423503u, 1060278048u, 1397153092u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 685, 3220567557u, 1649206019u, 1104525577u, 1267104290u, 3219923717u, 2769521020u, 0, TANH_TOLERANCE, 0},
+{ 686, 3213419345u, 3775270392u, 1040251850u, 68667319u, 3213419265u, 2545621795u, 0, TANH_TOLERANCE, 0},
+{ 687, 3216913812u, 3099226694u, 3254103006u, 4020102648u, 3216904673u, 4012492726u, 0, TANH_TOLERANCE, 0},
+{ 688, 3216271776u, 3718441177u, 3215643451u, 4032951536u, 3216268948u, 3943411919u, 0, TANH_TOLERANCE, 0},
+{ 689, 1066151467u, 508048351u, 3210196713u, 1707937896u, 1066151350u, 2449381217u, 0, TANH_TOLERANCE, 0},
+{ 690, 3215388843u, 2784738160u, 1073435430u, 1109346010u, 3215387838u, 1879123550u, 0, TANH_TOLERANCE, 0},
+{ 691, 3222579562u, 3331916473u, 3238794568u, 2707019594u, 3220176759u, 980840063u, 0, TANH_TOLERANCE, 0},
+{ 692, 1078502606u, 3093165197u, 1072894805u, 2853215019u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 693, 3219727867u, 2135797997u, 1048399559u, 2941926126u, 3219455627u, 2769844582u, 0, TANH_TOLERANCE, 0},
+{ 694, 1067305348u, 2083412145u, 3249335391u, 507212448u, 1067304798u, 248712640u, 0, TANH_TOLERANCE, 0},
+{ 695, 1074315175u, 4270176401u, 3246546709u, 3288753319u, 1072684643u, 2903274486u, 0, TANH_TOLERANCE, 0},
+{ 696, 3228009919u, 3692175292u, 3197271515u, 3989064196u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 697, 3228623066u, 3111924274u, 1066772558u, 59281695u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 698, 1071878215u, 2135245466u, 3208804313u, 3846547392u, 1071739222u, 3014085290u, 0, TANH_TOLERANCE, 0},
+{ 699, 1079149171u, 972051266u, 3222814246u, 3539700586u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 700, 3216597418u, 330951080u, 1079189813u, 583922384u, 3216591988u, 4271149752u, 0, TANH_TOLERANCE, 0},
+{ 701, 1077057180u, 1711944085u, 1104170032u, 643991456u, 1072693247u, 4294967295u, 0, TANH_TOLERANCE, 0},
+{ 702, 3224992365u, 2072550721u, 3250147641u, 4280263530u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 703, 3213944226u, 1566376352u, 1067251433u, 72984588u, 3213944125u, 3738816808u, 0, TANH_TOLERANCE, 0},
+{ 704, 1079547929u, 3103043079u, 1045853123u, 410067497u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 705, 3219818221u, 1910366299u, 1081770885u, 634683073u, 3219505645u, 2911026815u, 0, TANH_TOLERANCE, 0},
+{ 706, 1075239232u, 2226525875u, 3224149290u, 2126302825u, 1072693202u, 736485286u, 0, TANH_TOLERANCE, 0},
+{ 707, 1073150247u, 1383818978u, 3193885723u, 1220372650u, 1072468548u, 1453165635u, 0, TANH_TOLERANCE, 0},
+{ 708, 1071725823u, 1953339096u, 1077176252u, 1476516558u, 1071611118u, 3094019794u, 0, TANH_TOLERANCE, 0},
+{ 709, 1072383456u, 1306277326u, 1079089150u, 4093716191u, 1072047867u, 2345709570u, 0, TANH_TOLERANCE, 0},
+{ 710, 3223711603u, 51750045u, 3242913901u, 4256866157u, 3220176895u, 4289606629u, 0, TANH_TOLERANCE, 0},
+{ 711, 3213959335u, 2163853087u, 3232053146u, 2962422808u, 3213959230u, 3607978116u, 0, TANH_TOLERANCE, 0},
+{ 712, 1074468369u, 1618388148u, 3233154824u, 3711953164u, 1072688447u, 772390444u, 0, TANH_TOLERANCE, 0},
+{ 713, 3227993634u, 357108214u, 3202294604u, 2306775262u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 714, 3216584150u, 2571356437u, 3249064063u, 2394851808u, 3216578850u, 265180082u, 0, TANH_TOLERANCE, 0},
+{ 715, 3224196635u, 4273880094u, 1103698617u, 3578832032u, 3220176895u, 4294964023u, 0, TANH_TOLERANCE, 0},
+{ 716, 3223989517u, 2091068742u, 3228270226u, 3980489730u, 3220176895u, 4294890111u, 0, TANH_TOLERANCE, 0},
+{ 717, 3222725296u, 2772307714u, 1051008486u, 32546576u, 3220176851u, 36562416u, 0, TANH_TOLERANCE, 0},
+{ 718, 3225500575u, 2143788498u, 3195498043u, 3630119231u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 719, 3215410151u, 2527385594u, 3240503648u, 3482095012u, 3215409103u, 223410783u, 0, TANH_TOLERANCE, 0},
+{ 720, 3226440159u, 2690097362u, 1068598730u, 2360266862u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 721, 1070392205u, 2673272949u, 1082639557u, 522449749u, 1070360701u, 382258917u, 0, TANH_TOLERANCE, 0},
+{ 722, 1081355475u, 3596379400u, 3242016775u, 2002293002u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 723, 1080565288u, 4113224369u, 3222122439u, 2152316893u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 724, 3220796716u, 31662602u, 1047721249u, 1747087514u, 3220009792u, 1786415707u, 0, TANH_TOLERANCE, 0},
+{ 725, 3228443661u, 2489659568u, 1097051253u, 277506957u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 726, 3213421930u, 3850162281u, 3213841942u, 438724093u, 3213421850u, 978459012u, 0, TANH_TOLERANCE, 0},
+{ 727, 1079663895u, 2431814052u, 1075518084u, 2672434118u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 728, 3227434095u, 391606792u, 1048184750u, 4168944276u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 729, 3227869472u, 457529672u, 3201090276u, 72407935u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 730, 3220817871u, 3954981400u, 1052053242u, 2411049585u, 3220016147u, 3511268541u, 0, TANH_TOLERANCE, 0},
+{ 731, 1076742907u, 485456950u, 1088415093u, 1655397424u, 1072693247u, 4294965222u, 0, TANH_TOLERANCE, 0},
+{ 732, 3215011644u, 1551748070u, 3236871640u, 1329701152u, 3215011221u, 2829038109u, 0, TANH_TOLERANCE, 0},
+{ 733, 3221493394u, 3099222537u, 1104984570u, 4293792842u, 3220149432u, 808086103u, 0, TANH_TOLERANCE, 0},
+{ 734, 3216532617u, 3603065260u, 3197735968u, 2402359253u, 3216527797u, 1764416133u, 0, TANH_TOLERANCE, 0},
+{ 735, 3215601800u, 3961208159u, 3219057584u, 2340553876u, 3215600305u, 2344462802u, 0, TANH_TOLERANCE, 0},
+{ 736, 1073833333u, 4014841779u, 3197672877u, 3697233334u, 1072639754u, 1246670554u, 0, TANH_TOLERANCE, 0},
+{ 737, 3219567113u, 1403876392u, 3254028950u, 921363393u, 3219359416u, 4132459186u, 0, TANH_TOLERANCE, 0},
+{ 738, 1082085982u, 1862576361u, 3194031708u, 2476290925u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 739, 1067487560u, 1454212851u, 1088378861u, 3400401866u, 1067487181u, 2318239370u, 0, TANH_TOLERANCE, 0},
+{ 740, 1074406809u, 552676385u, 3188635745u, 3778112968u, 1072687178u, 1070255472u, 0, TANH_TOLERANCE, 0},
+{ 741, 3219555010u, 1199568671u, 3225679997u, 46947405u, 3219351793u, 2517024871u, 0, TANH_TOLERANCE, 0},
+{ 742, 1074539809u, 2596231448u, 3253943728u, 2219151748u, 1072689591u, 1666921402u, 0, TANH_TOLERANCE, 0},
+{ 743, 1071769915u, 4119719558u, 3222036299u, 1275474618u, 1071660967u, 2845583729u, 0, TANH_TOLERANCE, 0},
+{ 744, 3226277175u, 3347296825u, 1101507910u, 1254014794u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 745, 1076779960u, 673775040u, 1070743626u, 244126093u, 1072693247u, 4294966118u, 0, TANH_TOLERANCE, 0},
+{ 746, 3216831338u, 1832066983u, 1051358028u, 3262483417u, 3216823291u, 840194706u, 0, TANH_TOLERANCE, 0},
+{ 747, 1074413872u, 3962610501u, 3198598777u, 849269178u, 1072687339u, 1695789171u, 0, TANH_TOLERANCE, 0},
+{ 748, 3224988140u, 2497516122u, 3254374111u, 2821429629u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 749, 1074139136u, 2805941787u, 3217785843u, 779131141u, 1072676440u, 1089483228u, 0, TANH_TOLERANCE, 0},
+{ 750, 3222714382u, 723423605u, 1084533420u, 627282213u, 3220176847u, 436675031u, 0, TANH_TOLERANCE, 0},
+{ 751, 3220141984u, 4292778869u, 1078101071u, 1676860147u, 3219662074u, 436286370u, 0, TANH_TOLERANCE, 0},
+{ 752, 1074191350u, 3528118587u, 3194648564u, 2363260897u, 1072679465u, 3158136682u, 0, TANH_TOLERANCE, 0},
+{ 753, 3214917975u, 1307010018u, 1061248120u, 1468743108u, 3214917308u, 1887206257u, 0, TANH_TOLERANCE, 0},
+{ 754, 3227708771u, 107905661u, 3226089788u, 1943427674u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 755, 3213396365u, 760006940u, 1054265604u, 1749976597u, 3213396288u, 1015782970u, 0, TANH_TOLERANCE, 0},
+{ 756, 3225190472u, 2787503556u, 1081282610u, 1195841206u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 757, 3213822252u, 545462045u, 3208381743u, 1981311808u, 3213822096u, 1895015686u, 0, TANH_TOLERANCE, 0},
+{ 758, 1070669320u, 3657978397u, 1104463616u, 3501253426u, 1070643315u, 3340057444u, 0, TANH_TOLERANCE, 0},
+{ 759, 1067709649u, 1804177501u, 3210693633u, 3606766729u, 1067708987u, 2207822296u, 0, TANH_TOLERANCE, 0},
+{ 760, 1074759727u, 1336278526u, 1043741618u, 3165279431u, 1072691666u, 3920633442u, 0, TANH_TOLERANCE, 0},
+{ 761, 1069103403u, 1599382075u, 1058018527u, 4212580517u, 1069098074u, 3887268780u, 0, TANH_TOLERANCE, 0},
+{ 762, 3217988086u, 3007589929u, 3202026547u, 2792028313u, 3217950731u, 2952417810u, 0, TANH_TOLERANCE, 0},
+{ 763, 3228965522u, 1866066996u, 1060329048u, 3727175322u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 764, 3215193859u, 150890940u, 1056025306u, 3082724735u, 3215193196u, 1187099324u, 0, TANH_TOLERANCE, 0},
+{ 765, 1071446123u, 80400395u, 1093584426u, 3478941315u, 1071326261u, 48805005u, 0, TANH_TOLERANCE, 0},
+{ 766, 3228571942u, 4050954182u, 3219263194u, 2537475930u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 767, 1071133327u, 2881752155u, 3212589299u, 2559651278u, 1071061848u, 3503400932u, 0, TANH_TOLERANCE, 0},
+{ 768, 3228044784u, 440309030u, 3214267461u, 3788040806u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 769, 1080553671u, 918813144u, 3208535698u, 1607035904u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 770, 1066254699u, 2497054124u, 1089139147u, 2549609010u, 1066254562u, 1621993583u, 0, TANH_TOLERANCE, 0},
+{ 771, 1066960585u, 790219083u, 1054657139u, 2797979479u, 1066960277u, 3785521302u, 0, TANH_TOLERANCE, 0},
+{ 772, 1070364312u, 1149462078u, 1095765205u, 3879963182u, 1070334162u, 791933143u, 0, TANH_TOLERANCE, 0},
+{ 773, 3216361301u, 2684353926u, 3205212854u, 1732474928u, 3216357868u, 1244044034u, 0, TANH_TOLERANCE, 0},
+{ 774, 1079508325u, 2742237025u, 1051317716u, 3386396147u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 775, 1071619594u, 3408320912u, 1103071166u, 4233059513u, 1071466003u, 2250109031u, 0, TANH_TOLERANCE, 0},
+{ 776, 1071155004u, 1077495917u, 1088399968u, 433115118u, 1071080664u, 2213941110u, 0, TANH_TOLERANCE, 0},
+{ 777, 3217130484u, 841366493u, 1051716814u, 4121125128u, 3217123372u, 2948102763u, 0, TANH_TOLERANCE, 0},
+{ 778, 1070923540u, 321857207u, 1089128010u, 1149988239u, 1070876210u, 287366057u, 0, TANH_TOLERANCE, 0},
+{ 779, 3226668295u, 799866606u, 3197637091u, 3924438208u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 780, 3213082986u, 2002049816u, 1077053447u, 2240354761u, 3213082946u, 1332721886u, 0, TANH_TOLERANCE, 0},
+{ 781, 3222714827u, 478939968u, 1097035749u, 1066716440u, 3220176847u, 1148390538u, 0, TANH_TOLERANCE, 0},
+{ 782, 3224085033u, 1653104725u, 1088548129u, 81977716u, 3220176895u, 4294949325u, 0, TANH_TOLERANCE, 0},
+{ 783, 3215735644u, 3899475018u, 3189694084u, 3330093036u, 3215733772u, 108014255u, 0, TANH_TOLERANCE, 0},
+{ 784, 1077778247u, 2612450289u, 1079065127u, 603380842u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 785, 1080713847u, 3962735564u, 1101570429u, 1372490825u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 786, 1069486080u, 1479841439u, 1059312257u, 541504905u, 1069476148u, 1330025412u, 0, TANH_TOLERANCE, 0},
+{ 787, 1075516450u, 2626148789u, 1057571099u, 4121656076u, 1072693242u, 2025230023u, 0, TANH_TOLERANCE, 0},
+{ 788, 1075321933u, 1902560314u, 1043130231u, 3557671562u, 1072693223u, 2642910265u, 0, TANH_TOLERANCE, 0},
+{ 789, 3214801292u, 41779312u, 1081626342u, 831171823u, 3214800731u, 509784550u, 0, TANH_TOLERANCE, 0},
+{ 790, 1069665436u, 1393168821u, 1066457405u, 1381616968u, 1069657975u, 1271360986u, 0, TANH_TOLERANCE, 0},
+{ 791, 1073386717u, 3756584649u, 3222267229u, 1423157432u, 1072547282u, 502039030u, 0, TANH_TOLERANCE, 0},
+{ 792, 3229269850u, 1894912556u, 1042426694u, 155024547u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 793, 3214327880u, 35164295u, 3203391785u, 1037041084u, 3214327634u, 3083858517u, 0, TANH_TOLERANCE, 0},
+{ 794, 1076388871u, 3957875950u, 3232195211u, 1590756436u, 1072693247u, 4294507195u, 0, TANH_TOLERANCE, 0},
+{ 795, 1071990050u, 1447585080u, 1071279485u, 1107922438u, 1071815538u, 3161902907u, 0, TANH_TOLERANCE, 0},
+{ 796, 1067224038u, 981897615u, 1051856116u, 430357614u, 1067223553u, 3187978985u, 0, TANH_TOLERANCE, 0},
+{ 797, 3222281335u, 395145384u, 3219821938u, 50586510u, 3220175565u, 2064559548u, 0, TANH_TOLERANCE, 0},
+{ 798, 1072921640u, 750827797u, 1082862669u, 230466783u, 1072355622u, 1074964933u, 0, TANH_TOLERANCE, 0},
+{ 799, 1077231635u, 1365083575u, 3204848310u, 1700831722u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 800, 3220187542u, 344241827u, 1071538935u, 2715566077u, 3219685795u, 4089371904u, 0, TANH_TOLERANCE, 0},
+{ 801, 3227659912u, 4069301823u, 3193208760u, 2949125229u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 802, 1081211291u, 3585711710u, 1065801594u, 2302229267u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 803, 3214041900u, 709803845u, 1048741487u, 2296910194u, 3214041770u, 2865692980u, 0, TANH_TOLERANCE, 0},
+{ 804, 3214252299u, 744421179u, 1069302001u, 2659232829u, 3214252089u, 1383114050u, 0, TANH_TOLERANCE, 0},
+{ 805, 1078155904u, 1799949903u, 3192522886u, 4212149209u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 806, 3217642838u, 145234164u, 3250614064u, 912384201u, 3217621494u, 2301037676u, 0, TANH_TOLERANCE, 0},
+{ 807, 3225830600u, 2784620507u, 1102812948u, 3531481022u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 808, 3229139567u, 383952592u, 3205659905u, 3633194728u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 809, 3216059164u, 3792395543u, 1070072378u, 3864816376u, 3216057481u, 392473577u, 0, TANH_TOLERANCE, 0},
+{ 810, 3217899185u, 2115553675u, 1066288499u, 3538377867u, 3217866517u, 4139851017u, 0, TANH_TOLERANCE, 0},
+{ 811, 3229006513u, 1230026762u, 1090719723u, 440819880u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 812, 3214518020u, 2991290482u, 1096886719u, 1097971167u, 3214517669u, 464087563u, 0, TANH_TOLERANCE, 0},
+{ 813, 1077465688u, 1098035020u, 3230900504u, 1479059095u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 814, 3229036868u, 1719428427u, 3188631907u, 3707377409u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 815, 1068964805u, 3748932896u, 1084908557u, 1325384361u, 1068960705u, 3897061665u, 0, TANH_TOLERANCE, 0},
+{ 816, 1076315468u, 3979168763u, 1057455255u, 2454615952u, 1072693247u, 4293557095u, 0, TANH_TOLERANCE, 0},
+{ 817, 1068835624u, 1449164578u, 1056960316u, 1654931641u, 1068832484u, 4023712312u, 0, TANH_TOLERANCE, 0},
+{ 818, 1073536162u, 2120487381u, 3226298974u, 2364226633u, 1072582528u, 2771358353u, 0, TANH_TOLERANCE, 0},
+{ 819, 1074022852u, 1074268944u, 1065730444u, 280016852u, 1072667115u, 442967526u, 0, TANH_TOLERANCE, 0},
+{ 820, 3216036896u, 3315127889u, 3236295594u, 2900924954u, 3216035310u, 3763110972u, 0, TANH_TOLERANCE, 0},
+{ 821, 3215300259u, 2246037502u, 1049691002u, 1496066550u, 3215299421u, 2831592142u, 0, TANH_TOLERANCE, 0},
+{ 822, 3213978379u, 4191285446u, 3217936236u, 2382392789u, 3213978269u, 3840860417u, 0, TANH_TOLERANCE, 0},
+{ 823, 1078153244u, 640099844u, 1042152237u, 2064279383u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 824, 1075719134u, 3468560824u, 1093251038u, 310958750u, 1072693246u, 3531801958u, 0, TANH_TOLERANCE, 0},
+{ 825, 1080011184u, 1413568905u, 1100941106u, 1627289946u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 826, 3213569646u, 3797143370u, 3195497539u, 3843275034u, 3213569542u, 1270881281u, 0, TANH_TOLERANCE, 0},
+{ 827, 3229008721u, 2806642640u, 3201943068u, 2515980718u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 828, 1077440132u, 632580632u, 1078673506u, 3259601317u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 829, 3216709215u, 3309678799u, 1049337078u, 3056787074u, 3216702620u, 1653632981u, 0, TANH_TOLERANCE, 0},
+{ 830, 3221495289u, 2341164249u, 1080834967u, 2810890005u, 3220149628u, 3005879799u, 0, TANH_TOLERANCE, 0},
+{ 831, 1072262554u, 932124675u, 1093915797u, 662682630u, 1071982362u, 3057316859u, 0, TANH_TOLERANCE, 0},
+{ 832, 3228258571u, 1367996113u, 3251723684u, 2974064663u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 833, 1074987851u, 323437999u, 1090499064u, 901457511u, 1072692936u, 364088582u, 0, TANH_TOLERANCE, 0},
+{ 834, 3225293116u, 4184941840u, 3196770014u, 2458988443u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 835, 1077132524u, 2023065054u, 3211994098u, 2734612965u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 836, 1071414726u, 3679267365u, 3237728785u, 1699558211u, 1071300429u, 3732495732u, 0, TANH_TOLERANCE, 0},
+{ 837, 1077593250u, 1826799031u, 1078709629u, 3986905229u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 838, 1068572425u, 351061688u, 3194386466u, 4105857588u, 1068570755u, 499330562u, 0, TANH_TOLERANCE, 0},
+{ 839, 1068808070u, 1365244058u, 1064457319u, 1452191426u, 1068805114u, 1012629484u, 0, TANH_TOLERANCE, 0},
+{ 840, 1071462417u, 2463030625u, 3215975031u, 3773488326u, 1071339602u, 4185089979u, 0, TANH_TOLERANCE, 0},
+{ 841, 3229256575u, 752664055u, 1065110394u, 1835931663u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 842, 1077559328u, 3496172149u, 1089617208u, 109068701u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 843, 3215960879u, 1636966254u, 1086098766u, 2016598298u, 3215958236u, 2999409352u, 0, TANH_TOLERANCE, 0},
+{ 844, 1067708534u, 3551516956u, 1097969102u, 1317953425u, 1067707874u, 2624410332u, 0, TANH_TOLERANCE, 0},
+{ 845, 3223540761u, 2977627788u, 1045339018u, 516058480u, 3220176895u, 4222297914u, 0, TANH_TOLERANCE, 0},
+{ 846, 3224825666u, 3901731263u, 3189566462u, 32272932u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 847, 1074136068u, 1956025297u, 3246628529u, 3840733905u, 1072676243u, 765228757u, 0, TANH_TOLERANCE, 0},
+{ 848, 1080943668u, 561057891u, 3198494340u, 4271027193u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 849, 3228909825u, 692989850u, 3242630588u, 2492225971u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 850, 3218062309u, 3439913962u, 1067477011u, 2973333638u, 3218020721u, 3960544974u, 0, TANH_TOLERANCE, 0},
+{ 851, 3219236869u, 877613377u, 1044917899u, 809672798u, 3219132175u, 1311516534u, 0, TANH_TOLERANCE, 0},
+{ 852, 3222171454u, 905426932u, 1046417457u, 1086320855u, 3220174816u, 151676798u, 0, TANH_TOLERANCE, 0},
+{ 853, 3227472261u, 2645567288u, 1051258339u, 557182478u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 854, 3216640862u, 186287752u, 1061342054u, 4054003419u, 3216634997u, 2519513944u, 0, TANH_TOLERANCE, 0},
+{ 855, 1079440881u, 3506889716u, 3243866036u, 519056371u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 856, 1065722725u, 2171898436u, 3246911982u, 1091500784u, 1065722672u, 3180746426u, 0, TANH_TOLERANCE, 0},
+{ 857, 3226870457u, 368493885u, 3222871893u, 1419055230u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 858, 1078319084u, 2010971245u, 3188804530u, 1518695799u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 859, 3218009421u, 1239207795u, 1040192984u, 2199481342u, 3217970879u, 3474753941u, 0, TANH_TOLERANCE, 0},
+{ 860, 3218318669u, 4264613432u, 3203460972u, 3558930895u, 3218279698u, 4197303057u, 0, TANH_TOLERANCE, 0},
+{ 861, 1068125075u, 3772748958u, 3227667376u, 309688336u, 1068123562u, 1489711826u, 0, TANH_TOLERANCE, 0},
+{ 862, 3223403009u, 1077949160u, 1075769893u, 2405271377u, 3220176895u, 3700387119u, 0, TANH_TOLERANCE, 0},
+{ 863, 1078203664u, 3751608506u, 3232278094u, 930375071u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 864, 3215394369u, 1518334131u, 3205247482u, 791756713u, 3215393353u, 103206669u, 0, TANH_TOLERANCE, 0},
+{ 865, 1067240397u, 2825203170u, 3245054001u, 1822981827u, 1067239900u, 1515673819u, 0, TANH_TOLERANCE, 0},
+{ 866, 1080093419u, 514474738u, 1089072073u, 3300845441u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 867, 3219536978u, 247369460u, 3197320093u, 687450958u, 3219340336u, 978352660u, 0, TANH_TOLERANCE, 0},
+{ 868, 1081092750u, 2722237629u, 1058272368u, 90602316u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 869, 3217535619u, 1845900544u, 3231520830u, 3389751458u, 3217518115u, 4229139541u, 0, TANH_TOLERANCE, 0},
+{ 870, 3227612301u, 737689911u, 3195377751u, 3462616966u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 871, 3221441232u, 3620285831u, 1055501023u, 2708056059u, 3220143434u, 3921561u, 0, TANH_TOLERANCE, 0},
+{ 872, 3220513572u, 4073430285u, 1056206159u, 172017902u, 3219898084u, 1973970623u, 0, TANH_TOLERANCE, 0},
+{ 873, 3219161094u, 2799176222u, 1052706894u, 4083892667u, 3219020605u, 733511961u, 0, TANH_TOLERANCE, 0},
+{ 874, 3216959621u, 1562351330u, 1069705601u, 1247765260u, 3216949835u, 4127746042u, 0, TANH_TOLERANCE, 0},
+{ 875, 3224328691u, 51853475u, 3189080201u, 2783553144u, 3220176895u, 4294966860u, 0, TANH_TOLERANCE, 0},
+{ 876, 3220502929u, 3851781549u, 3241598113u, 514064046u, 3219892754u, 382488881u, 0, TANH_TOLERANCE, 0},
+{ 877, 1080123021u, 934745487u, 3248182437u, 2798581921u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 878, 3219373949u, 2948648757u, 3232177250u, 4278702895u, 3219231339u, 732036294u, 0, TANH_TOLERANCE, 0},
+{ 879, 1073534300u, 4259101461u, 1061606772u, 84229920u, 1072582145u, 1140039901u, 0, TANH_TOLERANCE, 0},
+{ 880, 3215901351u, 3891230598u, 1095924595u, 3049217547u, 3215898929u, 4061131300u, 0, TANH_TOLERANCE, 0},
+{ 881, 1074207325u, 3806018919u, 3243191216u, 280177341u, 1072680278u, 119798727u, 0, TANH_TOLERANCE, 0},
+{ 882, 1070061714u, 3900344258u, 1063647809u, 4206745890u, 1070043882u, 4225813589u, 0, TANH_TOLERANCE, 0},
+{ 883, 3222464456u, 2126253040u, 3207248026u, 808507485u, 3220176566u, 3729330534u, 0, TANH_TOLERANCE, 0},
+{ 884, 1076653133u, 3465685634u, 3230391053u, 3754958214u, 1072693247u, 4294959137u, 0, TANH_TOLERANCE, 0},
+{ 885, 1080840988u, 461094531u, 1101110393u, 1316091396u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 886, 1071271770u, 4197635149u, 1091873113u, 1240127141u, 1071180785u, 300469245u, 0, TANH_TOLERANCE, 0},
+{ 887, 1074333893u, 118603800u, 1105304898u, 4291425557u, 1072685235u, 2023333141u, 0, TANH_TOLERANCE, 0},
+{ 888, 3219720621u, 3744663425u, 3212482771u, 953662066u, 3219451491u, 1728510743u, 0, TANH_TOLERANCE, 0},
+{ 889, 1076782697u, 3564196690u, 3228101916u, 904305212u, 1072693247u, 4294966166u, 0, TANH_TOLERANCE, 0},
+{ 890, 1067207479u, 3566257266u, 3235138829u, 2734275140u, 1067207008u, 396173854u, 0, TANH_TOLERANCE, 0},
+{ 891, 3227171261u, 606044282u, 3241318094u, 2446416887u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 892, 1065744532u, 2336116589u, 3197594053u, 2296925138u, 1065744477u, 1318672729u, 0, TANH_TOLERANCE, 0},
+{ 893, 1070101995u, 907670625u, 3240769036u, 1827119006u, 1070082762u, 1452920190u, 0, TANH_TOLERANCE, 0},
+{ 894, 1066487279u, 2818710946u, 3246059905u, 553394170u, 1066487171u, 3077210550u, 0, TANH_TOLERANCE, 0},
+{ 895, 3213621342u, 4099522736u, 3232742168u, 3718083858u, 3213621228u, 4270652673u, 0, TANH_TOLERANCE, 0},
+{ 896, 1078739788u, 1059279404u, 1080245336u, 175941677u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 897, 1082121019u, 1650862428u, 1061816101u, 1723201723u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 898, 3226429902u, 2462163405u, 3218946201u, 3876535372u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 899, 1076004278u, 495844137u, 1073721460u, 772777946u, 1072693247u, 4132231651u, 0, TANH_TOLERANCE, 0},
+{ 900, 1068143970u, 458757721u, 3245680321u, 3609892707u, 1068142406u, 1203906592u, 0, TANH_TOLERANCE, 0},
+{ 901, 3214254476u, 2533012202u, 1079980803u, 3592268374u, 3214254265u, 3301236168u, 0, TANH_TOLERANCE, 0},
+{ 902, 3216996268u, 4108274117u, 1063045844u, 571992389u, 3216985944u, 4098370140u, 0, TANH_TOLERANCE, 0},
+{ 903, 1077984359u, 3541110973u, 1096296754u, 3118427427u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 904, 3213902987u, 1213941007u, 1105433735u, 2172963370u, 3213902897u, 2586721683u, 0, TANH_TOLERANCE, 0},
+{ 905, 1079027567u, 272190288u, 1095452370u, 4026581530u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 906, 1079855269u, 2843638672u, 1100510986u, 3190536898u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 907, 1076417062u, 2014317727u, 3247389683u, 2428462015u, 1072693247u, 4294668042u, 0, TANH_TOLERANCE, 0},
+{ 908, 1078248077u, 688442200u, 1047852515u, 3035186380u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 909, 1074567060u, 1010095511u, 3221288076u, 405287991u, 1072689952u, 558226479u, 0, TANH_TOLERANCE, 0},
+{ 910, 3229225943u, 2983070435u, 1089546472u, 2907918480u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 911, 1076696665u, 81928569u, 1056007286u, 2740556321u, 1072693247u, 4294963097u, 0, TANH_TOLERANCE, 0},
+{ 912, 1066276691u, 2076689028u, 1081558619u, 3039159031u, 1066276549u, 2514845407u, 0, TANH_TOLERANCE, 0},
+{ 913, 1067230382u, 1376882094u, 3211003208u, 1296286481u, 1067229892u, 3821406691u, 0, TANH_TOLERANCE, 0},
+{ 914, 1074871434u, 744133164u, 3200943494u, 955832216u, 1072692489u, 3864723433u, 0, TANH_TOLERANCE, 0},
+{ 915, 3223144598u, 176522478u, 1069999908u, 2891249491u, 3220176894u, 705332519u, 0, TANH_TOLERANCE, 0},
+{ 916, 1065584698u, 3685851715u, 3187829932u, 2363997529u, 1065584660u, 211014232u, 0, TANH_TOLERANCE, 0},
+{ 917, 1065409879u, 3974431579u, 1052505165u, 2589067816u, 1065409854u, 4054288065u, 0, TANH_TOLERANCE, 0},
+{ 918, 3213516885u, 3819109588u, 1048561488u, 969143351u, 3213516790u, 1379942954u, 0, TANH_TOLERANCE, 0},
+{ 919, 1073687973u, 4246896124u, 1104584799u, 1940097860u, 1072609810u, 1441804246u, 0, TANH_TOLERANCE, 0},
+{ 920, 1066912836u, 2228686199u, 3220231833u, 777624847u, 1066912555u, 3407343459u, 0, TANH_TOLERANCE, 0},
+{ 921, 3224127274u, 4189906558u, 3203004203u, 854242364u, 3220176895u, 4294957863u, 0, TANH_TOLERANCE, 0},
+{ 922, 1081890311u, 4089051094u, 3227282692u, 2693170723u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 923, 1066855127u, 1278581412u, 3239296746u, 1774588717u, 1066854876u, 2541069805u, 0, TANH_TOLERANCE, 0},
+{ 924, 3221324110u, 1794845306u, 1104879344u, 4135865182u, 3220124819u, 2264282728u, 0, TANH_TOLERANCE, 0},
+{ 925, 1081283231u, 754938390u, 1061291430u, 2010786993u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 926, 1073581409u, 2034303731u, 3240176537u, 314147356u, 1072591461u, 214940394u, 0, TANH_TOLERANCE, 0},
+{ 927, 3224109162u, 567588900u, 3195452230u, 1421366017u, 3220176895u, 4294954860u, 0, TANH_TOLERANCE, 0},
+{ 928, 3221944027u, 2708717091u, 1071975971u, 1364590470u, 3220171946u, 3353839435u, 0, TANH_TOLERANCE, 0},
+{ 929, 3229068611u, 3461956134u, 3207820115u, 1605709634u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 930, 1071594452u, 1497124553u, 1051715442u, 916736957u, 1071446066u, 3751200891u, 0, TANH_TOLERANCE, 0},
+{ 931, 1070002699u, 834914365u, 1064667143u, 2839166298u, 1069986795u, 4288384363u, 0, TANH_TOLERANCE, 0},
+{ 932, 1069862861u, 2139295776u, 1062816721u, 914592523u, 1069850968u, 1656920492u, 0, TANH_TOLERANCE, 0},
+{ 933, 3213754179u, 851569132u, 1058503154u, 1399378677u, 3213754038u, 2687975447u, 0, TANH_TOLERANCE, 0},
+{ 934, 3224100513u, 3897202342u, 3245382590u, 246600375u, 3220176895u, 4294953106u, 0, TANH_TOLERANCE, 0},
+{ 935, 3222314580u, 3620429520u, 1055627557u, 229305u, 3220175863u, 2092509791u, 0, TANH_TOLERANCE, 0},
+{ 936, 1076618801u, 3641997865u, 3206673888u, 93720614u, 1072693247u, 4294953519u, 0, TANH_TOLERANCE, 0},
+{ 937, 3222565555u, 32766320u, 1062084905u, 3668443038u, 3220176743u, 3446256579u, 0, TANH_TOLERANCE, 0},
+{ 938, 3222250420u, 2039713492u, 3248699388u, 1346210821u, 3220175356u, 3537038166u, 0, TANH_TOLERANCE, 0},
+{ 939, 1078369952u, 1335820726u, 3191756860u, 1808427032u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 940, 1070879947u, 650692001u, 1103515670u, 2253348763u, 1070836863u, 2862482944u, 0, TANH_TOLERANCE, 0},
+{ 941, 3213415283u, 2372623300u, 3210185343u, 3200572848u, 3213415203u, 3712949820u, 0, TANH_TOLERANCE, 0},
+{ 942, 1080873125u, 762317532u, 3194595095u, 3192607437u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 943, 1070651309u, 217775356u, 3232827087u, 2969367386u, 1070626514u, 2747666722u, 0, TANH_TOLERANCE, 0},
+{ 944, 1069755463u, 3621353969u, 1077994795u, 3873976266u, 1069746150u, 163612163u, 0, TANH_TOLERANCE, 0},
+{ 945, 1078719075u, 268372152u, 3221764390u, 3216978962u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 946, 3227563243u, 142942404u, 1075322987u, 1746449109u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 947, 1081986200u, 496534875u, 3254522293u, 2532372502u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 948, 3228205445u, 2999955409u, 3222793392u, 1868977643u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 949, 1074319042u, 3353193428u, 3218469191u, 3326244297u, 1072684769u, 1756315237u, 0, TANH_TOLERANCE, 0},
+{ 950, 1072413103u, 73646871u, 3231442171u, 3711510104u, 1072063156u, 1138124218u, 0, TANH_TOLERANCE, 0},
+{ 951, 1077900612u, 218135177u, 3198908856u, 3082199105u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 952, 1072262784u, 1061628117u, 3248859043u, 86776158u, 1071982492u, 946844398u, 0, TANH_TOLERANCE, 0},
+{ 953, 3217921858u, 938869114u, 1087911145u, 2416710759u, 3217888034u, 157440628u, 0, TANH_TOLERANCE, 0},
+{ 954, 1079848192u, 2970853959u, 3239543429u, 1887505029u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 955, 3225145875u, 1337895935u, 1076463812u, 1172733328u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 956, 1068014296u, 1469010822u, 3229583535u, 551399515u, 1068013056u, 745955852u, 0, TANH_TOLERANCE, 0},
+{ 957, 1074118123u, 1849711538u, 1049053713u, 1744276190u, 1072675043u, 2479863773u, 0, TANH_TOLERANCE, 0},
+{ 958, 3226410140u, 2976596113u, 3192137295u, 3033242648u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 959, 1079824113u, 876810930u, 3197470945u, 2571587447u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 960, 3226042170u, 4007797282u, 3225853845u, 4069319648u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 961, 1067202926u, 3840538373u, 1043189552u, 3668774580u, 1067202458u, 2670505126u, 0, TANH_TOLERANCE, 0},
+{ 962, 3220757432u, 200857661u, 3229758439u, 3359367736u, 3219997347u, 873171144u, 0, TANH_TOLERANCE, 0},
+{ 963, 3227826349u, 111868139u, 3227902082u, 2366064003u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 964, 1066215262u, 3510904416u, 3222131653u, 3822770497u, 1066215133u, 3308089664u, 0, TANH_TOLERANCE, 0},
+{ 965, 3226947075u, 789151814u, 1099269239u, 2958956055u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 966, 1076290712u, 722163228u, 1105524559u, 1534462169u, 1072693247u, 4292909799u, 0, TANH_TOLERANCE, 0},
+{ 967, 1066509006u, 2207037106u, 3208952465u, 1231254630u, 1066508892u, 1078364023u, 0, TANH_TOLERANCE, 0},
+{ 968, 3215709852u, 3838689849u, 3198769679u, 1302617170u, 3215708057u, 808607773u, 0, TANH_TOLERANCE, 0},
+{ 969, 1076501722u, 2527556476u, 3240373426u, 124352692u, 1072693247u, 4294885069u, 0, TANH_TOLERANCE, 0},
+{ 970, 3215269445u, 3502371499u, 1043411944u, 4190072016u, 3215268661u, 2097129318u, 0, TANH_TOLERANCE, 0},
+{ 971, 1070967598u, 1798470077u, 3200116917u, 3421833729u, 1070915714u, 623414423u, 0, TANH_TOLERANCE, 0},
+{ 972, 3214486476u, 3653237931u, 3204255012u, 3683870669u, 3214486144u, 2924063688u, 0, TANH_TOLERANCE, 0},
+{ 973, 1069317222u, 376530104u, 1073853547u, 565755892u, 1069309555u, 442847759u, 0, TANH_TOLERANCE, 0},
+{ 974, 3226775211u, 558292492u, 1051772749u, 4267873474u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 975, 3221626981u, 509637100u, 3212030069u, 215050379u, 3220160354u, 521049736u, 0, TANH_TOLERANCE, 0},
+{ 976, 1078425613u, 3571665665u, 3188628584u, 757824767u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 977, 3220042217u, 998858159u, 1063077962u, 436029885u, 3219617538u, 1003022105u, 0, TANH_TOLERANCE, 0},
+{ 978, 3217481301u, 996300405u, 3193842624u, 80548098u, 3217465556u, 1091661181u, 0, TANH_TOLERANCE, 0},
+{ 979, 3222557384u, 3876129407u, 3215332180u, 2226970413u, 3220176734u, 59833828u, 0, TANH_TOLERANCE, 0},
+{ 980, 3225026041u, 200013509u, 3224552716u, 414878724u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 981, 3224325637u, 309319541u, 1048979765u, 1261662434u, 3220176895u, 4294966839u, 0, TANH_TOLERANCE, 0},
+{ 982, 1077718303u, 4062255924u, 3224274128u, 4289485681u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+{ 983, 3224601748u, 1611969213u, 1053890378u, 3774617276u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 984, 1075169883u, 1752164782u, 3239587974u, 612223386u, 1072693170u, 909326654u, 0, TANH_TOLERANCE, 0},
+{ 985, 1065663030u, 2024044989u, 1074932678u, 3259111307u, 1065662984u, 399148943u, 0, TANH_TOLERANCE, 0},
+{ 986, 1068936158u, 2564965629u, 1093571065u, 169360454u, 1068932286u, 1946243873u, 0, TANH_TOLERANCE, 0},
+{ 987, 1077016178u, 1860101737u, 3191222372u, 1676437468u, 1072693247u, 4294967291u, 0, TANH_TOLERANCE, 0},
+{ 988, 1070288728u, 588387057u, 3192103292u, 2495288012u, 1070262055u, 2204208977u, 0, TANH_TOLERANCE, 0},
+{ 989, 3214127225u, 659070058u, 1073095700u, 1393632068u, 3214127066u, 672489002u, 0, TANH_TOLERANCE, 0},
+{ 990, 3220828991u, 4276187829u, 3217553330u, 1868253275u, 3220019394u, 2922613580u, 0, TANH_TOLERANCE, 0},
+{ 991, 3222171696u, 2085481575u, 3215994784u, 800910002u, 3220174817u, 4105080085u, 0, TANH_TOLERANCE, 0},
+{ 992, 1069517748u, 1950570756u, 3200582211u, 941022151u, 1069507347u, 2421477801u, 0, TANH_TOLERANCE, 0},
+{ 993, 1070113280u, 2075610870u, 3250142022u, 3605152103u, 1070093642u, 2347649094u, 0, TANH_TOLERANCE, 0},
+{ 994, 3216567890u, 3792931748u, 3204857863u, 804393211u, 3216562745u, 455243881u, 0, TANH_TOLERANCE, 0},
+{ 995, 3229529122u, 3430071177u, 3226288311u, 3652522729u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
+{ 996, 3215994766u, 236884699u, 3227874605u, 2193269825u, 3215993354u, 3732743523u, 0, TANH_TOLERANCE, 0},
+{ 997, 1071228049u, 2744231849u, 1046186036u, 771053722u, 1071143543u, 2181158284u, 0, TANH_TOLERANCE, 0},
+{ 998, 1076656004u, 3000189819u, 1096500901u, 2057239777u, 1072693247u, 4294959487u, 0, TANH_TOLERANCE, 0},
+{ 999, 1078106941u, 205759408u, 3244643377u, 2702292618u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
+
+
+// AUTOMATICALLY GENERATED VECTORS STOP
+
+};
+
+#endif // CYGONCE_LIBM_TANH_H multiple inclusion protection
+
+// EOF tanh.h
diff --git a/cesar/ecos/packages/language/c/libm/current/tests/vectors/vector_support.h b/cesar/ecos/packages/language/c/libm/current/tests/vectors/vector_support.h
new file mode 100644
index 0000000000..8ee18ac926
--- /dev/null
+++ b/cesar/ecos/packages/language/c/libm/current/tests/vectors/vector_support.h
@@ -0,0 +1,500 @@
+#ifndef CYGONCE_LIBM_VECTOR_SUPPORT_H
+#define CYGONCE_LIBM_VECTOR_SUPPORT_H
+//========================================================================
+//
+// vector_support.h
+//
+// Support for testing of the math library using test vectors
+//
+//========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jlarmour
+// Contributors: jlarmour
+// Date: 1999-01-21
+// Purpose:
+// Description:
+// Usage: #include "vectors/vector_support.h"
+//
+//####DESCRIPTIONEND####
+//
+//========================================================================
+
+// CONFIGURATION
+
+#include <pkgconf/libm.h> // Configuration header
+#include <pkgconf/isoinfra.h> // CYGINT_ISO_MAIN_STARTUP
+
+// INCLUDES
+
+#include <cyg/infra/cyg_type.h> // Common type definitions and support
+#include <cyg/infra/testcase.h> // Test infrastructure
+#include <math.h> // Header for this package
+#include <sys/ieeefp.h> // Cyg_libm_ieee_double_shape_type
+#include <cyg/infra/diag.h>
+
+#ifndef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+# include <errno.h> // For Cyg_ErrNo
+#endif
+
+// CONSTANTS
+
+#define PROBLEM_THRESHOLD 10 // Number of test vectors allowed to fail
+ // before we give up completely
+
+// HOW TO START TESTS
+
+#if CYGINT_ISO_MAIN_STARTUP
+
+# define START_TEST( test ) test(0)
+
+#elif defined(CYGFUN_KERNEL_API_C)
+
+# include <cyg/hal/hal_arch.h>
+# include <cyg/kernel/kapi.h>
+
+# define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+static cyg_uint8 stack[STACKSIZE];
+static cyg_handle_t thr_handle;
+static cyg_thread thr;
+
+# define START_TEST( test ) CYG_MACRO_START \
+ cyg_thread_create( 4, &test, (cyg_addrword_t)0, "test", \
+ &stack[0], STACKSIZE, &thr_handle, &thr ); \
+ cyg_thread_resume( thr_handle ); \
+ cyg_scheduler_start(); \
+ CYG_MACRO_END
+
+externC int main( int, char ** );
+
+externC void
+cyg_user_start( void )
+{
+ (void) main(0, NULL);
+} // cyg_user_start()
+
+#else // !defined(CYGFUN_KERNEL_API_C)
+
+externC int main( int, char ** );
+
+externC void
+cyg_user_start( void )
+{
+ (void) main(0, NULL);
+} // cyg_user_start()
+
+# define START_TEST( test ) test(0)
+
+#endif
+
+// TYPE DEFINITIONS
+
+
+typedef enum {
+ CYG_LIBM_TEST_VEC_NONE, // this indicates whether the "double"
+ CYG_LIBM_TEST_VEC_INT, // is being used to store a double, an
+ CYG_LIBM_TEST_VEC_DOUBLE, // int, or its not being used at all!
+ CYG_LIBM_TEST_VEC_INT_P, // int pointer
+ CYG_LIBM_TEST_VEC_DOUBLE_P // double pointer
+} Cyg_libm_test_arg_type;
+
+
+// Define a type for a test vector record
+
+typedef struct {
+ cyg_ucount32 vector_num; // id number of this test vector record
+
+ // if any of the following arguments are ints rather than doubles, then
+ // use the lsw part to store it
+
+ cyg_uint32 arg1_msw; // first argument
+ cyg_uint32 arg1_lsw;
+ cyg_uint32 arg2_msw; // second argument
+ cyg_uint32 arg2_lsw;
+ cyg_uint32 result_msw; // expected return value
+ cyg_uint32 result_lsw;
+
+#ifndef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ Cyg_ErrNo errno_val; // expected value of errno. 0==unchanged
+#else
+ cyg_uint32 errno_val;
+#endif
+
+ double tolerance; // relative amount that it is allowed
+ // to vary. i.e. the value should be
+ // plus or minus result*tolerance
+
+ int matherr_type; // if testing the matherr() function,
+ // what type should the exception be
+} Cyg_libm_test_double_vec_t;
+
+
+// types to cope with the different forms of function to be called by the
+// test vector
+
+typedef double (*ddfn)( double, double );
+typedef double (*difn)( double, int );
+typedef double (*dfn)( double );
+typedef double (*ddpfn)( double, double *);
+typedef double (*dipfn)( double, int *);
+
+
+// STATIC FUNCTIONS
+
+// equivalent of abs() for doubles. We want to be independent of fabs()
+
+static double
+my_abs_d( double x )
+{
+ Cyg_libm_ieee_double_shape_type t;
+
+ t.value = x;
+
+ t.number.sign = 0;
+
+ return t.value;
+} // my_abs_d()
+
+
+static cyg_bool
+checkErrorAcceptable( Cyg_libm_ieee_double_shape_type is,
+ Cyg_libm_ieee_double_shape_type shouldbe,
+ double tolerance) // _relative_ amount it can vary
+{
+ Cyg_libm_ieee_double_shape_type temp_doub;
+
+ // first do a short-circuit check if its identical
+ if ( (is.parts.lsw == shouldbe.parts.lsw) &&
+ (is.parts.msw == shouldbe.parts.msw) )
+ return false;
+
+ // now check special cases
+
+ // +0 == -0
+ if ( (is.parts.lsw == 0) && (shouldbe.parts.lsw == 0) &&
+ ((is.parts.msw & 0x7fffffff) == 0) &&
+ ((shouldbe.parts.msw & 0x7fffffff) == 0) )
+ return false;
+
+ // +-infinity == +-infinity
+ if ((is.parts.lsw == 0) && (shouldbe.parts.lsw == 0) &&
+ (is.number.fraction0 == 0) && (shouldbe.number.fraction0 == 0) &&
+ (is.number.exponent == 2047) && (shouldbe.number.exponent == 2047))
+ {
+ return (is.number.sign != shouldbe.number.sign);
+ } // if
+
+ // both NaN. Assumes isnan works, but its pretty safe
+ if ( isnan(is.value) && isnan(shouldbe.value) )
+ return false;
+ else if (isnan(is.value) || isnan(shouldbe.value) )
+ return true;
+
+ // check same sign. Even around small values close to 0 we would want
+ // it to be on the right _side_ of 0
+ if ( is.number.sign != shouldbe.number.sign )
+ return true;
+
+ // okay, now work out what tolerance means for us
+
+ // find out what the difference is in the first place
+ temp_doub.value = my_abs_d( shouldbe.value - is.value );
+
+ // Check "both ways round" to deal with both under and overflow cases
+ if ( ((temp_doub.value / tolerance) < my_abs_d(shouldbe.value)) ||
+ (temp_doub.value < (my_abs_d(shouldbe.value) * tolerance)) )
+ return false;
+ else
+ return true; // so its not close enough
+
+} // checkErrorAcceptable()
+
+
+// This allows us to run through any test vectors of form:
+// double = fn(double, double)
+// double = fn(double)
+// double = fn(double, int)
+// double = fn(double, int *)
+// double = fn(double, double *)
+//
+// result type being non-double is left as a future enhancement
+//
+// This returns true if the tests all succeeded and false if any failed
+//
+static cyg_bool
+doTestVec( CYG_ADDRESS func_ptr,
+ Cyg_libm_test_arg_type arg1_type,
+ Cyg_libm_test_arg_type arg2_type,
+ Cyg_libm_test_arg_type result_type,
+ const Cyg_libm_test_double_vec_t *vectors,
+ cyg_ucount32 num_vectors )
+{
+ cyg_ucount32 problems=0;
+ cyg_ucount32 i;
+ Cyg_libm_ieee_double_shape_type arg1, arg2, result_wanted, ret;
+ cyg_ucount32 alive_count = num_vectors / 10;
+
+ if ((arg1_type != CYG_LIBM_TEST_VEC_DOUBLE) ||
+ (result_type != CYG_LIBM_TEST_VEC_DOUBLE) ) {
+ CYG_TEST_FAIL("Test vector arguments are not correct type!");
+ return false;
+ } // if
+
+ switch (arg2_type) {
+ case CYG_LIBM_TEST_VEC_DOUBLE:
+
+ {
+ ddfn fn = (ddfn) func_ptr;
+
+ for (i=0;
+ (i < num_vectors) && (problems < PROBLEM_THRESHOLD);
+ i++) {
+
+ if (0 == i % alive_count)
+ CYG_TEST_STILL_ALIVE(i, "Still crunching, please wait...");
+
+ arg1.parts.msw = vectors[i].arg1_msw;
+ arg1.parts.lsw = vectors[i].arg1_lsw;
+
+ arg2.parts.msw = vectors[i].arg2_msw;
+ arg2.parts.lsw = vectors[i].arg2_lsw;
+
+ result_wanted.parts.msw = vectors[i].result_msw;
+ result_wanted.parts.lsw = vectors[i].result_lsw;
+
+ ret.value = (*fn)( arg1.value, arg2.value );
+
+ if ((vectors[i].errno_val) != 0) {
+
+#ifndef CYGSEM_LIBM_COMPAT_IEEE_ONLY
+ // In IEEE-mode we can't check the answer if this
+ // is an error case
+
+ if ((cyg_libm_get_compat_mode() !=
+ CYGNUM_LIBM_COMPAT_IEEE) &&
+ (errno != vectors[i].errno_val)) {
+
+ ++problems;
+ diag_printf("Vector #%d\n", i+1);
+ CYG_TEST_FAIL( "error not set correctly");
+
+ } // if
+#endif
+
+ continue; // no point checking value in an error case
+ } // if
+ if (checkErrorAcceptable( ret, result_wanted,
+ vectors[i].tolerance) ) {
+ ++problems;
+ diag_printf("Vector #%d\n", i+1);
+ CYG_TEST_FAIL( "Result out of tolerance");
+ } // if
+ } // for
+
+ } // compound
+
+ break;
+
+ case CYG_LIBM_TEST_VEC_INT:
+
+ {
+ difn fn = (difn) func_ptr;
+
+ for (i=0;
+ (i < num_vectors) && (problems < PROBLEM_THRESHOLD);
+ i++) {
+
+ if (0 == i % alive_count)
+ CYG_TEST_STILL_ALIVE(i, "Still crunching, please wait...");
+
+ arg1.parts.msw = vectors[i].arg1_msw;
+ arg1.parts.lsw = vectors[i].arg1_lsw;
+
+ result_wanted.parts.msw = vectors[i].result_msw;
+ result_wanted.parts.lsw = vectors[i].result_lsw;
+
+ ret.value = (*fn)( arg1.value, vectors[i].arg2_lsw );
+ if (checkErrorAcceptable( ret, result_wanted,
+ vectors[i].tolerance) ) {
+ ++problems;
+ diag_printf("Vector #%d\n", i+1);
+ CYG_TEST_FAIL( "Result out of tolerance");
+ } // if
+ } // for
+
+ } // compound
+
+ break;
+
+ case CYG_LIBM_TEST_VEC_INT_P:
+
+ {
+ dipfn fn = (dipfn) func_ptr;
+ int my_int;
+ Cyg_libm_ieee_double_shape_type my_doub1, my_doub2;
+
+ for (i=0;
+ (i < num_vectors) && (problems < PROBLEM_THRESHOLD);
+ i++) {
+
+ if (0 == i % alive_count)
+ CYG_TEST_STILL_ALIVE(i, "Still crunching, please wait...");
+
+ arg1.parts.msw = vectors[i].arg1_msw;
+ arg1.parts.lsw = vectors[i].arg1_lsw;
+
+
+ result_wanted.parts.msw = vectors[i].result_msw;
+ result_wanted.parts.lsw = vectors[i].result_lsw;
+
+ ret.value = (*fn)( arg1.value, &my_int );
+ if (checkErrorAcceptable( ret, result_wanted,
+ vectors[i].tolerance) ) {
+ ++problems;
+ diag_printf("Vector #%d\n", i+1);
+ CYG_TEST_FAIL( "Result out of tolerance");
+ } // if
+
+ my_doub1.value = (double) my_int;
+ my_doub2.value = (double) (signed)vectors[i].arg2_lsw;
+
+ if (checkErrorAcceptable( my_doub1, my_doub2,
+ vectors[i].tolerance) ) {
+ ++problems;
+ diag_printf("Vector #%d\n", i+1);
+ CYG_TEST_FAIL( "Integer result out of tolerance");
+ } // if
+
+
+ } // for
+
+ } // compound
+
+ break;
+
+ case CYG_LIBM_TEST_VEC_DOUBLE_P:
+
+ {
+ ddpfn fn = (ddpfn) func_ptr;
+ Cyg_libm_ieee_double_shape_type my_doub1;
+
+ for (i=0;
+ (i < num_vectors) && (problems < PROBLEM_THRESHOLD);
+ i++) {
+
+ if (0 == i % alive_count)
+ CYG_TEST_STILL_ALIVE(i, "Still crunching, please wait...");
+
+ arg1.parts.msw = vectors[i].arg1_msw;
+ arg1.parts.lsw = vectors[i].arg1_lsw;
+
+ arg2.parts.msw = vectors[i].arg2_msw;
+ arg2.parts.lsw = vectors[i].arg2_lsw;
+
+
+ result_wanted.parts.msw = vectors[i].result_msw;
+ result_wanted.parts.lsw = vectors[i].result_lsw;
+
+ ret.value = (*fn)( arg1.value, &my_doub1.value );
+ if (checkErrorAcceptable( ret, result_wanted,
+ vectors[i].tolerance) ) {
+ ++problems;
+ diag_printf("Vector #%d\n", i+1);
+ CYG_TEST_FAIL( "Result out of tolerance");
+ } // if
+
+ if (checkErrorAcceptable( my_doub1, arg2,
+ vectors[i].tolerance) ) {
+ ++problems;
+ diag_printf("Vector #%d\n", i+1);
+ CYG_TEST_FAIL( "Returned double result out of "
+ "tolerance");
+ } // if
+
+
+ } // for
+
+ } // compound
+
+ break;
+
+ case CYG_LIBM_TEST_VEC_NONE:
+
+ {
+ dfn fn = (dfn) func_ptr;
+
+ for (i=0;
+ (i < num_vectors) && (problems < PROBLEM_THRESHOLD);
+ i++) {
+
+ if (0 == i % alive_count)
+ CYG_TEST_STILL_ALIVE(i, "Still crunching, please wait...");
+
+ arg1.parts.msw = vectors[i].arg1_msw;
+ arg1.parts.lsw = vectors[i].arg1_lsw;
+
+ result_wanted.parts.msw = vectors[i].result_msw;
+ result_wanted.parts.lsw = vectors[i].result_lsw;
+
+ ret.value = (*fn)( arg1.value );
+ if (checkErrorAcceptable( ret, result_wanted,
+ vectors[i].tolerance) ) {
+ ++problems;
+ diag_printf("Vector #%d\n", i+1);
+ CYG_TEST_FAIL( "Result out of tolerance");
+ } // if
+ } // for
+
+ } // compound
+
+ break;
+
+ default:
+ CYG_TEST_FAIL("Second argument of unknown type!");
+ return false;
+ } // switch
+
+ if (problems != 0)
+ return false;
+ else
+ return true;
+
+} // doTestVec()
+
+#endif // CYGONCE_LIBM_VECTOR_SUPPORT_H multiple inclusion protection
+
+// EOF vector_support.h
diff --git a/cesar/ecos/packages/pkgconf/fixhtml.tcl b/cesar/ecos/packages/pkgconf/fixhtml.tcl
new file mode 100644
index 0000000000..8208be8539
--- /dev/null
+++ b/cesar/ecos/packages/pkgconf/fixhtml.tcl
@@ -0,0 +1,146 @@
+#!/bin/bash
+# restart using a Tcl shell \
+ exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \
+ ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \
+ done ; \
+ echo "fixhtml.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@"
+
+#===============================================================================
+#
+# fixhtml.tcl
+#
+# Patch HTML files generated from DocBook sources.
+#
+#===============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#===============================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Contributors: bartv
+# Date: 2000-03-14
+# Purpose: HTML files generated from DocBook sources using the nwalsh
+# stylesheets have a number of problems. Most importantly,
+# Netscape 4.x does not understand all of the character entities
+# defined by HTML 4.0x
+#
+#####DESCRIPTIONEND####
+#===============================================================================
+#
+
+# Find out the current year for the copyright message. Ideally
+# this would be a range extracted from the sources, but that is
+# a little bit tricky.
+
+set year [clock format [clock seconds] -format "%Y"]
+
+set copyright_banner \
+"<!-- Copyright (C) $year Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/). -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission is obtained from the copyright holder. -->"
+
+set files [glob *.html]
+foreach file $files {
+ set status [catch {
+
+ set fd [open $file "r"]
+ set data [read $fd]
+ close $fd
+
+ # If there is already a (C) message on the first line, skip this file.
+ if {[regexp {[^\n]*Copyright (C) [0-9]* Red Hat.*} $data] == 0} {
+
+ # The DSSSL has the annoying habit of splitting tags over several lines.
+ # This should sort things out.
+ # REMOVED by jifl: doing this can add newlines in tags like
+ # <literallayout>, <screen>, and/or <programlisting>
+ # regsub -all "\n>" $data ">\n" data
+
+ # Add a copyright banner
+ set data "[set copyright_banner]\n[set data]"
+
+ # Look for a smarttags meta. If absent, insert one. There should
+ # already be one meta present identifying the stylesheet, so
+ # that identifies a sensible location for inserting another meta.
+ if {[regexp {MSSmartTagsPreventParsing} $data] == 0} {
+ regsub -nocase {<META} $data "<meta name=\"MSSmartTagsPreventParsing\" content=\"TRUE\">\n<META" data
+ }
+
+ # Take care of some character entities that Netscape does not understand
+ regsub -all "&mgr;" $data "\\&#03BC;" data
+ regsub -all "&mdash;" $data "\\&#8212;" data
+ regsub -all "&ndash;" $data "\\&#8211;" data
+ regsub -all "&hellip;" $data "\\&#8230;" data
+ regsub -all "&ldquo;" $data "\\&#8220;" data
+ regsub -all "&rdquo;" $data "\\&#8221;" data
+ regsub -all "&lsqb;" $data "\\&#0091;" data
+ regsub -all "&rsqb;" $data "\\&#0093;" data
+ regsub -all "&lcub;" $data "\\&#0123;" data
+ regsub -all "&rcub;" $data "\\&#0125;" data
+ regsub -all "&lsquo;" $data "\\&#8216;" data
+ regsub -all "&rsquo;" $data "\\&#8217;" data
+ regsub -all "&trade;" $data "\\&#8482;" data
+ regsub -all "&ast;" $data "\\&#0042;" data
+ regsub -all "&lowbar;" $data "\\&#0095;" data
+ regsub -all "&sol;" $data "\\&#0047;" data
+ regsub -all "&equals;" $data "\\&#0061;" data
+ regsub -all "&num;" $data "\\&#0035;" data
+ regsub -all "&plus;" $data "\\&#0043;" data
+ regsub -all "&percnt;" $data "\\&#0037;" data
+ regsub -all "&dollar;" $data "\\&#0036;" data
+ regsub -all "&boxv;" $data "\\&#9474;" data
+ regsub -all "&bsol;" $data "\\&#0092;" data
+ regsub -all "&block;" $data "\\&#9608;" data
+ regsub -all "&marker;" $data "\\&#9646;" data
+
+ # Now write the data back to the file. Do not bother to
+ # keep an old version lying around, the html files can be
+ # regenerated easily enough.
+ set fd [open $file "w"]
+ puts -nonewline $fd $data
+ close $fd
+ }
+ } result]
+
+ if {0 != $status} {
+ puts "Error while processing file $file\n $result"
+ exit 1
+ }
+}
+
diff --git a/cesar/ecos/packages/pkgconf/rules.doc b/cesar/ecos/packages/pkgconf/rules.doc
new file mode 100644
index 0000000000..69bc04e5f5
--- /dev/null
+++ b/cesar/ecos/packages/pkgconf/rules.doc
@@ -0,0 +1,167 @@
+#=============================================================================
+#
+# rules.doc
+#
+# Additional rules for processing documentation written in DocBook/SGML
+#
+#=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#=============================================================================
+#####DESCRIPTIONBEGIN####
+#
+# Author(s): bartv
+# Date: 2001-01-11
+# Purpose: Rules for processing documentation
+# Description:
+# Each package's doc directory's makefile should define the
+# following variables:
+# TOPLEVEL - of the component repository
+# MAIN_SGML - documentation entry point
+# OTHER_SGML - any other .sgml files accessed from main
+# PICTURES - referenced by the SGML files
+#####DESCRIPTIONEND####
+#=============================================================================
+
+.PHONY: default check html pdf clean copyfiles
+
+# Locations of the stylesheets and other SGML support files. These
+# have moved around in various releases of the tools.
+ifneq (,$(wildcard /usr/share/sgml/docbook))
+ CATALOG := /etc/sgml/catalog
+ ifneq (,$(wildcard /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/catalog))
+ DSSSL_CATALOG := /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/catalog
+ else
+ DSSSL_CATALOG := $(firstword $(wildcard /usr/share/sgml/docbook/dsssl-stylesheets-*/catalog))
+ endif
+else
+ ifneq (,$(wildcard /usr/lib/sgml/stylesheets/nwalsh-modular/catalog))
+ CATALOG := /usr/lib/sgml/CATALOG
+ DSSSL_CATALOG := /usr/lib/sgml/stylesheets/nwalsh-modular/catalog
+ else
+ ifneq (,$(wildcard /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/sgml.catalog))
+ CATALOG := /usr/lib/sgml/catalog
+ DSSSL_CATALOG := /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/sgml.catalog
+ endif
+ endif
+endif
+
+A4_STYLESHEET := $(TOPLEVEL)/pkgconf/ssa4.dsl
+LETTER_STYLESHEET := $(TOPLEVEL)/pkgconf/ssletter.dsl
+HTML_STYLESHEET := $(TOPLEVEL)/pkgconf/stylesheet.dsl
+FIXHTML := $(TOPLEVEL)/pkgconf/fixhtml.tcl
+
+ifneq (,$(CATALOG))
+ CATALOG_OPT := -c $(CATALOG)
+endif
+
+ifneq (,$(DSSL_CATALOG))
+ DSSL_CATALOG_OPT := -c $(DSSL_CATALOG)
+endif
+
+# The files that will be generated:
+ifeq (,$(MAIN_HTML))
+ MAIN_HTML := $(subst .sgml,.html,$(MAIN_SGML))
+endif
+ifeq (,$(MAIN_PDF))
+ MAIN_PDF := $(subst .sgml,.pdf,$(MAIN_SGML))
+endif
+
+MAIN_PDFA4 := $(subst .pdf,-a4.pdf,$(MAIN_PDF))
+MAIN_PDFLETTER := $(subst .pdf,-letter.pdf,$(MAIN_PDF))
+
+# Rules for generating pictures
+GIFS := $(foreach x,$(PICTURES),$(x).gif)
+EPS := $(foreach x,$(PICTURES),$(x).eps)
+PNGS :=$(foreach x,$(PICTURES),$(x).png)
+
+%.gif: %.fig
+ convert -crop 0x0 $< $@
+
+%.png: %.fig
+ fig2dev -L png $< $@
+
+%.eps: %.fig
+ convert -crop 0x0 $< $@
+
+# This is a little grotty. In some cases we want to just copy files from
+# their source location to the destination's current dir and nothing
+# more.
+copyfiles:
+ifneq (,$(COPYFILES))
+ cp $(COPYFILES) .
+endif
+
+default: check
+
+# Validating an sgml document can be achieved with
+check: $(MAIN_SGML) $(OTHER_SGML) $(GIFS) $(EPS)
+ nsgmls -vs $(CATALOG_OPT) $<
+
+# Generating HTML from the SGML. In practice multiple .html files may
+# be generated, but for the purposes of dependency analysis the others
+# can be ignored.
+html: copyfiles $(MAIN_HTML)
+
+$(MAIN_HTML): $(MAIN_SGML) $(OTHER_SGML) $(PNGS) $(HTML_STYLESHEET) $(FIXHTML)
+ jade -t sgml -i html $(DSSSL_CATALOG_OPT) -d $(HTML_STYLESHEET)#html $<
+ tclsh $(FIXHTML)
+
+# PDF files can be generated in a similar fashion.
+pdfa4: copyfiles $(MAIN_PDFA4)
+
+$(MAIN_PDFA4): $(MAIN_SGML) $(OTHER_SGML) $(PNGS) $(A4_STYLESHEET)
+ jade -o $(subst .pdf,.tex,$(MAIN_PDFA4)) -t tex -V tex-backend $(DSSSL_CATALOG_OPT) -d $(A4_STYLESHEET)#print $<
+ pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFA4))
+ pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFA4))
+ pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFA4))
+
+pdfletter: copyfiles $(MAIN_PDFLETTER)
+
+$(MAIN_PDFLETTER): $(MAIN_SGML) $(OTHER_SGML) $(PNGS) $(LETTER_STYLESHEET)
+ jade -o $(subst .pdf,.tex,$(MAIN_PDFLETTER)) -t tex -V tex-backend $(DSSSL_CATALOG_OPT) -d $(LETTER_STYLESHEET)#print $<
+ pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFLETTER))
+ pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFLETTER))
+ pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFLETTER))
+
+#$(MAIN_PDF): $(MAIN_SGML) $(OTHER_SGML) $(EPS) $(ECOS_STYLESHEET)
+# jade -o $(subst .sgml,.tex,$(MAIN_SGML)) -t tex -V tex-backend -d $(ECOS_STYLESHEET)#print $<
+# jadetex $(subst .sgml,.tex,$(MAIN_SGML))
+# jadetex $(subst .sgml,.tex,$(MAIN_SGML))
+# jadetex $(subst .sgml,.tex,$(MAIN_SGML))
+# dvips -o $(subst .sgml,.ps,$(MAIN_SGML)) $(subst .sgml,.dvi,$(MAIN_SGML))
+# ps2pdf $(subst .sgml,.ps,$(MAIN_SGML)) $(subst .sgml,.pdf,$(MAIN_SGML))
+
+# Clean. For now assume that all .html, .gif etc files are generated
+clean:
+ rm -rf *.html *.tex *.dvi *.aux *.log *.out *.ps *.pdf *.gif *.eps *.png
diff --git a/cesar/ecos/packages/pkgconf/rules.mak b/cesar/ecos/packages/pkgconf/rules.mak
new file mode 100644
index 0000000000..e043efa29b
--- /dev/null
+++ b/cesar/ecos/packages/pkgconf/rules.mak
@@ -0,0 +1,210 @@
+#=============================================================================
+#
+# rules.mak
+#
+# Generic rules for inclusion by all package makefiles.
+#
+#=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#=============================================================================
+#####DESCRIPTIONBEGIN####
+#
+# Author(s): jld
+# Contributors: bartv
+# Date: 1999-11-04
+# Purpose: Generic rules for inclusion by all package makefiles
+# Description:
+#
+#####DESCRIPTIONEND####
+#=============================================================================
+
+# FIXME: This definition belongs in the top-level makefile.
+export HOST_CC := gcc
+
+.PHONY: default build clean tests headers mlt_headers
+
+# include any dependency rules generated previously
+ifneq ($(wildcard *.deps),)
+include $(wildcard *.deps)
+endif
+
+# GCC since 2.95 does -finit-priority by default so remove it from old HALs
+CFLAGS := $(subst -finit-priority,,$(CFLAGS))
+
+# -fvtable-gc is known to be broken in all recent GCC.
+CFLAGS := $(subst -fvtable-gc,,$(CFLAGS))
+
+# To support more recent GCC whilst preserving existing behaviour, we need
+# to increase the inlining limit globally from the default 600. Note this
+# will break GCC 2.95 based tools and earlier. You must use "make OLDGCC=1"
+# to avoid this.
+ifneq ($(OLDGCC),1)
+CFLAGS := -finline-limit=7000 $(CFLAGS)
+endif
+
+# Separate C++ flags out from C flags.
+ACTUAL_CFLAGS = $(CFLAGS)
+ACTUAL_CFLAGS := $(subst -fno-rtti,,$(ACTUAL_CFLAGS))
+ACTUAL_CFLAGS := $(subst -frtti,,$(ACTUAL_CFLAGS))
+ACTUAL_CFLAGS := $(subst -Woverloaded-virtual,,$(ACTUAL_CFLAGS))
+ACTUAL_CFLAGS := $(subst -fvtable-gc,,$(ACTUAL_CFLAGS))
+
+ACTUAL_CXXFLAGS = $(subst -Wstrict-prototypes,,$(CFLAGS))
+
+# pattern matching rules to generate a library object from source code
+# object filenames are prefixed to avoid name clashes
+# a single dependency rule is generated (file extension = ".o.d")
+%.o.d : %.c
+ifeq ($(HOST),CYGWIN)
+ @mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
+else
+ @mkdir -p $(dir $@)
+endif
+ $(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(ACTUAL_CFLAGS) -Wp,-MD,$(@:.o.d=.tmp) -o $(dir $@)$(OBJECT_PREFIX)_$(notdir $(@:.o.d=.o)) $<
+ @sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.o.d=.tmp) > $@
+ @rm $(@:.o.d=.tmp)
+
+%.o.d : %.cxx
+ifeq ($(HOST),CYGWIN)
+ @mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
+else
+ @mkdir -p $(dir $@)
+endif
+ $(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(ACTUAL_CXXFLAGS) -Wp,-MD,$(@:.o.d=.tmp) -o $(dir $@)$(OBJECT_PREFIX)_$(notdir $(@:.o.d=.o)) $<
+ @sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.o.d=.tmp) > $@
+ @rm $(@:.o.d=.tmp)
+
+%.o.d : %.cpp
+ifeq ($(HOST),CYGWIN)
+ @mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
+else
+ @mkdir -p $(dir $@)
+endif
+ $(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(ACTUAL_CXXFLAGS) -Wp,-MD,$(@:.o.d=.tmp) -o $(dir $@)$(OBJECT_PREFIX)_$(notdir $(@:.o.d=.o)) $<
+ @sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.o.d=.tmp) > $@
+ @rm $(@:.o.d=.tmp)
+
+%.o.d : %.S
+ifeq ($(HOST),CYGWIN)
+ @mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
+else
+ @mkdir -p $(dir $@)
+endif
+ $(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(ACTUAL_CFLAGS) -Wp,-MD,$(@:.o.d=.tmp) -o $(dir $@)$(OBJECT_PREFIX)_$(notdir $(@:.o.d=.o)) $<
+ @sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.o.d=.tmp) > $@
+ @rm $(@:.o.d=.tmp)
+
+# pattern matching rules to generate a test object from source code
+# object filenames are not prefixed
+# a single dependency rule is generated (file extension = ".d")
+%.d : %.c
+ifeq ($(HOST),CYGWIN)
+ @mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
+else
+ @mkdir -p $(dir $@)
+endif
+ $(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(ACTUAL_CFLAGS) -Wp,-MD,$(@:.d=.tmp) -o $(@:.d=.o) $<
+ @sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.d=.tmp) > $@
+ @rm $(@:.d=.tmp)
+
+%.d : %.cxx
+ifeq ($(HOST),CYGWIN)
+ @mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
+else
+ @mkdir -p $(dir $@)
+endif
+ $(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(ACTUAL_CXXFLAGS) -Wp,-MD,$(@:.d=.tmp) -o $(@:.d=.o) $<
+ @sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.d=.tmp) > $@
+ @rm $(@:.d=.tmp)
+
+%.d : %.cpp
+ifeq ($(HOST),CYGWIN)
+ @mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
+else
+ @mkdir -p $(dir $@)
+endif
+ $(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(ACTUAL_CXXFLAGS) -Wp,-MD,$(@:.d=.tmp) -o $(@:.d=.o) $<
+ @sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.d=.tmp) > $@
+ @rm $(@:.d=.tmp)
+
+%.d : %.S
+ifeq ($(HOST),CYGWIN)
+ @mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
+else
+ @mkdir -p $(dir $@)
+endif
+ $(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(ACTUAL_CFLAGS) -Wp,-MD,$(@:.d=.tmp) -o $(@:.d=.o) $<
+ @sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.d=.tmp) > $@
+ @rm $(@:.d=.tmp)
+
+# rule to generate a test executable from object code
+$(PREFIX)/tests/$(PACKAGE)/%$(EXEEXT): %.d $(wildcard $(PREFIX)/lib/target.ld) $(wildcard $(PREFIX)/lib/*.[ao])
+ifeq ($(HOST),CYGWIN)
+ @mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
+else
+ @mkdir -p $(dir $@)
+endif
+ifneq ($(IGNORE_LINK_ERRORS),)
+ -$(CC) -L$(PREFIX)/lib -Ttarget.ld -o $@ $(<:.d=.o) $(LDFLAGS)
+else
+ $(CC) -L$(PREFIX)/lib -Ttarget.ld -o $@ $(<:.d=.o) $(LDFLAGS)
+endif
+
+# rule to generate all tests and create a dependency file "tests.deps" by
+# concatenating the individual dependency rule files (file extension = ".d")
+# generated during compilation
+tests: tests.stamp
+
+TESTS := $(TESTS:.cpp=)
+TESTS := $(TESTS:.cxx=)
+TESTS := $(TESTS:.c=)
+TESTS := $(TESTS:.S=)
+tests.stamp: $(foreach target,$(TESTS),$(target).d $(PREFIX)/tests/$(PACKAGE)/$(target)$(EXEEXT))
+ifneq ($(strip $(TESTS)),)
+ @cat $(TESTS:%=%.d) > $(@:.stamp=.deps)
+endif
+ @touch $@
+
+# rule to clean the build tree
+clean:
+ @find . -type f -print | grep -v makefile | xargs rm -f
+
+# rule to copy MLT files
+mlt_headers: $(foreach x,$(MLT),$(PREFIX)/include/pkgconf/$(notdir $x))
+
+$(foreach x,$(MLT),$(PREFIX)/include/pkgconf/$(notdir $x)): $(MLT)
+ @cp $(dir $<)/$(notdir $@) $(PREFIX)/include/pkgconf
+ @chmod u+w $(PREFIX)/include/pkgconf/$(notdir $@)
+
+# end of file
diff --git a/cesar/ecos/packages/pkgconf/ssa4.dsl b/cesar/ecos/packages/pkgconf/ssa4.dsl
new file mode 100644
index 0000000000..5812028434
--- /dev/null
+++ b/cesar/ecos/packages/pkgconf/ssa4.dsl
@@ -0,0 +1,110 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- stylesheet.sgml -->
+<!-- -->
+<!-- Customize the nwalsh modular stylesheets. -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####ECOSGPLCOPYRIGHTBEGIN#### -->
+<!-- This file is part of eCos, the Embedded Configurable Operating System. -->
+<!-- Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- -->
+<!-- eCos is free software; you can redistribute it and/or modify it under -->
+<!-- the terms of the GNU General Public License as published by the Free -->
+<!-- Software Foundation; either version 2 or (at your option) any later -->
+<!-- version. -->
+<!-- -->
+<!-- eCos is distributed in the hope that it will be useful, but WITHOUT ANY-->
+<!-- WARRANTY; without even the implied warranty of MERCHANTABILITY or -->
+<!-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -->
+<!-- for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License along-->
+<!-- with eCos; if not, write to the Free Software Foundation, Inc., -->
+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -->
+<!-- -->
+<!-- As a special exception, if other files instantiate templates or use -->
+<!-- macros or inline functions from this file, or you compile this file and-->
+<!-- link it with other works to produce a work based on this file, this -->
+<!-- file does not by itself cause the resulting work to be covered by the -->
+<!-- GNU General Public License. However the source code for this file must -->
+<!-- still be made available in accordance with section (3) of the GNU -->
+<!-- General Public License. -->
+<!-- -->
+<!-- This exception does not invalidate any other reasons why a work based -->
+<!-- on this file might be covered by the GNU General Public License. -->
+<!-- -->
+<!-- Alternative licenses for eCos may be arranged by contacting -->
+<!-- Red Hat, Inc. at http://sources.redhat.com/ecos/ecos-license/ -->
+<!-- ####ECOSGPLCOPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- Author(s): bartv -->
+<!-- Based on cygnus-both.dsl by Mark Galassi -->
+<!-- Contact(s): bartv -->
+<!-- Date: 2000/03/15 -->
+<!-- Version: 0.01 -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % html "IGNORE">
+<![%html;[
+<!ENTITY % print "IGNORE">
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl>
+]]>
+<!ENTITY % print "INCLUDE">
+<![%print;[
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA dsssl>
+]]>
+]>
+
+<style-sheet>
+<style-specification id="print" use="docbook">
+<style-specification-body>
+
+;; ====================
+;; customize the print (PDF) A4 stylesheet
+;; ====================
+
+;; Set the paper parameters as per other eCos documentation
+(define %page-width% 210mm)
+(define %page-height% 297mm)
+(define %left-margin% 0.75in)
+(define %right-margin% 0.75in)
+
+;; Assume that we are only producing books, a reasonable assumption
+;; given the primary author :-)
+(define %two-side% #t)
+
+;; Use 12pt
+;;(define %visual-acuity% "presbyopic")
+
+;; Do not use graphics in admonitions, our documentation is supposed
+;; to look boring :-(
+(define %admon-graphics% #f)
+
+;; Justified text please.
+(define %default-quadding% 'justify)
+
+;; A separate page for each man page please.
+(define %refentry-new-page% #t)
+
+;; The component writer's guide man pages do not describe functions
+(define %refentry-functions% #f)
+
+;; Program listings should use smaller font to fit on page width
+(define %verbatim-size-factor% 0.84)
+
+
+</style-specification-body>
+</style-specification>
+<external-specification id="docbook" document="docbook.dsl">
+</style-sheet>
+
diff --git a/cesar/ecos/packages/pkgconf/ssletter.dsl b/cesar/ecos/packages/pkgconf/ssletter.dsl
new file mode 100644
index 0000000000..b67dff5a49
--- /dev/null
+++ b/cesar/ecos/packages/pkgconf/ssletter.dsl
@@ -0,0 +1,110 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- stylesheet.sgml -->
+<!-- -->
+<!-- Customize the nwalsh modular stylesheets. -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####ECOSGPLCOPYRIGHTBEGIN#### -->
+<!-- This file is part of eCos, the Embedded Configurable Operating System. -->
+<!-- Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- -->
+<!-- eCos is free software; you can redistribute it and/or modify it under -->
+<!-- the terms of the GNU General Public License as published by the Free -->
+<!-- Software Foundation; either version 2 or (at your option) any later -->
+<!-- version. -->
+<!-- -->
+<!-- eCos is distributed in the hope that it will be useful, but WITHOUT ANY-->
+<!-- WARRANTY; without even the implied warranty of MERCHANTABILITY or -->
+<!-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -->
+<!-- for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License along-->
+<!-- with eCos; if not, write to the Free Software Foundation, Inc., -->
+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -->
+<!-- -->
+<!-- As a special exception, if other files instantiate templates or use -->
+<!-- macros or inline functions from this file, or you compile this file and-->
+<!-- link it with other works to produce a work based on this file, this -->
+<!-- file does not by itself cause the resulting work to be covered by the -->
+<!-- GNU General Public License. However the source code for this file must -->
+<!-- still be made available in accordance with section (3) of the GNU -->
+<!-- General Public License. -->
+<!-- -->
+<!-- This exception does not invalidate any other reasons why a work based -->
+<!-- on this file might be covered by the GNU General Public License. -->
+<!-- -->
+<!-- Alternative licenses for eCos may be arranged by contacting -->
+<!-- Red Hat, Inc. at http://sources.redhat.com/ecos/ecos-license/ -->
+<!-- ####ECOSGPLCOPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- Author(s): bartv -->
+<!-- Based on cygnus-both.dsl by Mark Galassi -->
+<!-- Contact(s): bartv -->
+<!-- Date: 2000/03/15 -->
+<!-- Version: 0.01 -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % html "IGNORE">
+<![%html;[
+<!ENTITY % print "IGNORE">
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl>
+]]>
+<!ENTITY % print "INCLUDE">
+<![%print;[
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA dsssl>
+]]>
+]>
+
+<style-sheet>
+<style-specification id="print" use="docbook">
+<style-specification-body>
+
+;; ====================
+;; customize the print (PDF) US letter stylesheet
+;; ====================
+
+;; Set the paper parameters as per other eCos documentation
+(define %page-width% 8.5in)
+(define %page-height% 11in)
+(define %left-margin% 0.75in)
+(define %right-margin% 0.75in)
+
+;; Assume that we are only producing books, a reasonable assumption
+;; given the primary author :-)
+(define %two-side% #t)
+
+;; Use 12pt
+;;(define %visual-acuity% "presbyopic")
+
+;; Do not use graphics in admonitions, our documentation is supposed
+;; to look boring :-(
+(define %admon-graphics% #f)
+
+;; Justified text please.
+(define %default-quadding% 'justify)
+
+;; A separate page for each man page please.
+(define %refentry-new-page% #t)
+
+;; The component writer's guide man pages do not describe functions
+(define %refentry-functions% #f)
+
+;; Program listings should use smaller font to fit on page width
+(define %verbatim-size-factor% 0.87)
+
+
+</style-specification-body>
+</style-specification>
+<external-specification id="docbook" document="docbook.dsl">
+</style-sheet>
+
diff --git a/cesar/ecos/packages/pkgconf/stylesheet.dsl b/cesar/ecos/packages/pkgconf/stylesheet.dsl
new file mode 100644
index 0000000000..97f25d685c
--- /dev/null
+++ b/cesar/ecos/packages/pkgconf/stylesheet.dsl
@@ -0,0 +1,104 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- stylesheet.sgml -->
+<!-- -->
+<!-- Customize the nwalsh modular stylesheets. -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####ECOSGPLCOPYRIGHTBEGIN#### -->
+<!-- This file is part of eCos, the Embedded Configurable Operating System. -->
+<!-- Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- -->
+<!-- eCos is free software; you can redistribute it and/or modify it under -->
+<!-- the terms of the GNU General Public License as published by the Free -->
+<!-- Software Foundation; either version 2 or (at your option) any later -->
+<!-- version. -->
+<!-- -->
+<!-- eCos is distributed in the hope that it will be useful, but WITHOUT ANY-->
+<!-- WARRANTY; without even the implied warranty of MERCHANTABILITY or -->
+<!-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -->
+<!-- for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License along-->
+<!-- with eCos; if not, write to the Free Software Foundation, Inc., -->
+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -->
+<!-- -->
+<!-- As a special exception, if other files instantiate templates or use -->
+<!-- macros or inline functions from this file, or you compile this file and-->
+<!-- link it with other works to produce a work based on this file, this -->
+<!-- file does not by itself cause the resulting work to be covered by the -->
+<!-- GNU General Public License. However the source code for this file must -->
+<!-- still be made available in accordance with section (3) of the GNU -->
+<!-- General Public License. -->
+<!-- -->
+<!-- This exception does not invalidate any other reasons why a work based -->
+<!-- on this file might be covered by the GNU General Public License. -->
+<!-- -->
+<!-- Alternative licenses for eCos may be arranged by contacting -->
+<!-- Red Hat, Inc. at http://sources.redhat.com/ecos/ecos-license/ -->
+<!-- ####ECOSGPLCOPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- Author(s): bartv -->
+<!-- Based on cygnus-both.dsl by Mark Galassi -->
+<!-- Contact(s): bartv -->
+<!-- Date: 2000/03/15 -->
+<!-- Version: 0.01 -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY % html "IGNORE">
+<![%html;[
+<!ENTITY % print "IGNORE">
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl>
+]]>
+<!ENTITY % print "INCLUDE">
+<![%print;[
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA dsssl>
+]]>
+]>
+
+<style-sheet>
+
+<!--
+;; ====================
+;; customize the html stylesheet
+;; ====================
+-->
+<style-specification id="html" use="docbook">
+<style-specification-body>
+
+;; .html files please.
+(define %html-ext% ".html")
+
+;; Boring admonitions
+(define %admon-graphics% #f)
+
+;; No callout pictures, just (1), (2), etc.
+(define %callout-graphics% #f)
+
+;; Nicely decorated program listing (in boxes)
+(define %shade-verbatim% #t)
+(define ($shade-verbatim-attr$)
+ (list
+ (list "BORDER" "5")
+ (list "BGCOLOR" "#E0E0F0")
+ (list "WIDTH" "70%")))
+
+;; Use ID attributes as name for component HTML files?
+(define %use-id-as-filename% #t)
+
+</style-specification-body>
+</style-specification>
+
+<external-specification id="docbook" document="docbook.dsl">
+
+</style-sheet>
+
diff --git a/cesar/ecos/packages/redboot/current/ChangeLog b/cesar/ecos/packages/redboot/current/ChangeLog
new file mode 100644
index 0000000000..1b7eb3dba1
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/ChangeLog
@@ -0,0 +1,3668 @@
+2005-09-03 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * cdl/redboot.cdl: White space changes to aid readability.
+
+2005-09-03 Isaac Claymore <iclaymore@gmail.com>
+
+ * src/flash.c (fis_create): Print an error if the FIS directory is
+ full when we try to create a new entry.
+
+2005-08-17 David Vrabel <dvrabel@arcom.com>
+
+ * cdl/redboot.cdl (CYGNUM_REDBOOT_DEFAULT_NETWORK_DEVICE): Removed
+ since isn't used anywhere.
+ * cdl/redboot.cdl (CYGDAT_REDBOOT_DEFAULT_NETWORK_DEVICE): New option
+ to specify the name of the default network device.
+
+ * src/net/net_io.c: Use CYGDAT_REDBOOT_DEFAULT_NETWORK_DEVICE as
+ the default to the net_device config option.
+
+2005-07-06 Isaac Claymore <iclaymore@gmail.com>
+
+ * src/fconfig.c: (get_config): Verify the length of the script is
+ less than MAX_SCRIPT_LENGTH.
+
+2005-06-29 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * doc/redboot_cmds.sgml:
+ * src/dump.c: Fix the usage for dump and x command.
+
+2005-06-29 Peter Korsgaard <jacmet@sunsite.dk>
+
+ * src/flash.c (find_free): Maintain sort order when splitting
+ chunks.
+
+2005-06-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/net/enet.c (ntohs): Return type is a short.
+
+2005-06-22 Peter Korsgaard <jacmet@sunsite.dk>
+
+ * src/flash.c (fis_list, fis_free, fis_create):
+ * src/iomem.c (do_iopeek): Fixed compiler warnings about formats
+ strings for diag_printf.
+
+2005-06-09 David Vrabel <dvrabel@arcom.com>
+
+ * src/xyzModem.c: Use the Ymodem length field by #define'ing
+ USE_YMODEM_LENGTH.
+ (xyzModem_stream_read): Only discard runs of ^Z's if we're using
+ Xmodem or the Ymodem length field is 0. This allows binary files
+ with runs of ^Z's to be transferred.
+
+2005-06-07 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/flash.c (_flash_info): Fixed a warning about a diag_printf
+ format string.
+
+2005-05-27 David Vrabel <dvrabel@arcom.com>
+
+ * src/main.c (cyg_start): Expand aliases even if
+ CYGSEM_REDBOOT_FLASH_ALIASES is not enabled since there are some
+ hardcoded aliases (e.g., FREEMEMLO).
+
+2005-05-04 David Vrabel <dvrabel@arcom.com>
+
+ * src/alias.c (lookup_alias): The expansion of FREEMEMLO and
+ FREEMEMHI needs a leading '0x' so they're recognized as hex.
+
+2005-04-21 Ian Campbell <icampbell@arcom.com>
+
+ * src/net/net_io.c (net_init): Don't initialize the network if we
+ don't have an IP address.
+
+ * src/net/net_io.c (do_ip_addr): Add a '-b' option to obtain IP
+ address using BOOTP/DHCP.
+
+ * doc/redboot_cmds.sgml: Document the new '-b' option to the
+ 'ip_address' command.
+
+ * src/decompress.c (zcfree): Remove unnecessary variable
+ reinitialisation.
+
+
+2005-04-17 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/alias.c (lookup_alias): Fix compiler warnings about formats
+ * src/cksum.c (do_cksum): Ditto
+ * src/dump.c (do_dump): Ditto
+
+2005-04-07 Peter Korsgaard <jacmet@sunsite.dk>
+
+ * cdl/redboot.cdl, doc/redboot_cmds.sgml, src/gunzip.c: Added
+ gunzip command to uncompress GZIP compressed data.
+
+2005-04-11 Peter Korsgaard <jacmet@sunsite.dk>
+
+ * src/flash.c (find_free): Correctly split chunks in two when
+ not final chunk.
+
+2005-03-07 Alexander Neundorf <alexander.neundorf@jenoptik.com>
+
+ * src/net/arp.c: use correct sizeof(rt->enet_addr) in
+ __arp_lookup()
+
+2005-01-22 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/main.c (cyg_start): Fix compiler warning with
+ HAL_THREAD_INIT_CONTEXT and the worspace end address.
+ * src/fs/disk.c (find_dos_partitions): Removed unused variable.
+
+2005-01-05 David Vrabel <dvrabel@arcom.com>
+
+ * src/fs/fileio.c (do_ls): Remove useless "getcwd" message.
+ * src/net/bootp.c (__bootp_find_local_ip): Only print the
+ "waiting for BOOTP" message when after first retry.
+
+2004-12-01 Andrea Michelotti <amichelotti@atmel.com>
+
+ * main.c :
+ * mfill.c:
+ * mcmp.c : Changes required for use with GCC v4 - cast as lvalue
+ is no longer supported.
+
+2004-11-09 Ian Campbell <icampbell@arcom.com>
+
+ * cdl/redboot.cdl, doc/redboot_cmds.sgml, src/iomem.c: Add support
+ for iopeek and iopoke commands to allow access to the I/O regions.
+
+2004-11-09 David Vrabel <dvrabel@arcom.com>
+
+ * cdl/redboot.cdl (CYGBLD_REDBOOT_MIN_IMAGE_SIZE): Correct the
+ description to match what the option is actually used for.
+
+ * src/flash.c (find_free, fis_free, fis_find_free): Don't ignore
+ an extra CYGBLD_REDBOOT_MIN_IMAGE_SIZE amount from the start.
+ This fixes the case where nothing uses the start of flash.
+
+2004-11-04 Peter Korsgaard <jacmet@sunsite.dk>
+
+ * src/fconfig.c (flash_write_config): Removed compiler warning
+ when building redboot with combined FIS and config.
+
+2004-10-10 Iztok Zupet <iz@elsis.si>
+
+ * cdl/redboot.cdl: added CYGSEM_REDBOOT_DISK_IDE_VMWARE option.
+ * src/fs/ide.c : skip reset IDE commands if running under VMware.
+
+2004-10-08 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * doc/redboot_installing.sgml: Added links to the tools for the
+ Atmel AT91 JTST board.
+
+2004-09-27 Mark Salter <msalter@redhat.com>
+
+ * src/fs/ide.c (ide_presence_detect): New function.
+ * src/fs/disk.c (u32_unaligned): New function to read unaligned words.
+ (find_dos_partitions): Use u32_unaligned instead of memcpy.
+
+2004-9-25 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * doc/redboot_install.sgml: Added installation information for the
+ Atmel AT91 JTST board provided by Andrea Michelotti
+
+2004-9-23 Bob Koninckx <bob.koninckx@o-3s.com>
+
+ * src/net/tc.c: Removed unneccesary call to MS_TICKS_DELAY
+
+2004-09-19 Mark Salter <msalter@redhat.com>
+
+ * cdl/redboot.cdl: Add CYGSEM_REDBOOT_NETWORK_INIT_ONE_DEVICE
+ * src/net/net_io.c (net_init): Initialize only one network
+ device if CYGSEM_REDBOOT_NETWORK_INIT_ONE_DEVICE defined.
+
+2004-09-19 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/load.c (do_load): Removed compiler warning when building
+ reboot without networking.
+
+2004-09-05 Mark Salter <msalter@redhat.com>
+
+ * doc/redboot_installing.sgml: Add mb93091 and mb93093.
+
+2004-09-02 Mark Salter <msalter@redhat.com>
+
+ * doc/redboot_cmds.sgml: Add -x option to exec command.
+
+2004-09-01 Mark Salter <msalter@redhat.com>
+
+ * cdl/redboot.cdl (CYGOPT_REDBOOT_FLASH_BYTEORDER): New option.
+ * include/redboot.h: Define FLASH_{READ,PROGRAM} macros.
+ Define REDBOOT_FLASH_REVERSE_BYTEORDER if appropriate.
+ * src/flash.c: Add support for CYGOPT_REDBOOT_FLASH_BYTEORDER.
+ Use FLASH_{READ,PROGRAM} macros instead of flash driver api.
+ * src/fconfig.c: Ditto.
+
+ * src/main.c (do_version): Update copyright message.
+
+2004-08-31 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/flash.c (fis_init): Avoid potentially unnecessary erase
+ attempt at end of flash.
+
+2004-08-27 Peter Korsgaard <jacmet@sunsite.dk>
+
+ * doc/redboot_cmds.sgml: Fixed a minor typo with fis list
+
+2004-08-17 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * cdl/redboot.cdl:
+ * src/net/net_io.c: added CDL to allow the default server to
+ be configured. Also respect the CYGSEM_REDBOOT_DEFAULT_NO_BOOTP
+ setting.
+
+2004-08-16 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * cdl/redboot.cdl:
+ * src/load.c: Added cdl to control the size of the buffer used
+ by getc. The size can have significant affect on load speed
+ when loading from a filesystem.
+
+2004-08-13 Jani Monoses <jani@iv.ro>
+
+ * src/net/http_client.c: Fix off-by-one error in checking
+ the HTTP response header, so the ending CRLF-CRLF is detected
+ even if it's the last 4 bytes in the buffer.
+
+2004-08-10 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * cdl/redboot.cdl
+ * src/load.c (load_elf_image): Added a CDL option to configure
+ if the physical or virtual address in the headers should be used
+ when loading the image.
+
+2004-08-09 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * cdl/redboot.cdl
+ * src/fs/fileio.c (do_ls) Added an ls command so we can see what
+ is inside the mounted filesystem.
+
+2004-06-25 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/flash.c (find_free): fix endless loop when removing a
+ collapsed chunk from chunk table. Found by Laurent Gonzalez
+ (fis_load): Fixed a compiler warning.
+
+2004-05-31 Jani Monoses <jani@iv.ro>
+
+ * src/main.c:
+ * include/redboot.h: Get rid of unused workspace_size.
+
+2004-05-16 Andrew Dyer <adyer@righthandtech.com>
+2004-05-27 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/fs/ide.c: make sure IDE_STAT_BSY is 0 before checking other
+ bits in the status register
+
+2004-05-21 Ian Campbell <icampbell@arcom.com>
+
+ * src/main.c: Make it build without CYGSEM_REDBOOT_FLASH_ALIASES.
+
+2004-05-05 Gary Thomas <gary@mlbassoc.com>
+
+ * src/flash.c (fis_load): CRC check on load was broken (the CDL
+ option changed names)
+
+2004-04-29 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/redboot_epilogue.sgml: Comment out </part> to reflect change
+ of 2004-04-19.
+
+2004-04-23 Gary Thomas <gary@mlbassoc.com>
+
+ * src/main.c:
+ * src/fs/fileio.c:
+ * src/net/net_io.c:
+ * src/load.c:
+ * src/flash.c:
+ * include/redboot.h: Add asserts to check that option arrays
+ are not overrun (when used with variable number of options).
+
+2004-04-23 Gary Parnes <garyp@logicpd.com>
+
+ * src/net/tftp_client.c: The port, if specified by the user,
+ is now corrected for endianness issues.
+
+2004-04-19 Gary Thomas <gary@mlbassoc.com>
+
+ * src/fs/fileio.c: Can't test for CYGPKG_IO_FLASH_BLOCK_DEVICE without
+ first testing for CYGPKG_IO_FLASH and including it's pkgconf file.
+
+2004-04-19 John Dallaway <jld@ecoscentric.com>
+
+ * doc/makefile, doc/redboot_main.sgml: New files to build the RedBoot
+ User's Guide as a self-contained document.
+
+ * doc/redboot.sgml: Eliminate <part> tag to build the RedBoot User's
+ Guide as a self-contained document.
+
+2004-03-30 Mark Salter <msalter@redhat.com>
+
+ * src/net/udp.c (__udp_recvfrom_handler): Protect against back-to-back
+ duplicate packets.
+
+2004-03-17 Thomas Koeller <thomas.koeller@baslerweb.com>
+
+ * src/fs/fileio.c: Only include IO package headers if required.
+
+2004-03-02 Andrew Dyer <adyer@righthandtech.com>
+
+ * src/load.c: add -p option to help string and only print it and -h if
+ CYGPKG_REDBOOT_NETWORKING is enabled. Add a CR to the end of the
+ SHORT_DATA message string
+
+2004-02-27 Jani Monoses <jani@iv.ro>
+
+ * src/net/http_client.c: Close connection with abort instead of
+ friendly close since for ELF files we don't read the whole content
+ but end the connection when the runnable parts are in. The server
+ interprets close as it has nothing more to receive, but it still wants
+ to send the rest of the file and does that until it times out.
+
+2004-02-26 Jani Monoses <jani@iv.ro>
+
+ * src/load.c:
+ * src/net/http_client.c: Allow overriding the default HTTP port.
+
+2004-02-25 Gratian Crisan <nelu@iv.ro>
+
+ * src/xyzModem.c: Do not read an information header for XModem
+ in xyzModem_stream_open(). XModem does not have a file information
+ header and this caused in the previous implementation a retransmission
+ of the first data block (it was read and ignored in the open function).
+
+2004-02-24 Gary Thomas <gary@mlbassoc.com>
+
+ * cdl/redboot.cdl: net_io needs to be in libextras to enable network
+ support (failed if network debug was disabled)
+
+2004-02-23 Uwe Kindler <uwe_kindler@web.de>
+
+ * src/cksum.c:
+ * src/dump.c:
+ * src/fconfig.c:
+ * src/flash.c:
+ * src/load.c:
+ * src/main.c:
+ * src/mcmp.c:
+ * src/mcopy.c:
+ * src/mfill.c:
+ * src/net/net_io.c:
+ * src/net/ping.c: Minor cleanups to remove warnings.
+
+2004-02-20 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/redboot.sgml: Document lowering security level for TFTP to
+ work on more recent Red Hat Linux.
+
+2004-02-19 Jani Monoses <jani@iv.ro>
+
+ * src/xyzModem.c: Start with sending a 'C', do not wait until the
+ first packet from the sender.This allows download to start quicker.
+
+2004-02-16 Andrew Dyer <adyer@righthandtech.com>
+
+ * src/main.c: add 'go' options to help string
+
+2004-02-11 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/redboot.cdl: Bring CYGNUM_REDBOOT_LOAD_ZLIB_BUFFER under
+ CYGBLD_BUILD_REDBOOT_WITH_ZLIB. Add CYGPRI_REDBOOT_ZLIB_FLASH to
+ control whether decompression can be used with flash images.
+ * src/flash.c: Use CYGPRI_REDBOOT_ZLIB_FLASH instead of
+ CYGPKG_COMPRESS_ZLIB.
+ * src/load.c: Use CYGBLD_BUILD_REDBOOT_WITH_ZLIB in place of
+ CYGPKG_COMPRESS_ZLIB.
+ * src/main.c: only set fis_zlib_common_buffer if
+ CYGPRI_REDBOOT_ZLIB_FLASH.
+
+ * src/main.c (set_comm_baud_rate): Get current rate with GETBAUD
+ not SETBAUD!
+
+2004-02-04 Gary Thomas <gary@mlbassoc.com>
+
+ * cdl/redboot.cdl: Do not build with "common" interrupt stack
+ support. This can cause problems when running programs (via
+ the "go" command) as interrupts will corrupt RedBoot's stack.
+
+2004-01-18 Gary Thomas <gary@mlbassoc.com>
+
+ * src/main.c: Fix build problem if GDB stubs are not included.
+ Minor warning cleanup (cast on NO_MEMORY).
+
+2003-12-21 Gary Thomas <gary@mlbassoc.com>
+
+ * src/net/tcp.c (tcp_send): Add [restore] delay into TCP write
+ path. Sadly, there seems to be some issue where some ACK packets
+ get lost unless this is present (at least on some hardware).
+ n.b. a small delay here is definitely preferable to the horrendous
+ delays imposed by TCP retries if this condition occurs.
+
+ * src/fconfig.c:
+ * include/flash_config.h: New functions for get/set/enumerate
+ config data which can be used via virtual vector interface.
+
+2003-12-12 Jani Monoses <jani@iv.ro>
+
+ * src/net/tcp.c: Cancel retransmission timer when SYN is acked
+ otherwise an open active connection which doesn't send data
+ eventually resends the SYN resulting in reset from the peer.
+
+2003-12-08 Gary Thomas <gary@mlbassoc.com>
+
+ * cdl/redboot.cdl: Better handling of GDB stubs support. This
+ should be automatically included if the platform supports GDB.
+ Disabling CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS (in the common HAL)
+ will fully disable GDB support.
+
+2003-12-05 Gary Thomas <gary@mlbassoc.com>
+
+ * src/decompress.c (gzip_init): Memory pool initialization should
+ only be done in _zlib_init().
+
+2003-12-05 Ian Campbell <icampbell@arcom.com>
+
+ * src/decompress.c: Ensure that free'd blocks are returned to the
+ free pool and that adjacent free blocks are merged. Initialise the
+ pool in _zlib_init() so that things are initialised even when
+ gzip_init hasn't been called.
+
+2003-12-05 Gary Thomas <gary@mlbassoc.com>
+
+ * src/io.c (_rb_gets_preloaded): ^A could have moved the cursor to
+ the wrong location on the screen if ^F/^B had been used.
+
+2003-12-03 David Vrabel <dvrabel@arcom.com>
+
+ * src/time_date.cxx (do_time_date): Use YYYY/MM/DD HH:MM:SS format
+ throughout (instead of the American specific format). Expand
+ range of valid years to 1970 - 2034 (instead of 2000 - 2034).
+
+2003-11-27 David Woodhouse <dwmw2@redhat.com>
+
+ * cdl/redboot.cdl, fs/fileio.c, include/fs/fileio.h, src/load.c:
+ Support for mounting and loading files from fileio file systems
+ such as JFFS2.
+
+2003-11-25 John Dallaway <jld@ecoscentric.com>
+
+ * src/fconfig.c (load_flash_config):
+ Fix typo in output string.
+
+2003-11-24 Gary Thomas <gary@mlbassoc.com>
+
+ * src/net/bootp.c (__bootp_find_local_ip):
+ Suppress diagnostic message that DNS info found.
+
+2002-11-24 Jani Monoses <jani@iv.ro>
+
+ * src/flash.c: Remove references to FLASH_MIN_WORKSPACE.
+
+2003-11-21 David Vrabel <dvrabel@arcom.com>
+
+ * src/net/bootp.c (bootp_handler): Scan for DHCP Message Type tag
+ as it isn't always the first tag.
+
+ * include/net/bootp.h: New #define's for DHCP message types
+ (DHCP_MESSAGE_TYPE_DISCOVER etc.).
+
+2002-11-20 Jani Monoses <jani@iv.ro>
+
+ * src/flash.c: flash_init() no longer takes three args.
+
+2003-11-19 David Woodhouse <dwmw2@redhat.com>
+
+ * src/main.c: Restore correct old baud rate if changing fails.
+
+2003-11-13 Gary Thomas <gary@mlbassoc.com>
+
+ * src/main.c (do_go): Need to stop catching exceptions when running a
+ user program, otherwise GDB will never run when the program fails, gets
+ a ^C interrupt, etc. Also, clean up [remove] some cache debug code.
+
+2003-11-12 Gary Thomas <gary@mlbassoc.com>
+
+ * misc/redboot_XXX.ecm: Removed - since it was only a source of confusion.
+
+2003-11-07 Gary Thomas <gary@mlbassoc.com>
+
+ * src/net/dns.c:
+ * src/net/bootp.c:
+ * include/net/net.h: Use DNS server address from DHCP if provided.
+ Inspired by John Newlin <jnewlin@rawbw.com>
+
+ * src/flash.c (fis_init): Take out misleading warning - since the
+ new [default] behaviour of "fis free" means free space need not
+ be necessarily erased on the device.
+
+2003-11-04 Gary Thomas <gary@mlbassoc.com>
+
+ * src/flash.c (find_free): Better handling of end address - otherwise
+ list of free blocks could be incorrect. Thanks to Chris Garry.
+
+2003-11-01 Gary Thomas <gary@mlbassoc.com>
+
+ * cdl/redboot.cdl: Reorg to allow disk operations on other than
+ IDE drives.
+
+2003-10-23 Gary Thomas <gary@mlbassoc.com>
+
+ * src/main.c (cyg_start): Try to catch illegal memory accesses and
+ other abort conditions during command execution.
+
+2003-10-17 Gary Thomas <gary@mlbassoc.com>
+
+ * src/load.c: Only examine loadable segments when scanning to determine
+ lowest loadable address (only used when -b XXX option used). Otherwise,
+ an offset into space could be chosen.
+
+2003-10-16 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/redboot_installing.sgml: Fix eb40 flash install instructions.
+
+2003-10-15 Gary Thomas <gary@mlbassoc.com>
+
+ * src/flash.c:
+ * src/fconfig.c: Better handling of layout of fconfig and fis
+ data within the FLASH. Should work for even flash devices with
+ very smal block sizes.
+
+ * include/redboot.h (RedBoot_INIT_SECOND):
+ Finer initialization control.
+
+ * cdl/redboot.cdl: Combine FIS directory and FCONFIG database
+ by default. This results in better FLASH utilization. Also define
+ number of FIS directory slots. This will allow support for FLASH
+ devices with very small block sizes.
+
+2003-10-12 Gary Thomas <gary@mlbassoc.com>
+
+ * src/flash.c (fis_create): Verify that any hard FLASH addresses
+ (given via -f XXX) are known to be free.
+
+2003-10-11 Gary Thomas <gary@mlbassoc.com>
+
+ * src/flash.c:
+ * cdl/redboot.cdl: Change 'fis free' to use the directory structure
+ to determine what space is free in the FLASH. This is controlled
+ by the CDL option CYGDAT_REDBOOT_FIS_MAX_FREE_CHUNKS so the old
+ behaviour can still be defined if desired.
+
+2003-10-09 Gary Thomas <gary@mlbassoc.com>
+
+ * src/flash.c (fis_create): Check whole length of image, not just
+ effective size, when validating addresses.
+
+ * src/net/net_io.c (net_init):
+ * include/net/net.h: Rework handling of multiple network devices. All
+ devices will now be initialized, with either the first or the default
+ device actually used for I/O.
+
+2003-10-06 Gary Thomas <gary@mlbassoc.com>
+
+ * src/net/net_io.c:
+ * src/net/bootp.c: Fix some compile problems if GATEWAY support is disabled.
+
+ * src/flash.c (fis_list): Display FIS directory entries in FLASH
+ address (sorted) order.
+
+2003-10-03 Gary Thomas <gary@mlbassoc.com>
+
+ * src/flash.c (fis_delete): 'fconfig' data only shows up in FIS if
+ the data is stored in FLASH - account for this. Also, make sure
+ FLASH gets initialized if built without 'fconfig' enabled.
+
+2003-10-02 Gary Thomas <gary@mlbassoc.com>
+
+ * src/fconfig.c:
+ * cdl/redboot.cdl: Allow platforms to provide a function to validate
+ ethernet station addresses.
+
+2003-09-30 Gary Thomas <gary@mlbassoc.com>
+
+ * src/fconfig.c (do_flash_config): Fix typo in error message.
+
+2003-09-30 David Vrabel <dvrabel@arcom.com>
+
+ * src/net/tcp.c: Include missing <cyg/infra/diag.h>.
+
+ * include/redboot.h, src/parse.c (init_opts, scan_opts): Remove
+ the excessive level of indirection in the handling of option
+ arguments.
+
+2003-09-29 Gary Thomas <gary@mlbassoc.com>
+
+ * src/load.c (load_elf_image): Use LMA (loader memory address), instead
+ of VMA (virtual memory address) to load code. If LMA != VMA, it's up
+ to the loaded program to figure it out.
+ Inspired by Artur Lipowski <LAL@pro.onet.pl>
+
+2003-09-26 Nick Garnett <nickg@balti.calivar.com>
+
+ * doc/redboot_installing.sgml: Fixed bogus memory sizes in AT91
+ EB42/55 description.
+
+2003-09-26 Gary Thomas <gary@mlbassoc.com>
+
+ * src/flash.c (fis_free, fis_find_free):
+ Fix some problems introduced with the new FLASH interfaces (used by
+ NAND devices)
+
+ * src/fconfig.c: Honor FLASH/FIS configury.
+
+ * src/net/bootp.c:
+ * src/fs/ide.c: Clean up some compiler warnings.
+
+2003-09-25 Gary Thomas <gary@mlbassoc.com>
+
+ * src/net/bootp.c: Rework DHCP process to handle really stubborn
+ servers.
+
+2003-09-24 Gary Thomas <gary@mlbassoc.com>
+
+ * src/net/bootp.c (__bootp_find_local_ip): Forgot to unregister
+ UDP handler - could cause serious problems later! Also, fix
+ problem with retries after DHCP discovery phase.
+
+2003-09-23 Gary Thomas <gary@mlbassoc.com>
+
+ * src/net/bootp.c (__bootp_find_local_ip): Handle retries on DHCP
+ requests better.
+
+2003-09-22 Gary Thomas <gary@mlbassoc.com>
+
+ * cdl/redboot.cdl: Fix compile error for systems with no FLASH.
+
+2003-09-21 Gary Thomas <gary@mlbassoc.com>
+
+ * cdl/redboot.cdl: Make DNS truly optional (remove from template).
+ BUG #57316
+
+2003-09-20 Gary Thomas <gary@mlbassoc.com>
+
+ * src/fs/ide.c: Improve IDE handling by having init function return
+ actual number of controllers detected. This avoids really long times
+ for startup if the controller is missing.
+
+ * src/net/bootp.c: Rework to use full DHCP protocol. Previously,
+ once an offer came in, RedBoot was happy, without actually making
+ the address reservation and waiting for the final acknowledgement.
+ Also, added CDL to enable/disable DHCP. BUG #1000053
+
+2003-09-20 Chris Garry <cgarry@sweeneydesign.co.uk>
+
+ * src/main.c: Modified the way multiple "RAM" segments are reported.
+
+ * src/fconfig.c: Variables 'stat' and '*err_addr' in function
+ flash_write_config() are now defined regardless of whether
+ CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG is defined of not.
+
+2003-09-19 Gary Thomas <gary@mlbassoc.com>
+
+ * src/net/timers.c (__timer_poll): Need to call MS_TICKS_DELAY() or
+ else time will never progress. This can cause a missed TCP packet
+ to cause the stack to freeze. BUG #23006
+
+ * src/net/tftp_client.c: Make timeout on very first transaction really
+ long - again since some servers are just slow/ill mannered.
+
+ * src/net/net_io.c: Allow default server IP to be always enabled, thus
+ it can override what is provided by BOOTP/DHCP (since some DHCP servers
+ don't provide this properly).
+
+ * src/time_date.cxx: New file - support "date" command for platforms
+ with battery backed up clocks.
+
+ * src/fconfig.c: New file - split out from flash.c
+
+ * src/main.c:
+ * src/load.c:
+ * src/flash.c:
+ * src/alias.c:
+ * include/redboot.h:
+ * cdl/redboot.cdl: Support multiple "RAM" segments (known writable
+ memory). Also rearrange FLASH & FCONFIG, separating them as much
+ as possible and supporting FCONFIG data stored in some other sort
+ of device, like EEPROM.
+
+2003-09-09 Gary Thomas <gary@mlbassoc.com>
+
+ * src/flash.c (flash_config_insert_value): Default value was
+ wrong for ESA type.
+
+2003-09-08 David Vrabel <dvrabel@arcom.com>
+
+ * src/net/bootp.c (__bootp_find_local_ip): Adds Option 55 Parameter
+ Request List) to the DHCP request (requests: Subnet Mask; Router;
+ Domain Name server).
+
+2003-08-19 Gary Thomas <gary@mlbassoc.com>
+
+ * src/net/udp.c (__udp_recvfrom): Rework loop so delay only happens
+ if no packet is immediately available - improves network throughput.
+
+ * src/ticks.c:
+ * cdl/redboot.cdl: Add control over granularity of timers used
+ by RedBoot and the network stack.
+
+2003-08-05 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/redboot_installing.sgml: Fix brain fart in last change to
+ AT91 instructions. Also clarify instructions a bit, including
+ documenting better for windows users.
+
+2003-07-23 Patrick Doyle <wpd@dtccom.com>
+
+ * src/flash.c (fis_find_free)
+ * src/flash.c (fis_free): Do not search areas reserved for RedBoot
+ when scanning for free space.
+
+2003-07-16 Gary Thomas <gary@mlbassoc.com>
+
+ * src/net/ping.c:
+ * src/net/bootp.c: Allow ^C to abort.
+
+ * src/io.c:
+ * include/redboot.h: New function _rb_break() used to test for ^C
+ on the console. Used to break out of long operations like BOOTP.
+
+2003-07-15 Gary Thomas <gary@mlbassoc.com>
+
+ * src/net/bootp.c: Use correct options for DHCP discover. This has
+ the added bonus that when BOOTP & GATEWAY options are enabled, then
+ RedBoot can get it's address via normal DHCP. Of course, DHCP leases
+ will be ignored by RedBoot, so some caution is warranted.
+
+ * include/net/net.h:
+ * src/net/arp.c (__arp_request): Allow ARP of self - used during
+ initialization to "broadcast" that an IP address is in use.
+
+ * src/net/net_io.c (net_init): When using a static IP, send an
+ initial ARP to see if any other node is using this address.
+ Also, some minor cosmetic cleanups to remove warnings.
+
+2003-07-15 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/redboot_installing.sgml (AT91): Tell users to switch JP1
+ (or SW1 for EB40) when installing, and warn them in no
+ uncertain terms the consequences of failing to do so.
+
+2003-07-01 Mark Salter <msalter@redhat.com>
+
+ * cdl/redboot.cdl (CYGBLD_BUILD_REDBOOT_WITH_MCOPY): New option.
+ * src/mcopy.c: New file adding mcopy command.
+ * doc/redboot_cmds.sgml: Add mcopy.
+
+2003-06-26 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/redboot_installing.sgml: Clarify use of correct cables with
+ serial ports with AT91 boards.
+
+2003-06-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/redboot_cmds.sgml (IP): Clarify last change a bit and fix typos
+ and markup.
+
+2003-05-20 David Vrabel <dvrabel@arcom.com>
+2003-05-20 Ian Campbell <icampbell@arcom.com>
+
+ * src/net/net_io.c: Add the ability to specify a netmask length to
+ the ip_address command
+ * doc/redboot_cmds.sgml: Document the above.
+
+2003-06-24 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
+2003-06-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/net/tftp_client.c: Define tftp_stream.last_good_block to
+ permit downloads > 32MB.
+ (tftp_ack): Allow last_good_block to wrap.
+ (tftp_stream_read): Ditto.
+
+ * src/net/bootp.c: Use correct DHCP message type for DHCPREQUEST.
+
+2003-05-20 Mark Salter <msalter@redhat.com>
+
+ * cdl/redboot.cdl (CYGBLD_REDBOOT_CMD_LINE_HISTORY): New option.
+ * src/io.c: Support history command and history expansion.
+ * doc/redboot.sgml: Document command history support.
+
+2003-05-14 Mark Salter <msalter@redhat.com>
+
+ * src/flash.c (flash_get_config): Add CONFIG_NETPORT case.
+
+2003-05-13 Nick Garnett <nickg@balti.calivar.com>
+
+ * doc/redboot_installing.sgml: Added installation instructions for
+ Atmel EB40A, EB42 and EB55 boards.
+
+2003-05-06 Mark Salter <msalter@redhat.com>
+
+ * src/main.c (cyg_start): Clear gdb_active when returning from stub.
+
+2003-05-06 Pierre Habraken <Pierre.Habraken@imag.fr>
+
+ * cdl/redboot.cdl: Added option
+ CYGOPT_REDBOOT_BSP_SYSCALLS_EXIT_WITHOUT_TRAP for enabling (possibly
+ single shot) programs to exit and return a termination status as
+ their normal behavior (i.e. without raising a SIGTRAP).
+ * src/syscall.c (__do_syscall): Added conditionally compiled code
+ to SYS_exit for returning to RedBoot main loop without raising a
+ SIGTRAP, even when the calling program is not being debugged.
+ * src/main.c (cyg_start): Added code (following Jonathan Larmour's
+ and Mark Salter's suggestions) to RedBoot main loop: a (context)
+ savepoint is created before the thread of control is transferred to
+ gdb stubs (through a trampoline procedure). This savepoint enables
+ the stubs to return control back to the main loop by calling the
+ return_to_redboot procedure (macro CYGACC_CALL_IF_MONITOR_RETURN).
+ Procedure go_trampoline and variables go_saved_context and
+ go_return_status have been respectively renamed to trampoline,
+ saved_context and return_status.
+
+2003-04-23 Chris Garry <cgarry@sweeneydesign.co.uk>
+
+ * src/flash.c: Only perform RAM check in fis load command when
+ CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS = 1
+
+2003-04-18 Gary Thomas <gary@mlbassoc.com>
+
+ * src/net/tftp_client.c: Arrange to ACK last good packet when closing.
+ Without this, the host can be left tryint to send that packet forever.
+
+2003-04-14 Jani Monoses <jani@iv.ro>
+
+ * src/load.c:
+ Change #else if to #elif so it compiles when TFTP is disabled.
+
+2003-04-08 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/main.c (do_go): Silence unused variable warning when no net.
+
+2003-04-04 Mark Salter <msalter@redhat.com>
+
+ * src/main.c (do_go): Add -n switch to optionally stop network
+ device. Mask interrupts on all comm channels.
+ Don't scan for -n unless ethernet configured in.
+ * doc/redboot_cmds.sgml: Update go command info.
+
+2003-04-03 Gary Thomas <gary@mlbassoc.com>
+
+ * src/load.c: Better handling of default download mode. Also
+ display information when I/O errors occor (was silent).
+ (do_load): Handle case when X-modem protocol is disabled.
+
+ * src/net/http_client.c:
+ * include/net/http.h: Improve parsing of HTTP responses for errors.
+
+2003-03-28 Gary Thomas <gary@mlbassoc.com> inspired by
+2003-03-28 Jani Monoses <jani@iv.ro>
+
+ * src/load.c:
+ * cdl/redboot.cdl: Make TFTP download protocol optional.
+
+2003-03-20 Mark Salter <msalter@redhat.com>
+
+ * include/flash_config.h (CONFIG_NETPORT): New config option.
+ * src/flash.c: Support CONFIG_NETPORT.
+ * cdl/redboot.cdl: New option to select default ethernet device.
+ * src/net/net_io.c: Support multiple ethernet devices.
+ * include/net/net.h: Add externs for net_devname and net_devindex.
+
+2002-03-19 John Dallaway <jld@ecoscentric.com>
+
+ * doc/redboot_installing.sgml: Update Atmel AT91EB40 RedBoot
+ installation instructions.
+
+2003-03-18 Mark Salter <msalter@redhat.com>
+
+ * doc/redboot_installing.sgml: Add XScale IXDP425 and GRG.
+
+2003-03-05 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/main.c (do_version): Test for CYGPKG_REDBOOT_FLASH as
+ CYGPKG_IO_FLASH can be loaded with no underlying hardware drivers!
+
+2003-03-03 Gary Thomas <gary@mlbassoc.com>
+
+ * src/main.c (set_console_baud_rate): Avoid "unused" warning.
+
+2003-03-03 Knud Woehler <knud.woehler@microplex.de>
+
+ * src/flash.c: fis_work_block was not initialized in do_flash_init()
+ thus fis_lookup() does not work if called via the virtual vector table.
+
+2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/redboot.sgml: De-vendorise a little.
+ Fix extraneous <para>.
+
+ * cdl/redboot.cdl: Add doc links.
+
+2003-02-14 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * cdl/redboot.cdl: Put virtually all options inside
+ CYGBLD_BUILD_REDBOOT. And indent accordingly.
+
+2003-02-04 Gary Thomas <gary@mind.be>
+
+ * src/fs/ide.c: Print more info if failed to identify IDE device.
+
+ * src/fs/e2fs.c: Improved debug output.
+
+2003-02-04 Mark Salter <msalter@redhat.com>
+2003-02-04 Brian Murphy <brian@murphy.dk>
+
+ * src/main.c (return_to_redboot): Add CYGARC_HAL_RESTORE_GP.
+
+2003-01-31 Mark Salter <msalter@redhat.com>
+
+ * src/main.c: Add support to allow programs started by go to
+ return to RedBoot.
+
+ * src/syscall.c (__do_syscall): Return to monitor on program exit
+ if gdb not active.
+ (sys_timer_isr): Return CYG_ISR_HANDLED.
+
+2003-01-10 Patrick Doyle <wpd@delcomsys.com>
+
+ * src/load.c (do_load): Don't abort and complain about overwriting
+ the end of RAM when loading raw data files and we already asked
+ the user if it was ok to write outside what we believe to be RAM.
+
+2002-12-31 Patrick Doyle <wpd@delcomsys.com>
+
+ * src/decompress.c (gzip_close): Don't complain that decompression
+ didn't complete when the stream reaches its end.
+
+2002-12-18 David Mazur <david@mind.be>
+2002-12-18 Mark Salter <msalter@redhat.com>
+
+ * src/fs/e2fs.c (e2fs_get_gdesc): Fixed handling of group descriptor
+ cache misses.
+
+2002-12-03 Gary Thomas <gthomas@ecoscentric.com>
+
+ * src/main.c: Export version string via virtual vector table.
+
+2002-11-05 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/io.c (_rb_gets_preloaded): Null terminate when buffer full.
+
+2002-10-24 Gary Thomas <gthomas@ecoscentric.com> (inspired by)
+2002-10-24 Jay Foster <jay@systech.com>
+
+ * include/net/bootp.h (BP_MIN_VEND_SIZE):
+ * src/net/bootp.c (__bootp_find_local_ip): Require a minimum vendor
+ area to always be sent (to keep some servers happy).
+
+ * src/flash.c: Fix typo for "FIS DELETE"
+
+2002-09-16 Mark Salter <msalter@redhat.com>
+
+ * src/main.c (set_console_baud_rate): Handle CYGPKG_REDBOOT_ANY_CONSOLE.
+ (set_comm_baud_rate): New function.
+
+2002-09-13 Mark Salter <msalter@redhat.com>
+
+ * src/decompress.c: Move error handling back into gzip_close to
+ fix xyzmodem loads.
+
+2002-09-12 Mark Salter <msalter@redhat.com>
+
+ * src/decompress.c (gzip_inflate): Fix error return so that upper
+ doesn't quit on Z_STREAM_END.
+ (gzip_close): Move error handling into gzip_inflate.
+
+ * src/load.c (do_load): Fix printing of address range for raw loads.
+
+2002-09-11 Mark Salter <msalter@redhat.com>
+
+ * src/main.c (do_go): Turn on line flushes before jumping to function.
+ * src/net/net_io.c (net_io_control): Support flushes at end of lines.
+
+2002-09-03 Yoshinori Sato <qzb04471@nifty.ne.jp>
+2002-09-03 Mark Salter <msalter@redhat.com>
+
+ * include/fs/disk.h (__SWAB32): Fix incorrect masking.
+ * src/fs/e2fs.c (e2fs_inode_block): Fix endianess of block numbers.
+
+2002-08-29 Mark Salter <msalter@redhat.com>
+
+ * src/net/net_io.c (net_init): Initialize dns before showing addresses.
+
+2002-08-26 Thomas Koeller <thomas@koeller.dyndns.org>
+
+ * src/flash.c: Do not warn about overwriting image data if
+ -n option is used with 'fis create'. For 'fis load',
+ perform load size check based on actual data length, not
+ image size.
+
+2002-08-22 Mark Salter <msalter@redhat.com>
+
+ * src/net/net_io.c (net_io_putc): Don't flush on every \n.
+ * src/syscall.c (__do_syscall): Allow fileio support to fall back
+ to non-fileio behavior if program is not being run by gdb.
+
+2002-08-20 Thomas Koeller <thomas@koeller.dyndns.org>
+
+ * cdl/redboot.cdl:
+ * include/redboot.h:
+ * src/main.c:
+ * src/flash.c:
+ * src/decompress.c: Use a common buffer for FIS directory
+ manipulation and zlib workspace to conserve RAM.
+
+2002-08-20 Thomas Koeller <thomas@koeller.dyndns.org>
+
+ * cdl/redboot.cdl:
+ * include/fis.h: Allow control of FIS descriptor padding.
+
+2002-08-16 Jani Monoses <jani@iv.ro>
+
+ * src/io.c: Do not add empty lines to command history.
+ * src/net/http_client.c: Read all data when in CLOSE_WAIT
+ otherwise if the server closes quickly enough nothing is
+ received.
+
+2002-08-09 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/crc.c: Removed. Replaced with the CRC package.
+ * src/cksum.c: Removed the posix_crc function.
+ * src/flash.c: Use the crc package crc functions.
+ * src/xyzModem.c: Ditto
+ * include/redboot.h: Use the crc package include file.
+ * cdl/redboot.cdl: removed crc.c
+
+2002-08-09 Jani Monoses <jani@iv.ro>
+
+ * src/net/http_client.c: use standard HTTP GET request ('/'
+ instead of ' ' in HTTP/1.0) to work with all servers
+
+2002-08-08 Jani Monoses <jani@iv.ro>
+
+ * src/flash.c: fis delete should mark the slot as reusable
+ not just delete the area of flash used by the file.
+
+2002-08-08 Gary Thomas <gthomas@ecoscentric.com>
+2002-08-08 Motoya Kurotsu <kurotsu@allied-telesis.co.jp>
+
+ * src/load.c (do_load): Make sure 'io_tab' is set before using it.
+
+2002-08-07 Gary Thomas <gary@chez-thomas.org>
+
+ * src/net/tftp_client.c:
+ * include/net/tftp.h: Make block numbers unsigned to handle files
+ larger than 16MB.
+
+2002-08-06 Gary Thomas <gary@chez-thomas.org>
+
+ * src/crc.c: POSIX crc code is now separate.
+
+ * src/mfill.c:
+ * src/mcmp.c:
+ * src/dump.c:
+ * src/cksum.c:
+ * src/caches.c: New (split out) file(s).
+
+ * src/main.c:
+ * cdl/redboot.cdl: Split major CLI functionality to separate
+ files, more easily controlled by CDL - inspired by Andrew.
+
+2002-08-06 Andrew Lunn <Andrew.Lunn@ascom.ch>
+
+ * src/io.c: Fix the parsing of boot scripts to allow the use
+ of aliases. This was broken when the ability to do startup
+ type specific scripting was added.
+
+2002-08-05 Andrew Lunn <Andrew.Lunn@ascom.ch>
+
+ * src/main.c: Made more of the commands conditionally compilable
+ * cdl/redboot.cdl: CDL code to control the compilation.
+
+2002-07-30 Gary Thomas <gary@chez-thomas.org>
+
+ * src/net/net_io.c: Handle broadcast/mask setup better (failed if
+ not found in FLASH). Also print on network info line.
+
+2002-07-18 Gary Thomas <gary@chez-thomas.org>
+
+ * src/net/tftp_client.c:
+ * src/net/http_client.c:
+ * src/fs/disk.c:
+ * src/xyzModem.c:
+ * src/load.c:
+ * include/redboot.h: Rework load/mode information tables so that
+ load I/O methods can detect actual mode (e.g. X-modem vs Y-modem)
+
+2002-07-16 Hendrik Ruijter <Hendrik.Ruijter@axis.com>
+2002-07-16 Mark Salter <msalter@redhat.com>
+
+ * include/net/net.h: Add __tcp_abort prototype.
+
+ * src/net/icmp.c: The default handler can be replaced by a
+ user defined handler which handles all ICMP segments.
+
+ * src/net/ping.c
+ (handle_icmp): Only ICMP Echo Reply segments must be counted and
+ ICMP Echo Requests are handled in the user defined handler.
+
+ * src/net/tcp.c
+ (do_abort, __tcp_abort): Send an RST flag in order to abort a
+ connection. May use a delay to send the flag.
+
+2002-07-15 Mark Salter <msalter@redhat.com>
+
+ * src/net/net_io.c: Increase size of out_buf to 1024 bytes.
+
+2002-07-11 Gary Thomas <gary@chez-thomas.org>
+
+ * src/io.c (mon_read_char_with_timeout): Ensure interrupts are
+ disabled on all I/O channels, except for the current console.
+ This is done when selecting a console, as this process causes
+ the interrupt state to be inherited from the current console.
+
+2002-07-09 Gary Thomas <gary@chez-thomas.org>
+2002-07-09 Grant Edwards <grante@visi.com>
+
+ * src/net/udp.c:
+ * src/net/net_io.c:
+ * src/net/ip.c:
+ * src/net/bootp.c:
+ * src/net/arp.c:
+ * include/net/net.h:
+ * include/net/bootp.h:
+ * cdl/redboot.cdl: Add basic support for non-local networking
+ using a single gateway. Based on contribution from Grant Edwards.
+
+2002-07-01 Gary Thomas <gary@chez-thomas.org>
+
+ * src/net/tftp_client.c:
+ * src/net/http_client.c:
+ * src/fs/disk.c:
+ * src/xyzModem.h:
+ * src/xyzModem.c:
+ * src/load.c:
+ * include/net/tftp_support.h:
+ * include/net/http.h:
+ * include/redboot.h:
+ * cdl/redboot.cdl: Make 'load' command stream I/O table driven.
+
+2002-05-31 Jesper Skov <jskov@redhat.com>
+
+ * doc/redboot_installing.sgml: Updated the remaining installation
+ instructions (well, the top mode details anyway).
+
+2002-05-29 Jesper Skov <jskov@redhat.com>
+
+ * doc/redboot_cmds.sgml: Changed format of fis commands.
+
+ * doc/redboot_installing.sgml: Updated installation instructions
+ for all targets up to PowerPC.
+
+2002-05-28 Gary Thomas <gthomas@redhat.com>
+
+ * src/load.c (load_elf_image): Improve loading of ELF files with
+ multiple physical segments.
+
+2002-05-27 Jesper Skov <jskov@redhat.com>
+
+ * doc/redboot_rebuilding.sgml: Added some guimenu tags.
+
+ * doc/redboot_installing.sgml: Updating more board instructions.
+ More updates. Changing most programlisting keywords to screen.
+ Converted remaining rebuild instructions. More mode descriptions
+ updated. iPAQ converted as well.
+
+2002-05-24 Gary Thomas <gthomas@redhat.com>
+
+ * src/load.c (load_elf_image): Improve loading where ELF image
+ actually overlaps headers [old COFF style files].
+
+2002-05-24 Jesper Skov <jskov@redhat.com>
+
+ * doc/redboot_installing.sgml: Updated another 3 boards'
+ instructions.
+
+ * doc/redboot.sgml: Changes due to comments from Jifl.
+ * doc/redboot_rebuilding.sgml: Same.
+
+ * doc/redboot.sgml: Fix wording.
+
+ * doc/redboot_installing.sgml: Reordered the platform sections
+ according to CPU architecture/variant and board manufacturer.
+
+2002-05-23 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/net/dns.c (store_hent): New function. DNS package now requires
+ this instead of the cyg_thread_get_data calls.
+ (free_stored_hent): New function. Ditto.
+
+2002-05-23 Gary Thomas <gthomas@redhat.com>
+
+ * doc/redboot_cmds.sgml: Document new HTTP download mode.
+
+ * src/net/tcp.c: Improve some interfaces. Add support for
+ outgoing (__tcp_open) connections.
+
+ * src/net/net_io.c (net_io_flush): Use improved TCP interfaces.
+
+ * src/main.c (_mon_write_char): Map '\n' => '\r\n'. This used
+ to be done by diag_printf(), but that was the wrong place for it.
+
+ * include/net/net.h: Add support for TCP outgoing connections.
+
+ * src/net/http_client.c:
+ * include/net/http.h: New file(s) - HTTP client support.
+
+ * src/load.c:
+ * cdl/redboot.cdl: Support HTTP download mode.
+
+2002-05-23 Jesper Skov <jskov@redhat.com>
+
+ * doc/redboot.sgml: Moved the editing and resource sections to
+ this document. Added new section on RedBoot (startup) modes.
+ * doc/redboot_cmds.sgml: Removed the editing and resource
+ sections.
+ * doc/redboot_installing.sgml: Changed a couple of platform
+ descriptions.
+ * doc/redboot_rebuilding.sgml: Make use of mode/config
+ consistent. Removed mode section.
+
+2002-05-22 Jesper Skov <jskov@redhat.com>
+
+ * doc/redboot_rebuilding.sgml: Added a note about redboot growing
+ beyond its slot limits.
+ Rewrote the RedBoot rebuilding documentation.
+
+ * src/flash.c (fis_create): Clarify error message. Get rid of bool
+ flag slot_found that only duplicated fis variable state.
+
+2002-05-21 Gary Thomas <gthomas@redhat.com>
+
+ * src/xyzModem.h:
+ * src/xyzModem.c:
+ * src/load.c: Purge mention of Z-modem until it's implemented.
+
+2002-05-21 Jesper Skov <jskov@redhat.com>
+
+ * src/flash.c (fis_create): Removed one of the three questions to
+ verify.
+ * doc/redboot_rebuilding.sgml: Removed the query lines from the
+ docs.
+
+ * doc/redboot_installing.sgml: Removed all the free RAM related
+ resource descriptions. Left in a few timer resource descriptions.
+ * doc/redboot_cmds.sgml: Refer to platform sections for additional
+ platform-specific resource usage.
+
+ * doc/redboot_installing.sgml: Removed all platform specific
+ references to the updating section which told the user to use
+ specific flash paramemters. All this is now handled
+ automagically.
+
+ * src/alias.c (lookup_alias): FREEMEMHI is just the high address
+ masked to 1KB alignment.
+
+ * doc/redboot_cmds.sgml: Added load disk example.
+ Added section on RedBoot resources.
+
+2002-05-18 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c (do_baud_rate): Improve safety by asking for verification
+ after actually changing the rate, before updating fconfig data. This
+ reduces the chance of making a "brick" by setting a bad baud rate.
+
+ * src/flash.c (load_flash_config): Fix set_console_baud_rate prototype.
+
+ * src/io.c (verify_action_with_timeout):
+ * include/redboot.h: New function verify_action_with_timeout().
+ Returns false if no response within XX ms (or ^C).
+
+2002-05-17 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c (do_help):
+ * src/flash.c:
+ * include/redboot.h: Support nested command structures, like "fis",
+ better.
+
+2002-05-17 Jesper Skov <jskov@redhat.com>
+
+ * doc/redboot_rebuilding.sgml: Rewrote update procedure to become
+ truly generic. Some minor tweaks.
+
+ * doc/redboot_cmds.sgml: Added id to cksum command.
+
+ * src/shex.c (load_shex_image): Set entry address to be base
+ address.
+ * src/load.c (do_load): Same.
+
+ * src/flash.c (fis_create): Infer correct exec and entry
+ addresses.
+
+ * src/load.c (load_elf_image): Save load_address/end.
+
+ * src/flash.c: Made fis lock/unlock support optional image name
+ instead of addresses. Made a few places of the code use fis_lookup
+ instead of scanning the table by steam.
+ (do_flash_config): Update flash after configuration has been
+ initialized.
+
+2002-05-16 Jesper Skov <jskov@redhat.com>
+
+ * doc/redboot_cmds.sgml: Updated text on cksum to show the new
+ output format.
+
+ * src/xyzModem.c (xyzModem_stream_read): Fix build breakage.
+
+ * doc/redboot.sgml: Some minor tweaks.
+
+ * src/alias.c (lookup_alias): Renamed freemem aliases.
+
+2002-05-15 Jesper Skov <jskov@redhat.com>
+
+ * src/io.c (verify_action): Replaced 'are you sure' with
+ 'continue'.
+ * doc/redboot.sgml: Same.
+
+ * src/xyzModem.c: Let Y-modem load correct length. Don't remove
+ assumed padding bytes since they may well be actual data. Don't
+ read anything after the EOF package is received.
+ Disabled the Y-modem header stuff again; it still needs the
+ padding culling code. So in the end, only the EOF-package read
+ was at fault.
+
+ * src/main.c: Tweak cksum output.
+
+ * src/flash.c (fis_create): language tweaks.
+
+ * src/main.c: Always call expand_aliases - leave it to that
+ function to look for flash aliases when appropriate.
+
+ * src/flash.c: Moved basic alias expansion into separate file.
+ * src/alias.c: New file. Always provide FREE_LOW & FREE_HIGH
+ aliases, but also call flash_lookup_alias when defined.
+
+ * include/redboot.h: Added declarations for alias functions. Added
+ getc_t and terminate_t types.
+
+ * src/load.c: Use getc_t/terminate_t types. Made raw load abort if
+ user tries to load a file too big for memory.
+
+ * cdl/redboot.cdl: Compile alias.c.
+
+2002-05-14 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/version.c: Clarify comments.
+
+2002-05-14 Gary Thomas <gthomas@redhat.com>
+
+ * include/redboot.h:
+ * src/net/net_io.c:
+ * src/net/dns.c: Merge generic "ip" command with "dns" for
+ more homogenous interface.
+
+2002-05-13 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/redboot.cdl: Disable CYGOPT_REDBOOT_FIS_REDBOOT_BACKUP
+ by default, since its use is currently unclear.
+
+ * src/flash.c (load_flash_config): Check for adequate FIS space
+ was incorrect [when FIS directory and FCONFIG are combined].
+ (fis_lookup): Image name lookup is case insensitive.
+
+2002-05-10 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c: Lots of restructuring in support of combined
+ FIS and FCONFIG data.
+
+ * cdl/redboot.cdl:
+ Add new option CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG
+ to allow FIS directory and FCONFIG data to share the same
+ physical FLASH block.
+
+2002-05-03 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (load_flash_config): Adjust fconfig database
+ address - necessary if FLASH blocks are very small.
+
+2002-05-02 Gary Thomas <gthomas@redhat.com>
+
+ * src/load.c: Rework how decompression is done (with changes
+ noted below). Now turning on decompression works by pushing
+ the decompress code into the stream I/O.
+
+ * src/flash.c (fis_load):
+ * src/decompress.c (gzip_inflate):
+ * include/redboot.h: Make decompression code more generalized.
+
+2002-05-01 Gary Thomas <gthomas@redhat.com>
+
+ * include/elf.h: New file.
+
+ * cdl/redboot.cdl:
+ * src/load.c (load_elf_image): Support [simple] ELF images.
+
+2002-04-24 Yoshinori Sato <qzb04471@nifty.ne.jp>
+
+ * src/xyzModem.c (xyzModem_stream_terminate): Increase time for
+ cleanup from 100ms to 250ms.
+
+2002-04-23 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/syscall.c (__do_syscall): Rename EIO to NEWLIB_EIO to
+ pre-empt any potential conflict. Add definition of
+ NEWLIB_ENOSYS and use it in place of ENOSYS.
+
+2002-04-22 Jonathan Larmour <jlarmour@redhat.com>
+
+ * doc/redboot.sgml: Document iq80321 switch settings.
+
+ * include/redboot.h: Add gettimeofday, rename, isatty and system
+ syscall numbers.
+
+ * src/syscall.c (__do_syscall): Handle above new syscalls in a
+ "default" way.
+ Take new extra signal argument.
+ When required, handle file I/O syscalls, by passing into HAL.
+
+2002-04-21 Paul Fine <pfine@delcomsys.com>
+
+ * src/flash.c (flash_get_config, load_flash_config): Save a
+ pointer to the configuration structure in FLASH. If
+ flash_get_config fails to find a config item, check to make sure
+ that the config structure in RAM has not been trashed. If it has
+ been trashed, set the pointer to the "readonly" version in FLASH
+ and try to read the config item again.
+
+ * cdl/redboot.cdl (CYGSEM_REDBOOT_FLASH_CONFIG_READONLY_FALLBACK):
+ Added this flash config option to control the readonly fallback in
+ flash.c
+
+2002-04-16 Yoshinori Sato <qzb04471@nifty.ne.jp>
+2002-04-16 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/xyzModem.c: Don't return ACKs too early.
+
+2002-04-16 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/bootp.c: Readjust timeouts - more, shorter. Better response.
+
+2002-04-12 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/bootp.c: Increase timeouts for slower networks.
+
+2002-04-11 Nick Garnett <nickg@redhat.com>
+
+ * doc/redboot.sgml: Changed some misplaced <term>s into
+ <literal>s.
+
+2002-04-08 Nick Garnett <nickg@redhat.com>
+
+ * doc/redboot.sgml: Added full LED code desription, revised memory
+ layout and miscellaneous other fixes for 80321.
+
+2002-04-03 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c (do_mfill):
+ (do_mcmp): New routines for fill/compare random buffers.
+
+ * cdl/redboot.cdl: CDL to control mfill, mcmp, cksum commands.
+
+ * src/net/net_io.c (do_ip_addr):
+ * doc/redboot.sgml: Add new command 'ip_addr', used to set/show the
+ local and host [server] addresses.
+
+2002-04-02 Jesper Skov <jskov@redhat.com>
+
+ * redboot.sgml: excalibur: Updated memory map details, added
+ information about REDBOOT startup mode.
+
+2002-03-07 Mark Salter <msalter@redhat.com>
+
+ * src/net/tcp.c: Fix missing acks of resent segments pointed out
+ by Hendrik Ruijter.
+
+2002-03-06 Nick Garnett <nickg@redhat.com>
+
+ * doc/redboot.sgml: Added Integrator details.
+
+2002-03-06 Mark Salter <msalter@redhat.com>
+
+ * src/net/tcp.c (__tcp_handler): Slight rework of Hendrik Ruijter's
+ fix for FIN_WAIT_1 to TIME_WAIT transition.
+
+2002-03-06 Jesper Skov <jskov@redhat.com>
+
+ * doc/redboot.sgml: Updated iq80310 details.
+ Updated iq80321 details.
+ Updated e7t details.
+
+2002-03-05 Jesper Skov <jskov@redhat.com>
+
+ * doc/redboot.sgml: Updated ebsa285 details.
+ Updated ipaq details.
+ Updated edb7312 details.
+
+2002-03-05 Gary Thomas <gthomas@redhat.com>
+2002-02-25 Hendrik Ruijter <Hendrik.Ruijter@axis.com>
+
+ * include/net/net.h: Add 'reuse' flag.
+
+ * src/net/tcp.c
+ (tcp_send): Adjust socket close time to allow for faster re-use.
+ (__tcp_handler): Statetransitions to TIME_WAIT on active close
+ when FIN,ACK receivedsimultaneously.
+ (__tcp_so_reuseaddr): New function - select fast re-use.
+
+2002-03-05 Jesper Skov <jskov@redhat.com>
+
+ * doc/redboot.sgml: Add something about updating RedBoot on
+ platforms using ROMRAM-startup type RedBoot. Also mention that fis
+ create can get some of its information from the fis directory.
+ Updated assabet details.
+
+2002-03-01 Mark Salter <msalter@redhat.com>
+
+ * redboot.sgml: Add diag docs and switch setting info for 80321.
+
+2002-02-28 Hugo Tyson <hmt@redhat.com>
+
+ * src/flash.c (do_flash_config): Add "-d" to the help info.
+
+ * doc/redboot.sgml: Docuement the "-d" option for dumb terminals
+ with fconfig - so you're not forced to use line editing.
+
+2002-02-28 Jesper Skov <jskov@redhat.com>
+
+ * src/syscall.c: Moved SYS_ value definitions to the header file.
+ * include/redboot.h: Same.
+
+2002-02-27 David Howells <dhowells@redhat.com>
+
+ * sgml/redboot.sgml: Removed extraneous </para>.
+
+2002-02-26 David Howells <dhowells@redhat.com>
+
+ * doc/redboot.sgml: Updated the ASB2305 notes to be more complete
+ with respect to having two flash chips.
+
+2002-02-19 Mark Salter <msalter@redhat.com>
+
+ * src/net/net_io.c (net_io_init): Remove ISR installation. This
+ was wrong way to fix problem.
+
+2002-02-15 Mark Salter <msalter@redhat.com>
+
+ * src/net/net_io.c (net_io_init): Install default ISR for ethernet.
+
+2002-02-14 Patrick Doyle <wpd@delcomsys.com>
+
+ * src/fs/disk.c (disk_stream_read): Modified to return the number
+ of bytes read instead of -1 when such number is less than was
+ requested.
+
+2002-02-06 Mark Salter <msalter@redhat.com>
+
+ * src/syscall.c (sys_write): Call __flush after last __putc.
+ (__flush): New function to flush console output.
+
+2002-02-05 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/net/net_io.c (net_init): Set use_bootp and net_debug defaults
+ properly.
+
+2002-01-31 Gary Thomas <gthomas@redhat.com>
+
+ * src/fs/ide.c (ide_packet_read_sectors): Pass errors on read.
+ (ide_init): Ignore ATAPI devices that are not CDROM (like ZIP).
+
+2002-01-30 Hugo Tyson <hmt@redhat.com>
+
+ * src/net/net_io.c (start_console): Pick up config items to choose
+ a console for special debug messages. If it's not set, select
+ channel 0 regardless, like it used to.
+ (info_console_force, info_console_number): New fconfig options to
+ control this channel *plus* forcing application special debug out
+ to a particular serial. This is crucial for debugging debugging
+ itself, or debugging a networked app over the network when you're
+ liable to get such messages popping out from the app as well as
+ from RedBoot.
+
+ * cdl/redboot.cdl (CYGDBG_REDBOOT_NET_DEBUG_CONSOLE_NUMBER):
+ Option deleted, because this is now controlled by fconfig items.
+
+2002-01-25 Hugo Tyson <hmt@redhat.com>
+
+ * src/syscall.c (sys_profile_reset): New routine - doesn't do
+ much, just NULLs the callback. Useful placeholder in case more is
+ needed in future, eg. reset the clock also.
+ (__do_syscall): Calls the reset on syscall 2003.
+
+2002-01-21 Hugo Tyson <hmt@redhat.com>
+
+ * src/flash.c (do_flash_config): Enable a "dumb terminal" mode for
+ fconfig, which does not pre-fill the buffer for editing, but
+ merely prompts for a new value (or RET for old, for non-string
+ values). This is because telnet/kermit-like network terminal apps
+ are not by default configured to pass all characters through.
+
+2002-01-18 Hugo Tyson <hmt@redhat.com>
+
+ * src/syscall.c (sys_timer_ticks): Change this to a cyg_uint64 to
+ give better range for times() sanity in case we run the hardware
+ clock ticking at a faster rate, or want to last > 8 days.
+
+2002-01-16 Hugo Tyson <hmt@redhat.com>
+
+ * src/syscall.c (sys_profile_frequency): Change frequency that is
+ passed around to signed, so that we can enquire using -ve values.
+ Re-order the logic a little so as to permit enquiries which do not
+ modify what's set up in the hardware. Adjust the times() counter
+ when its HZ rate changes so it tells the truth.
+
+2002-01-15 David Woodhouse <dwmw2@cambridge.redhat.com>
+
+ * src/flash.c: Better default for 'fis cr' - if we're programming
+ an existing flash image, take img_size from the last-loaded image
+ but length from the one that's already on the flash.
+
+2002-01-14 David Woodhouse <dwmw2@cambridge.redhat.com>
+
+ * src/main.c: Useful defaults for cksum command.
+ * src/flash.c: Useful defaults for fis create command.
+ * src/load.c: Slight cleanup of file type detection.
+
+2002-01-14 Jesper Skov <jskov@redhat.com>
+
+ * src/net/cksum.c: Added volatile keyword to union members to
+ prevent compiler optimization messing things up.
+
+2002-01-10 Hugo Tyson <hmt@redhat.com>
+
+ * src/syscall.c (sys_timer_isr): Add CYGARC_HAL_SAVE_GP(); and
+ CYGARC_HAL_RESTORE_GP(); around the callback invocation to protect
+ ourselves from whatever the app routine might do along those lines.
+
+2002-01-10 Hugo Tyson <hmt@redhat.com>
+
+ * src/syscall.c (sys_timer_ticks): Explicitly initialize this.
+ (sys_timer_isr): Call periodic callback function, with PC and SP
+ of interrupted context, if set.
+ (sys_profile_call_back): New routine to support
+ gprof profiling of GNUPro/newlib apps via BSP_SYSCALLS. Sets the
+ periodic callback function, returning the old value.
+ (sys_profile_frequency): Ditto, sets the frequency of the call, if
+ possible, or zero => a mere inquiry.
+ (sys_timer_init, sys_times): Be prepared for a dynamic non-default
+ clock rate.
+ (__do_syscall): Handle new case arms.
+
+ * cdl/redboot.cdl (CYGSEM_REDBOOT_BSP_SYSCALLS): Changed to a
+ component; want to add stuff in here later.
+ (CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF): New option
+ to control inclusion of histogram profiling callback syscalls.
+
+2002-01-10 Jesper Skov <jskov@redhat.com>
+
+ * src/main.c (do_version): Added year 2002.
+
+2002-01-07 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (lookup_alias): Remove warning.
+
+2002-01-03 Gary Thomas <gthomas@redhat.com>
+
+ * src/xyzModem.c (xyzModem_stream_read): BUG 57497
+ Try and detect (and remove) ^Z characters placed at end of stream.
+ This data confuses higher processing, like the zlib decompression
+ routines.
+
+2001-12-16 Mark Salter <msalter@redhat.com>
+
+ * src/fs/ide.c: Add ATAPI support.
+ * include/fs/ide.h: Add ATAPI defines.
+ * src/fs/disk.c (disk_stream_open): Fix support for IDE CDROMs.
+ (disk_parse_filename): Ditto.
+
+2001-12-12 Hugo Tyson <hmt@redhat.com>
+
+ * cdl/redboot.cdl (CYGDBG_REDBOOT_NET_DEBUG_CONSOLE_NUMBER): New
+ option to control the console number for network debug messages.
+ For platforms where serial0 is supported (due to common variant
+ HAL code) but not connected; serial1 is all you get, say.
+
+ * src/net/net_io.c (start_console): Use it.
+
+2001-12-10 Nick Garnett <nickg@redhat.com>
+
+ * src/net/cksum.c (__pseudo_sum): Fixed method of adding protocol
+ field to checksum. Some compilers optimize some of this away to
+ give a bogus result.
+
+2001-12-06 Jesper Skov <jskov@redhat.com>
+
+ * src/load.c (do_load): Fix warning.
+ * src/main.c: Added support for dumping memory in 16 and 32 bit
+ units. Based on patch from Warren Jasper <warrenj@bops.com>.
+
+2001-12-05 Hugo Tyson <hmt@redhat.com>
+
+ * src/flash.c (get_config): If we are editing an IP address, and
+ it is 0.0.0.0 (as you get at "fco -i" time) suppress using that as
+ the initial value of the string, it is unhelpful as a starting
+ point for line editing.
+
+ If we were given a value on the CLI eg. "fco bootp false" because
+ the new value was copied into the holding string, it was not
+ recognized as a change, so the flash was not updated. Bug! The
+ fix is to change the order of the strcpy()s so that holdline is
+ before line.
+
+ If the input line for a new value is completely blank, and the
+ type is not string, take this to mean don't change the value.
+ Otherwise typing in an empty line to an IP address goes off and
+ tries to DNS resolve it there and then, looks like a hang.
+
+ (do_flash_config): If we print the message "** invalid entry" do
+ not just loop; set onevalue = NULL so that the user is prompted
+ for a good value. Otherwise it loops forever trying the same
+ value if you typed "fco bootp goat" (goat being a bad boolean).
+
+ * src/parse.c (parse_bool): Check for (partial) rest of the word
+ either "true" or "false" and nothing extra. Thus we reject
+ "truefalse" as is all to easy to type in by accident. "TRU" "T"
+ "tRuE" are all OK of course.
+
+ * src/net/inet_addr.c (inet_aton): Do not accept terminating the
+ dot-quad address with a final dot. Else typing on the end of a
+ provided-for-editing string is accepted. Also reject units > 255.
+ Allow typing in either exactly one (large) number or 4 small ones;
+ reject intermediates. Thus we reject "10.16.19.1110.16.19.33" and
+ "0.0.0.010.16.19.11" as are all to easy to type in by accident,
+ and things like 10.0.0xffff which used to be accepted. 0x0a00ffff
+ is OK though. This change also prevents the pointer s running off
+ the end of the string if you just entered eg. "1".
+
+2001-12-04 Richard Sandiford <rsandifo@redhat.com>
+
+ * include/net/net.h (ETH_MAX_PKTLEN): Increase to match definition
+ of MAX_ETH_MSG.
+
+2001-12-04 Richard Sandiford <rsandifo@redhat.com>
+
+ * src/net/tcp.c (__tcp_poll): Call MS_TICKS_DELAY before __timer_poll.
+ * src/net/net_io.c (net_io_getc): Remove MS_TICKS_DELAY from here...
+ (net_io_getc_nonblock): ...and from here.
+
+2001-11-30 Jesper Skov <jskov@redhat.com>
+
+ * src/net/net_io.c (net_init): Print ESA for device even if bootp
+ fails.
+
+2001-11-29 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/net/dns.c: Rename index -> ptdindex to avoid conflict with BSD
+ index() function.
+
+2001-11-29 Jesper Skov <jskov@redhat.com>
+
+ * src/net/tftp_client.c (tftp_stream_open): Clear from_addr's
+ sin_port so multiple loads are possible.
+
+2001-11-26 Jesper Skov <jskov@redhat.com>
+
+ * misc/redboot_XXX.ecm: Added. Replaced the _RAM, _ROM, and
+ _ROMRAM variants.
+
+ * misc/redboot_ROM.ecm: Added configuration with all packages
+ relevant for a full RedBoot configuration. Whenever new (optional)
+ RedBoot peer packages are added, they should be added to these
+ files and not the RedBoot template.
+ * misc/redboot_ROMRAM.ecm: Same.
+ * misc/redboot_RAM.ecm: Same.
+
+2001-11-15 Jesper Skov <jskov@redhat.com>
+
+ * include/redboot.h: Added load_address and load_address_end
+ variables to hold bounds of a loaded image.
+ * src/load.c: Fill load_address and load_address_end after srec
+ and binary loads.
+ * src/flash.c: Same.
+ * src/main.c (do_go): removed unneeded cast.
+
+2001-11-14 Gary Thomas <gthomas@redhat.com>
+
+ * src/io.c (_rb_gets_preloaded): More correct timeout handling.
+ n.b. in practice, this changes nothing, but it is more "correct".
+
+2001-11-05 Gary Thomas <gthomas@redhat.com>
+
+ * src/load.c: Minor typo in help string.
+
+ * src/io.c (_rb_gets_preloaded): Clear buffer if ^C.
+
+2001-11-02 Jesper Skov <jskov@redhat.com>
+
+ * src/flash.c (fis_init): Fix warning.
+
+2001-11-01 Jesper Skov <jskov@redhat.com>
+
+ * src/flash.c (fis_init): tweaks to the SIB protection code.
+
+2001-11-01 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (fis_init): Need to init block fully, otherwise old
+ images can persist after init.
+
+2001-10-31 Jesper Skov <jskov@redhat.com>
+
+ * include/sib.h: Contains information about ARM Boot Monitor flash
+ block information.
+
+ * cdl/redboot.cdl: Added CYGOPT_REDBOOT_FIS_DIRECTORY_ARM_SIB_ID
+ option.
+
+ * src/flash.c (fis_init): Added code to add ARM Boot Monitor
+ footer on FIS block.
+
+2001-10-30 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/flash.c (fis_delete): Prototype arm_fis_delete in correct place.
+ (fis_list): Fix compilation problem - this isn't C++!
+
+2001-10-30 Philippe Robin <Philippe.Robin@arm.com>
+2001-10-30 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/redboot.cdl: Add CYGINT_REDBOOT_ARM_FLASH_SIB_SUPPORTED and
+ CYGHWR_REDBOOT_ARM_FLASH_SIB to indicate support for, and a request
+ to provide ARM flash block structure support.
+
+ * src/flash.c (fis_list): Call out to driver for ARM block FIS listing.
+ (fis_delete): Call out to driver for ARM block FIS deletion.
+
+2001-10-29 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c (cyg_start): New pseudo-commands, useful for scripts.
+ '# anything' - treated like a comment.
+ '= anything' - comment, but prints command line on console.
+
+ * src/flash.c (expand_aliases): Don't expand aliases which are
+ quoted, but only on the command line. This allows aliases to
+ expand into other aliases which are within quoted strings.
+
+ * include/redboot.h:
+ * src/io.c (_rb_gets_preloaded): New function which allows for a
+ buffer to be displayed and edited in place. This is extremely
+ useful for 'fconfig', now that better line editing functions are
+ supported.
+
+ * src/flash.c (get_config): Using new function _rb_gets_preloaded(),
+ which supports edit-in-place for data items.
+
+2001-10-28 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c (cyg_start):
+ * src/io.c (_rb_gets):
+ * include/redboot.h: Add new global control 'cmd_history' which is
+ used to enable/disable command history collection. This keeps the
+ history from being cluttered with things like 'y' (answers to simple
+ questions).
+
+2001-10-26 Gary Thomas <gthomas@redhat.com>
+
+ * src/io.c (_rb_gets): Fix ^A editing - was timing out, thus erasing
+ buffer [silently].
+
+2001-10-25 Gary Thomas <gthomas@redhat.com>
+
+ * src/io.c:
+ * cdl/redboot.cdl: Add command line history and edit functions.
+ Controlled by CYGNUM_REDBOOT_CMD_LINE_EDITING option which defines
+ the depth of the history buffer.
+
+2001-10-22 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/redboot.h: Declare net_debug here.
+
+2001-10-18 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/net/net_io.c (net_init): Set cyg_io_eth_net_debug from net_debug.
+ * include/net/net.h: Declare cyg_io_eth_net_debug.
+
+2001-10-18 David Howells <dhowells@redhat.com>
+
+ * src/syscall.c: Added support for the times() syscall and marked
+ the utime() syscall as being implemented incorrectly.
+
+2001-10-18 Gary Thomas <gthomas@redhat.com>
+
+ * src/io.c (_rb_gets): Fix parsing of \" in strings.
+
+2001-10-16 Jesper Skov <jskov@zoftcorp.adsl.dk>
+
+ * cdl/redboot.cdl: Require ISOINFA.
+
+2001-10-16 Jesper Skov <jskov@redhat.com>
+
+ * src/net/dns.c (send_recv): Clear from_addr before passing it to
+ __udp_recvfrom. Fixed return value.
+
+2001-10-16 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (_do_flash_init):
+ Add wrapper function for do_flash_init() to avoid compiler warning.
+
+ * src/io.c (_rb_gets):
+ Use sub-timeouts when calling mon_read_char_with_timeout() as it
+ was intended that this routine should timeout quickly to allow
+ for other processing to take place if no data is available. In
+ practice this won't make any difference unless the global "idle"
+ timeout value is changed to be something quite large.
+
+ * src/decompress.c: Improve memory allocators. Also use 'init'
+ style function so that this is the only file that knows anything
+ of the details of the decompression process or packaging.
+
+ * src/main.c:
+ * include/redboot.h:
+ * cdl/redboot.cdl: Rework decompression to be totally encapsulated.
+ This keeps the details of this functionality in a single file, rather
+ than scattered throughout RedBoot.
+
+2001-10-15 David Howells <dhowells@redhat.com>
+
+ * src/xyzModem.c: put semicolon between goto-label and close curly.
+
+2001-10-15 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (_expand_aliases): Change around some ambiguous code.
+
+ * src/main.c:
+ * src/decompress.c:
+ * include/redboot.h:
+ * cdl/redboot.cdl: Provide RedBoot specific memory allocators
+ for ZLIB. Allows much finer control over memory map.
+
+ * src/main.c (do_dump): Add option "-s" to dump data as S-records.
+
+2001-10-11 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/enet.c (__enet_poll): Suppress warning messages.
+
+2001-10-10 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/flash.c (do_flash_init): Only set __flash_init when init is
+ successful.
+
+2001-10-04 Jesper Skov <jskov@redhat.com>
+
+ * src/fs/disk.c: Fix ISO9660 build error.
+
+ * src/main.c: Added x as an alias for the dump command.
+
+ * src/net/dns.c: Fixed some messages (DNS -> DNS server).
+
+2001-10-02 Gary Thomas <gthomas@redhat.com>
+
+ * src/xyzModem.h:
+ * src/xyzModem.c (xyzModem_stream_open):
+ * src/load.c (do_load): Add new option "-c <N>" to let the user
+ specify the I/O channel to use - xyModem only.
+
+2001-10-01 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/udp.c (__udp_recvfrom): Don't change server address (returned
+ by this function) until a packet has been received with no timeout.
+
+2001-09-28 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/flash.c (fis_create): if not copying, still update directory.
+
+2001-09-28 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (_expand_aliases): Properly null terminate expanded
+ string - failed if alias was at end of line.
+
+2001-09-27 Jesper Skov <jskov@redhat.com>
+
+ * src/net/dns.c: Include tracing header.
+
+2001-09-26 Jesper Skov <jskov@redhat.com>
+
+ * src/net/dns.c: Removed errno hacks.
+ Reduce size of string buffers. Make sure they suffice (or fail).
+
+ * include/redboot.h: Added DNS h_errno definitions.
+
+ * include/redboot.h: Fix for building on targets wo network.
+
+ * src/load.c (do_load): Make sure host can be reached - and print
+ appropriate error message if not.
+
+ * src/net/net_io.c (net_init): Call DNS init when appropriate.
+
+ * src/net/inet_addr.c (inet_aton): Made s argument const.
+
+ * src/net/dns.c: Added UDP driven DNS support.
+
+ * src/net/bootp.c: Fixed warnings.
+
+ * src/flash.c: Replaced inet_aton with _gethostbyname.
+ * src/load.c: Same.
+ * src/net/ping.c: Same.
+
+ * include/net/net.h: Fix warning.
+
+ * include/redboot.h: Added DNS stuff, including some string
+ helpers.
+
+ * cdl/redboot.cdl: Added DNS support options.
+
+2001-09-14 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/version.c: Simplify _CERTIFICATE handling.
+
+2001-09-13 Fabrice Gautier <Fabrice_Gautier@sdesigns.com>
+
+ * cdl/redboot.cdl: Added configuration options to deactivate BOOTP and
+ enable net debug.
+ * src/net/net_io.c (net_init): Use them.
+
+2001-09-13 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c: Cleanups - removing some redundant code.
+
+2001-09-12 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/flash.c (do_flash_init): Only allocate fis block when
+ CYGOPT_REDBOOT_FIS enabled.
+ Conditionalize fis_work_block and fisdir_size.
+
+2001-09-12 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (load_flash_config): Use additional space in the
+ FLASH work area (at end of RAM) for 'fconfig' data. This reduces
+ overall stack requirements as there is no need for 'fconfig' data
+ to be held on the stack anymore.
+
+ * src/flash.c:
+ * include/fis.h: Define flash addresses using CYG_ADDRESS which
+ is more portable than (unsigned long).
+
+2001-09-11 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/redboot.cdl (CYGPKG_REDBOOT_FLASH): Be conditional on an
+ actual flash device, not just the generic flash layer.
+
+2001-09-11 Gary Thomas <gthomas@redhat.com>
+
+ * src/version.c (_CERTIFICATE): Add information about product
+ certification (either Red Hat certified or not).
+
+ * src/flash.c (fis_delete): Deny user deleting "reserved" images.
+
+2001-09-07 Andrew Lunn <andrew.lunn@ascom.ch>
+ * src/flash.c: Extend the alias handling to allow configuration
+ information to be access using alias. Fixed alias expansion
+ when the alias is bigger than the replacement.
+ * src/parse.c: A semi colon can be used to separate multiple
+ commands on one line.
+
+2001-09-06 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/redboot.h: Include string function prototype header.
+
+2001-09-06 Jesper Skov <jskov@redhat.com>
+
+ * src/fs/ide.c (ide_read_sectors): Use diag_(s)printf.
+ * src/fs/disk.c (do_disks): Same.
+
+2001-08-27 Andrew Lunn <andrew.lunn@ascom.ch>
+ * src/flash.c: Allow the flash blocks used for FIS directory and
+ config information to be user configured. Generalise the fis_init
+ function to deal with the blocks in any order.
+ * cdl/redboot.cdl: Added the configury needed to specify which
+ flash blocks to use.
+
+2001-08-27 Mark Salter <msalter@redhat.com>
+
+ * src/syscall.c (HZ): Should be 60 for ARM, also.
+
+2001-08-24 Tim Smith <tsmith@redhat.com>
+ * src/xyzModem.c
+ * src/xyzModem.h
+ Provide xyzModem_stream_terminate() function to abort/clean up
+ XYZmodem download on normal termination or after errors.
+
+ * src/load.c
+ Use aforementioned function to abort downloads on SREC errors,
+ stop load_srec_image() from injecting stuff into the XYZmodem
+ stream and confusing things.
+
+2001-08-24 Mark Salter <msalter@redhat.com>
+
+ * src/net/net_io.c: Don't close connections if there is
+ data left to read or write.
+
+ * src/syscall.c: Add support for utimes syscall.
+
+2001-08-22 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/udp.c:
+
+ * src/net/pktbuf.c:
+
+ * src/net/ping.c:
+
+ * src/net/net_io.c:
+
+ * src/net/inet_addr.c:
+
+ * src/net/enet.c:
+
+ * src/fs/e2fs.c:
+
+ * src/xyzModem.c:
+ * src/parse.c:
+ * src/misc_funs.c:
+ * src/main.c:
+ * src/load.c:
+ * src/io.c:
+ * src/flash.c:
+ * include/net/net.h:
+ * include/redboot.h:
+ printf() is no longer a part of RedBoot. Thus all programs
+ must use diag_printf() and related functions instead. Also
+ renamed the non-standard function gets() to be _rb_gets()
+ since there was some confusion about it because of it's
+ rather standard name.
+
+ * cdl/redboot.cdl: Lots of changes based on moving all printf()
+ functionality into "infra" and only using it as diag_XXX().
+
+2001-08-17 Gary Thomas <gthomas@redhat.com>
+
+ * src/version.c: Augment version information with startup mode.
+
+ * src/flash.c (fis_find_free): Fix error in size comparisons.
+ (load_flash_config): Fix 'fconfig' alignment now that it's
+ size is no longer fixed.
+
+2001-08-16 Jesper Skov <jskov@redhat.com>
+ [from branch]
+ * cdl/redboot.cdl: Also behave as ROM monitor in ROMRAM
+ configurations.
+
+ * src/load.c (do_load): Fix handling of conditional options.
+
+ * src/flash.c (fis_load): Fix handling of conditional options.
+ (fis_delete): Fix behavior on failure.
+
+ * src/flash.c (fis_write): Fix output.
+ (fis_create): Only update directory when programming succeeded.
+
+2001-08-17 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/redboot.cdl (CYGSEM_REDBOOT_VARIABLE_BAUD_RATE): Default
+ on, but only if platform supports it.
+
+2001-08-15 Mark Salter <msalter@redhat.com>
+
+ * src/io.c: Add support for "{...}" notation in boot scripts.
+
+2001-08-14 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/io.c (gets): Allow $'s and +'s to be escaped.
+
+2001-08-10 Jesper Skov <jskov@redhat.com>
+
+ * src/flash.c (do_flash_init): Print error message instead of
+ error code on init failure.
+ Don't print error codes where error messages are printed. Make
+ failure reporting strings look consistent.
+ CYGHWR_IO_FLASH_BLOCK_LOCKING flavor changed to booldata.
+
+2001-08-08 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/io.c (gets): Match $ as indicating GDB anywhere in a line.
+
+2001-08-07 Julian Smart <julians@redhat.com>
+
+ * src/version.c: added commented-out CYGDAT_REDBOOT_CUSTOM_VERSION
+ define that can be replaced using the RedBoot release script by
+ a specific version in a customer branch.
+
+2001-08-06 Jesper Skov <jskov@redhat.com>
+
+ * src/fs/disk.c: Simple fix for DISK_IDE_CDROM partition type.
+
+ * cdl/redboot.cdl: Added (unused) CYGSEM_REDBOOT_DISK_ISO9660 option.
+
+2001-08-03 David Howells <dhowells@redhat.com>
+
+ * src/net/net_io.c: Show the MAC address of the ethernet device
+ amongst the boot banners.
+
+2001-08-01 Mark Salter <msalter@redhat.com>
+
+ * src/fs/ide.c (ide_reset): Check for bogus status and timeout. Add
+ return value to indicate success.
+ (ide_init): Check ide_reset() return value.
+
+2001-07-31 Mark Salter <msalter@redhat.com>
+
+ * src/fs/disk.c (find_dos_partitions): Fix extended partitions.
+ * src/fs/ide.c (ide_init): Rework the test for device presence.
+
+2001-07-27 Gary Thomas <gthomas@redhat.com>
+
+ * src/load.c (load_srec_image, do_load):
+ * cdl/redboot.cdl: New option CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS
+ which can be used to disable user RAM checks in 'load' command.
+
+ * src/load.c: Fix build problem if no IDE support.
+
+ * src/net/tftp_client.c (tftp_stream_read): Only ACK data when it
+ has been processed and we're ready for the next block. This fixes
+ a race/timing issue which was exacerbated by the "spinner" in 'load'.
+
+2001-07-27 David Howells <dhowells@redhat.com>
+
+ * src/xyzModem.c: Fixed an uninitialised variable warning.
+
+2001-07-27 Mark Salter <msalter@redhat.com>
+
+ * cdl/redboot.cdl (CYGNUM_REDBOOT_MAX_PARTITIONS): New option.
+ Rename CYGBLD_REDBOOT_MAX_DISKS to CYGNUM_REDBOOT_MAX_DISKS.
+
+ * include/fs/disk.h: Exported functions declared "externC".
+ Replace MAX_PARTITIONS with CYGNUM_REDBOOT_MAX_PARTITIONS.
+
+ * src/fs/disk.c: Make exported functions "externC".
+ Rename CYGBLD_REDBOOT_MAX_DISKS to CYGNUM_REDBOOT_MAX_DISKS.
+ Replace MAX_PARTITIONS with CYGNUM_REDBOOT_MAX_PARTITIONS.
+
+ * src/fs/e2fs.c: Add support for symbolic links.
+ * include/fs/e2fs.h: Add dir filetype support.
+
+2001-07-24 Mark Salter <msalter@redhat.com>
+
+ * src/load.c: Add disk load support.
+ * src/fs/disk.c: New file. RedBoot disk management.
+ * src/fs/ide.c: New file. IDE disk I/O.
+ * src/fs/e2fs.c: New file. Linux ext2 filesystem support.
+ * cdl/redboot.cdl: Add options for disk/ide/filesystem support.
+
+2001-07-23 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/main.c (set_console_baud_rate): No need to query the console
+ number if we don't care what it is.
+ (do_baud_rate): Likewise.
+
+2001-07-23 David Howells <dhowells@redhat.com>
+
+ * src/flash.c: Force block-alignment for flash addresses in write
+ and erase functions.
+
+2001-07-20 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/net/net_io.c (net_init): Don't overwrite static IP
+ address when reading flash config if configured to not use BOOTP.
+ Set have_net if not using BOOTP and a default static IP addr is set.
+
+2001-07-19 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c: Be more generic with 'fconfig' layout. In
+ particular, handle case where FLASH block size is too small
+ to hold fconfig data.
+
+ * src/io.c (mon_set_read_char_timeout): Fix dangling else bug.
+
+ * src/flash.c (do_flash_init): Suppress printing info - this
+ will happen when 'version' is called. Also allow flash subsystem
+ to be initialized when there is no 'fconfig' or 'fis' command
+ configured in (but flash support still is present).
+
+ * src/version.c: Display complete version information which
+ reflects such information as the source release, etc.
+
+ * cdl/redboot.cdl: New option CYGDAT_REDBOOT_CUSTOM_VERSION used to
+ allow site-specific version information. Define this via the
+ CDL like this:
+ cdl_option CYGDAT_REDBOOT_CUSTOM_VERSION {
+ user_value 1 "Special test version"
+ };
+
+2001-07-18 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/net_io.c (net_io_putc, net_io_isr):
+ Need CYGARC_HAL_SAVE_GP()/CYGARC_HAL_RESTORE_GP() to support
+ network debugging since different layers of eCos programs are
+ involved.
+
+2001-07-16 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c (do_version): Use external function _flash_info() to
+ display information about installed FLASH.
+
+ * src/load.c (load_srec_image): Remove extra '\n' on out of range msg.
+
+ * src/flash.c (_flash_info): New function - displays information
+ about FLASH found in system. Used by 'version' command.
+
+2001-07-12 Gary Thomas <gthomas@redhat.com>
+2001-07-12 Fabrice Gautier <gautier@email.enst.fr>
+
+ * cdl/redboot.cdl: Improve some descriptions of options.
+
+2001-07-02 Jesper Skov <jskov@redhat.com>
+
+ * src/io.c (do_channel): Fox build for !CYGPKG_REDBOOT_ANY_CONSOLE
+
+2001-06-28 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/redboot.cdl: Don't have a configured default IP address by
+ default if we have fconfig.
+ * src/net/ip.c: Provide a default ip addr if not defined.
+
+2001-06-28 Jesper Skov <jskov@redhat.com>
+
+ * src/load.c (do_load): Don't allow verbose to be used with serial
+ downloads.
+
+ * src/main.c (do_reset): Reset via VV function.
+
+2001-06-27 Hugo Tyson <hmt@redhat.com>
+
+ * src/io.c: Provide proto for do_channel() to reduce warning.
+
+2001-06-27 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/redboot.cdl (CYGDAT_REDBOOT_DEFAULT_IP_ADDR): Provide a compiled
+ in default IP address.
+ * src/net/ip.c: Initialize __local_ip_addr with it.
+ * src/net/bootp.c: Restore the previous __local_ip_addr if BOOTP fails.
+
+ * include/redboot.h: Fix another VARIBLE_BAUD_RATE typo. Fun this.
+
+2001-06-26 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/io.c (do_channel): New function to display/switch console
+ channel
+
+ * src/main.c: Move define of CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS to
+ * include/redboot.h: ...here
+
+2001-06-26 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (load_flash_config): Fix another VARIBLE_BAUD_RATE typo.
+
+ * src/xyzModem.c (xyzModem_get_hdr): ACK on EOT was missing.
+
+2001-06-22 Gary Thomas <gthomas@redhat.com>
+
+ * src/load.c (do_load): Move [static] data used by decompression
+ code into this routine where it is used - no longer static.
+
+2001-06-14 Gary Thomas <gthomas@redhat.com>
+
+ * src/xyzModem.c (xyzModem_get_hdr): More resilient header scan,
+ improves error handling capability by avoiding "early" aborts.
+
+ * src/load.c (do_load): Only check TFTP arguments if networking.
+
+ * src/flash.c: Reorg to support new config option (below).
+
+ * cdl/redboot.cdl: New option CYGOPT_REDBOOT_FIS used to enable
+ FIS oriented commands. Other flash commands, e.g. 'fis write',
+ still exist even if disabled.
+
+ * src/main.c (do_dump): 'dump' with no arguments will now "continue"
+ dumping from where the last command left off.
+
+2001-06-13 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c (cyg_start):
+ * src/io.c (gets):
+ * cdl/redboot.cdl: Support RedBoot without GDB stubs. Later
+ versions may also support alternate debug environments.
+
+2001-06-12 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/net_io.c (net_io_putc): Flush data on '\n'.
+
+2001-06-11 Jonathan Larmour <jlarmour@redhat.com>
+
+ * doc/redboot.ebsa285: Remove, obsolete.
+ * doc/redboot.edb7xxx: Ditto.
+ * doc/users_guide: Ditto.
+
+2001-06-11 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (fis_create): Remove default for "-s" - too dangerous!
+
+ * include/net/tftp.h: Make sure packet size is valid (was one byte
+ too long).
+
+ * src/net/tftp_client.c (tftp_stream_open): Fix problem when using
+ Windows (3Com at least) servers.
+
+ * src/flash.c: Remove dependency on printf() via user function
+ in flash drivers, provided at 'init' time.
+
+2001-06-08 Gary Thomas <gthomas@redhat.com>
+
+ * src/parse.c (parse): Check for 'argv[]' overruns.
+
+ * src/main.c (ZLIB_COMPRESSION_OVERHEAD): Update - based on observations.
+
+ * src/net/tftp_client.c:
+ * src/net/net_io.c:
+ * src/net/enet.c:
+ * include/redboot.h (MAX_ARGV): Minor memory reduction/tightening.
+
+2001-06-08 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/main.c (do_caches): HAL_DCACHE_IS_ENABLED is not present
+ on all arch's, so conditionalize. Ditto HAL_ICACHE_IS_ENABLED.
+
+2001-06-08 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/main.c (cyg_start): Added code to disable interrupts on all
+ comm channels before entering GDB. If this is not done then stray
+ interrupts from an otherwise idle ethernet controller can cause
+ mayhem in the application.
+
+ * src/net/net_io.c (net_io_control): Added code to set static
+ vector number in disable case as well as enable case.
+ (net_io_init): Added call to net_io_control() to disable network
+ interrupts initially. Mainly to get current disable state
+ correctly set.
+
+2001-06-07 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/load.c (do_load): Ask confirmation of RAM write addr, rather
+ than automatically denying.
+ (load_srec_image): Ditto.
+
+ * src/io.c (verify_action): Don't ask if we're executing a script.
+
+2001-06-07 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (expand_aliases): Allow aliases/macros to be nested.
+
+ * src/main.c (set_console_baud_rate):
+ * src/flash.c (do_alias): Force 'fconfig' updates.
+
+ * include/flash_config.h (flash_add_config): New signature.
+ Parameter 'update' controls whether the Flash is updated.
+
+2001-06-07 <gthomas@redhat.com>
+
+ * src/load.c (do_load): Tidy some messages.
+
+ * src/flash.c (fis_load): Print image limits (memory range) when
+ loading a compressed image.
+
+2001-06-06 Mark Salter <msalter@redhat.com>
+
+ * include/net/tftp_support.h (TFTP_TIMEOUT_PERIOD): Increase to 5.
+
+ * src/net/udp.c (__udp_recvfrom): Initialize server source port
+ to zero.
+ (__udp_recvfrom_handler): Validate server source port before
+ accepting packet.
+
+2001-05-29 Jesper Skov <jskov@redhat.com>
+
+ * src/flash.c (fis_load): Fix compiler warning.
+
+2001-05-25 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c (set_console_baud_rate): Couldn't restore baud
+ rate to default value!
+ (do_baud_rate): Update baud rate in flash config database.
+
+ * src/flash.c (do_flash_config): Add "-i" option to force
+ initialization of entire configuration database.
+ (do_alias): Improve handling of existing aliases.
+
+2001-05-24 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (get_config):
+ (do_alias): Be more careful about length of strings accepted.
+
+ * cdl/redboot.cdl: Make 'fconfig' data space and strings larger.
+
+ * src/main.c (cyg_start): Expand aliases on input commands.
+
+ * src/flash.c: Add support for aliases (macros). Also update
+ support for 'fconfig' strings.
+
+ * include/flash_config.h (MAX_STRING_LENGTH): Infer from CDL.
+
+ * cdl/redboot.cdl: Add options for [FLASH based] aliases.
+ Also, 'fconfig' now supports strings.
+
+2001-05-23 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c: Fixed typo as below.
+
+2001-05-22 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/redboot.cdl: Fix typo: CYGSEM_REDBOOT_VARIBLE_BAUD_RATE ->
+ CYGSEM_REDBOOT_VARIABLE_BAUD_RATE
+ * src/main.c: Ditto.
+
+2001-05-17 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/net/tftp_client.c: include redboot.h for have_net.
+
+2001-05-17 Dennis Ehlin <Dennis.Ehlin@ecs.ericsson.se>
+ (with minor mods by jlarmour@redhat.com)
+
+ * cdl/redboot.cdl: Split boot script functionality into separate
+ component. Rename some options not to be specific to FLASH.
+ Add default boot script option.
+ * src/main.c (cyg_start): Use default boot script if none provided
+ in FLASH (or indeed no FLASH). Support renamed CDL options.
+ * src/io.c (gets): Support renamed CDL options.
+ (verify_action): Ditto.
+ * src/flash.c: Ditto.
+ * include/redboot.h: Ditto.
+
+2001-05-17 Gary Thomas <gthomas@redhat.com>
+
+ * src/crc.c (crc32): Remove unused variable/warning.
+
+ * src/main.c (set_console_baud_rate, do_baud_rate):
+ * src/flash.c:
+ * include/redboot.h:
+ * cdl/redboot.cdl: Add support for variable, settable, console
+ baud rate.
+
+ * src/net/tftp_client.c (tftp_stream_open): Don't try if no network.
+
+2001-05-10 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/redboot.cdl: Can't build RedBoot without virtual vectors.
+
+2001-05-09 Mark Salter <msalter@redhat.com>
+
+ * src/main.c (cyg_start): Cast CYGACC_CALL_IF_DELAY_US argument
+ to a cyg_int32. Needed when sizeof(int) < sizeof(cyg_int32).
+
+2001-05-07 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/net_io.c (net_io_isr): Interrupt acknowledgement
+ should rightly be done by the driver 'delivery' routine, not here.
+
+2001-04-26 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c (do_caches): Display cache state if no arguments.
+
+2001-04-13 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/ping.c (do_ping): Tidy message.
+
+2001-04-12 Robin Farine <acnrf@dial.eunet.ch>
+2001-04-12 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/io.c (gets): Checks for buffer overflow and returns buflen
+ if it reaches the end of the buffer.
+ * src/main.c (cyg_start): Cope with gets() return being the
+ buffer length.
+
+2001-04-12 Mark Salter <msalter@redhat.com>
+2001-04-12 Robin Farine <acnrf@dial.eunet.ch>
+
+ * src/net/enet.c (__eth_install_listener): Does not accept a
+ handler for an eth_type less than 0x800.
+ (__enet_poll): Only scan the handlers for a frame type greater
+ than 0x800.
+
+2001-04-09 Mark Salter <msalter@redhat.com>
+
+ * src/printf.c (_vprintf): Fixed some portability problems where
+ sizeof(int) != sizeof(long).
+
+2001-04-09 Hugo Tyson <hmt@redhat.com>
+
+ * src/main.c (do_cksum): Reduce warning absent posix_crc32().
+
+ * src/main.c (cyg_start): Compare ram_end against workspace_end to
+ see if there is *less* SDRAM than the MLT suggested, and shorten
+ workspace et al accordingly. This is needed if some SDRAM is
+ "stolen" for use by eg. a PCI window, and mapped far away.
+
+2001-04-03 Gary Thomas <gthomas@redhat.com>
+
+ * src/load.c (do_load): Fix 'raw' loading to check for valid
+ base address _before_ trying to load anything. Also, some
+ reorg to make raw vs non-raw cleaner.
+
+2001-04-02 Hugo Tyson <hmt@redhat.com>
+
+ * src/flash.c (get_config): Update to support some new syntax:
+ fco -l -n ... lists showing nicknames instead of titles.
+ fco -l -n -f ... lists showing both nicknames and titles.
+ fco nickname ... goes straight to editing only nickname.
+ fco nick value ... sets nickname to value.
+ All then follow the usual flow out, including the question
+ Update RedBoot non-volatile configuration - are you sure (y/n)
+ as it should be if you made a change.
+
+2001-03-29 Mark Salter <msalter@redhat.com>
+
+ * cdl/redboot.cdl (CYGSEM_REDBOOT_FIS_CRC_CHECK): New option to
+ enable (default) or disable CRC checks in FIS images.
+ * src/flash.c: Use CYGSEM_REDBOOT_FIS_CRC_CHECK to decide whether
+ to provide CRC for flash images.
+
+2001-03-28 Mark Salter <msalter@redhat.com>
+
+ * src/net/tcp.c (__tcp_handler): Don't send ACK from TIME_WAIT state
+ unless the FIN comes in again.
+
+2000-03-27 Grant Edwards <grante@visi.com>
+
+ * src/net/tcp.c (__tcp_handler): Fixed sequence number bug seen when
+ doing an active close.
+
+2001-03-23 Gary Thomas <gthomas@redhat.com>
+
+ * src/printf.c (_vprintf): Support %u (unsigned) descriptor.
+
+ * src/main.c (do_cksum): New command to compute and print a POSIX
+ checksum on a range of memory.
+
+ * src/crc.c (posix_crc32): New routine - matches POSIX algorithm.
+
+2001-03-21 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/redboot.cdl: Back off previous change in number of packets.
+ Also change minimum - below this, network debugging fails.
+
+ * src/flash.c (fis_write): New function - support raw writes to FLASH.
+
+ * src/net/enet.c (__enet_poll): Try to continue if out of packets.
+
+ * src/main.c:
+ * src/load.c:
+ * src/flash.c:
+ * include/redboot.h: Keep track of available "user" RAM.
+
+ * cdl/redboot.cdl: Reduce default number of [network] packets.
+
+2001-03-20 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/net_io.c (net_io_test): Change for new calling convention.
+
+ * src/main.c (cyg_start): Idle processing now in I/O routines.
+
+ * src/io.c (gets): Move idle processing into this function.
+
+ * include/net/net.h (net_io_test): Needs idle parameter.
+
+ * include/redboot.h: Change 'idle' functions to take state (idle/not).
+
+2001-03-19 Jesper Skov <jskov@redhat.com>
+
+ * cdl/redboot.cdl: Put version.o file in the public lib directory
+ so other packages can get at it and link redboot.
+
+2001-03-16 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (fis_create): Preserve memory [load/exec] address
+ when making assumptions [rewriting existing image].
+
+2001-03-16 Mark Salter <msalter@redhat.com>
+
+ * src/main.c (cyg_start): Restore console channel after returning
+ from stub.
+
+2001-03-15 Gary Thomas <gthomas@redhat.com>
+2001-03-15 Grant Edwards <grante@visi.com>
+
+ * src/net/bootp.c (bootp_handler): Guard against buffer overflow.
+
+2001-03-15 Hugo Tyson <hmt@redhat.com>
+
+ * src/flash.c (fis_create): The code was installing a default for
+ img_size from data_length of an extant record. That's zero, so,
+ so whilst the flash was erased, no data was copied in!
+ (fis_list): Added a -d to get the data length field displayed.
+
+2001-03-15 Jesper Skov <jskov@redhat.com>
+
+ * src/main.c: Make use of script variable conditional on flash.
+
+ * include/redboot.h: Changed type of workspace_end to silence
+ warning.
+
+ * src/net/ping.c (do_ping): Fix warning.
+ * src/net/pktbuf.c (__pktbuf_dump): Fix warnings.
+
+2001-03-14 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c (do_go): Make timeout code consistent with other
+ versions, e.g. script timeout. Also, allow a script to continue
+ if it was in effect when 'go' was called and ^C was typed.
+
+ * src/flash.c (fis_create): Ask for additional user verification
+ if any [important] parameters are being assumed [left out by user].
+ This just adds a level of safety in the presence of assumptions.
+
+2001-03-13 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c: Define 'workspace' based on MLT files, rather than
+ simply using end of RAM area.
+
+ * src/flash.c: Use 'workspace' for scratch area.
+
+ * include/redboot.h: Define new variables 'workspace_XXX' to specify
+ ares used by RedBoot for scratch, etc.
+
+2001-03-12 Jesper Skov <jskov@redhat.com>
+
+ * src/decompress.c: Removed Z_BAD_CRC hack. zlib does CRC checking
+ now.
+
+2001-03-09 Jesper Skov <jskov@redhat.com>
+
+ * src/misc_funs.c: Added strncpy.
+ * include/redboot.h: And declaration.
+
+2001-03-08 Jesper Skov <jskov@redhat.com>
+
+ * src/load.c (do_load): Added decompression support.
+ * src/flash.c (fis_load): Same.
+
+ * src/decompress.c: Added. Interfaces the zlib API.
+
+ * include/redboot.h: Added some definitions used by decompression
+ code.
+
+ * cdl/redboot.cdl: Added option to control size of zlib bounce
+ buffer.
+
+2001-03-05 Jesper Skov <jskov@redhat.com>
+
+ * src/main.c (cyg_start): Make sure communication channels are
+ initialized.
+
+2001-03-03 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c (do_idle): New function - all 'idle' handling is here.
+
+ * src/io.c (mon_read_char_with_timeout): Improve timeout handling
+ when scanning for a console by applying the minimum possible value
+ (1 ms) to each channel, accumulating the total value. The previous
+ algorithm was quite poor on systems where there is no buffering,
+ i.e. serial channels with no FIFOs, because each channel would
+ wait for T/N (t = total timeout, N = number channels). This might
+ possibly have been much longer than the devices could tolerate and
+ still return valid data.
+
+2001-03-01 Gary Thomas <gthomas@redhat.com>
+
+ * src/version.c: Add 'bootstrap' to banner so the world can see
+ more of what RedBoot's all about.
+
+2001-02-28 Gary Thomas <gthomas@redhat.com>
+
+ * include/redboot.h: Fix prioritization of 'init' table entries.
+
+2001-02-26 Gary Thomas <gthomas@redhat.com>
+
+ * include/redboot.h (RedBoot_INIT_PRIO): Slight change - avoid
+ arithmetic which C preprocessor doesn't handle anyway. This also
+ fixes prioritizing init entries.
+
+ * src/flash.c (fis_load): Only load actual data [length] when loading
+ an image.
+
+ * cdl/redboot.cdl: Change build rule to always rebuild 'version.o'
+ whenever the application is relinked. Thus the version string will
+ always accurately reflect the actual build date/time.
+
+2001-02-22 Hugo Tyson <hmt@redhat.com>
+
+ * cdl/redboot.cdl: New config options to control default creation
+ of various FIS image files. Also opt for a reserved area at the
+ base of flash, eg. for user's POST or other pre-RedBoot code that
+ we must not interfere with. This isn't the same as the extant
+ boot_offset option, so the two are made to work together.
+ Likewise an offset for the start of a POST-cooperative RedBoot
+ image, if any; the value is of course platform dependent, not
+ simply after the first RedBoot image, if there is one.
+
+ Clarification: a POST-cooperative RedBoot image is a ROM-start
+ image that runs at a higher address in ROM, and which omits some
+ of the hardware initialization because it's already done by
+ whatever came before. Most targets do not have such a thing;
+ those that do, it is created by a config export file, not by a new
+ startup type. A POST Redboot can be tested from a plain ROM
+ redboot by just calling its entrypoint once it is installed in
+ flash; eg. by "go 0x50040044" at the RedBoot prompt.
+
+ * src/flash.c (fis_init): Create additional optional entries for
+ o (reserved) reserved area at start, for preboot or post code.
+ o RedBoot itself now optional
+ o RedBoot[post]
+ o RedBoot[backup]
+ Also initialize their addresses, sizes, accordingly.
+ The default behaviour is unchanged.
+ The flash erase is moved to after the fis table init because the
+ fis table init most conveniently calculates the high water mark of
+ built-in default objects.
+ (fis_create): If creating a file which already exists (most likely
+ one of the preconfigured defaults) pick up Flash address and
+ length (the two required parameters) from there. They're required
+ to be the same to it's no loss of generality, and saves typing,
+ makes the default entries far more useful and so on.
+ (fis_delete): Skip those entries which were
+ preconfigured; we want nobody to be able to delete these.
+ (fis_free): Start searching for free space to list only after the
+ reserved base area - if there is one.
+ (fis_find_free): Start searching for free space only after the
+ reserved base area...
+
+2001-02-22 Jesper Skov <jskov@redhat.com>
+
+ * src/flash.c: Added default case to switch statement.
+
+2001-02-20 Gary Thomas <gthomas@redhat.com>
+
+ * src/load.c: Remove unnecessary \r from usage message.
+
+ * src/printf.c (_vprintf): Ensure CR/LF sequence, not LFCR.
+
+ * src/net/ping.c:
+ * src/flash.c: Better usage messages [no naked linefeeds].
+
+ * src/net/ping.c: Tidy up usage message. Check for reasonable
+ packet lengths.
+
+ * src/load.c: Tidy up usage message.
+
+2001-02-16 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/flash.c (load_flash_config): Move setting of config_ok to
+ true to before we look for a script to run. Otherwise scripts just
+ don't work.
+
+2001-02-14 Hugo Tyson <hmt@redhat.com>
+
+ * src/load.c (do_load): Wrap the help message at < 80 cols and fix
+ a coupla warnings.
+
+2001-02-13 Hugo Tyson <hmt@redhat.com>
+
+ * src/flash.c: Fix token/string pasting thinko: ## operators are
+ not needed and do confuse some compilers.
+
+2001-02-12 Jesper Skov <jskov@redhat.com>
+
+ * src/main.c: Use CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL instead
+ of CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL.
+
+2001-02-11 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/ping.c (do_ping): Accomodate new MS_TICKS scheme.
+
+2001-02-09 Grant Edwards <grante@visi.com>
+
+ * include/net/net.h (MS_TICKS_DELAY): New macro, different from
+ MS_TICKS() so that MS_TICKS() gets the current tick count, and
+ MS_TICKS_DELAY is used in a delay loop to actually do a delay.
+
+ * src/ticks.c (get_ms_ticks): New function imlementing rework of
+ MS_TICKS
+
+ * src/net/net_io.c (net_io_getc): Use MS_TICKS_DELAY() instead of
+ CYGACC_CALL_IF_DELAY_US() directly
+ (net_io_getc_timeout): Likewise
+
+ * src/net/udp.c (__udp_recvfrom): MS_TICKS -> MS_TICKS_DELAY
+ * src/net/bootp.c (__bootp_find_local_ip): Likewise
+
+2001-02-09 Jonathan Larmour <jlarmour@redhat.com>
+2001-02-09 Grant Edwards <grante@visi.com>
+
+ * src/net/net_io.c (net_io_getc_nonblock): Silence compiler warning
+
+2001-01-31 Gary Thomas <gthomas@redhat.com>
+
+ * include/redboot.h:
+ * cdl/redboot.cdl:
+ * src/flash.c: Use new CRC functions.
+
+ * src/crc.c: New file - supports 16 and 32 bit CRC functions.
+
+2001-01-31 Grant Edwards <grante@visi.com>
+
+ * src/net/net_io.c (net_io_test): Use new idle function to
+ poll for incoming network connections. Removes #if requirements
+ from the main CLI loop.
+
+ * src/main.c (cyg_start):
+ * include/redboot.h (RedBoot_idle): Add new tables to support
+ user defined functions to be called when idle (during command input).
+
+2001-01-31 Gary Thomas <gthomas@redhat.com>
+
+ * include/redboot.h:
+ * src/main.c (cyg_start):
+ * src/net/net_io.c (net_io_getc_nonblock): Forgo TELNET escape
+ processing if GDB is active (requires 8-bit clean connection).
+
+2001-01-31 Nick Garnett <nickg@cygnus.co.uk>
+
+ * src/syscall.c (__do_syscall):
+ Added SYS_meminfo syscall.
+ This is used by the MIPS3264 GNUPro runtime.
+
+ * src/net/net_io.c (net_io_getc_nonblock):
+ Telnet escape processing temporarily disabled because it does not
+ work.
+
+2001-01-31 Grant Edwards <grante@visi.com>
+
+ * include/net/net.h:
+ * src/net/enet.c (__eth_install_listener, __eth_remove_listener):
+ New functions - allow user registerable callout to handle
+ non-standard ethernet packets.
+
+2001-01-30 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c (do_reset): HAL macro name changed.
+
+ * src/net/ping.c (do_ping): Remove warning.
+
+ * src/main.c (do_help): Only display help for selected topic
+ if provided.
+
+2001-01-24 Jonathan Larmour <jlarmour@redhat.com>
+
+ * src/main.c (cyg_start): Rework last change to use more generic
+ HAL_MEM_REAL_REGION_TOP macro.
+
+2001-01-24 Hugo Tyson <hmt@redhat.com>
+
+ * src/main.c (cyg_start): Take notice of the hal_dram_size
+ variable (only supported on ARMs) to set ram_end. The symbols
+ given by the CYGMEM_REGION_ram symbols are minima or defaults.
+
+2001-01-22 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/inet_addr.c (inet_aton): Fix byte order on big endian
+ systems.
+
+ * src/net/icmp.c (__icmp_install_listener):
+ (__icmp_remove_listener): New functions.
+ (__icmp_handler): Call listener for unhandled packets.
+
+ * include/net/net.h: Add handler for ICMP [incoming] data.
+
+ * cdl/redboot.cdl:
+ * src/net/ping.c: New CLI command - ping a host.
+
+2001-01-18 Gary Thomas <gthomas@redhat.com>
+
+ * include/net/net.h:
+ * src/net/pktbuf.c (__pktbuf_alloc):
+ * src/net/tcp.c (__tcp_listen): Remove obsolete code regarding
+ 'eth_hdr' stored with packet buffer.
+
+2001-01-17 Hugo Tyson <hmt@redhat.com>
+
+ * src/io.c (dump_buf_with_offset): Fix previous change so it
+ compiles; variable names used not same as parm names in func.
+
+2001-01-16 Gary Thomas <gthomas@redhat.com>
+
+ * src/xyzModem.c: Improved debug support - now allows debug
+ trace to be kept in memory and dumped at completion.
+
+ * src/io.c (vdump_buf_with_offset): New function which allows
+ dumping via any generic "print" function.
+
+ * include/redboot.h: Export new print/dump functions.
+
+2001-01-08 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/arp.c: Add special case handling for ARP(self).
+
+2001-01-03 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c (do_version): Update copyright for 2001.
+
+ * src/io.c (gets): Use timeout provided [was hardcoded to 50ms!]
+
+2000-12-21 Mark Salter <msalter@redhat.com>
+
+ * src/flash.c (fis_init): Use CYGBLD_REDBOOT_FLASH_BOOT_OFFSET to
+ decide where to create default images.
+
+ * cdl/redboot.cdl (CYGBLD_REDBOOT_FLASH_BOOT_OFFSET): Use this
+ to define offset from start of FLASH to start of boot image.
+
+2000-12-15 Gary Thomas <gthomas@redhat.com>
+
+ * src/version.c: Define GDB stubs version here as well. Also
+ add warnings and informationabout how all of this works.
+
+2000-12-13 Gary Thomas <gthomas@redhat.com>
+
+ * src/version.c: New file.
+
+ * src/main.c:
+ * cdl/redboot.cdl: Reorg - main.c is now treated like all other
+ files. New file 'version.c' holds the special stuff used at
+ build time to get interesting version information into the
+ final product.
+
+2000-12-12 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (get_config): Increase size of input buffer used
+ during 'fconfig' command.
+
+2000-12-11 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c: Change in HAL layering - need to include proper
+ file to get 'reset' definition.
+
+2000-12-08 Jonathan Larmour <jlarmour@redhat.com>
+
+ * cdl/redboot.cdl: Tweak CYGPKG_REDBOOT_MAX_CMD_LINE description.
+
+2000-12-07 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c (cyg_start): Make CLI command buffer static.
+ (do_reset): New command - reset platform from CLI.
+
+ * src/io.c (dump_buf_with_offset): Change signature for
+ more generic export.
+
+ * include/redboot.h: Export 'dump_buf_with_offset' function.
+
+ * cdl/redboot.cdl: Define CLI command buffer - static with
+ user specified length - to accomodate some environments which
+ may want excrutiatingly long commands.
+
+2000-12-07 Jesper Skov <jskov@redhat.com>
+
+ * src/misc_funs.c (strlen): NULL ptr string has length 0.
+
+ * src/load.c (load_srec_image): Refuse to load data to a location
+ not in RAM.
+
+ * src/flash.c (fis_create): Hack around another MIPS compiler bug.
+
+2000-12-06 Jesper Skov <jskov@redhat.com>
+
+ * src/load.c: Suppress verbosity when using xyz modem download.
+
+ * src/main.c: Fix warnings.
+ * src/load.c: Fix warnings.
+
+ * src/parse.c (parse_num): Hack around MIPS compiler bug.
+
+2000-12-01 Gary Thomas <gthomas@redhat.com>
+
+ * src/xyzModem.h:
+ * src/xyzModem.c (xyzModem_stream_close): New function - tidy up
+ and print some statistics about the download. Better handling
+ of CAN (cancel) function.
+
+ * src/load.c (load_srec_image): Consume all data, not just to
+ final record. This makes Ymodem happier. Also, call xyzModem_close().
+
+2000-11-30 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (fis_create): Add new option '-n' which suppresses
+ the copy from RAM to FLASH. Used to simply update the FIS directory.
+ Also misc printf() changes - add 0x everywhere hex is used.
+
+ * src/net/net_io.c (_net_io_getc_nonblock): Abstract function.
+ (net_io_getc_nonblock): Add minimal handling of telnet escape
+ sequences - required to properly handle ^C.
+
+ * src/main.c (cyg_start): Support network connection during
+ boot/startup script. Use new codes from 'gets()'.
+
+ * src/flash.c (fis_create): Cleanup to remove warnings.
+
+ * include/net/net.h (BSPLOG): Update for new start/end_console().
+
+ * src/io.c (gets):
+ * include/redboot.h (_GETS_xxx): Define result codes from
+ 'gets()' function.
+
+2000-11-28 Gary Thomas <gthomas@redhat.com>
+
+ * src/parse.c (parse): Support escaped quote marks inside of
+ quoted string. "ab\"c\"" is 'ab"c"'.
+
+ * src/net/tftp_client.c (tftp_stream_open): Read first datum from
+ file during open to ensure that errors are reported.
+
+2000-11-27 Drew Moseley <dmoseley@redhat.com>
+
+ * src/main.c: Switch to an application stack before running a
+ user-downloaded app.
+
+2000-11-20 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c: Use CYGBLD_REDBOOT_MIN_IMAGE_SIZE.
+
+ * cdl/redboot.cdl(CYGBLD_REDBOOT_MIN_IMAGE_SIZE): Define this to
+ be the minimum size allowed for FIS images.
+
+ * src/xyzModem.c: Tidy up debug support. Fix some synch problems
+ so that X/Y modem protocols now work properly with Windows/Hyperterm.
+
+2000-11-20 Mark Salter <msalter@redhat.com>
+
+ * src/net/net_io.c (net_io_flush): Add __tcp_drain to make sure
+ everything is successfully sent out.
+ (net_io_control): Call net_io_flush for __COMMCTL_FLUSH_OUTPUT.
+
+2000-11-19 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (fis_create): Print more info when length check fails.
+
+ * src/main.c: Split version display into separate command.
+
+2000-11-06 Mark Salter <msalter@redhat.com>
+
+ * src/syscall.c: New file. Common handling for bsp syscalls.
+
+ * cdl/redboot.cdl: Add CYGSEM_REDBOOT_BSP_SYSCALLS option to
+ turn on BSP syscall support.
+
+2000-11-06 Jesper Skov <jskov@redhat.com>
+
+ * src/net/net_io.c (net_io_flush): Clear interrupt flag before
+ setting breakpoint.
+
+2000-10-30 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/udp.c:
+ * src/net/pktbuf.c:
+ * src/net/net_io.c:
+ * src/net/enet.c:
+ * include/net/net.h: Minor cleanups to remove warnings.
+
+ * cdl/redboot.cdl: Support threads in all but RAM mode. Note:
+ this should allow thread support in ROM and FLOPPY startup mode.
+
+2000-10-27 Gary Thomas <gthomas@redhat.com>
+
+ * src/xyzModem.c (xyzModem_stream_open): Add extra delay during
+ startup - to give the sender time to get started.
+
+ * src/flash.c (fis_load): Add "-c" option to show checksum of
+ image after loading.
+ (fis_list): Add "-c" to display stored checksums.
+
+2000-10-26 Mark Salter <msalter@redhat.com>
+
+ * src/load.c (do_load): Move some local variable declarations
+ needed by xyzmodem support so they can be used when redboot
+ networking not enabled.
+
+2000-10-26 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/redboot.cdl: Improve CDL so CYGSEM_HAL_ROM_MONITOR can
+ be correctly infered (when building ROM versions).
+
+ * cdl/redboot.cdl:
+ * src/load.c: Add support for xyzModem serial download.
+
+ * src/xyzModem.h:
+ * src/xyzModem.c: New file(s).
+
+2000-10-24 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c:
+ * cdl/redboot.cdl: Add new option which supports keeping all
+ important RedBoot data "locked" in FLASH.
+
+2000-10-23 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (fis_lookup): New exported function.
+ (fis_load): Add memory load option. Also checksum data after copy.
+
+ * include/fis.h: Add 'data_length' member.
+ Prototype for 'fis_lookup()'.
+
+ * src/main.c (bist): New [weak] function. Provide hook for
+ platform specific "builtin tests". This will be overridden by
+ platform based functions.
+
+ * cdl/redboot.cdl:
+ * src/main.c (cyg_start):
+ * src/flash.c: Script timeout now has a configurable resolution.
+
+2000-10-21 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/eth_drv.c: Removed obsolete file - now provided by
+ standard IO/ETH package.
+
+2000-10-20 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/pktbuf.c: Diagnostc - add buffer [list] dumper.
+
+ * src/net/enet.c: Diagnostic - dump when run out of buffers.
+
+ * src/flash.c: Make sure RedBoot flash image size meets
+ certain minimums - currently at least 128K.
+
+2000-10-19 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/redboot.cdl: Add dependency on 'vectors.o'.
+
+ * include/redboot.h:
+ * src/misc_funs.c (strcpy, memcmp):
+ Make function signature [prototype] conform to standards.
+ (memmove, memset): Remove.
+
+2000-10-18 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/redboot.cdl: Improve dependency checking in make rules.
+
+2000-10-17 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (fis_create): Add new "-s" option to support padded
+ images (data size not the same as image size in FLASH).
+
+ * include/fis.h: New file - make structure available for export.
+
+ * src/parse.c: New file.
+
+ * include/redboot.h:
+ * src/main.c:
+ * cdl/redboot.cdl: Split command line parsing functions to separate
+ file.
+
+2000-10-05 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/net_io.c (net_io_revert_console):
+ (net_io_assume_console):
+ * src/main.c (cyg_start):
+ * src/io.c (gets):
+ * include/redboot.h: Add notion of "console_echo" so that telnet
+ connections don't echo doubly. Note: there is no telnet negotiation
+ at this time, so some things are still not perfect.
+
+2000-09-17 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c: Display platform/cpu identification strings if available.
+
+ * cdl/redboot.cdl: Improve CDL to include thread support if
+ built in ROM mode. Also, better handling of network option.
+
+2000-09-15 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c (fis_create): Length (and flash address) must match
+ exactly when replacing an image.
+ Only warn of invalid memory addresses, not fail.
+
+2000-09-13 Gary Thomas <gthomas@redhat.com>
+
+ * src/load.c: Better handling of bad data / checksum errors.
+
+ * src/flash.c: Handle case of replacing an image, even if no flash
+ address was given.
+
+ * include/net/tftp_support.h: Modify timeouts, etc, for better response.
+
+2000-09-12 Gary Thomas <gthomas@redhat.com>
+
+ * src/io.c (mon_read_char_with_timeout): Only "select" a console
+ when real data (non-zero) arrives.
+
+2000-09-10 Gary Thomas <gthomas@redhat.com>
+
+ * src/load.c:
+ * src/flash.c: Remove warnings if built without networking.
+
+2000-09-11 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/redboot.h (_RedBoot_init): Define tables entries as structs
+ with one member rather than just func ptrs, to enforce alignment rules
+ * src/main.c (cyg_start): Change to use struct init_tab_entry per above
+
+2000-09-07 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/load.c, include/redboot.h: renamed the getc functions to
+ redboot_getc and made them global so custom boot loaders can use
+ them.
+
+2000-09-06 Gary Thomas <gthomas@redhat.com>
+
+ * doc/users_guide: Add info about region locking/unlocking.
+
+2000-09-04 Jonathan Larmour <jlarmour@redhat.com>
+
+ * include/flash_config.h (struct config_option): Apply
+ CYG_HAL_TABLE_TYPE
+ * include/redboot.h: Ditto for struct cmd and void_fun_ptr
+
+2000-09-01 Hugo Tyson <hmt@cygnus.co.uk>
+
+ * src/flash.c: CYGHWR_IO_FLASH_BLOCK_LOCKING is an interface, so
+ it's always defined; look for > 0 instead.
+
+2000-08-28 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c: Support block locking if available.
+
+2000-08-25 Gary Thomas <gthomas@redhat.com>
+
+ * src/load.c (getc): Fix edge condition when file is an exact multiple
+ of internal buffer size (got stuck at end of file).
+
+2000-08-24 Gary Thomas <gthomas@redhat.com>
+
+ * src/load.c: Fix some prints. Also use command line parse functions
+ instead of ad hoc code.
+
+ * src/flash.c: Better configuration control.
+
+2000-08-23 Gary Thomas <gthomas@redhat.com>
+
+ * src/load.c (do_load): Use paramterized command line parser.
+
+ * include/redboot.h:
+ * src/main.c (scan_opts): Better support for simple flags.
+
+ * src/flash.c: Add "-l" (list only) option to 'fconfig'.
+
+ * src/net/net_io.c: Add handling of ^C via network connections.
+
+ * include/flash_config.h:
+
+ * include/redboot.h: Fully qualify table entries (for proper
+ sorting and order control).
+
+ * cdl/redboot.cdl: Update requirements to support ^C and thread
+ debugging.
+
+2000-08-21 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/redboot.cdl:
+ * src/net/pktbuf.c (MAX_PKTBUF): Add CDL configury for number
+ of network packet buffers.
+
+ * src/net/net_io.c: Change config param names to enforce
+ layout (config fields are sorted by name).
+
+ * src/load.c: Adapt to changes in 'parse_num'.
+
+ * src/main.c (parse_num): Now takes additional arguments which
+ allow a delimiter set and returning the end of number string.
+
+ * include/redboot.h: Augment 'parse_num' to handle strings
+ with more than one number, delimiters, etc.
+
+ * src/flash.c:
+ * include/flash_config.h: Add support for ethernet hardware
+ addresses.
+
+2000-08-20 Gary Thomas <gthomas@redhat.com>
+
+ * include/flash_config.h: New file - configuration data layout.
+
+ * src/flash.c: Restructure config data to be 100% table driven.
+
+ * include/redboot.h:
+ * include/net/bootp.h:
+ * include/net/net.h:
+ * include/net/tftp.h:
+ * include/net/tftp_support.h: New location.
+
+ * src/printf.c:
+ * src/net/arp.c:
+ * src/net/bootp.c:
+ * src/net/cksum.c:
+ * src/net/enet.c:
+ * src/net/icmp.c:
+ * src/net/inet_addr.c:
+ * src/net/ip.c:
+ * src/net/net_io.c:
+ * src/net/pktbuf.c:
+ * src/net/tcp.c:
+ * src/net/tftp_client.c:
+ * src/net/timers.c:
+ * src/net/udp.c: Include files moved.
+
+ * src/redboot.h:
+ * src/net/bootp.h:
+ * src/net/net.h:
+ * src/net/tftp.h:
+ * src/net/tftp_support.h: Files moved.
+
+ * cdl/redboot.cdl: Move .h files to include directory.
+
+2000-08-16 Gary Thomas <gthomas@redhat.com>
+
+ * src/io.c (dump_buf_with_offset): Clean up warnings.
+
+ * src/net/net_io.c: Cosmetic - clean up TCP debug code.
+
+ * src/main.c (cmd_search): Search for ambiguous commands was
+ wrong since layout change (only know the limits, don't rely
+ on "null" entry).
+
+2000-08-14 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/redboot.cdl: Support for plugin (table driven) modules.
+
+ * src/flash.c: Lots of warning cleanups.
+
+ * src/io.c: Fix some flash configury.
+
+ * src/load.c: Make internal buffer unsigned so 'raw' mode
+ works properly. Also, support as a plugin command.
+
+ * src/main.c:
+ * src/redboot.h: Add support for "tableized" entries. In
+ particular, commands and platform initializations can now
+ be handled via anonymous tables.
+
+ * src/net/net.h: Update for changes in network init setup.
+
+ * src/net/net_io.c: Move network initialization here.
+
+2000-08-07 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/net.h:
+ * src/redboot.h:
+ * src/main.c: Cosmetic [warnings] cleanups.
+
+2000-08-03 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/redboot.cdl: Ethernet driver now comes from common
+ I/O package.
+
+ * src/io.c (verify_action): Force normal I/O (no script)
+ to get response.
+
+ * src/main.c: Add script timeout to allow user to abort before
+ script is run on boot.
+
+ * src/printf.c: '%p' implies zero filled long format.
+
+ * src/flash.c:
+ * src/redboot.h: Add TCP socket and script timeouts.
+
+ * src/net/net_io.c: TCP socket for debug is now configurable
+ and settable in FLASH. Better handling of GDB $O packets (less
+ latency). Additional small changes to support network debug.
+
+2000-07-30 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c: Make config data safer with a 'key'. Also, don't
+ erase the config data when doing a full FIS initialization.
+ Finally, ensure that the commands which erase data are not going
+ to erase the current code!
+
+ * src/io.c (gets): Treat 'delete' char like ^H.
+
+2000-07-30 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/redboot.cdl: Add option for FLASH based configuration data.
+
+ * src/flash.c: Lots of changes to support FLASH based configuration
+ data, including routines to read and maintain this data.
+
+ * src/main.c:
+ * src/redboot.h: Many changes for FLASH configuration data support.
+ Also split out table driven option/parameter parsing.
+
+ * src/io.c: Allow ^C to abort input. Fix timeout stuff to
+ work better while waiting for console to be discovered.
+ Add support for boot-time script.
+
+ * src/load.c: Use new IP/INET address functions.
+
+ * src/net/bootp.c: Remove force of net_debug and result print.
+
+ * src/net/inet_addr.c: IP/INET address conversion routines.
+
+ * src/net/net.h: Make 'net_debug' be boolean. Add IP/INET
+ address conversion routine prototypes.
+
+2000-07-29 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c: Misc little cleanups.
+
+ * src/load.c: Print address range of loaded image/file.
+
+2000-07-29 Gary Thomas <gthomas@redhat.com>
+
+ * src/flash.c: Add 'load' command which loads an image into RAM.
+
+ * src/load.c: Add '-raw' switch to allow loading a file without
+ trying to interpret it as an executable image.
+
+ * src/main.c:
+ * src/redboot.h: Make command parsing functions public.
+
+2000-07-29 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/bootp.c: Turn on network debug during address discovery.
+ (Note: this will be optional/configurable in the future).
+
+ * src/net/eth_drv.c: Use 'net_debug' for diagnostic dumps.
+
+ * src/redboot.h: Prototypes for new functions.
+
+ * src/printf.c (vprintf): New function.
+
+ * src/io.c (verify_action): New function.
+
+ * cdl/redboot.cdl: Make FLASH support optional.
+
+ * src/flash.c: New file - implements simple FLASH Image System.
+
+ * src/misc_funs.c (memset):
+ (strcpy): New functions.
+
+ * src/main.c: Split flash functions to separate file.
+
+2000-07-28 Gary Thomas <gthomas@redhat.com>
+
+ * src/load.c: Add "-v" switch to turn on a little 'spinner' while
+ downloading to provide some feedback to the user.
+
+ * src/printf.c: Use only RedBoot I/O to allow console to "float."
+
+ * src/net/bootp.c: Force hardware type to be "original" ethernet.
+
+ * cdl/redboot.cdl:
+ * src/redboot.h:
+ * src/main.c:
+ * src/io.c:
+ * src/net/net_io.c: Support "floating" console, chosen from
+ available serial I/O channels.
+
+2000-07-26 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/tftp_support.h:
+ * src/net/tftp_client.c: Add new stream oriented functions.
+
+ * src/net/net.h: More prototypes.
+
+ * src/redboot.h: Move support functions here. Update interfaces.
+
+ * src/printf.c: Support %l (long) qualifier.
+
+ * src/misc_funs.c: Misc cleanups. Add case insensitive routines.
+
+ * src/main.c: FLASH functionality is now in it's own package.
+
+ * src/net/eth_drv.c:
+ * include/eth_drv.h: Update to new interface conventions.
+
+ * cdl/redboot.cdl: Changes for new files(s).
+
+2000-07-24 Gary Thomas <gthomas@redhat.com>
+
+ * src/net/inet_addr.c: New file. Support for IP address parsing.
+
+ * src/load.c: New file. Split out download functionality.
+ Restructured to support download via stream (zmodem).
+
+ * src/misc_funs.c: Add case insensitive compare functions.
+
+2000-07-22 Gary Thomas <gthomas@redhat.com>
+
+ * src/main.c (do_load): Add proper argument parsing.
+
+2000-07-21 Gary Thomas <gthomas@redhat.com>
+
+ * src/io.c (gets): Treat "\n\r" and "\r\n" as exactluy "\n". This
+ solves problems of simply ignoring "\n" on terminals which can only
+ send that character while still working with telnet/TCP connections.
+
+ * src/net/net_io.c: New file. Supports local I/O via a TCP channel.
+ Additional changes to support TCP channel for GDB debug I/O.
+
+ * cdl/redboot.cdl: Clean up dependencies. Extend network configuration.
+
+ * src/io.c (gets): Ignore blank lines which contain only '\n'.
+ This works fine for terminal I/O since they will have '\r' and it
+ allows reasonable handling when connected via telnet/TCP.
+
+ * src/main.c: Better support for network connections.
+ Also some reworking of FLASH routines [will be moved later].
+ More error checking and better error messages in download code.
+
+ * src/net/net.h: Reorder 'tcp_socket' fields to enforce proper
+ alignment of data buffer [needs to be on dword boundary].
+
+ * src/net/tcp.c: Many small changes getting 'endian'-ness correct.
+
+ * src/net/tftp_client.c (tftp_error): New function - returns a
+ string representing the error code [for humans].
+
+2000-07-16 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/redboot.cdl: Make network support configurable/optional.
+
+ * src/io.c: Add command line input function.
+
+ * src/main.c: Lots of new functions, command line processing, etc.
+
+ * src/misc_funs.c (strcmp, strncmp): New function(s).
+
+ * src/printf.c: Add support for "%p" (pointers).
+
+ * src/redboot.h: Expand, move global vars, here, etc.
+
+ * src/net/eth_drv.c: Make quieter, change "no interface" string.
+
+ * src/net/net.h (__LITTLE_ENDIAN__): Avoid redefining this on platforms
+ where GCC does it for us.
+
+2000-07-12 Gary Thomas <gthomas@redhat.com>
+
+ * cdl/redboot.cdl: New file(s).
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff --git a/cesar/ecos/packages/redboot/current/cdl/redboot.cdl b/cesar/ecos/packages/redboot/current/cdl/redboot.cdl
new file mode 100644
index 0000000000..b18ea2a6e7
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/cdl/redboot.cdl
@@ -0,0 +1,1182 @@
+# ====================================================================
+#
+# redboot.cdl
+#
+# Redboot package configuration data
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2002, 2003, 2004 Gary Thomas
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): gthomas
+# Original data: gthomas
+# Contributors: Philippe Robin, Andrew Lunn, tkoeller
+# Date: 2000-05-01
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+cdl_package CYGPKG_REDBOOT {
+ display "Redboot ROM monitor"
+ doc ref/redboot.html
+ define_header redboot.h
+ description "
+ This package supports the Redboot \[stand-alone debug monitor\]
+ using eCos as the underlying board support mechanism."
+
+ # Use of separate interrupt stack causes problems when running
+ # programs as they can end up trashing RedBoot's stack
+ requires { CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK == 0 }
+
+ # Since the CYGDAT_REDBOOT_CONSOLE_DEV setting ends up in the platform
+ # HAL header, we need to include that here (via hal.h).
+ define_proc {
+ puts $::cdl_header "#include <pkgconf/hal.h>"
+ }
+
+ cdl_component CYGSEM_REDBOOT_ELF {
+ flavor bool
+ display "Include support for ELF file format"
+ default_value 1
+
+ cdl_option CYGOPT_REDBOOT_ELF_VIRTUAL_ADDRESS {
+ display "Use the virtual address in the ELF headers"
+ flavor bool
+ default_value 0
+ description "
+ The ELF headers contain both a virtual and a physical address
+ for where code/data should be loaded. By default the physical
+ address is used but sometimes it is necassary to use the
+ virtual address because of bugy toolchains"
+ }
+ }
+
+
+ cdl_interface CYGINT_REDBOOT_LOAD_METHOD {
+ display "Methods of loading images using redboot"
+ }
+
+ cdl_component CYGBLD_BUILD_REDBOOT {
+ display "Build Redboot ROM ELF image"
+ default_value 0
+ requires CYGPKG_INFRA
+ requires CYGPKG_ISOINFRA
+
+ requires ! CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
+ requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
+ requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
+ requires CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
+
+ requires CYGINT_ISO_STRING_MEMFUNCS
+ requires CYGINT_ISO_STRING_STRFUNCS
+ requires CYGINT_REDBOOT_LOAD_METHOD
+
+ cdl_option CYGBLD_BUILD_REDBOOT_WITH_GDB {
+ display "Include GDB support in RedBoot"
+ no_define
+ default_value 1
+ active_if CYGINT_HAL_DEBUG_GDB_STUBS
+ requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+ requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
+ description "
+ RedBoot normally includes support for the GDB debugging
+ protocols. This option allows this to be disabled which
+ may yield a substantial savings in terms of code and memory
+ usage by RedBoot."
+ }
+
+ cdl_option CYGBLD_BUILD_REDBOOT_WITH_THREADS {
+ display "Threads debugging support"
+ no_define
+ description "
+ Enabling this option will include special code in the
+ GDB stubs to support debugging of threaded programs. In
+ the case of eCos programs, this support allows GDB to
+ have complete access to the eCos threads in the
+ program."
+ active_if { CYG_HAL_STARTUP != "RAM" }
+ requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
+ }
+
+ cdl_option CYGDAT_REDBOOT_CUSTOM_VERSION {
+ display "Customized version string"
+ flavor booldata
+ default_value 0
+ description "
+ Use this option to define a customized version \"string\" for
+ RedBoot. Note: this value is only cosmetic, displayed by the
+ \"version\" command, but is useful for providing site specific
+ information about the RedBoot configuration."
+ }
+
+ cdl_option CYGNUM_REDBOOT_CMD_LINE_EDITING {
+ display "Enable command line editing"
+ flavor data
+ default_value 16
+ description "
+ If this option is non-zero, RedBoot will remember the
+ last N command lines. These lines may be reused.
+ Enabling this history will also enable rudimentary
+ editting of the lines themselves."
+ }
+
+ cdl_option CYGBLD_REDBOOT_CMD_LINE_HISTORY {
+ display "Enable history command and expansion"
+ requires { CYGNUM_REDBOOT_CMD_LINE_EDITING > 0 }
+ flavor bool
+ default_value 1
+ description "
+ Enabling this option will allow RedBoot to provide a
+ history command to list previous commands. Also enables
+ history expansion via '!' character similar to bash
+ shell."
+ }
+
+ cdl_option CYGBLD_REDBOOT_MAX_MEM_SEGMENTS {
+ display "Number of unique RAM segments on platform"
+ flavor data
+ default_value 1
+ description "
+ Change this option to be the number of memory segments which are
+ supported by the platform. If the value is greater than 1, then
+ a platform specific function must provide information about the
+ additional segments."
+ }
+
+ cdl_component CYGBLD_BUILD_REDBOOT_WITH_ZLIB {
+ display "Include support gzip/zlib decompression"
+ active_if CYGPKG_COMPRESS_ZLIB
+ default_value 1
+ implements CYGINT_COMPRESS_ZLIB_LOCAL_ALLOC
+ compile decompress.c
+
+ cdl_option CYGNUM_REDBOOT_LOAD_ZLIB_BUFFER {
+ display "Size of zlib decompression buffer"
+ flavor data
+ default_value 64
+ legal_values 5 to 256
+ description "
+ This is the size of the buffer filled with incoming data
+ during load before calls are made to the decompressor
+ function. For ethernet downloads this can be made bigger
+ (at the cost of memory), but for serial downloads on slow
+ processors it may be necessary to reduce the size to
+ avoid serial overruns. zlib appears to bail out if less
+ than five bytes are available initially so this is the
+ minimum."
+ }
+
+ cdl_option CYGPRI_REDBOOT_ZLIB_FLASH {
+ display "Support compression of Flash images"
+ active_if CYGPKG_REDBOOT_FLASH
+ active_if !CYGSEM_IO_FLASH_READ_INDIRECT
+ calculated 1
+ description "
+ This CDL indicates whether flash images can
+ be decompressed from gzip/zlib format into RAM."
+ }
+
+ cdl_option CYGBLD_BUILD_REDBOOT_WITH_GUNZIP {
+ display "Include GZIP uncompress command"
+ default_value 0
+ description "
+ Enable this option to include a 'gunzip' command
+ to uncompress GZIP compressed data."
+ compile -library=libextras.a gunzip.c
+ }
+ }
+
+ cdl_option CYGBLD_BUILD_REDBOOT_WITH_XYZMODEM {
+ display "Include support for xyzModem downloads"
+ doc ref/download-command.html
+ no_define
+ default_value 1
+ implements CYGINT_REDBOOT_LOAD_METHOD
+ compile -library=libextras.a xyzModem.c
+ }
+
+ cdl_option CYGBLD_BUILD_REDBOOT_WITH_CKSUM {
+ display "Include POSIX checksum command"
+ doc ref/cksum-command.html
+ default_value 1
+ compile -library=libextras.a cksum.c
+ }
+
+ cdl_option CYGBLD_BUILD_REDBOOT_WITH_MFILL {
+ display "Include memory fill command"
+ doc ref/mfill-command.html
+ default_value 1
+ compile -library=libextras.a mfill.c
+ }
+
+ cdl_option CYGBLD_BUILD_REDBOOT_WITH_MCMP {
+ display "Include memory compare command"
+ doc ref/mcmp-command.html
+ default_value 1
+ compile -library=libextras.a mcmp.c
+ }
+
+ cdl_option CYGBLD_BUILD_REDBOOT_WITH_MCOPY {
+ display "Include memory copy command"
+ doc ref/mcopy-command.html
+ default_value 1
+ compile -library=libextras.a mcopy.c
+ }
+
+ cdl_option CYGBLD_BUILD_REDBOOT_WITH_DUMP {
+ display "Include memory dump command"
+ doc ref/dump-command.html
+ default_value 1
+ compile -library=libextras.a dump.c
+ }
+
+ cdl_option CYGBLD_BUILD_REDBOOT_WITH_CACHES {
+ display "Include cache command"
+ doc ref/cache-command.html
+ default_value 1
+ compile -library=libextras.a caches.c
+ }
+
+ cdl_option CYGBLD_BUILD_REDBOOT_WITH_EXEC {
+ display "Include exec command"
+ doc ref/exec-command.html
+ default_value 1
+ # Implemented within the platform HAL
+ }
+
+ cdl_option CYGBLD_BUILD_REDBOOT_WITH_IOMEM {
+ display "Include I/O Memory commands 'iopeek' and 'iopoke'"
+ default_value 0
+ compile -library=libextras.a iomem.c
+ }
+
+ no_define
+ description "
+ This option enables the building of the Redboot ELF image.
+ The image may require further relocation or symbol
+ stripping before being converted to a binary image.
+ This is handled by a rule in the target CDL."
+
+
+ cdl_option CYGDBG_REDBOOT_TICK_GRANULARITY {
+ display "Granularity of timer/ticks"
+ flavor data
+ legal_values { 50 100 250 500 1000 }
+ default_value 250
+ description "
+ This option controls the granularity of the timers.
+ Faster CPUs can afford higher granularity (lower values)
+ which should give higher network performance since the stack
+ is purely polled."
+ }
+
+ compile main.c
+ compile misc_funs.c io.c parse.c ticks.c syscall.c alias.c
+ compile -library=libextras.a load.c
+
+ make -priority 320 {
+ <PREFIX>/bin/redboot.elf : $(PREFIX)/lib/target.ld $(PREFIX)/lib/vectors.o $(PREFIX)/lib/libtarget.a $(PREFIX)/lib/libextras.a
+ @sh -c "mkdir -p $(dir $@)"
+ $(CC) -c $(INCLUDE_PATH) $(CFLAGS) -o $(PREFIX)/lib/version.o $(REPOSITORY)/$(PACKAGE)/src/version.c
+ $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ $(PREFIX)/lib/version.o
+ }
+
+ cdl_component CYGPKG_REDBOOT_NETWORKING {
+ display "Redboot Networking"
+ flavor bool
+ active_if CYGPKG_IO_ETH_DRIVERS
+ default_value 1
+ implements CYGINT_REDBOOT_LOAD_METHOD
+ compile net/bootp.c net/udp.c net/ip.c net/pktbuf.c net/cksum.c
+ compile net/enet.c net/icmp.c net/tcp.c net/timers.c net/arp.c
+ compile net/inet_addr.c
+ compile -library=libextras.a net/ping.c net/net_io.c
+ description "This option includes networking support in RedBoot."
+ define_proc {
+ puts $::cdl_system_header "#define CYGNUM_HAL_VIRTUAL_VECTOR_AUX_CHANNELS 1"
+ }
+
+ cdl_option CYGDBG_REDBOOT_NET_DEBUG {
+ display "Print net debug information"
+ flavor bool
+ default_value 0
+ description "
+ This option is overriden by the configuration stored
+ in flash."
+ }
+
+ cdl_option CYGSEM_REDBOOT_NET_TFTP_DOWNLOAD {
+ display "Support TFTP for download"
+ flavor bool
+ default_value 1
+ compile -library=libextras.a net/tftp_client.c
+ description "
+ This option enables the use of the TFTP protocol for
+ download"
+ }
+
+ cdl_option CYGSEM_REDBOOT_NET_HTTP_DOWNLOAD {
+ display "Support HTTP for download"
+ flavor bool
+ default_value 1
+ compile -library=libextras.a net/http_client.c
+ description "
+ This option enables the use of the HTTP protocol for
+ download"
+ }
+
+ cdl_component CYGDAT_REDBOOT_DEFAULT_IP_ADDR {
+ display "Default IP address"
+ flavor booldata
+ default_value CYGSEM_REDBOOT_FLASH_CONFIG ? 0 : \
+ { "0, 0, 0, 0" }
+ description "
+ This IP address is the default used by RedBoot if
+ a BOOTP/DHCP server does not respond. The numbers
+ should be separated by *commas*, and not dots. If
+ an IP address is configured into the Flash
+ configuration, that will be used in preference."
+
+ cdl_option CYGSEM_REDBOOT_DEFAULT_NO_BOOTP {
+ display "Do not try to use BOOTP"
+ flavor bool
+ default_value 0
+ description "
+ By default Redboot tries to use BOOTP to get an IP
+ address. If there's no BOOTP server on your network
+ use this option to avoid to wait until the
+ timeout. This option is overriden by the
+ configuration stored in flash."
+ }
+ cdl_option CYGDAT_REDBOOT_DEFAULT_BOOTP_SERVER_IP_ADDR {
+ display "Default bootp server"
+ flavor booldata
+ default_value CYGSEM_REDBOOT_FLASH_CONFIG ? 0 : \
+ { "0, 0, 0, 0" }
+ description "
+ This IP address is the default server
+ address used by RedBoot if a BOOTP/DHCP
+ server does not respond. The numbers should
+ be separated by *commas*, and not dots. If
+ an IP address is configured into the Flash
+ configuration, that will be used in
+ preference."
+ }
+ }
+
+ cdl_component CYGSEM_REDBOOT_NETWORKING_DHCP {
+ display "Use DHCP to get IP information"
+ flavor bool
+ default_value 1
+ description "
+ Use DHCP protocol to obtain pertinent IP addresses, such
+ as the client, server, gateway, etc."
+ }
+
+ cdl_component CYGSEM_REDBOOT_NETWORKING_USE_GATEWAY {
+ display "Use a gateway for non-local IP traffic"
+ flavor bool
+ default_value 1
+ requires CYGSEM_REDBOOT_NETWORKING_DHCP
+ description "
+ Enabling this option will allow the RedBoot networking
+ stack to use a \[single\] gateway to reach a non-local
+ IP address. If disabled, RedBoot will only be able to
+ reach nodes on the same subnet."
+
+ cdl_component CYGDAT_REDBOOT_DEFAULT_GATEWAY_IP_ADDR {
+ display "Default gateway IP address"
+ flavor booldata
+ default_value CYGSEM_REDBOOT_FLASH_CONFIG ? 0 : \
+ { "0, 0, 0, 0" }
+ description "
+ This IP address is the default used by RedBoot
+ if a BOOTP/DHCP server does not respond. The
+ numbers should be separated by *commas*, and
+ not dots. If an IP address is configured into
+ the Flash configuration, that will be used in
+ preference."
+ }
+
+ cdl_component CYGDAT_REDBOOT_DEFAULT_IP_ADDR_MASK {
+ display "Default IP address mask"
+ flavor booldata
+ default_value CYGSEM_REDBOOT_FLASH_CONFIG ? 0 : \
+ { "255, 255, 255, 0" }
+ description "
+ This IP address mask is the default used by
+ RedBoot if a BOOTP/DHCP server does not
+ respond. The numbers should be separated by
+ *commas*, and not dots. If an IP address is
+ configured into the Flash configuration, that
+ will be used in preference."
+ }
+ }
+
+ cdl_option CYGNUM_REDBOOT_NETWORKING_TCP_PORT {
+ display "TCP port to listen for incoming connections"
+ flavor data
+ default_value 9000
+ description "
+ RedBoot will 'listen' on this port for incoming TCP
+ connections. This allows outside connections to be made
+ to the platform, either for GDB or RedBoot commands."
+ }
+
+ cdl_option CYGNUM_REDBOOT_NETWORKING_MAX_PKTBUF {
+ display "Number of \[network\] packet buffers"
+ flavor data
+ default_value 4
+ legal_values 3 to 8
+ description "
+ RedBoot may need to buffer network data to support
+ various connections. This option allows control
+ over the number of such buffered packets, and in
+ turn, controls the amount of memory used by RedBoot
+ (which is not available to user applications).
+ Each packet buffer takes up about 1514 bytes.
+ Note: there is little need to make this larger than
+ the default."
+ }
+
+ cdl_component CYGPKG_REDBOOT_NETWORKING_DNS {
+ display "DNS support"
+ default_value 1
+ active_if CYGPKG_NS_DNS
+ requires !CYGPKG_NS_DNS_BUILD
+ compile net/dns.c
+ description "
+ When this option is enabled, RedBoot will be built with
+ support for DNS, allowing use of hostnames on the command
+ line."
+
+ cdl_option CYGPKG_REDBOOT_NETWORKING_DNS_IP {
+ display "Default DNS IP"
+ flavor data
+ active_if !CYGSEM_REDBOOT_FLASH_CONFIG
+ default_value { "0.0.0.0" }
+ description "
+ This option sets the IP of the default DNS. The IP can be
+ changed at runtime as well."
+ }
+
+ cdl_option CYGNUM_REDBOOT_NETWORKING_DNS_TIMEOUT {
+ display "Timeout in DNS lookup"
+ flavor data
+ default_value 10
+ description "
+ This option sets the timeout used when looking up an
+ address via the DNS. Default is 10 seconds."
+ }
+
+ }
+
+ cdl_option CYGDAT_REDBOOT_DEFAULT_NETWORK_DEVICE {
+ display "Default network device driver"
+ flavor data
+ active_if { CYGSEM_REDBOOT_FLASH_CONFIG && CYGHWR_NET_DRIVERS > 1 }
+ default_value { "\"\"" }
+ description "
+ This is the name of the default network device to use."
+ }
+
+ cdl_option CYGSEM_REDBOOT_NETWORK_INIT_ONE_DEVICE {
+ display "Initialize only one net device"
+ flavor bool
+ active_if { CYGHWR_NET_DRIVERS > 1 }
+ default_value 0
+ description "
+ This option tells RedBoot to stop initializing network
+ devices when it finds the first device which is
+ successfully initialized. The default behavior causes
+ all network devices to be initialized."
+ }
+ }
+
+ cdl_option CYGPKG_REDBOOT_ANY_CONSOLE {
+ display "Let RedBoot use any I/O channel for its console."
+ flavor bool
+ default_value 1
+ description "
+ If this option is enabled then RedBoot will attempt to use all
+ defined serial I/O channels for its console device. Once input
+ arrives at one of these channels then the console will use only
+ that port."
+ }
+
+ cdl_option CYGSEM_REDBOOT_VARIABLE_BAUD_RATE {
+ display "Let RedBoot adjust the baud off the serial console."
+ flavor bool
+ default_value 1
+ active_if CYGINT_HAL_VIRTUAL_VECTOR_COMM_BAUD_SUPPORT
+ description "
+ If this option is enabled then RedBoot will support commands
+ to set and query the baud rate on the selected console."
+ }
+
+ cdl_option CYGSEM_REDBOOT_PLF_STARTUP {
+ display "Run a platform specific startup function."
+ flavor bool
+ default_value 0
+ description "
+ If this option is enabled then RedBoot will execute a platform
+ specific startup function before entering into its command line
+ processing. This allows the platform to perform any special
+ setups before RedBoot actually starts running. Note: the entire
+ RedBoot environment will already be initialized at this point."
+ }
+
+ cdl_option CYGSEM_REDBOOT_PLF_ESA_VALIDATE {
+ display "Run a platform specific ESA validation function."
+ flavor bool
+ default_value 0
+ description "
+ If this option is enabled then RedBoot will execute a platform
+ specific function to validate an ethernet ESA. This would be
+ useful if the address must conform to standards set by the
+ hardware manufacturer, etc."
+ }
+
+ cdl_option CYGPKG_REDBOOT_MAX_CMD_LINE {
+ display "Maximum command line length"
+ flavor data
+ default_value 256
+ description "
+ This option allows control over how long the CLI command line
+ should be. This space will be allocated statically
+ rather than from RedBoot's stack."
+ }
+
+ cdl_option CYGNUM_REDBOOT_CLI_IDLE_TIMEOUT {
+ display "Command processing idle timeout (ms)"
+ flavor data
+ default_value 10
+ description "
+ This option controls the timeout period before the
+ command processing is considered 'idle'. Making this
+ number smaller will cause idle processing to take place
+ more often, etc. The default value of 10ms is a reasonable
+ tradeoff between responsiveness and overhead."
+ }
+
+ cdl_option CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS {
+ display "Validate RAM addresses during load"
+ flavor bool
+ default_value 1
+ description "
+
+ This option controls whether or not RedBoot will make
+ sure that memory being used by the \"load\" command is
+ in fact in user RAM. Leaving the option enabled makes
+ for a safer environment, but this check may not be valid
+ on all platforms, thus the ability to disable it.
+ ** Disable this only with great care **"
+ }
+
+ cdl_component CYGPKG_REDBOOT_FLASH {
+ display "Allow RedBoot to support FLASH programming"
+ flavor bool
+ default_value 1
+ active_if CYGHWR_IO_FLASH_DEVICE
+ description "
+ If this option is enabled then RedBoot will provide commands
+ to manage images in FLASH memory. These images can be loaded
+ into memory for execution or executed in place."
+ compile -library=libextras.a flash.c
+
+ cdl_option CYGOPT_REDBOOT_FLASH_BYTEORDER {
+ display "Byte order used to store info in flash."
+ flavor data
+ default_value { "NATURAL" }
+ legal_values {"NATURAL" "MSBFIRST" "LSBFIRST" }
+ description "
+ This option controls the byte ordering used to store
+ the FIS directory info and flash config info."
+ }
+
+ cdl_option CYGOPT_REDBOOT_FIS {
+ display "RedBoot Flash Image System support"
+ default_value 1
+ doc ref/flash-image-system.html
+ description "
+ This option enables the Flash Image System commands
+ and support within RedBoot. If disabled, simple Flash
+ access commands such as \"fis write\" will still exist.
+ This option would be disabled for targets that need simple
+ FLASH manipulation, but do not have the need or space for
+ complete image management."
+ }
+
+ cdl_option CYGDAT_REDBOOT_FIS_MAX_FREE_CHUNKS {
+ display "Max number of chunks of free space to manage"
+ flavor booldata
+ default_value 32
+ description "
+
+ If this option is defined then \"fis free\" will
+ rely on the FIS directory to determine what space is
+ free within the FLASH. This option controls the
+ maximum number of free segment which can be handled
+ (typically this number is small). If this option is
+ not enabled, the the archaic behaviour of actually
+ scanning the FLASH for erased sectors (unreliable)
+ will be used to determine what's free and what's
+ not."
+ }
+
+ cdl_component CYGPKG_REDBOOT_FIS_CONTENTS {
+ display "Flash Image System default directory contents"
+ active_if CYGOPT_REDBOOT_FIS
+ calculated 1
+
+ cdl_option CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK {
+ display "Flash block containing the Directory"
+ flavor data
+ default_value (-1)
+ description "
+ Which block of flash should hold the directory
+ information. Positive numbers are absolute block
+ numbers. Negative block numbers count backwards
+ from the last block. eg 2 means block 2, -2
+ means the last but one block."
+ }
+
+ cdl_option CYGOPT_REDBOOT_FIS_RESERVED_BASE {
+ display "Pseudo-file to describe reserved area"
+ active_if { 0 != CYGNUM_REDBOOT_FLASH_RESERVED_BASE }
+ default_value 1
+ description "
+ If an area of FLASH is reserved, it is informative to
+ have a fis entry describing it. This option controls
+ creation of such an entry by default in the fis init
+ command."
+ }
+
+ cdl_option CYGOPT_REDBOOT_FIS_REDBOOT {
+ display "File to describe RedBoot boot image"
+ default_value 1
+ description "
+ Normally a ROM-startup RedBoot image is first in the
+ FLASH, and the system boots using that image. This
+ option controls creation of an entry describing it in
+ the fis init command. It might be disabled if a
+ platform has an immutable boot image of its own, where
+ we use a POST-startup RedBoot instead, which performs
+ less board initialization."
+ }
+
+ cdl_component CYGOPT_REDBOOT_FIS_REDBOOT_POST {
+ display "File to describe RedBoot POST-compatible image"
+ default_value !CYGOPT_REDBOOT_FIS_REDBOOT
+ description "
+ This option controls creation of an entry describing a
+ POST-startup RedBoot image in the fis init command.
+ Not all platforms support POST-startup. A platform
+ might have both for testing purposes, where the
+ eventual user would substitute their own POST code for
+ the initial ROM-startup RedBoot, and then jump to the
+ POST-compatible RedBoot immediately following."
+ cdl_option CYGNUM_REDBOOT_FIS_REDBOOT_POST_OFFSET {
+ display "Offset of POST image from FLASH start"
+ flavor booldata
+ default_value 0
+ requires { CYGNUM_REDBOOT_FIS_REDBOOT_POST_OFFSET >= \
+ CYGBLD_REDBOOT_FLASH_BOOT_OFFSET }
+ description "
+ This option specifies the offset for a POST image from
+ the start of FLASH. If unset, then the fis entry
+ describing the POST image will be placed where
+ convenient."
+ }
+ }
+
+ cdl_option CYGOPT_REDBOOT_FIS_REDBOOT_BACKUP {
+ display "File to describe RedBoot backup image"
+ default_value 0
+ description "
+ This option controls creation of an entry describing a
+ backup RedBoot image in the fis init command.
+ Conventionally a RAM-startup RedBoot image is kept
+ under this name for use in updating the ROM-based
+ RedBoot that boots the board."
+ }
+
+ cdl_option CYGOPT_REDBOOT_FIS_DIRECTORY_ARM_SIB_ID {
+ display "Include ARM SIB ID in FIS"
+ default_value 0
+ description "
+ If set, this option will cause the last 5 words of
+ the FIS to include the special ID needed for the
+ flash to be recognized as a reserved area for RedBoot
+ by an ARM BootRom monitor."
+ }
+
+ cdl_option CYGNUM_REDBOOT_FIS_DIRECTORY_ENTRY_SIZE {
+ display "Size of FIS directory entry"
+ flavor data
+ default_value 256
+ description "
+ The FIS directory is limited to one single flash
+ sector. If your flash has tiny sectors, you may wish
+ to reduce this value in order to get more slots in
+ the FIS directory."
+ }
+
+ cdl_option CYGNUM_REDBOOT_FIS_DIRECTORY_ENTRY_COUNT {
+ display "Number of FIS directory entries"
+ flavor data
+ default_value 8
+ description "
+ The FIS directory normally occupies a single flash
+ sector. Adjusting this value can allow for more than
+ one flash sector to be used, which is useful if your
+ sectors are very small."
+ }
+
+ cdl_option CYGBLD_REDBOOT_MIN_IMAGE_SIZE {
+ display "Maximum RedBoot image size"
+ flavor data
+ default_value { CYGOPT_REDBOOT_FIS_REDBOOT ? 0x20000 : 0 }
+ description "
+ This option controls the maximum length reserved
+ for the RedBoot boot image in the FIS table.
+ This should be a multiple of the flash's erase
+ block size."
+ }
+
+ cdl_option CYGBLD_REDBOOT_FLASH_BOOT_OFFSET {
+ display "Offset from start of FLASH to RedBoot boot image"
+ flavor data
+ default_value CYGNUM_REDBOOT_FLASH_RESERVED_BASE
+ requires { CYGNUM_REDBOOT_FLASH_RESERVED_BASE <= \
+ CYGBLD_REDBOOT_FLASH_BOOT_OFFSET }
+ description "
+ This option controls where the RedBoot boot image is
+ located relative to the start of FLASH."
+ }
+
+ cdl_option CYGNUM_REDBOOT_FLASH_RESERVED_BASE {
+ display "Size of reserved area at start of FLASH"
+ flavor data
+ default_value 0
+ description "
+ This option reserves an area at the start of
+ FLASH where RedBoot will never interfere; it is
+ expected that this area contains
+ (non-RedBoot-based) POST code or some other boot
+ monitor that executes before RedBoot."
+ }
+ }
+
+ cdl_option CYGSEM_REDBOOT_FLASH_LOCK_SPECIAL {
+ display "Keep all RedBoot FLASH data blocks locked."
+ flavor bool
+ default_value 1
+ active_if { CYGHWR_IO_FLASH_BLOCK_LOCKING != 0 }
+ description "
+ When this option is enabled, RedBoot will keep configuration
+ data and the FIS directory blocks implicitly locked. While
+ this is somewhat safer, it does add overhead during updates."
+ }
+
+ cdl_option CYGSEM_REDBOOT_FIS_CRC_CHECK {
+ display "Use CRC checksums on FIS images."
+ flavor bool
+ default_value 1
+ description "
+ When this option is enabled, RedBoot will use CRC checksums
+ when reading and writing flash images."
+ }
+
+ cdl_interface CYGINT_REDBOOT_ARM_FLASH_SIB_SUPPORTED {
+ display "ARM FLASH drivers support SIB flash block structure"
+ active_if CYGPKG_HAL_ARM
+ description "This interface is implemented by a flash driver
+ to indicate that it supports the ARM SIB flash
+ block structure"
+ }
+
+ cdl_option CYGHWR_REDBOOT_ARM_FLASH_SIB {
+ display "Use ARM SIB flash block structure"
+ flavor bool
+ active_if CYGINT_REDBOOT_ARM_FLASH_SIB_SUPPORTED
+ default_value 1
+ description "
+ This option is used to interpret ARM Flash System
+ information blocks."
+ }
+ }
+
+ cdl_component CYGSEM_REDBOOT_FLASH_CONFIG {
+ display "Keep RedBoot configuration data in FLASH"
+ flavor bool
+ default_value { CYGPKG_IO_FLASH != 0 }
+ compile fconfig.c
+ description "
+ When this option is enabled, RedBoot will keep configuration
+ data in a separate block of FLASH memory. This data will
+ include such items as the node IP address or startup scripts."
+
+ cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_SIZE {
+ display "Length of configuration data in FLASH"
+ flavor data
+ default_value 4096
+ description "
+ This option is used to control the amount of memory and FLASH
+ to be used for configuration options (persistent storage)."
+ }
+
+ cdl_option CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA {
+ display "Style of media used for persistent data storage"
+ flavor data
+ legal_values { "FLASH" "EEPROM" }
+ default_value { "FLASH" }
+ description "
+ Persistent data storage can either be held in 'norma' FLASH
+ or some other device (represented by the 'EEPROM' choice).
+ The different styles utilize different access methods."
+ }
+
+ cdl_option CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG {
+ display "Merged config data and FIS directory"
+ flavor bool
+ active_if { CYGOPT_REDBOOT_FIS && \
+ (CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA == "FLASH") }
+ default_value 1
+ description "
+ If this option is set, then the FIS directory and FLASH
+ configuration database will be stored in the same physical
+ FLASH block."
+ }
+
+ cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK {
+ display "Which block of flash to use"
+ flavor data
+ default_value (-2)
+ description "
+ Which block of flash should hold the configuration
+ information. Positive numbers are absolute block numbers.
+ Negative block numbers count backwards from the last block.
+ eg 2 means block 2, -2 means the last but one block."
+ }
+
+ cdl_option CYGSEM_REDBOOT_FLASH_ALIASES {
+ display "Support simple macros/aliases in FLASH"
+ flavor bool
+ default_value 1
+ description "
+ This option is used to allow support for simple text-based
+ macros (aliases). These aliases are kept in the FLASH
+ configuration data (persistent storage)."
+ }
+
+ cdl_option CYGNUM_REDBOOT_FLASH_STRING_SIZE {
+ display "Length of strings in FLASH configuration data"
+ flavor data
+ default_value 128
+ description "
+ This option is used to control the amount of memory
+ and FLASH to be used for string configuration
+ options (persistent storage)."
+ }
+
+ cdl_option CYGNUM_REDBOOT_FLASH_SCRIPT_SIZE {
+ display "Length of configuration script(s) in FLASH"
+ flavor data
+ default_value 512
+ description "
+ This option is used to control the amount of memory and
+ FLASH to be used for configuration options (persistent
+ storage)."
+ }
+
+ cdl_option CYGSEM_REDBOOT_FLASH_CONFIG_READONLY_FALLBACK {
+ display "Fallback to read-only FLASH configuration"
+ flavor bool
+ default_value { (CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA == "FLASH") }
+ description "
+ This option will cause the configuration information to
+ revert to the readonly information stored in the FLASH.
+ The option only takes effect after
+ 1) the config_ok flag has been set to be true,
+ indicating that at one time the copy in RAM was valid;
+ and
+ 2) the information in RAM has been verified to be invalid"
+
+ }
+ }
+
+ cdl_component CYGPKG_REDBOOT_FILEIO {
+ display "Allow RedBoot to support fileio"
+ flavor bool
+ default_value 1
+ active_if CYGPKG_IO_FILEIO
+ description "
+ If this option is enabled then RedBoot will provide commands
+ to load files from fileio file systems such as JFFS2."
+ compile -library=libextras.a fs/fileio.c
+
+ cdl_option CYGBLD_REDBOOT_FILEIO_WITH_LS {
+ display "Include an ls command"
+ flavor bool
+ default_value 1
+ description "
+ If this option is enabled a simple ls command will be
+ included in redboot so the contents of a directory
+ can be listed"
+ }
+ }
+
+ cdl_component CYGPKG_REDBOOT_DISK {
+ display "Allow RedBoot to support disks"
+ flavor bool
+ default_value 1
+ description "
+ If this option is enabled then RedBoot will provide commands
+ to load disk files."
+
+ cdl_option CYGSEM_REDBOOT_DISK {
+ display "Include Redboot commands for disk access"
+ default_value { CYGINT_REDBOOT_DISK_DRIVERS != 0 }
+ compile -library=libextras.a fs/disk.c
+ }
+
+ cdl_interface CYGINT_REDBOOT_DISK_DRIVERS {
+ display "Hardware drivers for disk-type devices"
+ }
+
+ cdl_option CYGNUM_REDBOOT_MAX_DISKS {
+ display "Maximum number of supported disks"
+ flavor data
+ default_value 4
+ description "
+ This option controls the number of disks supported by
+ RedBoot."
+ }
+
+ cdl_option CYGNUM_REDBOOT_MAX_PARTITIONS {
+ display "Maximum number of partitions per disk"
+ flavor data
+ default_value 8
+ description "
+ This option controls the maximum number of supported
+ partitions per disk."
+ }
+
+ cdl_component CYGSEM_REDBOOT_DISK_IDE {
+ display "Support IDE disks."
+ flavor bool
+ default_value 1
+ active_if { CYGINT_HAL_PLF_IF_IDE != 0 }
+ description "
+ When this option is enabled, RedBoot will support IDE disks."
+ compile -library=libextras.a fs/ide.c
+ implements CYGINT_REDBOOT_DISK_DRIVERS
+
+ cdl_option CYGSEM_REDBOOT_DISK_IDE_VMWARE {
+ display "Work with VMware virtual disks"
+ flavor bool
+ default_value 0
+ description "
+ This option controls the disk driver behavior at
+ ide-init"
+ }
+ }
+
+ cdl_component CYGSEM_REDBOOT_DISK_EXT2FS {
+ display "Support Linux second extended filesystems."
+ flavor bool
+ default_value 1
+ description "
+ When this option is enabled, RedBoot will support IDE disks."
+ compile -library=libextras.a fs/e2fs.c
+ }
+
+ cdl_component CYGSEM_REDBOOT_DISK_ISO9660 {
+ display "Support ISO9660 filesystems."
+ flavor bool
+ calculated 0
+ description "
+ When this option is enabled, RedBoot will support ISO9660
+ filesystems."
+ compile -library=libextras.a fs/iso9660fs.c
+ }
+ }
+
+ cdl_component CYGPKG_REDBOOT_BOOT_SCRIPT {
+ display "Boot scripting"
+ doc ref/persistent-state-flash.html
+ flavor none
+ no_define
+ description "
+ This contains options related to RedBoot's boot script
+ functionality."
+
+ cdl_option CYGFUN_REDBOOT_BOOT_SCRIPT {
+ display "Boot scripting enabled"
+ flavor bool
+ active_if { CYGDAT_REDBOOT_DEFAULT_BOOT_SCRIPT || \
+ CYGSEM_REDBOOT_FLASH_CONFIG }
+ calculated 1
+ description "
+ This option controls whether RedBoot boot script
+ functionality is enabled."
+ }
+
+ cdl_option CYGDAT_REDBOOT_DEFAULT_BOOT_SCRIPT {
+ display "Use default RedBoot boot script"
+ flavor booldata
+ default_value 0
+ description "
+ If enabled, this option will tell RedBoot to use the
+ value of this option as a default boot script."
+ }
+
+ cdl_option CYGNUM_REDBOOT_BOOT_SCRIPT_TIMEOUT_RESOLUTION {
+ display "Resolution (in ms) for script timeout value."
+ flavor data
+ default_value 1000
+ description "
+ This option controls the resolution of the script
+ timeout. The value is specified in milliseconds
+ (ms), thus to have the script timeout be defined in
+ terms of tenths of seconds, use 100."
+ }
+
+ cdl_option CYGNUM_REDBOOT_BOOT_SCRIPT_DEFAULT_TIMEOUT {
+ display "Script default timeout value"
+ flavor data
+ default_value 10
+ description "
+ This option is used to set the default timeout for startup
+ scripts, when they are enabled."
+ }
+ }
+
+ cdl_option CYGSEM_REDBOOT_RTC {
+ display "Support RTC for time & date functions"
+ active_if { CYGPKG_IO_WALLCLOCK }
+ default_value 1
+ description "
+ When this option is enabled, RedBoot will support commands to
+ query and set the real time clock (time and date)"
+ compile -library=libextras.a time_date.cxx
+ }
+
+ cdl_option CYGPRI_REDBOOT_ROM_MONITOR {
+ display "Behave like a ROM monitor"
+ active_if { CYG_HAL_STARTUP == "ROM" || \
+ CYG_HAL_STARTUP == "ROMRAM" }
+ requires CYGSEM_HAL_ROM_MONITOR
+ calculated 1
+ no_define
+ description "
+ Enabling this option will allow RedBoot to provide ROM
+ monitor-style services to programs which it executes."
+ }
+
+ cdl_component CYGSEM_REDBOOT_BSP_SYSCALLS {
+ display "Allow RedBoot to handle GNUPro application 'syscalls'."
+ flavor bool
+ default_value 0
+ description "
+ If this option is enabled then RedBoot will install a
+ syscall handler to support debugging of applications
+ based on GNUPro newlib/bsp."
+
+ cdl_option CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF {
+ display "Support additional syscalls for 'gprof' profiling"
+ flavor bool
+ default_value 1
+ active_if { 0 < CYGINT_REDBOOT_BSP_SYSCALLS_GPROF_SUPPORT }
+ description "
+ Support additional syscalls to support a periodic callback
+ function for histogram-style profiling, and an enquire/set
+ of the tick rate.
+ The application must use the GNUPro newlib facilities
+ to set this up."
+ }
+
+ cdl_interface CYGINT_REDBOOT_BSP_SYSCALLS_GPROF_SUPPORT {
+ display "Does the HAL support 'gprof' profiling?"
+ no_define
+ }
+
+ cdl_option CYGOPT_REDBOOT_BSP_SYSCALLS_EXIT_WITHOUT_TRAP {
+ display "Do not raise SIGTRAP when program exits"
+ default_value 0
+ description "
+ For some (single shot) newlib based programs,
+ exiting and returning a termination status may be
+ the normal expected behavior."
+ }
+ }
+
+ cdl_component CYGOPT_REDBOOT_FIS_ZLIB_COMMON_BUFFER {
+ display "Use a common buffer for Zlib and FIS"
+ flavor bool
+ active_if { CYGBLD_BUILD_REDBOOT_WITH_ZLIB && \
+ CYGOPT_REDBOOT_FIS }
+ default_value 0
+ description "
+ Use a common memory buffer for both the zlib workspace
+ and FIS directory operations. This can save a substantial
+ amount of RAM, especially when flash sectors are large."
+
+ cdl_option CYGNUM_REDBOOT_FIS_ZLIB_COMMON_BUFFER_SIZE {
+ display "Size of Zlib/FIS common buffer"
+ flavor data
+ default_value 0xc000
+ legal_values 0x4000 to 0x80000000
+ description "
+ Size of common buffer to allocate. Must be at least the
+ size of one flash sector."
+ }
+ }
+ cdl_option CYGNUM_REDBOOT_GETC_BUFFER {
+ display "Buffer size in getc when loading images"
+ flavor data
+ default_value { CYGPKG_REDBOOT_FILEIO ? 4096 : 256 }
+ description "
+ When loading images a buffer is used between redboot and the
+ underlying storage medium, eg a filesystem, or a socket etc.
+ The size of this buffer can have a big impart on load speed."
+ }
+
+ }
+}
+
+# EOF redboot.cdl
diff --git a/cesar/ecos/packages/redboot/current/doc/makefile b/cesar/ecos/packages/redboot/current/doc/makefile
new file mode 100644
index 0000000000..326b5cc9e4
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/doc/makefile
@@ -0,0 +1,53 @@
+#=============================================================================
+#
+# makefile
+#
+# For building the eCos RedBoot docs
+#
+#=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+# -------------------------------------------
+# This file is part of eCos, the Embedded Configurable Operating System.
+# Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+# Copyright (C) 2004 eCosCentric Limited
+#
+# eCos is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 or (at your option) any later version.
+#
+# eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with eCos; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+#
+# As a special exception, if other files instantiate templates or use macros
+# or inline functions from this file, or you compile this file and link it
+# with other works to produce a work based on this file, this file does not
+# by itself cause the resulting work to be covered by the GNU General Public
+# License. However the source code for this file must still be made available
+# in accordance with section (3) of the GNU General Public License.
+#
+# This exception does not invalidate any other reasons why a work based on
+# this file might be covered by the GNU General Public License.
+# -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#=============================================================================
+#####DESCRIPTIONBEGIN####
+#
+# Author(s): bartv, jlarmour
+# Date: 2001-01-11
+#####DESCRIPTIONEND####
+#=============================================================================
+
+TOPLEVEL := ../../..
+MAIN_SGML := redboot_main.sgml
+MAIN_HTML := redboot-guide.html
+MAIN_PDF := redboot-guide.pdf
+OTHER_SGML := redboot_cmds.sgml redboot_rebuilding.sgml redboot_installing.sgml
+PICTURES :=
+
+include $(TOPLEVEL)/pkgconf/rules.doc
diff --git a/cesar/ecos/packages/redboot/current/doc/redboot.sgml b/cesar/ecos/packages/redboot/current/doc/redboot.sgml
new file mode 100644
index 0000000000..0637728392
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/doc/redboot.sgml
@@ -0,0 +1,736 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- redboot.sgml -->
+<!-- -->
+<!-- RedBoot package -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<!-- uncomment to build this documentation as a DocBook part
+<part id="redboot"><beginpage>
+<title>RedBoot&trade; User's Guide</title>
+-->
+<toc id="Getting-Started-with-Redboot2"></toc>
+<chapter id="Getting-Started-with-RedBoot">
+<title>Getting Started with RedBoot</title>
+<para><indexterm><primary>Red Boot</primary><secondary>getting started</secondary>
+</indexterm>RedBoot&trade; is an acronym for "Red Hat Embedded Debug and Bootstrap",
+and is the standard embedded system debug/bootstrap environment from Red Hat,
+replacing the previous generation of debug firmware: <indexterm><primary>CygMon</primary>
+</indexterm>CygMon and <indexterm><primary>GDB stubs</primary></indexterm>GDB
+stubs. It provides a complete bootstrap environment for a range of embedded
+operating systems, such as embedded Linux&trade; and eCos&trade;, and includes facilities
+such as network downloading and debugging. It also provides a simple flash
+file system for boot images.</para>
+<para>RedBoot provides a wide set of tools for downloading and executing programs
+on embedded target systems, as well as tools for manipulating the target system's
+environment. It can be used for both product development (debug support) and
+for end product deployment (flash and network booting).</para>
+<para>Here are some highlights of <indexterm><primary>RedBoot's capabilities
+</primary></indexterm>RedBoot&rsquo;s capabilities: </para>
+<itemizedlist>
+<listitem><para>Boot scripting support</para>
+</listitem>
+<listitem><para>Simple command line interface for RedBoot configuration and
+management, accessible via serial (terminal) or Ethernet (telnet) </para>
+</listitem>
+<listitem><para>Integrated GDB stubs for connection to a host-based debugger
+via serial or ethernet. (Ethernet connectivity is limited to local network
+only)</para>
+</listitem>
+<listitem><para>Attribute Configuration - user control of aspects such as
+system time and date (if applicable), default Flash image to boot from, default
+failsafe image, static IP address, etc.</para>
+</listitem>
+<listitem><para>Configurable and extensible, specifically adapted to the target
+environment </para>
+</listitem>
+<listitem><para>Network bootstrap support including setup and download, via
+BOOTP, DHCP and TFTP</para>
+</listitem>
+<listitem><para>X/YModem support for image download via serial</para>
+</listitem>
+<listitem><para>Power On Self Test</para>
+</listitem>
+</itemizedlist>
+<para>Although RedBoot is derived from eCos, it may be used as a generalized
+system debug and bootstrap control software for any embedded system and any
+operating system. For example, with appropriate additions, RedBoot could replace
+the commonly used BIOS of PC (and certain other) architectures. Red Hat is
+currently installing RedBoot on all embedded platforms as a standard practice,
+and RedBoot is now generally included as part of all Red Hat Embedded Linux
+and eCos ports. Users who specifically wish to use RedBoot with the eCos operating
+system should refer to the <emphasis>Getting Started with eCos</emphasis>
+document, which provides information about the portability and extendability
+of RedBoot in an eCos environment.</para>
+<sect1 id="redboot-on-the-web">
+<title>More information about RedBoot on the web</title>
+<para>The <ulink url="http://sources.redhat.com/redboot/">RedBoot Net
+Distribution web site</ulink> contains downloadable sources and documentation
+for all publically released targets, including the latest features and updates.
+</para>
+</sect1>
+<sect1 id="installing-redboot">
+<title>Installing RedBoot</title>
+<para><indexterm><primary>installing RedBoot</primary><secondary>general procedures
+</secondary></indexterm><indexterm><primary>RedBoot installation</primary>
+<secondary>general procedures</secondary></indexterm>To install the RedBoot
+package, follow the procedures detailed in the accompanying README. </para>
+<para>Although there are other possible configurations, RedBoot is usually
+run from the target platform&rsquo;s flash boot sector or boot ROM, and is
+designed to run when your system is initially powered on. The method used
+to install the RedBoot image into non-volatile storage varies from platform
+to platform. In general, it requires that the image be programmed into flash
+in situ or programmed into the flash or ROM using a device programmer. In
+some cases this will be done at manufacturing time; the platform being delivered
+with RedBoot already in place. In other cases, you will have to program RedBoot
+into the appropriate device(s) yourself. Installing to flash in situ may require
+special cabling or interface devices and software provided by the board manufacturer.
+The details of this installation process for a given platform will be found
+in Installation and Testing. Once installed, user-specific configuration options
+may be applied, using the <command>fconfig</command> command,
+providing that persistent data storage in flash is present in the relevant
+RedBoot version. See <xref linkend="Configuring-the-RedBoot-Environment">
+for details.</para>
+</sect1>
+<sect1 id="user-interface">
+<title>User Interface</title>
+<para><indexterm><primary>user interface</primary></indexterm><indexterm>
+<primary>ui</primary></indexterm><indexterm><primary>cli</primary></indexterm>RedBoot
+provides a command line user interface (CLI). At the minimum, this interface
+is normally available on a serial port on the platform. If more than one serial
+interface is available, RedBoot is normally configured to try to use any one
+of the ports for the CLI. Once command input has been received on one port,
+that port is used exclusively until the board is reset or the channel
+is manually changed by the
+user. If the platform has networking
+capabilities, the RedBoot CLI is also accessible using the <computeroutput>
+telnet</computeroutput> access protocol. By default, RedBoot runs <computeroutput><indexterm>
+<primary>telnet</primary></indexterm>telnet</computeroutput> on port TCP/9000,
+but this is configurable and/or settable by the user. </para>
+<para>RedBoot also contains a set of <indexterm><primary>GDB stubs</primary>
+</indexterm>GDB "stubs", consisting of code which supports the GDB remote
+protocol. GDB stub mode is automatically invoked when the '$' character appears
+anywhere on a command line unless escaped using the '\' character.
+The platform will remain in GDB
+stub mode until explicitly disconnected (via the GDB protocol). The GDB stub
+mode is available regardless of the connection method; either serial or network.
+Note that if a GDB connection is made via the network, then special care must
+be taken to preserve that connection when running user code. eCos contains
+special network sharing code to allow for this situation, and can be used
+as a model if this methodology is required in other OS environments.</para>
+</sect1>
+
+<sect1 id="RedBoot-Editing-Commands">
+<title>RedBoot Editing Commands</title>
+<para><indexterm><primary>RedBoot</primary><secondary>editing commands</secondary>
+</indexterm><indexterm><primary>editing commands</primary></indexterm><indexterm>
+<primary>commands</primary><secondary>editing</secondary></indexterm>RedBoot
+uses the following line editing commands.
+<note><title>NOTE</title>
+<para>
+In this description, <guibutton>^A</guibutton> means the character formed
+by typing the letter &ldquo;A&rdquo; while holding down the control key.
+</para></note>
+<itemizedlist>
+<listitem><para><guibutton>Delete</guibutton> (0x7F) or
+<guibutton>Backspace</guibutton> (0x08)
+erases the character to the left of the cursor.
+</para></listitem>
+<listitem><para>
+<guibutton>^A</guibutton>
+moves the cursor (insertion point) to the beginning of the line.
+</para></listitem>
+<listitem><para>
+<guibutton>^K</guibutton>
+erases all characters on the line from the cursor to the end.
+</para></listitem>
+<listitem><para>
+<guibutton>^E</guibutton>
+positions the cursor to the end of the line.
+</para></listitem>
+<listitem><para>
+<guibutton>^D</guibutton>
+erases the character under the cursor.
+</para></listitem>
+<listitem><para>
+<guibutton>^F</guibutton>
+moves the cursor one character to the right.
+</para></listitem>
+<listitem><para>
+<guibutton>^B</guibutton>
+moves the cursor one character to the left.
+</para></listitem>
+<listitem><para>
+<guibutton>^P</guibutton>
+replaces the current line by a previous line from the history buffer.
+A small number of lines
+can be kept as history. Using ^P (and ^N), the current line can be replaced
+by any one of the previously typed lines.
+</para></listitem>
+<listitem><para>
+<guibutton>^N</guibutton>
+replaces the current line by the next line from the history buffer.
+</para></listitem>
+</itemizedlist></para>
+<para>In the case of the <command>fconfig</command>
+command, additional editing commands are possible.
+As data are entered for this command, the current/previous value
+will be displayed and the cursor placed at the end of that data.
+The user may use the editing keys (above) to move around in the data
+to modify it as appropriate.
+Additionally, when certain
+characters are entered at the end of the current value,
+i.e. entered separately, certain behavior is elicited.</para>
+<para><itemizedlist>
+<listitem>
+<para>^ (caret) switch to editing the previous item in the
+<command>fconfig</command> list. If fconfig edits item A, followed by item B,
+pressing ^ when changing item B, allows you to change item A. This is similar
+to the up arrow.
+Note: ^P and ^N do not have the same meaning while editing
+<command>fconfig</command> data and should not be used.
+</para>
+</listitem>
+<listitem><para>. (period) stop editing any further items. This does not change
+the current item.</para>
+</listitem>
+<listitem><para><guibutton>Return</guibutton> leaves the value
+for this item unchanged. Currently it is not possible to step through the
+value for the start-up script; it must always be retyped.</para>
+</listitem>
+</itemizedlist></para>
+</sect1>
+
+<sect1 id="RedBoot-Command-History">
+<title>RedBoot Command History</title>
+<para>
+<indexterm><primary>RedBoot</primary><secondary>command history</secondary></indexterm>
+<indexterm><primary>command history</primary></indexterm>
+<indexterm><primary>commands</primary><secondary>history</secondary></indexterm>
+RedBoot provides support for listing and repeating previously entered commands. A
+list of previously entered commands may be obtained by typing <command>history</command>
+at the command line:
+<screen>
+RedBoot> <userinput>history</userinput>
+ 0 fis list
+ 1 fconfig -l
+ 2 load -m ymodem
+ 3 history
+</screen>
+</para><para>
+The following history expansions may be used to execute commands in the history list:
+<itemizedlist>
+<listitem><para>
+!! repeats last command.
+</para></listitem>
+<listitem><para>
+!<userinput>n</userinput> repeats command <userinput>n</userinput>.
+</para></listitem>
+<listitem><para>
+!<userinput>string</userinput> repeats most recent command starting with
+<userinput>string</userinput>.
+</para></listitem>
+</itemizedlist>
+</para>
+</sect1>
+
+<sect1 id="startup-mode">
+<title>RedBoot Startup Mode</title>
+<para>
+ <indexterm><primary>RedBoot</primary><secondary>mode</secondary></indexterm>
+ <indexterm><primary>RedBoot</primary><secondary>startup mode</secondary></indexterm>
+</para>
+
+<para>RedBoot can normally be configured to run in a number of startup
+modes (or just "modes" for short), determining its location of
+residence and execution:
+<variablelist>
+ <varlistentry><term>ROM mode</term>
+ <listitem><para>In this mode, RedBoot both resides and executes from
+ ROM memory (flash or EPROM). This mode is used when there are limited
+ RAM resources. The flash commands cannot update the region of flash
+ where the RedBoot image resides. In order to update the RedBoot image
+ in flash, it is necessary to run a RAM mode instance of
+ RedBoot.</para></listitem>
+ </varlistentry>
+
+ <varlistentry><term>ROMRAM mode</term>
+ <listitem><para>In this mode, RedBoot resides in ROM memory (flash or
+ EPROM), but is copied to RAM memory before it starts executing. The
+ RAM footprint is larger than for ROM mode, but there are two
+ advantages to make up for this: it normally runs faster (relevant
+ only on slower boards) and it is able to update the flash region
+ where the image resides.</para></listitem>
+ </varlistentry>
+
+ <varlistentry><term>RAM mode</term>
+ <listitem><para>In this mode, RedBoot both resides and executes from
+ RAM memory. This is used for updating a primary ROM
+ mode image in situ and sometimes as part of the RedBoot installation
+ on the board when there's already an existing (non-RedBoot) boot
+ monitor available.</para>
+
+ <para> You can only use ROM and ROMRAM mode images for booting a
+ board - a RAM mode image cannot run unless loaded by another ROM
+ monitor. There is no need for this startup mode if a RedBoot ROMRAM
+ mode image is the primary boot monitor. When this startup mode is
+ programmed into flash (as a convenience as it's fast to load from
+ flash) it will generally be named as "RedBoot[RAM]" in the FIS
+ directory. </para></listitem>
+ </varlistentry>
+</variablelist>
+
+The chosen mode has influence on flash and RAM resource usage (see
+<xref linkend="resource-usage">) and the procedure of an in situ update
+of RedBoot in flash (see <xref linkend="Updating-Redboot">).</para>
+
+<para>The startup mode is controlled by the option CYG_HAL_STARTUP
+which resides in the platform HAL. Some platforms provide only some of
+the RAM, ROM, and ROMRAM modes, others provide additional
+modes.</para>
+
+<para>To see mode of a currently executing RedBoot, issue the
+<command>version</command> command, which prints the RedBoot banner,
+including the startup mode (here ROM):
+<screen>RedBoot><userinput>version</userinput>
+
+RedBoot(tm) bootstrap and debug environment <emphasis>[ROM]</emphasis>
+Non-certified release, version UNKNOWN - built 13:31:57, May 17 2002
+</screen>
+</para>
+
+</sect1>
+
+<sect1 id="resource-usage">
+<title>RedBoot Resource Usage</title>
+<para>
+ <indexterm><primary>RedBoot</primary><secondary>resource usage</secondary></indexterm>
+</para>
+
+<para>RedBoot takes up both flash and RAM resources depending on its
+startup mode and number of enabled features. There are also other
+resources used by RedBoot, such as timers. Platform-specific resources
+used by RedBoot are listed in the platform specific parts of this
+manual.</para>
+
+<para>Both flash and RAM resources used by RedBoot depend to some
+degree on the features enabled in the RedBoot configuration. It is
+possible to reduce in particular the RAM resources used by RedBoot by
+removing features that are not needed. Flash resources can also be
+reduced, but due to the granularity of the flash (the block sizes),
+reductions in feature size do not always result in flash resource
+savings.</para>
+
+
+<sect2>
+<title>Flash Resources</title>
+<para>On many platforms, a ROM mode RedBoot image resides in the first
+flash sectors, working as the board's primary boot monitor. On these
+platforms, it is also normal to reserve a similar amount of flash for
+a secondary RAM mode image, which is used when updating the primary
+ROM mode image.</para>
+<para>On other platforms, a ROMRAM mode RedBoot image is used as the
+primary boot monitor. On these platforms there is not normally
+reserved space for a RAM mode RedBoot image, since the ROMRAM mode
+RedBoot is capable of updating the primary boot monitor image.</para>
+<para>Most platforms also contain a FIS directory (keeping track of
+available flash space) and a RedBoot config block (containing RedBoot
+board configuration data).</para>
+<para>To see the amount of reserved flash memory, run the <command>fis
+list</command> command:
+<screen>RedBoot> <userinput>fis list</userinput>
+Name FLASH addr Mem addr Length Entry point
+RedBoot 0x00000000 0x00000000 0x00020000 0x00000000
+RedBoot[RAM] 0x00020000 0x06020000 0x00020000 0x060213C0
+RedBoot config 0x0007F000 0x0007F000 0x00001000 0x00000000
+FIS directory 0x00070000 0x00070000 0x0000F000 0x00000000
+</screen>
+</para>
+
+<para>To save flash resources, use a ROMRAM mode RedBoot, or if using
+a ROM mode RedBoot, avoid reserving space for the RedBoot[RAM] image
+(this is done by changing the RedBoot configuration) and download the
+RAM mode RedBoot whenever it is needed. If the RedBoot image takes up
+a fraction of an extra flash block, it may be possible to reduce the
+image size enough to free this block by removing some features.</para>
+
+</sect2>
+
+<sect2>
+<title>RAM Resources</title>
+
+<para>RedBoot reserves RAM space for its run-time data, and such
+things as CPU exception/interrupt tables. It normally does so at the
+bottom of the memory map. It may also reserve space at the top of the
+memory map for configurable RedBoot features such as the net stack
+and zlib decompression support.</para>
+<para>To see the actual amount of reserved space, issue the
+<command>version</command> command, which prints the RedBoot banner,
+including the RAM usage:
+<screen>RedBoot> <userinput>version</userinput>
+
+RedBoot(tm) bootstrap and debug environment [ROM]
+Non-certified release, version UNKNOWN - built 13:31:57, May 17 2002
+
+Platform: FooBar (SH 7615)
+Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
+
+<emphasis>RAM: 0x06000000-0x06080000, 0x06012498-0x06061000 available</emphasis>
+FLASH: 0x00000000 - 0x00080000, 8 blocks of 0x00010000 bytes each.
+</screen>
+</para>
+
+<para>To simplify operations that temporarily need data in free
+memory, the limits of free RAM are also available as aliases (aligned
+to the nearest kilo-byte limit). These are named
+<indexterm><primary>FREEMEMLO</primary></indexterm>FREEMEMLO and
+<indexterm><primary>FREEMEMHI</primary></indexterm>FREEMEMHI, and can
+be used in commands like any user defined alias:
+<screen>RedBoot> <userinput>load -r -b %{FREEMEMLO} file</userinput>
+Raw file loaded 0x06012800-0x06013e53, assumed entry at 0x06012800
+</screen>
+<screen>
+RedBoot> <userinput>x -b %{FREEMEMHI}</userinput>
+06061000: 86 F5 EB D8 3D 11 51 F2 96 F4 B2 DC 76 76 8F 77 |....=.Q.....vv.w|
+06061010: E6 55 DD DB F3 75 5D 15 E0 F3 FC D9 C8 73 1D DA |.U...u]......s..|
+</screen>
+</para>
+
+<para>To reduce RedBoot's RAM resource usage, use a ROM mode
+RedBoot. The RedBoot features that use most RAM are the net stack, the
+flash support and the gunzip support. These, and other features, can
+be disabled to reduce the RAM footprint, but obviously at the cost of
+lost functionality.</para>
+
+</sect2>
+</sect1>
+
+<sect1 id="Configuring-the-RedBoot-Environment">
+<title>Configuring the RedBoot Environment</title>
+<para><indexterm><primary>configuring the RedBoot environment</primary><secondary></secondary>
+</indexterm><indexterm><primary>RedBoot </primary><secondary>environment configuration
+</secondary></indexterm><indexterm><primary>environment configuration</primary>
+</indexterm>Once installed, RedBoot will operate fairly generically. However,
+there are some features that can be configured for a particular installation.
+These depend primarily on whether <indexterm><primary>flash and/or networking
+support</primary></indexterm><indexterm><primary>networking and/or flash support
+</primary></indexterm>flash and/or networking support are available. The remainder
+of this discussion assumes that support for both of these options is included
+in RedBoot.</para>
+<sect2 id=target-network-configuration>
+<title>Target Network Configuration</title>
+<para><indexterm><primary>target network configuration</primary></indexterm><indexterm>
+<primary>network configuration</primary></indexterm><indexterm><primary>configuration
+</primary><secondary>secondary</secondary></indexterm>Each node in a networked
+system needs to have a unique address. Since the network support in RedBoot
+is based on <indexterm><primary>TCP/IP</primary></indexterm>TCP/IP, this address
+is an IP (Internet Protocol) address. <indexterm><primary>IP address type
+</primary></indexterm>There are two ways for a system to &ldquo;know&rdquo;
+its IP address. First, it can be stored locally on the platform. This is known
+as having a static IP address. Second, the system can use the network itself
+to discover its IP address. This is known as a dynamic IP address. RedBoot
+supports this dynamic IP address mode by use of the <indexterm><primary>BOOTP
+</primary></indexterm>BOOTP (a subset of <indexterm><primary>DHCP</primary>
+</indexterm>DHCP) protocol. In this case, RedBoot will ask the network (actually
+some generic server on the network) for the IP address to use.</para>
+<note><title>NOTE</title>
+<para>Currently, RedBoot only supports BOOTP. In future releases, DHCP may
+also be supported, but such support will be limited to additional data items,
+not lease-based address allocation.</para>
+</note>
+<para>The choice of <indexterm><primary>IP address type</primary></indexterm>IP
+address type is made via the <indexterm><primary>fconfig command</primary>
+</indexterm><command>fconfig</command> command. Once a selection
+is made, it will be stored in flash memory. RedBoot only queries the flash
+configuration information at reset, so any changes will require restarting
+the platform.</para>
+<para>Here is an example of the RedBoot <command>fconfig</command>
+command, showing network addressing: </para>
+<programlisting>RedBoot> <userinput>fconfig -l</userinput>
+Run script at boot: false
+Use BOOTP for network configuration: false
+Local IP address: 192.168.1.29
+Default server IP address: 192.168.1.101
+DNS server IP address: 192.168.1.1
+GDB connection port: 9000
+Network debug at boot time: false </programlisting>
+<para>In this case, the board has been configured with a static IP address
+listed as the Local IP address. The default server IP address specifies which
+network node to communicate with for TFTP service. This address can be overridden
+directly in the <indexterm><primary>TFTP commands</primary></indexterm>TFTP
+commands.</para>
+<para>The <computeroutput>DNS server IP address</computeroutput> option
+controls where RedBoot should make DNS lookups<indexterm><primary>DNS
+lookups</primary></indexterm>. A setting of 0.0.0.0 will disable DNS
+lookups. The DNS server IP address can also be set at runtime.</para>
+<para>If the selection for <computeroutput>Use BOOTP for network configuration
+</computeroutput> had been <computeroutput>true</computeroutput>, these IP
+addresses would be determined at boot time, via the BOOTP protocol. The final
+number which needs to be configured, regardless of IP address selection mode,
+is the <indexterm><primary>GDB connection port</primary></indexterm><computeroutput>
+GDB connection port</computeroutput>. RedBoot allows for incoming commands
+on either the available serial ports or via the network. This port number
+is the TCP port that RedBoot will use to accept incoming connections. </para>
+<para>These connections can be used for GDB sessions, but they can also be
+used for generic RedBoot commands. In particular, it is possible to communicate
+with RedBoot via the <indexterm><primary>telnet</primary></indexterm>telnet
+protocol. For example, on Linux&reg;: </para>
+<programlisting>% telnet redboot_board 9000
+Connected to redboot_board
+Escape character is &lsquo;^]&rsquo;.
+RedBoot> </programlisting>
+</sect2>
+<sect2>
+<title>Host Network Configuration</title>
+<para><indexterm><primary>host network configuration</primary></indexterm><indexterm>
+<primary>network configuration</primary><secondary>host</secondary></indexterm><indexterm>
+<primary>configuration</primary><secondary>network</secondary></indexterm>RedBoot
+may require three different classes of service from a network host: </para>
+<itemizedlist>
+<listitem><para>dynamic IP address allocation, using BOOTP </para>
+</listitem>
+<listitem><para>TFTP service for file downloading </para>
+</listitem>
+<listitem><para>DNS server for hostname lookups </para>
+</listitem>
+</itemizedlist>
+<para>Depending on the host system, these services may or may not be available
+or enabled by default. See your system documentation for more details.</para>
+<para>In particular, on Red Hat Linux, neither of these services will be configured
+out of the box. The following will provide a limited explanation of how to
+set them up. These configuration setups must be done as <computeroutput>root
+</computeroutput> on the host or server machine.</para>
+<sect3>
+<title>Enable TFTP on Red Hat Linux 6.2</title>
+<procedure>
+<step><para><indexterm><primary>TFTP</primary><secondary>enabling on Red Hat
+Linux 6.2</secondary></indexterm><indexterm><primary>Red Hat Linux</primary>
+<secondary>enabling TFTP on version 6.2</secondary></indexterm>Ensure that
+you have the tftp-server RPM package installed. By default, this installs
+the TFTP server in a disabled state. These steps will enable it:</para>
+</step>
+<step><para>Make sure that the following line is uncommented in the control
+file <filename>/etc/inetd.conf</filename> <screen>tftp dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.tftpd
+</screen></para>
+<para></para>
+</step>
+<step><para>If it was necessary to change the line in Step 2, then the inetd
+server must be restarted, which can be done via the command: <programlisting>
+# service inet reload</programlisting></para>
+</step>
+</procedure>
+</sect3>
+<sect3>
+<title>Enable TFTP on Red Hat Linux 7 (or newer)</title>
+<procedure>
+<step><para><indexterm><primary>TFTP</primary><secondary>enabling on Red Hat
+Linux 7</secondary></indexterm><indexterm><primary>Red Hat Linux</primary>
+<secondary>enabling TFTP on version 7</secondary></indexterm>Ensure that the
+xinetd RPM is installed.</para>
+</step>
+<step><para>Ensure that the tftp-server RPM is installed.</para>
+</step>
+<step><para>Enable TFTP by means of the following: <programlisting>/sbin/chkconfig tftp on
+</programlisting>Reload the xinetd configuration using the command:<programlisting>
+ /sbin/service xinetd reload </programlisting>Create the directory /tftpboot
+using the command <programlisting>mkdir /tftpboot</programlisting></para>
+</step>
+<step><para>If you are using Red Hat 8 or newer, you may need to configure
+the built-in firewall to allow through TFTP. Either edit
+<filename>/etc/sysconfig/iptables</filename> or run
+<command>redhat-config-securitylevel</command> on the command line or from
+the menu as System Settings->Security Settings to lower the security level.
+You should only do this with the permission of your systems administrator and
+if you are already behind a separate firewall.</para>
+</step>
+</procedure>
+<note><title>NOTE</title>
+<para>Under Red Hat 7 you must address files by absolute pathnames, for example: <filename>
+/tftpboot/boot.img</filename> not <filename>/boot.img</filename>, as you may have done with
+other implementations.
+On systems newer than Red Hat 7 (7.1 and beyond), filenames are once again relative to the
+<filename>/tftpboot</filename> directory.
+</para>
+</note>
+</sect3>
+<sect3>
+<title>Enable BOOTP/DHCP server on Red Hat Linux</title>
+<para><indexterm><primary>DHCP</primary><secondary>enabling on Red Hat Linux
+</secondary></indexterm><indexterm><primary>BOOTP</primary><secondary>
+enabling on Red Hat Linux</secondary></indexterm>First, ensure that you have
+the proper package, <computeroutput>dhcp</computeroutput> (not <computeroutput>
+dhcpd</computeroutput>) installed. The DHCP server provides Dynamic Host Configuration,
+that is, IP address and other data to hosts on a network. It does this in
+different ways. Next, there can be a fixed relationship between a certain
+node and the data, based on that node&rsquo;s unique Ethernet Station Address
+(ESA, sometimes called a MAC address). The other possibility is simply to
+assign addresses that are free. The sample DHCP configuration file shown does
+both. Refer to the DHCP documentation for more details.</para>
+<example><title>Sample DHCP configuration file</title>
+<programlisting>--------------- /etc/dhcpd.conf -----------------------------
+default-lease-time 600;
+max-lease-time 7200;
+option subnet-mask 255.255.255.0;
+option broadcast-address 192.168.1.255;
+option domain-name-servers 198.41.0.4, 128.9.0.107;
+option domain-name &ldquo;bogus.com&rdquo;;
+allow bootp;
+shared-network BOGUS {
+subnet 192.168.1.0 netmask 255.255.255.0 {
+ option routers 192.168.1.101;
+ range 192.168.1.1 192.168.1.254;
+}
+ }
+host mbx {
+ hardware ethernet 08:00:3E:28:79:B8;
+ fixed-address 192.168.1.20;
+ filename &ldquo;/tftpboot/192.168.1.21/zImage&rdquo;;
+ default-lease-time -1;
+ server-name &ldquo;srvr.bugus.com&rdquo;;
+ server-identifier 192.168.1.101;
+ option host-name &ldquo;mbx&rdquo;;
+} </programlisting></example>
+<para>Once the DHCP package has been installed and the configuration file
+set up, type:<screen>
+# <userinput>service dhcpd start</userinput></screen></para>
+</sect3>
+<sect3>
+<title>Enable DNS server on Red Hat Linux</title>
+<para><indexterm><primary>DNS</primary><secondary>enabling on Red Hat
+Linux</secondary></indexterm>First, ensure that you have the proper
+RPM package, <computeroutput>caching-nameserver</computeroutput>
+installed. Then change the configuration
+(in <filename>/etc/named.conf</filename>) so that the
+<computeroutput>forwarders</computeroutput> point to the primary
+nameservers for your machine, normally using the nameservers listed in
+<filename>/etc/resolv.conf</filename>.</para>
+
+<example><title>
+Sample <filename>/etc/named.conf</filename> for Red Hat Linux 7.x
+</title>
+
+<programlisting>--------------- /etc/named.conf -----------------------------
+// generated by named-bootconf.pl
+
+options {
+ directory "/var/named";
+ /*
+ * If there is a firewall between you and nameservers you want
+ * to talk to, you might need to uncomment the query-source
+ * directive below. Previous versions of BIND always asked
+ * questions using port 53, but BIND 8.1 uses an unprivileged
+ * port by default.
+ */
+ // query-source address * port 53;
+
+
+ forward first;
+ forwarders {
+ 212.242.40.3;
+ 212.242.40.51;
+ };
+};
+
+//
+// a caching only nameserver config
+//
+// Uncomment the following for Red Hat Linux 7.2 or above:
+// controls {
+// inet 127.0.0.1 allow { localhost; } keys { rndckey; };
+// };
+// include "/etc/rndc.key";
+zone "." IN {
+ type hint;
+ file "named.ca";
+};
+
+zone "localhost" IN {
+ type master;
+ file "localhost.zone";
+ allow-update { none; };
+};
+
+zone "0.0.127.in-addr.arpa" IN {
+ type master;
+ file "named.local";
+ allow-update { none; };
+};
+
+</programlisting></example>
+
+<para>Make sure the server is started with the command:
+<screen># <userinput>service named start</userinput></screen> and is
+started on next reboot with the command
+<screen># <userinput>chkconfig named on</userinput></screen>
+Finally, you may wish to change
+<filename>/etc/resolv.conf</filename> to use
+<computeroutput>127.0.0.1</computeroutput> as the nameserver for your
+local machine.</para>
+</sect3>
+<sect3>
+<title>RedBoot network gateway</title>
+<para><indexterm><primary>RedBoot network gateway</primary></indexterm><indexterm>
+<primary>network gateway</primary></indexterm>RedBoot cannot communicate with
+machines on different subnets because it does not support routing. It always
+assumes that it can get to an address directly, therefore it always tries
+to ARP and then send packets directly to that unit. This means that whatever
+it talks to must be on the same subnet. If you need to talk to a host on a
+different subnet (even if it's on the same &lsquo;wire&rsquo;), you need to
+go through an ARP proxy, providing that there is a Linux box connected to
+the network which is able to route to the TFTP server. For example: <filename>
+/proc/sys/net/ipv4/conf/<replaceable>&lt;interface></replaceable>/proxy_arp </filename>where <replaceable>
+&lt;interface></replaceable>should be replaced with whichever network interface
+is directly connected to the board.</para>
+</sect3></sect2>
+<sect2>
+<title>Verification</title>
+<para><indexterm><primary>verification (network)</primary></indexterm><indexterm>
+<primary>network verification</primary></indexterm>Once your network setup
+has been configured, perform simple verification tests as follows: <itemizedlist>
+<listitem><para>Reboot your system, to enable the setup, and then try to &lsquo;ping&rsquo;
+the target board from a host.</para>
+</listitem>
+<listitem><para>Once communication has been established, try to ping
+a host using the RedBoot ping command - both by IP address and hostname.</para>
+</listitem>
+<listitem><para>Try using the RedBoot load command to download a file
+from a host.</para>
+</listitem>
+</itemizedlist></para>
+</sect2></sect1></chapter>
+
+<!-- Commands -->
+<!-- &redboot-current-doc-redboot-cmds-sgml; -->
+
+<!-- Rebuilding -->
+<!-- &redboot-current-doc-redboot-rebuilding-sgml; -->
+
+<!-- Installing and testing -->
+<!-- &redboot-current-doc-redboot-installing-sgml; -->
+
+<!-- Epilogue -->
+<!-- &redboot-current-doc-redboot-epilogue-sgml; -->
diff --git a/cesar/ecos/packages/redboot/current/doc/redboot_cmds.sgml b/cesar/ecos/packages/redboot/current/doc/redboot_cmds.sgml
new file mode 100644
index 0000000000..11fc2de7ee
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/doc/redboot_cmds.sgml
@@ -0,0 +1,3290 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- redboot_cmds.sgml -->
+<!-- -->
+<!-- Documentation for RedBoot Commands -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<chapter id="RedBoot-Commands-and-Examples">
+<title>RedBoot Commands and Examples</title>
+<sect1>
+<title>Introduction</title>
+<para><indexterm><primary>RedBoot</primary><secondary>commands and examples
+</secondary></indexterm><indexterm><primary>commands and examples</primary>
+</indexterm>RedBoot provides three basic classes of commands: <itemizedlist>
+<listitem><para>Program loading and execution</para>
+</listitem>
+<listitem><para>Flash image and configuration management</para>
+</listitem>
+<listitem><para>Miscellaneous commands</para>
+</listitem>
+</itemizedlist>Given the extensible and configurable nature of eCos and RedBoot,
+there may be extended or enhanced sets of commands available.</para>
+<para>The basic format for commands is: <programlisting>RedBoot> COMMAND [-S]... [-s val]... operand
+</programlisting>
+</para>
+<para>
+Commands may require additional information beyond the basic
+command name. In most cases this additional information is optional, with
+suitable default values provided if they are not present.
+
+ <informaltable frame="all">
+ <tgroup cols="3" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <thead>
+ <row>
+ <entry>Format</entry>
+ <entry>Description</entry>
+ <entry>Example</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-S</entry>
+ <entry>A boolean switch; the behavior of the command will differ, depending
+on the presence of the switch. In this example, the <userinput>-f</userinput> switch
+indicates that a complete initialization of the FIS data should be performed.
+There may be many such switches available for any given command and any or all of
+them may be present, in any order.</entry>
+ <entry>
+ <computeroutput> RedBoot> <userinput>fis init -f</userinput></computeroutput>
+ </entry>
+ </row>
+ <row>
+ <entry>-s<replaceable> val</replaceable></entry>
+ <entry>A qualified value; the letter "s" introduces the value, qualifying it's meaning. In the
+example, <userinput>-b 0x100000</userinput> specifies where the memory dump should begin.
+There may be many such switches available for any given command and any or all of
+them may be present, in any order.
+</entry>
+ <entry>
+ <computeroutput> RedBoot> <userinput>dump -b 0x100000 -l 0x20</userinput></computeroutput>
+ </entry>
+ </row>
+ <row>
+ <entry><replaceable> operand</replaceable></entry>
+ <entry>A simple value; some commands require a single parameter for which an additional
+<userinput>-X</userinput> switch would be redundant. In the example, <userinput>JFFS2</userinput>
+is the name of a flash image. The image name is always required, thus is no need to qualify it with
+a switch.
+Note that any un-qualified operand must always appear at the end of the command.</entry>
+ <entry>
+ <computeroutput> RedBoot> <userinput>fis delete JFFS2</userinput></computeroutput>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+</para>
+<para>The list of available commands, and their syntax, can be obtained by
+typing <command>help</command> at the command line:
+<screen>
+RedBoot> <userinput>help</userinput>
+Manage aliases kept in FLASH memory
+ alias name [value]
+Set/Query the system console baud rate
+ baudrate [-b &lt;rate>]
+Manage machine caches
+ cache [ON | OFF]
+Display/switch console channel
+ channel [-1|&lt;channel number>]
+Display disk partitions
+ disks
+Display (hex dump) a range of memory
+ dump -b &lt;location> [-l &lt;length>] [-s]
+Manage flash images
+ fis {cmds}
+Manage configuration kept in FLASH memory
+ fconfig [-i] [-l] [-n] [-f] [-d] | [-d] nickname [value]
+Execute code at a location
+ go [-w &lt;timeout>] [-c] [-n] [entry]
+Help about help?
+ help [&lt;topic>]
+Set/change IP addresses
+ ip_address [-l &lt;local_ip_address>[/&lt;mask_length>]] [-h &lt;server_address>]
+Load a file
+ load [-r] [-v] [-d] [-c &lt;channel>] [-h &lt;host>] [-m {TFTP | HTTP | {x|y}MODEM | disk}]
+ [-b &lt;base_address>] &lt;file_name>
+Network connectivity test
+ ping [-v] [-n &lt;count>] [-t &lt;timeout>] [-i &lt;IP_addr]
+ -h &lt;host>
+Reset the system
+ reset
+Display RedBoot version information
+ version
+Display (hex dump) a range of memory
+ x -b &lt;location> [-l &lt;length>] [-s]
+</screen>
+</para>
+<para>
+Commands can be abbreviated to their shortest
+unique string. Thus in the list above, <command>d,du,dum</command>
+and dump are all valid for the <command>dump</command> command. The <command>fconfig</command>
+command can be abbreviated <command>fc</command>, but
+<command>f</command> would be ambiguous with <command>fis</command>.
+</para>
+<para>There is one additional, special command. When RedBoot detects '$' or '+'
+(unless escaped via '\') in a command, it switches to GDB protocol mode. At this
+point, the eCos GDB stubs take over, allowing connections from a GDB host.
+The only way to get back to RedBoot from GDB mode is to restart the platform.
+</para>
+<note><title>NOTE</title>
+<para>
+Multiple commands may be entered on a single line, separated by the semi-colon &ldquo;;&rdquo; character.
+</para>
+</note>
+<para>The standard RedBoot command set is structured around the bootstrap
+environment. These commands are designed to be simple to use and remember,
+while still providing sufficient power and flexibility to be useful. No attempt
+has been made to render RedBoot as the end-all product. As such, things such
+as the debug environment are left to other modules, such as GDB stubs, which
+are typically included in RedBoot. </para>
+<para>The command set may be also be extended on a platform basis. </para>
+</sect1>
+
+<sect1 id="common-commands">
+<title>Common Commands</title>
+<para>
+ <indexterm><primary>commands</primary><secondary>common</secondary>
+ </indexterm>
+</para>
+
+<!-- ******** alias *************************************************** -->
+ <refentry id="alias-command">
+ <refnamediv>
+ <refname>alias</refname>
+ <refpurpose>Manipulate command line aliases</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>alias</command>
+ <arg choice="req"><replaceable> name</replaceable></arg>
+ <arg><replaceable> value</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><replaceable>name</replaceable></entry>
+ <entry>Name</entry>
+ <entry>The name for this alias.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry><replaceable>value</replaceable></entry>
+ <entry>String</entry>
+ <entry>Replacement value for the alias.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>The <command>alias</command> command is used to maintain simple command
+line aliases. These aliases are shorthand for longer expressions.
+When the pattern %{name} appears in a command line, including in a script,
+the corresponding value will be substituted. Aliases may be nested.
+ </para>
+ <para>
+If no value is provided, then the current value of the alias is displayed.
+ </para>
+ <para>
+If the system supports non-volatile configuration data via the
+<command>fconfig</command> command (see <xref linkend="Persistent-State-Flash">),
+then the value will be saved and used when the system is reset.
+ </para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Set an alias.
+<screen>
+RedBoot> <userinput>alias joe "This is Joe"</userinput>
+Update RedBoot non-volatile configuration - continue (y/n)? n
+</screen>
+</para>
+<para>
+Display an alias.
+<screen>
+RedBoot> <userinput>alias joe</userinput>
+'joe' = 'This is Joe'
+</screen>
+</para>
+<para>
+Use an alias. Note: the <command>"="</command> command simply echoes the command to to console.
+<screen>
+RedBoot> <userinput>= %{joe}</userinput>
+This is Joe
+</screen>
+</para>
+<para>
+Aliases can be nested.
+<screen>
+RedBoot> <userinput>alias frank "Who are you? %{joe}"</userinput>
+Update RedBoot non-volatile configuration - continue (y/n)? n
+RedBoot> <userinput>= %{frank}</userinput>
+Who are you? This is Joe
+</screen>
+</para>
+<para>
+Notice how the value of %{frank} changes when %{joe} is changed since
+the value of %{joe} is not evaluated until %{frank} is evaluated.
+<screen>
+RedBoot> <userinput>alias joe "This is now Josephine"</userinput>
+Update RedBoot non-volatile configuration - continue (y/n)? n
+RedBoot> <userinput>= %{frank}</userinput>
+Who are you? This is now Josephine
+</screen>
+ </para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** baudrate *************************************************** -->
+ <refentry id="baudrate-command">
+ <refnamediv>
+ <refname>baudrate</refname>
+ <refpurpose>Set the baud rate for the system serial console</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>baudrate</command>
+ <arg>-b<replaceable> rate</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-b <replaceable>rate</replaceable></entry>
+ <entry>Number</entry>
+ <entry>The baud rate to use for the serial console.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>The <command>baudrate</command> command sets the baud rate for the system serial console.
+ </para>
+ <para>
+If no value is provided, then the current value of the console baud rate is displayed.
+ </para>
+ <para>
+If the system supports non-volatile configuration data via the
+<command>fconfig</command> command (see <xref linkend="Persistent-State-Flash">),
+then the value will be saved and used when the system is reset.
+ </para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Show the current baud rate.
+<screen>
+RedBoot> <userinput>baudrate</userinput>
+Baud rate = 38400
+</screen>
+</para>
+<para>
+Change the console baud rate. In order to make this operation safer,
+there will be a slight pause after the
+first message to give you time to change to the new baud rate.
+If it doesn't work, or a less than affirmative answer is given to the
+"continue" prompt, then the baud rate will revert to the current value.
+Only after the baud rate has been firmly established will <emphasis>RedBoot</emphasis>
+give you an opportunity to save the value in persistent storage.
+<screen>
+RedBoot> <userinput>baudrate -b 57600</userinput>
+Baud rate will be changed to 57600 - update your settings
+<emphasis>Device baud rate changed at this point</emphasis>
+Baud rate changed to 57600 - continue (y/n)? y
+Update RedBoot non-volatile configuration - continue (y/n)? n
+</screen>
+ </para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** cache *************************************************** -->
+ <refentry id="cache-command">
+ <refnamediv>
+ <refname>cache</refname>
+ <refpurpose>Control hardware caches</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>cache</command>
+ <group>
+ <arg>on</arg>
+ <arg>off</arg>
+ </group>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>on</entry>
+ <entry></entry>
+ <entry>Turn the caches on</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>off</entry>
+ <entry></entry>
+ <entry>Turn the caches off</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>The <command>cache</command> command is used to manipulate the caches on the processor. </para>
+ <para>With no options, this command specifies the state of the system caches.</para>
+ <para>When an option is given, the caches are turned off or on appropriately.</para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Show the current cache state.
+<screen>
+RedBoot> <userinput>cache</userinput>
+Data cache: On, Instruction cache: On
+</screen>
+</para>
+<para>
+Disable the caches.
+<screen>
+RedBoot> <userinput>cache off</userinput>
+RedBoot> <userinput>cache</userinput>
+Data cache: Off, Instruction cache: Off
+</screen>
+</para>
+<para>
+Enable the caches.
+<screen>
+RedBoot> <userinput>cache on</userinput>
+RedBoot> <userinput>cache</userinput>
+Data cache: On, Instruction cache: On
+</screen>
+ </para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** channel *************************************************** -->
+ <refentry id="channel-command">
+ <refnamediv>
+ <refname>channel</refname>
+ <refpurpose>Select the system console channel</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>channel</command>
+ <group>
+ <arg>-1</arg>
+ <arg><replaceable>channel_number</replaceable></arg>
+ </group>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-1</entry>
+ <entry></entry>
+ <entry>Reset the console channel</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>channel_number</entry>
+ <entry>Number</entry>
+ <entry>Select a channel</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>
+With no arguments, the <command>channel</command> command displays the current console channel number.
+</para><para>
+When passed an argument of 0 upward, this command switches the console
+channel to that channel number. The mapping between channel numbers and
+physical channels is platform specific but will typically be something like
+channel 0 is the first serial port, channel 1 is the second, etc.
+</para><para>
+When passed an argument of -1, this command reverts RedBoot to responding
+to whatever channel receives input first, as happens when RedBoot initially
+starts execution.
+</para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Show the current channel.
+<screen>
+RedBoot> <userinput>channel</userinput>
+Current console channel id: 0
+</screen>
+</para>
+<para>
+Change to an invalid channel.
+<screen>
+RedBoot> <userinput>channel 99</userinput>
+**Error: bad channel number '99'
+</screen>
+</para>
+<para>
+Revert to the default channel setting (any console mode).
+<screen>
+RedBoot> <userinput>channel -1</userinput>
+</screen>
+ </para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** cksum *************************************************** -->
+ <refentry id="cksum-command">
+ <refnamediv>
+ <refname>cksum</refname>
+ <refpurpose>Compute POSIX checksums</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>cksum</command>
+ <arg choice="req">-b <replaceable>location</replaceable></arg>
+ <arg choice="req">-l <replaceable>length</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-b <replaceable>location</replaceable></entry>
+ <entry>Memory address</entry>
+ <entry>Location in memory for stat of data.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>-l <replaceable>length</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Length of data</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>Computes the POSIX checksum on a range of memory (either RAM or FLASH).
+The values printed (decimal cksum, decimal length, hexadecimal cksum,
+ hexadecimal length) can be compared with the output from the Linux program 'cksum'.
+</para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Checksum a buffer.
+<screen>
+RedBoot> <userinput>cksum -b 0x100000 -l 0x100</userinput>
+POSIX cksum = 3286483632 256 (0xc3e3c2b0 0x00000100)
+</screen>
+ </para>
+ <para>
+Checksum an area of memory after loading a file. Note that the base
+address and length parameters are provided by the preceding
+load command.
+<screen>
+RedBoot> <userinput>load -r -b %{FREEMEMLO} redboot.bin</userinput>
+Raw file loaded 0x06012800-0x0602f0a8
+RedBoot> <userinput>cksum</userinput>
+Computing cksum for area 0x06012800-0x0602f0a8
+POSIX cksum = 2092197813 116904 (0x7cb467b5 0x0001c8a8)
+</screen>
+ </para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** disks *************************************************** -->
+ <refentry id="disks-command">
+ <refnamediv>
+ <refname>disks</refname>
+ <refpurpose>List available disk partitions.</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>disks</command>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+<para>None.</para>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>The <command>disks</command> command is used to list disk partitions recognized by RedBoot.</para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Show what disk partitions are available.
+<screen>
+RedBoot> <userinput>disks</userinput>
+hda1 Linux Swap
+hda2 Linux
+00100000: 00 3E 00 06 00 06 00 06 00 00 00 00 00 00 00 00 |.>..............|
+00100010: 00 00 00 78 00 70 00 60 00 60 00 60 00 60 00 60 |...x.p.`.`.`.`.`|
+</screen>
+ </para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** dump *************************************************** -->
+ <refentry id="dump-command">
+ <refnamediv>
+ <refname>dump</refname>
+ <refpurpose>Display memory.</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>dump</command>
+ <arg choice="req">-b <replaceable>location</replaceable></arg>
+ <arg>-l <replaceable>length</replaceable></arg>
+ <arg>-s</arg>
+ <group>
+ <arg>-1</arg>
+ <arg>-2</arg>
+ <arg>-4</arg>
+ </group>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-b <replaceable>location</replaceable></entry>
+ <entry>Memory address</entry>
+ <entry>Location in memory for start of data.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>-l <replaceable>length</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Length of data</entry>
+ <entry>32</entry>
+ </row>
+ <row>
+ <entry>-s</entry>
+ <entry>Boolean</entry>
+ <entry>Format data using Motorola S-records.</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>-1</entry>
+ <entry></entry>
+ <entry>Access one byte (8 bits) at a time.
+Only the least significant 8 bits of the pattern will be used.</entry>
+ <entry>-1</entry>
+ </row>
+ <row>
+ <entry>-2</entry>
+ <entry></entry>
+ <entry>Access two bytes (16 bits) at a time.
+Only the least significant 16 bits of the pattern will be used.</entry>
+ <entry>-1</entry>
+ </row>
+ <row>
+ <entry>-4</entry>
+ <entry></entry>
+ <entry>Access one word (32 bits) at a time.</entry>
+ <entry>-1</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>Display a range of memory on the system console.</para>
+ <para>The <command>x</command> is a synonym for <command>dump</command>.</para>
+ <para>Note that this command could
+be detrimental if used on memory mapped hardware registers. </para>
+ <para>The memory is displayed at most sixteen bytes per line, first as the
+raw hex value, followed by an ASCII interpretation of the data. </para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Display a buffer, one byte at a time.
+<screen>
+RedBoot> <userinput>mfill -b 0x100000 -l 0x20 -p 0xDEADFACE</userinput>
+RedBoot> <userinput>x -b 0x100000</userinput>
+00100000: CE FA AD DE CE FA AD DE CE FA AD DE CE FA AD DE |................|
+00100010: CE FA AD DE CE FA AD DE CE FA AD DE CE FA AD DE |................|
+</screen>
+</para>
+<para>
+Display a buffer, one short (16 bit) word at a time. Note in this case that
+the ASCII interpretation is suppressed.
+<screen>
+RedBoot> <userinput>dump -b 0x100000 -2</userinput>
+00100000: FACE DEAD FACE DEAD FACE DEAD FACE DEAD
+00100010: FACE DEAD FACE DEAD FACE DEAD FACE DEAD
+</screen>
+</para>
+<para>
+Display a buffer, one word (32 bit) word at a time. Note in this case that
+the ASCII interpretation is suppressed.
+<screen>
+RedBoot> <userinput>dump -b 0x100000 -4</userinput>
+00100000: DEADFACE DEADFACE DEADFACE DEADFACE
+00100010: DEADFACE DEADFACE DEADFACE DEADFACE
+</screen>
+</para>
+<para>
+Display the same buffer, using Motorola S-record format.
+<screen>
+RedBoot> <userinput>dump -b 0x100000 -s</userinput>
+S31500100000CEFAADDECEFAADDECEFAADDECEFAADDE8E
+S31500100010CEFAADDECEFAADDECEFAADDECEFAADDE7E
+</screen>
+</para>
+<para>
+Display a buffer, with visible ASCII strings.
+<screen>
+RedBoot> <userinput>d -b 0xfe00b000 -l 0x80</userinput>
+0xFE00B000: 20 25 70 0A 00 00 00 00 41 74 74 65 6D 70 74 20 | %p.....Attempt |
+0xFE00B010: 74 6F 20 6C 6F 61 64 20 53 2D 72 65 63 6F 72 64 |to load S-record|
+0xFE00B020: 20 64 61 74 61 20 74 6F 20 61 64 64 72 65 73 73 | data to address|
+0xFE00B030: 3A 20 25 70 20 5B 6E 6F 74 20 69 6E 20 52 41 4D |: %p [not in RAM|
+0xFE00B040: 5D 0A 00 00 2A 2A 2A 20 57 61 72 6E 69 6E 67 21 |]...*** Warning!|
+0xFE00B050: 20 43 68 65 63 6B 73 75 6D 20 66 61 69 6C 75 72 | Checksum failur|
+0xFE00B060: 65 20 2D 20 41 64 64 72 3A 20 25 6C 78 2C 20 25 |e - Addr: %lx, %|
+0xFE00B070: 30 32 6C 58 20 3C 3E 20 25 30 32 6C 58 0A 00 00 |02lX &lt;> %02lX...|
+0xFE00B080: 45 6E 74 72 79 20 70 6F 69 6E 74 3A 20 25 70 2C |Entry point: %p,|
+</screen>
+ </para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** help *************************************************** -->
+ <refentry id="help-command">
+ <refnamediv>
+ <refname>help</refname>
+ <refpurpose>Display help on available commands</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>help</command>
+ <arg><replaceable> topic</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><replaceable>topic</replaceable></entry>
+ <entry>String</entry>
+ <entry>Which command to provide help for.</entry>
+ <entry>All commands</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>
+The <command>help</command> command displays information about the available
+RedBoot commands. If a <emphasis>topic</emphasis> is given, then the display
+is restricted to information about that specific command.
+ </para>
+ <para>
+If the command has sub-commands, e.g. <command>fis</command>, then the topic
+specific display will print additional information about the available sub-commands.
+special (ICMP) packets to a specific host. These packets should be automatically
+returned by that host. The command will indicate how many of these round-trips
+were successfully completed.
+ </para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Show generic help. Note that the contents of this display will depend on the various configuration
+options for RedBoot when it was built.
+<screen>
+RedBoot> <userinput>help</userinput>
+Manage aliases kept in FLASH memory
+ alias name [value]
+Manage machine caches
+ cache [ON | OFF]
+Display/switch console channel
+ channel [-1|&lt;channel number&gt;]
+Compute a 32bit checksum [POSIX algorithm] for a range of memory
+ cksum -b &lt;location&gt; -l &lt;length&gt;
+Display (hex dump) a range of memory
+ dump -b &lt;location&gt; [-l &lt;length&gt;] [-s] [-1|-2|-4]
+Manage FLASH images
+ fis {cmds}
+Manage configuration kept in FLASH memory
+ fconfig [-i] [-l] [-n] [-f] [-d] | [-d] nickname [value]
+Execute code at a location
+ go [-w &lt;timeout&gt;] [entry]
+Uncompress GZIP compressed data
+ gunzip -s &lt;location&gt; -d &lt;location&gt;
+Help about help?
+ help [&lt;topic&gt;]
+Read I/O location
+ iopeek [-b &lt;location&gt;] [-1|2|4]
+Write I/O location
+ iopoke [-b &lt;location&gt;] [-1|2|4] -v &lt;value&gt;
+Set/change IP addresses
+ ip_address [-l &lt;local_ip_address&gt;[/&lt;mask_length&gt;]] [-h &lt;server_address&gt;]
+Load a file
+ load [-r] [-v] [-d] [-h &lt;host&gt;] [-m {TFTP | HTTP | {x|y}MODEM -c &lt;channel_number&gt;}]
+ [-b &lt;base_address&gt;] &lt;file_name&gt;
+Compare two blocks of memory
+ mcmp -s &lt;location&gt; -d &lt;location&gt; -l &lt;length&gt; [-1|-2|-4]
+Fill a block of memory with a pattern
+ mfill -b &lt;location&gt; -l &lt;length&gt; -p &lt;pattern&gt;
+ [-1|-2|-4]
+Network connectivity test
+ ping [-v] [-n &lt;count&gt;] [-l &lt;length&gt;] [-t &lt;timeout&gt;] [-r &lt;rate&gt;]
+ [-i &lt;IP_addr&gt;] -h &lt;IP_addr&gt;
+Reset the system
+ reset
+Display RedBoot version information
+ version
+Display (hex dump) a range of memory
+ x -b &lt;location&gt; [-l &lt;length&gt;] [-s] [-1|-2|-4]
+</screen>
+ </para>
+ <para>
+Help about a command with sub-commands.
+<screen>
+RedBoot> <userinput>help fis</userinput>
+Manage FLASH images
+ fis {cmds}
+Create an image
+ fis create -b &lt;mem_base&gt; -l &lt;image_length&gt; [-s &lt;data_length&gt;]
+ [-f &lt;flash_addr&gt;] [-e &lt;entry_point&gt;] [-r &lt;ram_addr&gt;] [-n] &lt;name&gt;
+Display an image from FLASH Image System [FIS]
+ fis delete name
+Erase FLASH contents
+ fis erase -f &lt;flash_addr&gt; -l &lt;length&gt;
+Display free [available] locations within FLASH Image System [FIS]
+ fis free
+Initialize FLASH Image System [FIS]
+ fis init [-f]
+Display contents of FLASH Image System [FIS]
+ fis list [-c] [-d]
+Load image from FLASH Image System [FIS] into RAM
+ fis load [-d] [-b &lt;memory_load_address&gt;] [-c] name
+Write raw data directly to FLASH
+ fis write -f &lt;flash_addr&gt; -b &lt;mem_base&gt; -l &lt;image_length&gt;
+</screen>
+ </para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** iopeek *************************************************** -->
+ <refentry id="iopeek-command">
+ <refnamediv>
+ <refname>iopeek</refname>
+ <refpurpose>Read I/O location</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>iopeek</command>
+ <arg>-b <replaceable> location</replaceable></arg>
+ <group>
+ <arg>-1</arg>
+ <arg>-2</arg>
+ <arg>-4</arg>
+ </group>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-b <replaceable>location</replaceable></entry>
+ <entry>I/O address</entry>
+ <entry>I/O Location.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>-1</entry>
+ <entry></entry>
+ <entry>Access a one byte (8 bit) I/O location.</entry>
+ <entry>-1</entry>
+ </row>
+ <row>
+ <entry>-2</entry>
+ <entry></entry>
+ <entry>Access a two byte (16 bit) I/O location.</entry>
+ <entry>-1</entry>
+ </row>
+ <row>
+ <entry>-4</entry>
+ <entry></entry>
+ <entry>Access a one word (32 bit) I/O location.</entry>
+ <entry>-1</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>Reads a value from the I/O address space.</para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Examine 8 bit value at I/O location 0x3F8.
+<screen>
+RedBoot> <userinput>iopeek -b 0x3f8</userinput>
+0x03f8 = 0x30
+</screen>
+</para>
+ <para>
+Examine 32 bit value at I/O location 0x3f8.
+<screen>
+RedBoot> <userinput>iopeek -b 0x3f8 -4</userinput>
+0x03f8 = 0x03c10065
+</screen>
+</para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** iopoke *************************************************** -->
+ <refentry id="iopoke-command">
+ <refnamediv>
+ <refname>iopoke</refname>
+ <refpurpose>Write I/O location</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>iopoke</command>
+ <arg>-b <replaceable> location</replaceable></arg>
+ <group>
+ <arg>-1</arg>
+ <arg>-2</arg>
+ <arg>-4</arg>
+ </group>
+ <arg>-v <replaceable> value</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-b <replaceable>location</replaceable></entry>
+ <entry>I/O address</entry>
+ <entry>I/O Location.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>-1</entry>
+ <entry></entry>
+ <entry>Access a one byte (8 bit) I/O location.
+Only the 8 least significant bits of value will be used</entry>
+ <entry>-1</entry>
+ </row>
+ <row>
+ <entry>-2</entry>
+ <entry></entry>
+ <entry>Access a two byte (16 bit) I/O location.
+Only the 16 least significant bits of value will be used</entry>
+ <entry>-1</entry>
+ </row>
+ <row>
+ <entry>-4</entry>
+ <entry></entry>
+ <entry>Access a one word (32 bit) I/O location.</entry>
+ <entry>-1</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>Writes a value to the I/O address space.</para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Write 0x0123 to 16 bit I/O location 0x200.
+<screen>
+RedBoot> <userinput>iopoke -b 0x200 -v 0x123 -2</userinput>
+</screen>
+</para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** gunzip *************************************************** -->
+ <refentry id="gunzip-command">
+ <refnamediv>
+ <refname>gunzip</refname>
+ <refpurpose>Uncompress GZIP compressed data</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>gunzip</command>
+ <arg choice="req">-s <replaceable>source</replaceable></arg>
+ <arg choice="req">-d <replaceable>destination</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-s <replaceable>location1</replaceable></entry>
+ <entry>Memory address</entry>
+ <entry>Location of GZIP compressed data to uncompress.</entry>
+ <entry>Value set by last <command>load</command> or <command>fis load</command> command.</entry>
+ </row>
+ <row>
+ <entry>-d <replaceable>location2</replaceable></entry>
+ <entry>Memory address</entry>
+ <entry>Destination to write uncompressed data to.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>Uncompress GZIP compressed data.</para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Uncompress data at location 0x100000 to 0x200000.
+<screen>
+RedBoot> <userinput>gunzip -s 0x100000 -d 0x200000</userinput>
+Decompressed 38804 bytes
+</screen>
+</para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** ip_address *************************************************** -->
+ <refentry id="ip-address-command">
+ <refnamediv>
+ <refname>ip_address</refname>
+ <refpurpose>Set IP addresses</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>ip_address</command>
+ <arg>-b</arg>
+ <arg>-l <replaceable> local_IP_address</replaceable>
+ <arg choice=opt>/<replaceable>netmask_length</replaceable></arg> </arg>
+ <arg>-h <replaceable> server_IP_address</replaceable></arg>
+ <arg>-d <replaceable>
+DNS_server_IP_address</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-b</entry>
+ <entry>Boolean</entry>
+ <entry>Obtain an IP address using BOOTP or DHCP.</entry>
+ <entry>don't use BOOTP/DHCP</entry>
+ </row>
+ <row>
+ <entry>-l <replaceable>
+local_IP_address</replaceable><option>[<replaceable>/netmask_length</replaceable>]</option></entry>
+ <entry>Numeric IP or DNS name</entry>
+ <entry>The IP address RedBoot should use, optionally
+with the network mask length.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>-h <replaceable>
+server_IP_address</replaceable></entry>
+ <entry>Numeric IP or DNS name</entry>
+ <entry>The IP address of the default server. Use of this
+address is implied by other commands, such as
+<command>load</command>.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>-d <replaceable>
+DNS_server_IP_address</replaceable></entry>
+ <entry>Numeric IP or DNS name</entry>
+ <entry>The IP address of the DNS server.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>The <command>ip_address</command> command is used to show and/or change the basic IP
+addresses used by RedBoot. IP addresses may be given as numeric
+values, e.g. 192.168.1.67, or as symbolic names such as www.redhat.com
+if DNS support is enabled.
+ </para>
+ <para>
+The <option>-b</option> option is used to cause the target to perform a bootp or dhcp negotiation to get an IP address.
+ </para>
+ <para>
+The <option>-l</option> option is used to set the IP address used by
+the target device. The network mask length can also be specified
+ </para>
+ <para>
+The <option>-h</option> option is used to set the default server
+address, such as is used by the <command>load</command> command.
+ </para>
+ <para>
+The <option>-d</option> option is used to set the default DNS server
+address which is used for resolving symbolic network addresses. Note
+that an address of 0.0.0.0 will disable DNS lookups.
+ </para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Display the current network settings.
+<screen>
+RedBoot> <userinput>ip_address</userinput>
+IP: 192.168.1.31, Default server: 192.168.1.101, DNS server IP: 0.0.0.0
+</screen>
+</para>
+<para>
+Change the DNS server address.
+<screen>
+RedBoot> <userinput>ip_address -d 192.168.1.101</userinput>
+IP: 192.168.1.31, Default server: 192.168.1.101, DNS server IP: 192.168.1.101
+</screen>
+</para>
+<para>
+Change the default server address.
+<screen>
+RedBoot> <userinput>ip_address -h 192.168.1.104</userinput>
+IP: 192.168.1.31, Default server: 192.168.1.104, DNS server IP: 192.168.1.101
+</screen>
+</para>
+<para>
+Set the IP address to something new, with a 255.255.255.0 netmask
+<screen>
+RedBoot> <userinput>ip_address -l 192.168.1.32/24</userinput>
+IP: 192.168.1.32, Default server: 192.168.1.104, DNS server IP: 192.168.1.101
+</screen>
+ </para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** load *************************************************** -->
+ <refentry id="download-command">
+ <refnamediv>
+ <refname>load</refname>
+ <refpurpose>Download programs or data to the RedBoot platform</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>load</command>
+ <arg>-v </arg>
+ <arg>-d </arg>
+ <arg>-r </arg>
+ <arg>-m
+ <group>
+ <arg choice="req"><group>
+ <arg>xmodem</arg>
+ <arg>ymodem</arg>
+ </group></arg>
+ <arg>tftp</arg>
+ <arg>disk</arg>
+ </group>
+ </arg>
+ <arg>-h <replaceable> server_IP_address</replaceable></arg>
+ <arg>-b <replaceable> location</replaceable></arg>
+ <arg>-c <replaceable> channel</replaceable></arg>
+ <arg><replaceable>file_name</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-v</entry>
+ <entry>Boolean</entry>
+ <entry>Display a small spinner (indicator)
+while the download is in progress. This is just for feedback, especially
+during long loads. Note that the option has no effect when using a
+serial download method since it would interfere with the protocol.</entry>
+ <entry><emphasis>quiet</emphasis></entry>
+ </row>
+ <row>
+ <entry>-d</entry>
+ <entry>Boolean</entry>
+ <entry>Decompress data stream (gzip data)</entry>
+ <entry><emphasis>non-compressed data</emphasis></entry>
+ </row>
+ <row>
+ <entry>-r</entry>
+ <entry>Boolean</entry>
+ <entry>Raw (or binary) data</entry>
+ <entry><emphasis>formatted (S-records, ELF image, etc)</emphasis></entry>
+ </row>
+ <row>
+ <entry>-m tftp</entry>
+ <entry></entry>
+ <entry>Transfer data via the network using <acronym>TFTP</acronym> protocol.</entry>
+ <entry><acronym>TFTP</acronym></entry>
+ </row>
+ <row>
+ <entry>-m http</entry>
+ <entry></entry>
+ <entry>Transfer data via the network using <acronym>HTTP</acronym> protocol.</entry>
+ <entry><acronym>TFTP</acronym></entry>
+ </row>
+ <row>
+ <entry>-m xmodem</entry>
+ <entry></entry>
+ <entry>Transfer data using <emphasis>X-modem</emphasis> protocol.</entry>
+ <entry><acronym>TFTP</acronym></entry>
+ </row>
+ <row>
+ <entry>-m ymodem</entry>
+ <entry></entry>
+ <entry>Transfer data using <emphasis>Y-modem</emphasis> protocol.</entry>
+ <entry><acronym>TFTP</acronym></entry>
+ </row>
+ <row>
+ <entry>-m disk</entry>
+ <entry></entry>
+ <entry>Transfer data from a local disk.</entry>
+ <entry><acronym>TFTP</acronym></entry>
+ </row>
+ <row>
+ <entry>-h <replaceable>server_IP_address</replaceable></entry>
+ <entry>Numeric IP or DNS name</entry>
+ <entry>The IP address of the <acronym>TFTP</acronym> or <acronym>HTTP</acronym> server.</entry>
+ <entry>Value set by <command>ip_address</command></entry>
+ </row>
+ <row>
+ <entry>-b <replaceable>location</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Address in memory to load the data. Formatted data streams will have
+an implied load address which this option may override.</entry>
+ <entry><emphasis>Depends on data format</emphasis></entry>
+ </row>
+ <row>
+ <entry>-c <replaceable>channel</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Specify which I/O channel to
+use for download. This option is only supported when using either
+xmodem or ymodem protocol.</entry>
+ <entry><emphasis>Depends on data format</emphasis></entry>
+ </row>
+ <row>
+ <entry><replaceable>file_name</replaceable></entry>
+ <entry>String</entry>
+ <entry>The name of the file on the <acronym>TFTP</acronym> or <acronym>HTTP</acronym>
+server or the local disk. Details of how this is specified for <acronym>TFTP</acronym> are
+host-specific. For local disk files, the name must be in <emphasis>disk</emphasis>:
+<emphasis>filename</emphasis> format. The disk portion must match one of the disk
+names listed by the <command>disks</command> command.</entry>
+ <entry><emphasis>None</emphasis></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>
+The <command>load</command> command is used to download
+data into the target system. Data can be loaded via a network connection,
+using either the <acronym>TFTP</acronym> or <acronym>HTTP</acronym> protocols, or the console serial connection using the
+X/Y modem protocol. Files may also be loaded directly from local filesystems
+on disk. Files to be downloaded may either be executable images in
+ELF executable program format,
+Motorola S-record (SREC)
+format or raw data.
+ </para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Download a Motorola S-record (or ELF) image, using <acronym>TFTP</acronym>, specifying the
+base memory address.
+<screen>
+RedBoot> <userinput>load redboot.ROM -b 0x8c400000</userinput>
+Address offset = 0x0c400000
+Entry point: 0x80000000, address range: 0x80000000-0x8000fe80
+</screen>
+ </para>
+ <para>
+Download a Motorola S-record (or ELF) image, using <acronym>HTTP</acronym>, specifying the
+host [server] address.
+<screen>
+RedBoot> <userinput>load /redboot.ROM -m HTTP -h 192.168.1.104</userinput>
+Address offset = 0x0c400000
+Entry point: 0x80000000, address range: 0x80000000-0x8000fe80
+</screen>
+ </para>
+ <para>
+Load an ELF file from /dev/hda1 which should be an EXT2 partition:
+<screen>
+RedBoot> <userinput>load -mode disk hda1:hello.elf</userinput>
+Entry point: 0x00020000, address range: 0x00020000-0x0002fd70
+</screen>
+ </para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** mcmp *************************************************** -->
+ <refentry id="mcmp-command">
+ <refnamediv>
+ <refname>mcmp</refname>
+ <refpurpose>Compare two segments of memory</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>mcmp</command>
+ <arg choice="req">-s <replaceable>location1</replaceable></arg>
+ <arg choice="req">-d <replaceable>location1</replaceable></arg>
+ <arg choice="req">-l <replaceable>length</replaceable></arg>
+ <group>
+ <arg>-1</arg>
+ <arg>-2</arg>
+ <arg>-4</arg>
+ </group>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-s <replaceable>location1</replaceable></entry>
+ <entry>Memory address</entry>
+ <entry>Location for start of data.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>-d <replaceable>location2</replaceable></entry>
+ <entry>Memory address</entry>
+ <entry>Location for start of data.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>-l <replaceable>length</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Length of data</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>-1</entry>
+ <entry></entry>
+ <entry>Access one byte (8 bits) at a time.
+Only the least significant 8 bits of the pattern will be used.</entry>
+ <entry>-4</entry>
+ </row>
+ <row>
+ <entry>-2</entry>
+ <entry></entry>
+ <entry>Access two bytes (16 bits) at a time.
+Only the least significant 16 bits of the pattern will be used.</entry>
+ <entry>-4</entry>
+ </row>
+ <row>
+ <entry>-4</entry>
+ <entry></entry>
+ <entry>Access one word (32 bits) at a time.</entry>
+ <entry>-4</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>Compares the contents of two ranges of memory (RAM, ROM, FLASH, etc).</para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Compare two buffers which match (result is <emphasis>quiet</emphasis>).
+<screen>
+RedBoot> <userinput>mfill -b 0x100000 -l 0x20 -p 0xDEADFACE</userinput>
+RedBoot> <userinput>mfill -b 0x200000 -l 0x20 -p 0xDEADFACE</userinput>
+RedBoot> <userinput>mcmp -s 0x100000 -d 0x200000 -l 0x20</userinput>
+</screen>
+</para>
+<para>
+Compare two buffers which don't match.
+Only the first non-matching element is displayed.
+<screen>
+RedBoot> <userinput>mcmp -s 0x100000 -d 0x200000 -l 0x30 -2</userinput>
+Buffers don't match - 0x00100020=0x6000, 0x00200020=0x0000
+</screen>
+ </para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** mcopy *************************************************** -->
+ <refentry id="mcopy-command">
+ <refnamediv>
+ <refname>mcopy</refname>
+ <refpurpose>Copy memory</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>mcopy</command>
+ <arg choice="req">-s <replaceable>source</replaceable></arg>
+ <arg choice="req">-d <replaceable>destination</replaceable></arg>
+ <arg choice="req">-l <replaceable>length</replaceable></arg>
+ <group>
+ <arg>-1</arg>
+ <arg>-2</arg>
+ <arg>-4</arg>
+ </group>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-s <replaceable>location1</replaceable></entry>
+ <entry>Memory address</entry>
+ <entry>Location of data to copy.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>-d <replaceable>location2</replaceable></entry>
+ <entry>Memory address</entry>
+ <entry>Destination for copied data.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>-l <replaceable>length</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Length of data</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>-1</entry>
+ <entry></entry>
+ <entry>Copy one byte (8 bits) at a time.</entry>
+ <entry>-4</entry>
+ </row>
+ <row>
+ <entry>-2</entry>
+ <entry></entry>
+ <entry>Copy two bytes (16 bits) at a time.</entry>
+ <entry>-4</entry>
+ </row>
+ <row>
+ <entry>-4</entry>
+ <entry></entry>
+ <entry>Copy one word (32 bits) at a time.</entry>
+ <entry>-4</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>Copies memory (RAM, ROM, FLASH, etc) from one area to another.</para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Copy 16 bits at a time.
+<screen>
+RedBoot> <userinput>mfill -b 0x100000 -l 0x20 -2 -p 0xDEAD</userinput>
+RedBoot> <userinput>mfill -b 0x200000 -l 0x20 -2 -p 0x0</userinput>
+RedBoot> <userinput>dump -b 0x200000 -l 0x20 -2</userinput>
+00200000: 0000 0000 0000 0000 0000 0000 0000 0000
+00200010: 0000 0000 0000 0000 0000 0000 0000 0000
+RedBoot> <userinput>mcopy -s 0x100000 -d 0x200000 -2 -l 0x20</userinput>
+RedBoot> <userinput>dump -b 0x200000 -l 0x20 -2</userinput>
+00200000: DEAD DEAD DEAD DEAD DEAD DEAD DEAD DEAD
+00200010: DEAD DEAD DEAD DEAD DEAD DEAD DEAD DEAD
+</screen>
+</para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** mfill *************************************************** -->
+ <refentry id="mfill-command">
+ <refnamediv>
+ <refname>mfill</refname>
+ <refpurpose>Fill RAM with a specified pattern</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>mfill</command>
+ <arg choice="req">-b <replaceable>location</replaceable></arg>
+ <arg choice="req">-l <replaceable>length</replaceable></arg>
+ <arg choice="req">-p <replaceable>value</replaceable></arg>
+ <group>
+ <arg>-1</arg>
+ <arg>-2</arg>
+ <arg>-4</arg>
+ </group>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-b <replaceable>location</replaceable></entry>
+ <entry>Memory address</entry>
+ <entry>Location in memory for start of data.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>-l <replaceable>length</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Length of data</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>-p <replaceable>pattern</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Data value to fill with</entry>
+ <entry>0</entry>
+ </row>
+ <row>
+ <entry>-1</entry>
+ <entry></entry>
+ <entry>Access one byte (8 bits) at a time.
+Only the least significant 8 bits of the pattern will be used.</entry>
+ <entry>-4</entry>
+ </row>
+ <row>
+ <entry>-2</entry>
+ <entry></entry>
+ <entry>Access two bytes (16 bits) at a time.
+Only the least significant 16 bits of the pattern will be used.</entry>
+ <entry>-4</entry>
+ </row>
+ <row>
+ <entry>-4</entry>
+ <entry></entry>
+ <entry>Access one word (32 bits) at a time.</entry>
+ <entry>-4</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>Fills a range of memory with the given pattern.</para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Fill a buffer with zeros.
+<screen>
+RedBoot> <userinput>x -b 0x100000 -l 0x20</userinput>
+00100000: 00 3E 00 06 00 06 00 06 00 00 00 00 00 00 00 00 |.>..............|
+00100010: 00 00 00 78 00 70 00 60 00 60 00 60 00 60 00 60 |...x.p.`.`.`.`.`|
+RedBoot> <userinput>mfill -b 0x100000 -l 0x20</userinput>
+RedBoot> <userinput>x -b 0x100000 -l 0x20</userinput>
+00100000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00100010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+</screen>
+</para>
+<para>
+Fill a buffer with a pattern.
+<screen>
+RedBoot> <userinput>mfill -b 0x100000 -l 0x20 -p 0xDEADFACE</userinput>
+RedBoot> <userinput>x -b 0x100000 -l 0x20</userinput>
+00100000: CE FA AD DE CE FA AD DE CE FA AD DE CE FA AD DE |................|
+00100010: CE FA AD DE CE FA AD DE CE FA AD DE CE FA AD DE |................|
+</screen>
+ </para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** ping *************************************************** -->
+ <refentry id="ping-command">
+ <refnamediv>
+ <refname>ping</refname>
+ <refpurpose>Verify network connectivity</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>ping</command>
+ <arg>-v </arg>
+ <arg>-i <replaceable> local_IP_address</replaceable></arg>
+ <arg>-l <replaceable> length</replaceable></arg>
+ <arg>-n <replaceable> count</replaceable></arg>
+ <arg>-t <replaceable> timeout</replaceable></arg>
+ <arg>-r <replaceable> rate</replaceable></arg>
+ <arg choice="req">-h <replaceable> server_IP_address</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-v</entry>
+ <entry>Boolean</entry>
+ <entry>Be verbose, displaying information about each packet sent.</entry>
+ <entry><emphasis>quiet</emphasis></entry>
+ </row>
+ <row>
+ <entry>-n <replaceable>local_IP_address</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Controls the number of packets to be sent.</entry>
+ <entry>10</entry>
+ </row>
+ <row>
+ <entry>-i <replaceable>local_IP_address</replaceable></entry>
+ <entry>Numeric IP or DNS name</entry>
+ <entry>The IP address RedBoot should use.</entry>
+ <entry>Value set by <command>ip_address</command></entry>
+ </row>
+ <row>
+ <entry>-h <replaceable>server_IP_address</replaceable></entry>
+ <entry>Numeric IP or DNS name</entry>
+ <entry>The IP address of the host to contact.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>-l <replaceable>length</replaceable></entry>
+ <entry>Number</entry>
+ <entry>The length of the ICMP data payload.</entry>
+ <entry>64</entry>
+ </row>
+ <row>
+ <entry>-r <replaceable>length</replaceable></entry>
+ <entry>Number</entry>
+ <entry>How fast to deliver packets, i.e. time between successive sends.
+A value of 0 sends packets as quickly as possible.</entry>
+ <entry>1000ms (1 second)</entry>
+ </row>
+ <row>
+ <entry>-t <replaceable>length</replaceable></entry>
+ <entry>Number</entry>
+ <entry>How long to wait for the round-trip to complete, specified in milliseconds.</entry>
+ <entry>1000ms (1 second)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>
+The <command>ping</command> command checks the connectivity of the local network by sending
+special (ICMP) packets to a specific host. These packets should be automatically
+returned by that host. The command will indicate how many of these round-trips
+were successfully completed.
+ </para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Test connectivity to host 192.168.1.101.
+<screen>
+RedBoot> <userinput>ping -h 192.168.1.101</userinput>
+Network PING - from 192.168.1.31 to 192.168.1.101
+PING - received 10 of 10 expected
+</screen>
+</para>
+<para>
+Test connectivity to host 192.168.1.101, with verbose reporting.
+<screen>
+RedBoot> <userinput>ping -h 192.168.1.101 -v -n 4</userinput>
+Network PING - from 192.168.1.31 to 192.168.1.101
+ seq: 1, time: 1 (ticks)
+ seq: 2, time: 1 (ticks)
+ seq: 3, time: 1 (ticks)
+ seq: 4, time: 1 (ticks)
+PING - received 10 of 10 expected
+</screen>
+</para>
+<para>
+<screen>
+Test connectivity to a non-existent host (192.168.1.109).
+RedBoot> <userinput>ping -h 192.168.1.109 -v -n 4</userinput>
+PING: Cannot reach server '192.168.1.109' (192.168.1.109)
+</screen>
+ </para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** reset *************************************************** -->
+ <refentry id="reset-command">
+ <refnamediv>
+ <refname>reset</refname>
+ <refpurpose>Reset the device</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>reset</command>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+<para><emphasis>None</emphasis></para>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>
+The <command>reset</command> command causes the target platform to be reset.
+Where possible (hardware support permitting), this will be
+equivalent to a power-on reset condition.
+ </para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Reset the platform.
+<screen>
+RedBoot> <userinput>reset</userinput>
+... Resetting.+... Waiting for network card: .
+Socket Communications, Inc: Low Power Ethernet CF Revision C 5V/3.3V 08/27/98
+Ethernet eth0: MAC address 00:c0:1b:00:ba:28
+IP: 192.168.1.29, Default server: 192.168.1.101
+
+RedBoot(tm) bootstrap and debug environment [ROM]
+Non-certified release, version UNKNOWN - built 10:41:41, May 14 2002
+
+Platform: Compaq iPAQ Pocket PC (StrongARM 1110)
+Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
+
+RAM: 0x00000000-0x01fc0000, 0x00014748-0x01f71000 available
+FLASH: 0x50000000 - 0x51000000, 64 blocks of 0x00040000 bytes each.
+RedBoot>
+</screen>
+ </para>
+ </refsect1>
+ </refentry>
+
+
+<!-- ******** version *************************************************** -->
+ <refentry id="version-command">
+ <refnamediv>
+ <refname>version</refname>
+ <refpurpose>Display RedBoot version information</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>version</command>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <para><emphasis>None</emphasis></para>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>The <command>version</command> command simply displays version information about RedBoot.
+ </para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Display RedBoot's version.
+<screen>
+RedBoot> <userinput>version</userinput>
+RedBoot(tm) debug environment - built 09:12:03, Feb 12 2001
+Platform: XYZ (PowerPC 860)
+Copyright (C) 2000, 2001, Red Hat, Inc.
+RAM: 0x00000000-0x00400000
+</screen>
+ </para>
+ </refsect1>
+ </refentry>
+
+</sect1>
+
+<sect1 id="Flash-Image-System">
+<title>Flash Image System (FIS)</title>
+<para><indexterm><primary>commands</primary><secondary>flash image system
+</secondary></indexterm><indexterm><primary>flash image system commands</primary>
+</indexterm><indexterm><primary>commands</primary><secondary>fis</secondary>
+</indexterm><indexterm><primary>fis commands</primary></indexterm>If the platform
+has flash memory, RedBoot can use this for image storage. Executable images,
+as well as data, can be stored in flash in a simple file store. The <command>
+fis</command> command (fis is short for Flash Image System) is used to
+manipulate and maintain flash images.
+</para>
+
+<!-- ******** fis init ************************************************ -->
+
+ <refentry id="fis-init-command">
+ <refnamediv>
+ <refname>fis init</refname>
+ <refpurpose>Initialize Flash Image System (FIS)</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>fis init</command>
+ <arg><replaceable>-f</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-f</entry>
+ <entry></entry>
+ <entry>All blocks of flash memory (except for the boot
+ blocks) will be erased as part of the initialization
+ procedure.</entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+
+ <para>This command is used to initialize the Flash Image System
+ (FIS). It should normally only be executed once, when RedBoot
+ is first installed on the hardware. If the reserved images or
+ their sizes in the FIS change, due to a different configuration
+ of RedBoot being used, it may be necessary to issue the command
+ again though.
+
+ <note><para>Subsequent executions will cause loss of
+ previously stored information in the FIS.</para></note>
+ </para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Initialize the FIS directory.
+<screen>
+RedBoot> <userinput>fis init</userinput>
+About to initialize [format] flash image system - continue (y/n)? <userinput>y</userinput>
+*** Initialize FLASH Image System
+ Warning: device contents not erased, some blocks may not be usable
+... Erase from 0x00070000-0x00080000: .
+... Program from 0x0606f000-0x0607f000 at 0x00070000: .
+</screen>
+</para>
+
+ <para>
+Initialize the FIS directory and all of flash memory, except for first
+blocks of the flash where the boot monitor resides.
+<screen>
+RedBoot> <userinput>fis init -f</userinput>
+About to initialize [format] flash image system - continue (y/n)? <userinput>y</userinput>
+*** Initialize FLASH Image System
+... Erase from 0x00020000-0x00070000: .....
+... Erase from 0x00080000-0x00080000:
+... Erase from 0x00070000-0x00080000: .
+... Program from 0x0606f000-0x0607f000 at 0x00070000: .
+</screen>
+</para>
+</refsect1>
+</refentry>
+
+<!-- ******** fis list ************************************************ -->
+ <refentry id="fis-list-command">
+ <refnamediv>
+ <refname>fis list</refname>
+ <refpurpose>List Flash Image System directory</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>fis list</command>
+ <arg><replaceable>-f</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-c</entry>
+ <entry></entry>
+ <entry>Show image checksum instead of memory address
+ (column <computeroutput>Mem addr</computeroutput> is
+ replaced by
+ <computeroutput>Checksum</computeroutput>).</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>-d</entry>
+ <entry></entry>
+ <entry>Show image data length instead of amount of flash
+ occupied by image (column
+ <computeroutput>Length</computeroutput> is replaced by
+ <computeroutput>Datalen</computeroutput>).</entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+<para>This command lists the images currently available in the FIS. Certain
+images used by RedBoot have fixed names and have reserved slots in the
+FIS (these can be seen after using the <command>fis init</command>
+command). Other images can be manipulated by the user.</para>
+<note><para>The images are listed in the order they appear in the FIS
+directory, not by name or creation time.</para></note>
+ </refsect1>
+
+ <refsect1>
+ <title>Examples</title>
+ <para>
+List the FIS directory.
+<screen>
+RedBoot> <userinput>fis list</userinput>
+Name FLASH addr Mem addr Length Entry point
+RedBoot 0x00000000 0x00000000 0x00020000 0x00000000
+RedBoot config 0x0007F000 0x0007F000 0x00001000 0x00000000
+FIS directory 0x00070000 0x00070000 0x0000F000 0x00000000
+</screen>
+</para>
+
+ <para>
+List the FIS directory, with image checksums substituted for
+memory addresses.
+<screen>
+RedBoot> <userinput>fis list -c</userinput>
+Name FLASH addr Checksum Length Entry point
+RedBoot 0x00000000 0x00000000 0x00020000 0x00000000
+RedBoot config 0x0007F000 0x00000000 0x00001000 0x00000000
+FIS directory 0x00070000 0x00000000 0x0000F000 0x00000000
+</screen>
+</para>
+
+ <para>
+List the FIS directory with image data lengths substituted for flash
+block reservation lengths.
+<screen>
+RedBoot> <userinput>fis list -d</userinput>
+Name FLASH addr Mem addr Datalen Entry point
+RedBoot 0x00000000 0x00000000 0x00000000 0x00000000
+RedBoot config 0x0007F000 0x0007F000 0x00000000 0x00000000
+FIS directory 0x00070000 0x00070000 0x00000000 0x00000000
+</screen>
+</para>
+</refsect1>
+</refentry>
+
+<!-- ******** fis free ************************************************ -->
+
+ <refentry id="fis-free-command">
+ <refnamediv>
+ <refname>fis free</refname>
+ <refpurpose>Free flash image</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>fis free</command>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Description</title>
+
+
+<para>This command shows which areas of the flash memory are currently
+not in use. When a block contains non-erased contents it is considered
+in use. Since it is possible to force an image to be loaded at a
+particular flash location, this command can be used to check whether
+that location is in use by any other image.</para>
+
+<note><para>There is currently no cross-checking between actual flash
+contents and the FIS directory, which mans that there could be a
+segment of flash which is not erased that does not correspond to a
+named image, or vice-versa.</para></note>
+ </refsect1>
+
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Show free flash areas.
+<screen>
+RedBoot> <userinput>fis free</userinput>
+ 0xA0040000 .. 0xA07C0000
+ 0xA0840000 .. 0xA0FC0000
+</screen></para>
+</refsect1>
+</refentry>
+
+<!-- ******** fis create ************************************************ -->
+
+ <refentry id="fis-create-command">
+ <refnamediv>
+ <refname>fis create</refname>
+ <refpurpose>Create flash image</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>fis create</command>
+ <arg choice="req">-b <replaceable> data address</replaceable></arg>
+ <arg choice="req">-l <replaceable> length</replaceable></arg>
+ <arg>-f <replaceable> flash address</replaceable></arg>
+ <arg>-e <replaceable> entry</replaceable></arg>
+ <arg>-r <replaceable> relocation address</replaceable></arg>
+ <arg>-s <replaceable> data length</replaceable></arg>
+ <arg>-n </arg>
+ <arg><replaceable>name</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-b</entry>
+ <entry>Number</entry>
+ <entry>Address of data to be written to the flash.</entry>
+ <entry>Address of last loaded file. If not set in a load
+ operation, it must be specified.</entry>
+ </row>
+ <row>
+ <entry>-l</entry>
+ <entry>Number</entry>
+ <entry>Length of flash area to occopy. If specified, and
+ the named image already exists, the length must match
+ the value in the FIS directory.</entry>
+ <entry>Length of area reserved in FIS directory if the
+ image already exists, or the length of the last loaded
+ file. If neither are set, it must be specified.</entry>
+ </row>
+ <row>
+ <entry>-f</entry>
+ <entry>Number</entry>
+ <entry>Address of flash area to occopy.</entry>
+ <entry>The address of an area reserved in the FIS
+ directory for extant images. Otherwise the first free block
+ which is large enough will be used.</entry>
+ </row>
+ <row>
+ <entry>-e</entry>
+ <entry>Number</entry>
+ <entry>Entry address for an executable image, used by
+ the <command>fis load</command> command.</entry>
+ <entry>The entry address of last loaded file.</entry>
+ </row>
+ <row>
+ <entry>-r</entry>
+ <entry>Number</entry>
+ <entry>Address where the image should be relocated to by
+ the <command>fis load</command> command. This is only
+ relevant for images that will be loaded with the
+ <command>fis load</command> command.</entry>
+ <entry>The load address of the last loaded file.</entry>
+ </row>
+ <row>
+ <entry>-s</entry>
+ <entry>Number</entry>
+ <entry>Actual length of data written to image. This is
+ used to control the range over which the checksum is
+ made.</entry>
+ <entry>It defaults to the length of the last loaded
+ file.</entry>
+ </row>
+ <row>
+ <entry>-n</entry>
+ <entry></entry>
+ <entry>When set, no image data will be written to the
+ flash. Only the FIS directory will be updated.</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><replaceable>name</replaceable></entry>
+ <entry>String</entry>
+ <entry>Name of flash image.</entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+<para>This command creates an image in the FIS directory. The data for the
+image must exist in RAM memory before the copy. Typically, you would use the
+RedBoot <command>load</command> command to load file into
+RAM and then the <command>fis create</command> command to write
+it to a flash image.</para>
+</refsect1>
+
+ <refsect1>
+ <title>Examples</title>
+ <para>Trying to create an extant image, will require the action
+ to be verified.
+<screen>
+RedBoot> <userinput>fis create RedBoot -f 0xa0000000 -b 0x8c400000 -l 0x20000</userinput>
+An image named &lsquo;RedBoot&rsquo; exists - continue (y/n)? <userinput>n</userinput>
+</screen>
+</para>
+
+<para>Create a new test image, let the command find a suitable place.
+<screen>
+RedBoot> <userinput>fis create junk -b 0x8c400000 -l 0x20000</userinput>
+... Erase from 0xa0040000-0xa0060000: .
+... Program from 0x8c400000-0x8c420000 at 0xa0040000: .
+... Erase from 0xa0fe0000-0xa1000000: .
+... Program from 0x8c7d0000-0x8c7f0000 at 0xa0fe0000: .
+</screen>
+</para>
+
+<para>Update the RedBoot[RAM] image.
+<screen>
+RedBoot> <userinput>load redboot_RAM.img</userinput>
+Entry point: 0x060213c0, address range: 0x06020000-0x06036cc0
+RedBoot> <userinput>fis create RedBoot[RAM]</userinput>
+No memory address set.
+An image named 'RedBoot[RAM]' exists - continue (y/n)? <userinput>y</userinput>
+* CAUTION * about to program 'RedBoot[RAM]'
+ at 0x00020000..0x00036cbf from 0x06020000 - continue (y/n)? <userinput>y</userinput>
+... Erase from 0x00020000-0x00040000: ..
+... Program from 0x06020000-0x06036cc0 at 0x00020000: ..
+... Erase from 0x00070000-0x00080000: .
+... Program from 0x0606f000-0x0607f000 at 0x00070000: .
+</screen>
+</para>
+</refsect1>
+</refentry>
+
+<!-- ******** fis load ************************************************ -->
+
+ <refentry id="fis-load-command">
+ <refnamediv>
+ <refname>fis load</refname>
+ <refpurpose>Load flash image</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>fis load</command>
+ <arg>-b <replaceable> load address</replaceable></arg>
+ <arg>-c </arg>
+ <arg>-d </arg>
+ <arg><replaceable>name</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-b</entry>
+ <entry>Number</entry>
+ <entry>Address the image should be loaded to. Executable
+ images normally load at the location to which the file
+ was linked. This option allows the image to be loaded to
+ a specific memory location, possibly overriding any
+ assumed location.</entry>
+ <entry>If not specified, the address associated with the
+ image in the FIS directory will be used.</entry>
+ </row>
+ <row>
+ <entry>-c</entry>
+ <entry></entry>
+ <entry>Compute and print the checksum of the image data
+ after it has been loaded into memory.</entry>
+ </row>
+ <row>
+ <entry>-d</entry>
+ <entry></entry>
+ <entry>Decompress gzipped image while copying it from
+ flash to RAM.</entry>
+ </row>
+ <row>
+ <entry><replaceable>name</replaceable></entry>
+ <entry>String</entry>
+ <entry>The name of the file, as shown in the FIS
+ directory.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+<para>This command is used to transfer an image from flash memory to RAM.
+</para>
+<para>Once the image has been loaded, it may be executed using the
+<command>go</command> command.</para>
+</refsect1>
+
+ <refsect1>
+ <title>Examples</title>
+<para>Load and run RedBoot[RAM] image.
+<screen>
+RedBoot> <userinput>fis load RedBoot[RAM]</userinput>
+RedBoot> <userinput>go</userinput>
+</screen>
+</para>
+</refsect1>
+</refentry>
+
+<!-- ******** fis delete ************************************************ -->
+
+ <refentry id="fis-delete-command">
+ <refnamediv>
+ <refname>fis delete</refname>
+ <refpurpose>Delete flash image</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>fis delete</command>
+ <arg choice="req"><replaceable>name</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><replaceable>name</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Name of image that should be deleted.</entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+<para>This command removes an image from the FIS. The flash memory will be
+erased as part of the execution of this command, as well as removal of the
+name from the FIS directory.</para>
+
+<note><para>Certain images are reserved by RedBoot and cannot be deleted.
+RedBoot will issue a warning if this is attempted.</para></note>
+</refsect1>
+ <refsect1>
+ <title>Examples</title>
+<para>
+<screen>
+RedBoot> <userinput>fis list</userinput>
+Name flash addr Mem addr Length Entry point
+RedBoot 0xA0000000 0xA0000000 0x020000 0x80000000
+RedBoot config 0xA0FC0000 0xA0FC0000 0x020000 0x00000000
+FIS directory 0xA0FE0000 0xA0FE0000 0x020000 0x00000000
+junk 0xA0040000 0x8C400000 0x020000 0x80000000
+RedBoot> <userinput>fis delete junk</userinput>
+Delete image &lsquo;junk&rsquo; - continue (y/n)? <userinput>y</userinput>
+... Erase from 0xa0040000-0xa0060000: .
+... Erase from 0xa0fe0000-0xa1000000: .
+... Program from 0x8c7d0000-0x8c7f0000 at 0xa0fe0000: .
+</screen>
+</para>
+</refsect1>
+</refentry>
+
+<!-- ******** fis lock ************************************************ -->
+
+ <refentry id="fis-lock-command">
+ <refnamediv>
+ <refname>fis lock</refname>
+ <refpurpose>Lock flash area</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>fis lock</command>
+ <arg choice="req">-f <replaceable>flash_address</replaceable></arg>
+ <arg choice="req">-l <replaceable>length</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><replaceable>flash_address</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Address of area to be locked.</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><replaceable>length</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Length of area to be locked.</entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+<para>This command is used to write-protect (lock) a portion of flash memory,
+to prevent accidental overwriting of images. In order to make make any modifications
+to the flash, a matching <command>fis unlock</command> command must be
+issued. This command is optional and will only be provided on hardware
+which can support write-protection of the flash space.</para>
+<note>
+<para>Depending on the system, attempting to write to write-protected flash
+may generate errors or warnings, or be benignly quiet. </para>
+</note>
+</refsect1>
+
+ <refsect1>
+ <title>Examples</title>
+<para>Lock an area of the flash
+<screen>
+RedBoot> <userinput>fis lock -f 0xa0040000 -l 0x20000</userinput>
+... Lock from 0xa0040000-0xa0060000: .
+</screen>
+</para>
+</refsect1>
+</refentry>
+
+<!-- ******** fis unlock ************************************************ -->
+
+ <refentry id="fis-unlock-command">
+ <refnamediv>
+ <refname>fis unlock</refname>
+ <refpurpose>Unlock flash area</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>fis unlock</command>
+ <arg choice="req">-f <replaceable>flash_address</replaceable></arg>
+ <arg choice="req">-l <replaceable>length</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><replaceable>flash_address</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Address of area to be unlocked.</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><replaceable>length</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Length of area to be unlocked.</entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+<para>This command is used to unlock a portion of flash memory forcibly, allowing
+it to be updated. It must be issued for regions which have been locked before
+the FIS can reuse those portions of flash.</para>
+<note>
+<para>Some flash devices power up in locked state and always need to
+be manually unlocked before they can be written to.</para></note>
+</refsect1>
+
+ <refsect1>
+ <title>Examples</title>
+<para>Unlock an area of the flash
+<screen>
+RedBoot> <userinput>fis unlock -f 0xa0040000 -l 0x20000</userinput>
+... Unlock from 0xa0040000-0xa0060000: .
+</screen>
+</para>
+</refsect1>
+</refentry>
+
+<!-- ******** fis erase ************************************************ -->
+
+ <refentry id="fis-erase-command">
+ <refnamediv>
+ <refname>fis erase</refname>
+ <refpurpose>Erase flash area</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>fis erase</command>
+ <arg choice="req">-f <replaceable>flash_address</replaceable></arg>
+ <arg choice="req">-l <replaceable>length</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><replaceable>flash_address</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Address of area to be erased.</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><replaceable>length</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Length of area to be erased.</entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+<para>This command is used to erase a portion of flash memory forcibly. There
+is no cross-checking to ensure that the area being erased does not correspond
+to an existing image.</para>
+</refsect1>
+
+ <refsect1>
+ <title>Examples</title>
+<para>Erase an area of the flash
+<screen>
+RedBoot> <userinput>fis erase -f 0xa0040000 -l 0x20000</userinput>
+... Erase from 0xa0040000-0xa0060000: .
+</screen>
+</para>
+</refsect1>
+</refentry>
+
+<!-- ******** fis write ************************************************ -->
+
+ <refentry id="fis-write-command">
+ <refnamediv>
+ <refname>fis write</refname>
+ <refpurpose>Write flash area</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>fis write</command>
+ <arg choice="req">-b <replaceable>mem_address</replaceable></arg>
+ <arg choice="req">-l <replaceable>length</replaceable></arg>
+ <arg choice="req">-f <replaceable>flash_address</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><replaceable>mem_address</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Address of data to be written to flash.</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><replaceable>length</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Length of data to be writtem.</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><replaceable>flash_address</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Address of flash to write to.</entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+<para>This command is used to write data from memory to flash. There
+is no cross-checking to ensure that the area being written to does not
+correspond to an existing image.</para>
+</refsect1>
+
+ <refsect1>
+ <title>Examples</title>
+<para>Write an area of data to the flash
+<screen>
+RedBoot> <userinput>fis write -b 0x0606f000 -l 0x1000 -f 0x00020000</userinput>
+* CAUTION * about to program FLASH
+ at 0x00020000..0x0002ffff from 0x0606f000 - continue (y/n)? <userinput>y</userinput>
+... Erase from 0x00020000-0x00030000: .
+... Program from 0x0606f000-0x0607f000 at 0x00020000: .
+</screen>
+</para>
+</refsect1>
+</refentry>
+
+</sect1>
+<sect1 id="Persistent-State-Flash">
+<title>Persistent State Flash-based Configuration and Control</title>
+<para><indexterm><primary>persistent state flash-based configuration and control
+</primary></indexterm><indexterm><primary>flash-based configuration and control
+</primary></indexterm><indexterm><primary>configuration and control</primary>
+<secondary>flash-based</secondary></indexterm></para>
+<para>RedBoot provides flash management support for storage in the flash memory
+of multiple executable images and of non-volatile information such as IP addresses
+and other network information.</para>
+<para>RedBoot on platforms that support flash based configuration information
+will report the following message the first time that RedBoot is booted on
+the target:</para>
+<screen>flash configuration checksum error or invalid key</screen>
+<para>This error can be ignored if no flash based configuration is desired,
+or can be silenced by running the <command>fconfig</command>
+command as described below. At this point you may also wish to run the <command>
+fis init</command> command. See other fis commands in <xref linkend="Flash-Image-System">.
+</para>
+<para>Certain control and configuration information used by RedBoot can be
+stored in flash. </para>
+<para>The details of what information is maintained in flash differ, based
+on the platform and the configuration. However, the basic operation used to
+maintain this information is the same. Using the <command>fconfig -l
+</command> command, the information may be displayed and/or changed.
+</para>
+<para>If the optional flag <computeroutput>-i</computeroutput> is specified,
+then the configuration database will be reset to its default
+state. This is also needed the first time RedBoot is installed on the
+target, or when updating to a newer RedBoot with different
+configuration keys.
+</para>
+<para>If the optional flag <computeroutput>-l</computeroutput> is specified,
+the configuration data is simply listed. Otherwise, each configuration parameter
+will be displayed and you are given a chance to change it. The entire value
+must be typed - typing just carriage return will leave a value unchanged.
+Boolean values may be entered using the first letter (<computeroutput>t</computeroutput>
+for true, <computeroutput>f</computeroutput> for false). At any time the editing
+process may be stopped simply by entering a period (.) on the line. Entering
+the caret (^) moves the editing back to the previous item. See &ldquo;RedBoot
+Editing Commands&rdquo;, <xref linkend="RedBoot-Editing-Commands">. </para>
+<para>If any changes are made in the configuration, then the updated data
+will be written back to flash after getting acknowledgment from the user.
+</para>
+<para>
+If the optional flag <computeroutput>-n</computeroutput> is specified
+(with or without <computeroutput>-l</computeroutput>) then &ldquo;nicknames&rdquo;
+of the entries are used. These are shorter and less descriptive than
+&ldquo;full&rdquo; names. The full name may also be displayed by adding the
+<computeroutput>-f</computeroutput> flag.</para>
+<para>The reason for telling you nicknames is that a quick way to set a single
+entry is provided, using the format
+<screen>
+ RedBoot> <userinput>fconfig <replaceable>nickname</replaceable> <replaceable>value
+</replaceable></userinput></screen>
+If no
+value is supplied, the command will list and prompt for only that entry.
+If a value is supplied, then the entry will be set to that value. You will
+be prompted whether to write the new information into flash if any change
+was made. For example
+<screen>
+ RedBoot> <userinput>fconfig -l -n</userinput>
+ boot_script: false
+ bootp: false
+ bootp_my_ip: 10.16.19.176
+ bootp_server_ip: 10.16.19.66
+ dns_ip: 10.16.19.1
+ gdb_port: 9000
+ net_debug: false
+ RedBoot> <userinput>fconfig bootp_my_ip 10.16.19.177</userinput>
+ bootp_my_ip: 10.16.19.176 Setting to 10.16.19.177
+ Update RedBoot non-volatile configuration - continue (y/n)? <userinput>y</userinput>
+ ... Unlock from 0x507c0000-0x507e0000: .
+ ... Erase from 0x507c0000-0x507e0000: .
+ ... Program from 0x0000a8d0-0x0000acd0 at 0x507c0000: .
+ ... Lock from 0x507c0000-0x507e0000: .
+ RedBoot>
+</screen>
+</para><para>
+Additionally, nicknames can be used like aliases via the format %{nickname}.
+This allows the values stored by <userinput>fconfig</userinput> to be used
+directly by scripts and commands.
+</para>
+<para>Depending on how your terminal program is connected and its
+capabilities, you might find that you are unable to use line-editing to
+delete the &lsquo;old&rsquo; value when using the default behaviour of
+<command>fconfig <replaceable>nickname</replaceable></command> or just
+plain <command>fconfig</command>, as shown in this example:
+<screen>
+RedBoot> <userinput>fco bootp</userinput>
+bootp: false&lowbar;
+</screen>
+The user deletes the word &ldquo;false;&rdquo and enters &ldquo;true&rdquo;
+so the display looks like this:
+<screen>
+RedBoot> <userinput>fco bootp</userinput>
+bootp: <userinput>true</userinput>
+Update RedBoot non-volatile configuration - continue (y/n)? y
+... Unlock from ...
+RedBoot> &lowbar;
+</screen>
+</para>
+<para>To edit when you cannot backspace, use the optional flag
+<computeroutput>-d</computeroutput> (for &ldquo;dumb terminal&rdquo;)
+to provide a simpler interface thus:
+<screen>
+RedBoot> <userinput>fco -d bootp</userinput>
+bootp: false ? &lowbar;
+</screen>
+and you enter the value in the obvious manner thus:
+<screen>
+RedBoot> <userinput>fco -d bootp</userinput>
+bootp: false ? <userinput>true</userinput>
+Update RedBoot non-volatile configuration - continue (y/n)? y
+... Unlock from ...
+RedBoot> &lowbar;
+</screen>
+</para>
+<para>One item which is always present in the configuration data is the ability
+to execute a script at boot time. A sequence of RedBoot commands can be entered
+which will be executed when the system starts up. Optionally, a time-out period
+can be provided which allows the user to abort the startup script and proceed
+with normal command processing from the console. </para>
+<para><screen>
+RedBoot> <userinput>fconfig -l</userinput>
+Run script at boot: false
+Use BOOTP for network configuration: false
+Local IP address: 192.168.1.29
+Default server IP address: 192.168.1.101
+DNS server IP address: 192.168.1.1
+GDB connection port: 9000
+Network debug at boot time: false
+</screen></para>
+<para>The following example sets a boot script and then shows it running.
+ </para>
+<para>
+<screen>
+RedBoot> <userinput>fconfig</userinput>
+Run script at boot: false <userinput>t</userinput>
+ Boot script:
+Enter script, terminate with empty line
+>> <userinput>fi li</userinput>
+ Boot script timeout: 0 <userinput>10</userinput>
+Use BOOTP for network configuration: false .
+Update RedBoot non-volatile configuration - continue (y/n)? <userinput>y</userinput>
+... Erase from 0xa0fc0000-0xa0fe0000: .
+... Program from 0x8c021f60-0x8c022360 at 0xa0fc0000: .
+RedBoot>
+RedBoot(tm) debug environment - built 08:22:24, Aug 23 2000
+Copyright (C) 2000, Red Hat, Inc.
+
+
+RAM: 0x8c000000-0x8c800000
+flash: 0xa0000000 - 0xa1000000, 128 blocks of 0x00020000 bytes ea.
+Socket Communications, Inc: Low Power Ethernet CF Revision C \
+5V/3.3V 08/27/98 IP: 192.168.1.29, Default server: 192.168.1.101 \
+== Executing boot script in 10 seconds - enter ^C to abort
+RedBoot> <userinput>fi li</userinput>
+Name flash addr Mem addr Length Entry point
+RedBoot 0xA0000000 0xA0000000 0x020000 0x80000000
+RedBoot config 0xA0FC0000 0xA0FC0000 0x020000 0x00000000
+FIS directory 0xA0FE0000 0xA0FE0000 0x020000 0x00000000
+RedBoot>
+</screen>
+</para>
+<note><title>NOTE</title>
+<para>The bold characters above indicate where something was entered on the
+console. As you can see, the <command>fi li</command> command
+at the end came from the script,
+not the console. Once the script is executed, command processing reverts to
+the console. </para>
+</note>
+<para>
+<note><title>NOTE</title>
+<para>
+RedBoot supports the notion of a boot script timeout, i.e. a period of
+time that RedBoot waits before executing the boot time script. This period
+is primarily to allow the possibility of canceling the script. Since
+a timeout value of zero (0) seconds would never allow the script to
+be aborted or canceled, this value is not allowed. If the timeout
+value is zero, then RedBoot will abort the script execution immediately.
+</para>
+</note>
+On many targets, RedBoot may be configured to run from ROM or it may be
+configured to run from RAM. Other configurations are also possible. All
+RedBoot configurations will execute the boot script, but in certain cases
+it may be desirable to limit the execution of certain script commands to
+one RedBoot configuration or the other. This can be accomplished by
+prepending <computeroutput>{&lt;startup type>}</computeroutput> to the
+commands which should be executed only by the RedBoot configured for the
+specified startup type. The following boot script illustrates this concept
+by having the ROM based RedBoot load and run the RAM based RedBoot. The RAM
+based RedBoot will then list flash images.</para>
+<para><screen>
+RedBoot> <userinput>fco</userinput>
+Run script at boot: false <userinput>t</userinput>
+Boot script:
+Enter script, terminate with empty line
+>> <userinput>{ROM}fis load RedBoot[RAM]</userinput>
+>> <userinput>{ROM}go</userinput>
+>> <userinput>{RAM}fis li</userinput>
+>>
+Boot script timeout (1000ms resolution): <userinput>2</userinput>
+Use BOOTP for network configuration: <userinput>false</userinput>
+ ...
+Update RedBoot non-volatile configuration - continue (y/n)? <userinput>y</userinput>
+... Unlock from 0x007c0000-0x007e0000: .
+... Erase from 0x007c0000-0x007e0000: .
+... Program from 0xa0015030-0xa0016030 at 0x007df000: .
+... Lock from 0x007c0000-0x007e0000: .
+RedBoot> <userinput>reset</userinput>
+... Resetting.
++Ethernet eth0: MAC address 00:80:4d:46:01:05
+IP: 192.168.1.153, Default server: 192.168.1.10
+
+RedBoot(tm) bootstrap and debug environment [ROM]
+Red Hat certified release, version R1.xx - built 17:37:36, Aug 14 2001
+
+Platform: IQ80310 (XScale)
+Copyright (C) 2000, 2001, Red Hat, Inc.
+
+RAM: 0xa0000000-0xa2000000, 0xa001b088-0xa1fdf000 available
+FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each.
+== Executing boot script in 2.000 seconds - enter ^C to abort
+RedBoot> <userinput>fis load RedBoot[RAM]</userinput>
+RedBoot> <userinput>go</userinput>
++Ethernet eth0: MAC address 00:80:4d:46:01:05
+IP: 192.168.1.153, Default server: 192.168.1.10
+
+RedBoot(tm) bootstrap and debug environment [RAM]
+Red Hat certified release, version R1.xx - built 13:03:47, Aug 14 2001
+
+Platform: IQ80310 (XScale)
+Copyright (C) 2000, 2001, Red Hat, Inc.
+
+RAM: 0xa0000000-0xa2000000, 0xa0057fe8-0xa1fdf000 available
+FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each.
+== Executing boot script in 2.000 seconds - enter ^C to abort
+RedBoot> <userinput>fis li</userinput>
+Name FLASH addr Mem addr Length Entry point
+RedBoot 0x00000000 0x00000000 0x00040000 0x00002000
+RedBoot config 0x007DF000 0x007DF000 0x00001000 0x00000000
+FIS directory 0x007E0000 0x007E0000 0x00020000 0x00000000
+RedBoot>
+</screen></para>
+</sect1>
+<sect1 id="executing-programs">
+<title>Executing Programs from RedBoot</title>
+<para><indexterm><primary>executing programs</primary></indexterm><indexterm>
+<primary>RedBoot</primary><secondary>executing programs</secondary></indexterm>Once
+an image has been loaded into memory, either via the <command>load
+</command> command or the <command>fis load</command>
+command, execution may be transfered to that image.</para>
+<para> <note><title>NOTE</title>
+<para>The image is assumed to be a stand-alone entity, as RedBoot gives the
+entire platform over to it. Typical examples would be an eCos application
+or a Linux kernel.</para>
+</note></para>
+
+
+<!-- ******** go *************************************************** -->
+ <refentry id="go-command">
+ <refnamediv>
+ <refname>go</refname>
+ <refpurpose>Execute a program</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>go</command>
+ <arg>-w <replaceable> timeout</replaceable></arg>
+ <arg>-c</arg>
+ <arg>-n</arg>
+ <arg><replaceable> start_address</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-w <replaceable>timeout</replaceable></entry>
+ <entry>Number</entry>
+ <entry>How long to wait before starting execution.</entry>
+ <entry>0</entry>
+ </row>
+ <row>
+ <entry>-c</entry>
+ <entry>Boolean</entry>
+ <entry>Go with caches enabled.</entry>
+ <entry>caches off</entry>
+ </row>
+ <row>
+ <entry>-n</entry>
+ <entry>Boolean</entry>
+ <entry>Go with network interface stopped.</entry>
+ <entry>network enabled</entry>
+ </row>
+ <row>
+ <entry><replaceable>start_address</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Address in memory to begin execution.</entry>
+ <entry>Value set by last <command>load</command> or <command>fis load</command> command.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>
+The <command>go</command> command causes RedBoot to give control of the target platform to
+another program. This program must execute stand alone, e.g. an eCos
+application or a Linux kernel.
+ </para>
+ <para>
+If the -w option is used, RedBoot will print a message and then
+wait for a period of time before starting the execution. This is
+most useful in a script, giving the user a chance to abort executing
+a program and move on in the script.
+ </para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Execute a program - <emphasis>no explicit output from RedBoot</emphasis>.
+<screen>
+RedBoot> <userinput>go 0x40040</userinput>
+</screen>
+ </para>
+ <para>
+Execute a program with a timeout.
+<screen>
+RedBoot> <userinput>go -w 10</userinput>
+About to start execution at 0x00000000 - abort with ^C within 10 seconds
+^C
+RedBoot>
+</screen>
+Note that the starting address was implied (0x00000000 in this example).
+The user is prompted that execution will commence in 10 seconds. At
+anytime within that 10 seconds the user may type <guibutton>Ctrl+C</guibutton>
+on the console and RedBoot will abort execution and return for the next
+command, either from a script or the console.
+ </para>
+ </refsect1>
+ </refentry>
+
+<!-- ******** exec *************************************************** -->
+ <refentry id="exec-command">
+ <refnamediv>
+ <refname>exec</refname>
+ <refpurpose>Execute a Linux kernel</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>exec</command>
+ <arg>-w <replaceable> timeout</replaceable></arg>
+ <arg>-r <replaceable> ramdisk_address</replaceable></arg>
+ <arg>-s <replaceable> ramdisk_length</replaceable></arg>
+ <arg>-b <replaceable> load_address</replaceable>
+ <arg choice="req">-l <replaceable> load_length</replaceable></arg>
+ </arg>
+ <arg>-c <replaceable> kernel_command_line</replaceable></arg>
+ <arg><replaceable> entry_point</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Arguments</title>
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <colspec colname="c1">
+ <colspec colname="c2">
+ <colspec colname="c3">
+ <colspec colname="c4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>-w <replaceable>timeout</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Time to wait before starting execution.</entry>
+ <entry>0</entry>
+ </row>
+ <row>
+ <entry>-r <replaceable>ramdisk_address</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Address in memory of "initrd"-style ramdisk - passed to Linux kernel.</entry>
+ <entry><emphasis>None</emphasis></entry>
+ </row>
+ <row>
+ <entry>-s <replaceable>ramdisk_length</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Length of ramdisk image - passed to Linux kernel.</entry>
+ <entry><emphasis>None</emphasis></entry>
+ </row>
+ <row>
+ <entry>-b <replaceable>load_address</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Address in memory of the Linux kernel image.</entry>
+ <entry>Value set by <command>load</command> or <command>fis load</command></entry>
+ </row>
+ <row>
+ <entry>-l <replaceable>load_length</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Length of Linux kernel image.</entry>
+ <entry><emphasis>none</emphasis></entry>
+ </row>
+ <row>
+ <entry>-c <replaceable>kernel_command_line</replaceable></entry>
+ <entry>String</entry>
+ <entry>Command line to pass to the Linux kernel.</entry>
+ <entry><emphasis>None</emphasis></entry>
+ </row>
+ <row>
+ <entry>-x</entry>
+ <entry></entry>
+ <entry>Boot kernel with endianess opposite of RedBoot endianess.</entry>
+ <entry>Boot kernel with same endianess as RedBoot</entry>
+ </row>
+ <row>
+ <entry><replaceable>entry_address</replaceable></entry>
+ <entry>Number</entry>
+ <entry>Starting address for Linux kernel execution</entry>
+ <entry>Implied by architecture</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>
+The <command>exec</command> command is used to execute a non-eCos application, typically a
+Linux kernel. Additional information may be passed to the kernel at startup
+time. This command is quite special (and unique from the <command>go</command> command) in
+that the program being executed may expect certain environmental setups, for
+example that the MMU is turned off, etc. </para>
+<para>The Linux kernel expects to have been loaded to a particular memory
+location which is architecture dependent(0xC0008000 in the case of the SA1110).
+Since this memory is used
+by RedBoot internally, it is not possible to load the kernel to that location
+directly. Thus the requirement for the "-b" option which tells the command
+where the kernel has been loaded. When the <command>exec</command> command runs, the image will
+be relocated to the appropriate location before being started. The "-r" and
+"-s" options are used to pass information to the kernel about where a statically
+loaded ramdisk (initrd) is located.</para>
+<para>The "-c" option can be used to pass textual "command line" information
+to the kernel. If the command line data contains any punctuation (spaces,
+etc), then it must be quoted using the double-quote character '"'. If the
+quote character is required, it should be written as '\"'.
+ </para>
+<para>The "-x" option is optionally available on some bi-endian platforms. It is used to boot
+a kernel built with an endianess opposite of RedBoot.</para>
+ </refsect1>
+ <refsect1>
+ <title>Examples</title>
+ <para>
+Execute a Linux kernel, passing a command line, which needs relocation.
+The result from RedBoot is normally quiet, with the target platform being
+passed over to Linux immediately.
+<screen>
+RedBoot> <userinput>exec -b 0x100000 -l 0x80000 -c "noinitrd root=/dev/mtdblock3 console=ttySA0"</userinput>
+</screen>
+ </para>
+ <para>
+Execute a Linux kernel, default entry address and no relocation required, with a timeout.
+The <emphasis> emphasized lines</emphasis> are output from the loaded kernel.
+<screen>
+RedBoot> exec <userinput>-c "console=ttyS0,38400 ip=dhcp nfsroot=/export/elfs-sh" -w 5</userinput>
+Now booting linux kernel:
+Base address 0x8c001000 Entry 0x8c210000
+Cmdline : console=ttyS0,38400 ip=dhcp nfsroot=/export/elfs-sh
+About to start execution at 0x8x210000 - abort with ^C within 5 seconds
+<emphasis>
+Linux version 2.4.10-pre6 (...) (gcc version 3.1-stdsh-010931) #3 Thu Sep 27 11:04:23 BST 2001
+</emphasis>
+</screen>
+ </para>
+ </refsect1>
+ </refentry>
+
+</sect1>
+</chapter>
diff --git a/cesar/ecos/packages/redboot/current/doc/redboot_epilogue.sgml b/cesar/ecos/packages/redboot/current/doc/redboot_epilogue.sgml
new file mode 100644
index 0000000000..b53bc636a2
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/doc/redboot_epilogue.sgml
@@ -0,0 +1,3 @@
+
+<!-- <index id="index"></index> -->
+<!-- </part> -->
diff --git a/cesar/ecos/packages/redboot/current/doc/redboot_installing.sgml b/cesar/ecos/packages/redboot/current/doc/redboot_installing.sgml
new file mode 100644
index 0000000000..77981f24f5
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/doc/redboot_installing.sgml
@@ -0,0 +1,6834 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- redboot_installing.sgml -->
+<!-- -->
+<!-- RedBoot Documentation -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<!-- FIXME:
+ Need to make index terms consistent
+-->
+
+
+<chapter id="Installation-and-Testing">
+<title>Installation and Testing</title>
+<indexterm><primary>installing and testing RedBoot</primary></indexterm><indexterm>
+<primary>RedBoot</primary><secondary>installing and testing</secondary></indexterm>
+
+<!-- *************************** AM3x ********************** -->
+
+<?Pub _newpage>
+<sect1 id="asb2305">
+<title>AM3x/MN103E010 Matsushita MN103E010 (AM33/2.0) ASB2305 Board</title>
+<sect2>
+<title>Overview</title>
+<para>
+<indexterm>
+<primary>Matsushita MN103E010 (AM33/2.0) ASB2305 Board</primary>
+<secondary>installing and testing</secondary>
+</indexterm>
+<indexterm>
+<primary>installing and testing</primary>
+<secondary>Matsushita MN103E010 (AM33/2.0) ASB2305 Board</secondary>
+</indexterm>
+RedBoot supports the debug serial port and the built in ethernet port for communication and
+downloads. The default serial port settings are 115200,8,N,1 with RTS/CTS flow control. RedBoot can
+run from either flash, and can support flash management for either the boot PROM or the system
+flash regions.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>PROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the boot PROM and able to
+ access the system flash.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>FLASH</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the system flash and able to
+ access the boot PROM.</entry>
+ <entry>redboot_FLASH.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM and able to access the
+ boot PROM.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+</sect2>
+
+<sect2>
+<title>Initial Installation</title>
+<para>Unless a pre-programmed system flash module is available to be plugged into a new board,
+RedBoot must be installed with the aid of a JTAG interface unit. To achieve this, the RAM mode
+RedBoot must be loaded directly into RAM by JTAG and started, and then <emphasis>that</emphasis>
+must be used to store the ROM mode RedBoot into the boot PROM.</para>
+<para>These instructions assume that you have binary images of the RAM-based and boot PROM-based
+RedBoot images available.</para>
+<sect3>
+<title>Preparing to program the board</title>
+<para>If the board is to be programmed, whether via JTAG or RedBoot, some hardware settings need to
+be changed:</para>
+<itemizedlist>
+<listitem>
+<para>Jumper across ST18 on the board to allow write access to the boot PROM.</para>
+</listitem>
+<listitem>
+<para>Set DIP switch S1-3 to OFF to allow RedBoot to write to the system flash.</para>
+</listitem>
+<listitem>
+<para>Set the switch S5 (on the front of the board) to boot from whichever flash is
+<emphasis>not</emphasis> being programmed. Note that the RedBoot image cannot access the flash from
+which it is currently executing (it can only access the other flash).</para>
+</listitem>
+</itemizedlist>
+<para>
+The RedBoot binary image files should also be copied to the TFTP pickup area on the host providing
+TFTP services if that is how RedBoot should pick up the images it is going to program into the
+flash. Alternatively, the images can be passed by YMODEM over the serial link.
+</para>
+</sect3>
+<sect3>
+<title>Preparing to use the JTAG debugger</title>
+<para>The JTAG debugger will also need setting up:</para>
+<orderedlist>
+<listitem><para>Install the JTAG debugger software (WICE103E) on a PC running Windows (WinNT is
+probably the best choice for this) in &ldquo;C:/PanaX&rdquo;.</para>
+</listitem>
+<listitem><para>Install the Matsushita provided &ldquo;project&rdquo; into the
+&ldquo;C:/Panax/wice103e/prj&rdquo; directory.</para>
+</listitem>
+<listitem><para>Install the RedBoot image files into the &ldquo;C:/Panax/wice103e/prj&rdquo;
+directory under the names redboot.ram and redboot.prom.</para>
+</listitem>
+<listitem><para>Make sure the PC's BIOS has the parallel port set to full bidirectional
+mode.</para>
+</listitem>
+<listitem><para>Connect the JTAG debugger to the PC's parallel port.</para>
+</listitem>
+<listitem><para>Connect the JTAG debugger to the board.</para>
+</listitem>
+<listitem><para>Set the switch on the front of the board to boot from &ldquo;boot
+PROM&rdquo;.</para>
+</listitem>
+<listitem><para>Power up the JTAG debugger and then power up the board.</para>
+</listitem>
+<listitem><para>Connect the board's Debug Serial port to a computer by a null modem cable.</para>
+</listitem>
+<listitem><para>Start minicom or some other serial communication software and set for 115200 baud,
+1-N-8 with hardware (RTS/CTS) flow control.</para>
+</listitem>
+</orderedlist>
+</sect3>
+<sect3>
+<title>Loading the RAM-based RedBoot via JTAG</title>
+<para>To perform the first half of the operation, the following steps should be followed:</para>
+<orderedlist>
+<listitem><para>Start the JTAG debugger software.</para>
+</listitem>
+<listitem>
+<para>Run the following commands at the JTAG debugger's prompt to set up the MMU registers on the
+CPU.</para>
+<screen>
+<userinput>ed 0xc0002000, 0x12000580</userinput>
+
+<userinput>ed 0xd8c00100, 0x8000fe01</userinput>
+<userinput>ed 0xd8c00200, 0x21111000</userinput>
+<userinput>ed 0xd8c00204, 0x00100200</userinput>
+<userinput>ed 0xd8c00208, 0x00000004</userinput>
+
+<userinput>ed 0xd8c00110, 0x8400fe01</userinput>
+<userinput>ed 0xd8c00210, 0x21111000</userinput>
+<userinput>ed 0xd8c00214, 0x00100200</userinput>
+<userinput>ed 0xd8c00218, 0x00000004</userinput>
+
+<userinput>ed 0xd8c00120, 0x8600ff81</userinput>
+<userinput>ed 0xd8c00220, 0x21111000</userinput>
+<userinput>ed 0xd8c00224, 0x00100200</userinput>
+<userinput>ed 0xd8c00228, 0x00000004</userinput>
+
+<userinput>ed 0xd8c00130, 0x8680ff81</userinput>
+<userinput>ed 0xd8c00230, 0x21111000</userinput>
+<userinput>ed 0xd8c00234, 0x00100200</userinput>
+<userinput>ed 0xd8c00238, 0x00000004</userinput>
+
+<userinput>ed 0xd8c00140, 0x9800f801</userinput>
+<userinput>ed 0xd8c00240, 0x00140000</userinput>
+<userinput>ed 0xd8c00244, 0x11011100</userinput>
+<userinput>ed 0xd8c00248, 0x01000001</userinput>
+
+<userinput>ed 0xda000000, 0x55561645</userinput>
+<userinput>ed 0xda000004, 0x000003c0</userinput>
+<userinput>ed 0xda000008, 0x9000fe01</userinput>
+<userinput>ed 0xda00000c, 0x9200fe01</userinput>
+<userinput>ed 0xda000000, 0xa89b0654</userinput>
+</screen>
+</listitem>
+<listitem>
+<para>Run the following commands at the JTAG debugger's prompt to tell it what regions of the CPU's
+address space it can access:</para>
+<screen>
+<userinput>ex 0x80000000,0x81ffffff,/mexram</userinput>
+<userinput>ex 0x84000000,0x85ffffff,/mexram</userinput>
+<userinput>ex 0x86000000,0x867fffff,/mexram</userinput>
+<userinput>ex 0x86800000,0x87ffffff,/mexram</userinput>
+<userinput>ex 0x8c000000,0x8cffffff,/mexram</userinput>
+<userinput>ex 0x90000000,0x93ffffff,/mexram</userinput>
+</screen>
+</listitem>
+<listitem><para>Instruct the debugger to load the RAM RedBoot image into RAM:</para>
+<screen>
+<userinput>_pc=90000000</userinput>
+<userinput>u_pc</userinput>
+<userinput>rd redboot.ram,90000000</userinput>
+</screen>
+</listitem>
+<listitem><para>Load the boot PROM RedBoot into RAM:</para>
+<screen>
+<userinput>rd redboot.prom,91020000</userinput>
+</screen>
+</listitem>
+<listitem><para>Start RedBoot in RAM:</para>
+<screen>
+<userinput>g</userinput>
+</screen>
+<para>Note that RedBoot may take some time to start up, as it will attempt to query a BOOTP or DHCP
+server to try and automatically get an IP address for the board. Note, however, that it should send
+a plus over the serial port immediately, and the 7-segment LEDs should display &ldquo;rh
+8&rdquo;.</para>
+</listitem>
+</orderedlist>
+</sect3>
+<sect3>
+<title>Loading the boot PROM-based RedBoot via the RAM mode RedBoot</title>
+<para>Once the RAM mode RedBoot is up and running, it can be communicated with by way of the serial
+port. Commands can now be entered directly to RedBoot for flashing the boot PROM.</para>
+<orderedlist>
+<listitem><para>Instruct RedBoot to initialise the boot PROM:</para>
+<screen>
+RedBoot> <userinput>fi init</userinput>
+</screen>
+</listitem>
+<listitem><para>Write the previously loaded redboot.prom image into the boot PROM:</para>
+<screen>
+RedBoot> <userinput>fi write -f 0x80000000 -b 0x91020000 -l 0x00020000</userinput>
+</screen>
+</listitem>
+<listitem><para>Check that RedBoot has written the image:</para>
+<screen>
+RedBoot> <userinput>dump -b 0x91020000</userinput>
+RedBoot> <userinput>dump -b 0x80000000</userinput>
+</screen>
+<para>Barring the difference in address, the two dumps should be the same.</para>
+</listitem>
+<listitem><para>Close the JTAG software and power-cycle the board. The RedBoot banners should be
+displayed again over the serial port, followed by the RedBoot prompt. The boot PROM-based RedBoot
+will now be running.</para>
+</listitem>
+<listitem><para>Power off the board and unjumper ST18 to write-protect the contents of the boot
+PROM. Then power the board back up.</para>
+</listitem>
+<listitem><para>Run the following command to initialise the system flash:</para>
+<screen>
+RedBoot> <userinput>fi init</userinput>
+</screen>
+<para>Then program the system flash based RedBoot into the system flash:</para>
+<screen>
+RedBoot> <userinput>load -r -b %{FREEMEMLO} redboot_FLASH.bin</userinput>
+RedBoot> <userinput>fi write -f 0x84000000 -b %{FREEMEMLO} -l 0x00020000</userinput>
+</screen>
+<note>
+<title>NOTE</title>
+<para>RedBoot arranges the flashes on booting such that they always appear at the same addresses,
+no matter which one was booted from.</para>
+</note>
+</listitem>
+<listitem>
+<para>A similar sequence of commands can be used to program the boot PROM when RedBoot has been
+booted from an image stored in the system flash.
+</para>
+<screen>
+RedBoot> <userinput>load -r -b %{FREEMEMLO} /tftpboot/redboot_ROM.bin</userinput>
+RedBoot> <userinput>fi write -f 0x80000000 -b %{FREEMEMLO} -l 0x00020000</userinput>
+</screen>
+<para>See <xref linkend="Persistent-State-Flash"> for details on configuring the RedBoot in
+general, and also <xref linkend="Flash-Image-System"> for more details on programming the system
+flash.</para>
+</listitem>
+</orderedlist>
+</sect3>
+</sect2>
+<sect2>
+<title>Additional Commands</title>
+<para>The <command>exec</command> command which allows the loading and execution of
+Linux kernels, is supported for this architecture (see <xref linkend="executing-programs">). The
+<command>exec</command> parameters used for ASB2305 board are:</para>
+<variablelist>
+<varlistentry><term>
+-w <replaceable>&lt;time></replaceable></term>
+<listitem><para>Wait time in seconds before starting kernel</para></listitem></varlistentry>
+<varlistentry><term>
+-c <replaceable>"params"</replaceable></term>
+<listitem><para>Parameters passed to kernel</para></listitem></varlistentry>
+<varlistentry><term><replaceable>&lt;addr></replaceable></term>
+<listitem><para>Kernel entry point, defaulting to the entry point of the last image
+loaded</para></listitem></varlistentry>
+</variablelist>
+<para>The parameter string is stored in the on-chip memory at location 0x8C001000, and is prefixed
+by &ldquo;cmdline:&rdquo; if it was supplied.</para>
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>RedBoot sets up the following memory map on the ASB2305 board.</para>
+<note>
+<title>NOTE</title>
+<para>The regions mapped between 0x80000000-0x9FFFFFFF are cached by the CPU. However, all those
+regions can be accessed uncached by adding 0x20000000 to the address.</para>
+</note>
+<programlisting>
+Physical Address Range Description
+----------------------- -----------
+0x80000000 - 0x9FFFFFFF Cached Region
+0x80000000 - 0x81FFFFFF Boot PROM
+0x84000000 - 0x85FFFFFF System Flash
+0x86000000 - 0x86007FFF 64Kbit Sys Config EEPROM
+0x86F90000 - 0x86F90003 4x 7-segment LEDs
+0x86FA0000 - 0x86FA0003 Software DIP Switches
+0x86FB0000 - 0x86FB001F PC16550 Debug Serial Port
+0x8C000000 - 0x8FFFFFFF On-Chip Memory (repeated 16Kb SRAM)
+0x90000000 - 0x93FFFFFF SDRAM
+0x98000000 - 0x9BFFFFFF Paged PCI Memory Space (64Mb)
+0x9C000000 - 0x9DFFFFFF PCI Local SRAM (32Mb)
+0x9E000000 - 0x9E03FFFF PCI I/O Space
+0x9E040000 - 0x9E0400FF AM33-PCI Bridge Registers
+0x9FFFFFF4 - 0x9FFFFFF7 PCI Memory Page Register
+0x9FFFFFF8 - 0x9FFFFFFF PCI Config Registers
+0xA0000000 - 0xBFFFFFFF Uncached Mirror Region
+0xC0000000 - 0xDFFFFFFF CPU Control Registers
+</programlisting>
+<para>The ASB2305 HAL makes use of the on-chip memory in the following way:</para>
+<programlisting>
+0x8C000000 - 0x8C0000FF hal_vsr_table
+0x8C000100 - 0x8C0001FF hal_virtual_vector_table
+0x8C001000 - Linux command line (RedBoot exec command)
+ - 0x8C003FFF Emergency DoubleFault Exception Stack
+</programlisting>
+<para>Currently the CPU's interrupt table lies at the beginning of the RedBoot image, which must
+therefore be aligned to a 0xFF000000 mask.</para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=asb2305
+export ARCH_DIR=mn10300
+export PLATFORM_DIR=asb2305
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+<!-- *************************** ARM ******************* -->
+
+<?Pub _newpage>
+<sect1 id="e7t">
+<title>ARM/ARM7 ARM Evaluator7T</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>ARM Evaluator7T</primary><secondary>installing and
+testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>ARM Evaluator7T</secondary></indexterm>RedBoot supports
+both serial ports for communication and downloads. The default serial port
+settings are 38400,8,N,1.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from flash address 0x20000, with
+ ARM Boot Monitor in flash boot sector.</entry>
+ <entry>redboot_ROMA.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation</title>
+<para>RedBoot is installed using the on-board boot environment. See the user
+manual for full details.</para>
+</sect2>
+<sect2>
+<title>Quick download instructions</title>
+<para>Here are quick start instructions for downloading the prebuilt Redboot
+image:</para>
+<itemizedlist>
+<listitem><para>Boot the board and press ENTER:</para>
+<screen>
+
+ ARM Evaluator7T Boot Monitor PreRelease 1.00
+ Press ENTER within 2 seconds to stop autoboot
+ Boot: </screen>
+</listitem>
+<listitem><para>Erase the part of the flash where RedBoot will get programmed:
+</para>
+<screen> Boot: <userinput>flasherase 01820000 10000</userinput></screen>
+</listitem>
+<listitem><para>Prepare to download the UU-encoded version of the RedBoot
+image:</para>
+<screen> Boot: <userinput>download 10000</userinput>
+ Ready to download. Use 'transmit' option on terminal emulator to download file.
+</screen>
+</listitem>
+<listitem><para>Either use ASCII transmit option in the terminal emulator,
+or on Linux, simply cat the file to the serial port:<screen> $ <userinput>
+cat redboot.UU > /dev/ttyS0</userinput></screen>When complete, you should
+see:<screen> Loaded file redboot.bin at address 000100000, size = 41960
+ Boot:</screen></para>
+</listitem>
+<listitem><para>Program the flash:<screen> Boot: <userinput>flashwrite 01820000 10000 10000
+</userinput></screen></para>
+</listitem>
+<listitem><para>And verify that the module is available:<screen> Boot: <userinput>
+rommodules</userinput>
+ Header Base Limit
+ 018057c8 01800000 018059e7 BootStrapLoader v1.0 Apr 27 2000 10:33:58
+ 01828f24 01820000 0182a3e8 RedBoot Apr 5 2001</screen></para>
+</listitem>
+<listitem><para>Reboot the board and you should see the RedBoot banner.</para>
+</listitem>
+</itemizedlist>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>None.</para>
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>RedBoot sets up the following memory map on the E7T board. <note><title>
+NOTE</title>
+<para>The virtual memory maps in this section use a C and B column to indicate
+whether or not the region is cached (C) or buffered (B).</para>
+</note> <programlisting>Physical Address Range C B Description
+----------------------- - - -----------
+0x00000000 - 0x0007ffff Y N SDRAM
+0x03ff0000 - 0x03ffffff N N Microcontroller registers
+0x01820000 - 0x0187ffff N N System flash (mirrored)</programlisting></para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=e7t
+export ARCH_DIR=arm
+export PLATFORM_DIR=e7t
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="integrator">
+<title>ARM/ARM7+ARM9 ARM Integrator</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>ARM Integrator</primary><secondary>installing and
+testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>ARM Integrator</secondary></indexterm>RedBoot supports
+both serial ports for communication and downloads. The default serial port
+settings are 38400,8,N,1.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+ <row>
+ <entry>ROMRAM</entry>
+ <entry>[ROMRAM]</entry>
+ <entry>RedBoot running from RAM, but contained in the
+ board's flash boot sector.</entry>
+ <entry>redboot_ROMRAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+
+<sect2>
+<title>Initial Installation</title>
+<para>RedBoot is installed using the on-board bootPROM environment. See the user
+manual for full details.</para>
+</sect2>
+<sect2>
+<title>Quick download instructions</title>
+<para>Here are quick start instructions for downloading the prebuilt Redboot
+image:</para>
+<itemizedlist>
+<listitem><para>Set DIP switch S1[1] to the ON position and reset or
+power the board up. You will see the bootPROM startup message on
+serial port A (J14):</para>
+<screen>
+Initialising...
+
+
+ARM bootPROM [Version 1.3] Rebuilt on Jun 26 2001 at 22:04:10
+Running on a Integrator Evaluation Board
+Board Revision V1.0, ARM966E-S Processor
+Memory Size is 16MBytes, Flash Size is 32MBytes
+Copyright (c) ARM Limited 1999 - 2001. All rights reserved.
+Board designed by ARM Limited
+Hardware support provided at http://www.arm.com/
+For help on the available commands type ? or h
+boot Monitor >
+</screen>
+</listitem>
+<listitem>
+<para>Issue the FLASH ROM load command:
+</para>
+<screen>
+boot Monitor > <userinput>L</userinput>
+Load Motorola S-Records into flash
+
+Deleting Image 0
+
+The S-Record loader only accepts input on the serial port.
+Type Ctrl/C to exit loader.
+</screen>
+</listitem>
+<listitem><para>Either use the ASCII transmit option in the terminal emulator,
+or on Linux, simply cat the file to the serial port:
+</para>
+<screen>
+$ <userinput>cat redboot.srec > /dev/ttyS0</userinput>
+</screen>
+<para>
+When complete, type Ctrl-C and you should see something similar to:
+</para>
+<screen>
+................................
+................................
+....................
+Downloaded 5,394 records in 81 seconds.
+
+Overwritten block/s
+ 0
+
+boot Monitor >
+</screen>
+</listitem>
+<listitem><para>Set DIP switch S1[1] to the OFF position and reboot
+the board and you should see the RedBoot banner.</para>
+</listitem>
+</itemizedlist>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>None.</para>
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>RedBoot sets up the following memory map on the Integrator board. <note><title>
+NOTE</title>
+<para>The virtual memory maps in this section use a C and B column to indicate
+whether or not the region is cached (C) or buffered (B).</para>
+</note>
+<programlisting>
+
+ARM7TDMI
+--------
+
+Physical Address Range C B Description
+----------------------- - - -----------
+0x00000000 - 0x0007ffff N N SSRAM
+0x00080000 - 0x0fffffff N N SDRAM (depends on part fitted)
+0x10000000 - 0x1fffffff N N System control and peripheral registers
+0x20000000 - 0x23ffffff N N Boot ROM (contains boot Monitor)
+0x24000000 - 0x27ffffff N N FLASH ROM (contains RedBoot)
+0x28000000 - 0x2bffffff N N SSRAM echo area
+0x40000000 - 0x5fffffff N N PCI Memory access windows
+0x60000000 - 0x60ffffff N N PCI IO access window
+0x61000000 - 0x61ffffff N N PCI config space window
+0x62000000 - 0x6200ffff N N PCI bridge register window
+0x80000000 - 0x8fffffff N N SDRAM echo area (used for PCI accesses)
+
+
+ARM966E
+-------
+
+Physical Address Range C B Description
+----------------------- - - -----------
+0x00000000 - 0x000fffff N N SSRAM
+0x00100000 - 0x0fffffff N N SDRAM (depends on part fitted)
+0x10000000 - 0x1fffffff N N System control and peripheral registers
+0x20000000 - 0x23ffffff N N Boot ROM (contains boot Monitor)
+0x24000000 - 0x27ffffff N N FLASH ROM (contains RedBoot)
+0x28000000 - 0x2bffffff N N SSRAM echo area
+0x40000000 - 0x5fffffff N N PCI Memory access windows
+0x60000000 - 0x60ffffff N N PCI IO access window
+0x61000000 - 0x61ffffff N N PCI config space window
+0x62000000 - 0x6200ffff N N PCI bridge register window
+0x80000000 - 0x8fffffff N N SDRAM echo area (used for PCI accesses)
+
+</programlisting>
+</para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=integrator
+export ARCH_DIR=arm
+export PLATFORM_DIR=integrator
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="pid">
+<title>ARM/ARM7+ARM9 ARM PID Board and EPI Dev7+Dev9</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>ARM ARM7 PID, Dev7 and Dev9</primary><secondary>
+installing and testing</secondary></indexterm><indexterm><primary>installing
+and testing</primary><secondary>ARM ARM7 PID, Dev7 and Dev9</secondary></indexterm>RedBoot
+uses either of the serial ports. The default serial port settings are 38400,8,N,1.
+Management of onboard flash is also supported.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+</sect2>
+
+<sect2>
+<title>Initial Installation Method </title>
+<para>Device programmer is used to program socketed flash parts with ROM version
+of RedBoot. </para>
+<para>Alternatively, to install RedBoot on a target that already has eCos
+GDB stubs, download the RAM mode image of RedBoot and run it. Initialize the
+flash image directory: <command>fis init</command> Then
+download the ROM version of RedBoot and program it into flash: <screen>
+RedBoot> <userinput>load -b %{FREEMEMLO} -m ymodem</userinput>
+RedBoot> <userinput>fi cr RedBoot</userinput>
+</screen></para>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>None.</para>
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>RedBoot sets up the following memory map on the PID board. <programlisting>
+Physical Address Range Description
+----------------------- -----------
+0x00000000 - 0x0007ffff DRAM
+0x04000000 - 0x04080000 flash
+0x08000000 - 0x09ffffff ASB Expansion
+0x0a000000 - 0x0bffffff APB Reference Peripheral
+0x0c000000 - 0x0fffffff NISA Serial, Parallel and PC Card ports </programlisting></para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=pid
+export ARCH_DIR=arm
+export PLATFORM_DIR=pid
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2></sect1>
+
+<?Pub _newpage>
+<sect1 id="at91">
+<title>ARM/ARM7 Atmel AT91 Evaluation Boards (EBXX)</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Atmel AT91/EBXX</primary>
+<secondary>installing and testing</secondary></indexterm><indexterm><primary>
+installing and testing</primary><secondary>Atmel AT91/EBXX
+</secondary></indexterm>
+RedBoot support is available for the EB40, EB40A, EB42 and EB55
+boards. By default all these boards are shipped with only 256Kbytes of
+RAM. To minimize the amount of RAM used by RedBoot, only very basic
+flash management is provided, comprising of just the <command>fis
+erase</command> and <command>fis write</command> commands.
+</para>
+<para>
+RedBoot supports both serial ports. On all AT91 evaluation boards, serial
+port A requires a straight through cable to connect with a PC, whereas
+serial port B requires a null modem cable. If you fail to be able to
+connect to Angel in the instructions below when installing RedBoot, be
+sure to verify you are using the appropriate cable for the serial port.
+The default serial port settings for RedBoot are 38400,8,N,1.
+</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+ <row>
+ <entry>ROMRAM</entry>
+ <entry>[ROMRAM]</entry>
+ <entry>RedBoot running from RAM, but contained in the
+ board's flash boot sector.</entry>
+ <entry>redboot_ROMRAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+</sect2>
+
+<sect2>
+<title>Initial Installation Method </title>
+<para>
+RedBoot installation is essentially the same for all boards, however
+the details differ slightly. Please make sure you follow the
+directions from the correct section below. Any errors could result in
+an unusable board.
+</para>
+
+<sect3>
+<title>Installing RedBoot on the EB40</title>
+<para>
+This development board comes with ARM's debug tool, Angel, installed
+in flash. At this time, Angel will not be replaced. Rather, RedBoot
+will be placed in the alternate half of flash. Switch SW1 is used to
+select which monitor to boot. Once RedBoot is installed, selecting SW1
+to <literal>lower mem</literal> will choose Angel, whereas selecting
+SW1 to <literal>upper mem</literal> will choose RedBoot.
+</para>
+<para>
+Set SW1 to <literal>lower mem</literal> and connect serial port A to a
+host computer. Using GDB from the host and Angel on the board,
+download and run the RAM mode image of RedBoot to the board.
+<screen>
+<userinput>arm-elf-gdb redboot_RAM.elf</userinput>
+(gdb) <userinput>tar rdi s=/dev/ttyS0</userinput>
+Angel Debug Monitor (serial) 1.04 (Advanced RISC Machines SDT 2.5) for
+AT91EB40 (2.00)
+Angel Debug Monitor rebuilt on Apr 07 2000 at 12:40:31
+Serial Rate: 9600
+Connected to ARM RDI target.
+(gdb) <userinput>set $cpsr=0xd3</userinput>
+(gdb) <userinput>load</userinput>
+Loading section .rom_vectors, size 0x40 lma 0x2020000
+Loading section .text, size 0x7fd8 lma 0x2020040
+Loading section .rodata, size 0x15a0 lma 0x2028018
+Loading section .data, size 0x2e4 lma 0x20295b8
+Start address 0x2020040 , load size 39068
+Transfer rate: 6250 bits/sec, 500 bytes/write.
+(gdb) <userinput>cont</userinput>
+Continuing.
+</screen>
+Once RedBoot is started, the GDB session connected with Angel
+must be suspended (this can be done using Ctrl-Z) or terminated
+(with Ctrl-C or the Windows task manager). Follow this
+by connecting to the board using a terminal emulator such as
+hyperterminal or minicom at 38400-8N1. At this point, RedBoot will be running on the board in
+RAM.
+<screen>
+RedBoot> <userinput>version</userinput>
+
+RedBoot(tm) bootstrap and debug environment [RAM]
+Non-certified release, version UNKNOWN - built 14:09:27, Jul 20 2001
+
+Platform: Atmel AT91/EB40 (ARM7TDMI)
+Copyright (C) 2000, 2001, Red Hat, Inc.
+
+RAM: 0x02000000-0x02080000, 0x020116d8-0x0207fd00 available
+FLASH: 0x01010000 - 0x01020000, 256 blocks of 0x00000100 bytes each.
+
+RedBoot>
+</screen>
+Now, download the ROM mode image.
+<screen>
+RedBoot> <userinput>load -m ymodem -b %{FREEMEMLO}</userinput>
+</screen>
+Use your terminal emulator to send the file redboot_ROM.srec via YModem.
+e.g. <literal>Transfer->Send File</literal> in Hyperterminal, or
+<literal>Ctrl-A S</literal> in minicom.
+Finally, program it to flash.
+<screen>
+RedBoot> <userinput>fi wr -f 0x01010000 -b %{FREEMEMLO} -l 0xe100</userinput>
+</screen>
+SW1 should now be set to <literal>upper mem</literal> to select booting
+with RedBoot rather than Angel. Finally, press the "reset" pushbutton and
+RedBoot should come up on the board.
+</para>
+</sect3>
+
+<sect3>
+<title>Installing RedBoot on the EB40A, EB42 or EB55</title>
+<para>
+These development boards come with ARM's debug tool, Angel, installed
+in flash. At this time, Angel will not be replaced. Rather, RedBoot
+will be placed in the alternate half of flash. Jumper JP1 is used to
+select which monitor to boot. Once RedBoot is installed, setting JP1
+to <literal>STD</literal> will choose Angel, whereas setting JP1 to
+<literal>USER</literal> will choose RedBoot.
+</para>
+<para>
+Set JP1 to <literal>STD</literal> and connect serial port A to a host
+computer. Using GDB from the host and Angel on the board, download
+the RAM mode image of RedBoot to the board, and start it using the
+'cont' command.
+<screen>
+<userinput>arm-elf-gdb redboot_RAM.elf</userinput>
+(gdb) <userinput>tar rdi s=/dev/ttyS0</userinput>
+Angel Debug Monitor (serial) 1.04 (Advanced RISC Machines SDT 2.5) for AT91EB55 (2.20)
+Angel Debug Monitor rebuilt on Feb 03 2002 at 16:10:20
+Serial Rate: 9600
+Connected to ARM RDI target.
+(gdb) <userinput>set $cpsr=0xd3</userinput>
+(gdb) <userinput>load</userinput>
+Loading section .rom_vectors, size 0x40 lma 0x2008000
+Loading section .text, size 0xb0b8 lma 0x2008040
+Loading section .rodata, size 0x1c27 lma 0x20130f8
+Loading section .data, size 0x5f0 lma 0x2014d20
+Start address 0x2008040, load size 54031
+Transfer rate: 6264 bits/sec, 500 bytes/write.
+(gdb) <userinput>cont</userinput>
+Continuing.
+</screen>
+Once RedBoot is started, the GDB session connected with Angel must be
+suspended (this can be done using Ctrl-Z) or terminated
+(with Ctrl-C or the Windows task manager). Follow this by connecting to
+the board using a terminal emulator such as hyperterminal or minicom
+at 38400-8N1. At this point, RedBoot will be running on the board in
+RAM.
+<screen>
+RedBoot> <userinput>version</userinput>
+
+RedBoot(tm) bootstrap and debug environment [RAM]
+Non-certified release, version UNKNOWN - built 16:58:52, May 7 2003
+
+Platform: Atmel AT91/EB55 (ARM7TDMI)
+Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
+
+RAM: 0x02000000-0x02040000, 0x020068a8-0x0203f000 available
+FLASH: 0x01010000 - 0x01200000, 31 blocks of 0x00010000 bytes each.
+
+RedBoot>
+</screen>
+Now, download the ROM mode image.
+<screen>
+RedBoot> <userinput>load -m ymodem -b %{FREEMEMLO}</userinput>
+</screen>
+Use your terminal emulator to send the file redboot_ROM.srec via YModem.
+e.g. <literal>Transfer->Send File</literal> in Hyperterminal, or
+<literal>Ctrl-A S</literal> in minicom.
+Finally, program it to flash.
+<screen>
+RedBoot> <userinput>fi wr -f 0x01100000 -b %{FREEMEMLO} -l 0x10000</userinput>
+</screen>
+Set JP1 to the <literal>USER</literal> setting, press the "reset"
+pushbutton and RedBoot should come up on the board.
+</para>
+</sect3>
+
+
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>None.</para>
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>This processor has no MMU, so the only memory map is for
+physical addresses.
+</para>
+<para>
+The memory layout of the EB40 is as follows:
+<programlisting>
+Physical Address Range Description
+----------------------- ----------------------------------
+0x00000000 - 0x00000fff On-chip SRAM
+0x01000000 - 0x0101ffff Flash
+0x02000000 - 0x0207ffff RAM
+0xffe00000 - 0xffffffff I/O registers
+</programlisting>
+
+The flash based RedBoot image occupies virtual addresses 0x01010000 - 0x0101dfff.
+</para>
+
+<para>
+The memory layout of the EB40A is as follows:
+<programlisting>
+Physical Address Range Description
+----------------------- ----------------------------------
+0x00000000 - 0x0003ffff On-chip SRAM
+0x01000000 - 0x011fffff Flash
+0x02000000 - 0x02ffffff External SRAM (optional)
+0xffe00000 - 0xffffffff I/O registers
+</programlisting>
+
+The flash based RedBoot image occupies virtual addresses 0x01100000 - 0x0110ffff.
+</para>
+
+<para>
+The memory layout of the EB42 and EB55 is as follows:
+<programlisting>
+Physical Address Range Description
+----------------------- ----------------------------------
+0x00000000 - 0x00001fff On-chip SRAM
+0x01000000 - 0x011fffff Flash
+0x02000000 - 0x0203ffff RAM
+0xffe00000 - 0xffffffff I/O registers
+</programlisting>
+
+The flash based RedBoot image occupies virtual addresses 0x01100000 - 0x0110ffff.
+</para>
+
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export ARCH_DIR=arm
+
+export TARGET=eb40
+export PLATFORM_DIR=at91/eb40
+
+export TARGET=eb40a
+export PLATFORM_DIR=at91/eb40a
+
+export TARGET=eb42
+export PLATFORM_DIR=at91/eb42
+
+export TARGET=eb55
+export PLATFORM_DIR=at91/eb55
+</programlisting>
+
+Use just one of the <literal>TARGET</literal> and
+<literal>PLATFORM_DIR</literal> variable pairs only.
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+<para>When reprogramming RedBoot using RedBoot itself, you should
+load a RedBoot RAM image as normal, and load the new ROM image
+into RAM. However before programming the new image into Flash
+you <emphasis>must</emphasis> switch SW1 to lower mem (EB40)
+or set JP1 to STD (EB40A, EB42, EB55) before writing to Flash.
+</para>
+
+<warning><title>Warning!</title><para>Failure to set SW1 to
+<literal>lower mem</literal> (EB40) or JP1 to
+<literal>STD</literal> (EB40A, EB42, EB55) will cause the
+installation of RedBoot to overwrite Angel, thus making the board
+<emphasis>unbootable</emphasis>. Only hardware JTAG can restore the
+board once in this state.
+</para></warning>
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="at91jtst">
+<title>ARM/ARM7 Atmel JTST Evaluation Board (AT572D740-DK1)</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Atmel AT91/JTST</primary>
+<secondary>installing and testing</secondary></indexterm><indexterm><primary>
+installing and testing</primary><secondary>Atmel AT91/JTST
+</secondary></indexterm>
+RedBoot support is available for the JTST board.
+By default this board is shipped with 256Kbytes of
+external SRAM. To minimize the amount of RAM used by RedBoot, only very basic
+flash management is provided, comprising of just the <command>fis
+erase</command> and <command>fis write</command> commands.
+</para>
+<para>
+RedBoot supports two serial ports.
+The default serial port settings for RedBoot are 115200,8,N,1.
+</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+</sect2>
+<sect2>
+<title>Installing a RedBoot image on the JTST</title>
+<para>
+This development board comes with RedBoot installed on flash. To
+install a new version of RedBoot or another binary image in flash you
+must start a GDB session setting a remote target and load and run the
+<command>jtstflashd.elf</command> diopsis application. This is a
+daemon that listens on JTST serial port 1. On the PC side you must use
+the <command>jtstflash.exe</command> (both linux and windows PC are
+supported) to flash the image on JTST. The sources for win32 and
+linux/cygwin versions of this host tool can be found in the support
+directory of the jtst hal. The binaries can be found along with the
+binaries for redboot on the eCos website at
+<ulink url="http://ecos.sourceware.org/ecos/boards/redbootbins/at91jtst/index.html">
+http://ecos.sourceware.org/ecos/boards/redbootbins/at91jtst/</ulink>
+</para>
+<para>
+When the jtstflashd.elf is started, the user should open the jumper
+JP5 to write in the second half (512Kbytes) of the flash, in this way
+the original RedBoot image is preserved.
+</para>
+<sect3>
+<title>GDB console</title>
+<screen>
+<userinput>arm-elf-gdb jtstflash.elf</userinput>
+(gdb) <userinput>set remotebaud 115200</userinput>
+(gdb) <userinput>target remote /dev/ttyS0</userinput>
+Remote debugging using /dev/ttyS0
+0x00502a44 in ?? ()
+(gdb) <userinput>load</userinput>
+Loading section .internal_vectors, size 0x1c4 lma 0x160
+Loading section .rom_vectors, size 0x40 lma 0x606000
+Loading section .text, size 0x14198 lma 0x606040
+Loading section .rodata, size 0xb6c lma 0x61a1d8
+Loading section .data, size 0x498 lma 0x61ad44
+Start address 0x606040, load size 86944
+Transfer rate: 77283 bits/sec, 301 bytes/write.
+(gdb) <userinput>c</userinput>
+Continuing.
+* JTST FLASH PROGRAMMER
+* opening usart port 1
+...
+</screen>
+</sect3>
+<sect3>
+<title>PC console</title>
+<screen>
+<userinput>jtstflash mybinaryimage.bin</userinput>
+* binary len 79536 bytes flash add 0x500000..
+* flash id check ok
+* erasing space address 0x500000... please wait
+* flash erase check ok
+* start programming 79536 bytes.
+</screen>
+</sect3>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>None.</para>
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>This processor has no MMU, so the only memory map is for
+physical addresses.
+</para>
+<para>
+The memory layout of the JTST after bootstrap is as follows:
+<programlisting>
+Physical Address Range Description
+----------------------- ----------------------------------
+0x00000000 - 0x00007fff On-chip SRAM
+0x00500000 - 0x0057ffff Flash
+0x00600000 - 0x0063ffff External SRAM
+0x00410000 - 0x0042fffc On-chip Magic Data Memory Left
+0x00430000 - 0x0043fffc On-chip Magic Data Memory Right
+0x00430000 - 0x0044fffc On-chip Magic Program Memory
+0x00490000 - 0x00490ffc On-chip Arm/Magic Data Exchange Left
+0x004A0000 - 0x004A0ffc On-chip Arm/Magic Data Exchange Right
+0x00450000 - 0x0045003c Magic I/O registers
+0x00460000 - 0x0046000c Magic Control registers
+0xffe00000 - 0xffffffff I/O registers
+</programlisting>
+</para>
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="edb7xxx">
+<title>ARM/ARM7 Cirrus Logic EP7xxx (EDB7211, EDB7212, EDB7312) </title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Cirrus Logic EP7xxx (EDB7211, EDB7212, EDB7312)</primary>
+<secondary>installing and testing</secondary></indexterm><indexterm><primary>
+installing and testing</primary><secondary>Cirrus Logic EP7xxx (EDB7211, EDB7212, EDB7312)
+</secondary></indexterm>RedBoot supports both serial ports on the board and
+the ethernet port. The default serial port settings are 38400,8,N,1. RedBoot
+also supports flash management on the EDB7xxx for the NOR flash
+only.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+ <row>
+ <entry>ROMRAM</entry>
+ <entry>[ROMRAM]</entry>
+ <entry>RedBoot running from RAM, but contained in the
+ board's flash boot sector (EDB7312 only).</entry>
+ <entry>redboot_ROMRAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation Method </title>
+<para>A Windows or Linux utility is used to program flash using serial port
+#1 via on-chip programming firmware. See board documentation for details on
+in situ flash programming. </para>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>None.</para>
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>The MMU page tables and LCD display buffer, if enabled, are located
+at the end of DRAM. <note><title>NOTE
+</title>
+<para>The virtual memory maps in this section use a C and B column to indicate
+whether or not the region is cached (C) or buffered (B).</para>
+</note><programlisting>
+Physical Address Range Description
+----------------------- ----------------------------------
+0x00000000 - 0x01ffffff NOR Flash (EDB7211, EDB7212)
+0x00000000 - 0x00ffffff NOR Flash (EDB7312)
+0x10000000 - 0x11ffffff NAND Flash
+0x20000000 - 0x2fffffff Expansion 2
+0x30000000 - 0x3fffffff Expansion 3
+0x40000000 - 0x4fffffff PCMCIA 0
+0x50000000 - 0x5fffffff PCMCIA 1
+0x60000000 - 0x600007ff On-chip SRAM
+0x80000000 - 0x8fffffff I/O registers
+0xc0000000 - 0xc1ffffff DRAM (EDB7211, EDB7212)
+0xc0000000 - 0xc0ffffff DRAM (EDB7312)
+
+Virtual Address Range C B Description
+----------------------- - - ----------------------------------
+0x00000000 - 0x01ffffff Y Y DRAM
+0x00000000 - 0x00fcffff Y Y DRAM (EDB7312)
+0x20000000 - 0x2fffffff N N Expansion 2
+0x30000000 - 0x3fffffff N N Expansion 3
+0x40000000 - 0x4fffffff N N PCMCIA 0
+0x50000000 - 0x5fffffff N N PCMCIA 1
+0x60000000 - 0x600007ff Y Y On-chip SRAM
+0x80000000 - 0x8fffffff N N I/O registers
+0xc0000000 - 0xc001ffff N Y LCD buffer (if configured)
+0xe0000000 - 0xe1ffffff Y Y NOR Flash (EDB7211, EDB7212)
+0xe0000000 - 0xe0ffffff Y Y NOR Flash (EDB7312)
+0xf0000000 - 0xf1ffffff Y Y NAND Flash
+
+The flash based RedBoot image occupies virtual addresses 0xe0000000 - 0xe003ffff.
+</programlisting></para>
+</sect2>
+<sect2>
+<title>Platform Resource Usage</title>
+<para>The EP7xxx timer #2 is used as a polled timer to provide timeout support
+for network and XModem file transfers.</para>
+</sect2><sect2>
+
+<title>Rebuilding RedBoot</title>
+
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=edb7211
+export TARGET=edb7212
+export TARGET=edb7312
+export ARCH_DIR=arm
+export PLATFORM_DIR=edb7xxx
+</programlisting>
+
+Use one of the TARGET settings only.
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="aaed2000">
+<title>ARM/ARM9 Agilent AAED2000</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Agilent AAED2000 ARM9 (aaed)</primary>
+<secondary>installing and testing</secondary></indexterm><indexterm><primary>
+installing and testing</primary><secondary>Agilent AAED2000 ARM9 (aaed)
+</secondary></indexterm>RedBoot supports the serial and ethernet ports
+on the board. The default serial port settings are 38400,8,N,1.
+RedBoot also supports flash management on the AAED2000.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROMRAM</entry>
+ <entry>[ROMRAM]</entry>
+ <entry>RedBoot running from RAM, but contained in the
+ board's flash boot sector.</entry>
+ <entry>redboot_primary_ROMRAM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_primary_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+</sect2>
+
+<sect2>
+<title>Initial Installation Method </title>
+<para>It is possible to install RedBoot in one of two ways. Either as
+the primary bootmonitor on the board (installed to blocks 0-1 of the
+flash) or as the secondary bootmonitor on the board (installed to
+blocks 1-2 of the flash).</para>
+
+<para>Presently, only the former method is supported.</para>
+<!-- Nuke the above line if uncommenting this block
+<para>When installed as the secondary bootmonitor, the ARM bootmonitor
+remains in flash and auto-executes RedBoot (but only when RedBoot is
+smaller than 128KB - which means it cannot include the LCD driver).
+It is of crucial importance that no RedBoot configured to be
+primary bootmonitor is executed on a board where RedBoot is actually
+supposed to be the secondary bootmonitor since it may cause corruption
+of the flash. Installing RedBoot as the primary booter is
+adviced.</para>
+-->
+
+<sect3><title>RedBoot as Primary Bootmonitor</title>
+
+<para>RedBoot is installed in flash using the on-board ARM Boot
+Monitor.</para>
+<para>Boot the board while pressing SPACE. This should bring up the
+Boot Monitor:
+<screen>ARM bootPROM [Version 1.3] Rebuilt on Jul 16 2001 at 16:21:36
+Running on a P920 board Evaluation Board
+Board Revision V1.0, ARM920T processor Processor
+Memory Size is 32MBytes, Flash Size is 32MBytes
+Copyright (c) ARM Limited 1999 - 2001. All rights reserved.
+Board designed by ARM Limited
+Hardware support provided at http://www.arm.com/
+For help on the available commands type ? or h
+boot Monitor >
+</screen>
+
+Download the RAM mode image of RedBoot configured as a primary
+bootmonitor using the ARM bootmonitor's SREC-download command:
+
+<screen>boot Monitor &gt; <userinput>m</userinput>
+Load Motorola S-Record image into memory and execute it
+The S-Record loader only accepts input on the serial port.
+Record addresses must be between 0x00008000 and 0x01E0F510.
+Type Ctrl/C to exit loader.
+</screen>
+
+Use the terminal emulator's ASCII upload command, or (on Linux) simply
+cat the file to the serial port:
+
+<screen>$ <userinput>cat redboot_primary_RAM/redboot.srec &gt;/dev/ttyS1</userinput>
+</screen>
+
+You should see RedBoot start up:
+
+<screen>FLASH configuration checksum error or invalid key
+Ethernet eth0: MAC address 00:30:d3:03:04:99
+IP: 192.168.42.111, Default server: 192.168.42.3
+
+RedBoot(tm) bootstrap and debug environment [RAM]
+Non-certified release, version UNKNOWN - built 13:15:40, Nov 9 2001
+
+Platform: AAED2000 system (ARM9) [Primary]
+Copyright (C) 2000, 2001, Red Hat, Inc.
+
+RAM: 0x00000000-0x01f80000, 0x0006f208-0x01f51000 available
+FLASH: 0x60000000 - 0x62000000, 256 blocks of 0x00020000 bytes each.
+RedBoot></screen>
+
+As can be seen from the output above, the network has been configured
+to give the board an IP address and information about the default
+server. If things are not set up on your network, you can still
+continue, but use the Y-modem download method when loading the RedBoot
+ROMRAM mode image.
+
+Now initialize RedBoot's FIS:
+
+<screen>RedBoot&gt; <userinput>fis init</userinput>
+About to initialize [format] FLASH image system - continue (y/n)? <userinput>y</userinput>
+*** Initialize FLASH Image System
+ Warning: device contents not erased, some blocks may not be usable
+... Erase from 0x61fe0000-0x62000000: .
+... Program from 0x01f5f000-0x01f5f300 at 0x61fe0000: .
+</screen>
+
+Download the ROMRAM mode image of RedBoot via ethernet:
+
+<screen>RedBoot&gt; <userinput>load -b %{FREEMEMLO} redboot_primary_ROMRAM/redboot.srec</userinput>
+</screen>
+
+or using serial Y-modem protocol:
+
+<screen>RedBoot&gt; <userinput>load -mode ymodem -b %{FREEMEMLO}</userinput>
+</screen>
+
+(Use the terminal emulator's Y-modem upload command to send the file
+<filename>redboot_primary_ROMRAM/redboot.srec</filename>.)
+
+When the image has been downloaded, program it into flash:
+
+<screen>Address offset = 0x00ff8000
+Entry point: 0x00008040, address range: 0x00008000-0x0002da80
+RedBoot&gt; <userinput>fi cr RedBoot</userinput>
+An image named 'RedBoot' exists - continue (y/n)? <userinput>y</userinput>
+* CAUTION * about to program 'RedBoot'
+ at 0x60000000..0x6003ffff from 0x00100000 - continue (y/n)? <userinput>y</userinput>
+... Erase from 0x60000000-0x60040000: ..
+... Program from 0x00100000-0x00140000 at 0x60000000: ..
+... Erase from 0x61fe0000-0x62000000: .
+... Program from 0x01f5f000-0x01f7f000 at 0x61fe0000: .
+</screen>
+
+Now reset the board. You should see the RedBoot banner.</para>
+
+</sect3>
+
+<!--
+<sect3><title>RedBoot as Secondary Bootmonitor</title>
+
+<para>RedBoot is installed in flash using the on-board ARM Boot
+Monitor.</para>
+<para>Boot the board while pressing SPACE. This should bring up the
+Boot Monitor:
+<screen>ARM bootPROM [Version 1.3] Rebuilt on Jul 16 2001 at 16:21:36
+Running on a P920 board Evaluation Board
+Board Revision V1.0, ARM920T processor Processor
+Memory Size is 32MBytes, Flash Size is 32MBytes
+Copyright (c) ARM Limited 1999 - 2001. All rights reserved.
+Board designed by ARM Limited
+Hardware support provided at http://www.arm.com/
+For help on the available commands type ? or h
+boot Monitor >
+</screen>
+
+Download the RAM mode image of RedBoot configured as a secondary
+bootmonitor using the ARM bootmonitor's SREC-download command:
+
+<screen>boot Monitor &gt; <userinput>m</userinput>
+Load Motorola S-Record image into memory and execute it
+The S-Record loader only accepts input on the serial port.
+Record addresses must be between 0x00008000 and 0x01E0F510.
+Type Ctrl/C to exit loader.
+</screen>
+
+Use the terminal emulator's ASCII upload command, or (on Linux) simply
+cat the file to the serial port:
+
+<screen>$ <userinput>cat redboot_secondary_RAM.srec &gt;/dev/ttyS1</userinput>
+</screen>
+
+You should see RedBoot start up:
+
+<screen>FLASH configuration checksum error or invalid key
+Ethernet eth0: MAC address 00:30:d3:03:04:99
+IP: 192.168.42.111, Default server: 192.168.42.3
+
+RedBoot(tm) bootstrap and debug environment [RAM]
+Non-certified release, version UNKNOWN - built 12:31:13, Nov 9 2001
+
+Platform: AAED2000 system (ARM9) [Secondary]
+Copyright (C) 2000, 2001, Red Hat, Inc.
+
+RAM: 0x00000000-0x01f80000, 0x00063568-0x01f51000 available
+FLASH: 0x60000000 - 0x62000000, 256 blocks of 0x00020000 bytes each.
+</screen>
+
+As can be seen from the output above, the network has been configured
+to give the board an IP address and information about the default
+server. If things are not set up on your network, you can still
+continue, but use the Y-modem download method when loading the RedBoot
+ROMRAM mode image.
+
+Next step is to erase all of the flash, except where the ARM booter resides:
+
+<screen>RedBoot&gt; <userinput>fi erase -f 0x60020000 -l 0x01fe0000</userinput>
+... Erase from 0x60020000-0x62000000: ..........................................
+................................................................................
+................................................................................
+.....................................................
+</screen>
+
+Then initialize RedBoot's FIS:
+
+<screen>RedBoot&gt; <userinput>fi init</userinput>
+About to initialize [format] FLASH image system - continue (y/n)? <userinput>y</userinput>
+*** Initialize FLASH Image System
+ Warning: device contents not erased, some blocks may not be usable
+... Erase from 0x61fc0000-0x61fe0000: .
+... Program from 0x01fdf000-0x01fff000 at 0x61fc0000: .
+</screen>
+
+Download the ROMRAM mode RedBoot image via ethernet:
+
+<screen>RedBoot&gt; <userinput>load -raw -b %{FREEMEMLO} redboot_secondary_ROMRAM.arm.bin</userinput>
+</screen>
+
+or using serial Y-modem protocol:
+
+<screen>RedBoot&gt; <userinput>load -raw -mode ymodem -b %{FREEMEMLO}</userinput>
+</screen>
+
+(Use the terminal emulator's Y-modem upload command to send the file
+<filename>redboot_secondary_ROMRAM.arm.bin</filename>.)
+
+When the image has been downloaded, program it into flash:
+
+<screen>RedBoot&gt; <userinput>fi cr RedBoot</userinput>
+An image named 'RedBoot' exists - continue (y/n)? <userinput>y</userinput>
+* CAUTION * about to program 'RedBoot'
+ at 0x60020000..0x6005ffff from 0x00100000 - continue (y/n)? <userinput>y</userinput>
+... Erase from 0x60020000-0x60060000: ..
+... Program from 0x00100000-0x00140000 at 0x60020000: ..
+... Erase from 0x61fc0000-0x61fe0000: .
+... Program from 0x01f5f000-0x01f7f000 at 0x61fc0000: .
+</screen>
+
+Now reset the board. You might see the ARM Monitor complain:
+
+<screen>Failed to boot from flash.
+The ARM Boot Monitor SIB can not be found.
+Press any key to continue.
+</screen>
+
+This is due to due to the flash having been erased. Press a key, and
+execute the "validate flash contents" command:
+
+<screen>boot Monitor &gt; <userinput>v</userinput>
+
+There are 254 128KByte blocks of Application Flash:
+
+No images found!
+================
+
+System Information Blocks
+=========================
+Address Owner Size Idx Rev
+~~~~~~~ ~~~~~ ~~~~ ~~~ ~~~
+0x05FE0000 ARM Boot Monitor 312 0 0
+
+
+Blocks of unknown type
+======================
+Block Size Footer Type
+~~~~~ ~~~~ ~~~~~~~~~~~
+ 252 1 0x52420000
+boot Monitor &gt;
+</screen>
+
+This causes the last block of the flash to be initialized with the ARM
+Boot Monitor ID, necessary for the Monitor to work properly. When
+resetting the board now, it should automatically start RedBoot. If you
+ever need to get into the ARM Boot Monitor again, reset the board
+while pressing the SPACE key.
+
+</para></sect3>
+-->
+
+</sect2>
+
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>The <command>exec</command> command which allows the loading
+and execution of Linux kernels,
+is supported for this board (see <xref linkend="executing-programs">). The <command>
+exec</command> parameters used for the AAED2000 are:</para>
+<variablelist><varlistentry>
+<term>-b <replaceable>&lt;addr></replaceable></term>
+<listitem><para>Location Linux kernel was loaded to</para></listitem></varlistentry>
+<varlistentry><term>
+-l <replaceable>&lt;len></replaceable></term>
+<listitem><para>Length of kernel</para></listitem></varlistentry>
+<varlistentry><term>
+-c <replaceable>"params"</replaceable></term>
+<listitem><para>Parameters passed to kernel</para></listitem></varlistentry>
+<varlistentry><term>-r <replaceable>&lt;addr></replaceable></term>
+<listitem><para>'initrd' ramdisk location</para></listitem></varlistentry>
+<varlistentry><term>-s <replaceable>&lt;len></replaceable></term>
+<listitem><para>Length of initrd ramdisk</para></listitem></varlistentry>
+</variablelist>
+
+<para>The parameters for kernel image base and size are automatically
+set after a load operation. So one way of starting the kernel would
+be:
+
+<screen>RedBoot&gt; <userinput>load -r -b 0x100000 zImage</userinput>
+Raw file loaded 0x00100000-0x001a3d6c
+RedBoot&gt; exec -c "console=ttyAC0,38400"
+Using base address 0x00100000 and length 0x000a3d6c
+Uncompressing Linux.....
+</screen>
+
+An image could also be put in flash and started directly:
+
+<screen>RedBoot&gt; <userinput>exec -b 0x60040000 -l 0xc0000 -c "console=ttyAC0,38400"</userinput>
+Uncompressing Linux.....
+</screen>
+
+</para>
+
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>The MMU page tables are located at 0x4000. <note><title>NOTE
+</title>
+<para>The virtual memory maps in this section use a C and B column to indicate
+whether or not the region is cached (C) or buffered (B).</para>
+</note><programlisting>Physical Address Range Description
+----------------------- ----------------------------------
+0x00000000 - 0x01ffffff Flash
+0x10000000 - 0x100fffff Ethernet
+0x30000000 - 0x300fffff Board registers
+0x40000000 - 0x4fffffff PCMCIA Slot (0)
+0x50000000 - 0x5fffffff Compact Flash Slot (1)
+0x80000000 - 0x800037ff I/O registers
+0xb0060000 - 0xb00fffff On-chip SRAM
+0xf0000000 - 0xfd3fffff SDRAM
+
+Virtual Address Range C B Description
+----------------------- - - ----------------------------------
+0x00000000 - 0x01f7ffff Y Y SDRAM
+0x01f80000 - 0x01ffffff Y Y SDRAM (used for LCD frame buffer)
+0x10000000 - 0x100fffff N N Ethernet
+0x30000000 - 0x300fffff N N Board registers
+0x40000000 - 0x4fffffff N N PCMCIA Slot (0)
+0x50000000 - 0x5fffffff N N Compact Flash Slot (1)
+0x60000000 - 0x61ffffff N N Flash
+0x80000000 - 0x800037ff N N I/O registers
+0xf0000000 - 0xffffffff N N SDRAM (uncached)
+
+</programlisting></para>
+
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=aaed
+export ARCH_DIR=arm
+export PLATFORM_DIR=arm9/aaed2000
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="excaliburarm9">
+<title>ARM/ARM9 Altera Excalibur</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Altera Excalibur ARM9 (excalibur_arm9)</primary>
+<secondary>installing and testing</secondary></indexterm><indexterm><primary>
+installing and testing</primary><secondary>Altera Excalibur ARM9 (excalibur_arm9)
+</secondary></indexterm>RedBoot supports the serial port labelled
+P2 on the board. The default serial port settings are 57600,8,N,1. RedBoot
+also supports flash management on the Excalibur.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROMRAM</entry>
+ <entry>[ROMRAM]</entry>
+ <entry>RedBoot running from RAM, but contained in the
+ board's flash boot sector.</entry>
+ <entry>redboot_ROMRAM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+ <row>
+ <entry>REDBOOT</entry>
+ <entry>[ROMRAM]</entry>
+ <entry>RedBoot running from top of RAM, but contained in
+ the board's flash boot sector.</entry>
+ <entry>redboot_REDBOOT.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+<note> <title>NOTE</title>
+<para>RedBoot is currently hardwired to use a 128MB SDRAM SIMM module.
+</para>
+</note>
+</sect2>
+
+<sect2>
+<title>Initial Installation Method </title>
+<para>A Windows utility
+(<application>exc_flash_programmer.exe</application>) is used to
+program flash using the ByteBlasterMV JTAG unit.
+See board documentation for details on
+in situ flash programming. </para>
+<para>For ethernet to work (under Linux) the following jumper
+settings should be used on a REV 2 board: <literallayout>
+SW2-9 : OFF
+U179 : 2-3
+JP14-18 : OPEN
+JP40-41 : 2-3
+JP51-55 : 2-3
+</literallayout>
+</para>
+</sect2>
+<sect2>
+<title>Flash management</title>
+
+<para>The ROMRAM and REDBOOT configurations supported on this platform
+differ only in the memory layout (ROMRAM configuration runs RedBoot from
+0x00008000 while REDBOOT configuration runs RedBoot from 0x07f80000). The
+REDBOOT configuration allows applications to be loaded and run from
+address 0x00008000.</para>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>The <command>exec</command> command which allows the loading
+and execution of Linux kernels,
+is supported for this board (see <xref linkend="executing-programs">). The <command>
+exec</command> parameters used for the Excalibur are:</para>
+<variablelist><varlistentry>
+<term>-b <replaceable>&lt;addr></replaceable></term>
+<listitem><para>Location Linux kernel was loaded to</para></listitem></varlistentry>
+<varlistentry><term>
+-l <replaceable>&lt;len></replaceable></term>
+<listitem><para>Length of kernel</para></listitem></varlistentry>
+<varlistentry><term>
+-c <replaceable>"params"</replaceable></term>
+<listitem><para>Parameters passed to kernel</para></listitem></varlistentry>
+<varlistentry><term>-r <replaceable>&lt;addr></replaceable></term>
+<listitem><para>'initrd' ramdisk location</para></listitem></varlistentry>
+<varlistentry><term>-s <replaceable>&lt;len></replaceable></term>
+<listitem><para>Length of initrd ramdisk</para></listitem></varlistentry>
+</variablelist>
+
+<para>The parameters for kernel image base and size are automatically
+set after a load operation. So one way of starting the kernel would
+be:
+
+<screen>RedBoot&gt; <userinput>load -r -b 0x100000 zImage</userinput>
+Raw file loaded 0x00100000-0x001a3d6c
+RedBoot&gt; <userinput>exec -c "console=ttyUA0,57600"</userinput>
+Using base address 0x00100000 and length 0x000a3d6c
+Uncompressing Linux.....
+</screen>
+
+An image could also be put in flash and started directly:
+
+<screen>RedBoot&gt; <userinput>exec -b 0x40400000 -l 0xc0000 -c "console=ttyUA0,57600"</userinput>
+Uncompressing Linux.....
+</screen>
+
+</para>
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>The MMU page tables are located at 0x4000. <note><title>NOTE
+</title>
+<para>The virtual memory maps in this section use a C and B column to indicate
+whether or not the region is cached (C) or buffered (B).</para>
+</note><programlisting>Physical Address Range Description
+----------------------- ----------------------------------
+0x00000000 - 0x07ffffff SDRAM
+0x08000000 - 0x0805ffff On-chip SRAM
+0x40000000 - 0x40ffffff Flash
+0x7fffc000 - 0x7fffffff I/O registers
+0x80000000 - 0x8001ffff PLD
+
+Virtual Address Range C B Description
+----------------------- - - ----------------------------------
+0x00000000 - 0x07ffffff Y Y SDRAM
+0x08000000 - 0x0805ffff Y Y On-chip SRAM
+0x40000000 - 0x403fffff N Y Flash
+0x7fffc000 - 0x7fffffff N N I/O registers
+0x80000000 - 0x8001ffff N N PLD
+</programlisting></para>
+
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=excalibur_arm9
+export ARCH_DIR=arm
+export PLATFORM_DIR=arm9/excalibur
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="ebsa285">
+<title>ARM/StrongARM(SA110) Intel EBSA 285</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Intel StrongArm EBSA 285</primary><secondary>installing
+and testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Intel StrongArm EBSA 285</secondary></indexterm>RedBoot
+uses the single EBSA-285 serial port. The default serial port settings are
+38400,8,N,1. If the EBSA-285 is used as a host on a PCI backplane, ethernet
+is supported using an Intel PRO/100+ ethernet adapter. Management of
+onboard flash is also supported.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation Method </title>
+<para>A linux application is used to program the flash over the PCI bus. Sources
+and build instructions for this utility are located in the RedBoot sources
+in: <filename class="directory">packages/hal/arm/ebsa285/current/support/linux/safl_util</filename>
+</para>
+</sect2>
+<sect2>
+<title>Communication Channels </title>
+<para>Serial, Intel PRO 10/100+ 82559 PCI ethernet card.</para>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>None.</para>
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>Physical and virtual mapping are mapped one to one on the EBSA-285 using
+a first level page table located at address 0x4000. No second level tables
+are used. <note><title>NOTE </title>
+<para>The virtual memory maps in this section use a C and B column to indicate
+whether or not the region is cached (C) or buffered (B).</para>
+</note><programlisting>Address Range C B Description
+----------------------- - - ----------------------------------
+0x00000000 - 0x01ffffff Y Y SDRAM
+0x40000000 - 0x400fffff N N 21285 Registers
+0x41000000 - 0x413fffff Y N flash
+0x42000000 - 0x420fffff N N 21285 CSR Space
+0x50000000 - 0x50ffffff Y Y Cache Clean
+0x78000000 - 0x78ffffff N N Outbound Write Flush
+0x79000000 - 0x7c0fffff N N PCI IACK/Config/IO
+0x80000000 - 0xffffffff N Y PCI Memory </programlisting></para>
+</sect2>
+<sect2>
+<title>Platform Resource Usage </title>
+<para>Timer3 is used as a polled timer to provide timeout support for networking
+and XModem file transfers.</para>
+</sect2>
+<!--
+<sect2>
+<title>Building eCos Test Cases to run with old RedBoots</title>
+<para>If using older versions of RedBoot, the default configuration for
+EBSA-285 will send diagnostic output to the serial line only, not over an ethernet
+connection. To allow eCos programs to use RedBoot to channel diagnostic output to
+GDB whether connected by net or serial, enable the configuration option <programlisting>
+CYGSEM_HAL_VIRTUAL_VECTOR_DIAG
+"Do diagnostic IO via virtual vector table"</programlisting> located here
+in the common HAL configuration tree: <programlisting>"eCos HAL"
+ "ROM monitor support"
+ "Enable use of virtual vector calling interface"
+ "Do diagnostic IO via virtual vector table"</programlisting>Other
+than that, no special configuration is required to use RedBoot. </para>
+<para>If you have been using built-in stubs to acquire support for thread-aware
+debugging, you can still do that, but you must only use the serial device
+for GDB connection and you must not enable the option mentioned above. However,
+it is no longer necessary to do that to get thread-awareness; RedBoot is thread
+aware.</para>
+</sect2>
+-->
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=ebsa285
+export ARCH_DIR=arm
+export PLATFORM_DIR=ebsa285
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="brutus">
+<title>ARM/StrongARM(SA1100) Intel Brutus</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Intel-SA1100 (Brutus)</primary><secondary>installing
+and testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Intel SA1100 (Brutus)</secondary></indexterm>RedBoot
+supports both board serial ports on the Brutus board. The default serial port
+settings are 38400,8,N,1. flash management is not currently supported. </para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation Method </title>
+<para>Device programmer is used to program socketed flash parts.</para>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>None.</para>
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>The first level page table is located at physical address 0xc0004000.
+No second level tables are used.
+
+<note><title>NOTE</title>
+<para>The virtual memory maps in this section use a C and B column to indicate
+whether or not the region is cached (C) or buffered (B).</para>
+
+</note><programlisting>Physical Address Range Description
+----------------------- ----------------------------------
+0x00000000 - 0x000fffff Boot ROM
+0x08000000 - 0x083fffff Application flash
+0x10000000 - 0x100fffff SRAM
+0x18000000 - 0x180fffff Chip Select 3
+0x20000000 - 0x3fffffff PCMCIA
+0x80000000 - 0xbfffffff SA-1100 Internal Registers
+0xc0000000 - 0xc7ffffff DRAM Bank 0
+0xc8000000 - 0xcfffffff DRAM Bank 1
+0xd0000000 - 0xd7ffffff DRAM Bank 2
+0xd8000000 - 0xdfffffff DRAM Bank 3
+0xe0000000 - 0xe7ffffff Cache Clean
+
+
+Virtual Address Range C B Description
+----------------------- - - ----------------------------------
+0x00000000 - 0x003fffff Y Y DRAM Bank 0
+0x00400000 - 0x007fffff Y Y DRAM Bank 1
+0x00800000 - 0x00bfffff Y Y DRAM Bank 2
+0x00c00000 - 0x00ffffff Y Y DRAM Bank 3
+0x08000000 - 0x083fffff Y Y Application flash
+0x10000000 - 0x100fffff Y N SRAM
+0x20000000 - 0x3fffffff N N PCMCIA
+0x40000000 - 0x400fffff Y Y Boot ROM
+0x80000000 - 0xbfffffff N N SA-1100 Internal Registers
+0xe0000000 - 0xe7ffffff Y Y Cache Clean</programlisting></para>
+</sect2>
+<sect2>
+<title>Platform Resource Usage </title>
+<para>
+The SA11x0 OS timer is used as a polled timer to provide timeout
+support for XModem file transfers.</para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=brutus
+export ARCH_DIR=arm
+export PLATFORM_DIR=sa11x0/brutus
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="sa1100mm">
+<title>ARM/StrongARM(SA1100) Intel SA1100 Multimedia Board </title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Intel SA1100 Multimedia Board</primary><secondary>
+installing and testing</secondary></indexterm><indexterm><primary>installing
+and testing</primary><secondary>Intel SA1100 Multimedia Board</secondary>
+</indexterm>RedBoot supports both board serial ports. The default serial port
+settings are 38400,8,N,1. flash management is also supported.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+</sect2>
+
+<sect2>
+<title>Initial Installation Method </title>
+<para>A device programmer is used to program socketed flash parts.</para>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>None.</para>
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>The first level page table is located at physical address 0xc0004000.
+No second level tables are used.<note><title>NOTE</title>
+<para>The virtual memory maps in this section use a C and B column to indicate
+whether or not the region is cached (C) or buffered (B).</para>
+</note><programlisting>Physical Address Range Description
+----------------------- ----------------------------------
+0x00000000 - 0x000fffff Boot flash
+0x08000000 - 0x083fffff Application flash
+0x10000000 - 0x107fffff SA-1101 Board Registers
+0x18000000 - 0x180fffff Ct8020 DSP
+0x18400000 - 0x184fffff XBusReg
+0x18800000 - 0x188fffff SysRegA
+0x18c00000 - 0x18cfffff SysRegB
+0x19000000 - 0x193fffff Spare CPLD A
+0x19400000 - 0x197fffff Spare CPLD B
+0x20000000 - 0x3fffffff PCMCIA
+0x80000000 - 0xbfffffff SA1100 Internal Registers
+0xc0000000 - 0xc07fffff DRAM Bank 0
+0xe0000000 - 0xe7ffffff Cache Clean
+Virtual Address Range C B Description
+
+
+----------------------- - - ----------------------------------
+0x00000000 - 0x007fffff Y Y DRAM Bank 0
+0x08000000 - 0x083fffff Y Y Application flash
+0x10000000 - 0x100fffff N N SA-1101 Registers
+0x18000000 - 0x180fffff N N Ct8020 DSP
+0x18400000 - 0x184fffff N N XBusReg
+0x18800000 - 0x188fffff N N SysRegA
+0x18c00000 - 0x18cfffff N N SysRegB
+0x19000000 - 0x193fffff N N Spare CPLD A
+0x19400000 - 0x197fffff N N Spare CPLD B
+0x20000000 - 0x3fffffff N N PCMCIA
+0x50000000 - 0x500fffff Y Y Boot flash
+0x80000000 - 0xbfffffff N N SA1100 Internal Registers
+0xc0000000 - 0xc07fffff N Y DRAM Bank 0
+0xe0000000 - 0xe7ffffff Y Y Cache Clean</programlisting></para>
+</sect2>
+<sect2>
+<title>Platform Resource Usage </title>
+<para> The SA11x0 OS timer is used as a polled timer to provide timeout support
+for XModem file transfers.</para>
+</sect2><sect2>
+
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=sa1100mm
+export ARCH_DIR=arm
+export PLATFORM_DIR=sa11x0/sa1100mm
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+
+
+<?Pub _newpage>
+<sect1 id="assabet">
+<title>ARM/StrongARM(SA1110) Intel SA1110 (Assabet) </title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Intel SA1110 (Assabet)</primary><secondary>installing
+and testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Intel SA1110 (Assabet)</secondary></indexterm>RedBoot
+supports the board serial port and the compact flash ethernet port. The default
+serial port settings are 38400,8,N,1. RedBoot also supports flash management
+on the Assabet. </para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+</sect2>
+<sect2>
+<title>Initial Installation Method</title>
+<para>A Windows or Linux utility is used to program flash over parallel port
+driven JTAG interface. See board documentation for details on in situ flash
+programming. </para>
+<para>The flash parts are also socketed and may be programmed in a suitable
+device programmer.</para>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands</title>
+<para>None.</para>
+</sect2>
+<sect2>
+<title>Memory Maps</title>
+<para>The first level page table is located at physical address 0xc0004000.
+No second level tables are used.<note><title>NOTE</title>
+<para>The virtual memory maps in this section use a C and B column to indicate
+whether or not the region is cached (C) or buffered (B).</para>
+</note><programlisting>Physical Address Range Description
+----------------------- ----------------------------------
+0x00000000 - 0x07ffffff flash
+0x08000000 - 0x0fffffff SA-1111 Board flash
+0x10000000 - 0x17ffffff Board Registers
+0x18000000 - 0x1fffffff Ethernet
+0x20000000 - 0x2fffffff SA-1111 Board PCMCIA
+0x30000000 - 0x3fffffff Compact Flash
+0x40000000 - 0x47ffffff SA-1111 Board
+0x48000000 - 0x4bffffff GFX
+0x80000000 - 0xbfffffff SA-1110 Internal Registers
+0xc0000000 - 0xc7ffffff DRAM Bank 0
+0xc8000000 - 0xcfffffff DRAM Bank 1
+0xd0000000 - 0xd7ffffff DRAM Bank 2
+0xd8000000 - 0xdfffffff DRAM Bank 3
+0xe0000000 - 0xe7ffffff Cache Clean
+
+
+Virtual Address Range C B Description
+----------------------- - - ----------------------------------
+0x00000000 - 0x01ffffff Y Y DRAM Bank 0
+0x08000000 - 0x0fffffff Y Y SA-1111 Board flash
+0x10000000 - 0x17ffffff N N Board Registers
+0x18000000 - 0x1fffffff N N Ethernet
+0x20000000 - 0x2fffffff N N SA-1111 Board PCMCIA
+0x30000000 - 0x3fffffff N N Compact Flash
+0x40000000 - 0x47ffffff N N SA-1111 Board
+0x48000000 - 0x4bffffff N N GFX
+0x50000000 - 0x57ffffff Y Y flash
+0x80000000 - 0xbfffffff N N SA-1110 Internal Registers
+0xc0000000 - 0xc1ffffff N Y DRAM Bank 0
+0xe0000000 - 0xe7ffffff Y Y Cache Clean
+</programlisting></para>
+</sect2>
+<sect2>
+<title>Platform Resource Usage </title>
+<para>The SA11x0 OS timer is used as a polled timer to provide timeout support
+for network and XModem file transfers.</para>
+</sect2><sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=assabet
+export ARCH_DIR=arm
+export PLATFORM_DIR=sa11x0/assabet
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="nano">
+<title>ARM/StrongARM(SA11X0) Bright Star Engineering commEngine and nanoEngine</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>commEngine</primary><secondary>installing and testing
+</secondary></indexterm><indexterm><primary>nanoEngine</primary><secondary>
+installing and testing</secondary></indexterm><indexterm><primary>installing
+and testing</primary><secondary>commEngine</secondary></indexterm><indexterm>
+<primary>installing and testing</primary><secondary>nanoEngine</secondary>
+</indexterm>RedBoot supports a serial port and the built in ethernet port
+for communication and downloads. The default serial port settings are 38400,8,N,1.
+RedBoot runs from and supports flash management for the system flash
+region.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>POST</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the first free flash block
+ at 0x40000.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation</title>
+<para>Unlike other targets, the nanoEngine comes equipped with boot firmware
+which you cannot modify. See chapter 5, "nanoEngine Firmware" of the <citetitle>
+nanoEngine Hardware Reference Manual</citetitle> (we refer to "July 17, 2000
+Rev 0.6") from Bright Star Engineering. </para>
+<para>Because of this, eCos, and therefore Redboot, only supports a
+special configuration of the ROM mode, starting at offset 0x40000 in
+the flash.</para>
+<para>Briefly, the POST-configuration RedBoot image lives in flash following the
+BSE firmware. The BSE firmware is configured, using its standard <command>
+bootcmd</command> command, to run RedBoot at startup.
+</para>
+</sect2>
+<sect2>
+<title>Download Instructions</title>
+<para>You can perform the initial load of the POST-configuration RedBoot image into
+flash using the BSE firmware's <command>load</command> command.
+This will load a binary file, using TFTP, and program it into flash in one
+operation. Because no memory management is used in the BSE firmware, flash
+is mapped from address zero upwards, so the address for the RedBoot POST image
+is 0x40000. You must use the binary version of RedBoot for this,
+<filename>redboot-post.bin</filename>.</para>
+
+<para>This assumes you have set up the other BSE firmware config
+parameters such that it can communicate over your network to your TFTP
+server.
+<screen>><userinput>load redboot-post.bin 40000</userinput>
+loading ... erasing blk at 00040000
+erasing blk at 00050000
+94168 bytes loaded cksum 00008579
+done
+>
+> <userinput>set bootcmd "go 40000"</userinput>
+> <userinput>get</userinput>
+myip = 10.16.19.198
+netmask = 255.255.255.0
+eth = 0
+gateway = 10.16.19.66
+serverip = 10.16.19.66
+bootcmd = go 40000
+></screen>
+
+<note><title>NOTE</title>
+<para>the BSE firmware runs its serial IO at 9600 Baud; RedBoot runs instead
+at 38400 Baud. You must select the right baud rate in your terminal program
+to be able to set up the BSE firmware.</para>
+</note>
+
+After a reset, the BSE firmware will print
+
+<screen>Boot: BSE 2000 Sep 12 2000 14:00:30
+autoboot: "go 40000" [hit ESC to abort]</screen>
+
+and then RedBoot starts, switching to 38400 Baud.</para>
+
+<para>Once you have installed a bootable RedBoot in the system in this
+manner, we advise re-installing using the generic method described in
+<xref linkend="updating-redboot"> in order that the Flash Image System
+contains an appropriate description of the flash entries.</para>
+</sect2>
+<sect2>
+<title>Cohabiting with POST in Flash</title>
+<para>The configuration file named <filename>redboot_POST.ecm</filename>
+configures RedBoot to build for execution at address 0x50040000 (or, during
+bootup, 0x00040000). This is to allow power-on self-test (POST) code or immutable
+firmware to live in the lower addresses of the flash and to run before RedBoot
+gets control. The assumption is that RedBoot will be entered at its base address
+in physical memory, that is 0x00040000.</para>
+
+<para>Alternatively, for testing, you can call it in an already running system
+by using <userinput>go 0x50040040</userinput> at another RedBoot prompt, or
+a branch to that address. The address is where the reset vector
+points. It is reported by RedBoot's <command>load</command> command
+and listed
+by the <command>fis list</command> command, amongst other
+places.</para>
+
+<para>Using the POST configuration enables a normal config option which causes
+linking and initialization against memory layout files called "...post..."
+rather than "...rom..." or "...ram..." in the <filename class="directory">include/pkgconf
+</filename> directory. Specifically:<literallayout><filename>include/pkgconf/mlt_arm_sa11x0_nano_post.h</filename>
+<filename>include/pkgconf/mlt_arm_sa11x0_nano_post.ldi</filename>
+<filename>include/pkgconf/mlt_arm_sa11x0_nano_post.mlt</filename></literallayout>
+
+It is these you should edit if you wish to move the execution address
+from 0x50040000 in the POST configuration. Startup mode naturally
+remains ROM in this configuration.</para>
+
+<para>Because the nanoEngine contains immutable boot firmware at the start
+of flash, RedBoot for this target is configured to reserve that area in the
+Flash Image System, and to create by default an entry for the POST
+mode RedBoot.
+<screen>
+RedBoot> <userinput>fis list</userinput>
+Name FLASH addr Mem addr Length Entry point
+(reserved) 0x50000000 0x50000000 0x00040000 0x00000000
+RedBoot[post] 0x50040000 0x00100000 0x00020000 0x50040040
+RedBoot config 0x503E0000 0x503E0000 0x00010000 0x00000000
+FIS directory 0x503F0000 0x503F0000 0x00010000 0x00000000
+RedBoot>
+</screen>
+The entry "(reserved)" ensures that the FIS cannot attempt
+to overwrite the BSE firmware, thus ensuring that the board remains bootable
+and recoverable even after installing a broken RedBoot image.</para>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands</title>
+<para>The nanoEngine/commEngine has one or two Intel i82559 Ethernet controllers
+installed, but these have no associated serial EEPROM in which to record their
+Ethernet Station Address (ESA, or MAC address). The BSE firmware records an
+ESA for the device it uses, but this information is not available to RedBoot;
+we cannot share it.</para>
+<para>To keep the ESAs for the two ethernet interfaces, two new items of RedBoot
+configuration data are introduced. You can list them with the RedBoot command <command>
+fconfig -l</command> thus:
+<screen>
+RedBoot> <userinput>fconfig -l</userinput>
+Run script at boot: false
+Use BOOTP for network configuration: false
+Local IP address: 10.16.19.91
+Default server IP address: 10.16.19.66
+Network hardware address [MAC] for eth0: 0x00:0xB5:0xE0:0xB5:0xE0:0x99
+Network hardware address [MAC] for eth1: 0x00:0xB5:0xE0:0xB5:0xE0:0x9A
+GDB connection port: 9000
+Network debug at boot time: false
+RedBoot></screen>
+
+You should set them before running RedBoot or eCos applications with
+the board connected to a network. The <command>fconfig </command>
+command can be used as for any configuration data item; the entire ESA
+is entered in one line.</para>
+</sect2>
+<sect2>
+<title>Memory Maps</title>
+<para>The first level page table is located at physical address 0xc0004000.
+ No second level tables are used. <note><title>NOTE</title>
+<para>The virtual memory maps in this section use a C and B column to indicate
+whether or not the region is cached (C) or buffered (B).</para>
+</note><programlisting>Physical Address Range Description
+----------------------- ----------------------------------
+0x00000000 - 0x003fffff 4Mb FLASH (nCS0)
+0x18000000 - 0x18ffffff Internal PCI bus - 2 x i82559 ethernet
+0x40000000 - 0x4fffffff External IO or PCI bus
+0x80000000 - 0xbfffffff SA-1110 Internal Registers
+0xc0000000 - 0xc7ffffff DRAM Bank 0 - 32Mb SDRAM
+0xc8000000 - 0xcfffffff DRAM Bank 1 - empty
+0xe0000000 - 0xe7ffffff Cache Clean
+
+Virtual Address Range C B Description
+----------------------- - - ----------------------------------
+0x00000000 - 0x001fffff Y Y DRAM - 8Mb to 32Mb
+0x18000000 - 0x180fffff N N Internal PCI bus - 2 x i82559 ethernet
+0x40000000 - 0x4fffffff N N External IO or PCI bus
+0x50000000 - 0x51ffffff Y Y Up to 32Mb FLASH (nCS0)
+0x80000000 - 0xbfffffff N N SA-1110 Internal Registers
+0xc0000000 - 0xc0ffffff N Y DRAM Bank 0: 8 or 16Mb
+0xc8000000 - 0xc8ffffff N Y DRAM Bank 1: 8 or 16Mb or absent
+0xe0000000 - 0xe7ffffff Y Y Cache Clean</programlisting>
+</para>
+
+<para>The ethernet devices use a "PCI window" to communicate with the CPU.
+This is 1Mb of SDRAM which is shared with the ethernet devices that are on
+the PCI bus. It is neither cached nor buffered, to ensure that CPU and PCI
+accesses see correct data in the correct order. By default it is configured
+to be megabyte number 30, at addresses 0x01e00000-0x01efffff. This can be
+modified, and indeed must be, if less than 32Mb of SDRAM is installed, via
+the memory layout tool, or by moving the section <computeroutput>__pci_window
+</computeroutput> referred to by symbols <computeroutput>CYGMEM_SECTION_pci_window*
+</computeroutput> in the linker script. </para>
+<para>Though the nanoEngine ships with 32Mb of SDRAM all attached to DRAM
+bank 0, the code can cope with any of these combinations also; "2 x " in this
+context means one device in each DRAM Bank. <literallayout>1 x 8Mb = 8Mb 2 x 8Mb = 16Mb
+1 x 16Mb = 16Mb 2 x 16Mb = 32Mb</literallayout>All are programmed the same
+in the memory controller. </para>
+<para>Startup code detects which is fitted and programs the memory map accordingly.
+If the device(s) is 8Mb, then there are gaps in the physical memory map, because
+a high order address bit is not connected. The gaps are the higher 2Mb out
+of every 4Mb.</para>
+
+<para> The SA11x0 OS timer is used as a polled timer to provide timeout
+support within RedBoot.</para>
+</sect2>
+<sect2>
+<title>Nano Platform Port</title>
+<para>The nano is in the set of SA11X0-based platforms. It uses the arm architectural
+HAL, the sa11x0 variant HAL, plus the nano platform hal. These are components
+ <literallayout>CYGPKG_HAL_ARM hal/arm/arch/
+CYGPKG_HAL_ARM_SA11X0 hal/arm/sa11x0/var
+CYGPKG_HAL_ARM_SA11X0_NANO hal/arm/sa11x0/nano</literallayout> respectively.
+ </para>
+<para>The target name is "nano" which includes all these, plus the ethernet
+driver packages, flash driver, and so on.</para>
+</sect2>
+<sect2>
+<title>Ethernet Driver</title>
+<para>The ethernet driver is in two parts: </para>
+<para>A generic ether driver for Intel i8255x series devices, specifically
+the i82559, is <computeroutput>devs/eth/intel/i82559</computeroutput>. Its
+package name is <computeroutput>CYGPKG_DEVS_ETH_INTEL_I82559</computeroutput>.
+ </para>
+<para>The platform-specific ether driver is <computeroutput>devs/eth/arm/nano
+</computeroutput>. Its package is <computeroutput>CYGPKG_DEVS_ETH_ARM_NANO
+</computeroutput>. This tells the generic driver the address in IO memory
+of the chip, for example, and other configuration details. This driver picks
+up the ESA from RedBoot's configuration data - unless configured to use a
+static ESA in the usual manner. </para>
+</sect2><sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=nano
+export ARCH_DIR=arm
+export PLATFORM_DIR=sa11x0/nano
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="ipaq">
+<title>ARM/StrongARM(SA11X0) Compaq iPAQ PocketPC</title>
+<indexterm><primary>Compaq iPAQ PocketPC</primary><secondary>installing and
+testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Compaq iPAQ PocketPC</secondary></indexterm>
+<sect2>
+<title>Overview</title>
+<para>RedBoot supports the serial port via cradle or cable, and Compact Flash
+ethernet cards if fitted for communication and downloads. The LCD touchscreen
+may also be used for the console, although by default RedBoot will switch
+exclusively to one channel once input arrives. </para>
+<para>The default serial port settings are 38400,8,N,1. RedBoot runs from
+and supports flash management for the system flash region. </para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+ <row>
+ <entry>WinCE</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM, started from
+ <application>OSloader</application>.</entry>
+ <entry>redboot_WinCE.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+
+
+</sect2>
+<sect2>
+<title>Initial Installation</title>
+<para>RedBoot ROM and WinCE mode images are needed by the installation process.
+</para>
+<sect3>
+<title>Installing RedBoot on the iPAQ using Windows/CE</title>
+<para>
+The Windows/CE environment originally shipped with the iPAQ contains a hidden
+mini-loader, sometimes referred to as the "Parrot" loader. This loader can
+be started by holding down the action button (the joypad) while resetting
+the unit or when powering on. At this point, a blue bird will appear on
+the LCD screen. Also at this point, a simple loader can be accessed over the
+serial port at 115200/8N1. Using this loader, the contents of the iPAQ flash
+memory can be saved to a Compact Flash memory card.
+<note><title>NOTE</title><para>We have only tested this operation with a 32Mbyte CF memory card.
+Given that the backup will take 16MBytes + 1KByte, something more than a 16MByte
+card will be required.</para></note>
+</para>
+<para>
+Use the "r2c" command to dump Flash contents to the CF memory card. Once this
+completes, RedBoot can be installed with no fear since the Parrot loader can
+be used to restore the Flash contents at a later time.
+</para>
+<para>
+If you expect to completely recover the state of the iPAQ Win/CE environment, then
+HotSync should be run to backup all "RAM" files as well before installing RedBoot.
+</para>
+<para>The next step in installing RedBoot on the iPAQ actually involves Windows/CE,
+which is the native environment on the unit. Using WinCE, you need to
+install an application which will run a RAM based version of RedBoot. Once
+this is installed and running, RedBoot can be used to update the flash with
+a native/ROM version of RedBoot. <itemizedlist>
+<listitem><para>Using ActiveSync, copy the file OSloader to your iPAQ. </para>
+</listitem>
+<listitem><para>Using ActiveSync, copy the file redboot_WinCE.bin to the iPAQ
+as bootldr in its root directory. Note: this is not the top level folder
+displayed by Windows (Mobile Device), but rather the 'My Pocket PC' folder
+within it.</para>
+</listitem>
+<listitem><para>Execute OSloader. If you didn't create a shortcut, then you
+will have to poke around for it using the WinCE file explorer.</para>
+</listitem>
+<listitem><para>Choose the <guimenuitem>Tools->BootLdr->Run after loading
+from file</guimenuitem> menu item. </para>
+</listitem>
+</itemizedlist>At this point, the RAM based version of RedBoot should be running.
+ You should be able to return to this point by just executing the last two
+steps of the previous process if necessary.</para>
+</sect3>
+<sect3>
+<title>Installing RedBoot on the iPAQ - using the Compaq boot loader</title>
+<para>This method of installation is no longer supported.
+If you have previously installed either the Compaq boot loader or older
+versions of RedBoot, restore the Win/CE environment and proceed as outlined
+above.
+</para>
+</sect3>
+<sect3 id="setting-up-and-testing-redboot">
+<title>Setting up and testing RedBoot</title>
+<para>When RedBoot first comes up, it will want to initialize its LCD touch
+screen parameters. It does this by displaying a keyboard graphic and asks
+you to press certain keys. Using the stylus, press and hold until the prompt
+is withdrawn. When you lift the stylus, RedBoot will continue with the next
+calibration. </para>
+<para>Once the LCD touchscreen has been calibrated, RedBoot will start. The
+calibration step can be skipped by pressing the <guibutton>return/abort</guibutton>
+button on the unit (right most button with a curved arrow icon). Additionally,
+the unit will assume default values if the screen is not touched within about
+15 seconds. </para>
+<para>Once RedBoot has started, you should get information similar to this
+on the LCD screen. It will also appear on the serial port at 38400,8,N,1.
+
+<screen>RedBoot(tm) bootstrap and debug environment [ROM]
+Non-certified release, version UNKNOWN - built 06:17:41, Mar 19 2001
+Platform: Compaq iPAQ Pocket PC (StrongARM 1110)
+
+Copyright (C) 2000, 2001, Red Hat, Inc.
+
+RAM: 0x00000000-0x01fc0000, 0x0001f200-0x01f70000 available
+FLASH: 0x50000000 - 0x51000000, 64 blocks of 0x00040000 bytes
+each.</screen>
+
+Since the LCD touchscreen is only 30 characters wide, some of this
+data will be off the right hand side of the display. The joypad may be
+used to pan left and right in order to see the full lines. </para>
+<para>If you have a Compact Flash ethernet card, RedBoot should find
+it. You'll need to have BOOTP enabled for this unit (see your
+sysadmin for details). If it does, it will print a message like:
+
+<screen>... Waiting for network card: .Ready!
+Socket Communications Inc: CF+ LPE Revision E 08/04/99
+IP: 192.168.1.34, Default server: 192.168.1.101</screen></para>
+</sect3>
+
+<sect3 id="ipaq-install-rb-permanently">
+<title>Installing RedBoot permanently</title>
+<para>Once you are satisfied with the setup and that RedBoot is operating
+properly in your environment, you can set up your iPAQ unit to have RedBoot
+be the bootstrap application.
+
+<caution><title>CAUTION</title>
+<para>This step will destroy your Windows/CE environment.</para>
+<para>Before you take this step, it is strongly recommended you save your WinCE FLASH contents
+as outlined above using the "parrot" loader, or
+by using the Compaq OSloader:<itemizedlist>
+
+<listitem><para>Using OSloader on the iPAQ, select the <guimenuitem>Tools->Flash->Save
+to files...</guimenuitem>. menu item.</para>
+</listitem>
+
+<listitem><para>Four (4) files, 4MB each in size will be created.</para>
+</listitem>
+
+<listitem><para>After each file is created, copy the file to your computer,
+then delete the file from the iPAQ to make room in the WinCE ramdisk for the
+next file.</para></listitem>
+</itemizedlist></para>
+
+</caution>You will need to download the version of RedBoot designed as the
+ROM bootstrap. Then install it permanently using these commands:
+ <screen>
+RedBoot> <userinput>lo -r -b 0x100000 redboot_ROM.bin</userinput>
+RedBoot> <userinput>fi loc -f 0x50000000 -l 0x40000</userinput>
+RedBoot> <userinput>fis init</userinput>
+RedBoot> <userinput>fi unl -f 0x50040000 -l 0x40000</userinput>
+RedBoot> <userinput>fi cr RedBoot -b 0x100000</userinput>
+RedBoot> <userinput>fi loc -f 0x50040000 -l 0x40000</userinput>
+RedBoot> <userinput>reset</userinput>
+</screen>
+
+<warning><title>WARNING</title>
+<para>You must type these commands exactly! Failure to do so may render your
+iPAQ totally useless. Once you've done this, RedBoot should come up every
+time you reset.</para>
+</warning></para>
+</sect3>
+
+<sect3>
+<title>Restoring Windows/CE</title>
+<para>To restore Windows/CE from the backup taken in <xref linkend="ipaq-install-rb-permanently">,
+visit <ulink url="http://www.handhelds.org/projects/wincerestoration.html">http://www.handhelds.org/projects/wincerestoration.html</ulink>
+for directions.
+</para>
+</sect3></sect2>
+
+<sect2>
+<title>Additional commands</title>
+<para>The <command>exec</command> command which allows the loading
+and execution of Linux kernels,
+is supported for this board (see <xref linkend="executing-programs">). The <command>
+exec</command> parameters used for the iPAQ are:</para>
+<variablelist><varlistentry>
+<term>-b <replaceable>&lt;addr></replaceable></term>
+<listitem><para>Location Linux kernel was loaded to</para></listitem></varlistentry>
+<varlistentry><term>
+-l <replaceable>&lt;len></replaceable></term>
+<listitem><para>Length of kernel</para></listitem></varlistentry>
+<varlistentry><term>
+-c <replaceable>"params"</replaceable></term>
+<listitem><para>Parameters passed to kernel</para></listitem></varlistentry>
+<varlistentry><term>-r <replaceable>&lt;addr></replaceable></term>
+<listitem><para>'initrd' ramdisk location</para></listitem></varlistentry>
+<varlistentry><term>-s <replaceable>&lt;len></replaceable></term>
+<listitem><para>Length of initrd ramdisk</para></listitem></varlistentry>
+</variablelist>
+<para>Linux kernels may be run on the iPAQ using the sources from the anonymous
+CVS repository at the Handhelds project (<ulink url="http://www.handhelds.org/">
+http://www.handhelds.org/</ulink>) with
+the <filename>elinux.patch</filename> patch file applied. This file can be
+found in the
+<filename>misc/</filename> subdirectory of the iPAQ platform HAL in the
+RedBoot sources, normally
+<filename>hal/arm/sa11x0/ipaq/<replaceable>VERSION</replaceable>/misc/</filename>
+ </para>
+<para>
+On the iPAQ (and indeed all SA11x0 platforms), Linux expects to be loaded
+at address 0xC0008000 and the entry point is also at 0xC0008000.
+</para>
+
+</sect2>
+<sect2>
+<title>Memory Maps</title>
+<para>RedBoot sets up the following memory map on the iPAQ: The first level
+page table is located at physical address 0xC0004000. No second level tables
+are used. <note><title>NOTE</title>
+<para>The virtual memory maps in this section use a C and B column to indicate
+whether or not the region is cached (C) or buffered (B).</para>
+</note> <programlisting>Physical Address Range Description
+----------------------- ----------------------------------
+0x00000000 - 0x01ffffff 16Mb to 32Mb FLASH (nCS0) [organized as below]
+ 0x000000 - 0x0003ffff Parrot Loader
+ 0x040000 - 0x0007ffff RedBoot
+ 0xf80000 - 0x00fbffff Fconfig data
+ 0xfc0000 - 0x00ffffff FIS directory
+0x30000000 - 0x3fffffff Compact Flash
+0x48000000 - 0x4bffffff iPAQ internal registers
+0x80000000 - 0xbfffffff SA-1110 Internal Registers
+0xc0000000 - 0xc1ffffff DRAM Bank 0 - 32Mb SDRAM
+0xe0000000 - 0xe7ffffff Cache Clean
+
+
+Virtual Address Range C B Description
+----------------------- - - ----------------------------------
+0x00000000 - 0x01ffffff Y Y DRAM - 32Mb
+0x30000000 - 0x3fffffff N N Compact Flash
+0x48000000 - 0x4bffffff N N iPAQ internal registers
+0x50000000 - 0x51ffffff Y Y Up to 32Mb FLASH (nCS0)
+0x80000000 - 0xbfffffff N N SA-1110 Internal Registers
+0xc0000000 - 0xc1ffffff N Y DRAM Bank 0: 32Mb
+0xe0000000 - 0xe7ffffff Y Y Cache Clean </programlisting> </para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=ipaq
+export ARCH_DIR=arm
+export PLATFORM_DIR=sa11x0/ipaq
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2></sect1>
+
+<?Pub _newpage>
+<sect1 id="cerfcube">
+<title>ARM/StrongARM(SA11X0) Intrinsyc CerfCube</title>
+<indexterm><primary>Intrinsyc CerfCube</primary><secondary>installing and
+testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Intrinsyc CerfCube</secondary></indexterm>
+<sect2>
+<title>Overview</title>
+<para>RedBoot supports the serial port and the builtin
+ethernet connection for communication and downloads.
+</para>
+<para>The default serial port settings are 38400,8,N,1. RedBoot runs from
+and supports flash management for the system flash region. </para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+
+</sect2>
+<sect2>
+<title>Initial Installation</title>
+<para>
+The original boot loader supplied with the CerfCube can be used to install
+RedBoot. Connect to the device using a serial port at 38400/8N1.
+Copy the binary RedBoot ROM mode image to an available TFTP server.
+Issue these commands to the Instrinsyc loader:
+<screen>
+<userinput>download tftp:<replaceable>x.x.x.x</replaceable> redboot_ROM.bin 0xc0000000</userinput>
+<userinput>flashloader 0x00000000 0xc0000000 0x20000</userinput>
+</screen>
+where <replaceable>x.x.x.x</replaceable> is the IP address of the TFTP
+server.
+<note>
+<title>NOTE</title>
+<para>
+Other installation methods may be available via the Intrinsyc loader.
+Contact Intrinsyc for details.
+</para>
+</note>
+</para>
+</sect2>
+<sect2>
+<title>Additional commands</title>
+<para>The <command>exec</command> command which allows the loading
+and execution of Linux kernels,
+is supported for this board (see <xref linkend="executing-programs">). The <command>
+exec</command> parameters used for the CerfCube are:</para>
+<variablelist><varlistentry>
+<term>-b <replaceable>&lt;addr></replaceable></term>
+<listitem><para>Location Linux kernel was loaded to</para></listitem></varlistentry>
+<varlistentry><term>
+-l <replaceable>&lt;len></replaceable></term>
+<listitem><para>Length of kernel</para></listitem></varlistentry>
+<varlistentry><term>
+-c <replaceable>"params"</replaceable></term>
+<listitem><para>Parameters passed to kernel</para></listitem></varlistentry>
+<varlistentry><term>-r <replaceable>&lt;addr></replaceable></term>
+<listitem><para>'initrd' ramdisk location</para></listitem></varlistentry>
+<varlistentry><term>-s <replaceable>&lt;len></replaceable></term>
+<listitem><para>Length of initrd ramdisk</para></listitem></varlistentry>
+</variablelist>
+
+</sect2>
+<sect2>
+<title>Memory Maps</title>
+<para>RedBoot sets up the following memory map on the CerfCube: The first level
+page table is located at physical address 0xC0004000. No second level tables
+are used. <note><title>NOTE</title>
+<para>The virtual memory maps in this section use a C and B column to indicate
+whether or not the region is cached (C) or buffered (B).</para>
+</note> <programlisting>Physical Address Range Description
+----------------------- ----------------------------------
+0x00000000 - 0x01ffffff 16Mb to 32Mb FLASH (nCS0) [organized as below]
+ 0x000000 - 0x0001ffff RedBoot
+ 0x020000 - 0x0003ffff RedBoot [RAM version]
+ 0xfc0000 - 0x00fdffff Fconfig data
+ 0xfe0000 - 0x00ffffff FIS directory
+0x0f000000 - 0x0fffffff Onboard ethernet
+0x10000000 - 0x17ffffff CerfCube internal registers
+0x20000000 - 0x3fffffff PCMCIA / Compact Flash
+0x80000000 - 0xbfffffff SA-1110 Internal Registers
+0xc0000000 - 0xc1ffffff DRAM Bank 0 - 32Mb SDRAM
+0xe0000000 - 0xe7ffffff Cache Clean
+
+
+Virtual Address Range C B Description
+----------------------- - - ----------------------------------
+0x00000000 - 0x01ffffff Y Y DRAM - 32Mb
+0x08000000 - 0x0fffffff N N Onboard ethernet controller
+0x10000000 - 0x17ffffff N N CerfCube internal registers
+0x20000000 - 0x3fffffff N N PCMCIA / Compact Flash
+0x50000000 - 0x51ffffff Y Y Up to 32Mb FLASH (nCS0)
+0x80000000 - 0xbfffffff N N SA-1110 Internal Registers
+0xc0000000 - 0xc1ffffff N Y DRAM Bank 0: 32Mb
+0xe0000000 - 0xe7ffffff Y Y Cache Clean </programlisting> </para>
+</sect2>
+
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=cerf
+export ARCH_DIR=arm
+export PLATFORM_DIR=sa11x0/cerf
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2></sect1>
+
+
+<sect1 id="iq80310">
+<title>ARM/XScale Cyclone IQ80310</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Cyclone IQ80310</primary><secondary>installing and
+testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Cyclone IQ80310</secondary></indexterm>RedBoot supports
+both serial ports and the built-in ethernet port for communication and downloads.
+The default serial port settings are 115200,8,N,1. RedBoot also supports flash
+management for the onboard 8MB flash.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+ <row>
+ <entry>ROMA</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from flash address 0x40000, with
+ ARM bootloader in flash boot sector.</entry>
+ <entry>redboot_ROMA.ecm</entry>
+ </row>
+ <row>
+ <entry>RAMA</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with ARM bootloader in
+ flash boot sector.</entry>
+ <entry>redboot_RAMA.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+</sect2>
+<sect2>
+<title>Initial Installation Method</title>
+
+<para>The board manufacturer provides a DOS application which is
+capable of programming the flash over the PCI bus, and this is
+required for initial installations of RedBoot. Please see the board
+manual for information on using this utility. In general, the process
+involves programming one of the two flash based RedBoot images to
+flash. The ROM mode RedBoot (which runs from the flash boot sector)
+should be programmed to flash address 0x00000000. The ROMA RedBoot
+mode (which is started by the ARM bootloader) should be programmed to
+flash address 0x00004000.
+</para>
+
+<para> To install RedBoot to run from the flash boot sector, use the manufacturer's
+flash utility to install the ROM mode image at address zero.
+</para>
+<para>To install RedBoot to run from address 0x40000 with the ARM bootloader
+in the flash boot sector, use the manufacturer's flash utility to install
+the ROMA mode image at address 0x40000. </para>
+
+<para>After booting the initial installation of RedBoot, this warning may
+be printed: <screen>flash configuration checksum error or invalid key
+</screen>This is normal, and indicates that the flash must be configured
+for use by RedBoot. Even if the above message is not printed, it may be a
+good idea to reinitialize the flash anyway. Do this with the <command>
+fis</command> command: <screen>RedBoot> <userinput>fis init</userinput>
+About to initialize [format] flash image system - continue (y/n)? <userinput>y</userinput>
+*** Initialize flash Image System
+Warning: device contents not erased, some blocks may not be usable
+... Unlock from 0x007e0000-0x00800000: .
+... Erase from 0x007e0000-0x00800000: .
+... Program from 0xa1fd0000-0xa1fd0400 at 0x007e0000: .
+... Lock from 0x007e0000-0x00800000: .
+Followed by the fconfig command:
+ RedBoot> <userinput>fconfig</userinput>
+ Run script at boot: <userinput>false</userinput>
+ Use BOOTP for network configuration: <userinput>false</userinput>
+ Local IP address: <userinput>192.168.1.153</userinput>
+ Default server IP address: <userinput>192.168.1.10</userinput>
+ GDB connection port: <userinput>1000</userinput>
+ Network debug at boot time: <userinput>false</userinput>
+ Update RedBoot non-volatile configuration - continue (y/n)? <userinput>y</userinput>
+ ... Unlock from 0x007c0000-0x007e0000: .
+ ... Erase from 0x007c0000-0x007e0000: .
+ ... Program from 0xa0013018-0xa0013418 at 0x007c0000: .
+ ... Lock from 0x007c0000-0x007e0000: .</screen></para>
+
+<note><para>When later updating RedBoot in situ, it is important to
+use a matching ROM and RAM mode pair of images. So use either RAM/ROM
+or RAMA/ROMA images. Do not mix them.</para></note>
+
+</sect2>
+<sect2>
+<title>Error codes</title>
+<para>RedBoot uses the two digit LED display to indicate errors during board
+initialization. Possible error codes are: <literallayout>88 - Unknown Error
+55 - I2C Error
+FF - SDRAM Error
+01 - No Error</literallayout></para>
+</sect2>
+<sect2>
+<title>Using RedBoot with ARM Bootloader </title>
+<para>RedBoot can coexist with ARM tools in flash on the IQ80310 board. In
+this configuration, the ARM bootloader will occupy the flash boot sector while
+RedBoot is located at flash address 0x40000. The sixteen position rotary switch
+is used to tell the ARM bootloader to jump to the RedBoot image located at
+address 0x40000. RedBoot is selected by switch position 0 or 1. Other switch
+positions are used by the ARM firmware and RedBoot will not be started. </para>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>A special RedBoot command, <command>diag</command>, is used to
+access a set of hardware diagnostics provided by the board
+manufacturer. To access the diagnostic menu, enter diag at the RedBoot prompt:
+<screen>
+RedBoot> <userinput>diag</userinput>
+Entering Hardware Diagnostics - Disabling Data Cache!
+1 - Memory Tests
+2 - Repeating Memory Tests
+3 - 16C552 DUART Serial Port Tests
+4 - Rotary Switch S1 Test for positions 0-3
+5 - seven Segment LED Tests
+6 - Backplane Detection Test
+7 - Battery Status Test
+8 - External Timer Test
+9 - i82559 Ethernet Configuration
+10 - i82559 Ethernet Test
+11 - Secondary PCI Bus Test
+12 - Primary PCI Bus Test
+13 - i960Rx/303 PCI Interrupt Test
+14 - Internal Timer Test
+15 - GPIO Test
+0 - quit Enter the menu item number (0 to quit):
+</screen>
+Tests for various hardware subsystems are provided, and some
+tests require special hardware in order to execute normally. The Ethernet
+Configuration item may be used to set the board ethernet address.</para>
+</sect2>
+<sect2>
+<title>IQ80310 Hardware Tests</title>
+<para><screen>1 - Memory Tests
+2 - Repeating Memory Tests
+3 - 16C552 DUART Serial Port Tests
+4 - Rotary Switch S1 Test for positions 0-3
+5 - 7 Segment LED Tests
+6 - Backplane Detection Test
+7 - Battery Status Test
+8 - External Timer Test
+9 - i82559 Ethernet Configuration
+10 - i82559 Ethernet Test
+11 - i960Rx/303 PCI Interrupt Test
+12 - Internal Timer Test
+13 - Secondary PCI Bus Test
+14 - Primary PCI Bus Test
+15 - Battery Backup SDRAM Memory Test
+16 - GPIO Test
+17 - Repeat-On-Fail Memory Test
+18 - Coyonosa Cache Loop (No return)
+19 - Show Software and Hardware Revision
+0 - quit
+Enter the menu item number (0 to quit): </screen></para>
+<para>Tests for various hardware subsystems are provided, and some tests require
+special hardware in order to execute normally. The Ethernet Configuration
+item may be used to set the board ethernet address.</para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot </title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=iq80310
+export ARCH_DIR=arm
+export PLATFORM_DIR=iq80310
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+
+<sect2>
+<title>Interrupts</title>
+<para>RedBoot uses an interrupt vector table which is located at address 0xA000A004.
+Entries in this table are pointers to functions with this protoype:: <programlisting>
+int irq_handler( unsigned vector, unsigned data )</programlisting>On an IQ80310
+board, the vector argument is one of 49 interrupts defined in <computeroutput>
+hal/arm/iq80310/current/include/hal_platform_ints.h:</computeroutput>: <programlisting>
+// *** 80200 CPU ***
+#define CYGNUM_HAL_INTERRUPT_reserved0 0
+#define CYGNUM_HAL_INTERRUPT_PMU_PMN0_OVFL 1 // See Ch.12 - Performance Mon.
+#define CYGNUM_HAL_INTERRUPT_PMU_PMN1_OVFL 2 // PMU counter 0/1 overflow
+#define CYGNUM_HAL_INTERRUPT_PMU_CCNT_OVFL 3 // PMU clock overflow
+#define CYGNUM_HAL_INTERRUPT_BCU_INTERRUPT 4 // See Ch.11 - Bus Control Unit
+#define CYGNUM_HAL_INTERRUPT_NIRQ 5 // external IRQ
+#define CYGNUM_HAL_INTERRUPT_NFIQ 6 // external FIQ
+
+
+// *** XINT6 interrupts ***
+#define CYGNUM_HAL_INTERRUPT_DMA_0 7
+#define CYGNUM_HAL_INTERRUPT_DMA_1 8
+#define CYGNUM_HAL_INTERRUPT_DMA_2 9
+#define CYGNUM_HAL_INTERRUPT_GTSC 10 // Global Time Stamp Counter
+#define CYGNUM_HAL_INTERRUPT_PEC 11 // Performance Event Counter
+#define CYGNUM_HAL_INTERRUPT_AAIP 12 // application accelerator unit
+
+
+// *** XINT7 interrupts ***
+// I2C interrupts
+#define CYGNUM_HAL_INTERRUPT_I2C_TX_EMPTY 13
+#define CYGNUM_HAL_INTERRUPT_I2C_RX_FULL 14
+#define CYGNUM_HAL_INTERRUPT_I2C_BUS_ERR 15
+#define CYGNUM_HAL_INTERRUPT_I2C_STOP 16
+#define CYGNUM_HAL_INTERRUPT_I2C_LOSS 17
+#define CYGNUM_HAL_INTERRUPT_I2C_ADDRESS 18
+
+
+// Messaging Unit interrupts
+#define CYGNUM_HAL_INTERRUPT_MESSAGE_0 19
+#define CYGNUM_HAL_INTERRUPT_MESSAGE_1 20
+#define CYGNUM_HAL_INTERRUPT_DOORBELL 21
+#define CYGNUM_HAL_INTERRUPT_NMI_DOORBELL 22
+#define CYGNUM_HAL_INTERRUPT_QUEUE_POST 23
+#define CYGNUM_HAL_INTERRUPT_OUTBOUND_QUEUE_FULL 24
+#define CYGNUM_HAL_INTERRUPT_INDEX_REGISTER 25
+// PCI Address Translation Unit
+#define CYGNUM_HAL_INTERRUPT_BIST 26
+
+
+// *** External board interrupts (XINT3) ***
+#define CYGNUM_HAL_INTERRUPT_TIMER 27 // external timer
+#define CYGNUM_HAL_INTERRUPT_ETHERNET 28 // onboard enet
+#define CYGNUM_HAL_INTERRUPT_SERIAL_A 29 // 16x50 uart A
+#define CYGNUM_HAL_INTERRUPT_SERIAL_B 30 // 16x50 uart B
+#define CYGNUM_HAL_INTERRUPT_PCI_S_INTD 31 // secondary PCI INTD
+// The hardware doesn't (yet?) provide masking or status for these
+// even though they can trigger cpu interrupts. ISRs will need to
+// poll the device to see if the device actually triggered the
+// interrupt.
+#define CYGNUM_HAL_INTERRUPT_PCI_S_INTC 32 // secondary PCI INTC
+#define CYGNUM_HAL_INTERRUPT_PCI_S_INTB 33 // secondary PCI INTB
+#define CYGNUM_HAL_INTERRUPT_PCI_S_INTA 34 // secondary PCI INTA
+
+
+// *** NMI Interrupts go to FIQ ***
+#define CYGNUM_HAL_INTERRUPT_MCU_ERR 35
+#define CYGNUM_HAL_INTERRUPT_PATU_ERR 36
+#define CYGNUM_HAL_INTERRUPT_SATU_ERR 37
+#define CYGNUM_HAL_INTERRUPT_PBDG_ERR 38
+#define CYGNUM_HAL_INTERRUPT_SBDG_ERR 39
+#define CYGNUM_HAL_INTERRUPT_DMA0_ERR 40
+#define CYGNUM_HAL_INTERRUPT_DMA1_ERR 41
+#define CYGNUM_HAL_INTERRUPT_DMA2_ERR 42
+#define CYGNUM_HAL_INTERRUPT_MU_ERR 43
+#define CYGNUM_HAL_INTERRUPT_reserved52 44
+#define CYGNUM_HAL_INTERRUPT_AAU_ERR 45
+#define CYGNUM_HAL_INTERRUPT_BIU_ERR 46
+
+
+// *** ATU FIQ sources ***
+#define CYGNUM_HAL_INTERRUPT_P_SERR 47
+#define CYGNUM_HAL_INTERRUPT_S_SERR 48</programlisting>The data passed
+to the ISR is pulled from a data table <computeroutput>(hal_interrupt_data)
+</computeroutput> which immediately follows the interrupt vector table. With
+49 interrupts, the data table starts at address 0xA000A0C8. </para>
+<para>An application may create a normal C function with the above prototype
+to be an ISR. Just poke its address into the table at the correct index and
+enable the interrupt at its source. The return value of the ISR is ignored
+by RedBoot.</para>
+</sect2>
+<sect2>
+<title>Memory Maps</title>
+<para>The first level page table is located at 0xa0004000. Two second level
+tables are also used. One second level table is located at 0xa0008000 and
+maps the first 1MB of flash. The other second level table is at 0xa0008400,
+and maps the first 1MB of SDRAM. <note><title>NOTE</title>
+<para>The virtual memory maps in this section use a C and B column to indicate
+whether or not the region is cached (C) or buffered (B).</para>
+</note></para>
+<para><programlisting>Physical Address Range Description
+----------------------- ----------------------------------
+0x00000000 - 0x00000fff flash Memory
+0x00001000 - 0x00001fff 80312 Internal Registers
+0x00002000 - 0x007fffff flash Memory
+0x00800000 - 0x7fffffff PCI ATU Outbound Direct Window
+0x80000000 - 0x83ffffff Primary PCI 32-bit Memory
+0x84000000 - 0x87ffffff Primary PCI 64-bit Memory
+0x88000000 - 0x8bffffff Secondary PCI 32-bit Memory
+0x8c000000 - 0x8fffffff Secondary PCI 64-bit Memory
+0x90000000 - 0x9000ffff Primary PCI IO Space
+0x90010000 - 0x9001ffff Secondary PCI IO Space
+0x90020000 - 0x9fffffff Unused
+0xa0000000 - 0xbfffffff SDRAM
+0xc0000000 - 0xefffffff Unused
+0xf0000000 - 0xffffffff 80200 Internal Registers
+
+
+Virtual Address Range C B Description
+----------------------- - - ----------------------------------
+0x00000000 - 0x00000fff Y Y SDRAM
+0x00001000 - 0x00001fff N N 80312 Internal Registers
+0x00002000 - 0x007fffff Y N flash Memory
+0x00800000 - 0x7fffffff N N PCI ATU Outbound Direct Window
+0x80000000 - 0x83ffffff N N Primary PCI 32-bit Memory
+0x84000000 - 0x87ffffff N N Primary PCI 64-bit Memory
+0x88000000 - 0x8bffffff N N Secondary PCI 32-bit Memory
+0x8c000000 - 0x8fffffff N N Secondary PCI 64-bit Memory
+0x90000000 - 0x9000ffff N N Primary PCI IO Space
+0x90010000 - 0x9001ffff N N Secondary PCI IO Space
+0xa0000000 - 0xbfffffff Y Y SDRAM
+0xc0000000 - 0xcfffffff Y Y Cache Flush Region
+0xd0000000 - 0xd0000fff Y N first 4k page of flash
+0xf0000000 - 0xffffffff N N 80200 Internal Registers </programlisting></para>
+</sect2>
+<sect2>
+<title>Platform Resource Usage</title>
+<para>The external timer is used as a polled timer to provide timeout support
+for networking and XModem file transfers.</para>
+</sect2></sect1>
+
+<?Pub _newpage>
+<sect1 id="iq80321">
+<title>ARM/XScale Intel IQ80321</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Intel IQ80321</primary><secondary>installing and
+testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Intel IQ80321</secondary></indexterm>RedBoot supports
+the serial port and the built-in ethernet port for communication and downloads.
+The default serial port settings are 115200,8,N,1. RedBoot also supports flash
+management for the onboard 8MB flash.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+
+</sect2>
+<sect2>
+<title>Initial Installation Method</title>
+<para>The board manufacturer provides a DOS application which is capable of
+programming the flash over the PCI bus, and this is required for initial installations
+of RedBoot. Please see the board manual for information on using this utility.
+In general, the process involves programming the ROM mode RedBoot
+image to flash. RedBoot should be programmed to flash address
+0x00000000 using the DOS utility.
+</para>
+
+<para>After booting the initial installation of RedBoot, this warning may
+be printed: <screen>flash configuration checksum error or invalid key
+</screen>This is normal, and indicates that the flash must be configured
+for use by RedBoot. Even if the above message is not printed, it may be a
+good idea to reinitialize the flash anyway. Do this with the <command>
+fis</command> command: <screen>RedBoot> <userinput>fis init</userinput>
+About to initialize [format] FLASH image system - continue (y/n)? <userinput>y</userinput>
+*** Initialize FLASH Image System
+ Warning: device contents not erased, some blocks may not be usable
+ ... Unlock from 0xf07e0000-0xf0800000: .
+ ... Erase from 0xf07e0000-0xf0800000: .
+ ... Program from 0x01ddf000-0x01ddf400 at 0xf07e0000: .
+ ... Lock from 0xf07e0000-0xf0800000: .
+</screen></para></sect2>
+<sect2>
+<title>Switch Settings</title>
+<para>The 80321 board is highly configurable through a number of switches and jumpers.
+RedBoot makes some assumptions about board configuration and attention must be paid
+to these assumptions for reliable RedBoot operation:
+<itemizedlist>
+<listitem><para>The onboard ethernet and the secondary slot may be placed in a
+private space so that they are not seen by a PC BIOS. If the board is to be used
+in a PC with BIOS, then the ethernet should be placed in this private space so that
+RedBoot and the BIOS do not conflict.
+</para></listitem>
+<listitem><para>RedBoot assumes that the board is plugged into a PC with BIOS. This
+requires RedBoot to detect when the BIOS has configured the PCI-X secondary bus. If
+the board is placed in a backplane, RedBoot will never see the BIOS configure the
+secondary bus. To prevent this wait, set switch S7E1-3 to ON when using the board
+in a backplane.</para></listitem>
+<listitem><para>For the remaining switch settings, the following is a known good
+configuration:
+<informaltable frame=all>
+<tgroup cols=2>
+<tbody>
+<row><entry>S1D1</entry><entry>All OFF</entry></row>
+<row><entry>S7E1</entry><entry>7 is ON, all others OFF</entry></row>
+<row><entry>S8E1</entry><entry>2,3,5,6 are ON, all others OFF</entry></row>
+<row><entry>S8E2</entry><entry>2,3 are ON, all others OFF</entry></row>
+<row><entry>S9E1</entry><entry>3 is ON, all others OFF</entry></row>
+<row><entry>S4D1</entry><entry>1,3 are ON, all others OFF</entry></row>
+<row><entry>J9E1</entry><entry>2,3 jumpered</entry></row>
+<row><entry>J9F1</entry><entry>2,3 jumpered</entry></row>
+<row><entry>J3F1</entry><entry>Nothing jumpered</entry></row>
+<row><entry>J3G1</entry><entry>2,3 jumpered</entry></row>
+<row><entry>J1G2</entry><entry>2,3 jumpered</entry></row>
+</tbody></tgroup></informaltable></para></listitem>
+</itemizedlist>
+</para>
+</sect2>
+<sect2>
+<title>LED Codes</title>
+<para>RedBoot uses the two digit LED display to indicate status during board
+initialization. Possible codes are:</para>
+
+<literallayout width=72>
+LED Actions
+-------------------------------------------------------------
+ Power-On/Reset
+88
+ Set the CPSR
+ Enable coprocessor access
+ Drain write and fill buffer
+ Setup PBIU chip selects
+A1
+ Enable the Icache
+A2
+ Move FLASH chip select from 0x0 to 0xF0000000
+ Jump to new FLASH location
+A3
+ Setup and enable the MMU
+A4
+ I2C interface initialization
+90
+ Wait for I2C initialization to complete
+91
+ Send address (via I2C) to the DIMM
+92
+ Wait for transmit complete
+93
+ Read SDRAM PD data from DIMM
+94
+ Read remainder of EEPROM data.
+ An error will result in one of the following
+ error codes on the LEDs:
+ 77 BAD EEPROM checksum
+ 55 I2C protocol error
+ FF bank size error
+A5
+ Setup DDR memory interface
+A6
+ Enable branch target buffer
+ Drain the write & fill buffers
+ Flush Icache, Dcache and BTB
+ Flush instuction and data TLBs
+ Drain the write & fill buffers
+SL
+ ECC Scrub Loop
+SE
+A7
+ Clean, drain, flush the main Dcache
+A8
+ Clean, drain, flush the mini Dcache
+ Flush Dcache
+ Drain the write & fill buffers
+A9
+ Enable ECC
+AA
+ Save SDRAM size
+ Move MMU tables into RAM
+AB
+ Clean, drain, flush the main Dcache
+ Clean, drain, flush the mini Dcache
+ Drain the write & fill buffers
+AC
+ Set the TTB register to DRAM mmu_table
+AD
+ Set mode to IRQ mode
+A7
+ Move SWI & Undefined "vectors" to RAM (at 0x0)
+A6
+ Switch to supervisor mode
+A5
+ Move remaining "vectors" to RAM (at 0x0)
+A4
+ Copy DATA to RAM
+ Initialize interrupt exception environment
+ Initialize stack
+ Clear BSS section
+A3
+ Call platform specific hardware initialization
+A2
+ Run through static constructors
+A1
+ Start up the eCos kernel or RedBoot
+</literallayout>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>A special RedBoot command, <command>diag</command>, is used to
+access a set of hardware diagnostics. To access the diagnostic menu,
+enter <command>diag</command> at the RedBoot prompt:
+<screen>
+RedBoot> <userinput>diag</userinput>
+Entering Hardware Diagnostics - Disabling Data Cache!
+
+ IQ80321 Hardware Tests
+
+ 1 - Memory Tests
+ 2 - Repeating Memory Tests
+ 3 - Repeat-On-Fail Memory Tests
+ 4 - Rotary Switch S1 Test
+ 5 - 7 Segment LED Tests
+ 6 - i82544 Ethernet Configuration
+ 7 - Baterry Status Test
+ 8 - Battery Backup SDRAM Memory Test
+ 9 - Timer Test
+10 - PCI Bus test
+11 - CPU Cache Loop (No Return)
+ 0 - quit
+Enter the menu item number (0 to quit):
+</screen>
+Tests for various hardware subsystems are provided, and some tests require
+special hardware in order to execute normally. The Ethernet Configuration
+item may be used to set the board ethernet address.</para>
+<sect3>
+<title>Memory Tests</title>
+<para>This test is used to test installed DDR SDRAM memory. Five different
+tests are run over the given address ranges. If errors are encountered, the
+test is aborted and information about the failure is printed. When selected,
+the user will be prompted to enter the base address of the test range and its
+size. The numbers must be in hex with no leading &ldquo;0x&rdquo;
+</para>
+<screen>
+Enter the menu item number (0 to quit): <userinput>1</userinput>
+
+Base address of memory to test (in hex): <userinput>100000</userinput>
+
+Size of memory to test (in hex): <userinput>200000</userinput>
+
+Testing memory from 0x00100000 to 0x002fffff.
+
+Walking 1's test:
+0000000100000002000000040000000800000010000000200000004000000080
+0000010000000200000004000000080000001000000020000000400000008000
+0001000000020000000400000008000000100000002000000040000000800000
+0100000002000000040000000800000010000000200000004000000080000000
+passed
+32-bit address test: passed
+32-bit address bar test: passed
+8-bit address test: passed
+Byte address bar test: passed
+Memory test done.
+</screen>
+</sect3>
+<sect3>
+<title>Repeating Memory Tests</title>
+<para>The repeating memory tests are exactly the same as the above memory tests,
+except that the tests are automatically rerun after completion. The only way out
+of this test is to reset the board.
+</para>
+</sect3>
+<sect3>
+<title>Repeat-On-Fail Memory Tests</title>
+<para>This is similar to the repeating memory tests except that when an error
+is found, the failing test continuously retries on the failing address.
+</para>
+</sect3>
+<sect3>
+<title>Rotary Switch S1 Test</title>
+<para>This tests the operation of the sixteen position rotary switch. When run,
+this test will display the current position of the rotary switch on the LED
+display. Slowly dial through each position and confirm reading on LED.
+</para>
+</sect3>
+<sect3>
+<title>7 Segment LED Tests</title>
+<para>This tests the operation of the seven segment displays. When run, each
+LED cycles through 0 through F and a decimal point.
+</para>
+</sect3>
+<sect3>
+<title>i82544 Ethernet Configuration</title>
+<para>This test initializes the ethernet controller&rsquo;s serial EEPROM if
+the current contents are invalid. In any case, this test will also allow the
+user to enter a six byte ethernet MAC address into the serial EEPROM.
+</para>
+<screen>
+Enter the menu item number (0 to quit): <userinput>6</userinput>
+
+
+Current MAC address: 00:80:4d:46:00:02
+Enter desired MAC address: <userinput>00:80:4d:46:00:01</userinput>
+Writing to the Serial EEPROM... Done
+
+******** Reset The Board To Have Changes Take Effect ********
+</screen>
+</sect3>
+<sect3>
+<title>Battery Status Test</title>
+<para>This tests the current status of the battery. First, the test checks to
+see if the battery is installed and reports that finding. If the battery is
+installed, the test further determines whether the battery status is one or
+more of the following:
+<itemizedlist>
+<listitem><para>Battery is charging.</para></listitem>
+<listitem><para>Battery is fully discharged.</para></listitem>
+<listitem><para>Battery voltage measures within normal operating range.
+</para></listitem>
+</itemizedlist>
+</para>
+</sect3>
+<sect3>
+<title>Battery Backup SDRAM Memory Test</title>
+<para>This tests the battery backup of SDRAM memory. This test is a three
+step process:</para>
+<orderedlist>
+<listitem><para>Select Battery backup test from main diag menu, then write
+data to SDRAM.</para></listitem>
+<listitem><para>Turn off power for 60 seconds, then repower the board.
+</para></listitem>
+<listitem><para>Select Battery backup test from main diag menu, then check
+data that was written in step 1.
+</para></listitem>
+</orderedlist>
+</sect3>
+<sect3>
+<title>Timer Test</title>
+<para>This tests the internal timer by printing a number of dots at one
+second intervals.</para>
+</sect3>
+<sect3>
+<title>PCI Bus Test</title>
+<para>This tests the secondary PCI-X bus and socket. This test requires that
+an IQ80310 board be plugged into the secondary slot of the IOP80321 board.
+The test assumes at least 32MB of installed memory on the IQ80310. That memory
+is mapped into the IOP80321 address space and the memory tests are run on that
+memory.
+</para>
+</sect3>
+<sect3>
+<title>CPU Cache Loop</title>
+<para>This test puts the CPU into a tight loop run entirely from the ICache.
+This should prevent all external bus accesses.
+</para>
+</sect3>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot </title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=iq80321
+export ARCH_DIR=arm
+export PLATFORM_DIR=xscale/iq80321
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+</sect2>
+
+<sect2>
+<title>Interrupts</title>
+<para>RedBoot uses an interrupt vector table which is located at address 0x8004.
+Entries in this table are pointers to functions with this protoype:: <programlisting>
+int irq_handler( unsigned vector, unsigned data )</programlisting>On an IQ80321
+board, the vector argument is one of 32 interrupts defined in <computeroutput>
+hal/arm/xscale/verde/current/include/hal_var_ints.h:</computeroutput>: <programlisting>
+// *** 80200 CPU ***
+#define CYGNUM_HAL_INTERRUPT_DMA0_EOT 0
+#define CYGNUM_HAL_INTERRUPT_DMA0_EOC 1
+#define CYGNUM_HAL_INTERRUPT_DMA1_EOT 2
+#define CYGNUM_HAL_INTERRUPT_DMA1_EOC 3
+#define CYGNUM_HAL_INTERRUPT_RSVD_4 4
+#define CYGNUM_HAL_INTERRUPT_RSVD_5 5
+#define CYGNUM_HAL_INTERRUPT_AA_EOT 6
+#define CYGNUM_HAL_INTERRUPT_AA_EOC 7
+#define CYGNUM_HAL_INTERRUPT_CORE_PMON 8
+#define CYGNUM_HAL_INTERRUPT_TIMER0 9
+#define CYGNUM_HAL_INTERRUPT_TIMER1 10
+#define CYGNUM_HAL_INTERRUPT_I2C_0 11
+#define CYGNUM_HAL_INTERRUPT_I2C_1 12
+#define CYGNUM_HAL_INTERRUPT_MESSAGING 13
+#define CYGNUM_HAL_INTERRUPT_ATU_BIST 14
+#define CYGNUM_HAL_INTERRUPT_PERFMON 15
+#define CYGNUM_HAL_INTERRUPT_CORE_PMU 16
+#define CYGNUM_HAL_INTERRUPT_BIU_ERR 17
+#define CYGNUM_HAL_INTERRUPT_ATU_ERR 18
+#define CYGNUM_HAL_INTERRUPT_MCU_ERR 19
+#define CYGNUM_HAL_INTERRUPT_DMA0_ERR 20
+#define CYGNUM_HAL_INTERRUPT_DMA1_ERR 22
+#define CYGNUM_HAL_INTERRUPT_AA_ERR 23
+#define CYGNUM_HAL_INTERRUPT_MSG_ERR 24
+#define CYGNUM_HAL_INTERRUPT_SSP 25
+#define CYGNUM_HAL_INTERRUPT_RSVD_26 26
+#define CYGNUM_HAL_INTERRUPT_XINT0 27
+#define CYGNUM_HAL_INTERRUPT_XINT1 28
+#define CYGNUM_HAL_INTERRUPT_XINT2 29
+#define CYGNUM_HAL_INTERRUPT_XINT3 30
+#define CYGNUM_HAL_INTERRUPT_HPI 31
+</programlisting>
+The data passed to the ISR is pulled from a data table <computeroutput>(hal_interrupt_data)
+</computeroutput> which immediately follows the interrupt vector table. With
+32 interrupts, the data table starts at address 0x8084. </para>
+<para>An application may create a normal C function with the above prototype
+to be an ISR. Just poke its address into the table at the correct index and
+enable the interrupt at its source. The return value of the ISR is ignored
+by RedBoot.</para>
+</sect2>
+<sect2>
+<title>Memory Maps</title>
+<para>The RAM based page table is located at RAM start + 0x4000. RedBoot may be configured
+for one of two memory maps. The difference between them is the location of RAM and the
+PCI outbound windows. The alternative memory map may be used when
+building RedBoot or eCos by using the <literal>RAM_ALTMAP</literal>
+and <literal>ROM_ALTMAP</literal> startup types in the configuration.
+<note><title>NOTE</title>
+<para>The virtual memory maps in this section use a C, B, and X column to indicate
+the caching policy for the region..</para>
+</note></para>
+<para><programlisting>
+X C B Description
+- - - ---------------------------------------------
+0 0 0 Uncached/Unbuffered
+0 0 1 Uncached/Buffered
+0 1 0 Cached/Buffered Write Through, Read Allocate
+0 1 1 Cached/Buffered Write Back, Read Allocate
+1 0 0 Invalid -- not used
+1 0 1 Uncached/Buffered No write buffer coalescing
+1 1 0 Mini DCache - Policy set by Aux Ctl Register
+1 1 1 Cached/Buffered Write Back, Read/Write Allocate
+
+Physical Address Range Description
+----------------------- ----------------------------------
+0x00000000 - 0x7fffffff ATU Outbound Direct Window
+0x80000000 - 0x900fffff ATU Outbound Translate Windows
+0xa0000000 - 0xbfffffff SDRAM
+0xf0000000 - 0xf0800000 FLASH (PBIU CS0)
+0xfe800000 - 0xfe800fff UART (PBIU CS1)
+0xfe840000 - 0xfe840fff Left 7-segment LED (PBIU CS3)
+0xfe850000 - 0xfe850fff Right 7-segment LED (PBIU CS2)
+0xfe8d0000 - 0xfe8d0fff Rotary Switch (PBIU CS4)
+0xfe8f0000 - 0xfe8f0fff Baterry Status (PBIU CS5)
+0xfff00000 - 0xffffffff Verde Memory mapped Registers
+
+
+Default Virtual Map X C B Description
+----------------------- - - - ----------------------------------
+0x00000000 - 0x1fffffff 1 1 1 SDRAM
+0x20000000 - 0x9fffffff 0 0 0 ATU Outbound Direct Window
+0xa0000000 - 0xb00fffff 0 0 0 ATU Outbound Translate Windows
+0xc0000000 - 0xdfffffff 0 0 0 Uncached alias for SDRAM
+0xe0000000 - 0xe00fffff 1 1 1 Cache flush region (no phys mem)
+0xf0000000 - 0xf0800000 0 1 0 FLASH (PBIU CS0)
+0xfe800000 - 0xfe800fff 0 0 0 UART (PBIU CS1)
+0xfe840000 - 0xfe840fff 0 0 0 Left 7-segment LED (PBIU CS3)
+0xfe850000 - 0xfe850fff 0 0 0 Right 7-segment LED (PBIU CS2)
+0xfe8d0000 - 0xfe8d0fff 0 0 0 Rotary Switch (PBIU CS4)
+0xfe8f0000 - 0xfe8f0fff 0 0 0 Baterry Status (PBIU CS5)
+0xfff00000 - 0xffffffff 0 0 0 Verde Memory mapped Registers
+
+Alternate Virtual Map X C B Description
+----------------------- - - - ----------------------------------
+0x00000000 - 0x000fffff 1 1 1 Alias for 1st MB of SDRAM
+0x00100000 - 0x7fffffff 0 0 0 ATU Outbound Direct Window
+0x80000000 - 0x900fffff 0 0 0 ATU Outbound Translate Windows
+0xa0000000 - 0xbfffffff 1 1 1 SDRAM
+0xc0000000 - 0xdfffffff 0 0 0 Uncached alias for SDRAM
+0xe0000000 - 0xe00fffff 1 1 1 Cache flush region (no phys mem)
+0xf0000000 - 0xf0800000 0 1 0 FLASH (PBIU CS0)
+0xfe800000 - 0xfe800fff 0 0 0 UART (PBIU CS1)
+0xfe840000 - 0xfe840fff 0 0 0 Left 7-segment LED (PBIU CS3)
+0xfe850000 - 0xfe850fff 0 0 0 Right 7-segment LED (PBIU CS2)
+0xfe8d0000 - 0xfe8d0fff 0 0 0 Rotary Switch (PBIU CS4)
+0xfe8f0000 - 0xfe8f0fff 0 0 0 Baterry Status (PBIU CS5)
+0xfff00000 - 0xffffffff 0 0 0 Verde Memory mapped Registers
+
+</programlisting></para>
+</sect2>
+<sect2>
+<title>Platform Resource Usage</title>
+<para>The Verde programmable timer0 is used for timeout support
+for networking and XModem file transfers.</para>
+</sect2></sect1>
+
+<?Pub _newpage>
+<sect1 id="IXDP425">
+<title>ARM/Intel XScale IXDP425 Network Processor Evaluation Board</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Intel IXDP425</primary><secondary>installing and
+testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Intel IXDP</secondary></indexterm>RedBoot supports
+the builtin high-speed and console UARTs and a PCI based i82559 ethernet
+card for communication and downloads. The default serial port settings are
+115200,8,N,1. RedBoot also supports flash management for the 16MB boot flash
+on the mainboard.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from flash
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation Method</title>
+<para>The IXDP425 flash is socketed, so initial installation may be done using
+an appropriate device programmer. JTAG based initial may also be used. In either
+case, the ROM mode RedBoot is programmed into the boot flash at address 0x00000000.
+</para>
+
+<para>After booting the initial installation of RedBoot, this warning may
+be printed: <screen>flash configuration checksum error or invalid key
+</screen>This is normal, and indicates that the flash should be configured
+for use by RedBoot. See <xref linkend="Persistent-State-Flash"> for more
+details.
+</para></sect2>
+<sect2>
+<title>LED Codes</title>
+<para>RedBoot uses the 4 digit LED display to indicate status during board
+initialization. Possible codes are:</para>
+
+<literallayout width=72>
+LED Actions
+-------------------------------------------------------------
+ Power-On/Reset
+ Set the CPSR
+ Enable coprocessor access
+ Drain write and fill buffer
+ Setup expansion bus chip selects
+1001
+ Enable Icache
+1002
+ Initialize SDRAM controller
+1003
+ Switch flash (CS0) from 0x00000000 to 0x50000000
+1004
+ Copy MMU table to RAM
+1005
+ Setup TTB and domain permissions
+1006
+ Enable MMU
+1007
+ Enable DCache
+1008
+ Enable branch target buffer
+1009
+ Drain write and fill buffer
+ Flush caches
+100A
+ Start up the eCos kernel or RedBoot
+0001
+
+</literallayout>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot </title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=ixdp425
+export ARCH_DIR=arm
+export PLATFORM_DIR=xscale/ixdp425
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+</sect2>
+
+<sect2>
+<title>Interrupts</title>
+<para>RedBoot uses an interrupt vector table which is located at address 0x8004.
+Entries in this table are pointers to functions with this protoype:: <programlisting>
+int irq_handler( unsigned vector, unsigned data )</programlisting>On the IXDP425
+board, the vector argument is one of many interrupts defined in <computeroutput>
+hal/arm/xscale/ixp425/current/include/hal_var_ints.h:</computeroutput>: <programlisting>
+#define CYGNUM_HAL_INTERRUPT_NPEA 0
+#define CYGNUM_HAL_INTERRUPT_NPEB 1
+#define CYGNUM_HAL_INTERRUPT_NPEC 2
+#define CYGNUM_HAL_INTERRUPT_QM1 3
+#define CYGNUM_HAL_INTERRUPT_QM2 4
+#define CYGNUM_HAL_INTERRUPT_TIMER0 5
+#define CYGNUM_HAL_INTERRUPT_GPIO0 6
+#define CYGNUM_HAL_INTERRUPT_GPIO1 7
+#define CYGNUM_HAL_INTERRUPT_PCI_INT 8
+#define CYGNUM_HAL_INTERRUPT_PCI_DMA1 9
+#define CYGNUM_HAL_INTERRUPT_PCI_DMA2 10
+#define CYGNUM_HAL_INTERRUPT_TIMER1 11
+#define CYGNUM_HAL_INTERRUPT_USB 12
+#define CYGNUM_HAL_INTERRUPT_UART2 13
+#define CYGNUM_HAL_INTERRUPT_TIMESTAMP 14
+#define CYGNUM_HAL_INTERRUPT_UART1 15
+#define CYGNUM_HAL_INTERRUPT_WDOG 16
+#define CYGNUM_HAL_INTERRUPT_AHB_PMU 17
+#define CYGNUM_HAL_INTERRUPT_XSCALE_PMU 18
+#define CYGNUM_HAL_INTERRUPT_GPIO2 19
+#define CYGNUM_HAL_INTERRUPT_GPIO3 20
+#define CYGNUM_HAL_INTERRUPT_GPIO4 21
+#define CYGNUM_HAL_INTERRUPT_GPIO5 22
+#define CYGNUM_HAL_INTERRUPT_GPIO6 23
+#define CYGNUM_HAL_INTERRUPT_GPIO7 24
+#define CYGNUM_HAL_INTERRUPT_GPIO8 25
+#define CYGNUM_HAL_INTERRUPT_GPIO9 26
+#define CYGNUM_HAL_INTERRUPT_GPIO10 27
+#define CYGNUM_HAL_INTERRUPT_GPIO11 28
+#define CYGNUM_HAL_INTERRUPT_GPIO12 29
+#define CYGNUM_HAL_INTERRUPT_SW_INT1 30
+#define CYGNUM_HAL_INTERRUPT_SW_INT2 31
+</programlisting>
+The data passed to the ISR is pulled from a data table <computeroutput>(hal_interrupt_data)
+</computeroutput> which immediately follows the interrupt vector table. With
+32 interrupts, the data table starts at address 0x8084. </para>
+<para>An application may create a normal C function with the above prototype
+to be an ISR. Just poke its address into the table at the correct index and
+enable the interrupt at its source. The return value of the ISR is ignored
+by RedBoot.</para>
+</sect2>
+<sect2>
+<title>Memory Maps</title>
+<para>The RAM based page table is located at RAM start + 0x4000.
+<note><title>NOTE</title>
+<para>The virtual memory maps in this section use a C, B, and X column to indicate
+the caching policy for the region..</para>
+</note></para>
+<para><programlisting>
+X C B Description
+- - - ---------------------------------------------
+0 0 0 Uncached/Unbuffered
+0 0 1 Uncached/Buffered
+0 1 0 Cached/Buffered Write Through, Read Allocate
+0 1 1 Cached/Buffered Write Back, Read Allocate
+1 0 0 Invalid -- not used
+1 0 1 Uncached/Buffered No write buffer coalescing
+1 1 0 Mini DCache - Policy set by Aux Ctl Register
+1 1 1 Cached/Buffered Write Back, Read/Write Allocate
+
+Virtual Address Physical Address XCB Size (MB) Description
+--------------- ---------------- --- --------- -----------
+ 0x00000000 0x00000000 010 256 SDRAM (cached)
+ 0x10000000 0x10000000 010 256 SDRAM (alias)
+ 0x20000000 0x00000000 000 256 SDRAM (uncached)
+ 0x48000000 0x48000000 000 64 PCI Data
+ 0x50000000 0x50000000 010 16 Flash (CS0)
+ 0x51000000 0x51000000 000 112 CS1 - CS7
+ 0x60000000 0x60000000 000 64 Queue Manager
+ 0xC0000000 0xC0000000 000 1 PCI Controller
+ 0xC4000000 0xC4000000 000 1 Exp. Bus Config
+ 0xC8000000 0xC8000000 000 1 Misc IXP425 IO
+ 0xCC000000 0xCC000000 000 1 SDRAM Config
+
+</programlisting></para>
+</sect2>
+<sect2>
+<title>Platform Resource Usage</title>
+<para>The IXP425 programmable OStimer0 is used for timeout support
+for networking and XModem file transfers.</para>
+</sect2></sect1>
+
+<?Pub _newpage>
+<sect1 id="GRG">
+<title>ARM/Intel XScale Generic Residential Gateway</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Intel GRG</primary><secondary>installing and
+testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Intel GRG</secondary></indexterm>RedBoot supports
+the console UART and a PCI based i82559 ethernet card for communication
+and downloads. The default serial port settings are 115200,8,N,1. RedBoot
+also supports flash management for the 16MB onboard flash.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from flash
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation Method</title>
+<para>The GRG flash is socketed, so initial installation may be done using
+an appropriate device programmer. JTAG based initial may also be used. In either
+case, the ROM mode RedBoot is programmed into the boot flash at address 0x00000000.
+</para>
+
+<para>After booting the initial installation of RedBoot, this warning may
+be printed: <screen>flash configuration checksum error or invalid key
+</screen>This is normal, and indicates that the flash should be configured
+for use by RedBoot. See <xref linkend="Persistent-State-Flash"> for more
+details.
+</para></sect2>
+<sect2>
+<title>Rebuilding RedBoot </title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=grg
+export ARCH_DIR=arm
+export PLATFORM_DIR=xscale/grg
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+</sect2>
+
+<sect2>
+<title>Interrupts</title>
+<para>RedBoot uses an interrupt vector table which is located at address 0x8004.
+Entries in this table are pointers to functions with this protoype:: <programlisting>
+int irq_handler( unsigned vector, unsigned data )</programlisting>On the GRG
+board, the vector argument is one of many interrupts defined in <computeroutput>
+hal/arm/xscale/ixp425/current/include/hal_var_ints.h:</computeroutput>: <programlisting>
+#define CYGNUM_HAL_INTERRUPT_NPEA 0
+#define CYGNUM_HAL_INTERRUPT_NPEB 1
+#define CYGNUM_HAL_INTERRUPT_NPEC 2
+#define CYGNUM_HAL_INTERRUPT_QM1 3
+#define CYGNUM_HAL_INTERRUPT_QM2 4
+#define CYGNUM_HAL_INTERRUPT_TIMER0 5
+#define CYGNUM_HAL_INTERRUPT_GPIO0 6
+#define CYGNUM_HAL_INTERRUPT_GPIO1 7
+#define CYGNUM_HAL_INTERRUPT_PCI_INT 8
+#define CYGNUM_HAL_INTERRUPT_PCI_DMA1 9
+#define CYGNUM_HAL_INTERRUPT_PCI_DMA2 10
+#define CYGNUM_HAL_INTERRUPT_TIMER1 11
+#define CYGNUM_HAL_INTERRUPT_USB 12
+#define CYGNUM_HAL_INTERRUPT_UART2 13
+#define CYGNUM_HAL_INTERRUPT_TIMESTAMP 14
+#define CYGNUM_HAL_INTERRUPT_UART1 15
+#define CYGNUM_HAL_INTERRUPT_WDOG 16
+#define CYGNUM_HAL_INTERRUPT_AHB_PMU 17
+#define CYGNUM_HAL_INTERRUPT_XSCALE_PMU 18
+#define CYGNUM_HAL_INTERRUPT_GPIO2 19
+#define CYGNUM_HAL_INTERRUPT_GPIO3 20
+#define CYGNUM_HAL_INTERRUPT_GPIO4 21
+#define CYGNUM_HAL_INTERRUPT_GPIO5 22
+#define CYGNUM_HAL_INTERRUPT_GPIO6 23
+#define CYGNUM_HAL_INTERRUPT_GPIO7 24
+#define CYGNUM_HAL_INTERRUPT_GPIO8 25
+#define CYGNUM_HAL_INTERRUPT_GPIO9 26
+#define CYGNUM_HAL_INTERRUPT_GPIO10 27
+#define CYGNUM_HAL_INTERRUPT_GPIO11 28
+#define CYGNUM_HAL_INTERRUPT_GPIO12 29
+#define CYGNUM_HAL_INTERRUPT_SW_INT1 30
+#define CYGNUM_HAL_INTERRUPT_SW_INT2 31
+</programlisting>
+The data passed to the ISR is pulled from a data table <computeroutput>(hal_interrupt_data)
+</computeroutput> which immediately follows the interrupt vector table. With
+32 interrupts, the data table starts at address 0x8084. </para>
+<para>An application may create a normal C function with the above prototype
+to be an ISR. Just poke its address into the table at the correct index and
+enable the interrupt at its source. The return value of the ISR is ignored
+by RedBoot.</para>
+</sect2>
+<sect2>
+<title>Memory Maps</title>
+<para>The RAM based page table is located at RAM start + 0x4000.
+<note><title>NOTE</title>
+<para>The virtual memory maps in this section use a C, B, and X column to indicate
+the caching policy for the region..</para>
+</note></para>
+<para><programlisting>
+X C B Description
+- - - ---------------------------------------------
+0 0 0 Uncached/Unbuffered
+0 0 1 Uncached/Buffered
+0 1 0 Cached/Buffered Write Through, Read Allocate
+0 1 1 Cached/Buffered Write Back, Read Allocate
+1 0 0 Invalid -- not used
+1 0 1 Uncached/Buffered No write buffer coalescing
+1 1 0 Mini DCache - Policy set by Aux Ctl Register
+1 1 1 Cached/Buffered Write Back, Read/Write Allocate
+
+Virtual Address Physical Address XCB Size (MB) Description
+--------------- ---------------- --- --------- -----------
+ 0x00000000 0x00000000 010 32 SDRAM (cached)
+ 0x10000000 0x00000000 010 32 SDRAM (alias)
+ 0x20000000 0x00000000 000 32 SDRAM (uncached)
+ 0x48000000 0x48000000 000 64 PCI Data
+ 0x50000000 0x50000000 010 16 Flash (CS0)
+ 0x51000000 0x51000000 000 112 CS1 - CS7
+ 0x60000000 0x60000000 000 64 Queue Manager
+ 0xC0000000 0xC0000000 000 1 PCI Controller
+ 0xC4000000 0xC4000000 000 1 Exp. Bus Config
+ 0xC8000000 0xC8000000 000 1 Misc IXP425 IO
+ 0xCC000000 0xCC000000 000 1 SDRAM Config
+
+</programlisting></para>
+</sect2>
+<sect2>
+<title>Platform Resource Usage</title>
+<para>The IXP425 programmable OStimer0 is used for timeout support
+for networking and XModem file transfers.</para>
+</sect2></sect1>
+
+<?Pub _newpage>
+<sect1 id="PrPMC1100">
+<title>Motorola PrPMC1100 CPU card</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Motorola PrPMC1100</primary><secondary>installing and
+testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Motorola PrPMC1100</secondary></indexterm>RedBoot supports
+the builtin high-speed and console UARTs
+.
+The console UART is the default and feeds the front panel COM1 connector. The
+high-speed UART signals are only available from the PN4 IO connector. Therefore,
+usability of this port depends on the carrier board used. The default serial
+port settings are 115200,8,N,1. RedBoot also supports flash management for
+the 16MB boot flash on the mainboard.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from flash
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation Method</title>
+<para>The PrPMC1100 flash is socketed, so initial installation may be done using
+an appropriate device programmer. JTAG based flash programming may also be used.
+In either case, the ROM mode RedBoot is programmed into the boot flash at address
+0x00000000.
+</para>
+
+<para>After booting the initial installation of RedBoot, this warning may
+be printed: <screen>flash configuration checksum error or invalid key
+</screen>This is normal, and indicates that the flash should be configured
+for use by RedBoot. Even if this message is not seen, it is recommended that
+the <command>fconfig</command> be run to initialize the flash configuration
+area. See <xref linkend="Persistent-State-Flash"> for more details.
+</para></sect2>
+
+<sect2>
+<title>Rebuilding RedBoot </title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=prpmc1100
+export ARCH_DIR=arm
+export PLATFORM_DIR=xscale/prpmc1100
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+</sect2>
+
+<sect2>
+<title>Interrupts</title>
+<para>RedBoot uses an interrupt vector table which is located at address 0x8004.
+Entries in this table are pointers to functions with this protoype:: <programlisting>
+int irq_handler( unsigned vector, unsigned data )</programlisting>On the PrPMC1100
+board, the vector argument is one of many interrupts defined in <computeroutput>
+hal/arm/xscale/ixp425/current/include/hal_var_ints.h:</computeroutput>: <programlisting>
+#define CYGNUM_HAL_INTERRUPT_NPEA 0
+#define CYGNUM_HAL_INTERRUPT_NPEB 1
+#define CYGNUM_HAL_INTERRUPT_NPEC 2
+#define CYGNUM_HAL_INTERRUPT_QM1 3
+#define CYGNUM_HAL_INTERRUPT_QM2 4
+#define CYGNUM_HAL_INTERRUPT_TIMER0 5
+#define CYGNUM_HAL_INTERRUPT_GPIO0 6
+#define CYGNUM_HAL_INTERRUPT_GPIO1 7
+#define CYGNUM_HAL_INTERRUPT_PCI_INT 8
+#define CYGNUM_HAL_INTERRUPT_PCI_DMA1 9
+#define CYGNUM_HAL_INTERRUPT_PCI_DMA2 10
+#define CYGNUM_HAL_INTERRUPT_TIMER1 11
+#define CYGNUM_HAL_INTERRUPT_USB 12
+#define CYGNUM_HAL_INTERRUPT_UART2 13
+#define CYGNUM_HAL_INTERRUPT_TIMESTAMP 14
+#define CYGNUM_HAL_INTERRUPT_UART1 15
+#define CYGNUM_HAL_INTERRUPT_WDOG 16
+#define CYGNUM_HAL_INTERRUPT_AHB_PMU 17
+#define CYGNUM_HAL_INTERRUPT_XSCALE_PMU 18
+#define CYGNUM_HAL_INTERRUPT_GPIO2 19
+#define CYGNUM_HAL_INTERRUPT_GPIO3 20
+#define CYGNUM_HAL_INTERRUPT_GPIO4 21
+#define CYGNUM_HAL_INTERRUPT_GPIO5 22
+#define CYGNUM_HAL_INTERRUPT_GPIO6 23
+#define CYGNUM_HAL_INTERRUPT_GPIO7 24
+#define CYGNUM_HAL_INTERRUPT_GPIO8 25
+#define CYGNUM_HAL_INTERRUPT_GPIO9 26
+#define CYGNUM_HAL_INTERRUPT_GPIO10 27
+#define CYGNUM_HAL_INTERRUPT_GPIO11 28
+#define CYGNUM_HAL_INTERRUPT_GPIO12 29
+#define CYGNUM_HAL_INTERRUPT_SW_INT1 30
+#define CYGNUM_HAL_INTERRUPT_SW_INT2 31
+</programlisting>
+The data passed to the ISR is pulled from a data table <computeroutput>(hal_interrupt_data)
+</computeroutput> which immediately follows the interrupt vector table. With
+32 interrupts, the data table starts at address 0x8084. </para>
+<para>An application may create a normal C function with the above prototype
+to be an ISR. Just poke its address into the table at the correct index and
+enable the interrupt at its source. The return value of the ISR is ignored
+by RedBoot.</para>
+</sect2>
+<sect2>
+<title>Memory Maps</title>
+<para>The RAM based page table is located at RAM start + 0x4000.
+<note><title>NOTE</title>
+<para>The virtual memory maps in this section use a C, B, and X column to indicate
+the caching policy for the region..</para>
+</note></para>
+<para><programlisting>
+X C B Description
+- - - ---------------------------------------------
+0 0 0 Uncached/Unbuffered
+0 0 1 Uncached/Buffered
+0 1 0 Cached/Buffered Write Through, Read Allocate
+0 1 1 Cached/Buffered Write Back, Read Allocate
+1 0 0 Invalid -- not used
+1 0 1 Uncached/Buffered No write buffer coalescing
+1 1 0 Mini DCache - Policy set by Aux Ctl Register
+1 1 1 Cached/Buffered Write Back, Read/Write Allocate
+
+Virtual Address Physical Address XCB Size (MB) Description
+--------------- ---------------- --- --------- -----------
+ 0x00000000 0x00000000 010 256 SDRAM (cached)
+ 0x10000000 0x10000000 010 256 SDRAM (alias)
+ 0x20000000 0x00000000 000 256 SDRAM (uncached)
+ 0x48000000 0x48000000 000 64 PCI Data
+ 0x50000000 0x50000000 010 16 Flash (CS0)
+ 0x51000000 0x51000000 000 112 CS1 - CS7
+ 0x60000000 0x60000000 000 64 Queue Manager
+ 0xC0000000 0xC0000000 000 1 PCI Controller
+ 0xC4000000 0xC4000000 000 1 Exp. Bus Config
+ 0xC8000000 0xC8000000 000 1 Misc CPU IO
+ 0xCC000000 0xCC000000 000 1 SDRAM Config
+
+</programlisting></para>
+</sect2>
+<sect2>
+<title>Platform Resource Usage</title>
+<para>The CPU programmable OStimer0 is used for timeout support
+for networking and XModem file transfers.</para>
+</sect2></sect1>
+
+<!-- ********************** CalmRISC ********************** -->
+<?Pub _newpage>
+<sect1 id="CalmRISC16">
+<title>CalmRISC/CalmRISC16 Samsung CalmRISC16 Core Evaluation Board </title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Samsung CalmRISC16 Core EVB</primary><secondary>installing
+and testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Samsung CalmRISC16 Core EVB</secondary></indexterm> The
+Samsung CalmRISC16 evaluation platform consists of two boards connected by a
+ribbon cable. One board contains the CPU core and memory. The other board is
+called the MDSChip board and provides the host interface. The calmRISC16 is a
+harvard architecture with separate 22-bit program and data addresses. The
+instruction set provides no instruction for writing to program memory. The
+MDSChip board firmware (called CalmBreaker) provides a pseudo register interface
+so that code running on the core has access to a serial channel and a mechanism
+to write to program memory. The serial channel is fixed at 57600-8-N-1 by the
+firmware. The CalmBreaker firmware also provides a serial protocol which
+allows a host to download a program and to start or stop the core board.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running via the MDSChip board.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation Method </title>
+<para>The CalmRISC16 core is controlled through the MDSChip board. There is
+no non-volatile storage available for RedBoot, so RedBoot must be downloaded
+to the board on every power cycle. A small utility program is used to download
+S-record files to the eval board. Sources and build instructions for this
+utility are located in the RedBoot sources in:
+<filename class="directory">packages/hal/calmrisc16/ceb/current/support
+</filename></para>
+<para>To download the RedBoot image, first press the reset button on the MDSChip
+board. The green 'Run' LED on the core board should go off. Now, use the
+utility to download the RedBoot image with:
+<screen>$ <userinput>calmbreaker -p /dev/term/b --reset --srec-code -f redboot.elf</userinput>
+</screen>
+Note that the '-p /dev/term/b' specifies the serial port to use and will vary
+from system to system. The download will take about two minutes. After it
+finishes, start RedBoot with:
+<screen>$ <userinput>calmbreaker -p /dev/term/b --run</userinput></screen>
+The 'Run' LED on the core board should be on. Connecting to the MDSboard with
+a terminal and typing enter should result in RedBoot reprinting the command
+prompt.
+</para>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>None.</para>
+</sect2>
+<sect2>
+<title>Special Note on Serial Channel </title>
+<para>The MDSChip board uses a relatively slow microcontroller to provide
+the pseudo-register interface to the core board. This pseudo-register
+interface provides access to the serial channel and write access to program
+memory. Those interfaces are slow and the serial channel is easily overrun
+by a fast host. For this reason, GDB must be told to limit the size of code
+download packets to avoid serial overrun. This is done with the following
+GDB command:
+<screen>(gdb) <userinput>set download-write-size 25</userinput></screen>
+</para>
+</sect2>
+<sect2>
+
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=calm16_ceb
+export ARCH_DIR=calmrisc16
+export PLATFORM_DIR=ceb
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="CalmRISC32">
+<title>CalmRISC/CalmRISC32 Samsung CalmRISC32 Core Evaluation Board </title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Samsung CalmRISC32 Core EVB</primary><secondary>installing
+and testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Samsung CalmRISC32 Core EVB</secondary></indexterm> The
+Samsung CalmRISC32 evaluation platform consists of two boards connected by a
+ribbon cable. One board contains the CPU core and memory. The other board is
+called the MDSChip board and provides the host interface. The calmRISC32 is a
+harvard architecture with separate 32-bit program and data addresses. The
+instruction set provides no instruction for writing to program memory. The
+MDSChip board firmware (called CalmBreaker) provides a pseudo register interface
+so that code running on the core has access to a serial channel and a mechanism
+to write to program memory. The serial channel is fixed at 57600-8-N-1 by the
+firmware. The CalmBreaker firmware also provides a serial protocol which
+allows a host to download a program and to start or stop the core board.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running via the MDSChip board.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation Method </title>
+<para>The calmRISC32 core is controlled through the MDSChip board. There is
+no non-volatile storage available for RedBoot, so RedBoot must be downloaded
+to the board on every power cycle. A small utility program is used to download
+S-record files to the eval board. Sources and build instructions for this
+utility are located in the RedBoot sources in:
+<filename class="directory">packages/hal/calmrisc32/ceb/current/support
+</filename></para>
+<para>To download the RedBoot image, first press the reset button on the MDSChip
+board. The green 'Run' LED on the core board should go off. Now, use the
+utility to download the RedBoot image with:
+<screen>$ <userinput>calmbreaker -p /dev/term/b --reset --srec-code -f redboot.elf</userinput>
+</screen>
+Note that the '-p /dev/term/b' specifies the serial port to use and will vary
+from system to syetm. The download will take about two minutes. After it
+finishes, start RedBoot with:
+<screen>$ <userinput>calmbreaker -p /dev/term/b --run</userinput></screen>
+The 'Run' LED on the core board should be on. Connecting to the MDSboard with
+a terminal and typing enter should result in RedBoot reprinting the command
+prompt.
+</para>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>None.</para>
+</sect2>
+<sect2>
+<title>Special Note on Serial Channel </title>
+<para>The MDSChip board uses a relatively slow microcontroller to provide
+the pseudo-register interface to the core board. This pseudo-register
+interface provides access to the serial channel and write access to program
+memory. Those interfaces are slow and the serial channel is easily overrun
+by a fast host. For this reason, GDB must be told to limit the size of code
+download packets to avoid serial overrun. This is done with the following
+GDB command:
+<screen>(gdb) <userinput>set download-write-size 25</userinput></screen>
+</para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=calm32_ceb
+export ARCH_DIR=calmrisc32
+export PLATFORM_DIR=ceb
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+<!-- ******************************** FRV ********************* -->
+
+<?Pub _newpage>
+<sect1 id="frv400">
+<title>FRV/FRV400 Fujitsu FR-V 400 (MB-93091)</title>
+<sect2>
+<title>Overview</title>
+
+<para><indexterm><primary>Fujitsu FR-V 400</primary>
+<secondary>installing and testing</secondary></indexterm><indexterm><primary>
+installing and testing
+</primary><secondary>Fujitsu FR-V 400</secondary></indexterm>
+RedBoot supports both serial ports, which are available via
+the stacked serial connectors on the mother board.
+The topmost port is the default and is considered to be port 0 by RedBoot.
+The bottommost port is serial port 1.
+The default serial port settings are 38400,8,N,1.
+</para>
+<para>
+FLASH management is also supported, but only for the FLASH device in IC7.
+This arrangement allows for IC8 to retain either the original Fujitsu board
+firmware, or some application specific contents.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROMRAM</entry>
+ <entry>[ROMRAM]</entry>
+ <entry>RedBoot running from RAM, but contained in the
+ board's flash boot sector.</entry>
+ <entry>redboot_ROMRAM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+</sect2>
+
+<sect2>
+<title>Initial Installation Method </title>
+
+<para>
+RedBoot can be installed by directly programming the FLASH device in IC7
+or by using the Fujitsu provided software to download and install a
+version into the FLASH device. Complete instructions are provided
+separately.
+</para>
+
+</sect2>
+
+<sect2>
+<title>Special RedBoot Commands</title>
+
+<para>None.</para>
+</sect2>
+
+<sect2>
+<title>Memory Maps</title>
+
+<para>The memory map of this platform is fixed by the hardware (cannot
+be changed by software). The only attributes which can be modified are
+control over cacheability, as noted below.
+<screen>
+Address Cache? Resource
+00000000-03EFFFFF Yes SDRAM (via plugin DIMM)
+03F00000-03FFFFFF No SDRAM (used for PCI window)
+10000000-1FFFFFFF No MB86943 PCI bridge
+20000000-201FFFFF No SRAM
+21000000-23FFFFFF No Motherboard resources
+24000000-25FFFFFF No PCI I/O space
+26000000-2FFFFFFF No PCI Memory space
+30000000-FDFFFFFF ?? Unused
+FE000000-FEFFFFFF No I/O devices
+FF000000-FF1FFFFF No IC7 - RedBoot FLASH
+FF200000-FF3FFFFF No IC8 - unused FLASH
+FF400000-FFFFFFFF No Misc other I/O
+</screen>
+</para>
+
+<note> <title>NOTE</title>
+<para>
+The only configuration currently suppored requires a 64MB SDRAM
+DIMM to be present on the CPU card. No other memory configuration
+is supported at this time.
+</para>
+</note>
+
+</sect2>
+
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=frv400
+export ARCH_DIR=frv
+export PLATFORM_DIR=frv400
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+</sect2>
+
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="mb93091">
+<title>Fujitsu FR-V Design Kit (MB93091-CBxx)</title>
+<sect2>
+<title>Overview</title>
+
+<para><indexterm><primary>Fujitsu FR-V MB93091-CBxx Design
+Kit</primary> <secondary>installing and
+testing</secondary></indexterm><indexterm><primary> installing and
+testing </primary><secondary>Fujitsu FR-V MB93091-CBxx Design
+Kit</secondary></indexterm> RedBoot supports both serial ports, which
+are available via the stacked serial connectors on the mother board in
+the case of the FR400 CPU board, and via serial connectors present on
+the other supported CPU boards themselves. The topmost port is the
+default and is considered to be port 0 by RedBoot. The bottommost
+port is serial port 1. The default serial port settings are
+115200,8,N,1. The serial port supports baud rates up to 460800, which
+can be set using the <command>baud</command> command as described in
+<xref linkend="RedBoot-Commands-and-Examples">.
+
+</para>
+<para>
+FLASH management is also supported, but only for the FLASH device in IC7.
+This arrangement allows for IC8 to retain either the original Fujitsu board
+firmware, or some application specific contents.
+Two basic RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROMRAM</entry>
+ <entry>[ROMRAM]</entry>
+ <entry>RedBoot running from RAM, but contained in the
+ board's flash boot sector.</entry>
+ <entry>redboot_ROMRAM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+<para>Since the normal RedBoot configuration does not use the FLASH ROM
+except during startup, it is unnecessary to load a RAM-based RedBoot
+before reprogramming the FLASH.</para>
+</sect2>
+
+<sect2>
+<title>Initial Installation Method </title>
+
+<para>
+RedBoot can be installed by directly programming the FLASH device in IC7
+or by using the Fujitsu provided software to download and install a
+version into the FLASH device. Complete instructions are provided
+separately.
+</para>
+
+</sect2>
+
+<sect2>
+<title>Special RedBoot Commands</title>
+
+<para>The <command>exec</command> command as described in <xref linkend="RedBoot-Commands-and-Examples">
+is supported by RedBoot on this target, for executing Linux kernels. Only the command line and timeout options
+are relevant to this platform.</para>
+</sect2>
+
+<sect2>
+<title>Memory Maps</title>
+
+<para>The memory map of this platform is fixed by the hardware (cannot
+be changed by software). The only attributes which can be modified are
+control over cacheability, as noted below.
+<screen>
+Address Cache? Resource
+00000000-03EFFFFF Yes SDRAM (via plugin DIMM)
+03F00000-03FFFFFF No SDRAM (used for PCI window)
+10000000-1FFFFFFF No MB86943 PCI bridge
+20000000-201FFFFF No SRAM
+21000000-23FFFFFF No Motherboard resources
+24000000-25FFFFFF No PCI I/O space
+26000000-2FFFFFFF No PCI Memory space
+30000000-FDFFFFFF ?? Unused
+FE000000-FEFFFFFF No I/O devices
+FF000000-FF1FFFFF No IC7 - RedBoot FLASH
+FF200000-FF3FFFFF No IC8 - unused FLASH
+FF400000-FFFFFFFF No Misc other I/O
+</screen>
+</para>
+
+<note> <title>NOTE</title>
+<para>
+The only configuration currently suppored requires a 64MiB SDRAM
+DIMM to be present on the CPU card. No other memory configuration
+is supported at this time.
+</para>
+</note>
+
+</sect2>
+
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=mb93091
+export ARCH_DIR=frv
+export PLATFORM_DIR=mb93091
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+</sect2>
+
+<sect2>
+<title>Resource Usage</title>
+
+<para>
+The RedBoot image occupies flash addresses 0xFF000000 - 0xFF03FFFF. To
+execute it copies itself out of there to RAM at 0x03E00000. RedBoot
+reserves memory from 0x00000000 to 0x0001FFFF for its own use.
+User programs can use memory from 0x00020000 to 0x03DFFFFF.
+RAM based RedBoot configurations are
+designed to run from RAM at 0x00020000.
+</para>
+</sect2>
+
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="mb93093">
+<title>Fujitsu FR-V Portable Demonstration Kit (MB93093-PD00)</title>
+<sect2>
+<title>Overview</title>
+
+<para><indexterm><primary>Fujitsu FR-V Portable Demonstration Kit</primary>
+<secondary>installing and testing</secondary></indexterm><indexterm><primary>
+installing and testing
+</primary><secondary>Fujitsu FR-V Portable Demonstration Kit</secondary></indexterm>
+RedBoot supports the serial port which is available via a special cable connected
+to the CON_UART connector on the board. The default serial port settings are 115200,8,N,1.
+The serial port supports baud rates up to 460800, which can be set using the <command>baud</command>
+command as described in <xref linkend="RedBoot-Commands-and-Examples">.
+</para>
+
+<para>
+FLASH management is also supported.
+Two basic RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROMRAM</entry>
+ <entry>[ROMRAM]</entry>
+ <entry>RedBoot running from RAM, but contained in the
+ board's flash boot sector.</entry>
+ <entry>redboot_ROMRAM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+<para>Since the normal RedBoot configuration does not use the FLASH ROM
+except during startup, it is unnecessary to load a RAM-based RedBoot
+before reprogramming the FLASH.</para>
+</sect2>
+
+<sect2>
+<title>Initial Installation Method </title>
+
+<para>
+The Portable Demonstration Kit should have been shipped with an existing
+version of RedBoot, which can be upgraded to the current version using
+the instructions below.
+</para>
+
+</sect2>
+
+<sect2>
+<title>Special RedBoot Commands</title>
+
+<para>The <command>exec</command> command as described in <xref linkend="RedBoot-Commands-and-Examples">
+is supported by RedBoot on this target, for executing Linux kernels. Only the command line and timeout options
+are relevant to this platform.</para>
+</sect2>
+
+<sect2>
+<title>Memory Maps</title>
+
+<para>The memory map of this platform is fixed by the hardware (cannot
+be changed by software). The only attributes which can be modified are
+control over cacheability, as noted below.
+<screen>
+Address Cache? Resource
+00000000-03EFFFFF Yes SDRAM (via plugin DIMM)
+03F00000-03FFFFFF No Unused (SDRAM)
+10000000-1FFFFFFF No AX88796 Ethernet
+20000000-2FFFFFFF No System FPGA
+30000000-3FFFFFFF No MB93493 companion chip (unused)
+40000000-FCFFFFFF ?? Unused
+FD000000-FDFFFFFF ?? FLASH (ROM3,ROM4) (unused)
+FE000000-FEFFFFFF No Miscellaneous on-chip I/O
+FF000000-FFFFFFFF No RedBoot FLASH (16MiB)
+</screen>
+</para>
+
+<note> <title>NOTE</title>
+<para>
+The only configuration currently suppored requires a 64MiB SDRAM
+DIMM to be present on the CPU card. No other memory configuration
+is supported at this time.
+</para>
+</note>
+
+</sect2>
+
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=mb93093
+export ARCH_DIR=frv
+export PLATFORM_DIR=mb93093
+</programlisting>
+</para>
+</sect2>
+
+<sect2>
+<title>Resource Usage</title>
+
+<para>
+The RedBoot image occupies flash addresses 0xFF000000 - 0xFF03FFFF. To
+execute it copies itself out of there to RAM at 0x03E00000. RedBoot
+reserves memory from 0x00000000 to 0x0001FFFF for its own use.
+User programs can use memory from 0x00020000 to 0x03DFFFFF.
+RAM based RedBoot configurations are
+designed to run from RAM at 0x00020000.
+</para>
+</sect2>
+
+</sect1>
+
+
+<!-- ********************************* IA32 *************************** -->
+<?Pub _newpage>
+<sect1 id="x86pc">
+<title>IA32/x86 x86-Based PC</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>x86 Based PC</primary><secondary>installing and
+testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>x86 Based PC</secondary></indexterm>RedBoot supports
+two serial ports and an Intel i82559 based ethernet card (for example an Intel
+EtherExpress Pro 10/100) for communication and downloads. The default serial
+port settings are 38400,8,N,1.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Floppy</entry>
+ <entry>[Floppy]</entry>
+ <entry>RedBoot running from a boot floppy disk installed
+ in the A: drive of the PC.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation</title>
+<para>RedBoot takes the form of a self-booting image that must be written
+onto a formatted floppy disk. The process will erase any file system or data
+that already exists on that disk, so proceed with caution.</para>
+<para>For Red Hat Linux users, this can be done by:</para>
+<screen>$ <userinput>dd conv=sync if=install/bin/redboot.bin of=/dev/fd0H1440
+</userinput></screen>
+<para>For NT Cygwin users, this can be done by first ensuring that the raw
+floppy device is mounted as <filename>/dev/fd0</filename>. To check if this
+is the case, type the command <command>mount</command> at the Cygwin bash
+prompt. If the floppy drive is already mounted, it will be listed as something
+similar to the following line:</para>
+<screen> \\.\a: /dev/fd0 user binmode</screen>
+<para>If this line is not listed, then mount the floppy drive using the command:
+</para>
+<screen>$ <userinput>mount -f -b //./a: /dev/fd0</userinput></screen>
+<para>To actually install the boot image on the floppy, use the command:</para>
+<screen>$ <userinput>dd conv=sync if=install/bin/redboot.bin of=/dev/fd0
+</userinput></screen>
+<para>Insert this floppy in the A: drive of the PC to be used as a target
+and ensure that the BIOS is configured to boot from A: by default. On reset,
+the PC will boot from the floppy and be ready to be debugged via either serial
+line, or via the ethernet interface if it is installed.</para>
+<note><title>NOTE</title>
+<para>Unreliable floppy media may cause the write to silently fail. This
+can be determined if the RedBoot image does not correctly
+boot. In such cases, the floppy should be (unconditionally) reformatted
+using the <command>fdformat</command> command on Linux, or
+<command>format a: /u</command> on DOS/Windows.</para>
+</note>
+</sect2>
+<sect2>
+<title>Flash management</title>
+<para>PC RedBoot does not support any FLASH commands.</para>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>None.</para>
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>All selectors are initialized to map the entire 32-bit address space
+in the familiar protected mode flat model. Page translation is not used.
+RAM up to 640K is mapped to 0x0 to 0xa0000. RAM above 640K is mapped
+from address 0x100000 upwards. Space is reserved between 0xa0000 and
+0x100000 for option ROMs and the BIOS.
+</para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=pc
+export ARCH_DIR=i386
+export PLATFORM_DIR=pc
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+<!-- *************** MIPS ******************* -->
+
+<?Pub _newpage>
+<sect1 id="atlas">
+<title>MIPS/MIPS32(CoreLV 4Kc)+MIPS64(CoreLV 5Kc) Atlas Board</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>MIPS Atlas Board with CoreLV 4KC and CoreLV 5KC
+</primary><secondary>installing and testing</secondary></indexterm><indexterm>
+<primary>installing and testing</primary><secondary>MIPS Atlas Board with
+CoreLV 4KC and CoreLV 5KC</secondary></indexterm>RedBoot supports the DgbSer
+serial port and the built in ethernet port for communication and downloads.
+The default serial port settings are 115200,8,N,1. RedBoot runs from and supports
+flash management for the system flash region.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation</title>
+<para>RedBoot is installed using the code download facility built into the
+Atlas board. See the Atlas User manual for details, and also the Atlas download
+format in <xref linkend="Atlas-download-format">.</para>
+<sect3>
+<title>Quick download instructions</title>
+<para>Here are quick start instructions for downloading the prebuilt RedBoot
+image.</para>
+<orderedlist>
+<listitem><para>Locate the prebuilt files in the bin directory: <filename>
+deleteall.dl</filename> and <filename>redboot.dl</filename>.
+</para>
+</listitem>
+<listitem><para>Make sure switch S1-1 is OFF and switch S5-1 is ON. Reset
+the board and verify that the LED display reads <computeroutput>Flash DL</computeroutput>.
+</para>
+</listitem>
+<listitem><para>Make sure your parallel port is connected to the 1284 port
+Of the Atlas board. </para>
+</listitem>
+<listitem><para>Send the <filename>deleteall.dl</filename> file to the
+parallel port to erase previous images:
+<screen>$ <userinput>cat deleteall.dl >/dev/lp0</userinput></screen>
+When this is complete, the LED display should read
+<computeroutput>Deleted</computeroutput>.</para>
+</listitem>
+<listitem><para>Send the ROM mode RedBoot image to the board:
+<screen>$ <userinput>cat redboot.dl >/dev/lp0</userinput></screen>
+When this is complete, the LED display should show the last
+address programmed. This will be something like: <computeroutput>1fc17000
+</computeroutput>. </para>
+</listitem>
+<listitem><para>Change switch S5-1 to OFF and reset the board. The LED display
+should read <computeroutput>RedBoot</computeroutput>. </para>
+</listitem>
+<listitem><para>Run the RedBoot <command>fis init</command>
+and <command>fconfig</command> commands to initialize the flash.
+See <xref linkend="Atlas-Additional-fconfig-options">, <xref linkend="Flash-Image-System">
+and <xref linkend="Persistent-State-Flash"> for details. </para>
+</listitem>
+</orderedlist>
+</sect3>
+<sect3 id="Atlas-download-format">
+<title>Atlas download format</title>
+<para>In order to download RedBoot to the Atlas board, it must be converted
+to the Atlas download format. There are different ways of doing this depending
+on which version of the developer's kit is shipped with the board. </para>
+<para>The <citetitle>Atlas Developer's Kit</citetitle> CD contains an <application>
+srec2flash</application> utility. The source code for this utility is part
+of the <filename>yamon/yamon-src-01.01.tar.gz</filename> tarball
+on the Dev Kit CD. The path in the expanded tarball is <filename
+class="directory">yamon/bin/tools</filename>. To use
+<application>srec2flash</application> to convert the S-record file:
+<screen>$ <userinput>srec2flash -EL -S29 redboot.srec >redboot.dl</userinput></screen>
+The <citetitle>Atlas/Malta Developer's Kit</citetitle> CD
+contains an <application>srecconv.pl</application> utility which requires
+Perl. This utilty is part of the <filename>yamon/yamon-src-02.00.tar.gz</filename>
+tarball on the Dev Kit CD. The path in the expanded tarball
+is <filename class="directory">yamon/bin/tools</filename>. To use <application>
+srecconv</application> to convert the S-record file:
+<screen>$ <userinput>cp redboot_ROM.srec redboot_ROM.rec</userinput>
+$ <userinput>srecconv.pl -ES L -A 29 redboot_ROM</userinput></screen>
+The resulting file is named <filename>redboot_ROM.fl</filename>.</para>
+</sect3></sect2>
+<sect2>
+<title>Flash management</title>
+<sect3 id="Atlas-Additional-fconfig-options">
+<title>Additional config options</title>
+<para>The ethernet MAC address is stored in flash manually using the <command>
+fconfig</command> command. You can use the YAMON <command>setenv
+ethaddr</command> command to print out the board ethernet address.
+Typically, it is: <screen>00:0d:a0:00:<replaceable>xx:xx</replaceable></screen> where
+<replaceable>xx.xx</replaceable> is the hex representation of the
+board serial number.</para>
+</sect3>
+</sect2>
+<sect2>
+<title>Additional commands</title>
+<para>The <command>exec</command> command which allows the
+loading and execution of Linux kernels, is supported for this architecture
+ (see <xref linkend="executing-programs">). The
+<command>exec</command> parameters used for MIPS boards are:</para>
+<variablelist><varlistentry>
+<term>-b <replaceable>&lt;addr></replaceable></term>
+<listitem><para>Location to store command line and environment passed to kernel</para></listitem></varlistentry>
+<varlistentry><term>
+-w <replaceable>&lt;time></replaceable></term>
+<listitem><para>Wait time in seconds before starting kernel</para></listitem></varlistentry>
+<varlistentry><term>
+-c <replaceable>"params"</replaceable></term>
+<listitem><para>Parameters passed to kernel</para></listitem></varlistentry>
+<varlistentry><term><replaceable>&lt;addr></replaceable></term>
+<listitem><para>Kernel entry point, defaulting to the entry point of the last image
+loaded</para></listitem></varlistentry>
+</variablelist>
+<para>Linux kernels on MIPS platforms expect the entry point to be called with arguments
+in the registers equivalent to a C call with prototype:
+<programlisting>void Linux(int argc, char **argv, char **envp);</programlisting></para>
+<para>RedBoot will place the appropriate data at the offset specified by the
+<parameter>-b</parameter> parameter, or by default at address 0x80080000, and will set the
+arguments accordingly when calling into the kernel.</para>
+<para>
+The default entry point, if no image with explicit entry point has been loaded and
+none is specified, is 0x80000750.
+</para>
+</sect2>
+
+<sect2>
+<title>Interrupts</title>
+<para>RedBoot uses an interrupt vector table which is located at address 0x80000400.
+Entries in this table are pointers to functions with this protoype: <programlisting>
+int irq_handler( unsigned vector, unsigned data )</programlisting>On an atlas
+board, the vector argument is one of 25 interrupts defined in <computeroutput>
+hal/mips/atlas/<replaceable>VERSION</replaceable>/include/plf_intr.h</computeroutput>: <programlisting>
+#define CYGNUM_HAL_INTERRUPT_SER 0
+#define CYGNUM_HAL_INTERRUPT_TIM0 1
+#define CYGNUM_HAL_INTERRUPT_2 2
+#define CYGNUM_HAL_INTERRUPT_3 3
+#define CYGNUM_HAL_INTERRUPT_RTC 4
+#define CYGNUM_HAL_INTERRUPT_COREHI 5
+#define CYGNUM_HAL_INTERRUPT_CORELO 6
+#define CYGNUM_HAL_INTERRUPT_7 7
+#define CYGNUM_HAL_INTERRUPT_PCIA 8
+#define CYGNUM_HAL_INTERRUPT_PCIB 9
+#define CYGNUM_HAL_INTERRUPT_PCIC 10
+#define CYGNUM_HAL_INTERRUPT_PCID 11
+#define CYGNUM_HAL_INTERRUPT_ENUM 12
+#define CYGNUM_HAL_INTERRUPT_DEG 13
+#define CYGNUM_HAL_INTERRUPT_ATXFAIL 14
+#define CYGNUM_HAL_INTERRUPT_INTA 15
+#define CYGNUM_HAL_INTERRUPT_INTB 16
+#define CYGNUM_HAL_INTERRUPT_INTC 17
+#define CYGNUM_HAL_INTERRUPT_INTD 18
+#define CYGNUM_HAL_INTERRUPT_SERR 19
+#define CYGNUM_HAL_INTERRUPT_HW1 20
+#define CYGNUM_HAL_INTERRUPT_HW2 21
+#define CYGNUM_HAL_INTERRUPT_HW3 22
+#define CYGNUM_HAL_INTERRUPT_HW4 23
+#define CYGNUM_HAL_INTERRUPT_HW5 24</programlisting>The data
+passed to the ISR is pulled from a data table (<computeroutput>hal_interrupt_data
+</computeroutput>) which immediately follows the interrupt vector table. With
+25 interrupts, the data table starts at address 0x80000464 on atlas.</para>
+<para>An application may create a normal C function with the above prototype
+to be an ISR. Just poke its address into the table at the correct index and
+enable the interrupt at its source. The return value of the ISR is ignored
+by RedBoot. </para>
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>Memory Maps RedBoot sets up the following memory map on the Atlas board.
+<programlisting>Physical Address Range Description
+----------------------- -------------
+0x00000000 - 0x07ffffff SDRAM
+0x08000000 - 0x17ffffff PCI Memory Space
+0x18000000 - 0x1bdfffff PCI I/O Space
+0x1be00000 - 0x1bffffff System Controller
+0x1c000000 - 0x1dffffff System flash
+0x1e000000 - 0x1e3fffff Monitor flash
+0x1f000000 - 0x1fbfffff FPGA</programlisting></para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=atlas_mips32_4kc
+export TARGET=atlas_mips64_5kc
+export ARCH_DIR=mips
+export PLATFORM_DIR=atlas
+</programlisting>
+
+Use one of the TARGET settings only.
+
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+<?Pub _newpage>
+<sect1 id="malta">
+<title>MIPS/MIPS32(CoreLV 4Kc)+MIPS64(CoreLV 5Kc) Malta Board </title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>MIPS Malta Board with CoreLV 4KC and CoreLV 5KC
+</primary><secondary>installing and testing</secondary></indexterm><indexterm>
+<primary>installing and testing</primary><secondary>MIPS Malta Board with
+CoreLV 4KC and CoreLV 5KC</secondary></indexterm>RedBoot supports both front
+facing serial ports and the built in ethernet port for communication and downloads.
+The default serial port settings are 38400,8,N,1. RedBoot runs from and supports
+flash management for the system flash region.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation</title>
+<para>RedBoot is installed using the code download facility built into the
+Malta board. See the Malta User manual for details, and also the Malta download
+format in <xref linkend="Malta-download-format">.</para>
+<sect3>
+<title>Quick download instructions</title>
+<para>Here are quick start instructions for downloading the prebuilt RedBoot
+image. </para>
+<orderedlist>
+<listitem><para>Locate the prebuilt files in the bin directory: <filename>
+deleteall.fl</filename> and <filename>redboot_ROM.fl</filename>. </para>
+</listitem>
+<listitem><para>Make sure switch S5-1 is ON. Reset the board and verify that
+the LED display reads <computeroutput>Flash DL</computeroutput>. </para>
+</listitem>
+<listitem><para>Make sure your parallel port is connected to the 1284 port
+Of the Atlas board. </para>
+</listitem>
+<listitem><para>Send the <filename>deleteall.fl</filename> file to the
+parallel port to erase previous images:
+<screen>$ <userinput>cat deleteall.fl >/dev/lp0</userinput></screen>
+When this is complete, the LED display should read
+<computeroutput>Deleted</computeroutput>.</para>
+</listitem>
+<listitem><para>Send the RedBoot image to the board:
+<screen>$ <userinput>cat redboot_ROM.fl >/dev/lp0</userinput></screen>
+When this is complete, the LED display should show the last address
+programmed. This will be something like:
+<computeroutput>1fc17000</computeroutput>. </para>
+</listitem>
+<listitem><para>Change switch S5-1 to OFF and reset the board. The LED display
+should read <computeroutput>RedBoot</computeroutput>. </para>
+</listitem>
+<listitem><para>Run the RedBoot <command>fis init</command> and <command>
+fconfig</command> commands to initialize the flash. See <xref linkend="Flash-Image-System">
+and <xref linkend="Persistent-State-Flash"> for details. </para>
+</listitem>
+</orderedlist>
+</sect3>
+<sect3 id="malta-download-format">
+<title>Malta download format</title>
+<para>In order to download RedBoot to the Malta board, it must be converted
+to the Malta download format.</para>
+<para>The <citetitle>Atlas/Malta Developer's Kit</citetitle> CD contains an <application>
+srecconv.pl</application> utility which requires Perl. This utility is part
+of the <filename>yamon/yamon-src-02.00.tar.gz</filename> tarball
+on the Dev Kit CD. The path in the expanded tarball is <filename
+class="directory">yamon/bin/tools</filename>. To use
+<application>srecconv</application> to convert the S-record file:
+<screen>$ <userinput>cp redboot_ROM.srec redboot_ROM.rec</userinput>
+$ <userinput>srecconv.pl -ES L -A 29 redboot_ROM</userinput></screen>
+The resulting file is named <filename>redboot_ROM.fl</filename>.</para>
+</sect3></sect2>
+
+<sect2>
+<title>Additional commands</title>
+<para>The <command>exec</command> command which allows the
+loading and execution of Linux kernels, is supported for this architecture
+ (see <xref linkend="executing-programs">). The
+<command>exec</command> parameters used for MIPS boards are:</para>
+<variablelist><varlistentry>
+<term>-b <replaceable>&lt;addr></replaceable></term>
+<listitem><para>Location to store command line and environment passed to kernel</para></listitem></varlistentry>
+<varlistentry><term>
+-w <replaceable>&lt;time></replaceable></term>
+<listitem><para>Wait time in seconds before starting kernel</para></listitem></varlistentry>
+<varlistentry><term>
+-c <replaceable>"params"</replaceable></term>
+<listitem><para>Parameters passed to kernel</para></listitem></varlistentry>
+<varlistentry><term><replaceable>&lt;addr></replaceable></term>
+<listitem><para>Kernel entry point, defaulting to the entry point of the last image
+loaded</para></listitem></varlistentry>
+</variablelist>
+<para>Linux kernels on MIPS platforms expect the entry point to be called with arguments
+in the registers equivalent to a C call with prototype:
+<programlisting>void Linux(int argc, char **argv, char **envp);</programlisting></para>
+<para>RedBoot will place the appropriate data at the offset specified by the
+<parameter>-b</parameter> parameter, or by default at address 0x80080000, and will set the
+arguments accordingly when calling into the kernel.</para>
+<para>
+The default entry point, if no image with explicit entry point has been loaded and
+none is specified, is 0x80000750.
+</para>
+</sect2>
+
+<sect2>
+<title>Interrupts</title>
+<para>RedBoot uses an interrupt vector table which is located at address 0x80000200.
+Entries in this table are pointers to functions with this protoype: <programlisting>
+int irq_handler( unsigned vector, unsigned data )</programlisting>On the malta
+board, the vector argument is one of 22 interrupts defined in <computeroutput>
+hal/mips/malta/<replaceable>VERSION</replaceable>/include/plf_intr.h</computeroutput>: <programlisting>
+
+#define CYGNUM_HAL_INTERRUPT_SOUTH_BRIDGE_INTR 0
+#define CYGNUM_HAL_INTERRUPT_SOUTH_BRIDGE_SMI 1
+#define CYGNUM_HAL_INTERRUPT_CBUS_UART 2
+#define CYGNUM_HAL_INTERRUPT_COREHI 3
+#define CYGNUM_HAL_INTERRUPT_CORELO 4
+#define CYGNUM_HAL_INTERRUPT_COMPARE 5
+#define CYGNUM_HAL_INTERRUPT_TIMER 6
+#define CYGNUM_HAL_INTERRUPT_KEYBOARD 7
+#define CYGNUM_HAL_INTERRUPT_CASCADE 8
+#define CYGNUM_HAL_INTERRUPT_TTY1 9
+#define CYGNUM_HAL_INTERRUPT_TTY0 10
+#define CYGNUM_HAL_INTERRUPT_11 11
+#define CYGNUM_HAL_INTERRUPT_FLOPPY 12
+#define CYGNUM_HAL_INTERRUPT_PARALLEL 13
+#define CYGNUM_HAL_INTERRUPT_REAL_TIME_CLOCK 14
+#define CYGNUM_HAL_INTERRUPT_I2C 15
+#define CYGNUM_HAL_INTERRUPT_PCI_AB 16
+#define CYGNUM_HAL_INTERRUPT_PCI_CD 17
+#define CYGNUM_HAL_INTERRUPT_MOUSE 18
+#define CYGNUM_HAL_INTERRUPT_19 19
+#define CYGNUM_HAL_INTERRUPT_IDE_PRIMARY 20
+#define CYGNUM_HAL_INTERRUPT_IDE_SECONDARY 21</programlisting>The data
+passed to the ISR is pulled from a data table (<computeroutput>hal_interrupt_data
+</computeroutput>) which immediately follows the interrupt vector table. With
+22 interrupts, the data table starts at address 0x80000258.</para>
+<para>An application may create a normal C function with the above prototype
+to be an ISR. Just poke its address into the table at the correct index and
+enable the interrupt at its source. The return value of the ISR is ignored
+by RedBoot. </para>
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>Memory Maps RedBoot sets up the following memory map on the Malta board.<note>
+<title>NOTE</title>
+<para>The virtual memory maps in this section use a C and B column to indicate
+whether or not the region is cached (C) or buffered (B).</para>
+</note><programlisting>Physical Address Range C B Description
+----------------------- - - -----------
+0x80000000 - 0x81ffffff Y Y SDRAM
+0x9e000000 - 0x9e3fffff Y N System flash (cached)
+0x9fc00000 - 0x9fffffff Y N System flash (mirrored)
+0xa8000000 - 0xb7ffffff N N PCI Memory Space
+0xb4000000 - 0xb40fffff N N Galileo System Controller
+0xb8000000 - 0xb80fffff N N Southbridge / ISA
+0xb8100000 - 0xbbdfffff N N PCI I/O Space
+0xbe000000 - 0xbe3fffff N N System flash (noncached)
+0xbf000000 - 0xbfffffff N N Board logic FPGA</programlisting></para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=malta_mips32_4kc
+export ARCH_DIR=mips
+export PLATFORM_DIR=malta
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2></sect1>
+<?Pub _newpage>
+<sect1 id="ocelot">
+<title>MIPS/RM7000 PMC-Sierra Ocelot</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>PMC-Sierra MIPS RM7000 Ocelot</primary><secondary>installing
+and testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>PMC-Sierra MIPS RM7000 Ocelot</secondary></indexterm>RedBoot
+uses the front facing serial port. The default serial port settings are 38400,8,N,1.
+RedBoot also supports ethernet. Management of onboard flash is also supported.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+</sect2>
+
+<sect2>
+<title>Additional commands</title>
+<para>The <command>exec</command> command which allows the
+loading and execution of Linux kernels, is supported for this architecture
+ (see <xref linkend="executing-programs">). The
+<command>exec</command> parameters used for MIPS boards are:</para>
+<variablelist><varlistentry>
+<term>-b <replaceable>&lt;addr></replaceable></term>
+<listitem><para>Location to store command line and environment passed to kernel</para></listitem></varlistentry>
+<varlistentry><term>
+-w <replaceable>&lt;time></replaceable></term>
+<listitem><para>Wait time in seconds before starting kernel</para></listitem></varlistentry>
+<varlistentry><term>
+-c <replaceable>"params"</replaceable></term>
+<listitem><para>Parameters passed to kernel</para></listitem></varlistentry>
+<varlistentry><term><replaceable>&lt;addr></replaceable></term>
+<listitem><para>Kernel entry point, defaulting to the entry point of the last image
+loaded</para></listitem></varlistentry>
+</variablelist>
+<para>Linux kernels on MIPS platforms expect the entry point to be called with arguments
+in the registers equivalent to a C call with prototype:
+<programlisting>void Linux(int argc, char **argv, char **envp);</programlisting></para>
+<para>RedBoot will place the appropriate data at the offset specified by the
+<parameter>-b</parameter> parameter, or by default at address 0x80080000, and will set the
+arguments accordingly when calling into the kernel.</para>
+<para>
+The default entry point, if no image with explicit entry point has been loaded and
+none is specified, is 0x80000750.
+</para>
+</sect2>
+
+<sect2>
+<title>Memory Maps </title>
+<para>RedBoot sets up the following memory map on the Ocelot board. </para>
+<para>Note that these addresses are accessed through kseg0/1 and thus translate
+to the actual address range 0x80000000-0xbfffffff, depending on the need for
+caching/non-caching access to the bus.<note><title>NOTE</title>
+<para>The virtual memory maps in this section use a C and B column to indicate
+whether or not the region is cached (C) or buffered (B).</para>
+</note><programlisting>Physical Address Range Description
+----------------------- -----------
+0x00000000 - 0x0fffffff SDRAM
+0x10000000 - 0x10ffffff PCI I/O space
+0x12000000 - 0x13ffffff PCI Memory space
+0x14000000 - 0x1400ffff Galileo system controller
+0x1c000000 - 0x1c0000ff PLD (board logic)
+0x1fc00000 - 0x1fc7ffff flash</programlisting></para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=ocelot
+export ARCH_DIR=mips
+export PLATFORM_DIR=rm7000/ocelot
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2></sect1>
+
+
+<?Pub _newpage>
+<sect1 id="vrc4375">
+<title>MIPS/VR4375 NEC DDB-VRC4375</title>
+<sect2>
+<title>Overview</title>
+
+<para><indexterm><primary>NEC DDB-VRC4375</primary>
+<secondary>installing and testing</secondary></indexterm><indexterm><primary>
+installing and testing</primary><secondary>NEC DDB-VRC4375
+</secondary></indexterm>RedBoot supports only serial port 1, which is connected to the upper
+of the stacked serial connectors on the board. The default serial
+port settings are 38400,8,N,1. FLASH management is also supported.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROMRAM</entry>
+ <entry>[ROMRAM]</entry>
+ <entry>RedBoot running from RAM, but contained in the
+ board's flash boot sector.</entry>
+ <entry>redboot_ROMRAM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+
+<sect2>
+<title>Initial Installation Method </title>
+
+<para>A device programmer should be used to program a socketed FLASH part
+(AMD 29F040). The board as delivered is configured for a 512K
+EPROM. To install a FLASH ROM, Jumpers J30, J31 and J36 need to be
+changed as described in the board's User Manual.</para>
+</sect2>
+
+<sect2>
+<title>Special RedBoot Commands</title>
+
+<para>None.</para>
+</sect2>
+
+<sect2>
+<title>Memory Maps</title>
+
+<para>RedBoot sets up the memory map primarily as described in the board's
+User Manual. There are some minor differences, noted in the following
+table:
+<screen>
+Physical Virtual Resource
+Addresses Addresses
+00000000-01FFFFFF 80000000-81FFFFFF Base SDRAM (cached)
+00000000-01FFFFFF A0000000-A1FFFFFF Base SDRAM (uncached)
+0C000000-0C0BFFFF AC000000-AC0B0000 PCI IO space
+0F000000-0F0001FF AF000000-AF0001FF VRC4375 Registers
+1C000000-1C0FFFFF BC000000-BC0FFFFF VRC4372 Registers
+1C100000-1DFFFFFF BC100000-BDFFFFFF PCI Memory space
+1FC00000-1FC7FFFF BFC00000-BFC7FFFF FLASH ROM
+80000000-8000000D C0000000-C000000D RTC
+8000000E-80007FFF C000000E-C0007FFF NVRAM
+81000000-81FFFFFF C1000000-C1FFFFFF Z85C30 DUART
+82000000-82FFFFFF C2000000-C2FFFFFF Z8536 Timer
+83000000-83FFFFFF C3000000-C3FFFFFF 8255 Parallel port
+87000000-87FFFFFF C7000000-C7FFFFFF Seven segment display</screen>
+</para>
+
+<note> <title>NOTE</title>
+<para>
+By default the VRC4375 SIMM control registers are not programmed
+since the values used must depend on the SIMMs installed. If SIMMs
+are to be used, correct values must be placed in these registers
+before accessing the SIMM address range.
+</para>
+</note>
+
+<note> <title>NOTE</title>
+<para>
+The allocation of address ranges to devices in the PCI IO and
+memory spaces is handled by the eCos PCI support library. They do
+not correspond to those described in the board User Manual.
+</para>
+</note>
+
+<note> <title>NOTE</title>
+<para>
+The MMU has been set up to relocate the VRC4372 supported devices
+mapped at physical addresses 0x8xxxxxxx to virtual addresses
+0xCxxxxxxx.
+</para>
+</note>
+
+</sect2>
+
+<sect2>
+<title>Ethernet Driver</title>
+
+<para>
+The ethernet driver is in two parts:
+</para>
+
+<para>
+A generic ether driver for the Intel i21143 device is located in
+<filename class="directory">devs/eth/intel/i21143</filename>. Its package name is <computeroutput>CYGPKG_DEVS_ETH_INTEL_I21143</computeroutput>.
+</para>
+
+<para>
+The platform-specific ether driver is <filename
+class="directory">devs/eth/mips/vrc4375</filename>. Its package is
+<computeroutput>CYGPKG_DEVS_ETH_MIPS_VRC4375</computeroutput>. This
+tells the generic driver the address in IO memory of the chip, for
+example, and other configuration details. The ESA (MAC address) is by
+default collected from on-board serial EEPROM, unless configured
+statically within this package.
+</para>
+</sect2>
+
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=vrc4373
+export ARCH_DIR=mips
+export PLATFORM_DIR=vrc4373
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+<!-- ************************** PowerPC ********************** -->
+
+<?Pub _newpage>
+<sect1 id="viper">
+<title>PowerPC/MPC860T Analogue & Micro PowerPC 860T</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Analogue & Micro PowerPC 860T</primary><secondary>installing
+and testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Analogue & Micro PowerPC 860T</secondary></indexterm>RedBoot uses
+the SMC1 serial port. The default serial port settings are 38400,8,N,1.
+Ethernet is also supported using the RJ-45 connector. Management of
+onboard flash is also supported.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROMRAM</entry>
+ <entry>[ROMRAM]</entry>
+ <entry>RedBoot running from RAM, but contained in the
+ board's flash boot sector.</entry>
+ <entry>redboot_ROMRAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation Method </title>
+<para>RedBoot must be installed at the A & M factory.
+</para>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>None.</para>
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>Memory Maps RedBoot sets up the following memory map on the MBX board.<programlisting>
+Physical Address Range Description
+----------------------- -----------
+0x00000000 - 0x007fffff DRAM
+0xfe000000 - 0xfe0fffff flash (AMD29LV8008B)
+0xff000000 - 0xff0fffff MPC registers</programlisting></para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=viper
+export ARCH_DIR=powerpc
+export PLATFORM_DIR=viper
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="mbx">
+<title>PowerPC/MPC8XX Motorola MBX</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Motorola PowerPC MBX</primary><secondary>installing
+and testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Motorola PowerPC MBX</secondary></indexterm>RedBoot uses
+the SMC1/COM1 serial port. The default serial port settings are 38400,8,N,1.
+Ethernet is also supported using the 10-base T connector. </para>
+<para>Management of onboard flash is also supported.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation Method </title>
+<para>Device programmer is used to program the XU1 socketed flash part (AM29F040B)
+with the ROM mode image of RedBoot. Use the on-board EPPC-Bug monitor to update
+RedBoot. </para>
+<para>This assumes that you have EPPC-Bug in the on-board flash. This can
+be determined by setting up the board according to the following instructions
+and powering up the board. </para>
+<para>The EPPC-Bug prompt should appear on the SMC1 connector at 9600 baud,
+8N1. </para>
+<orderedlist>
+<listitem><para>Set jumper 3 to 2-3 [allow XU1 flash to be programmed] </para>
+</listitem>
+<listitem><para>Set jumper 4 to 2-3 [boot EPPC-Bug] </para>
+</listitem>
+</orderedlist>
+<para>If it is available, program the flash by following these steps: </para>
+<orderedlist>
+<listitem><para>Prepare EPPC-Bug for download: <screen>EPPC-Bug><userinput>lo 0</userinput>
+</screen>At this point the monitor is ready for input. It will not
+return the prompt until the file has been downloaded. </para>
+</listitem>
+<listitem><para>Use the terminal emulator's ASCII download feature (or a simple
+clipboard copy/paste operation) to download the
+<filename>redboot.ppcbug</filename> file.</para>
+<para>Note that on Linux, <application>Minicom</application>'s ASCII
+download feature seems to be broken. A workaround is to load the file
+into <application>emacs</application> (or another editor) and copy the
+full contents to the clipboard. Then press the mouse paste-button (usually
+the middle one) over the <application>Minicom</application> window. </para>
+</listitem>
+<listitem><para>Program the flash with the downloaded data: <screen>
+EPPC-Bug><userinput>pflash 40000 60000 fc000000</userinput></screen></para>
+</listitem>
+<listitem><para>Switch off the power, and change jumper 4 to 1-2. Turn on
+the power again. The board should now boot using the newly programmed RedBoot.
+</para>
+</listitem>
+</orderedlist>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>None.</para>
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>Memory Maps RedBoot sets up the following memory map on the MBX board.<programlisting>
+Physical Address Range Description
+----------------------- -----------
+0x00000000 - 0x003fffff DRAM
+0xfa100000 - 0xfa100003 LEDs
+0xfe000000 - 0xfe07ffff flash (AMD29F040B)
+0xff000000 - 0xff0fffff MPC registers</programlisting></para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=mbx
+export ARCH_DIR=powerpc
+export PLATFORM_DIR=mbx
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+
+
+
+<!-- ********************** SuperH ************************ -->
+
+
+
+<?Pub _newpage>
+<sect1 id="edk7708">
+<title>SuperH/SH3(SH7708) Hitachi EDK7708</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Hitachi SH EDK7708</primary><secondary>installing
+and testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Hitachi SH EDK7708</secondary></indexterm>RedBoot uses
+the serial port. The default serial port settings are 38400,8,N,1.</para>
+<para>Management of onboard flash is also supported.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation Method </title>
+<para>Program the ROM RedBoot image into flash using an eprom programmer.</para>
+
+</sect2>
+
+<sect2>
+<title>Memory Maps </title>
+<para>RedBoot sets up the following memory map on the EDK7708 board.<programlisting>
+Physical Address Range Description
+----------------------- -----------
+0x80000000 - 0x8001ffff Flash (AT29LV1024)
+0x88000000 - 0x881fffff DRAM
+0xa4000000 - 0xa40000ff LED ON
+0xb8000000 - 0xb80000ff LED ON
+</programlisting></para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=edk7708
+export ARCH_DIR=sh
+export PLATFORM_DIR=edk7708
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="se7709">
+<title>SuperH/SH3(SH7709) Hitachi Solution Engine 7709</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Hitachi SH SE7709</primary><secondary>installing
+and testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Hitachi SH SE7709</secondary></indexterm>This
+description covers the MS7709SE01 variant. See <xref linkend="se77x9">
+for instructions for the MS7729SE01 and MS7709SSE0101 variants.</para>
+
+<para>RedBoot uses
+the COM1 and COM2 serial ports. The default serial port settings are 38400,8,N,1.
+Ethernet is also supported using the 10-base T connector. </para>
+<para>Management of onboard flash is also supported.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation Method </title>
+<para>The Solution Engine ships with the Hitachi boot monitor in EPROM
+which allows for initial programming of RedBoot:</para>
+
+<orderedlist>
+<listitem><para>Set switch SW4-1 to ON [boot from EPROM]</para>
+</listitem>
+<listitem><para>Connect a serial cable to CN1 (SCI) and power up the board.</para>
+</listitem>
+<listitem><para>After the boot monitor banner, invoke the flash
+download/program command:<screen>Ready &gt;<userinput>fl</userinput></screen></para>
+</listitem>
+<listitem><para>The monitor should now ask for input:
+<screen>Flash ROM data copy to RAM
+Please Send A S-format Record</screen>At this point copy the
+RedBoot ROM SREC file to the serial port:<screen>
+$ <userinput>cat redboot_SE7709RP_ROM.eprom.srec &gt /dev/ttyS0</userinput></screen>
+Eventually you
+should see something like<screen>Start Addrs = A1000000
+End Addrs = A1xxxxxx
+Transfer complete</screen> from the monitor.
+</para></listitem>
+<listitem><para>Set switch SW4-1 to OFF [boot from flash] and reboot the board. You
+should now see the RedBoot banner.</para>
+</listitem>
+</orderedlist>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>The <command>exec</command> command which allows the loading
+and execution of Linux kernels
+is supported for this board (see <xref linkend="executing-programs">). The <command>
+exec</command> parameters used for the SE77x9 are:</para>
+<variablelist>
+<varlistentry>
+<term>-b <replaceable>&lt;addr></replaceable></term>
+<listitem><para>Parameter block address. This is normally the first
+page of the kernel image and defaults to 0x8c101000</para></listitem></varlistentry>
+
+<varlistentry><term>-i <replaceable>&lt;addr></replaceable></term>
+<listitem><para>Start address of initrd
+image</para></listitem></varlistentry>
+
+<varlistentry><term>-j <replaceable>&lt;size></replaceable></term>
+<listitem><para>Size of initrd image</para></listitem></varlistentry>
+
+<varlistentry><term>-c <replaceable>"args"</replaceable></term>
+<listitem><para>Kernel arguments string</para></listitem></varlistentry>
+
+<varlistentry><term>
+-m <replaceable>&lt;flags></replaceable></term>
+<listitem><para>Mount rdonly flags. If set to a non-zero value the
+root partition will be mounted read-only.</para></listitem></varlistentry>
+
+<varlistentry><term>
+-f <replaceable>&lt;flags></replaceable></term>
+<listitem><para>RAM disk flags. Should normally be 0x4000</para></listitem></varlistentry>
+
+<varlistentry><term>-r <replaceable>&lt;device number></replaceable></term>
+<listitem><para>Root device specification. /dev/ram is 0x0101</para></listitem></varlistentry>
+
+<varlistentry><term>-l <replaceable>&lt;type></replaceable></term>
+<listitem><para>Loader type</para></listitem></varlistentry>
+
+</variablelist>
+
+<para>Finally the kernel entry address can be specified as an optional
+argument. The default is 0x8c102000</para>
+
+<para>
+For the the SE77x9, Linux by default expects to be loaded at
+0x8c001000 which conflicts with the data space used by RedBoot.
+To work around this, either change the CONFIG_MEMORY_START kernel
+option to a higher address, or use the compressed kernel image and load
+it at a higher address. For example, setting CONFIG_MEMORY_START to
+0x8c100000, the kernel expects to be loaded at address 0x8c101000 with
+the entry point at 0x8c102000.
+</para>
+
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>RedBoot sets up the following memory map on the SE77x9 board.<programlisting>
+Physical Address Range Description
+----------------------- -----------
+0x80000000 - 0x803fffff Flash (MBM29LV160)
+0x81000000 - 0x813fffff EPROM (M27C800)
+0x8c000000 - 0x8dffffff DRAM
+0xb0000000 - 0xb03fffff Ethernet (DP83902A)
+0xb0800000 - 0xb08fffff 16C552A
+0xb1000000 - 0xb100ffff Switches
+0xb1800000 - 0xb18fffff LEDs
+0xb8000000 - 0xbbffffff PCMCIA (MaruBun)
+</programlisting></para>
+</sect2>
+<sect2>
+<title>Ethernet Driver</title>
+<para>The ethernet driver uses a hardwired ESA which can, at present,
+only be changed in CDL.</para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=se77x9
+export ARCH_DIR=sh
+export PLATFORM_DIR=se77x9
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="hs7729pci">
+<title>SuperH/SH3(SH7729) Hitachi HS7729PCI</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Hitachi SH HS7729PCI</primary><secondary>installing
+and testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Hitachi SH HS7729PCI</secondary></indexterm>RedBoot uses
+the COM1 and COM2 serial ports (and the debug port on the
+motherboard).
+The default serial port settings are 38400,8,N,1.
+Ethernet is also supported using a D-Link DFE-530TX PCI plugin
+card. Management of onboard flash is also supported. </para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+
+</sect2>
+<sect2>
+<title>Initial Installation Method </title>
+<para>A ROM mode RedBoot image must be programmed
+into the two EPROMs. Two files with a split version of the ROM mode
+image is
+provided: it is also possible to recreate these from the
+<filename>redboot.bin</filename>
+file, but requires the <application>split_word.c</application> program in
+<filename
+class="directory">hal/sh/hs7729pci/<replaceable>VERSION</replaceable>/misc</filename>
+to be built and executed with the <filename>redboot.bin</filename>
+filename as sole argument.</para>
+
+<para>After doing this it is advised that another ROM mode image of
+RedBoot is programmed into the on-board flash, and that copy be used
+for booting the board. This allows for software programmed updates of
+RedBoot instead of having to reprogram the EPROMs.</para>
+
+<orderedlist>
+<listitem><para>Program the EPROMs with RedBoot. The .lo image should
+go in socket M1 and the .hi image in socket M2.
+</para>
+</listitem>
+<listitem><para>Set switch SW1-6 to ON [boot from EPROM]</para>
+</listitem>
+<listitem><para>Follow the instructions under Flash management for
+updating the flash copy of RedBoot, but force the flash destination
+address with
+<screen><userinput>-f 0x80400000</userinput></screen> due to setting of
+the SW1-6 switch.</para>
+</listitem>
+<listitem><para>Set switch SW1-6 to OFF [boot from flash] and reboot the board. You
+should now see the RedBoot banner. At this time you may want to issue
+the command <command>fis init</command> to initialize
+the flash table with the correct addresses.</para>
+</listitem>
+</orderedlist>
+
+
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>The <command>exec</command> command which allows the loading
+and execution of Linux kernels
+is supported for this board (see <xref linkend="executing-programs">). The <command>
+exec</command> parameters used for the HS7729PCI are:</para>
+<variablelist>
+<varlistentry>
+<term>-b <replaceable>&lt;addr></replaceable></term>
+<listitem><para>Parameter block address. This is normally the first
+page of the kernel image and defaults to 0x8c101000</para></listitem></varlistentry>
+
+<varlistentry><term>-i <replaceable>&lt;addr></replaceable></term>
+<listitem><para>Start address of initrd
+image</para></listitem></varlistentry>
+
+<varlistentry><term>-j <replaceable>&lt;size></replaceable></term>
+<listitem><para>Size of initrd image</para></listitem></varlistentry>
+
+<varlistentry><term>-c <replaceable>"args"</replaceable></term>
+<listitem><para>Kernel arguments string</para></listitem></varlistentry>
+
+<varlistentry><term>
+-m <replaceable>&lt;flags></replaceable></term>
+<listitem><para>Mount rdonly flags. If set to a non-zero value the
+root partition will be mounted read-only.</para></listitem></varlistentry>
+
+<varlistentry><term>
+-f <replaceable>&lt;flags></replaceable></term>
+<listitem><para>RAM disk flags. Should normally be 0x4000</para></listitem></varlistentry>
+
+<varlistentry><term>-r <replaceable>&lt;device number></replaceable></term>
+<listitem><para>Root device specification. /dev/ram is 0x0101</para></listitem></varlistentry>
+
+<varlistentry><term>-l <replaceable>&lt;type></replaceable></term>
+<listitem><para>Loader type</para></listitem></varlistentry>
+
+</variablelist>
+
+<para>Finally the kernel entry address can be specified as an optional
+argument. The default is 0x8c102000</para>
+
+<para>
+On the HS7729PCI, Linux expects to be loaded at address 0x8c101000 with
+the entry point at 0x8c102000. This is configurable in the kernel
+using the CONFIG_MEMORY_START option.
+</para>
+
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>RedBoot sets up the following memory map on the HS7729PCI board.<programlisting>
+Physical Address Range Description
+----------------------- -----------
+0x80000000 - 0x803fffff Flash (MBM29LV160)
+0x80400000 - 0x807fffff EPROM (M27C800)
+0x82000000 - 0x82ffffff SRAM
+0x89000000 - 0x89ffffff SRAM
+0x8c000000 - 0x8fffffff SDRAM
+0xa8000000 - 0xa800ffff SuperIO (FDC37C935A)
+0xa8400000 - 0xa87fffff USB function (ML60851C)
+0xa8800000 - 0xa8bfffff USB host (SL11HT)
+0xa8c00000 - 0xa8c3ffff Switches
+0xa8c40000 - 0xa8c7ffff LEDs
+0xa8c80000 - 0xa8cfffff Interrupt controller
+0xb0000000 - 0xb3ffffff PCI (SD0001)
+0xb8000000 - 0xbbffffff PCMCIA (MaruBun)
+</programlisting></para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=hs7729pci
+export ARCH_DIR=sh
+export PLATFORM_DIR=hs7729pci
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="se77x9">
+<title>SuperH/SH3(SH77X9) Hitachi Solution Engine 77X9</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Hitachi SH SE77X9</primary><secondary>installing
+and testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Hitachi SH SE77X9</secondary></indexterm>This
+description covers the MS7729SE01 and MS7709SSE0101 variants. See <xref linkend="se7709">
+for instructions for the MS7709SE01 variant.</para>
+
+<para>RedBoot uses
+the COM1 and COM2 serial ports. The default serial port settings are 38400,8,N,1.
+Ethernet is also supported using the 10-base T connector. Management
+of onboard flash is also supported.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation Method </title>
+<para>The Solution Engine ships with the Hitachi boot monitor in EPROM
+which allows for initial programming of RedBoot:</para>
+
+<orderedlist>
+<listitem><para>Set switches SW4-3 and SW4-4 to ON [boot from EPROM]</para>
+</listitem>
+<listitem><para>Connect a serial cable to COM2 and power up the board.</para>
+</listitem>
+<listitem><para>After the boot monitor banner, invoke the flash
+download/program command:<screen>Ready &gt;<userinput>fl</userinput></screen></para>
+</listitem>
+<listitem><para>The monitor should now ask for input:
+<screen>Flash ROM data copy to RAM
+Please Send A S-format Record</screen>At this point copy the
+RedBoot ROM SREC file to the serial port:<screen>
+$ <userinput>cat redboot_ROM.eprom.srec &gt /dev/ttyS0</userinput></screen>
+Eventually you
+should see something like<screen>Start Addrs = A1000000
+End Addrs = A1xxxxxx
+Transfer complete</screen> from the monitor.
+</para></listitem>
+<listitem><para>Set switch SW4-3 to OFF [boot from flash] and reboot the board. You
+should now see the RedBoot banner.</para>
+</listitem>
+</orderedlist>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>The <command>exec</command> command which allows the loading
+and execution of Linux kernels
+is supported for this board (see <xref linkend="executing-programs">). The <command>
+exec</command> parameters used for the SE77x9 are:</para>
+<variablelist>
+<varlistentry>
+<term>-b <replaceable>&lt;addr></replaceable></term>
+<listitem><para>Parameter block address. This is normally the first
+page of the kernel image and defaults to 0x8c101000</para></listitem></varlistentry>
+
+<varlistentry><term>-i <replaceable>&lt;addr></replaceable></term>
+<listitem><para>Start address of initrd
+image</para></listitem></varlistentry>
+
+<varlistentry><term>-j <replaceable>&lt;size></replaceable></term>
+<listitem><para>Size of initrd image</para></listitem></varlistentry>
+
+<varlistentry><term>-c <replaceable>"args"</replaceable></term>
+<listitem><para>Kernel arguments string</para></listitem></varlistentry>
+
+<varlistentry><term>
+-m <replaceable>&lt;flags></replaceable></term>
+<listitem><para>Mount rdonly flags. If set to a non-zero value the
+root partition will be mounted read-only.</para></listitem></varlistentry>
+
+<varlistentry><term>
+-f <replaceable>&lt;flags></replaceable></term>
+<listitem><para>RAM disk flags. Should normally be 0x4000</para></listitem></varlistentry>
+
+<varlistentry><term>-r <replaceable>&lt;device number></replaceable></term>
+<listitem><para>Root device specification. /dev/ram is 0x0101</para></listitem></varlistentry>
+
+<varlistentry><term>-l <replaceable>&lt;type></replaceable></term>
+<listitem><para>Loader type</para></listitem></varlistentry>
+
+</variablelist>
+
+<para>Finally the kernel entry address can be specified as an optional
+argument. The default is 0x8c102000</para>
+
+<para>
+On the SE77x9, Linux expects to be loaded at address 0x8c101000 with
+the entry point at 0x8c102000. This is configurable in the kernel
+using the CONFIG_MEMORY_START option.
+</para>
+
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>RedBoot sets up the following memory map on the SE77x9 board.<programlisting>
+Physical Address Range Description
+----------------------- -----------
+0x80000000 - 0x803fffff Flash (MBM29LV160)
+0x81000000 - 0x813fffff EPROM (M27C800)
+0x8c000000 - 0x8dffffff SDRAM
+0xb0000000 - 0xb03fffff Ethernet (DP83902A)
+0xb0400000 - 0xb07fffff SuperIO (FDC37C935A)
+0xb0800000 - 0xb0bfffff Switches
+0xb0c00000 - 0xbfffffff LEDs
+0xb1800000 - 0xb1bfffff PCMCIA (MaruBun)
+</programlisting></para>
+</sect2>
+<sect2>
+<title>Ethernet Driver</title>
+<para>The ethernet driver uses a hardwired ESA which can, at present,
+only be changed in CDL.</para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=se77x9
+export ARCH_DIR=sh
+export PLATFORM_DIR=se77x9
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+</sect2>
+</sect1>
+
+<?Pub _newpage>
+<sect1 id="se7751">
+<title>SuperH/SH4(SH7751) Hitachi Solution Engine 7751</title>
+<sect2>
+<title>Overview</title>
+<para><indexterm><primary>Hitachi SH SE7751</primary><secondary>installing
+and testing</secondary></indexterm><indexterm><primary>installing and testing
+</primary><secondary>Hitachi SH SE7751</secondary></indexterm>RedBoot uses
+the COM1 serial port. The default serial port settings are 38400,8,N,1.
+Ethernet is also supported using the 10-base T connector. Management
+of onboard flash is also supported.</para>
+
+<para>The following RedBoot configurations are supported:
+
+ <informaltable frame="all">
+ <tgroup cols="4" colsep="1" rowsep="1" align="left">
+ <thead>
+ <row>
+ <entry>Configuration</entry>
+ <entry>Mode</entry>
+ <entry>Description</entry>
+ <entry>File</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ROM</entry>
+ <entry>[ROM]</entry>
+ <entry>RedBoot running from the board's flash boot
+ sector.</entry>
+ <entry>redboot_ROM.ecm</entry>
+ </row>
+ <row>
+ <entry>RAM</entry>
+ <entry>[RAM]</entry>
+ <entry>RedBoot running from RAM with RedBoot in the
+ flash boot sector.</entry>
+ <entry>redboot_RAM.ecm</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</para>
+
+</sect2>
+<sect2>
+<title>Initial Installation Method </title>
+<para>The Solution Engine ships with the Hitachi boot monitor in EPROM
+which allows for initial programming of RedBoot:</para>
+
+<orderedlist>
+<listitem><para>Set switches SW5-3 and SW5-4 to ON [boot from EPROM]</para>
+</listitem>
+<listitem><para>Connect a serial cable to COM1 and power up the board.</para>
+</listitem>
+<listitem><para>After the boot monitor banner, invoke the flash
+download/program command:<screen>Ready &gt;<userinput>fl</userinput></screen></para>
+</listitem>
+<listitem><para>The monitor should now ask for input:
+<screen>Flash ROM data copy to RAM
+Please Send A S-format Record</screen>At this point copy the
+RedBoot ROM SREC file to the serial port:<screen>
+$ <userinput>cat redboot_ROM.eprom.srec &gt /dev/ttyS0</userinput></screen>
+Eventually you
+should see something like<screen>Start Addrs = A1000000
+End Addrs = A1xxxxxx
+Transfer complete</screen> from the monitor.
+</para></listitem>
+<listitem><para>Set switch SW5-3 to OFF [boot from flash] and reboot the board. You
+should now see the RedBoot banner.</para>
+</listitem>
+</orderedlist>
+</sect2>
+<sect2>
+<title>Special RedBoot Commands </title>
+<para>The <command>exec</command> command which allows the loading
+and execution of Linux kernels
+is supported for this board (see <xref linkend="executing-programs">). The <command>
+exec</command> parameters used for the SE7751 are:</para>
+<variablelist>
+<varlistentry>
+<term>-b <replaceable>&lt;addr></replaceable></term>
+<listitem><para>Parameter block address. This is normally the first
+page of the kernel image and defaults to 0x8c101000</para></listitem></varlistentry>
+
+<varlistentry><term>-i <replaceable>&lt;addr></replaceable></term>
+<listitem><para>Start address of initrd
+image</para></listitem></varlistentry>
+
+<varlistentry><term>-j <replaceable>&lt;size></replaceable></term>
+<listitem><para>Size of initrd image</para></listitem></varlistentry>
+
+<varlistentry><term>-c <replaceable>"args"</replaceable></term>
+<listitem><para>Kernel arguments string</para></listitem></varlistentry>
+
+<varlistentry><term>
+-m <replaceable>&lt;flags></replaceable></term>
+<listitem><para>Mount rdonly flags. If set to a non-zero value the
+root partition will be mounted read-only.</para></listitem></varlistentry>
+
+<varlistentry><term>
+-f <replaceable>&lt;flags></replaceable></term>
+<listitem><para>RAM disk flags. Should normally be 0x4000</para></listitem></varlistentry>
+
+<varlistentry><term>-r <replaceable>&lt;device number></replaceable></term>
+<listitem><para>Root device specification. /dev/ram is 0x0101</para></listitem></varlistentry>
+
+<varlistentry><term>-l <replaceable>&lt;type></replaceable></term>
+<listitem><para>Loader type</para></listitem></varlistentry>
+
+</variablelist>
+
+<para>Finally the kernel entry address can be specified as an optional
+argument. The default is 0x8c102000</para>
+
+<para>
+On the SE7751, Linux expects to be loaded at address 0x8c101000 with
+the entry point at 0x8c102000. This is configurable in the kernel
+using the CONFIG_MEMORY_START option.
+</para>
+
+</sect2>
+<sect2>
+<title>Memory Maps </title>
+<para>RedBoot sets up the following memory map on the SE7751 board.<programlisting>
+Physical Address Range Description
+----------------------- -----------
+0x80000000 - 0x803fffff Flash (MBM29LV160)
+0x81000000 - 0x813fffff EPROM (M27C800)
+0x8c000000 - 0x8fffffff SDRAM
+0xb8000000 - 0xb8ffffff PCMCIA (MaruBun)
+0xb9000000 - 0xb9ffffff Switches
+0xba000000 - 0xbaffffff LEDs
+0xbd000000 - 0xbdffffff PCI MEM space
+0xbe200000 - 0xbe23ffff PCI Ctrl space
+0xbe240000 - 0xbe27ffff PCI IO space
+</programlisting></para>
+</sect2>
+<sect2>
+<title>Ethernet Driver</title>
+<para>The ethernet driver uses a hardwired ESA which can, at present,
+only be changed in CDL.</para>
+</sect2>
+<sect2>
+<title>Rebuilding RedBoot</title>
+
+<para>These shell variables provide the platform-specific information
+needed for building RedBoot according to the procedure described in
+<xref linkend="Rebuilding-Redboot">:
+<programlisting>
+export TARGET=se7751
+export ARCH_DIR=sh
+export PLATFORM_DIR=se7751
+</programlisting>
+</para>
+
+<para>The names of configuration files are listed above with the
+description of the associated modes.</para>
+</sect2>
+</sect1>
+
+</chapter>
diff --git a/cesar/ecos/packages/redboot/current/doc/redboot_main.sgml b/cesar/ecos/packages/redboot/current/doc/redboot_main.sgml
new file mode 100644
index 0000000000..06080194fc
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/doc/redboot_main.sgml
@@ -0,0 +1,119 @@
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
+
+<!-- Begin Document Specific Declarations -->
+<!ENTITY ui "&micro;ITRON">
+<!ENTITY versiondir CDATA "v2_0">
+<!ENTITY version CDATA "2.0">
+<!ENTITY lt SDATA "[lt ]">
+<!ENTITY redboot-sgml SYSTEM "redboot.sgml">
+<!ENTITY redboot-cmds-sgml SYSTEM "redboot_cmds.sgml">
+<!ENTITY redboot-rebuilding-sgml SYSTEM "redboot_rebuilding.sgml">
+<!ENTITY redboot-installing-sgml SYSTEM "redboot_installing.sgml">
+<!-- End Document Specific Declarations -->
+]>
+
+<BOOK ID="REDBOOT-GUIDE">
+ <bookinfo>
+ <TITLE>RedBoot User's Guide</TITLE>
+
+ <copyright>
+ <year>1998</year>
+ <year>1999</year>
+ <year>2000</year>
+ <year>2001</year>
+ <year>2002</year>
+ <year>2003</year>
+ <year>2004</year>
+ <holder>Red Hat, Inc.</holder>
+ <holder>John Dallaway (eCosCentric)</holder>
+ <holder>Nick Garnett (eCosCentric)</holder>
+ <holder>Jonathan Larmour (eCosCentric)</holder>
+ <holder>Andrew Lunn (Ascom)</holder>
+ <holder>Gary Thomas (MLB Associates)</holder>
+ <holder>Bart Veer (eCosCentric)</holder>
+ </copyright>
+
+ <legalnotice>
+ <title>Documentation licensing terms</title>
+<para>This material may be distributed only subject to the terms
+and conditions set forth in the Open Publication License, v1.0
+or later (the latest version is presently available at
+<ulink url="http://www.opencontent.org/openpub/">http://www.opencontent.org/openpub/</ulink>).
+</para>
+<para>
+Distribution of substantively modified versions of this
+document is prohibited without the explicit permission of the
+copyright holder.</para>
+<para>
+Distribution of the work or derivative of the work in any
+standard (paper) book form is prohibited unless prior
+permission is obtained from the copyright holder.
+</para>
+ </legalnotice>
+ <legalnotice>
+ <title>Trademarks</title>
+<para>Altera&reg; and Excalibur&trade; are trademarks of Altera Corporation.</para>
+<para>AMD&reg; is a registered trademark of Advanced Micro Devices, Inc.</para>
+<para>ARM&reg;, StrongARM&reg;, Thumb&reg;, ARM7&trade;, ARM9&trade; is a registered trademark of Advanced RISC Machines, Ltd.</para>
+<para>Cirrus Logic&reg; and Maverick&trade; are registered trademarks of Cirrus Logic, Inc.</para>
+<para>Cogent&trade; is a trademark of Cogent Computer Systems, Inc.</para>
+<para>Compaq&reg; is a registered trademark of the Compaq Computer Corporation.</para>
+<para>Fujitsu&reg; is a registered trademark of Fujitsu Limited.</para>
+<para>IBM&reg;, and PowerPC&trade; are trademarks of International Business Machines Corporation.</para>
+<para>IDT&reg; is a registered trademark of Integrated Device Technology Inc.</para>
+<para>Intel&reg;, i386&trade;, Pentium&reg;, StrataFlash&reg; and XScale&trade; are trademarks of Intel Corporation.</para>
+<para>Intrinsyc&reg; and Cerf&trade; are trademarks of Intrinsyc Software, Inc.</para>
+<para>Linux&reg; is a registered trademark of Linus Torvalds. </para>
+<para>Matsushita&trade; and Panasonic&reg; are trademarks of the Matsushita Electric Industrial Corporation.</para>
+<para>Microsoft&reg;, Windows&reg;, Windows NT&reg; and Windows XP&reg; are registered trademarks of Microsoft Corporation, Inc. </para>
+<para>MIPS&reg;, MIPS32&trade; MIPS64&trade;, 4K&trade, 5K&trade; Atlas&trade; and Malta&trade; are trademarks of MIPS Technologies, Inc.</para>
+<para>Motorola&reg;, ColdFire&reg; is a trademark of Motorola, Inc.</para>
+<para>NEC&reg; V800&trade;, V850&trade;, V850/SA1&trade;, V850/SB1&trade;, VR4300&trade;, and VRC4375&trade; are trademarks of NEC Corporation.</para>
+<para>PMC-Sierra&reg; RM7000&trade; and Ocelot&trade; are trademarks of PMC-Sierra Incorporated. </para>
+<para>Red Hat, eCos&trade;, RedBoot&trade;, GNUPro&reg;, and Insight&trade; are trademarks of Red Hat, Inc. </para>
+<para>Samsung&reg; and CalmRISC&trade; are trademarks or registered trademarks of Samsung, Inc. </para>
+<para>Sharp&reg; is a registered trademark of Sharp Electronics Corp.</para>
+<para>SPARC&reg; is a registered trademark of SPARC International, Inc., and is used under license by Sun Microsystems, Inc. </para>
+<para>Sun Microsystems&reg; and Solaris&reg; are registered trademarks of Sun Microsystems, Inc. </para>
+<para>SuperH&trade; and Renesas&trade; are trademarks owned by Renesas Technology Corp.</para>
+<para>Texas Instruments&reg;, OMAP&trade; and Innovator&trade; are trademarks of Texas Instruments Incorporated.</para>
+<para>Toshiba&reg; is a registered trademark of the Toshiba Corporation.</para>
+<para>UNIX&reg; is a registered trademark of The Open Group. </para>
+<para>All other brand and product names, trademarks, and copyrights are the
+property of their respective owners. </para>
+ </legalnotice>
+ <legalnotice>
+<title>Warranty</title>
+<para>eCos and RedBoot are open source software, covered by a
+modified version of the <ulink url="http://www.gnu.org/copyleft/gpl.html">GNU
+General Public Licence</ulink>,
+and you are welcome to change it and/or distribute copies of it under certain
+conditions. See <ulink
+url="http://ecos.sourceware.org/license-overview.html">http://ecos.sourceware.org/license-overview.html
+</ulink> for more information about the license.</para>
+<para>eCos and RedBoot software have NO WARRANTY. </para>
+<para>Because this software is licensed free of charge, there are no warranties
+for it, to the extent permitted by applicable law. Except when otherwise stated
+in writing, the copyright holders and/or other parties provide the software
+&ldquo;as is&rdquo; without warranty of any kind, either expressed or implied,
+including, but not limited to, the implied warranties of merchantability and
+fitness for a particular purpose. The entire risk as to the quality and performance
+of the software is with you. Should the software prove defective, you assume
+the cost of all necessary servicing, repair or correction.</para>
+<para> In no event, unless required by applicable law or agreed to in writing,
+will any copyright holder, or any other party who may modify and/or redistribute
+the program as permitted above, be liable to you for damages, including any
+general, special, incidental or consequential damages arising out of the use
+or inability to use the program (including but not limited to loss of data
+or data being rendered inaccurate or losses sustained by you or third parties
+or a failure of the program to operate with any other programs), even if such
+holder or other party has been advised of the possibility of such damages.
+</para>
+ </legalnotice>
+ </bookinfo>
+<toc id="redboot-toc"></toc>
+&redboot-sgml;
+&redboot-cmds-sgml;
+&redboot-rebuilding-sgml;
+&redboot-installing-sgml;
+</book>
diff --git a/cesar/ecos/packages/redboot/current/doc/redboot_rebuilding.sgml b/cesar/ecos/packages/redboot/current/doc/redboot_rebuilding.sgml
new file mode 100644
index 0000000000..1b70cb7fd8
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/doc/redboot_rebuilding.sgml
@@ -0,0 +1,374 @@
+<!-- {{{ Banner -->
+
+<!-- =============================================================== -->
+<!-- -->
+<!-- redboot_rebuilding.sgml -->
+<!-- -->
+<!-- RedBoot Documentation -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN#### -->
+<!-- -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
+<!-- This material may be distributed only subject to the terms -->
+<!-- and conditions set forth in the Open Publication License, v1.0 -->
+<!-- or later (the latest version is presently available at -->
+<!-- http://www.opencontent.org/openpub/) -->
+<!-- Distribution of the work or derivative of the work in any -->
+<!-- standard (paper) book form is prohibited unless prior -->
+<!-- permission obtained from the copyright holder -->
+<!-- =============================================================== -->
+<!-- -->
+<!-- ####COPYRIGHTEND#### -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN#### -->
+<!-- -->
+<!-- ####DESCRIPTIONEND#### -->
+<!-- =============================================================== -->
+
+<!-- }}} -->
+
+<chapter id="Rebuilding-Redboot">
+<title>Rebuilding RedBoot</title>
+<sect1>
+<title>Introduction</title>
+<para><indexterm><primary>rebuilding RedBoot</primary></indexterm><indexterm>
+<primary>RedBoot</primary><secondary>rebuilding</secondary></indexterm>
+RedBoot is built as an application on top of eCos. The makefile rules
+for building RedBoot are part of the eCos CDL package, so it's
+possible to build eCos from the <application>Configuration
+Tool</application>, as well as from the command line using
+<application>ecosconfig</application>.</para>
+
+<para>Building RedBoot requires only a few steps: selecting the
+platform and the RedBoot template, importing a platform specific
+configuration file, and finally starting the build.</para>
+
+<para>The platform specific configuration file makes sure the settings
+are correct for building RedBoot on the given platform. Each platform
+should provide at least two of these configuration files:
+<filename>redboot_RAM.ecm</filename> for a RAM mode RedBoot
+configuration and <filename>redboot_ROM.ecm</filename> or
+<filename>redboot_ROMRAM.ecm</filename> for a ROM or ROMRAM mode
+RedBoot configuration. There may be additional
+configuration files according to the requirements of the particular
+platform.</para>
+
+<para>The RedBoot build process results in a number of files in the
+install <filename class="directory">bin</filename> directory. The ELF
+file <filename>redboot.elf</filename> is the pricipal
+result. Depending on the platform CDL, there will also be generated
+versions of RedBoot in other file formats, such as
+<filename>redboot.bin</filename> (binary format, good when doing an
+update of a primary RedBoot image, see <xref
+linkend="update-primary-image">), <filename>redboot.srec</filename>
+(Motorola S-record format, good when downloading a RAM mode image for
+execution), and <filename>redboot.img</filename> (stripped ELF format,
+good when downloading a RAM mode image for execution, smaller than the
+.srec file). Some platforms may provide additional file formats and
+also relocate some of these files to a
+particular address making them more suitable for downloading using a
+different boot monitor or flash programming tools.</para>
+
+<para>The platform specific information in <xref
+linkend="Installation-and-Testing"> should be consulted, as there may
+be other special instructions required to build RedBoot for particular
+platforms.</para>
+
+<sect2>
+<title>Rebuilding RedBoot using <application>ecosconfig</application></title>
+
+<para>To rebuild RedBoot using the
+<application>ecosconfig</application> tool, create a temporary
+directory for building RedBoot, name it according to the desired
+configuration of RedBoot, here RAM:
+<screen>
+$ <userinput>mkdir /tmp/redboot_RAM</userinput>
+$ <userinput>cd /tmp/redboot_RAM</userinput>
+</screen>
+</para>
+
+<para>Create the build tree according to the chosen platform, here
+using the Hitachi Solution Engine 7751 board as
+an example:
+<note><para>It is assumed that the environment variable
+ECOS_REPOSITORY points to the eCos/RedBoot source tree.</para></note>
+<screen>
+$ <userinput>ecosconfig new se7751 redboot</userinput>
+U CYGPKG_HAL_SH_7750, new inferred value 0
+U CYGPKG_HAL_SH_7751, new inferred value 1
+U CYGHWR_HAL_SH_IRQ_USE_IRQLVL, new inferred value 1
+U CYGSEM_HAL_USE_ROM_MONITOR, new inferred value 0
+U CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM, new inferred value 0
+U CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS, new inferred value 1
+U CYGFUN_LIBC_STRING_BSD_FUNCS, new inferred value 0
+U CYGPKG_NS_DNS_BUILD, new inferred value 0
+</screen>
+Replace the platform name ("se7751") with the appropriate name for the
+chosen platform.
+</para>
+
+<para>Then import the appropriate platform RedBoot configuration file,
+here for RAM configuration:
+<screen>
+$ <userinput>ecosconfig import <filename>${ECOS_REPOSITORY}/hal/sh/se7751/<replaceable>VERSION</replaceable>/misc/redboot_RAM.ecm</filename></userinput>
+$ <userinput>ecosconfig tree</userinput>
+</screen>
+Replace architecture ("sh"), platform ("se7751") and version
+("<replaceable>VERSION</replaceable>") with those appropriate for the
+chosen platform and the version number of its HAL package. Also
+replace the configuration name ("redboot_RAM.ecm") with that of the
+appropriate configuration file.
+</para>
+
+<para>RedBoot can now be built:
+<screen>
+$ <userinput>make</userinput>
+</screen>
+</para>
+
+<para>The resulting RedBoot files will be in the associated
+install directory, in this example, <filename
+class="directory">./install/bin</filename>.</para>
+
+<para>In <xref linkend="Installation-and-Testing"> each platform's
+details are described in the form of shell variables. Using those,
+the steps to build RedBoot are:
+<programlisting>
+export REDBOOT_CFG=redboot_ROM
+export VERSION=<replaceable>VERSION</replaceable>
+mkdir /tmp/${REDBOOT_CFG}
+cd /tmp/${REDBOOT_CFG}
+ecosconfig new ${TARGET} redboot
+ecosconfig import ${ECOS_REPOSITORY}/hal/${ARCH_DIR}/${PLATFORM_DIR}/${VERSION}/misc/${REDBOOT_CFG}.ecm
+ecosconfig tree
+make
+</programlisting>
+To build for another configuration, simply change the
+<replaceable>REDBOOT_CFG</replaceable> definition accordingly. Also
+make sure the <replaceable>VERSION</replaceable> variable matches the
+version of the platform package.
+</para>
+</sect2>
+
+
+<sect2>
+<title>Rebuilding RedBoot from the <application>Configuration Tool</application></title>
+
+<para>To rebuild RedBoot from the <application>Configuration
+Tool</application>, open the template window (<guimenuitem>Build->Templates</guimenuitem>) and
+select the appropriate Hardware target and in Packages select
+"redboot". Then press OK. Depending on the platform, a number of
+conflicts may need to be resolved before the build can be started;
+select "Continue".</para>
+
+<para>Import the desired RedBoot configuration file from the platform HAL
+(<guimenuitem>File->Import...</guimenuitem>). Depending on the platform, a number of
+conflicts may need to be resolved before the build can be started;
+select "Continue". For example, if the platform selected is Hitachi
+SE7751 board and the RAM configuration RedBoot should be built, import
+the file
+<filename>hal/sh/se7751/<replaceable>VERSION</replaceable>/misc/redboot_RAM.ecm</filename>.</para>
+
+<para>Save the configuration somewhere suitable with enough disk space
+for building RedBoot (<guimenuitem>File->Save...</guimenuitem>). Choose the name according to
+the RedBoot configuration, for example
+<filename>redboot_RAM.ecc</filename>.</para>
+
+<para>Then start the build (<guimenuitem>Build->Library</guimenuitem>) and wait for it to
+complete. The resulting RedBoot files will be in the associated
+install directory, for the example this would be <filename
+class="directory">redboot_RAM_install/bin</filename>.</para>
+
+<para>As noted above, each platform's details are described in <xref
+linkend="Installation-and-Testing">. Use the information provided in
+the shell variables to find the configuration file - the path to it is
+<filename>${ECOS_REPOSITORY}/hal/${ARCH_DIR}/${PLATFORM_DIR}/${VERSION}/misc/${REDBOOT_CFG}.ecm</filename>,
+where <replaceable>ECOS_REPOSITORY</replaceable> points to the
+eCos/RedBoot sources, <replaceable>VERSION</replaceable> is the
+version of the package (usually "current") and
+<replaceable>REDBOOT_CFG</replaceable> is the desired configuration,
+e.g. redboot_RAM.
+</para>
+</sect2></sect1></chapter>
+
+<chapter id="Updating-Redboot">
+<title>Updating RedBoot</title>
+<sect1>
+<title>Introduction</title>
+<para><indexterm><primary>updating
+RedBoot</primary></indexterm><indexterm>
+<primary>RedBoot</primary><secondary>updating</secondary></indexterm>RedBoot
+normally resides in an EPROM or, more common these days, a flash
+on the board. In the former case, updating RedBoot necessitates
+physically removing the part and
+reprogramming a new RedBoot image into it using prommer hardware. In
+the latter case, it is often possible to update RedBoot in situ using
+Redboot's flash management commands.</para>
+
+<para>The process of updating RedBoot in situ is documented in this
+section. For this process, it is assumed that the target is connected
+to a host system and that there is a serial connection giving access
+to the RedBoot CLI. For platforms with a ROMRAM mode RedBoot, skip to
+<xref linkend="update-primary-image">.</para>
+
+<note><para>The addresses and sizes included in the below are examples
+only, and will differ from those you will see. This is normal and
+should not cause concern.</para></note>
+
+<sect2 id="different-version-from-RAM">
+<title>Load and start a RedBoot RAM instance</title>
+<para>There are a number of choices here. The basic case is where a RAM
+mode image has been stored in the FIS (flash Image System). To load and
+execute this image, use the commands: <screen>
+RedBoot> <userinput>fis load RedBoot[RAM]</userinput>
+RedBoot> <userinput>go</userinput></screen>
+If this image is not available, or does not work,
+then an alternate RAM mode image must be loaded:
+<screen>
+RedBoot> <userinput>load redboot_RAM.img</userinput>
+Entry point: 0x060213c0, address range: 0x06020000-0x060369c8
+RedBoot> <userinput>go</userinput>
+</screen>
+
+<note><para>This command loads the RedBoot image using the TFTP
+protocol via a network connection. Other methods of loading are
+available, refer to the <command><link
+linkend="download-command">load</link</command> command for more
+details. </para></note>
+
+<note><para>If you expect to be doing this more than once, it is a
+good idea to program the RAM mode image into the flash. You do this
+using the <command>fis create</command> command after having
+downloaded the RAM mode image, but before you start it.</para>
+<para>Some platforms support locking (write protecting) certain regions of
+the flash, while others do not. If your platform does not support
+locking, simply ignore the <command>fis unlock</command> and
+<command>fis lock</command> steps (the commands will not be
+recognized by RedBoot).</para>
+<para>
+<screen>
+RedBoot> <userinput>fis unlock RedBoot[RAM]</userinput>
+ ... Unlock from 0x00000000-0x00020000: ..
+RedBoot> <userinput>fis create RedBoot[RAM]</userinput>
+An image named 'RedBoot[RAM]' exists - continue (y/n)? <userinput>y</userinput>
+* CAUTION * about to program 'RedBoot[RAM]'
+ at 0x00020000..0x000369c7 from 0x06020000 - continue (y/n)?<userinput>y</userinput>
+... Erase from 0x00020000-0x00040000: ..
+... Program from 0x06020000-0x060369c8 at 0x00020000: ..
+... Erase from 0x00070000-0x00080000: .
+... Program from 0x0606f000-0x0607f000 at 0x00070000: .
+RedBoot> <userinput>fis lock RedBoot[RAM]</userinput>
+ ... Lock from 0x00000000-0x00020000: ..
+</screen>
+</para></note>
+</para>
+</sect2>
+
+<sect2 id="update-primary-image">
+<title>Update the primary RedBoot flash image</title> <para>An
+instance of RedBoot should now be running on the target from RAM. This
+can be verified by looking for the mode identifier in the banner. It
+should be either [RAM] or [ROMRAM].</para>
+
+<para>If this is the first time RedBoot is running on the board or if
+the flash contents has been damaged, initialize the FIS directory:
+<screen>RedBoot> <userinput>fis init -f</userinput>
+About to initialize [format] FLASH image system - continue (y/n)? <userinput>y</userinput>
+*** Initialize FLASH Image System
+... Erase from 0x00020000-0x00070000: .....
+... Erase from 0x00080000-0x00080000:
+... Erase from 0x00070000-0x00080000: .
+... Program from 0x0606f000-0x0607f000 at 0x00070000: .
+</screen>
+</para>
+
+<para>It is important to understand that the presence of a correctly
+initialized FIS directory allows RedBoot to automatically determine
+the flash parameters. Additionally, executing the steps below as
+stated without loading other data or using other flash commands (than
+possibly <command>fis list</command>) allows RedBoot to automatically
+determine the image location and size parameters. This greatly reduces
+the risk of potential critical mistakes due to typographical errors. It is
+still always possible to explicitly specify parameters, and indeed
+override these, but it is not advised.</para>
+
+<note><para>If the new RedBoot image has grown beyond the slot in
+flash reserved for it, it is necessary to change the RedBoot
+configuration option CYGBLD_REDBOOT_MIN_IMAGE_SIZE so the FIS is
+created with adequate space reserved for RedBoot images. In this case,
+it is necessary to re-initialize the FIS directory as described above,
+using a RAM mode RedBoot compiled with the updated
+configuration.</para></note>
+
+<para>Using the <command>load</command> command, download the
+new flash based image from the host, relocating the image to RAM::
+<screen>RedBoot> <userinput>load -r -b %{FREEMEMLO} redboot_ROM.bin</userinput>
+Raw file loaded 0x06046800-0x06062fe8, assumed entry at 0x06046800
+</screen>
+
+<note><para>This command loads the RedBoot image using the TFTP
+protocol via a network connection. Other methods of loading are
+available, refer to the <xref linkend="download-command"> command for
+more details. </para></note>
+
+<note><para>Note that the binary version of the image is being
+downloaded. This is to ensure that the memory after the image is
+loaded should match the contents of the file on the host. Loading SREC
+or ELF versions of the image does not guarantee this since these
+formats may contain holes, leaving bytes in these holes in an unknown
+state after the load, and thus causing a likely cksum difference. It
+is possible to use these, but then the step verifying the cksum below
+may fail.</para></note>
+</para>
+
+<para>Once the image is loaded into RAM, it should be checksummed,
+thus verifying that the image on the target is indeed the image
+intended to be loaded, and that no corruption of the image has
+happened. This is done using the <xref linkend="cksum-command">
+command:
+<screen>RedBoot> <userinput>cksum</userinput>
+Computing cksum for area 0x06046800-0x06062fe8
+POSIX cksum = 2535322412 116712 (0x971df32c 0x0001c7e8)
+</screen>
+Compare the numbers with those for the binary version of the image on
+the host. If they do not match, try downloading the image again.</para>
+
+
+<para>Assuming the cksum matches, the next step is programming the
+image into flash using the FIS commands.</para>
+
+<para>Some platforms support locking (write protecting) certain
+regions of the flash, while others do not. If your platform does not
+support locking, simply ignore the <command>fis unlock</command> and
+<command>fis lock</command> steps (the commands will not be recognized
+by RedBoot).</para>
+
+<screen>RedBoot> <userinput>fis unlock RedBoot</userinput>
+ ... Unlock from 0x00000000-0x00020000: ..
+RedBoot> <userinput>fis create RedBoot</userinput>
+An image named 'RedBoot' exists - continue (y/n)? <userinput>y</userinput>
+* CAUTION * about to program 'RedBoot'
+ at 0x00000000..0x0001c7e7 from 0x06046800 - continue (y/n)? <userinput>y</userinput>
+... Erase from 0x00000000-0x00020000: ..
+... Program from 0x06046800-0x06062fe8 at 0x00000000: ..
+... Erase from 0x00070000-0x00080000: .
+... Program from 0x0606f000-0x0607f000 at 0x00070000: .
+RedBoot> <userinput>fis lock RedBoot</userinput>
+ ... Lock from 0x00000000-0x00020000: ..
+</screen>
+
+</sect2>
+<sect2>
+<title>Reboot; run the new RedBoot image</title>
+<para>Once the image has been successfully written into the flash, simply
+reset the target and the new version of RedBoot should be running. </para>
+<para>When installing RedBoot for the first time, or after updating to
+a newer RedBoot with different configuration keys, it is necessary to
+update the configuration directory in the flash using the
+<command>fconfig</command> command. See <xref
+linkend="Persistent-State-Flash">.
+</para>
+
+</sect2></sect1></chapter>
diff --git a/cesar/ecos/packages/redboot/current/include/elf.h b/cesar/ecos/packages/redboot/current/include/elf.h
new file mode 100644
index 0000000000..98b9c2881c
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/include/elf.h
@@ -0,0 +1,704 @@
+#ifndef CYGONCE_REDBOOT_ELF_H
+#define CYGONCE_REDBOOT_ELF_H
+
+//==========================================================================
+//
+// elf.h
+//
+// ELF file format definitions
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): nickg
+// Contributors: nickg
+// Date: 2000-11-15
+// Purpose: Define ELF file format
+// Description: The types defined here describe the ELF file format.
+//
+// Usage: #include <cyg/loader/elf.h>
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+//
+// Quite a lot of this file was taken from the BSD exec_elf.h header file.
+// Hence we should show you this...
+//
+/* $OpenBSD: exec_elf.h,v 1.20 1999/09/19 16:16:49 kstailey Exp $ */
+/*
+ * Copyright (c) 1995, 1996 Erik Theisen. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+//==========================================================================
+
+#include <cyg/infra/cyg_type.h>
+
+// -------------------------------------------------------------------------
+// Basic types:
+
+typedef cyg_uint32 Elf32_Addr;
+typedef cyg_uint32 Elf32_Off;
+typedef cyg_uint16 Elf32_Half;
+typedef cyg_uint32 Elf32_Word;
+typedef cyg_int32 Elf32_Sword;
+
+typedef cyg_uint64 Elf64_Addr;
+typedef cyg_uint64 Elf64_Off;
+typedef cyg_uint16 Elf64_Half;
+typedef cyg_uint32 Elf64_Word;
+typedef cyg_int32 Elf64_Sword;
+typedef cyg_uint64 Elf64_Xword;
+typedef cyg_int64 Elf64_Sxword;
+
+// -------------------------------------------------------------------------
+// ELF header
+
+#define EI_NIDENT 16
+
+typedef struct {
+ unsigned char e_ident[EI_NIDENT];
+ Elf32_Half e_type;
+ Elf32_Half e_machine;
+ Elf32_Word e_version;
+ Elf32_Addr e_entry;
+ Elf32_Off e_phoff;
+ Elf32_Off e_shoff;
+ Elf32_Word e_flags;
+ Elf32_Half e_ehsize;
+ Elf32_Half e_phentsize;
+ Elf32_Half e_phnum;
+ Elf32_Half e_shentsize;
+ Elf32_Half e_shnum;
+ Elf32_Half e_shtrndx;
+} Elf32_Ehdr;
+
+typedef struct {
+ unsigned char e_ident[EI_NIDENT];
+ Elf64_Half e_type;
+ Elf64_Half e_machine;
+ Elf64_Word e_version;
+ Elf64_Addr e_entry;
+ Elf64_Off e_phoff;
+ Elf64_Off e_shoff;
+ Elf64_Word e_flags;
+ Elf64_Half e_ehsize;
+ Elf64_Half e_phentsize;
+ Elf64_Half e_phnum;
+ Elf64_Half e_shentsize;
+ Elf64_Half e_shnum;
+ Elf64_Half e_shtrndx;
+} Elf64_Ehdr;
+
+// -------------------------------------------------------------------------
+/* e_ident[] identification indexes */
+
+#define EI_MAG0 0 /* file ID */
+#define EI_MAG1 1 /* file ID */
+#define EI_MAG2 2 /* file ID */
+#define EI_MAG3 3 /* file ID */
+#define EI_CLASS 4 /* file class */
+#define EI_DATA 5 /* data encoding */
+#define EI_VERSION 6 /* ELF header version */
+#define EI_OSABI 7 /* Operating system/ABI identification */
+#define EI_ABIVERSION 8 /* ABI version */
+#define EI_PAD 9 /* start of pad bytes */
+
+// -------------------------------------------------------------------------
+/* e_ident[] magic number */
+
+#define ELFMAG0 0x7f /* e_ident[EI_MAG0] */
+#define ELFMAG1 'E' /* e_ident[EI_MAG1] */
+#define ELFMAG2 'L' /* e_ident[EI_MAG2] */
+#define ELFMAG3 'F' /* e_ident[EI_MAG3] */
+#define ELFMAG "\177ELF" /* magic */
+#define SELFMAG 4 /* size of magic */
+
+// -------------------------------------------------------------------------
+/* e_ident[] file class */
+
+#define ELFCLASSNONE 0 /* invalid */
+#define ELFCLASS32 1 /* 32-bit objs */
+#define ELFCLASS64 2 /* 64-bit objs */
+#define ELFCLASSNUM 3 /* number of classes */
+
+// -------------------------------------------------------------------------
+/* e_ident[] data encoding */
+
+#define ELFDATANONE 0 /* invalid */
+#define ELFDATA2LSB 1 /* Little-Endian */
+#define ELFDATA2MSB 2 /* Big-Endian */
+#define ELFDATANUM 3 /* number of data encode defines */
+
+// -------------------------------------------------------------------------
+/* e_ident */
+
+#define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
+ (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \
+ (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \
+ (ehdr).e_ident[EI_MAG3] == ELFMAG3)
+
+// -------------------------------------------------------------------------
+/* e_type */
+
+#define ET_NONE 0 /* No file type */
+#define ET_REL 1 /* relocatable file */
+#define ET_EXEC 2 /* executable file */
+#define ET_DYN 3 /* shared object file */
+#define ET_CORE 4 /* core file */
+#define ET_NUM 5 /* number of types */
+#define ET_LOOS 0xfe00 /* Operating system-specific */
+#define ET_HIOS 0xfeff /* Operating system-specific */
+#define ET_LOPROC 0xff00 /* reserved range for processor */
+#define ET_HIPROC 0xffff /* specific e_type */
+
+// -------------------------------------------------------------------------
+/* e_machine */
+// The following values taken from 22 June 2000 SysV ABI spec, updated with
+// extra values from binutils elf/common.h.
+
+#define EM_NONE 0 // No machine
+#define EM_M32 1 // AT&T WE 32100
+#define EM_SPARC 2 // SPARC
+#define EM_386 3 // Intel 80386
+#define EM_68K 4 // Motorola 68000
+#define EM_88K 5 // Motorola 88000
+#define EM_860 7 // Intel 80860
+#define EM_MIPS 8 // MIPS I Architecture
+#define EM_S370 9 // IBM System/370 Processor
+#define EM_MIPS_RS3_LE 10 // MIPS RS3000 Little-endian
+#define EM_PARISC 15 // Hewlett-Packard PA-RISC
+#define EM_VPP500 17 // Fujitsu VPP500
+#define EM_SPARC32PLUS 18 // Enhanced instruction set SPARC
+#define EM_960 19 // Intel 80960
+#define EM_PPC 20 // PowerPC
+#define EM_PPC64 21 // 64-bit PowerPC
+#define EM_V800 36 // NEC V800
+#define EM_FR20 37 // Fujitsu FR20
+#define EM_RH32 38 // TRW RH-32
+#define EM_RCE 39 // Motorola RCE
+#define EM_ARM 40 // Advanced RISC Machines ARM
+#define EM_ALPHA 41 // Digital Alpha
+#define EM_SH 42 // Hitachi SH
+#define EM_SPARCV9 43 // SPARC Version 9
+#define EM_TRICORE 44 // Siemens Tricore embedded processor
+#define EM_ARC 45 // Argonaut RISC Core, Argonaut Technologies Inc.
+#define EM_H8_300 46 // Hitachi H8/300
+#define EM_H8_300H 47 // Hitachi H8/300H
+#define EM_H8S 48 // Hitachi H8S
+#define EM_H8_500 49 // Hitachi H8/500
+#define EM_IA_64 50 // Intel IA-64 processor architecture
+#define EM_MIPS_X 51 // Stanford MIPS-X
+#define EM_COLDFIRE 52 // Motorola ColdFire
+#define EM_68HC12 53 // Motorola M68HC12
+#define EM_MMA 54 // Fujitsu MMA Multimedia Accelerator
+#define EM_PCP 55 // Siemens PCP
+#define EM_NCPU 56 // Sony nCPU embedded RISC processor
+#define EM_NDR1 57 // Denso NDR1 microprocessor
+#define EM_STARCORE 58 // Motorola Star*Core processor
+#define EM_ME16 59 // Toyota ME16 processor
+#define EM_ST100 60 // STMicroelectronics ST100 processor
+#define EM_TINYJ 61 // Advanced Logic Corp. TinyJ embedded processor family
+#define EM_FX66 66 // Siemens FX66 microcontroller
+#define EM_ST9PLUS 67 // STMicroelectronics ST9+ 8/16 bit microcontroller
+#define EM_ST7 68 // STMicroelectronics ST7 8-bit microcontroller
+#define EM_68HC16 69 // Motorola MC68HC16 Microcontroller
+#define EM_68HC11 70 // Motorola MC68HC11 Microcontroller
+#define EM_68HC08 71 // Motorola MC68HC08 Microcontroller
+#define EM_68HC05 72 // Motorola MC68HC05 Microcontroller
+#define EM_SVX 73 // Silicon Graphics SVx
+#define EM_ST19 74 // STMicroelectronics ST19 8-bit microcontroller
+#define EM_VAX 75 // Digital VAX
+#define EM_CRIS 76 // Axis Communications 32-bit embedded processor
+#define EM_JAVELIN 77 // Infineon Technologies 32-bit embedded processor
+#define EM_FIREPATH 78 // Element 14 64-bit DSP Processor
+#define EM_ZSP 79 // LSI Logic 16-bit DSP Processor
+#define EM_MMIX 80 // Donald Knuth's educational 64-bit processor
+#define EM_HUANY 81 // Harvard University machine-independent object files
+#define EM_PRISM 82 // SiTera Prism
+
+/* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */
+#define EM_CYGNUS_POWERPC 0x9025
+
+/* Old version of Sparc v9, from before the ABI; this should be
+ removed shortly. */
+#define EM_OLD_SPARCV9 11
+
+/* Old version of PowerPC, this should be removed shortly. */
+#define EM_PPC_OLD 17
+
+/* Cygnus ARC ELF backend. Written in the absence of an ABI. */
+#define EM_CYGNUS_ARC 0x9040
+
+/* Cygnus M32R ELF backend. Written in the absence of an ABI. */
+#define EM_CYGNUS_M32R 0x9041
+
+/* Alpha backend magic number. Written in the absence of an ABI. */
+//#define EM_ALPHA 0x9026
+
+/* D10V backend magic number. Written in the absence of an ABI. */
+#define EM_CYGNUS_D10V 0x7650
+
+/* D30V backend magic number. Written in the absence of an ABI. */
+#define EM_CYGNUS_D30V 0x7676
+
+/* V850 backend magic number. Written in the absense of an ABI. */
+#define EM_CYGNUS_V850 0x9080
+
+/* mn10200 and mn10300 backend magic numbers.
+ Written in the absense of an ABI. */
+#define EM_CYGNUS_MN10200 0xdead
+#define EM_CYGNUS_MN10300 0xbeef
+
+/* FR30 magic number - no EABI available. */
+#define EM_CYGNUS_FR30 0x3330
+
+/* AVR magic number
+ Written in the absense of an ABI. */
+#define EM_AVR 0x1057
+
+// -------------------------------------------------------------------------
+/* Version */
+
+#define EV_NONE 0 /* Invalid */
+#define EV_CURRENT 1 /* Current */
+#define EV_NUM 2 /* number of versions */
+
+// -------------------------------------------------------------------------
+/* Section Header */
+
+typedef struct {
+ Elf32_Word sh_name; /* name - index into section header
+ string table section */
+ Elf32_Word sh_type; /* type */
+ Elf32_Word sh_flags; /* flags */
+ Elf32_Addr sh_addr; /* address */
+ Elf32_Off sh_offset; /* file offset */
+ Elf32_Word sh_size; /* section size */
+ Elf32_Word sh_link; /* section header table index link */
+ Elf32_Word sh_info; /* extra information */
+ Elf32_Word sh_addralign; /* address alignment */
+ Elf32_Word sh_entsize; /* section entry size */
+} Elf32_Shdr;
+
+typedef struct {
+ Elf64_Word sh_name; /* section name */
+ Elf64_Word sh_type; /* section type */
+ Elf64_Xword sh_flags; /* section flags */
+ Elf64_Addr sh_addr; /* virtual address */
+ Elf64_Off sh_offset; /* file offset */
+ Elf64_Xword sh_size; /* section size */
+ Elf64_Word sh_link; /* link to another */
+ Elf64_Word sh_info; /* misc info */
+ Elf64_Xword sh_addralign; /* memory alignment */
+ Elf64_Xword sh_entsize; /* table entry size */
+} Elf64_Shdr;
+
+// -------------------------------------------------------------------------
+/* Special Section Indexes */
+
+#define SHN_UNDEF 0 /* undefined */
+#define SHN_LORESERVE 0xff00 /* lower bounds of reserved indexes */
+#define SHN_LOPROC 0xff00 /* reserved range for processor */
+#define SHN_HIPROC 0xff1f /* specific section indexes */
+#define SHN_LOOS 0xff20 /* reserved range for operating */
+#define SHN_HIOS 0xff3f /* system specific section indexes */
+#define SHN_ABS 0xfff1 /* absolute value */
+#define SHN_COMMON 0xfff2 /* common symbol */
+#define SHN_XINDEX 0xffff /* escape value for oversize index */
+#define SHN_HIRESERVE 0xffff /* upper bounds of reserved indexes */
+
+// -------------------------------------------------------------------------
+/* sh_type */
+
+#define SHT_NULL 0 /* inactive */
+#define SHT_PROGBITS 1 /* program defined information */
+#define SHT_SYMTAB 2 /* symbol table section */
+#define SHT_STRTAB 3 /* string table section */
+#define SHT_RELA 4 /* relocation section with addends*/
+#define SHT_HASH 5 /* symbol hash table section */
+#define SHT_DYNAMIC 6 /* dynamic section */
+#define SHT_NOTE 7 /* note section */
+#define SHT_NOBITS 8 /* no space section */
+#define SHT_REL 9 /* relation section without addends */
+#define SHT_SHLIB 10 /* reserved - purpose unknown */
+#define SHT_DYNSYM 11 /* dynamic symbol table section */
+#define SHT_INIT_ARRAY 14 /* init procedure array */
+#define SHT_FINI_ARRAY 15 /* fini procedure array */
+#define SHT_PREINIT_ARRAY 16 /* preinit procedure array */
+#define SHT_GROUP 17 /* section group */
+#define SHT_SYMTAB_SHNDX 18 /* oversize index table */
+#define SHT_NUM 19 /* number of section types */
+#define SHT_LOOS 0x60000000 /* reserved range for O/S */
+#define SHT_HIOS 0x6fffffff /* specific section header types */
+#define SHT_LOPROC 0x70000000 /* reserved range for processor */
+#define SHT_HIPROC 0x7fffffff /* specific section header types */
+#define SHT_LOUSER 0x80000000 /* reserved range for application */
+#define SHT_HIUSER 0xffffffff /* specific indexes */
+
+// -------------------------------------------------------------------------
+/* Section names */
+
+#define ELF_BSS ".bss" /* uninitialized data */
+#define ELF_DATA ".data" /* initialized data */
+#define ELF_DEBUG ".debug" /* debug */
+#define ELF_DYNAMIC ".dynamic" /* dynamic linking information */
+#define ELF_DYNSTR ".dynstr" /* dynamic string table */
+#define ELF_DYNSYM ".dynsym" /* dynamic symbol table */
+#define ELF_FINI ".fini" /* termination code */
+#define ELF_GOT ".got" /* global offset table */
+#define ELF_HASH ".hash" /* symbol hash table */
+#define ELF_INIT ".init" /* initialization code */
+#define ELF_REL_DATA ".rel.data" /* relocation data */
+#define ELF_REL_FINI ".rel.fini" /* relocation termination code */
+#define ELF_REL_INIT ".rel.init" /* relocation initialization code */
+#define ELF_REL_DYN ".rel.dyn" /* relocaltion dynamic link info */
+#define ELF_REL_RODATA ".rel.rodata" /* relocation read-only data */
+#define ELF_REL_TEXT ".rel.text" /* relocation code */
+#define ELF_RODATA ".rodata" /* read-only data */
+#define ELF_SHSTRTAB ".shstrtab" /* section header string table */
+#define ELF_STRTAB ".strtab" /* string table */
+#define ELF_SYMTAB ".symtab" /* symbol table */
+#define ELF_TEXT ".text" /* code */
+
+// -------------------------------------------------------------------------
+/* Section Attribute Flags - sh_flags */
+
+#define SHF_WRITE 0x001 /* Writable */
+#define SHF_ALLOC 0x002 /* occupies memory */
+#define SHF_EXECINSTR 0x004 /* executable */
+#define SHF_MERGE 0x010 /* merge data */
+#define SHF_STRINGS 0x020 /* contains strings */
+#define SHF_INFO_LINK 0x040 /* link in sh_info field */
+#define SHF_LINK_ORDER 0x080 /* preserve link order */
+#define SHF_OS_NONCONFORMING 0x100 /* special OS-specific */
+ /* processing needed */
+#define SHF_GROUP 0x200 /* member of group */
+#define SHF_MASKOS 0x0ff00000 /* reserved bits for OS */
+ /* specific section attributes */
+#define SHF_MASKPROC 0xf0000000 /* reserved bits for processor */
+ /* specific section attributes */
+
+// -------------------------------------------------------------------------
+/* Symbol Table Entry */
+
+typedef struct {
+ Elf32_Word st_name; /* name - index into string table */
+ Elf32_Addr st_value; /* symbol value */
+ Elf32_Word st_size; /* symbol size */
+ unsigned char st_info; /* type and binding */
+ unsigned char st_other; /* visibility */
+ Elf32_Half st_shndx; /* section header index */
+} Elf32_Sym;
+
+typedef struct {
+ Elf64_Word st_name; /* Symbol name index in str table */
+ unsigned char st_info; /* type / binding attrs */
+ unsigned char st_other; /* visibility */
+ Elf64_Half st_shndx; /* section index of symbol */
+ Elf64_Addr st_value; /* value of symbol */
+ Elf64_Xword st_size; /* size of symbol */
+} Elf64_Sym;
+
+// -------------------------------------------------------------------------
+/* Symbol table index */
+
+#define STN_UNDEF 0 /* undefined */
+
+/* Extract symbol info - st_info */
+#define ELF32_ST_BIND(x) ((x) >> 4)
+#define ELF32_ST_TYPE(x) (((unsigned int) x) & 0xf)
+#define ELF32_ST_INFO(b,t) (((b) << 4) + ((t) & 0xf))
+
+#define ELF64_ST_BIND(x) ((x) >> 4)
+#define ELF64_ST_TYPE(x) (((unsigned int) x) & 0xf)
+#define ELF64_ST_INFO(b,t) (((b) << 4) + ((t) & 0xf))
+
+#define ELF32_ST_VISIBILITY(o) ((o)&0x3)
+#define ELF64_ST_VISIBILITY(o) ((o)&0x3)
+
+// -------------------------------------------------------------------------
+/* Symbol Binding - ELF32_ST_BIND - st_info */
+
+#define STB_LOCAL 0 /* Local symbol */
+#define STB_GLOBAL 1 /* Global symbol */
+#define STB_WEAK 2 /* like global - lower precedence */
+#define STB_NUM 3 /* number of symbol bindings */
+#define STB_LOOS 10 /* reserved range for OS */
+#define STB_HIOS 12 /* specific symbol bindings */
+#define STB_LOPROC 13 /* reserved range for processor */
+#define STB_HIPROC 15 /* specific symbol bindings */
+
+// -------------------------------------------------------------------------
+/* Symbol type - ELF32_ST_TYPE - st_info */
+
+#define STT_NOTYPE 0 /* not specified */
+#define STT_OBJECT 1 /* data object */
+#define STT_FUNC 2 /* function */
+#define STT_SECTION 3 /* section */
+#define STT_FILE 4 /* file */
+#define STT_COMMON 5 /* common block */
+#define STT_NUM 6 /* number of symbol types */
+#define STT_LOOS 10 /* reserved range for OS */
+#define STT_HIOS 12 /* specific symbol types */
+#define STT_LOPROC 13 /* reserved range for processor */
+#define STT_HIPROC 15 /* specific symbol types */
+
+// -------------------------------------------------------------------------
+// symbol visibility in st_other
+
+#define STV_DEFAULT 0 /* default to binding type */
+#define STV_INTERNAL 1 /* processor specific */
+#define STV_HIDDEN 2 /* invisible */
+#define STV_PROTECTED 3 /* non-premptable */
+
+// -------------------------------------------------------------------------
+// 32 bit relocation records
+
+/* Relocation entry with implicit addend */
+typedef struct
+{
+ Elf32_Addr r_offset; /* offset of relocation */
+ Elf32_Word r_info; /* symbol table index and type */
+} Elf32_Rel;
+
+/* Relocation entry with explicit addend */
+typedef struct
+{
+ Elf32_Addr r_offset; /* offset of relocation */
+ Elf32_Word r_info; /* symbol table index and type */
+ Elf32_Sword r_addend;
+} Elf32_Rela;
+
+/* Extract relocation info - r_info */
+#define ELF32_R_SYM(i) ((i) >> 8)
+#define ELF32_R_TYPE(i) ((unsigned char) (i))
+#define ELF32_R_INFO(s,t) (((s) << 8) + (unsigned char)(t))
+
+// -------------------------------------------------------------------------
+// 64 bit equivalents of above structures and macros.
+
+typedef struct {
+ Elf64_Addr r_offset; /* where to do it */
+ Elf64_Xword r_info; /* index & type of relocation */
+} Elf64_Rel;
+
+typedef struct {
+ Elf64_Addr r_offset; /* where to do it */
+ Elf64_Xword r_info; /* index & type of relocation */
+ Elf64_Sxword r_addend; /* adjustment value */
+} Elf64_RelA;
+
+#define ELF64_R_SYM(info) ((info) >> 32)
+#define ELF64_R_TYPE(info) ((info) & 0xFFFFFFFF)
+#define ELF64_R_INFO(s,t) (((s) << 32) + (u_int32_t)(t))
+
+// -------------------------------------------------------------------------
+/* Program Header */
+
+typedef struct {
+ Elf32_Word p_type; /* segment type */
+ Elf32_Off p_offset; /* segment offset */
+ Elf32_Addr p_vaddr; /* virtual address of segment */
+ Elf32_Addr p_paddr; /* physical address - ignored? */
+ Elf32_Word p_filesz; /* number of bytes in file for seg. */
+ Elf32_Word p_memsz; /* number of bytes in mem. for seg. */
+ Elf32_Word p_flags; /* flags */
+ Elf32_Word p_align; /* memory alignment */
+} Elf32_Phdr;
+
+typedef struct {
+ Elf64_Word p_type; /* entry type */
+ Elf64_Word p_flags; /* flags */
+ Elf64_Off p_offset; /* offset */
+ Elf64_Addr p_vaddr; /* virtual address */
+ Elf64_Addr p_paddr; /* physical address */
+ Elf64_Xword p_filesz; /* file size */
+ Elf64_Xword p_memsz; /* memory size */
+ Elf64_Xword p_align; /* memory & file alignment */
+} Elf64_Phdr;
+
+// -------------------------------------------------------------------------
+/* Segment types - p_type */
+
+#define PT_NULL 0 /* unused */
+#define PT_LOAD 1 /* loadable segment */
+#define PT_DYNAMIC 2 /* dynamic linking section */
+#define PT_INTERP 3 /* the RTLD */
+#define PT_NOTE 4 /* auxiliary information */
+#define PT_SHLIB 5 /* reserved - purpose undefined */
+#define PT_PHDR 6 /* program header */
+#define PT_NUM 7 /* Number of segment types */
+#define PT_LOOS 0x60000000 /* reserved range for OS */
+#define PT_HIOS 0x6fffffff /* specific segment types */
+#define PT_LOPROC 0x70000000 /* reserved range for processor */
+#define PT_HIPROC 0x7fffffff /* specific segment types */
+
+// -------------------------------------------------------------------------
+/* Segment flags - p_flags */
+
+#define PF_X 0x1 /* Executable */
+#define PF_W 0x2 /* Writable */
+#define PF_R 0x4 /* Readable */
+#define PF_MASKOS 0x0ff00000 /* reserved bits for OS */
+ /* specific segment flags */
+#define PF_MASKPROC 0xf0000000 /* reserved bits for processor */
+ /* specific segment flags */
+
+// -------------------------------------------------------------------------
+/* Dynamic structure */
+
+typedef struct {
+ Elf32_Sword d_tag; /* controls meaning of d_val */
+ union {
+ Elf32_Word d_val; /* Multiple meanings - see d_tag */
+ Elf32_Addr d_ptr; /* program virtual address */
+ } d_un;
+} Elf32_Dyn;
+
+extern Elf32_Dyn _DYNAMIC[]; /* XXX not 64-bit clean */
+
+typedef struct {
+ Elf64_Sxword d_tag; /* controls meaning of d_val */
+ union {
+ Elf64_Xword d_val;
+ Elf64_Addr d_ptr;
+ } d_un;
+} Elf64_Dyn;
+
+// -------------------------------------------------------------------------
+/* Dynamic Array Tags - d_tag */
+
+#define DT_NULL 0 /* marks end of _DYNAMIC array */
+#define DT_NEEDED 1 /* string table offset of needed lib */
+#define DT_PLTRELSZ 2 /* size of relocation entries in PLT */
+#define DT_PLTGOT 3 /* address PLT/GOT */
+#define DT_HASH 4 /* address of symbol hash table */
+#define DT_STRTAB 5 /* address of string table */
+#define DT_SYMTAB 6 /* address of symbol table */
+#define DT_RELA 7 /* address of relocation table */
+#define DT_RELASZ 8 /* size of relocation table */
+#define DT_RELAENT 9 /* size of relocation entry */
+#define DT_STRSZ 10 /* size of string table */
+#define DT_SYMENT 11 /* size of symbol table entry */
+#define DT_INIT 12 /* address of initialization func. */
+#define DT_FINI 13 /* address of termination function */
+#define DT_SONAME 14 /* string table offset of shared obj */
+#define DT_RPATH 15 /* string table offset of library
+ search path */
+#define DT_SYMBOLIC 16 /* start sym search in shared obj. */
+#define DT_REL 17 /* address of rel. tbl. w addends */
+#define DT_RELSZ 18 /* size of DT_REL relocation table */
+#define DT_RELENT 19 /* size of DT_REL relocation entry */
+#define DT_PLTREL 20 /* PLT referenced relocation entry */
+#define DT_DEBUG 21 /* bugger */
+#define DT_TEXTREL 22 /* Allow rel. mod. to unwritable seg */
+#define DT_JMPREL 23 /* add. of PLT's relocation entries */
+#define DT_BIND_NOW 24 /* Bind now regardless of env setting */
+#define DT_INIT_ARRAY 25 /* init array address */
+#define DT_FINI_ARRAY 26 /* fini array address */
+#define DT_INIT_ARRAYSZ 27 /* init array size */
+#define DT_FINI_ARRAYSZ 28 /* fini array size */
+#define DT_RUNPATH 29 /* library search path */
+#define DT_FLAGS 30 /* flags */
+#define DT_ENCODING 32 /* encoding rules start here */
+#define DT_PREINIT_ARRAY 32 /* preinit array address */
+#define DT_PREINIT_ARRAYSZ 33 /* preinit array size */
+#define DT_NUM 26 /* Number used. */
+#define DT_LOOS 0x60000000 /* reserved range for OS */
+#define DT_HIOS 0x6fffffff /* specific dynamic array tags */
+#define DT_LOPROC 0x70000000 /* reserved range for processor */
+#define DT_HIPROC 0x7fffffff /* specific dynamic array tags */
+
+// -------------------------------------------------------------------------
+// Values for DT_FLAGS entry
+
+#define DF_ORIGIN 0x1 /* Uses $ORIGIN substitution string */
+#define DF_SYMBOLIC 0x2 /* search for symbols here first */
+#define DF_TEXTREL 0x4 /* text may be relocatable */
+#define DF_BIND_NOW 0x8 /* bind references now, dammit */
+
+// -------------------------------------------------------------------------
+/* Note Definitions */
+
+typedef struct {
+ Elf32_Word namesz;
+ Elf32_Word descsz;
+ Elf32_Word type;
+} Elf32_Note;
+
+typedef struct {
+ Elf64_Word namesz;
+ Elf64_Word descsz;
+ Elf64_Word type;
+} Elf64_Note;
+
+// -------------------------------------------------------------------------
+// Hash table structure
+// The same structure is used by both 32 and 64 bit formats
+
+typedef struct {
+ Elf32_Word nbucket; /* number of buckets */
+ Elf32_Word nchain; /* number of chains */
+
+ /* The buckets follow this structure in memory and the chains
+ follow those. */
+} Elf_Hash;
+
+// -------------------------------------------------------------------------
+#endif // ifndef CYGONCE_REDBOOT_ELF_H
+// EOF elf.h
diff --git a/cesar/ecos/packages/redboot/current/include/fis.h b/cesar/ecos/packages/redboot/current/include/fis.h
new file mode 100644
index 0000000000..f405527272
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/include/fis.h
@@ -0,0 +1,79 @@
+#ifndef _FIS_H_
+#define _FIS_H_
+//==========================================================================
+//
+// fis.h
+//
+// RedBoot - FLASH image directory layout
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas, tkoeller
+// Date: 2000-07-28
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/redboot.h>
+#ifdef CYGOPT_REDBOOT_FIS
+#include <cyg/infra/cyg_type.h>
+
+#define FIS_IMAGE_DESC_SIZE_UNPADDED \
+ (16 + 4 * sizeof(unsigned long) + 3 * sizeof(CYG_ADDRESS))
+
+struct fis_image_desc {
+ unsigned char name[16]; // Null terminated name
+ CYG_ADDRESS flash_base; // Address within FLASH of image
+ CYG_ADDRESS mem_base; // Address in memory where it executes
+ unsigned long size; // Length of image
+ CYG_ADDRESS entry_point; // Execution entry point
+ unsigned long data_length; // Length of actual data
+ unsigned char _pad[CYGNUM_REDBOOT_FIS_DIRECTORY_ENTRY_SIZE-FIS_IMAGE_DESC_SIZE_UNPADDED];
+ unsigned long desc_cksum; // Checksum over image descriptor
+ unsigned long file_cksum; // Checksum over image data
+};
+
+struct fis_image_desc *fis_lookup(char *name, int *num);
+
+#endif // CYGOPT_REDBOOT_FIS
+#endif // _FIS_H_
diff --git a/cesar/ecos/packages/redboot/current/include/flash_config.h b/cesar/ecos/packages/redboot/current/include/flash_config.h
new file mode 100644
index 0000000000..be6fdbc7e9
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/include/flash_config.h
@@ -0,0 +1,110 @@
+//==========================================================================
+//
+// flash_config.h
+//
+// Flash configuration data tables for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-08-21
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#ifndef _FLASH_CONFIG_H_
+#define _FLASH_CONFIG_H_
+
+#define MAX_SCRIPT_LENGTH CYGNUM_REDBOOT_FLASH_SCRIPT_SIZE
+#define MAX_STRING_LENGTH CYGNUM_REDBOOT_FLASH_STRING_SIZE
+#define MAX_CONFIG_DATA CYGNUM_REDBOOT_FLASH_CONFIG_SIZE
+
+#define CONFIG_EMPTY 0
+#define CONFIG_BOOL 1
+#define CONFIG_INT 2
+#define CONFIG_STRING 3
+#define CONFIG_SCRIPT 4
+#ifdef CYGPKG_REDBOOT_NETWORKING
+#define CONFIG_IP 5
+#define CONFIG_ESA 6
+#define CONFIG_NETPORT 7
+#endif
+
+struct config_option {
+ char *key;
+ char *title;
+ char *enable;
+ bool enable_sense;
+ int type;
+ unsigned long dflt;
+} CYG_HAL_TABLE_TYPE;
+
+#define ALWAYS_ENABLED (char *)0
+
+#define RedBoot_config_option(_t_,_n_,_e_,_ie_,_type_,_dflt_) \
+struct config_option _config_option_##_n_ \
+CYG_HAL_TABLE_QUALIFIED_ENTRY(RedBoot_config_options,_n_) = \
+ {#_n_,_t_,_e_,_ie_,_type_,(unsigned long)_dflt_};
+
+// Cause the in-memory configuration data to be written to flash
+void flash_write_config(bool prompt);
+// Fetch a data item from flash storage, returns 'false' if not found
+bool flash_get_config(char *key, void *val, int type);
+// Update a data item from flash storage, returns 'false' if not found
+bool flash_set_config(char *key, void *val, int type);
+// Enumerate keys from configuration
+bool flash_next_key(char *key, int keylen, int *type, int *offset);
+// Add a new data item to configuration data base. Returns 'false'
+// if no space is available.
+bool flash_add_config(struct config_option *opt, bool update);
+
+// Internal structure used to hold config data
+struct _config {
+ unsigned long len;
+ unsigned long key1;
+ unsigned char config_data[MAX_CONFIG_DATA-(4*4)];
+ unsigned long key2;
+ unsigned long cksum;
+};
+
+#endif // _FLASH_CONFIG_H_
diff --git a/cesar/ecos/packages/redboot/current/include/fs/disk.h b/cesar/ecos/packages/redboot/current/include/fs/disk.h
new file mode 100644
index 0000000000..84fc102147
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/include/fs/disk.h
@@ -0,0 +1,173 @@
+//==========================================================================
+//
+// disk.h
+//
+// Stand-alone disk support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): msalter
+// Contributors: msalter
+// Date: 2001-07-02
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#ifndef CYGONCE_REDBOOT_DISK_H
+#define CYGONCE_REDBOOT_DISK_H
+
+#define SECTOR_SIZE 512
+
+// Convenience macros to access disk/filesystem info which may
+// be stored in a fixed endian format.
+
+#define __SWAB16(x) \
+ ((((x) & 0xFF) << 8) | (((x) >> 8) & 0xFF))
+
+#define __SWAB32(x) \
+ ((((x) & 0xff) << 24) | \
+ (((x) & 0xff00) << 8) | \
+ (((x) >> 8) & 0xff00) | \
+ (((x) >> 24) & 0xff))
+
+#if (CYG_BYTEORDER == CYG_MSBFIRST)
+#define SWAB_LE16(x) __SWAB16(x)
+#define SWAB_LE32(x) __SWAB32(x)
+#define SWAB_BE16(x) (x)
+#define SWAB_BE32(x) (x)
+#else
+#define SWAB_LE16(x) (x)
+#define SWAB_LE32(x) (x)
+#define SWAB_BE16(x) __SWAB16(x)
+#define SWAB_BE32(x) __SWAB32(x)
+#endif
+
+struct partition;
+
+// filesystem interface
+typedef struct fs_funs {
+ // Load a file into memory.
+ void * (*open)(struct partition *p, const char *path);
+ int (*read)(void *fp, char *buf, cyg_uint32 nbytes);
+} fs_funs_t;
+
+struct disk;
+
+typedef struct partition {
+ struct disk *disk;
+ fs_funs_t *funs;
+ cyg_uint32 start_sector; // first sector in partition
+ cyg_uint32 nr_sectors; // number of sectors in partition
+ cyg_uint8 systype; // FAT12, FAT16, Linux, etc.
+ cyg_uint8 bootflag; // not really used...
+} partition_t;
+
+// System types
+#define SYSTYPE_FAT12 0x01
+#define SYSTYPE_FAT16_32M 0x04
+#define SYSTYPE_EXTENDED 0x05
+#define SYSTYPE_FAT16 0x06
+#define SYSTYPE_LINUX_SWAP 0x82
+#define SYSTYPE_LINUX 0x83
+
+typedef struct disk_funs {
+ int (*read)(struct disk *d,
+ cyg_uint32 start_sector,
+ cyg_uint32 *buf,
+ cyg_uint8 nr_sectors);
+} disk_funs_t;
+
+
+typedef struct disk {
+ disk_funs_t *funs; // Disk driver functions
+ void *private; // Whatever is needed by disk functions
+ cyg_uint32 nr_sectors; // Total disk size in sectors
+ short kind; // IDE_HD, IDE_CDROM, SCSI_HD, etc
+ short index; // index within specific kind
+ partition_t partitions[CYGNUM_REDBOOT_MAX_PARTITIONS];
+} disk_t;
+
+#define DISK_READ(d,s,p,n) ((d)->funs->read)((d),(s),(p),(n))
+#define PARTITION_READ(part,s,p,n) \
+ DISK_READ((part)->disk, (s) + (part)->start_sector, (p), (n))
+
+// Kinds of disks
+#define DISK_IDE_HD 1
+#define DISK_IDE_CDROM 2
+#define DISK_FLOPPY 3
+
+// DOS partition table as laid out in the MBR
+//
+struct mbr_partition {
+ cyg_uint8 boot_ind; // 0x80 == active
+ cyg_uint8 head;
+ cyg_uint8 sector;
+ cyg_uint8 cyl;
+ cyg_uint8 sys_ind; // partition type
+ cyg_uint8 end_head;
+ cyg_uint8 end_sector;
+ cyg_uint8 end_cyl;
+ cyg_uint8 start_sect[4]; // starting sector counting from 0
+ cyg_uint8 nr_sects[4]; // number of sectors in partition
+};
+
+#define MBR_PTABLE_OFFSET 0x1be
+#define MBR_MAGIC_OFFSET 0x1fe
+#define MBR_MAGIC 0xaa55
+
+// Add a disk to the disk table.
+// Return zero if no more room in table.
+//
+externC int disk_register(disk_t *disk);
+
+
+#define diskerr_badname -1
+#define diskerr_partition -2
+#define diskerr_open -3
+#define diskerr_read -4
+
+externC int disk_stream_open(connection_info_t *info, int *err);
+externC void disk_stream_close(int *err);
+externC int disk_stream_read(char *buf, int size, int *err);
+externC char *disk_error(int err);
+
+#endif // CYGONCE_REDBOOT_DISK_H
diff --git a/cesar/ecos/packages/redboot/current/include/fs/e2fs.h b/cesar/ecos/packages/redboot/current/include/fs/e2fs.h
new file mode 100644
index 0000000000..e9b8d55323
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/include/fs/e2fs.h
@@ -0,0 +1,199 @@
+//==========================================================================
+//
+// e2fs.h
+//
+// Second extended filesystem defines.
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): msalter
+// Contributors: msalter
+// Date: 2001-06-25
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#ifndef CYGONCE_REDBOOT_E2FS_H
+#define CYGONCE_REDBOOT_E2FS_H
+
+//
+// Structure of the super block
+//
+struct e2fs_super_block {
+ cyg_uint32 inodes_count;
+ cyg_uint32 blocks_count;
+ cyg_uint32 r_blocks_count;
+ cyg_uint32 free_blocks_count;
+ cyg_uint32 free_inodes_count;
+ cyg_uint32 first_data_block;
+ cyg_uint32 log_block_size;
+ cyg_int32 log_frag_size;
+ cyg_uint32 blocks_per_group;
+ cyg_uint32 frags_per_group;
+ cyg_uint32 inodes_per_group;
+ cyg_uint32 mtime;
+ cyg_uint32 wtime;
+ cyg_uint16 mnt_count;
+ cyg_int16 max_mnt_count;
+ cyg_uint16 magic;
+ cyg_uint16 state;
+ cyg_uint16 errors;
+ cyg_uint16 minor_rev_level;
+ cyg_uint32 lastcheck;
+ cyg_uint32 checkinterval;
+ cyg_uint32 creator_os;
+ cyg_uint32 rev_level;
+ cyg_uint16 def_resuid;
+ cyg_uint16 def_resgid;
+};
+
+#define E2FS_PRE_02B_MAGIC 0xEF51
+#define E2FS_SUPER_MAGIC 0xEF53
+
+#define E2FS_PTRS_PER_BLOCK(e) ((e)->blocksize / sizeof(cyg_uint32))
+
+#define E2FS_BLOCK_SIZE(s) (E2FS_MIN_BLOCK_SIZE << SWAB_LE32((s)->log_block_size))
+#define E2FS_ADDR_PER_BLOCK(s) (E2FS_BLOCK_SIZE(s) / sizeof(unsigned int))
+#define E2FS_BLOCK_SIZE_BITS(s) (SWAB_LE32((s)->log_block_size) + 10)
+
+#define E2FS_NR_DIR_BLOCKS 12
+
+#define E2FS_IND_BLOCK E2FS_NR_DIR_BLOCKS
+#define E2FS_DIND_BLOCK (E2FS_IND_BLOCK + 1)
+#define E2FS_TIND_BLOCK (E2FS_DIND_BLOCK + 1)
+
+#define E2FS_N_BLOCKS (E2FS_TIND_BLOCK + 1)
+
+
+// Structure of an inode on the disk
+//
+typedef struct e2fs_inode {
+ cyg_uint16 mode;
+ cyg_uint16 uid;
+ cyg_uint32 size;
+ cyg_uint32 atime;
+ cyg_uint32 ctime;
+ cyg_uint32 mtime;
+ cyg_uint32 dtime;
+ cyg_uint16 gid;
+ cyg_uint16 links_count;
+ cyg_uint32 blocks;
+ cyg_uint32 flags;
+ cyg_uint32 reserved1;
+ cyg_uint32 block[E2FS_N_BLOCKS];
+ cyg_uint32 version;
+ cyg_uint32 file_acl;
+ cyg_uint32 dir_acl;
+ cyg_uint32 faddr;
+ cyg_uint8 frag;
+ cyg_uint8 fsize;
+ cyg_uint16 pad1;
+ cyg_uint32 reserved2[2];
+} e2fs_inode_t;
+
+
+#define E2FS_INODES_PER_BLOCK(e) ((e)->blocksize / sizeof (struct e2fs_inode))
+
+#define E2FS_MIN_BLOCK_SIZE 1024
+#define E2FS_MAX_BLOCK_SIZE 4096
+
+// Special inode numbers
+//
+#define E2FS_BAD_INO 1
+#define E2FS_ROOT_INO 2
+
+typedef struct e2fs_dir_entry {
+ cyg_uint32 inode;
+ cyg_uint16 reclen;
+ cyg_uint8 namelen;
+ cyg_uint8 filetype;
+ char name[2];
+} e2fs_dir_entry_t;
+
+#define E2FS_FTYPE_UNKNOWN 0
+#define E2FS_FTYPE_REG_FILE 1
+#define E2FS_FTYPE_DIR 2
+#define E2FS_FTYPE_CHRDEV 3
+#define E2FS_FTYPE_BLKDEV 4
+#define E2FS_FTYPE_FIFO 5
+#define E2FS_FTYPE_SOCK 6
+#define E2FS_FTYPE_SYMLINK 7
+
+typedef struct e2fs_group
+{
+ cyg_uint32 block_bitmap; // blocks bitmap block
+ cyg_uint32 inode_bitmap; // inodes bitmap block
+ cyg_uint32 inode_table; // inodes table block
+ cyg_uint16 free_blocks_count;
+ cyg_uint16 free_inodes_count;
+ cyg_uint16 used_dirs_count;
+ cyg_uint16 pad;
+ cyg_uint32 reserved[3];
+} e2fs_group_t;
+
+#define E2FS_BLOCKS_PER_GROUP(s) (SWAB_LE32((s)->blocks_per_group))
+#define E2FS_INODES_PER_GROUP(s) (SWAB_LE32((s)->inodes_per_group))
+
+#define E2FS_GDESC_PER_BLOCK(e) ((e)->blocksize / sizeof (struct e2fs_e2fs_group_desc))
+#define E2FS_GDESC_PER_SECTOR (SECTOR_SIZE/sizeof(e2fs_group_t))
+#define E2FS_GDESC_CACHE_SIZE (E2FS_GDESC_PER_SECTOR * 1)
+#define E2FS_GDESC_PER_SECTOR (SECTOR_SIZE/sizeof(e2fs_group_t))
+
+typedef struct e2fs_desc {
+ partition_t *part; // partition holding this filesystem
+ cyg_uint32 blocksize; // fs blocksize
+ cyg_uint32 ngroups; // number of groups in fs
+ cyg_uint32 blocks_per_group;
+ cyg_uint32 inodes_per_group;
+ cyg_uint32 gdesc_block; // block nr of group descriptors
+ cyg_int32 gdesc_first; // which gdesc is first in cache
+ e2fs_group_t gdesc_cache[E2FS_GDESC_CACHE_SIZE];
+ cyg_uint32 nr_ind_blocks;
+ cyg_uint32 nr_dind_blocks;
+ cyg_uint32 nr_tind_blocks;
+} e2fs_desc_t;
+
+#define E2FS_BLOCK_TO_SECTOR(e,b) ((b) * ((e)->blocksize / SECTOR_SIZE))
+
+extern fs_funs_t redboot_e2fs_funs;
+
+#endif // CYGONCE_REDBOOT_E2FS_H
diff --git a/cesar/ecos/packages/redboot/current/include/fs/fileio.h b/cesar/ecos/packages/redboot/current/include/fs/fileio.h
new file mode 100644
index 0000000000..b4ac7c70a7
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/include/fs/fileio.h
@@ -0,0 +1,61 @@
+//==========================================================================
+//
+// fileio.h
+//
+// Fileio subsystem support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dwmw2
+// Contributors: dwmw2
+// Date: 2003-11-24
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#ifndef CYGONCE_REDBOOT_FILEIO_H
+#define CYGONCE_REDBOOT_FILEIO_H
+
+extern getc_io_funcs_t fileio_io;
+extern int fileio_mounted;
+
+#endif // CYGONCE_REDBOOT_FILEIO_H
diff --git a/cesar/ecos/packages/redboot/current/include/fs/ide.h b/cesar/ecos/packages/redboot/current/include/fs/ide.h
new file mode 100644
index 0000000000..cd8f180d22
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/include/fs/ide.h
@@ -0,0 +1,104 @@
+//==========================================================================
+//
+// ide.h
+//
+// IDE Interface Driver Tables for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): msalter
+// Contributors: msalter
+// Date: 2001-07-06
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#ifndef CYGONCE_REDBOOT_IDE_H
+#define CYGONCE_REDBOOT_IDE_H
+
+// IDE Register Indices
+#define IDE_REG_DATA 0
+#define IDE_REG_ERROR 1
+#define IDE_REG_FEATURES 1
+#define IDE_REG_COUNT 2
+#define IDE_REG_REASON 2 // ATAPI
+#define IDE_REG_LBALOW 3
+#define IDE_REG_LBAMID 4
+#define IDE_REG_LBAHI 5
+#define IDE_REG_DEVICE 6
+#define IDE_REG_STATUS 7
+#define IDE_REG_COMMAND 7
+
+#define IDE_STAT_BSY 0x80
+#define IDE_STAT_DRDY 0x40
+#define IDE_STAT_SERVICE 0x10
+#define IDE_STAT_DRQ 0x08
+#define IDE_STAT_CORR 0x04
+#define IDE_STAT_ERR 0x01
+
+#define IDE_REASON_REL 0x04
+#define IDE_REASON_IO 0x02
+#define IDE_REASON_COD 0x01
+
+//
+// Drive ID offsets of interest
+//
+#define IDE_DEVID_GENCONFIG 0
+#define IDE_DEVID_SERNO 20
+#define IDE_DEVID_MODEL 54
+#define IDE_DEVID_LBA_CAPACITY 120
+
+struct ide_priv {
+ cyg_uint8 controller;
+ cyg_uint8 drive;
+ cyg_uint16 flags;
+};
+
+/* flag values */
+#define IDE_DEV_PRESENT 1 // Device is present
+#define IDE_DEV_PACKET 2 // Supports packet interface
+#define IDE_DEV_ADDR48 3 // Supports 48bit addressing
+
+#define CDROM_SECTOR_SIZE 2048
+#define SECTORS_PER_CDROM_SECTOR (CDROM_SECTOR_SIZE/SECTOR_SIZE)
+
+#endif // CYGONCE_REDBOOT_IDE_H
diff --git a/cesar/ecos/packages/redboot/current/include/net/bootp.h b/cesar/ecos/packages/redboot/current/include/net/bootp.h
new file mode 100644
index 0000000000..eab162a46a
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/include/net/bootp.h
@@ -0,0 +1,318 @@
+//==========================================================================
+//
+// net/bootp.h
+//
+// Stand-alone BOOTP support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+/************************************************************************
+ Copyright 1988, 1991 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted, provided
+that the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of Carnegie Mellon University not be used
+in advertising or publicity pertaining to distribution of the software
+without specific, written prior permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+IN NO EVENT SHALL CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+************************************************************************/
+
+#ifndef _BOOTP_H_
+#define _BOOTP_H_
+
+/*
+ * Bootstrap Protocol (BOOTP). RFC951 and RFC1395.
+ *
+ * This file specifies the "implementation-independent" BOOTP protocol
+ * information which is common to both client and server.
+ *
+ */
+
+#define BP_CHADDR_LEN 16
+#define BP_SNAME_LEN 64
+#define BP_FILE_LEN 128
+#define BP_VEND_LEN 312
+#define BP_MINPKTSZ 300 /* to check sizeof(struct bootp) */
+#define BP_MIN_VEND_SIZE 64 /* minimum actual vendor area */
+
+typedef struct bootp {
+ unsigned char bp_op; /* packet opcode type */
+ unsigned char bp_htype; /* hardware addr type */
+ unsigned char bp_hlen; /* hardware addr length */
+ unsigned char bp_hops; /* gateway hops */
+ unsigned int bp_xid; /* transaction ID */
+ unsigned short bp_secs; /* seconds since boot began */
+ unsigned short bp_flags; /* RFC1532 broadcast, etc. */
+ struct in_addr bp_ciaddr; /* client IP address */
+ struct in_addr bp_yiaddr; /* 'your' IP address */
+ struct in_addr bp_siaddr; /* server IP address */
+ struct in_addr bp_giaddr; /* gateway IP address */
+ unsigned char bp_chaddr[BP_CHADDR_LEN]; /* client hardware address */
+ char bp_sname[BP_SNAME_LEN]; /* server host name */
+ char bp_file[BP_FILE_LEN]; /* boot file name */
+ unsigned char bp_vend[BP_VEND_LEN]; /* vendor-specific area */
+ /* note that bp_vend can be longer, extending to end of packet. */
+} bootp_header_t;
+
+/*
+ * UDP port numbers, server and client.
+ */
+#define IPPORT_BOOTPS 67
+#define IPPORT_BOOTPC 68
+
+#define BOOTREPLY 2
+#define BOOTREQUEST 1
+
+/*
+ * Hardware types from Assigned Numbers RFC.
+ */
+#define HTYPE_ETHERNET 1
+#define HTYPE_EXP_ETHERNET 2
+#define HTYPE_AX25 3
+#define HTYPE_PRONET 4
+#define HTYPE_CHAOS 5
+#define HTYPE_IEEE802 6
+#define HTYPE_ARCNET 7
+
+/*
+ * Vendor magic cookie (v_magic) for CMU
+ */
+#define VM_CMU "CMU"
+
+/*
+ * Vendor magic cookie (v_magic) for RFC1048
+ */
+#define VM_RFC1048 { 99, 130, 83, 99 }
+
+
+
+/*
+ * Tag values used to specify what information is being supplied in
+ * the vendor (options) data area of the packet.
+ */
+/* RFC 1048 */
+/* End of cookie */
+#define TAG_END ((unsigned char) 255)
+/* padding for alignment */
+#define TAG_PAD ((unsigned char) 0)
+/* Subnet mask */
+#define TAG_SUBNET_MASK ((unsigned char) 1)
+/* Time offset from UTC for this system */
+#define TAG_TIME_OFFSET ((unsigned char) 2)
+/* List of routers on this subnet */
+#define TAG_GATEWAY ((unsigned char) 3)
+/* List of rfc868 time servers available to client */
+#define TAG_TIME_SERVER ((unsigned char) 4)
+/* List of IEN 116 name servers */
+#define TAG_NAME_SERVER ((unsigned char) 5)
+/* List of DNS name servers */
+#define TAG_DOMAIN_SERVER ((unsigned char) 6)
+/* List of MIT-LCS UDL log servers */
+#define TAG_LOG_SERVER ((unsigned char) 7)
+/* List of rfc865 cookie servers */
+#define TAG_COOKIE_SERVER ((unsigned char) 8)
+/* List of rfc1179 printer servers (in order to try) */
+#define TAG_LPR_SERVER ((unsigned char) 9)
+/* List of Imagen Impress servers (in prefered order) */
+#define TAG_IMPRESS_SERVER ((unsigned char) 10)
+/* List of rfc887 Resourse Location servers */
+#define TAG_RLP_SERVER ((unsigned char) 11)
+/* Hostname of client */
+#define TAG_HOST_NAME ((unsigned char) 12)
+/* boot file size */
+#define TAG_BOOT_SIZE ((unsigned char) 13)
+/* RFC 1395 */
+/* path to dump to in case of crash */
+#define TAG_DUMP_FILE ((unsigned char) 14)
+/* domain name for use with the DNS */
+#define TAG_DOMAIN_NAME ((unsigned char) 15)
+/* IP address of the swap server for this machine */
+#define TAG_SWAP_SERVER ((unsigned char) 16)
+/* The path name to the root filesystem for this machine */
+#define TAG_ROOT_PATH ((unsigned char) 17)
+/* RFC 1497 */
+/* filename to tftp with more options in it */
+#define TAG_EXTEN_FILE ((unsigned char) 18)
+/* RFC 1533 */
+/* The following are in rfc1533 and may be used by BOOTP/DHCP */
+/* IP forwarding enable/disable */
+#define TAG_IP_FORWARD ((unsigned char) 19)
+/* Non-Local source routing enable/disable */
+#define TAG_IP_NLSR ((unsigned char) 20)
+/* List of pairs of addresses/masks to allow non-local source routing to */
+#define TAG_IP_POLICY_FILTER ((unsigned char) 21)
+/* Maximum size of datagrams client should be prepared to reassemble */
+#define TAG_IP_MAX_DRS ((unsigned char) 22)
+/* Default IP TTL */
+#define TAG_IP_TTL ((unsigned char) 23)
+/* Timeout in seconds to age path MTU values found with rfc1191 */
+#define TAG_IP_MTU_AGE ((unsigned char) 24)
+/* Table of MTU sizes to use when doing rfc1191 MTU discovery */
+#define TAG_IP_MTU_PLAT ((unsigned char) 25)
+/* MTU to use on this interface */
+#define TAG_IP_MTU ((unsigned char) 26)
+/* All subnets are local option */
+#define TAG_IP_SNARL ((unsigned char) 27)
+/* broadcast address */
+#define TAG_IP_BROADCAST ((unsigned char) 28)
+/* perform subnet mask discovery using ICMP */
+#define TAG_IP_SMASKDISC ((unsigned char) 29)
+/* act as a subnet mask server using ICMP */
+#define TAG_IP_SMASKSUPP ((unsigned char) 30)
+/* perform rfc1256 router discovery */
+#define TAG_IP_ROUTERDISC ((unsigned char) 31)
+/* address to send router solicitation requests */
+#define TAG_IP_ROUTER_SOL_ADDR ((unsigned char) 32)
+/* list of static routes to addresses (addr, router) pairs */
+#define TAG_IP_STATIC_ROUTES ((unsigned char) 33)
+/* use trailers (rfc893) when using ARP */
+#define TAG_IP_TRAILER_ENC ((unsigned char) 34)
+/* timeout in seconds for ARP cache entries */
+#define TAG_ARP_TIMEOUT ((unsigned char) 35)
+/* use either Ethernet version 2 (rfc894) or IEEE 802.3 (rfc1042) */
+#define TAG_ETHER_IEEE ((unsigned char) 36)
+/* default TCP TTL when sending TCP segments */
+#define TAG_IP_TCP_TTL ((unsigned char) 37)
+/* time for client to wait before sending a keepalive on a TCP connection */
+#define TAG_IP_TCP_KA_INT ((unsigned char) 38)
+/* don't send keepalive with an octet of garbage for compatability */
+#define TAG_IP_TCP_KA_GARBAGE ((unsigned char) 39)
+/* NIS domainname */
+#define TAG_NIS_DOMAIN ((unsigned char) 40)
+/* list of NIS servers */
+#define TAG_NIS_SERVER ((unsigned char) 41)
+/* list of NTP servers */
+#define TAG_NTP_SERVER ((unsigned char) 42)
+/* and stuff vendors may want to add */
+#define TAG_VEND_SPECIFIC ((unsigned char) 43)
+/* NetBios over TCP/IP name server */
+#define TAG_NBNS_SERVER ((unsigned char) 44)
+/* NetBios over TCP/IP NBDD servers (rfc1001/1002) */
+#define TAG_NBDD_SERVER ((unsigned char) 45)
+/* NetBios over TCP/IP node type option for use with above */
+#define TAG_NBOTCP_OTPION ((unsigned char) 46)
+/* NetBios over TCP/IP scopt option for use with above */
+#define TAG_NB_SCOPE ((unsigned char) 47)
+/* list of X Window system font servers */
+#define TAG_XFONT_SERVER ((unsigned char) 48)
+/* list of systems running X Display Manager (xdm) available to this client */
+#define TAG_XDISPLAY_SERVER ((unsigned char) 49)
+
+/* While the following are only allowed for DHCP */
+/* DHCP requested IP address */
+#define TAG_DHCP_REQ_IP ((unsigned char) 50)
+/* DHCP time for lease of IP address */
+#define TAG_DHCP_LEASE_TIME ((unsigned char) 51)
+/* DHCP options overload */
+#define TAG_DHCP_OPTOVER ((unsigned char) 52)
+/* DHCP message type */
+#define TAG_DHCP_MESS_TYPE ((unsigned char) 53)
+/* DHCP server identification */
+#define TAG_DHCP_SERVER_ID ((unsigned char) 54)
+/* DHCP ordered list of requested parameters */
+#define TAG_DHCP_PARM_REQ_LIST ((unsigned char) 55)
+/* DHCP reply message */
+#define TAG_DHCP_TEXT_MESSAGE ((unsigned char) 56)
+/* DHCP maximum packet size willing to accept */
+#define TAG_DHCP_MAX_MSGSZ ((unsigned char) 57)
+/* DHCP time 'til client needs to renew */
+#define TAG_DHCP_RENEWAL_TIME ((unsigned char) 58)
+/* DHCP time 'til client needs to rebind */
+#define TAG_DHCP_REBIND_TIME ((unsigned char) 59)
+/* DHCP class identifier */
+#define TAG_DHCP_CLASSID ((unsigned char) 60)
+/* DHCP client unique identifier */
+#define TAG_DHCP_CLIENTID ((unsigned char) 61)
+
+/* XXX - Add new tags here */
+
+/* DHCP Message Types */
+#define DHCP_MESS_TYPE_DISCOVER ((unsigned char) 1)
+#define DHCP_MESS_TYPE_OFFER ((unsigned char) 2)
+#define DHCP_MESS_TYPE_REQUEST ((unsigned char) 3)
+#define DHCP_MESS_TYPE_DECLINE ((unsigned char) 4)
+#define DHCP_MESS_TYPE_ACK ((unsigned char) 5)
+#define DHCP_MESS_TYPE_NAK ((unsigned char) 6)
+#define DHCP_MESS_TYPE_RELEASE ((unsigned char) 7)
+
+/*
+ * "vendor" data permitted for CMU bootp clients.
+ */
+
+struct cmu_vend {
+ char v_magic[4]; /* magic number */
+ unsigned int v_flags; /* flags/opcodes, etc. */
+ struct in_addr v_smask; /* Subnet mask */
+ struct in_addr v_dgate; /* Default gateway */
+ struct in_addr v_dns1, v_dns2; /* Domain name servers */
+ struct in_addr v_ins1, v_ins2; /* IEN-116 name servers */
+ struct in_addr v_ts1, v_ts2; /* Time servers */
+ int v_unused[6]; /* currently unused */
+};
+
+
+/* v_flags values */
+#define VF_SMASK 1 /* Subnet mask field contains valid data */
+
+#define IPPORT_BOOTPS 67
+#define IPPORT_BOOTPC 68
+
+#endif // _BOOTP_H_
diff --git a/cesar/ecos/packages/redboot/current/include/net/http.h b/cesar/ecos/packages/redboot/current/include/net/http.h
new file mode 100644
index 0000000000..14fd290db9
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/include/net/http.h
@@ -0,0 +1,72 @@
+//==========================================================================
+//
+// net/http.h
+//
+// Stand-alone HTTP (client) support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2002-05-22
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#ifndef _HTTP_H_
+#define _HTTP_H_
+
+extern int http_stream_open(connection_info_t *info, int *err);
+extern int http_stream_read(char *buf, int len, int *err);
+extern void http_stream_close(int *err);
+extern char *http_error(int err);
+
+#define HTTP_NOERR 0 // No error
+#define HTTP_BADHDR 1 // Invalid HTTP header (response)
+#define HTTP_OPEN 2 // Problems opening connection
+#define HTTP_IO 3 // Misc I/O problems
+#define HTTP_BADREQ 4 // Bad request
+#define HTTP_NOFILE 5 // No such file
+
+extern getc_io_funcs_t http_io;
+#endif // _HTTP_H_
diff --git a/cesar/ecos/packages/redboot/current/include/net/net.h b/cesar/ecos/packages/redboot/current/include/net/net.h
new file mode 100644
index 0000000000..c7d83a5157
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/include/net/net.h
@@ -0,0 +1,644 @@
+//==========================================================================
+//
+// net/net.h
+//
+// Stand-alone networking support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+// Copyright (C) 2002, 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#ifndef _NET_H_
+#define _NET_H_
+
+#include <pkgconf/system.h>
+#include <pkgconf/redboot.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/basetype.h>
+#include <string.h>
+
+extern bool net_debug;
+#ifdef CYGPKG_IO_ETH_DRIVERS
+# include <pkgconf/io_eth_drivers.h>
+# include <cyg/io/eth/eth_drv.h> // Logical driver interfaces
+# ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG
+extern int cyg_io_eth_net_debug;
+# endif
+#endif
+
+extern unsigned long do_ms_tick(void);
+extern unsigned long get_ms_ticks(void);
+#define MS_TICKS() get_ms_ticks()
+#define MS_TICKS_DELAY() do_ms_tick()
+
+/* #define NET_SUPPORT_RARP 1 */
+#define NET_SUPPORT_ICMP 1
+#define NET_SUPPORT_UDP 1
+#define NET_SUPPORT_TCP 1
+
+#if (CYG_BYTEORDER == CYG_LSBFIRST)
+#ifndef __LITTLE_ENDIAN__
+#define __LITTLE_ENDIAN__
+#endif
+extern unsigned long ntohl(unsigned long x);
+extern unsigned short ntohs(unsigned short x);
+#else
+#define ntohl(x) (x)
+#define ntohs(x) (x)
+#endif
+
+#define htonl(x) ntohl(x)
+#define htons(x) ntohs(x)
+
+/*
+ * Minimum ethernet packet length.
+ */
+#define ETH_MIN_PKTLEN 60
+#define ETH_MAX_PKTLEN (1540-14)
+#define ETH_HDR_SIZE 14
+
+typedef unsigned char enet_addr_t[6];
+typedef unsigned char ip_addr_t[4];
+
+typedef unsigned char octet;
+typedef unsigned short word;
+typedef unsigned int dword;
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+// IPv4 support
+typedef struct in_addr {
+ unsigned long s_addr; // IPv4 address
+} in_addr_t;
+
+// Socket/connection information
+struct sockaddr_in {
+ struct in_addr sin_addr;
+ unsigned short sin_port;
+ unsigned short sin_family;
+ short sin_len;
+};
+#define AF_INET 1
+#define INADDR_ANY 0
+
+struct timeval {
+ unsigned long tv_sec;
+ unsigned long tv_usec;
+};
+
+/*
+ * Simple timer support structure.
+ */
+typedef void (*tmr_handler_t)(void *user_data);
+
+/*
+ * Timer structure.
+ * When expiration time is met or exceeded, the handler is
+ * called and the timer struct is removed from the list.
+ */
+typedef struct _timer {
+ struct _timer *next; /* next timer in list */
+ unsigned long delay; /* expiration time relative to start time */
+ unsigned long start; /* when the timer was set */
+ tmr_handler_t handler; /* user procedure to call when timer 'fires' */
+ void *user_data; /* user pointer passed to above procedure */
+} timer_t;
+
+
+/*
+ * Ethernet header.
+ */
+typedef struct {
+ enet_addr_t destination;
+ enet_addr_t source;
+ word type;
+#define ETH_TYPE_IP 0x800
+#define ETH_TYPE_ARP 0x806
+#define ETH_TYPE_RARP 0x8053
+} eth_header_t;
+
+
+/*
+ * ARP/RARP header.
+ */
+typedef struct {
+ word hw_type;
+#define ARP_HW_ETHER 1
+#define ARP_HW_EXP_ETHER 2
+ word protocol;
+ octet hw_len;
+ octet proto_len;
+ word opcode;
+#define ARP_REQUEST 1
+#define ARP_REPLY 2
+#define RARP_REQUEST 3
+#define RARP_REPLY 4
+ enet_addr_t sender_enet;
+ ip_addr_t sender_ip;
+ enet_addr_t target_enet;
+ ip_addr_t target_ip;
+} arp_header_t;
+
+
+#define ARP_PKT_SIZE (sizeof(arp_header_t) + ETH_HDR_SIZE)
+
+/*
+ * Internet Protocol header.
+ */
+typedef struct {
+#ifdef __LITTLE_ENDIAN__
+ octet hdr_len:4,
+ version:4;
+#else
+ octet version:4,
+ hdr_len:4;
+#endif
+ octet tos;
+ word length;
+ word ident;
+ word fragment;
+ octet ttl;
+ octet protocol;
+#define IP_PROTO_ICMP 1
+#define IP_PROTO_TCP 6
+#define IP_PROTO_UDP 17
+ word checksum;
+ ip_addr_t source;
+ ip_addr_t destination;
+} ip_header_t;
+
+
+#define IP_PKT_SIZE (60 + ETH_HDR_SIZE)
+
+
+/*
+ * A IP<->ethernet address mapping.
+ */
+typedef struct {
+ ip_addr_t ip_addr;
+ enet_addr_t enet_addr;
+} ip_route_t;
+
+
+/*
+ * UDP header.
+ */
+typedef struct {
+ word src_port;
+ word dest_port;
+ word length;
+ word checksum;
+} udp_header_t;
+
+
+/*
+ * TCP header.
+ */
+typedef struct {
+ word src_port;
+ word dest_port;
+ dword seqnum;
+ dword acknum;
+#ifdef __LITTLE_ENDIAN__
+ octet reserved:4,
+ hdr_len:4;
+#else
+ octet hdr_len:4,
+ reserved:4;
+#endif
+ octet flags;
+#define TCP_FLAG_FIN 1
+#define TCP_FLAG_SYN 2
+#define TCP_FLAG_RST 4
+#define TCP_FLAG_PSH 8
+#define TCP_FLAG_ACK 16
+#define TCP_FLAG_URG 32
+ word window;
+ word checksum;
+ word urgent;
+} tcp_header_t;
+
+
+/*
+ * ICMP header.
+ */
+typedef struct {
+ octet type;
+#define ICMP_TYPE_ECHOREPLY 0
+#define ICMP_TYPE_ECHOREQUEST 8
+ octet code;
+ word checksum;
+ word ident;
+ word seqnum;
+} icmp_header_t;
+
+typedef struct _pktbuf {
+ struct _pktbuf *next;
+ union {
+ ip_header_t *__iphdr; /* pointer to IP header */
+ arp_header_t *__arphdr; /* pointer to ARP header */
+ } u1;
+#define ip_hdr u1.__iphdr
+#define arp_hdr u1.__arphdr
+ union {
+ udp_header_t *__udphdr; /* pointer to UDP header */
+ tcp_header_t *__tcphdr; /* pointer to TCP header */
+ icmp_header_t *__icmphdr; /* pointer to ICMP header */
+ } u2;
+#define udp_hdr u2.__udphdr
+#define tcp_hdr u2.__tcphdr
+#define icmp_hdr u2.__icmphdr
+ word pkt_bytes; /* number of data bytes in buf */
+ word bufsize; /* size of buf */
+ word *buf;
+} pktbuf_t;
+
+
+/* protocol handler */
+typedef void (*pkt_handler_t)(pktbuf_t *pkt, eth_header_t *eth_hdr);
+
+/* ICMP fielder */
+typedef void (*icmp_handler_t)(pktbuf_t *pkt, ip_route_t *src_route);
+
+typedef struct _udp_socket {
+ struct _udp_socket *next;
+ word our_port;
+ word pad;
+ void (*handler)(struct _udp_socket *skt, char *buf, int len,
+ ip_route_t *src_route, word src_port);
+} udp_socket_t;
+
+
+typedef void (*udp_handler_t)(udp_socket_t *skt, char *buf, int len,
+ ip_route_t *src_route, word src_port);
+
+
+typedef struct _tcp_socket {
+ struct _tcp_socket *next;
+ int state; /* connection state */
+#define _CLOSED 0
+#define _LISTEN 1
+#define _SYN_RCVD 2
+#define _SYN_SENT 3
+#define _ESTABLISHED 4
+#define _CLOSE_WAIT 5
+#define _LAST_ACK 6
+#define _FIN_WAIT_1 7
+#define _FIN_WAIT_2 8
+#define _CLOSING 9
+#define _TIME_WAIT 10
+ ip_route_t his_addr; /* address of other end of connection */
+ word our_port;
+ word his_port;
+ word data_bytes; /* number of data bytes in pkt */
+ char reuse; /* SO_REUSEADDR, no 2MSL */
+ timer_t timer;
+ pktbuf_t pkt; /* dedicated xmit packet */
+ pktbuf_t *rxlist; /* list of unread incoming data packets */
+ char *rxptr; /* pointer to next byte to read */
+ int rxcnt; /* bytes left in current read packet */
+ dword ack;
+ dword seq;
+ char pktbuf[ETH_MAX_PKTLEN];
+} tcp_socket_t;
+
+/*
+ * Address information for local device
+ */
+#define __local_enet_addr __local_enet_sc->sc_arpcom.esa
+extern ip_addr_t __local_ip_addr;
+#ifdef CYGSEM_REDBOOT_NETWORKING_USE_GATEWAY
+extern ip_addr_t __local_ip_gate;
+extern ip_addr_t __local_ip_mask;
+#endif
+
+#ifdef CYGPKG_REDBOOT_NETWORKING_DNS
+extern struct in_addr __bootp_dns_addr;
+extern cyg_bool __bootp_dns_set;
+#endif
+
+
+/*
+ * Set a timer. Caller is responsible for providing the timer_t struct.
+ */
+extern void __timer_set(timer_t *t, unsigned long delay,
+ tmr_handler_t handler, void *user_data);
+
+/*
+ * Cancel the given timer.
+ */
+extern void __timer_cancel(timer_t *t);
+
+/*
+ * Poll timer list for timer expirations.
+ */
+extern void __timer_poll(void);
+
+/*
+ * Initialize the free list.
+ */
+extern void __pktbuf_init(void);
+
+/*
+ * simple pktbuf allocation.
+ * allocates at least nbytes for packet data including ethernet header.
+ */
+extern pktbuf_t *__pktbuf_alloc(int nbytes);
+
+/*
+ * return a pktbuf for reuse.
+ */
+extern void __pktbuf_free(pktbuf_t *pkt);
+
+/*
+ * Dump packet structures (debug, in case of running out)
+ */
+extern void __pktbuf_dump(void);
+
+
+/*
+ * Install handlers for ethernet packets.
+ * Returns old handler.
+ */
+extern pkt_handler_t __eth_install_listener(int eth_type,
+ pkt_handler_t handler);
+extern void __eth_remove_listener(int eth_type);
+
+/*
+ * Non-blocking poll of ethernet link. Processes all pending
+ * input packets.
+ */
+extern void __enet_poll(void);
+
+/*
+ * Send an ethernet packet.
+ */
+extern void __enet_send(pktbuf_t *pkt, enet_addr_t *dest, int eth_type);
+
+#ifdef CYGSEM_REDBOOT_NETWORKING_USE_GATEWAY
+/*
+ * return true if addr is on local subnet
+ */
+extern int __ip_addr_local(ip_addr_t *addr);
+#endif
+
+/*
+ * Handle incoming ARP packets.
+ */
+extern void __arp_handler(pktbuf_t *pkt);
+
+/*
+ * Find the ethernet address of the machine with the given
+ * ip address.
+ * Return true and fills in 'eth_addr' if successful, false
+ * if unsuccessful.
+ */
+extern int __arp_request(ip_addr_t *ip_addr, enet_addr_t *eth_addr, int allow_self);
+
+/*
+ * Lookup an address from the local ARP cache. If not found,
+ * then call 'arp_request' to find it. [Basically just a cached
+ * version of 'arp_request']
+ */
+extern int __arp_lookup(ip_addr_t *host, ip_route_t *rt);
+
+/*
+ * Do a one's complement checksum.
+ * The data being checksum'd is in network byte order.
+ * The returned checksum is in network byte order.
+ */
+extern unsigned short __sum(word *w, int len, int init_sum);
+
+/*
+ * Compute a partial checksum for the UDP/TCP pseudo header.
+ */
+extern int __pseudo_sum(ip_header_t *ip);
+
+/*
+ * Handle IP packets coming from the polled ethernet interface.
+ */
+extern void __ip_handler(pktbuf_t *pkt, enet_addr_t *src_enet_addr);
+
+/*
+ * Send an IP packet.
+ *
+ * The IP data field should contain pkt->pkt_bytes of data.
+ * pkt->[udp|tcp|icmp]_hdr points to the IP data field. Any
+ * IP options are assumed to be already in place in the IP
+ * options field. Returns 0 for success.
+ */
+extern int __ip_send(pktbuf_t *pkt, int protocol, ip_route_t *dest);
+
+/*
+ * Abort connection.
+ */
+extern void __tcp_abort(tcp_socket_t *s, unsigned long delay);
+
+/*
+ * Handle incoming ICMP packets.
+ */
+extern void __icmp_handler(pktbuf_t *pkt, ip_route_t *r);
+extern int __icmp_install_listener(icmp_handler_t handler);
+extern void __icmp_remove_listener(void);
+
+/*
+ * Handle incoming UDP packets.
+ */
+extern void __udp_handler(pktbuf_t *pkt, ip_route_t *r);
+
+/*
+ * Install a handler for incoming udp packets.
+ * Caller provides the udp_socket_t structure.
+ * Returns zero if successful, -1 if socket is already used.
+ */
+extern int __udp_install_listener(udp_socket_t *s, word port,
+ udp_handler_t handler);
+
+/*
+ * Remove the handler for the given socket.
+ */
+extern void __udp_remove_listener(word port);
+
+/*
+ * Send a UDP packet.
+ */
+extern int __udp_send(char *buf, int len, ip_route_t *dest_ip,
+ word dest_port, word src_port);
+
+// Send a UDP packet
+extern int __udp_sendto(char *buf, int len,
+ struct sockaddr_in *server, struct sockaddr_in *local);
+
+// Receive a UDP packet
+extern int __udp_recvfrom(char *buf, int len,
+ struct sockaddr_in *from, struct sockaddr_in *local,
+ struct timeval *timeout);
+
+/*
+ * TCP poll function. Should be called as often as possible.
+ */
+extern void __tcp_poll(void);
+
+/*
+ * Initiate outgoing connection, waiting for at most timeout seconds.
+ */
+extern int __tcp_open(tcp_socket_t *s, struct sockaddr_in *host,
+ word port, int timeout, int *err);
+
+/*
+ * Set up a listening socket on the given port.
+ * Does not block.
+ */
+extern int __tcp_listen(tcp_socket_t *s, word port);
+
+/*
+ * SO_REUSEADDR, no 2MSL.
+ */
+extern void __tcp_so_reuseaddr(tcp_socket_t *s);
+
+/*
+ * Block while waiting for all outstanding socket data to
+ * be transmitted.
+ */
+extern void __tcp_drain(tcp_socket_t *s);
+
+/*
+ * Initiate connection close.
+ */
+extern void __tcp_close(tcp_socket_t *s);
+
+/*
+ * Wait until connection has fully closed.
+ */
+extern void __tcp_close_wait(tcp_socket_t *s);
+
+/*
+ * Read up to 'len' bytes without blocking.
+ * Returns number of bytes read.
+ * If connection is closed, returns -1.
+ */
+extern int __tcp_read(tcp_socket_t *s, char *buf, int len);
+
+/*
+ * Write up to 'len' bytes without blocking.
+ * Returns number of bytes written.
+ * If connection is closed, returns -1.
+ */
+extern int __tcp_write(tcp_socket_t *s, char *buf, int len);
+
+/*
+ * Write up to 'len' bytes, blocking until sent (not ACK'd).
+ * Returns number of bytes written.
+ * If connection is closed, returns -1.
+ */
+extern int __tcp_write_block(tcp_socket_t *s, char *buf, int len);
+
+
+/*
+ * The following are a higher-level tcp socket interface.
+ */
+
+/*
+ * Initialize a socket for given port.
+ */
+extern void __skt_init(tcp_socket_t *s, unsigned short port);
+
+/*
+ * Return true if socket connection is closed.
+ */
+#define __skt_is_closed(s) (((tcp_socket_t *)(s))->state == _CLOSED)
+
+/*
+ * Block while listening for an incoming connection.
+ */
+extern void __skt_wait_for_connect(tcp_socket_t *s);
+
+/*
+ * Read up to 'len' bytes from the given socket.
+ * Returns number of bytes read.
+ * Doesn't block.
+ */
+extern int __skt_read(tcp_socket_t *s, char *buf, int len);
+
+/*
+ * Write 'len' bytes to the given socket.
+ * Returns number of bytes written.
+ * May not write all data if connection closes.
+ */
+extern int __skt_write(tcp_socket_t *s, char *buf, int len);
+
+// Initialize the network stack - logical driver layer, etc.
+extern void net_init(void);
+
+// Test for new network I/O connections
+extern void net_io_test(bool is_idle);
+
+// Conversion between IP addresses and printable strings
+extern bool inet_aton(const char *, in_addr_t *);
+extern char *inet_ntoa(in_addr_t *);
+
+// Network device table access
+extern const char *net_devname(unsigned index);
+extern int net_devindex(char *name);
+
+// FIXME
+/* #define NET_SUPPORT_RARP 1 */
+#define NET_SUPPORT_ICMP 1
+#define NET_SUPPORT_UDP 1
+#define NET_SUPPORT_TCP 1
+
+#ifdef BSP_LOG
+#define BSPLOG(x) { int old_console = start_console(); x; end_console(old_console); }
+#define bsp_log diag_printf
+#else
+#define BSPLOG(x)
+#endif
+
+#endif // _NET_H_
diff --git a/cesar/ecos/packages/redboot/current/include/net/tftp.h b/cesar/ecos/packages/redboot/current/include/net/tftp.h
new file mode 100644
index 0000000000..45709bada9
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/include/net/tftp.h
@@ -0,0 +1,146 @@
+//==========================================================================
+//
+// net/tftp.h
+//
+// Stand-alone TFTP support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//####BSDCOPYRIGHTBEGIN####
+//
+// -------------------------------------------
+//
+// Portions of this software may have been derived from OpenBSD or other sources,
+// and are covered by the appropriate copyright disclaimers included herein.
+//
+// -------------------------------------------
+//
+//####BSDCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)tftp.h 5.4 (Berkeley) 4/3/91
+ */
+
+#ifndef _ARPA_TFTP_H_
+#define _ARPA_TFTP_H_
+
+/*
+ * Trivial File Transfer Protocol (IEN-133)
+ * Now, rev 2 - RFC 1350
+ */
+#define SEGSIZE 512 /* data segment size */
+
+/*
+ * Packet types.
+ */
+#define RRQ 01 /* read request */
+#define WRQ 02 /* write request */
+#define DATA 03 /* data packet */
+#define ACK 04 /* acknowledgement */
+#define ERROR 05 /* error code */
+
+struct tftphdr {
+ short th_opcode; /* packet type */
+ union {
+ unsigned short tu_block; /* block # */
+ short tu_code; /* error code */
+ char tu_stuff[1]; /* request packet stuff */
+ } __attribute__ ((packed)) th_u;
+ char th_data[0]; /* data or error string */
+} __attribute__ ((packed));
+
+#define th_block th_u.tu_block
+#define th_code th_u.tu_code
+#define th_stuff th_u.tu_stuff
+#define th_msg th_data
+
+/*
+ * Error codes.
+ */
+#define EUNDEF 0 /* not defined */
+#define ENOTFOUND 1 /* file not found */
+#define EACCESS 2 /* access violation */
+#define ENOSPACE 3 /* disk full or allocation exceeded */
+#define EBADOP 4 /* illegal TFTP operation */
+#define EBADID 5 /* unknown transfer ID */
+#define EEXISTS 6 /* file already exists */
+#define ENOUSER 7 /* no such user */
+
+#endif /* !_ARPA_TFTP_H_ */
diff --git a/cesar/ecos/packages/redboot/current/include/net/tftp_support.h b/cesar/ecos/packages/redboot/current/include/net/tftp_support.h
new file mode 100644
index 0000000000..7ff6989321
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/include/net/tftp_support.h
@@ -0,0 +1,100 @@
+//==========================================================================
+//
+// net/tftp_support.h
+//
+// Stand-alone TFTP support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#ifndef _TFTP_SUPPORT_H_
+#define _TFTP_SUPPORT_H_
+
+#include "net.h"
+
+/*
+ * File transfer modes
+ */
+#define TFTP_NETASCII 0 // Text files
+#define TFTP_OCTET 1 // Binary files
+
+/*
+ * Errors
+ */
+#define TFTP_ENOTFOUND 1 /* file not found */
+#define TFTP_EACCESS 2 /* access violation */
+#define TFTP_ENOSPACE 3 /* disk full or allocation exceeded */
+#define TFTP_EBADOP 4 /* illegal TFTP operation */
+#define TFTP_EBADID 5 /* unknown transfer ID */
+#define TFTP_EEXISTS 6 /* file already exists */
+#define TFTP_ENOUSER 7 /* no such user */
+#define TFTP_TIMEOUT 8 /* operation timed out */
+#define TFTP_NETERR 9 /* some sort of network error */
+#define TFTP_INVALID 10 /* invalid parameter */
+#define TFTP_PROTOCOL 11 /* protocol violation */
+#define TFTP_TOOLARGE 12 /* file is larger than buffer */
+
+/*
+ * Client support
+ */
+
+extern int tftp_stream_open(connection_info_t *info, int *err);
+extern int tftp_stream_read(char *buf, int len, int *err);
+extern void tftp_stream_close(int *err);
+extern char *tftp_error(int err);
+
+#define TFTP_TIMEOUT_PERIOD 5
+#define TFTP_TIMEOUT_MAX 15
+#define TFTP_RETRIES_MAX 5
+
+#define TFTP_PORT 69
+
+extern getc_io_funcs_t tftp_io;
+
+#endif // _TFTP_SUPPORT_H_
diff --git a/cesar/ecos/packages/redboot/current/include/redboot.h b/cesar/ecos/packages/redboot/current/include/redboot.h
new file mode 100644
index 0000000000..c541affce0
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/include/redboot.h
@@ -0,0 +1,508 @@
+//==========================================================================
+//
+// redboot.h
+//
+// Standard interfaces for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas, tkoeller
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#ifndef _REDBOOT_H_
+#define _REDBOOT_H_
+
+#include <pkgconf/redboot.h>
+#include <pkgconf/hal.h>
+#include <cyg/hal/hal_if.h>
+#include <cyg/hal/hal_tables.h>
+#include <cyg/hal/hal_endian.h>
+#include <cyg/infra/diag.h>
+#include <cyg/crc/crc.h>
+#include <string.h>
+
+#ifdef CYGPKG_REDBOOT_NETWORKING
+#include <net/net.h>
+#include <net/bootp.h>
+// Determine an IP address for this node, using BOOTP
+extern int __bootp_find_local_ip(bootp_header_t *info);
+#endif
+
+#ifdef DEFINE_VARS
+#define EXTERN
+#else
+#define EXTERN extern
+#endif
+
+// Global variables
+EXTERN int argc;
+#define MAX_ARGV 16
+EXTERN char *argv[MAX_ARGV];
+EXTERN unsigned char *ram_start, *ram_end;
+EXTERN struct _mem_segment {
+ unsigned char *start, *end;
+} mem_segments[CYGBLD_REDBOOT_MAX_MEM_SEGMENTS];
+#define NO_MEMORY (unsigned char *)0xFFFFFFFF
+EXTERN bool valid_address(unsigned char *addr);
+EXTERN void cyg_plf_memory_segment(int seg, unsigned char **start, unsigned char **end);
+EXTERN unsigned char *workspace_start, *workspace_end;
+
+// Data squirreled away after a load operation
+EXTERN unsigned long entry_address;
+EXTERN unsigned long load_address;
+EXTERN unsigned long load_address_end;
+
+
+#ifdef CYGPKG_REDBOOT_ANY_CONSOLE
+EXTERN bool console_selected;
+#endif
+EXTERN bool console_echo;
+EXTERN bool gdb_active;
+#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0
+EXTERN bool cmd_history;
+#endif
+
+#ifdef CYGPKG_REDBOOT_NETWORKING
+EXTERN bool have_net, use_bootp;
+EXTERN bootp_header_t my_bootp_info;
+EXTERN int gdb_port;
+EXTERN bool net_debug;
+#endif
+
+#ifdef CYGFUN_REDBOOT_BOOT_SCRIPT
+EXTERN unsigned char *script;
+EXTERN int script_timeout;
+#ifdef CYGSEM_REDBOOT_VARIABLE_BAUD_RATE
+EXTERN int console_baud_rate;
+#endif
+#endif
+
+#ifdef CYGOPT_REDBOOT_FIS_ZLIB_COMMON_BUFFER
+EXTERN unsigned char *fis_zlib_common_buffer;
+#endif
+
+#ifdef CYGSEM_REDBOOT_PLF_STARTUP
+EXTERN void cyg_plf_redboot_startup(void);
+#endif
+
+// Prototypes
+typedef int _printf_fun(const char *fmt, ...);
+externC int strcasecmp(const char *s1, const char *s2);
+externC int strncasecmp(const char *s1, const char *s2, size_t len);
+
+externC void mon_write_char(char c);
+externC bool verify_action(char *fmt, ...);
+externC bool verify_action_with_timeout(int timeout, char *fmt, ...);
+
+// Read a single line of input from the console, possibly with timeout
+externC int _rb_gets(char *line, int len, int timeout);
+// Just like _rb_gets(), except that the line buffer is assumed to contain
+// valid input data. This provides an easy mechanism for edit-in-place.
+externC int _rb_gets_preloaded(char *line, int len, int timeout);
+// Result codes from 'gets()'
+#define _GETS_TIMEOUT -1
+#define _GETS_CTRLC -2
+#define _GETS_GDB 0
+#define _GETS_OK 1
+// Test for ^C on the console. This function should only be used if any
+// other console input can be discarded, e.g. while performing some long
+// computation, waiting for the network, etc. Returns 'true' if ^C typed.
+externC bool _rb_break(int timeout);
+
+// "console" selection
+externC int start_console(void);
+externC void end_console(int old_console);
+
+// Alias functions
+#ifdef CYGSEM_REDBOOT_FLASH_ALIASES
+externC char *flash_lookup_alias(char *alias, char *alias_buf);
+#endif
+externC void expand_aliases(char *line, int len);
+
+//
+// Stream I/O support
+//
+
+typedef struct {
+ char *filename;
+ int mode;
+ int chan;
+#ifdef CYGPKG_REDBOOT_NETWORKING
+ struct sockaddr_in *server;
+#endif
+} connection_info_t;
+
+typedef struct {
+ int (*open)(connection_info_t *info, int *err);
+ void (*close)(int *err);
+ void (*terminate)(bool abort, int (*getc)(void));
+ int (*read)(char *buf, int size, int *err);
+ char *(*error)(int err);
+} getc_io_funcs_t;
+
+#define GETC_IO_FUNCS(_label_, _open_, _close_, _terminate_, _read_, _error_) \
+getc_io_funcs_t _label_ = { \
+ _open_, _close_, _terminate_, _read_, _error_ \
+};
+
+struct load_io_entry {
+ char *name;
+ getc_io_funcs_t *funcs;
+ bool can_verbose;
+ bool need_filename;
+ int mode;
+} CYG_HAL_TABLE_TYPE;
+#define _RedBoot_load(_name_,_funcs_,_verbose_,_filename_,_mode_) \
+struct load_io_entry _load_tab_##_funcs_##_name_ \
+ CYG_HAL_TABLE_QUALIFIED_ENTRY(RedBoot_load,_funcs_##_name) = \
+ { #_name_, &_funcs_, _verbose_, _filename_, _mode_ };
+#define RedBoot_load(_name_,_funcs_,_verbose_,_filename_, _mode_) \
+ _RedBoot_load(_name_,_funcs_,_verbose_,_filename_,_mode_)
+
+#ifdef CYGPKG_COMPRESS_ZLIB
+// Decompression support
+typedef struct _pipe {
+ unsigned char* in_buf; // only changed by producer
+ int in_avail; // only changed by producer
+ unsigned char* out_buf; // only changed by consumer (init by producer)
+ int out_size; // only changed by consumer (init by producer)
+ int out_max; // set by producer
+ const char* msg; // message from consumer
+ void* priv; // handler's data
+} _pipe_t;
+
+typedef int _decompress_fun_init(_pipe_t*);
+typedef int _decompress_fun_inflate(_pipe_t*);
+typedef int _decompress_fun_close(_pipe_t*, int);
+
+externC _decompress_fun_init* _dc_init;
+externC _decompress_fun_inflate* _dc_inflate;
+externC _decompress_fun_close* _dc_close;
+#endif // CYGPKG_COMPRESS_ZLIB
+
+// CLI support functions
+externC bool parse_num(char *s, unsigned long *val, char **es, char *delim);
+externC bool parse_bool(char *s, bool *val);
+
+typedef void cmd_fun(int argc, char *argv[]);
+struct cmd {
+ char *str;
+ char *help;
+ char *usage;
+ cmd_fun *fun;
+ struct cmd *sub_cmds, *sub_cmds_end;
+} CYG_HAL_TABLE_TYPE;
+externC struct cmd *cmd_search(struct cmd *tab, struct cmd *tabend, char *arg);
+externC void cmd_usage(struct cmd *tab, struct cmd *tabend, char *prefix);
+#define RedBoot_cmd(_s_,_h_,_u_,_f_) cmd_entry(_s_,_h_,_u_,_f_,0,0,RedBoot_commands)
+#define RedBoot_nested_cmd(_s_,_h_,_u_,_f_,_subs_,_sube_) cmd_entry(_s_,_h_,_u_,_f_,_subs_,_sube_,RedBoot_commands)
+#define _cmd_entry(_s_,_h_,_u_,_f_,_subs_,_sube_,_n_) \
+cmd_fun _f_; \
+struct cmd _cmd_tab_##_f_ CYG_HAL_TABLE_QUALIFIED_ENTRY(_n_,_f_) = {_s_, _h_, _u_, _f_, _subs_, _sube_};
+#define cmd_entry(_s_,_h_,_u_,_f_,_subs_,_sube_,_n_) \
+extern _cmd_entry(_s_,_h_,_u_,_f_,_subs_,_sube_,_n_)
+#define local_cmd_entry(_s_,_h_,_u_,_f_,_n_) \
+static _cmd_entry(_s_,_h_,_u_,_f_,0,0,_n_)
+
+// Initialization functions
+#define RedBoot_INIT_FIRST 0000
+#define RedBoot_INIT_SECOND 0100
+// Specify a 3 digit numeric value for proper prioritizing
+#define RedBoot_INIT_PRIO(_n_) 1##_n_
+#define RedBoot_INIT_LAST 9999
+typedef void void_fun(void);
+typedef void_fun *void_fun_ptr;
+struct init_tab_entry {
+ void_fun_ptr fun;
+} CYG_HAL_TABLE_TYPE;
+#define _RedBoot_init(_f_,_p_) \
+struct init_tab_entry _init_tab_##_p_##_f_ \
+ CYG_HAL_TABLE_QUALIFIED_ENTRY(RedBoot_inits,_p_##_f_) = { _f_ };
+#define RedBoot_init(_f_,_p_) _RedBoot_init(_f_,_p_)
+
+// Main loop [idle] call-back functions
+#define RedBoot_IDLE_FIRST 0000
+#define RedBoot_IDLE_BEFORE_NETIO 3000
+#define RedBoot_IDLE_NETIO 5000
+#define RedBoot_IDLE_AFTER_NETIO 7000
+#define RedBoot_IDLE_LAST 9999
+typedef void idle_fun(bool);
+typedef idle_fun *idle_fun_ptr;
+struct idle_tab_entry {
+ idle_fun_ptr fun;
+} CYG_HAL_TABLE_TYPE;
+#define _RedBoot_idle(_f_,_p_) \
+struct idle_tab_entry _idle_tab_##_p_##_f_ \
+ CYG_HAL_TABLE_QUALIFIED_ENTRY(RedBoot_idle,_p_##_f_) = { _f_ };
+#define RedBoot_idle(_f_,_p_) _RedBoot_idle(_f_,_p_)
+
+// This function called when changing idle/not - mostly used by I/O
+// to support idle when timeout, etc.
+void do_idle(bool state);
+
+// Option processing support
+
+struct option_info {
+ char flag;
+ bool takes_arg;
+ int arg_type;
+ void *arg;
+ bool *arg_set;
+ char *name;
+};
+
+#define NUM_ELEMS(s) (sizeof(s)/sizeof(s[0]))
+
+#define OPTION_ARG_TYPE_NUM 0 // Numeric data
+#define OPTION_ARG_TYPE_STR 1 // Generic string
+#define OPTION_ARG_TYPE_FLG 2 // Flag only
+
+// Command line parsing
+externC struct cmd *parse(char **line, int *argc, char **argv);
+
+externC void init_opts(struct option_info *opts, char flag, bool takes_arg,
+ int arg_type, void *arg, bool *arg_set, char *name);
+externC bool scan_opts(int argc, char *argv[], int first,
+ struct option_info *opts, int num_opts,
+ void *def_arg, int def_arg_type, char *def_descr);
+
+#ifdef CYGNUM_HAL_VIRTUAL_VECTOR_AUX_CHANNELS
+#define CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS \
+ (CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS+CYGNUM_HAL_VIRTUAL_VECTOR_AUX_CHANNELS)
+#else
+#define CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS \
+ CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS
+#endif
+
+#ifdef CYGPKG_REDBOOT_NETWORKING
+//-----------------------------------------------------------------------------
+// DNS wrapper
+#ifdef CYGPKG_REDBOOT_NETWORKING_DNS
+
+// I would really like if we could just pull in cyg/ns/dns/dns.h, but
+// that would require adding dummy <network.h> and <netinet/in.h> files.
+
+// Host name / IP mapping
+struct hostent {
+ char *h_name; /* official name of host */
+ char **h_aliases; /* alias list */
+ int h_addrtype; /* host address type */
+ int h_length; /* length of address */
+ char **h_addr_list; /* list of addresses */
+};
+#define h_addr h_addr_list[0] /* for backward compatibility */
+
+externC int redboot_dns_res_init(void);
+externC void set_dns(char* new_ip);
+externC void show_dns(void);
+externC struct hostent *gethostbyname(const char *host);
+
+// Error reporting
+externC int h_errno;
+
+#define DNS_SUCCESS 0
+#define HOST_NOT_FOUND 1
+#define TRY_AGAIN 2
+#define NO_RECOVERY 3
+#define NO_DATA 4
+
+static inline bool
+_gethostbyname(const char* name, in_addr_t* host)
+{
+ struct hostent* hent = gethostbyname(name);
+ if (hent) {
+ memcpy(host, hent->h_addr_list[0], sizeof(in_addr_t));
+ return true;
+ }
+ // Fall back to inet_aton - gethostbyname may already have tried
+ // it, but we can't know for sure (the DNS IP may not have been
+ // valid, preventing the inet_aton).
+ return inet_aton(name, host);
+}
+#else
+static inline bool
+_gethostbyname(const char* name, in_addr_t* host)
+{
+ return inet_aton(name, host);
+}
+#endif // CYGPKG_REDBOOT_NETWORKING_DNS
+#endif // CYGPKG_REDBOOT_NETWORKING
+
+//-----------------------------------------------------------------------------
+// String functions. Some of these are duplicates of the same functions in
+// the I18N package.
+
+// Validate a hex character
+__inline__ static bool
+_is_hex(char c)
+{
+ return (((c >= '0') && (c <= '9')) ||
+ ((c >= 'A') && (c <= 'F')) ||
+ ((c >= 'a') && (c <= 'f')));
+}
+
+// Convert a single hex nibble
+__inline__ static int
+_from_hex(char c)
+{
+ int ret = 0;
+
+ if ((c >= '0') && (c <= '9')) {
+ ret = (c - '0');
+ } else if ((c >= 'a') && (c <= 'f')) {
+ ret = (c - 'a' + 0x0a);
+ } else if ((c >= 'A') && (c <= 'F')) {
+ ret = (c - 'A' + 0x0A);
+ }
+ return ret;
+}
+
+// Convert a character to lower case
+__inline__ static char
+_tolower(char c)
+{
+ if ((c >= 'A') && (c <= 'Z')) {
+ c = (c - 'A') + 'a';
+ }
+ return c;
+}
+
+// Validate alpha
+__inline__ static bool
+isalpha(int c)
+{
+ return (((c >= 'a') && (c <= 'z')) ||
+ ((c >= 'A') && (c <= 'Z')));
+}
+
+// Validate digit
+__inline__ static bool
+isdigit(int c)
+{
+ return ((c >= '0') && (c <= '9'));
+}
+
+// Validate alphanum
+__inline__ static bool
+isalnum(int c)
+{
+ return (isalpha(c) || isdigit(c));
+}
+
+//----------------------------------------------------------------------------
+// syscall values
+#if defined(CYGSEM_REDBOOT_BSP_SYSCALLS)
+
+// These are required by the ANSI C part of newlib (excluding system() of
+// course).
+#define SYS_exit 1
+#define SYS_open 2
+#define SYS_close 3
+#define SYS_read 4
+#define SYS_write 5
+#define SYS_lseek 6
+#define SYS_unlink 7
+#define SYS_getpid 8
+#define SYS_kill 9
+#define SYS_fstat 10
+//#define SYS_sbrk 11 - not currently a system call, but reserved.
+
+// ARGV support.
+#define SYS_argvlen 12
+#define SYS_argv 13
+
+// These are extras added for one reason or another.
+#define SYS_chdir 14
+#define SYS_stat 15
+#define SYS_chmod 16
+#define SYS_utime 17
+#define SYS_time 18
+#define SYS_gettimeofday 19
+#define SYS_times 20
+
+#define SYS_interrupt 1000
+#define SYS_meminfo 1001
+
+#define __GET_SHARED 0xbaad // 47789 decimal
+
+#ifdef CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+
+#define SYS_timer_call_back 2001
+#define SYS_timer_frequency 2002
+#define SYS_timer_reset 2003
+
+#endif // CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+#define SYS_rename 3001
+#define SYS_isatty 3002
+#define SYS_system 3003
+
+#endif // CYGSEM_REDBOOT_BSP_SYSCALLS
+
+
+//----------------------------------------------------------------------------
+// Allow HAL to override RedBoot flash read/program operations.
+#ifdef HAL_FLASH_READ
+#define FLASH_READ(f, r, l, e) HAL_FLASH_READ((f),(r),(l),(e))
+#else
+#define FLASH_READ(f, r, l, e) flash_read((f), (r), (l), (e))
+#endif
+
+#ifdef HAL_FLASH_PROGRAM
+#define FLASH_PROGRAM(f, r, l, e) HAL_FLASH_PROGRAM((f),(r),(l),(e))
+#else
+#define FLASH_PROGRAM(f, r, l, e) flash_program((f), (r), (l), (e))
+#endif
+
+
+// Define REDBOOT_FLASH_REVERSE_BYTEORDER if config and fis info is stored in flash
+// with byte ordering opposite from CYG_BYTEORDER.
+#if (defined(CYGOPT_REDBOOT_FLASH_BYTEORDER_MSBFIRST) && (CYG_BYTEORDER != CYG_MSBFIRST)) || \
+ (defined(CYGOPT_REDBOOT_FLASH_BYTEORDER_LSBFIRST) && (CYG_BYTEORDER != CYG_LSBFIRST))
+#define REDBOOT_FLASH_REVERSE_BYTEORDER
+#endif
+
+#endif // _REDBOOT_H_
diff --git a/cesar/ecos/packages/redboot/current/include/sib.h b/cesar/ecos/packages/redboot/current/include/sib.h
new file mode 100644
index 0000000000..e29196e5f1
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/include/sib.h
@@ -0,0 +1,143 @@
+#ifndef _SIB_H_
+#define _SIB_H_
+//==========================================================================
+//
+// sib.h
+//
+// RedBoot - structure of ARM flash file format
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): Philippe Robin
+// Contributors: Philippe Robin, jskov
+// Date: 2001-10-31
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/hal/hal_io.h>
+
+/* type information :-
+ * 0xffff ffff - deleted (usual flash erased value)
+ * 0x0000 xxxx - Reserved for ARM usage:
+ * Bit 0 - ARM Executable Image
+ * Bit 1 - System Information Block
+ * Bit 2 - File System Block
+ * 0xyyyy 0000 - Available for customers (y != 0)
+ */
+#define TYPE_DELETED 0xFFFFFFFF
+#define TYPE_ARM_MASK 0x0000FFFF
+#define TYPE_CUSTOM_MASK 0xFFFF0000
+#define TYPE_ARM_EXEC 0x00000001
+#define TYPE_ARM_SIB 0x00000002
+#define TYPE_ARM_SYSBLOCK 0x00000004
+
+/* This is the type we use for RedBoot blocks */
+#define TYPE_REDHAT_REDBOOT 0x52420000
+
+/* The ARM monitor may be using a different memory mapping than RedBoot */
+#ifndef _ADDR_REDBOOT_TO_ARM
+# define _ADDR_REDBOOT_TO_ARM(x)
+#endif
+
+/* Filetypes */
+
+#define UNKNOWN_FILE 0x00000000
+#define MOT_S_RECORD 0x00000001
+#define INTEL_HEX 0x00000002
+#define ELF 0x00000004
+#define DWARF 0x00000008
+#define ARM_AOF 0x00000010
+#define ARM_AIF 0x00000020
+#define PLAIN_BINARY 0x00000040
+#define ARM_AIF_BIN 0x00000080
+#define MCS_TYPE 0x00000100
+
+#define CONVERT_TYPE (MOT_S_RECORD | INTEL_HEX | MCS_TYPE | ELF)
+
+#define SIB_OWNER_STRING_SIZE 32
+#define MAX_SIB_SIZE 512
+#define MAX_SIB_INDEX 64
+
+#define SIB_HEADER_SIGNATURE 0xA00FFF9F /* This is an invalid instruction - MULGE pc,pc,pc */
+#define FLASH_FOOTER_SIGNATURE 0xA0FFFF9F /* This is an invalid instruction - SMULALGES pc,pc,pc */
+
+
+typedef struct SIBType {
+ cyg_uint32 signature;
+ cyg_uint32 size;
+ char owner[SIB_OWNER_STRING_SIZE];
+ cyg_uint32 index;
+ cyg_uint32 revision;
+ cyg_uint32 checksum;
+} tSIB;
+
+typedef struct SIBInfoType {
+ cyg_uint32 SIB_number; /* Unique number of SIB Block */
+ cyg_uint32 SIB_Extension; /* Base of SIB Flash Block */
+ char Label[16]; /* String space for ownership string */
+ cyg_uint32 checksum; /* SIB Image checksum */
+} tSIBInfo;
+
+typedef struct FooterType {
+ void *infoBase; /* Address of first word of ImageFooter */
+ char *blockBase; /* Start of area reserved by this footer */
+ cyg_uint32 signature; /* 'Magic' number proves it's a footer */
+ cyg_uint32 type; /* Area type: ARM Image, SIB, customer */
+ cyg_uint32 checksum; /* Just this structure */
+} tFooter ;
+
+typedef struct ImageInfoType {
+ cyg_uint32 bootFlags; /* Boot flags, compression etc. */
+ cyg_uint32 imageNumber; /* Unique number, selects for boot etc. */
+ char *loadAddress; /* Address program should be loaded to */
+ cyg_uint32 length; /* Actual size of image */
+ char *address; /* Image is executed from here */
+ char name[16]; /* Null terminated */
+ char *headerBase; /* Flash Address of any stripped header */
+ cyg_uint32 header_length; /* Length of header in memory */
+ cyg_uint32 headerType; /* AIF, RLF, s-record etc. */
+ cyg_uint32 checksum; /* Image checksum (inc. this struct) */
+} tImageInfo;
+
+
+#endif // _SIB_H_
diff --git a/cesar/ecos/packages/redboot/current/src/alias.c b/cesar/ecos/packages/redboot/current/src/alias.c
new file mode 100644
index 0000000000..58cbd6a826
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/alias.c
@@ -0,0 +1,174 @@
+//==========================================================================
+//
+// alias.c
+//
+// RedBoot - alias support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas, jskov
+// Date: 2002-05-15
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+
+#ifdef CYGNUM_REDBOOT_FLASH_STRING_SIZE
+# define MAX_STRING_LENGTH CYGNUM_REDBOOT_FLASH_STRING_SIZE
+#else
+# define MAX_STRING_LENGTH 32
+#endif
+
+// Lookup an alias. First try plain string aliases. If that fails try
+// other types so allowing access to all configured values. This allows
+// for alias (macro) expansion of normal 'fconfig' data, such as the
+// board IP address.
+static char *
+lookup_alias(char *alias, char *alias_buf)
+{
+ if (0 == strcasecmp("FREEMEMLO", alias)) {
+ diag_sprintf(alias_buf,"0x%x", ((CYG_ADDRWORD)mem_segments[0].start + 0x03ff) & ~0x03ff);
+ return alias_buf;
+ } else if (0 == strcasecmp("FREEMEMHI", alias)) {
+ diag_sprintf(alias_buf,"0x%x", ((CYG_ADDRWORD)mem_segments[0].end) & ~0x03ff);
+ return alias_buf;
+ }
+
+#ifdef CYGSEM_REDBOOT_FLASH_ALIASES
+ return flash_lookup_alias(alias, alias_buf);
+#else
+ return NULL;
+#endif
+}
+
+// Expand aliases, this is recursive. ie if one alias contains other
+// aliases, these will also be expanded from the insertion point
+// onwards.
+//
+// If 'iter' is zero, then quoted strings are not expanded
+//
+static bool
+_expand_aliases(char *line, int len, int iter)
+{
+ char *lp = line;
+ char *ms, *me, *ep;
+ char *alias;
+ char c;
+ int offset, line_len, alias_len;
+ char alias_buf[MAX_STRING_LENGTH];
+ bool macro_found = false;
+
+ if ((line_len = strlen(line)) != 0) {
+ while (*lp) {
+ c = *lp++;
+ if ((c == '%') && (*lp == '{')) {
+ // Found a macro/alias to expand
+ ms = lp+1;
+ lp += 2;
+ while (*lp && (*lp != '}')) lp++;
+ if (!*lp) {
+ diag_printf("Invalid macro/alias '%s'\n", ms);
+ line[0] = '\0'; // Destroy line
+ return false;
+ }
+ me = lp;
+ *me = '\0';
+ lp++;
+ if ((alias = lookup_alias(ms,alias_buf)) != (char *)NULL) {
+ alias_len = strlen(alias);
+ // See if there is room in the line to expand this macro/alias
+ if ((line_len+alias_len) < len) {
+ // Make a hole by moving data within the line
+ offset = alias_len-strlen(ms)-2; // Number of bytes being inserted
+ ep = &lp[strlen(lp)-1];
+ if (offset > 1) {
+ ep[offset] = '\0';
+ while (ep != (lp-1)) {
+ ep[offset-1] = *ep;
+ ep--;
+ }
+ } else {
+ if (offset <=0) {
+ while ((lp-1) != ep) {
+ lp[offset-1] = *lp;
+ lp++;
+ }
+ lp[offset-1]='\0';
+ }
+ }
+ // Insert the macro/alias data
+ lp = ms-2;
+ while (*alias) {
+ if ((alias[0] == '%') && (alias[1] == '{')) macro_found = true;
+ *lp++ = *alias++;
+ }
+ line_len = strlen(line);
+ lp = lp - alias_len;
+ } else {
+ diag_printf("No room to expand '%s'\n", ms);
+ line[0] = '\0'; // Destroy line
+ return false;
+ }
+ } else {
+ diag_printf("Alias '%s' not defined\n", ms);
+ *me = '|';
+ }
+ } else if ((c == '"') && (iter == 0)) {
+ // Skip quoted strings
+ while (*lp && (*lp != '"')) lp++;
+ }
+ }
+ }
+ return macro_found;
+}
+
+void
+expand_aliases(char *line, int len)
+{
+ int iter = 0;
+
+ while (_expand_aliases(line, len, iter++)) {
+ }
+}
diff --git a/cesar/ecos/packages/redboot/current/src/caches.c b/cesar/ecos/packages/redboot/current/src/caches.c
new file mode 100644
index 0000000000..b126f19af1
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/caches.c
@@ -0,0 +1,101 @@
+//==========================================================================
+//
+// caches.c
+//
+// RedBoot cache control functions
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2002-08-06
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_cache.h>
+
+RedBoot_cmd("cache",
+ "Manage machine caches",
+ "[ON | OFF]",
+ do_caches
+ );
+
+void
+do_caches(int argc, char *argv[])
+{
+ unsigned long oldints;
+ int dcache_on=0, icache_on=0;
+
+ if (argc == 2) {
+ if (strcasecmp(argv[1], "on") == 0) {
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_ICACHE_ENABLE();
+ HAL_DCACHE_ENABLE();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ } else if (strcasecmp(argv[1], "off") == 0) {
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ HAL_ICACHE_DISABLE();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_INVALIDATE_ALL();
+ HAL_RESTORE_INTERRUPTS(oldints);
+ } else {
+ diag_printf("Invalid cache mode: %s\n", argv[1]);
+ }
+ } else {
+#ifdef HAL_DCACHE_IS_ENABLED
+ HAL_DCACHE_IS_ENABLED(dcache_on);
+#endif
+#ifdef HAL_ICACHE_IS_ENABLED
+ HAL_ICACHE_IS_ENABLED(icache_on);
+#endif
+ diag_printf("Data cache: %s, Instruction cache: %s\n",
+ dcache_on?"On":"Off", icache_on?"On":"Off");
+ }
+}
diff --git a/cesar/ecos/packages/redboot/current/src/cksum.c b/cesar/ecos/packages/redboot/current/src/cksum.c
new file mode 100644
index 0000000000..6d467e009a
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/cksum.c
@@ -0,0 +1,96 @@
+//==========================================================================
+//
+// cksum.c
+//
+// RedBoot POSIX CRC calculation/command
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2001-01-31
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+
+// Compute a CRC, using the POSIX 1003 definition
+
+RedBoot_cmd("cksum",
+ "Compute a 32bit checksum [POSIX algorithm] for a range of memory",
+ "-b <location> -l <length>",
+ do_cksum
+ );
+
+void
+do_cksum(int argc, char *argv[])
+{
+ struct option_info opts[2];
+ unsigned long base, len, crc;
+ bool base_set, len_set;
+
+ init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM,
+ (void *)&base, (bool *)&base_set, "base address");
+ init_opts(&opts[1], 'l', true, OPTION_ARG_TYPE_NUM,
+ (void *)&len, (bool *)&len_set, "length");
+ if (!scan_opts(argc, argv, 1, opts, 2, 0, 0, "")) {
+ return;
+ }
+ if (!base_set || !len_set) {
+ if (load_address >= (CYG_ADDRESS)ram_start &&
+ load_address_end < (CYG_ADDRESS)ram_end &&
+ load_address < load_address_end) {
+ base = load_address;
+ len = load_address_end - load_address;
+ diag_printf("Computing cksum for area %lx-%lx\n",
+ base, load_address_end);
+ } else {
+ diag_printf("usage: cksum -b <addr> -l <length>\n");
+ return;
+ }
+ }
+ crc = cyg_posix_crc32((unsigned char *)base, len);
+ diag_printf("POSIX cksum = %lu %lu (0x%08lx 0x%08lx)\n", crc, len, crc, len);
+}
+
diff --git a/cesar/ecos/packages/redboot/current/src/decompress.c b/cesar/ecos/packages/redboot/current/src/decompress.c
new file mode 100644
index 0000000000..4ea4b4b513
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/decompress.c
@@ -0,0 +1,315 @@
+//==========================================================================
+//
+// decompress.c
+//
+// RedBoot decompress support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors: jskov, gthomas, tkoeller
+// Date: 2001-03-08
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+
+#ifdef CYGPKG_COMPRESS_ZLIB
+#include <cyg/compress/zlib.h>
+static z_stream stream;
+static bool stream_end;
+
+#define __ZLIB_MAGIC__ 0x5A4C4942 // 'ZLIB'
+
+//
+// Free memory [blocks] are stored as a linked list of "struct _block"
+// The 'magic' is kept to insure that the block being freed is reasonable
+//
+// One of either next or size might be removable, if a sentinal block
+// is placed at the end of the region at initialisation time.
+struct _block {
+ int size; // always the total length of the block, including this header
+ long magic; // Must be __ZLIB_MAGIC__ if allocated and 0 if free
+ struct _block *next;
+ struct _block *prev;
+};
+static struct _block *memlist;
+
+#ifdef CYGOPT_REDBOOT_FIS_ZLIB_COMMON_BUFFER
+# define ZLIB_COMPRESSION_OVERHEAD CYGNUM_REDBOOT_FIS_ZLIB_COMMON_BUFFER_SIZE
+#else
+# define ZLIB_COMPRESSION_OVERHEAD 0xC000
+#endif
+static void *zlib_workspace;
+
+//
+// This function is run as part of RedBoot's initialization.
+// It will allocate some memory from the "workspace" pool for
+// use by the gzip/zlib routines. This allows the memory usage
+// of RedBoot to be more finely controlled than if we simply
+// used the generic 'malloc() from the heap' functionality.
+//
+static void
+_zlib_init(void)
+{
+ struct _block *bp;
+#ifdef CYGOPT_REDBOOT_FIS_ZLIB_COMMON_BUFFER
+ zlib_workspace = fis_zlib_common_buffer;
+#else
+ // Allocate some RAM for use by the gzip/zlib routines
+ workspace_end -= ZLIB_COMPRESSION_OVERHEAD;
+ zlib_workspace = workspace_end;
+#endif
+ bp = (struct _block *)zlib_workspace;
+ memlist = bp;
+ bp->next = bp->prev = 0;
+ bp->size = ZLIB_COMPRESSION_OVERHEAD;
+ bp->magic = 0;
+#ifdef DEBUG_ZLIB_MALLOC
+ show_memlist(__FUNCTION__);
+#endif
+}
+
+RedBoot_init(_zlib_init, RedBoot_INIT_FIRST);
+
+// #define DEBUG_ZLIB_MALLOC
+#ifdef DEBUG_ZLIB_MALLOC
+static void
+show_memlist(char *when)
+{
+ struct _block *bp = memlist;
+
+ diag_printf("memory list after %s\n", when);
+ diag_printf(" --START--- --END----- --SIZE---- --PREV---- --NEXT---- TYPE-----\n");
+ while (bp != (struct _block *)0) {
+ diag_printf(" %08p-%08p 0x%08x %08p %08p %s\n", bp, (unsigned char *)bp+bp->size,
+ bp->size, bp->prev, bp->next, bp->magic == 0 ? "FREE" : "ALLOCATED" );
+ bp = bp->next;
+ }
+ diag_printf("\n");
+}
+#endif
+
+// Note: these have to be global and match the prototype used by the
+// gzip/zlib package since we are exactly replacing them.
+
+void
+*zcalloc(void *opaque, unsigned int items, unsigned int size)
+{
+ voidpf res = 0;
+ int len = (items*size) + sizeof(struct _block);
+ struct _block *bp = memlist;
+ struct _block *nbp;
+
+#ifdef DEBUG_ZLIB_MALLOC
+ /* do this here because when int is called output is not setup yet */
+ static int first_alloc = 1;
+ if ( first_alloc ) {
+ show_memlist("initialization");
+ first_alloc = 0;
+ }
+#endif
+
+ // Simple, first-fit algorithm
+ while (bp) {
+ if (bp->magic == 0 && bp->size > len) {
+ nbp = (struct _block *)((char *)bp + len);
+ /* link new block into chain */
+ nbp->next = bp->next;
+ bp->next = nbp;
+ nbp->prev = bp;
+ /* split size between the two blocks */
+ nbp->size = bp->size - len;
+ bp->size = len;
+ /* mark the new block as free */
+ nbp->magic = 0;
+ /* mark allocated block as allocated */
+ bp->magic = __ZLIB_MAGIC__;
+ res = bp +1;
+ memset(res, 0, len - sizeof(struct _block));
+ break;
+ }
+ bp = bp->next;
+ }
+#ifdef DEBUG_ZLIB_MALLOC
+ diag_printf("%s(0x%x,0x%x) = %p\n", __FUNCTION__, items, size, res);
+ show_memlist(__FUNCTION__);
+#endif
+ if ( res == NULL )
+ diag_printf("zcalloc: failed to allocate 0x%x items of 0x%x bytes == 0x%x bytes\n", items, size, len);
+ return res;
+}
+
+void
+zcfree(void *opaque, void *ptr)
+{
+ struct _block *bp;
+
+ if (!ptr) return; // Safety
+ bp = (struct _block *)((char *)ptr - sizeof(struct _block));
+ if (bp->magic != __ZLIB_MAGIC__) {
+ diag_printf("%s(%p) - invalid block\n", __FUNCTION__, ptr);
+ return;
+ }
+
+ /* mark as free */
+ bp->magic = 0;
+
+#ifdef DEBUG_ZLIB_MALLOC
+ diag_printf("%s(%p) = 0x%x bytes\n", __FUNCTION__, ptr, bp->size);
+#endif
+
+ while(bp->next && bp->next->magic == 0) {
+#ifdef DEBUG_ZLIB_MALLOC
+ diag_printf(" merging %08p and %08p (after)\n", bp, bp->next);
+#endif
+ bp->size += bp->next->size;
+ bp->next = bp->next->next;
+ }
+
+ while(bp->prev && bp->prev->magic == 0) {
+#ifdef DEBUG_ZLIB_MALLOC
+ diag_printf(" merging %08p and %08p (before)\n", bp->prev, bp);
+#endif
+ bp->prev->size += bp->size;
+ bp->prev->next = bp->next;
+ bp = bp->prev;
+ }
+
+#ifdef DEBUG_ZLIB_MALLOC
+ show_memlist(__FUNCTION__);
+#endif
+}
+
+//
+// This function is called to initialize a gzip/zlib stream.
+//
+static int
+gzip_init(_pipe_t* p)
+{
+ int err;
+
+ // Note: this code used to [re]initialize the memory pool used
+ // by zlib. This is now done in _zlib_init(), but only once.
+ stream.zalloc = zcalloc;
+ stream.zfree = zcfree;
+ stream.next_in = NULL;
+ stream.avail_in = 0;
+ stream.next_out = NULL;
+ stream.avail_out = 0;
+ err = inflateInit(&stream);
+ stream_end = false;
+
+ return err;
+}
+
+//
+// This function is called during the decompression cycle to
+// actually cause a buffer to be filled with uncompressed data.
+//
+static int
+gzip_inflate(_pipe_t* p)
+{
+ int err, bytes_out;
+
+ if (stream_end)
+ return Z_STREAM_END;
+
+ stream.next_in = p->in_buf;
+ stream.avail_in = p->in_avail;
+ stream.next_out = p->out_buf;
+ stream.avail_out = p->out_max;
+ err = inflate(&stream, Z_SYNC_FLUSH);
+ bytes_out = stream.next_out - p->out_buf;
+ p->out_size += bytes_out;
+ p->out_buf = stream.next_out;
+ p->msg = stream.msg;
+ p->in_avail = stream.avail_in;
+ p->in_buf = stream.next_in;
+
+ // Let upper layers process any inflated bytes at
+ // end of stream.
+ if (err == Z_STREAM_END && bytes_out) {
+ stream_end = true;
+ err = Z_OK;
+ }
+
+ return err;
+}
+
+//
+// Called when the input data is completed or an error has
+// occured. This allows for clean up as well as passing error
+// information up.
+//
+static int
+gzip_close(_pipe_t* p, int err)
+{
+ switch (err) {
+ case Z_STREAM_END:
+ err = 0;
+ break;
+ case Z_OK:
+ if (stream_end) {
+ break;
+ }
+ // Decompression didn't complete
+ p->msg = "premature end of input";
+ // fall-through
+ default:
+ err = -1;
+ break;
+ }
+
+ inflateEnd(&stream);
+
+ return err;
+}
+
+//
+// Exported interfaces
+//
+_decompress_fun_init* _dc_init = gzip_init;
+_decompress_fun_inflate* _dc_inflate = gzip_inflate;
+_decompress_fun_close* _dc_close = gzip_close;
+#endif // CYGPKG_COMPRESS_ZLIB
diff --git a/cesar/ecos/packages/redboot/current/src/dump.c b/cesar/ecos/packages/redboot/current/src/dump.c
new file mode 100644
index 0000000000..6c6fca1aa3
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/dump.c
@@ -0,0 +1,158 @@
+//==========================================================================
+//
+// dump.c
+//
+// RedBoot dump support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2002-08-06
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+
+RedBoot_cmd("dump",
+ "Display (hex dump) a range of memory",
+ "-b <location> [-l <length>] [-s] [-1|-2|-4]",
+ do_dump
+ );
+RedBoot_cmd("x",
+ "Display (hex dump) a range of memory",
+ "-b <location> [-l <length>] [-s] [-1|-2|-4]",
+ do_x
+ );
+
+void
+do_dump(int argc, char *argv[])
+{
+ struct option_info opts[6];
+ unsigned long base, len;
+ bool base_set, len_set;
+ static unsigned long _base, _len;
+ static char _size = 1;
+ bool srec_dump, set_32bit, set_16bit, set_8bit;
+ int i, n, off, cksum;
+ cyg_uint8 ch;
+
+ init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM,
+ (void *)&base, (bool *)&base_set, "base address");
+ init_opts(&opts[1], 'l', true, OPTION_ARG_TYPE_NUM,
+ (void *)&len, (bool *)&len_set, "length");
+ init_opts(&opts[2], 's', false, OPTION_ARG_TYPE_FLG,
+ (void *)&srec_dump, 0, "dump data using Morotola S-records");
+ init_opts(&opts[3], '4', false, OPTION_ARG_TYPE_FLG,
+ (void *)&set_32bit, (bool *)0, "dump 32 bit units");
+ init_opts(&opts[4], '2', false, OPTION_ARG_TYPE_FLG,
+ (void *)&set_16bit, (bool *)0, "dump 16 bit units");
+ init_opts(&opts[5], '1', false, OPTION_ARG_TYPE_FLG,
+ (void *)&set_8bit, (bool *)0, "dump 8 bit units");
+ if (!scan_opts(argc, argv, 1, opts, 6, 0, 0, "")) {
+ return;
+ }
+ if (!base_set) {
+ if (_base == 0) {
+ diag_printf("Dump what [location]?\n");
+ return;
+ }
+ base = _base;
+ if (!len_set) {
+ len = _len;
+ len_set = true;
+ }
+ }
+
+ if (set_32bit) {
+ _size = 4;
+ } else if (set_16bit) {
+ _size = 2;
+ } else if (set_8bit) {
+ _size = 1;
+ }
+
+ if (!len_set) {
+ len = 32;
+ }
+ if (srec_dump) {
+ off = 0;
+ while (off < len) {
+ n = (len > 16) ? 16 : len;
+ cksum = n+5;
+ diag_printf("S3%02X%08lX", n+5, off+base);
+ for (i = 0; i < 4; i++) {
+ cksum += (((base+off)>>(i*8)) & 0xFF);
+ }
+ for (i = 0; i < n; i++) {
+ ch = *(cyg_uint8 *)(base+off+i);
+ diag_printf("%02X", ch);
+ cksum += ch;
+ }
+ diag_printf("%02X\n", ~cksum & 0xFF);
+ off += n;
+ }
+ } else {
+ switch( _size ) {
+ case 1:
+ diag_dump_buf((void *)base, len);
+ break;
+ case 2:
+ diag_dump_buf_16bit((void *)base, len);
+ break;
+ case 4:
+ diag_dump_buf_32bit((void *)base, len);
+ break;
+ }
+ }
+ _base = base + len;
+ _len = len;
+}
+
+// Simple alias for the dump command
+void
+do_x(int argc, char *argv[])
+{
+ do_dump(argc, argv);
+}
diff --git a/cesar/ecos/packages/redboot/current/src/fconfig.c b/cesar/ecos/packages/redboot/current/src/fconfig.c
new file mode 100644
index 0000000000..92d85e6cc5
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/fconfig.c
@@ -0,0 +1,1194 @@
+//==========================================================================
+//
+// fconfig.c
+//
+// RedBoot - persistent data storage support (FLASH or EEPROM)
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas, tkoeller
+// Date: 2000-07-28
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <cyg/io/flash.h>
+#ifdef CYGOPT_REDBOOT_FIS
+#include <fis.h>
+#endif
+
+#ifdef CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG
+// Note horrid intertwining of functions, to save precious FLASH
+externC void fis_read_directory(void);
+externC void fis_update_directory(void);
+#endif
+
+#ifdef CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_EEPROM
+externC void write_eeprom(void *buf, int len);
+externC void read_eeprom(void *buf, int len);
+#endif
+
+#ifdef CYGSEM_REDBOOT_PLF_ESA_VALIDATE
+externC bool cyg_plf_redboot_esa_validate(unsigned char *val);
+#endif
+
+#ifdef CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH
+externC bool do_flash_init(void);
+externC int flash_read(void *flash_base, void *ram_base, int len, void **err_address);
+#endif
+
+// Round a quantity up
+#define _rup(n,s) ((((n)+(s-1))/s)*s)
+
+#include <flash_config.h>
+
+// Configuration data, saved in FLASH, used to set/update RedBoot
+// normal "configuration" data items.
+struct _config *config, *backup_config;
+
+// Local data used by these routines
+#ifdef CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH
+extern void *flash_start, *flash_end;
+extern int flash_block_size, flash_num_blocks;
+extern int __flash_init;
+#ifdef CYGOPT_REDBOOT_FIS
+extern void *fis_work_block;
+extern void *fis_addr;
+extern int fisdir_size; // Size of FIS directory.
+#endif
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG_READONLY_FALLBACK
+static struct _config *readonly_config;
+#endif
+void *cfg_base; // Location in Flash of config data
+int cfg_size; // Length of config data - rounded to Flash block size
+#endif // FLASH MEDIA
+
+// Prototypes for local functions
+static unsigned char *flash_lookup_config(char *key);
+
+static bool config_ok;
+
+#define CONFIG_KEY1 0x0BADFACE
+#define CONFIG_KEY2 0xDEADDEAD
+
+#define CONFIG_DONE 0
+#define CONFIG_ABORT -1
+#define CONFIG_CHANGED 1
+#define CONFIG_OK 2
+#define CONFIG_BACK 3
+#define CONFIG_BAD 4
+
+// Note: the following options are related. If 'boot_script' is false, then
+// the other values are used in the configuration. Because of the way
+// that configuration tables are generated, they should have names which
+// are related. The configuration options will show up lexicographically
+// ordered, thus the peculiar naming.
+RedBoot_config_option("Run script at boot",
+ boot_script,
+ ALWAYS_ENABLED, true,
+ CONFIG_BOOL,
+ false
+ );
+RedBoot_config_option("Boot script",
+ boot_script_data,
+ "boot_script", true,
+ CONFIG_SCRIPT,
+ ""
+ );
+// Some preprocessor magic for building the [constant] prompt string
+#define __cat(s1,c2,s3) s1 #c2 s3
+#define _cat(s1,c2,s3) __cat(s1,c2,s3)
+RedBoot_config_option(_cat("Boot script timeout (",
+ CYGNUM_REDBOOT_BOOT_SCRIPT_TIMEOUT_RESOLUTION,
+ "ms resolution)"),
+ boot_script_timeout,
+ "boot_script", true,
+ CONFIG_INT,
+ 0
+ );
+#undef __cat
+#undef _cat
+
+#ifdef CYGSEM_REDBOOT_VARIABLE_BAUD_RATE
+RedBoot_config_option("Console baud rate",
+ console_baud_rate,
+ ALWAYS_ENABLED, true,
+ CONFIG_INT,
+ CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD
+ );
+#endif
+
+CYG_HAL_TABLE_BEGIN( __CONFIG_options_TAB__, RedBoot_config_options);
+CYG_HAL_TABLE_END( __CONFIG_options_TAB_END__, RedBoot_config_options);
+
+extern struct config_option __CONFIG_options_TAB__[], __CONFIG_options_TAB_END__[];
+
+//
+// Layout of config data
+// Each data item is variable length, with the name, type and dependencies
+// encoded into the object.
+// offset contents
+// 0 data type
+// 1 length of name (N)
+// 2 enable sense
+// 3 length of enable key (M)
+// 4 key name
+// N+4 enable key
+// M+N+4 data value
+//
+
+#define CONFIG_OBJECT_TYPE(dp) (dp)[0]
+#define CONFIG_OBJECT_KEYLEN(dp) (dp)[1]
+#define CONFIG_OBJECT_ENABLE_SENSE(dp) (dp)[2]
+#define CONFIG_OBJECT_ENABLE_KEYLEN(dp) (dp)[3]
+#define CONFIG_OBJECT_KEY(dp) ((dp)+4)
+#define CONFIG_OBJECT_ENABLE_KEY(dp) ((dp)+4+CONFIG_OBJECT_KEYLEN(dp))
+#define CONFIG_OBJECT_VALUE(dp) ((dp)+4+CONFIG_OBJECT_KEYLEN(dp)+CONFIG_OBJECT_ENABLE_KEYLEN(dp))
+
+#define LIST_OPT_LIST_ONLY (1)
+#define LIST_OPT_NICKNAMES (2)
+#define LIST_OPT_FULLNAMES (4)
+#define LIST_OPT_DUMBTERM (8)
+
+static void config_init(void);
+static int config_length(int type);
+
+// Change endianness of config data
+void
+conf_endian_fixup(void *ptr)
+{
+#ifdef REDBOOT_FLASH_REVERSE_BYTEORDER
+ struct _config *p = (struct _config *)ptr;
+ unsigned char *dp = p->config_data;
+ void *val_ptr;
+ int len;
+ cyg_uint16 u16;
+ cyg_uint32 u32;
+
+ p->len = CYG_SWAP32(p->len);
+ p->key1 = CYG_SWAP32(p->key1);
+ p->key2 = CYG_SWAP32(p->key2);
+ p->cksum = CYG_SWAP32(p->cksum);
+
+ while (dp < &p->config_data[sizeof(config->config_data)]) {
+ len = 4 + CONFIG_OBJECT_KEYLEN(dp) + CONFIG_OBJECT_ENABLE_KEYLEN(dp) +
+ config_length(CONFIG_OBJECT_TYPE(dp));
+ val_ptr = (void *)CONFIG_OBJECT_VALUE(dp);
+
+ switch (CONFIG_OBJECT_TYPE(dp)) {
+ // Note: the data may be unaligned in the configuration data
+ case CONFIG_BOOL:
+ if (sizeof(bool) == 2) {
+ memcpy(&u16, val_ptr, 2);
+ u16 = CYG_SWAP16(u16);
+ memcpy(val_ptr, &u16, 2);
+ } else if (sizeof(bool) == 4) {
+ memcpy(&u32, val_ptr, 4);
+ u32 = CYG_SWAP32(u32);
+ memcpy(val_ptr, &u32, 4);
+ }
+ break;
+ case CONFIG_INT:
+ if (sizeof(unsigned long) == 2) {
+ memcpy(&u16, val_ptr, 2);
+ u16 = CYG_SWAP16(u16);
+ memcpy(val_ptr, &u16, 2);
+ } else if (sizeof(unsigned long) == 4) {
+ memcpy(&u32, val_ptr, 4);
+ u32 = CYG_SWAP32(u32);
+ memcpy(val_ptr, &u32, 4);
+ }
+ break;
+ }
+
+ dp += len;
+ }
+#endif
+}
+
+static int
+get_config(unsigned char *dp, char *title, int list_opt, char *newvalue )
+{
+ char line[256], hold_line[256], *sp, *lp;
+ int ret;
+ bool hold_bool_val, new_bool_val, enable;
+ unsigned long hold_int_val, new_int_val;
+#ifdef CYGPKG_REDBOOT_NETWORKING
+ in_addr_t hold_ip_val, new_ip_val;
+ enet_addr_t hold_esa_val;
+ int esa_ptr;
+ char *esp;
+#endif
+ void *val_ptr;
+ int type, script_len;
+
+ if (CONFIG_OBJECT_ENABLE_KEYLEN(dp)) {
+ flash_get_config(CONFIG_OBJECT_ENABLE_KEY(dp), &enable, CONFIG_BOOL);
+ if (((bool)CONFIG_OBJECT_ENABLE_SENSE(dp) && !enable) ||
+ (!(bool)CONFIG_OBJECT_ENABLE_SENSE(dp) && enable)) {
+ return CONFIG_OK; // Disabled field
+ }
+ }
+ lp = line; *lp = '\0';
+ val_ptr = (void *)CONFIG_OBJECT_VALUE(dp);
+ if (LIST_OPT_NICKNAMES & list_opt)
+ diag_printf("%s: ", CONFIG_OBJECT_KEY(dp));
+ if (LIST_OPT_FULLNAMES & list_opt) {
+ if (title != (char *)NULL) {
+ diag_printf("%s: ", title);
+ } else {
+ diag_printf("%s: ", CONFIG_OBJECT_KEY(dp));
+ }
+ }
+ switch (type = CONFIG_OBJECT_TYPE(dp)) {
+ case CONFIG_BOOL:
+ memcpy(&hold_bool_val, val_ptr, sizeof(bool));
+ lp += diag_sprintf(lp, "%s", hold_bool_val ? "true" : "false");
+ break;
+ case CONFIG_INT:
+ memcpy(&hold_int_val, val_ptr, sizeof(unsigned long));
+ lp += diag_sprintf(lp, "%ld", hold_int_val);
+ break;
+#ifdef CYGPKG_REDBOOT_NETWORKING
+ case CONFIG_IP:
+ lp += diag_sprintf(lp, "%s", inet_ntoa((in_addr_t *)val_ptr));
+ if (0 == strcmp("0.0.0.0", line) && !(LIST_OPT_LIST_ONLY & list_opt)) {
+ // then we have a deeply unhelpful starting text - kill it off
+ // (unless we are just listing all values)
+ lp = line; *lp = '\0';
+ }
+ break;
+ case CONFIG_ESA:
+ for (esa_ptr = 0; esa_ptr < sizeof(enet_addr_t); esa_ptr++) {
+ lp += diag_sprintf(lp, "0x%02X", ((unsigned char *)val_ptr)[esa_ptr]);
+ if (esa_ptr < (sizeof(enet_addr_t)-1)) lp += diag_sprintf(lp, ":");
+ }
+ break;
+#if defined(CYGHWR_NET_DRIVERS) && (CYGHWR_NET_DRIVERS > 1)
+ case CONFIG_NETPORT:
+ lp += diag_sprintf(lp, "%s", (unsigned char *)val_ptr);
+ break;
+#endif
+#endif
+ case CONFIG_STRING:
+ lp += diag_sprintf(lp, "%s", (unsigned char *)val_ptr);
+ break;
+ case CONFIG_SCRIPT:
+ diag_printf("\n");
+ sp = lp = (unsigned char *)val_ptr;
+ while (*sp) {
+ while (*lp != '\n') lp++;
+ *lp = '\0';
+ diag_printf(".. %s\n", sp);
+ *lp++ = '\n';
+ sp = lp;
+ }
+ break;
+ }
+ if (LIST_OPT_LIST_ONLY & list_opt) {
+ diag_printf("%s\n", line);
+ return CONFIG_OK;
+ }
+ if (type != CONFIG_SCRIPT) {
+ if (NULL != newvalue) {
+ ret = strlen(newvalue);
+ if (ret > sizeof(line))
+ return CONFIG_BAD;
+ strcpy(hold_line, line); // Hold the old value for comparison
+ strcpy(line, newvalue);
+ diag_printf("Setting to %s\n", newvalue);
+ } else {
+ // read from terminal
+ strcpy(hold_line, line);
+ if (LIST_OPT_DUMBTERM & list_opt) {
+ diag_printf( (CONFIG_STRING == type ?
+ "%s > " :
+ "%s ? " ), line);
+ *line = '\0';
+ }
+ ret = _rb_gets_preloaded(line, sizeof(line), 0);
+ }
+ if (ret < 0) return CONFIG_ABORT;
+ // empty input - leave value untouched (else DNS goes away for a
+ // minute to try to look it up) but we must accept empty value for strings.
+ if (0 == line[0] && CONFIG_STRING != type) return CONFIG_OK;
+ if (strcmp(line, hold_line) == 0) return CONFIG_OK; // Just a CR - leave value untouched
+ lp = &line[strlen(line)-1];
+ if (*lp == '.') return CONFIG_DONE;
+ if (*lp == '^') return CONFIG_BACK;
+ }
+ switch (type) {
+ case CONFIG_BOOL:
+ memcpy(&hold_bool_val, val_ptr, sizeof(bool));
+ if (!parse_bool(line, &new_bool_val)) {
+ return CONFIG_BAD;
+ }
+ if (hold_bool_val != new_bool_val) {
+ memcpy(val_ptr, &new_bool_val, sizeof(bool));
+ return CONFIG_CHANGED;
+ } else {
+ return CONFIG_OK;
+ }
+ break;
+ case CONFIG_INT:
+ memcpy(&hold_int_val, val_ptr, sizeof(unsigned long));
+ if (!parse_num(line, &new_int_val, 0, 0)) {
+ return CONFIG_BAD;
+ }
+ if (hold_int_val != new_int_val) {
+ memcpy(val_ptr, &new_int_val, sizeof(unsigned long));
+ return CONFIG_CHANGED;
+ } else {
+ return CONFIG_OK;
+ }
+ break;
+#ifdef CYGPKG_REDBOOT_NETWORKING
+ case CONFIG_IP:
+ memcpy(&hold_ip_val.s_addr, &((in_addr_t *)val_ptr)->s_addr, sizeof(in_addr_t));
+ if (!_gethostbyname(line, &new_ip_val)) {
+ return CONFIG_BAD;
+ }
+ if (hold_ip_val.s_addr != new_ip_val.s_addr) {
+ memcpy(val_ptr, &new_ip_val, sizeof(in_addr_t));
+ return CONFIG_CHANGED;
+ } else {
+ return CONFIG_OK;
+ }
+ break;
+ case CONFIG_ESA:
+ memcpy(&hold_esa_val, val_ptr, sizeof(enet_addr_t));
+ esp = line;
+ for (esa_ptr = 0; esa_ptr < sizeof(enet_addr_t); esa_ptr++) {
+ unsigned long esa_byte;
+ if (!parse_num(esp, &esa_byte, &esp, ":")) {
+ memcpy(val_ptr, &hold_esa_val, sizeof(enet_addr_t));
+ return CONFIG_BAD;
+ }
+ ((unsigned char *)val_ptr)[esa_ptr] = esa_byte;
+ }
+#ifdef CYGSEM_REDBOOT_PLF_ESA_VALIDATE
+ if (!cyg_plf_redboot_esa_validate(val_ptr)) {
+ memcpy(val_ptr, &hold_esa_val, sizeof(enet_addr_t));
+ return CONFIG_BAD;
+ }
+#endif
+ return CONFIG_CHANGED;
+ break;
+#if defined(CYGHWR_NET_DRIVERS) && (CYGHWR_NET_DRIVERS > 1)
+ case CONFIG_NETPORT:
+ if (strlen(line) >= MAX_STRING_LENGTH || net_devindex(line) < 0) {
+ int index;
+ const char *name;
+ diag_printf("Sorry, Port name must be one of:\n");
+ for (index = 0; (name = net_devname(index)) != NULL; index++)
+ diag_printf(" %s\n", name);
+ return CONFIG_BAD;
+ }
+ strcpy((unsigned char *)val_ptr, line);
+ break;
+#endif
+#endif
+ case CONFIG_SCRIPT:
+ // Assume it always changes
+ sp = (unsigned char *)val_ptr;
+ script_len = 0;
+ diag_printf("Enter script, terminate with empty line\n");
+ while (true) {
+ *sp = '\0';
+ diag_printf(">> ");
+ ret = _rb_gets(line, sizeof(line), 0);
+ if (ret < 0) return CONFIG_ABORT;
+ if (strlen(line) == 0) break;
+ script_len += strlen(line) + 1;
+ if (script_len > config_length(CONFIG_SCRIPT)) {
+ diag_printf("script longer than %d not allowed!\n",
+ config_length(CONFIG_SCRIPT));
+ return CONFIG_ABORT;
+ }
+ lp = line;
+ while (*lp) {
+ *sp++ = *lp++;
+ }
+ *sp++ = '\n';
+ }
+ break;
+ case CONFIG_STRING:
+ if (strlen(line) >= MAX_STRING_LENGTH) {
+ diag_printf("Sorry, value is too long\n");
+ return CONFIG_BAD;
+ }
+ strcpy((unsigned char *)val_ptr, line);
+ break;
+ }
+ return CONFIG_CHANGED;
+}
+
+//
+// Manage configuration information with the FLASH
+//
+
+static int
+config_length(int type)
+{
+ switch (type) {
+ case CONFIG_BOOL:
+ return sizeof(bool);
+ case CONFIG_INT:
+ return sizeof(unsigned long);
+#ifdef CYGPKG_REDBOOT_NETWORKING
+ case CONFIG_IP:
+ return sizeof(in_addr_t);
+ case CONFIG_ESA:
+ // Would like this to be sizeof(enet_addr_t), but that causes much
+ // pain since it fouls the alignment of data which follows.
+ return 8;
+#if defined(CYGHWR_NET_DRIVERS) && (CYGHWR_NET_DRIVERS > 1)
+ case CONFIG_NETPORT:
+ return MAX_STRING_LENGTH;
+#endif
+#endif
+ case CONFIG_STRING:
+ return MAX_STRING_LENGTH;
+ case CONFIG_SCRIPT:
+ return MAX_SCRIPT_LENGTH;
+ default:
+ return 0;
+ }
+}
+
+static cmd_fun do_flash_config;
+RedBoot_cmd("fconfig",
+ "Manage configuration kept in FLASH memory",
+ "[-i] [-l] [-n] [-f] [-d] | [-d] nickname [value]",
+ do_flash_config
+ );
+
+static void
+do_flash_config(int argc, char *argv[])
+{
+ bool need_update = false;
+ struct config_option *optend = __CONFIG_options_TAB_END__;
+ struct config_option *opt = __CONFIG_options_TAB__;
+ struct option_info opts[5];
+ bool list_only;
+ bool nicknames;
+ bool fullnames;
+ bool dumbterminal;
+ int list_opt = 0;
+ unsigned char *dp;
+ int len, ret;
+ char *title;
+ char *onlyone = NULL;
+ char *onevalue = NULL;
+ bool doneone = false;
+ bool init = false;
+
+#ifdef CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH
+ if (!__flash_init) {
+ diag_printf("Sorry, no FLASH memory is available\n");
+ return;
+ }
+#endif
+ memcpy(backup_config, config, sizeof(struct _config));
+ script = (unsigned char *)0;
+
+ init_opts(&opts[0], 'l', false, OPTION_ARG_TYPE_FLG,
+ (void *)&list_only, (bool *)0, "list configuration only");
+ init_opts(&opts[1], 'n', false, OPTION_ARG_TYPE_FLG,
+ (void *)&nicknames, (bool *)0, "show nicknames");
+ init_opts(&opts[2], 'f', false, OPTION_ARG_TYPE_FLG,
+ (void *)&fullnames, (bool *)0, "show full names");
+ init_opts(&opts[3], 'i', false, OPTION_ARG_TYPE_FLG,
+ (void *)&init, (bool *)0, "initialize configuration database");
+ init_opts(&opts[4], 'd', false, OPTION_ARG_TYPE_FLG,
+ (void *)&dumbterminal, (bool *)0, "dumb terminal: no clever edits");
+
+ // First look to see if we are setting or getting a single option
+ // by just quoting its nickname
+ if ( (2 == argc && '-' != argv[1][0]) ||
+ (3 == argc && '-' != argv[1][0] && '-' != argv[2][0])) {
+ // then the command was "fconfig foo [value]"
+ onlyone = argv[1];
+ onevalue = (3 == argc) ? argv[2] : NULL;
+ list_opt = LIST_OPT_NICKNAMES;
+ }
+ // Next see if we are setting or getting a single option with a dumb
+ // terminal invoked, ie. no line editing.
+ else if (3 == argc &&
+ '-' == argv[1][0] && 'd' == argv[1][1] && 0 == argv[1][2] &&
+ '-' != argv[2][0]) {
+ // then the command was "fconfig -d foo"
+ onlyone = argv[2];
+ onevalue = NULL;
+ list_opt = LIST_OPT_NICKNAMES | LIST_OPT_DUMBTERM;
+ }
+ else {
+ if (!scan_opts(argc, argv, 1, opts, 5, 0, 0, ""))
+ return;
+ list_opt |= list_only ? LIST_OPT_LIST_ONLY : 0;
+ list_opt |= nicknames ? LIST_OPT_NICKNAMES : LIST_OPT_FULLNAMES;
+ list_opt |= fullnames ? LIST_OPT_FULLNAMES : 0;
+ list_opt |= dumbterminal ? LIST_OPT_DUMBTERM : 0;
+ }
+
+ if (init && verify_action("Initialize non-volatile configuration")) {
+ config_init();
+ need_update = true;
+ }
+
+ dp = &config->config_data[0];
+ while (dp < &config->config_data[sizeof(config->config_data)]) {
+ if (CONFIG_OBJECT_TYPE(dp) == CONFIG_EMPTY) {
+ break;
+ }
+ len = 4 + CONFIG_OBJECT_KEYLEN(dp) + CONFIG_OBJECT_ENABLE_KEYLEN(dp) +
+ config_length(CONFIG_OBJECT_TYPE(dp));
+ // Provide a title for well known [i.e. builtin] objects
+ title = (char *)NULL;
+ opt = __CONFIG_options_TAB__;
+ while (opt != optend) {
+ if (strcmp(opt->key, CONFIG_OBJECT_KEY(dp)) == 0) {
+ title = opt->title;
+ break;
+ }
+ opt++;
+ }
+ if ( onlyone && 0 != strcmp(CONFIG_OBJECT_KEY(dp), onlyone) )
+ ret = CONFIG_OK; // skip this entry
+ else {
+ doneone = true;
+ ret = get_config(dp, title, list_opt, onevalue); // do this opt
+ }
+ switch (ret) {
+ case CONFIG_DONE:
+ goto done;
+ case CONFIG_ABORT:
+ memcpy(config, backup_config, sizeof(struct _config));
+ return;
+ case CONFIG_CHANGED:
+ need_update = true;
+ case CONFIG_OK:
+ dp += len;
+ break;
+ case CONFIG_BACK:
+ dp = &config->config_data[0];
+ continue;
+ case CONFIG_BAD:
+ // Nothing - make him do it again
+ diag_printf ("** invalid entry\n");
+ onevalue = NULL; // request a good value be typed in - or abort/whatever
+ }
+ }
+
+ done:
+ if (NULL != onlyone && !doneone) {
+#ifdef CYGSEM_REDBOOT_ALLOW_DYNAMIC_FLASH_CONFIG_DATA
+ if (verify_action("** entry '%s' not found - add", onlyone)) {
+ struct config_option opt;
+ diag_printf("Trying to add value\n");
+ }
+#else
+ diag_printf("** entry '%s' not found\n", onlyone);
+#endif
+ }
+ if (!need_update)
+ return;
+ flash_write_config(true);
+}
+
+
+#ifdef CYGSEM_REDBOOT_FLASH_ALIASES
+static cmd_fun do_alias;
+RedBoot_cmd("alias",
+ "Manage aliases kept in FLASH memory",
+ "name [value]",
+ do_alias
+ );
+
+static void
+make_alias(char *alias, char *name)
+{
+ diag_sprintf(alias, "alias/%s", name);
+}
+
+static void
+do_alias(int argc, char *argv[])
+{
+ char name[80];
+ char *val;
+ struct config_option opt;
+
+ switch (argc) {
+ case 2:
+ make_alias(name, argv[1]);
+ if (flash_get_config(name, &val, CONFIG_STRING)) {
+ diag_printf("'%s' = '%s'\n", argv[1], val);
+ } else {
+ diag_printf("'%s' not found\n", argv[1]);
+ }
+ break;
+ case 3:
+ if (strlen(argv[2]) >= MAX_STRING_LENGTH) {
+ diag_printf("Sorry, value is too long\n");
+ break;
+ }
+ make_alias(name, argv[1]);
+ opt.type = CONFIG_STRING;
+ opt.enable = (char *)0;
+ opt.enable_sense = 1;
+ opt.key = name;
+ opt.dflt = (CYG_ADDRESS)argv[2];
+ flash_add_config(&opt, true);
+ break;
+ default:
+ diag_printf("usage: alias name [value]\n");
+ }
+}
+
+// Lookup an alias. First try plain string aliases. If that fails try
+// other types so allowing access to all configured values. This allows
+// for alias (macro) expansion of normal 'fconfig' data, such as the
+// board IP address.
+char *
+flash_lookup_alias(char *alias, char *alias_buf)
+{
+ char name[80];
+ char *val;
+ unsigned char * dp;
+ void *val_ptr;
+ int type;
+ bool hold_bool_val;
+ long hold_long_val;
+#ifdef CYGPKG_REDBOOT_NETWORKING
+ int esa_ptr;
+#endif
+
+ make_alias(name, alias);
+ if (flash_get_config(name, &val, CONFIG_STRING)) {
+ return val;
+ } else {
+ dp = flash_lookup_config(alias);
+ if (dp) {
+ val_ptr = (void *)CONFIG_OBJECT_VALUE(dp);
+ switch (type = CONFIG_OBJECT_TYPE(dp)) {
+ case CONFIG_BOOL:
+ memcpy(&hold_bool_val, val_ptr, sizeof(bool));
+ diag_sprintf(alias_buf, "%s", hold_bool_val ? "true" : "false");
+ break;
+ case CONFIG_INT:
+ memcpy(&hold_long_val, val_ptr, sizeof(unsigned long));
+ diag_sprintf(alias_buf,"%ld", hold_long_val);
+ break;
+#ifdef CYGPKG_REDBOOT_NETWORKING
+ case CONFIG_IP:
+ diag_sprintf(alias_buf,"%s", inet_ntoa((in_addr_t *)val_ptr));
+ break;
+ case CONFIG_ESA:
+ for (esa_ptr = 0; esa_ptr < sizeof(enet_addr_t); esa_ptr++) {
+ diag_sprintf(alias_buf+(3*esa_ptr), "0x%02X", ((unsigned char *)val_ptr)[esa_ptr]);
+ if (esa_ptr < (sizeof(enet_addr_t)-1)) diag_printf(":");
+ }
+ break;
+#endif
+ case CONFIG_SCRIPT:
+ return (char *) val_ptr;
+ break;
+ default:
+ return (char *)NULL;
+ }
+ return alias_buf;
+ }
+ return (char *)NULL;
+ }
+}
+
+#endif // CYGSEM_REDBOOT_FLASH_ALIASES
+
+cyg_uint32
+flash_crc(struct _config *conf)
+{
+ cyg_uint32 crc;
+#ifdef REDBOOT_FLASH_REVERSE_BYTEORDER
+ int swabbed = 0;
+
+ if (conf->key1 == CONFIG_KEY1 && conf->key2 == CONFIG_KEY2) {
+ swabbed = 1;
+ conf_endian_fixup(conf);
+ }
+#endif
+
+ crc = cyg_crc32((unsigned char *)conf, sizeof(*conf)-sizeof(conf->cksum));
+
+#ifdef REDBOOT_FLASH_REVERSE_BYTEORDER
+ if (swabbed)
+ conf_endian_fixup(conf);
+#endif
+ return crc;
+}
+
+//
+// Write the in-memory copy of the configuration data to the flash device.
+//
+void
+flash_write_config(bool prompt)
+{
+#if defined(CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH)
+#if !defined(CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG)
+ void *err_addr;
+ int stat;
+#endif
+#endif
+
+ config->len = sizeof(struct _config);
+ config->key1 = CONFIG_KEY1;
+ config->key2 = CONFIG_KEY2;
+ config->cksum = flash_crc(config);
+ if (!prompt || verify_action("Update RedBoot non-volatile configuration")) {
+#ifdef CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH
+#ifdef CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG
+ fis_read_directory();
+ fis_update_directory();
+#else
+#ifdef CYGSEM_REDBOOT_FLASH_LOCK_SPECIAL
+ // Insure [quietly] that the config page is unlocked before trying to update
+ flash_unlock((void *)cfg_base, cfg_size, (void **)&err_addr);
+#endif
+ if ((stat = flash_erase(cfg_base, cfg_size, (void **)&err_addr)) != 0) {
+ diag_printf(" initialization failed at %p: %s\n", err_addr, flash_errmsg(stat));
+ } else {
+ conf_endian_fixup(config);
+ if ((stat = FLASH_PROGRAM(cfg_base, config, sizeof(struct _config), (void **)&err_addr)) != 0) {
+ diag_printf("Error writing config data at %p: %s\n",
+ err_addr, flash_errmsg(stat));
+ }
+ conf_endian_fixup(config);
+ }
+#ifdef CYGSEM_REDBOOT_FLASH_LOCK_SPECIAL
+ // Insure [quietly] that the config data is locked after the update
+ flash_lock((void *)cfg_base, cfg_size, (void **)&err_addr);
+#endif
+#endif // CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG
+#else // CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH
+ write_eeprom(config, sizeof(struct _config)); // into 'config'
+#endif
+ }
+}
+
+//
+// Find the configuration entry for a particular key
+//
+static unsigned char *
+flash_lookup_config(char *key)
+{
+ unsigned char *dp;
+ int len;
+
+ if (!config_ok) return (unsigned char *)NULL;
+
+ dp = &config->config_data[0];
+ while (dp < &config->config_data[sizeof(config->config_data)]) {
+ len = 4 + CONFIG_OBJECT_KEYLEN(dp) + CONFIG_OBJECT_ENABLE_KEYLEN(dp) +
+ config_length(CONFIG_OBJECT_TYPE(dp));
+ if (strcmp(key, CONFIG_OBJECT_KEY(dp)) == 0) {
+ return dp;
+ }
+ dp += len;
+ }
+// diag_printf("Can't find config data for '%s'\n", key);
+ return false;
+}
+
+//
+// Enumerate the keys from the configuration
+//
+bool
+flash_next_key(char *key, int keylen, int *type, int *offset)
+{
+ unsigned char *dp;
+ int len;
+
+ if (!config_ok) return false;
+ if ((*offset < 0) || (*offset >= MAX_CONFIG_DATA)) return false;
+
+ dp = &config->config_data[*offset];
+ if ((*type = CONFIG_OBJECT_TYPE(dp)) == CONFIG_EMPTY) return false;
+ if ((len = CONFIG_OBJECT_KEYLEN(dp)) > keylen) return false;
+ memcpy(key, CONFIG_OBJECT_KEY(dp), len);
+ *offset += 4 + CONFIG_OBJECT_KEYLEN(dp) + CONFIG_OBJECT_ENABLE_KEYLEN(dp) +
+ config_length(CONFIG_OBJECT_TYPE(dp));
+ return true;
+}
+
+//
+// Retrieve a data object from the data base (in memory copy)
+//
+bool
+flash_get_config(char *key, void *val, int type)
+{
+ unsigned char *dp;
+ void *val_ptr;
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG_READONLY_FALLBACK
+ struct _config *save_config = 0;
+ bool res;
+#endif
+
+ if (!config_ok) return false;
+
+ if ((dp = flash_lookup_config(key)) != (unsigned char *)NULL) {
+ if (CONFIG_OBJECT_TYPE(dp) == type) {
+ val_ptr = (void *)CONFIG_OBJECT_VALUE(dp);
+ switch (type) {
+ // Note: the data may be unaligned in the configuration data
+ case CONFIG_BOOL:
+ memcpy(val, val_ptr, sizeof(bool));
+ break;
+ case CONFIG_INT:
+ memcpy(val, val_ptr, sizeof(unsigned long));
+ break;
+#ifdef CYGPKG_REDBOOT_NETWORKING
+ case CONFIG_IP:
+ memcpy(val, val_ptr, sizeof(in_addr_t));
+ break;
+ case CONFIG_ESA:
+ memcpy(val, val_ptr, sizeof(enet_addr_t));
+ break;
+#endif
+#if defined(CYGHWR_NET_DRIVERS) && (CYGHWR_NET_DRIVERS > 1)
+ case CONFIG_NETPORT:
+#endif
+ case CONFIG_STRING:
+ case CONFIG_SCRIPT:
+ // Just return a pointer to the script/line
+ *(unsigned char **)val = (unsigned char *)val_ptr;
+ break;
+ }
+ } else {
+ diag_printf("Request for config value '%s' - wrong type\n", key);
+ }
+ return true;
+ }
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG_READONLY_FALLBACK
+ // Did not find key. Is configuration data valid?
+ // Check to see if the config data is valid, if not, revert to
+ // readonly mode, by setting config to readonly_config. We
+ // will set it back before we leave this function.
+ if ( (config != readonly_config) && ((flash_crc(config) != config->cksum) ||
+ (config->key1 != CONFIG_KEY1)|| (config->key2 != CONFIG_KEY2))) {
+ save_config = config;
+ config = readonly_config;
+ if ((flash_crc(config) != config->cksum) ||
+ (config->key1 != CONFIG_KEY1)|| (config->key2 != CONFIG_KEY2)) {
+ diag_printf("FLASH configuration checksum error or invalid key\n");
+ config = save_config;
+ return false;
+ }
+ else{
+ diag_printf("Getting config information in READONLY mode\n");
+ res = flash_get_config(key, val, type);
+ config = save_config;
+ return res;
+ }
+ }
+#endif
+ return false;
+}
+
+//
+// Update a data object in the data base (in memory copy & backing store)
+//
+bool
+flash_set_config(char *key, void *val, int type)
+{
+ unsigned char *dp;
+ void *val_ptr;
+
+ if (!config_ok) return false;
+
+ if ((dp = flash_lookup_config(key)) != (unsigned char *)NULL) {
+ if (CONFIG_OBJECT_TYPE(dp) == type) {
+ val_ptr = (void *)CONFIG_OBJECT_VALUE(dp);
+ switch (type) {
+ // Note: the data may be unaligned in the configuration data
+ case CONFIG_BOOL:
+ memcpy(val_ptr, val, sizeof(bool));
+ break;
+ case CONFIG_INT:
+ memcpy(val_ptr, val, sizeof(unsigned long));
+ break;
+#ifdef CYGPKG_REDBOOT_NETWORKING
+ case CONFIG_IP:
+ memcpy(val_ptr, val, sizeof(in_addr_t));
+ break;
+ case CONFIG_ESA:
+ memcpy(val_ptr, val, sizeof(enet_addr_t));
+ break;
+#endif
+#if defined(CYGHWR_NET_DRIVERS) && (CYGHWR_NET_DRIVERS > 1)
+ case CONFIG_NETPORT:
+#endif
+ case CONFIG_STRING:
+ case CONFIG_SCRIPT:
+ memcpy(val_ptr, val, config_length(CONFIG_STRING));
+ break;
+ }
+ } else {
+ diag_printf("Can't set config value '%s' - wrong type\n", key);
+ return false;
+ }
+ flash_write_config(false);
+ return true;
+ }
+ return false;
+}
+
+//
+// Copy data into the config area
+//
+static void
+flash_config_insert_value(unsigned char *dp, struct config_option *opt)
+{
+ switch (opt->type) {
+ // Note: the data may be unaligned in the configuration data
+ case CONFIG_BOOL:
+ memcpy(dp, (void *)&opt->dflt, sizeof(bool));
+ break;
+ case CONFIG_INT:
+ memcpy(dp, (void *)&opt->dflt, sizeof(unsigned long));
+ break;
+#ifdef CYGPKG_REDBOOT_NETWORKING
+ case CONFIG_IP:
+ memcpy(dp, (void *)&opt->dflt, sizeof(in_addr_t));
+ break;
+ case CONFIG_ESA:
+ memcpy(dp, (void *)opt->dflt, sizeof(enet_addr_t));
+ break;
+#if defined(CYGHWR_NET_DRIVERS) && (CYGHWR_NET_DRIVERS > 1)
+ case CONFIG_NETPORT:
+ // validate dflt and if not acceptable use first port
+ {
+ int index;
+ const char *name;
+ for (index = 0; (name = net_devname(index)) != NULL; index++)
+ if (!strcmp((char *)opt->dflt, name))
+ break;
+ if (name == NULL)
+ name = net_devname(0);
+ memcpy(dp, name, strlen(name) + 1);
+ }
+ break;
+#endif
+#endif
+ case CONFIG_STRING:
+ memcpy(dp, (void *)opt->dflt, config_length(CONFIG_STRING));
+ break;
+ case CONFIG_SCRIPT:
+ break;
+ }
+}
+
+//
+// Add a new option to the database
+//
+bool
+flash_add_config(struct config_option *opt, bool update)
+{
+ unsigned char *dp, *kp;
+ int len, elen, size;
+
+ // If data item is already present, just update it
+ // Note: only the data value can be thusly changed
+ if ((dp = flash_lookup_config(opt->key)) != (unsigned char *)NULL) {
+ flash_config_insert_value(CONFIG_OBJECT_VALUE(dp), opt);
+ if (update) {
+ flash_write_config(true);
+ }
+ return true;
+ }
+ // Add the data item
+ dp = &config->config_data[0];
+ size = 0;
+ while (size < sizeof(config->config_data)) {
+ if (CONFIG_OBJECT_TYPE(dp) == CONFIG_EMPTY) {
+ kp = opt->key;
+ len = strlen(kp) + 1;
+ size += len + 2 + 2 + config_length(opt->type);
+ if (opt->enable) {
+ elen = strlen(opt->enable) + 1;
+ size += elen;
+ } else {
+ elen = 0;
+ }
+ if (size > sizeof(config->config_data)) {
+ break;
+ }
+ CONFIG_OBJECT_TYPE(dp) = opt->type;
+ CONFIG_OBJECT_KEYLEN(dp) = len;
+ CONFIG_OBJECT_ENABLE_SENSE(dp) = opt->enable_sense;
+ CONFIG_OBJECT_ENABLE_KEYLEN(dp) = elen;
+ dp = CONFIG_OBJECT_KEY(dp);
+ while (*kp) *dp++ += *kp++;
+ *dp++ = '\0';
+ if (elen) {
+ kp = opt->enable;
+ while (*kp) *dp++ += *kp++;
+ *dp++ = '\0';
+ }
+ flash_config_insert_value(dp, opt);
+ if (update) {
+ flash_write_config(true);
+ }
+ return true;
+ } else {
+ len = 4 + CONFIG_OBJECT_KEYLEN(dp) + CONFIG_OBJECT_ENABLE_KEYLEN(dp) +
+ config_length(CONFIG_OBJECT_TYPE(dp));
+ dp += len;
+ size += len;
+ }
+ }
+ diag_printf("No space to add '%s'\n", opt->key);
+ return false;
+}
+
+//
+// Reset/initialize configuration data - used only when starting from scratch
+//
+static void
+config_init(void)
+{
+ // Well known option strings
+ struct config_option *optend = __CONFIG_options_TAB_END__;
+ struct config_option *opt = __CONFIG_options_TAB__;
+
+ memset(config, 0, sizeof(struct _config));
+ while (opt != optend) {
+ if (!flash_add_config(opt, false)) {
+ return;
+ }
+ opt++;
+ }
+ config_ok = true;
+}
+
+//
+// Attempt to get configuration information from the FLASH.
+// If available (i.e. good checksum, etc), initialize "known"
+// values for later use.
+//
+static void
+load_flash_config(void)
+{
+ bool use_boot_script;
+ unsigned char *cfg_temp = (unsigned char *)workspace_end;
+#ifdef CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH
+ void *err_addr;
+#endif
+
+ config_ok = false;
+ script = (unsigned char *)0;
+ cfg_temp -= sizeof(struct _config); // Space for primary config data
+ config = (struct _config *)cfg_temp;
+ cfg_temp -= sizeof(struct _config); // Space for backup config data
+ backup_config = (struct _config *)cfg_temp;
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG_READONLY_FALLBACK
+ cfg_temp -= sizeof(struct _config); // Space for readonly copy of config data
+ readonly_config = (struct _config *)cfg_temp;
+#endif
+ workspace_end = cfg_temp;
+#ifdef CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH
+ if (!do_flash_init()) return;
+#ifdef CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG
+ cfg_size = _rup(sizeof(struct _config), sizeof(struct fis_image_desc));
+ if ((fisdir_size-cfg_size) < (CYGNUM_REDBOOT_FIS_DIRECTORY_ENTRY_COUNT *
+ CYGNUM_REDBOOT_FIS_DIRECTORY_ENTRY_SIZE)) {
+ // Too bad this can't be checked at compile/build time
+ diag_printf("Sorry, FLASH config exceeds available space in FIS directory\n");
+ return;
+ }
+ cfg_base = (void *)(((CYG_ADDRESS)fis_addr + fisdir_size) - cfg_size);
+ fisdir_size -= cfg_size;
+#else
+ cfg_size = (flash_block_size > sizeof(struct _config)) ?
+ sizeof(struct _config) :
+ _rup(sizeof(struct _config), flash_block_size);
+ if (CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK < 0) {
+ cfg_base = (void *)((CYG_ADDRESS)flash_end + 1 -
+ _rup(_rup((-CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK*flash_block_size), cfg_size), flash_block_size));
+ } else {
+ cfg_base = (void *)((CYG_ADDRESS)flash_start +
+ _rup(_rup((CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK*flash_block_size), cfg_size), flash_block_size));
+ }
+#endif
+ FLASH_READ(cfg_base, config, sizeof(struct _config), &err_addr);
+ conf_endian_fixup(config);
+#else
+ read_eeprom(config, sizeof(struct _config)); // into 'config'
+#endif
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG_READONLY_FALLBACK
+ memcpy(readonly_config, config, sizeof(struct _config));
+#endif
+ if ((flash_crc(config) != config->cksum) ||
+ (config->key1 != CONFIG_KEY1)|| (config->key2 != CONFIG_KEY2)) {
+ diag_printf("**Warning** FLASH configuration checksum error or invalid key\n");
+ diag_printf("Use 'fconfig -i' to [re]initialize database\n");
+ config_init();
+ return;
+ }
+ config_ok = true;
+ flash_get_config("boot_script", &use_boot_script, CONFIG_BOOL);
+ if (use_boot_script) {
+ flash_get_config("boot_script_data", &script, CONFIG_SCRIPT);
+ flash_get_config("boot_script_timeout", &script_timeout, CONFIG_INT);
+ }
+#ifdef CYGSEM_REDBOOT_VARIABLE_BAUD_RATE
+ if (flash_get_config("console_baud_rate", &console_baud_rate, CONFIG_INT)) {
+ extern int set_console_baud_rate(int);
+ set_console_baud_rate(console_baud_rate);
+ }
+#endif
+}
+
+RedBoot_init(load_flash_config, RedBoot_INIT_SECOND);
+
+// EOF fconfig.c
diff --git a/cesar/ecos/packages/redboot/current/src/flash.c b/cesar/ecos/packages/redboot/current/src/flash.c
new file mode 100644
index 0000000000..bd548fc87e
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/flash.c
@@ -0,0 +1,1439 @@
+//==========================================================================
+//
+// flash.c
+//
+// RedBoot - FLASH memory support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
+// Copyright (C) 2003, 2004 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas, tkoeller
+// Date: 2000-07-28
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <cyg/io/flash.h>
+#include <fis.h>
+#include <sib.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#ifdef CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG
+// Note horrid intertwining of functions, to save precious FLASH
+extern void conf_endian_fixup(void *p);
+#endif
+
+// Round a quantity up
+#define _rup(n,s) ((((n)+(s-1))/s)*s)
+
+#ifdef CYGOPT_REDBOOT_FIS
+// Image management functions
+local_cmd_entry("init",
+ "Initialize FLASH Image System [FIS]",
+ "[-f]",
+ fis_init,
+ FIS_cmds
+ );
+#ifdef CYGSEM_REDBOOT_FIS_CRC_CHECK
+# define FIS_LIST_OPTS "[-c] [-d]"
+#else
+# define FIS_LIST_OPTS "[-d]"
+#endif
+local_cmd_entry("list",
+ "Display contents of FLASH Image System [FIS]",
+ FIS_LIST_OPTS,
+ fis_list,
+ FIS_cmds
+ );
+local_cmd_entry("free",
+ "Display free [available] locations within FLASH Image System [FIS]",
+ "",
+ fis_free,
+ FIS_cmds
+ );
+local_cmd_entry("delete",
+ "Delete an image from FLASH Image System [FIS]",
+ "name",
+ fis_delete,
+ FIS_cmds
+ );
+
+static char fis_load_usage[] =
+#ifdef CYGPRI_REDBOOT_ZLIB_FLASH
+ "[-d] "
+#endif
+ "[-b <memory_load_address>] [-c] name";
+
+local_cmd_entry("load",
+ "Load image from FLASH Image System [FIS] into RAM",
+ fis_load_usage,
+ fis_load,
+ FIS_cmds
+ );
+local_cmd_entry("create",
+ "Create an image",
+ "-b <mem_base> -l <image_length> [-s <data_length>]\n"
+ " [-f <flash_addr>] [-e <entry_point>] [-r <ram_addr>] [-n] <name>",
+ fis_create,
+ FIS_cmds
+ );
+#endif
+
+// Raw flash access functions
+local_cmd_entry("erase",
+ "Erase FLASH contents",
+ "-f <flash_addr> -l <length>",
+ fis_erase,
+ FIS_cmds
+ );
+#ifdef CYGHWR_IO_FLASH_BLOCK_LOCKING
+local_cmd_entry("lock",
+ "LOCK FLASH contents",
+ "[-f <flash_addr> -l <length>] [name]",
+ fis_lock,
+ FIS_cmds
+ );
+local_cmd_entry("unlock",
+ "UNLOCK FLASH contents",
+ "[-f <flash_addr> -l <length>] [name]",
+ fis_unlock,
+ FIS_cmds
+ );
+#endif
+local_cmd_entry("write",
+ "Write raw data directly to FLASH",
+ "-f <flash_addr> -b <mem_base> -l <image_length>",
+ fis_write,
+ FIS_cmds
+ );
+
+// Define table boundaries
+CYG_HAL_TABLE_BEGIN( __FIS_cmds_TAB__, FIS_cmds);
+CYG_HAL_TABLE_END( __FIS_cmds_TAB_END__, FIS_cmds);
+
+extern struct cmd __FIS_cmds_TAB__[], __FIS_cmds_TAB_END__;
+
+// CLI function
+static cmd_fun do_fis;
+RedBoot_nested_cmd("fis",
+ "Manage FLASH images",
+ "{cmds}",
+ do_fis,
+ __FIS_cmds_TAB__, &__FIS_cmds_TAB_END__
+ );
+
+// Local data used by these routines
+void *flash_start, *flash_end;
+int flash_block_size, flash_num_blocks;
+#ifdef CYGOPT_REDBOOT_FIS
+void *fis_work_block;
+void *fis_addr;
+int fisdir_size; // Size of FIS directory.
+#endif
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+extern void *cfg_base; // Location in Flash of config data
+extern int cfg_size; // Length of config data - rounded to Flash block size
+extern struct _config *config;
+#endif
+
+static void
+fis_usage(char *why)
+{
+ diag_printf("*** invalid 'fis' command: %s\n", why);
+ cmd_usage(__FIS_cmds_TAB__, &__FIS_cmds_TAB_END__, "fis ");
+}
+
+static void
+_show_invalid_flash_address(CYG_ADDRESS flash_addr, int stat)
+{
+ diag_printf("Invalid FLASH address %p: %s\n", (void *)flash_addr, flash_errmsg(stat));
+ diag_printf(" valid range is %p-%p\n", (void *)flash_start, (void *)flash_end);
+}
+
+#ifdef CYGOPT_REDBOOT_FIS
+
+// fis_endian_fixup() is used to swap endianess if required.
+//
+static inline void fis_endian_fixup(void *addr)
+{
+#ifdef REDBOOT_FLASH_REVERSE_BYTEORDER
+ struct fis_image_desc *p = addr;
+ int cnt = fisdir_size / sizeof(struct fis_image_desc);
+
+ while (cnt-- > 0) {
+ p->flash_base = CYG_SWAP32(p->flash_base);
+ p->mem_base = CYG_SWAP32(p->mem_base);
+ p->size = CYG_SWAP32(p->size);
+ p->entry_point = CYG_SWAP32(p->entry_point);
+ p->data_length = CYG_SWAP32(p->data_length);
+ p->desc_cksum = CYG_SWAP32(p->desc_cksum);
+ p->file_cksum = CYG_SWAP32(p->file_cksum);
+ p++;
+ }
+#endif
+}
+
+void
+fis_read_directory(void)
+{
+ void *err_addr;
+
+ FLASH_READ(fis_addr, fis_work_block, fisdir_size, (void **)&err_addr);
+ fis_endian_fixup(fis_work_block);
+}
+
+struct fis_image_desc *
+fis_lookup(char *name, int *num)
+{
+ int i;
+ struct fis_image_desc *img;
+
+ fis_read_directory();
+
+ img = (struct fis_image_desc *)fis_work_block;
+ for (i = 0; i < fisdir_size/sizeof(*img); i++, img++) {
+ if ((img->name[0] != (unsigned char)0xFF) &&
+ (strcasecmp(name, img->name) == 0)) {
+ if (num) *num = i;
+ return img;
+ }
+ }
+ return (struct fis_image_desc *)0;
+}
+
+void
+fis_update_directory(void)
+{
+ int stat;
+ void *err_addr;
+
+ fis_endian_fixup(fis_work_block);
+#ifdef CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG
+ memcpy((char *)fis_work_block+fisdir_size, config, cfg_size);
+ conf_endian_fixup((char *)fis_work_block+fisdir_size);
+#endif
+#ifdef CYGSEM_REDBOOT_FLASH_LOCK_SPECIAL
+ // Ensure [quietly] that the directory is unlocked before trying to update
+ flash_unlock((void *)fis_addr, flash_block_size, (void **)&err_addr);
+#endif
+ if ((stat = flash_erase(fis_addr, flash_block_size, (void **)&err_addr)) != 0) {
+ diag_printf("Error erasing FIS directory at %p: %s\n", err_addr, flash_errmsg(stat));
+ } else {
+ if ((stat = FLASH_PROGRAM(fis_addr, fis_work_block,
+ flash_block_size, (void **)&err_addr)) != 0) {
+ diag_printf("Error writing FIS directory at %p: %s\n",
+ err_addr, flash_errmsg(stat));
+ }
+ }
+#ifdef CYGSEM_REDBOOT_FLASH_LOCK_SPECIAL
+ // Ensure [quietly] that the directory is locked after the update
+ flash_lock((void *)fis_addr, flash_block_size, (void **)&err_addr);
+#endif
+ fis_endian_fixup(fis_work_block);
+}
+
+static void
+fis_init(int argc, char *argv[])
+{
+ int stat;
+ struct fis_image_desc *img;
+ void *err_addr;
+ bool full_init = false;
+ struct option_info opts[1];
+ CYG_ADDRESS redboot_flash_start;
+ unsigned long redboot_image_size;
+
+ init_opts(&opts[0], 'f', false, OPTION_ARG_TYPE_FLG,
+ (void *)&full_init, (bool *)0, "full initialization, erases all of flash");
+ if (!scan_opts(argc, argv, 2, opts, 1, 0, 0, ""))
+ {
+ return;
+ }
+
+ if (!verify_action("About to initialize [format] FLASH image system")) {
+ diag_printf("** Aborted\n");
+ return;
+ }
+ diag_printf("*** Initialize FLASH Image System\n");
+
+#define MIN_REDBOOT_IMAGE_SIZE CYGBLD_REDBOOT_MIN_IMAGE_SIZE
+ redboot_image_size = flash_block_size > MIN_REDBOOT_IMAGE_SIZE ?
+ flash_block_size : MIN_REDBOOT_IMAGE_SIZE;
+
+ // Create a pseudo image for RedBoot
+ img = (struct fis_image_desc *)fis_work_block;
+ memset(img, 0xFF, fisdir_size); // Start with erased data
+#ifdef CYGOPT_REDBOOT_FIS_RESERVED_BASE
+ memset(img, 0, sizeof(*img));
+ strcpy(img->name, "(reserved)");
+ img->flash_base = (CYG_ADDRESS)flash_start;
+ img->mem_base = (CYG_ADDRESS)flash_start;
+ img->size = CYGNUM_REDBOOT_FLASH_RESERVED_BASE;
+ img++;
+#endif
+ redboot_flash_start = (CYG_ADDRESS)flash_start + CYGBLD_REDBOOT_FLASH_BOOT_OFFSET;
+#ifdef CYGOPT_REDBOOT_FIS_REDBOOT
+ memset(img, 0, sizeof(*img));
+ strcpy(img->name, "RedBoot");
+ img->flash_base = redboot_flash_start;
+ img->mem_base = redboot_flash_start;
+ img->size = redboot_image_size;
+ img++;
+ redboot_flash_start += redboot_image_size;
+#endif
+#ifdef CYGOPT_REDBOOT_FIS_REDBOOT_POST
+#ifdef CYGNUM_REDBOOT_FIS_REDBOOT_POST_OFFSET
+ // Take care to place the POST entry at the right offset:
+ redboot_flash_start = (CYG_ADDRESS)flash_start + CYGNUM_REDBOOT_FIS_REDBOOT_POST_OFFSET;
+#endif
+ memset(img, 0, sizeof(*img));
+ strcpy(img->name, "RedBoot[post]");
+ img->flash_base = redboot_flash_start;
+ img->mem_base = redboot_flash_start;
+ img->size = redboot_image_size;
+ img++;
+ redboot_flash_start += redboot_image_size;
+#endif
+#ifdef CYGOPT_REDBOOT_FIS_REDBOOT_BACKUP
+ // And a backup image
+ memset(img, 0, sizeof(*img));
+ strcpy(img->name, "RedBoot[backup]");
+ img->flash_base = redboot_flash_start;
+ img->mem_base = redboot_flash_start;
+ img->size = redboot_image_size;
+ img++;
+ redboot_flash_start += redboot_image_size;
+#endif
+#if defined(CYGSEM_REDBOOT_FLASH_CONFIG) && defined(CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH)
+ // And a descriptor for the configuration data
+ memset(img, 0, sizeof(*img));
+ strcpy(img->name, "RedBoot config");
+ img->flash_base = (CYG_ADDRESS)cfg_base;
+ img->mem_base = (CYG_ADDRESS)cfg_base;
+ img->size = cfg_size;
+ img++;
+#endif
+ // And a descriptor for the descriptor table itself
+ memset(img, 0, sizeof(*img));
+ strcpy(img->name, "FIS directory");
+ img->flash_base = (CYG_ADDRESS)fis_addr;
+ img->mem_base = (CYG_ADDRESS)fis_addr;
+ img->size = fisdir_size;
+ img++;
+
+#ifdef CYGOPT_REDBOOT_FIS_DIRECTORY_ARM_SIB_ID
+ // FIS gets the size of a full block - note, this should be changed
+ // if support is added for multi-block FIS structures.
+ img = (struct fis_image_desc *)((CYG_ADDRESS)fis_work_block + fisdir_size);
+ // Add a footer so the FIS will be recognized by the ARM Boot
+ // Monitor as a reserved area.
+ {
+ tFooter* footer_p = (tFooter*)((CYG_ADDRESS)img - sizeof(tFooter));
+ cyg_uint32 check = 0;
+ cyg_uint32 *check_ptr = (cyg_uint32 *)footer_p;
+ cyg_int32 count = (sizeof(tFooter) - 4) >> 2;
+
+ // Prepare footer. Try to protect all but the reserved space
+ // and the first RedBoot image (which is expected to be
+ // bootable), but fall back to just protecting the FIS if it's
+ // not at the default position in the flash.
+#if defined(CYGOPT_REDBOOT_FIS_RESERVED_BASE) && (-1 == CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK)
+ footer_p->blockBase = (char*)_ADDR_REDBOOT_TO_ARM(flash_start);
+ footer_p->blockBase += CYGNUM_REDBOOT_FLASH_RESERVED_BASE + redboot_image_size;
+#else
+ footer_p->blockBase = (char*)_ADDR_REDBOOT_TO_ARM(fis_work_block);
+#endif
+ footer_p->infoBase = NULL;
+ footer_p->signature = FLASH_FOOTER_SIGNATURE;
+ footer_p->type = TYPE_REDHAT_REDBOOT;
+
+ // and compute its checksum
+ for ( ; count > 0; count--) {
+ if (*check_ptr > ~check)
+ check++;
+ check += *check_ptr++;
+ }
+ footer_p->checksum = ~check;
+ }
+#endif
+
+ // Do this after creating the initialized table because that inherently
+ // calculates where the high water mark of default RedBoot images is.
+
+ if (full_init) {
+ unsigned long erase_size;
+ CYG_ADDRESS erase_start;
+ // Erase everything except default RedBoot images, fis block,
+ // and config block.
+ // First deal with the possible first part, before RedBoot images:
+#if (CYGBLD_REDBOOT_FLASH_BOOT_OFFSET > CYGNUM_REDBOOT_FLASH_RESERVED_BASE)
+ erase_start = (CYG_ADDRESS)flash_start + CYGNUM_REDBOOT_FLASH_RESERVED_BASE;
+ erase_size = (CYG_ADDRESS)flash_start + CYGBLD_REDBOOT_FLASH_BOOT_OFFSET;
+ if ( erase_size > erase_start ) {
+ erase_size -= erase_start;
+ if ((stat = flash_erase((void *)erase_start, erase_size,
+ (void **)&err_addr)) != 0) {
+ diag_printf(" initialization failed at %p: %s\n",
+ err_addr, flash_errmsg(stat));
+ }
+ }
+#endif
+ // second deal with the larger part in the main:
+ erase_start = redboot_flash_start; // high water of created images
+ // Now the empty bits between the end of Redboot and the cfg and dir
+ // blocks.
+#if defined(CYGSEM_REDBOOT_FLASH_CONFIG) && \
+ defined(CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH) && \
+ !defined(CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG)
+ if (fis_addr > cfg_base) {
+ erase_size = (CYG_ADDRESS)cfg_base - erase_start; // the gap between HWM and config data
+ } else {
+ erase_size = (CYG_ADDRESS)fis_addr - erase_start; // the gap between HWM and fis data
+ }
+ if ((stat = flash_erase((void *)erase_start, erase_size,
+ (void **)&err_addr)) != 0) {
+ diag_printf(" initialization failed %p: %s\n",
+ err_addr, flash_errmsg(stat));
+ }
+ erase_start += (erase_size + flash_block_size);
+ if (fis_addr > cfg_base) {
+ erase_size = (CYG_ADDRESS)fis_addr - erase_start; // the gap between config and fis data
+ } else {
+ erase_size = (CYG_ADDRESS)cfg_base - erase_start; // the gap between fis and config data
+ }
+ if ((stat = flash_erase((void *)erase_start, erase_size,
+ (void **)&err_addr)) != 0) {
+ diag_printf(" initialization failed %p: %s\n",
+ err_addr, flash_errmsg(stat));
+ }
+ erase_start += (erase_size + flash_block_size);
+#else // !CYGSEM_REDBOOT_FLASH_CONFIG
+ erase_size = (CYG_ADDRESS)fis_addr - erase_start; // the gap between HWM and fis data
+ if ((stat = flash_erase((void *)erase_start, erase_size,
+ (void **)&err_addr)) != 0) {
+ diag_printf(" initialization failed %p: %s\n",
+ err_addr, flash_errmsg(stat));
+ }
+ erase_start += (erase_size + flash_block_size);
+#endif
+ // Lastly, anything at the end, if there is any
+ if ( erase_start < (((CYG_ADDRESS)flash_end)+1) ) {
+ erase_size = ((CYG_ADDRESS)flash_end - erase_start) + 1;
+ if ((stat = flash_erase((void *)erase_start, erase_size,
+ (void **)&err_addr)) != 0) {
+ diag_printf(" initialization failed at %p: %s\n",
+ err_addr, flash_errmsg(stat));
+ }
+ }
+#ifndef CYGDAT_REDBOOT_FIS_MAX_FREE_CHUNKS
+ // In this case, 'fis free' works by scanning for erased blocks. Since the
+ // "-f" option was not supplied, there may be areas which are not used but
+ // don't appear to be free since they are not erased - thus the warning
+ } else {
+ diag_printf(" Warning: device contents not erased, some blocks may not be usable\n");
+#endif
+ }
+ fis_update_directory();
+}
+
+static void
+fis_list(int argc, char *argv[])
+{
+ struct fis_image_desc *img;
+ int i, image_indx;
+ bool show_cksums = false;
+ bool show_datalen = false;
+ struct option_info opts[2];
+ unsigned long last_addr, lowest_addr;
+ bool image_found;
+
+#ifdef CYGHWR_REDBOOT_ARM_FLASH_SIB
+ // FIXME: this is somewhat half-baked
+ extern void arm_fis_list(void);
+ arm_fis_list();
+ return;
+#endif
+
+ init_opts(&opts[0], 'd', false, OPTION_ARG_TYPE_FLG,
+ (void *)&show_datalen, (bool *)0, "display data length");
+#ifdef CYGSEM_REDBOOT_FIS_CRC_CHECK
+ init_opts(&opts[1], 'c', false, OPTION_ARG_TYPE_FLG,
+ (void *)&show_cksums, (bool *)0, "display checksums");
+ i = 2;
+#else
+ i = 1;
+#endif
+ if (!scan_opts(argc, argv, 2, opts, i, 0, 0, "")) {
+ return;
+ }
+ fis_read_directory();
+
+ // Let diag_printf do the formatting in both cases, rather than counting
+ // cols by hand....
+ diag_printf("%-16s %-10s %-10s %-10s %-s\n",
+ "Name","FLASH addr",
+ show_cksums ? "Checksum" : "Mem addr",
+ show_datalen ? "Datalen" : "Length",
+ "Entry point" );
+ last_addr = 0;
+ image_indx = 0;
+ do {
+ image_found = false;
+ lowest_addr = 0xFFFFFFFF;
+ img = (struct fis_image_desc *) fis_work_block;
+ for (i = 0; i < fisdir_size/sizeof(*img); i++, img++) {
+ if (img->name[0] != (unsigned char)0xFF) {
+ if ((img->flash_base > last_addr) && (img->flash_base < lowest_addr)) {
+ lowest_addr = img->flash_base;
+ image_found = true;
+ image_indx = i;
+ }
+ }
+ }
+ if (image_found) {
+ img = (struct fis_image_desc *) fis_work_block;
+ img += image_indx;
+ diag_printf("%-16s 0x%08lX 0x%08lX 0x%08lX 0x%08lX\n", img->name,
+ (unsigned long)img->flash_base,
+#ifdef CYGSEM_REDBOOT_FIS_CRC_CHECK
+ show_cksums ? img->file_cksum : img->mem_base,
+ show_datalen ? img->data_length : img->size,
+#else
+ img->mem_base,
+ img->size,
+#endif
+ (unsigned long)img->entry_point);
+ }
+ last_addr = lowest_addr;
+ } while (image_found == true);
+}
+
+#ifdef CYGDAT_REDBOOT_FIS_MAX_FREE_CHUNKS
+struct free_chunk {
+ CYG_ADDRESS start, end;
+};
+
+static int
+find_free(struct free_chunk *chunks)
+{
+ CYG_ADDRESS *fis_ptr, *fis_end;
+ struct fis_image_desc *img;
+ int i, idx;
+ int num_chunks = 1;
+
+ // Do not search the area reserved for pre-RedBoot systems:
+ fis_ptr = (CYG_ADDRESS *)((CYG_ADDRESS)flash_start +
+ CYGNUM_REDBOOT_FLASH_RESERVED_BASE);
+ fis_end = (CYG_ADDRESS *)flash_end;
+ chunks[num_chunks-1].start = (CYG_ADDRESS)fis_ptr;
+ chunks[num_chunks-1].end = (CYG_ADDRESS)fis_end;
+ fis_read_directory();
+ img = (struct fis_image_desc *) fis_work_block;
+ for (i = 0; i < fisdir_size/sizeof(*img); i++, img++) {
+ if (img->name[0] != (unsigned char)0xFF) {
+ // Figure out which chunk this is in and split it
+ for (idx = 0; idx < num_chunks; idx++) {
+ if ((img->flash_base >= chunks[idx].start) &&
+ (img->flash_base <= chunks[idx].end)) {
+ if (img->flash_base == chunks[idx].start) {
+ chunks[idx].start += img->size;
+ if (chunks[idx].start >= chunks[idx].end) {
+ // This free chunk has collapsed
+ while (idx < (num_chunks-1)) {
+ chunks[idx] = chunks[idx+1];
+ idx++;
+ }
+ num_chunks--;
+ }
+ } else if ((img->flash_base+img->size) == chunks[idx].end) {
+ chunks[idx].end = img->flash_base;
+ } else {
+ // Split chunk into two parts
+ if ((img->flash_base+img->size) < (CYG_ADDRESS)fis_end) {
+ int j;
+ // make room for new chunk
+ for (j = num_chunks; j > (idx+1); j--)
+ chunks[j] = chunks[j-1];
+ chunks[idx+1].start = img->flash_base + img->size;
+ chunks[idx+1].end = chunks[idx].end;
+ if (++num_chunks == CYGDAT_REDBOOT_FIS_MAX_FREE_CHUNKS) {
+ diag_printf("Warning: too many free chunks\n");
+ return num_chunks;
+ }
+ }
+ chunks[idx].end = img->flash_base;
+ }
+ break;
+ }
+ }
+ }
+ }
+ return num_chunks;
+}
+#endif // CYGDAT_REDBOOT_FIS_MAX_FREE_CHUNKS
+
+static void
+fis_free(int argc, char *argv[])
+{
+#ifndef CYGDAT_REDBOOT_FIS_MAX_FREE_CHUNKS
+ unsigned long *fis_ptr, *fis_end, flash_data;
+ unsigned long *area_start;
+ void *err_addr;
+
+ // Do not search the area reserved for pre-RedBoot systems:
+ fis_ptr = (unsigned long *)((CYG_ADDRESS)flash_start +
+ CYGNUM_REDBOOT_FLASH_RESERVED_BASE);
+ fis_end = (unsigned long *)(CYG_ADDRESS)flash_end;
+ area_start = fis_ptr;
+ while (fis_ptr < fis_end) {
+ flash_read(fis_ptr, &flash_data, sizeof(unsigned long), (void **)&err_addr);
+ if (flash_data != (unsigned long)0xFFFFFFFF) {
+ if (area_start != fis_ptr) {
+ // Assume that this is something
+ diag_printf(" 0x%08lX .. 0x%08lX\n",
+ (CYG_ADDRESS)area_start, (CYG_ADDRESS)fis_ptr);
+ }
+ // Find next blank block
+ area_start = fis_ptr;
+ while (area_start < fis_end) {
+ flash_read(area_start, &flash_data, sizeof(unsigned long), (void **)&err_addr);
+ if (flash_data == (unsigned long)0xFFFFFFFF) {
+ break;
+ }
+ area_start += flash_block_size / sizeof(CYG_ADDRESS);
+ }
+ fis_ptr = area_start;
+ } else {
+ fis_ptr += flash_block_size / sizeof(CYG_ADDRESS);
+ }
+ }
+ if (area_start != fis_ptr) {
+ diag_printf(" 0x%08lX .. 0x%08lX\n",
+ (CYG_ADDRESS)area_start, (CYG_ADDRESS)fis_ptr);
+ }
+#else
+ struct free_chunk chunks[CYGDAT_REDBOOT_FIS_MAX_FREE_CHUNKS];
+ int idx, num_chunks;
+
+ num_chunks = find_free(chunks);
+ for (idx = 0; idx < num_chunks; idx++) {
+ diag_printf(" 0x%08lX .. 0x%08lX\n",
+ (unsigned long)chunks[idx].start,
+ (unsigned long)chunks[idx].end);
+ }
+#endif
+}
+
+// Find the first unused area of flash which is long enough
+static bool
+fis_find_free(CYG_ADDRESS *addr, unsigned long length)
+{
+#ifndef CYGDAT_REDBOOT_FIS_MAX_FREE_CHUNKS
+ unsigned long *fis_ptr, *fis_end, flash_data;
+ unsigned long *area_start;
+ void *err_addr;
+
+ // Do not search the area reserved for pre-RedBoot systems:
+ fis_ptr = (unsigned long *)((CYG_ADDRESS)flash_start +
+ CYGNUM_REDBOOT_FLASH_RESERVED_BASE);
+ fis_end = (unsigned long *)(CYG_ADDRESS)flash_end;
+ area_start = fis_ptr;
+ while (fis_ptr < fis_end) {
+ flash_read(fis_ptr, &flash_data, sizeof(unsigned long), (void **)&err_addr);
+ if (flash_data != (unsigned long)0xFFFFFFFF) {
+ if (area_start != fis_ptr) {
+ // Assume that this is something
+ if ((fis_ptr-area_start) >= (length/sizeof(unsigned))) {
+ *addr = (CYG_ADDRESS)area_start;
+ return true;
+ }
+ }
+ // Find next blank block
+ area_start = fis_ptr;
+ while (area_start < fis_end) {
+ flash_read(area_start, &flash_data, sizeof(unsigned long), (void **)&err_addr);
+ if (flash_data == (unsigned long)0xFFFFFFFF) {
+ break;
+ }
+ area_start += flash_block_size / sizeof(CYG_ADDRESS);
+ }
+ fis_ptr = area_start;
+ } else {
+ fis_ptr += flash_block_size / sizeof(CYG_ADDRESS);
+ }
+ }
+ if (area_start != fis_ptr) {
+ if ((fis_ptr-area_start) >= (length/sizeof(unsigned))) {
+ *addr = (CYG_ADDRESS)area_start;
+ return true;
+ }
+ }
+ return false;
+#else
+ struct free_chunk chunks[CYGDAT_REDBOOT_FIS_MAX_FREE_CHUNKS];
+ int idx, num_chunks;
+
+ num_chunks = find_free(chunks);
+ for (idx = 0; idx < num_chunks; idx++) {
+ if ((chunks[idx].end - chunks[idx].start) >= length) {
+ *addr = (CYG_ADDRESS)chunks[idx].start;
+ return true;
+ }
+ }
+ return false;
+#endif
+}
+
+static void
+fis_create(int argc, char *argv[])
+{
+ int i, stat;
+ unsigned long length, img_size;
+ CYG_ADDRESS mem_addr, exec_addr, flash_addr, entry_addr;
+ char *name;
+ bool mem_addr_set = false;
+ bool exec_addr_set = false;
+ bool entry_addr_set = false;
+ bool flash_addr_set = false;
+ bool length_set = false;
+ bool img_size_set = false;
+ bool no_copy = false;
+ void *err_addr;
+ struct fis_image_desc *img = NULL;
+ bool defaults_assumed;
+ struct option_info opts[7];
+ bool prog_ok = true;
+
+ init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM,
+ (void *)&mem_addr, (bool *)&mem_addr_set, "memory base address");
+ init_opts(&opts[1], 'r', true, OPTION_ARG_TYPE_NUM,
+ (void *)&exec_addr, (bool *)&exec_addr_set, "ram base address");
+ init_opts(&opts[2], 'e', true, OPTION_ARG_TYPE_NUM,
+ (void *)&entry_addr, (bool *)&entry_addr_set, "entry point address");
+ init_opts(&opts[3], 'f', true, OPTION_ARG_TYPE_NUM,
+ (void *)&flash_addr, (bool *)&flash_addr_set, "FLASH memory base address");
+ init_opts(&opts[4], 'l', true, OPTION_ARG_TYPE_NUM,
+ (void *)&length, (bool *)&length_set, "image length [in FLASH]");
+ init_opts(&opts[5], 's', true, OPTION_ARG_TYPE_NUM,
+ (void *)&img_size, (bool *)&img_size_set, "image size [actual data]");
+ init_opts(&opts[6], 'n', false, OPTION_ARG_TYPE_FLG,
+ (void *)&no_copy, (bool *)0, "don't copy from RAM to FLASH, just update directory");
+ if (!scan_opts(argc, argv, 2, opts, 7, (void *)&name, OPTION_ARG_TYPE_STR, "file name"))
+ {
+ fis_usage("invalid arguments");
+ return;
+ }
+
+ fis_read_directory();
+ defaults_assumed = false;
+ if (name) {
+ // Search existing files to acquire defaults for params not specified:
+ img = fis_lookup(name, NULL);
+ if (img) {
+ // Found it, so get image size from there
+ if (!length_set) {
+ length_set = true;
+ length = img->size;
+ defaults_assumed = true;
+ }
+ }
+ }
+ if (!mem_addr_set && (load_address >= (CYG_ADDRESS)ram_start) &&
+ (load_address_end) < (CYG_ADDRESS)ram_end) {
+ mem_addr = load_address;
+ mem_addr_set = true;
+ defaults_assumed = true;
+ // Get entry address from loader, unless overridden
+ if (!entry_addr_set)
+ entry_addr = entry_address;
+ if (!length_set) {
+ length = load_address_end - load_address;
+ length_set = true;
+ } else if (defaults_assumed && !img_size_set) {
+ /* We got length from the FIS table, so the size of the
+ actual loaded image becomes img_size */
+ img_size = load_address_end - load_address;
+ img_size_set = true;
+ }
+ }
+ // Get the remaining fall-back values from the fis
+ if (img) {
+ if (!exec_addr_set) {
+ // Preserve "normal" behaviour
+ exec_addr_set = true;
+ exec_addr = flash_addr_set ? flash_addr : mem_addr;
+ }
+ if (!flash_addr_set) {
+ flash_addr_set = true;
+ flash_addr = img->flash_base;
+ defaults_assumed = true;
+ }
+ }
+
+ if ((!no_copy && !mem_addr_set) || (no_copy && !flash_addr_set) ||
+ !length_set || !name) {
+ fis_usage("required parameter missing");
+ return;
+ }
+ if (!img_size_set) {
+ img_size = length;
+ }
+ // 'length' is size of FLASH image, 'img_size' is actual data size
+ // Round up length to FLASH block size
+#ifndef CYGPKG_HAL_MIPS // FIXME: compiler is b0rken
+ length = ((length + flash_block_size - 1) / flash_block_size) * flash_block_size;
+ if (length < img_size) {
+ diag_printf("Invalid FLASH image size/length combination\n");
+ return;
+ }
+#endif
+ if (flash_addr_set &&
+ ((stat = flash_verify_addr((void *)flash_addr)) ||
+ (stat = flash_verify_addr((void *)(flash_addr+length-1))))) {
+ _show_invalid_flash_address(flash_addr, stat);
+ return;
+ }
+ if (flash_addr_set && ((flash_addr & (flash_block_size-1)) != 0)) {
+ diag_printf("Invalid FLASH address: %p\n", (void *)flash_addr);
+ diag_printf(" must be 0x%x aligned\n", flash_block_size);
+ return;
+ }
+ if (strlen(name) >= sizeof(img->name)) {
+ diag_printf("Name is too long, must be less than %d chars\n", (int)sizeof(img->name));
+ return;
+ }
+ if (!no_copy) {
+ if ((mem_addr < (CYG_ADDRESS)ram_start) ||
+ ((mem_addr+img_size) >= (CYG_ADDRESS)ram_end)) {
+ diag_printf("** WARNING: RAM address: %p may be invalid\n", (void *)mem_addr);
+ diag_printf(" valid range is %p-%p\n", (void *)ram_start, (void *)ram_end);
+ }
+ if (!flash_addr_set && !fis_find_free(&flash_addr, length)) {
+ diag_printf("Can't locate %lx(%ld) bytes free in FLASH\n", length, length);
+ return;
+ }
+ }
+ // First, see if the image by this name has agreable properties
+ if (img) {
+ if (flash_addr_set && (img->flash_base != flash_addr)) {
+ diag_printf("Image found, but flash address (%p)\n"
+ " is incorrect (present image location %p)\n",
+ (void*)flash_addr, (void*)img->flash_base);
+
+ return;
+ }
+ if (img->size != length) {
+ diag_printf("Image found, but length (0x%lx, necessitating image size 0x%lx)\n"
+ " is incorrect (present image size 0x%lx)\n",
+ img_size, length, img->size);
+ return;
+ }
+ if (!verify_action("An image named '%s' exists", name)) {
+ return;
+ } else {
+ if (defaults_assumed) {
+ if (no_copy &&
+ !verify_action("* CAUTION * about to program '%s'\n at %p..%p from %p",
+ name, (void *)flash_addr, (void *)(flash_addr+img_size-1),
+ (void *)mem_addr)) {
+ return; // The guy gave up
+ }
+ }
+ }
+ } else {
+#ifdef CYGDAT_REDBOOT_FIS_MAX_FREE_CHUNKS
+ // Make sure that any FLASH address specified directly is truly free
+ if (flash_addr_set && !no_copy) {
+ struct free_chunk chunks[CYGDAT_REDBOOT_FIS_MAX_FREE_CHUNKS];
+ int idx, num_chunks;
+ bool is_free = false;
+
+ num_chunks = find_free(chunks);
+ for (idx = 0; idx < num_chunks; idx++) {
+ if ((flash_addr >= chunks[idx].start) &&
+ ((flash_addr+length-1) <= chunks[idx].end)) {
+ is_free = true;
+ }
+ }
+ if (!is_free) {
+ diag_printf("Invalid FLASH address - not free!\n");
+ return;
+ }
+ }
+#endif
+ // If not image by that name, try and find an empty slot
+ img = (struct fis_image_desc *)fis_work_block;
+ for (i = 0; i < fisdir_size/sizeof(*img); i++, img++) {
+ if (img->name[0] == (unsigned char)0xFF) {
+ break;
+ }
+ }
+ if (i >= fisdir_size/sizeof(*img)) {
+ diag_printf("Can't find an empty slot in FIS directory!\n");
+ return;
+ }
+ }
+ if (!no_copy) {
+ // Safety check - make sure the address range is not within the code we're running
+ if (flash_code_overlaps((void *)flash_addr, (void *)(flash_addr+img_size-1))) {
+ diag_printf("Can't program this region - contains code in use!\n");
+ return;
+ }
+ if (prog_ok) {
+ // Erase area to be programmed
+ if ((stat = flash_erase((void *)flash_addr, length, (void **)&err_addr)) != 0) {
+ diag_printf("Can't erase region at %p: %s\n", err_addr, flash_errmsg(stat));
+ prog_ok = false;
+ }
+ }
+ if (prog_ok) {
+ // Now program it
+ if ((stat = FLASH_PROGRAM((void *)flash_addr, (void *)mem_addr, img_size, (void **)&err_addr)) != 0) {
+ diag_printf("Can't program region at %p: %s\n", err_addr, flash_errmsg(stat));
+ prog_ok = false;
+ }
+ }
+ }
+ if (prog_ok) {
+ // Update directory
+ memset(img, 0, sizeof(*img));
+ strcpy(img->name, name);
+ img->flash_base = flash_addr;
+ img->mem_base = exec_addr_set ? exec_addr : (flash_addr_set ? flash_addr : mem_addr);
+ img->entry_point = entry_addr_set ? entry_addr : (CYG_ADDRESS)entry_address; // Hope it's been set
+ img->size = length;
+ img->data_length = img_size;
+#ifdef CYGSEM_REDBOOT_FIS_CRC_CHECK
+ if (!no_copy) {
+ img->file_cksum = cyg_crc32((unsigned char *)mem_addr, img_size);
+ } else {
+ // No way to compute this, sorry
+ img->file_cksum = 0;
+ }
+#endif
+ fis_update_directory();
+ }
+}
+
+extern void arm_fis_delete(char *);
+static void
+fis_delete(int argc, char *argv[])
+{
+ char *name;
+ int num_reserved, i, stat;
+ void *err_addr;
+ struct fis_image_desc *img;
+
+ if (!scan_opts(argc, argv, 2, 0, 0, (void *)&name, OPTION_ARG_TYPE_STR, "image name"))
+ {
+ fis_usage("invalid arguments");
+ return;
+ }
+#ifdef CYGHWR_REDBOOT_ARM_FLASH_SIB
+ // FIXME: this is somewhat half-baked
+ arm_fis_delete(name);
+ return;
+#endif
+ img = (struct fis_image_desc *)fis_work_block;
+ num_reserved = 0;
+#ifdef CYGOPT_REDBOOT_FIS_RESERVED_BASE
+ num_reserved++;
+#endif
+#ifdef CYGOPT_REDBOOT_FIS_REDBOOT
+ num_reserved++;
+#endif
+#ifdef CYGOPT_REDBOOT_FIS_REDBOOT_BACKUP
+ num_reserved++;
+#endif
+#ifdef CYGOPT_REDBOOT_FIS_REDBOOT_POST
+ num_reserved++;
+#endif
+#if defined(CYGSEM_REDBOOT_FLASH_CONFIG) && defined(CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH)
+ num_reserved++;
+#endif
+#if 1 // And the descriptor for the descriptor table itself
+ num_reserved++;
+#endif
+
+ img = fis_lookup(name, &i);
+ if (img) {
+ if (i < num_reserved) {
+ diag_printf("Sorry, '%s' is a reserved image and cannot be deleted\n", img->name);
+ return;
+ }
+ if (!verify_action("Delete image '%s'", name)) {
+ return;
+ }
+ } else {
+ diag_printf("No image '%s' found\n", name);
+ return;
+ }
+ // Erase Data blocks (free space)
+ if ((stat = flash_erase((void *)img->flash_base, img->size, (void **)&err_addr)) != 0) {
+ diag_printf("Error erasing at %p: %s\n", err_addr, flash_errmsg(stat));
+ } else {
+ img->name[0] = (unsigned char)0xFF;
+ fis_update_directory();
+ }
+}
+
+static void
+fis_load(int argc, char *argv[])
+{
+ char *name;
+ struct fis_image_desc *img;
+ CYG_ADDRESS mem_addr;
+ bool mem_addr_set = false;
+ bool show_cksum = false;
+ struct option_info opts[3];
+#if defined(CYGSEM_REDBOOT_FIS_CRC_CHECK)
+ unsigned long cksum;
+#endif
+ int num_options;
+#if defined(CYGPRI_REDBOOT_ZLIB_FLASH) || defined(CYGSEM_REDBOOT_FIS_CRC_CHECK)
+ bool decompress = false;
+#endif
+ void *err_addr;
+
+ init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM,
+ (void *)&mem_addr, (bool *)&mem_addr_set, "memory [load] base address");
+ init_opts(&opts[1], 'c', false, OPTION_ARG_TYPE_FLG,
+ (void *)&show_cksum, (bool *)0, "display checksum");
+ num_options = 2;
+#ifdef CYGPRI_REDBOOT_ZLIB_FLASH
+ init_opts(&opts[num_options], 'd', false, OPTION_ARG_TYPE_FLG,
+ (void *)&decompress, 0, "decompress");
+ num_options++;
+#endif
+
+ CYG_ASSERT(num_options <= NUM_ELEMS(opts), "Too many options");
+
+ if (!scan_opts(argc, argv, 2, opts, num_options, (void *)&name, OPTION_ARG_TYPE_STR, "image name"))
+ {
+ fis_usage("invalid arguments");
+ return;
+ }
+ if ((img = fis_lookup(name, NULL)) == (struct fis_image_desc *)0) {
+ diag_printf("No image '%s' found\n", name);
+ return;
+ }
+ if (!mem_addr_set) {
+ mem_addr = img->mem_base;
+ }
+ // Load image from FLASH into RAM
+#ifdef CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS
+ if (!valid_address((void *)mem_addr)) {
+ diag_printf("Not a loadable image - try using -b ADDRESS option\n");
+ return;
+ }
+#endif
+#ifdef CYGPRI_REDBOOT_ZLIB_FLASH
+ if (decompress) {
+ int err;
+ _pipe_t fis_load_pipe;
+ _pipe_t* p = &fis_load_pipe;
+ p->out_buf = (unsigned char*) mem_addr;
+ p->out_max = p->out_size = -1;
+ p->in_buf = (unsigned char*) img->flash_base;
+ p->in_avail = img->data_length;
+
+ err = (*_dc_init)(p);
+
+ if (0 == err)
+ err = (*_dc_inflate)(p);
+
+ // Free used resources, do final translation of
+ // error value.
+ err = (*_dc_close)(p, err);
+
+ if (0 != err && p->msg) {
+ diag_printf("decompression error: %s\n", p->msg);
+ } else {
+ diag_printf("Image loaded from %p-%p\n", (unsigned char *)mem_addr, p->out_buf);
+ }
+
+ // Set load address/top
+ load_address = mem_addr;
+ load_address_end = (unsigned long)p->out_buf;
+
+ // Reload fis directory
+ fis_read_directory();
+ } else // dangling block
+#endif
+ {
+ flash_read((void *)img->flash_base, (void *)mem_addr, img->data_length, (void **)&err_addr);
+
+ // Set load address/top
+ load_address = mem_addr;
+ load_address_end = mem_addr + img->data_length;
+ }
+ entry_address = (unsigned long)img->entry_point;
+
+#ifdef CYGSEM_REDBOOT_FIS_CRC_CHECK
+ cksum = cyg_crc32((unsigned char *)mem_addr, img->data_length);
+ if (show_cksum) {
+ diag_printf("Checksum: 0x%08lx\n", cksum);
+ }
+ // When decompressing, leave CRC checking to decompressor
+ if (!decompress && img->file_cksum) {
+ if (cksum != img->file_cksum) {
+ diag_printf("** Warning - checksum failure. stored: 0x%08lx, computed: 0x%08lx\n",
+ img->file_cksum, cksum);
+ entry_address = (unsigned long)NO_MEMORY;
+ }
+ }
+#endif
+}
+#endif // CYGOPT_REDBOOT_FIS
+
+static void
+fis_write(int argc, char *argv[])
+{
+ int stat;
+ unsigned long length;
+ CYG_ADDRESS mem_addr, flash_addr;
+ bool mem_addr_set = false;
+ bool flash_addr_set = false;
+ bool length_set = false;
+ void *err_addr;
+ struct option_info opts[3];
+ bool prog_ok;
+
+ init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM,
+ (void *)&mem_addr, (bool *)&mem_addr_set, "memory base address");
+ init_opts(&opts[1], 'f', true, OPTION_ARG_TYPE_NUM,
+ (void *)&flash_addr, (bool *)&flash_addr_set, "FLASH memory base address");
+ init_opts(&opts[2], 'l', true, OPTION_ARG_TYPE_NUM,
+ (void *)&length, (bool *)&length_set, "image length [in FLASH]");
+ if (!scan_opts(argc, argv, 2, opts, 3, 0, 0, 0))
+ {
+ fis_usage("invalid arguments");
+ return;
+ }
+
+ if (!mem_addr_set || !flash_addr_set || !length_set) {
+ fis_usage("required parameter missing");
+ return;
+ }
+
+ // Round up length to FLASH block size
+#ifndef CYGPKG_HAL_MIPS // FIXME: compiler is b0rken
+ length = ((length + flash_block_size - 1) / flash_block_size) * flash_block_size;
+#endif
+ if (flash_addr_set &&
+ ((stat = flash_verify_addr((void *)flash_addr)) ||
+ (stat = flash_verify_addr((void *)(flash_addr+length-1))))) {
+ _show_invalid_flash_address(flash_addr, stat);
+ return;
+ }
+ if (flash_addr_set && flash_addr & (flash_block_size-1)) {
+ diag_printf("Invalid FLASH address: %p\n", (void *)flash_addr);
+ diag_printf(" must be 0x%x aligned\n", flash_block_size);
+ return;
+ }
+ if ((mem_addr < (CYG_ADDRESS)ram_start) ||
+ ((mem_addr+length) >= (CYG_ADDRESS)ram_end)) {
+ diag_printf("** WARNING: RAM address: %p may be invalid\n", (void *)mem_addr);
+ diag_printf(" valid range is %p-%p\n", (void *)ram_start, (void *)ram_end);
+ }
+ // Safety check - make sure the address range is not within the code we're running
+ if (flash_code_overlaps((void *)flash_addr, (void *)(flash_addr+length-1))) {
+ diag_printf("Can't program this region - contains code in use!\n");
+ return;
+ }
+ if (!verify_action("* CAUTION * about to program FLASH\n at %p..%p from %p",
+ (void *)flash_addr, (void *)(flash_addr+length-1),
+ (void *)mem_addr)) {
+ return; // The guy gave up
+ }
+ prog_ok = true;
+ if (prog_ok) {
+ // Erase area to be programmed
+ if ((stat = flash_erase((void *)flash_addr, length, (void **)&err_addr)) != 0) {
+ diag_printf("Can't erase region at %p: %s\n", err_addr, flash_errmsg(stat));
+ prog_ok = false;
+ }
+ }
+ if (prog_ok) {
+ // Now program it
+ if ((stat = FLASH_PROGRAM((void *)flash_addr, (void *)mem_addr, length, (void **)&err_addr)) != 0) {
+ diag_printf("Can't program region at %p: %s\n", err_addr, flash_errmsg(stat));
+ prog_ok = false;
+ }
+ }
+}
+
+static void
+fis_erase(int argc, char *argv[])
+{
+ int stat;
+ unsigned long length;
+ CYG_ADDRESS flash_addr;
+ bool flash_addr_set = false;
+ bool length_set = false;
+ void *err_addr;
+ struct option_info opts[2];
+
+ init_opts(&opts[0], 'f', true, OPTION_ARG_TYPE_NUM,
+ (void *)&flash_addr, (bool *)&flash_addr_set, "FLASH memory base address");
+ init_opts(&opts[1], 'l', true, OPTION_ARG_TYPE_NUM,
+ (void *)&length, (bool *)&length_set, "length");
+ if (!scan_opts(argc, argv, 2, opts, 2, (void **)0, 0, ""))
+ {
+ fis_usage("invalid arguments");
+ return;
+ }
+
+ if (!flash_addr_set || !length_set) {
+ fis_usage("missing argument");
+ return;
+ }
+ if (flash_addr_set &&
+ ((stat = flash_verify_addr((void *)flash_addr)) ||
+ (stat = flash_verify_addr((void *)(flash_addr+length-1))))) {
+ _show_invalid_flash_address(flash_addr, stat);
+ return;
+ }
+ if (flash_addr_set && flash_addr & (flash_block_size-1)) {
+ diag_printf("Invalid FLASH address: %p\n", (void *)flash_addr);
+ diag_printf(" must be 0x%x aligned\n", flash_block_size);
+ return;
+ }
+ // Safety check - make sure the address range is not within the code we're running
+ if (flash_code_overlaps((void *)flash_addr, (void *)(flash_addr+length-1))) {
+ diag_printf("Can't erase this region - contains code in use!\n");
+ return;
+ }
+ if ((stat = flash_erase((void *)flash_addr, length, (void **)&err_addr)) != 0) {
+ diag_printf("Error erasing at %p: %s\n", err_addr, flash_errmsg(stat));
+ }
+}
+
+#ifdef CYGHWR_IO_FLASH_BLOCK_LOCKING
+
+static void
+fis_lock(int argc, char *argv[])
+{
+ char *name;
+ int stat;
+ unsigned long length;
+ CYG_ADDRESS flash_addr;
+ bool flash_addr_set = false;
+ bool length_set = false;
+ void *err_addr;
+ struct option_info opts[2];
+
+ init_opts(&opts[0], 'f', true, OPTION_ARG_TYPE_NUM,
+ (void *)&flash_addr, (bool *)&flash_addr_set, "FLASH memory base address");
+ init_opts(&opts[1], 'l', true, OPTION_ARG_TYPE_NUM,
+ (void *)&length, (bool *)&length_set, "length");
+ if (!scan_opts(argc, argv, 2, opts, 2, &name, OPTION_ARG_TYPE_STR, "image name"))
+ {
+ fis_usage("invalid arguments");
+ return;
+ }
+
+ /* Get parameters from image if specified */
+ if (name) {
+ struct fis_image_desc *img;
+ if ((img = fis_lookup(name, NULL)) == (struct fis_image_desc *)0) {
+ diag_printf("No image '%s' found\n", name);
+ return;
+ }
+
+ flash_addr = img->flash_base;
+ length = img->size;
+ } else if (!flash_addr_set || !length_set) {
+ fis_usage("missing argument");
+ return;
+ }
+ if (flash_addr_set &&
+ ((stat = flash_verify_addr((void *)flash_addr)) ||
+ (stat = flash_verify_addr((void *)(flash_addr+length-1))))) {
+ _show_invalid_flash_address(flash_addr, stat);
+ return;
+ }
+ if ((stat = flash_lock((void *)flash_addr, length, (void **)&err_addr)) != 0) {
+ diag_printf("Error locking at %p: %s\n", err_addr, flash_errmsg(stat));
+ }
+}
+
+static void
+fis_unlock(int argc, char *argv[])
+{
+ char *name;
+ int stat;
+ unsigned long length;
+ CYG_ADDRESS flash_addr;
+ bool flash_addr_set = false;
+ bool length_set = false;
+ void *err_addr;
+ struct option_info opts[2];
+
+ init_opts(&opts[0], 'f', true, OPTION_ARG_TYPE_NUM,
+ (void *)&flash_addr, (bool *)&flash_addr_set, "FLASH memory base address");
+ init_opts(&opts[1], 'l', true, OPTION_ARG_TYPE_NUM,
+ (void *)&length, (bool *)&length_set, "length");
+ if (!scan_opts(argc, argv, 2, opts, 2, &name, OPTION_ARG_TYPE_STR, "image name"))
+ {
+ fis_usage("invalid arguments");
+ return;
+ }
+
+ if (name) {
+ struct fis_image_desc *img;
+ if ((img = fis_lookup(name, NULL)) == (struct fis_image_desc *)0) {
+ diag_printf("No image '%s' found\n", name);
+ return;
+ }
+
+ flash_addr = img->flash_base;
+ length = img->size;
+ } else if (!flash_addr_set || !length_set) {
+ fis_usage("missing argument");
+ return;
+ }
+ if (flash_addr_set &&
+ ((stat = flash_verify_addr((void *)flash_addr)) ||
+ (stat = flash_verify_addr((void *)(flash_addr+length-1))))) {
+ _show_invalid_flash_address(flash_addr, stat);
+ return;
+ }
+
+ if ((stat = flash_unlock((void *)flash_addr, length, (void **)&err_addr)) != 0) {
+ diag_printf("Error unlocking at %p: %s\n", err_addr, flash_errmsg(stat));
+ }
+}
+#endif
+
+// This is set non-zero if the FLASH subsystem has successfully been initialized
+int __flash_init = 0;
+
+void
+_flash_info(void)
+{
+ if (!__flash_init) return;
+ diag_printf("FLASH: %p - 0x%x, %d blocks of %p bytes each.\n",
+ flash_start, (CYG_ADDRWORD)flash_end + 1, flash_num_blocks, (void *)flash_block_size);
+}
+
+bool
+do_flash_init(void)
+{
+ int stat;
+
+ if (!__flash_init) {
+ __flash_init = 1;
+ if ((stat = flash_init(diag_printf)) != 0) {
+ diag_printf("FLASH: driver init failed: %s\n", flash_errmsg(stat));
+ return false;
+ }
+ flash_get_limits((void *)0, (void **)&flash_start, (void **)&flash_end);
+ // Keep 'end' address as last valid location, to avoid wrap around problems
+ flash_end = (void *)((CYG_ADDRESS)flash_end - 1);
+ flash_get_block_info(&flash_block_size, &flash_num_blocks);
+#ifdef CYGOPT_REDBOOT_FIS
+ fisdir_size = CYGNUM_REDBOOT_FIS_DIRECTORY_ENTRY_COUNT * CYGNUM_REDBOOT_FIS_DIRECTORY_ENTRY_SIZE;
+ fisdir_size = ((fisdir_size + flash_block_size - 1) / flash_block_size) * flash_block_size;
+# if defined(CYGPRI_REDBOOT_ZLIB_FLASH) && defined(CYGOPT_REDBOOT_FIS_ZLIB_COMMON_BUFFER)
+ fis_work_block = fis_zlib_common_buffer;
+ if(CYGNUM_REDBOOT_FIS_ZLIB_COMMON_BUFFER_SIZE < fisdir_size) {
+ diag_printf("FLASH: common buffer too small\n");
+ return false;
+ }
+# else
+ workspace_end = (unsigned char *)(workspace_end-fisdir_size);
+ fis_work_block = workspace_end;
+# endif
+ if (CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK < 0) {
+ fis_addr = (void *)((CYG_ADDRESS)flash_end + 1 +
+ (CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK*flash_block_size));
+ } else {
+ fis_addr = (void *)((CYG_ADDRESS)flash_start +
+ (CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK*flash_block_size));
+ }
+ if (((CYG_ADDRESS)fis_addr + fisdir_size - 1) > (CYG_ADDRESS)flash_end) {
+ diag_printf("FIS directory doesn't fit\n");
+ return false;
+ }
+ fis_read_directory();
+#endif
+ }
+ return true;
+}
+
+// Wrapper to avoid compiler warnings
+static void
+_do_flash_init(void)
+{
+ static int init_done = 0;
+ if (init_done) return;
+ init_done = 1;
+ do_flash_init();
+}
+
+RedBoot_init(_do_flash_init, RedBoot_INIT_FIRST);
+
+static void
+do_fis(int argc, char *argv[])
+{
+ struct cmd *cmd;
+
+ if (argc < 2) {
+ fis_usage("too few arguments");
+ return;
+ }
+ if (!do_flash_init()) {
+ diag_printf("Sorry, no FLASH memory is available\n");
+ return;
+ }
+ if ((cmd = cmd_search(__FIS_cmds_TAB__, &__FIS_cmds_TAB_END__,
+ argv[1])) != (struct cmd *)0) {
+ (cmd->fun)(argc, argv);
+ return;
+ }
+ fis_usage("unrecognized command");
+}
+
+// EOF flash.c
diff --git a/cesar/ecos/packages/redboot/current/src/fs/disk.c b/cesar/ecos/packages/redboot/current/src/fs/disk.c
new file mode 100644
index 0000000000..96a9e82acf
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/fs/disk.c
@@ -0,0 +1,441 @@
+//==========================================================================
+//
+// disk.c
+//
+// RedBoot disk support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): msalter
+// Contributors: msalter
+// Date: 2001-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <fs/disk.h>
+
+#ifdef CYGSEM_REDBOOT_DISK_EXT2FS
+#include <fs/e2fs.h>
+#endif
+#ifdef CYGSEM_REDBOOT_DISK_ISO9660
+#include <fs/iso9660fs.h>
+#endif
+
+static void do_disks(int argc, char *argv[]);
+
+RedBoot_cmd("disks",
+ "Display disks/partitions.",
+ "",
+ do_disks
+ );
+
+static disk_t disk_table[CYGNUM_REDBOOT_MAX_DISKS];
+static int disk_count = 0;
+
+static inline cyg_uint32
+u32_unaligned(void *p)
+{
+ cyg_uint32 val;
+ char *d = (char *)&val;
+ char *s = p;
+ int i;
+
+ for (i = 0; i < 4; i++)
+ *d++ = *s++;
+
+ return val;
+}
+
+static int
+find_dos_partitions(disk_t *d, cyg_uint8 *mbr)
+{
+ cyg_uint32 s, n;
+ struct mbr_partition *p;
+ int i, found = 0;
+
+ p = (struct mbr_partition *)(mbr + MBR_PTABLE_OFFSET);
+
+ // Look for primary partitions
+ for (i = 0; i < 4 && i < CYGNUM_REDBOOT_MAX_PARTITIONS; i++) {
+
+ s = SWAB_LE32(u32_unaligned(p->start_sect));
+ n = SWAB_LE32(u32_unaligned(p->nr_sects));
+
+ if (s && n) {
+ ++found;
+ d->partitions[i].disk = d;
+ d->partitions[i].start_sector = s;
+ d->partitions[i].nr_sectors = n;
+ d->partitions[i].systype = p->sys_ind;
+ d->partitions[i].bootflag = p->boot_ind;
+ }
+ p++;
+ }
+
+#if CYGNUM_REDBOOT_MAX_PARTITIONS > 4
+ {
+ cyg_uint32 buf[SECTOR_SIZE/sizeof(cyg_uint32)], xoffset;
+ cyg_uint16 magic;
+ int nextp;
+
+ // Go back through and find extended partitions
+ for (i = 0, nextp = 4; i < 4 && nextp < CYGNUM_REDBOOT_MAX_PARTITIONS; i++) {
+ if (d->partitions[i].systype == SYSTYPE_EXTENDED) {
+ // sector offsets in partition tables are relative to start
+ // of extended partition.
+ xoffset = d->partitions[i].start_sector;
+ for ( ; nextp < CYGNUM_REDBOOT_MAX_PARTITIONS; ++nextp) {
+
+ // read partition boot record (same format as mbr except
+ // there should only be 2 entries max: a normal partition
+ // and another extended partition
+ if (DISK_READ(d, xoffset, buf, 1) <= 0)
+ break;
+
+ magic = *(cyg_uint16 *)((char *)buf + MBR_MAGIC_OFFSET);
+ if (SWAB_LE16(magic) != MBR_MAGIC)
+ break;
+
+ p = (struct mbr_partition *)((char *)buf + MBR_PTABLE_OFFSET);
+
+ s = SWAB_LE32(u32_unaligned(p->start_sect));
+ n = SWAB_LE32(u32_unaligned(p->nr_sects));
+
+ if (s && n) {
+ ++found;
+ d->partitions[nextp].disk = d;
+ d->partitions[nextp].start_sector = s + xoffset;
+ d->partitions[nextp].nr_sectors = n;
+ d->partitions[nextp].systype = p->sys_ind;
+ d->partitions[nextp].bootflag = p->boot_ind;
+ }
+ ++p;
+
+ s = SWAB_LE32(u32_unaligned(p->start_sect));
+ n = SWAB_LE32(u32_unaligned(p->nr_sects));
+
+ // more extended partitions?
+ if (p->sys_ind != SYSTYPE_EXTENDED || !s || !n)
+ break;
+
+ xoffset += s;
+ }
+ }
+ }
+ }
+#endif
+ return found;
+}
+
+
+// Find partitions on given disk.
+// Return number of partitions found
+static int
+find_partitions(disk_t *d)
+{
+ cyg_uint32 buf[SECTOR_SIZE/sizeof(cyg_uint32)];
+ cyg_uint16 magic;
+ partition_t *p;
+ int i, found = 0;
+
+
+ if (d->kind == DISK_IDE_CDROM) {
+#ifdef CYGSEM_REDBOOT_DISK_ISO9660
+ // no partition table, so fake it
+ p = d->partitions;
+ p->disk = d;
+ p->start_sector = 0;
+ p->nr_sectors = d->nr_sectors;
+ p->funs = &redboot_iso9660fs_funs;
+ return 1;
+#else
+ return 0;
+#endif
+ }
+
+ // read Master Boot Record
+ if (DISK_READ(d, 0, buf, 1) <= 0)
+ return 0;
+
+ // Check for DOS MBR
+ magic = *(cyg_uint16 *)((char *)buf + MBR_MAGIC_OFFSET);
+ if (SWAB_LE16(magic) == MBR_MAGIC) {
+ found = find_dos_partitions(d, (cyg_uint8 *)buf);
+ } else {
+ // Might want to handle other MBR types, here...
+ }
+
+ // Now go through all partitions and install the correct
+ // funcs for supported filesystems.
+ for (i = 0, p = d->partitions; i < CYGNUM_REDBOOT_MAX_PARTITIONS; i++, p++) {
+ switch (p->systype) {
+#ifdef CYGSEM_REDBOOT_DISK_EXT2FS
+ case SYSTYPE_LINUX:
+ p->funs = &redboot_e2fs_funs;
+ break;
+#endif
+#ifdef CYGSEM_REDBOOT_DISK_FAT16
+ case SYSTYPE_FAT16:
+ p->funs = &redboot_fat16_funs;
+ break;
+#endif
+#ifdef CYGSEM_REDBOOT_DISK_FAT32
+ case SYSTYPE_FAT32:
+ p->funs = &redboot_fat32_funs;
+ break;
+#endif
+ default:
+ break; // ignore unsupported filesystems
+ }
+ }
+
+ return found;
+}
+
+// Add a disk to the disk table.
+// Return zero if no more room in table.
+externC int
+disk_register(disk_t *d)
+{
+ int i;
+
+ // make sure we have room for it
+ if (disk_count >= CYGNUM_REDBOOT_MAX_DISKS)
+ return 0;
+
+ // Set the index
+ d->index = 0;
+ for (i = 0; i < disk_count; i++)
+ if (disk_table[i].kind == d->kind)
+ d->index++;
+
+ // put it in the table
+ disk_table[disk_count] = *d;
+
+ // fill in partition info
+ find_partitions(&disk_table[disk_count++]);
+
+ return 1;
+}
+
+// Convert a filename in the form <partition_name>:<filename> into
+// a partition and path.
+//
+static int
+disk_parse_filename(const char *name, partition_t **part, const char **path)
+{
+ int i, kind, index, pindex;
+
+ kind = index = pindex = 0;
+
+ if (name[0] == 'h' && name[1] == 'd') {
+ // IDE hard drives
+ kind = DISK_IDE_HD;
+ if (name[2] < 'a' || name[2] > 'z')
+ return 0;
+ index = name[2] - 'a';
+ if (name[3] < '1' || name[3] >= ('1' + CYGNUM_REDBOOT_MAX_PARTITIONS))
+ return 0;
+ pindex = name[3] - '1';
+ if (name[4] != ':')
+ return 0;
+ *path = &name[5];
+ }
+#ifdef CYGSEM_REDBOOT_DISK_ISO9660
+ else if (name[0] == 'c' && name[1] == 'd') {
+ // CD drives
+ kind = DISK_IDE_CDROM;
+ if (name[2] < '0' || name[2] > '9')
+ return 0;
+ index = name[2] - '0';
+ if (name[3] != ':')
+ return 0;
+ *path = &name[4];
+ }
+#endif
+
+ if (kind) {
+ for (i = 0; i < CYGNUM_REDBOOT_MAX_DISKS; i++) {
+ if (disk_table[i].kind == kind && disk_table[i].index == index) {
+ *part = &disk_table[i].partitions[pindex];
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+
+static const struct {
+ int kind;
+ const char *str;
+} systype_names[] = {
+ { SYSTYPE_FAT12, "FAT12" },
+ { SYSTYPE_FAT16_32M, "FAT16 <32M" },
+ { SYSTYPE_FAT16, "FAT16" },
+ { SYSTYPE_EXTENDED, "Extended" },
+ { SYSTYPE_LINUX_SWAP, "Linux Swap" },
+ { SYSTYPE_LINUX, "Linux" }
+};
+
+static const char *
+systype_name(int systype)
+{
+ int i;
+
+ for (i = 0; i < sizeof(systype_names)/sizeof(systype_names[0]); i++)
+ if (systype_names[i].kind == systype)
+ return systype_names[i].str;
+ return "Unknown";
+}
+
+// List disk partitions
+static void
+do_disks(int argc, char *argv[])
+{
+ int i, j;
+ disk_t *d;
+ partition_t *p;
+ char name[16];
+
+ for (i = 0, d = disk_table; i < disk_count; i++, d++) {
+ switch (d->kind) {
+ case DISK_IDE_HD:
+ for (j = 0, p = d->partitions;
+ j < CYGNUM_REDBOOT_MAX_PARTITIONS;
+ j++, p++) {
+ if (p->systype) {
+ diag_sprintf(name, "hd%c%d", 'a' + d->index, j+1);
+ diag_printf("%-8s %s\n", name, systype_name(p->systype));
+ }
+ }
+ break;
+ case DISK_IDE_CDROM:
+ diag_sprintf(name, "cd%d", d->index);
+ diag_printf("%-8s ISO9660\n", name);
+ break;
+ }
+ }
+}
+
+static void *fileptr;
+static partition_t *file_part;
+
+externC int
+disk_stream_open(connection_info_t *info, int *err)
+{
+ const char *filepath;
+ char *filename = info->filename;
+
+ // The filename is in <disk>:<path> format.
+ // Convert to a partition and path.
+ if (!disk_parse_filename(filename, &file_part, &filepath)) {
+ *err = diskerr_badname;
+ return -1;
+ }
+
+ if (file_part->disk->kind != DISK_IDE_CDROM && file_part->systype == 0) {
+ *err = diskerr_partition;
+ return -1;
+ }
+
+ if (file_part->funs == (fs_funs_t *)0) {
+ *err = diskerr_partition;
+ return -1;
+ }
+
+ fileptr = (file_part->funs->open)(file_part, filepath);
+ if (fileptr == NULL) {
+ *err = diskerr_open;
+ return -1;
+ }
+ return 0;
+}
+
+externC int
+disk_stream_read(char *buf, int size, int *err)
+{
+ int nread;
+
+ if ((nread = (file_part->funs->read)(fileptr, buf, size)) < 0) {
+ *err = diskerr_read;
+ return -1;
+ }
+ return nread;
+}
+
+externC void
+disk_stream_close(int *err)
+{
+ fileptr = NULL;
+}
+
+externC char *
+disk_error(int err)
+{
+ switch (err) {
+ case diskerr_badname:
+ return "Bad filename";
+ break;
+ case diskerr_partition:
+ return "Unsupported filesystem";
+ break;
+ case diskerr_open:
+ return "Can't open file";
+ break;
+ case diskerr_read:
+ return "Can't read file";
+ break;
+ default:
+ return "Unknown error";
+ break;
+ }
+}
+
+//
+// RedBoot interface
+//
+GETC_IO_FUNCS(disk_io, disk_stream_open, disk_stream_close,
+ 0, disk_stream_read, disk_error);
+RedBoot_load(disk, disk_io, true, true, 0);
diff --git a/cesar/ecos/packages/redboot/current/src/fs/e2fs.c b/cesar/ecos/packages/redboot/current/src/fs/e2fs.c
new file mode 100644
index 0000000000..3b37ede8f8
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/fs/e2fs.c
@@ -0,0 +1,613 @@
+//==========================================================================
+//
+// e2fs.c
+//
+// RedBoot support for second extended filesystem
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas <gary@mind.be>
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): msalter
+// Contributors: msalter
+// Date: 2001-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <fs/disk.h>
+#include <fs/e2fs.h>
+
+#define DEBUG_E2FS 0
+
+#if DEBUG_E2FS > 4
+static void dump_sb(struct e2fs_super_block *s);
+static void dump_inode(struct e2fs_inode *i);
+#endif
+
+static void *e2fs_open(partition_t *p, const char *path);
+static int e2fs_read(void *fp, char *buf, cyg_uint32 nbytes);
+
+// This structure is the only thing exported by this module.
+// These filesystem function pointers are attached to disk
+// partitions in the generic disk handling code.
+//
+fs_funs_t redboot_e2fs_funs = {
+ e2fs_open,
+ e2fs_read
+};
+
+// A single block buffer to be shared carefully.
+static cyg_uint32 blockbuf[E2FS_MAX_BLOCK_SIZE/sizeof(cyg_uint32)];
+
+#define __READ_BLOCK(n) \
+ PARTITION_READ(e2fs->part, E2FS_BLOCK_TO_SECTOR(e2fs, (n)), \
+ blockbuf, e2fs->blocksize/SECTOR_SIZE)
+
+// Get a group descriptor. Returns non-zero for success.
+//
+static int
+e2fs_get_gdesc(e2fs_desc_t *e2fs, cyg_uint32 group_nr, e2fs_group_t *gdesc)
+{
+ cyg_uint32 sec_nr;
+
+ if (group_nr < e2fs->gdesc_first ||
+ group_nr >= (e2fs->gdesc_first + E2FS_GDESC_CACHE_SIZE)) {
+
+ // cache miss
+ sec_nr = E2FS_BLOCK_TO_SECTOR(e2fs, e2fs->gdesc_block);
+ sec_nr += (group_nr / E2FS_GDESC_PER_SECTOR);
+
+#if DEBUG_E2FS > 2
+ diag_printf("%s: group[%d] cache miss, sec_nr[%d]\n",
+ __FUNCTION__, group_nr, sec_nr);
+#endif
+ if (!PARTITION_READ(e2fs->part, sec_nr, (cyg_uint32 *)e2fs->gdesc_cache,
+ sizeof(e2fs->gdesc_cache)/SECTOR_SIZE))
+ return 0;
+
+ e2fs->gdesc_first = (group_nr / E2FS_GDESC_CACHE_SIZE) * E2FS_GDESC_CACHE_SIZE;
+ }
+ *gdesc = e2fs->gdesc_cache[group_nr - e2fs->gdesc_first];
+
+ return 1;
+}
+
+// Read the requested inode from disk. Return non-zero if successful
+//
+static int
+e2fs_get_inode(e2fs_desc_t *e2fs, int ino, e2fs_inode_t *ip)
+{
+ cyg_uint32 offset, sec_nr, buf[SECTOR_SIZE/sizeof(cyg_uint32)];
+ e2fs_group_t gdesc;
+
+ // get descriptor for group which this inode belongs to
+ if (!e2fs_get_gdesc(e2fs, (ino - 1) / e2fs->inodes_per_group, &gdesc))
+ return 0;
+ if (gdesc.inode_table == 0)
+ return 0;
+
+ // byte offset within group inode table
+ offset = ((ino - 1) % e2fs->inodes_per_group) * sizeof(struct e2fs_inode);
+
+ // figure out which sector holds the inode
+ sec_nr = E2FS_BLOCK_TO_SECTOR(e2fs, SWAB_LE32(gdesc.inode_table));
+ sec_nr += offset / SECTOR_SIZE;
+
+ // and the offset within that sector.
+ offset %= SECTOR_SIZE;
+
+#if DEBUG_E2FS > 0x08
+ diag_printf("%s: ino[%d], sec_nr[%d] offset[%d]\n", __FUNCTION__,
+ ino, sec_nr, offset);
+#endif
+
+ if (!PARTITION_READ(e2fs->part, sec_nr, buf, 1))
+ return 0;
+
+ *ip = *(e2fs_inode_t *)((char *)buf + offset);
+
+#if DEBUG_E2FS > 0
+ diag_printf("%s: inode size[%d]\n", __FUNCTION__, SWAB_LE32(ip->size));
+#endif
+
+ return 1;
+}
+
+// Mount an e2fs filesystem on the given partition.
+// Return 0 if successful.
+//
+static int
+e2fs_mount(partition_t *part, e2fs_desc_t *e2fs)
+{
+ int sb_block = 1;
+ cyg_uint32 sb_buf[E2FS_MIN_BLOCK_SIZE/sizeof(cyg_uint32)];
+ struct e2fs_super_block *sb = (struct e2fs_super_block *)sb_buf;
+
+ e2fs->part = part;
+
+ if (!PARTITION_READ(part, sb_block*(E2FS_MIN_BLOCK_SIZE/SECTOR_SIZE),
+ (cyg_uint32 *)sb, E2FS_MIN_BLOCK_SIZE/SECTOR_SIZE))
+ return -1;
+
+ if (SWAB_LE16(sb->magic) != E2FS_SUPER_MAGIC) {
+ diag_printf("ext2_mount: bad magic 0x%x\n", SWAB_LE16(sb->magic));
+ return -1;
+ }
+
+ // save some stuff for easy access
+ e2fs->blocksize = E2FS_BLOCK_SIZE(sb);
+ e2fs->nr_ind_blocks = (e2fs)->blocksize / sizeof(cyg_uint32);
+ e2fs->nr_dind_blocks = e2fs->nr_ind_blocks * ((e2fs)->blocksize / sizeof(cyg_uint32));
+ e2fs->nr_tind_blocks = e2fs->nr_dind_blocks * ((e2fs)->blocksize / sizeof(cyg_uint32));
+ e2fs->blocks_per_group = SWAB_LE32(sb->blocks_per_group);
+ e2fs->ngroups = (SWAB_LE32(sb->blocks_count) + e2fs->blocks_per_group - 1) /
+ e2fs->blocks_per_group;
+ e2fs->inodes_per_group = SWAB_LE32(sb->inodes_per_group);
+
+ // Find the group descriptors which follow superblock
+ e2fs->gdesc_block = ((sb_block * E2FS_MIN_BLOCK_SIZE) / e2fs->blocksize) + 1;
+ e2fs->gdesc_first = 0; // cache group 0 initially
+
+ if (!PARTITION_READ(part, E2FS_BLOCK_TO_SECTOR(e2fs,e2fs->gdesc_block),
+ (cyg_uint32 *)e2fs->gdesc_cache, 1))
+ return -1;
+
+#if DEBUG_E2FS > 1
+ diag_printf("E2FS superblock:\n");
+ diag_printf(" [%d] inodes\n", SWAB_LE32(sb->inodes_count));
+ diag_printf(" [%d] blocks\n", SWAB_LE32(sb->blocks_count));
+ diag_printf(" [%d] blocksize\n", e2fs->blocksize);
+ diag_printf(" [%d] blocks per group\n", e2fs->blocks_per_group);
+ diag_printf(" [%d] ngroups\n", e2fs->ngroups);
+#endif
+
+#if DEBUG_E2FS > 4
+ dump_sb(sb);
+#endif
+
+ return 0;
+}
+
+// Convert a block index into inode data into a block_nr.
+// If successful, store block number in pblknr and return non-zero.
+//
+// NB: This needs some block/sector caching to be speedier. But
+// that takes memory and speed is not too bad now for files
+// small enough to avoid double and triple indirection.
+//
+static int
+e2fs_inode_block(e2fs_desc_t *e2fs, e2fs_inode_t *inode,
+ cyg_uint32 bindex, cyg_uint32 *pblknr)
+{
+ if (bindex < E2FS_NR_DIR_BLOCKS) {
+ *pblknr = SWAB_LE32(inode->block[bindex]);
+ return 1;
+ }
+ bindex -= E2FS_NR_DIR_BLOCKS;
+
+ if (bindex < e2fs->nr_ind_blocks) {
+ // Indirect block
+ if (!__READ_BLOCK(SWAB_LE32(inode->block[E2FS_IND_BLOCK])))
+ return 0;
+ *pblknr = SWAB_LE32(blockbuf[bindex]);
+ return 1;
+ }
+ bindex -= e2fs->nr_ind_blocks;
+
+ if (bindex < e2fs->nr_dind_blocks) {
+ // Double indirect block
+ if (!__READ_BLOCK(SWAB_LE32(inode->block[E2FS_DIND_BLOCK])))
+ return 0;
+ if (!__READ_BLOCK(SWAB_LE32(blockbuf[bindex / e2fs->nr_ind_blocks])))
+ return 0;
+ *pblknr = SWAB_LE32(blockbuf[bindex % e2fs->nr_ind_blocks]);
+ return 1;
+ }
+ bindex -= e2fs->nr_dind_blocks;
+
+ // Triple indirect block
+ if (!__READ_BLOCK(SWAB_LE32(inode->block[E2FS_TIND_BLOCK])))
+ return 0;
+ if (!__READ_BLOCK(SWAB_LE32(blockbuf[bindex / e2fs->nr_dind_blocks])))
+ return 0;
+ bindex %= e2fs->nr_dind_blocks;
+ if (!__READ_BLOCK(SWAB_LE32(blockbuf[bindex / e2fs->nr_ind_blocks])))
+ return 0;
+ *pblknr = SWAB_LE32(blockbuf[bindex % e2fs->nr_ind_blocks]);
+ return 1;
+}
+
+
+// search a single directory block in memory looking for an
+// entry with the given name. Return pointer to entry if
+// found, NULL if not.
+//
+static e2fs_dir_entry_t *
+search_dir_block(e2fs_desc_t *e2fs, cyg_uint32 *blkbuf,
+ const char *name, int namelen)
+{
+ e2fs_dir_entry_t *dir;
+ cyg_uint16 reclen, len;
+ cyg_uint32 offset;
+
+#if DEBUG_E2FS > 0
+ diag_dump_buf(blkbuf, e2fs->blocksize);
+#endif
+ offset = 0;
+ while (offset < e2fs->blocksize) {
+ dir = (e2fs_dir_entry_t *)((char *)blkbuf + offset);
+ reclen = SWAB_LE16(dir->reclen);
+ offset += reclen;
+ len = dir->namelen;
+
+ // terminate on anything which doesn't make sense
+ if (reclen < 8 || (len + 8) > reclen || offset > (e2fs->blocksize + 1))
+ return NULL;
+
+ if (dir->inode && len == namelen && !strncmp(dir->name, name, len))
+ return dir;
+ }
+ return NULL;
+}
+
+
+// Look in the given directory for an entry with the given name.
+// If found, return a pointer to that entry. Return NULL if not
+// found.
+//
+static e2fs_dir_entry_t *
+e2fs_dir_lookup(e2fs_desc_t *e2fs, cyg_uint32 dir_ino,
+ const char *name, int namelen)
+{
+ e2fs_inode_t inode;
+ e2fs_dir_entry_t *dir;
+ cyg_uint32 nblocks, last_block_size, i, block_nr, nbytes;
+
+#if DEBUG_E2FS > 0
+ diag_printf("%s: looking for %s [%d] in ino[%d]\n",
+ __FUNCTION__, name, namelen, dir_ino);
+#endif
+
+ if (!e2fs_get_inode(e2fs, dir_ino, &inode)) {
+#if DEBUG_E2FS > 0
+ diag_printf("%s: e2fs_get_inode [%d] failed\n", __FUNCTION__, dir_ino);
+#endif
+ return NULL;
+ }
+
+ nbytes = SWAB_LE32(inode.size);
+ nblocks = (nbytes + e2fs->blocksize - 1) / e2fs->blocksize;
+
+ last_block_size = nbytes % e2fs->blocksize;
+ if (last_block_size == 0)
+ last_block_size = e2fs->blocksize;
+
+ for (i = 0; i < nblocks; i++) {
+ if (!e2fs_inode_block(e2fs, &inode, i, &block_nr))
+ return NULL;
+
+ if (block_nr) {
+ if (!__READ_BLOCK(block_nr))
+ return NULL;
+ } else
+ memset(blockbuf, 0, e2fs->blocksize);
+
+ dir = search_dir_block(e2fs, blockbuf, name, namelen);
+
+ if (dir != NULL)
+ return dir;
+ }
+ return NULL;
+}
+
+typedef struct ino_info {
+ cyg_uint32 ino;
+ cyg_uint32 parent_ino;
+ cyg_uint8 filetype;
+} ino_info_t;
+
+static int e2fs_inode_lookup(e2fs_desc_t *e2fs, cyg_uint32 dir_ino,
+ const char *pathname, ino_info_t *info);
+
+// Starting from the given directory, find the inode number, filetype, and
+// parent inode for the file pointed to by the given symbolic link inode.
+// If successful, fills out ino_info_t and return true.
+//
+static int
+e2fs_follow_symlink(e2fs_desc_t *e2fs, cyg_uint32 dir_ino, cyg_uint32 sym_ino, ino_info_t *info)
+{
+#define MAX_SYMLINK_NAME 255
+ char symlink[MAX_SYMLINK_NAME+1];
+ int pathlen;
+ cyg_uint32 block_nr;
+ e2fs_inode_t inode;
+
+ if (!e2fs_get_inode(e2fs, sym_ino, &inode)) {
+#if DEBUG_E2FS > 0
+ diag_printf("%s: e2fs_get_inode [%d] failed\n", __FUNCTION__, sym_ino);
+#endif
+ return 0;
+ }
+
+ pathlen = SWAB_LE32(inode.size);
+ if (pathlen > MAX_SYMLINK_NAME)
+ return 0;
+
+ if (inode.blocks) {
+ if (!e2fs_inode_block(e2fs, &inode, 0, &block_nr))
+ return 0;
+ if (block_nr) {
+ if (!PARTITION_READ(e2fs->part, E2FS_BLOCK_TO_SECTOR(e2fs, block_nr),
+ blockbuf, e2fs->blocksize/SECTOR_SIZE))
+ return 0;
+ memcpy(symlink, blockbuf, pathlen);
+ } else
+ return 0;
+ } else {
+ // small enough path to fit in inode struct
+ memcpy(symlink, (char *)&inode.block[0], pathlen);
+ }
+ symlink[pathlen] = 0;
+
+ return e2fs_inode_lookup(e2fs, dir_ino, symlink, info);
+}
+
+
+// Starting from the given directory, find the inode number, filetype, and
+// parent inode for the given file pathname.
+// If successful, fills out ino_info_t and return true.
+//
+static int
+e2fs_inode_lookup(e2fs_desc_t *e2fs, cyg_uint32 dir_ino, const char *pathname, ino_info_t *info)
+{
+ int len, pathlen;
+ const char *p;
+ e2fs_dir_entry_t *dir = NULL;
+
+ if (!pathname || (pathlen = strlen(pathname)) == 0)
+ return 0;
+
+ if (*pathname == '/') {
+ if (--pathlen == 0) {
+ info->ino = info->parent_ino = E2FS_ROOT_INO;
+ info->filetype = E2FS_FTYPE_DIR;
+ return 1;
+ }
+ ++pathname;
+ dir_ino = E2FS_ROOT_INO;
+ }
+
+ while (pathlen) {
+ // find next delimiter in path.
+ for (p = pathname, len = 0; len < pathlen; len++, p++) {
+ // skip delimiter if found.
+ if (*p == '/') {
+ ++p;
+ --pathlen;
+ break;
+ }
+ }
+ dir = e2fs_dir_lookup(e2fs, dir_ino, pathname, len);
+ if (dir == NULL)
+ return 0;
+
+ pathlen -= len;
+ pathname = p;
+
+ switch (dir->filetype) {
+ case E2FS_FTYPE_SYMLINK:
+ // follow the symbolic link (this will cause recursion)
+ if (!e2fs_follow_symlink(e2fs, dir_ino, SWAB_LE32(dir->inode), info))
+ return 0;
+ if (pathlen == 0)
+ return 1;
+ // must be a dir if we want to continue
+ if (info->filetype != E2FS_FTYPE_DIR)
+ return 0;
+ dir_ino = info->ino;
+ break;
+
+ case E2FS_FTYPE_DIR:
+ if (pathlen)
+ dir_ino = SWAB_LE32(dir->inode);
+ break;
+
+ case E2FS_FTYPE_REG_FILE:
+ if (pathlen)
+ return 0; // regular file embedded in middle of path
+ break;
+
+ case E2FS_FTYPE_UNKNOWN:
+ case E2FS_FTYPE_CHRDEV:
+ case E2FS_FTYPE_BLKDEV:
+ case E2FS_FTYPE_FIFO:
+ case E2FS_FTYPE_SOCK:
+ default:
+ return 0;
+ }
+ }
+ info->ino = SWAB_LE32(dir->inode);
+ info->parent_ino = dir_ino;
+ info->filetype = dir->filetype;
+ return 1;
+}
+
+struct read_info {
+ e2fs_desc_t e2fs_desc;
+ e2fs_inode_t inode;
+ cyg_uint32 fsize;
+ cyg_uint32 fpos;
+};
+
+static void *
+e2fs_open(partition_t *p, const char *filepath)
+{
+ static struct read_info rinfo;
+ ino_info_t ino_info;
+
+ // mount partition
+ if (e2fs_mount(p, &rinfo.e2fs_desc) != 0) {
+ diag_printf("mount failed.\n");
+ return NULL;
+ }
+
+ // find file inode
+ if (!e2fs_inode_lookup(&rinfo.e2fs_desc, E2FS_ROOT_INO, filepath, &ino_info)) {
+ diag_printf("%s: e2fs_inode_lookup failed\n", __FUNCTION__);
+ return NULL;
+ }
+
+ // read inode
+ if (!e2fs_get_inode(&rinfo.e2fs_desc, ino_info.ino, &rinfo.inode)) {
+ diag_printf("%s: e2fs_get_inode failed for ino[%d]\n", __FUNCTION__, ino_info.ino);
+ return NULL;
+ }
+
+ rinfo.fsize = SWAB_LE32(rinfo.inode.size);
+ rinfo.fpos = 0;
+
+ return &rinfo;
+}
+
+static int
+e2fs_read(void *fp, char *buf, cyg_uint32 nbytes)
+{
+ struct read_info *info = fp;
+ e2fs_desc_t *e2fs;
+ cyg_uint32 nread = 0, rem, block_nr, bindex, to_read;
+
+ if ((info->fpos + nbytes) > info->fsize)
+ nbytes = info->fsize - info->fpos;
+
+ e2fs = &info->e2fs_desc;
+
+ // see if we need to copy leftover data from last read call
+ rem = e2fs->blocksize - (info->fpos % e2fs->blocksize);
+ if (rem != e2fs->blocksize) {
+ char *p = (char *)blockbuf + e2fs->blocksize - rem;
+
+ if (rem > nbytes)
+ rem = nbytes;
+
+ memcpy(buf, p, rem);
+
+ nread += rem;
+ buf += rem;
+ info->fpos += rem;
+ }
+
+ // now loop through blocks if we're not done
+ bindex = info->fpos / e2fs->blocksize;
+ while (nread < nbytes) {
+ if (!e2fs_inode_block(e2fs, &info->inode, bindex, &block_nr))
+ return -1;
+
+ if (block_nr) {
+ if (!PARTITION_READ(e2fs->part, E2FS_BLOCK_TO_SECTOR(e2fs, block_nr),
+ blockbuf, e2fs->blocksize/SECTOR_SIZE))
+ return 0;
+ } else
+ memset(blockbuf, 0, e2fs->blocksize);
+
+ to_read = nbytes - nread;
+ if (to_read > e2fs->blocksize)
+ to_read = e2fs->blocksize;
+
+ memcpy(buf, blockbuf, to_read);
+
+ nread += to_read;
+ buf += to_read;
+ info->fpos += to_read;
+ ++bindex;
+ }
+
+ return nread;
+}
+
+#if DEBUG_E2FS > 4
+static void dump_sb(struct e2fs_super_block *s)
+{
+ diag_printf("inode_count: %d\n", SWAB_LE32(s->inodes_count));
+ diag_printf("blocks_count: %d\n", SWAB_LE32(s->blocks_count));
+ diag_printf("r_blocks_count: %d\n", SWAB_LE32(s->r_blocks_count));
+ diag_printf("free_blocks_count: %d\n", SWAB_LE32(s->free_blocks_count));
+ diag_printf("free_inodes_count: %d\n", SWAB_LE32(s->free_inodes_count));
+ diag_printf("first_data_block: %d\n", SWAB_LE32(s->first_data_block));
+ diag_printf("log_block_size: %d\n", SWAB_LE32(s->log_block_size));
+ diag_printf("log_frag_size: %d\n", SWAB_LE32(s->log_frag_size));
+ diag_printf("blocks_per_group: %d\n", SWAB_LE32(s->blocks_per_group));
+ diag_printf("frags_per_group: %d\n", SWAB_LE32(s->frags_per_group));
+ diag_printf("inodes_per_group: %d\n", SWAB_LE32(s->inodes_per_group));
+ diag_printf("mnt_count: %d\n", SWAB_LE16(s->mnt_count));
+ diag_printf("max_mnt_count: %d\n", SWAB_LE16(s->max_mnt_count));
+ diag_printf("magic: %d\n", SWAB_LE16(s->magic));
+ diag_printf("state: %d\n", SWAB_LE16(s->state));
+ diag_printf("errors: %d\n", SWAB_LE16(s->errors));
+ diag_printf("minor_rev_level: %d\n", SWAB_LE16(s->minor_rev_level));
+ diag_printf("lastcheck: %d\n", SWAB_LE32(s->lastcheck));
+ diag_printf("checkinterval: %d\n", SWAB_LE32(s->checkinterval));
+ diag_printf("creator_os: %d\n", SWAB_LE32(s->creator_os));
+ diag_printf("rev_level: %d\n", SWAB_LE32(s->rev_level));
+}
+
+static void dump_inode(struct e2fs_inode *i)
+{
+ int j, n;
+
+ diag_printf("mode: %o\n", SWAB_LE16(i->mode));
+ diag_printf("uid: %o\n", SWAB_LE16(i->uid));
+ diag_printf("size: %d\n", SWAB_LE32(i->size));
+ diag_printf("gid: %o\n", SWAB_LE16(i->gid));
+ diag_printf("links: %d\n", SWAB_LE16(i->links_count));
+ diag_printf("blocks: %d\n", SWAB_LE32(i->blocks));
+
+ n = i->blocks;
+ if (n > E2FS_N_BLOCKS)
+ n = E2FS_N_BLOCKS;
+
+ for (j = 0; j < n; j++)
+ diag_printf(" block: %d\n", SWAB_LE32(i->block[j]));
+}
+#endif
+
+
diff --git a/cesar/ecos/packages/redboot/current/src/fs/fileio.c b/cesar/ecos/packages/redboot/current/src/fs/fileio.c
new file mode 100644
index 0000000000..98d6576e54
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/fs/fileio.c
@@ -0,0 +1,311 @@
+//==========================================================================
+//
+// fileio.c
+//
+// RedBoot fileio support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): dwmw2, msalter
+// Date: 2003-11-27
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+// Shoot me. But I don't want struct timeval because redboot provides it.
+#define _POSIX_SOURCE
+#include <time.h>
+#undef _POSIX_SOURCE
+
+#include <redboot.h>
+#include <errno.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+#ifdef CYGPKG_IO_FLASH
+#include <cyg/io/io.h>
+#include <cyg/io/flash.h>
+#include <cyg/io/config_keys.h>
+#endif
+#include <cyg/fileio/fileio.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+static void do_mount(int argc, char *argv[]);
+static void do_umount(int argc, char *argv[]);
+
+#ifdef CYGPKG_IO_FLASH_BLOCK_DEVICE
+#define FLASHPART "[-f <partition>] "
+#else
+#define FLASHPART
+#endif
+
+RedBoot_cmd("mount",
+ "Mount file system",
+ FLASHPART "[-d <device>] -t fstype",
+ do_mount
+ );
+RedBoot_cmd("umount",
+ "Unmount file system",
+ "",
+ do_umount
+ );
+
+int fileio_mounted = 0;
+
+// Mount disk/filesystem
+static void
+do_mount(int argc, char *argv[])
+{
+ char *part_str, *dev_str, *type_str;
+ bool part_set = false, dev_set = false, type_set = false;
+ struct option_info opts[3];
+ int err, num_opts = 2;
+
+ init_opts(&opts[0], 'd', true, OPTION_ARG_TYPE_STR,
+ (void *)&dev_str, &dev_set, "device");
+ init_opts(&opts[1], 't', true, OPTION_ARG_TYPE_STR,
+ (void *)&type_str, &type_set, "fstype");
+#ifdef CYGPKG_IO_FLASH_BLOCK_DEVICE
+ init_opts(&opts[2], 'f', true, OPTION_ARG_TYPE_STR,
+ (void *)&part_str, &part_set, "partition");
+ num_opts++;
+#endif
+
+ CYG_ASSERT(num_opts <= NUM_ELEMS(opts), "Too many options");
+
+ if (!scan_opts(argc, argv, 1, opts, num_opts, NULL, 0, NULL))
+ return;
+
+ if (!type_set) {
+ diag_printf("Must specify file system type\n");
+ return;
+ }
+ if (fileio_mounted) {
+ diag_printf("A file system is already mounted\n");
+ return;
+ }
+#ifdef CYGPKG_IO_FLASH_BLOCK_DEVICE
+ if (part_set) {
+ int len;
+ cyg_io_handle_t h;
+
+ if (dev_set && strcmp(dev_str, CYGDAT_IO_FLASH_BLOCK_DEVICE_NAME_1)) {
+ diag_printf("May only set one of <device> or <partition>\n");
+ return;
+ }
+
+ dev_str = CYGDAT_IO_FLASH_BLOCK_DEVICE_NAME_1;
+ len = strlen(part_str);
+
+ err = cyg_io_lookup(dev_str, &h);
+ if (err < 0) {
+ diag_printf("cyg_io_lookup of \"%s\" returned %d\n", err);
+ return;
+ }
+ err = cyg_io_set_config(h, CYG_IO_SET_CONFIG_FLASH_FIS_NAME,
+ part_str, &len);
+ if (err < 0) {
+ diag_printf("FIS partition \"%s\" not found\n",
+ part_str);
+ return;
+ }
+ }
+#endif
+ err = mount(dev_str, "/", type_str);
+
+ if (err) {
+ diag_printf("Mount failed %d\n", err);
+ } else {
+// diag_printf("Mount %s file system succeeded\n", type_str);
+ fileio_mounted = 1;
+#ifdef CYGBLD_REDBOOT_FILEIO_WITH_LS
+ chdir("/");
+#endif
+ }
+}
+
+static void
+do_umount(int argc, char *argv[])
+{
+ if (!fileio_mounted) {
+ return;
+ }
+ umount ("/");
+ fileio_mounted = 0;
+}
+
+#ifdef CYGBLD_REDBOOT_FILEIO_WITH_LS
+#include <dirent.h>
+
+static char rwx[8][4] = { "---", "r--", "-w-", "rw-", "--x", "r-x", "-wx", "rwx" };
+
+static void
+do_ls(int argc, char * argv[])
+{
+ char * dir_str;
+ struct option_info opts[1];
+ bool dir_set = false;
+ DIR *dirp;
+ char cwd[PATH_MAX];
+ char filename[PATH_MAX];
+ struct stat sbuf;
+ int err;
+
+ init_opts(&opts[0], 'd', true, OPTION_ARG_TYPE_STR,
+ (void *)&dir_str, &dir_set, "directory");
+
+ if (!fileio_mounted) {
+ diag_printf("No filesystem mounted\n");
+ return;
+ }
+
+ if (!scan_opts(argc, argv, 1, opts, 1, NULL, 0, NULL))
+ return;
+
+ if (!dir_set) {
+ getcwd(cwd,sizeof(cwd));
+ dir_str = cwd;
+ }
+
+ diag_printf("directory %s\n",dir_str);
+ dirp = opendir(dir_str);
+ if (dirp==NULL) {
+ diag_printf("no such directory %s\n",dir_str);
+ return;
+ }
+
+ for (;;) {
+ struct dirent *entry = readdir(dirp);
+
+ if( entry == NULL )
+ break;
+
+ strcpy(filename, dir_str);
+ strcat(filename, "/");
+ strcat(filename, entry->d_name);
+
+ err = stat(filename, &sbuf);
+ if (err < 0) {
+ diag_printf("Unable to stat file %s\n", filename);
+ continue;
+ }
+ diag_printf("%4d ", sbuf.st_ino);
+ if (S_ISDIR(sbuf.st_mode)) diag_printf("d");
+ if (S_ISCHR(sbuf.st_mode)) diag_printf("c");
+ if (S_ISBLK(sbuf.st_mode)) diag_printf("b");
+ if (S_ISREG(sbuf.st_mode)) diag_printf("-");
+ if (S_ISLNK(sbuf.st_mode)) diag_printf("l");
+ diag_printf("%s%s%s", // Ho, humm, have to hard code the shifts
+ rwx[(sbuf.st_mode & S_IRWXU) >> 16],
+ rwx[(sbuf.st_mode & S_IRWXG) >> 19],
+ rwx[(sbuf.st_mode & S_IRWXO) >> 22]);
+ diag_printf(" %2d size %6d %s\n",
+ sbuf.st_nlink,sbuf.st_size,
+ entry->d_name);
+ }
+
+ closedir(dirp);
+ return;
+}
+
+RedBoot_cmd("ls",
+ "list directory contents",
+ "[-d directory]",
+ do_ls
+ );
+
+#endif // CYGBLD_REDBOOT_FILEIO_WITH_LS
+static int fd;
+
+externC int
+fileio_stream_open(connection_info_t *info, int *err)
+{
+ char *filename = info->filename;
+
+ if (!fileio_mounted) {
+ diag_printf("No file system mounted\n");
+ return -1;
+ }
+ fd = open(filename, O_RDONLY);
+ if (fd < 0) {
+ diag_printf("Open failed, error %d\n", errno);
+ return -1;
+ }
+ return 0;
+}
+
+externC int
+fileio_stream_read(char *buf, int size, int *err)
+{
+ int nread;
+
+ if ((nread = read(fd, buf, size)) < 0) {
+ *err = errno;
+ return -1;
+ }
+ return nread;
+}
+
+externC void
+fileio_stream_close(int *err)
+{
+ close(fd);
+}
+
+externC char *
+fileio_error(int err)
+{
+ static char myerr[10];
+
+ diag_sprintf(myerr, "error %d\n", err);
+ return myerr;
+}
+
+//
+// RedBoot interface
+//
+GETC_IO_FUNCS(fileio_io, fileio_stream_open, fileio_stream_close,
+ 0, fileio_stream_read, fileio_error);
+RedBoot_load(file, fileio_io, true, true, 0);
+
diff --git a/cesar/ecos/packages/redboot/current/src/fs/ide.c b/cesar/ecos/packages/redboot/current/src/fs/ide.c
new file mode 100644
index 0000000000..1b361e335c
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/fs/ide.c
@@ -0,0 +1,529 @@
+//==========================================================================
+//
+// ide.c
+//
+// RedBoot IDE support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas <gary@mind.be>
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): msalter
+// Contributors: msalter
+// Date: 2001-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <cyg/hal/hal_io.h>
+#include <fs/disk.h>
+#include <fs/ide.h>
+
+static int ide_read(struct disk *d,
+ cyg_uint32 start_sector,
+ cyg_uint32 *buf,
+ cyg_uint8 nr_sectors);
+
+static disk_funs_t ide_funs = { ide_read };
+
+static struct ide_priv ide_privs[HAL_IDE_NUM_CONTROLLERS * 2];
+
+static inline void
+__wait_for_ready(int ctlr)
+{
+ cyg_uint8 status;
+ do {
+ HAL_IDE_READ_UINT8(ctlr, IDE_REG_STATUS, status);
+ } while (status & (IDE_STAT_BSY | IDE_STAT_DRQ));
+}
+
+static inline int
+__wait_for_drq(int ctlr)
+{
+ cyg_uint8 status;
+ cyg_ucount32 tries;
+
+ CYGACC_CALL_IF_DELAY_US(10);
+ for (tries=0; tries<1000000; tries++) {
+ HAL_IDE_READ_UINT8(ctlr, IDE_REG_STATUS, status);
+ if (!(status & IDE_STAT_BSY)) {
+ if (status & IDE_STAT_DRQ)
+ return 1;
+ else
+ return 0;
+ }
+ }
+}
+
+static int
+ide_reset(int ctlr)
+{
+ cyg_uint8 status;
+ int delay;
+//
+// VMware note:
+// VMware virtual IDE device handler obviously expects that
+// the reset and setup functions were already done
+// by it's bios and complais if one uses reset here...
+//
+#ifndef CYGSEM_REDBOOT_DISK_IDE_VMWARE
+ HAL_IDE_WRITE_CONTROL(ctlr, 6); // polled mode, reset asserted
+ CYGACC_CALL_IF_DELAY_US(5000);
+ HAL_IDE_WRITE_CONTROL(ctlr, 2); // polled mode, reset cleared
+ CYGACC_CALL_IF_DELAY_US((cyg_uint32)50000);
+#endif
+
+ // wait 30 seconds max for not busy and drive ready
+ for (delay = 0; delay < 300; ++delay) {
+ CYGACC_CALL_IF_DELAY_US((cyg_uint32)100000);
+ HAL_IDE_READ_UINT8(ctlr, IDE_REG_STATUS, status);
+ if (!(status & IDE_STAT_BSY)) {
+ if (status & IDE_STAT_DRDY) {
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+
+// Return true if any devices attached to controller
+static int
+ide_presence_detect(int ctlr)
+{
+ cyg_uint8 sel, val;
+ int i;
+
+ for (i = 0; i < 2; i++) {
+ sel = (i << 4) | 0xA0;
+ CYGACC_CALL_IF_DELAY_US((cyg_uint32)50000);
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_DEVICE, sel);
+ CYGACC_CALL_IF_DELAY_US((cyg_uint32)50000);
+ HAL_IDE_READ_UINT8(ctlr, IDE_REG_DEVICE, val);
+ if (val == sel) {
+#ifndef CYGSEM_REDBOOT_DISK_IDE_VMWARE
+ if (i)
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_DEVICE, 0);
+#endif
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static int
+ide_ident(int ctlr, int dev, int is_packet_dev, cyg_uint16 *buf)
+{
+ int i;
+
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_DEVICE, dev << 4);
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_COMMAND, is_packet_dev ? 0xA1 : 0xEC);
+ CYGACC_CALL_IF_DELAY_US((cyg_uint32)50000);
+
+ if (!__wait_for_drq(ctlr))
+ return 0;
+
+ for (i = 0; i < (SECTOR_SIZE / sizeof(cyg_uint16)); i++, buf++)
+ HAL_IDE_READ_UINT16(ctlr, IDE_REG_DATA, *buf);
+
+ return 1;
+}
+
+static int
+ide_read_sectors(int ctlr, int dev, cyg_uint32 start, cyg_uint8 count, cyg_uint16 *buf)
+{
+ int i, j;
+ cyg_uint16 *p;
+
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_COUNT, count);
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_LBALOW, start & 0xff);
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_LBAMID, (start >> 8) & 0xff);
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_LBAHI, (start >> 16) & 0xff);
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_DEVICE,
+ ((start >> 24) & 0xf) | (dev << 4) | 0x40);
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_COMMAND, 0x20);
+
+ for(p = buf, i = 0; i < count; i++) {
+
+ if (!__wait_for_drq(ctlr)) {
+ diag_printf("%s: NO DRQ for ide%d, device %d.\n",
+ __FUNCTION__, ctlr, dev);
+ return 0;
+ }
+
+ for (j = 0; j < (SECTOR_SIZE / sizeof(cyg_uint16)); j++, p++)
+ HAL_IDE_READ_UINT16(ctlr, IDE_REG_DATA, *p);
+ }
+ return 1;
+}
+
+// max number of sectors to xfer during a single packet command
+#define MAX_CD_XFER 16
+
+static inline int
+send_packet_command(int ctlr, int dev, cyg_uint16 len, cyg_uint16 *pkt, int pktlen)
+{
+ int i;
+ cyg_uint8 status, reason;
+
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_FEATURES, 0);
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_COUNT, 0);
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_LBALOW, 0);
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_LBAMID, len & 0xff);
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_LBAHI, (len >> 8) & 0xff);
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_DEVICE, dev << 4);
+ HAL_IDE_WRITE_UINT8(ctlr, IDE_REG_COMMAND, 0xA0);
+
+ if (!__wait_for_drq(ctlr)) {
+ diag_printf("%s: NO DRQ for ide%d, device %d.\n",
+ __FUNCTION__, ctlr, dev);
+ return 0;
+ }
+
+ // send packet
+ for (i = 0; i < (pktlen/sizeof(cyg_uint16)); i++)
+ HAL_IDE_WRITE_UINT16(ctlr, IDE_REG_DATA, pkt[i]);
+
+ // wait for not busy transferring packet
+ do {
+ HAL_IDE_READ_UINT8(ctlr, IDE_REG_STATUS, status);
+ HAL_IDE_READ_UINT8(ctlr, IDE_REG_REASON, reason);
+
+ if ((status & (IDE_STAT_BSY | IDE_STAT_DRQ)) == IDE_STAT_DRQ)
+ if (reason & IDE_REASON_COD)
+ continue; // still wanting packet data (should timeout here)
+
+ } while (status & IDE_STAT_BSY);
+
+ return 1;
+}
+
+#define READ_COUNT(x) \
+ { unsigned char tmp; \
+ HAL_IDE_READ_UINT8(ctlr, IDE_REG_LBAMID, tmp); \
+ (x) = tmp; \
+ HAL_IDE_READ_UINT8(ctlr, IDE_REG_LBAHI, tmp); \
+ (x) = (x) | (tmp << 8); \
+ }
+
+
+// Read the sense data
+static int
+request_sense(int ctlr, int dev, cyg_uint16 count, cyg_uint16 *buf)
+{
+ int i;
+ cyg_uint16 cdcount, pkt[6];
+ unsigned char status, *cpkt = (unsigned char *)pkt;
+
+
+ // Fill in REQUEST SENSE packet command block
+ memset(cpkt, 0, sizeof(pkt));
+ cpkt[0] = 0x03;
+ cpkt[4] = 254; // allocation length
+
+ if (!send_packet_command(ctlr, dev, count, pkt, sizeof(pkt)))
+ return 0;
+
+ HAL_IDE_READ_UINT8(ctlr, IDE_REG_STATUS, status);
+ if (!(status & IDE_STAT_DRQ)) {
+ if (status & IDE_STAT_SERVICE) {
+ unsigned char reason;
+ HAL_IDE_READ_UINT8(ctlr, IDE_REG_REASON, reason);
+ diag_printf("%s: SERVICE request for ide%d, device %d, status[%02x], reason[%02x].\n",
+ __FUNCTION__, ctlr, dev, status, reason);
+ }
+ return 0;
+ }
+
+ READ_COUNT(cdcount);
+ if (cdcount != count)
+ diag_printf("%s: ide%d, dev%d: his cnt[%d] our count[%d].\n",
+ __FUNCTION__, ctlr, dev, cdcount, count);
+
+ for(i = 0; i < (cdcount / sizeof(*buf)); i++, buf++)
+ HAL_IDE_READ_UINT16(ctlr, IDE_REG_DATA, *buf);
+
+ // wait for not busy transferring data
+ do {
+ HAL_IDE_READ_UINT8(ctlr, IDE_REG_STATUS, status);
+ } while ((status & (IDE_STAT_BSY | IDE_STAT_DRQ)) == IDE_STAT_DRQ);
+
+ return cdcount;
+}
+
+// Interpret the sense data
+static int
+handle_sense(int ctlr, int dev, cyg_uint8 count, cyg_uint16 *buf)
+{
+#if 0
+ unsigned char *p = (char *)buf;
+
+ diag_printf("%s: %d bytes:\n", __FUNCTION__, count);
+ diag_printf("sense key[%02x] additional sense[%02x]\n",
+ p[2], p[12]);
+#endif
+ return 1;
+}
+
+static int
+do_packet_read(int ctlr, int dev, cyg_uint32 start, cyg_uint8 count, cyg_uint16 *buf)
+{
+ int i, retry_cnt;
+ cyg_uint16 cdcount, pkt[6], sense[127];
+ unsigned char status, *cpkt = (unsigned char *)pkt;
+
+ // get count number of whole cdrom sectors
+ while (count) {
+
+ retry_cnt = 3;
+
+ i = (count > MAX_CD_XFER) ? MAX_CD_XFER : count;
+
+ retry:
+ // Fill in READ(10) packet command block
+ memset(cpkt, 0, sizeof(pkt));
+ cpkt[0] = 0x28; // READ(10)
+ cpkt[2] = (start >> 24) & 0xff;
+ cpkt[3] = (start >> 16) & 0xff;
+ cpkt[4] = (start >> 8) & 0xff;
+ cpkt[5] = (start >> 0) & 0xff;
+ cpkt[7] = (i >> 8) & 0xff;
+ cpkt[8] = i & 0xff;
+
+ if (!send_packet_command(ctlr, dev, i * CDROM_SECTOR_SIZE,
+ pkt, sizeof(pkt)))
+ return 0;
+
+ HAL_IDE_READ_UINT8(ctlr, IDE_REG_STATUS, status);
+ if (!(status & IDE_STAT_DRQ)) {
+ if (status & IDE_STAT_SERVICE) {
+ unsigned char reason;
+ int sense_count;
+ HAL_IDE_READ_UINT8(ctlr, IDE_REG_REASON, reason);
+#if 1
+ diag_printf("%s: SERVICE request for ide%d, device %d, status[%02x], reason[%02x].\n",
+ __FUNCTION__, ctlr, dev, status, reason);
+#endif
+ sense_count = request_sense(ctlr, dev, sizeof(sense), sense);
+ if (sense_count) {
+ handle_sense(ctlr, dev, sense_count, sense);
+ if (retry_cnt--)
+ goto retry;
+ }
+ }
+ return 0;
+ }
+
+ count -= i;
+ start += i;
+
+ READ_COUNT(cdcount);
+ if (cdcount != (i * CDROM_SECTOR_SIZE))
+ diag_printf("%s: ide%d, dev%d: his cnt[%d] our count[%d].\n",
+ __FUNCTION__, ctlr, dev,
+ cdcount, i * CDROM_SECTOR_SIZE);
+
+ for(i = 0; i < (cdcount / sizeof(*buf)); i++, buf++)
+ HAL_IDE_READ_UINT16(ctlr, IDE_REG_DATA, *buf);
+
+ // wait for not busy transferring data
+ do {
+ HAL_IDE_READ_UINT8(ctlr, IDE_REG_STATUS, status);
+ } while ((status & (IDE_STAT_BSY | IDE_STAT_DRQ)) == IDE_STAT_DRQ);
+ }
+ return 1;
+}
+
+
+static int
+ide_packet_read_sectors(int ctlr, int dev, cyg_uint32 start, cyg_uint8 count, cyg_uint16 *buf)
+{
+ int i, extra;
+ cyg_uint32 cdstart;
+ static cyg_uint16 cdsec_buf[CDROM_SECTOR_SIZE/sizeof(cyg_uint16)];
+
+ cdstart = (start + SECTORS_PER_CDROM_SECTOR-1) / SECTORS_PER_CDROM_SECTOR;
+
+ // align to cdrom sector boundary.
+ if (start % SECTORS_PER_CDROM_SECTOR) {
+ if (!ide_packet_read_sectors(ctlr, dev,
+ cdstart * SECTORS_PER_CDROM_SECTOR,
+ SECTORS_PER_CDROM_SECTOR, cdsec_buf))
+ return 0;
+
+ i = SECTORS_PER_CDROM_SECTOR - (start % SECTORS_PER_CDROM_SECTOR);
+ if (i > count)
+ i = count;
+ memcpy(buf, cdsec_buf + ((start % CDROM_SECTOR_SIZE) * SECTOR_SIZE),
+ i * SECTOR_SIZE);
+
+ count -= i;
+ buf += (i * SECTOR_SIZE) / sizeof(*buf);
+ ++cdstart;
+ }
+
+ extra = count % SECTORS_PER_CDROM_SECTOR;
+ count /= SECTORS_PER_CDROM_SECTOR;
+
+ if (count) {
+ if (!do_packet_read(ctlr, dev, cdstart, count, buf))
+ return 0;
+ buf += count * SECTORS_PER_CDROM_SECTOR * SECTOR_SIZE;
+ }
+
+ if (extra) {
+ // read cdrom sector
+ if (!ide_packet_read_sectors(ctlr, dev,
+ cdstart * SECTORS_PER_CDROM_SECTOR,
+ extra, cdsec_buf))
+ return 0;
+ memcpy(buf, cdsec_buf, extra * SECTOR_SIZE);
+ }
+
+ return 1;
+}
+
+static int
+ide_read(struct disk *d,
+ cyg_uint32 start_sec, cyg_uint32 *buf, cyg_uint8 nr_secs)
+{
+ struct ide_priv *p = (struct ide_priv *)(d->private);
+
+ if (p->flags & IDE_DEV_PACKET)
+ return ide_packet_read_sectors(p->controller, p->drive,
+ start_sec, nr_secs, (cyg_uint16 *)buf);
+
+ return ide_read_sectors(p->controller, p->drive,
+ start_sec, nr_secs, (cyg_uint16 *)buf);
+}
+
+
+static void
+ide_init(void)
+{
+ cyg_uint32 buf[SECTOR_SIZE/sizeof(cyg_uint32)], u32;
+ cyg_uint16 u16;
+ cyg_uint8 u8;
+ int i, j, num_controllers;
+ disk_t disk;
+ struct ide_priv *priv;
+
+#define DEV_INIT_VAL ((j << 4) | 0xA0)
+
+ num_controllers = HAL_IDE_INIT();
+
+ CYGACC_CALL_IF_DELAY_US(5);
+
+ priv = ide_privs;
+ for (i = 0; i < num_controllers; i++) {
+
+ if (!ide_presence_detect(i)) {
+ diag_printf("No devices on IDE controller %d\n", i);
+ continue;
+ }
+
+ // soft reset the devices on this controller
+ if (!ide_reset(i))
+ continue;
+
+ // 2 devices per controller
+ for (j = 0; j < 2; j++, priv++) {
+
+ priv->controller = i;
+ priv->drive = j;
+ priv->flags = 0;
+
+ // This is reminiscent of a memory test. We write a value
+ // to a certain location (device register), then write a
+ // different value somewhere else so that the first value
+ // is not hanging on the bus, then we read back the first
+ // value to see if the write was succesful.
+ //
+ HAL_IDE_WRITE_UINT8(i, IDE_REG_DEVICE, DEV_INIT_VAL);
+ HAL_IDE_WRITE_UINT8(i, IDE_REG_FEATURES, 0);
+ CYGACC_CALL_IF_DELAY_US(50000);
+ HAL_IDE_READ_UINT8(i, IDE_REG_DEVICE, u8);
+ if (u8 != DEV_INIT_VAL) {
+ diag_printf("IDE failed to identify unit %d - wrote: %x, read: %x\n",
+ i, DEV_INIT_VAL, u8);
+ continue;
+ }
+
+ // device present
+ priv->flags |= IDE_DEV_PRESENT;
+
+ if (ide_ident(i, j, 0, (cyg_uint16 *)buf) <= 0) {
+ if (ide_ident(i, j, 1, (cyg_uint16 *)buf) <= 0) {
+ priv->flags = 0;
+ continue; // can't identify device
+ } else {
+ u16 = *(cyg_uint16 *)((char *)buf + IDE_DEVID_GENCONFIG);
+ if (((u16 >> 8) & 0x1f) != 5) {
+ diag_printf("Non-CDROM ATAPI device #%d - skipped\n", i);
+ continue;
+ }
+ priv->flags |= IDE_DEV_PACKET;
+ }
+ }
+
+ memset(&disk, 0, sizeof(disk));
+ disk.funs = &ide_funs;
+ disk.private = priv;
+
+ disk.kind = DISK_IDE_HD; // until proven otherwise
+
+ if (priv->flags & IDE_DEV_PACKET) {
+ u16 = *(cyg_uint16 *)((char *)buf + IDE_DEVID_GENCONFIG);
+ if (((u16 >> 8) & 0x1f) == 5)
+ disk.kind = DISK_IDE_CDROM;
+ } else {
+ u32 = *(cyg_uint32 *)((char *)buf + IDE_DEVID_LBA_CAPACITY);
+ disk.nr_sectors = u32;
+ }
+
+ if (!disk_register(&disk))
+ return;
+ }
+ }
+}
+
+RedBoot_init(ide_init, RedBoot_INIT_FIRST);
+
diff --git a/cesar/ecos/packages/redboot/current/src/io.c b/cesar/ecos/packages/redboot/current/src/io.c
new file mode 100644
index 0000000000..4d6cfa0c07
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/io.c
@@ -0,0 +1,760 @@
+//==========================================================================
+//
+// io.c
+//
+// RedBoot I/O support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+// Copyright (C) 2002, 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas,hmt,jlarmour
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include "redboot.h"
+
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+// GDB interface functions
+extern void ungetDebugChar(char c);
+#endif
+
+static void
+do_channel(int argc, char *argv[]);
+
+#ifdef CYGPKG_REDBOOT_ANY_CONSOLE
+RedBoot_cmd("channel",
+ "Display/switch console channel",
+ "[-1|<channel number>]",
+ do_channel
+ );
+#else
+RedBoot_cmd("channel",
+ "Display/switch console channel",
+ "[<channel number>]",
+ do_channel
+ );
+#endif
+
+static void
+do_channel(int argc, char *argv[])
+{
+ int cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+
+ if (argc == 2) {
+#ifdef CYGPKG_REDBOOT_ANY_CONSOLE
+ if (strcmp( argv[1], "-1") == 0) {
+ console_selected = false;
+ console_echo = true;
+ } else
+#endif
+ {
+ unsigned long chan;
+ if ( !parse_num( argv[1], &chan, NULL, NULL) ) {
+ diag_printf("** Error: invalid channel '%s'\n", argv[1]);
+ } else {
+ if (chan < CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS) {
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(chan);
+ CYGACC_CALL_IF_SET_DEBUG_COMM(chan);
+ if (chan != cur)
+ console_echo = true;
+ }
+ else {
+ diag_printf("**Error: bad channel number '%s'\n", argv[1]);
+ }
+ }
+ }
+ }
+ /* else display */
+ else {
+ diag_printf("Current console channel id: ");
+#ifdef CYGPKG_REDBOOT_ANY_CONSOLE
+ if (!console_selected)
+ diag_printf("-1\n");
+ else
+#endif
+ diag_printf("%d\n", cur);
+ }
+}
+
+void
+mon_write_char(char c)
+{
+ hal_virtual_comm_table_t *__chan;
+
+#ifdef CYGPKG_REDBOOT_ANY_CONSOLE
+ if (!console_selected) {
+ int cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+ int i;
+ // Send output to all channels
+ for (i = 0; i < CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS; i++) {
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(i);
+ __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+ CYGACC_COMM_IF_PUTC(*__chan, c);
+ }
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
+ } else
+#endif
+ {
+ __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+ if (__chan)
+ CYGACC_COMM_IF_PUTC(*__chan, c);
+ else {
+ __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+ CYGACC_COMM_IF_PUTC(*__chan, c);
+ }
+ }
+}
+
+static void
+mon_read_char(char *c)
+{
+ hal_virtual_comm_table_t* __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+
+ if (__chan)
+ *c = CYGACC_COMM_IF_GETC(*__chan);
+ else {
+ __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+ *c = CYGACC_COMM_IF_GETC(*__chan);
+ }
+}
+
+#ifdef CYGPKG_REDBOOT_ANY_CONSOLE
+static int _mon_timeout;
+#endif
+
+static bool
+mon_read_char_with_timeout(char *c)
+{
+ bool res = false;
+ hal_virtual_comm_table_t *__chan;
+
+#ifdef CYGPKG_REDBOOT_ANY_CONSOLE
+ if (!console_selected) {
+ int cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+ int i, j, tot;
+ // Try input from all channels
+ tot = 0;
+ while (tot < _mon_timeout) {
+ for (i = 0; i < CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS; i++, tot++) {
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(i);
+ __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+ res = CYGACC_COMM_IF_GETC_TIMEOUT(*__chan, c);
+ if (res) {
+ // Input available on this channel, make it be the console
+ if (*c != '\0') {
+ // Don't chose this unless real data have arrived
+ console_selected = true;
+ CYGACC_CALL_IF_SET_DEBUG_COMM(i);
+ // Disable interrupts on all channels but this one
+ for (j = 0; j < CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS; j++) {
+ if (i != j) {
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(j);
+ __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+ CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_IRQ_DISABLE);
+ }
+ }
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(i);
+ return res;
+ }
+ }
+ }
+ }
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
+ } else
+#endif
+ {
+ __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+ if (__chan)
+ res = CYGACC_COMM_IF_GETC_TIMEOUT(*__chan, c);
+ else {
+ __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+ res = CYGACC_COMM_IF_GETC_TIMEOUT(*__chan, c);
+ }
+ }
+ return res;
+}
+
+static void
+mon_set_read_char_timeout(int ms)
+{
+ hal_virtual_comm_table_t *__chan;
+
+#ifdef CYGPKG_REDBOOT_ANY_CONSOLE
+ if (!console_selected) {
+ int cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+ int i;
+ // Set timeout to minimum on each channel; total amounts to desired value
+ _mon_timeout = ms;
+ ms = 1;
+ for (i = 0; i < CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS; i++) {
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(i);
+ if ((__chan = CYGACC_CALL_IF_CONSOLE_PROCS()) != 0) {
+ CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_SET_TIMEOUT, ms);
+ }
+ }
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
+ } else
+#endif
+ {
+ if ((__chan = CYGACC_CALL_IF_CONSOLE_PROCS()) != 0) {
+ CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_SET_TIMEOUT, ms);
+ }
+ if ((__chan = CYGACC_CALL_IF_DEBUG_PROCS()) != 0) {
+ CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_SET_TIMEOUT, ms);
+ }
+ }
+}
+
+//
+// Test for ^C on the console. CAUTION! discards all console input
+//
+bool
+_rb_break(int timeout)
+{
+ char c;
+ mon_set_read_char_timeout(timeout);
+ if (mon_read_char_with_timeout(&c)) {
+ if (c == 0x03) { // Test for ^C
+ return true;
+ }
+ }
+ return false;
+}
+
+#ifdef CYGFUN_REDBOOT_BOOT_SCRIPT
+#define __STRINGIFY(x) #x
+#define _STRINGIFY(x) __STRINGIFY(x)
+#define _STARTUP_STR _STRINGIFY(CYG_HAL_STARTUP) "}"
+
+//
+// Read a character from script.
+// Return true if script character found, false if not.
+//
+static int
+getc_script(char *cp)
+{
+ static bool newline = true;
+ bool skip;
+
+ while (script && *script) {
+ if (newline && *script == '{') {
+ skip = false;
+ ++script;
+
+ // skip if it isn't for this startup type
+ if (strncmp(script, _STARTUP_STR, strlen(_STARTUP_STR)))
+ skip = true;
+
+ // skip past "{...}"
+ while (*script && *script++ != '}')
+ ;
+
+ // skip script line if neccessary
+ if (skip) {
+ while (*script && *script++ != '\n')
+ ;
+ } else
+ newline = false;
+
+ } else {
+ *cp = *script++;
+ if (*cp == '\n') {
+ newline = true;
+ } else {
+ newline = false;
+ }
+ return true;
+ }
+ }
+ return false;
+}
+#endif
+
+#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0
+#define _CL_NUM_LINES CYGNUM_REDBOOT_CMD_LINE_EDITING // Number of lines to keep
+static char _cl_lines[_CL_NUM_LINES][CYGPKG_REDBOOT_MAX_CMD_LINE];
+static int _cl_index = -1; // Last known command line
+static int _cl_max_index = -1; // Last command in buffers
+
+#ifdef CYGBLD_REDBOOT_CMD_LINE_HISTORY
+static void expand_history(char *);
+#endif
+#endif
+
+//
+// Read a line of input from the user
+// Return:
+// _GETS_OK: 'n' valid characters received
+// _GETS_GDB: '$' (GDB lead-in)
+// _GETS_TIMEOUT: No input before timeout
+// _GETS_CTRLC: ^C typed
+//
+// if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0
+// Command line history support
+// ^P - Select previous line from history
+// ^N - Select next line from history
+// ^A - Move insertion [cursor] to start of line
+// ^E - Move cursor to end of line
+// ^B - Move cursor back [previous character]
+// ^F - Move cursor forward [next character]
+//
+int
+_rb_gets_preloaded(char *buf, int buflen, int timeout)
+{
+ char *ip = buf; // Insertion point
+ char *eol = buf; // End of line
+ char c;
+ bool res = false;
+ static char last_ch = '\0';
+ int _timeout;
+#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0
+ int _index = _cl_index; // Last saved line
+ char *xp;
+#endif
+
+ // Display current buffer data
+ while (*eol) {
+ mon_write_char(*eol++);
+ }
+ ip = eol;
+
+ while (true) {
+#ifdef CYGFUN_REDBOOT_BOOT_SCRIPT
+ if (getc_script(&c))
+ do_idle(false);
+ else
+#endif
+ if ((timeout > 0) && (eol == buf)) {
+#define MIN_TIMEOUT 50
+ _timeout = timeout > MIN_TIMEOUT ? MIN_TIMEOUT : timeout;
+ mon_set_read_char_timeout(_timeout);
+ while (timeout > 0) {
+ res = mon_read_char_with_timeout(&c);
+ if (res) {
+ // Got a character
+ do_idle(false);
+ break;
+ }
+ timeout -= _timeout;
+ }
+ if (res == false) {
+ do_idle(true);
+ return _GETS_TIMEOUT; // Input timed out
+ }
+ } else {
+ mon_read_char(&c);
+ }
+ *eol = '\0';
+ switch (c) {
+#define CTRL(c) ((c)&0x1F)
+#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0
+ case CTRL('P'):
+ // Fetch the previous line into the buffer
+ if (_index >= 0) {
+ // Erase the previous line [crude]
+ while (ip != buf) {
+ mon_write_char('\b');
+ mon_write_char(' ');
+ mon_write_char('\b');
+ ip--;
+ }
+ strcpy(buf, _cl_lines[_index]);
+ while (*ip) {
+ mon_write_char(*ip++);
+ }
+ eol = ip;
+ // Move to previous line
+ _index--;
+ if (_index < 0) {
+ _index = _cl_max_index;
+ }
+ } else {
+ mon_write_char(0x07); // Audible bell on most devices
+ }
+ break;
+ case CTRL('N'):
+ // Fetch the next line into the buffer
+ if (_index >= 0) {
+ if (++_index > _cl_max_index) _index = 0;
+ // Erase the previous line [crude]
+ while (ip != buf) {
+ mon_write_char('\b');
+ mon_write_char(' ');
+ mon_write_char('\b');
+ ip--;
+ }
+ strcpy(buf, _cl_lines[_index]);
+ while (*ip) {
+ mon_write_char(*ip++);
+ }
+ eol = ip;
+ } else {
+ mon_write_char(0x07); // Audible bell on most devices
+ }
+ break;
+ case CTRL('B'):
+ // Move insertion point backwards
+ if (ip != buf) {
+ mon_write_char('\b');
+ ip--;
+ }
+ break;
+ case CTRL('F'):
+ // Move insertion point forwards
+ if (ip != eol) {
+ mon_write_char(*ip++);
+ }
+ break;
+ case CTRL('E'):
+ // Move insertion point to end of line
+ while (ip != eol) {
+ mon_write_char(*ip++);
+ }
+ break;
+ case CTRL('A'):
+ // Move insertion point to beginning of line
+ if (ip != buf) {
+ xp = ip;
+ while (xp-- != buf) {
+ mon_write_char('\b');
+ }
+ }
+ ip = buf;
+ break;
+ case CTRL('K'):
+ // Kill to the end of line
+ if (ip != eol) {
+ xp = ip;
+ while (xp++ != eol) {
+ mon_write_char(' ');
+ }
+ while (--xp != ip) {
+ mon_write_char('\b');
+ }
+ eol = ip;
+ }
+ break;
+ case CTRL('D'):
+ // Erase the character under the cursor
+ if (ip != eol) {
+ xp = ip;
+ eol--;
+ while (xp != eol) {
+ *xp = *(xp+1);
+ mon_write_char(*xp++);
+ }
+ mon_write_char(' '); // Erases last character
+ mon_write_char('\b');
+ while (xp-- != ip) {
+ mon_write_char('\b');
+ }
+ }
+ break;
+#endif // CYGNUM_REDBOOT_CMD_LINE_EDITING
+ case CTRL('C'): // ^C
+ // Abort current input
+ diag_printf("^C\n");
+ *buf = '\0'; // Nothing useful in buffer
+ return _GETS_CTRLC;
+ case '\n':
+ case '\r':
+ // If previous character was the "other" end-of-line, ignore this one
+ if (((c == '\n') && (last_ch == '\r')) ||
+ ((c == '\r') && (last_ch == '\n'))) {
+ c = '\0';
+ break;
+ }
+ // End of line
+ if (console_echo) {
+ mon_write_char('\r');
+ mon_write_char('\n');
+ }
+ last_ch = c;
+#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0
+ if (cmd_history) {
+ // History handling - only when enabled
+#ifdef CYGBLD_REDBOOT_CMD_LINE_HISTORY
+ expand_history(buf);
+#endif
+ if (*buf != '\0') {
+ if (++_cl_index == _CL_NUM_LINES) _cl_index = 0;
+ if (_cl_index > _cl_max_index) _cl_max_index = _cl_index;
+ strcpy(_cl_lines[_cl_index], buf);
+ }
+ }
+#endif
+ return _GETS_OK;
+ case '\b':
+ case 0x7F: // DEL
+ if (ip != buf) {
+#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0
+ if (ip != eol) {
+ ip--;
+ mon_write_char('\b');
+ xp = ip;
+ while (xp != (eol-1)) {
+ *xp = *(xp+1);
+ mon_write_char(*xp++);
+ }
+ mon_write_char(' '); // Erases last character
+ mon_write_char('\b');
+ while (xp-- != ip) {
+ mon_write_char('\b');
+ }
+ } else {
+ if (console_echo) {
+ mon_write_char('\b');
+ mon_write_char(' ');
+ mon_write_char('\b');
+ }
+ ip--;
+ }
+ eol--;
+#else
+ if (console_echo) {
+ mon_write_char('\b');
+ mon_write_char(' ');
+ mon_write_char('\b');
+ }
+ ip--;
+ eol--;
+#endif
+ }
+ break;
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+ case '+': // fall through
+ case '$':
+ if (ip == buf || last_ch != '\\')
+ {
+ // Give up and try GDB protocol
+ ungetDebugChar(c); // Push back character so stubs will see it
+ return _GETS_GDB;
+ }
+ if (last_ch == '\\') {
+#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0
+ if (ip == eol) {
+ // Just save \$ as $
+ eol = --ip;
+ } else {
+ mon_write_char('\b');
+ *--ip = c;
+ mon_write_char(c);
+ break;
+ }
+#else
+ ip--; // Save \$ as $
+#endif
+ }
+ // else fall through
+#endif
+ default:
+#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0
+ // If the insertion point is not at the end of line, make space for it
+ if (ip != eol) {
+ xp = eol;
+ *++eol = '\0';
+ while (xp != ip) {
+ *xp = *(xp-1);
+ xp--;
+ }
+ }
+#endif
+ if (console_echo) {
+ mon_write_char(c);
+ }
+ if (ip == eol) {
+ // Advance both pointers
+ *ip++ = c;
+ eol = ip;
+#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0
+ } else {
+ // Just insert the character
+ *ip++ = c;
+ xp = ip;
+ while (xp != eol) {
+ mon_write_char(*xp++);
+ }
+ while (xp-- != ip) {
+ mon_write_char('\b');
+ }
+#endif
+ }
+ }
+ last_ch = c;
+ if (ip == buf + buflen - 1) { // Buffer full
+ *ip = '\0';
+ return buflen;
+ }
+ }
+}
+
+int
+_rb_gets(char *buf, int buflen, int timeout)
+{
+ *buf = '\0'; // Empty buffer
+ return _rb_gets_preloaded(buf, buflen, timeout);
+}
+
+static bool
+_verify_action(int timeout, char *fmt, va_list ap)
+{
+ char ans[8];
+ int ret;
+#ifdef CYGFUN_REDBOOT_BOOT_SCRIPT
+ // Don't ask if we're executing a script
+ if (script && *script)
+ return 1;
+#endif
+
+ diag_vprintf(fmt, ap);
+ diag_printf(" - continue (y/n)? ");
+ if ((ret = _rb_gets(ans, sizeof(ans), timeout)) > 0) {
+ return ((ans[0] == 'y') || (ans[0] == 'Y'));
+ } else {
+ if (ret == _GETS_TIMEOUT) {
+ diag_printf(" ** Timed out!\n");
+ }
+ return 0; // Timed out or ^C
+ }
+}
+
+bool
+verify_action(char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ return _verify_action(0, fmt, ap);
+}
+
+bool
+verify_action_with_timeout(int timeout, char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ return _verify_action(timeout, fmt, ap);
+}
+
+
+#ifdef CYGBLD_REDBOOT_CMD_LINE_HISTORY
+// parse for history index number. Return number or -1 if not
+// an index number.
+static int
+parse_history_index(char *s)
+{
+ int val = 0;
+
+ while ('0' <= *s && *s <= '9')
+ val = (val * 10) + (*s++ - '0');
+
+ if (*s)
+ return -1;
+
+ return val;
+}
+
+// Check input line to see if it needs history expansion. If so,
+// try to find matching command and replace buffer as appropriate.
+static void
+expand_history(char *buf)
+{
+ int ncmds = _cl_max_index + 1;
+ int i, index, len;
+
+ if (buf[0] != '!' || buf[1] == '\0')
+ return;
+
+ if (ncmds > 0) {
+ if (!strcmp(buf, "!!")) {
+ strcpy(buf, _cl_lines[_cl_index]);
+ return;
+ }
+ if ((index = parse_history_index(buf + 1)) >= 0) {
+ if (index <= _cl_max_index) {
+ strcpy(buf, _cl_lines[index]);
+ return;
+ }
+ }
+ len = strlen(buf + 1);
+ for (i = 0, index = _cl_index; i < ncmds; i++) {
+ if (!strncmp(_cl_lines[index], buf+1, len)) {
+ strcpy(buf, _cl_lines[index]);
+ return;
+ }
+ if (--index < 0)
+ index = _cl_max_index;
+ }
+ }
+
+ diag_printf("%s: event not found\n", buf);
+ *buf = '\0';
+}
+
+static void
+do_history(int argc, char *argv[])
+{
+ int ncmds = _cl_max_index + 1;
+ int i, index;
+
+ if (_cl_index == _cl_max_index) {
+ // history has not wrapped around
+ for (i = 0; i < ncmds; i++)
+ diag_printf("%3d %s\n", i, _cl_lines[i]);
+ } else {
+ for (i = 0, index = _cl_index + 1; i < ncmds; i++) {
+ diag_printf("%3d %s\n", i, _cl_lines[index++]);
+ if (index > _cl_max_index)
+ index = 0;
+ }
+ }
+}
+
+RedBoot_cmd("history",
+ "Display command history",
+ "",
+ do_history
+ );
+#endif // CYGBLD_REDBOOT_CMD_LINE_HISTORY
diff --git a/cesar/ecos/packages/redboot/current/src/iomem.c b/cesar/ecos/packages/redboot/current/src/iomem.c
new file mode 100644
index 0000000000..d79ffb6128
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/iomem.c
@@ -0,0 +1,171 @@
+//==========================================================================
+//
+// iomem.c
+//
+// RedBoot I/O memory peek and poke
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2004 eCosCentric Ltd
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): icampbell
+// Contributors: icampbell
+// Date: 2004-11-09
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <cyg/hal/hal_io.h>
+
+RedBoot_cmd("iopeek",
+ "Read I/O location",
+ "[-b <location>] [-1|2|4]",
+ do_iopeek
+ );
+RedBoot_cmd("iopoke",
+ "Write I/O location",
+ "[-b <location>] [-1|2|4] -v <value>",
+ do_iopoke
+ );
+
+void
+do_iopoke(int argc, char *argv[])
+{
+ struct option_info opts[5];
+ unsigned long base;
+ bool base_set, value_set;
+ bool set_32bit = false;
+ bool set_16bit = false;
+ bool set_8bit = false;
+ cyg_uint32 value;
+ int size = 1;
+
+ init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM,
+ &base, &base_set, "base address");
+ init_opts(&opts[1], 'v', true, OPTION_ARG_TYPE_NUM,
+ &value, &value_set, "valuex");
+ init_opts(&opts[2], '4', false, OPTION_ARG_TYPE_FLG,
+ &set_32bit, 0, "output 32 bit units");
+ init_opts(&opts[3], '2', false, OPTION_ARG_TYPE_FLG,
+ &set_16bit, 0, "output 16 bit units");
+ init_opts(&opts[4], '1', false, OPTION_ARG_TYPE_FLG,
+ &set_8bit, 0, "output 8 bit units");
+ if (!scan_opts(argc, argv, 1, opts, 5, 0, 0, "")) {
+ return;
+ }
+ if (!base_set) {
+ diag_printf("iopoke what <location>?\n");
+ return;
+ }
+ if (!value_set) {
+ diag_printf("iopoke what <value>?\n");
+ return;
+ }
+ if (set_32bit) {
+ size = 4;
+ } else if (set_16bit) {
+ size = 2;
+ } else if (set_8bit) {
+ size = 1;
+ }
+
+ switch (size) {
+ case 4:
+ HAL_WRITE_UINT32 ( base, value );
+ break;
+ case 2:
+ HAL_WRITE_UINT16 ( base, value );
+ break;
+ case 1:
+ HAL_WRITE_UINT8 ( base, value );
+ break;
+ }
+}
+
+void
+do_iopeek(int argc, char *argv[])
+{
+ struct option_info opts[4];
+ unsigned long base;
+ bool base_set;
+ bool set_32bit = false;
+ bool set_16bit = false;
+ bool set_8bit = false;
+ int size = 1, value;
+
+ init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM,
+ &base, &base_set, "base address");
+ init_opts(&opts[1], '4', false, OPTION_ARG_TYPE_FLG,
+ &set_32bit, 0, "output 32 bit units");
+ init_opts(&opts[2], '2', false, OPTION_ARG_TYPE_FLG,
+ &set_16bit, 0, "output 16 bit units");
+ init_opts(&opts[3], '1', false, OPTION_ARG_TYPE_FLG,
+ &set_8bit, 0, "output 8 bit units");
+ if (!scan_opts(argc, argv, 1, opts, 5, 0, 0, "")) {
+ return;
+ }
+ if (!base_set) {
+ diag_printf("iopeek what <location>?\n");
+ return;
+ }
+ if (set_32bit) {
+ size = 4;
+ } else if (set_16bit) {
+ size = 2;
+ } else if (set_8bit) {
+ size = 1;
+ }
+
+ switch (size) {
+ case 4:
+ HAL_READ_UINT32 ( base, value );
+ diag_printf("0x%04lx = 0x%08x\n", base, value );
+ break;
+ case 2:
+ HAL_READ_UINT16 ( base, value );
+ diag_printf("0x%04lx = 0x%04x\n", base, value );
+ break;
+ case 1:
+ HAL_READ_UINT8 ( base, value );
+ diag_printf("0x%04lx = 0x%02x\n", base, value );
+ break;
+ }
+}
diff --git a/cesar/ecos/packages/redboot/current/src/load.c b/cesar/ecos/packages/redboot/current/src/load.c
new file mode 100644
index 0000000000..d50cfb00ba
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/load.c
@@ -0,0 +1,820 @@
+//==========================================================================
+//
+// load.c
+//
+// RedBoot file/image loader
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas, tsmith
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <elf.h>
+#ifdef CYGBLD_BUILD_REDBOOT_WITH_XYZMODEM
+#include <xyzModem.h>
+#endif
+#ifdef CYGPKG_REDBOOT_DISK
+#include <fs/disk.h>
+#endif
+#ifdef CYGPKG_REDBOOT_FILEIO
+#include <fs/fileio.h>
+#endif
+#ifdef CYGPKG_REDBOOT_NETWORKING
+#ifdef CYGSEM_REDBOOT_NET_TFTP_DOWNLOAD
+#include <net/tftp_support.h>
+#endif
+#ifdef CYGSEM_REDBOOT_NET_HTTP_DOWNLOAD
+#include <net/http.h>
+#endif
+#endif
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+static char usage[] = "[-r] [-v] "
+#ifdef CYGBLD_BUILD_REDBOOT_WITH_ZLIB
+ "[-d] "
+#endif
+#ifdef CYGPKG_REDBOOT_NETWORKING
+ "[-h <host>] [-p <TCP port>]"
+#endif
+ "[-m <varies>] "
+#if CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS > 1
+ "[-c <channel_number>] "
+#endif
+ "\n [-b <base_address>] <file_name>";
+
+// Exported CLI function
+RedBoot_cmd("load",
+ "Load a file",
+ usage,
+ do_load
+ );
+
+//
+// Stream I/O support
+//
+
+// Table describing the various I/O methods
+CYG_HAL_TABLE_BEGIN( __RedBoot_LOAD_TAB__, RedBoot_load );
+CYG_HAL_TABLE_END( __RedBoot_LOAD_TAB_END__, RedBoot_load );
+extern struct load_io_entry __RedBoot_LOAD_TAB__[], __RedBoot_LOAD_TAB_END__;
+
+// Buffers, data used by redboot_getc
+#define BUF_SIZE CYGNUM_REDBOOT_GETC_BUFFER
+struct {
+ getc_io_funcs_t *io;
+ int (*fun)(char *, int len, int *err);
+ unsigned char buf[BUF_SIZE];
+ unsigned char *bufp;
+ int avail, len, err;
+ int verbose, decompress, tick;
+#ifdef CYGBLD_BUILD_REDBOOT_WITH_ZLIB
+ int (*raw_fun)(char *, int len, int *err);
+ _pipe_t load_pipe;
+ unsigned char _buffer[CYGNUM_REDBOOT_LOAD_ZLIB_BUFFER];
+#endif
+} getc_info;
+
+typedef int (*getc_t)(void);
+
+//
+// Read the next data byte from the stream.
+// Returns:
+// >= 0 - actual data
+// -1 - error or EOF, status in getc_info.err
+//
+static int
+redboot_getc(void)
+{
+ static char spin[] = "|/-\\|-";
+ if (getc_info.avail < 0) {
+ return -1;
+ }
+ if (getc_info.avail == 0) {
+ if (getc_info.verbose) {
+ diag_printf("%c\b", spin[getc_info.tick++]);
+ if (getc_info.tick >= sizeof(spin)) {
+ getc_info.tick = 0;
+ }
+ }
+ if (getc_info.len < BUF_SIZE) {
+ // No more data available
+ if (getc_info.verbose) diag_printf("\n");
+ return -1;
+ }
+ getc_info.bufp = getc_info.buf;
+ getc_info.len = (*getc_info.fun)(getc_info.bufp, BUF_SIZE, &getc_info.err);
+ if ((getc_info.avail = getc_info.len) <= 0) {
+ if (getc_info.len < 0) {
+ diag_printf("I/O error: %s\n", (getc_info.io->error)(getc_info.err));
+ }
+ if (getc_info.verbose) diag_printf("\n");
+ return -1;
+ }
+ }
+ getc_info.avail--;
+ return *getc_info.bufp++;
+}
+
+#ifdef CYGBLD_BUILD_REDBOOT_WITH_ZLIB
+//
+// Called to fetch a new chunk of data and decompress it
+//
+static int
+_decompress_stream(char *buf, int len, int *err)
+{
+ _pipe_t* p = &getc_info.load_pipe;
+ int res, total;
+
+ total = 0;
+ while (len > 0) {
+ if (p->in_avail == 0) {
+ p->in_buf = &getc_info._buffer[0];
+ res = (*getc_info.raw_fun)(p->in_buf, CYGNUM_REDBOOT_LOAD_ZLIB_BUFFER,
+ &getc_info.err);
+ if ((p->in_avail = res) <= 0) {
+ // No more data
+ return total;
+ }
+ }
+ p->out_buf = buf;
+ p->out_size = 0;
+ p->out_max = len;
+ res = (*_dc_inflate)(p);
+ if (res != 0) {
+ *err = res;
+ return total;
+ }
+ len -= p->out_size;
+ buf += p->out_size;
+ total += p->out_size;
+ }
+ return total;
+}
+#endif
+
+static int
+redboot_getc_init(connection_info_t *info, getc_io_funcs_t *funcs,
+ int verbose, int decompress)
+{
+ int res;
+
+ res = (funcs->open)(info, &getc_info.err);
+ if (res < 0) {
+ diag_printf("Can't load '%s': %s\n", info->filename, (funcs->error)(getc_info.err));
+ return res;
+ }
+ getc_info.io = funcs;
+ getc_info.fun = funcs->read;
+ getc_info.avail = 0;
+ getc_info.len = BUF_SIZE;
+ getc_info.verbose = verbose;
+ getc_info.decompress = decompress;
+ getc_info.tick = 0;
+#ifdef CYGBLD_BUILD_REDBOOT_WITH_ZLIB
+ if (decompress) {
+ _pipe_t* p = &getc_info.load_pipe;
+ p->out_buf = &getc_info.buf[0];
+ p->out_size = 0;
+ p->in_avail = 0;
+ getc_info.raw_fun = getc_info.fun;
+ getc_info.fun = _decompress_stream;
+ getc_info.err = (*_dc_init)(p);
+ if (0 != getc_info.err && p->msg) {
+ diag_printf("open decompression error: %s\n", p->msg);
+ }
+ }
+#endif
+ return 0;
+}
+
+static void
+redboot_getc_rewind(void)
+{
+ getc_info.bufp = getc_info.buf;
+ getc_info.avail = getc_info.len;
+}
+
+static void
+redboot_getc_terminate(bool abort)
+{
+ if (getc_info.io->terminate) {
+ (getc_info.io->terminate)(abort, redboot_getc);
+ }
+}
+
+static void
+redboot_getc_close(void)
+{
+ (getc_info.io->close)(&getc_info.err);
+#ifdef CYGBLD_BUILD_REDBOOT_WITH_ZLIB
+ if (getc_info.decompress) {
+ _pipe_t* p = &getc_info.load_pipe;
+ int err = getc_info.err;
+ if (0 != err && p->msg) {
+ diag_printf("decompression error: %s\n", p->msg);
+ }
+ err = (*_dc_close)(p, getc_info.err);
+ }
+#endif
+}
+
+#ifdef CYGSEM_REDBOOT_ELF
+//
+// Support function - used to read bytes into a buffer
+// Returns the number of bytes read (stops short on errors)
+//
+static int
+_read(int (*getc)(void), unsigned char *buf, int len)
+{
+ int total = 0;
+ int ch;
+ while (len-- > 0) {
+ ch = (*getc)();
+ if (ch < 0) {
+ // EOF or error
+ break;
+ }
+ *buf++ = ch;
+ total++;
+ }
+ return total;
+}
+#endif
+
+//
+// Load an ELF [binary] image
+//
+static unsigned long
+load_elf_image(getc_t getc, unsigned long base)
+{
+#ifdef CYGSEM_REDBOOT_ELF
+ Elf32_Ehdr ehdr;
+#define MAX_PHDR 8
+ Elf32_Phdr phdr[MAX_PHDR];
+ unsigned long offset = 0;
+ int phx, len, ch;
+ unsigned char *addr;
+ unsigned long addr_offset = 0;
+ unsigned long highest_address = 0;
+ unsigned long lowest_address = 0xFFFFFFFF;
+ unsigned char *SHORT_DATA = "Short data reading ELF file\n";
+
+ // Read the header
+ if (_read(getc, (unsigned char *)&ehdr, sizeof(ehdr)) != sizeof(ehdr)) {
+ diag_printf("Can't read ELF header\n");
+ return 0;
+ }
+ offset += sizeof(ehdr);
+#if 0 // DEBUG
+ diag_printf("Type: %d, Machine: %d, Version: %d, Entry: %p, PHoff: %p/%d/%d, SHoff: %p/%d/%d\n",
+ ehdr.e_type, ehdr.e_machine, ehdr.e_version, ehdr.e_entry,
+ ehdr.e_phoff, ehdr.e_phentsize, ehdr.e_phnum,
+ ehdr.e_shoff, ehdr.e_shentsize, ehdr.e_shnum);
+#endif
+ if (ehdr.e_type != ET_EXEC) {
+ diag_printf("Only absolute ELF images supported\n");
+ return 0;
+ }
+ if (ehdr.e_phnum > MAX_PHDR) {
+ diag_printf("Too many program headers\n");
+ return 0;
+ }
+ while (offset < ehdr.e_phoff) {
+ if ((*getc)() < 0) {
+ diag_printf(SHORT_DATA);
+ return 0;
+ }
+ offset++;
+ }
+ for (phx = 0; phx < ehdr.e_phnum; phx++) {
+ if (_read(getc, (unsigned char *)&phdr[phx], sizeof(phdr[0])) != sizeof(phdr[0])) {
+ diag_printf("Can't read ELF program header\n");
+ return 0;
+ }
+#if 0 // DEBUG
+ diag_printf("Program header: type: %d, off: %p, va: %p, pa: %p, len: %d/%d, flags: %d\n",
+ phdr[phx].p_type, phdr[phx].p_offset, phdr[phx].p_vaddr, phdr[phx].p_paddr,
+ phdr[phx].p_filesz, phdr[phx].p_memsz, phdr[phx].p_flags);
+#endif
+ offset += sizeof(phdr[0]);
+ }
+ if (base) {
+ // Set address offset based on lowest address in file.
+ addr_offset = 0xFFFFFFFF;
+ for (phx = 0; phx < ehdr.e_phnum; phx++) {
+#ifdef CYGOPT_REDBOOT_ELF_VIRTUAL_ADDRESS
+ if ((phdr[phx].p_type == PT_LOAD) && (phdr[phx].p_vaddr < addr_offset)) {
+ addr_offset = phdr[phx].p_vaddr;
+#else
+ if ((phdr[phx].p_type == PT_LOAD) && (phdr[phx].p_paddr < addr_offset)) {
+ addr_offset = phdr[phx].p_paddr;
+#endif
+ }
+ }
+ addr_offset = (unsigned long)base - addr_offset;
+ } else {
+ addr_offset = 0;
+ }
+ for (phx = 0; phx < ehdr.e_phnum; phx++) {
+ if (phdr[phx].p_type == PT_LOAD) {
+ // Loadable segment
+#ifdef CYGOPT_REDBOOT_ELF_VIRTUAL_ADDRESS
+ addr = (unsigned char *)phdr[phx].p_vaddr;
+#else
+ addr = (unsigned char *)phdr[phx].p_paddr;
+#endif
+ len = phdr[phx].p_filesz;
+ if ((unsigned long)addr < lowest_address) {
+ lowest_address = (unsigned long)addr;
+ }
+ addr += addr_offset;
+ if (offset > phdr[phx].p_offset) {
+ if ((phdr[phx].p_offset + len) < offset) {
+ diag_printf("Can't load ELF file - program headers out of order\n");
+ return 0;
+ }
+ addr += offset - phdr[phx].p_offset;
+ } else {
+ while (offset < phdr[phx].p_offset) {
+ if ((*getc)() < 0) {
+ diag_printf(SHORT_DATA);
+ return 0;
+ }
+ offset++;
+ }
+ }
+
+ // Copy data into memory
+ while (len-- > 0) {
+#ifdef CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS
+ if (!valid_address(addr)) {
+ redboot_getc_terminate(true);
+ diag_printf("*** Abort! Attempt to load ELF data to address: %p which is not in RAM\n", (void*)addr);
+ return 0;
+ }
+#endif
+ if ((ch = (*getc)()) < 0) {
+ diag_printf(SHORT_DATA);
+ return 0;
+ }
+ *addr++ = ch;
+ offset++;
+ if ((unsigned long)(addr-addr_offset) > highest_address) {
+ highest_address = (unsigned long)(addr - addr_offset);
+ }
+ }
+ }
+ }
+
+ // Save load base/top and entry
+ if (base) {
+ load_address = base;
+ load_address_end = base + (highest_address - lowest_address);
+ entry_address = base + (ehdr.e_entry - lowest_address);
+ } else {
+ load_address = lowest_address;
+ load_address_end = highest_address;
+ entry_address = ehdr.e_entry;
+ }
+
+ redboot_getc_terminate(false);
+ if (addr_offset) diag_printf("Address offset = %p\n", (void *)addr_offset);
+ diag_printf("Entry point: %p, address range: %p-%p\n",
+ (void*)entry_address, (void *)load_address, (void *)load_address_end);
+ return 1;
+#else // CYGSEM_REDBOOT_ELF
+ diag_printf("Loading ELF images not supported\n");
+ return 0;
+#endif // CYGSEM_REDBOOT_ELF
+}
+
+
+//
+// Scan a string of hex bytes and update the checksum
+//
+static long
+_hex2(int (*getc)(void), int len, long *sum)
+{
+ int val, byte;
+ char c1, c2;
+
+ val = 0;
+ while (len-- > 0) {
+ c1 = (*getc)();
+ c2 = (*getc)();
+ if (_is_hex(c1) && _is_hex(c2)) {
+ val <<= 8;
+ byte = (_from_hex(c1)<<4) | _from_hex(c2);
+ val |= byte;
+ if (sum) {
+ *sum += byte;
+ }
+ } else {
+ return (-1);
+ }
+ }
+ return (val);
+}
+
+//
+// Process a set of S-records, loading the contents into memory.
+// Note: if a "base" value is provided, the data will be relocated
+// relative to that location. Of course, this can only work for
+// the first section of the data, so if there are non-contiguous
+// pieces of data, they will end up relocated in the same fashion.
+// Because of this, "base" probably only makes sense for a set of
+// data which has only one section, e.g. a ROM image.
+//
+static unsigned long
+load_srec_image(getc_t getc, unsigned long base)
+{
+ int c;
+ long offset = 0, count, sum, val, cksum;
+ unsigned char *addr, *base_addr;
+ char type;
+ bool first_addr = true;
+ unsigned long addr_offset = 0;
+ unsigned long highest_address = 0;
+ unsigned long lowest_address = 0xFFFFFFFF;
+
+ while ((c = (*getc)()) > 0) {
+ // Start of line
+ if (c != 'S') {
+ redboot_getc_terminate(true);
+ diag_printf("Invalid S-record at offset %p, input: %c\n",
+ (void *)offset, c);
+ return 0;
+ }
+ type = (*getc)();
+ offset += 2;
+ sum = 0;
+ if ((count = _hex2(getc, 1, &sum)) < 0) {
+ redboot_getc_terminate(true);
+ diag_printf("Bad S-record count at offset %p\n", (void *)offset);
+ return 0;
+ }
+ offset += 1;
+ switch (type) {
+ case '0':
+ break;
+ case '1':
+ case '2':
+ case '3':
+ base_addr = addr = (unsigned char *)_hex2(getc, (type-'1'+2), &sum);
+ offset += (type-'1'+2);
+ if (first_addr) {
+ if (base) {
+ addr_offset = (unsigned long)base - (unsigned long)addr;
+ } else {
+ addr_offset = 0;
+ }
+ first_addr = false;
+ }
+ addr += addr_offset;
+ if ((unsigned long)(addr-addr_offset) < lowest_address) {
+ lowest_address = (unsigned long)(addr - addr_offset);
+ }
+#ifdef CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS
+ if (!valid_address(addr)) {
+ // Only if there is no need to stop the download before printing
+ // output can we ask confirmation questions.
+ redboot_getc_terminate(true);
+ diag_printf("*** Abort! Attempt to load S-record to address: %p, which is not in RAM\n",(void*)addr);
+ return 0;
+ }
+#endif
+ count -= ((type-'1'+2)+1);
+ offset += count;
+ while (count-- > 0) {
+ val = _hex2(getc, 1, &sum);
+ *addr++ = val;
+ }
+ cksum = _hex2(getc, 1, 0);
+ offset += 1;
+ sum = sum & 0xFF;
+ cksum = (~cksum & 0xFF);
+ if (cksum != sum) {
+ redboot_getc_terminate(true);
+ diag_printf("*** Warning! Checksum failure - Addr: %lx, %02lX <> %02lX\n",
+ (unsigned long)base_addr, sum, cksum);
+ return 0;
+ }
+ if ((unsigned long)(addr-addr_offset) > highest_address) {
+ highest_address = (unsigned long)(addr - addr_offset);
+ }
+ break;
+ case '7':
+ case '8':
+ case '9':
+ addr = (unsigned char *)_hex2(getc, ('9'-type+2), &sum);
+ offset += ('9'-type+2);
+ // Save load base/top, entry address
+ if (base) {
+ load_address = base;
+ load_address_end = base + (highest_address - lowest_address);
+ entry_address = (unsigned long)(base + (addr - lowest_address));
+ } else {
+ load_address = lowest_address;
+ load_address_end = highest_address;
+ entry_address = (unsigned long)addr;
+ }
+ redboot_getc_terminate(false);
+ if (addr_offset) diag_printf("Address offset = %p\n", (void *)addr_offset);
+ diag_printf("Entry point: %p, address range: %p-%p\n",
+ (void*)entry_address, (void *)load_address, (void *)load_address_end);
+
+ return load_address_end;
+ default:
+ redboot_getc_terminate(true);
+ diag_printf("Invalid S-record at offset 0x%lx, type: %x\n",
+ (unsigned long)offset, type);
+ return 0;
+ }
+ while ((c = (*getc)()) != '\n') offset++;
+ }
+ return 0;
+}
+
+//
+// 'load' CLI command processing
+// -b - specify a load [base] address
+// -m - specify an I/O stream/method
+// -c - Alternate serial I/O channel
+#ifdef CYGBLD_BUILD_REDBOOT_WITH_ZLIB
+// -d - Decompress data [packed via 'zlib']
+#endif
+//
+void
+do_load(int argc, char *argv[])
+{
+ int res, num_options;
+ int i, err;
+ bool verbose, raw;
+ bool base_addr_set, mode_str_set;
+ char *mode_str;
+#ifdef CYGPKG_REDBOOT_NETWORKING
+ struct sockaddr_in host;
+ bool hostname_set, port_set;
+ unsigned int port; // int because it's an OPTION_ARG_TYPE_NUM,
+ // but will be cast to short
+ char *hostname;
+#endif
+ bool decompress = false;
+ int chan = -1;
+#if CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS > 1
+ bool chan_set;
+#endif
+ unsigned long base = 0;
+ unsigned long end = 0;
+ char type[4];
+ char *filename = 0;
+ struct option_info opts[8];
+ connection_info_t info;
+ getc_io_funcs_t *io = NULL;
+ struct load_io_entry *io_tab;
+#ifdef CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS
+ bool spillover_ok = false;
+#endif
+
+#ifdef CYGPKG_REDBOOT_NETWORKING
+ memset((char *)&host, 0, sizeof(host));
+ host.sin_len = sizeof(host);
+ host.sin_family = AF_INET;
+ host.sin_addr = my_bootp_info.bp_siaddr;
+ host.sin_port = 0;
+#endif
+
+ init_opts(&opts[0], 'v', false, OPTION_ARG_TYPE_FLG,
+ (void *)&verbose, 0, "verbose");
+ init_opts(&opts[1], 'r', false, OPTION_ARG_TYPE_FLG,
+ (void *)&raw, 0, "load raw data");
+ init_opts(&opts[2], 'b', true, OPTION_ARG_TYPE_NUM,
+ (void *)&base, (bool *)&base_addr_set, "load address");
+ init_opts(&opts[3], 'm', true, OPTION_ARG_TYPE_STR,
+ (void *)&mode_str, (bool *)&mode_str_set, "download mode (TFTP, xyzMODEM, or disk)");
+ num_options = 4;
+#if CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS > 1
+ init_opts(&opts[num_options], 'c', true, OPTION_ARG_TYPE_NUM,
+ (void *)&chan, (bool *)&chan_set, "I/O channel");
+ num_options++;
+#endif
+#ifdef CYGPKG_REDBOOT_NETWORKING
+ init_opts(&opts[num_options], 'h', true, OPTION_ARG_TYPE_STR,
+ (void *)&hostname, (bool *)&hostname_set, "host name or IP address");
+ num_options++;
+ init_opts(&opts[num_options], 'p', true, OPTION_ARG_TYPE_NUM,
+ (void *)&port, (bool *)&port_set, "TCP port");
+ num_options++;
+#endif
+#ifdef CYGBLD_BUILD_REDBOOT_WITH_ZLIB
+ init_opts(&opts[num_options], 'd', false, OPTION_ARG_TYPE_FLG,
+ (void *)&decompress, 0, "decompress");
+ num_options++;
+#endif
+
+ CYG_ASSERT(num_options <= NUM_ELEMS(opts), "Too many options");
+
+ if (!scan_opts(argc, argv, 1, opts, num_options,
+ (void *)&filename, OPTION_ARG_TYPE_STR, "file name")) {
+ return;
+ }
+#ifdef CYGPKG_REDBOOT_NETWORKING
+ if (hostname_set) {
+ ip_route_t rt;
+ if (!_gethostbyname(hostname, (in_addr_t *)&host)) {
+ diag_printf("Invalid host: %s\n", hostname);
+ return;
+ }
+ /* check that the host can be accessed */
+ if (__arp_lookup((ip_addr_t *)&host.sin_addr, &rt) < 0) {
+ diag_printf("Unable to reach host %s (%s)\n",
+ hostname, inet_ntoa((in_addr_t *)&host));
+ return;
+ }
+ }
+ if (port_set)
+ host.sin_port = port;
+#endif
+ if (chan >= CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS) {
+ diag_printf("Invalid I/O channel: %d\n", chan);
+ return;
+ }
+ if (mode_str_set) {
+ for (io_tab = __RedBoot_LOAD_TAB__;
+ io_tab != &__RedBoot_LOAD_TAB_END__; io_tab++) {
+ if (strncasecmp(&mode_str[0], io_tab->name, strlen(&mode_str[0])) == 0) {
+ io = io_tab->funcs;
+ break;
+ }
+ }
+ if (!io) {
+ diag_printf("Invalid 'mode': %s. Valid modes are:", mode_str);
+ for (io_tab = __RedBoot_LOAD_TAB__;
+ io_tab != &__RedBoot_LOAD_TAB_END__; io_tab++) {
+ diag_printf(" %s", io_tab->name);
+ }
+ diag_printf("\n");
+ }
+ if (!io) {
+ return;
+ }
+ verbose &= io_tab->can_verbose;
+ if (io_tab->need_filename && !filename) {
+ diag_printf("File name required\n");
+ diag_printf("usage: load %s\n", usage);
+ return;
+ }
+ } else {
+ char *which;
+ io_tab = (struct load_io_entry *)NULL; // Default
+#ifdef CYGPKG_REDBOOT_NETWORKING
+#ifdef CYGSEM_REDBOOT_NET_TFTP_DOWNLOAD
+ which = "TFTP";
+ io = &tftp_io;
+#elif defined(CYGSEM_REDBOOT_NET_HTTP_DOWNLOAD)
+ which = "HTTP";
+ io = &http_io;
+#endif
+#endif
+#ifdef CYGPKG_REDBOOT_FILEIO
+ // Make file I/O default if mounted
+ if (fileio_mounted) {
+ which = "file";
+ io = &fileio_io;
+ }
+#endif
+ if (!io) {
+#ifdef CYGBLD_BUILD_REDBOOT_WITH_XYZMODEM
+ which = "Xmodem";
+ io = &xyzModem_io;
+ verbose = false;
+#else
+ diag_printf("No default protocol!\n");
+ return;
+#endif
+ }
+ diag_printf("Using default protocol (%s)\n", which);
+ }
+#ifdef CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS
+ if (base_addr_set && !valid_address((unsigned char *)base)) {
+ if (!verify_action("Specified address (%p) is not believed to be in RAM", (void*)base))
+ return;
+ spillover_ok = true;
+ }
+#endif
+ if (raw && !base_addr_set) {
+ diag_printf("Raw load requires a memory address\n");
+ return;
+ }
+ info.filename = filename;
+ info.chan = chan;
+ info.mode = io_tab ? io_tab->mode : 0;
+#ifdef CYGPKG_REDBOOT_NETWORKING
+ info.server = &host;
+#endif
+ res = redboot_getc_init(&info, io, verbose, decompress);
+ if (res < 0) {
+ return;
+ }
+
+ // Stream open, process the data
+ if (raw) {
+ unsigned char *mp = (unsigned char *)base;
+ err = 0;
+ while ((res = redboot_getc()) >= 0) {
+#ifdef CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS
+ if (!valid_address(mp) && !spillover_ok) {
+ // Only if there is no need to stop the download
+ // before printing output can we ask confirmation
+ // questions.
+ redboot_getc_terminate(true);
+ diag_printf("*** Abort! RAW data spills over limit of user RAM at %p\n",(void*)mp);
+ err = -1;
+ break;
+ }
+#endif
+ *mp++ = res;
+ }
+ end = (unsigned long) mp;
+
+ // Save load base/top
+ load_address = base;
+ load_address_end = end;
+ entry_address = base; // best guess
+
+ redboot_getc_terminate(false);
+ if (0 == err)
+ diag_printf("Raw file loaded %p-%p, assumed entry at %p\n",
+ (void *)base, (void *)(end - 1), (void*)base);
+ } else {
+ // Read initial header - to determine file [image] type
+ for (i = 0; i < sizeof(type); i++) {
+ if ((res = redboot_getc()) < 0) {
+ err = getc_info.err;
+ break;
+ }
+ type[i] = res;
+ }
+ if (res >= 0) {
+ redboot_getc_rewind(); // Restore header to stream
+ // Treat data as some sort of executable image
+ if (strncmp(&type[1], "ELF", 3) == 0) {
+ end = load_elf_image(redboot_getc, base);
+ } else if ((type[0] == 'S') &&
+ ((type[1] >= '0') && (type[1] <= '9'))) {
+ end = load_srec_image(redboot_getc, base);
+ } else {
+ redboot_getc_terminate(true);
+ diag_printf("Unrecognized image type: 0x%lx\n", *(unsigned long *)type);
+ }
+ }
+ }
+
+ redboot_getc_close(); // Clean up
+ return;
+}
diff --git a/cesar/ecos/packages/redboot/current/src/main.c b/cesar/ecos/packages/redboot/current/src/main.c
new file mode 100644
index 0000000000..28fc2f558a
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/main.c
@@ -0,0 +1,758 @@
+//==========================================================================
+//
+// main.c
+//
+// RedBoot main routine
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas, tkoeller
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#define DEFINE_VARS
+#include <redboot.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_if.h>
+#include <cyg/hal/hal_cache.h>
+#include CYGHWR_MEMORY_LAYOUT_H
+
+#ifdef CYGPKG_IO_ETH_DRIVERS
+#include <cyg/io/eth/eth_drv.h> // Logical driver interfaces
+#endif
+
+#include <cyg/hal/hal_tables.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+#include <cyg/infra/cyg_type.h>
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+#ifdef CYGBLD_HAL_PLATFORM_STUB_H
+#include CYGBLD_HAL_PLATFORM_STUB_H
+#else
+#include <cyg/hal/plf_stub.h>
+#endif
+// GDB interfaces
+extern void breakpoint(void);
+#endif
+
+// Builtin Self Test (BIST)
+externC void bist(void);
+
+// Path to code run from a go command or to GDB stubs
+static void trampoline(unsigned long entry);
+
+// Return path for code run from a go command or for GDB stubs
+static void return_to_redboot(int status);
+
+// Address of area where current context is saved before executing
+// trampoline procedure
+static void * saved_context;
+
+// Status returned after trampoline execution
+static int return_status;
+
+
+// CLI command processing (defined in this file)
+RedBoot_cmd("version",
+ "Display RedBoot version information",
+ "",
+ do_version
+ );
+RedBoot_cmd("help",
+ "Help about help?",
+ "[<topic>]",
+ do_help
+ );
+
+static char go_usage[] = "[-w <timeout>] [-c] "
+#ifdef CYGPKG_IO_ETH_DRIVERS
+ "[-n] "
+#endif
+ "[entry]";
+
+RedBoot_cmd("go",
+ "Execute code at a location",
+ go_usage,
+ do_go
+ );
+#ifdef HAL_PLATFORM_RESET
+RedBoot_cmd("reset",
+ "Reset the system",
+ "",
+ do_reset
+ );
+#endif
+#ifdef CYGSEM_REDBOOT_VARIABLE_BAUD_RATE
+RedBoot_cmd("baudrate",
+ "Set/Query the system console baud rate",
+ "[-b <rate>]",
+ do_baud_rate
+ );
+#endif
+
+// Define table boundaries
+CYG_HAL_TABLE_BEGIN( __RedBoot_INIT_TAB__, RedBoot_inits );
+CYG_HAL_TABLE_END( __RedBoot_INIT_TAB_END__, RedBoot_inits );
+extern struct init_tab_entry __RedBoot_INIT_TAB__[], __RedBoot_INIT_TAB_END__;
+
+CYG_HAL_TABLE_BEGIN( __RedBoot_CMD_TAB__, RedBoot_commands );
+CYG_HAL_TABLE_END( __RedBoot_CMD_TAB_END__, RedBoot_commands );
+extern struct cmd __RedBoot_CMD_TAB__[], __RedBoot_CMD_TAB_END__;
+
+CYG_HAL_TABLE_BEGIN( __RedBoot_IDLE_TAB__, RedBoot_idle );
+CYG_HAL_TABLE_END( __RedBoot_IDLE_TAB_END__, RedBoot_idle );
+extern struct idle_tab_entry __RedBoot_IDLE_TAB__[], __RedBoot_IDLE_TAB_END__;
+
+#ifdef HAL_ARCH_PROGRAM_NEW_STACK
+extern void HAL_ARCH_PROGRAM_NEW_STACK(void *fun);
+#endif
+
+//
+// [Null] Builtin [Power On] Self Test
+//
+void bist(void) CYGBLD_ATTRIB_WEAK;
+
+void
+bist(void)
+{
+}
+
+//
+// 'version' command
+//
+void
+do_version(int argc, char *argv[])
+{
+#if CYGBLD_REDBOOT_MAX_MEM_SEGMENTS > 1
+ int seg;
+#endif
+#ifdef CYGPKG_REDBOOT_FLASH
+ externC void _flash_info(void);
+#endif
+ char *version = CYGACC_CALL_IF_MONITOR_VERSION();
+
+ diag_printf(version);
+#ifdef HAL_PLATFORM_CPU
+ diag_printf("Platform: %s (%s) %s\n", HAL_PLATFORM_BOARD, HAL_PLATFORM_CPU, HAL_PLATFORM_EXTRA);
+#endif
+ diag_printf("Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.\n\n");
+ diag_printf("RAM: %p-%p, ", (void*)ram_start, (void*)ram_end);
+ diag_printf("[%p-%p]", mem_segments[0].start, mem_segments[0].end);
+ diag_printf(" available\n");
+#if CYGBLD_REDBOOT_MAX_MEM_SEGMENTS > 1
+ for (seg = 1; seg < CYGBLD_REDBOOT_MAX_MEM_SEGMENTS; seg++) {
+ if (mem_segments[seg].start != NO_MEMORY) {
+ diag_printf(" %p-%p, ", mem_segments[seg].start, mem_segments[seg].end);
+ diag_printf("[%p-%p]", mem_segments[seg].start, mem_segments[seg].end);
+ diag_printf(" available\n");
+ }
+ }
+#endif
+#ifdef CYGPKG_REDBOOT_FLASH
+ _flash_info();
+#endif
+}
+
+//
+// This function is called when RedBoot is idle (waiting for user
+// input). It will call any registered "idle" routines, e.g. scan
+// for incoming network connections, blank an LCD screen, etc.
+//
+void
+do_idle(bool is_idle)
+{
+ struct idle_tab_entry *idle_entry;
+
+ for (idle_entry = __RedBoot_IDLE_TAB__;
+ idle_entry != &__RedBoot_IDLE_TAB_END__; idle_entry++) {
+ (*idle_entry->fun)(is_idle);
+ }
+}
+
+// Wrapper used by diag_printf()
+static void
+_mon_write_char(char c, void **param)
+{
+ if (c == '\n') {
+ mon_write_char('\r');
+ }
+ mon_write_char(c);
+}
+
+//
+// Handle illegal memory accesses (and other abort conditions)
+//
+static hal_jmp_buf error_jmpbuf;
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+externC
+#endif
+ void* volatile __mem_fault_handler;
+
+static void error_handler(void)
+{
+ hal_longjmp(error_jmpbuf, 1);
+}
+
+
+//
+// This is the main entry point for RedBoot
+//
+
+void
+cyg_start(void)
+{
+ int res = 0;
+ bool prompt = true;
+ static char line[CYGPKG_REDBOOT_MAX_CMD_LINE];
+ char *command;
+ struct cmd *cmd;
+ int cur;
+ struct init_tab_entry *init_entry;
+ extern char RedBoot_version[];
+#if CYGBLD_REDBOOT_MAX_MEM_SEGMENTS > 1
+ int seg;
+#endif
+
+ // Export version information
+ CYGACC_CALL_IF_MONITOR_VERSION_SET(RedBoot_version);
+
+ CYGACC_CALL_IF_MONITOR_RETURN_SET(return_to_redboot);
+
+ // Make sure the channels are properly initialized.
+ diag_init_putc(_mon_write_char);
+ hal_if_diag_init();
+
+ // Force console to output raw text - but remember the old setting
+ // so it can be restored if interaction with a debugger is
+ // required.
+ cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL);
+#ifdef CYGPKG_REDBOOT_ANY_CONSOLE
+ console_selected = false;
+#endif
+ console_echo = true;
+ CYGACC_CALL_IF_DELAY_US((cyg_int32)2*100000);
+
+ ram_start = (unsigned char *)CYGMEM_REGION_ram;
+ ram_end = (unsigned char *)(CYGMEM_REGION_ram+CYGMEM_REGION_ram_SIZE);
+#ifdef HAL_MEM_REAL_REGION_TOP
+ {
+ unsigned char *ram_end_tmp = ram_end;
+ ram_end = HAL_MEM_REAL_REGION_TOP( ram_end_tmp );
+ }
+#endif
+#ifdef CYGMEM_SECTION_heap1
+ workspace_start = (unsigned char *)CYGMEM_SECTION_heap1;
+ workspace_end = (unsigned char *)(CYGMEM_SECTION_heap1+CYGMEM_SECTION_heap1_SIZE);
+#else
+ workspace_start = (unsigned char *)CYGMEM_REGION_ram;
+ workspace_end = (unsigned char *)(CYGMEM_REGION_ram+CYGMEM_REGION_ram_SIZE);
+#endif
+
+ if ( ram_end < workspace_end ) {
+ // when *less* SDRAM is installed than the possible maximum,
+ // but the heap1 region remains greater...
+ workspace_end = ram_end;
+ }
+
+ // Nothing has ever been loaded into memory
+ entry_address = (unsigned long)NO_MEMORY;
+
+ bist();
+
+#if defined(CYGPRI_REDBOOT_ZLIB_FLASH) && defined(CYGOPT_REDBOOT_FIS_ZLIB_COMMON_BUFFER)
+ fis_zlib_common_buffer =
+ workspace_end -= CYGNUM_REDBOOT_FIS_ZLIB_COMMON_BUFFER_SIZE;
+#endif
+
+#ifdef CYGFUN_REDBOOT_BOOT_SCRIPT
+ script_timeout = CYGNUM_REDBOOT_BOOT_SCRIPT_DEFAULT_TIMEOUT;
+#endif
+
+ for (init_entry = __RedBoot_INIT_TAB__; init_entry != &__RedBoot_INIT_TAB_END__; init_entry++) {
+ (*init_entry->fun)();
+ }
+
+ mem_segments[0].start = workspace_start;
+ mem_segments[0].end = workspace_end;
+#if CYGBLD_REDBOOT_MAX_MEM_SEGMENTS > 1
+ for (seg = 1; seg < CYGBLD_REDBOOT_MAX_MEM_SEGMENTS; seg++) {
+ cyg_plf_memory_segment(seg, &mem_segments[seg].start, &mem_segments[seg].end);
+ }
+#endif
+
+#ifdef CYGSEM_REDBOOT_PLF_STARTUP
+
+ cyg_plf_redboot_startup();
+#endif
+ do_version(0,0);
+
+#ifdef CYGFUN_REDBOOT_BOOT_SCRIPT
+# ifdef CYGDAT_REDBOOT_DEFAULT_BOOT_SCRIPT
+ if (!script) {
+ script = CYGDAT_REDBOOT_DEFAULT_BOOT_SCRIPT;
+ }
+# endif
+ if (script) {
+ // Give the guy a chance to abort any boot script
+ unsigned char *hold_script = script;
+ int script_timeout_ms = script_timeout * CYGNUM_REDBOOT_BOOT_SCRIPT_TIMEOUT_RESOLUTION;
+ diag_printf("== Executing boot script in %d.%03d seconds - enter ^C to abort\n",
+ script_timeout_ms/1000, script_timeout_ms%1000);
+ script = (unsigned char *)0;
+ res = _GETS_CTRLC; // Treat 0 timeout as ^C
+ while (script_timeout_ms >= CYGNUM_REDBOOT_CLI_IDLE_TIMEOUT) {
+ res = _rb_gets(line, sizeof(line), CYGNUM_REDBOOT_CLI_IDLE_TIMEOUT);
+ if (res >= _GETS_OK) {
+ diag_printf("== Executing boot script in %d.%03d seconds - enter ^C to abort\n",
+ script_timeout_ms/1000, script_timeout_ms%1000);
+ continue; // Ignore anything but ^C
+ }
+ if (res != _GETS_TIMEOUT) break;
+ script_timeout_ms -= CYGNUM_REDBOOT_CLI_IDLE_TIMEOUT;
+ }
+ if (res == _GETS_CTRLC) {
+ script = (unsigned char *)0; // Disable script
+ } else {
+ script = hold_script; // Re-enable script
+ }
+ }
+#endif
+
+ while (true) {
+ if (prompt) {
+ diag_printf("RedBoot> ");
+ prompt = false;
+ }
+#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0
+ cmd_history = true; // Enable history collection
+#endif
+ res = _rb_gets(line, sizeof(line), CYGNUM_REDBOOT_CLI_IDLE_TIMEOUT);
+#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0
+ cmd_history = false; // Enable history collection
+#endif
+ if (res == _GETS_TIMEOUT) {
+ // No input arrived
+ } else {
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+ if (res == _GETS_GDB) {
+ int dbgchan;
+ hal_virtual_comm_table_t *__chan;
+ int i;
+ // Special case of '$' - need to start GDB protocol
+ gdb_active = true;
+ // Mask interrupts on all channels
+ for (i = 0; i < CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS; i++) {
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(i);
+ __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+ CYGACC_COMM_IF_CONTROL( *__chan, __COMMCTL_IRQ_DISABLE );
+ }
+
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
+
+ // set up a temporary context that will take us to the trampoline
+ HAL_THREAD_INIT_CONTEXT((CYG_ADDRWORD)workspace_end,
+ breakpoint, trampoline,0);
+
+ // switch context to trampoline (get GDB stubs started)
+ HAL_THREAD_SWITCH_CONTEXT(&saved_context, &workspace_end);
+
+ gdb_active = false;
+
+ dbgchan = CYGACC_CALL_IF_SET_DEBUG_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(dbgchan);
+ } else
+#endif // CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+ {
+ expand_aliases(line, sizeof(line));
+ command = (char *)&line;
+ if ((*command == '#') || (*command == '=')) {
+ // Special cases
+ if (*command == '=') {
+ // Print line on console
+ diag_printf("%s\n", &line[2]);
+ }
+ } else {
+ while (strlen(command) > 0) {
+ if ((cmd = parse(&command, &argc, &argv[0])) != (struct cmd *)0) {
+ // Try to handle aborts - messy because of the stack unwinding...
+ __mem_fault_handler = error_handler;
+ if (hal_setjmp(error_jmpbuf)) {
+ diag_printf("** command abort - illegal memory access?\n");
+ } else {
+ (cmd->fun)(argc, argv);
+ }
+ __mem_fault_handler = 0;
+ } else {
+ diag_printf("** Error: Illegal command: \"%s\"\n", argv[0]);
+ }
+ }
+ }
+ prompt = true;
+ }
+ }
+ }
+}
+
+void
+show_help(struct cmd *cmd, struct cmd *cmd_end, char *which, char *pre)
+{
+ bool show;
+ int len = 0;
+
+ if (which) {
+ len = strlen(which);
+ }
+ while (cmd != cmd_end) {
+ show = true;
+ if (which && (strncasecmp(which, cmd->str, len) != 0)) {
+ show = false;
+ }
+ if (show) {
+ diag_printf("%s\n %s %s %s\n", cmd->help, pre, cmd->str, cmd->usage);
+ if ((cmd->sub_cmds != (struct cmd *)0) && (which != (char *)0)) {
+ show_help(cmd->sub_cmds, cmd->sub_cmds_end, 0, cmd->str);
+ }
+ }
+ cmd++;
+ }
+}
+
+void
+do_help(int argc, char *argv[])
+{
+ struct cmd *cmd;
+ char *which = (char *)0;
+
+ if (!scan_opts(argc, argv, 1, 0, 0, (void *)&which, OPTION_ARG_TYPE_STR, "<topic>")) {
+ diag_printf("Invalid argument\n");
+ return;
+ }
+ cmd = __RedBoot_CMD_TAB__;
+ show_help(cmd, &__RedBoot_CMD_TAB_END__, which, "");
+ return;
+}
+
+static void
+trampoline(unsigned long entry)
+{
+ typedef void code_fun(void);
+ code_fun *fun = (code_fun *)entry;
+ unsigned long oldints;
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+
+#ifdef HAL_ARCH_PROGRAM_NEW_STACK
+ HAL_ARCH_PROGRAM_NEW_STACK(fun);
+#else
+ (*fun)();
+#endif
+
+ HAL_THREAD_LOAD_CONTEXT(&saved_context);
+}
+
+static void
+return_to_redboot(int status)
+{
+ CYGARC_HAL_SAVE_GP();
+
+ return_status = status;
+ HAL_THREAD_LOAD_CONTEXT(&saved_context);
+ // never returns
+
+ // need this to balance above CYGARC_HAL_SAVE_GP on
+ // some platforms. It will never run, though.
+ CYGARC_HAL_RESTORE_GP();
+}
+
+void
+do_go(int argc, char *argv[])
+{
+ int i, cur, num_options;
+ unsigned long entry;
+ unsigned long oldints;
+ bool wait_time_set;
+ int wait_time, res;
+ bool cache_enabled = false;
+#ifdef CYGPKG_IO_ETH_DRIVERS
+ bool stop_net = false;
+#endif
+ struct option_info opts[3];
+ char line[8];
+ hal_virtual_comm_table_t *__chan;
+
+ __mem_fault_handler = 0; // Let GDB handle any faults directly
+ entry = entry_address; // Default from last 'load' operation
+ init_opts(&opts[0], 'w', true, OPTION_ARG_TYPE_NUM,
+ (void *)&wait_time, (bool *)&wait_time_set, "wait timeout");
+ init_opts(&opts[1], 'c', false, OPTION_ARG_TYPE_FLG,
+ (void *)&cache_enabled, (bool *)0, "go with caches enabled");
+ num_options = 2;
+#ifdef CYGPKG_IO_ETH_DRIVERS
+ init_opts(&opts[2], 'n', false, OPTION_ARG_TYPE_FLG,
+ (void *)&stop_net, (bool *)0, "go with network driver stopped");
+ num_options++;
+#endif
+
+ CYG_ASSERT(num_options <= NUM_ELEMS(opts), "Too many options");
+
+ if (!scan_opts(argc, argv, 1, opts, num_options, (void *)&entry, OPTION_ARG_TYPE_NUM, "starting address"))
+ {
+ return;
+ }
+ if (entry == (unsigned long)NO_MEMORY) {
+ diag_printf("No entry point known - aborted\n");
+ return;
+ }
+ if (wait_time_set) {
+ int script_timeout_ms = wait_time * 1000;
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+ unsigned char *hold_script = script;
+ script = (unsigned char *)0;
+#endif
+ diag_printf("About to start execution at %p - abort with ^C within %d seconds\n",
+ (void *)entry, wait_time);
+ while (script_timeout_ms >= CYGNUM_REDBOOT_CLI_IDLE_TIMEOUT) {
+ res = _rb_gets(line, sizeof(line), CYGNUM_REDBOOT_CLI_IDLE_TIMEOUT);
+ if (res == _GETS_CTRLC) {
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+ script = hold_script; // Re-enable script
+#endif
+ return;
+ }
+ script_timeout_ms -= CYGNUM_REDBOOT_CLI_IDLE_TIMEOUT;
+ }
+ }
+
+ // Mask interrupts on all channels
+ cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+ for (i = 0; i < CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS; i++) {
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(i);
+ __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+ CYGACC_COMM_IF_CONTROL( *__chan, __COMMCTL_IRQ_DISABLE );
+ }
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
+
+ __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+ CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_ENABLE_LINE_FLUSH);
+
+#ifdef CYGPKG_IO_ETH_DRIVERS
+ if (stop_net)
+ eth_drv_stop();
+#endif
+
+ HAL_DISABLE_INTERRUPTS(oldints);
+ HAL_DCACHE_SYNC();
+ if (!cache_enabled) {
+ HAL_ICACHE_DISABLE();
+ HAL_DCACHE_DISABLE();
+ HAL_DCACHE_SYNC();
+ }
+ HAL_ICACHE_INVALIDATE_ALL();
+ HAL_DCACHE_INVALIDATE_ALL();
+ // set up a temporary context that will take us to the trampoline
+ HAL_THREAD_INIT_CONTEXT((CYG_ADDRWORD)workspace_end,
+ entry, trampoline, 0);
+
+ // switch context to trampoline
+ HAL_THREAD_SWITCH_CONTEXT(&saved_context, &workspace_end);
+
+ // we get back here by way of return_to_redboot()
+
+ // undo the changes we made before switching context
+ if (!cache_enabled) {
+ HAL_ICACHE_ENABLE();
+ HAL_DCACHE_ENABLE();
+ }
+
+ CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_DISABLE_LINE_FLUSH);
+
+ HAL_RESTORE_INTERRUPTS(oldints);
+
+ diag_printf("\nProgram completed with status %d\n", return_status);
+}
+
+#ifdef HAL_PLATFORM_RESET
+void
+do_reset(int argc, char *argv[])
+{
+ diag_printf("... Resetting.");
+ CYGACC_CALL_IF_DELAY_US(2*100000);
+ diag_printf("\n");
+ CYGACC_CALL_IF_RESET();
+ diag_printf("!! oops, RESET not working on this platform\n");
+}
+#endif
+
+#ifdef CYGSEM_REDBOOT_VARIABLE_BAUD_RATE
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+#include <flash_config.h>
+#endif
+
+static int
+set_comm_baud_rate(hal_virtual_comm_table_t *chan, int rate)
+{
+ int current_rate;
+
+ current_rate = CYGACC_COMM_IF_CONTROL(*chan, __COMMCTL_GETBAUD);
+ if (rate != current_rate)
+ return CYGACC_COMM_IF_CONTROL(*chan, __COMMCTL_SETBAUD, rate);
+
+ return 0;
+}
+
+int
+set_console_baud_rate(int rate)
+{
+ int ret = -1;
+#ifdef CYGPKG_REDBOOT_ANY_CONSOLE
+ if (!console_selected) {
+ int cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+ int i;
+ // Set baud for all channels
+ for (i = 0; i < CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS; i++) {
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(i);
+ ret = set_comm_baud_rate(CYGACC_CALL_IF_CONSOLE_PROCS(), rate);
+ if (ret < 0)
+ break;
+ }
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
+ } else
+#endif
+ ret = set_comm_baud_rate(CYGACC_CALL_IF_CONSOLE_PROCS(), rate);
+
+ if (ret < 0)
+ diag_printf("Setting console baud rate to %d failed\n", rate);
+
+ return ret;
+}
+
+static void
+_sleep(int ms)
+{
+ int i;
+ for (i = 0; i < ms; i++) {
+ CYGACC_CALL_IF_DELAY_US((cyg_int32)1000);
+ }
+}
+
+void
+do_baud_rate(int argc, char *argv[])
+{
+ int new_rate, ret, old_rate;
+ bool new_rate_set;
+ hal_virtual_comm_table_t *__chan;
+ struct option_info opts[1];
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+ struct config_option opt;
+#endif
+
+ init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM,
+ (void *)&new_rate, (bool *)&new_rate_set, "new baud rate");
+ if (!scan_opts(argc, argv, 1, opts, 1, 0, 0, "")) {
+ return;
+ }
+ __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+ if (new_rate_set) {
+ diag_printf("Baud rate will be changed to %d - update your settings\n", new_rate);
+ _sleep(500); // Give serial time to flush
+ old_rate = CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_GETBAUD);
+ ret = set_console_baud_rate(new_rate);
+ if (ret < 0) {
+ if (old_rate > 0) {
+ // Try to restore
+ set_console_baud_rate(old_rate);
+ _sleep(500); // Give serial time to flush
+ diag_printf("\nret = %d\n", ret);
+ }
+ return; // Couldn't set the desired rate
+ }
+ // Make sure this new rate works or back off to previous value
+ // Sleep for a few seconds, then prompt to see if it works
+ _sleep(3000); // Give serial time to flush
+ if (!verify_action_with_timeout(5000, "Baud rate changed to %d", new_rate)) {
+ _sleep(500); // Give serial time to flush
+ set_console_baud_rate(old_rate);
+ _sleep(500); // Give serial time to flush
+ return;
+ }
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+ opt.type = CONFIG_INT;
+ opt.enable = (char *)0;
+ opt.enable_sense = 1;
+ opt.key = "console_baud_rate";
+ opt.dflt = new_rate;
+ flash_add_config(&opt, true);
+#endif
+ } else {
+ ret = CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_GETBAUD);
+ diag_printf("Baud rate = ");
+ if (ret <= 0) {
+ diag_printf("unknown\n");
+ } else {
+ diag_printf("%d\n", ret);
+ }
+ }
+}
+#endif
+
+//
+// Validate an address to see if it is within any known RAM area
+//
+bool
+valid_address(unsigned char *addr)
+{
+ int seg;
+
+ for (seg = 0; seg < CYGBLD_REDBOOT_MAX_MEM_SEGMENTS; seg++) {
+ if (mem_segments[seg].start != NO_MEMORY) {
+ if ((addr >= mem_segments[seg].start) && (addr < mem_segments[seg].end)) {
+ return true;
+ }
+ }
+ }
+ return false;
+}
diff --git a/cesar/ecos/packages/redboot/current/src/mcmp.c b/cesar/ecos/packages/redboot/current/src/mcmp.c
new file mode 100644
index 0000000000..97f02770fc
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/mcmp.c
@@ -0,0 +1,135 @@
+//==========================================================================
+//
+// mcmp.c
+//
+// RedBoot memory compare (mcmp) routine
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2002-08-06
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+
+RedBoot_cmd("mcmp",
+ "Compare two blocks of memory",
+ "-s <location> -d <location> -l <length> [-1|-2|-4]",
+ do_mcmp
+ );
+
+void
+do_mcmp(int argc, char *argv[])
+{
+ // Fill a region of memory with a pattern
+ struct option_info opts[6];
+ unsigned long src_base, dst_base;
+ long len;
+ bool src_base_set, dst_base_set, len_set;
+ bool set_32bit, set_16bit, set_8bit;
+
+ init_opts(&opts[0], 's', true, OPTION_ARG_TYPE_NUM,
+ (void *)&src_base, (bool *)&src_base_set, "base address");
+ init_opts(&opts[1], 'l', true, OPTION_ARG_TYPE_NUM,
+ (void *)&len, (bool *)&len_set, "length");
+ init_opts(&opts[2], 'd', true, OPTION_ARG_TYPE_NUM,
+ (void *)&dst_base, (bool *)&dst_base_set, "base address");
+ init_opts(&opts[3], '4', false, OPTION_ARG_TYPE_FLG,
+ (void *)&set_32bit, (bool *)0, "fill 32 bit units");
+ init_opts(&opts[4], '2', false, OPTION_ARG_TYPE_FLG,
+ (void *)&set_16bit, (bool *)0, "fill 16 bit units");
+ init_opts(&opts[5], '1', false, OPTION_ARG_TYPE_FLG,
+ (void *)&set_8bit, (bool *)0, "fill 8 bit units");
+ if (!scan_opts(argc, argv, 1, opts, 6, 0, 0, "")) {
+ return;
+ }
+ if (!src_base_set || !dst_base_set || !len_set) {
+ diag_printf("usage: mcmp -s <addr> -d <addr> -l <length> [-1|-2|-4]\n");
+ return;
+ }
+
+
+
+ if (set_8bit) {
+ cyg_uint8 *s = (cyg_uint8 *)src_base;
+ cyg_uint8 *d = (cyg_uint8 *)dst_base;
+ while ((len -= sizeof(cyg_uint8)) >= 0) {
+ if (*s++ != *d++) {
+ s--;
+ d--;
+ diag_printf("Buffers don't match - %p=0x%02x, %p=0x%02x\n",
+ s, *s, d, *d);
+ return;
+ }
+
+ }
+ } else if (set_16bit) {
+ cyg_uint16 *s = (cyg_uint16 *)src_base;
+ cyg_uint16 *d = (cyg_uint16 *)dst_base;
+ while ((len -= sizeof(cyg_uint16)) >= 0) {
+ if (*s++ != *d++) {
+ s--;
+ d--;
+ diag_printf("Buffers don't match - %p=0x%04x, %p=0x%04x\n",
+ s, *s, d, *d);
+ return;
+ }
+
+ }
+ } else {
+ cyg_uint32 *s = (cyg_uint32 *)src_base;
+ cyg_uint32 *d = (cyg_uint32 *)dst_base;
+ while ((len -= sizeof(cyg_uint32)) >= 0) {
+ if (*s++ != *d++) {
+ s--;
+ d--;
+ diag_printf("Buffers don't match - %p=0x%08x, %p=0x%08x\n",
+ s, *s, d, *d);
+ return;
+ }
+ }
+ }
+}
diff --git a/cesar/ecos/packages/redboot/current/src/mcopy.c b/cesar/ecos/packages/redboot/current/src/mcopy.c
new file mode 100644
index 0000000000..d343f12d84
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/mcopy.c
@@ -0,0 +1,134 @@
+//==========================================================================
+//
+// mcopy.c
+//
+// RedBoot memory copy (mcopy) routine
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): msalter
+// Contributors: msalter
+// Date: 2003-07-01
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+
+static void
+do_mcopy(int argc, char *argv[])
+{
+ struct option_info opts[6];
+ unsigned long src, dst, len, end;
+ bool src_set, dst_set, len_set;
+ bool sz32, sz16, sz8;
+ int incr = 1;
+
+ init_opts(&opts[0], 's', true, OPTION_ARG_TYPE_NUM,
+ (void *)&src, (bool *)&src_set, "base address");
+ init_opts(&opts[1], 'l', true, OPTION_ARG_TYPE_NUM,
+ (void *)&len, (bool *)&len_set, "length");
+ init_opts(&opts[2], 'd', true, OPTION_ARG_TYPE_NUM,
+ (void *)&dst, (bool *)&dst_set, "base address");
+ init_opts(&opts[3], '4', false, OPTION_ARG_TYPE_FLG,
+ (void *)&sz32, (bool *)0, "copy 32 bit data");
+ init_opts(&opts[4], '2', false, OPTION_ARG_TYPE_FLG,
+ (void *)&sz16, (bool *)0, "copy 16 bit data");
+ init_opts(&opts[5], '1', false, OPTION_ARG_TYPE_FLG,
+ (void *)&sz8, (bool *)0, "copy 8 bit data");
+ if (!scan_opts(argc, argv, 1, opts, 6, 0, 0, "")) {
+ return;
+ }
+
+ // Must have src, dst, len. No more than one size specifier.
+ if (!src_set || !dst_set || !len_set || (sz32 + sz16 + sz8) > 1) {
+ diag_printf("usage: mcopy -s <addr> -d <addr> -l <length> [-1|-2|-4]\n");
+ return;
+ }
+
+ // adjust incr and len for data size
+ if (sz16) {
+ len = (len + 1) & ~1;
+ incr = 2;
+ } else if (sz32 || !sz8) {
+ len = (len + 3) & ~3;
+ incr = 4;
+ }
+
+ end = src + len;
+
+ // If overlapping areas, must copy backwards.
+ if (dst > src && dst < (src + len)) {
+ end = src - incr;
+ src += (len - incr);
+ dst += (len - incr);
+ incr = -incr;
+ }
+
+ if (sz8) {
+ while (src != end) {
+ *(cyg_uint8 *)dst = *(cyg_uint8 *)src;
+ src += incr;
+ dst += incr;
+ }
+ } else if (sz16) {
+ while (src != end) {
+ *(cyg_uint16 *)dst = *(cyg_uint16 *)src;
+ src += incr;
+ dst += incr;
+ }
+ } else {
+ // Default - 32 bits
+ while (src != end) {
+ *(cyg_uint32 *)dst = *(cyg_uint32 *)src;
+ src += incr;
+ dst += incr;
+ }
+ }
+}
+
+
+RedBoot_cmd("mcopy",
+ "Copy memory from one address to another",
+ "-s <location> -d <location> -l <length> [-1|-2|-4]",
+ do_mcopy
+ );
diff --git a/cesar/ecos/packages/redboot/current/src/mfill.c b/cesar/ecos/packages/redboot/current/src/mfill.c
new file mode 100644
index 0000000000..7f53353d1a
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/mfill.c
@@ -0,0 +1,113 @@
+//==========================================================================
+//
+// mfill.c
+//
+// RedBoot memory fill (mfill) routine
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2002-08-06
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+
+RedBoot_cmd("mfill",
+ "Fill a block of memory with a pattern",
+ "-b <location> -l <length> -p <pattern> [-1|-2|-4]",
+ do_mfill
+ );
+
+void
+do_mfill(int argc, char *argv[])
+{
+ // Fill a region of memory with a pattern
+ struct option_info opts[6];
+ unsigned long base, pat;
+ long len;
+ bool base_set, len_set, pat_set;
+ bool set_32bit, set_16bit, set_8bit;
+
+ init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM,
+ (void *)&base, (bool *)&base_set, "base address");
+ init_opts(&opts[1], 'l', true, OPTION_ARG_TYPE_NUM,
+ (void *)&len, (bool *)&len_set, "length");
+ init_opts(&opts[2], 'p', true, OPTION_ARG_TYPE_NUM,
+ (void *)&pat, (bool *)&pat_set, "pattern");
+ init_opts(&opts[3], '4', false, OPTION_ARG_TYPE_FLG,
+ (void *)&set_32bit, (bool *)0, "fill 32 bit units");
+ init_opts(&opts[4], '2', false, OPTION_ARG_TYPE_FLG,
+ (void *)&set_16bit, (bool *)0, "fill 16 bit units");
+ init_opts(&opts[5], '1', false, OPTION_ARG_TYPE_FLG,
+ (void *)&set_8bit, (bool *)0, "fill 8 bit units");
+ if (!scan_opts(argc, argv, 1, opts, 6, 0, 0, "")) {
+ return;
+ }
+ if (!base_set || !len_set) {
+ diag_printf("usage: mfill -b <addr> -l <length> [-p <pattern>] [-1|-2|-4]\n");
+ return;
+ }
+ if (!pat_set) {
+ pat = 0;
+ }
+ // No checks here
+
+ if (set_8bit) {
+ cyg_uint8 *p = (cyg_uint8 *)base;
+ while ((len -= sizeof(cyg_uint8)) >= 0)
+ *p++ = (cyg_uint8)pat;
+ } else if (set_16bit) {
+ cyg_uint16 *p = (cyg_uint16 *)base;
+ while ((len -= sizeof(cyg_uint16)) >= 0)
+ *p++ = (cyg_uint16)pat;
+ } else {
+ cyg_uint32 *p = (cyg_uint32 *)base;
+ while ((len -= sizeof(cyg_uint32)) >= 0)
+ *p++ = (cyg_uint32)pat;
+ }
+
+}
+
diff --git a/cesar/ecos/packages/redboot/current/src/misc_funs.c b/cesar/ecos/packages/redboot/current/src/misc_funs.c
new file mode 100644
index 0000000000..a4cda45529
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/misc_funs.c
@@ -0,0 +1,81 @@
+//==========================================================================
+//
+// misc_funs.c
+//
+// Miscellaneous [library] functions for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+
+int
+strcasecmp(const char *s1, const char *s2)
+{
+ char c1, c2;
+ while ((c1 = _tolower(*s1++)) == (c2 = _tolower(*s2++)))
+ if (c1 == 0)
+ return (0);
+ return ((unsigned char)c1 - (unsigned char)c2);
+}
+
+int
+strncasecmp(const char *s1, const char *s2, size_t len)
+{
+ char c1, c2;
+
+ if (len == 0)
+ return 0;
+ do {
+ if ((c1 = _tolower(*s1++)) != (c2 = _tolower(*s2++)))
+ return ((unsigned char)c1 - (unsigned char)c2);
+ if (c1 == 0)
+ break;
+ } while (--len != 0);
+ return 0;
+}
diff --git a/cesar/ecos/packages/redboot/current/src/net/arp.c b/cesar/ecos/packages/redboot/current/src/net/arp.c
new file mode 100644
index 0000000000..58b3fd2291
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/net/arp.c
@@ -0,0 +1,212 @@
+//==========================================================================
+//
+// net/arp.c
+//
+// Stand-alone ARP support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <net/net.h>
+
+static struct {
+ int waiting;
+ char *eth;
+ char *ip;
+} arp_req;
+
+/*
+ * Handle incoming ARP packets.
+ */
+void
+__arp_handler(pktbuf_t *pkt)
+{
+ arp_header_t *arp = pkt->arp_hdr;
+ int hw_type, protocol;
+
+ /*
+ * Only handle ethernet hardware and IP protocol.
+ */
+ protocol = ntohs(arp->protocol);
+ hw_type = ntohs(arp->hw_type);
+ if ((hw_type == ARP_HW_ETHER) && (protocol == ETH_TYPE_IP)) {
+ /*
+ * Handle requests for our ethernet address.
+ */
+ if (!memcmp(arp->target_ip, __local_ip_addr, 4)) {
+ if (ntohs(arp->opcode) == ARP_REQUEST) {
+ /* format response. */
+ arp->opcode = htons(ARP_REPLY);
+ memcpy(arp->target_ip, arp->sender_ip,
+ sizeof(ip_addr_t));
+ memcpy(arp->target_enet, arp->sender_enet,
+ sizeof(enet_addr_t));
+ memcpy(arp->sender_ip, __local_ip_addr,
+ sizeof(ip_addr_t));
+ memcpy(arp->sender_enet, __local_enet_addr,
+ sizeof(enet_addr_t));
+ pkt->pkt_bytes = sizeof(arp_header_t);
+ __enet_send(pkt, &arp->target_enet, ETH_TYPE_ARP);
+
+ } else if (ntohs(arp->opcode) == ARP_REPLY && arp_req.waiting) {
+ if (!memcmp(arp_req.ip, arp->sender_ip, sizeof(ip_addr_t))) {
+ memcpy(arp_req.eth, arp->sender_enet, sizeof(enet_addr_t));
+ arp_req.waiting = 0;
+ }
+ }
+ }
+ }
+ __pktbuf_free(pkt);
+}
+
+
+/*
+ * Find the ethernet address of the machine with the given
+ * ip address.
+ * Return 0 and fills in 'eth_addr' if successful,
+ * -1 if unsuccessful.
+ */
+int
+__arp_request(ip_addr_t *ip_addr, enet_addr_t *eth_addr, int allow_self)
+{
+ pktbuf_t *pkt;
+ arp_header_t *arp;
+ unsigned long retry_start;
+ enet_addr_t bcast_addr;
+ int retry;
+
+ if (!allow_self) {
+ // Special case request for self
+ if (!memcmp(ip_addr, __local_ip_addr, 4)) {
+ memcpy(eth_addr, __local_enet_addr, sizeof(enet_addr_t));
+ return 0;
+ }
+ }
+
+ /* just fail if can't get a buffer */
+ if ((pkt = __pktbuf_alloc(ARP_PKT_SIZE)) == NULL)
+ return -1;
+
+ arp = pkt->arp_hdr;
+ arp->opcode = htons(ARP_REQUEST);
+ arp->hw_type = htons(ARP_HW_ETHER);
+ arp->protocol = htons(0x800);
+ arp->hw_len = sizeof(enet_addr_t);
+ arp->proto_len = sizeof(ip_addr_t);
+
+ memcpy(arp->sender_ip, __local_ip_addr, sizeof(ip_addr_t));
+ memcpy(arp->sender_enet, __local_enet_addr, sizeof(enet_addr_t));
+ memcpy(arp->target_ip, ip_addr, sizeof(ip_addr_t));
+
+ bcast_addr[0] = 255;
+ bcast_addr[1] = 255;
+ bcast_addr[2] = 255;
+ bcast_addr[3] = 255;
+ bcast_addr[4] = 255;
+ bcast_addr[5] = 255;
+
+ arp_req.eth = (char *)eth_addr;
+ arp_req.ip = (char *)ip_addr;
+ arp_req.waiting = 1;
+
+ retry = 8;
+ while (retry-- > 0) {
+
+ /* send the packet */
+ pkt->pkt_bytes = sizeof(arp_header_t);
+ __enet_send(pkt, &bcast_addr, ETH_TYPE_ARP);
+
+ retry_start = MS_TICKS();
+ while ((MS_TICKS_DELAY() - retry_start) < 250) {
+ __enet_poll();
+ if (!arp_req.waiting) {
+ __pktbuf_free(pkt);
+ return 0;
+ }
+ }
+ }
+ __pktbuf_free(pkt);
+ return -1;
+}
+
+#define NUM_ARP 16
+static ip_route_t routes[NUM_ARP];
+
+int
+__arp_lookup(ip_addr_t *host, ip_route_t *rt)
+{
+ int i;
+ static int next_arp = 0;
+
+ for (i = 0; i < NUM_ARP; i++) {
+ if (memcmp(host, &routes[i].ip_addr, sizeof(*host)) == 0) {
+ // This is a known host
+ memcpy(rt, &routes[i], sizeof(*rt));
+ return 0;
+ }
+ }
+ memcpy(&rt->ip_addr, host, sizeof(*host));
+ if (((*host)[0] == 0xFF) && ((*host)[1] == 0xFF) && ((*host)[2] == 0xFF)) {
+ memset(&rt->enet_addr, 0xFF, sizeof(rt->enet_addr));
+ return 0;
+#ifdef CYGSEM_REDBOOT_NETWORKING_USE_GATEWAY
+ } else if (!__ip_addr_local(host)) {
+ // non-local IP address -- look up Gateway's Ethernet address
+ host = &__local_ip_gate;
+#endif
+ }
+ if (__arp_request(host, &rt->enet_addr, 0) < 0) {
+ return -1;
+ } else {
+ memcpy(&routes[next_arp], rt, sizeof(*rt));
+ if (++next_arp == NUM_ARP) next_arp = 0;
+ return 0;
+ }
+}
+
diff --git a/cesar/ecos/packages/redboot/current/src/net/bootp.c b/cesar/ecos/packages/redboot/current/src/net/bootp.c
new file mode 100644
index 0000000000..046017f4b0
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/net/bootp.c
@@ -0,0 +1,344 @@
+//==========================================================================
+//
+// net/bootp.c
+//
+// Stand-alone minimal BOOTP support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <net/net.h>
+#include <net/bootp.h>
+
+#define SHOULD_BE_RANDOM 0x12345555
+
+/* How many milliseconds to wait before retrying the request */
+#define RETRY_TIME 2000
+#define MAX_RETRIES 8
+
+static bootp_header_t *bp_info;
+
+#ifdef CYGSEM_REDBOOT_NETWORKING_DHCP
+static const unsigned char dhcpCookie[] = {99,130,83,99};
+static const unsigned char dhcpEnd[] = {255};
+static const unsigned char dhcpDiscover[] = {53,1,1};
+static const unsigned char dhcpRequest[] = {53,1,3};
+static const unsigned char dhcpRequestIP[] = {50,4};
+static const unsigned char dhcpParamRequestList[] = {55,3,1,3,6};
+static enum {
+ DHCP_NONE = 0,
+ DHCP_DISCOVER,
+ DHCP_OFFER,
+ DHCP_REQUEST,
+ DHCP_ACK
+} dhcpState;
+#endif
+
+static void
+bootp_handler(udp_socket_t *skt, char *buf, int len,
+ ip_route_t *src_route, word src_port)
+{
+ bootp_header_t *b;
+#ifdef CYGSEM_REDBOOT_NETWORKING_DHCP
+ unsigned char *p, expected = 0;
+#endif
+
+ b = (bootp_header_t *)buf;
+ if (bp_info) {
+ memset(bp_info,0,sizeof *bp_info);
+ if (len > sizeof *bp_info)
+ len = sizeof *bp_info;
+ memcpy(bp_info, b, len);
+ }
+
+ // Only accept pure REPLY responses
+ if (b->bp_op != BOOTREPLY)
+ return;
+
+ // Must be sent to me, as well!
+ if (memcmp(b->bp_chaddr, __local_enet_addr, 6))
+ return;
+
+#ifdef CYGSEM_REDBOOT_NETWORKING_DHCP
+ p = b->bp_vend;
+ if (memcmp(p, dhcpCookie, sizeof(dhcpCookie)))
+ return;
+ p += 4;
+
+ // Find the DHCP Message Type tag
+ while (*p != TAG_DHCP_MESS_TYPE) {
+ p += p[1] + 2;
+ if (p >= (unsigned char*)b + sizeof(*bp_info))
+ return;
+ }
+
+ p += 2;
+
+ switch (dhcpState) {
+ case DHCP_DISCOVER:
+ // The discover message has been sent, only accept an offer reply
+ if (*p == DHCP_MESS_TYPE_OFFER) {
+ dhcpState = DHCP_OFFER;
+ return;
+ } else {
+ expected = DHCP_MESS_TYPE_OFFER;
+ }
+ break;
+ case DHCP_REQUEST:
+ // The request message has been sent, only accept an ack reply
+ if (*p == DHCP_MESS_TYPE_ACK) {
+ dhcpState = DHCP_ACK;
+ return;
+ } else {
+ expected = DHCP_MESS_TYPE_ACK;
+ }
+ break;
+ case DHCP_NONE:
+ case DHCP_OFFER:
+ case DHCP_ACK:
+ // Quitely ignore these - they indicate repeated message from server
+ return;
+ }
+ // See if we've been NAK'd - if so, give up and try again
+ if (*p == DHCP_MESS_TYPE_NAK) {
+ dhcpState = DHCP_NONE;
+ return;
+ }
+ diag_printf("DHCP reply: %d, not %d\n", (int)*p, (int)expected);
+ return;
+#else
+ // Simple BOOTP - this is all there is!
+ memcpy(__local_ip_addr, &b->bp_yiaddr, 4);
+#endif
+}
+
+#define AddOption(p,d) do {memcpy(p,d,sizeof d); p += sizeof d;} while (0)
+
+/*
+ * Find our IP address and copy to __local_ip_addr.
+ * Return zero if successful, -1 if not.
+ */
+int
+__bootp_find_local_ip(bootp_header_t *info)
+{
+ udp_socket_t udp_skt;
+ bootp_header_t b;
+ ip_route_t r;
+ int retry;
+ unsigned long start;
+ ip_addr_t saved_ip_addr;
+#ifdef CYGSEM_REDBOOT_NETWORKING_DHCP
+ unsigned char *p;
+ int oldState;
+#endif
+ int txSize;
+ bool abort = false;
+ static int xid = SHOULD_BE_RANDOM;
+
+#ifdef CYGSEM_REDBOOT_NETWORKING_DHCP
+ dhcpState = DHCP_NONE;
+#endif
+
+ // Where we want the results saved
+ bp_info = info;
+ // Preserve any IP address we currently have, just in case
+ memcpy(saved_ip_addr, __local_ip_addr, sizeof(__local_ip_addr));
+
+ // fill out route for a broadcast
+ r.ip_addr[0] = 255;
+ r.ip_addr[1] = 255;
+ r.ip_addr[2] = 255;
+ r.ip_addr[3] = 255;
+ r.enet_addr[0] = 255;
+ r.enet_addr[1] = 255;
+ r.enet_addr[2] = 255;
+ r.enet_addr[3] = 255;
+ r.enet_addr[4] = 255;
+ r.enet_addr[5] = 255;
+
+ // setup a socket listener for bootp replies
+ __udp_install_listener(&udp_skt, IPPORT_BOOTPC, bootp_handler);
+
+ retry = MAX_RETRIES;
+ do {
+ start = MS_TICKS();
+
+ // Build up the BOOTP/DHCP request
+ memset(&b, 0, sizeof(b));
+ b.bp_op = BOOTREQUEST;
+ b.bp_htype = HTYPE_ETHERNET;
+ b.bp_hlen = 6;
+ b.bp_xid = xid++;
+ memcpy(b.bp_chaddr, __local_enet_addr, 6);
+ memset(__local_ip_addr, 0, sizeof(__local_ip_addr));
+
+#ifdef CYGSEM_REDBOOT_NETWORKING_DHCP
+ p = b.bp_vend;
+ switch (dhcpState) {
+ case DHCP_NONE:
+ case DHCP_DISCOVER:
+ AddOption(p,dhcpCookie);
+ AddOption(p,dhcpDiscover);
+ AddOption(p,dhcpParamRequestList);
+ AddOption(p,dhcpEnd);
+ dhcpState = DHCP_DISCOVER;
+ break;
+ case DHCP_OFFER:
+ retry = MAX_RETRIES;
+ case DHCP_REQUEST:
+ b.bp_xid = bp_info->bp_xid; // Match what server sent
+ AddOption(p,dhcpCookie);
+ AddOption(p,dhcpRequest);
+ AddOption(p,dhcpRequestIP);
+ memcpy(p, &bp_info->bp_yiaddr, 4); p += 4; // Ask for the address just given
+ AddOption(p,dhcpParamRequestList);
+ AddOption(p,dhcpEnd);
+ dhcpState = DHCP_REQUEST;
+ memset(&b.bp_yiaddr, 0xFF, 4);
+ memset(&b.bp_siaddr, 0xFF, 4);
+ memset(&b.bp_yiaddr, 0x00, 4);
+ memset(&b.bp_siaddr, 0x00, 4);
+ break;
+ case DHCP_ACK:
+ // Ignore these states (they won't happen)
+ break;
+ }
+
+ // Some servers insist on a minimum amount of "vendor" data
+ if (p < &b.bp_vend[BP_MIN_VEND_SIZE]) p = &b.bp_vend[BP_MIN_VEND_SIZE];
+ txSize = p - (unsigned char*)&b;
+ oldState = dhcpState;
+#else
+ txSize = sizeof(b);
+#endif
+
+ __udp_send((char *)&b, txSize, &r, IPPORT_BOOTPS, IPPORT_BOOTPC);
+
+ // If we're retrying, inform the user
+ if (retry == (MAX_RETRIES-1))
+ diag_printf("... waiting for BOOTP information\n");
+
+ do {
+ __enet_poll();
+#ifdef CYGSEM_REDBOOT_NETWORKING_DHCP
+ if (dhcpState != oldState) {
+ if (dhcpState == DHCP_ACK) {
+ unsigned char *end;
+ int optlen;
+ // Address information has now arrived!
+ memcpy(__local_ip_addr, &bp_info->bp_yiaddr, 4);
+#ifdef CYGSEM_REDBOOT_NETWORKING_USE_GATEWAY
+ memcpy(__local_ip_gate, &bp_info->bp_giaddr, 4);
+#endif
+ p = bp_info->bp_vend+4;
+ end = (unsigned char *)bp_info+sizeof(*bp_info);
+ while (p < end) {
+ unsigned char tag = *p;
+ if (tag == TAG_END)
+ break;
+ if (tag == TAG_PAD)
+ optlen = 1;
+ else {
+ optlen = p[1];
+ p += 2;
+ switch (tag) {
+#ifdef CYGSEM_REDBOOT_NETWORKING_USE_GATEWAY
+ case TAG_SUBNET_MASK: // subnet mask
+ memcpy(__local_ip_mask,p,4);
+ break;
+ case TAG_GATEWAY: // router
+ memcpy(__local_ip_gate,p,4);
+ break;
+#endif
+#ifdef CYGPKG_REDBOOT_NETWORKING_DNS
+ case TAG_DOMAIN_SERVER:
+// diag_printf(" DNS server found!\n");
+ memcpy(&__bootp_dns_addr, p, 4);
+ __bootp_dns_set = 1;
+ break;
+#endif
+ default:
+ break;
+ }
+ }
+ p += optlen;
+ }
+ __udp_remove_listener(IPPORT_BOOTPC);
+ return 0;
+ } else {
+ break; // State changed, handle it
+ }
+ }
+#else
+ // All done, if address response has arrived
+ if (__local_ip_addr[0] || __local_ip_addr[1] ||
+ __local_ip_addr[2] || __local_ip_addr[3]) {
+ /* success */
+ __udp_remove_listener(IPPORT_BOOTPC);
+ return 0;
+ }
+#endif
+ if (_rb_break(1)) {
+ // The user typed ^C on the console
+ abort = true;
+ break;
+ }
+ MS_TICKS_DELAY(); // Count for ^C test
+ } while ((MS_TICKS_DELAY() - start) < RETRY_TIME);
+ } while (!abort && (retry-- > 0));
+
+ // timed out
+ __udp_remove_listener(IPPORT_BOOTPC);
+ // Restore any previous IP address
+ memcpy(__local_ip_addr, saved_ip_addr, sizeof(__local_ip_addr));
+ return -1;
+}
+
+
diff --git a/cesar/ecos/packages/redboot/current/src/net/cksum.c b/cesar/ecos/packages/redboot/current/src/net/cksum.c
new file mode 100644
index 0000000000..6ccf5894e8
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/net/cksum.c
@@ -0,0 +1,124 @@
+//==========================================================================
+//
+// net/cksum.c
+//
+// Stand-alone network checksum support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <net/net.h>
+
+/*
+ * Do a one's complement checksum.
+ * The data being checksum'd is in network byte order.
+ * The returned checksum is in network byte order.
+ */
+unsigned short
+__sum(word *w, int len, int init_sum)
+{
+ int sum = init_sum;
+
+ union {
+ volatile unsigned char c[2];
+ volatile unsigned short s;
+ } su;
+
+ union {
+ volatile unsigned short s[2];
+ volatile int i;
+ } iu;
+
+ while ((len -= 2) >= 0)
+ sum += *w++;
+
+ if (len == -1) {
+ su.c[0] = *(char *)w;
+ su.c[1] = 0;
+ sum += su.s;
+ }
+
+ iu.i = sum;
+ sum = iu.s[0] + iu.s[1];
+ if (sum > 65535)
+ sum -= 65535;
+
+ su.s = ~sum;
+
+ return (su.c[0] << 8) | su.c[1];
+}
+
+
+/*
+ * Compute a partial checksum for the UDP/TCP pseudo header.
+ */
+int
+__pseudo_sum(ip_header_t *ip)
+{
+ int sum;
+ word *p;
+
+ union {
+ volatile unsigned char c[2];
+ volatile unsigned short s;
+ } su;
+
+ p = (word *)ip->source;
+ sum = *p++;
+ sum += *p++;
+ sum += *p++;
+ sum += *p++;
+
+ su.c[0] = 0;
+ su.c[1] = ip->protocol;
+ sum += su.s;
+
+ sum += ip->length;
+
+ return sum;
+}
diff --git a/cesar/ecos/packages/redboot/current/src/net/dns.c b/cesar/ecos/packages/redboot/current/src/net/dns.c
new file mode 100644
index 0000000000..c6cf392fbe
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/net/dns.c
@@ -0,0 +1,287 @@
+//=============================================================================
+//
+// dns.c
+//
+// DNS client code
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): jskov
+// Contributors:jskov
+// Date: 2001-09-26
+// Description: Provides DNS lookup as per RFC 1034/1035.
+//
+// Note: This is a stripped down clone of dns.c from the CYGPKG_NS_DNS
+// package which does not use malloc/free and has been tweaked to
+// use UDP via RedBoot's network stack. Also adds commands
+// to set the DNS server IP at runtime.
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <cyg/hal/drv_api.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/cyg_trac.h> /* Tracing support */
+
+#include <net/net.h>
+#include <redboot.h>
+/* #include <cyg/ns/dns/dns.h> - it's been moved to redboot.h */
+#include <cyg/ns/dns/dns_priv.h>
+
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+#include <flash_config.h>
+
+RedBoot_config_option("DNS server IP address",
+ dns_ip,
+ ALWAYS_ENABLED, true,
+ CONFIG_IP,
+ 0
+ );
+#endif
+
+/* So we remember which ports have been used */
+static int get_port = 7700;
+
+#define DOMAIN_PORT 53
+
+/* Some magic to make dns_impl.inl compile under RedBoot */
+#define sprintf diag_sprintf
+
+/* DNS server address possibly returned from bootp */
+struct in_addr __bootp_dns_addr;
+cyg_bool __bootp_dns_set = false;
+
+struct sockaddr_in server;
+
+/* static buffers so we can make do without malloc */
+static struct hostent _hent;
+static char* _h_addr_list[2];
+static struct in_addr _h_addr_list0;
+static int _hent_alloc = 0;
+
+#define _STRING_COUNT 2
+#define _STRING_LENGTH 64
+static char _strings[_STRING_COUNT][_STRING_LENGTH];
+static int _strings_alloc = 0;
+
+/* as in dns.c proper */
+static short id = 0; /* ID of the last query */
+static int s = -1; /* Socket to the DNS server */
+static cyg_drv_mutex_t dns_mutex; /* Mutex to stop multiple queries as once */
+static char * domainname=NULL; /* Domain name used for queries */
+
+
+/* Allocate space for string of length (len). Return NULL on
+ failure. */
+static char*
+alloc_string(int len)
+{
+ int i;
+
+ if (len > _STRING_LENGTH)
+ return NULL;
+
+ for (i = 0; i < _STRING_COUNT; i++) {
+ if (_strings_alloc & (1 << i)) continue;
+ _strings_alloc |= (1<<i);
+ return _strings[i];
+ }
+ return NULL;
+}
+
+static void
+free_string(char* s)
+{
+ int i;
+ for (i = 0; i < _STRING_COUNT; i++) {
+ if (_strings[i] == s) {
+ _strings_alloc &= ~(1<<i);
+ break;
+ }
+ }
+}
+
+/* Deallocate the memory taken to hold a hent structure */
+static void
+free_hent(struct hostent * hent)
+{
+ if (hent->h_name) {
+ free_string(hent->h_name);
+ }
+ _hent_alloc = 0;
+}
+
+/* Allocate hent structure with room for one in_addr. Returns NULL on
+ failure. */
+static struct hostent*
+alloc_hent(void)
+{
+ struct hostent *hent;
+
+ if (_hent_alloc) return NULL;
+
+ hent = &_hent;
+ memset(hent, 0, sizeof(struct hostent));
+ hent->h_addr_list = _h_addr_list;
+ hent->h_addr_list[0] = (char*)&_h_addr_list0;
+ hent->h_addr_list[1] = NULL;
+ _hent_alloc = 1;
+
+ return hent;
+}
+
+static __inline__ void
+free_stored_hent(void)
+{
+ free_hent( &_hent );
+}
+
+static __inline__ void
+store_hent(struct hostent *hent)
+{
+ hent=hent; // avoid warning
+}
+
+/* Send the query to the server and read the response back. Return -1
+ if it fails, otherwise put the response back in msg and return the
+ length of the response. */
+static int
+send_recv(char * msg, int len, int msglen)
+{
+ struct dns_header *dns_hdr;
+ int finished = false;
+ int read = 0;
+
+ dns_hdr = (struct dns_header *) msg;
+
+ do {
+ int len_togo = len;
+ struct timeval timeout;
+ struct sockaddr_in local_addr, from_addr;
+
+ memset((char *)&local_addr, 0, sizeof(local_addr));
+ local_addr.sin_family = AF_INET;
+ local_addr.sin_addr.s_addr = htonl(INADDR_ANY);
+ local_addr.sin_port = htons(get_port++);
+
+ if (__udp_sendto(msg, len_togo, &server, &local_addr) < 0)
+ return -1;
+
+ memset((char *)&from_addr, 0, sizeof(from_addr));
+
+ timeout.tv_sec = CYGNUM_REDBOOT_NETWORKING_DNS_TIMEOUT;
+ timeout.tv_usec = 0;
+
+ read = __udp_recvfrom(msg, len, &from_addr, &local_addr, &timeout);
+ if (read < 0)
+ return -1;
+
+ /* Reply to an old query. Ignore it */
+ if (ntohs(dns_hdr->id) != (id-1)) {
+ continue;
+ }
+ finished = true;
+ } while (!finished);
+
+ return read;
+}
+
+void
+set_dns(char* new_ip)
+{
+ in_addr_t dns_ip;
+
+ memset(&server.sin_addr, 0, sizeof(server.sin_addr));
+ if (!inet_aton(new_ip, &dns_ip)) {
+ diag_printf("Bad DNS server address: %s\n", new_ip);
+ } else {
+ memcpy(&server.sin_addr, &dns_ip, sizeof(dns_ip));
+ /* server config is valid */
+ s = 0;
+ }
+}
+
+void
+show_dns(void)
+{
+ diag_printf(", DNS server IP: %s", inet_ntoa((in_addr_t *)&server.sin_addr));
+ if (0 == server.sin_addr.s_addr) {
+ s = -1;
+ }
+}
+
+/* Initialise the resolver. Open a socket and bind it to the address
+ of the server. return -1 if something goes wrong, otherwise 0 */
+int
+redboot_dns_res_init(void)
+{
+ memset((char *)&server, 0, sizeof(server));
+ server.sin_len = sizeof(server);
+ server.sin_family = AF_INET;
+ server.sin_port = htons(DOMAIN_PORT);
+ cyg_drv_mutex_init(&dns_mutex);
+
+ /* If we got a DNS server address from the DHCP/BOOTP, then use that address */
+ if ( __bootp_dns_set ) {
+ memcpy(&server.sin_addr, &__bootp_dns_addr, sizeof(__bootp_dns_addr) );
+ s = 0;
+ }
+ else {
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+ {
+ ip_addr_t dns_ip;
+
+ flash_get_config("dns_ip", &dns_ip, CONFIG_IP);
+ if (dns_ip[0] == 0 && dns_ip[1] == 0 && dns_ip[2] == 0 && dns_ip[3] == 0)
+ return -1;
+ memcpy(&server.sin_addr, &dns_ip, sizeof(dns_ip));
+ /* server config is valid */
+ s = 0;
+ }
+#else
+ // Use static configuration
+ set_dns(__Xstr(CYGPKG_REDBOOT_NETWORKING_DNS_IP));
+#endif
+ }
+
+ return 0;
+}
+
+/* Include the DNS client implementation code */
+#include <cyg/ns/dns/dns_impl.inl>
diff --git a/cesar/ecos/packages/redboot/current/src/net/enet.c b/cesar/ecos/packages/redboot/current/src/net/enet.c
new file mode 100644
index 0000000000..6301c17ee6
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/net/enet.c
@@ -0,0 +1,248 @@
+//==========================================================================
+//
+// net/enet.c
+//
+// Stand-alone ethernet [link-layer] support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <net/net.h>
+#include <cyg/io/eth/eth_drv.h> // Logical driver interfaces
+
+//#define ENET_STATS 1
+
+#ifdef ENET_STATS
+static int num_ip = 0;
+static int num_arp = 0;
+#ifdef NET_SUPPORT_RARP
+static int num_rarp = 0;
+#endif
+static int num_received = 0;
+static int num_transmitted = 0;
+#endif
+
+//
+// Support for user handlers of additional ethernet packets (nonIP)
+//
+
+#define NUM_EXTRA_HANDLERS 4
+static struct {
+ int type;
+ pkt_handler_t handler;
+} eth_handlers[NUM_EXTRA_HANDLERS];
+
+pkt_handler_t
+__eth_install_listener(int eth_type, pkt_handler_t handler)
+{
+ int i, empty;
+ pkt_handler_t old;
+
+ if (eth_type > 0x800 || handler != (pkt_handler_t)0) {
+ empty = -1;
+ for (i = 0; i < NUM_EXTRA_HANDLERS; i++) {
+ if (eth_handlers[i].type == eth_type) {
+ // Replace existing handler
+ old = eth_handlers[i].handler;
+ eth_handlers[i].handler = handler;
+ return old;
+ }
+ if (eth_handlers[i].type == 0) {
+ empty = i;
+ }
+ }
+ if (empty >= 0) {
+ // Found a free slot
+ eth_handlers[empty].type = eth_type;
+ eth_handlers[empty].handler = handler;
+ return (pkt_handler_t)0;
+ }
+ }
+ diag_printf("** Warning: can't install listener for ethernet type 0x%02x\n", eth_type);
+ return (pkt_handler_t)0;
+}
+
+void
+__eth_remove_listener(int eth_type)
+{
+ int i;
+
+ for (i = 0; i < NUM_EXTRA_HANDLERS; i++) {
+ if (eth_handlers[i].type == eth_type) {
+ eth_handlers[i].type = 0;
+ }
+ }
+}
+
+/*
+ * Non-blocking poll of ethernet link. Process packets until no more
+ * are available.
+ */
+void
+__enet_poll(void)
+{
+ pktbuf_t *pkt;
+ eth_header_t eth_hdr;
+ int i, type;
+#ifdef DEBUG_PKT_EXHAUSTION
+ static bool was_exhausted = false;
+#endif
+
+ while (true) {
+ /*
+ * Try to get a free pktbuf and return if none
+ * are available.
+ */
+ if ((pkt = __pktbuf_alloc(ETH_MAX_PKTLEN)) == NULL) {
+#ifdef DEBUG_PKT_EXHAUSTION
+ if (!was_exhausted) {
+ int old = start_console(); // Force output to standard port
+ diag_printf("__enet_poll: no more buffers\n");
+ __pktbuf_dump();
+ was_exhausted = true;
+ end_console(old);
+ }
+#endif
+ return;
+ }
+#ifdef DEBUG_PKT_EXHAUSTION
+ was_exhausted = false; // Report the next time we're out of buffers
+#endif
+
+ if ((pkt->pkt_bytes = eth_drv_read((char *)&eth_hdr, (char *)pkt->buf,
+ ETH_MAX_PKTLEN)) > 0) {
+#ifdef ENET_STATS
+ ++num_received;
+#endif
+ switch (type = ntohs(eth_hdr.type)) {
+
+ case ETH_TYPE_IP:
+#ifdef ENET_STATS
+ ++num_ip;
+#endif
+ pkt->ip_hdr = (ip_header_t *)pkt->buf;
+ __ip_handler(pkt, &eth_hdr.source);
+ break;
+
+ case ETH_TYPE_ARP:
+#ifdef ENET_STATS
+ ++num_arp;
+#endif
+ pkt->arp_hdr = (arp_header_t *)pkt->buf;
+ __arp_handler(pkt);
+ break;
+
+#ifdef NET_SUPPORT_RARP
+ case ETH_TYPE_RARP:
+#ifdef ENET_STATS
+ ++num_rarp;
+#endif
+ pkt->arp_hdr = (arp_header_t *)pkt->buf;
+ __rarp_handler(pkt);
+ break;
+#endif
+
+ default:
+ if (type > 0x800) {
+ for (i = 0; i < NUM_EXTRA_HANDLERS; i++) {
+ if (eth_handlers[i].type == type) {
+ (eth_handlers[i].handler)(pkt, &eth_hdr);
+ }
+ }
+ }
+ __pktbuf_free(pkt);
+ break;
+ }
+ } else {
+ __pktbuf_free(pkt);
+ break;
+ }
+ }
+}
+
+
+
+/*
+ * Send an ethernet packet.
+ */
+void
+__enet_send(pktbuf_t *pkt, enet_addr_t *dest, int eth_type)
+{
+ eth_header_t eth_hdr;
+
+ // Set up ethernet header
+ memcpy(&eth_hdr.destination, dest, sizeof(enet_addr_t));
+ memcpy(&eth_hdr.source, __local_enet_addr, sizeof(enet_addr_t));
+ eth_hdr.type = htons(eth_type);
+
+ eth_drv_write((char *)&eth_hdr, (char *)pkt->buf, pkt->pkt_bytes);
+#ifdef ENET_STATS
+ ++num_transmitted;
+#endif
+}
+
+#ifdef __LITTLE_ENDIAN__
+
+unsigned long
+ntohl(unsigned long x)
+{
+ return (((x & 0x000000FF) << 24) |
+ ((x & 0x0000FF00) << 8) |
+ ((x & 0x00FF0000) >> 8) |
+ ((x & 0xFF000000) >> 24));
+}
+
+unsigned short
+ntohs(unsigned short x)
+{
+ return (((x & 0x00FF) << 8) |
+ ((x & 0xFF00) >> 8));
+}
+
+#endif
diff --git a/cesar/ecos/packages/redboot/current/src/net/http_client.c b/cesar/ecos/packages/redboot/current/src/net/http_client.c
new file mode 100644
index 0000000000..47bb480517
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/net/http_client.c
@@ -0,0 +1,255 @@
+//==========================================================================
+//
+// net/http_client.c
+//
+// Stand-alone HTTP support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2002-05-22
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+// HTTP client support
+
+#include <redboot.h> // have_net
+#include <net/net.h>
+#include <net/http.h>
+
+// So we remember which ports have been used
+static int get_port = 7800;
+
+static struct _stream{
+ bool open;
+ int avail, actual_len, pos, filelen;
+ char data[4096];
+ char *bufp;
+ tcp_socket_t sock;
+} http_stream;
+
+static __inline__ int
+min(int a, int b)
+{
+ if (a < b)
+ return a;
+ else
+ return b;
+}
+
+int
+http_stream_open(connection_info_t *info, int *err)
+{
+ int res;
+ struct _stream *s = &http_stream;
+
+ if (!info->server->sin_port)
+ info->server->sin_port = 80; // HTTP port
+ if ((res = __tcp_open(&s->sock, info->server, get_port++, 5000, err)) < 0) {
+ *err = HTTP_OPEN;
+ return -1;
+ }
+ diag_sprintf(s->data, "GET %s HTTP/1.0\r\n\r\n", info->filename);
+ __tcp_write_block(&s->sock, s->data, strlen(s->data));
+ s->avail = 0;
+ s->open = true;
+ s->pos = 0;
+ return 0;
+}
+
+void
+http_stream_close(int *err)
+{
+ struct _stream *s = &http_stream;
+
+ if (s->open) {
+ __tcp_abort(&s->sock,1);
+ s->open = false;
+ }
+}
+
+int
+http_stream_read(char *buf,
+ int len,
+ int *err)
+{
+ struct _stream *s = &http_stream;
+ int total = 0;
+ int cnt, code;
+
+ if (!s->open) {
+ return -1; // Shouldn't happen, but...
+ }
+ while (len) {
+ while (s->avail == 0) {
+ // Need to wait for some data to arrive
+ __tcp_poll();
+ if (s->sock.state != _ESTABLISHED) {
+ if (s->sock.state == _CLOSE_WAIT) {
+ // This connection is breaking
+ if (s->sock.data_bytes == 0 && s->sock.rxcnt == 0) {
+ __tcp_close(&s->sock);
+ return total;
+ }
+ } else if (s->sock.state == _CLOSED) {
+ // The connection is gone
+ s->open = false;
+ return -1;
+ } else {
+ *err = HTTP_IO;
+ return -1;
+ }
+ }
+ s->actual_len = __tcp_read(&s->sock, s->data, sizeof(s->data));
+ if (s->actual_len > 0) {
+ s->bufp = s->data;
+ s->avail = s->actual_len;
+ if (s->pos == 0) {
+ // First data - need to scan HTTP response header
+ if (strncmp(s->bufp, "HTTP/", 5) == 0) {
+ // Should look like "HTTP/1.1 200 OK"
+ s->bufp += 5;
+ s->avail -= 5;
+ // Find first space
+ while ((s->avail > 0) && (*s->bufp != ' ')) {
+ s->bufp++;
+ s->avail--;
+ }
+ // Now the integer response
+ code = 0;
+ while ((s->avail > 0) && (*s->bufp == ' ')) {
+ s->bufp++;
+ s->avail--;
+ }
+ while ((s->avail > 0) && isdigit(*s->bufp)) {
+ code = (code * 10) + (*s->bufp - '0');
+ s->bufp++;
+ s->avail--;
+ }
+ // Make sure it says OK
+ while ((s->avail > 0) && (*s->bufp == ' ')) {
+ s->bufp++;
+ s->avail--;
+ }
+ if (strncmp(s->bufp, "OK", 2)) {
+ switch (code) {
+ case 400:
+ *err = HTTP_BADREQ;
+ break;
+ case 404:
+ *err = HTTP_NOFILE;
+ break;
+ default:
+ *err = HTTP_BADHDR;
+ break;
+ }
+ return -1;
+ }
+ // Find \r\n\r\n - end of HTTP preamble
+ while (s->avail >= 4) {
+ // This could be done faster, but not simpler
+ if (strncmp(s->bufp, "\r\n\r\n", 4) == 0) {
+ s->bufp += 4;
+ s->avail -= 4;
+#if 0 // DEBUG - show header
+ *(s->bufp-2) = '\0';
+ diag_printf(s->data);
+#endif
+ break;
+ }
+ s->avail--;
+ s->bufp++;
+ }
+ s->pos++;
+ } else {
+ // Unrecognized response
+ *err = HTTP_BADHDR;
+ return -1;
+ }
+ }
+ } else if (s->actual_len < 0) {
+ *err = HTTP_IO;
+ return -1;
+ }
+ }
+ cnt = min(len, s->avail);
+ memcpy(buf, s->bufp, cnt);
+ s->avail -= cnt;
+ s->bufp += cnt;
+ buf += cnt;
+ total += cnt;
+ len -= cnt;
+ }
+ return total;
+}
+
+char *
+http_error(int err)
+{
+ char *errmsg = "Unknown error";
+
+ switch (err) {
+ case HTTP_NOERR:
+ return "";
+ case HTTP_BADHDR:
+ return "Unrecognized HTTP response";
+ case HTTP_BADREQ:
+ return "Bad HTTP request (check file name)";
+ case HTTP_NOFILE:
+ return "No such file";
+ case HTTP_OPEN:
+ return "Can't connect to host";
+ case HTTP_IO:
+ return "I/O error";
+ }
+ return errmsg;
+}
+
+//
+// RedBoot interface
+//
+GETC_IO_FUNCS(http_io, http_stream_open, http_stream_close,
+ 0, http_stream_read, http_error);
+RedBoot_load(http, http_io, true, true, 0);
diff --git a/cesar/ecos/packages/redboot/current/src/net/icmp.c b/cesar/ecos/packages/redboot/current/src/net/icmp.c
new file mode 100644
index 0000000000..c5f5380d77
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/net/icmp.c
@@ -0,0 +1,126 @@
+//==========================================================================
+//
+// net/icmp.c
+//
+// Stand-alone ICMP networking support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <net/net.h>
+
+/*
+ * Handle ICMP packets.
+ */
+static void default_icmp_handler(pktbuf_t *pkt, ip_route_t *dest);
+
+static icmp_handler_t icmp_handler = default_icmp_handler;
+
+/*
+ * Install a user defined user_handler for incoming icmp packets.
+ * Returns zero if successful, -1 if the user_handler is already used.
+ */
+int
+__icmp_install_listener(icmp_handler_t user_handler)
+{
+ if (icmp_handler == user_handler) {
+ return -1;
+ }
+ icmp_handler = user_handler;
+ return 0;
+}
+
+
+/*
+ * Replace a user defined handler by the default handler.
+ */
+void
+__icmp_remove_listener(void)
+{
+ if (icmp_handler != default_icmp_handler) {
+ icmp_handler = default_icmp_handler;
+ }
+}
+
+/*
+ * ICMP entry point with an IP packet pkt and the destination dest a reply
+ * should be sent to.
+ */
+void
+__icmp_handler(pktbuf_t *pkt, ip_route_t *dest)
+{
+ (*icmp_handler)(pkt, dest);
+
+ BSPLOG(bsp_log("icmp: dest[%s] type[%d] seq[%d]\n",
+ inet_ntoa(pkt->ip_hdr->destination),
+ pkt->icmp_hdr->type,
+ pkt->icmp_hdr->seqnum));
+ __pktbuf_free(pkt);
+}
+
+
+/*
+ * The default ICMP handler only handles ICMP incoming echo request and
+ * outgoing echo reply.
+ */
+static void
+default_icmp_handler(pktbuf_t *pkt, ip_route_t *dest)
+{
+ word cksum;
+
+ if (pkt->icmp_hdr->type == ICMP_TYPE_ECHOREQUEST
+ && pkt->icmp_hdr->code == 0
+ && __sum((word *)pkt->icmp_hdr, pkt->pkt_bytes, 0) == 0) {
+
+ pkt->icmp_hdr->type = ICMP_TYPE_ECHOREPLY;
+ pkt->icmp_hdr->checksum = 0;
+ cksum = __sum((word *)pkt->icmp_hdr, pkt->pkt_bytes, 0);
+ pkt->icmp_hdr->checksum = htons(cksum);
+ __ip_send(pkt, IP_PROTO_ICMP, dest);
+ }
+}
diff --git a/cesar/ecos/packages/redboot/current/src/net/inet_addr.c b/cesar/ecos/packages/redboot/current/src/net/inet_addr.c
new file mode 100644
index 0000000000..0d4d8f1db0
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/net/inet_addr.c
@@ -0,0 +1,118 @@
+//==========================================================================
+//
+// net/inet_addr.c
+//
+// Stand-alone IP address parsing for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <net/net.h>
+
+bool
+inet_aton(const char *s, in_addr_t *addr)
+{
+ int i, val, radix, digit;
+ unsigned long res = 0;
+ bool first;
+ char c;
+
+ for (i = 0; i < 4; i++) {
+ // Parse next digit string
+ first = true;
+ val = 0;
+ radix = 10;
+ while ((c = *s++) != '\0') {
+ if (first && (c == '0') && (_tolower(*s) == 'x')) {
+ radix = 16;
+ s++; // Skip over 0x
+ c = *s++;
+ }
+ first = false;
+ if (_is_hex(c) && ((digit = _from_hex(c)) < radix)) {
+ // Valid digit
+ val = (val * radix) + digit;
+ } else if (c == '.' && i < 3) { // all but last terminate by '.'
+ break;
+ } else {
+ return false;
+ }
+ }
+ // merge result
+#ifdef __LITTLE_ENDIAN__
+ res |= val << ((3-i)*8); // 24, 16, 8, 0
+#else
+ res = (res << 8) | val;
+#endif
+ if ('\0' == c) {
+ if (0 == i) { // first field found end of string
+ res = val; // no shifting, use it as the whole thing
+ break; // permit entering a single number
+ }
+ if (3 > i) // we found end of string before getting 4 fields
+ return false;
+ }
+ // after that we check that it was 0..255 only
+ if (val &~0xff) return false;
+ }
+ addr->s_addr = htonl(res);
+ return true;
+}
+
+// Assumes address is in network byte order
+char *
+inet_ntoa(in_addr_t *addr)
+{
+ static char str[32];
+ unsigned char *ap;
+
+ ap = (unsigned char *)addr;
+ diag_sprintf(str, "%d.%d.%d.%d", ap[0], ap[1], ap[2], ap[3]);
+ return str;
+}
diff --git a/cesar/ecos/packages/redboot/current/src/net/ip.c b/cesar/ecos/packages/redboot/current/src/net/ip.c
new file mode 100644
index 0000000000..0e26591248
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/net/ip.c
@@ -0,0 +1,216 @@
+//==========================================================================
+//
+// net/ip.c
+//
+// Stand-alone IP networking support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <net/net.h>
+
+#ifndef CYGDAT_REDBOOT_DEFAULT_IP_ADDR
+# define CYGDAT_REDBOOT_DEFAULT_IP_ADDR 0, 0, 0, 0
+#endif
+#ifndef CYGDAT_REDBOOT_DEFAULT_IP_ADDR_MASK
+# define CYGDAT_REDBOOT_DEFAULT_IP_ADDR_MASK 255, 255, 255, 0
+#endif
+#ifndef CYGDAT_REDBOOT_DEFAULT_GATEWAY_IP_ADDR
+# define CYGDAT_REDBOOT_DEFAULT_GATEWAY_IP_ADDR 0, 0, 0, 0
+#endif
+
+ip_addr_t __local_ip_addr = { CYGDAT_REDBOOT_DEFAULT_IP_ADDR };
+#ifdef CYGSEM_REDBOOT_NETWORKING_USE_GATEWAY
+ip_addr_t __local_ip_mask = { CYGDAT_REDBOOT_DEFAULT_IP_ADDR_MASK };
+ip_addr_t __local_ip_gate = { CYGDAT_REDBOOT_DEFAULT_GATEWAY_IP_ADDR };
+#endif
+
+static word ip_ident;
+
+#ifdef CYGSEM_REDBOOT_NETWORKING_USE_GATEWAY
+/*
+ * See if an address is on the local network
+ */
+int
+__ip_addr_local(ip_addr_t *addr)
+{
+ return !(
+ ((__local_ip_addr[0] ^ (*addr)[0]) & __local_ip_mask[0]) |
+ ((__local_ip_addr[1] ^ (*addr)[1]) & __local_ip_mask[1]) |
+ ((__local_ip_addr[2] ^ (*addr)[2]) & __local_ip_mask[2]) |
+ ((__local_ip_addr[3] ^ (*addr)[3]) & __local_ip_mask[3]));
+}
+#endif
+
+/*
+ * Match given IP address to our address.
+ * Check for broadcast matches as well.
+ */
+static int
+ip_addr_match(ip_addr_t addr)
+{
+ if (addr[0] == 255 && addr[1] == 255 && addr[2] == 255 && addr[3] == 255)
+ return 1;
+
+ if (!memcmp(addr, __local_ip_addr, sizeof(ip_addr_t)))
+ return 1;
+
+ /*
+ * Consider it an address match if we haven't gotten our IP address yet.
+ * Some DHCP servers will address IP packets to the assigned address
+ * instead of a IP broadcast address.
+ */
+ if (__local_ip_addr[0] == 0 && __local_ip_addr[1] == 0 &&
+ __local_ip_addr[2] == 0 && __local_ip_addr[3] == 0)
+ return 1;
+
+ return 0;
+}
+
+
+extern void __tcp_handler(pktbuf_t *, ip_route_t *);
+
+/*
+ * Handle IP packets coming from the polled ethernet interface.
+ */
+void
+__ip_handler(pktbuf_t *pkt, enet_addr_t *src_enet_addr)
+{
+ ip_header_t *ip = pkt->ip_hdr;
+ ip_route_t r;
+ int hdr_bytes;
+
+ /* first make sure its ours and has a good checksum. */
+ if (!ip_addr_match(ip->destination) ||
+ __sum((word *)ip, ip->hdr_len << 2, 0) != 0) {
+ __pktbuf_free(pkt);
+ return;
+ }
+
+ memcpy(r.ip_addr, ip->source, sizeof(ip_addr_t));
+ memcpy(r.enet_addr, src_enet_addr, sizeof(enet_addr_t));
+
+ hdr_bytes = ip->hdr_len << 2;
+ pkt->pkt_bytes = ntohs(ip->length) - hdr_bytes;
+
+ switch (ip->protocol) {
+
+#if NET_SUPPORT_ICMP
+ case IP_PROTO_ICMP:
+ pkt->icmp_hdr = (icmp_header_t *)(((char *)ip) + hdr_bytes);
+ __icmp_handler(pkt, &r);
+ break;
+#endif
+
+#if NET_SUPPORT_TCP
+ case IP_PROTO_TCP:
+ pkt->tcp_hdr = (tcp_header_t *)(((char *)ip) + hdr_bytes);
+ __tcp_handler(pkt, &r);
+ break;
+#endif
+
+#if NET_SUPPORT_UDP
+ case IP_PROTO_UDP:
+ pkt->udp_hdr = (udp_header_t *)(((char *)ip) + hdr_bytes);
+ __udp_handler(pkt, &r);
+ break;
+#endif
+
+ default:
+ __pktbuf_free(pkt);
+ break;
+ }
+}
+
+
+/*
+ * Send an IP packet.
+ *
+ * The IP data field should contain pkt->pkt_bytes of data.
+ * pkt->[udp|tcp|icmp]_hdr points to the IP data field. Any
+ * IP options are assumed to be already in place in the IP
+ * options field.
+ */
+int
+__ip_send(pktbuf_t *pkt, int protocol, ip_route_t *dest)
+{
+ ip_header_t *ip = pkt->ip_hdr;
+ int hdr_bytes;
+ unsigned short cksum;
+
+ /*
+ * Figure out header length. The use udp_hdr is
+ * somewhat arbitrary, but works because it is
+ * a union with other IP protocol headers.
+ */
+ hdr_bytes = (((char *)pkt->udp_hdr) - ((char *)ip));
+
+ pkt->pkt_bytes += hdr_bytes;
+
+ ip->version = 4;
+ ip->hdr_len = hdr_bytes >> 2;
+ ip->tos = 0;
+ ip->length = htons(pkt->pkt_bytes);
+ ip->ident = htons(ip_ident);
+ ip_ident++;
+ ip->fragment = 0;
+ ip->ttl = 255;
+ ip->ttl = 64;
+ ip->protocol = protocol;
+ ip->checksum = 0;
+ memcpy(ip->source, __local_ip_addr, sizeof(ip_addr_t));
+ memcpy(ip->destination, dest->ip_addr, sizeof(ip_addr_t));
+ cksum = __sum((word *)ip, hdr_bytes, 0);
+ ip->checksum = htons(cksum);
+
+ __enet_send(pkt, &dest->enet_addr, ETH_TYPE_IP);
+ return 0;
+}
+
+
diff --git a/cesar/ecos/packages/redboot/current/src/net/net_io.c b/cesar/ecos/packages/redboot/current/src/net/net_io.c
new file mode 100644
index 0000000000..a8cd8ed35a
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/net/net_io.c
@@ -0,0 +1,899 @@
+//==========================================================================
+//
+// net/net_io.c
+//
+// Stand-alone network logical I/O support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <net/net.h>
+#include <cyg/hal/hal_misc.h> // Helper functions
+#include <cyg/hal/hal_if.h> // HAL I/O interfaces
+#include <cyg/hal/drv_api.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/infra/cyg_ass.h> // assertion macros
+
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+#include <flash_config.h>
+
+RedBoot_config_option("GDB connection port",
+ gdb_port,
+ ALWAYS_ENABLED, true,
+ CONFIG_INT,
+ CYGNUM_REDBOOT_NETWORKING_TCP_PORT
+ );
+RedBoot_config_option("Network debug at boot time",
+ net_debug,
+ ALWAYS_ENABLED, true,
+ CONFIG_BOOL,
+ false
+ );
+#if defined(CYGHWR_NET_DRIVERS) && (CYGHWR_NET_DRIVERS > 1)
+RedBoot_config_option("Default network device",
+ net_device,
+ ALWAYS_ENABLED, true,
+ CONFIG_NETPORT,
+ CYGDAT_REDBOOT_DEFAULT_NETWORK_DEVICE
+ );
+#endif
+// Note: the following options are related. If 'bootp' is false, then
+// the other values are used in the configuration. Because of the way
+// that configuration tables are generated, they should have names which
+// are related. The configuration options will show up lexicographically
+// ordered, thus the peculiar naming. In this case, the 'use' option is
+// negated (if false, the others apply) which makes the names even more
+// confusing.
+
+#ifndef CYGSEM_REDBOOT_DEFAULT_NO_BOOTP
+#define CYGSEM_REDBOOT_DEFAULT_NO_BOOTP 0
+#endif
+RedBoot_config_option("Use BOOTP for network configuration",
+ bootp,
+ ALWAYS_ENABLED, true,
+ CONFIG_BOOL,
+ !CYGSEM_REDBOOT_DEFAULT_NO_BOOTP
+ );
+RedBoot_config_option("Local IP address",
+ bootp_my_ip,
+ "bootp", false,
+ CONFIG_IP,
+ 0
+ );
+#ifdef CYGSEM_REDBOOT_NETWORKING_USE_GATEWAY
+RedBoot_config_option("Local IP address mask",
+ bootp_my_ip_mask,
+ "bootp", false,
+ CONFIG_IP,
+ 0
+ );
+RedBoot_config_option("Gateway IP address",
+ bootp_my_gateway_ip,
+ "bootp", false,
+ CONFIG_IP,
+ 0
+ );
+#endif
+RedBoot_config_option("Default server IP address",
+ bootp_server_ip,
+ ALWAYS_ENABLED, true,
+ CONFIG_IP,
+ 0
+ );
+
+// Note: the following options are related too.
+RedBoot_config_option("Force console for special debug messages",
+ info_console_force,
+ ALWAYS_ENABLED, true,
+ CONFIG_BOOL,
+ false
+ );
+RedBoot_config_option("Console number for special debug messages",
+ info_console_number,
+ "info_console_force", true,
+ CONFIG_INT,
+ 0
+ );
+#endif
+
+#define TCP_CHANNEL CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS
+
+#ifdef DEBUG_TCP
+int show_tcp = 0;
+#endif
+
+static tcp_socket_t tcp_sock;
+static int state;
+static int _timeout = 500;
+static int orig_console, orig_debug;
+
+static int in_buflen = 0;
+static unsigned char in_buf[64];
+static unsigned char *in_bufp;
+static int out_buflen = 0;
+static unsigned char out_buf[1024];
+static unsigned char *out_bufp;
+static bool flush_output_lines = false;
+
+// Functions in this module
+static void net_io_flush(void);
+static void net_io_revert_console(void);
+static void net_io_putc(void*, cyg_uint8);
+
+// Special characters used by Telnet - must be interpretted here
+#define TELNET_IAC 0xFF // Interpret as command (escape)
+#define TELNET_IP 0xF4 // Interrupt process
+#define TELNET_WONT 0xFC // I Won't do it
+#define TELNET_DO 0xFD // Will you XXX
+#define TELNET_TM 0x06 // Time marker (special DO/WONT after IP)
+
+static cyg_bool
+_net_io_getc_nonblock(void* __ch_data, cyg_uint8* ch)
+{
+ if (in_buflen == 0) {
+ __tcp_poll();
+ if (tcp_sock.state == _CLOSE_WAIT) {
+ // This connection is breaking
+ if (tcp_sock.data_bytes == 0 && tcp_sock.rxcnt == 0) {
+ __tcp_close(&tcp_sock);
+ return false;
+ }
+ }
+ if (tcp_sock.state == _CLOSED) {
+ // The connection is gone
+ net_io_revert_console();
+ *ch = '\n';
+ return true;
+ }
+ in_buflen = __tcp_read(&tcp_sock, in_buf, sizeof(in_buf));
+ in_bufp = in_buf;
+#ifdef DEBUG_TCP
+ if (show_tcp && (in_buflen > 0)) {
+ int old_console;
+ old_console = start_console();
+ diag_printf("%s:%d\n", __FUNCTION__, __LINE__);
+ diag_dump_buf(in_buf, in_buflen);
+ end_console(old_console);
+ }
+#endif // DEBUG_TCP
+ }
+ if (in_buflen) {
+ *ch = *in_bufp++;
+ in_buflen--;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+static cyg_bool
+net_io_getc_nonblock(void* __ch_data, cyg_uint8* ch)
+{
+ cyg_uint8 esc;
+
+ if (!_net_io_getc_nonblock(__ch_data, ch))
+ return false;
+
+ if (gdb_active || *ch != TELNET_IAC)
+ return true;
+
+ // Telnet escape - need to read/handle more
+ while (!_net_io_getc_nonblock(__ch_data, &esc)) ;
+
+ switch (esc) {
+ case TELNET_IAC:
+ // The other special case - escaped escape
+ return true;
+ case TELNET_IP:
+ // Special case for ^C == Interrupt Process
+ *ch = 0x03;
+ // Just in case the other end needs synchronizing
+ net_io_putc(__ch_data, TELNET_IAC);
+ net_io_putc(__ch_data, TELNET_WONT);
+ net_io_putc(__ch_data, TELNET_TM);
+ net_io_flush();
+ return true;
+ case TELNET_DO:
+ // Telnet DO option
+ while (!_net_io_getc_nonblock(__ch_data, &esc)) ;
+ // Respond with WONT option
+ net_io_putc(__ch_data, TELNET_IAC);
+ net_io_putc(__ch_data, TELNET_WONT);
+ net_io_putc(__ch_data, esc);
+ return false; // Ignore this whole thing!
+ default:
+ return false;
+ }
+}
+
+static cyg_uint8
+net_io_getc(void* __ch_data)
+{
+ cyg_uint8 ch;
+ int idle_timeout = 10; // 10ms
+
+ CYGARC_HAL_SAVE_GP();
+ while (true) {
+ if (net_io_getc_nonblock(__ch_data, &ch)) break;
+ if (--idle_timeout == 0) {
+ net_io_flush();
+ idle_timeout = 10;
+ }
+ }
+ CYGARC_HAL_RESTORE_GP();
+ return ch;
+}
+
+static void
+net_io_flush(void)
+{
+ int n;
+ char *bp = out_buf;
+
+#ifdef DEBUG_TCP
+ if (show_tcp) {
+ int old_console;
+ old_console = start_console();
+ diag_printf("%s.%d\n", __FUNCTION__, __LINE__);
+ diag_dump_buf(out_buf, out_buflen);
+ end_console(old_console);
+ }
+#endif // SHOW_TCP
+ n = __tcp_write_block(&tcp_sock, bp, out_buflen);
+ if (n < 0) {
+ // The connection is gone!
+ net_io_revert_console();
+ } else {
+ out_buflen -= n;
+ bp += n;
+ }
+ out_bufp = out_buf; out_buflen = 0;
+ // Check interrupt flag
+ if (CYGACC_CALL_IF_CONSOLE_INTERRUPT_FLAG()) {
+ CYGACC_CALL_IF_CONSOLE_INTERRUPT_FLAG_SET(0);
+ cyg_hal_user_break(0);
+ }
+}
+
+static void
+net_io_putc(void* __ch_data, cyg_uint8 c)
+{
+ static bool have_dollar, have_hash;
+ static int hash_count;
+
+ CYGARC_HAL_SAVE_GP();
+ *out_bufp++ = c;
+ if (c == '$') have_dollar = true;
+ if (have_dollar && (c == '#')) {
+ have_hash = true;
+ hash_count = 0;
+ }
+ if ((++out_buflen == sizeof(out_buf)) ||
+ (flush_output_lines && c == '\n') ||
+ (have_hash && (++hash_count == 3))) {
+ net_io_flush();
+ have_dollar = false;
+ }
+ CYGARC_HAL_RESTORE_GP();
+}
+
+static void
+net_io_write(void* __ch_data, const cyg_uint8* __buf, cyg_uint32 __len)
+{
+ int old_console;
+
+ old_console = start_console();
+ diag_printf("%s.%d\n", __FUNCTION__, __LINE__);
+ end_console(old_console);
+#if 0
+ CYGARC_HAL_SAVE_GP();
+
+ while(__len-- > 0)
+ net_io_putc(__ch_data, *__buf++);
+
+ CYGARC_HAL_RESTORE_GP();
+#endif
+}
+
+static void
+net_io_read(void* __ch_data, cyg_uint8* __buf, cyg_uint32 __len)
+{
+ int old_console;
+
+ old_console = start_console();
+ diag_printf("%s.%d\n", __FUNCTION__, __LINE__);
+ end_console(old_console);
+#if 0
+ CYGARC_HAL_SAVE_GP();
+
+ while(__len-- > 0)
+ *__buf++ = net_io_getc(__ch_data);
+
+ CYGARC_HAL_RESTORE_GP();
+#endif
+}
+
+static cyg_bool
+net_io_getc_timeout(void* __ch_data, cyg_uint8* ch)
+{
+ int delay_count;
+ cyg_bool res;
+
+ CYGARC_HAL_SAVE_GP();
+ net_io_flush(); // Make sure any output has been sent
+ delay_count = _timeout;
+
+ for(;;) {
+ res = net_io_getc_nonblock(__ch_data, ch);
+ if (res || 0 == delay_count--)
+ break;
+ }
+
+ CYGARC_HAL_RESTORE_GP();
+
+ return res;
+}
+
+static int
+net_io_control(void *__ch_data, __comm_control_cmd_t __func, ...)
+{
+ static int vector = 0;
+ int ret = 0;
+ static int irq_state = 0;
+
+ CYGARC_HAL_SAVE_GP();
+
+ switch (__func) {
+ case __COMMCTL_IRQ_ENABLE:
+ irq_state = 1;
+ if (vector == 0) {
+ vector = eth_drv_int_vector();
+ }
+ HAL_INTERRUPT_UNMASK(vector);
+ break;
+ case __COMMCTL_IRQ_DISABLE:
+ ret = irq_state;
+ irq_state = 0;
+ if (vector == 0) {
+ vector = eth_drv_int_vector();
+ }
+ HAL_INTERRUPT_MASK(vector);
+ break;
+ case __COMMCTL_DBG_ISR_VECTOR:
+ ret = vector;
+ break;
+ case __COMMCTL_SET_TIMEOUT:
+ {
+ va_list ap;
+
+ va_start(ap, __func);
+
+ ret = _timeout;
+ _timeout = va_arg(ap, cyg_uint32);
+
+ va_end(ap);
+ break;
+ }
+ case __COMMCTL_FLUSH_OUTPUT:
+ net_io_flush();
+ break;
+ case __COMMCTL_ENABLE_LINE_FLUSH:
+ flush_output_lines = true;
+ break;
+ case __COMMCTL_DISABLE_LINE_FLUSH:
+ flush_output_lines = false;
+ break;
+ default:
+ break;
+ }
+ CYGARC_HAL_RESTORE_GP();
+ return ret;
+}
+
+static int
+net_io_isr(void *__ch_data, int* __ctrlc,
+ CYG_ADDRWORD __vector, CYG_ADDRWORD __data)
+{
+ char ch;
+
+ CYGARC_HAL_SAVE_GP();
+ *__ctrlc = 0;
+ if (net_io_getc_nonblock(__ch_data, &ch)) {
+ if (ch == 0x03) {
+ *__ctrlc = 1;
+ }
+ }
+ CYGARC_HAL_RESTORE_GP();
+ return CYG_ISR_HANDLED;
+}
+
+// TEMP
+
+int
+start_console(void)
+{
+ int cur_console =
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+ int i = 0;
+ if ( flash_get_config( "info_console_force", &i, CONFIG_BOOL) )
+ if ( i )
+ if ( ! flash_get_config( "info_console_number", &i, CONFIG_INT) )
+ i = 0; // the default, if that call failed.
+ if ( i )
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(i);
+ else
+#endif
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(0);
+
+ return cur_console;
+}
+
+void
+end_console(int old_console)
+{
+ // Restore original console
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(old_console);
+}
+// TEMP
+
+static void
+net_io_revert_console(void)
+{
+#ifdef CYGPKG_REDBOOT_ANY_CONSOLE
+ console_selected = false;
+#endif
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(orig_console);
+ CYGACC_CALL_IF_SET_DEBUG_COMM(orig_debug);
+ console_echo = true;
+}
+
+static void
+net_io_assume_console(void)
+{
+#ifdef CYGPKG_REDBOOT_ANY_CONSOLE
+ console_selected = true;
+#endif
+ console_echo = false;
+ orig_console = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(TCP_CHANNEL);
+ orig_debug = CYGACC_CALL_IF_SET_DEBUG_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+ CYGACC_CALL_IF_SET_DEBUG_COMM(TCP_CHANNEL);
+}
+
+static void
+net_io_init(void)
+{
+ static int init = 0;
+ if (!init) {
+ hal_virtual_comm_table_t* comm;
+ int cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+
+ // Setup procs in the vector table
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(TCP_CHANNEL);
+ comm = CYGACC_CALL_IF_CONSOLE_PROCS();
+ //CYGACC_COMM_IF_CH_DATA_SET(*comm, chan);
+ CYGACC_COMM_IF_WRITE_SET(*comm, net_io_write);
+ CYGACC_COMM_IF_READ_SET(*comm, net_io_read);
+ CYGACC_COMM_IF_PUTC_SET(*comm, net_io_putc);
+ CYGACC_COMM_IF_GETC_SET(*comm, net_io_getc);
+ CYGACC_COMM_IF_CONTROL_SET(*comm, net_io_control);
+ CYGACC_COMM_IF_DBG_ISR_SET(*comm, net_io_isr);
+ CYGACC_COMM_IF_GETC_TIMEOUT_SET(*comm, net_io_getc_timeout);
+
+ // Disable interrupts via this interface to set static
+ // state into correct state.
+ net_io_control( comm, __COMMCTL_IRQ_DISABLE );
+
+ // Restore original console
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
+
+ init = 1;
+ gdb_active = false;
+ }
+ __tcp_listen(&tcp_sock, gdb_port);
+ state = tcp_sock.state;
+#ifdef DEBUG_TCP
+ diag_printf("show tcp = %p\n", (void *)&show_tcp);
+#endif
+}
+
+// Check for incoming TCP debug connection
+void
+net_io_test(bool is_idle)
+{
+ if (!is_idle) return; // Only care about idle case
+ if (!have_net) return;
+ __tcp_poll();
+ if (state != tcp_sock.state) {
+ // Something has changed
+ if (tcp_sock.state == _ESTABLISHED) {
+ // A new connection has arrived
+ net_io_assume_console();
+ in_bufp = in_buf; in_buflen = 1; *in_bufp = '\r';
+ out_bufp = out_buf; out_buflen = 0;
+ }
+ if (tcp_sock.state == _CLOSED) {
+ net_io_init(); // Get ready for another connection
+ }
+ }
+ state = tcp_sock.state;
+}
+
+// This schedules the 'net_io_test()' function to be run by RedBoot's
+// main command loop when idle (i.e. when no input arrives after some
+// period of time).
+RedBoot_idle(net_io_test, RedBoot_IDLE_NETIO);
+
+//
+// Network initialization
+//
+#include <cyg/io/eth/eth_drv.h>
+#include <cyg/io/eth/netdev.h>
+#include <cyg/hal/hal_tables.h>
+
+// Define table boundaries
+CYG_HAL_TABLE_BEGIN( __NETDEVTAB__, netdev );
+CYG_HAL_TABLE_END( __NETDEVTAB_END__, netdev );
+
+RedBoot_init(net_init, RedBoot_INIT_LAST);
+
+static void
+show_addrs(void)
+{
+ diag_printf("IP: %s", inet_ntoa((in_addr_t *)&__local_ip_addr));
+#ifdef CYGSEM_REDBOOT_NETWORKING_USE_GATEWAY
+ diag_printf("/%s", inet_ntoa((in_addr_t *)&__local_ip_mask));
+ diag_printf(", Gateway: %s\n", inet_ntoa((in_addr_t *)&__local_ip_gate));
+#else
+ diag_printf(", ");
+#endif
+ diag_printf("Default server: %s", inet_ntoa(&my_bootp_info.bp_siaddr));
+#ifdef CYGPKG_REDBOOT_NETWORKING_DNS
+ show_dns();
+#endif
+ diag_printf("\n");
+}
+
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+static void
+flash_get_IP(char *id, ip_addr_t *val)
+{
+ ip_addr_t my_ip;
+ int i;
+
+ if (flash_get_config(id, &my_ip, CONFIG_IP)) {
+ if (my_ip[0] != 0 || my_ip[1] != 0 ||
+ my_ip[2] != 0 || my_ip[3] != 0) {
+ // 'id' is set to something so let it override any static IP
+ for (i=0; i<4; i++)
+ (*val)[i] = my_ip[i];
+ }
+ }
+}
+#endif
+
+static cyg_netdevtab_entry_t *
+net_devtab_entry(unsigned index)
+{
+ cyg_netdevtab_entry_t *t = &__NETDEVTAB__[index];
+
+ if (t < &__NETDEVTAB__[0] || t >= &__NETDEVTAB_END__)
+ return NULL;
+
+ return t;
+}
+
+const char *
+net_devname(unsigned index)
+{
+ cyg_netdevtab_entry_t *t = net_devtab_entry(index);
+ if (t)
+ return t->name;
+ return NULL;
+}
+
+int
+net_devindex(char *name)
+{
+ const char *devname;
+ int index;
+
+ for (index = 0; (devname = net_devname(index)) != NULL; index++)
+ if (!strcmp(name, devname))
+ return index;
+ return -1;
+}
+
+static void
+show_eth_info(void)
+{
+ diag_printf("Ethernet %s: MAC address %02x:%02x:%02x:%02x:%02x:%02x\n",
+ __local_enet_sc->dev_name,
+ __local_enet_addr[0],
+ __local_enet_addr[1],
+ __local_enet_addr[2],
+ __local_enet_addr[3],
+ __local_enet_addr[4],
+ __local_enet_addr[5]);
+}
+
+void
+net_init(void)
+{
+ cyg_netdevtab_entry_t *t;
+ unsigned index;
+ struct eth_drv_sc *primary_net = (struct eth_drv_sc *)0;
+#if defined(CYGHWR_NET_DRIVERS) && (CYGHWR_NET_DRIVERS > 1)
+ char *default_devname;
+ int default_index;
+#endif
+#ifdef CYGDAT_REDBOOT_DEFAULT_BOOTP_SERVER_IP_ADDR
+ char ip_addr[16];
+#endif
+
+ // Set defaults as appropriate
+#ifdef CYGSEM_REDBOOT_DEFAULT_NO_BOOTP
+ use_bootp = false;
+#else
+ use_bootp = true;
+#endif
+#ifdef CYGDBG_REDBOOT_NET_DEBUG
+ net_debug = true;
+#else
+ net_debug = false;
+#endif
+ gdb_port = CYGNUM_REDBOOT_NETWORKING_TCP_PORT;
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+ // Fetch values from saved config data, if available
+#if defined(CYGHWR_NET_DRIVERS) && (CYGHWR_NET_DRIVERS > 1)
+ flash_get_config("net_device", &default_devname, CONFIG_NETPORT);
+#endif
+ flash_get_config("net_debug", &net_debug, CONFIG_BOOL);
+ flash_get_config("gdb_port", &gdb_port, CONFIG_INT);
+ flash_get_config("bootp", &use_bootp, CONFIG_BOOL);
+ if (!use_bootp) {
+ flash_get_IP("bootp_my_ip", &__local_ip_addr);
+#ifdef CYGSEM_REDBOOT_NETWORKING_USE_GATEWAY
+ flash_get_IP("bootp_my_ip_mask", &__local_ip_mask);
+ flash_get_IP("bootp_my_gateway_ip", &__local_ip_gate);
+#endif
+ }
+#endif
+# ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG
+ // Don't override if the user has deliberately set something more
+ // verbose.
+ if (0 == cyg_io_eth_net_debug)
+ cyg_io_eth_net_debug = net_debug;
+# endif
+ have_net = false;
+ // Make sure the recv buffers are set up
+ eth_drv_buffers_init();
+ __pktbuf_init();
+
+ // Initialize network device(s).
+#if defined(CYGHWR_NET_DRIVERS) && (CYGHWR_NET_DRIVERS > 1)
+ default_index = net_devindex(default_devname);
+ if (default_index < 0)
+ default_index = 0;
+#ifdef CYGSEM_REDBOOT_NETWORK_INIT_ONE_DEVICE
+ if ((t = net_devtab_entry(default_index)) != NULL && t->init(t)) {
+ t->status = CYG_NETDEVTAB_STATUS_AVAIL;
+ primary_net = __local_enet_sc;
+ } else
+#endif
+#endif
+ for (index = 0; (t = net_devtab_entry(index)) != NULL; index++) {
+#ifdef CYGSEM_REDBOOT_NETWORK_INIT_ONE_DEVICE
+ if (index == default_index)
+ continue;
+#endif
+ if (t->init(t)) {
+ t->status = CYG_NETDEVTAB_STATUS_AVAIL;
+ if (primary_net == (struct eth_drv_sc *)0) {
+ primary_net = __local_enet_sc;
+ }
+#if defined(CYGHWR_NET_DRIVERS) && (CYGHWR_NET_DRIVERS > 1)
+ if (index == default_index) {
+ primary_net = __local_enet_sc;
+ }
+#endif
+ }
+ }
+ __local_enet_sc = primary_net;
+
+ if (!__local_enet_sc) {
+ diag_printf("No network interfaces found\n");
+ return;
+ }
+ // Initialize the network [if present]
+ if (use_bootp) {
+ if (__bootp_find_local_ip(&my_bootp_info) == 0) {
+ have_net = true;
+ } else {
+ // Is it an unset address, or has it been set to a static addr
+ if (__local_ip_addr[0] == 0 && __local_ip_addr[1] == 0 &&
+ __local_ip_addr[2] == 0 && __local_ip_addr[3] == 0) {
+ show_eth_info();
+ diag_printf("Can't get BOOTP info for device!\n");
+ } else {
+ diag_printf("Can't get BOOTP info, using default IP address\n");
+ have_net = true;
+ }
+ }
+ } else {
+ if (__local_ip_addr[0] == 0 && __local_ip_addr[1] == 0 &&
+ __local_ip_addr[2] == 0 && __local_ip_addr[3] == 0) {
+ show_eth_info();
+ diag_printf("No IP info for device!\n");
+ } else {
+ enet_addr_t enet_addr;
+ have_net = true; // Assume values in FLASH were OK
+ // Tell the world that we are using this fixed IP address
+ if (__arp_request((ip_addr_t *)__local_ip_addr, &enet_addr, 1) >= 0) {
+ diag_printf("Warning: IP address %s in use\n", inet_ntoa((in_addr_t *)&__local_ip_addr));
+ }
+ }
+ }
+ if (have_net) {
+ show_eth_info();
+#ifdef CYGDAT_REDBOOT_DEFAULT_BOOTP_SERVER_IP_ADDR
+ diag_sprintf(ip_addr, "%d.%d.%d.%d",
+ CYGDAT_REDBOOT_DEFAULT_BOOTP_SERVER_IP_ADDR);
+ inet_aton(ip_addr, &my_bootp_info.bp_siaddr);
+#endif
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+ flash_get_IP("bootp_server_ip", (ip_addr_t *)&my_bootp_info.bp_siaddr);
+#endif
+#ifdef CYGPKG_REDBOOT_NETWORKING_DNS
+ redboot_dns_res_init();
+#endif
+ show_addrs();
+ net_io_init();
+ }
+}
+
+static char usage[] = "[-b] [-l <local_ip_address>[/<mask_len>]] [-h <server_address>]"
+#ifdef CYGPKG_REDBOOT_NETWORKING_DNS
+ " [-d <dns_server_address]"
+#endif
+ ;
+
+// Exported CLI function
+static void do_ip_addr(int argc, char *argv[]);
+RedBoot_cmd("ip_address",
+ "Set/change IP addresses",
+ usage,
+ do_ip_addr
+ );
+
+void
+do_ip_addr(int argc, char *argv[])
+{
+ struct option_info opts[4];
+ char *ip_addr, *host_addr;
+ bool ip_addr_set, host_addr_set;
+ bool do_bootp = false;
+ struct sockaddr_in host;
+#ifdef CYGPKG_REDBOOT_NETWORKING_DNS
+ char *dns_addr;
+ bool dns_addr_set;
+#endif
+ int num_opts;
+
+ init_opts(&opts[0], 'l', true, OPTION_ARG_TYPE_STR,
+ (void *)&ip_addr, (bool *)&ip_addr_set, "local IP address");
+ init_opts(&opts[1], 'h', true, OPTION_ARG_TYPE_STR,
+ (void *)&host_addr, (bool *)&host_addr_set, "default server address");
+ init_opts(&opts[2], 'b', false, OPTION_ARG_TYPE_FLG,
+ &do_bootp, 0, "use BOOTP");
+ num_opts = 3;
+#ifdef CYGPKG_REDBOOT_NETWORKING_DNS
+ init_opts(&opts[num_opts], 'd', true, OPTION_ARG_TYPE_STR,
+ (void *)&dns_addr, (bool *)&dns_addr_set, "DNS server address");
+ num_opts++;
+#endif
+
+ CYG_ASSERT(num_opts <= NUM_ELEMS(opts), "Too many options");
+
+ if (!scan_opts(argc, argv, 1, opts, num_opts, 0, 0, "")) {
+ return;
+ }
+ if (do_bootp) {
+ if (__bootp_find_local_ip(&my_bootp_info) != 0) {
+ diag_printf("Failed to get BOOTP address\n");
+ }
+ }
+ if (ip_addr_set) {
+#ifdef CYGSEM_REDBOOT_NETWORKING_USE_GATEWAY
+ char *slash_pos;
+ /* see if the (optional) mask length was given */
+ if( (slash_pos = strchr(ip_addr, '/')) ) {
+ int mask_len;
+ unsigned long mask;
+ *slash_pos = '\0';
+ slash_pos++;
+ if( !parse_num(slash_pos, (unsigned long *)&mask_len, 0, 0) ||
+ mask_len <= 0 || mask_len > 32 ) {
+ diag_printf("Invalid mask length: %s\n", slash_pos);
+ return;
+ }
+ mask = htonl((0xffffffff << (32-mask_len))&0xffffffff);
+ memcpy(&__local_ip_mask, &mask, 4);
+ }
+#endif
+ if (!_gethostbyname(ip_addr, (in_addr_t *)&host)) {
+ diag_printf("Invalid local IP address: %s\n", ip_addr);
+ return;
+ }
+ // Of course, each address goes in its own place :-)
+ memcpy(&__local_ip_addr, &host.sin_addr, sizeof(host.sin_addr));
+ }
+ if (host_addr_set) {
+ if (!_gethostbyname(host_addr, (in_addr_t *)&host)) {
+ diag_printf("Invalid server address: %s\n", host_addr);
+ return;
+ }
+ my_bootp_info.bp_siaddr = host.sin_addr;
+ }
+#ifdef CYGPKG_REDBOOT_NETWORKING_DNS
+ if (dns_addr_set) {
+ set_dns(dns_addr);
+ }
+#endif
+ show_addrs();
+ if (!have_net) {
+ have_net = true;
+ net_io_init();
+ }
+}
+
+// EOF net_io.c
diff --git a/cesar/ecos/packages/redboot/current/src/net/ping.c b/cesar/ecos/packages/redboot/current/src/net/ping.c
new file mode 100644
index 0000000000..74dcb0712a
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/net/ping.c
@@ -0,0 +1,248 @@
+//==========================================================================
+//
+// ping.c
+//
+// Network utility - ping
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2001-01-22
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <net/net.h>
+
+#ifndef CYGPKG_REDBOOT_NETWORKING
+#error CYGPKG_REDBOOT_NETWORKING required!
+#else
+
+static void do_ping(int argc, char *argv[]);
+RedBoot_cmd("ping",
+ "Network connectivity test",
+ "[-v] [-n <count>] [-l <length>] [-t <timeout>] [-r <rate>]\n"
+ " [-i <IP_addr>] -h <IP_addr>",
+ do_ping
+ );
+
+static bool icmp_received;
+static icmp_header_t hold_hdr;
+
+static void
+handle_icmp(pktbuf_t *pkt, ip_route_t *src_route)
+{
+ icmp_header_t *icmp;
+ unsigned short cksum;
+
+ icmp = pkt->icmp_hdr;
+ if (icmp->type == ICMP_TYPE_ECHOREQUEST
+ && icmp->code == 0
+ && __sum((word *)icmp, pkt->pkt_bytes, 0) == 0) {
+
+ icmp->type = ICMP_TYPE_ECHOREPLY;
+ icmp->checksum = 0;
+ cksum = __sum((word *)icmp, pkt->pkt_bytes, 0);
+ icmp->checksum = htons(cksum);
+ __ip_send(pkt, IP_PROTO_ICMP, src_route);
+ } else if (icmp->type == ICMP_TYPE_ECHOREPLY) {
+ memcpy(&hold_hdr, icmp, sizeof(*icmp));
+ icmp_received = true;
+ }
+}
+
+static void
+do_ping(int argc, char *argv[])
+{
+ struct option_info opts[7];
+ long count, timeout, length, rate, start_time, end_time, timer, received, tries;
+ char *local_ip_addr, *host_ip_addr;
+ bool local_ip_addr_set, host_ip_addr_set, count_set,
+ timeout_set, length_set, rate_set, verbose;
+ struct sockaddr_in local_addr, host_addr;
+ ip_addr_t hold_addr;
+ icmp_header_t *icmp;
+ pktbuf_t *pkt;
+ ip_header_t *ip;
+ unsigned short cksum;
+ ip_route_t dest_ip;
+
+ init_opts(&opts[0], 'n', true, OPTION_ARG_TYPE_NUM,
+ (void *)&count, (bool *)&count_set, "<count> - number of packets to test");
+ init_opts(&opts[1], 't', true, OPTION_ARG_TYPE_NUM,
+ (void *)&timeout, (bool *)&timeout_set, "<timeout> - max #ms per packet [rount trip]");
+ init_opts(&opts[2], 'i', true, OPTION_ARG_TYPE_STR,
+ (void *)&local_ip_addr, (bool *)&local_ip_addr_set, "local IP address");
+ init_opts(&opts[3], 'h', true, OPTION_ARG_TYPE_STR,
+ (void *)&host_ip_addr, (bool *)&host_ip_addr_set, "host name or IP address");
+ init_opts(&opts[4], 'l', true, OPTION_ARG_TYPE_NUM,
+ (void *)&length, (bool *)&length_set, "<length> - size of payload");
+ init_opts(&opts[5], 'v', false, OPTION_ARG_TYPE_FLG,
+ (void *)&verbose, (bool *)0, "verbose operation");
+ init_opts(&opts[6], 'r', true, OPTION_ARG_TYPE_NUM,
+ (void *)&rate, (bool *)&rate_set, "<rate> - time between packets");
+ if (!scan_opts(argc, argv, 1, opts, 7, (void **)0, 0, "")) {
+ diag_printf("PING - Invalid option specified\n");
+ return;
+ }
+ // Set defaults; this has to be done _after_ the scan, since it will
+ // have destroyed all values not explicitly set.
+ if (local_ip_addr_set) {
+ if (!_gethostbyname(local_ip_addr, (in_addr_t *)&local_addr)) {
+ diag_printf("PING - Invalid local name: %s\n", local_ip_addr);
+ return;
+ }
+ } else {
+ memcpy((in_addr_t *)&local_addr, __local_ip_addr, sizeof(__local_ip_addr));
+ }
+ if (host_ip_addr_set) {
+ if (!_gethostbyname(host_ip_addr, (in_addr_t *)&host_addr)) {
+ diag_printf("PING - Invalid host name: %s\n", host_ip_addr);
+ return;
+ }
+ if (__arp_lookup((ip_addr_t *)&host_addr.sin_addr, &dest_ip) < 0) {
+ diag_printf("PING: Cannot reach server '%s' (%s)\n",
+ host_ip_addr, inet_ntoa((in_addr_t *)&host_addr));
+ return;
+ }
+ } else {
+ diag_printf("PING - host name or IP address required\n");
+ return;
+ }
+#define DEFAULT_LENGTH 64
+#define DEFAULT_COUNT 10
+#define DEFAULT_TIMEOUT 1000
+#define DEFAULT_RATE 1000
+ if (!rate_set) {
+ rate = DEFAULT_RATE;
+ }
+ if (!length_set) {
+ length = DEFAULT_LENGTH;
+ }
+ if ((length < 64) || (length > 1400)) {
+ diag_printf("Invalid length specified: %ld\n", length);
+ return;
+ }
+ if (!count_set) {
+ count = DEFAULT_COUNT;
+ }
+ if (!timeout_set) {
+ timeout = DEFAULT_TIMEOUT;
+ }
+ // Note: two prints here because 'inet_ntoa' returns a static pointer
+ diag_printf("Network PING - from %s",
+ inet_ntoa((in_addr_t *)&local_addr));
+ diag_printf(" to %s\n",
+ inet_ntoa((in_addr_t *)&host_addr));
+ received = 0;
+ __icmp_install_listener(handle_icmp);
+ // Save default "local" address
+ memcpy(hold_addr, __local_ip_addr, sizeof(hold_addr));
+ for (tries = 0; tries < count; tries++) {
+ // The network stack uses the global variable '__local_ip_addr'
+ memcpy(__local_ip_addr, &local_addr, sizeof(__local_ip_addr));
+ // Build 'ping' request
+ if ((pkt = __pktbuf_alloc(ETH_MAX_PKTLEN)) == NULL) {
+ // Give up if no packets - something is wrong
+ break;
+ }
+
+ icmp = pkt->icmp_hdr;
+ ip = pkt->ip_hdr;
+ pkt->pkt_bytes = length + sizeof(icmp_header_t);
+
+ icmp->type = ICMP_TYPE_ECHOREQUEST;
+ icmp->code = 0;
+ icmp->checksum = 0;
+ icmp->seqnum = htons(tries+1);
+ cksum = __sum((word *)icmp, pkt->pkt_bytes, 0);
+ icmp->checksum = htons(cksum);
+
+ memcpy(ip->source, (in_addr_t *)&local_addr, sizeof(ip_addr_t));
+ memcpy(ip->destination, (in_addr_t *)&host_addr, sizeof(ip_addr_t));
+ ip->protocol = IP_PROTO_ICMP;
+ ip->length = htons(pkt->pkt_bytes);
+
+ __ip_send(pkt, IP_PROTO_ICMP, &dest_ip);
+ __pktbuf_free(pkt);
+
+ start_time = MS_TICKS();
+ timer = start_time + timeout;
+ icmp_received = false;
+ while (!icmp_received && (MS_TICKS_DELAY() < timer)) {
+ if (_rb_break(1)) {
+ goto abort;
+ }
+ MS_TICKS_DELAY();
+ __enet_poll();
+ }
+ end_time = MS_TICKS();
+
+ timer = MS_TICKS() + rate;
+ while (MS_TICKS_DELAY() < timer) {
+ if (_rb_break(1)) {
+ goto abort;
+ }
+ MS_TICKS_DELAY();
+ __enet_poll();
+ }
+
+ if (icmp_received) {
+ received++;
+ if (verbose) {
+ diag_printf(" seq: %d, time: %ld (ticks)\n",
+ ntohs(hold_hdr.seqnum), end_time-start_time);
+ }
+ }
+ }
+ abort:
+ __icmp_remove_listener();
+ // Clean up
+ memcpy(__local_ip_addr, &hold_addr, sizeof(__local_ip_addr));
+ // Report
+ diag_printf("PING - received %ld of %ld expected\n", received, count);
+}
+
+#endif //CYGPKG_REDBOOT_NETWORKING
diff --git a/cesar/ecos/packages/redboot/current/src/net/pktbuf.c b/cesar/ecos/packages/redboot/current/src/net/pktbuf.c
new file mode 100644
index 0000000000..584e84befa
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/net/pktbuf.c
@@ -0,0 +1,167 @@
+//==========================================================================
+//
+// net/pktbuf.c
+//
+// Stand-alone network packet support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <net/net.h>
+
+#define MAX_PKTBUF CYGNUM_REDBOOT_NETWORKING_MAX_PKTBUF
+
+#define BUFF_STATS 1
+
+#if BUFF_STATS
+int max_alloc = 0;
+int num_alloc = 0;
+int num_free = 0;
+#endif
+
+static pktbuf_t pktbuf_list[MAX_PKTBUF];
+static word bufdata[MAX_PKTBUF][ETH_MAX_PKTLEN/2 + 1];
+static pktbuf_t *free_list;
+
+
+/*
+ * Initialize the free list.
+ */
+void
+__pktbuf_init(void)
+{
+ int i;
+ word *p;
+ static int init = 0;
+
+ if (init) return;
+ init = 1;
+
+ for (i = 0; i < MAX_PKTBUF; i++) {
+ p = bufdata[i];
+ if ((((unsigned long)p) & 2) != 0)
+ ++p;
+ pktbuf_list[i].buf = p;
+ pktbuf_list[i].bufsize = ETH_MAX_PKTLEN;
+ pktbuf_list[i].next = free_list;
+ free_list = &pktbuf_list[i];
+ }
+}
+
+void
+__pktbuf_dump(void)
+{
+ int i;
+ for (i = 0; i < MAX_PKTBUF; i++) {
+ diag_printf("Buf[%d]/%p: buf: %p, len: %d/%d, next: %p\n",
+ i,
+ (void*)&pktbuf_list[i],
+ (void*)pktbuf_list[i].buf,
+ pktbuf_list[i].bufsize,
+ pktbuf_list[i].pkt_bytes,
+ (void*)pktbuf_list[i].next);
+ }
+ diag_printf("Free list = %p\n", (void*)free_list);
+}
+
+/*
+ * simple pktbuf allocation
+ */
+pktbuf_t *
+__pktbuf_alloc(int nbytes)
+{
+ pktbuf_t *p = free_list;
+
+ if (p) {
+ free_list = p->next;
+ p->ip_hdr = (ip_header_t *)p->buf;
+ p->tcp_hdr = (tcp_header_t *)(p->ip_hdr + 1);
+ p->pkt_bytes = 0;
+#if BUFF_STATS
+ ++num_alloc;
+ if ((num_alloc - num_free) > max_alloc)
+ max_alloc = num_alloc - num_free;
+#endif
+ }
+ return p;
+}
+
+
+/*
+ * free a pktbuf.
+ */
+void
+__pktbuf_free(pktbuf_t *pkt)
+{
+#if BUFF_STATS
+ --num_alloc;
+#endif
+#ifdef BSP_LOG
+ {
+ int i;
+ word *p;
+
+ for (i = 0; i < MAX_PKTBUF; i++) {
+ p = bufdata[i];
+ if ((((unsigned long)p) & 2) == 0)
+ ++p;
+ if (p == (word *)pkt)
+ break;
+ }
+ if (i < MAX_PKTBUF) {
+ BSPLOG(bsp_log("__pktbuf_free: bad pkt[%x].\n", pkt));
+ BSPLOG(while(1));
+ }
+ }
+#endif
+ pkt->next = free_list;
+ free_list = pkt;
+}
+
+
diff --git a/cesar/ecos/packages/redboot/current/src/net/tcp.c b/cesar/ecos/packages/redboot/current/src/net/tcp.c
new file mode 100644
index 0000000000..44fde44d08
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/net/tcp.c
@@ -0,0 +1,921 @@
+//==========================================================================
+//
+// net/tcp.c
+//
+// Stand-alone TCP networking support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <net/net.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_if.h>
+
+#define MAX_TCP_SEGMENT (ETH_MAX_PKTLEN - (sizeof(eth_header_t) + sizeof(ip_header_t)))
+#define MAX_TCP_DATA (MAX_TCP_SEGMENT - sizeof(tcp_header_t))
+
+
+/* sequence number comparison macros */
+#define SEQ_LT(a,b) ((int)((a)-(b)) < 0)
+#define SEQ_LE(a,b) ((int)((a)-(b)) <= 0)
+#define SEQ_GT(a,b) ((int)((a)-(b)) > 0)
+#define SEQ_GE(a,b) ((int)((a)-(b)) >= 0)
+
+/* Set a timer which will send an RST and abort a connection. */
+static timer_t abort_timer;
+
+static void do_retrans(void *p);
+static void do_close(void *p);
+
+#ifdef BSP_LOG
+static char *
+flags_to_str(octet f)
+{
+ static char str[7], *p;
+
+ p = str;
+
+ if (f & TCP_FLAG_FIN)
+ *p++ = 'F';
+ if (f & TCP_FLAG_SYN)
+ *p++ = 'S';
+ if (f & TCP_FLAG_RST)
+ *p++ = 'R';
+ if (f & TCP_FLAG_PSH)
+ *p++ = 'P';
+ if (f & TCP_FLAG_ACK)
+ *p++ = 'A';
+ if (f & TCP_FLAG_URG)
+ *p++ = 'U';
+ *p = '\0';
+ return str;
+}
+#endif
+
+/*
+ * A major assumption is that only a very small number of sockets will
+ * active, so a simple linear search of those sockets is acceptible.
+ */
+static tcp_socket_t *tcp_list;
+
+/*
+ * Format and send an outgoing segment.
+ */
+static void
+tcp_send(tcp_socket_t *s, int flags, int resend)
+{
+ tcp_header_t *tcp;
+ ip_header_t *ip;
+ pktbuf_t *pkt = &s->pkt;
+ unsigned short cksum;
+ dword tcp_magic;
+ int tcp_magic_size = sizeof(tcp_magic);
+
+ ip = pkt->ip_hdr;
+ tcp = pkt->tcp_hdr;
+
+ if (flags & TCP_FLAG_SYN) {
+ /* If SYN, assume no data and send MSS option in tcp header */
+ pkt->pkt_bytes = sizeof(tcp_header_t) + 4;
+ tcp->hdr_len = 6;
+ tcp_magic = htonl(0x02040000 | MAX_TCP_DATA);
+ memcpy((unsigned char *)(tcp+1), &tcp_magic, tcp_magic_size);
+ s->data_bytes = 0;
+ } else {
+ pkt->pkt_bytes = s->data_bytes + sizeof(tcp_header_t);
+ tcp->hdr_len = 5;
+ }
+
+ /* tcp header */
+ tcp->reserved = 0;
+ tcp->seqnum = htonl(s->seq);
+ tcp->acknum = htonl(s->ack);
+ tcp->checksum = 0;
+
+ if (!resend) {
+ tcp->src_port = htons(s->our_port);
+ tcp->dest_port = htons(s->his_port);
+ tcp->flags = flags;
+ /* always set PUSH flag if sending data */
+ if (s->data_bytes)
+ tcp->flags |= TCP_FLAG_PSH;
+ tcp->window = htons(MAX_TCP_DATA);
+ tcp->urgent = 0;
+
+ /* fill in some pseudo-header fields */
+ memcpy(ip->source, __local_ip_addr, sizeof(ip_addr_t));
+ memcpy(ip->destination, s->his_addr.ip_addr, sizeof(ip_addr_t));
+ ip->protocol = IP_PROTO_TCP;
+ }
+
+ /* another pseudo-header field */
+ ip->length = htons(pkt->pkt_bytes);
+
+ /* compute tcp checksum */
+ cksum = __sum((word *)tcp, pkt->pkt_bytes, __pseudo_sum(ip));
+ tcp->checksum = htons(cksum);
+
+ __ip_send(pkt, IP_PROTO_TCP, &s->his_addr);
+
+ // HACK! If this delay is not present, then if the target system sends
+ // back data (not just an ACK), then somehow we miss it :-(
+ CYGACC_CALL_IF_DELAY_US(2*1000);
+
+ BSPLOG(bsp_log("tcp_send: state[%d] flags[%s] ack[%x] data[%d].\n",
+ s->state, flags_to_str(tcp->flags), s->ack, s->data_bytes));
+
+ if (s->state == _TIME_WAIT) {
+ // If 'reuse' is set on socket, close after 1 second, otherwise 2 minutes
+ __timer_set(&s->timer, s->reuse ? 1000 : 120000, do_close, s);
+ }
+ else if ((tcp->flags & (TCP_FLAG_FIN | TCP_FLAG_SYN)) || s->data_bytes)
+ __timer_set(&s->timer, 1000, do_retrans, s);
+}
+
+static pktbuf_t ack_pkt;
+static word ack_buf[ETH_MIN_PKTLEN/sizeof(word)];
+
+/*
+ * Send an ack.
+ */
+static void
+send_ack(tcp_socket_t *s)
+{
+ tcp_header_t *tcp;
+ ip_header_t *ip;
+ unsigned short cksum;
+
+ ack_pkt.buf = ack_buf;
+ ack_pkt.bufsize = sizeof(ack_buf);
+ ack_pkt.ip_hdr = ip = (ip_header_t *)ack_buf;
+ ack_pkt.tcp_hdr = tcp = (tcp_header_t *)(ip + 1);
+ ack_pkt.pkt_bytes = sizeof(tcp_header_t);
+
+ /* tcp header */
+ tcp->hdr_len = 5;
+ tcp->reserved = 0;
+ tcp->seqnum = htonl(s->seq);
+ tcp->acknum = htonl(s->ack);
+ tcp->checksum = 0;
+
+ tcp->src_port = htons(s->our_port);
+ tcp->dest_port = htons(s->his_port);
+ tcp->flags = TCP_FLAG_ACK;
+
+ tcp->window = htons(MAX_TCP_DATA);
+ tcp->urgent = 0;
+
+ /* fill in some pseudo-header fields */
+ memcpy(ip->source, __local_ip_addr, sizeof(ip_addr_t));
+ memcpy(ip->destination, s->his_addr.ip_addr, sizeof(ip_addr_t));
+ ip->protocol = IP_PROTO_TCP;
+
+ /* another pseudo-header field */
+ ip->length = htons(sizeof(tcp_header_t));
+
+ /* compute tcp checksum */
+ cksum = __sum((word *)tcp, sizeof(*tcp), __pseudo_sum(ip));
+ tcp->checksum = htons(cksum);
+
+ __ip_send(&ack_pkt, IP_PROTO_TCP, &s->his_addr);
+}
+
+
+/*
+ * Send a reset for a bogus incoming segment.
+ */
+static void
+send_reset(pktbuf_t *pkt, ip_route_t *r)
+{
+ ip_header_t *ip = pkt->ip_hdr;
+ tcp_header_t *tcp = pkt->tcp_hdr;
+ dword seq, ack;
+ word src, dest;
+ word cksum;
+
+ seq = ntohl(tcp->acknum);
+ ack = ntohl(tcp->seqnum);
+ src = ntohs(tcp->dest_port);
+ dest = ntohs(tcp->src_port);
+
+ tcp = (tcp_header_t *)(ip + 1);
+ pkt->pkt_bytes = sizeof(tcp_header_t);
+
+ /* tcp header */
+ tcp->hdr_len = 5;
+ tcp->reserved = 0;
+ tcp->seqnum = htonl(seq);
+ tcp->acknum = htonl(ack);
+ tcp->window = htons(1024);
+ tcp->urgent = 0;
+ tcp->checksum = 0;
+ tcp->src_port = htons(src);
+ tcp->dest_port = htons(dest);
+ tcp->flags = TCP_FLAG_RST | TCP_FLAG_ACK;
+
+ /* fill in some pseudo-header fields */
+ memcpy(ip->source, __local_ip_addr, sizeof(ip_addr_t));
+ memcpy(ip->destination, r->ip_addr, sizeof(ip_addr_t));
+ ip->protocol = IP_PROTO_TCP;
+ ip->length = htons(pkt->pkt_bytes);
+
+ /* compute tcp checksum */
+ cksum = __sum((word *)tcp, pkt->pkt_bytes, __pseudo_sum(ip));
+ tcp->checksum = htons(cksum);
+
+ __ip_send(pkt, IP_PROTO_TCP, r);
+}
+
+
+
+/*
+ * Remove given socket from socket list.
+ */
+static void
+unlink_socket(tcp_socket_t *s)
+{
+ tcp_socket_t *prev, *tp;
+
+ for (prev = NULL, tp = tcp_list; tp; prev = tp, tp = tp->next)
+ if (tp == s) {
+ BSPLOG(bsp_log("unlink tcp socket.\n"));
+ if (prev)
+ prev->next = s->next;
+ else
+ tcp_list = s->next;
+ }
+}
+
+/*
+ * Retransmit last packet.
+ */
+static void
+do_retrans(void *p)
+{
+ BSPLOG(bsp_log("tcp do_retrans.\n"));
+ tcp_send((tcp_socket_t *)p, 0, 1);
+}
+
+
+static void
+do_close(void *p)
+{
+ BSPLOG(bsp_log("tcp do_close.\n"));
+ /* close connection */
+ ((tcp_socket_t *)p)->state = _CLOSED;
+ unlink_socket(p);
+}
+
+
+static void
+free_rxlist(tcp_socket_t *s)
+{
+ pktbuf_t *p;
+
+ BSPLOG(bsp_log("tcp free_rxlist.\n"));
+
+ while ((p = s->rxlist) != NULL) {
+ s->rxlist = p->next;
+ __pktbuf_free(p);
+ }
+}
+
+
+/*
+ * Handle a conection reset.
+ */
+static void
+do_reset(tcp_socket_t *s)
+{
+ /* close connection */
+ s->state = _CLOSED;
+ __timer_cancel(&s->timer);
+ free_rxlist(s);
+ unlink_socket(s);
+}
+
+
+/*
+ * Extract data from incoming tcp segment.
+ * Returns true if packet is queued on rxlist, false otherwise.
+ */
+static int
+handle_data(tcp_socket_t *s, pktbuf_t *pkt)
+{
+ tcp_header_t *tcp = pkt->tcp_hdr;
+ unsigned int diff, seq;
+ int data_len;
+ char *data_ptr;
+ pktbuf_t *p;
+
+ data_len = pkt->pkt_bytes - (tcp->hdr_len << 2);
+ data_ptr = ((char *)tcp) + (tcp->hdr_len << 2);
+
+ seq = ntohl(tcp->seqnum);
+
+ BSPLOG(bsp_log("tcp data: seq[%x] len[%d].\n", seq, data_len));
+
+ if (SEQ_LE(seq, s->ack)) {
+ /*
+ * Figure difference between which byte we're expecting and which byte
+ * is sent first. Adjust data length and data pointer accordingly.
+ */
+ diff = s->ack - seq;
+ data_len -= diff;
+ data_ptr += diff;
+
+ if (data_len > 0) {
+ /* queue the new data */
+ s->ack += data_len;
+ pkt->next = NULL;
+ if ((p = s->rxlist) != NULL) {
+ while (p->next)
+ p = p->next;
+ p->next = pkt;
+ BSPLOG(bsp_log("tcp data: Add pkt[%x] len[%d].\n",
+ pkt, data_len));
+ } else {
+ s->rxlist = pkt;
+ s->rxcnt = data_len;
+ s->rxptr = data_ptr;
+ BSPLOG(bsp_log("tcp data: pkt[%x] len[%d].\n",
+ pkt, data_len));
+ }
+ return 1;
+ }
+ }
+ return 0;
+}
+
+
+static void
+handle_ack(tcp_socket_t *s, pktbuf_t *pkt)
+{
+ tcp_header_t *tcp = pkt->tcp_hdr;
+ dword ack;
+ int advance;
+ char *dp;
+
+ /* process ack value in packet */
+ ack = ntohl(tcp->acknum);
+
+ BSPLOG(bsp_log("Rcvd tcp ACK %x\n", ack));
+
+ if (SEQ_GT(ack, s->seq)) {
+ __timer_cancel(&s->timer);
+ advance = ack - s->seq;
+ if (advance > s->data_bytes)
+ advance = s->data_bytes;
+
+ BSPLOG(bsp_log("seq advance %d", advance));
+
+ if (advance > 0) {
+ s->seq += advance;
+ s->data_bytes -= advance;
+ if (s->data_bytes) {
+ /* other end ack'd only part of the pkt */
+ BSPLOG(bsp_log(" %d bytes left", s->data_bytes));
+ dp = (char *)(s->pkt.tcp_hdr + 1);
+ memcpy(dp, dp + advance, s->data_bytes);
+ }
+ }
+ }
+ BSPLOG(bsp_log("\n"));
+}
+
+
+/*
+ * Handle incoming TCP packets.
+ */
+void
+__tcp_handler(pktbuf_t *pkt, ip_route_t *r)
+{
+ tcp_header_t *tcp = pkt->tcp_hdr;
+ ip_header_t *ip = pkt->ip_hdr;
+ tcp_socket_t *prev,*s;
+ dword ack;
+ int queued = 0;
+
+ /* set length for pseudo sum calculation */
+ ip->length = htons(pkt->pkt_bytes);
+
+ if (__sum((word *)tcp, pkt->pkt_bytes, __pseudo_sum(ip)) == 0) {
+ for (prev = NULL, s = tcp_list; s; prev = s, s = s->next) {
+ if (s->our_port == ntohs(tcp->dest_port)) {
+ if (s->his_port == 0)
+ break;
+ if (s->his_port == ntohs(tcp->src_port) &&
+ !memcmp(r->ip_addr, s->his_addr.ip_addr, sizeof(ip_addr_t)))
+ break;
+ }
+ }
+
+ if (s) {
+ /* found the socket this packet belongs to */
+
+ /* refresh his ethernet address */
+ memcpy(s->his_addr.enet_addr, r->enet_addr, sizeof(enet_addr_t));
+
+ if (s->state != _SYN_RCVD && tcp->flags & TCP_FLAG_RST) {
+ BSPLOG(bsp_log("TCP_FLAG_RST rcvd\n"));
+ do_reset(s);
+ __pktbuf_free(pkt);
+ return;
+ }
+
+ switch (s->state) {
+
+ case _SYN_SENT:
+ /* active open not supported */
+ if (tcp->flags != (TCP_FLAG_SYN | TCP_FLAG_ACK)) {
+ do_reset(s);
+ __pktbuf_free(pkt);
+ return;
+ }
+ s->state = _ESTABLISHED;
+ s->ack = ntohl(tcp->seqnum) + 1;
+ s->seq = ntohl(tcp->acknum);
+ __timer_cancel(&s->timer);
+ send_ack(s);
+ break;
+
+ case _LISTEN:
+ if (tcp->flags & TCP_FLAG_SYN) {
+ s->state = _SYN_RCVD;
+ s->ack = ntohl(tcp->seqnum) + 1;
+ s->his_port = ntohs(tcp->src_port);
+ memcpy(s->his_addr.ip_addr, r->ip_addr, sizeof(ip_addr_t));
+ s->data_bytes = 0;
+
+ BSPLOG(bsp_log("SYN from %d.%d.%d.%d:%d (seq %x)\n",
+ s->his_addr.ip_addr[0],s->his_addr.ip_addr[1],
+ s->his_addr.ip_addr[2],s->his_addr.ip_addr[3],
+ s->his_port, ntohl(tcp->seqnum)));
+
+ tcp_send(s, TCP_FLAG_SYN | TCP_FLAG_ACK, 0);
+ }
+ else
+ send_reset(pkt, r);
+ break;
+
+ case _SYN_RCVD:
+ BSPLOG(bsp_log("_SYN_RCVD timer cancel.\n"));
+ __timer_cancel(&s->timer);
+
+ /* go back to _LISTEN state if reset */
+ if (tcp->flags & TCP_FLAG_RST) {
+ s->state = _LISTEN;
+
+ BSPLOG(bsp_log("_SYN_RCVD --> _LISTEN\n"));
+
+ } else if (tcp->flags & TCP_FLAG_SYN) {
+ /* apparently our SYN/ACK was lost? */
+ tcp_send(s, 0, 1);
+
+ BSPLOG(bsp_log("retransmitting SYN/ACK\n"));
+
+ } else if ((tcp->flags & TCP_FLAG_ACK) &&
+ ntohl(tcp->acknum) == (s->seq + 1)) {
+ /* we've established the connection */
+ s->state = _ESTABLISHED;
+ s->seq++;
+
+ BSPLOG(bsp_log("ACK received - connection established\n"));
+ }
+ break;
+
+ case _ESTABLISHED:
+ case _CLOSE_WAIT:
+ ack = s->ack; /* save original ack */
+ if (tcp->flags & TCP_FLAG_ACK)
+ handle_ack(s, pkt);
+
+ queued = handle_data(s, pkt);
+
+ if ((tcp->flags & TCP_FLAG_FIN) &&
+ ntohl(tcp->seqnum) == s->ack) {
+
+ BSPLOG(bsp_log("FIN received - going to _CLOSE_WAIT\n"));
+
+ s->ack++;
+ s->state = _CLOSE_WAIT;
+ }
+ /*
+ * Send an ack if neccessary.
+ */
+ if (s->ack != ack || pkt->pkt_bytes > (tcp->hdr_len << 2))
+ send_ack(s);
+ break;
+
+ case _LAST_ACK:
+ if (tcp->flags & TCP_FLAG_ACK) {
+ handle_ack(s, pkt);
+ if (ntohl(tcp->acknum) == (s->seq + 1)) {
+ BSPLOG(bsp_log("_LAST_ACK --> _CLOSED\n"));
+ s->state = _CLOSED;
+ unlink_socket(s);
+ }
+ }
+ break;
+
+ case _FIN_WAIT_1:
+ if (tcp->flags & TCP_FLAG_ACK) {
+ handle_ack(s, pkt);
+ if (ntohl(tcp->acknum) == (s->seq + 1)) {
+ /* got ACK for FIN packet */
+ s->seq++;
+ if (tcp->flags & TCP_FLAG_FIN) {
+ BSPLOG(bsp_log("_FIN_WAIT_1 --> _TIME_WAIT\n"));
+ s->ack++;
+ s->state = _TIME_WAIT;
+ send_ack(s);
+ } else {
+ s->state = _FIN_WAIT_2;
+ BSPLOG(bsp_log("_FIN_WAIT_1 --> _FIN_WAIT_2\n"));
+ }
+ break; /* All done for now */
+ }
+ }
+ /* At this point, no ACK for FIN has been seen, so check for
+ simultaneous close */
+ if (tcp->flags & TCP_FLAG_FIN) {
+ BSPLOG(bsp_log("_FIN_WAIT_1 --> _CLOSING\n"));
+ __timer_cancel(&s->timer);
+ s->ack++;
+ s->state = _CLOSING;
+ /* FIN is resent so the timeout and retry for this packet
+ will also take care of timeout and resend of the
+ previously sent FIN (which got us to FIN_WAIT_1). While
+ not technically correct, resending FIN only causes a
+ duplicate FIN (same sequence number) which should be
+ ignored by the other end. */
+ tcp_send(s, TCP_FLAG_FIN | TCP_FLAG_ACK, 0);
+ }
+ break;
+
+ case _FIN_WAIT_2:
+ queued = handle_data(s, pkt);
+ if (tcp->flags & TCP_FLAG_FIN) {
+ BSPLOG(bsp_log("_FIN_WAIT_2 --> _TIME_WAIT\n"));
+ s->ack++;
+ s->state = _TIME_WAIT;
+ send_ack(s);
+ }
+ break;
+
+ case _CLOSING:
+ if (tcp->flags & TCP_FLAG_ACK) {
+ handle_ack(s, pkt);
+ if (ntohl(tcp->acknum) == (s->seq + 1)) {
+ /* got ACK for FIN packet */
+ BSPLOG(bsp_log("_CLOSING --> _TIME_WAIT\n"));
+ __timer_cancel(&s->timer);
+ s->state = _TIME_WAIT;
+ }
+ }
+ break;
+
+ case _TIME_WAIT:
+ BSPLOG(bsp_log("_TIME_WAIT resend.\n"));
+ if (tcp->flags & TCP_FLAG_FIN)
+ tcp_send(s, 0, 1); /* just resend ack */
+ break;
+ }
+ } else {
+ BSPLOG(bsp_log("Unexpected segment from: %d.%d.%d.%d:%d\n",
+ r->ip_addr[0], r->ip_addr[1], r->ip_addr[3],
+ r->ip_addr[4], ntohs(tcp->src_port)));
+ send_reset(pkt, r);
+ }
+ }
+ if (!queued)
+ __pktbuf_free(pkt);
+}
+
+
+void
+__tcp_poll(void)
+{
+ __enet_poll();
+ __timer_poll();
+}
+
+
+int
+__tcp_listen(tcp_socket_t *s, word port)
+{
+ BSPLOG(bsp_log("tcp_listen: s[%p] port[%x]\n", s, port));
+
+ memset(s, 0, sizeof(tcp_socket_t));
+ s->state = _LISTEN;
+ s->our_port = port;
+ s->pkt.buf = (word *)s->pktbuf;
+ s->pkt.bufsize = ETH_MAX_PKTLEN;
+ s->pkt.ip_hdr = (ip_header_t *)s->pkt.buf;
+ s->pkt.tcp_hdr = (tcp_header_t *)(s->pkt.ip_hdr + 1);
+
+ s->next = tcp_list;
+
+#if 0
+ /* limit to one open socket at a time */
+ if (s->next) {
+ BSPLOG(bsp_log("tcp_listen: recursion error\n"));
+ BSPLOG(while(1));
+ }
+#endif
+
+ tcp_list = s;
+
+ return 0;
+}
+
+/*
+ * SO_REUSEADDR, no 2MSL.
+ */
+void
+__tcp_so_reuseaddr(tcp_socket_t *s)
+{
+// BSPLOG(bsp_log("__tcp_so_reuseaddr.\n"));
+ s->reuse = 0x01;
+}
+
+/*
+ * Block while waiting for all data to be transmitted.
+ */
+void
+__tcp_drain(tcp_socket_t *s)
+{
+// BSPLOG(bsp_log("__tcp_drain.\n"));
+ while (s->state != _CLOSED && s->data_bytes)
+ __tcp_poll();
+// BSPLOG(bsp_log("__tcp_drain done.\n"));
+}
+
+
+/*
+ * Close the tcp connection.
+ */
+static void
+do_abort(void *s)
+{
+ BSPLOG(bsp_log("do_abort: send RST\n"));
+ tcp_send((tcp_socket_t *)s, TCP_FLAG_ACK | TCP_FLAG_RST, 0);
+ __timer_cancel(&abort_timer);
+ ((tcp_socket_t *)s)->state = _CLOSED;
+ free_rxlist((tcp_socket_t *)s);
+ unlink_socket((tcp_socket_t *)s);
+}
+
+void
+__tcp_abort(tcp_socket_t *s, unsigned long delay)
+{
+ __timer_set(&abort_timer, delay, do_abort, s);
+}
+
+/*
+ * Close the tcp connection.
+ */
+void
+__tcp_close(tcp_socket_t *s)
+{
+ __tcp_drain(s);
+ if (s->state == _ESTABLISHED || s->state == _SYN_RCVD) {
+ BSPLOG(bsp_log("__tcp_close: going to _FIN_WAIT_1\n"));
+ s->state = _FIN_WAIT_1;
+ tcp_send(s, TCP_FLAG_ACK | TCP_FLAG_FIN, 0);
+ } else if (s->state == _CLOSE_WAIT) {
+
+ BSPLOG(bsp_log("__tcp_close: going to _LAST_ACK\n"));
+
+ s->state = _LAST_ACK;
+ tcp_send(s, TCP_FLAG_ACK | TCP_FLAG_FIN, 0);
+ }
+ free_rxlist(s);
+}
+
+
+/*
+ * Wait for connection to be fully closed.
+ */
+void
+__tcp_close_wait(tcp_socket_t *s)
+{
+ BSPLOG(bsp_log("__tcp_close_wait.\n"));
+ while (s->state != _CLOSED)
+ __tcp_poll();
+ BSPLOG(bsp_log("__tcp_close_wait done.\n"));
+}
+
+
+/*
+ * Read up to 'len' bytes without blocking.
+ */
+int
+__tcp_read(tcp_socket_t *s, char *buf, int len)
+{
+ int nread;
+ pktbuf_t *pkt;
+ tcp_header_t *tcp;
+
+ if (len <= 0 || s->rxcnt == 0)
+ return 0;
+
+ if (s->state != _ESTABLISHED && s->rxcnt == 0)
+ return -1;
+
+ nread = 0;
+ while (len) {
+ if (len < s->rxcnt) {
+ memcpy(buf, s->rxptr, len);
+ BSPLOG(bsp_log("tcp_read: read %d bytes.\n", len));
+ s->rxptr += len;
+ s->rxcnt -= len;
+ nread += len;
+
+ BSPLOG(bsp_log("tcp_read: %d bytes left in rxlist head.\n",
+ s->rxcnt));
+
+ break;
+ } else {
+ memcpy(buf, s->rxptr, s->rxcnt);
+ BSPLOG(bsp_log("tcp_read: read %d bytes. pkt[%x] freed.\n",
+ s->rxcnt, s->rxlist));
+ nread += s->rxcnt;
+ buf += s->rxcnt;
+ len -= s->rxcnt;
+
+ /* setup for next packet in list */
+ pkt = s->rxlist;
+ s->rxlist = pkt->next;
+ __pktbuf_free(pkt);
+
+ if ((pkt = s->rxlist) != NULL) {
+ tcp = pkt->tcp_hdr;
+ s->rxcnt = pkt->pkt_bytes - (tcp->hdr_len << 2);
+ s->rxptr = ((char *)tcp) + (tcp->hdr_len << 2);
+
+ BSPLOG(bsp_log("tcp_read: next pkt[%x] has %d bytes.\n",
+ s->rxlist, s->rxcnt));
+ } else {
+
+ BSPLOG(bsp_log("tcp_read: no more data.\n"));
+
+ s->rxcnt = 0;
+ break;
+ }
+ }
+ }
+ return nread;
+}
+
+
+/*
+ * Write up to 'len' bytes without blocking
+ */
+int
+__tcp_write(tcp_socket_t *s, char *buf, int len)
+{
+ tcp_header_t *tcp = s->pkt.tcp_hdr;
+
+ if (len <= 0)
+ return 0;
+
+ if (s->state != _ESTABLISHED && s->state != _CLOSE_WAIT)
+ return -1;
+
+ if (s->data_bytes)
+ return 0;
+
+ if (len > MAX_TCP_DATA)
+ len = MAX_TCP_DATA;
+
+ memcpy(tcp + 1, buf, len);
+ s->data_bytes = len;
+
+ tcp_send(s, TCP_FLAG_ACK, 0);
+
+ return len;
+}
+
+/*
+ * Write 'len' bytes from 'buf', blocking until sent.
+ * If connection collapses, return -1
+ */
+int
+__tcp_write_block(tcp_socket_t *s, char *buf, int len)
+{
+ int total = 0;
+ int n;
+
+ while (len) {
+ if (s->state == _CLOSE_WAIT) {
+ // This connection is tring to close
+ // This connection is breaking
+ if (s->data_bytes == 0 && s->rxcnt == 0)
+ __tcp_close(s);
+ }
+ if (s->state == _CLOSED) {
+ // The connection is gone!
+ return -1;
+ }
+ n = __tcp_write(s, buf, len);
+ if (n > 0) {
+ len -= n;
+ buf += n;
+ }
+ __tcp_poll();
+ }
+ __tcp_drain(s);
+ return total;
+}
+
+/*
+ * Establish a new [outgoing] connection, with a timeout.
+ */
+int
+__tcp_open(tcp_socket_t *s, struct sockaddr_in *host,
+ word port, int timeout, int *err)
+{
+ // Fill in socket details
+ memset(s, 0, sizeof(tcp_socket_t));
+ s->state = _SYN_SENT;
+ s->our_port = port;
+ s->his_port = host->sin_port;
+ s->pkt.buf = (word *)s->pktbuf;
+ s->pkt.bufsize = ETH_MAX_PKTLEN;
+ s->pkt.ip_hdr = (ip_header_t *)s->pkt.buf;
+ s->pkt.tcp_hdr = (tcp_header_t *)(s->pkt.ip_hdr + 1);
+ s->seq = (port << 16) | 0xDE77;
+ s->ack = 0;
+ if (__arp_lookup((ip_addr_t *)&host->sin_addr, &s->his_addr) < 0) {
+ diag_printf("%s: Can't find address of server\n", __FUNCTION__);
+ return -1;
+ }
+ s->next = tcp_list;
+ tcp_list = s;
+
+ // Send off the SYN packet to open the connection
+ tcp_send(s, TCP_FLAG_SYN, 0);
+ // Wait for connection to establish
+ while (s->state != _ESTABLISHED) {
+ if (s->state == _CLOSED) {
+ diag_printf("TCP open - host closed connection\n");
+ return -1;
+ }
+ if (--timeout <= 0) {
+ diag_printf("TCP open - connection timed out\n");
+ return -1;
+ }
+ MS_TICKS_DELAY();
+ __tcp_poll();
+ }
+ return 0;
+}
+
+
diff --git a/cesar/ecos/packages/redboot/current/src/net/tftp_client.c b/cesar/ecos/packages/redboot/current/src/net/tftp_client.c
new file mode 100644
index 0000000000..d4213bfeaa
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/net/tftp_client.c
@@ -0,0 +1,279 @@
+//==========================================================================
+//
+// net/tftp_client.c
+//
+// Stand-alone TFTP support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+// TFTP client support
+
+#include <redboot.h> // have_net
+#include <net/net.h>
+#include <net/tftp.h>
+#include <net/tftp_support.h>
+
+// So we remember which ports have been used
+static int get_port = 7700;
+
+static struct {
+ bool open;
+ int total_timeouts, packets_received;
+ unsigned long last_good_block;
+ int avail, actual_len;
+ struct sockaddr_in local_addr, from_addr;
+ char data[SEGSIZE+sizeof(struct tftphdr)];
+ char *bufp;
+} tftp_stream;
+
+int
+tftp_stream_open(connection_info_t *info,
+ int *err)
+{
+ struct tftphdr *hdr = (struct tftphdr *)tftp_stream.data;
+ char *cp, *fp;
+ char test_buf;
+
+ if (!have_net || tftp_stream.open) {
+ *err = TFTP_INVALID; // Already open
+ return -1;
+ }
+
+ // Create initial request
+ hdr->th_opcode = htons(RRQ); // Read file
+ cp = (char *)&hdr->th_stuff;
+ fp = info->filename;
+ while (*fp) *cp++ = *fp++;
+ *cp++ = '\0';
+ // Since this is used for downloading data, OCTET (binary) is the
+ // only mode that makes sense.
+ fp = "OCTET";
+ while (*fp) *cp++ = *fp++;
+ *cp++ = '\0';
+
+ memset((char *)&tftp_stream.local_addr, 0, sizeof(tftp_stream.local_addr));
+ tftp_stream.local_addr.sin_family = AF_INET;
+ tftp_stream.local_addr.sin_addr.s_addr = htonl(INADDR_ANY);
+ tftp_stream.local_addr.sin_port = htons(get_port++);
+
+ if (info->server->sin_port == 0) {
+ info->server->sin_port = htons(TFTP_PORT);
+ } else {
+ info->server->sin_port = htons(info->server->sin_port);
+ }
+
+ // Send request - note: RFC 1350 (TFTP rev 2) indicates that this should be
+ // only as long as required to hold the request, with the nul terminator.
+ // Some servers silently go to lunch if the request is not the correct size.
+ if (__udp_sendto(tftp_stream.data, cp-(char *)hdr,
+ info->server, &tftp_stream.local_addr) < 0) {
+ // Problem sending request
+ *err = TFTP_NETERR;
+ return -1;
+ }
+
+ tftp_stream.open = true;
+ tftp_stream.avail = 0;
+ tftp_stream.actual_len = -1;
+ tftp_stream.last_good_block = 0;
+ tftp_stream.total_timeouts = 0;
+ tftp_stream.from_addr.sin_port = 0;
+ tftp_stream.packets_received = 0;
+
+ // Try and read the first byte [block] since no errors are
+ // reported until then.
+ if (tftp_stream_read(&test_buf, 1, err) == 1) {
+ // Back up [rewind] over this datum
+ tftp_stream.bufp--;
+ tftp_stream.avail++;
+ return 0; // Open and first read successful
+ } else {
+ tftp_stream.open = false;
+ return -1; // Couldn't read
+ }
+}
+
+static int
+tftp_ack(int *err)
+{
+ struct tftphdr *hdr = (struct tftphdr *)tftp_stream.data;
+ // ACK last packet so server can shut down
+ if (tftp_stream.packets_received > 0) {
+ hdr->th_opcode = htons(ACK);
+ hdr->th_block = htons((cyg_uint16)tftp_stream.last_good_block & 0xFFFF);
+ if (__udp_sendto(tftp_stream.data, 4 /* FIXME */,
+ &tftp_stream.from_addr, &tftp_stream.local_addr) < 0) {
+ // Problem sending ACK
+ *err = TFTP_NETERR;
+ return -1;
+ }
+ }
+ return 0;
+}
+
+void
+tftp_stream_close(int *err)
+{
+ tftp_ack(err);
+ tftp_stream.open = false;
+}
+
+int
+tftp_stream_read(char *buf,
+ int len,
+ int *err)
+{
+ int total_bytes = 0;
+ int size, recv_len, data_len;
+ struct timeval timeout;
+ struct tftphdr *hdr = (struct tftphdr *)tftp_stream.data;
+
+ while (total_bytes < len) {
+ // Move any bytes which we've already read/buffered
+ if (tftp_stream.avail > 0) {
+ size = tftp_stream.avail;
+ if (size > (len - total_bytes)) size = len - total_bytes;
+ memcpy(buf, tftp_stream.bufp, size);
+ buf += size;
+ tftp_stream.bufp += size;
+ tftp_stream.avail -= size;
+ total_bytes += size;
+ } else {
+ if (tftp_ack(err) < 0) {
+ return -1;
+ }
+ if ((tftp_stream.actual_len >= 0) && (tftp_stream.actual_len < SEGSIZE)) {
+ // Out of data
+ break;
+ }
+ timeout.tv_sec = (tftp_stream.last_good_block == 0) ? 10*TFTP_TIMEOUT_PERIOD : TFTP_TIMEOUT_PERIOD;
+ timeout.tv_usec = 0;
+ recv_len = sizeof(tftp_stream.data);
+ if ((data_len = __udp_recvfrom(&tftp_stream.data[0], recv_len, &tftp_stream.from_addr,
+ &tftp_stream.local_addr, &timeout)) < 0) {
+ // No data, try again
+ diag_printf("TFTP timed out %d/%d\n", tftp_stream.total_timeouts+1, TFTP_TIMEOUT_MAX);
+ if ((++tftp_stream.total_timeouts > TFTP_TIMEOUT_MAX) ||
+ (tftp_stream.last_good_block == 0)) {
+ // Timeout - no data received
+ *err = TFTP_TIMEOUT;
+ return -1;
+ }
+ // Send out the ACK for the last block - maybe server will retry
+ if (tftp_ack(err) < 0) {
+ return -1;
+ }
+ } else {
+ tftp_stream.packets_received++;
+ if (ntohs(hdr->th_opcode) == DATA) {
+ if (ntohs(hdr->th_block) == (cyg_uint16)((tftp_stream.last_good_block+1) & 0xFFFF)) {
+ // Consume this data
+ data_len -= 4; /* Sizeof TFTP header */
+ tftp_stream.avail = tftp_stream.actual_len = data_len;
+ tftp_stream.bufp = hdr->th_data;
+ tftp_stream.last_good_block++;
+ }
+ } else {
+ if (ntohs(hdr->th_opcode) == ERROR) {
+ *err = ntohs(hdr->th_code);
+ return -1;
+ } else {
+ // What kind of packet is this?
+ *err = TFTP_PROTOCOL;
+ return -1;
+ }
+ }
+ }
+ }
+ }
+ return total_bytes;
+}
+
+char *
+tftp_error(int err)
+{
+ char *errmsg = "Unknown error";
+
+ switch (err) {
+ case TFTP_ENOTFOUND:
+ return "file not found";
+ case TFTP_EACCESS:
+ return "access violation";
+ case TFTP_ENOSPACE:
+ return "disk full or allocation exceeded";
+ case TFTP_EBADOP:
+ return "illegal TFTP operation";
+ case TFTP_EBADID:
+ return "unknown transfer ID";
+ case TFTP_EEXISTS:
+ return "file already exists";
+ case TFTP_ENOUSER:
+ return "no such user";
+ case TFTP_TIMEOUT:
+ return "operation timed out";
+ case TFTP_NETERR:
+ return "some sort of network error";
+ case TFTP_INVALID:
+ return "invalid parameter";
+ case TFTP_PROTOCOL:
+ return "protocol violation";
+ case TFTP_TOOLARGE:
+ return "file is larger than buffer";
+ }
+ return errmsg;
+}
+
+//
+// RedBoot interface
+//
+GETC_IO_FUNCS(tftp_io, tftp_stream_open, tftp_stream_close,
+ 0, tftp_stream_read, tftp_error);
+RedBoot_load(tftp, tftp_io, true, true, 0);
+
diff --git a/cesar/ecos/packages/redboot/current/src/net/timers.c b/cesar/ecos/packages/redboot/current/src/net/timers.c
new file mode 100644
index 0000000000..79523eda85
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/net/timers.c
@@ -0,0 +1,135 @@
+//==========================================================================
+//
+// net/timers.c
+//
+// Stand-alone networking support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <net/net.h>
+
+static timer_t *tmr_list;
+
+
+/*
+ * Set a timer. Caller is responsible for providing the timer_t struct.
+ */
+void
+__timer_set(timer_t *t, unsigned long delay,
+ tmr_handler_t handler, void *user_data)
+{
+ timer_t *p;
+
+ t->delay = delay;
+ t->start = MS_TICKS();
+ t->handler = handler;
+ t->user_data = user_data;
+
+ for (p = tmr_list; p; p = p->next)
+ if (p == t) {
+ return;
+ }
+
+ t->next = tmr_list;
+ tmr_list = t;
+}
+
+
+/*
+ * Remove a given timer from timer list.
+ */
+void
+__timer_cancel(timer_t *t)
+{
+ timer_t *prev, *p;
+
+ for (prev = NULL, p = tmr_list; p; prev = p, p = p->next)
+ if (p == t) {
+ if (prev)
+ prev->next = p->next;
+ else
+ tmr_list = p->next;
+ return;
+ }
+}
+
+
+/*
+ * Poll timer list for timer expirations.
+ */
+void
+__timer_poll(void)
+{
+ timer_t *prev, *t;
+
+ prev = NULL;
+ t = tmr_list;
+ while (t) {
+ if ((MS_TICKS_DELAY() - t->start) >= t->delay) {
+
+ /* remove it before calling handler */
+ if (prev)
+ prev->next = t->next;
+ else
+ tmr_list = t->next;
+ /* now, call the handler */
+ t->handler(t->user_data);
+
+ /*
+ * handler may be time consuming, so start
+ * from beginning of list.
+ */
+ prev = NULL;
+ t = tmr_list;
+ } else {
+ prev = t;
+ t = t->next;
+ }
+ }
+}
diff --git a/cesar/ecos/packages/redboot/current/src/net/udp.c b/cesar/ecos/packages/redboot/current/src/net/udp.c
new file mode 100644
index 0000000000..1ea50529a4
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/net/udp.c
@@ -0,0 +1,268 @@
+//==========================================================================
+//
+// net/udp.c
+//
+// Stand-alone UDP networking support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc.
+// Copyright (C) 2002, 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <net/net.h>
+
+#ifdef UDP_STATS
+static int udp_rx_total;
+static int udp_rx_handled;
+static int udp_rx_cksum;
+static int udp_rx_dropped;
+#endif
+
+#define MAX_UDP_DATA (ETH_MAX_PKTLEN - (ETH_HDR_SIZE + \
+ sizeof(ip_header_t) + \
+ sizeof(udp_header_t)))
+
+/*
+ * A major assumption is that only a very small number of sockets will
+ * active, so a simple linear search of those sockets is acceptible.
+ */
+static udp_socket_t *udp_list;
+
+
+/*
+ * Install a handler for incoming udp packets.
+ * Caller provides the udp_socket_t structure.
+ * Returns zero if successful, -1 if socket is already used.
+ */
+int
+__udp_install_listener(udp_socket_t *s, word port, udp_handler_t handler)
+{
+ udp_socket_t *p;
+
+ /*
+ * Make sure we only have one handler per port.
+ */
+ for (p = udp_list; p; p = p->next)
+ if (p->our_port == port)
+ return -1;
+
+ s->our_port = htons(port);
+ s->handler = handler;
+ s->next = udp_list;
+ udp_list = s;
+
+ return 0;
+}
+
+
+/*
+ * Remove the handler for the given socket.
+ */
+void
+__udp_remove_listener(word port)
+{
+ udp_socket_t *prev, *s;
+
+ for (prev = NULL, s = udp_list; s; prev = s, s = s->next)
+ if (s->our_port == htons(port)) {
+ if (prev)
+ prev->next = s->next;
+ else
+ udp_list = s->next;
+ }
+}
+
+
+/*
+ * Handle incoming UDP packets.
+ */
+void
+__udp_handler(pktbuf_t *pkt, ip_route_t *r)
+{
+ udp_header_t *udp = pkt->udp_hdr;
+ ip_header_t *ip = pkt->ip_hdr;
+ udp_socket_t *s;
+
+ if (udp->checksum == 0xffff)
+ udp->checksum = 0;
+
+ /* copy length for pseudo sum calculation */
+ ip->length = udp->length;
+
+ if (__sum((word *)udp, ntohs(udp->length), __pseudo_sum(ip)) == 0) {
+ for (s = udp_list; s; s = s->next) {
+ if (s->our_port == udp->dest_port) {
+ (*s->handler)(s, ((char *)udp) + sizeof(udp_header_t),
+ ntohs(udp->length) - sizeof(udp_header_t),
+ r, ntohs(udp->src_port));
+ __pktbuf_free(pkt);
+ return;
+ }
+ }
+ }
+ __pktbuf_free(pkt);
+}
+
+
+/*
+ * Send a UDP packet.
+ */
+int
+__udp_send(char *buf, int len, ip_route_t *dest_ip,
+ word dest_port, word src_port)
+{
+ pktbuf_t *pkt;
+ udp_header_t *udp;
+ ip_header_t *ip;
+ unsigned short cksum;
+ int ret;
+
+ /* dumb */
+ if (len > MAX_UDP_DATA)
+ return -1;
+
+ /* just drop it if can't get a buffer */
+ if ((pkt = __pktbuf_alloc(ETH_MAX_PKTLEN)) == NULL)
+ return -1;
+
+ udp = pkt->udp_hdr;
+ ip = pkt->ip_hdr;
+
+ pkt->pkt_bytes = len + sizeof(udp_header_t);
+
+ udp->src_port = htons(src_port);
+ udp->dest_port = htons(dest_port);
+ udp->length = htons(pkt->pkt_bytes);
+ udp->checksum = 0;
+
+ memcpy(((char *)udp) + sizeof(udp_header_t), buf, len);
+
+ /* fill in some pseudo-header fields */
+ memcpy(ip->source, __local_ip_addr, sizeof(ip_addr_t));
+ memcpy(ip->destination, dest_ip->ip_addr, sizeof(ip_addr_t));
+ ip->protocol = IP_PROTO_UDP;
+ ip->length = udp->length;
+
+ cksum = __sum((word *)udp, pkt->pkt_bytes, __pseudo_sum(ip));
+ udp->checksum = htons(cksum);
+
+ ret = __ip_send(pkt, IP_PROTO_UDP, dest_ip);
+ __pktbuf_free(pkt);
+ return ret;
+}
+
+int
+__udp_sendto(char *data, int len, struct sockaddr_in *server,
+ struct sockaddr_in *local)
+{
+ ip_route_t rt;
+
+ if (__arp_lookup((ip_addr_t *)&server->sin_addr, &rt) < 0) {
+ diag_printf("%s: Can't find address of server\n", __FUNCTION__);
+ return -1;
+ } else {
+ __udp_send(data, len, &rt, ntohs(server->sin_port), ntohs(local->sin_port));
+ return 0;
+ }
+}
+
+static char *recvfrom_buf;
+static int recvfrom_len;
+static struct sockaddr_in *recvfrom_server;
+
+static void
+__udp_recvfrom_handler(udp_socket_t *skt, char *buf, int len,
+ ip_route_t *src_route, word src_port)
+{
+ if (recvfrom_server == NULL || recvfrom_buf == NULL)
+ return;
+
+ if (recvfrom_server->sin_port && recvfrom_server->sin_port != htons(src_port))
+ return;
+
+ // Move data to waiting buffer
+ recvfrom_len = len;
+ memcpy(recvfrom_buf, buf, len);
+ if (recvfrom_server) {
+ recvfrom_server->sin_port = htons(src_port);
+ memcpy(&recvfrom_server->sin_addr, &src_route->ip_addr, sizeof(src_route->ip_addr));
+ recvfrom_buf = (char *)0; // Tell reader we got a packet
+ } else {
+ diag_printf("udp_recvfrom - dropped packet of %d bytes\n", len);
+ }
+}
+
+int
+__udp_recvfrom(char *data, int len, struct sockaddr_in *server,
+ struct sockaddr_in *local, struct timeval *timo)
+{
+ int res, my_port, total_ms;
+ udp_socket_t skt;
+ unsigned long start;
+
+ my_port = ntohs(local->sin_port);
+ if (__udp_install_listener(&skt, my_port, __udp_recvfrom_handler) < 0) {
+ return -1;
+ }
+ recvfrom_buf = data;
+ recvfrom_len = len;
+ recvfrom_server = server;
+ total_ms = (timo->tv_sec * 1000) + (timo->tv_usec / 1000);
+ start = MS_TICKS();
+ res = -1;
+ do {
+ __enet_poll(); // Handle the hardware
+ if (!recvfrom_buf) {
+ // Data have arrived
+ res = recvfrom_len;
+ break;
+ }
+ } while ((MS_TICKS_DELAY() - start) < total_ms);
+ __udp_remove_listener(my_port);
+ return res;
+}
diff --git a/cesar/ecos/packages/redboot/current/src/parse.c b/cesar/ecos/packages/redboot/current/src/parse.c
new file mode 100644
index 0000000000..c6ffc53225
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/parse.c
@@ -0,0 +1,402 @@
+//==========================================================================
+//
+// parse.c
+//
+// RedBoot command line parsing routine
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_cache.h>
+#include CYGHWR_MEMORY_LAYOUT_H
+#include <cyg/hal/hal_tables.h>
+
+// Define table boundaries
+extern struct cmd __RedBoot_CMD_TAB__[], __RedBoot_CMD_TAB_END__;
+
+//
+// Scan through an input line and break it into "arguments". These
+// are space delimited strings. Return a structure which points to
+// the strings, similar to a Unix program. Multiple commands in the line
+// are separated by ; similar to sh. If we find a semi we stop processing the
+// line, terminate the current command with a null and return the start
+// of the next command in *line. parse() can then be called again to
+// process the next command on the line.
+// Note: original input is destroyed by replacing the delimiters with
+// null ('\0') characters for ease of use.
+//
+struct cmd *
+parse(char **line, int *argc, char **argv)
+{
+ char *cp = *line;
+ char *pp;
+ int indx = 0;
+ int semi = 0;
+
+ while (*cp) {
+ // Skip leading spaces
+ while (*cp && *cp == ' ') cp++;
+ if (!*cp) {
+ break; // Line ended with a string of spaces
+ }
+ if (*cp == ';') {
+ *cp = '\0';
+ semi=1;
+ break;
+ }
+ if (indx < MAX_ARGV) {
+ argv[indx++] = cp;
+ } else {
+ diag_printf("Too many arguments - stopped at: '%s'\n", cp);
+ }
+ while (*cp) {
+ if (*cp == ' ') {
+ *cp++ = '\0';
+ break;
+ } else if (*cp == ';') {
+ break;
+ } else if (*cp == '"') {
+ // Swallow quote, scan till following one
+ if (argv[indx-1] == cp) {
+ argv[indx-1] = ++cp;
+ }
+ pp = cp;
+ while (*cp && *cp != '"') {
+ if (*cp == '\\') {
+ // Skip over escape - allows for escaped '"'
+ cp++;
+ }
+ // Move string to swallow escapes
+ *pp++ = *cp++;
+ }
+ if (!*cp) {
+ diag_printf("Unbalanced string!\n");
+ } else {
+ if (pp != cp) *pp = '\0';
+ *cp++ = '\0';
+ break;
+ }
+ } else {
+ cp++;
+ }
+ }
+ }
+ if (semi) {
+ *line = cp + 1;
+ } else {
+ *line = cp;
+ }
+ *argc = indx;
+ return cmd_search(__RedBoot_CMD_TAB__, &__RedBoot_CMD_TAB_END__, argv[0]);
+}
+
+//
+// Search through a list of commands
+//
+struct cmd *
+cmd_search(struct cmd *tab, struct cmd *tabend, char *arg)
+{
+ int cmd_len;
+ struct cmd *cmd, *cmd2;
+ // Search command table
+ cmd_len = strlen(arg);
+ cmd = tab;
+ while (cmd != tabend) {
+ if (strncasecmp(arg, cmd->str, cmd_len) == 0) {
+ if (strlen(cmd->str) > cmd_len) {
+ // Check for ambiguous commands here
+ // Note: If there are commands which are not length-unique
+ // then this check will be invalid. E.g. "du" and "dump"
+ bool first = true;
+ cmd2 = tab;
+ while (cmd2 != tabend) {
+ if ((cmd != cmd2) &&
+ (strncasecmp(arg, cmd2->str, cmd_len) == 0)) {
+ if (first) {
+ diag_printf("Ambiguous command '%s', choices are: %s",
+ arg, cmd->str);
+ first = false;
+ }
+ diag_printf(" %s", cmd2->str);
+ }
+ cmd2++;
+ }
+ if (!first) {
+ // At least one ambiguity found - fail the lookup
+ diag_printf("\n");
+ return (struct cmd *)0;
+ }
+ }
+ return cmd;
+ }
+ cmd++;
+ }
+ return (struct cmd *)0;
+}
+
+void
+cmd_usage(struct cmd *tab, struct cmd *tabend, char *prefix)
+{
+ struct cmd *cmd;
+
+ diag_printf("Usage:\n");
+ for (cmd = tab; cmd != tabend; cmd++) {
+ diag_printf(" %s%s %s\n", prefix, cmd->str, cmd->usage);
+ }
+}
+
+// Option processing
+
+// Initialize option table entry (required because these entries
+// may have dynamic contents, thus cannot be statically initialized)
+//
+void
+init_opts(struct option_info *opts, char flag, bool takes_arg,
+ int arg_type, void *arg, bool *arg_set, char *name)
+{
+ opts->flag = flag;
+ opts->takes_arg = takes_arg;
+ opts->arg_type = arg_type,
+ opts->arg = arg;
+ opts->arg_set = arg_set;
+ opts->name = name;
+}
+
+//
+// Scan command line arguments (argc/argv), processing options, etc.
+//
+bool
+scan_opts(int argc, char *argv[], int first,
+ struct option_info *opts, int num_opts,
+ void *def_arg, int def_arg_type, char *def_descr)
+{
+ bool ret = true;
+ bool flag_ok;
+ bool def_arg_set = false;
+ int i, j;
+ char c, *s;
+ struct option_info *opt;
+
+ if (def_arg && (def_arg_type == OPTION_ARG_TYPE_STR)) {
+ *(char **)def_arg = (char *)0;
+ }
+ opt = opts;
+ for (j = 0; j < num_opts; j++, opt++) {
+ if (opt->arg_set) {
+ *opt->arg_set = false;
+ }
+ if (!opt->takes_arg) {
+ switch (opt->arg_type) {
+ case OPTION_ARG_TYPE_NUM:
+ *(int *)opt->arg = 0;
+ break;
+ case OPTION_ARG_TYPE_FLG:
+ *(bool *)opt->arg = false;
+ break;
+ }
+ }
+ }
+ for (i = first; i < argc; i++) {
+ if (argv[i][0] == '-') {
+ c = argv[i][1];
+ flag_ok = false;
+ opt = opts;
+ for (j = 0; j < num_opts; j++, opt++) {
+ if (c == opt->flag) {
+ if (opt->arg_set && *opt->arg_set) {
+ diag_printf("** Error: %s already specified\n", opt->name);
+ ret = false;
+ }
+ if (opt->takes_arg) {
+ if (argv[i][2] == '=') {
+ s = &argv[i][3];
+ } else {
+ s = argv[i+1];
+ i++;
+ }
+ switch (opt->arg_type) {
+ case OPTION_ARG_TYPE_NUM:
+ if (!parse_num(s, (unsigned long *)opt->arg, 0, 0)) {
+ diag_printf("** Error: invalid number '%s' for %s\n",
+ s, opt->name);
+ ret = false;
+ }
+ break;
+ case OPTION_ARG_TYPE_STR:
+ *(char **)opt->arg = s;
+ break;
+ }
+ *opt->arg_set = true;
+ } else {
+ switch (opt->arg_type) {
+ case OPTION_ARG_TYPE_NUM:
+ *(int *)opt->arg = *(int *)opt->arg + 1;
+ break;
+ case OPTION_ARG_TYPE_FLG:
+ *(bool *)opt->arg = true;
+ break;
+ }
+ }
+ flag_ok = true;
+ break;
+ }
+ }
+ if (!flag_ok) {
+ diag_printf("** Error: invalid flag '%c'\n", c);
+ ret = false;
+ }
+ } else {
+ if (def_arg) {
+ if (def_arg_set) {
+ diag_printf("** Error: %s already specified\n", def_descr);
+ ret = false;
+ }
+ switch (def_arg_type) {
+ case OPTION_ARG_TYPE_NUM:
+ if (!parse_num(argv[i], (unsigned long *)def_arg, 0, 0)) {
+ diag_printf("** Error: invalid number '%s' for %s\n",
+ argv[i], def_descr);
+ ret = false;
+ }
+ break;
+ case OPTION_ARG_TYPE_STR:
+ *(char **)def_arg = argv[i];
+ break;
+ }
+ def_arg_set = true;
+ } else {
+ diag_printf("** Error: no default/non-flag arguments supported\n");
+ ret = false;
+ }
+ }
+ }
+ return ret;
+}
+
+//
+// Parse (scan) a number
+//
+bool
+parse_num(char *s, unsigned long *val, char **es, char *delim)
+{
+ bool first = true;
+ int radix = 10;
+ char c;
+ unsigned long result = 0;
+ int digit;
+
+ while (*s == ' ') s++;
+ while (*s) {
+ if (first && (s[0] == '0') && (_tolower(s[1]) == 'x')) {
+ radix = 16;
+ s += 2;
+ }
+ first = false;
+ c = *s++;
+ if (_is_hex(c) && ((digit = _from_hex(c)) < radix)) {
+ // Valid digit
+#ifdef CYGPKG_HAL_MIPS
+ // FIXME: tx49 compiler generates 0x2539018 for MUL which
+ // isn't any good.
+ if (16 == radix)
+ result = result << 4;
+ else
+ result = 10 * result;
+ result += digit;
+#else
+ result = (result * radix) + digit;
+#endif
+ } else {
+ if (delim != (char *)0) {
+ // See if this character is one of the delimiters
+ char *dp = delim;
+ while (*dp && (c != *dp)) dp++;
+ if (*dp) break; // Found a good delimiter
+ }
+ return false; // Malformatted number
+ }
+ }
+ *val = result;
+ if (es != (char **)0) {
+ *es = s;
+ }
+ return true;
+}
+
+bool
+parse_bool(char *s, bool *val)
+{
+ while (*s == ' ') s++;
+ if ((*s == 't') || (*s == 'T')) {
+ char *p = "rue";
+ char *P = "RUE";
+ // check for (partial) rest of the word and no extra including the
+ // terminating zero. "tru" will match; "truef" will not.
+ while ( *++s ) {
+ if ( *p != *s && *P != *s ) return false;
+ p++; P++;
+ }
+ *val = true;
+ } else
+ if ((*s == 'f') || (*s == 'F')) {
+ char *p = "alse";
+ char *P = "ALSE";
+ while ( *++s ) {
+ if ( *p != *s && *P != *s ) return false;
+ p++; P++;
+ }
+ *val = false;
+ } else {
+ return false;
+ }
+ return true;
+}
+
diff --git a/cesar/ecos/packages/redboot/current/src/syscall.c b/cesar/ecos/packages/redboot/current/src/syscall.c
new file mode 100644
index 0000000000..09df1449ef
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/syscall.c
@@ -0,0 +1,655 @@
+/*==========================================================================
+//
+// syscall.c
+//
+// Redboot syscall handling for GNUPro bsp support
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): msalter
+// Contributors: msalter
+// Date: 1999-02-20
+// Purpose: Temporary support for gnupro bsp
+//
+//####DESCRIPTIONEND####
+//
+//=========================================================================*/
+
+#include <redboot.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/drv_api.h>
+#include <cyg/hal/hal_stub.h>
+
+#ifdef CYGSEM_REDBOOT_BSP_SYSCALLS
+
+#define NEWLIB_EIO 5 /* I/O error */
+#define NEWLIB_ENOSYS 88 /* Syscall not supported */
+
+/*
+ * Clients of this BSP will need to have access to BSP functions and
+ * data structures. Because, the client and the BSP may not be linked
+ * together, a structure of vectors is used to gain this access. A
+ * pointer to this structure can be gotten via a syscall. This syscall
+ * is made automatically from within the crt0.o file.
+ */
+typedef struct {
+ int version; /* version number for future expansion */
+ const void **__ictrl_table;
+ void **__exc_table;
+ void *__dbg_vector;
+ void *__kill_vector;
+ void *__console_procs;
+ void *__debug_procs;
+ void (*__flush_dcache)(void *__p, int __nbytes);
+ void (*__flush_icache)(void *__p, int __nbytes);
+ void *__cpu_data;
+ void *__board_data;
+ void *__sysinfo;
+ int (*__set_debug_comm)(int __comm_id);
+ int (*__set_console_comm)(int __comm_id);
+ int (*__set_serial_baud)(int __comm_id, int baud);
+ void *__dbg_data;
+ void (*__reset)(void);
+ int __console_interrupt_flag;
+} __shared_t;
+
+static __shared_t __shared_data = { 2 };
+
+// this is used by newlib's mode_t so we should match it
+#ifdef __GNUC__
+#define _ST_INT32 __attribute__ ((__mode__ (__SI__)))
+#else
+#define _ST_INT32
+#endif
+typedef unsigned int newlib_mode_t _ST_INT32;
+typedef short newlib_dev_t;
+typedef unsigned short newlib_ino_t;
+typedef unsigned short newlib_nlink_t;
+typedef long newlib_off_t;
+typedef unsigned short newlib_uid_t;
+typedef unsigned short newlib_gid_t;
+typedef long newlib_time_t;
+typedef long newlib_long_t;
+
+struct newlib_stat
+{
+ newlib_dev_t st_dev;
+ newlib_ino_t st_ino;
+ newlib_mode_t st_mode;
+ newlib_nlink_t st_nlink;
+ newlib_uid_t st_uid;
+ newlib_gid_t st_gid;
+ newlib_dev_t st_rdev;
+ newlib_off_t st_size;
+ // We assume we've been compiled with the same flags as newlib here
+#if defined(__svr4__) && !defined(__PPC__) && !defined(__sun__)
+ newlib_time_t st_atime;
+ newlib_time_t st_mtime;
+ newlib_time_t st_ctime;
+#else
+ newlib_time_t st_atime;
+ newlib_long_t st_spare1;
+ newlib_time_t st_mtime;
+ newlib_long_t st_spare2;
+ newlib_time_t st_ctime;
+ newlib_long_t st_spare3;
+ newlib_long_t st_blksize;
+ newlib_long_t st_blocks;
+ newlib_long_t st_spare4[2];
+#endif
+};
+#define NEWLIB_S_IFCHR 0020000 // character special file
+
+static inline char __getc(void)
+{
+ char c;
+ hal_virtual_comm_table_t* __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+
+ if (__chan)
+ c = CYGACC_COMM_IF_GETC(*__chan);
+ else {
+ __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+ c = CYGACC_COMM_IF_GETC(*__chan);
+ }
+ return c;
+}
+
+static inline void __putc(char c)
+{
+ hal_virtual_comm_table_t* __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+ if (__chan)
+ CYGACC_COMM_IF_PUTC(*__chan, c);
+ else {
+ __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+ CYGACC_COMM_IF_PUTC(*__chan, c);
+ }
+}
+
+
+static inline void __flush(void)
+{
+ hal_virtual_comm_table_t* __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+
+ if (__chan == NULL)
+ __chan = CYGACC_CALL_IF_DEBUG_PROCS();
+
+ CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_FLUSH_OUTPUT);
+}
+
+// Timer support
+
+static cyg_handle_t sys_timer_handle;
+static cyg_interrupt sys_timer_interrupt;
+static cyg_uint64 sys_timer_ticks = 0;
+
+#ifdef CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+
+static unsigned int set_period = CYGNUM_HAL_RTC_PERIOD; // The default
+
+typedef void *callback_func( char *pc, char *sp );
+static callback_func *timer_callback = 0;
+
+#endif // CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+
+static void
+sys_timer_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data)
+{
+ // do nothing
+}
+
+
+static cyg_uint32
+sys_timer_isr(cyg_vector_t vector, cyg_addrword_t data)
+{
+ ++sys_timer_ticks;
+
+#ifdef CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+ HAL_CLOCK_RESET(CYGNUM_HAL_INTERRUPT_RTC, set_period);
+#else
+ HAL_CLOCK_RESET(CYGNUM_HAL_INTERRUPT_RTC, CYGNUM_HAL_RTC_PERIOD);
+#endif // CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+
+ cyg_drv_interrupt_acknowledge(CYGNUM_HAL_INTERRUPT_RTC);
+
+#ifdef CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+ if ( timer_callback ) {
+ char *intrpc = (char *)0;
+ char *intrsp = (char *)0;
+
+ // There may be a number of ways to get the PC and (optional) SP
+ // information out of the HAL. Hence this is conditioned. In some
+ // configurations, a register-set pointer is available as
+ // (invisible) argument 3 to this ISR call.
+
+#ifdef HAL_GET_PROFILE_INFO
+ HAL_GET_PROFILE_INFO( intrpc, intrsp );
+#endif // HAL_GET_PROFILE_INFO available
+
+ CYGARC_HAL_SAVE_GP();
+ timer_callback( intrpc, intrsp );
+ CYGARC_HAL_RESTORE_GP();
+ }
+#endif // CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+ return CYG_ISR_HANDLED;
+}
+
+
+static void sys_timer_init(void)
+{
+#ifdef CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+ HAL_CLOCK_INITIALIZE(set_period);
+#else
+ HAL_CLOCK_INITIALIZE(CYGNUM_HAL_RTC_PERIOD);
+#endif // CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+
+ cyg_drv_interrupt_create(
+ CYGNUM_HAL_INTERRUPT_RTC,
+ 0, // Priority - unused
+ (CYG_ADDRWORD)0, // Data item passed to ISR & DSR
+ sys_timer_isr, // ISR
+ sys_timer_dsr, // DSR
+ &sys_timer_handle, // handle to intr obj
+ &sys_timer_interrupt ); // space for int obj
+
+ cyg_drv_interrupt_attach(sys_timer_handle);
+
+ cyg_drv_interrupt_unmask(CYGNUM_HAL_INTERRUPT_RTC);
+}
+
+
+//
+// read -- read bytes from the serial port. Ignore fd, since
+// we only have stdin.
+static int
+sys_read(int fd, char *buf, int nbytes)
+{
+ int i = 0;
+
+ for (i = 0; i < nbytes; i++) {
+ *(buf + i) = __getc();
+ if ((*(buf + i) == '\n') || (*(buf + i) == '\r')) {
+ (*(buf + i + 1)) = 0;
+ break;
+ }
+ }
+ return (i);
+}
+
+
+//
+// write -- write bytes to the serial port. Ignore fd, since
+// stdout and stderr are the same. Since we have no filesystem,
+// open will only return an error.
+//
+static int
+sys_write(int fd, char *buf, int nbytes)
+{
+#define WBUFSIZE 256
+ int tosend;
+
+ tosend = nbytes;
+
+ while (tosend > 0) {
+ if (*buf == '\n')
+ __putc('\r');
+ __putc(*buf++);
+ tosend--;
+ }
+ __flush();
+
+ return (nbytes);
+}
+
+
+//
+// open -- open a file descriptor. We don't have a filesystem, so
+// we return an error.
+//
+static int
+sys_open (const char *buf, int flags, int mode)
+{
+ return (-NEWLIB_EIO);
+}
+
+//
+// close -- We don't need to do anything, but pretend we did.
+//
+static int
+sys_close(int fd)
+{
+ return (0);
+}
+
+
+//
+// lseek -- Since a serial port is non-seekable, we return an error.
+//
+static int
+sys_lseek(int fd, int offset, int whence)
+{
+ return (-NEWLIB_EIO);
+}
+
+
+#define NS_PER_TICK (CYGNUM_HAL_RTC_NUMERATOR/CYGNUM_HAL_RTC_DENOMINATOR)
+#define TICKS_PER_SEC (1000000000ULL / NS_PER_TICK)
+
+// This needs to match newlib HZ which is normally 60.
+#define HZ (60ULL)
+
+#ifdef CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+static unsigned int set_freq = TICKS_PER_SEC; // The default
+#endif // CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+static int
+sys_times(unsigned long *p)
+{
+ static int inited = 0;
+
+ if (!inited) {
+ inited = 1;
+ sys_timer_init();
+ }
+
+ /* target clock runs at CLOCKS_PER_SEC. Convert to HZ */
+ if (p)
+#ifdef CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+ *p = (sys_timer_ticks * HZ) / (cyg_uint64)set_freq;
+#else
+ *p = (sys_timer_ticks * HZ) / TICKS_PER_SEC;
+#endif // CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+
+ return 0;
+}
+
+#ifdef CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+
+static void sys_profile_call_back( char *func, char **previous_call_back )
+{
+ if ( previous_call_back )
+ *previous_call_back = (char *)timer_callback;
+
+ timer_callback = (callback_func *)func;
+
+ // Ensure the timer is started
+ (void)sys_times( (unsigned long *)0 );
+}
+
+static void sys_profile_frequency( int freq, int *previous_freq )
+{
+// Requested HZ:
+// 0 => tell me the current value (no change, IMPLEMENTED HERE)
+// - 1 => tell me the slowest (no change)
+// - 2 => tell me the default (no change, IMPLEMENTED HERE)
+// -nnn => tell me what you would choose for nnn (no change)
+// MIN_INT => tell me the fastest (no change)
+//
+// 1 => tell me the slowest (sets the clock)
+// MAX_INT => tell me the fastest (sets the clock)
+
+ // Ensure the timer is started
+ (void)sys_times( (unsigned long *)0 );
+
+ if ( -2 == freq )
+ freq = TICKS_PER_SEC; // default value
+ else if ( 0 == freq )
+ freq = set_freq; // collect current value
+ else {
+ int do_set_freq = (freq > 0);
+ unsigned int period = CYGNUM_HAL_RTC_PERIOD;
+
+ if ( 0 == (freq ^ -freq) ) // Then it's MIN_INT in local size
+ freq++; // just so that it will negate correctly
+
+ // Then set the timer to that fast - or pass on the enquiry
+#ifdef HAL_CLOCK_REINITIALIZE
+ // Give the HAL enough info to do the division sum relative to
+ // the default setup, in period and TICKS_PER_SEC.
+ HAL_CLOCK_REINITIALIZE( freq, period, TICKS_PER_SEC );
+#else
+ freq = TICKS_PER_SEC; // the only choice
+#endif
+ if ( do_set_freq ) { // update the global variables
+ unsigned int orig = set_freq;
+ set_freq = freq;
+ set_period = period;
+ // We must "correct" sys_timer_ticks for the new scale factor.
+ sys_timer_ticks = sys_timer_ticks * set_freq / orig;
+ }
+ }
+
+ if ( previous_freq ) // Return the current value (new value)
+ *previous_freq = freq;
+}
+
+void sys_profile_reset( void )
+{
+ timer_callback = NULL;
+// Want to preserve the frequency between runs, for clever GDB users!
+// sys_profile_frequency( TICKS_PER_SEC, NULL );
+}
+
+#endif // CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+
+//
+// Generic syscall handler.
+//
+// Returns 0 if syscall number is not handled by this
+// module, 1 otherwise. This allows applications to
+// extend the syscall handler by using exception chaining.
+//
+CYG_ADDRWORD
+__do_syscall(CYG_ADDRWORD func, // syscall function number
+ CYG_ADDRWORD arg1, CYG_ADDRWORD arg2, // up to four args.
+ CYG_ADDRWORD arg3, CYG_ADDRWORD arg4,
+ CYG_ADDRWORD *retval, CYG_ADDRWORD *sig) // syscall return value
+{
+ int err = 0;
+ *sig = 0;
+
+ switch (func) {
+
+ case SYS_open:
+ {
+#ifdef CYGPKG_HAL_GDB_FILEIO // File I/O over the GDB remote protocol
+ __externC int cyg_hal_gdbfileio_open( const char *name, int flags,
+ int mode, int *sig );
+ if (gdb_active)
+ err = cyg_hal_gdbfileio_open((const char *)arg1, (int)arg2, (int)arg3,
+ (int *)sig);
+ else
+#endif
+ err = sys_open((const char *)arg1, (int)arg2, (int)arg3);
+ break;
+ }
+ case SYS_read:
+ {
+#ifdef CYGPKG_HAL_GDB_FILEIO // File I/O over the GDB remote protocol
+ __externC int cyg_hal_gdbfileio_read( int fd, void *buf, size_t count,
+ int *sig );
+ if (gdb_active)
+ err = cyg_hal_gdbfileio_read((int)arg1, (void *)arg2, (size_t)arg3,
+ (int *)sig);
+ else
+#endif
+ err = sys_read((int)arg1, (char *)arg2, (int)arg3);
+ break;
+ }
+ case SYS_write:
+ {
+#ifdef CYGPKG_HAL_GDB_FILEIO // File I/O over the GDB remote protocol
+ __externC int cyg_hal_gdbfileio_write( int fd, const void *buf,
+ size_t count, int *sig );
+ if (gdb_active)
+ err = cyg_hal_gdbfileio_write((int)arg1, (const void *)arg2,
+ (size_t)arg3, (int *)sig);
+ else
+#endif
+ err = sys_write((int)arg1, (char *)arg2, (int)arg3);
+ break;
+ }
+ case SYS_close:
+ {
+#ifdef CYGPKG_HAL_GDB_FILEIO // File I/O over the GDB remote protocol
+ __externC int cyg_hal_gdbfileio_close( int fd, int *sig );
+ if (gdb_active)
+ err = cyg_hal_gdbfileio_close((int)arg1, (int *)sig);
+ else
+#endif
+ err = sys_close((int)arg1);
+ break;
+ }
+ case SYS_lseek:
+ {
+#ifdef CYGPKG_HAL_GDB_FILEIO // File I/O over the GDB remote protocol
+ __externC int cyg_hal_gdbfileio_lseek( int fd, long offset,
+ int whence, int *sig );
+ if (gdb_active)
+ err = cyg_hal_gdbfileio_lseek((int)arg1, (long)arg2, (int)arg3,
+ (int *)sig);
+ else
+#endif
+ err = sys_lseek((int)arg1, (int)arg2, (int)arg3);
+ break;
+ }
+ case SYS_stat:
+ {
+#ifdef CYGPKG_HAL_GDB_FILEIO // File I/O over the GDB remote protocol
+ __externC int cyg_hal_gdbfileio_stat( const char *pathname,
+ void *statbuf, int *sig );
+ if (gdb_active)
+ err = cyg_hal_gdbfileio_stat((const char *)arg1, (void *)arg2,
+ (int *)sig);
+ else
+#endif
+ err = -NEWLIB_ENOSYS;
+ break;
+ }
+ case SYS_fstat:
+ {
+#ifdef CYGPKG_HAL_GDB_FILEIO // File I/O over the GDB remote protocol
+ __externC int cyg_hal_gdbfileio_fstat( int fd, void *statbuf,
+ int *sig );
+ if (gdb_active)
+ err = cyg_hal_gdbfileio_fstat((int)arg1, (void *)arg2,
+ (int *)sig);
+ else
+#endif
+ {
+ struct newlib_stat *st = (struct newlib_stat *)arg2;
+ st->st_mode = NEWLIB_S_IFCHR;
+ st->st_blksize = 4096;
+ err = 0;
+ }
+ break;
+ }
+ case SYS_rename:
+ {
+#ifdef CYGPKG_HAL_GDB_FILEIO // File I/O over the GDB remote protocol
+ __externC int cyg_hal_gdbfileio_rename( const char *oldpath,
+ const char *newpath,
+ int *sig );
+ if (gdb_active)
+ err = cyg_hal_gdbfileio_rename((const char *)arg1, (const char *)arg2,
+ (int *)sig);
+ else
+#endif
+ err = -NEWLIB_ENOSYS;
+ break;
+ }
+ case SYS_unlink:
+ {
+#ifdef CYGPKG_HAL_GDB_FILEIO // File I/O over the GDB remote protocol
+ __externC int cyg_hal_gdbfileio_unlink( const char *pathname,
+ int *sig );
+ if (gdb_active)
+ err = cyg_hal_gdbfileio_unlink((const char *)arg1, (int *)sig);
+ else
+#endif
+ err = -NEWLIB_ENOSYS;
+ break;
+ }
+ case SYS_isatty:
+ {
+#ifdef CYGPKG_HAL_GDB_FILEIO // File I/O over the GDB remote protocol
+ __externC int cyg_hal_gdbfileio_isatty( int fd, int *sig );
+ if (gdb_active)
+ err = cyg_hal_gdbfileio_isatty((int)arg1, (int *)sig);
+ else
+#endif
+ err = 1;
+ break;
+ }
+ case SYS_system:
+ {
+#ifdef CYGPKG_HAL_GDB_FILEIO // File I/O over the GDB remote protocol
+ __externC int cyg_hal_gdbfileio_system( const char *command,
+ int *sig );
+ if (gdb_active)
+ err = cyg_hal_gdbfileio_system((const char *)arg1, (int *)sig);
+ else
+#endif
+ err = -1;
+ break;
+ }
+ case SYS_gettimeofday:
+ {
+#ifdef CYGPKG_HAL_GDB_FILEIO // File I/O over the GDB remote protocol
+ __externC int cyg_hal_gdbfileio_gettimeofday( void *tv, void *tz,
+ int *sig );
+ if (gdb_active)
+ err = cyg_hal_gdbfileio_gettimeofday((void *)arg1, (void *)arg2,
+ (int *)sig);
+ else
+#endif
+ err = 0;
+ break;
+ }
+ case SYS_utime:
+ // FIXME. Some libglosses depend on this behavior.
+ err = sys_times((unsigned long *)arg1);
+ break;
+
+ case SYS_times:
+ err = sys_times((unsigned long *)arg1);
+ break;
+
+ case SYS_meminfo:
+ err = 1;
+ *(unsigned long *)arg1 = (unsigned long)(ram_end-ram_start);
+ *(unsigned long *)arg2 = (unsigned long)ram_end;
+ break;
+#ifdef CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+ case SYS_timer_call_back:
+ sys_profile_call_back( (char *)arg1, (char **)arg2 );
+ break;
+
+ case SYS_timer_frequency:
+ sys_profile_frequency( (int)arg1, (unsigned int *)arg2 );
+ break;
+
+ case SYS_timer_reset:
+ sys_profile_reset();
+ break;
+
+#endif // CYGSEM_REDBOOT_BSP_SYSCALLS_GPROF
+ case __GET_SHARED:
+ *(__shared_t **)arg1 = &__shared_data;
+ break;
+
+ case SYS_exit:
+ *sig = -1; // signal exit
+ err = arg1;
+
+ if (gdb_active) {
+#ifdef CYGOPT_REDBOOT_BSP_SYSCALLS_EXIT_WITHOUT_TRAP
+ __send_exit_status((int)arg1);
+#else
+ *sig = SIGTRAP;
+ err = func;
+#endif // CYGOPT_REDBOOT_BSP_SYSCALLS_EXIT_WITHOUT_TRAP
+ }
+ break;
+
+ default:
+ return 0;
+ }
+
+ *retval = err;
+ return 1;
+}
+
+#endif
diff --git a/cesar/ecos/packages/redboot/current/src/ticks.c b/cesar/ecos/packages/redboot/current/src/ticks.c
new file mode 100644
index 0000000000..baedfde53f
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/ticks.c
@@ -0,0 +1,77 @@
+//==========================================================================
+//
+// ticks.c
+//
+// Stand-alone timer support for RedBoot
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include "redboot.h"
+
+static unsigned long ticks = 0;
+static long elapsed = 0;
+
+unsigned long
+do_ms_tick(void)
+{
+ CYGACC_CALL_IF_DELAY_US(CYGDBG_REDBOOT_TICK_GRANULARITY);
+ elapsed += CYGDBG_REDBOOT_TICK_GRANULARITY;
+ if (elapsed >= 1000) {
+ elapsed = 0;
+ ticks++;
+ }
+ return ticks;
+}
+
+unsigned long
+get_ms_ticks(void)
+{
+ return ticks;
+}
diff --git a/cesar/ecos/packages/redboot/current/src/time_date.cxx b/cesar/ecos/packages/redboot/current/src/time_date.cxx
new file mode 100644
index 0000000000..966b5b8e7e
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/time_date.cxx
@@ -0,0 +1,124 @@
+//==========================================================================
+//
+// time_date.cxx
+//
+// RedBoot time/date commands
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors:
+// Date: 2003-09-10
+// Description:
+//####DESCRIPTIONEND####
+// -------------------------------------------------------------------------
+
+#include <redboot.h>
+#include <pkgconf/hal.h>
+#include <pkgconf/wallclock.h>
+
+#include <cyg/infra/diag.h>
+#include <cyg/io/wallclock.hxx> // The WallClock API
+#include <cyg/io/wallclock/wallclock.inl> // Helper functions (avoids LIBC)
+
+RedBoot_cmd("date",
+ "Show/Set the time of day",
+ "[YYYY/MM/DD HH:MM:SS]",
+ do_time_date
+ );
+
+static bool
+verify(cyg_uint32 val, int min, int max, char *id)
+{
+ if (((int)val < min) || ((int)val > max)) {
+ diag_printf("%s is out of range - must be [%d..%d]\n", id, min, max);
+ return false;
+ }
+ return true;
+}
+
+void
+do_time_date(int argc, char *argv[])
+{
+ cyg_uint32 now = Cyg_WallClock::wallclock->get_current_time();
+ cyg_uint32 year, month, mday, hour, minute, second;
+ char *sp;
+ bool ok = true;
+
+ if (argc == 1) {
+ // Just show the current time/date
+ _simple_mkdate(now, &year, &month, &mday, &hour, &minute, &second);
+ diag_printf("%04d/%02d/%02d %02d:%02d:%02d\n",
+ year, month, mday, hour, minute, second);
+ } else if (argc == 3) {
+ sp = argv[1];
+ if (!parse_num(sp, (unsigned long *)&year, &sp, "/") ||
+ !parse_num(sp, (unsigned long *)&month, &sp, "/") ||
+ !parse_num(sp, (unsigned long *)&mday, &sp, "/")) {
+ ok = false;
+ }
+ sp = argv[2];
+ if (!parse_num(sp, (unsigned long *)&hour, &sp, ":") ||
+ !parse_num(sp, (unsigned long *)&minute, &sp, ":") ||
+ !parse_num(sp, (unsigned long *)&second, &sp, ":")) {
+ ok = false;
+ }
+ if (ok) {
+ // Verify values make some sense, then set the hardware
+ if (year < 100) year += 2000;
+ ok = ok && verify(year, 1970, 2034, "year");
+ ok = ok && verify(month, 1, 12, "month");
+ ok = ok && verify(mday, 1, 31, "day");
+ ok = ok && verify(hour, 0, 23, "hour");
+ ok = ok && verify(minute, 0, 59, "minute");
+ ok = ok && verify(second, 0, 59, "second");
+ if (ok) {
+ now = _simple_mktime(year, month, mday, hour, minute, second);
+ Cyg_WallClock::wallclock->set_current_time(now);
+ }
+ }
+ } else {
+ ok = false;
+ }
+ if (!ok) {
+ diag_printf("usage: date [YYYY/MM/DD HH:MM:SS]\n");
+ }
+
+}
+
+// -------------------------------------------------------------------------
+// EOF time_date.cxx
diff --git a/cesar/ecos/packages/redboot/current/src/version.c b/cesar/ecos/packages/redboot/current/src/version.c
new file mode 100644
index 0000000000..7df2730fb4
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/version.c
@@ -0,0 +1,97 @@
+//==========================================================================
+//
+// version.c
+//
+// RedBoot version "string"
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas
+// Date: 2000-12-13
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/redboot.h>
+#include <cyg/hal/hal_arch.h>
+
+//
+// These strings are used for informational purposes only. If the end
+// user wishes to replace them, simply redefine them in a platform specific
+// file, e.g. in a local file used to provide additional local RedBoot
+// customization. Examples of such are platforms which define a special
+// 'exec' command used to start a Linux kernel.
+//
+// CAUTION! Since this file is compiled using very special rules, it is not
+// possible to replace it with a local version contained in the "build" tree.
+// Replacing the information exported herein is accomplished via the techniques
+// outlined above.
+//
+
+// Do not change the following two lines at all. They are fiddled by release
+// scripts.
+#define _CERTIFICATE Non-certified
+//#define CYGDAT_REDBOOT_CUSTOM_VERSION current
+
+#if defined(CYGDAT_REDBOOT_CUSTOM_VERSION)
+#define _REDBOOT_VERSION CYGDAT_REDBOOT_CUSTOM_VERSION
+#elif defined(CYGPKG_REDBOOT_current)
+#define _REDBOOT_VERSION UNKNOWN
+#else
+#define _REDBOOT_VERSION CYGPKG_REDBOOT
+#endif
+
+#define __s(x) #x
+#define _s(x) __s(x)
+
+char RedBoot_version[] CYGBLD_ATTRIB_WEAK =
+ "\nRedBoot(tm) bootstrap and debug environment [" _s(CYG_HAL_STARTUP) "]"
+ "\n" _s(_CERTIFICATE) " release, version " _s(_REDBOOT_VERSION)
+ " - built " __TIME__ ", " __DATE__ "\n\n";
+
+// Override default GDB stubs 'info'
+// Note: this can still be a "weak" symbol since it will occur in the .o
+// file explicitly mentioned in the link command. User programs will
+// still be allowed to override it.
+char GDB_stubs_version[] CYGBLD_ATTRIB_WEAK =
+ "eCos GDB stubs [via RedBoot] - built " __DATE__ " / " __TIME__;
diff --git a/cesar/ecos/packages/redboot/current/src/xyzModem.c b/cesar/ecos/packages/redboot/current/src/xyzModem.c
new file mode 100644
index 0000000000..25794b8a02
--- /dev/null
+++ b/cesar/ecos/packages/redboot/current/src/xyzModem.c
@@ -0,0 +1,597 @@
+//==========================================================================
+//
+// xyzModem.c
+//
+// RedBoot stream handler for xyzModem protocol
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s): gthomas
+// Contributors: gthomas, tsmith, Yoshinori Sato
+// Date: 2000-07-14
+// Purpose:
+// Description:
+//
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <xyzModem.h>
+
+// Assumption - run xyzModem protocol over the console port
+
+// Values magic to the protocol
+#define SOH 0x01
+#define STX 0x02
+#define EOT 0x04
+#define ACK 0x06
+#define BSP 0x08
+#define NAK 0x15
+#define CAN 0x18
+#define EOF 0x1A // ^Z for DOS officionados
+
+#define USE_YMODEM_LENGTH
+
+// Data & state local to the protocol
+static struct {
+ hal_virtual_comm_table_t* __chan;
+ unsigned char pkt[1024], *bufp;
+ unsigned char blk,cblk,crc1,crc2;
+ unsigned char next_blk; // Expected block
+ int len, mode, total_retries;
+ int total_SOH, total_STX, total_CAN;
+ bool crc_mode, at_eof, tx_ack;
+#ifdef USE_YMODEM_LENGTH
+ unsigned long file_length, read_length;
+#endif
+} xyz;
+
+#define xyzModem_CHAR_TIMEOUT 2000 // 2 seconds
+#define xyzModem_MAX_RETRIES 20
+#define xyzModem_MAX_RETRIES_WITH_CRC 10
+#define xyzModem_CAN_COUNT 3 // Wait for 3 CAN before quitting
+
+#ifdef DEBUG
+#ifndef USE_SPRINTF
+//
+// Note: this debug setup only works if the target platform has two serial ports
+// available so that the other one (currently only port 1) can be used for debug
+// messages.
+//
+static int
+zm_dprintf(char *fmt, ...)
+{
+ int cur_console;
+ va_list args;
+
+ va_start(args, fmt);
+ cur_console = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(1);
+ diag_vprintf(fmt, args);
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(cur_console);
+}
+
+static void
+zm_flush(void)
+{
+}
+
+#else
+//
+// Note: this debug setup works by storing the strings in a fixed buffer
+//
+static char *zm_out = (char *)0x00380000;
+static char *zm_out_start = (char *)0x00380000;
+
+static int
+zm_dprintf(char *fmt, ...)
+{
+ int len;
+ va_list args;
+
+ va_start(args, fmt);
+ len = diag_vsprintf(zm_out, fmt, args);
+ zm_out += len;
+ return len;
+}
+
+static void
+zm_flush(void)
+{
+ char *p = zm_out_start;
+ while (*p) mon_write_char(*p++);
+ zm_out = zm_out_start;
+}
+#endif
+
+static void
+zm_dump_buf(void *buf, int len)
+{
+ diag_vdump_buf_with_offset(zm_dprintf, buf, len, 0);
+}
+
+static unsigned char zm_buf[2048];
+static unsigned char *zm_bp;
+
+static void
+zm_new(void)
+{
+ zm_bp = zm_buf;
+}
+
+static void
+zm_save(unsigned char c)
+{
+ *zm_bp++ = c;
+}
+
+static void
+zm_dump(int line)
+{
+ zm_dprintf("Packet at line: %d\n", line);
+ zm_dump_buf(zm_buf, zm_bp-zm_buf);
+}
+
+#define ZM_DEBUG(x) x
+#else
+#define ZM_DEBUG(x)
+#endif
+
+// Wait for the line to go idle
+static void
+xyzModem_flush(void)
+{
+ int res;
+ char c;
+ while (true) {
+ res = CYGACC_COMM_IF_GETC_TIMEOUT(*xyz.__chan, &c);
+ if (!res) return;
+ }
+}
+
+static int
+xyzModem_get_hdr(void)
+{
+ char c;
+ int res;
+ bool hdr_found = false;
+ int i, can_total, hdr_chars;
+ unsigned short cksum;
+
+ ZM_DEBUG(zm_new());
+ // Find the start of a header
+ can_total = 0;
+ hdr_chars = 0;
+
+ if (xyz.tx_ack) {
+ CYGACC_COMM_IF_PUTC(*xyz.__chan, ACK);
+ xyz.tx_ack = false;
+ }
+ while (!hdr_found) {
+ res = CYGACC_COMM_IF_GETC_TIMEOUT(*xyz.__chan, &c);
+ ZM_DEBUG(zm_save(c));
+ if (res) {
+ hdr_chars++;
+ switch (c) {
+ case SOH:
+ xyz.total_SOH++;
+ case STX:
+ if (c == STX) xyz.total_STX++;
+ hdr_found = true;
+ break;
+ case CAN:
+ xyz.total_CAN++;
+ ZM_DEBUG(zm_dump(__LINE__));
+ if (++can_total == xyzModem_CAN_COUNT) {
+ return xyzModem_cancel;
+ } else {
+ // Wait for multiple CAN to avoid early quits
+ break;
+ }
+ case EOT:
+ // EOT only supported if no noise
+ if (hdr_chars == 1) {
+ CYGACC_COMM_IF_PUTC(*xyz.__chan, ACK);
+ ZM_DEBUG(zm_dprintf("ACK on EOT #%d\n", __LINE__));
+ ZM_DEBUG(zm_dump(__LINE__));
+ return xyzModem_eof;
+ }
+ default:
+ // Ignore, waiting for start of header
+ ;
+ }
+ } else {
+ // Data stream timed out
+ xyzModem_flush(); // Toss any current input
+ ZM_DEBUG(zm_dump(__LINE__));
+ CYGACC_CALL_IF_DELAY_US((cyg_int32)250000);
+ return xyzModem_timeout;
+ }
+ }
+
+ // Header found, now read the data
+ res = CYGACC_COMM_IF_GETC_TIMEOUT(*xyz.__chan, &xyz.blk);
+ ZM_DEBUG(zm_save(xyz.blk));
+ if (!res) {
+ ZM_DEBUG(zm_dump(__LINE__));
+ return xyzModem_timeout;
+ }
+ res = CYGACC_COMM_IF_GETC_TIMEOUT(*xyz.__chan, &xyz.cblk);
+ ZM_DEBUG(zm_save(xyz.cblk));
+ if (!res) {
+ ZM_DEBUG(zm_dump(__LINE__));
+ return xyzModem_timeout;
+ }
+ xyz.len = (c == SOH) ? 128 : 1024;
+ xyz.bufp = xyz.pkt;
+ for (i = 0; i < xyz.len; i++) {
+ res = CYGACC_COMM_IF_GETC_TIMEOUT(*xyz.__chan, &c);
+ ZM_DEBUG(zm_save(c));
+ if (res) {
+ xyz.pkt[i] = c;
+ } else {
+ ZM_DEBUG(zm_dump(__LINE__));
+ return xyzModem_timeout;
+ }
+ }
+ res = CYGACC_COMM_IF_GETC_TIMEOUT(*xyz.__chan, &xyz.crc1);
+ ZM_DEBUG(zm_save(xyz.crc1));
+ if (!res) {
+ ZM_DEBUG(zm_dump(__LINE__));
+ return xyzModem_timeout;
+ }
+ if (xyz.crc_mode) {
+ res = CYGACC_COMM_IF_GETC_TIMEOUT(*xyz.__chan, &xyz.crc2);
+ ZM_DEBUG(zm_save(xyz.crc2));
+ if (!res) {
+ ZM_DEBUG(zm_dump(__LINE__));
+ return xyzModem_timeout;
+ }
+ }
+ ZM_DEBUG(zm_dump(__LINE__));
+ // Validate the message
+ if ((xyz.blk ^ xyz.cblk) != (unsigned char)0xFF) {
+ ZM_DEBUG(zm_dprintf("Framing error - blk: %x/%x/%x\n", xyz.blk, xyz.cblk, (xyz.blk ^ xyz.cblk)));
+ ZM_DEBUG(zm_dump_buf(xyz.pkt, xyz.len));
+ xyzModem_flush();
+ return xyzModem_frame;
+ }
+ // Verify checksum/CRC
+ if (xyz.crc_mode) {
+ cksum = cyg_crc16(xyz.pkt, xyz.len);
+ if (cksum != ((xyz.crc1 << 8) | xyz.crc2)) {
+ ZM_DEBUG(zm_dprintf("CRC error - recvd: %02x%02x, computed: %x\n",
+ xyz.crc1, xyz.crc2, cksum & 0xFFFF));
+ return xyzModem_cksum;
+ }
+ } else {
+ cksum = 0;
+ for (i = 0; i < xyz.len; i++) {
+ cksum += xyz.pkt[i];
+ }
+ if (xyz.crc1 != (cksum & 0xFF)) {
+ ZM_DEBUG(zm_dprintf("Checksum error - recvd: %x, computed: %x\n", xyz.crc1, cksum & 0xFF));
+ return xyzModem_cksum;
+ }
+ }
+ // If we get here, the message passes [structural] muster
+ return 0;
+}
+
+int
+xyzModem_stream_open(connection_info_t *info, int *err)
+{
+ int console_chan, stat;
+ int retries = xyzModem_MAX_RETRIES;
+ int crc_retries = xyzModem_MAX_RETRIES_WITH_CRC;
+
+// ZM_DEBUG(zm_out = zm_out_start);
+#ifdef xyzModem_zmodem
+ if (info->mode == xyzModem_zmodem) {
+ *err = xyzModem_noZmodem;
+ return -1;
+ }
+#endif
+
+ // Set up the I/O channel. Note: this allows for using a different port in the future
+ console_chan = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+ if (info->chan >= 0) {
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(info->chan);
+ } else {
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(console_chan);
+ }
+ xyz.__chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(console_chan);
+ CYGACC_COMM_IF_CONTROL(*xyz.__chan, __COMMCTL_SET_TIMEOUT, xyzModem_CHAR_TIMEOUT);
+ xyz.len = 0;
+ xyz.crc_mode = true;
+ xyz.at_eof = false;
+ xyz.tx_ack = false;
+ xyz.mode = info->mode;
+ xyz.total_retries = 0;
+ xyz.total_SOH = 0;
+ xyz.total_STX = 0;
+ xyz.total_CAN = 0;
+#ifdef USE_YMODEM_LENGTH
+ xyz.read_length = 0;
+ xyz.file_length = 0;
+#endif
+
+ CYGACC_COMM_IF_PUTC(*xyz.__chan, (xyz.crc_mode ? 'C' : NAK));
+
+ if (xyz.mode == xyzModem_xmodem) {
+ // X-modem doesn't have an information header - exit here
+ xyz.next_blk = 1;
+ return 0;
+ }
+
+ while (retries-- > 0) {
+ stat = xyzModem_get_hdr();
+ if (stat == 0) {
+ // Y-modem file information header
+ if (xyz.blk == 0) {
+#ifdef USE_YMODEM_LENGTH
+ // skip filename
+ while (*xyz.bufp++);
+ // get the length
+ parse_num(xyz.bufp, &xyz.file_length, NULL, " ");
+#endif
+ // The rest of the file name data block quietly discarded
+ xyz.tx_ack = true;
+ }
+ xyz.next_blk = 1;
+ xyz.len = 0;
+ return 0;
+ } else
+ if (stat == xyzModem_timeout) {
+ if (--crc_retries <= 0) xyz.crc_mode = false;
+ CYGACC_CALL_IF_DELAY_US(5*100000); // Extra delay for startup
+ CYGACC_COMM_IF_PUTC(*xyz.__chan, (xyz.crc_mode ? 'C' : NAK));
+ xyz.total_retries++;
+ ZM_DEBUG(zm_dprintf("NAK (%d)\n", __LINE__));
+ }
+ if (stat == xyzModem_cancel) {
+ break;
+ }
+ }
+ *err = stat;
+ ZM_DEBUG(zm_flush());
+ return -1;
+}
+
+int
+xyzModem_stream_read(char *buf, int size, int *err)
+{
+ int stat, total, len;
+ int retries;
+
+ total = 0;
+ stat = xyzModem_cancel;
+ // Try and get 'size' bytes into the buffer
+ while (!xyz.at_eof && (size > 0)) {
+ if (xyz.len == 0) {
+ retries = xyzModem_MAX_RETRIES;
+ while (retries-- > 0) {
+ stat = xyzModem_get_hdr();
+ if (stat == 0) {
+ if (xyz.blk == xyz.next_blk) {
+ xyz.tx_ack = true;
+ ZM_DEBUG(zm_dprintf("ACK block %d (%d)\n", xyz.blk, __LINE__));
+ xyz.next_blk = (xyz.next_blk + 1) & 0xFF;
+
+#if defined(xyzModem_zmodem) || defined(USE_YMODEM_LENGTH)
+ if (xyz.mode == xyzModem_xmodem || xyz.file_length == 0) {
+#else
+ if (1) {
+#endif
+ // Data blocks can be padded with ^Z (EOF) characters
+ // This code tries to detect and remove them
+ if ((xyz.bufp[xyz.len-1] == EOF) &&
+ (xyz.bufp[xyz.len-2] == EOF) &&
+ (xyz.bufp[xyz.len-3] == EOF)) {
+ while (xyz.len && (xyz.bufp[xyz.len-1] == EOF)) {
+ xyz.len--;
+ }
+ }
+ }
+
+#ifdef USE_YMODEM_LENGTH
+ // See if accumulated length exceeds that of the file.
+ // If so, reduce size (i.e., cut out pad bytes)
+ // Only do this for Y-modem (and Z-modem should it ever
+ // be supported since it can fall back to Y-modem mode).
+ if (xyz.mode != xyzModem_xmodem && 0 != xyz.file_length) {
+ xyz.read_length += xyz.len;
+ if (xyz.read_length > xyz.file_length) {
+ xyz.len -= (xyz.read_length - xyz.file_length);
+ }
+ }
+#endif
+ break;
+ } else if (xyz.blk == ((xyz.next_blk - 1) & 0xFF)) {
+ // Just re-ACK this so sender will get on with it
+ CYGACC_COMM_IF_PUTC(*xyz.__chan, ACK);
+ continue; // Need new header
+ } else {
+ stat = xyzModem_sequence;
+ }
+ }
+ if (stat == xyzModem_cancel) {
+ break;
+ }
+ if (stat == xyzModem_eof) {
+ CYGACC_COMM_IF_PUTC(*xyz.__chan, ACK);
+ ZM_DEBUG(zm_dprintf("ACK (%d)\n", __LINE__));
+ if (xyz.mode == xyzModem_ymodem) {<